diff --git a/.cursor/rules/40-iam-sso.mdc b/.cursor/rules/40-iam-sso.mdc new file mode 100644 index 0000000..1c5ffa0 --- /dev/null +++ b/.cursor/rules/40-iam-sso.mdc @@ -0,0 +1,86 @@ +--- +description: اتصال ورود ادمین به سامانه هویت متمرکز (IAM) — مرزها و قواعدی که نباید شکسته شوند +globs: +alwaysApply: true +--- + +# اتصال به سامانه هویت متمرکز (Central IAM) + +مستندها: +- `docs/iam-connection.md` — **نحوه ارتباط**: سه کانال داده و رفتار در خطا +- `docs/iam-sso.md` — پیکربندی، ورود مشترک با همکار، ابطال نشست +- مرجع تصویری اندپوینت‌های IAM: `/docs` (Scalar) + +## اصل غیرقابل‌مذاکره + +این قابلیت **افزایشی** است. با `IAM_ENABLED=false` (پیش‌فرض) سامانه باید دقیقاً +مثل قبل رفتار کند: یک `bcrypt.compare` محلی و هیچ درخواست شبکه‌ای. + +- فرم ورود عوض نمی‌شود. پاسخ ورود همان `api_token` قبلی است، به‌اضافهٔ + `iamBootstrapUrl` فقط وقتی IAM بلیت مرورگر داده باشد. +- وقتی IAM روشن است و `IAM_ADMIN_REDIRECT_URI` (یا یکی از + `IAM_ADMIN_REDIRECT_URIS`) با آدرس خودِ پنل یکی است، بار اول بدون توکن یک + پرش `prompt=none` به `/auth/iam/callback` می‌رود. اپ کاربر همین کار را با + `IAM_REDIRECT_URI` و `IAM_REDIRECT_URIS` می‌کند. آدرس ناشناس جایگزین آدرس + ثبت‌شده نمی‌شود و پاسخ `enabled: false` می‌ماند. +- IAM خاموش، یا redirect ادمین خالی، یعنی این پرش شروع نمی‌شود و خروج آدرس + مرکزی برنمی‌گرداند. + +## نقشه فایل‌ها + +| مسیر | نقش | +| --- | --- | +| `apps/api/src/modules/iam/iam.service.ts` | ارتباط با IAM و نگاشت خطاها | +| `apps/api/src/modules/iam/iam.module.ts` | ماژول Global (بی‌اثر تا زمان روشن شدن) | +| `apps/api/src/modules/auth/auth.service.ts` | متد `verifyPassword` — تنها نقطه اتصال ورود | +| `apps/api/src/modules/sessions/admin-session.service.ts` | نشست‌های قابل ابطال (`jti`) | +| `apps/api/src/modules/iam/iam-logout.service.ts` | تأیید توکن خروج سراسری (JWKS، RS256) | +| `apps/api/src/modules/iam/iam.controller.ts` | `POST /api/iam/backchannel-logout` | + +## قواعد سخت + +1. **هر نتیجه مبهم باید به `bcrypt` محلی برگردد.** سرویس در دسترس نیست، کاربر + آنجا نیست، یا ۴۲۹ گرفتیم ⇒ رمز محلی بررسی شود. فقط `exclusive` اجازه رد + کردن دارد. خرابی IAM هرگز نباید ادمین‌ها را بیرون بیندازد. + +2. **حساب قفل‌شده، «نتیجه قطعی» است نه خطا.** `account_locked` نباید به + `bcrypt` محلی برگردد وگرنه قفلِ IAM بی‌اثر می‌شود. + +3. **`client_ip` همیشه فرستاده می‌شود.** بدون آن، محدودیت نرخِ IAM روی IP همین + سرور اعمال می‌شود و بعد از چند ورود کل پنل ادمین ۴۲۹ می‌گیرد. اگر API پشت + پراکسی رفت، `trust proxy` را تنظیم کن وگرنه `@Ip()` همیشه IP پراکسی است. + +4. **هیچ جدول موجودی تغییر نمی‌کند.** نگاشت کاربر با همان `mobile` انجام می‌شود و + `iamSub`/`iamSessionId` روی جدول **جدید** `AdminSession` می‌نشینند، نه روی + `AdminUser`. اگر روزی چیزی از IAM لازم شد، همین الگو را نگه دار. + +5. **ابطال نشست دو شرط دارد و هر دو لازم است:** توکن باید `jti` داشته باشد و ردیف + `AdminSession` باید موجود و باطل‌نشده باشد. با خاموش بودن ردیابی + (`AUTH_SESSION_TRACKING=false` یا IAM خاموش) نه `jti` صادر می‌شود، نه کوئری + اضافه‌ای در مسیر احراز هویت اجرا می‌شود — یعنی دقیقاً رفتار و هزینه قبلی. + توکن بدون `jti` هرگز نباید رد شود، وگرنه روشن کردن این کلید همه را بیرون می‌اندازد. + +6. **اندپوینت خروج سراسری بدون احراز هویت است و باید بماند.** اعتبارش از امضای + `logout_token` می‌آید: `iss`، `aud`، `events`، نبودن `nonce` و `exp` همه بررسی + می‌شوند. هیچ‌یک از این بررسی‌ها را برای «راحتی تست» حذف نکن. پاسخ همیشه ۲۰۰ است + تا IdP بی‌نهایت تلاش مجدد نکند؛ دلیل رد شدن فقط لاگ می‌شود. + +7. **فرم ورود این پنل مرحله «ورود کد» ندارد**، پس حساب دو مرحله‌ای در IAM از این + مسیر قابل تکمیل نیست و با پیام روشن رد می‌شود. تا وقتی آن مرحله ساخته نشده، + تلاش برای تکمیل 2FA در بک‌اند بی‌معناست. + +8. **ورود اپ کاربر رمز ندارد**، پس از `verifyCredentials` استفاده نمی‌شود؛ بعد از + بررسی موفق کد، `IamService.attestOtpLogin` فراخوانی می‌شود. قاعده خطا: «کاربر + آنجا نیست» و «سرویس در دسترس نیست» ⇒ ورود ادامه می‌یابد؛ «قفل/غیرفعال/دو + مرحله‌ای» ⇒ ورود رد می‌شود. کد اضطراری تحویل (`OTP_MASTER_CODE`) هرگز به IAM + اعلام نمی‌شود. + +9. پیکربندی ناقص = خاموش. `IamService.enabled` وجود `issuer`, `client_id` و + `client_secret` را هم شرط می‌کند (با `envOr` که مقدار خالی را unset می‌شمارد). + +## قبل از تحویل + +```bash +cd apps/api && npx jest src/modules/iam src/modules/auth src/modules/sessions +# و در استقرار: prisma migrate deploy (جدول AdminSession) +``` diff --git a/.env.example b/.env.example index 4770a6f..332440e 100644 --- a/.env.example +++ b/.env.example @@ -23,3 +23,134 @@ USER_APP_V2_PORT=5182 # API Configuration (kept for any tooling that still reads bare PORT) PORT=3000 + +# --------------------------------------------------------------------------- +# Authentication +# --------------------------------------------------------------------------- +# Admin JWT signing secret. REQUIRED in any real deployment — without it the +# API falls back to a well-known development string. +JWT_SECRET= +# Admin token lifetime (default 12h). +JWT_EXPIRES_IN= +# Customer JWT signing secret. Deliberately SEPARATE from JWT_SECRET so an +# admin token can never validate as a customer token (T1). +JWT_CUSTOMER_SECRET= +# Customer token lifetime (default 30d). +JWT_CUSTOMER_EXPIRES_IN= + +# --------------------------------------------------------------------------- +# Accounting software integration (Tahesab / Zarrin, D27). Everything else — +# which software, address, token, mappings — is set in the admin panel +# («پیکر بندی ← اتصال حسابداری»), and the integration is off until then. +# --------------------------------------------------------------------------- +# Encrypts the accounting token at rest. Set a long random value. Blank falls +# back to a key derived from JWT_SECRET (with a boot warning); changing that +# key later means re-entering the token in the admin panel. +ACCOUNTING_SECRET_KEY= +# "off" keeps this API instance out of the background sync (only needed when +# several instances run and you want exactly one doing it; a lease already +# stops two from running the same job). +ACCOUNTING_WORKER= + +# --------------------------------------------------------------------------- +# Central IAM — delegated admin login (docs/iam-sso.md) +# --------------------------------------------------------------------------- +# OFF by default. When off, nothing changes: admin login stays a local bcrypt +# check and no request ever leaves this server. +# +# When on, the admin's phone + password are verified against the central +# identity service instead. There is NO UI change: no SSO button, no redirect. +# If the identity service is unreachable or does not know the account, the +# local password check still runs (see IAM_LOGIN_DELEGATION). +IAM_ENABLED=false +IAM_ISSUER= +# The client must be registered there as confidential AND trusted. +IAM_CLIENT_ID= +IAM_CLIENT_SECRET= +# One of the two; tenant_id wins when both are set. +IAM_TENANT_ID= +IAM_TENANT_SLUG= +# off | fallback (default, safest) | exclusive (local password no longer accepted) +IAM_LOGIN_DELEGATION=fallback +IAM_HTTP_TIMEOUT_MS=8000 +# صفحه callback اپ کاربر. باید در کلاینت IAM دقیقاً ثبت شود. +IAM_REDIRECT_URI= +# callbackهای اضافه (دولوپ و دامنه دیگر) با کاما. آدرس ناشناس جایگزین نمی‌شود. +IAM_REDIRECT_URIS= +# بعد از ورود محلی، مرورگر برای کوکی نشست مشترک به اینجا برمی‌گردد. +IAM_BROWSER_RETURN_URL= +# خروج سراسری فقط اگر این آدرس در post_logout کلاینت ثبت شده باشد برمی‌گردد. +IAM_POST_LOGOUT_REDIRECT_URI= +# مقصدهای مجاز خروج اپ کاربر، با کاما. باید عیناً در post_logout کلاینت باشند. +IAM_ALLOWED_RETURN_URLS= +# پنل ادمین. خالی یعنی بررسی بی‌صدای ورود در پنل انجام نمی‌شود. +IAM_ADMIN_REDIRECT_URI= +IAM_ADMIN_REDIRECT_URIS= +IAM_ADMIN_BROWSER_RETURN_URL= +IAM_ADMIN_POST_LOGOUT_REDIRECT_URI= +IAM_ADMIN_ALLOWED_RETURN_URLS= + +# Revocable admin sessions (AdminSession table). +# +# An admin token is self-contained and lives for JWT_EXPIRES_IN (12h), so until +# this existed nothing could end a session early — not disabling the account, not +# a central sign-out. Every issued token now carries a `jti` recorded in the +# database, and a revoked row is refused on the next request. +# +# Unset = follows IAM_ENABLED (on with the IAM, so central revocation reaches +# here). `true` turns it on without the IAM; `false` opts out of the per-request +# lookup and central revocation then cannot end a session here. +AUTH_SESSION_TRACKING= + +# To let the IAM end sessions here, register this path on the client there as its +# backchannel_logout_uri: +# https:///api/iam/backchannel-logout + +# --------------------------------------------------------------------------- +# ⚠ DELIVERY ONLY — REMOVE BEFORE THE REAL RELEASE (D20 / ISSUES REL-01) +# --------------------------------------------------------------------------- +# A fixed OTP that signs in ANY active customer, alongside the real code. +# MUST BE EXACTLY 4 DIGITS: the apps' login box has four single-character +# inputs and only submits at four (LoginView.vue:43). A longer code still works +# over the API but cannot be typed into either app. +# Leave it EMPTY or unset to disable it completely — that is the correct state +# for production. While it is set, the API prints a warning banner at boot. +OTP_MASTER_CODE= + +# --------------------------------------------------------------------------- +# SMS gateway. The default "relay" driver works with everything blank (D26). +# A failed SMS never stops the server or an operation (D20). +# --------------------------------------------------------------------------- +# "relay" (default), "trez", or "none" to disable explicitly. +SMS_PROVIDER= +# relay — the owner's createsms gateway. All four are optional. +# URL and secret have built-in defaults. +SMS_RELAY_URL= +SMS_RELAY_SECRET= +# The "host" field. Blank sends this machine's first external IPv4 — inside +# Docker that is the container's address. +SMS_RELAY_HOST= +# "kave" (default, Kavenegar) or "default" to let the gateway pick the line. +SMS_RELAY_PLATFORM= +# trez — only used with SMS_PROVIDER=trez. Never commit real values. +# Override only for staging; defaults to the provider's live endpoint. +SMS_TREZ_URL= +SMS_TREZ_USERNAME= +SMS_TREZ_PASSWORD= +SMS_TREZ_SENDER_LINE= + +# --------------------------------------------------------------------------- +# Uploads +# --------------------------------------------------------------------------- +# Absolute path for uploaded files; defaults to /storage/uploads. +UPLOAD_DIR= + +# --------------------------------------------------------------------------- +# Profile completion ("تکمیل پروفایل") +# --------------------------------------------------------------------------- +# Comma-separated admin mobiles told when a customer uploads their documents. +# The reference hardcoded four numbers in its source +# (henza_server Major/CustomerController::sendSmsToAdmin); they live here +# instead so no personal number is committed. Blank means nobody is notified — +# the upload and the customer's own SMS still go through (D20). +PROFILE_ADMIN_MOBILES= diff --git a/.gitignore b/.gitignore index 990e74b..032bcd9 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,7 @@ apps/api/storage/uploads/* # apps/api/release/app.js + apps/api/release/vendor/ (Prisma) # apps/admin-panel/dist/ # apps/user-app/dist/ + +# Live henza data dump (customers' personal data). Never commit. +# Only the structure-only oapi-struncture.sql belongs in the repo. +/oapi.sql diff --git a/DELIVERY.md b/DELIVERY.md new file mode 100644 index 0000000..18e5dc1 --- /dev/null +++ b/DELIVERY.md @@ -0,0 +1,427 @@ +# DELIVERY — gold-banking-monorepo + +Branch: **`release/delivery`** · Prepared 2026-09-23 + +Contains everything from `parity/security-hotfix` and `parity/phase-1-admin`. +Both merged with **no conflicts** (`phase-1-admin` already contained +`security-hotfix`, so the merge was a fast-forward). `main` was not touched. + +--- + +## 0. Quick start — run these in order + +Copy-paste, top to bottom. Nothing here needs a decision. + +### Step 1 — fill in the environment + +Create `.env` in the repo root. These **must** have a value: + +```dotenv +# Database +POSTGRES_USER=postgres +POSTGRES_PASSWORD= +POSTGRES_DB=goldbank +DATABASE_URL=postgresql://postgres:@db:5432/goldbank?schema=public + +# Auth — two DIFFERENT random values. Generate each with: +# node -e "console.log(require('crypto').randomBytes(48).toString('base64url'))" +JWT_SECRET= +JWT_CUSTOMER_SECRET= +# Every origin the panel and the two apps are opened from, comma-separated. +CORS_ORIGINS=https://adm.example.ir,https://app.example.ir,https://app2.example.ir +``` + +The API **refuses to start** in production until all three are right, and +prints every problem at once (REL-01, REL-03, SEC-04 — +docs/SERVER-SETUP-CHECKLIST.md). A random value: +`node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"`. + +Inside Docker the database host is `db`, not `localhost`. + +Everything else is optional and may be left blank. Two you may want now: + +```dotenv +# Delivery only — a fixed OTP that signs in ANY active customer. +# Exactly 4 digits, or it cannot be typed into the apps. REMOVE before the +# real release (see "Before the real release" below). The production image +# refuses to start with it unless the server is marked as a test server: +OTP_MASTER_CODE=1379 +TEST_SERVER_ALLOW_MASTER_CODE=yes + +# SMS goes through the "relay" gateway with nothing to set (D26). +# SMS_PROVIDER=none turns sending off; the server still starts either way. +SMS_PROVIDER= +``` + +### Step 2 — build + +```bash +pnpm install +pnpm build:release +``` + +**Do not skip `pnpm build:release`, and never run `docker compose build` +without it first.** The API image copies a bundle built here on the machine; it +does not build inside the image. Skipping this step produces an image from +**old code** and still reports success. This is real — it happened during this +delivery's own test run, with a bundle four days stale. (DEPLOY-03) + +### Step 3 — start + +```bash +docker compose up -d --build +``` + +Database migrations and seeding run **automatically inside the API container** +at boot. There is no manual migration step. Never run `prisma migrate reset`. + +### Step 4 — check it came up + +```bash +docker compose ps # db healthy, api up +docker compose logs api | tail -40 +``` + +In the log you should see `Nest application successfully started`, and +`Applied migrations: …` (first run) or `No pending migrations` (later runs). + +An `OTP_MASTER_CODE IS ACTIVE` banner is **expected** while that variable is +set — it is a reminder, not an error, and it disappears once you remove the +variable before the real release. + +A `JWT_CUSTOMER_SECRET IS NOT SET` banner means **Step 1 was not done**. That +one is a real security problem, not a warning to ignore — go back and set it. + +### Step 5 — prove the whole flow works + +```bash +# Publishes the API on host port 3100 so the test can reach it. +docker compose -f docker-compose.yml -f docker-compose.delivery-test.yml up -d api +node apps/api/scripts/test-compose-e2e.cjs http://localhost:3100/api +``` + +Expect **32 passed, 0 failed**. It signs a sales expert and an ordinary +customer into the app, has both place an order, confirms both orders appear in +the admin panel, and re-checks the token boundaries — all against the real +container. + +`docker-compose.delivery-test.yml` exists **only** for that check. The normal +deployment uses `docker-compose.yml` alone, where the API has no host port and +Dokploy/Traefik routes to it by domain. + +--- + +## ⚠ Before the real release + +Tonight's build is a **delivery build**. These are the things that must change +before it is a production release. The first three are blocking. + +### A. Configuration — blocking + +| # | Do this | Why it matters | +|---|---|---| +| **1** | **Set `JWT_CUSTOMER_SECRET` to its own random value**, different from `JWT_SECRET`. | Not a cosmetic default. Unset, the API signs customer and sales-expert **app** tokens with `JWT_SECRET` — *the same key admin tokens use* — and the two token realms stop being cryptographically separate. The only remaining barrier is the `typ` check in `jwt.strategy.ts`, and a sales expert's app token carries their **AdminUser id** in `sub`. Two independent defences collapse into one. A loud boot banner fires while it is missing. **REL-03 (Critical).** | +| **2** | **Remove `OTP_MASTER_CODE` and `TEST_SERVER_ALLOW_MASTER_CODE` from the environment.** The API now refuses to start with the code set unless that flag says this is a test server. | While set, **any active customer signs in with that one fixed code**. Unset or empty disables it completely; the API prints a banner at boot for as long as it is armed. **REL-01 (Critical).** | +| **3** | **Set real `JWT_SECRET` and `CORS_ORIGINS`.** The API refuses to start without them. | Without the key anyone could forge an admin token; without the origin list any website could call the API from a visitor's browser. | +| **4** | **Confirm SMS is going out.** The default `relay` gateway needs no credentials (D26); check `docker compose logs api` for `SMS provider: relay` and send yourself a login code. | If the gateway refuses the `host` value (inside Docker it is the container's IP), set `SMS_RELAY_HOST`. A failed send is only a log line — the server still boots (D20). **REL-02.** | + +| **5** | **Accounting integration (D27), only if it will be switched on:** set `ACCOUNTING_SECRET_KEY`; count products with no image (they disappear from the app — query in ISSUES ACC-05) and photograph them first; for Zarrin, run the trial on temporary documents first (ACC-01). | The integration itself is off until an admin turns it on in «اتصال حسابداری»; nothing changes before that except the no-image rule, which applies to every product. | + +After changing any of these: `docker compose up -d --build` and confirm the +`OTP_MASTER_CODE` banner is **gone** from `docker compose logs api`. + +### B. Credentials to rotate — the reference leaked them + +These are committed in plaintext in `henza_server` and must be assumed +compromised by anyone who has ever had repo access. None were copied into this +repository, but they are **the same live accounts**. + +- **SMS panel** username + password + sender line (`app/Models/Sms.php:73-77`) — **SEC-12 (Critical)** +- PayPing bearer token, Tahesab bearer token + IP allowlist, wallet hash pepper — **SEC-06** + +### C. Parity work not finished + +Phase 1 stopped after the Persons section when delivery mode began (D19). The +**Phase 1 gate still stands** as the next milestone. + +**Admin — not yet audited field-by-field.** Each has had only the breakage scan +(`scan-admin-b2b.cjs`, 34 endpoints, 0 broken), not a parity audit: + +- **Financial documents** (اسناد) — the money path; highest priority of the three +- **Users & permissions** (کاربران و دسترسی‌ها) — includes **PERM-01**, still + open: the database holds **178** distinct permission ids against the UI's + **174**. Unresolved because fixing it means **deleting rows**, which needs + your approval. +- **Reports** (گزارش‌ها) +- Also untouched: products/categories/variants, SMS templates, promotions, + cities, branches, workshops. + +**Apps — known gaps.** + +| ID | What | +|---|---| +| **MON-08** | `wagePercent`, `discountPercent` and `flatRialCharge` are taken from the **client** on order creation, so a caller can set their own making charge. `rashWeightGrams` is correctly read from the variant. The reference is *worse* (it trusts client `rash_weight` too), so this is already a partial improvement — but it is still a money path trusting client input. **Fix this first in Phase 2.** | +| **STUB-05** | Admin SMS recipients are hardcoded mobile numbers scattered across six places in the reference. Port as `SMS_ADMIN_RECIPIENTS` (comma-separated), the way `PROFILE_ADMIN_MOBILES` already works — not by copying the literals. Staff changes should not need a deploy. | +| **STUB-04** | Live gold price is **pull-on-mount only** — no socket, no polling. `quotedAt` renders as a Jalali **date**, so a stale rate looks current. | +| **STUB-03** | All list filtering and paging is **client-side** over one flat `GET /catalog/products`; no server `page`/`limit`. | +| **Analytics** | The reference PWA calls `useCustomAnalytics` on every route change (`henza_pwa/src/router/index.ts:249`); neither target app has any analytics. Deliberate — it needs a provider decision from you, not a port. | + +**`docs/parity/ISSUES.md`** holds the full list with evidence and file +references — currently **40+ entries**, including everything above plus the +reference bugs deliberately not ported (SEC-14, SEC-16, APP-03, and the two +D21 items). Phase 3 is the pass over that file. + +--- + +## 1. Environment variables + +Names only — no values here, and none are committed. The full annotated list is +in `.env.example`; `docker-compose.yml` passes each one through to the API +container. + +### Required + +| Variable | Purpose | +|---|---| +| `DATABASE_URL` | PostgreSQL connection string. Inside Docker the host is `db`. | +| `POSTGRES_USER`, `POSTGRES_PASSWORD`, `POSTGRES_DB` | Credentials for the bundled `db` service. | +| `JWT_SECRET` | Signs **admin** tokens. Without it the API falls back to a well-known development string — set it. | +| `JWT_CUSTOMER_SECRET` | Signs **customer and sales-expert app** tokens. Must be its own value — see the warning at the top of this file. Unset, it falls back to `JWT_SECRET` and the two token realms merge. | + +### Optional + +| Variable | Default | Purpose | +|---|---|---| +| `PORT` / `API_PORT` | `3000` | API listen port. | +| `JWT_EXPIRES_IN` | `12h` | Admin token lifetime. | +| `JWT_CUSTOMER_EXPIRES_IN` | `30d` | Customer token lifetime. | +| `UPLOAD_DIR` | `/storage/uploads` | Where uploaded files are written. | +| `ADMIN_PANEL_PORT`, `USER_APP_PORT`, `USER_APP_V2_PORT` | 5180–5182 | Dev servers only. | +| `RUN_MIGRATIONS` | `true` | Set `false` to skip the boot-time migration run. | +| `RUN_SEED` | `true` | Set `false` to skip seeding. | +| `ACCOUNTING_SECRET_KEY` | *(derived from `JWT_SECRET`)* | Encrypts the accounting-software token the admin enters (D27). Set its own long random value; changing it later means re-entering the token. | +| `ACCOUNTING_WORKER` | `on` | `off` keeps this instance out of the accounting background sync. | +| `PROFILE_ADMIN_MOBILES` | *(blank)* | Comma-separated admin mobiles told when a customer completes their profile. The reference hardcoded four numbers; blank means nobody is notified and the upload still succeeds. | + +### SMS — all optional + +`SMS_PROVIDER`: `relay` (default), `trez`, or `none` (D26). + +- **relay**: `SMS_RELAY_URL`, `SMS_RELAY_SECRET` (both have built-in + defaults), `SMS_RELAY_HOST` (blank = the machine's first external IPv4), + `SMS_RELAY_PLATFORM` (`kave` default, or `default` to let the gateway pick). +- **trez**: `SMS_TREZ_URL`, `SMS_TREZ_USERNAME`, `SMS_TREZ_PASSWORD`, + `SMS_TREZ_SENDER_LINE`. + +The server **always starts**; a misconfigured provider is a warning, and a +failed or skipped SMS never blocks an operation, including customer creation. + +### ⚠ `OTP_MASTER_CODE` — delivery only + +A fixed OTP accepted for **any active customer**, alongside the real code. + +- Read only from the environment; never hardcoded. +- Unset or empty → completely disabled. +- **Must be exactly 4 digits.** Both apps' login box is four single-character + inputs and only submits at four, so a longer code works over the API but + cannot be typed into either app. +- Every login through it is logged with the customer's mobile. +- The real OTP keeps working unchanged while it is armed. + +--- + +## 2. Running it + +### Development + +```bash +pnpm install +pnpm dev # all apps via turbo +``` + +Ports come from the repo-root `.env` (single source of truth): +API 3000, admin-panel 5180, user-app 5181, user-app-v2 5182. + +### Build + +```bash +pnpm build # all workspaces +pnpm build:release # the production/Docker build +``` + +### Deploy (Docker) + +```bash +pnpm build:release # ⚠ REQUIRED FIRST — see below +docker compose up -d --build +``` + +> **⚠ `pnpm build:release` must be run before `docker compose build`.** +> The API image is `COPY release/ ./` — it ships a bundle built on the +> developer machine, not one built inside the image. So `docker compose build` +> will happily produce an image from a **stale** `release/app.js` and report +> success. During this delivery's compose run that bundle was four days old and +> the container was missing every route added since. Tracked as **DEPLOY-03**. + +Services: `db` (Postgres 15), `api` (port 3000), `admin-panel`, `user-app`, +`user-app-v2` (each nginx on port 80). The apps expose no host ports — +Dokploy/Traefik routes to them by domain. Uploads persist in the `api_uploads` +volume; without it every previously uploaded image 404s after a redeploy. + +--- + +## 3. How migrations run + +**Automatically, inside the API container, at boot.** No manual step. + +`src/prisma/bootstrap.ts` calls `runMigrations()` before Nest starts. That +runner (`src/prisma/migrate.ts`) applies the `.sql` files from +`prisma/migrations` and records each one in its own tracking table, +**`_goldbank_migrations`**, so every file runs exactly once. + +It exists because **the deploy image is copy-only and ships no Prisma CLI**, so +`prisma migrate deploy` is not available there. This is why the database has two +migration ledgers — `_prisma_migrations` (written by the Prisma CLI in +development) and `_goldbank_migrations` (written by the runtime runner). Both +are intentional. `_goldbank_migrations` is declared in `schema.prisma` with +`@@ignore` so drift checks do not propose dropping it. + +**Never** run `prisma migrate reset`, and never edit either table by hand. +In development, migrations are created with `prisma migrate dev`; in production +the container runner applies them. + +Seeding runs once after migrations, gated on a marker row, and is skipped when +no seed script is present. + +--- + +## 4. What was verified on this branch + +All green on `release/delivery`: + +| Suite | Result | +|---|---| +| `pnpm build` (5 workspaces) | ✅ all pass | +| jest (api unit) | **54/54** | +| `smoke-admin.cjs` — admin flows | **43/43** | +| `smoke-apps.cjs` — customer flows, both apps | **43/43** | +| `scan-admin-b2b.cjs` — every B2B read endpoint | **34 ok, 0 broken** | +| `smoke-admin-b2b-writes.cjs` — order + document writes | **25/25** | +| `auth-smoke.sh` — permissions/401/403 | **32/32** | +| `test-sales-expert-roundtrip.cjs` | **33/33** | +| `test-sales-expert-app-login.cjs` — expert app login (D21) | **36/36** | +| `test-complete-profile.cjs` — «تکمیل پروفایل» | **38/38** | +| `test-report.cjs` — «گزارش» | **40/40** | +| `test-compose-e2e.cjs` — **the whole flow inside Docker Compose** | **32/32** | +| `test-name-trigger.cjs` | **9/9** | +| typecheck (api, admin-panel, user-app, user-app-v2) | ✅ clean | + +### Verified inside Docker Compose, not just locally + +The whole delivery flow was run against the **built container**, which is what +actually ships: `test-compose-e2e.cjs` signs a **sales expert** and an +**ordinary customer** into the app with the master code, has **both place an +order**, and confirms **both orders appear in the admin panel** and open there. +It also re-checks the three token boundaries in the deployed image. **32/32.** +The three page suites were re-run against the container too — complete-profile +38/38, report 40/40, expert login 36/36. + +That run found two deployment problems that no local test could have caught: + +- **DEPLOY-02 (fixed):** admin login returned **500 for every user in Docker**. + Compose passes optional variables as `${X:-}`, so an unconfigured one arrives + as `""`, not `undefined`; the code used `?? 'default'`, which only falls back + on `undefined`, so the empty string reached `jsonwebtoken` and it threw on + every sign. Fixed with `src/common/env.ts`, applied to every auth, port, + upload and SMS read, and pinned by a test that reproduces the original throw. +- **DEPLOY-03 (process):** the API image ships a **pre-built** bundle, so + `docker compose build` can silently produce an image from stale code. See the + warning in the deploy section above. + +Flows walked end to end: admin login, customer creation, sales-expert +create/edit, product and variant create/edit, order list/detail/status change, +wholesale order placement from the admin panel, cash document creation + +confirm + un-confirm; and in **both** customer apps: OTP login with the master +code, product browsing, cart, order placement, order history. + +Money paths were checked against the reference's own formulas, not just for a +200: making charge `rash × (1 + (wage − discount)/100)` reproduced exactly, and +the cash-document conversion `price / (price_per_gram / 4.331802)` moved the +customer's gold debt by the expected amount and restored it exactly on +un-confirm. + +Every test script deletes only the rows it created; the write test also asserts +the customer's balances end exactly as they started. + +--- + +## 5. Known issues — not done tonight + +Nothing here blocks the delivery. Full detail in `docs/parity/ISSUES.md`. + +### Missing app pages + +**None.** Every page the reference PWA has now exists in both apps. + + +### Delivered tonight + +| Feature | State | +|---|---| +| **Sales-expert app login (D21)** | ✅ Done. An expert signs into both apps with their AdminUser account and the ordinary OTP flow; the master code works for them too. They get the whole app — browsing, cart, ordering, order history — plus their own two screens. | +| **«سفارش مشتریان» (ChildOrder)** | ✅ Done in both apps. Their referred customers' orders at «تحویل مسئول فروش», searchable, infinite-scrolled. | +| **«مشتریان من» (customerChoice)** | ✅ Done in both apps. Their referred customers, searchable, with a read-only detail sheet. | +| **APP-02 — admin home slider in v2** | ✅ Fixed. v2 now prefers admin-configured slides and keeps its category-derived hero as the fallback. | +| **«تکمیل پروفایل» (complete_profile)** | ✅ Done in both apps. Three document uploads (جواز کسب، سردر مغازه، کارت ملی), then the profile is marked verified. Reached from the profile screen, and only while the documents are missing — exactly the reference's condition. | +| **«گزارش» (report + report/detail)** | ✅ Done in both apps. Two tabs («کلیات حساب» / «جزئیات حساب»), a running gold and rial balance per document, and a per-document detail sheet. Built on the **internal ledger** (owner's option الف) — no connection to the external accounting system the reference proxied. See D24. | + +An expert's own order lands on their **own trading account**, with the making +charge from `AdminUser.wagePercent` and the credit limit from +`SalesExpertProfile.gramLevel` — the same two numbers the reference read off +the agent's own customer row. See D21. + +**Two reference behaviours were deliberately not ported**, both money/session +risks and both recorded in D21: +1. `myChild` minted an `api_token` per listed customer so the agent could act + **as** them — a session-hijack primitive. +2. The child-order edit drawer (`PUT /order/child/{id}`) recalculated an + order's weights and prices from client-sent values. The card opens a + read-only summary instead. + +### Behavioural gaps + +| ID | What | +|---|---| +| **APP-02** | `user-app-v2` has no `getHomeSlider`, so slides configured in the admin panel appear in **user-app only**; v2 always derives its hero from categories. Not fixed because v2's home is its own design and rewiring it during a delivery risks the page being demonstrated. | +| **PERS-02** | The reference's cities are a province → city **tree** (provinces not selectable); the target flattened this to a `province` string and a flat select on all three Persons forms. The city itself is still captured correctly. | +| **PERS-03** | The reference collects a Jalali **birth date** on the customer forms; the target has no column for it. | +| **PERS-01** | The reference makes a customer's **mobile immutable on edit**; the target allows editing it. Owner ruled this NOT ported — the target keeps its current behaviour. | +| **PERF-01** | `listReagents()` runs one aggregate per row (N+1) for the per-agent sales total. Harmless at the current agent count. | + +### Parity work not reached + +Phase 1 was not completed: the field-by-field audit stopped after the Persons +section, and products/categories/variants, financial documents, users and +permissions, SMS templates, promotions, cities, branches, workshops and reports +have had only the breakage scan above, not a full parity audit. The +**Phase 1 gate was lifted for tonight only** (D19) and still stands as the next +milestone. + +`PERM-01` (the database holds 178 distinct permission ids against the UI's 174) +is still awaiting a decision, because resolving it means deleting rows. + +--- + +## 6. Decisions that shaped this build + +Recorded in `docs/parity/DECISIONS.md`: + +- **D13** — the retail storefront (`single*`, wallet, comments, `customer.php`, + `site.php`) is **preserved but out of scope**. Nothing there was changed. +- **D19** — delivery mode: implement the main gaps, do not stop to ask, choose + the lowest-risk option, change nothing protected. +- **D20** — SMS can never block a boot or an operation; `OTP_MASTER_CODE` for + the delivery. +- **D26** — SMS goes through the owner's `relay` gateway by default; Trez is + kept as a selectable driver. +- **D11 is cancelled** — superseded by D13. diff --git a/apps/admin-panel/Dockerfile b/apps/admin-panel/Dockerfile index 7813ae7..2071cbc 100644 --- a/apps/admin-panel/Dockerfile +++ b/apps/admin-panel/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.arvancloud.ir/nginx:latest +FROM nginx:latest COPY nginx.conf /etc/nginx/conf.d/default.conf COPY dist /usr/share/nginx/html diff --git a/apps/admin-panel/dist/assets/AccountingSyncButton.vue_vue_type_script_setup_true_lang-DYPt-3CU.js b/apps/admin-panel/dist/assets/AccountingSyncButton.vue_vue_type_script_setup_true_lang-DYPt-3CU.js new file mode 100644 index 0000000..e3a264b --- /dev/null +++ b/apps/admin-panel/dist/assets/AccountingSyncButton.vue_vue_type_script_setup_true_lang-DYPt-3CU.js @@ -0,0 +1 @@ +import{c as O,I as x,d as j,v as B,x as m,o as C,a as A,w as v,f as $,t as E,h as P,i as L,l as u,Z as y,M as b,z as M,r as N}from"./index-CVG99b4v.js";var z={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"};function g(o){for(var t=1;te&&typeof e=="object"?Object.entries(e).map(([s,a])=>`${_[s]??s}: ${a}`).join("، "):"";B(async()=>{try{const{data:e}=await m.get("admin/accounting-status");c.value=!!(e!=null&&e.connected),p.value=(e==null?void 0:e.provider)??null}catch{c.value=!1}});async function w(){var e,s;i.value=!0;try{const{data:a}=await m.post(n.endpoint),k=Object.entries(a.results).map(([f,l])=>y("p",{style:l.ok?"":"color:#d4380d"},`${h[f]??f}: ${l.ok?S(l.summary)||"انجام شد":`خطا — ${l.error}`}`));(a.ok?b.success:b.warning)({title:a.ok?"سینک با حسابداری انجام شد":"سینک با حسابداری کامل انجام نشد",content:y("div",k),okText:"باشه"}),r("done")}catch(a){M.error(((s=(e=a==null?void 0:a.response)==null?void 0:e.data)==null?void 0:s.message)||"سینک با حسابداری انجام نشد")}finally{i.value=!1}}return(e,s)=>{const a=N("a-button");return c.value?(C(),A(a,{key:0,loading:i.value,onClick:w},{icon:v(()=>[O(P(d))]),default:v(()=>[$(" سینک با "+E(p.value||"حسابداری"),1)]),_:1},8,["loading"])):L("",!0)}}});export{I as _}; diff --git a/apps/admin-panel/dist/assets/Add-D30i4gnX.js b/apps/admin-panel/dist/assets/Add-D30i4gnX.js deleted file mode 100644 index 9870a14..0000000 --- a/apps/admin-panel/dist/assets/Add-D30i4gnX.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o}from"./Add.vue_vue_type_script_setup_true_lang-BP3ofJiO.js";import"./index-WFQJAeoE.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-BQ_i_QZe.js";export{o as default}; diff --git a/apps/admin-panel/dist/assets/Add-DseHzapY.js b/apps/admin-panel/dist/assets/Add-DseHzapY.js new file mode 100644 index 0000000..0003bf6 --- /dev/null +++ b/apps/admin-panel/dist/assets/Add-DseHzapY.js @@ -0,0 +1 @@ +import{_ as o}from"./Add.vue_vue_type_script_setup_true_lang-Ct9fNasS.js";import"./index-CVG99b4v.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-CWur6xTz.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-C8WW9alD.js";export{o as default}; diff --git a/apps/admin-panel/dist/assets/Add.vue_vue_type_script_setup_true_lang-BP3ofJiO.js b/apps/admin-panel/dist/assets/Add.vue_vue_type_script_setup_true_lang-Ct9fNasS.js similarity index 97% rename from apps/admin-panel/dist/assets/Add.vue_vue_type_script_setup_true_lang-BP3ofJiO.js rename to apps/admin-panel/dist/assets/Add.vue_vue_type_script_setup_true_lang-Ct9fNasS.js index ed5ea7d..bf53070 100644 --- a/apps/admin-panel/dist/assets/Add.vue_vue_type_script_setup_true_lang-BP3ofJiO.js +++ b/apps/admin-panel/dist/assets/Add.vue_vue_type_script_setup_true_lang-Ct9fNasS.js @@ -1 +1 @@ -import{d as P,m as Q,v as W,x as b,a as g,w as o,h as X,j as Y,l as j,y as z,p as M,r,o as v,c as l,f as m,n as N,b as h,e as A,F as E,A as Z,z as F,k as ee,t as D}from"./index-WFQJAeoE.js";import{_ as te}from"./BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js";import{_ as c}from"./ImageUploadInput.vue_vue_type_script_setup_true_lang-BQ_i_QZe.js";const ae={class:"grid-2"},le={class:"grid-2"},ue=P({__name:"Add",props:{open:{type:Boolean},id:{}},emits:["update:open","success"],setup(V,{emit:L}){const k=V,x=L,$=k.open!==void 0,T=Y(),q=ee(),p=$?k.id:T.params.id,f=j(!1),B=j([]),t=z({type:1,title:"",parent_id_id:void 0,image:"",icon:"",meta:"",body_html:""}),d=z({}),i=M(()=>t.type===1?"(سایت)":t.type===2?"(موبایل)":""),w=M(()=>B.value.filter(n=>n.type===t.type&&n.id!==p));Q(()=>t.type,()=>{t.parent_id_id&&!w.value.some(n=>n.id===t.parent_id_id)&&(t.parent_id_id=void 0)});function R(n,e){var s,_;return String(((_=(s=e==null?void 0:e.children)==null?void 0:s[0])==null?void 0:_.children)??"").includes(n)}function G(){return Object.keys(d).forEach(n=>delete d[n]),t.type||(d.type="لطفا نوع نمایش دسته بندی را انتخاب کنید"),t.title||(d.title="لطفا مقدار را وارد کنید"),Object.keys(d).length===0}async function U(){var n,e;if(G())try{f.value=!0,p?await b.put(`category/${p}`,{...t,id:p}):await b.post("category/",t),F.info("اطلاعات با موفقیت به ثبت رسید."),$?(x("success"),x("update:open",!1)):q.push("/category/list")}catch(s){F.error(((e=(n=s==null?void 0:s.response)==null?void 0:n.data)==null?void 0:e.message)??"خطا در ثبت اطلاعات.")}finally{f.value=!1}}return W(async()=>{try{const{data:n}=await b.get("admin/categories/tree");B.value=n}catch(n){console.log(n)}if(p)try{const{data:n}=await b.get(`admin/categories/${p}`);Object.assign(t,{type:n.type??1,title:n.title??"",parent_id_id:n.parent_id_id??void 0,image:n.image??"",icon:n.icon??"",meta:n.meta??"",body_html:n.body_html??""})}catch(n){console.log(n)}}),(n,e)=>{const s=r("a-radio"),_=r("a-radio-group"),u=r("a-form-item"),y=r("a-input"),S=r("a-select-option"),C=r("a-select"),O=r("a-textarea"),H=r("a-button"),I=r("a-card"),J=r("a-form"),K=r("a-spin");return $?(v(),g(te,{key:0,open:!!V.open,id:X(p),"add-title":`دسته بندی ${i.value}`,"edit-title":`دسته بندی ${i.value}`,loading:f.value,submitting:f.value,width:"lg","onUpdate:open":e[7]||(e[7]=a=>n.$emit("update:open",a)),onSubmit:U},{default:o(()=>[l(u,{label:"نوع نمایش","validate-status":d.type?"error":"",help:d.type},{default:o(()=>[l(_,{value:t.type,"onUpdate:value":e[0]||(e[0]=a=>t.type=a)},{default:o(()=>[l(s,{value:1},{default:o(()=>[...e[15]||(e[15]=[m("سایت",-1)])]),_:1}),l(s,{value:2},{default:o(()=>[...e[16]||(e[16]=[m("اپلیکشن موبایل",-1)])]),_:1})]),_:1},8,["value"])]),_:1},8,["validate-status","help"]),N("div",ae,[l(u,{label:`عنوان ${i.value}`,"validate-status":d.title?"error":"",help:d.title},{default:o(()=>[l(y,{value:t.title,"onUpdate:value":e[1]||(e[1]=a=>t.title=a)},null,8,["value"])]),_:1},8,["label","validate-status","help"]),l(u,{label:`پدر دسته ${i.value}`},{default:o(()=>[l(C,{value:t.parent_id_id,"onUpdate:value":e[2]||(e[2]=a=>t.parent_id_id=a),"allow-clear":"","show-search":"",placeholder:"انتخاب کنید","filter-option":R},{default:o(()=>[(v(!0),h(E,null,A(w.value,a=>(v(),g(S,{key:a.id,value:a.id},{default:o(()=>[m(D(a.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1},8,["label"]),l(u,{label:`تصویر شاخص ${i.value}`},{default:o(()=>[l(c,{modelValue:t.image,"onUpdate:modelValue":e[3]||(e[3]=a=>t.image=a),purpose:"category.image",placeholder:"تصویر"},null,8,["modelValue"])]),_:1},8,["label"]),l(u,{label:`آیکون ${i.value}`},{default:o(()=>[l(c,{modelValue:t.icon,"onUpdate:modelValue":e[4]||(e[4]=a=>t.icon=a),purpose:"category.icon",placeholder:"آیکون"},null,8,["modelValue"])]),_:1},8,["label"]),l(u,{label:`متا تگ ${i.value}`},{default:o(()=>[l(y,{value:t.meta,"onUpdate:value":e[5]||(e[5]=a=>t.meta=a)},null,8,["value"])]),_:1},8,["label"])]),l(u,{label:`شرح دسته ${i.value}`},{default:o(()=>[l(O,{value:t.body_html,"onUpdate:value":e[6]||(e[6]=a=>t.body_html=a),"auto-size":{minRows:3,maxRows:8}},null,8,["value"])]),_:1},8,["label"])]),_:1},8,["open","id","add-title","edit-title","loading","submitting"])):(v(),g(K,{key:1,spinning:f.value},{default:o(()=>[l(J,{layout:"vertical",onSubmit:Z(U,["prevent"])},{default:o(()=>[l(I,{title:`دسته بندی ${i.value}`,class:"mb-base"},{default:o(()=>[l(u,{label:"نوع نمایش","validate-status":d.type?"error":"",help:d.type},{default:o(()=>[l(_,{value:t.type,"onUpdate:value":e[8]||(e[8]=a=>t.type=a)},{default:o(()=>[l(s,{value:1},{default:o(()=>[...e[17]||(e[17]=[m("سایت",-1)])]),_:1}),l(s,{value:2},{default:o(()=>[...e[18]||(e[18]=[m("اپلیکشن موبایل",-1)])]),_:1})]),_:1},8,["value"])]),_:1},8,["validate-status","help"]),N("div",le,[l(u,{label:`عنوان ${i.value}`,"validate-status":d.title?"error":"",help:d.title},{default:o(()=>[l(y,{value:t.title,"onUpdate:value":e[9]||(e[9]=a=>t.title=a)},null,8,["value"])]),_:1},8,["label","validate-status","help"]),l(u,{label:`پدر دسته ${i.value}`},{default:o(()=>[l(C,{value:t.parent_id_id,"onUpdate:value":e[10]||(e[10]=a=>t.parent_id_id=a),"allow-clear":"","show-search":"",placeholder:"انتخاب کنید","filter-option":R},{default:o(()=>[(v(!0),h(E,null,A(w.value,a=>(v(),g(S,{key:a.id,value:a.id},{default:o(()=>[m(D(a.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1},8,["label"]),l(u,{label:`تصویر شاخص ${i.value}`},{default:o(()=>[l(c,{modelValue:t.image,"onUpdate:modelValue":e[11]||(e[11]=a=>t.image=a),purpose:"category.image",placeholder:"تصویر"},null,8,["modelValue"])]),_:1},8,["label"]),l(u,{label:`آیکون ${i.value}`},{default:o(()=>[l(c,{modelValue:t.icon,"onUpdate:modelValue":e[12]||(e[12]=a=>t.icon=a),purpose:"category.icon",placeholder:"آیکون"},null,8,["modelValue"])]),_:1},8,["label"]),l(u,{label:`متا تگ ${i.value}`},{default:o(()=>[l(y,{value:t.meta,"onUpdate:value":e[13]||(e[13]=a=>t.meta=a)},null,8,["value"])]),_:1},8,["label"])]),l(u,{label:`شرح دسته ${i.value}`},{default:o(()=>[l(O,{value:t.body_html,"onUpdate:value":e[14]||(e[14]=a=>t.body_html=a),"auto-size":{minRows:3,maxRows:8}},null,8,["value"])]),_:1},8,["label"]),l(H,{type:"primary",onClick:U},{default:o(()=>[...e[19]||(e[19]=[m("ثبت اطلاعات",-1)])]),_:1})]),_:1},8,["title"])]),_:1})]),_:1},8,["spinning"]))}}});export{ue as _}; +import{d as P,m as Q,v as W,x as b,a as g,w as o,h as X,j as Y,l as j,y as z,p as M,r,o as v,c as l,f as m,n as N,b as h,e as A,F as E,A as Z,z as F,k as ee,t as D}from"./index-CVG99b4v.js";import{_ as te}from"./BaseFormModal.vue_vue_type_script_setup_true_lang-CWur6xTz.js";import{_ as c}from"./ImageUploadInput.vue_vue_type_script_setup_true_lang-C8WW9alD.js";const ae={class:"grid-2"},le={class:"grid-2"},ue=P({__name:"Add",props:{open:{type:Boolean},id:{}},emits:["update:open","success"],setup(V,{emit:L}){const k=V,x=L,$=k.open!==void 0,T=Y(),q=ee(),p=$?k.id:T.params.id,f=j(!1),B=j([]),t=z({type:1,title:"",parent_id_id:void 0,image:"",icon:"",meta:"",body_html:""}),d=z({}),i=M(()=>t.type===1?"(سایت)":t.type===2?"(موبایل)":""),w=M(()=>B.value.filter(n=>n.type===t.type&&n.id!==p));Q(()=>t.type,()=>{t.parent_id_id&&!w.value.some(n=>n.id===t.parent_id_id)&&(t.parent_id_id=void 0)});function R(n,e){var s,_;return String(((_=(s=e==null?void 0:e.children)==null?void 0:s[0])==null?void 0:_.children)??"").includes(n)}function G(){return Object.keys(d).forEach(n=>delete d[n]),t.type||(d.type="لطفا نوع نمایش دسته بندی را انتخاب کنید"),t.title||(d.title="لطفا مقدار را وارد کنید"),Object.keys(d).length===0}async function U(){var n,e;if(G())try{f.value=!0,p?await b.put(`category/${p}`,{...t,id:p}):await b.post("category/",t),F.info("اطلاعات با موفقیت به ثبت رسید."),$?(x("success"),x("update:open",!1)):q.push("/category/list")}catch(s){F.error(((e=(n=s==null?void 0:s.response)==null?void 0:n.data)==null?void 0:e.message)??"خطا در ثبت اطلاعات.")}finally{f.value=!1}}return W(async()=>{try{const{data:n}=await b.get("admin/categories/tree");B.value=n}catch(n){console.log(n)}if(p)try{const{data:n}=await b.get(`admin/categories/${p}`);Object.assign(t,{type:n.type??1,title:n.title??"",parent_id_id:n.parent_id_id??void 0,image:n.image??"",icon:n.icon??"",meta:n.meta??"",body_html:n.body_html??""})}catch(n){console.log(n)}}),(n,e)=>{const s=r("a-radio"),_=r("a-radio-group"),u=r("a-form-item"),y=r("a-input"),S=r("a-select-option"),C=r("a-select"),O=r("a-textarea"),H=r("a-button"),I=r("a-card"),J=r("a-form"),K=r("a-spin");return $?(v(),g(te,{key:0,open:!!V.open,id:X(p),"add-title":`دسته بندی ${i.value}`,"edit-title":`دسته بندی ${i.value}`,loading:f.value,submitting:f.value,width:"lg","onUpdate:open":e[7]||(e[7]=a=>n.$emit("update:open",a)),onSubmit:U},{default:o(()=>[l(u,{label:"نوع نمایش","validate-status":d.type?"error":"",help:d.type},{default:o(()=>[l(_,{value:t.type,"onUpdate:value":e[0]||(e[0]=a=>t.type=a)},{default:o(()=>[l(s,{value:1},{default:o(()=>[...e[15]||(e[15]=[m("سایت",-1)])]),_:1}),l(s,{value:2},{default:o(()=>[...e[16]||(e[16]=[m("اپلیکشن موبایل",-1)])]),_:1})]),_:1},8,["value"])]),_:1},8,["validate-status","help"]),N("div",ae,[l(u,{label:`عنوان ${i.value}`,"validate-status":d.title?"error":"",help:d.title},{default:o(()=>[l(y,{value:t.title,"onUpdate:value":e[1]||(e[1]=a=>t.title=a)},null,8,["value"])]),_:1},8,["label","validate-status","help"]),l(u,{label:`پدر دسته ${i.value}`},{default:o(()=>[l(C,{value:t.parent_id_id,"onUpdate:value":e[2]||(e[2]=a=>t.parent_id_id=a),"allow-clear":"","show-search":"",placeholder:"انتخاب کنید","filter-option":R},{default:o(()=>[(v(!0),h(E,null,A(w.value,a=>(v(),g(S,{key:a.id,value:a.id},{default:o(()=>[m(D(a.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1},8,["label"]),l(u,{label:`تصویر شاخص ${i.value}`},{default:o(()=>[l(c,{modelValue:t.image,"onUpdate:modelValue":e[3]||(e[3]=a=>t.image=a),purpose:"category.image",placeholder:"تصویر"},null,8,["modelValue"])]),_:1},8,["label"]),l(u,{label:`آیکون ${i.value}`},{default:o(()=>[l(c,{modelValue:t.icon,"onUpdate:modelValue":e[4]||(e[4]=a=>t.icon=a),purpose:"category.icon",placeholder:"آیکون"},null,8,["modelValue"])]),_:1},8,["label"]),l(u,{label:`متا تگ ${i.value}`},{default:o(()=>[l(y,{value:t.meta,"onUpdate:value":e[5]||(e[5]=a=>t.meta=a)},null,8,["value"])]),_:1},8,["label"])]),l(u,{label:`شرح دسته ${i.value}`},{default:o(()=>[l(O,{value:t.body_html,"onUpdate:value":e[6]||(e[6]=a=>t.body_html=a),"auto-size":{minRows:3,maxRows:8}},null,8,["value"])]),_:1},8,["label"])]),_:1},8,["open","id","add-title","edit-title","loading","submitting"])):(v(),g(K,{key:1,spinning:f.value},{default:o(()=>[l(J,{layout:"vertical",onSubmit:Z(U,["prevent"])},{default:o(()=>[l(I,{title:`دسته بندی ${i.value}`,class:"mb-base"},{default:o(()=>[l(u,{label:"نوع نمایش","validate-status":d.type?"error":"",help:d.type},{default:o(()=>[l(_,{value:t.type,"onUpdate:value":e[8]||(e[8]=a=>t.type=a)},{default:o(()=>[l(s,{value:1},{default:o(()=>[...e[17]||(e[17]=[m("سایت",-1)])]),_:1}),l(s,{value:2},{default:o(()=>[...e[18]||(e[18]=[m("اپلیکشن موبایل",-1)])]),_:1})]),_:1},8,["value"])]),_:1},8,["validate-status","help"]),N("div",le,[l(u,{label:`عنوان ${i.value}`,"validate-status":d.title?"error":"",help:d.title},{default:o(()=>[l(y,{value:t.title,"onUpdate:value":e[9]||(e[9]=a=>t.title=a)},null,8,["value"])]),_:1},8,["label","validate-status","help"]),l(u,{label:`پدر دسته ${i.value}`},{default:o(()=>[l(C,{value:t.parent_id_id,"onUpdate:value":e[10]||(e[10]=a=>t.parent_id_id=a),"allow-clear":"","show-search":"",placeholder:"انتخاب کنید","filter-option":R},{default:o(()=>[(v(!0),h(E,null,A(w.value,a=>(v(),g(S,{key:a.id,value:a.id},{default:o(()=>[m(D(a.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1},8,["label"]),l(u,{label:`تصویر شاخص ${i.value}`},{default:o(()=>[l(c,{modelValue:t.image,"onUpdate:modelValue":e[11]||(e[11]=a=>t.image=a),purpose:"category.image",placeholder:"تصویر"},null,8,["modelValue"])]),_:1},8,["label"]),l(u,{label:`آیکون ${i.value}`},{default:o(()=>[l(c,{modelValue:t.icon,"onUpdate:modelValue":e[12]||(e[12]=a=>t.icon=a),purpose:"category.icon",placeholder:"آیکون"},null,8,["modelValue"])]),_:1},8,["label"]),l(u,{label:`متا تگ ${i.value}`},{default:o(()=>[l(y,{value:t.meta,"onUpdate:value":e[13]||(e[13]=a=>t.meta=a)},null,8,["value"])]),_:1},8,["label"])]),l(u,{label:`شرح دسته ${i.value}`},{default:o(()=>[l(O,{value:t.body_html,"onUpdate:value":e[14]||(e[14]=a=>t.body_html=a),"auto-size":{minRows:3,maxRows:8}},null,8,["value"])]),_:1},8,["label"]),l(H,{type:"primary",onClick:U},{default:o(()=>[...e[19]||(e[19]=[m("ثبت اطلاعات",-1)])]),_:1})]),_:1},8,["title"])]),_:1})]),_:1},8,["spinning"]))}}});export{ue as _}; diff --git a/apps/admin-panel/dist/assets/AddBranches-CEPUlWWo.js b/apps/admin-panel/dist/assets/AddBranches-CEPUlWWo.js new file mode 100644 index 0000000..f86637f --- /dev/null +++ b/apps/admin-panel/dist/assets/AddBranches-CEPUlWWo.js @@ -0,0 +1 @@ +import{_ as o}from"./AddBranches.vue_vue_type_script_setup_true_lang-DZPeg6FI.js";import"./index-CVG99b4v.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-CWur6xTz.js";export{o as default}; diff --git a/apps/admin-panel/dist/assets/AddBranches-Jt_SMHZh.js b/apps/admin-panel/dist/assets/AddBranches-Jt_SMHZh.js deleted file mode 100644 index afb4d2f..0000000 --- a/apps/admin-panel/dist/assets/AddBranches-Jt_SMHZh.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o}from"./AddBranches.vue_vue_type_script_setup_true_lang-BTBcvf9O.js";import"./index-WFQJAeoE.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js";export{o as default}; diff --git a/apps/admin-panel/dist/assets/AddBranches.vue_vue_type_script_setup_true_lang-BTBcvf9O.js b/apps/admin-panel/dist/assets/AddBranches.vue_vue_type_script_setup_true_lang-DZPeg6FI.js similarity index 95% rename from apps/admin-panel/dist/assets/AddBranches.vue_vue_type_script_setup_true_lang-BTBcvf9O.js rename to apps/admin-panel/dist/assets/AddBranches.vue_vue_type_script_setup_true_lang-DZPeg6FI.js index 76bab4d..68b0222 100644 --- a/apps/admin-panel/dist/assets/AddBranches.vue_vue_type_script_setup_true_lang-BTBcvf9O.js +++ b/apps/admin-panel/dist/assets/AddBranches.vue_vue_type_script_setup_true_lang-DZPeg6FI.js @@ -1 +1 @@ -import{d as q,v as G,x as c,a as v,w as l,h as R,j as H,l as S,y as j,r as i,o as p,n as C,c as n,b as O,e as $,F as z,f as g,A as I,z as M,k as J,t as N}from"./index-WFQJAeoE.js";import{_ as K}from"./BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js";const P={class:"grid-2"},Q={class:"grid-2"},Y=q({__name:"AddBranches",props:{open:{type:Boolean},id:{}},emits:["update:open","success"],setup(h,{emit:V}){const y=h,w=V,f=y.open!==void 0,A=H(),E=J(),d=f?y.id:A.params.id,m=S(!1),_=S([]),t=j({name:"",phone:"",address:"",user_id:void 0}),r=j({});function k(s,e){var o,u;return String(((u=(o=e==null?void 0:e.children)==null?void 0:o[0])==null?void 0:u.children)??"").includes(s)}async function b(){var s,e;if(Object.keys(r).forEach(o=>delete r[o]),!t.name){r.name="لطفا مقدار را وارد کنید";return}try{m.value=!0,d?await c.put(`branch/${d}`,t):await c.post("branch",t),M.info("اطلاعات با موفقیت به ثبت رسید."),d||Object.assign(t,{name:"",phone:"",address:"",user_id:void 0}),f?(w("success"),w("update:open",!1)):E.push("/branch/list")}catch(o){M.error(((e=(s=o==null?void 0:o.response)==null?void 0:s.data)==null?void 0:e.message)??"خطا در ثبت اطلاعات.")}finally{m.value=!1}}return G(async()=>{try{const{data:s}=await c.get("user/list");_.value=s}catch(s){console.log(s)}if(d)try{const{data:s}=await c.get(`branch/${d}`);Object.assign(t,{name:s.name??"",phone:s.phone??"",address:s.address??"",user_id:s.user_id??void 0})}catch(s){console.log(s)}}),(s,e)=>{const o=i("a-input"),u=i("a-form-item"),U=i("a-select-option"),x=i("a-select"),B=i("a-textarea"),F=i("a-button"),D=i("a-card"),L=i("a-form"),T=i("a-spin");return f?(p(),v(K,{key:0,open:!!h.open,id:R(d),"add-title":"افزودن شعبه","edit-title":"ویرایش شعبه",loading:m.value,submitting:m.value,"onUpdate:open":e[4]||(e[4]=a=>s.$emit("update:open",a)),onSubmit:b},{default:l(()=>[C("div",P,[n(u,{label:"نام شعبه","validate-status":r.name?"error":"",help:r.name},{default:l(()=>[n(o,{value:t.name,"onUpdate:value":e[0]||(e[0]=a=>t.name=a)},null,8,["value"])]),_:1},8,["validate-status","help"]),n(u,{label:"تلفن شعبه"},{default:l(()=>[n(o,{value:t.phone,"onUpdate:value":e[1]||(e[1]=a=>t.phone=a)},null,8,["value"])]),_:1}),n(u,{label:"مدیر"},{default:l(()=>[n(x,{value:t.user_id,"onUpdate:value":e[2]||(e[2]=a=>t.user_id=a),"show-search":"","allow-clear":"",placeholder:"انتخاب کنید","filter-option":k},{default:l(()=>[(p(!0),O(z,null,$(_.value,a=>(p(),v(U,{key:a.id,value:a.id},{default:l(()=>[g(N(a.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})]),n(u,{label:"آدرس"},{default:l(()=>[n(B,{value:t.address,"onUpdate:value":e[3]||(e[3]=a=>t.address=a),"auto-size":{minRows:2,maxRows:5}},null,8,["value"])]),_:1})]),_:1},8,["open","id","loading","submitting"])):(p(),v(T,{key:1,spinning:m.value},{default:l(()=>[n(L,{layout:"vertical",onSubmit:I(b,["prevent"])},{default:l(()=>[n(D,{title:R(d)?"ویرایش شعبه":"افزودن شعبه",class:"mb-base"},{default:l(()=>[C("div",Q,[n(u,{label:"نام شعبه","validate-status":r.name?"error":"",help:r.name},{default:l(()=>[n(o,{value:t.name,"onUpdate:value":e[5]||(e[5]=a=>t.name=a)},null,8,["value"])]),_:1},8,["validate-status","help"]),n(u,{label:"تلفن شعبه"},{default:l(()=>[n(o,{value:t.phone,"onUpdate:value":e[6]||(e[6]=a=>t.phone=a)},null,8,["value"])]),_:1}),n(u,{label:"مدیر"},{default:l(()=>[n(x,{value:t.user_id,"onUpdate:value":e[7]||(e[7]=a=>t.user_id=a),"show-search":"","allow-clear":"",placeholder:"انتخاب کنید","filter-option":k},{default:l(()=>[(p(!0),O(z,null,$(_.value,a=>(p(),v(U,{key:a.id,value:a.id},{default:l(()=>[g(N(a.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})]),n(u,{label:"آدرس"},{default:l(()=>[n(B,{value:t.address,"onUpdate:value":e[8]||(e[8]=a=>t.address=a),"auto-size":{minRows:2,maxRows:5}},null,8,["value"])]),_:1}),n(F,{type:"primary",onClick:b},{default:l(()=>[...e[9]||(e[9]=[g("ثبت اطلاعات",-1)])]),_:1})]),_:1},8,["title"])]),_:1})]),_:1},8,["spinning"]))}}});export{Y as _}; +import{d as q,v as G,x as c,a as v,w as l,h as R,j as H,l as S,y as j,r as i,o as p,n as C,c as n,b as O,e as $,F as z,f as g,A as I,z as M,k as J,t as N}from"./index-CVG99b4v.js";import{_ as K}from"./BaseFormModal.vue_vue_type_script_setup_true_lang-CWur6xTz.js";const P={class:"grid-2"},Q={class:"grid-2"},Y=q({__name:"AddBranches",props:{open:{type:Boolean},id:{}},emits:["update:open","success"],setup(h,{emit:V}){const y=h,w=V,f=y.open!==void 0,A=H(),E=J(),d=f?y.id:A.params.id,m=S(!1),_=S([]),t=j({name:"",phone:"",address:"",user_id:void 0}),r=j({});function k(s,e){var o,u;return String(((u=(o=e==null?void 0:e.children)==null?void 0:o[0])==null?void 0:u.children)??"").includes(s)}async function b(){var s,e;if(Object.keys(r).forEach(o=>delete r[o]),!t.name){r.name="لطفا مقدار را وارد کنید";return}try{m.value=!0,d?await c.put(`branch/${d}`,t):await c.post("branch",t),M.info("اطلاعات با موفقیت به ثبت رسید."),d||Object.assign(t,{name:"",phone:"",address:"",user_id:void 0}),f?(w("success"),w("update:open",!1)):E.push("/branch/list")}catch(o){M.error(((e=(s=o==null?void 0:o.response)==null?void 0:s.data)==null?void 0:e.message)??"خطا در ثبت اطلاعات.")}finally{m.value=!1}}return G(async()=>{try{const{data:s}=await c.get("user/list");_.value=s}catch(s){console.log(s)}if(d)try{const{data:s}=await c.get(`branch/${d}`);Object.assign(t,{name:s.name??"",phone:s.phone??"",address:s.address??"",user_id:s.user_id??void 0})}catch(s){console.log(s)}}),(s,e)=>{const o=i("a-input"),u=i("a-form-item"),U=i("a-select-option"),x=i("a-select"),B=i("a-textarea"),F=i("a-button"),D=i("a-card"),L=i("a-form"),T=i("a-spin");return f?(p(),v(K,{key:0,open:!!h.open,id:R(d),"add-title":"افزودن شعبه","edit-title":"ویرایش شعبه",loading:m.value,submitting:m.value,"onUpdate:open":e[4]||(e[4]=a=>s.$emit("update:open",a)),onSubmit:b},{default:l(()=>[C("div",P,[n(u,{label:"نام شعبه","validate-status":r.name?"error":"",help:r.name},{default:l(()=>[n(o,{value:t.name,"onUpdate:value":e[0]||(e[0]=a=>t.name=a)},null,8,["value"])]),_:1},8,["validate-status","help"]),n(u,{label:"تلفن شعبه"},{default:l(()=>[n(o,{value:t.phone,"onUpdate:value":e[1]||(e[1]=a=>t.phone=a)},null,8,["value"])]),_:1}),n(u,{label:"مدیر"},{default:l(()=>[n(x,{value:t.user_id,"onUpdate:value":e[2]||(e[2]=a=>t.user_id=a),"show-search":"","allow-clear":"",placeholder:"انتخاب کنید","filter-option":k},{default:l(()=>[(p(!0),O(z,null,$(_.value,a=>(p(),v(U,{key:a.id,value:a.id},{default:l(()=>[g(N(a.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})]),n(u,{label:"آدرس"},{default:l(()=>[n(B,{value:t.address,"onUpdate:value":e[3]||(e[3]=a=>t.address=a),"auto-size":{minRows:2,maxRows:5}},null,8,["value"])]),_:1})]),_:1},8,["open","id","loading","submitting"])):(p(),v(T,{key:1,spinning:m.value},{default:l(()=>[n(L,{layout:"vertical",onSubmit:I(b,["prevent"])},{default:l(()=>[n(D,{title:R(d)?"ویرایش شعبه":"افزودن شعبه",class:"mb-base"},{default:l(()=>[C("div",Q,[n(u,{label:"نام شعبه","validate-status":r.name?"error":"",help:r.name},{default:l(()=>[n(o,{value:t.name,"onUpdate:value":e[5]||(e[5]=a=>t.name=a)},null,8,["value"])]),_:1},8,["validate-status","help"]),n(u,{label:"تلفن شعبه"},{default:l(()=>[n(o,{value:t.phone,"onUpdate:value":e[6]||(e[6]=a=>t.phone=a)},null,8,["value"])]),_:1}),n(u,{label:"مدیر"},{default:l(()=>[n(x,{value:t.user_id,"onUpdate:value":e[7]||(e[7]=a=>t.user_id=a),"show-search":"","allow-clear":"",placeholder:"انتخاب کنید","filter-option":k},{default:l(()=>[(p(!0),O(z,null,$(_.value,a=>(p(),v(U,{key:a.id,value:a.id},{default:l(()=>[g(N(a.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})]),n(u,{label:"آدرس"},{default:l(()=>[n(B,{value:t.address,"onUpdate:value":e[8]||(e[8]=a=>t.address=a),"auto-size":{minRows:2,maxRows:5}},null,8,["value"])]),_:1}),n(F,{type:"primary",onClick:b},{default:l(()=>[...e[9]||(e[9]=[g("ثبت اطلاعات",-1)])]),_:1})]),_:1},8,["title"])]),_:1})]),_:1},8,["spinning"]))}}});export{Y as _}; diff --git a/apps/admin-panel/dist/assets/AddCustomer-Dp38H4M5.js b/apps/admin-panel/dist/assets/AddCustomer-Dp38H4M5.js deleted file mode 100644 index e79fba3..0000000 --- a/apps/admin-panel/dist/assets/AddCustomer-Dp38H4M5.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as p}from"./bulkCustomer.vue_vue_type_script_setup_true_lang-zBMtv664.js";import{R as u}from"./ReagentCustomer-BUrwCRTH.js";import{_ as l}from"./singleCustomer.vue_vue_type_script_setup_true_lang-6EgeQ9yM.js";import{d as f,u as b,b as k,n as h,c as e,w as a,r,o as t,a as n,i as c}from"./index-WFQJAeoE.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-BQ_i_QZe.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const C={id:"page-user-view"},B={id:"user-data"},$=f({__name:"AddCustomer",setup(v){const m=b(),s=_=>!!m.hasPermission(_);return(_,y)=>{const o=r("a-tab-pane"),i=r("a-tabs"),d=r("a-card");return t(),k("div",C,[h("div",B,[e(d,{class:"mb-base"},{default:a(()=>[s("persons.create")?(t(),n(i,{key:0},{default:a(()=>[s("persons.create.client")?(t(),n(o,{key:"omde",tab:"مشتری عمده"},{default:a(()=>[e(p)]),_:1})):c("",!0),s("persons.create.seller")?(t(),n(o,{key:"reagent",tab:"کارشناس فروش"},{default:a(()=>[e(u)]),_:1})):c("",!0),e(o,{key:"tak",tab:"مشتری تک"},{default:a(()=>[e(l)]),_:1})]),_:1})):c("",!0)]),_:1})])])}}});export{$ as default}; diff --git a/apps/admin-panel/dist/assets/AddCustomer-PBhBkoIp.js b/apps/admin-panel/dist/assets/AddCustomer-PBhBkoIp.js new file mode 100644 index 0000000..8411748 --- /dev/null +++ b/apps/admin-panel/dist/assets/AddCustomer-PBhBkoIp.js @@ -0,0 +1 @@ +import{_ as d}from"./bulkCustomer.vue_vue_type_script_setup_true_lang-BLZHRH0s.js";import{R as u}from"./ReagentCustomer-DcWF6RQp.js";import{_ as l}from"./singleCustomer.vue_vue_type_script_setup_true_lang-BCru8Kun.js";import{d as f,u as b,b as k,n as h,c as e,w as t,r,o as a,a as n,i as c}from"./index-CVG99b4v.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-CWur6xTz.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-C8WW9alD.js";import"./CityTreeSelect.vue_vue_type_script_setup_true_lang-Ctf4a2EQ.js";import"./DateInput-P3xqxLM7.js";import"./index-pLFqZCCf.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const C={id:"page-user-view"},B={id:"user-data"},S=f({__name:"AddCustomer",setup(v){const m=b(),s=_=>!!m.hasPermission(_);return(_,y)=>{const o=r("a-tab-pane"),i=r("a-tabs"),p=r("a-card");return a(),k("div",C,[h("div",B,[e(p,{class:"mb-base"},{default:t(()=>[s("persons.create")?(a(),n(i,{key:0},{default:t(()=>[s("persons.create.client")?(a(),n(o,{key:"omde",tab:"مشتری عمده"},{default:t(()=>[e(d)]),_:1})):c("",!0),s("persons.create.seller")?(a(),n(o,{key:"reagent",tab:"کارشناس فروش"},{default:t(()=>[e(u)]),_:1})):c("",!0),e(o,{key:"tak",tab:"مشتری تک"},{default:t(()=>[e(l)]),_:1})]),_:1})):c("",!0)]),_:1})])])}}});export{S as default}; diff --git a/apps/admin-panel/dist/assets/AddInvoice-BO7d-BCP.js b/apps/admin-panel/dist/assets/AddInvoice-BO7d-BCP.js deleted file mode 100644 index 9f52518..0000000 --- a/apps/admin-panel/dist/assets/AddInvoice-BO7d-BCP.js +++ /dev/null @@ -1 +0,0 @@ -import{G as it,d as nt,v as st,x as q,a as f,w as n,h as b,j as ot,l as j,y as L,r as u,o as l,c as o,f as m,n as I,J as Q,b as C,t as S,F as B,i as P,e as H,A as lt,p as dt,z as M,k as rt}from"./index-WFQJAeoE.js";import{_ as ct}from"./BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js";import{a as ut,b as p,X as W}from"./model-Di_BQPv1.js";import{_ as mt}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./SettingOutlined-DZJd42S-.js";function pt(){const e=new ut("admin/products/list","لیست محصولات");return e.add(new p("id","کد").filterNumber()),e.add(new p("ProductImage","تصویر محصول").renderSlot("image").noSort()),e.add(new p("title","نام محصول").filterText()),e.add(new p("min_gram","وزن").filterNumber().noSort()),e.add(new p("brand.title","برند").filterText()),e.add(new p("category.collection.title","دسته بندی").filterText()),e.add(new p("product_code","کد محصول").filterText()),e.add(new p("max_gram","حداکثر وزن").filterNumber().hidden().noSort()),e.add(new p("op","عملیات").noSort().renderSlot("op")),e}const Y="admin_invoice_items",_t=it("invoiceCart",{state:()=>({items:[]}),actions:{setItems(e){this.items=e,localStorage.setItem(Y,JSON.stringify(e))},add(e){var x;const _=this.items.findIndex(w=>w.pid==e.pid&&w.vid==e.vid),y=(((x=e.product)==null?void 0:x.variants_all)??[]).filter(w=>w.id===e.vid)[0];e.vid&&y&&!y.is_pre_order&&y.qty===0||(_==-1?this.items.push(e):(this.items[_].product=e.product,this.items[_].qty=e.qty),this.setItems(this.items))},remove(e){const _=this.items.findIndex(g=>g.pid==e.pid&&g.vid==e.vid);_>-1&&this.items.splice(_,1),this.setItems(this.items)},updateItemQuantity(e){this.items[e.index].qty=e.quantity,this.setItems(this.items)},clear(){this.items=[],this.setItems(this.items)},init(){try{this.items=JSON.parse(localStorage.getItem(Y)??"[]")||[]}catch{this.items=[]}}}}),ft=["src"],ht={key:1,class:"flex items-center"},vt=["src"],bt={class:"grid-3 mt-4"},gt=["src"],yt={key:1,class:"flex items-center"},xt=["src"],wt={class:"grid-3"},V="/img/no-items.png",kt=nt({__name:"AddInvoice",props:{open:{type:Boolean},id:{}},emits:["update:open","success"],setup(e,{emit:_}){const g=e,y=_,x=g.open!==void 0,w=ot(),Z=rt(),h=_t(),N=x?g.id:w.params.id,T=j(!1),X=pt(),z=j(null),O=j([]),d=L({branch_id:void 0,note:""}),v=L({}),k=dt(()=>h.items),A=[{title:"حذف",dataIndex:"delete",width:60,align:"center"},{title:"کد محصول",dataIndex:"pid",align:"center",width:120},{title:"محصول",dataIndex:"product"},{title:"وزن",dataIndex:"weight",align:"center"}];function J(i){var a,s,r;return((a=i==null?void 0:i.thumb)==null?void 0:a.full)??((r=(s=i==null?void 0:i.ProductImage)==null?void 0:s[0])==null?void 0:r.image)??V}function E(i){h.add({pid:i.id,qty:1,product:i}),M.info("اضافه شد")}function F(i,a){var s,r;return String(((r=(s=a==null?void 0:a.children)==null?void 0:s[0])==null?void 0:r.children)??"").includes(i)}async function U(){var i,a;if(Object.keys(v).forEach(s=>delete v[s]),!d.branch_id){v.branch_id="مقدار را وارد نمایید";return}try{T.value=!0;const s=k.value.map(r=>r.pid);N?await q.put(`branch/product/${N}`,{...d,products:s}):await q.post("branch/product",{...d,products:s}),M.info("عملیات با موفقیت انجام شد"),h.clear(),x?(y("success"),y("update:open",!1)):Z.push("/invoice/list")}catch(s){M.error(((a=(i=s==null?void 0:s.response)==null?void 0:i.data)==null?void 0:a.message)??"خطا در ثبت اطلاعات.")}finally{T.value=!1}}return st(async()=>{h.init();try{const{data:i}=await q.get("branch/list");O.value=i}catch(i){console.log(i)}if(N)try{const{data:i}=await q.get(`branch/product/${N}`);d.branch_id=i.branch_id,d.note=i.note??"",h.setItems((i.products??[]).map(a=>({pid:a.id,qty:1,product:{id:a.id,title:a.title,min_gram:a.grams}})))}catch(i){console.log(i)}}),(i,a)=>{const s=u("a-button"),r=u("a-card"),R=u("a-table"),D=u("a-select-option"),G=u("a-select"),$=u("a-form-item"),K=u("a-input"),tt=u("a-form"),et=u("a-spin");return x?(l(),f(ct,{key:0,open:!!e.open,id:b(N),"add-title":"افزودن فاکتور","edit-title":"ویرایش فاکتور",loading:T.value,submitting:T.value,width:"xl","ok-text":"ثبت تغییرات","onUpdate:open":a[2]||(a[2]=t=>i.$emit("update:open",t)),onSubmit:U},{default:n(()=>[o(r,{title:"لیست محصولات"},{default:n(()=>[o(W,{ref_key:"tblProducts",ref:z,model:b(X)},{image:n(({record:t})=>[I("img",{width:"90px",height:"90px",style:{"object-fit":"scale-down"},src:t.thumb&&t.thumb.full?t.thumb.full:V},null,8,ft)]),op:n(({record:t})=>[o(s,{size:"small",type:"primary",onClick:c=>E(t)},{default:n(()=>[...a[5]||(a[5]=[m("افزودن",-1)])]),_:1},8,["onClick"])]),_:1},8,["model"])]),_:1}),k.value.length>0?(l(),f(r,{key:0,title:"ثبت سفارش",class:"mt-5"},{default:n(()=>[o(R,{columns:A,"data-source":k.value,bordered:"",pagination:!1,"row-key":"pid"},{bodyCell:n(({column:t,record:c})=>[t.dataIndex==="delete"?(l(),f(b(Q),{key:0,class:"cursor-pointer",onClick:at=>b(h).remove(c)},null,8,["onClick"])):t.dataIndex==="product"?(l(),C("div",ht,[I("img",{src:J(c.product),width:"50px"},null,8,vt),m(" "+S(c.product.title),1)])):t.dataIndex==="weight"?(l(),C(B,{key:2},[m(S(c.product.min_gram??"-"),1)],64)):P("",!0)]),_:1},8,["data-source"]),I("div",bt,[o($,{label:"نام شعبه","validate-status":v.branch_id?"error":"",help:v.branch_id},{default:n(()=>[o(G,{value:d.branch_id,"onUpdate:value":a[0]||(a[0]=t=>d.branch_id=t),"show-search":"",placeholder:"انتخاب کنید","filter-option":F},{default:n(()=>[(l(!0),C(B,null,H(O.value,t=>(l(),f(D,{key:t.id,value:t.id},{default:n(()=>[m(S(t.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1},8,["validate-status","help"]),o($,{label:"توضیحات"},{default:n(()=>[o(K,{value:d.note,"onUpdate:value":a[1]||(a[1]=t=>d.note=t)},null,8,["value"])]),_:1})])]),_:1})):P("",!0)]),_:1},8,["open","id","loading","submitting"])):(l(),f(et,{key:1,spinning:T.value},{default:n(()=>[o(r,{title:"لیست محصولات"},{default:n(()=>[o(W,{ref_key:"tblProducts",ref:z,model:b(X)},{image:n(({record:t})=>[I("img",{width:"90px",height:"90px",style:{"object-fit":"scale-down"},src:t.thumb&&t.thumb.full?t.thumb.full:V},null,8,gt)]),op:n(({record:t})=>[o(s,{size:"small",type:"primary",onClick:c=>E(t)},{default:n(()=>[...a[6]||(a[6]=[m("افزودن",-1)])]),_:1},8,["onClick"])]),_:1},8,["model"]),k.value.length>0?(l(),f(r,{key:0,title:"ثبت سفارش",class:"mt-5"},{default:n(()=>[o(R,{columns:A,"data-source":k.value,bordered:"",pagination:!1,"row-key":"pid"},{bodyCell:n(({column:t,record:c})=>[t.dataIndex==="delete"?(l(),f(b(Q),{key:0,class:"cursor-pointer",onClick:at=>b(h).remove(c)},null,8,["onClick"])):t.dataIndex==="product"?(l(),C("div",yt,[I("img",{src:J(c.product),width:"50px"},null,8,xt),m(" "+S(c.product.title),1)])):t.dataIndex==="weight"?(l(),C(B,{key:2},[m(S(c.product.min_gram??"-"),1)],64)):P("",!0)]),_:1},8,["data-source"]),o(tt,{layout:"vertical",class:"mt-4",onSubmit:lt(U,["prevent"])},{default:n(()=>[I("div",wt,[o($,{label:"نام شعبه","validate-status":v.branch_id?"error":"",help:v.branch_id},{default:n(()=>[o(G,{value:d.branch_id,"onUpdate:value":a[3]||(a[3]=t=>d.branch_id=t),"show-search":"",placeholder:"انتخاب کنید","filter-option":F},{default:n(()=>[(l(!0),C(B,null,H(O.value,t=>(l(),f(D,{key:t.id,value:t.id},{default:n(()=>[m(S(t.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1},8,["validate-status","help"]),o($,{label:"توضیحات"},{default:n(()=>[o(K,{value:d.note,"onUpdate:value":a[4]||(a[4]=t=>d.note=t)},null,8,["value"])]),_:1})]),o(s,{type:"primary",disabled:k.value.length<1,onClick:U},{default:n(()=>[...a[7]||(a[7]=[m(" ثبت تغییرات ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})):P("",!0)]),_:1})]),_:1},8,["spinning"]))}}}),$t=mt(kt,[["__scopeId","data-v-f195ac0c"]]);export{$t as default}; diff --git a/apps/admin-panel/dist/assets/AddInvoice-ErZYOCpz.js b/apps/admin-panel/dist/assets/AddInvoice-ErZYOCpz.js new file mode 100644 index 0000000..fbe441c --- /dev/null +++ b/apps/admin-panel/dist/assets/AddInvoice-ErZYOCpz.js @@ -0,0 +1 @@ +import{J as at,d as nt,v as st,x as q,a as f,w as n,h as b,j as ot,l as j,y as Q,r as u,o as l,c as o,f as m,n as I,L as G,b as C,t as S,F as B,i as P,e as H,A as lt,p as dt,z as M,k as rt}from"./index-CVG99b4v.js";import{_ as ct}from"./BaseFormModal.vue_vue_type_script_setup_true_lang-CWur6xTz.js";import{a as ut,b as p,X as W}from"./model-CvqTGmy8.js";import{_ as mt}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./filters-UavLT20t.js";import"./index-pLFqZCCf.js";import"./SettingOutlined-D7--Xtqg.js";function pt(){const e=new ut("admin/products/list","لیست محصولات");return e.add(new p("id","کد").filterNumber()),e.add(new p("ProductImage","تصویر محصول").renderSlot("image").noSort()),e.add(new p("title","نام محصول").filterText()),e.add(new p("min_gram","وزن").filterNumber().noSort()),e.add(new p("brand.title","برند").filterText()),e.add(new p("category.collection.title","دسته بندی").filterText()),e.add(new p("product_code","کد محصول").filterText()),e.add(new p("max_gram","حداکثر وزن").filterNumber().hidden().noSort()),e.add(new p("op","عملیات").noSort().renderSlot("op")),e}const Y="admin_invoice_items",_t=at("invoiceCart",{state:()=>({items:[]}),actions:{setItems(e){this.items=e,localStorage.setItem(Y,JSON.stringify(e))},add(e){var x;const _=this.items.findIndex(w=>w.pid==e.pid&&w.vid==e.vid),y=(((x=e.product)==null?void 0:x.variants_all)??[]).filter(w=>w.id===e.vid)[0];e.vid&&y&&!y.is_pre_order&&y.qty===0||(_==-1?this.items.push(e):(this.items[_].product=e.product,this.items[_].qty=e.qty),this.setItems(this.items))},remove(e){const _=this.items.findIndex(g=>g.pid==e.pid&&g.vid==e.vid);_>-1&&this.items.splice(_,1),this.setItems(this.items)},updateItemQuantity(e){this.items[e.index].qty=e.quantity,this.setItems(this.items)},clear(){this.items=[],this.setItems(this.items)},init(){try{this.items=JSON.parse(localStorage.getItem(Y)??"[]")||[]}catch{this.items=[]}}}}),ft=["src"],ht={key:1,class:"flex items-center"},vt=["src"],bt={class:"grid-3 mt-4"},gt=["src"],yt={key:1,class:"flex items-center"},xt=["src"],wt={class:"grid-3"},V="/img/no-items.png",kt=nt({__name:"AddInvoice",props:{open:{type:Boolean},id:{}},emits:["update:open","success"],setup(e,{emit:_}){const g=e,y=_,x=g.open!==void 0,w=ot(),Z=rt(),h=_t(),N=x?g.id:w.params.id,T=j(!1),X=pt(),z=j(null),O=j([]),d=Q({branch_id:void 0,note:""}),v=Q({}),k=dt(()=>h.items),A=[{title:"حذف",dataIndex:"delete",width:60,align:"center"},{title:"کد محصول",dataIndex:"pid",align:"center",width:120},{title:"محصول",dataIndex:"product"},{title:"وزن",dataIndex:"weight",align:"center"}];function J(a){var i,s,r;return((i=a==null?void 0:a.thumb)==null?void 0:i.full)??((r=(s=a==null?void 0:a.ProductImage)==null?void 0:s[0])==null?void 0:r.image)??V}function E(a){h.add({pid:a.id,qty:1,product:a}),M.info("اضافه شد")}function F(a,i){var s,r;return String(((r=(s=i==null?void 0:i.children)==null?void 0:s[0])==null?void 0:r.children)??"").includes(a)}async function U(){var a,i;if(Object.keys(v).forEach(s=>delete v[s]),!d.branch_id){v.branch_id="مقدار را وارد نمایید";return}try{T.value=!0;const s=k.value.map(r=>r.pid);N?await q.put(`branch/product/${N}`,{...d,products:s}):await q.post("branch/product",{...d,products:s}),M.info("عملیات با موفقیت انجام شد"),h.clear(),x?(y("success"),y("update:open",!1)):Z.push("/invoice/list")}catch(s){M.error(((i=(a=s==null?void 0:s.response)==null?void 0:a.data)==null?void 0:i.message)??"خطا در ثبت اطلاعات.")}finally{T.value=!1}}return st(async()=>{h.init();try{const{data:a}=await q.get("branch/list");O.value=a}catch(a){console.log(a)}if(N)try{const{data:a}=await q.get(`branch/product/${N}`);d.branch_id=a.branch_id,d.note=a.note??"",h.setItems((a.products??[]).map(i=>({pid:i.id,qty:1,product:{id:i.id,title:i.title,min_gram:i.grams}})))}catch(a){console.log(a)}}),(a,i)=>{const s=u("a-button"),r=u("a-card"),L=u("a-table"),R=u("a-select-option"),D=u("a-select"),$=u("a-form-item"),K=u("a-input"),tt=u("a-form"),et=u("a-spin");return x?(l(),f(ct,{key:0,open:!!e.open,id:b(N),"add-title":"افزودن فاکتور","edit-title":"ویرایش فاکتور",loading:T.value,submitting:T.value,width:"xl","ok-text":"ثبت تغییرات","onUpdate:open":i[2]||(i[2]=t=>a.$emit("update:open",t)),onSubmit:U},{default:n(()=>[o(r,{title:"لیست محصولات"},{default:n(()=>[o(W,{ref_key:"tblProducts",ref:z,model:b(X)},{image:n(({record:t})=>[I("img",{width:"90px",height:"90px",style:{"object-fit":"scale-down"},src:t.thumb&&t.thumb.full?t.thumb.full:V},null,8,ft)]),op:n(({record:t})=>[o(s,{size:"small",type:"primary",onClick:c=>E(t)},{default:n(()=>[...i[5]||(i[5]=[m("افزودن",-1)])]),_:1},8,["onClick"])]),_:1},8,["model"])]),_:1}),k.value.length>0?(l(),f(r,{key:0,title:"ثبت سفارش",class:"mt-5"},{default:n(()=>[o(L,{columns:A,"data-source":k.value,bordered:"",pagination:!1,"row-key":"pid"},{bodyCell:n(({column:t,record:c})=>[t.dataIndex==="delete"?(l(),f(b(G),{key:0,class:"cursor-pointer",onClick:it=>b(h).remove(c)},null,8,["onClick"])):t.dataIndex==="product"?(l(),C("div",ht,[I("img",{src:J(c.product),width:"50px"},null,8,vt),m(" "+S(c.product.title),1)])):t.dataIndex==="weight"?(l(),C(B,{key:2},[m(S(c.product.min_gram??"-"),1)],64)):P("",!0)]),_:1},8,["data-source"]),I("div",bt,[o($,{label:"نام شعبه","validate-status":v.branch_id?"error":"",help:v.branch_id},{default:n(()=>[o(D,{value:d.branch_id,"onUpdate:value":i[0]||(i[0]=t=>d.branch_id=t),"show-search":"",placeholder:"انتخاب کنید","filter-option":F},{default:n(()=>[(l(!0),C(B,null,H(O.value,t=>(l(),f(R,{key:t.id,value:t.id},{default:n(()=>[m(S(t.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1},8,["validate-status","help"]),o($,{label:"توضیحات"},{default:n(()=>[o(K,{value:d.note,"onUpdate:value":i[1]||(i[1]=t=>d.note=t)},null,8,["value"])]),_:1})])]),_:1})):P("",!0)]),_:1},8,["open","id","loading","submitting"])):(l(),f(et,{key:1,spinning:T.value},{default:n(()=>[o(r,{title:"لیست محصولات"},{default:n(()=>[o(W,{ref_key:"tblProducts",ref:z,model:b(X)},{image:n(({record:t})=>[I("img",{width:"90px",height:"90px",style:{"object-fit":"scale-down"},src:t.thumb&&t.thumb.full?t.thumb.full:V},null,8,gt)]),op:n(({record:t})=>[o(s,{size:"small",type:"primary",onClick:c=>E(t)},{default:n(()=>[...i[6]||(i[6]=[m("افزودن",-1)])]),_:1},8,["onClick"])]),_:1},8,["model"]),k.value.length>0?(l(),f(r,{key:0,title:"ثبت سفارش",class:"mt-5"},{default:n(()=>[o(L,{columns:A,"data-source":k.value,bordered:"",pagination:!1,"row-key":"pid"},{bodyCell:n(({column:t,record:c})=>[t.dataIndex==="delete"?(l(),f(b(G),{key:0,class:"cursor-pointer",onClick:it=>b(h).remove(c)},null,8,["onClick"])):t.dataIndex==="product"?(l(),C("div",yt,[I("img",{src:J(c.product),width:"50px"},null,8,xt),m(" "+S(c.product.title),1)])):t.dataIndex==="weight"?(l(),C(B,{key:2},[m(S(c.product.min_gram??"-"),1)],64)):P("",!0)]),_:1},8,["data-source"]),o(tt,{layout:"vertical",class:"mt-4",onSubmit:lt(U,["prevent"])},{default:n(()=>[I("div",wt,[o($,{label:"نام شعبه","validate-status":v.branch_id?"error":"",help:v.branch_id},{default:n(()=>[o(D,{value:d.branch_id,"onUpdate:value":i[3]||(i[3]=t=>d.branch_id=t),"show-search":"",placeholder:"انتخاب کنید","filter-option":F},{default:n(()=>[(l(!0),C(B,null,H(O.value,t=>(l(),f(R,{key:t.id,value:t.id},{default:n(()=>[m(S(t.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1},8,["validate-status","help"]),o($,{label:"توضیحات"},{default:n(()=>[o(K,{value:d.note,"onUpdate:value":i[4]||(i[4]=t=>d.note=t)},null,8,["value"])]),_:1})]),o(s,{type:"primary",disabled:k.value.length<1,onClick:U},{default:n(()=>[...i[7]||(i[7]=[m(" ثبت تغییرات ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})):P("",!0)]),_:1})]),_:1},8,["spinning"]))}}}),Bt=mt(kt,[["__scopeId","data-v-f195ac0c"]]);export{Bt as default}; diff --git a/apps/admin-panel/dist/assets/AddProduct-DFJbP1pt.css b/apps/admin-panel/dist/assets/AddProduct-DFJbP1pt.css new file mode 100644 index 0000000..c9f27bb --- /dev/null +++ b/apps/admin-panel/dist/assets/AddProduct-DFJbP1pt.css @@ -0,0 +1 @@ +.grid-1[data-v-b0cf24f2]{display:grid;grid-template-columns:1fr}.image-grid[data-v-b0cf24f2]{display:flex;flex-wrap:wrap;gap:8px}.variant-thumb[data-v-b0cf24f2]{width:40px;height:40px;object-fit:cover;border-radius:4px;display:inline-block}.variant-thumb--empty[data-v-b0cf24f2]{display:inline-flex;align-items:center;justify-content:center;border:1px dashed #d9d9d9;color:#bfbfbf}.variant-picker[data-v-b0cf24f2]{display:flex;flex-wrap:wrap;gap:8px}.variant-picker__item[data-v-b0cf24f2]{width:64px;height:64px;padding:2px;border:2px solid #d9d9d9;border-radius:6px;background:#fff;cursor:pointer;overflow:hidden}.variant-picker__item img[data-v-b0cf24f2]{width:100%;height:100%;object-fit:cover;border-radius:4px;display:block}.variant-picker__item.is-on[data-v-b0cf24f2]{border-color:#1890ff}.variant-picker__none[data-v-b0cf24f2]{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:11px;color:#8c8c8c;line-height:1.3}.flex-1[data-v-b0cf24f2]{flex:1}.mb-8[data-v-b0cf24f2]{margin-bottom:2rem}.overflow-auto[data-v-b0cf24f2]{overflow:auto} diff --git a/apps/admin-panel/dist/assets/AddProduct-DM5gziby.css b/apps/admin-panel/dist/assets/AddProduct-DM5gziby.css deleted file mode 100644 index 60d9ef8..0000000 --- a/apps/admin-panel/dist/assets/AddProduct-DM5gziby.css +++ /dev/null @@ -1 +0,0 @@ -.grid-1[data-v-d501144a]{display:grid;grid-template-columns:1fr}.image-grid[data-v-d501144a]{display:flex;flex-wrap:wrap;gap:8px}.variant-thumb[data-v-d501144a]{width:40px;height:40px;object-fit:cover;border-radius:4px;display:inline-block}.variant-thumb--empty[data-v-d501144a]{display:inline-flex;align-items:center;justify-content:center;border:1px dashed #d9d9d9;color:#bfbfbf}.variant-picker[data-v-d501144a]{display:flex;flex-wrap:wrap;gap:8px}.variant-picker__item[data-v-d501144a]{width:64px;height:64px;padding:2px;border:2px solid #d9d9d9;border-radius:6px;background:#fff;cursor:pointer;overflow:hidden}.variant-picker__item img[data-v-d501144a]{width:100%;height:100%;object-fit:cover;border-radius:4px;display:block}.variant-picker__item.is-on[data-v-d501144a]{border-color:#1890ff}.variant-picker__none[data-v-d501144a]{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:11px;color:#8c8c8c;line-height:1.3}.flex-1[data-v-d501144a]{flex:1}.mb-8[data-v-d501144a]{margin-bottom:2rem}.overflow-auto[data-v-d501144a]{overflow:auto} diff --git a/apps/admin-panel/dist/assets/AddProduct-DYRcWcLI.js b/apps/admin-panel/dist/assets/AddProduct-DYRcWcLI.js new file mode 100644 index 0000000..e130a95 --- /dev/null +++ b/apps/admin-panel/dist/assets/AddProduct-DYRcWcLI.js @@ -0,0 +1 @@ +import{d as ce,u as ve,v as me,x as $,b as v,c as l,w as a,A as ye,j as ge,l as m,y as F,r as p,o as s,n as y,F as U,e as h,f as g,a as b,h as L,E as fe,i as M,D as be,t as S,s as te,z as T,k as ke}from"./index-CVG99b4v.js";import{_ as q}from"./ImageUploadInput.vue_vue_type_script_setup_true_lang-C8WW9alD.js";import{_ as we}from"./_plugin-vue_export-helper-DlAUqK2U.js";const Ue={id:"page-user-view"},xe={class:"grid-2"},Ce={class:"image-grid"},Ve={class:"image-grid"},Ie={class:"grid-3"},$e={class:"grid-1"},he={class:"grid-3"},qe={class:"flex"},Ne=["src"],Oe={key:1,class:"variant-thumb variant-thumb--empty"},je={key:0,class:"variant-picker"},Be=["onClick"],Me=["src"],Se=ce({__name:"AddProduct",setup(Pe){const le=ge(),ae=ke(),oe=ve(),P=d=>!!oe.hasPermission(d),N=le.params.id,O=m(!1),W=m(void 0),D=m(!1),G=m([]),H=m([]),J=m([]),n=F({title:"",product_code:"",show_type:3,category_id:void 0,brand_id:void 0,ciny_ids:[],body_html:"",is_active:!0,indicator_id:null,mobile_pic:null}),x=F({}),C=m([]),V=m([]),E=m([]),I=m([]),j=m(!1),B=m(null),u=F({__key:"",title:"",grams:void 0,percentage_pay:void 0,qty:0,is_active:!0,is_pre_order:!1,image_id:null,image_url:null});function K(d){u.image_id=d?d.id:null,u.image_url=d?d.url:null}const ie=[{title:"تصویر",dataIndex:"image"},{title:"عنوان",dataIndex:"title"},{title:"وزن",dataIndex:"grams"},{title:"اجرت درصدی",dataIndex:"percentage_pay"},{title:"تعداد",dataIndex:"qty"},{title:"فعال",dataIndex:"is_active"},{title:" پیش سفارش",dataIndex:"is_pre_order"},{title:"عملیات",dataIndex:"op"}];function Q(d,e){d&&e!==void 0?(B.value=e,Object.assign(u,d)):(B.value=null,Object.assign(u,{__key:`v-${Date.now()}-${Math.random().toString(36).slice(2,7)}`,id:void 0,title:"",grams:void 0,percentage_pay:W.value,qty:0,is_active:!0,is_pre_order:!1,image_id:null,image_url:null})),j.value=!0}function ne(){if(!u.title){T.error("عنوان تنوع الزامی است");return}const d={...u};B.value===null?I.value.push(d):I.value[B.value]=d,j.value=!1}function se(){return Object.keys(x).forEach(d=>delete x[d]),n.title||(x.title="لطفا مقدار را وارد کنید"),Object.keys(x).length===0}async function X(){var d,e;if(se())try{D.value=!0;const o={...n,cats:n.category_id?[n.category_id]:[],images:C.value,images_mobile:V.value,variants:I.value.map(c=>({id:c.id,title:c.title,grams:c.grams,percentage_pay:c.percentage_pay,qty:c.qty,is_active:c.is_active,is_pre_order:c.is_pre_order,image_id:c.image_id??null}))};N?await $.put(`product/update/${N}`,o):await $.post("product/create",o),T.info("اطلاعات با موفقیت به ثبت رسید."),ae.push("/apps/product/list")}catch(o){T.error(((e=(d=o==null?void 0:o.response)==null?void 0:d.data)==null?void 0:e.message)??"خطا در ثبت اطلاعات.")}finally{D.value=!1}}return me(async()=>{var d,e,o,c;try{const[i,r,k]=await Promise.all([$.get("brand"),$.post("category"),$.get("admin/products/collections")]);G.value=i.data,H.value=(r.data.rows??r.data).map(f=>({id:f.id,title:f.type_str?`${f.title} (${f.type_str}) `:f.title,type:f.type})),J.value=k.data}catch(i){console.log(i)}if(N)try{const{data:i}=await $.get(`product/show/${N}`);O.value=!!((d=i.accounting)!=null&&d.locked),W.value=((e=i.accounting)==null?void 0:e.sale_wage_percent)!=null?Number(i.accounting.sale_wage_percent):void 0,Object.assign(n,{title:i.title??"",product_code:i.product_code??"",show_type:i.show_type??3,category_id:((o=i.category)==null?void 0:o.id)??void 0,brand_id:((c=i.brand)==null?void 0:c.id)??void 0,ciny_ids:i.ciny_ids??[],body_html:i.body_html??"",is_active:i.is_active??!0,indicator_id:i.indicator_id??null,mobile_pic:i.mobile_pic??null}),C.value=i.images_gallery??[],V.value=i.images_mobile??[],E.value=i.gallery??[],I.value=(i.variants_all??[]).map((r,k)=>{var f;return{__key:r.id??`v-${k}`,id:r.id,title:r.title,grams:Number(r.grams),percentage_pay:Number(r.percentage_pay),qty:r.qty,is_active:r.is_active,is_pre_order:r.is_pre_order,image_id:r.image_id??null,image_url:((f=r.image)==null?void 0:f.url)??null}})}catch(i){console.log(i)}}),(d,e)=>{const o=p("a-form-item"),c=p("a-card"),i=p("a-input"),r=p("a-select-option"),k=p("a-select"),f=p("a-textarea"),R=p("a-switch"),z=p("a-button"),Y=p("a-tooltip"),Z=p("a-tag"),de=p("a-table"),ue=p("a-spin"),ee=p("a-form"),A=p("a-input-number"),re=p("a-alert"),_e=p("a-modal");return s(),v("div",Ue,[l(ee,{layout:"vertical",onSubmit:ye(X,["prevent"])},{default:a(()=>[l(ue,{spinning:D.value},{default:a(()=>[l(c,{title:"تصاویر محصول",class:"mb-base"},{default:a(()=>[y("div",xe,[l(o,{label:"تصویر شاخص"},{default:a(()=>[l(q,{modelValue:n.indicator_id,"onUpdate:modelValue":e[0]||(e[0]=t=>n.indicator_id=t),purpose:"product.indicator",placeholder:"تصویر شاخص"},null,8,["modelValue"])]),_:1}),l(o,{label:"تصویر شاخص موبایل"},{default:a(()=>[l(q,{modelValue:n.mobile_pic,"onUpdate:modelValue":e[1]||(e[1]=t=>n.mobile_pic=t),purpose:"product.indicator_mobile",placeholder:"تصویر شاخص موبایل"},null,8,["modelValue"])]),_:1})]),l(o,{label:"گالری تصاویر سایت"},{default:a(()=>[y("div",Ce,[(s(!0),v(U,null,h(C.value,(t,_)=>(s(),v("div",{key:_,class:"image-grid__item"},[l(q,{"model-value":t,purpose:"product.gallery",placeholder:"تصویر","onUpdate:modelValue":w=>w?C.value[_]=w:C.value.splice(_,1)},null,8,["model-value","onUpdate:modelValue"])]))),128)),l(q,{"model-value":null,purpose:"product.gallery",placeholder:"افزودن تصویر","onUpdate:modelValue":e[2]||(e[2]=t=>t&&C.value.push(t))})])]),_:1}),l(o,{label:"گالری تصاویر موبایل"},{default:a(()=>[y("div",Ve,[(s(!0),v(U,null,h(V.value,(t,_)=>(s(),v("div",{key:_,class:"image-grid__item"},[l(q,{"model-value":t,purpose:"product.gallery_mobile",placeholder:"تصویر","onUpdate:modelValue":w=>w?V.value[_]=w:V.value.splice(_,1)},null,8,["model-value","onUpdate:modelValue"])]))),128)),l(q,{"model-value":null,purpose:"product.gallery_mobile",placeholder:"افزودن تصویر","onUpdate:modelValue":e[3]||(e[3]=t=>t&&V.value.push(t))})])]),_:1})]),_:1}),l(c,{title:"اطلاعات پایه",class:"mb-base"},{default:a(()=>[y("div",Ie,[l(o,{label:"کد محصول",help:O.value?"از نرم‌افزار حسابداری":void 0},{default:a(()=>[l(i,{value:n.product_code,"onUpdate:value":e[4]||(e[4]=t=>n.product_code=t),disabled:O.value},null,8,["value","disabled"])]),_:1},8,["help"]),l(o,{label:"نام محصول","validate-status":x.title?"error":"",help:x.title||(O.value?"از نرم‌افزار حسابداری — برای تغییر، آن را در حسابداری ویرایش کنید":void 0)},{default:a(()=>[l(i,{value:n.title,"onUpdate:value":e[5]||(e[5]=t=>n.title=t),disabled:O.value},null,8,["value","disabled"])]),_:1},8,["validate-status","help"]),l(o,{label:"نوع نمایش"},{default:a(()=>[l(k,{value:n.show_type,"onUpdate:value":e[6]||(e[6]=t=>n.show_type=t)},{default:a(()=>[l(r,{value:1},{default:a(()=>[...e[22]||(e[22]=[g("سایت",-1)])]),_:1}),l(r,{value:2},{default:a(()=>[...e[23]||(e[23]=[g("گوشی",-1)])]),_:1}),l(r,{value:3},{default:a(()=>[...e[24]||(e[24]=[g("سایت و گوشی",-1)])]),_:1})]),_:1},8,["value"])]),_:1}),l(o,{label:"دسته بندی"},{default:a(()=>[l(k,{value:n.category_id,"onUpdate:value":e[7]||(e[7]=t=>n.category_id=t),"allow-clear":"",placeholder:"انتخاب کنید"},{default:a(()=>[(s(!0),v(U,null,h(H.value,t=>(s(),b(r,{key:t.id,value:t.id},{default:a(()=>[g(S(t.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1}),l(o,{label:"برند"},{default:a(()=>[l(k,{value:n.brand_id,"onUpdate:value":e[8]||(e[8]=t=>n.brand_id=t),"allow-clear":"",placeholder:"انتخاب کنید"},{default:a(()=>[(s(!0),v(U,null,h(G.value,t=>(s(),b(r,{key:t.id,value:t.id},{default:a(()=>[g(S(t.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1}),l(o,{label:"سینی ها"},{default:a(()=>[l(k,{value:n.ciny_ids,"onUpdate:value":e[9]||(e[9]=t=>n.ciny_ids=t),mode:"multiple","allow-clear":"",placeholder:"انتخاب کنید"},{default:a(()=>[(s(!0),v(U,null,h(J.value,t=>(s(),b(r,{key:t.id,value:t.id},{default:a(()=>[g(S(t.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})]),y("div",$e,[l(o,{label:"شرح محصول (سایت)"},{default:a(()=>[l(f,{value:n.body_html,"onUpdate:value":e[10]||(e[10]=t=>n.body_html=t),"auto-size":{minRows:4,maxRows:10}},null,8,["value"])]),_:1})]),y("div",he,[l(o,{label:"نمایش محصول"},{default:a(()=>[l(R,{checked:n.is_active,"onUpdate:checked":e[11]||(e[11]=t=>n.is_active=t)},null,8,["checked"])]),_:1})])]),_:1}),P("product.list.variants")?(s(),b(c,{key:0,class:"mb-8 overflow-auto"},{title:a(()=>[y("div",qe,[e[26]||(e[26]=y("div",{class:"flex-1"},"تنوع ها",-1)),P("product.list.variants.add")?(s(),b(z,{key:0,type:"primary",onClick:e[12]||(e[12]=t=>Q())},{default:a(()=>[...e[25]||(e[25]=[g(" افزودن تنوع ",-1)])]),_:1})):M("",!0)])]),default:a(()=>[l(de,{columns:ie,"data-source":I.value,pagination:!1,size:"small","row-key":"__key"},{bodyCell:a(({column:t,record:_,index:w})=>[t.dataIndex==="image"?(s(),v(U,{key:0},[_.image_url?(s(),v("img",{key:0,src:_.image_url,class:"variant-thumb",alt:""},null,8,Ne)):(s(),v("span",Oe,"—"))],64)):t.dataIndex==="op"?(s(),v(U,{key:1},[P("product.list.variants.edit")?(s(),b(Y,{key:0,title:"ویرایش"},{default:a(()=>[l(L(fe),{class:"cursor-pointer mx-1 text-primary",onClick:pe=>Q(_,w)},null,8,["onClick"])]),_:2},1024)):M("",!0),P("product.list.variants.remove")?(s(),b(Y,{key:1,title:"حذف"},{default:a(()=>[l(L(be),{class:"cursor-pointer mx-1 text-danger",onClick:pe=>I.value.splice(w,1)},null,8,["onClick"])]),_:2},1024)):M("",!0)],64)):t.dataIndex==="is_active"?(s(),b(Z,{key:2,color:_.is_active?"green":"red"},{default:a(()=>[g(S(_.is_active?"فعال":"غیر فعال"),1)]),_:2},1032,["color"])):t.dataIndex==="is_pre_order"?(s(),b(Z,{key:3,color:_.is_pre_order?"blue":""},{default:a(()=>[g(S(_.is_pre_order?"بله":"خیر"),1)]),_:2},1032,["color"])):M("",!0)]),_:1},8,["data-source"])]),_:1})):M("",!0),y("div",null,[l(z,{type:"primary",class:"mr-4",onClick:X},{default:a(()=>[...e[27]||(e[27]=[g("ثبت اطلاعات",-1)])]),_:1})])]),_:1},8,["spinning"])]),_:1}),l(_e,{open:j.value,"onUpdate:open":e[21]||(e[21]=t=>j.value=t),title:B.value===null?"افزودن تنوع":"ویرایش تنوع"},{footer:a(()=>[l(z,{onClick:e[20]||(e[20]=t=>j.value=!1)},{default:a(()=>[...e[29]||(e[29]=[g("انصراف",-1)])]),_:1}),l(z,{type:"primary",onClick:ne},{default:a(()=>[...e[30]||(e[30]=[g("ثبت",-1)])]),_:1})]),default:a(()=>[l(ee,{layout:"vertical"},{default:a(()=>[l(o,{label:"عنوان"},{default:a(()=>[l(i,{value:u.title,"onUpdate:value":e[13]||(e[13]=t=>u.title=t)},null,8,["value"])]),_:1}),l(o,{label:"وزن"},{default:a(()=>[l(A,{value:u.grams,"onUpdate:value":e[14]||(e[14]=t=>u.grams=t),class:"w-full",step:.001},null,8,["value"])]),_:1}),l(o,{label:"اجرت درصدی"},{default:a(()=>[l(A,{value:u.percentage_pay,"onUpdate:value":e[15]||(e[15]=t=>u.percentage_pay=t),class:"w-full",step:.1},null,8,["value"])]),_:1}),l(o,{label:"تعداد"},{default:a(()=>[l(A,{value:u.qty,"onUpdate:value":e[16]||(e[16]=t=>u.qty=t),class:"w-full"},null,8,["value"])]),_:1}),l(o,{label:"تصویر تنوع"},{default:a(()=>[E.value.length?(s(),v("div",je,[y("button",{type:"button",class:te(["variant-picker__item",{"is-on":!u.image_id}]),onClick:e[17]||(e[17]=t=>K(null))},[...e[28]||(e[28]=[y("span",{class:"variant-picker__none"},"بدون تصویر",-1)])],2),(s(!0),v(U,null,h(E.value,t=>(s(),v("button",{key:t.id,type:"button",class:te(["variant-picker__item",{"is-on":u.image_id===t.id}]),onClick:_=>K(t)},[y("img",{src:t.url,alt:""},null,8,Me)],10,Be))),128))])):(s(),b(re,{key:1,type:"info","show-icon":"",message:L(N)?"برای این محصول تصویری ثبت نشده است.":"ابتدا محصول را ذخیره کنید تا بتوانید تصویر تنوع را انتخاب کنید."},null,8,["message"]))]),_:1}),l(o,{label:"فعال"},{default:a(()=>[l(R,{checked:u.is_active,"onUpdate:checked":e[18]||(e[18]=t=>u.is_active=t)},null,8,["checked"])]),_:1}),l(o,{label:" پیش سفارش"},{default:a(()=>[l(R,{checked:u.is_pre_order,"onUpdate:checked":e[19]||(e[19]=t=>u.is_pre_order=t)},null,8,["checked"])]),_:1})]),_:1})]),_:1},8,["open","title"])])}}}),Re=we(Se,[["__scopeId","data-v-b0cf24f2"]]);export{Re as default}; diff --git a/apps/admin-panel/dist/assets/AddProduct-tKobI_Dp.js b/apps/admin-panel/dist/assets/AddProduct-tKobI_Dp.js deleted file mode 100644 index d851635..0000000 --- a/apps/admin-panel/dist/assets/AddProduct-tKobI_Dp.js +++ /dev/null @@ -1 +0,0 @@ -import{d as _e,u as pe,v as ce,x as V,b as c,c as l,w as o,A as me,j as ve,l as y,y as R,r as p,o as n,n as m,F as b,e as I,f as v,a as g,h as A,E as ye,i as j,D as ge,t as M,s as Y,z as F,k as fe}from"./index-WFQJAeoE.js";import{_ as $}from"./ImageUploadInput.vue_vue_type_script_setup_true_lang-BQ_i_QZe.js";import{_ as be}from"./_plugin-vue_export-helper-DlAUqK2U.js";const ke={id:"page-user-view"},we={class:"grid-2"},Ue={class:"image-grid"},xe={class:"image-grid"},Ce={class:"grid-3"},Ve={class:"grid-1"},Ie={class:"grid-3"},$e={class:"flex"},qe=["src"],he={key:1,class:"variant-thumb variant-thumb--empty"},Oe={key:0,class:"variant-picker"},je=["onClick"],Me=["src"],Ne=_e({__name:"AddProduct",setup(Se){const Z=ve(),ee=fe(),te=pe(),N=d=>!!te.hasPermission(d),q=Z.params.id,P=y(!1),L=y([]),T=y([]),G=y([]),s=R({title:"",product_code:"",show_type:3,category_id:void 0,brand_id:void 0,ciny_ids:[],body_html:"",is_active:!0,indicator_id:null,mobile_pic:null}),w=R({}),U=y([]),x=y([]),z=y([]),C=y([]),h=y(!1),O=y(null),u=R({__key:"",title:"",grams:void 0,percentage_pay:void 0,qty:0,is_active:!0,is_pre_order:!1,image_id:null,image_url:null});function H(d){u.image_id=d?d.id:null,u.image_url=d?d.url:null}const le=[{title:"تصویر",dataIndex:"image"},{title:"عنوان",dataIndex:"title"},{title:"وزن",dataIndex:"grams"},{title:"اجرت درصدی",dataIndex:"percentage_pay"},{title:"تعداد",dataIndex:"qty"},{title:"فعال",dataIndex:"is_active"},{title:" پیش سفارش",dataIndex:"is_pre_order"},{title:"عملیات",dataIndex:"op"}];function J(d,e){d&&e!==void 0?(O.value=e,Object.assign(u,d)):(O.value=null,Object.assign(u,{__key:`v-${Date.now()}-${Math.random().toString(36).slice(2,7)}`,id:void 0,title:"",grams:void 0,percentage_pay:void 0,qty:0,is_active:!0,is_pre_order:!1,image_id:null,image_url:null})),h.value=!0}function ae(){if(!u.title){F.error("عنوان تنوع الزامی است");return}const d={...u};O.value===null?C.value.push(d):C.value[O.value]=d,h.value=!1}function oe(){return Object.keys(w).forEach(d=>delete w[d]),s.title||(w.title="لطفا مقدار را وارد کنید"),Object.keys(w).length===0}async function K(){var d,e;if(oe())try{P.value=!0;const a={...s,cats:s.category_id?[s.category_id]:[],images:U.value,images_mobile:x.value,variants:C.value.map(i=>({id:i.id,title:i.title,grams:i.grams,percentage_pay:i.percentage_pay,qty:i.qty,is_active:i.is_active,is_pre_order:i.is_pre_order,image_id:i.image_id??null}))};q?await V.put(`product/update/${q}`,a):await V.post("product/create",a),F.info("اطلاعات با موفقیت به ثبت رسید."),ee.push("/apps/product/list")}catch(a){F.error(((e=(d=a==null?void 0:a.response)==null?void 0:d.data)==null?void 0:e.message)??"خطا در ثبت اطلاعات.")}finally{P.value=!1}}return ce(async()=>{var d,e;try{const[a,i,k]=await Promise.all([V.get("brand"),V.post("category"),V.get("admin/products/collections")]);L.value=a.data,T.value=(i.data.rows??i.data).map(r=>({id:r.id,title:r.type_str?`${r.title} (${r.type_str}) `:r.title,type:r.type})),G.value=k.data}catch(a){console.log(a)}if(q)try{const{data:a}=await V.get(`product/show/${q}`);Object.assign(s,{title:a.title??"",product_code:a.product_code??"",show_type:a.show_type??3,category_id:((d=a.category)==null?void 0:d.id)??void 0,brand_id:((e=a.brand)==null?void 0:e.id)??void 0,ciny_ids:a.ciny_ids??[],body_html:a.body_html??"",is_active:a.is_active??!0,indicator_id:a.indicator_id??null,mobile_pic:a.mobile_pic??null}),U.value=a.images_gallery??[],x.value=a.images_mobile??[],z.value=a.gallery??[],C.value=(a.variants_all??[]).map((i,k)=>{var r;return{__key:i.id??`v-${k}`,id:i.id,title:i.title,grams:Number(i.grams),percentage_pay:Number(i.percentage_pay),qty:i.qty,is_active:i.is_active,is_pre_order:i.is_pre_order,image_id:i.image_id??null,image_url:((r=i.image)==null?void 0:r.url)??null}})}catch(a){console.log(a)}}),(d,e)=>{const a=p("a-form-item"),i=p("a-card"),k=p("a-input"),r=p("a-select-option"),S=p("a-select"),ie=p("a-textarea"),D=p("a-switch"),B=p("a-button"),Q=p("a-tooltip"),W=p("a-tag"),se=p("a-table"),ne=p("a-spin"),X=p("a-form"),E=p("a-input-number"),de=p("a-alert"),ue=p("a-modal");return n(),c("div",ke,[l(X,{layout:"vertical",onSubmit:me(K,["prevent"])},{default:o(()=>[l(ne,{spinning:P.value},{default:o(()=>[l(i,{title:"تصاویر محصول",class:"mb-base"},{default:o(()=>[m("div",we,[l(a,{label:"تصویر شاخص"},{default:o(()=>[l($,{modelValue:s.indicator_id,"onUpdate:modelValue":e[0]||(e[0]=t=>s.indicator_id=t),purpose:"product.indicator",placeholder:"تصویر شاخص"},null,8,["modelValue"])]),_:1}),l(a,{label:"تصویر شاخص موبایل"},{default:o(()=>[l($,{modelValue:s.mobile_pic,"onUpdate:modelValue":e[1]||(e[1]=t=>s.mobile_pic=t),purpose:"product.indicator_mobile",placeholder:"تصویر شاخص موبایل"},null,8,["modelValue"])]),_:1})]),l(a,{label:"گالری تصاویر سایت"},{default:o(()=>[m("div",Ue,[(n(!0),c(b,null,I(U.value,(t,_)=>(n(),c("div",{key:_,class:"image-grid__item"},[l($,{"model-value":t,purpose:"product.gallery",placeholder:"تصویر","onUpdate:modelValue":f=>f?U.value[_]=f:U.value.splice(_,1)},null,8,["model-value","onUpdate:modelValue"])]))),128)),l($,{"model-value":null,purpose:"product.gallery",placeholder:"افزودن تصویر","onUpdate:modelValue":e[2]||(e[2]=t=>t&&U.value.push(t))})])]),_:1}),l(a,{label:"گالری تصاویر موبایل"},{default:o(()=>[m("div",xe,[(n(!0),c(b,null,I(x.value,(t,_)=>(n(),c("div",{key:_,class:"image-grid__item"},[l($,{"model-value":t,purpose:"product.gallery_mobile",placeholder:"تصویر","onUpdate:modelValue":f=>f?x.value[_]=f:x.value.splice(_,1)},null,8,["model-value","onUpdate:modelValue"])]))),128)),l($,{"model-value":null,purpose:"product.gallery_mobile",placeholder:"افزودن تصویر","onUpdate:modelValue":e[3]||(e[3]=t=>t&&x.value.push(t))})])]),_:1})]),_:1}),l(i,{title:"اطلاعات پایه",class:"mb-base"},{default:o(()=>[m("div",Ce,[l(a,{label:"کد محصول"},{default:o(()=>[l(k,{value:s.product_code,"onUpdate:value":e[4]||(e[4]=t=>s.product_code=t)},null,8,["value"])]),_:1}),l(a,{label:"نام محصول","validate-status":w.title?"error":"",help:w.title},{default:o(()=>[l(k,{value:s.title,"onUpdate:value":e[5]||(e[5]=t=>s.title=t)},null,8,["value"])]),_:1},8,["validate-status","help"]),l(a,{label:"نوع نمایش"},{default:o(()=>[l(S,{value:s.show_type,"onUpdate:value":e[6]||(e[6]=t=>s.show_type=t)},{default:o(()=>[l(r,{value:1},{default:o(()=>[...e[22]||(e[22]=[v("سایت",-1)])]),_:1}),l(r,{value:2},{default:o(()=>[...e[23]||(e[23]=[v("گوشی",-1)])]),_:1}),l(r,{value:3},{default:o(()=>[...e[24]||(e[24]=[v("سایت و گوشی",-1)])]),_:1})]),_:1},8,["value"])]),_:1}),l(a,{label:"دسته بندی"},{default:o(()=>[l(S,{value:s.category_id,"onUpdate:value":e[7]||(e[7]=t=>s.category_id=t),"allow-clear":"",placeholder:"انتخاب کنید"},{default:o(()=>[(n(!0),c(b,null,I(T.value,t=>(n(),g(r,{key:t.id,value:t.id},{default:o(()=>[v(M(t.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1}),l(a,{label:"برند"},{default:o(()=>[l(S,{value:s.brand_id,"onUpdate:value":e[8]||(e[8]=t=>s.brand_id=t),"allow-clear":"",placeholder:"انتخاب کنید"},{default:o(()=>[(n(!0),c(b,null,I(L.value,t=>(n(),g(r,{key:t.id,value:t.id},{default:o(()=>[v(M(t.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1}),l(a,{label:"سینی ها"},{default:o(()=>[l(S,{value:s.ciny_ids,"onUpdate:value":e[9]||(e[9]=t=>s.ciny_ids=t),mode:"multiple","allow-clear":"",placeholder:"انتخاب کنید"},{default:o(()=>[(n(!0),c(b,null,I(G.value,t=>(n(),g(r,{key:t.id,value:t.id},{default:o(()=>[v(M(t.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})]),m("div",Ve,[l(a,{label:"شرح محصول (سایت)"},{default:o(()=>[l(ie,{value:s.body_html,"onUpdate:value":e[10]||(e[10]=t=>s.body_html=t),"auto-size":{minRows:4,maxRows:10}},null,8,["value"])]),_:1})]),m("div",Ie,[l(a,{label:"نمایش محصول"},{default:o(()=>[l(D,{checked:s.is_active,"onUpdate:checked":e[11]||(e[11]=t=>s.is_active=t)},null,8,["checked"])]),_:1})])]),_:1}),N("product.list.variants")?(n(),g(i,{key:0,class:"mb-8 overflow-auto"},{title:o(()=>[m("div",$e,[e[26]||(e[26]=m("div",{class:"flex-1"},"تنوع ها",-1)),N("product.list.variants.add")?(n(),g(B,{key:0,type:"primary",onClick:e[12]||(e[12]=t=>J())},{default:o(()=>[...e[25]||(e[25]=[v(" افزودن تنوع ",-1)])]),_:1})):j("",!0)])]),default:o(()=>[l(se,{columns:le,"data-source":C.value,pagination:!1,size:"small","row-key":"__key"},{bodyCell:o(({column:t,record:_,index:f})=>[t.dataIndex==="image"?(n(),c(b,{key:0},[_.image_url?(n(),c("img",{key:0,src:_.image_url,class:"variant-thumb",alt:""},null,8,qe)):(n(),c("span",he,"—"))],64)):t.dataIndex==="op"?(n(),c(b,{key:1},[N("product.list.variants.edit")?(n(),g(Q,{key:0,title:"ویرایش"},{default:o(()=>[l(A(ye),{class:"cursor-pointer mx-1 text-primary",onClick:re=>J(_,f)},null,8,["onClick"])]),_:2},1024)):j("",!0),N("product.list.variants.remove")?(n(),g(Q,{key:1,title:"حذف"},{default:o(()=>[l(A(ge),{class:"cursor-pointer mx-1 text-danger",onClick:re=>C.value.splice(f,1)},null,8,["onClick"])]),_:2},1024)):j("",!0)],64)):t.dataIndex==="is_active"?(n(),g(W,{key:2,color:_.is_active?"green":"red"},{default:o(()=>[v(M(_.is_active?"فعال":"غیر فعال"),1)]),_:2},1032,["color"])):t.dataIndex==="is_pre_order"?(n(),g(W,{key:3,color:_.is_pre_order?"blue":""},{default:o(()=>[v(M(_.is_pre_order?"بله":"خیر"),1)]),_:2},1032,["color"])):j("",!0)]),_:1},8,["data-source"])]),_:1})):j("",!0),m("div",null,[l(B,{type:"primary",class:"mr-4",onClick:K},{default:o(()=>[...e[27]||(e[27]=[v("ثبت اطلاعات",-1)])]),_:1})])]),_:1},8,["spinning"])]),_:1}),l(ue,{open:h.value,"onUpdate:open":e[21]||(e[21]=t=>h.value=t),title:O.value===null?"افزودن تنوع":"ویرایش تنوع"},{footer:o(()=>[l(B,{onClick:e[20]||(e[20]=t=>h.value=!1)},{default:o(()=>[...e[29]||(e[29]=[v("انصراف",-1)])]),_:1}),l(B,{type:"primary",onClick:ae},{default:o(()=>[...e[30]||(e[30]=[v("ثبت",-1)])]),_:1})]),default:o(()=>[l(X,{layout:"vertical"},{default:o(()=>[l(a,{label:"عنوان"},{default:o(()=>[l(k,{value:u.title,"onUpdate:value":e[13]||(e[13]=t=>u.title=t)},null,8,["value"])]),_:1}),l(a,{label:"وزن"},{default:o(()=>[l(E,{value:u.grams,"onUpdate:value":e[14]||(e[14]=t=>u.grams=t),class:"w-full",step:.001},null,8,["value"])]),_:1}),l(a,{label:"اجرت درصدی"},{default:o(()=>[l(E,{value:u.percentage_pay,"onUpdate:value":e[15]||(e[15]=t=>u.percentage_pay=t),class:"w-full",step:.1},null,8,["value"])]),_:1}),l(a,{label:"تعداد"},{default:o(()=>[l(E,{value:u.qty,"onUpdate:value":e[16]||(e[16]=t=>u.qty=t),class:"w-full"},null,8,["value"])]),_:1}),l(a,{label:"تصویر تنوع"},{default:o(()=>[z.value.length?(n(),c("div",Oe,[m("button",{type:"button",class:Y(["variant-picker__item",{"is-on":!u.image_id}]),onClick:e[17]||(e[17]=t=>H(null))},[...e[28]||(e[28]=[m("span",{class:"variant-picker__none"},"بدون تصویر",-1)])],2),(n(!0),c(b,null,I(z.value,t=>(n(),c("button",{key:t.id,type:"button",class:Y(["variant-picker__item",{"is-on":u.image_id===t.id}]),onClick:_=>H(t)},[m("img",{src:t.url,alt:""},null,8,Me)],10,je))),128))])):(n(),g(de,{key:1,type:"info","show-icon":"",message:A(q)?"برای این محصول تصویری ثبت نشده است.":"ابتدا محصول را ذخیره کنید تا بتوانید تصویر تنوع را انتخاب کنید."},null,8,["message"]))]),_:1}),l(a,{label:"فعال"},{default:o(()=>[l(D,{checked:u.is_active,"onUpdate:checked":e[18]||(e[18]=t=>u.is_active=t)},null,8,["checked"])]),_:1}),l(a,{label:" پیش سفارش"},{default:o(()=>[l(D,{checked:u.is_pre_order,"onUpdate:checked":e[19]||(e[19]=t=>u.is_pre_order=t)},null,8,["checked"])]),_:1})]),_:1})]),_:1},8,["open","title"])])}}}),De=be(Ne,[["__scopeId","data-v-d501144a"]]);export{De as default}; diff --git a/apps/admin-panel/dist/assets/AddWorkshop-7T7MIK4o.js b/apps/admin-panel/dist/assets/AddWorkshop-7T7MIK4o.js deleted file mode 100644 index 2725863..0000000 --- a/apps/admin-panel/dist/assets/AddWorkshop-7T7MIK4o.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o}from"./AddWorkshop.vue_vue_type_script_setup_true_lang-BXy9e7qX.js";import"./index-WFQJAeoE.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js";export{o as default}; diff --git a/apps/admin-panel/dist/assets/AddWorkshop-DXNw53cg.js b/apps/admin-panel/dist/assets/AddWorkshop-DXNw53cg.js new file mode 100644 index 0000000..a9bf92d --- /dev/null +++ b/apps/admin-panel/dist/assets/AddWorkshop-DXNw53cg.js @@ -0,0 +1 @@ +import{_ as o}from"./AddWorkshop.vue_vue_type_script_setup_true_lang-DM0hJwHH.js";import"./index-CVG99b4v.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-CWur6xTz.js";export{o as default}; diff --git a/apps/admin-panel/dist/assets/AddWorkshop.vue_vue_type_script_setup_true_lang-BXy9e7qX.js b/apps/admin-panel/dist/assets/AddWorkshop.vue_vue_type_script_setup_true_lang-DM0hJwHH.js similarity index 97% rename from apps/admin-panel/dist/assets/AddWorkshop.vue_vue_type_script_setup_true_lang-BXy9e7qX.js rename to apps/admin-panel/dist/assets/AddWorkshop.vue_vue_type_script_setup_true_lang-DM0hJwHH.js index 858f512..7fe1baf 100644 --- a/apps/admin-panel/dist/assets/AddWorkshop.vue_vue_type_script_setup_true_lang-BXy9e7qX.js +++ b/apps/admin-panel/dist/assets/AddWorkshop.vue_vue_type_script_setup_true_lang-DM0hJwHH.js @@ -1 +1 @@ -import{d as N,v as O,x as v,a as b,w as n,h as g,j as S,l as V,y,r as p,o as U,n as x,c as o,f as A,A as E,z as c,k as T}from"./index-WFQJAeoE.js";import{_ as W}from"./BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js";const q={class:"grid-3"},D={class:"grid-3"},H=N({__name:"AddWorkshop",props:{open:{type:Boolean},id:{}},emits:["update:open","success"],setup(f,{emit:R}){const h=f,w=R,_=h.open!==void 0,B=S(),j=T(),d=_?h.id:B.params.id,i=V(!1),e=y({workshop_name:"",workshop_phone:"",workshop_address:"",user_fname:"",user_lname:"",user_phone:""}),u=y({});async function m(){var t,a;if(Object.keys(u).forEach(l=>delete u[l]),e.workshop_name||(u.workshop_name="لطفا مقدار را وارد کنید"),(e.user_fname||e.user_lname)&&!e.user_phone&&(u.user_phone="موبایل سرپرست کارگاه الزامی است"),!Object.keys(u).length)try{i.value=!0,d?await v.put(`workshop/${d}`,e):await v.post("workshop",e),c.info("اطلاعات با موفقیت به ثبت رسید."),_?(w("success"),w("update:open",!1)):j.push("/workshop/list")}catch(l){c.error(((a=(t=l==null?void 0:l.response)==null?void 0:t.data)==null?void 0:a.message)??"خطا در ثبت اطلاعات.")}finally{i.value=!1}}return O(async()=>{if(d)try{const{data:t}=await v.get(`workshop/${d}`);Object.assign(e,{workshop_name:t.workshop_name??t.name??"",workshop_phone:t.workshop_phone??t.phone??"",workshop_address:t.workshop_address??t.address??"",user_fname:t.user_fname??"",user_lname:t.user_lname??"",user_phone:t.user_phone??""})}catch(t){console.log(t)}}),(t,a)=>{const l=p("a-input"),r=p("a-form-item"),k=p("a-textarea"),C=p("a-button"),$=p("a-card"),z=p("a-form"),M=p("a-spin");return _?(U(),b(W,{key:0,open:!!f.open,id:g(d),"add-title":"افزودن کارگاه","edit-title":"ویرایش کارگاه",loading:i.value,submitting:i.value,width:"lg","onUpdate:open":a[6]||(a[6]=s=>t.$emit("update:open",s)),onSubmit:m},{default:n(()=>[x("div",q,[o(r,{label:"نام کارگاه","validate-status":u.workshop_name?"error":"",help:u.workshop_name},{default:n(()=>[o(l,{value:e.workshop_name,"onUpdate:value":a[0]||(a[0]=s=>e.workshop_name=s)},null,8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"تلفن کارگاه"},{default:n(()=>[o(l,{value:e.workshop_phone,"onUpdate:value":a[1]||(a[1]=s=>e.workshop_phone=s)},null,8,["value"])]),_:1}),o(r,{label:"نام سرپرست کارگاه"},{default:n(()=>[o(l,{value:e.user_fname,"onUpdate:value":a[2]||(a[2]=s=>e.user_fname=s)},null,8,["value"])]),_:1}),o(r,{label:"نام خانوادگی سرپرست کارگاه"},{default:n(()=>[o(l,{value:e.user_lname,"onUpdate:value":a[3]||(a[3]=s=>e.user_lname=s)},null,8,["value"])]),_:1}),o(r,{label:"موبایل سرپرست کارگاه","validate-status":u.user_phone?"error":"",help:u.user_phone},{default:n(()=>[o(l,{value:e.user_phone,"onUpdate:value":a[4]||(a[4]=s=>e.user_phone=s)},null,8,["value"])]),_:1},8,["validate-status","help"])]),o(r,{label:"آدرس"},{default:n(()=>[o(k,{value:e.workshop_address,"onUpdate:value":a[5]||(a[5]=s=>e.workshop_address=s),"auto-size":{minRows:2,maxRows:5}},null,8,["value"])]),_:1})]),_:1},8,["open","id","loading","submitting"])):(U(),b(M,{key:1,spinning:i.value},{default:n(()=>[o(z,{layout:"vertical",onSubmit:E(m,["prevent"])},{default:n(()=>[o($,{title:g(d)?"ویرایش کارگاه":"افزودن کارگاه",class:"mb-base"},{default:n(()=>[x("div",D,[o(r,{label:"نام کارگاه","validate-status":u.workshop_name?"error":"",help:u.workshop_name},{default:n(()=>[o(l,{value:e.workshop_name,"onUpdate:value":a[7]||(a[7]=s=>e.workshop_name=s)},null,8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"تلفن کارگاه"},{default:n(()=>[o(l,{value:e.workshop_phone,"onUpdate:value":a[8]||(a[8]=s=>e.workshop_phone=s)},null,8,["value"])]),_:1}),o(r,{label:"نام سرپرست کارگاه"},{default:n(()=>[o(l,{value:e.user_fname,"onUpdate:value":a[9]||(a[9]=s=>e.user_fname=s)},null,8,["value"])]),_:1}),o(r,{label:"نام خانوادگی سرپرست کارگاه"},{default:n(()=>[o(l,{value:e.user_lname,"onUpdate:value":a[10]||(a[10]=s=>e.user_lname=s)},null,8,["value"])]),_:1}),o(r,{label:"موبایل سرپرست کارگاه","validate-status":u.user_phone?"error":"",help:u.user_phone},{default:n(()=>[o(l,{value:e.user_phone,"onUpdate:value":a[11]||(a[11]=s=>e.user_phone=s)},null,8,["value"])]),_:1},8,["validate-status","help"])]),o(r,{label:"آدرس"},{default:n(()=>[o(k,{value:e.workshop_address,"onUpdate:value":a[12]||(a[12]=s=>e.workshop_address=s),"auto-size":{minRows:2,maxRows:5}},null,8,["value"])]),_:1}),o(C,{type:"primary",onClick:m},{default:n(()=>[...a[13]||(a[13]=[A("ثبت اطلاعات",-1)])]),_:1})]),_:1},8,["title"])]),_:1})]),_:1},8,["spinning"]))}}});export{H as _}; +import{d as N,v as O,x as v,a as b,w as n,h as g,j as S,l as V,y,r as p,o as U,n as x,c as o,f as A,A as E,z as c,k as T}from"./index-CVG99b4v.js";import{_ as W}from"./BaseFormModal.vue_vue_type_script_setup_true_lang-CWur6xTz.js";const q={class:"grid-3"},D={class:"grid-3"},H=N({__name:"AddWorkshop",props:{open:{type:Boolean},id:{}},emits:["update:open","success"],setup(f,{emit:R}){const h=f,w=R,_=h.open!==void 0,B=S(),j=T(),d=_?h.id:B.params.id,i=V(!1),e=y({workshop_name:"",workshop_phone:"",workshop_address:"",user_fname:"",user_lname:"",user_phone:""}),u=y({});async function m(){var t,a;if(Object.keys(u).forEach(l=>delete u[l]),e.workshop_name||(u.workshop_name="لطفا مقدار را وارد کنید"),(e.user_fname||e.user_lname)&&!e.user_phone&&(u.user_phone="موبایل سرپرست کارگاه الزامی است"),!Object.keys(u).length)try{i.value=!0,d?await v.put(`workshop/${d}`,e):await v.post("workshop",e),c.info("اطلاعات با موفقیت به ثبت رسید."),_?(w("success"),w("update:open",!1)):j.push("/workshop/list")}catch(l){c.error(((a=(t=l==null?void 0:l.response)==null?void 0:t.data)==null?void 0:a.message)??"خطا در ثبت اطلاعات.")}finally{i.value=!1}}return O(async()=>{if(d)try{const{data:t}=await v.get(`workshop/${d}`);Object.assign(e,{workshop_name:t.workshop_name??t.name??"",workshop_phone:t.workshop_phone??t.phone??"",workshop_address:t.workshop_address??t.address??"",user_fname:t.user_fname??"",user_lname:t.user_lname??"",user_phone:t.user_phone??""})}catch(t){console.log(t)}}),(t,a)=>{const l=p("a-input"),r=p("a-form-item"),k=p("a-textarea"),C=p("a-button"),$=p("a-card"),z=p("a-form"),M=p("a-spin");return _?(U(),b(W,{key:0,open:!!f.open,id:g(d),"add-title":"افزودن کارگاه","edit-title":"ویرایش کارگاه",loading:i.value,submitting:i.value,width:"lg","onUpdate:open":a[6]||(a[6]=s=>t.$emit("update:open",s)),onSubmit:m},{default:n(()=>[x("div",q,[o(r,{label:"نام کارگاه","validate-status":u.workshop_name?"error":"",help:u.workshop_name},{default:n(()=>[o(l,{value:e.workshop_name,"onUpdate:value":a[0]||(a[0]=s=>e.workshop_name=s)},null,8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"تلفن کارگاه"},{default:n(()=>[o(l,{value:e.workshop_phone,"onUpdate:value":a[1]||(a[1]=s=>e.workshop_phone=s)},null,8,["value"])]),_:1}),o(r,{label:"نام سرپرست کارگاه"},{default:n(()=>[o(l,{value:e.user_fname,"onUpdate:value":a[2]||(a[2]=s=>e.user_fname=s)},null,8,["value"])]),_:1}),o(r,{label:"نام خانوادگی سرپرست کارگاه"},{default:n(()=>[o(l,{value:e.user_lname,"onUpdate:value":a[3]||(a[3]=s=>e.user_lname=s)},null,8,["value"])]),_:1}),o(r,{label:"موبایل سرپرست کارگاه","validate-status":u.user_phone?"error":"",help:u.user_phone},{default:n(()=>[o(l,{value:e.user_phone,"onUpdate:value":a[4]||(a[4]=s=>e.user_phone=s)},null,8,["value"])]),_:1},8,["validate-status","help"])]),o(r,{label:"آدرس"},{default:n(()=>[o(k,{value:e.workshop_address,"onUpdate:value":a[5]||(a[5]=s=>e.workshop_address=s),"auto-size":{minRows:2,maxRows:5}},null,8,["value"])]),_:1})]),_:1},8,["open","id","loading","submitting"])):(U(),b(M,{key:1,spinning:i.value},{default:n(()=>[o(z,{layout:"vertical",onSubmit:E(m,["prevent"])},{default:n(()=>[o($,{title:g(d)?"ویرایش کارگاه":"افزودن کارگاه",class:"mb-base"},{default:n(()=>[x("div",D,[o(r,{label:"نام کارگاه","validate-status":u.workshop_name?"error":"",help:u.workshop_name},{default:n(()=>[o(l,{value:e.workshop_name,"onUpdate:value":a[7]||(a[7]=s=>e.workshop_name=s)},null,8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"تلفن کارگاه"},{default:n(()=>[o(l,{value:e.workshop_phone,"onUpdate:value":a[8]||(a[8]=s=>e.workshop_phone=s)},null,8,["value"])]),_:1}),o(r,{label:"نام سرپرست کارگاه"},{default:n(()=>[o(l,{value:e.user_fname,"onUpdate:value":a[9]||(a[9]=s=>e.user_fname=s)},null,8,["value"])]),_:1}),o(r,{label:"نام خانوادگی سرپرست کارگاه"},{default:n(()=>[o(l,{value:e.user_lname,"onUpdate:value":a[10]||(a[10]=s=>e.user_lname=s)},null,8,["value"])]),_:1}),o(r,{label:"موبایل سرپرست کارگاه","validate-status":u.user_phone?"error":"",help:u.user_phone},{default:n(()=>[o(l,{value:e.user_phone,"onUpdate:value":a[11]||(a[11]=s=>e.user_phone=s)},null,8,["value"])]),_:1},8,["validate-status","help"])]),o(r,{label:"آدرس"},{default:n(()=>[o(k,{value:e.workshop_address,"onUpdate:value":a[12]||(a[12]=s=>e.workshop_address=s),"auto-size":{minRows:2,maxRows:5}},null,8,["value"])]),_:1}),o(C,{type:"primary",onClick:m},{default:n(()=>[...a[13]||(a[13]=[A("ثبت اطلاعات",-1)])]),_:1})]),_:1},8,["title"])]),_:1})]),_:1},8,["spinning"]))}}});export{H as _}; diff --git a/apps/admin-panel/dist/assets/AgentDetail-BUDD3mLE.css b/apps/admin-panel/dist/assets/AgentDetail-BUDD3mLE.css new file mode 100644 index 0000000..760b075 --- /dev/null +++ b/apps/admin-panel/dist/assets/AgentDetail-BUDD3mLE.css @@ -0,0 +1 @@ +.stats[data-v-726ef090]{display:flex;gap:.5rem}.mt-4[data-v-726ef090]{margin-top:1rem} diff --git a/apps/admin-panel/dist/assets/AgentDetail-DVt7uRmy.css b/apps/admin-panel/dist/assets/AgentDetail-DVt7uRmy.css deleted file mode 100644 index 2d9eb25..0000000 --- a/apps/admin-panel/dist/assets/AgentDetail-DVt7uRmy.css +++ /dev/null @@ -1 +0,0 @@ -.stats[data-v-0c792cd8]{display:flex;gap:.5rem}.mt-4[data-v-0c792cd8]{margin-top:1rem} diff --git a/apps/admin-panel/dist/assets/AgentDetail-lIpIMqVa.js b/apps/admin-panel/dist/assets/AgentDetail-tAZA35KU.js similarity index 94% rename from apps/admin-panel/dist/assets/AgentDetail-lIpIMqVa.js rename to apps/admin-panel/dist/assets/AgentDetail-tAZA35KU.js index e7a115b..5240bfe 100644 --- a/apps/admin-panel/dist/assets/AgentDetail-lIpIMqVa.js +++ b/apps/admin-panel/dist/assets/AgentDetail-tAZA35KU.js @@ -1 +1 @@ -import{d as D,v as S,x as A,a as x,w as a,j as F,l as y,r as d,o as i,c as o,f as l,t as s,n as E,b as p,F as f,h as I,i as k}from"./index-WFQJAeoE.js";import{j}from"./filters-C1cWKkpl.js";import{_ as M}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./index-1e_FodC0.js";const R={class:"stats mt-4"},T=D({__name:"AgentDetail",setup($){const h=F().params.id,m=y(!1),n=y(void 0),C=[{title:"نام",dataIndex:"name"},{title:"موبایل",dataIndex:"mobile"},{title:"شهر",dataIndex:"city"},{title:"نوع",dataIndex:"type_str"},{title:"وضعیت",dataIndex:"active"},{title:"تاریخ ثبت",dataIndex:"caj"}],w=[{title:"شماره سفارش",dataIndex:"name"},{title:"مشتری",dataIndex:"customer"},{title:"وزن",dataIndex:"w"},{title:"وضعیت",dataIndex:"status"},{title:"تاریخ",dataIndex:"caj"}];return S(async()=>{try{m.value=!0;const{data:_}=await A.get(`admin/customers-omde/reagent/${h}`);n.value=_}catch(_){console.log(_)}finally{m.value=!1}}),(_,G)=>{const c=d("a-descriptions-item"),u=d("a-tag"),z=d("a-descriptions"),B=d("a-card"),v=d("a-table"),g=d("a-tab-pane"),N=d("a-tabs"),V=d("a-spin");return i(),x(V,{spinning:m.value},{default:a(()=>[o(B,{title:"مشاهده اطلاعات کارشناس فروش"},{default:a(()=>[o(z,{bordered:"",size:"small",column:3},{default:a(()=>[o(c,{label:"نام"},{default:a(()=>{var e;return[l(s(((e=n.value)==null?void 0:e.name)??"-"),1)]}),_:1}),o(c,{label:"موبایل"},{default:a(()=>{var e;return[l(s(((e=n.value)==null?void 0:e.mobile)??"-"),1)]}),_:1}),o(c,{label:"شعبه"},{default:a(()=>{var e,t;return[l(s(((t=(e=n.value)==null?void 0:e.branch)==null?void 0:t.name)??"-"),1)]}),_:1}),o(c,{label:"درصد کمیسیون"},{default:a(()=>{var e;return[l(s(((e=n.value)==null?void 0:e.percent)??"-"),1)]}),_:1}),o(c,{label:"وضعیت"},{default:a(()=>{var e;return[o(u,{color:((e=n.value)==null?void 0:e.active)===1?"green":"red"},{default:a(()=>{var t;return[l(s(((t=n.value)==null?void 0:t.active)===1?"فعال":"غیر فعال"),1)]}),_:1},8,["color"])]}),_:1}),o(c,{label:"میزان فروش (گرم)"},{default:a(()=>{var e;return[l(s(((e=n.value)==null?void 0:e.grams_sell)??0),1)]}),_:1})]),_:1}),E("div",R,[o(u,{color:"blue"},{default:a(()=>{var e,t;return[l("مشتریان معرفی‌شده: "+s(((t=(e=n.value)==null?void 0:e.referred_customers)==null?void 0:t.length)??0),1)]}),_:1}),o(u,{color:"green"},{default:a(()=>{var e,t;return[l("سفارش‌های ثبت‌شده: "+s(((t=(e=n.value)==null?void 0:e.orders)==null?void 0:t.length)??0),1)]}),_:1})])]),_:1}),o(N,{class:"mt-4","default-active-key":"referred"},{default:a(()=>[o(g,{key:"referred",tab:"مشتریان معرفی‌شده"},{default:a(()=>{var e;return[o(v,{size:"small","data-source":(e=n.value)==null?void 0:e.referred_customers,columns:C,pagination:{pageSize:10},"row-key":"id"},{bodyCell:a(({column:t,record:r})=>{var b;return[t.dataIndex==="active"?(i(),x(u,{key:0,color:r.active===1?"green":"red"},{default:a(()=>[l(s(r.active===1?"فعال":"غیر فعال"),1)]),_:2},1032,["color"])):t.dataIndex==="city"?(i(),p(f,{key:1},[l(s(((b=r.city)==null?void 0:b.title)??"-"),1)],64)):t.dataIndex==="caj"?(i(),p(f,{key:2},[l(s(I(j)(r.caj)),1)],64)):k("",!0)]}),_:1},8,["data-source"])]}),_:1}),o(g,{key:"orders",tab:"سفارش‌های مشتریان"},{default:a(()=>{var e;return[o(v,{size:"small","data-source":(e=n.value)==null?void 0:e.orders,columns:w,pagination:{pageSize:10},"row-key":"id"},{bodyCell:a(({column:t,record:r})=>[t.dataIndex==="caj"?(i(),p(f,{key:0},[l(s(I(j)(r.caj)),1)],64)):k("",!0)]),_:1},8,["data-source"])]}),_:1})]),_:1})]),_:1},8,["spinning"])}}}),O=M(T,[["__scopeId","data-v-0c792cd8"]]);export{O as default}; +import{d as D,v as S,x as A,a as x,w as a,j as F,l as y,r as d,o as i,c as o,f as l,t as s,n as E,b as p,F as f,h as I,i as k}from"./index-CVG99b4v.js";import{j}from"./filters-UavLT20t.js";import{_ as M}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./index-pLFqZCCf.js";const R={class:"stats mt-4"},T=D({__name:"AgentDetail",setup($){const h=F().params.id,m=y(!1),n=y(void 0),C=[{title:"نام",dataIndex:"name"},{title:"موبایل",dataIndex:"mobile"},{title:"شهر",dataIndex:"city"},{title:"نوع",dataIndex:"type_str"},{title:"وضعیت",dataIndex:"active"},{title:"تاریخ ثبت",dataIndex:"caj"}],w=[{title:"شماره سفارش",dataIndex:"name"},{title:"مشتری",dataIndex:"customer"},{title:"وزن",dataIndex:"w"},{title:"وضعیت",dataIndex:"status"},{title:"تاریخ",dataIndex:"caj"}];return S(async()=>{try{m.value=!0;const{data:_}=await A.get(`admin/customers-omde/reagent/${h}`);n.value=_}catch(_){console.log(_)}finally{m.value=!1}}),(_,G)=>{const c=d("a-descriptions-item"),u=d("a-tag"),z=d("a-descriptions"),B=d("a-card"),v=d("a-table"),g=d("a-tab-pane"),N=d("a-tabs"),V=d("a-spin");return i(),x(V,{spinning:m.value},{default:a(()=>[o(B,{title:"مشاهده اطلاعات کارشناس فروش"},{default:a(()=>[o(z,{bordered:"",size:"small",column:3},{default:a(()=>[o(c,{label:"نام"},{default:a(()=>{var e;return[l(s(((e=n.value)==null?void 0:e.name)??"-"),1)]}),_:1}),o(c,{label:"موبایل"},{default:a(()=>{var e;return[l(s(((e=n.value)==null?void 0:e.mobile)??"-"),1)]}),_:1}),o(c,{label:"شعبه"},{default:a(()=>{var e,t;return[l(s(((t=(e=n.value)==null?void 0:e.branch)==null?void 0:t.name)??"-"),1)]}),_:1}),o(c,{label:"درصد کمیسیون"},{default:a(()=>{var e;return[l(s(((e=n.value)==null?void 0:e.percent)??"-"),1)]}),_:1}),o(c,{label:"وضعیت"},{default:a(()=>{var e;return[o(u,{color:((e=n.value)==null?void 0:e.active)===1?"green":"red"},{default:a(()=>{var t;return[l(s(((t=n.value)==null?void 0:t.active)===1?"فعال":"غیر فعال"),1)]}),_:1},8,["color"])]}),_:1}),o(c,{label:"میزان فروش (گرم)"},{default:a(()=>{var e;return[l(s(((e=n.value)==null?void 0:e.grams_sell)??0),1)]}),_:1})]),_:1}),E("div",R,[o(u,{color:"blue"},{default:a(()=>{var e,t;return[l("مشتریان معرفی‌شده: "+s(((t=(e=n.value)==null?void 0:e.referred_customers)==null?void 0:t.length)??0),1)]}),_:1}),o(u,{color:"green"},{default:a(()=>{var e,t;return[l("سفارش‌های ثبت‌شده: "+s(((t=(e=n.value)==null?void 0:e.orders)==null?void 0:t.length)??0),1)]}),_:1})])]),_:1}),o(N,{class:"mt-4","default-active-key":"referred"},{default:a(()=>[o(g,{key:"referred",tab:"مشتریان معرفی‌شده"},{default:a(()=>{var e;return[o(v,{size:"small","data-source":(e=n.value)==null?void 0:e.referred_customers,columns:C,pagination:{pageSize:10},"row-key":"id"},{bodyCell:a(({column:t,record:r})=>{var b;return[t.dataIndex==="active"?(i(),x(u,{key:0,color:r.active===1?"green":"red"},{default:a(()=>[l(s(r.active===1?"فعال":"غیر فعال"),1)]),_:2},1032,["color"])):t.dataIndex==="city"?(i(),p(f,{key:1},[l(s(((b=r.city)==null?void 0:b.title)??"-"),1)],64)):t.dataIndex==="caj"?(i(),p(f,{key:2},[l(s(I(j)(r.caj)),1)],64)):k("",!0)]}),_:1},8,["data-source"])]}),_:1}),o(g,{key:"orders",tab:"سفارش‌های مشتریان"},{default:a(()=>{var e;return[o(v,{size:"small","data-source":(e=n.value)==null?void 0:e.orders,columns:w,pagination:{pageSize:10},"row-key":"id"},{bodyCell:a(({column:t,record:r})=>[t.dataIndex==="caj"?(i(),p(f,{key:0},[l(s(I(j)(r.caj)),1)],64)):k("",!0)]),_:1},8,["data-source"])]}),_:1})]),_:1})]),_:1},8,["spinning"])}}}),O=M(T,[["__scopeId","data-v-726ef090"]]);export{O as default}; diff --git a/apps/admin-panel/dist/assets/BankerList-BnXBNYl1.js b/apps/admin-panel/dist/assets/BankerList-BnXBNYl1.js deleted file mode 100644 index 1d3399c..0000000 --- a/apps/admin-panel/dist/assets/BankerList-BnXBNYl1.js +++ /dev/null @@ -1 +0,0 @@ -import{b as r,O as i,_ as m}from"./omdeListModel-B-zNFWRI.js";import{d as a,a as n,h as t,o as s}from"./index-WFQJAeoE.js";import"./model-Di_BQPv1.js";import"./SettingOutlined-DZJd42S-.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ListPageHeader.vue_vue_type_script_setup_true_lang-BmENA4yH.js";import"./bulkCustomer.vue_vue_type_script_setup_true_lang-zBMtv664.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-BQ_i_QZe.js";import"./UnorderedListOutlined-CvD227Uu.js";const C=a({__name:"BankerList",setup(p){const o=i.banker.title,e=r("banker");return(l,_)=>(s(),n(m,{title:t(o),model:t(e)},null,8,["title","model"]))}});export{C as default}; diff --git a/apps/admin-panel/dist/assets/BankerList-JNSfkM07.js b/apps/admin-panel/dist/assets/BankerList-JNSfkM07.js new file mode 100644 index 0000000..69643a1 --- /dev/null +++ b/apps/admin-panel/dist/assets/BankerList-JNSfkM07.js @@ -0,0 +1 @@ +import{b as e,O as i,_ as m}from"./omdeListModel-C6pAmqnF.js";import{d as p,a,h as t,o as n}from"./index-CVG99b4v.js";import"./model-CvqTGmy8.js";import"./filters-UavLT20t.js";import"./index-pLFqZCCf.js";import"./SettingOutlined-D7--Xtqg.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ListPageHeader.vue_vue_type_script_setup_true_lang-CetMN4WH.js";import"./AccountingSyncButton.vue_vue_type_script_setup_true_lang-DYPt-3CU.js";import"./bulkCustomer.vue_vue_type_script_setup_true_lang-BLZHRH0s.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-CWur6xTz.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-C8WW9alD.js";import"./CityTreeSelect.vue_vue_type_script_setup_true_lang-Ctf4a2EQ.js";import"./DateInput-P3xqxLM7.js";import"./UnorderedListOutlined-CKa6XzC7.js";const D=p({__name:"BankerList",setup(s){const o=i.banker.title,r=e("banker");return(l,_)=>(n(),a(m,{title:t(o),model:t(r)},null,8,["title","model"]))}});export{D as default}; diff --git a/apps/admin-panel/dist/assets/BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js b/apps/admin-panel/dist/assets/BaseFormModal.vue_vue_type_script_setup_true_lang-CWur6xTz.js similarity index 87% rename from apps/admin-panel/dist/assets/BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js rename to apps/admin-panel/dist/assets/BaseFormModal.vue_vue_type_script_setup_true_lang-CWur6xTz.js index 83ac36b..34c9044 100644 --- a/apps/admin-panel/dist/assets/BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js +++ b/apps/admin-panel/dist/assets/BaseFormModal.vue_vue_type_script_setup_true_lang-CWur6xTz.js @@ -1 +1 @@ -import{d as r,a as g,w as o,r as a,o as k,c as l,V as x}from"./index-WFQJAeoE.js";const B=r({__name:"BaseFormModal",props:{open:{type:Boolean},id:{default:void 0},addTitle:{},editTitle:{},loading:{type:Boolean,default:!1},submitting:{type:Boolean,default:!1},width:{default:"md"},okText:{default:"ثبت اطلاعات"}},emits:["update:open","submit","cancel"],setup(e,{emit:d}){const n=d,s={sm:520,md:720,lg:900,xl:1140};function m(t){n("update:open",t)}function c(){n("update:open",!1),n("cancel")}return(t,i)=>{const f=a("a-form"),u=a("a-spin"),p=a("a-modal");return k(),g(p,{open:e.open,title:e.id?e.editTitle:e.addTitle,width:s[e.width],"confirm-loading":e.submitting,"ok-text":e.okText,"cancel-text":"انصراف","mask-closable":!1,"onUpdate:open":m,onOk:i[0]||(i[0]=T=>t.$emit("submit")),onCancel:c},{default:o(()=>[l(u,{spinning:e.loading},{default:o(()=>[l(f,{layout:"vertical"},{default:o(()=>[x(t.$slots,"default")]),_:3})]),_:3},8,["spinning"])]),_:3},8,["open","title","width","confirm-loading","ok-text"])}}});export{B as _}; +import{d as r,a as g,w as o,r as a,o as k,c as l,Y as x}from"./index-CVG99b4v.js";const B=r({__name:"BaseFormModal",props:{open:{type:Boolean},id:{default:void 0},addTitle:{},editTitle:{},loading:{type:Boolean,default:!1},submitting:{type:Boolean,default:!1},width:{default:"md"},okText:{default:"ثبت اطلاعات"}},emits:["update:open","submit","cancel"],setup(e,{emit:d}){const n=d,s={sm:520,md:720,lg:900,xl:1140};function m(t){n("update:open",t)}function c(){n("update:open",!1),n("cancel")}return(t,i)=>{const f=a("a-form"),u=a("a-spin"),p=a("a-modal");return k(),g(p,{open:e.open,title:e.id?e.editTitle:e.addTitle,width:s[e.width],"confirm-loading":e.submitting,"ok-text":e.okText,"cancel-text":"انصراف","mask-closable":!1,"onUpdate:open":m,onOk:i[0]||(i[0]=T=>t.$emit("submit")),onCancel:c},{default:o(()=>[l(u,{spinning:e.loading},{default:o(()=>[l(f,{layout:"vertical"},{default:o(()=>[x(t.$slots,"default")]),_:3})]),_:3},8,["spinning"])]),_:3},8,["open","title","width","confirm-loading","ok-text"])}}});export{B as _}; diff --git a/apps/admin-panel/dist/assets/ChangePercent-FCEeo251.js b/apps/admin-panel/dist/assets/ChangePercent-ClFO3rdR.js similarity index 97% rename from apps/admin-panel/dist/assets/ChangePercent-FCEeo251.js rename to apps/admin-panel/dist/assets/ChangePercent-ClFO3rdR.js index b4b4513..36935ae 100644 --- a/apps/admin-panel/dist/assets/ChangePercent-FCEeo251.js +++ b/apps/admin-panel/dist/assets/ChangePercent-ClFO3rdR.js @@ -1 +1 @@ -import{d as P,v as S,x as u,b as m,c as o,w as l,l as _,r as c,y as T,o as d,n as $,F as w,e as C,f as g,z,M as k,a as x,t as B}from"./index-WFQJAeoE.js";const D={id:"page-user-list"},E={class:"grid-3"},A=P({__name:"ChangePercent",setup(j){const y=_([]),b=_([]),p=_("-"),f=_(!1),a=T({category_id:void 0,brand_id:void 0,percent:void 0});function h(t,e){var r,s;return String(((s=(r=e==null?void 0:e.children)==null?void 0:r[0])==null?void 0:s.children)??"").toLowerCase().indexOf(t.toLowerCase())>=0}async function v(){try{const{data:t}=await u.post("change/percent/count",{category_id:a.category_id,brand_id:a.brand_id});p.value=t.count}catch(t){console.log("e ==> ",t)}}async function L(){if(a.percent===void 0||a.percent===null){z.error("لطفا اجرت درصدی را وارد کنید");return}try{f.value=!0;const{data:t}=await u.post("change/all",{percent:a.percent,category_id:a.category_id,brand_id:a.brand_id});k.success({title:"تغییرات با موفقیت اعمال شد",okText:"بستن"}),p.value=t.updated}catch(t){k.success({title:"خطا در اعمال تغییرات"}),console.log(t)}finally{f.value=!1}}return S(async()=>{try{const[t,e]=await Promise.all([u.get("brand"),u.post("category")]);y.value=t.data,b.value=(e.data.rows??e.data).map(r=>({id:r.id,title:r.type_str?`${r.title} (${r.type_str}) `:r.title}))}catch(t){console.log(t)}v()}),(t,e)=>{const r=c("a-select-option"),s=c("a-select"),i=c("a-form-item"),M=c("a-input"),N=c("a-input-number"),U=c("a-button"),V=c("a-popconfirm"),F=c("a-form"),O=c("a-card");return d(),m("div",D,[o(O,{title:"تغییر درصد محصولات"},{default:l(()=>[o(F,{layout:"vertical"},{default:l(()=>[$("div",E,[o(i,{label:"دسته بندی"},{default:l(()=>[o(s,{value:a.category_id,"onUpdate:value":e[0]||(e[0]=n=>a.category_id=n),"allow-clear":"","show-search":"",placeholder:"انتخاب کنید","filter-option":h,onChange:v},{default:l(()=>[(d(!0),m(w,null,C(b.value,n=>(d(),x(r,{key:n.id,value:n.id},{default:l(()=>[g(B(n.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1}),o(i,{label:"برند"},{default:l(()=>[o(s,{value:a.brand_id,"onUpdate:value":e[1]||(e[1]=n=>a.brand_id=n),"allow-clear":"","show-search":"",placeholder:"انتخاب کنید","filter-option":h,onChange:v},{default:l(()=>[(d(!0),m(w,null,C(y.value,n=>(d(),x(r,{key:n.id,value:n.id},{default:l(()=>[g(B(n.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1}),o(i,{label:"تعداد یافت شده"},{default:l(()=>[o(M,{value:p.value,disabled:""},null,8,["value"])]),_:1}),o(i,{label:"اجرت درصدی"},{default:l(()=>[o(N,{value:a.percent,"onUpdate:value":e[2]||(e[2]=n=>a.percent=n),class:"w-full",step:.1},null,8,["value"])]),_:1})]),o(V,{title:"آیا از اعمال تغییرات مطمئن هستید؟","ok-text":"بله","cancel-text":"خیر",onConfirm:L},{default:l(()=>[o(U,{type:"primary",loading:f.value},{default:l(()=>[...e[3]||(e[3]=[g("اعمال تغییرات",-1)])]),_:1},8,["loading"])]),_:1})]),_:1})]),_:1})])}}});export{A as default}; +import{d as P,v as S,x as u,b as m,c as o,w as l,l as _,r as c,y as T,o as d,n as $,F as w,e as C,f as g,z,M as k,a as x,t as B}from"./index-CVG99b4v.js";const D={id:"page-user-list"},E={class:"grid-3"},A=P({__name:"ChangePercent",setup(j){const y=_([]),b=_([]),p=_("-"),f=_(!1),a=T({category_id:void 0,brand_id:void 0,percent:void 0});function h(t,e){var r,s;return String(((s=(r=e==null?void 0:e.children)==null?void 0:r[0])==null?void 0:s.children)??"").toLowerCase().indexOf(t.toLowerCase())>=0}async function v(){try{const{data:t}=await u.post("change/percent/count",{category_id:a.category_id,brand_id:a.brand_id});p.value=t.count}catch(t){console.log("e ==> ",t)}}async function L(){if(a.percent===void 0||a.percent===null){z.error("لطفا اجرت درصدی را وارد کنید");return}try{f.value=!0;const{data:t}=await u.post("change/all",{percent:a.percent,category_id:a.category_id,brand_id:a.brand_id});k.success({title:"تغییرات با موفقیت اعمال شد",okText:"بستن"}),p.value=t.updated}catch(t){k.success({title:"خطا در اعمال تغییرات"}),console.log(t)}finally{f.value=!1}}return S(async()=>{try{const[t,e]=await Promise.all([u.get("brand"),u.post("category")]);y.value=t.data,b.value=(e.data.rows??e.data).map(r=>({id:r.id,title:r.type_str?`${r.title} (${r.type_str}) `:r.title}))}catch(t){console.log(t)}v()}),(t,e)=>{const r=c("a-select-option"),s=c("a-select"),i=c("a-form-item"),M=c("a-input"),N=c("a-input-number"),U=c("a-button"),V=c("a-popconfirm"),F=c("a-form"),O=c("a-card");return d(),m("div",D,[o(O,{title:"تغییر درصد محصولات"},{default:l(()=>[o(F,{layout:"vertical"},{default:l(()=>[$("div",E,[o(i,{label:"دسته بندی"},{default:l(()=>[o(s,{value:a.category_id,"onUpdate:value":e[0]||(e[0]=n=>a.category_id=n),"allow-clear":"","show-search":"",placeholder:"انتخاب کنید","filter-option":h,onChange:v},{default:l(()=>[(d(!0),m(w,null,C(b.value,n=>(d(),x(r,{key:n.id,value:n.id},{default:l(()=>[g(B(n.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1}),o(i,{label:"برند"},{default:l(()=>[o(s,{value:a.brand_id,"onUpdate:value":e[1]||(e[1]=n=>a.brand_id=n),"allow-clear":"","show-search":"",placeholder:"انتخاب کنید","filter-option":h,onChange:v},{default:l(()=>[(d(!0),m(w,null,C(y.value,n=>(d(),x(r,{key:n.id,value:n.id},{default:l(()=>[g(B(n.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1}),o(i,{label:"تعداد یافت شده"},{default:l(()=>[o(M,{value:p.value,disabled:""},null,8,["value"])]),_:1}),o(i,{label:"اجرت درصدی"},{default:l(()=>[o(N,{value:a.percent,"onUpdate:value":e[2]||(e[2]=n=>a.percent=n),class:"w-full",step:.1},null,8,["value"])]),_:1})]),o(V,{title:"آیا از اعمال تغییرات مطمئن هستید؟","ok-text":"بله","cancel-text":"خیر",onConfirm:L},{default:l(()=>[o(U,{type:"primary",loading:f.value},{default:l(()=>[...e[3]||(e[3]=[g("اعمال تغییرات",-1)])]),_:1},8,["loading"])]),_:1})]),_:1})]),_:1})])}}});export{A as default}; diff --git a/apps/admin-panel/dist/assets/CityTreeSelect.vue_vue_type_script_setup_true_lang-Ctf4a2EQ.js b/apps/admin-panel/dist/assets/CityTreeSelect.vue_vue_type_script_setup_true_lang-Ctf4a2EQ.js new file mode 100644 index 0000000..c3d7bb5 --- /dev/null +++ b/apps/admin-panel/dist/assets/CityTreeSelect.vue_vue_type_script_setup_true_lang-Ctf4a2EQ.js @@ -0,0 +1 @@ +import{d as m,o as v,a as g,p as w,r as k}from"./index-CVG99b4v.js";const _=m({__name:"CityTreeSelect",props:{value:{},cities:{},parentPicker:{type:Boolean},excludeId:{},placeholder:{}},emits:["update:value","change"],setup(i,{emit:u}){const n=i,d=u,h=w(()=>{const l=new Set(n.cities.map(e=>e.id)),o=new Map;for(const e of n.cities){const a=e.parent&&l.has(e.parent)&&e.parent!==e.id?e.parent:null;o.has(a)||o.set(a,[]),o.get(a).push(e)}const r=new Set,p=(e,a)=>(o.get(e)??[]).filter(t=>!r.has(t.id)&&!(n.parentPicker&&t.id===n.excludeId)).map(t=>{r.add(t.id);const s=p(t.id,a+1),c={value:t.id,key:t.id,title:t.title};return s.length&&(c.children=s),!n.parentPicker&&a===0&&s.length&&(c.disabled=!0),c});return p(null,0)});function f(l){d("update:value",l??void 0),d("change",l??void 0)}return(l,o)=>{const r=k("a-tree-select");return v(),g(r,{value:i.value??void 0,"tree-data":h.value,"show-search":"","allow-clear":"","tree-default-expand-all":"","tree-node-filter-prop":"title","dropdown-style":{maxHeight:"400px",overflow:"auto"},placeholder:i.placeholder??"شهر را انتخاب کنید",class:"w-full","onUpdate:value":f},null,8,["value","tree-data","placeholder"])}}});export{_}; diff --git a/apps/admin-panel/dist/assets/Comments-BffJJreQ.js b/apps/admin-panel/dist/assets/Comments-BffJJreQ.js deleted file mode 100644 index d03582d..0000000 --- a/apps/admin-panel/dist/assets/Comments-BffJJreQ.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as G}from"./montzar-icon-B0wdL36O.js";import{a as J,b as p,X as K}from"./model-Di_BQPv1.js";import{_ as z}from"./TooltipBtn.vue_vue_type_script_setup_true_lang-CW6ghT15.js";import{u as X,d as Q,b as N,c as m,w as o,r as u,o as i,h as b,n as a,a as d,i as y,f as c,t as w,H as W,z as _,l as S,p as V,x as B}from"./index-WFQJAeoE.js";import{U as Y}from"./icons-CDnlJr4R.js";import{_ as Z}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./SettingOutlined-DZJd42S-.js";import"./UnorderedListOutlined-CvD227Uu.js";import"./TeamOutlined-CQ06mk_Y.js";import"./CreditCardOutlined-Dh4ayM2S.js";function ee(){const x=X(),r=new J("admin/comments/list","لیست دیدگاه ها");return r.add(new p("product_id","شناسه محصول").filterNumber().hidden()),r.add(new p("product.title","نام محصول").filterNumber().renderSlot("productName")),r.add(new p("customer.id","شناسه نویسنده دیدگاه").filterNumber().hidden()),r.add(new p("customer","نام نویسنده ").filterText().renderSlot("customer")),r.add(new p("reply","پاسخ").renderSlot("reply").noSort()),r.add(new p("sts","وضعیت").renderSlot("sts").noSort()),x.roles&&x.roles.includes("comment.state")&&r.add(new p("changeState","تغییر وضعیت").renderSlot("changeState").noSort()),r.add(new p("opt","عملیات").noSort().renderSlot("opt")),r}const te={id:"page-user-list"},oe=["href"],ne=["onClick"],se=["onClick"],le={class:"flex"},ae={key:0,class:"comments-list"},me={class:"comment-item"},ie={class:"img"},re={class:"comment-body"},ue={class:"time"},de={class:"comment-item"},ce={class:"comment-body"},pe={key:0,class:"time"},_e=Q({__name:"Comments",setup(x){const r=X(),v=n=>!!r.hasPermission(n),D=ee(),h=S(null),l=S(void 0),k=S(!1),$=S(""),g=S(""),I=V(()=>{var n;return $.value!==(((n=l.value)==null?void 0:n.comment)??"")}),E=V(()=>{var n,e,s;return g.value!==(((s=(e=(n=l.value)==null?void 0:n.reply)==null?void 0:e[0])==null?void 0:s.comment)??"")});function L(n){var s,f;return`https://bnk.montzar.ir/product/${String(((s=n.product)==null?void 0:s.title)??"").split(" ").join("-")}/${(f=n.product)==null?void 0:f.id}`}async function T(n,e){var s;try{await B.post("comment/sts",{id:n,sts:e}),_.info("تغییرات ثبت شد "),(s=h.value)==null||s.fetch()}catch{_.error("خطا در تغییر وضعیت")}}function O(n){var e,s;l.value=n,$.value=n.comment??"",g.value=((s=(e=n.reply)==null?void 0:e[0])==null?void 0:s.comment)??"",k.value=!0}async function P(n){var e;try{await B.delete(`comment/${n}`),_.info("دیدگاه حذف شد"),(e=h.value)==null||e.fetch()}catch{_.error("خطا در حذف")}}async function H(n){var e;try{await B.post("comment",{product_id:n.product_id,customer_id:n.customer_id,comment:g.value,reply_to:n.id}),_.info("تغییرات ثبت شد "),k.value=!1,(e=h.value)==null||e.fetch()}catch{_.error("خطا در ثبت تغییرات")}}return(n,e)=>{const s=u("a-tag"),f=u("a-menu-item"),M=u("a-menu"),q=u("a-dropdown"),R=u("a-textarea"),U=u("a-form-item"),j=u("a-button"),A=u("a-modal"),F=u("a-card");return i(),N("div",te,[m(F,{title:"لیست دیدگاه ها"},{default:o(()=>[m(K,{ref_key:"tbl",ref:h,model:b(D)},{customer:o(({text:t})=>[c(w(t&&t.fname&&t.lname?`${t.fname} ${t.lname}`:"بدون نام"),1)]),productName:o(({record:t})=>[a("a",{href:L(t),target:"_blank"},w(t.product.title),9,oe)]),sts:o(({text:t})=>[t==1?(i(),d(s,{key:0},{default:o(()=>[...e[6]||(e[6]=[c("در انتظار تایید",-1)])]),_:1})):t==2?(i(),d(s,{key:1,color:"green"},{default:o(()=>[...e[7]||(e[7]=[c("تایید شده",-1)])]),_:1})):(i(),d(s,{key:2,color:"red"},{default:o(()=>[...e[8]||(e[8]=[c("عدم تایید",-1)])]),_:1}))]),reply:o(({text:t})=>[t&&t.length>0&&t[0].comment!==null?(i(),d(s,{key:0,color:"green"},{default:o(()=>[...e[9]||(e[9]=[c(" پاسخ داده شده ",-1)])]),_:1})):(i(),d(s,{key:1},{default:o(()=>[...e[10]||(e[10]=[c("بدون پاسخ",-1)])]),_:1}))]),changeState:o(({record:t})=>[v("comment.state")?(i(),d(q,{key:0},{overlay:o(()=>[m(M,null,{default:o(()=>[m(f,null,{default:o(()=>[a("div",{onClick:C=>t.sts!==2?T(t.id,2):b(_).error("حالت فعلی تایید می باشد")}," تایید ",8,ne)]),_:2},1024),m(f,{class:"red"},{default:o(()=>[a("div",{onClick:C=>t.sts!==3?T(t.id,3):b(_).error("حالت فعلی عدم تایید می باشد")}," عدم تایید ",8,se)]),_:2},1024)]),_:2},1024)]),default:o(()=>[m(s,{style:{cursor:"pointer"},color:t.sts===1?"":t.sts===2?"green":t.sts===3?"red":"",onClick:e[0]||(e[0]=C=>C.preventDefault())},{default:o(()=>[c(w(t.sts===1?"در انتظار تایید":t.sts===2?"تایید":"عدم تایید")+" ",1),m(b(W))]),_:2},1032,["color"])]),_:2},1024)):y("",!0)]),opt:o(({record:t})=>[a("div",le,[v("comment.view")?(i(),d(z,{key:0,"icon-class":"w-5 h-5 text-primary",class:"mr-3",icon:"EyeIcon",title:"مشاهده دیدگاه",onClick:C=>O(t)},null,8,["onClick"])):y("",!0),v("comment.remove")?(i(),d(z,{key:1,"icon-class":"w-5 h-5 text-danger",class:"mr-3",icon:"TrashIcon","pop-title":"دیدگاه حذف شود؟",onClick:C=>P(t.id)},null,8,["onClick"])):y("",!0)])]),_:1},8,["model"]),m(A,{open:k.value,"onUpdate:open":e[5]||(e[5]=t=>k.value=t),title:"مشاهده دیدگاه",width:"80%"},{footer:o(()=>[m(j,{onClick:e[4]||(e[4]=t=>k.value=!1)},{default:o(()=>[...e[14]||(e[14]=[c("بستن",-1)])]),_:1})]),default:o(()=>[l.value?(i(),N("div",ae,[a("ul",null,[a("li",me,[a("span",ie,[m(b(Y),{style:{"font-size":"48px",color:"#1c2d56"}})]),a("div",re,[a("h5",null,w(l.value.customer&&l.value.customer.fname&&l.value.customer.lname?`${l.value.customer.fname} ${l.value.customer.lname}`:"بدون نام"),1),a("span",ue," ارسال شده در تاریخ : "+w(l.value.caj?String(l.value.caj).split("-")[0]:null),1),m(U,{style:{width:"100%"}},{default:o(()=>[m(R,{value:$.value,"onUpdate:value":e[1]||(e[1]=t=>$.value=t),disabled:!v("comment.view.edit"),"auto-size":{minRows:3,maxRows:5}},null,8,["value","disabled"])]),_:1})]),a("ul",null,[a("li",de,[e[13]||(e[13]=a("img",{src:G,alt:"comment author",class:"img border"},null,-1)),a("div",ce,[e[12]||(e[12]=a("h5",null,"ادمین",-1)),l.value.reply&&l.value.reply[0]?(i(),N("span",pe," ارسال شده در تاریخ : "+w(l.value.reply[0].caj?String(l.value.reply[0].caj).split("-")[0]:""),1)):y("",!0),m(U,{style:{width:"100%"}},{default:o(()=>[m(R,{value:g.value,"onUpdate:value":e[2]||(e[2]=t=>g.value=t),disabled:!v("comment.view.edit"),"auto-size":{minRows:3,maxRows:5}},null,8,["value","disabled"])]),_:1}),(E.value||I.value)&&v("comment.view.edit")?(i(),d(j,{key:1,class:"mr-4",onClick:e[3]||(e[3]=t=>H(l.value))},{default:o(()=>[...e[11]||(e[11]=[c(" ثبت تغییرات ",-1)])]),_:1})):y("",!0)])])])])])])):y("",!0)]),_:1},8,["open"])]),_:1})])}}}),$e=Z(_e,[["__scopeId","data-v-6332a204"]]);export{$e as default}; diff --git a/apps/admin-panel/dist/assets/Comments-K8AOw9Zm.js b/apps/admin-panel/dist/assets/Comments-K8AOw9Zm.js new file mode 100644 index 0000000..e1e9e3d --- /dev/null +++ b/apps/admin-panel/dist/assets/Comments-K8AOw9Zm.js @@ -0,0 +1 @@ +import{_ as G}from"./montzar-icon-B0wdL36O.js";import{a as H,b as p,X as J}from"./model-CvqTGmy8.js";import{_ as z}from"./TooltipBtn.vue_vue_type_script_setup_true_lang-DxnpxKjK.js";import{u as X,d as Q,b as N,c as m,w as o,r as u,o as i,h as b,n as a,a as d,i as y,f as c,t as w,K as W,z as _,l as S,p as V,x as B}from"./index-CVG99b4v.js";import{U as Y}from"./icons-BaVxJrpa.js";import{_ as Z}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./filters-UavLT20t.js";import"./index-pLFqZCCf.js";import"./SettingOutlined-D7--Xtqg.js";import"./UnorderedListOutlined-CKa6XzC7.js";import"./TeamOutlined-BEJyrWYB.js";import"./CreditCardOutlined-wQJvlSrP.js";function ee(){const x=X(),r=new H("admin/comments/list","لیست دیدگاه ها");return r.add(new p("product_id","شناسه محصول").filterNumber().hidden()),r.add(new p("product.title","نام محصول").filterNumber().renderSlot("productName")),r.add(new p("customer.id","شناسه نویسنده دیدگاه").filterNumber().hidden()),r.add(new p("customer","نام نویسنده ").filterText().renderSlot("customer")),r.add(new p("reply","پاسخ").renderSlot("reply").noSort()),r.add(new p("sts","وضعیت").renderSlot("sts").noSort()),x.roles&&x.roles.includes("comment.state")&&r.add(new p("changeState","تغییر وضعیت").renderSlot("changeState").noSort()),r.add(new p("opt","عملیات").noSort().renderSlot("opt")),r}const te={id:"page-user-list"},oe=["href"],ne=["onClick"],se=["onClick"],le={class:"flex"},ae={key:0,class:"comments-list"},me={class:"comment-item"},ie={class:"img"},re={class:"comment-body"},ue={class:"time"},de={class:"comment-item"},ce={class:"comment-body"},pe={key:0,class:"time"},_e=Q({__name:"Comments",setup(x){const r=X(),v=n=>!!r.hasPermission(n),D=ee(),h=S(null),l=S(void 0),k=S(!1),$=S(""),g=S(""),I=V(()=>{var n;return $.value!==(((n=l.value)==null?void 0:n.comment)??"")}),E=V(()=>{var n,e,s;return g.value!==(((s=(e=(n=l.value)==null?void 0:n.reply)==null?void 0:e[0])==null?void 0:s.comment)??"")});function L(n){var s,f;return`https://bnk.montzar.ir/product/${String(((s=n.product)==null?void 0:s.title)??"").split(" ").join("-")}/${(f=n.product)==null?void 0:f.id}`}async function T(n,e){var s;try{await B.post("comment/sts",{id:n,sts:e}),_.info("تغییرات ثبت شد "),(s=h.value)==null||s.fetch()}catch{_.error("خطا در تغییر وضعیت")}}function O(n){var e,s;l.value=n,$.value=n.comment??"",g.value=((s=(e=n.reply)==null?void 0:e[0])==null?void 0:s.comment)??"",k.value=!0}async function P(n){var e;try{await B.delete(`comment/${n}`),_.info("دیدگاه حذف شد"),(e=h.value)==null||e.fetch()}catch{_.error("خطا در حذف")}}async function K(n){var e;try{await B.post("comment",{product_id:n.product_id,customer_id:n.customer_id,comment:g.value,reply_to:n.id}),_.info("تغییرات ثبت شد "),k.value=!1,(e=h.value)==null||e.fetch()}catch{_.error("خطا در ثبت تغییرات")}}return(n,e)=>{const s=u("a-tag"),f=u("a-menu-item"),M=u("a-menu"),q=u("a-dropdown"),R=u("a-textarea"),U=u("a-form-item"),j=u("a-button"),A=u("a-modal"),F=u("a-card");return i(),N("div",te,[m(F,{title:"لیست دیدگاه ها"},{default:o(()=>[m(J,{ref_key:"tbl",ref:h,model:b(D)},{customer:o(({text:t})=>[c(w(t&&t.fname&&t.lname?`${t.fname} ${t.lname}`:"بدون نام"),1)]),productName:o(({record:t})=>[a("a",{href:L(t),target:"_blank"},w(t.product.title),9,oe)]),sts:o(({text:t})=>[t==1?(i(),d(s,{key:0},{default:o(()=>[...e[6]||(e[6]=[c("در انتظار تایید",-1)])]),_:1})):t==2?(i(),d(s,{key:1,color:"green"},{default:o(()=>[...e[7]||(e[7]=[c("تایید شده",-1)])]),_:1})):(i(),d(s,{key:2,color:"red"},{default:o(()=>[...e[8]||(e[8]=[c("عدم تایید",-1)])]),_:1}))]),reply:o(({text:t})=>[t&&t.length>0&&t[0].comment!==null?(i(),d(s,{key:0,color:"green"},{default:o(()=>[...e[9]||(e[9]=[c(" پاسخ داده شده ",-1)])]),_:1})):(i(),d(s,{key:1},{default:o(()=>[...e[10]||(e[10]=[c("بدون پاسخ",-1)])]),_:1}))]),changeState:o(({record:t})=>[v("comment.state")?(i(),d(q,{key:0},{overlay:o(()=>[m(M,null,{default:o(()=>[m(f,null,{default:o(()=>[a("div",{onClick:C=>t.sts!==2?T(t.id,2):b(_).error("حالت فعلی تایید می باشد")}," تایید ",8,ne)]),_:2},1024),m(f,{class:"red"},{default:o(()=>[a("div",{onClick:C=>t.sts!==3?T(t.id,3):b(_).error("حالت فعلی عدم تایید می باشد")}," عدم تایید ",8,se)]),_:2},1024)]),_:2},1024)]),default:o(()=>[m(s,{style:{cursor:"pointer"},color:t.sts===1?"":t.sts===2?"green":t.sts===3?"red":"",onClick:e[0]||(e[0]=C=>C.preventDefault())},{default:o(()=>[c(w(t.sts===1?"در انتظار تایید":t.sts===2?"تایید":"عدم تایید")+" ",1),m(b(W))]),_:2},1032,["color"])]),_:2},1024)):y("",!0)]),opt:o(({record:t})=>[a("div",le,[v("comment.view")?(i(),d(z,{key:0,"icon-class":"w-5 h-5 text-primary",class:"mr-3",icon:"EyeIcon",title:"مشاهده دیدگاه",onClick:C=>O(t)},null,8,["onClick"])):y("",!0),v("comment.remove")?(i(),d(z,{key:1,"icon-class":"w-5 h-5 text-danger",class:"mr-3",icon:"TrashIcon","pop-title":"دیدگاه حذف شود؟",onClick:C=>P(t.id)},null,8,["onClick"])):y("",!0)])]),_:1},8,["model"]),m(A,{open:k.value,"onUpdate:open":e[5]||(e[5]=t=>k.value=t),title:"مشاهده دیدگاه",width:"80%"},{footer:o(()=>[m(j,{onClick:e[4]||(e[4]=t=>k.value=!1)},{default:o(()=>[...e[14]||(e[14]=[c("بستن",-1)])]),_:1})]),default:o(()=>[l.value?(i(),N("div",ae,[a("ul",null,[a("li",me,[a("span",ie,[m(b(Y),{style:{"font-size":"48px",color:"#1c2d56"}})]),a("div",re,[a("h5",null,w(l.value.customer&&l.value.customer.fname&&l.value.customer.lname?`${l.value.customer.fname} ${l.value.customer.lname}`:"بدون نام"),1),a("span",ue," ارسال شده در تاریخ : "+w(l.value.caj?String(l.value.caj).split("-")[0]:null),1),m(U,{style:{width:"100%"}},{default:o(()=>[m(R,{value:$.value,"onUpdate:value":e[1]||(e[1]=t=>$.value=t),disabled:!v("comment.view.edit"),"auto-size":{minRows:3,maxRows:5}},null,8,["value","disabled"])]),_:1})]),a("ul",null,[a("li",de,[e[13]||(e[13]=a("img",{src:G,alt:"comment author",class:"img border"},null,-1)),a("div",ce,[e[12]||(e[12]=a("h5",null,"ادمین",-1)),l.value.reply&&l.value.reply[0]?(i(),N("span",pe," ارسال شده در تاریخ : "+w(l.value.reply[0].caj?String(l.value.reply[0].caj).split("-")[0]:""),1)):y("",!0),m(U,{style:{width:"100%"}},{default:o(()=>[m(R,{value:g.value,"onUpdate:value":e[2]||(e[2]=t=>g.value=t),disabled:!v("comment.view.edit"),"auto-size":{minRows:3,maxRows:5}},null,8,["value","disabled"])]),_:1}),(E.value||I.value)&&v("comment.view.edit")?(i(),d(j,{key:1,class:"mr-4",onClick:e[3]||(e[3]=t=>K(l.value))},{default:o(()=>[...e[11]||(e[11]=[c(" ثبت تغییرات ",-1)])]),_:1})):y("",!0)])])])])])])):y("",!0)]),_:1},8,["open"])]),_:1})])}}}),Ne=Z(_e,[["__scopeId","data-v-6332a204"]]);export{Ne as default}; diff --git a/apps/admin-panel/dist/assets/Const-CBeA4T-E.js b/apps/admin-panel/dist/assets/Const-Co5Bcsua.js similarity index 97% rename from apps/admin-panel/dist/assets/Const-CBeA4T-E.js rename to apps/admin-panel/dist/assets/Const-Co5Bcsua.js index 51873e5..3133bcf 100644 --- a/apps/admin-panel/dist/assets/Const-CBeA4T-E.js +++ b/apps/admin-panel/dist/assets/Const-Co5Bcsua.js @@ -1 +1 @@ -import{d as ve,u as me,v as fe,x as p,a as f,w as s,i as v,l as i,r as c,o,c as n,n as C,f as _,b as B,h,E as J,D as K,F as T,e as Q,t as N,z as d}from"./index-WFQJAeoE.js";import{u as _e}from"./useDeleteHandler-AErXCFBG.js";import{_ as ye}from"./ImageUploadInput.vue_vue_type_script_setup_true_lang-BQ_i_QZe.js";import{_ as ge}from"./_plugin-vue_export-helper-DlAUqK2U.js";const ke={class:"row"},Ce={class:"row"},be={class:"mt-4 tags"},we={class:"mobile-c"},xe={class:"row"},Be={class:"row mt-4"},Ee={class:"row"},Ie=ve({__name:"Const",setup($e){const R=me(),y=t=>!!R.hasPermission(t),A=i(!1),S=i([]),b=i(""),E=i(!1),I=i(""),z=i(void 0),W=[{title:"عنوان",dataIndex:"title"},{title:"عملیات",dataIndex:"op"}],g=i([]),$=i(""),w=i([]),O=i([]),k=i(""),x=i(!1),D=i(void 0),X=[{title:"عنوان",dataIndex:"title"},{title:"عملیات",dataIndex:"op"}];async function U(){const{data:t}=await p.get("brand");S.value=t}async function F(){var t,e;if(b.value.trim())try{await p.post("brand/create",{title:b.value.trim()}),b.value="",await U(),d.success("برند اضافه شد")}catch(a){d.error(((e=(t=a==null?void 0:a.response)==null?void 0:t.data)==null?void 0:e.message)??"خطا در افزودن برند")}}function Y(t){z.value=t.id,I.value=t.title,E.value=!0}async function Z(){var t,e;try{await p.put(`brand/${z.value}`,{title:I.value}),E.value=!1,await U(),d.success("تغییرات ثبت شد")}catch(a){d.error(((e=(t=a==null?void 0:a.response)==null?void 0:t.data)==null?void 0:e.message)??"خطا در ویرایش")}}const{remove:ee}=_e({onSuccess:U,successMessage:"برند حذف شد",fallbackErrorMessage:"خطا در حذف برند"});function te(t){return ee(`brand/${t}`)}function H(){const t=$.value.trim();t&&(g.value.includes(t)||g.value.push(t),$.value="")}function ae(t){g.value.splice(t,1)}async function ne(){var t,e;try{await p.put("const/__list__tags",{val:g.value}),d.success("برچسب ها ذخیره شد")}catch(a){d.error(((e=(t=a==null?void 0:a.response)==null?void 0:t.data)==null?void 0:e.message)??"خطا در ذخیره")}}async function se(){var t,e;try{await p.put("const/slider",{val:w.value}),d.success("اسلایدر ذخیره شد")}catch(a){d.error(((e=(t=a==null?void 0:a.response)==null?void 0:t.data)==null?void 0:e.message)??"خطا در ذخیره")}}async function M(){const{data:t}=await p.post("ciny",{page:1,limit:200});O.value=t.rows??t}async function L(){var t,e;if(k.value.trim())try{x.value?await p.put(`ciny/${D.value}`,{title:k.value.trim()}):await p.post("ciny/create",{title:k.value.trim()}),j(),await M(),d.success("عملیات انجام شد")}catch(a){d.error(((e=(t=a==null?void 0:a.response)==null?void 0:t.data)==null?void 0:e.message)??"خطا")}}function le(t){x.value=!0,D.value=t.id,k.value=t.title}function j(){x.value=!1,D.value=void 0,k.value=""}async function oe(t){var e,a;try{await p.delete(`ciny/${t}`),await M(),d.success("حذف شد")}catch(r){d.error(((a=(e=r==null?void 0:r.response)==null?void 0:e.data)==null?void 0:a.message)??"خطا در حذف")}}return fe(async()=>{try{A.value=!0,await Promise.all([U(),M()]);const[t,e]=await Promise.all([p.get("const/__list__tags"),y("custom.config.statics.slider")?p.get("const/slider"):Promise.resolve(null)]);g.value=Array.isArray(t.data)?t.data:[],w.value=Array.isArray(e==null?void 0:e.data)?e.data:[]}catch(t){console.log(t)}finally{A.value=!1}}),(t,e)=>{const a=c("a-input"),r=c("a-button"),V=c("a-tooltip"),q=c("a-popconfirm"),G=c("a-table"),P=c("a-tab-pane"),ie=c("a-tag"),re=c("a-empty"),ue=c("a-tabs"),ce=c("a-spin"),de=c("a-modal"),pe=c("a-card");return y("config.statics")?(o(),f(pe,{key:0,title:"مدیریت ثابت ها"},{default:s(()=>[n(ce,{spinning:A.value},{default:s(()=>[n(ue,null,{default:s(()=>[n(P,{key:"brands",tab:"برند ها"},{default:s(()=>[C("div",ke,[n(a,{value:b.value,"onUpdate:value":e[0]||(e[0]=l=>b.value=l),placeholder:"نام برند",style:{"max-width":"260px"},onPressEnter:F},null,8,["value"]),y("config.statics.brand.create")?(o(),f(r,{key:0,type:"primary",onClick:F},{default:s(()=>[...e[6]||(e[6]=[_(" افزودن ",-1)])]),_:1})):v("",!0)]),n(G,{class:"mt-4",size:"small","data-source":S.value,columns:W,pagination:!1,"row-key":"id"},{bodyCell:s(({column:l,record:u})=>[l.dataIndex==="op"?(o(),B(T,{key:0},[y("config.statics.brand.edit")?(o(),f(V,{key:0,title:"ویرایش"},{default:s(()=>[n(h(J),{class:"cursor-pointer mx-1 text-primary",onClick:m=>Y(u)},null,8,["onClick"])]),_:2},1024)):v("",!0),y("config.statics.brand.remove")?(o(),f(V,{key:1,title:"حذف"},{default:s(()=>[n(q,{"ok-text":"بله","cancel-text":"خیر",title:"آیا مطمئن هستید؟",onConfirm:m=>te(u.id)},{default:s(()=>[n(h(K),{class:"cursor-pointer mx-1 text-danger"})]),_:1},8,["onConfirm"])]),_:2},1024)):v("",!0)],64)):v("",!0)]),_:1},8,["data-source"])]),_:1}),n(P,{key:"tags",tab:"برچسب ها"},{default:s(()=>[C("div",Ce,[n(a,{value:$.value,"onUpdate:value":e[1]||(e[1]=l=>$.value=l),placeholder:"برچسب",style:{"max-width":"260px"},onPressEnter:H},null,8,["value"]),y("config.statics.tags.create")?(o(),f(r,{key:0,type:"primary",onClick:H},{default:s(()=>[...e[7]||(e[7]=[_(" افزودن ",-1)])]),_:1})):v("",!0)]),C("div",be,[(o(!0),B(T,null,Q(g.value,(l,u)=>(o(),f(ie,{key:u,closable:y("config.statics.tags.remove"),onClose:m=>ae(u)},{default:s(()=>[_(N(l),1)]),_:2},1032,["closable","onClose"]))),128)),g.value.length===0?(o(),f(re,{key:0,description:"برچسبی ثبت نشده است"})):v("",!0)]),n(r,{class:"mt-4",type:"primary",onClick:ne},{default:s(()=>[...e[8]||(e[8]=[_("ذخیره برچسب ها",-1)])]),_:1})]),_:1}),y("custom.config.statics.slider")?(o(),f(P,{key:"slider",tab:"اسلایدر موبایل"},{default:s(()=>[(o(!0),B(T,null,Q(w.value,(l,u)=>(o(),B("div",{key:u,class:"slide"},[C("h6",we,"اسلاید "+N(u+1),1),C("div",xe,[n(ye,{modelValue:l.image,"onUpdate:modelValue":m=>l.image=m,purpose:"slider",placeholder:"تصویر اسلاید"},null,8,["modelValue","onUpdate:modelValue"]),n(a,{value:l.link,"onUpdate:value":m=>l.link=m,placeholder:"لینک"},null,8,["value","onUpdate:value"]),n(r,{danger:"",onClick:m=>w.value.splice(u,1)},{default:s(()=>[...e[9]||(e[9]=[_("حذف",-1)])]),_:1},8,["onClick"])])]))),128)),C("div",Be,[n(r,{onClick:e[2]||(e[2]=l=>w.value.push({image:"",link:""}))},{default:s(()=>[...e[10]||(e[10]=[_("افزودن اسلاید",-1)])]),_:1}),n(r,{type:"primary",onClick:se},{default:s(()=>[...e[11]||(e[11]=[_("ذخیره اسلایدر",-1)])]),_:1})])]),_:1})):v("",!0),n(P,{key:"collections",tab:"سینی ها"},{default:s(()=>[C("div",Ee,[n(a,{value:k.value,"onUpdate:value":e[3]||(e[3]=l=>k.value=l),placeholder:"نام سینی",style:{"max-width":"260px"},onPressEnter:L},null,8,["value"]),n(r,{type:"primary",onClick:L},{default:s(()=>[_(N(x.value?"ویرایش":"ثبت")+" سینی ",1)]),_:1}),x.value?(o(),f(r,{key:0,onClick:j},{default:s(()=>[...e[12]||(e[12]=[_("انصراف",-1)])]),_:1})):v("",!0)]),n(G,{class:"mt-4",size:"small","data-source":O.value,columns:X,pagination:!1,"row-key":"id"},{bodyCell:s(({column:l,record:u})=>[l.dataIndex==="op"?(o(),B(T,{key:0},[n(V,{title:"ویرایش"},{default:s(()=>[n(h(J),{class:"cursor-pointer mx-1 text-primary",onClick:m=>le(u)},null,8,["onClick"])]),_:2},1024),n(V,{title:"حذف"},{default:s(()=>[n(q,{"ok-text":"بله","cancel-text":"خیر",title:"آیا مطمئن هستید؟",onConfirm:m=>oe(u.id)},{default:s(()=>[n(h(K),{class:"cursor-pointer mx-1 text-danger"})]),_:1},8,["onConfirm"])]),_:2},1024)],64)):v("",!0)]),_:1},8,["data-source"])]),_:1})]),_:1})]),_:1},8,["spinning"]),n(de,{open:E.value,"onUpdate:open":e[5]||(e[5]=l=>E.value=l),title:"ویرایش برند",onOk:Z},{default:s(()=>[n(a,{value:I.value,"onUpdate:value":e[4]||(e[4]=l=>I.value=l)},null,8,["value"])]),_:1},8,["open"])]),_:1})):v("",!0)}}}),Te=ge(Ie,[["__scopeId","data-v-580880e4"]]);export{Te as default}; +import{d as ve,u as me,v as fe,x as p,a as f,w as s,i as v,l as i,r as c,o,c as n,n as C,f as _,b as B,h,E as J,D as K,F as T,e as Q,t as N,z as d}from"./index-CVG99b4v.js";import{u as _e}from"./useDeleteHandler-D7PJ3wUb.js";import{_ as ye}from"./ImageUploadInput.vue_vue_type_script_setup_true_lang-C8WW9alD.js";import{_ as ge}from"./_plugin-vue_export-helper-DlAUqK2U.js";const ke={class:"row"},Ce={class:"row"},be={class:"mt-4 tags"},we={class:"mobile-c"},xe={class:"row"},Be={class:"row mt-4"},Ee={class:"row"},Ie=ve({__name:"Const",setup($e){const R=me(),y=t=>!!R.hasPermission(t),A=i(!1),S=i([]),b=i(""),E=i(!1),I=i(""),z=i(void 0),W=[{title:"عنوان",dataIndex:"title"},{title:"عملیات",dataIndex:"op"}],g=i([]),$=i(""),w=i([]),O=i([]),k=i(""),x=i(!1),D=i(void 0),X=[{title:"عنوان",dataIndex:"title"},{title:"عملیات",dataIndex:"op"}];async function U(){const{data:t}=await p.get("brand");S.value=t}async function F(){var t,e;if(b.value.trim())try{await p.post("brand/create",{title:b.value.trim()}),b.value="",await U(),d.success("برند اضافه شد")}catch(a){d.error(((e=(t=a==null?void 0:a.response)==null?void 0:t.data)==null?void 0:e.message)??"خطا در افزودن برند")}}function Y(t){z.value=t.id,I.value=t.title,E.value=!0}async function Z(){var t,e;try{await p.put(`brand/${z.value}`,{title:I.value}),E.value=!1,await U(),d.success("تغییرات ثبت شد")}catch(a){d.error(((e=(t=a==null?void 0:a.response)==null?void 0:t.data)==null?void 0:e.message)??"خطا در ویرایش")}}const{remove:ee}=_e({onSuccess:U,successMessage:"برند حذف شد",fallbackErrorMessage:"خطا در حذف برند"});function te(t){return ee(`brand/${t}`)}function H(){const t=$.value.trim();t&&(g.value.includes(t)||g.value.push(t),$.value="")}function ae(t){g.value.splice(t,1)}async function ne(){var t,e;try{await p.put("const/__list__tags",{val:g.value}),d.success("برچسب ها ذخیره شد")}catch(a){d.error(((e=(t=a==null?void 0:a.response)==null?void 0:t.data)==null?void 0:e.message)??"خطا در ذخیره")}}async function se(){var t,e;try{await p.put("const/slider",{val:w.value}),d.success("اسلایدر ذخیره شد")}catch(a){d.error(((e=(t=a==null?void 0:a.response)==null?void 0:t.data)==null?void 0:e.message)??"خطا در ذخیره")}}async function M(){const{data:t}=await p.post("ciny",{page:1,limit:200});O.value=t.rows??t}async function L(){var t,e;if(k.value.trim())try{x.value?await p.put(`ciny/${D.value}`,{title:k.value.trim()}):await p.post("ciny/create",{title:k.value.trim()}),j(),await M(),d.success("عملیات انجام شد")}catch(a){d.error(((e=(t=a==null?void 0:a.response)==null?void 0:t.data)==null?void 0:e.message)??"خطا")}}function le(t){x.value=!0,D.value=t.id,k.value=t.title}function j(){x.value=!1,D.value=void 0,k.value=""}async function oe(t){var e,a;try{await p.delete(`ciny/${t}`),await M(),d.success("حذف شد")}catch(r){d.error(((a=(e=r==null?void 0:r.response)==null?void 0:e.data)==null?void 0:a.message)??"خطا در حذف")}}return fe(async()=>{try{A.value=!0,await Promise.all([U(),M()]);const[t,e]=await Promise.all([p.get("const/__list__tags"),y("custom.config.statics.slider")?p.get("const/slider"):Promise.resolve(null)]);g.value=Array.isArray(t.data)?t.data:[],w.value=Array.isArray(e==null?void 0:e.data)?e.data:[]}catch(t){console.log(t)}finally{A.value=!1}}),(t,e)=>{const a=c("a-input"),r=c("a-button"),V=c("a-tooltip"),q=c("a-popconfirm"),G=c("a-table"),P=c("a-tab-pane"),ie=c("a-tag"),re=c("a-empty"),ue=c("a-tabs"),ce=c("a-spin"),de=c("a-modal"),pe=c("a-card");return y("config.statics")?(o(),f(pe,{key:0,title:"مدیریت ثابت ها"},{default:s(()=>[n(ce,{spinning:A.value},{default:s(()=>[n(ue,null,{default:s(()=>[n(P,{key:"brands",tab:"برند ها"},{default:s(()=>[C("div",ke,[n(a,{value:b.value,"onUpdate:value":e[0]||(e[0]=l=>b.value=l),placeholder:"نام برند",style:{"max-width":"260px"},onPressEnter:F},null,8,["value"]),y("config.statics.brand.create")?(o(),f(r,{key:0,type:"primary",onClick:F},{default:s(()=>[...e[6]||(e[6]=[_(" افزودن ",-1)])]),_:1})):v("",!0)]),n(G,{class:"mt-4",size:"small","data-source":S.value,columns:W,pagination:!1,"row-key":"id"},{bodyCell:s(({column:l,record:u})=>[l.dataIndex==="op"?(o(),B(T,{key:0},[y("config.statics.brand.edit")?(o(),f(V,{key:0,title:"ویرایش"},{default:s(()=>[n(h(J),{class:"cursor-pointer mx-1 text-primary",onClick:m=>Y(u)},null,8,["onClick"])]),_:2},1024)):v("",!0),y("config.statics.brand.remove")?(o(),f(V,{key:1,title:"حذف"},{default:s(()=>[n(q,{"ok-text":"بله","cancel-text":"خیر",title:"آیا مطمئن هستید؟",onConfirm:m=>te(u.id)},{default:s(()=>[n(h(K),{class:"cursor-pointer mx-1 text-danger"})]),_:1},8,["onConfirm"])]),_:2},1024)):v("",!0)],64)):v("",!0)]),_:1},8,["data-source"])]),_:1}),n(P,{key:"tags",tab:"برچسب ها"},{default:s(()=>[C("div",Ce,[n(a,{value:$.value,"onUpdate:value":e[1]||(e[1]=l=>$.value=l),placeholder:"برچسب",style:{"max-width":"260px"},onPressEnter:H},null,8,["value"]),y("config.statics.tags.create")?(o(),f(r,{key:0,type:"primary",onClick:H},{default:s(()=>[...e[7]||(e[7]=[_(" افزودن ",-1)])]),_:1})):v("",!0)]),C("div",be,[(o(!0),B(T,null,Q(g.value,(l,u)=>(o(),f(ie,{key:u,closable:y("config.statics.tags.remove"),onClose:m=>ae(u)},{default:s(()=>[_(N(l),1)]),_:2},1032,["closable","onClose"]))),128)),g.value.length===0?(o(),f(re,{key:0,description:"برچسبی ثبت نشده است"})):v("",!0)]),n(r,{class:"mt-4",type:"primary",onClick:ne},{default:s(()=>[...e[8]||(e[8]=[_("ذخیره برچسب ها",-1)])]),_:1})]),_:1}),y("custom.config.statics.slider")?(o(),f(P,{key:"slider",tab:"اسلایدر موبایل"},{default:s(()=>[(o(!0),B(T,null,Q(w.value,(l,u)=>(o(),B("div",{key:u,class:"slide"},[C("h6",we,"اسلاید "+N(u+1),1),C("div",xe,[n(ye,{modelValue:l.image,"onUpdate:modelValue":m=>l.image=m,purpose:"slider",placeholder:"تصویر اسلاید"},null,8,["modelValue","onUpdate:modelValue"]),n(a,{value:l.link,"onUpdate:value":m=>l.link=m,placeholder:"لینک"},null,8,["value","onUpdate:value"]),n(r,{danger:"",onClick:m=>w.value.splice(u,1)},{default:s(()=>[...e[9]||(e[9]=[_("حذف",-1)])]),_:1},8,["onClick"])])]))),128)),C("div",Be,[n(r,{onClick:e[2]||(e[2]=l=>w.value.push({image:"",link:""}))},{default:s(()=>[...e[10]||(e[10]=[_("افزودن اسلاید",-1)])]),_:1}),n(r,{type:"primary",onClick:se},{default:s(()=>[...e[11]||(e[11]=[_("ذخیره اسلایدر",-1)])]),_:1})])]),_:1})):v("",!0),n(P,{key:"collections",tab:"سینی ها"},{default:s(()=>[C("div",Ee,[n(a,{value:k.value,"onUpdate:value":e[3]||(e[3]=l=>k.value=l),placeholder:"نام سینی",style:{"max-width":"260px"},onPressEnter:L},null,8,["value"]),n(r,{type:"primary",onClick:L},{default:s(()=>[_(N(x.value?"ویرایش":"ثبت")+" سینی ",1)]),_:1}),x.value?(o(),f(r,{key:0,onClick:j},{default:s(()=>[...e[12]||(e[12]=[_("انصراف",-1)])]),_:1})):v("",!0)]),n(G,{class:"mt-4",size:"small","data-source":O.value,columns:X,pagination:!1,"row-key":"id"},{bodyCell:s(({column:l,record:u})=>[l.dataIndex==="op"?(o(),B(T,{key:0},[n(V,{title:"ویرایش"},{default:s(()=>[n(h(J),{class:"cursor-pointer mx-1 text-primary",onClick:m=>le(u)},null,8,["onClick"])]),_:2},1024),n(V,{title:"حذف"},{default:s(()=>[n(q,{"ok-text":"بله","cancel-text":"خیر",title:"آیا مطمئن هستید؟",onConfirm:m=>oe(u.id)},{default:s(()=>[n(h(K),{class:"cursor-pointer mx-1 text-danger"})]),_:1},8,["onConfirm"])]),_:2},1024)],64)):v("",!0)]),_:1},8,["data-source"])]),_:1})]),_:1})]),_:1},8,["spinning"]),n(de,{open:E.value,"onUpdate:open":e[5]||(e[5]=l=>E.value=l),title:"ویرایش برند",onOk:Z},{default:s(()=>[n(a,{value:I.value,"onUpdate:value":e[4]||(e[4]=l=>I.value=l)},null,8,["value"])]),_:1},8,["open"])]),_:1})):v("",!0)}}}),Te=ge(Ie,[["__scopeId","data-v-580880e4"]]);export{Te as default}; diff --git a/apps/admin-panel/dist/assets/CreditCardOutlined-Dh4ayM2S.js b/apps/admin-panel/dist/assets/CreditCardOutlined-wQJvlSrP.js similarity index 93% rename from apps/admin-panel/dist/assets/CreditCardOutlined-Dh4ayM2S.js rename to apps/admin-panel/dist/assets/CreditCardOutlined-wQJvlSrP.js index b76fb04..e2b8eb2 100644 --- a/apps/admin-panel/dist/assets/CreditCardOutlined-Dh4ayM2S.js +++ b/apps/admin-panel/dist/assets/CreditCardOutlined-wQJvlSrP.js @@ -1 +1 @@ -import{c as u,I as l}from"./index-WFQJAeoE.js";var d={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-792 72h752v120H136V232zm752 560H136V440h752v352zm-237-64h165c4.4 0 8-3.6 8-8v-72c0-4.4-3.6-8-8-8H651c-4.4 0-8 3.6-8 8v72c0 4.4 3.6 8 8 8z"}}]},name:"credit-card",theme:"outlined"};function c(r){for(var t=1;t{try{C.value=!0;const[I,A,s,u]=await Promise.all([f.get(`customer/${_}`),f.get(`major/dashboard/${_}`).catch(()=>({data:void 0})),f.get(`admin/customers-omde/${_}/orders`).catch(()=>({data:[]})),f.get(`admin/customers-omde/${_}/documents`).catch(()=>({data:[]}))]);if(n.value=I.data,y.value=A.data,$.value=s.data,B.value=u.data,z.showWallet){const b=await f.get(`admin/customers-omde/${_}/wallet`).catch(()=>({data:[]}));S.value=b.data}if(z.showActivity){const b=await f.get(`log/ago/${_}`).catch(()=>({data:[]}));T.value=b.data}}catch(I){console.log(I)}finally{C.value=!1}}),(I,A)=>{const s=i("a-descriptions-item"),u=i("a-tag"),b=i("a-descriptions"),F=i("a-card"),w=i("a-table"),k=i("a-tab-pane"),E=i("a-tabs"),M=i("a-spin");return c(),h(M,{spinning:C.value},{default:e(()=>[t(F,{title:p.title},{default:e(()=>[t(b,{bordered:"",size:"small",column:3},{default:e(()=>[t(s,{label:"نام"},{default:e(()=>{var a;return[o(d(((a=n.value)==null?void 0:a.name)??"-"),1)]}),_:1}),t(s,{label:"موبایل"},{default:e(()=>{var a;return[o(d(((a=n.value)==null?void 0:a.mobile)??"-"),1)]}),_:1}),t(s,{label:"کد ملی"},{default:e(()=>{var a;return[o(d(((a=n.value)==null?void 0:a.national_code)??"-"),1)]}),_:1}),t(s,{label:"شهر"},{default:e(()=>{var a,l;return[o(d(((l=(a=n.value)==null?void 0:a.city)==null?void 0:l.title)??"-"),1)]}),_:1}),t(s,{label:"کارشناس فروش"},{default:e(()=>{var a,l;return[o(d(((l=(a=n.value)==null?void 0:a.reagent)==null?void 0:l.name)??"-"),1)]}),_:1}),t(s,{label:"وضعیت"},{default:e(()=>{var a;return[t(u,{color:((a=n.value)==null?void 0:a.active)===1?"green":"red"},{default:e(()=>{var l;return[o(d(((l=n.value)==null?void 0:l.active)===1?"فعال":"غیر فعال"),1)]}),_:1},8,["color"])]}),_:1}),t(s,{label:"سطح اعتبار"},{default:e(()=>{var a;return[o(d(((a=n.value)==null?void 0:a.gram_level)??"-")+" گرم ",1)]}),_:1}),t(s,{label:"بدهی گرمی"},{default:e(()=>{var a;return[o(d(((a=n.value)==null?void 0:a.remain)??"-"),1)]}),_:1}),t(s,{label:"بدهی ریالی"},{default:e(()=>{var a;return[o(d(((a=n.value)==null?void 0:a.rial_remain)??"-"),1)]}),_:1})]),_:1}),y.value?(c(),v("div",J,[t(u,{color:"blue"},{default:e(()=>[o("کل سفارش‌ها: "+d(y.value.total_order),1)]),_:1}),t(u,{color:"orange"},{default:e(()=>[o("سفارش باز: "+d(y.value.open_order),1)]),_:1}),t(u,{color:"green"},{default:e(()=>[o("اسناد: "+d(y.value.ledger_entries),1)]),_:1})])):m("",!0)]),_:1},8,["title"]),t(E,{class:"mt-4","default-active-key":p.defaultTab},{default:e(()=>[t(k,{key:"orders",tab:"سفارش ها"},{default:e(()=>[t(w,{size:"small","data-source":$.value,columns:D,pagination:{pageSize:10},"row-key":"id"},{bodyCell:e(({column:a,record:l})=>[a.dataIndex==="caj"?(c(),v(g,{key:0},[o(d(x(j)(l.caj)),1)],64)):m("",!0)]),_:1},8,["data-source"])]),_:1}),t(k,{key:"documents",tab:"سند های مالی"},{default:e(()=>[t(w,{size:"small","data-source":B.value,columns:N,pagination:{pageSize:10},"row-key":"id"},{bodyCell:e(({column:a,record:l})=>[a.dataIndex==="confirmed"?(c(),h(u,{key:0,color:l.confirmed===1?"green":""},{default:e(()=>[o(d(l.confirmed===1?"تایید شده":"تایید نشده"),1)]),_:2},1032,["color"])):a.dataIndex==="caj"?(c(),v(g,{key:1},[o(d(x(j)(l.caj)),1)],64)):m("",!0)]),_:1},8,["data-source"])]),_:1}),p.showWallet?(c(),h(k,{key:"wallet",tab:"کیف پول"},{default:e(()=>[t(w,{size:"small","data-source":S.value,columns:V,pagination:!1,"row-key":"id"},{bodyCell:e(({column:a,record:l})=>[a.dataIndex==="caj"?(c(),v(g,{key:0},[o(d(x(j)(l.caj)),1)],64)):a.dataIndex==="expires_at"?(c(),v(g,{key:1},[o(d(x(j)(l.expires_at)),1)],64)):m("",!0)]),_:1},8,["data-source"])]),_:1})):m("",!0),p.showActivity?(c(),h(k,{key:"activity",tab:"فعالیت ها"},{default:e(()=>[t(w,{size:"small","data-source":T.value,columns:W,pagination:{pageSize:15},"row-key":"id"},{bodyCell:e(({column:a,record:l})=>[a.dataIndex==="caj"?(c(),v(g,{key:0},[o(d(x(G)(l.caj)),1)],64)):m("",!0)]),_:1},8,["data-source"])]),_:1})):m("",!0)]),_:1},8,["default-active-key"])]),_:1},8,["spinning"])}}}),X=H(K,[["__scopeId","data-v-9dee124b"]]);export{X as C}; diff --git a/apps/admin-panel/dist/assets/CustomerDetail-jkU0PuSY.css b/apps/admin-panel/dist/assets/CustomerDetail-jkU0PuSY.css deleted file mode 100644 index ee36932..0000000 --- a/apps/admin-panel/dist/assets/CustomerDetail-jkU0PuSY.css +++ /dev/null @@ -1 +0,0 @@ -.stats[data-v-9dee124b]{display:flex;gap:.5rem}.mt-4[data-v-9dee124b]{margin-top:1rem} diff --git a/apps/admin-panel/dist/assets/CustomerDetail-mSM31qkb.js b/apps/admin-panel/dist/assets/CustomerDetail-mSM31qkb.js new file mode 100644 index 0000000..355a009 --- /dev/null +++ b/apps/admin-panel/dist/assets/CustomerDetail-mSM31qkb.js @@ -0,0 +1 @@ +import{d as Z,u as ta,v as aa,o as c,a as A,w as e,c as l,b as m,f as s,t as o,F as j,n as D,s as P,i as v,l as f,p as Q,x as k,z as X,r as u,j as la,h as S}from"./index-CVG99b4v.js";import{j as U,b as na}from"./filters-UavLT20t.js";import{m as oa}from"./index-pLFqZCCf.js";import{_ as ea}from"./_plugin-vue_export-helper-DlAUqK2U.js";const sa={key:1,class:"muted"},ia={class:"muted small"},da={key:1,class:"muted"},ca={key:0,class:"muted small mt-2"},ua={key:0,class:"warn"},ra=Z({__name:"CustomerAccountingCard",props:{customerId:{}},setup(I){const T=I,W={LINKED:"جفت با موبایل",IMPORTED:"وارد شده از حسابداری",PUSHED:"ساخته شده از اپ",MANUAL:"دستی"},g={PENDING:"در صف",SENDING:"در حال ارسال",SENT:"ارسال شد",FAILED:"ناموفق",NEEDS_REVIEW:"نیاز به بررسی",RESOLVED:"حل‌شده"},h=ta(),t=f(null),p=f(!1),x=f(""),B=Q(()=>!!h.hasPermission("config.accounting")&&t.value&&t.value.provider!=="none"),y=Q(()=>{var i,n;return(n=(i=t.value)==null?void 0:i.jobs)==null?void 0:n[0]}),w=(i,n)=>i==null?"—":Number(i).toLocaleString("fa-IR",{maximumFractionDigits:n}),E=i=>Number(i)>0?"debt":Number(i)<0?"credit":"",R=i=>i?oa(i).format("jYYYY/jMM/jDD HH:mm"):"";async function $(){if(h.hasPermission("config.accounting")){p.value=!0;try{const{data:i}=await k.get(`admin/accounting/customers/${T.customerId}`);t.value=i}catch{t.value=null}finally{p.value=!1}}}async function V(){var i,n;try{await k.post("admin/accounting/links",{entityType:"CUSTOMER",entityId:T.customerId,externalCode:x.value.trim()}),X.success("لینک شد"),x.value="",$()}catch(r){X.error(((n=(i=r==null?void 0:r.response)==null?void 0:i.data)==null?void 0:n.message)??"خطا")}}async function N(){var i;(i=t.value)!=null&&i.link&&(await k.delete(`admin/accounting/links/${t.value.link.id}`),$())}return aa($),(i,n)=>{const r=u("a-tag"),b=u("a-descriptions-item"),L=u("a-descriptions"),z=u("a-input"),C=u("a-button"),F=u("a-popconfirm"),O=u("a-space"),a=u("a-spin"),d=u("a-card");return B.value?(c(),A(d,{key:0,size:"small",title:"حسابداری",class:"mt-4"},{default:e(()=>[l(a,{spinning:p.value},{default:e(()=>[l(L,{bordered:"",size:"small",column:3},{default:e(()=>[l(b,{label:"کد حساب"},{default:e(()=>{var _;return[(_=t.value)!=null&&_.link?(c(),m(j,{key:0},[s(o(t.value.link.externalCode)+" ",1),l(r,{class:"ms-2"},{default:e(()=>[s(o(W[t.value.link.origin]??t.value.link.origin),1)]),_:1})],64)):(c(),m("span",sa,"لینک نشده"))]}),_:1}),l(b,{label:"مانده‌ی حسابداری (گرم / ریال)"},{default:e(()=>{var _;return[(_=t.value)!=null&&_.accounting?(c(),m(j,{key:0},[D("span",{class:P(E(t.value.accounting.gold))},o(w(t.value.accounting.gold,3)),3),n[1]||(n[1]=s(" / ",-1)),D("span",{class:P(E(t.value.accounting.rial))},o(w(t.value.accounting.rial,0)),3),D("div",ia,o(R(t.value.accounting.at)),1)],64)):(c(),m("span",da,"—"))]}),_:1}),l(b,{label:"مانده‌ی دفتر اپ (گرم / ریال)"},{default:e(()=>{var _,M,Y,G,H,J,K,q;return[D("span",{class:P(E((M=(_=t.value)==null?void 0:_.internal)==null?void 0:M.gold))},o(w((G=(Y=t.value)==null?void 0:Y.internal)==null?void 0:G.gold,3)),3),n[2]||(n[2]=s(" / ",-1)),D("span",{class:P(E((J=(H=t.value)==null?void 0:H.internal)==null?void 0:J.rial))},o(w((q=(K=t.value)==null?void 0:K.internal)==null?void 0:q.rial,0)),3),n[3]||(n[3]=D("div",{class:"muted small"},"مبنای سقف اعتبار",-1))]}),_:1})]),_:1}),y.value?(c(),m("div",ca,[s(" آخرین ارسال: "+o(g[y.value.status]??y.value.status)+" — "+o(R(y.value.updatedAt))+" ",1),y.value.lastError?(c(),m("span",ua," — "+o(y.value.lastError),1)):v("",!0)])):v("",!0),l(O,{class:"mt-2"},{default:e(()=>{var _;return[l(z,{value:x.value,"onUpdate:value":n[0]||(n[0]=M=>x.value=M),dir:"ltr",placeholder:"کد حساب در حسابداری",style:{width:"200px"}},null,8,["value"]),l(C,{size:"small",disabled:!x.value.trim(),onClick:V},{default:e(()=>[...n[4]||(n[4]=[s("لینک دستی",-1)])]),_:1},8,["disabled"]),(_=t.value)!=null&&_.link?(c(),A(F,{key:0,title:"لینک حذف شود؟",onConfirm:N},{default:e(()=>[l(C,{size:"small",danger:""},{default:e(()=>[...n[5]||(n[5]=[s("حذف لینک",-1)])]),_:1})]),_:1})):v("",!0)]}),_:1})]),_:1},8,["spinning"])]),_:1})):v("",!0)}}}),ma=ea(ra,[["__scopeId","data-v-c1985092"]]),_a={key:0,class:"stats mt-4"},va=Z({__name:"CustomerDetail",props:{title:{default:"مشاهده اطلاعات مشتری"},showWallet:{type:Boolean,default:!1},showActivity:{type:Boolean,default:!1},defaultTab:{default:"orders"}},setup(I){const T=I,g=la().params.id,h=f(!1),t=f(void 0),p=f(void 0),x=f([]),B=f([]),y=f([]),w=f([]),E=[{title:"شماره سفارش",dataIndex:"name"},{title:"وزن",dataIndex:"w"},{title:"تعداد آیتم",dataIndex:"items_count"},{title:"شعبه",dataIndex:"branch"},{title:"تاریخ",dataIndex:"caj"}],R=[{title:"نوع",dataIndex:"type"},{title:"مقدار",dataIndex:"value"},{title:"وضعیت",dataIndex:"confirmed"},{title:"توضیحات",dataIndex:"note"},{title:"تاریخ",dataIndex:"caj"}],$=[{title:"مقدار (گرم)",dataIndex:"value"},{title:"تاریخ اعطا",dataIndex:"caj"},{title:"انقضا",dataIndex:"expires_at"}],V=[{title:"عملیات",dataIndex:"action"},{title:"جزئیات",dataIndex:"detail"},{title:"تاریخ",dataIndex:"caj"}];return aa(async()=>{try{h.value=!0;const[N,i,n,r]=await Promise.all([k.get(`customer/${g}`),k.get(`major/dashboard/${g}`).catch(()=>({data:void 0})),k.get(`admin/customers-omde/${g}/orders`).catch(()=>({data:[]})),k.get(`admin/customers-omde/${g}/documents`).catch(()=>({data:[]}))]);if(t.value=N.data,p.value=i.data,x.value=n.data,B.value=r.data,T.showWallet){const b=await k.get(`admin/customers-omde/${g}/wallet`).catch(()=>({data:[]}));y.value=b.data}if(T.showActivity){const b=await k.get(`log/ago/${g}`).catch(()=>({data:[]}));w.value=b.data}}catch(N){console.log(N)}finally{h.value=!1}}),(N,i)=>{const n=u("a-descriptions-item"),r=u("a-tag"),b=u("a-descriptions"),L=u("a-card"),z=u("a-table"),C=u("a-tab-pane"),F=u("a-tabs"),O=u("a-spin");return c(),A(O,{spinning:h.value},{default:e(()=>[l(L,{title:I.title},{default:e(()=>[l(b,{bordered:"",size:"small",column:3},{default:e(()=>[l(n,{label:"نام"},{default:e(()=>{var a;return[s(o(((a=t.value)==null?void 0:a.name)??"-"),1)]}),_:1}),l(n,{label:"موبایل"},{default:e(()=>{var a;return[s(o(((a=t.value)==null?void 0:a.mobile)??"-"),1)]}),_:1}),l(n,{label:"کد ملی"},{default:e(()=>{var a;return[s(o(((a=t.value)==null?void 0:a.national_code)??"-"),1)]}),_:1}),l(n,{label:"شهر"},{default:e(()=>{var a,d;return[s(o(((d=(a=t.value)==null?void 0:a.city)==null?void 0:d.title)??"-"),1)]}),_:1}),l(n,{label:"کارشناس فروش"},{default:e(()=>{var a,d;return[s(o(((d=(a=t.value)==null?void 0:a.reagent)==null?void 0:d.name)??"-"),1)]}),_:1}),l(n,{label:"وضعیت"},{default:e(()=>{var a;return[l(r,{color:((a=t.value)==null?void 0:a.active)===1?"green":"red"},{default:e(()=>{var d;return[s(o(((d=t.value)==null?void 0:d.active)===1?"فعال":"غیر فعال"),1)]}),_:1},8,["color"])]}),_:1}),l(n,{label:"سطح اعتبار"},{default:e(()=>{var a;return[s(o(((a=t.value)==null?void 0:a.gram_level)??"-")+" گرم ",1)]}),_:1}),l(n,{label:"بدهی گرمی"},{default:e(()=>{var a;return[s(o(((a=t.value)==null?void 0:a.remain)??"-"),1)]}),_:1}),l(n,{label:"بدهی ریالی"},{default:e(()=>{var a;return[s(o(((a=t.value)==null?void 0:a.rial_remain)??"-"),1)]}),_:1}),l(n,{label:"میزان فروش"},{default:e(()=>{var a;return[s(o(((a=p.value)==null?void 0:a.grams_sell)??"-"),1)]}),_:1})]),_:1}),p.value?(c(),m("div",_a,[l(r,{color:"blue"},{default:e(()=>[s("کل سفارش‌ها: "+o(p.value.total_order),1)]),_:1}),l(r,{color:"orange"},{default:e(()=>[s("سفارش باز: "+o(p.value.open_order),1)]),_:1}),l(r,{color:"green"},{default:e(()=>[s("اسناد: "+o(p.value.ledger_entries),1)]),_:1})])):v("",!0)]),_:1},8,["title"]),l(ma,{"customer-id":S(g)},null,8,["customer-id"]),l(F,{class:"mt-4","default-active-key":I.defaultTab},{default:e(()=>[l(C,{key:"orders",tab:"سفارش ها"},{default:e(()=>[l(z,{size:"small","data-source":x.value,columns:E,pagination:{pageSize:10},"row-key":"id"},{bodyCell:e(({column:a,record:d})=>[a.dataIndex==="caj"?(c(),m(j,{key:0},[s(o(S(U)(d.caj)),1)],64)):v("",!0)]),_:1},8,["data-source"])]),_:1}),l(C,{key:"documents",tab:"سند های مالی"},{default:e(()=>[l(z,{size:"small","data-source":B.value,columns:R,pagination:{pageSize:10},"row-key":"id"},{bodyCell:e(({column:a,record:d})=>[a.dataIndex==="confirmed"?(c(),A(r,{key:0,color:d.confirmed===1?"green":""},{default:e(()=>[s(o(d.confirmed===1?"تایید شده":"تایید نشده"),1)]),_:2},1032,["color"])):a.dataIndex==="caj"?(c(),m(j,{key:1},[s(o(S(U)(d.caj)),1)],64)):v("",!0)]),_:1},8,["data-source"])]),_:1}),I.showWallet?(c(),A(C,{key:"wallet",tab:"کیف پول"},{default:e(()=>[l(z,{size:"small","data-source":y.value,columns:$,pagination:!1,"row-key":"id"},{bodyCell:e(({column:a,record:d})=>[a.dataIndex==="caj"?(c(),m(j,{key:0},[s(o(S(U)(d.caj)),1)],64)):a.dataIndex==="expires_at"?(c(),m(j,{key:1},[s(o(S(U)(d.expires_at)),1)],64)):v("",!0)]),_:1},8,["data-source"])]),_:1})):v("",!0),I.showActivity?(c(),A(C,{key:"activity",tab:"فعالیت ها"},{default:e(()=>[l(z,{size:"small","data-source":w.value,columns:V,pagination:{pageSize:15},"row-key":"id"},{bodyCell:e(({column:a,record:d})=>[a.dataIndex==="caj"?(c(),m(j,{key:0},[s(o(S(na)(d.caj)),1)],64)):v("",!0)]),_:1},8,["data-source"])]),_:1})):v("",!0)]),_:1},8,["default-active-key"])]),_:1},8,["spinning"])}}}),ba=ea(va,[["__scopeId","data-v-6d44e777"]]);export{ba as C}; diff --git a/apps/admin-panel/dist/assets/Dashboard-BYIxpddi.css b/apps/admin-panel/dist/assets/Dashboard-BYIxpddi.css new file mode 100644 index 0000000..569374f --- /dev/null +++ b/apps/admin-panel/dist/assets/Dashboard-BYIxpddi.css @@ -0,0 +1 @@ +.stat-card[data-v-2ccaa937]{height:100%}.stat-row[data-v-2ccaa937]{display:flex;align-items:center;gap:1rem}.stat-icon[data-v-2ccaa937]{display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:50%;font-size:22px;flex-shrink:0}.icon-primary[data-v-2ccaa937]{background:#1c2d561a;color:#1c2d56}.icon-warning[data-v-2ccaa937]{background:#ff9f431f;color:#ff9f43}.icon-success[data-v-2ccaa937]{background:#28c76f1f;color:#28c76f}.icon-danger[data-v-2ccaa937]{background:#ea54551f;color:#ea5455}.stat-value[data-v-2ccaa937]{margin:0;font-size:20px;color:#1c2d56}.stat-title[data-v-2ccaa937]{font-size:12px;color:#888}.mt-4[data-v-585a18f1]{margin-top:1rem}.mt-3[data-v-585a18f1]{margin-top:.75rem} diff --git a/apps/admin-panel/dist/assets/Dashboard-CP5E1mJe.css b/apps/admin-panel/dist/assets/Dashboard-CP5E1mJe.css deleted file mode 100644 index f7bdbf8..0000000 --- a/apps/admin-panel/dist/assets/Dashboard-CP5E1mJe.css +++ /dev/null @@ -1 +0,0 @@ -.stat-card[data-v-ebefdc7b]{height:100%}.stat-row[data-v-ebefdc7b]{display:flex;align-items:center;gap:1rem}.stat-icon[data-v-ebefdc7b]{display:inline-flex;align-items:center;justify-content:center;width:48px;height:48px;border-radius:50%;font-size:22px;flex-shrink:0}.icon-primary[data-v-ebefdc7b]{background:#1c2d561a;color:#1c2d56}.icon-warning[data-v-ebefdc7b]{background:#ff9f431f;color:#ff9f43}.icon-success[data-v-ebefdc7b]{background:#28c76f1f;color:#28c76f}.icon-danger[data-v-ebefdc7b]{background:#ea54551f;color:#ea5455}.stat-value[data-v-ebefdc7b]{margin:0;font-size:20px;color:#1c2d56}.stat-title[data-v-ebefdc7b]{font-size:12px;color:#888}.mt-4[data-v-92a6e636]{margin-top:1rem}.mt-3[data-v-92a6e636]{margin-top:.75rem} diff --git a/apps/admin-panel/dist/assets/Dashboard-Dnj2el11.js b/apps/admin-panel/dist/assets/Dashboard-C_P6-F5I.js similarity index 59% rename from apps/admin-panel/dist/assets/Dashboard-Dnj2el11.js rename to apps/admin-panel/dist/assets/Dashboard-C_P6-F5I.js index e5c3b75..e0b6313 100644 --- a/apps/admin-panel/dist/assets/Dashboard-Dnj2el11.js +++ b/apps/admin-panel/dist/assets/Dashboard-C_P6-F5I.js @@ -1 +1 @@ -import{d as F,o as d,a as m,w as s,n as l,s as K,g as Q,t as p,p as o,r as i,v as X,x as Z,l as tt,y as et,c as a,i as k,f as b,b as at,h as st,F as ot}from"./index-WFQJAeoE.js";import{B as D,D as nt,S as rt,T as it}from"./TeamOutlined-CQ06mk_Y.js";import{_ as R}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{j as P,p as $}from"./filters-C1cWKkpl.js";import"./index-1e_FodC0.js";const lt={class:"stat-row"},ct={class:"stat-value"},dt={class:"stat-title"},ut=F({__name:"StatisticsCardLine",props:{icon:{},statistic:{},statisticTitle:{},color:{default:"primary"},hideChart:{type:Boolean,default:!0}},setup(h){const g=h,t={UsersIcon:it,ShoppingBagIcon:rt,DollarSignIcon:nt,BarChartIcon:D},v=o(()=>t[g.icon??""]??D);return(I,L)=>{const y=i("a-card");return d(),m(y,{class:"stat-card"},{default:s(()=>[l("div",lt,[l("span",{class:K(["stat-icon",`icon-${h.color}`])},[(d(),m(Q(v.value)))],2),l("div",null,[l("h2",ct,p(h.statistic),1),l("span",dt,p(h.statisticTitle),1)])])]),_:1})}}}),_=R(ut,[["__scopeId","data-v-ebefdc7b"]]),mt={class:"grid-4"},pt={class:"grid-2 mt-4"},_t={class:"grid-2 mt-4"},ht={class:"grid-2 mt-4"},f="#1c2d56",C="#28c76f",w="#ff9f43",gt="#ea5455",bt=F({__name:"Dashboard",setup(h){const g=tt(!1),t=et({customerCount:0,allgram:0,ordercount:0,reagent:[],lastOrder:[],sumLastOrder:0,sumLastOrderMonth:0,ordersTrend:[],statusBreakdown:[],channelBreakdown:[],topProducts:[],goldPricePerGram:null,totalCustomerDebtGrams:0}),v=[{title:"کارشناس فروش",dataIndex:"name"},{title:"میزان فروش (گرم)",dataIndex:"grams_sell"},{title:"تعداد سفارش",dataIndex:"order_count"}],I=[{title:"شماره سفارش",dataIndex:"name"},{title:"مشتری",dataIndex:"customer"},{title:"وزن",dataIndex:"w"},{title:"وضعیت",dataIndex:"sts_str"},{title:"تاریخ",dataIndex:"caj"}];function L(e){return{success:"green",warning:"orange",danger:"red",primary:"blue"}[e]??""}const y=o(()=>t.goldPricePerGram?`${$(Math.round(Number(t.goldPricePerGram)))} تومان`:"—"),T=o(()=>$(Number(t.totalCustomerDebtGrams??0).toFixed(2))),z=o(()=>{const e=Number(t.sumLastOrder??0),n=Number(t.sumLastOrderMonth??0);return e>0?(n/e).toFixed(2):"0"}),G=o(()=>{const e=t.ordersTrend??[];return[{name:"تک فروشی",data:e.map(n=>n.retail)},{name:"عمده فروشی",data:e.map(n=>n.wholesale)}]}),j=o(()=>({chart:{toolbar:{show:!1},fontFamily:"inherit"},colors:[f,C],dataLabels:{enabled:!1},stroke:{curve:"smooth",width:2},fill:{type:"gradient",gradient:{opacityFrom:.35,opacityTo:.05}},legend:{position:"top",horizontalAlign:"right"},xaxis:{categories:(t.ordersTrend??[]).map(e=>P(e.date)),labels:{rotate:-45,rotateAlways:!0,hideOverlappingLabels:!0,style:{fontSize:"12px",fontWeight:500}}},tooltip:{shared:!0}})),M=o(()=>(t.statusBreakdown??[]).map(e=>e.count)),A=o(()=>({chart:{fontFamily:"inherit"},labels:(t.statusBreakdown??[]).map(e=>e.label),colors:[w,f,f,w,w,C,C,gt],legend:{position:"bottom"},dataLabels:{enabled:!0}})),V=o(()=>(t.channelBreakdown??[]).map(e=>e.count)),W=o(()=>({chart:{fontFamily:"inherit"},labels:(t.channelBreakdown??[]).map(e=>e.label),colors:[f,C],legend:{position:"bottom"},dataLabels:{enabled:!0}})),S=o(()=>[{name:"گرم فروخته‌شده",data:(t.reagent??[]).map(e=>Number(e.grams_sell??0))}]),E=o(()=>({chart:{toolbar:{show:!1},fontFamily:"inherit"},plotOptions:{bar:{horizontal:!0,borderRadius:4}},colors:[f],dataLabels:{enabled:!0},xaxis:{categories:(t.reagent??[]).map(e=>e.name)}})),B=o(()=>[{name:"وزن فروخته‌شده (گرم)",data:(t.topProducts??[]).map(e=>Number(e.weight??0))}]),U=o(()=>({chart:{toolbar:{show:!1},fontFamily:"inherit"},plotOptions:{bar:{borderRadius:4,columnWidth:"55%"}},colors:[C],dataLabels:{enabled:!1},xaxis:{categories:(t.topProducts??[]).map(e=>e.title)}}));return X(async()=>{try{g.value=!0;const{data:e}=await Z.get("dashboard/overview");Object.assign(t,e),t.reagent=[...t.reagent??[]].sort((n,r)=>Number(r.grams_sell)-Number(n.grams_sell)),t.lastOrder=[...t.lastOrder??[]].sort((n,r)=>Number(r.w)-Number(n.w))}catch(e){console.error(e)}finally{g.value=!1}}),(e,n)=>{const r=i("apexchart"),u=i("a-card"),N=i("a-table"),Y=i("a-empty"),O=i("a-descriptions-item"),q=i("a-descriptions"),H=i("a-tag"),J=i("a-spin");return d(),m(J,{spinning:g.value},{default:s(()=>[l("div",mt,[a(_,{icon:"UsersIcon",color:"warning",statistic:`${t.customerCount??0} نفر`,"statistic-title":"مشتریان جدید (۳۰ روز گذشته)"},null,8,["statistic"]),a(_,{icon:"ShoppingBagIcon",color:"primary",statistic:`${t.allgram??0} گرم`,"statistic-title":"طلای فروش رفته (۳۰ روز گذشته)"},null,8,["statistic"]),a(_,{icon:"ShoppingBagIcon",color:"success",statistic:`${t.ordercount??0} سفارش`,"statistic-title":"تعداد سفارشات (۳۰ روز گذشته)"},null,8,["statistic"]),a(_,{icon:"DollarSignIcon",color:"danger",statistic:y.value,"statistic-title":"نرخ هر گرم طلای ۱۸ عیار"},null,8,["statistic"])]),l("div",pt,[a(_,{icon:"BarChartIcon",color:"primary",statistic:`${t.sumLastOrder??0} سفارش`,"statistic-title":"تعداد سفارشات تحویل‌شده (۳۰ روز گذشته)"},null,8,["statistic"]),a(_,{icon:"CreditCardIcon",color:"warning",statistic:`${T.value} گرم`,"statistic-title":"مجموع بدهی طلای مشتریان"},null,8,["statistic"])]),a(u,{title:"روند سفارش‌ها (۳۰ روز گذشته)",class:"mt-4"},{default:s(()=>[a(r,{type:"area",height:"300",options:j.value,series:G.value},null,8,["options","series"])]),_:1}),l("div",_t,[a(u,{title:"وضعیت سفارشات (۳۰ روز گذشته)"},{default:s(()=>[a(r,{type:"donut",height:"300",options:A.value,series:M.value},null,8,["options","series"])]),_:1}),a(u,{title:"تفکیک عمده / تک (۳۰ روز گذشته)"},{default:s(()=>[a(r,{type:"donut",height:"300",options:W.value,series:V.value},null,8,["options","series"])]),_:1})]),l("div",ht,[a(u,{title:"عملکرد کارشناسان فروش"},{default:s(()=>{var c;return[(c=S.value[0])!=null&&c.data.length?(d(),m(r,{key:0,type:"bar",height:"280",options:E.value,series:S.value},null,8,["options","series"])):k("",!0),a(N,{class:"mt-3",size:"small","data-source":t.reagent,columns:v,pagination:!1,"row-key":"id"},null,8,["data-source"])]}),_:1}),a(u,{title:"محصولات پرفروش (۳۰ روز گذشته)"},{default:s(()=>{var c;return[(c=B.value[0])!=null&&c.data.length?(d(),m(r,{key:0,type:"bar",height:"280",options:U.value,series:B.value},null,8,["options","series"])):(d(),m(Y,{key:1,description:"داده‌ای برای نمایش وجود ندارد"}))]}),_:1})]),a(u,{title:"میزان فروش",class:"mt-4"},{default:s(()=>[a(q,{bordered:"",size:"small",column:3},{default:s(()=>[a(O,{label:"تعداد سفارش (۳۰ روز)"},{default:s(()=>[b(p(t.sumLastOrder??0),1)]),_:1}),a(O,{label:"مجموع وزن (۳۰ روز)"},{default:s(()=>[b(p(t.sumLastOrderMonth??0)+" گرم ",1)]),_:1}),a(O,{label:"میانگین هر سفارش"},{default:s(()=>[b(p(z.value)+" گرم ",1)]),_:1})]),_:1})]),_:1}),a(u,{title:"سفارشات هفته جاری",class:"mt-4"},{default:s(()=>[a(N,{size:"small","data-source":t.lastOrder,columns:I,pagination:{pageSize:10},"row-key":"id"},{bodyCell:s(({column:c,record:x})=>[c.dataIndex==="sts_str"?(d(),m(H,{key:0,color:L(x.statusColor)},{default:s(()=>[b(p(x.sts_str),1)]),_:2},1032,["color"])):c.dataIndex==="caj"?(d(),at(ot,{key:1},[b(p(st(P)(x.caj)),1)],64)):k("",!0)]),_:1},8,["data-source"])]),_:1})]),_:1},8,["spinning"])}}}),xt=R(bt,[["__scopeId","data-v-92a6e636"]]);export{xt as default}; +import{d as F,o as d,a as m,w as s,n as l,s as K,g as Q,t as p,p as o,r as i,v as X,x as Z,l as tt,y as at,c as e,i as k,f as b,b as et,h as st,F as ot}from"./index-CVG99b4v.js";import{B as D,D as nt,S as rt,T as it}from"./TeamOutlined-BEJyrWYB.js";import{_ as R}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{j as P,p as $}from"./filters-UavLT20t.js";import"./index-pLFqZCCf.js";const lt={class:"stat-row"},ct={class:"stat-value"},dt={class:"stat-title"},ut=F({__name:"StatisticsCardLine",props:{icon:{},statistic:{},statisticTitle:{},color:{default:"primary"},hideChart:{type:Boolean,default:!0}},setup(h){const g=h,t={UsersIcon:it,ShoppingBagIcon:rt,DollarSignIcon:nt,BarChartIcon:D},v=o(()=>t[g.icon??""]??D);return(I,L)=>{const y=i("a-card");return d(),m(y,{class:"stat-card"},{default:s(()=>[l("div",lt,[l("span",{class:K(["stat-icon",`icon-${h.color}`])},[(d(),m(Q(v.value)))],2),l("div",null,[l("h2",ct,p(h.statistic),1),l("span",dt,p(h.statisticTitle),1)])])]),_:1})}}}),_=R(ut,[["__scopeId","data-v-2ccaa937"]]),mt={class:"grid-4"},pt={class:"grid-2 mt-4"},_t={class:"grid-2 mt-4"},ht={class:"grid-2 mt-4"},f="#1c2d56",C="#28c76f",w="#ff9f43",gt="#ea5455",bt=F({__name:"Dashboard",setup(h){const g=tt(!1),t=at({customerCount:0,allgram:0,ordercount:0,reagent:[],lastOrder:[],sumLastOrder:0,sumLastOrderMonth:0,ordersTrend:[],statusBreakdown:[],channelBreakdown:[],topProducts:[],goldPricePerGram:null,totalCustomerDebtGrams:0}),v=[{title:"کارشناس فروش",dataIndex:"name"},{title:"میزان فروش (گرم)",dataIndex:"grams_sell"},{title:"تعداد سفارش",dataIndex:"order_count"}],I=[{title:"شماره سفارش",dataIndex:"name"},{title:"مشتری",dataIndex:"customer"},{title:"وزن",dataIndex:"w"},{title:"وضعیت",dataIndex:"sts_str"},{title:"تاریخ",dataIndex:"caj"}];function L(a){return{success:"green",warning:"orange",danger:"red",primary:"blue"}[a]??""}const y=o(()=>t.goldPricePerGram?`${$(Math.round(Number(t.goldPricePerGram)))} تومان`:"—"),T=o(()=>$(Number(t.totalCustomerDebtGrams??0).toFixed(2))),z=o(()=>{const a=Number(t.sumLastOrder??0),n=Number(t.sumLastOrderMonth??0);return a>0?(n/a).toFixed(2):"0"}),G=o(()=>{const a=t.ordersTrend??[];return[{name:"تک فروشی",data:a.map(n=>n.retail)},{name:"عمده فروشی",data:a.map(n=>n.wholesale)}]}),j=o(()=>({chart:{toolbar:{show:!1},fontFamily:"inherit"},colors:[f,C],dataLabels:{enabled:!1},stroke:{curve:"smooth",width:2},fill:{type:"gradient",gradient:{opacityFrom:.35,opacityTo:.05}},legend:{position:"top",horizontalAlign:"right"},xaxis:{categories:(t.ordersTrend??[]).map(a=>P(a.date)),labels:{rotate:-45,rotateAlways:!0,hideOverlappingLabels:!0,style:{fontSize:"12px",fontWeight:500}}},tooltip:{shared:!0}})),M=o(()=>(t.statusBreakdown??[]).map(a=>a.count)),A=o(()=>({chart:{fontFamily:"inherit"},labels:(t.statusBreakdown??[]).map(a=>a.label),colors:[w,f,f,w,w,C,C,gt],legend:{position:"bottom"},dataLabels:{enabled:!0}})),V=o(()=>(t.channelBreakdown??[]).map(a=>a.count)),W=o(()=>({chart:{fontFamily:"inherit"},labels:(t.channelBreakdown??[]).map(a=>a.label),colors:[f,C],legend:{position:"bottom"},dataLabels:{enabled:!0}})),S=o(()=>[{name:"گرم فروخته‌شده",data:(t.reagent??[]).map(a=>Number(a.grams_sell??0))}]),E=o(()=>({chart:{toolbar:{show:!1},fontFamily:"inherit"},plotOptions:{bar:{horizontal:!0,borderRadius:4}},colors:[f],dataLabels:{enabled:!0},xaxis:{categories:(t.reagent??[]).map(a=>a.name)}})),B=o(()=>[{name:"وزن فروخته‌شده (گرم)",data:(t.topProducts??[]).map(a=>Number(a.weight??0))}]),U=o(()=>({chart:{toolbar:{show:!1},fontFamily:"inherit"},plotOptions:{bar:{borderRadius:4,columnWidth:"55%"}},colors:[C],dataLabels:{enabled:!1},xaxis:{categories:(t.topProducts??[]).map(a=>a.title)}}));return X(async()=>{try{g.value=!0;const{data:a}=await Z.get("dashboard/overview");Object.assign(t,a),t.reagent=[...t.reagent??[]].sort((n,r)=>Number(r.grams_sell)-Number(n.grams_sell)),t.lastOrder=[...t.lastOrder??[]].sort((n,r)=>Number(r.w)-Number(n.w))}catch(a){console.error(a)}finally{g.value=!1}}),(a,n)=>{const r=i("apexchart"),u=i("a-card"),N=i("a-table"),Y=i("a-empty"),O=i("a-descriptions-item"),q=i("a-descriptions"),H=i("a-tag"),J=i("a-spin");return d(),m(J,{spinning:g.value},{default:s(()=>[l("div",mt,[e(_,{icon:"UsersIcon",color:"warning",statistic:`${t.customerCount??0} نفر`,"statistic-title":"مشتریان جدید (۳۰ روز گذشته)"},null,8,["statistic"]),e(_,{icon:"ShoppingBagIcon",color:"primary",statistic:`${t.allgram??0} گرم`,"statistic-title":"طلای فروش رفته (۳۰ روز گذشته)"},null,8,["statistic"]),e(_,{icon:"ShoppingBagIcon",color:"success",statistic:`${t.ordercount??0} سفارش`,"statistic-title":"تعداد سفارشات (۳۰ روز گذشته)"},null,8,["statistic"]),e(_,{icon:"DollarSignIcon",color:"danger",statistic:y.value,"statistic-title":"نرخ هر گرم طلای ۱۸ عیار"},null,8,["statistic"])]),l("div",pt,[e(_,{icon:"BarChartIcon",color:"primary",statistic:`${t.sumLastOrder??0} سفارش`,"statistic-title":"تعداد سفارشات تحویل‌شده (۳۰ روز گذشته)"},null,8,["statistic"]),e(_,{icon:"CreditCardIcon",color:"warning",statistic:`${T.value} گرم`,"statistic-title":"مجموع بدهی طلای مشتریان"},null,8,["statistic"])]),e(u,{title:"روند سفارش‌ها (۳۰ روز گذشته)",class:"mt-4"},{default:s(()=>[e(r,{type:"area",height:"300",options:j.value,series:G.value},null,8,["options","series"])]),_:1}),l("div",_t,[e(u,{title:"وضعیت سفارشات (۳۰ روز گذشته)"},{default:s(()=>[e(r,{type:"donut",height:"300",options:A.value,series:M.value},null,8,["options","series"])]),_:1}),e(u,{title:"تفکیک عمده / تک (۳۰ روز گذشته)"},{default:s(()=>[e(r,{type:"donut",height:"300",options:W.value,series:V.value},null,8,["options","series"])]),_:1})]),l("div",ht,[e(u,{title:"عملکرد کارشناسان فروش"},{default:s(()=>{var c;return[(c=S.value[0])!=null&&c.data.length?(d(),m(r,{key:0,type:"bar",height:"280",options:E.value,series:S.value},null,8,["options","series"])):k("",!0),e(N,{class:"mt-3",size:"small","data-source":t.reagent,columns:v,pagination:!1,"row-key":"id"},null,8,["data-source"])]}),_:1}),e(u,{title:"محصولات پرفروش (۳۰ روز گذشته)"},{default:s(()=>{var c;return[(c=B.value[0])!=null&&c.data.length?(d(),m(r,{key:0,type:"bar",height:"280",options:U.value,series:B.value},null,8,["options","series"])):(d(),m(Y,{key:1,description:"داده‌ای برای نمایش وجود ندارد"}))]}),_:1})]),e(u,{title:"میزان فروش",class:"mt-4"},{default:s(()=>[e(q,{bordered:"",size:"small",column:3},{default:s(()=>[e(O,{label:"تعداد سفارش (۳۰ روز)"},{default:s(()=>[b(p(t.sumLastOrder??0),1)]),_:1}),e(O,{label:"مجموع وزن (۳۰ روز)"},{default:s(()=>[b(p(t.sumLastOrderMonth??0)+" گرم ",1)]),_:1}),e(O,{label:"میانگین هر سفارش"},{default:s(()=>[b(p(z.value)+" گرم ",1)]),_:1})]),_:1})]),_:1}),e(u,{title:"سفارشات هفته جاری",class:"mt-4"},{default:s(()=>[e(N,{size:"small","data-source":t.lastOrder,columns:I,pagination:{pageSize:10},"row-key":"id"},{bodyCell:s(({column:c,record:x})=>[c.dataIndex==="sts_str"?(d(),m(H,{key:0,color:L(x.statusColor)},{default:s(()=>[b(p(x.sts_str),1)]),_:2},1032,["color"])):c.dataIndex==="caj"?(d(),et(ot,{key:1},[b(p(st(P)(x.caj)),1)],64)):k("",!0)]),_:1},8,["data-source"])]),_:1})]),_:1},8,["spinning"])}}}),xt=R(bt,[["__scopeId","data-v-585a18f1"]]);export{xt as default}; diff --git a/apps/admin-panel/dist/assets/DateInput-BFphsjxa.css b/apps/admin-panel/dist/assets/DateInput-BFphsjxa.css new file mode 100644 index 0000000..9d4ebad --- /dev/null +++ b/apps/admin-panel/dist/assets/DateInput-BFphsjxa.css @@ -0,0 +1 @@ +.hint[data-v-3863c3bc]{color:#ea5455;font-size:11px} diff --git a/apps/admin-panel/dist/assets/DateInput-CQSQVa60.css b/apps/admin-panel/dist/assets/DateInput-CQSQVa60.css deleted file mode 100644 index d8ab5da..0000000 --- a/apps/admin-panel/dist/assets/DateInput-CQSQVa60.css +++ /dev/null @@ -1 +0,0 @@ -.hint[data-v-42b77d70]{color:#ea5455;font-size:11px} diff --git a/apps/admin-panel/dist/assets/DateInput-Cdw6YoHu.js b/apps/admin-panel/dist/assets/DateInput-P3xqxLM7.js similarity index 56% rename from apps/admin-panel/dist/assets/DateInput-Cdw6YoHu.js rename to apps/admin-panel/dist/assets/DateInput-P3xqxLM7.js index 2ddd6ec..013fe68 100644 --- a/apps/admin-panel/dist/assets/DateInput-Cdw6YoHu.js +++ b/apps/admin-panel/dist/assets/DateInput-P3xqxLM7.js @@ -1 +1 @@ -import{m}from"./index-1e_FodC0.js";import{d as _,m as V,o as r,a as Y,w as h,c as D,b,t as j,i as M,l as i,p as x,r as d}from"./index-WFQJAeoE.js";import{_ as y}from"./_plugin-vue_export-helper-DlAUqK2U.js";const k={key:0,class:"hint"},C=_({__name:"DateInput",props:{label:{},modelValue:{},placeholder:{default:"مثال: ۱۴۰۳/۰۵/۱۲"}},emits:["update:modelValue"],setup(o,{emit:p}){const n=o,u=p,t=i(void 0),a=i(""),f=x(()=>{if(t.value!==void 0)return t.value;if(!n.modelValue)return"";const e=m(n.modelValue);return e.isValid()?e.format("jYYYY/jMM/jDD"):""});V(()=>n.modelValue,()=>{t.value=void 0});function v(e){if(t.value=e,!e){a.value="",u("update:modelValue",void 0);return}const c=e.replace(/[۰-۹]/g,s=>String("۰۱۲۳۴۵۶۷۸۹".indexOf(s))),l=m(c,"jYYYY/jMM/jDD");l.isValid()?(a.value="",u("update:modelValue",l.format("YYYY-MM-DD"))):a.value="تاریخ معتبر نیست"}return(e,c)=>{const l=d("a-input"),s=d("a-form-item");return r(),Y(s,{label:o.label},{default:h(()=>[D(l,{value:f.value,placeholder:o.placeholder,"allow-clear":"","onUpdate:value":v},null,8,["value","placeholder"]),a.value?(r(),b("small",k,j(a.value),1)):M("",!0)]),_:1},8,["label"])}}}),w=y(C,[["__scopeId","data-v-42b77d70"]]);export{w as D}; +import{m}from"./index-pLFqZCCf.js";import{d as _,m as V,o as r,a as Y,w as h,c as D,b,t as j,i as M,l as i,p as x,r as d}from"./index-CVG99b4v.js";import{_ as y}from"./_plugin-vue_export-helper-DlAUqK2U.js";const k={key:0,class:"hint"},C=_({__name:"DateInput",props:{label:{},modelValue:{},placeholder:{default:"مثال: ۱۴۰۳/۰۵/۱۲"}},emits:["update:modelValue"],setup(o,{emit:p}){const n=o,c=p,t=i(void 0),a=i(""),f=x(()=>{if(t.value!==void 0)return t.value;if(!n.modelValue)return"";const e=m(n.modelValue);return e.isValid()?e.format("jYYYY/jMM/jDD"):""});V(()=>n.modelValue,()=>{t.value=void 0});function v(e){if(t.value=e,!e){a.value="",c("update:modelValue",void 0);return}const u=e.replace(/[۰-۹]/g,s=>String("۰۱۲۳۴۵۶۷۸۹".indexOf(s))),l=m(u,"jYYYY/jMM/jDD");l.isValid()?(a.value="",c("update:modelValue",l.format("YYYY-MM-DD"))):a.value="تاریخ معتبر نیست"}return(e,u)=>{const l=d("a-input"),s=d("a-form-item");return r(),Y(s,{label:o.label},{default:h(()=>[D(l,{value:f.value,placeholder:o.placeholder,"allow-clear":"","onUpdate:value":v},null,8,["value","placeholder"]),a.value?(r(),b("small",k,j(a.value),1)):M("",!0)]),_:1},8,["label"])}}}),w=y(C,[["__scopeId","data-v-3863c3bc"]]);export{w as D}; diff --git a/apps/admin-panel/dist/assets/Edit-B35-jN2T.js b/apps/admin-panel/dist/assets/Edit-B35-jN2T.js deleted file mode 100644 index 372a10f..0000000 --- a/apps/admin-panel/dist/assets/Edit-B35-jN2T.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o}from"./Add.vue_vue_type_script_setup_true_lang-BP3ofJiO.js";import{d as t,a as e,o as r}from"./index-WFQJAeoE.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-BQ_i_QZe.js";const i=t({__name:"Edit",setup(a){return(_,m)=>(r(),e(o))}});export{i as default}; diff --git a/apps/admin-panel/dist/assets/Edit-DgpRLPm6.js b/apps/admin-panel/dist/assets/Edit-DgpRLPm6.js new file mode 100644 index 0000000..4ce4fad --- /dev/null +++ b/apps/admin-panel/dist/assets/Edit-DgpRLPm6.js @@ -0,0 +1 @@ +import{_ as o}from"./Add.vue_vue_type_script_setup_true_lang-Ct9fNasS.js";import{d as t,a as e,o as r}from"./index-CVG99b4v.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-CWur6xTz.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-C8WW9alD.js";const i=t({__name:"Edit",setup(a){return(_,m)=>(r(),e(o))}});export{i as default}; diff --git a/apps/admin-panel/dist/assets/EditBranches-CTRDPCaW.js b/apps/admin-panel/dist/assets/EditBranches-CTRDPCaW.js new file mode 100644 index 0000000..34a572d --- /dev/null +++ b/apps/admin-panel/dist/assets/EditBranches-CTRDPCaW.js @@ -0,0 +1 @@ +import{_ as e}from"./AddBranches.vue_vue_type_script_setup_true_lang-DZPeg6FI.js";import{d as o,a,o as r}from"./index-CVG99b4v.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-CWur6xTz.js";const p=o({__name:"EditBranches",setup(t){return(n,s)=>(r(),a(e))}});export{p as default}; diff --git a/apps/admin-panel/dist/assets/EditBranches-DeQQ1fYf.js b/apps/admin-panel/dist/assets/EditBranches-DeQQ1fYf.js deleted file mode 100644 index fc3288b..0000000 --- a/apps/admin-panel/dist/assets/EditBranches-DeQQ1fYf.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e}from"./AddBranches.vue_vue_type_script_setup_true_lang-BTBcvf9O.js";import{d as o,a,o as r}from"./index-WFQJAeoE.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js";const p=o({__name:"EditBranches",setup(t){return(n,s)=>(r(),a(e))}});export{p as default}; diff --git a/apps/admin-panel/dist/assets/EditBulkCustomer-Cf9ySs4L.js b/apps/admin-panel/dist/assets/EditBulkCustomer-Cf9ySs4L.js new file mode 100644 index 0000000..5a6aa3c --- /dev/null +++ b/apps/admin-panel/dist/assets/EditBulkCustomer-Cf9ySs4L.js @@ -0,0 +1 @@ +import{_ as o}from"./bulkCustomer.vue_vue_type_script_setup_true_lang-BLZHRH0s.js";import{d as t,a as r,o as m}from"./index-CVG99b4v.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-CWur6xTz.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-C8WW9alD.js";import"./CityTreeSelect.vue_vue_type_script_setup_true_lang-Ctf4a2EQ.js";import"./DateInput-P3xqxLM7.js";import"./index-pLFqZCCf.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const l=t({__name:"EditBulkCustomer",setup(e){return(p,a)=>(m(),r(o))}});export{l as default}; diff --git a/apps/admin-panel/dist/assets/EditBulkCustomer-ClzBDuZO.js b/apps/admin-panel/dist/assets/EditBulkCustomer-ClzBDuZO.js deleted file mode 100644 index c5c3ab3..0000000 --- a/apps/admin-panel/dist/assets/EditBulkCustomer-ClzBDuZO.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o}from"./bulkCustomer.vue_vue_type_script_setup_true_lang-zBMtv664.js";import{d as t,a as e,o as r}from"./index-WFQJAeoE.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-BQ_i_QZe.js";const i=t({__name:"EditBulkCustomer",setup(a){return(m,s)=>(r(),e(o))}});export{i as default}; diff --git a/apps/admin-panel/dist/assets/EditInvoice-BgcjxMie.js b/apps/admin-panel/dist/assets/EditInvoice-BgcjxMie.js deleted file mode 100644 index 69daab6..0000000 --- a/apps/admin-panel/dist/assets/EditInvoice-BgcjxMie.js +++ /dev/null @@ -1 +0,0 @@ -import o from"./AddInvoice-BO7d-BCP.js";import{d as t,a as e,o as r}from"./index-WFQJAeoE.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js";import"./model-Di_BQPv1.js";import"./SettingOutlined-DZJd42S-.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const f=t({__name:"EditInvoice",setup(p){return(i,m)=>(r(),e(o))}});export{f as default}; diff --git a/apps/admin-panel/dist/assets/EditInvoice-CCyLjs66.js b/apps/admin-panel/dist/assets/EditInvoice-CCyLjs66.js new file mode 100644 index 0000000..705f10d --- /dev/null +++ b/apps/admin-panel/dist/assets/EditInvoice-CCyLjs66.js @@ -0,0 +1 @@ +import o from"./AddInvoice-ErZYOCpz.js";import{d as t,a as r,o as e}from"./index-CVG99b4v.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-CWur6xTz.js";import"./model-CvqTGmy8.js";import"./filters-UavLT20t.js";import"./index-pLFqZCCf.js";import"./SettingOutlined-D7--Xtqg.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const l=t({__name:"EditInvoice",setup(p){return(i,m)=>(e(),r(o))}});export{l as default}; diff --git a/apps/admin-panel/dist/assets/EditProduct-DyJHUlmc.js b/apps/admin-panel/dist/assets/EditProduct-DyJHUlmc.js new file mode 100644 index 0000000..6e3232a --- /dev/null +++ b/apps/admin-panel/dist/assets/EditProduct-DyJHUlmc.js @@ -0,0 +1 @@ +import e from"./AddProduct-DYRcWcLI.js";import{d as o,b as t,c as r,o as c}from"./index-CVG99b4v.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-C8WW9alD.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const _=o({__name:"EditProduct",setup(a){return(n,d)=>(c(),t("div",null,[r(e)]))}});export{_ as default}; diff --git a/apps/admin-panel/dist/assets/EditProduct-qLy0zc-L.js b/apps/admin-panel/dist/assets/EditProduct-qLy0zc-L.js deleted file mode 100644 index dbe9dc2..0000000 --- a/apps/admin-panel/dist/assets/EditProduct-qLy0zc-L.js +++ /dev/null @@ -1 +0,0 @@ -import e from"./AddProduct-tKobI_Dp.js";import{d as o,b as t,c as r,o as c}from"./index-WFQJAeoE.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-BQ_i_QZe.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const _=o({__name:"EditProduct",setup(a){return(n,d)=>(c(),t("div",null,[r(e)]))}});export{_ as default}; diff --git a/apps/admin-panel/dist/assets/EditReagent-CI0YT8IP.js b/apps/admin-panel/dist/assets/EditReagent-CI0YT8IP.js new file mode 100644 index 0000000..cf13278 --- /dev/null +++ b/apps/admin-panel/dist/assets/EditReagent-CI0YT8IP.js @@ -0,0 +1 @@ +import{R as e}from"./ReagentCustomer-DcWF6RQp.js";import{d as t,a as o,o as r}from"./index-CVG99b4v.js";import"./CityTreeSelect.vue_vue_type_script_setup_true_lang-Ctf4a2EQ.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-C8WW9alD.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const f=t({__name:"EditReagent",setup(a){return(m,n)=>(r(),o(e))}});export{f as default}; diff --git a/apps/admin-panel/dist/assets/EditReagent-DFgWLy4v.js b/apps/admin-panel/dist/assets/EditReagent-DFgWLy4v.js deleted file mode 100644 index 13ba315..0000000 --- a/apps/admin-panel/dist/assets/EditReagent-DFgWLy4v.js +++ /dev/null @@ -1 +0,0 @@ -import{R as e}from"./ReagentCustomer-BUrwCRTH.js";import{d as t,a as o,o as r}from"./index-WFQJAeoE.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-BQ_i_QZe.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const i=t({__name:"EditReagent",setup(a){return(n,m)=>(r(),o(e))}});export{i as default}; diff --git a/apps/admin-panel/dist/assets/EditSingleCustomer-0dw1FIoi.js b/apps/admin-panel/dist/assets/EditSingleCustomer-0dw1FIoi.js new file mode 100644 index 0000000..14ea96f --- /dev/null +++ b/apps/admin-panel/dist/assets/EditSingleCustomer-0dw1FIoi.js @@ -0,0 +1 @@ +import{_ as o}from"./singleCustomer.vue_vue_type_script_setup_true_lang-BCru8Kun.js";import{d as t,a as r,o as e}from"./index-CVG99b4v.js";import"./CityTreeSelect.vue_vue_type_script_setup_true_lang-Ctf4a2EQ.js";import"./DateInput-P3xqxLM7.js";import"./index-pLFqZCCf.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const u=t({__name:"EditSingleCustomer",setup(m){return(a,p)=>(e(),r(o))}});export{u as default}; diff --git a/apps/admin-panel/dist/assets/EditSingleCustomer-BXZn7b-f.js b/apps/admin-panel/dist/assets/EditSingleCustomer-BXZn7b-f.js deleted file mode 100644 index f923cce..0000000 --- a/apps/admin-panel/dist/assets/EditSingleCustomer-BXZn7b-f.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as e}from"./singleCustomer.vue_vue_type_script_setup_true_lang-6EgeQ9yM.js";import{d as o,a as t,o as a}from"./index-WFQJAeoE.js";const m=o({__name:"EditSingleCustomer",setup(r){return(n,s)=>(a(),t(e))}});export{m as default}; diff --git a/apps/admin-panel/dist/assets/EditWorkshop-B2I-LaXs.js b/apps/admin-panel/dist/assets/EditWorkshop-B2I-LaXs.js new file mode 100644 index 0000000..1743269 --- /dev/null +++ b/apps/admin-panel/dist/assets/EditWorkshop-B2I-LaXs.js @@ -0,0 +1 @@ +import{_ as o}from"./AddWorkshop.vue_vue_type_script_setup_true_lang-DM0hJwHH.js";import{d as e,a as r,o as t}from"./index-CVG99b4v.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-CWur6xTz.js";const m=e({__name:"EditWorkshop",setup(a){return(s,_)=>(t(),r(o))}});export{m as default}; diff --git a/apps/admin-panel/dist/assets/EditWorkshop-Bp9-GYKN.js b/apps/admin-panel/dist/assets/EditWorkshop-Bp9-GYKN.js deleted file mode 100644 index 108430c..0000000 --- a/apps/admin-panel/dist/assets/EditWorkshop-Bp9-GYKN.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o}from"./AddWorkshop.vue_vue_type_script_setup_true_lang-BXy9e7qX.js";import{d as e,a as r,o as t}from"./index-WFQJAeoE.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js";const m=e({__name:"EditWorkshop",setup(a){return(s,_)=>(t(),r(o))}});export{m as default}; diff --git a/apps/admin-panel/dist/assets/Error404-Bgg_sIhN.css b/apps/admin-panel/dist/assets/Error404-Bgg_sIhN.css deleted file mode 100644 index e32b84c..0000000 --- a/apps/admin-panel/dist/assets/Error404-Bgg_sIhN.css +++ /dev/null @@ -1 +0,0 @@ -.full-page-msg[data-v-4851d61e]{min-height:100vh;display:flex;align-items:center;justify-content:center} diff --git a/apps/admin-panel/dist/assets/Error404-CQyPUoKe.css b/apps/admin-panel/dist/assets/Error404-CQyPUoKe.css new file mode 100644 index 0000000..dd54e01 --- /dev/null +++ b/apps/admin-panel/dist/assets/Error404-CQyPUoKe.css @@ -0,0 +1 @@ +.full-page-msg[data-v-82a95474]{min-height:100vh;display:flex;align-items:center;justify-content:center} diff --git a/apps/admin-panel/dist/assets/Error404-20f85JFw.js b/apps/admin-panel/dist/assets/Error404-Dv5orb9R.js similarity index 50% rename from apps/admin-panel/dist/assets/Error404-20f85JFw.js rename to apps/admin-panel/dist/assets/Error404-Dv5orb9R.js index 7ebef2e..a7180d0 100644 --- a/apps/admin-panel/dist/assets/Error404-20f85JFw.js +++ b/apps/admin-panel/dist/assets/Error404-Dv5orb9R.js @@ -1 +1 @@ -import{_}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{b as c,c as e,w as o,f as l,r as s,o as p}from"./index-WFQJAeoE.js";const u={},d={class:"full-page-msg"};function i(r,t){const n=s("a-button"),a=s("a-result");return p(),c("div",d,[e(a,{status:"404",title:"صفحه مورد نظر یافت نشد","sub-title":"آدرسی که وارد کرده‌اید وجود ندارد."},{extra:o(()=>[e(n,{type:"primary",onClick:t[0]||(t[0]=m=>r.$router.push("/"))},{default:o(()=>[...t[1]||(t[1]=[l("بازگشت به خانه",-1)])]),_:1})]),_:1})])}const b=_(u,[["render",i],["__scopeId","data-v-4851d61e"]]);export{b as default}; +import{_}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{b as c,c as e,w as o,f as l,r as s,o as p}from"./index-CVG99b4v.js";const u={},i={class:"full-page-msg"};function m(r,t){const a=s("a-button"),n=s("a-result");return p(),c("div",i,[e(n,{status:"404",title:"صفحه مورد نظر یافت نشد","sub-title":"آدرسی که وارد کرده‌اید وجود ندارد."},{extra:o(()=>[e(a,{type:"primary",onClick:t[0]||(t[0]=d=>r.$router.push("/"))},{default:o(()=>[...t[1]||(t[1]=[l("بازگشت به خانه",-1)])]),_:1})]),_:1})])}const b=_(u,[["render",m],["__scopeId","data-v-82a95474"]]);export{b as default}; diff --git a/apps/admin-panel/dist/assets/Error500-CNgAJT0r.css b/apps/admin-panel/dist/assets/Error500-CNgAJT0r.css deleted file mode 100644 index 27c8abc..0000000 --- a/apps/admin-panel/dist/assets/Error500-CNgAJT0r.css +++ /dev/null @@ -1 +0,0 @@ -.full-page-msg[data-v-abbac884]{min-height:100vh;display:flex;align-items:center;justify-content:center} diff --git a/apps/admin-panel/dist/assets/Error500-Cne_2YUW.css b/apps/admin-panel/dist/assets/Error500-Cne_2YUW.css new file mode 100644 index 0000000..9e6fa08 --- /dev/null +++ b/apps/admin-panel/dist/assets/Error500-Cne_2YUW.css @@ -0,0 +1 @@ +.full-page-msg[data-v-1080291a]{min-height:100vh;display:flex;align-items:center;justify-content:center} diff --git a/apps/admin-panel/dist/assets/Error500-BKile5Jb.js b/apps/admin-panel/dist/assets/Error500-ludjlPuy.js similarity index 70% rename from apps/admin-panel/dist/assets/Error500-BKile5Jb.js rename to apps/admin-panel/dist/assets/Error500-ludjlPuy.js index 5553ca7..a68051a 100644 --- a/apps/admin-panel/dist/assets/Error500-BKile5Jb.js +++ b/apps/admin-panel/dist/assets/Error500-ludjlPuy.js @@ -1 +1 @@ -import{_}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{b as c,c as e,w as o,f as l,r as s,o as p}from"./index-WFQJAeoE.js";const u={},i={class:"full-page-msg"};function m(r,t){const a=s("a-button"),n=s("a-result");return p(),c("div",i,[e(n,{status:"500",title:"خطای سرور","sub-title":"مشکلی در سرور رخ داده است. لطفاً بعداً تلاش کنید."},{extra:o(()=>[e(a,{type:"primary",onClick:t[0]||(t[0]=d=>r.$router.push("/"))},{default:o(()=>[...t[1]||(t[1]=[l("بازگشت به خانه",-1)])]),_:1})]),_:1})])}const x=_(u,[["render",m],["__scopeId","data-v-abbac884"]]);export{x as default}; +import{_}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{b as c,c as e,w as o,f as l,r as s,o as p}from"./index-CVG99b4v.js";const u={},i={class:"full-page-msg"};function m(r,t){const a=s("a-button"),n=s("a-result");return p(),c("div",i,[e(n,{status:"500",title:"خطای سرور","sub-title":"مشکلی در سرور رخ داده است. لطفاً بعداً تلاش کنید."},{extra:o(()=>[e(a,{type:"primary",onClick:t[0]||(t[0]=d=>r.$router.push("/"))},{default:o(()=>[...t[1]||(t[1]=[l("بازگشت به خانه",-1)])]),_:1})]),_:1})])}const b=_(u,[["render",m],["__scopeId","data-v-1080291a"]]);export{b as default}; diff --git a/apps/admin-panel/dist/assets/FacilityList.vue_vue_type_script_setup_true_lang-C5xeMC8b.js b/apps/admin-panel/dist/assets/FacilityList.vue_vue_type_script_setup_true_lang-C5xeMC8b.js deleted file mode 100644 index b11f1ed..0000000 --- a/apps/admin-panel/dist/assets/FacilityList.vue_vue_type_script_setup_true_lang-C5xeMC8b.js +++ /dev/null @@ -1 +0,0 @@ -import{d as E,a as i,w as l,r as C,o as s,c as d,W as P,n as w,h as r,E as h,K as B,J as L,V as S,l as p,x as V,z as y,k as A}from"./index-WFQJAeoE.js";import{X as I}from"./model-Di_BQPv1.js";import{_ as N}from"./ListPageHeader.vue_vue_type_script_setup_true_lang-BmENA4yH.js";const X={class:"flex gap-2"},K=E({__name:"FacilityList",props:{title:{},model:{},editPath:{},activePath:{},addRid:{},addLabel:{}},setup(a){const k=a,$=A(),f=p(null),c=p(!1),m=p(void 0);function _(){m.value=void 0,c.value=!0}function b(e){m.value=e,c.value=!0}function g(e){c.value=e}function O(){var e;(e=f.value)==null||e.fetch()}function R(e){$.push(`${k.editPath}/${e}`)}async function x(e){var o,n,u;try{await V.get(`${k.activePath}/${e}`),y.success("تغییرات ثبت شد"),(o=f.value)==null||o.fetch()}catch(t){y.error(((u=(n=t==null?void 0:t.response)==null?void 0:n.data)==null?void 0:u.message)??"خطا در تغییر وضعیت")}}return(e,o)=>{const n=C("a-tooltip"),u=C("a-card");return s(),i(u,{title:a.title},{default:l(()=>[d(I,{ref_key:"tbl",ref:f,model:a.model},P({actions:l(({record:t})=>[w("div",X,[a.addRid?(s(),i(n,{key:0,title:"ویرایش"},{default:l(()=>[d(r(h),{class:"cursor-pointer mx-1 text-primary",onClick:v=>b(t.id)},null,8,["onClick"])]),_:2},1024)):(s(),i(n,{key:1,title:"ویرایش"},{default:l(()=>[d(r(h),{class:"cursor-pointer mx-1 text-primary",onClick:v=>R(t.id)},null,8,["onClick"])]),_:2},1024)),d(n,{title:"وضعیت"},{default:l(()=>[t.is_active?(s(),i(r(B),{key:0,class:"cursor-pointer mx-1 text-success",onClick:v=>x(t.id)},null,8,["onClick"])):(s(),i(r(L),{key:1,class:"cursor-pointer mx-1 text-danger",onClick:v=>x(t.id)},null,8,["onClick"]))]),_:2},1024)])]),_:2},[a.addRid?{name:"add",fn:l(()=>[d(N,{rid:a.addRid,"add-label":a.addLabel,onAdd:o[0]||(o[0]=t=>_())},null,8,["rid","add-label"])]),key:"0"}:void 0]),1032,["model"]),S(e.$slots,"form",{open:c.value,editingId:m.value,onUpdateOpen:g,onSuccess:O})]),_:3},8,["title"])}}});export{K as _}; diff --git a/apps/admin-panel/dist/assets/FacilityList.vue_vue_type_script_setup_true_lang-CcehyYuf.js b/apps/admin-panel/dist/assets/FacilityList.vue_vue_type_script_setup_true_lang-CcehyYuf.js new file mode 100644 index 0000000..04668cb --- /dev/null +++ b/apps/admin-panel/dist/assets/FacilityList.vue_vue_type_script_setup_true_lang-CcehyYuf.js @@ -0,0 +1 @@ +import{d as E,a as i,w as l,r as C,o as s,c as d,_ as L,n as P,h as r,E as h,N as w,L as B,Y as N,l as p,x as S,z as y,k as A}from"./index-CVG99b4v.js";import{X as I}from"./model-CvqTGmy8.js";import{_ as V}from"./ListPageHeader.vue_vue_type_script_setup_true_lang-CetMN4WH.js";const X={class:"flex gap-2"},U=E({__name:"FacilityList",props:{title:{},model:{},editPath:{},activePath:{},addRid:{},addLabel:{}},setup(a){const k=a,_=A(),f=p(null),c=p(!1),m=p(void 0);function $(){m.value=void 0,c.value=!0}function b(e){m.value=e,c.value=!0}function g(e){c.value=e}function O(){var e;(e=f.value)==null||e.fetch()}function R(e){_.push(`${k.editPath}/${e}`)}async function x(e){var o,n,u;try{await S.get(`${k.activePath}/${e}`),y.success("تغییرات ثبت شد"),(o=f.value)==null||o.fetch()}catch(t){y.error(((u=(n=t==null?void 0:t.response)==null?void 0:n.data)==null?void 0:u.message)??"خطا در تغییر وضعیت")}}return(e,o)=>{const n=C("a-tooltip"),u=C("a-card");return s(),i(u,{title:a.title},{default:l(()=>[d(I,{ref_key:"tbl",ref:f,model:a.model},L({actions:l(({record:t})=>[P("div",X,[a.addRid?(s(),i(n,{key:0,title:"ویرایش"},{default:l(()=>[d(r(h),{class:"cursor-pointer mx-1 text-primary",onClick:v=>b(t.id)},null,8,["onClick"])]),_:2},1024)):(s(),i(n,{key:1,title:"ویرایش"},{default:l(()=>[d(r(h),{class:"cursor-pointer mx-1 text-primary",onClick:v=>R(t.id)},null,8,["onClick"])]),_:2},1024)),d(n,{title:"وضعیت"},{default:l(()=>[t.is_active?(s(),i(r(w),{key:0,class:"cursor-pointer mx-1 text-success",onClick:v=>x(t.id)},null,8,["onClick"])):(s(),i(r(B),{key:1,class:"cursor-pointer mx-1 text-danger",onClick:v=>x(t.id)},null,8,["onClick"]))]),_:2},1024)])]),_:2},[a.addRid?{name:"add",fn:l(()=>[d(V,{rid:a.addRid,"add-label":a.addLabel,onAdd:o[0]||(o[0]=t=>$())},null,8,["rid","add-label"])]),key:"0"}:void 0]),1032,["model"]),N(e.$slots,"form",{open:c.value,editingId:m.value,onUpdateOpen:g,onSuccess:O})]),_:3},8,["title"])}}});export{U as _}; diff --git a/apps/admin-panel/dist/assets/FullPage-AGcOKs3k.js b/apps/admin-panel/dist/assets/FullPage-B0IlrbNX.js similarity index 77% rename from apps/admin-panel/dist/assets/FullPage-AGcOKs3k.js rename to apps/admin-panel/dist/assets/FullPage-B0IlrbNX.js index d43cb14..978b36f 100644 --- a/apps/admin-panel/dist/assets/FullPage-AGcOKs3k.js +++ b/apps/admin-panel/dist/assets/FullPage-B0IlrbNX.js @@ -1 +1 @@ -import{_ as o}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{b as t,c as r,r as c,o as s}from"./index-WFQJAeoE.js";const n={},a={class:"layout--full-page"};function _(l,f){const e=c("router-view");return s(),t("div",a,[r(e)])}const p=o(n,[["render",_]]);export{p as default}; +import{_ as o}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{b as t,c as r,r as c,o as s}from"./index-CVG99b4v.js";const n={},a={class:"layout--full-page"};function _(l,f){const e=c("router-view");return s(),t("div",a,[r(e)])}const p=o(n,[["render",_]]);export{p as default}; diff --git a/apps/admin-panel/dist/assets/IamCallback-D0SGhdLL.js b/apps/admin-panel/dist/assets/IamCallback-D0SGhdLL.js new file mode 100644 index 0000000..b02f985 --- /dev/null +++ b/apps/admin-panel/dist/assets/IamCallback-D0SGhdLL.js @@ -0,0 +1 @@ +import{d as c,v as r,x as n,b as i,k as d,o as l}from"./index-CVG99b4v.js";import{u as m}from"./auth-Cu4qHRNu.js";const u={style:{"min-height":"100vh",display:"grid","place-items":"center"}},g=c({__name:"IamCallback",setup(p){const t=d(),o=m();return r(async()=>{const e=new URLSearchParams(window.location.search);if(sessionStorage.setItem("gb_admin_iam_sso_checked","1"),e.get("error")||!e.get("code")||!e.get("state")){await t.replace("/auth/login");return}try{const{data:s}=await n.post("admin/auth/sso/callback",{code:e.get("code"),state:e.get("state")}),a={...s};delete a.roles,delete a.ut,o.inject(a),await t.replace("/dashboard/ecommerce")}catch{await t.replace("/auth/login")}}),(e,s)=>(l(),i("div",u,"در حال ورود..."))}});export{g as default}; diff --git a/apps/admin-panel/dist/assets/ImageUploadInput.vue_vue_type_script_setup_true_lang-BQ_i_QZe.js b/apps/admin-panel/dist/assets/ImageUploadInput.vue_vue_type_script_setup_true_lang-C8WW9alD.js similarity index 70% rename from apps/admin-panel/dist/assets/ImageUploadInput.vue_vue_type_script_setup_true_lang-BQ_i_QZe.js rename to apps/admin-panel/dist/assets/ImageUploadInput.vue_vue_type_script_setup_true_lang-C8WW9alD.js index f91f791..678adf1 100644 --- a/apps/admin-panel/dist/assets/ImageUploadInput.vue_vue_type_script_setup_true_lang-BQ_i_QZe.js +++ b/apps/admin-panel/dist/assets/ImageUploadInput.vue_vue_type_script_setup_true_lang-C8WW9alD.js @@ -1 +1 @@ -import{d as B,m as P,o as u,b as r,c as m,w as h,a as N,h as b,P as z,n as g,t as D,i as I,l as i,p as R,x as S,z as U,r as f}from"./index-WFQJAeoE.js";const q={class:"image-upload"},E={key:0},F={key:1},L={style:{"margin-top":"8px"}},O=["src"],j=B({__name:"ImageUploadInput",props:{modelValue:{default:null},purpose:{default:void 0},placeholder:{default:"بارگذاری"}},emits:["update:modelValue","ok"],setup(w,{emit:y}){const l=w,p=y,c=i(!1),d=i(!1),v=i(""),o=i([]);P(()=>l.modelValue,e=>{var a;e?((a=o.value[0])==null?void 0:a.url)!==e&&(o.value=[{uid:e,name:e.split("/").pop()??"file",status:"done",url:e}]):o.value=[]},{immediate:!0});const V=R(()=>l.placeholder);async function k({file:e}){var s,n;const a=new FormData;a.append("file",e),l.purpose&&a.append("purpose",l.purpose),c.value=!0;try{const{data:t}=await S.post("file/create",a);p("update:modelValue",t.url),p("ok",t)}catch(t){const _=((n=(s=t==null?void 0:t.response)==null?void 0:s.data)==null?void 0:n.message)??"بارگذاری فایل ناموفق بود";U.error(_)}finally{c.value=!1}}function x(){return p("update:modelValue",null),!0}function C(e){v.value=e.url,d.value=!0}return(e,a)=>{const s=f("a-spin"),n=f("a-upload"),t=f("a-modal");return u(),r("div",q,[m(n,{"file-list":o.value,"list-type":"picture-card","max-count":1,accept:"image/*","custom-request":k,onRemove:x,onPreview:C},{default:h(()=>[o.value.length===0?(u(),r("div",E,[c.value?(u(),N(s,{key:0,size:"small"})):(u(),r("div",F,[m(b(z)),g("div",L,D(V.value),1)]))])):I("",!0)]),_:1},8,["file-list"]),m(t,{open:d.value,footer:null,onCancel:a[0]||(a[0]=_=>d.value=!1)},{default:h(()=>[g("img",{src:v.value,style:{width:"100%"},alt:""},null,8,O)]),_:1},8,["open"])])}}});export{j as _}; +import{d as B,m as N,o as u,b as r,c as m,w as h,a as P,h as S,S as b,n as g,t as z,i as D,l as i,p as I,x as R,z as U,r as f}from"./index-CVG99b4v.js";const q={class:"image-upload"},E={key:0},F={key:1},L={style:{"margin-top":"8px"}},O=["src"],j=B({__name:"ImageUploadInput",props:{modelValue:{default:null},purpose:{default:void 0},placeholder:{default:"بارگذاری"}},emits:["update:modelValue","ok"],setup(w,{emit:y}){const l=w,p=y,c=i(!1),d=i(!1),v=i(""),o=i([]);N(()=>l.modelValue,e=>{var a;e?((a=o.value[0])==null?void 0:a.url)!==e&&(o.value=[{uid:e,name:e.split("/").pop()??"file",status:"done",url:e}]):o.value=[]},{immediate:!0});const V=I(()=>l.placeholder);async function k({file:e}){var s,n;const a=new FormData;a.append("file",e),l.purpose&&a.append("purpose",l.purpose),c.value=!0;try{const{data:t}=await R.post("file/create",a);p("update:modelValue",t.url),p("ok",t)}catch(t){const _=((n=(s=t==null?void 0:t.response)==null?void 0:s.data)==null?void 0:n.message)??"بارگذاری فایل ناموفق بود";U.error(_)}finally{c.value=!1}}function x(){return p("update:modelValue",null),!0}function C(e){v.value=e.url,d.value=!0}return(e,a)=>{const s=f("a-spin"),n=f("a-upload"),t=f("a-modal");return u(),r("div",q,[m(n,{"file-list":o.value,"list-type":"picture-card","max-count":1,accept:"image/*","custom-request":k,onRemove:x,onPreview:C},{default:h(()=>[o.value.length===0?(u(),r("div",E,[c.value?(u(),P(s,{key:0,size:"small"})):(u(),r("div",F,[m(S(b)),g("div",L,z(V.value),1)]))])):D("",!0)]),_:1},8,["file-list"]),m(t,{open:d.value,footer:null,onCancel:a[0]||(a[0]=_=>d.value=!1)},{default:h(()=>[g("img",{src:v.value,style:{width:"100%"},alt:""},null,8,O)]),_:1},8,["open"])])}}});export{j as _}; diff --git a/apps/admin-panel/dist/assets/List-BtjkagGb.js b/apps/admin-panel/dist/assets/List-BtjkagGb.js new file mode 100644 index 0000000..8c90c87 --- /dev/null +++ b/apps/admin-panel/dist/assets/List-BtjkagGb.js @@ -0,0 +1 @@ +import{u as q,d as oe,b as i,c as l,w as t,p as ne,r as c,o as n,h as K,A as ae,t as s,i as p,n as b,a as f,F as P,e as V,f as d,l as U,x as N,z as h,H as le}from"./index-CVG99b4v.js";import{a as se,b as v,X as re}from"./model-CvqTGmy8.js";import{_ as X}from"./TooltipBtn.vue_vue_type_script_setup_true_lang-DxnpxKjK.js";import{a as ie,j as de}from"./filters-UavLT20t.js";import{_ as ue}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./SettingOutlined-D7--Xtqg.js";import"./icons-BaVxJrpa.js";import"./TeamOutlined-BEJyrWYB.js";import"./UnorderedListOutlined-CKa6XzC7.js";import"./CreditCardOutlined-wQJvlSrP.js";import"./index-pLFqZCCf.js";function ce(){const u=new se("admin/orders/list","لیست سفارش های تک فروشی");u.add(new v("id","شماره").filterNumber()),u.add(new v("customer.fname","نام مشتری").filterKey("customer.fullName").filterText()),u.add(new v("customer.lname","نام خانوادگی").filterKey("customer.fullName").filterText()),u.add(new v("total_price","جمع کل سفارش").renderSlot("total_price").filterText()),u.add(new v("items","تعداد آیتم ها").renderSlot("items_len").noSort()),u.add(new v("caj","تاریخ ثبت").filterKey("createdAt").filterDate().noSort()),u.add(new v("uaj","تاریخ ویرایش").hidden().filterKey("updatedAt").filterDate().noSort()),u.add(new v("user","ثبت کننده").renderSlot("user").noSort());const $=q();return $.roles&&$.roles.includes("order.tamin.state")&&(u.add(new v("sts_str","وضعیت").renderSlot("sts").noSort()),u.add(new v("branch.name","نام شعبه").filterText().noSort())),u.add(new v("opt","عملیات").noSort().renderSlot("opt")),u}const _e={id:"page-user-list"},fe={class:"flex"},pe={key:0},ve={key:0},me={key:1},ye={key:0},ke=["onClick"],we={key:1},be={class:"flex flex-col"},ge={key:0},he={class:"flex"},Se={class:"flex-1"},Ce={key:1,class:"flex items-center"},xe={key:2},Ue={key:0},$e={class:"flex justify-between"},je=oe({__name:"List",setup(u){const $=q(),k=a=>!!$.hasPermission(a),z=ce(),j=U(null),r=U(void 0),S=U(!1),C=U(!1),x=U(!1),A=ne(()=>le()),T=a=>a?de(a):"";function M(a){return a.proceed?"green":"gray"}async function O(a){a.branch_id||(r.value=await B(a.id),C.value=!0)}async function B(a){const{data:o}=await N.get(`admin/orders/${a}`);return o}async function R(a){var o,m;try{await N.post("single/order-sts/edit",{orderId:(o=r.value)==null?void 0:o.id,status:a.status,note:a.note}),C.value=!1,h.info("ویرایش موفق آمیز"),(m=j.value)==null||m.fetch()}catch{h.error("خطا در ویرایش")}}async function E(a){var o,m;try{await N.post("single/order-sts/edit",{orderId:(o=r.value)==null?void 0:o.id,status:a.status,note:a.note,remove:!0}),C.value=!1,h.info("ویرایش موفق آمیز"),(m=j.value)==null||m.fetch()}catch{h.error("خطا در ویرایش")}}async function H(){var a;try{x.value=!x.value,S.value=!S.value,h.info("ویرایش موفق آمیز"),(a=j.value)==null||a.fetch()}catch{h.error("خطا در ویرایش")}}async function G(a){r.value=await B(a.id),S.value=!0}async function J(a){h.warning("خروجی PDF هنوز در بک‌اند جدید پیاده‌سازی نشده است")}return(a,o)=>{const m=c("a-tag"),g=c("a-button"),Q=c("a-popconfirm"),W=c("a-input"),Y=c("a-timeline-item"),Z=c("a-timeline"),D=c("a-modal"),y=c("a-descriptions-item"),L=c("a-descriptions"),I=c("a-input-number"),ee=c("a-divider"),F=c("a-card"),te=c("a-empty");return n(),i("div",_e,[l(F,{title:A.value?"لیست سفارش":"لیست سفارش های تک فروشی"},{default:t(()=>[l(re,{ref_key:"tbl",ref:j,model:K(z)},{opt:t(({record:e})=>[b("div",fe,[k("order.list.view")?(n(),f(X,{key:0,"icon-class":"w-5 h-5 text-primary",class:"mr-3",icon:"ListIcon",title:"مشاهده سفارش",onClick:_=>G(e)},null,8,["onClick"])):p("",!0),k("order.list.pdf")?(n(),f(X,{key:1,"icon-class":"w-5 h-5 text-danger",class:"mr-3",icon:"FileIcon",title:"دانلود pdf",onClick:_=>J(e.id)},null,8,["onClick"])):p("",!0)])]),items_len:t(({text:e})=>[e?(n(),i("div",pe,s(e.length),1)):p("",!0)]),user:t(({text:e,record:_})=>[e?(n(),i("div",ve,s(e.name),1)):(n(),i("div",me,s(_.customer.fname+" "+_.customer.lname),1))]),total_price:t(({text:e})=>[e?(n(),i("div",ye,s(K(ie)(e)),1)):p("",!0)]),sts:t(({text:e,record:_})=>[k("order.list.sts")?(n(),i("a",{key:0,href:"",onClick:ae(w=>O(_),["prevent"])},s(e),9,ke)):(n(),i("span",we,s(e),1))]),_:1},8,["model"]),l(D,{open:C.value,"onUpdate:open":o[1]||(o[1]=e=>C.value=e),title:"وضعیت سفارش"},{footer:t(()=>[l(g,{onClick:o[0]||(o[0]=e=>C.value=!1)},{default:t(()=>[...o[8]||(o[8]=[d("باشه",-1)])]),_:1})]),default:t(()=>[r.value?(n(),f(Z,{key:0},{default:t(()=>[(n(!0),i(P,null,V(r.value.activity,(e,_)=>(n(),f(Y,{key:_,color:M(e)},{default:t(()=>[b("div",be,[b("div",null,s(e.title),1),e.proceed?(n(),i("div",ge,[b("div",he,[b("div",Se,[l(m,null,{default:t(()=>[d(s(T(e.uaj)),1)]),_:2},1024)]),_>0&&k("order.list.sts.remove")?(n(),f(Q,{key:0,"ok-text":"بله","cancel-text":"بی خیال",onConfirm:w=>E(e)},{title:t(()=>[...o[5]||(o[5]=[b("p",null,"آیا مطمئن به حذف وضعیت مورد نظر هستید ؟",-1)])]),default:t(()=>[l(g,{size:"small",danger:""},{default:t(()=>[...o[6]||(o[6]=[d("حذف وضعیت",-1)])]),_:1})]),_:1},8,["onConfirm"])):p("",!0)])])):p("",!0),!e.proceed&&k("order.list.sts.submit")?(n(),i("div",Ce,[l(W,{value:e.note,"onUpdate:value":w=>e.note=w,placeholder:"یادداشت"},null,8,["value","onUpdate:value"]),l(g,{type:"text",size:"small",onClick:w=>R(e)},{default:t(()=>[...o[7]||(o[7]=[d("ثبت وضعیت",-1)])]),_:1},8,["onClick"])])):p("",!0),e.proceed?(n(),i("div",xe,s(e.note),1)):p("",!0)])]),_:2},1032,["color"]))),128))]),_:1})):p("",!0)]),_:1},8,["open"]),l(D,{open:S.value,"onUpdate:open":o[4]||(o[4]=e=>S.value=e),title:"مشاهده سفارش",width:"80%"},{footer:t(()=>[b("div",$e,[l(g,{onClick:o[2]||(o[2]=e=>S.value=!1)},{default:t(()=>[...o[9]||(o[9]=[d("باشه",-1)])]),_:1}),x.value&&k("order.list.view.edit")?(n(),f(g,{key:0,danger:"",onClick:o[3]||(o[3]=e=>H())},{default:t(()=>[...o[10]||(o[10]=[d(" ویرایش سفارش ",-1)])]),_:1})):p("",!0)])]),default:t(()=>[r.value?(n(),i("div",Ue,[l(L,null,{default:t(()=>[l(y,{label:"مشتری"},{default:t(()=>[d(s(r.value.customer.fname)+" "+s(r.value.customer.lname),1)]),_:1}),l(y,{label:"تلفن همراه"},{default:t(()=>[d(s(r.value.customer.phone),1)]),_:1}),l(y,{label:"تاریخ ثبت"},{default:t(()=>[d(s(T(r.value.caj)),1)]),_:1}),l(y,{label:"وضعیت"},{default:t(()=>[d(s(r.value.sts_str),1)]),_:1})]),_:1}),l(F,{title:"آیتم های سفارش"},{default:t(()=>[(n(!0),i(P,null,V(r.value.items,(e,_)=>(n(),i("div",{key:_},[l(L,null,{default:t(()=>[l(y,{label:"نام محصول"},{default:t(()=>[l(m,{color:"blue"},{default:t(()=>[d(s(e.title),1)]),_:2},1024)]),_:2},1024),l(y,{label:"عنوان تنوع"},{default:t(()=>[d(s(e.variant_title),1)]),_:2},1024),l(y,{label:"وزن نهایی"},{default:t(()=>[x.value&&k("order.list.view.edit")?(n(),f(I,{key:0,value:e.grams,"onUpdate:value":w=>e.grams=w,class:"w-full mt-0"},null,8,["value","onUpdate:value"])):(n(),f(m,{key:1,color:"red"},{default:t(()=>[d(s(e.grams),1)]),_:2},1024))]),_:2},1024),l(y,{label:"تعداد"},{default:t(()=>[x.value&&k("order.list.view.edit")?(n(),f(I,{key:0,value:e.qty,"onUpdate:value":w=>e.qty=w},null,8,["value","onUpdate:value"])):(n(),f(m,{key:1,color:"orange"},{default:t(()=>[d(s(e.qty),1)]),_:2},1024))]),_:2},1024),l(y,{label:"توضیحات"},{default:t(()=>[b("div",null,s(e.note),1)]),_:2},1024)]),_:2},1024),_!!$.hasPermission(a),A=ce(),j=U(null),c=U(void 0),g=U(!1),h=U(!1),S=U(!1),I=ne(()=>le()),T=a=>a?de(a):"";function M(a){return a.proceed?"green":"gray"}async function O(a){a.branch_id||(c.value=await B(a.id),h.value=!0)}async function B(a){const{data:o}=await N.get(`admin/orders/${a}`);return o}async function R(a){var o;try{await N.post("single/order-sts/edit",a),h.value=!1,b.info("ویرایش موفق آمیز"),(o=j.value)==null||o.fetch()}catch{b.error("خطا در ویرایش")}}async function E(a){var o;try{a.remove=!0,await N.post("single/order-sts/edit",a),h.value=!1,b.info("ویرایش موفق آمیز"),(o=j.value)==null||o.fetch()}catch{b.error("خطا در ویرایش")}}async function G(){var a;try{S.value=!S.value,g.value=!g.value,b.info("ویرایش موفق آمیز"),(a=j.value)==null||a.fetch()}catch{b.error("خطا در ویرایش")}}async function H(a){c.value=await B(a.id),g.value=!0}async function J(a){b.warning("خروجی PDF هنوز در بک‌اند جدید پیاده‌سازی نشده است")}return(a,o)=>{const C=u("a-tag"),x=u("a-button"),Q=u("a-popconfirm"),W=u("a-input"),Y=u("a-timeline-item"),Z=u("a-timeline"),D=u("a-modal"),v=u("a-descriptions-item"),L=u("a-descriptions"),F=u("a-input-number"),ee=u("a-divider"),K=u("a-card"),te=u("a-empty");return n(),r("div",_e,[l(K,{title:I.value?"لیست سفارش":"لیست سفارش های تک فروشی"},{default:t(()=>[l(re,{ref_key:"tbl",ref:j,model:P(A)},{opt:t(({record:e})=>[w("div",fe,[y("order.list.view")?(n(),f(q,{key:0,"icon-class":"w-5 h-5 text-primary",class:"mr-3",icon:"ListIcon",title:"مشاهده سفارش",onClick:_=>H(e)},null,8,["onClick"])):p("",!0),y("order.list.pdf")?(n(),f(q,{key:1,"icon-class":"w-5 h-5 text-danger",class:"mr-3",icon:"FileIcon",title:"دانلود pdf",onClick:_=>J(e.id)},null,8,["onClick"])):p("",!0)])]),items_len:t(({text:e})=>[e?(n(),r("div",pe,s(e.length),1)):p("",!0)]),user:t(({text:e,record:_})=>[e?(n(),r("div",me,s(e.name),1)):(n(),r("div",ve,s(_.customer.fname+" "+_.customer.lname),1))]),total_price:t(({text:e})=>[e?(n(),r("div",ye,s(P(ie)(e)),1)):p("",!0)]),sts:t(({text:e,record:_})=>[y("order.list.sts")?(n(),r("a",{key:0,href:"",onClick:ae(k=>O(_),["prevent"])},s(e),9,ke)):(n(),r("span",we,s(e),1))]),_:1},8,["model"]),l(D,{open:h.value,"onUpdate:open":o[1]||(o[1]=e=>h.value=e),title:"وضعیت سفارش"},{footer:t(()=>[l(x,{onClick:o[0]||(o[0]=e=>h.value=!1)},{default:t(()=>[...o[8]||(o[8]=[i("باشه",-1)])]),_:1})]),default:t(()=>[c.value?(n(),f(Z,{key:0},{default:t(()=>[(n(!0),r(V,null,X(c.value.activity,(e,_)=>(n(),f(Y,{key:_,color:M(e)},{default:t(()=>[w("div",be,[w("div",null,s(e.title),1),e.proceed?(n(),r("div",ge,[w("div",he,[w("div",Ce,[l(C,null,{default:t(()=>[i(s(T(e.uaj)),1)]),_:2},1024)]),_>0&&y("order.list.sts.remove")?(n(),f(Q,{key:0,"ok-text":"بله","cancel-text":"بی خیال",onConfirm:k=>E(e)},{title:t(()=>[...o[5]||(o[5]=[w("p",null,"آیا مطمئن به حذف وضعیت مورد نظر هستید ؟",-1)])]),default:t(()=>[l(x,{size:"small",danger:""},{default:t(()=>[...o[6]||(o[6]=[i("حذف وضعیت",-1)])]),_:1})]),_:1},8,["onConfirm"])):p("",!0)])])):p("",!0),!e.proceed&&y("order.list.sts.submit")?(n(),r("div",Se,[l(W,{value:e.note,"onUpdate:value":k=>e.note=k,placeholder:"یادداشت"},null,8,["value","onUpdate:value"]),l(x,{type:"text",size:"small",onClick:k=>R(e)},{default:t(()=>[...o[7]||(o[7]=[i("ثبت وضعیت",-1)])]),_:1},8,["onClick"])])):p("",!0),e.proceed?(n(),r("div",xe,s(e.note),1)):p("",!0)])]),_:2},1032,["color"]))),128))]),_:1})):p("",!0)]),_:1},8,["open"]),l(D,{open:g.value,"onUpdate:open":o[4]||(o[4]=e=>g.value=e),title:"مشاهده سفارش",width:"80%"},{footer:t(()=>[w("div",$e,[l(x,{onClick:o[2]||(o[2]=e=>g.value=!1)},{default:t(()=>[...o[9]||(o[9]=[i("باشه",-1)])]),_:1}),S.value&&y("order.list.view.edit")?(n(),f(x,{key:0,danger:"",onClick:o[3]||(o[3]=e=>G())},{default:t(()=>[...o[10]||(o[10]=[i(" ویرایش سفارش ",-1)])]),_:1})):p("",!0)])]),default:t(()=>[c.value?(n(),r("div",Ue,[l(L,null,{default:t(()=>[l(v,{label:"مشتری"},{default:t(()=>[i(s(c.value.customer.fname)+" "+s(c.value.customer.lname),1)]),_:1}),l(v,{label:"تلفن همراه"},{default:t(()=>[i(s(c.value.customer.phone),1)]),_:1}),l(v,{label:"تاریخ ثبت"},{default:t(()=>[i(s(T(c.value.caj)),1)]),_:1}),l(v,{label:"وضعیت"},{default:t(()=>[i(s(c.value.sts_str),1)]),_:1})]),_:1}),l(K,{title:"آیتم های سفارش"},{default:t(()=>[(n(!0),r(V,null,X(c.value.items,(e,_)=>(n(),r("div",{key:_},[l(L,null,{default:t(()=>[l(v,{label:"نام محصول"},{default:t(()=>[l(C,{color:"blue"},{default:t(()=>[i(s(e.title),1)]),_:2},1024)]),_:2},1024),l(v,{label:"عنوان تنوع"},{default:t(()=>[i(s(e.variant_title),1)]),_:2},1024),l(v,{label:"وزن نهایی"},{default:t(()=>[S.value&&y("order.list.view.edit")?(n(),f(F,{key:0,value:e.grams,"onUpdate:value":k=>e.grams=k,class:"w-full mt-0"},null,8,["value","onUpdate:value"])):(n(),f(C,{key:1,color:"red"},{default:t(()=>[i(s(e.grams),1)]),_:2},1024))]),_:2},1024),l(v,{label:"تعداد"},{default:t(()=>[S.value&&y("order.list.view.edit")?(n(),f(F,{key:0,value:e.qty,"onUpdate:value":k=>e.qty=k},null,8,["value","onUpdate:value"])):(n(),f(C,{key:1,color:"orange"},{default:t(()=>[i(s(e.qty),1)]),_:2},1024))]),_:2},1024),l(v,{label:"توضیحات"},{default:t(()=>[w("div",null,s(e.note),1)]),_:2},1024)]),_:2},1024),_!!k.hasPermission(n),y=I(),p=_(null),r=_(!1),l=_(void 0),{remove:x}=A({onSuccess:()=>{var n;return(n=p.value)==null?void 0:n.fetch()},successMessage:"دسته حذف شد",successType:"info",fallbackErrorMessage:"خطا در حذف دسته"});function C(){l.value=void 0,r.value=!0}function S(n){l.value=n,r.value=!0}return(n,a)=>{const g=u("a-tooltip"),h=u("a-popconfirm"),N=u("a-card");return c(),O("div",P,[i(N,{title:"لیست دسته بندی ها"},{default:o(()=>[i(B,{ref_key:"tbl",ref:p,model:m(y)},{add:o(()=>[i(E,{rid:"collection.create","add-label":"افزودن دسته",onAdd:C})]),image:o(({text:e})=>[w("img",{width:"90px",height:"90px",style:{"object-fit":"scale-down"},src:e&&e.image?e.image:j},null,8,U)]),opt:o(({record:e})=>[v("collection.list.edit")?(c(),f(g,{key:0,title:"ویرایش"},{default:o(()=>[i(m(T),{class:"cursor-pointer mx-1 text-primary",onClick:d=>S(e.id)},null,8,["onClick"])]),_:2},1024)):b("",!0),v("collection.list.remove")?(c(),f(g,{key:1,title:"حذف"},{default:o(()=>[i(h,{placement:"top","ok-text":"بله","cancel-text":"خیر",onConfirm:d=>m(x)(`category/${e.id}`)},{title:o(()=>[...a[2]||(a[2]=[w("p",null,"آیا مطمئن به حذف دسته مورد نظر هستید ؟",-1)])]),default:o(()=>[i(m(V),{class:"cursor-pointer mx-1 text-danger"})]),_:1},8,["onConfirm"])]),_:2},1024)):b("",!0)]),_:1},8,["model"]),(c(),f(D,{key:l.value??"new",open:r.value,id:l.value,"onUpdate:open":a[0]||(a[0]=e=>r.value=e),onSuccess:a[1]||(a[1]=e=>{var d;return(d=p.value)==null?void 0:d.fetch()})},null,8,["open","id"]))]),_:1})])}}});export{Y as default}; diff --git a/apps/admin-panel/dist/assets/List-Cs3aXsXf.js b/apps/admin-panel/dist/assets/List-Cs3aXsXf.js deleted file mode 100644 index f547ed1..0000000 --- a/apps/admin-panel/dist/assets/List-Cs3aXsXf.js +++ /dev/null @@ -1 +0,0 @@ -import{a as $,b as s,X as B}from"./model-Di_BQPv1.js";import{_ as E}from"./ListPageHeader.vue_vue_type_script_setup_true_lang-BmENA4yH.js";import{_ as D}from"./Add.vue_vue_type_script_setup_true_lang-BP3ofJiO.js";import{d as X,u as M,b as O,c as i,w as o,r as p,o as c,h as m,a as f,E as T,i as b,D as V,n as w,l as _}from"./index-WFQJAeoE.js";import{u as A}from"./useDeleteHandler-AErXCFBG.js";import"./SettingOutlined-DZJd42S-.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-BQ_i_QZe.js";function I(){const t=new $("admin/categories/list","لیست دسته بندی");return t.add(new s("id","شماره").filterNumber()),t.add(new s("image","تصویر").noSort().renderSlot("image")),t.add(new s("type_str","نوع نمایش")),t.add(new s("title","عنوان دسته").filterNumber()),t.add(new s("parent.title","پدر دسته").filterNumber()),t.add(new s("opt","عملیات").noSort().renderSlot("opt")),t}const P={id:"page-user-list"},U=["src"],j="/img/no-items.png",R=X({__name:"List",setup(t){const k=M(),v=n=>!!k.hasPermission(n),y=I(),u=_(null),l=_(!1),r=_(void 0),{remove:x}=A({onSuccess:()=>{var n;return(n=u.value)==null?void 0:n.fetch()},successMessage:"دسته حذف شد",successType:"info",fallbackErrorMessage:"خطا در حذف دسته"});function C(){r.value=void 0,l.value=!0}function S(n){r.value=n,l.value=!0}return(n,a)=>{const g=p("a-tooltip"),h=p("a-popconfirm"),N=p("a-card");return c(),O("div",P,[i(N,{title:"لیست دسته بندی ها"},{default:o(()=>[i(B,{ref_key:"tbl",ref:u,model:m(y)},{add:o(()=>[i(E,{rid:"collection.create","add-label":"افزودن دسته",onAdd:C})]),image:o(({text:e})=>[w("img",{width:"90px",height:"90px",style:{"object-fit":"scale-down"},src:e&&e.image?e.image:j},null,8,U)]),opt:o(({record:e})=>[v("collection.list.edit")?(c(),f(g,{key:0,title:"ویرایش"},{default:o(()=>[i(m(T),{class:"cursor-pointer mx-1 text-primary",onClick:d=>S(e.id)},null,8,["onClick"])]),_:2},1024)):b("",!0),v("collection.list.remove")?(c(),f(g,{key:1,title:"حذف"},{default:o(()=>[i(h,{placement:"top","ok-text":"بله","cancel-text":"خیر",onConfirm:d=>m(x)(`category/${e.id}`)},{title:o(()=>[...a[2]||(a[2]=[w("p",null,"آیا مطمئن به حذف دسته مورد نظر هستید ؟",-1)])]),default:o(()=>[i(m(V),{class:"cursor-pointer mx-1 text-danger"})]),_:1},8,["onConfirm"])]),_:2},1024)):b("",!0)]),_:1},8,["model"]),(c(),f(D,{key:r.value??"new",open:l.value,id:r.value,"onUpdate:open":a[0]||(a[0]=e=>l.value=e),onSuccess:a[1]||(a[1]=e=>{var d;return(d=u.value)==null?void 0:d.fetch()})},null,8,["open","id"]))]),_:1})])}}});export{R as default}; diff --git a/apps/admin-panel/dist/assets/List-GiTlTLjH.css b/apps/admin-panel/dist/assets/List-GiTlTLjH.css new file mode 100644 index 0000000..7a02742 --- /dev/null +++ b/apps/admin-panel/dist/assets/List-GiTlTLjH.css @@ -0,0 +1 @@ +.flex-col[data-v-a0837a14]{flex-direction:column}.flex-1[data-v-a0837a14]{flex:1}.justify-between[data-v-a0837a14]{justify-content:space-between}.mr-3[data-v-a0837a14]{margin-left:.75rem} diff --git a/apps/admin-panel/dist/assets/ListBranches-Br0nTsLr.js b/apps/admin-panel/dist/assets/ListBranches-Br0nTsLr.js new file mode 100644 index 0000000..c6501a3 --- /dev/null +++ b/apps/admin-panel/dist/assets/ListBranches-Br0nTsLr.js @@ -0,0 +1 @@ +import{_ as m}from"./FacilityList.vue_vue_type_script_setup_true_lang-CcehyYuf.js";import{_ as c}from"./AddBranches.vue_vue_type_script_setup_true_lang-DZPeg6FI.js";import{a as p,b as t}from"./model-CvqTGmy8.js";import{d as l,a as o,w as f,h as _,o as r}from"./index-CVG99b4v.js";import"./ListPageHeader.vue_vue_type_script_setup_true_lang-CetMN4WH.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-CWur6xTz.js";import"./filters-UavLT20t.js";import"./index-pLFqZCCf.js";import"./SettingOutlined-D7--Xtqg.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";function u(){const e=new p("admin/branches/list","لیست شعب");return e.add(new t("name","نام").filterText()),e.add(new t("address","آدرس").filterText()),e.add(new t("phone","شماره تلفن").filterNumber()),e.add(new t("user.name","مدیر شعبه").filterNumber().noSort()),e.add(new t("op","عملیات").noSort().renderSlot("actions")),e}const U=l({__name:"ListBranches",setup(e){const n=u();return(h,b)=>(r(),o(m,{title:"لیست شعب",model:_(n),"edit-path":"/branch/edit","active-path":"branch/active","add-rid":"branch.create","add-label":"افزودن شعبه"},{form:f(({open:i,editingId:a,onUpdateOpen:d,onSuccess:s})=>[(r(),o(c,{key:a??"new",open:i,id:a,"onUpdate:open":d,onSuccess:s},null,8,["open","id","onUpdate:open","onSuccess"]))]),_:1},8,["model"]))}});export{U as default}; diff --git a/apps/admin-panel/dist/assets/ListBranches-CElnGdqD.js b/apps/admin-panel/dist/assets/ListBranches-CElnGdqD.js deleted file mode 100644 index 95d2c82..0000000 --- a/apps/admin-panel/dist/assets/ListBranches-CElnGdqD.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as c}from"./FacilityList.vue_vue_type_script_setup_true_lang-C5xeMC8b.js";import{_ as m}from"./AddBranches.vue_vue_type_script_setup_true_lang-BTBcvf9O.js";import{a as p,b as t}from"./model-Di_BQPv1.js";import{d as l,a as n,w as f,h as _,o}from"./index-WFQJAeoE.js";import"./ListPageHeader.vue_vue_type_script_setup_true_lang-BmENA4yH.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js";import"./SettingOutlined-DZJd42S-.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";function u(){const e=new p("admin/branches/list","لیست شعب");return e.add(new t("name","نام").filterText()),e.add(new t("address","آدرس").filterText()),e.add(new t("phone","شماره تلفن").filterNumber()),e.add(new t("user.name","مدیر شعبه").filterNumber().noSort()),e.add(new t("op","عملیات").noSort().renderSlot("actions")),e}const L=l({__name:"ListBranches",setup(e){const r=u();return(h,b)=>(o(),n(c,{title:"لیست شعب",model:_(r),"edit-path":"/branch/edit","active-path":"branch/active","add-rid":"branch.create","add-label":"افزودن شعبه"},{form:f(({open:d,editingId:a,onUpdateOpen:i,onSuccess:s})=>[(o(),n(m,{key:a??"new",open:d,id:a,"onUpdate:open":i,onSuccess:s},null,8,["open","id","onUpdate:open","onSuccess"]))]),_:1},8,["model"]))}});export{L as default}; diff --git a/apps/admin-panel/dist/assets/ListInvoice-DRm_S46V.js b/apps/admin-panel/dist/assets/ListInvoice-DRm_S46V.js deleted file mode 100644 index c47837e..0000000 --- a/apps/admin-panel/dist/assets/ListInvoice-DRm_S46V.js +++ /dev/null @@ -1 +0,0 @@ -import{a as M,b as d,X as V}from"./model-Di_BQPv1.js";import{_ as h}from"./ListPageHeader.vue_vue_type_script_setup_true_lang-BmENA4yH.js";import z from"./AddInvoice-BO7d-BCP.js";import{j as K}from"./filters-C1cWKkpl.js";import{u as U}from"./useDeleteHandler-AErXCFBG.js";import{d as H,b as y,c as e,w as t,r as s,o as x,h as p,n as g,Q,E as R,D as q,f as r,t as u,a as C,l as _,x as F}from"./index-WFQJAeoE.js";import{_ as G}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./SettingOutlined-DZJd42S-.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js";import"./index-1e_FodC0.js";function J(){const n=new M("admin/invoices/list","لیست فاکتورها");return n.add(new d("id","ردیف").filterNumber()),n.add(new d("name","نام مشتری").filterKey("branch.name").filterText()),n.add(new d("sum_weight","جمع کل سفارش").filterNumber().noSort()),n.add(new d("count_item","تعداد آیتم ها").filterNumber().noSort()),n.add(new d("caj","تاریخ ثبت").filterKey("createdAt").filterDate().noSort()),n.add(new d("allocator_user.name","ثبت کننده").renderSlot("user").noSort()),n.add(new d("note","توضیحات").filterText().noSort()),n.add(new d("op","عملیات").noSort().renderSlot("actions")),n}const P={id:"page-user-list"},W={class:"flex gap-2"},Y={key:0},Z=H({__name:"ListInvoice",setup(n){const S=J(),w=_(null),f=_(!1),l=_(void 0),v=_(!1),b=_(void 0);function I(){b.value=void 0,v.value=!0}function $(c){b.value=c,v.value=!0}const D=[{title:"کد محصول",dataIndex:"product_code"},{title:"نام محصول",dataIndex:"title"},{title:"وزن",dataIndex:"grams"}];async function E(c){const{data:o}=await F.get(`branch/product/${c.id}`);l.value=o,f.value=!0}const{remove:N}=U({onSuccess:()=>{var c;return(c=w.value)==null?void 0:c.fetch()},successMessage:"فاکتور حذف شد",fallbackErrorMessage:"خطا در حذف فاکتور"});return(c,o)=>{const k=s("a-tooltip"),T=s("a-popconfirm"),m=s("a-descriptions-item"),j=s("a-descriptions"),A=s("a-table"),B=s("a-empty"),O=s("a-button"),X=s("a-modal"),L=s("a-card");return x(),y("div",P,[e(L,{title:"لیست فاکتورها"},{default:t(()=>[e(V,{ref_key:"tbl",ref:w,model:p(S)},{add:t(()=>[e(h,{rid:"invoice.create","add-label":"افزودن فاکتور",onAdd:I})]),user:t(({record:a})=>{var i;return[r(u(((i=a.allocator_user)==null?void 0:i.name)??"-"),1)]}),actions:t(({record:a})=>[g("div",W,[e(k,{title:"مشاهده"},{default:t(()=>[e(p(Q),{class:"cursor-pointer mx-1 text-success",onClick:i=>E(a)},null,8,["onClick"])]),_:2},1024),e(k,{title:"ویرایش"},{default:t(()=>[e(p(R),{class:"cursor-pointer mx-1 text-primary",onClick:i=>$(a.id)},null,8,["onClick"])]),_:2},1024),e(k,{title:"حذف"},{default:t(()=>[e(T,{placement:"top","ok-text":"بله","cancel-text":"خیر",onConfirm:i=>p(N)(`branch/product/${a.id}`)},{title:t(()=>[...o[4]||(o[4]=[g("p",null,"آیا مطمئن به حذف فاکتور مورد نظر هستید ؟",-1)])]),default:t(()=>[e(p(q),{class:"cursor-pointer mx-1 text-danger"})]),_:1},8,["onConfirm"])]),_:2},1024)])]),_:1},8,["model"]),e(X,{open:f.value,"onUpdate:open":o[1]||(o[1]=a=>f.value=a),title:"مشاهده فاکتور",width:"70%"},{footer:t(()=>[e(O,{onClick:o[0]||(o[0]=a=>f.value=!1)},{default:t(()=>[...o[5]||(o[5]=[r("بستن",-1)])]),_:1})]),default:t(()=>[l.value?(x(),y("div",Y,[e(j,{bordered:"",size:"small",column:2},{default:t(()=>[e(m,{label:"شعبه"},{default:t(()=>[r(u(l.value.name),1)]),_:1}),e(m,{label:"ثبت کننده"},{default:t(()=>{var a;return[r(u(((a=l.value.allocator_user)==null?void 0:a.name)??"-"),1)]}),_:1}),e(m,{label:"تاریخ ثبت"},{default:t(()=>[r(u(p(K)(l.value.caj)),1)]),_:1}),e(m,{label:"تعداد آیتم"},{default:t(()=>[r(u(l.value.count_item),1)]),_:1}),e(m,{label:"جمع وزن"},{default:t(()=>[r(u(l.value.sum_weight),1)]),_:1}),e(m,{label:"توضیحات"},{default:t(()=>[r(u(l.value.note??"-"),1)]),_:1})]),_:1}),e(A,{class:"mt-4",size:"small","data-source":l.value.products,columns:D,pagination:!1,"row-key":"id"},null,8,["data-source"])])):(x(),C(B,{key:1}))]),_:1},8,["open"]),(x(),C(z,{key:b.value??"new",open:v.value,id:b.value,"onUpdate:open":o[2]||(o[2]=a=>v.value=a),onSuccess:o[3]||(o[3]=a=>{var i;return(i=w.value)==null?void 0:i.fetch()})},null,8,["open","id"]))]),_:1})])}}}),ce=G(Z,[["__scopeId","data-v-6cda7919"]]);export{ce as default}; diff --git a/apps/admin-panel/dist/assets/ListInvoice-ItK3vpkA.js b/apps/admin-panel/dist/assets/ListInvoice-ItK3vpkA.js new file mode 100644 index 0000000..e817e10 --- /dev/null +++ b/apps/admin-panel/dist/assets/ListInvoice-ItK3vpkA.js @@ -0,0 +1 @@ +import{a as M,b as d,X as V}from"./model-CvqTGmy8.js";import{_ as h}from"./ListPageHeader.vue_vue_type_script_setup_true_lang-CetMN4WH.js";import z from"./AddInvoice-ErZYOCpz.js";import{j as K}from"./filters-UavLT20t.js";import{u as U}from"./useDeleteHandler-D7PJ3wUb.js";import{d as H,b as y,c as e,w as t,r as s,o as x,h as p,n as g,T as R,E as q,D as F,f as r,t as u,a as C,l as _,x as G}from"./index-CVG99b4v.js";import{_ as J}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./SettingOutlined-D7--Xtqg.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-CWur6xTz.js";import"./index-pLFqZCCf.js";function P(){const n=new M("admin/invoices/list","لیست فاکتورها");return n.add(new d("id","ردیف").filterNumber()),n.add(new d("name","نام مشتری").filterKey("branch.name").filterText()),n.add(new d("sum_weight","جمع کل سفارش").filterNumber().noSort()),n.add(new d("count_item","تعداد آیتم ها").filterNumber().noSort()),n.add(new d("caj","تاریخ ثبت").filterKey("createdAt").filterDate().noSort()),n.add(new d("allocator_user.name","ثبت کننده").renderSlot("user").noSort()),n.add(new d("note","توضیحات").filterText().noSort()),n.add(new d("op","عملیات").noSort().renderSlot("actions")),n}const Q={id:"page-user-list"},W={class:"flex gap-2"},Y={key:0},Z=H({__name:"ListInvoice",setup(n){const S=P(),w=_(null),f=_(!1),l=_(void 0),v=_(!1),b=_(void 0);function I(){b.value=void 0,v.value=!0}function $(c){b.value=c,v.value=!0}const D=[{title:"کد محصول",dataIndex:"product_code"},{title:"نام محصول",dataIndex:"title"},{title:"وزن",dataIndex:"grams"}];async function E(c){const{data:o}=await G.get(`branch/product/${c.id}`);l.value=o,f.value=!0}const{remove:N}=U({onSuccess:()=>{var c;return(c=w.value)==null?void 0:c.fetch()},successMessage:"فاکتور حذف شد",fallbackErrorMessage:"خطا در حذف فاکتور"});return(c,o)=>{const k=s("a-tooltip"),T=s("a-popconfirm"),m=s("a-descriptions-item"),j=s("a-descriptions"),A=s("a-table"),B=s("a-empty"),O=s("a-button"),X=s("a-modal"),L=s("a-card");return x(),y("div",Q,[e(L,{title:"لیست فاکتورها"},{default:t(()=>[e(V,{ref_key:"tbl",ref:w,model:p(S)},{add:t(()=>[e(h,{rid:"invoice.create","add-label":"افزودن فاکتور",onAdd:I})]),user:t(({record:a})=>{var i;return[r(u(((i=a.allocator_user)==null?void 0:i.name)??"-"),1)]}),actions:t(({record:a})=>[g("div",W,[e(k,{title:"مشاهده"},{default:t(()=>[e(p(R),{class:"cursor-pointer mx-1 text-success",onClick:i=>E(a)},null,8,["onClick"])]),_:2},1024),e(k,{title:"ویرایش"},{default:t(()=>[e(p(q),{class:"cursor-pointer mx-1 text-primary",onClick:i=>$(a.id)},null,8,["onClick"])]),_:2},1024),e(k,{title:"حذف"},{default:t(()=>[e(T,{placement:"top","ok-text":"بله","cancel-text":"خیر",onConfirm:i=>p(N)(`branch/product/${a.id}`)},{title:t(()=>[...o[4]||(o[4]=[g("p",null,"آیا مطمئن به حذف فاکتور مورد نظر هستید ؟",-1)])]),default:t(()=>[e(p(F),{class:"cursor-pointer mx-1 text-danger"})]),_:1},8,["onConfirm"])]),_:2},1024)])]),_:1},8,["model"]),e(X,{open:f.value,"onUpdate:open":o[1]||(o[1]=a=>f.value=a),title:"مشاهده فاکتور",width:"70%"},{footer:t(()=>[e(O,{onClick:o[0]||(o[0]=a=>f.value=!1)},{default:t(()=>[...o[5]||(o[5]=[r("بستن",-1)])]),_:1})]),default:t(()=>[l.value?(x(),y("div",Y,[e(j,{bordered:"",size:"small",column:2},{default:t(()=>[e(m,{label:"شعبه"},{default:t(()=>[r(u(l.value.name),1)]),_:1}),e(m,{label:"ثبت کننده"},{default:t(()=>{var a;return[r(u(((a=l.value.allocator_user)==null?void 0:a.name)??"-"),1)]}),_:1}),e(m,{label:"تاریخ ثبت"},{default:t(()=>[r(u(p(K)(l.value.caj)),1)]),_:1}),e(m,{label:"تعداد آیتم"},{default:t(()=>[r(u(l.value.count_item),1)]),_:1}),e(m,{label:"جمع وزن"},{default:t(()=>[r(u(l.value.sum_weight),1)]),_:1}),e(m,{label:"توضیحات"},{default:t(()=>[r(u(l.value.note??"-"),1)]),_:1})]),_:1}),e(A,{class:"mt-4",size:"small","data-source":l.value.products,columns:D,pagination:!1,"row-key":"id"},null,8,["data-source"])])):(x(),C(B,{key:1}))]),_:1},8,["open"]),(x(),C(z,{key:b.value??"new",open:v.value,id:b.value,"onUpdate:open":o[2]||(o[2]=a=>v.value=a),onSuccess:o[3]||(o[3]=a=>{var i;return(i=w.value)==null?void 0:i.fetch()})},null,8,["open","id"]))]),_:1})])}}}),ce=J(Z,[["__scopeId","data-v-6cda7919"]]);export{ce as default}; diff --git a/apps/admin-panel/dist/assets/ListPageHeader.vue_vue_type_script_setup_true_lang-BmENA4yH.js b/apps/admin-panel/dist/assets/ListPageHeader.vue_vue_type_script_setup_true_lang-CetMN4WH.js similarity index 51% rename from apps/admin-panel/dist/assets/ListPageHeader.vue_vue_type_script_setup_true_lang-BmENA4yH.js rename to apps/admin-panel/dist/assets/ListPageHeader.vue_vue_type_script_setup_true_lang-CetMN4WH.js index 836c61f..96b2496 100644 --- a/apps/admin-panel/dist/assets/ListPageHeader.vue_vue_type_script_setup_true_lang-BmENA4yH.js +++ b/apps/admin-panel/dist/assets/ListPageHeader.vue_vue_type_script_setup_true_lang-CetMN4WH.js @@ -1 +1 @@ -import{d,u as i,o as u,a as m,w as s,f as c,t as l,c as f,h as p,P as C,i as P,r as b}from"./index-WFQJAeoE.js";const _=d({__name:"ListPageHeader",props:{rid:{default:void 0},addLabel:{default:"افزودن"}},emits:["add"],setup(e){const o=i(),n=t=>!!o.hasPermission(t);return(t,a)=>{const r=b("a-button");return!e.rid||n(e.rid)?(u(),m(r,{key:0,type:"primary",onClick:a[0]||(a[0]=k=>t.$emit("add"))},{icon:s(()=>[f(p(C))]),default:s(()=>[c(" "+l(e.addLabel),1)]),_:1})):P("",!0)}}});export{_}; +import{d,u as i,o as u,a as m,w as s,f as c,t as l,c as f,h as p,S as C,i as b,r as k}from"./index-CVG99b4v.js";const _=d({__name:"ListPageHeader",props:{rid:{default:void 0},addLabel:{default:"افزودن"}},emits:["add"],setup(e){const o=i(),n=t=>!!o.hasPermission(t);return(t,a)=>{const r=k("a-button");return!e.rid||n(e.rid)?(u(),m(r,{key:0,type:"primary",onClick:a[0]||(a[0]=y=>t.$emit("add"))},{icon:s(()=>[f(p(C))]),default:s(()=>[c(" "+l(e.addLabel),1)]),_:1})):b("",!0)}}});export{_}; diff --git a/apps/admin-panel/dist/assets/ListUser-DdqUsBOd.js b/apps/admin-panel/dist/assets/ListUser-DdqUsBOd.js new file mode 100644 index 0000000..ec46ac6 --- /dev/null +++ b/apps/admin-panel/dist/assets/ListUser-DdqUsBOd.js @@ -0,0 +1 @@ +import{a as D,b as a,X as E}from"./model-CvqTGmy8.js";import{_ as U}from"./ListPageHeader.vue_vue_type_script_setup_true_lang-CetMN4WH.js";import $ from"./UserCreate-B8VEprZ-.js";import{d as M,u as V,v as X,x as h,b as O,c as r,w as n,l as c,r as _,o as m,h as p,a as v,E as A,i as y,D as K,n as L,f as P,t as H}from"./index-CVG99b4v.js";import{u as I}from"./useDeleteHandler-D7PJ3wUb.js";import"./filters-UavLT20t.js";import"./index-pLFqZCCf.js";import"./SettingOutlined-D7--Xtqg.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-CWur6xTz.js";function j(){const o=new D("admin/users/list","لیست مدیران");return o.add(new a("id","کد مدیر")),o.add(new a("fname","نام").filterKey("fullName").filterText()),o.add(new a("lname","نام خانوادگی").filterKey("fullName").filterText()),o.add(new a("mobile","موبایل").filterText()),o.add(new a("ut","نوع کاربر").filterNumber().renderSlot("ut")),o.add(new a("op","عملیات").noSort().renderSlot("op")),o}const q={id:"page-user-list"},te=M({__name:"ListUser",setup(o){const k=V(),x=e=>!!k.hasPermission(e),w=j(),f=c(null),b=c([]),l=c(!1),i=c(void 0);function g(e){var t;return e==null?"-":((t=b.value.find(d=>d.id===Number(e)))==null?void 0:t.title)??String(e)}function C(){i.value=void 0,l.value=!0}function T(e){i.value=e.id,l.value=!0}const{remove:N}=I({onSuccess:()=>{var e;return(e=f.value)==null?void 0:e.fetch()},successMessage:"کاربر حذف شد",fallbackErrorMessage:"خطا در حذف کاربر"});return X(async()=>{try{const{data:e}=await h.get("const/__list__ut");b.value=e}catch(e){console.log(e)}}),(e,t)=>{const d=_("a-tooltip"),S=_("a-popconfirm"),B=_("a-card");return m(),O("div",q,[r(B,{title:"لیست مدیران"},{default:n(()=>[r(E,{ref_key:"tbl",ref:f,model:p(w)},{add:n(()=>[r(U,{rid:"user.list.create","add-label":"افزودن کاربر",onAdd:C})]),ut:n(({text:s})=>[P(H(g(s)),1)]),op:n(({record:s})=>[x("user.list.edit")?(m(),v(d,{key:0,title:"ویرایش"},{default:n(()=>[r(p(A),{class:"cursor-pointer mx-1 text-primary",onClick:u=>T(s)},null,8,["onClick"])]),_:2},1024)):y("",!0),x("user.list.remove")?(m(),v(d,{key:1,title:"حذف"},{default:n(()=>[r(S,{placement:"top","ok-text":"بله","cancel-text":"خیر",onConfirm:u=>p(N)(`users/${s.id}`)},{title:n(()=>[...t[2]||(t[2]=[L("p",null,"آیا مطمئن به حذف کاربر مورد نظر هستید ؟",-1)])]),default:n(()=>[r(p(K),{class:"cursor-pointer mx-1 text-danger"})]),_:1},8,["onConfirm"])]),_:2},1024)):y("",!0)]),_:1},8,["model"]),(m(),v($,{key:i.value??"new",open:l.value,id:i.value,"onUpdate:open":t[0]||(t[0]=s=>l.value=s),onSuccess:t[1]||(t[1]=s=>{var u;return(u=f.value)==null?void 0:u.fetch()})},null,8,["open","id"]))]),_:1})])}}});export{te as default}; diff --git a/apps/admin-panel/dist/assets/ListUser-Dp_qXseC.js b/apps/admin-panel/dist/assets/ListUser-Dp_qXseC.js deleted file mode 100644 index ad8c75c..0000000 --- a/apps/admin-panel/dist/assets/ListUser-Dp_qXseC.js +++ /dev/null @@ -1 +0,0 @@ -import{a as D,b as a,X as E}from"./model-Di_BQPv1.js";import{_ as U}from"./ListPageHeader.vue_vue_type_script_setup_true_lang-BmENA4yH.js";import $ from"./UserCreate-DUjELXD2.js";import{d as M,u as V,v as X,x as h,b as O,c as r,w as n,l as c,r as _,o as m,h as p,a as v,E as A,i as y,D as K,n as L,f as P,t as H}from"./index-WFQJAeoE.js";import{u as I}from"./useDeleteHandler-AErXCFBG.js";import"./SettingOutlined-DZJd42S-.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js";function j(){const o=new D("admin/users/list","لیست مدیران");return o.add(new a("id","کد مدیر")),o.add(new a("fname","نام").filterKey("fullName").filterText()),o.add(new a("lname","نام خانوادگی").filterKey("fullName").filterText()),o.add(new a("mobile","موبایل").filterText()),o.add(new a("ut","نوع کاربر").filterNumber().renderSlot("ut")),o.add(new a("op","عملیات").noSort().renderSlot("op")),o}const q={id:"page-user-list"},Z=M({__name:"ListUser",setup(o){const k=V(),x=e=>!!k.hasPermission(e),w=j(),f=c(null),b=c([]),l=c(!1),i=c(void 0);function g(e){var t;return e==null?"-":((t=b.value.find(d=>d.id===Number(e)))==null?void 0:t.title)??String(e)}function C(){i.value=void 0,l.value=!0}function T(e){i.value=e.id,l.value=!0}const{remove:N}=I({onSuccess:()=>{var e;return(e=f.value)==null?void 0:e.fetch()},successMessage:"کاربر حذف شد",fallbackErrorMessage:"خطا در حذف کاربر"});return X(async()=>{try{const{data:e}=await h.get("const/__list__ut");b.value=e}catch(e){console.log(e)}}),(e,t)=>{const d=_("a-tooltip"),S=_("a-popconfirm"),B=_("a-card");return m(),O("div",q,[r(B,{title:"لیست مدیران"},{default:n(()=>[r(E,{ref_key:"tbl",ref:f,model:p(w)},{add:n(()=>[r(U,{rid:"user.list.create","add-label":"افزودن کاربر",onAdd:C})]),ut:n(({text:s})=>[P(H(g(s)),1)]),op:n(({record:s})=>[x("user.list.edit")?(m(),v(d,{key:0,title:"ویرایش"},{default:n(()=>[r(p(A),{class:"cursor-pointer mx-1 text-primary",onClick:u=>T(s)},null,8,["onClick"])]),_:2},1024)):y("",!0),x("user.list.remove")?(m(),v(d,{key:1,title:"حذف"},{default:n(()=>[r(S,{placement:"top","ok-text":"بله","cancel-text":"خیر",onConfirm:u=>p(N)(`users/${s.id}`)},{title:n(()=>[...t[2]||(t[2]=[L("p",null,"آیا مطمئن به حذف کاربر مورد نظر هستید ؟",-1)])]),default:n(()=>[r(p(K),{class:"cursor-pointer mx-1 text-danger"})]),_:1},8,["onConfirm"])]),_:2},1024)):y("",!0)]),_:1},8,["model"]),(m(),v($,{key:i.value??"new",open:l.value,id:i.value,"onUpdate:open":t[0]||(t[0]=s=>l.value=s),onSuccess:t[1]||(t[1]=s=>{var u;return(u=f.value)==null?void 0:u.fetch()})},null,8,["open","id"]))]),_:1})])}}});export{Z as default}; diff --git a/apps/admin-panel/dist/assets/ListWorkshop-BEaJtuaB.js b/apps/admin-panel/dist/assets/ListWorkshop-BEaJtuaB.js deleted file mode 100644 index a71d75d..0000000 --- a/apps/admin-panel/dist/assets/ListWorkshop-BEaJtuaB.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as p}from"./FacilityList.vue_vue_type_script_setup_true_lang-C5xeMC8b.js";import{_ as m}from"./AddWorkshop.vue_vue_type_script_setup_true_lang-BXy9e7qX.js";import{a as c,b as e}from"./model-Di_BQPv1.js";import{d as l,a as r,w as f,h as _,o as a}from"./index-WFQJAeoE.js";import"./ListPageHeader.vue_vue_type_script_setup_true_lang-BmENA4yH.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js";import"./SettingOutlined-DZJd42S-.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";function h(){const o=new c("admin/workshops/list","لیست کارگاه ها");return o.add(new e("name","نام").filterText()),o.add(new e("address","آدرس").filterText()),o.add(new e("phone","شماره تلفن").filterNumber()),o.add(new e("op","عملیات").noSort().renderSlot("actions")),o}const L=l({__name:"ListWorkshop",setup(o){const n=h();return(w,u)=>(a(),r(p,{title:"لیست کارگاه ها",model:_(n),"edit-path":"/workshop/edit","active-path":"workshop/active","add-rid":"workshop.create","add-label":"افزودن کارگاه"},{form:f(({open:s,editingId:t,onUpdateOpen:d,onSuccess:i})=>[(a(),r(m,{key:t??"new",open:s,id:t,"onUpdate:open":d,onSuccess:i},null,8,["open","id","onUpdate:open","onSuccess"]))]),_:1},8,["model"]))}});export{L as default}; diff --git a/apps/admin-panel/dist/assets/ListWorkshop-xO2YqJRG.js b/apps/admin-panel/dist/assets/ListWorkshop-xO2YqJRG.js new file mode 100644 index 0000000..8673d3c --- /dev/null +++ b/apps/admin-panel/dist/assets/ListWorkshop-xO2YqJRG.js @@ -0,0 +1 @@ +import{_ as d}from"./FacilityList.vue_vue_type_script_setup_true_lang-CcehyYuf.js";import{_ as m}from"./AddWorkshop.vue_vue_type_script_setup_true_lang-DM0hJwHH.js";import{a as c,b as e}from"./model-CvqTGmy8.js";import{d as l,a as r,w as f,h as _,o as a}from"./index-CVG99b4v.js";import"./ListPageHeader.vue_vue_type_script_setup_true_lang-CetMN4WH.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-CWur6xTz.js";import"./filters-UavLT20t.js";import"./index-pLFqZCCf.js";import"./SettingOutlined-D7--Xtqg.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";function h(){const o=new c("admin/workshops/list","لیست کارگاه ها");return o.add(new e("name","نام").filterText()),o.add(new e("address","آدرس").filterText()),o.add(new e("phone","شماره تلفن").filterNumber()),o.add(new e("op","عملیات").noSort().renderSlot("actions")),o}const W=l({__name:"ListWorkshop",setup(o){const n=h();return(w,u)=>(a(),r(d,{title:"لیست کارگاه ها",model:_(n),"edit-path":"/workshop/edit","active-path":"workshop/active","add-rid":"workshop.create","add-label":"افزودن کارگاه"},{form:f(({open:s,editingId:t,onUpdateOpen:i,onSuccess:p})=>[(a(),r(m,{key:t??"new",open:s,id:t,"onUpdate:open":i,onSuccess:p},null,8,["open","id","onUpdate:open","onSuccess"]))]),_:1},8,["model"]))}});export{W as default}; diff --git a/apps/admin-panel/dist/assets/Login-DZTfd8tZ.js b/apps/admin-panel/dist/assets/Login-Dc00vCrx.js similarity index 94% rename from apps/admin-panel/dist/assets/Login-DZTfd8tZ.js rename to apps/admin-panel/dist/assets/Login-Dc00vCrx.js index 0484e12..0904f4c 100644 --- a/apps/admin-panel/dist/assets/Login-DZTfd8tZ.js +++ b/apps/admin-panel/dist/assets/Login-Dc00vCrx.js @@ -1 +1 @@ -import{d as C,b as E,c as a,w as n,r as s,o as M,n as t,A as N,f as V,l as u,p as m,z as A,k as L}from"./index-WFQJAeoE.js";import{_ as P}from"./montzar-icon-B0wdL36O.js";import{u as S}from"./auth-Cz9vAefU.js";import{_ as T}from"./_plugin-vue_export-helper-DlAUqK2U.js";const U={id:"page-login"},$={class:"login-grid"},F={class:"login-form"},I=C({__name:"Login",setup(J){const w=L(),h=S(),o=u(""),l=u(""),i=u(!1),c=u(!1),f=u(!1),d=m(()=>c.value?o.value?o.value.length<8?"مقدار ورودی صحیح نیست":"":"وارد کردن موبایل الزامی است":""),v=m(()=>f.value?l.value?l.value.length<5?"مقدار ورودی صحیح نیست":"":"وارد کردن رمز عبور الزامی است":""),_=m(()=>!d.value&&!v.value&&o.value!==""&&l.value!=="");async function p(){if(!(!_.value||i.value)){i.value=!0;try{await h.login({phone:o.value,password:l.value}),await w.push("/dashboard/ecommerce")}catch(g){console.log(g),A.error("خطا در ورود")}finally{i.value=!1}}}return(g,e)=>{const x=s("a-input"),b=s("a-form-item"),y=s("a-input-password"),z=s("a-button"),B=s("a-form"),k=s("a-card");return M(),E("div",U,[a(k,{class:"login-card",bordered:!1},{default:n(()=>[t("div",$,[t("div",F,[e[5]||(e[5]=t("div",{class:"vx-card__title"},[t("h4",null,"ورود به محیط مدیریت"),t("p",null,"لطفا شماره تلفن همراه خود به همراه رمز عبور وارد کنید.")],-1)),a(B,{layout:"vertical",class:"mt-8",onSubmit:N(p,["prevent"])},{default:n(()=>[a(b,{label:"موبایل","validate-status":d.value?"error":"",help:d.value},{default:n(()=>[a(x,{value:o.value,"onUpdate:value":e[0]||(e[0]=r=>o.value=r),autocomplete:"off",size:"large",onBlur:e[1]||(e[1]=r=>c.value=!0)},null,8,["value"])]),_:1},8,["validate-status","help"]),a(b,{label:"رمز عبور","validate-status":v.value?"error":"",help:v.value},{default:n(()=>[a(y,{value:l.value,"onUpdate:value":e[2]||(e[2]=r=>l.value=r),size:"large",onBlur:e[3]||(e[3]=r=>f.value=!0),onPressEnter:p},null,8,["value"])]),_:1},8,["validate-status","help"]),a(z,{type:"primary",size:"large",disabled:!_.value,loading:i.value,onClick:p},{default:n(()=>[...e[4]||(e[4]=[V(" ورود ",-1)])]),_:1},8,["disabled","loading"])]),_:1})]),e[6]||(e[6]=t("div",{class:"login-art"},[t("img",{src:P,alt:"Montzar"})],-1))])]),_:1})])}}}),D=T(I,[["__scopeId","data-v-4be9c188"]]);export{D as default}; +import{d as C,b as E,c as a,w as n,r as s,o as M,n as t,A as N,f as V,l as u,p as m,z as A,k as L}from"./index-CVG99b4v.js";import{_ as P}from"./montzar-icon-B0wdL36O.js";import{u as S}from"./auth-Cu4qHRNu.js";import{_ as T}from"./_plugin-vue_export-helper-DlAUqK2U.js";const U={id:"page-login"},$={class:"login-grid"},F={class:"login-form"},I=C({__name:"Login",setup(J){const w=L(),h=S(),o=u(""),l=u(""),i=u(!1),c=u(!1),f=u(!1),d=m(()=>c.value?o.value?o.value.length<8?"مقدار ورودی صحیح نیست":"":"وارد کردن موبایل الزامی است":""),v=m(()=>f.value?l.value?l.value.length<5?"مقدار ورودی صحیح نیست":"":"وارد کردن رمز عبور الزامی است":""),_=m(()=>!d.value&&!v.value&&o.value!==""&&l.value!=="");async function p(){if(!(!_.value||i.value)){i.value=!0;try{await h.login({phone:o.value,password:l.value}),await w.push("/dashboard/ecommerce")}catch(g){console.log(g),A.error("خطا در ورود")}finally{i.value=!1}}}return(g,e)=>{const x=s("a-input"),b=s("a-form-item"),y=s("a-input-password"),z=s("a-button"),B=s("a-form"),k=s("a-card");return M(),E("div",U,[a(k,{class:"login-card",bordered:!1},{default:n(()=>[t("div",$,[t("div",F,[e[5]||(e[5]=t("div",{class:"vx-card__title"},[t("h4",null,"ورود به محیط مدیریت"),t("p",null,"لطفا شماره تلفن همراه خود به همراه رمز عبور وارد کنید.")],-1)),a(B,{layout:"vertical",class:"mt-8",onSubmit:N(p,["prevent"])},{default:n(()=>[a(b,{label:"موبایل","validate-status":d.value?"error":"",help:d.value},{default:n(()=>[a(x,{value:o.value,"onUpdate:value":e[0]||(e[0]=r=>o.value=r),autocomplete:"off",size:"large",onBlur:e[1]||(e[1]=r=>c.value=!0)},null,8,["value"])]),_:1},8,["validate-status","help"]),a(b,{label:"رمز عبور","validate-status":v.value?"error":"",help:v.value},{default:n(()=>[a(y,{value:l.value,"onUpdate:value":e[2]||(e[2]=r=>l.value=r),size:"large",onBlur:e[3]||(e[3]=r=>f.value=!0),onPressEnter:p},null,8,["value"])]),_:1},8,["validate-status","help"]),a(z,{type:"primary",size:"large",disabled:!_.value,loading:i.value,onClick:p},{default:n(()=>[...e[4]||(e[4]=[V(" ورود ",-1)])]),_:1},8,["disabled","loading"])]),_:1})]),e[6]||(e[6]=t("div",{class:"login-art"},[t("img",{src:P,alt:"Montzar"})],-1))])]),_:1})])}}}),D=T(I,[["__scopeId","data-v-4be9c188"]]);export{D as default}; diff --git a/apps/admin-panel/dist/assets/Main-BjQ7I8Yg.js b/apps/admin-panel/dist/assets/Main-BjQ7I8Yg.js new file mode 100644 index 0000000..4ed9b12 --- /dev/null +++ b/apps/admin-panel/dist/assets/Main-BjQ7I8Yg.js @@ -0,0 +1 @@ +import{c,I as V,d as U,u as K,r as d,o as a,a as g,w as i,b as j,F as B,e as T,f as S,t as w,g as q,h as L,i as x,j as D,k as ee,l as A,m as ne,n as I,p as N,q as te,s as se}from"./index-CVG99b4v.js";import{r as J,U as oe}from"./icons-BaVxJrpa.js";import{_ as R}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{u as re}from"./auth-Cu4qHRNu.js";import{S as ie}from"./SafetyCertificateOutlined-C5Qh-j2p.js";import"./SettingOutlined-D7--Xtqg.js";import"./TeamOutlined-BEJyrWYB.js";import"./UnorderedListOutlined-CKa6XzC7.js";import"./CreditCardOutlined-wQJvlSrP.js";var ae={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5a353.84 353.84 0 01-112.7 75.9A352.8 352.8 0 01512.4 866c-47.9 0-94.3-9.4-137.9-27.8a353.84 353.84 0 01-112.7-75.9 353.28 353.28 0 01-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-.4-12.3-6.7-12.3zm88.9-226.3L815 393.7c-5.3-4.2-13-.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z"}}]},name:"logout",theme:"outlined"};function Q(e){for(var n=1;n{const P=d("NavMenuNode",!0),_=d("a-sub-menu"),y=d("a-menu-item");return e.node.submenu?(a(),g(_,{key:e.menuKey},{icon:i(()=>[e.node.icon?(a(),g(q(L(J)(e.node.icon)),{key:0})):x("",!0)]),title:i(()=>[S(w(e.node.i18n||e.node.name),1)]),default:i(()=>[(a(!0),j(B,null,T(s(e.node.submenu),(O,M)=>(a(),g(P,{key:O.url||`${e.menuKey}-${M}`,node:O,"menu-key":O.url||`${e.menuKey}-${M}`},null,8,["node","menu-key"]))),128))]),_:1})):(a(),g(y,{key:e.menuKey},{icon:i(()=>[e.node.icon?(a(),g(q(L(J)(e.node.icon)),{key:0})):x("",!0)]),default:i(()=>[S(" "+w(e.node.i18n||e.node.name),1)]),_:1}))}}}),ge={class:"nav-header"},_e={key:0,class:"nav-title"},ve=U({__name:"VerticalNavMenu",props:{title:{default:"منتزر"},collapsed:{type:Boolean,default:!1}},setup(e){const n=D(),t=ee(),s=K();function r(o){return o.permissionId?!!s.hasPermission(o.permissionId):!0}function b(o){return(o??[]).filter(r)}function P(o){return o.header?b(o.items).length>0:o.submenu?b(o.submenu).length>0:!0}const _=N(()=>fe().filter(o=>r(o)&&P(o))),y=(o,m)=>`sub-${o.name??""}-${m}`;function O(o,m,v){for(let h=0;hn.path,o=>{p.value=[o];const m=M(o);for(const v of m)u.value.includes(v)||(u.value=[...u.value,v])});function F({key:o}){const m=String(o);m.startsWith("/")&&m!==n.path&&t.push(m)}return(o,m)=>{const v=d("a-menu-item-group"),h=d("a-menu"),f=d("a-layout-sider");return a(),g(f,{collapsed:e.collapsed,trigger:null,collapsible:"",width:"260",class:"vertical-nav-menu",theme:"light"},{default:i(()=>[I("div",ge,[e.collapsed?x("",!0):(a(),j("span",_e,w(e.title),1))]),c(h,{mode:"inline",theme:"light","inline-collapsed":e.collapsed,"selected-keys":p.value,"open-keys":u.value,"onUpdate:openKeys":m[0]||(m[0]=l=>u.value=l),onClick:F},{default:i(()=>[(a(!0),j(B,null,T(_.value,(l,k)=>(a(),j(B,{key:l.url||l.header||k},[l.header?(a(),g(v,{key:0,title:l.i18n||l.header},{default:i(()=>[(a(!0),j(B,null,T(b(l.items),($,z)=>(a(),g(Z,{key:$.url||`${k}-${z}`,node:$,"menu-key":$.url||y($,z)},null,8,["node","menu-key"]))),128))]),_:2},1032,["title"])):(a(),g(Z,{key:1,node:l,"menu-key":l.url||y(l,k)},null,8,["node","menu-key"]))],64))),128))]),_:1},8,["inline-collapsed","selected-keys","open-keys"])]),_:1},8,["collapsed"])}}}),he=R(ve,[["__scopeId","data-v-dd3fff10"]]),be={class:"nav-left"},Ie={class:"page-title"},ye={key:1},ke={class:"nav-right"},Oe={class:"user-chip"},we={class:"user-name"},Le={class:"user-card"},Me={class:"user-card__head"},$e={class:"user-card__id"},Ce={class:"user-card__name"},Pe={class:"user-card__mobile"},Se=U({__name:"TheNavbar",props:{collapsed:{type:Boolean}},emits:["toggle-sidebar"],setup(e){const n=D(),t=ee(),s=re(),r=K(),b=N(()=>{var p;return((p=n.meta)==null?void 0:p.pageTitle)??""}),P=N(()=>{var p;return(p=n.meta)==null?void 0:p.breadcrumb}),_=N(()=>{var p,u;return((p=s.user)==null?void 0:p.name)??((u=s.user)==null?void 0:u.fullName)??"کاربر"}),y=N(()=>_.value.trim().charAt(0)||"ک"),O=N(()=>!!r.hasPermission("user.permission"));async function M(){await s.logout()||t.push("/auth/login")}return(p,u)=>{const F=d("a-button"),o=d("router-link"),m=d("a-breadcrumb-item"),v=d("a-breadcrumb"),h=d("a-avatar"),f=d("a-divider"),l=d("a-menu-item"),k=d("a-menu"),$=d("a-dropdown"),z=d("a-layout-header");return a(),g(z,{class:"the-navbar"},{default:i(()=>[I("div",be,[c(F,{type:"text",onClick:u[0]||(u[0]=C=>p.$emit("toggle-sidebar"))},{default:i(()=>[e.collapsed?(a(),g(L(W),{key:0})):(a(),g(L(G),{key:1}))]),_:1}),I("span",Ie,w(b.value),1),P.value?(a(),g(v,{key:0,class:"breadcrumb"},{default:i(()=>[(a(!0),j(B,null,T(P.value,(C,H)=>(a(),g(m,{key:H},{default:i(()=>[C.url&&!C.active?(a(),g(o,{key:0,to:C.url},{default:i(()=>[S(w(C.title),1)]),_:2},1032,["to"])):(a(),j("span",ye,w(C.title),1))]),_:2},1024))),128))]),_:1})):x("",!0)]),I("div",ke,[c($,{trigger:"click",placement:"bottomRight","overlay-class-name":"user-dropdown-overlay"},{overlay:i(()=>{var C;return[I("div",Le,[I("div",Me,[c(h,{size:"large",style:{"background-color":"#1c2d56"}},{default:i(()=>[S(w(y.value),1)]),_:1}),I("div",$e,[I("span",Ce,w(_.value),1),I("span",Pe,w((C=L(s).user)==null?void 0:C.mobile),1)])]),c(f,{class:"user-card__divider"}),c(k,{class:"user-card__menu"},{default:i(()=>[c(l,{key:"my-data",onClick:u[1]||(u[1]=H=>L(t).push("/my-data"))},{default:i(()=>[c(L(oe)),u[3]||(u[3]=S(" اطلاعات من ",-1))]),_:1}),O.value?(a(),g(l,{key:"permission",onClick:u[2]||(u[2]=H=>L(t).push("/permission"))},{default:i(()=>[c(L(ie)),u[4]||(u[4]=S(" دسترسی ها ",-1))]),_:1})):x("",!0)]),_:1}),c(f,{class:"user-card__divider"}),c(k,{class:"user-card__menu"},{default:i(()=>[c(l,{key:"logout",onClick:M},{default:i(()=>[c(L(E)),u[5]||(u[5]=S(" خروج ",-1))]),_:1})]),_:1})])]}),default:i(()=>[I("span",Oe,[c(h,{size:"small",style:{"background-color":"#1c2d56"}},{default:i(()=>[S(w(y.value),1)]),_:1}),I("span",we,w(_.value),1)])]),_:1})])]),_:1})}}}),Ne=R(Se,[["__scopeId","data-v-cd8d0532"]]),je={class:"content-wrapper"},Be={class:"content-area__content"},xe=U({__name:"Main",setup(e){const n=D(),t=te(),s=N(()=>t.sidebarCollapsed),r=N(()=>{var _;return!!((_=n.meta)!=null&&_.no_scroll)}),b=A(void 0);function P(_){b.value=_}return ne(()=>n.path,()=>{b.value=void 0}),(_,y)=>{const O=d("router-view"),M=d("a-layout-content"),p=d("a-layout");return a(),g(p,{class:se(["layout--main",{"no-scroll":r.value}])},{default:i(()=>[c(he,{collapsed:s.value},null,8,["collapsed"]),c(p,null,{default:i(()=>[c(Ne,{collapsed:s.value,onToggleSidebar:y[0]||(y[0]=u=>L(t).setSidebarCollapsed(!s.value))},null,8,["collapsed"]),c(M,{id:"content-area"},{default:i(()=>[I("div",je,[I("div",Be,[c(O,{onChangeRouteTitle:P})])])]),_:1})]),_:1})]),_:1},8,["class"])}}}),Re=R(xe,[["__scopeId","data-v-1ff241ff"]]);export{Re as default}; diff --git a/apps/admin-panel/dist/assets/Main-Bkne3dxn.js b/apps/admin-panel/dist/assets/Main-Bkne3dxn.js deleted file mode 100644 index b6ca545..0000000 --- a/apps/admin-panel/dist/assets/Main-Bkne3dxn.js +++ /dev/null @@ -1 +0,0 @@ -import{c as u,I as U,d as H,u as D,r as d,o as a,a as f,w as i,b as N,F as B,e as T,f as S,t as w,g as J,h as L,i as z,j as E,k as te,l as V,m as re,n as y,p as j,q as se,s as oe}from"./index-WFQJAeoE.js";import{r as Q,U as ie}from"./icons-CDnlJr4R.js";import{_ as K}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{u as ae}from"./auth-Cz9vAefU.js";import"./SettingOutlined-DZJd42S-.js";import"./TeamOutlined-CQ06mk_Y.js";import"./UnorderedListOutlined-CvD227Uu.js";import"./CreditCardOutlined-Dh4ayM2S.js";var le={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M868 732h-70.3c-4.8 0-9.3 2.1-12.3 5.8-7 8.5-14.5 16.7-22.4 24.5a353.84 353.84 0 01-112.7 75.9A352.8 352.8 0 01512.4 866c-47.9 0-94.3-9.4-137.9-27.8a353.84 353.84 0 01-112.7-75.9 353.28 353.28 0 01-76-112.5C167.3 606.2 158 559.9 158 512s9.4-94.2 27.8-137.8c17.8-42.1 43.4-80 76-112.5s70.5-58.1 112.7-75.9c43.6-18.4 90-27.8 137.9-27.8 47.9 0 94.3 9.3 137.9 27.8 42.2 17.8 80.1 43.4 112.7 75.9 7.9 7.9 15.3 16.1 22.4 24.5 3 3.7 7.6 5.8 12.3 5.8H868c6.3 0 10.2-7 6.7-12.3C798 160.5 663.8 81.6 511.3 82 271.7 82.6 79.6 277.1 82 516.4 84.4 751.9 276.2 942 512.4 942c152.1 0 285.7-78.8 362.3-197.7 3.4-5.3-.4-12.3-6.7-12.3zm88.9-226.3L815 393.7c-5.3-4.2-13-.4-13 6.3v76H488c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h314v76c0 6.7 7.8 10.5 13 6.3l141.9-112a8 8 0 000-12.6z"}}]},name:"logout",theme:"outlined"};function X(e){for(var n=1;n{const P=d("NavMenuNode",!0),_=d("a-sub-menu"),I=d("a-menu-item");return e.node.submenu?(a(),f(_,{key:e.menuKey},{icon:i(()=>[e.node.icon?(a(),f(J(L(Q)(e.node.icon)),{key:0})):z("",!0)]),title:i(()=>[S(w(e.node.i18n||e.node.name),1)]),default:i(()=>[(a(!0),N(B,null,T(r(e.node.submenu),(k,$)=>(a(),f(P,{key:k.url||`${e.menuKey}-${$}`,node:k,"menu-key":k.url||`${e.menuKey}-${$}`},null,8,["node","menu-key"]))),128))]),_:1})):(a(),f(I,{key:e.menuKey},{icon:i(()=>[e.node.icon?(a(),f(J(L(Q)(e.node.icon)),{key:0})):z("",!0)]),default:i(()=>[S(" "+w(e.node.i18n||e.node.name),1)]),_:1}))}}}),be={class:"nav-header"},he={key:0,class:"nav-title"},ye=H({__name:"VerticalNavMenu",props:{title:{default:"منتزر"},collapsed:{type:Boolean,default:!1}},setup(e){const n=E(),t=te(),r=D();function s(o){return o.permissionId?!!r.hasPermission(o.permissionId):!0}function h(o){return(o??[]).filter(s)}function P(o){return o.header?h(o.items).length>0:o.submenu?h(o.submenu).length>0:!0}const _=j(()=>ve().filter(o=>s(o)&&P(o))),I=(o,m)=>`sub-${o.name??""}-${m}`;function k(o,m,v){for(let b=0;bn.path,o=>{g.value=[o];const m=$(o);for(const v of m)c.value.includes(v)||(c.value=[...c.value,v])});function A({key:o}){const m=String(o);m.startsWith("/")&&m!==n.path&&t.push(m)}return(o,m)=>{const v=d("a-menu-item-group"),b=d("a-menu"),p=d("a-layout-sider");return a(),f(p,{collapsed:e.collapsed,trigger:null,collapsible:"",width:"260",class:"vertical-nav-menu",theme:"light"},{default:i(()=>[y("div",be,[e.collapsed?z("",!0):(a(),N("span",he,w(e.title),1))]),u(b,{mode:"inline",theme:"light","inline-collapsed":e.collapsed,"selected-keys":g.value,"open-keys":c.value,"onUpdate:openKeys":m[0]||(m[0]=l=>c.value=l),onClick:A},{default:i(()=>[(a(!0),N(B,null,T(_.value,(l,O)=>(a(),N(B,{key:l.url||l.header||O},[l.header?(a(),f(v,{key:0,title:l.i18n||l.header},{default:i(()=>[(a(!0),N(B,null,T(h(l.items),(C,x)=>(a(),f(ne,{key:C.url||`${O}-${x}`,node:C,"menu-key":C.url||I(C,x)},null,8,["node","menu-key"]))),128))]),_:2},1032,["title"])):(a(),f(ne,{key:1,node:l,"menu-key":l.url||I(l,O)},null,8,["node","menu-key"]))],64))),128))]),_:1},8,["inline-collapsed","selected-keys","open-keys"])]),_:1},8,["collapsed"])}}}),Ie=K(ye,[["__scopeId","data-v-2d7bd33c"]]),Oe={class:"nav-left"},ke={class:"page-title"},we={key:1},Le={class:"nav-right"},$e={class:"user-chip"},Ce={class:"user-name"},Me={class:"user-card"},Pe={class:"user-card__head"},Se={class:"user-card__id"},je={class:"user-card__name"},Ne={class:"user-card__mobile"},Be=H({__name:"TheNavbar",props:{collapsed:{type:Boolean}},emits:["toggle-sidebar"],setup(e){const n=E(),t=te(),r=ae(),s=D(),h=j(()=>{var g;return((g=n.meta)==null?void 0:g.pageTitle)??""}),P=j(()=>{var g;return(g=n.meta)==null?void 0:g.breadcrumb}),_=j(()=>{var g,c;return((g=r.user)==null?void 0:g.name)??((c=r.user)==null?void 0:c.fullName)??"کاربر"}),I=j(()=>_.value.trim().charAt(0)||"ک"),k=j(()=>!!s.hasPermission("user.permission"));function $(){r.logout(),t.push("/auth/login")}return(g,c)=>{const A=d("a-button"),o=d("router-link"),m=d("a-breadcrumb-item"),v=d("a-breadcrumb"),b=d("a-avatar"),p=d("a-divider"),l=d("a-menu-item"),O=d("a-menu"),C=d("a-dropdown"),x=d("a-layout-header");return a(),f(x,{class:"the-navbar"},{default:i(()=>[y("div",Oe,[u(A,{type:"text",onClick:c[0]||(c[0]=M=>g.$emit("toggle-sidebar"))},{default:i(()=>[e.collapsed?(a(),f(L(W),{key:0})):(a(),f(L(G),{key:1}))]),_:1}),y("span",ke,w(h.value),1),P.value?(a(),f(v,{key:0,class:"breadcrumb"},{default:i(()=>[(a(!0),N(B,null,T(P.value,(M,F)=>(a(),f(m,{key:F},{default:i(()=>[M.url&&!M.active?(a(),f(o,{key:0,to:M.url},{default:i(()=>[S(w(M.title),1)]),_:2},1032,["to"])):(a(),N("span",we,w(M.title),1))]),_:2},1024))),128))]),_:1})):z("",!0)]),y("div",Le,[u(C,{trigger:"click",placement:"bottomRight","overlay-class-name":"user-dropdown-overlay"},{overlay:i(()=>{var M;return[y("div",Me,[y("div",Pe,[u(b,{size:"large",style:{"background-color":"#1c2d56"}},{default:i(()=>[S(w(I.value),1)]),_:1}),y("div",Se,[y("span",je,w(_.value),1),y("span",Ne,w((M=L(r).user)==null?void 0:M.mobile),1)])]),u(p,{class:"user-card__divider"}),u(O,{class:"user-card__menu"},{default:i(()=>[u(l,{key:"my-data",onClick:c[1]||(c[1]=F=>L(t).push("/my-data"))},{default:i(()=>[u(L(ie)),c[3]||(c[3]=S(" اطلاعات من ",-1))]),_:1}),k.value?(a(),f(l,{key:"permission",onClick:c[2]||(c[2]=F=>L(t).push("/permission"))},{default:i(()=>[u(L(q)),c[4]||(c[4]=S(" دسترسی ها ",-1))]),_:1})):z("",!0)]),_:1}),u(p,{class:"user-card__divider"}),u(O,{class:"user-card__menu"},{default:i(()=>[u(l,{key:"logout",onClick:$},{default:i(()=>[u(L(R)),c[5]||(c[5]=S(" خروج ",-1))]),_:1})]),_:1})])]}),default:i(()=>[y("span",$e,[u(b,{size:"small",style:{"background-color":"#1c2d56"}},{default:i(()=>[S(w(I.value),1)]),_:1}),y("span",Ce,w(_.value),1)])]),_:1})])]),_:1})}}}),ze=K(Be,[["__scopeId","data-v-e8615504"]]),xe={class:"content-wrapper"},Te={class:"content-area__content"},Ue=H({__name:"Main",setup(e){const n=E(),t=se(),r=j(()=>t.sidebarCollapsed),s=j(()=>{var _;return!!((_=n.meta)!=null&&_.no_scroll)}),h=V(void 0);function P(_){h.value=_}return re(()=>n.path,()=>{h.value=void 0}),(_,I)=>{const k=d("router-view"),$=d("a-layout-content"),g=d("a-layout");return a(),f(g,{class:oe(["layout--main",{"no-scroll":s.value}])},{default:i(()=>[u(Ie,{collapsed:r.value},null,8,["collapsed"]),u(g,null,{default:i(()=>[u(ze,{collapsed:r.value,onToggleSidebar:I[0]||(I[0]=c=>L(t).setSidebarCollapsed(!r.value))},null,8,["collapsed"]),u($,{id:"content-area"},{default:i(()=>[y("div",xe,[y("div",Te,[u(k,{onChangeRouteTitle:P})])])]),_:1})]),_:1})]),_:1},8,["class"])}}}),Ge=K(Ue,[["__scopeId","data-v-1ff241ff"]]);export{Ge as default}; diff --git a/apps/admin-panel/dist/assets/Main-BpZGxMdb.css b/apps/admin-panel/dist/assets/Main-C8E39nFU.css similarity index 76% rename from apps/admin-panel/dist/assets/Main-BpZGxMdb.css rename to apps/admin-panel/dist/assets/Main-C8E39nFU.css index 46fc2b6..11d9c70 100644 --- a/apps/admin-panel/dist/assets/Main-BpZGxMdb.css +++ b/apps/admin-panel/dist/assets/Main-C8E39nFU.css @@ -1 +1 @@ -.vertical-nav-menu[data-v-2d7bd33c]{height:100vh;overflow-y:auto;border-left:1px solid #f0f0f0}.nav-header[data-v-2d7bd33c]{height:61px;display:flex;align-items:center;justify-content:center}.nav-title[data-v-2d7bd33c]{font-size:18px;color:#1c2d56}.the-navbar[data-v-e8615504]{height:61px;background:#fff;padding:0 16px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #f0f0f0}.nav-left[data-v-e8615504],.nav-right[data-v-e8615504]{display:flex;align-items:center;gap:12px}.page-title[data-v-e8615504]{font-size:16px;color:#1c2d56}.breadcrumb[data-v-e8615504]{font-size:13px}.user-chip[data-v-e8615504]{display:inline-flex;align-items:center;gap:8px;cursor:pointer}.user-dropdown-overlay .ant-dropdown-menu{padding:0;box-shadow:none}.user-dropdown-overlay .user-card{width:220px;padding:12px;background:#fff;border-radius:10px;box-shadow:0 8px 28px -8px #1c2d5647}.user-dropdown-overlay .user-card__head{display:flex;align-items:center;gap:10px;padding:2px 4px 8px}.user-dropdown-overlay .user-card__id{display:flex;flex-direction:column;min-width:0}.user-dropdown-overlay .user-card__name{font-size:14px;font-weight:600;color:#1c2d56;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-dropdown-overlay .user-card__mobile{font-size:12px;color:#8a909c;direction:ltr;text-align:right}.user-dropdown-overlay .user-card__divider{margin:4px 0}.user-dropdown-overlay .user-card__menu.ant-menu{border-inline-end:none;background:transparent}.user-dropdown-overlay .user-card__menu .ant-menu-item{display:flex;align-items:center;gap:8px;height:34px;line-height:34px;margin:0;padding-inline:6px!important;border-radius:6px;width:100%}.user-dropdown-overlay .user-card__menu .ant-menu-item:hover{background:#f4f5f6;color:#1c2d56}.user-dropdown-overlay .user-card__menu .anticon{font-size:15px;color:#8a909c}.layout--main[data-v-1ff241ff]{height:100vh;overflow:hidden}.layout--main[data-v-1ff241ff]>.ant-layout{height:100%}#content-area[data-v-1ff241ff]{padding:16px;background:#f8f8f8;display:flex;height:calc(100vh - 61px);overflow-y:auto}.content-wrapper[data-v-1ff241ff],.content-area__content[data-v-1ff241ff]{display:flex;flex-direction:column;flex:1;min-height:0} +.vertical-nav-menu[data-v-dd3fff10]{height:100vh;overflow-y:auto;border-left:1px solid #f0f0f0}.nav-header[data-v-dd3fff10]{height:61px;display:flex;align-items:center;justify-content:center}.nav-title[data-v-dd3fff10]{font-size:18px;color:#1c2d56}.the-navbar[data-v-cd8d0532]{height:61px;background:#fff;padding:0 16px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #f0f0f0}.nav-left[data-v-cd8d0532],.nav-right[data-v-cd8d0532]{display:flex;align-items:center;gap:12px}.page-title[data-v-cd8d0532]{font-size:16px;color:#1c2d56}.breadcrumb[data-v-cd8d0532]{font-size:13px}.user-chip[data-v-cd8d0532]{display:inline-flex;align-items:center;gap:8px;cursor:pointer}.user-dropdown-overlay .ant-dropdown-menu{padding:0;box-shadow:none}.user-dropdown-overlay .user-card{width:220px;padding:12px;background:#fff;border-radius:10px;box-shadow:0 8px 28px -8px #1c2d5647}.user-dropdown-overlay .user-card__head{display:flex;align-items:center;gap:10px;padding:2px 4px 8px}.user-dropdown-overlay .user-card__id{display:flex;flex-direction:column;min-width:0}.user-dropdown-overlay .user-card__name{font-size:14px;font-weight:600;color:#1c2d56;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-dropdown-overlay .user-card__mobile{font-size:12px;color:#8a909c;direction:ltr;text-align:right}.user-dropdown-overlay .user-card__divider{margin:4px 0}.user-dropdown-overlay .user-card__menu.ant-menu{border-inline-end:none;background:transparent}.user-dropdown-overlay .user-card__menu .ant-menu-item{display:flex;align-items:center;gap:8px;height:34px;line-height:34px;margin:0;padding-inline:6px!important;border-radius:6px;width:100%}.user-dropdown-overlay .user-card__menu .ant-menu-item:hover{background:#f4f5f6;color:#1c2d56}.user-dropdown-overlay .user-card__menu .anticon{font-size:15px;color:#8a909c}.layout--main[data-v-1ff241ff]{height:100vh;overflow:hidden}.layout--main[data-v-1ff241ff]>.ant-layout{height:100%}#content-area[data-v-1ff241ff]{padding:16px;background:#f8f8f8;display:flex;height:calc(100vh - 61px);overflow-y:auto}.content-wrapper[data-v-1ff241ff],.content-area__content[data-v-1ff241ff]{display:flex;flex-direction:column;flex:1;min-height:0} diff --git a/apps/admin-panel/dist/assets/Maintenance-Ce1MFGA9.js b/apps/admin-panel/dist/assets/Maintenance-Ce1MFGA9.js new file mode 100644 index 0000000..773a9bc --- /dev/null +++ b/apps/admin-panel/dist/assets/Maintenance-Ce1MFGA9.js @@ -0,0 +1 @@ +import{_ as c}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{b as _,c as e,w as o,f as l,r as s,o as i}from"./index-CVG99b4v.js";const p={},u={class:"full-page-msg"};function f(n,t){const a=s("a-button"),r=s("a-result");return i(),_("div",u,[e(r,{status:"info",title:"در دست تعمیر","sub-title":"این بخش موقتاً در دسترس نیست."},{extra:o(()=>[e(a,{type:"primary",onClick:t[0]||(t[0]=m=>n.$router.push("/"))},{default:o(()=>[...t[1]||(t[1]=[l("بازگشت به خانه",-1)])]),_:1})]),_:1})])}const b=c(p,[["render",f],["__scopeId","data-v-4e6c833c"]]);export{b as default}; diff --git a/apps/admin-panel/dist/assets/Maintenance-Duz6NlUR.css b/apps/admin-panel/dist/assets/Maintenance-Duz6NlUR.css new file mode 100644 index 0000000..855195c --- /dev/null +++ b/apps/admin-panel/dist/assets/Maintenance-Duz6NlUR.css @@ -0,0 +1 @@ +.full-page-msg[data-v-4e6c833c]{min-height:100vh;display:flex;align-items:center;justify-content:center} diff --git a/apps/admin-panel/dist/assets/Maintenance-F05Lfjdp.js b/apps/admin-panel/dist/assets/Maintenance-F05Lfjdp.js deleted file mode 100644 index 74bf7d1..0000000 --- a/apps/admin-panel/dist/assets/Maintenance-F05Lfjdp.js +++ /dev/null @@ -1 +0,0 @@ -import{_}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{b as c,c as e,w as o,f as l,r as s,o as i}from"./index-WFQJAeoE.js";const p={},u={class:"full-page-msg"};function f(n,t){const a=s("a-button"),r=s("a-result");return i(),c("div",u,[e(r,{status:"info",title:"در دست تعمیر","sub-title":"این بخش موقتاً در دسترس نیست."},{extra:o(()=>[e(a,{type:"primary",onClick:t[0]||(t[0]=m=>n.$router.push("/"))},{default:o(()=>[...t[1]||(t[1]=[l("بازگشت به خانه",-1)])]),_:1})]),_:1})])}const x=_(p,[["render",f],["__scopeId","data-v-1eb8f55a"]]);export{x as default}; diff --git a/apps/admin-panel/dist/assets/Maintenance-r3ddTZoG.css b/apps/admin-panel/dist/assets/Maintenance-r3ddTZoG.css deleted file mode 100644 index bd1d0e5..0000000 --- a/apps/admin-panel/dist/assets/Maintenance-r3ddTZoG.css +++ /dev/null @@ -1 +0,0 @@ -.full-page-msg[data-v-1eb8f55a]{min-height:100vh;display:flex;align-items:center;justify-content:center} diff --git a/apps/admin-panel/dist/assets/MakeOrder-CraGt8ES.js b/apps/admin-panel/dist/assets/MakeOrder-B7PVZZ1G.js similarity index 92% rename from apps/admin-panel/dist/assets/MakeOrder-CraGt8ES.js rename to apps/admin-panel/dist/assets/MakeOrder-B7PVZZ1G.js index 0db3db7..1f9d32e 100644 --- a/apps/admin-panel/dist/assets/MakeOrder-CraGt8ES.js +++ b/apps/admin-panel/dist/assets/MakeOrder-B7PVZZ1G.js @@ -1 +1 @@ -import{u as V,d as H,b as f,c as s,w as l,r as m,o as n,h as J,A as Q,t as c,n as w,a as _,i as v,f as p,F as Y,e as Z,l as h,p as N,x as U,z as B}from"./index-WFQJAeoE.js";import{a as ee,b as d,X as te}from"./model-Di_BQPv1.js";import{_ as D}from"./TooltipBtn.vue_vue_type_script_setup_true_lang-CW6ghT15.js";import{j as oe}from"./filters-C1cWKkpl.js";import{_ as ae}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./SettingOutlined-DZJd42S-.js";import"./icons-CDnlJr4R.js";import"./TeamOutlined-CQ06mk_Y.js";import"./UnorderedListOutlined-CvD227Uu.js";import"./CreditCardOutlined-Dh4ayM2S.js";import"./index-1e_FodC0.js";function le(){const T=V(),r=new ee("admin/pre-orders/list","سفارش های ساختنی");return r.add(new d("customer.id","شماره").filterKey("id").filterNumber()),r.add(new d("customer.fname","نام مشتری").filterKey("customer.fullName").filterText()),r.add(new d("customer.lname","نام خانوادگی").filterKey("customer.fullName").filterText()),r.add(new d("color","رنگ محصول").filterKey("colorName").filterText()),r.add(new d("size","سایز محصول").filterKey("sizeSpec").filterText()),r.add(new d("color_mina","رنگ مینا").filterKey("minaColor").filterText()),r.add(new d("color_stone","رنگ سنگ").filterKey("stoneColor").filterText()),r.add(new d("sum","تعداد").filterText()),r.add(new d("time_creat_fa","تاریخ ثبت").filterKey("createdAt").filterDate().noSort()),r.add(new d("time_update_fa","تاریخ ویرایش").hidden().filterKey("updatedAt").filterDate().noSort()),r.add(new d("customer.name","ثبت کننده").renderSlot("name").noSort()),T.roles&&T.roles.includes("order.tamin.state")&&r.add(new d("sts_str_fa","وضعیت").renderSlot("sts").noSort()),r.add(new d("opt","عملیات").noSort().renderSlot("opt")),r}const ne={id:"page-user-list"},se={class:"flex"},re=["onClick"],ie={key:1},de={key:0},ue={class:"flex"},ce={class:"flex gap-8"},me=["src"],_e={class:"flex"},ve={key:0},fe={key:0},pe={key:0},ke=H({__name:"MakeOrder",setup(T){const r=V(),k=a=>!!r.hasPermission(a),X=le(),K=h(null),t=h(void 0),C=h(!1),i=h(!1),I=h([]),j=a=>a?oe(a):"",z=N(()=>i.value?"CheckIcon":"EditIcon"),A=N(()=>{var a,e;return((e=(a=t.value)==null?void 0:a.customer)==null?void 0:e.name)??"-"}),L=N(()=>{var a,e;return((e=(a=t.value)==null?void 0:a.customer)==null?void 0:e.mobile)??"-"});async function E(){try{const{data:a}=await U.post("workshop/table",{page:1,limit:100});I.value=(a.rows??[]).map(e=>({id:e.id,name:e.name}))}catch(a){console.log(a)}}async function M(a){const{data:e}=await U.get(`admin/pre-orders/${a.id}`);t.value=e,C.value=!0,E()}async function F(){var a,e,u,b,x,y,O;if(!i.value){i.value=!0;return}try{await U.put(`custom-order/${(a=t.value)==null?void 0:a.id}`,{color:(e=t.value)==null?void 0:e.color,color_mina:(u=t.value)==null?void 0:u.color_mina,color_stone:(b=t.value)==null?void 0:b.color_stone}),i.value=!1,B.info("ویرایش موفق آمیز"),(x=K.value)==null||x.fetch()}catch(g){B.error(((O=(y=g==null?void 0:g.response)==null?void 0:y.data)==null?void 0:O.message)??"خطا در ویرایش")}}function P(){var a;(a=K.value)==null||a.fetch(),i.value=!1}return(a,e)=>{const u=m("a-descriptions-item"),b=m("a-descriptions"),x=m("a-empty"),y=m("a-input"),O=m("a-tag"),g=m("a-input-number"),W=m("a-select-option"),R=m("a-select"),$=m("a-card"),q=m("a-button"),G=m("a-modal");return n(),f("div",ne,[s($,{title:"سفارش های ساختنی"},{default:l(()=>[s(te,{ref_key:"tbl",ref:K,model:J(X)},{name:l(({record:o})=>{var S;return[p(c((S=o.customer)==null?void 0:S.name),1)]}),opt:l(({record:o})=>[w("div",se,[k("order.makeOrder.view")?(n(),_(D,{key:0,"icon-class":"w-5 h-5 text-primary",class:"mr-3",icon:"ListIcon",title:"مشاهده سفارش",onClick:S=>M(o)},null,8,["onClick"])):v("",!0)])]),sts:l(({record:o})=>[k("order.makeOrder.state")?(n(),f("a",{key:0,href:"",onClick:Q(S=>M(o),["prevent"])},c(o.sts_str_fa),9,re)):(n(),f("span",ie,c(o.sts_str_fa),1))]),_:1},8,["model"]),s(G,{open:C.value,"onUpdate:open":e[6]||(e[6]=o=>C.value=o),title:"مشاهده سفارش",width:"80%",onCancel:P},{footer:l(()=>[s(q,{onClick:e[5]||(e[5]=o=>C.value=!1)},{default:l(()=>[...e[8]||(e[8]=[p("باشه",-1)])]),_:1})]),default:l(()=>[t.value?(n(),f("div",de,[s(b,null,{default:l(()=>[s(u,{label:"مشتری"},{default:l(()=>[p(c(A.value),1)]),_:1}),s(u,{label:"تلفن همراه"},{default:l(()=>[p(c(L.value),1)]),_:1}),s(u,{label:"تاریخ ثبت"},{default:l(()=>[p(c(j(t.value.time_creat_fa)||"-"),1)]),_:1}),s(u,{label:"وضعیت"},{default:l(()=>[p(c(t.value.sts_str_fa||"-"),1)]),_:1})]),_:1}),s($,null,{title:l(()=>[w("div",ue,[e[7]||(e[7]=w("div",{class:"flex-1"},"آیتم های سفارش",-1)),w("div",null,[k("order.makeOrder.view.edit")?(n(),_(D,{key:0,"icon-class":"w-5 h-5 text-success",title:"ویرایش",icon:z.value,onClick:F},null,8,["icon"])):v("",!0)])])]),default:l(()=>[w("div",ce,[w("div",null,[t.value.designImageUrl?(n(),f("img",{key:0,src:t.value.designImageUrl,width:"90px",height:"90px",style:{"object-fit":"scale-down"}},null,8,me)):(n(),_(x,{key:1,image:void 0,description:"بدون تصویر"}))]),w("div",_e,[s(b,null,{default:l(()=>[s(u,{label:"رنگ محصول"},{default:l(()=>[i.value?v("",!0):(n(),f("div",ve,c(t.value.color||"-"),1)),i.value&&k("order.makeOrder.view.edit")?(n(),_(y,{key:1,value:t.value.color,"onUpdate:value":e[0]||(e[0]=o=>t.value.color=o)},null,8,["value"])):v("",!0)]),_:1}),s(u,{label:"رنگ مینا"},{default:l(()=>[i.value?v("",!0):(n(),f("div",fe,c(t.value.color_mina||"-"),1)),i.value&&k("order.makeOrder.view.edit")?(n(),_(y,{key:1,value:t.value.color_mina,"onUpdate:value":e[1]||(e[1]=o=>t.value.color_mina=o)},null,8,["value"])):v("",!0)]),_:1}),s(u,{label:"رنگ سنگ"},{default:l(()=>[i.value?v("",!0):(n(),f("div",pe,c(t.value.color_stone||"-"),1)),i.value&&k("order.makeOrder.view.edit")?(n(),_(y,{key:1,value:t.value.color_stone,"onUpdate:value":e[2]||(e[2]=o=>t.value.color_stone=o)},null,8,["value"])):v("",!0)]),_:1}),s(u,{label:"تعداد"},{default:l(()=>[i.value?v("",!0):(n(),_(O,{key:0,color:"orange"},{default:l(()=>[p(c(t.value.sum||0),1)]),_:1})),i.value&&k("order.makeOrder.view.edit")?(n(),_(g,{key:1,value:t.value.sum,"onUpdate:value":e[3]||(e[3]=o=>t.value.sum=o),class:"w-full"},null,8,["value"])):v("",!0)]),_:1}),s(u,{label:"انتخاب کارگاه"},{default:l(()=>[s(R,{value:t.value.workshop_id,"onUpdate:value":e[4]||(e[4]=o=>t.value.workshop_id=o),placeholder:"لطفا یک کارگاه را انتخاب کنید",style:{"min-width":"200px"}},{default:l(()=>[(n(!0),f(Y,null,Z(I.value,o=>(n(),_(W,{key:o.id,value:o.id},{default:l(()=>[p(c(o.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})]),_:1})])])]),_:1})])):(n(),_(x,{key:1}))]),_:1},8,["open"])]),_:1})])}}}),Ne=ae(ke,[["__scopeId","data-v-0c59a505"]]);export{Ne as default}; +import{u as V,d as H,b as f,c as s,w as l,r as m,o as n,h as J,A as Q,t as c,n as w,a as _,i as v,f as p,F as Y,e as Z,l as h,p as N,x as U,z as B}from"./index-CVG99b4v.js";import{a as ee,b as d,X as te}from"./model-CvqTGmy8.js";import{_ as D}from"./TooltipBtn.vue_vue_type_script_setup_true_lang-DxnpxKjK.js";import{j as oe}from"./filters-UavLT20t.js";import{_ as ae}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./SettingOutlined-D7--Xtqg.js";import"./icons-BaVxJrpa.js";import"./TeamOutlined-BEJyrWYB.js";import"./UnorderedListOutlined-CKa6XzC7.js";import"./CreditCardOutlined-wQJvlSrP.js";import"./index-pLFqZCCf.js";function le(){const T=V(),r=new ee("admin/pre-orders/list","سفارش های ساختنی");return r.add(new d("customer.id","شماره").filterKey("id").filterNumber()),r.add(new d("customer.fname","نام مشتری").filterKey("customer.fullName").filterText()),r.add(new d("customer.lname","نام خانوادگی").filterKey("customer.fullName").filterText()),r.add(new d("color","رنگ محصول").filterKey("colorName").filterText()),r.add(new d("size","سایز محصول").filterKey("sizeSpec").filterText()),r.add(new d("color_mina","رنگ مینا").filterKey("minaColor").filterText()),r.add(new d("color_stone","رنگ سنگ").filterKey("stoneColor").filterText()),r.add(new d("sum","تعداد").filterText()),r.add(new d("time_creat_fa","تاریخ ثبت").filterKey("createdAt").filterDate().noSort()),r.add(new d("time_update_fa","تاریخ ویرایش").hidden().filterKey("updatedAt").filterDate().noSort()),r.add(new d("customer.name","ثبت کننده").renderSlot("name").noSort()),T.roles&&T.roles.includes("order.tamin.state")&&r.add(new d("sts_str_fa","وضعیت").renderSlot("sts").noSort()),r.add(new d("opt","عملیات").noSort().renderSlot("opt")),r}const ne={id:"page-user-list"},se={class:"flex"},re=["onClick"],ie={key:1},de={key:0},ue={class:"flex"},ce={class:"flex gap-8"},me=["src"],_e={class:"flex"},ve={key:0},fe={key:0},pe={key:0},ke=H({__name:"MakeOrder",setup(T){const r=V(),k=a=>!!r.hasPermission(a),X=le(),K=h(null),t=h(void 0),C=h(!1),i=h(!1),I=h([]),j=a=>a?oe(a):"",z=N(()=>i.value?"CheckIcon":"EditIcon"),A=N(()=>{var a,e;return((e=(a=t.value)==null?void 0:a.customer)==null?void 0:e.name)??"-"}),L=N(()=>{var a,e;return((e=(a=t.value)==null?void 0:a.customer)==null?void 0:e.mobile)??"-"});async function E(){try{const{data:a}=await U.post("workshop/table",{page:1,limit:100});I.value=(a.rows??[]).map(e=>({id:e.id,name:e.name}))}catch(a){console.log(a)}}async function M(a){const{data:e}=await U.get(`admin/pre-orders/${a.id}`);t.value=e,C.value=!0,E()}async function F(){var a,e,u,b,x,y,O;if(!i.value){i.value=!0;return}try{await U.put(`custom-order/${(a=t.value)==null?void 0:a.id}`,{color:(e=t.value)==null?void 0:e.color,color_mina:(u=t.value)==null?void 0:u.color_mina,color_stone:(b=t.value)==null?void 0:b.color_stone}),i.value=!1,B.info("ویرایش موفق آمیز"),(x=K.value)==null||x.fetch()}catch(g){B.error(((O=(y=g==null?void 0:g.response)==null?void 0:y.data)==null?void 0:O.message)??"خطا در ویرایش")}}function P(){var a;(a=K.value)==null||a.fetch(),i.value=!1}return(a,e)=>{const u=m("a-descriptions-item"),b=m("a-descriptions"),x=m("a-empty"),y=m("a-input"),O=m("a-tag"),g=m("a-input-number"),W=m("a-select-option"),R=m("a-select"),$=m("a-card"),q=m("a-button"),G=m("a-modal");return n(),f("div",ne,[s($,{title:"سفارش های ساختنی"},{default:l(()=>[s(te,{ref_key:"tbl",ref:K,model:J(X)},{name:l(({record:o})=>{var S;return[p(c((S=o.customer)==null?void 0:S.name),1)]}),opt:l(({record:o})=>[w("div",se,[k("order.makeOrder.view")?(n(),_(D,{key:0,"icon-class":"w-5 h-5 text-primary",class:"mr-3",icon:"ListIcon",title:"مشاهده سفارش",onClick:S=>M(o)},null,8,["onClick"])):v("",!0)])]),sts:l(({record:o})=>[k("order.makeOrder.state")?(n(),f("a",{key:0,href:"",onClick:Q(S=>M(o),["prevent"])},c(o.sts_str_fa),9,re)):(n(),f("span",ie,c(o.sts_str_fa),1))]),_:1},8,["model"]),s(G,{open:C.value,"onUpdate:open":e[6]||(e[6]=o=>C.value=o),title:"مشاهده سفارش",width:"80%",onCancel:P},{footer:l(()=>[s(q,{onClick:e[5]||(e[5]=o=>C.value=!1)},{default:l(()=>[...e[8]||(e[8]=[p("باشه",-1)])]),_:1})]),default:l(()=>[t.value?(n(),f("div",de,[s(b,null,{default:l(()=>[s(u,{label:"مشتری"},{default:l(()=>[p(c(A.value),1)]),_:1}),s(u,{label:"تلفن همراه"},{default:l(()=>[p(c(L.value),1)]),_:1}),s(u,{label:"تاریخ ثبت"},{default:l(()=>[p(c(j(t.value.time_creat_fa)||"-"),1)]),_:1}),s(u,{label:"وضعیت"},{default:l(()=>[p(c(t.value.sts_str_fa||"-"),1)]),_:1})]),_:1}),s($,null,{title:l(()=>[w("div",ue,[e[7]||(e[7]=w("div",{class:"flex-1"},"آیتم های سفارش",-1)),w("div",null,[k("order.makeOrder.view.edit")?(n(),_(D,{key:0,"icon-class":"w-5 h-5 text-success",title:"ویرایش",icon:z.value,onClick:F},null,8,["icon"])):v("",!0)])])]),default:l(()=>[w("div",ce,[w("div",null,[t.value.designImageUrl?(n(),f("img",{key:0,src:t.value.designImageUrl,width:"90px",height:"90px",style:{"object-fit":"scale-down"}},null,8,me)):(n(),_(x,{key:1,image:void 0,description:"بدون تصویر"}))]),w("div",_e,[s(b,null,{default:l(()=>[s(u,{label:"رنگ محصول"},{default:l(()=>[i.value?v("",!0):(n(),f("div",ve,c(t.value.color||"-"),1)),i.value&&k("order.makeOrder.view.edit")?(n(),_(y,{key:1,value:t.value.color,"onUpdate:value":e[0]||(e[0]=o=>t.value.color=o)},null,8,["value"])):v("",!0)]),_:1}),s(u,{label:"رنگ مینا"},{default:l(()=>[i.value?v("",!0):(n(),f("div",fe,c(t.value.color_mina||"-"),1)),i.value&&k("order.makeOrder.view.edit")?(n(),_(y,{key:1,value:t.value.color_mina,"onUpdate:value":e[1]||(e[1]=o=>t.value.color_mina=o)},null,8,["value"])):v("",!0)]),_:1}),s(u,{label:"رنگ سنگ"},{default:l(()=>[i.value?v("",!0):(n(),f("div",pe,c(t.value.color_stone||"-"),1)),i.value&&k("order.makeOrder.view.edit")?(n(),_(y,{key:1,value:t.value.color_stone,"onUpdate:value":e[2]||(e[2]=o=>t.value.color_stone=o)},null,8,["value"])):v("",!0)]),_:1}),s(u,{label:"تعداد"},{default:l(()=>[i.value?v("",!0):(n(),_(O,{key:0,color:"orange"},{default:l(()=>[p(c(t.value.sum||0),1)]),_:1})),i.value&&k("order.makeOrder.view.edit")?(n(),_(g,{key:1,value:t.value.sum,"onUpdate:value":e[3]||(e[3]=o=>t.value.sum=o),class:"w-full"},null,8,["value"])):v("",!0)]),_:1}),s(u,{label:"انتخاب کارگاه"},{default:l(()=>[s(R,{value:t.value.workshop_id,"onUpdate:value":e[4]||(e[4]=o=>t.value.workshop_id=o),placeholder:"لطفا یک کارگاه را انتخاب کنید",style:{"min-width":"200px"}},{default:l(()=>[(n(!0),f(Y,null,Z(I.value,o=>(n(),_(W,{key:o.id,value:o.id},{default:l(()=>[p(c(o.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})]),_:1})])])]),_:1})])):(n(),_(x,{key:1}))]),_:1},8,["open"])]),_:1})])}}}),Ne=ae(ke,[["__scopeId","data-v-0c59a505"]]);export{Ne as default}; diff --git a/apps/admin-panel/dist/assets/NotAuthorized-B2SbXtX1.css b/apps/admin-panel/dist/assets/NotAuthorized-B2SbXtX1.css new file mode 100644 index 0000000..e632a63 --- /dev/null +++ b/apps/admin-panel/dist/assets/NotAuthorized-B2SbXtX1.css @@ -0,0 +1 @@ +.full-page-msg[data-v-8b21c139]{min-height:100vh;display:flex;align-items:center;justify-content:center} diff --git a/apps/admin-panel/dist/assets/NotAuthorized-BA1hhw1y.css b/apps/admin-panel/dist/assets/NotAuthorized-BA1hhw1y.css deleted file mode 100644 index 766638b..0000000 --- a/apps/admin-panel/dist/assets/NotAuthorized-BA1hhw1y.css +++ /dev/null @@ -1 +0,0 @@ -.full-page-msg[data-v-30826204]{min-height:100vh;display:flex;align-items:center;justify-content:center} diff --git a/apps/admin-panel/dist/assets/NotAuthorized-B3JoNMi6.js b/apps/admin-panel/dist/assets/NotAuthorized-CJbmq4LZ.js similarity index 70% rename from apps/admin-panel/dist/assets/NotAuthorized-B3JoNMi6.js rename to apps/admin-panel/dist/assets/NotAuthorized-CJbmq4LZ.js index 188957a..d6bfa42 100644 --- a/apps/admin-panel/dist/assets/NotAuthorized-B3JoNMi6.js +++ b/apps/admin-panel/dist/assets/NotAuthorized-CJbmq4LZ.js @@ -1 +1 @@ -import{_}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{b as c,c as e,w as o,f as l,r as s,o as u}from"./index-WFQJAeoE.js";const p={},i={class:"full-page-msg"};function d(r,t){const n=s("a-button"),a=s("a-result");return u(),c("div",i,[e(a,{status:"403",title:"دسترسی غیرمجاز","sub-title":"شما دسترسی لازم برای مشاهده این صفحه را ندارید."},{extra:o(()=>[e(n,{type:"primary",onClick:t[0]||(t[0]=m=>r.$router.push("/"))},{default:o(()=>[...t[1]||(t[1]=[l("بازگشت به خانه",-1)])]),_:1})]),_:1})])}const b=_(p,[["render",d],["__scopeId","data-v-30826204"]]);export{b as default}; +import{_}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{b as c,c as e,w as o,f as l,r as s,o as u}from"./index-CVG99b4v.js";const p={},i={class:"full-page-msg"};function d(r,t){const n=s("a-button"),a=s("a-result");return u(),c("div",i,[e(a,{status:"403",title:"دسترسی غیرمجاز","sub-title":"شما دسترسی لازم برای مشاهده این صفحه را ندارید."},{extra:o(()=>[e(n,{type:"primary",onClick:t[0]||(t[0]=m=>r.$router.push("/"))},{default:o(()=>[...t[1]||(t[1]=[l("بازگشت به خانه",-1)])]),_:1})]),_:1})])}const x=_(p,[["render",d],["__scopeId","data-v-8b21c139"]]);export{x as default}; diff --git a/apps/admin-panel/dist/assets/OmdeArchivedList-DUsEG3kp.js b/apps/admin-panel/dist/assets/OmdeArchivedList-DUsEG3kp.js deleted file mode 100644 index df3e551..0000000 --- a/apps/admin-panel/dist/assets/OmdeArchivedList-DUsEG3kp.js +++ /dev/null @@ -1 +0,0 @@ -import{b as i,O as r,_ as m}from"./omdeListModel-B-zNFWRI.js";import{d as a,a as s,h as t,o as p}from"./index-WFQJAeoE.js";import"./model-Di_BQPv1.js";import"./SettingOutlined-DZJd42S-.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ListPageHeader.vue_vue_type_script_setup_true_lang-BmENA4yH.js";import"./bulkCustomer.vue_vue_type_script_setup_true_lang-zBMtv664.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-BQ_i_QZe.js";import"./UnorderedListOutlined-CvD227Uu.js";const B=a({__name:"OmdeArchivedList",setup(c){const e=r.archived.title,o=i("archived");return(l,n)=>(p(),s(m,{title:t(e),model:t(o)},null,8,["title","model"]))}});export{B as default}; diff --git a/apps/admin-panel/dist/assets/OmdeArchivedList-tANksDLW.js b/apps/admin-panel/dist/assets/OmdeArchivedList-tANksDLW.js new file mode 100644 index 0000000..c5f5281 --- /dev/null +++ b/apps/admin-panel/dist/assets/OmdeArchivedList-tANksDLW.js @@ -0,0 +1 @@ +import{b as r,O as e,_ as m}from"./omdeListModel-C6pAmqnF.js";import{d as p,a,h as t,o as s}from"./index-CVG99b4v.js";import"./model-CvqTGmy8.js";import"./filters-UavLT20t.js";import"./index-pLFqZCCf.js";import"./SettingOutlined-D7--Xtqg.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ListPageHeader.vue_vue_type_script_setup_true_lang-CetMN4WH.js";import"./AccountingSyncButton.vue_vue_type_script_setup_true_lang-DYPt-3CU.js";import"./bulkCustomer.vue_vue_type_script_setup_true_lang-BLZHRH0s.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-CWur6xTz.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-C8WW9alD.js";import"./CityTreeSelect.vue_vue_type_script_setup_true_lang-Ctf4a2EQ.js";import"./DateInput-P3xqxLM7.js";import"./UnorderedListOutlined-CKa6XzC7.js";const S=p({__name:"OmdeArchivedList",setup(c){const o=e.archived.title,i=r("archived");return(l,n)=>(s(),a(m,{title:t(o),model:t(i)},null,8,["title","model"]))}});export{S as default}; diff --git a/apps/admin-panel/dist/assets/OmdeList-ivtbIeOV.js b/apps/admin-panel/dist/assets/OmdeList-C4itKCpn.js similarity index 93% rename from apps/admin-panel/dist/assets/OmdeList-ivtbIeOV.js rename to apps/admin-panel/dist/assets/OmdeList-C4itKCpn.js index 37f1017..3b8d93c 100644 --- a/apps/admin-panel/dist/assets/OmdeList-ivtbIeOV.js +++ b/apps/admin-panel/dist/assets/OmdeList-C4itKCpn.js @@ -1 +1 @@ -import{u as X,d as Y,b as c,c as n,w as o,r as _,o as a,h as Z,f as d,t as l,A as ee,i as p,n as b,a as k,F as U,e as F,l as j,x as L,z as h}from"./index-WFQJAeoE.js";import{a as te,b as f,X as oe}from"./model-Di_BQPv1.js";import{_ as V}from"./TooltipBtn.vue_vue_type_script_setup_true_lang-CW6ghT15.js";import{j as ne}from"./filters-C1cWKkpl.js";import{_ as se}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./SettingOutlined-DZJd42S-.js";import"./icons-CDnlJr4R.js";import"./TeamOutlined-CQ06mk_Y.js";import"./UnorderedListOutlined-CvD227Uu.js";import"./CreditCardOutlined-Dh4ayM2S.js";import"./index-1e_FodC0.js";function ae(){const g=X();Object.keys(g.cityFilters).length<1&&g.getCities();const r=new te("admin/orders/wholesale/list","لیست سفارش های عمده");return r.add(new f("id","شماره").filterNumber()),r.add(new f("customer.name","مشتری").filterKey("customer.fullName").filterText()),r.add(new f("customer.mobile","موبایل").filterText().hidden().noSort()),r.add(new f("input","جمع کل سفارش").filterKey("totalGoldWeightGrams").filterText()),r.add(new f("discount","جمع کل تخفیف (درصد)").filterText()),r.add(new f("customer.city_id","شهر").hidden().renderSlot("city")),r.add(new f("items","تعداد آیتم ها").renderSlot("items_len").noSort()),r.add(new f("caj","تاریخ ثبت").filterKey("createdAt").filterDate().noSort()),r.add(new f("uaj","تاریخ ویرایش").hidden().filterKey("updatedAt").filterDate().noSort()),g.roles&&g.roles.includes("order.omde.state")&&r.add(new f("sts","وضعیت").renderSlot("sts_str").noSort().filterKey("status").filterSelect({0:"معلق",1:"ثبت سفارش",2:"تایید مدیر سیستم",3:"در حال تامین",4:"در حال آماده سازی ",5:"تحویل مسئول فروش",6:"تحویل مشتری "})),r.add(new f("confirmed","وضعیت تایید مشتری").renderSlot("confirmed_str").noSort().filterSelect({1:"تایید شده",2:"در انتظار تایید"})),r.add(new f("opt","عملیات").noSort().renderSlot("opt")),r}const le={id:"page-user-list"},re={key:0},ie={key:1},de={class:"flex"},ue={key:0},ce=["onClick"],_e={key:1},fe={class:"flex flex-col"},me={key:0},pe={class:"flex"},ve={class:"flex-1"},ye={key:1,class:"flex items-center"},ke={key:2},we={key:0},be=Y({__name:"OmdeList",setup(g){const r=X(),S=s=>!!r.hasPermission(s),z=ae(),x=j(null),i=j(void 0),$=j(!1),w=j(!1),O=s=>s?ne(s):"";function A(s){return r.cityFilters[s]??"-"}function G(s){return s.proceed?"green":"gray"}async function B(s){const{data:t}=await L.get(`admin/orders/${s}`);return t}async function M(s){i.value=await B(s.id),$.value=!0}async function P(s){i.value=await B(s.id),w.value=!0}async function q(s){var t,u;try{await L.post("order-sts/edit",{orderId:(t=i.value)==null?void 0:t.id,status:s.status,note:s.note}),w.value=!1,h.info("ویرایش موفق آمیز"),(u=x.value)==null||u.fetch()}catch{h.error("خطا در ویرایش")}}async function E(s){var t,u,m,T;try{await L.post("order-sts/edit",{orderId:(t=i.value)==null?void 0:t.id,status:s.status,remove:!0}),w.value=!1,h.info("ویرایش موفق آمیز"),(u=x.value)==null||u.fetch()}catch(C){h.error(((T=(m=C==null?void 0:C.response)==null?void 0:m.data)==null?void 0:T.message)??"خطا در ویرایش")}}function R(s){L.post("delete-order",{id:s.id}).then(()=>{var t;h.info("سفارش با موفقیت حذف گردید"),(t=x.value)==null||t.fetch()}).catch(t=>{var u,m;console.log(t),h.error(((m=(u=t==null?void 0:t.response)==null?void 0:u.data)==null?void 0:m.message)??"خطا در حذف")})}return(s,t)=>{const u=_("a-tag"),m=_("a-button"),T=_("a-popconfirm"),C=_("a-input"),W=_("a-timeline-item"),H=_("a-timeline"),D=_("a-modal"),v=_("a-descriptions-item"),I=_("a-descriptions"),J=_("a-divider"),K=_("a-card"),Q=_("a-empty");return a(),c("div",le,[n(K,{title:"لیست سفارش های عمده"},{default:o(()=>[n(oe,{ref_key:"tbl",ref:x,model:Z(z)},{city:o(({text:e})=>[e?(a(),c("div",re,l(A(e)),1)):(a(),c("div",ie,"-"))]),opt:o(({record:e})=>[b("div",de,[S("order.omde.view")?(a(),k(V,{key:0,"icon-class":"w-5 h-5 text-primary",class:"mr-3",icon:"ListIcon",title:"مشاهده سفارش",onClick:y=>M(e)},null,8,["onClick"])):p("",!0),S("order.omde.remove")?(a(),k(V,{key:1,"icon-class":"w-5 h-5 text-danger",class:"mr-3",icon:"TrashIcon",title:"حذف","pop-title":"آیا مطمئن به حدف رکورد مورد نظر هستید؟",onClick:y=>R(e)},null,8,["onClick"])):p("",!0)])]),items_len:o(({text:e})=>[e?(a(),c("div",ue,l(e.length),1)):p("",!0)]),sts_str:o(({record:e})=>[S("order.omde.state")?(a(),c("a",{key:0,href:"",onClick:ee(y=>P(e),["prevent"])},l(e.sts_str),9,ce)):(a(),c("span",_e,l(e.sts_str),1))]),confirmed_str:o(({record:e})=>[d(l(e.confirmed_str),1)]),_:1},8,["model"]),n(D,{open:w.value,"onUpdate:open":t[1]||(t[1]=e=>w.value=e),title:"وضعیت سفارش"},{footer:o(()=>[n(m,{onClick:t[0]||(t[0]=e=>w.value=!1)},{default:o(()=>[...t[7]||(t[7]=[d("باشه",-1)])]),_:1})]),default:o(()=>[i.value?(a(),k(H,{key:0},{default:o(()=>[(a(!0),c(U,null,F(i.value.activity,(e,y)=>(a(),k(W,{key:y,color:G(e)},{default:o(()=>[b("div",fe,[b("div",null,l(e.title),1),e.proceed?(a(),c("div",me,[b("div",pe,[b("div",ve,[n(u,null,{default:o(()=>[d(l(O(e.uaj)),1)]),_:2},1024)]),y>0&&S("order.omde.state.remove")?(a(),k(T,{key:0,"ok-text":"بله","cancel-text":"بی خیال",onConfirm:N=>E(e)},{title:o(()=>[...t[4]||(t[4]=[b("p",null,"آیا مطمئن به حذف وضعیت مورد نظر هستید ؟",-1)])]),default:o(()=>[n(m,{size:"small",danger:""},{default:o(()=>[...t[5]||(t[5]=[d("حذف وضعیت",-1)])]),_:1})]),_:1},8,["onConfirm"])):p("",!0)])])):p("",!0),!e.proceed&&S("order.omde.state.submit")?(a(),c("div",ye,[n(C,{value:e.note,"onUpdate:value":N=>e.note=N,placeholder:"یادداشت"},null,8,["value","onUpdate:value"]),n(m,{type:"text",size:"small",onClick:N=>q(e)},{default:o(()=>[...t[6]||(t[6]=[d("ثبت وضعیت",-1)])]),_:1},8,["onClick"])])):p("",!0),e.proceed?(a(),c("div",ke,l(e.note),1)):p("",!0)])]),_:2},1032,["color"]))),128))]),_:1})):p("",!0)]),_:1},8,["open"]),n(D,{open:$.value,"onUpdate:open":t[3]||(t[3]=e=>$.value=e),title:"مشاهده سفارش",width:"80%"},{footer:o(()=>[n(m,{onClick:t[2]||(t[2]=e=>$.value=!1)},{default:o(()=>[...t[8]||(t[8]=[d("باشه",-1)])]),_:1})]),default:o(()=>[i.value?(a(),c("div",we,[n(I,null,{default:o(()=>[n(v,{label:"مشتری"},{default:o(()=>[d(l(i.value.customer.fname)+" "+l(i.value.customer.lname),1)]),_:1}),n(v,{label:"تلفن همراه"},{default:o(()=>[d(l(i.value.customer.phone),1)]),_:1}),n(v,{label:"تاریخ ثبت"},{default:o(()=>[d(l(O(i.value.caj)),1)]),_:1}),n(v,{label:"وضعیت"},{default:o(()=>[d(l(i.value.sts_str),1)]),_:1})]),_:1}),n(K,{title:"آیتم های سفارش"},{default:o(()=>[(a(!0),c(U,null,F(i.value.items,(e,y)=>(a(),c("div",{key:y},[n(I,null,{default:o(()=>[n(v,{label:"نام محصول"},{default:o(()=>[n(u,{color:"blue"},{default:o(()=>[d(l(e.title),1)]),_:2},1024)]),_:2},1024),n(v,{label:"عنوان تنوع"},{default:o(()=>[d(l(e.variant_title),1)]),_:2},1024),n(v,{label:"وزن نهایی"},{default:o(()=>[n(u,{color:"red"},{default:o(()=>[d(l(e.grams),1)]),_:2},1024)]),_:2},1024),n(v,{label:"تعداد"},{default:o(()=>[n(u,{color:"orange"},{default:o(()=>[d(l(e.qty),1)]),_:2},1024)]),_:2},1024)]),_:2},1024),y!!r.hasPermission(s),z=ae(),x=j(null),i=j(void 0),$=j(!1),w=j(!1),O=s=>s?ne(s):"";function A(s){return r.cityFilters[s]??"-"}function G(s){return s.proceed?"green":"gray"}async function B(s){const{data:t}=await L.get(`admin/orders/${s}`);return t}async function M(s){i.value=await B(s.id),$.value=!0}async function P(s){i.value=await B(s.id),w.value=!0}async function q(s){var t,u;try{await L.post("order-sts/edit",{orderId:(t=i.value)==null?void 0:t.id,status:s.status,note:s.note}),w.value=!1,h.info("ویرایش موفق آمیز"),(u=x.value)==null||u.fetch()}catch{h.error("خطا در ویرایش")}}async function E(s){var t,u,m,T;try{await L.post("order-sts/edit",{orderId:(t=i.value)==null?void 0:t.id,status:s.status,remove:!0}),w.value=!1,h.info("ویرایش موفق آمیز"),(u=x.value)==null||u.fetch()}catch(C){h.error(((T=(m=C==null?void 0:C.response)==null?void 0:m.data)==null?void 0:T.message)??"خطا در ویرایش")}}function R(s){L.post("delete-order",{id:s.id}).then(()=>{var t;h.info("سفارش با موفقیت حذف گردید"),(t=x.value)==null||t.fetch()}).catch(t=>{var u,m;console.log(t),h.error(((m=(u=t==null?void 0:t.response)==null?void 0:u.data)==null?void 0:m.message)??"خطا در حذف")})}return(s,t)=>{const u=_("a-tag"),m=_("a-button"),T=_("a-popconfirm"),C=_("a-input"),W=_("a-timeline-item"),H=_("a-timeline"),D=_("a-modal"),v=_("a-descriptions-item"),I=_("a-descriptions"),J=_("a-divider"),K=_("a-card"),Q=_("a-empty");return a(),c("div",le,[n(K,{title:"لیست سفارش های عمده"},{default:o(()=>[n(oe,{ref_key:"tbl",ref:x,model:Z(z)},{city:o(({text:e})=>[e?(a(),c("div",re,l(A(e)),1)):(a(),c("div",ie,"-"))]),opt:o(({record:e})=>[b("div",de,[S("order.omde.view")?(a(),k(V,{key:0,"icon-class":"w-5 h-5 text-primary",class:"mr-3",icon:"ListIcon",title:"مشاهده سفارش",onClick:y=>M(e)},null,8,["onClick"])):p("",!0),S("order.omde.remove")?(a(),k(V,{key:1,"icon-class":"w-5 h-5 text-danger",class:"mr-3",icon:"TrashIcon",title:"حذف","pop-title":"آیا مطمئن به حدف رکورد مورد نظر هستید؟",onClick:y=>R(e)},null,8,["onClick"])):p("",!0)])]),items_len:o(({text:e})=>[e?(a(),c("div",ue,l(e.length),1)):p("",!0)]),sts_str:o(({record:e})=>[S("order.omde.state")?(a(),c("a",{key:0,href:"",onClick:ee(y=>P(e),["prevent"])},l(e.sts_str),9,ce)):(a(),c("span",_e,l(e.sts_str),1))]),confirmed_str:o(({record:e})=>[d(l(e.confirmed_str),1)]),_:1},8,["model"]),n(D,{open:w.value,"onUpdate:open":t[1]||(t[1]=e=>w.value=e),title:"وضعیت سفارش"},{footer:o(()=>[n(m,{onClick:t[0]||(t[0]=e=>w.value=!1)},{default:o(()=>[...t[7]||(t[7]=[d("باشه",-1)])]),_:1})]),default:o(()=>[i.value?(a(),k(H,{key:0},{default:o(()=>[(a(!0),c(U,null,F(i.value.activity,(e,y)=>(a(),k(W,{key:y,color:G(e)},{default:o(()=>[b("div",fe,[b("div",null,l(e.title),1),e.proceed?(a(),c("div",me,[b("div",pe,[b("div",ve,[n(u,null,{default:o(()=>[d(l(O(e.uaj)),1)]),_:2},1024)]),y>0&&S("order.omde.state.remove")?(a(),k(T,{key:0,"ok-text":"بله","cancel-text":"بی خیال",onConfirm:N=>E(e)},{title:o(()=>[...t[4]||(t[4]=[b("p",null,"آیا مطمئن به حذف وضعیت مورد نظر هستید ؟",-1)])]),default:o(()=>[n(m,{size:"small",danger:""},{default:o(()=>[...t[5]||(t[5]=[d("حذف وضعیت",-1)])]),_:1})]),_:1},8,["onConfirm"])):p("",!0)])])):p("",!0),!e.proceed&&S("order.omde.state.submit")?(a(),c("div",ye,[n(C,{value:e.note,"onUpdate:value":N=>e.note=N,placeholder:"یادداشت"},null,8,["value","onUpdate:value"]),n(m,{type:"text",size:"small",onClick:N=>q(e)},{default:o(()=>[...t[6]||(t[6]=[d("ثبت وضعیت",-1)])]),_:1},8,["onClick"])])):p("",!0),e.proceed?(a(),c("div",ke,l(e.note),1)):p("",!0)])]),_:2},1032,["color"]))),128))]),_:1})):p("",!0)]),_:1},8,["open"]),n(D,{open:$.value,"onUpdate:open":t[3]||(t[3]=e=>$.value=e),title:"مشاهده سفارش",width:"80%"},{footer:o(()=>[n(m,{onClick:t[2]||(t[2]=e=>$.value=!1)},{default:o(()=>[...t[8]||(t[8]=[d("باشه",-1)])]),_:1})]),default:o(()=>[i.value?(a(),c("div",we,[n(I,null,{default:o(()=>[n(v,{label:"مشتری"},{default:o(()=>[d(l(i.value.customer.fname)+" "+l(i.value.customer.lname),1)]),_:1}),n(v,{label:"تلفن همراه"},{default:o(()=>[d(l(i.value.customer.phone),1)]),_:1}),n(v,{label:"تاریخ ثبت"},{default:o(()=>[d(l(O(i.value.caj)),1)]),_:1}),n(v,{label:"وضعیت"},{default:o(()=>[d(l(i.value.sts_str),1)]),_:1})]),_:1}),n(K,{title:"آیتم های سفارش"},{default:o(()=>[(a(!0),c(U,null,F(i.value.items,(e,y)=>(a(),c("div",{key:y},[n(I,null,{default:o(()=>[n(v,{label:"نام محصول"},{default:o(()=>[n(u,{color:"blue"},{default:o(()=>[d(l(e.title),1)]),_:2},1024)]),_:2},1024),n(v,{label:"عنوان تنوع"},{default:o(()=>[d(l(e.variant_title),1)]),_:2},1024),n(v,{label:"وزن نهایی"},{default:o(()=>[n(u,{color:"red"},{default:o(()=>[d(l(e.grams),1)]),_:2},1024)]),_:2},1024),n(v,{label:"تعداد"},{default:o(()=>[n(u,{color:"orange"},{default:o(()=>[d(l(e.qty),1)]),_:2},1024)]),_:2},1024)]),_:2},1024),y(n(),s(r,{title:t(o),model:t(m),"accounting-sync":""},null,8,["title","model"]))}});export{g as default}; diff --git a/apps/admin-panel/dist/assets/OmdeList-zzqhSk5R.js b/apps/admin-panel/dist/assets/OmdeList-zzqhSk5R.js deleted file mode 100644 index 3c4f138..0000000 --- a/apps/admin-panel/dist/assets/OmdeList-zzqhSk5R.js +++ /dev/null @@ -1 +0,0 @@ -import{b as m,O as i,_ as r}from"./omdeListModel-B-zNFWRI.js";import{d as s,a as p,h as t,o as a}from"./index-WFQJAeoE.js";import"./model-Di_BQPv1.js";import"./SettingOutlined-DZJd42S-.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ListPageHeader.vue_vue_type_script_setup_true_lang-BmENA4yH.js";import"./bulkCustomer.vue_vue_type_script_setup_true_lang-zBMtv664.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-BQ_i_QZe.js";import"./UnorderedListOutlined-CvD227Uu.js";const C=s({__name:"OmdeList",setup(l){const o=i.omde.title,e=m("omde");return(n,d)=>(a(),p(r,{title:t(o),model:t(e)},null,8,["title","model"]))}});export{C as default}; diff --git a/apps/admin-panel/dist/assets/OmdeNonVerifiedList-Bf5RFUhe.js b/apps/admin-panel/dist/assets/OmdeNonVerifiedList-Bf5RFUhe.js new file mode 100644 index 0000000..db51132 --- /dev/null +++ b/apps/admin-panel/dist/assets/OmdeNonVerifiedList-Bf5RFUhe.js @@ -0,0 +1 @@ +import{b as i,O as r,_ as m}from"./omdeListModel-C6pAmqnF.js";import{d as p,a as n,h as t,o as s}from"./index-CVG99b4v.js";import"./model-CvqTGmy8.js";import"./filters-UavLT20t.js";import"./index-pLFqZCCf.js";import"./SettingOutlined-D7--Xtqg.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ListPageHeader.vue_vue_type_script_setup_true_lang-CetMN4WH.js";import"./AccountingSyncButton.vue_vue_type_script_setup_true_lang-DYPt-3CU.js";import"./bulkCustomer.vue_vue_type_script_setup_true_lang-BLZHRH0s.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-CWur6xTz.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-C8WW9alD.js";import"./CityTreeSelect.vue_vue_type_script_setup_true_lang-Ctf4a2EQ.js";import"./DateInput-P3xqxLM7.js";import"./UnorderedListOutlined-CKa6XzC7.js";const S=p({__name:"OmdeNonVerifiedList",setup(a){const o=r.nonVerified.title,e=i("nonVerified");return(l,d)=>(s(),n(m,{title:t(o),model:t(e),"reject-only-step-one":""},null,8,["title","model"]))}});export{S as default}; diff --git a/apps/admin-panel/dist/assets/OmdeNonVerifiedList-DZRWwcEk.js b/apps/admin-panel/dist/assets/OmdeNonVerifiedList-DZRWwcEk.js deleted file mode 100644 index 27f8108..0000000 --- a/apps/admin-panel/dist/assets/OmdeNonVerifiedList-DZRWwcEk.js +++ /dev/null @@ -1 +0,0 @@ -import{b as i,O as r,_ as m}from"./omdeListModel-B-zNFWRI.js";import{d as n,a as s,h as e,o as p}from"./index-WFQJAeoE.js";import"./model-Di_BQPv1.js";import"./SettingOutlined-DZJd42S-.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ListPageHeader.vue_vue_type_script_setup_true_lang-BmENA4yH.js";import"./bulkCustomer.vue_vue_type_script_setup_true_lang-zBMtv664.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-BQ_i_QZe.js";import"./UnorderedListOutlined-CvD227Uu.js";const B=n({__name:"OmdeNonVerifiedList",setup(a){const t=r.nonVerified.title,o=i("nonVerified");return(l,d)=>(p(),s(m,{title:e(t),model:e(o),"reject-only-step-one":""},null,8,["title","model"]))}});export{B as default}; diff --git a/apps/admin-panel/dist/assets/Permission-uW7bxjY4.js b/apps/admin-panel/dist/assets/Permission-BZNy3Z54.js similarity index 75% rename from apps/admin-panel/dist/assets/Permission-uW7bxjY4.js rename to apps/admin-panel/dist/assets/Permission-BZNy3Z54.js index d384724..dde8c09 100644 --- a/apps/admin-panel/dist/assets/Permission-uW7bxjY4.js +++ b/apps/admin-panel/dist/assets/Permission-BZNy3Z54.js @@ -1 +1 @@ -import{d as R,u as j,v as z,a as u,w as r,A as K,l as m,x as v,z as _,r as o,o as d,c as y,n as W,b as $,e as q,F as G,i as g,f as b,y as H,p as E,t as J}from"./index-WFQJAeoE.js";import{u as Q}from"./auth-Cz9vAefU.js";import{_ as X}from"./_plugin-vue_export-helper-DlAUqK2U.js";const C=[{title:"پیشخوان",key:"dashboard.view"},{title:"اشخاص",key:"persons",children:[{title:"اضافه کردن شخص",key:"persons.create",children:[{title:"افزودن کارشناس فروش",key:"persons.create.seller"},{title:"افزودن مشتری عمده",key:"persons.create.client"},{title:"افزودن مشتری تک",key:"persons.create.single"}]},{title:"لیست کارشناسان فروش",key:"persons.list.sellers",children:[{title:"ویرایش اطلاعات کارشناس فروش",key:"persons.list.sellers.edit"},{title:"مشاهده سفارشات کارشناس فروش",key:"persons.list.sellers.view.orders"},{title:"مشاهده اسناد مالی کارشناس فروش",key:"persons.list.sellers.view.documents"},{title:"توقف سفارش کارشناس فروش",key:"persons.list.sellers.unable.order"},{title:"فعال سازی سفارش کارشناس فروش",key:"persons.list.sellers.able.order"},{title:"فعال سازی حساب کاربری کارشناس فروش",key:"persons.list.sellers.able"},{title:"غیر فعال سازی حساب کاربری کارشناس فروش",key:"persons.list.sellers.unable"}]},{title:"لیست مشتریان عمده",key:"persons.list.client.omde",children:[{title:"مشاهده اطلاعات مشتریان عمده",key:"persons.list.client.omde.view"},{title:"ویرایش اطلاعات مشتری عمده",key:"persons.list.client.omde.edit"},{title:"مشاهده سفارشات مشتری عمده",key:"persons.list.client.omde.view.orders"},{title:"مشاهده اسناد مالی مشتری عمده",key:"persons.list.client.omde.view.documents"},{title:"توقف سفارش مشتری عمده",key:"persons.list.client.omde.unable.order"},{title:"فعال سازی سفارش مشتری عمده",key:"persons.list.client.omde.able.order"},{title:"فعال سازی مشتری عمده",key:"persons.list.client.omde.able"},{title:"غیر فعال سازی مشتری عمده",key:"persons.list.client.omde.unable"}]},{title:"لیست مشتریان تک",key:"persons.list.client.single",children:[{title:"مشاهده اطلاعات مشتریان تک",key:"persons.list.client.single.view"},{title:"ویرایش اطلاعات مشتری تک",key:"persons.list.client.single.edit"},{title:"مشاهده اطلاعات مشتری تک",key:"persons.list.client.single.view"}]}]},{title:"شعب",key:"branch",children:[{title:"افزودن شعب",key:"branch.create"},{title:" لیست شعب",key:"branch.list"}]},{title:"کارگاه",key:"workshop",children:[{title:"افزودن کارگاه",key:"workshop.create"},{title:" لیست کارگاه ها",key:"workshop.list"}]},{title:"محصولات",key:"product",children:[{title:"افزودن محصول",key:"product.create"},{title:"لیست محصولات",key:"product.list",children:[{title:"مشاهده لیست محصولات",key:"product.list.view"},{title:"ویرایش اطلاعات محصول",key:"product.list.edit"},{title:"مشاهده اطلاعات جامع محصول",key:"product.list.view"},{title:"تنوع های محصول",key:"product.list.variants",children:[{title:"مشاهده تنوع های محصول",key:"product.list.variants.view"},{title:"ویرایش تنوع محصول",key:"product.list.variants.edit"},{title:"حذف تنوع محصول",key:"product.list.variants.remove"},{title:"افزودن تنوع محصول",key:"product.list.variants.add"}]},{title:"حذف محصول",key:"product.list.remove"},{title:"تغییر دسته ای",key:"product.list.group.edit"}]},{title:"تغییر درصد محصولات",key:"product.percent"}]},{title:"سفارشات",key:"order",children:[{title:"لیست سفارشات",key:"order.list",children:[{title:"مشاهده لیست سفارشات",key:"order.list.view"},{title:"وضعیت سفارش",key:"order.list.sts",children:[{title:"مشاهده وضعیت سفارش",key:"order.list.sts.view"},{title:"حذف وضعیت",key:"order.list.sts.remove"},{title:"ثبت وضعیت",key:"order.list.sts.submit"}]},{title:"مشاهده سفارش",key:"order.list.view"},{title:"ویرایش سفارش",key:"order.list.view.edit"},{title:"دریافت pdf",key:"order.list.pdf"}]},{title:"سفارشات عمده",key:"order.omde",children:[{title:"وضعیت سفارش",key:"order.omde.state",children:[{title:"مشاهده وضعیت سفارش",key:"order.omde.state.view"},{title:"ثبت وضعیت سفارش",key:"order.omde.state.submit"},{title:"حذف وضعیت سفارش",key:"order.omde.state.remove"}]},{title:"مشاهده سفارش",key:"order.omde.view"},{title:"ویرایش سفارش",key:"order.omde.view.edit"},{title:"حذف آیتم از سفارش",key:"order.omde.view.remove"},{title:"حذف سفارش",key:"order.omde.remove"},{title:"دریافت pdf سفارش",key:"order.omde.get"}]},{title:"سفارشات ساختنی",key:"order.makeOrder",children:[{title:"وضعیت سفارش",key:"order.makeOrder.state",children:[{title:"مشاهده وضعیت سفارش",key:"order.makeOrder.state.view"},{title:"ثبت وضعیت سفارش",key:"order.makeOrder.state.submit"},{title:"حذف وضعیت سفارش",key:"order.makeOrder.state.remove"}]},{title:"مشاهده سفارش",key:"order.makeOrder.view"},{title:"ویرایش سفارش",key:"order.makeOrder.view.edit"},{title:"حذف آیتم از سفارش",key:"order.makeOrder.view.remove"},{title:"حذف سفارش",key:"order.makeOrder.remove"},{title:"دریافت pdf سفارش",key:"order.makeOrder.get"}]},{title:"لیست تامین",key:"order.tamin",children:[{title:"مشاهده لیست تامین",key:"order.tamin.view"},{title:"وضعیت سفارش",key:"order.tamin.state",children:[{title:"مشاهده وضعیت سفارش",key:"order.tamin.state.view"},{title:"ثبت وضعیت سفارش",key:"order.tamin.state.submit"},{title:"حذف وضعیت سفارش",key:"order.tamin.state.remove"}]},{title:"مشاهده سفارش",key:"order.tamin.view"},{title:"ویرایش سفارش",key:"order.tamin.view.edit"}]},{title:"ثبت سفارش تک",key:"order.create"}]},{title:"مدیران",key:"user",children:[{title:"افزودن مدیر",key:"user.create"},{title:"لیست مدیران",key:"user.list",children:[{title:"مشاهده لیست مدیران",key:"user.list.view"},{title:"ویرایش مدیر",key:"user.list.edit"},{title:"حذف مدیر",key:"user.list.remove"},{title:"افزودن مدیر",key:"user.list.create"}]},{title:"دسترسی ها",key:"user.permission",children:[{title:"ویرایش دسترسی",key:"user.permission.edit"},{title:"افزودن دسترسی",key:"user.permission.create"}]}]},{title:"دسته بندی ها",key:"collection",children:[{title:"افزودن دسته بندی",key:"collection.create"},{title:" لیست دسته بندی ها",key:"collection.list",children:[{title:"مشاهده لیست دسته بندی ها",key:"collection.list.view"},{title:"ویرایش دسته",key:"collection.list.edit"},{title:"حذف دسته",key:"collection.list.remove"}]}]},{title:"اسناد مالی",key:"document",children:[{title:" لیست اسناد مالی",key:"document.list",children:[{title:"مشاهده لیست اسناد مالی",key:"document.list.view"},{title:"ویرایش سند مالی",key:"document.list.edit"},{title:"حذف سند مالی",key:"document.list.remove"},{title:"رد کردن سند مالی",key:"document.list.deny"},{title:"تأیید کردن سند مالی",key:"document.list.confirm"},{title:"دریافت pdf سند مالی",key:"document.list.get"}]},{title:"وارد کردن سند مالی مشتری",key:"document.create"}]},{title:"استثناعات تخفیف",key:"offersIgnore"},{title:"تخفیفات",key:"offers",children:[{title:" لیست تخفیفات",key:"offers.list",children:[{title:"مشاهده لیست تخفیفات",key:"offers.list.view"},{title:"ویرایش تخفیف عمده",key:"offers.list.edit"},{title:"ویرایش تخفیف تک",key:"offers.list.tak.edit"},{title:"حذف تخفیف عمده",key:"offers.list.remove"},{title:"حذف تخفیف تک",key:"offers.list.tak.remove"}]},{title:"تعریف تخفیف عمده",key:"offers.create"},{title:"تعریف تخفیف تک",key:"offers.create.tak"},{title:"تخفیف اتوماتیک",key:"offers.autopromotion"}]},{title:"فاکتور انتقال",key:"invoice",children:[{title:"افزودن فاکتور",key:"invoice.create"},{title:" لیست فاکتورها",key:"invoice.list"}]},{title:"گزارشات",key:"report",children:[{title:"گزارش تجمیعی سفارشات و اسناد مالی",key:"report.order.item"},{title:"گزارش محصولات",key:"report.product"}]},{title:"شهرها",key:"cities",children:[{title:"افزودن شهر",key:"cities.create"},{title:"لیست شهرها",key:"cities.list",children:[{title:"مشاهده لیست شهرها",key:"cities.list.view"},{title:"حذف شهر",key:"cities.list.remove"},{title:"مشاهده شهر",key:"cities.list.view"},{title:"ویرایش شهر",key:"cities.list.view.edit"}]}]},{title:"دیدگاه ها",key:"comment",children:[{title:"مشاهده لیست دیدگاه ها",key:"comment.view.all"},{title:"تغییر وضعیت دیدگاه",key:"comment.state"},{title:"مشاهده دیدگاه",key:"comment.view"},{title:"ویرایش دیدگاه",key:"comment.view.edit"},{title:"حذف دیدگاه",key:"comment.remove"}]},{title:"پیامک",key:"sms",children:[{title:"ارسال پیامک",key:"sms.create",children:[{title:"ارسال برای یک شماره تلفن",key:"sms.create.single"},{title:"ارسال برای همه کاربران",key:"sms.create.all"},{title:"ارسال برای کارشناسان فروش",key:"sms.create.reagent"},{title:"ارسال برای مشتریان عمده",key:"sms.create.omde"},{title:"ارسال برای چند شماره تلفن",key:"sms.create.multiple"}]},{title:"لیست پیامک های ارسال شده",key:"sms.list"}]},{title:"کیف پول",key:"wallet",children:[{title:"لیست کیف پول های شارژ شده",key:"wallet.list"},{title:"شارژ کیف پول",key:"wallet.charge"},{title:"تغییر درصد شارژ کیف پول",key:"wallet.percent"}]},{title:"نوتیفیکیشن",key:"notify",children:[{title:"ارسال نوتیفیکیشن",key:"notify.create",children:[{title:"ارسال برای کارشناسان فروش",key:"notify.create.multiple.reagent"},{title:"ارسال برای یک مشتری",key:"notify.create.single.customer"},{title:"ارسال برای مشتریان عمده",key:"notify.create.multiple.omde"},{title:"ارسال برای همه مشتریان",key:"notify.create.multiple.customer"},{title:"ارسال برای یک مدیر",key:"notify.create.single.admin"},{title:"ارسال برای همه مدیران",key:"notify.create.multiple.admin"}]},{title:"لیست نوتیفیکیشن های دریافتی",key:"notify.me"}]},{title:"پیکربندی",key:"config",children:[{title:"مدیریت ثابت ها",key:"config.statics",children:[{title:"برند ها",key:"config.statics.brand",children:[{title:"افزودن برند",key:"config.statics.brand.create"},{title:"ویرایش برند",key:"config.statics.brand.edit"},{title:"حذف برند",key:"config.statics.brand.remove"}]},{title:"برچسب ها",key:"config.statics.tags",children:[{title:"افزودن برچسب",key:"config.statics.tags.create"},{title:"ویرایش برچسب",key:"config.statics.tags.edit"},{title:"حذف برچسب",key:"config.statics.tags.remove"}]}]},{title:"مدیریت کیف پول",key:"config.wallet"},{title:"گزارش",key:"config.report"}]},{title:"آمار",key:"statics"},{title:"خبرنامه",key:"newsletters.newsletters"},{title:"سفارشی",key:"custom",children:[{title:"اسلایدر موبایل",key:"custom.config.statics.slider"},{title:"برچسب بنر اول سایت",key:"custom.config.statics.tags.banner.ids"}]}],Z={class:"grid-2"},O="84",x="85",T=104,ee=R({__name:"Permission",setup(te){const N=j(),S=Q(),p=e=>!!N.hasPermission(e),a=m(x),k=m(""),n=m([]),B=m(!0),D=m([]),s=H({}),c=E(()=>a.value===O),I=E(()=>{var t;let e=D.value;return p("user.permission.create")||(e=e.filter(i=>String(i.id)!==O)),((t=S.user)==null?void 0:t.ut)!==T&&(e=e.filter(i=>i.id!==T)),e}),V=E(()=>{var e;return((e=S.user)==null?void 0:e.ut)===T?C:C.filter(t=>t.key!=="custom")});async function P(){try{const{data:e}=await v.get("const/__list__ut");D.value=e}catch(e){console.log(e)}}async function f(e){if(!e){n.value=[];return}if(e===O){n.value=[];return}try{const{data:t}=await v.get(`roles/${e}`);n.value=t}catch{_.error("خطا در دریافت اطلاعات")}}async function A(){var e,t;if(Object.keys(s).forEach(i=>delete s[i]),!a.value){s.ut="لطفاسطح دسترسی را انتخاب کنید";return}if(c.value&&!k.value){s.user="لطفا نام سطح دسترسی را وارد کنید";return}try{let i=a.value;if(c.value){const{data:h}=await v.post("const",{key:"__list__ut",val:k.value});i=String(h.id)}await v.post("roles/create",{ut:i,roles:n.value}),await P(),c.value&&(a.value=i,k.value="",await f(i)),_.success("عملیات با موفقیت انجام شد")}catch(i){_.error(((t=(e=i==null?void 0:i.response)==null?void 0:e.data)==null?void 0:t.message)??"خطا در ثبت اطلاعات")}}return z(async()=>{await P(),a.value=x,await f(x)}),(e,t)=>{const i=o("a-select-option"),h=o("a-select"),w=o("a-form-item"),F=o("a-input"),Y=o("a-tree"),U=o("a-button"),L=o("a-card"),M=o("a-form");return d(),u(M,{layout:"vertical",onSubmit:K(A,["prevent"])},{default:r(()=>[y(L,{id:"rid",title:"دسترسی ها"},{default:r(()=>[W("div",Z,[y(w,{label:"سطح کاربر","validate-status":s.ut?"error":"",help:s.ut},{default:r(()=>[y(h,{value:a.value,"onUpdate:value":t[0]||(t[0]=l=>a.value=l),"allow-clear":"",onChange:f},{default:r(()=>[(d(!0),$(G,null,q(I.value,l=>(d(),u(i,{key:l.id,value:String(l.id)},{default:r(()=>[b(J(l.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1},8,["validate-status","help"]),c.value&&p("user.permission.create")?(d(),u(w,{key:0,label:"نام سطح دسترسی","validate-status":s.user?"error":"",help:s.user},{default:r(()=>[y(F,{value:k.value,"onUpdate:value":t[1]||(t[1]=l=>k.value=l),"allow-clear":""},null,8,["value"])]),_:1},8,["validate-status","help"])):g("",!0),y(w,{label:"نقش ها",class:"tree-item"},{default:r(()=>[y(Y,{"checked-keys":n.value,"onUpdate:checkedKeys":t[2]||(t[2]=l=>n.value=l),"check-strictly":!1,checkable:"",style:{width:"100%"},"tree-data":V.value,"field-names":{title:"title",key:"key",children:"children"},"auto-expand-parent":B.value},null,8,["checked-keys","tree-data","auto-expand-parent"])]),_:1})]),!c.value&&p("user.permission.edit")?(d(),u(U,{key:0,type:"primary","html-type":"submit"},{default:r(()=>[...t[3]||(t[3]=[b(" ثبت تغییرات ",-1)])]),_:1})):g("",!0),c.value&&p("user.permission.create")?(d(),u(U,{key:1,type:"primary","html-type":"submit"},{default:r(()=>[...t[4]||(t[4]=[b(" افزودن ",-1)])]),_:1})):g("",!0)]),_:1})]),_:1})}}}),se=X(ee,[["__scopeId","data-v-09e9c63b"]]);export{se as default}; +import{d as R,u as j,v as z,a as u,w as r,A as K,l as m,x as v,z as _,r as o,o as d,c as y,n as W,b as $,e as q,F as G,i as g,f as b,y as H,p as E,t as J}from"./index-CVG99b4v.js";import{u as Q}from"./auth-Cu4qHRNu.js";import{_ as X}from"./_plugin-vue_export-helper-DlAUqK2U.js";const C=[{title:"پیشخوان",key:"dashboard.view"},{title:"اشخاص",key:"persons",children:[{title:"اضافه کردن شخص",key:"persons.create",children:[{title:"افزودن کارشناس فروش",key:"persons.create.seller"},{title:"افزودن مشتری عمده",key:"persons.create.client"},{title:"افزودن مشتری تک",key:"persons.create.single"}]},{title:"لیست کارشناسان فروش",key:"persons.list.sellers",children:[{title:"ویرایش اطلاعات کارشناس فروش",key:"persons.list.sellers.edit"},{title:"مشاهده سفارشات کارشناس فروش",key:"persons.list.sellers.view.orders"},{title:"مشاهده اسناد مالی کارشناس فروش",key:"persons.list.sellers.view.documents"},{title:"توقف سفارش کارشناس فروش",key:"persons.list.sellers.unable.order"},{title:"فعال سازی سفارش کارشناس فروش",key:"persons.list.sellers.able.order"},{title:"فعال سازی حساب کاربری کارشناس فروش",key:"persons.list.sellers.able"},{title:"غیر فعال سازی حساب کاربری کارشناس فروش",key:"persons.list.sellers.unable"}]},{title:"لیست مشتریان عمده",key:"persons.list.client.omde",children:[{title:"مشاهده اطلاعات مشتریان عمده",key:"persons.list.client.omde.view"},{title:"ویرایش اطلاعات مشتری عمده",key:"persons.list.client.omde.edit"},{title:"مشاهده سفارشات مشتری عمده",key:"persons.list.client.omde.view.orders"},{title:"مشاهده اسناد مالی مشتری عمده",key:"persons.list.client.omde.view.documents"},{title:"توقف سفارش مشتری عمده",key:"persons.list.client.omde.unable.order"},{title:"فعال سازی سفارش مشتری عمده",key:"persons.list.client.omde.able.order"},{title:"فعال سازی مشتری عمده",key:"persons.list.client.omde.able"},{title:"غیر فعال سازی مشتری عمده",key:"persons.list.client.omde.unable"}]},{title:"لیست مشتریان تک",key:"persons.list.client.single",children:[{title:"مشاهده اطلاعات مشتریان تک",key:"persons.list.client.single.view"},{title:"ویرایش اطلاعات مشتری تک",key:"persons.list.client.single.edit"},{title:"مشاهده اطلاعات مشتری تک",key:"persons.list.client.single.view"}]}]},{title:"شعب",key:"branch",children:[{title:"افزودن شعب",key:"branch.create"},{title:" لیست شعب",key:"branch.list"}]},{title:"کارگاه",key:"workshop",children:[{title:"افزودن کارگاه",key:"workshop.create"},{title:" لیست کارگاه ها",key:"workshop.list"}]},{title:"محصولات",key:"product",children:[{title:"افزودن محصول",key:"product.create"},{title:"لیست محصولات",key:"product.list",children:[{title:"مشاهده لیست محصولات",key:"product.list.view"},{title:"ویرایش اطلاعات محصول",key:"product.list.edit"},{title:"مشاهده اطلاعات جامع محصول",key:"product.list.view"},{title:"تنوع های محصول",key:"product.list.variants",children:[{title:"مشاهده تنوع های محصول",key:"product.list.variants.view"},{title:"ویرایش تنوع محصول",key:"product.list.variants.edit"},{title:"حذف تنوع محصول",key:"product.list.variants.remove"},{title:"افزودن تنوع محصول",key:"product.list.variants.add"}]},{title:"حذف محصول",key:"product.list.remove"},{title:"تغییر دسته ای",key:"product.list.group.edit"}]},{title:"تغییر درصد محصولات",key:"product.percent"}]},{title:"سفارشات",key:"order",children:[{title:"لیست سفارشات",key:"order.list",children:[{title:"مشاهده لیست سفارشات",key:"order.list.view"},{title:"وضعیت سفارش",key:"order.list.sts",children:[{title:"مشاهده وضعیت سفارش",key:"order.list.sts.view"},{title:"حذف وضعیت",key:"order.list.sts.remove"},{title:"ثبت وضعیت",key:"order.list.sts.submit"}]},{title:"مشاهده سفارش",key:"order.list.view"},{title:"ویرایش سفارش",key:"order.list.view.edit"},{title:"دریافت pdf",key:"order.list.pdf"}]},{title:"سفارشات عمده",key:"order.omde",children:[{title:"وضعیت سفارش",key:"order.omde.state",children:[{title:"مشاهده وضعیت سفارش",key:"order.omde.state.view"},{title:"ثبت وضعیت سفارش",key:"order.omde.state.submit"},{title:"حذف وضعیت سفارش",key:"order.omde.state.remove"}]},{title:"مشاهده سفارش",key:"order.omde.view"},{title:"ویرایش سفارش",key:"order.omde.view.edit"},{title:"حذف آیتم از سفارش",key:"order.omde.view.remove"},{title:"حذف سفارش",key:"order.omde.remove"},{title:"دریافت pdf سفارش",key:"order.omde.get"}]},{title:"سفارشات ساختنی",key:"order.makeOrder",children:[{title:"وضعیت سفارش",key:"order.makeOrder.state",children:[{title:"مشاهده وضعیت سفارش",key:"order.makeOrder.state.view"},{title:"ثبت وضعیت سفارش",key:"order.makeOrder.state.submit"},{title:"حذف وضعیت سفارش",key:"order.makeOrder.state.remove"}]},{title:"مشاهده سفارش",key:"order.makeOrder.view"},{title:"ویرایش سفارش",key:"order.makeOrder.view.edit"},{title:"حذف آیتم از سفارش",key:"order.makeOrder.view.remove"},{title:"حذف سفارش",key:"order.makeOrder.remove"},{title:"دریافت pdf سفارش",key:"order.makeOrder.get"}]},{title:"لیست تامین",key:"order.tamin",children:[{title:"مشاهده لیست تامین",key:"order.tamin.view"},{title:"وضعیت سفارش",key:"order.tamin.state",children:[{title:"مشاهده وضعیت سفارش",key:"order.tamin.state.view"},{title:"ثبت وضعیت سفارش",key:"order.tamin.state.submit"},{title:"حذف وضعیت سفارش",key:"order.tamin.state.remove"}]},{title:"مشاهده سفارش",key:"order.tamin.view"},{title:"ویرایش سفارش",key:"order.tamin.view.edit"}]},{title:"ثبت سفارش تک",key:"order.create"}]},{title:"مدیران",key:"user",children:[{title:"افزودن مدیر",key:"user.create"},{title:"لیست مدیران",key:"user.list",children:[{title:"مشاهده لیست مدیران",key:"user.list.view"},{title:"ویرایش مدیر",key:"user.list.edit"},{title:"حذف مدیر",key:"user.list.remove"},{title:"افزودن مدیر",key:"user.list.create"}]},{title:"دسترسی ها",key:"user.permission",children:[{title:"ویرایش دسترسی",key:"user.permission.edit"},{title:"افزودن دسترسی",key:"user.permission.create"}]}]},{title:"دسته بندی ها",key:"collection",children:[{title:"افزودن دسته بندی",key:"collection.create"},{title:" لیست دسته بندی ها",key:"collection.list",children:[{title:"مشاهده لیست دسته بندی ها",key:"collection.list.view"},{title:"ویرایش دسته",key:"collection.list.edit"},{title:"حذف دسته",key:"collection.list.remove"}]}]},{title:"اسناد مالی",key:"document",children:[{title:" لیست اسناد مالی",key:"document.list",children:[{title:"مشاهده لیست اسناد مالی",key:"document.list.view"},{title:"ویرایش سند مالی",key:"document.list.edit"},{title:"حذف سند مالی",key:"document.list.remove"},{title:"رد کردن سند مالی",key:"document.list.deny"},{title:"تأیید کردن سند مالی",key:"document.list.confirm"},{title:"دریافت pdf سند مالی",key:"document.list.get"}]},{title:"وارد کردن سند مالی مشتری",key:"document.create"}]},{title:"استثناعات تخفیف",key:"offersIgnore"},{title:"تخفیفات",key:"offers",children:[{title:" لیست تخفیفات",key:"offers.list",children:[{title:"مشاهده لیست تخفیفات",key:"offers.list.view"},{title:"ویرایش تخفیف عمده",key:"offers.list.edit"},{title:"ویرایش تخفیف تک",key:"offers.list.tak.edit"},{title:"حذف تخفیف عمده",key:"offers.list.remove"},{title:"حذف تخفیف تک",key:"offers.list.tak.remove"}]},{title:"تعریف تخفیف عمده",key:"offers.create"},{title:"تعریف تخفیف تک",key:"offers.create.tak"},{title:"تخفیف اتوماتیک",key:"offers.autopromotion"}]},{title:"فاکتور انتقال",key:"invoice",children:[{title:"افزودن فاکتور",key:"invoice.create"},{title:" لیست فاکتورها",key:"invoice.list"}]},{title:"گزارشات",key:"report",children:[{title:"گزارش تجمیعی سفارشات و اسناد مالی",key:"report.order.item"},{title:"گزارش محصولات",key:"report.product"}]},{title:"شهرها",key:"cities",children:[{title:"افزودن شهر",key:"cities.create"},{title:"لیست شهرها",key:"cities.list",children:[{title:"مشاهده لیست شهرها",key:"cities.list.view"},{title:"حذف شهر",key:"cities.list.remove"},{title:"مشاهده شهر",key:"cities.list.view"},{title:"ویرایش شهر",key:"cities.list.view.edit"}]}]},{title:"دیدگاه ها",key:"comment",children:[{title:"مشاهده لیست دیدگاه ها",key:"comment.view.all"},{title:"تغییر وضعیت دیدگاه",key:"comment.state"},{title:"مشاهده دیدگاه",key:"comment.view"},{title:"ویرایش دیدگاه",key:"comment.view.edit"},{title:"حذف دیدگاه",key:"comment.remove"}]},{title:"پیامک",key:"sms",children:[{title:"ارسال پیامک",key:"sms.create",children:[{title:"ارسال برای یک شماره تلفن",key:"sms.create.single"},{title:"ارسال برای همه کاربران",key:"sms.create.all"},{title:"ارسال برای کارشناسان فروش",key:"sms.create.reagent"},{title:"ارسال برای مشتریان عمده",key:"sms.create.omde"},{title:"ارسال برای چند شماره تلفن",key:"sms.create.multiple"}]},{title:"لیست پیامک های ارسال شده",key:"sms.list"}]},{title:"کیف پول",key:"wallet",children:[{title:"لیست کیف پول های شارژ شده",key:"wallet.list"},{title:"شارژ کیف پول",key:"wallet.charge"},{title:"تغییر درصد شارژ کیف پول",key:"wallet.percent"}]},{title:"نوتیفیکیشن",key:"notify",children:[{title:"ارسال نوتیفیکیشن",key:"notify.create",children:[{title:"ارسال برای کارشناسان فروش",key:"notify.create.multiple.reagent"},{title:"ارسال برای یک مشتری",key:"notify.create.single.customer"},{title:"ارسال برای مشتریان عمده",key:"notify.create.multiple.omde"},{title:"ارسال برای همه مشتریان",key:"notify.create.multiple.customer"},{title:"ارسال برای یک مدیر",key:"notify.create.single.admin"},{title:"ارسال برای همه مدیران",key:"notify.create.multiple.admin"}]},{title:"لیست نوتیفیکیشن های دریافتی",key:"notify.me"}]},{title:"پیکربندی",key:"config",children:[{title:"مدیریت ثابت ها",key:"config.statics",children:[{title:"برند ها",key:"config.statics.brand",children:[{title:"افزودن برند",key:"config.statics.brand.create"},{title:"ویرایش برند",key:"config.statics.brand.edit"},{title:"حذف برند",key:"config.statics.brand.remove"}]},{title:"برچسب ها",key:"config.statics.tags",children:[{title:"افزودن برچسب",key:"config.statics.tags.create"},{title:"ویرایش برچسب",key:"config.statics.tags.edit"},{title:"حذف برچسب",key:"config.statics.tags.remove"}]}]},{title:"مدیریت کیف پول",key:"config.wallet"},{title:"گزارش",key:"config.report"},{title:"اتصال حسابداری",key:"config.accounting"},{title:"اجرت",key:"config.wage"}]},{title:"آمار",key:"statics"},{title:"خبرنامه",key:"newsletters.newsletters"},{title:"سفارشی",key:"custom",children:[{title:"اسلایدر موبایل",key:"custom.config.statics.slider"},{title:"برچسب بنر اول سایت",key:"custom.config.statics.tags.banner.ids"}]}],Z={class:"grid-2"},O="84",x="85",T=104,ee=R({__name:"Permission",setup(te){const N=j(),S=Q(),p=e=>!!N.hasPermission(e),a=m(x),k=m(""),n=m([]),B=m(!0),D=m([]),s=H({}),c=E(()=>a.value===O),I=E(()=>{var t;let e=D.value;return p("user.permission.create")||(e=e.filter(i=>String(i.id)!==O)),((t=S.user)==null?void 0:t.ut)!==T&&(e=e.filter(i=>i.id!==T)),e}),V=E(()=>{var e;return((e=S.user)==null?void 0:e.ut)===T?C:C.filter(t=>t.key!=="custom")});async function P(){try{const{data:e}=await v.get("const/__list__ut");D.value=e}catch(e){console.log(e)}}async function f(e){if(!e){n.value=[];return}if(e===O){n.value=[];return}try{const{data:t}=await v.get(`roles/${e}`);n.value=t}catch{_.error("خطا در دریافت اطلاعات")}}async function A(){var e,t;if(Object.keys(s).forEach(i=>delete s[i]),!a.value){s.ut="لطفاسطح دسترسی را انتخاب کنید";return}if(c.value&&!k.value){s.user="لطفا نام سطح دسترسی را وارد کنید";return}try{let i=a.value;if(c.value){const{data:h}=await v.post("const",{key:"__list__ut",val:k.value});i=String(h.id)}await v.post("roles/create",{ut:i,roles:n.value}),await P(),c.value&&(a.value=i,k.value="",await f(i)),_.success("عملیات با موفقیت انجام شد")}catch(i){_.error(((t=(e=i==null?void 0:i.response)==null?void 0:e.data)==null?void 0:t.message)??"خطا در ثبت اطلاعات")}}return z(async()=>{await P(),a.value=x,await f(x)}),(e,t)=>{const i=o("a-select-option"),h=o("a-select"),w=o("a-form-item"),F=o("a-input"),Y=o("a-tree"),U=o("a-button"),L=o("a-card"),M=o("a-form");return d(),u(M,{layout:"vertical",onSubmit:K(A,["prevent"])},{default:r(()=>[y(L,{id:"rid",title:"دسترسی ها"},{default:r(()=>[W("div",Z,[y(w,{label:"سطح کاربر","validate-status":s.ut?"error":"",help:s.ut},{default:r(()=>[y(h,{value:a.value,"onUpdate:value":t[0]||(t[0]=l=>a.value=l),"allow-clear":"",onChange:f},{default:r(()=>[(d(!0),$(G,null,q(I.value,l=>(d(),u(i,{key:l.id,value:String(l.id)},{default:r(()=>[b(J(l.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1},8,["validate-status","help"]),c.value&&p("user.permission.create")?(d(),u(w,{key:0,label:"نام سطح دسترسی","validate-status":s.user?"error":"",help:s.user},{default:r(()=>[y(F,{value:k.value,"onUpdate:value":t[1]||(t[1]=l=>k.value=l),"allow-clear":""},null,8,["value"])]),_:1},8,["validate-status","help"])):g("",!0),y(w,{label:"نقش ها",class:"tree-item"},{default:r(()=>[y(Y,{"checked-keys":n.value,"onUpdate:checkedKeys":t[2]||(t[2]=l=>n.value=l),"check-strictly":!1,checkable:"",style:{width:"100%"},"tree-data":V.value,"field-names":{title:"title",key:"key",children:"children"},"auto-expand-parent":B.value},null,8,["checked-keys","tree-data","auto-expand-parent"])]),_:1})]),!c.value&&p("user.permission.edit")?(d(),u(U,{key:0,type:"primary","html-type":"submit"},{default:r(()=>[...t[3]||(t[3]=[b(" ثبت تغییرات ",-1)])]),_:1})):g("",!0),c.value&&p("user.permission.create")?(d(),u(U,{key:1,type:"primary","html-type":"submit"},{default:r(()=>[...t[4]||(t[4]=[b(" افزودن ",-1)])]),_:1})):g("",!0)]),_:1})]),_:1})}}}),se=X(ee,[["__scopeId","data-v-09e9c63b"]]);export{se as default}; diff --git a/apps/admin-panel/dist/assets/ProductList-B0g390Za.css b/apps/admin-panel/dist/assets/ProductList-B0g390Za.css deleted file mode 100644 index bba0bb1..0000000 --- a/apps/admin-panel/dist/assets/ProductList-B0g390Za.css +++ /dev/null @@ -1 +0,0 @@ -.w-48[data-v-535fb50a]{width:12rem}.mt-4[data-v-535fb50a]{margin-top:1rem}.product-thumb[data-v-535fb50a]{width:48px;height:48px;object-fit:cover;border-radius:4px} diff --git a/apps/admin-panel/dist/assets/ProductList-CvfI0Eds.js b/apps/admin-panel/dist/assets/ProductList-CvfI0Eds.js new file mode 100644 index 0000000..1f4f966 --- /dev/null +++ b/apps/admin-panel/dist/assets/ProductList-CvfI0Eds.js @@ -0,0 +1 @@ +import{d as H,u as X,b as _,c as a,w as o,r as c,o as l,n as h,t as r,h as k,a as d,E as q,i as m,B as j,D as A,f as u,s as F,l as y,p as G,x as J,k as K,H as Q}from"./index-CVG99b4v.js";import{X as W}from"./model-CvqTGmy8.js";import{_ as Y}from"./AccountingSyncButton.vue_vue_type_script_setup_true_lang-DYPt-3CU.js";import{b as Z}from"./productListModel-CJQEfgeJ.js";import{u as tt}from"./useDeleteHandler-D7PJ3wUb.js";import{_ as et}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./filters-UavLT20t.js";import"./index-pLFqZCCf.js";import"./SettingOutlined-D7--Xtqg.js";const ot={id:"page-user-list"},at=["src"],st={key:1},nt={key:0,class:"acc-stock"},lt={key:0,class:"w-48 flex"},it={key:0},ut=H({__name:"ProductList",setup(ct){const P=K(),I=X(),v=s=>!!I.hasPermission(s),$=Z(),b=y(null),x=y([]),B=G(()=>Q()),g=y(!1),i=y(void 0),D=[{title:"عنوان",dataIndex:"title"},{title:"وزن",dataIndex:"grams"},{title:"اجرت درصدی",dataIndex:"percentage_pay"},{title:"تعداد",dataIndex:"qty"}];async function N(s){const{data:e}=await J.get(`admin/products/${s.id}`);i.value=e,g.value=!0}const{remove:V}=tt({onSuccess:()=>{var s;return(s=b.value)==null?void 0:s.fetch()},successMessage:"محصول حذف شد",successType:"info",fallbackErrorMessage:"خطا در حذف محصول"});function E(s){return V(`delete/product/${s}`,{method:"post"})}const C=s=>{var e,f;return Number(((e=s.accounting_stock)==null?void 0:e.weight)??((f=s.accounting_stock)==null?void 0:f.count)??0)};function M(s){P.push(`/apps/product/edit/${s}`)}return(s,e)=>{const f=c("a-tag"),w=c("a-tooltip"),O=c("a-popconfirm"),p=c("a-descriptions-item"),z=c("a-descriptions"),L=c("a-table"),R=c("a-empty"),S=c("a-button"),T=c("a-modal"),U=c("a-card");return l(),_("div",ot,[a(U,{title:"لیست محصولات"},{extra:o(()=>[v("product.list")?(l(),d(Y,{key:0,endpoint:"admin/products/accounting-sync",onDone:e[0]||(e[0]=t=>{var n;return(n=b.value)==null?void 0:n.fetch()})})):m("",!0)]),default:o(()=>[h("h6",null,"تعداد "+r(x.value.length)+" محصول انتخاب شده است.",1),a(W,{ref_key:"tblProducts",ref:b,modelValue:x.value,"onUpdate:modelValue":e[1]||(e[1]=t=>x.value=t),model:k($),"has-selection":!0},{image:o(({record:t})=>[t.ProductImage&&t.ProductImage.length?(l(),_("img",{key:0,src:t.ProductImage[0].image,class:"product-thumb",alt:""},null,8,at)):(l(),_("span",st,"-"))]),show_type:o(({record:t})=>[u(r(t.show_type_str),1)]),accounting:o(({record:t})=>[t.accounting_stock?(l(),_("div",nt,[e[4]||(e[4]=u(" موجودی: ",-1)),h("span",{class:F(C(t)<=0?"text-danger":"")},r(t.accounting_stock.weight!=null?`${Number(t.accounting_stock.weight)} گرم`:`${Number(t.accounting_stock.count)} عدد`),3)])):m("",!0),!t.ProductImage||!t.ProductImage.length?(l(),d(f,{key:1,color:"orange"},{default:o(()=>[...e[5]||(e[5]=[u("بدون تصویر — در اپ پنهان",-1)])]),_:1})):t.accounting_stock&&C(t)<=0?(l(),d(f,{key:2,color:"red"},{default:o(()=>[...e[6]||(e[6]=[u("ناموجود در حسابداری",-1)])]),_:1})):m("",!0)]),op:o(({record:t})=>[B.value?m("",!0):(l(),_("div",lt,[v("product.list.edit")?(l(),d(w,{key:0,title:"ویرایش"},{default:o(()=>[a(k(q),{class:"cursor-pointer mx-1 text-primary",onClick:n=>M(t.id)},null,8,["onClick"])]),_:2},1024)):m("",!0),v("product.list.view")?(l(),d(w,{key:1,title:"اطلاعات جامع"},{default:o(()=>[a(k(j),{class:"cursor-pointer mx-1 text-warning",onClick:n=>N(t)},null,8,["onClick"])]),_:2},1024)):m("",!0),v("product.list.remove")?(l(),d(w,{key:2,title:"حذف"},{default:o(()=>[a(O,{placement:"top","ok-text":"بله","cancel-text":"خیر",onConfirm:n=>E(t.id)},{title:o(()=>[...e[7]||(e[7]=[h("p",null,"آیا مطمئن به حذف محصول مورد نظر هستید ؟",-1)])]),default:o(()=>[a(k(A),{class:"cursor-pointer mx-1 text-danger"})]),_:1},8,["onConfirm"])]),_:2},1024)):m("",!0)]))]),_:1},8,["modelValue","model"]),a(T,{open:g.value,"onUpdate:open":e[3]||(e[3]=t=>g.value=t),title:"اطلاعات جامع محصول",width:"70%"},{footer:o(()=>[a(S,{onClick:e[2]||(e[2]=t=>g.value=!1)},{default:o(()=>[...e[8]||(e[8]=[u("بستن",-1)])]),_:1})]),default:o(()=>{var t;return[i.value?(l(),_("div",it,[a(z,{bordered:"",size:"small",column:2},{default:o(()=>[a(p,{label:"نام محصول"},{default:o(()=>[u(r(i.value.title),1)]),_:1}),a(p,{label:"کد محصول"},{default:o(()=>[u(r(i.value.product_code||"-"),1)]),_:1}),a(p,{label:"برند"},{default:o(()=>{var n;return[u(r(((n=i.value.brand)==null?void 0:n.title)||"-"),1)]}),_:1}),a(p,{label:"دسته بندی"},{default:o(()=>{var n;return[u(r(((n=i.value.category)==null?void 0:n.title)||"-"),1)]}),_:1}),a(p,{label:"نوع نمایش"},{default:o(()=>[u(r(i.value.show_type_str),1)]),_:1}),a(p,{label:"تعداد تنوع"},{default:o(()=>{var n;return[u(r(((n=i.value.variants_all)==null?void 0:n.length)??i.value.variants_count??0),1)]}),_:1})]),_:1}),(t=i.value.variants_all)!=null&&t.length?(l(),d(L,{key:0,class:"mt-4",size:"small","data-source":i.value.variants_all,columns:D,pagination:!1,"row-key":"id"},null,8,["data-source"])):m("",!0)])):(l(),d(R,{key:1}))]}),_:1},8,["open"])]),_:1})])}}}),yt=et(ut,[["__scopeId","data-v-f6316209"]]);export{yt as default}; diff --git a/apps/admin-panel/dist/assets/ProductList-DhOiTxfO.css b/apps/admin-panel/dist/assets/ProductList-DhOiTxfO.css new file mode 100644 index 0000000..97c3628 --- /dev/null +++ b/apps/admin-panel/dist/assets/ProductList-DhOiTxfO.css @@ -0,0 +1 @@ +.w-48[data-v-f6316209]{width:12rem}.mt-4[data-v-f6316209]{margin-top:1rem}.product-thumb[data-v-f6316209]{width:48px;height:48px;object-fit:cover;border-radius:4px} diff --git a/apps/admin-panel/dist/assets/ProductList-wKrWrklR.js b/apps/admin-panel/dist/assets/ProductList-wKrWrklR.js deleted file mode 100644 index 7799877..0000000 --- a/apps/admin-panel/dist/assets/ProductList-wKrWrklR.js +++ /dev/null @@ -1 +0,0 @@ -import{d as U,u as z,b as p,c as o,w as e,r,o as i,n as h,t as u,h as v,a as m,E as X,i as _,B as q,D as H,f as c,l as y,p as j,x as A,k as F,C as G}from"./index-WFQJAeoE.js";import{X as J}from"./model-Di_BQPv1.js";import{b as K}from"./productListModel-CLJKMrKL.js";import{u as Q}from"./useDeleteHandler-AErXCFBG.js";import{_ as W}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./SettingOutlined-DZJd42S-.js";const Y={id:"page-user-list"},Z=["src"],ee={key:1},te={key:0,class:"w-48 flex"},oe={key:0},ae=U({__name:"ProductList",setup(se){const w=F(),C=z(),b=l=>!!C.hasPermission(l),P=K(),x=y(null),k=y([]),I=j(()=>G()),f=y(!1),s=y(void 0),B=[{title:"عنوان",dataIndex:"title"},{title:"وزن",dataIndex:"grams"},{title:"اجرت درصدی",dataIndex:"percentage_pay"},{title:"تعداد",dataIndex:"qty"}];async function V(l){const{data:a}=await A.get(`admin/products/${l.id}`);s.value=a,f.value=!0}const{remove:$}=Q({onSuccess:()=>{var l;return(l=x.value)==null?void 0:l.fetch()},successMessage:"محصول حذف شد",successType:"info",fallbackErrorMessage:"خطا در حذف محصول"});function D(l){return $(`delete/product/${l}`,{method:"post"})}function E(l){w.push(`/apps/product/edit/${l}`)}return(l,a)=>{const g=r("a-tooltip"),M=r("a-popconfirm"),d=r("a-descriptions-item"),N=r("a-descriptions"),L=r("a-table"),O=r("a-empty"),R=r("a-button"),S=r("a-modal"),T=r("a-card");return i(),p("div",Y,[o(T,{title:"لیست محصولات"},{default:e(()=>[h("h6",null,"تعداد "+u(k.value.length)+" محصول انتخاب شده است.",1),o(J,{ref_key:"tblProducts",ref:x,modelValue:k.value,"onUpdate:modelValue":a[0]||(a[0]=t=>k.value=t),model:v(P),"has-selection":!0},{image:e(({record:t})=>[t.ProductImage&&t.ProductImage.length?(i(),p("img",{key:0,src:t.ProductImage[0].image,class:"product-thumb",alt:""},null,8,Z)):(i(),p("span",ee,"-"))]),show_type:e(({record:t})=>[c(u(t.show_type_str),1)]),op:e(({record:t})=>[I.value?_("",!0):(i(),p("div",te,[b("product.list.edit")?(i(),m(g,{key:0,title:"ویرایش"},{default:e(()=>[o(v(X),{class:"cursor-pointer mx-1 text-primary",onClick:n=>E(t.id)},null,8,["onClick"])]),_:2},1024)):_("",!0),b("product.list.view")?(i(),m(g,{key:1,title:"اطلاعات جامع"},{default:e(()=>[o(v(q),{class:"cursor-pointer mx-1 text-warning",onClick:n=>V(t)},null,8,["onClick"])]),_:2},1024)):_("",!0),b("product.list.remove")?(i(),m(g,{key:2,title:"حذف"},{default:e(()=>[o(M,{placement:"top","ok-text":"بله","cancel-text":"خیر",onConfirm:n=>D(t.id)},{title:e(()=>[...a[3]||(a[3]=[h("p",null,"آیا مطمئن به حذف محصول مورد نظر هستید ؟",-1)])]),default:e(()=>[o(v(H),{class:"cursor-pointer mx-1 text-danger"})]),_:1},8,["onConfirm"])]),_:2},1024)):_("",!0)]))]),_:1},8,["modelValue","model"]),o(S,{open:f.value,"onUpdate:open":a[2]||(a[2]=t=>f.value=t),title:"اطلاعات جامع محصول",width:"70%"},{footer:e(()=>[o(R,{onClick:a[1]||(a[1]=t=>f.value=!1)},{default:e(()=>[...a[4]||(a[4]=[c("بستن",-1)])]),_:1})]),default:e(()=>{var t;return[s.value?(i(),p("div",oe,[o(N,{bordered:"",size:"small",column:2},{default:e(()=>[o(d,{label:"نام محصول"},{default:e(()=>[c(u(s.value.title),1)]),_:1}),o(d,{label:"کد محصول"},{default:e(()=>[c(u(s.value.product_code||"-"),1)]),_:1}),o(d,{label:"برند"},{default:e(()=>{var n;return[c(u(((n=s.value.brand)==null?void 0:n.title)||"-"),1)]}),_:1}),o(d,{label:"دسته بندی"},{default:e(()=>{var n;return[c(u(((n=s.value.category)==null?void 0:n.title)||"-"),1)]}),_:1}),o(d,{label:"نوع نمایش"},{default:e(()=>[c(u(s.value.show_type_str),1)]),_:1}),o(d,{label:"تعداد تنوع"},{default:e(()=>{var n;return[c(u(((n=s.value.variants_all)==null?void 0:n.length)??s.value.variants_count??0),1)]}),_:1})]),_:1}),(t=s.value.variants_all)!=null&&t.length?(i(),m(L,{key:0,class:"mt-4",size:"small","data-source":s.value.variants_all,columns:B,pagination:!1,"row-key":"id"},null,8,["data-source"])):_("",!0)])):(i(),m(O,{key:1}))]}),_:1},8,["open"])]),_:1})])}}}),de=W(ae,[["__scopeId","data-v-535fb50a"]]);export{de as default}; diff --git a/apps/admin-panel/dist/assets/PromotionForm-DrpzLEjQ.js b/apps/admin-panel/dist/assets/PromotionForm-4r-nqXU-.js similarity index 98% rename from apps/admin-panel/dist/assets/PromotionForm-DrpzLEjQ.js rename to apps/admin-panel/dist/assets/PromotionForm-4r-nqXU-.js index 6db77aa..b1b5c4b 100644 --- a/apps/admin-panel/dist/assets/PromotionForm-DrpzLEjQ.js +++ b/apps/admin-panel/dist/assets/PromotionForm-4r-nqXU-.js @@ -1 +1 @@ -import{d as h,v as ee,x as U,a as s,h as O,w as a,j as te,l as C,y as q,z as A,r as v,o as d,n as I,c as o,f as r,i as m,b as y,e as b,F as w,A as le,k as ae,t as g}from"./index-WFQJAeoE.js";import{_ as oe}from"./BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js";import{_ as ue}from"./_plugin-vue_export-helper-DlAUqK2U.js";const de={class:"grid-4 grid-4--tight"},ne={class:"grid-4 grid-4--tight"},ie=h({__name:"PromotionForm",props:{title:{default:"تعریف تخفیف"},allowCustomerScope:{type:Boolean,default:!0},open:{type:Boolean},id:{}},emits:["update:open","success"],setup(_,{emit:G}){const M=_,P=G,B=M.open!==void 0,H=te(),J=ae(),k=B?M.id:H.params.id,Y=C(!1),D=C([]),R=C([]),j=C([]),N=C([]),l=q({type:1,title:"",description:"",discount_percent:void 0,use_only:1,is_active:!0,start:void 0,end:void 0,product_id:void 0,category_id:void 0,customer_id:void 0,brand_id:void 0}),p=q({});function V(){l.product_id=void 0,l.category_id=void 0,l.customer_id=void 0,l.brand_id=void 0}function c(u,e){var n,f;return String(((f=(n=e==null?void 0:e.children)==null?void 0:n[0])==null?void 0:f.children)??"").toLowerCase().includes(u.toLowerCase())}function K(){return Object.keys(p).forEach(u=>delete p[u]),l.title||(p.title="لطفا مقدار را وارد کنید"),(l.discount_percent===void 0||l.discount_percent===null)&&(p.discount_percent="لطفا مقدار را وارد کنید"),Object.keys(p).length===0}async function F(){var u,e;if(K())try{Y.value=!0,k?await U.put(`product/variant/promotion/${k}`,l):await U.post("product/variant/promotion",l),A.info("اطلاعات با موفقیت به ثبت رسید."),B?(P("success"),P("update:open",!1)):J.push("/major/promotion/list")}catch(n){A.error(((e=(u=n==null?void 0:n.response)==null?void 0:u.data)==null?void 0:e.message)??"خطا در ثبت اطلاعات.")}finally{Y.value=!1}}return ee(async()=>{try{const[u,e,n]=await Promise.all([U.post("products",{page:1,limit:500}),U.post("category",{page:1,limit:500}),U.get("brand")]);D.value=u.data.rows??[],R.value=e.data.rows??[],N.value=n.data??[]}catch(u){console.log(u)}if(M.allowCustomerScope)try{const{data:u}=await U.get("query/customer");j.value=u}catch(u){console.log(u)}if(k)try{const{data:u}=await U.get(`admin/promotions/${k}`);Object.assign(l,{type:u.type??1,title:u.title??"",description:u.description??"",discount_percent:u.discount_percent!==null?Number(u.discount_percent):void 0,use_only:u.use_only??1,is_active:u.is_active??!0,start:u.start?String(u.start).slice(0,10):void 0,end:u.end?String(u.end).slice(0,10):void 0,product_id:u.product_id??void 0,category_id:u.category_id??void 0,customer_id:u.customer_id??void 0,brand_id:u.brand_id??void 0})}catch(u){console.log(u)}}),(u,e)=>{const n=v("a-select-option"),f=v("a-select"),i=v("a-form-item"),$=v("a-input"),z=v("a-input-number"),S=v("a-date-picker"),x=v("a-radio"),L=v("a-radio-group"),E=v("a-switch"),T=v("a-textarea"),Q=v("a-button"),W=v("a-card"),X=v("a-form"),Z=v("a-spin");return B?(d(),s(oe,{key:0,open:!!_.open,id:O(k),"add-title":_.title,"edit-title":_.title,loading:Y.value,submitting:Y.value,width:"lg","onUpdate:open":e[12]||(e[12]=t=>u.$emit("update:open",t)),onSubmit:F},{default:a(()=>[I("div",de,[o(i,{label:"نوع تخفیف"},{default:a(()=>[o(f,{value:l.type,"onUpdate:value":e[0]||(e[0]=t=>l.type=t),disabled:!!O(k),onChange:V},{default:a(()=>[o(n,{value:1},{default:a(()=>[...e[25]||(e[25]=[r("محصولات",-1)])]),_:1}),o(n,{value:2},{default:a(()=>[...e[26]||(e[26]=[r("دسته بندی",-1)])]),_:1}),_.allowCustomerScope?(d(),s(n,{key:0,value:3},{default:a(()=>[...e[27]||(e[27]=[r("مشتری",-1)])]),_:1})):m("",!0),o(n,{value:4},{default:a(()=>[...e[28]||(e[28]=[r("برند",-1)])]),_:1})]),_:1},8,["value","disabled"])]),_:1}),o(i,{label:"عنوان","validate-status":p.title?"error":"",help:p.title},{default:a(()=>[o($,{value:l.title,"onUpdate:value":e[1]||(e[1]=t=>l.title=t)},null,8,["value"])]),_:1},8,["validate-status","help"]),l.type===1?(d(),s(i,{key:0,label:"محصول"},{default:a(()=>[o(f,{value:l.product_id,"onUpdate:value":e[2]||(e[2]=t=>l.product_id=t),"show-search":"","allow-clear":"","filter-option":c,placeholder:"انتخاب کنید"},{default:a(()=>[(d(!0),y(w,null,b(D.value,t=>(d(),s(n,{key:t.id,value:t.id},{default:a(()=>[r(g(t.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})):m("",!0),l.type===2?(d(),s(i,{key:1,label:"دسته بندی"},{default:a(()=>[o(f,{value:l.category_id,"onUpdate:value":e[3]||(e[3]=t=>l.category_id=t),"show-search":"","allow-clear":"","filter-option":c,placeholder:"انتخاب کنید"},{default:a(()=>[(d(!0),y(w,null,b(R.value,t=>(d(),s(n,{key:t.id,value:t.id},{default:a(()=>[r(g(t.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})):m("",!0),l.type===3&&_.allowCustomerScope?(d(),s(i,{key:2,label:"مشتری"},{default:a(()=>[o(f,{value:l.customer_id,"onUpdate:value":e[4]||(e[4]=t=>l.customer_id=t),"show-search":"","allow-clear":"","filter-option":c,placeholder:"انتخاب کنید"},{default:a(()=>[(d(!0),y(w,null,b(j.value,t=>(d(),s(n,{key:t.id,value:t.id},{default:a(()=>[r(g(t.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})):m("",!0),l.type===4?(d(),s(i,{key:3,label:"برند"},{default:a(()=>[o(f,{value:l.brand_id,"onUpdate:value":e[5]||(e[5]=t=>l.brand_id=t),"show-search":"","allow-clear":"","filter-option":c,placeholder:"انتخاب کنید"},{default:a(()=>[(d(!0),y(w,null,b(N.value,t=>(d(),s(n,{key:t.id,value:t.id},{default:a(()=>[r(g(t.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})):m("",!0),o(i,{label:"درصد تخفیف","validate-status":p.discount_percent?"error":"",help:p.discount_percent},{default:a(()=>[o(z,{value:l.discount_percent,"onUpdate:value":e[6]||(e[6]=t=>l.discount_percent=t),class:"w-full",min:0,max:100},null,8,["value"])]),_:1},8,["validate-status","help"]),o(i,{label:"تاریخ شروع"},{default:a(()=>[o(S,{value:l.start,"onUpdate:value":e[7]||(e[7]=t=>l.start=t),class:"w-full","value-format":"YYYY-MM-DD"},null,8,["value"])]),_:1}),o(i,{label:"تاریخ پایان"},{default:a(()=>[o(S,{value:l.end,"onUpdate:value":e[8]||(e[8]=t=>l.end=t),class:"w-full","value-format":"YYYY-MM-DD"},null,8,["value"])]),_:1}),o(i,{label:"قابلیت استفاده"},{default:a(()=>[o(L,{value:l.use_only,"onUpdate:value":e[9]||(e[9]=t=>l.use_only=t)},{default:a(()=>[o(x,{value:1},{default:a(()=>[...e[29]||(e[29]=[r(" فقط یکبار",-1)])]),_:1}),o(x,{value:2},{default:a(()=>[...e[30]||(e[30]=[r("تا تاریخ پایان",-1)])]),_:1})]),_:1},8,["value"])]),_:1}),o(i,{label:"وضعیت تخفیف"},{default:a(()=>[o(E,{checked:l.is_active,"onUpdate:checked":e[10]||(e[10]=t=>l.is_active=t)},null,8,["checked"])]),_:1})]),o(i,{label:"توضیحات"},{default:a(()=>[o(T,{value:l.description,"onUpdate:value":e[11]||(e[11]=t=>l.description=t),"auto-size":{minRows:3,maxRows:6}},null,8,["value"])]),_:1})]),_:1},8,["open","id","add-title","edit-title","loading","submitting"])):(d(),s(Z,{key:1,spinning:Y.value},{default:a(()=>[o(X,{layout:"vertical",onSubmit:le(F,["prevent"])},{default:a(()=>[o(W,{title:_.title,class:"mb-base"},{default:a(()=>[I("div",ne,[o(i,{label:"نوع تخفیف"},{default:a(()=>[o(f,{value:l.type,"onUpdate:value":e[13]||(e[13]=t=>l.type=t),disabled:!!O(k),onChange:V},{default:a(()=>[o(n,{value:1},{default:a(()=>[...e[31]||(e[31]=[r("محصولات",-1)])]),_:1}),o(n,{value:2},{default:a(()=>[...e[32]||(e[32]=[r("دسته بندی",-1)])]),_:1}),_.allowCustomerScope?(d(),s(n,{key:0,value:3},{default:a(()=>[...e[33]||(e[33]=[r("مشتری",-1)])]),_:1})):m("",!0),o(n,{value:4},{default:a(()=>[...e[34]||(e[34]=[r("برند",-1)])]),_:1})]),_:1},8,["value","disabled"])]),_:1}),o(i,{label:"عنوان","validate-status":p.title?"error":"",help:p.title},{default:a(()=>[o($,{value:l.title,"onUpdate:value":e[14]||(e[14]=t=>l.title=t)},null,8,["value"])]),_:1},8,["validate-status","help"]),l.type===1?(d(),s(i,{key:0,label:"محصول"},{default:a(()=>[o(f,{value:l.product_id,"onUpdate:value":e[15]||(e[15]=t=>l.product_id=t),"show-search":"","allow-clear":"","filter-option":c,placeholder:"انتخاب کنید"},{default:a(()=>[(d(!0),y(w,null,b(D.value,t=>(d(),s(n,{key:t.id,value:t.id},{default:a(()=>[r(g(t.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})):m("",!0),l.type===2?(d(),s(i,{key:1,label:"دسته بندی"},{default:a(()=>[o(f,{value:l.category_id,"onUpdate:value":e[16]||(e[16]=t=>l.category_id=t),"show-search":"","allow-clear":"","filter-option":c,placeholder:"انتخاب کنید"},{default:a(()=>[(d(!0),y(w,null,b(R.value,t=>(d(),s(n,{key:t.id,value:t.id},{default:a(()=>[r(g(t.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})):m("",!0),l.type===3&&_.allowCustomerScope?(d(),s(i,{key:2,label:"مشتری"},{default:a(()=>[o(f,{value:l.customer_id,"onUpdate:value":e[17]||(e[17]=t=>l.customer_id=t),"show-search":"","allow-clear":"","filter-option":c,placeholder:"انتخاب کنید"},{default:a(()=>[(d(!0),y(w,null,b(j.value,t=>(d(),s(n,{key:t.id,value:t.id},{default:a(()=>[r(g(t.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})):m("",!0),l.type===4?(d(),s(i,{key:3,label:"برند"},{default:a(()=>[o(f,{value:l.brand_id,"onUpdate:value":e[18]||(e[18]=t=>l.brand_id=t),"show-search":"","allow-clear":"","filter-option":c,placeholder:"انتخاب کنید"},{default:a(()=>[(d(!0),y(w,null,b(N.value,t=>(d(),s(n,{key:t.id,value:t.id},{default:a(()=>[r(g(t.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})):m("",!0),o(i,{label:"درصد تخفیف","validate-status":p.discount_percent?"error":"",help:p.discount_percent},{default:a(()=>[o(z,{value:l.discount_percent,"onUpdate:value":e[19]||(e[19]=t=>l.discount_percent=t),class:"w-full",min:0,max:100},null,8,["value"])]),_:1},8,["validate-status","help"]),o(i,{label:"تاریخ شروع"},{default:a(()=>[o(S,{value:l.start,"onUpdate:value":e[20]||(e[20]=t=>l.start=t),class:"w-full","value-format":"YYYY-MM-DD"},null,8,["value"])]),_:1}),o(i,{label:"تاریخ پایان"},{default:a(()=>[o(S,{value:l.end,"onUpdate:value":e[21]||(e[21]=t=>l.end=t),class:"w-full","value-format":"YYYY-MM-DD"},null,8,["value"])]),_:1}),o(i,{label:"قابلیت استفاده"},{default:a(()=>[o(L,{value:l.use_only,"onUpdate:value":e[22]||(e[22]=t=>l.use_only=t)},{default:a(()=>[o(x,{value:1},{default:a(()=>[...e[35]||(e[35]=[r(" فقط یکبار",-1)])]),_:1}),o(x,{value:2},{default:a(()=>[...e[36]||(e[36]=[r("تا تاریخ پایان",-1)])]),_:1})]),_:1},8,["value"])]),_:1}),o(i,{label:"وضعیت تخفیف"},{default:a(()=>[o(E,{checked:l.is_active,"onUpdate:checked":e[23]||(e[23]=t=>l.is_active=t)},null,8,["checked"])]),_:1})]),o(i,{label:"توضیحات"},{default:a(()=>[o(T,{value:l.description,"onUpdate:value":e[24]||(e[24]=t=>l.description=t),"auto-size":{minRows:3,maxRows:6}},null,8,["value"])]),_:1}),o(Q,{type:"primary",onClick:F},{default:a(()=>[...e[37]||(e[37]=[r("ثبت اطلاعات",-1)])]),_:1})]),_:1},8,["title"])]),_:1})]),_:1},8,["spinning"]))}}}),pe=ue(ie,[["__scopeId","data-v-9a94b9a5"]]);export{pe as P}; +import{d as h,v as ee,x as U,a as s,h as O,w as a,j as te,l as C,y as q,z as A,r as v,o as d,n as I,c as o,f as r,i as m,b as y,e as b,F as w,A as le,k as ae,t as g}from"./index-CVG99b4v.js";import{_ as oe}from"./BaseFormModal.vue_vue_type_script_setup_true_lang-CWur6xTz.js";import{_ as ue}from"./_plugin-vue_export-helper-DlAUqK2U.js";const de={class:"grid-4 grid-4--tight"},ne={class:"grid-4 grid-4--tight"},ie=h({__name:"PromotionForm",props:{title:{default:"تعریف تخفیف"},allowCustomerScope:{type:Boolean,default:!0},open:{type:Boolean},id:{}},emits:["update:open","success"],setup(_,{emit:G}){const M=_,P=G,B=M.open!==void 0,H=te(),J=ae(),k=B?M.id:H.params.id,Y=C(!1),D=C([]),R=C([]),j=C([]),N=C([]),l=q({type:1,title:"",description:"",discount_percent:void 0,use_only:1,is_active:!0,start:void 0,end:void 0,product_id:void 0,category_id:void 0,customer_id:void 0,brand_id:void 0}),p=q({});function V(){l.product_id=void 0,l.category_id=void 0,l.customer_id=void 0,l.brand_id=void 0}function c(u,e){var n,f;return String(((f=(n=e==null?void 0:e.children)==null?void 0:n[0])==null?void 0:f.children)??"").toLowerCase().includes(u.toLowerCase())}function K(){return Object.keys(p).forEach(u=>delete p[u]),l.title||(p.title="لطفا مقدار را وارد کنید"),(l.discount_percent===void 0||l.discount_percent===null)&&(p.discount_percent="لطفا مقدار را وارد کنید"),Object.keys(p).length===0}async function F(){var u,e;if(K())try{Y.value=!0,k?await U.put(`product/variant/promotion/${k}`,l):await U.post("product/variant/promotion",l),A.info("اطلاعات با موفقیت به ثبت رسید."),B?(P("success"),P("update:open",!1)):J.push("/major/promotion/list")}catch(n){A.error(((e=(u=n==null?void 0:n.response)==null?void 0:u.data)==null?void 0:e.message)??"خطا در ثبت اطلاعات.")}finally{Y.value=!1}}return ee(async()=>{try{const[u,e,n]=await Promise.all([U.post("products",{page:1,limit:500}),U.post("category",{page:1,limit:500}),U.get("brand")]);D.value=u.data.rows??[],R.value=e.data.rows??[],N.value=n.data??[]}catch(u){console.log(u)}if(M.allowCustomerScope)try{const{data:u}=await U.get("query/customer");j.value=u}catch(u){console.log(u)}if(k)try{const{data:u}=await U.get(`admin/promotions/${k}`);Object.assign(l,{type:u.type??1,title:u.title??"",description:u.description??"",discount_percent:u.discount_percent!==null?Number(u.discount_percent):void 0,use_only:u.use_only??1,is_active:u.is_active??!0,start:u.start?String(u.start).slice(0,10):void 0,end:u.end?String(u.end).slice(0,10):void 0,product_id:u.product_id??void 0,category_id:u.category_id??void 0,customer_id:u.customer_id??void 0,brand_id:u.brand_id??void 0})}catch(u){console.log(u)}}),(u,e)=>{const n=v("a-select-option"),f=v("a-select"),i=v("a-form-item"),$=v("a-input"),z=v("a-input-number"),S=v("a-date-picker"),x=v("a-radio"),L=v("a-radio-group"),E=v("a-switch"),T=v("a-textarea"),Q=v("a-button"),W=v("a-card"),X=v("a-form"),Z=v("a-spin");return B?(d(),s(oe,{key:0,open:!!_.open,id:O(k),"add-title":_.title,"edit-title":_.title,loading:Y.value,submitting:Y.value,width:"lg","onUpdate:open":e[12]||(e[12]=t=>u.$emit("update:open",t)),onSubmit:F},{default:a(()=>[I("div",de,[o(i,{label:"نوع تخفیف"},{default:a(()=>[o(f,{value:l.type,"onUpdate:value":e[0]||(e[0]=t=>l.type=t),disabled:!!O(k),onChange:V},{default:a(()=>[o(n,{value:1},{default:a(()=>[...e[25]||(e[25]=[r("محصولات",-1)])]),_:1}),o(n,{value:2},{default:a(()=>[...e[26]||(e[26]=[r("دسته بندی",-1)])]),_:1}),_.allowCustomerScope?(d(),s(n,{key:0,value:3},{default:a(()=>[...e[27]||(e[27]=[r("مشتری",-1)])]),_:1})):m("",!0),o(n,{value:4},{default:a(()=>[...e[28]||(e[28]=[r("برند",-1)])]),_:1})]),_:1},8,["value","disabled"])]),_:1}),o(i,{label:"عنوان","validate-status":p.title?"error":"",help:p.title},{default:a(()=>[o($,{value:l.title,"onUpdate:value":e[1]||(e[1]=t=>l.title=t)},null,8,["value"])]),_:1},8,["validate-status","help"]),l.type===1?(d(),s(i,{key:0,label:"محصول"},{default:a(()=>[o(f,{value:l.product_id,"onUpdate:value":e[2]||(e[2]=t=>l.product_id=t),"show-search":"","allow-clear":"","filter-option":c,placeholder:"انتخاب کنید"},{default:a(()=>[(d(!0),y(w,null,b(D.value,t=>(d(),s(n,{key:t.id,value:t.id},{default:a(()=>[r(g(t.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})):m("",!0),l.type===2?(d(),s(i,{key:1,label:"دسته بندی"},{default:a(()=>[o(f,{value:l.category_id,"onUpdate:value":e[3]||(e[3]=t=>l.category_id=t),"show-search":"","allow-clear":"","filter-option":c,placeholder:"انتخاب کنید"},{default:a(()=>[(d(!0),y(w,null,b(R.value,t=>(d(),s(n,{key:t.id,value:t.id},{default:a(()=>[r(g(t.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})):m("",!0),l.type===3&&_.allowCustomerScope?(d(),s(i,{key:2,label:"مشتری"},{default:a(()=>[o(f,{value:l.customer_id,"onUpdate:value":e[4]||(e[4]=t=>l.customer_id=t),"show-search":"","allow-clear":"","filter-option":c,placeholder:"انتخاب کنید"},{default:a(()=>[(d(!0),y(w,null,b(j.value,t=>(d(),s(n,{key:t.id,value:t.id},{default:a(()=>[r(g(t.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})):m("",!0),l.type===4?(d(),s(i,{key:3,label:"برند"},{default:a(()=>[o(f,{value:l.brand_id,"onUpdate:value":e[5]||(e[5]=t=>l.brand_id=t),"show-search":"","allow-clear":"","filter-option":c,placeholder:"انتخاب کنید"},{default:a(()=>[(d(!0),y(w,null,b(N.value,t=>(d(),s(n,{key:t.id,value:t.id},{default:a(()=>[r(g(t.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})):m("",!0),o(i,{label:"درصد تخفیف","validate-status":p.discount_percent?"error":"",help:p.discount_percent},{default:a(()=>[o(z,{value:l.discount_percent,"onUpdate:value":e[6]||(e[6]=t=>l.discount_percent=t),class:"w-full",min:0,max:100},null,8,["value"])]),_:1},8,["validate-status","help"]),o(i,{label:"تاریخ شروع"},{default:a(()=>[o(S,{value:l.start,"onUpdate:value":e[7]||(e[7]=t=>l.start=t),class:"w-full","value-format":"YYYY-MM-DD"},null,8,["value"])]),_:1}),o(i,{label:"تاریخ پایان"},{default:a(()=>[o(S,{value:l.end,"onUpdate:value":e[8]||(e[8]=t=>l.end=t),class:"w-full","value-format":"YYYY-MM-DD"},null,8,["value"])]),_:1}),o(i,{label:"قابلیت استفاده"},{default:a(()=>[o(L,{value:l.use_only,"onUpdate:value":e[9]||(e[9]=t=>l.use_only=t)},{default:a(()=>[o(x,{value:1},{default:a(()=>[...e[29]||(e[29]=[r(" فقط یکبار",-1)])]),_:1}),o(x,{value:2},{default:a(()=>[...e[30]||(e[30]=[r("تا تاریخ پایان",-1)])]),_:1})]),_:1},8,["value"])]),_:1}),o(i,{label:"وضعیت تخفیف"},{default:a(()=>[o(E,{checked:l.is_active,"onUpdate:checked":e[10]||(e[10]=t=>l.is_active=t)},null,8,["checked"])]),_:1})]),o(i,{label:"توضیحات"},{default:a(()=>[o(T,{value:l.description,"onUpdate:value":e[11]||(e[11]=t=>l.description=t),"auto-size":{minRows:3,maxRows:6}},null,8,["value"])]),_:1})]),_:1},8,["open","id","add-title","edit-title","loading","submitting"])):(d(),s(Z,{key:1,spinning:Y.value},{default:a(()=>[o(X,{layout:"vertical",onSubmit:le(F,["prevent"])},{default:a(()=>[o(W,{title:_.title,class:"mb-base"},{default:a(()=>[I("div",ne,[o(i,{label:"نوع تخفیف"},{default:a(()=>[o(f,{value:l.type,"onUpdate:value":e[13]||(e[13]=t=>l.type=t),disabled:!!O(k),onChange:V},{default:a(()=>[o(n,{value:1},{default:a(()=>[...e[31]||(e[31]=[r("محصولات",-1)])]),_:1}),o(n,{value:2},{default:a(()=>[...e[32]||(e[32]=[r("دسته بندی",-1)])]),_:1}),_.allowCustomerScope?(d(),s(n,{key:0,value:3},{default:a(()=>[...e[33]||(e[33]=[r("مشتری",-1)])]),_:1})):m("",!0),o(n,{value:4},{default:a(()=>[...e[34]||(e[34]=[r("برند",-1)])]),_:1})]),_:1},8,["value","disabled"])]),_:1}),o(i,{label:"عنوان","validate-status":p.title?"error":"",help:p.title},{default:a(()=>[o($,{value:l.title,"onUpdate:value":e[14]||(e[14]=t=>l.title=t)},null,8,["value"])]),_:1},8,["validate-status","help"]),l.type===1?(d(),s(i,{key:0,label:"محصول"},{default:a(()=>[o(f,{value:l.product_id,"onUpdate:value":e[15]||(e[15]=t=>l.product_id=t),"show-search":"","allow-clear":"","filter-option":c,placeholder:"انتخاب کنید"},{default:a(()=>[(d(!0),y(w,null,b(D.value,t=>(d(),s(n,{key:t.id,value:t.id},{default:a(()=>[r(g(t.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})):m("",!0),l.type===2?(d(),s(i,{key:1,label:"دسته بندی"},{default:a(()=>[o(f,{value:l.category_id,"onUpdate:value":e[16]||(e[16]=t=>l.category_id=t),"show-search":"","allow-clear":"","filter-option":c,placeholder:"انتخاب کنید"},{default:a(()=>[(d(!0),y(w,null,b(R.value,t=>(d(),s(n,{key:t.id,value:t.id},{default:a(()=>[r(g(t.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})):m("",!0),l.type===3&&_.allowCustomerScope?(d(),s(i,{key:2,label:"مشتری"},{default:a(()=>[o(f,{value:l.customer_id,"onUpdate:value":e[17]||(e[17]=t=>l.customer_id=t),"show-search":"","allow-clear":"","filter-option":c,placeholder:"انتخاب کنید"},{default:a(()=>[(d(!0),y(w,null,b(j.value,t=>(d(),s(n,{key:t.id,value:t.id},{default:a(()=>[r(g(t.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})):m("",!0),l.type===4?(d(),s(i,{key:3,label:"برند"},{default:a(()=>[o(f,{value:l.brand_id,"onUpdate:value":e[18]||(e[18]=t=>l.brand_id=t),"show-search":"","allow-clear":"","filter-option":c,placeholder:"انتخاب کنید"},{default:a(()=>[(d(!0),y(w,null,b(N.value,t=>(d(),s(n,{key:t.id,value:t.id},{default:a(()=>[r(g(t.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})):m("",!0),o(i,{label:"درصد تخفیف","validate-status":p.discount_percent?"error":"",help:p.discount_percent},{default:a(()=>[o(z,{value:l.discount_percent,"onUpdate:value":e[19]||(e[19]=t=>l.discount_percent=t),class:"w-full",min:0,max:100},null,8,["value"])]),_:1},8,["validate-status","help"]),o(i,{label:"تاریخ شروع"},{default:a(()=>[o(S,{value:l.start,"onUpdate:value":e[20]||(e[20]=t=>l.start=t),class:"w-full","value-format":"YYYY-MM-DD"},null,8,["value"])]),_:1}),o(i,{label:"تاریخ پایان"},{default:a(()=>[o(S,{value:l.end,"onUpdate:value":e[21]||(e[21]=t=>l.end=t),class:"w-full","value-format":"YYYY-MM-DD"},null,8,["value"])]),_:1}),o(i,{label:"قابلیت استفاده"},{default:a(()=>[o(L,{value:l.use_only,"onUpdate:value":e[22]||(e[22]=t=>l.use_only=t)},{default:a(()=>[o(x,{value:1},{default:a(()=>[...e[35]||(e[35]=[r(" فقط یکبار",-1)])]),_:1}),o(x,{value:2},{default:a(()=>[...e[36]||(e[36]=[r("تا تاریخ پایان",-1)])]),_:1})]),_:1},8,["value"])]),_:1}),o(i,{label:"وضعیت تخفیف"},{default:a(()=>[o(E,{checked:l.is_active,"onUpdate:checked":e[23]||(e[23]=t=>l.is_active=t)},null,8,["checked"])]),_:1})]),o(i,{label:"توضیحات"},{default:a(()=>[o(T,{value:l.description,"onUpdate:value":e[24]||(e[24]=t=>l.description=t),"auto-size":{minRows:3,maxRows:6}},null,8,["value"])]),_:1}),o(Q,{type:"primary",onClick:F},{default:a(()=>[...e[37]||(e[37]=[r("ثبت اطلاعات",-1)])]),_:1})]),_:1},8,["title"])]),_:1})]),_:1},8,["spinning"]))}}}),pe=ue(ie,[["__scopeId","data-v-9a94b9a5"]]);export{pe as P}; diff --git a/apps/admin-panel/dist/assets/ReagentCustomer-BUrwCRTH.js b/apps/admin-panel/dist/assets/ReagentCustomer-BUrwCRTH.js deleted file mode 100644 index 447e3d5..0000000 --- a/apps/admin-panel/dist/assets/ReagentCustomer-BUrwCRTH.js +++ /dev/null @@ -1 +0,0 @@ -import{d as j,v as C,x as w,a as V,w as n,j as $,l as A,y,r as d,o as J,c as s,n as O,f as B,A as I,z as R,k as F}from"./index-WFQJAeoE.js";import{_ as M}from"./ImageUploadInput.vue_vue_type_script_setup_true_lang-BQ_i_QZe.js";import{_ as T}from"./_plugin-vue_export-helper-DlAUqK2U.js";const D={class:"grid-4"},L={class:"grid-4"},b="لطفا مقدار را وارد کنید",P=j({__name:"ReagentCustomer",setup(Q){const k=$(),N=F(),m=k.params.id,g=A(!1),e=y({fname:"",lname:"",password:"",mobile:"",mcode:"",store_name:"",pasazh_name:"",address:"",percent:void 0,image_id:"",image_url:null}),o=y({}),U=y({});function S(u=[]){const a={};for(const[t,r]of Object.entries(e))u.includes(t)||JSON.stringify(r)!==JSON.stringify(U[t])&&(a[t]=r);return a}function z(u){e.image_id=u.id??""}async function x(){var u,a,t,r,_,p;if(Object.keys(o).forEach(i=>delete o[i]),e.fname||(o.fname=b),e.lname||(o.lname=b),e.mobile||(o.mobile=b),!m&&!e.password&&(o.password=b),!Object.keys(o).length)try{g.value=!0;const{image_url:i,...f}=e,v=m?S(["image_url","password"]):f;m&&e.password&&(v.password=e.password);const c={...v,name:`${e.fname} ${e.lname}`.trim(),role:"SALES_EXPERT"};m?await w.put(`users/${m}`,c):await w.post("users",c),R.info("اطلاعات با موفقیت به ثبت رسید."),N.go(-1)}catch(i){const f=(r=(t=(a=(u=i==null?void 0:i.response)==null?void 0:u.data)==null?void 0:a.errors)==null?void 0:t.mobile)==null?void 0:r[0];R.error(f??((p=(_=i==null?void 0:i.response)==null?void 0:_.data)==null?void 0:p.message)??"خطا در ثبت اطلاعات.")}finally{g.value=!1}}return C(async()=>{var u,a;if(m)try{const{data:t}=await w.get(`admin/users/${m}`);Object.assign(e,{fname:t.fname??"",lname:t.lname??"",mobile:t.mobile??"",address:t.address??"",percent:t.percent===null?void 0:Number(t.percent),image_id:((u=t.image)==null?void 0:u.id)??"",image_url:((a=t.image)==null?void 0:a.image)??null,store_name:t.store_name??"",pasazh_name:t.pasazh_name??"",mcode:t.mcode??""}),Object.assign(U,JSON.parse(JSON.stringify(e)))}catch(t){console.log(t)}}),(u,a)=>{const t=d("a-form-item"),r=d("a-input"),_=d("a-input-password"),p=d("a-card"),i=d("a-input-number"),f=d("a-textarea"),v=d("a-button"),c=d("a-form"),E=d("a-spin");return J(),V(E,{spinning:g.value},{default:n(()=>[s(c,{layout:"vertical",onSubmit:I(x,["prevent"])},{default:n(()=>[s(p,{title:"اطلاعات پایه",class:"mb-base"},{default:n(()=>[O("div",D,[s(t,{label:"عکس پروفایل",class:"avatar-cell"},{default:n(()=>[s(M,{modelValue:e.image_url,"onUpdate:modelValue":[a[0]||(a[0]=l=>e.image_url=l),a[1]||(a[1]=l=>{l||(e.image_id="")})],purpose:"reagent.avatar",placeholder:"عکس",onOk:z},null,8,["modelValue"])]),_:1}),s(t,{label:"نام ","validate-status":o.fname?"error":"",help:o.fname},{default:n(()=>[s(r,{value:e.fname,"onUpdate:value":a[2]||(a[2]=l=>e.fname=l)},null,8,["value"])]),_:1},8,["validate-status","help"]),s(t,{label:"نام خانوادگی","validate-status":o.lname?"error":"",help:o.lname},{default:n(()=>[s(r,{value:e.lname,"onUpdate:value":a[3]||(a[3]=l=>e.lname=l)},null,8,["value"])]),_:1},8,["validate-status","help"]),s(t,{label:"شماره تلفن همراه","validate-status":o.mobile?"error":"",help:o.mobile},{default:n(()=>[s(r,{value:e.mobile,"onUpdate:value":a[4]||(a[4]=l=>e.mobile=l)},null,8,["value"])]),_:1},8,["validate-status","help"]),s(t,{label:"رمز عبور","validate-status":o.password?"error":"",help:o.password},{default:n(()=>[s(_,{value:e.password,"onUpdate:value":a[5]||(a[5]=l=>e.password=l)},null,8,["value"])]),_:1},8,["validate-status","help"])])]),_:1}),s(p,{title:"اطلاعات تجاری",class:"mb-base"},{default:n(()=>[O("div",L,[s(t,{label:"کد مشتری"},{default:n(()=>[s(r,{value:e.mcode,"onUpdate:value":a[6]||(a[6]=l=>e.mcode=l)},null,8,["value"])]),_:1}),s(t,{label:"نام مغازه"},{default:n(()=>[s(r,{value:e.store_name,"onUpdate:value":a[7]||(a[7]=l=>e.store_name=l)},null,8,["value"])]),_:1}),s(t,{label:"نام پاساژ"},{default:n(()=>[s(r,{value:e.pasazh_name,"onUpdate:value":a[8]||(a[8]=l=>e.pasazh_name=l)},null,8,["value"])]),_:1}),s(t,{label:"درصد کمیسیون"},{default:n(()=>[s(i,{value:e.percent,"onUpdate:value":a[9]||(a[9]=l=>e.percent=l),class:"w-full",step:.1},null,8,["value"])]),_:1})])]),_:1}),s(p,{title:"اطلاعات تکمیلی",class:"mb-base"},{default:n(()=>[s(t,{label:"آدرس"},{default:n(()=>[s(f,{value:e.address,"onUpdate:value":a[10]||(a[10]=l=>e.address=l),"auto-size":{minRows:2,maxRows:4}},null,8,["value"])]),_:1})]),_:1}),s(v,{type:"primary",onClick:x},{default:n(()=>[...a[11]||(a[11]=[B("ثبت اطلاعات",-1)])]),_:1})]),_:1})]),_:1},8,["spinning"])}}}),G=T(P,[["__scopeId","data-v-989acdd9"]]);export{G as R}; diff --git a/apps/admin-panel/dist/assets/ReagentCustomer-Ci5Lm3Fm.css b/apps/admin-panel/dist/assets/ReagentCustomer-Ci5Lm3Fm.css new file mode 100644 index 0000000..7f5e284 --- /dev/null +++ b/apps/admin-panel/dist/assets/ReagentCustomer-Ci5Lm3Fm.css @@ -0,0 +1 @@ +.avatar-cell[data-v-60b1324e]{grid-row:span 2;display:flex;justify-content:center} diff --git a/apps/admin-panel/dist/assets/ReagentCustomer-DcWF6RQp.js b/apps/admin-panel/dist/assets/ReagentCustomer-DcWF6RQp.js new file mode 100644 index 0000000..3ff7f59 --- /dev/null +++ b/apps/admin-panel/dist/assets/ReagentCustomer-DcWF6RQp.js @@ -0,0 +1 @@ +import{d as V,v as h,x as c,a as A,w as s,j as J,l as R,y as U,r as d,o as B,c as t,n as x,f as I,A as F,z as C,k as M}from"./index-CVG99b4v.js";import{_ as T}from"./CityTreeSelect.vue_vue_type_script_setup_true_lang-Ctf4a2EQ.js";import{_ as D}from"./ImageUploadInput.vue_vue_type_script_setup_true_lang-C8WW9alD.js";import{_ as L}from"./_plugin-vue_export-helper-DlAUqK2U.js";const P={class:"grid-4"},Q={class:"grid-4"},X={class:"grid-4"},g="لطفا مقدار را وارد کنید",q=V({__name:"ReagentCustomer",setup(G){const k=J(),S=M(),m=k.params.id,w=R(!1),l=U({fname:"",lname:"",password:"",mobile:"",mcode:"",store_name:"",pasazh_name:"",address:"",percent:void 0,ncode:"",phone:"",city_id:void 0,gram_level:void 0,image_id:"",image_url:null}),y=R([]),i=U({}),N=U({});function z(r=[]){const a={};for(const[e,n]of Object.entries(l))r.includes(e)||JSON.stringify(n)!==JSON.stringify(N[e])&&(a[e]=n);return a}function E(r){l.image_id=r.id??""}async function $(r){var e;if(l.city_id=r,!r)return;let a=(e=y.value.find(n=>n.id===r))==null?void 0:e.percent;if(!a)try{const{data:n}=await c.get(`cities/get-percent-aux/${r}`);a=n}catch(n){console.log(n);return}l.percent=a==null?void 0:Number(a)}async function O(){var r,a,e,n,b,p;if(Object.keys(i).forEach(u=>delete i[u]),l.fname||(i.fname=g),l.lname||(i.lname=g),l.mobile||(i.mobile=g),!m&&!l.password&&(i.password=g),!Object.keys(i).length)try{w.value=!0;const{image_url:u,...v}=l,f=m?z(["image_url","password"]):v;m&&l.password&&(f.password=l.password);const _={...f,role:"SALES_EXPERT"};(!m||"fname"in f||"lname"in f)&&(_.name=`${l.fname} ${l.lname}`.trim()),m?await c.put(`users/${m}`,_):await c.post("users",_),C.info("اطلاعات با موفقیت به ثبت رسید."),S.go(-1)}catch(u){const v=(n=(e=(a=(r=u==null?void 0:u.response)==null?void 0:r.data)==null?void 0:a.errors)==null?void 0:e.mobile)==null?void 0:n[0];C.error(v??((p=(b=u==null?void 0:u.response)==null?void 0:b.data)==null?void 0:p.message)??"خطا در ثبت اطلاعات.")}finally{w.value=!1}}return h(async()=>{var r,a;try{const{data:e}=await c.post("cities/list",{page:1,limit:500});y.value=(e.rows??[]).map(n=>({id:n.id,title:n.title??n.name,parent:n.parent??null,percent:n.percent===null||n.percent===void 0?null:Number(n.percent)}))}catch(e){console.log(e)}if(m)try{const{data:e}=await c.get(`admin/users/${m}`);Object.assign(l,{fname:e.fname??"",lname:e.lname??"",mobile:e.mobile??"",address:e.address??"",percent:e.percent===null?void 0:Number(e.percent),ncode:e.ncode??"",phone:e.phone??"",city_id:e.city_id??void 0,gram_level:e.gram_level===null||e.gram_level===void 0?void 0:Number(e.gram_level),image_id:((r=e.image)==null?void 0:r.id)??"",image_url:((a=e.image)==null?void 0:a.image)??null,store_name:e.store_name??"",pasazh_name:e.pasazh_name??"",mcode:e.mcode??""}),Object.assign(N,JSON.parse(JSON.stringify(l)))}catch(e){console.log(e)}}),(r,a)=>{const e=d("a-form-item"),n=d("a-input"),b=d("a-input-password"),p=d("a-card"),u=d("a-input-number"),v=d("a-textarea"),f=d("a-button"),_=d("a-form"),j=d("a-spin");return B(),A(j,{spinning:w.value},{default:s(()=>[t(_,{layout:"vertical",onSubmit:F(O,["prevent"])},{default:s(()=>[t(p,{title:"اطلاعات پایه",class:"mb-base"},{default:s(()=>[x("div",P,[t(e,{label:"عکس پروفایل",class:"avatar-cell"},{default:s(()=>[t(D,{modelValue:l.image_url,"onUpdate:modelValue":[a[0]||(a[0]=o=>l.image_url=o),a[1]||(a[1]=o=>{o||(l.image_id="")})],purpose:"reagent.avatar",placeholder:"عکس",onOk:E},null,8,["modelValue"])]),_:1}),t(e,{label:"نام ","validate-status":i.fname?"error":"",help:i.fname},{default:s(()=>[t(n,{value:l.fname,"onUpdate:value":a[2]||(a[2]=o=>l.fname=o)},null,8,["value"])]),_:1},8,["validate-status","help"]),t(e,{label:"نام خانوادگی","validate-status":i.lname?"error":"",help:i.lname},{default:s(()=>[t(n,{value:l.lname,"onUpdate:value":a[3]||(a[3]=o=>l.lname=o)},null,8,["value"])]),_:1},8,["validate-status","help"]),t(e,{label:"شماره تلفن همراه","validate-status":i.mobile?"error":"",help:i.mobile},{default:s(()=>[t(n,{value:l.mobile,"onUpdate:value":a[4]||(a[4]=o=>l.mobile=o)},null,8,["value"])]),_:1},8,["validate-status","help"]),t(e,{label:"رمز عبور","validate-status":i.password?"error":"",help:i.password},{default:s(()=>[t(b,{value:l.password,"onUpdate:value":a[5]||(a[5]=o=>l.password=o)},null,8,["value"])]),_:1},8,["validate-status","help"])])]),_:1}),t(p,{title:"اطلاعات تجاری",class:"mb-base"},{default:s(()=>[x("div",Q,[t(e,{label:"کد مشتری"},{default:s(()=>[t(n,{value:l.mcode,"onUpdate:value":a[6]||(a[6]=o=>l.mcode=o)},null,8,["value"])]),_:1}),t(e,{label:"نام مغازه"},{default:s(()=>[t(n,{value:l.store_name,"onUpdate:value":a[7]||(a[7]=o=>l.store_name=o)},null,8,["value"])]),_:1}),t(e,{label:"نام پاساژ"},{default:s(()=>[t(n,{value:l.pasazh_name,"onUpdate:value":a[8]||(a[8]=o=>l.pasazh_name=o)},null,8,["value"])]),_:1}),t(e,{label:"درصد کمیسیون"},{default:s(()=>[t(u,{value:l.percent,"onUpdate:value":a[9]||(a[9]=o=>l.percent=o),class:"w-full",step:.1},null,8,["value"])]),_:1}),t(e,{label:"شهر"},{default:s(()=>[t(T,{value:l.city_id,cities:y.value,placeholder:"شهر را انتخاب نمایید",onChange:$},null,8,["value","cities"])]),_:1}),t(e,{label:"سقف اعتبار (برحسب گرم)"},{default:s(()=>[t(u,{value:l.gram_level,"onUpdate:value":a[10]||(a[10]=o=>l.gram_level=o),class:"w-full"},null,8,["value"])]),_:1})])]),_:1}),t(p,{title:"اطلاعات تکمیلی",class:"mb-base"},{default:s(()=>[x("div",X,[t(e,{label:"کد ملی"},{default:s(()=>[t(n,{value:l.ncode,"onUpdate:value":a[11]||(a[11]=o=>l.ncode=o)},null,8,["value"])]),_:1}),t(e,{label:"تلفن"},{default:s(()=>[t(n,{value:l.phone,"onUpdate:value":a[12]||(a[12]=o=>l.phone=o)},null,8,["value"])]),_:1})]),t(e,{label:"آدرس"},{default:s(()=>[t(v,{value:l.address,"onUpdate:value":a[13]||(a[13]=o=>l.address=o),"auto-size":{minRows:2,maxRows:4}},null,8,["value"])]),_:1})]),_:1}),t(f,{type:"primary",onClick:O},{default:s(()=>[...a[14]||(a[14]=[I("ثبت اطلاعات",-1)])]),_:1})]),_:1})]),_:1},8,["spinning"])}}}),Z=L(q,[["__scopeId","data-v-60b1324e"]]);export{Z as R}; diff --git a/apps/admin-panel/dist/assets/ReagentCustomer-uQVwyvt5.css b/apps/admin-panel/dist/assets/ReagentCustomer-uQVwyvt5.css deleted file mode 100644 index c98fca1..0000000 --- a/apps/admin-panel/dist/assets/ReagentCustomer-uQVwyvt5.css +++ /dev/null @@ -1 +0,0 @@ -.avatar-cell[data-v-989acdd9]{grid-row:span 2;display:flex;justify-content:center} diff --git a/apps/admin-panel/dist/assets/ReagentList-4cYdsHGv.js b/apps/admin-panel/dist/assets/ReagentList-4cYdsHGv.js deleted file mode 100644 index 7ee9674..0000000 --- a/apps/admin-panel/dist/assets/ReagentList-4cYdsHGv.js +++ /dev/null @@ -1 +0,0 @@ -import{u as S,d as B,b as p,c as f,w as o,r as v,o as i,h as V,n as X,a as l,i as r,f as k,t as _,l as E,k as I,x as j,z as b}from"./index-WFQJAeoE.js";import{a as A,b as t,X as D}from"./model-Di_BQPv1.js";import{_ as d}from"./TooltipBtn.vue_vue_type_script_setup_true_lang-CW6ghT15.js";import{_ as R}from"./ListPageHeader.vue_vue_type_script_setup_true_lang-BmENA4yH.js";import"./SettingOutlined-DZJd42S-.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./icons-CDnlJr4R.js";import"./TeamOutlined-CQ06mk_Y.js";import"./UnorderedListOutlined-CvD227Uu.js";import"./CreditCardOutlined-Dh4ayM2S.js";function F(){const c=S();Object.keys(c.cityFilters).length<1&&c.getCities();const e=new A("admin/customers-omde/reagent/list","لیست کارشناسان فروش");return e.add(new t("id","کد").filterNumber()),e.add(new t("lname","نام خانوادگی").filterText().hidden()),e.add(new t("name","نام و نام خانوادگی").filterText()),e.add(new t("name","نام").filterText().hidden()),e.add(new t("mobile","موبایل").filterText().hidden().noSort()),e.add(new t("city_id","شهر").hidden().renderSlot("city").filterKey("city_id").filterSelect(c.cityFilters)),e.add(new t("gram_level","سطح اعتبار").filterNumber().noSort()),e.add(new t("percent","درصد").filterNumber().noSort()),e.add(new t("remain","بدهی گرمی").filterNumber().noSort()),e.add(new t("rial_remain","بدهی ریالی").filterNumber().noSort()),e.add(new t("grams_sell","میزان فروش").filterNumber().noSort()),e.add(new t("caj","تاریخ ثبت").filterDate().noSort()),e.add(new t("uaj","بروزرسانی").hidden().filterDate().noSort()),e.add(new t("sts_str","وضعیت ثبت سفارش").renderSlot("sts").noSort()),e.add(new t("active","وضعیت حساب کاربری").renderSlot("active").noSort().filterSelect({1:"فعال","-1":"غیر فعال"})),e.add(new t("opt","عملیات").noSort().renderSlot("opt")),e}const L={id:"page-user-list"},P={key:0},z={key:1},K={class:"flex"},Z=B({__name:"ReagentList",setup(c){const e=I(),g=S(),a=n=>!!g.hasPermission(n),x=F(),w=E(null);async function h(n){var m;try{await j.put(`users/${n.id}`,{is_active:n.active!==1}),b.info("تغییرات ثبت شد "),await((m=w.value)==null?void 0:m.fetch())}catch{b.error("خطا در تغییر وضعیت")}}function C(){e.push("/reagent/add")}function N(n){e.push(`/reagent/edit/${n}`)}function $(n){e.push(`/reagent/view/${n}`)}return(n,m)=>{const y=v("a-tag"),T=v("a-card");return i(),p("div",L,[f(T,{title:"لیست کارشناسان فروش"},{default:o(()=>[f(D,{ref_key:"tbl",ref:w,model:V(x)},{add:o(()=>[a("persons.create.seller")?(i(),l(R,{key:0,rid:"persons.create.seller","add-label":"افزودن کارشناس فروش",onAdd:C})):r("",!0)]),city:o(({record:s})=>[s.city&&s.city.title?(i(),p("div",P,_(s.city.title),1)):(i(),p("div",z,"-"))]),sts:o(({record:s})=>[k(_(s.sts_str),1)]),active:o(({record:s})=>[f(y,{color:s.active===1?"green":"red"},{default:o(()=>[k(_(s.active===1?"فعال":"غیر فعال"),1)]),_:2},1032,["color"])]),opt:o(({record:s})=>[X("div",K,[a("persons.list.sellers.edit")?(i(),l(d,{key:0,"icon-class":"w-5 h-5 text-primary",class:"ml-3",icon:"EditIcon",title:"ویرایش",onClick:u=>N(s.id)},null,8,["onClick"])):r("",!0),a("persons.list.sellers.view")?(i(),l(d,{key:1,"icon-class":"w-5 h-5 text-success",class:"ml-3",icon:"EyeIcon",title:"مشاهده اطلاعات",onClick:u=>$(s.id)},null,8,["onClick"])):r("",!0),s.active==1&&a("persons.list.sellers.unable")?(i(),l(d,{key:2,"icon-class":"w-5 h-5 text-danger",class:"ml-3",icon:"XIcon",title:"غیر فعال کردن حساب کاربری","pop-title":"آیا مطمئن هستید؟",onClick:u=>h(s)},null,8,["onClick"])):r("",!0),s.active!==1&&a("persons.list.sellers.able")?(i(),l(d,{key:3,"icon-class":"w-5 h-5 text-success",class:"ml-3",icon:"CheckIcon",title:"فعال سازی حساب کاربری","pop-title":"آیا مطمئن هستید؟",onClick:u=>h(s)},null,8,["onClick"])):r("",!0)])]),_:1},8,["model"])]),_:1})])}}});export{Z as default}; diff --git a/apps/admin-panel/dist/assets/ReagentList-CewJDGn-.js b/apps/admin-panel/dist/assets/ReagentList-CewJDGn-.js new file mode 100644 index 0000000..541e357 --- /dev/null +++ b/apps/admin-panel/dist/assets/ReagentList-CewJDGn-.js @@ -0,0 +1 @@ +import{u as g,d as B,b as _,c as d,w as i,r as v,o,h as V,n as X,a as l,i as r,f as k,t as w,l as E,k as I,x as j,z as b}from"./index-CVG99b4v.js";import{a as A,b as s,X as D}from"./model-CvqTGmy8.js";import{_ as m}from"./TooltipBtn.vue_vue_type_script_setup_true_lang-DxnpxKjK.js";import{_ as R}from"./ListPageHeader.vue_vue_type_script_setup_true_lang-CetMN4WH.js";import"./filters-UavLT20t.js";import"./index-pLFqZCCf.js";import"./SettingOutlined-D7--Xtqg.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./icons-BaVxJrpa.js";import"./TeamOutlined-BEJyrWYB.js";import"./UnorderedListOutlined-CKa6XzC7.js";import"./CreditCardOutlined-wQJvlSrP.js";function F(){const c=g();Object.keys(c.cityFilters).length<1&&c.getCities();const e=new A("admin/customers-omde/reagent/list","لیست کارشناسان فروش");return e.add(new s("id","کد").filterNumber()),e.add(new s("lname","نام خانوادگی").filterText().hidden()),e.add(new s("name","نام و نام خانوادگی").filterText()),e.add(new s("name","نام").filterText().hidden()),e.add(new s("mobile","موبایل").filterText().hidden().noSort()),e.add(new s("city_id","شهر").hidden().renderSlot("city").filterKey("city_id").filterSelect(c.cityFilters)),e.add(new s("gram_level","سطح اعتبار").filterNumber().noSort()),e.add(new s("percent","درصد").filterNumber().noSort()),e.add(new s("remain","بدهی گرمی").filterNumber().noSort()),e.add(new s("rial_remain","بدهی ریالی").filterNumber().noSort()),e.add(new s("grams_sell","میزان فروش").filterNumber().noSort()),e.add(new s("caj","تاریخ ثبت").filterDate().noSort()),e.add(new s("uaj","بروزرسانی").hidden().filterDate().noSort()),e.add(new s("sts_str","وضعیت ثبت سفارش").renderSlot("sts").noSort()),e.add(new s("active","وضعیت حساب کاربری").renderSlot("active").noSort().filterSelect({1:"فعال","-1":"غیر فعال"})),e.add(new s("opt","عملیات").noSort().renderSlot("opt")),e}const L={id:"page-user-list"},P={key:0},z={key:1},K={class:"flex"},te=B({__name:"ReagentList",setup(c){const e=I(),S=g(),a=n=>!!S.hasPermission(n),x=F(),h=E(null);async function y(n){var u;try{await j.put(`users/${n.id}`,{is_active:n.active!==1}),b.info("تغییرات ثبت شد "),await((u=h.value)==null?void 0:u.fetch())}catch{b.error("خطا در تغییر وضعیت")}}function C(){e.push("/reagent/add")}function N(n){e.push(`/reagent/edit/${n}`)}function $(n){e.push(`/reagent/view/${n}`)}return(n,u)=>{const p=v("a-tag"),T=v("a-card");return o(),_("div",L,[d(T,{title:"لیست کارشناسان فروش"},{default:i(()=>[d(D,{ref_key:"tbl",ref:h,model:V(x)},{add:i(()=>[a("persons.create.seller")?(o(),l(R,{key:0,rid:"persons.create.seller","add-label":"افزودن کارشناس فروش",onAdd:C})):r("",!0)]),city:i(({record:t})=>[t.city&&t.city.title?(o(),_("div",P,w(t.city.title),1)):(o(),_("div",z,"-"))]),sts:i(({record:t})=>[d(p,{color:t.sts===1?"green":"red"},{default:i(()=>[k(w(t.sts_str),1)]),_:2},1032,["color"])]),active:i(({record:t})=>[d(p,{color:t.active===1?"green":"red"},{default:i(()=>[k(w(t.active===1?"فعال":"غیر فعال"),1)]),_:2},1032,["color"])]),opt:i(({record:t})=>[X("div",K,[a("persons.list.sellers.edit")?(o(),l(m,{key:0,"icon-class":"w-5 h-5 text-primary",class:"ml-3",icon:"EditIcon",title:"ویرایش",onClick:f=>N(t.id)},null,8,["onClick"])):r("",!0),a("persons.list.sellers.view")?(o(),l(m,{key:1,"icon-class":"w-5 h-5 text-success",class:"ml-3",icon:"EyeIcon",title:"مشاهده اطلاعات",onClick:f=>$(t.id)},null,8,["onClick"])):r("",!0),t.active==1&&a("persons.list.sellers.unable")?(o(),l(m,{key:2,"icon-class":"w-5 h-5 text-danger",class:"ml-3",icon:"XIcon",title:"غیر فعال کردن حساب کاربری","pop-title":"آیا مطمئن هستید؟",onClick:f=>y(t)},null,8,["onClick"])):r("",!0),t.active!==1&&a("persons.list.sellers.able")?(o(),l(m,{key:3,"icon-class":"w-5 h-5 text-success",class:"ml-3",icon:"CheckIcon",title:"فعال سازی حساب کاربری","pop-title":"آیا مطمئن هستید؟",onClick:f=>y(t)},null,8,["onClick"])):r("",!0)])]),_:1},8,["model"])]),_:1})])}}});export{te as default}; diff --git a/apps/admin-panel/dist/assets/SafetyCertificateOutlined-C5Qh-j2p.js b/apps/admin-panel/dist/assets/SafetyCertificateOutlined-C5Qh-j2p.js new file mode 100644 index 0000000..0502037 --- /dev/null +++ b/apps/admin-panel/dist/assets/SafetyCertificateOutlined-C5Qh-j2p.js @@ -0,0 +1 @@ +import{c as f,I as l}from"./index-CVG99b4v.js";var u={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M866.9 169.9L527.1 54.1C523 52.7 517.5 52 512 52s-11 .7-15.1 2.1L157.1 169.9c-8.3 2.8-15.1 12.4-15.1 21.2v482.4c0 8.8 5.7 20.4 12.6 25.9L499.3 968c3.5 2.7 8 4.1 12.6 4.1s9.2-1.4 12.6-4.1l344.7-268.6c6.9-5.4 12.6-17 12.6-25.9V191.1c.2-8.8-6.6-18.3-14.9-21.2zM810 654.3L512 886.5 214 654.3V226.7l298-101.6 298 101.6v427.6zm-405.8-201c-3-4.1-7.8-6.6-13-6.6H336c-6.5 0-10.3 7.4-6.5 12.7l126.4 174a16.1 16.1 0 0026 0l212.6-292.7c3.8-5.3 0-12.7-6.5-12.7h-55.2c-5.1 0-10 2.5-13 6.6L468.9 542.4l-64.7-89.1z"}}]},name:"safety-certificate",theme:"outlined"};function c(r){for(var t=1;t(a(),s(i,{title:t(o),model:t(e)},null,8,["title","model"]))}});export{D as default}; diff --git a/apps/admin-panel/dist/assets/ShopkeeperList-C7Y-9x4E.js b/apps/admin-panel/dist/assets/ShopkeeperList-C7Y-9x4E.js deleted file mode 100644 index 976b779..0000000 --- a/apps/admin-panel/dist/assets/ShopkeeperList-C7Y-9x4E.js +++ /dev/null @@ -1 +0,0 @@ -import{b as r,O as p,_ as i}from"./omdeListModel-B-zNFWRI.js";import{d as m,a as s,h as e,o as a}from"./index-WFQJAeoE.js";import"./model-Di_BQPv1.js";import"./SettingOutlined-DZJd42S-.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ListPageHeader.vue_vue_type_script_setup_true_lang-BmENA4yH.js";import"./bulkCustomer.vue_vue_type_script_setup_true_lang-zBMtv664.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js";import"./ImageUploadInput.vue_vue_type_script_setup_true_lang-BQ_i_QZe.js";import"./UnorderedListOutlined-CvD227Uu.js";const B=m({__name:"ShopkeeperList",setup(l){const t=p.shopkeeper.title,o=r("shopkeeper");return(n,_)=>(a(),s(i,{title:e(t),model:e(o)},null,8,["title","model"]))}});export{B as default}; diff --git a/apps/admin-panel/dist/assets/SingleCustomer-C5Dlor_C.js b/apps/admin-panel/dist/assets/SingleCustomer-C5Dlor_C.js new file mode 100644 index 0000000..75edaff --- /dev/null +++ b/apps/admin-panel/dist/assets/SingleCustomer-C5Dlor_C.js @@ -0,0 +1 @@ +import{d as F,u as H,a as d,w as t,p as L,r as l,o as p,c as o,h as f,E as M,i as w,T as R,n as W,f as j,l as m,z as h,x as q,k as A,H as D}from"./index-CVG99b4v.js";import{a as G,b as u,X as J}from"./model-CvqTGmy8.js";import{C as Q}from"./CreditCardOutlined-wQJvlSrP.js";import{_ as Y}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./filters-UavLT20t.js";import"./index-pLFqZCCf.js";import"./SettingOutlined-D7--Xtqg.js";function Z(){const a=new G("admin/customers-omde/single/list","لیست مشتریان تک");return a.add(new u("id","کد").filterNumber()),a.add(new u("fname","نام").filterKey("fullName").filterText()),a.add(new u("lname","نام خانوادگی").filterKey("fullName").filterText().noSort()),a.add(new u("phone","تلفن تماس").filterKey("mobile").filterText().noSort()),a.add(new u("email","ایمیل").filterText().noSort()),a.add(new u("branch.name","نام شعبه").filterText().noSort()),a.add(new u("op","عملیات").noSort().renderSlot("op")),a}const ee={class:"charge-grid"},te=F({__name:"SingleCustomer",setup(a){const _=A(),y=H(),v=e=>!!y.hasPermission(e),k=Z(),S=m(null),x=L(()=>D()),c=m(!1),C=m(!1),r=m(void 0),g=m(void 0);function T(e){g.value=e,r.value=void 0,c.value=!0}function N(){r.value=void 0,c.value=!1}async function V(){var e,n;if(!g.value||!r.value){h.error("لطفا مقدار را وارد کنید");return}try{C.value=!0,await q.post("wallet/charge",{customer_id:g.value,value:r.value}),h.info("عملیات با موفقیت انجام شد"),c.value=!1,r.value=void 0,await _.push("/wallet")}catch(s){console.log(s),h.error(((n=(e=s==null?void 0:s.response)==null?void 0:e.data)==null?void 0:n.message)??"خطا در ثبت اطلاعات.")}finally{C.value=!1}}function B(e){_.push(`/singleCustomer/edit/${e}`)}function $(e){_.push(`/singleCustomer/view/${e}`)}return(e,n)=>{const s=l("a-tooltip"),E=l("a-input-number"),X=l("a-form-item"),K=l("a-button"),O=l("a-popconfirm"),U=l("a-form"),I=l("a-spin"),P=l("a-modal"),z=l("a-card");return p(),d(z,{title:x.value?"لیست مشتریان":"لیست مشتریان تک فروشی"},{default:t(()=>[o(J,{ref_key:"tbl",ref:S,model:f(k)},{op:t(({record:i})=>[o(s,{title:"ویرایش"},{default:t(()=>[o(f(M),{class:"cursor-pointer mx-1 text-primary",onClick:b=>B(i.id)},null,8,["onClick"])]),_:2},1024),v("wallet.charge")&&!x.value?(p(),d(s,{key:0,title:"شارژ کیف پول"},{default:t(()=>[o(f(Q),{class:"cursor-pointer mx-1",style:{color:"#d48806"},onClick:b=>T(i.id)},null,8,["onClick"])]),_:2},1024)):w("",!0),v("wallet.charge")?(p(),d(s,{key:1,title:"مشاهده اطلاعات"},{default:t(()=>[o(f(R),{class:"cursor-pointer mx-1 text-success",onClick:b=>$(i.id)},null,8,["onClick"])]),_:2},1024)):w("",!0)]),_:1},8,["model"]),v("wallet.charge")?(p(),d(P,{key:0,open:c.value,"onUpdate:open":n[1]||(n[1]=i=>c.value=i),footer:null,title:"شارژ کیف پول"},{default:t(()=>[o(I,{spinning:C.value},{default:t(()=>[o(U,{layout:"vertical"},{default:t(()=>[W("div",ee,[o(X,{label:"میزان شارژ"},{default:t(()=>[o(E,{value:r.value,"onUpdate:value":n[0]||(n[0]=i=>r.value=i),class:"w-full"},null,8,["value"])]),_:1}),o(O,{style:{"margin-bottom":"24px"},title:"آیا از شارژ کیف پول مطمعن هستید؟","ok-text":"بله","cancel-text":"خیر",onConfirm:V,onCancel:N},{default:t(()=>[o(K,{type:"primary"},{default:t(()=>[...n[2]||(n[2]=[j("ثبت",-1)])]),_:1})]),_:1})])]),_:1})]),_:1},8,["spinning"])]),_:1},8,["open"])):w("",!0)]),_:1},8,["title"])}}}),ue=Y(te,[["__scopeId","data-v-c516ee92"]]);export{ue as default}; diff --git a/apps/admin-panel/dist/assets/SingleCustomer-D08Zj62F.js b/apps/admin-panel/dist/assets/SingleCustomer-D08Zj62F.js deleted file mode 100644 index 16289e0..0000000 --- a/apps/admin-panel/dist/assets/SingleCustomer-D08Zj62F.js +++ /dev/null @@ -1 +0,0 @@ -import{d as F,u as L,a as m,w as t,p as M,r as l,o as p,c as o,h as f,E as Q,i as w,Q as R,n as W,f as j,l as d,z as h,x as q,k as A,C as D}from"./index-WFQJAeoE.js";import{a as G,b as u,X as H}from"./model-Di_BQPv1.js";import{C as J}from"./CreditCardOutlined-Dh4ayM2S.js";import{_ as Y}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./SettingOutlined-DZJd42S-.js";function Z(){const a=new G("admin/customers-omde/single/list","لیست مشتریان تک");return a.add(new u("id","کد").filterNumber()),a.add(new u("fname","نام").filterKey("fullName").filterText()),a.add(new u("lname","نام خانوادگی").filterKey("fullName").filterText().noSort()),a.add(new u("phone","تلفن تماس").filterKey("mobile").filterText().noSort()),a.add(new u("email","ایمیل").filterText().noSort()),a.add(new u("branch.name","نام شعبه").filterText().noSort()),a.add(new u("op","عملیات").noSort().renderSlot("op")),a}const ee={class:"charge-grid"},te=F({__name:"SingleCustomer",setup(a){const _=A(),y=L(),v=e=>!!y.hasPermission(e),k=Z(),S=d(null),x=M(()=>D()),c=d(!1),C=d(!1),r=d(void 0),g=d(void 0);function T(e){g.value=e,r.value=void 0,c.value=!0}function N(){r.value=void 0,c.value=!1}async function V(){var e,n;if(!g.value||!r.value){h.error("لطفا مقدار را وارد کنید");return}try{C.value=!0,await q.post("wallet/charge",{customer_id:g.value,value:r.value}),h.info("عملیات با موفقیت انجام شد"),c.value=!1,r.value=void 0,await _.push("/wallet")}catch(s){console.log(s),h.error(((n=(e=s==null?void 0:s.response)==null?void 0:e.data)==null?void 0:n.message)??"خطا در ثبت اطلاعات.")}finally{C.value=!1}}function B(e){_.push(`/singleCustomer/edit/${e}`)}function $(e){_.push(`/singleCustomer/view/${e}`)}return(e,n)=>{const s=l("a-tooltip"),E=l("a-input-number"),X=l("a-form-item"),K=l("a-button"),O=l("a-popconfirm"),U=l("a-form"),I=l("a-spin"),P=l("a-modal"),z=l("a-card");return p(),m(z,{title:x.value?"لیست مشتریان":"لیست مشتریان تک فروشی"},{default:t(()=>[o(H,{ref_key:"tbl",ref:S,model:f(k)},{op:t(({record:i})=>[o(s,{title:"ویرایش"},{default:t(()=>[o(f(Q),{class:"cursor-pointer mx-1 text-primary",onClick:b=>B(i.id)},null,8,["onClick"])]),_:2},1024),v("wallet.charge")&&!x.value?(p(),m(s,{key:0,title:"شارژ کیف پول"},{default:t(()=>[o(f(J),{class:"cursor-pointer mx-1",style:{color:"#d48806"},onClick:b=>T(i.id)},null,8,["onClick"])]),_:2},1024)):w("",!0),v("wallet.charge")?(p(),m(s,{key:1,title:"مشاهده اطلاعات"},{default:t(()=>[o(f(R),{class:"cursor-pointer mx-1 text-success",onClick:b=>$(i.id)},null,8,["onClick"])]),_:2},1024)):w("",!0)]),_:1},8,["model"]),v("wallet.charge")?(p(),m(P,{key:0,open:c.value,"onUpdate:open":n[1]||(n[1]=i=>c.value=i),footer:null,title:"شارژ کیف پول"},{default:t(()=>[o(I,{spinning:C.value},{default:t(()=>[o(U,{layout:"vertical"},{default:t(()=>[W("div",ee,[o(X,{label:"میزان شارژ"},{default:t(()=>[o(E,{value:r.value,"onUpdate:value":n[0]||(n[0]=i=>r.value=i),class:"w-full"},null,8,["value"])]),_:1}),o(O,{style:{"margin-bottom":"24px"},title:"آیا از شارژ کیف پول مطمعن هستید؟","ok-text":"بله","cancel-text":"خیر",onConfirm:V,onCancel:N},{default:t(()=>[o(K,{type:"primary"},{default:t(()=>[...n[2]||(n[2]=[j("ثبت",-1)])]),_:1})]),_:1})])]),_:1})]),_:1},8,["spinning"])]),_:1},8,["open"])):w("",!0)]),_:1},8,["title"])}}}),re=Y(te,[["__scopeId","data-v-c516ee92"]]);export{re as default}; diff --git a/apps/admin-panel/dist/assets/TaminList-eeXL80j5.js b/apps/admin-panel/dist/assets/TaminList-Be_TUmas.js similarity index 92% rename from apps/admin-panel/dist/assets/TaminList-eeXL80j5.js rename to apps/admin-panel/dist/assets/TaminList-Be_TUmas.js index d129989..2c412e3 100644 --- a/apps/admin-panel/dist/assets/TaminList-eeXL80j5.js +++ b/apps/admin-panel/dist/assets/TaminList-Be_TUmas.js @@ -1 +1 @@ -import{u as z,d as H,b as c,c as a,w as t,r as u,o as s,h as J,f as d,t as l,A as Q,i as v,n as w,a as b,F as V,e as X,l as C,x as N,z as T}from"./index-WFQJAeoE.js";import{a as Y,b as _,X as Z}from"./model-Di_BQPv1.js";import{_ as ee}from"./TooltipBtn.vue_vue_type_script_setup_true_lang-CW6ghT15.js";import{j as te}from"./filters-C1cWKkpl.js";import{_ as oe}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./SettingOutlined-DZJd42S-.js";import"./icons-CDnlJr4R.js";import"./TeamOutlined-CQ06mk_Y.js";import"./UnorderedListOutlined-CvD227Uu.js";import"./CreditCardOutlined-Dh4ayM2S.js";import"./index-1e_FodC0.js";function ae(){const $=z(),r=new Y("admin/orders/tamin/list","لیست سفارش های عمده");return r.add(new _("id","شماره").filterNumber()),r.add(new _("customer.name","مشتری").filterKey("customer.fullName").filterText()),r.add(new _("customer.mobile","موبایل").filterText().hidden().noSort()),r.add(new _("input","ورودی").filterKey("totalGoldWeightGrams").filterText()),r.add(new _("wage","اجرت").filterKey("wageWeightGrams").filterText().noSort()),r.add(new _("items","تعداد آیتم ها").renderSlot("items_len").noSort()),r.add(new _("caj","تاریخ ثبت").filterKey("createdAt").filterDate().noSort()),r.add(new _("uaj","تاریخ ویرایش").hidden().filterKey("updatedAt").filterDate().noSort()),$.roles&&$.roles.includes("order.tamin.state")&&r.add(new _("sts","وضعیت").renderSlot("sts_str").noSort().filterSelect()),r.add(new _("confirmed","وضعیت تایید مشتری").renderSlot("confirmed_str").noSort().filterSelect({1:"تایید شده",2:"در انتظار تایید"})),r.add(new _("opt","عملیات").noSort().renderSlot("opt")),r}const ne={id:"page-user-list"},se={class:"flex"},le={key:0},re=["onClick"],ie={key:1},de={class:"flex flex-col"},ue={key:0},ce={class:"flex"},_e={class:"flex-1"},fe={key:1,class:"flex items-center"},me={key:2},pe={key:0},ve=H({__name:"TaminList",setup($){const r=z(),g=n=>!!r.hasPermission(n),A=ae(),j=C(null),i=C(void 0),x=C(!1),k=C(!1),B=n=>n?te(n):"";function G(n){return n.proceed?"green":"gray"}async function D(n){const{data:o}=await N.get(`admin/orders/${n}`);return o}async function F(n){i.value=await D(n.id),x.value=!0}async function M(n){i.value=await D(n.id),k.value=!0}async function P(n){var o,f;try{await N.post("order-sts/edit",{orderId:(o=i.value)==null?void 0:o.id,status:n.status,note:n.note}),k.value=!1,T.info("ویرایش موفق آمیز"),(f=j.value)==null||f.fetch()}catch{T.error("خطا در ویرایش")}}async function W(n){var o,f,m,h;try{await N.post("order-sts/edit",{orderId:(o=i.value)==null?void 0:o.id,status:n.status,remove:!0}),k.value=!1,T.info("ویرایش موفق آمیز"),(f=j.value)==null||f.fetch()}catch(S){T.error(((h=(m=S==null?void 0:S.response)==null?void 0:m.data)==null?void 0:h.message)??"خطا در ویرایش")}}return(n,o)=>{const f=u("a-tag"),m=u("a-button"),h=u("a-popconfirm"),S=u("a-input"),q=u("a-timeline-item"),E=u("a-timeline"),K=u("a-modal"),p=u("a-descriptions-item"),U=u("a-descriptions"),O=u("a-divider"),I=u("a-card"),R=u("a-empty");return s(),c("div",ne,[a(I,{title:"لیست سفارش های عمده"},{default:t(()=>[a(Z,{ref_key:"tbl",ref:j,model:J(A)},{opt:t(({record:e})=>[w("div",se,[g("order.tamin.view")?(s(),b(ee,{key:0,"icon-class":"w-5 h-5 text-primary",class:"mr-3",icon:"ListIcon",title:"مشاهده سفارش",onClick:y=>F(e)},null,8,["onClick"])):v("",!0)])]),items_len:t(({text:e})=>[e?(s(),c("div",le,l(e.length),1)):v("",!0)]),sts_str:t(({record:e})=>[g("order.tamin.state")?(s(),c("a",{key:0,href:"",onClick:Q(y=>M(e),["prevent"])},l(e.sts_str),9,re)):(s(),c("span",ie,l(e.sts_str),1))]),confirmed_str:t(({record:e})=>[d(l(e.confirmed_str),1)]),_:1},8,["model"]),a(K,{open:k.value,"onUpdate:open":o[1]||(o[1]=e=>k.value=e),title:"وضعیت سفارش"},{footer:t(()=>[a(m,{onClick:o[0]||(o[0]=e=>k.value=!1)},{default:t(()=>[...o[7]||(o[7]=[d("باشه",-1)])]),_:1})]),default:t(()=>[i.value?(s(),b(E,{key:0},{default:t(()=>[(s(!0),c(V,null,X(i.value.activity,(e,y)=>(s(),b(q,{key:y,color:G(e)},{default:t(()=>[w("div",de,[w("div",null,l(e.title),1),e.proceed?(s(),c("div",ue,[w("div",ce,[w("div",_e,[a(f,null,{default:t(()=>[d(l(B(e.uaj)),1)]),_:2},1024)]),y>0&&g("order.tamin.state.remove")?(s(),b(h,{key:0,"ok-text":"بله","cancel-text":"بی خیال",onConfirm:L=>W(e)},{title:t(()=>[...o[4]||(o[4]=[w("p",null,"آیا مطمئن به حذف وضعیت مورد نظر هستید ؟",-1)])]),default:t(()=>[a(m,{size:"small",danger:""},{default:t(()=>[...o[5]||(o[5]=[d("حذف وضعیت",-1)])]),_:1})]),_:1},8,["onConfirm"])):v("",!0)])])):v("",!0),!e.proceed&&g("order.tamin.state.submit")?(s(),c("div",fe,[a(S,{value:e.note,"onUpdate:value":L=>e.note=L,placeholder:"یادداشت"},null,8,["value","onUpdate:value"]),a(m,{type:"text",size:"small",onClick:L=>P(e)},{default:t(()=>[...o[6]||(o[6]=[d("ثبت وضعیت",-1)])]),_:1},8,["onClick"])])):v("",!0),e.proceed?(s(),c("div",me,l(e.note),1)):v("",!0)])]),_:2},1032,["color"]))),128))]),_:1})):v("",!0)]),_:1},8,["open"]),a(K,{open:x.value,"onUpdate:open":o[3]||(o[3]=e=>x.value=e),title:"مشاهده سفارش",width:"80%"},{footer:t(()=>[a(m,{onClick:o[2]||(o[2]=e=>x.value=!1)},{default:t(()=>[...o[8]||(o[8]=[d("باشه",-1)])]),_:1})]),default:t(()=>[i.value?(s(),c("div",pe,[a(U,null,{default:t(()=>[a(p,{label:"مشتری"},{default:t(()=>[d(l(i.value.customer.fname)+" "+l(i.value.customer.lname),1)]),_:1}),a(p,{label:"تلفن همراه"},{default:t(()=>[d(l(i.value.customer.phone),1)]),_:1}),a(p,{label:"تاریخ ثبت"},{default:t(()=>[d(l(B(i.value.caj)),1)]),_:1}),a(p,{label:"وضعیت"},{default:t(()=>[d(l(i.value.sts_str),1)]),_:1})]),_:1}),a(I,{title:"آیتم های سفارش"},{default:t(()=>[(s(!0),c(V,null,X(i.value.items,(e,y)=>(s(),c("div",{key:y},[a(U,null,{default:t(()=>[a(p,{label:"نام محصول"},{default:t(()=>[a(f,{color:"blue"},{default:t(()=>[d(l(e.title),1)]),_:2},1024)]),_:2},1024),a(p,{label:"عنوان تنوع"},{default:t(()=>[d(l(e.variant_title),1)]),_:2},1024),a(p,{label:"وزن نهایی"},{default:t(()=>[a(f,{color:"red"},{default:t(()=>[d(l(e.grams),1)]),_:2},1024)]),_:2},1024),a(p,{label:"تعداد"},{default:t(()=>[a(f,{color:"orange"},{default:t(()=>[d(l(e.qty),1)]),_:2},1024)]),_:2},1024)]),_:2},1024),y!!r.hasPermission(n),A=ae(),j=C(null),i=C(void 0),x=C(!1),k=C(!1),B=n=>n?te(n):"";function G(n){return n.proceed?"green":"gray"}async function D(n){const{data:o}=await N.get(`admin/orders/${n}`);return o}async function F(n){i.value=await D(n.id),x.value=!0}async function M(n){i.value=await D(n.id),k.value=!0}async function P(n){var o,f;try{await N.post("order-sts/edit",{orderId:(o=i.value)==null?void 0:o.id,status:n.status,note:n.note}),k.value=!1,T.info("ویرایش موفق آمیز"),(f=j.value)==null||f.fetch()}catch{T.error("خطا در ویرایش")}}async function W(n){var o,f,m,h;try{await N.post("order-sts/edit",{orderId:(o=i.value)==null?void 0:o.id,status:n.status,remove:!0}),k.value=!1,T.info("ویرایش موفق آمیز"),(f=j.value)==null||f.fetch()}catch(S){T.error(((h=(m=S==null?void 0:S.response)==null?void 0:m.data)==null?void 0:h.message)??"خطا در ویرایش")}}return(n,o)=>{const f=u("a-tag"),m=u("a-button"),h=u("a-popconfirm"),S=u("a-input"),q=u("a-timeline-item"),E=u("a-timeline"),K=u("a-modal"),p=u("a-descriptions-item"),U=u("a-descriptions"),O=u("a-divider"),I=u("a-card"),R=u("a-empty");return s(),c("div",ne,[a(I,{title:"لیست سفارش های عمده"},{default:t(()=>[a(Z,{ref_key:"tbl",ref:j,model:J(A)},{opt:t(({record:e})=>[w("div",se,[g("order.tamin.view")?(s(),b(ee,{key:0,"icon-class":"w-5 h-5 text-primary",class:"mr-3",icon:"ListIcon",title:"مشاهده سفارش",onClick:y=>F(e)},null,8,["onClick"])):v("",!0)])]),items_len:t(({text:e})=>[e?(s(),c("div",le,l(e.length),1)):v("",!0)]),sts_str:t(({record:e})=>[g("order.tamin.state")?(s(),c("a",{key:0,href:"",onClick:Q(y=>M(e),["prevent"])},l(e.sts_str),9,re)):(s(),c("span",ie,l(e.sts_str),1))]),confirmed_str:t(({record:e})=>[d(l(e.confirmed_str),1)]),_:1},8,["model"]),a(K,{open:k.value,"onUpdate:open":o[1]||(o[1]=e=>k.value=e),title:"وضعیت سفارش"},{footer:t(()=>[a(m,{onClick:o[0]||(o[0]=e=>k.value=!1)},{default:t(()=>[...o[7]||(o[7]=[d("باشه",-1)])]),_:1})]),default:t(()=>[i.value?(s(),b(E,{key:0},{default:t(()=>[(s(!0),c(V,null,X(i.value.activity,(e,y)=>(s(),b(q,{key:y,color:G(e)},{default:t(()=>[w("div",de,[w("div",null,l(e.title),1),e.proceed?(s(),c("div",ue,[w("div",ce,[w("div",_e,[a(f,null,{default:t(()=>[d(l(B(e.uaj)),1)]),_:2},1024)]),y>0&&g("order.tamin.state.remove")?(s(),b(h,{key:0,"ok-text":"بله","cancel-text":"بی خیال",onConfirm:L=>W(e)},{title:t(()=>[...o[4]||(o[4]=[w("p",null,"آیا مطمئن به حذف وضعیت مورد نظر هستید ؟",-1)])]),default:t(()=>[a(m,{size:"small",danger:""},{default:t(()=>[...o[5]||(o[5]=[d("حذف وضعیت",-1)])]),_:1})]),_:1},8,["onConfirm"])):v("",!0)])])):v("",!0),!e.proceed&&g("order.tamin.state.submit")?(s(),c("div",fe,[a(S,{value:e.note,"onUpdate:value":L=>e.note=L,placeholder:"یادداشت"},null,8,["value","onUpdate:value"]),a(m,{type:"text",size:"small",onClick:L=>P(e)},{default:t(()=>[...o[6]||(o[6]=[d("ثبت وضعیت",-1)])]),_:1},8,["onClick"])])):v("",!0),e.proceed?(s(),c("div",me,l(e.note),1)):v("",!0)])]),_:2},1032,["color"]))),128))]),_:1})):v("",!0)]),_:1},8,["open"]),a(K,{open:x.value,"onUpdate:open":o[3]||(o[3]=e=>x.value=e),title:"مشاهده سفارش",width:"80%"},{footer:t(()=>[a(m,{onClick:o[2]||(o[2]=e=>x.value=!1)},{default:t(()=>[...o[8]||(o[8]=[d("باشه",-1)])]),_:1})]),default:t(()=>[i.value?(s(),c("div",pe,[a(U,null,{default:t(()=>[a(p,{label:"مشتری"},{default:t(()=>[d(l(i.value.customer.fname)+" "+l(i.value.customer.lname),1)]),_:1}),a(p,{label:"تلفن همراه"},{default:t(()=>[d(l(i.value.customer.phone),1)]),_:1}),a(p,{label:"تاریخ ثبت"},{default:t(()=>[d(l(B(i.value.caj)),1)]),_:1}),a(p,{label:"وضعیت"},{default:t(()=>[d(l(i.value.sts_str),1)]),_:1})]),_:1}),a(I,{title:"آیتم های سفارش"},{default:t(()=>[(s(!0),c(V,null,X(i.value.items,(e,y)=>(s(),c("div",{key:y},[a(U,null,{default:t(()=>[a(p,{label:"نام محصول"},{default:t(()=>[a(f,{color:"blue"},{default:t(()=>[d(l(e.title),1)]),_:2},1024)]),_:2},1024),a(p,{label:"عنوان تنوع"},{default:t(()=>[d(l(e.variant_title),1)]),_:2},1024),a(p,{label:"وزن نهایی"},{default:t(()=>[a(f,{color:"red"},{default:t(()=>[d(l(e.grams),1)]),_:2},1024)]),_:2},1024),a(p,{label:"تعداد"},{default:t(()=>[a(f,{color:"orange"},{default:t(()=>[d(l(e.qty),1)]),_:2},1024)]),_:2},1024)]),_:2},1024),yC(p.icon)??k);function c(){u("click")}return(B,T)=>{const d=r("a-popconfirm"),f=r("a-tooltip");return t(),l("div",null,[_(f,{title:o.title},{default:s(()=>[o.popTitle?(t(),e(d,{key:0,"ok-text":"بله","cancel-text":"خیر",title:o.popTitle,onConfirm:c},{default:s(()=>[(t(),e(i(n.value),{class:a(["cursor-pointer",o.iconClass])},null,8,["class"]))]),_:1},8,["title"])):(t(),l("div",h,[(t(),e(i(n.value),{class:a(["cursor-pointer",o.iconClass]),onClick:c},null,8,["class"]))]))]),_:1},8,["title"])])}}});export{b as _}; +import{r as C}from"./icons-BaVxJrpa.js";import{U as k}from"./UnorderedListOutlined-CKa6XzC7.js";import{d as v,o as t,b as l,c as _,w as s,a as e,g as i,s as a,p as x,r}from"./index-CVG99b4v.js";const h={key:1},b=v({__name:"TooltipBtn",props:{title:{},popTitle:{},icon:{},iconClass:{default:"w-5 h-5"}},emits:["click"],setup(o,{emit:m}){const p=o,u=m,n=x(()=>C(p.icon)??k);function c(){u("click")}return(B,T)=>{const d=r("a-popconfirm"),f=r("a-tooltip");return t(),l("div",null,[_(f,{title:o.title},{default:s(()=>[o.popTitle?(t(),e(d,{key:0,"ok-text":"بله","cancel-text":"خیر",title:o.popTitle,onConfirm:c},{default:s(()=>[(t(),e(i(n.value),{class:a(["cursor-pointer",o.iconClass])},null,8,["class"]))]),_:1},8,["title"])):(t(),l("div",h,[(t(),e(i(n.value),{class:a(["cursor-pointer",o.iconClass]),onClick:c},null,8,["class"]))]))]),_:1},8,["title"])])}}});export{b as _}; diff --git a/apps/admin-panel/dist/assets/UnorderedListOutlined-CvD227Uu.js b/apps/admin-panel/dist/assets/UnorderedListOutlined-CKa6XzC7.js similarity index 97% rename from apps/admin-panel/dist/assets/UnorderedListOutlined-CvD227Uu.js rename to apps/admin-panel/dist/assets/UnorderedListOutlined-CKa6XzC7.js index 4234750..a9bd555 100644 --- a/apps/admin-panel/dist/assets/UnorderedListOutlined-CvD227Uu.js +++ b/apps/admin-panel/dist/assets/UnorderedListOutlined-CKa6XzC7.js @@ -1 +1 @@ -import{c as o,I as u}from"./index-WFQJAeoE.js";var s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372 0-89 31.3-170.8 83.5-234.8l523.3 523.3C682.8 852.7 601 884 512 884zm288.5-137.2L277.2 223.5C341.2 171.3 423 140 512 140c205.4 0 372 166.6 372 372 0 89-31.3 170.8-83.5 234.8z"}}]},name:"stop",theme:"outlined"};function c(r){for(var t=1;tdelete l[n]),e.fname||(l.fname=f),e.lname||(l.lname=f),e.mobile||(l.mobile=f),(e.ut===void 0||e.ut===null)&&(l.ut=f),!d&&!e.role&&(l.role=f),!d&&!e.password&&(l.password=f),e.password&&e.password!==e.password_confirmation&&(l.password_confirmation="رمز عبور و تأیید آن یکسان نیستند"),Object.keys(l).length===0}async function j(){var n,t;if(z())try{_.value=!0;const u={name:`${e.fname} ${e.lname}`.trim(),mobile:e.mobile,ut:e.ut};(!d||e.role!==void 0)&&(u.role=e.role),e.password&&(u.password=e.password),d?await c.put(`users/${d}`,u):await c.post("users",u),D.info("اطلاعات با موفقیت به ثبت رسید."),x?(O("success"),O("update:open",!1)):T.push("/user/list")}catch(u){D.error(((t=(n=u==null?void 0:u.response)==null?void 0:n.data)==null?void 0:t.message)??"خطا در ثبت اطلاعات.")}finally{_.value=!1}}return G(async()=>{try{const[{data:n},{data:t}]=await Promise.all([c.get("const/__list__ut"),c.get("admin/users/role-options")]);B.value=n,$.value=t}catch(n){console.log(n)}if(d)try{const{data:n}=await c.get(`admin/users/${d}`),t=String(n.name??"").trim().split(" ");Object.assign(e,{fname:t[0]??"",lname:t.slice(1).join(" "),mobile:n.mobile??"",ut:n.ut??void 0,role:n.role??void 0,password:"",password_confirmation:""})}catch(n){console.log(n)}}),(n,t)=>{const u=p("a-input"),r=p("a-form-item"),w=p("a-select-option"),y=p("a-select"),g=p("a-input-password"),A=p("a-button"),L=p("a-card"),P=p("a-form"),Q=p("a-spin");return x?(i(),v(W,{key:0,open:!!E.open,id:U(d),"add-title":"افزودن مدیر","edit-title":"ویرایش مدیر",loading:_.value,submitting:_.value,"onUpdate:open":t[7]||(t[7]=a=>n.$emit("update:open",a)),onSubmit:j},{default:s(()=>[V("div",Y,[o(r,{label:"نام","validate-status":l.fname?"error":"",help:l.fname},{default:s(()=>[o(u,{value:e.fname,"onUpdate:value":t[0]||(t[0]=a=>e.fname=a)},null,8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"نام خانوادگی","validate-status":l.lname?"error":"",help:l.lname},{default:s(()=>[o(u,{value:e.lname,"onUpdate:value":t[1]||(t[1]=a=>e.lname=a)},null,8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"شماره موبایل","validate-status":l.mobile?"error":"",help:l.mobile},{default:s(()=>[o(u,{value:e.mobile,"onUpdate:value":t[2]||(t[2]=a=>e.mobile=a)},null,8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"نوع کاربری","validate-status":l.ut?"error":"",help:l.ut},{default:s(()=>[o(y,{value:e.ut,"onUpdate:value":t[3]||(t[3]=a=>e.ut=a),"allow-clear":"",placeholder:"انتخاب کنید"},{default:s(()=>[(i(!0),m(k,null,h(B.value,a=>(i(),v(w,{key:a.id,value:a.id},{default:s(()=>[b(C(a.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"نقش","validate-status":l.role?"error":"",help:l.role},{default:s(()=>[o(y,{value:e.role,"onUpdate:value":t[4]||(t[4]=a=>e.role=a),placeholder:"انتخاب کنید"},{default:s(()=>[(i(!0),m(k,null,h($.value,a=>(i(),v(w,{key:a.value,value:a.value},{default:s(()=>[b(C(a.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"رمز عبور","validate-status":l.password?"error":"",help:l.password},{default:s(()=>[o(g,{value:e.password,"onUpdate:value":t[5]||(t[5]=a=>e.password=a)},null,8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"تأیید رمز عبور","validate-status":l.password_confirmation?"error":"",help:l.password_confirmation},{default:s(()=>[o(g,{value:e.password_confirmation,"onUpdate:value":t[6]||(t[6]=a=>e.password_confirmation=a)},null,8,["value"])]),_:1},8,["validate-status","help"])]),U(d)?(i(),m("p",Z,"برای تغییر ندادن رمز عبور، هر دو فیلد رمز را خالی بگذارید.")):M("",!0)]),_:1},8,["open","id","loading","submitting"])):(i(),v(Q,{key:1,spinning:_.value},{default:s(()=>[o(P,{layout:"vertical",onSubmit:J(j,["prevent"])},{default:s(()=>[o(L,{title:U(d)?"ویرایش مدیر":"افزودن مدیر",class:"mb-base"},{default:s(()=>[V("div",ee,[o(r,{label:"نام","validate-status":l.fname?"error":"",help:l.fname},{default:s(()=>[o(u,{value:e.fname,"onUpdate:value":t[8]||(t[8]=a=>e.fname=a)},null,8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"نام خانوادگی","validate-status":l.lname?"error":"",help:l.lname},{default:s(()=>[o(u,{value:e.lname,"onUpdate:value":t[9]||(t[9]=a=>e.lname=a)},null,8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"شماره موبایل","validate-status":l.mobile?"error":"",help:l.mobile},{default:s(()=>[o(u,{value:e.mobile,"onUpdate:value":t[10]||(t[10]=a=>e.mobile=a)},null,8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"نوع کاربری","validate-status":l.ut?"error":"",help:l.ut},{default:s(()=>[o(y,{value:e.ut,"onUpdate:value":t[11]||(t[11]=a=>e.ut=a),"allow-clear":"",placeholder:"انتخاب کنید"},{default:s(()=>[(i(!0),m(k,null,h(B.value,a=>(i(),v(w,{key:a.id,value:a.id},{default:s(()=>[b(C(a.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"نقش","validate-status":l.role?"error":"",help:l.role},{default:s(()=>[o(y,{value:e.role,"onUpdate:value":t[12]||(t[12]=a=>e.role=a),placeholder:"انتخاب کنید"},{default:s(()=>[(i(!0),m(k,null,h($.value,a=>(i(),v(w,{key:a.value,value:a.value},{default:s(()=>[b(C(a.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"رمز عبور","validate-status":l.password?"error":"",help:l.password},{default:s(()=>[o(g,{value:e.password,"onUpdate:value":t[13]||(t[13]=a=>e.password=a)},null,8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"تأیید رمز عبور","validate-status":l.password_confirmation?"error":"",help:l.password_confirmation},{default:s(()=>[o(g,{value:e.password_confirmation,"onUpdate:value":t[14]||(t[14]=a=>e.password_confirmation=a)},null,8,["value"])]),_:1},8,["validate-status","help"])]),U(d)?(i(),m("p",ae,"برای تغییر ندادن رمز عبور، هر دو فیلد رمز را خالی بگذارید.")):M("",!0),o(A,{type:"primary",onClick:j},{default:s(()=>[...t[15]||(t[15]=[b("ثبت اطلاعات",-1)])]),_:1})]),_:1},8,["title"])]),_:1})]),_:1},8,["spinning"]))}}}),ne=X(te,[["__scopeId","data-v-f7b98cc8"]]);export{ne as default}; +import{d as q,v as G,x as c,a as v,w as s,h as U,j as H,l as S,y as R,r as p,o as i,n as V,c as o,b as m,e as h,F as k,i as M,f as b,A as J,z as D,k as K,t as C}from"./index-CVG99b4v.js";import{_ as W}from"./BaseFormModal.vue_vue_type_script_setup_true_lang-CWur6xTz.js";import{_ as X}from"./_plugin-vue_export-helper-DlAUqK2U.js";const Y={class:"grid-3"},Z={key:0,class:"hint"},ee={class:"grid-3"},ae={key:0,class:"hint"},f="لطفا مقدار را وارد کنید",te=q({__name:"UserCreate",props:{open:{type:Boolean},id:{}},emits:["update:open","success"],setup(E,{emit:F}){const N=E,O=F,x=N.open!==void 0,I=H(),T=K(),d=x?N.id:I.params.id,_=S(!1),B=S([]),$=S([]),e=R({fname:"",lname:"",mobile:"",ut:void 0,role:void 0,password:"",password_confirmation:""}),l=R({});function z(){return Object.keys(l).forEach(n=>delete l[n]),e.fname||(l.fname=f),e.lname||(l.lname=f),e.mobile||(l.mobile=f),(e.ut===void 0||e.ut===null)&&(l.ut=f),!d&&!e.role&&(l.role=f),!d&&!e.password&&(l.password=f),e.password&&e.password!==e.password_confirmation&&(l.password_confirmation="رمز عبور و تأیید آن یکسان نیستند"),Object.keys(l).length===0}async function j(){var n,t;if(z())try{_.value=!0;const u={name:`${e.fname} ${e.lname}`.trim(),mobile:e.mobile,ut:e.ut};(!d||e.role!==void 0)&&(u.role=e.role),e.password&&(u.password=e.password),d?await c.put(`users/${d}`,u):await c.post("users",u),D.info("اطلاعات با موفقیت به ثبت رسید."),x?(O("success"),O("update:open",!1)):T.push("/user/list")}catch(u){D.error(((t=(n=u==null?void 0:u.response)==null?void 0:n.data)==null?void 0:t.message)??"خطا در ثبت اطلاعات.")}finally{_.value=!1}}return G(async()=>{try{const[{data:n},{data:t}]=await Promise.all([c.get("const/__list__ut"),c.get("admin/users/role-options")]);B.value=n,$.value=t}catch(n){console.log(n)}if(d)try{const{data:n}=await c.get(`admin/users/${d}`),t=String(n.name??"").trim().split(" ");Object.assign(e,{fname:t[0]??"",lname:t.slice(1).join(" "),mobile:n.mobile??"",ut:n.ut??void 0,role:n.role??void 0,password:"",password_confirmation:""})}catch(n){console.log(n)}}),(n,t)=>{const u=p("a-input"),r=p("a-form-item"),w=p("a-select-option"),y=p("a-select"),g=p("a-input-password"),A=p("a-button"),L=p("a-card"),P=p("a-form"),Q=p("a-spin");return x?(i(),v(W,{key:0,open:!!E.open,id:U(d),"add-title":"افزودن مدیر","edit-title":"ویرایش مدیر",loading:_.value,submitting:_.value,"onUpdate:open":t[7]||(t[7]=a=>n.$emit("update:open",a)),onSubmit:j},{default:s(()=>[V("div",Y,[o(r,{label:"نام","validate-status":l.fname?"error":"",help:l.fname},{default:s(()=>[o(u,{value:e.fname,"onUpdate:value":t[0]||(t[0]=a=>e.fname=a)},null,8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"نام خانوادگی","validate-status":l.lname?"error":"",help:l.lname},{default:s(()=>[o(u,{value:e.lname,"onUpdate:value":t[1]||(t[1]=a=>e.lname=a)},null,8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"شماره موبایل","validate-status":l.mobile?"error":"",help:l.mobile},{default:s(()=>[o(u,{value:e.mobile,"onUpdate:value":t[2]||(t[2]=a=>e.mobile=a)},null,8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"نوع کاربری","validate-status":l.ut?"error":"",help:l.ut},{default:s(()=>[o(y,{value:e.ut,"onUpdate:value":t[3]||(t[3]=a=>e.ut=a),"allow-clear":"",placeholder:"انتخاب کنید"},{default:s(()=>[(i(!0),m(k,null,h(B.value,a=>(i(),v(w,{key:a.id,value:a.id},{default:s(()=>[b(C(a.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"نقش","validate-status":l.role?"error":"",help:l.role},{default:s(()=>[o(y,{value:e.role,"onUpdate:value":t[4]||(t[4]=a=>e.role=a),placeholder:"انتخاب کنید"},{default:s(()=>[(i(!0),m(k,null,h($.value,a=>(i(),v(w,{key:a.value,value:a.value},{default:s(()=>[b(C(a.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"رمز عبور","validate-status":l.password?"error":"",help:l.password},{default:s(()=>[o(g,{value:e.password,"onUpdate:value":t[5]||(t[5]=a=>e.password=a)},null,8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"تأیید رمز عبور","validate-status":l.password_confirmation?"error":"",help:l.password_confirmation},{default:s(()=>[o(g,{value:e.password_confirmation,"onUpdate:value":t[6]||(t[6]=a=>e.password_confirmation=a)},null,8,["value"])]),_:1},8,["validate-status","help"])]),U(d)?(i(),m("p",Z,"برای تغییر ندادن رمز عبور، هر دو فیلد رمز را خالی بگذارید.")):M("",!0)]),_:1},8,["open","id","loading","submitting"])):(i(),v(Q,{key:1,spinning:_.value},{default:s(()=>[o(P,{layout:"vertical",onSubmit:J(j,["prevent"])},{default:s(()=>[o(L,{title:U(d)?"ویرایش مدیر":"افزودن مدیر",class:"mb-base"},{default:s(()=>[V("div",ee,[o(r,{label:"نام","validate-status":l.fname?"error":"",help:l.fname},{default:s(()=>[o(u,{value:e.fname,"onUpdate:value":t[8]||(t[8]=a=>e.fname=a)},null,8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"نام خانوادگی","validate-status":l.lname?"error":"",help:l.lname},{default:s(()=>[o(u,{value:e.lname,"onUpdate:value":t[9]||(t[9]=a=>e.lname=a)},null,8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"شماره موبایل","validate-status":l.mobile?"error":"",help:l.mobile},{default:s(()=>[o(u,{value:e.mobile,"onUpdate:value":t[10]||(t[10]=a=>e.mobile=a)},null,8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"نوع کاربری","validate-status":l.ut?"error":"",help:l.ut},{default:s(()=>[o(y,{value:e.ut,"onUpdate:value":t[11]||(t[11]=a=>e.ut=a),"allow-clear":"",placeholder:"انتخاب کنید"},{default:s(()=>[(i(!0),m(k,null,h(B.value,a=>(i(),v(w,{key:a.id,value:a.id},{default:s(()=>[b(C(a.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"نقش","validate-status":l.role?"error":"",help:l.role},{default:s(()=>[o(y,{value:e.role,"onUpdate:value":t[12]||(t[12]=a=>e.role=a),placeholder:"انتخاب کنید"},{default:s(()=>[(i(!0),m(k,null,h($.value,a=>(i(),v(w,{key:a.value,value:a.value},{default:s(()=>[b(C(a.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"رمز عبور","validate-status":l.password?"error":"",help:l.password},{default:s(()=>[o(g,{value:e.password,"onUpdate:value":t[13]||(t[13]=a=>e.password=a)},null,8,["value"])]),_:1},8,["validate-status","help"]),o(r,{label:"تأیید رمز عبور","validate-status":l.password_confirmation?"error":"",help:l.password_confirmation},{default:s(()=>[o(g,{value:e.password_confirmation,"onUpdate:value":t[14]||(t[14]=a=>e.password_confirmation=a)},null,8,["value"])]),_:1},8,["validate-status","help"])]),U(d)?(i(),m("p",ae,"برای تغییر ندادن رمز عبور، هر دو فیلد رمز را خالی بگذارید.")):M("",!0),o(A,{type:"primary",onClick:j},{default:s(()=>[...t[15]||(t[15]=[b("ثبت اطلاعات",-1)])]),_:1})]),_:1},8,["title"])]),_:1})]),_:1},8,["spinning"]))}}}),ne=X(te,[["__scopeId","data-v-f7b98cc8"]]);export{ne as default}; diff --git a/apps/admin-panel/dist/assets/UserEdit-BRCMnrb_.js b/apps/admin-panel/dist/assets/UserEdit-BRCMnrb_.js deleted file mode 100644 index 17ca801..0000000 --- a/apps/admin-panel/dist/assets/UserEdit-BRCMnrb_.js +++ /dev/null @@ -1 +0,0 @@ -import e from"./UserCreate-DUjELXD2.js";import{d as r,a as o,o as t}from"./index-WFQJAeoE.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const i=r({__name:"UserEdit",setup(a){return(p,s)=>(t(),o(e))}});export{i as default}; diff --git a/apps/admin-panel/dist/assets/UserEdit-CsC3QweV.js b/apps/admin-panel/dist/assets/UserEdit-CsC3QweV.js new file mode 100644 index 0000000..90e1235 --- /dev/null +++ b/apps/admin-panel/dist/assets/UserEdit-CsC3QweV.js @@ -0,0 +1 @@ +import e from"./UserCreate-B8VEprZ-.js";import{d as r,a as o,o as t}from"./index-CVG99b4v.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-CWur6xTz.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const i=r({__name:"UserEdit",setup(a){return(p,s)=>(t(),o(e))}});export{i as default}; diff --git a/apps/admin-panel/dist/assets/ViewOmdeCustomer-tXpdhZ3s.js b/apps/admin-panel/dist/assets/ViewOmdeCustomer-CEMT-stS.js similarity index 51% rename from apps/admin-panel/dist/assets/ViewOmdeCustomer-tXpdhZ3s.js rename to apps/admin-panel/dist/assets/ViewOmdeCustomer-CEMT-stS.js index 134fba0..df102c7 100644 --- a/apps/admin-panel/dist/assets/ViewOmdeCustomer-tXpdhZ3s.js +++ b/apps/admin-panel/dist/assets/ViewOmdeCustomer-CEMT-stS.js @@ -1 +1 @@ -import{C as t}from"./CustomerDetail-KvHUPLoN.js";import{d as e,a as o,o as r}from"./index-WFQJAeoE.js";import"./filters-C1cWKkpl.js";import"./index-1e_FodC0.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const _=e({__name:"ViewOmdeCustomer",setup(a){return(s,m)=>(r(),o(t,{title:"مشاهده اطلاعات مشتری عمده","show-activity":!0,"show-wallet":!1}))}});export{_ as default}; +import{C as t}from"./CustomerDetail-mSM31qkb.js";import{d as e,a as o,o as r}from"./index-CVG99b4v.js";import"./filters-UavLT20t.js";import"./index-pLFqZCCf.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const _=e({__name:"ViewOmdeCustomer",setup(a){return(s,m)=>(r(),o(t,{title:"مشاهده اطلاعات مشتری عمده","show-activity":!0,"show-wallet":!1}))}});export{_ as default}; diff --git a/apps/admin-panel/dist/assets/ViewSingleCustomer-eLMOFTWp.js b/apps/admin-panel/dist/assets/ViewSingleCustomer-Bds0ovBG.js similarity index 50% rename from apps/admin-panel/dist/assets/ViewSingleCustomer-eLMOFTWp.js rename to apps/admin-panel/dist/assets/ViewSingleCustomer-Bds0ovBG.js index e596456..188dd77 100644 --- a/apps/admin-panel/dist/assets/ViewSingleCustomer-eLMOFTWp.js +++ b/apps/admin-panel/dist/assets/ViewSingleCustomer-Bds0ovBG.js @@ -1 +1 @@ -import{C as t}from"./CustomerDetail-KvHUPLoN.js";import{d as e,a as o,o as r}from"./index-WFQJAeoE.js";import"./filters-C1cWKkpl.js";import"./index-1e_FodC0.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const _=e({__name:"ViewSingleCustomer",setup(a){return(s,i)=>(r(),o(t,{title:"مشاهده اطلاعات مشتری","show-wallet":!0,"show-activity":!1}))}});export{_ as default}; +import{C as t}from"./CustomerDetail-mSM31qkb.js";import{d as e,a as o,o as r}from"./index-CVG99b4v.js";import"./filters-UavLT20t.js";import"./index-pLFqZCCf.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const _=e({__name:"ViewSingleCustomer",setup(a){return(s,i)=>(r(),o(t,{title:"مشاهده اطلاعات مشتری","show-wallet":!0,"show-activity":!1}))}});export{_ as default}; diff --git a/apps/admin-panel/dist/assets/accounting-BE_fZsW1.css b/apps/admin-panel/dist/assets/accounting-BE_fZsW1.css new file mode 100644 index 0000000..d1c6256 --- /dev/null +++ b/apps/admin-panel/dist/assets/accounting-BE_fZsW1.css @@ -0,0 +1 @@ +.conn[data-v-71c6f49f]{max-width:920px}.mt[data-v-71c6f49f]{margin-top:12px}.help[data-v-71c6f49f]{font-size:12px;color:#00000080;margin-top:4px;line-height:1.8}.link[data-v-71c6f49f]{margin-inline-start:8px;cursor:pointer}.text-danger[data-v-71c6f49f]{color:#cf1322}.ltr[data-v-71c6f49f],.ltr[data-v-71c6f49f] input,.ltr[data-v-71c6f49f] textarea{direction:ltr;text-align:left}.mono[data-v-71c6f49f]{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;word-break:break-all}.status[data-v-71c6f49f]{display:flex;gap:14px;align-items:flex-start;padding:16px 18px;border-radius:10px;border:1px solid;margin-bottom:24px}.status__icon[data-v-71c6f49f]{font-size:22px;margin-top:2px}.status__title[data-v-71c6f49f]{font-weight:700;font-size:15px}.status__tag[data-v-71c6f49f]{margin-inline-start:8px;font-weight:400}.status__text[data-v-71c6f49f]{font-size:13px;margin-top:4px;color:#000000a6;overflow-wrap:anywhere}.status__rows[data-v-71c6f49f]{margin-top:6px}.latin[data-v-71c6f49f],.mono[data-v-71c6f49f]{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;unicode-bidi:isolate}.status--ok[data-v-71c6f49f]{background:#f6ffed;border-color:#b7eb8f}.status--ok .status__icon[data-v-71c6f49f]{color:#52c41a}.status--bad[data-v-71c6f49f]{background:#fff2f0;border-color:#ffccc7}.status--bad .status__icon[data-v-71c6f49f]{color:#ff4d4f}.status--off[data-v-71c6f49f]{background:#fafafa;border-color:#f0f0f0}.status--off .status__icon[data-v-71c6f49f]{color:#bfbfbf}.step[data-v-71c6f49f]{padding:4px 0 24px;margin-bottom:20px;border-bottom:1px solid #f0f0f0}.step__title[data-v-71c6f49f]{display:flex;align-items:center;gap:10px;font-size:15px;font-weight:700;margin:0 0 14px}.step__no[data-v-71c6f49f]{display:inline-grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#1f2a5c;color:#fff;font-size:13px}.step__lead[data-v-71c6f49f]{margin:-4px 0 14px;color:#0009;font-size:13px;line-height:1.9}.choices[data-v-71c6f49f]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.choice[data-v-71c6f49f]{display:grid;grid-template-columns:auto 1fr;gap:4px 10px;text-align:start;padding:14px 16px;border:1px solid #d9d9d9;border-radius:10px;background:#fff;cursor:pointer;font:inherit;transition:border-color .15s,box-shadow .15s}.choice[data-v-71c6f49f]:hover{border-color:#8c9bd1}.choice[data-v-71c6f49f]:focus-visible{outline:2px solid #1f2a5c;outline-offset:2px}.choice--on[data-v-71c6f49f]{border-color:#1f2a5c;box-shadow:0 0 0 1px #1f2a5c;background:#f5f7ff}.choice__dot[data-v-71c6f49f]{grid-row:span 2;width:16px;height:16px;margin-top:3px;border-radius:50%;border:2px solid #bfbfbf}.choice--on .choice__dot[data-v-71c6f49f]{border:5px solid #1f2a5c}.choice__name[data-v-71c6f49f]{font-weight:700}.choice__tag[data-v-71c6f49f]{margin-inline-start:6px;font-weight:400}.choice__desc[data-v-71c6f49f]{font-size:12px;color:#0000008c}.grid[data-v-71c6f49f]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:16px}.grid__full[data-v-71c6f49f]{grid-column:1 / -1}.advanced[data-v-71c6f49f]{margin-top:4px}.advanced[data-v-71c6f49f] .ant-collapse-header{padding-inline:0!important;color:#0009}.token[data-v-71c6f49f]{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:10px 12px;border:1px solid #f0f0f0;border-radius:8px;background:#fafafa}.token__icon[data-v-71c6f49f]{color:#52c41a}.token__actions[data-v-71c6f49f]{margin-inline-start:auto}.cert[data-v-71c6f49f]{display:flex;align-items:flex-start;gap:14px;padding:14px 16px;border:1px solid #f0f0f0;border-radius:10px;background:#fafafa}.cert--ok[data-v-71c6f49f]{background:#f6ffed;border-color:#d9f7be}.cert--ask[data-v-71c6f49f]{background:#fffbe6;border-color:#ffe58f}.cert__icon[data-v-71c6f49f]{font-size:22px;color:#52c41a;margin-top:2px}.cert--ask .cert__icon[data-v-71c6f49f]{color:#faad14}.cert__icon--muted[data-v-71c6f49f]{color:#bfbfbf}.cert__body[data-v-71c6f49f]{flex:1;min-width:0}.cert__title[data-v-71c6f49f]{font-weight:700;display:flex;align-items:center;gap:8px}.cert__actions[data-v-71c6f49f]{flex-shrink:0}.kv[data-v-71c6f49f]{display:grid;grid-template-columns:max-content 1fr;gap:4px 14px;margin:8px 0 0;font-size:12.5px}.kv dt[data-v-71c6f49f]{color:#00000080}.kv dd[data-v-71c6f49f]{margin:0;text-align:start}.kv dd[dir=ltr][data-v-71c6f49f]{text-align:right}.bar[data-v-71c6f49f]{position:sticky;bottom:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;background:#fff;border-top:1px solid #f0f0f0}.bar__note[data-v-71c6f49f]{font-size:12px;color:#00000080}@media (max-width: 760px){.choices[data-v-71c6f49f],.grid[data-v-71c6f49f]{grid-template-columns:1fr}.cert[data-v-71c6f49f]{flex-wrap:wrap}}.mb-4[data-v-fc1e6b50]{margin-bottom:1rem}.mt-4[data-v-fc1e6b50]{margin-top:1rem}.w-full[data-v-fc1e6b50]{width:100%}.hint[data-v-fc1e6b50]{font-size:12px;color:#888;margin-top:4px}.warn[data-v-fc1e6b50]{color:#d4380d}.ok[data-v-fc1e6b50]{color:#389e0d}.small[data-v-fc1e6b50]{font-size:12px}.link[data-v-fc1e6b50]{margin-inline-start:8px;cursor:pointer}pre[data-v-fc1e6b50]{max-height:260px;overflow:auto;background:#00000008;padding:8px;font-size:11px;white-space:pre-wrap;word-break:break-all} diff --git a/apps/admin-panel/dist/assets/accounting-CmNZ3SSJ.js b/apps/admin-panel/dist/assets/accounting-CmNZ3SSJ.js new file mode 100644 index 0000000..5041f1b --- /dev/null +++ b/apps/admin-panel/dist/assets/accounting-CmNZ3SSJ.js @@ -0,0 +1 @@ +import{m as qe}from"./index-pLFqZCCf.js";import{c as a,I as pt,d as mt,m as Je,o as n,b as c,n as o,a as O,g as xt,f as v,t as m,w as l,i as y,F as D,e as we,s as Ge,h as Ue,B as Nt,p as $,y as le,l as U,x as A,z as B,r as _,C as dt,G as Ut,u as Tt,v as Dt}from"./index-CVG99b4v.js";import{S as Ke}from"./SafetyCertificateOutlined-C5Qh-j2p.js";import{_ as ft}from"./_plugin-vue_export-helper-DlAUqK2U.js";var It={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 464h-68V240c0-70.7-57.3-128-128-128H388c-70.7 0-128 57.3-128 128v224h-68c-17.7 0-32 14.3-32 32v384c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V496c0-17.7-14.3-32-32-32zM332 240c0-30.9 25.1-56 56-56h248c30.9 0 56 25.1 56 56v224H332V240zm460 600H232V536h560v304zM484 701v53c0 4.4 3.6 8 8 8h40c4.4 0 8-3.6 8-8v-53a48.01 48.01 0 10-56 0z"}}]},name:"lock",theme:"outlined"};function vt(f){for(var x=1;xd.form.provider==="none"?null:d.form.provider),J=$(()=>{var r;return((r=d.overview)==null?void 0:r.config)??null}),F=r=>{var e;return(e=J.value)==null?void 0:e[r]},se=$(()=>{var r;return!!(i.value&&((r=F(i.value))!=null&&r.tokenSet))}),h=$(()=>!!i.value&&/^https:\/\//i.test(d.form[i.value].baseUrl||"")),p=(r,e)=>{var C,k,N,I,ee;return JSON.stringify(e==="none"?{provider:e}:{provider:e,baseUrl:((C=r[e])==null?void 0:C.baseUrl)??"",caCert:((k=r[e])==null?void 0:k.caCert)??"",timeoutMs:(N=r[e])==null?void 0:N.timeoutMs,dbName:e==="tahesab"?(I=r.tahesab)==null?void 0:I.dbName:void 0,balanceOwesWhen:e==="zarrin"?(ee=r.zarrin)==null?void 0:ee.balanceOwesWhen:void 0})},Q=$(()=>{var r;return J.value?d.form.provider!==J.value.provider?!0:i.value?p(d.form,i.value)!==p(J.value,i.value)||!!((r=d.tokens[i.value])!=null&&r.trim()):!1:!1}),Te=$(()=>!!J.value&&J.value.provider!=="none"&&J.value.provider!==d.form.provider),ce=r=>r?qe(r).format("jYYYY/jMM/jDD ساعت HH:mm"):"",G=$(()=>{const r=d.overview;if(!r)return{tone:"off",icon:Le,title:"…",text:"",rows:[]};const e=r.config;if(e.provider==="none")return{tone:"off",icon:Le,title:"اتصال خاموش است",text:"هیچ اطلاعاتی با نرم‌افزار حسابداری رد و بدل نمی‌شود."};const C=R[e.provider];if(r.inactiveReason)return{tone:"bad",icon:dt,title:`اتصال به ${C} کار نمی‌کند`,text:r.inactiveReason};const k=r.realtime;if(k!=null&&k.lastError)return{tone:"bad",icon:dt,title:`${C}: ارتباط برقرار نیست`,text:k.lastError};const I=[{label:"آدرس",value:e[e.provider].baseUrl,ltr:!0}];return e.provider==="tahesab"&&I.push({label:"دیتابیس",value:e.tahesab.dbName,ltr:!0}),k!=null&&k.lastOkAt&&I.push({label:"آخرین ارتباط موفق",value:ce(k.lastOkAt)}),{tone:"ok",icon:Ut,title:`متصل به ${C}`,text:"",rows:I}}),Z=le({tahesab:!1,zarrin:!1});function pe(){i.value&&(d.tokens[i.value]="",Z[i.value]=!1)}Je(()=>d.overview,()=>{Z.tahesab=!1,Z.zarrin=!1,S.value=null});const me=$({get:()=>i.value?Math.round((d.form[i.value].timeoutMs??2e4)/1e3):20,set:r=>{i.value&&(d.form[i.value].timeoutMs=Math.max(3,Math.min(120,Number(r)||20))*1e3)}}),Y=U(!1),S=U(null),fe=r=>{var e;return((e=r.match(/CN=([^\n,]+)/))==null?void 0:e[1])??r.replace(/\n/g,", ")},ne=r=>r?qe(new Date(r)).format("jYYYY/jMM/jDD"):"—",oe=$(()=>{var r;return!!i.value&&(d.form[i.value].caCert||"")!==(((r=F(i.value))==null?void 0:r.caCert)||"")}),H=$(()=>{var r;return i.value?oe.value?S.value&&S.value.pem===d.form[i.value].caCert?S.value:null:((r=F(i.value))==null?void 0:r.caInfo)??null:null});async function ie(){var r,e;if(i.value){Y.value=!0;try{const{data:C}=await A.post("admin/accounting/certificate",{baseUrl:d.form[i.value].baseUrl});S.value=C,d.form[i.value].caCert&&C.pem.trim()===d.form[i.value].caCert.trim()?B.success("گواهی سرور همان گواهی تأییدشده است"):d.form[i.value].caCert&&(d.form[i.value].caCert="")}catch(C){B.error(((e=(r=C==null?void 0:C.response)==null?void 0:r.data)==null?void 0:e.message)??"گواهی دریافت نشد")}finally{Y.value=!1}}}function X(){!i.value||!S.value||(d.form[i.value].caCert=S.value.pem)}const be=U(!1),j=U(null),De=U(""),Ie=()=>i.value?JSON.stringify([d.form.provider,d.form[i.value],d.tokens[i.value]]):"",$e=$(()=>!!j.value&&De.value!==Ie()),Be=$(()=>{var r;return!!i.value&&!!d.form[i.value].baseUrl&&(se.value||!!((r=d.tokens[i.value])!=null&&r.trim()))});Je(i,()=>j.value=null);async function re(){var e,C;if(!i.value)return;const r=i.value;be.value=!0;try{const k={baseUrl:d.form[r].baseUrl,timeoutMs:d.form[r].timeoutMs,caCert:d.form[r].caCert,token:d.tokens[r]||void 0};r==="tahesab"?k.dbName=d.form.tahesab.dbName:k.balanceOwesWhen=d.form.zarrin.balanceOwesWhen,De.value=Ie();const{data:N}=await A.post("admin/accounting/test",{provider:r,connection:k});j.value=N}catch(k){const N=(C=(e=k==null?void 0:k.response)==null?void 0:e.data)==null?void 0:C.message;j.value={ok:!1,error:Array.isArray(N)?N.join("، "):N??"خطا در تست اتصال"}}finally{be.value=!1}}const Ve={version:{label:"نسخه",ltr:!0},dbType:{label:"نوع دیتابیس",ltr:!0},dbName:{label:"دیتابیس",ltr:!0},customerGroups:{label:"گروه‌های حساب"},message:{label:"پیام سرور"}},K=$(()=>{var C,k;const r=((C=j.value)==null?void 0:C.info)??{},e=Object.entries(Ve).filter(([N])=>r[N]!==void 0&&r[N]!==null&&r[N]!=="").map(([N,I])=>({label:I.label,value:String(r[N]),ltr:I.ltr}));return e.push({label:"زمان پاسخ",value:`${(((k=j.value)==null?void 0:k.ms)??0).toLocaleString("fa-IR")} میلی‌ثانیه`,ltr:!1}),e}),Ee=$(()=>{var r,e;return i.value==="tahesab"&&!!((e=(r=j.value)==null?void 0:r.info)!=null&&e.dbName)&&String(j.value.info.dbName).toLowerCase()!==String(d.form.tahesab.dbName||"").toLowerCase()});return(r,e)=>{var Se,Re,te;const C=_("a-tag"),k=_("a-alert"),N=_("a-input"),I=_("a-form-item"),ee=_("a-select-option"),Oe=_("a-select"),L=_("a-button"),he=_("a-popconfirm"),V=_("a-space"),Me=_("a-input-password"),q=_("a-form"),ze=_("a-input-number"),ue=_("a-collapse-panel"),_e=_("a-collapse"),We=_("a-textarea");return n(),c("div",Rt,[o("div",{class:Ge(["status",`status--${G.value.tone}`])},[(n(),O(xt(G.value.icon),{class:"status__icon"})),o("div",jt,[o("div",At,[v(m(G.value.title)+" ",1),Q.value?(n(),O(C,{key:0,color:"orange",class:"status__tag"},{default:l(()=>[...e[11]||(e[11]=[v("تغییرات ذخیره نشده",-1)])]),_:1})):y("",!0)]),G.value.text?(n(),c("div",Gt,m(G.value.text),1)):y("",!0),(Se=G.value.rows)!=null&&Se.length?(n(),c("dl",Lt,[(n(!0),c(D,null,we(G.value.rows,b=>(n(),c(D,{key:b.label},[o("dt",null,m(b.label),1),o("dd",{dir:b.ltr?"ltr":void 0,class:Ge({latin:b.ltr})},m(b.value),11,Pt)],64))),128))])):y("",!0)])],2),o("section",Bt,[e[14]||(e[14]=o("h3",{class:"step__title"},[o("span",{class:"step__no"},"۱"),v("نرم‌افزار حسابداری")],-1)),o("div",Vt,[(n(),c(D,null,we(Pe,b=>o("button",{key:b.value,type:"button",role:"radio","aria-checked":f.form.provider===b.value,class:Ge(["choice",{"choice--on":f.form.provider===b.value}]),onClick:ye=>f.form.provider=b.value},[e[13]||(e[13]=o("span",{class:"choice__dot"},null,-1)),o("span",Ft,[v(m(b.label)+" ",1),b.value==="zarrin"?(n(),O(C,{key:0,color:"gold",class:"choice__tag"},{default:l(()=>[...e[12]||(e[12]=[v("آزموده‌نشده",-1)])]),_:1})):y("",!0)]),o("span",Yt,m(b.desc),1)],10,Wt)),64))]),Te.value?(n(),O(k,{key:0,class:"mt",type:"info","show-icon":"",message:"با ذخیره، نرم‌افزار عوض می‌شود",description:"کارهای در صف نرم‌افزار قبلی متوقف می‌مانند (پاک نمی‌شوند) و لینک‌های هر نرم‌افزار جدا نگه داشته می‌شوند؛ برگشت بی‌خطر است."})):y("",!0)]),i.value?(n(),c(D,{key:0},[o("section",Ht,[o("h3",Kt,[e[15]||(e[15]=o("span",{class:"step__no"},"۲",-1)),v("اطلاعات اتصال به "+m(R[i.value]),1)]),a(q,{layout:"vertical",class:"grid"},{default:l(()=>[a(I,{label:"آدرس وب‌سرویس",required:""},{default:l(()=>[a(N,{value:f.form[i.value].baseUrl,"onUpdate:value":e[0]||(e[0]=b=>f.form[i.value].baseUrl=b),dir:"ltr",class:"ltr",placeholder:i.value==="tahesab"?"https://192.168.1.10:8081":"http://192.168.1.10:8000/ZarrinService/accounting"},null,8,["value","placeholder"]),o("div",qt,"آدرسی که وب‌سرویس "+m(R[i.value])+" روی آن در دسترس است، با پورت.",1)]),_:1}),i.value==="tahesab"?(n(),O(I,{key:0,label:"نام دیتابیس (DBname)",required:""},{default:l(()=>[a(N,{value:f.form.tahesab.dbName,"onUpdate:value":e[1]||(e[1]=b=>f.form.tahesab.dbName=b),dir:"ltr",class:"ltr",placeholder:"TahesabDB"},null,8,["value"]),e[16]||(e[16]=o("div",{class:"help"},"نام دقیق دیتابیس همین شرکت. یک سرور ممکن است چند دیتابیس داشته باشد؛ بعد از تست، نام را در نتیجه چک کنید.",-1))]),_:1})):(n(),O(I,{key:1,label:"علامت مانده‌ی بدهکار"},{default:l(()=>[a(Oe,{value:f.form.zarrin.balanceOwesWhen,"onUpdate:value":e[2]||(e[2]=b=>f.form.zarrin.balanceOwesWhen=b)},{default:l(()=>[a(ee,{value:"negative"},{default:l(()=>[...e[17]||(e[17]=[v("منفی یعنی بدهکار",-1)])]),_:1}),a(ee,{value:"positive"},{default:l(()=>[...e[18]||(e[18]=[v("مثبت یعنی بدهکار",-1)])]),_:1})]),_:1},8,["value"]),e[19]||(e[19]=o("div",{class:"help"},"در دوره‌ی آزمایشی با یک حساب نمونه بررسی شود.",-1))]),_:1})),a(I,{label:"توکن وب‌سرویس",required:"",class:"grid__full"},{default:l(()=>{var b;return[se.value&&!Z[i.value]?(n(),c("div",Jt,[a(Ue(Qe),{class:"token__icon"}),(b=F(i.value))!=null&&b.tokenReadable?(n(),c("span",Qt,"توکن ذخیره شده است و نمایش داده نمی‌شود.")):(n(),c("span",Zt,"توکن ذخیره‌شده قابل‌خواندن نیست؛ دوباره وارد کنید.")),a(V,{class:"token__actions"},{default:l(()=>[a(L,{size:"small",onClick:e[3]||(e[3]=ye=>Z[i.value]=!0)},{default:l(()=>[...e[20]||(e[20]=[v("تغییر توکن",-1)])]),_:1}),a(he,{title:"توکن حذف شود؟ تا توکن جدید وارد نشود اتصال کار نمی‌کند.","ok-text":"حذف","cancel-text":"انصراف",onConfirm:e[4]||(e[4]=ye=>z("clearToken",i.value))},{default:l(()=>[a(L,{size:"small",danger:""},{default:l(()=>[...e[21]||(e[21]=[v("حذف",-1)])]),_:1})]),_:1})]),_:1})])):(n(),c(D,{key:1},[a(Me,{value:f.tokens[i.value],"onUpdate:value":e[5]||(e[5]=ye=>f.tokens[i.value]=ye),dir:"ltr",class:"ltr",autocomplete:"new-password",placeholder:"توکن را اینجا وارد کنید"},null,8,["value"]),o("div",Xt,[e[22]||(e[22]=v(" بعد از ذخیره، توکن رمز می‌شود و دیگر نمایش داده نمی‌شود. ",-1)),se.value?(n(),c("a",{key:0,class:"link",onClick:pe},"انصراف و نگه‌داشتن توکن فعلی")):y("",!0)])],64))]}),_:1})]),_:1}),a(_e,{ghost:"",class:"advanced"},{default:l(()=>[a(ue,{key:"adv",header:"تنظیمات پیشرفته"},{default:l(()=>[a(q,{layout:"vertical"},{default:l(()=>[a(I,{label:"حداکثر زمان انتظار برای پاسخ"},{default:l(()=>[a(ze,{value:me.value,"onUpdate:value":e[6]||(e[6]=b=>me.value=b),min:3,max:120,"addon-after":"ثانیه"},null,8,["value"]),e[23]||(e[23]=o("div",{class:"help"},"اگر سرور حسابداری کند است بیشترش کنید. پیش‌فرض ۲۰ ثانیه.",-1))]),_:1})]),_:1})]),_:1})]),_:1})]),h.value?(n(),c("section",ea,[e[42]||(e[42]=o("h3",{class:"step__title"},[o("span",{class:"step__no"},"۳"),v("گواهی امنیتی سرور")],-1)),o("p",ta," اتصال همیشه رمزنگاری‌شده و بررسی‌شده است. نصب‌های معمول "+m(R[i.value])+" گواهی خودساخته دارند؛ در این حالت یک بار گواهی سرور را بررسی و تأیید کنید. ",1),f.form[i.value].caCert?(n(),c("div",aa,[a(Ue(Ke),{class:"cert__icon"}),o("div",la,[o("div",sa,[e[26]||(e[26]=v(" گواهی سرور تأیید شده است ",-1)),oe.value?(n(),O(C,{key:0,color:"orange"},{default:l(()=>[...e[24]||(e[24]=[v("ذخیره نشده",-1)])]),_:1})):y("",!0),(Re=H.value)!=null&&Re.expired?(n(),O(C,{key:1,color:"red"},{default:l(()=>[...e[25]||(e[25]=[v("منقضی شده",-1)])]),_:1})):y("",!0)]),H.value?(n(),c("dl",na,[e[27]||(e[27]=o("dt",null,"صادرشده برای",-1)),o("dd",oa,m(fe(H.value.subject)),1),e[28]||(e[28]=o("dt",null,"معتبر تا",-1)),o("dd",null,m(ne(H.value.validTo)),1),e[29]||(e[29]=o("dt",null,"اثرانگشت",-1)),o("dd",ia,m(H.value.fingerprint256),1)])):(n(),c("div",ra,"مشخصات گواهی بعد از ذخیره نمایش داده می‌شود."))]),a(V,{direction:"vertical",class:"cert__actions"},{default:l(()=>[a(L,{size:"small",loading:Y.value,onClick:ie},{default:l(()=>[...e[30]||(e[30]=[v("بررسی دوباره",-1)])]),_:1},8,["loading"]),a(L,{size:"small",danger:"",onClick:e[7]||(e[7]=b=>f.form[i.value].caCert="")},{default:l(()=>[...e[31]||(e[31]=[v("برداشتن",-1)])]),_:1})]),_:1})])):S.value&&!S.value.trustedBySystem?(n(),c("div",ua,[a(Ue(Nt),{class:"cert__icon"}),o("div",da,[e[35]||(e[35]=o("div",{class:"cert__title"},"این گواهی را تأیید می‌کنید؟",-1)),e[36]||(e[36]=o("div",{class:"help"},"اثرانگشت زیر را با گواهی نصب‌شده روی سرور حسابداری مقایسه کنید. اگر یکی است تأیید کنید.",-1)),o("dl",va,[e[32]||(e[32]=o("dt",null,"صادرشده برای",-1)),o("dd",ca,m(fe(S.value.subject)),1),e[33]||(e[33]=o("dt",null,"معتبر تا",-1)),o("dd",null,m(ne(S.value.validTo)),1),e[34]||(e[34]=o("dt",null,"اثرانگشت",-1)),o("dd",pa,m(S.value.fingerprint256),1)]),S.value.expired?(n(),O(k,{key:0,type:"error","show-icon":"",message:"این گواهی منقضی شده است.",class:"mt"})):y("",!0)]),a(V,{direction:"vertical",class:"cert__actions"},{default:l(()=>[a(L,{type:"primary",size:"small",onClick:X},{default:l(()=>[...e[37]||(e[37]=[v("تأیید گواهی",-1)])]),_:1}),a(L,{size:"small",onClick:e[8]||(e[8]=b=>S.value=null)},{default:l(()=>[...e[38]||(e[38]=[v("انصراف",-1)])]),_:1})]),_:1})])):(te=S.value)!=null&&te.trustedBySystem?(n(),c("div",ma,[a(Ue(Ke),{class:"cert__icon"}),e[39]||(e[39]=o("div",{class:"cert__body"},[o("div",{class:"cert__title"},"گواهی سرور معتبر است"),o("div",{class:"help"},"این سرور گواهی معتبر عمومی دارد؛ کاری لازم نیست.")],-1))])):(n(),c("div",fa,[a(Ue(Ke),{class:"cert__icon cert__icon--muted"}),e[41]||(e[41]=o("div",{class:"cert__body"},[o("div",{class:"cert__title"},"گواهی‌ای تأیید نشده"),o("div",{class:"help"},"اگر «تست اتصال» خطای گواهی داد، اینجا گواهی سرور را بررسی کنید.")],-1)),a(L,{loading:Y.value,disabled:!f.form[i.value].baseUrl,onClick:ie},{default:l(()=>[...e[40]||(e[40]=[v("بررسی گواهی سرور",-1)])]),_:1},8,["loading","disabled"])])),a(_e,{ghost:"",class:"advanced"},{default:l(()=>[a(ue,{key:"pem",header:"وارد کردن دستی گواهی (PEM)"},{default:l(()=>[a(We,{value:f.form[i.value].caCert,"onUpdate:value":e[9]||(e[9]=b=>f.form[i.value].caCert=b),dir:"ltr",class:"ltr mono",rows:5,placeholder:"-----BEGIN CERTIFICATE-----"},null,8,["value"])]),_:1})]),_:1})])):y("",!0)],64)):y("",!0),i.value&&j.value?(n(),c("section",ba,[j.value.ok?(n(),O(k,{key:0,type:"success","show-icon":"",message:`اتصال به ${R[i.value]} برقرار است`},{description:l(()=>[o("dl",_a,[(n(!0),c(D,null,we(K.value,b=>(n(),c(D,{key:b.label},[o("dt",null,m(b.label),1),o("dd",{dir:b.ltr?"ltr":void 0,class:Ge({latin:b.ltr})},m(b.value),11,ya)],64))),128))]),Ee.value?(n(),c("div",ka,[e[43]||(e[43]=v(" دیتابیسی که وصل شد ",-1)),o("bdi",ga,m(j.value.info.dbName),1),e[44]||(e[44]=v(" است، نه ",-1)),o("bdi",Ca,m(f.form.tahesab.dbName),1),e[45]||(e[45]=v(". نام دیتابیس را چک کنید. ",-1))])):y("",!0),$e.value?(n(),c("div",wa,"این نتیجه برای مقادیر قبلی است؛ دوباره تست کنید.")):y("",!0)]),_:1},8,["message"])):(n(),O(k,{key:1,type:"error","show-icon":"",message:"اتصال برقرار نشد"},{description:l(()=>[o("div",null,m(j.value.error),1),$e.value?(n(),c("div",Ea,"این نتیجه برای مقادیر قبلی است؛ دوباره تست کنید.")):y("",!0)]),_:1}))])):y("",!0),o("div",Oa,[o("span",ha,[Q.value?(n(),c(D,{key:0},[v("تغییرات هنوز ذخیره نشده‌اند.")],64)):i.value?(n(),c(D,{key:1},[v("«تست اتصال» مقادیر همین فرم را امتحان می‌کند، حتی پیش از ذخیره.")],64)):y("",!0)]),a(V,null,{default:l(()=>[i.value?(n(),O(L,{key:0,loading:be.value,disabled:!Be.value,onClick:re},{default:l(()=>[...e[46]||(e[46]=[v("تست اتصال",-1)])]),_:1},8,["loading","disabled"])):y("",!0),a(L,{type:"primary",loading:f.saving,disabled:!Q.value,onClick:e[10]||(e[10]=b=>z("save"))},{default:l(()=>[...e[47]||(e[47]=[v("ذخیره",-1)])]),_:1},8,["loading","disabled"])]),_:1})])])}}}),xa=ft(Sa,[["__scopeId","data-v-71c6f49f"]]),Na={key:0},Ua={key:0},Ta={key:1},Da={key:2,class:"warn"},Ia={key:2},$a={key:0,class:"hint"},Ma={key:0,class:"warn"},za={key:1},Ra={class:"grid-2 mt-4"},ja={class:"grid-2"},Aa={class:"grid-2"},Ga={key:1,class:"hint mb-4"},La={key:0,class:"hint"},Pa={key:4,class:"warn small"},Ba={class:"grid-2"},Va={dir:"ltr"},Wa={dir:"ltr"},Fa={class:"hint"},Ya=mt({__name:"accounting",setup(f){const x=Tt(),d=s=>!!x.hasPermission(s),z={PENDING:"در صف",SENDING:"در حال ارسال",SENT:"ارسال شد",FAILED:"ناموفق",NEEDS_REVIEW:"نیاز به بررسی",RESOLVED:"حل‌شده"},R={PENDING:"default",SENDING:"processing",SENT:"success",FAILED:"error",NEEDS_REVIEW:"warning",RESOLVED:"default"},Pe={CUSTOMER_PUSH:"ارسال مشتری",PRODUCT_PUSH:"ساخت کارساخته",ORDER_DOCUMENT:"سند سفارش",ORDER_DOCUMENT_DELETE:"حذف سند سفارش"},i={CUSTOMER_NO_MOBILE:"حساب بدون موبایل",CUSTOMER_DUPLICATE_MOBILE:"موبایل تکراری",CUSTOMER_LINK_CONFLICT:"تداخل لینک",PRODUCT_DUPLICATE_TITLE:"عنوان تکراری محصول",PRODUCT_CODE_TAKEN:"کد محصول تکراری"},J={LINKED:"جفت با موبایل/نام",IMPORTED:"وارد شده از حسابداری",PUSHED:"ساخته شده از اپ",MANUAL:"دستی"},F=U(!1),se=U("connection"),h=U(null),p=le({provider:"none",tahesab:{baseUrl:"",dbName:"TahesabDB",timeoutMs:2e4,caCert:""},zarrin:{baseUrl:"",balanceOwesWhen:"negative",timeoutMs:2e4,caCert:""},features:{customers:!1,balances:!1,report:!1,products:!1,documents:!1},intervals:{customersMinutes:60,balancesMinutes:10,productsMinutes:30},mapping:{karat:750},report:{windowDays:365},documents:{triggerStatus:"DELIVERED_TO_AGENT"}}),Q=le({tahesab:"",zarrin:""}),Te=U("none"),ce=$(()=>Te.value!=="none"),G=le({customerGroups:[],karSakhteGroups:[],karSakhteTypes:[]}),Z=U([]),pe=U([]),me=U(!1),Y=s=>s?`${s.id}|${s.name}`:void 0,S=s=>{if(!s)return null;const t=s.indexOf("|");return{id:s.slice(0,t),name:s.slice(t+1)}},fe=(s,t)=>{const g=[...s];for(const w of t)w&&!g.some(W=>W.id===w.id&&W.name===w.name)&&g.push(w);return g.map(w=>({value:Y(w),label:w.id?`${w.name} (${w.id})`:w.name}))},ne=U([]),oe=U(),H=U(),ie=U(),X=le({}),be=$(()=>fe(G.customerGroups,[...ne.value.map(S),S(oe.value)])),j=$(()=>fe(G.karSakhteGroups,[S(H.value),...Object.values(X).map(S)])),De=$(()=>fe(G.karSakhteTypes,[S(ie.value)])),Ie=[{value:"PLACED",label:"ثبت سفارش"},{value:"ADMIN_APPROVED",label:"تأیید مدیر"},{value:"SOURCING",label:"در حال تأمین"},{value:"PREPARING",label:"در حال آماده‌سازی"},{value:"DELIVERED_TO_AGENT",label:"تحویل مسئول فروش"},{value:"DELIVERED_TO_CUSTOMER",label:"تحویل مشتری"}],$e=[{key:"customers",label:"سینک مشتریان (ورود/لینک با موبایل، ساخت پس از احراز هویت)",interval:"customersMinutes",job:"customers"},{key:"balances",label:"سینک مانده (نمایش به مشتری)",interval:"balancesMinutes",job:"balances"},{key:"report",label:"گزارش مشتری از حسابداری",interval:null,job:null},{key:"products",label:"کارساخته ↔ محصول و قفل ناموجود",interval:"productsMinutes",job:"products"},{key:"documents",label:"ثبت سند سفارش (موقت)",interval:null,job:"outbox"}],Be=[{title:"قابلیت",dataIndex:"label",key:"label"},{title:"فعال",key:"on",width:80},{title:"بازه",key:"interval",width:170},{title:"وضعیت",key:"state"},{title:"",key:"run",width:110}],re=s=>{var t,g,w;return(w=(g=(t=h.value)==null?void 0:t.state)==null?void 0:g.jobs)==null?void 0:w[s]},Ve=s=>Object.entries(s).map(([t,g])=>`${t}: ${g}`).join("، "),K=le({rows:[],total:0,page:1,limit:25}),Ee=U(),r=[{title:"زمان",key:"createdAt",width:150},{title:"نوع",key:"kind",width:120},{title:"مورد",key:"entity"},{title:"وضعیت",key:"status",width:140},{title:"خطا",key:"error"},{title:"",key:"actions",width:190}],e=$(()=>{var g;const s=((g=h.value)==null?void 0:g.outbox)??{},t=(s.FAILED??0)+(s.NEEDS_REVIEW??0);return t?` (${t})`:""}),C=le({rows:[],total:0,page:1,limit:25}),k=le({rows:[],total:0,page:1,limit:25}),N=U("CUSTOMER"),I=U(""),ee=le({rows:[],scope:null}),Oe=U(""),L=U(""),he=U(!1),V=s=>s?qe(s).format("jYYYY/jMM/jDD HH:mm"):"—",Me=s=>s==null?"—":JSON.stringify(s,null,2),q=(s,t)=>{var w,W;const g=(W=(w=s==null?void 0:s.response)==null?void 0:w.data)==null?void 0:W.message;return Array.isArray(g)?g.join("، "):g??t};function ze(s){var t;p.provider=s.provider,Te.value=s.provider;for(const g of["tahesab","zarrin"])p[g].baseUrl=s[g].baseUrl,p[g].timeoutMs=s[g].timeoutMs,p[g].caCert=s[g].caCert??"";p.tahesab.dbName=s.tahesab.dbName,p.zarrin.balanceOwesWhen=s.zarrin.balanceOwesWhen,Object.assign(p.features,s.features),Object.assign(p.intervals,s.intervals),p.mapping.karat=s.mapping.karat,p.report.windowDays=s.report.windowDays,p.documents.triggerStatus=((t=s.documents)==null?void 0:t.triggerStatus)??"DELIVERED_TO_AGENT",ne.value=(s.mapping.importCustomerGroups??[]).map(Y),oe.value=Y(s.mapping.newCustomerGroup),H.value=Y(s.mapping.newKarSakhteGroup),ie.value=Y(s.mapping.newKarSakhteType);for(const g of Object.keys(X))delete X[g];for(const g of s.mapping.categoryGroups??[])X[g.categoryId]=Y(g.group)}async function ue(){try{F.value=!0;const{data:s}=await A.get("admin/accounting");h.value=s,ze(s.config)}catch(s){B.error(q(s,"خطا در دریافت تنظیمات"))}finally{F.value=!1}}async function _e(){const s={provider:p.provider,tahesab:{baseUrl:p.tahesab.baseUrl,dbName:p.tahesab.dbName,timeoutMs:p.tahesab.timeoutMs,caCert:p.tahesab.caCert},zarrin:{baseUrl:p.zarrin.baseUrl,balanceOwesWhen:p.zarrin.balanceOwesWhen,timeoutMs:p.zarrin.timeoutMs,caCert:p.zarrin.caCert},features:p.features,intervals:p.intervals,report:p.report,documents:p.documents,mapping:{karat:p.mapping.karat,importCustomerGroups:ne.value.map(S).filter(Boolean),newCustomerGroup:S(oe.value),newKarSakhteGroup:S(H.value),newKarSakhteType:S(ie.value),categoryGroups:Object.entries(X).filter(([,t])=>!!t).map(([t,g])=>({categoryId:t,group:S(g)}))}};for(const t of["tahesab","zarrin"])Q[t].trim()&&(s[t].token=Q[t].trim());try{F.value=!0;const{data:t}=await A.put("admin/accounting/config",s);h.value=t,ze(t.config),Q.tahesab="",Q.zarrin="",B.success("تنظیمات ذخیره شد")}catch(t){B.error(q(t,"خطا در ذخیره"))}finally{F.value=!1}}async function We(s){try{const{data:t}=await A.put("admin/accounting/config",{[s]:{token:null}});h.value=t,B.success("توکن حذف شد")}catch(t){B.error(q(t,"خطا"))}}async function Se(){me.value=!0,pe.value=[];try{const{data:s}=await A.get("admin/accounting/options",{params:{provider:p.provider}});G.customerGroups=s.customerGroups.items,G.karSakhteGroups=s.karSakhteGroups.items,G.karSakhteTypes=s.karSakhteTypes.items,Z.value=s.categories;for(const t of[s.customerGroups,s.karSakhteGroups,s.karSakhteTypes])t.ok||pe.value.push(t.error)}catch(s){pe.value=[q(s,"تنظیمات اتصال را اول ذخیره کنید")]}finally{me.value=!1}}async function Re(s){try{const{data:t}=await A.post(`admin/accounting/run/${s}`);t.started?B.success("همگام‌سازی شروع شد؛ نتیجه چند لحظه بعد در همین صفحه دیده می‌شود"):B.warning(t.message),setTimeout(ue,4e3)}catch(t){B.error(q(t,"خطا"))}}async function te(s=1){const{data:t}=await A.get("admin/accounting/outbox",{params:{page:s,status:Ee.value}});Object.assign(K,t)}async function b(s){try{await A.post(`admin/accounting/outbox/${s}/retry`),B.success("دوباره در صف قرار گرفت"),te(K.page)}catch(t){B.error(q(t,"خطا"))}}async function ye(s){await A.post(`admin/accounting/outbox/${s}/resolve`,{}),te(K.page)}async function Fe(s=1){const{data:t}=await A.get("admin/accounting/issues",{params:{page:s}});Object.assign(C,t)}async function bt(s){await A.post(`admin/accounting/issues/${s}/resolve`),Fe(C.page),ue()}async function xe(s=1){const{data:t}=await A.get("admin/accounting/links",{params:{page:s,entityType:N.value,q:I.value||void 0}});Object.assign(k,t)}async function _t(s){await A.delete(`admin/accounting/links/${s}`),xe(k.page)}async function yt(){he.value=!0;try{const{data:s}=await A.get("admin/accounting/movement",{params:{from:Oe.value||void 0,to:L.value||void 0}});Object.assign(ee,s)}catch(s){B.error(q(s,"خطا در دریافت گردش"))}finally{he.value=!1}}return Je(se,s=>{s==="outbox"&&te(1),s==="issues"&&Fe(1),s==="links"&&xe(1),s==="mapping"&&p.provider!=="none"&&Z.value.length===0&&Se()}),Dt(ue),(s,t)=>{const g=_("a-tag"),w=_("a-button"),W=_("a-space"),ke=_("a-alert"),de=_("a-tab-pane"),kt=_("a-switch"),Ye=_("a-input-number"),Ze=_("a-select-option"),ve=_("a-select"),ge=_("a-table"),Ce=_("a-form-item"),gt=_("a-divider"),T=_("a-table-column"),Ct=_("a-form"),He=_("a-popconfirm"),Xe=_("a-radio-button"),wt=_("a-radio-group"),Et=_("a-input-search"),et=_("a-input"),Ot=_("a-tabs"),ht=_("a-spin"),St=_("a-card");return n(),c("div",null,[d("config.accounting")?(n(),O(St,{key:0,title:"اتصال به نرم‌افزار حسابداری"},{extra:l(()=>[a(W,null,{default:l(()=>{var Ne;return[(Ne=h.value)!=null&&Ne.busy?(n(),O(g,{key:0,color:"processing"},{default:l(()=>[...t[17]||(t[17]=[v("همگام‌سازی در حال اجرا",-1)])]),_:1})):y("",!0),a(w,{size:"small",onClick:ue},{default:l(()=>[...t[18]||(t[18]=[v("تازه‌سازی",-1)])]),_:1})]}),_:1})]),default:l(()=>{var Ne,tt,at,lt,st,nt,ot,it;return[h.value&&h.value.config.secretKeySource!=="ACCOUNTING_SECRET_KEY"?(n(),O(ke,{key:0,type:"warning","show-icon":"",class:"mb-4",message:"متغیر ACCOUNTING_SECRET_KEY روی سرور تنظیم نشده است",description:"توکن با کلیدی مشتق از JWT_SECRET رمز می‌شود؛ اگر JWT_SECRET عوض شود باید توکن را دوباره وارد کنید."})):y("",!0),(Ne=h.value)!=null&&Ne.inactiveReason&&h.value.config.provider!=="none"&&se.value!=="connection"?(n(),O(ke,{key:1,type:"error","show-icon":"",class:"mb-4",message:"همگام‌سازی انجام نمی‌شود",description:h.value.inactiveReason},null,8,["description"])):ce.value&&!((st=(lt=(at=(tt=h.value)==null?void 0:tt.config)==null?void 0:at.mapping)==null?void 0:lt.importCustomerGroups)!=null&&st.length)&&((it=(ot=(nt=h.value)==null?void 0:nt.config)==null?void 0:ot.features)!=null&&it.customers)?(n(),O(ke,{key:2,type:"warning","show-icon":"",class:"mb-4",message:"سینک مشتری اجرا نمی‌شود",description:"هیچ گروه مشتری برای ورود انتخاب نشده است؛ در تب «نگاشت» گروه‌هایی را که واقعاً مشتری هستند انتخاب و ذخیره کنید."})):y("",!0),a(ht,{spinning:F.value},{default:l(()=>[a(Ot,{"active-key":se.value,"onUpdate:activeKey":t[16]||(t[16]=je=>se.value=je)},{default:l(()=>{var je;return[a(de,{key:"connection",tab:"اتصال"},{default:l(()=>[a(xa,{overview:h.value,form:p,tokens:Q,saving:F.value,onSave:_e,onClearToken:We},null,8,["overview","form","tokens","saving"])]),_:1}),a(de,{key:"features",tab:"قابلیت‌ها و زمان‌بندی"},{default:l(()=>{var u,E,Ae,rt;return[p.provider==="zarrin"?(n(),O(ke,{key:0,type:"info","show-icon":"",class:"mb-4",message:"درایور زرین روی نصب واقعی تست نشده است",description:"طبق تصمیم مالک، پیش از استفاده‌ی واقعی یک دوره‌ی آزمایشی با اسناد موقت لازم است (علامت مانده و فیلد هزینه‌ی سنگ را بررسی کنید)."})):y("",!0),ce.value&&((E=(u=h.value)==null?void 0:u.config)!=null&&E.provider)&&(p.features.balances||p.features.products)?(n(),O(ke,{key:1,type:(rt=(Ae=h.value)==null?void 0:Ae.realtime)!=null&&rt.lastError?"warning":"success","show-icon":"",class:"mb-4",message:"همگام‌سازی لحظه‌ای"},{description:l(()=>{var ae,M,P,ut;return[(M=(ae=h.value)==null?void 0:ae.realtime)!=null&&M.lastOkAt?(n(),c("div",Na,[v(" تغییرات حسابداری چند ثانیه یک‌بار بررسی می‌شود؛ آخرین بررسی: "+m(V(h.value.realtime.lastOkAt))+". ",1),h.value.realtime.lastChangeAt?(n(),c("span",Ua,"آخرین تغییر دریافت‌شده: "+m(V(h.value.realtime.lastChangeAt))+".",1)):y("",!0)])):(n(),c("div",Ta,"هنوز بررسی انجام نشده است (چند ثانیه بعد از روشن‌شدن شروع می‌شود).")),(ut=(P=h.value)==null?void 0:P.realtime)!=null&&ut.lastError?(n(),c("div",Da,"خطای آخرین بررسی: "+m(h.value.realtime.lastError),1)):y("",!0),t[19]||(t[19]=o("div",{class:"hint"}," سفارش و ویرایش مشتری بلافاصله ارسال می‌شود و موجودی هنگام ثبت سفارش مستقیم از حسابداری خوانده می‌شود؛ اگر حسابداری آن لحظه پاسخ ندهد، آخرین موجودی معلوم ملاک است. بازه‌های «دقیقه»ی زیر فقط شبکه‌ی اطمینان‌اند (مشتری جدید، ویرایش یا حذف در حسابداری). ",-1))]}),_:1},8,["type"])):y("",!0),a(ge,{"data-source":$e,columns:Be,pagination:!1,"row-key":"key",size:"middle"},{bodyCell:l(({column:ae,record:M})=>[ae.key==="on"?(n(),O(kt,{key:0,checked:p.features[M.key],"onUpdate:checked":P=>p.features[M.key]=P},null,8,["checked","onUpdate:checked"])):ae.key==="interval"?(n(),c(D,{key:1},[M.interval?(n(),O(Ye,{key:0,value:p.intervals[M.interval],"onUpdate:value":P=>p.intervals[M.interval]=P,min:1,max:1440,"addon-after":"دقیقه"},null,8,["value","onUpdate:value"])):M.key==="documents"?(n(),O(ve,{key:1,value:p.documents.triggerStatus,"onUpdate:value":t[0]||(t[0]=P=>p.documents.triggerStatus=P),style:{"min-width":"220px"},title:"سند (موقت / پیش‌فاکتور) وقتی سفارش به این وضعیت برسد ثبت می‌شود"},{default:l(()=>[(n(),c(D,null,we(Ie,P=>a(Ze,{key:P.value,value:P.value},{default:l(()=>[v("ثبت در: "+m(P.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["value"])):(n(),c("span",Ia,"—"))],64)):ae.key==="state"?(n(),c(D,{key:2},[M.job&&re(M.job)?(n(),c("div",$a,[v(" آخرین اجرا: "+m(V(re(M.job).lastRunAt))+" ",1),re(M.job).lastError?(n(),c("span",Ma," — خطا: "+m(re(M.job).lastError),1)):re(M.job).summary?(n(),c("span",za," — "+m(Ve(re(M.job).summary)),1)):y("",!0)])):y("",!0)],64)):ae.key==="run"?(n(),c(D,{key:3},[M.job?(n(),O(w,{key:0,size:"small",disabled:!ce.value,onClick:P=>Re(M.job)},{default:l(()=>[...t[20]||(t[20]=[v("سینک الان",-1)])]),_:1},8,["disabled","onClick"])):y("",!0)],64)):y("",!0)]),_:1}),o("div",Ra,[a(Ce,{label:"بازه‌ی گزارش مشتری (روز)"},{default:l(()=>[a(Ye,{value:p.report.windowDays,"onUpdate:value":t[1]||(t[1]=ae=>p.report.windowDays=ae),min:7,max:3650,class:"w-full"},null,8,["value"])]),_:1})]),t[22]||(t[22]=o("div",{class:"hint mb-4"}," اسناد سفارش همیشه «موقت» ثبت می‌شوند و تا حسابدار نهایی نکند روی مانده‌ی حسابداری اثر ندارند. سقف اعتبار سفارش همچنان با دفتر داخلی اپ چک می‌شود. ",-1)),a(w,{type:"primary",onClick:_e},{default:l(()=>[...t[21]||(t[21]=[v("ذخیره",-1)])]),_:1})]}),_:1}),a(de,{key:"mapping",tab:"نگاشت"},{default:l(()=>[a(W,{class:"mb-4"},{default:l(()=>[a(w,{disabled:p.provider==="none",loading:me.value,onClick:Se},{default:l(()=>[...t[23]||(t[23]=[v("دریافت گروه‌ها از حسابداری",-1)])]),_:1},8,["disabled","loading"]),(n(!0),c(D,null,we(pe.value,u=>(n(),c("span",{key:u,class:"warn"},m(u),1))),128))]),_:1}),a(Ct,{layout:"vertical"},{default:l(()=>[o("div",ja,[a(Ce,{label:"گروه‌های حسابی که وارد اپ می‌شوند (خالی = همه)"},{default:l(()=>[a(ve,{value:ne.value,"onUpdate:value":t[2]||(t[2]=u=>ne.value=u),mode:"multiple",options:be.value,"allow-clear":"",placeholder:"همه‌ی گروه‌ها"},null,8,["value","options"])]),_:1}),a(Ce,{label:"گروه مشتری جدیدی که از اپ ساخته می‌شود"},{default:l(()=>[a(ve,{value:oe.value,"onUpdate:value":t[3]||(t[3]=u=>oe.value=u),options:be.value,"allow-clear":""},null,8,["value","options"])]),_:1}),a(Ce,{label:"عیار پایه‌ی گرم‌های اپ"},{default:l(()=>[a(Ye,{value:p.mapping.karat,"onUpdate:value":t[4]||(t[4]=u=>p.mapping.karat=u),min:1,max:1e3,class:"w-full"},null,8,["value"])]),_:1})]),p.provider==="zarrin"?(n(),c(D,{key:0},[a(gt,{orientation:"right"},{default:l(()=>[...t[24]||(t[24]=[v("کارساخته (زرین)",-1)])]),_:1}),o("div",Aa,[a(Ce,{label:"نوع کارساخته‌ی جدید (گرمی/تعدادی…)"},{default:l(()=>[a(ve,{value:ie.value,"onUpdate:value":t[5]||(t[5]=u=>ie.value=u),options:De.value,"allow-clear":""},null,8,["value","options"])]),_:1}),a(Ce,{label:"گروه ساخته‌ی پیش‌فرض"},{default:l(()=>[a(ve,{value:H.value,"onUpdate:value":t[6]||(t[6]=u=>H.value=u),options:j.value,"allow-clear":""},null,8,["value","options"])]),_:1})]),a(ge,{"data-source":Z.value,pagination:!1,"row-key":"id",size:"small",class:"mb-4"},{default:l(()=>[a(T,{title:"دسته‌بندی اپ","data-index":"title"}),a(T,{title:"گروه ساخته در زرین"},{default:l(({record:u})=>[a(ve,{value:X[u.id],"onUpdate:value":E=>X[u.id]=E,options:j.value,"allow-clear":"",class:"w-full",placeholder:"پیش‌فرض"},null,8,["value","onUpdate:value","options"])]),_:1})]),_:1},8,["data-source"])],64)):p.provider==="tahesab"?(n(),c("div",Ga," ته‌حساب در API خود ساخت کارساخته ندارد: نام کار با اولین سند سفارش در ته‌حساب ساخته می‌شود و از آن به بعد به محصول لینک می‌شود. ")):y("",!0),a(w,{type:"primary",onClick:_e},{default:l(()=>[...t[25]||(t[25]=[v("ذخیره",-1)])]),_:1})]),_:1})]),_:1}),a(de,{key:"outbox",tab:`لاگ ارسال${e.value}`},{default:l(()=>[a(W,{class:"mb-4"},{default:l(()=>[a(ve,{value:Ee.value,"onUpdate:value":t[7]||(t[7]=u=>Ee.value=u),style:{width:"180px"},"allow-clear":"",placeholder:"همه‌ی وضعیت‌ها",onChange:t[8]||(t[8]=u=>te(1))},{default:l(()=>[(n(),c(D,null,we(z,(u,E)=>a(Ze,{key:E,value:E},{default:l(()=>[v(m(u),1)]),_:2},1032,["value"])),64))]),_:1},8,["value"]),a(w,{onClick:t[9]||(t[9]=u=>te(K.page))},{default:l(()=>[...t[26]||(t[26]=[v("تازه‌سازی",-1)])]),_:1})]),_:1}),a(ge,{"data-source":K.rows,columns:r,"row-key":"id",size:"small",pagination:{current:K.page,pageSize:K.limit,total:K.total,onChange:te}},{bodyCell:l(({column:u,record:E})=>[u.key==="createdAt"?(n(),c(D,{key:0},[v(m(V(E.createdAt)),1)],64)):u.key==="kind"?(n(),c(D,{key:1},[v(m(Pe[E.kind]??E.kind),1)],64)):u.key==="entity"?(n(),c(D,{key:2},[v(m(E.entityLabel??E.entityId),1)],64)):u.key==="status"?(n(),c(D,{key:3},[a(g,{color:R[E.status]},{default:l(()=>[v(m(z[E.status]??E.status),1)]),_:2},1032,["color"]),E.provider!==p.provider?(n(),c("span",La," ("+m(E.provider)+")",1)):y("",!0)],64)):u.key==="error"?(n(),c("span",Pa,m(E.lastError),1)):u.key==="actions"?(n(),O(W,{key:5},{default:l(()=>[["FAILED","NEEDS_REVIEW","PENDING"].includes(E.status)?(n(),O(He,{key:0,title:"پیش از تلاش دوباره، مطمئن شوید سند در حسابداری ثبت نشده است. ادامه؟",onConfirm:Ae=>b(E.id)},{default:l(()=>[a(w,{size:"small"},{default:l(()=>[...t[27]||(t[27]=[v("تلاش دوباره",-1)])]),_:1})]),_:1},8,["onConfirm"])):y("",!0),["FAILED","NEEDS_REVIEW","PENDING"].includes(E.status)?(n(),O(He,{key:1,title:"این ردیف «حل‌شده» علامت بخورد (دستی در حسابداری رسیدگی شده)؟",onConfirm:Ae=>ye(E.id)},{default:l(()=>[a(w,{size:"small"},{default:l(()=>[...t[28]||(t[28]=[v("حل‌شده",-1)])]),_:1})]),_:1},8,["onConfirm"])):y("",!0)]),_:2},1024)):y("",!0)]),expandedRowRender:l(({record:u})=>[o("div",Ba,[o("div",null,[t[29]||(t[29]=o("b",null,"درخواست",-1)),o("pre",Va,m(Me(u.lastRequest)),1)]),o("div",null,[t[30]||(t[30]=o("b",null,"پاسخ",-1)),o("pre",Wa,m(Me(u.lastResponse)),1)])]),o("div",Fa,"کد مرجع: "+m(u.externalRef??"—")+" | تلاش: "+m(u.attempts)+" | تلاش بعدی: "+m(V(u.nextAttemptAt)),1)]),_:1},8,["data-source","pagination"])]),_:1},8,["tab"]),a(de,{key:"issues",tab:`مغایرت‌ها${(je=h.value)!=null&&je.openIssues?` (${h.value.openIssues})`:""}`},{default:l(()=>[a(ge,{"data-source":C.rows,"row-key":"id",size:"small",pagination:{current:C.page,pageSize:C.limit,total:C.total,onChange:Fe}},{default:l(()=>[a(T,{title:"تاریخ"},{default:l(({record:u})=>[v(m(V(u.updatedAt)),1)]),_:1}),a(T,{title:"نرم‌افزار","data-index":"provider"}),a(T,{title:"نوع"},{default:l(({record:u})=>[v(m(i[u.kind]??u.kind),1)]),_:1}),a(T,{title:"کد حسابداری","data-index":"externalCode"}),a(T,{title:"شرح","data-index":"message"}),a(T,{title:""},{default:l(({record:u})=>[a(w,{size:"small",onClick:E=>bt(u.id)},{default:l(()=>[...t[31]||(t[31]=[v("رسیدگی شد",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data-source","pagination"])]),_:1},8,["tab"]),a(de,{key:"links",tab:"لینک‌ها"},{default:l(()=>[a(W,{class:"mb-4"},{default:l(()=>[a(wt,{value:N.value,"onUpdate:value":t[10]||(t[10]=u=>N.value=u),onChange:t[11]||(t[11]=u=>xe(1))},{default:l(()=>[a(Xe,{value:"CUSTOMER"},{default:l(()=>[...t[32]||(t[32]=[v("مشتری",-1)])]),_:1}),a(Xe,{value:"PRODUCT"},{default:l(()=>[...t[33]||(t[33]=[v("کارساخته",-1)])]),_:1})]),_:1},8,["value"]),a(Et,{value:I.value,"onUpdate:value":t[12]||(t[12]=u=>I.value=u),placeholder:"کد یا نام در حسابداری",style:{width:"240px"},onSearch:t[13]||(t[13]=u=>xe(1))},null,8,["value"])]),_:1}),a(ge,{"data-source":k.rows,"row-key":"id",size:"small",pagination:{current:k.page,pageSize:k.limit,total:k.total,onChange:xe}},{default:l(()=>[a(T,{title:"کد حسابداری","data-index":"externalCode"}),a(T,{title:"نام در حسابداری","data-index":"externalName"}),a(T,{title:"شناسه‌ی اپ","data-index":"entityId"}),a(T,{title:"منشأ"},{default:l(({record:u})=>[v(m(J[u.origin]??u.origin),1)]),_:1}),a(T,{title:"آخرین سینک"},{default:l(({record:u})=>[v(m(V(u.syncedAt)),1)]),_:1}),a(T,{title:""},{default:l(({record:u})=>[a(He,{title:"لینک حذف شود؟ در سینک بعدی دوباره با موبایل/نام جفت می‌شود.",onConfirm:E=>_t(u.id)},{default:l(()=>[a(w,{size:"small",danger:""},{default:l(()=>[...t[34]||(t[34]=[v("حذف لینک",-1)])]),_:1})]),_:1},8,["onConfirm"])]),_:1})]),_:1},8,["data-source","pagination"])]),_:1}),a(de,{key:"movement",tab:"گردش کارساخته"},{default:l(()=>[a(W,{class:"mb-4"},{default:l(()=>[a(et,{value:Oe.value,"onUpdate:value":t[14]||(t[14]=u=>Oe.value=u),dir:"ltr",placeholder:"از ۱۴۰۵/۰۷/۰۱",style:{width:"150px"}},null,8,["value"]),a(et,{value:L.value,"onUpdate:value":t[15]||(t[15]=u=>L.value=u),dir:"ltr",placeholder:"تا ۱۴۰۵/۰۷/۳۰",style:{width:"150px"}},null,8,["value"]),a(w,{disabled:!ce.value,loading:he.value,onClick:yt},{default:l(()=>[...t[35]||(t[35]=[v("نمایش",-1)])]),_:1},8,["disabled","loading"])]),_:1}),ee.scope==="recent-documents"?(n(),O(ke,{key:0,type:"info","show-icon":"",class:"mb-4",message:"ته‌حساب گزارش گردش همه‌ی حساب‌ها را ندارد؛ این فهرست از آخرین ۱۰۰۰ سند ثبت‌شده ساخته شده است."})):y("",!0),a(ge,{"data-source":ee.rows,"row-key":(u,E)=>E,size:"small"},{default:l(()=>[a(T,{title:"تاریخ","data-index":"date"}),a(T,{title:"کارساخته","data-index":"itemName"}),a(T,{title:"شرح","data-index":"description"}),a(T,{title:"وزن","data-index":"weight"}),a(T,{title:"تعداد","data-index":"count"}),a(T,{title:"مبلغ","data-index":"amount"})]),_:1},8,["data-source","row-key"])]),_:1})]}),_:1},8,["active-key"])]),_:1},8,["spinning"])]}),_:1})):y("",!0)])}}}),Qa=ft(Ya,[["__scopeId","data-v-fc1e6b50"]]);export{Qa as default}; diff --git a/apps/admin-panel/dist/assets/addFinDoc-D35iksYc.js b/apps/admin-panel/dist/assets/addFinDoc-D35iksYc.js new file mode 100644 index 0000000..e44dacc --- /dev/null +++ b/apps/admin-panel/dist/assets/addFinDoc-D35iksYc.js @@ -0,0 +1 @@ +import{_ as o}from"./addFinDoc.vue_vue_type_script_setup_true_lang-Cbwb5Q0D.js";import"./index-CVG99b4v.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-CWur6xTz.js";export{o as default}; diff --git a/apps/admin-panel/dist/assets/addFinDoc-W_xiZOQh.js b/apps/admin-panel/dist/assets/addFinDoc-W_xiZOQh.js deleted file mode 100644 index 4d38919..0000000 --- a/apps/admin-panel/dist/assets/addFinDoc-W_xiZOQh.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o}from"./addFinDoc.vue_vue_type_script_setup_true_lang-Claf_9qa.js";import"./index-WFQJAeoE.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js";export{o as default}; diff --git a/apps/admin-panel/dist/assets/addFinDoc.vue_vue_type_script_setup_true_lang-Claf_9qa.js b/apps/admin-panel/dist/assets/addFinDoc.vue_vue_type_script_setup_true_lang-Cbwb5Q0D.js similarity index 98% rename from apps/admin-panel/dist/assets/addFinDoc.vue_vue_type_script_setup_true_lang-Claf_9qa.js rename to apps/admin-panel/dist/assets/addFinDoc.vue_vue_type_script_setup_true_lang-Cbwb5Q0D.js index 63e2bc2..399f5f6 100644 --- a/apps/admin-panel/dist/assets/addFinDoc.vue_vue_type_script_setup_true_lang-Claf_9qa.js +++ b/apps/admin-panel/dist/assets/addFinDoc.vue_vue_type_script_setup_true_lang-Cbwb5Q0D.js @@ -1 +1 @@ -import{d as J,v as K,x as U,a as g,w as u,h as Q,j as X,l as M,y as j,r as p,o as i,n as E,c as a,f as v,b as m,e as L,F as O,i as f,A as Y,p as V,z,k as Z,t as A}from"./index-WFQJAeoE.js";import{_ as h}from"./BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js";const ee={class:"grid-3"},le={key:0,class:"grid-3"},ae={key:1,class:"grid-3"},te={key:2,class:"grid-3"},ue={key:3,class:"grid-3"},ne={class:"grid-3"},oe={key:0,class:"grid-3"},se={key:1,class:"grid-3"},ie={key:2,class:"grid-3"},re={key:3,class:"grid-3"},de=4.331802,me=J({__name:"addFinDoc",props:{open:{type:Boolean},id:{}},emits:["update:open","success"],setup(x,{emit:G}){const R=x,$=G,k=R.open!==void 0,D=X(),W=Z(),y=k?R.id:D.params.id,w=M(!1),c=M([]),l=j({type:2,customer_id:void 0,value:void 0,original_value:void 0,ayar:void 0,lab:"",ang:"",to:"",price:void 0,price_per_gram:void 0,account_name:"",bank_name:"",note:""}),_=j({}),C=V(()=>{const o=Number(l.original_value??0),e=Number(l.ayar??0);return!o||!e?"":(o*e/750).toFixed(4)}),F=V(()=>{const o=Number(l.price??0),e=Number(l.price_per_gram??0);return!o||!e?"":(o/(e/de)).toFixed(4)});function S(o,e){var s,b;return String(((b=(s=e==null?void 0:e.children)==null?void 0:s[0])==null?void 0:b.children)??"").toLowerCase().includes(o.toLowerCase())}function q(){return Object.keys(_).forEach(o=>delete _[o]),l.customer_id||(_.customer_id="مقدار را وارد نمایید"),Object.keys(_).length===0}async function N(){var o,e;if(q())try{w.value=!0,y?await U.put(`cash/${y}`,l):await U.post("cash",l),z.info("اطلاعات با موفقیت به ثبت رسید."),k?($("success"),$("update:open",!1)):W.push("/finical/list")}catch(s){z.error(((e=(o=s==null?void 0:s.response)==null?void 0:o.data)==null?void 0:e.message)??"خطا در ثبت اطلاعات.")}finally{w.value=!1}}return K(async()=>{var o;try{const{data:e}=await U.get("query/customer");c.value=e}catch(e){console.log(e)}if(y)try{const{data:e}=await U.get(`cash/${y}`);Object.assign(l,{type:e.type??2,customer_id:(o=e.customer)==null?void 0:o.id,value:e.value!==null?Number(e.value):void 0,original_value:e.original_value!==null?Number(e.original_value):void 0,ayar:e.ayar??void 0,lab:e.lab??"",ang:e.ang??"",to:e.to??"",price:e.price!==null?Number(e.price):void 0,price_per_gram:e.price_per_gram!==null?Number(e.price_per_gram):void 0,account_name:e.account_name??"",bank_name:e.bank_name??"",note:e.note??""})}catch(e){console.log(e)}}),(o,e)=>{const s=p("a-select-option"),b=p("a-select"),n=p("a-form-item"),r=p("a-input-number"),d=p("a-input"),B=p("a-textarea"),H=p("a-button"),P=p("a-card"),T=p("a-form"),I=p("a-spin");return k?(i(),g(h,{key:0,open:!!x.open,id:Q(y),"add-title":"ثبت سند مالی","edit-title":"ویرایش سند مالی",loading:w.value,submitting:w.value,width:"lg","onUpdate:open":e[15]||(e[15]=t=>o.$emit("update:open",t)),onSubmit:N},{default:u(()=>[E("div",ee,[a(n,{label:"نوع سند"},{default:u(()=>[a(b,{value:l.type,"onUpdate:value":e[0]||(e[0]=t=>l.type=t)},{default:u(()=>[a(s,{value:2},{default:u(()=>[...e[31]||(e[31]=[v("حواله",-1)])]),_:1}),a(s,{value:1},{default:u(()=>[...e[32]||(e[32]=[v("آب شده",-1)])]),_:1}),a(s,{value:4},{default:u(()=>[...e[33]||(e[33]=[v("پولی",-1)])]),_:1}),a(s,{value:3},{default:u(()=>[...e[34]||(e[34]=[v("چک",-1)])]),_:1})]),_:1},8,["value"])]),_:1}),a(n,{label:"مشتری","validate-status":_.customer_id?"error":"",help:_.customer_id},{default:u(()=>[a(b,{value:l.customer_id,"onUpdate:value":e[1]||(e[1]=t=>l.customer_id=t),"show-search":"","option-filter-prop":"children","filter-option":S,placeholder:"انتخاب کنید"},{default:u(()=>[(i(!0),m(O,null,L(c.value,t=>(i(),g(s,{key:t.id,value:t.id},{default:u(()=>[v(A(`${t.name} - ${t.mobile}`),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1},8,["validate-status","help"])]),l.type==1?(i(),m("div",le,[a(n,{label:"وزن (گرم)"},{default:u(()=>[a(r,{value:l.original_value,"onUpdate:value":e[2]||(e[2]=t=>l.original_value=t),class:"w-full",step:.001},null,8,["value"])]),_:1}),a(n,{label:"عیار"},{default:u(()=>[a(r,{value:l.ayar,"onUpdate:value":e[3]||(e[3]=t=>l.ayar=t),class:"w-full"},null,8,["value"])]),_:1}),a(n,{label:"نام آزمایشگاه"},{default:u(()=>[a(d,{value:l.lab,"onUpdate:value":e[4]||(e[4]=t=>l.lab=t)},null,8,["value"])]),_:1}),a(n,{label:"انگ"},{default:u(()=>[a(d,{value:l.ang,"onUpdate:value":e[5]||(e[5]=t=>l.ang=t)},null,8,["value"])]),_:1}),a(n,{label:"وزن نهایی اعمال شده"},{default:u(()=>[a(d,{value:C.value,disabled:""},null,8,["value"])]),_:1})])):f("",!0),l.type==2?(i(),m("div",ae,[a(n,{label:"وزن (گرم)"},{default:u(()=>[a(r,{value:l.value,"onUpdate:value":e[6]||(e[6]=t=>l.value=t),class:"w-full",step:.001},null,8,["value"])]),_:1}),a(n,{label:"حواله به"},{default:u(()=>[a(d,{value:l.to,"onUpdate:value":e[7]||(e[7]=t=>l.to=t)},null,8,["value"])]),_:1})])):f("",!0),l.type==3?(i(),m("div",te,[a(n,{label:"مبلغ چک"},{default:u(()=>[a(r,{value:l.price,"onUpdate:value":e[8]||(e[8]=t=>l.price=t),class:"w-full"},null,8,["value"])]),_:1}),a(n,{label:"وزن (گرم)"},{default:u(()=>[a(r,{value:l.value,"onUpdate:value":e[9]||(e[9]=t=>l.value=t),class:"w-full",step:.001},null,8,["value"])]),_:1}),a(n,{label:"نام صاحب حساب"},{default:u(()=>[a(d,{value:l.account_name,"onUpdate:value":e[10]||(e[10]=t=>l.account_name=t)},null,8,["value"])]),_:1}),a(n,{label:"نام بانک"},{default:u(()=>[a(d,{value:l.bank_name,"onUpdate:value":e[11]||(e[11]=t=>l.bank_name=t)},null,8,["value"])]),_:1})])):f("",!0),l.type==4?(i(),m("div",ue,[a(n,{label:"میزان پول"},{default:u(()=>[a(r,{value:l.price,"onUpdate:value":e[12]||(e[12]=t=>l.price=t),class:"w-full"},null,8,["value"])]),_:1}),a(n,{label:"مظنه"},{default:u(()=>[a(r,{value:l.price_per_gram,"onUpdate:value":e[13]||(e[13]=t=>l.price_per_gram=t),class:"w-full"},null,8,["value"])]),_:1}),l.price_per_gram?(i(),g(n,{key:0,label:"وزن نهایی اعمال شده"},{default:u(()=>[a(d,{value:F.value,disabled:""},null,8,["value"])]),_:1})):f("",!0)])):f("",!0),a(n,{label:"توضیحات"},{default:u(()=>[a(B,{value:l.note,"onUpdate:value":e[14]||(e[14]=t=>l.note=t),"auto-size":{minRows:3,maxRows:5}},null,8,["value"])]),_:1})]),_:1},8,["open","id","loading","submitting"])):(i(),g(I,{key:1,spinning:w.value},{default:u(()=>[a(T,{layout:"vertical",onSubmit:Y(N,["prevent"])},{default:u(()=>[a(P,{title:"ثبت سند مالی",class:"mb-base"},{default:u(()=>[E("div",ne,[a(n,{label:"نوع سند"},{default:u(()=>[a(b,{value:l.type,"onUpdate:value":e[16]||(e[16]=t=>l.type=t)},{default:u(()=>[a(s,{value:2},{default:u(()=>[...e[35]||(e[35]=[v("حواله",-1)])]),_:1}),a(s,{value:1},{default:u(()=>[...e[36]||(e[36]=[v("آب شده",-1)])]),_:1}),a(s,{value:4},{default:u(()=>[...e[37]||(e[37]=[v("پولی",-1)])]),_:1}),a(s,{value:3},{default:u(()=>[...e[38]||(e[38]=[v("چک",-1)])]),_:1})]),_:1},8,["value"])]),_:1}),a(n,{label:"مشتری","validate-status":_.customer_id?"error":"",help:_.customer_id},{default:u(()=>[a(b,{value:l.customer_id,"onUpdate:value":e[17]||(e[17]=t=>l.customer_id=t),"show-search":"","option-filter-prop":"children","filter-option":S,placeholder:"انتخاب کنید"},{default:u(()=>[(i(!0),m(O,null,L(c.value,t=>(i(),g(s,{key:t.id,value:t.id},{default:u(()=>[v(A(`${t.name} - ${t.mobile}`),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1},8,["validate-status","help"])]),l.type==1?(i(),m("div",oe,[a(n,{label:"وزن (گرم)"},{default:u(()=>[a(r,{value:l.original_value,"onUpdate:value":e[18]||(e[18]=t=>l.original_value=t),class:"w-full",step:.001},null,8,["value"])]),_:1}),a(n,{label:"عیار"},{default:u(()=>[a(r,{value:l.ayar,"onUpdate:value":e[19]||(e[19]=t=>l.ayar=t),class:"w-full"},null,8,["value"])]),_:1}),a(n,{label:"نام آزمایشگاه"},{default:u(()=>[a(d,{value:l.lab,"onUpdate:value":e[20]||(e[20]=t=>l.lab=t)},null,8,["value"])]),_:1}),a(n,{label:"انگ"},{default:u(()=>[a(d,{value:l.ang,"onUpdate:value":e[21]||(e[21]=t=>l.ang=t)},null,8,["value"])]),_:1}),a(n,{label:"وزن نهایی اعمال شده"},{default:u(()=>[a(d,{value:C.value,disabled:""},null,8,["value"])]),_:1})])):f("",!0),l.type==2?(i(),m("div",se,[a(n,{label:"وزن (گرم)"},{default:u(()=>[a(r,{value:l.value,"onUpdate:value":e[22]||(e[22]=t=>l.value=t),class:"w-full",step:.001},null,8,["value"])]),_:1}),a(n,{label:"حواله به"},{default:u(()=>[a(d,{value:l.to,"onUpdate:value":e[23]||(e[23]=t=>l.to=t)},null,8,["value"])]),_:1})])):f("",!0),l.type==3?(i(),m("div",ie,[a(n,{label:"مبلغ چک"},{default:u(()=>[a(r,{value:l.price,"onUpdate:value":e[24]||(e[24]=t=>l.price=t),class:"w-full"},null,8,["value"])]),_:1}),a(n,{label:"وزن (گرم)"},{default:u(()=>[a(r,{value:l.value,"onUpdate:value":e[25]||(e[25]=t=>l.value=t),class:"w-full",step:.001},null,8,["value"])]),_:1}),a(n,{label:"نام صاحب حساب"},{default:u(()=>[a(d,{value:l.account_name,"onUpdate:value":e[26]||(e[26]=t=>l.account_name=t)},null,8,["value"])]),_:1}),a(n,{label:"نام بانک"},{default:u(()=>[a(d,{value:l.bank_name,"onUpdate:value":e[27]||(e[27]=t=>l.bank_name=t)},null,8,["value"])]),_:1})])):f("",!0),l.type==4?(i(),m("div",re,[a(n,{label:"میزان پول"},{default:u(()=>[a(r,{value:l.price,"onUpdate:value":e[28]||(e[28]=t=>l.price=t),class:"w-full"},null,8,["value"])]),_:1}),a(n,{label:"مظنه"},{default:u(()=>[a(r,{value:l.price_per_gram,"onUpdate:value":e[29]||(e[29]=t=>l.price_per_gram=t),class:"w-full"},null,8,["value"])]),_:1}),l.price_per_gram?(i(),g(n,{key:0,label:"وزن نهایی اعمال شده"},{default:u(()=>[a(d,{value:F.value,disabled:""},null,8,["value"])]),_:1})):f("",!0)])):f("",!0),a(n,{label:"توضیحات"},{default:u(()=>[a(B,{value:l.note,"onUpdate:value":e[30]||(e[30]=t=>l.note=t),"auto-size":{minRows:3,maxRows:5}},null,8,["value"])]),_:1}),a(H,{type:"primary",onClick:N},{default:u(()=>[...e[39]||(e[39]=[v("ثبت اطلاعات",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["spinning"]))}}});export{me as _}; +import{d as J,v as K,x as U,a as g,w as u,h as Q,j as X,l as M,y as j,r as p,o as i,n as E,c as a,f as v,b as m,e as L,F as O,i as f,A as Y,p as V,z,k as Z,t as A}from"./index-CVG99b4v.js";import{_ as h}from"./BaseFormModal.vue_vue_type_script_setup_true_lang-CWur6xTz.js";const ee={class:"grid-3"},le={key:0,class:"grid-3"},ae={key:1,class:"grid-3"},te={key:2,class:"grid-3"},ue={key:3,class:"grid-3"},ne={class:"grid-3"},oe={key:0,class:"grid-3"},se={key:1,class:"grid-3"},ie={key:2,class:"grid-3"},re={key:3,class:"grid-3"},de=4.331802,me=J({__name:"addFinDoc",props:{open:{type:Boolean},id:{}},emits:["update:open","success"],setup(x,{emit:G}){const R=x,$=G,k=R.open!==void 0,D=X(),W=Z(),y=k?R.id:D.params.id,w=M(!1),c=M([]),l=j({type:2,customer_id:void 0,value:void 0,original_value:void 0,ayar:void 0,lab:"",ang:"",to:"",price:void 0,price_per_gram:void 0,account_name:"",bank_name:"",note:""}),_=j({}),C=V(()=>{const o=Number(l.original_value??0),e=Number(l.ayar??0);return!o||!e?"":(o*e/750).toFixed(4)}),F=V(()=>{const o=Number(l.price??0),e=Number(l.price_per_gram??0);return!o||!e?"":(o/(e/de)).toFixed(4)});function S(o,e){var s,b;return String(((b=(s=e==null?void 0:e.children)==null?void 0:s[0])==null?void 0:b.children)??"").toLowerCase().includes(o.toLowerCase())}function q(){return Object.keys(_).forEach(o=>delete _[o]),l.customer_id||(_.customer_id="مقدار را وارد نمایید"),Object.keys(_).length===0}async function N(){var o,e;if(q())try{w.value=!0,y?await U.put(`cash/${y}`,l):await U.post("cash",l),z.info("اطلاعات با موفقیت به ثبت رسید."),k?($("success"),$("update:open",!1)):W.push("/finical/list")}catch(s){z.error(((e=(o=s==null?void 0:s.response)==null?void 0:o.data)==null?void 0:e.message)??"خطا در ثبت اطلاعات.")}finally{w.value=!1}}return K(async()=>{var o;try{const{data:e}=await U.get("query/customer");c.value=e}catch(e){console.log(e)}if(y)try{const{data:e}=await U.get(`cash/${y}`);Object.assign(l,{type:e.type??2,customer_id:(o=e.customer)==null?void 0:o.id,value:e.value!==null?Number(e.value):void 0,original_value:e.original_value!==null?Number(e.original_value):void 0,ayar:e.ayar??void 0,lab:e.lab??"",ang:e.ang??"",to:e.to??"",price:e.price!==null?Number(e.price):void 0,price_per_gram:e.price_per_gram!==null?Number(e.price_per_gram):void 0,account_name:e.account_name??"",bank_name:e.bank_name??"",note:e.note??""})}catch(e){console.log(e)}}),(o,e)=>{const s=p("a-select-option"),b=p("a-select"),n=p("a-form-item"),r=p("a-input-number"),d=p("a-input"),B=p("a-textarea"),H=p("a-button"),P=p("a-card"),T=p("a-form"),I=p("a-spin");return k?(i(),g(h,{key:0,open:!!x.open,id:Q(y),"add-title":"ثبت سند مالی","edit-title":"ویرایش سند مالی",loading:w.value,submitting:w.value,width:"lg","onUpdate:open":e[15]||(e[15]=t=>o.$emit("update:open",t)),onSubmit:N},{default:u(()=>[E("div",ee,[a(n,{label:"نوع سند"},{default:u(()=>[a(b,{value:l.type,"onUpdate:value":e[0]||(e[0]=t=>l.type=t)},{default:u(()=>[a(s,{value:2},{default:u(()=>[...e[31]||(e[31]=[v("حواله",-1)])]),_:1}),a(s,{value:1},{default:u(()=>[...e[32]||(e[32]=[v("آب شده",-1)])]),_:1}),a(s,{value:4},{default:u(()=>[...e[33]||(e[33]=[v("پولی",-1)])]),_:1}),a(s,{value:3},{default:u(()=>[...e[34]||(e[34]=[v("چک",-1)])]),_:1})]),_:1},8,["value"])]),_:1}),a(n,{label:"مشتری","validate-status":_.customer_id?"error":"",help:_.customer_id},{default:u(()=>[a(b,{value:l.customer_id,"onUpdate:value":e[1]||(e[1]=t=>l.customer_id=t),"show-search":"","option-filter-prop":"children","filter-option":S,placeholder:"انتخاب کنید"},{default:u(()=>[(i(!0),m(O,null,L(c.value,t=>(i(),g(s,{key:t.id,value:t.id},{default:u(()=>[v(A(`${t.name} - ${t.mobile}`),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1},8,["validate-status","help"])]),l.type==1?(i(),m("div",le,[a(n,{label:"وزن (گرم)"},{default:u(()=>[a(r,{value:l.original_value,"onUpdate:value":e[2]||(e[2]=t=>l.original_value=t),class:"w-full",step:.001},null,8,["value"])]),_:1}),a(n,{label:"عیار"},{default:u(()=>[a(r,{value:l.ayar,"onUpdate:value":e[3]||(e[3]=t=>l.ayar=t),class:"w-full"},null,8,["value"])]),_:1}),a(n,{label:"نام آزمایشگاه"},{default:u(()=>[a(d,{value:l.lab,"onUpdate:value":e[4]||(e[4]=t=>l.lab=t)},null,8,["value"])]),_:1}),a(n,{label:"انگ"},{default:u(()=>[a(d,{value:l.ang,"onUpdate:value":e[5]||(e[5]=t=>l.ang=t)},null,8,["value"])]),_:1}),a(n,{label:"وزن نهایی اعمال شده"},{default:u(()=>[a(d,{value:C.value,disabled:""},null,8,["value"])]),_:1})])):f("",!0),l.type==2?(i(),m("div",ae,[a(n,{label:"وزن (گرم)"},{default:u(()=>[a(r,{value:l.value,"onUpdate:value":e[6]||(e[6]=t=>l.value=t),class:"w-full",step:.001},null,8,["value"])]),_:1}),a(n,{label:"حواله به"},{default:u(()=>[a(d,{value:l.to,"onUpdate:value":e[7]||(e[7]=t=>l.to=t)},null,8,["value"])]),_:1})])):f("",!0),l.type==3?(i(),m("div",te,[a(n,{label:"مبلغ چک"},{default:u(()=>[a(r,{value:l.price,"onUpdate:value":e[8]||(e[8]=t=>l.price=t),class:"w-full"},null,8,["value"])]),_:1}),a(n,{label:"وزن (گرم)"},{default:u(()=>[a(r,{value:l.value,"onUpdate:value":e[9]||(e[9]=t=>l.value=t),class:"w-full",step:.001},null,8,["value"])]),_:1}),a(n,{label:"نام صاحب حساب"},{default:u(()=>[a(d,{value:l.account_name,"onUpdate:value":e[10]||(e[10]=t=>l.account_name=t)},null,8,["value"])]),_:1}),a(n,{label:"نام بانک"},{default:u(()=>[a(d,{value:l.bank_name,"onUpdate:value":e[11]||(e[11]=t=>l.bank_name=t)},null,8,["value"])]),_:1})])):f("",!0),l.type==4?(i(),m("div",ue,[a(n,{label:"میزان پول"},{default:u(()=>[a(r,{value:l.price,"onUpdate:value":e[12]||(e[12]=t=>l.price=t),class:"w-full"},null,8,["value"])]),_:1}),a(n,{label:"مظنه"},{default:u(()=>[a(r,{value:l.price_per_gram,"onUpdate:value":e[13]||(e[13]=t=>l.price_per_gram=t),class:"w-full"},null,8,["value"])]),_:1}),l.price_per_gram?(i(),g(n,{key:0,label:"وزن نهایی اعمال شده"},{default:u(()=>[a(d,{value:F.value,disabled:""},null,8,["value"])]),_:1})):f("",!0)])):f("",!0),a(n,{label:"توضیحات"},{default:u(()=>[a(B,{value:l.note,"onUpdate:value":e[14]||(e[14]=t=>l.note=t),"auto-size":{minRows:3,maxRows:5}},null,8,["value"])]),_:1})]),_:1},8,["open","id","loading","submitting"])):(i(),g(I,{key:1,spinning:w.value},{default:u(()=>[a(T,{layout:"vertical",onSubmit:Y(N,["prevent"])},{default:u(()=>[a(P,{title:"ثبت سند مالی",class:"mb-base"},{default:u(()=>[E("div",ne,[a(n,{label:"نوع سند"},{default:u(()=>[a(b,{value:l.type,"onUpdate:value":e[16]||(e[16]=t=>l.type=t)},{default:u(()=>[a(s,{value:2},{default:u(()=>[...e[35]||(e[35]=[v("حواله",-1)])]),_:1}),a(s,{value:1},{default:u(()=>[...e[36]||(e[36]=[v("آب شده",-1)])]),_:1}),a(s,{value:4},{default:u(()=>[...e[37]||(e[37]=[v("پولی",-1)])]),_:1}),a(s,{value:3},{default:u(()=>[...e[38]||(e[38]=[v("چک",-1)])]),_:1})]),_:1},8,["value"])]),_:1}),a(n,{label:"مشتری","validate-status":_.customer_id?"error":"",help:_.customer_id},{default:u(()=>[a(b,{value:l.customer_id,"onUpdate:value":e[17]||(e[17]=t=>l.customer_id=t),"show-search":"","option-filter-prop":"children","filter-option":S,placeholder:"انتخاب کنید"},{default:u(()=>[(i(!0),m(O,null,L(c.value,t=>(i(),g(s,{key:t.id,value:t.id},{default:u(()=>[v(A(`${t.name} - ${t.mobile}`),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1},8,["validate-status","help"])]),l.type==1?(i(),m("div",oe,[a(n,{label:"وزن (گرم)"},{default:u(()=>[a(r,{value:l.original_value,"onUpdate:value":e[18]||(e[18]=t=>l.original_value=t),class:"w-full",step:.001},null,8,["value"])]),_:1}),a(n,{label:"عیار"},{default:u(()=>[a(r,{value:l.ayar,"onUpdate:value":e[19]||(e[19]=t=>l.ayar=t),class:"w-full"},null,8,["value"])]),_:1}),a(n,{label:"نام آزمایشگاه"},{default:u(()=>[a(d,{value:l.lab,"onUpdate:value":e[20]||(e[20]=t=>l.lab=t)},null,8,["value"])]),_:1}),a(n,{label:"انگ"},{default:u(()=>[a(d,{value:l.ang,"onUpdate:value":e[21]||(e[21]=t=>l.ang=t)},null,8,["value"])]),_:1}),a(n,{label:"وزن نهایی اعمال شده"},{default:u(()=>[a(d,{value:C.value,disabled:""},null,8,["value"])]),_:1})])):f("",!0),l.type==2?(i(),m("div",se,[a(n,{label:"وزن (گرم)"},{default:u(()=>[a(r,{value:l.value,"onUpdate:value":e[22]||(e[22]=t=>l.value=t),class:"w-full",step:.001},null,8,["value"])]),_:1}),a(n,{label:"حواله به"},{default:u(()=>[a(d,{value:l.to,"onUpdate:value":e[23]||(e[23]=t=>l.to=t)},null,8,["value"])]),_:1})])):f("",!0),l.type==3?(i(),m("div",ie,[a(n,{label:"مبلغ چک"},{default:u(()=>[a(r,{value:l.price,"onUpdate:value":e[24]||(e[24]=t=>l.price=t),class:"w-full"},null,8,["value"])]),_:1}),a(n,{label:"وزن (گرم)"},{default:u(()=>[a(r,{value:l.value,"onUpdate:value":e[25]||(e[25]=t=>l.value=t),class:"w-full",step:.001},null,8,["value"])]),_:1}),a(n,{label:"نام صاحب حساب"},{default:u(()=>[a(d,{value:l.account_name,"onUpdate:value":e[26]||(e[26]=t=>l.account_name=t)},null,8,["value"])]),_:1}),a(n,{label:"نام بانک"},{default:u(()=>[a(d,{value:l.bank_name,"onUpdate:value":e[27]||(e[27]=t=>l.bank_name=t)},null,8,["value"])]),_:1})])):f("",!0),l.type==4?(i(),m("div",re,[a(n,{label:"میزان پول"},{default:u(()=>[a(r,{value:l.price,"onUpdate:value":e[28]||(e[28]=t=>l.price=t),class:"w-full"},null,8,["value"])]),_:1}),a(n,{label:"مظنه"},{default:u(()=>[a(r,{value:l.price_per_gram,"onUpdate:value":e[29]||(e[29]=t=>l.price_per_gram=t),class:"w-full"},null,8,["value"])]),_:1}),l.price_per_gram?(i(),g(n,{key:0,label:"وزن نهایی اعمال شده"},{default:u(()=>[a(d,{value:F.value,disabled:""},null,8,["value"])]),_:1})):f("",!0)])):f("",!0),a(n,{label:"توضیحات"},{default:u(()=>[a(B,{value:l.note,"onUpdate:value":e[30]||(e[30]=t=>l.note=t),"auto-size":{minRows:3,maxRows:5}},null,8,["value"])]),_:1}),a(H,{type:"primary",onClick:N},{default:u(()=>[...e[39]||(e[39]=[v("ثبت اطلاعات",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["spinning"]))}}});export{me as _}; diff --git a/apps/admin-panel/dist/assets/auth-Cu4qHRNu.js b/apps/admin-panel/dist/assets/auth-Cu4qHRNu.js new file mode 100644 index 0000000..d5fe3aa --- /dev/null +++ b/apps/admin-panel/dist/assets/auth-Cu4qHRNu.js @@ -0,0 +1 @@ +import{J as u,x as l,O as c,P as s,Q as a,u as n}from"./index-CVG99b4v.js";const m=u("auth",{state:()=>({userPermission:[]}),getters:{token:()=>localStorage.getItem(s),user:()=>{const e=localStorage.getItem(a);if(!e)return null;try{return JSON.parse(e)}catch{return null}},isLoggedIn(){return!!this.token}},actions:{async login(e){const{data:t}=await l.post("admin-login",e);n().getRoles((t.roles??[]).map(i=>i.rid));const r={...t};return delete r.roles,delete r.ut,this.inject(r),t.iamBootstrapUrl&&window.location.assign(t.iamBootstrapUrl),r},inject(e){localStorage.setItem(s,e.api_token),localStorage.setItem("login","true"),localStorage.setItem(a,JSON.stringify(e))},async logout(){let e=null;try{const{data:o}=await l.get("admin/auth/sso/logout-url",{params:{return_url:c("auth/login")}});e=(o==null?void 0:o.logout_url)??null}catch{e=null}localStorage.removeItem(s),localStorage.removeItem(a),localStorage.removeItem("login"),sessionStorage.removeItem("gb_admin_iam_sso_checked");const t=n();return t.deleteRoles(),t.deleteUserInfo(),e?(window.location.assign(e),!0):!1}}});export{m as u}; diff --git a/apps/admin-panel/dist/assets/auth-Cz9vAefU.js b/apps/admin-panel/dist/assets/auth-Cz9vAefU.js deleted file mode 100644 index 5a392b4..0000000 --- a/apps/admin-panel/dist/assets/auth-Cz9vAefU.js +++ /dev/null @@ -1 +0,0 @@ -import{G as n,L as o,N as s,u as a,x as i}from"./index-WFQJAeoE.js";const g=n("auth",{state:()=>({userPermission:[]}),getters:{token:()=>localStorage.getItem(o),user:()=>{const e=localStorage.getItem(s);if(!e)return null;try{return JSON.parse(e)}catch{return null}},isLoggedIn(){return!!this.token}},actions:{async login(e){const{data:r}=await i.post("admin-login",e);a().getRoles((r.roles??[]).map(l=>l.rid));const t={...r};return delete t.roles,delete t.ut,this.inject(t),t},inject(e){localStorage.setItem(o,e.api_token),localStorage.setItem("login","true"),localStorage.setItem(s,JSON.stringify(e))},logout(){localStorage.removeItem(o),localStorage.removeItem(s),localStorage.removeItem("login");const e=a();e.deleteRoles(),e.deleteUserInfo()}}});export{g as u}; diff --git a/apps/admin-panel/dist/assets/autopromotion-Bla2tr4h.js b/apps/admin-panel/dist/assets/autopromotion-DhtMjf2w.js similarity index 96% rename from apps/admin-panel/dist/assets/autopromotion-Bla2tr4h.js rename to apps/admin-panel/dist/assets/autopromotion-DhtMjf2w.js index 31fdc53..30c28af 100644 --- a/apps/admin-panel/dist/assets/autopromotion-Bla2tr4h.js +++ b/apps/admin-panel/dist/assets/autopromotion-DhtMjf2w.js @@ -1 +1 @@ -import{d as k,v as x,x as _,a as B,w as r,A as C,l as m,y as f,r as o,o as N,c as s,n as V,f as z,z as v}from"./index-WFQJAeoE.js";const M={class:"grid-3"},j=k({__name:"autopromotion",setup(S){const u=m(!1),l=m(!1),c=f({discount_percent:void 0}),i=f({});async function d(){var t,e;if(Object.keys(i).forEach(a=>delete i[a]),c.discount_percent===void 0||c.discount_percent===null){i.discount_percent="وارد کردن درصد تخفیف اتوماتیک الزامی است";return}try{u.value=!0,await _.post("autopromotion",{state:l.value,discount_percent:c.discount_percent}),v.success("اطلاعات با موفقیت به ثبت رسید.")}catch(a){v.error(((e=(t=a==null?void 0:a.response)==null?void 0:t.data)==null?void 0:e.message)??"خطا در ثبت اطلاعات.")}finally{u.value=!1}}return x(async()=>{try{const{data:t}=await _.get("autopromotion");l.value=!!t.state,c.discount_percent=t.discount_percent??void 0}catch(t){console.log(t)}}),(t,e)=>{const a=o("a-switch"),p=o("a-form-item"),b=o("a-input-number"),y=o("a-card"),h=o("a-spin"),w=o("a-button"),g=o("a-form");return N(),B(g,{layout:"vertical",onSubmit:C(d,["prevent"])},{default:r(()=>[s(h,{spinning:u.value},{default:r(()=>[s(y,{title:"تخفیف اتوماتیک یکبار مصرف ویژه مشتریان جدید",class:"mb-base"},{default:r(()=>[V("div",M,[s(p,{label:"وضعیت تخفیف اتوماتیک"},{default:r(()=>[s(a,{checked:l.value,"onUpdate:checked":e[0]||(e[0]=n=>l.value=n),size:"default"},null,8,["checked"])]),_:1}),s(p,{label:"درصد تخفیف اتوماتیک روی محصولات","validate-status":i.discount_percent?"error":"",help:i.discount_percent},{default:r(()=>[s(b,{value:c.discount_percent,"onUpdate:value":e[1]||(e[1]=n=>c.discount_percent=n),dir:"ltr",min:0,max:100,formatter:n=>`${n}%`,parser:n=>n.replace("%",""),style:{width:"100%"}},null,8,["value","formatter","parser"])]),_:1},8,["validate-status","help"])])]),_:1})]),_:1},8,["spinning"]),s(w,{type:"primary",class:"mr-4",onClick:d},{default:r(()=>[...e[2]||(e[2]=[z("ثبت اطلاعات",-1)])]),_:1})]),_:1})}}});export{j as default}; +import{d as k,v as x,x as _,a as B,w as r,A as C,l as m,y as f,r as o,o as N,c as s,n as V,f as z,z as v}from"./index-CVG99b4v.js";const M={class:"grid-3"},j=k({__name:"autopromotion",setup(S){const u=m(!1),l=m(!1),c=f({discount_percent:void 0}),i=f({});async function d(){var t,e;if(Object.keys(i).forEach(a=>delete i[a]),c.discount_percent===void 0||c.discount_percent===null){i.discount_percent="وارد کردن درصد تخفیف اتوماتیک الزامی است";return}try{u.value=!0,await _.post("autopromotion",{state:l.value,discount_percent:c.discount_percent}),v.success("اطلاعات با موفقیت به ثبت رسید.")}catch(a){v.error(((e=(t=a==null?void 0:a.response)==null?void 0:t.data)==null?void 0:e.message)??"خطا در ثبت اطلاعات.")}finally{u.value=!1}}return x(async()=>{try{const{data:t}=await _.get("autopromotion");l.value=!!t.state,c.discount_percent=t.discount_percent??void 0}catch(t){console.log(t)}}),(t,e)=>{const a=o("a-switch"),p=o("a-form-item"),b=o("a-input-number"),y=o("a-card"),h=o("a-spin"),w=o("a-button"),g=o("a-form");return N(),B(g,{layout:"vertical",onSubmit:C(d,["prevent"])},{default:r(()=>[s(h,{spinning:u.value},{default:r(()=>[s(y,{title:"تخفیف اتوماتیک یکبار مصرف ویژه مشتریان جدید",class:"mb-base"},{default:r(()=>[V("div",M,[s(p,{label:"وضعیت تخفیف اتوماتیک"},{default:r(()=>[s(a,{checked:l.value,"onUpdate:checked":e[0]||(e[0]=n=>l.value=n),size:"default"},null,8,["checked"])]),_:1}),s(p,{label:"درصد تخفیف اتوماتیک روی محصولات","validate-status":i.discount_percent?"error":"",help:i.discount_percent},{default:r(()=>[s(b,{value:c.discount_percent,"onUpdate:value":e[1]||(e[1]=n=>c.discount_percent=n),dir:"ltr",min:0,max:100,formatter:n=>`${n}%`,parser:n=>n.replace("%",""),style:{width:"100%"}},null,8,["value","formatter","parser"])]),_:1},8,["validate-status","help"])])]),_:1})]),_:1},8,["spinning"]),s(w,{type:"primary",class:"mr-4",onClick:d},{default:r(()=>[...e[2]||(e[2]=[z("ثبت اطلاعات",-1)])]),_:1})]),_:1})}}});export{j as default}; diff --git a/apps/admin-panel/dist/assets/bulkCustomer.vue_vue_type_script_setup_true_lang-BLZHRH0s.js b/apps/admin-panel/dist/assets/bulkCustomer.vue_vue_type_script_setup_true_lang-BLZHRH0s.js new file mode 100644 index 0000000..a9186bc --- /dev/null +++ b/apps/admin-panel/dist/assets/bulkCustomer.vue_vue_type_script_setup_true_lang-BLZHRH0s.js @@ -0,0 +1 @@ +import{d as Y,v as Z,x as b,a as k,h as ee,w as n,A as le,j as ae,l as h,y as B,z as L,r as p,o as _,c as t,n as v,b as x,e as z,F as N,f as U,k as te,t as O}from"./index-CVG99b4v.js";import{_ as ne}from"./BaseFormModal.vue_vue_type_script_setup_true_lang-CWur6xTz.js";import{_ as g}from"./ImageUploadInput.vue_vue_type_script_setup_true_lang-C8WW9alD.js";import{_ as T}from"./CityTreeSelect.vue_vue_type_script_setup_true_lang-Ctf4a2EQ.js";import{D as q}from"./DateInput-P3xqxLM7.js";const oe={class:"grid-4"},se={class:"grid-4"},ue={class:"grid-2"},de={class:"grid-3"},ie={class:"grid-4"},re={class:"grid-4"},pe={class:"grid-2"},me={class:"grid-3"},ce=Y({__name:"bulkCustomer",props:{open:{type:Boolean},id:{},asModal:{type:Boolean}},emits:["update:open","success"],setup(j,{emit:A}){const R=j,M=A,C=R.asModal===!0,G=ae(),H=te(),f=C?R.id:G.params.id,c=h(!1),w=h([]),S=h([]),a=B({fname:"",lname:"",ncode:"",password:"",mobile:"",store_name:"",phone:"",pasazh_name:"",city_id:void 0,mcode:"",birth_date:"",address:"",type:void 0,reagent_id:void 0,percent:3,gram_level:void 0,national_id_image:"",business_license:"",shop_image:""}),I=[{id:2,title:"مغازه دار اپلیکیشن"},{id:3,title:"مغازه دار حضوری"},{id:4,title:"بنکدار"}];function J(d,e){var s,o;return String(((o=(s=e==null?void 0:e.children)==null?void 0:s[0])==null?void 0:o.children)??"").includes(d)}const u=B({}),D=B({});function K(){const d={};for(const[e,s]of Object.entries(a))JSON.stringify(s)!==JSON.stringify(D[e])&&(d[e]=s);return d}async function E(d){var s;if(!d)return;let e=(s=w.value.find(o=>o.id===d))==null?void 0:s.percent;if(!Number(e))try{const{data:o}=await b.get(`cities/get-percent-aux/${d}`);e=o}catch(o){console.log(o);return}a.percent=e==null?void 0:Number(e)}function P(){return Object.keys(u).forEach(d=>delete u[d]),a.fname||(u.fname="لطفا مقدار را وارد کنید"),a.lname||(u.lname="لطفا مقدار را وارد کنید"),a.mobile||(u.mobile="لطفا مقدار را وارد کنید"),(a.percent===void 0||a.percent===null||a.percent==="")&&(u.percent="لطفا مقدار را وارد کنید"),Object.keys(u).length===0}async function $(){var d,e,s,o,y,r;if(P())try{c.value=!0;const i=f?K():{...a},m={...i,id:f??null,national_code:a.ncode};(!f||"fname"in i||"lname"in i)&&(m.name=`${a.fname} ${a.lname}`.trim()),f?await b.put(`customer/${f}`,m):await b.post("customer/create",m),L.info("اطلاعات با موفقیت به ثبت رسید."),C?(M("success"),M("update:open",!1)):H.go(-1)}catch(i){const m=(o=(s=(e=(d=i==null?void 0:i.response)==null?void 0:d.data)==null?void 0:e.errors)==null?void 0:s.mobile)==null?void 0:o[0];L.error(m??((r=(y=i==null?void 0:i.response)==null?void 0:y.data)==null?void 0:r.message)??"خطا در ثبت اطلاعات.")}finally{c.value=!1}}return Z(async()=>{var d;try{const{data:e}=await b.get("query/reagent");S.value=e}catch(e){console.log(e)}try{const{data:e}=await b.post("cities/list");w.value=e.rows}catch(e){console.log(e)}if(f)try{const{data:e}=await b.get(`customer/${f}`);Object.assign(a,{fname:e.fname??"",lname:e.lname??"",ncode:e.national_code??"",mobile:e.mobile??"",city_id:e.city_id??void 0,address:e.address??"",percent:e.percent===null||e.percent===void 0?void 0:Number(e.percent),gram_level:e.gram_level??void 0,reagent_id:((d=e.reagent)==null?void 0:d.id)??void 0,store_name:e.store_name??"",pasazh_name:e.pasazh_name??"",mcode:e.mcode??"",birth_date:e.birth_date??"",phone:e.phone??"",type:e.type??void 0,national_id_image:e.national_id_image??"",business_license:e.business_license??"",shop_image:e.shop_image??""}),Object.assign(D,JSON.parse(JSON.stringify(a)))}catch(e){console.log(e)}}),(d,e)=>{const s=p("a-input"),o=p("a-form-item"),y=p("a-input-password"),r=p("a-card"),i=p("a-select-option"),m=p("a-select"),V=p("a-input-number"),F=p("a-textarea"),Q=p("a-button"),W=p("a-spin"),X=p("a-form");return C?(_(),k(ne,{key:0,open:!!j.open,id:ee(f),"add-title":"افزودن مشتری عمده","edit-title":"ویرایش مشتری عمده",loading:c.value,submitting:c.value,width:"lg","onUpdate:open":e[19]||(e[19]=l=>d.$emit("update:open",l)),onSubmit:$},{default:n(()=>[t(r,{title:"اطلاعات پایه",class:"mb-base"},{default:n(()=>[v("div",oe,[t(o,{label:"نام","validate-status":u.fname?"error":"",help:u.fname},{default:n(()=>[t(s,{value:a.fname,"onUpdate:value":e[0]||(e[0]=l=>a.fname=l)},null,8,["value"])]),_:1},8,["validate-status","help"]),t(o,{label:"نام خانوادگی","validate-status":u.lname?"error":"",help:u.lname},{default:n(()=>[t(s,{value:a.lname,"onUpdate:value":e[1]||(e[1]=l=>a.lname=l)},null,8,["value"])]),_:1},8,["validate-status","help"]),t(o,{label:"کد ملی"},{default:n(()=>[t(s,{value:a.ncode,"onUpdate:value":e[2]||(e[2]=l=>a.ncode=l)},null,8,["value"])]),_:1}),t(o,{label:"شماره تلفن همراه","validate-status":u.mobile?"error":"",help:u.mobile},{default:n(()=>[t(s,{value:a.mobile,"onUpdate:value":e[3]||(e[3]=l=>a.mobile=l)},null,8,["value"])]),_:1},8,["validate-status","help"]),t(o,{label:"رمز عبور"},{default:n(()=>[t(y,{value:a.password,"onUpdate:value":e[4]||(e[4]=l=>a.password=l)},null,8,["value"])]),_:1}),t(o,{label:"تلفن ثابت"},{default:n(()=>[t(s,{value:a.phone,"onUpdate:value":e[5]||(e[5]=l=>a.phone=l)},null,8,["value"])]),_:1})])]),_:1}),t(r,{title:"اطلاعات تجاری",class:"mb-base"},{default:n(()=>[v("div",se,[t(o,{label:"نوع کاربری"},{default:n(()=>[t(m,{value:a.type,"onUpdate:value":e[6]||(e[6]=l=>a.type=l),"show-search":"","filter-option":J,style:{width:"100%",direction:"rtl !important"}},{default:n(()=>[(_(),x(N,null,z(I,l=>t(i,{key:l.id,value:l.id},{default:n(()=>[U(O(l.title),1)]),_:2},1032,["value"])),64))]),_:1},8,["value"])]),_:1}),t(o,{label:"نام مغازه"},{default:n(()=>[t(s,{value:a.store_name,"onUpdate:value":e[7]||(e[7]=l=>a.store_name=l)},null,8,["value"])]),_:1}),t(o,{label:"نام پاساژ"},{default:n(()=>[t(s,{value:a.pasazh_name,"onUpdate:value":e[8]||(e[8]=l=>a.pasazh_name=l)},null,8,["value"])]),_:1}),t(o,{label:"کد مشتری"},{default:n(()=>[t(s,{value:a.mcode,"onUpdate:value":e[9]||(e[9]=l=>a.mcode=l)},null,8,["value"])]),_:1}),t(q,{"model-value":a.birth_date||void 0,label:"تاریخ تولد","onUpdate:modelValue":e[10]||(e[10]=l=>a.birth_date=l??"")},null,8,["model-value"]),t(o,{label:"کارشناس فروش"},{default:n(()=>[t(m,{value:a.reagent_id,"onUpdate:value":e[11]||(e[11]=l=>a.reagent_id=l),"allow-clear":"",placeholder:"انتخاب کنید"},{default:n(()=>[(_(!0),x(N,null,z(S.value,l=>(_(),k(i,{key:l.id,value:l.id},{default:n(()=>[U(O(l.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1}),t(o,{label:"درصد","validate-status":u.percent?"error":"",help:u.percent},{default:n(()=>[t(V,{value:a.percent,"onUpdate:value":e[12]||(e[12]=l=>a.percent=l),class:"w-full"},null,8,["value"])]),_:1},8,["validate-status","help"]),t(o,{label:"سقف اعتبار (برحسب گرم)"},{default:n(()=>[t(V,{value:a.gram_level,"onUpdate:value":e[13]||(e[13]=l=>a.gram_level=l),class:"w-full"},null,8,["value"])]),_:1})])]),_:1}),t(r,{title:"اطلاعات تکمیلی",class:"mb-base"},{default:n(()=>[v("div",ue,[t(o,{label:"شهر"},{default:n(()=>[t(T,{value:a.city_id,"onUpdate:value":e[14]||(e[14]=l=>a.city_id=l),cities:w.value,onChange:E},null,8,["value","cities"])]),_:1}),t(o,{label:"آدرس"},{default:n(()=>[t(F,{value:a.address,"onUpdate:value":e[15]||(e[15]=l=>a.address=l),"auto-size":{minRows:2,maxRows:4}},null,8,["value"])]),_:1})])]),_:1}),t(r,{title:"مدارک",class:"mb-base"},{default:n(()=>[v("div",de,[t(o,{label:"عکس کارت ملی"},{default:n(()=>[t(g,{modelValue:a.national_id_image,"onUpdate:modelValue":e[16]||(e[16]=l=>a.national_id_image=l),purpose:"customer.nationalId",placeholder:"عکس"},null,8,["modelValue"])]),_:1}),t(o,{label:"عکس جواز کسب"},{default:n(()=>[t(g,{modelValue:a.business_license,"onUpdate:modelValue":e[17]||(e[17]=l=>a.business_license=l),purpose:"customer.businessLicense",placeholder:"عکس"},null,8,["modelValue"])]),_:1}),t(o,{label:"عکس سردر مغازه"},{default:n(()=>[t(g,{modelValue:a.shop_image,"onUpdate:modelValue":e[18]||(e[18]=l=>a.shop_image=l),purpose:"customer.shop",placeholder:"عکس"},null,8,["modelValue"])]),_:1})])]),_:1})]),_:1},8,["open","id","loading","submitting"])):(_(),k(X,{key:1,layout:"vertical",model:a,onSubmit:le($,["prevent"])},{default:n(()=>[t(W,{spinning:c.value},{default:n(()=>[t(r,{title:"اطلاعات پایه",class:"mb-base"},{default:n(()=>[v("div",ie,[t(o,{label:"نام","validate-status":u.fname?"error":"",help:u.fname},{default:n(()=>[t(s,{value:a.fname,"onUpdate:value":e[20]||(e[20]=l=>a.fname=l)},null,8,["value"])]),_:1},8,["validate-status","help"]),t(o,{label:"نام خانوادگی","validate-status":u.lname?"error":"",help:u.lname},{default:n(()=>[t(s,{value:a.lname,"onUpdate:value":e[21]||(e[21]=l=>a.lname=l)},null,8,["value"])]),_:1},8,["validate-status","help"]),t(o,{label:"کد ملی"},{default:n(()=>[t(s,{value:a.ncode,"onUpdate:value":e[22]||(e[22]=l=>a.ncode=l)},null,8,["value"])]),_:1}),t(o,{label:"شماره تلفن همراه","validate-status":u.mobile?"error":"",help:u.mobile},{default:n(()=>[t(s,{value:a.mobile,"onUpdate:value":e[23]||(e[23]=l=>a.mobile=l)},null,8,["value"])]),_:1},8,["validate-status","help"]),t(o,{label:"رمز عبور"},{default:n(()=>[t(y,{value:a.password,"onUpdate:value":e[24]||(e[24]=l=>a.password=l)},null,8,["value"])]),_:1}),t(o,{label:"تلفن ثابت"},{default:n(()=>[t(s,{value:a.phone,"onUpdate:value":e[25]||(e[25]=l=>a.phone=l)},null,8,["value"])]),_:1})])]),_:1}),t(r,{title:"اطلاعات تجاری",class:"mb-base"},{default:n(()=>[v("div",re,[t(o,{label:"نوع کاربری"},{default:n(()=>[t(m,{value:a.type,"onUpdate:value":e[26]||(e[26]=l=>a.type=l),"show-search":"","filter-option":J,style:{width:"100%",direction:"rtl !important"}},{default:n(()=>[(_(),x(N,null,z(I,l=>t(i,{key:l.id,value:l.id},{default:n(()=>[U(O(l.title),1)]),_:2},1032,["value"])),64))]),_:1},8,["value"])]),_:1}),t(o,{label:"نام مغازه"},{default:n(()=>[t(s,{value:a.store_name,"onUpdate:value":e[27]||(e[27]=l=>a.store_name=l)},null,8,["value"])]),_:1}),t(o,{label:"نام پاساژ"},{default:n(()=>[t(s,{value:a.pasazh_name,"onUpdate:value":e[28]||(e[28]=l=>a.pasazh_name=l)},null,8,["value"])]),_:1}),t(o,{label:"کد مشتری"},{default:n(()=>[t(s,{value:a.mcode,"onUpdate:value":e[29]||(e[29]=l=>a.mcode=l)},null,8,["value"])]),_:1}),t(q,{"model-value":a.birth_date||void 0,label:"تاریخ تولد","onUpdate:modelValue":e[30]||(e[30]=l=>a.birth_date=l??"")},null,8,["model-value"]),t(o,{label:"کارشناس فروش"},{default:n(()=>[t(m,{value:a.reagent_id,"onUpdate:value":e[31]||(e[31]=l=>a.reagent_id=l),"allow-clear":"",placeholder:"انتخاب کنید"},{default:n(()=>[(_(!0),x(N,null,z(S.value,l=>(_(),k(i,{key:l.id,value:l.id},{default:n(()=>[U(O(l.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1}),t(o,{label:"درصد","validate-status":u.percent?"error":"",help:u.percent},{default:n(()=>[t(V,{value:a.percent,"onUpdate:value":e[32]||(e[32]=l=>a.percent=l),class:"w-full"},null,8,["value"])]),_:1},8,["validate-status","help"]),t(o,{label:"سقف اعتبار (برحسب گرم)"},{default:n(()=>[t(V,{value:a.gram_level,"onUpdate:value":e[33]||(e[33]=l=>a.gram_level=l),class:"w-full"},null,8,["value"])]),_:1})])]),_:1}),t(r,{title:"اطلاعات تکمیلی",class:"mb-base"},{default:n(()=>[v("div",pe,[t(o,{label:"شهر"},{default:n(()=>[t(T,{value:a.city_id,"onUpdate:value":e[34]||(e[34]=l=>a.city_id=l),cities:w.value,onChange:E},null,8,["value","cities"])]),_:1}),t(o,{label:"آدرس"},{default:n(()=>[t(F,{value:a.address,"onUpdate:value":e[35]||(e[35]=l=>a.address=l),"auto-size":{minRows:2,maxRows:4}},null,8,["value"])]),_:1})])]),_:1}),t(r,{title:"مدارک",class:"mb-base"},{default:n(()=>[v("div",me,[t(o,{label:"عکس کارت ملی"},{default:n(()=>[t(g,{modelValue:a.national_id_image,"onUpdate:modelValue":e[36]||(e[36]=l=>a.national_id_image=l),purpose:"customer.nationalId",placeholder:"عکس"},null,8,["modelValue"])]),_:1}),t(o,{label:"عکس جواز کسب"},{default:n(()=>[t(g,{modelValue:a.business_license,"onUpdate:modelValue":e[37]||(e[37]=l=>a.business_license=l),purpose:"customer.businessLicense",placeholder:"عکس"},null,8,["modelValue"])]),_:1}),t(o,{label:"عکس سردر مغازه"},{default:n(()=>[t(g,{modelValue:a.shop_image,"onUpdate:modelValue":e[38]||(e[38]=l=>a.shop_image=l),purpose:"customer.shop",placeholder:"عکس"},null,8,["modelValue"])]),_:1})])]),_:1}),v("div",null,[t(Q,{type:"primary",class:"mr-4",onClick:$},{default:n(()=>[...e[39]||(e[39]=[U("ثبت اطلاعات",-1)])]),_:1})])]),_:1},8,["spinning"])]),_:1},8,["model"]))}}});export{ce as _}; diff --git a/apps/admin-panel/dist/assets/bulkCustomer.vue_vue_type_script_setup_true_lang-zBMtv664.js b/apps/admin-panel/dist/assets/bulkCustomer.vue_vue_type_script_setup_true_lang-zBMtv664.js deleted file mode 100644 index 5284df7..0000000 --- a/apps/admin-panel/dist/assets/bulkCustomer.vue_vue_type_script_setup_true_lang-zBMtv664.js +++ /dev/null @@ -1 +0,0 @@ -import{d as W,v as X,x as O,a as g,h as Y,w as n,A as Z,j as ee,l as j,y as C,z as T,r as v,o as r,c as a,n as f,b as y,e as c,F as U,f as b,k as le,t as w}from"./index-WFQJAeoE.js";import{_ as ae}from"./BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js";import{_ as V}from"./ImageUploadInput.vue_vue_type_script_setup_true_lang-BQ_i_QZe.js";const te={class:"grid-4"},ne={class:"grid-4"},oe={class:"grid-2"},se={class:"grid-3"},ue={class:"grid-4"},de={class:"grid-4"},ie={class:"grid-2"},re={class:"grid-3"},fe=W({__name:"bulkCustomer",props:{open:{type:Boolean},id:{},asModal:{type:Boolean}},emits:["update:open","success"],setup(R,{emit:q}){const h=R,M=q,x=h.asModal===!0,A=ee(),D=le(),_=x?h.id:A.params.id,k=j(!1),B=j([]),N=j([]),t=C({fname:"",lname:"",ncode:"",password:"",mobile:"",store_name:"",phone:"",pasazh_name:"",city_id:void 0,mcode:"",address:"",type:void 0,reagent_id:void 0,percent:void 0,gram_level:void 0,national_id_image:"",business_license:"",shop_image:""}),J=[{id:2,title:"مغازه دار اپلیکیشن"},{id:3,title:"مغازه دار حضوری"},{id:4,title:"بنکدار"}];function E(d,e){var s,o;return String(((o=(s=e==null?void 0:e.children)==null?void 0:s[0])==null?void 0:o.children)??"").includes(d)}const u=C({}),F=C({});function G(){const d={};for(const[e,s]of Object.entries(t))JSON.stringify(s)!==JSON.stringify(F[e])&&(d[e]=s);return d}function I(d,e){var s,o;return String(((o=(s=e==null?void 0:e.children)==null?void 0:s[0])==null?void 0:o.children)??"").includes(d)}function H(){return Object.keys(u).forEach(d=>delete u[d]),t.fname||(u.fname="لطفا مقدار را وارد کنید"),t.lname||(u.lname="لطفا مقدار را وارد کنید"),t.mobile||(u.mobile="لطفا مقدار را وارد کنید"),Object.keys(u).length===0}async function $(){var d,e,s,o,z,m;if(H())try{k.value=!0;const p={..._?G():{...t},id:_??null,name:`${t.fname} ${t.lname}`.trim(),national_code:t.ncode};_?await O.put(`customer/${_}`,p):await O.post("customer/create",p),T.info("اطلاعات با موفقیت به ثبت رسید."),x?(M("success"),M("update:open",!1)):D.go(-1)}catch(i){const p=(o=(s=(e=(d=i==null?void 0:i.response)==null?void 0:d.data)==null?void 0:e.errors)==null?void 0:s.mobile)==null?void 0:o[0];T.error(p??((m=(z=i==null?void 0:i.response)==null?void 0:z.data)==null?void 0:m.message)??"خطا در ثبت اطلاعات.")}finally{k.value=!1}}return X(async()=>{var d;try{const{data:e}=await O.get("query/reagent");N.value=e}catch(e){console.log(e)}try{const{data:e}=await O.post("cities/list");B.value=e.rows}catch(e){console.log(e)}if(_)try{const{data:e}=await O.get(`customer/${_}`);Object.assign(t,{fname:e.fname??"",lname:e.lname??"",ncode:e.national_code??"",mobile:e.mobile??"",city_id:e.city_id??void 0,address:e.address??"",percent:e.percent??void 0,gram_level:e.gram_level??void 0,reagent_id:((d=e.reagent)==null?void 0:d.id)??void 0,store_name:e.store_name??"",pasazh_name:e.pasazh_name??"",mcode:e.mcode??"",phone:e.phone??"",type:e.type??void 0,national_id_image:e.national_id_image??"",business_license:e.business_license??"",shop_image:e.shop_image??""}),Object.assign(F,JSON.parse(JSON.stringify(t)))}catch(e){console.log(e)}}),(d,e)=>{const s=v("a-input"),o=v("a-form-item"),z=v("a-input-password"),m=v("a-card"),i=v("a-select-option"),p=v("a-select"),S=v("a-input-number"),L=v("a-textarea"),K=v("a-button"),P=v("a-spin"),Q=v("a-form");return x?(r(),g(ae,{key:0,open:!!R.open,id:Y(_),"add-title":"افزودن مشتری عمده","edit-title":"ویرایش مشتری عمده",loading:k.value,submitting:k.value,width:"lg","onUpdate:open":e[18]||(e[18]=l=>d.$emit("update:open",l)),onSubmit:$},{default:n(()=>[a(m,{title:"اطلاعات پایه",class:"mb-base"},{default:n(()=>[f("div",te,[a(o,{label:"نام","validate-status":u.fname?"error":"",help:u.fname},{default:n(()=>[a(s,{value:t.fname,"onUpdate:value":e[0]||(e[0]=l=>t.fname=l)},null,8,["value"])]),_:1},8,["validate-status","help"]),a(o,{label:"نام خانوادگی","validate-status":u.lname?"error":"",help:u.lname},{default:n(()=>[a(s,{value:t.lname,"onUpdate:value":e[1]||(e[1]=l=>t.lname=l)},null,8,["value"])]),_:1},8,["validate-status","help"]),a(o,{label:"کد ملی"},{default:n(()=>[a(s,{value:t.ncode,"onUpdate:value":e[2]||(e[2]=l=>t.ncode=l)},null,8,["value"])]),_:1}),a(o,{label:"شماره تلفن همراه","validate-status":u.mobile?"error":"",help:u.mobile},{default:n(()=>[a(s,{value:t.mobile,"onUpdate:value":e[3]||(e[3]=l=>t.mobile=l)},null,8,["value"])]),_:1},8,["validate-status","help"]),a(o,{label:"رمز عبور"},{default:n(()=>[a(z,{value:t.password,"onUpdate:value":e[4]||(e[4]=l=>t.password=l)},null,8,["value"])]),_:1}),a(o,{label:"تلفن ثابت"},{default:n(()=>[a(s,{value:t.phone,"onUpdate:value":e[5]||(e[5]=l=>t.phone=l)},null,8,["value"])]),_:1})])]),_:1}),a(m,{title:"اطلاعات تجاری",class:"mb-base"},{default:n(()=>[f("div",ne,[a(o,{label:"نوع کاربری"},{default:n(()=>[a(p,{value:t.type,"onUpdate:value":e[6]||(e[6]=l=>t.type=l),"show-search":"","filter-option":E,style:{width:"100%",direction:"rtl !important"}},{default:n(()=>[(r(),y(U,null,c(J,l=>a(i,{key:l.id,value:l.id},{default:n(()=>[b(w(l.title),1)]),_:2},1032,["value"])),64))]),_:1},8,["value"])]),_:1}),a(o,{label:"نام مغازه"},{default:n(()=>[a(s,{value:t.store_name,"onUpdate:value":e[7]||(e[7]=l=>t.store_name=l)},null,8,["value"])]),_:1}),a(o,{label:"نام پاساژ"},{default:n(()=>[a(s,{value:t.pasazh_name,"onUpdate:value":e[8]||(e[8]=l=>t.pasazh_name=l)},null,8,["value"])]),_:1}),a(o,{label:"کد مشتری"},{default:n(()=>[a(s,{value:t.mcode,"onUpdate:value":e[9]||(e[9]=l=>t.mcode=l)},null,8,["value"])]),_:1}),a(o,{label:"کارشناس فروش"},{default:n(()=>[a(p,{value:t.reagent_id,"onUpdate:value":e[10]||(e[10]=l=>t.reagent_id=l),"allow-clear":"",placeholder:"انتخاب کنید"},{default:n(()=>[(r(!0),y(U,null,c(N.value,l=>(r(),g(i,{key:l.id,value:l.id},{default:n(()=>[b(w(l.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1}),a(o,{label:"درصد"},{default:n(()=>[a(S,{value:t.percent,"onUpdate:value":e[11]||(e[11]=l=>t.percent=l),class:"w-full"},null,8,["value"])]),_:1}),a(o,{label:"سقف اعتبار (برحسب گرم)"},{default:n(()=>[a(S,{value:t.gram_level,"onUpdate:value":e[12]||(e[12]=l=>t.gram_level=l),class:"w-full"},null,8,["value"])]),_:1})])]),_:1}),a(m,{title:"اطلاعات تکمیلی",class:"mb-base"},{default:n(()=>[f("div",oe,[a(o,{label:"شهر"},{default:n(()=>[a(p,{value:t.city_id,"onUpdate:value":e[13]||(e[13]=l=>t.city_id=l),"show-search":"","allow-clear":"",placeholder:"انتخاب کنید","filter-option":I},{default:n(()=>[(r(!0),y(U,null,c(B.value,l=>(r(),g(i,{key:l.id,value:l.id},{default:n(()=>[b(w(l.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1}),a(o,{label:"آدرس"},{default:n(()=>[a(L,{value:t.address,"onUpdate:value":e[14]||(e[14]=l=>t.address=l),"auto-size":{minRows:2,maxRows:4}},null,8,["value"])]),_:1})])]),_:1}),a(m,{title:"مدارک",class:"mb-base"},{default:n(()=>[f("div",se,[a(o,{label:"عکس کارت ملی"},{default:n(()=>[a(V,{modelValue:t.national_id_image,"onUpdate:modelValue":e[15]||(e[15]=l=>t.national_id_image=l),purpose:"customer.nationalId",placeholder:"عکس"},null,8,["modelValue"])]),_:1}),a(o,{label:"عکس جواز کسب"},{default:n(()=>[a(V,{modelValue:t.business_license,"onUpdate:modelValue":e[16]||(e[16]=l=>t.business_license=l),purpose:"customer.businessLicense",placeholder:"عکس"},null,8,["modelValue"])]),_:1}),a(o,{label:"عکس سردر مغازه"},{default:n(()=>[a(V,{modelValue:t.shop_image,"onUpdate:modelValue":e[17]||(e[17]=l=>t.shop_image=l),purpose:"customer.shop",placeholder:"عکس"},null,8,["modelValue"])]),_:1})])]),_:1})]),_:1},8,["open","id","loading","submitting"])):(r(),g(Q,{key:1,layout:"vertical",model:t,onSubmit:Z($,["prevent"])},{default:n(()=>[a(P,{spinning:k.value},{default:n(()=>[a(m,{title:"اطلاعات پایه",class:"mb-base"},{default:n(()=>[f("div",ue,[a(o,{label:"نام","validate-status":u.fname?"error":"",help:u.fname},{default:n(()=>[a(s,{value:t.fname,"onUpdate:value":e[19]||(e[19]=l=>t.fname=l)},null,8,["value"])]),_:1},8,["validate-status","help"]),a(o,{label:"نام خانوادگی","validate-status":u.lname?"error":"",help:u.lname},{default:n(()=>[a(s,{value:t.lname,"onUpdate:value":e[20]||(e[20]=l=>t.lname=l)},null,8,["value"])]),_:1},8,["validate-status","help"]),a(o,{label:"کد ملی"},{default:n(()=>[a(s,{value:t.ncode,"onUpdate:value":e[21]||(e[21]=l=>t.ncode=l)},null,8,["value"])]),_:1}),a(o,{label:"شماره تلفن همراه","validate-status":u.mobile?"error":"",help:u.mobile},{default:n(()=>[a(s,{value:t.mobile,"onUpdate:value":e[22]||(e[22]=l=>t.mobile=l)},null,8,["value"])]),_:1},8,["validate-status","help"]),a(o,{label:"رمز عبور"},{default:n(()=>[a(z,{value:t.password,"onUpdate:value":e[23]||(e[23]=l=>t.password=l)},null,8,["value"])]),_:1}),a(o,{label:"تلفن ثابت"},{default:n(()=>[a(s,{value:t.phone,"onUpdate:value":e[24]||(e[24]=l=>t.phone=l)},null,8,["value"])]),_:1})])]),_:1}),a(m,{title:"اطلاعات تجاری",class:"mb-base"},{default:n(()=>[f("div",de,[a(o,{label:"نوع کاربری"},{default:n(()=>[a(p,{value:t.type,"onUpdate:value":e[25]||(e[25]=l=>t.type=l),"show-search":"","filter-option":E,style:{width:"100%",direction:"rtl !important"}},{default:n(()=>[(r(),y(U,null,c(J,l=>a(i,{key:l.id,value:l.id},{default:n(()=>[b(w(l.title),1)]),_:2},1032,["value"])),64))]),_:1},8,["value"])]),_:1}),a(o,{label:"نام مغازه"},{default:n(()=>[a(s,{value:t.store_name,"onUpdate:value":e[26]||(e[26]=l=>t.store_name=l)},null,8,["value"])]),_:1}),a(o,{label:"نام پاساژ"},{default:n(()=>[a(s,{value:t.pasazh_name,"onUpdate:value":e[27]||(e[27]=l=>t.pasazh_name=l)},null,8,["value"])]),_:1}),a(o,{label:"کد مشتری"},{default:n(()=>[a(s,{value:t.mcode,"onUpdate:value":e[28]||(e[28]=l=>t.mcode=l)},null,8,["value"])]),_:1}),a(o,{label:"کارشناس فروش"},{default:n(()=>[a(p,{value:t.reagent_id,"onUpdate:value":e[29]||(e[29]=l=>t.reagent_id=l),"allow-clear":"",placeholder:"انتخاب کنید"},{default:n(()=>[(r(!0),y(U,null,c(N.value,l=>(r(),g(i,{key:l.id,value:l.id},{default:n(()=>[b(w(l.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1}),a(o,{label:"درصد"},{default:n(()=>[a(S,{value:t.percent,"onUpdate:value":e[30]||(e[30]=l=>t.percent=l),class:"w-full"},null,8,["value"])]),_:1}),a(o,{label:"سقف اعتبار (برحسب گرم)"},{default:n(()=>[a(S,{value:t.gram_level,"onUpdate:value":e[31]||(e[31]=l=>t.gram_level=l),class:"w-full"},null,8,["value"])]),_:1})])]),_:1}),a(m,{title:"اطلاعات تکمیلی",class:"mb-base"},{default:n(()=>[f("div",ie,[a(o,{label:"شهر"},{default:n(()=>[a(p,{value:t.city_id,"onUpdate:value":e[32]||(e[32]=l=>t.city_id=l),"show-search":"","allow-clear":"",placeholder:"انتخاب کنید","filter-option":I},{default:n(()=>[(r(!0),y(U,null,c(B.value,l=>(r(),g(i,{key:l.id,value:l.id},{default:n(()=>[b(w(l.title),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1}),a(o,{label:"آدرس"},{default:n(()=>[a(L,{value:t.address,"onUpdate:value":e[33]||(e[33]=l=>t.address=l),"auto-size":{minRows:2,maxRows:4}},null,8,["value"])]),_:1})])]),_:1}),a(m,{title:"مدارک",class:"mb-base"},{default:n(()=>[f("div",re,[a(o,{label:"عکس کارت ملی"},{default:n(()=>[a(V,{modelValue:t.national_id_image,"onUpdate:modelValue":e[34]||(e[34]=l=>t.national_id_image=l),purpose:"customer.nationalId",placeholder:"عکس"},null,8,["modelValue"])]),_:1}),a(o,{label:"عکس جواز کسب"},{default:n(()=>[a(V,{modelValue:t.business_license,"onUpdate:modelValue":e[35]||(e[35]=l=>t.business_license=l),purpose:"customer.businessLicense",placeholder:"عکس"},null,8,["modelValue"])]),_:1}),a(o,{label:"عکس سردر مغازه"},{default:n(()=>[a(V,{modelValue:t.shop_image,"onUpdate:modelValue":e[36]||(e[36]=l=>t.shop_image=l),purpose:"customer.shop",placeholder:"عکس"},null,8,["modelValue"])]),_:1})])]),_:1}),f("div",null,[a(K,{type:"primary",class:"mr-4",onClick:$},{default:n(()=>[...e[37]||(e[37]=[b("ثبت اطلاعات",-1)])]),_:1})])]),_:1},8,["spinning"])]),_:1},8,["model"]))}}});export{fe as _}; diff --git a/apps/admin-panel/dist/assets/cityList-BcT2w5MZ.js b/apps/admin-panel/dist/assets/cityList-BcT2w5MZ.js deleted file mode 100644 index 9c84b37..0000000 --- a/apps/admin-panel/dist/assets/cityList-BcT2w5MZ.js +++ /dev/null @@ -1 +0,0 @@ -import{a as L,b as c,X as z}from"./model-Di_BQPv1.js";import{_ as A}from"./ListPageHeader.vue_vue_type_script_setup_true_lang-BmENA4yH.js";import{_ as H}from"./createCity.vue_vue_type_script_setup_true_lang-CygtlXYZ.js";import{d as K,u as R,b as j,c as a,w as o,r,o as y,h as _,a as C,E as q,i as N,D as F,n as G,f as w,t as T,l as v,y as I,x as k,z as U}from"./index-WFQJAeoE.js";import{u as J}from"./useDeleteHandler-AErXCFBG.js";import"./SettingOutlined-DZJd42S-.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js";function Q(){const i=new L("admin/misc/cities/list","لیست شهر ها");return i.add(new c("title","نام شهر").filterKey("name").filterText()),i.add(new c("level","سطح").filterNumber().noSort()),i.add(new c("percent","درصد مشتری عمده").renderSlot("percent").noSort()),i.add(new c("percent_aux","درصد کارشناس فروش").renderSlot("percent_aux").noSort()),i.add(new c("opt","عملیات").noSort().renderSlot("opt")),i}const W={id:"page-user-list"},oe=K({__name:"cityList",setup(i){const B=R(),S=n=>!!B.hasPermission(n),D=Q(),p=v(null),x=v(!1),d=v(!1),g=v(void 0),l=I({title:"",percent:null,percent_aux:null});async function E(n){g.value=n,l.title=n.title??"";try{const[e,s]=await Promise.all([k.get(`cities/get-percent/${n.id}`),k.get(`cities/get-percent-aux/${n.id}`)]);l.percent=e.data===null?null:Number(e.data),l.percent_aux=s.data===null?null:Number(s.data)}catch{l.percent=n.percent===null?null:Number(n.percent),l.percent_aux=n.percent_aux===null?null:Number(n.percent_aux)}d.value=!0}async function O(){var n,e,s,m;try{await k.put(`cities/${(n=g.value)==null?void 0:n.id}`,{title:l.title,percent:l.percent,percent_aux:l.percent_aux}),U.success("تغییرات ثبت شد"),d.value=!1,(e=p.value)==null||e.fetch()}catch(u){U.error(((m=(s=u==null?void 0:u.response)==null?void 0:s.data)==null?void 0:m.message)??"خطا در ثبت تغییرات")}}const{remove:V}=J({onSuccess:()=>{var n;return(n=p.value)==null?void 0:n.fetch()},successMessage:"شهر حذف شد",fallbackErrorMessage:"خطا در حذف شهر"});return(n,e)=>{const s=r("a-tooltip"),m=r("a-popconfirm"),u=r("a-input"),b=r("a-form-item"),$=r("a-input-number"),X=r("a-form"),M=r("a-modal"),P=r("a-card");return y(),j("div",W,[a(P,{title:"لیست شهر ها"},{default:o(()=>[a(z,{ref_key:"citiesTable",ref:p,model:_(D)},{add:o(()=>[a(A,{rid:"cities.create","add-label":"افزودن شهر",onAdd:e[0]||(e[0]=t=>x.value=!0)})]),percent:o(({text:t})=>[w(T(t??"-"),1)]),percent_aux:o(({text:t})=>[w(T(t??"-"),1)]),opt:o(({record:t})=>[S("cities.list.view.edit")?(y(),C(s,{key:0,title:"ویرایش"},{default:o(()=>[a(_(q),{class:"cursor-pointer mx-1 text-primary",onClick:f=>E(t)},null,8,["onClick"])]),_:2},1024)):N("",!0),S("cities.list.remove")?(y(),C(s,{key:1,title:"حذف"},{default:o(()=>[a(m,{placement:"top","ok-text":"بله","cancel-text":"خیر",onConfirm:f=>_(V)(`cities/${t.id}`)},{title:o(()=>[...e[7]||(e[7]=[G("p",null,"آیا مطمئن به حذف شهر مورد نظر هستید ؟",-1)])]),default:o(()=>[a(_(F),{class:"cursor-pointer mx-1 text-danger"})]),_:1},8,["onConfirm"])]),_:2},1024)):N("",!0)]),_:1},8,["model"]),a(M,{open:d.value,"onUpdate:open":e[4]||(e[4]=t=>d.value=t),title:"ویرایش شهر",onOk:O},{default:o(()=>[a(X,{layout:"vertical"},{default:o(()=>[a(b,{label:"نام شهر"},{default:o(()=>[a(u,{value:l.title,"onUpdate:value":e[1]||(e[1]=t=>l.title=t)},null,8,["value"])]),_:1}),a(b,{label:"درصد مشتری عمده"},{default:o(()=>[a($,{value:l.percent,"onUpdate:value":e[2]||(e[2]=t=>l.percent=t),class:"w-full",step:.1},null,8,["value"])]),_:1}),a(b,{label:"درصد کارشناس فروش"},{default:o(()=>[a($,{value:l.percent_aux,"onUpdate:value":e[3]||(e[3]=t=>l.percent_aux=t),class:"w-full",step:.1},null,8,["value"])]),_:1})]),_:1})]),_:1},8,["open"]),a(H,{open:x.value,"onUpdate:open":e[5]||(e[5]=t=>x.value=t),onSuccess:e[6]||(e[6]=t=>{var f;return(f=p.value)==null?void 0:f.fetch()})},null,8,["open"])]),_:1})])}}});export{oe as default}; diff --git a/apps/admin-panel/dist/assets/cityList-DqWduJyu.js b/apps/admin-panel/dist/assets/cityList-DqWduJyu.js new file mode 100644 index 0000000..7fecf6d --- /dev/null +++ b/apps/admin-panel/dist/assets/cityList-DqWduJyu.js @@ -0,0 +1 @@ +import{a as z,b as c,X as A}from"./model-CvqTGmy8.js";import{_ as H}from"./ListPageHeader.vue_vue_type_script_setup_true_lang-CetMN4WH.js";import{_ as K}from"./createCity.vue_vue_type_script_setup_true_lang-DSjJOBVv.js";import{d as R,u as j,b as q,c as a,w as o,r as s,o as k,h as x,a as U,E as F,i as N,D as G,n as I,f as S,t as C,l as d,y as J,x as T,z as B}from"./index-CVG99b4v.js";import{u as Q}from"./useDeleteHandler-D7PJ3wUb.js";import{_ as W}from"./CityTreeSelect.vue_vue_type_script_setup_true_lang-Ctf4a2EQ.js";import"./filters-UavLT20t.js";import"./index-pLFqZCCf.js";import"./SettingOutlined-D7--Xtqg.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-CWur6xTz.js";function Y(){const r=new z("admin/misc/cities/list","لیست شهر ها");return r.add(new c("title","نام شهر").filterKey("name").filterText()),r.add(new c("parent_title","والد").renderSlot("parent_title").noSort()),r.add(new c("percent","درصد مشتری عمده").renderSlot("percent").noSort()),r.add(new c("percent_aux","درصد کارشناس فروش").renderSlot("percent_aux").noSort()),r.add(new c("opt","عملیات").noSort().renderSlot("opt")),r}const Z={id:"page-user-list"},pe=R({__name:"cityList",setup(r){const D=j(),$=n=>!!D.hasPermission(n),E=Y(),m=d(null),b=d(!1),_=d(!1),y=d(void 0),l=J({title:"",parent:void 0,percent:null,percent_aux:null}),g=d([]);async function O(n){y.value=n,l.title=n.title??"",l.parent=n.parent??void 0,l.percent=n.percent===null||n.percent===void 0?null:Number(n.percent),l.percent_aux=n.percent_aux===null||n.percent_aux===void 0?null:Number(n.percent_aux);try{const{data:e}=await T.post("cities/list");g.value=e.rows??[]}catch(e){console.log(e)}_.value=!0}async function V(){var n,e,u,f;try{await T.put(`cities/${(n=y.value)==null?void 0:n.id}`,{title:l.title,parent:l.parent??null,percent:l.percent,percent_aux:l.percent_aux}),B.success("تغییرات ثبت شد"),_.value=!1,(e=m.value)==null||e.fetch()}catch(p){B.error(((f=(u=p==null?void 0:p.response)==null?void 0:u.data)==null?void 0:f.message)??"خطا در ثبت تغییرات")}}const{remove:X}=Q({onSuccess:()=>{var n;return(n=m.value)==null?void 0:n.fetch()},successMessage:"شهر حذف شد",fallbackErrorMessage:"خطا در حذف شهر"});return(n,e)=>{const u=s("a-tooltip"),f=s("a-popconfirm"),p=s("a-input"),v=s("a-form-item"),w=s("a-input-number"),M=s("a-form"),L=s("a-modal"),P=s("a-card");return k(),q("div",Z,[a(P,{title:"لیست شهر ها"},{default:o(()=>[a(A,{ref_key:"citiesTable",ref:m,model:x(E)},{add:o(()=>[a(H,{rid:"cities.create","add-label":"افزودن شهر",onAdd:e[0]||(e[0]=t=>b.value=!0)})]),parent_title:o(({text:t})=>[S(C(t??"—"),1)]),percent:o(({text:t})=>[S(C(t??"-"),1)]),percent_aux:o(({text:t})=>[S(C(t??"-"),1)]),opt:o(({record:t})=>[$("cities.list.view.edit")?(k(),U(u,{key:0,title:"ویرایش"},{default:o(()=>[a(x(F),{class:"cursor-pointer mx-1 text-primary",onClick:i=>O(t)},null,8,["onClick"])]),_:2},1024)):N("",!0),$("cities.list.remove")?(k(),U(u,{key:1,title:"حذف"},{default:o(()=>[a(f,{placement:"top","ok-text":"بله","cancel-text":"خیر",onConfirm:i=>x(X)(`cities/${t.id}`)},{title:o(()=>[...e[8]||(e[8]=[I("p",null,"آیا مطمئن به حذف شهر مورد نظر هستید ؟",-1)])]),default:o(()=>[a(x(G),{class:"cursor-pointer mx-1 text-danger"})]),_:1},8,["onConfirm"])]),_:2},1024)):N("",!0)]),_:1},8,["model"]),a(L,{open:_.value,"onUpdate:open":e[5]||(e[5]=t=>_.value=t),title:"ویرایش شهر",onOk:V},{default:o(()=>[a(M,{layout:"vertical"},{default:o(()=>[a(v,{label:"نام شهر"},{default:o(()=>[a(p,{value:l.title,"onUpdate:value":e[1]||(e[1]=t=>l.title=t)},null,8,["value"])]),_:1}),a(v,{label:"والد",help:"خالی = سرشاخه، مثل کشور"},{default:o(()=>{var t;return[a(W,{value:l.parent,"onUpdate:value":e[2]||(e[2]=i=>l.parent=i),cities:g.value,"parent-picker":"","exclude-id":(t=y.value)==null?void 0:t.id,placeholder:"والد را انتخاب کنید"},null,8,["value","cities","exclude-id"])]}),_:1}),a(v,{label:"درصد مشتری عمده"},{default:o(()=>[a(w,{value:l.percent,"onUpdate:value":e[3]||(e[3]=t=>l.percent=t),class:"w-full",step:.1},null,8,["value"])]),_:1}),a(v,{label:"درصد کارشناس فروش"},{default:o(()=>[a(w,{value:l.percent_aux,"onUpdate:value":e[4]||(e[4]=t=>l.percent_aux=t),class:"w-full",step:.1},null,8,["value"])]),_:1})]),_:1})]),_:1},8,["open"]),a(K,{open:b.value,"onUpdate:open":e[6]||(e[6]=t=>b.value=t),onSuccess:e[7]||(e[7]=t=>{var i;return(i=m.value)==null?void 0:i.fetch()})},null,8,["open"])]),_:1})])}}});export{pe as default}; diff --git a/apps/admin-panel/dist/assets/create-C1Sm2Hf9.js b/apps/admin-panel/dist/assets/create-C1Sm2Hf9.js deleted file mode 100644 index 9bbd5c1..0000000 --- a/apps/admin-panel/dist/assets/create-C1Sm2Hf9.js +++ /dev/null @@ -1 +0,0 @@ -import{G as ye,x as z,d as he,u as be,v as xe,a as N,w as i,i as j,l as $,r as u,o as d,c as s,h as S,f as x,H as ke,b as k,e as B,F as C,n as P,J as we,t as w,E as Ie,K as Ce,A as qe,y as F,p as J,z as E,k as Ue}from"./index-WFQJAeoE.js";import{X as Ne}from"./model-Di_BQPv1.js";import{b as Se}from"./productListModel-CLJKMrKL.js";import{u as Oe}from"./auth-Cz9vAefU.js";import{_ as Pe}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./SettingOutlined-DZJd42S-.js";const X="admin_cart_items",ze=ye("cart",{state:()=>({items:[]}),actions:{addToCart(l){const v=this.items.findIndex(g=>g.pid==l.pid&&g.vid==l.vid),f=l.product.variants_all.filter(g=>g.id===l.vid)[0];f&&!(!f.is_pre_order&&f.qty===0)&&(v==-1?this.items.push(l):(this.items[v].product=l.product,this.items[v].qty=l.qty))},setItems(l){this.items=l,localStorage.setItem(X,JSON.stringify(l))},add(l){this.addToCart(l),this.setItems(this.items)},remove(l){const v=this.items.findIndex(f=>f.pid==l.pid&&f.vid==l.vid);v>-1&&this.items.splice(v,1),this.setItems(this.items)},updateItemQuantity(l){this.items[l.index].qty=l.quantity,this.setItems(this.items)},clear(){this.items=[],this.setItems(this.items)},async init(){try{const l=JSON.parse(localStorage.getItem(X)??"[]")||[],v=l.map(g=>g.product.id);if(v.length===0){this.setItems([]);return}const{data:f}=await z.post("product/variant",{products_id:v});if(f){const g=[];for(const y of l){const h=f.find(R=>R.id==y.product.id);h&&(!h.variants_all[0].is_pre_order&&h.variants_all[0].qty===0||g.push({vid:y.vid,pid:h.id,product:h,qty:y.qty,promotion_id:h.promotion&&h.promotion.id?h.promotion.id:null}))}this.setItems(g)}}catch(l){console.log("error in cart",l)}}}}),Ve=["src"],$e={key:1,class:"flex items-center"},Be=["src"],Ee={key:4,class:"flex"},Re={style:{width:"max-content"}},Te={class:"grid-5"},Le={class:"totals"},H="/img/no-items.png",Qe=he({__name:"create",setup(l){const v=Ue(),f=be(),g=Oe(),y=ze(),h=t=>!!f.hasPermission(t),R=Se(),Y=$(null),O=$(!1),M=$([]),A=$({}),Z={1:"ثبت سفارش",2:"تایید مدیر سیستم",3:"در حال تامین",4:"در حال آماده سازی",5:"ارسال",6:"تحویل مشتری"},n=F({customer_id:void 0,sts:void 0,type:void 0,note:"",shipping_address:{reciver_fname:"",reciver_lname:"",province:"",city:"",zipcode:"",reciver_phone:"",reciver_fixed_phone:"",address:""}}),c=F({}),ee=J(()=>{var t;return(t=g.user)==null?void 0:t.id}),b=J(()=>y.items),te=[{title:"حذف",dataIndex:"delete",width:60,align:"center"},{title:"کد محصول",dataIndex:"pid",align:"center",width:90},{title:"محصول",dataIndex:"product"},{title:"اجرت",dataIndex:"wage",align:"center"},{title:"تعداد",dataIndex:"qty",align:"center",width:140},{title:"وزن",dataIndex:"weight",align:"center",width:90},{title:"مجموع",dataIndex:"total",align:"center"}],m=F({});function I(t){return t.product.variants_all.find(e=>e.id===t.vid)??{}}function ae(t){var e,o,p;return((e=t==null?void 0:t.thumb)==null?void 0:e.full)??((p=(o=t==null?void 0:t.ProductImage)==null?void 0:o[0])==null?void 0:p.image)??H}const se=J(()=>{let t=0;for(const e of b.value)t+=Number(I(e).grams??0);return t});function ie(t){return Number(I(t).grams??0)*t.qty}function ne(t){const e=b.value[t];if(!e)return 1/0;const o=Number(I(e).qty??0);return o>0?o:1/0}function oe(t,e){y.updateItemQuantity({index:t,quantity:Number(e)})}function le(t,e){re(t,String(e.key))}function re(t,e){y.add({vid:e,pid:t.id,product:t,qty:1,promotion_id:t.promotion&&t.promotion.id?t.promotion.id:null}),E.info("اضافه شد")}function de(t){const e=I(t);m.id=e.id,m.grams=Number(e.grams??0)}async function ue(){var t,e;if(!(!m.id||!m.grams))try{O.value=!0;const o=b.value.find(p=>p.vid===m.id);await z.post("add/variant",{product_id:o==null?void 0:o.pid,title:`${m.grams} گرم`,grams:m.grams}),await y.init(),m.id=void 0,m.grams=void 0}catch(o){E.error(((e=(t=o==null?void 0:o.response)==null?void 0:t.data)==null?void 0:e.message)??"خطا در ثبت وزن")}finally{O.value=!1}}function pe(t,e){var o,p;return String(((p=(o=e==null?void 0:e.children)==null?void 0:o[0])==null?void 0:p.children)??"").toLowerCase().includes(t.toLowerCase())}function me(){return Object.keys(c).forEach(t=>delete c[t]),n.customer_id||(c.customer_id="مقدار را وارد نمایید"),n.sts===void 0&&(c.sts="مقدار را وارد نمایید"),n.type===void 0&&(c.type="مقدار را وارد نمایید"),Object.keys(c).length===0}async function D(){var t,e;if(me())try{O.value=!0;const o=b.value.map(p=>{const T=I(p);return{vid:p.vid,qty:p.qty,percent:T.percentage_pay,promotion_id:p.promotion_id}});await z.post("order",{...n,reagent_id:ee.value,app:"app",order_items:o}),E.info("عملیات با موفقیت انجام شد"),y.clear(),v.push("/order/list")}catch(o){console.log(o),E.error(((e=(t=o==null?void 0:o.response)==null?void 0:t.data)==null?void 0:e.message)??"خطا در ثبت اطلاعات.")}finally{O.value=!1}}return xe(async()=>{try{const[t,e]=await Promise.all([z.get("order/type"),z.post("single-customer",{page:1,limit:500})]);A.value=t.data,M.value=e.data.rows??[]}catch(t){console.log(t)}await y.init()}),(t,e)=>{const o=u("a-button"),p=u("a-menu-item"),T=u("a-menu"),ce=u("a-dropdown"),G=u("a-input-number"),_e=u("a-table"),L=u("a-select-option"),Q=u("a-select"),_=u("a-form-item"),q=u("a-input"),K=u("a-textarea"),ve=u("a-tag"),fe=u("a-form"),W=u("a-card"),ge=u("a-spin");return h("order.create")?(d(),N(ge,{key:0,spinning:O.value},{default:i(()=>[s(W,{title:"لیست محصولات"},{default:i(()=>[s(Ne,{ref_key:"tblProducts",ref:Y,model:S(R)},{image:i(({record:a})=>[P("img",{width:"90px",height:"90px",style:{"object-fit":"scale-down"},src:a.thumb&&a.thumb.full?a.thumb.full:H},null,8,Ve)]),op:i(({record:a})=>[s(ce,null,{overlay:i(()=>[s(T,{onClick:r=>le(a,r)},{default:i(()=>[(d(!0),k(C,null,B(a.variants_all,r=>(d(),N(p,{key:r.id},{default:i(()=>[x(" افزودن تنوع "+w(r.title),1)]),_:2},1024))),128))]),_:2},1032,["onClick"])]),default:i(()=>[s(o,{style:{"margin-left":"8px"}},{default:i(()=>[e[13]||(e[13]=x(" افزودن ",-1)),s(S(ke))]),_:1})]),_:2},1024)]),_:1},8,["model"]),b.value.length>0?(d(),N(W,{key:0,title:"ثبت سفارش",class:"mt-5"},{default:i(()=>[s(_e,{columns:te,"data-source":b.value,bordered:"",pagination:!1,"row-key":"vid"},{bodyCell:i(({column:a,record:r,index:V})=>[a.dataIndex==="delete"?(d(),N(S(we),{key:0,class:"cursor-pointer",onClick:U=>S(y).remove(r)},null,8,["onClick"])):a.dataIndex==="product"?(d(),k("div",$e,[P("img",{src:ae(r.product),width:"50px"},null,8,Be),x(" "+w(r.product.title),1)])):a.dataIndex==="wage"?(d(),k(C,{key:2},[x(w(I(r).percentage_pay)+"٪ ",1)],64)):a.dataIndex==="qty"?(d(),N(G,{key:3,value:b.value[V].qty,"onUpdate:value":U=>b.value[V].qty=U,min:1,max:ne(V),onChange:U=>oe(V,U)},null,8,["value","onUpdate:value","max","onChange"])):a.dataIndex==="weight"?(d(),k("div",Ee,[!m.grams||m.id!==I(r).id?(d(),k(C,{key:0},[P("span",Re,w(I(r).title),1),s(S(Ie),{class:"cursor-pointer ml-2 text-primary",onClick:U=>de(r)},null,8,["onClick"])],64)):(d(),k(C,{key:1},[s(G,{value:m.grams,"onUpdate:value":e[0]||(e[0]=U=>m.grams=U)},null,8,["value"]),s(S(Ce),{class:"cursor-pointer ml-2 text-success",onClick:ue})],64))])):a.dataIndex==="total"?(d(),k(C,{key:5},[x(w(ie(r))+" گرم ",1)],64)):j("",!0)]),_:1},8,["data-source"]),s(fe,{layout:"vertical",class:"mt-4",onSubmit:qe(D,["prevent"])},{default:i(()=>[P("div",Te,[s(_,{label:"مشتری","validate-status":c.customer_id?"error":"",help:c.customer_id},{default:i(()=>[s(Q,{value:n.customer_id,"onUpdate:value":e[1]||(e[1]=a=>n.customer_id=a),"show-search":"","option-filter-prop":"children","filter-option":pe},{default:i(()=>[(d(!0),k(C,null,B(M.value,a=>(d(),N(L,{key:a.id,value:a.id},{default:i(()=>[x(w(`${a.id}-${a.fname} ${a.lname}`),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1},8,["validate-status","help"]),s(_,{label:"وضعیت تحویل","validate-status":c.sts?"error":"",help:c.sts},{default:i(()=>[s(Q,{value:n.sts,"onUpdate:value":e[2]||(e[2]=a=>n.sts=a)},{default:i(()=>[(d(),k(C,null,B(Z,(a,r)=>s(L,{key:r,value:Number(r)},{default:i(()=>[x(w(a),1)]),_:2},1032,["value"])),64))]),_:1},8,["value"])]),_:1},8,["validate-status","help"]),s(_,{label:"نوع فروش","validate-status":c.type?"error":"",help:c.type},{default:i(()=>[s(Q,{value:n.type,"onUpdate:value":e[3]||(e[3]=a=>n.type=a)},{default:i(()=>[(d(!0),k(C,null,B(A.value,(a,r)=>(d(),N(L,{key:r,value:Number(r)},{default:i(()=>[x(w(a),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1},8,["validate-status","help"]),s(_,{label:"نام دریافت کننده"},{default:i(()=>[s(q,{value:n.shipping_address.reciver_fname,"onUpdate:value":e[4]||(e[4]=a=>n.shipping_address.reciver_fname=a)},null,8,["value"])]),_:1}),s(_,{label:"نام خانوادگی دریافت کننده"},{default:i(()=>[s(q,{value:n.shipping_address.reciver_lname,"onUpdate:value":e[5]||(e[5]=a=>n.shipping_address.reciver_lname=a)},null,8,["value"])]),_:1}),s(_,{label:"استان"},{default:i(()=>[s(q,{value:n.shipping_address.province,"onUpdate:value":e[6]||(e[6]=a=>n.shipping_address.province=a)},null,8,["value"])]),_:1}),s(_,{label:"شهر"},{default:i(()=>[s(q,{value:n.shipping_address.city,"onUpdate:value":e[7]||(e[7]=a=>n.shipping_address.city=a)},null,8,["value"])]),_:1}),s(_,{label:"کد پستی"},{default:i(()=>[s(q,{value:n.shipping_address.zipcode,"onUpdate:value":e[8]||(e[8]=a=>n.shipping_address.zipcode=a)},null,8,["value"])]),_:1}),s(_,{label:"تلفن همراه"},{default:i(()=>[s(q,{value:n.shipping_address.reciver_phone,"onUpdate:value":e[9]||(e[9]=a=>n.shipping_address.reciver_phone=a)},null,8,["value"])]),_:1}),s(_,{label:"تلفن ثابت"},{default:i(()=>[s(q,{value:n.shipping_address.reciver_fixed_phone,"onUpdate:value":e[10]||(e[10]=a=>n.shipping_address.reciver_fixed_phone=a)},null,8,["value"])]),_:1})]),s(_,{label:"توضیحات"},{default:i(()=>[s(K,{value:n.note,"onUpdate:value":e[11]||(e[11]=a=>n.note=a),"auto-size":{minRows:3,maxRows:5}},null,8,["value"])]),_:1}),s(_,{label:"آدرس"},{default:i(()=>[s(K,{value:n.shipping_address.address,"onUpdate:value":e[12]||(e[12]=a=>n.shipping_address.address=a),"auto-size":{minRows:3,maxRows:5}},null,8,["value"])]),_:1}),P("div",Le,[s(ve,{color:"blue"},{default:i(()=>[x("مجموع وزن: "+w(se.value)+" گرم",1)]),_:1})]),s(o,{type:"primary",class:"mt-4",disabled:!b.value||b.value.length<1,onClick:D},{default:i(()=>[...e[14]||(e[14]=[x(" ثبت تغییرات ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})):j("",!0)]),_:1})]),_:1},8,["spinning"])):j("",!0)}}}),Ge=Pe(Qe,[["__scopeId","data-v-cfb22e94"]]);export{Ge as default}; diff --git a/apps/admin-panel/dist/assets/create-CyrgXpmn.js b/apps/admin-panel/dist/assets/create-CyrgXpmn.js deleted file mode 100644 index cd10593..0000000 --- a/apps/admin-panel/dist/assets/create-CyrgXpmn.js +++ /dev/null @@ -1 +0,0 @@ -import{d as z,u as A,a,w as t,l as x,r as u,o as l,c as d,A as K,n as M,f as c,i as p,h as O,y as P,x as D,z as B}from"./index-WFQJAeoE.js";import{a as E,b as _,X as I}from"./model-Di_BQPv1.js";import{_ as $}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./SettingOutlined-DZJd42S-.js";function q(){const r=new E("admin/misc/sms/list","لیست پیامک ها");return r.add(new _("id","شماره")),r.add(new _("text","متن پیامک").filterKey("body").filterText()),r.add(new _("mobile","گیرندگان").noSort()),r.add(new _("sent_count","تعداد").noSort()),r.add(new _("sender","ارسال کننده").noSort()),r.add(new _("caj","تاریخ").filterKey("createdAt").filterDate().noSort()),r}const F={class:"grid-2"},G=z({__name:"create",setup(r){const N=A(),f=y=>!!N.hasPermission(y),R=q(),g=x(null),k=x(!1),o=x(-1),m=x(""),b=x(""),s=P({});async function S(){var y,e,i;if(Object.keys(s).forEach(n=>delete s[n]),b.value||(s.text="متن پیامک الزامی است"),(o.value===-1||o.value===9)&&!m.value&&(s.mobile="شماره موبایل الزامی است"),!Object.keys(s).length)try{k.value=!0;const{data:n}=await D.post("sms",{type:o.value,mobile:m.value,text:b.value});B.success(`پیامک برای ${n.sentCount} شماره ثبت شد`),b.value="",m.value="",(y=g.value)==null||y.fetch()}catch(n){B.error(((i=(e=n==null?void 0:n.response)==null?void 0:e.data)==null?void 0:i.message)??"خطا در ارسال پیامک")}finally{k.value=!1}}return(y,e)=>{const i=u("a-select-option"),n=u("a-select"),w=u("a-form-item"),C=u("a-textarea"),T=u("a-input"),V=u("a-button"),X=u("a-form"),U=u("a-card"),j=u("a-spin");return l(),a(j,{spinning:k.value},{default:t(()=>[d(U,{title:"ارسال پیامک"},{default:t(()=>[d(X,{layout:"vertical",onSubmit:K(S,["prevent"])},{default:t(()=>[M("div",F,[d(w,{label:"ارسال برای"},{default:t(()=>[d(n,{value:o.value,"onUpdate:value":e[0]||(e[0]=v=>o.value=v)},{default:t(()=>[f("sms.create.single")?(l(),a(i,{key:0,value:-1},{default:t(()=>[...e[4]||(e[4]=[c(" شماره موبایل ",-1)])]),_:1})):p("",!0),f("sms.create.all")?(l(),a(i,{key:1,value:0},{default:t(()=>[...e[5]||(e[5]=[c(" همه مشتریان ",-1)])]),_:1})):p("",!0),f("sms.create.reagent")?(l(),a(i,{key:2,value:1},{default:t(()=>[...e[6]||(e[6]=[c(" کارشناسان فروش ",-1)])]),_:1})):p("",!0),f("sms.create.omde")?(l(),a(i,{key:3,value:2},{default:t(()=>[...e[7]||(e[7]=[c(" مشتریان عمده ",-1)])]),_:1})):p("",!0),f("sms.create.multiple")?(l(),a(i,{key:4,value:9},{default:t(()=>[...e[8]||(e[8]=[c(" شماره های موبایل ",-1)])]),_:1})):p("",!0)]),_:1},8,["value"])]),_:1}),o.value===-1||o.value===9?(l(),a(w,{key:0,label:o.value===9?"شماره های موبایل":"شماره موبایل","validate-status":s.mobile?"error":"",help:s.mobile},{default:t(()=>[o.value===9?(l(),a(C,{key:0,value:m.value,"onUpdate:value":e[1]||(e[1]=v=>m.value=v),"auto-size":{minRows:2,maxRows:6},placeholder:"هر شماره در یک خط"},null,8,["value"])):(l(),a(T,{key:1,value:m.value,"onUpdate:value":e[2]||(e[2]=v=>m.value=v)},null,8,["value"]))]),_:1},8,["label","validate-status","help"])):p("",!0)]),d(w,{label:"متن پیامک","validate-status":s.text?"error":"",help:s.text},{default:t(()=>[d(C,{value:b.value,"onUpdate:value":e[3]||(e[3]=v=>b.value=v),"auto-size":{minRows:4,maxRows:8}},null,8,["value"])]),_:1},8,["validate-status","help"]),d(V,{type:"primary",onClick:S},{default:t(()=>[...e[9]||(e[9]=[c("ارسال",-1)])]),_:1})]),_:1})]),_:1}),f("sms.list")?(l(),a(U,{key:0,title:"لیست پیامک ها",class:"mt-4"},{default:t(()=>[d(I,{ref_key:"tbl",ref:g,model:O(R)},null,8,["model"])]),_:1})):p("",!0)]),_:1},8,["spinning"])}}}),W=$(G,[["__scopeId","data-v-7d3e9d62"]]);export{W as default}; diff --git a/apps/admin-panel/dist/assets/create-DFv2UVXX.js b/apps/admin-panel/dist/assets/create-DFv2UVXX.js new file mode 100644 index 0000000..af63030 --- /dev/null +++ b/apps/admin-panel/dist/assets/create-DFv2UVXX.js @@ -0,0 +1 @@ +import{d as z,u as A,a,w as t,l as x,r as u,o as l,c as d,A as K,n as M,f as c,i as p,h as O,y as P,x as D,z as B}from"./index-CVG99b4v.js";import{a as E,b as _,X as I}from"./model-CvqTGmy8.js";import{_ as $}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./filters-UavLT20t.js";import"./index-pLFqZCCf.js";import"./SettingOutlined-D7--Xtqg.js";function q(){const r=new E("admin/misc/sms/list","لیست پیامک ها");return r.add(new _("id","شماره")),r.add(new _("text","متن پیامک").filterKey("body").filterText()),r.add(new _("mobile","گیرندگان").noSort()),r.add(new _("sent_count","تعداد").noSort()),r.add(new _("sender","ارسال کننده").noSort()),r.add(new _("caj","تاریخ").filterKey("createdAt").filterDate().noSort()),r}const F={class:"grid-2"},G=z({__name:"create",setup(r){const N=A(),f=y=>!!N.hasPermission(y),R=q(),g=x(null),k=x(!1),o=x(-1),m=x(""),b=x(""),s=P({});async function S(){var y,e,i;if(Object.keys(s).forEach(n=>delete s[n]),b.value||(s.text="متن پیامک الزامی است"),(o.value===-1||o.value===9)&&!m.value&&(s.mobile="شماره موبایل الزامی است"),!Object.keys(s).length)try{k.value=!0;const{data:n}=await D.post("sms",{type:o.value,mobile:m.value,text:b.value});B.success(`پیامک برای ${n.sentCount} شماره ثبت شد`),b.value="",m.value="",(y=g.value)==null||y.fetch()}catch(n){B.error(((i=(e=n==null?void 0:n.response)==null?void 0:e.data)==null?void 0:i.message)??"خطا در ارسال پیامک")}finally{k.value=!1}}return(y,e)=>{const i=u("a-select-option"),n=u("a-select"),w=u("a-form-item"),C=u("a-textarea"),T=u("a-input"),V=u("a-button"),X=u("a-form"),U=u("a-card"),j=u("a-spin");return l(),a(j,{spinning:k.value},{default:t(()=>[d(U,{title:"ارسال پیامک"},{default:t(()=>[d(X,{layout:"vertical",onSubmit:K(S,["prevent"])},{default:t(()=>[M("div",F,[d(w,{label:"ارسال برای"},{default:t(()=>[d(n,{value:o.value,"onUpdate:value":e[0]||(e[0]=v=>o.value=v)},{default:t(()=>[f("sms.create.single")?(l(),a(i,{key:0,value:-1},{default:t(()=>[...e[4]||(e[4]=[c(" شماره موبایل ",-1)])]),_:1})):p("",!0),f("sms.create.all")?(l(),a(i,{key:1,value:0},{default:t(()=>[...e[5]||(e[5]=[c(" همه مشتریان ",-1)])]),_:1})):p("",!0),f("sms.create.reagent")?(l(),a(i,{key:2,value:1},{default:t(()=>[...e[6]||(e[6]=[c(" کارشناسان فروش ",-1)])]),_:1})):p("",!0),f("sms.create.omde")?(l(),a(i,{key:3,value:2},{default:t(()=>[...e[7]||(e[7]=[c(" مشتریان عمده ",-1)])]),_:1})):p("",!0),f("sms.create.multiple")?(l(),a(i,{key:4,value:9},{default:t(()=>[...e[8]||(e[8]=[c(" شماره های موبایل ",-1)])]),_:1})):p("",!0)]),_:1},8,["value"])]),_:1}),o.value===-1||o.value===9?(l(),a(w,{key:0,label:o.value===9?"شماره های موبایل":"شماره موبایل","validate-status":s.mobile?"error":"",help:s.mobile},{default:t(()=>[o.value===9?(l(),a(C,{key:0,value:m.value,"onUpdate:value":e[1]||(e[1]=v=>m.value=v),"auto-size":{minRows:2,maxRows:6},placeholder:"هر شماره در یک خط"},null,8,["value"])):(l(),a(T,{key:1,value:m.value,"onUpdate:value":e[2]||(e[2]=v=>m.value=v)},null,8,["value"]))]),_:1},8,["label","validate-status","help"])):p("",!0)]),d(w,{label:"متن پیامک","validate-status":s.text?"error":"",help:s.text},{default:t(()=>[d(C,{value:b.value,"onUpdate:value":e[3]||(e[3]=v=>b.value=v),"auto-size":{minRows:4,maxRows:8}},null,8,["value"])]),_:1},8,["validate-status","help"]),d(V,{type:"primary",onClick:S},{default:t(()=>[...e[9]||(e[9]=[c("ارسال",-1)])]),_:1})]),_:1})]),_:1}),f("sms.list")?(l(),a(U,{key:0,title:"لیست پیامک ها",class:"mt-4"},{default:t(()=>[d(I,{ref_key:"tbl",ref:g,model:O(R)},null,8,["model"])]),_:1})):p("",!0)]),_:1},8,["spinning"])}}}),Z=$(G,[["__scopeId","data-v-7d3e9d62"]]);export{Z as default}; diff --git a/apps/admin-panel/dist/assets/create-DooqhstM.js b/apps/admin-panel/dist/assets/create-DHfWCL3N.js similarity index 96% rename from apps/admin-panel/dist/assets/create-DooqhstM.js rename to apps/admin-panel/dist/assets/create-DHfWCL3N.js index ff6a7fa..2235643 100644 --- a/apps/admin-panel/dist/assets/create-DooqhstM.js +++ b/apps/admin-panel/dist/assets/create-DHfWCL3N.js @@ -1 +1 @@ -import{d as k,a as C,w as o,l as B,r as l,o as N,c as e,A as U,n as V,f as r,y as m,x as j,z as c}from"./index-WFQJAeoE.js";const z={class:"grid-2"},S=k({__name:"create",setup(O){const u=B(!1),a=m({title:"",text:"",type:0}),n=m({});async function f(){var p,t;if(Object.keys(n).forEach(s=>delete n[s]),a.title||(n.title="عنوان الزامی است"),a.text||(n.text="متن پیام الزامی است"),!Object.keys(n).length)try{u.value=!0;const{data:s}=await j.post("notify",a);c.success("نوتیفیکیشن ارسال شد"),a.title="",a.text=""}catch(s){c.error(((t=(p=s==null?void 0:s.response)==null?void 0:p.data)==null?void 0:t.message)??"خطا در ارسال")}finally{u.value=!1}}return(p,t)=>{const s=l("a-input"),_=l("a-form-item"),d=l("a-select-option"),v=l("a-select"),x=l("a-textarea"),y=l("a-button"),b=l("a-form"),g=l("a-card"),w=l("a-spin");return N(),C(w,{spinning:u.value},{default:o(()=>[e(g,{title:"ارسال نوتیفیکیشن"},{default:o(()=>[e(b,{layout:"vertical",onSubmit:U(f,["prevent"])},{default:o(()=>[V("div",z,[e(_,{label:"عنوان","validate-status":n.title?"error":"",help:n.title},{default:o(()=>[e(s,{value:a.title,"onUpdate:value":t[0]||(t[0]=i=>a.title=i)},null,8,["value"])]),_:1},8,["validate-status","help"]),e(_,{label:"نوع کاربر"},{default:o(()=>[e(v,{value:a.type,"onUpdate:value":t[1]||(t[1]=i=>a.type=i)},{default:o(()=>[e(d,{value:0},{default:o(()=>[...t[3]||(t[3]=[r("همه مشتریان",-1)])]),_:1}),e(d,{value:2},{default:o(()=>[...t[4]||(t[4]=[r("مشتریان عمده",-1)])]),_:1}),e(d,{value:1},{default:o(()=>[...t[5]||(t[5]=[r("کارشناسان فروش",-1)])]),_:1})]),_:1},8,["value"])]),_:1})]),e(_,{label:"متن پیام","validate-status":n.text?"error":"",help:n.text},{default:o(()=>[e(x,{value:a.text,"onUpdate:value":t[2]||(t[2]=i=>a.text=i),"auto-size":{minRows:4,maxRows:8}},null,8,["value"])]),_:1},8,["validate-status","help"]),e(y,{type:"primary",onClick:f},{default:o(()=>[...t[6]||(t[6]=[r("ارسال",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["spinning"])}}});export{S as default}; +import{d as k,a as C,w as o,l as B,r as l,o as N,c as e,A as U,n as V,f as r,y as m,x as j,z as c}from"./index-CVG99b4v.js";const z={class:"grid-2"},S=k({__name:"create",setup(O){const u=B(!1),a=m({title:"",text:"",type:0}),n=m({});async function f(){var p,t;if(Object.keys(n).forEach(s=>delete n[s]),a.title||(n.title="عنوان الزامی است"),a.text||(n.text="متن پیام الزامی است"),!Object.keys(n).length)try{u.value=!0;const{data:s}=await j.post("notify",a);c.success("نوتیفیکیشن ارسال شد"),a.title="",a.text=""}catch(s){c.error(((t=(p=s==null?void 0:s.response)==null?void 0:p.data)==null?void 0:t.message)??"خطا در ارسال")}finally{u.value=!1}}return(p,t)=>{const s=l("a-input"),_=l("a-form-item"),d=l("a-select-option"),v=l("a-select"),x=l("a-textarea"),y=l("a-button"),b=l("a-form"),g=l("a-card"),w=l("a-spin");return N(),C(w,{spinning:u.value},{default:o(()=>[e(g,{title:"ارسال نوتیفیکیشن"},{default:o(()=>[e(b,{layout:"vertical",onSubmit:U(f,["prevent"])},{default:o(()=>[V("div",z,[e(_,{label:"عنوان","validate-status":n.title?"error":"",help:n.title},{default:o(()=>[e(s,{value:a.title,"onUpdate:value":t[0]||(t[0]=i=>a.title=i)},null,8,["value"])]),_:1},8,["validate-status","help"]),e(_,{label:"نوع کاربر"},{default:o(()=>[e(v,{value:a.type,"onUpdate:value":t[1]||(t[1]=i=>a.type=i)},{default:o(()=>[e(d,{value:0},{default:o(()=>[...t[3]||(t[3]=[r("همه مشتریان",-1)])]),_:1}),e(d,{value:2},{default:o(()=>[...t[4]||(t[4]=[r("مشتریان عمده",-1)])]),_:1}),e(d,{value:1},{default:o(()=>[...t[5]||(t[5]=[r("کارشناسان فروش",-1)])]),_:1})]),_:1},8,["value"])]),_:1})]),e(_,{label:"متن پیام","validate-status":n.text?"error":"",help:n.text},{default:o(()=>[e(x,{value:a.text,"onUpdate:value":t[2]||(t[2]=i=>a.text=i),"auto-size":{minRows:4,maxRows:8}},null,8,["value"])]),_:1},8,["validate-status","help"]),e(y,{type:"primary",onClick:f},{default:o(()=>[...t[6]||(t[6]=[r("ارسال",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["spinning"])}}});export{S as default}; diff --git a/apps/admin-panel/dist/assets/create-Dn2YJFlP.js b/apps/admin-panel/dist/assets/create-Dn2YJFlP.js new file mode 100644 index 0000000..75abe36 --- /dev/null +++ b/apps/admin-panel/dist/assets/create-Dn2YJFlP.js @@ -0,0 +1 @@ +import{J as yt,x as z,d as ht,u as bt,v as xt,a as N,w as i,i as j,l as $,r as u,o as d,c as s,h as S,f as x,K as kt,b as k,e as B,F as C,n as P,L as wt,t as w,E as It,N as Ct,A as qt,y as F,p as J,z as E,k as Ut}from"./index-CVG99b4v.js";import{X as Nt}from"./model-CvqTGmy8.js";import{b as St}from"./productListModel-CJQEfgeJ.js";import{u as Ot}from"./auth-Cu4qHRNu.js";import{_ as Pt}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./filters-UavLT20t.js";import"./index-pLFqZCCf.js";import"./SettingOutlined-D7--Xtqg.js";const G="admin_cart_items",zt=yt("cart",{state:()=>({items:[]}),actions:{addToCart(l){const v=this.items.findIndex(g=>g.pid==l.pid&&g.vid==l.vid),f=l.product.variants_all.filter(g=>g.id===l.vid)[0];f&&!(!f.is_pre_order&&f.qty===0)&&(v==-1?this.items.push(l):(this.items[v].product=l.product,this.items[v].qty=l.qty))},setItems(l){this.items=l,localStorage.setItem(G,JSON.stringify(l))},add(l){this.addToCart(l),this.setItems(this.items)},remove(l){const v=this.items.findIndex(f=>f.pid==l.pid&&f.vid==l.vid);v>-1&&this.items.splice(v,1),this.setItems(this.items)},updateItemQuantity(l){this.items[l.index].qty=l.quantity,this.setItems(this.items)},clear(){this.items=[],this.setItems(this.items)},async init(){try{const l=JSON.parse(localStorage.getItem(G)??"[]")||[],v=l.map(g=>g.product.id);if(v.length===0){this.setItems([]);return}const{data:f}=await z.post("product/variant",{products_id:v});if(f){const g=[];for(const y of l){const h=f.find(L=>L.id==y.product.id);h&&(!h.variants_all[0].is_pre_order&&h.variants_all[0].qty===0||g.push({vid:y.vid,pid:h.id,product:h,qty:y.qty,promotion_id:h.promotion&&h.promotion.id?h.promotion.id:null}))}this.setItems(g)}}catch(l){console.log("error in cart",l)}}}}),Vt=["src"],$t={key:1,class:"flex items-center"},Bt=["src"],Et={key:4,class:"flex"},Lt={style:{width:"max-content"}},Rt={class:"grid-5"},Tt={class:"totals"},H="/img/no-items.png",Qt=ht({__name:"create",setup(l){const v=Ut(),f=bt(),g=Ot(),y=zt(),h=e=>!!f.hasPermission(e),L=St(),Y=$(null),O=$(!1),M=$([]),A=$({}),Z={1:"ثبت سفارش",2:"تایید مدیر سیستم",3:"در حال تامین",4:"در حال آماده سازی",5:"ارسال",6:"تحویل مشتری"},n=F({customer_id:void 0,sts:void 0,type:void 0,note:"",shipping_address:{reciver_fname:"",reciver_lname:"",province:"",city:"",zipcode:"",reciver_phone:"",reciver_fixed_phone:"",address:""}}),c=F({}),tt=J(()=>{var e;return(e=g.user)==null?void 0:e.id}),b=J(()=>y.items),et=[{title:"حذف",dataIndex:"delete",width:60,align:"center"},{title:"کد محصول",dataIndex:"pid",align:"center",width:90},{title:"محصول",dataIndex:"product"},{title:"اجرت",dataIndex:"wage",align:"center"},{title:"تعداد",dataIndex:"qty",align:"center",width:140},{title:"وزن",dataIndex:"weight",align:"center",width:90},{title:"مجموع",dataIndex:"total",align:"center"}],m=F({});function I(e){return e.product.variants_all.find(t=>t.id===e.vid)??{}}function at(e){var t,o,p;return((t=e==null?void 0:e.thumb)==null?void 0:t.full)??((p=(o=e==null?void 0:e.ProductImage)==null?void 0:o[0])==null?void 0:p.image)??H}const st=J(()=>{let e=0;for(const t of b.value)e+=Number(I(t).grams??0);return e});function it(e){return Number(I(e).grams??0)*e.qty}function nt(e){const t=b.value[e];if(!t)return 1/0;const o=Number(I(t).qty??0);return o>0?o:1/0}function ot(e,t){y.updateItemQuantity({index:e,quantity:Number(t)})}function lt(e,t){rt(e,String(t.key))}function rt(e,t){y.add({vid:t,pid:e.id,product:e,qty:1,promotion_id:e.promotion&&e.promotion.id?e.promotion.id:null}),E.info("اضافه شد")}function dt(e){const t=I(e);m.id=t.id,m.grams=Number(t.grams??0)}async function ut(){var e,t;if(!(!m.id||!m.grams))try{O.value=!0;const o=b.value.find(p=>p.vid===m.id);await z.post("add/variant",{product_id:o==null?void 0:o.pid,title:`${m.grams} گرم`,grams:m.grams}),await y.init(),m.id=void 0,m.grams=void 0}catch(o){E.error(((t=(e=o==null?void 0:o.response)==null?void 0:e.data)==null?void 0:t.message)??"خطا در ثبت وزن")}finally{O.value=!1}}function pt(e,t){var o,p;return String(((p=(o=t==null?void 0:t.children)==null?void 0:o[0])==null?void 0:p.children)??"").toLowerCase().includes(e.toLowerCase())}function mt(){return Object.keys(c).forEach(e=>delete c[e]),n.customer_id||(c.customer_id="مقدار را وارد نمایید"),n.sts===void 0&&(c.sts="مقدار را وارد نمایید"),n.type===void 0&&(c.type="مقدار را وارد نمایید"),Object.keys(c).length===0}async function D(){var e,t;if(mt())try{O.value=!0;const o=b.value.map(p=>{const R=I(p);return{vid:p.vid,qty:p.qty,percent:R.percentage_pay,promotion_id:p.promotion_id}});await z.post("order",{...n,reagent_id:tt.value,app:"app",order_items:o}),E.info("عملیات با موفقیت انجام شد"),y.clear(),v.push("/order/list")}catch(o){console.log(o),E.error(((t=(e=o==null?void 0:o.response)==null?void 0:e.data)==null?void 0:t.message)??"خطا در ثبت اطلاعات.")}finally{O.value=!1}}return xt(async()=>{try{const[e,t]=await Promise.all([z.get("order/type"),z.post("single-customer",{page:1,limit:500})]);A.value=e.data,M.value=t.data.rows??[]}catch(e){console.log(e)}await y.init()}),(e,t)=>{const o=u("a-button"),p=u("a-menu-item"),R=u("a-menu"),ct=u("a-dropdown"),K=u("a-input-number"),_t=u("a-table"),T=u("a-select-option"),Q=u("a-select"),_=u("a-form-item"),q=u("a-input"),W=u("a-textarea"),vt=u("a-tag"),ft=u("a-form"),X=u("a-card"),gt=u("a-spin");return h("order.create")?(d(),N(gt,{key:0,spinning:O.value},{default:i(()=>[s(X,{title:"لیست محصولات"},{default:i(()=>[s(Nt,{ref_key:"tblProducts",ref:Y,model:S(L)},{image:i(({record:a})=>[P("img",{width:"90px",height:"90px",style:{"object-fit":"scale-down"},src:a.thumb&&a.thumb.full?a.thumb.full:H},null,8,Vt)]),op:i(({record:a})=>[s(ct,null,{overlay:i(()=>[s(R,{onClick:r=>lt(a,r)},{default:i(()=>[(d(!0),k(C,null,B(a.variants_all,r=>(d(),N(p,{key:r.id},{default:i(()=>[x(" افزودن تنوع "+w(r.title),1)]),_:2},1024))),128))]),_:2},1032,["onClick"])]),default:i(()=>[s(o,{style:{"margin-left":"8px"}},{default:i(()=>[t[13]||(t[13]=x(" افزودن ",-1)),s(S(kt))]),_:1})]),_:2},1024)]),_:1},8,["model"]),b.value.length>0?(d(),N(X,{key:0,title:"ثبت سفارش",class:"mt-5"},{default:i(()=>[s(_t,{columns:et,"data-source":b.value,bordered:"",pagination:!1,"row-key":"vid"},{bodyCell:i(({column:a,record:r,index:V})=>[a.dataIndex==="delete"?(d(),N(S(wt),{key:0,class:"cursor-pointer",onClick:U=>S(y).remove(r)},null,8,["onClick"])):a.dataIndex==="product"?(d(),k("div",$t,[P("img",{src:at(r.product),width:"50px"},null,8,Bt),x(" "+w(r.product.title),1)])):a.dataIndex==="wage"?(d(),k(C,{key:2},[x(w(I(r).percentage_pay)+"٪ ",1)],64)):a.dataIndex==="qty"?(d(),N(K,{key:3,value:b.value[V].qty,"onUpdate:value":U=>b.value[V].qty=U,min:1,max:nt(V),onChange:U=>ot(V,U)},null,8,["value","onUpdate:value","max","onChange"])):a.dataIndex==="weight"?(d(),k("div",Et,[!m.grams||m.id!==I(r).id?(d(),k(C,{key:0},[P("span",Lt,w(I(r).title),1),s(S(It),{class:"cursor-pointer ml-2 text-primary",onClick:U=>dt(r)},null,8,["onClick"])],64)):(d(),k(C,{key:1},[s(K,{value:m.grams,"onUpdate:value":t[0]||(t[0]=U=>m.grams=U)},null,8,["value"]),s(S(Ct),{class:"cursor-pointer ml-2 text-success",onClick:ut})],64))])):a.dataIndex==="total"?(d(),k(C,{key:5},[x(w(it(r))+" گرم ",1)],64)):j("",!0)]),_:1},8,["data-source"]),s(ft,{layout:"vertical",class:"mt-4",onSubmit:qt(D,["prevent"])},{default:i(()=>[P("div",Rt,[s(_,{label:"مشتری","validate-status":c.customer_id?"error":"",help:c.customer_id},{default:i(()=>[s(Q,{value:n.customer_id,"onUpdate:value":t[1]||(t[1]=a=>n.customer_id=a),"show-search":"","option-filter-prop":"children","filter-option":pt},{default:i(()=>[(d(!0),k(C,null,B(M.value,a=>(d(),N(T,{key:a.id,value:a.id},{default:i(()=>[x(w(`${a.id}-${a.fname} ${a.lname}`),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1},8,["validate-status","help"]),s(_,{label:"وضعیت تحویل","validate-status":c.sts?"error":"",help:c.sts},{default:i(()=>[s(Q,{value:n.sts,"onUpdate:value":t[2]||(t[2]=a=>n.sts=a)},{default:i(()=>[(d(),k(C,null,B(Z,(a,r)=>s(T,{key:r,value:Number(r)},{default:i(()=>[x(w(a),1)]),_:2},1032,["value"])),64))]),_:1},8,["value"])]),_:1},8,["validate-status","help"]),s(_,{label:"نوع فروش","validate-status":c.type?"error":"",help:c.type},{default:i(()=>[s(Q,{value:n.type,"onUpdate:value":t[3]||(t[3]=a=>n.type=a)},{default:i(()=>[(d(!0),k(C,null,B(A.value,(a,r)=>(d(),N(T,{key:r,value:Number(r)},{default:i(()=>[x(w(a),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1},8,["validate-status","help"]),s(_,{label:"نام دریافت کننده"},{default:i(()=>[s(q,{value:n.shipping_address.reciver_fname,"onUpdate:value":t[4]||(t[4]=a=>n.shipping_address.reciver_fname=a)},null,8,["value"])]),_:1}),s(_,{label:"نام خانوادگی دریافت کننده"},{default:i(()=>[s(q,{value:n.shipping_address.reciver_lname,"onUpdate:value":t[5]||(t[5]=a=>n.shipping_address.reciver_lname=a)},null,8,["value"])]),_:1}),s(_,{label:"استان"},{default:i(()=>[s(q,{value:n.shipping_address.province,"onUpdate:value":t[6]||(t[6]=a=>n.shipping_address.province=a)},null,8,["value"])]),_:1}),s(_,{label:"شهر"},{default:i(()=>[s(q,{value:n.shipping_address.city,"onUpdate:value":t[7]||(t[7]=a=>n.shipping_address.city=a)},null,8,["value"])]),_:1}),s(_,{label:"کد پستی"},{default:i(()=>[s(q,{value:n.shipping_address.zipcode,"onUpdate:value":t[8]||(t[8]=a=>n.shipping_address.zipcode=a)},null,8,["value"])]),_:1}),s(_,{label:"تلفن همراه"},{default:i(()=>[s(q,{value:n.shipping_address.reciver_phone,"onUpdate:value":t[9]||(t[9]=a=>n.shipping_address.reciver_phone=a)},null,8,["value"])]),_:1}),s(_,{label:"تلفن ثابت"},{default:i(()=>[s(q,{value:n.shipping_address.reciver_fixed_phone,"onUpdate:value":t[10]||(t[10]=a=>n.shipping_address.reciver_fixed_phone=a)},null,8,["value"])]),_:1})]),s(_,{label:"توضیحات"},{default:i(()=>[s(W,{value:n.note,"onUpdate:value":t[11]||(t[11]=a=>n.note=a),"auto-size":{minRows:3,maxRows:5}},null,8,["value"])]),_:1}),s(_,{label:"آدرس"},{default:i(()=>[s(W,{value:n.shipping_address.address,"onUpdate:value":t[12]||(t[12]=a=>n.shipping_address.address=a),"auto-size":{minRows:3,maxRows:5}},null,8,["value"])]),_:1}),P("div",Tt,[s(vt,{color:"blue"},{default:i(()=>[x("مجموع وزن: "+w(st.value)+" گرم",1)]),_:1})]),s(o,{type:"primary",class:"mt-4",disabled:!b.value||b.value.length<1,onClick:D},{default:i(()=>[...t[14]||(t[14]=[x(" ثبت تغییرات ",-1)])]),_:1},8,["disabled"])]),_:1})]),_:1})):j("",!0)]),_:1})]),_:1},8,["spinning"])):j("",!0)}}}),Xt=Pt(Qt,[["__scopeId","data-v-cfb22e94"]]);export{Xt as default}; diff --git a/apps/admin-panel/dist/assets/createCity-BS-yp5-L.js b/apps/admin-panel/dist/assets/createCity-BS-yp5-L.js deleted file mode 100644 index 69fddba..0000000 --- a/apps/admin-panel/dist/assets/createCity-BS-yp5-L.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as o}from"./createCity.vue_vue_type_script_setup_true_lang-CygtlXYZ.js";import"./index-WFQJAeoE.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js";export{o as default}; diff --git a/apps/admin-panel/dist/assets/createCity-nBHxgtjC.js b/apps/admin-panel/dist/assets/createCity-nBHxgtjC.js new file mode 100644 index 0000000..1c8092c --- /dev/null +++ b/apps/admin-panel/dist/assets/createCity-nBHxgtjC.js @@ -0,0 +1 @@ +import{_ as o}from"./createCity.vue_vue_type_script_setup_true_lang-DSjJOBVv.js";import"./index-CVG99b4v.js";import"./BaseFormModal.vue_vue_type_script_setup_true_lang-CWur6xTz.js";import"./CityTreeSelect.vue_vue_type_script_setup_true_lang-Ctf4a2EQ.js";export{o as default}; diff --git a/apps/admin-panel/dist/assets/createCity.vue_vue_type_script_setup_true_lang-CygtlXYZ.js b/apps/admin-panel/dist/assets/createCity.vue_vue_type_script_setup_true_lang-CygtlXYZ.js deleted file mode 100644 index 7992bf1..0000000 --- a/apps/admin-panel/dist/assets/createCity.vue_vue_type_script_setup_true_lang-CygtlXYZ.js +++ /dev/null @@ -1 +0,0 @@ -import{d as S,a as f,w as l,l as V,r as s,o as _,n as y,c as t,f as h,A as j,y as b,x as M,z as g,k as R,j as $}from"./index-WFQJAeoE.js";import{_ as z}from"./BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js";const A={class:"grid-2"},E={class:"grid-2"},q=S({__name:"createCity",props:{open:{type:Boolean},id:{}},emits:["update:open","success"],setup(d,{emit:k}){const w=d,m=k,v=w.open!==void 0;$();const x=R(),u=V(!1),a=b({title:"",province:""}),i=b({});async function c(){var r,e;if(Object.keys(i).forEach(o=>delete i[o]),!a.title){i.title="لطفا مقدار را وارد کنید";return}try{u.value=!0,await M.post("cities",a),g.info("اطلاعات با موفقیت به ثبت رسید."),v?(m("success"),m("update:open",!1)):x.push("/city/list")}catch(o){g.error(((e=(r=o==null?void 0:o.response)==null?void 0:r.data)==null?void 0:e.message)??"خطا در ثبت اطلاعات.")}finally{u.value=!1}}return(r,e)=>{const o=s("a-input"),p=s("a-form-item"),B=s("a-button"),C=s("a-card"),U=s("a-form"),N=s("a-spin");return v?(_(),f(z,{key:0,open:!!d.open,id:d.id,"add-title":"افزودن شهر","edit-title":"افزودن شهر",loading:u.value,submitting:u.value,width:"sm","onUpdate:open":e[2]||(e[2]=n=>r.$emit("update:open",n)),onSubmit:c},{default:l(()=>[y("div",A,[t(p,{label:"نام شهر","validate-status":i.title?"error":"",help:i.title},{default:l(()=>[t(o,{value:a.title,"onUpdate:value":e[0]||(e[0]=n=>a.title=n)},null,8,["value"])]),_:1},8,["validate-status","help"]),t(p,{label:"استان"},{default:l(()=>[t(o,{value:a.province,"onUpdate:value":e[1]||(e[1]=n=>a.province=n)},null,8,["value"])]),_:1})])]),_:1},8,["open","id","loading","submitting"])):(_(),f(N,{key:1,spinning:u.value},{default:l(()=>[t(U,{layout:"vertical",onSubmit:j(c,["prevent"])},{default:l(()=>[t(C,{title:"افزودن شهر"},{default:l(()=>[y("div",E,[t(p,{label:"نام شهر","validate-status":i.title?"error":"",help:i.title},{default:l(()=>[t(o,{value:a.title,"onUpdate:value":e[3]||(e[3]=n=>a.title=n)},null,8,["value"])]),_:1},8,["validate-status","help"]),t(p,{label:"استان"},{default:l(()=>[t(o,{value:a.province,"onUpdate:value":e[4]||(e[4]=n=>a.province=n)},null,8,["value"])]),_:1})]),t(B,{type:"primary",onClick:c},{default:l(()=>[...e[5]||(e[5]=[h("ثبت اطلاعات",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["spinning"]))}}});export{q as _}; diff --git a/apps/admin-panel/dist/assets/createCity.vue_vue_type_script_setup_true_lang-DSjJOBVv.js b/apps/admin-panel/dist/assets/createCity.vue_vue_type_script_setup_true_lang-DSjJOBVv.js new file mode 100644 index 0000000..2d686b8 --- /dev/null +++ b/apps/admin-panel/dist/assets/createCity.vue_vue_type_script_setup_true_lang-DSjJOBVv.js @@ -0,0 +1 @@ +import{d as R,m as z,v as A,a as y,w as n,l as g,x as w,r as p,o as k,n as U,c as a,f as E,A as T,y as C,z as B,k as h,j as q}from"./index-CVG99b4v.js";import{_ as D}from"./BaseFormModal.vue_vue_type_script_setup_true_lang-CWur6xTz.js";import{_ as j}from"./CityTreeSelect.vue_vue_type_script_setup_true_lang-Ctf4a2EQ.js";const F={class:"grid-2"},G={class:"grid-2"},K=R({__name:"createCity",props:{open:{type:Boolean},id:{}},emits:["update:open","success"],setup(c,{emit:M}){const _=c,b=M,m=_.open!==void 0;q();const N=h(),r=g(!1),t=C({title:"",parent:void 0,percent:null,percent_aux:null}),v=g([]);async function x(){try{const{data:s}=await w.post("cities/list");v.value=s.rows??[]}catch(s){console.log(s)}}m?z(()=>_.open,s=>s&&x(),{immediate:!0}):A(x);const u=C({});async function f(){var s,e;if(Object.keys(u).forEach(o=>delete u[o]),!t.title){u.title="لطفا مقدار را وارد کنید";return}try{r.value=!0,await w.post("cities",{...t,parent:t.parent??null}),B.info("اطلاعات با موفقیت به ثبت رسید."),m?(Object.assign(t,{title:"",percent:null,percent_aux:null}),b("success"),b("update:open",!1)):N.push("/city/list")}catch(o){B.error(((e=(s=o==null?void 0:o.response)==null?void 0:s.data)==null?void 0:e.message)??"خطا در ثبت اطلاعات.")}finally{r.value=!1}}return(s,e)=>{const o=p("a-input"),i=p("a-form-item"),d=p("a-input-number"),S=p("a-button"),V=p("a-card"),$=p("a-form"),O=p("a-spin");return m?(k(),y(D,{key:0,open:!!c.open,id:c.id,"add-title":"افزودن شهر","edit-title":"افزودن شهر",loading:r.value,submitting:r.value,width:"sm","onUpdate:open":e[4]||(e[4]=l=>s.$emit("update:open",l)),onSubmit:f},{default:n(()=>[U("div",F,[a(i,{label:"نام شهر","validate-status":u.title?"error":"",help:u.title},{default:n(()=>[a(o,{value:t.title,"onUpdate:value":e[0]||(e[0]=l=>t.title=l)},null,8,["value"])]),_:1},8,["validate-status","help"]),a(i,{label:"والد",help:"خالی = سرشاخه، مثل کشور"},{default:n(()=>[a(j,{value:t.parent,"onUpdate:value":e[1]||(e[1]=l=>t.parent=l),cities:v.value,"parent-picker":"",placeholder:"والد را انتخاب کنید"},null,8,["value","cities"])]),_:1}),a(i,{label:"درصد مشتری عمده"},{default:n(()=>[a(d,{value:t.percent,"onUpdate:value":e[2]||(e[2]=l=>t.percent=l),class:"w-full",min:0,max:100,step:.1},null,8,["value"])]),_:1}),a(i,{label:"درصد کارشناس فروش"},{default:n(()=>[a(d,{value:t.percent_aux,"onUpdate:value":e[3]||(e[3]=l=>t.percent_aux=l),class:"w-full",min:0,max:100,step:.1},null,8,["value"])]),_:1})])]),_:1},8,["open","id","loading","submitting"])):(k(),y(O,{key:1,spinning:r.value},{default:n(()=>[a($,{layout:"vertical",onSubmit:T(f,["prevent"])},{default:n(()=>[a(V,{title:"افزودن شهر"},{default:n(()=>[U("div",G,[a(i,{label:"نام شهر","validate-status":u.title?"error":"",help:u.title},{default:n(()=>[a(o,{value:t.title,"onUpdate:value":e[5]||(e[5]=l=>t.title=l)},null,8,["value"])]),_:1},8,["validate-status","help"]),a(i,{label:"والد",help:"خالی = سرشاخه، مثل کشور"},{default:n(()=>[a(j,{value:t.parent,"onUpdate:value":e[6]||(e[6]=l=>t.parent=l),cities:v.value,"parent-picker":"",placeholder:"والد را انتخاب کنید"},null,8,["value","cities"])]),_:1}),a(i,{label:"درصد مشتری عمده"},{default:n(()=>[a(d,{value:t.percent,"onUpdate:value":e[7]||(e[7]=l=>t.percent=l),class:"w-full",min:0,max:100,step:.1},null,8,["value"])]),_:1}),a(i,{label:"درصد کارشناس فروش"},{default:n(()=>[a(d,{value:t.percent_aux,"onUpdate:value":e[8]||(e[8]=l=>t.percent_aux=l),class:"w-full",min:0,max:100,step:.1},null,8,["value"])]),_:1})]),a(S,{type:"primary",onClick:f},{default:n(()=>[...e[9]||(e[9]=[E("ثبت اطلاعات",-1)])]),_:1})]),_:1})]),_:1})]),_:1},8,["spinning"]))}}});export{K as _}; diff --git a/apps/admin-panel/dist/assets/filters-C1cWKkpl.js b/apps/admin-panel/dist/assets/filters-C1cWKkpl.js deleted file mode 100644 index 4530da6..0000000 --- a/apps/admin-panel/dist/assets/filters-C1cWKkpl.js +++ /dev/null @@ -1 +0,0 @@ -import{m as t}from"./index-1e_FodC0.js";function e(r){return r&&r.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")+" تومان "}function i(r){return r&&r.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function o(r){return r&&t(r).format("jYYYY/jMM/jDD")}function u(r){return r&&t(r).format("jYYYY/jMM/jDD - hh:mm:ss")}export{e as a,u as b,o as j,i as p}; diff --git a/apps/admin-panel/dist/assets/filters-UavLT20t.js b/apps/admin-panel/dist/assets/filters-UavLT20t.js new file mode 100644 index 0000000..999030a --- /dev/null +++ b/apps/admin-panel/dist/assets/filters-UavLT20t.js @@ -0,0 +1 @@ +import{m as t}from"./index-pLFqZCCf.js";function e(r){return r&&r.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")+" تومان "}function i(r){return r&&r.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function f(r){return r&&t(r).format("jYYYY/jMM/jDD")}function o(r){return typeof r!="string"||!/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/.test(r)?r:t(r).format("jYYYY/jM/jD-HH:mm")}function u(r){return r&&t(r).format("jYYYY/jMM/jDD - hh:mm:ss")}export{e as a,u as b,o as g,f as j,i as p}; diff --git a/apps/admin-panel/dist/assets/icons-BaVxJrpa.js b/apps/admin-panel/dist/assets/icons-BaVxJrpa.js new file mode 100644 index 0000000..99fcb3c --- /dev/null +++ b/apps/admin-panel/dist/assets/icons-BaVxJrpa.js @@ -0,0 +1 @@ +import{c,I as l,R as _,L as C,S as x,T as D,N as E,E as N,D as L,U}from"./index-CVG99b4v.js";import{S as G}from"./SettingOutlined-D7--Xtqg.js";import{B as T,D as F,S as q,T as R}from"./TeamOutlined-BEJyrWYB.js";import{S as X,U as J}from"./UnorderedListOutlined-CKa6XzC7.js";import{C as Q}from"./CreditCardOutlined-wQJvlSrP.js";var W={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zM464 544H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H212V612h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200z"}}]},name:"appstore",theme:"outlined"};function P(r){for(var e=1;e{try{const{data:e}=await p.get("log/list/customer");f.value=e}catch(e){console.log(e)}}),(e,n)=>{const c=o("a-select-option"),r=o("a-select"),k=o("a-form-item"),C=o("a-form"),j=o("a-table"),B=o("a-card"),I=o("a-spin");return d(),v(I,{spinning:u.value},{default:t(()=>[l(B,{title:"آمار"},{default:t(()=>[l(C,{layout:"vertical"},{default:t(()=>[F("div",L,[l(k,{label:"مشتری"},{default:t(()=>[l(r,{value:s.value,"onUpdate:value":n[0]||(n[0]=a=>s.value=a),"show-search":"","allow-clear":"",placeholder:"انتخاب کنید","filter-option":b,onChange:w},{default:t(()=>[(d(!0),g(x,null,T(f.value,a=>(d(),v(c,{key:a.id,value:a.id},{default:t(()=>[y(m(a.name)+" - "+m(a.mobile),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})])]),_:1}),l(j,{"data-source":_.value,columns:h,pagination:{pageSize:20},size:"small","row-key":"id"},{bodyCell:t(({column:a,record:N})=>[a.dataIndex==="caj"?(d(),g(x,{key:0},[y(m(D(V)(N.caj)),1)],64)):E("",!0)]),_:1},8,["data-source"])]),_:1})]),_:1},8,["spinning"])}}});export{q as default}; +import{b as V}from"./filters-UavLT20t.js";import{d as S,v as z,x as p,a as v,w as t,l as i,r as o,o as d,c as l,n as F,b as g,e as T,F as x,f as y,t as m,h as D,i as E}from"./index-CVG99b4v.js";import"./index-pLFqZCCf.js";const L={class:"grid-2"},q=S({__name:"index",setup(M){const u=i(!1),f=i([]),s=i(void 0),_=i([]),h=[{title:"عملیات",dataIndex:"action"},{title:"جزئیات",dataIndex:"detail"},{title:"تاریخ",dataIndex:"caj"}];function b(e,n){var c,r;return String(((r=(c=n==null?void 0:n.children)==null?void 0:c[0])==null?void 0:r.children)??"").includes(e)}async function w(){if(!s.value){_.value=[];return}try{u.value=!0;const{data:e}=await p.get(`log/ago/${s.value}`);_.value=e}catch(e){console.log(e)}finally{u.value=!1}}return z(async()=>{try{const{data:e}=await p.get("log/list/customer");f.value=e}catch(e){console.log(e)}}),(e,n)=>{const c=o("a-select-option"),r=o("a-select"),k=o("a-form-item"),C=o("a-form"),j=o("a-table"),B=o("a-card"),I=o("a-spin");return d(),v(I,{spinning:u.value},{default:t(()=>[l(B,{title:"آمار"},{default:t(()=>[l(C,{layout:"vertical"},{default:t(()=>[F("div",L,[l(k,{label:"مشتری"},{default:t(()=>[l(r,{value:s.value,"onUpdate:value":n[0]||(n[0]=a=>s.value=a),"show-search":"","allow-clear":"",placeholder:"انتخاب کنید","filter-option":b,onChange:w},{default:t(()=>[(d(!0),g(x,null,T(f.value,a=>(d(),v(c,{key:a.id,value:a.id},{default:t(()=>[y(m(a.name)+" - "+m(a.mobile),1)]),_:2},1032,["value"]))),128))]),_:1},8,["value"])]),_:1})])]),_:1}),l(j,{"data-source":_.value,columns:h,pagination:{pageSize:20},size:"small","row-key":"id"},{bodyCell:t(({column:a,record:N})=>[a.dataIndex==="caj"?(d(),g(x,{key:0},[y(m(D(V)(N.caj)),1)],64)):E("",!0)]),_:1},8,["data-source"])]),_:1})]),_:1},8,["spinning"])}}});export{q as default}; diff --git a/apps/admin-panel/dist/assets/index-WFQJAeoE.js b/apps/admin-panel/dist/assets/index-CVG99b4v.js similarity index 93% rename from apps/admin-panel/dist/assets/index-WFQJAeoE.js rename to apps/admin-panel/dist/assets/index-CVG99b4v.js index e949c9e..8c426af 100644 --- a/apps/admin-panel/dist/assets/index-WFQJAeoE.js +++ b/apps/admin-panel/dist/assets/index-CVG99b4v.js @@ -1,28 +1,28 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Dashboard-Dnj2el11.js","assets/TeamOutlined-CQ06mk_Y.js","assets/_plugin-vue_export-helper-DlAUqK2U.js","assets/filters-C1cWKkpl.js","assets/index-1e_FodC0.js","assets/Dashboard-CP5E1mJe.css","assets/myData-BWHEjOIV.js","assets/auth-Cz9vAefU.js","assets/Const-CBeA4T-E.js","assets/useDeleteHandler-AErXCFBG.js","assets/ImageUploadInput.vue_vue_type_script_setup_true_lang-BQ_i_QZe.js","assets/Const-CF4bN2d5.css","assets/wallet-kgB-nwzP.js","assets/wallet-C1CnlfgP.css","assets/report-D37OGO0q.js","assets/report-BB17it2x.css","assets/AddProduct-tKobI_Dp.js","assets/AddProduct-DM5gziby.css","assets/EditProduct-qLy0zc-L.js","assets/ProductList-wKrWrklR.js","assets/model-Di_BQPv1.js","assets/SettingOutlined-DZJd42S-.js","assets/model-BFlr1XuY.css","assets/productListModel-CLJKMrKL.js","assets/ProductList-B0g390Za.css","assets/Add-D30i4gnX.js","assets/Add.vue_vue_type_script_setup_true_lang-BP3ofJiO.js","assets/BaseFormModal.vue_vue_type_script_setup_true_lang-Dwad_3k9.js","assets/Edit-B35-jN2T.js","assets/List-Cs3aXsXf.js","assets/ListPageHeader.vue_vue_type_script_setup_true_lang-BmENA4yH.js","assets/addFinDoc-W_xiZOQh.js","assets/addFinDoc.vue_vue_type_script_setup_true_lang-Claf_9qa.js","assets/List-C8ZeZfKc.js","assets/TooltipBtn.vue_vue_type_script_setup_true_lang-CW6ghT15.js","assets/icons-CDnlJr4R.js","assets/UnorderedListOutlined-CvD227Uu.js","assets/CreditCardOutlined-Dh4ayM2S.js","assets/List-BwJsTUfu.css","assets/OmdeList-ivtbIeOV.js","assets/OmdeList-CSMtiDCI.css","assets/MakeOrder-CraGt8ES.js","assets/MakeOrder-BGB_ZKFa.css","assets/create-C1Sm2Hf9.js","assets/create-B36GAC_P.css","assets/TaminList-eeXL80j5.js","assets/TaminList-C92cpw21.css","assets/promotion_list-DF9hSvBi.js","assets/promotion_add_edit.vue_vue_type_script_setup_true_lang-CuWLYa5b.js","assets/PromotionForm-DrpzLEjQ.js","assets/PromotionForm-CqRyYr_h.css","assets/promotion_tak_add_edit.vue_vue_type_script_setup_true_lang-B4_hE_pz.js","assets/promotion_list-CpV0Jw93.css","assets/promotion_add_edit-DpDG31X7.js","assets/promotion_tak_add_edit-CBkiRJTw.js","assets/offersIgnore-add-edit-wv0T6-3k.js","assets/offersIgnore-add-edit-BQUbUYF5.css","assets/Comments-BffJJreQ.js","assets/montzar-icon-B0wdL36O.js","assets/Comments-C3AHEtH9.css","assets/create-CyrgXpmn.js","assets/create-Br_ls4Kw.css","assets/user-COHu7j5R.js","assets/user-3ecT2At2.css","assets/wallet-DUxrHIrM.js","assets/EditReagent-DFgWLy4v.js","assets/ReagentCustomer-BUrwCRTH.js","assets/ReagentCustomer-uQVwyvt5.css","assets/AgentDetail-lIpIMqVa.js","assets/AgentDetail-DVt7uRmy.css","assets/EditBulkCustomer-ClzBDuZO.js","assets/bulkCustomer.vue_vue_type_script_setup_true_lang-zBMtv664.js","assets/ViewOmdeCustomer-tXpdhZ3s.js","assets/CustomerDetail-KvHUPLoN.js","assets/CustomerDetail-jkU0PuSY.css","assets/EditSingleCustomer-BXZn7b-f.js","assets/singleCustomer.vue_vue_type_script_setup_true_lang-6EgeQ9yM.js","assets/ViewSingleCustomer-eLMOFTWp.js","assets/OmdeList-zzqhSk5R.js","assets/omdeListModel-B-zNFWRI.js","assets/OmdeNonVerifiedList-DZRWwcEk.js","assets/BankerList-BnXBNYl1.js","assets/ShopkeeperList-C7Y-9x4E.js","assets/OmdeArchivedList-DUsEG3kp.js","assets/ReagentList-4cYdsHGv.js","assets/AddCustomer-Dp38H4M5.js","assets/SingleCustomer-D08Zj62F.js","assets/SingleCustomer-DazL2sX7.css","assets/order_item-B0Oiz6l7.js","assets/DateInput-Cdw6YoHu.js","assets/DateInput-CQSQVa60.css","assets/order_item-Bm3RKXPi.css","assets/product-DlnGNo0B.js","assets/product-Cns1UPVS.css","assets/list-7FSyZAcP.js","assets/ListUser-Dp_qXseC.js","assets/UserCreate-DUjELXD2.js","assets/UserCreate-KKW7p1U9.css","assets/UserEdit-BRCMnrb_.js","assets/Permission-uW7bxjY4.js","assets/Permission-BtHZFiMp.css","assets/createCity-BS-yp5-L.js","assets/createCity.vue_vue_type_script_setup_true_lang-CygtlXYZ.js","assets/cityList-BcT2w5MZ.js","assets/index-BZWejsu5.js","assets/newsletters-CNZOhpJ7.js","assets/newsletters-mRzp76Qf.css","assets/AddBranches-Jt_SMHZh.js","assets/AddBranches.vue_vue_type_script_setup_true_lang-BTBcvf9O.js","assets/EditBranches-DeQQ1fYf.js","assets/ListBranches-CElnGdqD.js","assets/FacilityList.vue_vue_type_script_setup_true_lang-C5xeMC8b.js","assets/AddWorkshop-7T7MIK4o.js","assets/AddWorkshop.vue_vue_type_script_setup_true_lang-BXy9e7qX.js","assets/EditWorkshop-Bp9-GYKN.js","assets/ListWorkshop-BEaJtuaB.js","assets/AddInvoice-BO7d-BCP.js","assets/AddInvoice-4wuMG4ol.css","assets/EditInvoice-BgcjxMie.js","assets/ListInvoice-DRm_S46V.js","assets/ListInvoice-BzK-aRkQ.css","assets/Login-DZTfd8tZ.js","assets/Login-CwZRId2N.css","assets/reg-QBTTV13v.js","assets/reg-ClbWC7bS.css","assets/Main-Bkne3dxn.js","assets/Main-BpZGxMdb.css","assets/FullPage-AGcOKs3k.js","assets/Error404-20f85JFw.js","assets/Error404-Bgg_sIhN.css","assets/Error500-BKile5Jb.js","assets/Error500-CNgAJT0r.css","assets/NotAuthorized-B3JoNMi6.js","assets/NotAuthorized-BA1hhw1y.css","assets/Maintenance-F05Lfjdp.js","assets/Maintenance-r3ddTZoG.css"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Dashboard-C_P6-F5I.js","assets/TeamOutlined-BEJyrWYB.js","assets/_plugin-vue_export-helper-DlAUqK2U.js","assets/filters-UavLT20t.js","assets/index-pLFqZCCf.js","assets/Dashboard-BYIxpddi.css","assets/myData-Dyg3mt0s.js","assets/auth-Cu4qHRNu.js","assets/Const-Co5Bcsua.js","assets/useDeleteHandler-D7PJ3wUb.js","assets/ImageUploadInput.vue_vue_type_script_setup_true_lang-C8WW9alD.js","assets/Const-CF4bN2d5.css","assets/wallet-BPeWSHJF.js","assets/wallet-C1CnlfgP.css","assets/accounting-CmNZ3SSJ.js","assets/SafetyCertificateOutlined-C5Qh-j2p.js","assets/accounting-BE_fZsW1.css","assets/wage-xLt-TJEB.js","assets/wage-CgOR_LFc.css","assets/report-BcgwxcJS.js","assets/report-Dpit9oC_.css","assets/AddProduct-DYRcWcLI.js","assets/AddProduct-DFJbP1pt.css","assets/EditProduct-DyJHUlmc.js","assets/ProductList-CvfI0Eds.js","assets/model-CvqTGmy8.js","assets/SettingOutlined-D7--Xtqg.js","assets/model-Bb511Wgd.css","assets/AccountingSyncButton.vue_vue_type_script_setup_true_lang-DYPt-3CU.js","assets/productListModel-CJQEfgeJ.js","assets/ProductList-DhOiTxfO.css","assets/Add-DseHzapY.js","assets/Add.vue_vue_type_script_setup_true_lang-Ct9fNasS.js","assets/BaseFormModal.vue_vue_type_script_setup_true_lang-CWur6xTz.js","assets/Edit-DgpRLPm6.js","assets/List-CBzhaJHN.js","assets/ListPageHeader.vue_vue_type_script_setup_true_lang-CetMN4WH.js","assets/addFinDoc-D35iksYc.js","assets/addFinDoc.vue_vue_type_script_setup_true_lang-Cbwb5Q0D.js","assets/List-BtjkagGb.js","assets/TooltipBtn.vue_vue_type_script_setup_true_lang-DxnpxKjK.js","assets/icons-BaVxJrpa.js","assets/UnorderedListOutlined-CKa6XzC7.js","assets/CreditCardOutlined-wQJvlSrP.js","assets/List-GiTlTLjH.css","assets/OmdeList-C4itKCpn.js","assets/OmdeList-CSMtiDCI.css","assets/MakeOrder-B7PVZZ1G.js","assets/MakeOrder-BGB_ZKFa.css","assets/create-Dn2YJFlP.js","assets/create-B36GAC_P.css","assets/TaminList-Be_TUmas.js","assets/TaminList-C92cpw21.css","assets/promotion_list-XeQiqBIe.js","assets/promotion_add_edit.vue_vue_type_script_setup_true_lang-DksfKe-_.js","assets/PromotionForm-4r-nqXU-.js","assets/PromotionForm-CqRyYr_h.css","assets/promotion_tak_add_edit.vue_vue_type_script_setup_true_lang-CTdop19E.js","assets/promotion_list-CpV0Jw93.css","assets/promotion_add_edit-BfjkTz9B.js","assets/promotion_tak_add_edit-CuSmBjkL.js","assets/offersIgnore-add-edit-DtdUHP9h.js","assets/offersIgnore-add-edit-BQUbUYF5.css","assets/Comments-K8AOw9Zm.js","assets/montzar-icon-B0wdL36O.js","assets/Comments-C3AHEtH9.css","assets/create-DFv2UVXX.js","assets/create-Br_ls4Kw.css","assets/user-CpbQxxBB.js","assets/user-3ecT2At2.css","assets/wallet-BbL00w1h.js","assets/EditReagent-CI0YT8IP.js","assets/ReagentCustomer-DcWF6RQp.js","assets/CityTreeSelect.vue_vue_type_script_setup_true_lang-Ctf4a2EQ.js","assets/ReagentCustomer-Ci5Lm3Fm.css","assets/AgentDetail-tAZA35KU.js","assets/AgentDetail-BUDD3mLE.css","assets/EditBulkCustomer-Cf9ySs4L.js","assets/bulkCustomer.vue_vue_type_script_setup_true_lang-BLZHRH0s.js","assets/DateInput-P3xqxLM7.js","assets/DateInput-BFphsjxa.css","assets/ViewOmdeCustomer-CEMT-stS.js","assets/CustomerDetail-mSM31qkb.js","assets/CustomerDetail-DXo2hC49.css","assets/EditSingleCustomer-0dw1FIoi.js","assets/singleCustomer.vue_vue_type_script_setup_true_lang-BCru8Kun.js","assets/ViewSingleCustomer-Bds0ovBG.js","assets/OmdeList-s6Wh2bX6.js","assets/omdeListModel-C6pAmqnF.js","assets/OmdeNonVerifiedList-Bf5RFUhe.js","assets/BankerList-JNSfkM07.js","assets/ShopkeeperList-BD0R41wm.js","assets/OmdeArchivedList-tANksDLW.js","assets/ReagentList-CewJDGn-.js","assets/AddCustomer-PBhBkoIp.js","assets/SingleCustomer-C5Dlor_C.js","assets/SingleCustomer-DazL2sX7.css","assets/order_item-O2ONrSuc.js","assets/order_item-YNbkzIHK.css","assets/product-BI-cj5NX.js","assets/product-Cns1UPVS.css","assets/list-CqsviY_X.js","assets/ListUser-DdqUsBOd.js","assets/UserCreate-B8VEprZ-.js","assets/UserCreate-KKW7p1U9.css","assets/UserEdit-CsC3QweV.js","assets/Permission-BZNy3Z54.js","assets/Permission-BtHZFiMp.css","assets/createCity-nBHxgtjC.js","assets/createCity.vue_vue_type_script_setup_true_lang-DSjJOBVv.js","assets/cityList-DqWduJyu.js","assets/index-B40pMND0.js","assets/newsletters-BqgnRvKo.js","assets/newsletters-BvtMr64T.css","assets/AddBranches-CEPUlWWo.js","assets/AddBranches.vue_vue_type_script_setup_true_lang-DZPeg6FI.js","assets/EditBranches-CTRDPCaW.js","assets/ListBranches-Br0nTsLr.js","assets/FacilityList.vue_vue_type_script_setup_true_lang-CcehyYuf.js","assets/AddWorkshop-DXNw53cg.js","assets/AddWorkshop.vue_vue_type_script_setup_true_lang-DM0hJwHH.js","assets/EditWorkshop-B2I-LaXs.js","assets/ListWorkshop-xO2YqJRG.js","assets/AddInvoice-ErZYOCpz.js","assets/AddInvoice-4wuMG4ol.css","assets/EditInvoice-CCyLjs66.js","assets/ListInvoice-ItK3vpkA.js","assets/ListInvoice-BzK-aRkQ.css","assets/Login-Dc00vCrx.js","assets/Login-CwZRId2N.css","assets/reg-G-Nm9V8_.js","assets/reg-ClbWC7bS.css","assets/Main-BjQ7I8Yg.js","assets/Main-C8E39nFU.css","assets/FullPage-B0IlrbNX.js","assets/IamCallback-D0SGhdLL.js","assets/Error404-Dv5orb9R.js","assets/Error404-CQyPUoKe.css","assets/Error500-ludjlPuy.js","assets/Error500-Cne_2YUW.css","assets/NotAuthorized-CJbmq4LZ.js","assets/NotAuthorized-B2SbXtX1.css","assets/Maintenance-Ce1MFGA9.js","assets/Maintenance-Duz6NlUR.css"])))=>i.map(i=>d[i]); (function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const a of r.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerPolicy&&(r.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?r.credentials="include":o.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(o){if(o.ep)return;o.ep=!0;const r=n(o);fetch(o.href,r)}})();/** * @vue/shared v3.5.42 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function mw(t){const e=Object.create(null);for(const n of t.split(","))e[n]=1;return n=>n in e}const Xt={},zl=[],nr=()=>{},nI=()=>!1,Ng=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),Bg=t=>t.startsWith("onUpdate:"),mn=Object.assign,vw=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},V8=Object.prototype.hasOwnProperty,Ht=(t,e)=>V8.call(t,e),bt=Array.isArray,wa=t=>Nd(t)==="[object Map]",up=t=>Nd(t)==="[object Set]",T$=t=>Nd(t)==="[object Date]",St=t=>typeof t=="function",Qt=t=>typeof t=="string",Yi=t=>typeof t=="symbol",Bt=t=>t!==null&&typeof t=="object",iI=t=>(Bt(t)||St(t))&&St(t.then)&&St(t.catch),oI=Object.prototype.toString,Nd=t=>oI.call(t),X8=t=>Nd(t).slice(8,-1),rI=t=>Nd(t)==="[object Object]",zg=t=>Qt(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Su=mw(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Hg=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},Y8=/-\w/g,mi=Hg(t=>t.replace(Y8,e=>e.slice(1).toUpperCase())),G8=/\B([A-Z])/g,Ks=Hg(t=>t.replace(G8,"-$1").toLowerCase()),Wg=Hg(t=>t.charAt(0).toUpperCase()+t.slice(1)),Lv=Hg(t=>t?`on${Wg(t)}`:""),er=(t,e)=>!Object.is(t,e),Fv=(t,...e)=>{for(let n=0;n{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:i,value:n})},K8=t=>{const e=parseFloat(t);return isNaN(e)?t:e},U8=t=>{const e=Qt(t)?Number(t):NaN;return isNaN(e)?t:e};let O$;const jg=()=>O$||(O$=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function bw(t){if(bt(t)){const e={};for(let n=0;n{if(n){const i=n.split(Z8);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function Bd(t){let e="";if(Qt(t))e=t;else if(bt(t))for(let n=0;n!!(t&&t.__v_isRef===!0),iB=t=>Qt(t)?t:t==null?"":bt(t)||Bt(t)&&(t.toString===oI||!St(t.toString))?lI(t)?iB(t.value):JSON.stringify(t,cI,2):String(t),cI=(t,e)=>lI(e)?cI(t,e.value):wa(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[i,o],r)=>(n[Nv(i,r)+" =>"]=o,n),{})}:up(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>Nv(n))}:Yi(e)?Nv(e):Bt(e)&&!bt(e)&&!rI(e)?String(e):e,Nv=(t,e="")=>{var n;return Yi(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};/** +**/function mw(t){const e=Object.create(null);for(const n of t.split(","))e[n]=1;return n=>n in e}const Xt={},zl=[],nr=()=>{},nI=()=>!1,Bg=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),zg=t=>t.startsWith("onUpdate:"),mn=Object.assign,vw=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},V8=Object.prototype.hasOwnProperty,Ht=(t,e)=>V8.call(t,e),bt=Array.isArray,wa=t=>Bd(t)==="[object Map]",dp=t=>Bd(t)==="[object Set]",T$=t=>Bd(t)==="[object Date]",St=t=>typeof t=="function",Qt=t=>typeof t=="string",Yi=t=>typeof t=="symbol",Bt=t=>t!==null&&typeof t=="object",iI=t=>(Bt(t)||St(t))&&St(t.then)&&St(t.catch),oI=Object.prototype.toString,Bd=t=>oI.call(t),X8=t=>Bd(t).slice(8,-1),rI=t=>Bd(t)==="[object Object]",Hg=t=>Qt(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Cu=mw(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Wg=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},Y8=/-\w/g,mi=Wg(t=>t.replace(Y8,e=>e.slice(1).toUpperCase())),G8=/\B([A-Z])/g,Ks=Wg(t=>t.replace(G8,"-$1").toLowerCase()),jg=Wg(t=>t.charAt(0).toUpperCase()+t.slice(1)),Lv=Wg(t=>t?`on${jg(t)}`:""),er=(t,e)=>!Object.is(t,e),Fv=(t,...e)=>{for(let n=0;n{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:i,value:n})},K8=t=>{const e=parseFloat(t);return isNaN(e)?t:e},U8=t=>{const e=Qt(t)?Number(t):NaN;return isNaN(e)?t:e};let O$;const Vg=()=>O$||(O$=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function bw(t){if(bt(t)){const e={};for(let n=0;n{if(n){const i=n.split(Z8);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function zd(t){let e="";if(Qt(t))e=t;else if(bt(t))for(let n=0;n!!(t&&t.__v_isRef===!0),iB=t=>Qt(t)?t:t==null?"":bt(t)||Bt(t)&&(t.toString===oI||!St(t.toString))?lI(t)?iB(t.value):JSON.stringify(t,cI,2):String(t),cI=(t,e)=>lI(e)?cI(t,e.value):wa(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[i,o],r)=>(n[Nv(i,r)+" =>"]=o,n),{})}:dp(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>Nv(n))}:Yi(e)?Nv(e):Bt(e)&&!bt(e)&&!rI(e)?String(e):e,Nv=(t,e="")=>{var n;return Yi(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};/** * @vue/reactivity v3.5.42 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let _n;class uI{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&_n&&(_n.active?(this.parent=_n,this.index=(_n.scopes||(_n.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,n;if(this.scopes){const i=this.scopes.slice();for(e=0,n=i.length;e0&&--this._on===0){if(_n===this)_n=this.prevScope;else{let e=_n;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let n,i;for(n=0,i=this.effects.length;n0)return;if($u){let e=$u;for($u=void 0;e;){const n=e.next;e.next=void 0,e.flags&=-9,e=n}}let t;for(;Cu;){let e=Cu;for(Cu=void 0;e;){const n=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){t||(t=i)}e=n}}if(t)throw t}function mI(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function vI(t){let e,n=t.depsTail,i=n;for(;i;){const o=i.prevDep;i.version===-1?(i===n&&(n=o),Sw(i),oB(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=o}t.deps=e,t.depsTail=n}function z0(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(bI(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function bI(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===Ju)||(t.globalVersion=Ju,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!z0(t))))return;t.flags|=2;const e=t.dep,n=Zt,i=Eo;Zt=t,Eo=!0;try{mI(t);const o=t.fn(t._value);(e.version===0||er(o,t._value))&&(t.flags|=128,t._value=o,e.version++)}catch(o){throw e.version++,o}finally{Zt=n,Eo=i,vI(t),t.flags&=-3}}function Sw(t,e=!1){const{dep:n,prevSub:i,nextSub:o}=t;if(i&&(i.nextSub=o,t.prevSub=void 0),o&&(o.prevSub=i,t.nextSub=void 0),n.subs===t&&(n.subs=i,!i&&n.computed)){n.computed.flags&=-5;for(let r=n.computed.deps;r;r=r.nextDep)Sw(r,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function oB(t){const{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}let Eo=!0;const yI=[];function Fr(){yI.push(Eo),Eo=!1}function Nr(){const t=yI.pop();Eo=t===void 0?!0:t}function M$(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const n=Zt;Zt=void 0;try{e()}finally{Zt=n}}}let Ju=0,rB=class{constructor(e,n){this.sub=e,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}};class Cw{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!Zt||!Eo||Zt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Zt)n=this.activeLink=new rB(Zt,this),Zt.deps?(n.prevDep=Zt.depsTail,Zt.depsTail.nextDep=n,Zt.depsTail=n):Zt.deps=Zt.depsTail=n,xI(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const i=n.nextDep;i.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=i),n.prevDep=Zt.depsTail,n.nextDep=void 0,Zt.depsTail.nextDep=n,Zt.depsTail=n,Zt.deps===n&&(Zt.deps=i)}return n}trigger(e){this.version++,Ju++,this.notify(e)}notify(e){xw();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{ww()}}}function xI(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let i=e.deps;i;i=i.nextDep)xI(i)}const n=t.dep.subs;n!==t&&(t.prevSub=n,n&&(n.nextSub=t)),t.dep.subs=t}}const dp=new WeakMap,bs=Symbol(""),H0=Symbol(""),Qu=Symbol("");function qn(t,e,n){if(Eo&&Zt){let i=dp.get(t);i||dp.set(t,i=new Map);let o=i.get(n);o||(i.set(n,o=new Cw),o.map=i,o.key=n),o.track()}}function Cr(t,e,n,i,o,r){const a=dp.get(t);if(!a){Ju++;return}const s=l=>{l&&l.trigger()};if(xw(),e==="clear")a.forEach(s);else{const l=bt(t),c=l&&zg(n);if(l&&n==="length"){const u=Number(i);a.forEach((d,f)=>{(f==="length"||f===Qu||!Yi(f)&&f>=u)&&s(d)})}else switch((n!==void 0||a.has(void 0))&&s(a.get(n)),c&&s(a.get(Qu)),e){case"add":l?c&&s(a.get("length")):(s(a.get(bs)),wa(t)&&s(a.get(H0)));break;case"delete":l||(s(a.get(bs)),wa(t)&&s(a.get(H0)));break;case"set":wa(t)&&s(a.get(bs));break}}ww()}function aB(t,e){const n=dp.get(t);return n&&n.get(e)}function cl(t){const e=dt(t);return e===t?e:(qn(e,"iterate",Qu),ji(t)?e:e.map(ko))}function Xg(t){return qn(t=dt(t),"iterate",Qu),t}function Zo(t,e){return Br(t)?oc(kr(t)?ko(e):e):ko(e)}const sB={__proto__:null,[Symbol.iterator](){return zv(this,Symbol.iterator,t=>Zo(this,t))},concat(...t){return cl(this).concat(...t.map(e=>bt(e)?cl(e):e))},entries(){return zv(this,"entries",t=>(t[1]=Zo(this,t[1]),t))},every(t,e){return fr(this,"every",t,e,void 0,arguments)},filter(t,e){return fr(this,"filter",t,e,n=>n.map(i=>Zo(this,i)),arguments)},find(t,e){return fr(this,"find",t,e,n=>Zo(this,n),arguments)},findIndex(t,e){return fr(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return fr(this,"findLast",t,e,n=>Zo(this,n),arguments)},findLastIndex(t,e){return fr(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return fr(this,"forEach",t,e,void 0,arguments)},includes(...t){return Hv(this,"includes",t)},indexOf(...t){return Hv(this,"indexOf",t)},join(t){return cl(this).join(t)},lastIndexOf(...t){return Hv(this,"lastIndexOf",t)},map(t,e){return fr(this,"map",t,e,void 0,arguments)},pop(){return Vc(this,"pop")},push(...t){return Vc(this,"push",t)},reduce(t,...e){return I$(this,"reduce",t,e)},reduceRight(t,...e){return I$(this,"reduceRight",t,e)},shift(){return Vc(this,"shift")},some(t,e){return fr(this,"some",t,e,void 0,arguments)},splice(...t){return Vc(this,"splice",t)},toReversed(){return cl(this).toReversed()},toSorted(t){return cl(this).toSorted(t)},toSpliced(...t){return cl(this).toSpliced(...t)},unshift(...t){return Vc(this,"unshift",t)},values(){return zv(this,"values",t=>Zo(this,t))}};function zv(t,e,n){const i=Xg(t),o=i[e]();return i!==t&&!ji(t)&&(o._next=o.next,o.next=()=>{const r=o._next();return r.done||(r.value=n(r.value)),r}),o}const lB=Array.prototype;function fr(t,e,n,i,o,r){const a=Xg(t),s=a!==t&&!ji(t),l=a[e];if(l!==lB[e]){const d=l.apply(t,r);return s?ko(d):d}let c=n;a!==t&&(s?c=function(d,f){return n.call(this,Zo(t,d),f,t)}:n.length>2&&(c=function(d,f){return n.call(this,d,f,t)}));const u=l.call(a,c,i);return s&&o?o(u):u}function I$(t,e,n,i){const o=Xg(t),r=o!==t&&!ji(t);let a=n,s=!1;o!==t&&(r?(s=i.length===0,a=function(c,u,d){return s&&(s=!1,c=Zo(t,c)),n.call(this,c,Zo(t,u),d,t)}):n.length>3&&(a=function(c,u,d){return n.call(this,c,u,d,t)}));const l=o[e](a,...i);return s?Zo(t,l):l}function Hv(t,e,n){const i=dt(t);qn(i,"iterate",Qu);const o=i[e](...n);return(o===-1||o===!1)&&Yg(n[0])?(n[0]=dt(n[0]),i[e](...n)):o}function Vc(t,e,n=[]){Fr(),xw();const i=dt(t)[e].apply(t,n);return ww(),Nr(),i}const cB=mw("__proto__,__v_isRef,__isVue"),wI=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Yi));function uB(t){Yi(t)||(t=String(t));const e=dt(this);return qn(e,"has",t),e.hasOwnProperty(t)}class SI{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,i){if(n==="__v_skip")return e.__v_skip;const o=this._isReadonly,r=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return r;if(n==="__v_raw")return i===(o?r?xB:_I:r?AI:$I).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const a=bt(e);if(!o){let l;if(a&&(l=sB[n]))return l;if(n==="hasOwnProperty")return uB}const s=Reflect.get(e,n,en(e)?e:i);if((Yi(n)?wI.has(n):cB(n))||(o||qn(e,"get",n),r))return s;if(en(s)){const l=a&&zg(n)?s:s.value;return o&&Bt(l)?j0(l):l}return Bt(s)?o?j0(s):$t(s):s}}class CI extends SI{constructor(e=!1){super(!1,e)}set(e,n,i,o){let r=e[n];const a=bt(e)&&zg(n);if(!this._isShallow){const c=Br(r);if(!ji(i)&&!Br(i)&&(r=dt(r),i=dt(i)),!a&&en(r)&&!en(i))return c||(r.value=i),!0}const s=a?Number(n)t,yf=t=>Reflect.getPrototypeOf(t);function gB(t,e,n){return function(...i){const o=this.__v_raw,r=dt(o),a=wa(r),s=t==="entries"||t===Symbol.iterator&&a,l=t==="keys"&&a,c=o[t](...i),u=n?W0:e?oc:ko;return!e&&qn(r,"iterate",l?H0:bs),mn(Object.create(c),{next(){const{value:d,done:f}=c.next();return f?{value:d,done:f}:{value:s?[u(d[0]),u(d[1])]:u(d),done:f}}})}}function xf(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function mB(t,e){const n={get(o){const r=this.__v_raw,a=dt(r),s=dt(o);t||(er(o,s)&&qn(a,"get",o),qn(a,"get",s));const{has:l}=yf(a),c=e?W0:t?oc:ko;if(l.call(a,o))return c(r.get(o));if(l.call(a,s))return c(r.get(s));r!==a&&r.get(o)},get size(){const o=this.__v_raw;return!t&&qn(dt(o),"iterate",bs),o.size},has(o){const r=this.__v_raw,a=dt(r),s=dt(o);return t||(er(o,s)&&qn(a,"has",o),qn(a,"has",s)),o===s?r.has(o):r.has(o)||r.has(s)},forEach(o,r){const a=this,s=a.__v_raw,l=dt(s),c=e?W0:t?oc:ko;return!t&&qn(l,"iterate",bs),s.forEach((u,d)=>o.call(r,c(u),c(d),a))}};return mn(n,t?{add:xf("add"),set:xf("set"),delete:xf("delete"),clear:xf("clear")}:{add(o){const r=dt(this),a=yf(r),s=dt(o),l=!e&&!ji(o)&&!Br(o)?s:o;return a.has.call(r,l)||er(o,l)&&a.has.call(r,o)||er(s,l)&&a.has.call(r,s)||(r.add(l),Cr(r,"add",l,l)),this},set(o,r){!e&&!ji(r)&&!Br(r)&&(r=dt(r));const a=dt(this),{has:s,get:l}=yf(a);let c=s.call(a,o);c||(o=dt(o),c=s.call(a,o));const u=l.call(a,o);return a.set(o,r),c?er(r,u)&&Cr(a,"set",o,r):Cr(a,"add",o,r),this},delete(o){const r=dt(this),{has:a,get:s}=yf(r);let l=a.call(r,o);l||(o=dt(o),l=a.call(r,o)),s&&s.call(r,o);const c=r.delete(o);return l&&Cr(r,"delete",o,void 0),c},clear(){const o=dt(this),r=o.size!==0,a=o.clear();return r&&Cr(o,"clear",void 0,void 0),a}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=gB(o,t,e)}),n}function $w(t,e){const n=mB(t,e);return(i,o,r)=>o==="__v_isReactive"?!t:o==="__v_isReadonly"?t:o==="__v_raw"?i:Reflect.get(Ht(n,o)&&o in i?n:i,o,r)}const vB={get:$w(!1,!1)},bB={get:$w(!1,!0)},yB={get:$w(!0,!1)};const $I=new WeakMap,AI=new WeakMap,_I=new WeakMap,xB=new WeakMap;function wB(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function $t(t){return Br(t)?t:Aw(t,!1,fB,vB,$I)}function PI(t){return Aw(t,!1,pB,bB,AI)}function j0(t){return Aw(t,!0,hB,yB,_I)}function Aw(t,e,n,i,o){if(!Bt(t)||t.__v_raw&&!(e&&t.__v_isReactive)||t.__v_skip||!Object.isExtensible(t))return t;const r=o.get(t);if(r)return r;const a=wB(X8(t));if(a===0)return t;const s=new Proxy(t,a===2?i:n);return o.set(t,s),s}function kr(t){return Br(t)?kr(t.__v_raw):!!(t&&t.__v_isReactive)}function Br(t){return!!(t&&t.__v_isReadonly)}function ji(t){return!!(t&&t.__v_isShallow)}function Yg(t){return t?!!t.__v_raw:!1}function dt(t){const e=t&&t.__v_raw;return e?dt(e):t}function _w(t){return!Ht(t,"__v_skip")&&Object.isExtensible(t)&&aI(t,"__v_skip",!0),t}const ko=t=>Bt(t)?$t(t):t,oc=t=>Bt(t)?j0(t):t;function en(t){return t?t.__v_isRef===!0:!1}function se(t){return TI(t,!1)}function ie(t){return TI(t,!0)}function TI(t,e){return en(t)?t:new SB(t,e)}class SB{constructor(e,n){this.dep=new Cw,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:dt(e),this._value=n?e:ko(e),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(e){const n=this._rawValue,i=this.__v_isShallow||ji(e)||Br(e);e=i?e:dt(e),er(e,n)&&(this._rawValue=e,this._value=i?e:ko(e),this.dep.trigger())}}function OI(t){t.dep&&t.dep.trigger()}function Yt(t){return en(t)?t.value:t}const CB={get:(t,e,n)=>e==="__v_raw"?t:Yt(Reflect.get(t,e,n)),set:(t,e,n,i)=>{const o=t[e];return en(o)&&!en(n)?(o.value=n,!0):Reflect.set(t,e,n,i)}};function EI(t){return kr(t)?t:new Proxy(t,CB)}function uo(t){const e=bt(t)?new Array(t.length):{};for(const n in t)e[n]=MI(t,n);return e}class $B{constructor(e,n,i){this._object=e,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0,this._key=Yi(n)?n:String(n),this._raw=dt(e);let o=!0,r=e;if(!bt(e)||Yi(this._key)||!zg(this._key))do o=!Yg(r)||ji(r);while(o&&(r=r.__v_raw));this._shallow=o}get value(){let e=this._object[this._key];return this._shallow&&(e=Yt(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&en(this._raw[this._key])){const n=this._object[this._key];if(en(n)){n.value=e;return}}this._object[this._key]=e}get dep(){return aB(this._raw,this._key)}}class AB{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Ue(t,e,n){return en(t)?t:St(t)?new AB(t):Bt(t)&&arguments.length>1?MI(t,e,n):se(t)}function MI(t,e,n){return new $B(t,e,n)}class _B{constructor(e,n,i){this.fn=e,this.setter=n,this._value=void 0,this.dep=new Cw(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ju-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&Zt!==this)return gI(this,!0),!0}get value(){const e=this.dep.track();return bI(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function PB(t,e,n=!1){let i,o;return St(t)?i=t:(i=t.get,o=t.set),new _B(i,o,n)}const wf={},fp=new WeakMap;let es;function TB(t,e=!1,n=es){if(n){let i=fp.get(n);i||fp.set(n,i=[]),i.push(t)}}function OB(t,e,n=Xt){const{immediate:i,deep:o,once:r,scheduler:a,augmentJob:s,call:l}=n,c=w=>o?w:ji(w)||o===!1||o===0?$r(w,1):$r(w);let u,d,f,h,p=!1,g=!1;if(en(t)?(d=()=>t.value,p=ji(t)):kr(t)?(d=()=>c(t),p=!0):bt(t)?(g=!0,p=t.some(w=>kr(w)||ji(w)),d=()=>t.map(w=>{if(en(w))return w.value;if(kr(w))return c(w);if(St(w))return l?l(w,2):w()})):St(t)?e?d=l?()=>l(t,2):t:d=()=>{if(f){Fr();try{f()}finally{Nr()}}const w=es;es=u;try{return l?l(t,3,[h]):t(h)}finally{es=w}}:d=nr,e&&o){const w=d,x=o===!0?1/0:o;d=()=>$r(w(),x)}const m=yw(),v=()=>{u.stop(),m&&m.active&&vw(m.effects,u)};if(r&&e){const w=e;e=(...x)=>{const $=w(...x);return v(),$}}let b=g?new Array(t.length).fill(wf):wf;const y=w=>{if(!(!(u.flags&1)||!u.dirty&&!w))if(e){const x=u.run();if(w||o||p||(g?x.some(($,S)=>er($,b[S])):er(x,b))){f&&f();const $=es;es=u;try{const S=[x,b===wf?void 0:g&&b[0]===wf?[]:b,h];b=x,l?l(e,3,S):e(...S)}finally{es=$}}}else u.run()};return s&&s(y),u=new hI(d),u.scheduler=a?()=>a(y,!1):y,h=w=>TB(w,!1,u),f=u.onStop=()=>{const w=fp.get(u);if(w){if(l)l(w,4);else for(const x of w)x();fp.delete(u)}},e?i?y(!0):b=u.run():a?a(y.bind(null,!0),!0):u.run(),v.pause=u.pause.bind(u),v.resume=u.resume.bind(u),v.stop=v,v}function $r(t,e=1/0,n){if(e<=0||!Bt(t)||t.__v_skip||(n=n||new Map,(n.get(t)||0)>=e))return t;if(n.set(t,e),e--,en(t))$r(t.value,e,n);else if(bt(t))for(let i=0;i{$r(i,e,n)});else if(rI(t)){for(const i in t)$r(t[i],e,n);for(const i of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,i)&&$r(t[i],e,n)}return t}/** +**/let _n;class uI{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&_n&&(_n.active?(this.parent=_n,this.index=(_n.scopes||(_n.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,n;if(this.scopes){const i=this.scopes.slice();for(e=0,n=i.length;e0&&--this._on===0){if(_n===this)_n=this.prevScope;else{let e=_n;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let n,i;for(n=0,i=this.effects.length;n0)return;if(Au){let e=Au;for(Au=void 0;e;){const n=e.next;e.next=void 0,e.flags&=-9,e=n}}let t;for(;$u;){let e=$u;for($u=void 0;e;){const n=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){t||(t=i)}e=n}}if(t)throw t}function mI(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function vI(t){let e,n=t.depsTail,i=n;for(;i;){const o=i.prevDep;i.version===-1?(i===n&&(n=o),Sw(i),oB(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=o}t.deps=e,t.depsTail=n}function z0(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(bI(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function bI(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===Qu)||(t.globalVersion=Qu,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!z0(t))))return;t.flags|=2;const e=t.dep,n=Zt,i=Eo;Zt=t,Eo=!0;try{mI(t);const o=t.fn(t._value);(e.version===0||er(o,t._value))&&(t.flags|=128,t._value=o,e.version++)}catch(o){throw e.version++,o}finally{Zt=n,Eo=i,vI(t),t.flags&=-3}}function Sw(t,e=!1){const{dep:n,prevSub:i,nextSub:o}=t;if(i&&(i.nextSub=o,t.prevSub=void 0),o&&(o.prevSub=i,t.nextSub=void 0),n.subs===t&&(n.subs=i,!i&&n.computed)){n.computed.flags&=-5;for(let r=n.computed.deps;r;r=r.nextDep)Sw(r,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function oB(t){const{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}let Eo=!0;const yI=[];function Fr(){yI.push(Eo),Eo=!1}function Nr(){const t=yI.pop();Eo=t===void 0?!0:t}function M$(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const n=Zt;Zt=void 0;try{e()}finally{Zt=n}}}let Qu=0,rB=class{constructor(e,n){this.sub=e,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}};class Cw{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!Zt||!Eo||Zt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Zt)n=this.activeLink=new rB(Zt,this),Zt.deps?(n.prevDep=Zt.depsTail,Zt.depsTail.nextDep=n,Zt.depsTail=n):Zt.deps=Zt.depsTail=n,xI(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const i=n.nextDep;i.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=i),n.prevDep=Zt.depsTail,n.nextDep=void 0,Zt.depsTail.nextDep=n,Zt.depsTail=n,Zt.deps===n&&(Zt.deps=i)}return n}trigger(e){this.version++,Qu++,this.notify(e)}notify(e){xw();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{ww()}}}function xI(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let i=e.deps;i;i=i.nextDep)xI(i)}const n=t.dep.subs;n!==t&&(t.prevSub=n,n&&(n.nextSub=t)),t.dep.subs=t}}const fp=new WeakMap,bs=Symbol(""),H0=Symbol(""),ed=Symbol("");function qn(t,e,n){if(Eo&&Zt){let i=fp.get(t);i||fp.set(t,i=new Map);let o=i.get(n);o||(i.set(n,o=new Cw),o.map=i,o.key=n),o.track()}}function Cr(t,e,n,i,o,r){const a=fp.get(t);if(!a){Qu++;return}const s=l=>{l&&l.trigger()};if(xw(),e==="clear")a.forEach(s);else{const l=bt(t),c=l&&Hg(n);if(l&&n==="length"){const u=Number(i);a.forEach((d,f)=>{(f==="length"||f===ed||!Yi(f)&&f>=u)&&s(d)})}else switch((n!==void 0||a.has(void 0))&&s(a.get(n)),c&&s(a.get(ed)),e){case"add":l?c&&s(a.get("length")):(s(a.get(bs)),wa(t)&&s(a.get(H0)));break;case"delete":l||(s(a.get(bs)),wa(t)&&s(a.get(H0)));break;case"set":wa(t)&&s(a.get(bs));break}}ww()}function aB(t,e){const n=fp.get(t);return n&&n.get(e)}function cl(t){const e=dt(t);return e===t?e:(qn(e,"iterate",ed),ji(t)?e:e.map(ko))}function Yg(t){return qn(t=dt(t),"iterate",ed),t}function Zo(t,e){return Br(t)?oc(kr(t)?ko(e):e):ko(e)}const sB={__proto__:null,[Symbol.iterator](){return zv(this,Symbol.iterator,t=>Zo(this,t))},concat(...t){return cl(this).concat(...t.map(e=>bt(e)?cl(e):e))},entries(){return zv(this,"entries",t=>(t[1]=Zo(this,t[1]),t))},every(t,e){return fr(this,"every",t,e,void 0,arguments)},filter(t,e){return fr(this,"filter",t,e,n=>n.map(i=>Zo(this,i)),arguments)},find(t,e){return fr(this,"find",t,e,n=>Zo(this,n),arguments)},findIndex(t,e){return fr(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return fr(this,"findLast",t,e,n=>Zo(this,n),arguments)},findLastIndex(t,e){return fr(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return fr(this,"forEach",t,e,void 0,arguments)},includes(...t){return Hv(this,"includes",t)},indexOf(...t){return Hv(this,"indexOf",t)},join(t){return cl(this).join(t)},lastIndexOf(...t){return Hv(this,"lastIndexOf",t)},map(t,e){return fr(this,"map",t,e,void 0,arguments)},pop(){return Xc(this,"pop")},push(...t){return Xc(this,"push",t)},reduce(t,...e){return I$(this,"reduce",t,e)},reduceRight(t,...e){return I$(this,"reduceRight",t,e)},shift(){return Xc(this,"shift")},some(t,e){return fr(this,"some",t,e,void 0,arguments)},splice(...t){return Xc(this,"splice",t)},toReversed(){return cl(this).toReversed()},toSorted(t){return cl(this).toSorted(t)},toSpliced(...t){return cl(this).toSpliced(...t)},unshift(...t){return Xc(this,"unshift",t)},values(){return zv(this,"values",t=>Zo(this,t))}};function zv(t,e,n){const i=Yg(t),o=i[e]();return i!==t&&!ji(t)&&(o._next=o.next,o.next=()=>{const r=o._next();return r.done||(r.value=n(r.value)),r}),o}const lB=Array.prototype;function fr(t,e,n,i,o,r){const a=Yg(t),s=a!==t&&!ji(t),l=a[e];if(l!==lB[e]){const d=l.apply(t,r);return s?ko(d):d}let c=n;a!==t&&(s?c=function(d,f){return n.call(this,Zo(t,d),f,t)}:n.length>2&&(c=function(d,f){return n.call(this,d,f,t)}));const u=l.call(a,c,i);return s&&o?o(u):u}function I$(t,e,n,i){const o=Yg(t),r=o!==t&&!ji(t);let a=n,s=!1;o!==t&&(r?(s=i.length===0,a=function(c,u,d){return s&&(s=!1,c=Zo(t,c)),n.call(this,c,Zo(t,u),d,t)}):n.length>3&&(a=function(c,u,d){return n.call(this,c,u,d,t)}));const l=o[e](a,...i);return s?Zo(t,l):l}function Hv(t,e,n){const i=dt(t);qn(i,"iterate",ed);const o=i[e](...n);return(o===-1||o===!1)&&Gg(n[0])?(n[0]=dt(n[0]),i[e](...n)):o}function Xc(t,e,n=[]){Fr(),xw();const i=dt(t)[e].apply(t,n);return ww(),Nr(),i}const cB=mw("__proto__,__v_isRef,__isVue"),wI=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Yi));function uB(t){Yi(t)||(t=String(t));const e=dt(this);return qn(e,"has",t),e.hasOwnProperty(t)}class SI{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,i){if(n==="__v_skip")return e.__v_skip;const o=this._isReadonly,r=this._isShallow;if(n==="__v_isReactive")return!o;if(n==="__v_isReadonly")return o;if(n==="__v_isShallow")return r;if(n==="__v_raw")return i===(o?r?xB:_I:r?AI:$I).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const a=bt(e);if(!o){let l;if(a&&(l=sB[n]))return l;if(n==="hasOwnProperty")return uB}const s=Reflect.get(e,n,en(e)?e:i);if((Yi(n)?wI.has(n):cB(n))||(o||qn(e,"get",n),r))return s;if(en(s)){const l=a&&Hg(n)?s:s.value;return o&&Bt(l)?j0(l):l}return Bt(s)?o?j0(s):$t(s):s}}class CI extends SI{constructor(e=!1){super(!1,e)}set(e,n,i,o){let r=e[n];const a=bt(e)&&Hg(n);if(!this._isShallow){const c=Br(r);if(!ji(i)&&!Br(i)&&(r=dt(r),i=dt(i)),!a&&en(r)&&!en(i))return c||(r.value=i),!0}const s=a?Number(n)t,xf=t=>Reflect.getPrototypeOf(t);function gB(t,e,n){return function(...i){const o=this.__v_raw,r=dt(o),a=wa(r),s=t==="entries"||t===Symbol.iterator&&a,l=t==="keys"&&a,c=o[t](...i),u=n?W0:e?oc:ko;return!e&&qn(r,"iterate",l?H0:bs),mn(Object.create(c),{next(){const{value:d,done:f}=c.next();return f?{value:d,done:f}:{value:s?[u(d[0]),u(d[1])]:u(d),done:f}}})}}function wf(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function mB(t,e){const n={get(o){const r=this.__v_raw,a=dt(r),s=dt(o);t||(er(o,s)&&qn(a,"get",o),qn(a,"get",s));const{has:l}=xf(a),c=e?W0:t?oc:ko;if(l.call(a,o))return c(r.get(o));if(l.call(a,s))return c(r.get(s));r!==a&&r.get(o)},get size(){const o=this.__v_raw;return!t&&qn(dt(o),"iterate",bs),o.size},has(o){const r=this.__v_raw,a=dt(r),s=dt(o);return t||(er(o,s)&&qn(a,"has",o),qn(a,"has",s)),o===s?r.has(o):r.has(o)||r.has(s)},forEach(o,r){const a=this,s=a.__v_raw,l=dt(s),c=e?W0:t?oc:ko;return!t&&qn(l,"iterate",bs),s.forEach((u,d)=>o.call(r,c(u),c(d),a))}};return mn(n,t?{add:wf("add"),set:wf("set"),delete:wf("delete"),clear:wf("clear")}:{add(o){const r=dt(this),a=xf(r),s=dt(o),l=!e&&!ji(o)&&!Br(o)?s:o;return a.has.call(r,l)||er(o,l)&&a.has.call(r,o)||er(s,l)&&a.has.call(r,s)||(r.add(l),Cr(r,"add",l,l)),this},set(o,r){!e&&!ji(r)&&!Br(r)&&(r=dt(r));const a=dt(this),{has:s,get:l}=xf(a);let c=s.call(a,o);c||(o=dt(o),c=s.call(a,o));const u=l.call(a,o);return a.set(o,r),c?er(r,u)&&Cr(a,"set",o,r):Cr(a,"add",o,r),this},delete(o){const r=dt(this),{has:a,get:s}=xf(r);let l=a.call(r,o);l||(o=dt(o),l=a.call(r,o)),s&&s.call(r,o);const c=r.delete(o);return l&&Cr(r,"delete",o,void 0),c},clear(){const o=dt(this),r=o.size!==0,a=o.clear();return r&&Cr(o,"clear",void 0,void 0),a}}),["keys","values","entries",Symbol.iterator].forEach(o=>{n[o]=gB(o,t,e)}),n}function $w(t,e){const n=mB(t,e);return(i,o,r)=>o==="__v_isReactive"?!t:o==="__v_isReadonly"?t:o==="__v_raw"?i:Reflect.get(Ht(n,o)&&o in i?n:i,o,r)}const vB={get:$w(!1,!1)},bB={get:$w(!1,!0)},yB={get:$w(!0,!1)};const $I=new WeakMap,AI=new WeakMap,_I=new WeakMap,xB=new WeakMap;function wB(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function $t(t){return Br(t)?t:Aw(t,!1,fB,vB,$I)}function PI(t){return Aw(t,!1,pB,bB,AI)}function j0(t){return Aw(t,!0,hB,yB,_I)}function Aw(t,e,n,i,o){if(!Bt(t)||t.__v_raw&&!(e&&t.__v_isReactive)||t.__v_skip||!Object.isExtensible(t))return t;const r=o.get(t);if(r)return r;const a=wB(X8(t));if(a===0)return t;const s=new Proxy(t,a===2?i:n);return o.set(t,s),s}function kr(t){return Br(t)?kr(t.__v_raw):!!(t&&t.__v_isReactive)}function Br(t){return!!(t&&t.__v_isReadonly)}function ji(t){return!!(t&&t.__v_isShallow)}function Gg(t){return t?!!t.__v_raw:!1}function dt(t){const e=t&&t.__v_raw;return e?dt(e):t}function _w(t){return!Ht(t,"__v_skip")&&Object.isExtensible(t)&&aI(t,"__v_skip",!0),t}const ko=t=>Bt(t)?$t(t):t,oc=t=>Bt(t)?j0(t):t;function en(t){return t?t.__v_isRef===!0:!1}function se(t){return TI(t,!1)}function ie(t){return TI(t,!0)}function TI(t,e){return en(t)?t:new SB(t,e)}class SB{constructor(e,n){this.dep=new Cw,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:dt(e),this._value=n?e:ko(e),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(e){const n=this._rawValue,i=this.__v_isShallow||ji(e)||Br(e);e=i?e:dt(e),er(e,n)&&(this._rawValue=e,this._value=i?e:ko(e),this.dep.trigger())}}function OI(t){t.dep&&t.dep.trigger()}function Yt(t){return en(t)?t.value:t}const CB={get:(t,e,n)=>e==="__v_raw"?t:Yt(Reflect.get(t,e,n)),set:(t,e,n,i)=>{const o=t[e];return en(o)&&!en(n)?(o.value=n,!0):Reflect.set(t,e,n,i)}};function EI(t){return kr(t)?t:new Proxy(t,CB)}function uo(t){const e=bt(t)?new Array(t.length):{};for(const n in t)e[n]=MI(t,n);return e}class $B{constructor(e,n,i){this._object=e,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0,this._key=Yi(n)?n:String(n),this._raw=dt(e);let o=!0,r=e;if(!bt(e)||Yi(this._key)||!Hg(this._key))do o=!Gg(r)||ji(r);while(o&&(r=r.__v_raw));this._shallow=o}get value(){let e=this._object[this._key];return this._shallow&&(e=Yt(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&en(this._raw[this._key])){const n=this._object[this._key];if(en(n)){n.value=e;return}}this._object[this._key]=e}get dep(){return aB(this._raw,this._key)}}class AB{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Ue(t,e,n){return en(t)?t:St(t)?new AB(t):Bt(t)&&arguments.length>1?MI(t,e,n):se(t)}function MI(t,e,n){return new $B(t,e,n)}class _B{constructor(e,n,i){this.fn=e,this.setter=n,this._value=void 0,this.dep=new Cw(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Qu-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&Zt!==this)return gI(this,!0),!0}get value(){const e=this.dep.track();return bI(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function PB(t,e,n=!1){let i,o;return St(t)?i=t:(i=t.get,o=t.set),new _B(i,o,n)}const Sf={},hp=new WeakMap;let es;function TB(t,e=!1,n=es){if(n){let i=hp.get(n);i||hp.set(n,i=[]),i.push(t)}}function OB(t,e,n=Xt){const{immediate:i,deep:o,once:r,scheduler:a,augmentJob:s,call:l}=n,c=w=>o?w:ji(w)||o===!1||o===0?$r(w,1):$r(w);let u,d,f,h,p=!1,g=!1;if(en(t)?(d=()=>t.value,p=ji(t)):kr(t)?(d=()=>c(t),p=!0):bt(t)?(g=!0,p=t.some(w=>kr(w)||ji(w)),d=()=>t.map(w=>{if(en(w))return w.value;if(kr(w))return c(w);if(St(w))return l?l(w,2):w()})):St(t)?e?d=l?()=>l(t,2):t:d=()=>{if(f){Fr();try{f()}finally{Nr()}}const w=es;es=u;try{return l?l(t,3,[h]):t(h)}finally{es=w}}:d=nr,e&&o){const w=d,x=o===!0?1/0:o;d=()=>$r(w(),x)}const m=yw(),v=()=>{u.stop(),m&&m.active&&vw(m.effects,u)};if(r&&e){const w=e;e=(...x)=>{const $=w(...x);return v(),$}}let b=g?new Array(t.length).fill(Sf):Sf;const y=w=>{if(!(!(u.flags&1)||!u.dirty&&!w))if(e){const x=u.run();if(w||o||p||(g?x.some(($,S)=>er($,b[S])):er(x,b))){f&&f();const $=es;es=u;try{const S=[x,b===Sf?void 0:g&&b[0]===Sf?[]:b,h];b=x,l?l(e,3,S):e(...S)}finally{es=$}}}else u.run()};return s&&s(y),u=new hI(d),u.scheduler=a?()=>a(y,!1):y,h=w=>TB(w,!1,u),f=u.onStop=()=>{const w=hp.get(u);if(w){if(l)l(w,4);else for(const x of w)x();hp.delete(u)}},e?i?y(!0):b=u.run():a?a(y.bind(null,!0),!0):u.run(),v.pause=u.pause.bind(u),v.resume=u.resume.bind(u),v.stop=v,v}function $r(t,e=1/0,n){if(e<=0||!Bt(t)||t.__v_skip||(n=n||new Map,(n.get(t)||0)>=e))return t;if(n.set(t,e),e--,en(t))$r(t.value,e,n);else if(bt(t))for(let i=0;i{$r(i,e,n)});else if(rI(t)){for(const i in t)$r(t[i],e,n);for(const i of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,i)&&$r(t[i],e,n)}return t}/** * @vue/runtime-core v3.5.42 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function zd(t,e,n,i){try{return i?t(...i):t()}catch(o){Gg(o,e,n)}}function go(t,e,n,i){if(St(t)){const o=zd(t,e,n,i);return o&&iI(o)&&o.catch(r=>{Gg(r,e,n)}),o}if(bt(t)){const o=[];for(let r=0;r>>1,o=fi[i],r=ed(o);r=ed(n)?fi.push(t):fi.splice(MB(e),0,t),t.flags|=1,kI()}}function kI(){hp||(hp=II.then(RI))}function IB(t){if(!bt(t))ua&&t.id===-1?ua.splice(Cl+1,0,t):t.flags&1||(Hl.push(t),t.flags|=1);else for(let e=0;eed(n)-ed(i));if(Hl.length=0,ua){for(let n=0;nt.id==null?t.flags&2?-1:1/0:t.id;function RI(t){try{for(Ko=0;Ko{i._d&&bp(-1);const r=pp(e),a=Dr.length;let s;try{s=t(...o)}finally{for(let l=Dr.length;l>a;l--)Lw();pp(r),i._d&&bp(1)}return s};return i._n=!0,i._c=!0,i._d=!0,i}function ni(t,e){if(Bn===null)return t;const n=em(Bn),i=t.dirs||(t.dirs=[]);for(let o=0;o1)return n&&St(e)?e.call(i&&i.proxy):e}}function kB(){return!!(Cn()||ys)}const DB=Symbol.for("v-scx"),RB=()=>qe(DB);function Ke(t,e){return Tw(t,null,e)}function ye(t,e,n){return Tw(t,e,n)}function Tw(t,e,n=Xt){const{immediate:i,deep:o,flush:r,once:a}=n,s=mn({},n),l=e&&i||!e&&r!=="post";let c;if(rd){if(r==="sync"){const h=RB();c=h.__watcherHandles||(h.__watcherHandles=[])}else if(!l){const h=()=>{};return h.stop=nr,h.resume=nr,h.pause=nr,h}}const u=Jn;s.call=(h,p,g)=>go(h,u,p,g);let d=!1;r==="post"?s.scheduler=h=>{ci(h,u&&u.suspense)}:r!=="sync"&&(d=!0,s.scheduler=(h,p)=>{p?h():Pw(h)}),s.augmentJob=h=>{e&&(h.flags|=4),d&&(h.flags|=2,u&&(h.id=u.uid,h.i=u))};const f=OB(t,e,s);return rd&&(c?c.push(f):l&&f()),f}function LB(t,e,n){const i=this.proxy,o=Qt(t)?t.includes(".")?NI(i,t):()=>i[t]:t.bind(i,i);let r;St(e)?r=e:(r=e.handler,n=e);const a=Wd(this),s=Tw(o,r.bind(i),n);return a(),s}function NI(t,e){const n=e.split(".");return()=>{let i=t;for(let o=0;ot.__isTeleport,rs=t=>t&&(t.disabled||t.disabled===""),FB=t=>t&&(t.defer||t.defer===""),D$=t=>typeof SVGElement<"u"&&t instanceof SVGElement,R$=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,V0=(t,e)=>{const n=t&&t.to;return Qt(n)?e?e(n):null:n},NB={name:"Teleport",__isTeleport:!0,process(t,e,n,i,o,r,a,s,l,c){const{mc:u,pc:d,pbc:f,o:{insert:h,querySelector:p,createText:g,createComment:m,parentNode:v}}=c,b=rs(e.props);let{dynamicChildren:y}=e;const w=(S,_,P)=>{S.shapeFlag&16&&u(S.children,_,P,o,r,a,s,l)},x=(S=e)=>{const _=rs(S.props),P=S.target=V0(S.props,p),O=X0(P,S,g,h);P&&(a!=="svg"&&D$(P)?a="svg":a!=="mathml"&&R$(P)&&(a="mathml"),o&&o.isCE&&(o.ce._teleportTargets||(o.ce._teleportTargets=new Set)).add(P),_||(w(S,P,O),uu(S,!1)))},$=S=>{const _=()=>{if(oa.get(S)===_){if(oa.delete(S),rs(S.props)){const P=v(S.el)||n;w(S,P,S.anchor),uu(S,!0)}x(S)}};oa.set(S,_),ci(_,r)};if(t==null){const S=e.el=g(""),_=e.anchor=g("");if(h(S,n,i),h(_,n,i),FB(e.props)||r&&r.pendingBranch){$(e);return}b&&(w(e,n,_),uu(e,!0)),x()}else{e.el=t.el;const S=e.anchor=t.anchor,_=oa.get(t);if(_){_.flags|=8,oa.delete(t),$(e);return}e.targetStart=t.targetStart;const P=e.target=t.target,O=e.targetAnchor=t.targetAnchor,T=rs(t.props),M=T?n:P,I=T?S:O;if(a==="svg"||D$(P)?a="svg":(a==="mathml"||R$(P))&&(a="mathml"),y?(f(t.dynamicChildren,y,M,o,r,a,s),Rw(t,e,!0)):l||d(t,e,M,I,o,r,a,s,!1),b)T?e.props&&t.props&&e.props.to!==t.props.to&&(e.props.to=t.props.to):Sf(e,n,S,c,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const k=V0(e.props,p);k&&(e.target=k,Sf(e,k,null,c,0))}else T&&Sf(e,P,O,c,1);uu(e,b)}},remove(t,e,n,{um:i,o:{remove:o}},r){const{shapeFlag:a,children:s,anchor:l,targetStart:c,targetAnchor:u,target:d,props:f}=t,h=rs(f),p=r||!h,g=oa.get(t);if(g&&(g.flags|=8,oa.delete(t)),d&&(o(c),o(u)),r&&o(l),!g&&(h||d)&&a&16)for(let m=0;m{t.isMounted=!0}),at(()=>{t.isUnmounting=!0}),t}const eo=[Function,Array],HI={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:eo,onEnter:eo,onAfterEnter:eo,onEnterCancelled:eo,onBeforeLeave:eo,onLeave:eo,onAfterLeave:eo,onLeaveCancelled:eo,onBeforeAppear:eo,onAppear:eo,onAfterAppear:eo,onAppearCancelled:eo},WI=t=>{const e=t.subTree;return e.component?WI(e.component):e},zB={name:"BaseTransition",props:HI,setup(t,{slots:e}){const n=Cn(),i=zI();return()=>{const o=e.default&&Ew(e.default(),!0),r=o&&o.length?jI(o):n.subTree?Az():void 0;if(!r)return;const a=dt(t),{mode:s}=a;if(i.isLeaving)return Wv(r);const l=gp(r);if(!l)return Wv(r);let c=td(l,a,i,n,d=>c=d);l.type!==Dn&&Es(l,c);let u=n.subTree&&gp(n.subTree);if(u&&u.type!==Dn&&!as(u,l)&&WI(n).type!==Dn){let d=td(u,a,i,n);if(Es(u,d),s==="out-in"&&l.type!==Dn)return i.isLeaving=!0,d.afterLeave=()=>{i.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,u=void 0},Wv(r);s==="in-out"&&l.type!==Dn?d.delayLeave=(f,h,p)=>{const g=VI(i,u);g[String(u.key)]=u,f[ro]=()=>{h(),f[ro]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{p(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return r}}};function jI(t){let e=t[0];if(t.length>1){for(const n of t)if(n.type!==Dn){e=n;break}}return e}const HB=zB;function VI(t,e){const{leavingVNodes:n}=t;let i=n.get(e.type);return i||(i=Object.create(null),n.set(e.type,i)),i}function td(t,e,n,i,o){const{appear:r,mode:a,persisted:s=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:f,onLeave:h,onAfterLeave:p,onLeaveCancelled:g,onBeforeAppear:m,onAppear:v,onAfterAppear:b,onAppearCancelled:y}=e,w=String(t.key),x=VI(n,t),$=(P,O)=>{P&&go(P,i,9,O)},S=(P,O)=>{const T=O[1];$(P,O),bt(P)?P.every(M=>M.length<=1)&&T():P.length<=1&&T()},_={mode:a,persisted:s,beforeEnter(P){let O=l;if(!n.isMounted)if(r)O=m||l;else return;P[ro]&&P[ro](!0);const T=x[w];T&&as(t,T)&&T.el[ro]&&T.el[ro](),$(O,[P])},enter(P){if(x[w]===t)return;let O=c,T=u,M=d;if(!n.isMounted)if(r)O=v||c,T=b||u,M=y||d;else return;let I=!1;P[Xc]=E=>{I||(I=!0,E?$(M,[P]):$(T,[P]),_.delayedLeave&&_.delayedLeave(),P[Xc]=void 0)};const k=P[Xc].bind(null,!1);O?S(O,[P,k]):k()},leave(P,O){const T=String(t.key);if(P[Xc]&&P[Xc](!0),n.isUnmounting)return O();$(f,[P]);let M=!1;P[ro]=k=>{M||(M=!0,O(),k?$(g,[P]):$(p,[P]),P[ro]=void 0,x[T]===t&&delete x[T])};const I=P[ro].bind(null,!1);x[T]=t,h?S(h,[P,I]):I()},clone(P){const O=td(P,e,n,i,o);return o&&o(O),O}};return _}function Wv(t){if(Ug(t))return t=On(t),t.children=null,t}function gp(t){if(!Ug(t))return Kg(t.type)&&t.children?jI(t.children):t;if(t.component)return t.component.subTree;const{shapeFlag:e,children:n}=t;if(n){if(e&16)return n[0];if(e&32&&St(n.default))return n.default()}}function Es(t,e){if(t.shapeFlag&6&&t.component){t.transition=e;const n=t.component.subTree;Es(Kg(n.type)&&gp(n)||n,e)}else t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function Ew(t,e=!1,n){let i=[],o=0;for(let r=0;r1)for(let r=0;rAu(g,e&&(bt(e)?e[m]:e),n,i,o));return}if(Wl(i)&&!o){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&Au(t,e,n,i.component.subTree);return}const r=i.shapeFlag&4?em(i.component):i.el,a=o?null:r,{i:s,r:l}=t,c=e&&e.r,u=s.refs===Xt?s.refs={}:s.refs,d=s.setupState,f=dt(d),h=d===Xt?nI:g=>L$(u,g)?!1:Ht(f,g),p=(g,m)=>!(m&&L$(u,m));if(c!=null&&c!==l){if(F$(e),Qt(c))u[c]=null,h(c)&&(d[c]=null);else if(en(c)){const g=e;p(c,g.k)&&(c.value=null),g.k&&(u[g.k]=null)}}if(St(l))zd(l,s,12,[a,u]);else{const g=Qt(l),m=en(l);if(g||m){const v=()=>{if(t.f){const b=g?h(l)?d[l]:u[l]:p()||!t.k?l.value:u[t.k];if(o)bt(b)&&vw(b,r);else if(bt(b))b.includes(r)||b.push(r);else if(g)u[l]=[r],h(l)&&(d[l]=u[l]);else{const y=[r];p(l,t.k)&&(l.value=y),t.k&&(u[t.k]=y)}}else g?(u[l]=a,h(l)&&(d[l]=a)):m&&(p(l,t.k)&&(l.value=a),t.k&&(u[t.k]=a))};if(a){const b=()=>{v(),mp.delete(t)};b.id=-1,mp.set(t,b),ci(b,n)}else F$(t),v()}}}function F$(t){const e=mp.get(t);e&&(e.flags|=8,mp.delete(t))}jg().requestIdleCallback;jg().cancelIdleCallback;const Wl=t=>!!t.type.__asyncLoader,Ug=t=>t.type.__isKeepAlive;function qg(t,e){GI(t,"a",e)}function YI(t,e){GI(t,"da",e)}function GI(t,e,n=Jn){const i=t.__wdc||(t.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return t()});if(Zg(e,i,n),n){let o=n.parent;for(;o&&o.parent;)Ug(o.parent.vnode)&&WB(i,e,n,o),o=o.parent}}function WB(t,e,n,i){const o=Zg(e,t,i,!0);Xn(()=>{vw(i[e],o)},n)}function Zg(t,e,n=Jn,i=!1){if(n){const o=n[t]||(n[t]=[]),r=e.__weh||(e.__weh=(...a)=>{Fr();const s=Wd(n),l=go(e,n,t,a);return s(),Nr(),l});return i?o.unshift(r):o.push(r),r}}const Vr=t=>(e,n=Jn)=>{(!rd||t==="sp")&&Zg(t,(...i)=>e(...i),n)},Hd=Vr("bm"),Ze=Vr("m"),Jg=Vr("bu"),ri=Vr("u"),at=Vr("bum"),Xn=Vr("um"),KI=Vr("sp"),jB=Vr("rtg"),VB=Vr("rtc");function XB(t,e=Jn){Zg("ec",t,e)}const Mw="components",YB="directives";function N$(t,e){return Iw(Mw,t,!0,e)||t}const UI=Symbol.for("v-ndc");function _2e(t){return Qt(t)?Iw(Mw,t,!1)||t:t||UI}function GB(t){return Iw(YB,t)}function Iw(t,e,n=!0,i=!1){const o=Bn||Jn;if(o){const r=o.type;if(t===Mw){const s=kz(r,!1);if(s&&(s===e||s===mi(e)||s===Wg(mi(e))))return r}const a=B$(o[t]||r[t],e)||B$(o.appContext[t],e);return!a&&i?r:a}}function B$(t,e){return t&&(t[e]||t[mi(e)]||t[Wg(mi(e))])}function P2e(t,e,n,i){let o;const r=n,a=bt(t);if(a||Qt(t)){const s=a&&kr(t);let l=!1,c=!1;s&&(l=!ji(t),c=Br(t),t=Xg(t)),o=new Array(t.length);for(let u=0,d=t.length;ue(s,l,void 0,r));else{const s=Object.keys(t);o=new Array(s.length);for(let l=0,c=s.length;l{const r=i.fn(...o);return r&&(r.key=i.key),r}:i.fn)}return t}function O2e(t,e,n,i,o,r){if(n==null&&(n={}),Bn.ce||Bn.parent&&Wl(Bn.parent)&&Bn.parent.ce){const c=r!=null&&n.key==null?mn({},n,{key:r}):n,u=Object.keys(c).length>0;return e!=="default"&&(c.name=e),nd(),yp(Qe,null,[C("slot",c,i)],u?-2:64)}let a=t[e];a&&a._c&&(a._d=!1);const s=Dr.length;nd();let l;try{const c=a&&qI(a(n)),u=n.key||r||c&&c.key;l=yp(Qe,{key:(u&&!Yi(u)?u:`_${e}`)+(!c&&i?"_fb":"")},c||(i?i():[]),c&&t._===1?64:-2)}catch(c){for(let u=Dr.length;u>s;u--)Lw();throw c}finally{a&&a._c&&(a._d=!0)}return!o&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),l}function qI(t){return t.some(e=>ln(e)?!(e.type===Dn||e.type===Qe&&!qI(e.children)):!0)?t:null}const Y0=t=>t?gk(t)?em(t):Y0(t.parent):null,_u=mn(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>Y0(t.parent),$root:t=>Y0(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>JI(t),$forceUpdate:t=>t.f||(t.f=()=>{Pw(t.update)}),$nextTick:t=>t.n||(t.n=pt.bind(t.proxy)),$watch:t=>LB.bind(t)}),jv=(t,e)=>t!==Xt&&!t.__isScriptSetup&&Ht(t,e),KB={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:n,setupState:i,data:o,props:r,accessCache:a,type:s,appContext:l}=t;if(e[0]!=="$"){const f=a[e];if(f!==void 0)switch(f){case 1:return i[e];case 2:return o[e];case 4:return n[e];case 3:return r[e]}else{if(jv(i,e))return a[e]=1,i[e];if(o!==Xt&&Ht(o,e))return a[e]=2,o[e];if(Ht(r,e))return a[e]=3,r[e];if(n!==Xt&&Ht(n,e))return a[e]=4,n[e];G0&&(a[e]=0)}}const c=_u[e];let u,d;if(c)return e==="$attrs"&&qn(t.attrs,"get",""),c(t);if((u=s.__cssModules)&&(u=u[e]))return u;if(n!==Xt&&Ht(n,e))return a[e]=4,n[e];if(d=l.config.globalProperties,Ht(d,e))return d[e]},set({_:t},e,n){const{data:i,setupState:o,ctx:r}=t;return jv(o,e)?(o[e]=n,!0):i!==Xt&&Ht(i,e)?(i[e]=n,!0):Ht(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(r[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:i,appContext:o,props:r,type:a}},s){let l;return!!(n[s]||t!==Xt&&s[0]!=="$"&&Ht(t,s)||jv(e,s)||Ht(r,s)||Ht(i,s)||Ht(_u,s)||Ht(o.config.globalProperties,s)||(l=a.__cssModules)&&l[s])},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:Ht(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}};function UB(){return qB().attrs}function qB(t){const e=Cn();return e.setupContext||(e.setupContext=vk(e))}function z$(t){return bt(t)?t.reduce((e,n)=>(e[n]=null,e),{}):t}let G0=!0;function ZB(t){const e=JI(t),n=t.proxy,i=t.ctx;G0=!1,e.beforeCreate&&H$(e.beforeCreate,t,"bc");const{data:o,computed:r,methods:a,watch:s,provide:l,inject:c,created:u,beforeMount:d,mounted:f,beforeUpdate:h,updated:p,activated:g,deactivated:m,beforeDestroy:v,beforeUnmount:b,destroyed:y,unmounted:w,render:x,renderTracked:$,renderTriggered:S,errorCaptured:_,serverPrefetch:P,expose:O,inheritAttrs:T,components:M,directives:I,filters:k}=e;if(c&&JB(c,i,null),a)for(const D in a){const F=a[D];St(F)&&(i[D]=F.bind(n))}if(o){const D=o.call(n,n);Bt(D)&&(t.data=$t(D))}if(G0=!0,r)for(const D in r){const F=r[D],N=St(F)?F.bind(n,n):St(F.get)?F.get.bind(n,n):nr,B=!St(F)&&St(F.set)?F.set.bind(n):nr,z=L({get:N,set:B});Object.defineProperty(i,D,{enumerable:!0,configurable:!0,get:()=>z.value,set:W=>z.value=W})}if(s)for(const D in s)ZI(s[D],i,n,D);if(l){const D=St(l)?l.call(n):l;Reflect.ownKeys(D).forEach(F=>{ot(F,D[F])})}u&&H$(u,t,"c");function R(D,F){bt(F)?F.forEach(N=>D(N.bind(n))):F&&D(F.bind(n))}if(R(Hd,d),R(Ze,f),R(Jg,h),R(ri,p),R(qg,g),R(YI,m),R(XB,_),R(VB,$),R(jB,S),R(at,b),R(Xn,w),R(KI,P),bt(O))if(O.length){const D=t.exposed||(t.exposed={});O.forEach(F=>{Object.defineProperty(D,F,{get:()=>n[F],set:N=>n[F]=N,enumerable:!0})})}else t.exposed||(t.exposed={});x&&t.render===nr&&(t.render=x),T!=null&&(t.inheritAttrs=T),M&&(t.components=M),I&&(t.directives=I),P&&XI(t)}function JB(t,e,n=nr){bt(t)&&(t=K0(t));for(const i in t){const o=t[i];let r;Bt(o)?"default"in o?r=qe(o.from||i,o.default,!0):r=qe(o.from||i):r=qe(o),en(r)?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>r.value,set:a=>r.value=a}):e[i]=r}}function H$(t,e,n){go(bt(t)?t.map(i=>i.bind(e.proxy)):t.bind(e.proxy),e,n)}function ZI(t,e,n,i){let o=i.includes(".")?NI(n,i):()=>n[i];if(Qt(t)){const r=e[t];St(r)&&ye(o,r)}else if(St(t))ye(o,t.bind(n));else if(Bt(t))if(bt(t))t.forEach(r=>ZI(r,e,n,i));else{const r=St(t.handler)?t.handler.bind(n):e[t.handler];St(r)&&ye(o,r,t)}}function JI(t){const e=t.type,{mixins:n,extends:i}=e,{mixins:o,optionsCache:r,config:{optionMergeStrategies:a}}=t.appContext,s=r.get(e);let l;return s?l=s:!o.length&&!n&&!i?l=e:(l={},o.length&&o.forEach(c=>vp(l,c,a,!0)),vp(l,e,a)),Bt(e)&&r.set(e,l),l}function vp(t,e,n,i=!1){const{mixins:o,extends:r}=e;r&&vp(t,r,n,!0),o&&o.forEach(a=>vp(t,a,n,!0));for(const a in e)if(!(i&&a==="expose")){const s=QB[a]||n&&n[a];t[a]=s?s(t[a],e[a]):e[a]}return t}const QB={data:W$,props:j$,emits:j$,methods:du,computed:du,beforeCreate:li,created:li,beforeMount:li,mounted:li,beforeUpdate:li,updated:li,beforeDestroy:li,beforeUnmount:li,destroyed:li,unmounted:li,activated:li,deactivated:li,errorCaptured:li,serverPrefetch:li,components:du,directives:du,watch:tz,provide:W$,inject:ez};function W$(t,e){return e?t?function(){return mn(St(t)?t.call(this,this):t,St(e)?e.call(this,this):e)}:e:t}function ez(t,e){return du(K0(t),K0(e))}function K0(t){if(bt(t)){const e={};for(let n=0;ne==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${mi(e)}Modifiers`]||t[`${Ks(e)}Modifiers`];function rz(t,e,...n){if(t.isUnmounted)return;const i=t.vnode.props||Xt;let o=n;const r=e.startsWith("update:"),a=r&&oz(i,e.slice(7));a&&(a.trim&&(o=n.map(u=>Qt(u)?u.trim():u)),a.number&&(o=o.map(K8)));let s,l=i[s=Lv(e)]||i[s=Lv(mi(e))];!l&&r&&(l=i[s=Lv(Ks(e))]),l&&go(l,t,6,o);const c=i[s+"Once"];if(c){if(!t.emitted)t.emitted={};else if(t.emitted[s])return;t.emitted[s]=!0,go(c,t,6,o)}}const az=new WeakMap;function ek(t,e,n=!1){const i=n?az:e.emitsCache,o=i.get(t);if(o!==void 0)return o;const r=t.emits;let a={},s=!1;if(!St(t)){const l=c=>{const u=ek(c,e,!0);u&&(s=!0,mn(a,u))};!n&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!r&&!s?(Bt(t)&&i.set(t,null),null):(bt(r)?r.forEach(l=>a[l]=null):mn(a,r),Bt(t)&&i.set(t,a),a)}function Qg(t,e){return!t||!Ng(e)?!1:(e=e.slice(2),e=e==="Once"?e:e.replace(/Once$/,""),Ht(t,e[0].toLowerCase()+e.slice(1))||Ht(t,Ks(e))||Ht(t,e))}function V$(t){const{type:e,vnode:n,proxy:i,withProxy:o,propsOptions:[r],slots:a,attrs:s,emit:l,render:c,renderCache:u,props:d,data:f,setupState:h,ctx:p,inheritAttrs:g}=t,m=pp(t);let v,b;try{if(n.shapeFlag&4){const w=o||i,x=w;v=Jo(c.call(x,w,u,d,h,f,p)),b=s}else{const w=e;v=Jo(w.length>1?w(d,{attrs:s,slots:a,emit:l}):w(d,null)),b=e.props?s:sz(s)}}catch(w){Dr.length=0,Gg(w,t,1),v=C(Dn)}let y=v;if(b&&g!==!1){const w=Object.keys(b),{shapeFlag:x}=y;w.length&&x&7&&(r&&w.some(Bg)&&(b=lz(b,r)),y=On(y,b,!1,!0))}if(n.dirs&&(y=On(y,null,!1,!0),y.dirs=y.dirs?y.dirs.concat(n.dirs):n.dirs),n.transition){const w=Kg(y.type)&&gp(y)||y;Es(w,n.transition)}return v=y,pp(m),v}const sz=t=>{let e;for(const n in t)(n==="class"||n==="style"||Ng(n))&&((e||(e={}))[n]=t[n]);return e},lz=(t,e)=>{const n={};for(const i in t)(!Bg(i)||!(i.slice(9)in e))&&(n[i]=t[i]);return n};function cz(t,e,n){const{props:i,children:o,component:r}=t,{props:a,children:s,patchFlag:l}=e,c=r.emitsOptions;if(e.dirs||e.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return i?X$(i,a,c):!!a;if(l&8){const u=e.dynamicProps;for(let d=0;dObject.create(nk),ok=t=>Object.getPrototypeOf(t)===nk;function dz(t,e,n,i=!1){const o={},r=ik();t.propsDefaults=Object.create(null),rk(t,e,o,r);for(const a in t.propsOptions[0])a in o||(o[a]=void 0);n?t.props=i?o:PI(o):t.type.props?t.props=o:t.props=r,t.attrs=r}function fz(t,e,n,i){const{props:o,attrs:r,vnode:{patchFlag:a}}=t,s=dt(o),[l]=t.propsOptions;let c=!1;if((i||a>0)&&!(a&16)){if(a&8){const u=t.vnode.dynamicProps;for(let d=0;d{l=!0;const[f,h]=ak(d,e,!0);mn(a,f),h&&s.push(...h)};!n&&e.mixins.length&&e.mixins.forEach(u),t.extends&&u(t.extends),t.mixins&&t.mixins.forEach(u)}if(!r&&!l)return Bt(t)&&i.set(t,zl),zl;if(bt(r))for(let u=0;ut==="_"||t==="_ctx"||t==="$stable",Dw=t=>bt(t)?t.map(Jo):[Jo(t)],pz=(t,e,n)=>{if(e._n)return e;const i=FI((...o)=>Dw(e(...o)),n);return i._c=!1,i},sk=(t,e,n)=>{const i=t._ctx;for(const o in t){if(kw(o))continue;const r=t[o];if(St(r))e[o]=pz(o,r,i);else if(r!=null){const a=Dw(r);e[o]=()=>a}}},lk=(t,e)=>{const n=Dw(e);t.slots.default=()=>n},ck=(t,e,n)=>{for(const i in e)(n||!kw(i))&&(t[i]=e[i])},gz=(t,e,n)=>{const i=t.slots=ik();if(t.vnode.shapeFlag&32){const o=e._;o?(ck(i,e,n),n&&aI(i,"_",o,!0)):sk(e,i)}else e&&lk(t,e)},mz=(t,e,n)=>{const{vnode:i,slots:o}=t;let r=!0,a=Xt;if(i.shapeFlag&32){const s=e._;s?n&&s===1?r=!1:ck(o,e,n):(r=!e.$stable,sk(e,o)),a=e}else e&&(lk(t,e),a={default:1});if(r)for(const s in o)!kw(s)&&a[s]==null&&delete o[s]},ci=wz;function vz(t){return bz(t)}function bz(t,e){const n=jg();n.__VUE__=!0;const{insert:i,remove:o,patchProp:r,createElement:a,createText:s,createComment:l,setText:c,setElementText:u,parentNode:d,nextSibling:f,setScopeId:h=nr,insertStaticContent:p}=t,g=(X,K,te,ue=null,ae=null,re=null,ne=void 0,le=null,he=!!K.dynamicChildren)=>{if(X===K)return;X&&!as(X,K)&&(ue=Y(X),W(X,ae,re,!0),X=null),K.patchFlag===-2&&(he=!1,K.dynamicChildren=null);const{type:pe,ref:ge,shapeFlag:be}=K;switch(pe){case Ma:m(X,K,te,ue);break;case Dn:v(X,K,te,ue);break;case Xv:X==null&&b(K,te,ue,ne);break;case Qe:M(X,K,te,ue,ae,re,ne,le,he);break;default:be&1?x(X,K,te,ue,ae,re,ne,le,he):be&6?I(X,K,te,ue,ae,re,ne,le,he):(be&64||be&128)&&pe.process(X,K,te,ue,ae,re,ne,le,he,G)}ge!=null&&ae?Au(ge,X&&X.ref,re,K||X,!K):ge==null&&X&&X.ref!=null&&Au(X.ref,null,re,X,!0)},m=(X,K,te,ue)=>{if(X==null)i(K.el=s(K.children),te,ue);else{const ae=K.el=X.el;K.children!==X.children&&c(ae,K.children)}},v=(X,K,te,ue)=>{X==null?i(K.el=l(K.children||""),te,ue):K.el=X.el},b=(X,K,te,ue)=>{[X.el,X.anchor]=p(X.children,K,te,ue,X.el,X.anchor)},y=({el:X,anchor:K},te,ue)=>{let ae;for(;X&&X!==K;)ae=f(X),i(X,te,ue),X=ae;i(K,te,ue)},w=({el:X,anchor:K})=>{let te;for(;X&&X!==K;)te=f(X),o(X),X=te;o(K)},x=(X,K,te,ue,ae,re,ne,le,he)=>{if(K.type==="svg"?ne="svg":K.type==="math"&&(ne="mathml"),X==null)$(K,te,ue,ae,re,ne,le,he);else{const pe=X.el&&X.el._isVueCE?X.el:null;try{pe&&pe._beginPatch(),P(X,K,ae,re,ne,le,he)}finally{pe&&pe._endPatch()}}},$=(X,K,te,ue,ae,re,ne,le)=>{let he,pe;const{props:ge,shapeFlag:be,transition:$e,dirs:fe}=X;if(he=X.el=a(X.type,re,ge&&ge.is,ge),be&8?u(he,X.children):be&16&&_(X.children,he,null,ue,ae,Vv(X,re),ne,le),fe&&Ha(X,null,ue,"created"),S(he,X,X.scopeId,ne,ue),ge){for(const xe in ge)xe!=="value"&&!Su(xe)&&r(he,xe,null,ge[xe],re,ue);"value"in ge&&r(he,"value",null,ge.value,re),(pe=ge.onVnodeBeforeMount)&&Vo(pe,ue,X)}fe&&Ha(X,null,ue,"beforeMount");const de=yz(ae,$e);de&&$e.beforeEnter(he),i(he,K,te),((pe=ge&&ge.onVnodeMounted)||de||fe)&&ci(()=>{try{pe&&Vo(pe,ue,X),de&&$e.enter(he),fe&&Ha(X,null,ue,"mounted")}finally{}},ae)},S=(X,K,te,ue,ae)=>{if(te&&h(X,te),ue)for(let re=0;re{for(let pe=he;pe{const le=K.el=X.el;let{patchFlag:he,dynamicChildren:pe,dirs:ge}=K;he|=X.patchFlag&16;const be=X.props||Xt,$e=K.props||Xt;let fe;if(te&&Wa(te,!1),(fe=$e.onVnodeBeforeUpdate)&&Vo(fe,te,K,X),ge&&Ha(K,X,te,"beforeUpdate"),te&&Wa(te,!0),pe&&(!X.dynamicChildren||X.dynamicChildren.length!==pe.length)&&(he=0,ne=!1,pe=null),(be.innerHTML&&$e.innerHTML==null||be.textContent&&$e.textContent==null)&&u(le,""),pe?O(X.dynamicChildren,pe,le,te,ue,Vv(K,ae),re):ne||F(X,K,le,null,te,ue,Vv(K,ae),re,!1),he>0){if(he&16)T(le,be,$e,te,ae);else if(he&2&&be.class!==$e.class&&r(le,"class",null,$e.class,ae),he&4&&r(le,"style",be.style,$e.style,ae),he&8){const de=K.dynamicProps;for(let xe=0;xe{fe&&Vo(fe,te,K,X),ge&&Ha(K,X,te,"updated")},ue)},O=(X,K,te,ue,ae,re,ne)=>{for(let le=0;le{if(K!==te){if(K!==Xt)for(const re in K)!Su(re)&&!(re in te)&&r(X,re,K[re],null,ae,ue);for(const re in te){if(Su(re))continue;const ne=te[re],le=K[re];ne!==le&&re!=="value"&&r(X,re,le,ne,ae,ue)}"value"in te&&r(X,"value",K.value,te.value,ae)}},M=(X,K,te,ue,ae,re,ne,le,he)=>{const pe=K.el=X?X.el:s(""),ge=K.anchor=X?X.anchor:s("");let{patchFlag:be,dynamicChildren:$e,slotScopeIds:fe}=K;fe&&(le=le?le.concat(fe):fe),X==null?(i(pe,te,ue),i(ge,te,ue),_(K.children||[],te,ge,ae,re,ne,le,he)):be>0&&be&64&&$e&&X.dynamicChildren&&X.dynamicChildren.length===$e.length?(O(X.dynamicChildren,$e,te,ae,re,ne,le),(K.key!=null||ae&&K===ae.subTree)&&Rw(X,K,!0)):F(X,K,te,ge,ae,re,ne,le,he)},I=(X,K,te,ue,ae,re,ne,le,he)=>{K.slotScopeIds=le,X==null?K.shapeFlag&512?ae.ctx.activate(K,te,ue,ne,he):k(K,te,ue,ae,re,ne,he):E(X,K,he)},k=(X,K,te,ue,ae,re,ne)=>{const le=X.component=Oz(X,ue,ae);if(Ug(X)&&(le.ctx.renderer=G),Ez(le,!1,ne),le.asyncDep){if(ae&&ae.registerDep(le,R,ne),!X.el){const he=le.subTree=C(Dn);v(null,he,K,te),X.placeholder=he.el}}else R(le,X,K,te,ae,re,ne)},E=(X,K,te)=>{const ue=K.component=X.component;if(cz(X,K,te))if(ue.asyncDep&&!ue.asyncResolved){D(ue,K,te);return}else ue.next=K,ue.update();else K.el=X.el,ue.vnode=K},R=(X,K,te,ue,ae,re,ne)=>{const le=()=>{if(X.isMounted){let{next:be,bu:$e,u:fe,parent:de,vnode:xe}=X;{const Ae=uk(X);if(Ae){be&&(be.el=xe.el,D(X,be,ne)),Ae.asyncDep.then(()=>{ci(()=>{X.isUnmounted||pe()},ae)});return}}let _e=be,Oe;Wa(X,!1),be?(be.el=xe.el,D(X,be,ne)):be=xe,$e&&Fv($e),(Oe=be.props&&be.props.onVnodeBeforeUpdate)&&Vo(Oe,de,be,xe),Wa(X,!0);const Re=V$(X),Se=X.subTree;X.subTree=Re,g(Se,Re,d(Se.el),Y(Se),X,ae,re),be.el=Re.el,_e===null&&uz(X,Re.el),fe&&ci(fe,ae),(Oe=be.props&&be.props.onVnodeUpdated)&&ci(()=>Vo(Oe,de,be,xe),ae)}else{let be;const{el:$e,props:fe}=K,{bm:de,m:xe,parent:_e,root:Oe,type:Re}=X,Se=Wl(K);Wa(X,!1),de&&Fv(de),!Se&&(be=fe&&fe.onVnodeBeforeMount)&&Vo(be,_e,K),Wa(X,!0);{Oe.ce&&Oe.ce._hasShadowRoot()&&Oe.ce._injectChildStyle(Re,X.parent?X.parent.type:void 0);const Ae=X.subTree=V$(X);g(null,Ae,te,ue,X,ae,re),K.el=Ae.el}if(xe&&ci(xe,ae),!Se&&(be=fe&&fe.onVnodeMounted)){const Ae=K;ci(()=>Vo(be,_e,Ae),ae)}(K.shapeFlag&256||_e&&Wl(_e.vnode)&&_e.vnode.shapeFlag&256)&&X.a&&ci(X.a,ae),X.isMounted=!0,K=te=ue=null}};X.scope.on();const he=X.effect=new hI(le);X.scope.off();const pe=X.update=he.run.bind(he),ge=X.job=he.runIfDirty.bind(he);ge.i=X,ge.id=X.uid,he.scheduler=()=>Pw(ge),Wa(X,!0),pe()},D=(X,K,te)=>{K.component=X;const ue=X.vnode.props;X.vnode=K,X.next=null,fz(X,K.props,ue,te),mz(X,K.children,te),Fr(),k$(X),Nr()},F=(X,K,te,ue,ae,re,ne,le,he=!1)=>{const pe=X&&X.children,ge=X?X.shapeFlag:0,be=K.children,{patchFlag:$e,shapeFlag:fe}=K;if($e>0){if($e&128){B(pe,be,te,ue,ae,re,ne,le,he);return}else if($e&256){N(pe,be,te,ue,ae,re,ne,le,he);return}}fe&8?(ge&16&&q(pe,ae,re),be!==pe&&u(te,be)):ge&16?fe&16?B(pe,be,te,ue,ae,re,ne,le,he):q(pe,ae,re,!0):(ge&8&&u(te,""),fe&16&&_(be,te,ue,ae,re,ne,le,he))},N=(X,K,te,ue,ae,re,ne,le,he)=>{X=X||zl,K=K||zl;const pe=X.length,ge=K.length,be=Math.min(pe,ge);let $e;for($e=0;$ege?q(X,ae,re,!0,!1,be):_(K,te,ue,ae,re,ne,le,he,be)},B=(X,K,te,ue,ae,re,ne,le,he)=>{let pe=0;const ge=K.length;let be=X.length-1,$e=ge-1;for(;pe<=be&&pe<=$e;){const fe=X[pe],de=K[pe]=he?wr(K[pe]):Jo(K[pe]);if(as(fe,de))g(fe,de,te,null,ae,re,ne,le,he);else break;pe++}for(;pe<=be&&pe<=$e;){const fe=X[be],de=K[$e]=he?wr(K[$e]):Jo(K[$e]);if(as(fe,de))g(fe,de,te,null,ae,re,ne,le,he);else break;be--,$e--}if(pe>be){if(pe<=$e){const fe=$e+1,de=fe$e)for(;pe<=be;)W(X[pe],ae,re,!0),pe++;else{const fe=pe,de=pe,xe=new Map;for(pe=de;pe<=$e;pe++){const Le=K[pe]=he?wr(K[pe]):Jo(K[pe]);Le.key!=null&&xe.set(Le.key,pe)}let _e,Oe=0;const Re=$e-de+1;let Se=!1,Ae=0;const Pe=new Array(Re);for(pe=0;pe=Re){W(Le,ae,re,!0);continue}let De;if(Le.key!=null)De=xe.get(Le.key);else for(_e=de;_e<=$e;_e++)if(Pe[_e-de]===0&&as(Le,K[_e])){De=_e;break}De===void 0?W(Le,ae,re,!0):(Pe[De-de]=pe+1,De>=Ae?Ae=De:Se=!0,g(Le,K[De],te,null,ae,re,ne,le,he),Oe++)}const ke=Se?xz(Pe):zl;for(_e=ke.length-1,pe=Re-1;pe>=0;pe--){const Le=de+pe,De=K[Le],je=K[Le+1],ft=Le+1{const{el:re,type:ne,transition:le,children:he,shapeFlag:pe}=X;if(pe&6){z(X.component.subTree,K,te,ue);return}if(pe&128){X.suspense.move(K,te,ue);return}if(pe&64){ne.move(X,K,te,G);return}if(ne===Qe){i(re,K,te);for(let be=0;bele.enter(re),ae));else{const{leave:be,delayLeave:$e,afterLeave:fe}=le,de=()=>{X.ctx.isUnmounted?o(re):i(re,K,te)},xe=()=>{const _e=re._isLeaving||!!re[ro];re._isLeaving&&re[ro](!0),le.persisted&&!_e?de():be(re,()=>{de(),fe&&fe()})};$e?$e(re,de,xe):xe()}else i(re,K,te)},W=(X,K,te,ue=!1,ae=!1)=>{const{type:re,props:ne,ref:le,children:he,dynamicChildren:pe,shapeFlag:ge,patchFlag:be,dirs:$e,cacheIndex:fe,memo:de}=X;if(be===-2&&(ae=!1),le!=null&&(Fr(),Au(le,null,te,X,!0),Nr()),fe!=null&&(K.renderCache[fe]=void 0),ge&256){K.ctx.deactivate(X);return}const xe=ge&1&&$e,_e=!Wl(X);let Oe;if(_e&&(Oe=ne&&ne.onVnodeBeforeUnmount)&&Vo(Oe,K,X),ge&6)V(X.component,te,ue);else{if(ge&128){X.suspense.unmount(te,ue);return}xe&&Ha(X,null,K,"beforeUnmount"),ge&64?X.type.remove(X,K,te,G,ue):pe&&!pe.hasOnce&&(re!==Qe||be>0&&be&64)?q(pe,K,te,!1,!0):(re===Qe&&be&384||!ae&&ge&16)&&q(he,K,te),ue&&j(X)}const Re=de!=null&&fe==null;(_e&&(Oe=ne&&ne.onVnodeUnmounted)||xe||Re)&&ci(()=>{Oe&&Vo(Oe,K,X),xe&&Ha(X,null,K,"unmounted"),Re&&(X.el=null)},te)},j=X=>{const{type:K,el:te,anchor:ue,transition:ae}=X;if(K===Qe){U(te,ue);return}if(K===Xv){w(X);return}const re=()=>{o(te),ae&&!ae.persisted&&ae.afterLeave&&ae.afterLeave()};if(X.shapeFlag&1&&ae&&!ae.persisted){const{leave:ne,delayLeave:le}=ae,he=()=>ne(te,re);le?le(X.el,re,he):he()}else re()},U=(X,K)=>{let te;for(;X!==K;)te=f(X),o(X),X=te;o(K)},V=(X,K,te)=>{const{bum:ue,scope:ae,job:re,subTree:ne,um:le,m:he,a:pe}=X;G$(he),G$(pe),ue&&Fv(ue),ae.stop(),re&&(re.flags|=8,W(ne,X,K,te)),le&&ci(le,K),ci(()=>{X.isUnmounted=!0},K)},q=(X,K,te,ue=!1,ae=!1,re=0)=>{for(let ne=re;ne{if(X.shapeFlag&6)return Y(X.component.subTree);if(X.shapeFlag&128)return X.suspense.next();const K=f(X.anchor||X.el),te=K&&K[BI];return te?f(te):K};let J=!1;const Q=(X,K,te)=>{let ue;X==null?K._vnode&&(W(K._vnode,null,null,!0),ue=K._vnode.component):g(K._vnode||null,X,K,null,null,null,te),K._vnode=X,J||(J=!0,k$(ue),DI(),J=!1)},G={p:g,um:W,m:z,r:j,mt:k,mc:_,pc:F,pbc:O,n:Y,o:t};return{render:Q,hydrate:void 0,createApp:iz(Q)}}function Vv({type:t,props:e},n){return n==="svg"&&t==="foreignObject"||n==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:n}function Wa({effect:t,job:e},n){n?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function yz(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function Rw(t,e,n=!1){const i=t.children,o=e.children;if(bt(i)&&bt(o))for(let r=0;r>1,t[n[s]]0&&(e[i]=n[r-1]),n[r]=i)}}for(r=n.length,a=n[r-1];r-- >0;)n[r]=a,a=e[a];return n}function uk(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:uk(e)}function G$(t){if(t)for(let e=0;et.__isSuspense;function wz(t,e){e&&e.pendingBranch?bt(t)?e.effects.push(...t):e.effects.push(t):IB(t)}const Qe=Symbol.for("v-fgt"),Ma=Symbol.for("v-txt"),Dn=Symbol.for("v-cmt"),Xv=Symbol.for("v-stc"),Dr=[];let Hi=null;function nd(t=!1){Dr.push(Hi=t?null:[])}function Lw(){Dr.pop(),Hi=Dr[Dr.length-1]||null}let id=1;function bp(t,e=!1){id+=t,t<0&&Hi&&e&&(Hi.hasOnce=!0)}function hk(t){return t.dynamicChildren=id>0?Hi||zl:null,Lw(),id>0&&Hi&&Hi.push(t),t}function Sz(t,e,n,i,o,r){return hk(Fw(t,e,n,i,o,r,!0))}function yp(t,e,n,i,o){return hk(C(t,e,n,i,o,!0))}function ln(t){return t?t.__v_isVNode===!0:!1}function as(t,e){return t.type===e.type&&t.key===e.key}const pk=({key:t})=>t??null,gh=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?Qt(t)||en(t)||St(t)?{i:Bn,r:t,k:e,f:!!n}:t:null);function Fw(t,e=null,n=null,i=0,o=null,r=t===Qe?0:1,a=!1,s=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&pk(e),ref:e&&gh(e),scopeId:LI,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:i,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Bn};return s?(xp(l,n),r&128&&t.normalize(l)):n&&(l.shapeFlag|=Qt(n)?8:16),id>0&&!a&&Hi&&(l.patchFlag>0||r&6)&&l.patchFlag!==32&&Hi.push(l),l}const C=Cz;function Cz(t,e=null,n=null,i=0,o=null,r=!1){if((!t||t===UI)&&(t=Dn),ln(t)){const s=On(t,e,!0);return n&&xp(s,n),id>0&&!r&&Hi&&(s.shapeFlag&6?Hi[Hi.indexOf(t)]=s:Hi.push(s)),s.patchFlag=-2,s}if(Dz(t)&&(t=t.__vccOpts),e){e=$z(e);let{class:s,style:l}=e;s&&!Qt(s)&&(e.class=Bd(s)),Bt(l)&&(Yg(l)&&!bt(l)&&(l=mn({},l)),e.style=bw(l))}const a=Qt(t)?1:fk(t)?128:Kg(t)?64:Bt(t)?4:St(t)?2:0;return Fw(t,e,n,i,o,a,r,!0)}function $z(t){return t?Yg(t)||ok(t)?mn({},t):t:null}function On(t,e,n=!1,i=!1){const{props:o,ref:r,patchFlag:a,children:s,transition:l}=t,c=e?_z(o||{},e):o,u={__v_isVNode:!0,__v_skip:!0,type:t.type,props:c,key:c&&pk(c),ref:e&&e.ref?n&&r?bt(r)?r.concat(gh(e)):[r,gh(e)]:gh(e):r,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:s,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==Qe?a===-1?16:a|16:a,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:l,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&On(t.ssContent),ssFallback:t.ssFallback&&On(t.ssFallback),placeholder:t.placeholder,el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&i&&Es(u,l.clone(u)),u}function Qn(t=" ",e=0){return C(Ma,null,t,e)}function Az(t="",e=!1){return e?(nd(),yp(Dn,null,t)):C(Dn,null,t)}function Jo(t){return t==null||typeof t=="boolean"?C(Dn):bt(t)?C(Qe,null,t.slice()):ln(t)?wr(t):C(Ma,null,String(t))}function wr(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:On(t)}function xp(t,e){let n=0;const{shapeFlag:i}=t;if(e==null)e=null;else if(bt(e))n=16;else if(typeof e=="object")if(i&65){const o=e.default;o&&(o._c&&(o._d=!1),xp(t,o()),o._c&&(o._d=!0));return}else{n=32;const o=e._;!o&&!ok(e)?e._ctx=Bn:o===3&&Bn&&(Bn.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else if(St(e)){if(i&65){xp(t,{default:e});return}e={default:e,_ctx:Bn},n=32}else e=String(e),i&64?(n=16,e=[Qn(e)]):n=8;t.children=e,t.shapeFlag|=n}function _z(...t){const e={};for(let n=0;nJn||Bn;let wp,od;{const t=jg(),e=(n,i)=>{let o;return(o=t[n])||(o=t[n]=[]),o.push(i),r=>{o.length>1?o.forEach(a=>a(r)):o[0](r)}};wp=e("__VUE_INSTANCE_SETTERS__",n=>Jn=n),od=e("__VUE_SSR_SETTERS__",n=>rd=n)}const Wd=t=>{const e=Jn;return wp(t),t.scope.on(),()=>{t.scope.off(),wp(e)}},K$=()=>{Jn&&Jn.scope.off(),wp(null)};function gk(t){return t.vnode.shapeFlag&4}let rd=!1;function Ez(t,e=!1,n=!1){e&&od(e);const{props:i,children:o}=t.vnode,r=gk(t);dz(t,i,r,e),gz(t,o,n||e);const a=r?Mz(t,e):void 0;return e&&od(!1),a}function Mz(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,KB);const{setup:i}=n;if(i){Fr();const o=t.setupContext=i.length>1?vk(t):null,r=Wd(t),a=zd(i,t,0,[t.props,o]),s=iI(a);if(Nr(),r(),(s||t.sp)&&!Wl(t)&&XI(t),s){if(a.then(K$,K$),e)return a.then(l=>{od(!0);try{U$(t,l,e)}finally{od(!1)}}).catch(l=>{Gg(l,t,0)});t.asyncDep=a}else U$(t,a)}else mk(t)}function U$(t,e,n){St(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:Bt(e)&&(t.setupState=EI(e)),mk(t)}function mk(t,e,n){const i=t.type;t.render||(t.render=i.render||nr);{const o=Wd(t);Fr();try{ZB(t)}finally{Nr(),o()}}}const Iz={get(t,e){return qn(t,"get",""),t[e]}};function vk(t){const e=n=>{t.exposed=n||{}};return{attrs:new Proxy(t.attrs,Iz),slots:t.slots,emit:t.emit,expose:e}}function em(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(EI(_w(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in _u)return _u[n](t)},has(e,n){return n in e||n in _u}})):t.proxy}function kz(t,e=!0){return St(t)?t.displayName||t.name:t.name||e&&t.__name}function Dz(t){return St(t)&&"__vccOpts"in t}const L=(t,e)=>PB(t,e,rd);function ar(t,e,n){try{bp(-1);const i=arguments.length;return i===2?Bt(e)&&!bt(e)?ln(e)?C(t,null,[e]):C(t,e):C(t,null,e):(i>3?n=Array.prototype.slice.call(arguments,2):i===3&&ln(n)&&(n=[n]),C(t,e,n))}finally{bp(1)}}const Rz="3.5.42";/** +**/function Hd(t,e,n,i){try{return i?t(...i):t()}catch(o){Kg(o,e,n)}}function go(t,e,n,i){if(St(t)){const o=Hd(t,e,n,i);return o&&iI(o)&&o.catch(r=>{Kg(r,e,n)}),o}if(bt(t)){const o=[];for(let r=0;r>>1,o=fi[i],r=td(o);r=td(n)?fi.push(t):fi.splice(MB(e),0,t),t.flags|=1,kI()}}function kI(){pp||(pp=II.then(RI))}function IB(t){if(!bt(t))ua&&t.id===-1?ua.splice(Cl+1,0,t):t.flags&1||(Hl.push(t),t.flags|=1);else for(let e=0;etd(n)-td(i));if(Hl.length=0,ua){for(let n=0;nt.id==null?t.flags&2?-1:1/0:t.id;function RI(t){try{for(Ko=0;Ko{i._d&&yp(-1);const r=gp(e),a=Dr.length;let s;try{s=t(...o)}finally{for(let l=Dr.length;l>a;l--)Lw();gp(r),i._d&&yp(1)}return s};return i._n=!0,i._c=!0,i._d=!0,i}function ni(t,e){if(Bn===null)return t;const n=tm(Bn),i=t.dirs||(t.dirs=[]);for(let o=0;o1)return n&&St(e)?e.call(i&&i.proxy):e}}function kB(){return!!(Cn()||ys)}const DB=Symbol.for("v-scx"),RB=()=>qe(DB);function Ke(t,e){return Tw(t,null,e)}function ye(t,e,n){return Tw(t,e,n)}function Tw(t,e,n=Xt){const{immediate:i,deep:o,flush:r,once:a}=n,s=mn({},n),l=e&&i||!e&&r!=="post";let c;if(ad){if(r==="sync"){const h=RB();c=h.__watcherHandles||(h.__watcherHandles=[])}else if(!l){const h=()=>{};return h.stop=nr,h.resume=nr,h.pause=nr,h}}const u=Jn;s.call=(h,p,g)=>go(h,u,p,g);let d=!1;r==="post"?s.scheduler=h=>{ci(h,u&&u.suspense)}:r!=="sync"&&(d=!0,s.scheduler=(h,p)=>{p?h():Pw(h)}),s.augmentJob=h=>{e&&(h.flags|=4),d&&(h.flags|=2,u&&(h.id=u.uid,h.i=u))};const f=OB(t,e,s);return ad&&(c?c.push(f):l&&f()),f}function LB(t,e,n){const i=this.proxy,o=Qt(t)?t.includes(".")?NI(i,t):()=>i[t]:t.bind(i,i);let r;St(e)?r=e:(r=e.handler,n=e);const a=jd(this),s=Tw(o,r.bind(i),n);return a(),s}function NI(t,e){const n=e.split(".");return()=>{let i=t;for(let o=0;ot.__isTeleport,rs=t=>t&&(t.disabled||t.disabled===""),FB=t=>t&&(t.defer||t.defer===""),D$=t=>typeof SVGElement<"u"&&t instanceof SVGElement,R$=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,V0=(t,e)=>{const n=t&&t.to;return Qt(n)?e?e(n):null:n},NB={name:"Teleport",__isTeleport:!0,process(t,e,n,i,o,r,a,s,l,c){const{mc:u,pc:d,pbc:f,o:{insert:h,querySelector:p,createText:g,createComment:m,parentNode:v}}=c,b=rs(e.props);let{dynamicChildren:y}=e;const w=(S,_,P)=>{S.shapeFlag&16&&u(S.children,_,P,o,r,a,s,l)},x=(S=e)=>{const _=rs(S.props),P=S.target=V0(S.props,p),O=X0(P,S,g,h);P&&(a!=="svg"&&D$(P)?a="svg":a!=="mathml"&&R$(P)&&(a="mathml"),o&&o.isCE&&(o.ce._teleportTargets||(o.ce._teleportTargets=new Set)).add(P),_||(w(S,P,O),du(S,!1)))},$=S=>{const _=()=>{if(oa.get(S)===_){if(oa.delete(S),rs(S.props)){const P=v(S.el)||n;w(S,P,S.anchor),du(S,!0)}x(S)}};oa.set(S,_),ci(_,r)};if(t==null){const S=e.el=g(""),_=e.anchor=g("");if(h(S,n,i),h(_,n,i),FB(e.props)||r&&r.pendingBranch){$(e);return}b&&(w(e,n,_),du(e,!0)),x()}else{e.el=t.el;const S=e.anchor=t.anchor,_=oa.get(t);if(_){_.flags|=8,oa.delete(t),$(e);return}e.targetStart=t.targetStart;const P=e.target=t.target,O=e.targetAnchor=t.targetAnchor,T=rs(t.props),M=T?n:P,I=T?S:O;if(a==="svg"||D$(P)?a="svg":(a==="mathml"||R$(P))&&(a="mathml"),y?(f(t.dynamicChildren,y,M,o,r,a,s),Rw(t,e,!0)):l||d(t,e,M,I,o,r,a,s,!1),b)T?e.props&&t.props&&e.props.to!==t.props.to&&(e.props.to=t.props.to):Cf(e,n,S,c,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const k=V0(e.props,p);k&&(e.target=k,Cf(e,k,null,c,0))}else T&&Cf(e,P,O,c,1);du(e,b)}},remove(t,e,n,{um:i,o:{remove:o}},r){const{shapeFlag:a,children:s,anchor:l,targetStart:c,targetAnchor:u,target:d,props:f}=t,h=rs(f),p=r||!h,g=oa.get(t);if(g&&(g.flags|=8,oa.delete(t)),d&&(o(c),o(u)),r&&o(l),!g&&(h||d)&&a&16)for(let m=0;m{t.isMounted=!0}),at(()=>{t.isUnmounting=!0}),t}const eo=[Function,Array],HI={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:eo,onEnter:eo,onAfterEnter:eo,onEnterCancelled:eo,onBeforeLeave:eo,onLeave:eo,onAfterLeave:eo,onLeaveCancelled:eo,onBeforeAppear:eo,onAppear:eo,onAfterAppear:eo,onAppearCancelled:eo},WI=t=>{const e=t.subTree;return e.component?WI(e.component):e},zB={name:"BaseTransition",props:HI,setup(t,{slots:e}){const n=Cn(),i=zI();return()=>{const o=e.default&&Ew(e.default(),!0),r=o&&o.length?jI(o):n.subTree?Az():void 0;if(!r)return;const a=dt(t),{mode:s}=a;if(i.isLeaving)return Wv(r);const l=mp(r);if(!l)return Wv(r);let c=nd(l,a,i,n,d=>c=d);l.type!==Dn&&Es(l,c);let u=n.subTree&&mp(n.subTree);if(u&&u.type!==Dn&&!as(u,l)&&WI(n).type!==Dn){let d=nd(u,a,i,n);if(Es(u,d),s==="out-in"&&l.type!==Dn)return i.isLeaving=!0,d.afterLeave=()=>{i.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,u=void 0},Wv(r);s==="in-out"&&l.type!==Dn?d.delayLeave=(f,h,p)=>{const g=VI(i,u);g[String(u.key)]=u,f[ro]=()=>{h(),f[ro]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{p(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return r}}};function jI(t){let e=t[0];if(t.length>1){for(const n of t)if(n.type!==Dn){e=n;break}}return e}const HB=zB;function VI(t,e){const{leavingVNodes:n}=t;let i=n.get(e.type);return i||(i=Object.create(null),n.set(e.type,i)),i}function nd(t,e,n,i,o){const{appear:r,mode:a,persisted:s=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:f,onLeave:h,onAfterLeave:p,onLeaveCancelled:g,onBeforeAppear:m,onAppear:v,onAfterAppear:b,onAppearCancelled:y}=e,w=String(t.key),x=VI(n,t),$=(P,O)=>{P&&go(P,i,9,O)},S=(P,O)=>{const T=O[1];$(P,O),bt(P)?P.every(M=>M.length<=1)&&T():P.length<=1&&T()},_={mode:a,persisted:s,beforeEnter(P){let O=l;if(!n.isMounted)if(r)O=m||l;else return;P[ro]&&P[ro](!0);const T=x[w];T&&as(t,T)&&T.el[ro]&&T.el[ro](),$(O,[P])},enter(P){if(x[w]===t)return;let O=c,T=u,M=d;if(!n.isMounted)if(r)O=v||c,T=b||u,M=y||d;else return;let I=!1;P[Yc]=E=>{I||(I=!0,E?$(M,[P]):$(T,[P]),_.delayedLeave&&_.delayedLeave(),P[Yc]=void 0)};const k=P[Yc].bind(null,!1);O?S(O,[P,k]):k()},leave(P,O){const T=String(t.key);if(P[Yc]&&P[Yc](!0),n.isUnmounting)return O();$(f,[P]);let M=!1;P[ro]=k=>{M||(M=!0,O(),k?$(g,[P]):$(p,[P]),P[ro]=void 0,x[T]===t&&delete x[T])};const I=P[ro].bind(null,!1);x[T]=t,h?S(h,[P,I]):I()},clone(P){const O=nd(P,e,n,i,o);return o&&o(O),O}};return _}function Wv(t){if(qg(t))return t=On(t),t.children=null,t}function mp(t){if(!qg(t))return Ug(t.type)&&t.children?jI(t.children):t;if(t.component)return t.component.subTree;const{shapeFlag:e,children:n}=t;if(n){if(e&16)return n[0];if(e&32&&St(n.default))return n.default()}}function Es(t,e){if(t.shapeFlag&6&&t.component){t.transition=e;const n=t.component.subTree;Es(Ug(n.type)&&mp(n)||n,e)}else t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function Ew(t,e=!1,n){let i=[],o=0;for(let r=0;r1)for(let r=0;r_u(g,e&&(bt(e)?e[m]:e),n,i,o));return}if(Wl(i)&&!o){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&_u(t,e,n,i.component.subTree);return}const r=i.shapeFlag&4?tm(i.component):i.el,a=o?null:r,{i:s,r:l}=t,c=e&&e.r,u=s.refs===Xt?s.refs={}:s.refs,d=s.setupState,f=dt(d),h=d===Xt?nI:g=>L$(u,g)?!1:Ht(f,g),p=(g,m)=>!(m&&L$(u,m));if(c!=null&&c!==l){if(F$(e),Qt(c))u[c]=null,h(c)&&(d[c]=null);else if(en(c)){const g=e;p(c,g.k)&&(c.value=null),g.k&&(u[g.k]=null)}}if(St(l))Hd(l,s,12,[a,u]);else{const g=Qt(l),m=en(l);if(g||m){const v=()=>{if(t.f){const b=g?h(l)?d[l]:u[l]:p()||!t.k?l.value:u[t.k];if(o)bt(b)&&vw(b,r);else if(bt(b))b.includes(r)||b.push(r);else if(g)u[l]=[r],h(l)&&(d[l]=u[l]);else{const y=[r];p(l,t.k)&&(l.value=y),t.k&&(u[t.k]=y)}}else g?(u[l]=a,h(l)&&(d[l]=a)):m&&(p(l,t.k)&&(l.value=a),t.k&&(u[t.k]=a))};if(a){const b=()=>{v(),vp.delete(t)};b.id=-1,vp.set(t,b),ci(b,n)}else F$(t),v()}}}function F$(t){const e=vp.get(t);e&&(e.flags|=8,vp.delete(t))}Vg().requestIdleCallback;Vg().cancelIdleCallback;const Wl=t=>!!t.type.__asyncLoader,qg=t=>t.type.__isKeepAlive;function Zg(t,e){GI(t,"a",e)}function YI(t,e){GI(t,"da",e)}function GI(t,e,n=Jn){const i=t.__wdc||(t.__wdc=()=>{let o=n;for(;o;){if(o.isDeactivated)return;o=o.parent}return t()});if(Jg(e,i,n),n){let o=n.parent;for(;o&&o.parent;)qg(o.parent.vnode)&&WB(i,e,n,o),o=o.parent}}function WB(t,e,n,i){const o=Jg(e,t,i,!0);Xn(()=>{vw(i[e],o)},n)}function Jg(t,e,n=Jn,i=!1){if(n){const o=n[t]||(n[t]=[]),r=e.__weh||(e.__weh=(...a)=>{Fr();const s=jd(n),l=go(e,n,t,a);return s(),Nr(),l});return i?o.unshift(r):o.push(r),r}}const Vr=t=>(e,n=Jn)=>{(!ad||t==="sp")&&Jg(t,(...i)=>e(...i),n)},Wd=Vr("bm"),Ze=Vr("m"),Qg=Vr("bu"),ri=Vr("u"),at=Vr("bum"),Xn=Vr("um"),KI=Vr("sp"),jB=Vr("rtg"),VB=Vr("rtc");function XB(t,e=Jn){Jg("ec",t,e)}const Mw="components",YB="directives";function N$(t,e){return Iw(Mw,t,!0,e)||t}const UI=Symbol.for("v-ndc");function P2e(t){return Qt(t)?Iw(Mw,t,!1)||t:t||UI}function GB(t){return Iw(YB,t)}function Iw(t,e,n=!0,i=!1){const o=Bn||Jn;if(o){const r=o.type;if(t===Mw){const s=kz(r,!1);if(s&&(s===e||s===mi(e)||s===jg(mi(e))))return r}const a=B$(o[t]||r[t],e)||B$(o.appContext[t],e);return!a&&i?r:a}}function B$(t,e){return t&&(t[e]||t[mi(e)]||t[jg(mi(e))])}function T2e(t,e,n,i){let o;const r=n,a=bt(t);if(a||Qt(t)){const s=a&&kr(t);let l=!1,c=!1;s&&(l=!ji(t),c=Br(t),t=Yg(t)),o=new Array(t.length);for(let u=0,d=t.length;ue(s,l,void 0,r));else{const s=Object.keys(t);o=new Array(s.length);for(let l=0,c=s.length;l{const r=i.fn(...o);return r&&(r.key=i.key),r}:i.fn)}return t}function E2e(t,e,n,i,o,r){if(n==null&&(n={}),Bn.ce||Bn.parent&&Wl(Bn.parent)&&Bn.parent.ce){const c=r!=null&&n.key==null?mn({},n,{key:r}):n,u=Object.keys(c).length>0;return e!=="default"&&(c.name=e),id(),xp(Qe,null,[C("slot",c,i)],u?-2:64)}let a=t[e];a&&a._c&&(a._d=!1);const s=Dr.length;id();let l;try{const c=a&&qI(a(n)),u=n.key||r||c&&c.key;l=xp(Qe,{key:(u&&!Yi(u)?u:`_${e}`)+(!c&&i?"_fb":"")},c||(i?i():[]),c&&t._===1?64:-2)}catch(c){for(let u=Dr.length;u>s;u--)Lw();throw c}finally{a&&a._c&&(a._d=!0)}return!o&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),l}function qI(t){return t.some(e=>ln(e)?!(e.type===Dn||e.type===Qe&&!qI(e.children)):!0)?t:null}const Y0=t=>t?gk(t)?tm(t):Y0(t.parent):null,Pu=mn(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>Y0(t.parent),$root:t=>Y0(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>JI(t),$forceUpdate:t=>t.f||(t.f=()=>{Pw(t.update)}),$nextTick:t=>t.n||(t.n=pt.bind(t.proxy)),$watch:t=>LB.bind(t)}),jv=(t,e)=>t!==Xt&&!t.__isScriptSetup&&Ht(t,e),KB={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:n,setupState:i,data:o,props:r,accessCache:a,type:s,appContext:l}=t;if(e[0]!=="$"){const f=a[e];if(f!==void 0)switch(f){case 1:return i[e];case 2:return o[e];case 4:return n[e];case 3:return r[e]}else{if(jv(i,e))return a[e]=1,i[e];if(o!==Xt&&Ht(o,e))return a[e]=2,o[e];if(Ht(r,e))return a[e]=3,r[e];if(n!==Xt&&Ht(n,e))return a[e]=4,n[e];G0&&(a[e]=0)}}const c=Pu[e];let u,d;if(c)return e==="$attrs"&&qn(t.attrs,"get",""),c(t);if((u=s.__cssModules)&&(u=u[e]))return u;if(n!==Xt&&Ht(n,e))return a[e]=4,n[e];if(d=l.config.globalProperties,Ht(d,e))return d[e]},set({_:t},e,n){const{data:i,setupState:o,ctx:r}=t;return jv(o,e)?(o[e]=n,!0):i!==Xt&&Ht(i,e)?(i[e]=n,!0):Ht(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(r[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:i,appContext:o,props:r,type:a}},s){let l;return!!(n[s]||t!==Xt&&s[0]!=="$"&&Ht(t,s)||jv(e,s)||Ht(r,s)||Ht(i,s)||Ht(Pu,s)||Ht(o.config.globalProperties,s)||(l=a.__cssModules)&&l[s])},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:Ht(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}};function UB(){return qB().attrs}function qB(t){const e=Cn();return e.setupContext||(e.setupContext=vk(e))}function z$(t){return bt(t)?t.reduce((e,n)=>(e[n]=null,e),{}):t}let G0=!0;function ZB(t){const e=JI(t),n=t.proxy,i=t.ctx;G0=!1,e.beforeCreate&&H$(e.beforeCreate,t,"bc");const{data:o,computed:r,methods:a,watch:s,provide:l,inject:c,created:u,beforeMount:d,mounted:f,beforeUpdate:h,updated:p,activated:g,deactivated:m,beforeDestroy:v,beforeUnmount:b,destroyed:y,unmounted:w,render:x,renderTracked:$,renderTriggered:S,errorCaptured:_,serverPrefetch:P,expose:O,inheritAttrs:T,components:M,directives:I,filters:k}=e;if(c&&JB(c,i,null),a)for(const D in a){const F=a[D];St(F)&&(i[D]=F.bind(n))}if(o){const D=o.call(n,n);Bt(D)&&(t.data=$t(D))}if(G0=!0,r)for(const D in r){const F=r[D],N=St(F)?F.bind(n,n):St(F.get)?F.get.bind(n,n):nr,B=!St(F)&&St(F.set)?F.set.bind(n):nr,z=L({get:N,set:B});Object.defineProperty(i,D,{enumerable:!0,configurable:!0,get:()=>z.value,set:W=>z.value=W})}if(s)for(const D in s)ZI(s[D],i,n,D);if(l){const D=St(l)?l.call(n):l;Reflect.ownKeys(D).forEach(F=>{ot(F,D[F])})}u&&H$(u,t,"c");function R(D,F){bt(F)?F.forEach(N=>D(N.bind(n))):F&&D(F.bind(n))}if(R(Wd,d),R(Ze,f),R(Qg,h),R(ri,p),R(Zg,g),R(YI,m),R(XB,_),R(VB,$),R(jB,S),R(at,b),R(Xn,w),R(KI,P),bt(O))if(O.length){const D=t.exposed||(t.exposed={});O.forEach(F=>{Object.defineProperty(D,F,{get:()=>n[F],set:N=>n[F]=N,enumerable:!0})})}else t.exposed||(t.exposed={});x&&t.render===nr&&(t.render=x),T!=null&&(t.inheritAttrs=T),M&&(t.components=M),I&&(t.directives=I),P&&XI(t)}function JB(t,e,n=nr){bt(t)&&(t=K0(t));for(const i in t){const o=t[i];let r;Bt(o)?"default"in o?r=qe(o.from||i,o.default,!0):r=qe(o.from||i):r=qe(o),en(r)?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>r.value,set:a=>r.value=a}):e[i]=r}}function H$(t,e,n){go(bt(t)?t.map(i=>i.bind(e.proxy)):t.bind(e.proxy),e,n)}function ZI(t,e,n,i){let o=i.includes(".")?NI(n,i):()=>n[i];if(Qt(t)){const r=e[t];St(r)&&ye(o,r)}else if(St(t))ye(o,t.bind(n));else if(Bt(t))if(bt(t))t.forEach(r=>ZI(r,e,n,i));else{const r=St(t.handler)?t.handler.bind(n):e[t.handler];St(r)&&ye(o,r,t)}}function JI(t){const e=t.type,{mixins:n,extends:i}=e,{mixins:o,optionsCache:r,config:{optionMergeStrategies:a}}=t.appContext,s=r.get(e);let l;return s?l=s:!o.length&&!n&&!i?l=e:(l={},o.length&&o.forEach(c=>bp(l,c,a,!0)),bp(l,e,a)),Bt(e)&&r.set(e,l),l}function bp(t,e,n,i=!1){const{mixins:o,extends:r}=e;r&&bp(t,r,n,!0),o&&o.forEach(a=>bp(t,a,n,!0));for(const a in e)if(!(i&&a==="expose")){const s=QB[a]||n&&n[a];t[a]=s?s(t[a],e[a]):e[a]}return t}const QB={data:W$,props:j$,emits:j$,methods:fu,computed:fu,beforeCreate:li,created:li,beforeMount:li,mounted:li,beforeUpdate:li,updated:li,beforeDestroy:li,beforeUnmount:li,destroyed:li,unmounted:li,activated:li,deactivated:li,errorCaptured:li,serverPrefetch:li,components:fu,directives:fu,watch:tz,provide:W$,inject:ez};function W$(t,e){return e?t?function(){return mn(St(t)?t.call(this,this):t,St(e)?e.call(this,this):e)}:e:t}function ez(t,e){return fu(K0(t),K0(e))}function K0(t){if(bt(t)){const e={};for(let n=0;ne==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${mi(e)}Modifiers`]||t[`${Ks(e)}Modifiers`];function rz(t,e,...n){if(t.isUnmounted)return;const i=t.vnode.props||Xt;let o=n;const r=e.startsWith("update:"),a=r&&oz(i,e.slice(7));a&&(a.trim&&(o=n.map(u=>Qt(u)?u.trim():u)),a.number&&(o=o.map(K8)));let s,l=i[s=Lv(e)]||i[s=Lv(mi(e))];!l&&r&&(l=i[s=Lv(Ks(e))]),l&&go(l,t,6,o);const c=i[s+"Once"];if(c){if(!t.emitted)t.emitted={};else if(t.emitted[s])return;t.emitted[s]=!0,go(c,t,6,o)}}const az=new WeakMap;function ek(t,e,n=!1){const i=n?az:e.emitsCache,o=i.get(t);if(o!==void 0)return o;const r=t.emits;let a={},s=!1;if(!St(t)){const l=c=>{const u=ek(c,e,!0);u&&(s=!0,mn(a,u))};!n&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!r&&!s?(Bt(t)&&i.set(t,null),null):(bt(r)?r.forEach(l=>a[l]=null):mn(a,r),Bt(t)&&i.set(t,a),a)}function em(t,e){return!t||!Bg(e)?!1:(e=e.slice(2),e=e==="Once"?e:e.replace(/Once$/,""),Ht(t,e[0].toLowerCase()+e.slice(1))||Ht(t,Ks(e))||Ht(t,e))}function V$(t){const{type:e,vnode:n,proxy:i,withProxy:o,propsOptions:[r],slots:a,attrs:s,emit:l,render:c,renderCache:u,props:d,data:f,setupState:h,ctx:p,inheritAttrs:g}=t,m=gp(t);let v,b;try{if(n.shapeFlag&4){const w=o||i,x=w;v=Jo(c.call(x,w,u,d,h,f,p)),b=s}else{const w=e;v=Jo(w.length>1?w(d,{attrs:s,slots:a,emit:l}):w(d,null)),b=e.props?s:sz(s)}}catch(w){Dr.length=0,Kg(w,t,1),v=C(Dn)}let y=v;if(b&&g!==!1){const w=Object.keys(b),{shapeFlag:x}=y;w.length&&x&7&&(r&&w.some(zg)&&(b=lz(b,r)),y=On(y,b,!1,!0))}if(n.dirs&&(y=On(y,null,!1,!0),y.dirs=y.dirs?y.dirs.concat(n.dirs):n.dirs),n.transition){const w=Ug(y.type)&&mp(y)||y;Es(w,n.transition)}return v=y,gp(m),v}const sz=t=>{let e;for(const n in t)(n==="class"||n==="style"||Bg(n))&&((e||(e={}))[n]=t[n]);return e},lz=(t,e)=>{const n={};for(const i in t)(!zg(i)||!(i.slice(9)in e))&&(n[i]=t[i]);return n};function cz(t,e,n){const{props:i,children:o,component:r}=t,{props:a,children:s,patchFlag:l}=e,c=r.emitsOptions;if(e.dirs||e.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return i?X$(i,a,c):!!a;if(l&8){const u=e.dynamicProps;for(let d=0;dObject.create(nk),ok=t=>Object.getPrototypeOf(t)===nk;function dz(t,e,n,i=!1){const o={},r=ik();t.propsDefaults=Object.create(null),rk(t,e,o,r);for(const a in t.propsOptions[0])a in o||(o[a]=void 0);n?t.props=i?o:PI(o):t.type.props?t.props=o:t.props=r,t.attrs=r}function fz(t,e,n,i){const{props:o,attrs:r,vnode:{patchFlag:a}}=t,s=dt(o),[l]=t.propsOptions;let c=!1;if((i||a>0)&&!(a&16)){if(a&8){const u=t.vnode.dynamicProps;for(let d=0;d{l=!0;const[f,h]=ak(d,e,!0);mn(a,f),h&&s.push(...h)};!n&&e.mixins.length&&e.mixins.forEach(u),t.extends&&u(t.extends),t.mixins&&t.mixins.forEach(u)}if(!r&&!l)return Bt(t)&&i.set(t,zl),zl;if(bt(r))for(let u=0;ut==="_"||t==="_ctx"||t==="$stable",Dw=t=>bt(t)?t.map(Jo):[Jo(t)],pz=(t,e,n)=>{if(e._n)return e;const i=FI((...o)=>Dw(e(...o)),n);return i._c=!1,i},sk=(t,e,n)=>{const i=t._ctx;for(const o in t){if(kw(o))continue;const r=t[o];if(St(r))e[o]=pz(o,r,i);else if(r!=null){const a=Dw(r);e[o]=()=>a}}},lk=(t,e)=>{const n=Dw(e);t.slots.default=()=>n},ck=(t,e,n)=>{for(const i in e)(n||!kw(i))&&(t[i]=e[i])},gz=(t,e,n)=>{const i=t.slots=ik();if(t.vnode.shapeFlag&32){const o=e._;o?(ck(i,e,n),n&&aI(i,"_",o,!0)):sk(e,i)}else e&&lk(t,e)},mz=(t,e,n)=>{const{vnode:i,slots:o}=t;let r=!0,a=Xt;if(i.shapeFlag&32){const s=e._;s?n&&s===1?r=!1:ck(o,e,n):(r=!e.$stable,sk(e,o)),a=e}else e&&(lk(t,e),a={default:1});if(r)for(const s in o)!kw(s)&&a[s]==null&&delete o[s]},ci=wz;function vz(t){return bz(t)}function bz(t,e){const n=Vg();n.__VUE__=!0;const{insert:i,remove:o,patchProp:r,createElement:a,createText:s,createComment:l,setText:c,setElementText:u,parentNode:d,nextSibling:f,setScopeId:h=nr,insertStaticContent:p}=t,g=(X,K,te,ue=null,ae=null,re=null,ne=void 0,le=null,he=!!K.dynamicChildren)=>{if(X===K)return;X&&!as(X,K)&&(ue=Y(X),W(X,ae,re,!0),X=null),K.patchFlag===-2&&(he=!1,K.dynamicChildren=null);const{type:pe,ref:ge,shapeFlag:be}=K;switch(pe){case Ma:m(X,K,te,ue);break;case Dn:v(X,K,te,ue);break;case Xv:X==null&&b(K,te,ue,ne);break;case Qe:M(X,K,te,ue,ae,re,ne,le,he);break;default:be&1?x(X,K,te,ue,ae,re,ne,le,he):be&6?I(X,K,te,ue,ae,re,ne,le,he):(be&64||be&128)&&pe.process(X,K,te,ue,ae,re,ne,le,he,G)}ge!=null&&ae?_u(ge,X&&X.ref,re,K||X,!K):ge==null&&X&&X.ref!=null&&_u(X.ref,null,re,X,!0)},m=(X,K,te,ue)=>{if(X==null)i(K.el=s(K.children),te,ue);else{const ae=K.el=X.el;K.children!==X.children&&c(ae,K.children)}},v=(X,K,te,ue)=>{X==null?i(K.el=l(K.children||""),te,ue):K.el=X.el},b=(X,K,te,ue)=>{[X.el,X.anchor]=p(X.children,K,te,ue,X.el,X.anchor)},y=({el:X,anchor:K},te,ue)=>{let ae;for(;X&&X!==K;)ae=f(X),i(X,te,ue),X=ae;i(K,te,ue)},w=({el:X,anchor:K})=>{let te;for(;X&&X!==K;)te=f(X),o(X),X=te;o(K)},x=(X,K,te,ue,ae,re,ne,le,he)=>{if(K.type==="svg"?ne="svg":K.type==="math"&&(ne="mathml"),X==null)$(K,te,ue,ae,re,ne,le,he);else{const pe=X.el&&X.el._isVueCE?X.el:null;try{pe&&pe._beginPatch(),P(X,K,ae,re,ne,le,he)}finally{pe&&pe._endPatch()}}},$=(X,K,te,ue,ae,re,ne,le)=>{let he,pe;const{props:ge,shapeFlag:be,transition:$e,dirs:fe}=X;if(he=X.el=a(X.type,re,ge&&ge.is,ge),be&8?u(he,X.children):be&16&&_(X.children,he,null,ue,ae,Vv(X,re),ne,le),fe&&Ha(X,null,ue,"created"),S(he,X,X.scopeId,ne,ue),ge){for(const xe in ge)xe!=="value"&&!Cu(xe)&&r(he,xe,null,ge[xe],re,ue);"value"in ge&&r(he,"value",null,ge.value,re),(pe=ge.onVnodeBeforeMount)&&Vo(pe,ue,X)}fe&&Ha(X,null,ue,"beforeMount");const de=yz(ae,$e);de&&$e.beforeEnter(he),i(he,K,te),((pe=ge&&ge.onVnodeMounted)||de||fe)&&ci(()=>{try{pe&&Vo(pe,ue,X),de&&$e.enter(he),fe&&Ha(X,null,ue,"mounted")}finally{}},ae)},S=(X,K,te,ue,ae)=>{if(te&&h(X,te),ue)for(let re=0;re{for(let pe=he;pe{const le=K.el=X.el;let{patchFlag:he,dynamicChildren:pe,dirs:ge}=K;he|=X.patchFlag&16;const be=X.props||Xt,$e=K.props||Xt;let fe;if(te&&Wa(te,!1),(fe=$e.onVnodeBeforeUpdate)&&Vo(fe,te,K,X),ge&&Ha(K,X,te,"beforeUpdate"),te&&Wa(te,!0),pe&&(!X.dynamicChildren||X.dynamicChildren.length!==pe.length)&&(he=0,ne=!1,pe=null),(be.innerHTML&&$e.innerHTML==null||be.textContent&&$e.textContent==null)&&u(le,""),pe?O(X.dynamicChildren,pe,le,te,ue,Vv(K,ae),re):ne||F(X,K,le,null,te,ue,Vv(K,ae),re,!1),he>0){if(he&16)T(le,be,$e,te,ae);else if(he&2&&be.class!==$e.class&&r(le,"class",null,$e.class,ae),he&4&&r(le,"style",be.style,$e.style,ae),he&8){const de=K.dynamicProps;for(let xe=0;xe{fe&&Vo(fe,te,K,X),ge&&Ha(K,X,te,"updated")},ue)},O=(X,K,te,ue,ae,re,ne)=>{for(let le=0;le{if(K!==te){if(K!==Xt)for(const re in K)!Cu(re)&&!(re in te)&&r(X,re,K[re],null,ae,ue);for(const re in te){if(Cu(re))continue;const ne=te[re],le=K[re];ne!==le&&re!=="value"&&r(X,re,le,ne,ae,ue)}"value"in te&&r(X,"value",K.value,te.value,ae)}},M=(X,K,te,ue,ae,re,ne,le,he)=>{const pe=K.el=X?X.el:s(""),ge=K.anchor=X?X.anchor:s("");let{patchFlag:be,dynamicChildren:$e,slotScopeIds:fe}=K;fe&&(le=le?le.concat(fe):fe),X==null?(i(pe,te,ue),i(ge,te,ue),_(K.children||[],te,ge,ae,re,ne,le,he)):be>0&&be&64&&$e&&X.dynamicChildren&&X.dynamicChildren.length===$e.length?(O(X.dynamicChildren,$e,te,ae,re,ne,le),(K.key!=null||ae&&K===ae.subTree)&&Rw(X,K,!0)):F(X,K,te,ge,ae,re,ne,le,he)},I=(X,K,te,ue,ae,re,ne,le,he)=>{K.slotScopeIds=le,X==null?K.shapeFlag&512?ae.ctx.activate(K,te,ue,ne,he):k(K,te,ue,ae,re,ne,he):E(X,K,he)},k=(X,K,te,ue,ae,re,ne)=>{const le=X.component=Oz(X,ue,ae);if(qg(X)&&(le.ctx.renderer=G),Ez(le,!1,ne),le.asyncDep){if(ae&&ae.registerDep(le,R,ne),!X.el){const he=le.subTree=C(Dn);v(null,he,K,te),X.placeholder=he.el}}else R(le,X,K,te,ae,re,ne)},E=(X,K,te)=>{const ue=K.component=X.component;if(cz(X,K,te))if(ue.asyncDep&&!ue.asyncResolved){D(ue,K,te);return}else ue.next=K,ue.update();else K.el=X.el,ue.vnode=K},R=(X,K,te,ue,ae,re,ne)=>{const le=()=>{if(X.isMounted){let{next:be,bu:$e,u:fe,parent:de,vnode:xe}=X;{const Ae=uk(X);if(Ae){be&&(be.el=xe.el,D(X,be,ne)),Ae.asyncDep.then(()=>{ci(()=>{X.isUnmounted||pe()},ae)});return}}let _e=be,Oe;Wa(X,!1),be?(be.el=xe.el,D(X,be,ne)):be=xe,$e&&Fv($e),(Oe=be.props&&be.props.onVnodeBeforeUpdate)&&Vo(Oe,de,be,xe),Wa(X,!0);const Re=V$(X),Se=X.subTree;X.subTree=Re,g(Se,Re,d(Se.el),Y(Se),X,ae,re),be.el=Re.el,_e===null&&uz(X,Re.el),fe&&ci(fe,ae),(Oe=be.props&&be.props.onVnodeUpdated)&&ci(()=>Vo(Oe,de,be,xe),ae)}else{let be;const{el:$e,props:fe}=K,{bm:de,m:xe,parent:_e,root:Oe,type:Re}=X,Se=Wl(K);Wa(X,!1),de&&Fv(de),!Se&&(be=fe&&fe.onVnodeBeforeMount)&&Vo(be,_e,K),Wa(X,!0);{Oe.ce&&Oe.ce._hasShadowRoot()&&Oe.ce._injectChildStyle(Re,X.parent?X.parent.type:void 0);const Ae=X.subTree=V$(X);g(null,Ae,te,ue,X,ae,re),K.el=Ae.el}if(xe&&ci(xe,ae),!Se&&(be=fe&&fe.onVnodeMounted)){const Ae=K;ci(()=>Vo(be,_e,Ae),ae)}(K.shapeFlag&256||_e&&Wl(_e.vnode)&&_e.vnode.shapeFlag&256)&&X.a&&ci(X.a,ae),X.isMounted=!0,K=te=ue=null}};X.scope.on();const he=X.effect=new hI(le);X.scope.off();const pe=X.update=he.run.bind(he),ge=X.job=he.runIfDirty.bind(he);ge.i=X,ge.id=X.uid,he.scheduler=()=>Pw(ge),Wa(X,!0),pe()},D=(X,K,te)=>{K.component=X;const ue=X.vnode.props;X.vnode=K,X.next=null,fz(X,K.props,ue,te),mz(X,K.children,te),Fr(),k$(X),Nr()},F=(X,K,te,ue,ae,re,ne,le,he=!1)=>{const pe=X&&X.children,ge=X?X.shapeFlag:0,be=K.children,{patchFlag:$e,shapeFlag:fe}=K;if($e>0){if($e&128){B(pe,be,te,ue,ae,re,ne,le,he);return}else if($e&256){N(pe,be,te,ue,ae,re,ne,le,he);return}}fe&8?(ge&16&&q(pe,ae,re),be!==pe&&u(te,be)):ge&16?fe&16?B(pe,be,te,ue,ae,re,ne,le,he):q(pe,ae,re,!0):(ge&8&&u(te,""),fe&16&&_(be,te,ue,ae,re,ne,le,he))},N=(X,K,te,ue,ae,re,ne,le,he)=>{X=X||zl,K=K||zl;const pe=X.length,ge=K.length,be=Math.min(pe,ge);let $e;for($e=0;$ege?q(X,ae,re,!0,!1,be):_(K,te,ue,ae,re,ne,le,he,be)},B=(X,K,te,ue,ae,re,ne,le,he)=>{let pe=0;const ge=K.length;let be=X.length-1,$e=ge-1;for(;pe<=be&&pe<=$e;){const fe=X[pe],de=K[pe]=he?wr(K[pe]):Jo(K[pe]);if(as(fe,de))g(fe,de,te,null,ae,re,ne,le,he);else break;pe++}for(;pe<=be&&pe<=$e;){const fe=X[be],de=K[$e]=he?wr(K[$e]):Jo(K[$e]);if(as(fe,de))g(fe,de,te,null,ae,re,ne,le,he);else break;be--,$e--}if(pe>be){if(pe<=$e){const fe=$e+1,de=fe$e)for(;pe<=be;)W(X[pe],ae,re,!0),pe++;else{const fe=pe,de=pe,xe=new Map;for(pe=de;pe<=$e;pe++){const Le=K[pe]=he?wr(K[pe]):Jo(K[pe]);Le.key!=null&&xe.set(Le.key,pe)}let _e,Oe=0;const Re=$e-de+1;let Se=!1,Ae=0;const Pe=new Array(Re);for(pe=0;pe=Re){W(Le,ae,re,!0);continue}let De;if(Le.key!=null)De=xe.get(Le.key);else for(_e=de;_e<=$e;_e++)if(Pe[_e-de]===0&&as(Le,K[_e])){De=_e;break}De===void 0?W(Le,ae,re,!0):(Pe[De-de]=pe+1,De>=Ae?Ae=De:Se=!0,g(Le,K[De],te,null,ae,re,ne,le,he),Oe++)}const ke=Se?xz(Pe):zl;for(_e=ke.length-1,pe=Re-1;pe>=0;pe--){const Le=de+pe,De=K[Le],je=K[Le+1],ft=Le+1{const{el:re,type:ne,transition:le,children:he,shapeFlag:pe}=X;if(pe&6){z(X.component.subTree,K,te,ue);return}if(pe&128){X.suspense.move(K,te,ue);return}if(pe&64){ne.move(X,K,te,G);return}if(ne===Qe){i(re,K,te);for(let be=0;bele.enter(re),ae));else{const{leave:be,delayLeave:$e,afterLeave:fe}=le,de=()=>{X.ctx.isUnmounted?o(re):i(re,K,te)},xe=()=>{const _e=re._isLeaving||!!re[ro];re._isLeaving&&re[ro](!0),le.persisted&&!_e?de():be(re,()=>{de(),fe&&fe()})};$e?$e(re,de,xe):xe()}else i(re,K,te)},W=(X,K,te,ue=!1,ae=!1)=>{const{type:re,props:ne,ref:le,children:he,dynamicChildren:pe,shapeFlag:ge,patchFlag:be,dirs:$e,cacheIndex:fe,memo:de}=X;if(be===-2&&(ae=!1),le!=null&&(Fr(),_u(le,null,te,X,!0),Nr()),fe!=null&&(K.renderCache[fe]=void 0),ge&256){K.ctx.deactivate(X);return}const xe=ge&1&&$e,_e=!Wl(X);let Oe;if(_e&&(Oe=ne&&ne.onVnodeBeforeUnmount)&&Vo(Oe,K,X),ge&6)V(X.component,te,ue);else{if(ge&128){X.suspense.unmount(te,ue);return}xe&&Ha(X,null,K,"beforeUnmount"),ge&64?X.type.remove(X,K,te,G,ue):pe&&!pe.hasOnce&&(re!==Qe||be>0&&be&64)?q(pe,K,te,!1,!0):(re===Qe&&be&384||!ae&&ge&16)&&q(he,K,te),ue&&j(X)}const Re=de!=null&&fe==null;(_e&&(Oe=ne&&ne.onVnodeUnmounted)||xe||Re)&&ci(()=>{Oe&&Vo(Oe,K,X),xe&&Ha(X,null,K,"unmounted"),Re&&(X.el=null)},te)},j=X=>{const{type:K,el:te,anchor:ue,transition:ae}=X;if(K===Qe){U(te,ue);return}if(K===Xv){w(X);return}const re=()=>{o(te),ae&&!ae.persisted&&ae.afterLeave&&ae.afterLeave()};if(X.shapeFlag&1&&ae&&!ae.persisted){const{leave:ne,delayLeave:le}=ae,he=()=>ne(te,re);le?le(X.el,re,he):he()}else re()},U=(X,K)=>{let te;for(;X!==K;)te=f(X),o(X),X=te;o(K)},V=(X,K,te)=>{const{bum:ue,scope:ae,job:re,subTree:ne,um:le,m:he,a:pe}=X;G$(he),G$(pe),ue&&Fv(ue),ae.stop(),re&&(re.flags|=8,W(ne,X,K,te)),le&&ci(le,K),ci(()=>{X.isUnmounted=!0},K)},q=(X,K,te,ue=!1,ae=!1,re=0)=>{for(let ne=re;ne{if(X.shapeFlag&6)return Y(X.component.subTree);if(X.shapeFlag&128)return X.suspense.next();const K=f(X.anchor||X.el),te=K&&K[BI];return te?f(te):K};let J=!1;const Q=(X,K,te)=>{let ue;X==null?K._vnode&&(W(K._vnode,null,null,!0),ue=K._vnode.component):g(K._vnode||null,X,K,null,null,null,te),K._vnode=X,J||(J=!0,k$(ue),DI(),J=!1)},G={p:g,um:W,m:z,r:j,mt:k,mc:_,pc:F,pbc:O,n:Y,o:t};return{render:Q,hydrate:void 0,createApp:iz(Q)}}function Vv({type:t,props:e},n){return n==="svg"&&t==="foreignObject"||n==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:n}function Wa({effect:t,job:e},n){n?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function yz(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function Rw(t,e,n=!1){const i=t.children,o=e.children;if(bt(i)&&bt(o))for(let r=0;r>1,t[n[s]]0&&(e[i]=n[r-1]),n[r]=i)}}for(r=n.length,a=n[r-1];r-- >0;)n[r]=a,a=e[a];return n}function uk(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:uk(e)}function G$(t){if(t)for(let e=0;et.__isSuspense;function wz(t,e){e&&e.pendingBranch?bt(t)?e.effects.push(...t):e.effects.push(t):IB(t)}const Qe=Symbol.for("v-fgt"),Ma=Symbol.for("v-txt"),Dn=Symbol.for("v-cmt"),Xv=Symbol.for("v-stc"),Dr=[];let Hi=null;function id(t=!1){Dr.push(Hi=t?null:[])}function Lw(){Dr.pop(),Hi=Dr[Dr.length-1]||null}let od=1;function yp(t,e=!1){od+=t,t<0&&Hi&&e&&(Hi.hasOnce=!0)}function hk(t){return t.dynamicChildren=od>0?Hi||zl:null,Lw(),od>0&&Hi&&Hi.push(t),t}function Sz(t,e,n,i,o,r){return hk(Fw(t,e,n,i,o,r,!0))}function xp(t,e,n,i,o){return hk(C(t,e,n,i,o,!0))}function ln(t){return t?t.__v_isVNode===!0:!1}function as(t,e){return t.type===e.type&&t.key===e.key}const pk=({key:t})=>t??null,mh=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?Qt(t)||en(t)||St(t)?{i:Bn,r:t,k:e,f:!!n}:t:null);function Fw(t,e=null,n=null,i=0,o=null,r=t===Qe?0:1,a=!1,s=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&pk(e),ref:e&&mh(e),scopeId:LI,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:i,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Bn};return s?(wp(l,n),r&128&&t.normalize(l)):n&&(l.shapeFlag|=Qt(n)?8:16),od>0&&!a&&Hi&&(l.patchFlag>0||r&6)&&l.patchFlag!==32&&Hi.push(l),l}const C=Cz;function Cz(t,e=null,n=null,i=0,o=null,r=!1){if((!t||t===UI)&&(t=Dn),ln(t)){const s=On(t,e,!0);return n&&wp(s,n),od>0&&!r&&Hi&&(s.shapeFlag&6?Hi[Hi.indexOf(t)]=s:Hi.push(s)),s.patchFlag=-2,s}if(Dz(t)&&(t=t.__vccOpts),e){e=$z(e);let{class:s,style:l}=e;s&&!Qt(s)&&(e.class=zd(s)),Bt(l)&&(Gg(l)&&!bt(l)&&(l=mn({},l)),e.style=bw(l))}const a=Qt(t)?1:fk(t)?128:Ug(t)?64:Bt(t)?4:St(t)?2:0;return Fw(t,e,n,i,o,a,r,!0)}function $z(t){return t?Gg(t)||ok(t)?mn({},t):t:null}function On(t,e,n=!1,i=!1){const{props:o,ref:r,patchFlag:a,children:s,transition:l}=t,c=e?_z(o||{},e):o,u={__v_isVNode:!0,__v_skip:!0,type:t.type,props:c,key:c&&pk(c),ref:e&&e.ref?n&&r?bt(r)?r.concat(mh(e)):[r,mh(e)]:mh(e):r,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:s,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==Qe?a===-1?16:a|16:a,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:l,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&On(t.ssContent),ssFallback:t.ssFallback&&On(t.ssFallback),placeholder:t.placeholder,el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&i&&Es(u,l.clone(u)),u}function Qn(t=" ",e=0){return C(Ma,null,t,e)}function Az(t="",e=!1){return e?(id(),xp(Dn,null,t)):C(Dn,null,t)}function Jo(t){return t==null||typeof t=="boolean"?C(Dn):bt(t)?C(Qe,null,t.slice()):ln(t)?wr(t):C(Ma,null,String(t))}function wr(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:On(t)}function wp(t,e){let n=0;const{shapeFlag:i}=t;if(e==null)e=null;else if(bt(e))n=16;else if(typeof e=="object")if(i&65){const o=e.default;o&&(o._c&&(o._d=!1),wp(t,o()),o._c&&(o._d=!0));return}else{n=32;const o=e._;!o&&!ok(e)?e._ctx=Bn:o===3&&Bn&&(Bn.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else if(St(e)){if(i&65){wp(t,{default:e});return}e={default:e,_ctx:Bn},n=32}else e=String(e),i&64?(n=16,e=[Qn(e)]):n=8;t.children=e,t.shapeFlag|=n}function _z(...t){const e={};for(let n=0;nJn||Bn;let Sp,rd;{const t=Vg(),e=(n,i)=>{let o;return(o=t[n])||(o=t[n]=[]),o.push(i),r=>{o.length>1?o.forEach(a=>a(r)):o[0](r)}};Sp=e("__VUE_INSTANCE_SETTERS__",n=>Jn=n),rd=e("__VUE_SSR_SETTERS__",n=>ad=n)}const jd=t=>{const e=Jn;return Sp(t),t.scope.on(),()=>{t.scope.off(),Sp(e)}},K$=()=>{Jn&&Jn.scope.off(),Sp(null)};function gk(t){return t.vnode.shapeFlag&4}let ad=!1;function Ez(t,e=!1,n=!1){e&&rd(e);const{props:i,children:o}=t.vnode,r=gk(t);dz(t,i,r,e),gz(t,o,n||e);const a=r?Mz(t,e):void 0;return e&&rd(!1),a}function Mz(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,KB);const{setup:i}=n;if(i){Fr();const o=t.setupContext=i.length>1?vk(t):null,r=jd(t),a=Hd(i,t,0,[t.props,o]),s=iI(a);if(Nr(),r(),(s||t.sp)&&!Wl(t)&&XI(t),s){if(a.then(K$,K$),e)return a.then(l=>{rd(!0);try{U$(t,l,e)}finally{rd(!1)}}).catch(l=>{Kg(l,t,0)});t.asyncDep=a}else U$(t,a)}else mk(t)}function U$(t,e,n){St(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:Bt(e)&&(t.setupState=EI(e)),mk(t)}function mk(t,e,n){const i=t.type;t.render||(t.render=i.render||nr);{const o=jd(t);Fr();try{ZB(t)}finally{Nr(),o()}}}const Iz={get(t,e){return qn(t,"get",""),t[e]}};function vk(t){const e=n=>{t.exposed=n||{}};return{attrs:new Proxy(t.attrs,Iz),slots:t.slots,emit:t.emit,expose:e}}function tm(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(EI(_w(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in Pu)return Pu[n](t)},has(e,n){return n in e||n in Pu}})):t.proxy}function kz(t,e=!0){return St(t)?t.displayName||t.name:t.name||e&&t.__name}function Dz(t){return St(t)&&"__vccOpts"in t}const L=(t,e)=>PB(t,e,ad);function ar(t,e,n){try{yp(-1);const i=arguments.length;return i===2?Bt(e)&&!bt(e)?ln(e)?C(t,null,[e]):C(t,e):C(t,null,e):(i>3?n=Array.prototype.slice.call(arguments,2):i===3&&ln(n)&&(n=[n]),C(t,e,n))}finally{yp(1)}}const Rz="3.5.42";/** * @vue/runtime-dom v3.5.42 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let q0;const q$=typeof window<"u"&&window.trustedTypes;if(q$)try{q0=q$.createPolicy("vue",{createHTML:t=>t})}catch{}const bk=q0?t=>q0.createHTML(t):t=>t,Lz="http://www.w3.org/2000/svg",Fz="http://www.w3.org/1998/Math/MathML",br=typeof document<"u"?document:null,Z$=br&&br.createElement("template"),Nz={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,i)=>{const o=e==="svg"?br.createElementNS(Lz,t):e==="mathml"?br.createElementNS(Fz,t):n?br.createElement(t,{is:n}):br.createElement(t);return t==="select"&&i&&i.multiple!=null&&o.setAttribute("multiple",i.multiple),o},createText:t=>br.createTextNode(t),createComment:t=>br.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>br.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,i,o,r){const a=n?n.previousSibling:e.lastChild;if(o&&(o===r||o.nextSibling))for(;e.insertBefore(o.cloneNode(!0),n),!(o===r||!(o=o.nextSibling)););else{Z$.innerHTML=bk(i==="svg"?`${t}`:i==="mathml"?`${t}`:t);const s=Z$.content;if(i==="svg"||i==="mathml"){const l=s.firstChild;for(;l.firstChild;)s.appendChild(l.firstChild);s.removeChild(l)}e.insertBefore(s,n)}return[a?a.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}},Qr="transition",Yc="animation",rc=Symbol("_vtc"),yk={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},xk=mn({},HI,yk),Bz=t=>(t.displayName="Transition",t.props=xk,t),En=Bz((t,{slots:e})=>ar(HB,wk(t),e)),ja=(t,e=[])=>{bt(t)?t.forEach(n=>n(...e)):t&&t(...e)},J$=t=>t?bt(t)?t.some(e=>e.length>1):t.length>1:!1;function wk(t){const e={};for(const M in t)M in yk||(e[M]=t[M]);if(t.css===!1)return e;const{name:n="v",type:i,duration:o,enterFromClass:r=`${n}-enter-from`,enterActiveClass:a=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:l=r,appearActiveClass:c=a,appearToClass:u=s,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=t,p=zz(o),g=p&&p[0],m=p&&p[1],{onBeforeEnter:v,onEnter:b,onEnterCancelled:y,onLeave:w,onLeaveCancelled:x,onBeforeAppear:$=v,onAppear:S=b,onAppearCancelled:_=y}=e,P=(M,I,k,E)=>{M._enterCancelled=E,ra(M,I?u:s),ra(M,I?c:a),k&&k()},O=(M,I)=>{M._isLeaving=!1,ra(M,d),ra(M,h),ra(M,f),I&&I()},T=M=>(I,k)=>{const E=M?S:b,R=()=>P(I,M,k);ja(E,[I,R]),Q$(()=>{ra(I,M?l:r),Xo(I,M?u:s),J$(E)||eA(I,i,g,R)})};return mn(e,{onBeforeEnter(M){ja(v,[M]),Xo(M,r),Xo(M,a)},onBeforeAppear(M){ja($,[M]),Xo(M,l),Xo(M,c)},onEnter:T(!1),onAppear:T(!0),onLeave(M,I){M._isLeaving=!0;const k=()=>O(M,I);Xo(M,d),M._enterCancelled?(Xo(M,f),Z0(M)):(Z0(M),Xo(M,f)),Q$(()=>{M._isLeaving&&(ra(M,d),Xo(M,h),J$(w)||eA(M,i,m,k))}),ja(w,[M,k])},onEnterCancelled(M){P(M,!1,void 0,!0),ja(y,[M])},onAppearCancelled(M){P(M,!0,void 0,!0),ja(_,[M])},onLeaveCancelled(M){O(M),ja(x,[M])}})}function zz(t){if(t==null)return null;if(Bt(t))return[Yv(t.enter),Yv(t.leave)];{const e=Yv(t);return[e,e]}}function Yv(t){return U8(t)}function Xo(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t[rc]||(t[rc]=new Set)).add(e)}function ra(t,e){e.split(/\s+/).forEach(i=>i&&t.classList.remove(i));const n=t[rc];n&&(n.delete(e),n.size||(t[rc]=void 0))}function Q$(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let Hz=0;function eA(t,e,n,i){const o=t._endId=++Hz,r=()=>{o===t._endId&&i()};if(n!=null)return setTimeout(r,n);const{type:a,timeout:s,propCount:l}=Sk(t,e);if(!a)return i();const c=a+"end";let u=0;const d=()=>{t.removeEventListener(c,f),r()},f=h=>{h.target===t&&++u>=l&&d()};setTimeout(()=>{u(n[p]||"").split(", "),o=i(`${Qr}Delay`),r=i(`${Qr}Duration`),a=tA(o,r),s=i(`${Yc}Delay`),l=i(`${Yc}Duration`),c=tA(s,l);let u=null,d=0,f=0;e===Qr?a>0&&(u=Qr,d=a,f=r.length):e===Yc?c>0&&(u=Yc,d=c,f=l.length):(d=Math.max(a,c),u=d>0?a>c?Qr:Yc:null,f=u?u===Qr?r.length:l.length:0);const h=u===Qr&&/\b(?:transform|all)(?:,|$)/.test(i(`${Qr}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:h}}function tA(t,e){for(;t.lengthnA(n)+nA(t[i])))}function nA(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function Z0(t){return(t?t.ownerDocument:document).body.offsetHeight}function Wz(t,e,n){const i=t[rc];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}const Sp=Symbol("_vod"),Nw=Symbol("_vsh"),vi={name:"show",beforeMount(t,{value:e},{transition:n}){t[Sp]=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):Gc(t,e)},mounted(t,{value:e},{transition:n}){n&&e&&n.enter(t)},updated(t,{value:e,oldValue:n},{transition:i}){!e!=!n&&(i?e?(i.beforeEnter(t),Gc(t,!0),i.enter(t)):i.leave(t,()=>{Gc(t,!1)}):Gc(t,e))},beforeUnmount(t,{value:e}){Gc(t,e)}};function Gc(t,e){t.style.display=e?t[Sp]:"none",t[Nw]=!e}const jz=Symbol(""),Vz=/(?:^|;)\s*display\s*:/;function Xz(t,e,n){const i=t.style,o=Qt(n);let r=!1;if(n&&!o){if(e)if(Qt(e))for(const a of e.split(";")){const s=a.slice(0,a.indexOf(":")).trim();n[s]==null&&fu(i,s,"")}else for(const a in e)n[a]==null&&fu(i,a,"");for(const a in n){a==="display"&&(r=!0);const s=n[a];s!=null?Gz(t,a,!Qt(e)&&e?e[a]:void 0,s)||fu(i,a,s):fu(i,a,"")}}else if(o){if(e!==n){const a=i[jz];a&&(n+=";"+a),i.cssText=n,r=Vz.test(n)}}else e&&t.removeAttribute("style");Sp in t&&(t[Sp]=r?i.display:"",t[Nw]&&(i.display="none"))}const Cf=/\s*!important$/;function fu(t,e,n){if(bt(n))n.forEach(i=>fu(t,e,i));else if(n==null&&(n=""),e.startsWith("--"))Cf.test(n)?t.setProperty(e,n.replace(Cf,""),"important"):t.setProperty(e,n);else{const i=Yz(t,e);Cf.test(n)?t.setProperty(Ks(i),n.replace(Cf,""),"important"):t[i]=n}}const iA=["Webkit","Moz","ms"],Gv={};function Yz(t,e){const n=Gv[e];if(n)return n;let i=mi(e);if(i!=="filter"&&i in t)return Gv[e]=i;i=Wg(i);for(let o=0;oKv||(eH.then(()=>Kv=0),Kv=Date.now());function nH(t,e){const n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;const o=n.value;if(bt(o)){const r=i.stopImmediatePropagation;i.stopImmediatePropagation=()=>{r.call(i),i._stopped=!0};const a=o.slice(),s=[i];for(let l=0;lt.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,iH=(t,e,n,i,o,r)=>{const a=o==="svg";e==="class"?Wz(t,i,a):e==="style"?Xz(t,n,i):Ng(e)?Bg(e)||qz(t,e,n,i,r):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):oH(t,e,i,a))?(aA(t,e,i),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&rA(t,e,i,a,r,e!=="value")):t._isVueCE&&(rH(t,e)||t._def.__asyncLoader&&(/[A-Z]/.test(e)||!Qt(i)))?aA(t,mi(e),i,r,e):(e==="true-value"?t._trueValue=i:e==="false-value"&&(t._falseValue=i),rA(t,e,i,a))};function oH(t,e,n,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in t&&lA(e)&&St(n));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="autocorrect"||e==="sandbox"&&t.tagName==="IFRAME"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const o=t.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return lA(e)&&Qt(n)?!1:e in t}function rH(t,e){const n=t._def.props;if(!n)return!1;const i=mi(e);return Array.isArray(n)?n.some(o=>mi(o)===i):Object.keys(n).some(o=>mi(o)===i)}const Ck=new WeakMap,$k=new WeakMap,Cp=Symbol("_moveCb"),cA=Symbol("_enterCb"),aH=t=>(delete t.props.mode,t),sH=aH({name:"TransitionGroup",props:mn({},xk,{tag:String,moveClass:String}),setup(t,{slots:e}){const n=Cn(),i=zI();let o,r;return ri(()=>{if(!o.length)return;const a=t.moveClass||`${t.name||"v"}-move`;if(!dH(o[0].el,n.vnode.el,a)){o=[];return}o.forEach(lH),o.forEach(cH);const s=o.filter(uH);Z0(n.vnode.el),s.forEach(l=>{const c=l.el,u=c.style;Xo(c,a),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[Cp]=f=>{f&&f.target!==c||(!f||f.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",d),c[Cp]=null,ra(c,a))};c.addEventListener("transitionend",d)}),o=[]}),()=>{const a=dt(t),s=wk(a);let l=a.tag||Qe;if(o=[],r)for(let c=0;c{s.split(/\s+/).forEach(l=>l&&i.classList.remove(l))}),n.split(/\s+/).forEach(s=>s&&i.classList.add(s)),i.style.display="none";const r=e.nodeType===1?e:e.parentNode;r.appendChild(i);const{hasTransform:a}=Sk(i);return r.removeChild(i),a}const fH=["ctrl","shift","alt","meta"],hH={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>fH.some(n=>t[`${n}Key`]&&!e.includes(n))},uA=(t,e)=>{if(!t)return t;const n=t._withMods||(t._withMods={}),i=e.join(".");return n[i]||(n[i]=(o,...r)=>{for(let a=0;a{_k().render(...t)},Pk=(...t)=>{const e=_k().createApp(...t),{mount:n}=e;return e.mount=i=>{const o=mH(i);if(!o)return;const r=e._component;!St(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const a=n(o,!1,gH(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),a},e};function gH(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function mH(t){return Qt(t)?document.querySelector(t):t}/*! +**/let q0;const q$=typeof window<"u"&&window.trustedTypes;if(q$)try{q0=q$.createPolicy("vue",{createHTML:t=>t})}catch{}const bk=q0?t=>q0.createHTML(t):t=>t,Lz="http://www.w3.org/2000/svg",Fz="http://www.w3.org/1998/Math/MathML",br=typeof document<"u"?document:null,Z$=br&&br.createElement("template"),Nz={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,i)=>{const o=e==="svg"?br.createElementNS(Lz,t):e==="mathml"?br.createElementNS(Fz,t):n?br.createElement(t,{is:n}):br.createElement(t);return t==="select"&&i&&i.multiple!=null&&o.setAttribute("multiple",i.multiple),o},createText:t=>br.createTextNode(t),createComment:t=>br.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>br.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,i,o,r){const a=n?n.previousSibling:e.lastChild;if(o&&(o===r||o.nextSibling))for(;e.insertBefore(o.cloneNode(!0),n),!(o===r||!(o=o.nextSibling)););else{Z$.innerHTML=bk(i==="svg"?`${t}`:i==="mathml"?`${t}`:t);const s=Z$.content;if(i==="svg"||i==="mathml"){const l=s.firstChild;for(;l.firstChild;)s.appendChild(l.firstChild);s.removeChild(l)}e.insertBefore(s,n)}return[a?a.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}},Qr="transition",Gc="animation",rc=Symbol("_vtc"),yk={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},xk=mn({},HI,yk),Bz=t=>(t.displayName="Transition",t.props=xk,t),En=Bz((t,{slots:e})=>ar(HB,wk(t),e)),ja=(t,e=[])=>{bt(t)?t.forEach(n=>n(...e)):t&&t(...e)},J$=t=>t?bt(t)?t.some(e=>e.length>1):t.length>1:!1;function wk(t){const e={};for(const M in t)M in yk||(e[M]=t[M]);if(t.css===!1)return e;const{name:n="v",type:i,duration:o,enterFromClass:r=`${n}-enter-from`,enterActiveClass:a=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:l=r,appearActiveClass:c=a,appearToClass:u=s,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=t,p=zz(o),g=p&&p[0],m=p&&p[1],{onBeforeEnter:v,onEnter:b,onEnterCancelled:y,onLeave:w,onLeaveCancelled:x,onBeforeAppear:$=v,onAppear:S=b,onAppearCancelled:_=y}=e,P=(M,I,k,E)=>{M._enterCancelled=E,ra(M,I?u:s),ra(M,I?c:a),k&&k()},O=(M,I)=>{M._isLeaving=!1,ra(M,d),ra(M,h),ra(M,f),I&&I()},T=M=>(I,k)=>{const E=M?S:b,R=()=>P(I,M,k);ja(E,[I,R]),Q$(()=>{ra(I,M?l:r),Xo(I,M?u:s),J$(E)||eA(I,i,g,R)})};return mn(e,{onBeforeEnter(M){ja(v,[M]),Xo(M,r),Xo(M,a)},onBeforeAppear(M){ja($,[M]),Xo(M,l),Xo(M,c)},onEnter:T(!1),onAppear:T(!0),onLeave(M,I){M._isLeaving=!0;const k=()=>O(M,I);Xo(M,d),M._enterCancelled?(Xo(M,f),Z0(M)):(Z0(M),Xo(M,f)),Q$(()=>{M._isLeaving&&(ra(M,d),Xo(M,h),J$(w)||eA(M,i,m,k))}),ja(w,[M,k])},onEnterCancelled(M){P(M,!1,void 0,!0),ja(y,[M])},onAppearCancelled(M){P(M,!0,void 0,!0),ja(_,[M])},onLeaveCancelled(M){O(M),ja(x,[M])}})}function zz(t){if(t==null)return null;if(Bt(t))return[Yv(t.enter),Yv(t.leave)];{const e=Yv(t);return[e,e]}}function Yv(t){return U8(t)}function Xo(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t[rc]||(t[rc]=new Set)).add(e)}function ra(t,e){e.split(/\s+/).forEach(i=>i&&t.classList.remove(i));const n=t[rc];n&&(n.delete(e),n.size||(t[rc]=void 0))}function Q$(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let Hz=0;function eA(t,e,n,i){const o=t._endId=++Hz,r=()=>{o===t._endId&&i()};if(n!=null)return setTimeout(r,n);const{type:a,timeout:s,propCount:l}=Sk(t,e);if(!a)return i();const c=a+"end";let u=0;const d=()=>{t.removeEventListener(c,f),r()},f=h=>{h.target===t&&++u>=l&&d()};setTimeout(()=>{u(n[p]||"").split(", "),o=i(`${Qr}Delay`),r=i(`${Qr}Duration`),a=tA(o,r),s=i(`${Gc}Delay`),l=i(`${Gc}Duration`),c=tA(s,l);let u=null,d=0,f=0;e===Qr?a>0&&(u=Qr,d=a,f=r.length):e===Gc?c>0&&(u=Gc,d=c,f=l.length):(d=Math.max(a,c),u=d>0?a>c?Qr:Gc:null,f=u?u===Qr?r.length:l.length:0);const h=u===Qr&&/\b(?:transform|all)(?:,|$)/.test(i(`${Qr}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:h}}function tA(t,e){for(;t.lengthnA(n)+nA(t[i])))}function nA(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function Z0(t){return(t?t.ownerDocument:document).body.offsetHeight}function Wz(t,e,n){const i=t[rc];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}const Cp=Symbol("_vod"),Nw=Symbol("_vsh"),vi={name:"show",beforeMount(t,{value:e},{transition:n}){t[Cp]=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):Kc(t,e)},mounted(t,{value:e},{transition:n}){n&&e&&n.enter(t)},updated(t,{value:e,oldValue:n},{transition:i}){!e!=!n&&(i?e?(i.beforeEnter(t),Kc(t,!0),i.enter(t)):i.leave(t,()=>{Kc(t,!1)}):Kc(t,e))},beforeUnmount(t,{value:e}){Kc(t,e)}};function Kc(t,e){t.style.display=e?t[Cp]:"none",t[Nw]=!e}const jz=Symbol(""),Vz=/(?:^|;)\s*display\s*:/;function Xz(t,e,n){const i=t.style,o=Qt(n);let r=!1;if(n&&!o){if(e)if(Qt(e))for(const a of e.split(";")){const s=a.slice(0,a.indexOf(":")).trim();n[s]==null&&hu(i,s,"")}else for(const a in e)n[a]==null&&hu(i,a,"");for(const a in n){a==="display"&&(r=!0);const s=n[a];s!=null?Gz(t,a,!Qt(e)&&e?e[a]:void 0,s)||hu(i,a,s):hu(i,a,"")}}else if(o){if(e!==n){const a=i[jz];a&&(n+=";"+a),i.cssText=n,r=Vz.test(n)}}else e&&t.removeAttribute("style");Cp in t&&(t[Cp]=r?i.display:"",t[Nw]&&(i.display="none"))}const $f=/\s*!important$/;function hu(t,e,n){if(bt(n))n.forEach(i=>hu(t,e,i));else if(n==null&&(n=""),e.startsWith("--"))$f.test(n)?t.setProperty(e,n.replace($f,""),"important"):t.setProperty(e,n);else{const i=Yz(t,e);$f.test(n)?t.setProperty(Ks(i),n.replace($f,""),"important"):t[i]=n}}const iA=["Webkit","Moz","ms"],Gv={};function Yz(t,e){const n=Gv[e];if(n)return n;let i=mi(e);if(i!=="filter"&&i in t)return Gv[e]=i;i=jg(i);for(let o=0;oKv||(eH.then(()=>Kv=0),Kv=Date.now());function nH(t,e){const n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;const o=n.value;if(bt(o)){const r=i.stopImmediatePropagation;i.stopImmediatePropagation=()=>{r.call(i),i._stopped=!0};const a=o.slice(),s=[i];for(let l=0;lt.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,iH=(t,e,n,i,o,r)=>{const a=o==="svg";e==="class"?Wz(t,i,a):e==="style"?Xz(t,n,i):Bg(e)?zg(e)||qz(t,e,n,i,r):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):oH(t,e,i,a))?(aA(t,e,i),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&rA(t,e,i,a,r,e!=="value")):t._isVueCE&&(rH(t,e)||t._def.__asyncLoader&&(/[A-Z]/.test(e)||!Qt(i)))?aA(t,mi(e),i,r,e):(e==="true-value"?t._trueValue=i:e==="false-value"&&(t._falseValue=i),rA(t,e,i,a))};function oH(t,e,n,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in t&&lA(e)&&St(n));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="autocorrect"||e==="sandbox"&&t.tagName==="IFRAME"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const o=t.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return lA(e)&&Qt(n)?!1:e in t}function rH(t,e){const n=t._def.props;if(!n)return!1;const i=mi(e);return Array.isArray(n)?n.some(o=>mi(o)===i):Object.keys(n).some(o=>mi(o)===i)}const Ck=new WeakMap,$k=new WeakMap,$p=Symbol("_moveCb"),cA=Symbol("_enterCb"),aH=t=>(delete t.props.mode,t),sH=aH({name:"TransitionGroup",props:mn({},xk,{tag:String,moveClass:String}),setup(t,{slots:e}){const n=Cn(),i=zI();let o,r;return ri(()=>{if(!o.length)return;const a=t.moveClass||`${t.name||"v"}-move`;if(!dH(o[0].el,n.vnode.el,a)){o=[];return}o.forEach(lH),o.forEach(cH);const s=o.filter(uH);Z0(n.vnode.el),s.forEach(l=>{const c=l.el,u=c.style;Xo(c,a),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[$p]=f=>{f&&f.target!==c||(!f||f.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",d),c[$p]=null,ra(c,a))};c.addEventListener("transitionend",d)}),o=[]}),()=>{const a=dt(t),s=wk(a);let l=a.tag||Qe;if(o=[],r)for(let c=0;c{s.split(/\s+/).forEach(l=>l&&i.classList.remove(l))}),n.split(/\s+/).forEach(s=>s&&i.classList.add(s)),i.style.display="none";const r=e.nodeType===1?e:e.parentNode;r.appendChild(i);const{hasTransform:a}=Sk(i);return r.removeChild(i),a}const fH=["ctrl","shift","alt","meta"],hH={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>fH.some(n=>t[`${n}Key`]&&!e.includes(n))},uA=(t,e)=>{if(!t)return t;const n=t._withMods||(t._withMods={}),i=e.join(".");return n[i]||(n[i]=(o,...r)=>{for(let a=0;a{_k().render(...t)},Pk=(...t)=>{const e=_k().createApp(...t),{mount:n}=e;return e.mount=i=>{const o=mH(i);if(!o)return;const r=e._component;!St(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const a=n(o,!1,gH(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),a},e};function gH(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function mH(t){return Qt(t)?document.querySelector(t):t}/*! * pinia v2.3.1 * (c) 2025 Eduardo San Martin Morote * @license MIT - */let Tk;const nm=t=>Tk=t,Ok=Symbol();function J0(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var Pu;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(Pu||(Pu={}));function vH(){const t=dI(!0),e=t.run(()=>se({}));let n=[],i=[];const o=_w({install(r){nm(o),o._a=r,r.provide(Ok,o),r.config.globalProperties.$pinia=o,i.forEach(a=>n.push(a)),i=[]},use(r){return this._a?n.push(r):i.push(r),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return o}const Ek=()=>{};function fA(t,e,n,i=Ek){t.push(e);const o=()=>{const r=t.indexOf(e);r>-1&&(t.splice(r,1),i())};return!n&&yw()&&fI(o),o}function ul(t,...e){t.slice().forEach(n=>{n(...e)})}const bH=t=>t(),hA=Symbol(),Uv=Symbol();function Q0(t,e){t instanceof Map&&e instanceof Map?e.forEach((n,i)=>t.set(i,n)):t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const n in e){if(!e.hasOwnProperty(n))continue;const i=e[n],o=t[n];J0(o)&&J0(i)&&t.hasOwnProperty(n)&&!en(i)&&!kr(i)?t[n]=Q0(o,i):t[n]=i}return t}const yH=Symbol();function xH(t){return!J0(t)||!t.hasOwnProperty(yH)}const{assign:aa}=Object;function wH(t){return!!(en(t)&&t.effect)}function SH(t,e,n,i){const{state:o,actions:r,getters:a}=e,s=n.state.value[t];let l;function c(){s||(n.state.value[t]=o?o():{});const u=uo(n.state.value[t]);return aa(u,r,Object.keys(a||{}).reduce((d,f)=>(d[f]=_w(L(()=>{nm(n);const h=n._s.get(t);return a[f].call(h,h)})),d),{}))}return l=Mk(t,c,e,n,i,!0),l}function Mk(t,e,n={},i,o,r){let a;const s=aa({actions:{}},n),l={deep:!0};let c,u,d=[],f=[],h;const p=i.state.value[t];!r&&!p&&(i.state.value[t]={});let g;function m(_){let P;c=u=!1,typeof _=="function"?(_(i.state.value[t]),P={type:Pu.patchFunction,storeId:t,events:h}):(Q0(i.state.value[t],_),P={type:Pu.patchObject,payload:_,storeId:t,events:h});const O=g=Symbol();pt().then(()=>{g===O&&(c=!0)}),u=!0,ul(d,P,i.state.value[t])}const v=r?function(){const{state:P}=n,O=P?P():{};this.$patch(T=>{aa(T,O)})}:Ek;function b(){a.stop(),d=[],f=[],i._s.delete(t)}const y=(_,P="")=>{if(hA in _)return _[Uv]=P,_;const O=function(){nm(i);const T=Array.from(arguments),M=[],I=[];function k(D){M.push(D)}function E(D){I.push(D)}ul(f,{args:T,name:O[Uv],store:x,after:k,onError:E});let R;try{R=_.apply(this&&this.$id===t?this:x,T)}catch(D){throw ul(I,D),D}return R instanceof Promise?R.then(D=>(ul(M,D),D)).catch(D=>(ul(I,D),Promise.reject(D))):(ul(M,R),R)};return O[hA]=!0,O[Uv]=P,O},w={_p:i,$id:t,$onAction:fA.bind(null,f),$patch:m,$reset:v,$subscribe(_,P={}){const O=fA(d,_,P.detached,()=>T()),T=a.run(()=>ye(()=>i.state.value[t],M=>{(P.flush==="sync"?u:c)&&_({storeId:t,type:Pu.direct,events:h},M)},aa({},l,P)));return O},$dispose:b},x=$t(w);i._s.set(t,x);const S=(i._a&&i._a.runWithContext||bH)(()=>i._e.run(()=>(a=dI()).run(()=>e({action:y}))));for(const _ in S){const P=S[_];if(en(P)&&!wH(P)||kr(P))r||(p&&xH(P)&&(en(P)?P.value=p[_]:Q0(P,p[_])),i.state.value[t][_]=P);else if(typeof P=="function"){const O=y(P,_);S[_]=O,s.actions[_]=P}}return aa(x,S),aa(dt(x),S),Object.defineProperty(x,"$state",{get:()=>i.state.value[t],set:_=>{m(P=>{aa(P,_)})}}),i._p.forEach(_=>{aa(x,a.run(()=>_({store:x,app:i._a,pinia:i,options:s})))}),p&&r&&n.hydrate&&n.hydrate(x.$state,p),c=!0,u=!0,x}/*! #__NO_SIDE_EFFECTS__ */function Ik(t,e,n){let i,o;const r=typeof e=="function";typeof t=="string"?(i=t,o=r?n:e):(o=t,i=t.id);function a(s,l){const c=kB();return s=s||(c?qe(Ok,null):null),s&&nm(s),s=Tk,s._s.has(i)||(r?Mk(i,e,o,s):SH(i,o,s)),s._s.get(i)}return a.$id=i,a}function ad(t){"@babel/helpers - typeof";return ad=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},ad(t)}function CH(t,e){if(ad(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(ad(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function $H(t){var e=CH(t,"string");return ad(e)=="symbol"?e:e+""}function AH(t,e,n){return(e=$H(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function pA(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,i)}return n}function H(t){for(var e=1;etypeof t=="function",_H=Array.isArray,PH=t=>typeof t=="string",TH=t=>t!==null&&typeof t=="object",OH=/^on[^a-z]/,EH=t=>OH.test(t),Bw=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},MH=/-(\w)/g,wc=Bw(t=>t.replace(MH,(e,n)=>n?n.toUpperCase():"")),IH=/\B([A-Z])/g,kH=Bw(t=>t.replace(IH,"-$1").toLowerCase()),DH=Bw(t=>t.charAt(0).toUpperCase()+t.slice(1)),RH=Object.prototype.hasOwnProperty,gA=(t,e)=>RH.call(t,e);function LH(t,e,n,i){const o=t[n];if(o!=null){const r=gA(o,"default");if(r&&i===void 0){const a=o.default;i=o.type!==Function&&ey(a)?a():a}o.type===Boolean&&(!gA(e,n)&&!r?i=!1:i===""&&(i=!0))}return i}function FH(t){return Object.keys(t).reduce((e,n)=>((n.startsWith("data-")||n.startsWith("aria-"))&&(e[n]=t[n]),e),{})}function ss(t){return typeof t=="number"?`${t}px`:t}function kl(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return typeof t=="function"?t(e):t??n}function NH(t){let e;const n=new Promise(o=>{e=t(()=>{o(!0)})}),i=()=>{e==null||e()};return i.then=(o,r)=>n.then(o,r),i.promise=n,i}function ce(){const t=[];for(let e=0;e0},t.prototype.connect_=function(){!ty||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),VH?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){!ty||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(e){var n=e.propertyName,i=n===void 0?"":n,o=jH.some(function(r){return!!~i.indexOf(r)});o&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),Dk=function(t,e){for(var n=0,i=Object.keys(e);n"u"||!(Element instanceof Object))){if(!(e instanceof ac(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)||(n.set(e,new QH(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof ac(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)&&(n.delete(e),n.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&e.activeObservations_.push(n)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,n=this.activeObservations_.map(function(i){return new e7(i.target,i.broadcastRect())});this.callback_.call(e,n,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),Lk=typeof WeakMap<"u"?new WeakMap:new kk,Fk=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=XH.getInstance(),i=new t7(e,n,this);Lk.set(this,i)}return t}();["observe","unobserve","disconnect"].forEach(function(t){Fk.prototype[t]=function(){var e;return(e=Lk.get(this))[t].apply(e,arguments)}});var zw=function(){return typeof $p.ResizeObserver<"u"?$p.ResizeObserver:Fk}();const ny=t=>t!=null&&t!=="",ct=(t,e)=>{const n=A({},t);return Object.keys(e).forEach(i=>{const o=n[i];if(o)o.type||o.default?o.default=e[i]:o.def?o.def(e[i]):n[i]={type:o,default:e[i]};else throw new Error(`not have ${i} prop`)}),n},Hw=t=>{const e=Object.keys(t),n={},i={},o={};for(let r=0,a=e.length;r0&&arguments[0]!==void 0?arguments[0]:"",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n={},i=/;(?![^(]*\))/g,o=/:(.+)/;return typeof t=="object"?t:(t.split(i).forEach(function(r){if(r){const a=r.split(o);if(a.length>1){const s=e?wc(a[0].trim()):a[0].trim();n[s]=a[1].trim()}}}),n)},Ar=(t,e)=>t[e]!==void 0,Nk=Symbol("skipFlatten"),Dt=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const n=Array.isArray(t)?t:[t],i=[];return n.forEach(o=>{Array.isArray(o)?i.push(...Dt(o,e)):o&&o.type===Qe?o.key===Nk?i.push(o):i.push(...Dt(o.children,e)):o&&ln(o)?e&&!jd(o)?i.push(o):e||i.push(o):ny(o)&&i.push(o)}),i},om=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"default",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(ln(t))return t.type===Qe?e==="default"?Dt(t.children):[]:t.children&&t.children[e]?Dt(t.children[e](n)):[];{const i=t.$slots[e]&&t.$slots[e](n);return Dt(i)}},gi=t=>{var e;let n=((e=t==null?void 0:t.vnode)===null||e===void 0?void 0:e.el)||t&&(t.$el||t);for(;n&&!n.tagName;)n=n.nextSibling;return n},Bk=t=>{const e={};if(t.$&&t.$.vnode){const n=t.$.vnode.props||{};Object.keys(t.$props).forEach(i=>{const o=t.$props[i],r=kH(i);(o!==void 0||r in n)&&(e[i]=o)})}else if(ln(t)&&typeof t.type=="object"){const n=t.props||{},i={};Object.keys(n).forEach(r=>{i[wc(r)]=n[r]});const o=t.type.props||{};Object.keys(o).forEach(r=>{const a=LH(o,i,r,i[r]);(a!==void 0||r in i)&&(e[r]=a)})}return e},zk=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"default",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,o;if(t.$){const r=t[e];if(r!==void 0)return typeof r=="function"&&i?r(n):r;o=t.$slots[e],o=i&&o?o(n):o}else if(ln(t)){const r=t.props&&t.props[e];if(r!==void 0&&t.props!==null)return typeof r=="function"&&i?r(n):r;t.type===Qe?o=t.children:t.children&&t.children[e]&&(o=t.children[e],o=i&&o?o(n):o)}return Array.isArray(o)&&(o=Dt(o),o=o.length===1?o[0]:o,o=o.length===0?void 0:o),o};function vA(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n={};return t.$?n=A(A({},n),t.$attrs):n=A(A({},n),t.props),Hw(n)[e?"onEvents":"events"]}function i7(t){const n=((ln(t)?t.props:t.$attrs)||{}).class||{};let i={};return typeof n=="string"?n.split(" ").forEach(o=>{i[o.trim()]=!0}):Array.isArray(n)?ce(n).split(" ").forEach(o=>{i[o.trim()]=!0}):i=A(A({},i),n),i}function Hk(t,e){let i=((ln(t)?t.props:t.$attrs)||{}).style||{};return typeof i=="string"&&(i=n7(i,e)),i}function o7(t){return t.length===1&&t[0].type===Qe}function r7(t){return t==null||t===""||Array.isArray(t)&&t.length===0}function jd(t){return t&&(t.type===Dn||t.type===Qe&&t.children.length===0||t.type===Ma&&t.children.trim()==="")}function a7(t){return t&&t.type===Ma}function Kt(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const e=[];return t.forEach(n=>{Array.isArray(n)?e.push(...n):(n==null?void 0:n.type)===Qe?e.push(...Kt(n.children)):e.push(n)}),e.filter(n=>!jd(n))}function Kc(t){if(t){const e=Kt(t);return e.length?e:void 0}else return t}function cn(t){return Array.isArray(t)&&t.length===1&&(t=t[0]),t&&t.__v_isVNode&&typeof t.type!="symbol"}function gn(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"default";var i,o;return(i=e[n])!==null&&i!==void 0?i:(o=t[n])===null||o===void 0?void 0:o.call(t)}const mo=oe({compatConfig:{MODE:3},name:"ResizeObserver",props:{disabled:Boolean,onResize:Function},emits:["resize"],setup(t,e){let{slots:n}=e;const i=$t({width:0,height:0,offsetHeight:0,offsetWidth:0});let o=null,r=null;const a=()=>{r&&(r.disconnect(),r=null)},s=u=>{const{onResize:d}=t,f=u[0].target,{width:h,height:p}=f.getBoundingClientRect(),{offsetWidth:g,offsetHeight:m}=f,v=Math.floor(h),b=Math.floor(p);if(i.width!==v||i.height!==b||i.offsetWidth!==g||i.offsetHeight!==m){const y={width:v,height:b,offsetWidth:g,offsetHeight:m};A(i,y),d&&Promise.resolve().then(()=>{d(A(A({},y),{offsetWidth:g,offsetHeight:m}),f)})}},l=Cn(),c=()=>{const{disabled:u}=t;if(u){a();return}const d=gi(l);d!==o&&(a(),o=d),!r&&d&&(r=new zw(s),r.observe(d))};return Ze(()=>{c()}),ri(()=>{c()}),Xn(()=>{a()}),ye(()=>t.disabled,()=>{c()},{flush:"post"}),()=>{var u;return(u=n.default)===null||u===void 0?void 0:u.call(n)[0]}}});let Wk=t=>setTimeout(t,16),jk=t=>clearTimeout(t);typeof window<"u"&&"requestAnimationFrame"in window&&(Wk=t=>window.requestAnimationFrame(t),jk=t=>window.cancelAnimationFrame(t));let bA=0;const Ww=new Map;function Vk(t){Ww.delete(t)}function lt(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;bA+=1;const n=bA;function i(o){if(o===0)Vk(n),t();else{const r=Wk(()=>{i(o-1)});Ww.set(n,r)}}return i(e),n}lt.cancel=t=>{const e=Ww.get(t);return Vk(e),jk(e)};function iy(t){let e;const n=o=>()=>{e=null,t(...o)},i=function(){if(e==null){for(var o=arguments.length,r=new Array(o),a=0;a{lt.cancel(e),e=null},i}const Wn=function(){for(var t=arguments.length,e=new Array(t),n=0;n{const e=t;return e.install=function(n){n.component(e.displayName||e.name,t)},t};function Ms(){return{type:[Function,Array]}}function Fe(t){return{type:Object,default:t}}function Ce(t){return{type:Boolean,default:t}}function ve(t){return{type:Function,default:t}}function Rt(t,e){return{validator:()=>!0,default:t}}function Zn(){return{validator:()=>!0}}function xt(t){return{type:Array,default:t}}function Ne(t){return{type:String,default:t}}function Xe(t,e){return t?{type:t,default:e}:Rt(e)}let pn=!1;try{const t=Object.defineProperty({},"passive",{get(){pn=!0}});window.addEventListener("testPassive",null,t),window.removeEventListener("testPassive",null,t)}catch{}function Gt(t,e,n,i){if(t&&t.addEventListener){let o=i;o===void 0&&pn&&(e==="touchstart"||e==="touchmove"||e==="wheel")&&(o={passive:!1}),t.addEventListener(e,n,o)}return{remove:()=>{t&&t.removeEventListener&&t.removeEventListener(e,n)}}}function $f(t){return t!==window?t.getBoundingClientRect():{top:0,bottom:window.innerHeight}}function yA(t,e,n){if(n!==void 0&&e.top>t.top-n)return`${n+e.top}px`}function xA(t,e,n){if(n!==void 0&&e.bottomi.target===t);n?n.affixList.push(e):(n={target:t,affixList:[e],eventHandlers:{}},Tu.push(n),Xk.forEach(i=>{n.eventHandlers[i]=Gt(t,i,()=>{n.affixList.forEach(o=>{const{lazyUpdatePosition:r}=o.exposed;r()},(i==="touchstart"||i==="touchmove")&&pn?{passive:!0}:!1)})}))}function SA(t){const e=Tu.find(n=>{const i=n.affixList.some(o=>o===t);return i&&(n.affixList=n.affixList.filter(o=>o!==t)),i});e&&e.affixList.length===0&&(Tu=Tu.filter(n=>n!==e),Xk.forEach(n=>{const i=e.eventHandlers[n];i&&i.remove&&i.remove()}))}const jw="anticon",Yk=Symbol("GlobalFormContextKey"),l7=t=>{ot(Yk,t)},c7=()=>qe(Yk,{validateMessages:L(()=>{})}),u7=()=>({iconPrefixCls:String,getTargetContainer:{type:Function},getPopupContainer:{type:Function},prefixCls:String,getPrefixCls:{type:Function},renderEmpty:{type:Function},transformCellText:{type:Function},csp:Fe(),input:Fe(),autoInsertSpaceInButton:{type:Boolean,default:void 0},locale:Fe(),pageHeader:Fe(),componentSize:{type:String},componentDisabled:{type:Boolean,default:void 0},direction:{type:String,default:"ltr"},space:Fe(),virtual:{type:Boolean,default:void 0},dropdownMatchSelectWidth:{type:[Number,Boolean],default:!0},form:Fe(),pagination:Fe(),theme:Fe(),select:Fe(),wave:Fe()}),Vw=Symbol("configProvider"),Gk={getPrefixCls:(t,e)=>e||(t?`ant-${t}`:"ant"),iconPrefixCls:L(()=>jw),getPopupContainer:L(()=>()=>document.body),direction:L(()=>"ltr")},rm=()=>qe(Vw,Gk),d7=t=>ot(Vw,t),Kk=Symbol("DisabledContextKey"),Oi=()=>qe(Kk,se(void 0)),Uk=t=>{const e=Oi();return ot(Kk,L(()=>{var n;return(n=t.value)!==null&&n!==void 0?n:e.value})),t},qk={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages"},f7={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"Ok",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"},Zk={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},sd={lang:A({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},f7),timePickerLocale:A({},Zk)},ki="${label} is not a valid ${type}",bi={locale:"en",Pagination:qk,DatePicker:sd,TimePicker:Zk,Calendar:sd,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:ki,method:ki,array:ki,object:ki,number:ki,date:ki,boolean:ki,integer:ki,float:ki,regexp:ki,email:ki,url:ki,hex:ki},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"}},Us=oe({compatConfig:{MODE:3},name:"LocaleReceiver",props:{componentName:String,defaultLocale:{type:[Object,Function]},children:{type:Function}},setup(t,e){let{slots:n}=e;const i=qe("localeData",{}),o=L(()=>{const{componentName:a="global",defaultLocale:s}=t,l=s||bi[a||"global"],{antLocale:c}=i,u=a&&c?c[a]:{};return A(A({},typeof l=="function"?l():l),u||{})}),r=L(()=>{const{antLocale:a}=i,s=a&&a.locale;return a&&a.exist&&!s?bi.locale:s});return()=>{const a=t.children||n.default,{antLocale:s}=i;return a==null?void 0:a(o.value,r.value,s)}}});function xo(t,e,n){const i=qe("localeData",{});return[L(()=>{const{antLocale:r}=i,a=Yt(e)||bi[t||"global"],s=t&&r?r[t]:{};return A(A(A({},typeof a=="function"?a():a),s||{}),Yt(n)||{})})]}function Xw(t){for(var e=0,n,i=0,o=t.length;o>=4;++i,o-=4)n=t.charCodeAt(i)&255|(t.charCodeAt(++i)&255)<<8|(t.charCodeAt(++i)&255)<<16|(t.charCodeAt(++i)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(o){case 3:e^=(t.charCodeAt(i+2)&255)<<16;case 2:e^=(t.charCodeAt(i+1)&255)<<8;case 1:e^=t.charCodeAt(i)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}const CA="%";class h7{constructor(e){this.cache=new Map,this.instanceId=e}get(e){return this.cache.get(Array.isArray(e)?e.join(CA):e)||null}update(e,n){const i=Array.isArray(e)?e.join(CA):e,o=this.cache.get(i),r=n(o);r===null?this.cache.delete(i):this.cache.set(i,r)}}const Jk="data-token-hash",xs="data-css-hash",Dl="__cssinjs_instance__";function ld(){const t=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){const e=document.body.querySelectorAll(`style[${xs}]`)||[],{firstChild:n}=document.head;Array.from(e).forEach(o=>{o[Dl]=o[Dl]||t,o[Dl]===t&&document.head.insertBefore(o,n)});const i={};Array.from(document.querySelectorAll(`style[${xs}]`)).forEach(o=>{var r;const a=o.getAttribute(xs);i[a]?o[Dl]===t&&((r=o.parentNode)===null||r===void 0||r.removeChild(o)):i[a]=!0})}return new h7(t)}const Qk=Symbol("StyleContextKey"),p7=()=>{var t,e,n;const i=Cn();let o;if(i&&i.appContext){const r=(n=(e=(t=i.appContext)===null||t===void 0?void 0:t.config)===null||e===void 0?void 0:e.globalProperties)===null||n===void 0?void 0:n.__ANTDV_CSSINJS_CACHE__;r?o=r:(o=ld(),i.appContext.config.globalProperties&&(i.appContext.config.globalProperties.__ANTDV_CSSINJS_CACHE__=o))}else o=ld();return o},eD={cache:ld(),defaultCache:!0,hashPriority:"low"},am=()=>{const t=p7();return qe(Qk,ie(A(A({},eD),{cache:t})))},g7=t=>{const e=am(),n=ie(A(A({},eD),{cache:ld()}));return ye([()=>Yt(t),e],()=>{const i=A({},e.value),o=Yt(t);Object.keys(o).forEach(a=>{const s=o[a];o[a]!==void 0&&(i[a]=s)});const{cache:r}=o;i.cache=i.cache||ld(),i.defaultCache=!r&&e.value.defaultCache,n.value=i},{immediate:!0}),ot(Qk,n),n},m7=()=>({autoClear:Ce(),mock:Ne(),cache:Fe(),defaultCache:Ce(),hashPriority:Ne(),container:Xe(),ssrInline:Ce(),transformers:xt(),linters:xt()}),v7=Vt(oe({name:"AStyleProvider",inheritAttrs:!1,props:m7(),setup(t,e){let{slots:n}=e;return g7(t),()=>{var i;return(i=n.default)===null||i===void 0?void 0:i.call(n)}}}));function tD(t,e,n,i){const o=am(),r=ie(""),a=ie();Ke(()=>{r.value=[t,...e.value].join("%")});const s=l=>{o.value.cache.update(l,c=>{const[u=0,d]=c||[];return u-1===0?(i==null||i(d,!1),null):[u-1,d]})};return ye(r,(l,c)=>{c&&s(c),o.value.cache.update(l,u=>{const[d=0,f]=u||[],p=f||n();return[d+1,p]}),a.value=o.value.cache.get(r.value)[1]},{immediate:!0}),at(()=>{s(r.value)}),a}function ii(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function ha(t,e){return t&&t.contains?t.contains(e):!1}const $A="data-vc-order",b7="vc-util-key",oy=new Map;function nD(){let{mark:t}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return t?t.startsWith("data-")?t:`data-${t}`:b7}function sm(t){return t.attachTo?t.attachTo:document.querySelector("head")||document.body}function y7(t){return t==="queue"?"prependQueue":t?"prepend":"append"}function iD(t){return Array.from((oy.get(t)||t).children).filter(e=>e.tagName==="STYLE")}function oD(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!ii())return null;const{csp:n,prepend:i}=e,o=document.createElement("style");o.setAttribute($A,y7(i)),n!=null&&n.nonce&&(o.nonce=n==null?void 0:n.nonce),o.innerHTML=t;const r=sm(e),{firstChild:a}=r;if(i){if(i==="queue"){const s=iD(r).filter(l=>["prepend","prependQueue"].includes(l.getAttribute($A)));if(s.length)return r.insertBefore(o,s[s.length-1].nextSibling),o}r.insertBefore(o,a)}else r.appendChild(o);return o}function rD(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=sm(e);return iD(n).find(i=>i.getAttribute(nD(e))===t)}function _p(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=rD(t,e);n&&sm(e).removeChild(n)}function x7(t,e){const n=oy.get(t);if(!n||!ha(document,n)){const i=oD("",e),{parentNode:o}=i;oy.set(t,o),t.removeChild(i)}}function cd(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var i,o,r;const a=sm(n);x7(a,n);const s=rD(e,n);if(s)return!((i=n.csp)===null||i===void 0)&&i.nonce&&s.nonce!==((o=n.csp)===null||o===void 0?void 0:o.nonce)&&(s.nonce=(r=n.csp)===null||r===void 0?void 0:r.nonce),s.innerHTML!==t&&(s.innerHTML=t),s;const l=oD(t,n);return l.setAttribute(nD(n),e),l}function w7(t,e){if(t.length!==e.length)return!1;for(let n=0;n1&&arguments[1]!==void 0?arguments[1]:!1,i={map:this.cache};return e.forEach(o=>{var r;i?i=(r=i==null?void 0:i.map)===null||r===void 0?void 0:r.get(o):i=void 0}),i!=null&&i.value&&n&&(i.value[1]=this.cacheCallTimes++),i==null?void 0:i.value}get(e){var n;return(n=this.internalGet(e,!0))===null||n===void 0?void 0:n[0]}has(e){return!!this.internalGet(e)}set(e,n){if(!this.has(e)){if(this.size()+1>sc.MAX_CACHE_SIZE+sc.MAX_CACHE_OFFSET){const[o]=this.keys.reduce((r,a)=>{const[,s]=r;return this.internalGet(a)[1]{if(r===e.length-1)i.set(o,{value:[n,this.cacheCallTimes++]});else{const a=i.get(o);a?a.map||(a.map=new Map):i.set(o,{map:new Map}),i=i.get(o).map}})}deleteByPath(e,n){var i;const o=e.get(n[0]);if(n.length===1)return o.map?e.set(n[0],{map:o.map}):e.delete(n[0]),(i=o.value)===null||i===void 0?void 0:i[0];const r=this.deleteByPath(o.map,n.slice(1));return(!o.map||o.map.size===0)&&!o.value&&e.delete(n[0]),r}delete(e){if(this.has(e))return this.keys=this.keys.filter(n=>!w7(n,e)),this.deleteByPath(this.cache,e)}}sc.MAX_CACHE_SIZE=20;sc.MAX_CACHE_OFFSET=5;let AA={};function S7(t,e){}function C7(t,e){}function aD(t,e,n){!e&&!AA[n]&&(t(!1,n),AA[n]=!0)}function Yw(t,e){aD(S7,t,e)}function $7(t,e){aD(C7,t,e)}function A7(){}let Gi=A7,_A=0,sD=class{constructor(e){this.derivatives=Array.isArray(e)?e:[e],this.id=_A,e.length===0&&Gi(e.length>0),_A+=1}getDerivativeToken(e){return this.derivatives.reduce((n,i)=>i(e,n),void 0)}};const qv=new sc;function lD(t){const e=Array.isArray(t)?t:[t];return qv.has(e)||qv.set(e,new sD(e)),qv.get(e)}const PA=new WeakMap;function Pp(t){let e=PA.get(t)||"";return e||(Object.keys(t).forEach(n=>{const i=t[n];e+=n,i instanceof sD?e+=i.id:i&&typeof i=="object"?e+=Pp(i):e+=i}),PA.set(t,e)),e}function _7(t,e){return Xw(`${e}_${Pp(t)}`)}const Ou=`random-${Date.now()}-${Math.random()}`.replace(/\./g,""),cD="_bAmBoO_";function P7(t,e,n){var i,o;if(ii()){cd(t,Ou);const r=document.createElement("div");r.style.position="fixed",r.style.left="0",r.style.top="0",e==null||e(r),document.body.appendChild(r);const a=n?n(r):(i=getComputedStyle(r).content)===null||i===void 0?void 0:i.includes(cD);return(o=r.parentNode)===null||o===void 0||o.removeChild(r),_p(Ou),a}return!1}let Zv;function T7(){return Zv===void 0&&(Zv=P7(`@layer ${Ou} { .${Ou} { content: "${cD}"!important; } }`,t=>{t.className=Ou})),Zv}const TA={},O7="css",ls=new Map;function E7(t){ls.set(t,(ls.get(t)||0)+1)}function M7(t,e){typeof document<"u"&&document.querySelectorAll(`style[${Jk}="${t}"]`).forEach(i=>{var o;i[Dl]===e&&((o=i.parentNode)===null||o===void 0||o.removeChild(i))})}const I7=0;function k7(t,e){ls.set(t,(ls.get(t)||0)-1);const n=Array.from(ls.keys()),i=n.filter(o=>(ls.get(o)||0)<=0);n.length-i.length>I7&&i.forEach(o=>{M7(o,e),ls.delete(o)})}const D7=(t,e,n,i)=>{const o=n.getDerivativeToken(t);let r=A(A({},o),e);return i&&(r=i(r)),r};function R7(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:se({});const i=am(),o=L(()=>A({},...e.value)),r=L(()=>Pp(o.value)),a=L(()=>Pp(n.value.override||TA));return tD("token",L(()=>[n.value.salt||"",t.value.id,r.value,a.value]),()=>{const{salt:l="",override:c=TA,formatToken:u,getComputedToken:d}=n.value,f=d?d(o.value,c,t.value):D7(o.value,c,t.value,u),h=_7(f,l);f._tokenKey=h,E7(h);const p=`${O7}-${Xw(h)}`;return f._hashId=p,[f,p]},l=>{var c;k7(l[0]._tokenKey,(c=i.value)===null||c===void 0?void 0:c.cache.instanceId)})}var L7={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},uD="comm",dD="rule",fD="decl",F7="@import",N7="@namespace",B7="@keyframes",z7="@layer",H7=Math.abs,Eu=String.fromCharCode;function hD(t){return t.trim()}function ry(t,e,n){return t.replace(e,n)}function jl(t,e){return t.charCodeAt(e)|0}function lc(t,e,n){return t.slice(e,n)}function qo(t){return t.length}function W7(t){return t.length}function Af(t,e){return e.push(t),t}var lm=1,cc=1,pD=0,vo=0,Sn=0,Sc="";function Gw(t,e,n,i,o,r,a,s){return{value:t,root:e,parent:n,type:i,props:o,children:r,line:lm,column:cc,length:a,return:"",siblings:s}}function j7(){return Sn}function V7(){return Sn=vo>0?jl(Sc,--vo):0,cc--,Sn===10&&(cc=1,lm--),Sn}function Mo(){return Sn=vo2||ud(Sn)>3?"":" "}function K7(t,e){for(;--e&&Mo()&&!(Sn<48||Sn>102||Sn>57&&Sn<65||Sn>70&&Sn<97););return cm(t,mh()+(e<6&&va()==32&&Mo()==32))}function ay(t){for(;Mo();)switch(Sn){case t:return vo;case 34:case 39:t!==34&&t!==39&&ay(Sn);break;case 40:t===41&&ay(t);break;case 92:Mo();break}return vo}function U7(t,e){for(;Mo()&&t+Sn!==57;)if(t+Sn===84&&va()===47)break;return"/*"+cm(e,vo-1)+"*"+Eu(t===47?t:Mo())}function q7(t){for(;!ud(va());)Mo();return cm(t,vo)}function Z7(t){return Y7(vh("",null,null,null,[""],t=X7(t),0,[0],t))}function vh(t,e,n,i,o,r,a,s,l){for(var c=0,u=0,d=a,f=0,h=0,p=0,g=1,m=1,v=1,b=0,y=0,w="",x=o,$=r,S=i,_=w;m;)switch(p=y,y=Mo()){case 40:p!=108&&jl(_,d-1)==58?(b++,_+="("):_+=Jv(y);break;case 41:b--,_+=")";break;case 34:case 39:case 91:_+=Jv(y);break;case 9:case 10:case 13:case 32:if(b>0){_+=Eu(y);break}_+=G7(p);break;case 92:_+=K7(mh()-1,7);continue;case 47:switch(va()){case 42:case 47:Af(J7(U7(Mo(),mh()),e,n,l),l),(ud(p||1)==5||ud(va()||1)==5)&&qo(_)&&lc(_,-1,void 0)!==" "&&(_+=" ");break;default:_+="/"}break;case 123*g:s[c++]=qo(_)*v;case 125*g:case 59:case 0:if(b>0&&y){_+=Eu(y);break}switch(y){case 0:case 125:m=0;case 59+u:v==-1&&(_=ry(_,/\f/g,"")),h>0&&(qo(_)-d||g===0)&&Af(h>32?EA(_+";",i,n,d-1,l):EA(ry(_," ","")+";",i,n,d-2,l),l);break;case 59:_+=";";default:if(Af(S=OA(_,e,n,c,u,o,s,w,x=[],$=[],d,r),r),y===123)if(u===0)vh(_,e,S,S,x,r,d,s,$);else{switch(f){case 99:if(jl(_,3)===110)break;case 108:if(jl(_,2)===97)break;default:u=0;case 100:case 109:case 115:}u?vh(t,S,S,i&&Af(OA(t,S,S,0,0,o,s,w,o,x=[],d,$),$),o,$,d,s,i?x:$):vh(_,S,S,S,[""],$,0,s,$)}}c=u=h=0,g=v=1,w=_="",d=a;break;case 58:d=1+qo(_),h=p;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&V7()==125)continue}switch(_+=Eu(y),y*g){case 38:v=u>0?1:(_+="\f",-1);break;case 44:if(b>0)break;s[c++]=(qo(_)-1)*v,v=1;break;case 64:va()===45&&(_+=Jv(Mo())),f=va(),u=d=qo(w=_+=q7(mh())),y++;break;case 45:p===45&&qo(_)==2&&(g=0)}}return r}function OA(t,e,n,i,o,r,a,s,l,c,u,d){for(var f=o-1,h=o===0?r:[""],p=W7(h),g=0,m=0,v=0;g0?h[b]+" "+y:ry(y,/&\f/g,h[b])))&&(l[v++]=w);return Gw(t,e,n,o===0?dD:s,l,c,u,d)}function J7(t,e,n,i){return Gw(t,e,n,uD,Eu(j7()),lc(t,2,-2),0,i)}function EA(t,e,n,i,o){return Gw(t,e,n,fD,lc(t,0,i),lc(t,i+1,-1),i,o)}function sy(t,e){for(var n="",i=0;i{const[r,a]=o.split(":");ws[r]=a});const i=document.querySelector(`style[${MA}]`);i&&(gD=!1,(t=i.parentNode)===null||t===void 0||t.removeChild(i)),document.body.removeChild(e)}}function n9(t){return t9(),!!ws[t]}function i9(t){const e=ws[t];let n=null;if(e&&ii())if(gD)n=e9;else{const i=document.querySelector(`style[${xs}="${ws[t]}"]`);i?n=i.innerHTML:delete ws[t]}return[n,e]}const IA=ii(),o9="_skip_check_",mD="_multi_value_";function kA(t){return sy(Z7(t),Q7).replace(/\{%%%\:[^;];}/g,";")}function r9(t){return typeof t=="object"&&t&&(o9 in t||mD in t)}function a9(t,e,n){if(!e)return t;const i=`.${e}`,o=n==="low"?`:where(${i})`:i;return t.split(",").map(a=>{var s;const l=a.trim().split(/\s+/);let c=l[0]||"";const u=((s=c.match(/^\w+/))===null||s===void 0?void 0:s[0])||"";return c=`${u}${o}${c.slice(u.length)}`,[c,...l.slice(1)].join(" ")}).join(",")}const DA=new Set,ly=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{root:n,injectHash:i,parentSelectors:o}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]};const{hashId:r,layer:a,path:s,hashPriority:l,transformers:c=[],linters:u=[]}=e;let d="",f={};function h(m){const v=m.getName(r);if(!f[v]){const[b]=ly(m.style,e,{root:!1,parentSelectors:o});f[v]=`@keyframes ${m.getName(r)}${b}`}}function p(m){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return m.forEach(b=>{Array.isArray(b)?p(b,v):b&&v.push(b)}),v}if(p(Array.isArray(t)?t:[t]).forEach(m=>{const v=typeof m=="string"&&!n?{}:m;if(typeof v=="string")d+=`${v} -`;else if(v._keyframe)h(v);else{const b=c.reduce((y,w)=>{var x;return((x=w==null?void 0:w.visit)===null||x===void 0?void 0:x.call(w,y))||y},v);Object.keys(b).forEach(y=>{var w;const x=b[y];if(typeof x=="object"&&x&&(y!=="animationName"||!x._keyframe)&&!r9(x)){let $=!1,S=y.trim(),_=!1;(n||i)&&r?S.startsWith("@")?$=!0:S=a9(y,r,l):n&&!r&&(S==="&"||S==="")&&(S="",_=!0);const[P,O]=ly(x,e,{root:_,injectHash:$,parentSelectors:[...o,S]});f=A(A({},f),O),d+=`${S}${P}`}else{let $=function(_,P){const O=_.replace(/[A-Z]/g,M=>`-${M.toLowerCase()}`);let T=P;!L7[_]&&typeof T=="number"&&T!==0&&(T=`${T}px`),_==="animationName"&&(P!=null&&P._keyframe)&&(h(P),T=P.getName(r)),d+=`${O}:${T};`};const S=(w=x==null?void 0:x.value)!==null&&w!==void 0?w:x;typeof x=="object"&&(x!=null&&x[mD])&&Array.isArray(S)?S.forEach(_=>{$(y,_)}):$(y,S)}})}}),!n)d=`{${d}}`;else if(a&&T7()){const m=a.split(",");d=`@layer ${m[m.length-1].trim()} {${d}}`,m.length>1&&(d=`@layer ${a}{%%%:%}${d}`)}return[d,f]};function s9(t,e){return Xw(`${t.join("%")}${e}`)}function cy(t,e){const n=am(),i=L(()=>t.value.token._tokenKey),o=L(()=>[i.value,...t.value.path]);let r=IA;return tD("style",o,()=>{const{path:a,hashId:s,layer:l,nonce:c,clientOnly:u,order:d=0}=t.value,f=o.value.join("|");if(n9(f)){const[S,_]=i9(f);if(S)return[S,i.value,_,{},u,d]}const h=e(),{hashPriority:p,container:g,transformers:m,linters:v,cache:b}=n.value,[y,w]=ly(h,{hashId:s,hashPriority:p,layer:l,path:a.join("-"),transformers:m,linters:v}),x=kA(y),$=s9(o.value,x);if(r){const S={mark:xs,prepend:"queue",attachTo:g,priority:d},_=typeof c=="function"?c():c;_&&(S.csp={nonce:_});const P=cd(x,$,S);P[Dl]=b.instanceId,P.setAttribute(Jk,i.value),Object.keys(w).forEach(O=>{DA.has(O)||(DA.add(O),cd(kA(w[O]),`_effect-${O}`,{mark:xs,prepend:"queue",attachTo:g}))})}return[x,i.value,$,w,u,d]},(a,s)=>{let[,,l]=a;(s||n.value.autoClear)&&IA&&_p(l,{mark:xs})}),a=>a}class mt{constructor(e,n){this._keyframe=!0,this.name=e,this.style=n}getName(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return e?`${e}-${this.name}`:this.name}}const l9={StyleProvider:v7},vD="4.2.6",dd=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function Hn(t,e){c9(t)&&(t="100%");var n=u9(t);return t=e===360?t:Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(String(t*e),10)/100),Math.abs(t-e)<1e-6?1:(e===360?t=(t<0?t%e+e:t%e)/parseFloat(String(e)):t=t%e/parseFloat(String(e)),t)}function _f(t){return Math.min(1,Math.max(0,t))}function c9(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function u9(t){return typeof t=="string"&&t.indexOf("%")!==-1}function bD(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Pf(t){return t<=1?"".concat(Number(t)*100,"%"):t}function hs(t){return t.length===1?"0"+t:String(t)}function d9(t,e,n){return{r:Hn(t,255)*255,g:Hn(e,255)*255,b:Hn(n,255)*255}}function RA(t,e,n){t=Hn(t,255),e=Hn(e,255),n=Hn(n,255);var i=Math.max(t,e,n),o=Math.min(t,e,n),r=0,a=0,s=(i+o)/2;if(i===o)a=0,r=0;else{var l=i-o;switch(a=s>.5?l/(2-i-o):l/(i+o),i){case t:r=(e-n)/l+(e1&&(n-=1),n<1/6?t+(e-t)*(6*n):n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function f9(t,e,n){var i,o,r;if(t=Hn(t,360),e=Hn(e,100),n=Hn(n,100),e===0)o=n,r=n,i=n;else{var a=n<.5?n*(1+e):n+e-n*e,s=2*n-a;i=Qv(s,a,t+1/3),o=Qv(s,a,t),r=Qv(s,a,t-1/3)}return{r:i*255,g:o*255,b:r*255}}function uy(t,e,n){t=Hn(t,255),e=Hn(e,255),n=Hn(n,255);var i=Math.max(t,e,n),o=Math.min(t,e,n),r=0,a=i,s=i-o,l=i===0?0:s/i;if(i===o)r=0;else{switch(i){case t:r=(e-n)/s+(e>16,g:(t&65280)>>8,b:t&255}}var fy={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function $l(t){var e={r:0,g:0,b:0},n=1,i=null,o=null,r=null,a=!1,s=!1;return typeof t=="string"&&(t=y9(t)),typeof t=="object"&&(hr(t.r)&&hr(t.g)&&hr(t.b)?(e=d9(t.r,t.g,t.b),a=!0,s=String(t.r).substr(-1)==="%"?"prgb":"rgb"):hr(t.h)&&hr(t.s)&&hr(t.v)?(i=Pf(t.s),o=Pf(t.v),e=h9(t.h,i,o),a=!0,s="hsv"):hr(t.h)&&hr(t.s)&&hr(t.l)&&(i=Pf(t.s),r=Pf(t.l),e=f9(t.h,i,r),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=bD(n),{ok:a,format:t.format||s,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:n}}var v9="[-\\+]?\\d+%?",b9="[-\\+]?\\d*\\.\\d+%?",ba="(?:".concat(b9,")|(?:").concat(v9,")"),eb="[\\s|\\(]+(".concat(ba,")[,|\\s]+(").concat(ba,")[,|\\s]+(").concat(ba,")\\s*\\)?"),tb="[\\s|\\(]+(".concat(ba,")[,|\\s]+(").concat(ba,")[,|\\s]+(").concat(ba,")[,|\\s]+(").concat(ba,")\\s*\\)?"),_o={CSS_UNIT:new RegExp(ba),rgb:new RegExp("rgb"+eb),rgba:new RegExp("rgba"+tb),hsl:new RegExp("hsl"+eb),hsla:new RegExp("hsla"+tb),hsv:new RegExp("hsv"+eb),hsva:new RegExp("hsva"+tb),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function y9(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var e=!1;if(fy[t])t=fy[t],e=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=_o.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=_o.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=_o.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=_o.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=_o.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=_o.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=_o.hex8.exec(t),n?{r:Ni(n[1]),g:Ni(n[2]),b:Ni(n[3]),a:LA(n[4]),format:e?"name":"hex8"}:(n=_o.hex6.exec(t),n?{r:Ni(n[1]),g:Ni(n[2]),b:Ni(n[3]),format:e?"name":"hex"}:(n=_o.hex4.exec(t),n?{r:Ni(n[1]+n[1]),g:Ni(n[2]+n[2]),b:Ni(n[3]+n[3]),a:LA(n[4]+n[4]),format:e?"name":"hex8"}:(n=_o.hex3.exec(t),n?{r:Ni(n[1]+n[1]),g:Ni(n[2]+n[2]),b:Ni(n[3]+n[3]),format:e?"name":"hex"}:!1)))))))))}function hr(t){return!!_o.CSS_UNIT.exec(String(t))}var Ot=function(){function t(e,n){e===void 0&&(e=""),n===void 0&&(n={});var i;if(e instanceof t)return e;typeof e=="number"&&(e=m9(e)),this.originalInput=e;var o=$l(e);this.originalInput=e,this.r=o.r,this.g=o.g,this.b=o.b,this.a=o.a,this.roundA=Math.round(100*this.a)/100,this.format=(i=n.format)!==null&&i!==void 0?i:o.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=o.ok}return t.prototype.isDark=function(){return this.getBrightness()<128},t.prototype.isLight=function(){return!this.isDark()},t.prototype.getBrightness=function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},t.prototype.getLuminance=function(){var e=this.toRgb(),n,i,o,r=e.r/255,a=e.g/255,s=e.b/255;return r<=.03928?n=r/12.92:n=Math.pow((r+.055)/1.055,2.4),a<=.03928?i=a/12.92:i=Math.pow((a+.055)/1.055,2.4),s<=.03928?o=s/12.92:o=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*i+.0722*o},t.prototype.getAlpha=function(){return this.a},t.prototype.setAlpha=function(e){return this.a=bD(e),this.roundA=Math.round(100*this.a)/100,this},t.prototype.isMonochrome=function(){var e=this.toHsl().s;return e===0},t.prototype.toHsv=function(){var e=uy(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}},t.prototype.toHsvString=function(){var e=uy(this.r,this.g,this.b),n=Math.round(e.h*360),i=Math.round(e.s*100),o=Math.round(e.v*100);return this.a===1?"hsv(".concat(n,", ").concat(i,"%, ").concat(o,"%)"):"hsva(".concat(n,", ").concat(i,"%, ").concat(o,"%, ").concat(this.roundA,")")},t.prototype.toHsl=function(){var e=RA(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}},t.prototype.toHslString=function(){var e=RA(this.r,this.g,this.b),n=Math.round(e.h*360),i=Math.round(e.s*100),o=Math.round(e.l*100);return this.a===1?"hsl(".concat(n,", ").concat(i,"%, ").concat(o,"%)"):"hsla(".concat(n,", ").concat(i,"%, ").concat(o,"%, ").concat(this.roundA,")")},t.prototype.toHex=function(e){return e===void 0&&(e=!1),dy(this.r,this.g,this.b,e)},t.prototype.toHexString=function(e){return e===void 0&&(e=!1),"#"+this.toHex(e)},t.prototype.toHex8=function(e){return e===void 0&&(e=!1),p9(this.r,this.g,this.b,this.a,e)},t.prototype.toHex8String=function(e){return e===void 0&&(e=!1),"#"+this.toHex8(e)},t.prototype.toHexShortString=function(e){return e===void 0&&(e=!1),this.a===1?this.toHexString(e):this.toHex8String(e)},t.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},t.prototype.toRgbString=function(){var e=Math.round(this.r),n=Math.round(this.g),i=Math.round(this.b);return this.a===1?"rgb(".concat(e,", ").concat(n,", ").concat(i,")"):"rgba(".concat(e,", ").concat(n,", ").concat(i,", ").concat(this.roundA,")")},t.prototype.toPercentageRgb=function(){var e=function(n){return"".concat(Math.round(Hn(n,255)*100),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},t.prototype.toPercentageRgbString=function(){var e=function(n){return Math.round(Hn(n,255)*100)};return this.a===1?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},t.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var e="#"+dy(this.r,this.g,this.b,!1),n=0,i=Object.entries(fy);n=0,r=!n&&o&&(e.startsWith("hex")||e==="name");return r?e==="name"&&this.a===0?this.toName():this.toRgbString():(e==="rgb"&&(i=this.toRgbString()),e==="prgb"&&(i=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(i=this.toHexString()),e==="hex3"&&(i=this.toHexString(!0)),e==="hex4"&&(i=this.toHex8String(!0)),e==="hex8"&&(i=this.toHex8String()),e==="name"&&(i=this.toName()),e==="hsl"&&(i=this.toHslString()),e==="hsv"&&(i=this.toHsvString()),i||this.toHexString())},t.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},t.prototype.clone=function(){return new t(this.toString())},t.prototype.lighten=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.l+=e/100,n.l=_f(n.l),new t(n)},t.prototype.brighten=function(e){e===void 0&&(e=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(e/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(e/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(e/100)))),new t(n)},t.prototype.darken=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.l-=e/100,n.l=_f(n.l),new t(n)},t.prototype.tint=function(e){return e===void 0&&(e=10),this.mix("white",e)},t.prototype.shade=function(e){return e===void 0&&(e=10),this.mix("black",e)},t.prototype.desaturate=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.s-=e/100,n.s=_f(n.s),new t(n)},t.prototype.saturate=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.s+=e/100,n.s=_f(n.s),new t(n)},t.prototype.greyscale=function(){return this.desaturate(100)},t.prototype.spin=function(e){var n=this.toHsl(),i=(n.h+e)%360;return n.h=i<0?360+i:i,new t(n)},t.prototype.mix=function(e,n){n===void 0&&(n=50);var i=this.toRgb(),o=new t(e).toRgb(),r=n/100,a={r:(o.r-i.r)*r+i.r,g:(o.g-i.g)*r+i.g,b:(o.b-i.b)*r+i.b,a:(o.a-i.a)*r+i.a};return new t(a)},t.prototype.analogous=function(e,n){e===void 0&&(e=6),n===void 0&&(n=30);var i=this.toHsl(),o=360/n,r=[this];for(i.h=(i.h-(o*e>>1)+720)%360;--e;)i.h=(i.h+o)%360,r.push(new t(i));return r},t.prototype.complement=function(){var e=this.toHsl();return e.h=(e.h+180)%360,new t(e)},t.prototype.monochromatic=function(e){e===void 0&&(e=6);for(var n=this.toHsv(),i=n.h,o=n.s,r=n.v,a=[],s=1/e;e--;)a.push(new t({h:i,s:o,v:r})),r=(r+s)%1;return a},t.prototype.splitcomplement=function(){var e=this.toHsl(),n=e.h;return[this,new t({h:(n+72)%360,s:e.s,l:e.l}),new t({h:(n+216)%360,s:e.s,l:e.l})]},t.prototype.onBackground=function(e){var n=this.toRgb(),i=new t(e).toRgb(),o=n.a+i.a*(1-n.a);return new t({r:(n.r*n.a+i.r*i.a*(1-n.a))/o,g:(n.g*n.a+i.g*i.a*(1-n.a))/o,b:(n.b*n.a+i.b*i.a*(1-n.a))/o,a:o})},t.prototype.triad=function(){return this.polyad(3)},t.prototype.tetrad=function(){return this.polyad(4)},t.prototype.polyad=function(e){for(var n=this.toHsl(),i=n.h,o=[this],r=360/e,a=1;a=60&&Math.round(t.h)<=240?i=n?Math.round(t.h)-Tf*e:Math.round(t.h)+Tf*e:i=n?Math.round(t.h)+Tf*e:Math.round(t.h)-Tf*e,i<0?i+=360:i>=360&&(i-=360),i}function zA(t,e,n){if(t.h===0&&t.s===0)return t.s;var i;return n?i=t.s-FA*e:e===xD?i=t.s+FA:i=t.s+x9*e,i>1&&(i=1),n&&e===yD&&i>.1&&(i=.1),i<.06&&(i=.06),Number(i.toFixed(2))}function HA(t,e,n){var i;return n?i=t.v+w9*e:i=t.v-S9*e,i>1&&(i=1),Number(i.toFixed(2))}function Is(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],i=$l(t),o=yD;o>0;o-=1){var r=NA(i),a=Of($l({h:BA(r,o,!0),s:zA(r,o,!0),v:HA(r,o,!0)}));n.push(a)}n.push(Of(i));for(var s=1;s<=xD;s+=1){var l=NA(i),c=Of($l({h:BA(l,s),s:zA(l,s),v:HA(l,s)}));n.push(c)}return e.theme==="dark"?C9.map(function(u){var d=u.index,f=u.opacity,h=Of($9($l(e.backgroundColor||"#141414"),$l(n[d]),f*100));return h}):n}var Vl={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Mu={},nb={};Object.keys(Vl).forEach(function(t){Mu[t]=Is(Vl[t]),Mu[t].primary=Mu[t][5],nb[t]=Is(Vl[t],{theme:"dark",backgroundColor:"#141414"}),nb[t].primary=nb[t][5]});var A9=Mu.gold,_9=Mu.blue;const P9=t=>{const{controlHeight:e}=t;return{controlHeightSM:e*.75,controlHeightXS:e*.5,controlHeightLG:e*1.25}};function T9(t){const{sizeUnit:e,sizeStep:n}=t;return{sizeXXL:e*(n+8),sizeXL:e*(n+4),sizeLG:e*(n+2),sizeMD:e*(n+1),sizeMS:e*n,size:e*n,sizeSM:e*(n-1),sizeXS:e*(n-2),sizeXXS:e*(n-3)}}const wD={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},um=A(A({},wD),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, + */let Tk;const im=t=>Tk=t,Ok=Symbol();function J0(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var Tu;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(Tu||(Tu={}));function vH(){const t=dI(!0),e=t.run(()=>se({}));let n=[],i=[];const o=_w({install(r){im(o),o._a=r,r.provide(Ok,o),r.config.globalProperties.$pinia=o,i.forEach(a=>n.push(a)),i=[]},use(r){return this._a?n.push(r):i.push(r),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return o}const Ek=()=>{};function fA(t,e,n,i=Ek){t.push(e);const o=()=>{const r=t.indexOf(e);r>-1&&(t.splice(r,1),i())};return!n&&yw()&&fI(o),o}function ul(t,...e){t.slice().forEach(n=>{n(...e)})}const bH=t=>t(),hA=Symbol(),Uv=Symbol();function Q0(t,e){t instanceof Map&&e instanceof Map?e.forEach((n,i)=>t.set(i,n)):t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const n in e){if(!e.hasOwnProperty(n))continue;const i=e[n],o=t[n];J0(o)&&J0(i)&&t.hasOwnProperty(n)&&!en(i)&&!kr(i)?t[n]=Q0(o,i):t[n]=i}return t}const yH=Symbol();function xH(t){return!J0(t)||!t.hasOwnProperty(yH)}const{assign:aa}=Object;function wH(t){return!!(en(t)&&t.effect)}function SH(t,e,n,i){const{state:o,actions:r,getters:a}=e,s=n.state.value[t];let l;function c(){s||(n.state.value[t]=o?o():{});const u=uo(n.state.value[t]);return aa(u,r,Object.keys(a||{}).reduce((d,f)=>(d[f]=_w(L(()=>{im(n);const h=n._s.get(t);return a[f].call(h,h)})),d),{}))}return l=Mk(t,c,e,n,i,!0),l}function Mk(t,e,n={},i,o,r){let a;const s=aa({actions:{}},n),l={deep:!0};let c,u,d=[],f=[],h;const p=i.state.value[t];!r&&!p&&(i.state.value[t]={});let g;function m(_){let P;c=u=!1,typeof _=="function"?(_(i.state.value[t]),P={type:Tu.patchFunction,storeId:t,events:h}):(Q0(i.state.value[t],_),P={type:Tu.patchObject,payload:_,storeId:t,events:h});const O=g=Symbol();pt().then(()=>{g===O&&(c=!0)}),u=!0,ul(d,P,i.state.value[t])}const v=r?function(){const{state:P}=n,O=P?P():{};this.$patch(T=>{aa(T,O)})}:Ek;function b(){a.stop(),d=[],f=[],i._s.delete(t)}const y=(_,P="")=>{if(hA in _)return _[Uv]=P,_;const O=function(){im(i);const T=Array.from(arguments),M=[],I=[];function k(D){M.push(D)}function E(D){I.push(D)}ul(f,{args:T,name:O[Uv],store:x,after:k,onError:E});let R;try{R=_.apply(this&&this.$id===t?this:x,T)}catch(D){throw ul(I,D),D}return R instanceof Promise?R.then(D=>(ul(M,D),D)).catch(D=>(ul(I,D),Promise.reject(D))):(ul(M,R),R)};return O[hA]=!0,O[Uv]=P,O},w={_p:i,$id:t,$onAction:fA.bind(null,f),$patch:m,$reset:v,$subscribe(_,P={}){const O=fA(d,_,P.detached,()=>T()),T=a.run(()=>ye(()=>i.state.value[t],M=>{(P.flush==="sync"?u:c)&&_({storeId:t,type:Tu.direct,events:h},M)},aa({},l,P)));return O},$dispose:b},x=$t(w);i._s.set(t,x);const S=(i._a&&i._a.runWithContext||bH)(()=>i._e.run(()=>(a=dI()).run(()=>e({action:y}))));for(const _ in S){const P=S[_];if(en(P)&&!wH(P)||kr(P))r||(p&&xH(P)&&(en(P)?P.value=p[_]:Q0(P,p[_])),i.state.value[t][_]=P);else if(typeof P=="function"){const O=y(P,_);S[_]=O,s.actions[_]=P}}return aa(x,S),aa(dt(x),S),Object.defineProperty(x,"$state",{get:()=>i.state.value[t],set:_=>{m(P=>{aa(P,_)})}}),i._p.forEach(_=>{aa(x,a.run(()=>_({store:x,app:i._a,pinia:i,options:s})))}),p&&r&&n.hydrate&&n.hydrate(x.$state,p),c=!0,u=!0,x}/*! #__NO_SIDE_EFFECTS__ */function Ik(t,e,n){let i,o;const r=typeof e=="function";typeof t=="string"?(i=t,o=r?n:e):(o=t,i=t.id);function a(s,l){const c=kB();return s=s||(c?qe(Ok,null):null),s&&im(s),s=Tk,s._s.has(i)||(r?Mk(i,e,o,s):SH(i,o,s)),s._s.get(i)}return a.$id=i,a}function sd(t){"@babel/helpers - typeof";return sd=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},sd(t)}function CH(t,e){if(sd(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(sd(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function $H(t){var e=CH(t,"string");return sd(e)=="symbol"?e:e+""}function AH(t,e,n){return(e=$H(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function pA(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,i)}return n}function H(t){for(var e=1;etypeof t=="function",_H=Array.isArray,PH=t=>typeof t=="string",TH=t=>t!==null&&typeof t=="object",OH=/^on[^a-z]/,EH=t=>OH.test(t),Bw=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},MH=/-(\w)/g,Sc=Bw(t=>t.replace(MH,(e,n)=>n?n.toUpperCase():"")),IH=/\B([A-Z])/g,kH=Bw(t=>t.replace(IH,"-$1").toLowerCase()),DH=Bw(t=>t.charAt(0).toUpperCase()+t.slice(1)),RH=Object.prototype.hasOwnProperty,gA=(t,e)=>RH.call(t,e);function LH(t,e,n,i){const o=t[n];if(o!=null){const r=gA(o,"default");if(r&&i===void 0){const a=o.default;i=o.type!==Function&&ey(a)?a():a}o.type===Boolean&&(!gA(e,n)&&!r?i=!1:i===""&&(i=!0))}return i}function FH(t){return Object.keys(t).reduce((e,n)=>((n.startsWith("data-")||n.startsWith("aria-"))&&(e[n]=t[n]),e),{})}function ss(t){return typeof t=="number"?`${t}px`:t}function kl(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return typeof t=="function"?t(e):t??n}function NH(t){let e;const n=new Promise(o=>{e=t(()=>{o(!0)})}),i=()=>{e==null||e()};return i.then=(o,r)=>n.then(o,r),i.promise=n,i}function ce(){const t=[];for(let e=0;e0},t.prototype.connect_=function(){!ty||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),VH?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){!ty||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(e){var n=e.propertyName,i=n===void 0?"":n,o=jH.some(function(r){return!!~i.indexOf(r)});o&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),Dk=function(t,e){for(var n=0,i=Object.keys(e);n"u"||!(Element instanceof Object))){if(!(e instanceof ac(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)||(n.set(e,new QH(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof ac(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var n=this.observations_;n.has(e)&&(n.delete(e),n.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(n){n.isActive()&&e.activeObservations_.push(n)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,n=this.activeObservations_.map(function(i){return new e7(i.target,i.broadcastRect())});this.callback_.call(e,n,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),Lk=typeof WeakMap<"u"?new WeakMap:new kk,Fk=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=XH.getInstance(),i=new t7(e,n,this);Lk.set(this,i)}return t}();["observe","unobserve","disconnect"].forEach(function(t){Fk.prototype[t]=function(){var e;return(e=Lk.get(this))[t].apply(e,arguments)}});var zw=function(){return typeof Ap.ResizeObserver<"u"?Ap.ResizeObserver:Fk}();const ny=t=>t!=null&&t!=="",ct=(t,e)=>{const n=A({},t);return Object.keys(e).forEach(i=>{const o=n[i];if(o)o.type||o.default?o.default=e[i]:o.def?o.def(e[i]):n[i]={type:o,default:e[i]};else throw new Error(`not have ${i} prop`)}),n},Hw=t=>{const e=Object.keys(t),n={},i={},o={};for(let r=0,a=e.length;r0&&arguments[0]!==void 0?arguments[0]:"",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n={},i=/;(?![^(]*\))/g,o=/:(.+)/;return typeof t=="object"?t:(t.split(i).forEach(function(r){if(r){const a=r.split(o);if(a.length>1){const s=e?Sc(a[0].trim()):a[0].trim();n[s]=a[1].trim()}}}),n)},Ar=(t,e)=>t[e]!==void 0,Nk=Symbol("skipFlatten"),Dt=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const n=Array.isArray(t)?t:[t],i=[];return n.forEach(o=>{Array.isArray(o)?i.push(...Dt(o,e)):o&&o.type===Qe?o.key===Nk?i.push(o):i.push(...Dt(o.children,e)):o&&ln(o)?e&&!Vd(o)?i.push(o):e||i.push(o):ny(o)&&i.push(o)}),i},rm=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"default",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(ln(t))return t.type===Qe?e==="default"?Dt(t.children):[]:t.children&&t.children[e]?Dt(t.children[e](n)):[];{const i=t.$slots[e]&&t.$slots[e](n);return Dt(i)}},gi=t=>{var e;let n=((e=t==null?void 0:t.vnode)===null||e===void 0?void 0:e.el)||t&&(t.$el||t);for(;n&&!n.tagName;)n=n.nextSibling;return n},Bk=t=>{const e={};if(t.$&&t.$.vnode){const n=t.$.vnode.props||{};Object.keys(t.$props).forEach(i=>{const o=t.$props[i],r=kH(i);(o!==void 0||r in n)&&(e[i]=o)})}else if(ln(t)&&typeof t.type=="object"){const n=t.props||{},i={};Object.keys(n).forEach(r=>{i[Sc(r)]=n[r]});const o=t.type.props||{};Object.keys(o).forEach(r=>{const a=LH(o,i,r,i[r]);(a!==void 0||r in i)&&(e[r]=a)})}return e},zk=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"default",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,o;if(t.$){const r=t[e];if(r!==void 0)return typeof r=="function"&&i?r(n):r;o=t.$slots[e],o=i&&o?o(n):o}else if(ln(t)){const r=t.props&&t.props[e];if(r!==void 0&&t.props!==null)return typeof r=="function"&&i?r(n):r;t.type===Qe?o=t.children:t.children&&t.children[e]&&(o=t.children[e],o=i&&o?o(n):o)}return Array.isArray(o)&&(o=Dt(o),o=o.length===1?o[0]:o,o=o.length===0?void 0:o),o};function vA(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n={};return t.$?n=A(A({},n),t.$attrs):n=A(A({},n),t.props),Hw(n)[e?"onEvents":"events"]}function i7(t){const n=((ln(t)?t.props:t.$attrs)||{}).class||{};let i={};return typeof n=="string"?n.split(" ").forEach(o=>{i[o.trim()]=!0}):Array.isArray(n)?ce(n).split(" ").forEach(o=>{i[o.trim()]=!0}):i=A(A({},i),n),i}function Hk(t,e){let i=((ln(t)?t.props:t.$attrs)||{}).style||{};return typeof i=="string"&&(i=n7(i,e)),i}function o7(t){return t.length===1&&t[0].type===Qe}function r7(t){return t==null||t===""||Array.isArray(t)&&t.length===0}function Vd(t){return t&&(t.type===Dn||t.type===Qe&&t.children.length===0||t.type===Ma&&t.children.trim()==="")}function a7(t){return t&&t.type===Ma}function Kt(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const e=[];return t.forEach(n=>{Array.isArray(n)?e.push(...n):(n==null?void 0:n.type)===Qe?e.push(...Kt(n.children)):e.push(n)}),e.filter(n=>!Vd(n))}function Uc(t){if(t){const e=Kt(t);return e.length?e:void 0}else return t}function cn(t){return Array.isArray(t)&&t.length===1&&(t=t[0]),t&&t.__v_isVNode&&typeof t.type!="symbol"}function gn(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"default";var i,o;return(i=e[n])!==null&&i!==void 0?i:(o=t[n])===null||o===void 0?void 0:o.call(t)}const mo=oe({compatConfig:{MODE:3},name:"ResizeObserver",props:{disabled:Boolean,onResize:Function},emits:["resize"],setup(t,e){let{slots:n}=e;const i=$t({width:0,height:0,offsetHeight:0,offsetWidth:0});let o=null,r=null;const a=()=>{r&&(r.disconnect(),r=null)},s=u=>{const{onResize:d}=t,f=u[0].target,{width:h,height:p}=f.getBoundingClientRect(),{offsetWidth:g,offsetHeight:m}=f,v=Math.floor(h),b=Math.floor(p);if(i.width!==v||i.height!==b||i.offsetWidth!==g||i.offsetHeight!==m){const y={width:v,height:b,offsetWidth:g,offsetHeight:m};A(i,y),d&&Promise.resolve().then(()=>{d(A(A({},y),{offsetWidth:g,offsetHeight:m}),f)})}},l=Cn(),c=()=>{const{disabled:u}=t;if(u){a();return}const d=gi(l);d!==o&&(a(),o=d),!r&&d&&(r=new zw(s),r.observe(d))};return Ze(()=>{c()}),ri(()=>{c()}),Xn(()=>{a()}),ye(()=>t.disabled,()=>{c()},{flush:"post"}),()=>{var u;return(u=n.default)===null||u===void 0?void 0:u.call(n)[0]}}});let Wk=t=>setTimeout(t,16),jk=t=>clearTimeout(t);typeof window<"u"&&"requestAnimationFrame"in window&&(Wk=t=>window.requestAnimationFrame(t),jk=t=>window.cancelAnimationFrame(t));let bA=0;const Ww=new Map;function Vk(t){Ww.delete(t)}function lt(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;bA+=1;const n=bA;function i(o){if(o===0)Vk(n),t();else{const r=Wk(()=>{i(o-1)});Ww.set(n,r)}}return i(e),n}lt.cancel=t=>{const e=Ww.get(t);return Vk(e),jk(e)};function iy(t){let e;const n=o=>()=>{e=null,t(...o)},i=function(){if(e==null){for(var o=arguments.length,r=new Array(o),a=0;a{lt.cancel(e),e=null},i}const Wn=function(){for(var t=arguments.length,e=new Array(t),n=0;n{const e=t;return e.install=function(n){n.component(e.displayName||e.name,t)},t};function Ms(){return{type:[Function,Array]}}function Fe(t){return{type:Object,default:t}}function Ce(t){return{type:Boolean,default:t}}function ve(t){return{type:Function,default:t}}function Rt(t,e){return{validator:()=>!0,default:t}}function Zn(){return{validator:()=>!0}}function xt(t){return{type:Array,default:t}}function Ne(t){return{type:String,default:t}}function Xe(t,e){return t?{type:t,default:e}:Rt(e)}let pn=!1;try{const t=Object.defineProperty({},"passive",{get(){pn=!0}});window.addEventListener("testPassive",null,t),window.removeEventListener("testPassive",null,t)}catch{}function Gt(t,e,n,i){if(t&&t.addEventListener){let o=i;o===void 0&&pn&&(e==="touchstart"||e==="touchmove"||e==="wheel")&&(o={passive:!1}),t.addEventListener(e,n,o)}return{remove:()=>{t&&t.removeEventListener&&t.removeEventListener(e,n)}}}function Af(t){return t!==window?t.getBoundingClientRect():{top:0,bottom:window.innerHeight}}function yA(t,e,n){if(n!==void 0&&e.top>t.top-n)return`${n+e.top}px`}function xA(t,e,n){if(n!==void 0&&e.bottomi.target===t);n?n.affixList.push(e):(n={target:t,affixList:[e],eventHandlers:{}},Ou.push(n),Xk.forEach(i=>{n.eventHandlers[i]=Gt(t,i,()=>{n.affixList.forEach(o=>{const{lazyUpdatePosition:r}=o.exposed;r()},(i==="touchstart"||i==="touchmove")&&pn?{passive:!0}:!1)})}))}function SA(t){const e=Ou.find(n=>{const i=n.affixList.some(o=>o===t);return i&&(n.affixList=n.affixList.filter(o=>o!==t)),i});e&&e.affixList.length===0&&(Ou=Ou.filter(n=>n!==e),Xk.forEach(n=>{const i=e.eventHandlers[n];i&&i.remove&&i.remove()}))}const jw="anticon",Yk=Symbol("GlobalFormContextKey"),l7=t=>{ot(Yk,t)},c7=()=>qe(Yk,{validateMessages:L(()=>{})}),u7=()=>({iconPrefixCls:String,getTargetContainer:{type:Function},getPopupContainer:{type:Function},prefixCls:String,getPrefixCls:{type:Function},renderEmpty:{type:Function},transformCellText:{type:Function},csp:Fe(),input:Fe(),autoInsertSpaceInButton:{type:Boolean,default:void 0},locale:Fe(),pageHeader:Fe(),componentSize:{type:String},componentDisabled:{type:Boolean,default:void 0},direction:{type:String,default:"ltr"},space:Fe(),virtual:{type:Boolean,default:void 0},dropdownMatchSelectWidth:{type:[Number,Boolean],default:!0},form:Fe(),pagination:Fe(),theme:Fe(),select:Fe(),wave:Fe()}),Vw=Symbol("configProvider"),Gk={getPrefixCls:(t,e)=>e||(t?`ant-${t}`:"ant"),iconPrefixCls:L(()=>jw),getPopupContainer:L(()=>()=>document.body),direction:L(()=>"ltr")},am=()=>qe(Vw,Gk),d7=t=>ot(Vw,t),Kk=Symbol("DisabledContextKey"),Oi=()=>qe(Kk,se(void 0)),Uk=t=>{const e=Oi();return ot(Kk,L(()=>{var n;return(n=t.value)!==null&&n!==void 0?n:e.value})),t},qk={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages"},f7={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"Ok",clear:"Clear",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"},Zk={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},ld={lang:A({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},f7),timePickerLocale:A({},Zk)},ki="${label} is not a valid ${type}",bi={locale:"en",Pagination:qk,DatePicker:ld,TimePicker:Zk,Calendar:ld,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand"},PageHeader:{back:"Back"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:ki,method:ki,array:ki,object:ki,number:ki,date:ki,boolean:ki,integer:ki,float:ki,regexp:ki,email:ki,url:ki,hex:ki},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"}},Us=oe({compatConfig:{MODE:3},name:"LocaleReceiver",props:{componentName:String,defaultLocale:{type:[Object,Function]},children:{type:Function}},setup(t,e){let{slots:n}=e;const i=qe("localeData",{}),o=L(()=>{const{componentName:a="global",defaultLocale:s}=t,l=s||bi[a||"global"],{antLocale:c}=i,u=a&&c?c[a]:{};return A(A({},typeof l=="function"?l():l),u||{})}),r=L(()=>{const{antLocale:a}=i,s=a&&a.locale;return a&&a.exist&&!s?bi.locale:s});return()=>{const a=t.children||n.default,{antLocale:s}=i;return a==null?void 0:a(o.value,r.value,s)}}});function xo(t,e,n){const i=qe("localeData",{});return[L(()=>{const{antLocale:r}=i,a=Yt(e)||bi[t||"global"],s=t&&r?r[t]:{};return A(A(A({},typeof a=="function"?a():a),s||{}),Yt(n)||{})})]}function Xw(t){for(var e=0,n,i=0,o=t.length;o>=4;++i,o-=4)n=t.charCodeAt(i)&255|(t.charCodeAt(++i)&255)<<8|(t.charCodeAt(++i)&255)<<16|(t.charCodeAt(++i)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,e=(n&65535)*1540483477+((n>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(o){case 3:e^=(t.charCodeAt(i+2)&255)<<16;case 2:e^=(t.charCodeAt(i+1)&255)<<8;case 1:e^=t.charCodeAt(i)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}const CA="%";class h7{constructor(e){this.cache=new Map,this.instanceId=e}get(e){return this.cache.get(Array.isArray(e)?e.join(CA):e)||null}update(e,n){const i=Array.isArray(e)?e.join(CA):e,o=this.cache.get(i),r=n(o);r===null?this.cache.delete(i):this.cache.set(i,r)}}const Jk="data-token-hash",xs="data-css-hash",Dl="__cssinjs_instance__";function cd(){const t=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){const e=document.body.querySelectorAll(`style[${xs}]`)||[],{firstChild:n}=document.head;Array.from(e).forEach(o=>{o[Dl]=o[Dl]||t,o[Dl]===t&&document.head.insertBefore(o,n)});const i={};Array.from(document.querySelectorAll(`style[${xs}]`)).forEach(o=>{var r;const a=o.getAttribute(xs);i[a]?o[Dl]===t&&((r=o.parentNode)===null||r===void 0||r.removeChild(o)):i[a]=!0})}return new h7(t)}const Qk=Symbol("StyleContextKey"),p7=()=>{var t,e,n;const i=Cn();let o;if(i&&i.appContext){const r=(n=(e=(t=i.appContext)===null||t===void 0?void 0:t.config)===null||e===void 0?void 0:e.globalProperties)===null||n===void 0?void 0:n.__ANTDV_CSSINJS_CACHE__;r?o=r:(o=cd(),i.appContext.config.globalProperties&&(i.appContext.config.globalProperties.__ANTDV_CSSINJS_CACHE__=o))}else o=cd();return o},eD={cache:cd(),defaultCache:!0,hashPriority:"low"},sm=()=>{const t=p7();return qe(Qk,ie(A(A({},eD),{cache:t})))},g7=t=>{const e=sm(),n=ie(A(A({},eD),{cache:cd()}));return ye([()=>Yt(t),e],()=>{const i=A({},e.value),o=Yt(t);Object.keys(o).forEach(a=>{const s=o[a];o[a]!==void 0&&(i[a]=s)});const{cache:r}=o;i.cache=i.cache||cd(),i.defaultCache=!r&&e.value.defaultCache,n.value=i},{immediate:!0}),ot(Qk,n),n},m7=()=>({autoClear:Ce(),mock:Ne(),cache:Fe(),defaultCache:Ce(),hashPriority:Ne(),container:Xe(),ssrInline:Ce(),transformers:xt(),linters:xt()}),v7=Vt(oe({name:"AStyleProvider",inheritAttrs:!1,props:m7(),setup(t,e){let{slots:n}=e;return g7(t),()=>{var i;return(i=n.default)===null||i===void 0?void 0:i.call(n)}}}));function tD(t,e,n,i){const o=sm(),r=ie(""),a=ie();Ke(()=>{r.value=[t,...e.value].join("%")});const s=l=>{o.value.cache.update(l,c=>{const[u=0,d]=c||[];return u-1===0?(i==null||i(d,!1),null):[u-1,d]})};return ye(r,(l,c)=>{c&&s(c),o.value.cache.update(l,u=>{const[d=0,f]=u||[],p=f||n();return[d+1,p]}),a.value=o.value.cache.get(r.value)[1]},{immediate:!0}),at(()=>{s(r.value)}),a}function ii(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function ha(t,e){return t&&t.contains?t.contains(e):!1}const $A="data-vc-order",b7="vc-util-key",oy=new Map;function nD(){let{mark:t}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return t?t.startsWith("data-")?t:`data-${t}`:b7}function lm(t){return t.attachTo?t.attachTo:document.querySelector("head")||document.body}function y7(t){return t==="queue"?"prependQueue":t?"prepend":"append"}function iD(t){return Array.from((oy.get(t)||t).children).filter(e=>e.tagName==="STYLE")}function oD(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!ii())return null;const{csp:n,prepend:i}=e,o=document.createElement("style");o.setAttribute($A,y7(i)),n!=null&&n.nonce&&(o.nonce=n==null?void 0:n.nonce),o.innerHTML=t;const r=lm(e),{firstChild:a}=r;if(i){if(i==="queue"){const s=iD(r).filter(l=>["prepend","prependQueue"].includes(l.getAttribute($A)));if(s.length)return r.insertBefore(o,s[s.length-1].nextSibling),o}r.insertBefore(o,a)}else r.appendChild(o);return o}function rD(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=lm(e);return iD(n).find(i=>i.getAttribute(nD(e))===t)}function Pp(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=rD(t,e);n&&lm(e).removeChild(n)}function x7(t,e){const n=oy.get(t);if(!n||!ha(document,n)){const i=oD("",e),{parentNode:o}=i;oy.set(t,o),t.removeChild(i)}}function ud(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var i,o,r;const a=lm(n);x7(a,n);const s=rD(e,n);if(s)return!((i=n.csp)===null||i===void 0)&&i.nonce&&s.nonce!==((o=n.csp)===null||o===void 0?void 0:o.nonce)&&(s.nonce=(r=n.csp)===null||r===void 0?void 0:r.nonce),s.innerHTML!==t&&(s.innerHTML=t),s;const l=oD(t,n);return l.setAttribute(nD(n),e),l}function w7(t,e){if(t.length!==e.length)return!1;for(let n=0;n1&&arguments[1]!==void 0?arguments[1]:!1,i={map:this.cache};return e.forEach(o=>{var r;i?i=(r=i==null?void 0:i.map)===null||r===void 0?void 0:r.get(o):i=void 0}),i!=null&&i.value&&n&&(i.value[1]=this.cacheCallTimes++),i==null?void 0:i.value}get(e){var n;return(n=this.internalGet(e,!0))===null||n===void 0?void 0:n[0]}has(e){return!!this.internalGet(e)}set(e,n){if(!this.has(e)){if(this.size()+1>sc.MAX_CACHE_SIZE+sc.MAX_CACHE_OFFSET){const[o]=this.keys.reduce((r,a)=>{const[,s]=r;return this.internalGet(a)[1]{if(r===e.length-1)i.set(o,{value:[n,this.cacheCallTimes++]});else{const a=i.get(o);a?a.map||(a.map=new Map):i.set(o,{map:new Map}),i=i.get(o).map}})}deleteByPath(e,n){var i;const o=e.get(n[0]);if(n.length===1)return o.map?e.set(n[0],{map:o.map}):e.delete(n[0]),(i=o.value)===null||i===void 0?void 0:i[0];const r=this.deleteByPath(o.map,n.slice(1));return(!o.map||o.map.size===0)&&!o.value&&e.delete(n[0]),r}delete(e){if(this.has(e))return this.keys=this.keys.filter(n=>!w7(n,e)),this.deleteByPath(this.cache,e)}}sc.MAX_CACHE_SIZE=20;sc.MAX_CACHE_OFFSET=5;let AA={};function S7(t,e){}function C7(t,e){}function aD(t,e,n){!e&&!AA[n]&&(t(!1,n),AA[n]=!0)}function Yw(t,e){aD(S7,t,e)}function $7(t,e){aD(C7,t,e)}function A7(){}let Gi=A7,_A=0,sD=class{constructor(e){this.derivatives=Array.isArray(e)?e:[e],this.id=_A,e.length===0&&Gi(e.length>0),_A+=1}getDerivativeToken(e){return this.derivatives.reduce((n,i)=>i(e,n),void 0)}};const qv=new sc;function lD(t){const e=Array.isArray(t)?t:[t];return qv.has(e)||qv.set(e,new sD(e)),qv.get(e)}const PA=new WeakMap;function Tp(t){let e=PA.get(t)||"";return e||(Object.keys(t).forEach(n=>{const i=t[n];e+=n,i instanceof sD?e+=i.id:i&&typeof i=="object"?e+=Tp(i):e+=i}),PA.set(t,e)),e}function _7(t,e){return Xw(`${e}_${Tp(t)}`)}const Eu=`random-${Date.now()}-${Math.random()}`.replace(/\./g,""),cD="_bAmBoO_";function P7(t,e,n){var i,o;if(ii()){ud(t,Eu);const r=document.createElement("div");r.style.position="fixed",r.style.left="0",r.style.top="0",e==null||e(r),document.body.appendChild(r);const a=n?n(r):(i=getComputedStyle(r).content)===null||i===void 0?void 0:i.includes(cD);return(o=r.parentNode)===null||o===void 0||o.removeChild(r),Pp(Eu),a}return!1}let Zv;function T7(){return Zv===void 0&&(Zv=P7(`@layer ${Eu} { .${Eu} { content: "${cD}"!important; } }`,t=>{t.className=Eu})),Zv}const TA={},O7="css",ls=new Map;function E7(t){ls.set(t,(ls.get(t)||0)+1)}function M7(t,e){typeof document<"u"&&document.querySelectorAll(`style[${Jk}="${t}"]`).forEach(i=>{var o;i[Dl]===e&&((o=i.parentNode)===null||o===void 0||o.removeChild(i))})}const I7=0;function k7(t,e){ls.set(t,(ls.get(t)||0)-1);const n=Array.from(ls.keys()),i=n.filter(o=>(ls.get(o)||0)<=0);n.length-i.length>I7&&i.forEach(o=>{M7(o,e),ls.delete(o)})}const D7=(t,e,n,i)=>{const o=n.getDerivativeToken(t);let r=A(A({},o),e);return i&&(r=i(r)),r};function R7(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:se({});const i=sm(),o=L(()=>A({},...e.value)),r=L(()=>Tp(o.value)),a=L(()=>Tp(n.value.override||TA));return tD("token",L(()=>[n.value.salt||"",t.value.id,r.value,a.value]),()=>{const{salt:l="",override:c=TA,formatToken:u,getComputedToken:d}=n.value,f=d?d(o.value,c,t.value):D7(o.value,c,t.value,u),h=_7(f,l);f._tokenKey=h,E7(h);const p=`${O7}-${Xw(h)}`;return f._hashId=p,[f,p]},l=>{var c;k7(l[0]._tokenKey,(c=i.value)===null||c===void 0?void 0:c.cache.instanceId)})}var L7={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},uD="comm",dD="rule",fD="decl",F7="@import",N7="@namespace",B7="@keyframes",z7="@layer",H7=Math.abs,Mu=String.fromCharCode;function hD(t){return t.trim()}function ry(t,e,n){return t.replace(e,n)}function jl(t,e){return t.charCodeAt(e)|0}function lc(t,e,n){return t.slice(e,n)}function qo(t){return t.length}function W7(t){return t.length}function _f(t,e){return e.push(t),t}var cm=1,cc=1,pD=0,vo=0,Sn=0,Cc="";function Gw(t,e,n,i,o,r,a,s){return{value:t,root:e,parent:n,type:i,props:o,children:r,line:cm,column:cc,length:a,return:"",siblings:s}}function j7(){return Sn}function V7(){return Sn=vo>0?jl(Cc,--vo):0,cc--,Sn===10&&(cc=1,cm--),Sn}function Mo(){return Sn=vo2||dd(Sn)>3?"":" "}function K7(t,e){for(;--e&&Mo()&&!(Sn<48||Sn>102||Sn>57&&Sn<65||Sn>70&&Sn<97););return um(t,vh()+(e<6&&va()==32&&Mo()==32))}function ay(t){for(;Mo();)switch(Sn){case t:return vo;case 34:case 39:t!==34&&t!==39&&ay(Sn);break;case 40:t===41&&ay(t);break;case 92:Mo();break}return vo}function U7(t,e){for(;Mo()&&t+Sn!==57;)if(t+Sn===84&&va()===47)break;return"/*"+um(e,vo-1)+"*"+Mu(t===47?t:Mo())}function q7(t){for(;!dd(va());)Mo();return um(t,vo)}function Z7(t){return Y7(bh("",null,null,null,[""],t=X7(t),0,[0],t))}function bh(t,e,n,i,o,r,a,s,l){for(var c=0,u=0,d=a,f=0,h=0,p=0,g=1,m=1,v=1,b=0,y=0,w="",x=o,$=r,S=i,_=w;m;)switch(p=y,y=Mo()){case 40:p!=108&&jl(_,d-1)==58?(b++,_+="("):_+=Jv(y);break;case 41:b--,_+=")";break;case 34:case 39:case 91:_+=Jv(y);break;case 9:case 10:case 13:case 32:if(b>0){_+=Mu(y);break}_+=G7(p);break;case 92:_+=K7(vh()-1,7);continue;case 47:switch(va()){case 42:case 47:_f(J7(U7(Mo(),vh()),e,n,l),l),(dd(p||1)==5||dd(va()||1)==5)&&qo(_)&&lc(_,-1,void 0)!==" "&&(_+=" ");break;default:_+="/"}break;case 123*g:s[c++]=qo(_)*v;case 125*g:case 59:case 0:if(b>0&&y){_+=Mu(y);break}switch(y){case 0:case 125:m=0;case 59+u:v==-1&&(_=ry(_,/\f/g,"")),h>0&&(qo(_)-d||g===0)&&_f(h>32?EA(_+";",i,n,d-1,l):EA(ry(_," ","")+";",i,n,d-2,l),l);break;case 59:_+=";";default:if(_f(S=OA(_,e,n,c,u,o,s,w,x=[],$=[],d,r),r),y===123)if(u===0)bh(_,e,S,S,x,r,d,s,$);else{switch(f){case 99:if(jl(_,3)===110)break;case 108:if(jl(_,2)===97)break;default:u=0;case 100:case 109:case 115:}u?bh(t,S,S,i&&_f(OA(t,S,S,0,0,o,s,w,o,x=[],d,$),$),o,$,d,s,i?x:$):bh(_,S,S,S,[""],$,0,s,$)}}c=u=h=0,g=v=1,w=_="",d=a;break;case 58:d=1+qo(_),h=p;default:if(g<1){if(y==123)--g;else if(y==125&&g++==0&&V7()==125)continue}switch(_+=Mu(y),y*g){case 38:v=u>0?1:(_+="\f",-1);break;case 44:if(b>0)break;s[c++]=(qo(_)-1)*v,v=1;break;case 64:va()===45&&(_+=Jv(Mo())),f=va(),u=d=qo(w=_+=q7(vh())),y++;break;case 45:p===45&&qo(_)==2&&(g=0)}}return r}function OA(t,e,n,i,o,r,a,s,l,c,u,d){for(var f=o-1,h=o===0?r:[""],p=W7(h),g=0,m=0,v=0;g0?h[b]+" "+y:ry(y,/&\f/g,h[b])))&&(l[v++]=w);return Gw(t,e,n,o===0?dD:s,l,c,u,d)}function J7(t,e,n,i){return Gw(t,e,n,uD,Mu(j7()),lc(t,2,-2),0,i)}function EA(t,e,n,i,o){return Gw(t,e,n,fD,lc(t,0,i),lc(t,i+1,-1),i,o)}function sy(t,e){for(var n="",i=0;i{const[r,a]=o.split(":");ws[r]=a});const i=document.querySelector(`style[${MA}]`);i&&(gD=!1,(t=i.parentNode)===null||t===void 0||t.removeChild(i)),document.body.removeChild(e)}}function n9(t){return t9(),!!ws[t]}function i9(t){const e=ws[t];let n=null;if(e&&ii())if(gD)n=e9;else{const i=document.querySelector(`style[${xs}="${ws[t]}"]`);i?n=i.innerHTML:delete ws[t]}return[n,e]}const IA=ii(),o9="_skip_check_",mD="_multi_value_";function kA(t){return sy(Z7(t),Q7).replace(/\{%%%\:[^;];}/g,";")}function r9(t){return typeof t=="object"&&t&&(o9 in t||mD in t)}function a9(t,e,n){if(!e)return t;const i=`.${e}`,o=n==="low"?`:where(${i})`:i;return t.split(",").map(a=>{var s;const l=a.trim().split(/\s+/);let c=l[0]||"";const u=((s=c.match(/^\w+/))===null||s===void 0?void 0:s[0])||"";return c=`${u}${o}${c.slice(u.length)}`,[c,...l.slice(1)].join(" ")}).join(",")}const DA=new Set,ly=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{root:n,injectHash:i,parentSelectors:o}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]};const{hashId:r,layer:a,path:s,hashPriority:l,transformers:c=[],linters:u=[]}=e;let d="",f={};function h(m){const v=m.getName(r);if(!f[v]){const[b]=ly(m.style,e,{root:!1,parentSelectors:o});f[v]=`@keyframes ${m.getName(r)}${b}`}}function p(m){let v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return m.forEach(b=>{Array.isArray(b)?p(b,v):b&&v.push(b)}),v}if(p(Array.isArray(t)?t:[t]).forEach(m=>{const v=typeof m=="string"&&!n?{}:m;if(typeof v=="string")d+=`${v} +`;else if(v._keyframe)h(v);else{const b=c.reduce((y,w)=>{var x;return((x=w==null?void 0:w.visit)===null||x===void 0?void 0:x.call(w,y))||y},v);Object.keys(b).forEach(y=>{var w;const x=b[y];if(typeof x=="object"&&x&&(y!=="animationName"||!x._keyframe)&&!r9(x)){let $=!1,S=y.trim(),_=!1;(n||i)&&r?S.startsWith("@")?$=!0:S=a9(y,r,l):n&&!r&&(S==="&"||S==="")&&(S="",_=!0);const[P,O]=ly(x,e,{root:_,injectHash:$,parentSelectors:[...o,S]});f=A(A({},f),O),d+=`${S}${P}`}else{let $=function(_,P){const O=_.replace(/[A-Z]/g,M=>`-${M.toLowerCase()}`);let T=P;!L7[_]&&typeof T=="number"&&T!==0&&(T=`${T}px`),_==="animationName"&&(P!=null&&P._keyframe)&&(h(P),T=P.getName(r)),d+=`${O}:${T};`};const S=(w=x==null?void 0:x.value)!==null&&w!==void 0?w:x;typeof x=="object"&&(x!=null&&x[mD])&&Array.isArray(S)?S.forEach(_=>{$(y,_)}):$(y,S)}})}}),!n)d=`{${d}}`;else if(a&&T7()){const m=a.split(",");d=`@layer ${m[m.length-1].trim()} {${d}}`,m.length>1&&(d=`@layer ${a}{%%%:%}${d}`)}return[d,f]};function s9(t,e){return Xw(`${t.join("%")}${e}`)}function cy(t,e){const n=sm(),i=L(()=>t.value.token._tokenKey),o=L(()=>[i.value,...t.value.path]);let r=IA;return tD("style",o,()=>{const{path:a,hashId:s,layer:l,nonce:c,clientOnly:u,order:d=0}=t.value,f=o.value.join("|");if(n9(f)){const[S,_]=i9(f);if(S)return[S,i.value,_,{},u,d]}const h=e(),{hashPriority:p,container:g,transformers:m,linters:v,cache:b}=n.value,[y,w]=ly(h,{hashId:s,hashPriority:p,layer:l,path:a.join("-"),transformers:m,linters:v}),x=kA(y),$=s9(o.value,x);if(r){const S={mark:xs,prepend:"queue",attachTo:g,priority:d},_=typeof c=="function"?c():c;_&&(S.csp={nonce:_});const P=ud(x,$,S);P[Dl]=b.instanceId,P.setAttribute(Jk,i.value),Object.keys(w).forEach(O=>{DA.has(O)||(DA.add(O),ud(kA(w[O]),`_effect-${O}`,{mark:xs,prepend:"queue",attachTo:g}))})}return[x,i.value,$,w,u,d]},(a,s)=>{let[,,l]=a;(s||n.value.autoClear)&&IA&&Pp(l,{mark:xs})}),a=>a}class mt{constructor(e,n){this._keyframe=!0,this.name=e,this.style=n}getName(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return e?`${e}-${this.name}`:this.name}}const l9={StyleProvider:v7},vD="4.2.6",fd=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function Hn(t,e){c9(t)&&(t="100%");var n=u9(t);return t=e===360?t:Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(String(t*e),10)/100),Math.abs(t-e)<1e-6?1:(e===360?t=(t<0?t%e+e:t%e)/parseFloat(String(e)):t=t%e/parseFloat(String(e)),t)}function Pf(t){return Math.min(1,Math.max(0,t))}function c9(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function u9(t){return typeof t=="string"&&t.indexOf("%")!==-1}function bD(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Tf(t){return t<=1?"".concat(Number(t)*100,"%"):t}function hs(t){return t.length===1?"0"+t:String(t)}function d9(t,e,n){return{r:Hn(t,255)*255,g:Hn(e,255)*255,b:Hn(n,255)*255}}function RA(t,e,n){t=Hn(t,255),e=Hn(e,255),n=Hn(n,255);var i=Math.max(t,e,n),o=Math.min(t,e,n),r=0,a=0,s=(i+o)/2;if(i===o)a=0,r=0;else{var l=i-o;switch(a=s>.5?l/(2-i-o):l/(i+o),i){case t:r=(e-n)/l+(e1&&(n-=1),n<1/6?t+(e-t)*(6*n):n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function f9(t,e,n){var i,o,r;if(t=Hn(t,360),e=Hn(e,100),n=Hn(n,100),e===0)o=n,r=n,i=n;else{var a=n<.5?n*(1+e):n+e-n*e,s=2*n-a;i=Qv(s,a,t+1/3),o=Qv(s,a,t),r=Qv(s,a,t-1/3)}return{r:i*255,g:o*255,b:r*255}}function uy(t,e,n){t=Hn(t,255),e=Hn(e,255),n=Hn(n,255);var i=Math.max(t,e,n),o=Math.min(t,e,n),r=0,a=i,s=i-o,l=i===0?0:s/i;if(i===o)r=0;else{switch(i){case t:r=(e-n)/s+(e>16,g:(t&65280)>>8,b:t&255}}var fy={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function $l(t){var e={r:0,g:0,b:0},n=1,i=null,o=null,r=null,a=!1,s=!1;return typeof t=="string"&&(t=y9(t)),typeof t=="object"&&(hr(t.r)&&hr(t.g)&&hr(t.b)?(e=d9(t.r,t.g,t.b),a=!0,s=String(t.r).substr(-1)==="%"?"prgb":"rgb"):hr(t.h)&&hr(t.s)&&hr(t.v)?(i=Tf(t.s),o=Tf(t.v),e=h9(t.h,i,o),a=!0,s="hsv"):hr(t.h)&&hr(t.s)&&hr(t.l)&&(i=Tf(t.s),r=Tf(t.l),e=f9(t.h,i,r),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=bD(n),{ok:a,format:t.format||s,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:n}}var v9="[-\\+]?\\d+%?",b9="[-\\+]?\\d*\\.\\d+%?",ba="(?:".concat(b9,")|(?:").concat(v9,")"),eb="[\\s|\\(]+(".concat(ba,")[,|\\s]+(").concat(ba,")[,|\\s]+(").concat(ba,")\\s*\\)?"),tb="[\\s|\\(]+(".concat(ba,")[,|\\s]+(").concat(ba,")[,|\\s]+(").concat(ba,")[,|\\s]+(").concat(ba,")\\s*\\)?"),_o={CSS_UNIT:new RegExp(ba),rgb:new RegExp("rgb"+eb),rgba:new RegExp("rgba"+tb),hsl:new RegExp("hsl"+eb),hsla:new RegExp("hsla"+tb),hsv:new RegExp("hsv"+eb),hsva:new RegExp("hsva"+tb),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function y9(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var e=!1;if(fy[t])t=fy[t],e=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=_o.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=_o.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=_o.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=_o.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=_o.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=_o.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=_o.hex8.exec(t),n?{r:Ni(n[1]),g:Ni(n[2]),b:Ni(n[3]),a:LA(n[4]),format:e?"name":"hex8"}:(n=_o.hex6.exec(t),n?{r:Ni(n[1]),g:Ni(n[2]),b:Ni(n[3]),format:e?"name":"hex"}:(n=_o.hex4.exec(t),n?{r:Ni(n[1]+n[1]),g:Ni(n[2]+n[2]),b:Ni(n[3]+n[3]),a:LA(n[4]+n[4]),format:e?"name":"hex8"}:(n=_o.hex3.exec(t),n?{r:Ni(n[1]+n[1]),g:Ni(n[2]+n[2]),b:Ni(n[3]+n[3]),format:e?"name":"hex"}:!1)))))))))}function hr(t){return!!_o.CSS_UNIT.exec(String(t))}var Ot=function(){function t(e,n){e===void 0&&(e=""),n===void 0&&(n={});var i;if(e instanceof t)return e;typeof e=="number"&&(e=m9(e)),this.originalInput=e;var o=$l(e);this.originalInput=e,this.r=o.r,this.g=o.g,this.b=o.b,this.a=o.a,this.roundA=Math.round(100*this.a)/100,this.format=(i=n.format)!==null&&i!==void 0?i:o.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=o.ok}return t.prototype.isDark=function(){return this.getBrightness()<128},t.prototype.isLight=function(){return!this.isDark()},t.prototype.getBrightness=function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},t.prototype.getLuminance=function(){var e=this.toRgb(),n,i,o,r=e.r/255,a=e.g/255,s=e.b/255;return r<=.03928?n=r/12.92:n=Math.pow((r+.055)/1.055,2.4),a<=.03928?i=a/12.92:i=Math.pow((a+.055)/1.055,2.4),s<=.03928?o=s/12.92:o=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*i+.0722*o},t.prototype.getAlpha=function(){return this.a},t.prototype.setAlpha=function(e){return this.a=bD(e),this.roundA=Math.round(100*this.a)/100,this},t.prototype.isMonochrome=function(){var e=this.toHsl().s;return e===0},t.prototype.toHsv=function(){var e=uy(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}},t.prototype.toHsvString=function(){var e=uy(this.r,this.g,this.b),n=Math.round(e.h*360),i=Math.round(e.s*100),o=Math.round(e.v*100);return this.a===1?"hsv(".concat(n,", ").concat(i,"%, ").concat(o,"%)"):"hsva(".concat(n,", ").concat(i,"%, ").concat(o,"%, ").concat(this.roundA,")")},t.prototype.toHsl=function(){var e=RA(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}},t.prototype.toHslString=function(){var e=RA(this.r,this.g,this.b),n=Math.round(e.h*360),i=Math.round(e.s*100),o=Math.round(e.l*100);return this.a===1?"hsl(".concat(n,", ").concat(i,"%, ").concat(o,"%)"):"hsla(".concat(n,", ").concat(i,"%, ").concat(o,"%, ").concat(this.roundA,")")},t.prototype.toHex=function(e){return e===void 0&&(e=!1),dy(this.r,this.g,this.b,e)},t.prototype.toHexString=function(e){return e===void 0&&(e=!1),"#"+this.toHex(e)},t.prototype.toHex8=function(e){return e===void 0&&(e=!1),p9(this.r,this.g,this.b,this.a,e)},t.prototype.toHex8String=function(e){return e===void 0&&(e=!1),"#"+this.toHex8(e)},t.prototype.toHexShortString=function(e){return e===void 0&&(e=!1),this.a===1?this.toHexString(e):this.toHex8String(e)},t.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},t.prototype.toRgbString=function(){var e=Math.round(this.r),n=Math.round(this.g),i=Math.round(this.b);return this.a===1?"rgb(".concat(e,", ").concat(n,", ").concat(i,")"):"rgba(".concat(e,", ").concat(n,", ").concat(i,", ").concat(this.roundA,")")},t.prototype.toPercentageRgb=function(){var e=function(n){return"".concat(Math.round(Hn(n,255)*100),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},t.prototype.toPercentageRgbString=function(){var e=function(n){return Math.round(Hn(n,255)*100)};return this.a===1?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},t.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var e="#"+dy(this.r,this.g,this.b,!1),n=0,i=Object.entries(fy);n=0,r=!n&&o&&(e.startsWith("hex")||e==="name");return r?e==="name"&&this.a===0?this.toName():this.toRgbString():(e==="rgb"&&(i=this.toRgbString()),e==="prgb"&&(i=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(i=this.toHexString()),e==="hex3"&&(i=this.toHexString(!0)),e==="hex4"&&(i=this.toHex8String(!0)),e==="hex8"&&(i=this.toHex8String()),e==="name"&&(i=this.toName()),e==="hsl"&&(i=this.toHslString()),e==="hsv"&&(i=this.toHsvString()),i||this.toHexString())},t.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},t.prototype.clone=function(){return new t(this.toString())},t.prototype.lighten=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.l+=e/100,n.l=Pf(n.l),new t(n)},t.prototype.brighten=function(e){e===void 0&&(e=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(e/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(e/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(e/100)))),new t(n)},t.prototype.darken=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.l-=e/100,n.l=Pf(n.l),new t(n)},t.prototype.tint=function(e){return e===void 0&&(e=10),this.mix("white",e)},t.prototype.shade=function(e){return e===void 0&&(e=10),this.mix("black",e)},t.prototype.desaturate=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.s-=e/100,n.s=Pf(n.s),new t(n)},t.prototype.saturate=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.s+=e/100,n.s=Pf(n.s),new t(n)},t.prototype.greyscale=function(){return this.desaturate(100)},t.prototype.spin=function(e){var n=this.toHsl(),i=(n.h+e)%360;return n.h=i<0?360+i:i,new t(n)},t.prototype.mix=function(e,n){n===void 0&&(n=50);var i=this.toRgb(),o=new t(e).toRgb(),r=n/100,a={r:(o.r-i.r)*r+i.r,g:(o.g-i.g)*r+i.g,b:(o.b-i.b)*r+i.b,a:(o.a-i.a)*r+i.a};return new t(a)},t.prototype.analogous=function(e,n){e===void 0&&(e=6),n===void 0&&(n=30);var i=this.toHsl(),o=360/n,r=[this];for(i.h=(i.h-(o*e>>1)+720)%360;--e;)i.h=(i.h+o)%360,r.push(new t(i));return r},t.prototype.complement=function(){var e=this.toHsl();return e.h=(e.h+180)%360,new t(e)},t.prototype.monochromatic=function(e){e===void 0&&(e=6);for(var n=this.toHsv(),i=n.h,o=n.s,r=n.v,a=[],s=1/e;e--;)a.push(new t({h:i,s:o,v:r})),r=(r+s)%1;return a},t.prototype.splitcomplement=function(){var e=this.toHsl(),n=e.h;return[this,new t({h:(n+72)%360,s:e.s,l:e.l}),new t({h:(n+216)%360,s:e.s,l:e.l})]},t.prototype.onBackground=function(e){var n=this.toRgb(),i=new t(e).toRgb(),o=n.a+i.a*(1-n.a);return new t({r:(n.r*n.a+i.r*i.a*(1-n.a))/o,g:(n.g*n.a+i.g*i.a*(1-n.a))/o,b:(n.b*n.a+i.b*i.a*(1-n.a))/o,a:o})},t.prototype.triad=function(){return this.polyad(3)},t.prototype.tetrad=function(){return this.polyad(4)},t.prototype.polyad=function(e){for(var n=this.toHsl(),i=n.h,o=[this],r=360/e,a=1;a=60&&Math.round(t.h)<=240?i=n?Math.round(t.h)-Of*e:Math.round(t.h)+Of*e:i=n?Math.round(t.h)+Of*e:Math.round(t.h)-Of*e,i<0?i+=360:i>=360&&(i-=360),i}function zA(t,e,n){if(t.h===0&&t.s===0)return t.s;var i;return n?i=t.s-FA*e:e===xD?i=t.s+FA:i=t.s+x9*e,i>1&&(i=1),n&&e===yD&&i>.1&&(i=.1),i<.06&&(i=.06),Number(i.toFixed(2))}function HA(t,e,n){var i;return n?i=t.v+w9*e:i=t.v-S9*e,i>1&&(i=1),Number(i.toFixed(2))}function Is(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],i=$l(t),o=yD;o>0;o-=1){var r=NA(i),a=Ef($l({h:BA(r,o,!0),s:zA(r,o,!0),v:HA(r,o,!0)}));n.push(a)}n.push(Ef(i));for(var s=1;s<=xD;s+=1){var l=NA(i),c=Ef($l({h:BA(l,s),s:zA(l,s),v:HA(l,s)}));n.push(c)}return e.theme==="dark"?C9.map(function(u){var d=u.index,f=u.opacity,h=Ef($9($l(e.backgroundColor||"#141414"),$l(n[d]),f*100));return h}):n}var Vl={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},Iu={},nb={};Object.keys(Vl).forEach(function(t){Iu[t]=Is(Vl[t]),Iu[t].primary=Iu[t][5],nb[t]=Is(Vl[t],{theme:"dark",backgroundColor:"#141414"}),nb[t].primary=nb[t][5]});var A9=Iu.gold,_9=Iu.blue;const P9=t=>{const{controlHeight:e}=t;return{controlHeightSM:e*.75,controlHeightXS:e*.5,controlHeightLG:e*1.25}};function T9(t){const{sizeUnit:e,sizeStep:n}=t;return{sizeXXL:e*(n+8),sizeXL:e*(n+4),sizeLG:e*(n+2),sizeMD:e*(n+1),sizeMS:e*n,size:e*n,sizeSM:e*(n-1),sizeXS:e*(n-2),sizeXXS:e*(n-3)}}const wD={blue:"#1677ff",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#eb2f96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},dm=A(A({},wD),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', -'Noto Color Emoji'`,fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1});function O9(t,e){let{generateColorPalettes:n,generateNeutralColorPalettes:i}=e;const{colorSuccess:o,colorWarning:r,colorError:a,colorInfo:s,colorPrimary:l,colorBgBase:c,colorTextBase:u}=t,d=n(l),f=n(o),h=n(r),p=n(a),g=n(s),m=i(c,u);return A(A({},m),{colorPrimaryBg:d[1],colorPrimaryBgHover:d[2],colorPrimaryBorder:d[3],colorPrimaryBorderHover:d[4],colorPrimaryHover:d[5],colorPrimary:d[6],colorPrimaryActive:d[7],colorPrimaryTextHover:d[8],colorPrimaryText:d[9],colorPrimaryTextActive:d[10],colorSuccessBg:f[1],colorSuccessBgHover:f[2],colorSuccessBorder:f[3],colorSuccessBorderHover:f[4],colorSuccessHover:f[4],colorSuccess:f[6],colorSuccessActive:f[7],colorSuccessTextHover:f[8],colorSuccessText:f[9],colorSuccessTextActive:f[10],colorErrorBg:p[1],colorErrorBgHover:p[2],colorErrorBorder:p[3],colorErrorBorderHover:p[4],colorErrorHover:p[5],colorError:p[6],colorErrorActive:p[7],colorErrorTextHover:p[8],colorErrorText:p[9],colorErrorTextActive:p[10],colorWarningBg:h[1],colorWarningBgHover:h[2],colorWarningBorder:h[3],colorWarningBorderHover:h[4],colorWarningHover:h[4],colorWarning:h[6],colorWarningActive:h[7],colorWarningTextHover:h[8],colorWarningText:h[9],colorWarningTextActive:h[10],colorInfoBg:g[1],colorInfoBgHover:g[2],colorInfoBorder:g[3],colorInfoBorderHover:g[4],colorInfoHover:g[4],colorInfo:g[6],colorInfoActive:g[7],colorInfoTextHover:g[8],colorInfoText:g[9],colorInfoTextActive:g[10],colorBgMask:new Ot("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"})}const E9=t=>{let e=t,n=t,i=t,o=t;return t<6&&t>=5?e=t+1:t<16&&t>=6?e=t+2:t>=16&&(e=16),t<7&&t>=5?n=4:t<8&&t>=7?n=5:t<14&&t>=8?n=6:t<16&&t>=14?n=7:t>=16&&(n=8),t<6&&t>=2?i=1:t>=6&&(i=2),t>4&&t<8?o=4:t>=8&&(o=6),{borderRadius:t>16?16:t,borderRadiusXS:i,borderRadiusSM:n,borderRadiusLG:e,borderRadiusOuter:o}};function M9(t){const{motionUnit:e,motionBase:n,borderRadius:i,lineWidth:o}=t;return A({motionDurationFast:`${(n+e).toFixed(1)}s`,motionDurationMid:`${(n+e*2).toFixed(1)}s`,motionDurationSlow:`${(n+e*3).toFixed(1)}s`,lineWidthBold:o+1},E9(i))}const pr=(t,e)=>new Ot(t).setAlpha(e).toRgbString(),Uc=(t,e)=>new Ot(t).darken(e).toHexString(),I9=t=>{const e=Is(t);return{1:e[0],2:e[1],3:e[2],4:e[3],5:e[4],6:e[5],7:e[6],8:e[4],9:e[5],10:e[6]}},k9=(t,e)=>{const n=t||"#fff",i=e||"#000";return{colorBgBase:n,colorTextBase:i,colorText:pr(i,.88),colorTextSecondary:pr(i,.65),colorTextTertiary:pr(i,.45),colorTextQuaternary:pr(i,.25),colorFill:pr(i,.15),colorFillSecondary:pr(i,.06),colorFillTertiary:pr(i,.04),colorFillQuaternary:pr(i,.02),colorBgLayout:Uc(n,4),colorBgContainer:Uc(n,0),colorBgElevated:Uc(n,0),colorBgSpotlight:pr(i,.85),colorBorder:Uc(n,15),colorBorderSecondary:Uc(n,6)}};function D9(t){const e=new Array(10).fill(null).map((n,i)=>{const o=i-1,r=t*Math.pow(2.71828,o/5),a=i>1?Math.floor(r):Math.ceil(r);return Math.floor(a/2)*2});return e[1]=t,e.map(n=>{const i=n+8;return{size:n,lineHeight:i/n}})}const R9=t=>{const e=D9(t),n=e.map(o=>o.size),i=e.map(o=>o.lineHeight);return{fontSizeSM:n[0],fontSize:n[1],fontSizeLG:n[2],fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:i[1],lineHeightLG:i[2],lineHeightSM:i[0],lineHeightHeading1:i[6],lineHeightHeading2:i[5],lineHeightHeading3:i[4],lineHeightHeading4:i[3],lineHeightHeading5:i[2]}};function L9(t){const e=Object.keys(wD).map(n=>{const i=Is(t[n]);return new Array(10).fill(1).reduce((o,r,a)=>(o[`${n}-${a+1}`]=i[a],o),{})}).reduce((n,i)=>(n=A(A({},n),i),n),{});return A(A(A(A(A(A(A({},t),e),O9(t,{generateColorPalettes:I9,generateNeutralColorPalettes:k9})),R9(t.fontSize)),T9(t)),P9(t)),M9(t))}function ib(t){return t>=0&&t<=255}function Ef(t,e){const{r:n,g:i,b:o,a:r}=new Ot(t).toRgb();if(r<1)return t;const{r:a,g:s,b:l}=new Ot(e).toRgb();for(let c=.01;c<=1;c+=.01){const u=Math.round((n-a*(1-c))/c),d=Math.round((i-s*(1-c))/c),f=Math.round((o-l*(1-c))/c);if(ib(u)&&ib(d)&&ib(f))return new Ot({r:u,g:d,b:f,a:Math.round(c*100)/100}).toRgbString()}return new Ot({r:n,g:i,b:o,a:1}).toRgbString()}var F9=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{delete i[h]});const o=A(A({},n),i),r=480,a=576,s=768,l=992,c=1200,u=1600,d=2e3;return A(A(A({},o),{colorLink:o.colorInfoText,colorLinkHover:o.colorInfoHover,colorLinkActive:o.colorInfoActive,colorFillContent:o.colorFillSecondary,colorFillContentHover:o.colorFill,colorFillAlter:o.colorFillQuaternary,colorBgContainerDisabled:o.colorFillTertiary,colorBorderBg:o.colorBgContainer,colorSplit:Ef(o.colorBorderSecondary,o.colorBgContainer),colorTextPlaceholder:o.colorTextQuaternary,colorTextDisabled:o.colorTextQuaternary,colorTextHeading:o.colorText,colorTextLabel:o.colorTextSecondary,colorTextDescription:o.colorTextTertiary,colorTextLightSolid:o.colorWhite,colorHighlight:o.colorError,colorBgTextHover:o.colorFillSecondary,colorBgTextActive:o.colorFill,colorIcon:o.colorTextTertiary,colorIconHover:o.colorText,colorErrorOutline:Ef(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:Ef(o.colorWarningBg,o.colorBgContainer),fontSizeIcon:o.fontSizeSM,lineWidth:o.lineWidth,controlOutlineWidth:o.lineWidth*2,controlInteractiveSize:o.controlHeight/2,controlItemBgHover:o.colorFillTertiary,controlItemBgActive:o.colorPrimaryBg,controlItemBgActiveHover:o.colorPrimaryBgHover,controlItemBgActiveDisabled:o.colorFill,controlTmpOutline:o.colorFillQuaternary,controlOutline:Ef(o.colorPrimaryBg,o.colorBgContainer),lineType:o.lineType,borderRadius:o.borderRadius,borderRadiusXS:o.borderRadiusXS,borderRadiusSM:o.borderRadiusSM,borderRadiusLG:o.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:o.sizeXXS,paddingXS:o.sizeXS,paddingSM:o.sizeSM,padding:o.size,paddingMD:o.sizeMD,paddingLG:o.sizeLG,paddingXL:o.sizeXL,paddingContentHorizontalLG:o.sizeLG,paddingContentVerticalLG:o.sizeMS,paddingContentHorizontal:o.sizeMS,paddingContentVertical:o.sizeSM,paddingContentHorizontalSM:o.size,paddingContentVerticalSM:o.sizeXS,marginXXS:o.sizeXXS,marginXS:o.sizeXS,marginSM:o.sizeSM,margin:o.size,marginMD:o.sizeMD,marginLG:o.sizeLG,marginXL:o.sizeXL,marginXXL:o.sizeXXL,boxShadow:` +'Noto Color Emoji'`,fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1});function O9(t,e){let{generateColorPalettes:n,generateNeutralColorPalettes:i}=e;const{colorSuccess:o,colorWarning:r,colorError:a,colorInfo:s,colorPrimary:l,colorBgBase:c,colorTextBase:u}=t,d=n(l),f=n(o),h=n(r),p=n(a),g=n(s),m=i(c,u);return A(A({},m),{colorPrimaryBg:d[1],colorPrimaryBgHover:d[2],colorPrimaryBorder:d[3],colorPrimaryBorderHover:d[4],colorPrimaryHover:d[5],colorPrimary:d[6],colorPrimaryActive:d[7],colorPrimaryTextHover:d[8],colorPrimaryText:d[9],colorPrimaryTextActive:d[10],colorSuccessBg:f[1],colorSuccessBgHover:f[2],colorSuccessBorder:f[3],colorSuccessBorderHover:f[4],colorSuccessHover:f[4],colorSuccess:f[6],colorSuccessActive:f[7],colorSuccessTextHover:f[8],colorSuccessText:f[9],colorSuccessTextActive:f[10],colorErrorBg:p[1],colorErrorBgHover:p[2],colorErrorBorder:p[3],colorErrorBorderHover:p[4],colorErrorHover:p[5],colorError:p[6],colorErrorActive:p[7],colorErrorTextHover:p[8],colorErrorText:p[9],colorErrorTextActive:p[10],colorWarningBg:h[1],colorWarningBgHover:h[2],colorWarningBorder:h[3],colorWarningBorderHover:h[4],colorWarningHover:h[4],colorWarning:h[6],colorWarningActive:h[7],colorWarningTextHover:h[8],colorWarningText:h[9],colorWarningTextActive:h[10],colorInfoBg:g[1],colorInfoBgHover:g[2],colorInfoBorder:g[3],colorInfoBorderHover:g[4],colorInfoHover:g[4],colorInfo:g[6],colorInfoActive:g[7],colorInfoTextHover:g[8],colorInfoText:g[9],colorInfoTextActive:g[10],colorBgMask:new Ot("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"})}const E9=t=>{let e=t,n=t,i=t,o=t;return t<6&&t>=5?e=t+1:t<16&&t>=6?e=t+2:t>=16&&(e=16),t<7&&t>=5?n=4:t<8&&t>=7?n=5:t<14&&t>=8?n=6:t<16&&t>=14?n=7:t>=16&&(n=8),t<6&&t>=2?i=1:t>=6&&(i=2),t>4&&t<8?o=4:t>=8&&(o=6),{borderRadius:t>16?16:t,borderRadiusXS:i,borderRadiusSM:n,borderRadiusLG:e,borderRadiusOuter:o}};function M9(t){const{motionUnit:e,motionBase:n,borderRadius:i,lineWidth:o}=t;return A({motionDurationFast:`${(n+e).toFixed(1)}s`,motionDurationMid:`${(n+e*2).toFixed(1)}s`,motionDurationSlow:`${(n+e*3).toFixed(1)}s`,lineWidthBold:o+1},E9(i))}const pr=(t,e)=>new Ot(t).setAlpha(e).toRgbString(),qc=(t,e)=>new Ot(t).darken(e).toHexString(),I9=t=>{const e=Is(t);return{1:e[0],2:e[1],3:e[2],4:e[3],5:e[4],6:e[5],7:e[6],8:e[4],9:e[5],10:e[6]}},k9=(t,e)=>{const n=t||"#fff",i=e||"#000";return{colorBgBase:n,colorTextBase:i,colorText:pr(i,.88),colorTextSecondary:pr(i,.65),colorTextTertiary:pr(i,.45),colorTextQuaternary:pr(i,.25),colorFill:pr(i,.15),colorFillSecondary:pr(i,.06),colorFillTertiary:pr(i,.04),colorFillQuaternary:pr(i,.02),colorBgLayout:qc(n,4),colorBgContainer:qc(n,0),colorBgElevated:qc(n,0),colorBgSpotlight:pr(i,.85),colorBorder:qc(n,15),colorBorderSecondary:qc(n,6)}};function D9(t){const e=new Array(10).fill(null).map((n,i)=>{const o=i-1,r=t*Math.pow(2.71828,o/5),a=i>1?Math.floor(r):Math.ceil(r);return Math.floor(a/2)*2});return e[1]=t,e.map(n=>{const i=n+8;return{size:n,lineHeight:i/n}})}const R9=t=>{const e=D9(t),n=e.map(o=>o.size),i=e.map(o=>o.lineHeight);return{fontSizeSM:n[0],fontSize:n[1],fontSizeLG:n[2],fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:i[1],lineHeightLG:i[2],lineHeightSM:i[0],lineHeightHeading1:i[6],lineHeightHeading2:i[5],lineHeightHeading3:i[4],lineHeightHeading4:i[3],lineHeightHeading5:i[2]}};function L9(t){const e=Object.keys(wD).map(n=>{const i=Is(t[n]);return new Array(10).fill(1).reduce((o,r,a)=>(o[`${n}-${a+1}`]=i[a],o),{})}).reduce((n,i)=>(n=A(A({},n),i),n),{});return A(A(A(A(A(A(A({},t),e),O9(t,{generateColorPalettes:I9,generateNeutralColorPalettes:k9})),R9(t.fontSize)),T9(t)),P9(t)),M9(t))}function ib(t){return t>=0&&t<=255}function Mf(t,e){const{r:n,g:i,b:o,a:r}=new Ot(t).toRgb();if(r<1)return t;const{r:a,g:s,b:l}=new Ot(e).toRgb();for(let c=.01;c<=1;c+=.01){const u=Math.round((n-a*(1-c))/c),d=Math.round((i-s*(1-c))/c),f=Math.round((o-l*(1-c))/c);if(ib(u)&&ib(d)&&ib(f))return new Ot({r:u,g:d,b:f,a:Math.round(c*100)/100}).toRgbString()}return new Ot({r:n,g:i,b:o,a:1}).toRgbString()}var F9=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{delete i[h]});const o=A(A({},n),i),r=480,a=576,s=768,l=992,c=1200,u=1600,d=2e3;return A(A(A({},o),{colorLink:o.colorInfoText,colorLinkHover:o.colorInfoHover,colorLinkActive:o.colorInfoActive,colorFillContent:o.colorFillSecondary,colorFillContentHover:o.colorFill,colorFillAlter:o.colorFillQuaternary,colorBgContainerDisabled:o.colorFillTertiary,colorBorderBg:o.colorBgContainer,colorSplit:Mf(o.colorBorderSecondary,o.colorBgContainer),colorTextPlaceholder:o.colorTextQuaternary,colorTextDisabled:o.colorTextQuaternary,colorTextHeading:o.colorText,colorTextLabel:o.colorTextSecondary,colorTextDescription:o.colorTextTertiary,colorTextLightSolid:o.colorWhite,colorHighlight:o.colorError,colorBgTextHover:o.colorFillSecondary,colorBgTextActive:o.colorFill,colorIcon:o.colorTextTertiary,colorIconHover:o.colorText,colorErrorOutline:Mf(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:Mf(o.colorWarningBg,o.colorBgContainer),fontSizeIcon:o.fontSizeSM,lineWidth:o.lineWidth,controlOutlineWidth:o.lineWidth*2,controlInteractiveSize:o.controlHeight/2,controlItemBgHover:o.colorFillTertiary,controlItemBgActive:o.colorPrimaryBg,controlItemBgActiveHover:o.colorPrimaryBgHover,controlItemBgActiveDisabled:o.colorFill,controlTmpOutline:o.colorFillQuaternary,controlOutline:Mf(o.colorPrimaryBg,o.colorBgContainer),lineType:o.lineType,borderRadius:o.borderRadius,borderRadiusXS:o.borderRadiusXS,borderRadiusSM:o.borderRadiusSM,borderRadiusLG:o.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:o.sizeXXS,paddingXS:o.sizeXS,paddingSM:o.sizeSM,padding:o.size,paddingMD:o.sizeMD,paddingLG:o.sizeLG,paddingXL:o.sizeXL,paddingContentHorizontalLG:o.sizeLG,paddingContentVerticalLG:o.sizeMS,paddingContentHorizontal:o.sizeMS,paddingContentVertical:o.sizeSM,paddingContentHorizontalSM:o.size,paddingContentVerticalSM:o.sizeXS,marginXXS:o.sizeXXS,marginXS:o.sizeXS,marginSM:o.sizeSM,margin:o.size,marginMD:o.sizeMD,marginLG:o.sizeLG,marginXL:o.sizeXL,marginXXL:o.sizeXXL,boxShadow:` 0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02) @@ -54,18 +54,18 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Dashboard-Dnj2e 0 -6px 16px 0 rgba(0, 0, 0, 0.08), 0 -3px 6px -4px rgba(0, 0, 0, 0.12), 0 -9px 28px 8px rgba(0, 0, 0, 0.05) - `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),i)}const dm=t=>({color:t.colorLink,textDecoration:"none",outline:"none",cursor:"pointer",transition:`color ${t.motionDurationSlow}`,"&:focus, &:hover":{color:t.colorLinkHover},"&:active":{color:t.colorLinkActive}}),Kw=(t,e,n,i,o)=>{const r=t/2,a=0,s=r,l=n*1/Math.sqrt(2),c=r-n*(1-1/Math.sqrt(2)),u=r-e*(1/Math.sqrt(2)),d=n*(Math.sqrt(2)-1)+e*(1/Math.sqrt(2)),f=2*r-u,h=d,p=2*r-l,g=c,m=2*r-a,v=s,b=r*Math.sqrt(2)+n*(Math.sqrt(2)-2),y=n*(Math.sqrt(2)-1);return{pointerEvents:"none",width:t,height:t,overflow:"hidden","&::after":{content:'""',position:"absolute",width:b,height:b,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${e}px 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:o,zIndex:0,background:"transparent"},"&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:t,height:t/2,background:i,clipPath:{_multi_value_:!0,value:[`polygon(${y}px 100%, 50% ${y}px, ${2*r-y}px 100%, ${y}px 100%)`,`path('M ${a} ${s} A ${n} ${n} 0 0 0 ${l} ${c} L ${u} ${d} A ${e} ${e} 0 0 1 ${f} ${h} L ${p} ${g} A ${n} ${n} 0 0 0 ${m} ${v} Z')`]},content:'""'}}};function Tp(t,e){return dd.reduce((n,i)=>{const o=t[`${i}-1`],r=t[`${i}-3`],a=t[`${i}-6`],s=t[`${i}-7`];return A(A({},n),e(i,{lightColor:o,lightBorderColor:r,darkColor:a,textColor:s}))},{})}const un={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},rt=t=>({boxSizing:"border-box",margin:0,padding:0,color:t.colorText,fontSize:t.fontSize,lineHeight:t.lineHeight,listStyle:"none",fontFamily:t.fontFamily}),qs=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),Do=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),B9=t=>({a:{color:t.colorLink,textDecoration:t.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${t.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:t.colorLinkHover},"&:active":{color:t.colorLinkActive},"&:active,\n &:hover":{textDecoration:t.linkHoverDecoration,outline:0},"&:focus":{textDecoration:t.linkFocusDecoration,outline:0},"&[disabled]":{color:t.colorTextDisabled,cursor:"not-allowed"}}}),z9=(t,e)=>{const{fontFamily:n,fontSize:i}=t,o=`[class^="${e}"], [class*=" ${e}"]`;return{[o]:{fontFamily:n,fontSize:i,boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"},[o]:{boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}}}}},zr=t=>({outline:`${t.lineWidthBold}px solid ${t.colorPrimaryBorder}`,outlineOffset:1,transition:"outline-offset 0s, outline 0s"}),Hr=t=>({"&:focus-visible":A({},zr(t))});function et(t,e,n){return i=>{const o=L(()=>i==null?void 0:i.value),[r,a,s]=Xr(),{getPrefixCls:l,iconPrefixCls:c}=rm(),u=L(()=>l()),d=L(()=>({theme:r.value,token:a.value,hashId:s.value,path:["Shared",u.value]}));cy(d,()=>[{"&":B9(a.value)}]);const f=L(()=>({theme:r.value,token:a.value,hashId:s.value,path:[t,o.value,c.value]}));return[cy(f,()=>{const{token:h,flush:p}=W9(a.value),g=typeof n=="function"?n(h):n,m=A(A({},g),a.value[t]),v=`.${o.value}`,b=Ve(h,{componentCls:v,prefixCls:o.value,iconCls:`.${c.value}`,antCls:`.${u.value}`},m),y=e(b,{hashId:s.value,prefixCls:o.value,rootPrefixCls:u.value,iconPrefixCls:c.value,overrideComponentToken:a.value[t]});return p(t,m),[z9(a.value,o.value),y]}),s]}}const SD=typeof CSSINJS_STATISTIC<"u";let hy=!0;function Ve(){for(var t=arguments.length,e=new Array(t),n=0;n{Object.keys(o).forEach(a=>{Object.defineProperty(i,a,{configurable:!0,enumerable:!0,get:()=>o[a]})})}),hy=!0,i}function H9(){}function W9(t){let e,n=t,i=H9;return SD&&(e=new Set,n=new Proxy(t,{get(o,r){return hy&&e.add(r),o[r]}}),i=(o,r)=>{Array.from(e)}),{token:n,keys:e,flush:i}}const j9=lD(L9),CD={token:um,hashed:!0},$D=Symbol("DesignTokenContext"),py=ie(),V9=t=>{ot($D,t),ye(t,()=>{py.value=Yt(t),OI(py)},{immediate:!0,deep:!0})},X9=oe({props:{value:Fe()},setup(t,e){let{slots:n}=e;return V9(L(()=>t.value)),()=>{var i;return(i=n.default)===null||i===void 0?void 0:i.call(n)}}});function Xr(){const t=qe($D,L(()=>py.value||CD)),e=L(()=>`${vD}-${t.value.hashed||""}`),n=L(()=>t.value.theme||j9),i=R7(n,L(()=>[um,t.value.token]),L(()=>({salt:e.value,override:A({override:t.value.token},t.value.components),formatToken:N9})));return[n,L(()=>i.value[0]),L(()=>t.value.hashed?i.value[1]:"")]}const Uw=oe({compatConfig:{MODE:3},setup(){const[,t]=Xr(),e=L(()=>new Ot(t.value.colorBgBase).toHsl().l<.5?{opacity:.65}:{});return()=>C("svg",{style:e.value,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},[C("g",{fill:"none","fill-rule":"evenodd"},[C("g",{transform:"translate(24 31.67)"},[C("ellipse",{"fill-opacity":".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"},null),C("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"},null),C("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"},null),C("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"},null),C("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"},null)]),C("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"},null),C("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},[C("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"},null),C("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"},null)])])])}});Uw.PRESENTED_IMAGE_DEFAULT=!0;const AD=oe({compatConfig:{MODE:3},setup(){const[,t]=Xr(),e=L(()=>{const{colorFill:n,colorFillTertiary:i,colorFillQuaternary:o,colorBgContainer:r}=t.value;return{borderColor:new Ot(n).onBackground(r).toHexString(),shadowColor:new Ot(i).onBackground(r).toHexString(),contentColor:new Ot(o).onBackground(r).toHexString()}});return()=>C("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},[C("g",{transform:"translate(0 1)",fill:"none","fill-rule":"evenodd"},[C("ellipse",{fill:e.value.shadowColor,cx:"32",cy:"33",rx:"32",ry:"7"},null),C("g",{"fill-rule":"nonzero",stroke:e.value.borderColor},[C("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"},null),C("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:e.value.contentColor},null)])])])}});AD.PRESENTED_IMAGE_SIMPLE=!0;const Y9=t=>{const{componentCls:e,margin:n,marginXS:i,marginXL:o,fontSize:r,lineHeight:a}=t;return{[e]:{marginInline:i,fontSize:r,lineHeight:a,textAlign:"center",[`${e}-image`]:{height:t.emptyImgHeight,marginBottom:i,opacity:t.opacityImage,img:{height:"100%"},svg:{height:"100%",margin:"auto"}},[`${e}-footer`]:{marginTop:n},"&-normal":{marginBlock:o,color:t.colorTextDisabled,[`${e}-image`]:{height:t.emptyImgHeightMD}},"&-small":{marginBlock:i,color:t.colorTextDisabled,[`${e}-image`]:{height:t.emptyImgHeightSM}}}}},G9=et("Empty",t=>{const{componentCls:e,controlHeightLG:n}=t,i=Ve(t,{emptyImgCls:`${e}-img`,emptyImgHeight:n*2.5,emptyImgHeightMD:n,emptyImgHeightSM:n*.875});return[Y9(i)]});var K9=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o({prefixCls:String,imageStyle:Fe(),image:Rt(),description:Rt()}),qw=oe({name:"AEmpty",compatConfig:{MODE:3},inheritAttrs:!1,props:U9(),setup(t,e){let{slots:n={},attrs:i}=e;const{direction:o,prefixCls:r}=Me("empty",t),[a,s]=G9(r);return()=>{var l,c;const u=r.value,d=A(A({},t),i),{image:f=((l=n.image)===null||l===void 0?void 0:l.call(n))||ar(Uw),description:h=((c=n.description)===null||c===void 0?void 0:c.call(n))||void 0,imageStyle:p,class:g=""}=d,m=K9(d,["image","description","imageStyle","class"]),v=typeof f=="function"?f():f,b=typeof v=="object"&&"type"in v&&v.type.PRESENTED_IMAGE_SIMPLE;return a(C(Us,{componentName:"Empty",children:y=>{const w=typeof h<"u"?h:y.description,x=typeof w=="string"?w:"empty";let $=null;return typeof v=="string"?$=C("img",{alt:x,src:v},null):$=v,C("div",H({class:ce(u,g,s.value,{[`${u}-normal`]:b,[`${u}-rtl`]:o.value==="rtl"})},m),[C("div",{class:`${u}-image`,style:p},[$]),w&&C("p",{class:`${u}-description`},[w]),n.default&&C("div",{class:`${u}-footer`},[Kt(n.default())])])}},null))}}});qw.PRESENTED_IMAGE_DEFAULT=()=>ar(Uw);qw.PRESENTED_IMAGE_SIMPLE=()=>ar(AD);const pa=Vt(qw),Zw=t=>{const{prefixCls:e}=Me("empty",t);return(i=>{switch(i){case"Table":case"List":return C(pa,{image:pa.PRESENTED_IMAGE_SIMPLE},null);case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return C(pa,{image:pa.PRESENTED_IMAGE_SIMPLE,class:`${e.value}-small`},null);default:return C(pa,null,null)}})(t.componentName)};function q9(t){return C(Zw,{componentName:t},null)}const _D=Symbol("SizeContextKey"),PD=()=>qe(_D,se(void 0)),TD=t=>{const e=PD();return ot(_D,L(()=>t.value||e.value)),t},Me=(t,e)=>{const n=PD(),i=Oi(),o=qe(Vw,A(A({},Gk),{renderEmpty:S=>ar(Zw,{componentName:S})})),r=L(()=>o.getPrefixCls(t,e.prefixCls)),a=L(()=>{var S,_;return(S=e.direction)!==null&&S!==void 0?S:(_=o.direction)===null||_===void 0?void 0:_.value}),s=L(()=>{var S;return(S=e.iconPrefixCls)!==null&&S!==void 0?S:o.iconPrefixCls.value}),l=L(()=>o.getPrefixCls()),c=L(()=>{var S;return(S=o.autoInsertSpaceInButton)===null||S===void 0?void 0:S.value}),u=o.renderEmpty,d=o.space,f=o.pageHeader,h=o.form,p=L(()=>{var S,_;return(S=e.getTargetContainer)!==null&&S!==void 0?S:(_=o.getTargetContainer)===null||_===void 0?void 0:_.value}),g=L(()=>{var S,_,P;return(_=(S=e.getContainer)!==null&&S!==void 0?S:e.getPopupContainer)!==null&&_!==void 0?_:(P=o.getPopupContainer)===null||P===void 0?void 0:P.value}),m=L(()=>{var S,_;return(S=e.dropdownMatchSelectWidth)!==null&&S!==void 0?S:(_=o.dropdownMatchSelectWidth)===null||_===void 0?void 0:_.value}),v=L(()=>{var S;return(e.virtual===void 0?((S=o.virtual)===null||S===void 0?void 0:S.value)!==!1:e.virtual!==!1)&&m.value!==!1}),b=L(()=>e.size||n.value),y=L(()=>{var S,_,P;return(S=e.autocomplete)!==null&&S!==void 0?S:(P=(_=o.input)===null||_===void 0?void 0:_.value)===null||P===void 0?void 0:P.autocomplete}),w=L(()=>{var S;return(S=e.disabled)!==null&&S!==void 0?S:i.value}),x=L(()=>{var S;return(S=e.csp)!==null&&S!==void 0?S:o.csp}),$=L(()=>{var S,_;return(S=e.wave)!==null&&S!==void 0?S:(_=o.wave)===null||_===void 0?void 0:_.value});return{configProvider:o,prefixCls:r,direction:a,size:b,getTargetContainer:p,getPopupContainer:g,space:d,pageHeader:f,form:h,autoInsertSpaceInButton:c,renderEmpty:u,virtual:v,dropdownMatchSelectWidth:m,rootPrefixCls:l,getPrefixCls:o.getPrefixCls,autocomplete:y,csp:x,iconPrefixCls:s,disabled:w,select:o.select,wave:$}};function ht(t,e){const n=A({},t);for(let i=0;i{const{componentCls:e}=t;return{[e]:{position:"fixed",zIndex:t.zIndexPopup}}},J9=et("Affix",t=>{const e=Ve(t,{zIndexPopup:t.zIndexBase+10});return[Z9(e)]});function Q9(){return typeof window<"u"?window:null}var Rl;(function(t){t[t.None=0]="None",t[t.Prepare=1]="Prepare"})(Rl||(Rl={}));const eW=()=>({offsetTop:Number,offsetBottom:Number,target:{type:Function,default:Q9},prefixCls:String,onChange:Function,onTestUpdatePosition:Function}),tW=oe({compatConfig:{MODE:3},name:"AAffix",inheritAttrs:!1,props:eW(),setup(t,e){let{slots:n,emit:i,expose:o,attrs:r}=e;const a=ie(),s=ie(),l=$t({affixStyle:void 0,placeholderStyle:void 0,status:Rl.None,lastAffix:!1,prevTarget:null,timeout:null}),c=Cn(),u=L(()=>t.offsetBottom===void 0&&t.offsetTop===void 0?0:t.offsetTop),d=L(()=>t.offsetBottom),f=()=>{const{status:y,lastAffix:w}=l,{target:x}=t;if(y!==Rl.Prepare||!s.value||!a.value||!x)return;const $=x();if(!$)return;const S={status:Rl.None},_=$f(a.value);if(_.top===0&&_.left===0&&_.width===0&&_.height===0)return;const P=$f($),O=yA(_,P,u.value),T=xA(_,P,d.value);if(!(_.top===0&&_.left===0&&_.width===0&&_.height===0)){if(O!==void 0){const M=`${_.width}px`,I=`${_.height}px`;S.affixStyle={position:"fixed",top:O,width:M,height:I},S.placeholderStyle={width:M,height:I}}else if(T!==void 0){const M=`${_.width}px`,I=`${_.height}px`;S.affixStyle={position:"fixed",bottom:T,width:M,height:I},S.placeholderStyle={width:M,height:I}}S.lastAffix=!!S.affixStyle,w!==S.lastAffix&&i("change",S.lastAffix),A(l,S)}},h=()=>{A(l,{status:Rl.Prepare,affixStyle:void 0,placeholderStyle:void 0})},p=iy(()=>{h()}),g=iy(()=>{const{target:y}=t,{affixStyle:w}=l;if(y&&w){const x=y();if(x&&a.value){const $=$f(x),S=$f(a.value),_=yA(S,$,u.value),P=xA(S,$,d.value);if(_!==void 0&&w.top===_||P!==void 0&&w.bottom===P)return}}h()});o({updatePosition:p,lazyUpdatePosition:g}),ye(()=>t.target,y=>{const w=(y==null?void 0:y())||null;l.prevTarget!==w&&(SA(c),w&&(wA(w,c),p()),l.prevTarget=w)}),ye(()=>[t.offsetTop,t.offsetBottom],p),Ze(()=>{const{target:y}=t;y&&(l.timeout=setTimeout(()=>{wA(y(),c),p()}))}),ri(()=>{f()}),Xn(()=>{clearTimeout(l.timeout),SA(c),p.cancel(),g.cancel()});const{prefixCls:m}=Me("affix",t),[v,b]=J9(m);return()=>{var y;const{affixStyle:w,placeholderStyle:x,status:$}=l,S=ce({[m.value]:w,[b.value]:!0}),_=ht(t,["prefixCls","offsetTop","offsetBottom","target","onChange","onTestUpdatePosition"]);return v(C(mo,{onResize:p},{default:()=>[C("div",H(H(H({},_),r),{},{ref:a,"data-measure-status":$}),[w&&C("div",{style:x,"aria-hidden":"true"},null),C("div",{class:S,ref:s,style:w},[(y=n.default)===null||y===void 0?void 0:y.call(n)])])]}))}}}),OD=Vt(tW);function WA(t){return typeof t=="object"&&t!=null&&t.nodeType===1}function jA(t,e){return(!e||t!=="hidden")&&t!=="visible"&&t!=="clip"}function ob(t,e){if(t.clientHeighte||r>t&&a=e&&s>=n?r-t-i:a>e&&sn?a-e+o:0}var VA=function(t,e){var n=window,i=e.scrollMode,o=e.block,r=e.inline,a=e.boundary,s=e.skipOverflowHiddenElements,l=typeof a=="function"?a:function(te){return te!==a};if(!WA(t))throw new TypeError("Invalid target");for(var c,u,d=document.scrollingElement||document.documentElement,f=[],h=t;WA(h)&&l(h);){if((h=(u=(c=h).parentElement)==null?c.getRootNode().host||null:u)===d){f.push(h);break}h!=null&&h===document.body&&ob(h)&&!ob(document.documentElement)||h!=null&&ob(h,s)&&f.push(h)}for(var p=n.visualViewport?n.visualViewport.width:innerWidth,g=n.visualViewport?n.visualViewport.height:innerHeight,m=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,b=t.getBoundingClientRect(),y=b.height,w=b.width,x=b.top,$=b.right,S=b.bottom,_=b.left,P=o==="start"||o==="nearest"?x:o==="end"?S:x+y/2,O=r==="center"?_+w/2:r==="end"?$:_,T=[],M=0;M=0&&_>=0&&S<=g&&$<=p&&x>=D&&S<=N&&_>=B&&$<=F)return T;var z=getComputedStyle(I),W=parseInt(z.borderLeftWidth,10),j=parseInt(z.borderTopWidth,10),U=parseInt(z.borderRightWidth,10),V=parseInt(z.borderBottomWidth,10),q=0,Y=0,J="offsetWidth"in I?I.offsetWidth-I.clientWidth-W-U:0,Q="offsetHeight"in I?I.offsetHeight-I.clientHeight-j-V:0,G="offsetWidth"in I?I.offsetWidth===0?0:R/I.offsetWidth:0,ee="offsetHeight"in I?I.offsetHeight===0?0:E/I.offsetHeight:0;if(d===I)q=o==="start"?P:o==="end"?P-g:o==="nearest"?Mf(v,v+g,g,j,V,v+P,v+P+y,y):P-g/2,Y=r==="start"?O:r==="center"?O-p/2:r==="end"?O-p:Mf(m,m+p,p,W,U,m+O,m+O+w,w),q=Math.max(0,q+v),Y=Math.max(0,Y+m);else{q=o==="start"?P-D-j:o==="end"?P-N+V+Q:o==="nearest"?Mf(D,N,E,j,V+Q,P,P+y,y):P-(D+E/2)+Q/2,Y=r==="start"?O-B-W:r==="center"?O-(B+R/2)+J/2:r==="end"?O-F+U+J:Mf(B,F,R,W,U+J,O,O+w,w);var X=I.scrollLeft,K=I.scrollTop;P+=K-(q=Math.max(0,Math.min(K+q/ee,I.scrollHeight-E/ee+Q))),O+=X-(Y=Math.max(0,Math.min(X+Y/G,I.scrollWidth-R/G+J)))}T.push({el:I,top:q,left:Y})}return T};function ED(t){return t===Object(t)&&Object.keys(t).length!==0}function nW(t,e){e===void 0&&(e="auto");var n="scrollBehavior"in document.body.style;t.forEach(function(i){var o=i.el,r=i.top,a=i.left;o.scroll&&n?o.scroll({top:r,left:a,behavior:e}):(o.scrollTop=r,o.scrollLeft=a)})}function iW(t){return t===!1?{block:"end",inline:"nearest"}:ED(t)?t:{block:"start",inline:"nearest"}}function MD(t,e){var n=t.isConnected||t.ownerDocument.documentElement.contains(t);if(ED(e)&&typeof e.behavior=="function")return e.behavior(n?VA(t,e):[]);if(n){var i=iW(e);return nW(VA(t,i),i.behavior)}}function oW(t,e,n,i){const o=n-e;return t/=i/2,t<1?o/2*t*t*t+e:o/2*((t-=2)*t*t+2)+e}function gy(t){return t!=null&&t===t.window}function Jw(t,e){var n,i;if(typeof window>"u")return 0;const o="scrollTop";let r=0;return gy(t)?r=t.scrollY:t instanceof Document?r=t.documentElement[o]:(t instanceof HTMLElement||t)&&(r=t[o]),t&&!gy(t)&&typeof r!="number"&&(r=(i=((n=t.ownerDocument)!==null&&n!==void 0?n:t).documentElement)===null||i===void 0?void 0:i[o]),r}function Qw(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:n=()=>window,callback:i,duration:o=450}=e,r=n(),a=Jw(r),s=Date.now(),l=()=>{const u=Date.now()-s,d=oW(u>o?o:u,a,t,o);gy(r)?r.scrollTo(window.scrollX,d):r instanceof Document?r.documentElement.scrollTop=d:r.scrollTop=d,u{ot(ID,t)},aW=()=>qe(ID,{registerLink:If,unregisterLink:If,scrollTo:If,activeLink:L(()=>""),handleClick:If,direction:L(()=>"vertical")}),sW=t=>{const{componentCls:e,holderOffsetBlock:n,motionDurationSlow:i,lineWidthBold:o,colorPrimary:r,lineType:a,colorSplit:s}=t;return{[`${e}-wrapper`]:{marginBlockStart:-n,paddingBlockStart:n,backgroundColor:"transparent",[e]:A(A({},rt(t)),{position:"relative",paddingInlineStart:o,[`${e}-link`]:{paddingBlock:t.anchorPaddingBlock,paddingInline:`${t.anchorPaddingInline}px 0`,"&-title":A(A({},un),{position:"relative",display:"block",marginBlockEnd:t.anchorTitleBlock,color:t.colorText,transition:`all ${t.motionDurationSlow}`,"&:only-child":{marginBlockEnd:0}}),[`&-active > ${e}-link-title`]:{color:t.colorPrimary},[`${e}-link`]:{paddingBlock:t.anchorPaddingBlockSecondary}}}),[`&:not(${e}-wrapper-horizontal)`]:{[e]:{"&::before":{position:"absolute",left:{_skip_check_:!0,value:0},top:0,height:"100%",borderInlineStart:`${o}px ${a} ${s}`,content:'" "'},[`${e}-ink`]:{position:"absolute",left:{_skip_check_:!0,value:0},display:"none",transform:"translateY(-50%)",transition:`top ${i} ease-in-out`,width:o,backgroundColor:r,[`&${e}-ink-visible`]:{display:"inline-block"}}}},[`${e}-fixed ${e}-ink ${e}-ink`]:{display:"none"}}}},lW=t=>{const{componentCls:e,motionDurationSlow:n,lineWidthBold:i,colorPrimary:o}=t;return{[`${e}-wrapper-horizontal`]:{position:"relative","&::before":{position:"absolute",left:{_skip_check_:!0,value:0},right:{_skip_check_:!0,value:0},bottom:0,borderBottom:`1px ${t.lineType} ${t.colorSplit}`,content:'" "'},[e]:{overflowX:"scroll",position:"relative",display:"flex",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},[`${e}-link:first-of-type`]:{paddingInline:0},[`${e}-ink`]:{position:"absolute",bottom:0,transition:`left ${n} ease-in-out, width ${n} ease-in-out`,height:i,backgroundColor:o}}}}},cW=et("Anchor",t=>{const{fontSize:e,fontSizeLG:n,padding:i,paddingXXS:o}=t,r=Ve(t,{holderOffsetBlock:o,anchorPaddingBlock:o,anchorPaddingBlockSecondary:o/2,anchorPaddingInline:i,anchorTitleBlock:e/14*3,anchorBallSize:n/2});return[sW(r),lW(r)]}),uW=()=>({prefixCls:String,href:String,title:Rt(),target:String,customTitleProps:Fe()}),e1=oe({compatConfig:{MODE:3},name:"AAnchorLink",inheritAttrs:!1,props:ct(uW(),{href:"#"}),slots:Object,setup(t,e){let{slots:n,attrs:i}=e,o=null;const{handleClick:r,scrollTo:a,unregisterLink:s,registerLink:l,activeLink:c}=aW(),{prefixCls:u}=Me("anchor",t),d=f=>{const{href:h}=t;r(f,{title:o,href:h}),a(h)};return ye(()=>t.href,(f,h)=>{pt(()=>{s(h),l(f)})}),Ze(()=>{l(t.href)}),at(()=>{s(t.href)}),()=>{var f;const{href:h,target:p,title:g=n.title,customTitleProps:m={}}=t,v=u.value;o=typeof g=="function"?g(m):g;const b=c.value===h,y=ce(`${v}-link`,{[`${v}-link-active`]:b},i.class),w=ce(`${v}-link-title`,{[`${v}-link-title-active`]:b});return C("div",H(H({},i),{},{class:y}),[C("a",{class:w,href:h,title:typeof o=="string"?o:"",target:p,onClick:d},[n.customTitle?n.customTitle(m):o]),(f=n.default)===null||f===void 0?void 0:f.call(n)])}}});function dW(t,e){for(var n=0;n=0||(o[n]=t[n]);return o}function XA(t){return((e=t)!=null&&typeof e=="object"&&Array.isArray(e)===!1)==1&&Object.prototype.toString.call(t)==="[object Object]";var e}var LD=Object.prototype,FD=LD.toString,fW=LD.hasOwnProperty,ND=/^\s*function (\w+)/;function YA(t){var e,n=(e=t==null?void 0:t.type)!==null&&e!==void 0?e:t;if(n){var i=n.toString().match(ND);return i?i[1]:""}return""}var ks=function(t){var e,n;return XA(t)!==!1&&typeof(e=t.constructor)=="function"&&XA(n=e.prototype)!==!1&&n.hasOwnProperty("isPrototypeOf")!==!1},hW=function(t){return t},Vi=hW,fd=function(t,e){return fW.call(t,e)},pW=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t},uc=Array.isArray||function(t){return FD.call(t)==="[object Array]"},dc=function(t){return FD.call(t)==="[object Function]"},Op=function(t){return ks(t)&&fd(t,"_vueTypes_name")},BD=function(t){return ks(t)&&(fd(t,"type")||["_vueTypes_name","validator","default","required"].some(function(e){return fd(t,e)}))};function t1(t,e){return Object.defineProperty(t.bind(e),"__original",{value:t})}function Zs(t,e,n){var i,o=!0,r="";i=ks(t)?t:{type:t};var a=Op(i)?i._vueTypes_name+" - ":"";if(BD(i)&&i.type!==null){if(i.type===void 0||i.type===!0||!i.required&&e===void 0)return o;uc(i.type)?(o=i.type.some(function(d){return Zs(d,e)===!0}),r=i.type.map(function(d){return YA(d)}).join(" or ")):o=(r=YA(i))==="Array"?uc(e):r==="Object"?ks(e):r==="String"||r==="Number"||r==="Boolean"||r==="Function"?function(d){if(d==null)return"";var f=d.constructor.toString().match(ND);return f?f[1]:""}(e)===r:e instanceof i.type}if(!o){var s=a+'value "'+e+'" should be of type "'+r+'"';return s}if(fd(i,"validator")&&dc(i.validator)){var l=Vi,c=[];if(Vi=function(d){c.push(d)},o=i.validator(e),Vi=l,!o){var u=(c.length>1?"* ":"")+c.join(` + `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),i)}const fm=t=>({color:t.colorLink,textDecoration:"none",outline:"none",cursor:"pointer",transition:`color ${t.motionDurationSlow}`,"&:focus, &:hover":{color:t.colorLinkHover},"&:active":{color:t.colorLinkActive}}),Kw=(t,e,n,i,o)=>{const r=t/2,a=0,s=r,l=n*1/Math.sqrt(2),c=r-n*(1-1/Math.sqrt(2)),u=r-e*(1/Math.sqrt(2)),d=n*(Math.sqrt(2)-1)+e*(1/Math.sqrt(2)),f=2*r-u,h=d,p=2*r-l,g=c,m=2*r-a,v=s,b=r*Math.sqrt(2)+n*(Math.sqrt(2)-2),y=n*(Math.sqrt(2)-1);return{pointerEvents:"none",width:t,height:t,overflow:"hidden","&::after":{content:'""',position:"absolute",width:b,height:b,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${e}px 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:o,zIndex:0,background:"transparent"},"&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:t,height:t/2,background:i,clipPath:{_multi_value_:!0,value:[`polygon(${y}px 100%, 50% ${y}px, ${2*r-y}px 100%, ${y}px 100%)`,`path('M ${a} ${s} A ${n} ${n} 0 0 0 ${l} ${c} L ${u} ${d} A ${e} ${e} 0 0 1 ${f} ${h} L ${p} ${g} A ${n} ${n} 0 0 0 ${m} ${v} Z')`]},content:'""'}}};function Op(t,e){return fd.reduce((n,i)=>{const o=t[`${i}-1`],r=t[`${i}-3`],a=t[`${i}-6`],s=t[`${i}-7`];return A(A({},n),e(i,{lightColor:o,lightBorderColor:r,darkColor:a,textColor:s}))},{})}const un={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},rt=t=>({boxSizing:"border-box",margin:0,padding:0,color:t.colorText,fontSize:t.fontSize,lineHeight:t.lineHeight,listStyle:"none",fontFamily:t.fontFamily}),qs=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),Do=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),B9=t=>({a:{color:t.colorLink,textDecoration:t.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${t.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:t.colorLinkHover},"&:active":{color:t.colorLinkActive},"&:active,\n &:hover":{textDecoration:t.linkHoverDecoration,outline:0},"&:focus":{textDecoration:t.linkFocusDecoration,outline:0},"&[disabled]":{color:t.colorTextDisabled,cursor:"not-allowed"}}}),z9=(t,e)=>{const{fontFamily:n,fontSize:i}=t,o=`[class^="${e}"], [class*=" ${e}"]`;return{[o]:{fontFamily:n,fontSize:i,boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"},[o]:{boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}}}}},zr=t=>({outline:`${t.lineWidthBold}px solid ${t.colorPrimaryBorder}`,outlineOffset:1,transition:"outline-offset 0s, outline 0s"}),Hr=t=>({"&:focus-visible":A({},zr(t))});function et(t,e,n){return i=>{const o=L(()=>i==null?void 0:i.value),[r,a,s]=Xr(),{getPrefixCls:l,iconPrefixCls:c}=am(),u=L(()=>l()),d=L(()=>({theme:r.value,token:a.value,hashId:s.value,path:["Shared",u.value]}));cy(d,()=>[{"&":B9(a.value)}]);const f=L(()=>({theme:r.value,token:a.value,hashId:s.value,path:[t,o.value,c.value]}));return[cy(f,()=>{const{token:h,flush:p}=W9(a.value),g=typeof n=="function"?n(h):n,m=A(A({},g),a.value[t]),v=`.${o.value}`,b=Ve(h,{componentCls:v,prefixCls:o.value,iconCls:`.${c.value}`,antCls:`.${u.value}`},m),y=e(b,{hashId:s.value,prefixCls:o.value,rootPrefixCls:u.value,iconPrefixCls:c.value,overrideComponentToken:a.value[t]});return p(t,m),[z9(a.value,o.value),y]}),s]}}const SD=typeof CSSINJS_STATISTIC<"u";let hy=!0;function Ve(){for(var t=arguments.length,e=new Array(t),n=0;n{Object.keys(o).forEach(a=>{Object.defineProperty(i,a,{configurable:!0,enumerable:!0,get:()=>o[a]})})}),hy=!0,i}function H9(){}function W9(t){let e,n=t,i=H9;return SD&&(e=new Set,n=new Proxy(t,{get(o,r){return hy&&e.add(r),o[r]}}),i=(o,r)=>{Array.from(e)}),{token:n,keys:e,flush:i}}const j9=lD(L9),CD={token:dm,hashed:!0},$D=Symbol("DesignTokenContext"),py=ie(),V9=t=>{ot($D,t),ye(t,()=>{py.value=Yt(t),OI(py)},{immediate:!0,deep:!0})},X9=oe({props:{value:Fe()},setup(t,e){let{slots:n}=e;return V9(L(()=>t.value)),()=>{var i;return(i=n.default)===null||i===void 0?void 0:i.call(n)}}});function Xr(){const t=qe($D,L(()=>py.value||CD)),e=L(()=>`${vD}-${t.value.hashed||""}`),n=L(()=>t.value.theme||j9),i=R7(n,L(()=>[dm,t.value.token]),L(()=>({salt:e.value,override:A({override:t.value.token},t.value.components),formatToken:N9})));return[n,L(()=>i.value[0]),L(()=>t.value.hashed?i.value[1]:"")]}const Uw=oe({compatConfig:{MODE:3},setup(){const[,t]=Xr(),e=L(()=>new Ot(t.value.colorBgBase).toHsl().l<.5?{opacity:.65}:{});return()=>C("svg",{style:e.value,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},[C("g",{fill:"none","fill-rule":"evenodd"},[C("g",{transform:"translate(24 31.67)"},[C("ellipse",{"fill-opacity":".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"},null),C("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"},null),C("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"},null),C("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"},null),C("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"},null)]),C("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"},null),C("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},[C("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"},null),C("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"},null)])])])}});Uw.PRESENTED_IMAGE_DEFAULT=!0;const AD=oe({compatConfig:{MODE:3},setup(){const[,t]=Xr(),e=L(()=>{const{colorFill:n,colorFillTertiary:i,colorFillQuaternary:o,colorBgContainer:r}=t.value;return{borderColor:new Ot(n).onBackground(r).toHexString(),shadowColor:new Ot(i).onBackground(r).toHexString(),contentColor:new Ot(o).onBackground(r).toHexString()}});return()=>C("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},[C("g",{transform:"translate(0 1)",fill:"none","fill-rule":"evenodd"},[C("ellipse",{fill:e.value.shadowColor,cx:"32",cy:"33",rx:"32",ry:"7"},null),C("g",{"fill-rule":"nonzero",stroke:e.value.borderColor},[C("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"},null),C("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:e.value.contentColor},null)])])])}});AD.PRESENTED_IMAGE_SIMPLE=!0;const Y9=t=>{const{componentCls:e,margin:n,marginXS:i,marginXL:o,fontSize:r,lineHeight:a}=t;return{[e]:{marginInline:i,fontSize:r,lineHeight:a,textAlign:"center",[`${e}-image`]:{height:t.emptyImgHeight,marginBottom:i,opacity:t.opacityImage,img:{height:"100%"},svg:{height:"100%",margin:"auto"}},[`${e}-footer`]:{marginTop:n},"&-normal":{marginBlock:o,color:t.colorTextDisabled,[`${e}-image`]:{height:t.emptyImgHeightMD}},"&-small":{marginBlock:i,color:t.colorTextDisabled,[`${e}-image`]:{height:t.emptyImgHeightSM}}}}},G9=et("Empty",t=>{const{componentCls:e,controlHeightLG:n}=t,i=Ve(t,{emptyImgCls:`${e}-img`,emptyImgHeight:n*2.5,emptyImgHeightMD:n,emptyImgHeightSM:n*.875});return[Y9(i)]});var K9=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o({prefixCls:String,imageStyle:Fe(),image:Rt(),description:Rt()}),qw=oe({name:"AEmpty",compatConfig:{MODE:3},inheritAttrs:!1,props:U9(),setup(t,e){let{slots:n={},attrs:i}=e;const{direction:o,prefixCls:r}=Me("empty",t),[a,s]=G9(r);return()=>{var l,c;const u=r.value,d=A(A({},t),i),{image:f=((l=n.image)===null||l===void 0?void 0:l.call(n))||ar(Uw),description:h=((c=n.description)===null||c===void 0?void 0:c.call(n))||void 0,imageStyle:p,class:g=""}=d,m=K9(d,["image","description","imageStyle","class"]),v=typeof f=="function"?f():f,b=typeof v=="object"&&"type"in v&&v.type.PRESENTED_IMAGE_SIMPLE;return a(C(Us,{componentName:"Empty",children:y=>{const w=typeof h<"u"?h:y.description,x=typeof w=="string"?w:"empty";let $=null;return typeof v=="string"?$=C("img",{alt:x,src:v},null):$=v,C("div",H({class:ce(u,g,s.value,{[`${u}-normal`]:b,[`${u}-rtl`]:o.value==="rtl"})},m),[C("div",{class:`${u}-image`,style:p},[$]),w&&C("p",{class:`${u}-description`},[w]),n.default&&C("div",{class:`${u}-footer`},[Kt(n.default())])])}},null))}}});qw.PRESENTED_IMAGE_DEFAULT=()=>ar(Uw);qw.PRESENTED_IMAGE_SIMPLE=()=>ar(AD);const pa=Vt(qw),Zw=t=>{const{prefixCls:e}=Me("empty",t);return(i=>{switch(i){case"Table":case"List":return C(pa,{image:pa.PRESENTED_IMAGE_SIMPLE},null);case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return C(pa,{image:pa.PRESENTED_IMAGE_SIMPLE,class:`${e.value}-small`},null);default:return C(pa,null,null)}})(t.componentName)};function q9(t){return C(Zw,{componentName:t},null)}const _D=Symbol("SizeContextKey"),PD=()=>qe(_D,se(void 0)),TD=t=>{const e=PD();return ot(_D,L(()=>t.value||e.value)),t},Me=(t,e)=>{const n=PD(),i=Oi(),o=qe(Vw,A(A({},Gk),{renderEmpty:S=>ar(Zw,{componentName:S})})),r=L(()=>o.getPrefixCls(t,e.prefixCls)),a=L(()=>{var S,_;return(S=e.direction)!==null&&S!==void 0?S:(_=o.direction)===null||_===void 0?void 0:_.value}),s=L(()=>{var S;return(S=e.iconPrefixCls)!==null&&S!==void 0?S:o.iconPrefixCls.value}),l=L(()=>o.getPrefixCls()),c=L(()=>{var S;return(S=o.autoInsertSpaceInButton)===null||S===void 0?void 0:S.value}),u=o.renderEmpty,d=o.space,f=o.pageHeader,h=o.form,p=L(()=>{var S,_;return(S=e.getTargetContainer)!==null&&S!==void 0?S:(_=o.getTargetContainer)===null||_===void 0?void 0:_.value}),g=L(()=>{var S,_,P;return(_=(S=e.getContainer)!==null&&S!==void 0?S:e.getPopupContainer)!==null&&_!==void 0?_:(P=o.getPopupContainer)===null||P===void 0?void 0:P.value}),m=L(()=>{var S,_;return(S=e.dropdownMatchSelectWidth)!==null&&S!==void 0?S:(_=o.dropdownMatchSelectWidth)===null||_===void 0?void 0:_.value}),v=L(()=>{var S;return(e.virtual===void 0?((S=o.virtual)===null||S===void 0?void 0:S.value)!==!1:e.virtual!==!1)&&m.value!==!1}),b=L(()=>e.size||n.value),y=L(()=>{var S,_,P;return(S=e.autocomplete)!==null&&S!==void 0?S:(P=(_=o.input)===null||_===void 0?void 0:_.value)===null||P===void 0?void 0:P.autocomplete}),w=L(()=>{var S;return(S=e.disabled)!==null&&S!==void 0?S:i.value}),x=L(()=>{var S;return(S=e.csp)!==null&&S!==void 0?S:o.csp}),$=L(()=>{var S,_;return(S=e.wave)!==null&&S!==void 0?S:(_=o.wave)===null||_===void 0?void 0:_.value});return{configProvider:o,prefixCls:r,direction:a,size:b,getTargetContainer:p,getPopupContainer:g,space:d,pageHeader:f,form:h,autoInsertSpaceInButton:c,renderEmpty:u,virtual:v,dropdownMatchSelectWidth:m,rootPrefixCls:l,getPrefixCls:o.getPrefixCls,autocomplete:y,csp:x,iconPrefixCls:s,disabled:w,select:o.select,wave:$}};function ht(t,e){const n=A({},t);for(let i=0;i{const{componentCls:e}=t;return{[e]:{position:"fixed",zIndex:t.zIndexPopup}}},J9=et("Affix",t=>{const e=Ve(t,{zIndexPopup:t.zIndexBase+10});return[Z9(e)]});function Q9(){return typeof window<"u"?window:null}var Rl;(function(t){t[t.None=0]="None",t[t.Prepare=1]="Prepare"})(Rl||(Rl={}));const eW=()=>({offsetTop:Number,offsetBottom:Number,target:{type:Function,default:Q9},prefixCls:String,onChange:Function,onTestUpdatePosition:Function}),tW=oe({compatConfig:{MODE:3},name:"AAffix",inheritAttrs:!1,props:eW(),setup(t,e){let{slots:n,emit:i,expose:o,attrs:r}=e;const a=ie(),s=ie(),l=$t({affixStyle:void 0,placeholderStyle:void 0,status:Rl.None,lastAffix:!1,prevTarget:null,timeout:null}),c=Cn(),u=L(()=>t.offsetBottom===void 0&&t.offsetTop===void 0?0:t.offsetTop),d=L(()=>t.offsetBottom),f=()=>{const{status:y,lastAffix:w}=l,{target:x}=t;if(y!==Rl.Prepare||!s.value||!a.value||!x)return;const $=x();if(!$)return;const S={status:Rl.None},_=Af(a.value);if(_.top===0&&_.left===0&&_.width===0&&_.height===0)return;const P=Af($),O=yA(_,P,u.value),T=xA(_,P,d.value);if(!(_.top===0&&_.left===0&&_.width===0&&_.height===0)){if(O!==void 0){const M=`${_.width}px`,I=`${_.height}px`;S.affixStyle={position:"fixed",top:O,width:M,height:I},S.placeholderStyle={width:M,height:I}}else if(T!==void 0){const M=`${_.width}px`,I=`${_.height}px`;S.affixStyle={position:"fixed",bottom:T,width:M,height:I},S.placeholderStyle={width:M,height:I}}S.lastAffix=!!S.affixStyle,w!==S.lastAffix&&i("change",S.lastAffix),A(l,S)}},h=()=>{A(l,{status:Rl.Prepare,affixStyle:void 0,placeholderStyle:void 0})},p=iy(()=>{h()}),g=iy(()=>{const{target:y}=t,{affixStyle:w}=l;if(y&&w){const x=y();if(x&&a.value){const $=Af(x),S=Af(a.value),_=yA(S,$,u.value),P=xA(S,$,d.value);if(_!==void 0&&w.top===_||P!==void 0&&w.bottom===P)return}}h()});o({updatePosition:p,lazyUpdatePosition:g}),ye(()=>t.target,y=>{const w=(y==null?void 0:y())||null;l.prevTarget!==w&&(SA(c),w&&(wA(w,c),p()),l.prevTarget=w)}),ye(()=>[t.offsetTop,t.offsetBottom],p),Ze(()=>{const{target:y}=t;y&&(l.timeout=setTimeout(()=>{wA(y(),c),p()}))}),ri(()=>{f()}),Xn(()=>{clearTimeout(l.timeout),SA(c),p.cancel(),g.cancel()});const{prefixCls:m}=Me("affix",t),[v,b]=J9(m);return()=>{var y;const{affixStyle:w,placeholderStyle:x,status:$}=l,S=ce({[m.value]:w,[b.value]:!0}),_=ht(t,["prefixCls","offsetTop","offsetBottom","target","onChange","onTestUpdatePosition"]);return v(C(mo,{onResize:p},{default:()=>[C("div",H(H(H({},_),r),{},{ref:a,"data-measure-status":$}),[w&&C("div",{style:x,"aria-hidden":"true"},null),C("div",{class:S,ref:s,style:w},[(y=n.default)===null||y===void 0?void 0:y.call(n)])])]}))}}}),OD=Vt(tW);function WA(t){return typeof t=="object"&&t!=null&&t.nodeType===1}function jA(t,e){return(!e||t!=="hidden")&&t!=="visible"&&t!=="clip"}function ob(t,e){if(t.clientHeighte||r>t&&a=e&&s>=n?r-t-i:a>e&&sn?a-e+o:0}var VA=function(t,e){var n=window,i=e.scrollMode,o=e.block,r=e.inline,a=e.boundary,s=e.skipOverflowHiddenElements,l=typeof a=="function"?a:function(te){return te!==a};if(!WA(t))throw new TypeError("Invalid target");for(var c,u,d=document.scrollingElement||document.documentElement,f=[],h=t;WA(h)&&l(h);){if((h=(u=(c=h).parentElement)==null?c.getRootNode().host||null:u)===d){f.push(h);break}h!=null&&h===document.body&&ob(h)&&!ob(document.documentElement)||h!=null&&ob(h,s)&&f.push(h)}for(var p=n.visualViewport?n.visualViewport.width:innerWidth,g=n.visualViewport?n.visualViewport.height:innerHeight,m=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,b=t.getBoundingClientRect(),y=b.height,w=b.width,x=b.top,$=b.right,S=b.bottom,_=b.left,P=o==="start"||o==="nearest"?x:o==="end"?S:x+y/2,O=r==="center"?_+w/2:r==="end"?$:_,T=[],M=0;M=0&&_>=0&&S<=g&&$<=p&&x>=D&&S<=N&&_>=B&&$<=F)return T;var z=getComputedStyle(I),W=parseInt(z.borderLeftWidth,10),j=parseInt(z.borderTopWidth,10),U=parseInt(z.borderRightWidth,10),V=parseInt(z.borderBottomWidth,10),q=0,Y=0,J="offsetWidth"in I?I.offsetWidth-I.clientWidth-W-U:0,Q="offsetHeight"in I?I.offsetHeight-I.clientHeight-j-V:0,G="offsetWidth"in I?I.offsetWidth===0?0:R/I.offsetWidth:0,ee="offsetHeight"in I?I.offsetHeight===0?0:E/I.offsetHeight:0;if(d===I)q=o==="start"?P:o==="end"?P-g:o==="nearest"?If(v,v+g,g,j,V,v+P,v+P+y,y):P-g/2,Y=r==="start"?O:r==="center"?O-p/2:r==="end"?O-p:If(m,m+p,p,W,U,m+O,m+O+w,w),q=Math.max(0,q+v),Y=Math.max(0,Y+m);else{q=o==="start"?P-D-j:o==="end"?P-N+V+Q:o==="nearest"?If(D,N,E,j,V+Q,P,P+y,y):P-(D+E/2)+Q/2,Y=r==="start"?O-B-W:r==="center"?O-(B+R/2)+J/2:r==="end"?O-F+U+J:If(B,F,R,W,U+J,O,O+w,w);var X=I.scrollLeft,K=I.scrollTop;P+=K-(q=Math.max(0,Math.min(K+q/ee,I.scrollHeight-E/ee+Q))),O+=X-(Y=Math.max(0,Math.min(X+Y/G,I.scrollWidth-R/G+J)))}T.push({el:I,top:q,left:Y})}return T};function ED(t){return t===Object(t)&&Object.keys(t).length!==0}function nW(t,e){e===void 0&&(e="auto");var n="scrollBehavior"in document.body.style;t.forEach(function(i){var o=i.el,r=i.top,a=i.left;o.scroll&&n?o.scroll({top:r,left:a,behavior:e}):(o.scrollTop=r,o.scrollLeft=a)})}function iW(t){return t===!1?{block:"end",inline:"nearest"}:ED(t)?t:{block:"start",inline:"nearest"}}function MD(t,e){var n=t.isConnected||t.ownerDocument.documentElement.contains(t);if(ED(e)&&typeof e.behavior=="function")return e.behavior(n?VA(t,e):[]);if(n){var i=iW(e);return nW(VA(t,i),i.behavior)}}function oW(t,e,n,i){const o=n-e;return t/=i/2,t<1?o/2*t*t*t+e:o/2*((t-=2)*t*t+2)+e}function gy(t){return t!=null&&t===t.window}function Jw(t,e){var n,i;if(typeof window>"u")return 0;const o="scrollTop";let r=0;return gy(t)?r=t.scrollY:t instanceof Document?r=t.documentElement[o]:(t instanceof HTMLElement||t)&&(r=t[o]),t&&!gy(t)&&typeof r!="number"&&(r=(i=((n=t.ownerDocument)!==null&&n!==void 0?n:t).documentElement)===null||i===void 0?void 0:i[o]),r}function Qw(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:n=()=>window,callback:i,duration:o=450}=e,r=n(),a=Jw(r),s=Date.now(),l=()=>{const u=Date.now()-s,d=oW(u>o?o:u,a,t,o);gy(r)?r.scrollTo(window.scrollX,d):r instanceof Document?r.documentElement.scrollTop=d:r.scrollTop=d,u{ot(ID,t)},aW=()=>qe(ID,{registerLink:kf,unregisterLink:kf,scrollTo:kf,activeLink:L(()=>""),handleClick:kf,direction:L(()=>"vertical")}),sW=t=>{const{componentCls:e,holderOffsetBlock:n,motionDurationSlow:i,lineWidthBold:o,colorPrimary:r,lineType:a,colorSplit:s}=t;return{[`${e}-wrapper`]:{marginBlockStart:-n,paddingBlockStart:n,backgroundColor:"transparent",[e]:A(A({},rt(t)),{position:"relative",paddingInlineStart:o,[`${e}-link`]:{paddingBlock:t.anchorPaddingBlock,paddingInline:`${t.anchorPaddingInline}px 0`,"&-title":A(A({},un),{position:"relative",display:"block",marginBlockEnd:t.anchorTitleBlock,color:t.colorText,transition:`all ${t.motionDurationSlow}`,"&:only-child":{marginBlockEnd:0}}),[`&-active > ${e}-link-title`]:{color:t.colorPrimary},[`${e}-link`]:{paddingBlock:t.anchorPaddingBlockSecondary}}}),[`&:not(${e}-wrapper-horizontal)`]:{[e]:{"&::before":{position:"absolute",left:{_skip_check_:!0,value:0},top:0,height:"100%",borderInlineStart:`${o}px ${a} ${s}`,content:'" "'},[`${e}-ink`]:{position:"absolute",left:{_skip_check_:!0,value:0},display:"none",transform:"translateY(-50%)",transition:`top ${i} ease-in-out`,width:o,backgroundColor:r,[`&${e}-ink-visible`]:{display:"inline-block"}}}},[`${e}-fixed ${e}-ink ${e}-ink`]:{display:"none"}}}},lW=t=>{const{componentCls:e,motionDurationSlow:n,lineWidthBold:i,colorPrimary:o}=t;return{[`${e}-wrapper-horizontal`]:{position:"relative","&::before":{position:"absolute",left:{_skip_check_:!0,value:0},right:{_skip_check_:!0,value:0},bottom:0,borderBottom:`1px ${t.lineType} ${t.colorSplit}`,content:'" "'},[e]:{overflowX:"scroll",position:"relative",display:"flex",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},[`${e}-link:first-of-type`]:{paddingInline:0},[`${e}-ink`]:{position:"absolute",bottom:0,transition:`left ${n} ease-in-out, width ${n} ease-in-out`,height:i,backgroundColor:o}}}}},cW=et("Anchor",t=>{const{fontSize:e,fontSizeLG:n,padding:i,paddingXXS:o}=t,r=Ve(t,{holderOffsetBlock:o,anchorPaddingBlock:o,anchorPaddingBlockSecondary:o/2,anchorPaddingInline:i,anchorTitleBlock:e/14*3,anchorBallSize:n/2});return[sW(r),lW(r)]}),uW=()=>({prefixCls:String,href:String,title:Rt(),target:String,customTitleProps:Fe()}),e1=oe({compatConfig:{MODE:3},name:"AAnchorLink",inheritAttrs:!1,props:ct(uW(),{href:"#"}),slots:Object,setup(t,e){let{slots:n,attrs:i}=e,o=null;const{handleClick:r,scrollTo:a,unregisterLink:s,registerLink:l,activeLink:c}=aW(),{prefixCls:u}=Me("anchor",t),d=f=>{const{href:h}=t;r(f,{title:o,href:h}),a(h)};return ye(()=>t.href,(f,h)=>{pt(()=>{s(h),l(f)})}),Ze(()=>{l(t.href)}),at(()=>{s(t.href)}),()=>{var f;const{href:h,target:p,title:g=n.title,customTitleProps:m={}}=t,v=u.value;o=typeof g=="function"?g(m):g;const b=c.value===h,y=ce(`${v}-link`,{[`${v}-link-active`]:b},i.class),w=ce(`${v}-link-title`,{[`${v}-link-title-active`]:b});return C("div",H(H({},i),{},{class:y}),[C("a",{class:w,href:h,title:typeof o=="string"?o:"",target:p,onClick:d},[n.customTitle?n.customTitle(m):o]),(f=n.default)===null||f===void 0?void 0:f.call(n)])}}});function dW(t,e){for(var n=0;n=0||(o[n]=t[n]);return o}function XA(t){return((e=t)!=null&&typeof e=="object"&&Array.isArray(e)===!1)==1&&Object.prototype.toString.call(t)==="[object Object]";var e}var LD=Object.prototype,FD=LD.toString,fW=LD.hasOwnProperty,ND=/^\s*function (\w+)/;function YA(t){var e,n=(e=t==null?void 0:t.type)!==null&&e!==void 0?e:t;if(n){var i=n.toString().match(ND);return i?i[1]:""}return""}var ks=function(t){var e,n;return XA(t)!==!1&&typeof(e=t.constructor)=="function"&&XA(n=e.prototype)!==!1&&n.hasOwnProperty("isPrototypeOf")!==!1},hW=function(t){return t},Vi=hW,hd=function(t,e){return fW.call(t,e)},pW=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t},uc=Array.isArray||function(t){return FD.call(t)==="[object Array]"},dc=function(t){return FD.call(t)==="[object Function]"},Ep=function(t){return ks(t)&&hd(t,"_vueTypes_name")},BD=function(t){return ks(t)&&(hd(t,"type")||["_vueTypes_name","validator","default","required"].some(function(e){return hd(t,e)}))};function t1(t,e){return Object.defineProperty(t.bind(e),"__original",{value:t})}function Zs(t,e,n){var i,o=!0,r="";i=ks(t)?t:{type:t};var a=Ep(i)?i._vueTypes_name+" - ":"";if(BD(i)&&i.type!==null){if(i.type===void 0||i.type===!0||!i.required&&e===void 0)return o;uc(i.type)?(o=i.type.some(function(d){return Zs(d,e)===!0}),r=i.type.map(function(d){return YA(d)}).join(" or ")):o=(r=YA(i))==="Array"?uc(e):r==="Object"?ks(e):r==="String"||r==="Number"||r==="Boolean"||r==="Function"?function(d){if(d==null)return"";var f=d.constructor.toString().match(ND);return f?f[1]:""}(e)===r:e instanceof i.type}if(!o){var s=a+'value "'+e+'" should be of type "'+r+'"';return s}if(hd(i,"validator")&&dc(i.validator)){var l=Vi,c=[];if(Vi=function(d){c.push(d)},o=i.validator(e),Vi=l,!o){var u=(c.length>1?"* ":"")+c.join(` * `);return c.length=0,u}}return o}function Ki(t,e){var n=Object.defineProperties(e,{_vueTypes_name:{value:t,writable:!0},isRequired:{get:function(){return this.required=!0,this}},def:{value:function(o){return o!==void 0||this.default?dc(o)||Zs(this,o)===!0?(this.default=uc(o)?function(){return[].concat(o)}:ks(o)?function(){return Object.assign({},o)}:o,this):(Vi(this._vueTypes_name+' - invalid default value: "'+o+'"'),this):this}}}),i=n.validator;return dc(i)&&(n.validator=t1(i,n)),n}function sr(t,e){var n=Ki(t,e);return Object.defineProperty(n,"validate",{value:function(i){return dc(this.validator)&&Vi(this._vueTypes_name+` - calling .validate() will overwrite the current custom validator function. Validator info: -`+JSON.stringify(this)),this.validator=t1(i,this),this}})}function GA(t,e,n){var i,o,r=(i=e,o={},Object.getOwnPropertyNames(i).forEach(function(d){o[d]=Object.getOwnPropertyDescriptor(i,d)}),Object.defineProperties({},o));if(r._vueTypes_name=t,!ks(n))return r;var a,s,l=n.validator,c=RD(n,["validator"]);if(dc(l)){var u=r.validator;u&&(u=(s=(a=u).__original)!==null&&s!==void 0?s:a),r.validator=t1(u?function(d){return u.call(this,d)&&l.call(this,d)}:l,r)}return Object.assign(r,c)}function fm(t){return t.replace(/^(?!\s*$)/gm," ")}var gW=function(){return sr("any",{})},mW=function(){return sr("function",{type:Function})},vW=function(){return sr("boolean",{type:Boolean})},bW=function(){return sr("string",{type:String})},yW=function(){return sr("number",{type:Number})},xW=function(){return sr("array",{type:Array})},wW=function(){return sr("object",{type:Object})},SW=function(){return Ki("integer",{type:Number,validator:function(t){return pW(t)}})},CW=function(){return Ki("symbol",{validator:function(t){return typeof t=="symbol"}})};function $W(t,e){if(e===void 0&&(e="custom validation failed"),typeof t!="function")throw new TypeError("[VueTypes error]: You must provide a function as argument");return Ki(t.name||"<>",{validator:function(n){var i=t(n);return i||Vi(this._vueTypes_name+" - "+e),i}})}function AW(t){if(!uc(t))throw new TypeError("[VueTypes error]: You must provide an array as argument.");var e='oneOf - value should be one of "'+t.join('", "')+'".',n=t.reduce(function(i,o){if(o!=null){var r=o.constructor;i.indexOf(r)===-1&&i.push(r)}return i},[]);return Ki("oneOf",{type:n.length>0?n:void 0,validator:function(i){var o=t.indexOf(i)!==-1;return o||Vi(e),o}})}function _W(t){if(!uc(t))throw new TypeError("[VueTypes error]: You must provide an array as argument");for(var e=!1,n=[],i=0;i>",{validator:function(n){var i=t(n);return i||Vi(this._vueTypes_name+" - "+e),i}})}function AW(t){if(!uc(t))throw new TypeError("[VueTypes error]: You must provide an array as argument.");var e='oneOf - value should be one of "'+t.join('", "')+'".',n=t.reduce(function(i,o){if(o!=null){var r=o.constructor;i.indexOf(r)===-1&&i.push(r)}return i},[]);return Ki("oneOf",{type:n.length>0?n:void 0,validator:function(i){var o=t.indexOf(i)!==-1;return o||Vi(e),o}})}function _W(t){if(!uc(t))throw new TypeError("[VueTypes error]: You must provide an array as argument");for(var e=!1,n=[],i=0;i0&&n.some(function(l){return a.indexOf(l)===-1})){var s=n.filter(function(l){return a.indexOf(l)===-1});return Vi(s.length===1?'shape - required property "'+s[0]+'" is not defined.':'shape - required properties "'+s.join('", "')+'" are not defined.'),!1}return a.every(function(l){if(e.indexOf(l)===-1)return r._vueTypes_isLoose===!0||(Vi('shape - shape definition does not include a "'+l+'" property. Allowed keys: "'+e.join('", "')+'".'),!1);var c=Zs(t[l],o[l]);return typeof c=="string"&&Vi('shape - "'+l+`" property validation error: - `+fm(c)),c===!0})}});return Object.defineProperty(i,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(i,"loose",{get:function(){return this._vueTypes_isLoose=!0,this}}),i}var Yo=function(){function t(){}return t.extend=function(e){var n=this;if(uc(e))return e.forEach(function(d){return n.extend(d)}),this;var i=e.name,o=e.validate,r=o!==void 0&&o,a=e.getter,s=a!==void 0&&a,l=RD(e,["name","validate","getter"]);if(fd(this,i))throw new TypeError('[VueTypes error]: Type "'+i+'" already defined');var c,u=l.type;return Op(u)?(delete l.type,Object.defineProperty(this,i,s?{get:function(){return GA(i,u,l)}}:{value:function(){var d,f=GA(i,u,l);return f.validator&&(f.validator=(d=f.validator).bind.apply(d,[f].concat([].slice.call(arguments)))),f}})):(c=s?{get:function(){var d=Object.assign({},l);return r?sr(i,d):Ki(i,d)},enumerable:!0}:{value:function(){var d,f,h=Object.assign({},l);return d=r?sr(i,h):Ki(i,h),h.validator&&(d.validator=(f=h.validator).bind.apply(f,[d].concat([].slice.call(arguments)))),d},enumerable:!0},Object.defineProperty(this,i,c))},kD(t,null,[{key:"any",get:function(){return gW()}},{key:"func",get:function(){return mW().def(this.defaults.func)}},{key:"bool",get:function(){return vW().def(this.defaults.bool)}},{key:"string",get:function(){return bW().def(this.defaults.string)}},{key:"number",get:function(){return yW().def(this.defaults.number)}},{key:"array",get:function(){return xW().def(this.defaults.array)}},{key:"object",get:function(){return wW().def(this.defaults.object)}},{key:"integer",get:function(){return SW().def(this.defaults.integer)}},{key:"symbol",get:function(){return CW()}}]),t}();function zD(t){var e;return t===void 0&&(t={func:function(){},bool:!0,string:"",number:0,array:function(){return[]},object:function(){return{}},integer:0}),(e=function(n){function i(){return n.apply(this,arguments)||this}return DD(i,n),kD(i,null,[{key:"sensibleDefaults",get:function(){return bh({},this.defaults)},set:function(o){this.defaults=o!==!1?bh({},o!==!0?o:t):{}}}]),i}(Yo)).defaults=bh({},t),e}Yo.defaults={},Yo.custom=$W,Yo.oneOf=AW,Yo.instanceOf=TW,Yo.oneOfType=_W,Yo.arrayOf=PW,Yo.objectOf=OW,Yo.shape=EW,Yo.utils={validate:function(t,e){return Zs(e,t)===!0},toType:function(t,e,n){return n===void 0&&(n=!1),n?sr(t,e):Ki(t,e)}};(function(t){function e(){return t.apply(this,arguments)||this}return DD(e,t),e})(zD());const Z=zD({func:void 0,bool:void 0,string:void 0,number:void 0,array:void 0,object:void 0,integer:void 0});Z.extend([{name:"looseBool",getter:!0,type:Boolean,default:void 0},{name:"style",getter:!0,type:[String,Object],default:void 0},{name:"VueNode",getter:!0,type:null}]);function HD(t){return t.default=void 0,t}const Nt=(t,e,n)=>{Yw(t,`[ant-design-vue: ${e}] ${n}`)};function MW(){return window}function KA(t,e){if(!t.getClientRects().length)return 0;const n=t.getBoundingClientRect();return n.width||n.height?e===window?(e=t.ownerDocument.documentElement,n.top-e.clientTop):n.top-e.getBoundingClientRect().top:n.top}const UA=/#([\S ]+)$/,IW=()=>({prefixCls:String,offsetTop:Number,bounds:Number,affix:{type:Boolean,default:!0},showInkInFixed:{type:Boolean,default:!1},getContainer:Function,wrapperClass:String,wrapperStyle:{type:Object,default:void 0},getCurrentAnchor:Function,targetOffset:Number,items:xt(),direction:Z.oneOf(["vertical","horizontal"]).def("vertical"),onChange:Function,onClick:Function}),cs=oe({compatConfig:{MODE:3},name:"AAnchor",inheritAttrs:!1,props:IW(),setup(t,e){let{emit:n,attrs:i,slots:o,expose:r}=e;const{prefixCls:a,getTargetContainer:s,direction:l}=Me("anchor",t),c=L(()=>{var S;return(S=t.direction)!==null&&S!==void 0?S:"vertical"}),u=se(null),d=se(),f=$t({links:[],scrollContainer:null,scrollEvent:null,animating:!1}),h=se(null),p=L(()=>{const{getContainer:S}=t;return S||(s==null?void 0:s.value)||MW}),g=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,_=arguments.length>1&&arguments[1]!==void 0?arguments[1]:5;const P=[],O=p.value();return f.links.forEach(T=>{const M=UA.exec(T.toString());if(!M)return;const I=document.getElementById(M[1]);if(I){const k=KA(I,O);kI.top>M.top?I:M).link:""},m=S=>{const{getCurrentAnchor:_}=t;h.value!==S&&(h.value=typeof _=="function"?_(S):S,n("change",S))},v=S=>{const{offsetTop:_,targetOffset:P}=t;m(S);const O=UA.exec(S);if(!O)return;const T=document.getElementById(O[1]);if(!T)return;const M=p.value(),I=Jw(M),k=KA(T,M);let E=I+k;E-=P!==void 0?P:_||0,f.animating=!0,Qw(E,{callback:()=>{f.animating=!1},getContainer:p.value})};r({scrollTo:v});const b=()=>{if(f.animating)return;const{offsetTop:S,bounds:_,targetOffset:P}=t,O=g(P!==void 0?P:S||0,_);m(O)},y=()=>{const S=d.value.querySelector(`.${a.value}-link-title-active`);if(S&&u.value){const _=c.value==="horizontal";u.value.style.top=_?"":`${S.offsetTop+S.clientHeight/2}px`,u.value.style.height=_?"":`${S.clientHeight}px`,u.value.style.left=_?`${S.offsetLeft}px`:"",u.value.style.width=_?`${S.clientWidth}px`:"",_&&MD(S,{scrollMode:"if-needed",block:"nearest"})}};rW({registerLink:S=>{f.links.includes(S)||f.links.push(S)},unregisterLink:S=>{const _=f.links.indexOf(S);_!==-1&&f.links.splice(_,1)},activeLink:h,scrollTo:v,handleClick:(S,_)=>{n("click",S,_)},direction:c}),Ze(()=>{pt(()=>{const S=p.value();f.scrollContainer=S,f.scrollEvent=Gt(f.scrollContainer,"scroll",b),b()})}),at(()=>{f.scrollEvent&&f.scrollEvent.remove()}),ri(()=>{if(f.scrollEvent){const S=p.value();f.scrollContainer!==S&&(f.scrollContainer=S,f.scrollEvent.remove(),f.scrollEvent=Gt(f.scrollContainer,"scroll",b),b())}y()});const w=S=>Array.isArray(S)?S.map(_=>{const{children:P,key:O,href:T,target:M,class:I,style:k,title:E}=_;return C(e1,{key:O,href:T,target:M,class:I,style:k,title:E,customTitleProps:_},{default:()=>[c.value==="vertical"?w(P):null],customTitle:o.customTitle})}):null,[x,$]=cW(a);return()=>{var S;const{offsetTop:_,affix:P,showInkInFixed:O}=t,T=a.value,M=ce(`${T}-ink`,{[`${T}-ink-visible`]:h.value}),I=ce($.value,t.wrapperClass,`${T}-wrapper`,{[`${T}-wrapper-horizontal`]:c.value==="horizontal",[`${T}-rtl`]:l.value==="rtl"}),k=ce(T,{[`${T}-fixed`]:!P&&!O}),E=A({maxHeight:_?`calc(100vh - ${_}px)`:"100vh"},t.wrapperStyle),R=C("div",{class:I,style:E,ref:d},[C("div",{class:k},[C("span",{class:M,ref:u},null),Array.isArray(t.items)?w(t.items):(S=o.default)===null||S===void 0?void 0:S.call(o)])]);return x(P?C(OD,H(H({},i),{},{offsetTop:_,target:p.value}),{default:()=>[R]}):R)}}});cs.Link=e1;cs.install=function(t){return t.component(cs.name,cs),t.component(cs.Link.name,cs.Link),t};function qA(t,e){const{key:n}=t;let i;return"value"in t&&({value:i}=t),n??(i!==void 0?i:`rc-index-key-${e}`)}function WD(t,e){const{label:n,value:i,options:o}=t||{};return{label:n||(e?"children":"label"),value:i||"value",options:o||"options"}}function kW(t){let{fieldNames:e,childrenAsData:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=[],{label:o,value:r,options:a}=WD(e,!1);function s(l,c){l.forEach(u=>{const d=u[o];if(c||!(a in u)){const f=u[r];i.push({key:qA(u,i.length),groupOption:c,data:u,label:d,value:f})}else{let f=d;f===void 0&&n&&(f=u.label),i.push({key:qA(u,i.length),group:!0,data:u,label:f}),s(u[a],!0)}})}return s(t,!1),i}function my(t){const e=A({},t);return"props"in e||Object.defineProperty(e,"props",{get(){return e}}),e}function DW(t,e){if(!e||!e.length)return null;let n=!1;function i(r,a){let[s,...l]=a;if(!s)return[r];const c=r.split(s);return n=n||c.length>1,c.reduce((u,d)=>[...u,...i(d,l)],[]).filter(u=>u)}const o=i(t,e);return n?o:null}function RW(){return""}function LW(t){return t?t.ownerDocument:window.document}function jD(){}const VD=()=>({action:Z.oneOfType([Z.string,Z.arrayOf(Z.string)]).def([]),showAction:Z.any.def([]),hideAction:Z.any.def([]),getPopupClassNameFromAlign:Z.any.def(RW),onPopupVisibleChange:Function,afterPopupVisibleChange:Z.func.def(jD),popup:Z.any,arrow:Z.bool.def(!0),popupStyle:{type:Object,default:void 0},prefixCls:Z.string.def("rc-trigger-popup"),popupClassName:Z.string.def(""),popupPlacement:String,builtinPlacements:Z.object,popupTransitionName:String,popupAnimation:Z.any,mouseEnterDelay:Z.number.def(0),mouseLeaveDelay:Z.number.def(.1),zIndex:Number,focusDelay:Z.number.def(0),blurDelay:Z.number.def(.15),getPopupContainer:Function,getDocument:Z.func.def(LW),forceRender:{type:Boolean,default:void 0},destroyPopupOnHide:{type:Boolean,default:!1},mask:{type:Boolean,default:!1},maskClosable:{type:Boolean,default:!0},popupAlign:Z.object.def(()=>({})),popupVisible:{type:Boolean,default:void 0},defaultPopupVisible:{type:Boolean,default:!1},maskTransitionName:String,maskAnimation:String,stretch:String,alignPoint:{type:Boolean,default:void 0},autoDestroy:{type:Boolean,default:!1},mobile:Object,getTriggerDOMNode:Function}),n1={visible:Boolean,prefixCls:String,zIndex:Number,destroyPopupOnHide:Boolean,forceRender:Boolean,arrow:{type:Boolean,default:!0},animation:[String,Object],transitionName:String,stretch:{type:String},align:{type:Object},point:{type:Object},getRootDomNode:{type:Function},getClassNameFromAlign:{type:Function},onAlign:{type:Function},onMouseenter:{type:Function},onMouseleave:{type:Function},onMousedown:{type:Function},onTouchstart:{type:Function}},FW=A(A({},n1),{mobile:{type:Object}}),NW=A(A({},n1),{mask:Boolean,mobile:{type:Object},maskAnimation:String,maskTransitionName:String});function i1(t){let{prefixCls:e,animation:n,transitionName:i}=t;return n?{name:`${e}-${n}`}:i?{name:i}:{}}function XD(t){const{prefixCls:e,visible:n,zIndex:i,mask:o,maskAnimation:r,maskTransitionName:a}=t;if(!o)return null;let s={};return(a||r)&&(s=i1({prefixCls:e,transitionName:a,animation:r})),C(En,H({appear:!0},s),{default:()=>[ni(C("div",{style:{zIndex:i},class:`${e}-mask`},null),[[GB("if"),n]])]})}XD.displayName="Mask";const BW=oe({compatConfig:{MODE:3},name:"MobilePopupInner",inheritAttrs:!1,props:FW,emits:["mouseenter","mouseleave","mousedown","touchstart","align"],setup(t,e){let{expose:n,slots:i}=e;const o=se();return n({forceAlign:()=>{},getElement:()=>o.value}),()=>{var r;const{zIndex:a,visible:s,prefixCls:l,mobile:{popupClassName:c,popupStyle:u,popupMotion:d={},popupRender:f}={}}=t,h=A({zIndex:a},u);let p=Dt((r=i.default)===null||r===void 0?void 0:r.call(i));p.length>1&&(p=C("div",{class:`${l}-content`},[p])),f&&(p=f(p));const g=ce(l,c);return C(En,H({ref:o},d),{default:()=>[s?C("div",{class:g,style:h},[p]):null]})}}});var zW=function(t,e,n,i){function o(r){return r instanceof n?r:new n(function(a){a(r)})}return new(n||(n=Promise))(function(r,a){function s(u){try{c(i.next(u))}catch(d){a(d)}}function l(u){try{c(i.throw(u))}catch(d){a(d)}}function c(u){u.done?r(u.value):o(u.value).then(s,l)}c((i=i.apply(t,e||[])).next())})};const ZA=["measure","align",null,"motion"],HW=(t,e)=>{const n=ie(null),i=ie(),o=ie(!1);function r(l){o.value||(n.value=l)}function a(){lt.cancel(i.value)}function s(l){a(),i.value=lt(()=>{let c=n.value;switch(n.value){case"align":c="motion";break;case"motion":c="stable";break}r(c),l==null||l()})}return ye(t,()=>{r("measure")},{immediate:!0,flush:"post"}),Ze(()=>{ye(n,()=>{switch(n.value){case"measure":e();break}n.value&&(i.value=lt(()=>zW(void 0,void 0,void 0,function*(){const l=ZA.indexOf(n.value),c=ZA[l+1];c&&l!==-1&&r(c)})))},{immediate:!0,flush:"post"})}),at(()=>{o.value=!0,a()}),[n,s]},WW=t=>{const e=ie({width:0,height:0});function n(o){e.value={width:o.offsetWidth,height:o.offsetHeight}}return[L(()=>{const o={};if(t.value){const{width:r,height:a}=e.value;t.value.indexOf("height")!==-1&&a?o.height=`${a}px`:t.value.indexOf("minHeight")!==-1&&a&&(o.minHeight=`${a}px`),t.value.indexOf("width")!==-1&&r?o.width=`${r}px`:t.value.indexOf("minWidth")!==-1&&r&&(o.minWidth=`${r}px`)}return o}),n]};function JA(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,i)}return n}function QA(t){for(var e=1;e=0&&n.left>=0&&n.bottom>n.top&&n.right>n.left?n:null}function dj(t,e,n,i){var o=Ct.clone(t),r={width:e.width,height:e.height};return i.adjustX&&o.left=n.left&&o.left+r.width>n.right&&(r.width-=o.left+r.width-n.right),i.adjustX&&o.left+r.width>n.right&&(o.left=Math.max(n.right-r.width,n.left)),i.adjustY&&o.top=n.top&&o.top+r.height>n.bottom&&(r.height-=o.top+r.height-n.bottom),i.adjustY&&o.top+r.height>n.bottom&&(o.top=Math.max(n.bottom-r.height,n.top)),Ct.mix(o,r)}function s1(t){var e,n,i;if(!Ct.isWindow(t)&&t.nodeType!==9)e=Ct.offset(t),n=Ct.outerWidth(t),i=Ct.outerHeight(t);else{var o=Ct.getWindow(t);e={left:Ct.getWindowScrollLeft(o),top:Ct.getWindowScrollTop(o)},n=Ct.viewportWidth(o),i=Ct.viewportHeight(o)}return e.width=n,e.height=i,e}function s_(t,e){var n=e.charAt(0),i=e.charAt(1),o=t.width,r=t.height,a=t.left,s=t.top;return n==="c"?s+=r/2:n==="b"&&(s+=r),i==="c"?a+=o/2:i==="r"&&(a+=o),{left:a,top:s}}function Df(t,e,n,i,o){var r=s_(e,n[1]),a=s_(t,n[0]),s=[a.left-r.left,a.top-r.top];return{left:Math.round(t.left-s[0]+i[0]-o[0]),top:Math.round(t.top-s[1]+i[1]-o[1])}}function l_(t,e,n){return t.leftn.right}function c_(t,e,n){return t.topn.bottom}function fj(t,e,n){return t.left>n.right||t.left+e.widthn.bottom||t.top+e.height=n.right||i.top>=n.bottom}function l1(t,e,n){var i=n.target||e,o=s1(i),r=!pj(i,n.overflow&&n.overflow.alwaysByViewport);return QD(t,o,n,r)}l1.__getOffsetParent=xy;l1.__getVisibleRectForElement=a1;function gj(t,e,n){var i,o,r=Ct.getDocument(t),a=r.defaultView||r.parentWindow,s=Ct.getWindowScrollLeft(a),l=Ct.getWindowScrollTop(a),c=Ct.viewportWidth(a),u=Ct.viewportHeight(a);"pageX"in e?i=e.pageX:i=s+e.clientX,"pageY"in e?o=e.pageY:o=l+e.clientY;var d={left:i,top:o,width:0,height:0},f=i>=0&&i<=s+c&&o>=0&&o<=l+u,h=[n.points[0],"cc"];return QD(t,d,QA(QA({},n),{},{points:h}),f)}function At(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o=t;if(Array.isArray(t)&&(o=Kt(t)[0]),!o)return null;const r=On(o,e,i);return r.props=n?A(A({},r.props),e):r.props,Gi(typeof r.props.class!="object"),r}function mj(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return t.map(i=>At(i,e,n))}function Iu(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Array.isArray(t))return t.map(o=>Iu(o,e,n,i));{if(!ln(t))return t;const o=At(t,e,n,i);return Array.isArray(o.children)&&(o.children=Iu(o.children)),o}}function vj(t,e,n){Pa(On(t,A({},e)),n)}const eR=t=>(t||[]).some(e=>ln(e)?!(e.type===Dn||e.type===Qe&&!eR(e.children)):!0)?t:null;function pm(t,e,n,i){var o;const r=(o=t[e])===null||o===void 0?void 0:o.call(t,n);return eR(r)?r:i==null?void 0:i()}const gm=t=>{if(!t)return!1;if(t.offsetParent)return!0;if(t.getBBox){const e=t.getBBox();if(e.width||e.height)return!0}if(t.getBoundingClientRect){const e=t.getBoundingClientRect();if(e.width||e.height)return!0}return!1};function bj(t,e){return t===e?!0:!t||!e?!1:"pageX"in e&&"pageY"in e?t.pageX===e.pageX&&t.pageY===e.pageY:"clientX"in e&&"clientY"in e?t.clientX===e.clientX&&t.clientY===e.clientY:!1}function yj(t,e){t!==document.activeElement&&ha(e,t)&&typeof t.focus=="function"&&t.focus()}function f_(t,e){let n=null,i=null;function o(a){let[{target:s}]=a;if(!document.documentElement.contains(s))return;const{width:l,height:c}=s.getBoundingClientRect(),u=Math.floor(l),d=Math.floor(c);(n!==u||i!==d)&&Promise.resolve().then(()=>{e({width:u,height:d})}),n=u,i=d}const r=new zw(o);return t&&r.observe(t),()=>{r.disconnect()}}const xj=(t,e)=>{let n=!1,i=null;function o(){clearTimeout(i)}function r(a){if(!n||a===!0){if(t()===!1)return;n=!0,o(),i=setTimeout(()=>{n=!1},e.value)}else o(),i=setTimeout(()=>{n=!1,r()},e.value)}return[r,()=>{n=!1,o()}]};function wj(){this.__data__=[],this.size=0}function c1(t,e){return t===e||t!==t&&e!==e}function mm(t,e){for(var n=t.length;n--;)if(c1(t[n][0],e))return n;return-1}var Sj=Array.prototype,Cj=Sj.splice;function $j(t){var e=this.__data__,n=mm(e,t);if(n<0)return!1;var i=e.length-1;return n==i?e.pop():Cj.call(e,n,1),--this.size,!0}function Aj(t){var e=this.__data__,n=mm(e,t);return n<0?void 0:e[n][1]}function _j(t){return mm(this.__data__,t)>-1}function Pj(t,e){var n=this.__data__,i=mm(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}function Yr(t){var e=-1,n=t==null?0:t.length;for(this.clear();++es))return!1;var c=r.get(t),u=r.get(e);if(c&&u)return c==e&&u==t;var d=-1,f=!0,h=n&PV?new fc:void 0;for(r.set(t,e),r.set(e,t);++d-1&&t%1==0&&t-1&&t%1==0&&t<=tX}var nX="[object Arguments]",iX="[object Array]",oX="[object Boolean]",rX="[object Date]",aX="[object Error]",sX="[object Function]",lX="[object Map]",cX="[object Number]",uX="[object Object]",dX="[object RegExp]",fX="[object Set]",hX="[object String]",pX="[object WeakMap]",gX="[object ArrayBuffer]",mX="[object DataView]",vX="[object Float32Array]",bX="[object Float64Array]",yX="[object Int8Array]",xX="[object Int16Array]",wX="[object Int32Array]",SX="[object Uint8Array]",CX="[object Uint8ClampedArray]",$X="[object Uint16Array]",AX="[object Uint32Array]",Jt={};Jt[vX]=Jt[bX]=Jt[yX]=Jt[xX]=Jt[wX]=Jt[SX]=Jt[CX]=Jt[$X]=Jt[AX]=!0;Jt[nX]=Jt[iX]=Jt[gX]=Jt[oX]=Jt[mX]=Jt[rX]=Jt[aX]=Jt[sX]=Jt[lX]=Jt[cX]=Jt[uX]=Jt[dX]=Jt[fX]=Jt[hX]=Jt[pX]=!1;function _X(t){return Lo(t)&&p1(t.length)&&!!Jt[Ia(t)]}function g1(t){return function(e){return t(e)}}var cR=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ku=cR&&typeof module=="object"&&module&&!module.nodeType&&module,PX=ku&&ku.exports===cR,db=PX&&tR.process,hc=function(){try{var t=ku&&ku.require&&ku.require("util").types;return t||db&&db.binding&&db.binding("util")}catch{}}(),x_=hc&&hc.isTypedArray,m1=x_?g1(x_):_X,TX=Object.prototype,OX=TX.hasOwnProperty;function uR(t,e){var n=Ui(t),i=!n&&bm(t),o=!n&&!i&&md(t),r=!n&&!i&&!o&&m1(t),a=n||i||o||r,s=a?YV(t.length,String):[],l=s.length;for(var c in t)(e||OX.call(t,c))&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||r&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||h1(c,l)))&&s.push(c);return s}var EX=Object.prototype;function ym(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||EX;return t===n}function dR(t,e){return function(n){return t(e(n))}}var MX=dR(Object.keys,Object),IX=Object.prototype,kX=IX.hasOwnProperty;function fR(t){if(!ym(t))return MX(t);var e=[];for(var n in Object(t))kX.call(t,n)&&n!="constructor"&&e.push(n);return e}function Cc(t){return t!=null&&p1(t.length)&&!iR(t)}function $c(t){return Cc(t)?uR(t):fR(t)}function wy(t){return rR(t,$c,f1)}var DX=1,RX=Object.prototype,LX=RX.hasOwnProperty;function FX(t,e,n,i,o,r){var a=n&DX,s=wy(t),l=s.length,c=wy(e),u=c.length;if(l!=u&&!a)return!1;for(var d=l;d--;){var f=s[d];if(!(a?f in e:LX.call(e,f)))return!1}var h=r.get(t),p=r.get(e);if(h&&p)return h==e&&p==t;var g=!0;r.set(t,e),r.set(e,t);for(var m=a;++d{const{disabled:f,target:h,align:p,onAlign:g}=t;if(!f&&h&&r.value){const m=r.value;let v;const b=O_(h),y=E_(h);o.value.element=b,o.value.point=y,o.value.align=p;const{activeElement:w}=document;return b&&gm(b)?v=l1(m,b,p):y&&(v=gj(m,y,p)),yj(w,m),g&&v&&g(m,v),!0}return!1},L(()=>t.monitorBufferTime)),l=se({cancel:()=>{}}),c=se({cancel:()=>{}}),u=()=>{const f=t.target,h=O_(f),p=E_(f);r.value!==c.value.element&&(c.value.cancel(),c.value.element=r.value,c.value.cancel=f_(r.value,a)),(o.value.element!==h||!bj(o.value.point,p)||!v1(o.value.align,t.align))&&(a(),l.value.element!==h&&(l.value.cancel(),l.value.element=h,l.value.cancel=f_(h,a)))};Ze(()=>{pt(()=>{u()})}),ri(()=>{pt(()=>{u()})}),ye(()=>t.disabled,f=>{f?s():a()},{immediate:!0,flush:"post"});const d=se(null);return ye(()=>t.monitorWindowResize,f=>{f?d.value||(d.value=Gt(window,"resize",a)):d.value&&(d.value.remove(),d.value=null)},{flush:"post"}),Xn(()=>{l.value.cancel(),c.value.cancel(),d.value&&d.value.remove(),s()}),n({forceAlign:()=>a(!0)}),()=>{const f=i==null?void 0:i.default();return f?At(f[0],{ref:r},!0,!0):null}}});Wn("bottomLeft","bottomRight","topLeft","topRight");const b1=t=>t!==void 0&&(t==="topLeft"||t==="topRight")?"slide-down":"slide-up",yo=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return A(t?{name:t,appear:!0,enterFromClass:`${t}-enter ${t}-enter-prepare ${t}-enter-start`,enterActiveClass:`${t}-enter ${t}-enter-prepare`,enterToClass:`${t}-enter ${t}-enter-active`,leaveFromClass:` ${t}-leave`,leaveActiveClass:`${t}-leave ${t}-leave-active`,leaveToClass:`${t}-leave ${t}-leave-active`}:{css:!1},e)},wm=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return A(t?{name:t,appear:!0,appearActiveClass:`${t}`,appearToClass:`${t}-appear ${t}-appear-active`,enterFromClass:`${t}-appear ${t}-enter ${t}-appear-prepare ${t}-enter-prepare`,enterActiveClass:`${t}`,enterToClass:`${t}-enter ${t}-appear ${t}-appear-active ${t}-enter-active`,leaveActiveClass:`${t} ${t}-leave`,leaveToClass:`${t}-leave-active`}:{css:!1},e)},oi=(t,e,n)=>n!==void 0?n:`${t}-${e}`,UX=oe({compatConfig:{MODE:3},name:"PopupInner",inheritAttrs:!1,props:n1,emits:["mouseenter","mouseleave","mousedown","touchstart","align"],setup(t,e){let{expose:n,attrs:i,slots:o}=e;const r=ie(),a=ie(),s=ie(),[l,c]=WW(Ue(t,"stretch")),u=()=>{t.stretch&&c(t.getRootDomNode())},d=ie(!1);let f;ye(()=>t.visible,$=>{clearTimeout(f),$?f=setTimeout(()=>{d.value=t.visible}):d.value=!1},{immediate:!0});const[h,p]=HW(d,u),g=ie(),m=()=>t.point?t.point:t.getRootDomNode,v=()=>{var $;($=r.value)===null||$===void 0||$.forceAlign()},b=($,S)=>{var _;const P=t.getClassNameFromAlign(S),O=s.value;s.value!==P&&(s.value=P),h.value==="align"&&(O!==P?Promise.resolve().then(()=>{v()}):p(()=>{var T;(T=g.value)===null||T===void 0||T.call(g)}),(_=t.onAlign)===null||_===void 0||_.call(t,$,S))},y=L(()=>{const $=typeof t.animation=="object"?t.animation:i1(t);return["onAfterEnter","onAfterLeave"].forEach(S=>{const _=$[S];$[S]=P=>{p(),h.value="stable",_==null||_(P)}}),$}),w=()=>new Promise($=>{g.value=$});ye([y,h],()=>{!y.value&&h.value==="motion"&&p()},{immediate:!0}),n({forceAlign:v,getElement:()=>a.value.$el||a.value});const x=L(()=>{var $;return!(!(($=t.align)===null||$===void 0)&&$.points&&(h.value==="align"||h.value==="stable"))});return()=>{var $;const{zIndex:S,align:_,prefixCls:P,destroyPopupOnHide:O,onMouseenter:T,onMouseleave:M,onTouchstart:I=()=>{},onMousedown:k}=t,E=h.value,R=[A(A({},l.value),{zIndex:S,opacity:E==="motion"||E==="stable"||!d.value?null:0,pointerEvents:!d.value&&E!=="stable"?"none":null}),i.style];let D=Dt(($=o.default)===null||$===void 0?void 0:$.call(o,{visible:t.visible}));D.length>1&&(D=C("div",{class:`${P}-content`},[D]));const F=ce(P,i.class,s.value,!t.arrow&&`${P}-arrow-hidden`),B=d.value||!t.visible?yo(y.value.name,y.value):{};return C(En,H(H({ref:a},B),{},{onBeforeEnter:w}),{default:()=>!O||t.visible?ni(C(KX,{target:m(),key:"popup",ref:r,monitorWindowResize:!0,disabled:x.value,align:_,onAlign:b},{default:()=>C("div",{class:F,onMouseenter:T,onMouseleave:M,onMousedown:uA(k,["capture"]),[pn?"onTouchstartPassive":"onTouchstart"]:uA(I,["capture"]),style:R},[D])}),[[vi,d.value]]):null})}}}),qX=oe({compatConfig:{MODE:3},name:"Popup",inheritAttrs:!1,props:NW,setup(t,e){let{attrs:n,slots:i,expose:o}=e;const r=ie(!1),a=ie(!1),s=ie(),l=ie();return ye([()=>t.visible,()=>t.mobile],()=>{r.value=t.visible,t.visible&&t.mobile&&(a.value=!0)},{immediate:!0,flush:"post"}),o({forceAlign:()=>{var c;(c=s.value)===null||c===void 0||c.forceAlign()},getElement:()=>{var c;return(c=s.value)===null||c===void 0?void 0:c.getElement()}}),()=>{const c=A(A(A({},t),n),{visible:r.value}),u=a.value?C(BW,H(H({},c),{},{mobile:t.mobile,ref:s}),{default:i.default}):C(UX,H(H({},c),{},{ref:s}),{default:i.default});return C("div",{ref:l},[C(XD,c,null),u])}}});function ZX(t,e,n){return n?t[0]===e[0]:t[0]===e[0]&&t[1]===e[1]}function M_(t,e,n){const i=t[e]||{};return A(A({},i),n)}function JX(t,e,n,i){const{points:o}=n,r=Object.keys(t);for(let a=0;a0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,n=typeof t=="function"?t(this.$data,this.$props):t;if(this.getDerivedStateFromProps){const i=this.getDerivedStateFromProps(Bk(this),A(A({},this.$data),n));if(i===null)return;n=A(A({},n),i||{})}A(this.$data,n),this._.isMounted&&this.$forceUpdate(),pt(()=>{e&&e()})},__emit(){const t=[].slice.call(arguments,0);let e=t[0];e=`on${e[0].toUpperCase()}${e.substring(1)}`;const n=this.$props[e]||this.$attrs[e];if(t.length&&n)if(Array.isArray(n))for(let i=0,o=n.length;i1&&arguments[1]!==void 0?arguments[1]:{inTriggerContext:!0};ot(hR,{inTriggerContext:e.inTriggerContext,shouldRender:L(()=>{const{sPopupVisible:n,popupRef:i,forceRender:o,autoDestroy:r}=t||{};let a=!1;return(n||i||o)&&(a=!0),!n&&r&&(a=!1),a})})},QX=()=>{y1({},{inTriggerContext:!1});const t=qe(hR,{shouldRender:L(()=>!1),inTriggerContext:!1});return{shouldRender:L(()=>t.shouldRender.value||t.inTriggerContext===!1)}},pR=oe({compatConfig:{MODE:3},name:"Portal",inheritAttrs:!1,props:{getContainer:Z.func.isRequired,didUpdate:Function},setup(t,e){let{slots:n}=e,i=!0,o;const{shouldRender:r}=QX();function a(){r.value&&(o=t.getContainer())}Hd(()=>{i=!1,a()}),Ze(()=>{o||a()});const s=ye(r,()=>{r.value&&!o&&(o=t.getContainer()),o&&s()});return ri(()=>{pt(()=>{var l;r.value&&((l=t.didUpdate)===null||l===void 0||l.call(t,t))})}),()=>{var l;return r.value?i?(l=n.default)===null||l===void 0?void 0:l.call(n):o?C(Ow,{to:o},n):null:null}}});let fb;function kp(t){if(typeof document>"u")return 0;if(fb===void 0){const e=document.createElement("div");e.style.width="100%",e.style.height="200px";const n=document.createElement("div"),i=n.style;i.position="absolute",i.top="0",i.left="0",i.pointerEvents="none",i.visibility="hidden",i.width="200px",i.height="150px",i.overflow="hidden",n.appendChild(e),document.body.appendChild(n);const o=e.offsetWidth;n.style.overflow="scroll";let r=e.offsetWidth;o===r&&(r=n.clientWidth),document.body.removeChild(n),fb=o-r}return fb}function I_(t){const e=t.match(/^(.*)px$/),n=Number(e==null?void 0:e[1]);return Number.isNaN(n)?kp():n}function eY(t){if(typeof document>"u"||!t||!(t instanceof Element))return{width:0,height:0};const{width:e,height:n}=getComputedStyle(t,"::-webkit-scrollbar");return{width:I_(e),height:I_(n)}}const tY=`vc-util-locker-${Date.now()}`;let k_=0;function nY(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}function iY(t){const e=L(()=>!!t&&!!t.value);k_+=1;const n=`${tY}_${k_}`;Ke(i=>{if(ii()){if(e.value){const o=kp(),r=nY();cd(` +`+hm(n)),i}})}function TW(t){return Ki("instanceOf",{type:t})}function OW(t){return Ki("objectOf",{type:Object,validator:function(e){var n,i=Object.keys(e).every(function(o){return(n=Zs(t,e[o]))===!0});return i||Vi(`objectOf - value validation error: +`+hm(n)),i}})}function EW(t){var e=Object.keys(t),n=e.filter(function(o){var r;return!!(!((r=t[o])===null||r===void 0)&&r.required)}),i=Ki("shape",{type:Object,validator:function(o){var r=this;if(!ks(o))return!1;var a=Object.keys(o);if(n.length>0&&n.some(function(l){return a.indexOf(l)===-1})){var s=n.filter(function(l){return a.indexOf(l)===-1});return Vi(s.length===1?'shape - required property "'+s[0]+'" is not defined.':'shape - required properties "'+s.join('", "')+'" are not defined.'),!1}return a.every(function(l){if(e.indexOf(l)===-1)return r._vueTypes_isLoose===!0||(Vi('shape - shape definition does not include a "'+l+'" property. Allowed keys: "'+e.join('", "')+'".'),!1);var c=Zs(t[l],o[l]);return typeof c=="string"&&Vi('shape - "'+l+`" property validation error: + `+hm(c)),c===!0})}});return Object.defineProperty(i,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(i,"loose",{get:function(){return this._vueTypes_isLoose=!0,this}}),i}var Yo=function(){function t(){}return t.extend=function(e){var n=this;if(uc(e))return e.forEach(function(d){return n.extend(d)}),this;var i=e.name,o=e.validate,r=o!==void 0&&o,a=e.getter,s=a!==void 0&&a,l=RD(e,["name","validate","getter"]);if(hd(this,i))throw new TypeError('[VueTypes error]: Type "'+i+'" already defined');var c,u=l.type;return Ep(u)?(delete l.type,Object.defineProperty(this,i,s?{get:function(){return GA(i,u,l)}}:{value:function(){var d,f=GA(i,u,l);return f.validator&&(f.validator=(d=f.validator).bind.apply(d,[f].concat([].slice.call(arguments)))),f}})):(c=s?{get:function(){var d=Object.assign({},l);return r?sr(i,d):Ki(i,d)},enumerable:!0}:{value:function(){var d,f,h=Object.assign({},l);return d=r?sr(i,h):Ki(i,h),h.validator&&(d.validator=(f=h.validator).bind.apply(f,[d].concat([].slice.call(arguments)))),d},enumerable:!0},Object.defineProperty(this,i,c))},kD(t,null,[{key:"any",get:function(){return gW()}},{key:"func",get:function(){return mW().def(this.defaults.func)}},{key:"bool",get:function(){return vW().def(this.defaults.bool)}},{key:"string",get:function(){return bW().def(this.defaults.string)}},{key:"number",get:function(){return yW().def(this.defaults.number)}},{key:"array",get:function(){return xW().def(this.defaults.array)}},{key:"object",get:function(){return wW().def(this.defaults.object)}},{key:"integer",get:function(){return SW().def(this.defaults.integer)}},{key:"symbol",get:function(){return CW()}}]),t}();function zD(t){var e;return t===void 0&&(t={func:function(){},bool:!0,string:"",number:0,array:function(){return[]},object:function(){return{}},integer:0}),(e=function(n){function i(){return n.apply(this,arguments)||this}return DD(i,n),kD(i,null,[{key:"sensibleDefaults",get:function(){return yh({},this.defaults)},set:function(o){this.defaults=o!==!1?yh({},o!==!0?o:t):{}}}]),i}(Yo)).defaults=yh({},t),e}Yo.defaults={},Yo.custom=$W,Yo.oneOf=AW,Yo.instanceOf=TW,Yo.oneOfType=_W,Yo.arrayOf=PW,Yo.objectOf=OW,Yo.shape=EW,Yo.utils={validate:function(t,e){return Zs(e,t)===!0},toType:function(t,e,n){return n===void 0&&(n=!1),n?sr(t,e):Ki(t,e)}};(function(t){function e(){return t.apply(this,arguments)||this}return DD(e,t),e})(zD());const Z=zD({func:void 0,bool:void 0,string:void 0,number:void 0,array:void 0,object:void 0,integer:void 0});Z.extend([{name:"looseBool",getter:!0,type:Boolean,default:void 0},{name:"style",getter:!0,type:[String,Object],default:void 0},{name:"VueNode",getter:!0,type:null}]);function HD(t){return t.default=void 0,t}const Nt=(t,e,n)=>{Yw(t,`[ant-design-vue: ${e}] ${n}`)};function MW(){return window}function KA(t,e){if(!t.getClientRects().length)return 0;const n=t.getBoundingClientRect();return n.width||n.height?e===window?(e=t.ownerDocument.documentElement,n.top-e.clientTop):n.top-e.getBoundingClientRect().top:n.top}const UA=/#([\S ]+)$/,IW=()=>({prefixCls:String,offsetTop:Number,bounds:Number,affix:{type:Boolean,default:!0},showInkInFixed:{type:Boolean,default:!1},getContainer:Function,wrapperClass:String,wrapperStyle:{type:Object,default:void 0},getCurrentAnchor:Function,targetOffset:Number,items:xt(),direction:Z.oneOf(["vertical","horizontal"]).def("vertical"),onChange:Function,onClick:Function}),cs=oe({compatConfig:{MODE:3},name:"AAnchor",inheritAttrs:!1,props:IW(),setup(t,e){let{emit:n,attrs:i,slots:o,expose:r}=e;const{prefixCls:a,getTargetContainer:s,direction:l}=Me("anchor",t),c=L(()=>{var S;return(S=t.direction)!==null&&S!==void 0?S:"vertical"}),u=se(null),d=se(),f=$t({links:[],scrollContainer:null,scrollEvent:null,animating:!1}),h=se(null),p=L(()=>{const{getContainer:S}=t;return S||(s==null?void 0:s.value)||MW}),g=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,_=arguments.length>1&&arguments[1]!==void 0?arguments[1]:5;const P=[],O=p.value();return f.links.forEach(T=>{const M=UA.exec(T.toString());if(!M)return;const I=document.getElementById(M[1]);if(I){const k=KA(I,O);kI.top>M.top?I:M).link:""},m=S=>{const{getCurrentAnchor:_}=t;h.value!==S&&(h.value=typeof _=="function"?_(S):S,n("change",S))},v=S=>{const{offsetTop:_,targetOffset:P}=t;m(S);const O=UA.exec(S);if(!O)return;const T=document.getElementById(O[1]);if(!T)return;const M=p.value(),I=Jw(M),k=KA(T,M);let E=I+k;E-=P!==void 0?P:_||0,f.animating=!0,Qw(E,{callback:()=>{f.animating=!1},getContainer:p.value})};r({scrollTo:v});const b=()=>{if(f.animating)return;const{offsetTop:S,bounds:_,targetOffset:P}=t,O=g(P!==void 0?P:S||0,_);m(O)},y=()=>{const S=d.value.querySelector(`.${a.value}-link-title-active`);if(S&&u.value){const _=c.value==="horizontal";u.value.style.top=_?"":`${S.offsetTop+S.clientHeight/2}px`,u.value.style.height=_?"":`${S.clientHeight}px`,u.value.style.left=_?`${S.offsetLeft}px`:"",u.value.style.width=_?`${S.clientWidth}px`:"",_&&MD(S,{scrollMode:"if-needed",block:"nearest"})}};rW({registerLink:S=>{f.links.includes(S)||f.links.push(S)},unregisterLink:S=>{const _=f.links.indexOf(S);_!==-1&&f.links.splice(_,1)},activeLink:h,scrollTo:v,handleClick:(S,_)=>{n("click",S,_)},direction:c}),Ze(()=>{pt(()=>{const S=p.value();f.scrollContainer=S,f.scrollEvent=Gt(f.scrollContainer,"scroll",b),b()})}),at(()=>{f.scrollEvent&&f.scrollEvent.remove()}),ri(()=>{if(f.scrollEvent){const S=p.value();f.scrollContainer!==S&&(f.scrollContainer=S,f.scrollEvent.remove(),f.scrollEvent=Gt(f.scrollContainer,"scroll",b),b())}y()});const w=S=>Array.isArray(S)?S.map(_=>{const{children:P,key:O,href:T,target:M,class:I,style:k,title:E}=_;return C(e1,{key:O,href:T,target:M,class:I,style:k,title:E,customTitleProps:_},{default:()=>[c.value==="vertical"?w(P):null],customTitle:o.customTitle})}):null,[x,$]=cW(a);return()=>{var S;const{offsetTop:_,affix:P,showInkInFixed:O}=t,T=a.value,M=ce(`${T}-ink`,{[`${T}-ink-visible`]:h.value}),I=ce($.value,t.wrapperClass,`${T}-wrapper`,{[`${T}-wrapper-horizontal`]:c.value==="horizontal",[`${T}-rtl`]:l.value==="rtl"}),k=ce(T,{[`${T}-fixed`]:!P&&!O}),E=A({maxHeight:_?`calc(100vh - ${_}px)`:"100vh"},t.wrapperStyle),R=C("div",{class:I,style:E,ref:d},[C("div",{class:k},[C("span",{class:M,ref:u},null),Array.isArray(t.items)?w(t.items):(S=o.default)===null||S===void 0?void 0:S.call(o)])]);return x(P?C(OD,H(H({},i),{},{offsetTop:_,target:p.value}),{default:()=>[R]}):R)}}});cs.Link=e1;cs.install=function(t){return t.component(cs.name,cs),t.component(cs.Link.name,cs.Link),t};function qA(t,e){const{key:n}=t;let i;return"value"in t&&({value:i}=t),n??(i!==void 0?i:`rc-index-key-${e}`)}function WD(t,e){const{label:n,value:i,options:o}=t||{};return{label:n||(e?"children":"label"),value:i||"value",options:o||"options"}}function kW(t){let{fieldNames:e,childrenAsData:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=[],{label:o,value:r,options:a}=WD(e,!1);function s(l,c){l.forEach(u=>{const d=u[o];if(c||!(a in u)){const f=u[r];i.push({key:qA(u,i.length),groupOption:c,data:u,label:d,value:f})}else{let f=d;f===void 0&&n&&(f=u.label),i.push({key:qA(u,i.length),group:!0,data:u,label:f}),s(u[a],!0)}})}return s(t,!1),i}function my(t){const e=A({},t);return"props"in e||Object.defineProperty(e,"props",{get(){return e}}),e}function DW(t,e){if(!e||!e.length)return null;let n=!1;function i(r,a){let[s,...l]=a;if(!s)return[r];const c=r.split(s);return n=n||c.length>1,c.reduce((u,d)=>[...u,...i(d,l)],[]).filter(u=>u)}const o=i(t,e);return n?o:null}function RW(){return""}function LW(t){return t?t.ownerDocument:window.document}function jD(){}const VD=()=>({action:Z.oneOfType([Z.string,Z.arrayOf(Z.string)]).def([]),showAction:Z.any.def([]),hideAction:Z.any.def([]),getPopupClassNameFromAlign:Z.any.def(RW),onPopupVisibleChange:Function,afterPopupVisibleChange:Z.func.def(jD),popup:Z.any,arrow:Z.bool.def(!0),popupStyle:{type:Object,default:void 0},prefixCls:Z.string.def("rc-trigger-popup"),popupClassName:Z.string.def(""),popupPlacement:String,builtinPlacements:Z.object,popupTransitionName:String,popupAnimation:Z.any,mouseEnterDelay:Z.number.def(0),mouseLeaveDelay:Z.number.def(.1),zIndex:Number,focusDelay:Z.number.def(0),blurDelay:Z.number.def(.15),getPopupContainer:Function,getDocument:Z.func.def(LW),forceRender:{type:Boolean,default:void 0},destroyPopupOnHide:{type:Boolean,default:!1},mask:{type:Boolean,default:!1},maskClosable:{type:Boolean,default:!0},popupAlign:Z.object.def(()=>({})),popupVisible:{type:Boolean,default:void 0},defaultPopupVisible:{type:Boolean,default:!1},maskTransitionName:String,maskAnimation:String,stretch:String,alignPoint:{type:Boolean,default:void 0},autoDestroy:{type:Boolean,default:!1},mobile:Object,getTriggerDOMNode:Function}),n1={visible:Boolean,prefixCls:String,zIndex:Number,destroyPopupOnHide:Boolean,forceRender:Boolean,arrow:{type:Boolean,default:!0},animation:[String,Object],transitionName:String,stretch:{type:String},align:{type:Object},point:{type:Object},getRootDomNode:{type:Function},getClassNameFromAlign:{type:Function},onAlign:{type:Function},onMouseenter:{type:Function},onMouseleave:{type:Function},onMousedown:{type:Function},onTouchstart:{type:Function}},FW=A(A({},n1),{mobile:{type:Object}}),NW=A(A({},n1),{mask:Boolean,mobile:{type:Object},maskAnimation:String,maskTransitionName:String});function i1(t){let{prefixCls:e,animation:n,transitionName:i}=t;return n?{name:`${e}-${n}`}:i?{name:i}:{}}function XD(t){const{prefixCls:e,visible:n,zIndex:i,mask:o,maskAnimation:r,maskTransitionName:a}=t;if(!o)return null;let s={};return(a||r)&&(s=i1({prefixCls:e,transitionName:a,animation:r})),C(En,H({appear:!0},s),{default:()=>[ni(C("div",{style:{zIndex:i},class:`${e}-mask`},null),[[GB("if"),n]])]})}XD.displayName="Mask";const BW=oe({compatConfig:{MODE:3},name:"MobilePopupInner",inheritAttrs:!1,props:FW,emits:["mouseenter","mouseleave","mousedown","touchstart","align"],setup(t,e){let{expose:n,slots:i}=e;const o=se();return n({forceAlign:()=>{},getElement:()=>o.value}),()=>{var r;const{zIndex:a,visible:s,prefixCls:l,mobile:{popupClassName:c,popupStyle:u,popupMotion:d={},popupRender:f}={}}=t,h=A({zIndex:a},u);let p=Dt((r=i.default)===null||r===void 0?void 0:r.call(i));p.length>1&&(p=C("div",{class:`${l}-content`},[p])),f&&(p=f(p));const g=ce(l,c);return C(En,H({ref:o},d),{default:()=>[s?C("div",{class:g,style:h},[p]):null]})}}});var zW=function(t,e,n,i){function o(r){return r instanceof n?r:new n(function(a){a(r)})}return new(n||(n=Promise))(function(r,a){function s(u){try{c(i.next(u))}catch(d){a(d)}}function l(u){try{c(i.throw(u))}catch(d){a(d)}}function c(u){u.done?r(u.value):o(u.value).then(s,l)}c((i=i.apply(t,e||[])).next())})};const ZA=["measure","align",null,"motion"],HW=(t,e)=>{const n=ie(null),i=ie(),o=ie(!1);function r(l){o.value||(n.value=l)}function a(){lt.cancel(i.value)}function s(l){a(),i.value=lt(()=>{let c=n.value;switch(n.value){case"align":c="motion";break;case"motion":c="stable";break}r(c),l==null||l()})}return ye(t,()=>{r("measure")},{immediate:!0,flush:"post"}),Ze(()=>{ye(n,()=>{switch(n.value){case"measure":e();break}n.value&&(i.value=lt(()=>zW(void 0,void 0,void 0,function*(){const l=ZA.indexOf(n.value),c=ZA[l+1];c&&l!==-1&&r(c)})))},{immediate:!0,flush:"post"})}),at(()=>{o.value=!0,a()}),[n,s]},WW=t=>{const e=ie({width:0,height:0});function n(o){e.value={width:o.offsetWidth,height:o.offsetHeight}}return[L(()=>{const o={};if(t.value){const{width:r,height:a}=e.value;t.value.indexOf("height")!==-1&&a?o.height=`${a}px`:t.value.indexOf("minHeight")!==-1&&a&&(o.minHeight=`${a}px`),t.value.indexOf("width")!==-1&&r?o.width=`${r}px`:t.value.indexOf("minWidth")!==-1&&r&&(o.minWidth=`${r}px`)}return o}),n]};function JA(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable})),n.push.apply(n,i)}return n}function QA(t){for(var e=1;e=0&&n.left>=0&&n.bottom>n.top&&n.right>n.left?n:null}function dj(t,e,n,i){var o=Ct.clone(t),r={width:e.width,height:e.height};return i.adjustX&&o.left=n.left&&o.left+r.width>n.right&&(r.width-=o.left+r.width-n.right),i.adjustX&&o.left+r.width>n.right&&(o.left=Math.max(n.right-r.width,n.left)),i.adjustY&&o.top=n.top&&o.top+r.height>n.bottom&&(r.height-=o.top+r.height-n.bottom),i.adjustY&&o.top+r.height>n.bottom&&(o.top=Math.max(n.bottom-r.height,n.top)),Ct.mix(o,r)}function s1(t){var e,n,i;if(!Ct.isWindow(t)&&t.nodeType!==9)e=Ct.offset(t),n=Ct.outerWidth(t),i=Ct.outerHeight(t);else{var o=Ct.getWindow(t);e={left:Ct.getWindowScrollLeft(o),top:Ct.getWindowScrollTop(o)},n=Ct.viewportWidth(o),i=Ct.viewportHeight(o)}return e.width=n,e.height=i,e}function s_(t,e){var n=e.charAt(0),i=e.charAt(1),o=t.width,r=t.height,a=t.left,s=t.top;return n==="c"?s+=r/2:n==="b"&&(s+=r),i==="c"?a+=o/2:i==="r"&&(a+=o),{left:a,top:s}}function Rf(t,e,n,i,o){var r=s_(e,n[1]),a=s_(t,n[0]),s=[a.left-r.left,a.top-r.top];return{left:Math.round(t.left-s[0]+i[0]-o[0]),top:Math.round(t.top-s[1]+i[1]-o[1])}}function l_(t,e,n){return t.leftn.right}function c_(t,e,n){return t.topn.bottom}function fj(t,e,n){return t.left>n.right||t.left+e.widthn.bottom||t.top+e.height=n.right||i.top>=n.bottom}function l1(t,e,n){var i=n.target||e,o=s1(i),r=!pj(i,n.overflow&&n.overflow.alwaysByViewport);return QD(t,o,n,r)}l1.__getOffsetParent=xy;l1.__getVisibleRectForElement=a1;function gj(t,e,n){var i,o,r=Ct.getDocument(t),a=r.defaultView||r.parentWindow,s=Ct.getWindowScrollLeft(a),l=Ct.getWindowScrollTop(a),c=Ct.viewportWidth(a),u=Ct.viewportHeight(a);"pageX"in e?i=e.pageX:i=s+e.clientX,"pageY"in e?o=e.pageY:o=l+e.clientY;var d={left:i,top:o,width:0,height:0},f=i>=0&&i<=s+c&&o>=0&&o<=l+u,h=[n.points[0],"cc"];return QD(t,d,QA(QA({},n),{},{points:h}),f)}function At(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o=t;if(Array.isArray(t)&&(o=Kt(t)[0]),!o)return null;const r=On(o,e,i);return r.props=n?A(A({},r.props),e):r.props,Gi(typeof r.props.class!="object"),r}function mj(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return t.map(i=>At(i,e,n))}function ku(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Array.isArray(t))return t.map(o=>ku(o,e,n,i));{if(!ln(t))return t;const o=At(t,e,n,i);return Array.isArray(o.children)&&(o.children=ku(o.children)),o}}function vj(t,e,n){Pa(On(t,A({},e)),n)}const eR=t=>(t||[]).some(e=>ln(e)?!(e.type===Dn||e.type===Qe&&!eR(e.children)):!0)?t:null;function gm(t,e,n,i){var o;const r=(o=t[e])===null||o===void 0?void 0:o.call(t,n);return eR(r)?r:i==null?void 0:i()}const mm=t=>{if(!t)return!1;if(t.offsetParent)return!0;if(t.getBBox){const e=t.getBBox();if(e.width||e.height)return!0}if(t.getBoundingClientRect){const e=t.getBoundingClientRect();if(e.width||e.height)return!0}return!1};function bj(t,e){return t===e?!0:!t||!e?!1:"pageX"in e&&"pageY"in e?t.pageX===e.pageX&&t.pageY===e.pageY:"clientX"in e&&"clientY"in e?t.clientX===e.clientX&&t.clientY===e.clientY:!1}function yj(t,e){t!==document.activeElement&&ha(e,t)&&typeof t.focus=="function"&&t.focus()}function f_(t,e){let n=null,i=null;function o(a){let[{target:s}]=a;if(!document.documentElement.contains(s))return;const{width:l,height:c}=s.getBoundingClientRect(),u=Math.floor(l),d=Math.floor(c);(n!==u||i!==d)&&Promise.resolve().then(()=>{e({width:u,height:d})}),n=u,i=d}const r=new zw(o);return t&&r.observe(t),()=>{r.disconnect()}}const xj=(t,e)=>{let n=!1,i=null;function o(){clearTimeout(i)}function r(a){if(!n||a===!0){if(t()===!1)return;n=!0,o(),i=setTimeout(()=>{n=!1},e.value)}else o(),i=setTimeout(()=>{n=!1,r()},e.value)}return[r,()=>{n=!1,o()}]};function wj(){this.__data__=[],this.size=0}function c1(t,e){return t===e||t!==t&&e!==e}function vm(t,e){for(var n=t.length;n--;)if(c1(t[n][0],e))return n;return-1}var Sj=Array.prototype,Cj=Sj.splice;function $j(t){var e=this.__data__,n=vm(e,t);if(n<0)return!1;var i=e.length-1;return n==i?e.pop():Cj.call(e,n,1),--this.size,!0}function Aj(t){var e=this.__data__,n=vm(e,t);return n<0?void 0:e[n][1]}function _j(t){return vm(this.__data__,t)>-1}function Pj(t,e){var n=this.__data__,i=vm(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}function Yr(t){var e=-1,n=t==null?0:t.length;for(this.clear();++es))return!1;var c=r.get(t),u=r.get(e);if(c&&u)return c==e&&u==t;var d=-1,f=!0,h=n&PV?new fc:void 0;for(r.set(t,e),r.set(e,t);++d-1&&t%1==0&&t-1&&t%1==0&&t<=tX}var nX="[object Arguments]",iX="[object Array]",oX="[object Boolean]",rX="[object Date]",aX="[object Error]",sX="[object Function]",lX="[object Map]",cX="[object Number]",uX="[object Object]",dX="[object RegExp]",fX="[object Set]",hX="[object String]",pX="[object WeakMap]",gX="[object ArrayBuffer]",mX="[object DataView]",vX="[object Float32Array]",bX="[object Float64Array]",yX="[object Int8Array]",xX="[object Int16Array]",wX="[object Int32Array]",SX="[object Uint8Array]",CX="[object Uint8ClampedArray]",$X="[object Uint16Array]",AX="[object Uint32Array]",Jt={};Jt[vX]=Jt[bX]=Jt[yX]=Jt[xX]=Jt[wX]=Jt[SX]=Jt[CX]=Jt[$X]=Jt[AX]=!0;Jt[nX]=Jt[iX]=Jt[gX]=Jt[oX]=Jt[mX]=Jt[rX]=Jt[aX]=Jt[sX]=Jt[lX]=Jt[cX]=Jt[uX]=Jt[dX]=Jt[fX]=Jt[hX]=Jt[pX]=!1;function _X(t){return Lo(t)&&p1(t.length)&&!!Jt[Ia(t)]}function g1(t){return function(e){return t(e)}}var cR=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Du=cR&&typeof module=="object"&&module&&!module.nodeType&&module,PX=Du&&Du.exports===cR,db=PX&&tR.process,hc=function(){try{var t=Du&&Du.require&&Du.require("util").types;return t||db&&db.binding&&db.binding("util")}catch{}}(),x_=hc&&hc.isTypedArray,m1=x_?g1(x_):_X,TX=Object.prototype,OX=TX.hasOwnProperty;function uR(t,e){var n=Ui(t),i=!n&&ym(t),o=!n&&!i&&vd(t),r=!n&&!i&&!o&&m1(t),a=n||i||o||r,s=a?YV(t.length,String):[],l=s.length;for(var c in t)(e||OX.call(t,c))&&!(a&&(c=="length"||o&&(c=="offset"||c=="parent")||r&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||h1(c,l)))&&s.push(c);return s}var EX=Object.prototype;function xm(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||EX;return t===n}function dR(t,e){return function(n){return t(e(n))}}var MX=dR(Object.keys,Object),IX=Object.prototype,kX=IX.hasOwnProperty;function fR(t){if(!xm(t))return MX(t);var e=[];for(var n in Object(t))kX.call(t,n)&&n!="constructor"&&e.push(n);return e}function $c(t){return t!=null&&p1(t.length)&&!iR(t)}function Ac(t){return $c(t)?uR(t):fR(t)}function wy(t){return rR(t,Ac,f1)}var DX=1,RX=Object.prototype,LX=RX.hasOwnProperty;function FX(t,e,n,i,o,r){var a=n&DX,s=wy(t),l=s.length,c=wy(e),u=c.length;if(l!=u&&!a)return!1;for(var d=l;d--;){var f=s[d];if(!(a?f in e:LX.call(e,f)))return!1}var h=r.get(t),p=r.get(e);if(h&&p)return h==e&&p==t;var g=!0;r.set(t,e),r.set(e,t);for(var m=a;++d{const{disabled:f,target:h,align:p,onAlign:g}=t;if(!f&&h&&r.value){const m=r.value;let v;const b=O_(h),y=E_(h);o.value.element=b,o.value.point=y,o.value.align=p;const{activeElement:w}=document;return b&&mm(b)?v=l1(m,b,p):y&&(v=gj(m,y,p)),yj(w,m),g&&v&&g(m,v),!0}return!1},L(()=>t.monitorBufferTime)),l=se({cancel:()=>{}}),c=se({cancel:()=>{}}),u=()=>{const f=t.target,h=O_(f),p=E_(f);r.value!==c.value.element&&(c.value.cancel(),c.value.element=r.value,c.value.cancel=f_(r.value,a)),(o.value.element!==h||!bj(o.value.point,p)||!v1(o.value.align,t.align))&&(a(),l.value.element!==h&&(l.value.cancel(),l.value.element=h,l.value.cancel=f_(h,a)))};Ze(()=>{pt(()=>{u()})}),ri(()=>{pt(()=>{u()})}),ye(()=>t.disabled,f=>{f?s():a()},{immediate:!0,flush:"post"});const d=se(null);return ye(()=>t.monitorWindowResize,f=>{f?d.value||(d.value=Gt(window,"resize",a)):d.value&&(d.value.remove(),d.value=null)},{flush:"post"}),Xn(()=>{l.value.cancel(),c.value.cancel(),d.value&&d.value.remove(),s()}),n({forceAlign:()=>a(!0)}),()=>{const f=i==null?void 0:i.default();return f?At(f[0],{ref:r},!0,!0):null}}});Wn("bottomLeft","bottomRight","topLeft","topRight");const b1=t=>t!==void 0&&(t==="topLeft"||t==="topRight")?"slide-down":"slide-up",yo=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return A(t?{name:t,appear:!0,enterFromClass:`${t}-enter ${t}-enter-prepare ${t}-enter-start`,enterActiveClass:`${t}-enter ${t}-enter-prepare`,enterToClass:`${t}-enter ${t}-enter-active`,leaveFromClass:` ${t}-leave`,leaveActiveClass:`${t}-leave ${t}-leave-active`,leaveToClass:`${t}-leave ${t}-leave-active`}:{css:!1},e)},Sm=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return A(t?{name:t,appear:!0,appearActiveClass:`${t}`,appearToClass:`${t}-appear ${t}-appear-active`,enterFromClass:`${t}-appear ${t}-enter ${t}-appear-prepare ${t}-enter-prepare`,enterActiveClass:`${t}`,enterToClass:`${t}-enter ${t}-appear ${t}-appear-active ${t}-enter-active`,leaveActiveClass:`${t} ${t}-leave`,leaveToClass:`${t}-leave-active`}:{css:!1},e)},oi=(t,e,n)=>n!==void 0?n:`${t}-${e}`,UX=oe({compatConfig:{MODE:3},name:"PopupInner",inheritAttrs:!1,props:n1,emits:["mouseenter","mouseleave","mousedown","touchstart","align"],setup(t,e){let{expose:n,attrs:i,slots:o}=e;const r=ie(),a=ie(),s=ie(),[l,c]=WW(Ue(t,"stretch")),u=()=>{t.stretch&&c(t.getRootDomNode())},d=ie(!1);let f;ye(()=>t.visible,$=>{clearTimeout(f),$?f=setTimeout(()=>{d.value=t.visible}):d.value=!1},{immediate:!0});const[h,p]=HW(d,u),g=ie(),m=()=>t.point?t.point:t.getRootDomNode,v=()=>{var $;($=r.value)===null||$===void 0||$.forceAlign()},b=($,S)=>{var _;const P=t.getClassNameFromAlign(S),O=s.value;s.value!==P&&(s.value=P),h.value==="align"&&(O!==P?Promise.resolve().then(()=>{v()}):p(()=>{var T;(T=g.value)===null||T===void 0||T.call(g)}),(_=t.onAlign)===null||_===void 0||_.call(t,$,S))},y=L(()=>{const $=typeof t.animation=="object"?t.animation:i1(t);return["onAfterEnter","onAfterLeave"].forEach(S=>{const _=$[S];$[S]=P=>{p(),h.value="stable",_==null||_(P)}}),$}),w=()=>new Promise($=>{g.value=$});ye([y,h],()=>{!y.value&&h.value==="motion"&&p()},{immediate:!0}),n({forceAlign:v,getElement:()=>a.value.$el||a.value});const x=L(()=>{var $;return!(!(($=t.align)===null||$===void 0)&&$.points&&(h.value==="align"||h.value==="stable"))});return()=>{var $;const{zIndex:S,align:_,prefixCls:P,destroyPopupOnHide:O,onMouseenter:T,onMouseleave:M,onTouchstart:I=()=>{},onMousedown:k}=t,E=h.value,R=[A(A({},l.value),{zIndex:S,opacity:E==="motion"||E==="stable"||!d.value?null:0,pointerEvents:!d.value&&E!=="stable"?"none":null}),i.style];let D=Dt(($=o.default)===null||$===void 0?void 0:$.call(o,{visible:t.visible}));D.length>1&&(D=C("div",{class:`${P}-content`},[D]));const F=ce(P,i.class,s.value,!t.arrow&&`${P}-arrow-hidden`),B=d.value||!t.visible?yo(y.value.name,y.value):{};return C(En,H(H({ref:a},B),{},{onBeforeEnter:w}),{default:()=>!O||t.visible?ni(C(KX,{target:m(),key:"popup",ref:r,monitorWindowResize:!0,disabled:x.value,align:_,onAlign:b},{default:()=>C("div",{class:F,onMouseenter:T,onMouseleave:M,onMousedown:uA(k,["capture"]),[pn?"onTouchstartPassive":"onTouchstart"]:uA(I,["capture"]),style:R},[D])}),[[vi,d.value]]):null})}}}),qX=oe({compatConfig:{MODE:3},name:"Popup",inheritAttrs:!1,props:NW,setup(t,e){let{attrs:n,slots:i,expose:o}=e;const r=ie(!1),a=ie(!1),s=ie(),l=ie();return ye([()=>t.visible,()=>t.mobile],()=>{r.value=t.visible,t.visible&&t.mobile&&(a.value=!0)},{immediate:!0,flush:"post"}),o({forceAlign:()=>{var c;(c=s.value)===null||c===void 0||c.forceAlign()},getElement:()=>{var c;return(c=s.value)===null||c===void 0?void 0:c.getElement()}}),()=>{const c=A(A(A({},t),n),{visible:r.value}),u=a.value?C(BW,H(H({},c),{},{mobile:t.mobile,ref:s}),{default:i.default}):C(UX,H(H({},c),{},{ref:s}),{default:i.default});return C("div",{ref:l},[C(XD,c,null),u])}}});function ZX(t,e,n){return n?t[0]===e[0]:t[0]===e[0]&&t[1]===e[1]}function M_(t,e,n){const i=t[e]||{};return A(A({},i),n)}function JX(t,e,n,i){const{points:o}=n,r=Object.keys(t);for(let a=0;a0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,n=typeof t=="function"?t(this.$data,this.$props):t;if(this.getDerivedStateFromProps){const i=this.getDerivedStateFromProps(Bk(this),A(A({},this.$data),n));if(i===null)return;n=A(A({},n),i||{})}A(this.$data,n),this._.isMounted&&this.$forceUpdate(),pt(()=>{e&&e()})},__emit(){const t=[].slice.call(arguments,0);let e=t[0];e=`on${e[0].toUpperCase()}${e.substring(1)}`;const n=this.$props[e]||this.$attrs[e];if(t.length&&n)if(Array.isArray(n))for(let i=0,o=n.length;i1&&arguments[1]!==void 0?arguments[1]:{inTriggerContext:!0};ot(hR,{inTriggerContext:e.inTriggerContext,shouldRender:L(()=>{const{sPopupVisible:n,popupRef:i,forceRender:o,autoDestroy:r}=t||{};let a=!1;return(n||i||o)&&(a=!0),!n&&r&&(a=!1),a})})},QX=()=>{y1({},{inTriggerContext:!1});const t=qe(hR,{shouldRender:L(()=>!1),inTriggerContext:!1});return{shouldRender:L(()=>t.shouldRender.value||t.inTriggerContext===!1)}},pR=oe({compatConfig:{MODE:3},name:"Portal",inheritAttrs:!1,props:{getContainer:Z.func.isRequired,didUpdate:Function},setup(t,e){let{slots:n}=e,i=!0,o;const{shouldRender:r}=QX();function a(){r.value&&(o=t.getContainer())}Wd(()=>{i=!1,a()}),Ze(()=>{o||a()});const s=ye(r,()=>{r.value&&!o&&(o=t.getContainer()),o&&s()});return ri(()=>{pt(()=>{var l;r.value&&((l=t.didUpdate)===null||l===void 0||l.call(t,t))})}),()=>{var l;return r.value?i?(l=n.default)===null||l===void 0?void 0:l.call(n):o?C(Ow,{to:o},n):null:null}}});let fb;function Dp(t){if(typeof document>"u")return 0;if(fb===void 0){const e=document.createElement("div");e.style.width="100%",e.style.height="200px";const n=document.createElement("div"),i=n.style;i.position="absolute",i.top="0",i.left="0",i.pointerEvents="none",i.visibility="hidden",i.width="200px",i.height="150px",i.overflow="hidden",n.appendChild(e),document.body.appendChild(n);const o=e.offsetWidth;n.style.overflow="scroll";let r=e.offsetWidth;o===r&&(r=n.clientWidth),document.body.removeChild(n),fb=o-r}return fb}function I_(t){const e=t.match(/^(.*)px$/),n=Number(e==null?void 0:e[1]);return Number.isNaN(n)?Dp():n}function eY(t){if(typeof document>"u"||!t||!(t instanceof Element))return{width:0,height:0};const{width:e,height:n}=getComputedStyle(t,"::-webkit-scrollbar");return{width:I_(e),height:I_(n)}}const tY=`vc-util-locker-${Date.now()}`;let k_=0;function nY(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}function iY(t){const e=L(()=>!!t&&!!t.value);k_+=1;const n=`${tY}_${k_}`;Ke(i=>{if(ii()){if(e.value){const o=Dp(),r=nY();ud(` html body { overflow-y: hidden; ${r?`width: calc(100% - ${o}px);`:""} -}`,n)}else _p(n);i(()=>{_p(n)})}},{flush:"post"})}let Xa=0;const yh=ii(),D_=t=>{if(!yh)return null;if(t){if(typeof t=="string")return document.querySelectorAll(t)[0];if(typeof t=="function")return t();if(typeof t=="object"&&t instanceof window.HTMLElement)return t}return document.body},Xd=oe({compatConfig:{MODE:3},name:"PortalWrapper",inheritAttrs:!1,props:{wrapperClassName:String,forceRender:{type:Boolean,default:void 0},getContainer:Z.any,visible:{type:Boolean,default:void 0},autoLock:Ce(),didUpdate:Function},setup(t,e){let{slots:n}=e;const i=ie(),o=ie(),r=ie(),a=ie(1),s=ii()&&document.createElement("div"),l=()=>{var h,p;i.value===s&&((p=(h=i.value)===null||h===void 0?void 0:h.parentNode)===null||p===void 0||p.removeChild(i.value)),i.value=null};let c=null;const u=function(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)||i.value&&!i.value.parentNode?(c=D_(t.getContainer),c?(c.appendChild(i.value),!0):!1):!0},d=()=>yh?(i.value||(i.value=s,u(!0)),f(),i.value):null,f=()=>{const{wrapperClassName:h}=t;i.value&&h&&h!==i.value.className&&(i.value.className=h)};return ri(()=>{f(),u()}),iY(L(()=>t.autoLock&&t.visible&&ii()&&(i.value===document.body||i.value===s))),Ze(()=>{let h=!1;ye([()=>t.visible,()=>t.getContainer],(p,g)=>{let[m,v]=p,[b,y]=g;yh&&(c=D_(t.getContainer),c===document.body&&(m&&!b?Xa+=1:h&&(Xa-=1))),h&&(typeof v=="function"&&typeof y=="function"?v.toString()!==y.toString():v!==y)&&l(),h=!0},{immediate:!0,flush:"post"}),pt(()=>{u()||(r.value=lt(()=>{a.value+=1}))})}),at(()=>{const{visible:h}=t;yh&&c===document.body&&(Xa=h&&Xa?Xa-1:Xa),l(),lt.cancel(r.value)}),()=>{const{forceRender:h,visible:p}=t;let g=null;const m={getOpenCount:()=>Xa,getContainer:d};return a.value&&(h||p||o.value)&&(g=C(pR,{getContainer:d,ref:o,didUpdate:t.didUpdate},{default:()=>{var v;return(v=n.default)===null||v===void 0?void 0:v.call(n,m)}})),g}}}),oY=["onClick","onMousedown","onTouchstart","onMouseenter","onMouseleave","onFocus","onBlur","onContextmenu"],tl=oe({compatConfig:{MODE:3},name:"Trigger",mixins:[el],inheritAttrs:!1,props:VD(),setup(t){const e=L(()=>{const{popupPlacement:o,popupAlign:r,builtinPlacements:a}=t;return o&&a?M_(a,o,r):r}),n=ie(null),i=o=>{n.value=o};return{vcTriggerContext:qe("vcTriggerContext",{}),popupRef:n,setPopupRef:i,triggerRef:ie(null),align:e,focusTime:null,clickOutsideHandler:null,contextmenuOutsideHandler1:null,contextmenuOutsideHandler2:null,touchOutsideHandler:null,attachId:null,delayTimer:null,hasPopupMouseDown:!1,preClickTime:null,preTouchTime:null,mouseDownTimeout:null,childOriginEvents:{}}},data(){const t=this.$props;let e;return this.popupVisible!==void 0?e=!!t.popupVisible:e=!!t.defaultPopupVisible,oY.forEach(n=>{this[`fire${n}`]=i=>{this.fireEvents(n,i)}}),{prevPopupVisible:e,sPopupVisible:e,point:null}},watch:{popupVisible(t){t!==void 0&&(this.prevPopupVisible=this.sPopupVisible,this.sPopupVisible=t)}},created(){ot("vcTriggerContext",{onPopupMouseDown:this.onPopupMouseDown,onPopupMouseenter:this.onPopupMouseenter,onPopupMouseleave:this.onPopupMouseleave}),y1(this)},deactivated(){this.setPopupVisible(!1)},mounted(){this.$nextTick(()=>{this.updatedCal()})},updated(){this.$nextTick(()=>{this.updatedCal()})},beforeUnmount(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),lt.cancel(this.attachId)},methods:{updatedCal(){const t=this.$props;if(this.$data.sPopupVisible){let n;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextmenuToShow())&&(n=t.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Gt(n,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(n=n||t.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Gt(n,"touchstart",this.onDocumentClick,pn?{passive:!1}:!1)),!this.contextmenuOutsideHandler1&&this.isContextmenuToShow()&&(n=n||t.getDocument(this.getRootDomNode()),this.contextmenuOutsideHandler1=Gt(n,"scroll",this.onContextmenuClose)),!this.contextmenuOutsideHandler2&&this.isContextmenuToShow()&&(this.contextmenuOutsideHandler2=Gt(window,"blur",this.onContextmenuClose))}else this.clearOutsideHandler()},onMouseenter(t){const{mouseEnterDelay:e}=this.$props;this.fireEvents("onMouseenter",t),this.delaySetPopupVisible(!0,e,e?null:t)},onMouseMove(t){this.fireEvents("onMousemove",t),this.setPoint(t)},onMouseleave(t){this.fireEvents("onMouseleave",t),this.delaySetPopupVisible(!1,this.$props.mouseLeaveDelay)},onPopupMouseenter(){const{vcTriggerContext:t={}}=this;t.onPopupMouseenter&&t.onPopupMouseenter(),this.clearDelayTimer()},onPopupMouseleave(t){var e;if(t&&t.relatedTarget&&!t.relatedTarget.setTimeout&&ha((e=this.popupRef)===null||e===void 0?void 0:e.getElement(),t.relatedTarget))return;this.isMouseLeaveToHide()&&this.delaySetPopupVisible(!1,this.$props.mouseLeaveDelay);const{vcTriggerContext:n={}}=this;n.onPopupMouseleave&&n.onPopupMouseleave(t)},onFocus(t){this.fireEvents("onFocus",t),this.clearDelayTimer(),this.isFocusToShow()&&(this.focusTime=Date.now(),this.delaySetPopupVisible(!0,this.$props.focusDelay))},onMousedown(t){this.fireEvents("onMousedown",t),this.preClickTime=Date.now()},onTouchstart(t){this.fireEvents("onTouchstart",t),this.preTouchTime=Date.now()},onBlur(t){ha(t.target,t.relatedTarget||document.activeElement)||(this.fireEvents("onBlur",t),this.clearDelayTimer(),this.isBlurToHide()&&this.delaySetPopupVisible(!1,this.$props.blurDelay))},onContextmenu(t){t.preventDefault(),this.fireEvents("onContextmenu",t),this.setPopupVisible(!0,t)},onContextmenuClose(){this.isContextmenuToShow()&&this.close()},onClick(t){if(this.fireEvents("onClick",t),this.focusTime){let n;if(this.preClickTime&&this.preTouchTime?n=Math.min(this.preClickTime,this.preTouchTime):this.preClickTime?n=this.preClickTime:this.preTouchTime&&(n=this.preTouchTime),Math.abs(n-this.focusTime)<20)return;this.focusTime=0}this.preClickTime=0,this.preTouchTime=0,this.isClickToShow()&&(this.isClickToHide()||this.isBlurToHide())&&t&&t.preventDefault&&t.preventDefault(),t&&t.domEvent&&t.domEvent.preventDefault();const e=!this.$data.sPopupVisible;(this.isClickToHide()&&!e||e&&this.isClickToShow())&&this.setPopupVisible(!this.$data.sPopupVisible,t)},onPopupMouseDown(){const{vcTriggerContext:t={}}=this;this.hasPopupMouseDown=!0,clearTimeout(this.mouseDownTimeout),this.mouseDownTimeout=setTimeout(()=>{this.hasPopupMouseDown=!1},0),t.onPopupMouseDown&&t.onPopupMouseDown(...arguments)},onDocumentClick(t){if(this.$props.mask&&!this.$props.maskClosable)return;const e=t.target,n=this.getRootDomNode(),i=this.getPopupDomNode();(!ha(n,e)||this.isContextMenuOnly())&&!ha(i,e)&&!this.hasPopupMouseDown&&this.delaySetPopupVisible(!1,.1)},getPopupDomNode(){var t;return((t=this.popupRef)===null||t===void 0?void 0:t.getElement())||null},getRootDomNode(){var t,e,n,i;const{getTriggerDOMNode:o}=this.$props;if(o){const r=((e=(t=this.triggerRef)===null||t===void 0?void 0:t.$el)===null||e===void 0?void 0:e.nodeName)==="#comment"?null:gi(this.triggerRef);return gi(o(r))}try{const r=((i=(n=this.triggerRef)===null||n===void 0?void 0:n.$el)===null||i===void 0?void 0:i.nodeName)==="#comment"?null:gi(this.triggerRef);if(r)return r}catch{}return gi(this)},handleGetPopupClassFromAlign(t){const e=[],n=this.$props,{popupPlacement:i,builtinPlacements:o,prefixCls:r,alignPoint:a,getPopupClassNameFromAlign:s}=n;return i&&o&&e.push(JX(o,r,t,a)),s&&e.push(s(t)),e.join(" ")},getPopupAlign(){const t=this.$props,{popupPlacement:e,popupAlign:n,builtinPlacements:i}=t;return e&&i?M_(i,e,n):n},getComponent(){const t={};this.isMouseEnterToShow()&&(t.onMouseenter=this.onPopupMouseenter),this.isMouseLeaveToHide()&&(t.onMouseleave=this.onPopupMouseleave),t.onMousedown=this.onPopupMouseDown,t[pn?"onTouchstartPassive":"onTouchstart"]=this.onPopupMouseDown;const{handleGetPopupClassFromAlign:e,getRootDomNode:n,$attrs:i}=this,{prefixCls:o,destroyPopupOnHide:r,popupClassName:a,popupAnimation:s,popupTransitionName:l,popupStyle:c,mask:u,maskAnimation:d,maskTransitionName:f,zIndex:h,stretch:p,alignPoint:g,mobile:m,arrow:v,forceRender:b}=this.$props,{sPopupVisible:y,point:w}=this.$data,x=A(A({prefixCls:o,arrow:v,destroyPopupOnHide:r,visible:y,point:g?w:null,align:this.align,animation:s,getClassNameFromAlign:e,stretch:p,getRootDomNode:n,mask:u,zIndex:h,transitionName:l,maskAnimation:d,maskTransitionName:f,class:a,style:c,onAlign:i.onPopupAlign||jD},t),{ref:this.setPopupRef,mobile:m,forceRender:b});return C(qX,x,{default:this.$slots.popup||(()=>zk(this,"popup"))})},attachParent(t){lt.cancel(this.attachId);const{getPopupContainer:e,getDocument:n}=this.$props,i=this.getRootDomNode();let o;e?(i||e.length===0)&&(o=e(i)):o=n(this.getRootDomNode()).body,o?o.appendChild(t):this.attachId=lt(()=>{this.attachParent(t)})},getContainer(){const{$props:t}=this,{getDocument:e}=t,n=e(this.getRootDomNode()).createElement("div");return n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.width="100%",this.attachParent(n),n},setPopupVisible(t,e){const{alignPoint:n,sPopupVisible:i,onPopupVisibleChange:o}=this;this.clearDelayTimer(),i!==t&&(Ar(this,"popupVisible")||this.setState({sPopupVisible:t,prevPopupVisible:i}),o&&o(t)),n&&e&&t&&this.setPoint(e)},setPoint(t){const{alignPoint:e}=this.$props;!e||!t||this.setState({point:{pageX:t.pageX,pageY:t.pageY}})},handlePortalUpdate(){this.prevPopupVisible!==this.sPopupVisible&&this.afterPopupVisibleChange(this.sPopupVisible)},delaySetPopupVisible(t,e,n){const i=e*1e3;if(this.clearDelayTimer(),i){const o=n?{pageX:n.pageX,pageY:n.pageY}:null;this.delayTimer=setTimeout(()=>{this.setPopupVisible(t,o),this.clearDelayTimer()},i)}else this.setPopupVisible(t,n)},clearDelayTimer(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)},clearOutsideHandler(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextmenuOutsideHandler1&&(this.contextmenuOutsideHandler1.remove(),this.contextmenuOutsideHandler1=null),this.contextmenuOutsideHandler2&&(this.contextmenuOutsideHandler2.remove(),this.contextmenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)},createTwoChains(t){let e=()=>{};const n=vA(this);return this.childOriginEvents[t]&&n[t]?this[`fire${t}`]:(e=this.childOriginEvents[t]||n[t]||e,e)},isClickToShow(){const{action:t,showAction:e}=this.$props;return t.indexOf("click")!==-1||e.indexOf("click")!==-1},isContextMenuOnly(){const{action:t}=this.$props;return t==="contextmenu"||t.length===1&&t[0]==="contextmenu"},isContextmenuToShow(){const{action:t,showAction:e}=this.$props;return t.indexOf("contextmenu")!==-1||e.indexOf("contextmenu")!==-1},isClickToHide(){const{action:t,hideAction:e}=this.$props;return t.indexOf("click")!==-1||e.indexOf("click")!==-1},isMouseEnterToShow(){const{action:t,showAction:e}=this.$props;return t.indexOf("hover")!==-1||e.indexOf("mouseenter")!==-1},isMouseLeaveToHide(){const{action:t,hideAction:e}=this.$props;return t.indexOf("hover")!==-1||e.indexOf("mouseleave")!==-1},isFocusToShow(){const{action:t,showAction:e}=this.$props;return t.indexOf("focus")!==-1||e.indexOf("focus")!==-1},isBlurToHide(){const{action:t,hideAction:e}=this.$props;return t.indexOf("focus")!==-1||e.indexOf("blur")!==-1},forcePopupAlign(){var t;this.$data.sPopupVisible&&((t=this.popupRef)===null||t===void 0||t.forceAlign())},fireEvents(t,e){this.childOriginEvents[t]&&this.childOriginEvents[t](e);const n=this.$props[t]||this.$attrs[t];n&&n(e)},close(){this.setPopupVisible(!1)}},render(){const{$attrs:t}=this,e=Kt(om(this)),{alignPoint:n,getPopupContainer:i}=this.$props,o=e[0];this.childOriginEvents=vA(o);const r={key:"trigger"};this.isContextmenuToShow()?r.onContextmenu=this.onContextmenu:r.onContextmenu=this.createTwoChains("onContextmenu"),this.isClickToHide()||this.isClickToShow()?(r.onClick=this.onClick,r.onMousedown=this.onMousedown,r[pn?"onTouchstartPassive":"onTouchstart"]=this.onTouchstart):(r.onClick=this.createTwoChains("onClick"),r.onMousedown=this.createTwoChains("onMousedown"),r[pn?"onTouchstartPassive":"onTouchstart"]=this.createTwoChains("onTouchstart")),this.isMouseEnterToShow()?(r.onMouseenter=this.onMouseenter,n&&(r.onMousemove=this.onMouseMove)):r.onMouseenter=this.createTwoChains("onMouseenter"),this.isMouseLeaveToHide()?r.onMouseleave=this.onMouseleave:r.onMouseleave=this.createTwoChains("onMouseleave"),this.isFocusToShow()||this.isBlurToHide()?(r.onFocus=this.onFocus,r.onBlur=this.onBlur):(r.onFocus=this.createTwoChains("onFocus"),r.onBlur=c=>{c&&(!c.relatedTarget||!ha(c.target,c.relatedTarget))&&this.createTwoChains("onBlur")(c)});const a=ce(o&&o.props&&o.props.class,t.class);a&&(r.class=a);const s=At(o,A(A({},r),{ref:"triggerRef"}),!0,!0),l=C(Xd,{key:"portal",getContainer:i&&(()=>i(this.getRootDomNode())),didUpdate:this.handlePortalUpdate,visible:this.$data.sPopupVisible},{default:this.getComponent});return C(Qe,null,[s,l])}});var rY=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{const e=t===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:e,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:e,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:e,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:e,adjustY:1}}}},sY=oe({name:"SelectTrigger",inheritAttrs:!1,props:{dropdownAlign:Object,visible:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},dropdownClassName:String,dropdownStyle:Z.object,placement:String,empty:{type:Boolean,default:void 0},prefixCls:String,popupClassName:String,animation:String,transitionName:String,getPopupContainer:Function,dropdownRender:Function,containerWidth:Number,dropdownMatchSelectWidth:Z.oneOfType([Number,Boolean]).def(!0),popupElement:Z.any,direction:String,getTriggerDOMNode:Function,onPopupVisibleChange:Function,onPopupMouseEnter:Function,onPopupFocusin:Function,onPopupFocusout:Function},setup(t,e){let{slots:n,attrs:i,expose:o}=e;const r=L(()=>{const{dropdownMatchSelectWidth:s}=t;return aY(s)}),a=se();return o({getPopupElement:()=>a.value}),()=>{const s=A(A({},t),i),{empty:l=!1}=s,c=rY(s,["empty"]),{visible:u,dropdownAlign:d,prefixCls:f,popupElement:h,dropdownClassName:p,dropdownStyle:g,direction:m="ltr",placement:v,dropdownMatchSelectWidth:b,containerWidth:y,dropdownRender:w,animation:x,transitionName:$,getPopupContainer:S,getTriggerDOMNode:_,onPopupVisibleChange:P,onPopupMouseEnter:O,onPopupFocusin:T,onPopupFocusout:M}=c,I=`${f}-dropdown`;let k=h;w&&(k=w({menuNode:h,props:t}));const E=x?`${I}-${x}`:$,R=A({minWidth:`${y}px`},g);return typeof b=="number"?R.width=`${b}px`:b&&(R.width=`${y}px`),C(tl,H(H({},t),{},{showAction:P?["click"]:[],hideAction:P?["click"]:[],popupPlacement:v||(m==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:r.value,prefixCls:I,popupTransitionName:E,popupAlign:d,popupVisible:u,getPopupContainer:S,popupClassName:ce(p,{[`${I}-empty`]:l}),popupStyle:R,getTriggerDOMNode:_,onPopupVisibleChange:P}),{default:n.default,popup:()=>C("div",{ref:a,onMouseenter:O,onFocusin:T,onFocusout:M},[k])})}}}),Te={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,N:78,P:80,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,EQUALS:187,WIN_KEY:224},Rs=(t,e)=>{let{slots:n}=e;var i;const{class:o,customizeIcon:r,customizeIconProps:a,onMousedown:s,onClick:l}=t;let c;return typeof r=="function"?c=r(a):c=ln(r)?On(r):r,C("span",{class:o,onMousedown:u=>{u.preventDefault(),s&&s(u)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:l,"aria-hidden":!0},[c!==void 0?c:C("span",{class:o.split(/\s+/).map(u=>`${u}-icon`)},[(i=n.default)===null||i===void 0?void 0:i.call(n)])])};Rs.inheritAttrs=!1;Rs.displayName="TransBtn";Rs.props={class:String,customizeIcon:Z.any,customizeIconProps:Z.any,onMousedown:Function,onClick:Function};var lY=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{i.value&&i.value.focus()},blur:()=>{i.value&&i.value.blur()},input:i,setSelectionRange:(l,c,u)=>{var d;(d=i.value)===null||d===void 0||d.setSelectionRange(l,c,u)},select:()=>{var l;(l=i.value)===null||l===void 0||l.select()},getSelectionStart:()=>{var l;return(l=i.value)===null||l===void 0?void 0:l.selectionStart},getSelectionEnd:()=>{var l;return(l=i.value)===null||l===void 0?void 0:l.selectionEnd},getScrollTop:()=>{var l;return(l=i.value)===null||l===void 0?void 0:l.scrollTop}}),()=>{const{tag:l,value:c}=t,u=lY(t,["tag","value"]);return C(l,H(H({},u),{},{ref:i,value:c}),null)}}});function uY(){const t=document.documentElement.clientWidth,e=window.innerHeight||document.documentElement.clientHeight;return{width:t,height:e}}function Dp(t){const e=t.getBoundingClientRect(),n=document.documentElement;return{left:e.left+(window.scrollX||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:e.top+(window.scrollY||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}function dY(t){return Array.prototype.slice.apply(t).map(n=>`${n}: ${t.getPropertyValue(n)};`).join("")}function fY(t){return Object.keys(t).reduce((e,n)=>{const i=t[n];return typeof i>"u"||i===null||(e+=`${n}: ${t[n]};`),e},"")}var hY=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);ot.value,s],()=>{s.value||(a.value=t.value)},{immediate:!0});const l=S=>{n("change",S)},c=S=>{s.value=!0,S.target.composing=!0,n("compositionstart",S)},u=S=>{s.value=!1,S.target.composing=!1,n("compositionend",S);const _=document.createEvent("HTMLEvents");_.initEvent("input",!0,!0),S.target.dispatchEvent(_),l(S)},d=S=>{if(s.value&&t.lazy){a.value=S.target.value;return}n("input",S)},f=S=>{n("blur",S)},h=S=>{n("focus",S)},p=()=>{r.value&&r.value.focus()},g=()=>{r.value&&r.value.blur()},m=S=>{n("keydown",S)},v=S=>{n("keyup",S)},b=(S,_,P)=>{var O;(O=r.value)===null||O===void 0||O.setSelectionRange(S,_,P)},y=()=>{var S;(S=r.value)===null||S===void 0||S.select()};o({focus:p,blur:g,input:L(()=>{var S;return(S=r.value)===null||S===void 0?void 0:S.input}),setSelectionRange:b,select:y,getSelectionStart:()=>{var S;return(S=r.value)===null||S===void 0?void 0:S.getSelectionStart()},getSelectionEnd:()=>{var S;return(S=r.value)===null||S===void 0?void 0:S.getSelectionEnd()},getScrollTop:()=>{var S;return(S=r.value)===null||S===void 0?void 0:S.getScrollTop()}});const w=S=>{n("mousedown",S)},x=S=>{n("paste",S)},$=L(()=>t.style&&typeof t.style!="string"?fY(t.style):t.style);return()=>{const{style:S,lazy:_}=t,P=hY(t,["style","lazy"]);return C(cY,H(H(H({},P),i),{},{style:$.value,onInput:d,onChange:l,onBlur:f,onFocus:h,ref:r,value:a.value,onCompositionstart:c,onCompositionend:u,onKeyup:v,onKeydown:m,onPaste:x,onMousedown:w}),null)}}}),pY={inputRef:Z.any,prefixCls:String,id:String,inputElement:Z.VueNode,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,editable:{type:Boolean,default:void 0},activeDescendantId:String,value:String,open:{type:Boolean,default:void 0},tabindex:Z.oneOfType([Z.number,Z.string]),attrs:Z.object,onKeydown:{type:Function},onMousedown:{type:Function},onChange:{type:Function},onPaste:{type:Function},onCompositionstart:{type:Function},onCompositionend:{type:Function},onFocus:{type:Function},onBlur:{type:Function}},gR=oe({compatConfig:{MODE:3},name:"SelectInput",inheritAttrs:!1,props:pY,setup(t){let e=null;const n=qe("VCSelectContainerEvent");return()=>{var i;const{prefixCls:o,id:r,inputElement:a,disabled:s,tabindex:l,autofocus:c,autocomplete:u,editable:d,activeDescendantId:f,value:h,onKeydown:p,onMousedown:g,onChange:m,onPaste:v,onCompositionstart:b,onCompositionend:y,onFocus:w,onBlur:x,open:$,inputRef:S,attrs:_}=t;let P=a||C(Ac,null,null);const O=P.props||{},{onKeydown:T,onInput:M,onFocus:I,onBlur:k,onMousedown:E,onCompositionstart:R,onCompositionend:D,style:F}=O;return P=At(P,A(A(A(A(A({type:"search"},O),{id:r,ref:S,disabled:s,tabindex:l,lazy:!1,autocomplete:u||"off",autofocus:c,class:ce(`${o}-selection-search-input`,(i=P==null?void 0:P.props)===null||i===void 0?void 0:i.class),role:"combobox","aria-expanded":$,"aria-haspopup":"listbox","aria-owns":`${r}_list`,"aria-autocomplete":"list","aria-controls":`${r}_list`,"aria-activedescendant":f}),_),{value:d?h:"",readonly:!d,unselectable:d?null:"on",style:A(A({},F),{opacity:d?null:0}),onKeydown:N=>{p(N),T&&T(N)},onMousedown:N=>{g(N),E&&E(N)},onInput:N=>{m(N),M&&M(N)},onCompositionstart(N){b(N),R&&R(N)},onCompositionend(N){y(N),D&&D(N)},onPaste:v,onFocus:function(){clearTimeout(e),I&&I(arguments.length<=0?void 0:arguments[0]),w&&w(arguments.length<=0?void 0:arguments[0]),n==null||n.focus(arguments.length<=0?void 0:arguments[0])},onBlur:function(){for(var N=arguments.length,B=new Array(N),z=0;z{k&&k(B[0]),x&&x(B[0]),n==null||n.blur(B[0])},100)}}),P.type==="textarea"?{}:{type:"search"}),!0,!0),P}}}),gY=`accept acceptcharset accesskey action allowfullscreen allowtransparency +}`,n)}else Pp(n);i(()=>{Pp(n)})}},{flush:"post"})}let Xa=0;const xh=ii(),D_=t=>{if(!xh)return null;if(t){if(typeof t=="string")return document.querySelectorAll(t)[0];if(typeof t=="function")return t();if(typeof t=="object"&&t instanceof window.HTMLElement)return t}return document.body},Yd=oe({compatConfig:{MODE:3},name:"PortalWrapper",inheritAttrs:!1,props:{wrapperClassName:String,forceRender:{type:Boolean,default:void 0},getContainer:Z.any,visible:{type:Boolean,default:void 0},autoLock:Ce(),didUpdate:Function},setup(t,e){let{slots:n}=e;const i=ie(),o=ie(),r=ie(),a=ie(1),s=ii()&&document.createElement("div"),l=()=>{var h,p;i.value===s&&((p=(h=i.value)===null||h===void 0?void 0:h.parentNode)===null||p===void 0||p.removeChild(i.value)),i.value=null};let c=null;const u=function(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)||i.value&&!i.value.parentNode?(c=D_(t.getContainer),c?(c.appendChild(i.value),!0):!1):!0},d=()=>xh?(i.value||(i.value=s,u(!0)),f(),i.value):null,f=()=>{const{wrapperClassName:h}=t;i.value&&h&&h!==i.value.className&&(i.value.className=h)};return ri(()=>{f(),u()}),iY(L(()=>t.autoLock&&t.visible&&ii()&&(i.value===document.body||i.value===s))),Ze(()=>{let h=!1;ye([()=>t.visible,()=>t.getContainer],(p,g)=>{let[m,v]=p,[b,y]=g;xh&&(c=D_(t.getContainer),c===document.body&&(m&&!b?Xa+=1:h&&(Xa-=1))),h&&(typeof v=="function"&&typeof y=="function"?v.toString()!==y.toString():v!==y)&&l(),h=!0},{immediate:!0,flush:"post"}),pt(()=>{u()||(r.value=lt(()=>{a.value+=1}))})}),at(()=>{const{visible:h}=t;xh&&c===document.body&&(Xa=h&&Xa?Xa-1:Xa),l(),lt.cancel(r.value)}),()=>{const{forceRender:h,visible:p}=t;let g=null;const m={getOpenCount:()=>Xa,getContainer:d};return a.value&&(h||p||o.value)&&(g=C(pR,{getContainer:d,ref:o,didUpdate:t.didUpdate},{default:()=>{var v;return(v=n.default)===null||v===void 0?void 0:v.call(n,m)}})),g}}}),oY=["onClick","onMousedown","onTouchstart","onMouseenter","onMouseleave","onFocus","onBlur","onContextmenu"],tl=oe({compatConfig:{MODE:3},name:"Trigger",mixins:[el],inheritAttrs:!1,props:VD(),setup(t){const e=L(()=>{const{popupPlacement:o,popupAlign:r,builtinPlacements:a}=t;return o&&a?M_(a,o,r):r}),n=ie(null),i=o=>{n.value=o};return{vcTriggerContext:qe("vcTriggerContext",{}),popupRef:n,setPopupRef:i,triggerRef:ie(null),align:e,focusTime:null,clickOutsideHandler:null,contextmenuOutsideHandler1:null,contextmenuOutsideHandler2:null,touchOutsideHandler:null,attachId:null,delayTimer:null,hasPopupMouseDown:!1,preClickTime:null,preTouchTime:null,mouseDownTimeout:null,childOriginEvents:{}}},data(){const t=this.$props;let e;return this.popupVisible!==void 0?e=!!t.popupVisible:e=!!t.defaultPopupVisible,oY.forEach(n=>{this[`fire${n}`]=i=>{this.fireEvents(n,i)}}),{prevPopupVisible:e,sPopupVisible:e,point:null}},watch:{popupVisible(t){t!==void 0&&(this.prevPopupVisible=this.sPopupVisible,this.sPopupVisible=t)}},created(){ot("vcTriggerContext",{onPopupMouseDown:this.onPopupMouseDown,onPopupMouseenter:this.onPopupMouseenter,onPopupMouseleave:this.onPopupMouseleave}),y1(this)},deactivated(){this.setPopupVisible(!1)},mounted(){this.$nextTick(()=>{this.updatedCal()})},updated(){this.$nextTick(()=>{this.updatedCal()})},beforeUnmount(){this.clearDelayTimer(),this.clearOutsideHandler(),clearTimeout(this.mouseDownTimeout),lt.cancel(this.attachId)},methods:{updatedCal(){const t=this.$props;if(this.$data.sPopupVisible){let n;!this.clickOutsideHandler&&(this.isClickToHide()||this.isContextmenuToShow())&&(n=t.getDocument(this.getRootDomNode()),this.clickOutsideHandler=Gt(n,"mousedown",this.onDocumentClick)),this.touchOutsideHandler||(n=n||t.getDocument(this.getRootDomNode()),this.touchOutsideHandler=Gt(n,"touchstart",this.onDocumentClick,pn?{passive:!1}:!1)),!this.contextmenuOutsideHandler1&&this.isContextmenuToShow()&&(n=n||t.getDocument(this.getRootDomNode()),this.contextmenuOutsideHandler1=Gt(n,"scroll",this.onContextmenuClose)),!this.contextmenuOutsideHandler2&&this.isContextmenuToShow()&&(this.contextmenuOutsideHandler2=Gt(window,"blur",this.onContextmenuClose))}else this.clearOutsideHandler()},onMouseenter(t){const{mouseEnterDelay:e}=this.$props;this.fireEvents("onMouseenter",t),this.delaySetPopupVisible(!0,e,e?null:t)},onMouseMove(t){this.fireEvents("onMousemove",t),this.setPoint(t)},onMouseleave(t){this.fireEvents("onMouseleave",t),this.delaySetPopupVisible(!1,this.$props.mouseLeaveDelay)},onPopupMouseenter(){const{vcTriggerContext:t={}}=this;t.onPopupMouseenter&&t.onPopupMouseenter(),this.clearDelayTimer()},onPopupMouseleave(t){var e;if(t&&t.relatedTarget&&!t.relatedTarget.setTimeout&&ha((e=this.popupRef)===null||e===void 0?void 0:e.getElement(),t.relatedTarget))return;this.isMouseLeaveToHide()&&this.delaySetPopupVisible(!1,this.$props.mouseLeaveDelay);const{vcTriggerContext:n={}}=this;n.onPopupMouseleave&&n.onPopupMouseleave(t)},onFocus(t){this.fireEvents("onFocus",t),this.clearDelayTimer(),this.isFocusToShow()&&(this.focusTime=Date.now(),this.delaySetPopupVisible(!0,this.$props.focusDelay))},onMousedown(t){this.fireEvents("onMousedown",t),this.preClickTime=Date.now()},onTouchstart(t){this.fireEvents("onTouchstart",t),this.preTouchTime=Date.now()},onBlur(t){ha(t.target,t.relatedTarget||document.activeElement)||(this.fireEvents("onBlur",t),this.clearDelayTimer(),this.isBlurToHide()&&this.delaySetPopupVisible(!1,this.$props.blurDelay))},onContextmenu(t){t.preventDefault(),this.fireEvents("onContextmenu",t),this.setPopupVisible(!0,t)},onContextmenuClose(){this.isContextmenuToShow()&&this.close()},onClick(t){if(this.fireEvents("onClick",t),this.focusTime){let n;if(this.preClickTime&&this.preTouchTime?n=Math.min(this.preClickTime,this.preTouchTime):this.preClickTime?n=this.preClickTime:this.preTouchTime&&(n=this.preTouchTime),Math.abs(n-this.focusTime)<20)return;this.focusTime=0}this.preClickTime=0,this.preTouchTime=0,this.isClickToShow()&&(this.isClickToHide()||this.isBlurToHide())&&t&&t.preventDefault&&t.preventDefault(),t&&t.domEvent&&t.domEvent.preventDefault();const e=!this.$data.sPopupVisible;(this.isClickToHide()&&!e||e&&this.isClickToShow())&&this.setPopupVisible(!this.$data.sPopupVisible,t)},onPopupMouseDown(){const{vcTriggerContext:t={}}=this;this.hasPopupMouseDown=!0,clearTimeout(this.mouseDownTimeout),this.mouseDownTimeout=setTimeout(()=>{this.hasPopupMouseDown=!1},0),t.onPopupMouseDown&&t.onPopupMouseDown(...arguments)},onDocumentClick(t){if(this.$props.mask&&!this.$props.maskClosable)return;const e=t.target,n=this.getRootDomNode(),i=this.getPopupDomNode();(!ha(n,e)||this.isContextMenuOnly())&&!ha(i,e)&&!this.hasPopupMouseDown&&this.delaySetPopupVisible(!1,.1)},getPopupDomNode(){var t;return((t=this.popupRef)===null||t===void 0?void 0:t.getElement())||null},getRootDomNode(){var t,e,n,i;const{getTriggerDOMNode:o}=this.$props;if(o){const r=((e=(t=this.triggerRef)===null||t===void 0?void 0:t.$el)===null||e===void 0?void 0:e.nodeName)==="#comment"?null:gi(this.triggerRef);return gi(o(r))}try{const r=((i=(n=this.triggerRef)===null||n===void 0?void 0:n.$el)===null||i===void 0?void 0:i.nodeName)==="#comment"?null:gi(this.triggerRef);if(r)return r}catch{}return gi(this)},handleGetPopupClassFromAlign(t){const e=[],n=this.$props,{popupPlacement:i,builtinPlacements:o,prefixCls:r,alignPoint:a,getPopupClassNameFromAlign:s}=n;return i&&o&&e.push(JX(o,r,t,a)),s&&e.push(s(t)),e.join(" ")},getPopupAlign(){const t=this.$props,{popupPlacement:e,popupAlign:n,builtinPlacements:i}=t;return e&&i?M_(i,e,n):n},getComponent(){const t={};this.isMouseEnterToShow()&&(t.onMouseenter=this.onPopupMouseenter),this.isMouseLeaveToHide()&&(t.onMouseleave=this.onPopupMouseleave),t.onMousedown=this.onPopupMouseDown,t[pn?"onTouchstartPassive":"onTouchstart"]=this.onPopupMouseDown;const{handleGetPopupClassFromAlign:e,getRootDomNode:n,$attrs:i}=this,{prefixCls:o,destroyPopupOnHide:r,popupClassName:a,popupAnimation:s,popupTransitionName:l,popupStyle:c,mask:u,maskAnimation:d,maskTransitionName:f,zIndex:h,stretch:p,alignPoint:g,mobile:m,arrow:v,forceRender:b}=this.$props,{sPopupVisible:y,point:w}=this.$data,x=A(A({prefixCls:o,arrow:v,destroyPopupOnHide:r,visible:y,point:g?w:null,align:this.align,animation:s,getClassNameFromAlign:e,stretch:p,getRootDomNode:n,mask:u,zIndex:h,transitionName:l,maskAnimation:d,maskTransitionName:f,class:a,style:c,onAlign:i.onPopupAlign||jD},t),{ref:this.setPopupRef,mobile:m,forceRender:b});return C(qX,x,{default:this.$slots.popup||(()=>zk(this,"popup"))})},attachParent(t){lt.cancel(this.attachId);const{getPopupContainer:e,getDocument:n}=this.$props,i=this.getRootDomNode();let o;e?(i||e.length===0)&&(o=e(i)):o=n(this.getRootDomNode()).body,o?o.appendChild(t):this.attachId=lt(()=>{this.attachParent(t)})},getContainer(){const{$props:t}=this,{getDocument:e}=t,n=e(this.getRootDomNode()).createElement("div");return n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.width="100%",this.attachParent(n),n},setPopupVisible(t,e){const{alignPoint:n,sPopupVisible:i,onPopupVisibleChange:o}=this;this.clearDelayTimer(),i!==t&&(Ar(this,"popupVisible")||this.setState({sPopupVisible:t,prevPopupVisible:i}),o&&o(t)),n&&e&&t&&this.setPoint(e)},setPoint(t){const{alignPoint:e}=this.$props;!e||!t||this.setState({point:{pageX:t.pageX,pageY:t.pageY}})},handlePortalUpdate(){this.prevPopupVisible!==this.sPopupVisible&&this.afterPopupVisibleChange(this.sPopupVisible)},delaySetPopupVisible(t,e,n){const i=e*1e3;if(this.clearDelayTimer(),i){const o=n?{pageX:n.pageX,pageY:n.pageY}:null;this.delayTimer=setTimeout(()=>{this.setPopupVisible(t,o),this.clearDelayTimer()},i)}else this.setPopupVisible(t,n)},clearDelayTimer(){this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)},clearOutsideHandler(){this.clickOutsideHandler&&(this.clickOutsideHandler.remove(),this.clickOutsideHandler=null),this.contextmenuOutsideHandler1&&(this.contextmenuOutsideHandler1.remove(),this.contextmenuOutsideHandler1=null),this.contextmenuOutsideHandler2&&(this.contextmenuOutsideHandler2.remove(),this.contextmenuOutsideHandler2=null),this.touchOutsideHandler&&(this.touchOutsideHandler.remove(),this.touchOutsideHandler=null)},createTwoChains(t){let e=()=>{};const n=vA(this);return this.childOriginEvents[t]&&n[t]?this[`fire${t}`]:(e=this.childOriginEvents[t]||n[t]||e,e)},isClickToShow(){const{action:t,showAction:e}=this.$props;return t.indexOf("click")!==-1||e.indexOf("click")!==-1},isContextMenuOnly(){const{action:t}=this.$props;return t==="contextmenu"||t.length===1&&t[0]==="contextmenu"},isContextmenuToShow(){const{action:t,showAction:e}=this.$props;return t.indexOf("contextmenu")!==-1||e.indexOf("contextmenu")!==-1},isClickToHide(){const{action:t,hideAction:e}=this.$props;return t.indexOf("click")!==-1||e.indexOf("click")!==-1},isMouseEnterToShow(){const{action:t,showAction:e}=this.$props;return t.indexOf("hover")!==-1||e.indexOf("mouseenter")!==-1},isMouseLeaveToHide(){const{action:t,hideAction:e}=this.$props;return t.indexOf("hover")!==-1||e.indexOf("mouseleave")!==-1},isFocusToShow(){const{action:t,showAction:e}=this.$props;return t.indexOf("focus")!==-1||e.indexOf("focus")!==-1},isBlurToHide(){const{action:t,hideAction:e}=this.$props;return t.indexOf("focus")!==-1||e.indexOf("blur")!==-1},forcePopupAlign(){var t;this.$data.sPopupVisible&&((t=this.popupRef)===null||t===void 0||t.forceAlign())},fireEvents(t,e){this.childOriginEvents[t]&&this.childOriginEvents[t](e);const n=this.$props[t]||this.$attrs[t];n&&n(e)},close(){this.setPopupVisible(!1)}},render(){const{$attrs:t}=this,e=Kt(rm(this)),{alignPoint:n,getPopupContainer:i}=this.$props,o=e[0];this.childOriginEvents=vA(o);const r={key:"trigger"};this.isContextmenuToShow()?r.onContextmenu=this.onContextmenu:r.onContextmenu=this.createTwoChains("onContextmenu"),this.isClickToHide()||this.isClickToShow()?(r.onClick=this.onClick,r.onMousedown=this.onMousedown,r[pn?"onTouchstartPassive":"onTouchstart"]=this.onTouchstart):(r.onClick=this.createTwoChains("onClick"),r.onMousedown=this.createTwoChains("onMousedown"),r[pn?"onTouchstartPassive":"onTouchstart"]=this.createTwoChains("onTouchstart")),this.isMouseEnterToShow()?(r.onMouseenter=this.onMouseenter,n&&(r.onMousemove=this.onMouseMove)):r.onMouseenter=this.createTwoChains("onMouseenter"),this.isMouseLeaveToHide()?r.onMouseleave=this.onMouseleave:r.onMouseleave=this.createTwoChains("onMouseleave"),this.isFocusToShow()||this.isBlurToHide()?(r.onFocus=this.onFocus,r.onBlur=this.onBlur):(r.onFocus=this.createTwoChains("onFocus"),r.onBlur=c=>{c&&(!c.relatedTarget||!ha(c.target,c.relatedTarget))&&this.createTwoChains("onBlur")(c)});const a=ce(o&&o.props&&o.props.class,t.class);a&&(r.class=a);const s=At(o,A(A({},r),{ref:"triggerRef"}),!0,!0),l=C(Yd,{key:"portal",getContainer:i&&(()=>i(this.getRootDomNode())),didUpdate:this.handlePortalUpdate,visible:this.$data.sPopupVisible},{default:this.getComponent});return C(Qe,null,[s,l])}});var rY=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{const e=t===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:e,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:e,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:e,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:e,adjustY:1}}}},sY=oe({name:"SelectTrigger",inheritAttrs:!1,props:{dropdownAlign:Object,visible:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},dropdownClassName:String,dropdownStyle:Z.object,placement:String,empty:{type:Boolean,default:void 0},prefixCls:String,popupClassName:String,animation:String,transitionName:String,getPopupContainer:Function,dropdownRender:Function,containerWidth:Number,dropdownMatchSelectWidth:Z.oneOfType([Number,Boolean]).def(!0),popupElement:Z.any,direction:String,getTriggerDOMNode:Function,onPopupVisibleChange:Function,onPopupMouseEnter:Function,onPopupFocusin:Function,onPopupFocusout:Function},setup(t,e){let{slots:n,attrs:i,expose:o}=e;const r=L(()=>{const{dropdownMatchSelectWidth:s}=t;return aY(s)}),a=se();return o({getPopupElement:()=>a.value}),()=>{const s=A(A({},t),i),{empty:l=!1}=s,c=rY(s,["empty"]),{visible:u,dropdownAlign:d,prefixCls:f,popupElement:h,dropdownClassName:p,dropdownStyle:g,direction:m="ltr",placement:v,dropdownMatchSelectWidth:b,containerWidth:y,dropdownRender:w,animation:x,transitionName:$,getPopupContainer:S,getTriggerDOMNode:_,onPopupVisibleChange:P,onPopupMouseEnter:O,onPopupFocusin:T,onPopupFocusout:M}=c,I=`${f}-dropdown`;let k=h;w&&(k=w({menuNode:h,props:t}));const E=x?`${I}-${x}`:$,R=A({minWidth:`${y}px`},g);return typeof b=="number"?R.width=`${b}px`:b&&(R.width=`${y}px`),C(tl,H(H({},t),{},{showAction:P?["click"]:[],hideAction:P?["click"]:[],popupPlacement:v||(m==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:r.value,prefixCls:I,popupTransitionName:E,popupAlign:d,popupVisible:u,getPopupContainer:S,popupClassName:ce(p,{[`${I}-empty`]:l}),popupStyle:R,getTriggerDOMNode:_,onPopupVisibleChange:P}),{default:n.default,popup:()=>C("div",{ref:a,onMouseenter:O,onFocusin:T,onFocusout:M},[k])})}}}),Te={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,N:78,P:80,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,EQUALS:187,WIN_KEY:224},Rs=(t,e)=>{let{slots:n}=e;var i;const{class:o,customizeIcon:r,customizeIconProps:a,onMousedown:s,onClick:l}=t;let c;return typeof r=="function"?c=r(a):c=ln(r)?On(r):r,C("span",{class:o,onMousedown:u=>{u.preventDefault(),s&&s(u)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:l,"aria-hidden":!0},[c!==void 0?c:C("span",{class:o.split(/\s+/).map(u=>`${u}-icon`)},[(i=n.default)===null||i===void 0?void 0:i.call(n)])])};Rs.inheritAttrs=!1;Rs.displayName="TransBtn";Rs.props={class:String,customizeIcon:Z.any,customizeIconProps:Z.any,onMousedown:Function,onClick:Function};var lY=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{i.value&&i.value.focus()},blur:()=>{i.value&&i.value.blur()},input:i,setSelectionRange:(l,c,u)=>{var d;(d=i.value)===null||d===void 0||d.setSelectionRange(l,c,u)},select:()=>{var l;(l=i.value)===null||l===void 0||l.select()},getSelectionStart:()=>{var l;return(l=i.value)===null||l===void 0?void 0:l.selectionStart},getSelectionEnd:()=>{var l;return(l=i.value)===null||l===void 0?void 0:l.selectionEnd},getScrollTop:()=>{var l;return(l=i.value)===null||l===void 0?void 0:l.scrollTop}}),()=>{const{tag:l,value:c}=t,u=lY(t,["tag","value"]);return C(l,H(H({},u),{},{ref:i,value:c}),null)}}});function uY(){const t=document.documentElement.clientWidth,e=window.innerHeight||document.documentElement.clientHeight;return{width:t,height:e}}function Rp(t){const e=t.getBoundingClientRect(),n=document.documentElement;return{left:e.left+(window.scrollX||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:e.top+(window.scrollY||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}function dY(t){return Array.prototype.slice.apply(t).map(n=>`${n}: ${t.getPropertyValue(n)};`).join("")}function fY(t){return Object.keys(t).reduce((e,n)=>{const i=t[n];return typeof i>"u"||i===null||(e+=`${n}: ${t[n]};`),e},"")}var hY=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);ot.value,s],()=>{s.value||(a.value=t.value)},{immediate:!0});const l=S=>{n("change",S)},c=S=>{s.value=!0,S.target.composing=!0,n("compositionstart",S)},u=S=>{s.value=!1,S.target.composing=!1,n("compositionend",S);const _=document.createEvent("HTMLEvents");_.initEvent("input",!0,!0),S.target.dispatchEvent(_),l(S)},d=S=>{if(s.value&&t.lazy){a.value=S.target.value;return}n("input",S)},f=S=>{n("blur",S)},h=S=>{n("focus",S)},p=()=>{r.value&&r.value.focus()},g=()=>{r.value&&r.value.blur()},m=S=>{n("keydown",S)},v=S=>{n("keyup",S)},b=(S,_,P)=>{var O;(O=r.value)===null||O===void 0||O.setSelectionRange(S,_,P)},y=()=>{var S;(S=r.value)===null||S===void 0||S.select()};o({focus:p,blur:g,input:L(()=>{var S;return(S=r.value)===null||S===void 0?void 0:S.input}),setSelectionRange:b,select:y,getSelectionStart:()=>{var S;return(S=r.value)===null||S===void 0?void 0:S.getSelectionStart()},getSelectionEnd:()=>{var S;return(S=r.value)===null||S===void 0?void 0:S.getSelectionEnd()},getScrollTop:()=>{var S;return(S=r.value)===null||S===void 0?void 0:S.getScrollTop()}});const w=S=>{n("mousedown",S)},x=S=>{n("paste",S)},$=L(()=>t.style&&typeof t.style!="string"?fY(t.style):t.style);return()=>{const{style:S,lazy:_}=t,P=hY(t,["style","lazy"]);return C(cY,H(H(H({},P),i),{},{style:$.value,onInput:d,onChange:l,onBlur:f,onFocus:h,ref:r,value:a.value,onCompositionstart:c,onCompositionend:u,onKeyup:v,onKeydown:m,onPaste:x,onMousedown:w}),null)}}}),pY={inputRef:Z.any,prefixCls:String,id:String,inputElement:Z.VueNode,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,editable:{type:Boolean,default:void 0},activeDescendantId:String,value:String,open:{type:Boolean,default:void 0},tabindex:Z.oneOfType([Z.number,Z.string]),attrs:Z.object,onKeydown:{type:Function},onMousedown:{type:Function},onChange:{type:Function},onPaste:{type:Function},onCompositionstart:{type:Function},onCompositionend:{type:Function},onFocus:{type:Function},onBlur:{type:Function}},gR=oe({compatConfig:{MODE:3},name:"SelectInput",inheritAttrs:!1,props:pY,setup(t){let e=null;const n=qe("VCSelectContainerEvent");return()=>{var i;const{prefixCls:o,id:r,inputElement:a,disabled:s,tabindex:l,autofocus:c,autocomplete:u,editable:d,activeDescendantId:f,value:h,onKeydown:p,onMousedown:g,onChange:m,onPaste:v,onCompositionstart:b,onCompositionend:y,onFocus:w,onBlur:x,open:$,inputRef:S,attrs:_}=t;let P=a||C(_c,null,null);const O=P.props||{},{onKeydown:T,onInput:M,onFocus:I,onBlur:k,onMousedown:E,onCompositionstart:R,onCompositionend:D,style:F}=O;return P=At(P,A(A(A(A(A({type:"search"},O),{id:r,ref:S,disabled:s,tabindex:l,lazy:!1,autocomplete:u||"off",autofocus:c,class:ce(`${o}-selection-search-input`,(i=P==null?void 0:P.props)===null||i===void 0?void 0:i.class),role:"combobox","aria-expanded":$,"aria-haspopup":"listbox","aria-owns":`${r}_list`,"aria-autocomplete":"list","aria-controls":`${r}_list`,"aria-activedescendant":f}),_),{value:d?h:"",readonly:!d,unselectable:d?null:"on",style:A(A({},F),{opacity:d?null:0}),onKeydown:N=>{p(N),T&&T(N)},onMousedown:N=>{g(N),E&&E(N)},onInput:N=>{m(N),M&&M(N)},onCompositionstart(N){b(N),R&&R(N)},onCompositionend(N){y(N),D&&D(N)},onPaste:v,onFocus:function(){clearTimeout(e),I&&I(arguments.length<=0?void 0:arguments[0]),w&&w(arguments.length<=0?void 0:arguments[0]),n==null||n.focus(arguments.length<=0?void 0:arguments[0])},onBlur:function(){for(var N=arguments.length,B=new Array(N),z=0;z{k&&k(B[0]),x&&x(B[0]),n==null||n.blur(B[0])},100)}}),P.type==="textarea"?{}:{type:"search"}),!0,!0),P}}}),gY=`accept acceptcharset accesskey action allowfullscreen allowtransparency alt async autocomplete autofocus autoplay capture cellpadding cellspacing challenge charset checked classid classname colspan cols content contenteditable contextmenu controls coords crossorigin data datetime default defer dir disabled download draggable @@ -82,9 +82,9 @@ summary tabindex target title type usemap value width wmode wrap`,mY=`onCopy onC onMouseenter onMouseleave onMousemove onMouseout onMouseover onMouseup onSelect onTouchcancel onTouchend onTouchmove onTouchstart onTouchstartPassive onTouchmovePassive onScroll onWheel onAbort onCanplay onCanplaythrough onDurationchange onEmptied onEncrypted onEnded onError onLoadeddata onLoadedmetadata - onLoadstart onPause onPlay onPlaying onProgress onRatechange onSeeked onSeeking onStalled onSuspend onTimeupdate onVolumechange onWaiting onLoad onError`,R_=`${gY} ${mY}`.split(/[\s\n]+/),vY="aria-",bY="data-";function L_(t,e){return t.indexOf(e)===0}function ka(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;e===!1?n={aria:!0,data:!0,attr:!0}:e===!0?n={aria:!0}:n=A({},e);const i={};return Object.keys(t).forEach(o=>{(n.aria&&(o==="role"||L_(o,vY))||n.data&&L_(o,bY)||n.attr&&(R_.includes(o)||R_.includes(o.toLowerCase())))&&(i[o]=t[o])}),i}const mR=Symbol("OverflowContextProviderKey"),Ay=oe({compatConfig:{MODE:3},name:"OverflowContextProvider",inheritAttrs:!1,props:{value:{type:Object}},setup(t,e){let{slots:n}=e;return ot(mR,L(()=>t.value)),()=>{var i;return(i=n.default)===null||i===void 0?void 0:i.call(n)}}}),yY=()=>qe(mR,L(()=>null));var xY=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);ot.responsive&&!t.display),r=se();i({itemNodeRef:r});function a(s){t.registerSize(t.itemKey,s)}return Xn(()=>{a(null)}),()=>{var s;const{prefixCls:l,invalidate:c,item:u,renderItem:d,responsive:f,registerSize:h,itemKey:p,display:g,order:m,component:v="div"}=t,b=xY(t,["prefixCls","invalidate","item","renderItem","responsive","registerSize","itemKey","display","order","component"]),y=(s=n.default)===null||s===void 0?void 0:s.call(n),w=d&&u!==dl?d(u):y;let x;c||(x={opacity:o.value?0:1,height:o.value?0:dl,overflowY:o.value?"hidden":dl,order:f?m:dl,pointerEvents:o.value?"none":dl,position:o.value?"absolute":dl});const $={};return o.value&&($["aria-hidden"]=!0),C(mo,{disabled:!f,onResize:S=>{let{offsetWidth:_}=S;a(_)}},{default:()=>C(v,H(H(H({class:ce(!c&&l),style:x},$),b),{},{ref:r}),{default:()=>[w]})})}}});var hb=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{var r;if(!o.value){const{component:d="div"}=t,f=hb(t,["component"]);return C(d,H(H({},f),i),{default:()=>[(r=n.default)===null||r===void 0?void 0:r.call(n)]})}const a=o.value,{className:s}=a,l=hb(a,["className"]),{class:c}=i,u=hb(i,["class"]);return C(Ay,{value:null},{default:()=>[C(xh,H(H(H({class:ce(s,c)},l),u),t),n)]})}}});var SY=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o({id:String,prefixCls:String,data:Array,itemKey:[String,Number,Function],itemWidth:{type:Number,default:10},renderItem:Function,renderRawItem:Function,maxCount:[Number,String],renderRest:Function,renderRawRest:Function,suffix:Z.any,component:String,itemComponent:Z.any,onVisibleChange:Function,ssr:String,onMousedown:Function,role:String}),Rr=oe({name:"Overflow",inheritAttrs:!1,props:$Y(),emits:["visibleChange"],setup(t,e){let{attrs:n,emit:i,slots:o}=e;const r=L(()=>t.ssr==="full"),a=ie(null),s=L(()=>a.value||0),l=ie(new Map),c=ie(0),u=ie(0),d=ie(0),f=ie(null),h=ie(null),p=L(()=>h.value===null&&r.value?Number.MAX_SAFE_INTEGER:h.value||0),g=ie(!1),m=L(()=>`${t.prefixCls}-item`),v=L(()=>Math.max(c.value,u.value)),b=L(()=>!!(t.data.length&&t.maxCount===vR)),y=L(()=>t.maxCount===bR),w=L(()=>b.value||typeof t.maxCount=="number"&&t.data.length>t.maxCount),x=L(()=>{let E=t.data;return b.value?a.value===null&&r.value?E=t.data:E=t.data.slice(0,Math.min(t.data.length,s.value/t.itemWidth)):typeof t.maxCount=="number"&&(E=t.data.slice(0,t.maxCount)),E}),$=L(()=>b.value?t.data.slice(p.value+1):t.data.slice(x.value.length)),S=(E,R)=>{var D;return typeof t.itemKey=="function"?t.itemKey(E):(D=t.itemKey&&(E==null?void 0:E[t.itemKey]))!==null&&D!==void 0?D:R},_=L(()=>t.renderItem||(E=>E)),P=(E,R)=>{h.value=E,R||(g.value=E{a.value=R.clientWidth},T=(E,R)=>{const D=new Map(l.value);R===null?D.delete(E):D.set(E,R),l.value=D},M=(E,R)=>{c.value=u.value,u.value=R},I=(E,R)=>{d.value=R},k=E=>l.value.get(S(x.value[E],E));return ye([s,l,u,d,()=>t.itemKey,x],()=>{if(s.value&&v.value&&x.value){let E=d.value;const R=x.value.length,D=R-1;if(!R){P(0),f.value=null;return}for(let F=0;Fs.value){P(F-1),f.value=E-N-d.value+u.value;break}}t.suffix&&k(0)+d.value>s.value&&(f.value=null)}}),()=>{const E=g.value&&!!$.value.length,{itemComponent:R,renderRawItem:D,renderRawRest:F,renderRest:N,prefixCls:B="rc-overflow",suffix:z,component:W="div",id:j,onMousedown:U}=t,{class:V,style:q}=n,Y=SY(n,["class","style"]);let J={};f.value!==null&&b.value&&(J={position:"absolute",left:`${f.value}px`,top:0});const Q={prefixCls:m.value,responsive:b.value,component:R,invalidate:y.value},G=D?(te,ue)=>{const ae=S(te,ue);return C(Ay,{key:ae,value:A(A({},Q),{order:ue,item:te,itemKey:ae,registerSize:T,display:ue<=p.value})},{default:()=>[D(te,ue)]})}:(te,ue)=>{const ae=S(te,ue);return C(xh,H(H({},Q),{},{order:ue,key:ae,item:te,renderItem:_.value,itemKey:ae,registerSize:T,display:ue<=p.value}),null)};let ee=()=>null;const X={order:E?p.value:Number.MAX_SAFE_INTEGER,className:`${m.value} ${m.value}-rest`,registerSize:M,display:E};if(F)F&&(ee=()=>C(Ay,{value:A(A({},Q),X)},{default:()=>[F($.value)]}));else{const te=N||CY;ee=()=>C(xh,H(H({},Q),X),{default:()=>typeof te=="function"?te($.value):te})}const K=()=>{var te;return C(W,H({id:j,class:ce(!y.value&&B,V),style:q,onMousedown:U,role:t.role},Y),{default:()=>[x.value.map(G),w.value?ee():null,z&&C(xh,H(H({},Q),{},{order:p.value,class:`${m.value}-suffix`,registerSize:I,display:!0,style:J}),{default:()=>z}),(te=o.default)===null||te===void 0?void 0:te.call(o)]})};return C(mo,{disabled:!b.value,onResize:O},{default:K})}}});Rr.Item=wY;Rr.RESPONSIVE=vR;Rr.INVALIDATE=bR;const yR=Symbol("TreeSelectLegacyContextPropsKey");function AY(t){return ot(yR,t)}function Sm(){return qe(yR,{})}const _Y={id:String,prefixCls:String,values:Z.array,open:{type:Boolean,default:void 0},searchValue:String,inputRef:Z.any,placeholder:Z.any,disabled:{type:Boolean,default:void 0},mode:String,showSearch:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,activeDescendantId:String,tabindex:Z.oneOfType([Z.number,Z.string]),compositionStatus:Boolean,removeIcon:Z.any,choiceTransitionName:String,maxTagCount:Z.oneOfType([Z.number,Z.string]),maxTagTextLength:Number,maxTagPlaceholder:Z.any.def(()=>t=>`+ ${t.length} ...`),tagRender:Function,onToggleOpen:{type:Function},onRemove:Function,onInputChange:Function,onInputPaste:Function,onInputKeyDown:Function,onInputMouseDown:Function,onInputCompositionStart:Function,onInputCompositionEnd:Function},F_=t=>{t.preventDefault(),t.stopPropagation()},PY=oe({name:"MultipleSelectSelector",inheritAttrs:!1,props:_Y,setup(t){const e=ie(),n=ie(0),i=ie(!1),o=Sm(),r=L(()=>`${t.prefixCls}-selection`),a=L(()=>t.open||t.mode==="tags"?t.searchValue:""),s=L(()=>t.mode==="tags"||t.showSearch&&(t.open||i.value)),l=se("");Ke(()=>{l.value=a.value}),Ze(()=>{ye(l,()=>{n.value=e.value.scrollWidth},{flush:"post",immediate:!0})});function c(p,g,m,v,b){return C("span",{class:ce(`${r.value}-item`,{[`${r.value}-item-disabled`]:m}),title:typeof p=="string"||typeof p=="number"?p.toString():void 0},[C("span",{class:`${r.value}-item-content`},[g]),v&&C(Rs,{class:`${r.value}-item-remove`,onMousedown:F_,onClick:b,customizeIcon:t.removeIcon},{default:()=>[Qn("×")]})])}function u(p,g,m,v,b,y){var w;const x=S=>{F_(S),t.onToggleOpen(!open)};let $=y;return o.keyEntities&&($=((w=o.keyEntities[p])===null||w===void 0?void 0:w.node)||{}),C("span",{key:p,onMousedown:x},[t.tagRender({label:g,value:p,disabled:m,closable:v,onClose:b,option:$})])}function d(p){const{disabled:g,label:m,value:v,option:b}=p,y=!t.disabled&&!g;let w=m;if(typeof t.maxTagTextLength=="number"&&(typeof m=="string"||typeof m=="number")){const $=String(w);$.length>t.maxTagTextLength&&(w=`${$.slice(0,t.maxTagTextLength)}...`)}const x=$=>{var S;$&&$.stopPropagation(),(S=t.onRemove)===null||S===void 0||S.call(t,p)};return typeof t.tagRender=="function"?u(v,w,g,y,x,b):c(m,w,g,y,x)}function f(p){const{maxTagPlaceholder:g=v=>`+ ${v.length} ...`}=t,m=typeof g=="function"?g(p):g;return c(m,m,!1)}const h=p=>{const g=p.target.composing;l.value=p.target.value,g||t.onInputChange(p)};return()=>{const{id:p,prefixCls:g,values:m,open:v,inputRef:b,placeholder:y,disabled:w,autofocus:x,autocomplete:$,activeDescendantId:S,tabindex:_,compositionStatus:P,onInputPaste:O,onInputKeyDown:T,onInputMouseDown:M,onInputCompositionStart:I,onInputCompositionEnd:k}=t,E=C("div",{class:`${r.value}-search`,style:{width:n.value+"px"},key:"input"},[C(gR,{inputRef:b,open:v,prefixCls:g,id:p,inputElement:null,disabled:w,autofocus:x,autocomplete:$,editable:s.value,activeDescendantId:S,value:l.value,onKeydown:T,onMousedown:M,onChange:h,onPaste:O,onCompositionstart:I,onCompositionend:k,tabindex:_,attrs:ka(t,!0),onFocus:()=>i.value=!0,onBlur:()=>i.value=!1},null),C("span",{ref:e,class:`${r.value}-search-mirror`,"aria-hidden":!0},[l.value,Qn(" ")])]),R=C(Rr,{prefixCls:`${r.value}-overflow`,data:m,renderItem:d,renderRest:f,suffix:E,itemKey:"key",maxCount:t.maxTagCount,key:"overflow"},null);return C(Qe,null,[R,!m.length&&!a.value&&!P&&C("span",{class:`${r.value}-placeholder`},[y])])}}}),TY={inputElement:Z.any,id:String,prefixCls:String,values:Z.array,open:{type:Boolean,default:void 0},searchValue:String,inputRef:Z.any,placeholder:Z.any,compositionStatus:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},mode:String,showSearch:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,activeDescendantId:String,tabindex:Z.oneOfType([Z.number,Z.string]),activeValue:String,backfill:{type:Boolean,default:void 0},optionLabelRender:Function,onInputChange:Function,onInputPaste:Function,onInputKeyDown:Function,onInputMouseDown:Function,onInputCompositionStart:Function,onInputCompositionEnd:Function},x1=oe({name:"SingleSelector",setup(t){const e=ie(!1),n=L(()=>t.mode==="combobox"),i=L(()=>n.value||t.showSearch),o=L(()=>{let u=t.searchValue||"";return n.value&&t.activeValue&&!e.value&&(u=t.activeValue),u}),r=Sm();ye([n,()=>t.activeValue],()=>{n.value&&(e.value=!1)},{immediate:!0});const a=L(()=>t.mode!=="combobox"&&!t.open&&!t.showSearch?!1:!!o.value||t.compositionStatus),s=L(()=>{const u=t.values[0];return u&&(typeof u.label=="string"||typeof u.label=="number")?u.label.toString():void 0}),l=()=>{if(t.values[0])return null;const u=a.value?{visibility:"hidden"}:void 0;return C("span",{class:`${t.prefixCls}-selection-placeholder`,style:u},[t.placeholder])},c=u=>{u.target.composing||(e.value=!0,t.onInputChange(u))};return()=>{var u,d,f,h;const{inputElement:p,prefixCls:g,id:m,values:v,inputRef:b,disabled:y,autofocus:w,autocomplete:x,activeDescendantId:$,open:S,tabindex:_,optionLabelRender:P,onInputKeyDown:O,onInputMouseDown:T,onInputPaste:M,onInputCompositionStart:I,onInputCompositionEnd:k}=t,E=v[0];let R=null;if(E&&r.customSlots){const D=(u=E.key)!==null&&u!==void 0?u:E.value,F=((d=r.keyEntities[D])===null||d===void 0?void 0:d.node)||{};R=r.customSlots[(f=F.slots)===null||f===void 0?void 0:f.title]||r.customSlots.title||E.label,typeof R=="function"&&(R=R(F))}else R=P&&E?P(E.option):E==null?void 0:E.label;return C(Qe,null,[C("span",{class:`${g}-selection-search`},[C(gR,{inputRef:b,prefixCls:g,id:m,open:S,inputElement:p,disabled:y,autofocus:w,autocomplete:x,editable:i.value,activeDescendantId:$,value:o.value,onKeydown:O,onMousedown:T,onChange:c,onPaste:M,onCompositionstart:I,onCompositionend:k,tabindex:_,attrs:ka(t,!0)},null)]),!n.value&&E&&!a.value&&C("span",{class:`${g}-selection-item`,title:s.value},[C(Qe,{key:(h=E.key)!==null&&h!==void 0?h:E.value},[R])]),l()])}}});x1.props=TY;x1.inheritAttrs=!1;function OY(t){return![Te.ESC,Te.SHIFT,Te.BACKSPACE,Te.TAB,Te.WIN_KEY,Te.ALT,Te.META,Te.WIN_KEY_RIGHT,Te.CTRL,Te.SEMICOLON,Te.EQUALS,Te.CAPS_LOCK,Te.CONTEXT_MENU,Te.F1,Te.F2,Te.F3,Te.F4,Te.F5,Te.F6,Te.F7,Te.F8,Te.F9,Te.F10,Te.F11,Te.F12].includes(t)}function xR(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,e=null,n;at(()=>{clearTimeout(n)});function i(o){(o||e===null)&&(e=o),clearTimeout(n),n=setTimeout(()=>{e=null},t)}return[()=>e,i]}function vd(){const t=e=>{t.current=e};return t}const EY=oe({name:"Selector",inheritAttrs:!1,props:{id:String,prefixCls:String,showSearch:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},values:Z.array,multiple:{type:Boolean,default:void 0},mode:String,searchValue:String,activeValue:String,inputElement:Z.any,autofocus:{type:Boolean,default:void 0},activeDescendantId:String,tabindex:Z.oneOfType([Z.number,Z.string]),disabled:{type:Boolean,default:void 0},placeholder:Z.any,removeIcon:Z.any,maxTagCount:Z.oneOfType([Z.number,Z.string]),maxTagTextLength:Number,maxTagPlaceholder:Z.any,tagRender:Function,optionLabelRender:Function,tokenWithEnter:{type:Boolean,default:void 0},choiceTransitionName:String,onToggleOpen:{type:Function},onSearch:Function,onSearchSubmit:Function,onRemove:Function,onInputKeyDown:{type:Function},domRef:Function},setup(t,e){let{expose:n}=e;const i=vd(),o=se(!1),[r,a]=xR(0),s=v=>{const{which:b}=v;(b===Te.UP||b===Te.DOWN)&&v.preventDefault(),t.onInputKeyDown&&t.onInputKeyDown(v),b===Te.ENTER&&t.mode==="tags"&&!o.value&&!t.open&&t.onSearchSubmit(v.target.value),OY(b)&&t.onToggleOpen(!0)},l=()=>{a(!0)};let c=null;const u=v=>{t.onSearch(v,!0,o.value)!==!1&&t.onToggleOpen(!0)},d=()=>{o.value=!0},f=v=>{o.value=!1,t.mode!=="combobox"&&u(v.target.value)},h=v=>{let{target:{value:b}}=v;if(t.tokenWithEnter&&c&&/[\r\n]/.test(c)){const y=c.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");b=b.replace(y,c)}c=null,u(b)},p=v=>{const{clipboardData:b}=v;c=b.getData("text")},g=v=>{let{target:b}=v;b!==i.current&&(document.body.style.msTouchAction!==void 0?setTimeout(()=>{i.current.focus()}):i.current.focus())},m=v=>{const b=r();v.target!==i.current&&!b&&v.preventDefault(),(t.mode!=="combobox"&&(!t.showSearch||!b)||!t.open)&&(t.open&&t.onSearch("",!0,!1),t.onToggleOpen())};return n({focus:()=>{i.current.focus()},blur:()=>{i.current.blur()}}),()=>{const{prefixCls:v,domRef:b,mode:y}=t,w={inputRef:i,onInputKeyDown:s,onInputMouseDown:l,onInputChange:h,onInputPaste:p,compositionStatus:o.value,onInputCompositionStart:d,onInputCompositionEnd:f},x=y==="multiple"||y==="tags"?C(PY,H(H({},t),w),null):C(x1,H(H({},t),w),null);return C("div",{ref:b,class:`${v}-selector`,onClick:g,onMousedown:m},[x])}}});function MY(t,e,n){function i(o){var r,a,s;let l=o.target;l.shadowRoot&&o.composed&&(l=o.composedPath()[0]||l);const c=[(r=t[0])===null||r===void 0?void 0:r.value,(s=(a=t[1])===null||a===void 0?void 0:a.value)===null||s===void 0?void 0:s.getPopupElement()];e.value&&c.every(u=>u&&!u.contains(l)&&u!==l)&&n(!1)}Ze(()=>{window.addEventListener("mousedown",i)}),at(()=>{window.removeEventListener("mousedown",i)})}function IY(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10;const e=ie(!1);let n;const i=()=>{clearTimeout(n)};return Ze(()=>{i()}),[e,(r,a)=>{i(),n=setTimeout(()=>{e.value=r,a&&a()},t)},i]}const wR=Symbol("BaseSelectContextKey");function kY(t){return ot(wR,t)}function Yd(){return qe(wR,{})}const w1=()=>{if(typeof navigator>"u"||typeof window>"u")return!1;const t=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(t==null?void 0:t.substring(0,4))};function Rp(t){if(!en(t))return $t(t);const e=new Proxy({},{get(n,i,o){return Reflect.get(t.value,i,o)},set(n,i,o){return t.value[i]=o,!0},deleteProperty(n,i){return Reflect.deleteProperty(t.value,i)},has(n,i){return Reflect.has(t.value,i)},ownKeys(){return Object.keys(t.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return $t(e)}var DY=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o({prefixCls:String,id:String,omitDomProps:Array,displayValues:Array,onDisplayValuesChange:Function,activeValue:String,activeDescendantId:String,onActiveValueChange:Function,searchValue:String,onSearch:Function,onSearchSplit:Function,maxLength:Number,OptionList:Z.any,emptyOptions:Boolean}),Cm=()=>({showSearch:{type:Boolean,default:void 0},tagRender:{type:Function},optionLabelRender:{type:Function},direction:{type:String},tabindex:Number,autofocus:Boolean,notFoundContent:Z.any,placeholder:Z.any,onClear:Function,choiceTransitionName:String,mode:String,disabled:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},onDropdownVisibleChange:{type:Function},getInputElement:{type:Function},getRawInputElement:{type:Function},maxTagTextLength:Number,maxTagCount:{type:[String,Number]},maxTagPlaceholder:Z.any,tokenSeparators:{type:Array},allowClear:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:void 0},inputIcon:Z.any,clearIcon:Z.any,removeIcon:Z.any,animation:String,transitionName:String,dropdownStyle:{type:Object},dropdownClassName:String,dropdownMatchSelectWidth:{type:[Boolean,Number],default:void 0},dropdownRender:{type:Function},dropdownAlign:Object,placement:{type:String},getPopupContainer:{type:Function},showAction:{type:Array},onBlur:{type:Function},onFocus:{type:Function},onKeyup:Function,onKeydown:Function,onMousedown:Function,onPopupScroll:Function,onInputKeyDown:Function,onMouseenter:Function,onMouseleave:Function,onClick:Function}),FY=()=>A(A({},LY()),Cm());function SR(t){return t==="tags"||t==="multiple"}const S1=oe({compatConfig:{MODE:3},name:"BaseSelect",inheritAttrs:!1,props:ct(FY(),{showAction:[],notFoundContent:"Not Found"}),setup(t,e){let{attrs:n,expose:i,slots:o}=e;const r=L(()=>SR(t.mode)),a=L(()=>t.showSearch!==void 0?t.showSearch:r.value||t.mode==="combobox"),s=ie(!1);Ze(()=>{s.value=w1()});const l=Sm(),c=ie(null),u=vd(),d=ie(null),f=ie(null),h=ie(null),p=se(!1),[g,m,v]=IY();i({focus:()=>{var G;(G=f.value)===null||G===void 0||G.focus()},blur:()=>{var G;(G=f.value)===null||G===void 0||G.blur()},scrollTo:G=>{var ee;return(ee=h.value)===null||ee===void 0?void 0:ee.scrollTo(G)}});const w=L(()=>{var G;if(t.mode!=="combobox")return t.searchValue;const ee=(G=t.displayValues[0])===null||G===void 0?void 0:G.value;return typeof ee=="string"||typeof ee=="number"?String(ee):""}),x=t.open!==void 0?t.open:t.defaultOpen,$=ie(x),S=ie(x),_=G=>{$.value=t.open!==void 0?t.open:G,S.value=$.value};ye(()=>t.open,()=>{_(t.open)});const P=L(()=>!t.notFoundContent&&t.emptyOptions);Ke(()=>{S.value=$.value,(t.disabled||P.value&&S.value&&t.mode==="combobox")&&(S.value=!1)});const O=L(()=>P.value?!1:S.value),T=G=>{const ee=G!==void 0?G:!S.value;S.value!==ee&&!t.disabled&&(_(ee),t.onDropdownVisibleChange&&t.onDropdownVisibleChange(ee),!ee&&W.value&&(W.value=!1,m(!1,()=>{B.value=!1,p.value=!1})))},M=L(()=>(t.tokenSeparators||[]).some(G=>[` + onLoadstart onPause onPlay onPlaying onProgress onRatechange onSeeked onSeeking onStalled onSuspend onTimeupdate onVolumechange onWaiting onLoad onError`,R_=`${gY} ${mY}`.split(/[\s\n]+/),vY="aria-",bY="data-";function L_(t,e){return t.indexOf(e)===0}function ka(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;e===!1?n={aria:!0,data:!0,attr:!0}:e===!0?n={aria:!0}:n=A({},e);const i={};return Object.keys(t).forEach(o=>{(n.aria&&(o==="role"||L_(o,vY))||n.data&&L_(o,bY)||n.attr&&(R_.includes(o)||R_.includes(o.toLowerCase())))&&(i[o]=t[o])}),i}const mR=Symbol("OverflowContextProviderKey"),Ay=oe({compatConfig:{MODE:3},name:"OverflowContextProvider",inheritAttrs:!1,props:{value:{type:Object}},setup(t,e){let{slots:n}=e;return ot(mR,L(()=>t.value)),()=>{var i;return(i=n.default)===null||i===void 0?void 0:i.call(n)}}}),yY=()=>qe(mR,L(()=>null));var xY=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);ot.responsive&&!t.display),r=se();i({itemNodeRef:r});function a(s){t.registerSize(t.itemKey,s)}return Xn(()=>{a(null)}),()=>{var s;const{prefixCls:l,invalidate:c,item:u,renderItem:d,responsive:f,registerSize:h,itemKey:p,display:g,order:m,component:v="div"}=t,b=xY(t,["prefixCls","invalidate","item","renderItem","responsive","registerSize","itemKey","display","order","component"]),y=(s=n.default)===null||s===void 0?void 0:s.call(n),w=d&&u!==dl?d(u):y;let x;c||(x={opacity:o.value?0:1,height:o.value?0:dl,overflowY:o.value?"hidden":dl,order:f?m:dl,pointerEvents:o.value?"none":dl,position:o.value?"absolute":dl});const $={};return o.value&&($["aria-hidden"]=!0),C(mo,{disabled:!f,onResize:S=>{let{offsetWidth:_}=S;a(_)}},{default:()=>C(v,H(H(H({class:ce(!c&&l),style:x},$),b),{},{ref:r}),{default:()=>[w]})})}}});var hb=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{var r;if(!o.value){const{component:d="div"}=t,f=hb(t,["component"]);return C(d,H(H({},f),i),{default:()=>[(r=n.default)===null||r===void 0?void 0:r.call(n)]})}const a=o.value,{className:s}=a,l=hb(a,["className"]),{class:c}=i,u=hb(i,["class"]);return C(Ay,{value:null},{default:()=>[C(wh,H(H(H({class:ce(s,c)},l),u),t),n)]})}}});var SY=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o({id:String,prefixCls:String,data:Array,itemKey:[String,Number,Function],itemWidth:{type:Number,default:10},renderItem:Function,renderRawItem:Function,maxCount:[Number,String],renderRest:Function,renderRawRest:Function,suffix:Z.any,component:String,itemComponent:Z.any,onVisibleChange:Function,ssr:String,onMousedown:Function,role:String}),Rr=oe({name:"Overflow",inheritAttrs:!1,props:$Y(),emits:["visibleChange"],setup(t,e){let{attrs:n,emit:i,slots:o}=e;const r=L(()=>t.ssr==="full"),a=ie(null),s=L(()=>a.value||0),l=ie(new Map),c=ie(0),u=ie(0),d=ie(0),f=ie(null),h=ie(null),p=L(()=>h.value===null&&r.value?Number.MAX_SAFE_INTEGER:h.value||0),g=ie(!1),m=L(()=>`${t.prefixCls}-item`),v=L(()=>Math.max(c.value,u.value)),b=L(()=>!!(t.data.length&&t.maxCount===vR)),y=L(()=>t.maxCount===bR),w=L(()=>b.value||typeof t.maxCount=="number"&&t.data.length>t.maxCount),x=L(()=>{let E=t.data;return b.value?a.value===null&&r.value?E=t.data:E=t.data.slice(0,Math.min(t.data.length,s.value/t.itemWidth)):typeof t.maxCount=="number"&&(E=t.data.slice(0,t.maxCount)),E}),$=L(()=>b.value?t.data.slice(p.value+1):t.data.slice(x.value.length)),S=(E,R)=>{var D;return typeof t.itemKey=="function"?t.itemKey(E):(D=t.itemKey&&(E==null?void 0:E[t.itemKey]))!==null&&D!==void 0?D:R},_=L(()=>t.renderItem||(E=>E)),P=(E,R)=>{h.value=E,R||(g.value=E{a.value=R.clientWidth},T=(E,R)=>{const D=new Map(l.value);R===null?D.delete(E):D.set(E,R),l.value=D},M=(E,R)=>{c.value=u.value,u.value=R},I=(E,R)=>{d.value=R},k=E=>l.value.get(S(x.value[E],E));return ye([s,l,u,d,()=>t.itemKey,x],()=>{if(s.value&&v.value&&x.value){let E=d.value;const R=x.value.length,D=R-1;if(!R){P(0),f.value=null;return}for(let F=0;Fs.value){P(F-1),f.value=E-N-d.value+u.value;break}}t.suffix&&k(0)+d.value>s.value&&(f.value=null)}}),()=>{const E=g.value&&!!$.value.length,{itemComponent:R,renderRawItem:D,renderRawRest:F,renderRest:N,prefixCls:B="rc-overflow",suffix:z,component:W="div",id:j,onMousedown:U}=t,{class:V,style:q}=n,Y=SY(n,["class","style"]);let J={};f.value!==null&&b.value&&(J={position:"absolute",left:`${f.value}px`,top:0});const Q={prefixCls:m.value,responsive:b.value,component:R,invalidate:y.value},G=D?(te,ue)=>{const ae=S(te,ue);return C(Ay,{key:ae,value:A(A({},Q),{order:ue,item:te,itemKey:ae,registerSize:T,display:ue<=p.value})},{default:()=>[D(te,ue)]})}:(te,ue)=>{const ae=S(te,ue);return C(wh,H(H({},Q),{},{order:ue,key:ae,item:te,renderItem:_.value,itemKey:ae,registerSize:T,display:ue<=p.value}),null)};let ee=()=>null;const X={order:E?p.value:Number.MAX_SAFE_INTEGER,className:`${m.value} ${m.value}-rest`,registerSize:M,display:E};if(F)F&&(ee=()=>C(Ay,{value:A(A({},Q),X)},{default:()=>[F($.value)]}));else{const te=N||CY;ee=()=>C(wh,H(H({},Q),X),{default:()=>typeof te=="function"?te($.value):te})}const K=()=>{var te;return C(W,H({id:j,class:ce(!y.value&&B,V),style:q,onMousedown:U,role:t.role},Y),{default:()=>[x.value.map(G),w.value?ee():null,z&&C(wh,H(H({},Q),{},{order:p.value,class:`${m.value}-suffix`,registerSize:I,display:!0,style:J}),{default:()=>z}),(te=o.default)===null||te===void 0?void 0:te.call(o)]})};return C(mo,{disabled:!b.value,onResize:O},{default:K})}}});Rr.Item=wY;Rr.RESPONSIVE=vR;Rr.INVALIDATE=bR;const yR=Symbol("TreeSelectLegacyContextPropsKey");function AY(t){return ot(yR,t)}function Cm(){return qe(yR,{})}const _Y={id:String,prefixCls:String,values:Z.array,open:{type:Boolean,default:void 0},searchValue:String,inputRef:Z.any,placeholder:Z.any,disabled:{type:Boolean,default:void 0},mode:String,showSearch:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,activeDescendantId:String,tabindex:Z.oneOfType([Z.number,Z.string]),compositionStatus:Boolean,removeIcon:Z.any,choiceTransitionName:String,maxTagCount:Z.oneOfType([Z.number,Z.string]),maxTagTextLength:Number,maxTagPlaceholder:Z.any.def(()=>t=>`+ ${t.length} ...`),tagRender:Function,onToggleOpen:{type:Function},onRemove:Function,onInputChange:Function,onInputPaste:Function,onInputKeyDown:Function,onInputMouseDown:Function,onInputCompositionStart:Function,onInputCompositionEnd:Function},F_=t=>{t.preventDefault(),t.stopPropagation()},PY=oe({name:"MultipleSelectSelector",inheritAttrs:!1,props:_Y,setup(t){const e=ie(),n=ie(0),i=ie(!1),o=Cm(),r=L(()=>`${t.prefixCls}-selection`),a=L(()=>t.open||t.mode==="tags"?t.searchValue:""),s=L(()=>t.mode==="tags"||t.showSearch&&(t.open||i.value)),l=se("");Ke(()=>{l.value=a.value}),Ze(()=>{ye(l,()=>{n.value=e.value.scrollWidth},{flush:"post",immediate:!0})});function c(p,g,m,v,b){return C("span",{class:ce(`${r.value}-item`,{[`${r.value}-item-disabled`]:m}),title:typeof p=="string"||typeof p=="number"?p.toString():void 0},[C("span",{class:`${r.value}-item-content`},[g]),v&&C(Rs,{class:`${r.value}-item-remove`,onMousedown:F_,onClick:b,customizeIcon:t.removeIcon},{default:()=>[Qn("×")]})])}function u(p,g,m,v,b,y){var w;const x=S=>{F_(S),t.onToggleOpen(!open)};let $=y;return o.keyEntities&&($=((w=o.keyEntities[p])===null||w===void 0?void 0:w.node)||{}),C("span",{key:p,onMousedown:x},[t.tagRender({label:g,value:p,disabled:m,closable:v,onClose:b,option:$})])}function d(p){const{disabled:g,label:m,value:v,option:b}=p,y=!t.disabled&&!g;let w=m;if(typeof t.maxTagTextLength=="number"&&(typeof m=="string"||typeof m=="number")){const $=String(w);$.length>t.maxTagTextLength&&(w=`${$.slice(0,t.maxTagTextLength)}...`)}const x=$=>{var S;$&&$.stopPropagation(),(S=t.onRemove)===null||S===void 0||S.call(t,p)};return typeof t.tagRender=="function"?u(v,w,g,y,x,b):c(m,w,g,y,x)}function f(p){const{maxTagPlaceholder:g=v=>`+ ${v.length} ...`}=t,m=typeof g=="function"?g(p):g;return c(m,m,!1)}const h=p=>{const g=p.target.composing;l.value=p.target.value,g||t.onInputChange(p)};return()=>{const{id:p,prefixCls:g,values:m,open:v,inputRef:b,placeholder:y,disabled:w,autofocus:x,autocomplete:$,activeDescendantId:S,tabindex:_,compositionStatus:P,onInputPaste:O,onInputKeyDown:T,onInputMouseDown:M,onInputCompositionStart:I,onInputCompositionEnd:k}=t,E=C("div",{class:`${r.value}-search`,style:{width:n.value+"px"},key:"input"},[C(gR,{inputRef:b,open:v,prefixCls:g,id:p,inputElement:null,disabled:w,autofocus:x,autocomplete:$,editable:s.value,activeDescendantId:S,value:l.value,onKeydown:T,onMousedown:M,onChange:h,onPaste:O,onCompositionstart:I,onCompositionend:k,tabindex:_,attrs:ka(t,!0),onFocus:()=>i.value=!0,onBlur:()=>i.value=!1},null),C("span",{ref:e,class:`${r.value}-search-mirror`,"aria-hidden":!0},[l.value,Qn(" ")])]),R=C(Rr,{prefixCls:`${r.value}-overflow`,data:m,renderItem:d,renderRest:f,suffix:E,itemKey:"key",maxCount:t.maxTagCount,key:"overflow"},null);return C(Qe,null,[R,!m.length&&!a.value&&!P&&C("span",{class:`${r.value}-placeholder`},[y])])}}}),TY={inputElement:Z.any,id:String,prefixCls:String,values:Z.array,open:{type:Boolean,default:void 0},searchValue:String,inputRef:Z.any,placeholder:Z.any,compositionStatus:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},mode:String,showSearch:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},autocomplete:String,activeDescendantId:String,tabindex:Z.oneOfType([Z.number,Z.string]),activeValue:String,backfill:{type:Boolean,default:void 0},optionLabelRender:Function,onInputChange:Function,onInputPaste:Function,onInputKeyDown:Function,onInputMouseDown:Function,onInputCompositionStart:Function,onInputCompositionEnd:Function},x1=oe({name:"SingleSelector",setup(t){const e=ie(!1),n=L(()=>t.mode==="combobox"),i=L(()=>n.value||t.showSearch),o=L(()=>{let u=t.searchValue||"";return n.value&&t.activeValue&&!e.value&&(u=t.activeValue),u}),r=Cm();ye([n,()=>t.activeValue],()=>{n.value&&(e.value=!1)},{immediate:!0});const a=L(()=>t.mode!=="combobox"&&!t.open&&!t.showSearch?!1:!!o.value||t.compositionStatus),s=L(()=>{const u=t.values[0];return u&&(typeof u.label=="string"||typeof u.label=="number")?u.label.toString():void 0}),l=()=>{if(t.values[0])return null;const u=a.value?{visibility:"hidden"}:void 0;return C("span",{class:`${t.prefixCls}-selection-placeholder`,style:u},[t.placeholder])},c=u=>{u.target.composing||(e.value=!0,t.onInputChange(u))};return()=>{var u,d,f,h;const{inputElement:p,prefixCls:g,id:m,values:v,inputRef:b,disabled:y,autofocus:w,autocomplete:x,activeDescendantId:$,open:S,tabindex:_,optionLabelRender:P,onInputKeyDown:O,onInputMouseDown:T,onInputPaste:M,onInputCompositionStart:I,onInputCompositionEnd:k}=t,E=v[0];let R=null;if(E&&r.customSlots){const D=(u=E.key)!==null&&u!==void 0?u:E.value,F=((d=r.keyEntities[D])===null||d===void 0?void 0:d.node)||{};R=r.customSlots[(f=F.slots)===null||f===void 0?void 0:f.title]||r.customSlots.title||E.label,typeof R=="function"&&(R=R(F))}else R=P&&E?P(E.option):E==null?void 0:E.label;return C(Qe,null,[C("span",{class:`${g}-selection-search`},[C(gR,{inputRef:b,prefixCls:g,id:m,open:S,inputElement:p,disabled:y,autofocus:w,autocomplete:x,editable:i.value,activeDescendantId:$,value:o.value,onKeydown:O,onMousedown:T,onChange:c,onPaste:M,onCompositionstart:I,onCompositionend:k,tabindex:_,attrs:ka(t,!0)},null)]),!n.value&&E&&!a.value&&C("span",{class:`${g}-selection-item`,title:s.value},[C(Qe,{key:(h=E.key)!==null&&h!==void 0?h:E.value},[R])]),l()])}}});x1.props=TY;x1.inheritAttrs=!1;function OY(t){return![Te.ESC,Te.SHIFT,Te.BACKSPACE,Te.TAB,Te.WIN_KEY,Te.ALT,Te.META,Te.WIN_KEY_RIGHT,Te.CTRL,Te.SEMICOLON,Te.EQUALS,Te.CAPS_LOCK,Te.CONTEXT_MENU,Te.F1,Te.F2,Te.F3,Te.F4,Te.F5,Te.F6,Te.F7,Te.F8,Te.F9,Te.F10,Te.F11,Te.F12].includes(t)}function xR(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,e=null,n;at(()=>{clearTimeout(n)});function i(o){(o||e===null)&&(e=o),clearTimeout(n),n=setTimeout(()=>{e=null},t)}return[()=>e,i]}function bd(){const t=e=>{t.current=e};return t}const EY=oe({name:"Selector",inheritAttrs:!1,props:{id:String,prefixCls:String,showSearch:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},values:Z.array,multiple:{type:Boolean,default:void 0},mode:String,searchValue:String,activeValue:String,inputElement:Z.any,autofocus:{type:Boolean,default:void 0},activeDescendantId:String,tabindex:Z.oneOfType([Z.number,Z.string]),disabled:{type:Boolean,default:void 0},placeholder:Z.any,removeIcon:Z.any,maxTagCount:Z.oneOfType([Z.number,Z.string]),maxTagTextLength:Number,maxTagPlaceholder:Z.any,tagRender:Function,optionLabelRender:Function,tokenWithEnter:{type:Boolean,default:void 0},choiceTransitionName:String,onToggleOpen:{type:Function},onSearch:Function,onSearchSubmit:Function,onRemove:Function,onInputKeyDown:{type:Function},domRef:Function},setup(t,e){let{expose:n}=e;const i=bd(),o=se(!1),[r,a]=xR(0),s=v=>{const{which:b}=v;(b===Te.UP||b===Te.DOWN)&&v.preventDefault(),t.onInputKeyDown&&t.onInputKeyDown(v),b===Te.ENTER&&t.mode==="tags"&&!o.value&&!t.open&&t.onSearchSubmit(v.target.value),OY(b)&&t.onToggleOpen(!0)},l=()=>{a(!0)};let c=null;const u=v=>{t.onSearch(v,!0,o.value)!==!1&&t.onToggleOpen(!0)},d=()=>{o.value=!0},f=v=>{o.value=!1,t.mode!=="combobox"&&u(v.target.value)},h=v=>{let{target:{value:b}}=v;if(t.tokenWithEnter&&c&&/[\r\n]/.test(c)){const y=c.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");b=b.replace(y,c)}c=null,u(b)},p=v=>{const{clipboardData:b}=v;c=b.getData("text")},g=v=>{let{target:b}=v;b!==i.current&&(document.body.style.msTouchAction!==void 0?setTimeout(()=>{i.current.focus()}):i.current.focus())},m=v=>{const b=r();v.target!==i.current&&!b&&v.preventDefault(),(t.mode!=="combobox"&&(!t.showSearch||!b)||!t.open)&&(t.open&&t.onSearch("",!0,!1),t.onToggleOpen())};return n({focus:()=>{i.current.focus()},blur:()=>{i.current.blur()}}),()=>{const{prefixCls:v,domRef:b,mode:y}=t,w={inputRef:i,onInputKeyDown:s,onInputMouseDown:l,onInputChange:h,onInputPaste:p,compositionStatus:o.value,onInputCompositionStart:d,onInputCompositionEnd:f},x=y==="multiple"||y==="tags"?C(PY,H(H({},t),w),null):C(x1,H(H({},t),w),null);return C("div",{ref:b,class:`${v}-selector`,onClick:g,onMousedown:m},[x])}}});function MY(t,e,n){function i(o){var r,a,s;let l=o.target;l.shadowRoot&&o.composed&&(l=o.composedPath()[0]||l);const c=[(r=t[0])===null||r===void 0?void 0:r.value,(s=(a=t[1])===null||a===void 0?void 0:a.value)===null||s===void 0?void 0:s.getPopupElement()];e.value&&c.every(u=>u&&!u.contains(l)&&u!==l)&&n(!1)}Ze(()=>{window.addEventListener("mousedown",i)}),at(()=>{window.removeEventListener("mousedown",i)})}function IY(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10;const e=ie(!1);let n;const i=()=>{clearTimeout(n)};return Ze(()=>{i()}),[e,(r,a)=>{i(),n=setTimeout(()=>{e.value=r,a&&a()},t)},i]}const wR=Symbol("BaseSelectContextKey");function kY(t){return ot(wR,t)}function Gd(){return qe(wR,{})}const w1=()=>{if(typeof navigator>"u"||typeof window>"u")return!1;const t=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(t==null?void 0:t.substring(0,4))};function Lp(t){if(!en(t))return $t(t);const e=new Proxy({},{get(n,i,o){return Reflect.get(t.value,i,o)},set(n,i,o){return t.value[i]=o,!0},deleteProperty(n,i){return Reflect.deleteProperty(t.value,i)},has(n,i){return Reflect.has(t.value,i)},ownKeys(){return Object.keys(t.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return $t(e)}var DY=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o({prefixCls:String,id:String,omitDomProps:Array,displayValues:Array,onDisplayValuesChange:Function,activeValue:String,activeDescendantId:String,onActiveValueChange:Function,searchValue:String,onSearch:Function,onSearchSplit:Function,maxLength:Number,OptionList:Z.any,emptyOptions:Boolean}),$m=()=>({showSearch:{type:Boolean,default:void 0},tagRender:{type:Function},optionLabelRender:{type:Function},direction:{type:String},tabindex:Number,autofocus:Boolean,notFoundContent:Z.any,placeholder:Z.any,onClear:Function,choiceTransitionName:String,mode:String,disabled:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},onDropdownVisibleChange:{type:Function},getInputElement:{type:Function},getRawInputElement:{type:Function},maxTagTextLength:Number,maxTagCount:{type:[String,Number]},maxTagPlaceholder:Z.any,tokenSeparators:{type:Array},allowClear:{type:Boolean,default:void 0},showArrow:{type:Boolean,default:void 0},inputIcon:Z.any,clearIcon:Z.any,removeIcon:Z.any,animation:String,transitionName:String,dropdownStyle:{type:Object},dropdownClassName:String,dropdownMatchSelectWidth:{type:[Boolean,Number],default:void 0},dropdownRender:{type:Function},dropdownAlign:Object,placement:{type:String},getPopupContainer:{type:Function},showAction:{type:Array},onBlur:{type:Function},onFocus:{type:Function},onKeyup:Function,onKeydown:Function,onMousedown:Function,onPopupScroll:Function,onInputKeyDown:Function,onMouseenter:Function,onMouseleave:Function,onClick:Function}),FY=()=>A(A({},LY()),$m());function SR(t){return t==="tags"||t==="multiple"}const S1=oe({compatConfig:{MODE:3},name:"BaseSelect",inheritAttrs:!1,props:ct(FY(),{showAction:[],notFoundContent:"Not Found"}),setup(t,e){let{attrs:n,expose:i,slots:o}=e;const r=L(()=>SR(t.mode)),a=L(()=>t.showSearch!==void 0?t.showSearch:r.value||t.mode==="combobox"),s=ie(!1);Ze(()=>{s.value=w1()});const l=Cm(),c=ie(null),u=bd(),d=ie(null),f=ie(null),h=ie(null),p=se(!1),[g,m,v]=IY();i({focus:()=>{var G;(G=f.value)===null||G===void 0||G.focus()},blur:()=>{var G;(G=f.value)===null||G===void 0||G.blur()},scrollTo:G=>{var ee;return(ee=h.value)===null||ee===void 0?void 0:ee.scrollTo(G)}});const w=L(()=>{var G;if(t.mode!=="combobox")return t.searchValue;const ee=(G=t.displayValues[0])===null||G===void 0?void 0:G.value;return typeof ee=="string"||typeof ee=="number"?String(ee):""}),x=t.open!==void 0?t.open:t.defaultOpen,$=ie(x),S=ie(x),_=G=>{$.value=t.open!==void 0?t.open:G,S.value=$.value};ye(()=>t.open,()=>{_(t.open)});const P=L(()=>!t.notFoundContent&&t.emptyOptions);Ke(()=>{S.value=$.value,(t.disabled||P.value&&S.value&&t.mode==="combobox")&&(S.value=!1)});const O=L(()=>P.value?!1:S.value),T=G=>{const ee=G!==void 0?G:!S.value;S.value!==ee&&!t.disabled&&(_(ee),t.onDropdownVisibleChange&&t.onDropdownVisibleChange(ee),!ee&&W.value&&(W.value=!1,m(!1,()=>{B.value=!1,p.value=!1})))},M=L(()=>(t.tokenSeparators||[]).some(G=>[` `,`\r -`].includes(G))),I=(G,ee,X)=>{var K,te;let ue=!0,ae=G;(K=t.onActiveValueChange)===null||K===void 0||K.call(t,null);const re=X?null:DW(G,t.tokenSeparators);return t.mode!=="combobox"&&re&&(ae="",(te=t.onSearchSplit)===null||te===void 0||te.call(t,re),T(!1),ue=!1),t.onSearch&&w.value!==ae&&t.onSearch(ae,{source:ee?"typing":"effect"}),ue},k=G=>{var ee;!G||!G.trim()||(ee=t.onSearch)===null||ee===void 0||ee.call(t,G,{source:"submit"})};ye(S,()=>{!S.value&&!r.value&&t.mode!=="combobox"&&I("",!1,!1)},{immediate:!0,flush:"post"}),ye(()=>t.disabled,()=>{$.value&&t.disabled&&_(!1),t.disabled&&!p.value&&m(!1)},{immediate:!0});const[E,R]=xR(),D=function(G){var ee;const X=E(),{which:K}=G;if(K===Te.ENTER&&(t.mode!=="combobox"&&G.preventDefault(),S.value||T(!0)),R(!!w.value),K===Te.BACKSPACE&&!X&&r.value&&!w.value&&t.displayValues.length){const re=[...t.displayValues];let ne=null;for(let le=re.length-1;le>=0;le-=1){const he=re[le];if(!he.disabled){re.splice(le,1),ne=he;break}}ne&&t.onDisplayValuesChange(re,{type:"remove",values:[ne]})}for(var te=arguments.length,ue=new Array(te>1?te-1:0),ae=1;ae1?ee-1:0),K=1;K{const ee=t.displayValues.filter(X=>X!==G);t.onDisplayValuesChange(ee,{type:"remove",values:[G]})},B=ie(!1),z=function(){m(!0),t.disabled||(t.onFocus&&!B.value&&t.onFocus(...arguments),t.showAction&&t.showAction.includes("focus")&&T(!0)),B.value=!0},W=se(!1),j=function(){if(W.value||(p.value=!0,m(!1,()=>{B.value=!1,p.value=!1,T(!1)}),t.disabled))return;const G=w.value;G&&(t.mode==="tags"?t.onSearch(G,{source:"submit"}):t.mode==="multiple"&&t.onSearch("",{source:"blur"})),t.onBlur&&t.onBlur(...arguments)},U=()=>{W.value=!0},V=()=>{W.value=!1};ot("VCSelectContainerEvent",{focus:z,blur:j});const q=[];Ze(()=>{q.forEach(G=>clearTimeout(G)),q.splice(0,q.length)}),at(()=>{q.forEach(G=>clearTimeout(G)),q.splice(0,q.length)});const Y=function(G){var ee,X;const{target:K}=G,te=(ee=d.value)===null||ee===void 0?void 0:ee.getPopupElement();if(te&&te.contains(K)){const ne=setTimeout(()=>{var le;const he=q.indexOf(ne);he!==-1&&q.splice(he,1),v(),!s.value&&!te.contains(document.activeElement)&&((le=f.value)===null||le===void 0||le.focus())});q.push(ne)}for(var ue=arguments.length,ae=new Array(ue>1?ue-1:0),re=1;re{};return Ze(()=>{ye(O,()=>{var G;if(O.value){const ee=Math.ceil((G=c.value)===null||G===void 0?void 0:G.offsetWidth);J.value!==ee&&!Number.isNaN(ee)&&(J.value=ee)}},{immediate:!0,flush:"post"})}),MY([c,d],O,T),kY(Rp(A(A({},uo(t)),{open:S,triggerOpen:O,showSearch:a,multiple:r,toggleOpen:T}))),()=>{const G=A(A({},t),n),{prefixCls:ee,id:X,open:K,defaultOpen:te,mode:ue,showSearch:ae,searchValue:re,onSearch:ne,allowClear:le,clearIcon:he,showArrow:pe,inputIcon:ge,disabled:be,loading:$e,getInputElement:fe,getPopupContainer:de,placement:xe,animation:_e,transitionName:Oe,dropdownStyle:Re,dropdownClassName:Se,dropdownMatchSelectWidth:Ae,dropdownRender:Pe,dropdownAlign:ke,showAction:Le,direction:De,tokenSeparators:je,tagRender:ft,optionLabelRender:_t,onPopupScroll:yt,onDropdownVisibleChange:Pt,onFocus:Et,onBlur:fn,onKeyup:yn,onKeydown:$n,onMousedown:on,onClear:Yn,omitDomProps:wi,getRawInputElement:Zi,displayValues:So,onDisplayValuesChange:Si,emptyOptions:za,activeDescendantId:Ie,activeValue:st,OptionList:tt}=G,Lt=DY(G,["prefixCls","id","open","defaultOpen","mode","showSearch","searchValue","onSearch","allowClear","clearIcon","showArrow","inputIcon","disabled","loading","getInputElement","getPopupContainer","placement","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","showAction","direction","tokenSeparators","tagRender","optionLabelRender","onPopupScroll","onDropdownVisibleChange","onFocus","onBlur","onKeyup","onKeydown","onMousedown","onClear","omitDomProps","getRawInputElement","displayValues","onDisplayValuesChange","emptyOptions","activeDescendantId","activeValue","OptionList"]),xn=ue==="combobox"&&fe&&fe()||null,rn=typeof Zi=="function"&&Zi(),Ci=A({},Lt);let Ln;rn&&(Ln=$o=>{T($o)}),RY.forEach($o=>{delete Ci[$o]}),wi==null||wi.forEach($o=>{delete Ci[$o]});const jo=pe!==void 0?pe:$e||!r.value&&ue!=="combobox";let Ii;jo&&(Ii=C(Rs,{class:ce(`${ee}-arrow`,{[`${ee}-arrow-loading`]:$e}),customizeIcon:ge,customizeIconProps:{loading:$e,searchValue:w.value,open:S.value,focused:g.value,showSearch:a.value}},null));let Ji;const Ut=()=>{Yn==null||Yn(),Si([],{type:"clear",values:So}),I("",!1,!1)};!be&&le&&(So.length||w.value)&&(Ji=C(Rs,{class:`${ee}-clear`,onMousedown:Ut,customizeIcon:he},{default:()=>[Qn("×")]}));const Co=C(tt,{ref:h},A(A({},l.customSlots),{option:o.option})),Qi=ce(ee,n.class,{[`${ee}-focused`]:g.value,[`${ee}-multiple`]:r.value,[`${ee}-single`]:!r.value,[`${ee}-allow-clear`]:le,[`${ee}-show-arrow`]:jo,[`${ee}-disabled`]:be,[`${ee}-loading`]:$e,[`${ee}-open`]:S.value,[`${ee}-customize-input`]:xn,[`${ee}-show-search`]:a.value}),Ur=C(sY,{ref:d,disabled:be,prefixCls:ee,visible:O.value,popupElement:Co,containerWidth:J.value,animation:_e,transitionName:Oe,dropdownStyle:Re,dropdownClassName:Se,direction:De,dropdownMatchSelectWidth:Ae,dropdownRender:Pe,dropdownAlign:ke,placement:xe,getPopupContainer:de,empty:za,getTriggerDOMNode:()=>u.current,onPopupVisibleChange:Ln,onPopupMouseEnter:Q,onPopupFocusin:U,onPopupFocusout:V},{default:()=>rn?cn(rn)&&At(rn,{ref:u},!1,!0):C(EY,H(H({},t),{},{domRef:u,prefixCls:ee,inputElement:xn,ref:f,id:X,showSearch:a.value,mode:ue,activeDescendantId:Ie,tagRender:ft,optionLabelRender:_t,values:So,open:S.value,onToggleOpen:T,activeValue:st,searchValue:w.value,onSearch:I,onSearchSubmit:k,onRemove:N,tokenWithEnter:M.value}),null)});let qr;return rn?qr=Ur:qr=C("div",H(H({},Ci),{},{class:Qi,ref:c,onMousedown:Y,onKeydown:D,onKeyup:F}),[g.value&&!S.value&&C("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},[`${So.map($o=>{let{label:ll,value:Ao}=$o;return["number","string"].includes(typeof ll)?ll:Ao}).join(", ")}`]),Ur,Ii,Ji]),qr}}}),$m=(t,e)=>{let{height:n,offset:i,prefixCls:o,onInnerResize:r}=t,{slots:a}=e;var s;let l={},c={display:"flex",flexDirection:"column"};return i!==void 0&&(l={height:`${n}px`,position:"relative",overflow:"hidden"},c=A(A({},c),{transform:`translateY(${i}px)`,position:"absolute",left:0,right:0,top:0})),C("div",{style:l},[C(mo,{onResize:u=>{let{offsetHeight:d}=u;d&&r&&r()}},{default:()=>[C("div",{style:c,class:ce({[`${o}-holder-inner`]:o})},[(s=a.default)===null||s===void 0?void 0:s.call(a)])]})])};$m.displayName="Filter";$m.inheritAttrs=!1;$m.props={prefixCls:String,height:Number,offset:Number,onInnerResize:Function};const CR=(t,e)=>{let{setRef:n}=t,{slots:i}=e;var o;const r=Dt((o=i.default)===null||o===void 0?void 0:o.call(i));return r&&r.length?On(r[0],{ref:n}):r};CR.props={setRef:{type:Function,default:()=>{}}};const NY=20;function N_(t){return"touches"in t?t.touches[0].pageY:t.pageY}const BY=oe({compatConfig:{MODE:3},name:"ScrollBar",inheritAttrs:!1,props:{prefixCls:String,scrollTop:Number,scrollHeight:Number,height:Number,count:Number,onScroll:{type:Function},onStartMove:{type:Function},onStopMove:{type:Function}},setup(){return{moveRaf:null,scrollbarRef:vd(),thumbRef:vd(),visibleTimeout:null,state:$t({dragging:!1,pageY:null,startTop:null,visible:!1})}},watch:{scrollTop:{handler(){this.delayHidden()},flush:"post"}},mounted(){var t,e;(t=this.scrollbarRef.current)===null||t===void 0||t.addEventListener("touchstart",this.onScrollbarTouchStart,pn?{passive:!1}:!1),(e=this.thumbRef.current)===null||e===void 0||e.addEventListener("touchstart",this.onMouseDown,pn?{passive:!1}:!1)},beforeUnmount(){this.removeEvents(),clearTimeout(this.visibleTimeout)},methods:{delayHidden(){clearTimeout(this.visibleTimeout),this.state.visible=!0,this.visibleTimeout=setTimeout(()=>{this.state.visible=!1},2e3)},onScrollbarTouchStart(t){t.preventDefault()},onContainerMouseDown(t){t.stopPropagation(),t.preventDefault()},patchEvents(){window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp),this.thumbRef.current.addEventListener("touchmove",this.onMouseMove,pn?{passive:!1}:!1),this.thumbRef.current.addEventListener("touchend",this.onMouseUp)},removeEvents(){window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onMouseUp),this.scrollbarRef.current.removeEventListener("touchstart",this.onScrollbarTouchStart,pn?{passive:!1}:!1),this.thumbRef.current&&(this.thumbRef.current.removeEventListener("touchstart",this.onMouseDown,pn?{passive:!1}:!1),this.thumbRef.current.removeEventListener("touchmove",this.onMouseMove,pn?{passive:!1}:!1),this.thumbRef.current.removeEventListener("touchend",this.onMouseUp)),lt.cancel(this.moveRaf)},onMouseDown(t){const{onStartMove:e}=this.$props;A(this.state,{dragging:!0,pageY:N_(t),startTop:this.getTop()}),e(),this.patchEvents(),t.stopPropagation(),t.preventDefault()},onMouseMove(t){const{dragging:e,pageY:n,startTop:i}=this.state,{onScroll:o}=this.$props;if(lt.cancel(this.moveRaf),e){const r=N_(t)-n,a=i+r,s=this.getEnableScrollRange(),l=this.getEnableHeightRange(),c=l?a/l:0,u=Math.ceil(c*s);this.moveRaf=lt(()=>{o(u)})}},onMouseUp(){const{onStopMove:t}=this.$props;this.state.dragging=!1,t(),this.removeEvents()},getSpinHeight(){const{height:t,scrollHeight:e}=this.$props;let n=t/e*100;return n=Math.max(n,NY),n=Math.min(n,t/2),Math.floor(n)},getEnableScrollRange(){const{scrollHeight:t,height:e}=this.$props;return t-e||0},getEnableHeightRange(){const{height:t}=this.$props,e=this.getSpinHeight();return t-e||0},getTop(){const{scrollTop:t}=this.$props,e=this.getEnableScrollRange(),n=this.getEnableHeightRange();return t===0||e===0?0:t/e*n},showScroll(){const{height:t,scrollHeight:e}=this.$props;return e>t}},render(){const{dragging:t,visible:e}=this.state,{prefixCls:n}=this.$props,i=this.getSpinHeight()+"px",o=this.getTop()+"px",r=this.showScroll(),a=r&&e;return C("div",{ref:this.scrollbarRef,class:ce(`${n}-scrollbar`,{[`${n}-scrollbar-show`]:r}),style:{width:"8px",top:0,bottom:0,right:0,position:"absolute",display:a?void 0:"none"},onMousedown:this.onContainerMouseDown,onMousemove:this.delayHidden},[C("div",{ref:this.thumbRef,class:ce(`${n}-scrollbar-thumb`,{[`${n}-scrollbar-thumb-moving`]:t}),style:{width:"100%",height:i,top:o,left:0,position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:"99px",cursor:"pointer",userSelect:"none"},onMousedown:this.onMouseDown},null)])}});function zY(t,e,n,i){const o=new Map,r=new Map,a=se(Symbol("update"));ye(t,()=>{a.value=Symbol("update")});let s;function l(){lt.cancel(s)}function c(){l(),s=lt(()=>{o.forEach((d,f)=>{if(d&&d.offsetParent){const{offsetHeight:h}=d;r.get(f)!==h&&(a.value=Symbol("update"),r.set(f,d.offsetHeight))}})})}function u(d,f){const h=e(d);o.get(h),f?(o.set(h,f.$el||f),c()):o.delete(h)}return Xn(()=>{l()}),[u,c,r,a]}function HY(t,e,n,i,o,r,a,s){let l;return c=>{if(c==null){s();return}lt.cancel(l);const u=e.value,d=i.itemHeight;if(typeof c=="number")a(c);else if(c&&typeof c=="object"){let f;const{align:h}=c;"index"in c?{index:f}=c:f=u.findIndex(m=>o(m)===c.key);const{offset:p=0}=c,g=(m,v)=>{if(m<0||!t.value)return;const b=t.value.clientHeight;let y=!1,w=v;if(b){const x=v||h;let $=0,S=0,_=0;const P=Math.min(u.length,f);for(let M=0;M<=P;M+=1){const I=o(u[M]);S=$;const k=n.get(I);_=S+(k===void 0?d:k),$=_,M===f&&k===void 0&&(y=!0)}const O=t.value.scrollTop;let T=null;switch(x){case"top":T=S-p;break;case"bottom":T=_-b+p;break;default:{const M=O+b;SM&&(w="bottom")}}T!==null&&T!==O&&a(T)}l=lt(()=>{y&&r(),g(m-1,w)},2)};g(5)}}}const WY=typeof navigator=="object"&&/Firefox/i.test(navigator.userAgent),$R=(t,e)=>{let n=!1,i=null;function o(){clearTimeout(i),n=!0,i=setTimeout(()=>{n=!1},50)}return function(r){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const s=r<0&&t.value||r>0&&e.value;return a&&s?(clearTimeout(i),n=!1):(!s||n)&&o(),!n&&s}};function jY(t,e,n,i){let o=0,r=null,a=null,s=!1;const l=$R(e,n);function c(d){if(!t.value)return;lt.cancel(r);const{deltaY:f}=d;o+=f,a=f,!l(f)&&(WY||d.preventDefault(),r=lt(()=>{i(o*(s?10:1)),o=0}))}function u(d){t.value&&(s=d.detail===a)}return[c,u]}const VY=14/15;function XY(t,e,n){let i=!1,o=0,r=null,a=null;const s=()=>{r&&(r.removeEventListener("touchmove",l),r.removeEventListener("touchend",c))},l=f=>{if(i){const h=Math.ceil(f.touches[0].pageY);let p=o-h;o=h,n(p)&&f.preventDefault(),clearInterval(a),a=setInterval(()=>{p*=VY,(!n(p,!0)||Math.abs(p)<=.1)&&clearInterval(a)},16)}},c=()=>{i=!1,s()},u=f=>{s(),f.touches.length===1&&!i&&(i=!0,o=Math.ceil(f.touches[0].pageY),r=f.target,r.addEventListener("touchmove",l,{passive:!1}),r.addEventListener("touchend",c))},d=()=>{};Ze(()=>{document.addEventListener("touchmove",d,{passive:!1}),ye(t,f=>{e.value.removeEventListener("touchstart",u),s(),clearInterval(a),f&&e.value.addEventListener("touchstart",u,{passive:!1})},{immediate:!0})}),at(()=>{document.removeEventListener("touchmove",d)})}var YY=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{const c=e+l,u=o(s,c,{}),d=a(s);return C(CR,{key:d,setRef:f=>i(s,f)},{default:()=>[u]})})}const AR=oe({compatConfig:{MODE:3},name:"List",inheritAttrs:!1,props:{prefixCls:String,data:Z.array,height:Number,itemHeight:Number,fullHeight:{type:Boolean,default:void 0},itemKey:{type:[String,Number,Function],required:!0},component:{type:[String,Object]},virtual:{type:Boolean,default:void 0},children:Function,onScroll:Function,onMousedown:Function,onMouseenter:Function,onVisibleChange:Function},setup(t,e){let{expose:n}=e;const i=L(()=>{const{height:N,itemHeight:B,virtual:z}=t;return!!(z!==!1&&N&&B)}),o=L(()=>{const{height:N,itemHeight:B,data:z}=t;return i.value&&z&&B*z.length>N}),r=$t({scrollTop:0,scrollMoving:!1}),a=L(()=>t.data||GY),s=ie([]);ye(a,()=>{s.value=dt(a.value).slice()},{immediate:!0});const l=ie(N=>{});ye(()=>t.itemKey,N=>{typeof N=="function"?l.value=N:l.value=B=>B==null?void 0:B[N]},{immediate:!0});const c=ie(),u=ie(),d=ie(),f=N=>l.value(N),h={getKey:f};function p(N){let B;typeof N=="function"?B=N(r.scrollTop):B=N;const z=$(B);c.value&&(c.value.scrollTop=z),r.scrollTop=z}const[g,m,v,b]=zY(s,f),y=$t({scrollHeight:void 0,start:0,end:0,offset:void 0}),w=ie(0);Ze(()=>{pt(()=>{var N;w.value=((N=u.value)===null||N===void 0?void 0:N.offsetHeight)||0})}),ri(()=>{pt(()=>{var N;w.value=((N=u.value)===null||N===void 0?void 0:N.offsetHeight)||0})}),ye([i,s],()=>{i.value||A(y,{scrollHeight:void 0,start:0,end:s.value.length-1,offset:void 0})},{immediate:!0}),ye([i,s,w,o],()=>{i.value&&!o.value&&A(y,{scrollHeight:w.value,start:0,end:s.value.length-1,offset:void 0}),c.value&&(r.scrollTop=c.value.scrollTop)},{immediate:!0}),ye([o,i,()=>r.scrollTop,s,b,()=>t.height,w],()=>{if(!i.value||!o.value)return;let N=0,B,z,W;const j=s.value.length,U=s.value,V=r.scrollTop,{itemHeight:q,height:Y}=t,J=V+Y;for(let Q=0;Q=V&&(B=Q,z=N),W===void 0&&K>J&&(W=Q),N=K}B===void 0&&(B=0,z=0,W=Math.ceil(Y/q)),W===void 0&&(W=j-1),W=Math.min(W+1,j),A(y,{scrollHeight:N,start:B,end:W,offset:z})},{immediate:!0});const x=L(()=>y.scrollHeight-t.height);function $(N){let B=N;return Number.isNaN(x.value)||(B=Math.min(B,x.value)),B=Math.max(B,0),B}const S=L(()=>r.scrollTop<=0),_=L(()=>r.scrollTop>=x.value),P=$R(S,_);function O(N){p(N)}function T(N){var B;const{scrollTop:z}=N.currentTarget;z!==r.scrollTop&&p(z),(B=t.onScroll)===null||B===void 0||B.call(t,N)}const[M,I]=jY(i,S,_,N=>{p(B=>B+N)});XY(i,c,(N,B)=>P(N,B)?!1:(M({preventDefault(){},deltaY:N}),!0));function k(N){i.value&&N.preventDefault()}const E=()=>{c.value&&(c.value.removeEventListener("wheel",M,pn?{passive:!1}:!1),c.value.removeEventListener("DOMMouseScroll",I),c.value.removeEventListener("MozMousePixelScroll",k))};Ke(()=>{pt(()=>{c.value&&(E(),c.value.addEventListener("wheel",M,pn?{passive:!1}:!1),c.value.addEventListener("DOMMouseScroll",I),c.value.addEventListener("MozMousePixelScroll",k))})}),at(()=>{E()});const R=HY(c,s,v,t,f,m,p,()=>{var N;(N=d.value)===null||N===void 0||N.delayHidden()});n({scrollTo:R});const D=L(()=>{let N=null;return t.height&&(N=A({[t.fullHeight?"height":"maxHeight"]:t.height+"px"},KY),i.value&&(N.overflowY="hidden",r.scrollMoving&&(N.pointerEvents="none"))),N});return ye([()=>y.start,()=>y.end,s],()=>{if(t.onVisibleChange){const N=s.value.slice(y.start,y.end+1);t.onVisibleChange(N,s.value)}},{flush:"post"}),{state:r,mergedData:s,componentStyle:D,onFallbackScroll:T,onScrollBar:O,componentRef:c,useVirtual:i,calRes:y,collectHeight:m,setInstance:g,sharedConfig:h,scrollBarRef:d,fillerInnerRef:u,delayHideScrollBar:()=>{var N;(N=d.value)===null||N===void 0||N.delayHidden()}}},render(){const t=A(A({},this.$props),this.$attrs),{prefixCls:e="rc-virtual-list",height:n,itemHeight:i,fullHeight:o,data:r,itemKey:a,virtual:s,component:l="div",onScroll:c,children:u=this.$slots.default,style:d,class:f}=t,h=YY(t,["prefixCls","height","itemHeight","fullHeight","data","itemKey","virtual","component","onScroll","children","style","class"]),p=ce(e,f),{scrollTop:g}=this.state,{scrollHeight:m,offset:v,start:b,end:y}=this.calRes,{componentStyle:w,onFallbackScroll:x,onScrollBar:$,useVirtual:S,collectHeight:_,sharedConfig:P,setInstance:O,mergedData:T,delayHideScrollBar:M}=this;return C("div",H({style:A(A({},d),{position:"relative"}),class:p},h),[C(l,{class:`${e}-holder`,style:w,ref:"componentRef",onScroll:x,onMouseenter:M},{default:()=>[C($m,{prefixCls:e,height:m,offset:v,onInnerResize:_,ref:"fillerInnerRef"},{default:()=>UY(T,b,y,O,u,P)})]}),S&&C(BY,{ref:"scrollBarRef",prefixCls:e,scrollTop:g,height:n,scrollHeight:m,count:T.length,onScroll:$,onStartMove:()=>{this.state.scrollMoving=!0},onStopMove:()=>{this.state.scrollMoving=!1}},null)])}});function C1(t,e,n){const i=se(t());return ye(e,(o,r)=>{n?n(o,r)&&(i.value=t()):i.value=t()}),i}function qY(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}const _R=Symbol("SelectContextKey");function ZY(t){return ot(_R,t)}function JY(){return qe(_R,{})}var QY=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o`${o.prefixCls}-item`),s=C1(()=>r.flattenOptions,[()=>o.open,()=>r.flattenOptions],x=>x[0]),l=vd(),c=x=>{x.preventDefault()},u=x=>{l.current&&l.current.scrollTo(typeof x=="number"?{index:x}:x)},d=function(x){let $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const S=s.value.length;for(let _=0;_1&&arguments[1]!==void 0?arguments[1]:!1;f.activeIndex=x;const S={source:$?"keyboard":"mouse"},_=s.value[x];if(!_){r.onActiveValue(null,-1,S);return}r.onActiveValue(_.value,x,S)};ye([()=>s.value.length,()=>o.searchValue],()=>{h(r.defaultActiveFirstOption!==!1?d(0):-1)},{immediate:!0});const p=x=>r.rawValues.has(x)&&o.mode!=="combobox";ye([()=>o.open,()=>o.searchValue],()=>{if(!o.multiple&&o.open&&r.rawValues.size===1){const x=Array.from(r.rawValues)[0],$=dt(s.value).findIndex(S=>{let{data:_}=S;return _[r.fieldNames.value]===x});$!==-1&&(h($),pt(()=>{u($)}))}o.open&&pt(()=>{var x;(x=l.current)===null||x===void 0||x.scrollTo(void 0)})},{immediate:!0,flush:"post"});const g=x=>{x!==void 0&&r.onSelect(x,{selected:!r.rawValues.has(x)}),o.multiple||o.toggleOpen(!1)},m=x=>typeof x.label=="function"?x.label():x.label;function v(x){const $=s.value[x];if(!$)return null;const S=$.data||{},{value:_}=S,{group:P}=$,O=ka(S,!0),T=m($);return $?C("div",H(H({"aria-label":typeof T=="string"&&!P?T:null},O),{},{key:x,role:P?"presentation":"option",id:`${o.id}_list_${x}`,"aria-selected":p(_)}),[_]):null}return n({onKeydown:x=>{const{which:$,ctrlKey:S}=x;switch($){case Te.N:case Te.P:case Te.UP:case Te.DOWN:{let _=0;if($===Te.UP?_=-1:$===Te.DOWN?_=1:qY()&&S&&($===Te.N?_=1:$===Te.P&&(_=-1)),_!==0){const P=d(f.activeIndex+_,_);u(P),h(P,!0)}break}case Te.ENTER:{const _=s.value[f.activeIndex];_&&!_.data.disabled?g(_.value):g(void 0),o.open&&x.preventDefault();break}case Te.ESC:o.toggleOpen(!1),o.open&&x.stopPropagation()}},onKeyup:()=>{},scrollTo:x=>{u(x)}}),()=>{const{id:x,notFoundContent:$,onPopupScroll:S}=o,{menuItemSelectedIcon:_,fieldNames:P,virtual:O,listHeight:T,listItemHeight:M}=r,I=i.option,{activeIndex:k}=f,E=Object.keys(P).map(R=>P[R]);return s.value.length===0?C("div",{role:"listbox",id:`${x}_list`,class:`${a.value}-empty`,onMousedown:c},[$]):C(Qe,null,[C("div",{role:"listbox",id:`${x}_list`,style:{height:0,width:0,overflow:"hidden"}},[v(k-1),v(k),v(k+1)]),C(AR,{itemKey:"key",ref:l,data:s.value,height:T,itemHeight:M,fullHeight:!1,onMousedown:c,onScroll:S,virtual:O},{default:(R,D)=>{var F;const{group:N,groupOption:B,data:z,value:W}=R,{key:j}=z,U=typeof R.label=="function"?R.label():R.label;if(N){const he=(F=z.title)!==null&&F!==void 0?F:B_(U)&&U;return C("div",{class:ce(a.value,`${a.value}-group`),title:he},[I?I(z):U!==void 0?U:j])}const{disabled:V,title:q,children:Y,style:J,class:Q,className:G}=z,ee=QY(z,["disabled","title","children","style","class","className"]),X=ht(ee,E),K=p(W),te=`${a.value}-option`,ue=ce(a.value,te,Q,G,{[`${te}-grouped`]:B,[`${te}-active`]:k===D&&!V,[`${te}-disabled`]:V,[`${te}-selected`]:K}),ae=m(R),re=!_||typeof _=="function"||K,ne=typeof ae=="number"?ae:ae||W;let le=B_(ne)?ne.toString():void 0;return q!==void 0&&(le=q),C("div",H(H({},X),{},{"aria-selected":K,class:ue,title:le,onMousemove:he=>{ee.onMousemove&&ee.onMousemove(he),!(k===D||V)&&h(D)},onClick:he=>{V||g(W),ee.onClick&&ee.onClick(he)},style:J}),[C("div",{class:`${te}-content`},[I?I(z):ne]),cn(_)||K,re&&C(Rs,{class:`${a.value}-option-state`,customizeIcon:_,customizeIconProps:{isSelected:K}},{default:()=>[K?"✓":null]})])}})])}}});var tG=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o1&&arguments[1]!==void 0?arguments[1]:!1;return Dt(t).map((i,o)=>{var r;if(!cn(i)||!i.type)return null;const{type:{isSelectOptGroup:a},key:s,children:l,props:c}=i;if(e||!a)return nG(i);const u=l&&l.default?l.default():void 0,d=(c==null?void 0:c.label)||((r=l.label)===null||r===void 0?void 0:r.call(l))||s;return A(A({key:`__RC_SELECT_GRP__${s===null?o:String(s)}__`},c),{label:d,options:PR(u||[])})}).filter(i=>i)}function iG(t,e,n){const i=ie(),o=ie(),r=ie(),a=ie([]);return ye([t,e],()=>{t.value?a.value=dt(t.value).slice():a.value=PR(e.value)},{immediate:!0,deep:!0}),Ke(()=>{const s=a.value,l=new Map,c=new Map,u=n.value;function d(f){let h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;for(let p=0;p0&&arguments[0]!==void 0?arguments[0]:se("");const e=`rc_select_${rG()}`;return t.value||e}function TR(t){return Array.isArray(t)?t:t!==void 0?[t]:[]}function pb(t,e){return TR(t).join("").toUpperCase().includes(e)}const aG=(t,e,n,i,o)=>L(()=>{const r=n.value,a=o==null?void 0:o.value,s=i==null?void 0:i.value;if(!r||s===!1)return t.value;const{options:l,label:c,value:u}=e.value,d=[],f=typeof s=="function",h=r.toUpperCase(),p=f?s:(m,v)=>a?pb(v[a],h):v[l]?pb(v[c!=="children"?c:"label"],h):pb(v[u],h),g=f?m=>my(m):m=>m;return t.value.forEach(m=>{if(m[l]){if(p(r,g(m)))d.push(m);else{const b=m[l].filter(y=>p(r,g(y)));b.length&&d.push(A(A({},m),{[l]:b}))}return}p(r,g(m))&&d.push(m)}),d}),sG=(t,e)=>{const n=ie({values:new Map,options:new Map});return[L(()=>{const{values:r,options:a}=n.value,s=t.value.map(u=>{var d;return u.label===void 0?A(A({},u),{label:(d=r.get(u.value))===null||d===void 0?void 0:d.label}):u}),l=new Map,c=new Map;return s.forEach(u=>{l.set(u.value,u),c.set(u.value,e.value.get(u.value)||a.get(u.value))}),n.value.values=l,n.value.options=c,s}),r=>e.value.get(r)||n.value.options.get(r)]};function jt(t,e){const{defaultValue:n,value:i=se()}=e||{};let o=typeof t=="function"?t():t;i.value!==void 0&&(o=Yt(i)),n!==void 0&&(o=typeof n=="function"?n():n);const r=se(o),a=se(o);Ke(()=>{let l=i.value!==void 0?i.value:r.value;e.postState&&(l=e.postState(l)),a.value=l});function s(l){const c=a.value;r.value=l,dt(a.value)!==l&&e.onChange&&e.onChange(l,c)}return ye(i,()=>{r.value=i.value}),[a,s]}function Mt(t){const e=typeof t=="function"?t():t,n=se(e);function i(o){n.value=o}return[n,i]}const lG=["inputValue"];function OR(){return A(A({},Cm()),{prefixCls:String,id:String,backfill:{type:Boolean,default:void 0},fieldNames:Object,inputValue:String,searchValue:String,onSearch:Function,autoClearSearchValue:{type:Boolean,default:void 0},onSelect:Function,onDeselect:Function,filterOption:{type:[Boolean,Function],default:void 0},filterSort:Function,optionFilterProp:String,optionLabelProp:String,options:Array,defaultActiveFirstOption:{type:Boolean,default:void 0},virtual:{type:Boolean,default:void 0},listHeight:Number,listItemHeight:Number,menuItemSelectedIcon:Z.any,mode:String,labelInValue:{type:Boolean,default:void 0},value:Z.any,defaultValue:Z.any,onChange:Function,children:Array})}function cG(t){return!t||typeof t!="object"}const uG=oe({compatConfig:{MODE:3},name:"VcSelect",inheritAttrs:!1,props:ct(OR(),{prefixCls:"vc-select",autoClearSearchValue:!0,listHeight:200,listItemHeight:20,dropdownMatchSelectWidth:!0}),setup(t,e){let{expose:n,attrs:i,slots:o}=e;const r=$1(Ue(t,"id")),a=L(()=>SR(t.mode)),s=L(()=>!!(!t.options&&t.children)),l=L(()=>t.filterOption===void 0&&t.mode==="combobox"?!1:t.filterOption),c=L(()=>WD(t.fieldNames,s.value)),[u,d]=jt("",{value:L(()=>t.searchValue!==void 0?t.searchValue:t.inputValue),postState:Q=>Q||""}),f=iG(Ue(t,"options"),Ue(t,"children"),c),{valueOptions:h,labelOptions:p,options:g}=f,m=Q=>TR(Q).map(ee=>{var X,K;let te,ue,ae,re;cG(ee)?te=ee:(ae=ee.key,ue=ee.label,te=(X=ee.value)!==null&&X!==void 0?X:ae);const ne=h.value.get(te);return ne&&(ue===void 0&&(ue=ne==null?void 0:ne[t.optionLabelProp||c.value.label]),ae===void 0&&(ae=(K=ne==null?void 0:ne.key)!==null&&K!==void 0?K:te),re=ne==null?void 0:ne.disabled),{label:ue,value:te,key:ae,disabled:re,option:ne}}),[v,b]=jt(t.defaultValue,{value:Ue(t,"value")}),y=L(()=>{var Q;const G=m(v.value);return t.mode==="combobox"&&!(!((Q=G[0])===null||Q===void 0)&&Q.value)?[]:G}),[w,x]=sG(y,h),$=L(()=>{if(!t.mode&&w.value.length===1){const Q=w.value[0];if(Q.value===null&&(Q.label===null||Q.label===void 0))return[]}return w.value.map(Q=>{var G;return A(A({},Q),{label:(G=typeof Q.label=="function"?Q.label():Q.label)!==null&&G!==void 0?G:Q.value})})}),S=L(()=>new Set(w.value.map(Q=>Q.value)));Ke(()=>{var Q;if(t.mode==="combobox"){const G=(Q=w.value[0])===null||Q===void 0?void 0:Q.value;G!=null&&d(String(G))}},{flush:"post"});const _=(Q,G)=>{const ee=G??Q;return{[c.value.value]:Q,[c.value.label]:ee}},P=ie();Ke(()=>{if(t.mode!=="tags"){P.value=g.value;return}const Q=g.value.slice(),G=ee=>h.value.has(ee);[...w.value].sort((ee,X)=>ee.value{const X=ee.value;G(X)||Q.push(_(X,ee.label))}),P.value=Q});const O=aG(P,c,u,l,Ue(t,"optionFilterProp")),T=L(()=>t.mode!=="tags"||!u.value||O.value.some(Q=>Q[t.optionFilterProp||"value"]===u.value)?O.value:[_(u.value),...O.value]),M=L(()=>t.filterSort?[...T.value].sort((Q,G)=>t.filterSort(Q,G)):T.value),I=L(()=>kW(M.value,{fieldNames:c.value,childrenAsData:s.value})),k=Q=>{const G=m(Q);if(b(G),t.onChange&&(G.length!==w.value.length||G.some((ee,X)=>{var K;return((K=w.value[X])===null||K===void 0?void 0:K.value)!==(ee==null?void 0:ee.value)}))){const ee=t.labelInValue?G.map(K=>A(A({},K),{originLabel:K.label,label:typeof K.label=="function"?K.label():K.label})):G.map(K=>K.value),X=G.map(K=>my(x(K.value)));t.onChange(a.value?ee:ee[0],a.value?X:X[0])}},[E,R]=Mt(null),[D,F]=Mt(0),N=L(()=>t.defaultActiveFirstOption!==void 0?t.defaultActiveFirstOption:t.mode!=="combobox"),B=function(Q,G){let{source:ee="keyboard"}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};F(G),t.backfill&&t.mode==="combobox"&&Q!==null&&ee==="keyboard"&&R(String(Q))},z=(Q,G)=>{const ee=()=>{var X;const K=x(Q),te=K==null?void 0:K[c.value.label];return[t.labelInValue?{label:typeof te=="function"?te():te,originLabel:te,value:Q,key:(X=K==null?void 0:K.key)!==null&&X!==void 0?X:Q}:Q,my(K)]};if(G&&t.onSelect){const[X,K]=ee();t.onSelect(X,K)}else if(!G&&t.onDeselect){const[X,K]=ee();t.onDeselect(X,K)}},W=(Q,G)=>{let ee;const X=a.value?G.selected:!0;X?ee=a.value?[...w.value,Q]:[Q]:ee=w.value.filter(K=>K.value!==Q),k(ee),z(Q,X),t.mode==="combobox"?R(""):(!a.value||t.autoClearSearchValue)&&(d(""),R(""))},j=(Q,G)=>{k(Q),(G.type==="remove"||G.type==="clear")&&G.values.forEach(ee=>{z(ee.value,!1)})},U=(Q,G)=>{var ee;if(d(Q),R(null),G.source==="submit"){const X=(Q||"").trim();if(X){const K=Array.from(new Set([...S.value,X]));k(K),z(X,!0),d("")}return}G.source!=="blur"&&(t.mode==="combobox"&&k(Q),(ee=t.onSearch)===null||ee===void 0||ee.call(t,Q))},V=Q=>{let G=Q;t.mode!=="tags"&&(G=Q.map(X=>{const K=p.value.get(X);return K==null?void 0:K.value}).filter(X=>X!==void 0));const ee=Array.from(new Set([...S.value,...G]));k(ee),ee.forEach(X=>{z(X,!0)})},q=L(()=>t.virtual!==!1&&t.dropdownMatchSelectWidth!==!1);ZY(Rp(A(A({},f),{flattenOptions:I,onActiveValue:B,defaultActiveFirstOption:N,onSelect:W,menuItemSelectedIcon:Ue(t,"menuItemSelectedIcon"),rawValues:S,fieldNames:c,virtual:q,listHeight:Ue(t,"listHeight"),listItemHeight:Ue(t,"listItemHeight"),childrenAsData:s})));const Y=se();n({focus(){var Q;(Q=Y.value)===null||Q===void 0||Q.focus()},blur(){var Q;(Q=Y.value)===null||Q===void 0||Q.blur()},scrollTo(Q){var G;(G=Y.value)===null||G===void 0||G.scrollTo(Q)}});const J=L(()=>ht(t,["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"]));return()=>C(S1,H(H(H({},J.value),i),{},{id:r,prefixCls:t.prefixCls,ref:Y,omitDomProps:lG,mode:t.mode,displayValues:$.value,onDisplayValuesChange:j,searchValue:u.value,onSearch:U,onSearchSplit:V,dropdownMatchSelectWidth:t.dropdownMatchSelectWidth,OptionList:eG,emptyOptions:!I.value.length,activeValue:E.value,activeDescendantId:`${r}_list_${D.value}`}),o)}}),A1=()=>null;A1.isSelectOption=!0;A1.displayName="ASelectOption";const _1=()=>null;_1.isSelectOptGroup=!0;_1.displayName="ASelectOptGroup";var dG={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},fG=Symbol("iconContext"),ER=function(){return qe(fG,{prefixCls:se("anticon"),rootClassName:se(""),csp:se()})};function P1(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function hG(t,e){return t&&t.contains?t.contains(e):!1}var H_="data-vc-order",pG="vc-icon-key",_y=new Map;function MR(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.mark;return e?e.startsWith("data-")?e:"data-".concat(e):pG}function T1(t){if(t.attachTo)return t.attachTo;var e=document.querySelector("head");return e||document.body}function gG(t){return t==="queue"?"prependQueue":t?"prepend":"append"}function IR(t){return Array.from((_y.get(t)||t).children).filter(function(e){return e.tagName==="STYLE"})}function kR(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!P1())return null;var n=e.csp,i=e.prepend,o=document.createElement("style");o.setAttribute(H_,gG(i)),n&&n.nonce&&(o.nonce=n.nonce),o.innerHTML=t;var r=T1(e),a=r.firstChild;if(i){if(i==="queue"){var s=IR(r).filter(function(l){return["prepend","prependQueue"].includes(l.getAttribute(H_))});if(s.length)return r.insertBefore(o,s[s.length-1].nextSibling),o}r.insertBefore(o,a)}else r.appendChild(o);return o}function mG(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=T1(e);return IR(n).find(function(i){return i.getAttribute(MR(e))===t})}function vG(t,e){var n=_y.get(t);if(!n||!hG(document,n)){var i=kR("",e),o=i.parentNode;_y.set(t,o),t.removeChild(i)}}function bG(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=T1(n);vG(i,n);var o=mG(e,n);if(o)return n.csp&&n.csp.nonce&&o.nonce!==n.csp.nonce&&(o.nonce=n.csp.nonce),o.innerHTML!==t&&(o.innerHTML=t),o;var r=kR(t,n);return r.setAttribute(MR(n),e),r}function W_(t){for(var e=1;e{var K,te;let ue=!0,ae=G;(K=t.onActiveValueChange)===null||K===void 0||K.call(t,null);const re=X?null:DW(G,t.tokenSeparators);return t.mode!=="combobox"&&re&&(ae="",(te=t.onSearchSplit)===null||te===void 0||te.call(t,re),T(!1),ue=!1),t.onSearch&&w.value!==ae&&t.onSearch(ae,{source:ee?"typing":"effect"}),ue},k=G=>{var ee;!G||!G.trim()||(ee=t.onSearch)===null||ee===void 0||ee.call(t,G,{source:"submit"})};ye(S,()=>{!S.value&&!r.value&&t.mode!=="combobox"&&I("",!1,!1)},{immediate:!0,flush:"post"}),ye(()=>t.disabled,()=>{$.value&&t.disabled&&_(!1),t.disabled&&!p.value&&m(!1)},{immediate:!0});const[E,R]=xR(),D=function(G){var ee;const X=E(),{which:K}=G;if(K===Te.ENTER&&(t.mode!=="combobox"&&G.preventDefault(),S.value||T(!0)),R(!!w.value),K===Te.BACKSPACE&&!X&&r.value&&!w.value&&t.displayValues.length){const re=[...t.displayValues];let ne=null;for(let le=re.length-1;le>=0;le-=1){const he=re[le];if(!he.disabled){re.splice(le,1),ne=he;break}}ne&&t.onDisplayValuesChange(re,{type:"remove",values:[ne]})}for(var te=arguments.length,ue=new Array(te>1?te-1:0),ae=1;ae1?ee-1:0),K=1;K{const ee=t.displayValues.filter(X=>X!==G);t.onDisplayValuesChange(ee,{type:"remove",values:[G]})},B=ie(!1),z=function(){m(!0),t.disabled||(t.onFocus&&!B.value&&t.onFocus(...arguments),t.showAction&&t.showAction.includes("focus")&&T(!0)),B.value=!0},W=se(!1),j=function(){if(W.value||(p.value=!0,m(!1,()=>{B.value=!1,p.value=!1,T(!1)}),t.disabled))return;const G=w.value;G&&(t.mode==="tags"?t.onSearch(G,{source:"submit"}):t.mode==="multiple"&&t.onSearch("",{source:"blur"})),t.onBlur&&t.onBlur(...arguments)},U=()=>{W.value=!0},V=()=>{W.value=!1};ot("VCSelectContainerEvent",{focus:z,blur:j});const q=[];Ze(()=>{q.forEach(G=>clearTimeout(G)),q.splice(0,q.length)}),at(()=>{q.forEach(G=>clearTimeout(G)),q.splice(0,q.length)});const Y=function(G){var ee,X;const{target:K}=G,te=(ee=d.value)===null||ee===void 0?void 0:ee.getPopupElement();if(te&&te.contains(K)){const ne=setTimeout(()=>{var le;const he=q.indexOf(ne);he!==-1&&q.splice(he,1),v(),!s.value&&!te.contains(document.activeElement)&&((le=f.value)===null||le===void 0||le.focus())});q.push(ne)}for(var ue=arguments.length,ae=new Array(ue>1?ue-1:0),re=1;re{};return Ze(()=>{ye(O,()=>{var G;if(O.value){const ee=Math.ceil((G=c.value)===null||G===void 0?void 0:G.offsetWidth);J.value!==ee&&!Number.isNaN(ee)&&(J.value=ee)}},{immediate:!0,flush:"post"})}),MY([c,d],O,T),kY(Lp(A(A({},uo(t)),{open:S,triggerOpen:O,showSearch:a,multiple:r,toggleOpen:T}))),()=>{const G=A(A({},t),n),{prefixCls:ee,id:X,open:K,defaultOpen:te,mode:ue,showSearch:ae,searchValue:re,onSearch:ne,allowClear:le,clearIcon:he,showArrow:pe,inputIcon:ge,disabled:be,loading:$e,getInputElement:fe,getPopupContainer:de,placement:xe,animation:_e,transitionName:Oe,dropdownStyle:Re,dropdownClassName:Se,dropdownMatchSelectWidth:Ae,dropdownRender:Pe,dropdownAlign:ke,showAction:Le,direction:De,tokenSeparators:je,tagRender:ft,optionLabelRender:_t,onPopupScroll:yt,onDropdownVisibleChange:Pt,onFocus:Et,onBlur:fn,onKeyup:yn,onKeydown:$n,onMousedown:on,onClear:Yn,omitDomProps:wi,getRawInputElement:Zi,displayValues:So,onDisplayValuesChange:Si,emptyOptions:za,activeDescendantId:Ie,activeValue:st,OptionList:tt}=G,Lt=DY(G,["prefixCls","id","open","defaultOpen","mode","showSearch","searchValue","onSearch","allowClear","clearIcon","showArrow","inputIcon","disabled","loading","getInputElement","getPopupContainer","placement","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","showAction","direction","tokenSeparators","tagRender","optionLabelRender","onPopupScroll","onDropdownVisibleChange","onFocus","onBlur","onKeyup","onKeydown","onMousedown","onClear","omitDomProps","getRawInputElement","displayValues","onDisplayValuesChange","emptyOptions","activeDescendantId","activeValue","OptionList"]),xn=ue==="combobox"&&fe&&fe()||null,rn=typeof Zi=="function"&&Zi(),Ci=A({},Lt);let Ln;rn&&(Ln=$o=>{T($o)}),RY.forEach($o=>{delete Ci[$o]}),wi==null||wi.forEach($o=>{delete Ci[$o]});const jo=pe!==void 0?pe:$e||!r.value&&ue!=="combobox";let Ii;jo&&(Ii=C(Rs,{class:ce(`${ee}-arrow`,{[`${ee}-arrow-loading`]:$e}),customizeIcon:ge,customizeIconProps:{loading:$e,searchValue:w.value,open:S.value,focused:g.value,showSearch:a.value}},null));let Ji;const Ut=()=>{Yn==null||Yn(),Si([],{type:"clear",values:So}),I("",!1,!1)};!be&&le&&(So.length||w.value)&&(Ji=C(Rs,{class:`${ee}-clear`,onMousedown:Ut,customizeIcon:he},{default:()=>[Qn("×")]}));const Co=C(tt,{ref:h},A(A({},l.customSlots),{option:o.option})),Qi=ce(ee,n.class,{[`${ee}-focused`]:g.value,[`${ee}-multiple`]:r.value,[`${ee}-single`]:!r.value,[`${ee}-allow-clear`]:le,[`${ee}-show-arrow`]:jo,[`${ee}-disabled`]:be,[`${ee}-loading`]:$e,[`${ee}-open`]:S.value,[`${ee}-customize-input`]:xn,[`${ee}-show-search`]:a.value}),Ur=C(sY,{ref:d,disabled:be,prefixCls:ee,visible:O.value,popupElement:Co,containerWidth:J.value,animation:_e,transitionName:Oe,dropdownStyle:Re,dropdownClassName:Se,direction:De,dropdownMatchSelectWidth:Ae,dropdownRender:Pe,dropdownAlign:ke,placement:xe,getPopupContainer:de,empty:za,getTriggerDOMNode:()=>u.current,onPopupVisibleChange:Ln,onPopupMouseEnter:Q,onPopupFocusin:U,onPopupFocusout:V},{default:()=>rn?cn(rn)&&At(rn,{ref:u},!1,!0):C(EY,H(H({},t),{},{domRef:u,prefixCls:ee,inputElement:xn,ref:f,id:X,showSearch:a.value,mode:ue,activeDescendantId:Ie,tagRender:ft,optionLabelRender:_t,values:So,open:S.value,onToggleOpen:T,activeValue:st,searchValue:w.value,onSearch:I,onSearchSubmit:k,onRemove:N,tokenWithEnter:M.value}),null)});let qr;return rn?qr=Ur:qr=C("div",H(H({},Ci),{},{class:Qi,ref:c,onMousedown:Y,onKeydown:D,onKeyup:F}),[g.value&&!S.value&&C("span",{style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0},"aria-live":"polite"},[`${So.map($o=>{let{label:ll,value:Ao}=$o;return["number","string"].includes(typeof ll)?ll:Ao}).join(", ")}`]),Ur,Ii,Ji]),qr}}}),Am=(t,e)=>{let{height:n,offset:i,prefixCls:o,onInnerResize:r}=t,{slots:a}=e;var s;let l={},c={display:"flex",flexDirection:"column"};return i!==void 0&&(l={height:`${n}px`,position:"relative",overflow:"hidden"},c=A(A({},c),{transform:`translateY(${i}px)`,position:"absolute",left:0,right:0,top:0})),C("div",{style:l},[C(mo,{onResize:u=>{let{offsetHeight:d}=u;d&&r&&r()}},{default:()=>[C("div",{style:c,class:ce({[`${o}-holder-inner`]:o})},[(s=a.default)===null||s===void 0?void 0:s.call(a)])]})])};Am.displayName="Filter";Am.inheritAttrs=!1;Am.props={prefixCls:String,height:Number,offset:Number,onInnerResize:Function};const CR=(t,e)=>{let{setRef:n}=t,{slots:i}=e;var o;const r=Dt((o=i.default)===null||o===void 0?void 0:o.call(i));return r&&r.length?On(r[0],{ref:n}):r};CR.props={setRef:{type:Function,default:()=>{}}};const NY=20;function N_(t){return"touches"in t?t.touches[0].pageY:t.pageY}const BY=oe({compatConfig:{MODE:3},name:"ScrollBar",inheritAttrs:!1,props:{prefixCls:String,scrollTop:Number,scrollHeight:Number,height:Number,count:Number,onScroll:{type:Function},onStartMove:{type:Function},onStopMove:{type:Function}},setup(){return{moveRaf:null,scrollbarRef:bd(),thumbRef:bd(),visibleTimeout:null,state:$t({dragging:!1,pageY:null,startTop:null,visible:!1})}},watch:{scrollTop:{handler(){this.delayHidden()},flush:"post"}},mounted(){var t,e;(t=this.scrollbarRef.current)===null||t===void 0||t.addEventListener("touchstart",this.onScrollbarTouchStart,pn?{passive:!1}:!1),(e=this.thumbRef.current)===null||e===void 0||e.addEventListener("touchstart",this.onMouseDown,pn?{passive:!1}:!1)},beforeUnmount(){this.removeEvents(),clearTimeout(this.visibleTimeout)},methods:{delayHidden(){clearTimeout(this.visibleTimeout),this.state.visible=!0,this.visibleTimeout=setTimeout(()=>{this.state.visible=!1},2e3)},onScrollbarTouchStart(t){t.preventDefault()},onContainerMouseDown(t){t.stopPropagation(),t.preventDefault()},patchEvents(){window.addEventListener("mousemove",this.onMouseMove),window.addEventListener("mouseup",this.onMouseUp),this.thumbRef.current.addEventListener("touchmove",this.onMouseMove,pn?{passive:!1}:!1),this.thumbRef.current.addEventListener("touchend",this.onMouseUp)},removeEvents(){window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("mouseup",this.onMouseUp),this.scrollbarRef.current.removeEventListener("touchstart",this.onScrollbarTouchStart,pn?{passive:!1}:!1),this.thumbRef.current&&(this.thumbRef.current.removeEventListener("touchstart",this.onMouseDown,pn?{passive:!1}:!1),this.thumbRef.current.removeEventListener("touchmove",this.onMouseMove,pn?{passive:!1}:!1),this.thumbRef.current.removeEventListener("touchend",this.onMouseUp)),lt.cancel(this.moveRaf)},onMouseDown(t){const{onStartMove:e}=this.$props;A(this.state,{dragging:!0,pageY:N_(t),startTop:this.getTop()}),e(),this.patchEvents(),t.stopPropagation(),t.preventDefault()},onMouseMove(t){const{dragging:e,pageY:n,startTop:i}=this.state,{onScroll:o}=this.$props;if(lt.cancel(this.moveRaf),e){const r=N_(t)-n,a=i+r,s=this.getEnableScrollRange(),l=this.getEnableHeightRange(),c=l?a/l:0,u=Math.ceil(c*s);this.moveRaf=lt(()=>{o(u)})}},onMouseUp(){const{onStopMove:t}=this.$props;this.state.dragging=!1,t(),this.removeEvents()},getSpinHeight(){const{height:t,scrollHeight:e}=this.$props;let n=t/e*100;return n=Math.max(n,NY),n=Math.min(n,t/2),Math.floor(n)},getEnableScrollRange(){const{scrollHeight:t,height:e}=this.$props;return t-e||0},getEnableHeightRange(){const{height:t}=this.$props,e=this.getSpinHeight();return t-e||0},getTop(){const{scrollTop:t}=this.$props,e=this.getEnableScrollRange(),n=this.getEnableHeightRange();return t===0||e===0?0:t/e*n},showScroll(){const{height:t,scrollHeight:e}=this.$props;return e>t}},render(){const{dragging:t,visible:e}=this.state,{prefixCls:n}=this.$props,i=this.getSpinHeight()+"px",o=this.getTop()+"px",r=this.showScroll(),a=r&&e;return C("div",{ref:this.scrollbarRef,class:ce(`${n}-scrollbar`,{[`${n}-scrollbar-show`]:r}),style:{width:"8px",top:0,bottom:0,right:0,position:"absolute",display:a?void 0:"none"},onMousedown:this.onContainerMouseDown,onMousemove:this.delayHidden},[C("div",{ref:this.thumbRef,class:ce(`${n}-scrollbar-thumb`,{[`${n}-scrollbar-thumb-moving`]:t}),style:{width:"100%",height:i,top:o,left:0,position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:"99px",cursor:"pointer",userSelect:"none"},onMousedown:this.onMouseDown},null)])}});function zY(t,e,n,i){const o=new Map,r=new Map,a=se(Symbol("update"));ye(t,()=>{a.value=Symbol("update")});let s;function l(){lt.cancel(s)}function c(){l(),s=lt(()=>{o.forEach((d,f)=>{if(d&&d.offsetParent){const{offsetHeight:h}=d;r.get(f)!==h&&(a.value=Symbol("update"),r.set(f,d.offsetHeight))}})})}function u(d,f){const h=e(d);o.get(h),f?(o.set(h,f.$el||f),c()):o.delete(h)}return Xn(()=>{l()}),[u,c,r,a]}function HY(t,e,n,i,o,r,a,s){let l;return c=>{if(c==null){s();return}lt.cancel(l);const u=e.value,d=i.itemHeight;if(typeof c=="number")a(c);else if(c&&typeof c=="object"){let f;const{align:h}=c;"index"in c?{index:f}=c:f=u.findIndex(m=>o(m)===c.key);const{offset:p=0}=c,g=(m,v)=>{if(m<0||!t.value)return;const b=t.value.clientHeight;let y=!1,w=v;if(b){const x=v||h;let $=0,S=0,_=0;const P=Math.min(u.length,f);for(let M=0;M<=P;M+=1){const I=o(u[M]);S=$;const k=n.get(I);_=S+(k===void 0?d:k),$=_,M===f&&k===void 0&&(y=!0)}const O=t.value.scrollTop;let T=null;switch(x){case"top":T=S-p;break;case"bottom":T=_-b+p;break;default:{const M=O+b;SM&&(w="bottom")}}T!==null&&T!==O&&a(T)}l=lt(()=>{y&&r(),g(m-1,w)},2)};g(5)}}}const WY=typeof navigator=="object"&&/Firefox/i.test(navigator.userAgent),$R=(t,e)=>{let n=!1,i=null;function o(){clearTimeout(i),n=!0,i=setTimeout(()=>{n=!1},50)}return function(r){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const s=r<0&&t.value||r>0&&e.value;return a&&s?(clearTimeout(i),n=!1):(!s||n)&&o(),!n&&s}};function jY(t,e,n,i){let o=0,r=null,a=null,s=!1;const l=$R(e,n);function c(d){if(!t.value)return;lt.cancel(r);const{deltaY:f}=d;o+=f,a=f,!l(f)&&(WY||d.preventDefault(),r=lt(()=>{i(o*(s?10:1)),o=0}))}function u(d){t.value&&(s=d.detail===a)}return[c,u]}const VY=14/15;function XY(t,e,n){let i=!1,o=0,r=null,a=null;const s=()=>{r&&(r.removeEventListener("touchmove",l),r.removeEventListener("touchend",c))},l=f=>{if(i){const h=Math.ceil(f.touches[0].pageY);let p=o-h;o=h,n(p)&&f.preventDefault(),clearInterval(a),a=setInterval(()=>{p*=VY,(!n(p,!0)||Math.abs(p)<=.1)&&clearInterval(a)},16)}},c=()=>{i=!1,s()},u=f=>{s(),f.touches.length===1&&!i&&(i=!0,o=Math.ceil(f.touches[0].pageY),r=f.target,r.addEventListener("touchmove",l,{passive:!1}),r.addEventListener("touchend",c))},d=()=>{};Ze(()=>{document.addEventListener("touchmove",d,{passive:!1}),ye(t,f=>{e.value.removeEventListener("touchstart",u),s(),clearInterval(a),f&&e.value.addEventListener("touchstart",u,{passive:!1})},{immediate:!0})}),at(()=>{document.removeEventListener("touchmove",d)})}var YY=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{const c=e+l,u=o(s,c,{}),d=a(s);return C(CR,{key:d,setRef:f=>i(s,f)},{default:()=>[u]})})}const AR=oe({compatConfig:{MODE:3},name:"List",inheritAttrs:!1,props:{prefixCls:String,data:Z.array,height:Number,itemHeight:Number,fullHeight:{type:Boolean,default:void 0},itemKey:{type:[String,Number,Function],required:!0},component:{type:[String,Object]},virtual:{type:Boolean,default:void 0},children:Function,onScroll:Function,onMousedown:Function,onMouseenter:Function,onVisibleChange:Function},setup(t,e){let{expose:n}=e;const i=L(()=>{const{height:N,itemHeight:B,virtual:z}=t;return!!(z!==!1&&N&&B)}),o=L(()=>{const{height:N,itemHeight:B,data:z}=t;return i.value&&z&&B*z.length>N}),r=$t({scrollTop:0,scrollMoving:!1}),a=L(()=>t.data||GY),s=ie([]);ye(a,()=>{s.value=dt(a.value).slice()},{immediate:!0});const l=ie(N=>{});ye(()=>t.itemKey,N=>{typeof N=="function"?l.value=N:l.value=B=>B==null?void 0:B[N]},{immediate:!0});const c=ie(),u=ie(),d=ie(),f=N=>l.value(N),h={getKey:f};function p(N){let B;typeof N=="function"?B=N(r.scrollTop):B=N;const z=$(B);c.value&&(c.value.scrollTop=z),r.scrollTop=z}const[g,m,v,b]=zY(s,f),y=$t({scrollHeight:void 0,start:0,end:0,offset:void 0}),w=ie(0);Ze(()=>{pt(()=>{var N;w.value=((N=u.value)===null||N===void 0?void 0:N.offsetHeight)||0})}),ri(()=>{pt(()=>{var N;w.value=((N=u.value)===null||N===void 0?void 0:N.offsetHeight)||0})}),ye([i,s],()=>{i.value||A(y,{scrollHeight:void 0,start:0,end:s.value.length-1,offset:void 0})},{immediate:!0}),ye([i,s,w,o],()=>{i.value&&!o.value&&A(y,{scrollHeight:w.value,start:0,end:s.value.length-1,offset:void 0}),c.value&&(r.scrollTop=c.value.scrollTop)},{immediate:!0}),ye([o,i,()=>r.scrollTop,s,b,()=>t.height,w],()=>{if(!i.value||!o.value)return;let N=0,B,z,W;const j=s.value.length,U=s.value,V=r.scrollTop,{itemHeight:q,height:Y}=t,J=V+Y;for(let Q=0;Q=V&&(B=Q,z=N),W===void 0&&K>J&&(W=Q),N=K}B===void 0&&(B=0,z=0,W=Math.ceil(Y/q)),W===void 0&&(W=j-1),W=Math.min(W+1,j),A(y,{scrollHeight:N,start:B,end:W,offset:z})},{immediate:!0});const x=L(()=>y.scrollHeight-t.height);function $(N){let B=N;return Number.isNaN(x.value)||(B=Math.min(B,x.value)),B=Math.max(B,0),B}const S=L(()=>r.scrollTop<=0),_=L(()=>r.scrollTop>=x.value),P=$R(S,_);function O(N){p(N)}function T(N){var B;const{scrollTop:z}=N.currentTarget;z!==r.scrollTop&&p(z),(B=t.onScroll)===null||B===void 0||B.call(t,N)}const[M,I]=jY(i,S,_,N=>{p(B=>B+N)});XY(i,c,(N,B)=>P(N,B)?!1:(M({preventDefault(){},deltaY:N}),!0));function k(N){i.value&&N.preventDefault()}const E=()=>{c.value&&(c.value.removeEventListener("wheel",M,pn?{passive:!1}:!1),c.value.removeEventListener("DOMMouseScroll",I),c.value.removeEventListener("MozMousePixelScroll",k))};Ke(()=>{pt(()=>{c.value&&(E(),c.value.addEventListener("wheel",M,pn?{passive:!1}:!1),c.value.addEventListener("DOMMouseScroll",I),c.value.addEventListener("MozMousePixelScroll",k))})}),at(()=>{E()});const R=HY(c,s,v,t,f,m,p,()=>{var N;(N=d.value)===null||N===void 0||N.delayHidden()});n({scrollTo:R});const D=L(()=>{let N=null;return t.height&&(N=A({[t.fullHeight?"height":"maxHeight"]:t.height+"px"},KY),i.value&&(N.overflowY="hidden",r.scrollMoving&&(N.pointerEvents="none"))),N});return ye([()=>y.start,()=>y.end,s],()=>{if(t.onVisibleChange){const N=s.value.slice(y.start,y.end+1);t.onVisibleChange(N,s.value)}},{flush:"post"}),{state:r,mergedData:s,componentStyle:D,onFallbackScroll:T,onScrollBar:O,componentRef:c,useVirtual:i,calRes:y,collectHeight:m,setInstance:g,sharedConfig:h,scrollBarRef:d,fillerInnerRef:u,delayHideScrollBar:()=>{var N;(N=d.value)===null||N===void 0||N.delayHidden()}}},render(){const t=A(A({},this.$props),this.$attrs),{prefixCls:e="rc-virtual-list",height:n,itemHeight:i,fullHeight:o,data:r,itemKey:a,virtual:s,component:l="div",onScroll:c,children:u=this.$slots.default,style:d,class:f}=t,h=YY(t,["prefixCls","height","itemHeight","fullHeight","data","itemKey","virtual","component","onScroll","children","style","class"]),p=ce(e,f),{scrollTop:g}=this.state,{scrollHeight:m,offset:v,start:b,end:y}=this.calRes,{componentStyle:w,onFallbackScroll:x,onScrollBar:$,useVirtual:S,collectHeight:_,sharedConfig:P,setInstance:O,mergedData:T,delayHideScrollBar:M}=this;return C("div",H({style:A(A({},d),{position:"relative"}),class:p},h),[C(l,{class:`${e}-holder`,style:w,ref:"componentRef",onScroll:x,onMouseenter:M},{default:()=>[C(Am,{prefixCls:e,height:m,offset:v,onInnerResize:_,ref:"fillerInnerRef"},{default:()=>UY(T,b,y,O,u,P)})]}),S&&C(BY,{ref:"scrollBarRef",prefixCls:e,scrollTop:g,height:n,scrollHeight:m,count:T.length,onScroll:$,onStartMove:()=>{this.state.scrollMoving=!0},onStopMove:()=>{this.state.scrollMoving=!1}},null)])}});function C1(t,e,n){const i=se(t());return ye(e,(o,r)=>{n?n(o,r)&&(i.value=t()):i.value=t()}),i}function qY(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}const _R=Symbol("SelectContextKey");function ZY(t){return ot(_R,t)}function JY(){return qe(_R,{})}var QY=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o`${o.prefixCls}-item`),s=C1(()=>r.flattenOptions,[()=>o.open,()=>r.flattenOptions],x=>x[0]),l=bd(),c=x=>{x.preventDefault()},u=x=>{l.current&&l.current.scrollTo(typeof x=="number"?{index:x}:x)},d=function(x){let $=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;const S=s.value.length;for(let _=0;_1&&arguments[1]!==void 0?arguments[1]:!1;f.activeIndex=x;const S={source:$?"keyboard":"mouse"},_=s.value[x];if(!_){r.onActiveValue(null,-1,S);return}r.onActiveValue(_.value,x,S)};ye([()=>s.value.length,()=>o.searchValue],()=>{h(r.defaultActiveFirstOption!==!1?d(0):-1)},{immediate:!0});const p=x=>r.rawValues.has(x)&&o.mode!=="combobox";ye([()=>o.open,()=>o.searchValue],()=>{if(!o.multiple&&o.open&&r.rawValues.size===1){const x=Array.from(r.rawValues)[0],$=dt(s.value).findIndex(S=>{let{data:_}=S;return _[r.fieldNames.value]===x});$!==-1&&(h($),pt(()=>{u($)}))}o.open&&pt(()=>{var x;(x=l.current)===null||x===void 0||x.scrollTo(void 0)})},{immediate:!0,flush:"post"});const g=x=>{x!==void 0&&r.onSelect(x,{selected:!r.rawValues.has(x)}),o.multiple||o.toggleOpen(!1)},m=x=>typeof x.label=="function"?x.label():x.label;function v(x){const $=s.value[x];if(!$)return null;const S=$.data||{},{value:_}=S,{group:P}=$,O=ka(S,!0),T=m($);return $?C("div",H(H({"aria-label":typeof T=="string"&&!P?T:null},O),{},{key:x,role:P?"presentation":"option",id:`${o.id}_list_${x}`,"aria-selected":p(_)}),[_]):null}return n({onKeydown:x=>{const{which:$,ctrlKey:S}=x;switch($){case Te.N:case Te.P:case Te.UP:case Te.DOWN:{let _=0;if($===Te.UP?_=-1:$===Te.DOWN?_=1:qY()&&S&&($===Te.N?_=1:$===Te.P&&(_=-1)),_!==0){const P=d(f.activeIndex+_,_);u(P),h(P,!0)}break}case Te.ENTER:{const _=s.value[f.activeIndex];_&&!_.data.disabled?g(_.value):g(void 0),o.open&&x.preventDefault();break}case Te.ESC:o.toggleOpen(!1),o.open&&x.stopPropagation()}},onKeyup:()=>{},scrollTo:x=>{u(x)}}),()=>{const{id:x,notFoundContent:$,onPopupScroll:S}=o,{menuItemSelectedIcon:_,fieldNames:P,virtual:O,listHeight:T,listItemHeight:M}=r,I=i.option,{activeIndex:k}=f,E=Object.keys(P).map(R=>P[R]);return s.value.length===0?C("div",{role:"listbox",id:`${x}_list`,class:`${a.value}-empty`,onMousedown:c},[$]):C(Qe,null,[C("div",{role:"listbox",id:`${x}_list`,style:{height:0,width:0,overflow:"hidden"}},[v(k-1),v(k),v(k+1)]),C(AR,{itemKey:"key",ref:l,data:s.value,height:T,itemHeight:M,fullHeight:!1,onMousedown:c,onScroll:S,virtual:O},{default:(R,D)=>{var F;const{group:N,groupOption:B,data:z,value:W}=R,{key:j}=z,U=typeof R.label=="function"?R.label():R.label;if(N){const he=(F=z.title)!==null&&F!==void 0?F:B_(U)&&U;return C("div",{class:ce(a.value,`${a.value}-group`),title:he},[I?I(z):U!==void 0?U:j])}const{disabled:V,title:q,children:Y,style:J,class:Q,className:G}=z,ee=QY(z,["disabled","title","children","style","class","className"]),X=ht(ee,E),K=p(W),te=`${a.value}-option`,ue=ce(a.value,te,Q,G,{[`${te}-grouped`]:B,[`${te}-active`]:k===D&&!V,[`${te}-disabled`]:V,[`${te}-selected`]:K}),ae=m(R),re=!_||typeof _=="function"||K,ne=typeof ae=="number"?ae:ae||W;let le=B_(ne)?ne.toString():void 0;return q!==void 0&&(le=q),C("div",H(H({},X),{},{"aria-selected":K,class:ue,title:le,onMousemove:he=>{ee.onMousemove&&ee.onMousemove(he),!(k===D||V)&&h(D)},onClick:he=>{V||g(W),ee.onClick&&ee.onClick(he)},style:J}),[C("div",{class:`${te}-content`},[I?I(z):ne]),cn(_)||K,re&&C(Rs,{class:`${a.value}-option-state`,customizeIcon:_,customizeIconProps:{isSelected:K}},{default:()=>[K?"✓":null]})])}})])}}});var tG=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o1&&arguments[1]!==void 0?arguments[1]:!1;return Dt(t).map((i,o)=>{var r;if(!cn(i)||!i.type)return null;const{type:{isSelectOptGroup:a},key:s,children:l,props:c}=i;if(e||!a)return nG(i);const u=l&&l.default?l.default():void 0,d=(c==null?void 0:c.label)||((r=l.label)===null||r===void 0?void 0:r.call(l))||s;return A(A({key:`__RC_SELECT_GRP__${s===null?o:String(s)}__`},c),{label:d,options:PR(u||[])})}).filter(i=>i)}function iG(t,e,n){const i=ie(),o=ie(),r=ie(),a=ie([]);return ye([t,e],()=>{t.value?a.value=dt(t.value).slice():a.value=PR(e.value)},{immediate:!0,deep:!0}),Ke(()=>{const s=a.value,l=new Map,c=new Map,u=n.value;function d(f){let h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;for(let p=0;p0&&arguments[0]!==void 0?arguments[0]:se("");const e=`rc_select_${rG()}`;return t.value||e}function TR(t){return Array.isArray(t)?t:t!==void 0?[t]:[]}function pb(t,e){return TR(t).join("").toUpperCase().includes(e)}const aG=(t,e,n,i,o)=>L(()=>{const r=n.value,a=o==null?void 0:o.value,s=i==null?void 0:i.value;if(!r||s===!1)return t.value;const{options:l,label:c,value:u}=e.value,d=[],f=typeof s=="function",h=r.toUpperCase(),p=f?s:(m,v)=>a?pb(v[a],h):v[l]?pb(v[c!=="children"?c:"label"],h):pb(v[u],h),g=f?m=>my(m):m=>m;return t.value.forEach(m=>{if(m[l]){if(p(r,g(m)))d.push(m);else{const b=m[l].filter(y=>p(r,g(y)));b.length&&d.push(A(A({},m),{[l]:b}))}return}p(r,g(m))&&d.push(m)}),d}),sG=(t,e)=>{const n=ie({values:new Map,options:new Map});return[L(()=>{const{values:r,options:a}=n.value,s=t.value.map(u=>{var d;return u.label===void 0?A(A({},u),{label:(d=r.get(u.value))===null||d===void 0?void 0:d.label}):u}),l=new Map,c=new Map;return s.forEach(u=>{l.set(u.value,u),c.set(u.value,e.value.get(u.value)||a.get(u.value))}),n.value.values=l,n.value.options=c,s}),r=>e.value.get(r)||n.value.options.get(r)]};function jt(t,e){const{defaultValue:n,value:i=se()}=e||{};let o=typeof t=="function"?t():t;i.value!==void 0&&(o=Yt(i)),n!==void 0&&(o=typeof n=="function"?n():n);const r=se(o),a=se(o);Ke(()=>{let l=i.value!==void 0?i.value:r.value;e.postState&&(l=e.postState(l)),a.value=l});function s(l){const c=a.value;r.value=l,dt(a.value)!==l&&e.onChange&&e.onChange(l,c)}return ye(i,()=>{r.value=i.value}),[a,s]}function Mt(t){const e=typeof t=="function"?t():t,n=se(e);function i(o){n.value=o}return[n,i]}const lG=["inputValue"];function OR(){return A(A({},$m()),{prefixCls:String,id:String,backfill:{type:Boolean,default:void 0},fieldNames:Object,inputValue:String,searchValue:String,onSearch:Function,autoClearSearchValue:{type:Boolean,default:void 0},onSelect:Function,onDeselect:Function,filterOption:{type:[Boolean,Function],default:void 0},filterSort:Function,optionFilterProp:String,optionLabelProp:String,options:Array,defaultActiveFirstOption:{type:Boolean,default:void 0},virtual:{type:Boolean,default:void 0},listHeight:Number,listItemHeight:Number,menuItemSelectedIcon:Z.any,mode:String,labelInValue:{type:Boolean,default:void 0},value:Z.any,defaultValue:Z.any,onChange:Function,children:Array})}function cG(t){return!t||typeof t!="object"}const uG=oe({compatConfig:{MODE:3},name:"VcSelect",inheritAttrs:!1,props:ct(OR(),{prefixCls:"vc-select",autoClearSearchValue:!0,listHeight:200,listItemHeight:20,dropdownMatchSelectWidth:!0}),setup(t,e){let{expose:n,attrs:i,slots:o}=e;const r=$1(Ue(t,"id")),a=L(()=>SR(t.mode)),s=L(()=>!!(!t.options&&t.children)),l=L(()=>t.filterOption===void 0&&t.mode==="combobox"?!1:t.filterOption),c=L(()=>WD(t.fieldNames,s.value)),[u,d]=jt("",{value:L(()=>t.searchValue!==void 0?t.searchValue:t.inputValue),postState:Q=>Q||""}),f=iG(Ue(t,"options"),Ue(t,"children"),c),{valueOptions:h,labelOptions:p,options:g}=f,m=Q=>TR(Q).map(ee=>{var X,K;let te,ue,ae,re;cG(ee)?te=ee:(ae=ee.key,ue=ee.label,te=(X=ee.value)!==null&&X!==void 0?X:ae);const ne=h.value.get(te);return ne&&(ue===void 0&&(ue=ne==null?void 0:ne[t.optionLabelProp||c.value.label]),ae===void 0&&(ae=(K=ne==null?void 0:ne.key)!==null&&K!==void 0?K:te),re=ne==null?void 0:ne.disabled),{label:ue,value:te,key:ae,disabled:re,option:ne}}),[v,b]=jt(t.defaultValue,{value:Ue(t,"value")}),y=L(()=>{var Q;const G=m(v.value);return t.mode==="combobox"&&!(!((Q=G[0])===null||Q===void 0)&&Q.value)?[]:G}),[w,x]=sG(y,h),$=L(()=>{if(!t.mode&&w.value.length===1){const Q=w.value[0];if(Q.value===null&&(Q.label===null||Q.label===void 0))return[]}return w.value.map(Q=>{var G;return A(A({},Q),{label:(G=typeof Q.label=="function"?Q.label():Q.label)!==null&&G!==void 0?G:Q.value})})}),S=L(()=>new Set(w.value.map(Q=>Q.value)));Ke(()=>{var Q;if(t.mode==="combobox"){const G=(Q=w.value[0])===null||Q===void 0?void 0:Q.value;G!=null&&d(String(G))}},{flush:"post"});const _=(Q,G)=>{const ee=G??Q;return{[c.value.value]:Q,[c.value.label]:ee}},P=ie();Ke(()=>{if(t.mode!=="tags"){P.value=g.value;return}const Q=g.value.slice(),G=ee=>h.value.has(ee);[...w.value].sort((ee,X)=>ee.value{const X=ee.value;G(X)||Q.push(_(X,ee.label))}),P.value=Q});const O=aG(P,c,u,l,Ue(t,"optionFilterProp")),T=L(()=>t.mode!=="tags"||!u.value||O.value.some(Q=>Q[t.optionFilterProp||"value"]===u.value)?O.value:[_(u.value),...O.value]),M=L(()=>t.filterSort?[...T.value].sort((Q,G)=>t.filterSort(Q,G)):T.value),I=L(()=>kW(M.value,{fieldNames:c.value,childrenAsData:s.value})),k=Q=>{const G=m(Q);if(b(G),t.onChange&&(G.length!==w.value.length||G.some((ee,X)=>{var K;return((K=w.value[X])===null||K===void 0?void 0:K.value)!==(ee==null?void 0:ee.value)}))){const ee=t.labelInValue?G.map(K=>A(A({},K),{originLabel:K.label,label:typeof K.label=="function"?K.label():K.label})):G.map(K=>K.value),X=G.map(K=>my(x(K.value)));t.onChange(a.value?ee:ee[0],a.value?X:X[0])}},[E,R]=Mt(null),[D,F]=Mt(0),N=L(()=>t.defaultActiveFirstOption!==void 0?t.defaultActiveFirstOption:t.mode!=="combobox"),B=function(Q,G){let{source:ee="keyboard"}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};F(G),t.backfill&&t.mode==="combobox"&&Q!==null&&ee==="keyboard"&&R(String(Q))},z=(Q,G)=>{const ee=()=>{var X;const K=x(Q),te=K==null?void 0:K[c.value.label];return[t.labelInValue?{label:typeof te=="function"?te():te,originLabel:te,value:Q,key:(X=K==null?void 0:K.key)!==null&&X!==void 0?X:Q}:Q,my(K)]};if(G&&t.onSelect){const[X,K]=ee();t.onSelect(X,K)}else if(!G&&t.onDeselect){const[X,K]=ee();t.onDeselect(X,K)}},W=(Q,G)=>{let ee;const X=a.value?G.selected:!0;X?ee=a.value?[...w.value,Q]:[Q]:ee=w.value.filter(K=>K.value!==Q),k(ee),z(Q,X),t.mode==="combobox"?R(""):(!a.value||t.autoClearSearchValue)&&(d(""),R(""))},j=(Q,G)=>{k(Q),(G.type==="remove"||G.type==="clear")&&G.values.forEach(ee=>{z(ee.value,!1)})},U=(Q,G)=>{var ee;if(d(Q),R(null),G.source==="submit"){const X=(Q||"").trim();if(X){const K=Array.from(new Set([...S.value,X]));k(K),z(X,!0),d("")}return}G.source!=="blur"&&(t.mode==="combobox"&&k(Q),(ee=t.onSearch)===null||ee===void 0||ee.call(t,Q))},V=Q=>{let G=Q;t.mode!=="tags"&&(G=Q.map(X=>{const K=p.value.get(X);return K==null?void 0:K.value}).filter(X=>X!==void 0));const ee=Array.from(new Set([...S.value,...G]));k(ee),ee.forEach(X=>{z(X,!0)})},q=L(()=>t.virtual!==!1&&t.dropdownMatchSelectWidth!==!1);ZY(Lp(A(A({},f),{flattenOptions:I,onActiveValue:B,defaultActiveFirstOption:N,onSelect:W,menuItemSelectedIcon:Ue(t,"menuItemSelectedIcon"),rawValues:S,fieldNames:c,virtual:q,listHeight:Ue(t,"listHeight"),listItemHeight:Ue(t,"listItemHeight"),childrenAsData:s})));const Y=se();n({focus(){var Q;(Q=Y.value)===null||Q===void 0||Q.focus()},blur(){var Q;(Q=Y.value)===null||Q===void 0||Q.blur()},scrollTo(Q){var G;(G=Y.value)===null||G===void 0||G.scrollTo(Q)}});const J=L(()=>ht(t,["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","listHeight","listItemHeight","value","defaultValue","labelInValue","onChange"]));return()=>C(S1,H(H(H({},J.value),i),{},{id:r,prefixCls:t.prefixCls,ref:Y,omitDomProps:lG,mode:t.mode,displayValues:$.value,onDisplayValuesChange:j,searchValue:u.value,onSearch:U,onSearchSplit:V,dropdownMatchSelectWidth:t.dropdownMatchSelectWidth,OptionList:eG,emptyOptions:!I.value.length,activeValue:E.value,activeDescendantId:`${r}_list_${D.value}`}),o)}}),A1=()=>null;A1.isSelectOption=!0;A1.displayName="ASelectOption";const _1=()=>null;_1.isSelectOptGroup=!0;_1.displayName="ASelectOptGroup";var dG={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},fG=Symbol("iconContext"),ER=function(){return qe(fG,{prefixCls:se("anticon"),rootClassName:se(""),csp:se()})};function P1(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function hG(t,e){return t&&t.contains?t.contains(e):!1}var H_="data-vc-order",pG="vc-icon-key",_y=new Map;function MR(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.mark;return e?e.startsWith("data-")?e:"data-".concat(e):pG}function T1(t){if(t.attachTo)return t.attachTo;var e=document.querySelector("head");return e||document.body}function gG(t){return t==="queue"?"prependQueue":t?"prepend":"append"}function IR(t){return Array.from((_y.get(t)||t).children).filter(function(e){return e.tagName==="STYLE"})}function kR(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!P1())return null;var n=e.csp,i=e.prepend,o=document.createElement("style");o.setAttribute(H_,gG(i)),n&&n.nonce&&(o.nonce=n.nonce),o.innerHTML=t;var r=T1(e),a=r.firstChild;if(i){if(i==="queue"){var s=IR(r).filter(function(l){return["prepend","prependQueue"].includes(l.getAttribute(H_))});if(s.length)return r.insertBefore(o,s[s.length-1].nextSibling),o}r.insertBefore(o,a)}else r.appendChild(o);return o}function mG(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=T1(e);return IR(n).find(function(i){return i.getAttribute(MR(e))===t})}function vG(t,e){var n=_y.get(t);if(!n||!hG(document,n)){var i=kR("",e),o=i.parentNode;_y.set(t,o),t.removeChild(i)}}function bG(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=T1(n);vG(i,n);var o=mG(e,n);if(o)return n.csp&&n.csp.nonce&&o.nonce!==n.csp.nonce&&(o.nonce=n.csp.nonce),o.innerHTML!==t&&(o.innerHTML=t),o;var r=kR(t,n);return r.setAttribute(MR(n),e),r}function W_(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function _G(t,e){if(t==null)return{};var n={},i=Object.keys(t),o,r;for(r=0;r=0)&&(n[o]=t[o]);return n}function wh(t){for(var e=1;e=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function _G(t,e){if(t==null)return{};var n={},i=Object.keys(t),o,r;for(r=0;r=0)&&(n[o]=t[o]);return n}function Sh(t){for(var e=1;et.length)&&(e=t.length);for(var n=0,i=new Array(e);nt.length)&&(e=t.length);for(var n=0,i=new Array(e);n=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function VG(t,e){if(t==null)return{};var n={},i=Object.keys(t),o,r;for(r=0;r=0)&&(n[o]=t[o]);return n}FR(_9.primary);var ut=function(e,n){var i,o=Y_({},e,n.attrs),r=o.class,a=o.icon,s=o.spin,l=o.rotate,c=o.tabindex,u=o.twoToneColor,d=o.onClick,f=jG(o,FG),h=ER(),p=h.prefixCls,g=h.rootClassName,m=(i={},pu(i,g.value,!!g.value),pu(i,p.value,!0),pu(i,"".concat(p.value,"-").concat(a.name),!!a.name),pu(i,"".concat(p.value,"-spin"),!!s||a.name==="loading"),i),v=c;v===void 0&&d&&(v=-1);var b=l?{msTransform:"rotate(".concat(l,"deg)"),transform:"rotate(".concat(l,"deg)")}:void 0,y=RR(u),w=NG(y,2),x=w[0],$=w[1];return C("span",Y_({role:"img","aria-label":a.name},f,{onClick:d,class:[m,r],tabindex:v}),[C(Da,{icon:a,primaryColor:x,secondaryColor:$,style:b},null),C(LG,null,null)])};ut.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:[String,Array]};ut.displayName="AntdIcon";ut.inheritAttrs=!1;ut.getTwoToneColor=RG;ut.setTwoToneColor=FR;function G_(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:{};const{loading:n,multiple:i,prefixCls:o,hasFeedback:r,feedbackIcon:a,showArrow:s}=t,l=t.suffixIcon||e.suffixIcon&&e.suffixIcon(),c=t.clearIcon||e.clearIcon&&e.clearIcon(),u=t.menuItemSelectedIcon||e.menuItemSelectedIcon&&e.menuItemSelectedIcon(),d=t.removeIcon||e.removeIcon&&e.removeIcon(),f=c??C(si,null,null),h=v=>C(Qe,null,[s!==!1&&v,r&&a]);let p=null;if(l!==void 0)p=h(l);else if(n)p=h(C(yi,{spin:!0},null));else{const v=`${o}-suffix`;p=b=>{let{open:y,showSearch:w}=b;return h(y&&w?C(Pc,{class:v},null):C(nl,{class:v},null))}}let g=null;u!==void 0?g=u:i?g=C(_c,null,null):g=null;let m=null;return d!==void 0?m=d:m=C(ai,null,null),{clearIcon:f,suffixIcon:p,itemIcon:g,removeIcon:m}}function E1(t){const e=Symbol("contextKey");return{useProvide:(o,r)=>{const a=$t({});return ot(e,a),Ke(()=>{A(a,o,r||{})}),a},useInject:()=>qe(e,t)||{}}}const Lp=Symbol("ContextProps"),Fp=Symbol("InternalContextProps"),nK=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:L(()=>!0);const n=se(new Map),i=(r,a)=>{n.value.set(r,a),n.value=new Map(n.value)},o=r=>{n.value.delete(r),n.value=new Map(n.value)};ye([e,n],()=>{}),ot(Lp,t),ot(Fp,{addFormItemField:i,removeFormItemField:o})},Ty={id:L(()=>{}),onFieldBlur:()=>{},onFieldChange:()=>{},clearValidate:()=>{}},Oy={addFormItemField:()=>{},removeFormItemField:()=>{}},vn=()=>{const t=qe(Fp,Oy),e=Symbol("FormItemFieldKey"),n=Cn();return t.addFormItemField(e,n.type),at(()=>{t.removeFormItemField(e)}),ot(Fp,Oy),ot(Lp,Ty),qe(Lp,Ty)},Np=oe({compatConfig:{MODE:3},name:"AFormItemRest",setup(t,e){let{slots:n}=e;return ot(Fp,Oy),ot(Lp,Ty),()=>{var i;return(i=n.default)===null||i===void 0?void 0:i.call(n)}}}),Mn=E1({}),Bp=oe({name:"NoFormStatus",setup(t,e){let{slots:n}=e;return Mn.useProvide({}),()=>{var i;return(i=n.default)===null||i===void 0?void 0:i.call(n)}}});function ei(t,e,n){return ce({[`${t}-status-success`]:e==="success",[`${t}-status-warning`]:e==="warning",[`${t}-status-error`]:e==="error",[`${t}-status-validating`]:e==="validating",[`${t}-has-feedback`]:n})}const zo=(t,e)=>e||t,iK=t=>{const{componentCls:e}=t;return{[e]:{display:"inline-flex","&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"}}}},oK=t=>{const{componentCls:e}=t;return{[e]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${e}-item`]:{"&:empty":{display:"none"}}}}},NR=et("Space",t=>[oK(t),iK(t)]);var rK="[object Symbol]";function Am(t){return typeof t=="symbol"||Lo(t)&&Ia(t)==rK}function M1(t,e){for(var n=-1,i=t==null?0:t.length,o=Array(i);++n0){if(++e>=wK)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function AK(t){return function(){return t}}var zp=function(){try{var t=Qs(Object,"defineProperty");return t({},"",{}),t}catch{}}(),_K=zp?function(t,e){return zp(t,"toString",{configurable:!0,enumerable:!1,value:AK(e),writable:!0})}:I1,zR=$K(_K);function PK(t,e){for(var n=-1,i=t==null?0:t.length;++n-1}function k1(t,e,n){e=="__proto__"&&zp?zp(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var MK=Object.prototype,IK=MK.hasOwnProperty;function D1(t,e,n){var i=t[e];(!(IK.call(t,e)&&c1(i,n))||n===void 0&&!(e in t))&&k1(t,e,n)}function Gd(t,e,n,i){var o=!n;n||(n={});for(var r=-1,a=e.length;++ro?0:o+e),n=n>o?o:n,n<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var r=Array(o);++i=e||S<0||d&&_>=r}function v(){var $=gb();if(m($))return b($);s=setTimeout(v,g($))}function b($){return s=void 0,f&&i?h($):(i=o=void 0,a)}function y(){s!==void 0&&clearTimeout(s),c=0,i=l=o=s=void 0}function w(){return s===void 0?a:b(gb())}function x(){var $=gb(),S=m($);if(i=arguments,o=this,l=$,S){if(s===void 0)return p(l);if(d)return clearTimeout(s),s=setTimeout(v,e),h(l)}return s===void 0&&(s=setTimeout(v,e)),a}return x.cancel=y,x.flush=w,x}function jq(t){return Lo(t)&&Cc(t)}function Vq(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function Xq(t){return function(e,n,i){var o=Object(e);if(!Cc(e)){var r=H1(n);e=$c(e),n=function(s){return r(o[s],s,o)}}var a=t(e,n,i);return a>-1?o[r?e[a]:a]:void 0}}var Yq=Math.max;function Gq(t,e,n){var i=t==null?0:t.length;if(!i)return-1;var o=n==null?0:mK(n);return o<0&&(o=Yq(i+o,0)),HR(t,H1(e),o)}var Kq=Xq(Gq);function Uq(t){for(var e=-1,n=t==null?0:t.length,i={};++e=120&&u.length>=120?new fc(a&&u):void 0}u=t[0];var d=-1,f=s[0];e:for(;++d1),r}),Gd(t,KR(t),n),i&&(n=Ru(n,dZ|fZ|hZ,uZ));for(var o=e.length;o--;)cZ(n,e[o]);return n});function gZ(t,e,n,i){if(!Ro(t))return t;e=Tc(e,t);for(var o=-1,r=e.length,a=r-1,s=t;s!=null&&++o=wZ){var c=xZ(t);if(c)return u1(c);a=!1,o=Mp,l=new fc}else l=s;e:for(;++i({compactSize:String,compactDirection:Z.oneOf(Wn("horizontal","vertical")).def("horizontal"),isFirstItem:Ce(),isLastItem:Ce()}),Pm=E1(null),Ra=(t,e)=>{const n=Pm.useInject(),i=L(()=>{if(!n||t3(n))return"";const{compactDirection:o,isFirstItem:r,isLastItem:a}=n,s=o==="vertical"?"-vertical-":"-";return ce({[`${t.value}-compact${s}item`]:!0,[`${t.value}-compact${s}first-item`]:r,[`${t.value}-compact${s}last-item`]:a,[`${t.value}-compact${s}item-rtl`]:e.value==="rtl"})});return{compactSize:L(()=>n==null?void 0:n.compactSize),compactDirection:L(()=>n==null?void 0:n.compactDirection),compactItemClassnames:i}},bd=oe({name:"NoCompactStyle",setup(t,e){let{slots:n}=e;return Pm.useProvide(null),()=>{var i;return(i=n.default)===null||i===void 0?void 0:i.call(n)}}}),$Z=()=>({prefixCls:String,size:{type:String},direction:Z.oneOf(Wn("horizontal","vertical")).def("horizontal"),align:Z.oneOf(Wn("start","end","center","baseline")),block:{type:Boolean,default:void 0}}),AZ=oe({name:"CompactItem",props:CZ(),setup(t,e){let{slots:n}=e;return Pm.useProvide(t),()=>{var i;return(i=n.default)===null||i===void 0?void 0:i.call(n)}}}),Hp=oe({name:"ASpaceCompact",inheritAttrs:!1,props:$Z(),setup(t,e){let{attrs:n,slots:i}=e;const{prefixCls:o,direction:r}=Me("space-compact",t),a=Pm.useInject(),[s,l]=NR(o),c=L(()=>ce(o.value,l.value,{[`${o.value}-rtl`]:r.value==="rtl",[`${o.value}-block`]:t.block,[`${o.value}-vertical`]:t.direction==="vertical"}));return()=>{var u;const d=Dt(((u=i.default)===null||u===void 0?void 0:u.call(i))||[]);return d.length===0?null:s(C("div",H(H({},n),{},{class:[c.value,n.class]}),[d.map((f,h)=>{var p;const g=f&&f.key||`${o.value}-item-${h}`,m=!a||t3(a);return C(AZ,{key:g,compactSize:(p=t.size)!==null&&p!==void 0?p:"middle",compactDirection:t.direction,isFirstItem:h===0&&(m||(a==null?void 0:a.isFirstItem)),isLastItem:h===d.length-1&&(m||(a==null?void 0:a.isLastItem))},{default:()=>[f]})})]))}}}),_Z=t=>({animationDuration:t,animationFillMode:"both"}),PZ=t=>({animationDuration:t,animationFillMode:"both"}),Kd=function(t,e,n,i){const r=(arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1)?"&":"";return{[` +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zG(t,e){if(t){if(typeof t=="string")return X_(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return X_(t,e)}}function X_(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}function VG(t,e){if(t==null)return{};var n={},i=Object.keys(t),o,r;for(r=0;r=0)&&(n[o]=t[o]);return n}FR(_9.primary);var ut=function(e,n){var i,o=Y_({},e,n.attrs),r=o.class,a=o.icon,s=o.spin,l=o.rotate,c=o.tabindex,u=o.twoToneColor,d=o.onClick,f=jG(o,FG),h=ER(),p=h.prefixCls,g=h.rootClassName,m=(i={},gu(i,g.value,!!g.value),gu(i,p.value,!0),gu(i,"".concat(p.value,"-").concat(a.name),!!a.name),gu(i,"".concat(p.value,"-spin"),!!s||a.name==="loading"),i),v=c;v===void 0&&d&&(v=-1);var b=l?{msTransform:"rotate(".concat(l,"deg)"),transform:"rotate(".concat(l,"deg)")}:void 0,y=RR(u),w=NG(y,2),x=w[0],$=w[1];return C("span",Y_({role:"img","aria-label":a.name},f,{onClick:d,class:[m,r],tabindex:v}),[C(Da,{icon:a,primaryColor:x,secondaryColor:$,style:b},null),C(LG,null,null)])};ut.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:[String,Array]};ut.displayName="AntdIcon";ut.inheritAttrs=!1;ut.getTwoToneColor=RG;ut.setTwoToneColor=FR;function G_(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:{};const{loading:n,multiple:i,prefixCls:o,hasFeedback:r,feedbackIcon:a,showArrow:s}=t,l=t.suffixIcon||e.suffixIcon&&e.suffixIcon(),c=t.clearIcon||e.clearIcon&&e.clearIcon(),u=t.menuItemSelectedIcon||e.menuItemSelectedIcon&&e.menuItemSelectedIcon(),d=t.removeIcon||e.removeIcon&&e.removeIcon(),f=c??C(si,null,null),h=v=>C(Qe,null,[s!==!1&&v,r&&a]);let p=null;if(l!==void 0)p=h(l);else if(n)p=h(C(yi,{spin:!0},null));else{const v=`${o}-suffix`;p=b=>{let{open:y,showSearch:w}=b;return h(y&&w?C(Tc,{class:v},null):C(nl,{class:v},null))}}let g=null;u!==void 0?g=u:i?g=C(Pc,null,null):g=null;let m=null;return d!==void 0?m=d:m=C(ai,null,null),{clearIcon:f,suffixIcon:p,itemIcon:g,removeIcon:m}}function E1(t){const e=Symbol("contextKey");return{useProvide:(o,r)=>{const a=$t({});return ot(e,a),Ke(()=>{A(a,o,r||{})}),a},useInject:()=>qe(e,t)||{}}}const Fp=Symbol("ContextProps"),Np=Symbol("InternalContextProps"),nK=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:L(()=>!0);const n=se(new Map),i=(r,a)=>{n.value.set(r,a),n.value=new Map(n.value)},o=r=>{n.value.delete(r),n.value=new Map(n.value)};ye([e,n],()=>{}),ot(Fp,t),ot(Np,{addFormItemField:i,removeFormItemField:o})},Ty={id:L(()=>{}),onFieldBlur:()=>{},onFieldChange:()=>{},clearValidate:()=>{}},Oy={addFormItemField:()=>{},removeFormItemField:()=>{}},vn=()=>{const t=qe(Np,Oy),e=Symbol("FormItemFieldKey"),n=Cn();return t.addFormItemField(e,n.type),at(()=>{t.removeFormItemField(e)}),ot(Np,Oy),ot(Fp,Ty),qe(Fp,Ty)},Bp=oe({compatConfig:{MODE:3},name:"AFormItemRest",setup(t,e){let{slots:n}=e;return ot(Np,Oy),ot(Fp,Ty),()=>{var i;return(i=n.default)===null||i===void 0?void 0:i.call(n)}}}),Mn=E1({}),zp=oe({name:"NoFormStatus",setup(t,e){let{slots:n}=e;return Mn.useProvide({}),()=>{var i;return(i=n.default)===null||i===void 0?void 0:i.call(n)}}});function ei(t,e,n){return ce({[`${t}-status-success`]:e==="success",[`${t}-status-warning`]:e==="warning",[`${t}-status-error`]:e==="error",[`${t}-status-validating`]:e==="validating",[`${t}-has-feedback`]:n})}const zo=(t,e)=>e||t,iK=t=>{const{componentCls:e}=t;return{[e]:{display:"inline-flex","&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"}}}},oK=t=>{const{componentCls:e}=t;return{[e]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${e}-item`]:{"&:empty":{display:"none"}}}}},NR=et("Space",t=>[oK(t),iK(t)]);var rK="[object Symbol]";function _m(t){return typeof t=="symbol"||Lo(t)&&Ia(t)==rK}function M1(t,e){for(var n=-1,i=t==null?0:t.length,o=Array(i);++n0){if(++e>=wK)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function AK(t){return function(){return t}}var Hp=function(){try{var t=Qs(Object,"defineProperty");return t({},"",{}),t}catch{}}(),_K=Hp?function(t,e){return Hp(t,"toString",{configurable:!0,enumerable:!1,value:AK(e),writable:!0})}:I1,zR=$K(_K);function PK(t,e){for(var n=-1,i=t==null?0:t.length;++n-1}function k1(t,e,n){e=="__proto__"&&Hp?Hp(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}var MK=Object.prototype,IK=MK.hasOwnProperty;function D1(t,e,n){var i=t[e];(!(IK.call(t,e)&&c1(i,n))||n===void 0&&!(e in t))&&k1(t,e,n)}function Kd(t,e,n,i){var o=!n;n||(n={});for(var r=-1,a=e.length;++ro?0:o+e),n=n>o?o:n,n<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var r=Array(o);++i=e||S<0||d&&_>=r}function v(){var $=gb();if(m($))return b($);s=setTimeout(v,g($))}function b($){return s=void 0,f&&i?h($):(i=o=void 0,a)}function y(){s!==void 0&&clearTimeout(s),c=0,i=l=o=s=void 0}function w(){return s===void 0?a:b(gb())}function x(){var $=gb(),S=m($);if(i=arguments,o=this,l=$,S){if(s===void 0)return p(l);if(d)return clearTimeout(s),s=setTimeout(v,e),h(l)}return s===void 0&&(s=setTimeout(v,e)),a}return x.cancel=y,x.flush=w,x}function jq(t){return Lo(t)&&$c(t)}function Vq(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function Xq(t){return function(e,n,i){var o=Object(e);if(!$c(e)){var r=H1(n);e=Ac(e),n=function(s){return r(o[s],s,o)}}var a=t(e,n,i);return a>-1?o[r?e[a]:a]:void 0}}var Yq=Math.max;function Gq(t,e,n){var i=t==null?0:t.length;if(!i)return-1;var o=n==null?0:mK(n);return o<0&&(o=Yq(i+o,0)),HR(t,H1(e),o)}var Kq=Xq(Gq);function Uq(t){for(var e=-1,n=t==null?0:t.length,i={};++e=120&&u.length>=120?new fc(a&&u):void 0}u=t[0];var d=-1,f=s[0];e:for(;++d1),r}),Kd(t,KR(t),n),i&&(n=Lu(n,dZ|fZ|hZ,uZ));for(var o=e.length;o--;)cZ(n,e[o]);return n});function gZ(t,e,n,i){if(!Ro(t))return t;e=Oc(e,t);for(var o=-1,r=e.length,a=r-1,s=t;s!=null&&++o=wZ){var c=xZ(t);if(c)return u1(c);a=!1,o=Ip,l=new fc}else l=s;e:for(;++i({compactSize:String,compactDirection:Z.oneOf(Wn("horizontal","vertical")).def("horizontal"),isFirstItem:Ce(),isLastItem:Ce()}),Tm=E1(null),Ra=(t,e)=>{const n=Tm.useInject(),i=L(()=>{if(!n||t3(n))return"";const{compactDirection:o,isFirstItem:r,isLastItem:a}=n,s=o==="vertical"?"-vertical-":"-";return ce({[`${t.value}-compact${s}item`]:!0,[`${t.value}-compact${s}first-item`]:r,[`${t.value}-compact${s}last-item`]:a,[`${t.value}-compact${s}item-rtl`]:e.value==="rtl"})});return{compactSize:L(()=>n==null?void 0:n.compactSize),compactDirection:L(()=>n==null?void 0:n.compactDirection),compactItemClassnames:i}},yd=oe({name:"NoCompactStyle",setup(t,e){let{slots:n}=e;return Tm.useProvide(null),()=>{var i;return(i=n.default)===null||i===void 0?void 0:i.call(n)}}}),$Z=()=>({prefixCls:String,size:{type:String},direction:Z.oneOf(Wn("horizontal","vertical")).def("horizontal"),align:Z.oneOf(Wn("start","end","center","baseline")),block:{type:Boolean,default:void 0}}),AZ=oe({name:"CompactItem",props:CZ(),setup(t,e){let{slots:n}=e;return Tm.useProvide(t),()=>{var i;return(i=n.default)===null||i===void 0?void 0:i.call(n)}}}),Wp=oe({name:"ASpaceCompact",inheritAttrs:!1,props:$Z(),setup(t,e){let{attrs:n,slots:i}=e;const{prefixCls:o,direction:r}=Me("space-compact",t),a=Tm.useInject(),[s,l]=NR(o),c=L(()=>ce(o.value,l.value,{[`${o.value}-rtl`]:r.value==="rtl",[`${o.value}-block`]:t.block,[`${o.value}-vertical`]:t.direction==="vertical"}));return()=>{var u;const d=Dt(((u=i.default)===null||u===void 0?void 0:u.call(i))||[]);return d.length===0?null:s(C("div",H(H({},n),{},{class:[c.value,n.class]}),[d.map((f,h)=>{var p;const g=f&&f.key||`${o.value}-item-${h}`,m=!a||t3(a);return C(AZ,{key:g,compactSize:(p=t.size)!==null&&p!==void 0?p:"middle",compactDirection:t.direction,isFirstItem:h===0&&(m||(a==null?void 0:a.isFirstItem)),isLastItem:h===d.length-1&&(m||(a==null?void 0:a.isLastItem))},{default:()=>[f]})})]))}}}),_Z=t=>({animationDuration:t,animationFillMode:"both"}),PZ=t=>({animationDuration:t,animationFillMode:"both"}),Ud=function(t,e,n,i){const r=(arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1)?"&":"";return{[` ${r}${t}-enter, ${r}${t}-appear `]:A(A({},_Z(i)),{animationPlayState:"paused"}),[`${r}${t}-leave`]:A(A({},PZ(i)),{animationPlayState:"paused"}),[` ${r}${t}-enter${t}-enter-active, ${r}${t}-appear${t}-appear-active - `]:{animationName:e,animationPlayState:"running"},[`${r}${t}-leave${t}-leave-active`]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},TZ=new mt("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),OZ=new mt("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),j1=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const{antCls:n}=t,i=`${n}-fade`,o=e?"&":"";return[Kd(i,TZ,OZ,t.motionDurationMid,e),{[` + `]:{animationName:e,animationPlayState:"running"},[`${r}${t}-leave${t}-leave-active`]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},TZ=new mt("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),OZ=new mt("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),j1=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const{antCls:n}=t,i=`${n}-fade`,o=e?"&":"";return[Ud(i,TZ,OZ,t.motionDurationMid,e),{[` ${o}${i}-enter, ${o}${i}-appear - `]:{opacity:0,animationTimingFunction:"linear"},[`${o}${i}-leave`]:{animationTimingFunction:"linear"}}]},EZ=new mt("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),MZ=new mt("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),IZ=new mt("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),kZ=new mt("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),DZ=new mt("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),RZ=new mt("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),LZ=new mt("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),FZ=new mt("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),NZ={"move-up":{inKeyframes:LZ,outKeyframes:FZ},"move-down":{inKeyframes:EZ,outKeyframes:MZ},"move-left":{inKeyframes:IZ,outKeyframes:kZ},"move-right":{inKeyframes:DZ,outKeyframes:RZ}},pc=(t,e)=>{const{antCls:n}=t,i=`${n}-${e}`,{inKeyframes:o,outKeyframes:r}=NZ[e];return[Kd(i,o,r,t.motionDurationMid),{[` + `]:{opacity:0,animationTimingFunction:"linear"},[`${o}${i}-leave`]:{animationTimingFunction:"linear"}}]},EZ=new mt("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),MZ=new mt("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),IZ=new mt("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),kZ=new mt("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),DZ=new mt("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),RZ=new mt("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),LZ=new mt("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),FZ=new mt("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),NZ={"move-up":{inKeyframes:LZ,outKeyframes:FZ},"move-down":{inKeyframes:EZ,outKeyframes:MZ},"move-left":{inKeyframes:IZ,outKeyframes:kZ},"move-right":{inKeyframes:DZ,outKeyframes:RZ}},pc=(t,e)=>{const{antCls:n}=t,i=`${n}-${e}`,{inKeyframes:o,outKeyframes:r}=NZ[e];return[Ud(i,o,r,t.motionDurationMid),{[` ${i}-enter, ${i}-appear - `]:{opacity:0,animationTimingFunction:t.motionEaseOutCirc},[`${i}-leave`]:{animationTimingFunction:t.motionEaseInOutCirc}}]},Tm=new mt("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Om=new mt("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),Em=new mt("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),Mm=new mt("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),BZ=new mt("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),zZ=new mt("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),HZ=new mt("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),WZ=new mt("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),jZ={"slide-up":{inKeyframes:Tm,outKeyframes:Om},"slide-down":{inKeyframes:Em,outKeyframes:Mm},"slide-left":{inKeyframes:BZ,outKeyframes:zZ},"slide-right":{inKeyframes:HZ,outKeyframes:WZ}},lr=(t,e)=>{const{antCls:n}=t,i=`${n}-${e}`,{inKeyframes:o,outKeyframes:r}=jZ[e];return[Kd(i,o,r,t.motionDurationMid),{[` + `]:{opacity:0,animationTimingFunction:t.motionEaseOutCirc},[`${i}-leave`]:{animationTimingFunction:t.motionEaseInOutCirc}}]},Om=new mt("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Em=new mt("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),Mm=new mt("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),Im=new mt("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),BZ=new mt("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),zZ=new mt("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),HZ=new mt("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),WZ=new mt("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),jZ={"slide-up":{inKeyframes:Om,outKeyframes:Em},"slide-down":{inKeyframes:Mm,outKeyframes:Im},"slide-left":{inKeyframes:BZ,outKeyframes:zZ},"slide-right":{inKeyframes:HZ,outKeyframes:WZ}},lr=(t,e)=>{const{antCls:n}=t,i=`${n}-${e}`,{inKeyframes:o,outKeyframes:r}=jZ[e];return[Ud(i,o,r,t.motionDurationMid),{[` ${i}-enter, ${i}-appear - `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:t.motionEaseOutQuint},[`${i}-leave`]:{animationTimingFunction:t.motionEaseInQuint}}]},V1=new mt("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),VZ=new mt("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),h2=new mt("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),p2=new mt("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),XZ=new mt("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),YZ=new mt("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),GZ=new mt("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),KZ=new mt("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),UZ=new mt("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),qZ=new mt("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),ZZ=new mt("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),JZ=new mt("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),QZ={zoom:{inKeyframes:V1,outKeyframes:VZ},"zoom-big":{inKeyframes:h2,outKeyframes:p2},"zoom-big-fast":{inKeyframes:h2,outKeyframes:p2},"zoom-left":{inKeyframes:GZ,outKeyframes:KZ},"zoom-right":{inKeyframes:UZ,outKeyframes:qZ},"zoom-up":{inKeyframes:XZ,outKeyframes:YZ},"zoom-down":{inKeyframes:ZZ,outKeyframes:JZ}},Oc=(t,e)=>{const{antCls:n}=t,i=`${n}-${e}`,{inKeyframes:o,outKeyframes:r}=QZ[e];return[Kd(i,o,r,e==="zoom-big-fast"?t.motionDurationFast:t.motionDurationMid),{[` + `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:t.motionEaseOutQuint},[`${i}-leave`]:{animationTimingFunction:t.motionEaseInQuint}}]},V1=new mt("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),VZ=new mt("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),h2=new mt("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),p2=new mt("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),XZ=new mt("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),YZ=new mt("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),GZ=new mt("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),KZ=new mt("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),UZ=new mt("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),qZ=new mt("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),ZZ=new mt("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),JZ=new mt("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),QZ={zoom:{inKeyframes:V1,outKeyframes:VZ},"zoom-big":{inKeyframes:h2,outKeyframes:p2},"zoom-big-fast":{inKeyframes:h2,outKeyframes:p2},"zoom-left":{inKeyframes:GZ,outKeyframes:KZ},"zoom-right":{inKeyframes:UZ,outKeyframes:qZ},"zoom-up":{inKeyframes:XZ,outKeyframes:YZ},"zoom-down":{inKeyframes:ZZ,outKeyframes:JZ}},Ec=(t,e)=>{const{antCls:n}=t,i=`${n}-${e}`,{inKeyframes:o,outKeyframes:r}=QZ[e];return[Ud(i,o,r,e==="zoom-big-fast"?t.motionDurationFast:t.motionDurationMid),{[` ${i}-enter, ${i}-appear - `]:{transform:"scale(0)",opacity:0,animationTimingFunction:t.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${i}-leave`]:{animationTimingFunction:t.motionEaseInOutCirc}}]},Ud=t=>({[t.componentCls]:{[`${t.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${t.motionDurationMid} ${t.motionEaseInOut}, + `]:{transform:"scale(0)",opacity:0,animationTimingFunction:t.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${i}-leave`]:{animationTimingFunction:t.motionEaseInOutCirc}}]},qd=t=>({[t.componentCls]:{[`${t.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${t.motionDurationMid} ${t.motionEaseInOut}, opacity ${t.motionDurationMid} ${t.motionEaseInOut} !important`}},[`${t.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${t.motionDurationMid} ${t.motionEaseInOut}, opacity ${t.motionDurationMid} ${t.motionEaseInOut} !important`}}}),g2=t=>{const{controlPaddingHorizontal:e}=t;return{position:"relative",display:"block",minHeight:t.controlHeight,padding:`${(t.controlHeight-t.fontSize*t.lineHeight)/2}px ${e}px`,color:t.colorText,fontWeight:"normal",fontSize:t.fontSize,lineHeight:t.lineHeight,boxSizing:"border-box"}},eJ=t=>{const{antCls:e,componentCls:n}=t,i=`${n}-item`;return[{[`${n}-dropdown`]:A(A({},rt(t)),{position:"absolute",top:-9999,zIndex:t.zIndexPopup,boxSizing:"border-box",padding:t.paddingXXS,overflow:"hidden",fontSize:t.fontSize,fontVariant:"initial",backgroundColor:t.colorBgElevated,borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary,[` &${e}-slide-up-enter${e}-slide-up-enter-active${n}-dropdown-placement-bottomLeft, &${e}-slide-up-appear${e}-slide-up-appear-active${n}-dropdown-placement-bottomLeft - `]:{animationName:Tm},[` + `]:{animationName:Om},[` &${e}-slide-up-enter${e}-slide-up-enter-active${n}-dropdown-placement-topLeft, &${e}-slide-up-appear${e}-slide-up-appear-active${n}-dropdown-placement-topLeft - `]:{animationName:Em},[`&${e}-slide-up-leave${e}-slide-up-leave-active${n}-dropdown-placement-bottomLeft`]:{animationName:Om},[`&${e}-slide-up-leave${e}-slide-up-leave-active${n}-dropdown-placement-topLeft`]:{animationName:Mm},"&-hidden":{display:"none"},"&-empty":{color:t.colorTextDisabled},[`${i}-empty`]:A(A({},g2(t)),{color:t.colorTextDisabled}),[`${i}`]:A(A({},g2(t)),{cursor:"pointer",transition:`background ${t.motionDurationSlow} ease`,borderRadius:t.borderRadiusSM,"&-group":{color:t.colorTextDescription,fontSize:t.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":A({flex:"auto"},un),"&-state":{flex:"none"},[`&-active:not(${i}-option-disabled)`]:{backgroundColor:t.controlItemBgHover},[`&-selected:not(${i}-option-disabled)`]:{color:t.colorText,fontWeight:t.fontWeightStrong,backgroundColor:t.controlItemBgActive,[`${i}-option-state`]:{color:t.colorPrimary}},"&-disabled":{[`&${i}-option-selected`]:{backgroundColor:t.colorBgContainerDisabled},color:t.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:t.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},lr(t,"slide-up"),lr(t,"slide-down"),pc(t,"move-up"),pc(t,"move-down")]},fl=2;function i3(t){let{controlHeightSM:e,controlHeight:n,lineWidth:i}=t;const o=(n-e)/2-i,r=Math.ceil(o/2);return[o,r]}function vb(t,e){const{componentCls:n,iconCls:i}=t,o=`${n}-selection-overflow`,r=t.controlHeightSM,[a]=i3(t),s=e?`${n}-${e}`:"";return{[`${n}-multiple${s}`]:{fontSize:t.fontSize,[o]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${n}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${a-fl}px ${fl*2}px`,borderRadius:t.borderRadius,[`${n}-show-search&`]:{cursor:"text"},[`${n}-disabled&`]:{background:t.colorBgContainerDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${fl}px 0`,lineHeight:`${r}px`,content:'"\\a0"'}},[` + `]:{animationName:Mm},[`&${e}-slide-up-leave${e}-slide-up-leave-active${n}-dropdown-placement-bottomLeft`]:{animationName:Em},[`&${e}-slide-up-leave${e}-slide-up-leave-active${n}-dropdown-placement-topLeft`]:{animationName:Im},"&-hidden":{display:"none"},"&-empty":{color:t.colorTextDisabled},[`${i}-empty`]:A(A({},g2(t)),{color:t.colorTextDisabled}),[`${i}`]:A(A({},g2(t)),{cursor:"pointer",transition:`background ${t.motionDurationSlow} ease`,borderRadius:t.borderRadiusSM,"&-group":{color:t.colorTextDescription,fontSize:t.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":A({flex:"auto"},un),"&-state":{flex:"none"},[`&-active:not(${i}-option-disabled)`]:{backgroundColor:t.controlItemBgHover},[`&-selected:not(${i}-option-disabled)`]:{color:t.colorText,fontWeight:t.fontWeightStrong,backgroundColor:t.controlItemBgActive,[`${i}-option-state`]:{color:t.colorPrimary}},"&-disabled":{[`&${i}-option-selected`]:{backgroundColor:t.colorBgContainerDisabled},color:t.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:t.controlPaddingHorizontal*2}}}),"&-rtl":{direction:"rtl"}})},lr(t,"slide-up"),lr(t,"slide-down"),pc(t,"move-up"),pc(t,"move-down")]},fl=2;function i3(t){let{controlHeightSM:e,controlHeight:n,lineWidth:i}=t;const o=(n-e)/2-i,r=Math.ceil(o/2);return[o,r]}function vb(t,e){const{componentCls:n,iconCls:i}=t,o=`${n}-selection-overflow`,r=t.controlHeightSM,[a]=i3(t),s=e?`${n}-${e}`:"";return{[`${n}-multiple${s}`]:{fontSize:t.fontSize,[o]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"}},[`${n}-selector`]:{display:"flex",flexWrap:"wrap",alignItems:"center",padding:`${a-fl}px ${fl*2}px`,borderRadius:t.borderRadius,[`${n}-show-search&`]:{cursor:"text"},[`${n}-disabled&`]:{background:t.colorBgContainerDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${fl}px 0`,lineHeight:`${r}px`,content:'"\\a0"'}},[` &${n}-show-arrow ${n}-selector, &${n}-allow-clear ${n}-selector `]:{paddingInlineEnd:t.fontSizeIcon+t.controlPaddingHorizontal},[`${n}-selection-item`]:{position:"relative",display:"flex",flex:"none",boxSizing:"border-box",maxWidth:"100%",height:r,marginTop:fl,marginBottom:fl,lineHeight:`${r-t.lineWidth*2}px`,background:t.colorFillSecondary,border:`${t.lineWidth}px solid ${t.colorSplit}`,borderRadius:t.borderRadiusSM,cursor:"default",transition:`font-size ${t.motionDurationSlow}, line-height ${t.motionDurationSlow}, height ${t.motionDurationSlow}`,userSelect:"none",marginInlineEnd:fl*2,paddingInlineStart:t.paddingXS,paddingInlineEnd:t.paddingXS/2,[`${n}-disabled&`]:{color:t.colorTextDisabled,borderColor:t.colorBorder,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:t.paddingXS/2,overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":A(A({},qs()),{display:"inline-block",color:t.colorIcon,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${i}`]:{verticalAlign:"-0.2em"},"&:hover":{color:t.colorIconHover}})},[`${o}-item + ${o}-item`]:{[`${n}-selection-search`]:{marginInlineStart:0}},[`${n}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:t.inputPaddingHorizontalBase-a,"\n &-input,\n &-mirror\n ":{height:r,fontFamily:t.fontFamily,lineHeight:`${r}px`,transition:`all ${t.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${n}-selection-placeholder `]:{position:"absolute",top:"50%",insetInlineStart:t.inputPaddingHorizontalBase,insetInlineEnd:t.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${t.motionDurationSlow}`}}}}function tJ(t){const{componentCls:e}=t,n=Ve(t,{controlHeight:t.controlHeightSM,controlHeightSM:t.controlHeightXS,borderRadius:t.borderRadiusSM,borderRadiusSM:t.borderRadiusXS}),[,i]=i3(t);return[vb(t),vb(n,"sm"),{[`${e}-multiple${e}-sm`]:{[`${e}-selection-placeholder`]:{insetInlineStart:t.controlPaddingHorizontalSM-t.lineWidth,insetInlineEnd:"auto"},[`${e}-selection-search`]:{marginInlineStart:i}}},vb(Ve(t,{fontSize:t.fontSizeLG,controlHeight:t.controlHeightLG,controlHeightSM:t.controlHeight,borderRadius:t.borderRadiusLG,borderRadiusSM:t.borderRadius}),"lg")]}function bb(t,e){const{componentCls:n,inputPaddingHorizontalBase:i,borderRadius:o}=t,r=t.controlHeight-t.lineWidth*2,a=Math.ceil(t.fontSize*1.25),s=e?`${n}-${e}`:"";return{[`${n}-single${s}`]:{fontSize:t.fontSize,[`${n}-selector`]:A(A({},rt(t)),{display:"flex",borderRadius:o,[`${n}-selection-search`]:{position:"absolute",top:0,insetInlineStart:i,insetInlineEnd:i,bottom:0,"&-input":{width:"100%"}},[` @@ -178,9 +178,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `]:{paddingInlineEnd:a},[`&${n}-open ${n}-selection-item`]:{color:t.colorTextPlaceholder},[`&:not(${n}-customize-input)`]:{[`${n}-selector`]:{width:"100%",height:t.controlHeight,padding:`0 ${i}px`,[`${n}-selection-search-input`]:{height:r},"&:after":{lineHeight:`${r}px`}}},[`&${n}-customize-input`]:{[`${n}-selector`]:{"&:after":{display:"none"},[`${n}-selection-search`]:{position:"static",width:"100%"},[`${n}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${i}px`,"&:after":{display:"none"}}}}}}}function nJ(t){const{componentCls:e}=t,n=t.controlPaddingHorizontalSM-t.lineWidth;return[bb(t),bb(Ve(t,{controlHeight:t.controlHeightSM,borderRadius:t.borderRadiusSM}),"sm"),{[`${e}-single${e}-sm`]:{[`&:not(${e}-customize-input)`]:{[`${e}-selection-search`]:{insetInlineStart:n,insetInlineEnd:n},[`${e}-selector`]:{padding:`0 ${n}px`},[`&${e}-show-arrow ${e}-selection-search`]:{insetInlineEnd:n+t.fontSize*1.5},[` &${e}-show-arrow ${e}-selection-item, &${e}-show-arrow ${e}-selection-placeholder - `]:{paddingInlineEnd:t.fontSize*1.5}}}},bb(Ve(t,{controlHeight:t.controlHeightLG,fontSize:t.fontSizeLG,borderRadius:t.borderRadiusLG}),"lg")]}function iJ(t,e,n){const{focusElCls:i,focus:o,borderElCls:r}=n,a=r?"> *":"",s=["hover",o?"focus":null,"active"].filter(Boolean).map(l=>`&:${l} ${a}`).join(",");return{[`&-item:not(${e}-last-item)`]:{marginInlineEnd:-t.lineWidth},"&-item":A(A({[s]:{zIndex:2}},i?{[`&${i}`]:{zIndex:2}}:{}),{[`&[disabled] ${a}`]:{zIndex:0}})}}function oJ(t,e,n){const{borderElCls:i}=n,o=i?`> ${i}`:"";return{[`&-item:not(${e}-first-item):not(${e}-last-item) ${o}`]:{borderRadius:0},[`&-item:not(${e}-last-item)${e}-first-item`]:{[`& ${o}, &${t}-sm ${o}, &${t}-lg ${o}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${e}-first-item)${e}-last-item`]:{[`& ${o}, &${t}-sm ${o}, &${t}-lg ${o}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function Ec(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{focus:!0};const{componentCls:n}=t,i=`${n}-compact`;return{[i]:A(A({},iJ(t,i,e)),oJ(n,i,e))}}const rJ=t=>{const{componentCls:e}=t;return{position:"relative",backgroundColor:t.colorBgContainer,border:`${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`,input:{cursor:"pointer"},[`${e}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${e}-disabled&`]:{color:t.colorTextDisabled,background:t.colorBgContainerDisabled,cursor:"not-allowed",[`${e}-multiple&`]:{background:t.colorBgContainerDisabled},input:{cursor:"not-allowed"}}}},yb=function(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:i,borderHoverColor:o,outlineColor:r,antCls:a}=e,s=n?{[`${i}-selector`]:{borderColor:o}}:{};return{[t]:{[`&:not(${i}-disabled):not(${i}-customize-input):not(${a}-pagination-size-changer)`]:A(A({},s),{[`${i}-focused& ${i}-selector`]:{borderColor:o,boxShadow:`0 0 0 ${e.controlOutlineWidth}px ${r}`,borderInlineEndWidth:`${e.controlLineWidth}px !important`,outline:0},[`&:hover ${i}-selector`]:{borderColor:o,borderInlineEndWidth:`${e.controlLineWidth}px !important`}})}}},aJ=t=>{const{componentCls:e}=t;return{[`${e}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},sJ=t=>{const{componentCls:e,inputPaddingHorizontalBase:n,iconCls:i}=t;return{[e]:A(A({},rt(t)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${e}-customize-input) ${e}-selector`]:A(A({},rJ(t)),aJ(t)),[`${e}-selection-item`]:A({flex:1,fontWeight:"normal"},un),[`${e}-selection-placeholder`]:A(A({},un),{flex:1,color:t.colorTextPlaceholder,pointerEvents:"none"}),[`${e}-arrow`]:A(A({},qs()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:n,height:t.fontSizeIcon,marginTop:-t.fontSizeIcon/2,color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[i]:{verticalAlign:"top",transition:`transform ${t.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${e}-suffix)`]:{pointerEvents:"auto"}},[`${e}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${e}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:n,zIndex:1,display:"inline-block",width:t.fontSizeIcon,height:t.fontSizeIcon,marginTop:-t.fontSizeIcon/2,color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:t.colorBgContainer,cursor:"pointer",opacity:0,transition:`color ${t.motionDurationMid} ease, opacity ${t.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:t.colorTextTertiary}},"&:hover":{[`${e}-clear`]:{opacity:1}}}),[`${e}-has-feedback`]:{[`${e}-clear`]:{insetInlineEnd:n+t.fontSize+t.paddingXXS}}}},lJ=t=>{const{componentCls:e}=t;return[{[e]:{[`&-borderless ${e}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${e}-in-form-item`]:{width:"100%"}}},sJ(t),nJ(t),tJ(t),eJ(t),{[`${e}-rtl`]:{direction:"rtl"}},yb(e,Ve(t,{borderHoverColor:t.colorPrimaryHover,outlineColor:t.controlOutline})),yb(`${e}-status-error`,Ve(t,{borderHoverColor:t.colorErrorHover,outlineColor:t.colorErrorOutline}),!0),yb(`${e}-status-warning`,Ve(t,{borderHoverColor:t.colorWarningHover,outlineColor:t.colorWarningOutline}),!0),Ec(t,{borderElCls:`${e}-selector`,focusElCls:`${e}-focused`})]},X1=et("Select",(t,e)=>{let{rootPrefixCls:n}=e;const i=Ve(t,{rootPrefixCls:n,inputPaddingHorizontalBase:t.paddingSM-1});return[lJ(i)]},t=>({zIndexPopup:t.zIndexPopupBase+50})),Im=()=>A(A({},ht(OR(),["inputIcon","mode","getInputElement","getRawInputElement","backfill"])),{value:Xe([Array,Object,String,Number]),defaultValue:Xe([Array,Object,String,Number]),notFoundContent:Z.any,suffixIcon:Z.any,itemIcon:Z.any,size:Ne(),mode:Ne(),bordered:Ce(!0),transitionName:String,choiceTransitionName:Ne(""),popupClassName:String,dropdownClassName:String,placement:Ne(),status:Ne(),"onUpdate:value":ve()}),m2="SECRET_COMBOBOX_MODE_DO_NOT_USE",kn=oe({compatConfig:{MODE:3},name:"ASelect",Option:A1,OptGroup:_1,inheritAttrs:!1,props:ct(Im(),{listHeight:256,listItemHeight:24}),SECRET_COMBOBOX_MODE_DO_NOT_USE:m2,slots:Object,setup(t,e){let{attrs:n,emit:i,slots:o,expose:r}=e;const a=se(),s=vn(),l=Mn.useInject(),c=L(()=>zo(l.status,t.status)),u=()=>{var z;(z=a.value)===null||z===void 0||z.focus()},d=()=>{var z;(z=a.value)===null||z===void 0||z.blur()},f=z=>{var W;(W=a.value)===null||W===void 0||W.scrollTo(z)},h=L(()=>{const{mode:z}=t;if(z!=="combobox")return z===m2?"combobox":z}),{prefixCls:p,direction:g,renderEmpty:m,size:v,getPrefixCls:b,getPopupContainer:y,disabled:w,select:x}=Me("select",t),{compactSize:$,compactItemClassnames:S}=Ra(p,g),_=L(()=>$.value||v.value),P=Oi(),O=L(()=>{var z;return(z=w.value)!==null&&z!==void 0?z:P.value}),[T,M]=X1(p),I=L(()=>b()),k=L(()=>t.placement!==void 0?t.placement:g.value==="rtl"?"bottomRight":"bottomLeft"),E=L(()=>oi(I.value,b1(k.value),t.transitionName)),R=L(()=>ce({[`${p.value}-lg`]:_.value==="large",[`${p.value}-sm`]:_.value==="small",[`${p.value}-rtl`]:g.value==="rtl",[`${p.value}-borderless`]:!t.bordered,[`${p.value}-in-form-item`]:l.isFormItemInput},ei(p.value,c.value,l.hasFeedback),S.value,M.value)),D=function(){for(var z=arguments.length,W=new Array(z),j=0;j{i("blur",z),s.onFieldBlur()};r({blur:d,focus:u,scrollTo:f});const N=L(()=>h.value==="multiple"||h.value==="tags"),B=L(()=>t.showArrow!==void 0?t.showArrow:t.loading||!(N.value||h.value==="combobox"));return()=>{var z,W,j,U;const{notFoundContent:V,listHeight:q=256,listItemHeight:Y=24,popupClassName:J,dropdownClassName:Q,virtual:G,dropdownMatchSelectWidth:ee,id:X=s.id.value,placeholder:K=(z=o.placeholder)===null||z===void 0?void 0:z.call(o),showArrow:te}=t,{hasFeedback:ue,feedbackIcon:ae}=l;let re;V!==void 0?re=V:o.notFoundContent?re=o.notFoundContent():h.value==="combobox"?re=null:re=(m==null?void 0:m("Select"))||C(Zw,{componentName:"Select"},null);const{suffixIcon:ne,itemIcon:le,removeIcon:he,clearIcon:pe}=O1(A(A({},t),{multiple:N.value,prefixCls:p.value,hasFeedback:ue,feedbackIcon:ae,showArrow:B.value}),o),ge=ht(t,["prefixCls","suffixIcon","itemIcon","removeIcon","clearIcon","size","bordered","status"]),be=ce(J||Q,{[`${p.value}-dropdown-${g.value}`]:g.value==="rtl"},M.value);return T(C(uG,H(H(H({ref:a,virtual:G,dropdownMatchSelectWidth:ee},ge),n),{},{showSearch:(W=t.showSearch)!==null&&W!==void 0?W:(j=x==null?void 0:x.value)===null||j===void 0?void 0:j.showSearch,placeholder:K,listHeight:q,listItemHeight:Y,mode:h.value,prefixCls:p.value,direction:g.value,inputIcon:ne,menuItemSelectedIcon:le,removeIcon:he,clearIcon:pe,notFoundContent:re,class:[R.value,n.class],getPopupContainer:y==null?void 0:y.value,dropdownClassName:be,onChange:D,onBlur:F,id:X,dropdownRender:ge.dropdownRender||o.dropdownRender,transitionName:E.value,children:(U=o.default)===null||U===void 0?void 0:U.call(o),tagRender:t.tagRender||o.tagRender,optionLabelRender:o.optionLabel,maxTagPlaceholder:t.maxTagPlaceholder||o.maxTagPlaceholder,showArrow:ue||te,disabled:O.value}),{option:o.option}))}}});kn.install=function(t){return t.component(kn.name,kn),t.component(kn.Option.displayName,kn.Option),t.component(kn.OptGroup.displayName,kn.OptGroup),t};const cJ=kn.Option,uJ=kn.OptGroup,Sa=()=>null;Sa.isSelectOption=!0;Sa.displayName="AAutoCompleteOption";const Gl=()=>null;Gl.isSelectOptGroup=!0;Gl.displayName="AAutoCompleteOptGroup";function dJ(t){var e,n;return((e=t==null?void 0:t.type)===null||e===void 0?void 0:e.isSelectOption)||((n=t==null?void 0:t.type)===null||n===void 0?void 0:n.isSelectOptGroup)}const fJ=()=>A(A({},ht(Im(),["loading","mode","optionLabelProp","labelInValue"])),{dataSource:Array,dropdownMenuStyle:{type:Object,default:void 0},dropdownMatchSelectWidth:{type:[Number,Boolean],default:!0},prefixCls:String,showSearch:{type:Boolean,default:void 0},transitionName:String,choiceTransitionName:{type:String,default:"zoom"},autofocus:{type:Boolean,default:void 0},backfill:{type:Boolean,default:void 0},filterOption:{type:[Boolean,Function],default:!1},defaultActiveFirstOption:{type:Boolean,default:!0},status:String}),hJ=Sa,pJ=Gl,xb=oe({compatConfig:{MODE:3},name:"AAutoComplete",inheritAttrs:!1,props:fJ(),slots:Object,setup(t,e){let{slots:n,attrs:i,expose:o}=e;Gi(!t.dropdownClassName);const r=se(),a=()=>{var u;const d=Dt((u=n.default)===null||u===void 0?void 0:u.call(n));return d.length?d[0]:void 0};o({focus:()=>{var u;(u=r.value)===null||u===void 0||u.focus()},blur:()=>{var u;(u=r.value)===null||u===void 0||u.blur()}});const{prefixCls:c}=Me("select",t);return()=>{var u,d,f;const{size:h,dataSource:p,notFoundContent:g=(u=n.notFoundContent)===null||u===void 0?void 0:u.call(n)}=t;let m;const{class:v}=i,b={[v]:!!v,[`${c.value}-lg`]:h==="large",[`${c.value}-sm`]:h==="small",[`${c.value}-show-search`]:!0,[`${c.value}-auto-complete`]:!0};if(t.options===void 0){const w=((d=n.dataSource)===null||d===void 0?void 0:d.call(n))||((f=n.options)===null||f===void 0?void 0:f.call(n))||[];w.length&&dJ(w[0])?m=w:m=p?p.map(x=>{if(cn(x))return x;switch(typeof x){case"string":return C(Sa,{key:x,value:x},{default:()=>[x]});case"object":return C(Sa,{key:x.value,value:x.value},{default:()=>[x.text]});default:throw new Error("AutoComplete[dataSource] only supports type `string[] | Object[]`.")}}):[]}const y=ht(A(A(A({},t),i),{mode:kn.SECRET_COMBOBOX_MODE_DO_NOT_USE,getInputElement:a,notFoundContent:g,class:b,popupClassName:t.popupClassName||t.dropdownClassName,ref:r}),["dataSource","loading"]);return C(kn,y,H({default:()=>[m]},ht(n,["default","dataSource","options"])))}}}),gJ=A(xb,{Option:Sa,OptGroup:Gl,install(t){return t.component(xb.name,xb),t.component(Sa.displayName,Sa),t.component(Gl.displayName,Gl),t}});var mJ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"};function v2(t){for(var e=1;e({backgroundColor:t,border:`${i.lineWidth}px ${i.lineType} ${e}`,[`${o}-icon`]:{color:n}}),EJ=t=>{const{componentCls:e,motionDurationSlow:n,marginXS:i,marginSM:o,fontSize:r,fontSizeLG:a,lineHeight:s,borderRadiusLG:l,motionEaseInOutCirc:c,alertIconSizeLG:u,colorText:d,paddingContentVerticalSM:f,alertPaddingHorizontal:h,paddingMD:p,paddingContentHorizontalLG:g}=t;return{[e]:A(A({},rt(t)),{position:"relative",display:"flex",alignItems:"center",padding:`${f}px ${h}px`,wordWrap:"break-word",borderRadius:l,[`&${e}-rtl`]:{direction:"rtl"},[`${e}-content`]:{flex:1,minWidth:0},[`${e}-icon`]:{marginInlineEnd:i,lineHeight:0},"&-description":{display:"none",fontSize:r,lineHeight:s},"&-message":{color:d},[`&${e}-motion-leave`]:{overflow:"hidden",opacity:1,transition:`max-height ${n} ${c}, opacity ${n} ${c}, + `]:{paddingInlineEnd:t.fontSize*1.5}}}},bb(Ve(t,{controlHeight:t.controlHeightLG,fontSize:t.fontSizeLG,borderRadius:t.borderRadiusLG}),"lg")]}function iJ(t,e,n){const{focusElCls:i,focus:o,borderElCls:r}=n,a=r?"> *":"",s=["hover",o?"focus":null,"active"].filter(Boolean).map(l=>`&:${l} ${a}`).join(",");return{[`&-item:not(${e}-last-item)`]:{marginInlineEnd:-t.lineWidth},"&-item":A(A({[s]:{zIndex:2}},i?{[`&${i}`]:{zIndex:2}}:{}),{[`&[disabled] ${a}`]:{zIndex:0}})}}function oJ(t,e,n){const{borderElCls:i}=n,o=i?`> ${i}`:"";return{[`&-item:not(${e}-first-item):not(${e}-last-item) ${o}`]:{borderRadius:0},[`&-item:not(${e}-last-item)${e}-first-item`]:{[`& ${o}, &${t}-sm ${o}, &${t}-lg ${o}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${e}-first-item)${e}-last-item`]:{[`& ${o}, &${t}-sm ${o}, &${t}-lg ${o}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function Mc(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{focus:!0};const{componentCls:n}=t,i=`${n}-compact`;return{[i]:A(A({},iJ(t,i,e)),oJ(n,i,e))}}const rJ=t=>{const{componentCls:e}=t;return{position:"relative",backgroundColor:t.colorBgContainer,border:`${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`,input:{cursor:"pointer"},[`${e}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit"}},[`${e}-disabled&`]:{color:t.colorTextDisabled,background:t.colorBgContainerDisabled,cursor:"not-allowed",[`${e}-multiple&`]:{background:t.colorBgContainerDisabled},input:{cursor:"not-allowed"}}}},yb=function(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{componentCls:i,borderHoverColor:o,outlineColor:r,antCls:a}=e,s=n?{[`${i}-selector`]:{borderColor:o}}:{};return{[t]:{[`&:not(${i}-disabled):not(${i}-customize-input):not(${a}-pagination-size-changer)`]:A(A({},s),{[`${i}-focused& ${i}-selector`]:{borderColor:o,boxShadow:`0 0 0 ${e.controlOutlineWidth}px ${r}`,borderInlineEndWidth:`${e.controlLineWidth}px !important`,outline:0},[`&:hover ${i}-selector`]:{borderColor:o,borderInlineEndWidth:`${e.controlLineWidth}px !important`}})}}},aJ=t=>{const{componentCls:e}=t;return{[`${e}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none","&::-webkit-search-cancel-button":{display:"none","-webkit-appearance":"none"}}}},sJ=t=>{const{componentCls:e,inputPaddingHorizontalBase:n,iconCls:i}=t;return{[e]:A(A({},rt(t)),{position:"relative",display:"inline-block",cursor:"pointer",[`&:not(${e}-customize-input) ${e}-selector`]:A(A({},rJ(t)),aJ(t)),[`${e}-selection-item`]:A({flex:1,fontWeight:"normal"},un),[`${e}-selection-placeholder`]:A(A({},un),{flex:1,color:t.colorTextPlaceholder,pointerEvents:"none"}),[`${e}-arrow`]:A(A({},qs()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:n,height:t.fontSizeIcon,marginTop:-t.fontSizeIcon/2,color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",[i]:{verticalAlign:"top",transition:`transform ${t.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${e}-suffix)`]:{pointerEvents:"auto"}},[`${e}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${e}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:n,zIndex:1,display:"inline-block",width:t.fontSizeIcon,height:t.fontSizeIcon,marginTop:-t.fontSizeIcon/2,color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",background:t.colorBgContainer,cursor:"pointer",opacity:0,transition:`color ${t.motionDurationMid} ease, opacity ${t.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:t.colorTextTertiary}},"&:hover":{[`${e}-clear`]:{opacity:1}}}),[`${e}-has-feedback`]:{[`${e}-clear`]:{insetInlineEnd:n+t.fontSize+t.paddingXXS}}}},lJ=t=>{const{componentCls:e}=t;return[{[e]:{[`&-borderless ${e}-selector`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`&${e}-in-form-item`]:{width:"100%"}}},sJ(t),nJ(t),tJ(t),eJ(t),{[`${e}-rtl`]:{direction:"rtl"}},yb(e,Ve(t,{borderHoverColor:t.colorPrimaryHover,outlineColor:t.controlOutline})),yb(`${e}-status-error`,Ve(t,{borderHoverColor:t.colorErrorHover,outlineColor:t.colorErrorOutline}),!0),yb(`${e}-status-warning`,Ve(t,{borderHoverColor:t.colorWarningHover,outlineColor:t.colorWarningOutline}),!0),Mc(t,{borderElCls:`${e}-selector`,focusElCls:`${e}-focused`})]},X1=et("Select",(t,e)=>{let{rootPrefixCls:n}=e;const i=Ve(t,{rootPrefixCls:n,inputPaddingHorizontalBase:t.paddingSM-1});return[lJ(i)]},t=>({zIndexPopup:t.zIndexPopupBase+50})),km=()=>A(A({},ht(OR(),["inputIcon","mode","getInputElement","getRawInputElement","backfill"])),{value:Xe([Array,Object,String,Number]),defaultValue:Xe([Array,Object,String,Number]),notFoundContent:Z.any,suffixIcon:Z.any,itemIcon:Z.any,size:Ne(),mode:Ne(),bordered:Ce(!0),transitionName:String,choiceTransitionName:Ne(""),popupClassName:String,dropdownClassName:String,placement:Ne(),status:Ne(),"onUpdate:value":ve()}),m2="SECRET_COMBOBOX_MODE_DO_NOT_USE",kn=oe({compatConfig:{MODE:3},name:"ASelect",Option:A1,OptGroup:_1,inheritAttrs:!1,props:ct(km(),{listHeight:256,listItemHeight:24}),SECRET_COMBOBOX_MODE_DO_NOT_USE:m2,slots:Object,setup(t,e){let{attrs:n,emit:i,slots:o,expose:r}=e;const a=se(),s=vn(),l=Mn.useInject(),c=L(()=>zo(l.status,t.status)),u=()=>{var z;(z=a.value)===null||z===void 0||z.focus()},d=()=>{var z;(z=a.value)===null||z===void 0||z.blur()},f=z=>{var W;(W=a.value)===null||W===void 0||W.scrollTo(z)},h=L(()=>{const{mode:z}=t;if(z!=="combobox")return z===m2?"combobox":z}),{prefixCls:p,direction:g,renderEmpty:m,size:v,getPrefixCls:b,getPopupContainer:y,disabled:w,select:x}=Me("select",t),{compactSize:$,compactItemClassnames:S}=Ra(p,g),_=L(()=>$.value||v.value),P=Oi(),O=L(()=>{var z;return(z=w.value)!==null&&z!==void 0?z:P.value}),[T,M]=X1(p),I=L(()=>b()),k=L(()=>t.placement!==void 0?t.placement:g.value==="rtl"?"bottomRight":"bottomLeft"),E=L(()=>oi(I.value,b1(k.value),t.transitionName)),R=L(()=>ce({[`${p.value}-lg`]:_.value==="large",[`${p.value}-sm`]:_.value==="small",[`${p.value}-rtl`]:g.value==="rtl",[`${p.value}-borderless`]:!t.bordered,[`${p.value}-in-form-item`]:l.isFormItemInput},ei(p.value,c.value,l.hasFeedback),S.value,M.value)),D=function(){for(var z=arguments.length,W=new Array(z),j=0;j{i("blur",z),s.onFieldBlur()};r({blur:d,focus:u,scrollTo:f});const N=L(()=>h.value==="multiple"||h.value==="tags"),B=L(()=>t.showArrow!==void 0?t.showArrow:t.loading||!(N.value||h.value==="combobox"));return()=>{var z,W,j,U;const{notFoundContent:V,listHeight:q=256,listItemHeight:Y=24,popupClassName:J,dropdownClassName:Q,virtual:G,dropdownMatchSelectWidth:ee,id:X=s.id.value,placeholder:K=(z=o.placeholder)===null||z===void 0?void 0:z.call(o),showArrow:te}=t,{hasFeedback:ue,feedbackIcon:ae}=l;let re;V!==void 0?re=V:o.notFoundContent?re=o.notFoundContent():h.value==="combobox"?re=null:re=(m==null?void 0:m("Select"))||C(Zw,{componentName:"Select"},null);const{suffixIcon:ne,itemIcon:le,removeIcon:he,clearIcon:pe}=O1(A(A({},t),{multiple:N.value,prefixCls:p.value,hasFeedback:ue,feedbackIcon:ae,showArrow:B.value}),o),ge=ht(t,["prefixCls","suffixIcon","itemIcon","removeIcon","clearIcon","size","bordered","status"]),be=ce(J||Q,{[`${p.value}-dropdown-${g.value}`]:g.value==="rtl"},M.value);return T(C(uG,H(H(H({ref:a,virtual:G,dropdownMatchSelectWidth:ee},ge),n),{},{showSearch:(W=t.showSearch)!==null&&W!==void 0?W:(j=x==null?void 0:x.value)===null||j===void 0?void 0:j.showSearch,placeholder:K,listHeight:q,listItemHeight:Y,mode:h.value,prefixCls:p.value,direction:g.value,inputIcon:ne,menuItemSelectedIcon:le,removeIcon:he,clearIcon:pe,notFoundContent:re,class:[R.value,n.class],getPopupContainer:y==null?void 0:y.value,dropdownClassName:be,onChange:D,onBlur:F,id:X,dropdownRender:ge.dropdownRender||o.dropdownRender,transitionName:E.value,children:(U=o.default)===null||U===void 0?void 0:U.call(o),tagRender:t.tagRender||o.tagRender,optionLabelRender:o.optionLabel,maxTagPlaceholder:t.maxTagPlaceholder||o.maxTagPlaceholder,showArrow:ue||te,disabled:O.value}),{option:o.option}))}}});kn.install=function(t){return t.component(kn.name,kn),t.component(kn.Option.displayName,kn.Option),t.component(kn.OptGroup.displayName,kn.OptGroup),t};const cJ=kn.Option,uJ=kn.OptGroup,Sa=()=>null;Sa.isSelectOption=!0;Sa.displayName="AAutoCompleteOption";const Gl=()=>null;Gl.isSelectOptGroup=!0;Gl.displayName="AAutoCompleteOptGroup";function dJ(t){var e,n;return((e=t==null?void 0:t.type)===null||e===void 0?void 0:e.isSelectOption)||((n=t==null?void 0:t.type)===null||n===void 0?void 0:n.isSelectOptGroup)}const fJ=()=>A(A({},ht(km(),["loading","mode","optionLabelProp","labelInValue"])),{dataSource:Array,dropdownMenuStyle:{type:Object,default:void 0},dropdownMatchSelectWidth:{type:[Number,Boolean],default:!0},prefixCls:String,showSearch:{type:Boolean,default:void 0},transitionName:String,choiceTransitionName:{type:String,default:"zoom"},autofocus:{type:Boolean,default:void 0},backfill:{type:Boolean,default:void 0},filterOption:{type:[Boolean,Function],default:!1},defaultActiveFirstOption:{type:Boolean,default:!0},status:String}),hJ=Sa,pJ=Gl,xb=oe({compatConfig:{MODE:3},name:"AAutoComplete",inheritAttrs:!1,props:fJ(),slots:Object,setup(t,e){let{slots:n,attrs:i,expose:o}=e;Gi(!t.dropdownClassName);const r=se(),a=()=>{var u;const d=Dt((u=n.default)===null||u===void 0?void 0:u.call(n));return d.length?d[0]:void 0};o({focus:()=>{var u;(u=r.value)===null||u===void 0||u.focus()},blur:()=>{var u;(u=r.value)===null||u===void 0||u.blur()}});const{prefixCls:c}=Me("select",t);return()=>{var u,d,f;const{size:h,dataSource:p,notFoundContent:g=(u=n.notFoundContent)===null||u===void 0?void 0:u.call(n)}=t;let m;const{class:v}=i,b={[v]:!!v,[`${c.value}-lg`]:h==="large",[`${c.value}-sm`]:h==="small",[`${c.value}-show-search`]:!0,[`${c.value}-auto-complete`]:!0};if(t.options===void 0){const w=((d=n.dataSource)===null||d===void 0?void 0:d.call(n))||((f=n.options)===null||f===void 0?void 0:f.call(n))||[];w.length&&dJ(w[0])?m=w:m=p?p.map(x=>{if(cn(x))return x;switch(typeof x){case"string":return C(Sa,{key:x,value:x},{default:()=>[x]});case"object":return C(Sa,{key:x.value,value:x.value},{default:()=>[x.text]});default:throw new Error("AutoComplete[dataSource] only supports type `string[] | Object[]`.")}}):[]}const y=ht(A(A(A({},t),i),{mode:kn.SECRET_COMBOBOX_MODE_DO_NOT_USE,getInputElement:a,notFoundContent:g,class:b,popupClassName:t.popupClassName||t.dropdownClassName,ref:r}),["dataSource","loading"]);return C(kn,y,H({default:()=>[m]},ht(n,["default","dataSource","options"])))}}}),gJ=A(xb,{Option:Sa,OptGroup:Gl,install(t){return t.component(xb.name,xb),t.component(Sa.displayName,Sa),t.component(Gl.displayName,Gl),t}});var mJ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"};function v2(t){for(var e=1;e({backgroundColor:t,border:`${i.lineWidth}px ${i.lineType} ${e}`,[`${o}-icon`]:{color:n}}),EJ=t=>{const{componentCls:e,motionDurationSlow:n,marginXS:i,marginSM:o,fontSize:r,fontSizeLG:a,lineHeight:s,borderRadiusLG:l,motionEaseInOutCirc:c,alertIconSizeLG:u,colorText:d,paddingContentVerticalSM:f,alertPaddingHorizontal:h,paddingMD:p,paddingContentHorizontalLG:g}=t;return{[e]:A(A({},rt(t)),{position:"relative",display:"flex",alignItems:"center",padding:`${f}px ${h}px`,wordWrap:"break-word",borderRadius:l,[`&${e}-rtl`]:{direction:"rtl"},[`${e}-content`]:{flex:1,minWidth:0},[`${e}-icon`]:{marginInlineEnd:i,lineHeight:0},"&-description":{display:"none",fontSize:r,lineHeight:s},"&-message":{color:d},[`&${e}-motion-leave`]:{overflow:"hidden",opacity:1,transition:`max-height ${n} ${c}, opacity ${n} ${c}, padding-top ${n} ${c}, padding-bottom ${n} ${c}, - margin-bottom ${n} ${c}`},[`&${e}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),[`${e}-with-description`]:{alignItems:"flex-start",paddingInline:g,paddingBlock:p,[`${e}-icon`]:{marginInlineEnd:o,fontSize:u,lineHeight:0},[`${e}-message`]:{display:"block",marginBottom:i,color:d,fontSize:a},[`${e}-description`]:{display:"block"}},[`${e}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}},MJ=t=>{const{componentCls:e,colorSuccess:n,colorSuccessBorder:i,colorSuccessBg:o,colorWarning:r,colorWarningBorder:a,colorWarningBg:s,colorError:l,colorErrorBorder:c,colorErrorBg:u,colorInfo:d,colorInfoBorder:f,colorInfoBg:h}=t;return{[e]:{"&-success":Nf(o,i,n,t,e),"&-info":Nf(h,f,d,t,e),"&-warning":Nf(s,a,r,t,e),"&-error":A(A({},Nf(u,c,l,t,e)),{[`${e}-description > pre`]:{margin:0,padding:0}})}}},IJ=t=>{const{componentCls:e,iconCls:n,motionDurationMid:i,marginXS:o,fontSizeIcon:r,colorIcon:a,colorIconHover:s}=t;return{[e]:{"&-action":{marginInlineStart:o},[`${e}-close-icon`]:{marginInlineStart:o,padding:0,overflow:"hidden",fontSize:r,lineHeight:`${r}px`,backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${n}-close`]:{color:a,transition:`color ${i}`,"&:hover":{color:s}}},"&-close-text":{color:a,transition:`color ${i}`,"&:hover":{color:s}}}}},kJ=t=>[EJ(t),MJ(t),IJ(t)],DJ=et("Alert",t=>{const{fontSizeHeading3:e}=t,n=Ve(t,{alertIconSizeLG:e,alertPaddingHorizontal:12});return[kJ(n)]}),RJ={success:Ho,info:La,error:si,warning:Wo},LJ={success:km,info:Rm,error:Lm,warning:Dm},FJ=Wn("success","info","warning","error"),NJ=()=>({type:Z.oneOf(FJ),closable:{type:Boolean,default:void 0},closeText:Z.any,message:Z.any,description:Z.any,afterClose:Function,showIcon:{type:Boolean,default:void 0},prefixCls:String,banner:{type:Boolean,default:void 0},icon:Z.any,closeIcon:Z.any,onClose:Function}),BJ=oe({compatConfig:{MODE:3},name:"AAlert",inheritAttrs:!1,props:NJ(),setup(t,e){let{slots:n,emit:i,attrs:o,expose:r}=e;const{prefixCls:a,direction:s}=Me("alert",t),[l,c]=DJ(a),u=ie(!1),d=ie(!1),f=ie(),h=v=>{v.preventDefault();const b=f.value;b.style.height=`${b.offsetHeight}px`,b.style.height=`${b.offsetHeight}px`,u.value=!0,i("close",v)},p=()=>{var v;u.value=!1,d.value=!0,(v=t.afterClose)===null||v===void 0||v.call(t)},g=L(()=>{const{type:v}=t;return v!==void 0?v:t.banner?"warning":"info"});r({animationEnd:p});const m=ie({});return()=>{var v,b,y,w,x,$,S,_,P,O;const{banner:T,closeIcon:M=(v=n.closeIcon)===null||v===void 0?void 0:v.call(n)}=t;let{closable:I,showIcon:k}=t;const E=(b=t.closeText)!==null&&b!==void 0?b:(y=n.closeText)===null||y===void 0?void 0:y.call(n),R=(w=t.description)!==null&&w!==void 0?w:(x=n.description)===null||x===void 0?void 0:x.call(n),D=($=t.message)!==null&&$!==void 0?$:(S=n.message)===null||S===void 0?void 0:S.call(n),F=(_=t.icon)!==null&&_!==void 0?_:(P=n.icon)===null||P===void 0?void 0:P.call(n),N=(O=n.action)===null||O===void 0?void 0:O.call(n);k=T&&k===void 0?!0:k;const B=(R?LJ:RJ)[g.value]||null;E&&(I=!0);const z=a.value,W=ce(z,{[`${z}-${g.value}`]:!0,[`${z}-closing`]:u.value,[`${z}-with-description`]:!!R,[`${z}-no-icon`]:!k,[`${z}-banner`]:!!T,[`${z}-closable`]:I,[`${z}-rtl`]:s.value==="rtl",[c.value]:!0}),j=I?C("button",{type:"button",onClick:h,class:`${z}-close-icon`,tabindex:0},[E?C("span",{class:`${z}-close-text`},[E]):M===void 0?C(ai,null,null):M]):null,U=F&&(cn(F)?At(F,{class:`${z}-icon`}):C("span",{class:`${z}-icon`},[F]))||C(B,{class:`${z}-icon`},null),V=yo(`${z}-motion`,{appear:!1,css:!0,onAfterLeave:p,onBeforeLeave:q=>{q.style.maxHeight=`${q.offsetHeight}px`},onLeave:q=>{q.style.maxHeight="0px"}});return l(d.value?null:C(En,V,{default:()=>[ni(C("div",H(H({role:"alert"},o),{},{style:[o.style,m.value],class:[o.class,W],"data-show":!u.value,ref:f}),[k?U:null,C("div",{class:`${z}-content`},[D?C("div",{class:`${z}-message`},[D]):null,R?C("div",{class:`${z}-description`},[R]):null]),N?C("div",{class:`${z}-action`},[N]):null,j]),[[vi,!u.value]])]}))}}}),zJ=Vt(BJ),Tr=["xxxl","xxl","xl","lg","md","sm","xs"],HJ=t=>({xs:`(max-width: ${t.screenXSMax}px)`,sm:`(min-width: ${t.screenSM}px)`,md:`(min-width: ${t.screenMD}px)`,lg:`(min-width: ${t.screenLG}px)`,xl:`(min-width: ${t.screenXL}px)`,xxl:`(min-width: ${t.screenXXL}px)`,xxxl:`{min-width: ${t.screenXXXL}px}`});function Y1(){const[,t]=Xr();return L(()=>{const e=HJ(t.value),n=new Map;let i=-1,o={};return{matchHandlers:{},dispatch(r){return o=r,n.forEach(a=>a(o)),n.size>=1},subscribe(r){return n.size||this.register(),i+=1,n.set(i,r),r(o),i},unsubscribe(r){n.delete(r),n.size||this.unregister()},unregister(){Object.keys(e).forEach(r=>{const a=e[r],s=this.matchHandlers[a];s==null||s.mql.removeListener(s==null?void 0:s.listener)}),n.clear()},register(){Object.keys(e).forEach(r=>{const a=e[r],s=c=>{let{matches:u}=c;this.dispatch(A(A({},o),{[r]:u}))},l=window.matchMedia(a);l.addListener(s),this.matchHandlers[a]={mql:l,listener:s},s(l)})},responsiveMap:e}})}function Mc(){const t=ie({});let e=null;const n=Y1();return Ze(()=>{e=n.value.subscribe(i=>{t.value=i})}),Xn(()=>{n.value.unsubscribe(e)}),t}function Bi(t){const e=ie();return Ke(()=>{e.value=t()},{flush:"sync"}),e}const WJ=t=>{const{antCls:e,componentCls:n,iconCls:i,avatarBg:o,avatarColor:r,containerSize:a,containerSizeLG:s,containerSizeSM:l,textFontSize:c,textFontSizeLG:u,textFontSizeSM:d,borderRadius:f,borderRadiusLG:h,borderRadiusSM:p,lineWidth:g,lineType:m}=t,v=(b,y,w)=>({width:b,height:b,lineHeight:`${b-g*2}px`,borderRadius:"50%",[`&${n}-square`]:{borderRadius:w},[`${n}-string`]:{position:"absolute",left:{_skip_check_:!0,value:"50%"},transformOrigin:"0 center"},[`&${n}-icon`]:{fontSize:y,[`> ${i}`]:{margin:0}}});return{[n]:A(A(A(A({},rt(t)),{position:"relative",display:"inline-block",overflow:"hidden",color:r,whiteSpace:"nowrap",textAlign:"center",verticalAlign:"middle",background:o,border:`${g}px ${m} transparent`,"&-image":{background:"transparent"},[`${e}-image-img`]:{display:"block"}}),v(a,c,f)),{"&-lg":A({},v(s,u,h)),"&-sm":A({},v(l,d,p)),"> img":{display:"block",width:"100%",height:"100%",objectFit:"cover"}})}},jJ=t=>{const{componentCls:e,groupBorderColor:n,groupOverlapping:i,groupSpace:o}=t;return{[`${e}-group`]:{display:"inline-flex",[`${e}`]:{borderColor:n},"> *:not(:first-child)":{marginInlineStart:i}},[`${e}-group-popover`]:{[`${e} + ${e}`]:{marginInlineStart:o}}}},o3=et("Avatar",t=>{const{colorTextLightSolid:e,colorTextPlaceholder:n}=t,i=Ve(t,{avatarBg:n,avatarColor:e});return[WJ(i),jJ(i)]},t=>{const{controlHeight:e,controlHeightLG:n,controlHeightSM:i,fontSize:o,fontSizeLG:r,fontSizeXL:a,fontSizeHeading3:s,marginXS:l,marginXXS:c,colorBorderBg:u}=t;return{containerSize:e,containerSizeLG:n,containerSizeSM:i,textFontSize:Math.round((r+a)/2),textFontSizeLG:s,textFontSizeSM:o,groupSpace:c,groupOverlapping:-l,groupBorderColor:u}}),r3=Symbol("AvatarContextKey"),VJ=()=>qe(r3,{}),XJ=t=>ot(r3,t),YJ=()=>({prefixCls:String,shape:{type:String,default:"circle"},size:{type:[Number,String,Object],default:()=>"default"},src:String,srcset:String,icon:Z.any,alt:String,gap:Number,draggable:{type:Boolean,default:void 0},crossOrigin:String,loadError:{type:Function}}),Ss=oe({compatConfig:{MODE:3},name:"AAvatar",inheritAttrs:!1,props:YJ(),slots:Object,setup(t,e){let{slots:n,attrs:i}=e;const o=ie(!0),r=ie(!1),a=ie(1),s=ie(null),l=ie(null),{prefixCls:c}=Me("avatar",t),[u,d]=o3(c),f=VJ(),h=L(()=>t.size==="default"?f.size:t.size),p=Mc(),g=Bi(()=>{if(typeof t.size!="object")return;const y=Tr.find(x=>p.value[x]);return t.size[y]}),m=y=>g.value?{width:`${g.value}px`,height:`${g.value}px`,lineHeight:`${g.value}px`,fontSize:`${y?g.value/2:18}px`}:{},v=()=>{if(!s.value||!l.value)return;const y=s.value.offsetWidth,w=l.value.offsetWidth;if(y!==0&&w!==0){const{gap:x=4}=t;x*2{const{loadError:y}=t;(y==null?void 0:y())!==!1&&(o.value=!1)};return ye(()=>t.src,()=>{pt(()=>{o.value=!0,a.value=1})}),ye(()=>t.gap,()=>{pt(()=>{v()})}),Ze(()=>{pt(()=>{v(),r.value=!0})}),()=>{var y,w;const{shape:x,src:$,alt:S,srcset:_,draggable:P,crossOrigin:O}=t,T=(y=f.shape)!==null&&y!==void 0?y:x,M=gn(n,t,"icon"),I=c.value,k={[`${i.class}`]:!!i.class,[I]:!0,[`${I}-lg`]:h.value==="large",[`${I}-sm`]:h.value==="small",[`${I}-${T}`]:!0,[`${I}-image`]:$&&o.value,[`${I}-icon`]:M,[d.value]:!0},E=typeof h.value=="number"?{width:`${h.value}px`,height:`${h.value}px`,lineHeight:`${h.value}px`,fontSize:M?`${h.value/2}px`:"18px"}:{},R=(w=n.default)===null||w===void 0?void 0:w.call(n);let D;if($&&o.value)D=C("img",{draggable:P,src:$,srcset:_,onError:b,alt:S,crossorigin:O},null);else if(M)D=M;else if(r.value||a.value!==1){const F=`scale(${a.value}) translateX(-50%)`,N={msTransform:F,WebkitTransform:F,transform:F},B=typeof h.value=="number"?{lineHeight:`${h.value}px`}:{};D=C(mo,{onResize:v},{default:()=>[C("span",{class:`${I}-string`,ref:s,style:A(A({},B),N)},[R])]})}else D=C("span",{class:`${I}-string`,ref:s,style:{opacity:0}},[R]);return u(C("span",H(H({},i),{},{ref:l,class:k,style:[E,m(!!M),i.style]}),[D]))}}}),to={adjustX:1,adjustY:1},no=[0,0],a3={left:{points:["cr","cl"],overflow:to,offset:[-4,0],targetOffset:no},right:{points:["cl","cr"],overflow:to,offset:[4,0],targetOffset:no},top:{points:["bc","tc"],overflow:to,offset:[0,-4],targetOffset:no},bottom:{points:["tc","bc"],overflow:to,offset:[0,4],targetOffset:no},topLeft:{points:["bl","tl"],overflow:to,offset:[0,-4],targetOffset:no},leftTop:{points:["tr","tl"],overflow:to,offset:[-4,0],targetOffset:no},topRight:{points:["br","tr"],overflow:to,offset:[0,-4],targetOffset:no},rightTop:{points:["tl","tr"],overflow:to,offset:[4,0],targetOffset:no},bottomRight:{points:["tr","br"],overflow:to,offset:[0,4],targetOffset:no},rightBottom:{points:["bl","br"],overflow:to,offset:[4,0],targetOffset:no},bottomLeft:{points:["tl","bl"],overflow:to,offset:[0,4],targetOffset:no},leftBottom:{points:["br","bl"],overflow:to,offset:[-4,0],targetOffset:no}},GJ={prefixCls:String,id:String,overlayInnerStyle:Z.any},KJ=oe({compatConfig:{MODE:3},name:"TooltipContent",props:GJ,setup(t,e){let{slots:n}=e;return()=>{var i;return C("div",{class:`${t.prefixCls}-inner`,id:t.id,role:"tooltip",style:t.overlayInnerStyle},[(i=n.overlay)===null||i===void 0?void 0:i.call(n)])}}});var UJ=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{}),overlayStyle:{type:Object,default:void 0},overlayClassName:String,prefixCls:Z.string.def("rc-tooltip"),mouseEnterDelay:Z.number.def(.1),mouseLeaveDelay:Z.number.def(.1),getPopupContainer:Function,destroyTooltipOnHide:{type:Boolean,default:!1},align:Z.object.def(()=>({})),arrowContent:Z.any.def(null),tipId:String,builtinPlacements:Z.object,overlayInnerStyle:{type:Object,default:void 0},popupVisible:{type:Boolean,default:void 0},onVisibleChange:Function,onPopupAlign:Function,arrow:{type:Boolean,default:!0}},setup(t,e){let{slots:n,attrs:i,expose:o}=e;const r=ie(),a=()=>{const{prefixCls:u,tipId:d,overlayInnerStyle:f}=t;return[t.arrow?C("div",{class:`${u}-arrow`,key:"arrow"},[gn(n,t,"arrowContent")]):null,C(KJ,{key:"content",prefixCls:u,id:d,overlayInnerStyle:f},{overlay:n.overlay})]};o({getPopupDomNode:()=>r.value.getPopupDomNode(),triggerDOM:r,forcePopupAlign:()=>{var u;return(u=r.value)===null||u===void 0?void 0:u.forcePopupAlign()}});const l=ie(!1),c=ie(!1);return Ke(()=>{const{destroyTooltipOnHide:u}=t;if(typeof u=="boolean")l.value=u;else if(u&&typeof u=="object"){const{keepParent:d}=u;l.value=d===!0,c.value=d===!1}}),()=>{const{overlayClassName:u,trigger:d,mouseEnterDelay:f,mouseLeaveDelay:h,overlayStyle:p,prefixCls:g,afterVisibleChange:m,transitionName:v,animation:b,placement:y,align:w,destroyTooltipOnHide:x,defaultVisible:$}=t,S=UJ(t,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible"]),_=A({},S);t.visible!==void 0&&(_.popupVisible=t.visible);const P=A(A(A({popupClassName:u,prefixCls:g,action:d,builtinPlacements:a3,popupPlacement:y,popupAlign:w,afterPopupVisibleChange:m,popupTransitionName:v,popupAnimation:b,defaultPopupVisible:$,destroyPopupOnHide:l.value,autoDestroy:c.value,mouseLeaveDelay:h,popupStyle:p,mouseEnterDelay:f},_),i),{onPopupVisibleChange:t.onVisibleChange||$2,onPopupAlign:t.onPopupAlign||$2,ref:r,arrow:!!t.arrow,popup:a()});return C(tl,P,{default:n.default})}}}),G1=()=>({trigger:[String,Array],open:{type:Boolean,default:void 0},visible:{type:Boolean,default:void 0},placement:String,color:String,transitionName:String,overlayStyle:Fe(),overlayInnerStyle:Fe(),overlayClassName:String,openClassName:String,prefixCls:String,mouseEnterDelay:Number,mouseLeaveDelay:Number,getPopupContainer:Function,arrowPointAtCenter:{type:Boolean,default:void 0},arrow:{type:[Boolean,Object],default:!0},autoAdjustOverflow:{type:[Boolean,Object],default:void 0},destroyTooltipOnHide:{type:Boolean,default:void 0},align:Fe(),builtinPlacements:Fe(),children:Array,onVisibleChange:Function,"onUpdate:visible":Function,onOpenChange:Function,"onUpdate:open":Function}),ZJ={adjustX:1,adjustY:1},A2={adjustX:0,adjustY:0},JJ=[0,0];function _2(t){return typeof t=="boolean"?t?ZJ:A2:A(A({},A2),t)}function K1(t){const{arrowWidth:e=4,horizontalArrowShift:n=16,verticalArrowShift:i=8,autoAdjustOverflow:o,arrowPointAtCenter:r}=t,a={left:{points:["cr","cl"],offset:[-4,0]},right:{points:["cl","cr"],offset:[4,0]},top:{points:["bc","tc"],offset:[0,-4]},bottom:{points:["tc","bc"],offset:[0,4]},topLeft:{points:["bl","tc"],offset:[-(n+e),-4]},leftTop:{points:["tr","cl"],offset:[-4,-(i+e)]},topRight:{points:["br","tc"],offset:[n+e,-4]},rightTop:{points:["tl","cr"],offset:[4,-(i+e)]},bottomRight:{points:["tr","bc"],offset:[n+e,4]},rightBottom:{points:["bl","cr"],offset:[4,i+e]},bottomLeft:{points:["tl","bc"],offset:[-(n+e),4]},leftBottom:{points:["br","cl"],offset:[-4,i+e]}};return Object.keys(a).forEach(s=>{a[s]=r?A(A({},a[s]),{overflow:_2(o),targetOffset:JJ}):A(A({},a3[s]),{overflow:_2(o)}),a[s].ignoreShake=!0}),a}function Wp(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];for(let e=0,n=t.length;e`${t}-inverse`),eQ=["success","processing","error","default","warning"];function Fm(t){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[...QJ,...dd].includes(t):dd.includes(t)}function tQ(t){return eQ.includes(t)}function nQ(t,e){const n=Fm(e),i=ce({[`${t}-${e}`]:e&&n}),o={},r={};return e&&!n&&(o.background=e,r["--antd-arrow-background-color"]=e),{className:i,overlayStyle:o,arrowStyle:r}}function Bf(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return t.map(n=>`${e}${n}`).join(",")}const U1=8;function s3(t){const e=U1,{sizePopupArrow:n,contentRadius:i,borderRadiusOuter:o,limitVerticalRadius:r}=t,a=n/2-Math.ceil(o*(Math.sqrt(2)-1)),s=(i>12?i+2:12)-a,l=r?e-a:s;return{dropdownArrowOffset:s,dropdownArrowOffsetVertical:l}}function q1(t,e){const{componentCls:n,sizePopupArrow:i,marginXXS:o,borderRadiusXS:r,borderRadiusOuter:a,boxShadowPopoverArrow:s}=t,{colorBg:l,showArrowCls:c,contentRadius:u=t.borderRadiusLG,limitVerticalRadius:d}=e,{dropdownArrowOffsetVertical:f,dropdownArrowOffset:h}=s3({sizePopupArrow:i,contentRadius:u,borderRadiusOuter:a,limitVerticalRadius:d}),p=i/2+o;return{[n]:{[`${n}-arrow`]:[A(A({position:"absolute",zIndex:1,display:"block"},Kw(i,r,a,l,s)),{"&:before":{background:l}})],[[`&-placement-top ${n}-arrow`,`&-placement-topLeft ${n}-arrow`,`&-placement-topRight ${n}-arrow`].join(",")]:{bottom:0,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},[`&-placement-topLeft ${n}-arrow`]:{left:{_skip_check_:!0,value:h}},[`&-placement-topRight ${n}-arrow`]:{right:{_skip_check_:!0,value:h}},[[`&-placement-bottom ${n}-arrow`,`&-placement-bottomLeft ${n}-arrow`,`&-placement-bottomRight ${n}-arrow`].join(",")]:{top:0,transform:"translateY(-100%)"},[`&-placement-bottom ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},[`&-placement-bottomLeft ${n}-arrow`]:{left:{_skip_check_:!0,value:h}},[`&-placement-bottomRight ${n}-arrow`]:{right:{_skip_check_:!0,value:h}},[[`&-placement-left ${n}-arrow`,`&-placement-leftTop ${n}-arrow`,`&-placement-leftBottom ${n}-arrow`].join(",")]:{right:{_skip_check_:!0,value:0},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop ${n}-arrow`]:{top:f},[`&-placement-leftBottom ${n}-arrow`]:{bottom:f},[[`&-placement-right ${n}-arrow`,`&-placement-rightTop ${n}-arrow`,`&-placement-rightBottom ${n}-arrow`].join(",")]:{left:{_skip_check_:!0,value:0},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop ${n}-arrow`]:{top:f},[`&-placement-rightBottom ${n}-arrow`]:{bottom:f},[Bf(["&-placement-topLeft","&-placement-top","&-placement-topRight"].map(g=>g+=":not(&-arrow-hidden)"),c)]:{paddingBottom:p},[Bf(["&-placement-bottomLeft","&-placement-bottom","&-placement-bottomRight"].map(g=>g+=":not(&-arrow-hidden)"),c)]:{paddingTop:p},[Bf(["&-placement-leftTop","&-placement-left","&-placement-leftBottom"].map(g=>g+=":not(&-arrow-hidden)"),c)]:{paddingRight:{_skip_check_:!0,value:p}},[Bf(["&-placement-rightTop","&-placement-right","&-placement-rightBottom"].map(g=>g+=":not(&-arrow-hidden)"),c)]:{paddingLeft:{_skip_check_:!0,value:p}}}}}const iQ=t=>{const{componentCls:e,tooltipMaxWidth:n,tooltipColor:i,tooltipBg:o,tooltipBorderRadius:r,zIndexPopup:a,controlHeight:s,boxShadowSecondary:l,paddingSM:c,paddingXS:u,tooltipRadiusOuter:d}=t;return[{[e]:A(A(A(A({},rt(t)),{position:"absolute",zIndex:a,display:"block","&":[{width:"max-content"},{width:"intrinsic"}],maxWidth:n,visibility:"visible","&-hidden":{display:"none"},"--antd-arrow-background-color":o,[`${e}-inner`]:{minWidth:s,minHeight:s,padding:`${c/2}px ${u}px`,color:i,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:o,borderRadius:r,boxShadow:l},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${e}-inner`]:{borderRadius:Math.min(r,U1)}},[`${e}-content`]:{position:"relative"}}),Tp(t,(f,h)=>{let{darkColor:p}=h;return{[`&${e}-${f}`]:{[`${e}-inner`]:{backgroundColor:p},[`${e}-arrow`]:{"--antd-arrow-background-color":p}}}})),{"&-rtl":{direction:"rtl"}})},q1(Ve(t,{borderRadiusOuter:d}),{colorBg:"var(--antd-arrow-background-color)",showArrowCls:"",contentRadius:r,limitVerticalRadius:!0}),{[`${e}-pure`]:{position:"relative",maxWidth:"none"}}]},oQ=(t,e)=>et("Tooltip",i=>{if((e==null?void 0:e.value)===!1)return[];const{borderRadius:o,colorTextLightSolid:r,colorBgDefault:a,borderRadiusOuter:s}=i,l=Ve(i,{tooltipMaxWidth:250,tooltipColor:r,tooltipBorderRadius:o,tooltipBg:a,tooltipRadiusOuter:s>4?4:s});return[iQ(l),Oc(i,"zoom-big-fast")]},i=>{let{zIndexPopupBase:o,colorBgSpotlight:r}=i;return{zIndexPopup:o+70,colorBgDefault:r}})(t),rQ=(t,e)=>{const n={},i=A({},t);return e.forEach(o=>{t&&o in t&&(n[o]=t[o],delete i[o])}),{picked:n,omitted:i}},l3=()=>A(A({},G1()),{title:Z.any}),c3=()=>({trigger:"hover",align:{},placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0}),aQ=oe({compatConfig:{MODE:3},name:"ATooltip",inheritAttrs:!1,props:ct(l3(),{trigger:"hover",align:{},placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0}),slots:Object,setup(t,e){let{slots:n,emit:i,attrs:o,expose:r}=e;const{prefixCls:a,getPopupContainer:s,direction:l,rootPrefixCls:c}=Me("tooltip",t),u=L(()=>{var O;return(O=t.open)!==null&&O!==void 0?O:t.visible}),d=se(Wp([t.open,t.visible])),f=se();let h;ye(u,O=>{lt.cancel(h),h=lt(()=>{d.value=!!O})});const p=()=>{var O;const T=(O=t.title)!==null&&O!==void 0?O:n.title;return!T&&T!==0},g=O=>{const T=p();u.value===void 0&&(d.value=T?!1:O),T||(i("update:visible",O),i("visibleChange",O),i("update:open",O),i("openChange",O))};r({getPopupDomNode:()=>f.value.getPopupDomNode(),open:d,forcePopupAlign:()=>{var O;return(O=f.value)===null||O===void 0?void 0:O.forcePopupAlign()}});const v=L(()=>{var O;const{builtinPlacements:T,autoAdjustOverflow:M,arrow:I,arrowPointAtCenter:k}=t;let E=k;return typeof I=="object"&&(E=(O=I.pointAtCenter)!==null&&O!==void 0?O:k),T||K1({arrowPointAtCenter:E,autoAdjustOverflow:M})}),b=O=>O||O==="",y=O=>{const T=O.type;if(typeof T=="object"&&O.props&&((T.__ANT_BUTTON===!0||T==="button")&&b(O.props.disabled)||T.__ANT_SWITCH===!0&&(b(O.props.disabled)||b(O.props.loading))||T.__ANT_RADIO===!0&&b(O.props.disabled))){const{picked:M,omitted:I}=rQ(Hk(O),["position","left","right","top","bottom","float","display","zIndex"]),k=A(A({display:"inline-block"},M),{cursor:"not-allowed",lineHeight:1,width:O.props&&O.props.block?"100%":void 0}),E=A(A({},I),{pointerEvents:"none"}),R=At(O,{style:E},!0);return C("span",{style:k,class:`${a.value}-disabled-compatible-wrapper`},[R])}return O},w=()=>{var O,T;return(O=t.title)!==null&&O!==void 0?O:(T=n.title)===null||T===void 0?void 0:T.call(n)},x=(O,T)=>{const M=v.value,I=Object.keys(M).find(k=>{var E,R;return M[k].points[0]===((E=T.points)===null||E===void 0?void 0:E[0])&&M[k].points[1]===((R=T.points)===null||R===void 0?void 0:R[1])});if(I){const k=O.getBoundingClientRect(),E={top:"50%",left:"50%"};I.indexOf("top")>=0||I.indexOf("Bottom")>=0?E.top=`${k.height-T.offset[1]}px`:(I.indexOf("Top")>=0||I.indexOf("bottom")>=0)&&(E.top=`${-T.offset[1]}px`),I.indexOf("left")>=0||I.indexOf("Right")>=0?E.left=`${k.width-T.offset[0]}px`:(I.indexOf("right")>=0||I.indexOf("Left")>=0)&&(E.left=`${-T.offset[0]}px`),O.style.transformOrigin=`${E.left} ${E.top}`}},$=L(()=>nQ(a.value,t.color)),S=L(()=>o["data-popover-inject"]),[_,P]=oQ(a,L(()=>!S.value));return()=>{var O,T;const{openClassName:M,overlayClassName:I,overlayStyle:k,overlayInnerStyle:E}=t;let R=(T=Kt((O=n.default)===null||O===void 0?void 0:O.call(n)))!==null&&T!==void 0?T:null;R=R.length===1?R[0]:R;let D=d.value;if(u.value===void 0&&p()&&(D=!1),!R)return null;const F=y(cn(R)&&!o7(R)?R:C("span",null,[R])),N=ce({[M||`${a.value}-open`]:!0,[F.props&&F.props.class]:F.props&&F.props.class}),B=ce(I,{[`${a.value}-rtl`]:l.value==="rtl"},$.value.className,P.value),z=A(A({},$.value.overlayStyle),E),W=$.value.arrowStyle,j=A(A(A({},o),t),{prefixCls:a.value,arrow:!!t.arrow,getPopupContainer:s==null?void 0:s.value,builtinPlacements:v.value,visible:D,ref:f,overlayClassName:B,overlayStyle:A(A({},W),k),overlayInnerStyle:z,onVisibleChange:g,onPopupAlign:x,transitionName:oi(c.value,"zoom-big-fast",t.transitionName)});return _(C(qJ,j,{default:()=>[d.value?At(F,{class:N}):F],arrowContent:()=>C("span",{class:`${a.value}-arrow-content`},null),overlay:w}))}}}),Pi=Vt(aQ),sQ=t=>{const{componentCls:e,popoverBg:n,popoverColor:i,width:o,fontWeightStrong:r,popoverPadding:a,boxShadowSecondary:s,colorTextHeading:l,borderRadiusLG:c,zIndexPopup:u,marginXS:d,colorBgElevated:f}=t;return[{[e]:A(A({},rt(t)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:u,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--antd-arrow-background-color":f,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${e}-content`]:{position:"relative"},[`${e}-inner`]:{backgroundColor:n,backgroundClip:"padding-box",borderRadius:c,boxShadow:s,padding:a},[`${e}-title`]:{minWidth:o,marginBottom:d,color:l,fontWeight:r},[`${e}-inner-content`]:{color:i}})},q1(t,{colorBg:"var(--antd-arrow-background-color)"}),{[`${e}-pure`]:{position:"relative",maxWidth:"none",[`${e}-content`]:{display:"inline-block"}}}]},lQ=t=>{const{componentCls:e}=t;return{[e]:dd.map(n=>{const i=t[`${n}-6`];return{[`&${e}-${n}`]:{"--antd-arrow-background-color":i,[`${e}-inner`]:{backgroundColor:i},[`${e}-arrow`]:{background:"transparent"}}}})}},cQ=t=>{const{componentCls:e,lineWidth:n,lineType:i,colorSplit:o,paddingSM:r,controlHeight:a,fontSize:s,lineHeight:l,padding:c}=t,u=a-Math.round(s*l),d=u/2,f=u/2-n,h=c;return{[e]:{[`${e}-inner`]:{padding:0},[`${e}-title`]:{margin:0,padding:`${d}px ${h}px ${f}px`,borderBottom:`${n}px ${i} ${o}`},[`${e}-inner-content`]:{padding:`${r}px ${h}px`}}}},uQ=et("Popover",t=>{const{colorBgElevated:e,colorText:n,wireframe:i}=t,o=Ve(t,{popoverBg:e,popoverColor:n,popoverPadding:12});return[sQ(o),lQ(o),i&&cQ(o),Oc(o,"zoom-big")]},t=>{let{zIndexPopupBase:e}=t;return{zIndexPopup:e+30,width:177}}),dQ=()=>A(A({},G1()),{content:Rt(),title:Rt()}),fQ=oe({compatConfig:{MODE:3},name:"APopover",inheritAttrs:!1,props:ct(dQ(),A(A({},c3()),{trigger:"hover",placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1})),setup(t,e){let{expose:n,slots:i,attrs:o}=e;const r=se();Gi(t.visible===void 0),n({getPopupDomNode:()=>{var f,h;return(h=(f=r.value)===null||f===void 0?void 0:f.getPopupDomNode)===null||h===void 0?void 0:h.call(f)}});const{prefixCls:a,configProvider:s}=Me("popover",t),[l,c]=uQ(a),u=L(()=>s.getPrefixCls()),d=()=>{var f,h;const{title:p=Kt((f=i.title)===null||f===void 0?void 0:f.call(i)),content:g=Kt((h=i.content)===null||h===void 0?void 0:h.call(i))}=t,m=!!(Array.isArray(p)?p.length:p),v=!!(Array.isArray(g)?g.length:p);return!m&&!v?null:C(Qe,null,[m&&C("div",{class:`${a.value}-title`},[p]),C("div",{class:`${a.value}-inner-content`},[g])])};return()=>{const f=ce(t.overlayClassName,c.value);return l(C(Pi,H(H(H({},ht(t,["title","content"])),o),{},{prefixCls:a.value,ref:r,overlayClassName:f,transitionName:oi(u.value,"zoom-big",t.transitionName),"data-popover-inject":!0}),{title:d,default:i.default}))}}}),Z1=Vt(fQ),hQ=()=>({prefixCls:String,maxCount:Number,maxStyle:{type:Object,default:void 0},maxPopoverPlacement:{type:String,default:"top"},maxPopoverTrigger:String,size:{type:[Number,String,Object],default:"default"},shape:{type:String,default:"circle"}}),jp=oe({compatConfig:{MODE:3},name:"AAvatarGroup",inheritAttrs:!1,props:hQ(),setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,direction:r}=Me("avatar",t),a=L(()=>`${o.value}-group`),[s,l]=o3(o);return Ke(()=>{const c={size:t.size,shape:t.shape};XJ(c)}),()=>{const{maxPopoverPlacement:c="top",maxCount:u,maxStyle:d,maxPopoverTrigger:f="hover",shape:h}=t,p={[a.value]:!0,[`${a.value}-rtl`]:r.value==="rtl",[`${i.class}`]:!!i.class,[l.value]:!0},g=gn(n,t),m=Dt(g).map((b,y)=>At(b,{key:`avatar-key-${y}`})),v=m.length;if(u&&u[C(Ss,{style:d,shape:h},{default:()=>[`+${v-u}`]})]})),s(C("div",H(H({},i),{},{class:p,style:i.style}),[b]))}return s(C("div",H(H({},i),{},{class:p,style:i.style}),[m]))}}});Ss.Group=jp;Ss.install=function(t){return t.component(Ss.name,Ss),t.component(jp.name,jp),t};function P2(t){let{prefixCls:e,value:n,current:i,offset:o=0}=t,r;return o&&(r={position:"absolute",top:`${o}00%`,left:0}),C("p",{style:r,class:ce(`${e}-only-unit`,{current:i})},[n])}function pQ(t,e,n){let i=t,o=0;for(;(i+10)%10!==e;)i+=n,o+=n;return o}const gQ=oe({compatConfig:{MODE:3},name:"SingleNumber",props:{prefixCls:String,value:String,count:Number},setup(t){const e=L(()=>Number(t.value)),n=L(()=>Math.abs(t.count)),i=$t({prevValue:e.value,prevCount:n.value}),o=()=>{i.prevValue=e.value,i.prevCount=n.value},r=se();return ye(e,()=>{clearTimeout(r.value),r.value=setTimeout(()=>{o()},1e3)},{flush:"post"}),Xn(()=>{clearTimeout(r.value)}),()=>{let a,s={};const l=e.value;if(i.prevValue===l||Number.isNaN(l)||Number.isNaN(i.prevValue))a=[P2(A(A({},t),{current:!0}))],s={transition:"none"};else{a=[];const c=l+10,u=[];for(let h=l;h<=c;h+=1)u.push(h);const d=u.findIndex(h=>h%10===i.prevValue);a=u.map((h,p)=>{const g=h%10;return P2(A(A({},t),{value:g,offset:p-d,current:p===d}))});const f=i.prevCounto()},[a])}}});var mQ=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{var r;const a=A(A({},t),n),{prefixCls:s,count:l,title:c,show:u,component:d="sup",class:f,style:h}=a,p=mQ(a,["prefixCls","count","title","show","component","class","style"]),g=A(A({},p),{style:h,"data-show":t.show,class:ce(o.value,f),title:c});let m=l;if(l&&Number(l)%1===0){const b=String(l).split("");m=b.map((y,w)=>C(gQ,{prefixCls:o.value,count:Number(l),value:y,key:b.length-w},null))}h&&h.borderColor&&(g.style=A(A({},h),{boxShadow:`0 0 0 1px ${h.borderColor} inset`}));const v=Kt((r=i.default)===null||r===void 0?void 0:r.call(i));return v&&v.length?At(v,{class:ce(`${o.value}-custom-component`)},!1):C(d,g,{default:()=>[m]})}}}),yQ=new mt("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),xQ=new mt("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),wQ=new mt("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),SQ=new mt("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),CQ=new mt("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),$Q=new mt("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),AQ=t=>{const{componentCls:e,iconCls:n,antCls:i,badgeFontHeight:o,badgeShadowSize:r,badgeHeightSm:a,motionDurationSlow:s,badgeStatusSize:l,marginXS:c,badgeRibbonOffset:u}=t,d=`${i}-scroll-number`,f=`${i}-ribbon`,h=`${i}-ribbon-wrapper`,p=Tp(t,(m,v)=>{let{darkColor:b}=v;return{[`&${e} ${e}-color-${m}`]:{background:b,[`&:not(${e}-count)`]:{color:b}}}}),g=Tp(t,(m,v)=>{let{darkColor:b}=v;return{[`&${f}-color-${m}`]:{background:b,color:b}}});return{[e]:A(A(A(A({},rt(t)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${e}-count`]:{zIndex:t.badgeZIndex,minWidth:t.badgeHeight,height:t.badgeHeight,color:t.badgeTextColor,fontWeight:t.badgeFontWeight,fontSize:t.badgeFontSize,lineHeight:`${t.badgeHeight}px`,whiteSpace:"nowrap",textAlign:"center",background:t.badgeColor,borderRadius:t.badgeHeight/2,boxShadow:`0 0 0 ${r}px ${t.badgeShadowColor}`,transition:`background ${t.motionDurationMid}`,a:{color:t.badgeTextColor},"a:hover":{color:t.badgeTextColor},"a:hover &":{background:t.badgeColorHover}},[`${e}-count-sm`]:{minWidth:a,height:a,fontSize:t.badgeFontSizeSm,lineHeight:`${a}px`,borderRadius:a/2},[`${e}-multiple-words`]:{padding:`0 ${t.paddingXS}px`},[`${e}-dot`]:{zIndex:t.badgeZIndex,width:t.badgeDotSize,minWidth:t.badgeDotSize,height:t.badgeDotSize,background:t.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${r}px ${t.badgeShadowColor}`},[`${e}-dot${d}`]:{transition:`background ${s}`},[`${e}-count, ${e}-dot, ${d}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${n}-spin`]:{animationName:$Q,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${e}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${e}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:l,height:l,verticalAlign:"middle",borderRadius:"50%"},[`${e}-status-success`]:{backgroundColor:t.colorSuccess},[`${e}-status-processing`]:{overflow:"visible",color:t.colorPrimary,backgroundColor:t.colorPrimary,"&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:r,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:yQ,animationDuration:t.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${e}-status-default`]:{backgroundColor:t.colorTextPlaceholder},[`${e}-status-error`]:{backgroundColor:t.colorError},[`${e}-status-warning`]:{backgroundColor:t.colorWarning},[`${e}-status-text`]:{marginInlineStart:c,color:t.colorText,fontSize:t.fontSize}}}),p),{[`${e}-zoom-appear, ${e}-zoom-enter`]:{animationName:xQ,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`${e}-zoom-leave`]:{animationName:wQ,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`&${e}-not-a-wrapper`]:{[`${e}-zoom-appear, ${e}-zoom-enter`]:{animationName:SQ,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`${e}-zoom-leave`]:{animationName:CQ,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`&:not(${e}-status)`]:{verticalAlign:"middle"},[`${d}-custom-component, ${e}-count`]:{transform:"none"},[`${d}-custom-component, ${d}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[`${d}`]:{overflow:"hidden",[`${d}-only`]:{position:"relative",display:"inline-block",height:t.badgeHeight,transition:`all ${t.motionDurationSlow} ${t.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${d}-only-unit`]:{height:t.badgeHeight,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${d}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${e}-count, ${e}-dot, ${d}-custom-component`]:{transform:"translate(-50%, -50%)"}}}),[`${h}`]:{position:"relative"},[`${f}`]:A(A(A(A({},rt(t)),{position:"absolute",top:c,padding:`0 ${t.paddingXS}px`,color:t.colorPrimary,lineHeight:`${o}px`,whiteSpace:"nowrap",backgroundColor:t.colorPrimary,borderRadius:t.borderRadiusSM,[`${f}-text`]:{color:t.colorTextLightSolid},[`${f}-corner`]:{position:"absolute",top:"100%",width:u,height:u,color:"currentcolor",border:`${u/2}px solid`,transform:t.badgeRibbonCornerTransform,transformOrigin:"top",filter:t.badgeRibbonCornerFilter}}),g),{[`&${f}-placement-end`]:{insetInlineEnd:-u,borderEndEndRadius:0,[`${f}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${f}-placement-start`]:{insetInlineStart:-u,borderEndStartRadius:0,[`${f}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}},u3=et("Badge",t=>{const{fontSize:e,lineHeight:n,fontSizeSM:i,lineWidth:o,marginXS:r,colorBorderBg:a}=t,s=Math.round(e*n),l=o,c="auto",u=s-2*l,d=t.colorBgContainer,f="normal",h=i,p=t.colorError,g=t.colorErrorHover,m=e,v=i/2,b=i,y=i/2,w=Ve(t,{badgeFontHeight:s,badgeShadowSize:l,badgeZIndex:c,badgeHeight:u,badgeTextColor:d,badgeFontWeight:f,badgeFontSize:h,badgeColor:p,badgeColorHover:g,badgeShadowColor:a,badgeHeightSm:m,badgeDotSize:v,badgeFontSizeSm:b,badgeStatusSize:y,badgeProcessingDuration:"1.2s",badgeRibbonOffset:r,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"});return[AQ(w)]});var _Q=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o({prefix:String,color:{type:String},text:Z.any,placement:{type:String,default:"end"}}),Vp=oe({compatConfig:{MODE:3},name:"ABadgeRibbon",inheritAttrs:!1,props:PQ(),slots:Object,setup(t,e){let{attrs:n,slots:i}=e;const{prefixCls:o,direction:r}=Me("ribbon",t),[a,s]=u3(o),l=L(()=>Fm(t.color,!1)),c=L(()=>[o.value,`${o.value}-placement-${t.placement}`,{[`${o.value}-rtl`]:r.value==="rtl",[`${o.value}-color-${t.color}`]:l.value}]);return()=>{var u,d;const{class:f,style:h}=n,p=_Q(n,["class","style"]),g={},m={};return t.color&&!l.value&&(g.background=t.color,m.color=t.color),a(C("div",H({class:`${o.value}-wrapper ${s.value}`},p),[(u=i.default)===null||u===void 0?void 0:u.call(i),C("div",{class:[c.value,f,s.value],style:A(A({},g),h)},[C("span",{class:`${o.value}-text`},[t.text||((d=i.text)===null||d===void 0?void 0:d.call(i))]),C("div",{class:`${o.value}-corner`,style:m},null)])]))}}}),Xp=t=>!isNaN(parseFloat(t))&&isFinite(t),TQ=()=>({count:Z.any.def(null),showZero:{type:Boolean,default:void 0},overflowCount:{type:Number,default:99},dot:{type:Boolean,default:void 0},prefixCls:String,scrollNumberPrefixCls:String,status:{type:String},size:{type:String,default:"default"},color:String,text:Z.any,offset:Array,numberStyle:{type:Object,default:void 0},title:String}),Lu=oe({compatConfig:{MODE:3},name:"ABadge",Ribbon:Vp,inheritAttrs:!1,props:TQ(),slots:Object,setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,direction:r}=Me("badge",t),[a,s]=u3(o),l=L(()=>t.count>t.overflowCount?`${t.overflowCount}+`:t.count),c=L(()=>l.value==="0"||l.value===0),u=L(()=>t.count===null||c.value&&!t.showZero),d=L(()=>(t.status!==null&&t.status!==void 0||t.color!==null&&t.color!==void 0)&&u.value),f=L(()=>t.dot&&!c.value),h=L(()=>f.value?"":l.value),p=L(()=>(h.value===null||h.value===void 0||h.value===""||c.value&&!t.showZero)&&!f.value),g=se(t.count),m=se(h.value),v=se(f.value);ye([()=>t.count,h,f],()=>{p.value||(g.value=t.count,m.value=h.value,v.value=f.value)},{immediate:!0});const b=L(()=>Fm(t.color,!1)),y=L(()=>({[`${o.value}-status-dot`]:d.value,[`${o.value}-status-${t.status}`]:!!t.status,[`${o.value}-color-${t.color}`]:b.value})),w=L(()=>t.color&&!b.value?{background:t.color,color:t.color}:{}),x=L(()=>({[`${o.value}-dot`]:v.value,[`${o.value}-count`]:!v.value,[`${o.value}-count-sm`]:t.size==="small",[`${o.value}-multiple-words`]:!v.value&&m.value&&m.value.toString().length>1,[`${o.value}-status-${t.status}`]:!!t.status,[`${o.value}-color-${t.color}`]:b.value}));return()=>{var $,S;const{offset:_,title:P,color:O}=t,T=i.style,M=gn(n,t,"text"),I=o.value,k=g.value;let E=Dt(($=n.default)===null||$===void 0?void 0:$.call(n));E=E.length?E:null;const R=!!(!p.value||n.count),D=(()=>{if(!_)return A({},T);const U={marginTop:Xp(_[1])?`${_[1]}px`:_[1]};return r.value==="rtl"?U.left=`${parseInt(_[0],10)}px`:U.right=`${-parseInt(_[0],10)}px`,A(A({},U),T)})(),F=P??(typeof k=="string"||typeof k=="number"?k:void 0),N=R||!M?null:C("span",{class:`${I}-status-text`},[M]),B=typeof k=="object"||k===void 0&&n.count?At(k??((S=n.count)===null||S===void 0?void 0:S.call(n)),{style:D},!1):null,z=ce(I,{[`${I}-status`]:d.value,[`${I}-not-a-wrapper`]:!E,[`${I}-rtl`]:r.value==="rtl"},i.class,s.value);if(!E&&d.value){const U=D.color;return a(C("span",H(H({},i),{},{class:z,style:D}),[C("span",{class:y.value,style:w.value},null),C("span",{style:{color:U},class:`${I}-status-text`},[M])]))}const W=yo(E?`${I}-zoom`:"",{appear:!1});let j=A(A({},D),t.numberStyle);return O&&!b.value&&(j=j||{},j.background=O),a(C("span",H(H({},i),{},{class:z}),[E,C(En,W,{default:()=>[ni(C(bQ,{prefixCls:t.scrollNumberPrefixCls,show:R,class:x.value,count:m.value,title:F,style:j,key:"scrollNumber"},{default:()=>[B]}),[[vi,R]])]}),N]))}}});Lu.install=function(t){return t.component(Lu.name,Lu),t.component(Vp.name,Vp),t};const hl={adjustX:1,adjustY:1},pl=[0,0],OQ={topLeft:{points:["bl","tl"],overflow:hl,offset:[0,-4],targetOffset:pl},topCenter:{points:["bc","tc"],overflow:hl,offset:[0,-4],targetOffset:pl},topRight:{points:["br","tr"],overflow:hl,offset:[0,-4],targetOffset:pl},bottomLeft:{points:["tl","bl"],overflow:hl,offset:[0,4],targetOffset:pl},bottomCenter:{points:["tc","bc"],overflow:hl,offset:[0,4],targetOffset:pl},bottomRight:{points:["tr","br"],overflow:hl,offset:[0,4],targetOffset:pl}};var EQ=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);ot.visible,h=>{h!==void 0&&(r.value=h)});const a=se();o({triggerRef:a});const s=h=>{t.visible===void 0&&(r.value=!1),i("overlayClick",h)},l=h=>{t.visible===void 0&&(r.value=h),i("visibleChange",h)},c=()=>{var h;const p=(h=n.overlay)===null||h===void 0?void 0:h.call(n),g={prefixCls:`${t.prefixCls}-menu`,onClick:s};return C(Qe,{key:Nk},[t.arrow&&C("div",{class:`${t.prefixCls}-arrow`},null),At(p,g,!1)])},u=L(()=>{const{minOverlayWidthMatchTrigger:h=!t.alignPoint}=t;return h}),d=()=>{var h;const p=(h=n.default)===null||h===void 0?void 0:h.call(n);return r.value&&p?At(p[0],{class:t.openClassName||`${t.prefixCls}-open`},!1):p},f=L(()=>!t.hideAction&&t.trigger.indexOf("contextmenu")!==-1?["click"]:t.hideAction);return()=>{const{prefixCls:h,arrow:p,showAction:g,overlayStyle:m,trigger:v,placement:b,align:y,getPopupContainer:w,transitionName:x,animation:$,overlayClassName:S}=t,_=EQ(t,["prefixCls","arrow","showAction","overlayStyle","trigger","placement","align","getPopupContainer","transitionName","animation","overlayClassName"]);return C(tl,H(H({},_),{},{prefixCls:h,ref:a,popupClassName:ce(S,{[`${h}-show-arrow`]:p}),popupStyle:m,builtinPlacements:OQ,action:v,showAction:g,hideAction:f.value||[],popupPlacement:b,popupAlign:y,popupTransitionName:x,popupAnimation:$,popupVisible:r.value,stretch:u.value?"minWidth":"",onPopupVisibleChange:l,getPopupContainer:w}),{popup:c,default:d})}}}),MQ=t=>{const{componentCls:e,colorPrimary:n}=t;return{[e]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${n})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${t.motionEaseOutCirc}`,`opacity 2s ${t.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0}}}}},IQ=et("Wave",t=>[MQ(t)]);function kQ(t){const e=(t||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);return e&&e[1]&&e[2]&&e[3]?!(e[1]===e[2]&&e[2]===e[3]):!0}function wb(t){return t&&t!=="#fff"&&t!=="#ffffff"&&t!=="rgb(255, 255, 255)"&&t!=="rgba(255, 255, 255, 1)"&&kQ(t)&&!/rgba\((?:\d*, ){3}0\)/.test(t)&&t!=="transparent"}function DQ(t){const{borderTopColor:e,borderColor:n,backgroundColor:i}=getComputedStyle(t);return wb(e)?e:wb(n)?n:wb(i)?i:null}function Sb(t){return Number.isNaN(t)?0:t}const RQ=oe({props:{target:Fe(),className:String},setup(t){const e=ie(null),[n,i]=Mt(null),[o,r]=Mt([]),[a,s]=Mt(0),[l,c]=Mt(0),[u,d]=Mt(0),[f,h]=Mt(0),[p,g]=Mt(!1);function m(){const{target:S}=t,_=getComputedStyle(S);i(DQ(S));const P=_.position==="static",{borderLeftWidth:O,borderTopWidth:T}=_;s(P?S.offsetLeft:Sb(-parseFloat(O))),c(P?S.offsetTop:Sb(-parseFloat(T))),d(S.offsetWidth),h(S.offsetHeight);const{borderTopLeftRadius:M,borderTopRightRadius:I,borderBottomLeftRadius:k,borderBottomRightRadius:E}=_;r([M,I,E,k].map(R=>Sb(parseFloat(R))))}let v,b,y;const w=()=>{clearTimeout(y),lt.cancel(b),v==null||v.disconnect()},x=()=>{var S;const _=(S=e.value)===null||S===void 0?void 0:S.parentElement;_&&(Pa(null,_),_.parentElement&&_.parentElement.removeChild(_))};Ze(()=>{w(),y=setTimeout(()=>{x()},5e3);const{target:S}=t;S&&(b=lt(()=>{m(),g(!0)}),typeof ResizeObserver<"u"&&(v=new ResizeObserver(m),v.observe(S)))}),at(()=>{w()});const $=S=>{S.propertyName==="opacity"&&x()};return()=>{if(!p.value)return null;const S={left:`${a.value}px`,top:`${l.value}px`,width:`${u.value}px`,height:`${f.value}px`,borderRadius:o.value.map(_=>`${_}px`).join(" ")};return n&&(S["--wave-color"]=n.value),C(En,{appear:!0,name:"wave-motion",appearFromClass:"wave-motion-appear",appearActiveClass:"wave-motion-appear",appearToClass:"wave-motion-appear wave-motion-appear-active"},{default:()=>[C("div",{ref:e,class:t.className,style:S,onTransitionend:$},null)]})}}});function LQ(t,e){const n=document.createElement("div");return n.style.position="absolute",n.style.left="0px",n.style.top="0px",t==null||t.insertBefore(n,t==null?void 0:t.firstChild),Pa(C(RQ,{target:t,className:e},null),n),()=>{Pa(null,n),n.parentElement&&n.parentElement.removeChild(n)}}function FQ(t,e){const n=Cn();let i;function o(){var r;const a=gi(n);i==null||i(),!(!((r=e==null?void 0:e.value)===null||r===void 0)&&r.disabled||!a)&&(i=LQ(a,t.value))}return at(()=>{i==null||i()}),o}const J1=oe({compatConfig:{MODE:3},name:"Wave",props:{disabled:Boolean},setup(t,e){let{slots:n}=e;const i=Cn(),{prefixCls:o,wave:r}=Me("wave",t),[,a]=IQ(o),s=FQ(L(()=>ce(o.value,a.value)),r);let l;const c=()=>{gi(i).removeEventListener("click",l,!0)};return Ze(()=>{ye(()=>t.disabled,()=>{c(),pt(()=>{const u=gi(i);u==null||u.removeEventListener("click",l,!0),!(!u||u.nodeType!==1||t.disabled)&&(l=d=>{d.target.tagName==="INPUT"||!gm(d.target)||!u.getAttribute||u.getAttribute("disabled")||u.disabled||u.className.includes("disabled")||u.className.includes("-leave")||s()},u.addEventListener("click",l,!0))})},{immediate:!0,flush:"post"})}),at(()=>{c()}),()=>{var u;return(u=n.default)===null||u===void 0?void 0:u.call(n)[0]}}});function Yp(t){return t==="danger"?{danger:!0}:{type:t}}const f3=()=>({prefixCls:String,type:String,htmlType:{type:String,default:"button"},shape:{type:String},size:{type:String},loading:{type:[Boolean,Object],default:()=>!1},disabled:{type:Boolean,default:void 0},ghost:{type:Boolean,default:void 0},block:{type:Boolean,default:void 0},danger:{type:Boolean,default:void 0},icon:Z.any,href:String,target:String,title:String,onClick:Ms(),onMousedown:Ms()}),T2=t=>{t&&(t.style.width="0px",t.style.opacity="0",t.style.transform="scale(0)")},O2=t=>{pt(()=>{t&&(t.style.width=`${t.scrollWidth}px`,t.style.opacity="1",t.style.transform="scale(1)")})},E2=t=>{t&&t.style&&(t.style.width=null,t.style.opacity=null,t.style.transform=null)},NQ=oe({compatConfig:{MODE:3},name:"LoadingIcon",props:{prefixCls:String,loading:[Boolean,Object],existIcon:Boolean},setup(t){return()=>{const{existIcon:e,prefixCls:n,loading:i}=t;if(e)return C("span",{class:`${n}-loading-icon`},[C(yi,null,null)]);const o=!!i;return C(En,{name:`${n}-loading-icon-motion`,onBeforeEnter:T2,onEnter:O2,onAfterEnter:E2,onBeforeLeave:O2,onLeave:r=>{setTimeout(()=>{T2(r)})},onAfterLeave:E2},{default:()=>[o?C("span",{class:`${n}-loading-icon`},[C(yi,null,null)]):null]})}}}),M2=(t,e)=>({[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{"&:not(:disabled)":{borderInlineEndColor:e}}},"&:not(:first-child)":{[`&, & > ${t}`]:{"&:not(:disabled)":{borderInlineStartColor:e}}}}}),BQ=t=>{const{componentCls:e,fontSize:n,lineWidth:i,colorPrimaryHover:o,colorErrorHover:r}=t;return{[`${e}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:-i,[`&, & > ${e}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[e]:{position:"relative",zIndex:1,"&:hover,\n &:focus,\n &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${e}-icon-only`]:{fontSize:n}},M2(`${e}-primary`,o),M2(`${e}-danger`,r)]}};function zQ(t,e){return{[`&-item:not(${e}-last-item)`]:{marginBottom:-t.lineWidth},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}}function HQ(t,e){return{[`&-item:not(${e}-first-item):not(${e}-last-item)`]:{borderRadius:0},[`&-item${e}-first-item:not(${e}-last-item)`]:{[`&, &${t}-sm, &${t}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${e}-last-item:not(${e}-first-item)`]:{[`&, &${t}-sm, &${t}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function WQ(t){const e=`${t.componentCls}-compact-vertical`;return{[e]:A(A({},zQ(t,e)),HQ(t.componentCls,e))}}const jQ=t=>{const{componentCls:e,iconCls:n}=t;return{[e]:{outline:"none",position:"relative",display:"inline-block",fontWeight:400,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",backgroundColor:"transparent",border:`${t.lineWidth}px ${t.lineType} transparent`,cursor:"pointer",transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",lineHeight:t.lineHeight,color:t.colorText,"> span":{display:"inline-block"},[`> ${n} + span, > span + ${n}`]:{marginInlineStart:t.marginXS},"> a":{color:"currentColor"},"&:not(:disabled)":A({},Hr(t)),[`&-icon-only${e}-compact-item`]:{flex:"none"},[`&-compact-item${e}-primary`]:{[`&:not([disabled]) + ${e}-compact-item${e}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:-t.lineWidth,insetInlineStart:-t.lineWidth,display:"inline-block",width:t.lineWidth,height:`calc(100% + ${t.lineWidth*2}px)`,backgroundColor:t.colorPrimaryHover,content:'""'}}},"&-compact-vertical-item":{[`&${e}-primary`]:{[`&:not([disabled]) + ${e}-compact-vertical-item${e}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:-t.lineWidth,insetInlineStart:-t.lineWidth,display:"inline-block",width:`calc(100% + ${t.lineWidth*2}px)`,height:t.lineWidth,backgroundColor:t.colorPrimaryHover,content:'""'}}}}}}},Wr=(t,e)=>({"&:not(:disabled)":{"&:hover":t,"&:active":e}}),VQ=t=>({minWidth:t.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),XQ=t=>({borderRadius:t.controlHeight,paddingInlineStart:t.controlHeight/2,paddingInlineEnd:t.controlHeight/2}),My=t=>({cursor:"not-allowed",borderColor:t.colorBorder,color:t.colorTextDisabled,backgroundColor:t.colorBgContainerDisabled,boxShadow:"none"}),Gp=(t,e,n,i,o,r,a)=>({[`&${t}-background-ghost`]:A(A({color:e||void 0,backgroundColor:"transparent",borderColor:n||void 0,boxShadow:"none"},Wr(A({backgroundColor:"transparent"},r),A({backgroundColor:"transparent"},a))),{"&:disabled":{cursor:"not-allowed",color:i||void 0,borderColor:o||void 0}})}),Q1=t=>({"&:disabled":A({},My(t))}),h3=t=>A({},Q1(t)),Kp=t=>({"&:disabled":{cursor:"not-allowed",color:t.colorTextDisabled}}),p3=t=>A(A(A(A(A({},h3(t)),{backgroundColor:t.colorBgContainer,borderColor:t.colorBorder,boxShadow:`0 ${t.controlOutlineWidth}px 0 ${t.controlTmpOutline}`}),Wr({color:t.colorPrimaryHover,borderColor:t.colorPrimaryHover},{color:t.colorPrimaryActive,borderColor:t.colorPrimaryActive})),Gp(t.componentCls,t.colorBgContainer,t.colorBgContainer,t.colorTextDisabled,t.colorBorder)),{[`&${t.componentCls}-dangerous`]:A(A(A({color:t.colorError,borderColor:t.colorError},Wr({color:t.colorErrorHover,borderColor:t.colorErrorBorderHover},{color:t.colorErrorActive,borderColor:t.colorErrorActive})),Gp(t.componentCls,t.colorError,t.colorError,t.colorTextDisabled,t.colorBorder)),Q1(t))}),YQ=t=>A(A(A(A(A({},h3(t)),{color:t.colorTextLightSolid,backgroundColor:t.colorPrimary,boxShadow:`0 ${t.controlOutlineWidth}px 0 ${t.controlOutline}`}),Wr({color:t.colorTextLightSolid,backgroundColor:t.colorPrimaryHover},{color:t.colorTextLightSolid,backgroundColor:t.colorPrimaryActive})),Gp(t.componentCls,t.colorPrimary,t.colorPrimary,t.colorTextDisabled,t.colorBorder,{color:t.colorPrimaryHover,borderColor:t.colorPrimaryHover},{color:t.colorPrimaryActive,borderColor:t.colorPrimaryActive})),{[`&${t.componentCls}-dangerous`]:A(A(A({backgroundColor:t.colorError,boxShadow:`0 ${t.controlOutlineWidth}px 0 ${t.colorErrorOutline}`},Wr({backgroundColor:t.colorErrorHover},{backgroundColor:t.colorErrorActive})),Gp(t.componentCls,t.colorError,t.colorError,t.colorTextDisabled,t.colorBorder,{color:t.colorErrorHover,borderColor:t.colorErrorHover},{color:t.colorErrorActive,borderColor:t.colorErrorActive})),Q1(t))}),GQ=t=>A(A({},p3(t)),{borderStyle:"dashed"}),KQ=t=>A(A(A({color:t.colorLink},Wr({color:t.colorLinkHover},{color:t.colorLinkActive})),Kp(t)),{[`&${t.componentCls}-dangerous`]:A(A({color:t.colorError},Wr({color:t.colorErrorHover},{color:t.colorErrorActive})),Kp(t))}),UQ=t=>A(A(A({},Wr({color:t.colorText,backgroundColor:t.colorBgTextHover},{color:t.colorText,backgroundColor:t.colorBgTextActive})),Kp(t)),{[`&${t.componentCls}-dangerous`]:A(A({color:t.colorError},Kp(t)),Wr({color:t.colorErrorHover,backgroundColor:t.colorErrorBg},{color:t.colorErrorHover,backgroundColor:t.colorErrorBg}))}),qQ=t=>A(A({},My(t)),{[`&${t.componentCls}:hover`]:A({},My(t))}),ZQ=t=>{const{componentCls:e}=t;return{[`${e}-default`]:p3(t),[`${e}-primary`]:YQ(t),[`${e}-dashed`]:GQ(t),[`${e}-link`]:KQ(t),[`${e}-text`]:UQ(t),[`${e}-disabled`]:qQ(t)}},eS=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const{componentCls:n,iconCls:i,controlHeight:o,fontSize:r,lineHeight:a,lineWidth:s,borderRadius:l,buttonPaddingHorizontal:c}=t,u=Math.max(0,(o-r*a)/2-s),d=c-s,f=`${n}-icon-only`;return[{[`${n}${e}`]:{fontSize:r,height:o,padding:`${u}px ${d}px`,borderRadius:l,[`&${f}`]:{width:o,paddingInlineStart:0,paddingInlineEnd:0,[`&${n}-round`]:{width:"auto"},"> span":{transform:"scale(1.143)"}},[`&${n}-loading`]:{opacity:t.opacityLoading,cursor:"default"},[`${n}-loading-icon`]:{transition:`width ${t.motionDurationSlow} ${t.motionEaseInOut}, opacity ${t.motionDurationSlow} ${t.motionEaseInOut}`},[`&:not(${f}) ${n}-loading-icon > ${i}`]:{marginInlineEnd:t.marginXS}}},{[`${n}${n}-circle${e}`]:VQ(t)},{[`${n}${n}-round${e}`]:XQ(t)}]},JQ=t=>eS(t),QQ=t=>{const e=Ve(t,{controlHeight:t.controlHeightSM,padding:t.paddingXS,buttonPaddingHorizontal:8,borderRadius:t.borderRadiusSM});return eS(e,`${t.componentCls}-sm`)},eee=t=>{const e=Ve(t,{controlHeight:t.controlHeightLG,fontSize:t.fontSizeLG,borderRadius:t.borderRadiusLG});return eS(e,`${t.componentCls}-lg`)},tee=t=>{const{componentCls:e}=t;return{[e]:{[`&${e}-block`]:{width:"100%"}}}},nee=et("Button",t=>{const{controlTmpOutline:e,paddingContentHorizontal:n}=t,i=Ve(t,{colorOutlineDefault:e,buttonPaddingHorizontal:n});return[jQ(i),QQ(i),JQ(i),eee(i),tee(i),ZQ(i),BQ(i),Ec(t,{focus:!1}),WQ(t)]}),iee=()=>({prefixCls:String,size:{type:String}}),g3=E1(),Up=oe({compatConfig:{MODE:3},name:"AButtonGroup",props:iee(),setup(t,e){let{slots:n}=e;const{prefixCls:i,direction:o}=Me("btn-group",t),[,,r]=Xr();g3.useProvide($t({size:L(()=>t.size)}));const a=L(()=>{const{size:s}=t;let l="";switch(s){case"large":l="lg";break;case"small":l="sm";break;case"middle":case void 0:break;default:Nt(!s,"Button.Group","Invalid prop `size`.")}return{[`${i.value}`]:!0,[`${i.value}-${l}`]:l,[`${i.value}-rtl`]:o.value==="rtl",[r.value]:!0}});return()=>{var s;return C("div",{class:a.value},[Dt((s=n.default)===null||s===void 0?void 0:s.call(n))])}}}),I2=/^[\u4e00-\u9fa5]{2}$/,k2=I2.test.bind(I2);function zf(t){return t==="text"||t==="link"}const nn=oe({compatConfig:{MODE:3},name:"AButton",inheritAttrs:!1,__ANT_BUTTON:!0,props:ct(f3(),{type:"default"}),slots:Object,setup(t,e){let{slots:n,attrs:i,emit:o,expose:r}=e;const{prefixCls:a,autoInsertSpaceInButton:s,direction:l,size:c}=Me("btn",t),[u,d]=nee(a),f=g3.useInject(),h=Oi(),p=L(()=>{var E;return(E=t.disabled)!==null&&E!==void 0?E:h.value}),g=ie(null),m=ie(void 0);let v=!1;const b=ie(!1),y=ie(!1),w=L(()=>s.value!==!1),{compactSize:x,compactItemClassnames:$}=Ra(a,l),S=L(()=>typeof t.loading=="object"&&t.loading.delay?t.loading.delay||!0:!!t.loading);ye(S,E=>{clearTimeout(m.value),typeof S.value=="number"?m.value=setTimeout(()=>{b.value=E},S.value):b.value=E},{immediate:!0});const _=L(()=>{const{type:E,shape:R="default",ghost:D,block:F,danger:N}=t,B=a.value,z={large:"lg",small:"sm",middle:void 0},W=x.value||(f==null?void 0:f.size)||c.value,j=W&&z[W]||"";return[$.value,{[d.value]:!0,[`${B}`]:!0,[`${B}-${R}`]:R!=="default"&&R,[`${B}-${E}`]:E,[`${B}-${j}`]:j,[`${B}-loading`]:b.value,[`${B}-background-ghost`]:D&&!zf(E),[`${B}-two-chinese-chars`]:y.value&&w.value,[`${B}-block`]:F,[`${B}-dangerous`]:!!N,[`${B}-rtl`]:l.value==="rtl"}]}),P=()=>{const E=g.value;if(!E||s.value===!1)return;const R=E.textContent;v&&k2(R)?y.value||(y.value=!0):y.value&&(y.value=!1)},O=E=>{if(b.value||p.value){E.preventDefault();return}o("click",E)},T=E=>{o("mousedown",E)},M=(E,R)=>{const D=R?" ":"";if(E.type===Ma){let F=E.children.trim();return k2(F)&&(F=F.split("").join(D)),C("span",null,[F])}return E};return Ke(()=>{Nt(!(t.ghost&&zf(t.type)),"Button","`link` or `text` button can't be a `ghost` button.")}),Ze(P),ri(P),at(()=>{m.value&&clearTimeout(m.value)}),r({focus:()=>{var E;(E=g.value)===null||E===void 0||E.focus()},blur:()=>{var E;(E=g.value)===null||E===void 0||E.blur()}}),()=>{var E,R;const{icon:D=(E=n.icon)===null||E===void 0?void 0:E.call(n)}=t,F=Dt((R=n.default)===null||R===void 0?void 0:R.call(n));v=F.length===1&&!D&&!zf(t.type);const{type:N,htmlType:B,href:z,title:W,target:j}=t,U=b.value?"loading":D,V=A(A({},i),{title:W,disabled:p.value,class:[_.value,i.class,{[`${a.value}-icon-only`]:F.length===0&&!!U}],onClick:O,onMousedown:T});p.value||delete V.disabled;const q=D&&!b.value?D:C(NQ,{existIcon:!!D,prefixCls:a.value,loading:!!b.value},null),Y=F.map(Q=>M(Q,v&&w.value));if(z!==void 0)return u(C("a",H(H({},V),{},{href:z,target:j,ref:g}),[q,Y]));let J=C("button",H(H({},V),{},{ref:g,type:B}),[q,Y]);if(!zf(N)){const Q=function(){return J}();J=C(J1,{ref:"wave",disabled:!!b.value},{default:()=>[Q]})}return u(J)}}});nn.Group=Up;nn.install=function(t){return t.component(nn.name,nn),t.component(Up.name,Up),t};const m3=()=>({arrow:Xe([Boolean,Object]),trigger:{type:[Array,String]},menu:Fe(),overlay:Z.any,visible:Ce(),open:Ce(),disabled:Ce(),danger:Ce(),autofocus:Ce(),align:Fe(),getPopupContainer:Function,prefixCls:String,transitionName:String,placement:String,overlayClassName:String,overlayStyle:Fe(),forceRender:Ce(),mouseEnterDelay:Number,mouseLeaveDelay:Number,openClassName:String,minOverlayWidthMatchTrigger:Ce(),destroyPopupOnHide:Ce(),onVisibleChange:{type:Function},"onUpdate:visible":{type:Function},onOpenChange:{type:Function},"onUpdate:open":{type:Function}}),Cb=f3(),oee=()=>A(A({},m3()),{type:Cb.type,size:String,htmlType:Cb.htmlType,href:String,disabled:Ce(),prefixCls:String,icon:Z.any,title:String,loading:Cb.loading,onClick:Ms()});var ree={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"};function D2(t){for(var e=1;e{const{componentCls:e,antCls:n,paddingXS:i,opacityLoading:o}=t;return{[`${e}-button`]:{whiteSpace:"nowrap",[`&${n}-btn-group > ${n}-btn`]:{[`&-loading, &-loading + ${n}-btn`]:{cursor:"default",pointerEvents:"none",opacity:o},[`&:last-child:not(:first-child):not(${n}-btn-icon-only)`]:{paddingInline:i}}}}},lee=t=>{const{componentCls:e,menuCls:n,colorError:i,colorTextLightSolid:o}=t,r=`${n}-item`;return{[`${e}, ${e}-menu-submenu`]:{[`${n} ${r}`]:{[`&${r}-danger:not(${r}-disabled)`]:{color:i,"&:hover":{color:o,backgroundColor:i}}}}}},cee=t=>{const{componentCls:e,menuCls:n,zIndexPopup:i,dropdownArrowDistance:o,dropdownArrowOffset:r,sizePopupArrow:a,antCls:s,iconCls:l,motionDurationMid:c,dropdownPaddingVertical:u,fontSize:d,dropdownEdgeChildPadding:f,colorTextDisabled:h,fontSizeIcon:p,controlPaddingHorizontal:g,colorBgElevated:m,boxShadowPopoverArrow:v}=t;return[{[e]:A(A({},rt(t)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:i,display:"block","&::before":{position:"absolute",insetBlock:-o+a/2,zIndex:-9999,opacity:1e-4,content:'""'},[`${e}-wrap`]:{position:"relative",[`${s}-btn > ${l}-down`]:{fontSize:p},[`${l}-down::before`]:{transition:`transform ${c}`}},[`${e}-wrap-open`]:{[`${l}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[` + margin-bottom ${n} ${c}`},[`&${e}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}}),[`${e}-with-description`]:{alignItems:"flex-start",paddingInline:g,paddingBlock:p,[`${e}-icon`]:{marginInlineEnd:o,fontSize:u,lineHeight:0},[`${e}-message`]:{display:"block",marginBottom:i,color:d,fontSize:a},[`${e}-description`]:{display:"block"}},[`${e}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}},MJ=t=>{const{componentCls:e,colorSuccess:n,colorSuccessBorder:i,colorSuccessBg:o,colorWarning:r,colorWarningBorder:a,colorWarningBg:s,colorError:l,colorErrorBorder:c,colorErrorBg:u,colorInfo:d,colorInfoBorder:f,colorInfoBg:h}=t;return{[e]:{"&-success":Bf(o,i,n,t,e),"&-info":Bf(h,f,d,t,e),"&-warning":Bf(s,a,r,t,e),"&-error":A(A({},Bf(u,c,l,t,e)),{[`${e}-description > pre`]:{margin:0,padding:0}})}}},IJ=t=>{const{componentCls:e,iconCls:n,motionDurationMid:i,marginXS:o,fontSizeIcon:r,colorIcon:a,colorIconHover:s}=t;return{[e]:{"&-action":{marginInlineStart:o},[`${e}-close-icon`]:{marginInlineStart:o,padding:0,overflow:"hidden",fontSize:r,lineHeight:`${r}px`,backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${n}-close`]:{color:a,transition:`color ${i}`,"&:hover":{color:s}}},"&-close-text":{color:a,transition:`color ${i}`,"&:hover":{color:s}}}}},kJ=t=>[EJ(t),MJ(t),IJ(t)],DJ=et("Alert",t=>{const{fontSizeHeading3:e}=t,n=Ve(t,{alertIconSizeLG:e,alertPaddingHorizontal:12});return[kJ(n)]}),RJ={success:Ho,info:La,error:si,warning:Wo},LJ={success:Dm,info:Lm,error:Fm,warning:Rm},FJ=Wn("success","info","warning","error"),NJ=()=>({type:Z.oneOf(FJ),closable:{type:Boolean,default:void 0},closeText:Z.any,message:Z.any,description:Z.any,afterClose:Function,showIcon:{type:Boolean,default:void 0},prefixCls:String,banner:{type:Boolean,default:void 0},icon:Z.any,closeIcon:Z.any,onClose:Function}),BJ=oe({compatConfig:{MODE:3},name:"AAlert",inheritAttrs:!1,props:NJ(),setup(t,e){let{slots:n,emit:i,attrs:o,expose:r}=e;const{prefixCls:a,direction:s}=Me("alert",t),[l,c]=DJ(a),u=ie(!1),d=ie(!1),f=ie(),h=v=>{v.preventDefault();const b=f.value;b.style.height=`${b.offsetHeight}px`,b.style.height=`${b.offsetHeight}px`,u.value=!0,i("close",v)},p=()=>{var v;u.value=!1,d.value=!0,(v=t.afterClose)===null||v===void 0||v.call(t)},g=L(()=>{const{type:v}=t;return v!==void 0?v:t.banner?"warning":"info"});r({animationEnd:p});const m=ie({});return()=>{var v,b,y,w,x,$,S,_,P,O;const{banner:T,closeIcon:M=(v=n.closeIcon)===null||v===void 0?void 0:v.call(n)}=t;let{closable:I,showIcon:k}=t;const E=(b=t.closeText)!==null&&b!==void 0?b:(y=n.closeText)===null||y===void 0?void 0:y.call(n),R=(w=t.description)!==null&&w!==void 0?w:(x=n.description)===null||x===void 0?void 0:x.call(n),D=($=t.message)!==null&&$!==void 0?$:(S=n.message)===null||S===void 0?void 0:S.call(n),F=(_=t.icon)!==null&&_!==void 0?_:(P=n.icon)===null||P===void 0?void 0:P.call(n),N=(O=n.action)===null||O===void 0?void 0:O.call(n);k=T&&k===void 0?!0:k;const B=(R?LJ:RJ)[g.value]||null;E&&(I=!0);const z=a.value,W=ce(z,{[`${z}-${g.value}`]:!0,[`${z}-closing`]:u.value,[`${z}-with-description`]:!!R,[`${z}-no-icon`]:!k,[`${z}-banner`]:!!T,[`${z}-closable`]:I,[`${z}-rtl`]:s.value==="rtl",[c.value]:!0}),j=I?C("button",{type:"button",onClick:h,class:`${z}-close-icon`,tabindex:0},[E?C("span",{class:`${z}-close-text`},[E]):M===void 0?C(ai,null,null):M]):null,U=F&&(cn(F)?At(F,{class:`${z}-icon`}):C("span",{class:`${z}-icon`},[F]))||C(B,{class:`${z}-icon`},null),V=yo(`${z}-motion`,{appear:!1,css:!0,onAfterLeave:p,onBeforeLeave:q=>{q.style.maxHeight=`${q.offsetHeight}px`},onLeave:q=>{q.style.maxHeight="0px"}});return l(d.value?null:C(En,V,{default:()=>[ni(C("div",H(H({role:"alert"},o),{},{style:[o.style,m.value],class:[o.class,W],"data-show":!u.value,ref:f}),[k?U:null,C("div",{class:`${z}-content`},[D?C("div",{class:`${z}-message`},[D]):null,R?C("div",{class:`${z}-description`},[R]):null]),N?C("div",{class:`${z}-action`},[N]):null,j]),[[vi,!u.value]])]}))}}}),zJ=Vt(BJ),Tr=["xxxl","xxl","xl","lg","md","sm","xs"],HJ=t=>({xs:`(max-width: ${t.screenXSMax}px)`,sm:`(min-width: ${t.screenSM}px)`,md:`(min-width: ${t.screenMD}px)`,lg:`(min-width: ${t.screenLG}px)`,xl:`(min-width: ${t.screenXL}px)`,xxl:`(min-width: ${t.screenXXL}px)`,xxxl:`{min-width: ${t.screenXXXL}px}`});function Y1(){const[,t]=Xr();return L(()=>{const e=HJ(t.value),n=new Map;let i=-1,o={};return{matchHandlers:{},dispatch(r){return o=r,n.forEach(a=>a(o)),n.size>=1},subscribe(r){return n.size||this.register(),i+=1,n.set(i,r),r(o),i},unsubscribe(r){n.delete(r),n.size||this.unregister()},unregister(){Object.keys(e).forEach(r=>{const a=e[r],s=this.matchHandlers[a];s==null||s.mql.removeListener(s==null?void 0:s.listener)}),n.clear()},register(){Object.keys(e).forEach(r=>{const a=e[r],s=c=>{let{matches:u}=c;this.dispatch(A(A({},o),{[r]:u}))},l=window.matchMedia(a);l.addListener(s),this.matchHandlers[a]={mql:l,listener:s},s(l)})},responsiveMap:e}})}function Ic(){const t=ie({});let e=null;const n=Y1();return Ze(()=>{e=n.value.subscribe(i=>{t.value=i})}),Xn(()=>{n.value.unsubscribe(e)}),t}function Bi(t){const e=ie();return Ke(()=>{e.value=t()},{flush:"sync"}),e}const WJ=t=>{const{antCls:e,componentCls:n,iconCls:i,avatarBg:o,avatarColor:r,containerSize:a,containerSizeLG:s,containerSizeSM:l,textFontSize:c,textFontSizeLG:u,textFontSizeSM:d,borderRadius:f,borderRadiusLG:h,borderRadiusSM:p,lineWidth:g,lineType:m}=t,v=(b,y,w)=>({width:b,height:b,lineHeight:`${b-g*2}px`,borderRadius:"50%",[`&${n}-square`]:{borderRadius:w},[`${n}-string`]:{position:"absolute",left:{_skip_check_:!0,value:"50%"},transformOrigin:"0 center"},[`&${n}-icon`]:{fontSize:y,[`> ${i}`]:{margin:0}}});return{[n]:A(A(A(A({},rt(t)),{position:"relative",display:"inline-block",overflow:"hidden",color:r,whiteSpace:"nowrap",textAlign:"center",verticalAlign:"middle",background:o,border:`${g}px ${m} transparent`,"&-image":{background:"transparent"},[`${e}-image-img`]:{display:"block"}}),v(a,c,f)),{"&-lg":A({},v(s,u,h)),"&-sm":A({},v(l,d,p)),"> img":{display:"block",width:"100%",height:"100%",objectFit:"cover"}})}},jJ=t=>{const{componentCls:e,groupBorderColor:n,groupOverlapping:i,groupSpace:o}=t;return{[`${e}-group`]:{display:"inline-flex",[`${e}`]:{borderColor:n},"> *:not(:first-child)":{marginInlineStart:i}},[`${e}-group-popover`]:{[`${e} + ${e}`]:{marginInlineStart:o}}}},o3=et("Avatar",t=>{const{colorTextLightSolid:e,colorTextPlaceholder:n}=t,i=Ve(t,{avatarBg:n,avatarColor:e});return[WJ(i),jJ(i)]},t=>{const{controlHeight:e,controlHeightLG:n,controlHeightSM:i,fontSize:o,fontSizeLG:r,fontSizeXL:a,fontSizeHeading3:s,marginXS:l,marginXXS:c,colorBorderBg:u}=t;return{containerSize:e,containerSizeLG:n,containerSizeSM:i,textFontSize:Math.round((r+a)/2),textFontSizeLG:s,textFontSizeSM:o,groupSpace:c,groupOverlapping:-l,groupBorderColor:u}}),r3=Symbol("AvatarContextKey"),VJ=()=>qe(r3,{}),XJ=t=>ot(r3,t),YJ=()=>({prefixCls:String,shape:{type:String,default:"circle"},size:{type:[Number,String,Object],default:()=>"default"},src:String,srcset:String,icon:Z.any,alt:String,gap:Number,draggable:{type:Boolean,default:void 0},crossOrigin:String,loadError:{type:Function}}),Ss=oe({compatConfig:{MODE:3},name:"AAvatar",inheritAttrs:!1,props:YJ(),slots:Object,setup(t,e){let{slots:n,attrs:i}=e;const o=ie(!0),r=ie(!1),a=ie(1),s=ie(null),l=ie(null),{prefixCls:c}=Me("avatar",t),[u,d]=o3(c),f=VJ(),h=L(()=>t.size==="default"?f.size:t.size),p=Ic(),g=Bi(()=>{if(typeof t.size!="object")return;const y=Tr.find(x=>p.value[x]);return t.size[y]}),m=y=>g.value?{width:`${g.value}px`,height:`${g.value}px`,lineHeight:`${g.value}px`,fontSize:`${y?g.value/2:18}px`}:{},v=()=>{if(!s.value||!l.value)return;const y=s.value.offsetWidth,w=l.value.offsetWidth;if(y!==0&&w!==0){const{gap:x=4}=t;x*2{const{loadError:y}=t;(y==null?void 0:y())!==!1&&(o.value=!1)};return ye(()=>t.src,()=>{pt(()=>{o.value=!0,a.value=1})}),ye(()=>t.gap,()=>{pt(()=>{v()})}),Ze(()=>{pt(()=>{v(),r.value=!0})}),()=>{var y,w;const{shape:x,src:$,alt:S,srcset:_,draggable:P,crossOrigin:O}=t,T=(y=f.shape)!==null&&y!==void 0?y:x,M=gn(n,t,"icon"),I=c.value,k={[`${i.class}`]:!!i.class,[I]:!0,[`${I}-lg`]:h.value==="large",[`${I}-sm`]:h.value==="small",[`${I}-${T}`]:!0,[`${I}-image`]:$&&o.value,[`${I}-icon`]:M,[d.value]:!0},E=typeof h.value=="number"?{width:`${h.value}px`,height:`${h.value}px`,lineHeight:`${h.value}px`,fontSize:M?`${h.value/2}px`:"18px"}:{},R=(w=n.default)===null||w===void 0?void 0:w.call(n);let D;if($&&o.value)D=C("img",{draggable:P,src:$,srcset:_,onError:b,alt:S,crossorigin:O},null);else if(M)D=M;else if(r.value||a.value!==1){const F=`scale(${a.value}) translateX(-50%)`,N={msTransform:F,WebkitTransform:F,transform:F},B=typeof h.value=="number"?{lineHeight:`${h.value}px`}:{};D=C(mo,{onResize:v},{default:()=>[C("span",{class:`${I}-string`,ref:s,style:A(A({},B),N)},[R])]})}else D=C("span",{class:`${I}-string`,ref:s,style:{opacity:0}},[R]);return u(C("span",H(H({},i),{},{ref:l,class:k,style:[E,m(!!M),i.style]}),[D]))}}}),to={adjustX:1,adjustY:1},no=[0,0],a3={left:{points:["cr","cl"],overflow:to,offset:[-4,0],targetOffset:no},right:{points:["cl","cr"],overflow:to,offset:[4,0],targetOffset:no},top:{points:["bc","tc"],overflow:to,offset:[0,-4],targetOffset:no},bottom:{points:["tc","bc"],overflow:to,offset:[0,4],targetOffset:no},topLeft:{points:["bl","tl"],overflow:to,offset:[0,-4],targetOffset:no},leftTop:{points:["tr","tl"],overflow:to,offset:[-4,0],targetOffset:no},topRight:{points:["br","tr"],overflow:to,offset:[0,-4],targetOffset:no},rightTop:{points:["tl","tr"],overflow:to,offset:[4,0],targetOffset:no},bottomRight:{points:["tr","br"],overflow:to,offset:[0,4],targetOffset:no},rightBottom:{points:["bl","br"],overflow:to,offset:[4,0],targetOffset:no},bottomLeft:{points:["tl","bl"],overflow:to,offset:[0,4],targetOffset:no},leftBottom:{points:["br","bl"],overflow:to,offset:[-4,0],targetOffset:no}},GJ={prefixCls:String,id:String,overlayInnerStyle:Z.any},KJ=oe({compatConfig:{MODE:3},name:"TooltipContent",props:GJ,setup(t,e){let{slots:n}=e;return()=>{var i;return C("div",{class:`${t.prefixCls}-inner`,id:t.id,role:"tooltip",style:t.overlayInnerStyle},[(i=n.overlay)===null||i===void 0?void 0:i.call(n)])}}});var UJ=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{}),overlayStyle:{type:Object,default:void 0},overlayClassName:String,prefixCls:Z.string.def("rc-tooltip"),mouseEnterDelay:Z.number.def(.1),mouseLeaveDelay:Z.number.def(.1),getPopupContainer:Function,destroyTooltipOnHide:{type:Boolean,default:!1},align:Z.object.def(()=>({})),arrowContent:Z.any.def(null),tipId:String,builtinPlacements:Z.object,overlayInnerStyle:{type:Object,default:void 0},popupVisible:{type:Boolean,default:void 0},onVisibleChange:Function,onPopupAlign:Function,arrow:{type:Boolean,default:!0}},setup(t,e){let{slots:n,attrs:i,expose:o}=e;const r=ie(),a=()=>{const{prefixCls:u,tipId:d,overlayInnerStyle:f}=t;return[t.arrow?C("div",{class:`${u}-arrow`,key:"arrow"},[gn(n,t,"arrowContent")]):null,C(KJ,{key:"content",prefixCls:u,id:d,overlayInnerStyle:f},{overlay:n.overlay})]};o({getPopupDomNode:()=>r.value.getPopupDomNode(),triggerDOM:r,forcePopupAlign:()=>{var u;return(u=r.value)===null||u===void 0?void 0:u.forcePopupAlign()}});const l=ie(!1),c=ie(!1);return Ke(()=>{const{destroyTooltipOnHide:u}=t;if(typeof u=="boolean")l.value=u;else if(u&&typeof u=="object"){const{keepParent:d}=u;l.value=d===!0,c.value=d===!1}}),()=>{const{overlayClassName:u,trigger:d,mouseEnterDelay:f,mouseLeaveDelay:h,overlayStyle:p,prefixCls:g,afterVisibleChange:m,transitionName:v,animation:b,placement:y,align:w,destroyTooltipOnHide:x,defaultVisible:$}=t,S=UJ(t,["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","afterVisibleChange","transitionName","animation","placement","align","destroyTooltipOnHide","defaultVisible"]),_=A({},S);t.visible!==void 0&&(_.popupVisible=t.visible);const P=A(A(A({popupClassName:u,prefixCls:g,action:d,builtinPlacements:a3,popupPlacement:y,popupAlign:w,afterPopupVisibleChange:m,popupTransitionName:v,popupAnimation:b,defaultPopupVisible:$,destroyPopupOnHide:l.value,autoDestroy:c.value,mouseLeaveDelay:h,popupStyle:p,mouseEnterDelay:f},_),i),{onPopupVisibleChange:t.onVisibleChange||$2,onPopupAlign:t.onPopupAlign||$2,ref:r,arrow:!!t.arrow,popup:a()});return C(tl,P,{default:n.default})}}}),G1=()=>({trigger:[String,Array],open:{type:Boolean,default:void 0},visible:{type:Boolean,default:void 0},placement:String,color:String,transitionName:String,overlayStyle:Fe(),overlayInnerStyle:Fe(),overlayClassName:String,openClassName:String,prefixCls:String,mouseEnterDelay:Number,mouseLeaveDelay:Number,getPopupContainer:Function,arrowPointAtCenter:{type:Boolean,default:void 0},arrow:{type:[Boolean,Object],default:!0},autoAdjustOverflow:{type:[Boolean,Object],default:void 0},destroyTooltipOnHide:{type:Boolean,default:void 0},align:Fe(),builtinPlacements:Fe(),children:Array,onVisibleChange:Function,"onUpdate:visible":Function,onOpenChange:Function,"onUpdate:open":Function}),ZJ={adjustX:1,adjustY:1},A2={adjustX:0,adjustY:0},JJ=[0,0];function _2(t){return typeof t=="boolean"?t?ZJ:A2:A(A({},A2),t)}function K1(t){const{arrowWidth:e=4,horizontalArrowShift:n=16,verticalArrowShift:i=8,autoAdjustOverflow:o,arrowPointAtCenter:r}=t,a={left:{points:["cr","cl"],offset:[-4,0]},right:{points:["cl","cr"],offset:[4,0]},top:{points:["bc","tc"],offset:[0,-4]},bottom:{points:["tc","bc"],offset:[0,4]},topLeft:{points:["bl","tc"],offset:[-(n+e),-4]},leftTop:{points:["tr","cl"],offset:[-4,-(i+e)]},topRight:{points:["br","tc"],offset:[n+e,-4]},rightTop:{points:["tl","cr"],offset:[4,-(i+e)]},bottomRight:{points:["tr","bc"],offset:[n+e,4]},rightBottom:{points:["bl","cr"],offset:[4,i+e]},bottomLeft:{points:["tl","bc"],offset:[-(n+e),4]},leftBottom:{points:["br","cl"],offset:[-4,i+e]}};return Object.keys(a).forEach(s=>{a[s]=r?A(A({},a[s]),{overflow:_2(o),targetOffset:JJ}):A(A({},a3[s]),{overflow:_2(o)}),a[s].ignoreShake=!0}),a}function jp(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];for(let e=0,n=t.length;e`${t}-inverse`),eQ=["success","processing","error","default","warning"];function Nm(t){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[...QJ,...fd].includes(t):fd.includes(t)}function tQ(t){return eQ.includes(t)}function nQ(t,e){const n=Nm(e),i=ce({[`${t}-${e}`]:e&&n}),o={},r={};return e&&!n&&(o.background=e,r["--antd-arrow-background-color"]=e),{className:i,overlayStyle:o,arrowStyle:r}}function zf(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return t.map(n=>`${e}${n}`).join(",")}const U1=8;function s3(t){const e=U1,{sizePopupArrow:n,contentRadius:i,borderRadiusOuter:o,limitVerticalRadius:r}=t,a=n/2-Math.ceil(o*(Math.sqrt(2)-1)),s=(i>12?i+2:12)-a,l=r?e-a:s;return{dropdownArrowOffset:s,dropdownArrowOffsetVertical:l}}function q1(t,e){const{componentCls:n,sizePopupArrow:i,marginXXS:o,borderRadiusXS:r,borderRadiusOuter:a,boxShadowPopoverArrow:s}=t,{colorBg:l,showArrowCls:c,contentRadius:u=t.borderRadiusLG,limitVerticalRadius:d}=e,{dropdownArrowOffsetVertical:f,dropdownArrowOffset:h}=s3({sizePopupArrow:i,contentRadius:u,borderRadiusOuter:a,limitVerticalRadius:d}),p=i/2+o;return{[n]:{[`${n}-arrow`]:[A(A({position:"absolute",zIndex:1,display:"block"},Kw(i,r,a,l,s)),{"&:before":{background:l}})],[[`&-placement-top ${n}-arrow`,`&-placement-topLeft ${n}-arrow`,`&-placement-topRight ${n}-arrow`].join(",")]:{bottom:0,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},[`&-placement-topLeft ${n}-arrow`]:{left:{_skip_check_:!0,value:h}},[`&-placement-topRight ${n}-arrow`]:{right:{_skip_check_:!0,value:h}},[[`&-placement-bottom ${n}-arrow`,`&-placement-bottomLeft ${n}-arrow`,`&-placement-bottomRight ${n}-arrow`].join(",")]:{top:0,transform:"translateY(-100%)"},[`&-placement-bottom ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},[`&-placement-bottomLeft ${n}-arrow`]:{left:{_skip_check_:!0,value:h}},[`&-placement-bottomRight ${n}-arrow`]:{right:{_skip_check_:!0,value:h}},[[`&-placement-left ${n}-arrow`,`&-placement-leftTop ${n}-arrow`,`&-placement-leftBottom ${n}-arrow`].join(",")]:{right:{_skip_check_:!0,value:0},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop ${n}-arrow`]:{top:f},[`&-placement-leftBottom ${n}-arrow`]:{bottom:f},[[`&-placement-right ${n}-arrow`,`&-placement-rightTop ${n}-arrow`,`&-placement-rightBottom ${n}-arrow`].join(",")]:{left:{_skip_check_:!0,value:0},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop ${n}-arrow`]:{top:f},[`&-placement-rightBottom ${n}-arrow`]:{bottom:f},[zf(["&-placement-topLeft","&-placement-top","&-placement-topRight"].map(g=>g+=":not(&-arrow-hidden)"),c)]:{paddingBottom:p},[zf(["&-placement-bottomLeft","&-placement-bottom","&-placement-bottomRight"].map(g=>g+=":not(&-arrow-hidden)"),c)]:{paddingTop:p},[zf(["&-placement-leftTop","&-placement-left","&-placement-leftBottom"].map(g=>g+=":not(&-arrow-hidden)"),c)]:{paddingRight:{_skip_check_:!0,value:p}},[zf(["&-placement-rightTop","&-placement-right","&-placement-rightBottom"].map(g=>g+=":not(&-arrow-hidden)"),c)]:{paddingLeft:{_skip_check_:!0,value:p}}}}}const iQ=t=>{const{componentCls:e,tooltipMaxWidth:n,tooltipColor:i,tooltipBg:o,tooltipBorderRadius:r,zIndexPopup:a,controlHeight:s,boxShadowSecondary:l,paddingSM:c,paddingXS:u,tooltipRadiusOuter:d}=t;return[{[e]:A(A(A(A({},rt(t)),{position:"absolute",zIndex:a,display:"block","&":[{width:"max-content"},{width:"intrinsic"}],maxWidth:n,visibility:"visible","&-hidden":{display:"none"},"--antd-arrow-background-color":o,[`${e}-inner`]:{minWidth:s,minHeight:s,padding:`${c/2}px ${u}px`,color:i,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:o,borderRadius:r,boxShadow:l},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${e}-inner`]:{borderRadius:Math.min(r,U1)}},[`${e}-content`]:{position:"relative"}}),Op(t,(f,h)=>{let{darkColor:p}=h;return{[`&${e}-${f}`]:{[`${e}-inner`]:{backgroundColor:p},[`${e}-arrow`]:{"--antd-arrow-background-color":p}}}})),{"&-rtl":{direction:"rtl"}})},q1(Ve(t,{borderRadiusOuter:d}),{colorBg:"var(--antd-arrow-background-color)",showArrowCls:"",contentRadius:r,limitVerticalRadius:!0}),{[`${e}-pure`]:{position:"relative",maxWidth:"none"}}]},oQ=(t,e)=>et("Tooltip",i=>{if((e==null?void 0:e.value)===!1)return[];const{borderRadius:o,colorTextLightSolid:r,colorBgDefault:a,borderRadiusOuter:s}=i,l=Ve(i,{tooltipMaxWidth:250,tooltipColor:r,tooltipBorderRadius:o,tooltipBg:a,tooltipRadiusOuter:s>4?4:s});return[iQ(l),Ec(i,"zoom-big-fast")]},i=>{let{zIndexPopupBase:o,colorBgSpotlight:r}=i;return{zIndexPopup:o+70,colorBgDefault:r}})(t),rQ=(t,e)=>{const n={},i=A({},t);return e.forEach(o=>{t&&o in t&&(n[o]=t[o],delete i[o])}),{picked:n,omitted:i}},l3=()=>A(A({},G1()),{title:Z.any}),c3=()=>({trigger:"hover",align:{},placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0}),aQ=oe({compatConfig:{MODE:3},name:"ATooltip",inheritAttrs:!1,props:ct(l3(),{trigger:"hover",align:{},placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0}),slots:Object,setup(t,e){let{slots:n,emit:i,attrs:o,expose:r}=e;const{prefixCls:a,getPopupContainer:s,direction:l,rootPrefixCls:c}=Me("tooltip",t),u=L(()=>{var O;return(O=t.open)!==null&&O!==void 0?O:t.visible}),d=se(jp([t.open,t.visible])),f=se();let h;ye(u,O=>{lt.cancel(h),h=lt(()=>{d.value=!!O})});const p=()=>{var O;const T=(O=t.title)!==null&&O!==void 0?O:n.title;return!T&&T!==0},g=O=>{const T=p();u.value===void 0&&(d.value=T?!1:O),T||(i("update:visible",O),i("visibleChange",O),i("update:open",O),i("openChange",O))};r({getPopupDomNode:()=>f.value.getPopupDomNode(),open:d,forcePopupAlign:()=>{var O;return(O=f.value)===null||O===void 0?void 0:O.forcePopupAlign()}});const v=L(()=>{var O;const{builtinPlacements:T,autoAdjustOverflow:M,arrow:I,arrowPointAtCenter:k}=t;let E=k;return typeof I=="object"&&(E=(O=I.pointAtCenter)!==null&&O!==void 0?O:k),T||K1({arrowPointAtCenter:E,autoAdjustOverflow:M})}),b=O=>O||O==="",y=O=>{const T=O.type;if(typeof T=="object"&&O.props&&((T.__ANT_BUTTON===!0||T==="button")&&b(O.props.disabled)||T.__ANT_SWITCH===!0&&(b(O.props.disabled)||b(O.props.loading))||T.__ANT_RADIO===!0&&b(O.props.disabled))){const{picked:M,omitted:I}=rQ(Hk(O),["position","left","right","top","bottom","float","display","zIndex"]),k=A(A({display:"inline-block"},M),{cursor:"not-allowed",lineHeight:1,width:O.props&&O.props.block?"100%":void 0}),E=A(A({},I),{pointerEvents:"none"}),R=At(O,{style:E},!0);return C("span",{style:k,class:`${a.value}-disabled-compatible-wrapper`},[R])}return O},w=()=>{var O,T;return(O=t.title)!==null&&O!==void 0?O:(T=n.title)===null||T===void 0?void 0:T.call(n)},x=(O,T)=>{const M=v.value,I=Object.keys(M).find(k=>{var E,R;return M[k].points[0]===((E=T.points)===null||E===void 0?void 0:E[0])&&M[k].points[1]===((R=T.points)===null||R===void 0?void 0:R[1])});if(I){const k=O.getBoundingClientRect(),E={top:"50%",left:"50%"};I.indexOf("top")>=0||I.indexOf("Bottom")>=0?E.top=`${k.height-T.offset[1]}px`:(I.indexOf("Top")>=0||I.indexOf("bottom")>=0)&&(E.top=`${-T.offset[1]}px`),I.indexOf("left")>=0||I.indexOf("Right")>=0?E.left=`${k.width-T.offset[0]}px`:(I.indexOf("right")>=0||I.indexOf("Left")>=0)&&(E.left=`${-T.offset[0]}px`),O.style.transformOrigin=`${E.left} ${E.top}`}},$=L(()=>nQ(a.value,t.color)),S=L(()=>o["data-popover-inject"]),[_,P]=oQ(a,L(()=>!S.value));return()=>{var O,T;const{openClassName:M,overlayClassName:I,overlayStyle:k,overlayInnerStyle:E}=t;let R=(T=Kt((O=n.default)===null||O===void 0?void 0:O.call(n)))!==null&&T!==void 0?T:null;R=R.length===1?R[0]:R;let D=d.value;if(u.value===void 0&&p()&&(D=!1),!R)return null;const F=y(cn(R)&&!o7(R)?R:C("span",null,[R])),N=ce({[M||`${a.value}-open`]:!0,[F.props&&F.props.class]:F.props&&F.props.class}),B=ce(I,{[`${a.value}-rtl`]:l.value==="rtl"},$.value.className,P.value),z=A(A({},$.value.overlayStyle),E),W=$.value.arrowStyle,j=A(A(A({},o),t),{prefixCls:a.value,arrow:!!t.arrow,getPopupContainer:s==null?void 0:s.value,builtinPlacements:v.value,visible:D,ref:f,overlayClassName:B,overlayStyle:A(A({},W),k),overlayInnerStyle:z,onVisibleChange:g,onPopupAlign:x,transitionName:oi(c.value,"zoom-big-fast",t.transitionName)});return _(C(qJ,j,{default:()=>[d.value?At(F,{class:N}):F],arrowContent:()=>C("span",{class:`${a.value}-arrow-content`},null),overlay:w}))}}}),Pi=Vt(aQ),sQ=t=>{const{componentCls:e,popoverBg:n,popoverColor:i,width:o,fontWeightStrong:r,popoverPadding:a,boxShadowSecondary:s,colorTextHeading:l,borderRadiusLG:c,zIndexPopup:u,marginXS:d,colorBgElevated:f}=t;return[{[e]:A(A({},rt(t)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:u,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text","--antd-arrow-background-color":f,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${e}-content`]:{position:"relative"},[`${e}-inner`]:{backgroundColor:n,backgroundClip:"padding-box",borderRadius:c,boxShadow:s,padding:a},[`${e}-title`]:{minWidth:o,marginBottom:d,color:l,fontWeight:r},[`${e}-inner-content`]:{color:i}})},q1(t,{colorBg:"var(--antd-arrow-background-color)"}),{[`${e}-pure`]:{position:"relative",maxWidth:"none",[`${e}-content`]:{display:"inline-block"}}}]},lQ=t=>{const{componentCls:e}=t;return{[e]:fd.map(n=>{const i=t[`${n}-6`];return{[`&${e}-${n}`]:{"--antd-arrow-background-color":i,[`${e}-inner`]:{backgroundColor:i},[`${e}-arrow`]:{background:"transparent"}}}})}},cQ=t=>{const{componentCls:e,lineWidth:n,lineType:i,colorSplit:o,paddingSM:r,controlHeight:a,fontSize:s,lineHeight:l,padding:c}=t,u=a-Math.round(s*l),d=u/2,f=u/2-n,h=c;return{[e]:{[`${e}-inner`]:{padding:0},[`${e}-title`]:{margin:0,padding:`${d}px ${h}px ${f}px`,borderBottom:`${n}px ${i} ${o}`},[`${e}-inner-content`]:{padding:`${r}px ${h}px`}}}},uQ=et("Popover",t=>{const{colorBgElevated:e,colorText:n,wireframe:i}=t,o=Ve(t,{popoverBg:e,popoverColor:n,popoverPadding:12});return[sQ(o),lQ(o),i&&cQ(o),Ec(o,"zoom-big")]},t=>{let{zIndexPopupBase:e}=t;return{zIndexPopup:e+30,width:177}}),dQ=()=>A(A({},G1()),{content:Rt(),title:Rt()}),fQ=oe({compatConfig:{MODE:3},name:"APopover",inheritAttrs:!1,props:ct(dQ(),A(A({},c3()),{trigger:"hover",placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1})),setup(t,e){let{expose:n,slots:i,attrs:o}=e;const r=se();Gi(t.visible===void 0),n({getPopupDomNode:()=>{var f,h;return(h=(f=r.value)===null||f===void 0?void 0:f.getPopupDomNode)===null||h===void 0?void 0:h.call(f)}});const{prefixCls:a,configProvider:s}=Me("popover",t),[l,c]=uQ(a),u=L(()=>s.getPrefixCls()),d=()=>{var f,h;const{title:p=Kt((f=i.title)===null||f===void 0?void 0:f.call(i)),content:g=Kt((h=i.content)===null||h===void 0?void 0:h.call(i))}=t,m=!!(Array.isArray(p)?p.length:p),v=!!(Array.isArray(g)?g.length:p);return!m&&!v?null:C(Qe,null,[m&&C("div",{class:`${a.value}-title`},[p]),C("div",{class:`${a.value}-inner-content`},[g])])};return()=>{const f=ce(t.overlayClassName,c.value);return l(C(Pi,H(H(H({},ht(t,["title","content"])),o),{},{prefixCls:a.value,ref:r,overlayClassName:f,transitionName:oi(u.value,"zoom-big",t.transitionName),"data-popover-inject":!0}),{title:d,default:i.default}))}}}),Z1=Vt(fQ),hQ=()=>({prefixCls:String,maxCount:Number,maxStyle:{type:Object,default:void 0},maxPopoverPlacement:{type:String,default:"top"},maxPopoverTrigger:String,size:{type:[Number,String,Object],default:"default"},shape:{type:String,default:"circle"}}),Vp=oe({compatConfig:{MODE:3},name:"AAvatarGroup",inheritAttrs:!1,props:hQ(),setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,direction:r}=Me("avatar",t),a=L(()=>`${o.value}-group`),[s,l]=o3(o);return Ke(()=>{const c={size:t.size,shape:t.shape};XJ(c)}),()=>{const{maxPopoverPlacement:c="top",maxCount:u,maxStyle:d,maxPopoverTrigger:f="hover",shape:h}=t,p={[a.value]:!0,[`${a.value}-rtl`]:r.value==="rtl",[`${i.class}`]:!!i.class,[l.value]:!0},g=gn(n,t),m=Dt(g).map((b,y)=>At(b,{key:`avatar-key-${y}`})),v=m.length;if(u&&u[C(Ss,{style:d,shape:h},{default:()=>[`+${v-u}`]})]})),s(C("div",H(H({},i),{},{class:p,style:i.style}),[b]))}return s(C("div",H(H({},i),{},{class:p,style:i.style}),[m]))}}});Ss.Group=Vp;Ss.install=function(t){return t.component(Ss.name,Ss),t.component(Vp.name,Vp),t};function P2(t){let{prefixCls:e,value:n,current:i,offset:o=0}=t,r;return o&&(r={position:"absolute",top:`${o}00%`,left:0}),C("p",{style:r,class:ce(`${e}-only-unit`,{current:i})},[n])}function pQ(t,e,n){let i=t,o=0;for(;(i+10)%10!==e;)i+=n,o+=n;return o}const gQ=oe({compatConfig:{MODE:3},name:"SingleNumber",props:{prefixCls:String,value:String,count:Number},setup(t){const e=L(()=>Number(t.value)),n=L(()=>Math.abs(t.count)),i=$t({prevValue:e.value,prevCount:n.value}),o=()=>{i.prevValue=e.value,i.prevCount=n.value},r=se();return ye(e,()=>{clearTimeout(r.value),r.value=setTimeout(()=>{o()},1e3)},{flush:"post"}),Xn(()=>{clearTimeout(r.value)}),()=>{let a,s={};const l=e.value;if(i.prevValue===l||Number.isNaN(l)||Number.isNaN(i.prevValue))a=[P2(A(A({},t),{current:!0}))],s={transition:"none"};else{a=[];const c=l+10,u=[];for(let h=l;h<=c;h+=1)u.push(h);const d=u.findIndex(h=>h%10===i.prevValue);a=u.map((h,p)=>{const g=h%10;return P2(A(A({},t),{value:g,offset:p-d,current:p===d}))});const f=i.prevCounto()},[a])}}});var mQ=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{var r;const a=A(A({},t),n),{prefixCls:s,count:l,title:c,show:u,component:d="sup",class:f,style:h}=a,p=mQ(a,["prefixCls","count","title","show","component","class","style"]),g=A(A({},p),{style:h,"data-show":t.show,class:ce(o.value,f),title:c});let m=l;if(l&&Number(l)%1===0){const b=String(l).split("");m=b.map((y,w)=>C(gQ,{prefixCls:o.value,count:Number(l),value:y,key:b.length-w},null))}h&&h.borderColor&&(g.style=A(A({},h),{boxShadow:`0 0 0 1px ${h.borderColor} inset`}));const v=Kt((r=i.default)===null||r===void 0?void 0:r.call(i));return v&&v.length?At(v,{class:ce(`${o.value}-custom-component`)},!1):C(d,g,{default:()=>[m]})}}}),yQ=new mt("antStatusProcessing",{"0%":{transform:"scale(0.8)",opacity:.5},"100%":{transform:"scale(2.4)",opacity:0}}),xQ=new mt("antZoomBadgeIn",{"0%":{transform:"scale(0) translate(50%, -50%)",opacity:0},"100%":{transform:"scale(1) translate(50%, -50%)"}}),wQ=new mt("antZoomBadgeOut",{"0%":{transform:"scale(1) translate(50%, -50%)"},"100%":{transform:"scale(0) translate(50%, -50%)",opacity:0}}),SQ=new mt("antNoWrapperZoomBadgeIn",{"0%":{transform:"scale(0)",opacity:0},"100%":{transform:"scale(1)"}}),CQ=new mt("antNoWrapperZoomBadgeOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0)",opacity:0}}),$Q=new mt("antBadgeLoadingCircle",{"0%":{transformOrigin:"50%"},"100%":{transform:"translate(50%, -50%) rotate(360deg)",transformOrigin:"50%"}}),AQ=t=>{const{componentCls:e,iconCls:n,antCls:i,badgeFontHeight:o,badgeShadowSize:r,badgeHeightSm:a,motionDurationSlow:s,badgeStatusSize:l,marginXS:c,badgeRibbonOffset:u}=t,d=`${i}-scroll-number`,f=`${i}-ribbon`,h=`${i}-ribbon-wrapper`,p=Op(t,(m,v)=>{let{darkColor:b}=v;return{[`&${e} ${e}-color-${m}`]:{background:b,[`&:not(${e}-count)`]:{color:b}}}}),g=Op(t,(m,v)=>{let{darkColor:b}=v;return{[`&${f}-color-${m}`]:{background:b,color:b}}});return{[e]:A(A(A(A({},rt(t)),{position:"relative",display:"inline-block",width:"fit-content",lineHeight:1,[`${e}-count`]:{zIndex:t.badgeZIndex,minWidth:t.badgeHeight,height:t.badgeHeight,color:t.badgeTextColor,fontWeight:t.badgeFontWeight,fontSize:t.badgeFontSize,lineHeight:`${t.badgeHeight}px`,whiteSpace:"nowrap",textAlign:"center",background:t.badgeColor,borderRadius:t.badgeHeight/2,boxShadow:`0 0 0 ${r}px ${t.badgeShadowColor}`,transition:`background ${t.motionDurationMid}`,a:{color:t.badgeTextColor},"a:hover":{color:t.badgeTextColor},"a:hover &":{background:t.badgeColorHover}},[`${e}-count-sm`]:{minWidth:a,height:a,fontSize:t.badgeFontSizeSm,lineHeight:`${a}px`,borderRadius:a/2},[`${e}-multiple-words`]:{padding:`0 ${t.paddingXS}px`},[`${e}-dot`]:{zIndex:t.badgeZIndex,width:t.badgeDotSize,minWidth:t.badgeDotSize,height:t.badgeDotSize,background:t.badgeColor,borderRadius:"100%",boxShadow:`0 0 0 ${r}px ${t.badgeShadowColor}`},[`${e}-dot${d}`]:{transition:`background ${s}`},[`${e}-count, ${e}-dot, ${d}-custom-component`]:{position:"absolute",top:0,insetInlineEnd:0,transform:"translate(50%, -50%)",transformOrigin:"100% 0%",[`&${n}-spin`]:{animationName:$Q,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&${e}-status`]:{lineHeight:"inherit",verticalAlign:"baseline",[`${e}-status-dot`]:{position:"relative",top:-1,display:"inline-block",width:l,height:l,verticalAlign:"middle",borderRadius:"50%"},[`${e}-status-success`]:{backgroundColor:t.colorSuccess},[`${e}-status-processing`]:{overflow:"visible",color:t.colorPrimary,backgroundColor:t.colorPrimary,"&::after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderWidth:r,borderStyle:"solid",borderColor:"inherit",borderRadius:"50%",animationName:yQ,animationDuration:t.badgeProcessingDuration,animationIterationCount:"infinite",animationTimingFunction:"ease-in-out",content:'""'}},[`${e}-status-default`]:{backgroundColor:t.colorTextPlaceholder},[`${e}-status-error`]:{backgroundColor:t.colorError},[`${e}-status-warning`]:{backgroundColor:t.colorWarning},[`${e}-status-text`]:{marginInlineStart:c,color:t.colorText,fontSize:t.fontSize}}}),p),{[`${e}-zoom-appear, ${e}-zoom-enter`]:{animationName:xQ,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`${e}-zoom-leave`]:{animationName:wQ,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack,animationFillMode:"both"},[`&${e}-not-a-wrapper`]:{[`${e}-zoom-appear, ${e}-zoom-enter`]:{animationName:SQ,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`${e}-zoom-leave`]:{animationName:CQ,animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseOutBack},[`&:not(${e}-status)`]:{verticalAlign:"middle"},[`${d}-custom-component, ${e}-count`]:{transform:"none"},[`${d}-custom-component, ${d}`]:{position:"relative",top:"auto",display:"block",transformOrigin:"50% 50%"}},[`${d}`]:{overflow:"hidden",[`${d}-only`]:{position:"relative",display:"inline-block",height:t.badgeHeight,transition:`all ${t.motionDurationSlow} ${t.motionEaseOutBack}`,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden",[`> p${d}-only-unit`]:{height:t.badgeHeight,margin:0,WebkitTransformStyle:"preserve-3d",WebkitBackfaceVisibility:"hidden"}},[`${d}-symbol`]:{verticalAlign:"top"}},"&-rtl":{direction:"rtl",[`${e}-count, ${e}-dot, ${d}-custom-component`]:{transform:"translate(-50%, -50%)"}}}),[`${h}`]:{position:"relative"},[`${f}`]:A(A(A(A({},rt(t)),{position:"absolute",top:c,padding:`0 ${t.paddingXS}px`,color:t.colorPrimary,lineHeight:`${o}px`,whiteSpace:"nowrap",backgroundColor:t.colorPrimary,borderRadius:t.borderRadiusSM,[`${f}-text`]:{color:t.colorTextLightSolid},[`${f}-corner`]:{position:"absolute",top:"100%",width:u,height:u,color:"currentcolor",border:`${u/2}px solid`,transform:t.badgeRibbonCornerTransform,transformOrigin:"top",filter:t.badgeRibbonCornerFilter}}),g),{[`&${f}-placement-end`]:{insetInlineEnd:-u,borderEndEndRadius:0,[`${f}-corner`]:{insetInlineEnd:0,borderInlineEndColor:"transparent",borderBlockEndColor:"transparent"}},[`&${f}-placement-start`]:{insetInlineStart:-u,borderEndStartRadius:0,[`${f}-corner`]:{insetInlineStart:0,borderBlockEndColor:"transparent",borderInlineStartColor:"transparent"}},"&-rtl":{direction:"rtl"}})}},u3=et("Badge",t=>{const{fontSize:e,lineHeight:n,fontSizeSM:i,lineWidth:o,marginXS:r,colorBorderBg:a}=t,s=Math.round(e*n),l=o,c="auto",u=s-2*l,d=t.colorBgContainer,f="normal",h=i,p=t.colorError,g=t.colorErrorHover,m=e,v=i/2,b=i,y=i/2,w=Ve(t,{badgeFontHeight:s,badgeShadowSize:l,badgeZIndex:c,badgeHeight:u,badgeTextColor:d,badgeFontWeight:f,badgeFontSize:h,badgeColor:p,badgeColorHover:g,badgeShadowColor:a,badgeHeightSm:m,badgeDotSize:v,badgeFontSizeSm:b,badgeStatusSize:y,badgeProcessingDuration:"1.2s",badgeRibbonOffset:r,badgeRibbonCornerTransform:"scaleY(0.75)",badgeRibbonCornerFilter:"brightness(75%)"});return[AQ(w)]});var _Q=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o({prefix:String,color:{type:String},text:Z.any,placement:{type:String,default:"end"}}),Xp=oe({compatConfig:{MODE:3},name:"ABadgeRibbon",inheritAttrs:!1,props:PQ(),slots:Object,setup(t,e){let{attrs:n,slots:i}=e;const{prefixCls:o,direction:r}=Me("ribbon",t),[a,s]=u3(o),l=L(()=>Nm(t.color,!1)),c=L(()=>[o.value,`${o.value}-placement-${t.placement}`,{[`${o.value}-rtl`]:r.value==="rtl",[`${o.value}-color-${t.color}`]:l.value}]);return()=>{var u,d;const{class:f,style:h}=n,p=_Q(n,["class","style"]),g={},m={};return t.color&&!l.value&&(g.background=t.color,m.color=t.color),a(C("div",H({class:`${o.value}-wrapper ${s.value}`},p),[(u=i.default)===null||u===void 0?void 0:u.call(i),C("div",{class:[c.value,f,s.value],style:A(A({},g),h)},[C("span",{class:`${o.value}-text`},[t.text||((d=i.text)===null||d===void 0?void 0:d.call(i))]),C("div",{class:`${o.value}-corner`,style:m},null)])]))}}}),Yp=t=>!isNaN(parseFloat(t))&&isFinite(t),TQ=()=>({count:Z.any.def(null),showZero:{type:Boolean,default:void 0},overflowCount:{type:Number,default:99},dot:{type:Boolean,default:void 0},prefixCls:String,scrollNumberPrefixCls:String,status:{type:String},size:{type:String,default:"default"},color:String,text:Z.any,offset:Array,numberStyle:{type:Object,default:void 0},title:String}),Fu=oe({compatConfig:{MODE:3},name:"ABadge",Ribbon:Xp,inheritAttrs:!1,props:TQ(),slots:Object,setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,direction:r}=Me("badge",t),[a,s]=u3(o),l=L(()=>t.count>t.overflowCount?`${t.overflowCount}+`:t.count),c=L(()=>l.value==="0"||l.value===0),u=L(()=>t.count===null||c.value&&!t.showZero),d=L(()=>(t.status!==null&&t.status!==void 0||t.color!==null&&t.color!==void 0)&&u.value),f=L(()=>t.dot&&!c.value),h=L(()=>f.value?"":l.value),p=L(()=>(h.value===null||h.value===void 0||h.value===""||c.value&&!t.showZero)&&!f.value),g=se(t.count),m=se(h.value),v=se(f.value);ye([()=>t.count,h,f],()=>{p.value||(g.value=t.count,m.value=h.value,v.value=f.value)},{immediate:!0});const b=L(()=>Nm(t.color,!1)),y=L(()=>({[`${o.value}-status-dot`]:d.value,[`${o.value}-status-${t.status}`]:!!t.status,[`${o.value}-color-${t.color}`]:b.value})),w=L(()=>t.color&&!b.value?{background:t.color,color:t.color}:{}),x=L(()=>({[`${o.value}-dot`]:v.value,[`${o.value}-count`]:!v.value,[`${o.value}-count-sm`]:t.size==="small",[`${o.value}-multiple-words`]:!v.value&&m.value&&m.value.toString().length>1,[`${o.value}-status-${t.status}`]:!!t.status,[`${o.value}-color-${t.color}`]:b.value}));return()=>{var $,S;const{offset:_,title:P,color:O}=t,T=i.style,M=gn(n,t,"text"),I=o.value,k=g.value;let E=Dt(($=n.default)===null||$===void 0?void 0:$.call(n));E=E.length?E:null;const R=!!(!p.value||n.count),D=(()=>{if(!_)return A({},T);const U={marginTop:Yp(_[1])?`${_[1]}px`:_[1]};return r.value==="rtl"?U.left=`${parseInt(_[0],10)}px`:U.right=`${-parseInt(_[0],10)}px`,A(A({},U),T)})(),F=P??(typeof k=="string"||typeof k=="number"?k:void 0),N=R||!M?null:C("span",{class:`${I}-status-text`},[M]),B=typeof k=="object"||k===void 0&&n.count?At(k??((S=n.count)===null||S===void 0?void 0:S.call(n)),{style:D},!1):null,z=ce(I,{[`${I}-status`]:d.value,[`${I}-not-a-wrapper`]:!E,[`${I}-rtl`]:r.value==="rtl"},i.class,s.value);if(!E&&d.value){const U=D.color;return a(C("span",H(H({},i),{},{class:z,style:D}),[C("span",{class:y.value,style:w.value},null),C("span",{style:{color:U},class:`${I}-status-text`},[M])]))}const W=yo(E?`${I}-zoom`:"",{appear:!1});let j=A(A({},D),t.numberStyle);return O&&!b.value&&(j=j||{},j.background=O),a(C("span",H(H({},i),{},{class:z}),[E,C(En,W,{default:()=>[ni(C(bQ,{prefixCls:t.scrollNumberPrefixCls,show:R,class:x.value,count:m.value,title:F,style:j,key:"scrollNumber"},{default:()=>[B]}),[[vi,R]])]}),N]))}}});Fu.install=function(t){return t.component(Fu.name,Fu),t.component(Xp.name,Xp),t};const hl={adjustX:1,adjustY:1},pl=[0,0],OQ={topLeft:{points:["bl","tl"],overflow:hl,offset:[0,-4],targetOffset:pl},topCenter:{points:["bc","tc"],overflow:hl,offset:[0,-4],targetOffset:pl},topRight:{points:["br","tr"],overflow:hl,offset:[0,-4],targetOffset:pl},bottomLeft:{points:["tl","bl"],overflow:hl,offset:[0,4],targetOffset:pl},bottomCenter:{points:["tc","bc"],overflow:hl,offset:[0,4],targetOffset:pl},bottomRight:{points:["tr","br"],overflow:hl,offset:[0,4],targetOffset:pl}};var EQ=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);ot.visible,h=>{h!==void 0&&(r.value=h)});const a=se();o({triggerRef:a});const s=h=>{t.visible===void 0&&(r.value=!1),i("overlayClick",h)},l=h=>{t.visible===void 0&&(r.value=h),i("visibleChange",h)},c=()=>{var h;const p=(h=n.overlay)===null||h===void 0?void 0:h.call(n),g={prefixCls:`${t.prefixCls}-menu`,onClick:s};return C(Qe,{key:Nk},[t.arrow&&C("div",{class:`${t.prefixCls}-arrow`},null),At(p,g,!1)])},u=L(()=>{const{minOverlayWidthMatchTrigger:h=!t.alignPoint}=t;return h}),d=()=>{var h;const p=(h=n.default)===null||h===void 0?void 0:h.call(n);return r.value&&p?At(p[0],{class:t.openClassName||`${t.prefixCls}-open`},!1):p},f=L(()=>!t.hideAction&&t.trigger.indexOf("contextmenu")!==-1?["click"]:t.hideAction);return()=>{const{prefixCls:h,arrow:p,showAction:g,overlayStyle:m,trigger:v,placement:b,align:y,getPopupContainer:w,transitionName:x,animation:$,overlayClassName:S}=t,_=EQ(t,["prefixCls","arrow","showAction","overlayStyle","trigger","placement","align","getPopupContainer","transitionName","animation","overlayClassName"]);return C(tl,H(H({},_),{},{prefixCls:h,ref:a,popupClassName:ce(S,{[`${h}-show-arrow`]:p}),popupStyle:m,builtinPlacements:OQ,action:v,showAction:g,hideAction:f.value||[],popupPlacement:b,popupAlign:y,popupTransitionName:x,popupAnimation:$,popupVisible:r.value,stretch:u.value?"minWidth":"",onPopupVisibleChange:l,getPopupContainer:w}),{popup:c,default:d})}}}),MQ=t=>{const{componentCls:e,colorPrimary:n}=t;return{[e]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${n})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${t.motionEaseOutCirc}`,`opacity 2s ${t.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0}}}}},IQ=et("Wave",t=>[MQ(t)]);function kQ(t){const e=(t||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);return e&&e[1]&&e[2]&&e[3]?!(e[1]===e[2]&&e[2]===e[3]):!0}function wb(t){return t&&t!=="#fff"&&t!=="#ffffff"&&t!=="rgb(255, 255, 255)"&&t!=="rgba(255, 255, 255, 1)"&&kQ(t)&&!/rgba\((?:\d*, ){3}0\)/.test(t)&&t!=="transparent"}function DQ(t){const{borderTopColor:e,borderColor:n,backgroundColor:i}=getComputedStyle(t);return wb(e)?e:wb(n)?n:wb(i)?i:null}function Sb(t){return Number.isNaN(t)?0:t}const RQ=oe({props:{target:Fe(),className:String},setup(t){const e=ie(null),[n,i]=Mt(null),[o,r]=Mt([]),[a,s]=Mt(0),[l,c]=Mt(0),[u,d]=Mt(0),[f,h]=Mt(0),[p,g]=Mt(!1);function m(){const{target:S}=t,_=getComputedStyle(S);i(DQ(S));const P=_.position==="static",{borderLeftWidth:O,borderTopWidth:T}=_;s(P?S.offsetLeft:Sb(-parseFloat(O))),c(P?S.offsetTop:Sb(-parseFloat(T))),d(S.offsetWidth),h(S.offsetHeight);const{borderTopLeftRadius:M,borderTopRightRadius:I,borderBottomLeftRadius:k,borderBottomRightRadius:E}=_;r([M,I,E,k].map(R=>Sb(parseFloat(R))))}let v,b,y;const w=()=>{clearTimeout(y),lt.cancel(b),v==null||v.disconnect()},x=()=>{var S;const _=(S=e.value)===null||S===void 0?void 0:S.parentElement;_&&(Pa(null,_),_.parentElement&&_.parentElement.removeChild(_))};Ze(()=>{w(),y=setTimeout(()=>{x()},5e3);const{target:S}=t;S&&(b=lt(()=>{m(),g(!0)}),typeof ResizeObserver<"u"&&(v=new ResizeObserver(m),v.observe(S)))}),at(()=>{w()});const $=S=>{S.propertyName==="opacity"&&x()};return()=>{if(!p.value)return null;const S={left:`${a.value}px`,top:`${l.value}px`,width:`${u.value}px`,height:`${f.value}px`,borderRadius:o.value.map(_=>`${_}px`).join(" ")};return n&&(S["--wave-color"]=n.value),C(En,{appear:!0,name:"wave-motion",appearFromClass:"wave-motion-appear",appearActiveClass:"wave-motion-appear",appearToClass:"wave-motion-appear wave-motion-appear-active"},{default:()=>[C("div",{ref:e,class:t.className,style:S,onTransitionend:$},null)]})}}});function LQ(t,e){const n=document.createElement("div");return n.style.position="absolute",n.style.left="0px",n.style.top="0px",t==null||t.insertBefore(n,t==null?void 0:t.firstChild),Pa(C(RQ,{target:t,className:e},null),n),()=>{Pa(null,n),n.parentElement&&n.parentElement.removeChild(n)}}function FQ(t,e){const n=Cn();let i;function o(){var r;const a=gi(n);i==null||i(),!(!((r=e==null?void 0:e.value)===null||r===void 0)&&r.disabled||!a)&&(i=LQ(a,t.value))}return at(()=>{i==null||i()}),o}const J1=oe({compatConfig:{MODE:3},name:"Wave",props:{disabled:Boolean},setup(t,e){let{slots:n}=e;const i=Cn(),{prefixCls:o,wave:r}=Me("wave",t),[,a]=IQ(o),s=FQ(L(()=>ce(o.value,a.value)),r);let l;const c=()=>{gi(i).removeEventListener("click",l,!0)};return Ze(()=>{ye(()=>t.disabled,()=>{c(),pt(()=>{const u=gi(i);u==null||u.removeEventListener("click",l,!0),!(!u||u.nodeType!==1||t.disabled)&&(l=d=>{d.target.tagName==="INPUT"||!mm(d.target)||!u.getAttribute||u.getAttribute("disabled")||u.disabled||u.className.includes("disabled")||u.className.includes("-leave")||s()},u.addEventListener("click",l,!0))})},{immediate:!0,flush:"post"})}),at(()=>{c()}),()=>{var u;return(u=n.default)===null||u===void 0?void 0:u.call(n)[0]}}});function Gp(t){return t==="danger"?{danger:!0}:{type:t}}const f3=()=>({prefixCls:String,type:String,htmlType:{type:String,default:"button"},shape:{type:String},size:{type:String},loading:{type:[Boolean,Object],default:()=>!1},disabled:{type:Boolean,default:void 0},ghost:{type:Boolean,default:void 0},block:{type:Boolean,default:void 0},danger:{type:Boolean,default:void 0},icon:Z.any,href:String,target:String,title:String,onClick:Ms(),onMousedown:Ms()}),T2=t=>{t&&(t.style.width="0px",t.style.opacity="0",t.style.transform="scale(0)")},O2=t=>{pt(()=>{t&&(t.style.width=`${t.scrollWidth}px`,t.style.opacity="1",t.style.transform="scale(1)")})},E2=t=>{t&&t.style&&(t.style.width=null,t.style.opacity=null,t.style.transform=null)},NQ=oe({compatConfig:{MODE:3},name:"LoadingIcon",props:{prefixCls:String,loading:[Boolean,Object],existIcon:Boolean},setup(t){return()=>{const{existIcon:e,prefixCls:n,loading:i}=t;if(e)return C("span",{class:`${n}-loading-icon`},[C(yi,null,null)]);const o=!!i;return C(En,{name:`${n}-loading-icon-motion`,onBeforeEnter:T2,onEnter:O2,onAfterEnter:E2,onBeforeLeave:O2,onLeave:r=>{setTimeout(()=>{T2(r)})},onAfterLeave:E2},{default:()=>[o?C("span",{class:`${n}-loading-icon`},[C(yi,null,null)]):null]})}}}),M2=(t,e)=>({[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{"&:not(:disabled)":{borderInlineEndColor:e}}},"&:not(:first-child)":{[`&, & > ${t}`]:{"&:not(:disabled)":{borderInlineStartColor:e}}}}}),BQ=t=>{const{componentCls:e,fontSize:n,lineWidth:i,colorPrimaryHover:o,colorErrorHover:r}=t;return{[`${e}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:-i,[`&, & > ${e}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[e]:{position:"relative",zIndex:1,"&:hover,\n &:focus,\n &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${e}-icon-only`]:{fontSize:n}},M2(`${e}-primary`,o),M2(`${e}-danger`,r)]}};function zQ(t,e){return{[`&-item:not(${e}-last-item)`]:{marginBottom:-t.lineWidth},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}}function HQ(t,e){return{[`&-item:not(${e}-first-item):not(${e}-last-item)`]:{borderRadius:0},[`&-item${e}-first-item:not(${e}-last-item)`]:{[`&, &${t}-sm, &${t}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${e}-last-item:not(${e}-first-item)`]:{[`&, &${t}-sm, &${t}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function WQ(t){const e=`${t.componentCls}-compact-vertical`;return{[e]:A(A({},zQ(t,e)),HQ(t.componentCls,e))}}const jQ=t=>{const{componentCls:e,iconCls:n}=t;return{[e]:{outline:"none",position:"relative",display:"inline-block",fontWeight:400,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",backgroundColor:"transparent",border:`${t.lineWidth}px ${t.lineType} transparent`,cursor:"pointer",transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",lineHeight:t.lineHeight,color:t.colorText,"> span":{display:"inline-block"},[`> ${n} + span, > span + ${n}`]:{marginInlineStart:t.marginXS},"> a":{color:"currentColor"},"&:not(:disabled)":A({},Hr(t)),[`&-icon-only${e}-compact-item`]:{flex:"none"},[`&-compact-item${e}-primary`]:{[`&:not([disabled]) + ${e}-compact-item${e}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:-t.lineWidth,insetInlineStart:-t.lineWidth,display:"inline-block",width:t.lineWidth,height:`calc(100% + ${t.lineWidth*2}px)`,backgroundColor:t.colorPrimaryHover,content:'""'}}},"&-compact-vertical-item":{[`&${e}-primary`]:{[`&:not([disabled]) + ${e}-compact-vertical-item${e}-primary:not([disabled])`]:{position:"relative","&:before":{position:"absolute",top:-t.lineWidth,insetInlineStart:-t.lineWidth,display:"inline-block",width:`calc(100% + ${t.lineWidth*2}px)`,height:t.lineWidth,backgroundColor:t.colorPrimaryHover,content:'""'}}}}}}},Wr=(t,e)=>({"&:not(:disabled)":{"&:hover":t,"&:active":e}}),VQ=t=>({minWidth:t.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),XQ=t=>({borderRadius:t.controlHeight,paddingInlineStart:t.controlHeight/2,paddingInlineEnd:t.controlHeight/2}),My=t=>({cursor:"not-allowed",borderColor:t.colorBorder,color:t.colorTextDisabled,backgroundColor:t.colorBgContainerDisabled,boxShadow:"none"}),Kp=(t,e,n,i,o,r,a)=>({[`&${t}-background-ghost`]:A(A({color:e||void 0,backgroundColor:"transparent",borderColor:n||void 0,boxShadow:"none"},Wr(A({backgroundColor:"transparent"},r),A({backgroundColor:"transparent"},a))),{"&:disabled":{cursor:"not-allowed",color:i||void 0,borderColor:o||void 0}})}),Q1=t=>({"&:disabled":A({},My(t))}),h3=t=>A({},Q1(t)),Up=t=>({"&:disabled":{cursor:"not-allowed",color:t.colorTextDisabled}}),p3=t=>A(A(A(A(A({},h3(t)),{backgroundColor:t.colorBgContainer,borderColor:t.colorBorder,boxShadow:`0 ${t.controlOutlineWidth}px 0 ${t.controlTmpOutline}`}),Wr({color:t.colorPrimaryHover,borderColor:t.colorPrimaryHover},{color:t.colorPrimaryActive,borderColor:t.colorPrimaryActive})),Kp(t.componentCls,t.colorBgContainer,t.colorBgContainer,t.colorTextDisabled,t.colorBorder)),{[`&${t.componentCls}-dangerous`]:A(A(A({color:t.colorError,borderColor:t.colorError},Wr({color:t.colorErrorHover,borderColor:t.colorErrorBorderHover},{color:t.colorErrorActive,borderColor:t.colorErrorActive})),Kp(t.componentCls,t.colorError,t.colorError,t.colorTextDisabled,t.colorBorder)),Q1(t))}),YQ=t=>A(A(A(A(A({},h3(t)),{color:t.colorTextLightSolid,backgroundColor:t.colorPrimary,boxShadow:`0 ${t.controlOutlineWidth}px 0 ${t.controlOutline}`}),Wr({color:t.colorTextLightSolid,backgroundColor:t.colorPrimaryHover},{color:t.colorTextLightSolid,backgroundColor:t.colorPrimaryActive})),Kp(t.componentCls,t.colorPrimary,t.colorPrimary,t.colorTextDisabled,t.colorBorder,{color:t.colorPrimaryHover,borderColor:t.colorPrimaryHover},{color:t.colorPrimaryActive,borderColor:t.colorPrimaryActive})),{[`&${t.componentCls}-dangerous`]:A(A(A({backgroundColor:t.colorError,boxShadow:`0 ${t.controlOutlineWidth}px 0 ${t.colorErrorOutline}`},Wr({backgroundColor:t.colorErrorHover},{backgroundColor:t.colorErrorActive})),Kp(t.componentCls,t.colorError,t.colorError,t.colorTextDisabled,t.colorBorder,{color:t.colorErrorHover,borderColor:t.colorErrorHover},{color:t.colorErrorActive,borderColor:t.colorErrorActive})),Q1(t))}),GQ=t=>A(A({},p3(t)),{borderStyle:"dashed"}),KQ=t=>A(A(A({color:t.colorLink},Wr({color:t.colorLinkHover},{color:t.colorLinkActive})),Up(t)),{[`&${t.componentCls}-dangerous`]:A(A({color:t.colorError},Wr({color:t.colorErrorHover},{color:t.colorErrorActive})),Up(t))}),UQ=t=>A(A(A({},Wr({color:t.colorText,backgroundColor:t.colorBgTextHover},{color:t.colorText,backgroundColor:t.colorBgTextActive})),Up(t)),{[`&${t.componentCls}-dangerous`]:A(A({color:t.colorError},Up(t)),Wr({color:t.colorErrorHover,backgroundColor:t.colorErrorBg},{color:t.colorErrorHover,backgroundColor:t.colorErrorBg}))}),qQ=t=>A(A({},My(t)),{[`&${t.componentCls}:hover`]:A({},My(t))}),ZQ=t=>{const{componentCls:e}=t;return{[`${e}-default`]:p3(t),[`${e}-primary`]:YQ(t),[`${e}-dashed`]:GQ(t),[`${e}-link`]:KQ(t),[`${e}-text`]:UQ(t),[`${e}-disabled`]:qQ(t)}},eS=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const{componentCls:n,iconCls:i,controlHeight:o,fontSize:r,lineHeight:a,lineWidth:s,borderRadius:l,buttonPaddingHorizontal:c}=t,u=Math.max(0,(o-r*a)/2-s),d=c-s,f=`${n}-icon-only`;return[{[`${n}${e}`]:{fontSize:r,height:o,padding:`${u}px ${d}px`,borderRadius:l,[`&${f}`]:{width:o,paddingInlineStart:0,paddingInlineEnd:0,[`&${n}-round`]:{width:"auto"},"> span":{transform:"scale(1.143)"}},[`&${n}-loading`]:{opacity:t.opacityLoading,cursor:"default"},[`${n}-loading-icon`]:{transition:`width ${t.motionDurationSlow} ${t.motionEaseInOut}, opacity ${t.motionDurationSlow} ${t.motionEaseInOut}`},[`&:not(${f}) ${n}-loading-icon > ${i}`]:{marginInlineEnd:t.marginXS}}},{[`${n}${n}-circle${e}`]:VQ(t)},{[`${n}${n}-round${e}`]:XQ(t)}]},JQ=t=>eS(t),QQ=t=>{const e=Ve(t,{controlHeight:t.controlHeightSM,padding:t.paddingXS,buttonPaddingHorizontal:8,borderRadius:t.borderRadiusSM});return eS(e,`${t.componentCls}-sm`)},eee=t=>{const e=Ve(t,{controlHeight:t.controlHeightLG,fontSize:t.fontSizeLG,borderRadius:t.borderRadiusLG});return eS(e,`${t.componentCls}-lg`)},tee=t=>{const{componentCls:e}=t;return{[e]:{[`&${e}-block`]:{width:"100%"}}}},nee=et("Button",t=>{const{controlTmpOutline:e,paddingContentHorizontal:n}=t,i=Ve(t,{colorOutlineDefault:e,buttonPaddingHorizontal:n});return[jQ(i),QQ(i),JQ(i),eee(i),tee(i),ZQ(i),BQ(i),Mc(t,{focus:!1}),WQ(t)]}),iee=()=>({prefixCls:String,size:{type:String}}),g3=E1(),qp=oe({compatConfig:{MODE:3},name:"AButtonGroup",props:iee(),setup(t,e){let{slots:n}=e;const{prefixCls:i,direction:o}=Me("btn-group",t),[,,r]=Xr();g3.useProvide($t({size:L(()=>t.size)}));const a=L(()=>{const{size:s}=t;let l="";switch(s){case"large":l="lg";break;case"small":l="sm";break;case"middle":case void 0:break;default:Nt(!s,"Button.Group","Invalid prop `size`.")}return{[`${i.value}`]:!0,[`${i.value}-${l}`]:l,[`${i.value}-rtl`]:o.value==="rtl",[r.value]:!0}});return()=>{var s;return C("div",{class:a.value},[Dt((s=n.default)===null||s===void 0?void 0:s.call(n))])}}}),I2=/^[\u4e00-\u9fa5]{2}$/,k2=I2.test.bind(I2);function Hf(t){return t==="text"||t==="link"}const nn=oe({compatConfig:{MODE:3},name:"AButton",inheritAttrs:!1,__ANT_BUTTON:!0,props:ct(f3(),{type:"default"}),slots:Object,setup(t,e){let{slots:n,attrs:i,emit:o,expose:r}=e;const{prefixCls:a,autoInsertSpaceInButton:s,direction:l,size:c}=Me("btn",t),[u,d]=nee(a),f=g3.useInject(),h=Oi(),p=L(()=>{var E;return(E=t.disabled)!==null&&E!==void 0?E:h.value}),g=ie(null),m=ie(void 0);let v=!1;const b=ie(!1),y=ie(!1),w=L(()=>s.value!==!1),{compactSize:x,compactItemClassnames:$}=Ra(a,l),S=L(()=>typeof t.loading=="object"&&t.loading.delay?t.loading.delay||!0:!!t.loading);ye(S,E=>{clearTimeout(m.value),typeof S.value=="number"?m.value=setTimeout(()=>{b.value=E},S.value):b.value=E},{immediate:!0});const _=L(()=>{const{type:E,shape:R="default",ghost:D,block:F,danger:N}=t,B=a.value,z={large:"lg",small:"sm",middle:void 0},W=x.value||(f==null?void 0:f.size)||c.value,j=W&&z[W]||"";return[$.value,{[d.value]:!0,[`${B}`]:!0,[`${B}-${R}`]:R!=="default"&&R,[`${B}-${E}`]:E,[`${B}-${j}`]:j,[`${B}-loading`]:b.value,[`${B}-background-ghost`]:D&&!Hf(E),[`${B}-two-chinese-chars`]:y.value&&w.value,[`${B}-block`]:F,[`${B}-dangerous`]:!!N,[`${B}-rtl`]:l.value==="rtl"}]}),P=()=>{const E=g.value;if(!E||s.value===!1)return;const R=E.textContent;v&&k2(R)?y.value||(y.value=!0):y.value&&(y.value=!1)},O=E=>{if(b.value||p.value){E.preventDefault();return}o("click",E)},T=E=>{o("mousedown",E)},M=(E,R)=>{const D=R?" ":"";if(E.type===Ma){let F=E.children.trim();return k2(F)&&(F=F.split("").join(D)),C("span",null,[F])}return E};return Ke(()=>{Nt(!(t.ghost&&Hf(t.type)),"Button","`link` or `text` button can't be a `ghost` button.")}),Ze(P),ri(P),at(()=>{m.value&&clearTimeout(m.value)}),r({focus:()=>{var E;(E=g.value)===null||E===void 0||E.focus()},blur:()=>{var E;(E=g.value)===null||E===void 0||E.blur()}}),()=>{var E,R;const{icon:D=(E=n.icon)===null||E===void 0?void 0:E.call(n)}=t,F=Dt((R=n.default)===null||R===void 0?void 0:R.call(n));v=F.length===1&&!D&&!Hf(t.type);const{type:N,htmlType:B,href:z,title:W,target:j}=t,U=b.value?"loading":D,V=A(A({},i),{title:W,disabled:p.value,class:[_.value,i.class,{[`${a.value}-icon-only`]:F.length===0&&!!U}],onClick:O,onMousedown:T});p.value||delete V.disabled;const q=D&&!b.value?D:C(NQ,{existIcon:!!D,prefixCls:a.value,loading:!!b.value},null),Y=F.map(Q=>M(Q,v&&w.value));if(z!==void 0)return u(C("a",H(H({},V),{},{href:z,target:j,ref:g}),[q,Y]));let J=C("button",H(H({},V),{},{ref:g,type:B}),[q,Y]);if(!Hf(N)){const Q=function(){return J}();J=C(J1,{ref:"wave",disabled:!!b.value},{default:()=>[Q]})}return u(J)}}});nn.Group=qp;nn.install=function(t){return t.component(nn.name,nn),t.component(qp.name,qp),t};const m3=()=>({arrow:Xe([Boolean,Object]),trigger:{type:[Array,String]},menu:Fe(),overlay:Z.any,visible:Ce(),open:Ce(),disabled:Ce(),danger:Ce(),autofocus:Ce(),align:Fe(),getPopupContainer:Function,prefixCls:String,transitionName:String,placement:String,overlayClassName:String,overlayStyle:Fe(),forceRender:Ce(),mouseEnterDelay:Number,mouseLeaveDelay:Number,openClassName:String,minOverlayWidthMatchTrigger:Ce(),destroyPopupOnHide:Ce(),onVisibleChange:{type:Function},"onUpdate:visible":{type:Function},onOpenChange:{type:Function},"onUpdate:open":{type:Function}}),Cb=f3(),oee=()=>A(A({},m3()),{type:Cb.type,size:String,htmlType:Cb.htmlType,href:String,disabled:Ce(),prefixCls:String,icon:Z.any,title:String,loading:Cb.loading,onClick:Ms()});var ree={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"};function D2(t){for(var e=1;e{const{componentCls:e,antCls:n,paddingXS:i,opacityLoading:o}=t;return{[`${e}-button`]:{whiteSpace:"nowrap",[`&${n}-btn-group > ${n}-btn`]:{[`&-loading, &-loading + ${n}-btn`]:{cursor:"default",pointerEvents:"none",opacity:o},[`&:last-child:not(:first-child):not(${n}-btn-icon-only)`]:{paddingInline:i}}}}},lee=t=>{const{componentCls:e,menuCls:n,colorError:i,colorTextLightSolid:o}=t,r=`${n}-item`;return{[`${e}, ${e}-menu-submenu`]:{[`${n} ${r}`]:{[`&${r}-danger:not(${r}-disabled)`]:{color:i,"&:hover":{color:o,backgroundColor:i}}}}}},cee=t=>{const{componentCls:e,menuCls:n,zIndexPopup:i,dropdownArrowDistance:o,dropdownArrowOffset:r,sizePopupArrow:a,antCls:s,iconCls:l,motionDurationMid:c,dropdownPaddingVertical:u,fontSize:d,dropdownEdgeChildPadding:f,colorTextDisabled:h,fontSizeIcon:p,controlPaddingHorizontal:g,colorBgElevated:m,boxShadowPopoverArrow:v}=t;return[{[e]:A(A({},rt(t)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:i,display:"block","&::before":{position:"absolute",insetBlock:-o+a/2,zIndex:-9999,opacity:1e-4,content:'""'},[`${e}-wrap`]:{position:"relative",[`${s}-btn > ${l}-down`]:{fontSize:p},[`${l}-down::before`]:{transition:`transform ${c}`}},[`${e}-wrap-open`]:{[`${l}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[` &-show-arrow${e}-placement-topLeft, &-show-arrow${e}-placement-top, &-show-arrow${e}-placement-topRight @@ -201,16 +201,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho &${s}-slide-down-enter${s}-slide-down-enter-active${e}-placement-bottom, &${s}-slide-down-appear${s}-slide-down-appear-active${e}-placement-bottom, &${s}-slide-down-enter${s}-slide-down-enter-active${e}-placement-bottomRight, - &${s}-slide-down-appear${s}-slide-down-appear-active${e}-placement-bottomRight`]:{animationName:Tm},[`&${s}-slide-up-enter${s}-slide-up-enter-active${e}-placement-topLeft, + &${s}-slide-down-appear${s}-slide-down-appear-active${e}-placement-bottomRight`]:{animationName:Om},[`&${s}-slide-up-enter${s}-slide-up-enter-active${e}-placement-topLeft, &${s}-slide-up-appear${s}-slide-up-appear-active${e}-placement-topLeft, &${s}-slide-up-enter${s}-slide-up-enter-active${e}-placement-top, &${s}-slide-up-appear${s}-slide-up-appear-active${e}-placement-top, &${s}-slide-up-enter${s}-slide-up-enter-active${e}-placement-topRight, - &${s}-slide-up-appear${s}-slide-up-appear-active${e}-placement-topRight`]:{animationName:Em},[`&${s}-slide-down-leave${s}-slide-down-leave-active${e}-placement-bottomLeft, + &${s}-slide-up-appear${s}-slide-up-appear-active${e}-placement-topRight`]:{animationName:Mm},[`&${s}-slide-down-leave${s}-slide-down-leave-active${e}-placement-bottomLeft, &${s}-slide-down-leave${s}-slide-down-leave-active${e}-placement-bottom, - &${s}-slide-down-leave${s}-slide-down-leave-active${e}-placement-bottomRight`]:{animationName:Om},[`&${s}-slide-up-leave${s}-slide-up-leave-active${e}-placement-topLeft, + &${s}-slide-down-leave${s}-slide-down-leave-active${e}-placement-bottomRight`]:{animationName:Em},[`&${s}-slide-up-leave${s}-slide-up-leave-active${e}-placement-topLeft, &${s}-slide-up-leave${s}-slide-up-leave-active${e}-placement-top, - &${s}-slide-up-leave${s}-slide-up-leave-active${e}-placement-topRight`]:{animationName:Mm}})},{[`${e} ${n}`]:{position:"relative",margin:0},[`${n}-submenu-popup`]:{position:"absolute",zIndex:i,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul,li":{listStyle:"none"},ul:{marginInline:"0.3em"}},[`${e}, ${e}-menu-submenu`]:{[n]:A(A({padding:f,listStyleType:"none",backgroundColor:m,backgroundClip:"padding-box",borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary},Hr(t)),{[`${n}-item-group-title`]:{padding:`${u}px ${g}px`,color:t.colorTextDescription,transition:`all ${c}`},[`${n}-item`]:{position:"relative",display:"flex",alignItems:"center",borderRadius:t.borderRadiusSM},[`${n}-item-icon`]:{minWidth:d,marginInlineEnd:t.marginXS,fontSize:t.fontSizeSM},[`${n}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${c}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${n}-item, ${n}-submenu-title`]:A(A({clear:"both",margin:0,padding:`${u}px ${g}px`,color:t.colorText,fontWeight:"normal",fontSize:d,lineHeight:t.lineHeight,cursor:"pointer",transition:`all ${c}`,"&:hover, &-active":{backgroundColor:t.controlItemBgHover}},Hr(t)),{"&-selected":{color:t.colorPrimary,backgroundColor:t.controlItemBgActive,"&:hover, &-active":{backgroundColor:t.controlItemBgActiveHover}},"&-disabled":{color:h,cursor:"not-allowed","&:hover":{color:h,backgroundColor:m,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${t.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:t.colorSplit},[`${e}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:t.paddingXS,[`${e}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:t.colorTextDescription,fontSize:p,fontStyle:"normal"}}}),[`${n}-item-group-list`]:{margin:`0 ${t.marginXS}px`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:g+t.fontSizeSM},[`${n}-submenu-vertical`]:{position:"relative"},[`${n}-submenu${n}-submenu-disabled ${e}-menu-submenu-title`]:{[`&, ${e}-menu-submenu-arrow-icon`]:{color:h,backgroundColor:m,cursor:"not-allowed"}},[`${n}-submenu-selected ${e}-menu-submenu-title`]:{color:t.colorPrimary}})}},[lr(t,"slide-up"),lr(t,"slide-down"),pc(t,"move-up"),pc(t,"move-down"),Oc(t,"zoom-big")]]},v3=et("Dropdown",(t,e)=>{let{rootPrefixCls:n}=e;const{marginXXS:i,sizePopupArrow:o,controlHeight:r,fontSize:a,lineHeight:s,paddingXXS:l,componentCls:c,borderRadiusOuter:u,borderRadiusLG:d}=t,f=(r-a*s)/2,{dropdownArrowOffset:h}=s3({sizePopupArrow:o,contentRadius:d,borderRadiusOuter:u}),p=Ve(t,{menuCls:`${c}-menu`,rootPrefixCls:n,dropdownArrowDistance:o/2+i,dropdownArrowOffset:h,dropdownPaddingVertical:f,dropdownEdgeChildPadding:l});return[cee(p),see(p),lee(p)]},t=>({zIndexPopup:t.zIndexPopupBase+50}));var uee=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{o("update:visible",f),o("visibleChange",f),o("update:open",f),o("openChange",f)},{prefixCls:a,direction:s,getPopupContainer:l}=Me("dropdown",t),c=L(()=>`${a.value}-button`),[u,d]=v3(a);return()=>{var f,h;const p=A(A({},t),i),{type:g="default",disabled:m,danger:v,loading:b,htmlType:y,class:w="",overlay:x=(f=n.overlay)===null||f===void 0?void 0:f.call(n),trigger:$,align:S,open:_,visible:P,onVisibleChange:O,placement:T=s.value==="rtl"?"bottomLeft":"bottomRight",href:M,title:I,icon:k=((h=n.icon)===null||h===void 0?void 0:h.call(n))||C(qd,null,null),mouseEnterDelay:E,mouseLeaveDelay:R,overlayClassName:D,overlayStyle:F,destroyPopupOnHide:N,onClick:B,"onUpdate:open":z}=p,W=uee(p,["type","disabled","danger","loading","htmlType","class","overlay","trigger","align","open","visible","onVisibleChange","placement","href","title","icon","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","onClick","onUpdate:open"]),j={align:S,disabled:m,trigger:m?[]:$,placement:T,getPopupContainer:l==null?void 0:l.value,onOpenChange:r,mouseEnterDelay:E,mouseLeaveDelay:R,open:_??P,overlayClassName:D,overlayStyle:F,destroyPopupOnHide:N},U=C(nn,{danger:v,type:g,disabled:m,loading:b,onClick:B,htmlType:y,href:M,title:I},{default:n.default}),V=C(nn,{danger:v,type:g,icon:k},null);return u(C(dee,H(H({},W),{},{class:ce(c.value,w,d.value)}),{default:()=>[n.leftButton?n.leftButton({button:U}):U,C(Io,j,{default:()=>[n.rightButton?n.rightButton({button:V}):V],overlay:()=>x})]}))}}});var fee={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};function R2(t){for(var e=1;eqe(b3,void 0),tS=t=>{var e,n,i;const{prefixCls:o,mode:r,selectable:a,validator:s,onClick:l,expandIcon:c}=y3()||{};ot(b3,{prefixCls:L(()=>{var u,d;return(d=(u=t.prefixCls)===null||u===void 0?void 0:u.value)!==null&&d!==void 0?d:o==null?void 0:o.value}),mode:L(()=>{var u,d;return(d=(u=t.mode)===null||u===void 0?void 0:u.value)!==null&&d!==void 0?d:r==null?void 0:r.value}),selectable:L(()=>{var u,d;return(d=(u=t.selectable)===null||u===void 0?void 0:u.value)!==null&&d!==void 0?d:a==null?void 0:a.value}),validator:(e=t.validator)!==null&&e!==void 0?e:s,onClick:(n=t.onClick)!==null&&n!==void 0?n:l,expandIcon:(i=t.expandIcon)!==null&&i!==void 0?i:c==null?void 0:c.value})},Io=oe({compatConfig:{MODE:3},name:"ADropdown",inheritAttrs:!1,props:ct(m3(),{mouseEnterDelay:.15,mouseLeaveDelay:.1,placement:"bottomLeft",trigger:"hover"}),slots:Object,setup(t,e){let{slots:n,attrs:i,emit:o}=e;const{prefixCls:r,rootPrefixCls:a,direction:s,getPopupContainer:l}=Me("dropdown",t),[c,u]=v3(r),d=L(()=>{const{placement:m="",transitionName:v}=t;return v!==void 0?v:m.includes("top")?`${a.value}-slide-down`:`${a.value}-slide-up`});tS({prefixCls:L(()=>`${r.value}-menu`),expandIcon:L(()=>C("span",{class:`${r.value}-menu-submenu-arrow`},[C(qi,{class:`${r.value}-menu-submenu-arrow-icon`},null)])),mode:L(()=>"vertical"),selectable:L(()=>!1),onClick:()=>{},validator:m=>{let{mode:v}=m}});const f=()=>{var m,v,b;const y=t.overlay||((m=n.overlay)===null||m===void 0?void 0:m.call(n)),w=Array.isArray(y)?y[0]:y;if(!w)return null;const x=w.props||{};Nt(!x.mode||x.mode==="vertical","Dropdown",`mode="${x.mode}" is not supported for Dropdown's Menu.`);const{selectable:$=!1,expandIcon:S=(b=(v=w.children)===null||v===void 0?void 0:v.expandIcon)===null||b===void 0?void 0:b.call(v)}=x,_=typeof S<"u"&&cn(S)?S:C("span",{class:`${r.value}-menu-submenu-arrow`},[C(qi,{class:`${r.value}-menu-submenu-arrow-icon`},null)]);return cn(w)?At(w,{mode:"vertical",selectable:$,expandIcon:()=>_}):w},h=L(()=>{const m=t.placement;if(!m)return s.value==="rtl"?"bottomRight":"bottomLeft";if(m.includes("Center")){const v=m.slice(0,m.indexOf("Center"));return Nt(!m.includes("Center"),"Dropdown",`You are using '${m}' placement in Dropdown, which is deprecated. Try to use '${v}' instead.`),v}return m}),p=L(()=>typeof t.visible=="boolean"?t.visible:t.open),g=m=>{o("update:visible",m),o("visibleChange",m),o("update:open",m),o("openChange",m)};return()=>{var m,v;const{arrow:b,trigger:y,disabled:w,overlayClassName:x}=t,$=(m=n.default)===null||m===void 0?void 0:m.call(n)[0],S=At($,A({class:ce((v=$==null?void 0:$.props)===null||v===void 0?void 0:v.class,{[`${r.value}-rtl`]:s.value==="rtl"},`${r.value}-trigger`)},w?{disabled:w}:{})),_=ce(x,u.value,{[`${r.value}-rtl`]:s.value==="rtl"}),P=w?[]:y;let O;P&&P.includes("contextmenu")&&(O=!0);const T=K1({arrowPointAtCenter:typeof b=="object"&&b.pointAtCenter,autoAdjustOverflow:!0}),M=ht(A(A(A({},t),i),{visible:p.value,builtinPlacements:T,overlayClassName:_,arrow:!!b,alignPoint:O,prefixCls:r.value,getPopupContainer:l==null?void 0:l.value,transitionName:d.value,trigger:P,onVisibleChange:g,placement:h.value}),["overlay","onUpdate:visible"]);return c(C(d3,M,{default:()=>[S],overlay:f}))}}});Io.Button=yd;var pee=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o({prefixCls:String,href:String,separator:Z.any,dropdownProps:Fe(),overlay:Z.any,onClick:Ms()}),xd=oe({compatConfig:{MODE:3},name:"ABreadcrumbItem",inheritAttrs:!1,__ANT_BREADCRUMB_ITEM:!0,props:gee(),slots:Object,setup(t,e){let{slots:n,attrs:i,emit:o}=e;const{prefixCls:r}=Me("breadcrumb",t),a=(l,c)=>{const u=gn(n,t,"overlay");return u?C(Io,H(H({},t.dropdownProps),{},{overlay:u,placement:"bottom"}),{default:()=>[C("span",{class:`${c}-overlay-link`},[l,C(nl,null,null)])]}):l},s=l=>{o("click",l)};return()=>{var l;const c=(l=gn(n,t,"separator"))!==null&&l!==void 0?l:"/",u=gn(n,t),{class:d,style:f}=i,h=pee(i,["class","style"]);let p;return t.href!==void 0?p=C("a",H({class:`${r.value}-link`,onClick:s},h),[u]):p=C("span",H({class:`${r.value}-link`,onClick:s},h),[u]),p=a(p,r.value),u!=null?C("li",{class:d,style:f},[p,c&&C("span",{class:`${r.value}-separator`},[c])]):null}}});function mee(t,e,n,i){let o;if(o!==void 0)return!!o;if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;const r=Object.keys(t),a=Object.keys(e);if(r.length!==a.length)return!1;const s=Object.prototype.hasOwnProperty.bind(e);for(let l=0;l{ot(x3,t)},Kr=()=>qe(x3),S3=Symbol("ForceRenderKey"),vee=t=>{ot(S3,t)},C3=()=>qe(S3,!1),$3=Symbol("menuFirstLevelContextKey"),A3=t=>{ot($3,t)},bee=()=>qe($3,!0),qp=oe({compatConfig:{MODE:3},name:"MenuContextProvider",inheritAttrs:!1,props:{mode:{type:String,default:void 0},overflowDisabled:{type:Boolean,default:void 0}},setup(t,e){let{slots:n}=e;const i=Kr(),o=A({},i);return t.mode!==void 0&&(o.mode=Ue(t,"mode")),t.overflowDisabled!==void 0&&(o.overflowDisabled=Ue(t,"overflowDisabled")),w3(o),()=>{var r;return(r=n.default)===null||r===void 0?void 0:r.call(n)}}}),_3=Symbol("siderCollapsed"),P3=Symbol("siderHookProvider"),Hf="$$__vc-menu-more__key",T3=Symbol("KeyPathContext"),nS=()=>qe(T3,{parentEventKeys:L(()=>[]),parentKeys:L(()=>[]),parentInfo:{}}),yee=(t,e,n)=>{const{parentEventKeys:i,parentKeys:o}=nS(),r=L(()=>[...i.value,t]),a=L(()=>[...o.value,e]);return ot(T3,{parentEventKeys:r,parentKeys:a,parentInfo:n}),a},O3=Symbol("measure"),L2=oe({compatConfig:{MODE:3},setup(t,e){let{slots:n}=e;return ot(O3,!0),()=>{var i;return(i=n.default)===null||i===void 0?void 0:i.call(n)}}}),iS=()=>qe(O3,!1);function E3(t){const{mode:e,rtl:n,inlineIndent:i}=Kr();return L(()=>e.value!=="inline"?null:n.value?{paddingRight:`${t.value*i.value}px`}:{paddingLeft:`${t.value*i.value}px`})}let xee=0;const wee=()=>({id:String,role:String,disabled:Boolean,danger:Boolean,title:{type:[String,Boolean],default:void 0},icon:Z.any,onMouseenter:Function,onMouseleave:Function,onClick:Function,onKeydown:Function,onFocus:Function,originItemValue:Fe()}),or=oe({compatConfig:{MODE:3},name:"AMenuItem",inheritAttrs:!1,props:wee(),slots:Object,setup(t,e){let{slots:n,emit:i,attrs:o}=e;const r=Cn(),a=iS(),s=typeof r.vnode.key=="symbol"?String(r.vnode.key):r.vnode.key;Nt(typeof r.vnode.key!="symbol","MenuItem",`MenuItem \`:key="${String(s)}"\` not support Symbol type`);const l=`menu_item_${++xee}_$$_${s}`,{parentEventKeys:c,parentKeys:u}=nS(),{prefixCls:d,activeKeys:f,disabled:h,changeActiveKeys:p,rtl:g,inlineCollapsed:m,siderCollapsed:v,onItemClick:b,selectedKeys:y,registerMenuInfo:w,unRegisterMenuInfo:x}=Kr(),$=bee(),S=ie(!1),_=L(()=>[...u.value,s]);w(l,{eventKey:l,key:s,parentEventKeys:c,parentKeys:u,isLeaf:!0}),at(()=>{x(l)}),ye(f,()=>{S.value=!!f.value.find(z=>z===s)},{immediate:!0});const O=L(()=>h.value||t.disabled),T=L(()=>y.value.includes(s)),M=L(()=>{const z=`${d.value}-item`;return{[`${z}`]:!0,[`${z}-danger`]:t.danger,[`${z}-active`]:S.value,[`${z}-selected`]:T.value,[`${z}-disabled`]:O.value}}),I=z=>({key:s,eventKey:l,keyPath:_.value,eventKeyPath:[...c.value,l],domEvent:z,item:A(A({},t),o)}),k=z=>{if(O.value)return;const W=I(z);i("click",z),b(W)},E=z=>{O.value||(p(_.value),i("mouseenter",z))},R=z=>{O.value||(p([]),i("mouseleave",z))},D=z=>{if(i("keydown",z),z.which===Te.ENTER){const W=I(z);i("click",z),b(W)}},F=z=>{p(_.value),i("focus",z)},N=(z,W)=>{const j=C("span",{class:`${d.value}-title-content`},[W]);return(!z||cn(W)&&W.type==="span")&&W&&m.value&&$&&typeof W=="string"?C("div",{class:`${d.value}-inline-collapsed-noicon`},[W.charAt(0)]):j},B=E3(L(()=>_.value.length));return()=>{var z,W,j,U,V;if(a)return null;const q=(z=t.title)!==null&&z!==void 0?z:(W=n.title)===null||W===void 0?void 0:W.call(n),Y=Dt((j=n.default)===null||j===void 0?void 0:j.call(n)),J=Y.length;let Q=q;typeof q>"u"?Q=$&&J?Y:"":q===!1&&(Q="");const G={title:Q};!v.value&&!m.value&&(G.title=null,G.open=!1);const ee={};t.role==="option"&&(ee["aria-selected"]=T.value);const X=(U=t.icon)!==null&&U!==void 0?U:(V=n.icon)===null||V===void 0?void 0:V.call(n,t);return C(Pi,H(H({},G),{},{placement:g.value?"left":"right",overlayClassName:`${d.value}-inline-collapsed-tooltip`}),{default:()=>[C(Rr.Item,H(H(H({component:"li"},o),{},{id:t.id,style:A(A({},o.style||{}),B.value),class:[M.value,{[`${o.class}`]:!!o.class,[`${d.value}-item-only-child`]:(X?J+1:J)===1}],role:t.role||"menuitem",tabindex:t.disabled?null:-1,"data-menu-id":s,"aria-disabled":t.disabled},ee),{},{onMouseenter:E,onMouseleave:R,onClick:k,onKeydown:D,onFocus:F,title:typeof q=="string"?q:void 0}),{default:()=>[At(typeof X=="function"?X(t.originItemValue):X,{class:`${d.value}-item-icon`},!1),N(X,Y)]})]})}}}),ya={adjustX:1,adjustY:1},See={topLeft:{points:["bl","tl"],overflow:ya,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:ya,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:ya,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:ya,offset:[4,0]}},Cee={topLeft:{points:["bl","tl"],overflow:ya,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:ya,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:ya,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:ya,offset:[4,0]}},$ee={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},F2=oe({compatConfig:{MODE:3},name:"PopupTrigger",inheritAttrs:!1,props:{prefixCls:String,mode:String,visible:Boolean,popupClassName:String,popupOffset:Array,disabled:Boolean,onVisibleChange:Function},slots:Object,emits:["visibleChange"],setup(t,e){let{slots:n,emit:i}=e;const o=ie(!1),{getPopupContainer:r,rtl:a,subMenuOpenDelay:s,subMenuCloseDelay:l,builtinPlacements:c,triggerSubMenuAction:u,forceSubMenuRender:d,motion:f,defaultMotions:h,rootClassName:p}=Kr(),g=C3(),m=L(()=>a.value?A(A({},Cee),c.value):A(A({},See),c.value)),v=L(()=>$ee[t.mode]),b=ie();ye(()=>t.visible,x=>{lt.cancel(b.value),b.value=lt(()=>{o.value=x})},{immediate:!0}),at(()=>{lt.cancel(b.value)});const y=x=>{i("visibleChange",x)},w=L(()=>{var x,$;const S=f.value||((x=h.value)===null||x===void 0?void 0:x[t.mode])||(($=h.value)===null||$===void 0?void 0:$.other),_=typeof S=="function"?S():S;return _?yo(_.name,{css:!0}):void 0});return()=>{const{prefixCls:x,popupClassName:$,mode:S,popupOffset:_,disabled:P}=t;return C(tl,{prefixCls:x,popupClassName:ce(`${x}-popup`,{[`${x}-rtl`]:a.value},$,p.value),stretch:S==="horizontal"?"minWidth":null,getPopupContainer:r.value,builtinPlacements:m.value,popupPlacement:v.value,popupVisible:o.value,popupAlign:_&&{offset:_},action:P?[]:[u.value],mouseEnterDelay:s.value,mouseLeaveDelay:l.value,onPopupVisibleChange:y,forceRender:g||d.value,popupAnimation:w.value},{popup:n.popup,default:n.default})}}}),oS=(t,e)=>{let{slots:n,attrs:i}=e;var o;const{prefixCls:r,mode:a}=Kr();return C("ul",H(H({},i),{},{class:ce(r.value,`${r.value}-sub`,`${r.value}-${a.value==="inline"?"inline":"vertical"}`),"data-menu-list":!0}),[(o=n.default)===null||o===void 0?void 0:o.call(n)])};oS.displayName="SubMenuList";const Aee=oe({compatConfig:{MODE:3},name:"InlineSubMenuList",inheritAttrs:!1,props:{id:String,open:Boolean,keyPath:Array},setup(t,e){let{slots:n}=e;const i=L(()=>"inline"),{motion:o,mode:r,defaultMotions:a}=Kr(),s=L(()=>r.value===i.value),l=se(!s.value),c=L(()=>s.value?t.open:!1);ye(r,()=>{s.value&&(l.value=!1)},{flush:"post"});const u=L(()=>{var d,f;const h=o.value||((d=a.value)===null||d===void 0?void 0:d[i.value])||((f=a.value)===null||f===void 0?void 0:f.other),p=typeof h=="function"?h():h;return A(A({},p),{appear:t.keyPath.length<=1})});return()=>{var d;return l.value?null:C(qp,{mode:i.value},{default:()=>[C(En,u.value,{default:()=>[ni(C(oS,{id:t.id},{default:()=>[(d=n.default)===null||d===void 0?void 0:d.call(n)]}),[[vi,c.value]])]})]})}}});let N2=0;const _ee=()=>({icon:Z.any,title:Z.any,disabled:Boolean,level:Number,popupClassName:String,popupOffset:Array,internalPopupClose:Boolean,eventKey:String,expandIcon:Function,theme:String,onMouseenter:Function,onMouseleave:Function,onTitleClick:Function,originItemValue:Fe()}),Fs=oe({compatConfig:{MODE:3},name:"ASubMenu",inheritAttrs:!1,props:_ee(),slots:Object,setup(t,e){let{slots:n,attrs:i,emit:o}=e;var r,a;A3(!1);const s=iS(),l=Cn(),c=typeof l.vnode.key=="symbol"?String(l.vnode.key):l.vnode.key;Nt(typeof l.vnode.key!="symbol","SubMenu",`SubMenu \`:key="${String(c)}"\` not support Symbol type`);const u=ny(c)?c:`sub_menu_${++N2}_$$_not_set_key`,d=(r=t.eventKey)!==null&&r!==void 0?r:ny(c)?`sub_menu_${++N2}_$$_${c}`:u,{parentEventKeys:f,parentInfo:h,parentKeys:p}=nS(),g=L(()=>[...p.value,u]),v={eventKey:d,key:u,parentEventKeys:f,childrenEventKeys:ie([]),parentKeys:p};(a=h.childrenEventKeys)===null||a===void 0||a.value.push(d),at(()=>{var le;h.childrenEventKeys&&(h.childrenEventKeys.value=(le=h.childrenEventKeys)===null||le===void 0?void 0:le.value.filter(he=>he!=d))}),yee(d,u,v);const{prefixCls:b,activeKeys:y,disabled:w,changeActiveKeys:x,mode:$,inlineCollapsed:S,openKeys:_,overflowDisabled:P,onOpenChange:O,registerMenuInfo:T,unRegisterMenuInfo:M,selectedSubMenuKeys:I,expandIcon:k,theme:E}=Kr(),R=c!=null,D=!s&&(C3()||!R);vee(D),(s&&R||!s&&!R||D)&&(T(d,v),at(()=>{M(d)}));const F=L(()=>`${b.value}-submenu`),N=L(()=>w.value||t.disabled),B=ie(),z=ie(),W=L(()=>_.value.includes(u)),j=L(()=>!P.value&&W.value),U=L(()=>I.value.includes(u)),V=ie(!1);ye(y,()=>{V.value=!!y.value.find(le=>le===u)},{immediate:!0});const q=le=>{N.value||(o("titleClick",le,u),$.value==="inline"&&O(u,!W.value))},Y=le=>{N.value||(x(g.value),o("mouseenter",le))},J=le=>{N.value||(x([]),o("mouseleave",le))},Q=E3(L(()=>g.value.length)),G=le=>{$.value!=="inline"&&O(u,le)},ee=()=>{x(g.value)},X=d&&`${d}-popup`,K=L(()=>ce(b.value,`${b.value}-${t.theme||E.value}`,t.popupClassName)),te=(le,he)=>{if(!he)return S.value&&!p.value.length&&le&&typeof le=="string"?C("div",{class:`${b.value}-inline-collapsed-noicon`},[le.charAt(0)]):C("span",{class:`${b.value}-title-content`},[le]);const pe=cn(le)&&le.type==="span";return C(Qe,null,[At(typeof he=="function"?he(t.originItemValue):he,{class:`${b.value}-item-icon`},!1),pe?le:C("span",{class:`${b.value}-title-content`},[le])])},ue=L(()=>$.value!=="inline"&&g.value.length>1?"vertical":$.value),ae=L(()=>$.value==="horizontal"?"vertical":$.value),re=L(()=>ue.value==="horizontal"?"vertical":ue.value),ne=()=>{var le,he;const pe=F.value,ge=(le=t.icon)!==null&&le!==void 0?le:(he=n.icon)===null||he===void 0?void 0:he.call(n,t),be=t.expandIcon||n.expandIcon||k.value,$e=te(gn(n,t,"title"),ge);return C("div",{style:Q.value,class:`${pe}-title`,tabindex:N.value?null:-1,ref:B,title:typeof $e=="string"?$e:null,"data-menu-id":u,"aria-expanded":j.value,"aria-haspopup":!0,"aria-controls":X,"aria-disabled":N.value,onClick:q,onFocus:ee},[$e,$.value!=="horizontal"&&be?be(A(A({},t),{isOpen:j.value})):C("i",{class:`${pe}-arrow`},null)])};return()=>{var le;if(s)return R?(le=n.default)===null||le===void 0?void 0:le.call(n):null;const he=F.value;let pe=()=>null;if(!P.value&&$.value!=="inline"){const ge=$.value==="horizontal"?[0,8]:[10,0];pe=()=>C(F2,{mode:ue.value,prefixCls:he,visible:!t.internalPopupClose&&j.value,popupClassName:K.value,popupOffset:t.popupOffset||ge,disabled:N.value,onVisibleChange:G},{default:()=>[ne()],popup:()=>C(qp,{mode:re.value},{default:()=>[C(oS,{id:X,ref:z},{default:n.default})]})})}else pe=()=>C(F2,null,{default:ne});return C(qp,{mode:ae.value},{default:()=>[C(Rr.Item,H(H({component:"li"},i),{},{role:"none",class:ce(he,`${he}-${$.value}`,i.class,{[`${he}-open`]:j.value,[`${he}-active`]:V.value,[`${he}-selected`]:U.value,[`${he}-disabled`]:N.value}),onMouseenter:Y,onMouseleave:J,"data-submenu-id":u}),{default:()=>C(Qe,null,[pe(),!P.value&&C(Aee,{id:X,open:j.value,keyPath:g.value},{default:n.default})])})]})}}});function M3(t,e){return t.classList?t.classList.contains(e):` ${t.className} `.indexOf(` ${e} `)>-1}function Zp(t,e){t.classList?t.classList.add(e):M3(t,e)||(t.className=`${t.className} ${e}`)}function Jp(t,e){if(t.classList)t.classList.remove(e);else if(M3(t,e)){const n=t.className;t.className=` ${n} `.replace(` ${e} `," ")}}const Zd=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"ant-motion-collapse",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return{name:t,appear:e,css:!0,onBeforeEnter:n=>{n.style.height="0px",n.style.opacity="0",Zp(n,t)},onEnter:n=>{pt(()=>{n.style.height=`${n.scrollHeight}px`,n.style.opacity="1"})},onAfterEnter:n=>{n&&(Jp(n,t),n.style.height=null,n.style.opacity=null)},onBeforeLeave:n=>{Zp(n,t),n.style.height=`${n.offsetHeight}px`,n.style.opacity=null},onLeave:n=>{setTimeout(()=>{n.style.height="0px",n.style.opacity="0"})},onAfterLeave:n=>{n&&(Jp(n,t),n.style&&(n.style.height=null,n.style.opacity=null))}}},Pee=()=>({title:Z.any,originItemValue:Fe()}),wd=oe({compatConfig:{MODE:3},name:"AMenuItemGroup",inheritAttrs:!1,props:Pee(),slots:Object,setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o}=Kr(),r=L(()=>`${o.value}-item-group`),a=iS();return()=>{var s,l;return a?(s=n.default)===null||s===void 0?void 0:s.call(n):C("li",H(H({},i),{},{onClick:c=>c.stopPropagation(),class:r.value}),[C("div",{title:typeof t.title=="string"?t.title:void 0,class:`${r.value}-title`},[gn(n,t,"title")]),C("ul",{class:`${r.value}-list`},[(l=n.default)===null||l===void 0?void 0:l.call(n)])])}}}),Tee=()=>({prefixCls:String,dashed:Boolean}),Sd=oe({compatConfig:{MODE:3},name:"AMenuDivider",props:Tee(),setup(t){const{prefixCls:e}=Kr(),n=L(()=>({[`${e.value}-item-divider`]:!0,[`${e.value}-item-divider-dashed`]:!!t.dashed}));return()=>C("li",{class:n.value},null)}});var Oee=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{if(i&&typeof i=="object"){const r=i,{label:a,children:s,key:l,type:c}=r,u=Oee(r,["label","children","key","type"]),d=l??`tmp-${o}`,f=n?n.parentKeys.slice():[],h=[],p={eventKey:d,key:d,parentEventKeys:se(f),parentKeys:se(f),childrenEventKeys:se(h),isLeaf:!1};if(s||c==="group"){if(c==="group"){const m=Iy(s,e,n);return C(wd,H(H({key:d},u),{},{title:a,originItemValue:i}),{default:()=>[m]})}e.set(d,p),n&&n.childrenEventKeys.push(d);const g=Iy(s,e,{childrenEventKeys:h,parentKeys:[].concat(f,d)});return C(Fs,H(H({key:d},u),{},{title:a,originItemValue:i}),{default:()=>[g]})}return c==="divider"?C(Sd,H({key:d},u),null):(p.isLeaf=!0,e.set(d,p),C(or,H(H({key:d},u),{},{originItemValue:i}),{default:()=>[a]}))}return null}).filter(i=>i)}function Eee(t){const e=ie([]),n=ie(!1),i=ie(new Map);return ye(()=>t.items,()=>{const o=new Map;n.value=!1,t.items?(n.value=!0,e.value=Iy(t.items,o)):e.value=void 0,i.value=o},{immediate:!0,deep:!0}),{itemsNodes:e,store:i,hasItmes:n}}const Mee=t=>{const{componentCls:e,motionDurationSlow:n,menuHorizontalHeight:i,colorSplit:o,lineWidth:r,lineType:a,menuItemPaddingInline:s}=t;return{[`${e}-horizontal`]:{lineHeight:`${i}px`,border:0,borderBottom:`${r}px ${a} ${o}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${e}-item, ${e}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:s},[`> ${e}-item:hover, + &${s}-slide-up-leave${s}-slide-up-leave-active${e}-placement-topRight`]:{animationName:Im}})},{[`${e} ${n}`]:{position:"relative",margin:0},[`${n}-submenu-popup`]:{position:"absolute",zIndex:i,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul,li":{listStyle:"none"},ul:{marginInline:"0.3em"}},[`${e}, ${e}-menu-submenu`]:{[n]:A(A({padding:f,listStyleType:"none",backgroundColor:m,backgroundClip:"padding-box",borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary},Hr(t)),{[`${n}-item-group-title`]:{padding:`${u}px ${g}px`,color:t.colorTextDescription,transition:`all ${c}`},[`${n}-item`]:{position:"relative",display:"flex",alignItems:"center",borderRadius:t.borderRadiusSM},[`${n}-item-icon`]:{minWidth:d,marginInlineEnd:t.marginXS,fontSize:t.fontSizeSM},[`${n}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${c}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${n}-item, ${n}-submenu-title`]:A(A({clear:"both",margin:0,padding:`${u}px ${g}px`,color:t.colorText,fontWeight:"normal",fontSize:d,lineHeight:t.lineHeight,cursor:"pointer",transition:`all ${c}`,"&:hover, &-active":{backgroundColor:t.controlItemBgHover}},Hr(t)),{"&-selected":{color:t.colorPrimary,backgroundColor:t.controlItemBgActive,"&:hover, &-active":{backgroundColor:t.controlItemBgActiveHover}},"&-disabled":{color:h,cursor:"not-allowed","&:hover":{color:h,backgroundColor:m,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${t.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:t.colorSplit},[`${e}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:t.paddingXS,[`${e}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:t.colorTextDescription,fontSize:p,fontStyle:"normal"}}}),[`${n}-item-group-list`]:{margin:`0 ${t.marginXS}px`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:g+t.fontSizeSM},[`${n}-submenu-vertical`]:{position:"relative"},[`${n}-submenu${n}-submenu-disabled ${e}-menu-submenu-title`]:{[`&, ${e}-menu-submenu-arrow-icon`]:{color:h,backgroundColor:m,cursor:"not-allowed"}},[`${n}-submenu-selected ${e}-menu-submenu-title`]:{color:t.colorPrimary}})}},[lr(t,"slide-up"),lr(t,"slide-down"),pc(t,"move-up"),pc(t,"move-down"),Ec(t,"zoom-big")]]},v3=et("Dropdown",(t,e)=>{let{rootPrefixCls:n}=e;const{marginXXS:i,sizePopupArrow:o,controlHeight:r,fontSize:a,lineHeight:s,paddingXXS:l,componentCls:c,borderRadiusOuter:u,borderRadiusLG:d}=t,f=(r-a*s)/2,{dropdownArrowOffset:h}=s3({sizePopupArrow:o,contentRadius:d,borderRadiusOuter:u}),p=Ve(t,{menuCls:`${c}-menu`,rootPrefixCls:n,dropdownArrowDistance:o/2+i,dropdownArrowOffset:h,dropdownPaddingVertical:f,dropdownEdgeChildPadding:l});return[cee(p),see(p),lee(p)]},t=>({zIndexPopup:t.zIndexPopupBase+50}));var uee=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{o("update:visible",f),o("visibleChange",f),o("update:open",f),o("openChange",f)},{prefixCls:a,direction:s,getPopupContainer:l}=Me("dropdown",t),c=L(()=>`${a.value}-button`),[u,d]=v3(a);return()=>{var f,h;const p=A(A({},t),i),{type:g="default",disabled:m,danger:v,loading:b,htmlType:y,class:w="",overlay:x=(f=n.overlay)===null||f===void 0?void 0:f.call(n),trigger:$,align:S,open:_,visible:P,onVisibleChange:O,placement:T=s.value==="rtl"?"bottomLeft":"bottomRight",href:M,title:I,icon:k=((h=n.icon)===null||h===void 0?void 0:h.call(n))||C(Zd,null,null),mouseEnterDelay:E,mouseLeaveDelay:R,overlayClassName:D,overlayStyle:F,destroyPopupOnHide:N,onClick:B,"onUpdate:open":z}=p,W=uee(p,["type","disabled","danger","loading","htmlType","class","overlay","trigger","align","open","visible","onVisibleChange","placement","href","title","icon","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyPopupOnHide","onClick","onUpdate:open"]),j={align:S,disabled:m,trigger:m?[]:$,placement:T,getPopupContainer:l==null?void 0:l.value,onOpenChange:r,mouseEnterDelay:E,mouseLeaveDelay:R,open:_??P,overlayClassName:D,overlayStyle:F,destroyPopupOnHide:N},U=C(nn,{danger:v,type:g,disabled:m,loading:b,onClick:B,htmlType:y,href:M,title:I},{default:n.default}),V=C(nn,{danger:v,type:g,icon:k},null);return u(C(dee,H(H({},W),{},{class:ce(c.value,w,d.value)}),{default:()=>[n.leftButton?n.leftButton({button:U}):U,C(Io,j,{default:()=>[n.rightButton?n.rightButton({button:V}):V],overlay:()=>x})]}))}}});var fee={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};function R2(t){for(var e=1;eqe(b3,void 0),tS=t=>{var e,n,i;const{prefixCls:o,mode:r,selectable:a,validator:s,onClick:l,expandIcon:c}=y3()||{};ot(b3,{prefixCls:L(()=>{var u,d;return(d=(u=t.prefixCls)===null||u===void 0?void 0:u.value)!==null&&d!==void 0?d:o==null?void 0:o.value}),mode:L(()=>{var u,d;return(d=(u=t.mode)===null||u===void 0?void 0:u.value)!==null&&d!==void 0?d:r==null?void 0:r.value}),selectable:L(()=>{var u,d;return(d=(u=t.selectable)===null||u===void 0?void 0:u.value)!==null&&d!==void 0?d:a==null?void 0:a.value}),validator:(e=t.validator)!==null&&e!==void 0?e:s,onClick:(n=t.onClick)!==null&&n!==void 0?n:l,expandIcon:(i=t.expandIcon)!==null&&i!==void 0?i:c==null?void 0:c.value})},Io=oe({compatConfig:{MODE:3},name:"ADropdown",inheritAttrs:!1,props:ct(m3(),{mouseEnterDelay:.15,mouseLeaveDelay:.1,placement:"bottomLeft",trigger:"hover"}),slots:Object,setup(t,e){let{slots:n,attrs:i,emit:o}=e;const{prefixCls:r,rootPrefixCls:a,direction:s,getPopupContainer:l}=Me("dropdown",t),[c,u]=v3(r),d=L(()=>{const{placement:m="",transitionName:v}=t;return v!==void 0?v:m.includes("top")?`${a.value}-slide-down`:`${a.value}-slide-up`});tS({prefixCls:L(()=>`${r.value}-menu`),expandIcon:L(()=>C("span",{class:`${r.value}-menu-submenu-arrow`},[C(qi,{class:`${r.value}-menu-submenu-arrow-icon`},null)])),mode:L(()=>"vertical"),selectable:L(()=>!1),onClick:()=>{},validator:m=>{let{mode:v}=m}});const f=()=>{var m,v,b;const y=t.overlay||((m=n.overlay)===null||m===void 0?void 0:m.call(n)),w=Array.isArray(y)?y[0]:y;if(!w)return null;const x=w.props||{};Nt(!x.mode||x.mode==="vertical","Dropdown",`mode="${x.mode}" is not supported for Dropdown's Menu.`);const{selectable:$=!1,expandIcon:S=(b=(v=w.children)===null||v===void 0?void 0:v.expandIcon)===null||b===void 0?void 0:b.call(v)}=x,_=typeof S<"u"&&cn(S)?S:C("span",{class:`${r.value}-menu-submenu-arrow`},[C(qi,{class:`${r.value}-menu-submenu-arrow-icon`},null)]);return cn(w)?At(w,{mode:"vertical",selectable:$,expandIcon:()=>_}):w},h=L(()=>{const m=t.placement;if(!m)return s.value==="rtl"?"bottomRight":"bottomLeft";if(m.includes("Center")){const v=m.slice(0,m.indexOf("Center"));return Nt(!m.includes("Center"),"Dropdown",`You are using '${m}' placement in Dropdown, which is deprecated. Try to use '${v}' instead.`),v}return m}),p=L(()=>typeof t.visible=="boolean"?t.visible:t.open),g=m=>{o("update:visible",m),o("visibleChange",m),o("update:open",m),o("openChange",m)};return()=>{var m,v;const{arrow:b,trigger:y,disabled:w,overlayClassName:x}=t,$=(m=n.default)===null||m===void 0?void 0:m.call(n)[0],S=At($,A({class:ce((v=$==null?void 0:$.props)===null||v===void 0?void 0:v.class,{[`${r.value}-rtl`]:s.value==="rtl"},`${r.value}-trigger`)},w?{disabled:w}:{})),_=ce(x,u.value,{[`${r.value}-rtl`]:s.value==="rtl"}),P=w?[]:y;let O;P&&P.includes("contextmenu")&&(O=!0);const T=K1({arrowPointAtCenter:typeof b=="object"&&b.pointAtCenter,autoAdjustOverflow:!0}),M=ht(A(A(A({},t),i),{visible:p.value,builtinPlacements:T,overlayClassName:_,arrow:!!b,alignPoint:O,prefixCls:r.value,getPopupContainer:l==null?void 0:l.value,transitionName:d.value,trigger:P,onVisibleChange:g,placement:h.value}),["overlay","onUpdate:visible"]);return c(C(d3,M,{default:()=>[S],overlay:f}))}}});Io.Button=xd;var pee=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o({prefixCls:String,href:String,separator:Z.any,dropdownProps:Fe(),overlay:Z.any,onClick:Ms()}),wd=oe({compatConfig:{MODE:3},name:"ABreadcrumbItem",inheritAttrs:!1,__ANT_BREADCRUMB_ITEM:!0,props:gee(),slots:Object,setup(t,e){let{slots:n,attrs:i,emit:o}=e;const{prefixCls:r}=Me("breadcrumb",t),a=(l,c)=>{const u=gn(n,t,"overlay");return u?C(Io,H(H({},t.dropdownProps),{},{overlay:u,placement:"bottom"}),{default:()=>[C("span",{class:`${c}-overlay-link`},[l,C(nl,null,null)])]}):l},s=l=>{o("click",l)};return()=>{var l;const c=(l=gn(n,t,"separator"))!==null&&l!==void 0?l:"/",u=gn(n,t),{class:d,style:f}=i,h=pee(i,["class","style"]);let p;return t.href!==void 0?p=C("a",H({class:`${r.value}-link`,onClick:s},h),[u]):p=C("span",H({class:`${r.value}-link`,onClick:s},h),[u]),p=a(p,r.value),u!=null?C("li",{class:d,style:f},[p,c&&C("span",{class:`${r.value}-separator`},[c])]):null}}});function mee(t,e,n,i){let o;if(o!==void 0)return!!o;if(t===e)return!0;if(typeof t!="object"||!t||typeof e!="object"||!e)return!1;const r=Object.keys(t),a=Object.keys(e);if(r.length!==a.length)return!1;const s=Object.prototype.hasOwnProperty.bind(e);for(let l=0;l{ot(x3,t)},Kr=()=>qe(x3),S3=Symbol("ForceRenderKey"),vee=t=>{ot(S3,t)},C3=()=>qe(S3,!1),$3=Symbol("menuFirstLevelContextKey"),A3=t=>{ot($3,t)},bee=()=>qe($3,!0),Zp=oe({compatConfig:{MODE:3},name:"MenuContextProvider",inheritAttrs:!1,props:{mode:{type:String,default:void 0},overflowDisabled:{type:Boolean,default:void 0}},setup(t,e){let{slots:n}=e;const i=Kr(),o=A({},i);return t.mode!==void 0&&(o.mode=Ue(t,"mode")),t.overflowDisabled!==void 0&&(o.overflowDisabled=Ue(t,"overflowDisabled")),w3(o),()=>{var r;return(r=n.default)===null||r===void 0?void 0:r.call(n)}}}),_3=Symbol("siderCollapsed"),P3=Symbol("siderHookProvider"),Wf="$$__vc-menu-more__key",T3=Symbol("KeyPathContext"),nS=()=>qe(T3,{parentEventKeys:L(()=>[]),parentKeys:L(()=>[]),parentInfo:{}}),yee=(t,e,n)=>{const{parentEventKeys:i,parentKeys:o}=nS(),r=L(()=>[...i.value,t]),a=L(()=>[...o.value,e]);return ot(T3,{parentEventKeys:r,parentKeys:a,parentInfo:n}),a},O3=Symbol("measure"),L2=oe({compatConfig:{MODE:3},setup(t,e){let{slots:n}=e;return ot(O3,!0),()=>{var i;return(i=n.default)===null||i===void 0?void 0:i.call(n)}}}),iS=()=>qe(O3,!1);function E3(t){const{mode:e,rtl:n,inlineIndent:i}=Kr();return L(()=>e.value!=="inline"?null:n.value?{paddingRight:`${t.value*i.value}px`}:{paddingLeft:`${t.value*i.value}px`})}let xee=0;const wee=()=>({id:String,role:String,disabled:Boolean,danger:Boolean,title:{type:[String,Boolean],default:void 0},icon:Z.any,onMouseenter:Function,onMouseleave:Function,onClick:Function,onKeydown:Function,onFocus:Function,originItemValue:Fe()}),or=oe({compatConfig:{MODE:3},name:"AMenuItem",inheritAttrs:!1,props:wee(),slots:Object,setup(t,e){let{slots:n,emit:i,attrs:o}=e;const r=Cn(),a=iS(),s=typeof r.vnode.key=="symbol"?String(r.vnode.key):r.vnode.key;Nt(typeof r.vnode.key!="symbol","MenuItem",`MenuItem \`:key="${String(s)}"\` not support Symbol type`);const l=`menu_item_${++xee}_$$_${s}`,{parentEventKeys:c,parentKeys:u}=nS(),{prefixCls:d,activeKeys:f,disabled:h,changeActiveKeys:p,rtl:g,inlineCollapsed:m,siderCollapsed:v,onItemClick:b,selectedKeys:y,registerMenuInfo:w,unRegisterMenuInfo:x}=Kr(),$=bee(),S=ie(!1),_=L(()=>[...u.value,s]);w(l,{eventKey:l,key:s,parentEventKeys:c,parentKeys:u,isLeaf:!0}),at(()=>{x(l)}),ye(f,()=>{S.value=!!f.value.find(z=>z===s)},{immediate:!0});const O=L(()=>h.value||t.disabled),T=L(()=>y.value.includes(s)),M=L(()=>{const z=`${d.value}-item`;return{[`${z}`]:!0,[`${z}-danger`]:t.danger,[`${z}-active`]:S.value,[`${z}-selected`]:T.value,[`${z}-disabled`]:O.value}}),I=z=>({key:s,eventKey:l,keyPath:_.value,eventKeyPath:[...c.value,l],domEvent:z,item:A(A({},t),o)}),k=z=>{if(O.value)return;const W=I(z);i("click",z),b(W)},E=z=>{O.value||(p(_.value),i("mouseenter",z))},R=z=>{O.value||(p([]),i("mouseleave",z))},D=z=>{if(i("keydown",z),z.which===Te.ENTER){const W=I(z);i("click",z),b(W)}},F=z=>{p(_.value),i("focus",z)},N=(z,W)=>{const j=C("span",{class:`${d.value}-title-content`},[W]);return(!z||cn(W)&&W.type==="span")&&W&&m.value&&$&&typeof W=="string"?C("div",{class:`${d.value}-inline-collapsed-noicon`},[W.charAt(0)]):j},B=E3(L(()=>_.value.length));return()=>{var z,W,j,U,V;if(a)return null;const q=(z=t.title)!==null&&z!==void 0?z:(W=n.title)===null||W===void 0?void 0:W.call(n),Y=Dt((j=n.default)===null||j===void 0?void 0:j.call(n)),J=Y.length;let Q=q;typeof q>"u"?Q=$&&J?Y:"":q===!1&&(Q="");const G={title:Q};!v.value&&!m.value&&(G.title=null,G.open=!1);const ee={};t.role==="option"&&(ee["aria-selected"]=T.value);const X=(U=t.icon)!==null&&U!==void 0?U:(V=n.icon)===null||V===void 0?void 0:V.call(n,t);return C(Pi,H(H({},G),{},{placement:g.value?"left":"right",overlayClassName:`${d.value}-inline-collapsed-tooltip`}),{default:()=>[C(Rr.Item,H(H(H({component:"li"},o),{},{id:t.id,style:A(A({},o.style||{}),B.value),class:[M.value,{[`${o.class}`]:!!o.class,[`${d.value}-item-only-child`]:(X?J+1:J)===1}],role:t.role||"menuitem",tabindex:t.disabled?null:-1,"data-menu-id":s,"aria-disabled":t.disabled},ee),{},{onMouseenter:E,onMouseleave:R,onClick:k,onKeydown:D,onFocus:F,title:typeof q=="string"?q:void 0}),{default:()=>[At(typeof X=="function"?X(t.originItemValue):X,{class:`${d.value}-item-icon`},!1),N(X,Y)]})]})}}}),ya={adjustX:1,adjustY:1},See={topLeft:{points:["bl","tl"],overflow:ya,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:ya,offset:[0,7]},leftTop:{points:["tr","tl"],overflow:ya,offset:[-4,0]},rightTop:{points:["tl","tr"],overflow:ya,offset:[4,0]}},Cee={topLeft:{points:["bl","tl"],overflow:ya,offset:[0,-7]},bottomLeft:{points:["tl","bl"],overflow:ya,offset:[0,7]},rightTop:{points:["tr","tl"],overflow:ya,offset:[-4,0]},leftTop:{points:["tl","tr"],overflow:ya,offset:[4,0]}},$ee={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"},F2=oe({compatConfig:{MODE:3},name:"PopupTrigger",inheritAttrs:!1,props:{prefixCls:String,mode:String,visible:Boolean,popupClassName:String,popupOffset:Array,disabled:Boolean,onVisibleChange:Function},slots:Object,emits:["visibleChange"],setup(t,e){let{slots:n,emit:i}=e;const o=ie(!1),{getPopupContainer:r,rtl:a,subMenuOpenDelay:s,subMenuCloseDelay:l,builtinPlacements:c,triggerSubMenuAction:u,forceSubMenuRender:d,motion:f,defaultMotions:h,rootClassName:p}=Kr(),g=C3(),m=L(()=>a.value?A(A({},Cee),c.value):A(A({},See),c.value)),v=L(()=>$ee[t.mode]),b=ie();ye(()=>t.visible,x=>{lt.cancel(b.value),b.value=lt(()=>{o.value=x})},{immediate:!0}),at(()=>{lt.cancel(b.value)});const y=x=>{i("visibleChange",x)},w=L(()=>{var x,$;const S=f.value||((x=h.value)===null||x===void 0?void 0:x[t.mode])||(($=h.value)===null||$===void 0?void 0:$.other),_=typeof S=="function"?S():S;return _?yo(_.name,{css:!0}):void 0});return()=>{const{prefixCls:x,popupClassName:$,mode:S,popupOffset:_,disabled:P}=t;return C(tl,{prefixCls:x,popupClassName:ce(`${x}-popup`,{[`${x}-rtl`]:a.value},$,p.value),stretch:S==="horizontal"?"minWidth":null,getPopupContainer:r.value,builtinPlacements:m.value,popupPlacement:v.value,popupVisible:o.value,popupAlign:_&&{offset:_},action:P?[]:[u.value],mouseEnterDelay:s.value,mouseLeaveDelay:l.value,onPopupVisibleChange:y,forceRender:g||d.value,popupAnimation:w.value},{popup:n.popup,default:n.default})}}}),oS=(t,e)=>{let{slots:n,attrs:i}=e;var o;const{prefixCls:r,mode:a}=Kr();return C("ul",H(H({},i),{},{class:ce(r.value,`${r.value}-sub`,`${r.value}-${a.value==="inline"?"inline":"vertical"}`),"data-menu-list":!0}),[(o=n.default)===null||o===void 0?void 0:o.call(n)])};oS.displayName="SubMenuList";const Aee=oe({compatConfig:{MODE:3},name:"InlineSubMenuList",inheritAttrs:!1,props:{id:String,open:Boolean,keyPath:Array},setup(t,e){let{slots:n}=e;const i=L(()=>"inline"),{motion:o,mode:r,defaultMotions:a}=Kr(),s=L(()=>r.value===i.value),l=se(!s.value),c=L(()=>s.value?t.open:!1);ye(r,()=>{s.value&&(l.value=!1)},{flush:"post"});const u=L(()=>{var d,f;const h=o.value||((d=a.value)===null||d===void 0?void 0:d[i.value])||((f=a.value)===null||f===void 0?void 0:f.other),p=typeof h=="function"?h():h;return A(A({},p),{appear:t.keyPath.length<=1})});return()=>{var d;return l.value?null:C(Zp,{mode:i.value},{default:()=>[C(En,u.value,{default:()=>[ni(C(oS,{id:t.id},{default:()=>[(d=n.default)===null||d===void 0?void 0:d.call(n)]}),[[vi,c.value]])]})]})}}});let N2=0;const _ee=()=>({icon:Z.any,title:Z.any,disabled:Boolean,level:Number,popupClassName:String,popupOffset:Array,internalPopupClose:Boolean,eventKey:String,expandIcon:Function,theme:String,onMouseenter:Function,onMouseleave:Function,onTitleClick:Function,originItemValue:Fe()}),Fs=oe({compatConfig:{MODE:3},name:"ASubMenu",inheritAttrs:!1,props:_ee(),slots:Object,setup(t,e){let{slots:n,attrs:i,emit:o}=e;var r,a;A3(!1);const s=iS(),l=Cn(),c=typeof l.vnode.key=="symbol"?String(l.vnode.key):l.vnode.key;Nt(typeof l.vnode.key!="symbol","SubMenu",`SubMenu \`:key="${String(c)}"\` not support Symbol type`);const u=ny(c)?c:`sub_menu_${++N2}_$$_not_set_key`,d=(r=t.eventKey)!==null&&r!==void 0?r:ny(c)?`sub_menu_${++N2}_$$_${c}`:u,{parentEventKeys:f,parentInfo:h,parentKeys:p}=nS(),g=L(()=>[...p.value,u]),v={eventKey:d,key:u,parentEventKeys:f,childrenEventKeys:ie([]),parentKeys:p};(a=h.childrenEventKeys)===null||a===void 0||a.value.push(d),at(()=>{var le;h.childrenEventKeys&&(h.childrenEventKeys.value=(le=h.childrenEventKeys)===null||le===void 0?void 0:le.value.filter(he=>he!=d))}),yee(d,u,v);const{prefixCls:b,activeKeys:y,disabled:w,changeActiveKeys:x,mode:$,inlineCollapsed:S,openKeys:_,overflowDisabled:P,onOpenChange:O,registerMenuInfo:T,unRegisterMenuInfo:M,selectedSubMenuKeys:I,expandIcon:k,theme:E}=Kr(),R=c!=null,D=!s&&(C3()||!R);vee(D),(s&&R||!s&&!R||D)&&(T(d,v),at(()=>{M(d)}));const F=L(()=>`${b.value}-submenu`),N=L(()=>w.value||t.disabled),B=ie(),z=ie(),W=L(()=>_.value.includes(u)),j=L(()=>!P.value&&W.value),U=L(()=>I.value.includes(u)),V=ie(!1);ye(y,()=>{V.value=!!y.value.find(le=>le===u)},{immediate:!0});const q=le=>{N.value||(o("titleClick",le,u),$.value==="inline"&&O(u,!W.value))},Y=le=>{N.value||(x(g.value),o("mouseenter",le))},J=le=>{N.value||(x([]),o("mouseleave",le))},Q=E3(L(()=>g.value.length)),G=le=>{$.value!=="inline"&&O(u,le)},ee=()=>{x(g.value)},X=d&&`${d}-popup`,K=L(()=>ce(b.value,`${b.value}-${t.theme||E.value}`,t.popupClassName)),te=(le,he)=>{if(!he)return S.value&&!p.value.length&&le&&typeof le=="string"?C("div",{class:`${b.value}-inline-collapsed-noicon`},[le.charAt(0)]):C("span",{class:`${b.value}-title-content`},[le]);const pe=cn(le)&&le.type==="span";return C(Qe,null,[At(typeof he=="function"?he(t.originItemValue):he,{class:`${b.value}-item-icon`},!1),pe?le:C("span",{class:`${b.value}-title-content`},[le])])},ue=L(()=>$.value!=="inline"&&g.value.length>1?"vertical":$.value),ae=L(()=>$.value==="horizontal"?"vertical":$.value),re=L(()=>ue.value==="horizontal"?"vertical":ue.value),ne=()=>{var le,he;const pe=F.value,ge=(le=t.icon)!==null&&le!==void 0?le:(he=n.icon)===null||he===void 0?void 0:he.call(n,t),be=t.expandIcon||n.expandIcon||k.value,$e=te(gn(n,t,"title"),ge);return C("div",{style:Q.value,class:`${pe}-title`,tabindex:N.value?null:-1,ref:B,title:typeof $e=="string"?$e:null,"data-menu-id":u,"aria-expanded":j.value,"aria-haspopup":!0,"aria-controls":X,"aria-disabled":N.value,onClick:q,onFocus:ee},[$e,$.value!=="horizontal"&&be?be(A(A({},t),{isOpen:j.value})):C("i",{class:`${pe}-arrow`},null)])};return()=>{var le;if(s)return R?(le=n.default)===null||le===void 0?void 0:le.call(n):null;const he=F.value;let pe=()=>null;if(!P.value&&$.value!=="inline"){const ge=$.value==="horizontal"?[0,8]:[10,0];pe=()=>C(F2,{mode:ue.value,prefixCls:he,visible:!t.internalPopupClose&&j.value,popupClassName:K.value,popupOffset:t.popupOffset||ge,disabled:N.value,onVisibleChange:G},{default:()=>[ne()],popup:()=>C(Zp,{mode:re.value},{default:()=>[C(oS,{id:X,ref:z},{default:n.default})]})})}else pe=()=>C(F2,null,{default:ne});return C(Zp,{mode:ae.value},{default:()=>[C(Rr.Item,H(H({component:"li"},i),{},{role:"none",class:ce(he,`${he}-${$.value}`,i.class,{[`${he}-open`]:j.value,[`${he}-active`]:V.value,[`${he}-selected`]:U.value,[`${he}-disabled`]:N.value}),onMouseenter:Y,onMouseleave:J,"data-submenu-id":u}),{default:()=>C(Qe,null,[pe(),!P.value&&C(Aee,{id:X,open:j.value,keyPath:g.value},{default:n.default})])})]})}}});function M3(t,e){return t.classList?t.classList.contains(e):` ${t.className} `.indexOf(` ${e} `)>-1}function Jp(t,e){t.classList?t.classList.add(e):M3(t,e)||(t.className=`${t.className} ${e}`)}function Qp(t,e){if(t.classList)t.classList.remove(e);else if(M3(t,e)){const n=t.className;t.className=` ${n} `.replace(` ${e} `," ")}}const Jd=function(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"ant-motion-collapse",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return{name:t,appear:e,css:!0,onBeforeEnter:n=>{n.style.height="0px",n.style.opacity="0",Jp(n,t)},onEnter:n=>{pt(()=>{n.style.height=`${n.scrollHeight}px`,n.style.opacity="1"})},onAfterEnter:n=>{n&&(Qp(n,t),n.style.height=null,n.style.opacity=null)},onBeforeLeave:n=>{Jp(n,t),n.style.height=`${n.offsetHeight}px`,n.style.opacity=null},onLeave:n=>{setTimeout(()=>{n.style.height="0px",n.style.opacity="0"})},onAfterLeave:n=>{n&&(Qp(n,t),n.style&&(n.style.height=null,n.style.opacity=null))}}},Pee=()=>({title:Z.any,originItemValue:Fe()}),Sd=oe({compatConfig:{MODE:3},name:"AMenuItemGroup",inheritAttrs:!1,props:Pee(),slots:Object,setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o}=Kr(),r=L(()=>`${o.value}-item-group`),a=iS();return()=>{var s,l;return a?(s=n.default)===null||s===void 0?void 0:s.call(n):C("li",H(H({},i),{},{onClick:c=>c.stopPropagation(),class:r.value}),[C("div",{title:typeof t.title=="string"?t.title:void 0,class:`${r.value}-title`},[gn(n,t,"title")]),C("ul",{class:`${r.value}-list`},[(l=n.default)===null||l===void 0?void 0:l.call(n)])])}}}),Tee=()=>({prefixCls:String,dashed:Boolean}),Cd=oe({compatConfig:{MODE:3},name:"AMenuDivider",props:Tee(),setup(t){const{prefixCls:e}=Kr(),n=L(()=>({[`${e.value}-item-divider`]:!0,[`${e.value}-item-divider-dashed`]:!!t.dashed}));return()=>C("li",{class:n.value},null)}});var Oee=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{if(i&&typeof i=="object"){const r=i,{label:a,children:s,key:l,type:c}=r,u=Oee(r,["label","children","key","type"]),d=l??`tmp-${o}`,f=n?n.parentKeys.slice():[],h=[],p={eventKey:d,key:d,parentEventKeys:se(f),parentKeys:se(f),childrenEventKeys:se(h),isLeaf:!1};if(s||c==="group"){if(c==="group"){const m=Iy(s,e,n);return C(Sd,H(H({key:d},u),{},{title:a,originItemValue:i}),{default:()=>[m]})}e.set(d,p),n&&n.childrenEventKeys.push(d);const g=Iy(s,e,{childrenEventKeys:h,parentKeys:[].concat(f,d)});return C(Fs,H(H({key:d},u),{},{title:a,originItemValue:i}),{default:()=>[g]})}return c==="divider"?C(Cd,H({key:d},u),null):(p.isLeaf=!0,e.set(d,p),C(or,H(H({key:d},u),{},{originItemValue:i}),{default:()=>[a]}))}return null}).filter(i=>i)}function Eee(t){const e=ie([]),n=ie(!1),i=ie(new Map);return ye(()=>t.items,()=>{const o=new Map;n.value=!1,t.items?(n.value=!0,e.value=Iy(t.items,o)):e.value=void 0,i.value=o},{immediate:!0,deep:!0}),{itemsNodes:e,store:i,hasItmes:n}}const Mee=t=>{const{componentCls:e,motionDurationSlow:n,menuHorizontalHeight:i,colorSplit:o,lineWidth:r,lineType:a,menuItemPaddingInline:s}=t;return{[`${e}-horizontal`]:{lineHeight:`${i}px`,border:0,borderBottom:`${r}px ${a} ${o}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${e}-item, ${e}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:s},[`> ${e}-item:hover, > ${e}-item-active, > ${e}-submenu ${e}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${e}-item, ${e}-submenu-title`]:{transition:[`border-color ${n}`,`background ${n}`].join(",")},[`${e}-submenu-arrow`]:{display:"none"}}}},Iee=t=>{let{componentCls:e,menuArrowOffset:n}=t;return{[`${e}-rtl`]:{direction:"rtl"},[`${e}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${e}-rtl${e}-vertical, ${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${n})`},"&::after":{transform:`rotate(45deg) translateY(${n})`}}}}},B2=t=>A({},zr(t)),z2=(t,e)=>{const{componentCls:n,colorItemText:i,colorItemTextSelected:o,colorGroupTitle:r,colorItemBg:a,colorSubItemBg:s,colorItemBgSelected:l,colorActiveBarHeight:c,colorActiveBarWidth:u,colorActiveBarBorderSize:d,motionDurationSlow:f,motionEaseInOut:h,motionEaseOut:p,menuItemPaddingInline:g,motionDurationMid:m,colorItemTextHover:v,lineType:b,colorSplit:y,colorItemTextDisabled:w,colorDangerItemText:x,colorDangerItemTextHover:$,colorDangerItemTextSelected:S,colorDangerItemBgActive:_,colorDangerItemBgSelected:P,colorItemBgHover:O,menuSubMenuBg:T,colorItemTextSelectedHorizontal:M,colorItemBgSelectedHorizontal:I}=t;return{[`${n}-${e}`]:{color:i,background:a,[`&${n}-root:focus-visible`]:A({},B2(t)),[`${n}-item-group-title`]:{color:r},[`${n}-submenu-selected`]:{[`> ${n}-submenu-title`]:{color:o}},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${w} !important`},[`${n}-item:hover, ${n}-submenu-title:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:v}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:O},"&:active":{backgroundColor:l}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:O},"&:active":{backgroundColor:l}}},[`${n}-item-danger`]:{color:x,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:$}},[`&${n}-item:active`]:{background:_}},[`${n}-item a`]:{"&, &:hover":{color:"inherit"}},[`${n}-item-selected`]:{color:o,[`&${n}-item-danger`]:{color:S},"a, a:hover":{color:"inherit"}},[`& ${n}-item-selected`]:{backgroundColor:l,[`&${n}-item-danger`]:{backgroundColor:P}},[`${n}-item, ${n}-submenu-title`]:{[`&:not(${n}-item-disabled):focus-visible`]:A({},B2(t))},[`&${n}-submenu > ${n}`]:{backgroundColor:T},[`&${n}-popup > ${n}`]:{backgroundColor:a},[`&${n}-horizontal`]:A(A({},e==="dark"?{borderBottom:0}:{}),{[`> ${n}-item, > ${n}-submenu`]:{top:d,marginTop:-d,marginBottom:0,borderRadius:0,"&::after":{position:"absolute",insetInline:g,bottom:0,borderBottom:`${c}px solid transparent`,transition:`border-color ${f} ${h}`,content:'""'},"&:hover, &-active, &-open":{"&::after":{borderBottomWidth:c,borderBottomColor:M}},"&-selected":{color:M,backgroundColor:I,"&::after":{borderBottomWidth:c,borderBottomColor:M}}}}),[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${d}px ${b} ${y}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:s},[`${n}-item, ${n}-submenu-title`]:d&&u?{width:`calc(100% + ${d}px)`}:{},[`${n}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${u}px solid ${o}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${m} ${p}`,`opacity ${m} ${p}`].join(","),content:'""'},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:S}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${m} ${h}`,`opacity ${m} ${h}`].join(",")}}}}}},H2=t=>{const{componentCls:e,menuItemHeight:n,itemMarginInline:i,padding:o,menuArrowSize:r,marginXS:a,marginXXS:s}=t,l=o+r+a;return{[`${e}-item`]:{position:"relative"},[`${e}-item, ${e}-submenu-title`]:{height:n,lineHeight:`${n}px`,paddingInline:o,overflow:"hidden",textOverflow:"ellipsis",marginInline:i,marginBlock:s,width:`calc(100% - ${i*2}px)`},[`${e}-submenu`]:{paddingBottom:.02},[`> ${e}-item, @@ -222,11 +222,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho ${e}-submenu-arrow, ${e}-submenu-expand-icon `]:{opacity:0},[`${e}-item-icon, ${n}`]:{margin:0,fontSize:d,lineHeight:`${i}px`,"+ span":{display:"inline-block",opacity:0}}},[`${e}-item-icon, ${n}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${e}-item-icon, ${n}`]:{display:"none"},"a, a:hover":{color:o}},[`${e}-item-group-title`]:A(A({},un),{paddingInline:h})}}]},W2=t=>{const{componentCls:e,fontSize:n,motionDurationSlow:i,motionDurationMid:o,motionEaseInOut:r,motionEaseOut:a,iconCls:s,controlHeightSM:l}=t;return{[`${e}-item, ${e}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${i}`,`background ${i}`,`padding ${i} ${r}`].join(","),[`${e}-item-icon, ${s}`]:{minWidth:n,fontSize:n,transition:[`font-size ${o} ${a}`,`margin ${i} ${r}`,`color ${i}`].join(","),"+ span":{marginInlineStart:l-n,opacity:1,transition:[`opacity ${i} ${r}`,`margin ${i}`,`color ${i}`].join(",")}},[`${e}-item-icon`]:A({},qs()),[`&${e}-item-only-child`]:{[`> ${s}, > ${e}-item-icon`]:{marginInlineEnd:0}}},[`${e}-item-disabled, ${e}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${e}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},j2=t=>{const{componentCls:e,motionDurationSlow:n,motionEaseInOut:i,borderRadius:o,menuArrowSize:r,menuArrowOffset:a}=t;return{[`${e}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:t.margin,width:r,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${n} ${i}, opacity ${n}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:r*.6,height:r*.15,backgroundColor:"currentcolor",borderRadius:o,transition:[`background ${n} ${i}`,`transform ${n} ${i}`,`top ${n} ${i}`,`color ${n} ${i}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${a})`},"&::after":{transform:`rotate(-45deg) translateY(${a})`}}}}},Dee=t=>{const{antCls:e,componentCls:n,fontSize:i,motionDurationSlow:o,motionDurationMid:r,motionEaseInOut:a,lineHeight:s,paddingXS:l,padding:c,colorSplit:u,lineWidth:d,zIndexPopup:f,borderRadiusLG:h,radiusSubMenuItem:p,menuArrowSize:g,menuArrowOffset:m,lineType:v,menuPanelMaskInset:b}=t;return[{"":{[`${n}`]:A(A({},Do()),{"&-hidden":{display:"none"}})},[`${n}-submenu-hidden`]:{display:"none"}},{[n]:A(A(A(A(A(A(A({},rt(t)),Do()),{marginBottom:0,paddingInlineStart:0,fontSize:i,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${o} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${n}-item`]:{flex:"none"}},[`${n}-item, ${n}-submenu, ${n}-submenu-title`]:{borderRadius:t.radiusItem},[`${n}-item-group-title`]:{padding:`${l}px ${c}px`,fontSize:i,lineHeight:s,transition:`all ${o}`},[`&-horizontal ${n}-submenu`]:{transition:[`border-color ${o} ${a}`,`background ${o} ${a}`].join(",")},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${o} ${a}`,`background ${o} ${a}`,`padding ${r} ${a}`].join(",")},[`${n}-submenu ${n}-sub`]:{cursor:"initial",transition:[`background ${o} ${a}`,`padding ${o} ${a}`].join(",")},[`${n}-title-content`]:{transition:`color ${o}`},[`${n}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${n}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:u,borderStyle:v,borderWidth:0,borderTopWidth:d,marginBlock:d,padding:0,"&-dashed":{borderStyle:"dashed"}}}),W2(t)),{[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${i*2}px ${c}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:f,background:"transparent",borderRadius:h,boxShadow:"none",transformOrigin:"0 0","&::before":{position:"absolute",inset:`${b}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:b},[`> ${n}`]:A(A(A({borderRadius:h},W2(t)),j2(t)),{[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:p},[`${n}-submenu-title::after`]:{transition:`transform ${o} ${a}`}})}}),j2(t)),{[`&-inline-collapsed ${n}-submenu-arrow, - &-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${m})`},"&::after":{transform:`rotate(45deg) translateX(-${m})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(-${g*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${m})`},"&::before":{transform:`rotate(45deg) translateX(${m})`}}})},{[`${e}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},Ree=(t,e)=>et("Menu",(i,o)=>{let{overrideComponentToken:r}=o;if((e==null?void 0:e.value)===!1)return[];const{colorBgElevated:a,colorPrimary:s,colorError:l,colorErrorHover:c,colorTextLightSolid:u}=i,{controlHeightLG:d,fontSize:f}=i,h=f/7*5,p=Ve(i,{menuItemHeight:d,menuItemPaddingInline:i.margin,menuArrowSize:h,menuHorizontalHeight:d*1.15,menuArrowOffset:`${h*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:a}),g=new Ot(u).setAlpha(.65).toRgbString(),m=Ve(p,{colorItemText:g,colorItemTextHover:u,colorGroupTitle:g,colorItemTextSelected:u,colorItemBg:"#001529",colorSubItemBg:"#000c17",colorItemBgActive:"transparent",colorItemBgSelected:s,colorActiveBarWidth:0,colorActiveBarHeight:0,colorActiveBarBorderSize:0,colorItemTextDisabled:new Ot(u).setAlpha(.25).toRgbString(),colorDangerItemText:l,colorDangerItemTextHover:c,colorDangerItemTextSelected:u,colorDangerItemBgActive:l,colorDangerItemBgSelected:l,menuSubMenuBg:"#001529",colorItemTextSelectedHorizontal:u,colorItemBgSelectedHorizontal:s},A({},r));return[Dee(p),Mee(p),kee(p),z2(p,"light"),z2(m,"dark"),Iee(p),Ud(p),lr(p,"slide-up"),lr(p,"slide-down"),Oc(p,"zoom-big")]},i=>{const{colorPrimary:o,colorError:r,colorTextDisabled:a,colorErrorBg:s,colorText:l,colorTextDescription:c,colorBgContainer:u,colorFillAlter:d,colorFillContent:f,lineWidth:h,lineWidthBold:p,controlItemBgActive:g,colorBgTextHover:m}=i;return{dropdownWidth:160,zIndexPopup:i.zIndexPopupBase+50,radiusItem:i.borderRadiusLG,radiusSubMenuItem:i.borderRadiusSM,colorItemText:l,colorItemTextHover:l,colorItemTextHoverHorizontal:o,colorGroupTitle:c,colorItemTextSelected:o,colorItemTextSelectedHorizontal:o,colorItemBg:u,colorItemBgHover:m,colorItemBgActive:f,colorSubItemBg:d,colorItemBgSelected:g,colorItemBgSelectedHorizontal:"transparent",colorActiveBarWidth:0,colorActiveBarHeight:p,colorActiveBarBorderSize:h,colorItemTextDisabled:a,colorDangerItemText:r,colorDangerItemTextHover:r,colorDangerItemTextSelected:r,colorDangerItemBgActive:s,colorDangerItemBgSelected:s,itemMarginInline:i.marginXXS}})(t),Lee=()=>({id:String,prefixCls:String,items:Array,disabled:Boolean,inlineCollapsed:Boolean,disabledOverflow:Boolean,forceSubMenuRender:Boolean,openKeys:Array,selectedKeys:Array,activeKey:String,selectable:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},tabindex:{type:[Number,String]},motion:Object,role:String,theme:{type:String,default:"light"},mode:{type:String,default:"vertical"},inlineIndent:{type:Number,default:24},subMenuOpenDelay:{type:Number,default:0},subMenuCloseDelay:{type:Number,default:.1},builtinPlacements:{type:Object},triggerSubMenuAction:{type:String,default:"hover"},getPopupContainer:Function,expandIcon:Function,onOpenChange:Function,onSelect:Function,onDeselect:Function,onClick:[Function,Array],onFocus:Function,onBlur:Function,onMousedown:Function,"onUpdate:openKeys":Function,"onUpdate:selectedKeys":Function,"onUpdate:activeKey":Function}),V2=[],sn=oe({compatConfig:{MODE:3},name:"AMenu",inheritAttrs:!1,props:Lee(),slots:Object,setup(t,e){let{slots:n,emit:i,attrs:o}=e;const{direction:r,getPrefixCls:a}=Me("menu",t),s=y3(),l=L(()=>{var Y;return a("menu",t.prefixCls||((Y=s==null?void 0:s.prefixCls)===null||Y===void 0?void 0:Y.value))}),[c,u]=Ree(l,L(()=>!s)),d=ie(new Map),f=qe(_3,se(void 0)),h=L(()=>f.value!==void 0?f.value:t.inlineCollapsed),{itemsNodes:p}=Eee(t),g=ie(!1);Ze(()=>{g.value=!0}),Ke(()=>{Nt(!(t.inlineCollapsed===!0&&t.mode!=="inline"),"Menu","`inlineCollapsed` should only be used when `mode` is inline."),Nt(!(f.value!==void 0&&t.inlineCollapsed===!0),"Menu","`inlineCollapsed` not control Menu under Sider. Should set `collapsed` on Sider instead.")});const m=se([]),v=se([]),b=se({});ye(d,()=>{const Y={};for(const J of d.value.values())Y[J.key]=J;b.value=Y},{flush:"post"}),Ke(()=>{if(t.activeKey!==void 0){let Y=[];const J=t.activeKey?b.value[t.activeKey]:void 0;J&&t.activeKey!==void 0?Y=mb([].concat(Yt(J.parentKeys),t.activeKey)):Y=[],Al(m.value,Y)||(m.value=Y)}}),ye(()=>t.selectedKeys,Y=>{Y&&(v.value=Y.slice())},{immediate:!0,deep:!0});const y=se([]);ye([b,v],()=>{let Y=[];v.value.forEach(J=>{const Q=b.value[J];Q&&(Y=Y.concat(Yt(Q.parentKeys)))}),Y=mb(Y),Al(y.value,Y)||(y.value=Y)},{immediate:!0});const w=Y=>{if(t.selectable){const{key:J}=Y,Q=v.value.includes(J);let G;t.multiple?Q?G=v.value.filter(X=>X!==J):G=[...v.value,J]:G=[J];const ee=A(A({},Y),{selectedKeys:G});Al(G,v.value)||(t.selectedKeys===void 0&&(v.value=G),i("update:selectedKeys",G),Q&&t.multiple?i("deselect",ee):i("select",ee))}O.value!=="inline"&&!t.multiple&&x.value.length&&I(V2)},x=se([]);ye(()=>t.openKeys,function(){let Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:x.value;Al(x.value,Y)||(x.value=Y.slice())},{immediate:!0,deep:!0});let $;const S=Y=>{clearTimeout($),$=setTimeout(()=>{t.activeKey===void 0&&(m.value=Y),i("update:activeKey",Y[Y.length-1])})},_=L(()=>!!t.disabled),P=L(()=>r.value==="rtl"),O=se("vertical"),T=ie(!1);Ke(()=>{var Y;(t.mode==="inline"||t.mode==="vertical")&&h.value?(O.value="vertical",T.value=h.value):(O.value=t.mode,T.value=!1),!((Y=s==null?void 0:s.mode)===null||Y===void 0)&&Y.value&&(O.value=s.mode.value)});const M=L(()=>O.value==="inline"),I=Y=>{x.value=Y,i("update:openKeys",Y),i("openChange",Y)},k=se(x.value),E=ie(!1);ye(x,()=>{M.value&&(k.value=x.value)},{immediate:!0}),ye(M,()=>{if(!E.value){E.value=!0;return}M.value?x.value=k.value:I(V2)},{immediate:!0});const R=L(()=>({[`${l.value}`]:!0,[`${l.value}-root`]:!0,[`${l.value}-${O.value}`]:!0,[`${l.value}-inline-collapsed`]:T.value,[`${l.value}-rtl`]:P.value,[`${l.value}-${t.theme}`]:!0})),D=L(()=>a()),F=L(()=>({horizontal:{name:`${D.value}-slide-up`},inline:Zd(`${D.value}-motion-collapse`),other:{name:`${D.value}-zoom-big`}}));A3(!0);const N=function(){let Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const J=[],Q=d.value;return Y.forEach(G=>{const{key:ee,childrenEventKeys:X}=Q.get(G);J.push(ee,...N(Yt(X)))}),J},B=Y=>{var J;i("click",Y),w(Y),(J=s==null?void 0:s.onClick)===null||J===void 0||J.call(s)},z=(Y,J)=>{var Q;const G=((Q=b.value[Y])===null||Q===void 0?void 0:Q.childrenEventKeys)||[];let ee=x.value.filter(X=>X!==Y);if(J)ee.push(Y);else if(O.value!=="inline"){const X=N(Yt(G));ee=mb(ee.filter(K=>!X.includes(K)))}Al(x,ee)||I(ee)},W=(Y,J)=>{d.value.set(Y,J),d.value=new Map(d.value)},j=Y=>{d.value.delete(Y),d.value=new Map(d.value)},U=se(0),V=L(()=>{var Y;return t.expandIcon||n.expandIcon||!((Y=s==null?void 0:s.expandIcon)===null||Y===void 0)&&Y.value?J=>{let Q=t.expandIcon||n.expandIcon;return Q=typeof Q=="function"?Q(J):Q,At(Q,{class:`${l.value}-submenu-expand-icon`},!1)}:null});w3({prefixCls:l,activeKeys:m,openKeys:x,selectedKeys:v,changeActiveKeys:S,disabled:_,rtl:P,mode:O,inlineIndent:L(()=>t.inlineIndent),subMenuCloseDelay:L(()=>t.subMenuCloseDelay),subMenuOpenDelay:L(()=>t.subMenuOpenDelay),builtinPlacements:L(()=>t.builtinPlacements),triggerSubMenuAction:L(()=>t.triggerSubMenuAction),getPopupContainer:L(()=>t.getPopupContainer),inlineCollapsed:T,theme:L(()=>t.theme),siderCollapsed:f,defaultMotions:L(()=>g.value?F.value:null),motion:L(()=>g.value?t.motion:null),overflowDisabled:ie(void 0),onOpenChange:z,onItemClick:B,registerMenuInfo:W,unRegisterMenuInfo:j,selectedSubMenuKeys:y,expandIcon:V,forceSubMenuRender:L(()=>t.forceSubMenuRender),rootClassName:u});const q=()=>{var Y;return p.value||Dt((Y=n.default)===null||Y===void 0?void 0:Y.call(n))};return()=>{var Y;const J=q(),Q=U.value>=J.length-1||O.value!=="horizontal"||t.disabledOverflow,G=X=>O.value!=="horizontal"||t.disabledOverflow?X:X.map((K,te)=>C(qp,{key:K.key,overflowDisabled:te>U.value},{default:()=>K})),ee=((Y=n.overflowedIndicator)===null||Y===void 0?void 0:Y.call(n))||C(qd,null,null);return c(C(Rr,H(H({},o),{},{onMousedown:t.onMousedown,prefixCls:`${l.value}-overflow`,component:"ul",itemComponent:or,class:[R.value,o.class,u.value],role:"menu",id:t.id,data:G(J),renderRawItem:X=>X,renderRawRest:X=>{const K=X.length,te=K?J.slice(-K):null;return C(Qe,null,[C(Fs,{eventKey:Hf,key:Hf,title:ee,disabled:Q,internalPopupClose:K===0},{default:()=>te}),C(L2,null,{default:()=>[C(Fs,{eventKey:Hf,key:Hf,title:ee,disabled:Q,internalPopupClose:K===0},{default:()=>te})]})])},maxCount:O.value!=="horizontal"||t.disabledOverflow?Rr.INVALIDATE:Rr.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:X=>{U.value=X}}),{default:()=>[C(Ow,{to:"body"},{default:()=>[C("div",{style:{display:"none"},"aria-hidden":!0},[C(L2,null,{default:()=>[G(q())]})])]})]}))}}});sn.install=function(t){return t.component(sn.name,sn),t.component(or.name,or),t.component(Fs.name,Fs),t.component(Sd.name,Sd),t.component(wd.name,wd),t};sn.Item=or;sn.Divider=Sd;sn.SubMenu=Fs;sn.ItemGroup=wd;const Fee=t=>{const{componentCls:e,iconCls:n}=t;return{[e]:A(A({},rt(t)),{color:t.breadcrumbBaseColor,fontSize:t.breadcrumbFontSize,[n]:{fontSize:t.breadcrumbIconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:A({color:t.breadcrumbLinkColor,transition:`color ${t.motionDurationMid}`,padding:`0 ${t.paddingXXS}px`,borderRadius:t.borderRadiusSM,height:t.lineHeight*t.fontSize,display:"inline-block",marginInline:-t.marginXXS,"&:hover":{color:t.breadcrumbLinkColorHover,backgroundColor:t.colorBgTextHover}},Hr(t)),"li:last-child":{color:t.breadcrumbLastItemColor,[`& > ${e}-separator`]:{display:"none"}},[`${e}-separator`]:{marginInline:t.breadcrumbSeparatorMargin,color:t.breadcrumbSeparatorColor},[`${e}-link`]:{[` + &-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${m})`},"&::after":{transform:`rotate(45deg) translateX(-${m})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(-${g*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${m})`},"&::before":{transform:`rotate(45deg) translateX(${m})`}}})},{[`${e}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},Ree=(t,e)=>et("Menu",(i,o)=>{let{overrideComponentToken:r}=o;if((e==null?void 0:e.value)===!1)return[];const{colorBgElevated:a,colorPrimary:s,colorError:l,colorErrorHover:c,colorTextLightSolid:u}=i,{controlHeightLG:d,fontSize:f}=i,h=f/7*5,p=Ve(i,{menuItemHeight:d,menuItemPaddingInline:i.margin,menuArrowSize:h,menuHorizontalHeight:d*1.15,menuArrowOffset:`${h*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:a}),g=new Ot(u).setAlpha(.65).toRgbString(),m=Ve(p,{colorItemText:g,colorItemTextHover:u,colorGroupTitle:g,colorItemTextSelected:u,colorItemBg:"#001529",colorSubItemBg:"#000c17",colorItemBgActive:"transparent",colorItemBgSelected:s,colorActiveBarWidth:0,colorActiveBarHeight:0,colorActiveBarBorderSize:0,colorItemTextDisabled:new Ot(u).setAlpha(.25).toRgbString(),colorDangerItemText:l,colorDangerItemTextHover:c,colorDangerItemTextSelected:u,colorDangerItemBgActive:l,colorDangerItemBgSelected:l,menuSubMenuBg:"#001529",colorItemTextSelectedHorizontal:u,colorItemBgSelectedHorizontal:s},A({},r));return[Dee(p),Mee(p),kee(p),z2(p,"light"),z2(m,"dark"),Iee(p),qd(p),lr(p,"slide-up"),lr(p,"slide-down"),Ec(p,"zoom-big")]},i=>{const{colorPrimary:o,colorError:r,colorTextDisabled:a,colorErrorBg:s,colorText:l,colorTextDescription:c,colorBgContainer:u,colorFillAlter:d,colorFillContent:f,lineWidth:h,lineWidthBold:p,controlItemBgActive:g,colorBgTextHover:m}=i;return{dropdownWidth:160,zIndexPopup:i.zIndexPopupBase+50,radiusItem:i.borderRadiusLG,radiusSubMenuItem:i.borderRadiusSM,colorItemText:l,colorItemTextHover:l,colorItemTextHoverHorizontal:o,colorGroupTitle:c,colorItemTextSelected:o,colorItemTextSelectedHorizontal:o,colorItemBg:u,colorItemBgHover:m,colorItemBgActive:f,colorSubItemBg:d,colorItemBgSelected:g,colorItemBgSelectedHorizontal:"transparent",colorActiveBarWidth:0,colorActiveBarHeight:p,colorActiveBarBorderSize:h,colorItemTextDisabled:a,colorDangerItemText:r,colorDangerItemTextHover:r,colorDangerItemTextSelected:r,colorDangerItemBgActive:s,colorDangerItemBgSelected:s,itemMarginInline:i.marginXXS}})(t),Lee=()=>({id:String,prefixCls:String,items:Array,disabled:Boolean,inlineCollapsed:Boolean,disabledOverflow:Boolean,forceSubMenuRender:Boolean,openKeys:Array,selectedKeys:Array,activeKey:String,selectable:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},tabindex:{type:[Number,String]},motion:Object,role:String,theme:{type:String,default:"light"},mode:{type:String,default:"vertical"},inlineIndent:{type:Number,default:24},subMenuOpenDelay:{type:Number,default:0},subMenuCloseDelay:{type:Number,default:.1},builtinPlacements:{type:Object},triggerSubMenuAction:{type:String,default:"hover"},getPopupContainer:Function,expandIcon:Function,onOpenChange:Function,onSelect:Function,onDeselect:Function,onClick:[Function,Array],onFocus:Function,onBlur:Function,onMousedown:Function,"onUpdate:openKeys":Function,"onUpdate:selectedKeys":Function,"onUpdate:activeKey":Function}),V2=[],sn=oe({compatConfig:{MODE:3},name:"AMenu",inheritAttrs:!1,props:Lee(),slots:Object,setup(t,e){let{slots:n,emit:i,attrs:o}=e;const{direction:r,getPrefixCls:a}=Me("menu",t),s=y3(),l=L(()=>{var Y;return a("menu",t.prefixCls||((Y=s==null?void 0:s.prefixCls)===null||Y===void 0?void 0:Y.value))}),[c,u]=Ree(l,L(()=>!s)),d=ie(new Map),f=qe(_3,se(void 0)),h=L(()=>f.value!==void 0?f.value:t.inlineCollapsed),{itemsNodes:p}=Eee(t),g=ie(!1);Ze(()=>{g.value=!0}),Ke(()=>{Nt(!(t.inlineCollapsed===!0&&t.mode!=="inline"),"Menu","`inlineCollapsed` should only be used when `mode` is inline."),Nt(!(f.value!==void 0&&t.inlineCollapsed===!0),"Menu","`inlineCollapsed` not control Menu under Sider. Should set `collapsed` on Sider instead.")});const m=se([]),v=se([]),b=se({});ye(d,()=>{const Y={};for(const J of d.value.values())Y[J.key]=J;b.value=Y},{flush:"post"}),Ke(()=>{if(t.activeKey!==void 0){let Y=[];const J=t.activeKey?b.value[t.activeKey]:void 0;J&&t.activeKey!==void 0?Y=mb([].concat(Yt(J.parentKeys),t.activeKey)):Y=[],Al(m.value,Y)||(m.value=Y)}}),ye(()=>t.selectedKeys,Y=>{Y&&(v.value=Y.slice())},{immediate:!0,deep:!0});const y=se([]);ye([b,v],()=>{let Y=[];v.value.forEach(J=>{const Q=b.value[J];Q&&(Y=Y.concat(Yt(Q.parentKeys)))}),Y=mb(Y),Al(y.value,Y)||(y.value=Y)},{immediate:!0});const w=Y=>{if(t.selectable){const{key:J}=Y,Q=v.value.includes(J);let G;t.multiple?Q?G=v.value.filter(X=>X!==J):G=[...v.value,J]:G=[J];const ee=A(A({},Y),{selectedKeys:G});Al(G,v.value)||(t.selectedKeys===void 0&&(v.value=G),i("update:selectedKeys",G),Q&&t.multiple?i("deselect",ee):i("select",ee))}O.value!=="inline"&&!t.multiple&&x.value.length&&I(V2)},x=se([]);ye(()=>t.openKeys,function(){let Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:x.value;Al(x.value,Y)||(x.value=Y.slice())},{immediate:!0,deep:!0});let $;const S=Y=>{clearTimeout($),$=setTimeout(()=>{t.activeKey===void 0&&(m.value=Y),i("update:activeKey",Y[Y.length-1])})},_=L(()=>!!t.disabled),P=L(()=>r.value==="rtl"),O=se("vertical"),T=ie(!1);Ke(()=>{var Y;(t.mode==="inline"||t.mode==="vertical")&&h.value?(O.value="vertical",T.value=h.value):(O.value=t.mode,T.value=!1),!((Y=s==null?void 0:s.mode)===null||Y===void 0)&&Y.value&&(O.value=s.mode.value)});const M=L(()=>O.value==="inline"),I=Y=>{x.value=Y,i("update:openKeys",Y),i("openChange",Y)},k=se(x.value),E=ie(!1);ye(x,()=>{M.value&&(k.value=x.value)},{immediate:!0}),ye(M,()=>{if(!E.value){E.value=!0;return}M.value?x.value=k.value:I(V2)},{immediate:!0});const R=L(()=>({[`${l.value}`]:!0,[`${l.value}-root`]:!0,[`${l.value}-${O.value}`]:!0,[`${l.value}-inline-collapsed`]:T.value,[`${l.value}-rtl`]:P.value,[`${l.value}-${t.theme}`]:!0})),D=L(()=>a()),F=L(()=>({horizontal:{name:`${D.value}-slide-up`},inline:Jd(`${D.value}-motion-collapse`),other:{name:`${D.value}-zoom-big`}}));A3(!0);const N=function(){let Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];const J=[],Q=d.value;return Y.forEach(G=>{const{key:ee,childrenEventKeys:X}=Q.get(G);J.push(ee,...N(Yt(X)))}),J},B=Y=>{var J;i("click",Y),w(Y),(J=s==null?void 0:s.onClick)===null||J===void 0||J.call(s)},z=(Y,J)=>{var Q;const G=((Q=b.value[Y])===null||Q===void 0?void 0:Q.childrenEventKeys)||[];let ee=x.value.filter(X=>X!==Y);if(J)ee.push(Y);else if(O.value!=="inline"){const X=N(Yt(G));ee=mb(ee.filter(K=>!X.includes(K)))}Al(x,ee)||I(ee)},W=(Y,J)=>{d.value.set(Y,J),d.value=new Map(d.value)},j=Y=>{d.value.delete(Y),d.value=new Map(d.value)},U=se(0),V=L(()=>{var Y;return t.expandIcon||n.expandIcon||!((Y=s==null?void 0:s.expandIcon)===null||Y===void 0)&&Y.value?J=>{let Q=t.expandIcon||n.expandIcon;return Q=typeof Q=="function"?Q(J):Q,At(Q,{class:`${l.value}-submenu-expand-icon`},!1)}:null});w3({prefixCls:l,activeKeys:m,openKeys:x,selectedKeys:v,changeActiveKeys:S,disabled:_,rtl:P,mode:O,inlineIndent:L(()=>t.inlineIndent),subMenuCloseDelay:L(()=>t.subMenuCloseDelay),subMenuOpenDelay:L(()=>t.subMenuOpenDelay),builtinPlacements:L(()=>t.builtinPlacements),triggerSubMenuAction:L(()=>t.triggerSubMenuAction),getPopupContainer:L(()=>t.getPopupContainer),inlineCollapsed:T,theme:L(()=>t.theme),siderCollapsed:f,defaultMotions:L(()=>g.value?F.value:null),motion:L(()=>g.value?t.motion:null),overflowDisabled:ie(void 0),onOpenChange:z,onItemClick:B,registerMenuInfo:W,unRegisterMenuInfo:j,selectedSubMenuKeys:y,expandIcon:V,forceSubMenuRender:L(()=>t.forceSubMenuRender),rootClassName:u});const q=()=>{var Y;return p.value||Dt((Y=n.default)===null||Y===void 0?void 0:Y.call(n))};return()=>{var Y;const J=q(),Q=U.value>=J.length-1||O.value!=="horizontal"||t.disabledOverflow,G=X=>O.value!=="horizontal"||t.disabledOverflow?X:X.map((K,te)=>C(Zp,{key:K.key,overflowDisabled:te>U.value},{default:()=>K})),ee=((Y=n.overflowedIndicator)===null||Y===void 0?void 0:Y.call(n))||C(Zd,null,null);return c(C(Rr,H(H({},o),{},{onMousedown:t.onMousedown,prefixCls:`${l.value}-overflow`,component:"ul",itemComponent:or,class:[R.value,o.class,u.value],role:"menu",id:t.id,data:G(J),renderRawItem:X=>X,renderRawRest:X=>{const K=X.length,te=K?J.slice(-K):null;return C(Qe,null,[C(Fs,{eventKey:Wf,key:Wf,title:ee,disabled:Q,internalPopupClose:K===0},{default:()=>te}),C(L2,null,{default:()=>[C(Fs,{eventKey:Wf,key:Wf,title:ee,disabled:Q,internalPopupClose:K===0},{default:()=>te})]})])},maxCount:O.value!=="horizontal"||t.disabledOverflow?Rr.INVALIDATE:Rr.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:X=>{U.value=X}}),{default:()=>[C(Ow,{to:"body"},{default:()=>[C("div",{style:{display:"none"},"aria-hidden":!0},[C(L2,null,{default:()=>[G(q())]})])]})]}))}}});sn.install=function(t){return t.component(sn.name,sn),t.component(or.name,or),t.component(Fs.name,Fs),t.component(Cd.name,Cd),t.component(Sd.name,Sd),t};sn.Item=or;sn.Divider=Cd;sn.SubMenu=Fs;sn.ItemGroup=Sd;const Fee=t=>{const{componentCls:e,iconCls:n}=t;return{[e]:A(A({},rt(t)),{color:t.breadcrumbBaseColor,fontSize:t.breadcrumbFontSize,[n]:{fontSize:t.breadcrumbIconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:A({color:t.breadcrumbLinkColor,transition:`color ${t.motionDurationMid}`,padding:`0 ${t.paddingXXS}px`,borderRadius:t.borderRadiusSM,height:t.lineHeight*t.fontSize,display:"inline-block",marginInline:-t.marginXXS,"&:hover":{color:t.breadcrumbLinkColorHover,backgroundColor:t.colorBgTextHover}},Hr(t)),"li:last-child":{color:t.breadcrumbLastItemColor,[`& > ${e}-separator`]:{display:"none"}},[`${e}-separator`]:{marginInline:t.breadcrumbSeparatorMargin,color:t.breadcrumbSeparatorColor},[`${e}-link`]:{[` > ${n} + span, > ${n} + a - `]:{marginInlineStart:t.marginXXS}},[`${e}-overlay-link`]:{borderRadius:t.borderRadiusSM,height:t.lineHeight*t.fontSize,display:"inline-block",padding:`0 ${t.paddingXXS}px`,marginInline:-t.marginXXS,[`> ${n}`]:{marginInlineStart:t.marginXXS,fontSize:t.fontSizeIcon},"&:hover":{color:t.breadcrumbLinkColorHover,backgroundColor:t.colorBgTextHover,a:{color:t.breadcrumbLinkColorHover}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${t.componentCls}-rtl`]:{direction:"rtl"}})}},Nee=et("Breadcrumb",t=>{const e=Ve(t,{breadcrumbBaseColor:t.colorTextDescription,breadcrumbFontSize:t.fontSize,breadcrumbIconFontSize:t.fontSize,breadcrumbLinkColor:t.colorTextDescription,breadcrumbLinkColorHover:t.colorText,breadcrumbLastItemColor:t.colorText,breadcrumbSeparatorMargin:t.marginXS,breadcrumbSeparatorColor:t.colorTextDescription});return[Fee(e)]}),Bee=()=>({prefixCls:String,routes:{type:Array},params:Z.any,separator:Z.any,itemRender:{type:Function}});function zee(t,e){if(!t.breadcrumbName)return null;const n=Object.keys(e).join("|");return t.breadcrumbName.replace(new RegExp(`:(${n})`,"g"),(o,r)=>e[r]||o)}function X2(t){const{route:e,params:n,routes:i,paths:o}=t,r=i.indexOf(e)===i.length-1,a=zee(e,n);return r?C("span",null,[a]):C("a",{href:`#/${o.join("/")}`},[a])}const Cs=oe({compatConfig:{MODE:3},name:"ABreadcrumb",inheritAttrs:!1,props:Bee(),slots:Object,setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,direction:r}=Me("breadcrumb",t),[a,s]=Nee(o),l=(d,f)=>(d=(d||"").replace(/^\//,""),Object.keys(f).forEach(h=>{d=d.replace(`:${h}`,f[h])}),d),c=(d,f,h)=>{const p=[...d],g=l(f||"",h);return g&&p.push(g),p},u=d=>{let{routes:f=[],params:h={},separator:p,itemRender:g=X2}=d;const m=[];return f.map(v=>{const b=l(v.path,h);b&&m.push(b);const y=[...m];let w=null;v.children&&v.children.length&&(w=C(sn,{items:v.children.map($=>({key:$.path||$.breadcrumbName,label:g({route:$,params:h,routes:f,paths:c(y,$.path,h)})}))},null));const x={separator:p};return w&&(x.overlay=w),C(xd,H(H({},x),{},{key:b||v.breadcrumbName}),{default:()=>[g({route:v,params:h,routes:f,paths:y})]})})};return()=>{var d;let f;const{routes:h,params:p={}}=t,g=Dt(gn(n,t)),m=(d=gn(n,t,"separator"))!==null&&d!==void 0?d:"/",v=t.itemRender||n.itemRender||X2;h&&h.length>0?f=u({routes:h,params:p,separator:m,itemRender:v}):g.length&&(f=g.map((y,w)=>(Gi(typeof y.type=="object"&&(y.type.__ANT_BREADCRUMB_ITEM||y.type.__ANT_BREADCRUMB_SEPARATOR)),On(y,{separator:m,key:w}))));const b={[o.value]:!0,[`${o.value}-rtl`]:r.value==="rtl",[`${i.class}`]:!!i.class,[s.value]:!0};return a(C("nav",H(H({},i),{},{class:b}),[C("ol",null,[f])]))}}});var Hee=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o({prefixCls:String}),Qp=oe({compatConfig:{MODE:3},name:"ABreadcrumbSeparator",__ANT_BREADCRUMB_SEPARATOR:!0,inheritAttrs:!1,props:Wee(),setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o}=Me("breadcrumb",t);return()=>{var r;const{separator:a,class:s}=i,l=Hee(i,["separator","class"]),c=Dt((r=n.default)===null||r===void 0?void 0:r.call(n));return C("span",H({class:[`${o.value}-separator`,s]},l),[c.length>0?c:"/"])}}});Cs.Item=xd;Cs.Separator=Qp;Cs.install=function(t){return t.component(Cs.name,Cs),t.component(xd.name,xd),t.component(Qp.name,Qp),t};var Fa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Na(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var I3={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(Fa,function(){var n=1e3,i=6e4,o=36e5,r="millisecond",a="second",s="minute",l="hour",c="day",u="week",d="month",f="quarter",h="year",p="date",g="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(k){var E=["th","st","nd","rd"],R=k%100;return"["+k+(E[(R-20)%10]||E[R]||E[0])+"]"}},y=function(k,E,R){var D=String(k);return!D||D.length>=E?k:""+Array(E+1-D.length).join(R)+k},w={s:y,z:function(k){var E=-k.utcOffset(),R=Math.abs(E),D=Math.floor(R/60),F=R%60;return(E<=0?"+":"-")+y(D,2,"0")+":"+y(F,2,"0")},m:function k(E,R){if(E.date()1)return k(B[0])}else{var z=E.name;$[z]=E,F=z}return!D&&F&&(x=F),F||!D&&x},O=function(k,E){if(_(k))return k.clone();var R=typeof E=="object"?E:{};return R.date=k,R.args=arguments,new M(R)},T=w;T.l=P,T.i=_,T.w=function(k,E){return O(k,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var M=function(){function k(R){this.$L=P(R.locale,null,!0),this.parse(R),this.$x=this.$x||R.x||{},this[S]=!0}var E=k.prototype;return E.parse=function(R){this.$d=function(D){var F=D.date,N=D.utc;if(F===null)return new Date(NaN);if(T.u(F))return new Date;if(F instanceof Date)return new Date(F);if(typeof F=="string"&&!/Z$/i.test(F)){var B=F.match(m);if(B){var z=B[2]-1||0,W=(B[7]||"0").substring(0,3);return N?new Date(Date.UTC(B[1],z,B[3]||1,B[4]||0,B[5]||0,B[6]||0,W)):new Date(B[1],z,B[3]||1,B[4]||0,B[5]||0,B[6]||0,W)}}return new Date(F)}(R),this.init()},E.init=function(){var R=this.$d;this.$y=R.getFullYear(),this.$M=R.getMonth(),this.$D=R.getDate(),this.$W=R.getDay(),this.$H=R.getHours(),this.$m=R.getMinutes(),this.$s=R.getSeconds(),this.$ms=R.getMilliseconds()},E.$utils=function(){return T},E.isValid=function(){return this.$d.toString()!==g},E.isSame=function(R,D){var F=O(R);return this.startOf(D)<=F&&F<=this.endOf(D)},E.isAfter=function(R,D){return O(R)25){var u=a(this).startOf(i).add(1,i).date(c),d=a(this).endOf(n);if(u.isBefore(d))return 1}var f=a(this).startOf(i).date(c).startOf(n).subtract(1,"millisecond"),h=this.diff(f,n,!0);return h<0?a(this).startOf("week").week():Math.ceil(h)},s.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}})})(R3);var Kee=R3.exports;const Uee=Na(Kee);var L3={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(Fa,function(){return function(n,i){i.prototype.weekYear=function(){var o=this.month(),r=this.week(),a=this.year();return r===1&&o===11?a+1:o===0&&r>=52?a-1:a}}})})(L3);var qee=L3.exports;const Zee=Na(qee);var F3={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(Fa,function(){var n="month",i="quarter";return function(o,r){var a=r.prototype;a.quarter=function(c){return this.$utils().u(c)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(c-1))};var s=a.add;a.add=function(c,u){return c=Number(c),this.$utils().p(u)===i?this.add(3*c,n):s.bind(this)(c,u)};var l=a.startOf;a.startOf=function(c,u){var d=this.$utils(),f=!!d.u(u)||u;if(d.p(c)===i){var h=this.quarter()-1;return f?this.month(3*h).startOf(n).startOf("day"):this.month(3*h+2).endOf(n).endOf("day")}return l.bind(this)(c,u)}}})})(F3);var Jee=F3.exports;const Qee=Na(Jee);var N3={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(Fa,function(){return function(n,i){var o=i.prototype,r=o.format;o.format=function(a){var s=this,l=this.$locale();if(!this.isValid())return r.bind(this)(a);var c=this.$utils(),u=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(d){switch(d){case"Q":return Math.ceil((s.$M+1)/3);case"Do":return l.ordinal(s.$D);case"gggg":return s.weekYear();case"GGGG":return s.isoWeekYear();case"wo":return l.ordinal(s.week(),"W");case"w":case"ww":return c.s(s.week(),d==="w"?1:2,"0");case"W":case"WW":return c.s(s.isoWeek(),d==="W"?1:2,"0");case"k":case"kk":return c.s(String(s.$H===0?24:s.$H),d==="k"?1:2,"0");case"X":return Math.floor(s.$d.getTime()/1e3);case"x":return s.$d.getTime();case"z":return"["+s.offsetName()+"]";case"zzz":return"["+s.offsetName("long")+"]";default:return d}});return r.bind(this)(u)}}})})(N3);var ete=N3.exports;const tte=Na(ete);var B3={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(Fa,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},i=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,o=/\d/,r=/\d\d/,a=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,l={},c=function(m){return(m=+m)+(m>68?1900:2e3)},u=function(m){return function(v){this[m]=+v}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(m){(this.zone||(this.zone={})).offset=function(v){if(!v||v==="Z")return 0;var b=v.match(/([+-]|\d\d)/g),y=60*b[1]+(+b[2]||0);return y===0?0:b[0]==="+"?-y:y}(m)}],f=function(m){var v=l[m];return v&&(v.indexOf?v:v.s.concat(v.f))},h=function(m,v){var b,y=l.meridiem;if(y){for(var w=1;w<=24;w+=1)if(m.indexOf(y(w,0,v))>-1){b=w>12;break}}else b=m===(v?"pm":"PM");return b},p={A:[s,function(m){this.afternoon=h(m,!1)}],a:[s,function(m){this.afternoon=h(m,!0)}],Q:[o,function(m){this.month=3*(m-1)+1}],S:[o,function(m){this.milliseconds=100*+m}],SS:[r,function(m){this.milliseconds=10*+m}],SSS:[/\d{3}/,function(m){this.milliseconds=+m}],s:[a,u("seconds")],ss:[a,u("seconds")],m:[a,u("minutes")],mm:[a,u("minutes")],H:[a,u("hours")],h:[a,u("hours")],HH:[a,u("hours")],hh:[a,u("hours")],D:[a,u("day")],DD:[r,u("day")],Do:[s,function(m){var v=l.ordinal,b=m.match(/\d+/);if(this.day=b[0],v)for(var y=1;y<=31;y+=1)v(y).replace(/\[|\]/g,"")===m&&(this.day=y)}],w:[a,u("week")],ww:[r,u("week")],M:[a,u("month")],MM:[r,u("month")],MMM:[s,function(m){var v=f("months"),b=(f("monthsShort")||v.map(function(y){return y.slice(0,3)})).indexOf(m)+1;if(b<1)throw new Error;this.month=b%12||b}],MMMM:[s,function(m){var v=f("months").indexOf(m)+1;if(v<1)throw new Error;this.month=v%12||v}],Y:[/[+-]?\d+/,u("year")],YY:[r,function(m){this.year=c(m)}],YYYY:[/\d{4}/,u("year")],Z:d,ZZ:d};function g(m){var v,b;v=m,b=l&&l.formats;for(var y=(m=v.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(O,T,M){var I=M&&M.toUpperCase();return T||b[M]||n[M]||b[I].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(k,E,R){return E||R.slice(1)})})).match(i),w=y.length,x=0;x-1)return new Date((F==="X"?1e3:1)*D);var z=g(F)(D),W=z.year,j=z.month,U=z.day,V=z.hours,q=z.minutes,Y=z.seconds,J=z.milliseconds,Q=z.zone,G=z.week,ee=new Date,X=U||(W||j?1:ee.getDate()),K=W||ee.getFullYear(),te=0;W&&!j||(te=j>0?j-1:ee.getMonth());var ue,ae=V||0,re=q||0,ne=Y||0,le=J||0;return Q?new Date(Date.UTC(K,te,X,ae,re,ne,le+60*Q.offset*1e3)):N?new Date(Date.UTC(K,te,X,ae,re,ne,le)):(ue=new Date(K,te,X,ae,re,ne,le),G&&(ue=B(ue).week(G).toDate()),ue)}catch{return new Date("")}}($,P,S,b),this.init(),I&&I!==!0&&(this.$L=this.locale(I).$L),M&&$!=this.format(P)&&(this.$d=new Date("")),l={}}else if(P instanceof Array)for(var k=P.length,E=1;E<=k;E+=1){_[1]=P[E-1];var R=b.apply(this,_);if(R.isValid()){this.$d=R.$d,this.$L=R.$L,this.init();break}E===k&&(this.$d=new Date(""))}else w.call(this,x)}}})})(B3);var nte=B3.exports;const ite=Na(nte);Pn.extend(ite);Pn.extend(tte);Pn.extend(Xee);Pn.extend(Gee);Pn.extend(Uee);Pn.extend(Zee);Pn.extend(Qee);Pn.extend((t,e)=>{const n=e.prototype,i=n.format;n.format=function(r){const a=(r||"").replace("Wo","wo");return i.bind(this)(a)}});const ote={bn_BD:"bn-bd",by_BY:"be",en_GB:"en-gb",en_US:"en",fr_BE:"fr",fr_CA:"fr-ca",hy_AM:"hy-am",kmr_IQ:"ku",nl_BE:"nl-be",pt_BR:"pt-br",zh_CN:"zh-cn",zh_HK:"zh-hk",zh_TW:"zh-tw"},Ya=t=>ote[t]||t.split("_")[0],Y2=()=>{$7(!1,"Not match any format. Please help to fire a issue about this.")},rte=/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|k{1,2}|S/g;function G2(t,e,n){const i=[...new Set(t.split(n))];let o=0;for(let r=0;re)return a;o+=n.length}}const K2=(t,e)=>{if(!t)return null;if(Pn.isDayjs(t))return t;const n=e.matchAll(rte);let i=Pn(t,e);if(n===null)return i;for(const o of n){const r=o[0],a=o.index;if(r==="Q"){const s=t.slice(a-1,a),l=G2(t,a,s).match(/\d+/)[0];i=i.quarter(parseInt(l))}if(r.toLowerCase()==="wo"){const s=t.slice(a-1,a),l=G2(t,a,s).match(/\d+/)[0];i=i.week(parseInt(l))}r.toLowerCase()==="ww"&&(i=i.week(parseInt(t.slice(a,a+r.length)))),r.toLowerCase()==="w"&&(i=i.week(parseInt(t.slice(a,a+r.length+1))))}return i},rS={getNow:()=>Pn(),getFixedDate:t=>Pn(t,["YYYY-M-DD","YYYY-MM-DD"]),getEndDate:t=>t.endOf("month"),getWeekDay:t=>{const e=t.locale("en");return e.weekday()+e.localeData().firstDayOfWeek()},getYear:t=>t.year(),getMonth:t=>t.month(),getDate:t=>t.date(),getHour:t=>t.hour(),getMinute:t=>t.minute(),getSecond:t=>t.second(),addYear:(t,e)=>t.add(e,"year"),addMonth:(t,e)=>t.add(e,"month"),addDate:(t,e)=>t.add(e,"day"),setYear:(t,e)=>t.year(e),setMonth:(t,e)=>t.month(e),setDate:(t,e)=>t.date(e),setHour:(t,e)=>t.hour(e),setMinute:(t,e)=>t.minute(e),setSecond:(t,e)=>t.second(e),isAfter:(t,e)=>t.isAfter(e),isValidate:t=>t.isValid(),locale:{getWeekFirstDay:t=>Pn().locale(Ya(t)).localeData().firstDayOfWeek(),getWeekFirstDate:(t,e)=>e.locale(Ya(t)).weekday(0),getWeek:(t,e)=>e.locale(Ya(t)).week(),getShortWeekDays:t=>Pn().locale(Ya(t)).localeData().weekdaysMin(),getShortMonths:t=>Pn().locale(Ya(t)).localeData().monthsShort(),format:(t,e,n)=>e.locale(Ya(t)).format(n),parse:(t,e,n)=>{const i=Ya(t);for(let o=0;oArray.isArray(t)?t.map(n=>K2(n,e)):K2(t,e),toString:(t,e)=>Array.isArray(t)?t.map(n=>Pn.isDayjs(n)?n.format(e):n):Pn.isDayjs(t)?t.format(e):t};function dn(t){const e=UB();return A(A({},t),e)}const z3=Symbol("PanelContextProps"),aS=t=>{ot(z3,t)},ur=()=>qe(z3,{}),Wf={visibility:"hidden"};function Ba(t,e){let{slots:n}=e;var i;const o=dn(t),{prefixCls:r,prevIcon:a="‹",nextIcon:s="›",superPrevIcon:l="«",superNextIcon:c="»",onSuperPrev:u,onSuperNext:d,onPrev:f,onNext:h}=o,{hideNextBtn:p,hidePrevBtn:g}=ur();return C("div",{class:r},[u&&C("button",{type:"button",onClick:u,tabindex:-1,class:`${r}-super-prev-btn`,style:g.value?Wf:{}},[l]),f&&C("button",{type:"button",onClick:f,tabindex:-1,class:`${r}-prev-btn`,style:g.value?Wf:{}},[a]),C("div",{class:`${r}-view`},[(i=n.default)===null||i===void 0?void 0:i.call(n)]),h&&C("button",{type:"button",onClick:h,tabindex:-1,class:`${r}-next-btn`,style:p.value?Wf:{}},[s]),d&&C("button",{type:"button",onClick:d,tabindex:-1,class:`${r}-super-next-btn`,style:p.value?Wf:{}},[c])])}Ba.displayName="Header";Ba.inheritAttrs=!1;function sS(t){const e=dn(t),{prefixCls:n,generateConfig:i,viewDate:o,onPrevDecades:r,onNextDecades:a}=e,{hideHeader:s}=ur();if(s)return null;const l=`${n}-header`,c=i.getYear(o),u=Math.floor(c/Or)*Or,d=u+Or-1;return C(Ba,H(H({},e),{},{prefixCls:l,onSuperPrev:r,onSuperNext:a}),{default:()=>[u,Qn("-"),d]})}sS.displayName="DecadeHeader";sS.inheritAttrs=!1;function H3(t,e,n,i,o){let r=t.setHour(e,n);return r=t.setMinute(r,i),r=t.setSecond(r,o),r}function Ch(t,e,n){if(!n)return e;let i=e;return i=t.setHour(i,t.getHour(n)),i=t.setMinute(i,t.getMinute(n)),i=t.setSecond(i,t.getSecond(n)),i}function ate(t,e,n,i,o,r){const a=Math.floor(t/i)*i;if(a{k.stopPropagation(),M||i(T)},onMouseenter:()=>{!M&&v&&v(T)},onMouseleave:()=>{!M&&b&&b(T)}},[f?f(T):C("div",{class:`${w}-inner`},[d(T)])]))}x.push(C("tr",{key:$,class:l&&l(_)},[S]))}return C("div",{class:`${e}-body`},[C("table",{class:`${e}-content`},[m&&C("thead",null,[C("tr",null,[m])]),C("tbody",null,[x])])])}il.displayName="PanelBody";il.inheritAttrs=!1;const ky=3,U2=4;function lS(t){const e=dn(t),n=To-1,{prefixCls:i,viewDate:o,generateConfig:r}=e,a=`${i}-cell`,s=r.getYear(o),l=Math.floor(s/To)*To,c=Math.floor(s/Or)*Or,u=c+Or-1,d=r.setYear(o,c-Math.ceil((ky*U2*To-Or)/2)),f=h=>{const p=r.getYear(h),g=p+n;return{[`${a}-in-view`]:c<=p&&g<=u,[`${a}-selected`]:p===l}};return C(il,H(H({},e),{},{rowNum:U2,colNum:ky,baseDate:d,getCellText:h=>{const p=r.getYear(h);return`${p}-${p+n}`},getCellClassName:f,getCellDate:(h,p)=>r.addYear(h,p*To)}),null)}lS.displayName="DecadeBody";lS.inheritAttrs=!1;const jf=new Map;function lte(t,e){let n;function i(){gm(t)?e():n=lt(()=>{i()})}return i(),()=>{lt.cancel(n)}}function Dy(t,e,n){if(jf.get(t)&<.cancel(jf.get(t)),n<=0){jf.set(t,lt(()=>{t.scrollTop=e}));return}const o=(e-t.scrollTop)/n*10;jf.set(t,lt(()=>{t.scrollTop+=o,t.scrollTop!==e&&Dy(t,e,n-10)}))}function Ic(t,e){let{onLeftRight:n,onCtrlLeftRight:i,onUpDown:o,onPageUpDown:r,onEnter:a}=e;const{which:s,ctrlKey:l,metaKey:c}=t;switch(s){case Te.LEFT:if(l||c){if(i)return i(-1),!0}else if(n)return n(-1),!0;break;case Te.RIGHT:if(l||c){if(i)return i(1),!0}else if(n)return n(1),!0;break;case Te.UP:if(o)return o(-1),!0;break;case Te.DOWN:if(o)return o(1),!0;break;case Te.PAGE_UP:if(r)return r(-1),!0;break;case Te.PAGE_DOWN:if(r)return r(1),!0;break;case Te.ENTER:if(a)return a(),!0;break}return!1}function W3(t,e,n,i){let o=t;if(!o)switch(e){case"time":o=i?"hh:mm:ss a":"HH:mm:ss";break;case"week":o="gggg-wo";break;case"month":o="YYYY-MM";break;case"quarter":o="YYYY-[Q]Q";break;case"year":o="YYYY";break;default:o=n?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD"}return o}function j3(t,e,n){const i=t==="time"?8:10,o=typeof e=="function"?e(n.getNow()).length:e.length;return Math.max(i,o)+2}let Jc=null;const Vf=new Set;function cte(t){return!Jc&&typeof window<"u"&&window.addEventListener&&(Jc=e=>{[...Vf].forEach(n=>{n(e)})},window.addEventListener("mousedown",Jc)),Vf.add(t),()=>{Vf.delete(t),Vf.size===0&&(window.removeEventListener("mousedown",Jc),Jc=null)}}function ute(t){var e;const n=t.target;return t.composed&&n.shadowRoot&&((e=t.composedPath)===null||e===void 0?void 0:e.call(t)[0])||n}const dte=t=>t==="month"||t==="date"?"year":t,fte=t=>t==="date"?"month":t,hte=t=>t==="month"||t==="date"?"quarter":t,pte=t=>t==="date"?"week":t,gte={year:dte,month:fte,quarter:hte,week:pte,time:null,date:null};function V3(t,e){return t.some(n=>n&&n.contains(e))}const To=10,Or=To*10;function cS(t){const e=dn(t),{prefixCls:n,onViewDateChange:i,generateConfig:o,viewDate:r,operationRef:a,onSelect:s,onPanelChange:l}=e,c=`${n}-decade-panel`;a.value={onKeydown:f=>Ic(f,{onLeftRight:h=>{s(o.addYear(r,h*To),"key")},onCtrlLeftRight:h=>{s(o.addYear(r,h*Or),"key")},onUpDown:h=>{s(o.addYear(r,h*To*ky),"key")},onEnter:()=>{l("year",r)}})};const u=f=>{const h=o.addYear(r,f*Or);i(h),l(null,h)},d=f=>{s(f,"mouse"),l("year",f)};return C("div",{class:c},[C(sS,H(H({},e),{},{prefixCls:n,onPrevDecades:()=>{u(-1)},onNextDecades:()=>{u(1)}}),null),C(lS,H(H({},e),{},{prefixCls:n,onSelect:d}),null)])}cS.displayName="DecadePanel";cS.inheritAttrs=!1;const $h=7;function ol(t,e){if(!t&&!e)return!0;if(!t||!e)return!1}function mte(t,e,n){const i=ol(e,n);if(typeof i=="boolean")return i;const o=Math.floor(t.getYear(e)/10),r=Math.floor(t.getYear(n)/10);return o===r}function Nm(t,e,n){const i=ol(e,n);return typeof i=="boolean"?i:t.getYear(e)===t.getYear(n)}function Ry(t,e){return Math.floor(t.getMonth(e)/3)+1}function X3(t,e,n){const i=ol(e,n);return typeof i=="boolean"?i:Nm(t,e,n)&&Ry(t,e)===Ry(t,n)}function uS(t,e,n){const i=ol(e,n);return typeof i=="boolean"?i:Nm(t,e,n)&&t.getMonth(e)===t.getMonth(n)}function Er(t,e,n){const i=ol(e,n);return typeof i=="boolean"?i:t.getYear(e)===t.getYear(n)&&t.getMonth(e)===t.getMonth(n)&&t.getDate(e)===t.getDate(n)}function vte(t,e,n){const i=ol(e,n);return typeof i=="boolean"?i:t.getHour(e)===t.getHour(n)&&t.getMinute(e)===t.getMinute(n)&&t.getSecond(e)===t.getSecond(n)}function Y3(t,e,n,i){const o=ol(n,i);return typeof o=="boolean"?o:t.locale.getWeek(e,n)===t.locale.getWeek(e,i)}function Kl(t,e,n){return Er(t,e,n)&&vte(t,e,n)}function Xf(t,e,n,i){return!e||!n||!i?!1:!Er(t,e,i)&&!Er(t,n,i)&&t.isAfter(i,e)&&t.isAfter(n,i)}function bte(t,e,n){const i=e.locale.getWeekFirstDay(t),o=e.setDate(n,1),r=e.getWeekDay(o);let a=e.addDate(o,i-r);return e.getMonth(a)===e.getMonth(n)&&e.getDate(a)>1&&(a=e.addDate(a,-7)),a}function Fu(t,e,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;switch(e){case"year":return n.addYear(t,i*10);case"quarter":case"month":return n.addYear(t,i);default:return n.addMonth(t,i)}}function zn(t,e){let{generateConfig:n,locale:i,format:o}=e;return typeof o=="function"?o(t):n.locale.format(i.locale,t,o)}function G3(t,e){let{generateConfig:n,locale:i,formatList:o}=e;return!t||typeof o[0]=="function"?null:n.locale.parse(i.locale,t,o)}function Ly(t){let{cellDate:e,mode:n,disabledDate:i,generateConfig:o}=t;if(!i)return!1;const r=(a,s,l)=>{let c=s;for(;c<=l;){let u;switch(a){case"date":{if(u=o.setDate(e,c),!i(u))return!1;break}case"month":{if(u=o.setMonth(e,c),!Ly({cellDate:u,mode:"month",generateConfig:o,disabledDate:i}))return!1;break}case"year":{if(u=o.setYear(e,c),!Ly({cellDate:u,mode:"year",generateConfig:o,disabledDate:i}))return!1;break}}c+=1}return!0};switch(n){case"date":case"week":return i(e);case"month":{const s=o.getDate(o.getEndDate(e));return r("date",1,s)}case"quarter":{const a=Math.floor(o.getMonth(e)/3)*3,s=a+2;return r("month",a,s)}case"year":return r("month",0,11);case"decade":{const a=o.getYear(e),s=Math.floor(a/To)*To,l=s+To-1;return r("year",s,l)}}}function dS(t){const e=dn(t),{hideHeader:n}=ur();if(n.value)return null;const{prefixCls:i,generateConfig:o,locale:r,value:a,format:s}=e,l=`${i}-header`;return C(Ba,{prefixCls:l},{default:()=>[a?zn(a,{locale:r,format:s,generateConfig:o}):" "]})}dS.displayName="TimeHeader";dS.inheritAttrs=!1;const Yf=oe({name:"TimeUnitColumn",props:["prefixCls","units","onSelect","value","active","hideDisabledOptions"],setup(t){const{open:e}=ur(),n=ie(null),i=se(new Map),o=se();return ye(()=>t.value,()=>{const r=i.value.get(t.value);r&&e.value!==!1&&Dy(n.value,r.offsetTop,120)}),at(()=>{var r;(r=o.value)===null||r===void 0||r.call(o)}),ye(e,()=>{var r;(r=o.value)===null||r===void 0||r.call(o),pt(()=>{if(e.value){const a=i.value.get(t.value);a&&(o.value=lte(a,()=>{Dy(n.value,a.offsetTop,0)}))}})},{immediate:!0,flush:"post"}),()=>{const{prefixCls:r,units:a,onSelect:s,value:l,active:c,hideDisabledOptions:u}=t,d=`${r}-cell`;return C("ul",{class:ce(`${r}-column`,{[`${r}-column-active`]:c}),ref:n,style:{position:"relative"}},[a.map(f=>u&&f.disabled?null:C("li",{key:f.value,ref:h=>{i.value.set(f.value,h)},class:ce(d,{[`${d}-disabled`]:f.disabled,[`${d}-selected`]:l===f.value}),onClick:()=>{f.disabled||s(f.value)}},[C("div",{class:`${d}-inner`},[f.label])]))])}}});function K3(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0",i=String(t);for(;i.length{(n.startsWith("data-")||n.startsWith("aria-")||n==="role"||n==="name")&&!n.startsWith("data-__")&&(e[n]=t[n])}),e}function It(t,e){return t?t[e]:null}function oo(t,e,n){const i=[It(t,0),It(t,1)];return i[n]=typeof e=="function"?e(i[n]):e,!i[0]&&!i[1]?null:i}function $b(t,e,n,i){const o=[];for(let r=t;r<=e;r+=n)o.push({label:K3(r,2),value:r,disabled:(i||[]).includes(r)});return o}const xte=oe({compatConfig:{MODE:3},name:"TimeBody",inheritAttrs:!1,props:["generateConfig","prefixCls","operationRef","activeColumnIndex","value","showHour","showMinute","showSecond","use12Hours","hourStep","minuteStep","secondStep","disabledHours","disabledMinutes","disabledSeconds","disabledTime","hideDisabledOptions","onSelect"],setup(t){const e=L(()=>t.value?t.generateConfig.getHour(t.value):-1),n=L(()=>t.use12Hours?e.value>=12:!1),i=L(()=>t.use12Hours?e.value%12:e.value),o=L(()=>t.value?t.generateConfig.getMinute(t.value):-1),r=L(()=>t.value?t.generateConfig.getSecond(t.value):-1),a=se(t.generateConfig.getNow()),s=se(),l=se(),c=se();Jg(()=>{a.value=t.generateConfig.getNow()}),Ke(()=>{if(t.disabledTime){const m=t.disabledTime(a);[s.value,l.value,c.value]=[m.disabledHours,m.disabledMinutes,m.disabledSeconds]}else[s.value,l.value,c.value]=[t.disabledHours,t.disabledMinutes,t.disabledSeconds]});const u=(m,v,b,y)=>{let w=t.value||t.generateConfig.getNow();const x=Math.max(0,v),$=Math.max(0,b),S=Math.max(0,y);return w=H3(t.generateConfig,w,!t.use12Hours||!m?x:x+12,$,S),w},d=L(()=>{var m;return $b(0,23,(m=t.hourStep)!==null&&m!==void 0?m:1,s.value&&s.value())}),f=L(()=>{if(!t.use12Hours)return[!1,!1];const m=[!0,!0];return d.value.forEach(v=>{let{disabled:b,value:y}=v;b||(y>=12?m[1]=!1:m[0]=!1)}),m}),h=L(()=>t.use12Hours?d.value.filter(n.value?m=>m.value>=12:m=>m.value<12).map(m=>{const v=m.value%12,b=v===0?"12":K3(v,2);return A(A({},m),{label:b,value:v})}):d.value),p=L(()=>{var m;return $b(0,59,(m=t.minuteStep)!==null&&m!==void 0?m:1,l.value&&l.value(e.value))}),g=L(()=>{var m;return $b(0,59,(m=t.secondStep)!==null&&m!==void 0?m:1,c.value&&c.value(e.value,o.value))});return()=>{const{prefixCls:m,operationRef:v,activeColumnIndex:b,showHour:y,showMinute:w,showSecond:x,use12Hours:$,hideDisabledOptions:S,onSelect:_}=t,P=[],O=`${m}-content`,T=`${m}-time-panel`;v.value={onUpDown:k=>{const E=P[b];if(E){const R=E.units.findIndex(F=>F.value===E.value),D=E.units.length;for(let F=1;F{_(u(n.value,k,o.value,r.value),"mouse")}),M(w,C(Yf,{key:"minute"},null),o.value,p.value,k=>{_(u(n.value,i.value,k,r.value),"mouse")}),M(x,C(Yf,{key:"second"},null),r.value,g.value,k=>{_(u(n.value,i.value,o.value,k),"mouse")});let I=-1;return typeof n.value=="boolean"&&(I=n.value?1:0),M($===!0,C(Yf,{key:"12hours"},null),I,[{label:"AM",value:0,disabled:f.value[0]},{label:"PM",value:1,disabled:f.value[1]}],k=>{_(u(!!k,i.value,o.value,r.value),"mouse")}),C("div",{class:O},[P.map(k=>{let{node:E}=k;return E})])}}}),wte=t=>t.filter(e=>e!==!1).length;function Bm(t){const e=dn(t),{generateConfig:n,format:i="HH:mm:ss",prefixCls:o,active:r,operationRef:a,showHour:s,showMinute:l,showSecond:c,use12Hours:u=!1,onSelect:d,value:f}=e,h=`${o}-time-panel`,p=se(),g=se(-1),m=wte([s,l,c,u]);return a.value={onKeydown:v=>Ic(v,{onLeftRight:b=>{g.value=(g.value+b+m)%m},onUpDown:b=>{g.value===-1?g.value=0:p.value&&p.value.onUpDown(b)},onEnter:()=>{d(f||n.getNow(),"key"),g.value=-1}}),onBlur:()=>{g.value=-1}},C("div",{class:ce(h,{[`${h}-active`]:r})},[C(dS,H(H({},e),{},{format:i,prefixCls:o}),null),C(xte,H(H({},e),{},{prefixCls:o,activeColumnIndex:g.value,operationRef:p}),null)])}Bm.displayName="TimePanel";Bm.inheritAttrs=!1;function zm(t){let{cellPrefixCls:e,generateConfig:n,rangedValue:i,hoverRangedValue:o,isInView:r,isSameCell:a,offsetCell:s,today:l,value:c}=t;function u(d){const f=s(d,-1),h=s(d,1),p=It(i,0),g=It(i,1),m=It(o,0),v=It(o,1),b=Xf(n,m,v,d);function y(P){return a(p,P)}function w(P){return a(g,P)}const x=a(m,d),$=a(v,d),S=(b||$)&&(!r(f)||w(f)),_=(b||x)&&(!r(h)||y(h));return{[`${e}-in-view`]:r(d),[`${e}-in-range`]:Xf(n,p,g,d),[`${e}-range-start`]:y(d),[`${e}-range-end`]:w(d),[`${e}-range-start-single`]:y(d)&&!g,[`${e}-range-end-single`]:w(d)&&!p,[`${e}-range-start-near-hover`]:y(d)&&(a(f,m)||Xf(n,m,v,f)),[`${e}-range-end-near-hover`]:w(d)&&(a(h,v)||Xf(n,m,v,h)),[`${e}-range-hover`]:b,[`${e}-range-hover-start`]:x,[`${e}-range-hover-end`]:$,[`${e}-range-hover-edge-start`]:S,[`${e}-range-hover-edge-end`]:_,[`${e}-range-hover-edge-start-near-range`]:S&&a(f,g),[`${e}-range-hover-edge-end-near-range`]:_&&a(h,p),[`${e}-today`]:a(l,d),[`${e}-selected`]:a(c,d)}}return u}const Z3=Symbol("RangeContextProps"),Ste=t=>{ot(Z3,t)},Jd=()=>qe(Z3,{rangedValue:se(),hoverRangedValue:se(),inRange:se(),panelPosition:se()}),Cte=oe({compatConfig:{MODE:3},name:"PanelContextProvider",inheritAttrs:!1,props:{value:{type:Object,default:()=>({})}},setup(t,e){let{slots:n}=e;const i={rangedValue:se(t.value.rangedValue),hoverRangedValue:se(t.value.hoverRangedValue),inRange:se(t.value.inRange),panelPosition:se(t.value.panelPosition)};return Ste(i),ye(()=>t.value,()=>{Object.keys(t.value).forEach(o=>{i[o]&&(i[o].value=t.value[o])})}),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}});function Hm(t){const e=dn(t),{prefixCls:n,generateConfig:i,prefixColumn:o,locale:r,rowCount:a,viewDate:s,value:l,dateRender:c}=e,{rangedValue:u,hoverRangedValue:d}=Jd(),f=bte(r.locale,i,s),h=`${n}-cell`,p=i.locale.getWeekFirstDay(r.locale),g=i.getNow(),m=[],v=r.shortWeekDays||(i.locale.getShortWeekDays?i.locale.getShortWeekDays(r.locale):[]);o&&m.push(C("th",{key:"empty","aria-label":"empty cell"},null));for(let w=0;w<$h;w+=1)m.push(C("th",{key:w},[v[(w+p)%$h]]));const b=zm({cellPrefixCls:h,today:g,value:l,generateConfig:i,rangedValue:o?null:u.value,hoverRangedValue:o?null:d.value,isSameCell:(w,x)=>Er(i,w,x),isInView:w=>uS(i,w,s),offsetCell:(w,x)=>i.addDate(w,x)}),y=c?w=>c({current:w,today:g}):void 0;return C(il,H(H({},e),{},{rowNum:a,colNum:$h,baseDate:f,getCellNode:y,getCellText:i.getDate,getCellClassName:b,getCellDate:i.addDate,titleCell:w=>zn(w,{locale:r,format:"YYYY-MM-DD",generateConfig:i}),headerCells:m}),null)}Hm.displayName="DateBody";Hm.inheritAttrs=!1;Hm.props=["prefixCls","generateConfig","value?","viewDate","locale","rowCount","onSelect","dateRender?","disabledDate?","prefixColumn?","rowClassName?"];function fS(t){const e=dn(t),{prefixCls:n,generateConfig:i,locale:o,viewDate:r,onNextMonth:a,onPrevMonth:s,onNextYear:l,onPrevYear:c,onYearClick:u,onMonthClick:d}=e,{hideHeader:f}=ur();if(f.value)return null;const h=`${n}-header`,p=o.shortMonths||(i.locale.getShortMonths?i.locale.getShortMonths(o.locale):[]),g=i.getMonth(r),m=C("button",{type:"button",key:"year",onClick:u,tabindex:-1,class:`${n}-year-btn`},[zn(r,{locale:o,format:o.yearFormat,generateConfig:i})]),v=C("button",{type:"button",key:"month",onClick:d,tabindex:-1,class:`${n}-month-btn`},[o.monthFormat?zn(r,{locale:o,format:o.monthFormat,generateConfig:i}):p[g]]),b=o.monthBeforeYear?[v,m]:[m,v];return C(Ba,H(H({},e),{},{prefixCls:h,onSuperPrev:c,onPrev:s,onNext:a,onSuperNext:l}),{default:()=>[b]})}fS.displayName="DateHeader";fS.inheritAttrs=!1;const $te=6;function Qd(t){const e=dn(t),{prefixCls:n,panelName:i="date",keyboardConfig:o,active:r,operationRef:a,generateConfig:s,value:l,viewDate:c,onViewDateChange:u,onPanelChange:d,onSelect:f}=e,h=`${n}-${i}-panel`;a.value={onKeydown:m=>Ic(m,A({onLeftRight:v=>{f(s.addDate(l||c,v),"key")},onCtrlLeftRight:v=>{f(s.addYear(l||c,v),"key")},onUpDown:v=>{f(s.addDate(l||c,v*$h),"key")},onPageUpDown:v=>{f(s.addMonth(l||c,v),"key")}},o))};const p=m=>{const v=s.addYear(c,m);u(v),d(null,v)},g=m=>{const v=s.addMonth(c,m);u(v),d(null,v)};return C("div",{class:ce(h,{[`${h}-active`]:r})},[C(fS,H(H({},e),{},{prefixCls:n,value:l,viewDate:c,onPrevYear:()=>{p(-1)},onNextYear:()=>{p(1)},onPrevMonth:()=>{g(-1)},onNextMonth:()=>{g(1)},onMonthClick:()=>{d("month",c)},onYearClick:()=>{d("year",c)}}),null),C(Hm,H(H({},e),{},{onSelect:m=>f(m,"mouse"),prefixCls:n,value:l,viewDate:c,rowCount:$te}),null)])}Qd.displayName="DatePanel";Qd.inheritAttrs=!1;const q2=yte("date","time");function hS(t){const e=dn(t),{prefixCls:n,operationRef:i,generateConfig:o,value:r,defaultValue:a,disabledTime:s,showTime:l,onSelect:c}=e,u=`${n}-datetime-panel`,d=se(null),f=se({}),h=se({}),p=typeof l=="object"?A({},l):{};function g(y){const w=q2.indexOf(d.value)+y;return q2[w]||null}const m=y=>{h.value.onBlur&&h.value.onBlur(y),d.value=null};i.value={onKeydown:y=>{if(y.which===Te.TAB){const w=g(y.shiftKey?-1:1);return d.value=w,w&&y.preventDefault(),!0}if(d.value){const w=d.value==="date"?f:h;return w.value&&w.value.onKeydown&&w.value.onKeydown(y),!0}return[Te.LEFT,Te.RIGHT,Te.UP,Te.DOWN].includes(y.which)?(d.value="date",!0):!1},onBlur:m,onClose:m};const v=(y,w)=>{let x=y;w==="date"&&!r&&p.defaultValue?(x=o.setHour(x,o.getHour(p.defaultValue)),x=o.setMinute(x,o.getMinute(p.defaultValue)),x=o.setSecond(x,o.getSecond(p.defaultValue))):w==="time"&&!r&&a&&(x=o.setYear(x,o.getYear(a)),x=o.setMonth(x,o.getMonth(a)),x=o.setDate(x,o.getDate(a))),c&&c(x,"mouse")},b=s?s(r||null):{};return C("div",{class:ce(u,{[`${u}-active`]:d.value})},[C(Qd,H(H({},e),{},{operationRef:f,active:d.value==="date",onSelect:y=>{v(Ch(o,y,!r&&typeof l=="object"?l.defaultValue:null),"date")}}),null),C(Bm,H(H(H(H({},e),{},{format:void 0},p),b),{},{disabledTime:null,defaultValue:void 0,operationRef:h,active:d.value==="time",onSelect:y=>{v(y,"time")}}),null)])}hS.displayName="DatetimePanel";hS.inheritAttrs=!1;function pS(t){const e=dn(t),{prefixCls:n,generateConfig:i,locale:o,value:r}=e,a=`${n}-cell`,s=u=>C("td",{key:"week",class:ce(a,`${a}-week`)},[i.locale.getWeek(o.locale,u)]),l=`${n}-week-panel-row`,c=u=>ce(l,{[`${l}-selected`]:Y3(i,o.locale,r,u)});return C(Qd,H(H({},e),{},{panelName:"week",prefixColumn:s,rowClassName:c,keyboardConfig:{onLeftRight:null}}),null)}pS.displayName="WeekPanel";pS.inheritAttrs=!1;function gS(t){const e=dn(t),{prefixCls:n,generateConfig:i,locale:o,viewDate:r,onNextYear:a,onPrevYear:s,onYearClick:l}=e,{hideHeader:c}=ur();if(c.value)return null;const u=`${n}-header`;return C(Ba,H(H({},e),{},{prefixCls:u,onSuperPrev:s,onSuperNext:a}),{default:()=>[C("button",{type:"button",onClick:l,class:`${n}-year-btn`},[zn(r,{locale:o,format:o.yearFormat,generateConfig:i})])]})}gS.displayName="MonthHeader";gS.inheritAttrs=!1;const J3=3,Ate=4;function mS(t){const e=dn(t),{prefixCls:n,locale:i,value:o,viewDate:r,generateConfig:a,monthCellRender:s}=e,{rangedValue:l,hoverRangedValue:c}=Jd(),u=`${n}-cell`,d=zm({cellPrefixCls:u,value:o,generateConfig:a,rangedValue:l.value,hoverRangedValue:c.value,isSameCell:(g,m)=>uS(a,g,m),isInView:()=>!0,offsetCell:(g,m)=>a.addMonth(g,m)}),f=i.shortMonths||(a.locale.getShortMonths?a.locale.getShortMonths(i.locale):[]),h=a.setMonth(r,0),p=s?g=>s({current:g,locale:i}):void 0;return C(il,H(H({},e),{},{rowNum:Ate,colNum:J3,baseDate:h,getCellNode:p,getCellText:g=>i.monthFormat?zn(g,{locale:i,format:i.monthFormat,generateConfig:a}):f[a.getMonth(g)],getCellClassName:d,getCellDate:a.addMonth,titleCell:g=>zn(g,{locale:i,format:"YYYY-MM",generateConfig:a})}),null)}mS.displayName="MonthBody";mS.inheritAttrs=!1;function vS(t){const e=dn(t),{prefixCls:n,operationRef:i,onViewDateChange:o,generateConfig:r,value:a,viewDate:s,onPanelChange:l,onSelect:c}=e,u=`${n}-month-panel`;i.value={onKeydown:f=>Ic(f,{onLeftRight:h=>{c(r.addMonth(a||s,h),"key")},onCtrlLeftRight:h=>{c(r.addYear(a||s,h),"key")},onUpDown:h=>{c(r.addMonth(a||s,h*J3),"key")},onEnter:()=>{l("date",a||s)}})};const d=f=>{const h=r.addYear(s,f);o(h),l(null,h)};return C("div",{class:u},[C(gS,H(H({},e),{},{prefixCls:n,onPrevYear:()=>{d(-1)},onNextYear:()=>{d(1)},onYearClick:()=>{l("year",s)}}),null),C(mS,H(H({},e),{},{prefixCls:n,onSelect:f=>{c(f,"mouse"),l("date",f)}}),null)])}vS.displayName="MonthPanel";vS.inheritAttrs=!1;function bS(t){const e=dn(t),{prefixCls:n,generateConfig:i,locale:o,viewDate:r,onNextYear:a,onPrevYear:s,onYearClick:l}=e,{hideHeader:c}=ur();if(c.value)return null;const u=`${n}-header`;return C(Ba,H(H({},e),{},{prefixCls:u,onSuperPrev:s,onSuperNext:a}),{default:()=>[C("button",{type:"button",onClick:l,class:`${n}-year-btn`},[zn(r,{locale:o,format:o.yearFormat,generateConfig:i})])]})}bS.displayName="QuarterHeader";bS.inheritAttrs=!1;const _te=4,Pte=1;function yS(t){const e=dn(t),{prefixCls:n,locale:i,value:o,viewDate:r,generateConfig:a}=e,{rangedValue:s,hoverRangedValue:l}=Jd(),c=`${n}-cell`,u=zm({cellPrefixCls:c,value:o,generateConfig:a,rangedValue:s.value,hoverRangedValue:l.value,isSameCell:(f,h)=>X3(a,f,h),isInView:()=>!0,offsetCell:(f,h)=>a.addMonth(f,h*3)}),d=a.setDate(a.setMonth(r,0),1);return C(il,H(H({},e),{},{rowNum:Pte,colNum:_te,baseDate:d,getCellText:f=>zn(f,{locale:i,format:i.quarterFormat||"[Q]Q",generateConfig:a}),getCellClassName:u,getCellDate:(f,h)=>a.addMonth(f,h*3),titleCell:f=>zn(f,{locale:i,format:"YYYY-[Q]Q",generateConfig:a})}),null)}yS.displayName="QuarterBody";yS.inheritAttrs=!1;function xS(t){const e=dn(t),{prefixCls:n,operationRef:i,onViewDateChange:o,generateConfig:r,value:a,viewDate:s,onPanelChange:l,onSelect:c}=e,u=`${n}-quarter-panel`;i.value={onKeydown:f=>Ic(f,{onLeftRight:h=>{c(r.addMonth(a||s,h*3),"key")},onCtrlLeftRight:h=>{c(r.addYear(a||s,h),"key")},onUpDown:h=>{c(r.addYear(a||s,h),"key")}})};const d=f=>{const h=r.addYear(s,f);o(h),l(null,h)};return C("div",{class:u},[C(bS,H(H({},e),{},{prefixCls:n,onPrevYear:()=>{d(-1)},onNextYear:()=>{d(1)},onYearClick:()=>{l("year",s)}}),null),C(yS,H(H({},e),{},{prefixCls:n,onSelect:f=>{c(f,"mouse")}}),null)])}xS.displayName="QuarterPanel";xS.inheritAttrs=!1;function wS(t){const e=dn(t),{prefixCls:n,generateConfig:i,viewDate:o,onPrevDecade:r,onNextDecade:a,onDecadeClick:s}=e,{hideHeader:l}=ur();if(l.value)return null;const c=`${n}-header`,u=i.getYear(o),d=Math.floor(u/xa)*xa,f=d+xa-1;return C(Ba,H(H({},e),{},{prefixCls:c,onSuperPrev:r,onSuperNext:a}),{default:()=>[C("button",{type:"button",onClick:s,class:`${n}-decade-btn`},[d,Qn("-"),f])]})}wS.displayName="YearHeader";wS.inheritAttrs=!1;const Fy=3,Z2=4;function SS(t){const e=dn(t),{prefixCls:n,value:i,viewDate:o,locale:r,generateConfig:a}=e,{rangedValue:s,hoverRangedValue:l}=Jd(),c=`${n}-cell`,u=a.getYear(o),d=Math.floor(u/xa)*xa,f=d+xa-1,h=a.setYear(o,d-Math.ceil((Fy*Z2-xa)/2)),p=m=>{const v=a.getYear(m);return d<=v&&v<=f},g=zm({cellPrefixCls:c,value:i,generateConfig:a,rangedValue:s.value,hoverRangedValue:l.value,isSameCell:(m,v)=>Nm(a,m,v),isInView:p,offsetCell:(m,v)=>a.addYear(m,v)});return C(il,H(H({},e),{},{rowNum:Z2,colNum:Fy,baseDate:h,getCellText:a.getYear,getCellClassName:g,getCellDate:a.addYear,titleCell:m=>zn(m,{locale:r,format:"YYYY",generateConfig:a})}),null)}SS.displayName="YearBody";SS.inheritAttrs=!1;const xa=10;function CS(t){const e=dn(t),{prefixCls:n,operationRef:i,onViewDateChange:o,generateConfig:r,value:a,viewDate:s,sourceMode:l,onSelect:c,onPanelChange:u}=e,d=`${n}-year-panel`;i.value={onKeydown:h=>Ic(h,{onLeftRight:p=>{c(r.addYear(a||s,p),"key")},onCtrlLeftRight:p=>{c(r.addYear(a||s,p*xa),"key")},onUpDown:p=>{c(r.addYear(a||s,p*Fy),"key")},onEnter:()=>{u(l==="date"?"date":"month",a||s)}})};const f=h=>{const p=r.addYear(s,h*10);o(p),u(null,p)};return C("div",{class:d},[C(wS,H(H({},e),{},{prefixCls:n,onPrevDecade:()=>{f(-1)},onNextDecade:()=>{f(1)},onDecadeClick:()=>{u("decade",s)}}),null),C(SS,H(H({},e),{},{prefixCls:n,onSelect:h=>{u(l==="date"?"date":"month",h),c(h,"mouse")}}),null)])}CS.displayName="YearPanel";CS.inheritAttrs=!1;function Q3(t,e,n){return n?C("div",{class:`${t}-footer-extra`},[n(e)]):null}function e4(t){let{prefixCls:e,components:n={},needConfirmButton:i,onNow:o,onOk:r,okDisabled:a,showNow:s,locale:l}=t,c,u;if(i){const d=n.button||"button";o&&s!==!1&&(c=C("li",{class:`${e}-now`},[C("a",{class:`${e}-now-btn`,onClick:o},[l.now])])),u=i&&C("li",{class:`${e}-ok`},[C(d,{disabled:a,onClick:f=>{f.stopPropagation(),r&&r()}},{default:()=>[l.ok]})])}return!c&&!u?null:C("ul",{class:`${e}-ranges`},[c,u])}function Tte(){return oe({name:"PickerPanel",inheritAttrs:!1,props:{prefixCls:String,locale:Object,generateConfig:Object,value:Object,defaultValue:Object,pickerValue:Object,defaultPickerValue:Object,disabledDate:Function,mode:String,picker:{type:String,default:"date"},tabindex:{type:[Number,String],default:0},showNow:{type:Boolean,default:void 0},showTime:[Boolean,Object],showToday:Boolean,renderExtraFooter:Function,dateRender:Function,hideHeader:{type:Boolean,default:void 0},onSelect:Function,onChange:Function,onPanelChange:Function,onMousedown:Function,onPickerValueChange:Function,onOk:Function,components:Object,direction:String,hourStep:{type:Number,default:1},minuteStep:{type:Number,default:1},secondStep:{type:Number,default:1}},setup(t,e){let{attrs:n}=e;const i=L(()=>t.picker==="date"&&!!t.showTime||t.picker==="time"),o=L(()=>24%t.hourStep===0),r=L(()=>60%t.minuteStep===0),a=L(()=>60%t.secondStep===0),s=ur(),{operationRef:l,onSelect:c,hideRanges:u,defaultOpenValue:d}=s,{inRange:f,panelPosition:h,rangedValue:p,hoverRangedValue:g}=Jd(),m=se({}),[v,b]=jt(null,{value:Ue(t,"value"),defaultValue:t.defaultValue,postState:D=>!D&&(d!=null&&d.value)&&t.picker==="time"?d.value:D}),[y,w]=jt(null,{value:Ue(t,"pickerValue"),defaultValue:t.defaultPickerValue||v.value,postState:D=>{const{generateConfig:F,showTime:N,defaultValue:B}=t,z=F.getNow();return D?!v.value&&t.showTime?typeof N=="object"?Ch(F,Array.isArray(D)?D[0]:D,N.defaultValue||z):B?Ch(F,Array.isArray(D)?D[0]:D,B):Ch(F,Array.isArray(D)?D[0]:D,z):D:z}}),x=D=>{w(D),t.onPickerValueChange&&t.onPickerValueChange(D)},$=D=>{const F=gte[t.picker];return F?F(D):D},[S,_]=jt(()=>t.picker==="time"?"time":$("date"),{value:Ue(t,"mode")});ye(()=>t.picker,()=>{_(t.picker)});const P=se(S.value),O=D=>{P.value=D},T=(D,F)=>{const{onPanelChange:N,generateConfig:B}=t,z=$(D||S.value);O(S.value),_(z),N&&(S.value!==z||Kl(B,y.value,y.value))&&N(F,z)},M=function(D,F){let N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{picker:B,generateConfig:z,onSelect:W,onChange:j,disabledDate:U}=t;(S.value===B||N)&&(b(D),W&&W(D),c&&c(D,F),j&&!Kl(z,D,v.value)&&!(U!=null&&U(D))&&j(D))},I=D=>m.value&&m.value.onKeydown?([Te.LEFT,Te.RIGHT,Te.UP,Te.DOWN,Te.PAGE_UP,Te.PAGE_DOWN,Te.ENTER].includes(D.which)&&D.preventDefault(),m.value.onKeydown(D)):!1,k=D=>{m.value&&m.value.onBlur&&m.value.onBlur(D)},E=()=>{const{generateConfig:D,hourStep:F,minuteStep:N,secondStep:B}=t,z=D.getNow(),W=ate(D.getHour(z),D.getMinute(z),D.getSecond(z),o.value?F:1,r.value?N:1,a.value?B:1),j=H3(D,z,W[0],W[1],W[2]);M(j,"submit")},R=L(()=>{const{prefixCls:D,direction:F}=t;return ce(`${D}-panel`,{[`${D}-panel-has-range`]:p&&p.value&&p.value[0]&&p.value[1],[`${D}-panel-has-range-hover`]:g&&g.value&&g.value[0]&&g.value[1],[`${D}-panel-rtl`]:F==="rtl"})});return aS(A(A({},s),{mode:S,hideHeader:L(()=>{var D;return t.hideHeader!==void 0?t.hideHeader:(D=s.hideHeader)===null||D===void 0?void 0:D.value}),hidePrevBtn:L(()=>f.value&&h.value==="right"),hideNextBtn:L(()=>f.value&&h.value==="left")})),ye(()=>t.value,()=>{t.value&&w(t.value)}),()=>{const{prefixCls:D="ant-picker",locale:F,generateConfig:N,disabledDate:B,picker:z="date",tabindex:W=0,showNow:j,showTime:U,showToday:V,renderExtraFooter:q,onMousedown:Y,onOk:J,components:Q}=t;l&&h.value!=="right"&&(l.value={onKeydown:I,onClose:()=>{m.value&&m.value.onClose&&m.value.onClose()}});let G;const ee=A(A(A({},n),t),{operationRef:m,prefixCls:D,viewDate:y.value,value:v.value,onViewDateChange:x,sourceMode:P.value,onPanelChange:T,disabledDate:B});switch(delete ee.onChange,delete ee.onSelect,S.value){case"decade":G=C(cS,H(H({},ee),{},{onSelect:(ue,ae)=>{x(ue),M(ue,ae)}}),null);break;case"year":G=C(CS,H(H({},ee),{},{onSelect:(ue,ae)=>{x(ue),M(ue,ae)}}),null);break;case"month":G=C(vS,H(H({},ee),{},{onSelect:(ue,ae)=>{x(ue),M(ue,ae)}}),null);break;case"quarter":G=C(xS,H(H({},ee),{},{onSelect:(ue,ae)=>{x(ue),M(ue,ae)}}),null);break;case"week":G=C(pS,H(H({},ee),{},{onSelect:(ue,ae)=>{x(ue),M(ue,ae)}}),null);break;case"time":delete ee.showTime,G=C(Bm,H(H(H({},ee),typeof U=="object"?U:null),{},{onSelect:(ue,ae)=>{x(ue),M(ue,ae)}}),null);break;default:U?G=C(hS,H(H({},ee),{},{onSelect:(ue,ae)=>{x(ue),M(ue,ae)}}),null):G=C(Qd,H(H({},ee),{},{onSelect:(ue,ae)=>{x(ue),M(ue,ae)}}),null)}let X,K;u!=null&&u.value||(X=Q3(D,S.value,q),K=e4({prefixCls:D,components:Q,needConfirmButton:i.value,okDisabled:!v.value||B&&B(v.value),locale:F,showNow:j,onNow:i.value&&E,onOk:()=>{v.value&&(M(v.value,"submit",!0),J&&J(v.value))}}));let te;if(V&&S.value==="date"&&z==="date"&&!U){const ue=N.getNow(),ae=`${D}-today-btn`,re=B&&B(ue);te=C("a",{class:ce(ae,re&&`${ae}-disabled`),"aria-disabled":re,onClick:()=>{re||M(ue,"mouse",!0)}},[F.today])}return C("div",{tabindex:W,class:ce(R.value,n.class),style:n.style,onKeydown:I,onBlur:k,onMousedown:Y},[G,X||K||te?C("div",{class:`${D}-footer`},[X,K,te]):null])}}})}const Ote=Tte(),$S=t=>C(Ote,t),Ete={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}}};function t4(t,e){let{slots:n}=e;const{prefixCls:i,popupStyle:o,visible:r,dropdownClassName:a,dropdownAlign:s,transitionName:l,getPopupContainer:c,range:u,popupPlacement:d,direction:f}=dn(t),h=`${i}-dropdown`;return C(tl,{showAction:[],hideAction:[],popupPlacement:d!==void 0?d:f==="rtl"?"bottomRight":"bottomLeft",builtinPlacements:Ete,prefixCls:h,popupTransitionName:l,popupAlign:s,popupVisible:r,popupClassName:ce(a,{[`${h}-range`]:u,[`${h}-rtl`]:f==="rtl"}),popupStyle:o,getPopupContainer:c},{default:n.default,popup:n.popupElement})}const n4=oe({name:"PresetPanel",props:{prefixCls:String,presets:{type:Array,default:()=>[]},onClick:Function,onHover:Function},setup(t){return()=>t.presets.length?C("div",{class:`${t.prefixCls}-presets`},[C("ul",null,[t.presets.map((e,n)=>{let{label:i,value:o}=e;return C("li",{key:n,onClick:r=>{r.stopPropagation(),t.onClick(o)},onMouseenter:()=>{var r;(r=t.onHover)===null||r===void 0||r.call(t,o)},onMouseleave:()=>{var r;(r=t.onHover)===null||r===void 0||r.call(t,null)}},[i])})])]):null}});function Ny(t){let{open:e,value:n,isClickOutside:i,triggerOpen:o,forwardKeydown:r,onKeydown:a,blurToCancel:s,onSubmit:l,onCancel:c,onFocus:u,onBlur:d}=t;const f=ie(!1),h=ie(!1),p=ie(!1),g=ie(!1),m=ie(!1),v=L(()=>({onMousedown:()=>{f.value=!0,o(!0)},onKeydown:y=>{if(a(y,()=>{m.value=!0}),!m.value){switch(y.which){case Te.ENTER:{e.value?l()!==!1&&(f.value=!0):o(!0),y.preventDefault();return}case Te.TAB:{f.value&&e.value&&!y.shiftKey?(f.value=!1,y.preventDefault()):!f.value&&e.value&&!r(y)&&y.shiftKey&&(f.value=!0,y.preventDefault());return}case Te.ESC:{f.value=!0,c();return}}!e.value&&![Te.SHIFT].includes(y.which)?o(!0):f.value||r(y)}},onFocus:y=>{f.value=!0,h.value=!0,u&&u(y)},onBlur:y=>{if(p.value||!i(document.activeElement)){p.value=!1;return}s.value?setTimeout(()=>{let{activeElement:w}=document;for(;w&&w.shadowRoot;)w=w.shadowRoot.activeElement;i(w)&&c()},0):e.value&&(o(!1),g.value&&l()),h.value=!1,d&&d(y)}}));ye(e,()=>{g.value=!1}),ye(n,()=>{g.value=!0});const b=ie();return Ze(()=>{b.value=cte(y=>{const w=ute(y);if(e.value){const x=i(w);x?(!h.value||x)&&o(!1):(p.value=!0,lt(()=>{p.value=!1}))}})}),at(()=>{b.value&&b.value()}),[v,{focused:h,typing:f}]}function By(t){let{valueTexts:e,onTextChange:n}=t;const i=se("");function o(a){i.value=a,n(a)}function r(){i.value=e.value[0]}return ye(()=>[...e.value],function(a){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];a.join("||")!==s.join("||")&&e.value.every(l=>l!==i.value)&&r()},{immediate:!0}),[i,o,r]}function eg(t,e){let{formatList:n,generateConfig:i,locale:o}=e;const r=C1(()=>{if(!t.value)return[[""],""];let l="";const c=[];for(let u=0;uc[0]!==l[0]||!Al(c[1],l[1])),a=L(()=>r.value[0]),s=L(()=>r.value[1]);return[a,s]}function zy(t,e){let{formatList:n,generateConfig:i,locale:o}=e;const r=se(null);let a;function s(d){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(lt.cancel(a),f){r.value=d;return}a=lt(()=>{r.value=d})}const[,l]=eg(r,{formatList:n,generateConfig:i,locale:o});function c(d){s(d)}function u(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;s(null,d)}return ye(t,()=>{u(!0)}),at(()=>{lt.cancel(a)}),[l,c,u]}function i4(t,e){return L(()=>t!=null&&t.value?t.value:e!=null&&e.value?(Yw(!1,"`ranges` is deprecated. Please use `presets` instead."),Object.keys(e.value).map(i=>{const o=e.value[i],r=typeof o=="function"?o():o;return{label:i,value:r}})):[])}function Mte(){return oe({name:"Picker",inheritAttrs:!1,props:["prefixCls","id","tabindex","dropdownClassName","dropdownAlign","popupStyle","transitionName","generateConfig","locale","inputReadOnly","allowClear","autofocus","showTime","showNow","showHour","showMinute","showSecond","picker","format","use12Hours","value","defaultValue","open","defaultOpen","defaultOpenValue","suffixIcon","presets","clearIcon","disabled","disabledDate","placeholder","getPopupContainer","panelRender","inputRender","onChange","onOpenChange","onPanelChange","onFocus","onBlur","onMousedown","onMouseup","onMouseenter","onMouseleave","onContextmenu","onClick","onKeydown","onSelect","direction","autocomplete","showToday","renderExtraFooter","dateRender","minuteStep","hourStep","secondStep","hideDisabledOptions"],setup(t,e){let{attrs:n,expose:i}=e;const o=se(null),r=L(()=>t.presets),a=i4(r),s=L(()=>{var B;return(B=t.picker)!==null&&B!==void 0?B:"date"}),l=L(()=>s.value==="date"&&!!t.showTime||s.value==="time"),c=L(()=>U3(W3(t.format,s.value,t.showTime,t.use12Hours))),u=se(null),d=se(null),f=se(null),[h,p]=jt(null,{value:Ue(t,"value"),defaultValue:t.defaultValue}),g=se(h.value),m=B=>{g.value=B},v=se(null),[b,y]=jt(!1,{value:Ue(t,"open"),defaultValue:t.defaultOpen,postState:B=>t.disabled?!1:B,onChange:B=>{t.onOpenChange&&t.onOpenChange(B),!B&&v.value&&v.value.onClose&&v.value.onClose()}}),[w,x]=eg(g,{formatList:c,generateConfig:Ue(t,"generateConfig"),locale:Ue(t,"locale")}),[$,S,_]=By({valueTexts:w,onTextChange:B=>{const z=G3(B,{locale:t.locale,formatList:c.value,generateConfig:t.generateConfig});z&&(!t.disabledDate||!t.disabledDate(z))&&m(z)}}),P=B=>{const{onChange:z,generateConfig:W,locale:j}=t;m(B),p(B),z&&!Kl(W,h.value,B)&&z(B,B?zn(B,{generateConfig:W,locale:j,format:c.value[0]}):"")},O=B=>{t.disabled&&B||y(B)},T=B=>b.value&&v.value&&v.value.onKeydown?v.value.onKeydown(B):!1,M=function(){t.onMouseup&&t.onMouseup(...arguments),o.value&&(o.value.focus(),O(!0))},[I,{focused:k,typing:E}]=Ny({blurToCancel:l,open:b,value:$,triggerOpen:O,forwardKeydown:T,isClickOutside:B=>!V3([u.value,d.value,f.value],B),onSubmit:()=>!g.value||t.disabledDate&&t.disabledDate(g.value)?!1:(P(g.value),O(!1),_(),!0),onCancel:()=>{O(!1),m(h.value),_()},onKeydown:(B,z)=>{var W;(W=t.onKeydown)===null||W===void 0||W.call(t,B,z)},onFocus:B=>{var z;(z=t.onFocus)===null||z===void 0||z.call(t,B)},onBlur:B=>{var z;(z=t.onBlur)===null||z===void 0||z.call(t,B)}});ye([b,w],()=>{b.value||(m(h.value),!w.value.length||w.value[0]===""?S(""):x.value!==$.value&&_())}),ye(s,()=>{b.value||_()}),ye(h,()=>{m(h.value)});const[R,D,F]=zy($,{formatList:c,generateConfig:Ue(t,"generateConfig"),locale:Ue(t,"locale")}),N=(B,z)=>{(z==="submit"||z!=="key"&&!l.value)&&(P(B),O(!1))};return aS({operationRef:v,hideHeader:L(()=>s.value==="time"),onSelect:N,open:b,defaultOpenValue:Ue(t,"defaultOpenValue"),onDateMouseenter:D,onDateMouseleave:F}),i({focus:()=>{o.value&&o.value.focus()},blur:()=>{o.value&&o.value.blur()}}),()=>{const{prefixCls:B="rc-picker",id:z,tabindex:W,dropdownClassName:j,dropdownAlign:U,popupStyle:V,transitionName:q,generateConfig:Y,locale:J,inputReadOnly:Q,allowClear:G,autofocus:ee,picker:X="date",defaultOpenValue:K,suffixIcon:te,clearIcon:ue,disabled:ae,placeholder:re,getPopupContainer:ne,panelRender:le,onMousedown:he,onMouseenter:pe,onMouseleave:ge,onContextmenu:be,onClick:$e,onSelect:fe,direction:de,autocomplete:xe="off"}=t,_e=A(A(A({},t),n),{class:ce({[`${B}-panel-focused`]:!E.value}),style:void 0,pickerValue:void 0,onPickerValueChange:void 0,onChange:null});let Oe=C("div",{class:`${B}-panel-layout`},[C(n4,{prefixCls:B,presets:a.value,onClick:De=>{P(De),O(!1)}},null),C($S,H(H({},_e),{},{generateConfig:Y,value:g.value,locale:J,tabindex:-1,onSelect:De=>{fe==null||fe(De),m(De)},direction:de,onPanelChange:(De,je)=>{const{onPanelChange:ft}=t;F(!0),ft==null||ft(De,je)}}),null)]);le&&(Oe=le(Oe));const Re=C("div",{class:`${B}-panel-container`,ref:u,onMousedown:De=>{De.preventDefault()}},[Oe]);let Se;te&&(Se=C("span",{class:`${B}-suffix`},[te]));let Ae;G&&h.value&&!ae&&(Ae=C("span",{onMousedown:De=>{De.preventDefault(),De.stopPropagation()},onMouseup:De=>{De.preventDefault(),De.stopPropagation(),P(null),O(!1)},class:`${B}-clear`,role:"button"},[ue||C("span",{class:`${B}-clear-btn`},null)]));const Pe=A(A(A(A({id:z,tabindex:W,disabled:ae,readonly:Q||typeof c.value[0]=="function"||!E.value,value:R.value||$.value,onInput:De=>{S(De.target.value)},autofocus:ee,placeholder:re,ref:o,title:$.value},I.value),{size:j3(X,c.value[0],Y)}),q3(t)),{autocomplete:xe}),ke=t.inputRender?t.inputRender(Pe):C("input",Pe,null),Le=de==="rtl"?"bottomRight":"bottomLeft";return C("div",{ref:f,class:ce(B,n.class,{[`${B}-disabled`]:ae,[`${B}-focused`]:k.value,[`${B}-rtl`]:de==="rtl"}),style:n.style,onMousedown:he,onMouseup:M,onMouseenter:pe,onMouseleave:ge,onContextmenu:be,onClick:$e},[C("div",{class:ce(`${B}-input`,{[`${B}-input-placeholder`]:!!R.value}),ref:d},[ke,Se,Ae]),C(t4,{visible:b.value,popupStyle:V,prefixCls:B,dropdownClassName:j,dropdownAlign:U,getPopupContainer:ne,transitionName:q,popupPlacement:Le,direction:de},{default:()=>[C("div",{style:{pointerEvents:"none",position:"absolute",top:0,bottom:0,left:0,right:0}},null)],popupElement:()=>Re})])}}})}const Ite=Mte();function kte(t,e){let{picker:n,locale:i,selectedValue:o,disabledDate:r,disabled:a,generateConfig:s}=t;const l=L(()=>It(o.value,0)),c=L(()=>It(o.value,1));function u(g){return s.value.locale.getWeekFirstDate(i.value.locale,g)}function d(g){const m=s.value.getYear(g),v=s.value.getMonth(g);return m*100+v}function f(g){const m=s.value.getYear(g),v=Ry(s.value,g);return m*10+v}return[g=>{var m;if(r&&(!((m=r==null?void 0:r.value)===null||m===void 0)&&m.call(r,g)))return!0;if(a[1]&&c)return!Er(s.value,g,c.value)&&s.value.isAfter(g,c.value);if(e.value[1]&&c.value)switch(n.value){case"quarter":return f(g)>f(c.value);case"month":return d(g)>d(c.value);case"week":return u(g)>u(c.value);default:return!Er(s.value,g,c.value)&&s.value.isAfter(g,c.value)}return!1},g=>{var m;if(!((m=r.value)===null||m===void 0)&&m.call(r,g))return!0;if(a[0]&&l)return!Er(s.value,g,c.value)&&s.value.isAfter(l.value,g);if(e.value[0]&&l.value)switch(n.value){case"quarter":return f(g)mte(i,a,s));case"quarter":case"month":return r((a,s)=>Nm(i,a,s));default:return r((a,s)=>uS(i,a,s))}}function Rte(t,e,n,i){const o=It(t,0),r=It(t,1);if(e===0)return o;if(o&&r)switch(Dte(o,r,n,i)){case"same":return o;case"closing":return o;default:return Fu(r,n,i,-1)}return o}function Lte(t){let{values:e,picker:n,defaultDates:i,generateConfig:o}=t;const r=se([It(i,0),It(i,1)]),a=se(null),s=L(()=>It(e.value,0)),l=L(()=>It(e.value,1)),c=h=>r.value[h]?r.value[h]:It(a.value,h)||Rte(e.value,h,n.value,o.value)||s.value||l.value||o.value.getNow(),u=se(null),d=se(null);Ke(()=>{u.value=c(0),d.value=c(1)});function f(h,p){if(h){let g=oo(a.value,h,p);r.value=oo(r.value,null,p)||[null,null];const m=(p+1)%2;It(e.value,m)||(g=oo(g,h,m)),a.value=g}else(s.value||l.value)&&(a.value=null)}return[u,d,f]}function o4(t){return yw()?(fI(t),!0):!1}function Fte(t){return typeof t=="function"?t():Yt(t)}function AS(t){var e;const n=Fte(t);return(e=n==null?void 0:n.$el)!==null&&e!==void 0?e:n}function Nte(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;Cn()?Ze(t):e?t():pt(t)}function r4(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=ie(),i=()=>n.value=!!t();return i(),Nte(i,e),n}var Ab;const a4=typeof window<"u";a4&&(!((Ab=window==null?void 0:window.navigator)===null||Ab===void 0)&&Ab.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);const s4=a4?window:void 0;var Bte=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o2&&arguments[2]!==void 0?arguments[2]:{};const{window:i=s4}=n,o=Bte(n,["window"]);let r;const a=r4(()=>i&&"ResizeObserver"in i),s=()=>{r&&(r.disconnect(),r=void 0)},l=ye(()=>AS(t),u=>{s(),a.value&&i&&u&&(r=new ResizeObserver(e),r.observe(u,o))},{immediate:!0,flush:"post"}),c=()=>{s(),l()};return o4(c),{isSupported:a,stop:c}}function Qc(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{width:0,height:0},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{box:i="content-box"}=n,o=ie(e.width),r=ie(e.height);return zte(t,a=>{let[s]=a;const l=i==="border-box"?s.borderBoxSize:i==="content-box"?s.contentBoxSize:s.devicePixelContentBoxSize;l?(o.value=l.reduce((c,u)=>{let{inlineSize:d}=u;return c+d},0),r.value=l.reduce((c,u)=>{let{blockSize:d}=u;return c+d},0)):(o.value=s.contentRect.width,r.value=s.contentRect.height)},n),ye(()=>AS(t),a=>{o.value=a?e.width:0,r.value=a?e.height:0}),{width:o,height:r}}function J2(t,e){return t&&t[0]&&t[1]&&e.isAfter(t[0],t[1])?[t[1],t[0]]:t}function Q2(t,e,n,i){return!!(t||i&&i[e]||n[(e+1)%2])}function Hte(){return oe({name:"RangerPicker",inheritAttrs:!1,props:["prefixCls","id","popupStyle","dropdownClassName","transitionName","dropdownAlign","getPopupContainer","generateConfig","locale","placeholder","autofocus","disabled","format","picker","showTime","showNow","showHour","showMinute","showSecond","use12Hours","separator","value","defaultValue","defaultPickerValue","open","defaultOpen","disabledDate","disabledTime","dateRender","panelRender","ranges","allowEmpty","allowClear","suffixIcon","clearIcon","pickerRef","inputReadOnly","mode","renderExtraFooter","onChange","onOpenChange","onPanelChange","onCalendarChange","onFocus","onBlur","onMousedown","onMouseup","onMouseenter","onMouseleave","onClick","onOk","onKeydown","components","order","direction","activePickerIndex","autocomplete","minuteStep","hourStep","secondStep","hideDisabledOptions","disabledMinutes","presets","prevIcon","nextIcon","superPrevIcon","superNextIcon"],setup(t,e){let{attrs:n,expose:i}=e;const o=L(()=>t.picker==="date"&&!!t.showTime||t.picker==="time"),r=L(()=>t.presets),a=L(()=>t.ranges),s=i4(r,a),l=se({}),c=se(null),u=se(null),d=se(null),f=se(null),h=se(null),p=se(null),g=se(null),m=se(null),v=L(()=>U3(W3(t.format,t.picker,t.showTime,t.use12Hours))),[b,y]=jt(0,{value:Ue(t,"activePickerIndex")}),w=se(null),x=L(()=>{const{disabled:Ie}=t;return Array.isArray(Ie)?Ie:[Ie||!1,Ie||!1]}),[$,S]=jt(null,{value:Ue(t,"value"),defaultValue:t.defaultValue,postState:Ie=>t.picker==="time"&&!t.order?Ie:J2(Ie,t.generateConfig)}),[_,P,O]=Lte({values:$,picker:Ue(t,"picker"),defaultDates:t.defaultPickerValue,generateConfig:Ue(t,"generateConfig")}),[T,M]=jt($.value,{postState:Ie=>{let st=Ie;if(x.value[0]&&x.value[1])return st;for(let tt=0;tt<2;tt+=1)x.value[tt]&&!It(st,tt)&&!It(t.allowEmpty,tt)&&(st=oo(st,t.generateConfig.getNow(),tt));return st}}),[I,k]=jt([t.picker,t.picker],{value:Ue(t,"mode")});ye(()=>t.picker,()=>{k([t.picker,t.picker])});const E=(Ie,st)=>{var tt;k(Ie),(tt=t.onPanelChange)===null||tt===void 0||tt.call(t,st,Ie)},[R,D]=kte({picker:Ue(t,"picker"),selectedValue:T,locale:Ue(t,"locale"),disabled:x,disabledDate:Ue(t,"disabledDate"),generateConfig:Ue(t,"generateConfig")},l),[F,N]=jt(!1,{value:Ue(t,"open"),defaultValue:t.defaultOpen,postState:Ie=>x.value[b.value]?!1:Ie,onChange:Ie=>{var st;(st=t.onOpenChange)===null||st===void 0||st.call(t,Ie),!Ie&&w.value&&w.value.onClose&&w.value.onClose()}}),B=L(()=>F.value&&b.value===0),z=L(()=>F.value&&b.value===1),W=se(0),j=se(0),U=se(0),{width:V}=Qc(c);ye([F,V],()=>{!F.value&&c.value&&(U.value=V.value)});const{width:q}=Qc(u),{width:Y}=Qc(m),{width:J}=Qc(d),{width:Q}=Qc(h);ye([b,F,q,Y,J,Q,()=>t.direction],()=>{j.value=0,b.value?d.value&&h.value&&(j.value=J.value+Q.value,q.value&&Y.value&&j.value>q.value-Y.value-(t.direction==="rtl"||m.value.offsetLeft>j.value?0:m.value.offsetLeft)&&(W.value=j.value)):b.value===0&&(W.value=0)},{immediate:!0});const G=se();function ee(Ie,st){if(Ie)clearTimeout(G.value),l.value[st]=!0,y(st),N(Ie),F.value||O(null,st);else if(b.value===st){N(Ie);const tt=l.value;G.value=setTimeout(()=>{tt===l.value&&(l.value={})})}}function X(Ie){ee(!0,Ie),setTimeout(()=>{const st=[p,g][Ie];st.value&&st.value.focus()},0)}function K(Ie,st){let tt=Ie,Lt=It(tt,0),xn=It(tt,1);const{generateConfig:rn,locale:Ci,picker:Ln,order:jo,onCalendarChange:Ii,allowEmpty:Ji,onChange:Ut,showTime:Co}=t;Lt&&xn&&rn.isAfter(Lt,xn)&&(Ln==="week"&&!Y3(rn,Ci.locale,Lt,xn)||Ln==="quarter"&&!X3(rn,Lt,xn)||Ln!=="week"&&Ln!=="quarter"&&Ln!=="time"&&!(Co?Kl(rn,Lt,xn):Er(rn,Lt,xn))?(st===0?(tt=[Lt,null],xn=null):(Lt=null,tt=[null,xn]),l.value={[st]:!0}):(Ln!=="time"||jo!==!1)&&(tt=J2(tt,rn))),M(tt);const Qi=tt&&tt[0]?zn(tt[0],{generateConfig:rn,locale:Ci,format:v.value[0]}):"",Ur=tt&&tt[1]?zn(tt[1],{generateConfig:rn,locale:Ci,format:v.value[0]}):"";Ii&&Ii(tt,[Qi,Ur],{range:st===0?"start":"end"});const qr=Q2(Lt,0,x.value,Ji),$o=Q2(xn,1,x.value,Ji);(tt===null||qr&&$o)&&(S(tt),Ut&&(!Kl(rn,It($.value,0),Lt)||!Kl(rn,It($.value,1),xn))&&Ut(tt,[Qi,Ur]));let Ao=null;st===0&&!x.value[1]?Ao=1:st===1&&!x.value[0]&&(Ao=0),Ao!==null&&Ao!==b.value&&(!l.value[Ao]||!It(tt,Ao))&&It(tt,st)?X(Ao):ee(!1,st)}const te=Ie=>F&&w.value&&w.value.onKeydown?w.value.onKeydown(Ie):!1,ue={formatList:v,generateConfig:Ue(t,"generateConfig"),locale:Ue(t,"locale")},[ae,re]=eg(L(()=>It(T.value,0)),ue),[ne,le]=eg(L(()=>It(T.value,1)),ue),he=(Ie,st)=>{const tt=G3(Ie,{locale:t.locale,formatList:v.value,generateConfig:t.generateConfig});tt&&!(st===0?R:D)(tt)&&(M(oo(T.value,tt,st)),O(tt,st))},[pe,ge,be]=By({valueTexts:ae,onTextChange:Ie=>he(Ie,0)}),[$e,fe,de]=By({valueTexts:ne,onTextChange:Ie=>he(Ie,1)}),[xe,_e]=Mt(null),[Oe,Re]=Mt(null),[Se,Ae,Pe]=zy(pe,ue),[ke,Le,De]=zy($e,ue),je=Ie=>{Re(oo(T.value,Ie,b.value)),b.value===0?Ae(Ie):Le(Ie)},ft=()=>{Re(oo(T.value,null,b.value)),b.value===0?Pe():De()},_t=(Ie,st)=>({forwardKeydown:te,onBlur:tt=>{var Lt;(Lt=t.onBlur)===null||Lt===void 0||Lt.call(t,tt)},isClickOutside:tt=>!V3([u.value,d.value,f.value,c.value],tt),onFocus:tt=>{var Lt;y(Ie),(Lt=t.onFocus)===null||Lt===void 0||Lt.call(t,tt)},triggerOpen:tt=>{ee(tt,Ie)},onSubmit:()=>{if(!T.value||t.disabledDate&&t.disabledDate(T.value[Ie]))return!1;K(T.value,Ie),st()},onCancel:()=>{ee(!1,Ie),M($.value),st()}}),[yt,{focused:Pt,typing:Et}]=Ny(A(A({},_t(0,be)),{blurToCancel:o,open:B,value:pe,onKeydown:(Ie,st)=>{var tt;(tt=t.onKeydown)===null||tt===void 0||tt.call(t,Ie,st)}})),[fn,{focused:yn,typing:$n}]=Ny(A(A({},_t(1,de)),{blurToCancel:o,open:z,value:$e,onKeydown:(Ie,st)=>{var tt;(tt=t.onKeydown)===null||tt===void 0||tt.call(t,Ie,st)}})),on=Ie=>{var st;(st=t.onClick)===null||st===void 0||st.call(t,Ie),!F.value&&!p.value.contains(Ie.target)&&!g.value.contains(Ie.target)&&(x.value[0]?x.value[1]||X(1):X(0))},Yn=Ie=>{var st;(st=t.onMousedown)===null||st===void 0||st.call(t,Ie),F.value&&(Pt.value||yn.value)&&!p.value.contains(Ie.target)&&!g.value.contains(Ie.target)&&Ie.preventDefault()},wi=L(()=>{var Ie;return!((Ie=$.value)===null||Ie===void 0)&&Ie[0]?zn($.value[0],{locale:t.locale,format:"YYYYMMDDHHmmss",generateConfig:t.generateConfig}):""}),Zi=L(()=>{var Ie;return!((Ie=$.value)===null||Ie===void 0)&&Ie[1]?zn($.value[1],{locale:t.locale,format:"YYYYMMDDHHmmss",generateConfig:t.generateConfig}):""});ye([F,ae,ne],()=>{F.value||(M($.value),!ae.value.length||ae.value[0]===""?ge(""):re.value!==pe.value&&be(),!ne.value.length||ne.value[0]===""?fe(""):le.value!==$e.value&&de())}),ye([wi,Zi],()=>{M($.value)}),i({focus:()=>{p.value&&p.value.focus()},blur:()=>{p.value&&p.value.blur(),g.value&&g.value.blur()}});const So=L(()=>F.value&&Oe.value&&Oe.value[0]&&Oe.value[1]&&t.generateConfig.isAfter(Oe.value[1],Oe.value[0])?Oe.value:null);function Si(){let Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,st=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{generateConfig:tt,showTime:Lt,dateRender:xn,direction:rn,disabledTime:Ci,prefixCls:Ln,locale:jo}=t;let Ii=Lt;if(Lt&&typeof Lt=="object"&&Lt.defaultValue){const Ut=Lt.defaultValue;Ii=A(A({},Lt),{defaultValue:It(Ut,b.value)||void 0})}let Ji=null;return xn&&(Ji=Ut=>{let{current:Co,today:Qi}=Ut;return xn({current:Co,today:Qi,info:{range:b.value?"end":"start"}})}),C(Cte,{value:{inRange:!0,panelPosition:Ie,rangedValue:xe.value||T.value,hoverRangedValue:So.value}},{default:()=>[C($S,H(H(H({},t),st),{},{dateRender:Ji,showTime:Ii,mode:I.value[b.value],generateConfig:tt,style:void 0,direction:rn,disabledDate:b.value===0?R:D,disabledTime:Ut=>Ci?Ci(Ut,b.value===0?"start":"end"):!1,class:ce({[`${Ln}-panel-focused`]:b.value===0?!Et.value:!$n.value}),value:It(T.value,b.value),locale:jo,tabIndex:-1,onPanelChange:(Ut,Co)=>{b.value===0&&Pe(!0),b.value===1&&De(!0),E(oo(I.value,Co,b.value),oo(T.value,Ut,b.value));let Qi=Ut;Ie==="right"&&I.value[b.value]===Co&&(Qi=Fu(Qi,Co,tt,-1)),O(Qi,b.value)},onOk:null,onSelect:void 0,onChange:void 0,defaultValue:b.value===0?It(T.value,1):It(T.value,0)}),null)]})}const za=(Ie,st)=>{const tt=oo(T.value,Ie,b.value);st==="submit"||st!=="key"&&!o.value?(K(tt,b.value),b.value===0?Pe():De()):M(tt)};return aS({operationRef:w,hideHeader:L(()=>t.picker==="time"),onDateMouseenter:je,onDateMouseleave:ft,hideRanges:L(()=>!0),onSelect:za,open:F}),()=>{const{prefixCls:Ie="rc-picker",id:st,popupStyle:tt,dropdownClassName:Lt,transitionName:xn,dropdownAlign:rn,getPopupContainer:Ci,generateConfig:Ln,locale:jo,placeholder:Ii,autofocus:Ji,picker:Ut="date",showTime:Co,separator:Qi="~",disabledDate:Ur,panelRender:qr,allowClear:$o,suffixIcon:ll,clearIcon:Ao,inputReadOnly:Ev,renderExtraFooter:D8,onMouseenter:R8,onMouseleave:L8,onMouseup:F8,onOk:x$,components:N8,direction:jc,autocomplete:w$="off"}=t,B8=jc==="rtl"?{right:`${j.value}px`}:{left:`${j.value}px`};function z8(){let $i;const Zr=Q3(Ie,I.value[b.value],D8),A$=e4({prefixCls:Ie,components:N8,needConfirmButton:o.value,okDisabled:!It(T.value,b.value)||Ur&&Ur(T.value[b.value]),locale:jo,onOk:()=>{It(T.value,b.value)&&(K(T.value,b.value),x$&&x$(T.value))}});if(Ut!=="time"&&!Co){const Jr=b.value===0?_.value:P.value,j8=Fu(Jr,Ut,Ln),Dv=I.value[b.value]===Ut,_$=Si(Dv?"left":!1,{pickerValue:Jr,onPickerValueChange:Rv=>{O(Rv,b.value)}}),P$=Si("right",{pickerValue:j8,onPickerValueChange:Rv=>{O(Fu(Rv,Ut,Ln,-1),b.value)}});jc==="rtl"?$i=C(Qe,null,[P$,Dv&&_$]):$i=C(Qe,null,[_$,Dv&&P$])}else $i=Si();let kv=C("div",{class:`${Ie}-panel-layout`},[C(n4,{prefixCls:Ie,presets:s.value,onClick:Jr=>{K(Jr,null),ee(!1,b.value)},onHover:Jr=>{_e(Jr)}},null),C("div",null,[C("div",{class:`${Ie}-panels`},[$i]),(Zr||A$)&&C("div",{class:`${Ie}-footer`},[Zr,A$])])]);return qr&&(kv=qr(kv)),C("div",{class:`${Ie}-panel-container`,style:{marginLeft:`${W.value}px`},ref:u,onMousedown:Jr=>{Jr.preventDefault()}},[kv])}const H8=C("div",{class:ce(`${Ie}-range-wrapper`,`${Ie}-${Ut}-range-wrapper`),style:{minWidth:`${U.value}px`}},[C("div",{ref:m,class:`${Ie}-range-arrow`,style:B8},null),z8()]);let S$;ll&&(S$=C("span",{class:`${Ie}-suffix`},[ll]));let C$;$o&&(It($.value,0)&&!x.value[0]||It($.value,1)&&!x.value[1])&&(C$=C("span",{onMousedown:$i=>{$i.preventDefault(),$i.stopPropagation()},onMouseup:$i=>{$i.preventDefault(),$i.stopPropagation();let Zr=$.value;x.value[0]||(Zr=oo(Zr,null,0)),x.value[1]||(Zr=oo(Zr,null,1)),K(Zr,null),ee(!1,b.value)},class:`${Ie}-clear`},[Ao||C("span",{class:`${Ie}-clear-btn`},null)]));const $$={size:j3(Ut,v.value[0],Ln)};let Mv=0,Iv=0;d.value&&f.value&&h.value&&(b.value===0?Iv=d.value.offsetWidth:(Mv=j.value,Iv=f.value.offsetWidth));const W8=jc==="rtl"?{right:`${Mv}px`}:{left:`${Mv}px`};return C("div",H({ref:c,class:ce(Ie,`${Ie}-range`,n.class,{[`${Ie}-disabled`]:x.value[0]&&x.value[1],[`${Ie}-focused`]:b.value===0?Pt.value:yn.value,[`${Ie}-rtl`]:jc==="rtl"}),style:n.style,onClick:on,onMouseenter:R8,onMouseleave:L8,onMousedown:Yn,onMouseup:F8},q3(t)),[C("div",{class:ce(`${Ie}-input`,{[`${Ie}-input-active`]:b.value===0,[`${Ie}-input-placeholder`]:!!Se.value}),ref:d},[C("input",H(H(H({id:st,disabled:x.value[0],readonly:Ev||typeof v.value[0]=="function"||!Et.value,value:Se.value||pe.value,onInput:$i=>{ge($i.target.value)},autofocus:Ji,placeholder:It(Ii,0)||"",ref:p},yt.value),$$),{},{autocomplete:w$}),null)]),C("div",{class:`${Ie}-range-separator`,ref:h},[Qi]),C("div",{class:ce(`${Ie}-input`,{[`${Ie}-input-active`]:b.value===1,[`${Ie}-input-placeholder`]:!!ke.value}),ref:f},[C("input",H(H(H({disabled:x.value[1],readonly:Ev||typeof v.value[0]=="function"||!$n.value,value:ke.value||$e.value,onInput:$i=>{fe($i.target.value)},placeholder:It(Ii,1)||"",ref:g},fn.value),$$),{},{autocomplete:w$}),null)]),C("div",{class:`${Ie}-active-bar`,style:A(A({},W8),{width:`${Iv}px`,position:"absolute"})},null),S$,C$,C(t4,{visible:F.value,popupStyle:tt,prefixCls:Ie,dropdownClassName:Lt,dropdownAlign:rn,getPopupContainer:Ci,transitionName:xn,range:!0,direction:jc},{default:()=>[C("div",{style:{pointerEvents:"none",position:"absolute",top:0,bottom:0,left:0,right:0}},null)],popupElement:()=>H8})])}}})}const Wte=Hte();var jte=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);ot.checked,()=>{r.value=t.checked}),o({focus(){var u;(u=a.value)===null||u===void 0||u.focus()},blur(){var u;(u=a.value)===null||u===void 0||u.blur()}});const s=se(),l=u=>{if(t.disabled)return;t.checked===void 0&&(r.value=u.target.checked),u.shiftKey=s.value;const d={target:A(A({},t),{checked:u.target.checked}),stopPropagation(){u.stopPropagation()},preventDefault(){u.preventDefault()},nativeEvent:u};t.checked!==void 0&&(a.value.checked=!!t.checked),i("change",d),s.value=!1},c=u=>{i("click",u),s.value=u.shiftKey};return()=>{const{prefixCls:u,name:d,id:f,type:h,disabled:p,readonly:g,tabindex:m,autofocus:v,value:b,required:y}=t,w=jte(t,["prefixCls","name","id","type","disabled","readonly","tabindex","autofocus","value","required"]),{class:x,onFocus:$,onBlur:S,onKeydown:_,onKeypress:P,onKeyup:O}=n,T=A(A({},w),n),M=Object.keys(T).reduce((E,R)=>((R.startsWith("data-")||R.startsWith("aria-")||R==="role")&&(E[R]=T[R]),E),{}),I=ce(u,x,{[`${u}-checked`]:r.value,[`${u}-disabled`]:p}),k=A(A({name:d,id:f,type:h,readonly:g,disabled:p,tabindex:m,class:`${u}-input`,checked:!!r.value,autofocus:v,value:b},M),{onChange:l,onClick:c,onFocus:$,onBlur:S,onKeydown:_,onKeypress:P,onKeyup:O,required:y});return C("span",{class:I},[C("input",H({ref:a},k),null),C("span",{class:`${u}-inner`},null)])}}}),c4=Symbol("radioGroupContextKey"),Xte=t=>{ot(c4,t)},Yte=()=>qe(c4,void 0),u4=Symbol("radioOptionTypeContextKey"),Gte=t=>{ot(u4,t)},Kte=()=>qe(u4,void 0),Ute=new mt("antRadioEffect",{"0%":{transform:"scale(1)",opacity:.5},"100%":{transform:"scale(1.6)",opacity:0}}),qte=t=>{const{componentCls:e,antCls:n}=t,i=`${e}-group`;return{[i]:A(A({},rt(t)),{display:"inline-block",fontSize:0,[`&${i}-rtl`]:{direction:"rtl"},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:"none"}})}},Zte=t=>{const{componentCls:e,radioWrapperMarginRight:n,radioCheckedColor:i,radioSize:o,motionDurationSlow:r,motionDurationMid:a,motionEaseInOut:s,motionEaseInOutCirc:l,radioButtonBg:c,colorBorder:u,lineWidth:d,radioDotSize:f,colorBgContainerDisabled:h,colorTextDisabled:p,paddingXS:g,radioDotDisabledColor:m,lineType:v,radioDotDisabledSize:b,wireframe:y,colorWhite:w}=t,x=`${e}-inner`;return{[`${e}-wrapper`]:A(A({},rt(t)),{position:"relative",display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:n,cursor:"pointer",[`&${e}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:t.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},[`${e}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${d}px ${v} ${i}`,borderRadius:"50%",visibility:"hidden",animationName:Ute,animationDuration:r,animationTimingFunction:s,animationFillMode:"both",content:'""'},[e]:A(A({},rt(t)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center"}),[`${e}-wrapper:hover &, - &:hover ${x}`]:{borderColor:i},[`${e}-input:focus-visible + ${x}`]:A({},zr(t)),[`${e}:hover::after, ${e}-wrapper:hover &::after`]:{visibility:"visible"},[`${e}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:o,height:o,marginBlockStart:o/-2,marginInlineStart:o/-2,backgroundColor:y?i:w,borderBlockStart:0,borderInlineStart:0,borderRadius:o,transform:"scale(0)",opacity:0,transition:`all ${r} ${l}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:o,height:o,backgroundColor:c,borderColor:u,borderStyle:"solid",borderWidth:d,borderRadius:"50%",transition:`all ${a}`},[`${e}-input`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,insetBlockEnd:0,insetInlineStart:0,zIndex:1,cursor:"pointer",opacity:0},[`${e}-checked`]:{[x]:{borderColor:i,backgroundColor:y?c:i,"&::after":{transform:`scale(${f/o})`,opacity:1,transition:`all ${r} ${l}`}}},[`${e}-disabled`]:{cursor:"not-allowed",[x]:{backgroundColor:h,borderColor:u,cursor:"not-allowed","&::after":{backgroundColor:m}},[`${e}-input`]:{cursor:"not-allowed"},[`${e}-disabled + span`]:{color:p,cursor:"not-allowed"},[`&${e}-checked`]:{[x]:{"&::after":{transform:`scale(${b/o})`}}}},[`span${e} + *`]:{paddingInlineStart:g,paddingInlineEnd:g}})}},Jte=t=>{const{radioButtonColor:e,controlHeight:n,componentCls:i,lineWidth:o,lineType:r,colorBorder:a,motionDurationSlow:s,motionDurationMid:l,radioButtonPaddingHorizontal:c,fontSize:u,radioButtonBg:d,fontSizeLG:f,controlHeightLG:h,controlHeightSM:p,paddingXS:g,borderRadius:m,borderRadiusSM:v,borderRadiusLG:b,radioCheckedColor:y,radioButtonCheckedBg:w,radioButtonHoverColor:x,radioButtonActiveColor:$,radioSolidCheckedColor:S,colorTextDisabled:_,colorBgContainerDisabled:P,radioDisabledButtonCheckedColor:O,radioDisabledButtonCheckedBg:T}=t;return{[`${i}-button-wrapper`]:{position:"relative",display:"inline-block",height:n,margin:0,paddingInline:c,paddingBlock:0,color:e,fontSize:u,lineHeight:`${n-o*2}px`,background:d,border:`${o}px ${r} ${a}`,borderBlockStartWidth:o+.02,borderInlineStartWidth:0,borderInlineEndWidth:o,cursor:"pointer",transition:[`color ${l}`,`background ${l}`,`border-color ${l}`,`box-shadow ${l}`].join(","),a:{color:e},[`> ${i}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:-o,insetInlineStart:-o,display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:o,paddingInline:0,backgroundColor:a,transition:`background-color ${s}`,content:'""'}},"&:first-child":{borderInlineStart:`${o}px ${r} ${a}`,borderStartStartRadius:m,borderEndStartRadius:m},"&:last-child":{borderStartEndRadius:m,borderEndEndRadius:m},"&:first-child:last-child":{borderRadius:m},[`${i}-group-large &`]:{height:h,fontSize:f,lineHeight:`${h-o*2}px`,"&:first-child":{borderStartStartRadius:b,borderEndStartRadius:b},"&:last-child":{borderStartEndRadius:b,borderEndEndRadius:b}},[`${i}-group-small &`]:{height:p,paddingInline:g-o,paddingBlock:0,lineHeight:`${p-o*2}px`,"&:first-child":{borderStartStartRadius:v,borderEndStartRadius:v},"&:last-child":{borderStartEndRadius:v,borderEndEndRadius:v}},"&:hover":{position:"relative",color:y},"&:has(:focus-visible)":A({},zr(t)),[`${i}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${i}-button-wrapper-disabled)`]:{zIndex:1,color:y,background:w,borderColor:y,"&::before":{backgroundColor:y},"&:first-child":{borderColor:y},"&:hover":{color:x,borderColor:x,"&::before":{backgroundColor:x}},"&:active":{color:$,borderColor:$,"&::before":{backgroundColor:$}}},[`${i}-group-solid &-checked:not(${i}-button-wrapper-disabled)`]:{color:S,background:y,borderColor:y,"&:hover":{color:S,background:x,borderColor:x},"&:active":{color:S,background:$,borderColor:$}},"&-disabled":{color:_,backgroundColor:P,borderColor:a,cursor:"not-allowed","&:first-child, &:hover":{color:_,backgroundColor:P,borderColor:a}},[`&-disabled${i}-button-wrapper-checked`]:{color:O,backgroundColor:T,borderColor:a,boxShadow:"none"}}}},d4=et("Radio",t=>{const{padding:e,lineWidth:n,controlItemBgActiveDisabled:i,colorTextDisabled:o,colorBgContainer:r,fontSizeLG:a,controlOutline:s,colorPrimaryHover:l,colorPrimaryActive:c,colorText:u,colorPrimary:d,marginXS:f,controlOutlineWidth:h,colorTextLightSolid:p,wireframe:g}=t,m=`0 0 0 ${h}px ${s}`,v=m,b=a,y=4,w=b-y*2,x=g?w:b-(y+n)*2,$=d,S=u,_=l,P=c,O=e-n,I=Ve(t,{radioFocusShadow:m,radioButtonFocusShadow:v,radioSize:b,radioDotSize:x,radioDotDisabledSize:w,radioCheckedColor:$,radioDotDisabledColor:o,radioSolidCheckedColor:p,radioButtonBg:r,radioButtonCheckedBg:r,radioButtonColor:S,radioButtonHoverColor:_,radioButtonActiveColor:P,radioButtonPaddingHorizontal:O,radioDisabledButtonCheckedBg:i,radioDisabledButtonCheckedColor:o,radioWrapperMarginRight:f});return[qte(I),Zte(I),Jte(I)]});var Qte=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o({prefixCls:String,checked:Ce(),disabled:Ce(),isGroup:Ce(),value:Z.any,name:String,id:String,autofocus:Ce(),onChange:ve(),onFocus:ve(),onBlur:ve(),onClick:ve(),"onUpdate:checked":ve(),"onUpdate:value":ve()}),di=oe({compatConfig:{MODE:3},name:"ARadio",inheritAttrs:!1,props:f4(),setup(t,e){let{emit:n,expose:i,slots:o,attrs:r}=e;const a=vn(),s=Mn.useInject(),l=Kte(),c=Yte(),u=Oi(),d=L(()=>{var _;return(_=g.value)!==null&&_!==void 0?_:u.value}),f=se(),{prefixCls:h,direction:p,disabled:g}=Me("radio",t),m=L(()=>(c==null?void 0:c.optionType.value)==="button"||l==="button"?`${h.value}-button`:h.value),v=Oi(),[b,y]=d4(h);i({focus:()=>{f.value.focus()},blur:()=>{f.value.blur()}});const $=_=>{const P=_.target.checked;n("update:checked",P),n("update:value",P),n("change",_),a.onFieldChange()},S=_=>{n("change",_),c&&c.onChange&&c.onChange(_)};return()=>{var _;const P=c,{prefixCls:O,id:T=a.id.value}=t,M=Qte(t,["prefixCls","id"]),I=A(A({prefixCls:m.value,id:T},ht(M,["onUpdate:checked","onUpdate:value"])),{disabled:(_=g.value)!==null&&_!==void 0?_:v.value});P?(I.name=P.name.value,I.onChange=S,I.checked=t.value===P.value.value,I.disabled=d.value||P.disabled.value):I.onChange=$;const k=ce({[`${m.value}-wrapper`]:!0,[`${m.value}-wrapper-checked`]:I.checked,[`${m.value}-wrapper-disabled`]:I.disabled,[`${m.value}-wrapper-rtl`]:p.value==="rtl",[`${m.value}-wrapper-in-form-item`]:s.isFormItemInput},r.class,y.value);return b(C("label",H(H({},r),{},{class:k}),[C(l4,H(H({},I),{},{type:"radio",ref:f}),null),o.default&&C("span",null,[o.default()])]))}}}),ene=()=>({prefixCls:String,value:Z.any,size:Ne(),options:xt(),disabled:Ce(),name:String,buttonStyle:Ne("outline"),id:String,optionType:Ne("default"),onChange:ve(),"onUpdate:value":ve()}),_S=oe({compatConfig:{MODE:3},name:"ARadioGroup",inheritAttrs:!1,props:ene(),setup(t,e){let{slots:n,emit:i,attrs:o}=e;const r=vn(),{prefixCls:a,direction:s,size:l}=Me("radio",t),[c,u]=d4(a),d=se(t.value),f=se(!1);return ye(()=>t.value,p=>{d.value=p,f.value=!1}),Xte({onChange:p=>{const g=d.value,{value:m}=p.target;"value"in t||(d.value=m),!f.value&&m!==g&&(f.value=!0,i("update:value",m),i("change",p),r.onFieldChange()),pt(()=>{f.value=!1})},value:d,disabled:L(()=>t.disabled),name:L(()=>t.name),optionType:L(()=>t.optionType)}),()=>{var p;const{options:g,buttonStyle:m,id:v=r.id.value}=t,b=`${a.value}-group`,y=ce(b,`${b}-${m}`,{[`${b}-${l.value}`]:l.value,[`${b}-rtl`]:s.value==="rtl"},o.class,u.value);let w=null;return g&&g.length>0?w=g.map(x=>{if(typeof x=="string"||typeof x=="number")return C(di,{key:x,prefixCls:a.value,disabled:t.disabled,value:x,checked:d.value===x},{default:()=>[x]});const{value:$,disabled:S,label:_}=x;return C(di,{key:`radio-group-value-options-${$}`,prefixCls:a.value,disabled:S||t.disabled,value:$,checked:d.value===$},{default:()=>[_]})}):w=(p=n.default)===null||p===void 0?void 0:p.call(n),c(C("div",H(H({},o),{},{class:y,id:v}),[w]))}}}),tg=oe({compatConfig:{MODE:3},name:"ARadioButton",inheritAttrs:!1,props:f4(),setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o}=Me("radio",t);return Gte("button"),()=>{var r;return C(di,H(H(H({},i),t),{},{prefixCls:o.value}),{default:()=>[(r=n.default)===null||r===void 0?void 0:r.call(n)]})}}});di.Group=_S;di.Button=tg;di.install=function(t){return t.component(di.name,di),t.component(di.Group.name,di.Group),t.component(di.Button.name,di.Button),t};const tne=10,nne=20;function h4(t){const{fullscreen:e,validRange:n,generateConfig:i,locale:o,prefixCls:r,value:a,onChange:s,divRef:l}=t,c=i.getYear(a||i.getNow());let u=c-tne,d=u+nne;n&&(u=i.getYear(n[0]),d=i.getYear(n[1])+1);const f=o&&o.year==="年"?"年":"",h=[];for(let p=u;p{let g=i.setYear(a,p);if(n){const[m,v]=n,b=i.getYear(g),y=i.getMonth(g);b===i.getYear(v)&&y>i.getMonth(v)&&(g=i.setMonth(g,i.getMonth(v))),b===i.getYear(m)&&yl.value},null)}h4.inheritAttrs=!1;function p4(t){const{prefixCls:e,fullscreen:n,validRange:i,value:o,generateConfig:r,locale:a,onChange:s,divRef:l}=t,c=r.getMonth(o||r.getNow());let u=0,d=11;if(i){const[p,g]=i,m=r.getYear(o);r.getYear(g)===m&&(d=r.getMonth(g)),r.getYear(p)===m&&(u=r.getMonth(p))}const f=a.shortMonths||r.locale.getShortMonths(a.locale),h=[];for(let p=u;p<=d;p+=1)h.push({label:f[p],value:p});return C(kn,{size:n?void 0:"small",class:`${e}-month-select`,value:c,options:h,onChange:p=>{s(r.setMonth(o,p))},getPopupContainer:()=>l.value},null)}p4.inheritAttrs=!1;function g4(t){const{prefixCls:e,locale:n,mode:i,fullscreen:o,onModeChange:r}=t;return C(_S,{onChange:a=>{let{target:{value:s}}=a;r(s)},value:i,size:o?void 0:"small",class:`${e}-mode-switch`},{default:()=>[C(tg,{value:"month"},{default:()=>[n.month]}),C(tg,{value:"year"},{default:()=>[n.year]})]})}g4.inheritAttrs=!1;const ine=oe({name:"CalendarHeader",inheritAttrs:!1,props:["mode","prefixCls","value","validRange","generateConfig","locale","mode","fullscreen"],setup(t,e){let{attrs:n}=e;const i=se(null),o=Mn.useInject();return Mn.useProvide(o,{isFormItemInput:!1}),()=>{const r=A(A({},t),n),{prefixCls:a,fullscreen:s,mode:l,onChange:c,onModeChange:u}=r,d=A(A({},r),{fullscreen:s,divRef:i});return C("div",{class:`${a}-header`,ref:i},[C(h4,H(H({},d),{},{onChange:f=>{c(f,"year")}}),null),l==="month"&&C(p4,H(H({},d),{},{onChange:f=>{c(f,"month")}}),null),C(g4,H(H({},d),{},{onModeChange:u}),null)])}}}),PS=t=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:t,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),kc=t=>({borderColor:t.inputBorderHoverColor,borderInlineEndWidth:t.lineWidth}),Ta=t=>({borderColor:t.inputBorderHoverColor,boxShadow:`0 0 0 ${t.controlOutlineWidth}px ${t.controlOutline}`,borderInlineEndWidth:t.lineWidth,outline:0}),TS=t=>({color:t.colorTextDisabled,backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":A({},kc(Ve(t,{inputBorderHoverColor:t.colorBorder})))}),m4=t=>{const{inputPaddingVerticalLG:e,fontSizeLG:n,lineHeightLG:i,borderRadiusLG:o,inputPaddingHorizontalLG:r}=t;return{padding:`${e}px ${r}px`,fontSize:n,lineHeight:i,borderRadius:o}},OS=t=>({padding:`${t.inputPaddingVerticalSM}px ${t.controlPaddingHorizontalSM-1}px`,borderRadius:t.borderRadiusSM}),ef=(t,e)=>{const{componentCls:n,colorError:i,colorWarning:o,colorErrorOutline:r,colorWarningOutline:a,colorErrorBorderHover:s,colorWarningBorderHover:l}=t;return{[`&-status-error:not(${e}-disabled):not(${e}-borderless)${e}`]:{borderColor:i,"&:hover":{borderColor:s},"&:focus, &-focused":A({},Ta(Ve(t,{inputBorderActiveColor:i,inputBorderHoverColor:i,controlOutline:r}))),[`${n}-prefix`]:{color:i}},[`&-status-warning:not(${e}-disabled):not(${e}-borderless)${e}`]:{borderColor:o,"&:hover":{borderColor:l},"&:focus, &-focused":A({},Ta(Ve(t,{inputBorderActiveColor:o,inputBorderHoverColor:o,controlOutline:a}))),[`${n}-prefix`]:{color:o}}}},rl=t=>A(A({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${t.inputPaddingVertical}px ${t.inputPaddingHorizontal}px`,color:t.colorText,fontSize:t.fontSize,lineHeight:t.lineHeight,backgroundColor:t.colorBgContainer,backgroundImage:"none",borderWidth:t.lineWidth,borderStyle:t.lineType,borderColor:t.colorBorder,borderRadius:t.borderRadius,transition:`all ${t.motionDurationMid}`},PS(t.colorTextPlaceholder)),{"&:hover":A({},kc(t)),"&:focus, &-focused":A({},Ta(t)),"&-disabled, &[disabled]":A({},TS(t)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:t.controlHeight,lineHeight:t.lineHeight,verticalAlign:"bottom",transition:`all ${t.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":A({},m4(t)),"&-sm":A({},OS(t)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),v4=t=>{const{componentCls:e,antCls:n}=t;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:t.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${e}, &-lg > ${e}-group-addon`]:A({},m4(t)),[`&-sm ${e}, &-sm > ${e}-group-addon`]:A({},OS(t)),[`> ${e}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${e}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${t.inputPaddingHorizontal}px`,color:t.colorText,fontWeight:"normal",fontSize:t.fontSize,textAlign:"center",backgroundColor:t.colorFillAlter,border:`${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`-${t.inputPaddingVertical+1}px -${t.inputPaddingHorizontal}px`,[`&${n}-select-single:not(${n}-select-customize-input)`]:{[`${n}-select-selector`]:{backgroundColor:"inherit",border:`${t.lineWidth}px ${t.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${n}-select-selector`]:{color:t.colorPrimary}}},[`${n}-cascader-picker`]:{margin:`-9px -${t.inputPaddingHorizontal}px`,backgroundColor:"transparent",[`${n}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${e}`]:{float:"inline-start",width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${e}-search-with-button &`]:{zIndex:0}}},[`> ${e}:first-child, ${e}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${e}-affix-wrapper`]:{[`&:not(:first-child) ${e}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${e}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${e}:last-child, ${e}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${e}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${e}-search &`]:{borderStartStartRadius:t.borderRadius,borderEndStartRadius:t.borderRadius}},[`&:not(:first-child), ${e}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${e}-group-compact`]:A(A({display:"block"},Do()),{[`${e}-group-addon, ${e}-group-wrap, > ${e}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:t.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`& > ${e}-affix-wrapper`]:{display:"inline-flex"},[`& > ${n}-picker-range`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-t.lineWidth,borderInlineEndWidth:t.lineWidth},[`${e}`]:{float:"none"},[`& > ${n}-select > ${n}-select-selector, + `]:{marginInlineStart:t.marginXXS}},[`${e}-overlay-link`]:{borderRadius:t.borderRadiusSM,height:t.lineHeight*t.fontSize,display:"inline-block",padding:`0 ${t.paddingXXS}px`,marginInline:-t.marginXXS,[`> ${n}`]:{marginInlineStart:t.marginXXS,fontSize:t.fontSizeIcon},"&:hover":{color:t.breadcrumbLinkColorHover,backgroundColor:t.colorBgTextHover,a:{color:t.breadcrumbLinkColorHover}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${t.componentCls}-rtl`]:{direction:"rtl"}})}},Nee=et("Breadcrumb",t=>{const e=Ve(t,{breadcrumbBaseColor:t.colorTextDescription,breadcrumbFontSize:t.fontSize,breadcrumbIconFontSize:t.fontSize,breadcrumbLinkColor:t.colorTextDescription,breadcrumbLinkColorHover:t.colorText,breadcrumbLastItemColor:t.colorText,breadcrumbSeparatorMargin:t.marginXS,breadcrumbSeparatorColor:t.colorTextDescription});return[Fee(e)]}),Bee=()=>({prefixCls:String,routes:{type:Array},params:Z.any,separator:Z.any,itemRender:{type:Function}});function zee(t,e){if(!t.breadcrumbName)return null;const n=Object.keys(e).join("|");return t.breadcrumbName.replace(new RegExp(`:(${n})`,"g"),(o,r)=>e[r]||o)}function X2(t){const{route:e,params:n,routes:i,paths:o}=t,r=i.indexOf(e)===i.length-1,a=zee(e,n);return r?C("span",null,[a]):C("a",{href:`#/${o.join("/")}`},[a])}const Cs=oe({compatConfig:{MODE:3},name:"ABreadcrumb",inheritAttrs:!1,props:Bee(),slots:Object,setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,direction:r}=Me("breadcrumb",t),[a,s]=Nee(o),l=(d,f)=>(d=(d||"").replace(/^\//,""),Object.keys(f).forEach(h=>{d=d.replace(`:${h}`,f[h])}),d),c=(d,f,h)=>{const p=[...d],g=l(f||"",h);return g&&p.push(g),p},u=d=>{let{routes:f=[],params:h={},separator:p,itemRender:g=X2}=d;const m=[];return f.map(v=>{const b=l(v.path,h);b&&m.push(b);const y=[...m];let w=null;v.children&&v.children.length&&(w=C(sn,{items:v.children.map($=>({key:$.path||$.breadcrumbName,label:g({route:$,params:h,routes:f,paths:c(y,$.path,h)})}))},null));const x={separator:p};return w&&(x.overlay=w),C(wd,H(H({},x),{},{key:b||v.breadcrumbName}),{default:()=>[g({route:v,params:h,routes:f,paths:y})]})})};return()=>{var d;let f;const{routes:h,params:p={}}=t,g=Dt(gn(n,t)),m=(d=gn(n,t,"separator"))!==null&&d!==void 0?d:"/",v=t.itemRender||n.itemRender||X2;h&&h.length>0?f=u({routes:h,params:p,separator:m,itemRender:v}):g.length&&(f=g.map((y,w)=>(Gi(typeof y.type=="object"&&(y.type.__ANT_BREADCRUMB_ITEM||y.type.__ANT_BREADCRUMB_SEPARATOR)),On(y,{separator:m,key:w}))));const b={[o.value]:!0,[`${o.value}-rtl`]:r.value==="rtl",[`${i.class}`]:!!i.class,[s.value]:!0};return a(C("nav",H(H({},i),{},{class:b}),[C("ol",null,[f])]))}}});var Hee=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o({prefixCls:String}),eg=oe({compatConfig:{MODE:3},name:"ABreadcrumbSeparator",__ANT_BREADCRUMB_SEPARATOR:!0,inheritAttrs:!1,props:Wee(),setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o}=Me("breadcrumb",t);return()=>{var r;const{separator:a,class:s}=i,l=Hee(i,["separator","class"]),c=Dt((r=n.default)===null||r===void 0?void 0:r.call(n));return C("span",H({class:[`${o.value}-separator`,s]},l),[c.length>0?c:"/"])}}});Cs.Item=wd;Cs.Separator=eg;Cs.install=function(t){return t.component(Cs.name,Cs),t.component(wd.name,wd),t.component(eg.name,eg),t};var Fa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Na(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var I3={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(Fa,function(){var n=1e3,i=6e4,o=36e5,r="millisecond",a="second",s="minute",l="hour",c="day",u="week",d="month",f="quarter",h="year",p="date",g="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(k){var E=["th","st","nd","rd"],R=k%100;return"["+k+(E[(R-20)%10]||E[R]||E[0])+"]"}},y=function(k,E,R){var D=String(k);return!D||D.length>=E?k:""+Array(E+1-D.length).join(R)+k},w={s:y,z:function(k){var E=-k.utcOffset(),R=Math.abs(E),D=Math.floor(R/60),F=R%60;return(E<=0?"+":"-")+y(D,2,"0")+":"+y(F,2,"0")},m:function k(E,R){if(E.date()1)return k(B[0])}else{var z=E.name;$[z]=E,F=z}return!D&&F&&(x=F),F||!D&&x},O=function(k,E){if(_(k))return k.clone();var R=typeof E=="object"?E:{};return R.date=k,R.args=arguments,new M(R)},T=w;T.l=P,T.i=_,T.w=function(k,E){return O(k,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var M=function(){function k(R){this.$L=P(R.locale,null,!0),this.parse(R),this.$x=this.$x||R.x||{},this[S]=!0}var E=k.prototype;return E.parse=function(R){this.$d=function(D){var F=D.date,N=D.utc;if(F===null)return new Date(NaN);if(T.u(F))return new Date;if(F instanceof Date)return new Date(F);if(typeof F=="string"&&!/Z$/i.test(F)){var B=F.match(m);if(B){var z=B[2]-1||0,W=(B[7]||"0").substring(0,3);return N?new Date(Date.UTC(B[1],z,B[3]||1,B[4]||0,B[5]||0,B[6]||0,W)):new Date(B[1],z,B[3]||1,B[4]||0,B[5]||0,B[6]||0,W)}}return new Date(F)}(R),this.init()},E.init=function(){var R=this.$d;this.$y=R.getFullYear(),this.$M=R.getMonth(),this.$D=R.getDate(),this.$W=R.getDay(),this.$H=R.getHours(),this.$m=R.getMinutes(),this.$s=R.getSeconds(),this.$ms=R.getMilliseconds()},E.$utils=function(){return T},E.isValid=function(){return this.$d.toString()!==g},E.isSame=function(R,D){var F=O(R);return this.startOf(D)<=F&&F<=this.endOf(D)},E.isAfter=function(R,D){return O(R)25){var u=a(this).startOf(i).add(1,i).date(c),d=a(this).endOf(n);if(u.isBefore(d))return 1}var f=a(this).startOf(i).date(c).startOf(n).subtract(1,"millisecond"),h=this.diff(f,n,!0);return h<0?a(this).startOf("week").week():Math.ceil(h)},s.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}})})(R3);var Kee=R3.exports;const Uee=Na(Kee);var L3={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(Fa,function(){return function(n,i){i.prototype.weekYear=function(){var o=this.month(),r=this.week(),a=this.year();return r===1&&o===11?a+1:o===0&&r>=52?a-1:a}}})})(L3);var qee=L3.exports;const Zee=Na(qee);var F3={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(Fa,function(){var n="month",i="quarter";return function(o,r){var a=r.prototype;a.quarter=function(c){return this.$utils().u(c)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(c-1))};var s=a.add;a.add=function(c,u){return c=Number(c),this.$utils().p(u)===i?this.add(3*c,n):s.bind(this)(c,u)};var l=a.startOf;a.startOf=function(c,u){var d=this.$utils(),f=!!d.u(u)||u;if(d.p(c)===i){var h=this.quarter()-1;return f?this.month(3*h).startOf(n).startOf("day"):this.month(3*h+2).endOf(n).endOf("day")}return l.bind(this)(c,u)}}})})(F3);var Jee=F3.exports;const Qee=Na(Jee);var N3={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(Fa,function(){return function(n,i){var o=i.prototype,r=o.format;o.format=function(a){var s=this,l=this.$locale();if(!this.isValid())return r.bind(this)(a);var c=this.$utils(),u=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(d){switch(d){case"Q":return Math.ceil((s.$M+1)/3);case"Do":return l.ordinal(s.$D);case"gggg":return s.weekYear();case"GGGG":return s.isoWeekYear();case"wo":return l.ordinal(s.week(),"W");case"w":case"ww":return c.s(s.week(),d==="w"?1:2,"0");case"W":case"WW":return c.s(s.isoWeek(),d==="W"?1:2,"0");case"k":case"kk":return c.s(String(s.$H===0?24:s.$H),d==="k"?1:2,"0");case"X":return Math.floor(s.$d.getTime()/1e3);case"x":return s.$d.getTime();case"z":return"["+s.offsetName()+"]";case"zzz":return"["+s.offsetName("long")+"]";default:return d}});return r.bind(this)(u)}}})})(N3);var ete=N3.exports;const tte=Na(ete);var B3={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(Fa,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},i=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,o=/\d/,r=/\d\d/,a=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,l={},c=function(m){return(m=+m)+(m>68?1900:2e3)},u=function(m){return function(v){this[m]=+v}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(m){(this.zone||(this.zone={})).offset=function(v){if(!v||v==="Z")return 0;var b=v.match(/([+-]|\d\d)/g),y=60*b[1]+(+b[2]||0);return y===0?0:b[0]==="+"?-y:y}(m)}],f=function(m){var v=l[m];return v&&(v.indexOf?v:v.s.concat(v.f))},h=function(m,v){var b,y=l.meridiem;if(y){for(var w=1;w<=24;w+=1)if(m.indexOf(y(w,0,v))>-1){b=w>12;break}}else b=m===(v?"pm":"PM");return b},p={A:[s,function(m){this.afternoon=h(m,!1)}],a:[s,function(m){this.afternoon=h(m,!0)}],Q:[o,function(m){this.month=3*(m-1)+1}],S:[o,function(m){this.milliseconds=100*+m}],SS:[r,function(m){this.milliseconds=10*+m}],SSS:[/\d{3}/,function(m){this.milliseconds=+m}],s:[a,u("seconds")],ss:[a,u("seconds")],m:[a,u("minutes")],mm:[a,u("minutes")],H:[a,u("hours")],h:[a,u("hours")],HH:[a,u("hours")],hh:[a,u("hours")],D:[a,u("day")],DD:[r,u("day")],Do:[s,function(m){var v=l.ordinal,b=m.match(/\d+/);if(this.day=b[0],v)for(var y=1;y<=31;y+=1)v(y).replace(/\[|\]/g,"")===m&&(this.day=y)}],w:[a,u("week")],ww:[r,u("week")],M:[a,u("month")],MM:[r,u("month")],MMM:[s,function(m){var v=f("months"),b=(f("monthsShort")||v.map(function(y){return y.slice(0,3)})).indexOf(m)+1;if(b<1)throw new Error;this.month=b%12||b}],MMMM:[s,function(m){var v=f("months").indexOf(m)+1;if(v<1)throw new Error;this.month=v%12||v}],Y:[/[+-]?\d+/,u("year")],YY:[r,function(m){this.year=c(m)}],YYYY:[/\d{4}/,u("year")],Z:d,ZZ:d};function g(m){var v,b;v=m,b=l&&l.formats;for(var y=(m=v.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(O,T,M){var I=M&&M.toUpperCase();return T||b[M]||n[M]||b[I].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(k,E,R){return E||R.slice(1)})})).match(i),w=y.length,x=0;x-1)return new Date((F==="X"?1e3:1)*D);var z=g(F)(D),W=z.year,j=z.month,U=z.day,V=z.hours,q=z.minutes,Y=z.seconds,J=z.milliseconds,Q=z.zone,G=z.week,ee=new Date,X=U||(W||j?1:ee.getDate()),K=W||ee.getFullYear(),te=0;W&&!j||(te=j>0?j-1:ee.getMonth());var ue,ae=V||0,re=q||0,ne=Y||0,le=J||0;return Q?new Date(Date.UTC(K,te,X,ae,re,ne,le+60*Q.offset*1e3)):N?new Date(Date.UTC(K,te,X,ae,re,ne,le)):(ue=new Date(K,te,X,ae,re,ne,le),G&&(ue=B(ue).week(G).toDate()),ue)}catch{return new Date("")}}($,P,S,b),this.init(),I&&I!==!0&&(this.$L=this.locale(I).$L),M&&$!=this.format(P)&&(this.$d=new Date("")),l={}}else if(P instanceof Array)for(var k=P.length,E=1;E<=k;E+=1){_[1]=P[E-1];var R=b.apply(this,_);if(R.isValid()){this.$d=R.$d,this.$L=R.$L,this.init();break}E===k&&(this.$d=new Date(""))}else w.call(this,x)}}})})(B3);var nte=B3.exports;const ite=Na(nte);Pn.extend(ite);Pn.extend(tte);Pn.extend(Xee);Pn.extend(Gee);Pn.extend(Uee);Pn.extend(Zee);Pn.extend(Qee);Pn.extend((t,e)=>{const n=e.prototype,i=n.format;n.format=function(r){const a=(r||"").replace("Wo","wo");return i.bind(this)(a)}});const ote={bn_BD:"bn-bd",by_BY:"be",en_GB:"en-gb",en_US:"en",fr_BE:"fr",fr_CA:"fr-ca",hy_AM:"hy-am",kmr_IQ:"ku",nl_BE:"nl-be",pt_BR:"pt-br",zh_CN:"zh-cn",zh_HK:"zh-hk",zh_TW:"zh-tw"},Ya=t=>ote[t]||t.split("_")[0],Y2=()=>{$7(!1,"Not match any format. Please help to fire a issue about this.")},rte=/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|k{1,2}|S/g;function G2(t,e,n){const i=[...new Set(t.split(n))];let o=0;for(let r=0;re)return a;o+=n.length}}const K2=(t,e)=>{if(!t)return null;if(Pn.isDayjs(t))return t;const n=e.matchAll(rte);let i=Pn(t,e);if(n===null)return i;for(const o of n){const r=o[0],a=o.index;if(r==="Q"){const s=t.slice(a-1,a),l=G2(t,a,s).match(/\d+/)[0];i=i.quarter(parseInt(l))}if(r.toLowerCase()==="wo"){const s=t.slice(a-1,a),l=G2(t,a,s).match(/\d+/)[0];i=i.week(parseInt(l))}r.toLowerCase()==="ww"&&(i=i.week(parseInt(t.slice(a,a+r.length)))),r.toLowerCase()==="w"&&(i=i.week(parseInt(t.slice(a,a+r.length+1))))}return i},rS={getNow:()=>Pn(),getFixedDate:t=>Pn(t,["YYYY-M-DD","YYYY-MM-DD"]),getEndDate:t=>t.endOf("month"),getWeekDay:t=>{const e=t.locale("en");return e.weekday()+e.localeData().firstDayOfWeek()},getYear:t=>t.year(),getMonth:t=>t.month(),getDate:t=>t.date(),getHour:t=>t.hour(),getMinute:t=>t.minute(),getSecond:t=>t.second(),addYear:(t,e)=>t.add(e,"year"),addMonth:(t,e)=>t.add(e,"month"),addDate:(t,e)=>t.add(e,"day"),setYear:(t,e)=>t.year(e),setMonth:(t,e)=>t.month(e),setDate:(t,e)=>t.date(e),setHour:(t,e)=>t.hour(e),setMinute:(t,e)=>t.minute(e),setSecond:(t,e)=>t.second(e),isAfter:(t,e)=>t.isAfter(e),isValidate:t=>t.isValid(),locale:{getWeekFirstDay:t=>Pn().locale(Ya(t)).localeData().firstDayOfWeek(),getWeekFirstDate:(t,e)=>e.locale(Ya(t)).weekday(0),getWeek:(t,e)=>e.locale(Ya(t)).week(),getShortWeekDays:t=>Pn().locale(Ya(t)).localeData().weekdaysMin(),getShortMonths:t=>Pn().locale(Ya(t)).localeData().monthsShort(),format:(t,e,n)=>e.locale(Ya(t)).format(n),parse:(t,e,n)=>{const i=Ya(t);for(let o=0;oArray.isArray(t)?t.map(n=>K2(n,e)):K2(t,e),toString:(t,e)=>Array.isArray(t)?t.map(n=>Pn.isDayjs(n)?n.format(e):n):Pn.isDayjs(t)?t.format(e):t};function dn(t){const e=UB();return A(A({},t),e)}const z3=Symbol("PanelContextProps"),aS=t=>{ot(z3,t)},ur=()=>qe(z3,{}),jf={visibility:"hidden"};function Ba(t,e){let{slots:n}=e;var i;const o=dn(t),{prefixCls:r,prevIcon:a="‹",nextIcon:s="›",superPrevIcon:l="«",superNextIcon:c="»",onSuperPrev:u,onSuperNext:d,onPrev:f,onNext:h}=o,{hideNextBtn:p,hidePrevBtn:g}=ur();return C("div",{class:r},[u&&C("button",{type:"button",onClick:u,tabindex:-1,class:`${r}-super-prev-btn`,style:g.value?jf:{}},[l]),f&&C("button",{type:"button",onClick:f,tabindex:-1,class:`${r}-prev-btn`,style:g.value?jf:{}},[a]),C("div",{class:`${r}-view`},[(i=n.default)===null||i===void 0?void 0:i.call(n)]),h&&C("button",{type:"button",onClick:h,tabindex:-1,class:`${r}-next-btn`,style:p.value?jf:{}},[s]),d&&C("button",{type:"button",onClick:d,tabindex:-1,class:`${r}-super-next-btn`,style:p.value?jf:{}},[c])])}Ba.displayName="Header";Ba.inheritAttrs=!1;function sS(t){const e=dn(t),{prefixCls:n,generateConfig:i,viewDate:o,onPrevDecades:r,onNextDecades:a}=e,{hideHeader:s}=ur();if(s)return null;const l=`${n}-header`,c=i.getYear(o),u=Math.floor(c/Or)*Or,d=u+Or-1;return C(Ba,H(H({},e),{},{prefixCls:l,onSuperPrev:r,onSuperNext:a}),{default:()=>[u,Qn("-"),d]})}sS.displayName="DecadeHeader";sS.inheritAttrs=!1;function H3(t,e,n,i,o){let r=t.setHour(e,n);return r=t.setMinute(r,i),r=t.setSecond(r,o),r}function $h(t,e,n){if(!n)return e;let i=e;return i=t.setHour(i,t.getHour(n)),i=t.setMinute(i,t.getMinute(n)),i=t.setSecond(i,t.getSecond(n)),i}function ate(t,e,n,i,o,r){const a=Math.floor(t/i)*i;if(a{k.stopPropagation(),M||i(T)},onMouseenter:()=>{!M&&v&&v(T)},onMouseleave:()=>{!M&&b&&b(T)}},[f?f(T):C("div",{class:`${w}-inner`},[d(T)])]))}x.push(C("tr",{key:$,class:l&&l(_)},[S]))}return C("div",{class:`${e}-body`},[C("table",{class:`${e}-content`},[m&&C("thead",null,[C("tr",null,[m])]),C("tbody",null,[x])])])}il.displayName="PanelBody";il.inheritAttrs=!1;const ky=3,U2=4;function lS(t){const e=dn(t),n=To-1,{prefixCls:i,viewDate:o,generateConfig:r}=e,a=`${i}-cell`,s=r.getYear(o),l=Math.floor(s/To)*To,c=Math.floor(s/Or)*Or,u=c+Or-1,d=r.setYear(o,c-Math.ceil((ky*U2*To-Or)/2)),f=h=>{const p=r.getYear(h),g=p+n;return{[`${a}-in-view`]:c<=p&&g<=u,[`${a}-selected`]:p===l}};return C(il,H(H({},e),{},{rowNum:U2,colNum:ky,baseDate:d,getCellText:h=>{const p=r.getYear(h);return`${p}-${p+n}`},getCellClassName:f,getCellDate:(h,p)=>r.addYear(h,p*To)}),null)}lS.displayName="DecadeBody";lS.inheritAttrs=!1;const Vf=new Map;function lte(t,e){let n;function i(){mm(t)?e():n=lt(()=>{i()})}return i(),()=>{lt.cancel(n)}}function Dy(t,e,n){if(Vf.get(t)&<.cancel(Vf.get(t)),n<=0){Vf.set(t,lt(()=>{t.scrollTop=e}));return}const o=(e-t.scrollTop)/n*10;Vf.set(t,lt(()=>{t.scrollTop+=o,t.scrollTop!==e&&Dy(t,e,n-10)}))}function kc(t,e){let{onLeftRight:n,onCtrlLeftRight:i,onUpDown:o,onPageUpDown:r,onEnter:a}=e;const{which:s,ctrlKey:l,metaKey:c}=t;switch(s){case Te.LEFT:if(l||c){if(i)return i(-1),!0}else if(n)return n(-1),!0;break;case Te.RIGHT:if(l||c){if(i)return i(1),!0}else if(n)return n(1),!0;break;case Te.UP:if(o)return o(-1),!0;break;case Te.DOWN:if(o)return o(1),!0;break;case Te.PAGE_UP:if(r)return r(-1),!0;break;case Te.PAGE_DOWN:if(r)return r(1),!0;break;case Te.ENTER:if(a)return a(),!0;break}return!1}function W3(t,e,n,i){let o=t;if(!o)switch(e){case"time":o=i?"hh:mm:ss a":"HH:mm:ss";break;case"week":o="gggg-wo";break;case"month":o="YYYY-MM";break;case"quarter":o="YYYY-[Q]Q";break;case"year":o="YYYY";break;default:o=n?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD"}return o}function j3(t,e,n){const i=t==="time"?8:10,o=typeof e=="function"?e(n.getNow()).length:e.length;return Math.max(i,o)+2}let Qc=null;const Xf=new Set;function cte(t){return!Qc&&typeof window<"u"&&window.addEventListener&&(Qc=e=>{[...Xf].forEach(n=>{n(e)})},window.addEventListener("mousedown",Qc)),Xf.add(t),()=>{Xf.delete(t),Xf.size===0&&(window.removeEventListener("mousedown",Qc),Qc=null)}}function ute(t){var e;const n=t.target;return t.composed&&n.shadowRoot&&((e=t.composedPath)===null||e===void 0?void 0:e.call(t)[0])||n}const dte=t=>t==="month"||t==="date"?"year":t,fte=t=>t==="date"?"month":t,hte=t=>t==="month"||t==="date"?"quarter":t,pte=t=>t==="date"?"week":t,gte={year:dte,month:fte,quarter:hte,week:pte,time:null,date:null};function V3(t,e){return t.some(n=>n&&n.contains(e))}const To=10,Or=To*10;function cS(t){const e=dn(t),{prefixCls:n,onViewDateChange:i,generateConfig:o,viewDate:r,operationRef:a,onSelect:s,onPanelChange:l}=e,c=`${n}-decade-panel`;a.value={onKeydown:f=>kc(f,{onLeftRight:h=>{s(o.addYear(r,h*To),"key")},onCtrlLeftRight:h=>{s(o.addYear(r,h*Or),"key")},onUpDown:h=>{s(o.addYear(r,h*To*ky),"key")},onEnter:()=>{l("year",r)}})};const u=f=>{const h=o.addYear(r,f*Or);i(h),l(null,h)},d=f=>{s(f,"mouse"),l("year",f)};return C("div",{class:c},[C(sS,H(H({},e),{},{prefixCls:n,onPrevDecades:()=>{u(-1)},onNextDecades:()=>{u(1)}}),null),C(lS,H(H({},e),{},{prefixCls:n,onSelect:d}),null)])}cS.displayName="DecadePanel";cS.inheritAttrs=!1;const Ah=7;function ol(t,e){if(!t&&!e)return!0;if(!t||!e)return!1}function mte(t,e,n){const i=ol(e,n);if(typeof i=="boolean")return i;const o=Math.floor(t.getYear(e)/10),r=Math.floor(t.getYear(n)/10);return o===r}function Bm(t,e,n){const i=ol(e,n);return typeof i=="boolean"?i:t.getYear(e)===t.getYear(n)}function Ry(t,e){return Math.floor(t.getMonth(e)/3)+1}function X3(t,e,n){const i=ol(e,n);return typeof i=="boolean"?i:Bm(t,e,n)&&Ry(t,e)===Ry(t,n)}function uS(t,e,n){const i=ol(e,n);return typeof i=="boolean"?i:Bm(t,e,n)&&t.getMonth(e)===t.getMonth(n)}function Er(t,e,n){const i=ol(e,n);return typeof i=="boolean"?i:t.getYear(e)===t.getYear(n)&&t.getMonth(e)===t.getMonth(n)&&t.getDate(e)===t.getDate(n)}function vte(t,e,n){const i=ol(e,n);return typeof i=="boolean"?i:t.getHour(e)===t.getHour(n)&&t.getMinute(e)===t.getMinute(n)&&t.getSecond(e)===t.getSecond(n)}function Y3(t,e,n,i){const o=ol(n,i);return typeof o=="boolean"?o:t.locale.getWeek(e,n)===t.locale.getWeek(e,i)}function Kl(t,e,n){return Er(t,e,n)&&vte(t,e,n)}function Yf(t,e,n,i){return!e||!n||!i?!1:!Er(t,e,i)&&!Er(t,n,i)&&t.isAfter(i,e)&&t.isAfter(n,i)}function bte(t,e,n){const i=e.locale.getWeekFirstDay(t),o=e.setDate(n,1),r=e.getWeekDay(o);let a=e.addDate(o,i-r);return e.getMonth(a)===e.getMonth(n)&&e.getDate(a)>1&&(a=e.addDate(a,-7)),a}function Nu(t,e,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;switch(e){case"year":return n.addYear(t,i*10);case"quarter":case"month":return n.addYear(t,i);default:return n.addMonth(t,i)}}function zn(t,e){let{generateConfig:n,locale:i,format:o}=e;return typeof o=="function"?o(t):n.locale.format(i.locale,t,o)}function G3(t,e){let{generateConfig:n,locale:i,formatList:o}=e;return!t||typeof o[0]=="function"?null:n.locale.parse(i.locale,t,o)}function Ly(t){let{cellDate:e,mode:n,disabledDate:i,generateConfig:o}=t;if(!i)return!1;const r=(a,s,l)=>{let c=s;for(;c<=l;){let u;switch(a){case"date":{if(u=o.setDate(e,c),!i(u))return!1;break}case"month":{if(u=o.setMonth(e,c),!Ly({cellDate:u,mode:"month",generateConfig:o,disabledDate:i}))return!1;break}case"year":{if(u=o.setYear(e,c),!Ly({cellDate:u,mode:"year",generateConfig:o,disabledDate:i}))return!1;break}}c+=1}return!0};switch(n){case"date":case"week":return i(e);case"month":{const s=o.getDate(o.getEndDate(e));return r("date",1,s)}case"quarter":{const a=Math.floor(o.getMonth(e)/3)*3,s=a+2;return r("month",a,s)}case"year":return r("month",0,11);case"decade":{const a=o.getYear(e),s=Math.floor(a/To)*To,l=s+To-1;return r("year",s,l)}}}function dS(t){const e=dn(t),{hideHeader:n}=ur();if(n.value)return null;const{prefixCls:i,generateConfig:o,locale:r,value:a,format:s}=e,l=`${i}-header`;return C(Ba,{prefixCls:l},{default:()=>[a?zn(a,{locale:r,format:s,generateConfig:o}):" "]})}dS.displayName="TimeHeader";dS.inheritAttrs=!1;const Gf=oe({name:"TimeUnitColumn",props:["prefixCls","units","onSelect","value","active","hideDisabledOptions"],setup(t){const{open:e}=ur(),n=ie(null),i=se(new Map),o=se();return ye(()=>t.value,()=>{const r=i.value.get(t.value);r&&e.value!==!1&&Dy(n.value,r.offsetTop,120)}),at(()=>{var r;(r=o.value)===null||r===void 0||r.call(o)}),ye(e,()=>{var r;(r=o.value)===null||r===void 0||r.call(o),pt(()=>{if(e.value){const a=i.value.get(t.value);a&&(o.value=lte(a,()=>{Dy(n.value,a.offsetTop,0)}))}})},{immediate:!0,flush:"post"}),()=>{const{prefixCls:r,units:a,onSelect:s,value:l,active:c,hideDisabledOptions:u}=t,d=`${r}-cell`;return C("ul",{class:ce(`${r}-column`,{[`${r}-column-active`]:c}),ref:n,style:{position:"relative"}},[a.map(f=>u&&f.disabled?null:C("li",{key:f.value,ref:h=>{i.value.set(f.value,h)},class:ce(d,{[`${d}-disabled`]:f.disabled,[`${d}-selected`]:l===f.value}),onClick:()=>{f.disabled||s(f.value)}},[C("div",{class:`${d}-inner`},[f.label])]))])}}});function K3(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"0",i=String(t);for(;i.length{(n.startsWith("data-")||n.startsWith("aria-")||n==="role"||n==="name")&&!n.startsWith("data-__")&&(e[n]=t[n])}),e}function It(t,e){return t?t[e]:null}function oo(t,e,n){const i=[It(t,0),It(t,1)];return i[n]=typeof e=="function"?e(i[n]):e,!i[0]&&!i[1]?null:i}function $b(t,e,n,i){const o=[];for(let r=t;r<=e;r+=n)o.push({label:K3(r,2),value:r,disabled:(i||[]).includes(r)});return o}const xte=oe({compatConfig:{MODE:3},name:"TimeBody",inheritAttrs:!1,props:["generateConfig","prefixCls","operationRef","activeColumnIndex","value","showHour","showMinute","showSecond","use12Hours","hourStep","minuteStep","secondStep","disabledHours","disabledMinutes","disabledSeconds","disabledTime","hideDisabledOptions","onSelect"],setup(t){const e=L(()=>t.value?t.generateConfig.getHour(t.value):-1),n=L(()=>t.use12Hours?e.value>=12:!1),i=L(()=>t.use12Hours?e.value%12:e.value),o=L(()=>t.value?t.generateConfig.getMinute(t.value):-1),r=L(()=>t.value?t.generateConfig.getSecond(t.value):-1),a=se(t.generateConfig.getNow()),s=se(),l=se(),c=se();Qg(()=>{a.value=t.generateConfig.getNow()}),Ke(()=>{if(t.disabledTime){const m=t.disabledTime(a);[s.value,l.value,c.value]=[m.disabledHours,m.disabledMinutes,m.disabledSeconds]}else[s.value,l.value,c.value]=[t.disabledHours,t.disabledMinutes,t.disabledSeconds]});const u=(m,v,b,y)=>{let w=t.value||t.generateConfig.getNow();const x=Math.max(0,v),$=Math.max(0,b),S=Math.max(0,y);return w=H3(t.generateConfig,w,!t.use12Hours||!m?x:x+12,$,S),w},d=L(()=>{var m;return $b(0,23,(m=t.hourStep)!==null&&m!==void 0?m:1,s.value&&s.value())}),f=L(()=>{if(!t.use12Hours)return[!1,!1];const m=[!0,!0];return d.value.forEach(v=>{let{disabled:b,value:y}=v;b||(y>=12?m[1]=!1:m[0]=!1)}),m}),h=L(()=>t.use12Hours?d.value.filter(n.value?m=>m.value>=12:m=>m.value<12).map(m=>{const v=m.value%12,b=v===0?"12":K3(v,2);return A(A({},m),{label:b,value:v})}):d.value),p=L(()=>{var m;return $b(0,59,(m=t.minuteStep)!==null&&m!==void 0?m:1,l.value&&l.value(e.value))}),g=L(()=>{var m;return $b(0,59,(m=t.secondStep)!==null&&m!==void 0?m:1,c.value&&c.value(e.value,o.value))});return()=>{const{prefixCls:m,operationRef:v,activeColumnIndex:b,showHour:y,showMinute:w,showSecond:x,use12Hours:$,hideDisabledOptions:S,onSelect:_}=t,P=[],O=`${m}-content`,T=`${m}-time-panel`;v.value={onUpDown:k=>{const E=P[b];if(E){const R=E.units.findIndex(F=>F.value===E.value),D=E.units.length;for(let F=1;F{_(u(n.value,k,o.value,r.value),"mouse")}),M(w,C(Gf,{key:"minute"},null),o.value,p.value,k=>{_(u(n.value,i.value,k,r.value),"mouse")}),M(x,C(Gf,{key:"second"},null),r.value,g.value,k=>{_(u(n.value,i.value,o.value,k),"mouse")});let I=-1;return typeof n.value=="boolean"&&(I=n.value?1:0),M($===!0,C(Gf,{key:"12hours"},null),I,[{label:"AM",value:0,disabled:f.value[0]},{label:"PM",value:1,disabled:f.value[1]}],k=>{_(u(!!k,i.value,o.value,r.value),"mouse")}),C("div",{class:O},[P.map(k=>{let{node:E}=k;return E})])}}}),wte=t=>t.filter(e=>e!==!1).length;function zm(t){const e=dn(t),{generateConfig:n,format:i="HH:mm:ss",prefixCls:o,active:r,operationRef:a,showHour:s,showMinute:l,showSecond:c,use12Hours:u=!1,onSelect:d,value:f}=e,h=`${o}-time-panel`,p=se(),g=se(-1),m=wte([s,l,c,u]);return a.value={onKeydown:v=>kc(v,{onLeftRight:b=>{g.value=(g.value+b+m)%m},onUpDown:b=>{g.value===-1?g.value=0:p.value&&p.value.onUpDown(b)},onEnter:()=>{d(f||n.getNow(),"key"),g.value=-1}}),onBlur:()=>{g.value=-1}},C("div",{class:ce(h,{[`${h}-active`]:r})},[C(dS,H(H({},e),{},{format:i,prefixCls:o}),null),C(xte,H(H({},e),{},{prefixCls:o,activeColumnIndex:g.value,operationRef:p}),null)])}zm.displayName="TimePanel";zm.inheritAttrs=!1;function Hm(t){let{cellPrefixCls:e,generateConfig:n,rangedValue:i,hoverRangedValue:o,isInView:r,isSameCell:a,offsetCell:s,today:l,value:c}=t;function u(d){const f=s(d,-1),h=s(d,1),p=It(i,0),g=It(i,1),m=It(o,0),v=It(o,1),b=Yf(n,m,v,d);function y(P){return a(p,P)}function w(P){return a(g,P)}const x=a(m,d),$=a(v,d),S=(b||$)&&(!r(f)||w(f)),_=(b||x)&&(!r(h)||y(h));return{[`${e}-in-view`]:r(d),[`${e}-in-range`]:Yf(n,p,g,d),[`${e}-range-start`]:y(d),[`${e}-range-end`]:w(d),[`${e}-range-start-single`]:y(d)&&!g,[`${e}-range-end-single`]:w(d)&&!p,[`${e}-range-start-near-hover`]:y(d)&&(a(f,m)||Yf(n,m,v,f)),[`${e}-range-end-near-hover`]:w(d)&&(a(h,v)||Yf(n,m,v,h)),[`${e}-range-hover`]:b,[`${e}-range-hover-start`]:x,[`${e}-range-hover-end`]:$,[`${e}-range-hover-edge-start`]:S,[`${e}-range-hover-edge-end`]:_,[`${e}-range-hover-edge-start-near-range`]:S&&a(f,g),[`${e}-range-hover-edge-end-near-range`]:_&&a(h,p),[`${e}-today`]:a(l,d),[`${e}-selected`]:a(c,d)}}return u}const Z3=Symbol("RangeContextProps"),Ste=t=>{ot(Z3,t)},Qd=()=>qe(Z3,{rangedValue:se(),hoverRangedValue:se(),inRange:se(),panelPosition:se()}),Cte=oe({compatConfig:{MODE:3},name:"PanelContextProvider",inheritAttrs:!1,props:{value:{type:Object,default:()=>({})}},setup(t,e){let{slots:n}=e;const i={rangedValue:se(t.value.rangedValue),hoverRangedValue:se(t.value.hoverRangedValue),inRange:se(t.value.inRange),panelPosition:se(t.value.panelPosition)};return Ste(i),ye(()=>t.value,()=>{Object.keys(t.value).forEach(o=>{i[o]&&(i[o].value=t.value[o])})}),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}});function Wm(t){const e=dn(t),{prefixCls:n,generateConfig:i,prefixColumn:o,locale:r,rowCount:a,viewDate:s,value:l,dateRender:c}=e,{rangedValue:u,hoverRangedValue:d}=Qd(),f=bte(r.locale,i,s),h=`${n}-cell`,p=i.locale.getWeekFirstDay(r.locale),g=i.getNow(),m=[],v=r.shortWeekDays||(i.locale.getShortWeekDays?i.locale.getShortWeekDays(r.locale):[]);o&&m.push(C("th",{key:"empty","aria-label":"empty cell"},null));for(let w=0;wEr(i,w,x),isInView:w=>uS(i,w,s),offsetCell:(w,x)=>i.addDate(w,x)}),y=c?w=>c({current:w,today:g}):void 0;return C(il,H(H({},e),{},{rowNum:a,colNum:Ah,baseDate:f,getCellNode:y,getCellText:i.getDate,getCellClassName:b,getCellDate:i.addDate,titleCell:w=>zn(w,{locale:r,format:"YYYY-MM-DD",generateConfig:i}),headerCells:m}),null)}Wm.displayName="DateBody";Wm.inheritAttrs=!1;Wm.props=["prefixCls","generateConfig","value?","viewDate","locale","rowCount","onSelect","dateRender?","disabledDate?","prefixColumn?","rowClassName?"];function fS(t){const e=dn(t),{prefixCls:n,generateConfig:i,locale:o,viewDate:r,onNextMonth:a,onPrevMonth:s,onNextYear:l,onPrevYear:c,onYearClick:u,onMonthClick:d}=e,{hideHeader:f}=ur();if(f.value)return null;const h=`${n}-header`,p=o.shortMonths||(i.locale.getShortMonths?i.locale.getShortMonths(o.locale):[]),g=i.getMonth(r),m=C("button",{type:"button",key:"year",onClick:u,tabindex:-1,class:`${n}-year-btn`},[zn(r,{locale:o,format:o.yearFormat,generateConfig:i})]),v=C("button",{type:"button",key:"month",onClick:d,tabindex:-1,class:`${n}-month-btn`},[o.monthFormat?zn(r,{locale:o,format:o.monthFormat,generateConfig:i}):p[g]]),b=o.monthBeforeYear?[v,m]:[m,v];return C(Ba,H(H({},e),{},{prefixCls:h,onSuperPrev:c,onPrev:s,onNext:a,onSuperNext:l}),{default:()=>[b]})}fS.displayName="DateHeader";fS.inheritAttrs=!1;const $te=6;function ef(t){const e=dn(t),{prefixCls:n,panelName:i="date",keyboardConfig:o,active:r,operationRef:a,generateConfig:s,value:l,viewDate:c,onViewDateChange:u,onPanelChange:d,onSelect:f}=e,h=`${n}-${i}-panel`;a.value={onKeydown:m=>kc(m,A({onLeftRight:v=>{f(s.addDate(l||c,v),"key")},onCtrlLeftRight:v=>{f(s.addYear(l||c,v),"key")},onUpDown:v=>{f(s.addDate(l||c,v*Ah),"key")},onPageUpDown:v=>{f(s.addMonth(l||c,v),"key")}},o))};const p=m=>{const v=s.addYear(c,m);u(v),d(null,v)},g=m=>{const v=s.addMonth(c,m);u(v),d(null,v)};return C("div",{class:ce(h,{[`${h}-active`]:r})},[C(fS,H(H({},e),{},{prefixCls:n,value:l,viewDate:c,onPrevYear:()=>{p(-1)},onNextYear:()=>{p(1)},onPrevMonth:()=>{g(-1)},onNextMonth:()=>{g(1)},onMonthClick:()=>{d("month",c)},onYearClick:()=>{d("year",c)}}),null),C(Wm,H(H({},e),{},{onSelect:m=>f(m,"mouse"),prefixCls:n,value:l,viewDate:c,rowCount:$te}),null)])}ef.displayName="DatePanel";ef.inheritAttrs=!1;const q2=yte("date","time");function hS(t){const e=dn(t),{prefixCls:n,operationRef:i,generateConfig:o,value:r,defaultValue:a,disabledTime:s,showTime:l,onSelect:c}=e,u=`${n}-datetime-panel`,d=se(null),f=se({}),h=se({}),p=typeof l=="object"?A({},l):{};function g(y){const w=q2.indexOf(d.value)+y;return q2[w]||null}const m=y=>{h.value.onBlur&&h.value.onBlur(y),d.value=null};i.value={onKeydown:y=>{if(y.which===Te.TAB){const w=g(y.shiftKey?-1:1);return d.value=w,w&&y.preventDefault(),!0}if(d.value){const w=d.value==="date"?f:h;return w.value&&w.value.onKeydown&&w.value.onKeydown(y),!0}return[Te.LEFT,Te.RIGHT,Te.UP,Te.DOWN].includes(y.which)?(d.value="date",!0):!1},onBlur:m,onClose:m};const v=(y,w)=>{let x=y;w==="date"&&!r&&p.defaultValue?(x=o.setHour(x,o.getHour(p.defaultValue)),x=o.setMinute(x,o.getMinute(p.defaultValue)),x=o.setSecond(x,o.getSecond(p.defaultValue))):w==="time"&&!r&&a&&(x=o.setYear(x,o.getYear(a)),x=o.setMonth(x,o.getMonth(a)),x=o.setDate(x,o.getDate(a))),c&&c(x,"mouse")},b=s?s(r||null):{};return C("div",{class:ce(u,{[`${u}-active`]:d.value})},[C(ef,H(H({},e),{},{operationRef:f,active:d.value==="date",onSelect:y=>{v($h(o,y,!r&&typeof l=="object"?l.defaultValue:null),"date")}}),null),C(zm,H(H(H(H({},e),{},{format:void 0},p),b),{},{disabledTime:null,defaultValue:void 0,operationRef:h,active:d.value==="time",onSelect:y=>{v(y,"time")}}),null)])}hS.displayName="DatetimePanel";hS.inheritAttrs=!1;function pS(t){const e=dn(t),{prefixCls:n,generateConfig:i,locale:o,value:r}=e,a=`${n}-cell`,s=u=>C("td",{key:"week",class:ce(a,`${a}-week`)},[i.locale.getWeek(o.locale,u)]),l=`${n}-week-panel-row`,c=u=>ce(l,{[`${l}-selected`]:Y3(i,o.locale,r,u)});return C(ef,H(H({},e),{},{panelName:"week",prefixColumn:s,rowClassName:c,keyboardConfig:{onLeftRight:null}}),null)}pS.displayName="WeekPanel";pS.inheritAttrs=!1;function gS(t){const e=dn(t),{prefixCls:n,generateConfig:i,locale:o,viewDate:r,onNextYear:a,onPrevYear:s,onYearClick:l}=e,{hideHeader:c}=ur();if(c.value)return null;const u=`${n}-header`;return C(Ba,H(H({},e),{},{prefixCls:u,onSuperPrev:s,onSuperNext:a}),{default:()=>[C("button",{type:"button",onClick:l,class:`${n}-year-btn`},[zn(r,{locale:o,format:o.yearFormat,generateConfig:i})])]})}gS.displayName="MonthHeader";gS.inheritAttrs=!1;const J3=3,Ate=4;function mS(t){const e=dn(t),{prefixCls:n,locale:i,value:o,viewDate:r,generateConfig:a,monthCellRender:s}=e,{rangedValue:l,hoverRangedValue:c}=Qd(),u=`${n}-cell`,d=Hm({cellPrefixCls:u,value:o,generateConfig:a,rangedValue:l.value,hoverRangedValue:c.value,isSameCell:(g,m)=>uS(a,g,m),isInView:()=>!0,offsetCell:(g,m)=>a.addMonth(g,m)}),f=i.shortMonths||(a.locale.getShortMonths?a.locale.getShortMonths(i.locale):[]),h=a.setMonth(r,0),p=s?g=>s({current:g,locale:i}):void 0;return C(il,H(H({},e),{},{rowNum:Ate,colNum:J3,baseDate:h,getCellNode:p,getCellText:g=>i.monthFormat?zn(g,{locale:i,format:i.monthFormat,generateConfig:a}):f[a.getMonth(g)],getCellClassName:d,getCellDate:a.addMonth,titleCell:g=>zn(g,{locale:i,format:"YYYY-MM",generateConfig:a})}),null)}mS.displayName="MonthBody";mS.inheritAttrs=!1;function vS(t){const e=dn(t),{prefixCls:n,operationRef:i,onViewDateChange:o,generateConfig:r,value:a,viewDate:s,onPanelChange:l,onSelect:c}=e,u=`${n}-month-panel`;i.value={onKeydown:f=>kc(f,{onLeftRight:h=>{c(r.addMonth(a||s,h),"key")},onCtrlLeftRight:h=>{c(r.addYear(a||s,h),"key")},onUpDown:h=>{c(r.addMonth(a||s,h*J3),"key")},onEnter:()=>{l("date",a||s)}})};const d=f=>{const h=r.addYear(s,f);o(h),l(null,h)};return C("div",{class:u},[C(gS,H(H({},e),{},{prefixCls:n,onPrevYear:()=>{d(-1)},onNextYear:()=>{d(1)},onYearClick:()=>{l("year",s)}}),null),C(mS,H(H({},e),{},{prefixCls:n,onSelect:f=>{c(f,"mouse"),l("date",f)}}),null)])}vS.displayName="MonthPanel";vS.inheritAttrs=!1;function bS(t){const e=dn(t),{prefixCls:n,generateConfig:i,locale:o,viewDate:r,onNextYear:a,onPrevYear:s,onYearClick:l}=e,{hideHeader:c}=ur();if(c.value)return null;const u=`${n}-header`;return C(Ba,H(H({},e),{},{prefixCls:u,onSuperPrev:s,onSuperNext:a}),{default:()=>[C("button",{type:"button",onClick:l,class:`${n}-year-btn`},[zn(r,{locale:o,format:o.yearFormat,generateConfig:i})])]})}bS.displayName="QuarterHeader";bS.inheritAttrs=!1;const _te=4,Pte=1;function yS(t){const e=dn(t),{prefixCls:n,locale:i,value:o,viewDate:r,generateConfig:a}=e,{rangedValue:s,hoverRangedValue:l}=Qd(),c=`${n}-cell`,u=Hm({cellPrefixCls:c,value:o,generateConfig:a,rangedValue:s.value,hoverRangedValue:l.value,isSameCell:(f,h)=>X3(a,f,h),isInView:()=>!0,offsetCell:(f,h)=>a.addMonth(f,h*3)}),d=a.setDate(a.setMonth(r,0),1);return C(il,H(H({},e),{},{rowNum:Pte,colNum:_te,baseDate:d,getCellText:f=>zn(f,{locale:i,format:i.quarterFormat||"[Q]Q",generateConfig:a}),getCellClassName:u,getCellDate:(f,h)=>a.addMonth(f,h*3),titleCell:f=>zn(f,{locale:i,format:"YYYY-[Q]Q",generateConfig:a})}),null)}yS.displayName="QuarterBody";yS.inheritAttrs=!1;function xS(t){const e=dn(t),{prefixCls:n,operationRef:i,onViewDateChange:o,generateConfig:r,value:a,viewDate:s,onPanelChange:l,onSelect:c}=e,u=`${n}-quarter-panel`;i.value={onKeydown:f=>kc(f,{onLeftRight:h=>{c(r.addMonth(a||s,h*3),"key")},onCtrlLeftRight:h=>{c(r.addYear(a||s,h),"key")},onUpDown:h=>{c(r.addYear(a||s,h),"key")}})};const d=f=>{const h=r.addYear(s,f);o(h),l(null,h)};return C("div",{class:u},[C(bS,H(H({},e),{},{prefixCls:n,onPrevYear:()=>{d(-1)},onNextYear:()=>{d(1)},onYearClick:()=>{l("year",s)}}),null),C(yS,H(H({},e),{},{prefixCls:n,onSelect:f=>{c(f,"mouse")}}),null)])}xS.displayName="QuarterPanel";xS.inheritAttrs=!1;function wS(t){const e=dn(t),{prefixCls:n,generateConfig:i,viewDate:o,onPrevDecade:r,onNextDecade:a,onDecadeClick:s}=e,{hideHeader:l}=ur();if(l.value)return null;const c=`${n}-header`,u=i.getYear(o),d=Math.floor(u/xa)*xa,f=d+xa-1;return C(Ba,H(H({},e),{},{prefixCls:c,onSuperPrev:r,onSuperNext:a}),{default:()=>[C("button",{type:"button",onClick:s,class:`${n}-decade-btn`},[d,Qn("-"),f])]})}wS.displayName="YearHeader";wS.inheritAttrs=!1;const Fy=3,Z2=4;function SS(t){const e=dn(t),{prefixCls:n,value:i,viewDate:o,locale:r,generateConfig:a}=e,{rangedValue:s,hoverRangedValue:l}=Qd(),c=`${n}-cell`,u=a.getYear(o),d=Math.floor(u/xa)*xa,f=d+xa-1,h=a.setYear(o,d-Math.ceil((Fy*Z2-xa)/2)),p=m=>{const v=a.getYear(m);return d<=v&&v<=f},g=Hm({cellPrefixCls:c,value:i,generateConfig:a,rangedValue:s.value,hoverRangedValue:l.value,isSameCell:(m,v)=>Bm(a,m,v),isInView:p,offsetCell:(m,v)=>a.addYear(m,v)});return C(il,H(H({},e),{},{rowNum:Z2,colNum:Fy,baseDate:h,getCellText:a.getYear,getCellClassName:g,getCellDate:a.addYear,titleCell:m=>zn(m,{locale:r,format:"YYYY",generateConfig:a})}),null)}SS.displayName="YearBody";SS.inheritAttrs=!1;const xa=10;function CS(t){const e=dn(t),{prefixCls:n,operationRef:i,onViewDateChange:o,generateConfig:r,value:a,viewDate:s,sourceMode:l,onSelect:c,onPanelChange:u}=e,d=`${n}-year-panel`;i.value={onKeydown:h=>kc(h,{onLeftRight:p=>{c(r.addYear(a||s,p),"key")},onCtrlLeftRight:p=>{c(r.addYear(a||s,p*xa),"key")},onUpDown:p=>{c(r.addYear(a||s,p*Fy),"key")},onEnter:()=>{u(l==="date"?"date":"month",a||s)}})};const f=h=>{const p=r.addYear(s,h*10);o(p),u(null,p)};return C("div",{class:d},[C(wS,H(H({},e),{},{prefixCls:n,onPrevDecade:()=>{f(-1)},onNextDecade:()=>{f(1)},onDecadeClick:()=>{u("decade",s)}}),null),C(SS,H(H({},e),{},{prefixCls:n,onSelect:h=>{u(l==="date"?"date":"month",h),c(h,"mouse")}}),null)])}CS.displayName="YearPanel";CS.inheritAttrs=!1;function Q3(t,e,n){return n?C("div",{class:`${t}-footer-extra`},[n(e)]):null}function e4(t){let{prefixCls:e,components:n={},needConfirmButton:i,onNow:o,onOk:r,okDisabled:a,showNow:s,locale:l}=t,c,u;if(i){const d=n.button||"button";o&&s!==!1&&(c=C("li",{class:`${e}-now`},[C("a",{class:`${e}-now-btn`,onClick:o},[l.now])])),u=i&&C("li",{class:`${e}-ok`},[C(d,{disabled:a,onClick:f=>{f.stopPropagation(),r&&r()}},{default:()=>[l.ok]})])}return!c&&!u?null:C("ul",{class:`${e}-ranges`},[c,u])}function Tte(){return oe({name:"PickerPanel",inheritAttrs:!1,props:{prefixCls:String,locale:Object,generateConfig:Object,value:Object,defaultValue:Object,pickerValue:Object,defaultPickerValue:Object,disabledDate:Function,mode:String,picker:{type:String,default:"date"},tabindex:{type:[Number,String],default:0},showNow:{type:Boolean,default:void 0},showTime:[Boolean,Object],showToday:Boolean,renderExtraFooter:Function,dateRender:Function,hideHeader:{type:Boolean,default:void 0},onSelect:Function,onChange:Function,onPanelChange:Function,onMousedown:Function,onPickerValueChange:Function,onOk:Function,components:Object,direction:String,hourStep:{type:Number,default:1},minuteStep:{type:Number,default:1},secondStep:{type:Number,default:1}},setup(t,e){let{attrs:n}=e;const i=L(()=>t.picker==="date"&&!!t.showTime||t.picker==="time"),o=L(()=>24%t.hourStep===0),r=L(()=>60%t.minuteStep===0),a=L(()=>60%t.secondStep===0),s=ur(),{operationRef:l,onSelect:c,hideRanges:u,defaultOpenValue:d}=s,{inRange:f,panelPosition:h,rangedValue:p,hoverRangedValue:g}=Qd(),m=se({}),[v,b]=jt(null,{value:Ue(t,"value"),defaultValue:t.defaultValue,postState:D=>!D&&(d!=null&&d.value)&&t.picker==="time"?d.value:D}),[y,w]=jt(null,{value:Ue(t,"pickerValue"),defaultValue:t.defaultPickerValue||v.value,postState:D=>{const{generateConfig:F,showTime:N,defaultValue:B}=t,z=F.getNow();return D?!v.value&&t.showTime?typeof N=="object"?$h(F,Array.isArray(D)?D[0]:D,N.defaultValue||z):B?$h(F,Array.isArray(D)?D[0]:D,B):$h(F,Array.isArray(D)?D[0]:D,z):D:z}}),x=D=>{w(D),t.onPickerValueChange&&t.onPickerValueChange(D)},$=D=>{const F=gte[t.picker];return F?F(D):D},[S,_]=jt(()=>t.picker==="time"?"time":$("date"),{value:Ue(t,"mode")});ye(()=>t.picker,()=>{_(t.picker)});const P=se(S.value),O=D=>{P.value=D},T=(D,F)=>{const{onPanelChange:N,generateConfig:B}=t,z=$(D||S.value);O(S.value),_(z),N&&(S.value!==z||Kl(B,y.value,y.value))&&N(F,z)},M=function(D,F){let N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{picker:B,generateConfig:z,onSelect:W,onChange:j,disabledDate:U}=t;(S.value===B||N)&&(b(D),W&&W(D),c&&c(D,F),j&&!Kl(z,D,v.value)&&!(U!=null&&U(D))&&j(D))},I=D=>m.value&&m.value.onKeydown?([Te.LEFT,Te.RIGHT,Te.UP,Te.DOWN,Te.PAGE_UP,Te.PAGE_DOWN,Te.ENTER].includes(D.which)&&D.preventDefault(),m.value.onKeydown(D)):!1,k=D=>{m.value&&m.value.onBlur&&m.value.onBlur(D)},E=()=>{const{generateConfig:D,hourStep:F,minuteStep:N,secondStep:B}=t,z=D.getNow(),W=ate(D.getHour(z),D.getMinute(z),D.getSecond(z),o.value?F:1,r.value?N:1,a.value?B:1),j=H3(D,z,W[0],W[1],W[2]);M(j,"submit")},R=L(()=>{const{prefixCls:D,direction:F}=t;return ce(`${D}-panel`,{[`${D}-panel-has-range`]:p&&p.value&&p.value[0]&&p.value[1],[`${D}-panel-has-range-hover`]:g&&g.value&&g.value[0]&&g.value[1],[`${D}-panel-rtl`]:F==="rtl"})});return aS(A(A({},s),{mode:S,hideHeader:L(()=>{var D;return t.hideHeader!==void 0?t.hideHeader:(D=s.hideHeader)===null||D===void 0?void 0:D.value}),hidePrevBtn:L(()=>f.value&&h.value==="right"),hideNextBtn:L(()=>f.value&&h.value==="left")})),ye(()=>t.value,()=>{t.value&&w(t.value)}),()=>{const{prefixCls:D="ant-picker",locale:F,generateConfig:N,disabledDate:B,picker:z="date",tabindex:W=0,showNow:j,showTime:U,showToday:V,renderExtraFooter:q,onMousedown:Y,onOk:J,components:Q}=t;l&&h.value!=="right"&&(l.value={onKeydown:I,onClose:()=>{m.value&&m.value.onClose&&m.value.onClose()}});let G;const ee=A(A(A({},n),t),{operationRef:m,prefixCls:D,viewDate:y.value,value:v.value,onViewDateChange:x,sourceMode:P.value,onPanelChange:T,disabledDate:B});switch(delete ee.onChange,delete ee.onSelect,S.value){case"decade":G=C(cS,H(H({},ee),{},{onSelect:(ue,ae)=>{x(ue),M(ue,ae)}}),null);break;case"year":G=C(CS,H(H({},ee),{},{onSelect:(ue,ae)=>{x(ue),M(ue,ae)}}),null);break;case"month":G=C(vS,H(H({},ee),{},{onSelect:(ue,ae)=>{x(ue),M(ue,ae)}}),null);break;case"quarter":G=C(xS,H(H({},ee),{},{onSelect:(ue,ae)=>{x(ue),M(ue,ae)}}),null);break;case"week":G=C(pS,H(H({},ee),{},{onSelect:(ue,ae)=>{x(ue),M(ue,ae)}}),null);break;case"time":delete ee.showTime,G=C(zm,H(H(H({},ee),typeof U=="object"?U:null),{},{onSelect:(ue,ae)=>{x(ue),M(ue,ae)}}),null);break;default:U?G=C(hS,H(H({},ee),{},{onSelect:(ue,ae)=>{x(ue),M(ue,ae)}}),null):G=C(ef,H(H({},ee),{},{onSelect:(ue,ae)=>{x(ue),M(ue,ae)}}),null)}let X,K;u!=null&&u.value||(X=Q3(D,S.value,q),K=e4({prefixCls:D,components:Q,needConfirmButton:i.value,okDisabled:!v.value||B&&B(v.value),locale:F,showNow:j,onNow:i.value&&E,onOk:()=>{v.value&&(M(v.value,"submit",!0),J&&J(v.value))}}));let te;if(V&&S.value==="date"&&z==="date"&&!U){const ue=N.getNow(),ae=`${D}-today-btn`,re=B&&B(ue);te=C("a",{class:ce(ae,re&&`${ae}-disabled`),"aria-disabled":re,onClick:()=>{re||M(ue,"mouse",!0)}},[F.today])}return C("div",{tabindex:W,class:ce(R.value,n.class),style:n.style,onKeydown:I,onBlur:k,onMousedown:Y},[G,X||K||te?C("div",{class:`${D}-footer`},[X,K,te]):null])}}})}const Ote=Tte(),$S=t=>C(Ote,t),Ete={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}}};function t4(t,e){let{slots:n}=e;const{prefixCls:i,popupStyle:o,visible:r,dropdownClassName:a,dropdownAlign:s,transitionName:l,getPopupContainer:c,range:u,popupPlacement:d,direction:f}=dn(t),h=`${i}-dropdown`;return C(tl,{showAction:[],hideAction:[],popupPlacement:d!==void 0?d:f==="rtl"?"bottomRight":"bottomLeft",builtinPlacements:Ete,prefixCls:h,popupTransitionName:l,popupAlign:s,popupVisible:r,popupClassName:ce(a,{[`${h}-range`]:u,[`${h}-rtl`]:f==="rtl"}),popupStyle:o,getPopupContainer:c},{default:n.default,popup:n.popupElement})}const n4=oe({name:"PresetPanel",props:{prefixCls:String,presets:{type:Array,default:()=>[]},onClick:Function,onHover:Function},setup(t){return()=>t.presets.length?C("div",{class:`${t.prefixCls}-presets`},[C("ul",null,[t.presets.map((e,n)=>{let{label:i,value:o}=e;return C("li",{key:n,onClick:r=>{r.stopPropagation(),t.onClick(o)},onMouseenter:()=>{var r;(r=t.onHover)===null||r===void 0||r.call(t,o)},onMouseleave:()=>{var r;(r=t.onHover)===null||r===void 0||r.call(t,null)}},[i])})])]):null}});function Ny(t){let{open:e,value:n,isClickOutside:i,triggerOpen:o,forwardKeydown:r,onKeydown:a,blurToCancel:s,onSubmit:l,onCancel:c,onFocus:u,onBlur:d}=t;const f=ie(!1),h=ie(!1),p=ie(!1),g=ie(!1),m=ie(!1),v=L(()=>({onMousedown:()=>{f.value=!0,o(!0)},onKeydown:y=>{if(a(y,()=>{m.value=!0}),!m.value){switch(y.which){case Te.ENTER:{e.value?l()!==!1&&(f.value=!0):o(!0),y.preventDefault();return}case Te.TAB:{f.value&&e.value&&!y.shiftKey?(f.value=!1,y.preventDefault()):!f.value&&e.value&&!r(y)&&y.shiftKey&&(f.value=!0,y.preventDefault());return}case Te.ESC:{f.value=!0,c();return}}!e.value&&![Te.SHIFT].includes(y.which)?o(!0):f.value||r(y)}},onFocus:y=>{f.value=!0,h.value=!0,u&&u(y)},onBlur:y=>{if(p.value||!i(document.activeElement)){p.value=!1;return}s.value?setTimeout(()=>{let{activeElement:w}=document;for(;w&&w.shadowRoot;)w=w.shadowRoot.activeElement;i(w)&&c()},0):e.value&&(o(!1),g.value&&l()),h.value=!1,d&&d(y)}}));ye(e,()=>{g.value=!1}),ye(n,()=>{g.value=!0});const b=ie();return Ze(()=>{b.value=cte(y=>{const w=ute(y);if(e.value){const x=i(w);x?(!h.value||x)&&o(!1):(p.value=!0,lt(()=>{p.value=!1}))}})}),at(()=>{b.value&&b.value()}),[v,{focused:h,typing:f}]}function By(t){let{valueTexts:e,onTextChange:n}=t;const i=se("");function o(a){i.value=a,n(a)}function r(){i.value=e.value[0]}return ye(()=>[...e.value],function(a){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];a.join("||")!==s.join("||")&&e.value.every(l=>l!==i.value)&&r()},{immediate:!0}),[i,o,r]}function tg(t,e){let{formatList:n,generateConfig:i,locale:o}=e;const r=C1(()=>{if(!t.value)return[[""],""];let l="";const c=[];for(let u=0;uc[0]!==l[0]||!Al(c[1],l[1])),a=L(()=>r.value[0]),s=L(()=>r.value[1]);return[a,s]}function zy(t,e){let{formatList:n,generateConfig:i,locale:o}=e;const r=se(null);let a;function s(d){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(lt.cancel(a),f){r.value=d;return}a=lt(()=>{r.value=d})}const[,l]=tg(r,{formatList:n,generateConfig:i,locale:o});function c(d){s(d)}function u(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;s(null,d)}return ye(t,()=>{u(!0)}),at(()=>{lt.cancel(a)}),[l,c,u]}function i4(t,e){return L(()=>t!=null&&t.value?t.value:e!=null&&e.value?(Yw(!1,"`ranges` is deprecated. Please use `presets` instead."),Object.keys(e.value).map(i=>{const o=e.value[i],r=typeof o=="function"?o():o;return{label:i,value:r}})):[])}function Mte(){return oe({name:"Picker",inheritAttrs:!1,props:["prefixCls","id","tabindex","dropdownClassName","dropdownAlign","popupStyle","transitionName","generateConfig","locale","inputReadOnly","allowClear","autofocus","showTime","showNow","showHour","showMinute","showSecond","picker","format","use12Hours","value","defaultValue","open","defaultOpen","defaultOpenValue","suffixIcon","presets","clearIcon","disabled","disabledDate","placeholder","getPopupContainer","panelRender","inputRender","onChange","onOpenChange","onPanelChange","onFocus","onBlur","onMousedown","onMouseup","onMouseenter","onMouseleave","onContextmenu","onClick","onKeydown","onSelect","direction","autocomplete","showToday","renderExtraFooter","dateRender","minuteStep","hourStep","secondStep","hideDisabledOptions"],setup(t,e){let{attrs:n,expose:i}=e;const o=se(null),r=L(()=>t.presets),a=i4(r),s=L(()=>{var B;return(B=t.picker)!==null&&B!==void 0?B:"date"}),l=L(()=>s.value==="date"&&!!t.showTime||s.value==="time"),c=L(()=>U3(W3(t.format,s.value,t.showTime,t.use12Hours))),u=se(null),d=se(null),f=se(null),[h,p]=jt(null,{value:Ue(t,"value"),defaultValue:t.defaultValue}),g=se(h.value),m=B=>{g.value=B},v=se(null),[b,y]=jt(!1,{value:Ue(t,"open"),defaultValue:t.defaultOpen,postState:B=>t.disabled?!1:B,onChange:B=>{t.onOpenChange&&t.onOpenChange(B),!B&&v.value&&v.value.onClose&&v.value.onClose()}}),[w,x]=tg(g,{formatList:c,generateConfig:Ue(t,"generateConfig"),locale:Ue(t,"locale")}),[$,S,_]=By({valueTexts:w,onTextChange:B=>{const z=G3(B,{locale:t.locale,formatList:c.value,generateConfig:t.generateConfig});z&&(!t.disabledDate||!t.disabledDate(z))&&m(z)}}),P=B=>{const{onChange:z,generateConfig:W,locale:j}=t;m(B),p(B),z&&!Kl(W,h.value,B)&&z(B,B?zn(B,{generateConfig:W,locale:j,format:c.value[0]}):"")},O=B=>{t.disabled&&B||y(B)},T=B=>b.value&&v.value&&v.value.onKeydown?v.value.onKeydown(B):!1,M=function(){t.onMouseup&&t.onMouseup(...arguments),o.value&&(o.value.focus(),O(!0))},[I,{focused:k,typing:E}]=Ny({blurToCancel:l,open:b,value:$,triggerOpen:O,forwardKeydown:T,isClickOutside:B=>!V3([u.value,d.value,f.value],B),onSubmit:()=>!g.value||t.disabledDate&&t.disabledDate(g.value)?!1:(P(g.value),O(!1),_(),!0),onCancel:()=>{O(!1),m(h.value),_()},onKeydown:(B,z)=>{var W;(W=t.onKeydown)===null||W===void 0||W.call(t,B,z)},onFocus:B=>{var z;(z=t.onFocus)===null||z===void 0||z.call(t,B)},onBlur:B=>{var z;(z=t.onBlur)===null||z===void 0||z.call(t,B)}});ye([b,w],()=>{b.value||(m(h.value),!w.value.length||w.value[0]===""?S(""):x.value!==$.value&&_())}),ye(s,()=>{b.value||_()}),ye(h,()=>{m(h.value)});const[R,D,F]=zy($,{formatList:c,generateConfig:Ue(t,"generateConfig"),locale:Ue(t,"locale")}),N=(B,z)=>{(z==="submit"||z!=="key"&&!l.value)&&(P(B),O(!1))};return aS({operationRef:v,hideHeader:L(()=>s.value==="time"),onSelect:N,open:b,defaultOpenValue:Ue(t,"defaultOpenValue"),onDateMouseenter:D,onDateMouseleave:F}),i({focus:()=>{o.value&&o.value.focus()},blur:()=>{o.value&&o.value.blur()}}),()=>{const{prefixCls:B="rc-picker",id:z,tabindex:W,dropdownClassName:j,dropdownAlign:U,popupStyle:V,transitionName:q,generateConfig:Y,locale:J,inputReadOnly:Q,allowClear:G,autofocus:ee,picker:X="date",defaultOpenValue:K,suffixIcon:te,clearIcon:ue,disabled:ae,placeholder:re,getPopupContainer:ne,panelRender:le,onMousedown:he,onMouseenter:pe,onMouseleave:ge,onContextmenu:be,onClick:$e,onSelect:fe,direction:de,autocomplete:xe="off"}=t,_e=A(A(A({},t),n),{class:ce({[`${B}-panel-focused`]:!E.value}),style:void 0,pickerValue:void 0,onPickerValueChange:void 0,onChange:null});let Oe=C("div",{class:`${B}-panel-layout`},[C(n4,{prefixCls:B,presets:a.value,onClick:De=>{P(De),O(!1)}},null),C($S,H(H({},_e),{},{generateConfig:Y,value:g.value,locale:J,tabindex:-1,onSelect:De=>{fe==null||fe(De),m(De)},direction:de,onPanelChange:(De,je)=>{const{onPanelChange:ft}=t;F(!0),ft==null||ft(De,je)}}),null)]);le&&(Oe=le(Oe));const Re=C("div",{class:`${B}-panel-container`,ref:u,onMousedown:De=>{De.preventDefault()}},[Oe]);let Se;te&&(Se=C("span",{class:`${B}-suffix`},[te]));let Ae;G&&h.value&&!ae&&(Ae=C("span",{onMousedown:De=>{De.preventDefault(),De.stopPropagation()},onMouseup:De=>{De.preventDefault(),De.stopPropagation(),P(null),O(!1)},class:`${B}-clear`,role:"button"},[ue||C("span",{class:`${B}-clear-btn`},null)]));const Pe=A(A(A(A({id:z,tabindex:W,disabled:ae,readonly:Q||typeof c.value[0]=="function"||!E.value,value:R.value||$.value,onInput:De=>{S(De.target.value)},autofocus:ee,placeholder:re,ref:o,title:$.value},I.value),{size:j3(X,c.value[0],Y)}),q3(t)),{autocomplete:xe}),ke=t.inputRender?t.inputRender(Pe):C("input",Pe,null),Le=de==="rtl"?"bottomRight":"bottomLeft";return C("div",{ref:f,class:ce(B,n.class,{[`${B}-disabled`]:ae,[`${B}-focused`]:k.value,[`${B}-rtl`]:de==="rtl"}),style:n.style,onMousedown:he,onMouseup:M,onMouseenter:pe,onMouseleave:ge,onContextmenu:be,onClick:$e},[C("div",{class:ce(`${B}-input`,{[`${B}-input-placeholder`]:!!R.value}),ref:d},[ke,Se,Ae]),C(t4,{visible:b.value,popupStyle:V,prefixCls:B,dropdownClassName:j,dropdownAlign:U,getPopupContainer:ne,transitionName:q,popupPlacement:Le,direction:de},{default:()=>[C("div",{style:{pointerEvents:"none",position:"absolute",top:0,bottom:0,left:0,right:0}},null)],popupElement:()=>Re})])}}})}const Ite=Mte();function kte(t,e){let{picker:n,locale:i,selectedValue:o,disabledDate:r,disabled:a,generateConfig:s}=t;const l=L(()=>It(o.value,0)),c=L(()=>It(o.value,1));function u(g){return s.value.locale.getWeekFirstDate(i.value.locale,g)}function d(g){const m=s.value.getYear(g),v=s.value.getMonth(g);return m*100+v}function f(g){const m=s.value.getYear(g),v=Ry(s.value,g);return m*10+v}return[g=>{var m;if(r&&(!((m=r==null?void 0:r.value)===null||m===void 0)&&m.call(r,g)))return!0;if(a[1]&&c)return!Er(s.value,g,c.value)&&s.value.isAfter(g,c.value);if(e.value[1]&&c.value)switch(n.value){case"quarter":return f(g)>f(c.value);case"month":return d(g)>d(c.value);case"week":return u(g)>u(c.value);default:return!Er(s.value,g,c.value)&&s.value.isAfter(g,c.value)}return!1},g=>{var m;if(!((m=r.value)===null||m===void 0)&&m.call(r,g))return!0;if(a[0]&&l)return!Er(s.value,g,c.value)&&s.value.isAfter(l.value,g);if(e.value[0]&&l.value)switch(n.value){case"quarter":return f(g)mte(i,a,s));case"quarter":case"month":return r((a,s)=>Bm(i,a,s));default:return r((a,s)=>uS(i,a,s))}}function Rte(t,e,n,i){const o=It(t,0),r=It(t,1);if(e===0)return o;if(o&&r)switch(Dte(o,r,n,i)){case"same":return o;case"closing":return o;default:return Nu(r,n,i,-1)}return o}function Lte(t){let{values:e,picker:n,defaultDates:i,generateConfig:o}=t;const r=se([It(i,0),It(i,1)]),a=se(null),s=L(()=>It(e.value,0)),l=L(()=>It(e.value,1)),c=h=>r.value[h]?r.value[h]:It(a.value,h)||Rte(e.value,h,n.value,o.value)||s.value||l.value||o.value.getNow(),u=se(null),d=se(null);Ke(()=>{u.value=c(0),d.value=c(1)});function f(h,p){if(h){let g=oo(a.value,h,p);r.value=oo(r.value,null,p)||[null,null];const m=(p+1)%2;It(e.value,m)||(g=oo(g,h,m)),a.value=g}else(s.value||l.value)&&(a.value=null)}return[u,d,f]}function o4(t){return yw()?(fI(t),!0):!1}function Fte(t){return typeof t=="function"?t():Yt(t)}function AS(t){var e;const n=Fte(t);return(e=n==null?void 0:n.$el)!==null&&e!==void 0?e:n}function Nte(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;Cn()?Ze(t):e?t():pt(t)}function r4(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=ie(),i=()=>n.value=!!t();return i(),Nte(i,e),n}var Ab;const a4=typeof window<"u";a4&&(!((Ab=window==null?void 0:window.navigator)===null||Ab===void 0)&&Ab.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);const s4=a4?window:void 0;var Bte=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o2&&arguments[2]!==void 0?arguments[2]:{};const{window:i=s4}=n,o=Bte(n,["window"]);let r;const a=r4(()=>i&&"ResizeObserver"in i),s=()=>{r&&(r.disconnect(),r=void 0)},l=ye(()=>AS(t),u=>{s(),a.value&&i&&u&&(r=new ResizeObserver(e),r.observe(u,o))},{immediate:!0,flush:"post"}),c=()=>{s(),l()};return o4(c),{isSupported:a,stop:c}}function eu(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{width:0,height:0},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{box:i="content-box"}=n,o=ie(e.width),r=ie(e.height);return zte(t,a=>{let[s]=a;const l=i==="border-box"?s.borderBoxSize:i==="content-box"?s.contentBoxSize:s.devicePixelContentBoxSize;l?(o.value=l.reduce((c,u)=>{let{inlineSize:d}=u;return c+d},0),r.value=l.reduce((c,u)=>{let{blockSize:d}=u;return c+d},0)):(o.value=s.contentRect.width,r.value=s.contentRect.height)},n),ye(()=>AS(t),a=>{o.value=a?e.width:0,r.value=a?e.height:0}),{width:o,height:r}}function J2(t,e){return t&&t[0]&&t[1]&&e.isAfter(t[0],t[1])?[t[1],t[0]]:t}function Q2(t,e,n,i){return!!(t||i&&i[e]||n[(e+1)%2])}function Hte(){return oe({name:"RangerPicker",inheritAttrs:!1,props:["prefixCls","id","popupStyle","dropdownClassName","transitionName","dropdownAlign","getPopupContainer","generateConfig","locale","placeholder","autofocus","disabled","format","picker","showTime","showNow","showHour","showMinute","showSecond","use12Hours","separator","value","defaultValue","defaultPickerValue","open","defaultOpen","disabledDate","disabledTime","dateRender","panelRender","ranges","allowEmpty","allowClear","suffixIcon","clearIcon","pickerRef","inputReadOnly","mode","renderExtraFooter","onChange","onOpenChange","onPanelChange","onCalendarChange","onFocus","onBlur","onMousedown","onMouseup","onMouseenter","onMouseleave","onClick","onOk","onKeydown","components","order","direction","activePickerIndex","autocomplete","minuteStep","hourStep","secondStep","hideDisabledOptions","disabledMinutes","presets","prevIcon","nextIcon","superPrevIcon","superNextIcon"],setup(t,e){let{attrs:n,expose:i}=e;const o=L(()=>t.picker==="date"&&!!t.showTime||t.picker==="time"),r=L(()=>t.presets),a=L(()=>t.ranges),s=i4(r,a),l=se({}),c=se(null),u=se(null),d=se(null),f=se(null),h=se(null),p=se(null),g=se(null),m=se(null),v=L(()=>U3(W3(t.format,t.picker,t.showTime,t.use12Hours))),[b,y]=jt(0,{value:Ue(t,"activePickerIndex")}),w=se(null),x=L(()=>{const{disabled:Ie}=t;return Array.isArray(Ie)?Ie:[Ie||!1,Ie||!1]}),[$,S]=jt(null,{value:Ue(t,"value"),defaultValue:t.defaultValue,postState:Ie=>t.picker==="time"&&!t.order?Ie:J2(Ie,t.generateConfig)}),[_,P,O]=Lte({values:$,picker:Ue(t,"picker"),defaultDates:t.defaultPickerValue,generateConfig:Ue(t,"generateConfig")}),[T,M]=jt($.value,{postState:Ie=>{let st=Ie;if(x.value[0]&&x.value[1])return st;for(let tt=0;tt<2;tt+=1)x.value[tt]&&!It(st,tt)&&!It(t.allowEmpty,tt)&&(st=oo(st,t.generateConfig.getNow(),tt));return st}}),[I,k]=jt([t.picker,t.picker],{value:Ue(t,"mode")});ye(()=>t.picker,()=>{k([t.picker,t.picker])});const E=(Ie,st)=>{var tt;k(Ie),(tt=t.onPanelChange)===null||tt===void 0||tt.call(t,st,Ie)},[R,D]=kte({picker:Ue(t,"picker"),selectedValue:T,locale:Ue(t,"locale"),disabled:x,disabledDate:Ue(t,"disabledDate"),generateConfig:Ue(t,"generateConfig")},l),[F,N]=jt(!1,{value:Ue(t,"open"),defaultValue:t.defaultOpen,postState:Ie=>x.value[b.value]?!1:Ie,onChange:Ie=>{var st;(st=t.onOpenChange)===null||st===void 0||st.call(t,Ie),!Ie&&w.value&&w.value.onClose&&w.value.onClose()}}),B=L(()=>F.value&&b.value===0),z=L(()=>F.value&&b.value===1),W=se(0),j=se(0),U=se(0),{width:V}=eu(c);ye([F,V],()=>{!F.value&&c.value&&(U.value=V.value)});const{width:q}=eu(u),{width:Y}=eu(m),{width:J}=eu(d),{width:Q}=eu(h);ye([b,F,q,Y,J,Q,()=>t.direction],()=>{j.value=0,b.value?d.value&&h.value&&(j.value=J.value+Q.value,q.value&&Y.value&&j.value>q.value-Y.value-(t.direction==="rtl"||m.value.offsetLeft>j.value?0:m.value.offsetLeft)&&(W.value=j.value)):b.value===0&&(W.value=0)},{immediate:!0});const G=se();function ee(Ie,st){if(Ie)clearTimeout(G.value),l.value[st]=!0,y(st),N(Ie),F.value||O(null,st);else if(b.value===st){N(Ie);const tt=l.value;G.value=setTimeout(()=>{tt===l.value&&(l.value={})})}}function X(Ie){ee(!0,Ie),setTimeout(()=>{const st=[p,g][Ie];st.value&&st.value.focus()},0)}function K(Ie,st){let tt=Ie,Lt=It(tt,0),xn=It(tt,1);const{generateConfig:rn,locale:Ci,picker:Ln,order:jo,onCalendarChange:Ii,allowEmpty:Ji,onChange:Ut,showTime:Co}=t;Lt&&xn&&rn.isAfter(Lt,xn)&&(Ln==="week"&&!Y3(rn,Ci.locale,Lt,xn)||Ln==="quarter"&&!X3(rn,Lt,xn)||Ln!=="week"&&Ln!=="quarter"&&Ln!=="time"&&!(Co?Kl(rn,Lt,xn):Er(rn,Lt,xn))?(st===0?(tt=[Lt,null],xn=null):(Lt=null,tt=[null,xn]),l.value={[st]:!0}):(Ln!=="time"||jo!==!1)&&(tt=J2(tt,rn))),M(tt);const Qi=tt&&tt[0]?zn(tt[0],{generateConfig:rn,locale:Ci,format:v.value[0]}):"",Ur=tt&&tt[1]?zn(tt[1],{generateConfig:rn,locale:Ci,format:v.value[0]}):"";Ii&&Ii(tt,[Qi,Ur],{range:st===0?"start":"end"});const qr=Q2(Lt,0,x.value,Ji),$o=Q2(xn,1,x.value,Ji);(tt===null||qr&&$o)&&(S(tt),Ut&&(!Kl(rn,It($.value,0),Lt)||!Kl(rn,It($.value,1),xn))&&Ut(tt,[Qi,Ur]));let Ao=null;st===0&&!x.value[1]?Ao=1:st===1&&!x.value[0]&&(Ao=0),Ao!==null&&Ao!==b.value&&(!l.value[Ao]||!It(tt,Ao))&&It(tt,st)?X(Ao):ee(!1,st)}const te=Ie=>F&&w.value&&w.value.onKeydown?w.value.onKeydown(Ie):!1,ue={formatList:v,generateConfig:Ue(t,"generateConfig"),locale:Ue(t,"locale")},[ae,re]=tg(L(()=>It(T.value,0)),ue),[ne,le]=tg(L(()=>It(T.value,1)),ue),he=(Ie,st)=>{const tt=G3(Ie,{locale:t.locale,formatList:v.value,generateConfig:t.generateConfig});tt&&!(st===0?R:D)(tt)&&(M(oo(T.value,tt,st)),O(tt,st))},[pe,ge,be]=By({valueTexts:ae,onTextChange:Ie=>he(Ie,0)}),[$e,fe,de]=By({valueTexts:ne,onTextChange:Ie=>he(Ie,1)}),[xe,_e]=Mt(null),[Oe,Re]=Mt(null),[Se,Ae,Pe]=zy(pe,ue),[ke,Le,De]=zy($e,ue),je=Ie=>{Re(oo(T.value,Ie,b.value)),b.value===0?Ae(Ie):Le(Ie)},ft=()=>{Re(oo(T.value,null,b.value)),b.value===0?Pe():De()},_t=(Ie,st)=>({forwardKeydown:te,onBlur:tt=>{var Lt;(Lt=t.onBlur)===null||Lt===void 0||Lt.call(t,tt)},isClickOutside:tt=>!V3([u.value,d.value,f.value,c.value],tt),onFocus:tt=>{var Lt;y(Ie),(Lt=t.onFocus)===null||Lt===void 0||Lt.call(t,tt)},triggerOpen:tt=>{ee(tt,Ie)},onSubmit:()=>{if(!T.value||t.disabledDate&&t.disabledDate(T.value[Ie]))return!1;K(T.value,Ie),st()},onCancel:()=>{ee(!1,Ie),M($.value),st()}}),[yt,{focused:Pt,typing:Et}]=Ny(A(A({},_t(0,be)),{blurToCancel:o,open:B,value:pe,onKeydown:(Ie,st)=>{var tt;(tt=t.onKeydown)===null||tt===void 0||tt.call(t,Ie,st)}})),[fn,{focused:yn,typing:$n}]=Ny(A(A({},_t(1,de)),{blurToCancel:o,open:z,value:$e,onKeydown:(Ie,st)=>{var tt;(tt=t.onKeydown)===null||tt===void 0||tt.call(t,Ie,st)}})),on=Ie=>{var st;(st=t.onClick)===null||st===void 0||st.call(t,Ie),!F.value&&!p.value.contains(Ie.target)&&!g.value.contains(Ie.target)&&(x.value[0]?x.value[1]||X(1):X(0))},Yn=Ie=>{var st;(st=t.onMousedown)===null||st===void 0||st.call(t,Ie),F.value&&(Pt.value||yn.value)&&!p.value.contains(Ie.target)&&!g.value.contains(Ie.target)&&Ie.preventDefault()},wi=L(()=>{var Ie;return!((Ie=$.value)===null||Ie===void 0)&&Ie[0]?zn($.value[0],{locale:t.locale,format:"YYYYMMDDHHmmss",generateConfig:t.generateConfig}):""}),Zi=L(()=>{var Ie;return!((Ie=$.value)===null||Ie===void 0)&&Ie[1]?zn($.value[1],{locale:t.locale,format:"YYYYMMDDHHmmss",generateConfig:t.generateConfig}):""});ye([F,ae,ne],()=>{F.value||(M($.value),!ae.value.length||ae.value[0]===""?ge(""):re.value!==pe.value&&be(),!ne.value.length||ne.value[0]===""?fe(""):le.value!==$e.value&&de())}),ye([wi,Zi],()=>{M($.value)}),i({focus:()=>{p.value&&p.value.focus()},blur:()=>{p.value&&p.value.blur(),g.value&&g.value.blur()}});const So=L(()=>F.value&&Oe.value&&Oe.value[0]&&Oe.value[1]&&t.generateConfig.isAfter(Oe.value[1],Oe.value[0])?Oe.value:null);function Si(){let Ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,st=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{generateConfig:tt,showTime:Lt,dateRender:xn,direction:rn,disabledTime:Ci,prefixCls:Ln,locale:jo}=t;let Ii=Lt;if(Lt&&typeof Lt=="object"&&Lt.defaultValue){const Ut=Lt.defaultValue;Ii=A(A({},Lt),{defaultValue:It(Ut,b.value)||void 0})}let Ji=null;return xn&&(Ji=Ut=>{let{current:Co,today:Qi}=Ut;return xn({current:Co,today:Qi,info:{range:b.value?"end":"start"}})}),C(Cte,{value:{inRange:!0,panelPosition:Ie,rangedValue:xe.value||T.value,hoverRangedValue:So.value}},{default:()=>[C($S,H(H(H({},t),st),{},{dateRender:Ji,showTime:Ii,mode:I.value[b.value],generateConfig:tt,style:void 0,direction:rn,disabledDate:b.value===0?R:D,disabledTime:Ut=>Ci?Ci(Ut,b.value===0?"start":"end"):!1,class:ce({[`${Ln}-panel-focused`]:b.value===0?!Et.value:!$n.value}),value:It(T.value,b.value),locale:jo,tabIndex:-1,onPanelChange:(Ut,Co)=>{b.value===0&&Pe(!0),b.value===1&&De(!0),E(oo(I.value,Co,b.value),oo(T.value,Ut,b.value));let Qi=Ut;Ie==="right"&&I.value[b.value]===Co&&(Qi=Nu(Qi,Co,tt,-1)),O(Qi,b.value)},onOk:null,onSelect:void 0,onChange:void 0,defaultValue:b.value===0?It(T.value,1):It(T.value,0)}),null)]})}const za=(Ie,st)=>{const tt=oo(T.value,Ie,b.value);st==="submit"||st!=="key"&&!o.value?(K(tt,b.value),b.value===0?Pe():De()):M(tt)};return aS({operationRef:w,hideHeader:L(()=>t.picker==="time"),onDateMouseenter:je,onDateMouseleave:ft,hideRanges:L(()=>!0),onSelect:za,open:F}),()=>{const{prefixCls:Ie="rc-picker",id:st,popupStyle:tt,dropdownClassName:Lt,transitionName:xn,dropdownAlign:rn,getPopupContainer:Ci,generateConfig:Ln,locale:jo,placeholder:Ii,autofocus:Ji,picker:Ut="date",showTime:Co,separator:Qi="~",disabledDate:Ur,panelRender:qr,allowClear:$o,suffixIcon:ll,clearIcon:Ao,inputReadOnly:Ev,renderExtraFooter:D8,onMouseenter:R8,onMouseleave:L8,onMouseup:F8,onOk:x$,components:N8,direction:Vc,autocomplete:w$="off"}=t,B8=Vc==="rtl"?{right:`${j.value}px`}:{left:`${j.value}px`};function z8(){let $i;const Zr=Q3(Ie,I.value[b.value],D8),A$=e4({prefixCls:Ie,components:N8,needConfirmButton:o.value,okDisabled:!It(T.value,b.value)||Ur&&Ur(T.value[b.value]),locale:jo,onOk:()=>{It(T.value,b.value)&&(K(T.value,b.value),x$&&x$(T.value))}});if(Ut!=="time"&&!Co){const Jr=b.value===0?_.value:P.value,j8=Nu(Jr,Ut,Ln),Dv=I.value[b.value]===Ut,_$=Si(Dv?"left":!1,{pickerValue:Jr,onPickerValueChange:Rv=>{O(Rv,b.value)}}),P$=Si("right",{pickerValue:j8,onPickerValueChange:Rv=>{O(Nu(Rv,Ut,Ln,-1),b.value)}});Vc==="rtl"?$i=C(Qe,null,[P$,Dv&&_$]):$i=C(Qe,null,[_$,Dv&&P$])}else $i=Si();let kv=C("div",{class:`${Ie}-panel-layout`},[C(n4,{prefixCls:Ie,presets:s.value,onClick:Jr=>{K(Jr,null),ee(!1,b.value)},onHover:Jr=>{_e(Jr)}},null),C("div",null,[C("div",{class:`${Ie}-panels`},[$i]),(Zr||A$)&&C("div",{class:`${Ie}-footer`},[Zr,A$])])]);return qr&&(kv=qr(kv)),C("div",{class:`${Ie}-panel-container`,style:{marginLeft:`${W.value}px`},ref:u,onMousedown:Jr=>{Jr.preventDefault()}},[kv])}const H8=C("div",{class:ce(`${Ie}-range-wrapper`,`${Ie}-${Ut}-range-wrapper`),style:{minWidth:`${U.value}px`}},[C("div",{ref:m,class:`${Ie}-range-arrow`,style:B8},null),z8()]);let S$;ll&&(S$=C("span",{class:`${Ie}-suffix`},[ll]));let C$;$o&&(It($.value,0)&&!x.value[0]||It($.value,1)&&!x.value[1])&&(C$=C("span",{onMousedown:$i=>{$i.preventDefault(),$i.stopPropagation()},onMouseup:$i=>{$i.preventDefault(),$i.stopPropagation();let Zr=$.value;x.value[0]||(Zr=oo(Zr,null,0)),x.value[1]||(Zr=oo(Zr,null,1)),K(Zr,null),ee(!1,b.value)},class:`${Ie}-clear`},[Ao||C("span",{class:`${Ie}-clear-btn`},null)]));const $$={size:j3(Ut,v.value[0],Ln)};let Mv=0,Iv=0;d.value&&f.value&&h.value&&(b.value===0?Iv=d.value.offsetWidth:(Mv=j.value,Iv=f.value.offsetWidth));const W8=Vc==="rtl"?{right:`${Mv}px`}:{left:`${Mv}px`};return C("div",H({ref:c,class:ce(Ie,`${Ie}-range`,n.class,{[`${Ie}-disabled`]:x.value[0]&&x.value[1],[`${Ie}-focused`]:b.value===0?Pt.value:yn.value,[`${Ie}-rtl`]:Vc==="rtl"}),style:n.style,onClick:on,onMouseenter:R8,onMouseleave:L8,onMousedown:Yn,onMouseup:F8},q3(t)),[C("div",{class:ce(`${Ie}-input`,{[`${Ie}-input-active`]:b.value===0,[`${Ie}-input-placeholder`]:!!Se.value}),ref:d},[C("input",H(H(H({id:st,disabled:x.value[0],readonly:Ev||typeof v.value[0]=="function"||!Et.value,value:Se.value||pe.value,onInput:$i=>{ge($i.target.value)},autofocus:Ji,placeholder:It(Ii,0)||"",ref:p},yt.value),$$),{},{autocomplete:w$}),null)]),C("div",{class:`${Ie}-range-separator`,ref:h},[Qi]),C("div",{class:ce(`${Ie}-input`,{[`${Ie}-input-active`]:b.value===1,[`${Ie}-input-placeholder`]:!!ke.value}),ref:f},[C("input",H(H(H({disabled:x.value[1],readonly:Ev||typeof v.value[0]=="function"||!$n.value,value:ke.value||$e.value,onInput:$i=>{fe($i.target.value)},placeholder:It(Ii,1)||"",ref:g},fn.value),$$),{},{autocomplete:w$}),null)]),C("div",{class:`${Ie}-active-bar`,style:A(A({},W8),{width:`${Iv}px`,position:"absolute"})},null),S$,C$,C(t4,{visible:F.value,popupStyle:tt,prefixCls:Ie,dropdownClassName:Lt,dropdownAlign:rn,getPopupContainer:Ci,transitionName:xn,range:!0,direction:Vc},{default:()=>[C("div",{style:{pointerEvents:"none",position:"absolute",top:0,bottom:0,left:0,right:0}},null)],popupElement:()=>H8})])}}})}const Wte=Hte();var jte=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);ot.checked,()=>{r.value=t.checked}),o({focus(){var u;(u=a.value)===null||u===void 0||u.focus()},blur(){var u;(u=a.value)===null||u===void 0||u.blur()}});const s=se(),l=u=>{if(t.disabled)return;t.checked===void 0&&(r.value=u.target.checked),u.shiftKey=s.value;const d={target:A(A({},t),{checked:u.target.checked}),stopPropagation(){u.stopPropagation()},preventDefault(){u.preventDefault()},nativeEvent:u};t.checked!==void 0&&(a.value.checked=!!t.checked),i("change",d),s.value=!1},c=u=>{i("click",u),s.value=u.shiftKey};return()=>{const{prefixCls:u,name:d,id:f,type:h,disabled:p,readonly:g,tabindex:m,autofocus:v,value:b,required:y}=t,w=jte(t,["prefixCls","name","id","type","disabled","readonly","tabindex","autofocus","value","required"]),{class:x,onFocus:$,onBlur:S,onKeydown:_,onKeypress:P,onKeyup:O}=n,T=A(A({},w),n),M=Object.keys(T).reduce((E,R)=>((R.startsWith("data-")||R.startsWith("aria-")||R==="role")&&(E[R]=T[R]),E),{}),I=ce(u,x,{[`${u}-checked`]:r.value,[`${u}-disabled`]:p}),k=A(A({name:d,id:f,type:h,readonly:g,disabled:p,tabindex:m,class:`${u}-input`,checked:!!r.value,autofocus:v,value:b},M),{onChange:l,onClick:c,onFocus:$,onBlur:S,onKeydown:_,onKeypress:P,onKeyup:O,required:y});return C("span",{class:I},[C("input",H({ref:a},k),null),C("span",{class:`${u}-inner`},null)])}}}),c4=Symbol("radioGroupContextKey"),Xte=t=>{ot(c4,t)},Yte=()=>qe(c4,void 0),u4=Symbol("radioOptionTypeContextKey"),Gte=t=>{ot(u4,t)},Kte=()=>qe(u4,void 0),Ute=new mt("antRadioEffect",{"0%":{transform:"scale(1)",opacity:.5},"100%":{transform:"scale(1.6)",opacity:0}}),qte=t=>{const{componentCls:e,antCls:n}=t,i=`${e}-group`;return{[i]:A(A({},rt(t)),{display:"inline-block",fontSize:0,[`&${i}-rtl`]:{direction:"rtl"},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:"none"}})}},Zte=t=>{const{componentCls:e,radioWrapperMarginRight:n,radioCheckedColor:i,radioSize:o,motionDurationSlow:r,motionDurationMid:a,motionEaseInOut:s,motionEaseInOutCirc:l,radioButtonBg:c,colorBorder:u,lineWidth:d,radioDotSize:f,colorBgContainerDisabled:h,colorTextDisabled:p,paddingXS:g,radioDotDisabledColor:m,lineType:v,radioDotDisabledSize:b,wireframe:y,colorWhite:w}=t,x=`${e}-inner`;return{[`${e}-wrapper`]:A(A({},rt(t)),{position:"relative",display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:n,cursor:"pointer",[`&${e}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:t.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},[`${e}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${d}px ${v} ${i}`,borderRadius:"50%",visibility:"hidden",animationName:Ute,animationDuration:r,animationTimingFunction:s,animationFillMode:"both",content:'""'},[e]:A(A({},rt(t)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center"}),[`${e}-wrapper:hover &, + &:hover ${x}`]:{borderColor:i},[`${e}-input:focus-visible + ${x}`]:A({},zr(t)),[`${e}:hover::after, ${e}-wrapper:hover &::after`]:{visibility:"visible"},[`${e}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:o,height:o,marginBlockStart:o/-2,marginInlineStart:o/-2,backgroundColor:y?i:w,borderBlockStart:0,borderInlineStart:0,borderRadius:o,transform:"scale(0)",opacity:0,transition:`all ${r} ${l}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:o,height:o,backgroundColor:c,borderColor:u,borderStyle:"solid",borderWidth:d,borderRadius:"50%",transition:`all ${a}`},[`${e}-input`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,insetBlockEnd:0,insetInlineStart:0,zIndex:1,cursor:"pointer",opacity:0},[`${e}-checked`]:{[x]:{borderColor:i,backgroundColor:y?c:i,"&::after":{transform:`scale(${f/o})`,opacity:1,transition:`all ${r} ${l}`}}},[`${e}-disabled`]:{cursor:"not-allowed",[x]:{backgroundColor:h,borderColor:u,cursor:"not-allowed","&::after":{backgroundColor:m}},[`${e}-input`]:{cursor:"not-allowed"},[`${e}-disabled + span`]:{color:p,cursor:"not-allowed"},[`&${e}-checked`]:{[x]:{"&::after":{transform:`scale(${b/o})`}}}},[`span${e} + *`]:{paddingInlineStart:g,paddingInlineEnd:g}})}},Jte=t=>{const{radioButtonColor:e,controlHeight:n,componentCls:i,lineWidth:o,lineType:r,colorBorder:a,motionDurationSlow:s,motionDurationMid:l,radioButtonPaddingHorizontal:c,fontSize:u,radioButtonBg:d,fontSizeLG:f,controlHeightLG:h,controlHeightSM:p,paddingXS:g,borderRadius:m,borderRadiusSM:v,borderRadiusLG:b,radioCheckedColor:y,radioButtonCheckedBg:w,radioButtonHoverColor:x,radioButtonActiveColor:$,radioSolidCheckedColor:S,colorTextDisabled:_,colorBgContainerDisabled:P,radioDisabledButtonCheckedColor:O,radioDisabledButtonCheckedBg:T}=t;return{[`${i}-button-wrapper`]:{position:"relative",display:"inline-block",height:n,margin:0,paddingInline:c,paddingBlock:0,color:e,fontSize:u,lineHeight:`${n-o*2}px`,background:d,border:`${o}px ${r} ${a}`,borderBlockStartWidth:o+.02,borderInlineStartWidth:0,borderInlineEndWidth:o,cursor:"pointer",transition:[`color ${l}`,`background ${l}`,`border-color ${l}`,`box-shadow ${l}`].join(","),a:{color:e},[`> ${i}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:-o,insetInlineStart:-o,display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:o,paddingInline:0,backgroundColor:a,transition:`background-color ${s}`,content:'""'}},"&:first-child":{borderInlineStart:`${o}px ${r} ${a}`,borderStartStartRadius:m,borderEndStartRadius:m},"&:last-child":{borderStartEndRadius:m,borderEndEndRadius:m},"&:first-child:last-child":{borderRadius:m},[`${i}-group-large &`]:{height:h,fontSize:f,lineHeight:`${h-o*2}px`,"&:first-child":{borderStartStartRadius:b,borderEndStartRadius:b},"&:last-child":{borderStartEndRadius:b,borderEndEndRadius:b}},[`${i}-group-small &`]:{height:p,paddingInline:g-o,paddingBlock:0,lineHeight:`${p-o*2}px`,"&:first-child":{borderStartStartRadius:v,borderEndStartRadius:v},"&:last-child":{borderStartEndRadius:v,borderEndEndRadius:v}},"&:hover":{position:"relative",color:y},"&:has(:focus-visible)":A({},zr(t)),[`${i}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${i}-button-wrapper-disabled)`]:{zIndex:1,color:y,background:w,borderColor:y,"&::before":{backgroundColor:y},"&:first-child":{borderColor:y},"&:hover":{color:x,borderColor:x,"&::before":{backgroundColor:x}},"&:active":{color:$,borderColor:$,"&::before":{backgroundColor:$}}},[`${i}-group-solid &-checked:not(${i}-button-wrapper-disabled)`]:{color:S,background:y,borderColor:y,"&:hover":{color:S,background:x,borderColor:x},"&:active":{color:S,background:$,borderColor:$}},"&-disabled":{color:_,backgroundColor:P,borderColor:a,cursor:"not-allowed","&:first-child, &:hover":{color:_,backgroundColor:P,borderColor:a}},[`&-disabled${i}-button-wrapper-checked`]:{color:O,backgroundColor:T,borderColor:a,boxShadow:"none"}}}},d4=et("Radio",t=>{const{padding:e,lineWidth:n,controlItemBgActiveDisabled:i,colorTextDisabled:o,colorBgContainer:r,fontSizeLG:a,controlOutline:s,colorPrimaryHover:l,colorPrimaryActive:c,colorText:u,colorPrimary:d,marginXS:f,controlOutlineWidth:h,colorTextLightSolid:p,wireframe:g}=t,m=`0 0 0 ${h}px ${s}`,v=m,b=a,y=4,w=b-y*2,x=g?w:b-(y+n)*2,$=d,S=u,_=l,P=c,O=e-n,I=Ve(t,{radioFocusShadow:m,radioButtonFocusShadow:v,radioSize:b,radioDotSize:x,radioDotDisabledSize:w,radioCheckedColor:$,radioDotDisabledColor:o,radioSolidCheckedColor:p,radioButtonBg:r,radioButtonCheckedBg:r,radioButtonColor:S,radioButtonHoverColor:_,radioButtonActiveColor:P,radioButtonPaddingHorizontal:O,radioDisabledButtonCheckedBg:i,radioDisabledButtonCheckedColor:o,radioWrapperMarginRight:f});return[qte(I),Zte(I),Jte(I)]});var Qte=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o({prefixCls:String,checked:Ce(),disabled:Ce(),isGroup:Ce(),value:Z.any,name:String,id:String,autofocus:Ce(),onChange:ve(),onFocus:ve(),onBlur:ve(),onClick:ve(),"onUpdate:checked":ve(),"onUpdate:value":ve()}),di=oe({compatConfig:{MODE:3},name:"ARadio",inheritAttrs:!1,props:f4(),setup(t,e){let{emit:n,expose:i,slots:o,attrs:r}=e;const a=vn(),s=Mn.useInject(),l=Kte(),c=Yte(),u=Oi(),d=L(()=>{var _;return(_=g.value)!==null&&_!==void 0?_:u.value}),f=se(),{prefixCls:h,direction:p,disabled:g}=Me("radio",t),m=L(()=>(c==null?void 0:c.optionType.value)==="button"||l==="button"?`${h.value}-button`:h.value),v=Oi(),[b,y]=d4(h);i({focus:()=>{f.value.focus()},blur:()=>{f.value.blur()}});const $=_=>{const P=_.target.checked;n("update:checked",P),n("update:value",P),n("change",_),a.onFieldChange()},S=_=>{n("change",_),c&&c.onChange&&c.onChange(_)};return()=>{var _;const P=c,{prefixCls:O,id:T=a.id.value}=t,M=Qte(t,["prefixCls","id"]),I=A(A({prefixCls:m.value,id:T},ht(M,["onUpdate:checked","onUpdate:value"])),{disabled:(_=g.value)!==null&&_!==void 0?_:v.value});P?(I.name=P.name.value,I.onChange=S,I.checked=t.value===P.value.value,I.disabled=d.value||P.disabled.value):I.onChange=$;const k=ce({[`${m.value}-wrapper`]:!0,[`${m.value}-wrapper-checked`]:I.checked,[`${m.value}-wrapper-disabled`]:I.disabled,[`${m.value}-wrapper-rtl`]:p.value==="rtl",[`${m.value}-wrapper-in-form-item`]:s.isFormItemInput},r.class,y.value);return b(C("label",H(H({},r),{},{class:k}),[C(l4,H(H({},I),{},{type:"radio",ref:f}),null),o.default&&C("span",null,[o.default()])]))}}}),ene=()=>({prefixCls:String,value:Z.any,size:Ne(),options:xt(),disabled:Ce(),name:String,buttonStyle:Ne("outline"),id:String,optionType:Ne("default"),onChange:ve(),"onUpdate:value":ve()}),_S=oe({compatConfig:{MODE:3},name:"ARadioGroup",inheritAttrs:!1,props:ene(),setup(t,e){let{slots:n,emit:i,attrs:o}=e;const r=vn(),{prefixCls:a,direction:s,size:l}=Me("radio",t),[c,u]=d4(a),d=se(t.value),f=se(!1);return ye(()=>t.value,p=>{d.value=p,f.value=!1}),Xte({onChange:p=>{const g=d.value,{value:m}=p.target;"value"in t||(d.value=m),!f.value&&m!==g&&(f.value=!0,i("update:value",m),i("change",p),r.onFieldChange()),pt(()=>{f.value=!1})},value:d,disabled:L(()=>t.disabled),name:L(()=>t.name),optionType:L(()=>t.optionType)}),()=>{var p;const{options:g,buttonStyle:m,id:v=r.id.value}=t,b=`${a.value}-group`,y=ce(b,`${b}-${m}`,{[`${b}-${l.value}`]:l.value,[`${b}-rtl`]:s.value==="rtl"},o.class,u.value);let w=null;return g&&g.length>0?w=g.map(x=>{if(typeof x=="string"||typeof x=="number")return C(di,{key:x,prefixCls:a.value,disabled:t.disabled,value:x,checked:d.value===x},{default:()=>[x]});const{value:$,disabled:S,label:_}=x;return C(di,{key:`radio-group-value-options-${$}`,prefixCls:a.value,disabled:S||t.disabled,value:$,checked:d.value===$},{default:()=>[_]})}):w=(p=n.default)===null||p===void 0?void 0:p.call(n),c(C("div",H(H({},o),{},{class:y,id:v}),[w]))}}}),ng=oe({compatConfig:{MODE:3},name:"ARadioButton",inheritAttrs:!1,props:f4(),setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o}=Me("radio",t);return Gte("button"),()=>{var r;return C(di,H(H(H({},i),t),{},{prefixCls:o.value}),{default:()=>[(r=n.default)===null||r===void 0?void 0:r.call(n)]})}}});di.Group=_S;di.Button=ng;di.install=function(t){return t.component(di.name,di),t.component(di.Group.name,di.Group),t.component(di.Button.name,di.Button),t};const tne=10,nne=20;function h4(t){const{fullscreen:e,validRange:n,generateConfig:i,locale:o,prefixCls:r,value:a,onChange:s,divRef:l}=t,c=i.getYear(a||i.getNow());let u=c-tne,d=u+nne;n&&(u=i.getYear(n[0]),d=i.getYear(n[1])+1);const f=o&&o.year==="年"?"年":"",h=[];for(let p=u;p{let g=i.setYear(a,p);if(n){const[m,v]=n,b=i.getYear(g),y=i.getMonth(g);b===i.getYear(v)&&y>i.getMonth(v)&&(g=i.setMonth(g,i.getMonth(v))),b===i.getYear(m)&&yl.value},null)}h4.inheritAttrs=!1;function p4(t){const{prefixCls:e,fullscreen:n,validRange:i,value:o,generateConfig:r,locale:a,onChange:s,divRef:l}=t,c=r.getMonth(o||r.getNow());let u=0,d=11;if(i){const[p,g]=i,m=r.getYear(o);r.getYear(g)===m&&(d=r.getMonth(g)),r.getYear(p)===m&&(u=r.getMonth(p))}const f=a.shortMonths||r.locale.getShortMonths(a.locale),h=[];for(let p=u;p<=d;p+=1)h.push({label:f[p],value:p});return C(kn,{size:n?void 0:"small",class:`${e}-month-select`,value:c,options:h,onChange:p=>{s(r.setMonth(o,p))},getPopupContainer:()=>l.value},null)}p4.inheritAttrs=!1;function g4(t){const{prefixCls:e,locale:n,mode:i,fullscreen:o,onModeChange:r}=t;return C(_S,{onChange:a=>{let{target:{value:s}}=a;r(s)},value:i,size:o?void 0:"small",class:`${e}-mode-switch`},{default:()=>[C(ng,{value:"month"},{default:()=>[n.month]}),C(ng,{value:"year"},{default:()=>[n.year]})]})}g4.inheritAttrs=!1;const ine=oe({name:"CalendarHeader",inheritAttrs:!1,props:["mode","prefixCls","value","validRange","generateConfig","locale","mode","fullscreen"],setup(t,e){let{attrs:n}=e;const i=se(null),o=Mn.useInject();return Mn.useProvide(o,{isFormItemInput:!1}),()=>{const r=A(A({},t),n),{prefixCls:a,fullscreen:s,mode:l,onChange:c,onModeChange:u}=r,d=A(A({},r),{fullscreen:s,divRef:i});return C("div",{class:`${a}-header`,ref:i},[C(h4,H(H({},d),{},{onChange:f=>{c(f,"year")}}),null),l==="month"&&C(p4,H(H({},d),{},{onChange:f=>{c(f,"month")}}),null),C(g4,H(H({},d),{},{onModeChange:u}),null)])}}}),PS=t=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:t,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),Dc=t=>({borderColor:t.inputBorderHoverColor,borderInlineEndWidth:t.lineWidth}),Ta=t=>({borderColor:t.inputBorderHoverColor,boxShadow:`0 0 0 ${t.controlOutlineWidth}px ${t.controlOutline}`,borderInlineEndWidth:t.lineWidth,outline:0}),TS=t=>({color:t.colorTextDisabled,backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":A({},Dc(Ve(t,{inputBorderHoverColor:t.colorBorder})))}),m4=t=>{const{inputPaddingVerticalLG:e,fontSizeLG:n,lineHeightLG:i,borderRadiusLG:o,inputPaddingHorizontalLG:r}=t;return{padding:`${e}px ${r}px`,fontSize:n,lineHeight:i,borderRadius:o}},OS=t=>({padding:`${t.inputPaddingVerticalSM}px ${t.controlPaddingHorizontalSM-1}px`,borderRadius:t.borderRadiusSM}),tf=(t,e)=>{const{componentCls:n,colorError:i,colorWarning:o,colorErrorOutline:r,colorWarningOutline:a,colorErrorBorderHover:s,colorWarningBorderHover:l}=t;return{[`&-status-error:not(${e}-disabled):not(${e}-borderless)${e}`]:{borderColor:i,"&:hover":{borderColor:s},"&:focus, &-focused":A({},Ta(Ve(t,{inputBorderActiveColor:i,inputBorderHoverColor:i,controlOutline:r}))),[`${n}-prefix`]:{color:i}},[`&-status-warning:not(${e}-disabled):not(${e}-borderless)${e}`]:{borderColor:o,"&:hover":{borderColor:l},"&:focus, &-focused":A({},Ta(Ve(t,{inputBorderActiveColor:o,inputBorderHoverColor:o,controlOutline:a}))),[`${n}-prefix`]:{color:o}}}},rl=t=>A(A({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${t.inputPaddingVertical}px ${t.inputPaddingHorizontal}px`,color:t.colorText,fontSize:t.fontSize,lineHeight:t.lineHeight,backgroundColor:t.colorBgContainer,backgroundImage:"none",borderWidth:t.lineWidth,borderStyle:t.lineType,borderColor:t.colorBorder,borderRadius:t.borderRadius,transition:`all ${t.motionDurationMid}`},PS(t.colorTextPlaceholder)),{"&:hover":A({},Dc(t)),"&:focus, &-focused":A({},Ta(t)),"&-disabled, &[disabled]":A({},TS(t)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:t.controlHeight,lineHeight:t.lineHeight,verticalAlign:"bottom",transition:`all ${t.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":A({},m4(t)),"&-sm":A({},OS(t)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),v4=t=>{const{componentCls:e,antCls:n}=t;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:t.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${e}, &-lg > ${e}-group-addon`]:A({},m4(t)),[`&-sm ${e}, &-sm > ${e}-group-addon`]:A({},OS(t)),[`> ${e}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${e}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${t.inputPaddingHorizontal}px`,color:t.colorText,fontWeight:"normal",fontSize:t.fontSize,textAlign:"center",backgroundColor:t.colorFillAlter,border:`${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`-${t.inputPaddingVertical+1}px -${t.inputPaddingHorizontal}px`,[`&${n}-select-single:not(${n}-select-customize-input)`]:{[`${n}-select-selector`]:{backgroundColor:"inherit",border:`${t.lineWidth}px ${t.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${n}-select-selector`]:{color:t.colorPrimary}}},[`${n}-cascader-picker`]:{margin:`-9px -${t.inputPaddingHorizontal}px`,backgroundColor:"transparent",[`${n}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${e}`]:{float:"inline-start",width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${e}-search-with-button &`]:{zIndex:0}}},[`> ${e}:first-child, ${e}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${e}-affix-wrapper`]:{[`&:not(:first-child) ${e}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${e}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${e}:last-child, ${e}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${n}-select ${n}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${e}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${e}-search &`]:{borderStartStartRadius:t.borderRadius,borderEndStartRadius:t.borderRadius}},[`&:not(:first-child), ${e}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${e}-group-compact`]:A(A({display:"block"},Do()),{[`${e}-group-addon, ${e}-group-wrap, > ${e}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:t.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`& > ${e}-affix-wrapper`]:{display:"inline-flex"},[`& > ${n}-picker-range`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-t.lineWidth,borderInlineEndWidth:t.lineWidth},[`${e}`]:{float:"none"},[`& > ${n}-select > ${n}-select-selector, & > ${n}-select-auto-complete ${e}, & > ${n}-cascader-picker ${e}, & > ${e}-group-wrapper ${e}`]:{borderInlineEndWidth:t.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${n}-select-focused`]:{zIndex:1},[`& > ${n}-select > ${n}-select-arrow`]:{zIndex:1},[`& > *:first-child, @@ -235,9 +235,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho & > ${n}-cascader-picker:first-child ${e}`]:{borderStartStartRadius:t.borderRadius,borderEndStartRadius:t.borderRadius},[`& > *:last-child, & > ${n}-select:last-child > ${n}-select-selector, & > ${n}-cascader-picker:last-child ${e}, - & > ${n}-cascader-picker-focused:last-child ${e}`]:{borderInlineEndWidth:t.lineWidth,borderStartEndRadius:t.borderRadius,borderEndEndRadius:t.borderRadius},[`& > ${n}-select-auto-complete ${e}`]:{verticalAlign:"top"},[`${e}-group-wrapper + ${e}-group-wrapper`]:{marginInlineStart:-t.lineWidth,[`${e}-affix-wrapper`]:{borderRadius:0}},[`${e}-group-wrapper:not(:last-child)`]:{[`&${e}-search > ${e}-group`]:{[`& > ${e}-group-addon > ${e}-search-button`]:{borderRadius:0},[`& > ${e}`]:{borderStartStartRadius:t.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:t.borderRadius}}}}),[`&&-sm ${n}-btn`]:{fontSize:t.fontSizeSM,height:t.controlHeightSM,lineHeight:"normal"},[`&&-lg ${n}-btn`]:{fontSize:t.fontSizeLG,height:t.controlHeightLG,lineHeight:"normal"},[`&&-lg ${n}-select-single ${n}-select-selector`]:{height:`${t.controlHeightLG}px`,[`${n}-select-selection-item, ${n}-select-selection-placeholder`]:{lineHeight:`${t.controlHeightLG-2}px`},[`${n}-select-selection-search-input`]:{height:`${t.controlHeightLG}px`}},[`&&-sm ${n}-select-single ${n}-select-selector`]:{height:`${t.controlHeightSM}px`,[`${n}-select-selection-item, ${n}-select-selection-placeholder`]:{lineHeight:`${t.controlHeightSM-2}px`},[`${n}-select-selection-search-input`]:{height:`${t.controlHeightSM}px`}}}},one=t=>{const{componentCls:e,controlHeightSM:n,lineWidth:i}=t,r=(n-i*2-16)/2;return{[e]:A(A(A(A({},rt(t)),rl(t)),ef(t,e)),{'&[type="color"]':{height:t.controlHeight,[`&${e}-lg`]:{height:t.controlHeightLG},[`&${e}-sm`]:{height:n,paddingTop:r,paddingBottom:r}}})}},rne=t=>{const{componentCls:e}=t;return{[`${e}-clear-icon`]:{margin:0,color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${t.motionDurationSlow}`,"&:hover":{color:t.colorTextTertiary},"&:active":{color:t.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${t.inputAffixPadding}px`}},"&-textarea-with-clear-btn":{padding:"0 !important",border:"0 !important",[`${e}-clear-icon`]:{position:"absolute",insetBlockStart:t.paddingXS,insetInlineEnd:t.paddingXS,zIndex:1}}}},ane=t=>{const{componentCls:e,inputAffixPadding:n,colorTextDescription:i,motionDurationSlow:o,colorIcon:r,colorIconHover:a,iconCls:s}=t;return{[`${e}-affix-wrapper`]:A(A(A(A(A({},rl(t)),{display:"inline-flex",[`&:not(${e}-affix-wrapper-disabled):hover`]:A(A({},kc(t)),{zIndex:1,[`${e}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${e}[disabled]`]:{background:"transparent"}},[`> input${e}`]:{padding:0,fontSize:"inherit",border:"none",borderRadius:0,outline:"none","&:focus":{boxShadow:"none !important"}},"&::before":{width:0,visibility:"hidden",content:'"\\a0"'},[`${e}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:t.paddingXS}},"&-show-count-suffix":{color:i},"&-show-count-has-suffix":{marginInlineEnd:t.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}}}),rne(t)),{[`${s}${e}-password-icon`]:{color:r,cursor:"pointer",transition:`all ${o}`,"&:hover":{color:a}}}),ef(t,`${e}-affix-wrapper`))}},sne=t=>{const{componentCls:e,colorError:n,colorSuccess:i,borderRadiusLG:o,borderRadiusSM:r}=t;return{[`${e}-group`]:A(A(A({},rt(t)),v4(t)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${e}-group-addon`]:{borderRadius:o}},"&-sm":{[`${e}-group-addon`]:{borderRadius:r}},"&-status-error":{[`${e}-group-addon`]:{color:n,borderColor:n}},"&-status-warning":{[`${e}-group-addon:last-child`]:{color:i,borderColor:i}}}})}},lne=t=>{const{componentCls:e,antCls:n}=t,i=`${e}-search`;return{[i]:{[`${e}`]:{"&:hover, &:focus":{borderColor:t.colorPrimaryHover,[`+ ${e}-group-addon ${i}-button:not(${n}-btn-primary)`]:{borderInlineStartColor:t.colorPrimaryHover}}},[`${e}-affix-wrapper`]:{borderRadius:0},[`${e}-lg`]:{lineHeight:t.lineHeightLG-2e-4},[`> ${e}-group`]:{[`> ${e}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${i}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:t.borderRadius,borderEndEndRadius:t.borderRadius,borderEndStartRadius:0},[`${i}-button:not(${n}-btn-primary)`]:{color:t.colorTextDescription,"&:hover":{color:t.colorPrimaryHover},"&:active":{color:t.colorPrimaryActive},[`&${n}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${i}-button`]:{height:t.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${i}-button`]:{height:t.controlHeightLG},[`&-small ${i}-button`]:{height:t.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${e}-compact-item`]:{[`&:not(${e}-compact-last-item)`]:{[`${e}-group-addon`]:{[`${e}-search-button`]:{marginInlineEnd:-t.lineWidth,borderRadius:0}}},[`&:not(${e}-compact-first-item)`]:{[`${e},${e}-affix-wrapper`]:{borderRadius:0}},[`> ${e}-group-addon ${e}-search-button, + & > ${n}-cascader-picker-focused:last-child ${e}`]:{borderInlineEndWidth:t.lineWidth,borderStartEndRadius:t.borderRadius,borderEndEndRadius:t.borderRadius},[`& > ${n}-select-auto-complete ${e}`]:{verticalAlign:"top"},[`${e}-group-wrapper + ${e}-group-wrapper`]:{marginInlineStart:-t.lineWidth,[`${e}-affix-wrapper`]:{borderRadius:0}},[`${e}-group-wrapper:not(:last-child)`]:{[`&${e}-search > ${e}-group`]:{[`& > ${e}-group-addon > ${e}-search-button`]:{borderRadius:0},[`& > ${e}`]:{borderStartStartRadius:t.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:t.borderRadius}}}}),[`&&-sm ${n}-btn`]:{fontSize:t.fontSizeSM,height:t.controlHeightSM,lineHeight:"normal"},[`&&-lg ${n}-btn`]:{fontSize:t.fontSizeLG,height:t.controlHeightLG,lineHeight:"normal"},[`&&-lg ${n}-select-single ${n}-select-selector`]:{height:`${t.controlHeightLG}px`,[`${n}-select-selection-item, ${n}-select-selection-placeholder`]:{lineHeight:`${t.controlHeightLG-2}px`},[`${n}-select-selection-search-input`]:{height:`${t.controlHeightLG}px`}},[`&&-sm ${n}-select-single ${n}-select-selector`]:{height:`${t.controlHeightSM}px`,[`${n}-select-selection-item, ${n}-select-selection-placeholder`]:{lineHeight:`${t.controlHeightSM-2}px`},[`${n}-select-selection-search-input`]:{height:`${t.controlHeightSM}px`}}}},one=t=>{const{componentCls:e,controlHeightSM:n,lineWidth:i}=t,r=(n-i*2-16)/2;return{[e]:A(A(A(A({},rt(t)),rl(t)),tf(t,e)),{'&[type="color"]':{height:t.controlHeight,[`&${e}-lg`]:{height:t.controlHeightLG},[`&${e}-sm`]:{height:n,paddingTop:r,paddingBottom:r}}})}},rne=t=>{const{componentCls:e}=t;return{[`${e}-clear-icon`]:{margin:0,color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${t.motionDurationSlow}`,"&:hover":{color:t.colorTextTertiary},"&:active":{color:t.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${t.inputAffixPadding}px`}},"&-textarea-with-clear-btn":{padding:"0 !important",border:"0 !important",[`${e}-clear-icon`]:{position:"absolute",insetBlockStart:t.paddingXS,insetInlineEnd:t.paddingXS,zIndex:1}}}},ane=t=>{const{componentCls:e,inputAffixPadding:n,colorTextDescription:i,motionDurationSlow:o,colorIcon:r,colorIconHover:a,iconCls:s}=t;return{[`${e}-affix-wrapper`]:A(A(A(A(A({},rl(t)),{display:"inline-flex",[`&:not(${e}-affix-wrapper-disabled):hover`]:A(A({},Dc(t)),{zIndex:1,[`${e}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${e}[disabled]`]:{background:"transparent"}},[`> input${e}`]:{padding:0,fontSize:"inherit",border:"none",borderRadius:0,outline:"none","&:focus":{boxShadow:"none !important"}},"&::before":{width:0,visibility:"hidden",content:'"\\a0"'},[`${e}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:t.paddingXS}},"&-show-count-suffix":{color:i},"&-show-count-has-suffix":{marginInlineEnd:t.paddingXXS},"&-prefix":{marginInlineEnd:n},"&-suffix":{marginInlineStart:n}}}),rne(t)),{[`${s}${e}-password-icon`]:{color:r,cursor:"pointer",transition:`all ${o}`,"&:hover":{color:a}}}),tf(t,`${e}-affix-wrapper`))}},sne=t=>{const{componentCls:e,colorError:n,colorSuccess:i,borderRadiusLG:o,borderRadiusSM:r}=t;return{[`${e}-group`]:A(A(A({},rt(t)),v4(t)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${e}-group-addon`]:{borderRadius:o}},"&-sm":{[`${e}-group-addon`]:{borderRadius:r}},"&-status-error":{[`${e}-group-addon`]:{color:n,borderColor:n}},"&-status-warning":{[`${e}-group-addon:last-child`]:{color:i,borderColor:i}}}})}},lne=t=>{const{componentCls:e,antCls:n}=t,i=`${e}-search`;return{[i]:{[`${e}`]:{"&:hover, &:focus":{borderColor:t.colorPrimaryHover,[`+ ${e}-group-addon ${i}-button:not(${n}-btn-primary)`]:{borderInlineStartColor:t.colorPrimaryHover}}},[`${e}-affix-wrapper`]:{borderRadius:0},[`${e}-lg`]:{lineHeight:t.lineHeightLG-2e-4},[`> ${e}-group`]:{[`> ${e}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${i}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:t.borderRadius,borderEndEndRadius:t.borderRadius,borderEndStartRadius:0},[`${i}-button:not(${n}-btn-primary)`]:{color:t.colorTextDescription,"&:hover":{color:t.colorPrimaryHover},"&:active":{color:t.colorPrimaryActive},[`&${n}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${i}-button`]:{height:t.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${i}-button`]:{height:t.controlHeightLG},[`&-small ${i}-button`]:{height:t.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${e}-compact-item`]:{[`&:not(${e}-compact-last-item)`]:{[`${e}-group-addon`]:{[`${e}-search-button`]:{marginInlineEnd:-t.lineWidth,borderRadius:0}}},[`&:not(${e}-compact-first-item)`]:{[`${e},${e}-affix-wrapper`]:{borderRadius:0}},[`> ${e}-group-addon ${e}-search-button, > ${e}, - ${e}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${e}-affix-wrapper-focused`]:{zIndex:2}}}}};function al(t){return Ve(t,{inputAffixPadding:t.paddingXXS,inputPaddingVertical:Math.max(Math.round((t.controlHeight-t.fontSize*t.lineHeight)/2*10)/10-t.lineWidth,3),inputPaddingVerticalLG:Math.ceil((t.controlHeightLG-t.fontSizeLG*t.lineHeightLG)/2*10)/10-t.lineWidth,inputPaddingVerticalSM:Math.max(Math.round((t.controlHeightSM-t.fontSize*t.lineHeight)/2*10)/10-t.lineWidth,0),inputPaddingHorizontal:t.paddingSM-t.lineWidth,inputPaddingHorizontalSM:t.paddingXS-t.lineWidth,inputPaddingHorizontalLG:t.controlPaddingHorizontal-t.lineWidth,inputBorderHoverColor:t.colorPrimaryHover,inputBorderActiveColor:t.colorPrimaryHover})}const cne=t=>{const{componentCls:e,inputPaddingHorizontal:n,paddingLG:i}=t,o=`${e}-textarea`;return{[o]:{position:"relative",[`${o}-suffix`]:{position:"absolute",top:0,insetInlineEnd:n,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto"},"&-status-error,\n &-status-warning,\n &-status-success,\n &-status-validating":{[`&${o}-has-feedback`]:{[`${e}`]:{paddingInlineEnd:i}}},"&-show-count":{[`> ${e}`]:{height:"100%"},"&::after":{color:t.colorTextDescription,whiteSpace:"nowrap",content:"attr(data-count)",pointerEvents:"none",float:"right"}},"&-rtl":{"&::after":{float:"left"}}}}},ES=et("Input",t=>{const e=al(t);return[one(e),cne(e),ane(e),sne(e),lne(e),Ec(e)]}),_b=(t,e,n,i)=>{const{lineHeight:o}=t,r=Math.floor(n*o)+2,a=Math.max((e-r)/2,0),s=Math.max(e-r-a,0);return{padding:`${a}px ${i}px ${s}px`}},une=t=>{const{componentCls:e,pickerCellCls:n,pickerCellInnerCls:i,pickerPanelCellHeight:o,motionDurationSlow:r,borderRadiusSM:a,motionDurationMid:s,controlItemBgHover:l,lineWidth:c,lineType:u,colorPrimary:d,controlItemBgActive:f,colorTextLightSolid:h,controlHeightSM:p,pickerDateHoverRangeBorderColor:g,pickerCellBorderGap:m,pickerBasicCellHoverWithRangeColor:v,pickerPanelCellWidth:b,colorTextDisabled:y,colorBgContainerDisabled:w}=t;return{"&::before":{position:"absolute",top:"50%",insetInlineStart:0,insetInlineEnd:0,zIndex:1,height:o,transform:"translateY(-50%)",transition:`all ${r}`,content:'""'},[i]:{position:"relative",zIndex:2,display:"inline-block",minWidth:o,height:o,lineHeight:`${o}px`,borderRadius:a,transition:`background ${s}, border ${s}`},[`&:hover:not(${n}-in-view), + ${e}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${e}-affix-wrapper-focused`]:{zIndex:2}}}}};function al(t){return Ve(t,{inputAffixPadding:t.paddingXXS,inputPaddingVertical:Math.max(Math.round((t.controlHeight-t.fontSize*t.lineHeight)/2*10)/10-t.lineWidth,3),inputPaddingVerticalLG:Math.ceil((t.controlHeightLG-t.fontSizeLG*t.lineHeightLG)/2*10)/10-t.lineWidth,inputPaddingVerticalSM:Math.max(Math.round((t.controlHeightSM-t.fontSize*t.lineHeight)/2*10)/10-t.lineWidth,0),inputPaddingHorizontal:t.paddingSM-t.lineWidth,inputPaddingHorizontalSM:t.paddingXS-t.lineWidth,inputPaddingHorizontalLG:t.controlPaddingHorizontal-t.lineWidth,inputBorderHoverColor:t.colorPrimaryHover,inputBorderActiveColor:t.colorPrimaryHover})}const cne=t=>{const{componentCls:e,inputPaddingHorizontal:n,paddingLG:i}=t,o=`${e}-textarea`;return{[o]:{position:"relative",[`${o}-suffix`]:{position:"absolute",top:0,insetInlineEnd:n,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto"},"&-status-error,\n &-status-warning,\n &-status-success,\n &-status-validating":{[`&${o}-has-feedback`]:{[`${e}`]:{paddingInlineEnd:i}}},"&-show-count":{[`> ${e}`]:{height:"100%"},"&::after":{color:t.colorTextDescription,whiteSpace:"nowrap",content:"attr(data-count)",pointerEvents:"none",float:"right"}},"&-rtl":{"&::after":{float:"left"}}}}},ES=et("Input",t=>{const e=al(t);return[one(e),cne(e),ane(e),sne(e),lne(e),Mc(e)]}),_b=(t,e,n,i)=>{const{lineHeight:o}=t,r=Math.floor(n*o)+2,a=Math.max((e-r)/2,0),s=Math.max(e-r-a,0);return{padding:`${a}px ${i}px ${s}px`}},une=t=>{const{componentCls:e,pickerCellCls:n,pickerCellInnerCls:i,pickerPanelCellHeight:o,motionDurationSlow:r,borderRadiusSM:a,motionDurationMid:s,controlItemBgHover:l,lineWidth:c,lineType:u,colorPrimary:d,controlItemBgActive:f,colorTextLightSolid:h,controlHeightSM:p,pickerDateHoverRangeBorderColor:g,pickerCellBorderGap:m,pickerBasicCellHoverWithRangeColor:v,pickerPanelCellWidth:b,colorTextDisabled:y,colorBgContainerDisabled:w}=t;return{"&::before":{position:"absolute",top:"50%",insetInlineStart:0,insetInlineEnd:0,zIndex:1,height:o,transform:"translateY(-50%)",transition:`all ${r}`,content:'""'},[i]:{position:"relative",zIndex:2,display:"inline-block",minWidth:o,height:o,lineHeight:`${o}px`,borderRadius:a,transition:`background ${s}, border ${s}`},[`&:hover:not(${n}-in-view), &:hover:not(${n}-selected):not(${n}-range-start):not(${n}-range-end):not(${n}-range-hover-start):not(${n}-range-hover-end)`]:{[i]:{background:l}},[`&-in-view${n}-today ${i}`]:{"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:1,border:`${c}px ${u} ${d}`,borderRadius:a,content:'""'}},[`&-in-view${n}-in-range`]:{position:"relative","&::before":{background:f}},[`&-in-view${n}-selected ${i}, &-in-view${n}-range-start ${i}, &-in-view${n}-range-end ${i}`]:{color:h,background:d},[`&-in-view${n}-range-start:not(${n}-range-start-single), @@ -274,18 +274,18 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho &-selected ${n}, ${n}`]:{background:"transparent !important"}},"&-row":{td:{transition:`background ${y}`,"&:first-child":{borderStartStartRadius:N,borderEndStartRadius:N},"&:last-child":{borderStartEndRadius:N,borderEndEndRadius:N}},"&:hover td":{background:W},"&-selected td,\n &-selected:hover td":{background:h,[`&${e}-cell-week`]:{color:new Ot(B).setAlpha(.5).toHexString()},[`&${e}-cell-today ${n}::before`]:{borderColor:B},[n]:{color:B}}}},"&-date-panel":{[`${e}-body`]:{padding:`${s}px ${a}px`},[`${e}-content`]:{width:r*7,th:{width:r}}},"&-datetime-panel":{display:"flex",[`${e}-time-panel`]:{borderInlineStart:`${u}px ${d} ${g}`},[`${e}-date-panel, ${e}-time-panel`]:{transition:`opacity ${M}`},"&-active":{[`${e}-date-panel, - ${e}-time-panel`]:{opacity:.3,"&-active":{opacity:1}}}},"&-time-panel":{width:"auto",minWidth:"auto",direction:"ltr",[`${e}-content`]:{display:"flex",flex:"auto",height:j},"&-column":{flex:"1 0 auto",width:U,margin:`${l}px 0`,padding:0,overflowY:"hidden",textAlign:"start",listStyle:"none",transition:`background ${y}`,overflowX:"hidden","&::after":{display:"block",height:j-V,content:'""'},"&:not(:first-child)":{borderInlineStart:`${u}px ${d} ${g}`},"&-active":{background:new Ot(q).setAlpha(.2).toHexString()},"&:hover":{overflowY:"auto"},"> li":{margin:0,padding:0,[`&${e}-time-panel-cell`]:{marginInline:Y,[`${e}-time-panel-cell-inner`]:{display:"block",width:U-2*Y,height:V,margin:0,paddingBlock:0,paddingInlineEnd:0,paddingInlineStart:(U-V)/2,color:P,lineHeight:`${V}px`,borderRadius:N,cursor:"pointer",transition:`background ${y}`,"&:hover":{background:W}},"&-selected":{[`${e}-time-panel-cell-inner`]:{background:q}},"&-disabled":{[`${e}-time-panel-cell-inner`]:{color:_,background:"transparent",cursor:"not-allowed"}}}}}},[`&-datetime-panel ${e}-time-panel-column:after`]:{height:j-V+l*2}}}},dne=t=>{const{componentCls:e,colorBgContainer:n,colorError:i,colorErrorOutline:o,colorWarning:r,colorWarningOutline:a}=t;return{[e]:{[`&-status-error${e}`]:{"&, &:not([disabled]):hover":{backgroundColor:n,borderColor:i},"&-focused, &:focus":A({},Ta(Ve(t,{inputBorderActiveColor:i,inputBorderHoverColor:i,controlOutline:o}))),[`${e}-active-bar`]:{background:i}},[`&-status-warning${e}`]:{"&, &:not([disabled]):hover":{backgroundColor:n,borderColor:r},"&-focused, &:focus":A({},Ta(Ve(t,{inputBorderActiveColor:r,inputBorderHoverColor:r,controlOutline:a}))),[`${e}-active-bar`]:{background:r}}}}},fne=t=>{const{componentCls:e,antCls:n,boxShadowPopoverArrow:i,controlHeight:o,fontSize:r,inputPaddingHorizontal:a,colorBgContainer:s,lineWidth:l,lineType:c,colorBorder:u,borderRadius:d,motionDurationMid:f,colorBgContainerDisabled:h,colorTextDisabled:p,colorTextPlaceholder:g,controlHeightLG:m,fontSizeLG:v,controlHeightSM:b,inputPaddingHorizontalSM:y,paddingXS:w,marginXS:x,colorTextDescription:$,lineWidthBold:S,lineHeight:_,colorPrimary:P,motionDurationSlow:O,zIndexPopup:T,paddingXXS:M,paddingSM:I,pickerTextHeight:k,controlItemBgActive:E,colorPrimaryBorder:R,sizePopupArrow:D,borderRadiusXS:F,borderRadiusOuter:N,colorBgElevated:B,borderRadiusLG:z,boxShadowSecondary:W,borderRadiusSM:j,colorSplit:U,controlItemBgHover:V,presetsWidth:q,presetsMaxWidth:Y}=t;return[{[e]:A(A(A({},rt(t)),_b(t,o,r,a)),{position:"relative",display:"inline-flex",alignItems:"center",background:s,lineHeight:1,border:`${l}px ${c} ${u}`,borderRadius:d,transition:`border ${f}, box-shadow ${f}`,"&:hover, &-focused":A({},kc(t)),"&-focused":A({},Ta(t)),[`&${e}-disabled`]:{background:h,borderColor:u,cursor:"not-allowed",[`${e}-suffix`]:{color:p}},[`&${e}-borderless`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`${e}-input`]:{position:"relative",display:"inline-flex",alignItems:"center",width:"100%","> input":A(A({},rl(t)),{flex:"auto",minWidth:1,height:"auto",padding:0,background:"transparent",border:0,"&:focus":{boxShadow:"none"},"&[disabled]":{background:"transparent"}}),"&:hover":{[`${e}-clear`]:{opacity:1}},"&-placeholder":{"> input":{color:g}}},"&-large":A(A({},_b(t,m,v,a)),{[`${e}-input > input`]:{fontSize:v}}),"&-small":A({},_b(t,b,r,y)),[`${e}-suffix`]:{display:"flex",flex:"none",alignSelf:"center",marginInlineStart:w/2,color:p,lineHeight:1,pointerEvents:"none","> *":{verticalAlign:"top","&:not(:last-child)":{marginInlineEnd:x}}},[`${e}-clear`]:{position:"absolute",top:"50%",insetInlineEnd:0,color:p,lineHeight:1,background:s,transform:"translateY(-50%)",cursor:"pointer",opacity:0,transition:`opacity ${f}, color ${f}`,"> *":{verticalAlign:"top"},"&:hover":{color:$}},[`${e}-separator`]:{position:"relative",display:"inline-block",width:"1em",height:v,color:p,fontSize:v,verticalAlign:"top",cursor:"default",[`${e}-focused &`]:{color:$},[`${e}-range-separator &`]:{[`${e}-disabled &`]:{cursor:"not-allowed"}}},"&-range":{position:"relative",display:"inline-flex",[`${e}-clear`]:{insetInlineEnd:a},"&:hover":{[`${e}-clear`]:{opacity:1}},[`${e}-active-bar`]:{bottom:-l,height:S,marginInlineStart:a,background:P,opacity:0,transition:`all ${O} ease-out`,pointerEvents:"none"},[`&${e}-focused`]:{[`${e}-active-bar`]:{opacity:1}},[`${e}-range-separator`]:{alignItems:"center",padding:`0 ${w}px`,lineHeight:1},[`&${e}-small`]:{[`${e}-clear`]:{insetInlineEnd:y},[`${e}-active-bar`]:{marginInlineStart:y}}},"&-dropdown":A(A(A({},rt(t)),b4(t)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:T,[`&${e}-dropdown-hidden`]:{display:"none"},[`&${e}-dropdown-placement-bottomLeft`]:{[`${e}-range-arrow`]:{top:0,display:"block",transform:"translateY(-100%)"}},[`&${e}-dropdown-placement-topLeft`]:{[`${e}-range-arrow`]:{bottom:0,display:"block",transform:"translateY(100%) rotate(180deg)"}},[`&${n}-slide-up-enter${n}-slide-up-enter-active${e}-dropdown-placement-topLeft, + ${e}-time-panel`]:{opacity:.3,"&-active":{opacity:1}}}},"&-time-panel":{width:"auto",minWidth:"auto",direction:"ltr",[`${e}-content`]:{display:"flex",flex:"auto",height:j},"&-column":{flex:"1 0 auto",width:U,margin:`${l}px 0`,padding:0,overflowY:"hidden",textAlign:"start",listStyle:"none",transition:`background ${y}`,overflowX:"hidden","&::after":{display:"block",height:j-V,content:'""'},"&:not(:first-child)":{borderInlineStart:`${u}px ${d} ${g}`},"&-active":{background:new Ot(q).setAlpha(.2).toHexString()},"&:hover":{overflowY:"auto"},"> li":{margin:0,padding:0,[`&${e}-time-panel-cell`]:{marginInline:Y,[`${e}-time-panel-cell-inner`]:{display:"block",width:U-2*Y,height:V,margin:0,paddingBlock:0,paddingInlineEnd:0,paddingInlineStart:(U-V)/2,color:P,lineHeight:`${V}px`,borderRadius:N,cursor:"pointer",transition:`background ${y}`,"&:hover":{background:W}},"&-selected":{[`${e}-time-panel-cell-inner`]:{background:q}},"&-disabled":{[`${e}-time-panel-cell-inner`]:{color:_,background:"transparent",cursor:"not-allowed"}}}}}},[`&-datetime-panel ${e}-time-panel-column:after`]:{height:j-V+l*2}}}},dne=t=>{const{componentCls:e,colorBgContainer:n,colorError:i,colorErrorOutline:o,colorWarning:r,colorWarningOutline:a}=t;return{[e]:{[`&-status-error${e}`]:{"&, &:not([disabled]):hover":{backgroundColor:n,borderColor:i},"&-focused, &:focus":A({},Ta(Ve(t,{inputBorderActiveColor:i,inputBorderHoverColor:i,controlOutline:o}))),[`${e}-active-bar`]:{background:i}},[`&-status-warning${e}`]:{"&, &:not([disabled]):hover":{backgroundColor:n,borderColor:r},"&-focused, &:focus":A({},Ta(Ve(t,{inputBorderActiveColor:r,inputBorderHoverColor:r,controlOutline:a}))),[`${e}-active-bar`]:{background:r}}}}},fne=t=>{const{componentCls:e,antCls:n,boxShadowPopoverArrow:i,controlHeight:o,fontSize:r,inputPaddingHorizontal:a,colorBgContainer:s,lineWidth:l,lineType:c,colorBorder:u,borderRadius:d,motionDurationMid:f,colorBgContainerDisabled:h,colorTextDisabled:p,colorTextPlaceholder:g,controlHeightLG:m,fontSizeLG:v,controlHeightSM:b,inputPaddingHorizontalSM:y,paddingXS:w,marginXS:x,colorTextDescription:$,lineWidthBold:S,lineHeight:_,colorPrimary:P,motionDurationSlow:O,zIndexPopup:T,paddingXXS:M,paddingSM:I,pickerTextHeight:k,controlItemBgActive:E,colorPrimaryBorder:R,sizePopupArrow:D,borderRadiusXS:F,borderRadiusOuter:N,colorBgElevated:B,borderRadiusLG:z,boxShadowSecondary:W,borderRadiusSM:j,colorSplit:U,controlItemBgHover:V,presetsWidth:q,presetsMaxWidth:Y}=t;return[{[e]:A(A(A({},rt(t)),_b(t,o,r,a)),{position:"relative",display:"inline-flex",alignItems:"center",background:s,lineHeight:1,border:`${l}px ${c} ${u}`,borderRadius:d,transition:`border ${f}, box-shadow ${f}`,"&:hover, &-focused":A({},Dc(t)),"&-focused":A({},Ta(t)),[`&${e}-disabled`]:{background:h,borderColor:u,cursor:"not-allowed",[`${e}-suffix`]:{color:p}},[`&${e}-borderless`]:{backgroundColor:"transparent !important",borderColor:"transparent !important",boxShadow:"none !important"},[`${e}-input`]:{position:"relative",display:"inline-flex",alignItems:"center",width:"100%","> input":A(A({},rl(t)),{flex:"auto",minWidth:1,height:"auto",padding:0,background:"transparent",border:0,"&:focus":{boxShadow:"none"},"&[disabled]":{background:"transparent"}}),"&:hover":{[`${e}-clear`]:{opacity:1}},"&-placeholder":{"> input":{color:g}}},"&-large":A(A({},_b(t,m,v,a)),{[`${e}-input > input`]:{fontSize:v}}),"&-small":A({},_b(t,b,r,y)),[`${e}-suffix`]:{display:"flex",flex:"none",alignSelf:"center",marginInlineStart:w/2,color:p,lineHeight:1,pointerEvents:"none","> *":{verticalAlign:"top","&:not(:last-child)":{marginInlineEnd:x}}},[`${e}-clear`]:{position:"absolute",top:"50%",insetInlineEnd:0,color:p,lineHeight:1,background:s,transform:"translateY(-50%)",cursor:"pointer",opacity:0,transition:`opacity ${f}, color ${f}`,"> *":{verticalAlign:"top"},"&:hover":{color:$}},[`${e}-separator`]:{position:"relative",display:"inline-block",width:"1em",height:v,color:p,fontSize:v,verticalAlign:"top",cursor:"default",[`${e}-focused &`]:{color:$},[`${e}-range-separator &`]:{[`${e}-disabled &`]:{cursor:"not-allowed"}}},"&-range":{position:"relative",display:"inline-flex",[`${e}-clear`]:{insetInlineEnd:a},"&:hover":{[`${e}-clear`]:{opacity:1}},[`${e}-active-bar`]:{bottom:-l,height:S,marginInlineStart:a,background:P,opacity:0,transition:`all ${O} ease-out`,pointerEvents:"none"},[`&${e}-focused`]:{[`${e}-active-bar`]:{opacity:1}},[`${e}-range-separator`]:{alignItems:"center",padding:`0 ${w}px`,lineHeight:1},[`&${e}-small`]:{[`${e}-clear`]:{insetInlineEnd:y},[`${e}-active-bar`]:{marginInlineStart:y}}},"&-dropdown":A(A(A({},rt(t)),b4(t)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:T,[`&${e}-dropdown-hidden`]:{display:"none"},[`&${e}-dropdown-placement-bottomLeft`]:{[`${e}-range-arrow`]:{top:0,display:"block",transform:"translateY(-100%)"}},[`&${e}-dropdown-placement-topLeft`]:{[`${e}-range-arrow`]:{bottom:0,display:"block",transform:"translateY(100%) rotate(180deg)"}},[`&${n}-slide-up-enter${n}-slide-up-enter-active${e}-dropdown-placement-topLeft, &${n}-slide-up-enter${n}-slide-up-enter-active${e}-dropdown-placement-topRight, &${n}-slide-up-appear${n}-slide-up-appear-active${e}-dropdown-placement-topLeft, - &${n}-slide-up-appear${n}-slide-up-appear-active${e}-dropdown-placement-topRight`]:{animationName:Em},[`&${n}-slide-up-enter${n}-slide-up-enter-active${e}-dropdown-placement-bottomLeft, + &${n}-slide-up-appear${n}-slide-up-appear-active${e}-dropdown-placement-topRight`]:{animationName:Mm},[`&${n}-slide-up-enter${n}-slide-up-enter-active${e}-dropdown-placement-bottomLeft, &${n}-slide-up-enter${n}-slide-up-enter-active${e}-dropdown-placement-bottomRight, &${n}-slide-up-appear${n}-slide-up-appear-active${e}-dropdown-placement-bottomLeft, - &${n}-slide-up-appear${n}-slide-up-appear-active${e}-dropdown-placement-bottomRight`]:{animationName:Tm},[`&${n}-slide-up-leave${n}-slide-up-leave-active${e}-dropdown-placement-topLeft, - &${n}-slide-up-leave${n}-slide-up-leave-active${e}-dropdown-placement-topRight`]:{animationName:Mm},[`&${n}-slide-up-leave${n}-slide-up-leave-active${e}-dropdown-placement-bottomLeft, - &${n}-slide-up-leave${n}-slide-up-leave-active${e}-dropdown-placement-bottomRight`]:{animationName:Om},[`${e}-panel > ${e}-time-panel`]:{paddingTop:M},[`${e}-ranges`]:{marginBottom:0,padding:`${M}px ${I}px`,overflow:"hidden",lineHeight:`${k-2*l-w/2}px`,textAlign:"start",listStyle:"none",display:"flex",justifyContent:"space-between","> li":{display:"inline-block"},[`${e}-preset > ${n}-tag-blue`]:{color:P,background:E,borderColor:R,cursor:"pointer"},[`${e}-ok`]:{marginInlineStart:"auto"}},[`${e}-range-wrapper`]:{display:"flex",position:"relative"},[`${e}-range-arrow`]:A({position:"absolute",zIndex:1,display:"none",marginInlineStart:a*1.5,transition:`left ${O} ease-out`},Kw(D,F,N,B,i)),[`${e}-panel-container`]:{overflow:"hidden",verticalAlign:"top",background:B,borderRadius:z,boxShadow:W,transition:`margin ${O}`,[`${e}-panel-layout`]:{display:"flex",flexWrap:"nowrap",alignItems:"stretch"},[`${e}-presets`]:{display:"flex",flexDirection:"column",minWidth:q,maxWidth:Y,ul:{height:0,flex:"auto",listStyle:"none",overflow:"auto",margin:0,padding:w,borderInlineEnd:`${l}px ${c} ${U}`,li:A(A({},un),{borderRadius:j,paddingInline:w,paddingBlock:(b-Math.round(r*_))/2,cursor:"pointer",transition:`all ${O}`,"+ li":{marginTop:x},"&:hover":{background:V}})}},[`${e}-panels`]:{display:"inline-flex",flexWrap:"nowrap",direction:"ltr",[`${e}-panel`]:{borderWidth:`0 0 ${l}px`},"&:last-child":{[`${e}-panel`]:{borderWidth:0}}},[`${e}-panel`]:{verticalAlign:"top",background:"transparent",borderRadius:0,borderWidth:0,[`${e}-content, - table`]:{textAlign:"center"},"&-focused":{borderColor:u}}}}),"&-dropdown-range":{padding:`${D*2/3}px 0`,"&-hidden":{display:"none"}},"&-rtl":{direction:"rtl",[`${e}-separator`]:{transform:"rotate(180deg)"},[`${e}-footer`]:{"&-extra":{direction:"rtl"}}}})},lr(t,"slide-up"),lr(t,"slide-down"),pc(t,"move-up"),pc(t,"move-down")]},y4=t=>{const{componentCls:n,controlHeightLG:i,controlHeightSM:o,colorPrimary:r,paddingXXS:a}=t;return{pickerCellCls:`${n}-cell`,pickerCellInnerCls:`${n}-cell-inner`,pickerTextHeight:i,pickerPanelCellWidth:o*1.5,pickerPanelCellHeight:o,pickerDateHoverRangeBorderColor:new Ot(r).lighten(20).toHexString(),pickerBasicCellHoverWithRangeColor:new Ot(r).lighten(35).toHexString(),pickerPanelWithoutTimeCellHeight:i*1.65,pickerYearMonthCellWidth:i*1.5,pickerTimePanelColumnHeight:28*8,pickerTimePanelColumnWidth:i*1.4,pickerTimePanelCellHeight:28,pickerQuarterPanelContentHeight:i*1.4,pickerCellPaddingVertical:a,pickerCellBorderGap:2,pickerControlIconSize:7,pickerControlIconBorderWidth:1.5}},x4=et("DatePicker",t=>{const e=Ve(al(t),y4(t));return[fne(e),dne(e),Ec(t,{focusElCls:`${t.componentCls}-focused`})]},t=>({presetsWidth:120,presetsMaxWidth:200,zIndexPopup:t.zIndexPopupBase+50})),hne=t=>{const{calendarCls:e,componentCls:n,calendarFullBg:i,calendarFullPanelBg:o,calendarItemActiveBg:r}=t;return{[e]:A(A(A({},b4(t)),rt(t)),{background:i,"&-rtl":{direction:"rtl"},[`${e}-header`]:{display:"flex",justifyContent:"flex-end",padding:`${t.paddingSM}px 0`,[`${e}-year-select`]:{minWidth:t.yearControlWidth},[`${e}-month-select`]:{minWidth:t.monthControlWidth,marginInlineStart:t.marginXS},[`${e}-mode-switch`]:{marginInlineStart:t.marginXS}}}),[`${e} ${n}-panel`]:{background:o,border:0,borderTop:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`,borderRadius:0,[`${n}-month-panel, ${n}-date-panel`]:{width:"auto"},[`${n}-body`]:{padding:`${t.paddingXS}px 0`},[`${n}-content`]:{width:"100%"}},[`${e}-mini`]:{borderRadius:t.borderRadiusLG,[`${e}-header`]:{paddingInlineEnd:t.paddingXS,paddingInlineStart:t.paddingXS},[`${n}-panel`]:{borderRadius:`0 0 ${t.borderRadiusLG}px ${t.borderRadiusLG}px`},[`${n}-content`]:{height:t.miniContentHeight,th:{height:"auto",padding:0,lineHeight:`${t.weekHeight}px`}},[`${n}-cell::before`]:{pointerEvents:"none"}},[`${e}${e}-full`]:{[`${n}-panel`]:{display:"block",width:"100%",textAlign:"end",background:i,border:0,[`${n}-body`]:{"th, td":{padding:0},th:{height:"auto",paddingInlineEnd:t.paddingSM,paddingBottom:t.paddingXXS,lineHeight:`${t.weekHeight}px`}}},[`${n}-cell`]:{"&::before":{display:"none"},"&:hover":{[`${e}-date`]:{background:t.controlItemBgHover}},[`${e}-date-today::before`]:{display:"none"},[`&-in-view${n}-cell-selected`]:{[`${e}-date, ${e}-date-today`]:{background:r}},"&-selected, &-selected:hover":{[`${e}-date, ${e}-date-today`]:{[`${e}-date-value`]:{color:t.colorPrimary}}}},[`${e}-date`]:{display:"block",width:"auto",height:"auto",margin:`0 ${t.marginXS/2}px`,padding:`${t.paddingXS/2}px ${t.paddingXS}px 0`,border:0,borderTop:`${t.lineWidthBold}px ${t.lineType} ${t.colorSplit}`,borderRadius:0,transition:`background ${t.motionDurationSlow}`,"&-value":{lineHeight:`${t.dateValueHeight}px`,transition:`color ${t.motionDurationSlow}`},"&-content":{position:"static",width:"auto",height:t.dateContentHeight,overflowY:"auto",color:t.colorText,lineHeight:t.lineHeight,textAlign:"start"},"&-today":{borderColor:t.colorPrimary,[`${e}-date-value`]:{color:t.colorText}}}},[`@media only screen and (max-width: ${t.screenXS}px) `]:{[`${e}`]:{[`${e}-header`]:{display:"block",[`${e}-year-select`]:{width:"50%"},[`${e}-month-select`]:{width:`calc(50% - ${t.paddingXS}px)`},[`${e}-mode-switch`]:{width:"100%",marginTop:t.marginXS,marginInlineStart:0,"> label":{width:"50%",textAlign:"center"}}}}}}},pne=et("Calendar",t=>{const e=`${t.componentCls}-calendar`,n=Ve(al(t),y4(t),{calendarCls:e,pickerCellInnerCls:`${t.componentCls}-cell-inner`,calendarFullBg:t.colorBgContainer,calendarFullPanelBg:t.colorBgContainer,calendarItemActiveBg:t.controlItemBgActive,dateValueHeight:t.controlHeightSM,weekHeight:t.controlHeightSM*.75,dateContentHeight:(t.fontSizeSM*t.lineHeightSM+t.marginXS)*3+t.lineWidth*2});return[hne(n)]},{yearControlWidth:80,monthControlWidth:70,miniContentHeight:256});function gne(t){function e(r,a){return r&&a&&t.getYear(r)===t.getYear(a)}function n(r,a){return e(r,a)&&t.getMonth(r)===t.getMonth(a)}function i(r,a){return n(r,a)&&t.getDate(r)===t.getDate(a)}const o=oe({name:"ACalendar",inheritAttrs:!1,props:{prefixCls:String,locale:{type:Object,default:void 0},validRange:{type:Array,default:void 0},disabledDate:{type:Function,default:void 0},dateFullCellRender:{type:Function,default:void 0},dateCellRender:{type:Function,default:void 0},monthFullCellRender:{type:Function,default:void 0},monthCellRender:{type:Function,default:void 0},headerRender:{type:Function,default:void 0},value:{type:[Object,String],default:void 0},defaultValue:{type:[Object,String],default:void 0},mode:{type:String,default:void 0},fullscreen:{type:Boolean,default:void 0},onChange:{type:Function,default:void 0},"onUpdate:value":{type:Function,default:void 0},onPanelChange:{type:Function,default:void 0},onSelect:{type:Function,default:void 0},valueFormat:{type:String,default:void 0}},slots:Object,setup(r,a){let{emit:s,slots:l,attrs:c}=a;const u=r,{prefixCls:d,direction:f}=Me("picker",u),[h,p]=pne(d),g=L(()=>`${d.value}-calendar`),m=E=>u.valueFormat?t.toString(E,u.valueFormat):E,v=L(()=>u.value?u.valueFormat?t.toDate(u.value,u.valueFormat):u.value:u.value===""?void 0:u.value),b=L(()=>u.defaultValue?u.valueFormat?t.toDate(u.defaultValue,u.valueFormat):u.defaultValue:u.defaultValue===""?void 0:u.defaultValue),[y,w]=jt(()=>v.value||t.getNow(),{defaultValue:b.value,value:v}),[x,$]=jt("month",{value:Ue(u,"mode")}),S=L(()=>x.value==="year"?"month":"date"),_=L(()=>E=>{var R;return(u.validRange?t.isAfter(u.validRange[0],E)||t.isAfter(E,u.validRange[1]):!1)||!!(!((R=u.disabledDate)===null||R===void 0)&&R.call(u,E))}),P=(E,R)=>{s("panelChange",m(E),R)},O=E=>{if(w(E),!i(E,y.value)){(S.value==="date"&&!n(E,y.value)||S.value==="month"&&!e(E,y.value))&&P(E,x.value);const R=m(E);s("update:value",R),s("change",R)}},T=E=>{$(E),P(y.value,E)},M=(E,R)=>{O(E),s("select",m(E),{source:R})},I=L(()=>{const{locale:E}=u,R=A(A({},sd),E);return R.lang=A(A({},R.lang),(E||{}).lang),R}),[k]=xo("Calendar",I);return()=>{const E=t.getNow(),{dateFullCellRender:R=l==null?void 0:l.dateFullCellRender,dateCellRender:D=l==null?void 0:l.dateCellRender,monthFullCellRender:F=l==null?void 0:l.monthFullCellRender,monthCellRender:N=l==null?void 0:l.monthCellRender,headerRender:B=l==null?void 0:l.headerRender,fullscreen:z=!0,validRange:W}=u,j=V=>{let{current:q}=V;return R?R({current:q}):C("div",{class:ce(`${d.value}-cell-inner`,`${g.value}-date`,{[`${g.value}-date-today`]:i(E,q)})},[C("div",{class:`${g.value}-date-value`},[String(t.getDate(q)).padStart(2,"0")]),C("div",{class:`${g.value}-date-content`},[D&&D({current:q})])])},U=(V,q)=>{let{current:Y}=V;if(F)return F({current:Y});const J=q.shortMonths||t.locale.getShortMonths(q.locale);return C("div",{class:ce(`${d.value}-cell-inner`,`${g.value}-date`,{[`${g.value}-date-today`]:n(E,Y)})},[C("div",{class:`${g.value}-date-value`},[J[t.getMonth(Y)]]),C("div",{class:`${g.value}-date-content`},[N&&N({current:Y})])])};return h(C("div",H(H({},c),{},{class:ce(g.value,{[`${g.value}-full`]:z,[`${g.value}-mini`]:!z,[`${g.value}-rtl`]:f.value==="rtl"},c.class,p.value)}),[B?B({value:y.value,type:x.value,onChange:V=>{M(V,"customize")},onTypeChange:T}):C(ine,{prefixCls:g.value,value:y.value,generateConfig:t,mode:x.value,fullscreen:z,locale:k.value.lang,validRange:W,onChange:M,onModeChange:T},null),C($S,{value:y.value,prefixCls:d.value,locale:k.value.lang,generateConfig:t,dateRender:j,monthCellRender:V=>U(V,k.value.lang),onSelect:V=>{M(V,S.value)},mode:S.value,picker:S.value,disabledDate:_.value,hideHeader:!0},null)]))}}});return o.install=function(r){return r.component(o.name,o),r},o}const mne=gne(rS),vne=Vt(mne);function bne(t){const e=ie(),n=ie(!1);function i(){for(var o=arguments.length,r=new Array(o),a=0;a{t(...r)}))}return at(()=>{n.value=!0,lt.cancel(e.value)}),i}function yne(t){const e=ie([]),n=ie(typeof t=="function"?t():t),i=bne(()=>{let r=n.value;e.value.forEach(a=>{r=a(r)}),e.value=[],n.value=r});function o(r){e.value.push(r),i()}return[n,o]}const xne=oe({compatConfig:{MODE:3},name:"TabNode",props:{id:{type:String},prefixCls:{type:String},tab:{type:Object},active:{type:Boolean},closable:{type:Boolean},editable:{type:Object},onClick:{type:Function},onResize:{type:Function},renderWrapper:{type:Function},removeAriaLabel:{type:String},onFocus:{type:Function}},emits:["click","resize","remove","focus"],setup(t,e){let{expose:n,attrs:i}=e;const o=se();function r(l){var c;!((c=t.tab)===null||c===void 0)&&c.disabled||t.onClick(l)}n({domRef:o});function a(l){var c;l.preventDefault(),l.stopPropagation(),t.editable.onEdit("remove",{key:(c=t.tab)===null||c===void 0?void 0:c.key,event:l})}const s=L(()=>{var l;return t.editable&&t.closable!==!1&&!(!((l=t.tab)===null||l===void 0)&&l.disabled)});return()=>{var l;const{prefixCls:c,id:u,active:d,tab:{key:f,tab:h,disabled:p,closeIcon:g},renderWrapper:m,removeAriaLabel:v,editable:b,onFocus:y}=t,w=`${c}-tab`,x=C("div",{key:f,ref:o,class:ce(w,{[`${w}-with-remove`]:s.value,[`${w}-active`]:d,[`${w}-disabled`]:p}),style:i.style,onClick:r},[C("div",{role:"tab","aria-selected":d,id:u&&`${u}-tab-${f}`,class:`${w}-btn`,"aria-controls":u&&`${u}-panel-${f}`,"aria-disabled":p,tabindex:p?null:0,onClick:$=>{$.stopPropagation(),r($)},onKeydown:$=>{[Te.SPACE,Te.ENTER].includes($.which)&&($.preventDefault(),r($))},onFocus:y},[typeof h=="function"?h():h]),s.value&&C("button",{type:"button","aria-label":v||"remove",tabindex:0,class:`${w}-remove`,onClick:$=>{$.stopPropagation(),a($)}},[(g==null?void 0:g())||((l=b.removeIcon)===null||l===void 0?void 0:l.call(b))||"×"])]);return m?m(x):x}}}),eP={width:0,height:0,left:0,top:0};function wne(t,e){const n=se(new Map);return Ke(()=>{var i,o;const r=new Map,a=t.value,s=e.value.get((i=a[0])===null||i===void 0?void 0:i.key)||eP,l=s.left+s.width;for(let c=0;c{const{prefixCls:r,editable:a,locale:s}=t;return!a||a.showAdd===!1?null:C("button",{ref:o,type:"button",class:`${r}-nav-add`,style:i.style,"aria-label":(s==null?void 0:s.addAriaLabel)||"Add tab",onClick:l=>{a.onEdit("add",{event:l})}},[a.addIcon?a.addIcon():"+"])}}}),Sne={prefixCls:{type:String},id:{type:String},tabs:{type:Object},rtl:{type:Boolean},tabBarGutter:{type:Number},activeKey:{type:[String,Number]},mobile:{type:Boolean},moreIcon:Z.any,moreTransitionName:{type:String},editable:{type:Object},locale:{type:Object,default:void 0},removeAriaLabel:String,onTabClick:{type:Function},popupClassName:String,getPopupContainer:ve()},Cne=oe({compatConfig:{MODE:3},name:"OperationNode",inheritAttrs:!1,props:Sne,emits:["tabClick"],slots:Object,setup(t,e){let{attrs:n,slots:i}=e;const[o,r]=Mt(!1),[a,s]=Mt(null),l=h=>{const p=t.tabs.filter(v=>!v.disabled);let g=p.findIndex(v=>v.key===a.value)||0;const m=p.length;for(let v=0;v{const{which:p}=h;if(!o.value){[Te.DOWN,Te.SPACE,Te.ENTER].includes(p)&&(r(!0),h.preventDefault());return}switch(p){case Te.UP:l(-1),h.preventDefault();break;case Te.DOWN:l(1),h.preventDefault();break;case Te.ESC:r(!1);break;case Te.SPACE:case Te.ENTER:a.value!==null&&t.onTabClick(a.value,h);break}},u=L(()=>`${t.id}-more-popup`),d=L(()=>a.value!==null?`${u.value}-${a.value}`:null),f=(h,p)=>{h.preventDefault(),h.stopPropagation(),t.editable.onEdit("remove",{key:p,event:h})};return Ze(()=>{ye(a,()=>{const h=document.getElementById(d.value);h&&h.scrollIntoView&&h.scrollIntoView(!1)},{flush:"post",immediate:!0})}),ye(o,()=>{o.value||s(null)}),tS({}),()=>{var h;const{prefixCls:p,id:g,tabs:m,locale:v,mobile:b,moreIcon:y=((h=i.moreIcon)===null||h===void 0?void 0:h.call(i))||C(qd,null,null),moreTransitionName:w,editable:x,tabBarGutter:$,rtl:S,onTabClick:_,popupClassName:P}=t;if(!m.length)return null;const O=`${p}-dropdown`,T=v==null?void 0:v.dropdownAriaLabel,M={[S?"marginRight":"marginLeft"]:$};m.length||(M.visibility="hidden",M.order=1);const I=ce({[`${O}-rtl`]:S,[`${P}`]:!0}),k=b?null:C(d3,{prefixCls:O,trigger:["hover"],visible:o.value,transitionName:w,onVisibleChange:r,overlayClassName:I,mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:t.getPopupContainer},{overlay:()=>C(sn,{onClick:E=>{let{key:R,domEvent:D}=E;_(R,D),r(!1)},id:u.value,tabindex:-1,role:"listbox","aria-activedescendant":d.value,selectedKeys:[a.value],"aria-label":T!==void 0?T:"expanded dropdown"},{default:()=>[m.map(E=>{var R,D;const F=x&&E.closable!==!1&&!E.disabled;return C(or,{key:E.key,id:`${u.value}-${E.key}`,role:"option","aria-controls":g&&`${g}-panel-${E.key}`,disabled:E.disabled},{default:()=>[C("span",null,[typeof E.tab=="function"?E.tab():E.tab]),F&&C("button",{type:"button","aria-label":t.removeAriaLabel||"remove",tabindex:0,class:`${O}-menu-item-remove`,onClick:N=>{N.stopPropagation(),f(N,E.key)}},[((R=E.closeIcon)===null||R===void 0?void 0:R.call(E))||((D=x.removeIcon)===null||D===void 0?void 0:D.call(x))||"×"])]})})]}),default:()=>C("button",{type:"button",class:`${p}-nav-more`,style:M,tabindex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":u.value,id:`${g}-more`,"aria-expanded":o.value,onKeydown:c},[y])});return C("div",{class:ce(`${p}-nav-operations`,n.class),style:n.style},[k,C(w4,{prefixCls:p,locale:v,editable:x},null)])}}}),S4=Symbol("tabsContextKey"),$ne=t=>{ot(S4,t)},C4=()=>qe(S4,{tabs:se([]),prefixCls:se()}),Ane=.1,tP=.01,Ah=20,nP=Math.pow(.995,Ah);function _ne(t,e){const[n,i]=Mt(),[o,r]=Mt(0),[a,s]=Mt(0),[l,c]=Mt(),u=se();function d(x){const{screenX:$,screenY:S}=x.touches[0];i({x:$,y:S}),clearInterval(u.value)}function f(x){if(!n.value)return;x.preventDefault();const{screenX:$,screenY:S}=x.touches[0],_=$-n.value.x,P=S-n.value.y;e(_,P),i({x:$,y:S});const O=Date.now();s(O-o.value),r(O),c({x:_,y:P})}function h(){if(!n.value)return;const x=l.value;if(i(null),c(null),x){const $=x.x/a.value,S=x.y/a.value,_=Math.abs($),P=Math.abs(S);if(Math.max(_,P){if(Math.abs(O)O?(_=$,p.value="x"):(_=S,p.value="y"),e(-_,-_)&&x.preventDefault()}const m=se({onTouchStart:d,onTouchMove:f,onTouchEnd:h,onWheel:g});function v(x){m.value.onTouchStart(x)}function b(x){m.value.onTouchMove(x)}function y(x){m.value.onTouchEnd(x)}function w(x){m.value.onWheel(x)}Ze(()=>{var x,$;document.addEventListener("touchmove",b,{passive:!1}),document.addEventListener("touchend",y,{passive:!1}),(x=t.value)===null||x===void 0||x.addEventListener("touchstart",v,{passive:!1}),($=t.value)===null||$===void 0||$.addEventListener("wheel",w,{passive:!1})}),at(()=>{document.removeEventListener("touchmove",b),document.removeEventListener("touchend",y)})}function iP(t,e){const n=se(t);function i(o){const r=typeof o=="function"?o(n.value):o;r!==n.value&&e(r,n.value),n.value=r}return[n,i]}const MS=()=>{const t=se(new Map),e=n=>i=>{t.value.set(n,i)};return Jg(()=>{t.value=new Map}),[e,t]},oP={width:0,height:0,left:0,top:0,right:0},Pne=()=>({id:{type:String},tabPosition:{type:String},activeKey:{type:[String,Number]},rtl:{type:Boolean},animated:Fe(),editable:Fe(),moreIcon:Z.any,moreTransitionName:{type:String},mobile:{type:Boolean},tabBarGutter:{type:Number},renderTabBar:{type:Function},locale:Fe(),popupClassName:String,getPopupContainer:ve(),onTabClick:{type:Function},onTabScroll:{type:Function}}),Tne=(t,e)=>{const{offsetWidth:n,offsetHeight:i,offsetTop:o,offsetLeft:r}=t,{width:a,height:s,x:l,y:c}=t.getBoundingClientRect();return Math.abs(a-n)<1?[a,s,l-e.x,c-e.y]:[n,i,r,o]},rP=oe({compatConfig:{MODE:3},name:"TabNavList",inheritAttrs:!1,props:Pne(),slots:Object,emits:["tabClick","tabScroll"],setup(t,e){let{attrs:n,slots:i}=e;const{tabs:o,prefixCls:r}=C4(),a=ie(),s=ie(),l=ie(),c=ie(),[u,d]=MS(),f=L(()=>t.tabPosition==="top"||t.tabPosition==="bottom"),[h,p]=iP(0,(ne,le)=>{f.value&&t.onTabScroll&&t.onTabScroll({direction:ne>le?"left":"right"})}),[g,m]=iP(0,(ne,le)=>{!f.value&&t.onTabScroll&&t.onTabScroll({direction:ne>le?"top":"bottom"})}),[v,b]=Mt(0),[y,w]=Mt(0),[x,$]=Mt(null),[S,_]=Mt(null),[P,O]=Mt(0),[T,M]=Mt(0),[I,k]=yne(new Map),E=wne(o,I),R=L(()=>`${r.value}-nav-operations-hidden`),D=ie(0),F=ie(0);Ke(()=>{f.value?t.rtl?(D.value=0,F.value=Math.max(0,v.value-x.value)):(D.value=Math.min(0,x.value-v.value),F.value=0):(D.value=Math.min(0,S.value-y.value),F.value=0)});const N=ne=>neF.value?F.value:ne,B=ie(),[z,W]=Mt(),j=()=>{W(Date.now())},U=()=>{clearTimeout(B.value)},V=(ne,le)=>{ne(he=>N(he+le))};_ne(a,(ne,le)=>{if(f.value){if(x.value>=v.value)return!1;V(p,ne)}else{if(S.value>=y.value)return!1;V(m,le)}return U(),j(),!0}),ye(z,()=>{U(),z.value&&(B.value=setTimeout(()=>{W(0)},100))});const q=function(){let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.activeKey;const le=E.value.get(ne)||{width:0,height:0,left:0,right:0,top:0};if(f.value){let he=h.value;t.rtl?le.righth.value+x.value&&(he=le.right+le.width-x.value):le.left<-h.value?he=-le.left:le.left+le.width>-h.value+x.value&&(he=-(le.left+le.width-x.value)),m(0),p(N(he))}else{let he=g.value;le.top<-g.value?he=-le.top:le.top+le.height>-g.value+S.value&&(he=-(le.top+le.height-S.value)),p(0),m(N(he))}},Y=ie(0),J=ie(0);Ke(()=>{let ne,le,he,pe,ge,be;const $e=E.value;["top","bottom"].includes(t.tabPosition)?(ne="width",pe=x.value,ge=v.value,be=P.value,le=t.rtl?"right":"left",he=Math.abs(h.value)):(ne="height",pe=S.value,ge=v.value,be=T.value,le="top",he=-g.value);let fe=pe;ge+be>pe&&gehe+fe){_e=Re-1;break}}let Oe=0;for(let Re=xe-1;Re>=0;Re-=1)if(($e.get(de[Re].key)||oP)[le]{k(()=>{var ne;const le=new Map,he=(ne=s.value)===null||ne===void 0?void 0:ne.getBoundingClientRect();return o.value.forEach(pe=>{let{key:ge}=pe;const be=d.value.get(ge),$e=(be==null?void 0:be.$el)||be;if($e){const[fe,de,xe,_e]=Tne($e,he);le.set(ge,{width:fe,height:de,left:xe,top:_e})}}),le})};ye(()=>o.value.map(ne=>ne.key).join("%%"),()=>{Q()},{flush:"post"});const G=()=>{var ne,le,he,pe,ge;const be=((ne=a.value)===null||ne===void 0?void 0:ne.offsetWidth)||0,$e=((le=a.value)===null||le===void 0?void 0:le.offsetHeight)||0,fe=((he=c.value)===null||he===void 0?void 0:he.$el)||{},de=fe.offsetWidth||0,xe=fe.offsetHeight||0;$(be),_($e),O(de),M(xe);const _e=(((pe=s.value)===null||pe===void 0?void 0:pe.offsetWidth)||0)-de,Oe=(((ge=s.value)===null||ge===void 0?void 0:ge.offsetHeight)||0)-xe;b(_e),w(Oe),Q()},ee=L(()=>[...o.value.slice(0,Y.value),...o.value.slice(J.value+1)]),[X,K]=Mt(),te=L(()=>E.value.get(t.activeKey)),ue=ie(),ae=()=>{lt.cancel(ue.value)};ye([te,f,()=>t.rtl],()=>{const ne={};te.value&&(f.value?(t.rtl?ne.right=ss(te.value.right):ne.left=ss(te.value.left),ne.width=ss(te.value.width)):(ne.top=ss(te.value.top),ne.height=ss(te.value.height))),ae(),ue.value=lt(()=>{K(ne)})}),ye([()=>t.activeKey,te,E,f],()=>{q()},{flush:"post"}),ye([()=>t.rtl,()=>t.tabBarGutter,()=>t.activeKey,()=>o.value],()=>{G()},{flush:"post"});const re=ne=>{let{position:le,prefixCls:he,extra:pe}=ne;if(!pe)return null;const ge=pe==null?void 0:pe({position:le});return ge?C("div",{class:`${he}-extra-content`},[ge]):null};return at(()=>{U(),ae()}),()=>{const{id:ne,animated:le,activeKey:he,rtl:pe,editable:ge,locale:be,tabPosition:$e,tabBarGutter:fe,onTabClick:de}=t,{class:xe,style:_e}=n,Oe=r.value,Re=!!ee.value.length,Se=`${Oe}-nav-wrap`;let Ae,Pe,ke,Le;f.value?pe?(Pe=h.value>0,Ae=h.value+x.value{const{key:yt}=ft;return C(xne,{id:ne,prefixCls:Oe,key:yt,tab:ft,style:_t===0?void 0:De,closable:ft.closable,editable:ge,active:yt===he,removeAriaLabel:be==null?void 0:be.removeAriaLabel,ref:u(yt),onClick:Pt=>{de(yt,Pt)},onFocus:()=>{q(yt),j(),a.value&&(pe||(a.value.scrollLeft=0),a.value.scrollTop=0)}},i)});return C("div",{role:"tablist",class:ce(`${Oe}-nav`,xe),style:_e,onKeydown:()=>{j()}},[C(re,{position:"left",prefixCls:Oe,extra:i.leftExtra},null),C(mo,{onResize:G},{default:()=>[C("div",{class:ce(Se,{[`${Se}-ping-left`]:Ae,[`${Se}-ping-right`]:Pe,[`${Se}-ping-top`]:ke,[`${Se}-ping-bottom`]:Le}),ref:a},[C(mo,{onResize:G},{default:()=>[C("div",{ref:s,class:`${Oe}-nav-list`,style:{transform:`translate(${h.value}px, ${g.value}px)`,transition:z.value?"none":void 0}},[je,C(w4,{ref:c,prefixCls:Oe,locale:be,editable:ge,style:A(A({},je.length===0?void 0:De),{visibility:Re?"hidden":null})},null),C("div",{class:ce(`${Oe}-ink-bar`,{[`${Oe}-ink-bar-animated`]:le.inkBar}),style:X.value},null)])]})])]}),C(Cne,H(H({},t),{},{removeAriaLabel:be==null?void 0:be.removeAriaLabel,ref:l,prefixCls:Oe,tabs:ee.value,class:!Re&&R.value}),n3(i,["moreIcon"])),C(re,{position:"right",prefixCls:Oe,extra:i.rightExtra},null),C(re,{position:"right",prefixCls:Oe,extra:i.tabBarExtraContent},null)])}}}),One=oe({compatConfig:{MODE:3},name:"TabPanelList",inheritAttrs:!1,props:{activeKey:{type:[String,Number]},id:{type:String},rtl:{type:Boolean},animated:{type:Object,default:void 0},tabPosition:{type:String},destroyInactiveTabPane:{type:Boolean}},setup(t){const{tabs:e,prefixCls:n}=C4();return()=>{const{id:i,activeKey:o,animated:r,tabPosition:a,rtl:s,destroyInactiveTabPane:l}=t,c=r.tabPane,u=n.value,d=e.value.findIndex(f=>f.key===o);return C("div",{class:`${u}-content-holder`},[C("div",{class:[`${u}-content`,`${u}-content-${a}`,{[`${u}-content-animated`]:c}],style:d&&c?{[s?"marginRight":"marginLeft"]:`-${d}00%`}:null},[e.value.map(f=>At(f.node,{key:f.key,prefixCls:u,tabKey:f.key,id:i,animated:c,active:f.key===o,destroyInactiveTabPane:l}))])])}}});var Ene={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};function aP(t){for(var e=1;e{const{componentCls:e,motionDurationSlow:n}=t;return[{[e]:{[`${e}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${n}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${n}`}}}}},[lr(t,"slide-up"),lr(t,"slide-down")]]},kne=t=>{const{componentCls:e,tabsCardHorizontalPadding:n,tabsCardHeadBackground:i,tabsCardGutter:o,colorSplit:r}=t;return{[`${e}-card`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{margin:0,padding:n,background:i,border:`${t.lineWidth}px ${t.lineType} ${r}`,transition:`all ${t.motionDurationSlow} ${t.motionEaseInOut}`},[`${e}-tab-active`]:{color:t.colorPrimary,background:t.colorBgContainer},[`${e}-ink-bar`]:{visibility:"hidden"}},[`&${e}-top, &${e}-bottom`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab + ${e}-tab`]:{marginLeft:{_skip_check_:!0,value:`${o}px`}}}},[`&${e}-top`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{borderRadius:`${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`},[`${e}-tab-active`]:{borderBottomColor:t.colorBgContainer}}},[`&${e}-bottom`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{borderRadius:`0 0 ${t.borderRadiusLG}px ${t.borderRadiusLG}px`},[`${e}-tab-active`]:{borderTopColor:t.colorBgContainer}}},[`&${e}-left, &${e}-right`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab + ${e}-tab`]:{marginTop:`${o}px`}}},[`&${e}-left`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{borderRadius:{_skip_check_:!0,value:`${t.borderRadiusLG}px 0 0 ${t.borderRadiusLG}px`}},[`${e}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:t.colorBgContainer}}}},[`&${e}-right`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${t.borderRadiusLG}px ${t.borderRadiusLG}px 0`}},[`${e}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:t.colorBgContainer}}}}}}},Dne=t=>{const{componentCls:e,tabsHoverColor:n,dropdownEdgeChildVerticalPadding:i}=t;return{[`${e}-dropdown`]:A(A({},rt(t)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:t.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${e}-dropdown-menu`]:{maxHeight:t.tabsDropdownHeight,margin:0,padding:`${i}px 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:t.colorBgContainer,backgroundClip:"padding-box",borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary,"&-item":A(A({},un),{display:"flex",alignItems:"center",minWidth:t.tabsDropdownWidth,margin:0,padding:`${t.paddingXXS}px ${t.paddingSM}px`,color:t.colorText,fontWeight:"normal",fontSize:t.fontSize,lineHeight:t.lineHeight,cursor:"pointer",transition:`all ${t.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:t.marginSM},color:t.colorTextDescription,fontSize:t.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:n}},"&:hover":{background:t.controlItemBgHover},"&-disabled":{"&, &:hover":{color:t.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},Rne=t=>{const{componentCls:e,margin:n,colorSplit:i}=t;return{[`${e}-top, ${e}-bottom`]:{flexDirection:"column",[`> ${e}-nav, > div > ${e}-nav`]:{margin:`0 0 ${n}px 0`,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${t.lineWidth}px ${t.lineType} ${i}`,content:"''"},[`${e}-ink-bar`]:{height:t.lineWidthBold,"&-animated":{transition:`width ${t.motionDurationSlow}, left ${t.motionDurationSlow}, + &${n}-slide-up-appear${n}-slide-up-appear-active${e}-dropdown-placement-bottomRight`]:{animationName:Om},[`&${n}-slide-up-leave${n}-slide-up-leave-active${e}-dropdown-placement-topLeft, + &${n}-slide-up-leave${n}-slide-up-leave-active${e}-dropdown-placement-topRight`]:{animationName:Im},[`&${n}-slide-up-leave${n}-slide-up-leave-active${e}-dropdown-placement-bottomLeft, + &${n}-slide-up-leave${n}-slide-up-leave-active${e}-dropdown-placement-bottomRight`]:{animationName:Em},[`${e}-panel > ${e}-time-panel`]:{paddingTop:M},[`${e}-ranges`]:{marginBottom:0,padding:`${M}px ${I}px`,overflow:"hidden",lineHeight:`${k-2*l-w/2}px`,textAlign:"start",listStyle:"none",display:"flex",justifyContent:"space-between","> li":{display:"inline-block"},[`${e}-preset > ${n}-tag-blue`]:{color:P,background:E,borderColor:R,cursor:"pointer"},[`${e}-ok`]:{marginInlineStart:"auto"}},[`${e}-range-wrapper`]:{display:"flex",position:"relative"},[`${e}-range-arrow`]:A({position:"absolute",zIndex:1,display:"none",marginInlineStart:a*1.5,transition:`left ${O} ease-out`},Kw(D,F,N,B,i)),[`${e}-panel-container`]:{overflow:"hidden",verticalAlign:"top",background:B,borderRadius:z,boxShadow:W,transition:`margin ${O}`,[`${e}-panel-layout`]:{display:"flex",flexWrap:"nowrap",alignItems:"stretch"},[`${e}-presets`]:{display:"flex",flexDirection:"column",minWidth:q,maxWidth:Y,ul:{height:0,flex:"auto",listStyle:"none",overflow:"auto",margin:0,padding:w,borderInlineEnd:`${l}px ${c} ${U}`,li:A(A({},un),{borderRadius:j,paddingInline:w,paddingBlock:(b-Math.round(r*_))/2,cursor:"pointer",transition:`all ${O}`,"+ li":{marginTop:x},"&:hover":{background:V}})}},[`${e}-panels`]:{display:"inline-flex",flexWrap:"nowrap",direction:"ltr",[`${e}-panel`]:{borderWidth:`0 0 ${l}px`},"&:last-child":{[`${e}-panel`]:{borderWidth:0}}},[`${e}-panel`]:{verticalAlign:"top",background:"transparent",borderRadius:0,borderWidth:0,[`${e}-content, + table`]:{textAlign:"center"},"&-focused":{borderColor:u}}}}),"&-dropdown-range":{padding:`${D*2/3}px 0`,"&-hidden":{display:"none"}},"&-rtl":{direction:"rtl",[`${e}-separator`]:{transform:"rotate(180deg)"},[`${e}-footer`]:{"&-extra":{direction:"rtl"}}}})},lr(t,"slide-up"),lr(t,"slide-down"),pc(t,"move-up"),pc(t,"move-down")]},y4=t=>{const{componentCls:n,controlHeightLG:i,controlHeightSM:o,colorPrimary:r,paddingXXS:a}=t;return{pickerCellCls:`${n}-cell`,pickerCellInnerCls:`${n}-cell-inner`,pickerTextHeight:i,pickerPanelCellWidth:o*1.5,pickerPanelCellHeight:o,pickerDateHoverRangeBorderColor:new Ot(r).lighten(20).toHexString(),pickerBasicCellHoverWithRangeColor:new Ot(r).lighten(35).toHexString(),pickerPanelWithoutTimeCellHeight:i*1.65,pickerYearMonthCellWidth:i*1.5,pickerTimePanelColumnHeight:28*8,pickerTimePanelColumnWidth:i*1.4,pickerTimePanelCellHeight:28,pickerQuarterPanelContentHeight:i*1.4,pickerCellPaddingVertical:a,pickerCellBorderGap:2,pickerControlIconSize:7,pickerControlIconBorderWidth:1.5}},x4=et("DatePicker",t=>{const e=Ve(al(t),y4(t));return[fne(e),dne(e),Mc(t,{focusElCls:`${t.componentCls}-focused`})]},t=>({presetsWidth:120,presetsMaxWidth:200,zIndexPopup:t.zIndexPopupBase+50})),hne=t=>{const{calendarCls:e,componentCls:n,calendarFullBg:i,calendarFullPanelBg:o,calendarItemActiveBg:r}=t;return{[e]:A(A(A({},b4(t)),rt(t)),{background:i,"&-rtl":{direction:"rtl"},[`${e}-header`]:{display:"flex",justifyContent:"flex-end",padding:`${t.paddingSM}px 0`,[`${e}-year-select`]:{minWidth:t.yearControlWidth},[`${e}-month-select`]:{minWidth:t.monthControlWidth,marginInlineStart:t.marginXS},[`${e}-mode-switch`]:{marginInlineStart:t.marginXS}}}),[`${e} ${n}-panel`]:{background:o,border:0,borderTop:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`,borderRadius:0,[`${n}-month-panel, ${n}-date-panel`]:{width:"auto"},[`${n}-body`]:{padding:`${t.paddingXS}px 0`},[`${n}-content`]:{width:"100%"}},[`${e}-mini`]:{borderRadius:t.borderRadiusLG,[`${e}-header`]:{paddingInlineEnd:t.paddingXS,paddingInlineStart:t.paddingXS},[`${n}-panel`]:{borderRadius:`0 0 ${t.borderRadiusLG}px ${t.borderRadiusLG}px`},[`${n}-content`]:{height:t.miniContentHeight,th:{height:"auto",padding:0,lineHeight:`${t.weekHeight}px`}},[`${n}-cell::before`]:{pointerEvents:"none"}},[`${e}${e}-full`]:{[`${n}-panel`]:{display:"block",width:"100%",textAlign:"end",background:i,border:0,[`${n}-body`]:{"th, td":{padding:0},th:{height:"auto",paddingInlineEnd:t.paddingSM,paddingBottom:t.paddingXXS,lineHeight:`${t.weekHeight}px`}}},[`${n}-cell`]:{"&::before":{display:"none"},"&:hover":{[`${e}-date`]:{background:t.controlItemBgHover}},[`${e}-date-today::before`]:{display:"none"},[`&-in-view${n}-cell-selected`]:{[`${e}-date, ${e}-date-today`]:{background:r}},"&-selected, &-selected:hover":{[`${e}-date, ${e}-date-today`]:{[`${e}-date-value`]:{color:t.colorPrimary}}}},[`${e}-date`]:{display:"block",width:"auto",height:"auto",margin:`0 ${t.marginXS/2}px`,padding:`${t.paddingXS/2}px ${t.paddingXS}px 0`,border:0,borderTop:`${t.lineWidthBold}px ${t.lineType} ${t.colorSplit}`,borderRadius:0,transition:`background ${t.motionDurationSlow}`,"&-value":{lineHeight:`${t.dateValueHeight}px`,transition:`color ${t.motionDurationSlow}`},"&-content":{position:"static",width:"auto",height:t.dateContentHeight,overflowY:"auto",color:t.colorText,lineHeight:t.lineHeight,textAlign:"start"},"&-today":{borderColor:t.colorPrimary,[`${e}-date-value`]:{color:t.colorText}}}},[`@media only screen and (max-width: ${t.screenXS}px) `]:{[`${e}`]:{[`${e}-header`]:{display:"block",[`${e}-year-select`]:{width:"50%"},[`${e}-month-select`]:{width:`calc(50% - ${t.paddingXS}px)`},[`${e}-mode-switch`]:{width:"100%",marginTop:t.marginXS,marginInlineStart:0,"> label":{width:"50%",textAlign:"center"}}}}}}},pne=et("Calendar",t=>{const e=`${t.componentCls}-calendar`,n=Ve(al(t),y4(t),{calendarCls:e,pickerCellInnerCls:`${t.componentCls}-cell-inner`,calendarFullBg:t.colorBgContainer,calendarFullPanelBg:t.colorBgContainer,calendarItemActiveBg:t.controlItemBgActive,dateValueHeight:t.controlHeightSM,weekHeight:t.controlHeightSM*.75,dateContentHeight:(t.fontSizeSM*t.lineHeightSM+t.marginXS)*3+t.lineWidth*2});return[hne(n)]},{yearControlWidth:80,monthControlWidth:70,miniContentHeight:256});function gne(t){function e(r,a){return r&&a&&t.getYear(r)===t.getYear(a)}function n(r,a){return e(r,a)&&t.getMonth(r)===t.getMonth(a)}function i(r,a){return n(r,a)&&t.getDate(r)===t.getDate(a)}const o=oe({name:"ACalendar",inheritAttrs:!1,props:{prefixCls:String,locale:{type:Object,default:void 0},validRange:{type:Array,default:void 0},disabledDate:{type:Function,default:void 0},dateFullCellRender:{type:Function,default:void 0},dateCellRender:{type:Function,default:void 0},monthFullCellRender:{type:Function,default:void 0},monthCellRender:{type:Function,default:void 0},headerRender:{type:Function,default:void 0},value:{type:[Object,String],default:void 0},defaultValue:{type:[Object,String],default:void 0},mode:{type:String,default:void 0},fullscreen:{type:Boolean,default:void 0},onChange:{type:Function,default:void 0},"onUpdate:value":{type:Function,default:void 0},onPanelChange:{type:Function,default:void 0},onSelect:{type:Function,default:void 0},valueFormat:{type:String,default:void 0}},slots:Object,setup(r,a){let{emit:s,slots:l,attrs:c}=a;const u=r,{prefixCls:d,direction:f}=Me("picker",u),[h,p]=pne(d),g=L(()=>`${d.value}-calendar`),m=E=>u.valueFormat?t.toString(E,u.valueFormat):E,v=L(()=>u.value?u.valueFormat?t.toDate(u.value,u.valueFormat):u.value:u.value===""?void 0:u.value),b=L(()=>u.defaultValue?u.valueFormat?t.toDate(u.defaultValue,u.valueFormat):u.defaultValue:u.defaultValue===""?void 0:u.defaultValue),[y,w]=jt(()=>v.value||t.getNow(),{defaultValue:b.value,value:v}),[x,$]=jt("month",{value:Ue(u,"mode")}),S=L(()=>x.value==="year"?"month":"date"),_=L(()=>E=>{var R;return(u.validRange?t.isAfter(u.validRange[0],E)||t.isAfter(E,u.validRange[1]):!1)||!!(!((R=u.disabledDate)===null||R===void 0)&&R.call(u,E))}),P=(E,R)=>{s("panelChange",m(E),R)},O=E=>{if(w(E),!i(E,y.value)){(S.value==="date"&&!n(E,y.value)||S.value==="month"&&!e(E,y.value))&&P(E,x.value);const R=m(E);s("update:value",R),s("change",R)}},T=E=>{$(E),P(y.value,E)},M=(E,R)=>{O(E),s("select",m(E),{source:R})},I=L(()=>{const{locale:E}=u,R=A(A({},ld),E);return R.lang=A(A({},R.lang),(E||{}).lang),R}),[k]=xo("Calendar",I);return()=>{const E=t.getNow(),{dateFullCellRender:R=l==null?void 0:l.dateFullCellRender,dateCellRender:D=l==null?void 0:l.dateCellRender,monthFullCellRender:F=l==null?void 0:l.monthFullCellRender,monthCellRender:N=l==null?void 0:l.monthCellRender,headerRender:B=l==null?void 0:l.headerRender,fullscreen:z=!0,validRange:W}=u,j=V=>{let{current:q}=V;return R?R({current:q}):C("div",{class:ce(`${d.value}-cell-inner`,`${g.value}-date`,{[`${g.value}-date-today`]:i(E,q)})},[C("div",{class:`${g.value}-date-value`},[String(t.getDate(q)).padStart(2,"0")]),C("div",{class:`${g.value}-date-content`},[D&&D({current:q})])])},U=(V,q)=>{let{current:Y}=V;if(F)return F({current:Y});const J=q.shortMonths||t.locale.getShortMonths(q.locale);return C("div",{class:ce(`${d.value}-cell-inner`,`${g.value}-date`,{[`${g.value}-date-today`]:n(E,Y)})},[C("div",{class:`${g.value}-date-value`},[J[t.getMonth(Y)]]),C("div",{class:`${g.value}-date-content`},[N&&N({current:Y})])])};return h(C("div",H(H({},c),{},{class:ce(g.value,{[`${g.value}-full`]:z,[`${g.value}-mini`]:!z,[`${g.value}-rtl`]:f.value==="rtl"},c.class,p.value)}),[B?B({value:y.value,type:x.value,onChange:V=>{M(V,"customize")},onTypeChange:T}):C(ine,{prefixCls:g.value,value:y.value,generateConfig:t,mode:x.value,fullscreen:z,locale:k.value.lang,validRange:W,onChange:M,onModeChange:T},null),C($S,{value:y.value,prefixCls:d.value,locale:k.value.lang,generateConfig:t,dateRender:j,monthCellRender:V=>U(V,k.value.lang),onSelect:V=>{M(V,S.value)},mode:S.value,picker:S.value,disabledDate:_.value,hideHeader:!0},null)]))}}});return o.install=function(r){return r.component(o.name,o),r},o}const mne=gne(rS),vne=Vt(mne);function bne(t){const e=ie(),n=ie(!1);function i(){for(var o=arguments.length,r=new Array(o),a=0;a{t(...r)}))}return at(()=>{n.value=!0,lt.cancel(e.value)}),i}function yne(t){const e=ie([]),n=ie(typeof t=="function"?t():t),i=bne(()=>{let r=n.value;e.value.forEach(a=>{r=a(r)}),e.value=[],n.value=r});function o(r){e.value.push(r),i()}return[n,o]}const xne=oe({compatConfig:{MODE:3},name:"TabNode",props:{id:{type:String},prefixCls:{type:String},tab:{type:Object},active:{type:Boolean},closable:{type:Boolean},editable:{type:Object},onClick:{type:Function},onResize:{type:Function},renderWrapper:{type:Function},removeAriaLabel:{type:String},onFocus:{type:Function}},emits:["click","resize","remove","focus"],setup(t,e){let{expose:n,attrs:i}=e;const o=se();function r(l){var c;!((c=t.tab)===null||c===void 0)&&c.disabled||t.onClick(l)}n({domRef:o});function a(l){var c;l.preventDefault(),l.stopPropagation(),t.editable.onEdit("remove",{key:(c=t.tab)===null||c===void 0?void 0:c.key,event:l})}const s=L(()=>{var l;return t.editable&&t.closable!==!1&&!(!((l=t.tab)===null||l===void 0)&&l.disabled)});return()=>{var l;const{prefixCls:c,id:u,active:d,tab:{key:f,tab:h,disabled:p,closeIcon:g},renderWrapper:m,removeAriaLabel:v,editable:b,onFocus:y}=t,w=`${c}-tab`,x=C("div",{key:f,ref:o,class:ce(w,{[`${w}-with-remove`]:s.value,[`${w}-active`]:d,[`${w}-disabled`]:p}),style:i.style,onClick:r},[C("div",{role:"tab","aria-selected":d,id:u&&`${u}-tab-${f}`,class:`${w}-btn`,"aria-controls":u&&`${u}-panel-${f}`,"aria-disabled":p,tabindex:p?null:0,onClick:$=>{$.stopPropagation(),r($)},onKeydown:$=>{[Te.SPACE,Te.ENTER].includes($.which)&&($.preventDefault(),r($))},onFocus:y},[typeof h=="function"?h():h]),s.value&&C("button",{type:"button","aria-label":v||"remove",tabindex:0,class:`${w}-remove`,onClick:$=>{$.stopPropagation(),a($)}},[(g==null?void 0:g())||((l=b.removeIcon)===null||l===void 0?void 0:l.call(b))||"×"])]);return m?m(x):x}}}),eP={width:0,height:0,left:0,top:0};function wne(t,e){const n=se(new Map);return Ke(()=>{var i,o;const r=new Map,a=t.value,s=e.value.get((i=a[0])===null||i===void 0?void 0:i.key)||eP,l=s.left+s.width;for(let c=0;c{const{prefixCls:r,editable:a,locale:s}=t;return!a||a.showAdd===!1?null:C("button",{ref:o,type:"button",class:`${r}-nav-add`,style:i.style,"aria-label":(s==null?void 0:s.addAriaLabel)||"Add tab",onClick:l=>{a.onEdit("add",{event:l})}},[a.addIcon?a.addIcon():"+"])}}}),Sne={prefixCls:{type:String},id:{type:String},tabs:{type:Object},rtl:{type:Boolean},tabBarGutter:{type:Number},activeKey:{type:[String,Number]},mobile:{type:Boolean},moreIcon:Z.any,moreTransitionName:{type:String},editable:{type:Object},locale:{type:Object,default:void 0},removeAriaLabel:String,onTabClick:{type:Function},popupClassName:String,getPopupContainer:ve()},Cne=oe({compatConfig:{MODE:3},name:"OperationNode",inheritAttrs:!1,props:Sne,emits:["tabClick"],slots:Object,setup(t,e){let{attrs:n,slots:i}=e;const[o,r]=Mt(!1),[a,s]=Mt(null),l=h=>{const p=t.tabs.filter(v=>!v.disabled);let g=p.findIndex(v=>v.key===a.value)||0;const m=p.length;for(let v=0;v{const{which:p}=h;if(!o.value){[Te.DOWN,Te.SPACE,Te.ENTER].includes(p)&&(r(!0),h.preventDefault());return}switch(p){case Te.UP:l(-1),h.preventDefault();break;case Te.DOWN:l(1),h.preventDefault();break;case Te.ESC:r(!1);break;case Te.SPACE:case Te.ENTER:a.value!==null&&t.onTabClick(a.value,h);break}},u=L(()=>`${t.id}-more-popup`),d=L(()=>a.value!==null?`${u.value}-${a.value}`:null),f=(h,p)=>{h.preventDefault(),h.stopPropagation(),t.editable.onEdit("remove",{key:p,event:h})};return Ze(()=>{ye(a,()=>{const h=document.getElementById(d.value);h&&h.scrollIntoView&&h.scrollIntoView(!1)},{flush:"post",immediate:!0})}),ye(o,()=>{o.value||s(null)}),tS({}),()=>{var h;const{prefixCls:p,id:g,tabs:m,locale:v,mobile:b,moreIcon:y=((h=i.moreIcon)===null||h===void 0?void 0:h.call(i))||C(Zd,null,null),moreTransitionName:w,editable:x,tabBarGutter:$,rtl:S,onTabClick:_,popupClassName:P}=t;if(!m.length)return null;const O=`${p}-dropdown`,T=v==null?void 0:v.dropdownAriaLabel,M={[S?"marginRight":"marginLeft"]:$};m.length||(M.visibility="hidden",M.order=1);const I=ce({[`${O}-rtl`]:S,[`${P}`]:!0}),k=b?null:C(d3,{prefixCls:O,trigger:["hover"],visible:o.value,transitionName:w,onVisibleChange:r,overlayClassName:I,mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:t.getPopupContainer},{overlay:()=>C(sn,{onClick:E=>{let{key:R,domEvent:D}=E;_(R,D),r(!1)},id:u.value,tabindex:-1,role:"listbox","aria-activedescendant":d.value,selectedKeys:[a.value],"aria-label":T!==void 0?T:"expanded dropdown"},{default:()=>[m.map(E=>{var R,D;const F=x&&E.closable!==!1&&!E.disabled;return C(or,{key:E.key,id:`${u.value}-${E.key}`,role:"option","aria-controls":g&&`${g}-panel-${E.key}`,disabled:E.disabled},{default:()=>[C("span",null,[typeof E.tab=="function"?E.tab():E.tab]),F&&C("button",{type:"button","aria-label":t.removeAriaLabel||"remove",tabindex:0,class:`${O}-menu-item-remove`,onClick:N=>{N.stopPropagation(),f(N,E.key)}},[((R=E.closeIcon)===null||R===void 0?void 0:R.call(E))||((D=x.removeIcon)===null||D===void 0?void 0:D.call(x))||"×"])]})})]}),default:()=>C("button",{type:"button",class:`${p}-nav-more`,style:M,tabindex:-1,"aria-hidden":"true","aria-haspopup":"listbox","aria-controls":u.value,id:`${g}-more`,"aria-expanded":o.value,onKeydown:c},[y])});return C("div",{class:ce(`${p}-nav-operations`,n.class),style:n.style},[k,C(w4,{prefixCls:p,locale:v,editable:x},null)])}}}),S4=Symbol("tabsContextKey"),$ne=t=>{ot(S4,t)},C4=()=>qe(S4,{tabs:se([]),prefixCls:se()}),Ane=.1,tP=.01,_h=20,nP=Math.pow(.995,_h);function _ne(t,e){const[n,i]=Mt(),[o,r]=Mt(0),[a,s]=Mt(0),[l,c]=Mt(),u=se();function d(x){const{screenX:$,screenY:S}=x.touches[0];i({x:$,y:S}),clearInterval(u.value)}function f(x){if(!n.value)return;x.preventDefault();const{screenX:$,screenY:S}=x.touches[0],_=$-n.value.x,P=S-n.value.y;e(_,P),i({x:$,y:S});const O=Date.now();s(O-o.value),r(O),c({x:_,y:P})}function h(){if(!n.value)return;const x=l.value;if(i(null),c(null),x){const $=x.x/a.value,S=x.y/a.value,_=Math.abs($),P=Math.abs(S);if(Math.max(_,P){if(Math.abs(O)O?(_=$,p.value="x"):(_=S,p.value="y"),e(-_,-_)&&x.preventDefault()}const m=se({onTouchStart:d,onTouchMove:f,onTouchEnd:h,onWheel:g});function v(x){m.value.onTouchStart(x)}function b(x){m.value.onTouchMove(x)}function y(x){m.value.onTouchEnd(x)}function w(x){m.value.onWheel(x)}Ze(()=>{var x,$;document.addEventListener("touchmove",b,{passive:!1}),document.addEventListener("touchend",y,{passive:!1}),(x=t.value)===null||x===void 0||x.addEventListener("touchstart",v,{passive:!1}),($=t.value)===null||$===void 0||$.addEventListener("wheel",w,{passive:!1})}),at(()=>{document.removeEventListener("touchmove",b),document.removeEventListener("touchend",y)})}function iP(t,e){const n=se(t);function i(o){const r=typeof o=="function"?o(n.value):o;r!==n.value&&e(r,n.value),n.value=r}return[n,i]}const MS=()=>{const t=se(new Map),e=n=>i=>{t.value.set(n,i)};return Qg(()=>{t.value=new Map}),[e,t]},oP={width:0,height:0,left:0,top:0,right:0},Pne=()=>({id:{type:String},tabPosition:{type:String},activeKey:{type:[String,Number]},rtl:{type:Boolean},animated:Fe(),editable:Fe(),moreIcon:Z.any,moreTransitionName:{type:String},mobile:{type:Boolean},tabBarGutter:{type:Number},renderTabBar:{type:Function},locale:Fe(),popupClassName:String,getPopupContainer:ve(),onTabClick:{type:Function},onTabScroll:{type:Function}}),Tne=(t,e)=>{const{offsetWidth:n,offsetHeight:i,offsetTop:o,offsetLeft:r}=t,{width:a,height:s,x:l,y:c}=t.getBoundingClientRect();return Math.abs(a-n)<1?[a,s,l-e.x,c-e.y]:[n,i,r,o]},rP=oe({compatConfig:{MODE:3},name:"TabNavList",inheritAttrs:!1,props:Pne(),slots:Object,emits:["tabClick","tabScroll"],setup(t,e){let{attrs:n,slots:i}=e;const{tabs:o,prefixCls:r}=C4(),a=ie(),s=ie(),l=ie(),c=ie(),[u,d]=MS(),f=L(()=>t.tabPosition==="top"||t.tabPosition==="bottom"),[h,p]=iP(0,(ne,le)=>{f.value&&t.onTabScroll&&t.onTabScroll({direction:ne>le?"left":"right"})}),[g,m]=iP(0,(ne,le)=>{!f.value&&t.onTabScroll&&t.onTabScroll({direction:ne>le?"top":"bottom"})}),[v,b]=Mt(0),[y,w]=Mt(0),[x,$]=Mt(null),[S,_]=Mt(null),[P,O]=Mt(0),[T,M]=Mt(0),[I,k]=yne(new Map),E=wne(o,I),R=L(()=>`${r.value}-nav-operations-hidden`),D=ie(0),F=ie(0);Ke(()=>{f.value?t.rtl?(D.value=0,F.value=Math.max(0,v.value-x.value)):(D.value=Math.min(0,x.value-v.value),F.value=0):(D.value=Math.min(0,S.value-y.value),F.value=0)});const N=ne=>neF.value?F.value:ne,B=ie(),[z,W]=Mt(),j=()=>{W(Date.now())},U=()=>{clearTimeout(B.value)},V=(ne,le)=>{ne(he=>N(he+le))};_ne(a,(ne,le)=>{if(f.value){if(x.value>=v.value)return!1;V(p,ne)}else{if(S.value>=y.value)return!1;V(m,le)}return U(),j(),!0}),ye(z,()=>{U(),z.value&&(B.value=setTimeout(()=>{W(0)},100))});const q=function(){let ne=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.activeKey;const le=E.value.get(ne)||{width:0,height:0,left:0,right:0,top:0};if(f.value){let he=h.value;t.rtl?le.righth.value+x.value&&(he=le.right+le.width-x.value):le.left<-h.value?he=-le.left:le.left+le.width>-h.value+x.value&&(he=-(le.left+le.width-x.value)),m(0),p(N(he))}else{let he=g.value;le.top<-g.value?he=-le.top:le.top+le.height>-g.value+S.value&&(he=-(le.top+le.height-S.value)),p(0),m(N(he))}},Y=ie(0),J=ie(0);Ke(()=>{let ne,le,he,pe,ge,be;const $e=E.value;["top","bottom"].includes(t.tabPosition)?(ne="width",pe=x.value,ge=v.value,be=P.value,le=t.rtl?"right":"left",he=Math.abs(h.value)):(ne="height",pe=S.value,ge=v.value,be=T.value,le="top",he=-g.value);let fe=pe;ge+be>pe&&gehe+fe){_e=Re-1;break}}let Oe=0;for(let Re=xe-1;Re>=0;Re-=1)if(($e.get(de[Re].key)||oP)[le]{k(()=>{var ne;const le=new Map,he=(ne=s.value)===null||ne===void 0?void 0:ne.getBoundingClientRect();return o.value.forEach(pe=>{let{key:ge}=pe;const be=d.value.get(ge),$e=(be==null?void 0:be.$el)||be;if($e){const[fe,de,xe,_e]=Tne($e,he);le.set(ge,{width:fe,height:de,left:xe,top:_e})}}),le})};ye(()=>o.value.map(ne=>ne.key).join("%%"),()=>{Q()},{flush:"post"});const G=()=>{var ne,le,he,pe,ge;const be=((ne=a.value)===null||ne===void 0?void 0:ne.offsetWidth)||0,$e=((le=a.value)===null||le===void 0?void 0:le.offsetHeight)||0,fe=((he=c.value)===null||he===void 0?void 0:he.$el)||{},de=fe.offsetWidth||0,xe=fe.offsetHeight||0;$(be),_($e),O(de),M(xe);const _e=(((pe=s.value)===null||pe===void 0?void 0:pe.offsetWidth)||0)-de,Oe=(((ge=s.value)===null||ge===void 0?void 0:ge.offsetHeight)||0)-xe;b(_e),w(Oe),Q()},ee=L(()=>[...o.value.slice(0,Y.value),...o.value.slice(J.value+1)]),[X,K]=Mt(),te=L(()=>E.value.get(t.activeKey)),ue=ie(),ae=()=>{lt.cancel(ue.value)};ye([te,f,()=>t.rtl],()=>{const ne={};te.value&&(f.value?(t.rtl?ne.right=ss(te.value.right):ne.left=ss(te.value.left),ne.width=ss(te.value.width)):(ne.top=ss(te.value.top),ne.height=ss(te.value.height))),ae(),ue.value=lt(()=>{K(ne)})}),ye([()=>t.activeKey,te,E,f],()=>{q()},{flush:"post"}),ye([()=>t.rtl,()=>t.tabBarGutter,()=>t.activeKey,()=>o.value],()=>{G()},{flush:"post"});const re=ne=>{let{position:le,prefixCls:he,extra:pe}=ne;if(!pe)return null;const ge=pe==null?void 0:pe({position:le});return ge?C("div",{class:`${he}-extra-content`},[ge]):null};return at(()=>{U(),ae()}),()=>{const{id:ne,animated:le,activeKey:he,rtl:pe,editable:ge,locale:be,tabPosition:$e,tabBarGutter:fe,onTabClick:de}=t,{class:xe,style:_e}=n,Oe=r.value,Re=!!ee.value.length,Se=`${Oe}-nav-wrap`;let Ae,Pe,ke,Le;f.value?pe?(Pe=h.value>0,Ae=h.value+x.value{const{key:yt}=ft;return C(xne,{id:ne,prefixCls:Oe,key:yt,tab:ft,style:_t===0?void 0:De,closable:ft.closable,editable:ge,active:yt===he,removeAriaLabel:be==null?void 0:be.removeAriaLabel,ref:u(yt),onClick:Pt=>{de(yt,Pt)},onFocus:()=>{q(yt),j(),a.value&&(pe||(a.value.scrollLeft=0),a.value.scrollTop=0)}},i)});return C("div",{role:"tablist",class:ce(`${Oe}-nav`,xe),style:_e,onKeydown:()=>{j()}},[C(re,{position:"left",prefixCls:Oe,extra:i.leftExtra},null),C(mo,{onResize:G},{default:()=>[C("div",{class:ce(Se,{[`${Se}-ping-left`]:Ae,[`${Se}-ping-right`]:Pe,[`${Se}-ping-top`]:ke,[`${Se}-ping-bottom`]:Le}),ref:a},[C(mo,{onResize:G},{default:()=>[C("div",{ref:s,class:`${Oe}-nav-list`,style:{transform:`translate(${h.value}px, ${g.value}px)`,transition:z.value?"none":void 0}},[je,C(w4,{ref:c,prefixCls:Oe,locale:be,editable:ge,style:A(A({},je.length===0?void 0:De),{visibility:Re?"hidden":null})},null),C("div",{class:ce(`${Oe}-ink-bar`,{[`${Oe}-ink-bar-animated`]:le.inkBar}),style:X.value},null)])]})])]}),C(Cne,H(H({},t),{},{removeAriaLabel:be==null?void 0:be.removeAriaLabel,ref:l,prefixCls:Oe,tabs:ee.value,class:!Re&&R.value}),n3(i,["moreIcon"])),C(re,{position:"right",prefixCls:Oe,extra:i.rightExtra},null),C(re,{position:"right",prefixCls:Oe,extra:i.tabBarExtraContent},null)])}}}),One=oe({compatConfig:{MODE:3},name:"TabPanelList",inheritAttrs:!1,props:{activeKey:{type:[String,Number]},id:{type:String},rtl:{type:Boolean},animated:{type:Object,default:void 0},tabPosition:{type:String},destroyInactiveTabPane:{type:Boolean}},setup(t){const{tabs:e,prefixCls:n}=C4();return()=>{const{id:i,activeKey:o,animated:r,tabPosition:a,rtl:s,destroyInactiveTabPane:l}=t,c=r.tabPane,u=n.value,d=e.value.findIndex(f=>f.key===o);return C("div",{class:`${u}-content-holder`},[C("div",{class:[`${u}-content`,`${u}-content-${a}`,{[`${u}-content-animated`]:c}],style:d&&c?{[s?"marginRight":"marginLeft"]:`-${d}00%`}:null},[e.value.map(f=>At(f.node,{key:f.key,prefixCls:u,tabKey:f.key,id:i,animated:c,active:f.key===o,destroyInactiveTabPane:l}))])])}}});var Ene={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};function aP(t){for(var e=1;e{const{componentCls:e,motionDurationSlow:n}=t;return[{[e]:{[`${e}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${n}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${n}`}}}}},[lr(t,"slide-up"),lr(t,"slide-down")]]},kne=t=>{const{componentCls:e,tabsCardHorizontalPadding:n,tabsCardHeadBackground:i,tabsCardGutter:o,colorSplit:r}=t;return{[`${e}-card`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{margin:0,padding:n,background:i,border:`${t.lineWidth}px ${t.lineType} ${r}`,transition:`all ${t.motionDurationSlow} ${t.motionEaseInOut}`},[`${e}-tab-active`]:{color:t.colorPrimary,background:t.colorBgContainer},[`${e}-ink-bar`]:{visibility:"hidden"}},[`&${e}-top, &${e}-bottom`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab + ${e}-tab`]:{marginLeft:{_skip_check_:!0,value:`${o}px`}}}},[`&${e}-top`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{borderRadius:`${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`},[`${e}-tab-active`]:{borderBottomColor:t.colorBgContainer}}},[`&${e}-bottom`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{borderRadius:`0 0 ${t.borderRadiusLG}px ${t.borderRadiusLG}px`},[`${e}-tab-active`]:{borderTopColor:t.colorBgContainer}}},[`&${e}-left, &${e}-right`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab + ${e}-tab`]:{marginTop:`${o}px`}}},[`&${e}-left`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{borderRadius:{_skip_check_:!0,value:`${t.borderRadiusLG}px 0 0 ${t.borderRadiusLG}px`}},[`${e}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:t.colorBgContainer}}}},[`&${e}-right`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${t.borderRadiusLG}px ${t.borderRadiusLG}px 0`}},[`${e}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:t.colorBgContainer}}}}}}},Dne=t=>{const{componentCls:e,tabsHoverColor:n,dropdownEdgeChildVerticalPadding:i}=t;return{[`${e}-dropdown`]:A(A({},rt(t)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:t.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${e}-dropdown-menu`]:{maxHeight:t.tabsDropdownHeight,margin:0,padding:`${i}px 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:t.colorBgContainer,backgroundClip:"padding-box",borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary,"&-item":A(A({},un),{display:"flex",alignItems:"center",minWidth:t.tabsDropdownWidth,margin:0,padding:`${t.paddingXXS}px ${t.paddingSM}px`,color:t.colorText,fontWeight:"normal",fontSize:t.fontSize,lineHeight:t.lineHeight,cursor:"pointer",transition:`all ${t.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:t.marginSM},color:t.colorTextDescription,fontSize:t.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:n}},"&:hover":{background:t.controlItemBgHover},"&-disabled":{"&, &:hover":{color:t.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}})}})}},Rne=t=>{const{componentCls:e,margin:n,colorSplit:i}=t;return{[`${e}-top, ${e}-bottom`]:{flexDirection:"column",[`> ${e}-nav, > div > ${e}-nav`]:{margin:`0 0 ${n}px 0`,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${t.lineWidth}px ${t.lineType} ${i}`,content:"''"},[`${e}-ink-bar`]:{height:t.lineWidthBold,"&-animated":{transition:`width ${t.motionDurationSlow}, left ${t.motionDurationSlow}, right ${t.motionDurationSlow}`}},[`${e}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:t.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:t.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:t.boxShadowTabsOverflowRight},[`&${e}-nav-wrap-ping-left::before`]:{opacity:1},[`&${e}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${e}-top`]:{[`> ${e}-nav, - > div > ${e}-nav`]:{"&::before":{bottom:0},[`${e}-ink-bar`]:{bottom:0}}},[`${e}-bottom`]:{[`> ${e}-nav, > div > ${e}-nav`]:{order:1,marginTop:`${n}px`,marginBottom:0,"&::before":{top:0},[`${e}-ink-bar`]:{top:0}},[`> ${e}-content-holder, > div > ${e}-content-holder`]:{order:0}},[`${e}-left, ${e}-right`]:{[`> ${e}-nav, > div > ${e}-nav`]:{flexDirection:"column",minWidth:t.controlHeight*1.25,[`${e}-tab`]:{padding:`${t.paddingXS}px ${t.paddingLG}px`,textAlign:"center"},[`${e}-tab + ${e}-tab`]:{margin:`${t.margin}px 0 0 0`},[`${e}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:t.controlHeight},"&::before":{top:0,boxShadow:t.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:t.boxShadowTabsOverflowBottom},[`&${e}-nav-wrap-ping-top::before`]:{opacity:1},[`&${e}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${e}-ink-bar`]:{width:t.lineWidthBold,"&-animated":{transition:`height ${t.motionDurationSlow}, top ${t.motionDurationSlow}`}},[`${e}-nav-list, ${e}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${e}-left`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${e}-content-holder, > div > ${e}-content-holder`]:{marginLeft:{_skip_check_:!0,value:`-${t.lineWidth}px`},borderLeft:{_skip_check_:!0,value:`${t.lineWidth}px ${t.lineType} ${t.colorBorder}`},[`> ${e}-content > ${e}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:t.paddingLG}}}},[`${e}-right`]:{[`> ${e}-nav, > div > ${e}-nav`]:{order:1,[`${e}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${e}-content-holder, > div > ${e}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:-t.lineWidth},borderRight:{_skip_check_:!0,value:`${t.lineWidth}px ${t.lineType} ${t.colorBorder}`},[`> ${e}-content > ${e}-tabpane`]:{paddingRight:{_skip_check_:!0,value:t.paddingLG}}}}}},Lne=t=>{const{componentCls:e,padding:n}=t;return{[e]:{"&-small":{[`> ${e}-nav`]:{[`${e}-tab`]:{padding:`${t.paddingXS}px 0`,fontSize:t.fontSize}}},"&-large":{[`> ${e}-nav`]:{[`${e}-tab`]:{padding:`${n}px 0`,fontSize:t.fontSizeLG}}}},[`${e}-card`]:{[`&${e}-small`]:{[`> ${e}-nav`]:{[`${e}-tab`]:{padding:`${t.paddingXXS*1.5}px ${n}px`}},[`&${e}-bottom`]:{[`> ${e}-nav ${e}-tab`]:{borderRadius:`0 0 ${t.borderRadius}px ${t.borderRadius}px`}},[`&${e}-top`]:{[`> ${e}-nav ${e}-tab`]:{borderRadius:`${t.borderRadius}px ${t.borderRadius}px 0 0`}},[`&${e}-right`]:{[`> ${e}-nav ${e}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${t.borderRadius}px ${t.borderRadius}px 0`}}},[`&${e}-left`]:{[`> ${e}-nav ${e}-tab`]:{borderRadius:{_skip_check_:!0,value:`${t.borderRadius}px 0 0 ${t.borderRadius}px`}}}},[`&${e}-large`]:{[`> ${e}-nav`]:{[`${e}-tab`]:{padding:`${t.paddingXS}px ${n}px ${t.paddingXXS*1.5}px`}}}}}},Fne=t=>{const{componentCls:e,tabsActiveColor:n,tabsHoverColor:i,iconCls:o,tabsHorizontalGutter:r}=t,a=`${e}-tab`;return{[a]:{position:"relative",display:"inline-flex",alignItems:"center",padding:`${t.paddingSM}px 0`,fontSize:`${t.fontSize}px`,background:"transparent",border:0,outline:"none",cursor:"pointer","&-btn, &-remove":A({"&:focus:not(:focus-visible), &:active":{color:n}},Hr(t)),"&-btn":{outline:"none",transition:"all 0.3s"},"&-remove":{flex:"none",marginRight:{_skip_check_:!0,value:-t.marginXXS},marginLeft:{_skip_check_:!0,value:t.marginXS},color:t.colorTextDescription,fontSize:t.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${t.motionDurationSlow}`,"&:hover":{color:t.colorTextHeading}},"&:hover":{color:i},[`&${a}-active ${a}-btn`]:{color:t.colorPrimary,textShadow:t.tabsActiveTextShadow},[`&${a}-disabled`]:{color:t.colorTextDisabled,cursor:"not-allowed"},[`&${a}-disabled ${a}-btn, &${a}-disabled ${e}-remove`]:{"&:focus, &:active":{color:t.colorTextDisabled}},[`& ${a}-remove ${o}`]:{margin:0},[o]:{marginRight:{_skip_check_:!0,value:t.marginSM}}},[`${a} + ${a}`]:{margin:{_skip_check_:!0,value:`0 0 0 ${r}px`}}}},Nne=t=>{const{componentCls:e,tabsHorizontalGutter:n,iconCls:i,tabsCardGutter:o}=t;return{[`${e}-rtl`]:{direction:"rtl",[`${e}-nav`]:{[`${e}-tab`]:{margin:{_skip_check_:!0,value:`0 0 0 ${n}px`},[`${e}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[i]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:`${t.marginSM}px`}},[`${e}-tab-remove`]:{marginRight:{_skip_check_:!0,value:`${t.marginXS}px`},marginLeft:{_skip_check_:!0,value:`-${t.marginXXS}px`},[i]:{margin:0}}}},[`&${e}-left`]:{[`> ${e}-nav`]:{order:1},[`> ${e}-content-holder`]:{order:0}},[`&${e}-right`]:{[`> ${e}-nav`]:{order:0},[`> ${e}-content-holder`]:{order:1}},[`&${e}-card${e}-top, &${e}-card${e}-bottom`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab + ${e}-tab`]:{marginRight:{_skip_check_:!0,value:`${o}px`},marginLeft:{_skip_check_:!0,value:0}}}}},[`${e}-dropdown-rtl`]:{direction:"rtl"},[`${e}-menu-item`]:{[`${e}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},Bne=t=>{const{componentCls:e,tabsCardHorizontalPadding:n,tabsCardHeight:i,tabsCardGutter:o,tabsHoverColor:r,tabsActiveColor:a,colorSplit:s}=t;return{[e]:A(A(A(A({},rt(t)),{display:"flex",[`> ${e}-nav, > div > ${e}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${e}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${t.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${e}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${t.motionDurationSlow}`},[`${e}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${e}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${e}-nav-more`]:{position:"relative",padding:n,background:"transparent",border:0,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:t.controlHeightLG/8,transform:"translateY(100%)",content:"''"}},[`${e}-nav-add`]:A({minWidth:`${i}px`,marginLeft:{_skip_check_:!0,value:`${o}px`},padding:`0 ${t.paddingXS}px`,background:"transparent",border:`${t.lineWidth}px ${t.lineType} ${s}`,borderRadius:`${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`,outline:"none",cursor:"pointer",color:t.colorText,transition:`all ${t.motionDurationSlow} ${t.motionEaseInOut}`,"&:hover":{color:r},"&:active, &:focus:not(:focus-visible)":{color:a}},Hr(t))},[`${e}-extra-content`]:{flex:"none"},[`${e}-ink-bar`]:{position:"absolute",background:t.colorPrimary,pointerEvents:"none"}}),Fne(t)),{[`${e}-content`]:{position:"relative",display:"flex",width:"100%","&-animated":{transition:"margin 0.3s"}},[`${e}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${e}-tabpane`]:{outline:"none",flex:"none",width:"100%"}}),[`${e}-centered`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-nav-wrap`]:{[`&:not([class*='${e}-nav-wrap-ping'])`]:{justifyContent:"center"}}}}}},zne=et("Tabs",t=>{const e=t.controlHeightLG,n=Ve(t,{tabsHoverColor:t.colorPrimaryHover,tabsActiveColor:t.colorPrimaryActive,tabsCardHorizontalPadding:`${(e-Math.round(t.fontSize*t.lineHeight))/2-t.lineWidth}px ${t.padding}px`,tabsCardHeight:e,tabsCardGutter:t.marginXXS/2,tabsHorizontalGutter:32,tabsCardHeadBackground:t.colorFillAlter,dropdownEdgeChildVerticalPadding:t.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120});return[Lne(n),Nne(n),Rne(n),Dne(n),kne(n),Bne(n),Ine(n)]},t=>({zIndexPopup:t.zIndexPopupBase+50}));let sP=0;const $4=()=>({prefixCls:{type:String},id:{type:String},popupClassName:String,getPopupContainer:ve(),activeKey:{type:[String,Number]},defaultActiveKey:{type:[String,Number]},direction:Ne(),animated:Xe([Boolean,Object]),renderTabBar:ve(),tabBarGutter:{type:Number},tabBarStyle:Fe(),tabPosition:Ne(),destroyInactiveTabPane:Ce(),hideAdd:Boolean,type:Ne(),size:Ne(),centered:Boolean,onEdit:ve(),onChange:ve(),onTabClick:ve(),onTabScroll:ve(),"onUpdate:activeKey":ve(),locale:Fe(),onPrevClick:ve(),onNextClick:ve(),tabBarExtraContent:Z.any});function Hne(t){return t.map(e=>{if(cn(e)){const n=A({},e.props||{});for(const[f,h]of Object.entries(n))delete n[f],n[wc(f)]=h;const i=e.children||{},o=e.key!==void 0?e.key:void 0,{tab:r=i.tab,disabled:a,forceRender:s,closable:l,animated:c,active:u,destroyInactiveTabPane:d}=n;return A(A({key:o},n),{node:e,closeIcon:i.closeIcon,tab:r,disabled:a===""||a,forceRender:s===""||s,closable:l===""||l,animated:c===""||c,active:u===""||u,destroyInactiveTabPane:d===""||d})}return null}).filter(e=>e)}const Wne=oe({compatConfig:{MODE:3},name:"InternalTabs",inheritAttrs:!1,props:A(A({},ct($4(),{tabPosition:"top",animated:{inkBar:!0,tabPane:!1}})),{tabs:xt()}),slots:Object,setup(t,e){let{attrs:n,slots:i}=e;Nt(t.onPrevClick===void 0&&t.onNextClick===void 0,"Tabs","`onPrevClick / @prevClick` and `onNextClick / @nextClick` has been removed. Please use `onTabScroll / @tabScroll` instead."),Nt(t.tabBarExtraContent===void 0,"Tabs","`tabBarExtraContent` prop has been removed. Please use `rightExtra` slot instead."),Nt(i.tabBarExtraContent===void 0,"Tabs","`tabBarExtraContent` slot is deprecated. Please use `rightExtra` slot instead.");const{prefixCls:o,direction:r,size:a,rootPrefixCls:s,getPopupContainer:l}=Me("tabs",t),[c,u]=zne(o),d=L(()=>r.value==="rtl"),f=L(()=>{const{animated:S,tabPosition:_}=t;return S===!1||["left","right"].includes(_)?{inkBar:!1,tabPane:!1}:S===!0?{inkBar:!0,tabPane:!0}:A({inkBar:!0,tabPane:!1},typeof S=="object"?S:{})}),[h,p]=Mt(!1);Ze(()=>{p(w1())});const[g,m]=jt(()=>{var S;return(S=t.tabs[0])===null||S===void 0?void 0:S.key},{value:L(()=>t.activeKey),defaultValue:t.defaultActiveKey}),[v,b]=Mt(()=>t.tabs.findIndex(S=>S.key===g.value));Ke(()=>{var S;let _=t.tabs.findIndex(P=>P.key===g.value);_===-1&&(_=Math.max(0,Math.min(v.value,t.tabs.length-1)),m((S=t.tabs[_])===null||S===void 0?void 0:S.key)),b(_)});const[y,w]=jt(null,{value:L(()=>t.id)}),x=L(()=>h.value&&!["left","right"].includes(t.tabPosition)?"top":t.tabPosition);Ze(()=>{t.id||(w(`rc-tabs-${sP}`),sP+=1)});const $=(S,_)=>{var P,O;(P=t.onTabClick)===null||P===void 0||P.call(t,S,_);const T=S!==g.value;m(S),T&&((O=t.onChange)===null||O===void 0||O.call(t,S))};return $ne({tabs:L(()=>t.tabs),prefixCls:o}),()=>{const{id:S,type:_,tabBarGutter:P,tabBarStyle:O,locale:T,destroyInactiveTabPane:M,renderTabBar:I=i.renderTabBar,onTabScroll:k,hideAdd:E,centered:R}=t,D={id:y.value,activeKey:g.value,animated:f.value,tabPosition:x.value,rtl:d.value,mobile:h.value};let F;_==="editable-card"&&(F={onEdit:(W,j)=>{let{key:U,event:V}=j;var q;(q=t.onEdit)===null||q===void 0||q.call(t,W==="add"?V:U,W)},removeIcon:()=>C(ai,null,null),addIcon:i.addIcon?i.addIcon:()=>C(IS,null,null),showAdd:E!==!0});let N;const B=A(A({},D),{moreTransitionName:`${s.value}-slide-up`,editable:F,locale:T,tabBarGutter:P,onTabClick:$,onTabScroll:k,style:O,getPopupContainer:l.value,popupClassName:ce(t.popupClassName,u.value)});I?N=I(A(A({},B),{DefaultTabBar:rP})):N=C(rP,B,n3(i,["moreIcon","leftExtra","rightExtra","tabBarExtraContent"]));const z=o.value;return c(C("div",H(H({},n),{},{id:S,class:ce(z,`${z}-${x.value}`,{[u.value]:!0,[`${z}-${a.value}`]:a.value,[`${z}-card`]:["card","editable-card"].includes(_),[`${z}-editable-card`]:_==="editable-card",[`${z}-centered`]:R,[`${z}-mobile`]:h.value,[`${z}-editable`]:_==="editable-card",[`${z}-rtl`]:d.value},n.class)}),[N,C(One,H(H({destroyInactiveTabPane:M},D),{},{animated:f.value}),null)]))}}}),$s=oe({compatConfig:{MODE:3},name:"ATabs",inheritAttrs:!1,props:ct($4(),{tabPosition:"top",animated:{inkBar:!0,tabPane:!1}}),slots:Object,setup(t,e){let{attrs:n,slots:i,emit:o}=e;const r=a=>{o("update:activeKey",a),o("change",a)};return()=>{var a;const s=Hne(Dt((a=i.default)===null||a===void 0?void 0:a.call(i)));return C(Wne,H(H(H({},ht(t,["onUpdate:activeKey"])),n),{},{onChange:r,tabs:s}),i)}}}),jne=()=>({tab:Z.any,disabled:{type:Boolean},forceRender:{type:Boolean},closable:{type:Boolean},animated:{type:Boolean},active:{type:Boolean},destroyInactiveTabPane:{type:Boolean},prefixCls:{type:String},tabKey:{type:[String,Number]},id:{type:String}}),ng=oe({compatConfig:{MODE:3},name:"ATabPane",inheritAttrs:!1,__ANT_TAB_PANE:!0,props:jne(),slots:Object,setup(t,e){let{attrs:n,slots:i}=e;const o=se(t.forceRender);ye([()=>t.active,()=>t.destroyInactiveTabPane],()=>{t.active?o.value=!0:t.destroyInactiveTabPane&&(o.value=!1)},{immediate:!0});const r=L(()=>t.active?{}:t.animated?{visibility:"hidden",height:0,overflowY:"hidden"}:{display:"none"});return()=>{var a;const{prefixCls:s,forceRender:l,id:c,active:u,tabKey:d}=t;return C("div",{id:c&&`${c}-panel-${d}`,role:"tabpanel",tabindex:u?0:-1,"aria-labelledby":c&&`${c}-tab-${d}`,"aria-hidden":!u,style:[r.value,n.style],class:[`${s}-tabpane`,u&&`${s}-tabpane-active`,n.class]},[(u||o.value||l)&&((a=i.default)===null||a===void 0?void 0:a.call(i))])}}});$s.TabPane=ng;$s.install=function(t){return t.component($s.name,$s),t.component(ng.name,ng),t};const Vne=t=>{const{antCls:e,componentCls:n,cardHeadHeight:i,cardPaddingBase:o,cardHeadTabsMarginBottom:r}=t;return A(A({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:i,marginBottom:-1,padding:`0 ${o}px`,color:t.colorTextHeading,fontWeight:t.fontWeightStrong,fontSize:t.fontSizeLG,background:"transparent",borderBottom:`${t.lineWidth}px ${t.lineType} ${t.colorBorderSecondary}`,borderRadius:`${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`},Do()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":A(A({display:"inline-block",flex:1},un),{[` + > div > ${e}-nav`]:{"&::before":{bottom:0},[`${e}-ink-bar`]:{bottom:0}}},[`${e}-bottom`]:{[`> ${e}-nav, > div > ${e}-nav`]:{order:1,marginTop:`${n}px`,marginBottom:0,"&::before":{top:0},[`${e}-ink-bar`]:{top:0}},[`> ${e}-content-holder, > div > ${e}-content-holder`]:{order:0}},[`${e}-left, ${e}-right`]:{[`> ${e}-nav, > div > ${e}-nav`]:{flexDirection:"column",minWidth:t.controlHeight*1.25,[`${e}-tab`]:{padding:`${t.paddingXS}px ${t.paddingLG}px`,textAlign:"center"},[`${e}-tab + ${e}-tab`]:{margin:`${t.margin}px 0 0 0`},[`${e}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:t.controlHeight},"&::before":{top:0,boxShadow:t.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:t.boxShadowTabsOverflowBottom},[`&${e}-nav-wrap-ping-top::before`]:{opacity:1},[`&${e}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${e}-ink-bar`]:{width:t.lineWidthBold,"&-animated":{transition:`height ${t.motionDurationSlow}, top ${t.motionDurationSlow}`}},[`${e}-nav-list, ${e}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${e}-left`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${e}-content-holder, > div > ${e}-content-holder`]:{marginLeft:{_skip_check_:!0,value:`-${t.lineWidth}px`},borderLeft:{_skip_check_:!0,value:`${t.lineWidth}px ${t.lineType} ${t.colorBorder}`},[`> ${e}-content > ${e}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:t.paddingLG}}}},[`${e}-right`]:{[`> ${e}-nav, > div > ${e}-nav`]:{order:1,[`${e}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${e}-content-holder, > div > ${e}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:-t.lineWidth},borderRight:{_skip_check_:!0,value:`${t.lineWidth}px ${t.lineType} ${t.colorBorder}`},[`> ${e}-content > ${e}-tabpane`]:{paddingRight:{_skip_check_:!0,value:t.paddingLG}}}}}},Lne=t=>{const{componentCls:e,padding:n}=t;return{[e]:{"&-small":{[`> ${e}-nav`]:{[`${e}-tab`]:{padding:`${t.paddingXS}px 0`,fontSize:t.fontSize}}},"&-large":{[`> ${e}-nav`]:{[`${e}-tab`]:{padding:`${n}px 0`,fontSize:t.fontSizeLG}}}},[`${e}-card`]:{[`&${e}-small`]:{[`> ${e}-nav`]:{[`${e}-tab`]:{padding:`${t.paddingXXS*1.5}px ${n}px`}},[`&${e}-bottom`]:{[`> ${e}-nav ${e}-tab`]:{borderRadius:`0 0 ${t.borderRadius}px ${t.borderRadius}px`}},[`&${e}-top`]:{[`> ${e}-nav ${e}-tab`]:{borderRadius:`${t.borderRadius}px ${t.borderRadius}px 0 0`}},[`&${e}-right`]:{[`> ${e}-nav ${e}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${t.borderRadius}px ${t.borderRadius}px 0`}}},[`&${e}-left`]:{[`> ${e}-nav ${e}-tab`]:{borderRadius:{_skip_check_:!0,value:`${t.borderRadius}px 0 0 ${t.borderRadius}px`}}}},[`&${e}-large`]:{[`> ${e}-nav`]:{[`${e}-tab`]:{padding:`${t.paddingXS}px ${n}px ${t.paddingXXS*1.5}px`}}}}}},Fne=t=>{const{componentCls:e,tabsActiveColor:n,tabsHoverColor:i,iconCls:o,tabsHorizontalGutter:r}=t,a=`${e}-tab`;return{[a]:{position:"relative",display:"inline-flex",alignItems:"center",padding:`${t.paddingSM}px 0`,fontSize:`${t.fontSize}px`,background:"transparent",border:0,outline:"none",cursor:"pointer","&-btn, &-remove":A({"&:focus:not(:focus-visible), &:active":{color:n}},Hr(t)),"&-btn":{outline:"none",transition:"all 0.3s"},"&-remove":{flex:"none",marginRight:{_skip_check_:!0,value:-t.marginXXS},marginLeft:{_skip_check_:!0,value:t.marginXS},color:t.colorTextDescription,fontSize:t.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${t.motionDurationSlow}`,"&:hover":{color:t.colorTextHeading}},"&:hover":{color:i},[`&${a}-active ${a}-btn`]:{color:t.colorPrimary,textShadow:t.tabsActiveTextShadow},[`&${a}-disabled`]:{color:t.colorTextDisabled,cursor:"not-allowed"},[`&${a}-disabled ${a}-btn, &${a}-disabled ${e}-remove`]:{"&:focus, &:active":{color:t.colorTextDisabled}},[`& ${a}-remove ${o}`]:{margin:0},[o]:{marginRight:{_skip_check_:!0,value:t.marginSM}}},[`${a} + ${a}`]:{margin:{_skip_check_:!0,value:`0 0 0 ${r}px`}}}},Nne=t=>{const{componentCls:e,tabsHorizontalGutter:n,iconCls:i,tabsCardGutter:o}=t;return{[`${e}-rtl`]:{direction:"rtl",[`${e}-nav`]:{[`${e}-tab`]:{margin:{_skip_check_:!0,value:`0 0 0 ${n}px`},[`${e}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[i]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:`${t.marginSM}px`}},[`${e}-tab-remove`]:{marginRight:{_skip_check_:!0,value:`${t.marginXS}px`},marginLeft:{_skip_check_:!0,value:`-${t.marginXXS}px`},[i]:{margin:0}}}},[`&${e}-left`]:{[`> ${e}-nav`]:{order:1},[`> ${e}-content-holder`]:{order:0}},[`&${e}-right`]:{[`> ${e}-nav`]:{order:0},[`> ${e}-content-holder`]:{order:1}},[`&${e}-card${e}-top, &${e}-card${e}-bottom`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-tab + ${e}-tab`]:{marginRight:{_skip_check_:!0,value:`${o}px`},marginLeft:{_skip_check_:!0,value:0}}}}},[`${e}-dropdown-rtl`]:{direction:"rtl"},[`${e}-menu-item`]:{[`${e}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},Bne=t=>{const{componentCls:e,tabsCardHorizontalPadding:n,tabsCardHeight:i,tabsCardGutter:o,tabsHoverColor:r,tabsActiveColor:a,colorSplit:s}=t;return{[e]:A(A(A(A({},rt(t)),{display:"flex",[`> ${e}-nav, > div > ${e}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${e}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${t.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${e}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${t.motionDurationSlow}`},[`${e}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${e}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${e}-nav-more`]:{position:"relative",padding:n,background:"transparent",border:0,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:t.controlHeightLG/8,transform:"translateY(100%)",content:"''"}},[`${e}-nav-add`]:A({minWidth:`${i}px`,marginLeft:{_skip_check_:!0,value:`${o}px`},padding:`0 ${t.paddingXS}px`,background:"transparent",border:`${t.lineWidth}px ${t.lineType} ${s}`,borderRadius:`${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`,outline:"none",cursor:"pointer",color:t.colorText,transition:`all ${t.motionDurationSlow} ${t.motionEaseInOut}`,"&:hover":{color:r},"&:active, &:focus:not(:focus-visible)":{color:a}},Hr(t))},[`${e}-extra-content`]:{flex:"none"},[`${e}-ink-bar`]:{position:"absolute",background:t.colorPrimary,pointerEvents:"none"}}),Fne(t)),{[`${e}-content`]:{position:"relative",display:"flex",width:"100%","&-animated":{transition:"margin 0.3s"}},[`${e}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${e}-tabpane`]:{outline:"none",flex:"none",width:"100%"}}),[`${e}-centered`]:{[`> ${e}-nav, > div > ${e}-nav`]:{[`${e}-nav-wrap`]:{[`&:not([class*='${e}-nav-wrap-ping'])`]:{justifyContent:"center"}}}}}},zne=et("Tabs",t=>{const e=t.controlHeightLG,n=Ve(t,{tabsHoverColor:t.colorPrimaryHover,tabsActiveColor:t.colorPrimaryActive,tabsCardHorizontalPadding:`${(e-Math.round(t.fontSize*t.lineHeight))/2-t.lineWidth}px ${t.padding}px`,tabsCardHeight:e,tabsCardGutter:t.marginXXS/2,tabsHorizontalGutter:32,tabsCardHeadBackground:t.colorFillAlter,dropdownEdgeChildVerticalPadding:t.paddingXXS,tabsActiveTextShadow:"0 0 0.25px currentcolor",tabsDropdownHeight:200,tabsDropdownWidth:120});return[Lne(n),Nne(n),Rne(n),Dne(n),kne(n),Bne(n),Ine(n)]},t=>({zIndexPopup:t.zIndexPopupBase+50}));let sP=0;const $4=()=>({prefixCls:{type:String},id:{type:String},popupClassName:String,getPopupContainer:ve(),activeKey:{type:[String,Number]},defaultActiveKey:{type:[String,Number]},direction:Ne(),animated:Xe([Boolean,Object]),renderTabBar:ve(),tabBarGutter:{type:Number},tabBarStyle:Fe(),tabPosition:Ne(),destroyInactiveTabPane:Ce(),hideAdd:Boolean,type:Ne(),size:Ne(),centered:Boolean,onEdit:ve(),onChange:ve(),onTabClick:ve(),onTabScroll:ve(),"onUpdate:activeKey":ve(),locale:Fe(),onPrevClick:ve(),onNextClick:ve(),tabBarExtraContent:Z.any});function Hne(t){return t.map(e=>{if(cn(e)){const n=A({},e.props||{});for(const[f,h]of Object.entries(n))delete n[f],n[Sc(f)]=h;const i=e.children||{},o=e.key!==void 0?e.key:void 0,{tab:r=i.tab,disabled:a,forceRender:s,closable:l,animated:c,active:u,destroyInactiveTabPane:d}=n;return A(A({key:o},n),{node:e,closeIcon:i.closeIcon,tab:r,disabled:a===""||a,forceRender:s===""||s,closable:l===""||l,animated:c===""||c,active:u===""||u,destroyInactiveTabPane:d===""||d})}return null}).filter(e=>e)}const Wne=oe({compatConfig:{MODE:3},name:"InternalTabs",inheritAttrs:!1,props:A(A({},ct($4(),{tabPosition:"top",animated:{inkBar:!0,tabPane:!1}})),{tabs:xt()}),slots:Object,setup(t,e){let{attrs:n,slots:i}=e;Nt(t.onPrevClick===void 0&&t.onNextClick===void 0,"Tabs","`onPrevClick / @prevClick` and `onNextClick / @nextClick` has been removed. Please use `onTabScroll / @tabScroll` instead."),Nt(t.tabBarExtraContent===void 0,"Tabs","`tabBarExtraContent` prop has been removed. Please use `rightExtra` slot instead."),Nt(i.tabBarExtraContent===void 0,"Tabs","`tabBarExtraContent` slot is deprecated. Please use `rightExtra` slot instead.");const{prefixCls:o,direction:r,size:a,rootPrefixCls:s,getPopupContainer:l}=Me("tabs",t),[c,u]=zne(o),d=L(()=>r.value==="rtl"),f=L(()=>{const{animated:S,tabPosition:_}=t;return S===!1||["left","right"].includes(_)?{inkBar:!1,tabPane:!1}:S===!0?{inkBar:!0,tabPane:!0}:A({inkBar:!0,tabPane:!1},typeof S=="object"?S:{})}),[h,p]=Mt(!1);Ze(()=>{p(w1())});const[g,m]=jt(()=>{var S;return(S=t.tabs[0])===null||S===void 0?void 0:S.key},{value:L(()=>t.activeKey),defaultValue:t.defaultActiveKey}),[v,b]=Mt(()=>t.tabs.findIndex(S=>S.key===g.value));Ke(()=>{var S;let _=t.tabs.findIndex(P=>P.key===g.value);_===-1&&(_=Math.max(0,Math.min(v.value,t.tabs.length-1)),m((S=t.tabs[_])===null||S===void 0?void 0:S.key)),b(_)});const[y,w]=jt(null,{value:L(()=>t.id)}),x=L(()=>h.value&&!["left","right"].includes(t.tabPosition)?"top":t.tabPosition);Ze(()=>{t.id||(w(`rc-tabs-${sP}`),sP+=1)});const $=(S,_)=>{var P,O;(P=t.onTabClick)===null||P===void 0||P.call(t,S,_);const T=S!==g.value;m(S),T&&((O=t.onChange)===null||O===void 0||O.call(t,S))};return $ne({tabs:L(()=>t.tabs),prefixCls:o}),()=>{const{id:S,type:_,tabBarGutter:P,tabBarStyle:O,locale:T,destroyInactiveTabPane:M,renderTabBar:I=i.renderTabBar,onTabScroll:k,hideAdd:E,centered:R}=t,D={id:y.value,activeKey:g.value,animated:f.value,tabPosition:x.value,rtl:d.value,mobile:h.value};let F;_==="editable-card"&&(F={onEdit:(W,j)=>{let{key:U,event:V}=j;var q;(q=t.onEdit)===null||q===void 0||q.call(t,W==="add"?V:U,W)},removeIcon:()=>C(ai,null,null),addIcon:i.addIcon?i.addIcon:()=>C(IS,null,null),showAdd:E!==!0});let N;const B=A(A({},D),{moreTransitionName:`${s.value}-slide-up`,editable:F,locale:T,tabBarGutter:P,onTabClick:$,onTabScroll:k,style:O,getPopupContainer:l.value,popupClassName:ce(t.popupClassName,u.value)});I?N=I(A(A({},B),{DefaultTabBar:rP})):N=C(rP,B,n3(i,["moreIcon","leftExtra","rightExtra","tabBarExtraContent"]));const z=o.value;return c(C("div",H(H({},n),{},{id:S,class:ce(z,`${z}-${x.value}`,{[u.value]:!0,[`${z}-${a.value}`]:a.value,[`${z}-card`]:["card","editable-card"].includes(_),[`${z}-editable-card`]:_==="editable-card",[`${z}-centered`]:R,[`${z}-mobile`]:h.value,[`${z}-editable`]:_==="editable-card",[`${z}-rtl`]:d.value},n.class)}),[N,C(One,H(H({destroyInactiveTabPane:M},D),{},{animated:f.value}),null)]))}}}),$s=oe({compatConfig:{MODE:3},name:"ATabs",inheritAttrs:!1,props:ct($4(),{tabPosition:"top",animated:{inkBar:!0,tabPane:!1}}),slots:Object,setup(t,e){let{attrs:n,slots:i,emit:o}=e;const r=a=>{o("update:activeKey",a),o("change",a)};return()=>{var a;const s=Hne(Dt((a=i.default)===null||a===void 0?void 0:a.call(i)));return C(Wne,H(H(H({},ht(t,["onUpdate:activeKey"])),n),{},{onChange:r,tabs:s}),i)}}}),jne=()=>({tab:Z.any,disabled:{type:Boolean},forceRender:{type:Boolean},closable:{type:Boolean},animated:{type:Boolean},active:{type:Boolean},destroyInactiveTabPane:{type:Boolean},prefixCls:{type:String},tabKey:{type:[String,Number]},id:{type:String}}),ig=oe({compatConfig:{MODE:3},name:"ATabPane",inheritAttrs:!1,__ANT_TAB_PANE:!0,props:jne(),slots:Object,setup(t,e){let{attrs:n,slots:i}=e;const o=se(t.forceRender);ye([()=>t.active,()=>t.destroyInactiveTabPane],()=>{t.active?o.value=!0:t.destroyInactiveTabPane&&(o.value=!1)},{immediate:!0});const r=L(()=>t.active?{}:t.animated?{visibility:"hidden",height:0,overflowY:"hidden"}:{display:"none"});return()=>{var a;const{prefixCls:s,forceRender:l,id:c,active:u,tabKey:d}=t;return C("div",{id:c&&`${c}-panel-${d}`,role:"tabpanel",tabindex:u?0:-1,"aria-labelledby":c&&`${c}-tab-${d}`,"aria-hidden":!u,style:[r.value,n.style],class:[`${s}-tabpane`,u&&`${s}-tabpane-active`,n.class]},[(u||o.value||l)&&((a=i.default)===null||a===void 0?void 0:a.call(i))])}}});$s.TabPane=ig;$s.install=function(t){return t.component($s.name,$s),t.component(ig.name,ig),t};const Vne=t=>{const{antCls:e,componentCls:n,cardHeadHeight:i,cardPaddingBase:o,cardHeadTabsMarginBottom:r}=t;return A(A({display:"flex",justifyContent:"center",flexDirection:"column",minHeight:i,marginBottom:-1,padding:`0 ${o}px`,color:t.colorTextHeading,fontWeight:t.fontWeightStrong,fontSize:t.fontSizeLG,background:"transparent",borderBottom:`${t.lineWidth}px ${t.lineType} ${t.colorBorderSecondary}`,borderRadius:`${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`},Do()),{"&-wrapper":{width:"100%",display:"flex",alignItems:"center"},"&-title":A(A({display:"inline-block",flex:1},un),{[` > ${n}-typography, > ${n}-typography-edit-content `]:{insetInlineStart:0,marginTop:0,marginBottom:0}}),[`${e}-tabs-top`]:{clear:"both",marginBottom:r,color:t.colorText,fontWeight:"normal",fontSize:t.fontSize,"&-bar":{borderBottom:`${t.lineWidth}px ${t.lineType} ${t.colorBorderSecondary}`}}})},Xne=t=>{const{cardPaddingBase:e,colorBorderSecondary:n,cardShadow:i,lineWidth:o}=t;return{width:"33.33%",padding:e,border:0,borderRadius:0,boxShadow:` @@ -294,19 +294,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho ${o}px ${o}px 0 0 ${n}, ${o}px 0 0 0 ${n} inset, 0 ${o}px 0 0 ${n} inset; - `,transition:`all ${t.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:i}}},Yne=t=>{const{componentCls:e,iconCls:n,cardActionsLiMargin:i,cardActionsIconSize:o,colorBorderSecondary:r}=t;return A(A({margin:0,padding:0,listStyle:"none",background:t.colorBgContainer,borderTop:`${t.lineWidth}px ${t.lineType} ${r}`,display:"flex",borderRadius:`0 0 ${t.borderRadiusLG}px ${t.borderRadiusLG}px `},Do()),{"& > li":{margin:i,color:t.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:t.cardActionsIconSize*2,fontSize:t.fontSize,lineHeight:t.lineHeight,cursor:"pointer","&:hover":{color:t.colorPrimary,transition:`color ${t.motionDurationMid}`},[`a:not(${e}-btn), > ${n}`]:{display:"inline-block",width:"100%",color:t.colorTextDescription,lineHeight:`${t.fontSize*t.lineHeight}px`,transition:`color ${t.motionDurationMid}`,"&:hover":{color:t.colorPrimary}},[`> ${n}`]:{fontSize:o,lineHeight:`${o*t.lineHeight}px`}},"&:not(:last-child)":{borderInlineEnd:`${t.lineWidth}px ${t.lineType} ${r}`}}})},Gne=t=>A(A({margin:`-${t.marginXXS}px 0`,display:"flex"},Do()),{"&-avatar":{paddingInlineEnd:t.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:t.marginXS}},"&-title":A({color:t.colorTextHeading,fontWeight:t.fontWeightStrong,fontSize:t.fontSizeLG},un),"&-description":{color:t.colorTextDescription}}),Kne=t=>{const{componentCls:e,cardPaddingBase:n,colorFillAlter:i}=t;return{[`${e}-head`]:{padding:`0 ${n}px`,background:i,"&-title":{fontSize:t.fontSize}},[`${e}-body`]:{padding:`${t.padding}px ${n}px`}}},Une=t=>{const{componentCls:e}=t;return{overflow:"hidden",[`${e}-body`]:{userSelect:"none"}}},qne=t=>{const{componentCls:e,cardShadow:n,cardHeadPadding:i,colorBorderSecondary:o,boxShadow:r,cardPaddingBase:a}=t;return{[e]:A(A({},rt(t)),{position:"relative",background:t.colorBgContainer,borderRadius:t.borderRadiusLG,[`&:not(${e}-bordered)`]:{boxShadow:r},[`${e}-head`]:Vne(t),[`${e}-extra`]:{marginInlineStart:"auto",color:"",fontWeight:"normal",fontSize:t.fontSize},[`${e}-body`]:A({padding:a,borderRadius:` 0 0 ${t.borderRadiusLG}px ${t.borderRadiusLG}px`},Do()),[`${e}-grid`]:Xne(t),[`${e}-cover`]:{"> *":{display:"block",width:"100%"},img:{borderRadius:`${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`}},[`${e}-actions`]:Yne(t),[`${e}-meta`]:Gne(t)}),[`${e}-bordered`]:{border:`${t.lineWidth}px ${t.lineType} ${o}`,[`${e}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${e}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${t.motionDurationMid}, border-color ${t.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:n}},[`${e}-contain-grid`]:{[`${e}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${e}-loading) ${e}-body`]:{marginBlockStart:-t.lineWidth,marginInlineStart:-t.lineWidth,padding:0}},[`${e}-contain-tabs`]:{[`> ${e}-head`]:{[`${e}-head-title, ${e}-extra`]:{paddingTop:i}}},[`${e}-type-inner`]:Kne(t),[`${e}-loading`]:Une(t),[`${e}-rtl`]:{direction:"rtl"}}},Zne=t=>{const{componentCls:e,cardPaddingSM:n,cardHeadHeightSM:i}=t;return{[`${e}-small`]:{[`> ${e}-head`]:{minHeight:i,padding:`0 ${n}px`,fontSize:t.fontSize,[`> ${e}-head-wrapper`]:{[`> ${e}-extra`]:{fontSize:t.fontSize}}},[`> ${e}-body`]:{padding:n}},[`${e}-small${e}-contain-tabs`]:{[`> ${e}-head`]:{[`${e}-head-title, ${e}-extra`]:{minHeight:i,paddingTop:0,display:"flex",alignItems:"center"}}}}},Jne=et("Card",t=>{const e=Ve(t,{cardShadow:t.boxShadowCard,cardHeadHeight:t.fontSizeLG*t.lineHeightLG+t.padding*2,cardHeadHeightSM:t.fontSize*t.lineHeight+t.paddingXS*2,cardHeadPadding:t.padding,cardPaddingBase:t.paddingLG,cardHeadTabsMarginBottom:-t.padding-t.lineWidth,cardActionsLiMargin:`${t.paddingSM}px 0`,cardActionsIconSize:t.fontSize,cardPaddingSM:12});return[qne(e),Zne(e)]}),Qne=()=>({prefixCls:String,width:{type:[Number,String]}}),Wm=oe({compatConfig:{MODE:3},name:"SkeletonTitle",props:Qne(),setup(t){return()=>{const{prefixCls:e,width:n}=t,i=typeof n=="number"?`${n}px`:n;return C("h3",{class:e,style:{width:i}},null)}}}),eie=()=>({prefixCls:String,width:{type:[Number,String,Array]},rows:Number}),tie=oe({compatConfig:{MODE:3},name:"SkeletonParagraph",props:eie(),setup(t){const e=n=>{const{width:i,rows:o=2}=t;if(Array.isArray(i))return i[n];if(o-1===n)return i};return()=>{const{prefixCls:n,rows:i}=t,o=[...Array(i)].map((r,a)=>{const s=e(a);return C("li",{key:a,style:{width:typeof s=="number"?`${s}px`:s}},null)});return C("ul",{class:n},[o])}}}),jm=()=>({prefixCls:String,size:[String,Number],shape:String,active:{type:Boolean,default:void 0}}),tf=t=>{const{prefixCls:e,size:n,shape:i}=t,o=ce({[`${e}-lg`]:n==="large",[`${e}-sm`]:n==="small"}),r=ce({[`${e}-circle`]:i==="circle",[`${e}-square`]:i==="square",[`${e}-round`]:i==="round"}),a=typeof n=="number"?{width:`${n}px`,height:`${n}px`,lineHeight:`${n}px`}:{};return C("span",{class:ce(e,o,r),style:a},null)};tf.displayName="SkeletonElement";const nie=new mt("ant-skeleton-loading",{"0%":{transform:"translateX(-37.5%)"},"100%":{transform:"translateX(37.5%)"}}),Vm=t=>({height:t,lineHeight:`${t}px`}),Ul=t=>A({width:t},Vm(t)),iie=t=>({position:"relative",zIndex:0,overflow:"hidden",background:"transparent","&::after":{position:"absolute",top:0,insetInlineEnd:"-150%",bottom:0,insetInlineStart:"-150%",background:t.skeletonLoadingBackground,animationName:nie,animationDuration:t.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite",content:'""'}}),Pb=t=>A({width:t*5,minWidth:t*5},Vm(t)),oie=t=>{const{skeletonAvatarCls:e,color:n,controlHeight:i,controlHeightLG:o,controlHeightSM:r}=t;return{[`${e}`]:A({display:"inline-block",verticalAlign:"top",background:n},Ul(i)),[`${e}${e}-circle`]:{borderRadius:"50%"},[`${e}${e}-lg`]:A({},Ul(o)),[`${e}${e}-sm`]:A({},Ul(r))}},rie=t=>{const{controlHeight:e,borderRadiusSM:n,skeletonInputCls:i,controlHeightLG:o,controlHeightSM:r,color:a}=t;return{[`${i}`]:A({display:"inline-block",verticalAlign:"top",background:a,borderRadius:n},Pb(e)),[`${i}-lg`]:A({},Pb(o)),[`${i}-sm`]:A({},Pb(r))}},lP=t=>A({width:t},Vm(t)),aie=t=>{const{skeletonImageCls:e,imageSizeBase:n,color:i,borderRadiusSM:o}=t;return{[`${e}`]:A(A({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:i,borderRadius:o},lP(n*2)),{[`${e}-path`]:{fill:"#bfbfbf"},[`${e}-svg`]:A(A({},lP(n)),{maxWidth:n*4,maxHeight:n*4}),[`${e}-svg${e}-svg-circle`]:{borderRadius:"50%"}}),[`${e}${e}-circle`]:{borderRadius:"50%"}}},Tb=(t,e,n)=>{const{skeletonButtonCls:i}=t;return{[`${n}${i}-circle`]:{width:e,minWidth:e,borderRadius:"50%"},[`${n}${i}-round`]:{borderRadius:e}}},Ob=t=>A({width:t*2,minWidth:t*2},Vm(t)),sie=t=>{const{borderRadiusSM:e,skeletonButtonCls:n,controlHeight:i,controlHeightLG:o,controlHeightSM:r,color:a}=t;return A(A(A(A(A({[`${n}`]:A({display:"inline-block",verticalAlign:"top",background:a,borderRadius:e,width:i*2,minWidth:i*2},Ob(i))},Tb(t,i,n)),{[`${n}-lg`]:A({},Ob(o))}),Tb(t,o,`${n}-lg`)),{[`${n}-sm`]:A({},Ob(r))}),Tb(t,r,`${n}-sm`))},lie=t=>{const{componentCls:e,skeletonAvatarCls:n,skeletonTitleCls:i,skeletonParagraphCls:o,skeletonButtonCls:r,skeletonInputCls:a,skeletonImageCls:s,controlHeight:l,controlHeightLG:c,controlHeightSM:u,color:d,padding:f,marginSM:h,borderRadius:p,skeletonTitleHeight:g,skeletonBlockRadius:m,skeletonParagraphLineHeight:v,controlHeightXS:b,skeletonParagraphMarginTop:y}=t;return{[`${e}`]:{display:"table",width:"100%",[`${e}-header`]:{display:"table-cell",paddingInlineEnd:f,verticalAlign:"top",[`${n}`]:A({display:"inline-block",verticalAlign:"top",background:d},Ul(l)),[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:A({},Ul(c)),[`${n}-sm`]:A({},Ul(u))},[`${e}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${i}`]:{width:"100%",height:g,background:d,borderRadius:m,[`+ ${o}`]:{marginBlockStart:u}},[`${o}`]:{padding:0,"> li":{width:"100%",height:v,listStyle:"none",background:d,borderRadius:m,"+ li":{marginBlockStart:b}}},[`${o}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${e}-content`]:{[`${i}, ${o} > li`]:{borderRadius:p}}},[`${e}-with-avatar ${e}-content`]:{[`${i}`]:{marginBlockStart:h,[`+ ${o}`]:{marginBlockStart:y}}},[`${e}${e}-element`]:A(A(A(A({display:"inline-block",width:"auto"},sie(t)),oie(t)),rie(t)),aie(t)),[`${e}${e}-block`]:{width:"100%",[`${r}`]:{width:"100%"},[`${a}`]:{width:"100%"}},[`${e}${e}-active`]:{[` + `,transition:`all ${t.motionDurationMid}`,"&-hoverable:hover":{position:"relative",zIndex:1,boxShadow:i}}},Yne=t=>{const{componentCls:e,iconCls:n,cardActionsLiMargin:i,cardActionsIconSize:o,colorBorderSecondary:r}=t;return A(A({margin:0,padding:0,listStyle:"none",background:t.colorBgContainer,borderTop:`${t.lineWidth}px ${t.lineType} ${r}`,display:"flex",borderRadius:`0 0 ${t.borderRadiusLG}px ${t.borderRadiusLG}px `},Do()),{"& > li":{margin:i,color:t.colorTextDescription,textAlign:"center","> span":{position:"relative",display:"block",minWidth:t.cardActionsIconSize*2,fontSize:t.fontSize,lineHeight:t.lineHeight,cursor:"pointer","&:hover":{color:t.colorPrimary,transition:`color ${t.motionDurationMid}`},[`a:not(${e}-btn), > ${n}`]:{display:"inline-block",width:"100%",color:t.colorTextDescription,lineHeight:`${t.fontSize*t.lineHeight}px`,transition:`color ${t.motionDurationMid}`,"&:hover":{color:t.colorPrimary}},[`> ${n}`]:{fontSize:o,lineHeight:`${o*t.lineHeight}px`}},"&:not(:last-child)":{borderInlineEnd:`${t.lineWidth}px ${t.lineType} ${r}`}}})},Gne=t=>A(A({margin:`-${t.marginXXS}px 0`,display:"flex"},Do()),{"&-avatar":{paddingInlineEnd:t.padding},"&-detail":{overflow:"hidden",flex:1,"> div:not(:last-child)":{marginBottom:t.marginXS}},"&-title":A({color:t.colorTextHeading,fontWeight:t.fontWeightStrong,fontSize:t.fontSizeLG},un),"&-description":{color:t.colorTextDescription}}),Kne=t=>{const{componentCls:e,cardPaddingBase:n,colorFillAlter:i}=t;return{[`${e}-head`]:{padding:`0 ${n}px`,background:i,"&-title":{fontSize:t.fontSize}},[`${e}-body`]:{padding:`${t.padding}px ${n}px`}}},Une=t=>{const{componentCls:e}=t;return{overflow:"hidden",[`${e}-body`]:{userSelect:"none"}}},qne=t=>{const{componentCls:e,cardShadow:n,cardHeadPadding:i,colorBorderSecondary:o,boxShadow:r,cardPaddingBase:a}=t;return{[e]:A(A({},rt(t)),{position:"relative",background:t.colorBgContainer,borderRadius:t.borderRadiusLG,[`&:not(${e}-bordered)`]:{boxShadow:r},[`${e}-head`]:Vne(t),[`${e}-extra`]:{marginInlineStart:"auto",color:"",fontWeight:"normal",fontSize:t.fontSize},[`${e}-body`]:A({padding:a,borderRadius:` 0 0 ${t.borderRadiusLG}px ${t.borderRadiusLG}px`},Do()),[`${e}-grid`]:Xne(t),[`${e}-cover`]:{"> *":{display:"block",width:"100%"},img:{borderRadius:`${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`}},[`${e}-actions`]:Yne(t),[`${e}-meta`]:Gne(t)}),[`${e}-bordered`]:{border:`${t.lineWidth}px ${t.lineType} ${o}`,[`${e}-cover`]:{marginTop:-1,marginInlineStart:-1,marginInlineEnd:-1}},[`${e}-hoverable`]:{cursor:"pointer",transition:`box-shadow ${t.motionDurationMid}, border-color ${t.motionDurationMid}`,"&:hover":{borderColor:"transparent",boxShadow:n}},[`${e}-contain-grid`]:{[`${e}-body`]:{display:"flex",flexWrap:"wrap"},[`&:not(${e}-loading) ${e}-body`]:{marginBlockStart:-t.lineWidth,marginInlineStart:-t.lineWidth,padding:0}},[`${e}-contain-tabs`]:{[`> ${e}-head`]:{[`${e}-head-title, ${e}-extra`]:{paddingTop:i}}},[`${e}-type-inner`]:Kne(t),[`${e}-loading`]:Une(t),[`${e}-rtl`]:{direction:"rtl"}}},Zne=t=>{const{componentCls:e,cardPaddingSM:n,cardHeadHeightSM:i}=t;return{[`${e}-small`]:{[`> ${e}-head`]:{minHeight:i,padding:`0 ${n}px`,fontSize:t.fontSize,[`> ${e}-head-wrapper`]:{[`> ${e}-extra`]:{fontSize:t.fontSize}}},[`> ${e}-body`]:{padding:n}},[`${e}-small${e}-contain-tabs`]:{[`> ${e}-head`]:{[`${e}-head-title, ${e}-extra`]:{minHeight:i,paddingTop:0,display:"flex",alignItems:"center"}}}}},Jne=et("Card",t=>{const e=Ve(t,{cardShadow:t.boxShadowCard,cardHeadHeight:t.fontSizeLG*t.lineHeightLG+t.padding*2,cardHeadHeightSM:t.fontSize*t.lineHeight+t.paddingXS*2,cardHeadPadding:t.padding,cardPaddingBase:t.paddingLG,cardHeadTabsMarginBottom:-t.padding-t.lineWidth,cardActionsLiMargin:`${t.paddingSM}px 0`,cardActionsIconSize:t.fontSize,cardPaddingSM:12});return[qne(e),Zne(e)]}),Qne=()=>({prefixCls:String,width:{type:[Number,String]}}),jm=oe({compatConfig:{MODE:3},name:"SkeletonTitle",props:Qne(),setup(t){return()=>{const{prefixCls:e,width:n}=t,i=typeof n=="number"?`${n}px`:n;return C("h3",{class:e,style:{width:i}},null)}}}),eie=()=>({prefixCls:String,width:{type:[Number,String,Array]},rows:Number}),tie=oe({compatConfig:{MODE:3},name:"SkeletonParagraph",props:eie(),setup(t){const e=n=>{const{width:i,rows:o=2}=t;if(Array.isArray(i))return i[n];if(o-1===n)return i};return()=>{const{prefixCls:n,rows:i}=t,o=[...Array(i)].map((r,a)=>{const s=e(a);return C("li",{key:a,style:{width:typeof s=="number"?`${s}px`:s}},null)});return C("ul",{class:n},[o])}}}),Vm=()=>({prefixCls:String,size:[String,Number],shape:String,active:{type:Boolean,default:void 0}}),nf=t=>{const{prefixCls:e,size:n,shape:i}=t,o=ce({[`${e}-lg`]:n==="large",[`${e}-sm`]:n==="small"}),r=ce({[`${e}-circle`]:i==="circle",[`${e}-square`]:i==="square",[`${e}-round`]:i==="round"}),a=typeof n=="number"?{width:`${n}px`,height:`${n}px`,lineHeight:`${n}px`}:{};return C("span",{class:ce(e,o,r),style:a},null)};nf.displayName="SkeletonElement";const nie=new mt("ant-skeleton-loading",{"0%":{transform:"translateX(-37.5%)"},"100%":{transform:"translateX(37.5%)"}}),Xm=t=>({height:t,lineHeight:`${t}px`}),Ul=t=>A({width:t},Xm(t)),iie=t=>({position:"relative",zIndex:0,overflow:"hidden",background:"transparent","&::after":{position:"absolute",top:0,insetInlineEnd:"-150%",bottom:0,insetInlineStart:"-150%",background:t.skeletonLoadingBackground,animationName:nie,animationDuration:t.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite",content:'""'}}),Pb=t=>A({width:t*5,minWidth:t*5},Xm(t)),oie=t=>{const{skeletonAvatarCls:e,color:n,controlHeight:i,controlHeightLG:o,controlHeightSM:r}=t;return{[`${e}`]:A({display:"inline-block",verticalAlign:"top",background:n},Ul(i)),[`${e}${e}-circle`]:{borderRadius:"50%"},[`${e}${e}-lg`]:A({},Ul(o)),[`${e}${e}-sm`]:A({},Ul(r))}},rie=t=>{const{controlHeight:e,borderRadiusSM:n,skeletonInputCls:i,controlHeightLG:o,controlHeightSM:r,color:a}=t;return{[`${i}`]:A({display:"inline-block",verticalAlign:"top",background:a,borderRadius:n},Pb(e)),[`${i}-lg`]:A({},Pb(o)),[`${i}-sm`]:A({},Pb(r))}},lP=t=>A({width:t},Xm(t)),aie=t=>{const{skeletonImageCls:e,imageSizeBase:n,color:i,borderRadiusSM:o}=t;return{[`${e}`]:A(A({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:i,borderRadius:o},lP(n*2)),{[`${e}-path`]:{fill:"#bfbfbf"},[`${e}-svg`]:A(A({},lP(n)),{maxWidth:n*4,maxHeight:n*4}),[`${e}-svg${e}-svg-circle`]:{borderRadius:"50%"}}),[`${e}${e}-circle`]:{borderRadius:"50%"}}},Tb=(t,e,n)=>{const{skeletonButtonCls:i}=t;return{[`${n}${i}-circle`]:{width:e,minWidth:e,borderRadius:"50%"},[`${n}${i}-round`]:{borderRadius:e}}},Ob=t=>A({width:t*2,minWidth:t*2},Xm(t)),sie=t=>{const{borderRadiusSM:e,skeletonButtonCls:n,controlHeight:i,controlHeightLG:o,controlHeightSM:r,color:a}=t;return A(A(A(A(A({[`${n}`]:A({display:"inline-block",verticalAlign:"top",background:a,borderRadius:e,width:i*2,minWidth:i*2},Ob(i))},Tb(t,i,n)),{[`${n}-lg`]:A({},Ob(o))}),Tb(t,o,`${n}-lg`)),{[`${n}-sm`]:A({},Ob(r))}),Tb(t,r,`${n}-sm`))},lie=t=>{const{componentCls:e,skeletonAvatarCls:n,skeletonTitleCls:i,skeletonParagraphCls:o,skeletonButtonCls:r,skeletonInputCls:a,skeletonImageCls:s,controlHeight:l,controlHeightLG:c,controlHeightSM:u,color:d,padding:f,marginSM:h,borderRadius:p,skeletonTitleHeight:g,skeletonBlockRadius:m,skeletonParagraphLineHeight:v,controlHeightXS:b,skeletonParagraphMarginTop:y}=t;return{[`${e}`]:{display:"table",width:"100%",[`${e}-header`]:{display:"table-cell",paddingInlineEnd:f,verticalAlign:"top",[`${n}`]:A({display:"inline-block",verticalAlign:"top",background:d},Ul(l)),[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:A({},Ul(c)),[`${n}-sm`]:A({},Ul(u))},[`${e}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${i}`]:{width:"100%",height:g,background:d,borderRadius:m,[`+ ${o}`]:{marginBlockStart:u}},[`${o}`]:{padding:0,"> li":{width:"100%",height:v,listStyle:"none",background:d,borderRadius:m,"+ li":{marginBlockStart:b}}},[`${o}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${e}-content`]:{[`${i}, ${o} > li`]:{borderRadius:p}}},[`${e}-with-avatar ${e}-content`]:{[`${i}`]:{marginBlockStart:h,[`+ ${o}`]:{marginBlockStart:y}}},[`${e}${e}-element`]:A(A(A(A({display:"inline-block",width:"auto"},sie(t)),oie(t)),rie(t)),aie(t)),[`${e}${e}-block`]:{width:"100%",[`${r}`]:{width:"100%"},[`${a}`]:{width:"100%"}},[`${e}${e}-active`]:{[` ${i}, ${o} > li, ${n}, ${r}, ${a}, ${s} - `]:A({},iie(t))}}},nf=et("Skeleton",t=>{const{componentCls:e}=t,n=Ve(t,{skeletonAvatarCls:`${e}-avatar`,skeletonTitleCls:`${e}-title`,skeletonParagraphCls:`${e}-paragraph`,skeletonButtonCls:`${e}-button`,skeletonInputCls:`${e}-input`,skeletonImageCls:`${e}-image`,imageSizeBase:t.controlHeight*1.5,skeletonTitleHeight:t.controlHeight/2,skeletonBlockRadius:t.borderRadiusSM,skeletonParagraphLineHeight:t.controlHeight/2,skeletonParagraphMarginTop:t.marginLG+t.marginXXS,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${t.color} 25%, ${t.colorGradientEnd} 37%, ${t.color} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[lie(n)]},t=>{const{colorFillContent:e,colorFill:n}=t;return{color:e,colorGradientEnd:n}}),cie=()=>({active:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},prefixCls:String,avatar:{type:[Boolean,Object],default:void 0},title:{type:[Boolean,Object],default:void 0},paragraph:{type:[Boolean,Object],default:void 0},round:{type:Boolean,default:void 0}});function Eb(t){return t&&typeof t=="object"?t:{}}function uie(t,e){return t&&!e?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function die(t,e){return!t&&e?{width:"38%"}:t&&e?{width:"50%"}:{}}function fie(t,e){const n={};return(!t||!e)&&(n.width="61%"),!t&&e?n.rows=3:n.rows=2,n}const Un=oe({compatConfig:{MODE:3},name:"ASkeleton",props:ct(cie(),{avatar:!1,title:!0,paragraph:!0}),setup(t,e){let{slots:n}=e;const{prefixCls:i,direction:o}=Me("skeleton",t),[r,a]=nf(i);return()=>{var s;const{loading:l,avatar:c,title:u,paragraph:d,active:f,round:h}=t,p=i.value;if(l||t.loading===void 0){const g=!!c||c==="",m=!!u||u==="",v=!!d||d==="";let b;if(g){const x=A(A({prefixCls:`${p}-avatar`},uie(m,v)),Eb(c));b=C("div",{class:`${p}-header`},[C(tf,x,null)])}let y;if(m||v){let x;if(m){const S=A(A({prefixCls:`${p}-title`},die(g,v)),Eb(u));x=C(Wm,S,null)}let $;if(v){const S=A(A({prefixCls:`${p}-paragraph`},fie(g,m)),Eb(d));$=C(tie,S,null)}y=C("div",{class:`${p}-content`},[x,$])}const w=ce(p,{[`${p}-with-avatar`]:g,[`${p}-active`]:f,[`${p}-rtl`]:o.value==="rtl",[`${p}-round`]:h,[a.value]:!0});return r(C("div",{class:w},[b,y]))}return(s=n.default)===null||s===void 0?void 0:s.call(n)}}}),hie=()=>A(A({},jm()),{size:String,block:Boolean}),kS=oe({compatConfig:{MODE:3},name:"ASkeletonButton",props:ct(hie(),{size:"default"}),setup(t){const{prefixCls:e}=Me("skeleton",t),[n,i]=nf(e),o=L(()=>ce(e.value,`${e.value}-element`,{[`${e.value}-active`]:t.active,[`${e.value}-block`]:t.block},i.value));return()=>n(C("div",{class:o.value},[C(tf,H(H({},t),{},{prefixCls:`${e.value}-button`}),null)]))}}),DS=oe({compatConfig:{MODE:3},name:"ASkeletonInput",props:A(A({},ht(jm(),["shape"])),{size:String,block:Boolean}),setup(t){const{prefixCls:e}=Me("skeleton",t),[n,i]=nf(e),o=L(()=>ce(e.value,`${e.value}-element`,{[`${e.value}-active`]:t.active,[`${e.value}-block`]:t.block},i.value));return()=>n(C("div",{class:o.value},[C(tf,H(H({},t),{},{prefixCls:`${e.value}-input`}),null)]))}}),pie="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",RS=oe({compatConfig:{MODE:3},name:"ASkeletonImage",props:ht(jm(),["size","shape","active"]),setup(t){const{prefixCls:e}=Me("skeleton",t),[n,i]=nf(e),o=L(()=>ce(e.value,`${e.value}-element`,i.value));return()=>n(C("div",{class:o.value},[C("div",{class:`${e.value}-image`},[C("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",class:`${e.value}-image-svg`},[C("path",{d:pie,class:`${e.value}-image-path`},null)])])]))}}),gie=()=>A(A({},jm()),{shape:String}),LS=oe({compatConfig:{MODE:3},name:"ASkeletonAvatar",props:ct(gie(),{size:"default",shape:"circle"}),setup(t){const{prefixCls:e}=Me("skeleton",t),[n,i]=nf(e),o=L(()=>ce(e.value,`${e.value}-element`,{[`${e.value}-active`]:t.active},i.value));return()=>n(C("div",{class:o.value},[C(tf,H(H({},t),{},{prefixCls:`${e.value}-avatar`}),null)]))}});Un.Button=kS;Un.Avatar=LS;Un.Input=DS;Un.Image=RS;Un.Title=Wm;Un.install=function(t){return t.component(Un.name,Un),t.component(Un.Button.name,kS),t.component(Un.Avatar.name,LS),t.component(Un.Input.name,DS),t.component(Un.Image.name,RS),t.component(Un.Title.name,Wm),t};const{TabPane:mie}=$s,vie=()=>({prefixCls:String,title:Z.any,extra:Z.any,bordered:{type:Boolean,default:!0},bodyStyle:{type:Object,default:void 0},headStyle:{type:Object,default:void 0},loading:{type:Boolean,default:!1},hoverable:{type:Boolean,default:!1},type:{type:String},size:{type:String},actions:Z.any,tabList:{type:Array},tabBarExtraContent:Z.any,activeTabKey:String,defaultActiveTabKey:String,cover:Z.any,onTabChange:{type:Function}}),ql=oe({compatConfig:{MODE:3},name:"ACard",inheritAttrs:!1,props:vie(),slots:Object,setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,direction:r,size:a}=Me("card",t),[s,l]=Jne(o),c=f=>f.map((p,g)=>ln(p)&&!jd(p)||!ln(p)?C("li",{style:{width:`${100/f.length}%`},key:`action-${g}`},[C("span",null,[p])]):null),u=f=>{var h;(h=t.onTabChange)===null||h===void 0||h.call(t,f)},d=function(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],h;return f.forEach(p=>{p&&B1(p.type)&&p.type.__ANT_CARD_GRID&&(h=!0)}),h};return()=>{var f,h,p,g,m,v;const{headStyle:b={},bodyStyle:y={},loading:w,bordered:x=!0,type:$,tabList:S,hoverable:_,activeTabKey:P,defaultActiveTabKey:O,tabBarExtraContent:T=Kc((f=n.tabBarExtraContent)===null||f===void 0?void 0:f.call(n)),title:M=Kc((h=n.title)===null||h===void 0?void 0:h.call(n)),extra:I=Kc((p=n.extra)===null||p===void 0?void 0:p.call(n)),actions:k=Kc((g=n.actions)===null||g===void 0?void 0:g.call(n)),cover:E=Kc((m=n.cover)===null||m===void 0?void 0:m.call(n))}=t,R=Dt((v=n.default)===null||v===void 0?void 0:v.call(n)),D=o.value,F={[`${D}`]:!0,[l.value]:!0,[`${D}-loading`]:w,[`${D}-bordered`]:x,[`${D}-hoverable`]:!!_,[`${D}-contain-grid`]:d(R),[`${D}-contain-tabs`]:S&&S.length,[`${D}-${a.value}`]:a.value,[`${D}-type-${$}`]:!!$,[`${D}-rtl`]:r.value==="rtl"},N=C(Un,{loading:!0,active:!0,paragraph:{rows:4},title:!1},{default:()=>[R]}),B=P!==void 0,z={size:"large",[B?"activeKey":"defaultActiveKey"]:B?P:O,onChange:u,class:`${D}-head-tabs`};let W;const j=S&&S.length?C($s,z,{default:()=>[S.map(Y=>{const{tab:J,slots:Q}=Y,G=Q==null?void 0:Q.tab;Nt(!Q,"Card","tabList slots is deprecated, Please use `customTab` instead.");let ee=J!==void 0?J:n[G]?n[G](Y):null;return ee=pm(n,"customTab",Y,()=>[ee]),C(mie,{tab:ee,key:Y.key,disabled:Y.disabled},null)})],rightExtra:T?()=>T:null}):null;(M||I||j)&&(W=C("div",{class:`${D}-head`,style:b},[C("div",{class:`${D}-head-wrapper`},[M&&C("div",{class:`${D}-head-title`},[M]),I&&C("div",{class:`${D}-extra`},[I])]),j]));const U=E?C("div",{class:`${D}-cover`},[E]):null,V=C("div",{class:`${D}-body`,style:y},[w?N:R]),q=k&&k.length?C("ul",{class:`${D}-actions`},[c(k)]):null;return s(C("div",H(H({ref:"cardContainerRef"},i),{},{class:[F,i.class]}),[W,U,R&&R.length?V:null,q]))}}}),bie=()=>({prefixCls:String,title:Zn(),description:Zn(),avatar:Zn()}),ig=oe({compatConfig:{MODE:3},name:"ACardMeta",props:bie(),slots:Object,setup(t,e){let{slots:n}=e;const{prefixCls:i}=Me("card",t);return()=>{const o={[`${i.value}-meta`]:!0},r=gn(n,t,"avatar"),a=gn(n,t,"title"),s=gn(n,t,"description"),l=r?C("div",{class:`${i.value}-meta-avatar`},[r]):null,c=a?C("div",{class:`${i.value}-meta-title`},[a]):null,u=s?C("div",{class:`${i.value}-meta-description`},[s]):null,d=c||u?C("div",{class:`${i.value}-meta-detail`},[c,u]):null;return C("div",{class:o},[l,d])}}}),yie=()=>({prefixCls:String,hoverable:{type:Boolean,default:!0}}),og=oe({compatConfig:{MODE:3},name:"ACardGrid",__ANT_CARD_GRID:!0,props:yie(),setup(t,e){let{slots:n}=e;const{prefixCls:i}=Me("card",t),o=L(()=>({[`${i.value}-grid`]:!0,[`${i.value}-grid-hoverable`]:t.hoverable}));return()=>{var r;return C("div",{class:o.value},[(r=n.default)===null||r===void 0?void 0:r.call(n)])}}});ql.Meta=ig;ql.Grid=og;ql.install=function(t){return t.component(ql.name,ql),t.component(ig.name,ig),t.component(og.name,og),t};const xie=()=>({prefixCls:String,activeKey:Xe([Array,Number,String]),defaultActiveKey:Xe([Array,Number,String]),accordion:Ce(),destroyInactivePanel:Ce(),bordered:Ce(),expandIcon:ve(),openAnimation:Z.object,expandIconPosition:Ne(),collapsible:Ne(),ghost:Ce(),onChange:ve(),"onUpdate:activeKey":ve()}),A4=()=>({openAnimation:Z.object,prefixCls:String,header:Z.any,headerClass:String,showArrow:Ce(),isActive:Ce(),destroyInactivePanel:Ce(),disabled:Ce(),accordion:Ce(),forceRender:Ce(),expandIcon:ve(),extra:Z.any,panelKey:Xe(),collapsible:Ne(),role:String,onItemClick:ve()}),wie=t=>{const{componentCls:e,collapseContentBg:n,padding:i,collapseContentPaddingHorizontal:o,collapseHeaderBg:r,collapseHeaderPadding:a,collapsePanelBorderRadius:s,lineWidth:l,lineType:c,colorBorder:u,colorText:d,colorTextHeading:f,colorTextDisabled:h,fontSize:p,lineHeight:g,marginSM:m,paddingSM:v,motionDurationSlow:b,fontSizeIcon:y}=t,w=`${l}px ${c} ${u}`;return{[e]:A(A({},rt(t)),{backgroundColor:r,border:w,borderBottom:0,borderRadius:`${s}px`,"&-rtl":{direction:"rtl"},[`& > ${e}-item`]:{borderBottom:w,"&:last-child":{[` + `]:A({},iie(t))}}},of=et("Skeleton",t=>{const{componentCls:e}=t,n=Ve(t,{skeletonAvatarCls:`${e}-avatar`,skeletonTitleCls:`${e}-title`,skeletonParagraphCls:`${e}-paragraph`,skeletonButtonCls:`${e}-button`,skeletonInputCls:`${e}-input`,skeletonImageCls:`${e}-image`,imageSizeBase:t.controlHeight*1.5,skeletonTitleHeight:t.controlHeight/2,skeletonBlockRadius:t.borderRadiusSM,skeletonParagraphLineHeight:t.controlHeight/2,skeletonParagraphMarginTop:t.marginLG+t.marginXXS,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${t.color} 25%, ${t.colorGradientEnd} 37%, ${t.color} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[lie(n)]},t=>{const{colorFillContent:e,colorFill:n}=t;return{color:e,colorGradientEnd:n}}),cie=()=>({active:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},prefixCls:String,avatar:{type:[Boolean,Object],default:void 0},title:{type:[Boolean,Object],default:void 0},paragraph:{type:[Boolean,Object],default:void 0},round:{type:Boolean,default:void 0}});function Eb(t){return t&&typeof t=="object"?t:{}}function uie(t,e){return t&&!e?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function die(t,e){return!t&&e?{width:"38%"}:t&&e?{width:"50%"}:{}}function fie(t,e){const n={};return(!t||!e)&&(n.width="61%"),!t&&e?n.rows=3:n.rows=2,n}const Un=oe({compatConfig:{MODE:3},name:"ASkeleton",props:ct(cie(),{avatar:!1,title:!0,paragraph:!0}),setup(t,e){let{slots:n}=e;const{prefixCls:i,direction:o}=Me("skeleton",t),[r,a]=of(i);return()=>{var s;const{loading:l,avatar:c,title:u,paragraph:d,active:f,round:h}=t,p=i.value;if(l||t.loading===void 0){const g=!!c||c==="",m=!!u||u==="",v=!!d||d==="";let b;if(g){const x=A(A({prefixCls:`${p}-avatar`},uie(m,v)),Eb(c));b=C("div",{class:`${p}-header`},[C(nf,x,null)])}let y;if(m||v){let x;if(m){const S=A(A({prefixCls:`${p}-title`},die(g,v)),Eb(u));x=C(jm,S,null)}let $;if(v){const S=A(A({prefixCls:`${p}-paragraph`},fie(g,m)),Eb(d));$=C(tie,S,null)}y=C("div",{class:`${p}-content`},[x,$])}const w=ce(p,{[`${p}-with-avatar`]:g,[`${p}-active`]:f,[`${p}-rtl`]:o.value==="rtl",[`${p}-round`]:h,[a.value]:!0});return r(C("div",{class:w},[b,y]))}return(s=n.default)===null||s===void 0?void 0:s.call(n)}}}),hie=()=>A(A({},Vm()),{size:String,block:Boolean}),kS=oe({compatConfig:{MODE:3},name:"ASkeletonButton",props:ct(hie(),{size:"default"}),setup(t){const{prefixCls:e}=Me("skeleton",t),[n,i]=of(e),o=L(()=>ce(e.value,`${e.value}-element`,{[`${e.value}-active`]:t.active,[`${e.value}-block`]:t.block},i.value));return()=>n(C("div",{class:o.value},[C(nf,H(H({},t),{},{prefixCls:`${e.value}-button`}),null)]))}}),DS=oe({compatConfig:{MODE:3},name:"ASkeletonInput",props:A(A({},ht(Vm(),["shape"])),{size:String,block:Boolean}),setup(t){const{prefixCls:e}=Me("skeleton",t),[n,i]=of(e),o=L(()=>ce(e.value,`${e.value}-element`,{[`${e.value}-active`]:t.active,[`${e.value}-block`]:t.block},i.value));return()=>n(C("div",{class:o.value},[C(nf,H(H({},t),{},{prefixCls:`${e.value}-input`}),null)]))}}),pie="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z",RS=oe({compatConfig:{MODE:3},name:"ASkeletonImage",props:ht(Vm(),["size","shape","active"]),setup(t){const{prefixCls:e}=Me("skeleton",t),[n,i]=of(e),o=L(()=>ce(e.value,`${e.value}-element`,i.value));return()=>n(C("div",{class:o.value},[C("div",{class:`${e.value}-image`},[C("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",class:`${e.value}-image-svg`},[C("path",{d:pie,class:`${e.value}-image-path`},null)])])]))}}),gie=()=>A(A({},Vm()),{shape:String}),LS=oe({compatConfig:{MODE:3},name:"ASkeletonAvatar",props:ct(gie(),{size:"default",shape:"circle"}),setup(t){const{prefixCls:e}=Me("skeleton",t),[n,i]=of(e),o=L(()=>ce(e.value,`${e.value}-element`,{[`${e.value}-active`]:t.active},i.value));return()=>n(C("div",{class:o.value},[C(nf,H(H({},t),{},{prefixCls:`${e.value}-avatar`}),null)]))}});Un.Button=kS;Un.Avatar=LS;Un.Input=DS;Un.Image=RS;Un.Title=jm;Un.install=function(t){return t.component(Un.name,Un),t.component(Un.Button.name,kS),t.component(Un.Avatar.name,LS),t.component(Un.Input.name,DS),t.component(Un.Image.name,RS),t.component(Un.Title.name,jm),t};const{TabPane:mie}=$s,vie=()=>({prefixCls:String,title:Z.any,extra:Z.any,bordered:{type:Boolean,default:!0},bodyStyle:{type:Object,default:void 0},headStyle:{type:Object,default:void 0},loading:{type:Boolean,default:!1},hoverable:{type:Boolean,default:!1},type:{type:String},size:{type:String},actions:Z.any,tabList:{type:Array},tabBarExtraContent:Z.any,activeTabKey:String,defaultActiveTabKey:String,cover:Z.any,onTabChange:{type:Function}}),ql=oe({compatConfig:{MODE:3},name:"ACard",inheritAttrs:!1,props:vie(),slots:Object,setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,direction:r,size:a}=Me("card",t),[s,l]=Jne(o),c=f=>f.map((p,g)=>ln(p)&&!Vd(p)||!ln(p)?C("li",{style:{width:`${100/f.length}%`},key:`action-${g}`},[C("span",null,[p])]):null),u=f=>{var h;(h=t.onTabChange)===null||h===void 0||h.call(t,f)},d=function(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],h;return f.forEach(p=>{p&&B1(p.type)&&p.type.__ANT_CARD_GRID&&(h=!0)}),h};return()=>{var f,h,p,g,m,v;const{headStyle:b={},bodyStyle:y={},loading:w,bordered:x=!0,type:$,tabList:S,hoverable:_,activeTabKey:P,defaultActiveTabKey:O,tabBarExtraContent:T=Uc((f=n.tabBarExtraContent)===null||f===void 0?void 0:f.call(n)),title:M=Uc((h=n.title)===null||h===void 0?void 0:h.call(n)),extra:I=Uc((p=n.extra)===null||p===void 0?void 0:p.call(n)),actions:k=Uc((g=n.actions)===null||g===void 0?void 0:g.call(n)),cover:E=Uc((m=n.cover)===null||m===void 0?void 0:m.call(n))}=t,R=Dt((v=n.default)===null||v===void 0?void 0:v.call(n)),D=o.value,F={[`${D}`]:!0,[l.value]:!0,[`${D}-loading`]:w,[`${D}-bordered`]:x,[`${D}-hoverable`]:!!_,[`${D}-contain-grid`]:d(R),[`${D}-contain-tabs`]:S&&S.length,[`${D}-${a.value}`]:a.value,[`${D}-type-${$}`]:!!$,[`${D}-rtl`]:r.value==="rtl"},N=C(Un,{loading:!0,active:!0,paragraph:{rows:4},title:!1},{default:()=>[R]}),B=P!==void 0,z={size:"large",[B?"activeKey":"defaultActiveKey"]:B?P:O,onChange:u,class:`${D}-head-tabs`};let W;const j=S&&S.length?C($s,z,{default:()=>[S.map(Y=>{const{tab:J,slots:Q}=Y,G=Q==null?void 0:Q.tab;Nt(!Q,"Card","tabList slots is deprecated, Please use `customTab` instead.");let ee=J!==void 0?J:n[G]?n[G](Y):null;return ee=gm(n,"customTab",Y,()=>[ee]),C(mie,{tab:ee,key:Y.key,disabled:Y.disabled},null)})],rightExtra:T?()=>T:null}):null;(M||I||j)&&(W=C("div",{class:`${D}-head`,style:b},[C("div",{class:`${D}-head-wrapper`},[M&&C("div",{class:`${D}-head-title`},[M]),I&&C("div",{class:`${D}-extra`},[I])]),j]));const U=E?C("div",{class:`${D}-cover`},[E]):null,V=C("div",{class:`${D}-body`,style:y},[w?N:R]),q=k&&k.length?C("ul",{class:`${D}-actions`},[c(k)]):null;return s(C("div",H(H({ref:"cardContainerRef"},i),{},{class:[F,i.class]}),[W,U,R&&R.length?V:null,q]))}}}),bie=()=>({prefixCls:String,title:Zn(),description:Zn(),avatar:Zn()}),og=oe({compatConfig:{MODE:3},name:"ACardMeta",props:bie(),slots:Object,setup(t,e){let{slots:n}=e;const{prefixCls:i}=Me("card",t);return()=>{const o={[`${i.value}-meta`]:!0},r=gn(n,t,"avatar"),a=gn(n,t,"title"),s=gn(n,t,"description"),l=r?C("div",{class:`${i.value}-meta-avatar`},[r]):null,c=a?C("div",{class:`${i.value}-meta-title`},[a]):null,u=s?C("div",{class:`${i.value}-meta-description`},[s]):null,d=c||u?C("div",{class:`${i.value}-meta-detail`},[c,u]):null;return C("div",{class:o},[l,d])}}}),yie=()=>({prefixCls:String,hoverable:{type:Boolean,default:!0}}),rg=oe({compatConfig:{MODE:3},name:"ACardGrid",__ANT_CARD_GRID:!0,props:yie(),setup(t,e){let{slots:n}=e;const{prefixCls:i}=Me("card",t),o=L(()=>({[`${i.value}-grid`]:!0,[`${i.value}-grid-hoverable`]:t.hoverable}));return()=>{var r;return C("div",{class:o.value},[(r=n.default)===null||r===void 0?void 0:r.call(n)])}}});ql.Meta=og;ql.Grid=rg;ql.install=function(t){return t.component(ql.name,ql),t.component(og.name,og),t.component(rg.name,rg),t};const xie=()=>({prefixCls:String,activeKey:Xe([Array,Number,String]),defaultActiveKey:Xe([Array,Number,String]),accordion:Ce(),destroyInactivePanel:Ce(),bordered:Ce(),expandIcon:ve(),openAnimation:Z.object,expandIconPosition:Ne(),collapsible:Ne(),ghost:Ce(),onChange:ve(),"onUpdate:activeKey":ve()}),A4=()=>({openAnimation:Z.object,prefixCls:String,header:Z.any,headerClass:String,showArrow:Ce(),isActive:Ce(),destroyInactivePanel:Ce(),disabled:Ce(),accordion:Ce(),forceRender:Ce(),expandIcon:ve(),extra:Z.any,panelKey:Xe(),collapsible:Ne(),role:String,onItemClick:ve()}),wie=t=>{const{componentCls:e,collapseContentBg:n,padding:i,collapseContentPaddingHorizontal:o,collapseHeaderBg:r,collapseHeaderPadding:a,collapsePanelBorderRadius:s,lineWidth:l,lineType:c,colorBorder:u,colorText:d,colorTextHeading:f,colorTextDisabled:h,fontSize:p,lineHeight:g,marginSM:m,paddingSM:v,motionDurationSlow:b,fontSizeIcon:y}=t,w=`${l}px ${c} ${u}`;return{[e]:A(A({},rt(t)),{backgroundColor:r,border:w,borderBottom:0,borderRadius:`${s}px`,"&-rtl":{direction:"rtl"},[`& > ${e}-item`]:{borderBottom:w,"&:last-child":{[` &, & > ${e}-header`]:{borderRadius:`0 0 ${s}px ${s}px`}},[`> ${e}-header`]:{position:"relative",display:"flex",flexWrap:"nowrap",alignItems:"flex-start",padding:a,color:f,lineHeight:g,cursor:"pointer",transition:`all ${b}, visibility 0s`,[`> ${e}-header-text`]:{flex:"auto"},"&:focus":{outline:"none"},[`${e}-expand-icon`]:{height:p*g,display:"flex",alignItems:"center",paddingInlineEnd:m},[`${e}-arrow`]:A(A({},qs()),{fontSize:y,svg:{transition:`transform ${b}`}}),[`${e}-header-text`]:{marginInlineEnd:"auto"}},[`${e}-header-collapsible-only`]:{cursor:"default",[`${e}-header-text`]:{flex:"none",cursor:"pointer"},[`${e}-expand-icon`]:{cursor:"pointer"}},[`${e}-icon-collapsible-only`]:{cursor:"default",[`${e}-expand-icon`]:{cursor:"pointer"}},[`&${e}-no-arrow`]:{[`> ${e}-header`]:{paddingInlineStart:v}}},[`${e}-content`]:{color:d,backgroundColor:n,borderTop:w,[`& > ${e}-content-box`]:{padding:`${i}px ${o}px`},"&-hidden":{display:"none"}},[`${e}-item:last-child`]:{[`> ${e}-content`]:{borderRadius:`0 0 ${s}px ${s}px`}},[`& ${e}-item-disabled > ${e}-header`]:{"\n &,\n & > .arrow\n ":{color:h,cursor:"not-allowed"}},[`&${e}-icon-position-end`]:{[`& > ${e}-item`]:{[`> ${e}-header`]:{[`${e}-expand-icon`]:{order:1,paddingInlineEnd:0,paddingInlineStart:m}}}}})}},Sie=t=>{const{componentCls:e}=t,n=`> ${e}-item > ${e}-header ${e}-arrow svg`;return{[`${e}-rtl`]:{[n]:{transform:"rotate(180deg)"}}}},Cie=t=>{const{componentCls:e,collapseHeaderBg:n,paddingXXS:i,colorBorder:o}=t;return{[`${e}-borderless`]:{backgroundColor:n,border:0,[`> ${e}-item`]:{borderBottom:`1px solid ${o}`},[` > ${e}-item:last-child, > ${e}-item:last-child ${e}-header - `]:{borderRadius:0},[`> ${e}-item:last-child`]:{borderBottom:0},[`> ${e}-item > ${e}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${e}-item > ${e}-content > ${e}-content-box`]:{paddingTop:i}}}},$ie=t=>{const{componentCls:e,paddingSM:n}=t;return{[`${e}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${e}-item`]:{borderBottom:0,[`> ${e}-content`]:{backgroundColor:"transparent",border:0,[`> ${e}-content-box`]:{paddingBlock:n}}}}}},Aie=et("Collapse",t=>{const e=Ve(t,{collapseContentBg:t.colorBgContainer,collapseHeaderBg:t.colorFillAlter,collapseHeaderPadding:`${t.paddingSM}px ${t.padding}px`,collapsePanelBorderRadius:t.borderRadiusLG,collapseContentPaddingHorizontal:16});return[wie(e),Cie(e),$ie(e),Sie(e),Ud(e)]});function cP(t){let e=t;if(!Array.isArray(e)){const n=typeof e;e=n==="number"||n==="string"?[e]:[]}return e.map(n=>String(n))}const Nu=oe({compatConfig:{MODE:3},name:"ACollapse",inheritAttrs:!1,props:ct(xie(),{accordion:!1,destroyInactivePanel:!1,bordered:!0,expandIconPosition:"start"}),slots:Object,setup(t,e){let{attrs:n,slots:i,emit:o}=e;const r=se(cP(Wp([t.activeKey,t.defaultActiveKey])));ye(()=>t.activeKey,()=>{r.value=cP(t.activeKey)},{deep:!0});const{prefixCls:a,direction:s,rootPrefixCls:l}=Me("collapse",t),[c,u]=Aie(a),d=L(()=>{const{expandIconPosition:v}=t;return v!==void 0?v:s.value==="rtl"?"end":"start"}),f=v=>{const{expandIcon:b=i.expandIcon}=t,y=b?b(v):C(qi,{rotate:v.isActive?90:void 0},null);return C("div",{class:[`${a.value}-expand-icon`,u.value],onClick:()=>["header","icon"].includes(t.collapsible)&&p(v.panelKey)},[cn(Array.isArray(b)?y[0]:y)?At(y,{class:`${a.value}-arrow`},!1):y])},h=v=>{t.activeKey===void 0&&(r.value=v);const b=t.accordion?v[0]:v;o("update:activeKey",b),o("change",b)},p=v=>{let b=r.value;if(t.accordion)b=b[0]===v?[]:[v];else{b=[...b];const y=b.indexOf(v);y>-1?b.splice(y,1):b.push(v)}h(b)},g=(v,b)=>{var y,w,x;if(jd(v))return;const $=r.value,{accordion:S,destroyInactivePanel:_,collapsible:P,openAnimation:O}=t,T=O||Zd(`${l.value}-motion-collapse`),M=String((y=v.key)!==null&&y!==void 0?y:b),{header:I=(x=(w=v.children)===null||w===void 0?void 0:w.header)===null||x===void 0?void 0:x.call(w),headerClass:k,collapsible:E,disabled:R}=v.props||{};let D=!1;S?D=$[0]===M:D=$.indexOf(M)>-1;let F=E??P;(R||R==="")&&(F="disabled");const N={key:M,panelKey:M,header:I,headerClass:k,isActive:D,prefixCls:a.value,destroyInactivePanel:_,openAnimation:T,accordion:S,onItemClick:F==="disabled"?null:p,expandIcon:f,collapsible:F};return At(v,N)},m=()=>{var v;return Dt((v=i.default)===null||v===void 0?void 0:v.call(i)).map(g)};return()=>{const{accordion:v,bordered:b,ghost:y}=t,w=ce(a.value,{[`${a.value}-borderless`]:!b,[`${a.value}-icon-position-${d.value}`]:!0,[`${a.value}-rtl`]:s.value==="rtl",[`${a.value}-ghost`]:!!y,[n.class]:!!n.class},u.value);return c(C("div",H(H({class:w},FH(n)),{},{style:n.style,role:v?"tablist":null}),[m()]))}}}),_ie=oe({compatConfig:{MODE:3},name:"PanelContent",props:A4(),setup(t,e){let{slots:n}=e;const i=ie(!1);return Ke(()=>{(t.isActive||t.forceRender)&&(i.value=!0)}),()=>{var o;if(!i.value)return null;const{prefixCls:r,isActive:a,role:s}=t;return C("div",{class:ce(`${r}-content`,{[`${r}-content-active`]:a,[`${r}-content-inactive`]:!a}),role:s},[C("div",{class:`${r}-content-box`},[(o=n.default)===null||o===void 0?void 0:o.call(n)])])}}}),rg=oe({compatConfig:{MODE:3},name:"ACollapsePanel",inheritAttrs:!1,props:ct(A4(),{showArrow:!0,isActive:!1,onItemClick(){},headerClass:"",forceRender:!1}),slots:Object,setup(t,e){let{slots:n,emit:i,attrs:o}=e;Nt(t.disabled===void 0,"Collapse.Panel",'`disabled` is deprecated. Please use `collapsible="disabled"` instead.');const{prefixCls:r}=Me("collapse",t),a=()=>{i("itemClick",t.panelKey)},s=l=>{(l.key==="Enter"||l.keyCode===13||l.which===13)&&a()};return()=>{var l,c;const{header:u=(l=n.header)===null||l===void 0?void 0:l.call(n),headerClass:d,isActive:f,showArrow:h,destroyInactivePanel:p,accordion:g,forceRender:m,openAnimation:v,expandIcon:b=n.expandIcon,extra:y=(c=n.extra)===null||c===void 0?void 0:c.call(n),collapsible:w}=t,x=w==="disabled",$=r.value,S=ce(`${$}-header`,{[d]:d,[`${$}-header-collapsible-only`]:w==="header",[`${$}-icon-collapsible-only`]:w==="icon"}),_=ce({[`${$}-item`]:!0,[`${$}-item-active`]:f,[`${$}-item-disabled`]:x,[`${$}-no-arrow`]:!h,[`${o.class}`]:!!o.class});let P=C("i",{class:"arrow"},null);h&&typeof b=="function"&&(P=b(t));const O=ni(C(_ie,{prefixCls:$,isActive:f,forceRender:m,role:g?"tabpanel":null},{default:n.default}),[[vi,f]]),T=A({appear:!1,css:!1},v);return C("div",H(H({},o),{},{class:_}),[C("div",{class:S,onClick:()=>!["header","icon"].includes(w)&&a(),role:g?"tab":"button",tabindex:x?-1:0,"aria-expanded":f,onKeypress:s},[h&&P,C("span",{onClick:()=>w==="header"&&a(),class:`${$}-header-text`},[u]),y&&C("div",{class:`${$}-extra`},[y])]),C(En,T,{default:()=>[!p||f?O:null]})])}}});Nu.Panel=rg;Nu.install=function(t){return t.component(Nu.name,Nu),t.component(rg.name,rg),t};const Pie=function(t){return t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()}).toLowerCase()},Tie=function(t){return/[height|width]$/.test(t)},uP=function(t){let e="";const n=Object.keys(t);return n.forEach(function(i,o){let r=t[i];i=Pie(i),Tie(i)&&typeof r=="number"&&(r=r+"px"),r===!0?e+=i:r===!1?e+="not "+i:e+="("+i+": "+r+")",o{["touchstart","touchmove","wheel"].includes(t.type)||t.preventDefault()},ag=t=>{const e=[],n=P4(t),i=T4(t);for(let o=n;ot.currentSlide-Eie(t),T4=t=>t.currentSlide+Mie(t),Eie=t=>t.centerMode?Math.floor(t.slidesToShow/2)+(parseInt(t.centerPadding)>0?1:0):0,Mie=t=>t.centerMode?Math.floor((t.slidesToShow-1)/2)+1+(parseInt(t.centerPadding)>0?1:0):t.slidesToShow,Wy=t=>t&&t.offsetWidth||0,FS=t=>t&&t.offsetHeight||0,O4=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;const i=t.startX-t.curX,o=t.startY-t.curY,r=Math.atan2(o,i);return n=Math.round(r*180/Math.PI),n<0&&(n=360-Math.abs(n)),n<=45&&n>=0||n<=360&&n>=315?"left":n>=135&&n<=225?"right":e===!0?n>=35&&n<=135?"up":"down":"vertical"},Xm=t=>{let e=!0;return t.infinite||(t.centerMode&&t.currentSlide>=t.slideCount-1||t.slideCount<=t.slidesToShow||t.currentSlide>=t.slideCount-t.slidesToShow)&&(e=!1),e},Ib=(t,e)=>{const n={};return e.forEach(i=>n[i]=t[i]),n},Iie=t=>{const e=t.children.length,n=t.listRef,i=Math.ceil(Wy(n)),o=t.trackRef,r=Math.ceil(Wy(o));let a;if(t.vertical)a=i;else{let h=t.centerMode&&parseInt(t.centerPadding)*2;typeof t.centerPadding=="string"&&t.centerPadding.slice(-1)==="%"&&(h*=i/100),a=Math.ceil((i-h)/t.slidesToShow)}const s=n&&FS(n.querySelector('[data-index="0"]')),l=s*t.slidesToShow;let c=t.currentSlide===void 0?t.initialSlide:t.currentSlide;t.rtl&&t.currentSlide===void 0&&(c=e-1-t.initialSlide);let u=t.lazyLoadedList||[];const d=ag(A(A({},t),{currentSlide:c,lazyLoadedList:u}));u=u.concat(d);const f={slideCount:e,slideWidth:a,listWidth:i,trackWidth:r,currentSlide:c,slideHeight:s,listHeight:l,lazyLoadedList:u};return t.autoplaying===null&&t.autoplay&&(f.autoplaying="playing"),f},kie=t=>{const{waitForAnimate:e,animating:n,fade:i,infinite:o,index:r,slideCount:a,lazyLoad:s,currentSlide:l,centerMode:c,slidesToScroll:u,slidesToShow:d,useCSS:f}=t;let{lazyLoadedList:h}=t;if(e&&n)return{};let p=r,g,m,v,b={},y={};const w=o?r:Hy(r,0,a-1);if(i){if(!o&&(r<0||r>=a))return{};r<0?p=r+a:r>=a&&(p=r-a),s&&h.indexOf(p)<0&&(h=h.concat(p)),b={animating:!0,currentSlide:p,lazyLoadedList:h,targetSlide:p},y={animating:!1,targetSlide:p}}else g=p,p<0?(g=p+a,o?a%u!==0&&(g=a-a%u):g=0):!Xm(t)&&p>l?p=g=l:c&&p>=a?(p=o?a:a-1,g=o?0:a-1):p>=a&&(g=p-a,o?a%u!==0&&(g=0):g=a-d),!o&&p+d>=a&&(g=a-d),m=$d(A(A({},t),{slideIndex:p})),v=$d(A(A({},t),{slideIndex:g})),o||(m===v&&(p=g),m=v),s&&(h=h.concat(ag(A(A({},t),{currentSlide:p})))),f?(b={animating:!0,currentSlide:g,trackStyle:E4(A(A({},t),{left:m})),lazyLoadedList:h,targetSlide:w},y={animating:!1,currentSlide:g,trackStyle:Cd(A(A({},t),{left:v})),swipeLeft:null,targetSlide:w}):b={currentSlide:g,trackStyle:Cd(A(A({},t),{left:v})),lazyLoadedList:h,targetSlide:w};return{state:b,nextState:y}},Die=(t,e)=>{let n,i,o;const{slidesToScroll:r,slidesToShow:a,slideCount:s,currentSlide:l,targetSlide:c,lazyLoad:u,infinite:d}=t,h=s%r!==0?0:(s-l)%r;if(e.message==="previous")i=h===0?r:a-h,o=l-i,u&&!d&&(n=l-i,o=n===-1?s-1:n),d||(o=c-r);else if(e.message==="next")i=h===0?r:h,o=l+i,u&&!d&&(o=(l+r)%s+h),d||(o=c+r);else if(e.message==="dots")o=e.index*e.slidesToScroll;else if(e.message==="children"){if(o=e.index,d){const p=Hie(A(A({},t),{targetSlide:o}));o>e.currentSlide&&p==="left"?o=o-s:ot.target.tagName.match("TEXTAREA|INPUT|SELECT")||!e?"":t.keyCode===37?n?"next":"previous":t.keyCode===39?n?"previous":"next":"",Lie=(t,e,n)=>(t.target.tagName==="IMG"&&Zl(t),!e||!n&&t.type.indexOf("mouse")!==-1?"":{dragging:!0,touchObject:{startX:t.touches?t.touches[0].pageX:t.clientX,startY:t.touches?t.touches[0].pageY:t.clientY,curX:t.touches?t.touches[0].pageX:t.clientX,curY:t.touches?t.touches[0].pageY:t.clientY}}),Fie=(t,e)=>{const{scrolling:n,animating:i,vertical:o,swipeToSlide:r,verticalSwiping:a,rtl:s,currentSlide:l,edgeFriction:c,edgeDragged:u,onEdge:d,swiped:f,swiping:h,slideCount:p,slidesToScroll:g,infinite:m,touchObject:v,swipeEvent:b,listHeight:y,listWidth:w}=e;if(n)return;if(i)return Zl(t);o&&r&&a&&Zl(t);let x,$={};const S=$d(e);v.curX=t.touches?t.touches[0].pageX:t.clientX,v.curY=t.touches?t.touches[0].pageY:t.clientY,v.swipeLength=Math.round(Math.sqrt(Math.pow(v.curX-v.startX,2)));const _=Math.round(Math.sqrt(Math.pow(v.curY-v.startY,2)));if(!a&&!h&&_>10)return{scrolling:!0};a&&(v.swipeLength=_);let P=(s?-1:1)*(v.curX>v.startX?1:-1);a&&(P=v.curY>v.startY?1:-1);const O=Math.ceil(p/g),T=O4(e.touchObject,a);let M=v.swipeLength;return m||(l===0&&(T==="right"||T==="down")||l+1>=O&&(T==="left"||T==="up")||!Xm(e)&&(T==="left"||T==="up"))&&(M=v.swipeLength*c,u===!1&&d&&(d(T),$.edgeDragged=!0)),!f&&b&&(b(T),$.swiped=!0),o?x=S+M*(y/w)*P:s?x=S-M*P:x=S+M*P,a&&(x=S+M*P),$=A(A({},$),{touchObject:v,swipeLeft:x,trackStyle:Cd(A(A({},e),{left:x}))}),Math.abs(v.curX-v.startX)10&&($.swiping=!0,Zl(t)),$},Nie=(t,e)=>{const{dragging:n,swipe:i,touchObject:o,listWidth:r,touchThreshold:a,verticalSwiping:s,listHeight:l,swipeToSlide:c,scrolling:u,onSwipe:d,targetSlide:f,currentSlide:h,infinite:p}=e;if(!n)return i&&Zl(t),{};const g=s?l/a:r/a,m=O4(o,s),v={dragging:!1,edgeDragged:!1,scrolling:!1,swiping:!1,swiped:!1,swipeLeft:null,touchObject:{}};if(u||!o.swipeLength)return v;if(o.swipeLength>g){Zl(t),d&&d(m);let b,y;const w=p?h:f;switch(m){case"left":case"up":y=w+fP(e),b=c?dP(e,y):y,v.currentDirection=0;break;case"right":case"down":y=w-fP(e),b=c?dP(e,y):y,v.currentDirection=1;break;default:b=w}v.triggerSlideHandler=b}else{const b=$d(e);v.trackStyle=E4(A(A({},e),{left:b}))}return v},Bie=t=>{const e=t.infinite?t.slideCount*2:t.slideCount;let n=t.infinite?t.slidesToShow*-1:0,i=t.infinite?t.slidesToShow*-1:0;const o=[];for(;n{const n=Bie(t);let i=0;if(e>n[n.length-1])e=n[n.length-1];else for(const o in n){if(e{const e=t.centerMode?t.slideWidth*Math.floor(t.slidesToShow/2):0;if(t.swipeToSlide){let n;const i=t.listRef,o=i.querySelectorAll&&i.querySelectorAll(".slick-slide")||[];if(Array.from(o).every(s=>{if(t.vertical){if(s.offsetTop+FS(s)/2>t.swipeLeft*-1)return n=s,!1}else if(s.offsetLeft-e+Wy(s)/2>t.swipeLeft*-1)return n=s,!1;return!0}),!n)return 0;const r=t.rtl===!0?t.slideCount-t.currentSlide:t.currentSlide;return Math.abs(n.dataset.index-r)||1}else return t.slidesToScroll},NS=(t,e)=>e.reduce((n,i)=>n&&t.hasOwnProperty(i),!0)?null:console.error("Keys Missing:",t),Cd=t=>{NS(t,["left","variableWidth","slideCount","slidesToShow","slideWidth"]);let e,n;const i=t.slideCount+2*t.slidesToShow;t.vertical?n=i*t.slideHeight:e=zie(t)*t.slideWidth;let o={opacity:1,transition:"",WebkitTransition:""};if(t.useTransform){const r=t.vertical?"translate3d(0px, "+t.left+"px, 0px)":"translate3d("+t.left+"px, 0px, 0px)",a=t.vertical?"translate3d(0px, "+t.left+"px, 0px)":"translate3d("+t.left+"px, 0px, 0px)",s=t.vertical?"translateY("+t.left+"px)":"translateX("+t.left+"px)";o=A(A({},o),{WebkitTransform:r,transform:a,msTransform:s})}else t.vertical?o.top=t.left:o.left=t.left;return t.fade&&(o={opacity:1}),e&&(o.width=e+"px"),n&&(o.height=n+"px"),window&&!window.addEventListener&&window.attachEvent&&(t.vertical?o.marginTop=t.left+"px":o.marginLeft=t.left+"px"),o},E4=t=>{NS(t,["left","variableWidth","slideCount","slidesToShow","slideWidth","speed","cssEase"]);const e=Cd(t);return t.useTransform?(e.WebkitTransition="-webkit-transform "+t.speed+"ms "+t.cssEase,e.transition="transform "+t.speed+"ms "+t.cssEase):t.vertical?e.transition="top "+t.speed+"ms "+t.cssEase:e.transition="left "+t.speed+"ms "+t.cssEase,e},$d=t=>{if(t.unslick)return 0;NS(t,["slideIndex","trackRef","infinite","centerMode","slideCount","slidesToShow","slidesToScroll","slideWidth","listWidth","variableWidth","slideHeight"]);const{slideIndex:e,trackRef:n,infinite:i,centerMode:o,slideCount:r,slidesToShow:a,slidesToScroll:s,slideWidth:l,listWidth:c,variableWidth:u,slideHeight:d,fade:f,vertical:h}=t;let p=0,g,m,v=0;if(f||t.slideCount===1)return 0;let b=0;if(i?(b=-Mr(t),r%s!==0&&e+s>r&&(b=-(e>r?a-(e-r):r%s)),o&&(b+=parseInt(a/2))):(r%s!==0&&e+s>r&&(b=a-r%s),o&&(b=parseInt(a/2))),p=b*l,v=b*d,h?g=e*d*-1+v:g=e*l*-1+p,u===!0){let y;const w=n;if(y=e+Mr(t),m=w&&w.childNodes[y],g=m?m.offsetLeft*-1:0,o===!0){y=i?e+Mr(t):e,m=w&&w.children[y],g=0;for(let x=0;xt.unslick||!t.infinite?0:t.variableWidth?t.slideCount:t.slidesToShow+(t.centerMode?1:0),_h=t=>t.unslick||!t.infinite?0:t.slideCount,zie=t=>t.slideCount===1?1:Mr(t)+t.slideCount+_h(t),Hie=t=>t.targetSlide>t.currentSlide?t.targetSlide>t.currentSlide+Wie(t)?"left":"right":t.targetSlide{let{slidesToShow:e,centerMode:n,rtl:i,centerPadding:o}=t;if(n){let r=(e-1)/2+1;return parseInt(o)>0&&(r+=1),i&&e%2===0&&(r+=1),r}return i?0:e-1},jie=t=>{let{slidesToShow:e,centerMode:n,rtl:i,centerPadding:o}=t;if(n){let r=(e-1)/2+1;return parseInt(o)>0&&(r+=1),!i&&e%2===0&&(r+=1),r}return i?e-1:0},hP=()=>!!(typeof window<"u"&&window.document&&window.document.createElement),kb=t=>{let e,n,i,o;t.rtl?o=t.slideCount-1-t.index:o=t.index;const r=o<0||o>=t.slideCount;t.centerMode?(i=Math.floor(t.slidesToShow/2),n=(o-t.currentSlide)%t.slideCount===0,o>t.currentSlide-i-1&&o<=t.currentSlide+i&&(e=!0)):e=t.currentSlide<=o&&o=t.slideCount?a=t.targetSlide-t.slideCount:a=t.targetSlide,{"slick-slide":!0,"slick-active":e,"slick-center":n,"slick-cloned":r,"slick-current":o===a}},Vie=function(t){const e={};return(t.variableWidth===void 0||t.variableWidth===!1)&&(e.width=t.slideWidth+(typeof t.slideWidth=="number"?"px":"")),t.fade&&(e.position="relative",t.vertical?e.top=-t.index*parseInt(t.slideHeight)+"px":e.left=-t.index*parseInt(t.slideWidth)+"px",e.opacity=t.currentSlide===t.index?1:0,t.useCSS&&(e.transition="opacity "+t.speed+"ms "+t.cssEase+", visibility "+t.speed+"ms "+t.cssEase)),e},Db=(t,e)=>t.key+"-"+e,Xie=function(t,e){let n;const i=[],o=[],r=[],a=e.length,s=P4(t),l=T4(t);return e.forEach((c,u)=>{let d;const f={message:"children",index:u,slidesToScroll:t.slidesToScroll,currentSlide:t.currentSlide};!t.lazyLoad||t.lazyLoad&&t.lazyLoadedList.indexOf(u)>=0?d=c:d=C("div");const h=Vie(A(A({},t),{index:u})),p=d.props.class||"";let g=kb(A(A({},t),{index:u}));if(i.push(Iu(d,{key:"original"+Db(d,u),tabindex:"-1","data-index":u,"aria-hidden":!g["slick-active"],class:ce(g,p),style:A(A({outline:"none"},d.props.style||{}),h),onClick:()=>{t.focusOnSelect&&t.focusOnSelect(f)}})),t.infinite&&t.fade===!1){const m=a-u;m<=Mr(t)&&a!==t.slidesToShow&&(n=-m,n>=s&&(d=c),g=kb(A(A({},t),{index:n})),o.push(Iu(d,{key:"precloned"+Db(d,n),class:ce(g,p),tabindex:"-1","data-index":n,"aria-hidden":!g["slick-active"],style:A(A({},d.props.style||{}),h),onClick:()=>{t.focusOnSelect&&t.focusOnSelect(f)}}))),a!==t.slidesToShow&&(n=a+u,n{t.focusOnSelect&&t.focusOnSelect(f)}})))}}),t.rtl?o.concat(i,r).reverse():o.concat(i,r)},M4=(t,e)=>{let{attrs:n,slots:i}=e;const o=Xie(n,Dt(i==null?void 0:i.default())),{onMouseenter:r,onMouseover:a,onMouseleave:s}=n,l={onMouseenter:r,onMouseover:a,onMouseleave:s},c=A({class:"slick-track",style:n.trackStyle},l);return C("div",c,[o])};M4.inheritAttrs=!1;const Yie=function(t){let e;return t.infinite?e=Math.ceil(t.slideCount/t.slidesToScroll):e=Math.ceil((t.slideCount-t.slidesToShow)/t.slidesToScroll)+1,e},I4=(t,e)=>{let{attrs:n}=e;const{slideCount:i,slidesToScroll:o,slidesToShow:r,infinite:a,currentSlide:s,appendDots:l,customPaging:c,clickHandler:u,dotsClass:d,onMouseenter:f,onMouseover:h,onMouseleave:p}=n,g=Yie({slideCount:i,slidesToScroll:o,slidesToShow:r,infinite:a}),m={onMouseenter:f,onMouseover:h,onMouseleave:p};let v=[];for(let b=0;b=$&&s<=w:s===$}),_={message:"dots",index:b,slidesToScroll:o,currentSlide:s};v=v.concat(C("li",{key:b,class:S},[At(c({i:b}),{onClick:P})]))}return At(l({dots:v}),A({class:d},m))};I4.inheritAttrs=!1;function k4(){}function D4(t,e,n){n&&n.preventDefault(),e(t,n)}const R4=(t,e)=>{let{attrs:n}=e;const{clickHandler:i,infinite:o,currentSlide:r,slideCount:a,slidesToShow:s}=n,l={"slick-arrow":!0,"slick-prev":!0};let c=function(h){D4({message:"previous"},i,h)};!o&&(r===0||a<=s)&&(l["slick-disabled"]=!0,c=k4);const u={key:"0","data-role":"none",class:l,style:{display:"block"},onClick:c},d={currentSlide:r,slideCount:a};let f;return n.prevArrow?f=At(n.prevArrow(A(A({},u),d)),{key:"0",class:l,style:{display:"block"},onClick:c},!1):f=C("button",H({key:"0",type:"button"},u),[" ",Qn("Previous")]),f};R4.inheritAttrs=!1;const L4=(t,e)=>{let{attrs:n}=e;const{clickHandler:i,currentSlide:o,slideCount:r}=n,a={"slick-arrow":!0,"slick-next":!0};let s=function(d){D4({message:"next"},i,d)};Xm(n)||(a["slick-disabled"]=!0,s=k4);const l={key:"1","data-role":"none",class:ce(a),style:{display:"block"},onClick:s},c={currentSlide:o,slideCount:r};let u;return n.nextArrow?u=At(n.nextArrow(A(A({},l),c)),{key:"1",class:ce(a),style:{display:"block"},onClick:s},!1):u=C("button",H({key:"1",type:"button"},l),[" ",Qn("Next")]),u};L4.inheritAttrs=!1;var Gie=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{this.currentSlide>=t.children.length&&this.changeSlide({message:"index",index:t.children.length-t.slidesToShow,currentSlide:this.currentSlide}),!this.preProps.autoplay&&t.autoplay?this.handleAutoPlay("playing"):t.autoplay?this.handleAutoPlay("update"):this.pause("paused")}),this.preProps=A({},t)}},mounted(){if(this.__emit("init"),this.lazyLoad){const t=ag(A(A({},this.$props),this.$data));t.length>0&&(this.setState(e=>({lazyLoadedList:e.lazyLoadedList.concat(t)})),this.__emit("lazyLoad",t))}this.$nextTick(()=>{const t=A({listRef:this.list,trackRef:this.track,children:this.children},this.$props);this.updateState(t,!0,()=>{this.adaptHeight(),this.autoplay&&this.handleAutoPlay("playing")}),this.lazyLoad==="progressive"&&(this.lazyLoadTimer=setInterval(this.progressiveLazyLoad,1e3)),this.ro=new zw(()=>{this.animating?(this.onWindowResized(!1),this.callbackTimers.push(setTimeout(()=>this.onWindowResized(),this.speed))):this.onWindowResized()}),this.ro.observe(this.list),document.querySelectorAll&&Array.prototype.forEach.call(document.querySelectorAll(".slick-slide"),e=>{e.onfocus=this.$props.pauseOnFocus?this.onSlideFocus:null,e.onblur=this.$props.pauseOnFocus?this.onSlideBlur:null}),window.addEventListener?window.addEventListener("resize",this.onWindowResized):window.attachEvent("onresize",this.onWindowResized)})},beforeUnmount(){var t;this.animationEndCallback&&clearTimeout(this.animationEndCallback),this.lazyLoadTimer&&clearInterval(this.lazyLoadTimer),this.callbackTimers.length&&(this.callbackTimers.forEach(e=>clearTimeout(e)),this.callbackTimers=[]),window.addEventListener?window.removeEventListener("resize",this.onWindowResized):window.detachEvent("onresize",this.onWindowResized),this.autoplayTimer&&clearInterval(this.autoplayTimer),(t=this.ro)===null||t===void 0||t.disconnect()},updated(){if(this.checkImagesLoad(),this.__emit("reInit"),this.lazyLoad){const t=ag(A(A({},this.$props),this.$data));t.length>0&&(this.setState(e=>({lazyLoadedList:e.lazyLoadedList.concat(t)})),this.__emit("lazyLoad"))}this.adaptHeight()},methods:{listRefHandler(t){this.list=t},trackRefHandler(t){this.track=t},adaptHeight(){if(this.adaptiveHeight&&this.list){const t=this.list.querySelector(`[data-index="${this.currentSlide}"]`);this.list.style.height=FS(t)+"px"}},onWindowResized(t){this.debouncedResize&&this.debouncedResize.cancel(),this.debouncedResize=W1(()=>this.resizeWindow(t),50),this.debouncedResize()},resizeWindow(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(!!!this.track)return;const n=A(A({listRef:this.list,trackRef:this.track,children:this.children},this.$props),this.$data);this.updateState(n,t,()=>{this.autoplay?this.handleAutoPlay("update"):this.pause("paused")}),this.setState({animating:!1}),clearTimeout(this.animationEndCallback),delete this.animationEndCallback},updateState(t,e,n){const i=Iie(t);t=A(A(A({},t),i),{slideIndex:i.currentSlide});const o=$d(t);t=A(A({},t),{left:o});const r=Cd(t);(e||this.children.length!==t.children.length)&&(i.trackStyle=r),this.setState(i,n)},ssrInit(){const t=this.children;if(this.variableWidth){let l=0,c=0;const u=[],d=Mr(A(A(A({},this.$props),this.$data),{slideCount:t.length})),f=_h(A(A(A({},this.$props),this.$data),{slideCount:t.length}));t.forEach(p=>{var g,m;const v=((m=(g=p.props.style)===null||g===void 0?void 0:g.width)===null||m===void 0?void 0:m.split("px")[0])||0;u.push(v),l+=v});for(let p=0;p{const o=()=>++n&&n>=e&&this.onWindowResized();if(!i.onclick)i.onclick=()=>i.parentNode.focus();else{const r=i.onclick;i.onclick=()=>{r(),i.parentNode.focus()}}i.onload||(this.$props.lazyLoad?i.onload=()=>{this.adaptHeight(),this.callbackTimers.push(setTimeout(this.onWindowResized,this.speed))}:(i.onload=o,i.onerror=()=>{o(),this.__emit("lazyLoadError")}))})},progressiveLazyLoad(){const t=[],e=A(A({},this.$props),this.$data);for(let n=this.currentSlide;n=-Mr(e);n--)if(this.lazyLoadedList.indexOf(n)<0){t.push(n);break}t.length>0?(this.setState(n=>({lazyLoadedList:n.lazyLoadedList.concat(t)})),this.__emit("lazyLoad",t)):this.lazyLoadTimer&&(clearInterval(this.lazyLoadTimer),delete this.lazyLoadTimer)},slideHandler(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const{asNavFor:n,beforeChange:i,speed:o,afterChange:r}=this.$props,{state:a,nextState:s}=kie(A(A(A({index:t},this.$props),this.$data),{trackRef:this.track,useCSS:this.useCSS&&!e}));if(!a)return;i&&i(this.currentSlide,a.currentSlide);const l=a.lazyLoadedList.filter(c=>this.lazyLoadedList.indexOf(c)<0);this.$attrs.onLazyLoad&&l.length>0&&this.__emit("lazyLoad",l),!this.$props.waitForAnimate&&this.animationEndCallback&&(clearTimeout(this.animationEndCallback),r&&r(this.currentSlide),delete this.animationEndCallback),this.setState(a,()=>{n&&this.asNavForIndex!==t&&(this.asNavForIndex=t,n.innerSlider.slideHandler(t)),s&&(this.animationEndCallback=setTimeout(()=>{const{animating:c}=s,u=Gie(s,["animating"]);this.setState(u,()=>{this.callbackTimers.push(setTimeout(()=>this.setState({animating:c}),10)),r&&r(a.currentSlide),delete this.animationEndCallback})},o))})},changeSlide(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=A(A({},this.$props),this.$data),i=Die(n,t);if(!(i!==0&&!i)&&(e===!0?this.slideHandler(i,e):this.slideHandler(i),this.$props.autoplay&&this.handleAutoPlay("update"),this.$props.focusOnSelect)){const o=this.list.querySelectorAll(".slick-current");o[0]&&o[0].focus()}},clickHandler(t){this.clickable===!1&&(t.stopPropagation(),t.preventDefault()),this.clickable=!0},keyHandler(t){const e=Rie(t,this.accessibility,this.rtl);e!==""&&this.changeSlide({message:e})},selectHandler(t){this.changeSlide(t)},disableBodyScroll(){const t=e=>{e=e||window.event,e.preventDefault&&e.preventDefault(),e.returnValue=!1};window.ontouchmove=t},enableBodyScroll(){window.ontouchmove=null},swipeStart(t){this.verticalSwiping&&this.disableBodyScroll();const e=Lie(t,this.swipe,this.draggable);e!==""&&this.setState(e)},swipeMove(t){const e=Fie(t,A(A(A({},this.$props),this.$data),{trackRef:this.track,listRef:this.list,slideIndex:this.currentSlide}));e&&(e.swiping&&(this.clickable=!1),this.setState(e))},swipeEnd(t){const e=Nie(t,A(A(A({},this.$props),this.$data),{trackRef:this.track,listRef:this.list,slideIndex:this.currentSlide}));if(!e)return;const n=e.triggerSlideHandler;delete e.triggerSlideHandler,this.setState(e),n!==void 0&&(this.slideHandler(n),this.$props.verticalSwiping&&this.enableBodyScroll())},touchEnd(t){this.swipeEnd(t),this.clickable=!0},slickPrev(){this.callbackTimers.push(setTimeout(()=>this.changeSlide({message:"previous"}),0))},slickNext(){this.callbackTimers.push(setTimeout(()=>this.changeSlide({message:"next"}),0))},slickGoTo(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(t=Number(t),isNaN(t))return"";this.callbackTimers.push(setTimeout(()=>this.changeSlide({message:"index",index:t,currentSlide:this.currentSlide},e),0))},play(){let t;if(this.rtl)t=this.currentSlide-this.slidesToScroll;else if(Xm(A(A({},this.$props),this.$data)))t=this.currentSlide+this.slidesToScroll;else return!1;this.slideHandler(t)},handleAutoPlay(t){this.autoplayTimer&&clearInterval(this.autoplayTimer);const e=this.autoplaying;if(t==="update"){if(e==="hovered"||e==="focused"||e==="paused")return}else if(t==="leave"){if(e==="paused"||e==="focused")return}else if(t==="blur"&&(e==="paused"||e==="hovered"))return;this.autoplayTimer=setInterval(this.play,this.autoplaySpeed+50),this.setState({autoplaying:"playing"})},pause(t){this.autoplayTimer&&(clearInterval(this.autoplayTimer),this.autoplayTimer=null);const e=this.autoplaying;t==="paused"?this.setState({autoplaying:"paused"}):t==="focused"?(e==="hovered"||e==="playing")&&this.setState({autoplaying:"focused"}):e==="playing"&&this.setState({autoplaying:"hovered"})},onDotsOver(){this.autoplay&&this.pause("hovered")},onDotsLeave(){this.autoplay&&this.autoplaying==="hovered"&&this.handleAutoPlay("leave")},onTrackOver(){this.autoplay&&this.pause("hovered")},onTrackLeave(){this.autoplay&&this.autoplaying==="hovered"&&this.handleAutoPlay("leave")},onSlideFocus(){this.autoplay&&this.pause("focused")},onSlideBlur(){this.autoplay&&this.autoplaying==="focused"&&this.handleAutoPlay("blur")},customPaging(t){let{i:e}=t;return C("button",null,[e+1])},appendDots(t){let{dots:e}=t;return C("ul",{style:{display:"block"}},[e])}},render(){const t=ce("slick-slider",this.$attrs.class,{"slick-vertical":this.vertical,"slick-initialized":!0}),e=A(A({},this.$props),this.$data);let n=Ib(e,["fade","cssEase","speed","infinite","centerMode","focusOnSelect","currentSlide","lazyLoad","lazyLoadedList","rtl","slideWidth","slideHeight","listHeight","vertical","slidesToShow","slidesToScroll","slideCount","trackStyle","variableWidth","unslick","centerPadding","targetSlide","useCSS"]);const{pauseOnHover:i}=this.$props;n=A(A({},n),{focusOnSelect:this.focusOnSelect&&this.clickable?this.selectHandler:null,ref:this.trackRefHandler,onMouseleave:i?this.onTrackLeave:Di,onMouseover:i?this.onTrackOver:Di});let o;if(this.dots===!0&&this.slideCount>=this.slidesToShow){let m=Ib(e,["dotsClass","slideCount","slidesToShow","currentSlide","slidesToScroll","clickHandler","children","infinite","appendDots"]);m.customPaging=this.customPaging,m.appendDots=this.appendDots;const{customPaging:v,appendDots:b}=this.$slots;v&&(m.customPaging=v),b&&(m.appendDots=b);const{pauseOnDotsHover:y}=this.$props;m=A(A({},m),{clickHandler:this.changeSlide,onMouseover:y?this.onDotsOver:Di,onMouseleave:y?this.onDotsLeave:Di}),o=C(I4,m,null)}let r,a;const s=Ib(e,["infinite","centerMode","currentSlide","slideCount","slidesToShow"]);s.clickHandler=this.changeSlide;const{prevArrow:l,nextArrow:c}=this.$slots;l&&(s.prevArrow=l),c&&(s.nextArrow=c),this.arrows&&(r=C(R4,s,null),a=C(L4,s,null));let u=null;this.vertical&&(u={height:typeof this.listHeight=="number"?`${this.listHeight}px`:this.listHeight});let d=null;this.vertical===!1?this.centerMode===!0&&(d={padding:"0px "+this.centerPadding}):this.centerMode===!0&&(d={padding:this.centerPadding+" 0px"});const f=A(A({},u),d),h=this.touchMove;let p={ref:this.listRefHandler,class:"slick-list",style:f,onClick:this.clickHandler,onMousedown:h?this.swipeStart:Di,onMousemove:this.dragging&&h?this.swipeMove:Di,onMouseup:h?this.swipeEnd:Di,onMouseleave:this.dragging&&h?this.swipeEnd:Di,[pn?"onTouchstartPassive":"onTouchstart"]:h?this.swipeStart:Di,[pn?"onTouchmovePassive":"onTouchmove"]:this.dragging&&h?this.swipeMove:Di,onTouchend:h?this.touchEnd:Di,onTouchcancel:this.dragging&&h?this.swipeEnd:Di,onKeydown:this.accessibility?this.keyHandler:Di},g={class:t,dir:"ltr",style:this.$attrs.style};return this.unslick&&(p={class:"slick-list",ref:this.listRefHandler},g={class:t}),C("div",g,[this.unslick?"":r,C("div",p,[C(M4,n,{default:()=>[this.children]})]),this.unslick?"":a,this.unslick?"":o])}},Uie=oe({name:"Slider",mixins:[el],inheritAttrs:!1,props:A({},_4),data(){return this._responsiveMediaHandlers=[],{breakpoint:null}},mounted(){if(this.responsive){const t=this.responsive.map(n=>n.breakpoint);t.sort((n,i)=>n-i),t.forEach((n,i)=>{let o;i===0?o=Mb({minWidth:0,maxWidth:n}):o=Mb({minWidth:t[i-1]+1,maxWidth:n}),hP()&&this.media(o,()=>{this.setState({breakpoint:n})})});const e=Mb({minWidth:t.slice(-1)[0]});hP()&&this.media(e,()=>{this.setState({breakpoint:null})})}},beforeUnmount(){this._responsiveMediaHandlers.forEach(function(t){t.mql.removeListener(t.listener)})},methods:{innerSliderRefHandler(t){this.innerSlider=t},media(t,e){const n=window.matchMedia(t),i=o=>{let{matches:r}=o;r&&e()};n.addListener(i),i(n),this._responsiveMediaHandlers.push({mql:n,query:t,listener:i})},slickPrev(){var t;(t=this.innerSlider)===null||t===void 0||t.slickPrev()},slickNext(){var t;(t=this.innerSlider)===null||t===void 0||t.slickNext()},slickGoTo(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;var n;(n=this.innerSlider)===null||n===void 0||n.slickGoTo(t,e)},slickPause(){var t;(t=this.innerSlider)===null||t===void 0||t.pause("paused")},slickPlay(){var t;(t=this.innerSlider)===null||t===void 0||t.handleAutoPlay("play")}},render(){var t;let e,n;this.breakpoint?(n=this.responsive.filter(s=>s.breakpoint===this.breakpoint),e=n[0].settings==="unslick"?"unslick":A(A({},this.$props),n[0].settings)):e=A({},this.$props),e.centerMode&&(e.slidesToScroll>1,e.slidesToScroll=1),e.fade&&(e.slidesToShow>1,e.slidesToScroll>1,e.slidesToShow=1,e.slidesToScroll=1);let i=om(this)||[];i=i.filter(s=>typeof s=="string"?!!s.trim():!!s),e.variableWidth&&(e.rows>1||e.slidesPerRow>1)&&(console.warn("variableWidth is not supported in case of rows > 1 or slidesPerRow > 1"),e.variableWidth=!1);const o=[];let r=null;for(let s=0;s=i.length));d+=1)u.push(At(i[d],{key:100*s+10*c+d,tabindex:-1,style:{width:`${100/e.slidesPerRow}%`,display:"inline-block"}}));l.push(C("div",{key:10*s+c},[u]))}e.variableWidth?o.push(C("div",{key:s,style:{width:r}},[l])):o.push(C("div",{key:s},[l]))}if(e==="unslick"){const s="regular slider "+(this.className||"");return C("div",{class:s},[i])}else o.length<=e.slidesToShow&&(e.unslick=!0);const a=A(A(A({},this.$attrs),e),{children:o,ref:this.innerSliderRefHandler});return C(Kie,H(H({},a),{},{__propsSymbol__:[]}),this.$slots)}}),qie=t=>{const{componentCls:e,antCls:n,carouselArrowSize:i,carouselDotOffset:o,marginXXS:r}=t,a=-i*1.25,s=r;return{[e]:A(A({},rt(t)),{".slick-slider":{position:"relative",display:"block",boxSizing:"border-box",touchAction:"pan-y",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",".slick-track, .slick-list":{transform:"translate3d(0, 0, 0)",touchAction:"pan-y"}},".slick-list":{position:"relative",display:"block",margin:0,padding:0,overflow:"hidden","&:focus":{outline:"none"},"&.dragging":{cursor:"pointer"},".slick-slide":{pointerEvents:"none",[`input${n}-radio-input, input${n}-checkbox-input`]:{visibility:"hidden"},"&.slick-active":{pointerEvents:"auto",[`input${n}-radio-input, input${n}-checkbox-input`]:{visibility:"visible"}},"> div > div":{verticalAlign:"bottom"}}},".slick-track":{position:"relative",top:0,insetInlineStart:0,display:"block","&::before, &::after":{display:"table",content:'""'},"&::after":{clear:"both"}},".slick-slide":{display:"none",float:"left",height:"100%",minHeight:1,img:{display:"block"},"&.dragging img":{pointerEvents:"none"}},".slick-initialized .slick-slide":{display:"block"},".slick-vertical .slick-slide":{display:"block",height:"auto"},".slick-arrow.slick-hidden":{display:"none"},".slick-prev, .slick-next":{position:"absolute",top:"50%",display:"block",width:i,height:i,marginTop:-i/2,padding:0,color:"transparent",fontSize:0,lineHeight:0,background:"transparent",border:0,outline:"none",cursor:"pointer","&:hover, &:focus":{color:"transparent",background:"transparent",outline:"none","&::before":{opacity:1}},"&.slick-disabled::before":{opacity:.25}},".slick-prev":{insetInlineStart:a,"&::before":{content:'"←"'}},".slick-next":{insetInlineEnd:a,"&::before":{content:'"→"'}},".slick-dots":{position:"absolute",insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:15,display:"flex !important",justifyContent:"center",paddingInlineStart:0,listStyle:"none","&-bottom":{bottom:o},"&-top":{top:o,bottom:"auto"},li:{position:"relative",display:"inline-block",flex:"0 1 auto",boxSizing:"content-box",width:t.dotWidth,height:t.dotHeight,marginInline:s,padding:0,textAlign:"center",textIndent:-999,verticalAlign:"top",transition:`all ${t.motionDurationSlow}`,button:{position:"relative",display:"block",width:"100%",height:t.dotHeight,padding:0,color:"transparent",fontSize:0,background:t.colorBgContainer,border:0,borderRadius:1,outline:"none",cursor:"pointer",opacity:.3,transition:`all ${t.motionDurationSlow}`,"&: hover, &:focus":{opacity:.75},"&::after":{position:"absolute",inset:-s,content:'""'}},"&.slick-active":{width:t.dotWidthActive,"& button":{background:t.colorBgContainer,opacity:1},"&: hover, &:focus":{opacity:1}}}}})}},Zie=t=>{const{componentCls:e,carouselDotOffset:n,marginXXS:i}=t,o={width:t.dotHeight,height:t.dotWidth};return{[`${e}-vertical`]:{".slick-dots":{top:"50%",bottom:"auto",flexDirection:"column",width:t.dotHeight,height:"auto",margin:0,transform:"translateY(-50%)","&-left":{insetInlineEnd:"auto",insetInlineStart:n},"&-right":{insetInlineEnd:n,insetInlineStart:"auto"},li:A(A({},o),{margin:`${i}px 0`,verticalAlign:"baseline",button:o,"&.slick-active":A(A({},o),{button:o})})}}}},Jie=t=>{const{componentCls:e}=t;return[{[`${e}-rtl`]:{direction:"rtl",".slick-dots":{[`${e}-rtl&`]:{flexDirection:"row-reverse"}}}},{[`${e}-vertical`]:{".slick-dots":{[`${e}-rtl&`]:{flexDirection:"column"}}}}]},Qie=et("Carousel",t=>{const{controlHeightLG:e,controlHeightSM:n}=t,i=Ve(t,{carouselArrowSize:e/2,carouselDotOffset:n/2});return[qie(i),Zie(i),Jie(i)]},{dotWidth:16,dotHeight:3,dotWidthActive:24});var eoe=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o({effect:Ne(),dots:Ce(!0),vertical:Ce(),autoplay:Ce(),easing:String,beforeChange:ve(),afterChange:ve(),prefixCls:String,accessibility:Ce(),nextArrow:Z.any,prevArrow:Z.any,pauseOnHover:Ce(),adaptiveHeight:Ce(),arrows:Ce(!1),autoplaySpeed:Number,centerMode:Ce(),centerPadding:String,cssEase:String,dotsClass:String,draggable:Ce(!1),fade:Ce(),focusOnSelect:Ce(),infinite:Ce(),initialSlide:Number,lazyLoad:Ne(),rtl:Ce(),slide:String,slidesToShow:Number,slidesToScroll:Number,speed:Number,swipe:Ce(),swipeToSlide:Ce(),swipeEvent:ve(),touchMove:Ce(),touchThreshold:Number,variableWidth:Ce(),useCSS:Ce(),slickGoTo:Number,responsive:Array,dotPosition:Ne(),verticalSwiping:Ce(!1)}),noe=oe({compatConfig:{MODE:3},name:"ACarousel",inheritAttrs:!1,props:toe(),setup(t,e){let{slots:n,attrs:i,expose:o}=e;const r=se();o({goTo:function(p){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;var m;(m=r.value)===null||m===void 0||m.slickGoTo(p,g)},autoplay:p=>{var g,m;(m=(g=r.value)===null||g===void 0?void 0:g.innerSlider)===null||m===void 0||m.handleAutoPlay(p)},prev:()=>{var p;(p=r.value)===null||p===void 0||p.slickPrev()},next:()=>{var p;(p=r.value)===null||p===void 0||p.slickNext()},innerSlider:L(()=>{var p;return(p=r.value)===null||p===void 0?void 0:p.innerSlider})}),Ke(()=>{Gi(t.vertical===void 0)});const{prefixCls:s,direction:l}=Me("carousel",t),[c,u]=Qie(s),d=L(()=>t.dotPosition?t.dotPosition:t.vertical!==void 0&&t.vertical?"right":"bottom"),f=L(()=>d.value==="left"||d.value==="right"),h=L(()=>{const p="slick-dots";return ce({[p]:!0,[`${p}-${d.value}`]:!0,[`${t.dotsClass}`]:!!t.dotsClass})});return()=>{const{dots:p,arrows:g,draggable:m,effect:v}=t,{class:b,style:y}=i,w=eoe(i,["class","style"]),x=v==="fade"?!0:t.fade,$=ce(s.value,{[`${s.value}-rtl`]:l.value==="rtl",[`${s.value}-vertical`]:f.value,[`${b}`]:!!b},u.value);return c(C("div",{class:$,style:y},[C(Uie,H(H(H({ref:r},t),w),{},{dots:!!p,dotsClass:h.value,arrows:g,draggable:m,fade:x,vertical:f.value}),n)]))}}}),ioe=Vt(noe),BS="__RC_CASCADER_SPLIT__",F4="SHOW_PARENT",N4="SHOW_CHILD";function Ca(t){return t.join(BS)}function Ll(t){return t.map(Ca)}function ooe(t){return t.split(BS)}function roe(t){const{label:e,value:n,children:i}=t||{},o=n||"value";return{label:e||"label",value:o,key:o,children:i||"children"}}function gu(t,e){var n,i;return(n=t.isLeaf)!==null&&n!==void 0?n:!(!((i=t[e.children])===null||i===void 0)&&i.length)}function aoe(t){const e=t.parentElement;if(!e)return;const n=t.offsetTop-e.offsetTop;n-e.scrollTop<0?e.scrollTo({top:n}):n+t.offsetHeight-e.scrollTop>e.offsetHeight&&e.scrollTo({top:n+t.offsetHeight-e.offsetHeight})}const B4=Symbol("TreeContextKey"),soe=oe({compatConfig:{MODE:3},name:"TreeContext",props:{value:{type:Object}},setup(t,e){let{slots:n}=e;return ot(B4,L(()=>t.value)),()=>{var i;return(i=n.default)===null||i===void 0?void 0:i.call(n)}}}),zS=()=>qe(B4,L(()=>({}))),z4=Symbol("KeysStateKey"),loe=t=>{ot(z4,t)},H4=()=>qe(z4,{expandedKeys:ie([]),selectedKeys:ie([]),loadedKeys:ie([]),loadingKeys:ie([]),checkedKeys:ie([]),halfCheckedKeys:ie([]),expandedKeysSet:L(()=>new Set),selectedKeysSet:L(()=>new Set),loadedKeysSet:L(()=>new Set),loadingKeysSet:L(()=>new Set),checkedKeysSet:L(()=>new Set),halfCheckedKeysSet:L(()=>new Set),flattenNodes:ie([])}),coe=t=>{let{prefixCls:e,level:n,isStart:i,isEnd:o}=t;const r=`${e}-indent-unit`,a=[];for(let s=0;s({prefixCls:String,focusable:{type:Boolean,default:void 0},activeKey:[Number,String],tabindex:Number,children:Z.any,treeData:{type:Array},fieldNames:{type:Object},showLine:{type:[Boolean,Object],default:void 0},showIcon:{type:Boolean,default:void 0},icon:Z.any,selectable:{type:Boolean,default:void 0},expandAction:[String,Boolean],disabled:{type:Boolean,default:void 0},multiple:{type:Boolean,default:void 0},checkable:{type:Boolean,default:void 0},checkStrictly:{type:Boolean,default:void 0},draggable:{type:[Function,Boolean]},defaultExpandParent:{type:Boolean,default:void 0},autoExpandParent:{type:Boolean,default:void 0},defaultExpandAll:{type:Boolean,default:void 0},defaultExpandedKeys:{type:Array},expandedKeys:{type:Array},defaultCheckedKeys:{type:Array},checkedKeys:{type:[Object,Array]},defaultSelectedKeys:{type:Array},selectedKeys:{type:Array},allowDrop:{type:Function},dropIndicatorRender:{type:Function},onFocus:{type:Function},onBlur:{type:Function},onKeydown:{type:Function},onContextmenu:{type:Function},onClick:{type:Function},onDblclick:{type:Function},onScroll:{type:Function},onExpand:{type:Function},onCheck:{type:Function},onSelect:{type:Function},onLoad:{type:Function},loadData:{type:Function},loadedKeys:{type:Array},onMouseenter:{type:Function},onMouseleave:{type:Function},onRightClick:{type:Function},onDragstart:{type:Function},onDragenter:{type:Function},onDragover:{type:Function},onDragleave:{type:Function},onDragend:{type:Function},onDrop:{type:Function},onActiveChange:{type:Function},filterTreeNode:{type:Function},motion:Z.any,switcherIcon:Z.any,height:Number,itemHeight:Number,virtual:{type:Boolean,default:void 0},direction:{type:String},rootClassName:String,rootStyle:Object});var doe=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o"`v-slot:"+fe+"` ")}`;const r=ie(!1),a=zS(),{expandedKeysSet:s,selectedKeysSet:l,loadedKeysSet:c,loadingKeysSet:u,checkedKeysSet:d,halfCheckedKeysSet:f}=H4(),{dragOverNodeKey:h,dropPosition:p,keyEntities:g}=a.value,m=L(()=>Ph(t.eventKey,{expandedKeysSet:s.value,selectedKeysSet:l.value,loadedKeysSet:c.value,loadingKeysSet:u.value,checkedKeysSet:d.value,halfCheckedKeysSet:f.value,dragOverNodeKey:h,dropPosition:p,keyEntities:g})),v=Bi(()=>m.value.expanded),b=Bi(()=>m.value.selected),y=Bi(()=>m.value.checked),w=Bi(()=>m.value.loaded),x=Bi(()=>m.value.loading),$=Bi(()=>m.value.halfChecked),S=Bi(()=>m.value.dragOver),_=Bi(()=>m.value.dragOverGapTop),P=Bi(()=>m.value.dragOverGapBottom),O=Bi(()=>m.value.pos),T=ie(),M=L(()=>{const{eventKey:fe}=t,{keyEntities:de}=a.value,{children:xe}=de[fe]||{};return!!(xe||[]).length}),I=L(()=>{const{isLeaf:fe}=t,{loadData:de}=a.value,xe=M.value;return fe===!1?!1:fe||!de&&!xe||de&&w.value&&!xe}),k=L(()=>I.value?null:v.value?pP:gP),E=L(()=>{const{disabled:fe}=t,{disabled:de}=a.value;return!!(de||fe)}),R=L(()=>{const{checkable:fe}=t,{checkable:de}=a.value;return!de||fe===!1?!1:de}),D=L(()=>{const{selectable:fe}=t,{selectable:de}=a.value;return typeof fe=="boolean"?fe:de}),F=L(()=>{const{data:fe,active:de,checkable:xe,disableCheckbox:_e,disabled:Oe,selectable:Re}=t;return A(A({active:de,checkable:xe,disableCheckbox:_e,disabled:Oe,selectable:Re},fe),{dataRef:fe,data:fe,isLeaf:I.value,checked:y.value,expanded:v.value,loading:x.value,selected:b.value,halfChecked:$.value})}),N=Cn(),B=L(()=>{const{eventKey:fe}=t,{keyEntities:de}=a.value,{parent:xe}=de[fe]||{};return A(A({},Th(A({},t,m.value))),{parent:xe})}),z=$t({eventData:B,eventKey:L(()=>t.eventKey),selectHandle:T,pos:O,key:N.vnode.key});o(z);const W=fe=>{const{onNodeDoubleClick:de}=a.value;de(fe,B.value)},j=fe=>{if(E.value)return;const{onNodeSelect:de}=a.value;fe.preventDefault(),de(fe,B.value)},U=fe=>{if(E.value)return;const{disableCheckbox:de}=t,{onNodeCheck:xe}=a.value;if(!R.value||de)return;fe.preventDefault();const _e=!y.value;xe(fe,B.value,_e)},V=fe=>{const{onNodeClick:de}=a.value;de(fe,B.value),D.value?j(fe):U(fe)},q=fe=>{const{onNodeMouseEnter:de}=a.value;de(fe,B.value)},Y=fe=>{const{onNodeMouseLeave:de}=a.value;de(fe,B.value)},J=fe=>{const{onNodeContextMenu:de}=a.value;de(fe,B.value)},Q=fe=>{const{onNodeDragStart:de}=a.value;fe.stopPropagation(),r.value=!0,de(fe,z);try{fe.dataTransfer.setData("text/plain","")}catch{}},G=fe=>{const{onNodeDragEnter:de}=a.value;fe.preventDefault(),fe.stopPropagation(),de(fe,z)},ee=fe=>{const{onNodeDragOver:de}=a.value;fe.preventDefault(),fe.stopPropagation(),de(fe,z)},X=fe=>{const{onNodeDragLeave:de}=a.value;fe.stopPropagation(),de(fe,z)},K=fe=>{const{onNodeDragEnd:de}=a.value;fe.stopPropagation(),r.value=!1,de(fe,z)},te=fe=>{const{onNodeDrop:de}=a.value;fe.preventDefault(),fe.stopPropagation(),r.value=!1,de(fe,z)},ue=fe=>{const{onNodeExpand:de}=a.value;x.value||de(fe,B.value)},ae=()=>{const{data:fe}=t,{draggable:de}=a.value;return!!(de&&(!de.nodeDraggable||de.nodeDraggable(fe)))},re=()=>{const{draggable:fe,prefixCls:de}=a.value;return fe&&(fe!=null&&fe.icon)?C("span",{class:`${de}-draggable-icon`},[fe.icon]):null},ne=()=>{var fe,de,xe;const{switcherIcon:_e=i.switcherIcon||((fe=a.value.slots)===null||fe===void 0?void 0:fe[(xe=(de=t.data)===null||de===void 0?void 0:de.slots)===null||xe===void 0?void 0:xe.switcherIcon])}=t,{switcherIcon:Oe}=a.value,Re=_e||Oe;return typeof Re=="function"?Re(F.value):Re},le=()=>{const{loadData:fe,onNodeLoad:de}=a.value;x.value||fe&&v.value&&!I.value&&!M.value&&!w.value&&de(B.value)};Ze(()=>{le()}),ri(()=>{le()});const he=()=>{const{prefixCls:fe}=a.value,de=ne();if(I.value)return de!==!1?C("span",{class:ce(`${fe}-switcher`,`${fe}-switcher-noop`)},[de]):null;const xe=ce(`${fe}-switcher`,`${fe}-switcher_${v.value?pP:gP}`);return de!==!1?C("span",{onClick:ue,class:xe},[de]):null},pe=()=>{var fe,de;const{disableCheckbox:xe}=t,{prefixCls:_e}=a.value,Oe=E.value;return R.value?C("span",{class:ce(`${_e}-checkbox`,y.value&&`${_e}-checkbox-checked`,!y.value&&$.value&&`${_e}-checkbox-indeterminate`,(Oe||xe)&&`${_e}-checkbox-disabled`),onClick:U},[(de=(fe=a.value).customCheckable)===null||de===void 0?void 0:de.call(fe)]):null},ge=()=>{const{prefixCls:fe}=a.value;return C("span",{class:ce(`${fe}-iconEle`,`${fe}-icon__${k.value||"docu"}`,x.value&&`${fe}-icon_loading`)},null)},be=()=>{const{disabled:fe,eventKey:de}=t,{draggable:xe,dropLevelOffset:_e,dropPosition:Oe,prefixCls:Re,indent:Se,dropIndicatorRender:Ae,dragOverNodeKey:Pe,direction:ke}=a.value;return!fe&&xe!==!1&&Pe===de?Ae({dropPosition:Oe,dropLevelOffset:_e,indent:Se,prefixCls:Re,direction:ke}):null},$e=()=>{var fe,de,xe,_e,Oe,Re;const{icon:Se=i.icon,data:Ae}=t,Pe=i.title||((fe=a.value.slots)===null||fe===void 0?void 0:fe[(xe=(de=t.data)===null||de===void 0?void 0:de.slots)===null||xe===void 0?void 0:xe.title])||((_e=a.value.slots)===null||_e===void 0?void 0:_e.title)||t.title,{prefixCls:ke,showIcon:Le,icon:De,loadData:je}=a.value,ft=E.value,_t=`${ke}-node-content-wrapper`;let yt;if(Le){const fn=Se||((Oe=a.value.slots)===null||Oe===void 0?void 0:Oe[(Re=Ae==null?void 0:Ae.slots)===null||Re===void 0?void 0:Re.icon])||De;yt=fn?C("span",{class:ce(`${ke}-iconEle`,`${ke}-icon__customize`)},[typeof fn=="function"?fn(F.value):fn]):ge()}else je&&x.value&&(yt=ge());let Pt;typeof Pe=="function"?Pt=Pe(F.value):Pt=Pe,Pt=Pt===void 0?foe:Pt;const Et=C("span",{class:`${ke}-title`},[Pt]);return C("span",{ref:T,title:typeof Pe=="string"?Pe:"",class:ce(`${_t}`,`${_t}-${k.value||"normal"}`,!ft&&(b.value||r.value)&&`${ke}-node-selected`),onMouseenter:q,onMouseleave:Y,onContextmenu:J,onClick:V,onDblclick:W},[yt,Et,be()])};return()=>{const fe=A(A({},t),n),{eventKey:de,isLeaf:xe,isStart:_e,isEnd:Oe,domRef:Re,active:Se,data:Ae,onMousemove:Pe,selectable:ke}=fe,Le=doe(fe,["eventKey","isLeaf","isStart","isEnd","domRef","active","data","onMousemove","selectable"]),{prefixCls:De,filterTreeNode:je,keyEntities:ft,dropContainerKey:_t,dropTargetKey:yt,draggingNodeKey:Pt}=a.value,Et=E.value,fn=ka(Le,{aria:!0,data:!0}),{level:yn}=ft[de]||{},$n=Oe[Oe.length-1],on=ae(),Yn=!Et&&on,wi=Pt===de,Zi=ke!==void 0?{"aria-selected":!!ke}:void 0;return C("div",H(H({ref:Re,class:ce(n.class,`${De}-treenode`,{[`${De}-treenode-disabled`]:Et,[`${De}-treenode-switcher-${v.value?"open":"close"}`]:!xe,[`${De}-treenode-checkbox-checked`]:y.value,[`${De}-treenode-checkbox-indeterminate`]:$.value,[`${De}-treenode-selected`]:b.value,[`${De}-treenode-loading`]:x.value,[`${De}-treenode-active`]:Se,[`${De}-treenode-leaf-last`]:$n,[`${De}-treenode-draggable`]:Yn,dragging:wi,"drop-target":yt===de,"drop-container":_t===de,"drag-over":!Et&&S.value,"drag-over-gap-top":!Et&&_.value,"drag-over-gap-bottom":!Et&&P.value,"filter-node":je&&je(B.value)}),style:n.style,draggable:Yn,"aria-grabbed":wi,onDragstart:Yn?Q:void 0,onDragenter:on?G:void 0,onDragover:on?ee:void 0,onDragleave:on?X:void 0,onDrop:on?te:void 0,onDragend:on?K:void 0,onMousemove:Pe},Zi),fn),[C(coe,{prefixCls:De,level:yn,isStart:_e,isEnd:Oe},null),re(),he(),pe(),$e()])}}});function Go(t,e){if(!t)return[];const n=t.slice(),i=n.indexOf(e);return i>=0&&n.splice(i,1),n}function vr(t,e){const n=(t||[]).slice();return n.indexOf(e)===-1&&n.push(e),n}function HS(t){return t.split("-")}function V4(t,e){return`${t}-${e}`}function hoe(t){return t&&t.type&&t.type.isTreeNode}function poe(t,e){const n=[],i=e[t];function o(){(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).forEach(a=>{let{key:s,children:l}=a;n.push(s),o(l)})}return o(i.children),n}function goe(t){if(t.parent){const e=HS(t.pos);return Number(e[e.length-1])===t.parent.children.length-1}return!1}function moe(t){const e=HS(t.pos);return Number(e[e.length-1])===0}function mP(t,e,n,i,o,r,a,s,l,c){var u;const{clientX:d,clientY:f}=t,{top:h,height:p}=t.target.getBoundingClientRect(),m=((c==="rtl"?-1:1)*(((o==null?void 0:o.x)||0)-d)-12)/i;let v=s[n.eventKey];if(fI.key===v.key),T=O<=0?0:O-1,M=a[T].key;v=s[M]}const b=v.key,y=v,w=v.key;let x=0,$=0;if(!l.has(b))for(let O=0;O-1.5?r({dragNode:S,dropNode:_,dropPosition:1})?x=1:P=!1:r({dragNode:S,dropNode:_,dropPosition:0})?x=0:r({dragNode:S,dropNode:_,dropPosition:1})?x=1:P=!1:r({dragNode:S,dropNode:_,dropPosition:1})?x=1:P=!1,{dropPosition:x,dropLevelOffset:$,dropTargetKey:v.key,dropTargetPos:v.pos,dragOverNodeKey:w,dropContainerKey:x===0?null:((u=v.parent)===null||u===void 0?void 0:u.key)||null,dropAllowed:P}}function vP(t,e){if(!t)return;const{multiple:n}=e;return n?t.slice():t.length?[t[0]]:t}function Rb(t){if(!t)return null;let e;if(Array.isArray(t))e={checkedKeys:t,halfCheckedKeys:void 0};else if(typeof t=="object")e={checkedKeys:t.checked||void 0,halfCheckedKeys:t.halfChecked||void 0};else return null;return e}function Vy(t,e){const n=new Set;function i(o){if(n.has(o))return;const r=e[o];if(!r)return;n.add(o);const{parent:a,node:s}=r;s.disabled||a&&i(a.key)}return(t||[]).forEach(o=>{i(o)}),[...n]}var voe=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o0&&arguments[0]!==void 0?arguments[0]:[];return Kt(n).map(o=>{var r,a,s,l;if(!hoe(o))return null;const c=o.children||{},u=o.key,d={};for(const[O,T]of Object.entries(o.props))d[wc(O)]=T;const{isLeaf:f,checkable:h,selectable:p,disabled:g,disableCheckbox:m}=d,v={isLeaf:f||f===""||void 0,checkable:h||h===""||void 0,selectable:p||p===""||void 0,disabled:g||g===""||void 0,disableCheckbox:m||m===""||void 0},b=A(A({},d),v),{title:y=(r=c.title)===null||r===void 0?void 0:r.call(c,b),icon:w=(a=c.icon)===null||a===void 0?void 0:a.call(c,b),switcherIcon:x=(s=c.switcherIcon)===null||s===void 0?void 0:s.call(c,b)}=d,$=voe(d,["title","icon","switcherIcon"]),S=(l=c.default)===null||l===void 0?void 0:l.call(c),_=A(A(A({},$),{title:y,icon:w,switcherIcon:x,key:u,isLeaf:f}),v),P=e(S);return P.length&&(_.children=P),_})}return e(t)}function boe(t,e,n){const{_title:i,key:o,children:r}=Ym(n),a=new Set(e===!0?[]:e),s=[];function l(c){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return c.map((d,f)=>{const h=V4(u?u.pos:"0",f),p=of(d[o],h);let g;for(let v=0;vf[r]:typeof r=="function"&&(u=f=>r(f)):u=(f,h)=>of(f[s],h);function d(f,h,p,g){const m=f?f[c]:t,v=f?V4(p.pos,h):"0",b=f?[...g,f]:[];if(f){const y=u(f,v),w={node:f,index:h,pos:v,key:y,parentPos:p.node?p.pos:null,level:p.level+1,nodes:b};e(w)}m&&m.forEach((y,w)=>{d(y,w,{node:f,pos:v,level:p?p.level+1:-1},b)})}d(null)}function rf(t){let{initWrapper:e,processEntity:n,onProcessFinished:i,externalGetKey:o,childrenPropName:r,fieldNames:a}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2?arguments[2]:void 0;const l=o||s,c={},u={};let d={posEntities:c,keyEntities:u};return e&&(d=e(d)||d),yoe(t,f=>{const{node:h,index:p,pos:g,key:m,parentPos:v,level:b,nodes:y}=f,w={node:h,nodes:y,index:p,key:m,pos:g,level:b},x=of(m,g);c[g]=w,u[x]=w,w.parent=c[v],w.parent&&(w.parent.children=w.parent.children||[],w.parent.children.push(w)),n&&n(w,d)},{externalGetKey:l,childrenPropName:r,fieldNames:a}),i&&i(d),d}function Ph(t,e){let{expandedKeysSet:n,selectedKeysSet:i,loadedKeysSet:o,loadingKeysSet:r,checkedKeysSet:a,halfCheckedKeysSet:s,dragOverNodeKey:l,dropPosition:c,keyEntities:u}=e;const d=u[t];return{eventKey:t,expanded:n.has(t),selected:i.has(t),loaded:o.has(t),loading:r.has(t),checked:a.has(t),halfChecked:s.has(t),pos:String(d?d.pos:""),parent:d.parent,dragOver:l===t&&c===0,dragOverGapTop:l===t&&c===-1,dragOverGapBottom:l===t&&c===1}}function Th(t){const{data:e,expanded:n,selected:i,checked:o,loaded:r,loading:a,halfChecked:s,dragOver:l,dragOverGapTop:c,dragOverGapBottom:u,pos:d,active:f,eventKey:h}=t,p=A(A({dataRef:e},e),{expanded:n,selected:i,checked:o,loaded:r,loading:a,halfChecked:s,dragOver:l,dragOverGapTop:c,dragOverGapBottom:u,pos:d,active:f,eventKey:h,key:h});return"props"in p||Object.defineProperty(p,"props",{get(){return t}}),p}const xoe=(t,e)=>L(()=>rf(t.value,{fieldNames:e.value,initWrapper:i=>A(A({},i),{pathKeyEntities:{}}),processEntity:(i,o)=>{const r=i.nodes.map(a=>a[e.value.value]).join(BS);o.pathKeyEntities[r]=i,i.key=r}}).pathKeyEntities);function woe(t){const e=ie(!1),n=se({});return Ke(()=>{if(!t.value){e.value=!1,n.value={};return}let i={matchInputWidth:!0,limit:50};t.value&&typeof t.value=="object"&&(i=A(A({},i),t.value)),i.limit<=0&&delete i.limit,e.value=!0,n.value=i}),{showSearch:e,searchConfig:n}}const Bu="__rc_cascader_search_mark__",Soe=(t,e,n)=>{let{label:i}=n;return e.some(o=>String(o[i]).toLowerCase().includes(t.toLowerCase()))},Coe=t=>{let{path:e,fieldNames:n}=t;return e.map(i=>i[n.label]).join(" / ")},$oe=(t,e,n,i,o,r)=>L(()=>{const{filter:a=Soe,render:s=Coe,limit:l=50,sort:c}=o.value,u=[];if(!t.value)return[];function d(f,h){f.forEach(p=>{if(!c&&l>0&&u.length>=l)return;const g=[...h,p],m=p[n.value.children];(!m||m.length===0||r.value)&&a(t.value,g,{label:n.value.label})&&u.push(A(A({},p),{[n.value.label]:s({inputValue:t.value,path:g,prefixCls:i.value,fieldNames:n.value}),[Bu]:g})),m&&d(p[n.value.children],g)})}return d(e.value,[]),c&&u.sort((f,h)=>c(f[Bu],h[Bu],t.value,n.value)),l>0?u.slice(0,l):u});function bP(t,e,n){const i=new Set(t);return t.filter(o=>{const r=e[o],a=r?r.parent:null,s=r?r.children:null;return n===N4?!(s&&s.some(l=>l.key&&i.has(l.key))):!(a&&!a.node.disabled&&i.has(a.key))})}function Ad(t,e,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;var o;let r=e;const a=[];for(let s=0;s{const f=d[n.value];return i?String(f)===String(l):f===l}),u=c!==-1?r==null?void 0:r[c]:null;a.push({value:(o=u==null?void 0:u[n.value])!==null&&o!==void 0?o:l,index:c,option:u}),r=u==null?void 0:u[n.children]}return a}const Aoe=(t,e,n)=>L(()=>{const i=[],o=[];return n.value.forEach(r=>{Ad(r,t.value,e.value).every(s=>s.option)?o.push(r):i.push(r)}),[o,i]});function X4(t,e){const n=new Set;return t.forEach(i=>{e.has(i)||n.add(i)}),n}function _oe(t){const{disabled:e,disableCheckbox:n,checkable:i}=t||{};return!!(e||n)||i===!1}function Poe(t,e,n,i){const o=new Set(t),r=new Set;for(let s=0;s<=n;s+=1)(e.get(s)||new Set).forEach(c=>{const{key:u,node:d,children:f=[]}=c;o.has(u)&&!i(d)&&f.filter(h=>!i(h.node)).forEach(h=>{o.add(h.key)})});const a=new Set;for(let s=n;s>=0;s-=1)(e.get(s)||new Set).forEach(c=>{const{parent:u,node:d}=c;if(i(d)||!c.parent||a.has(c.parent.key))return;if(i(c.parent.node)){a.add(u.key);return}let f=!0,h=!1;(u.children||[]).filter(p=>!i(p.node)).forEach(p=>{let{key:g}=p;const m=o.has(g);f&&!m&&(f=!1),!h&&(m||r.has(g))&&(h=!0)}),f&&o.add(u.key),h&&r.add(u.key),a.add(u.key)});return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(X4(r,o))}}function Toe(t,e,n,i,o){const r=new Set(t);let a=new Set(e);for(let l=0;l<=i;l+=1)(n.get(l)||new Set).forEach(u=>{const{key:d,node:f,children:h=[]}=u;!r.has(d)&&!a.has(d)&&!o(f)&&h.filter(p=>!o(p.node)).forEach(p=>{r.delete(p.key)})});a=new Set;const s=new Set;for(let l=i;l>=0;l-=1)(n.get(l)||new Set).forEach(u=>{const{parent:d,node:f}=u;if(o(f)||!u.parent||s.has(u.parent.key))return;if(o(u.parent.node)){s.add(d.key);return}let h=!0,p=!1;(d.children||[]).filter(g=>!o(g.node)).forEach(g=>{let{key:m}=g;const v=r.has(m);h&&!v&&(h=!1),!p&&(v||a.has(m))&&(p=!0)}),h||r.delete(d.key),p&&a.add(d.key),s.add(d.key)});return{checkedKeys:Array.from(r),halfCheckedKeys:Array.from(X4(a,r))}}function fo(t,e,n,i,o,r){let a;r?a=r:a=_oe;const s=new Set(t.filter(c=>!!n[c]));let l;return e===!0?l=Poe(s,o,i,a):l=Toe(s,e.halfCheckedKeys,o,i,a),l}const Ooe=(t,e,n,i,o)=>L(()=>{const r=o.value||(a=>{let{labels:s}=a;const l=i.value?s.slice(-1):s,c=" / ";return l.every(u=>["string","number"].includes(typeof u))?l.join(c):l.reduce((u,d,f)=>{const h=cn(d)?At(d,{key:f}):d;return f===0?[h]:[...u,c,h]},[])});return t.value.map(a=>{const s=Ad(a,e.value,n.value),l=r({labels:s.map(u=>{let{option:d,value:f}=u;var h;return(h=d==null?void 0:d[n.value.label])!==null&&h!==void 0?h:f}),selectedOptions:s.map(u=>{let{option:d}=u;return d})}),c=Ca(a);return{label:l,value:c,key:c,valueCells:a}})}),Y4=Symbol("CascaderContextKey"),Eoe=t=>{ot(Y4,t)},Gm=()=>qe(Y4),Moe=()=>{const t=Yd(),{values:e}=Gm(),[n,i]=Mt([]);return ye(()=>t.open,()=>{if(t.open&&!t.multiple){const o=e.value[0];i(o||[])}},{immediate:!0}),[n,i]},Ioe=(t,e,n,i,o,r)=>{const a=Yd(),s=L(()=>a.direction==="rtl"),[l,c,u]=[se([]),se(),se([])];Ke(()=>{let g=-1,m=e.value;const v=[],b=[],y=i.value.length;for(let x=0;xS[n.value.value]===i.value[x]);if($===-1)break;g=$,v.push(g),b.push(i.value[x]),m=m[g][n.value.children]}let w=e.value;for(let x=0;x{o(g)},f=g=>{const m=u.value.length;let v=c.value;v===-1&&g<0&&(v=m);for(let b=0;b{if(l.value.length>1){const g=l.value.slice(0,-1);d(g)}else a.toggleOpen(!1)},p=()=>{var g;const v=(((g=u.value[c.value])===null||g===void 0?void 0:g[n.value.children])||[]).find(b=>!b.disabled);if(v){const b=[...l.value,v[n.value.value]];d(b)}};t.expose({onKeydown:g=>{const{which:m}=g;switch(m){case Te.UP:case Te.DOWN:{let v=0;m===Te.UP?v=-1:m===Te.DOWN&&(v=1),v!==0&&f(v);break}case Te.LEFT:{s.value?p():h();break}case Te.RIGHT:{s.value?h():p();break}case Te.BACKSPACE:{a.searchValue||h();break}case Te.ENTER:{if(l.value.length){const v=u.value[c.value],b=(v==null?void 0:v[Bu])||[];b.length?r(b.map(y=>y[n.value.value]),b[b.length-1]):r(l.value,v)}break}case Te.ESC:a.toggleOpen(!1),open&&g.stopPropagation()}},onKeyup:()=>{}})};function Km(t){let{prefixCls:e,checked:n,halfChecked:i,disabled:o,onClick:r}=t;const{customSlots:a,checkable:s}=Gm(),l=s.value!==!1?a.value.checkable:s.value,c=typeof l=="function"?l():typeof l=="boolean"?null:l;return C("span",{class:{[e]:!0,[`${e}-checked`]:n,[`${e}-indeterminate`]:!n&&i,[`${e}-disabled`]:o},onClick:r},[c])}Km.props=["prefixCls","checked","halfChecked","disabled","onClick"];Km.displayName="Checkbox";Km.inheritAttrs=!1;const G4="__cascader_fix_label__";function Um(t){let{prefixCls:e,multiple:n,options:i,activeValue:o,prevValuePath:r,onToggleOpen:a,onSelect:s,onActive:l,checkedSet:c,halfCheckedSet:u,loadingKeys:d,isSelectable:f}=t;var h,p,g,m,v,b;const y=`${e}-menu`,w=`${e}-menu-item`,{fieldNames:x,changeOnSelect:$,expandTrigger:S,expandIcon:_,loadingIcon:P,dropdownMenuColumnStyle:O,customSlots:T}=Gm(),M=(h=_.value)!==null&&h!==void 0?h:(g=(p=T.value).expandIcon)===null||g===void 0?void 0:g.call(p),I=(m=P.value)!==null&&m!==void 0?m:(b=(v=T.value).loadingIcon)===null||b===void 0?void 0:b.call(v),k=S.value==="hover";return C("ul",{class:y,role:"menu"},[i.map(E=>{var R;const{disabled:D}=E,F=E[Bu],N=(R=E[G4])!==null&&R!==void 0?R:E[x.value.label],B=E[x.value.value],z=gu(E,x.value),W=F?F.map(G=>G[x.value.value]):[...r,B],j=Ca(W),U=d.includes(j),V=c.has(j),q=u.has(j),Y=()=>{!D&&(!k||!z)&&l(W)},J=()=>{f(E)&&s(W,z)};let Q;return typeof E.title=="string"?Q=E.title:typeof N=="string"&&(Q=N),C("li",{key:j,class:[w,{[`${w}-expand`]:!z,[`${w}-active`]:o===B,[`${w}-disabled`]:D,[`${w}-loading`]:U}],style:O.value,role:"menuitemcheckbox",title:Q,"aria-checked":V,"data-path-key":j,onClick:()=>{Y(),(!n||z)&&J()},onDblclick:()=>{$.value&&a(!1)},onMouseenter:()=>{k&&Y()},onMousedown:G=>{G.preventDefault()}},[n&&C(Km,{prefixCls:`${e}-checkbox`,checked:V,halfChecked:q,disabled:D,onClick:G=>{G.stopPropagation(),J()}},null),C("div",{class:`${w}-content`},[N]),!U&&M&&!z&&C("div",{class:`${w}-expand-icon`},[At(M)]),U&&I&&C("div",{class:`${w}-loading-icon`},[At(I)])])})])}Um.props=["prefixCls","multiple","options","activeValue","prevValuePath","onToggleOpen","onSelect","onActive","checkedSet","halfCheckedSet","loadingKeys","isSelectable"];Um.displayName="Column";Um.inheritAttrs=!1;const koe=oe({compatConfig:{MODE:3},name:"OptionList",inheritAttrs:!1,setup(t,e){const{attrs:n,slots:i}=e,o=Yd(),r=se(),a=L(()=>o.direction==="rtl"),{options:s,values:l,halfValues:c,fieldNames:u,changeOnSelect:d,onSelect:f,searchOptions:h,dropdownPrefixCls:p,loadData:g,expandTrigger:m,customSlots:v}=Gm(),b=L(()=>p.value||o.prefixCls),y=ie([]),w=R=>{if(!g.value||o.searchValue)return;const F=Ad(R,s.value,u.value).map(B=>{let{option:z}=B;return z}),N=F[F.length-1];if(N&&!gu(N,u.value)){const B=Ca(R);y.value=[...y.value,B],g.value(F)}};Ke(()=>{y.value.length&&y.value.forEach(R=>{const D=ooe(R),F=Ad(D,s.value,u.value,!0).map(B=>{let{option:z}=B;return z}),N=F[F.length-1];(!N||N[u.value.children]||gu(N,u.value))&&(y.value=y.value.filter(B=>B!==R))})});const x=L(()=>new Set(Ll(l.value))),$=L(()=>new Set(Ll(c.value))),[S,_]=Moe(),P=R=>{_(R),w(R)},O=R=>{const{disabled:D}=R,F=gu(R,u.value);return!D&&(F||d.value||o.multiple)},T=function(R,D){let F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;f(R),!o.multiple&&(D||d.value&&(m.value==="hover"||F))&&o.toggleOpen(!1)},M=L(()=>o.searchValue?h.value:s.value),I=L(()=>{const R=[{options:M.value}];let D=M.value;for(let F=0;FW[u.value.value]===N),z=B==null?void 0:B[u.value.children];if(!(z!=null&&z.length))break;D=z,R.push({options:z})}return R});Ioe(e,M,u,S,P,(R,D)=>{O(D)&&T(R,gu(D,u.value),!0)});const E=R=>{R.preventDefault()};return Ze(()=>{ye(S,R=>{var D;for(let F=0;F{var R,D,F,N,B;const{notFoundContent:z=((R=i.notFoundContent)===null||R===void 0?void 0:R.call(i))||((F=(D=v.value).notFoundContent)===null||F===void 0?void 0:F.call(D)),multiple:W,toggleOpen:j}=o,U=!(!((B=(N=I.value[0])===null||N===void 0?void 0:N.options)===null||B===void 0)&&B.length),V=[{[u.value.value]:"__EMPTY__",[G4]:z,disabled:!0}],q=A(A({},n),{multiple:!U&&W,onSelect:T,onActive:P,onToggleOpen:j,checkedSet:x.value,halfCheckedSet:$.value,loadingKeys:y.value,isSelectable:O}),J=(U?[{options:V}]:I.value).map((Q,G)=>{const ee=S.value.slice(0,G),X=S.value[G];return C(Um,H(H({key:G},q),{},{prefixCls:b.value,options:Q.options,prevValuePath:ee,activeValue:X}),null)});return C("div",{class:[`${b.value}-menus`,{[`${b.value}-menu-empty`]:U,[`${b.value}-rtl`]:a.value}],onMousedown:E,ref:r},[J])}}});function qm(t){const e=se(0),n=ie();return Ke(()=>{const i=new Map;let o=0;const r=t.value||{};for(const a in r)if(Object.prototype.hasOwnProperty.call(r,a)){const s=r[a],{level:l}=s;let c=i.get(l);c||(c=new Set,i.set(l,c)),c.add(s),o=Math.max(o,l)}e.value=o,n.value=i}),{maxLevel:e,levelEntities:n}}function Doe(){return A(A({},ht(Cm(),["tokenSeparators","mode","showSearch"])),{id:String,prefixCls:String,fieldNames:Fe(),children:Array,value:{type:[String,Number,Array]},defaultValue:{type:[String,Number,Array]},changeOnSelect:{type:Boolean,default:void 0},displayRender:Function,checkable:{type:Boolean,default:void 0},showCheckedStrategy:{type:String,default:F4},showSearch:{type:[Boolean,Object],default:void 0},searchValue:String,onSearch:Function,expandTrigger:String,options:Array,dropdownPrefixCls:String,loadData:Function,popupVisible:{type:Boolean,default:void 0},dropdownClassName:String,dropdownMenuColumnStyle:{type:Object,default:void 0},popupStyle:{type:Object,default:void 0},dropdownStyle:{type:Object,default:void 0},popupPlacement:String,placement:String,onPopupVisibleChange:Function,onDropdownVisibleChange:Function,expandIcon:Z.any,loadingIcon:Z.any})}function K4(){return A(A({},Doe()),{onChange:Function,customSlots:Object})}function Roe(t){return Array.isArray(t)&&Array.isArray(t[0])}function yP(t){return t?Roe(t)?t:(t.length===0?[]:[t]).map(e=>Array.isArray(e)?e:[e]):[]}const Loe=oe({compatConfig:{MODE:3},name:"Cascader",inheritAttrs:!1,props:ct(K4(),{}),setup(t,e){let{attrs:n,expose:i,slots:o}=e;const r=$1(Ue(t,"id")),a=L(()=>!!t.checkable),[s,l]=jt(t.defaultValue,{value:L(()=>t.value),postState:yP}),c=L(()=>roe(t.fieldNames)),u=L(()=>t.options||[]),d=xoe(u,c),f=G=>{const ee=d.value;return G.map(X=>{const{nodes:K}=ee[X];return K.map(te=>te[c.value.value])})},[h,p]=jt("",{value:L(()=>t.searchValue),postState:G=>G||""}),g=(G,ee)=>{p(G),ee.source!=="blur"&&t.onSearch&&t.onSearch(G)},{showSearch:m,searchConfig:v}=woe(Ue(t,"showSearch")),b=$oe(h,u,c,L(()=>t.dropdownPrefixCls||t.prefixCls),v,Ue(t,"changeOnSelect")),y=Aoe(u,c,s),[w,x,$]=[se([]),se([]),se([])],{maxLevel:S,levelEntities:_}=qm(d);Ke(()=>{const[G,ee]=y.value;if(!a.value||!s.value.length){[w.value,x.value,$.value]=[G,[],ee];return}const X=Ll(G),K=d.value,{checkedKeys:te,halfCheckedKeys:ue}=fo(X,!0,K,S.value,_.value);[w.value,x.value,$.value]=[f(te),f(ue),ee]});const P=L(()=>{const G=Ll(w.value),ee=bP(G,d.value,t.showCheckedStrategy);return[...$.value,...f(ee)]}),O=Ooe(P,u,c,a,Ue(t,"displayRender")),T=G=>{if(l(G),t.onChange){const ee=yP(G),X=ee.map(ue=>Ad(ue,u.value,c.value).map(ae=>ae.option)),K=a.value?ee:ee[0],te=a.value?X:X[0];t.onChange(K,te)}},M=G=>{if(p(""),!a.value)T(G);else{const ee=Ca(G),X=Ll(w.value),K=Ll(x.value),te=X.includes(ee),ue=$.value.some(ne=>Ca(ne)===ee);let ae=w.value,re=$.value;if(ue&&!te)re=$.value.filter(ne=>Ca(ne)!==ee);else{const ne=te?X.filter(pe=>pe!==ee):[...X,ee];let le;te?{checkedKeys:le}=fo(ne,{halfCheckedKeys:K},d.value,S.value,_.value):{checkedKeys:le}=fo(ne,!0,d.value,S.value,_.value);const he=bP(le,d.value,t.showCheckedStrategy);ae=f(he)}T([...re,...ae])}},I=(G,ee)=>{if(ee.type==="clear"){T([]);return}const{valueCells:X}=ee.values[0];M(X)},k=L(()=>t.open!==void 0?t.open:t.popupVisible),E=L(()=>t.dropdownStyle||t.popupStyle||{}),R=L(()=>t.placement||t.popupPlacement),D=G=>{var ee,X;(ee=t.onDropdownVisibleChange)===null||ee===void 0||ee.call(t,G),(X=t.onPopupVisibleChange)===null||X===void 0||X.call(t,G)},{changeOnSelect:F,checkable:N,dropdownPrefixCls:B,loadData:z,expandTrigger:W,expandIcon:j,loadingIcon:U,dropdownMenuColumnStyle:V,customSlots:q,dropdownClassName:Y}=uo(t);Eoe({options:u,fieldNames:c,values:w,halfValues:x,changeOnSelect:F,onSelect:M,checkable:N,searchOptions:b,dropdownPrefixCls:B,loadData:z,expandTrigger:W,expandIcon:j,loadingIcon:U,dropdownMenuColumnStyle:V,customSlots:q});const J=se();i({focus(){var G;(G=J.value)===null||G===void 0||G.focus()},blur(){var G;(G=J.value)===null||G===void 0||G.blur()},scrollTo(G){var ee;(ee=J.value)===null||ee===void 0||ee.scrollTo(G)}});const Q=L(()=>ht(t,["id","prefixCls","fieldNames","defaultValue","value","changeOnSelect","onChange","displayRender","checkable","searchValue","onSearch","showSearch","expandTrigger","options","dropdownPrefixCls","loadData","popupVisible","open","dropdownClassName","dropdownMenuColumnStyle","popupPlacement","placement","onDropdownVisibleChange","onPopupVisibleChange","expandIcon","loadingIcon","customSlots","showCheckedStrategy","children"]));return()=>{const G=!(h.value?b.value:u.value).length,{dropdownMatchSelectWidth:ee=!1}=t,X=h.value&&v.value.matchInputWidth||G?{}:{minWidth:"auto"};return C(S1,H(H(H({},Q.value),n),{},{ref:J,id:r,prefixCls:t.prefixCls,dropdownMatchSelectWidth:ee,dropdownStyle:A(A({},E.value),X),displayValues:O.value,onDisplayValuesChange:I,mode:a.value?"multiple":void 0,searchValue:h.value,onSearch:g,showSearch:m.value,OptionList:koe,emptyOptions:G,open:k.value,dropdownClassName:Y.value,placement:R.value,onDropdownVisibleChange:D,getRawInputElement:()=>{var K;return(K=o.default)===null||K===void 0?void 0:K.call(o)}}),o)}}});var Foe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};function xP(t){for(var e=1;eii()&&window.document.documentElement,q4=t=>{if(ii()&&window.document.documentElement){const e=Array.isArray(t)?t:[t],{documentElement:n}=window.document;return e.some(i=>i in n.style)}return!1},Boe=(t,e)=>{if(!q4(t))return!1;const n=document.createElement("div"),i=n.style[t];return n.style[t]=e,n.style[t]!==i};function WS(t,e){return!Array.isArray(t)&&e!==void 0?Boe(t,e):q4(t)}let Gf;const zoe=()=>{if(!U4())return!1;if(Gf!==void 0)return Gf;const t=document.createElement("div");return t.style.display="flex",t.style.flexDirection="column",t.style.rowGap="1px",t.appendChild(document.createElement("div")),t.appendChild(document.createElement("div")),document.body.appendChild(t),Gf=t.scrollHeight===1,document.body.removeChild(t),Gf},Z4=()=>{const t=ie(!1);return Ze(()=>{t.value=zoe()}),t},J4=Symbol("rowContextKey"),Hoe=t=>{ot(J4,t)},Woe=()=>qe(J4,{gutter:L(()=>{}),wrap:L(()=>{}),supportFlexGap:L(()=>{})}),joe=t=>{const{componentCls:e}=t;return{[e]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around ":{justifyContent:"space-around"},"&-space-evenly ":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},Voe=t=>{const{componentCls:e}=t;return{[e]:{position:"relative",maxWidth:"100%",minHeight:1}}},Xoe=(t,e)=>{const{componentCls:n,gridColumns:i}=t,o={};for(let r=i;r>=0;r--)r===0?(o[`${n}${e}-${r}`]={display:"none"},o[`${n}-push-${r}`]={insetInlineStart:"auto"},o[`${n}-pull-${r}`]={insetInlineEnd:"auto"},o[`${n}${e}-push-${r}`]={insetInlineStart:"auto"},o[`${n}${e}-pull-${r}`]={insetInlineEnd:"auto"},o[`${n}${e}-offset-${r}`]={marginInlineEnd:0},o[`${n}${e}-order-${r}`]={order:0}):(o[`${n}${e}-${r}`]={display:"block",flex:`0 0 ${r/i*100}%`,maxWidth:`${r/i*100}%`},o[`${n}${e}-push-${r}`]={insetInlineStart:`${r/i*100}%`},o[`${n}${e}-pull-${r}`]={insetInlineEnd:`${r/i*100}%`},o[`${n}${e}-offset-${r}`]={marginInlineStart:`${r/i*100}%`},o[`${n}${e}-order-${r}`]={order:r});return o},Yy=(t,e)=>Xoe(t,e),Yoe=(t,e,n)=>({[`@media (min-width: ${e}px)`]:A({},Yy(t,n))}),Goe=et("Grid",t=>[joe(t)]),Koe=et("Grid",t=>{const e=Ve(t,{gridColumns:24}),n={"-sm":e.screenSMMin,"-md":e.screenMDMin,"-lg":e.screenLGMin,"-xl":e.screenXLMin,"-xxl":e.screenXXLMin};return[Voe(e),Yy(e,""),Yy(e,"-xs"),Object.keys(n).map(i=>Yoe(e,n[i],i)).reduce((i,o)=>A(A({},i),o),{})]}),Uoe=()=>({align:Xe([String,Object]),justify:Xe([String,Object]),prefixCls:String,gutter:Xe([Number,Array,Object],0),wrap:{type:Boolean,default:void 0}}),jS=oe({compatConfig:{MODE:3},name:"ARow",inheritAttrs:!1,props:Uoe(),setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,direction:r}=Me("row",t),[a,s]=Goe(o);let l;const c=Y1(),u=se({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}),d=se({xs:!1,sm:!1,md:!1,lg:!1,xl:!1,xxl:!1}),f=y=>L(()=>{if(typeof t[y]=="string")return t[y];if(typeof t[y]!="object")return"";for(let w=0;w{l=c.value.subscribe(y=>{d.value=y;const w=t.gutter||0;(!Array.isArray(w)&&typeof w=="object"||Array.isArray(w)&&(typeof w[0]=="object"||typeof w[1]=="object"))&&(u.value=y)})}),at(()=>{c.value.unsubscribe(l)});const m=L(()=>{const y=[void 0,void 0],{gutter:w=0}=t;return(Array.isArray(w)?w:[w,void 0]).forEach(($,S)=>{if(typeof $=="object")for(let _=0;_t.wrap)});const v=L(()=>ce(o.value,{[`${o.value}-no-wrap`]:t.wrap===!1,[`${o.value}-${p.value}`]:p.value,[`${o.value}-${h.value}`]:h.value,[`${o.value}-rtl`]:r.value==="rtl"},i.class,s.value)),b=L(()=>{const y=m.value,w={},x=y[0]!=null&&y[0]>0?`${y[0]/-2}px`:void 0,$=y[1]!=null&&y[1]>0?`${y[1]/-2}px`:void 0;return x&&(w.marginLeft=x,w.marginRight=x),g.value?w.rowGap=`${y[1]}px`:$&&(w.marginTop=$,w.marginBottom=$),w});return()=>{var y;return a(C("div",H(H({},i),{},{class:v.value,style:A(A({},b.value),i.style)}),[(y=n.default)===null||y===void 0?void 0:y.call(n)]))}}});function ps(){return ps=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Oh(t,e,n){return Zoe()?Oh=Reflect.construct.bind():Oh=function(o,r,a){var s=[null];s.push.apply(s,r);var l=Function.bind.apply(o,s),c=new l;return a&&_d(c,a.prototype),c},Oh.apply(null,arguments)}function Joe(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function Ky(t){var e=typeof Map=="function"?new Map:void 0;return Ky=function(i){if(i===null||!Joe(i))return i;if(typeof i!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(i))return e.get(i);e.set(i,o)}function o(){return Oh(i,arguments,Gy(this).constructor)}return o.prototype=Object.create(i.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),_d(o,i)},Ky(t)}var Qoe=/%[sdj%]/g,ere=function(){};function Uy(t){if(!t||!t.length)return null;var e={};return t.forEach(function(n){var i=n.field;e[i]=e[i]||[],e[i].push(n)}),e}function Wi(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i=r)return s;switch(s){case"%s":return String(n[o++]);case"%d":return Number(n[o++]);case"%j":try{return JSON.stringify(n[o++])}catch{return"[Circular]"}break;default:return s}});return a}return t}function tre(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function In(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||tre(e)&&typeof t=="string"&&!t)}function nre(t,e,n){var i=[],o=0,r=t.length;function a(s){i.push.apply(i,s||[]),o++,o===r&&n(i)}t.forEach(function(s){e(s,a)})}function wP(t,e,n){var i=0,o=t.length;function r(a){if(a&&a.length){n(a);return}var s=i;i=i+1,s ${e}-item:last-child`]:{borderBottom:0},[`> ${e}-item > ${e}-content`]:{backgroundColor:"transparent",borderTop:0},[`> ${e}-item > ${e}-content > ${e}-content-box`]:{paddingTop:i}}}},$ie=t=>{const{componentCls:e,paddingSM:n}=t;return{[`${e}-ghost`]:{backgroundColor:"transparent",border:0,[`> ${e}-item`]:{borderBottom:0,[`> ${e}-content`]:{backgroundColor:"transparent",border:0,[`> ${e}-content-box`]:{paddingBlock:n}}}}}},Aie=et("Collapse",t=>{const e=Ve(t,{collapseContentBg:t.colorBgContainer,collapseHeaderBg:t.colorFillAlter,collapseHeaderPadding:`${t.paddingSM}px ${t.padding}px`,collapsePanelBorderRadius:t.borderRadiusLG,collapseContentPaddingHorizontal:16});return[wie(e),Cie(e),$ie(e),Sie(e),qd(e)]});function cP(t){let e=t;if(!Array.isArray(e)){const n=typeof e;e=n==="number"||n==="string"?[e]:[]}return e.map(n=>String(n))}const Bu=oe({compatConfig:{MODE:3},name:"ACollapse",inheritAttrs:!1,props:ct(xie(),{accordion:!1,destroyInactivePanel:!1,bordered:!0,expandIconPosition:"start"}),slots:Object,setup(t,e){let{attrs:n,slots:i,emit:o}=e;const r=se(cP(jp([t.activeKey,t.defaultActiveKey])));ye(()=>t.activeKey,()=>{r.value=cP(t.activeKey)},{deep:!0});const{prefixCls:a,direction:s,rootPrefixCls:l}=Me("collapse",t),[c,u]=Aie(a),d=L(()=>{const{expandIconPosition:v}=t;return v!==void 0?v:s.value==="rtl"?"end":"start"}),f=v=>{const{expandIcon:b=i.expandIcon}=t,y=b?b(v):C(qi,{rotate:v.isActive?90:void 0},null);return C("div",{class:[`${a.value}-expand-icon`,u.value],onClick:()=>["header","icon"].includes(t.collapsible)&&p(v.panelKey)},[cn(Array.isArray(b)?y[0]:y)?At(y,{class:`${a.value}-arrow`},!1):y])},h=v=>{t.activeKey===void 0&&(r.value=v);const b=t.accordion?v[0]:v;o("update:activeKey",b),o("change",b)},p=v=>{let b=r.value;if(t.accordion)b=b[0]===v?[]:[v];else{b=[...b];const y=b.indexOf(v);y>-1?b.splice(y,1):b.push(v)}h(b)},g=(v,b)=>{var y,w,x;if(Vd(v))return;const $=r.value,{accordion:S,destroyInactivePanel:_,collapsible:P,openAnimation:O}=t,T=O||Jd(`${l.value}-motion-collapse`),M=String((y=v.key)!==null&&y!==void 0?y:b),{header:I=(x=(w=v.children)===null||w===void 0?void 0:w.header)===null||x===void 0?void 0:x.call(w),headerClass:k,collapsible:E,disabled:R}=v.props||{};let D=!1;S?D=$[0]===M:D=$.indexOf(M)>-1;let F=E??P;(R||R==="")&&(F="disabled");const N={key:M,panelKey:M,header:I,headerClass:k,isActive:D,prefixCls:a.value,destroyInactivePanel:_,openAnimation:T,accordion:S,onItemClick:F==="disabled"?null:p,expandIcon:f,collapsible:F};return At(v,N)},m=()=>{var v;return Dt((v=i.default)===null||v===void 0?void 0:v.call(i)).map(g)};return()=>{const{accordion:v,bordered:b,ghost:y}=t,w=ce(a.value,{[`${a.value}-borderless`]:!b,[`${a.value}-icon-position-${d.value}`]:!0,[`${a.value}-rtl`]:s.value==="rtl",[`${a.value}-ghost`]:!!y,[n.class]:!!n.class},u.value);return c(C("div",H(H({class:w},FH(n)),{},{style:n.style,role:v?"tablist":null}),[m()]))}}}),_ie=oe({compatConfig:{MODE:3},name:"PanelContent",props:A4(),setup(t,e){let{slots:n}=e;const i=ie(!1);return Ke(()=>{(t.isActive||t.forceRender)&&(i.value=!0)}),()=>{var o;if(!i.value)return null;const{prefixCls:r,isActive:a,role:s}=t;return C("div",{class:ce(`${r}-content`,{[`${r}-content-active`]:a,[`${r}-content-inactive`]:!a}),role:s},[C("div",{class:`${r}-content-box`},[(o=n.default)===null||o===void 0?void 0:o.call(n)])])}}}),ag=oe({compatConfig:{MODE:3},name:"ACollapsePanel",inheritAttrs:!1,props:ct(A4(),{showArrow:!0,isActive:!1,onItemClick(){},headerClass:"",forceRender:!1}),slots:Object,setup(t,e){let{slots:n,emit:i,attrs:o}=e;Nt(t.disabled===void 0,"Collapse.Panel",'`disabled` is deprecated. Please use `collapsible="disabled"` instead.');const{prefixCls:r}=Me("collapse",t),a=()=>{i("itemClick",t.panelKey)},s=l=>{(l.key==="Enter"||l.keyCode===13||l.which===13)&&a()};return()=>{var l,c;const{header:u=(l=n.header)===null||l===void 0?void 0:l.call(n),headerClass:d,isActive:f,showArrow:h,destroyInactivePanel:p,accordion:g,forceRender:m,openAnimation:v,expandIcon:b=n.expandIcon,extra:y=(c=n.extra)===null||c===void 0?void 0:c.call(n),collapsible:w}=t,x=w==="disabled",$=r.value,S=ce(`${$}-header`,{[d]:d,[`${$}-header-collapsible-only`]:w==="header",[`${$}-icon-collapsible-only`]:w==="icon"}),_=ce({[`${$}-item`]:!0,[`${$}-item-active`]:f,[`${$}-item-disabled`]:x,[`${$}-no-arrow`]:!h,[`${o.class}`]:!!o.class});let P=C("i",{class:"arrow"},null);h&&typeof b=="function"&&(P=b(t));const O=ni(C(_ie,{prefixCls:$,isActive:f,forceRender:m,role:g?"tabpanel":null},{default:n.default}),[[vi,f]]),T=A({appear:!1,css:!1},v);return C("div",H(H({},o),{},{class:_}),[C("div",{class:S,onClick:()=>!["header","icon"].includes(w)&&a(),role:g?"tab":"button",tabindex:x?-1:0,"aria-expanded":f,onKeypress:s},[h&&P,C("span",{onClick:()=>w==="header"&&a(),class:`${$}-header-text`},[u]),y&&C("div",{class:`${$}-extra`},[y])]),C(En,T,{default:()=>[!p||f?O:null]})])}}});Bu.Panel=ag;Bu.install=function(t){return t.component(Bu.name,Bu),t.component(ag.name,ag),t};const Pie=function(t){return t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()}).toLowerCase()},Tie=function(t){return/[height|width]$/.test(t)},uP=function(t){let e="";const n=Object.keys(t);return n.forEach(function(i,o){let r=t[i];i=Pie(i),Tie(i)&&typeof r=="number"&&(r=r+"px"),r===!0?e+=i:r===!1?e+="not "+i:e+="("+i+": "+r+")",o{["touchstart","touchmove","wheel"].includes(t.type)||t.preventDefault()},sg=t=>{const e=[],n=P4(t),i=T4(t);for(let o=n;ot.currentSlide-Eie(t),T4=t=>t.currentSlide+Mie(t),Eie=t=>t.centerMode?Math.floor(t.slidesToShow/2)+(parseInt(t.centerPadding)>0?1:0):0,Mie=t=>t.centerMode?Math.floor((t.slidesToShow-1)/2)+1+(parseInt(t.centerPadding)>0?1:0):t.slidesToShow,Wy=t=>t&&t.offsetWidth||0,FS=t=>t&&t.offsetHeight||0,O4=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;const i=t.startX-t.curX,o=t.startY-t.curY,r=Math.atan2(o,i);return n=Math.round(r*180/Math.PI),n<0&&(n=360-Math.abs(n)),n<=45&&n>=0||n<=360&&n>=315?"left":n>=135&&n<=225?"right":e===!0?n>=35&&n<=135?"up":"down":"vertical"},Ym=t=>{let e=!0;return t.infinite||(t.centerMode&&t.currentSlide>=t.slideCount-1||t.slideCount<=t.slidesToShow||t.currentSlide>=t.slideCount-t.slidesToShow)&&(e=!1),e},Ib=(t,e)=>{const n={};return e.forEach(i=>n[i]=t[i]),n},Iie=t=>{const e=t.children.length,n=t.listRef,i=Math.ceil(Wy(n)),o=t.trackRef,r=Math.ceil(Wy(o));let a;if(t.vertical)a=i;else{let h=t.centerMode&&parseInt(t.centerPadding)*2;typeof t.centerPadding=="string"&&t.centerPadding.slice(-1)==="%"&&(h*=i/100),a=Math.ceil((i-h)/t.slidesToShow)}const s=n&&FS(n.querySelector('[data-index="0"]')),l=s*t.slidesToShow;let c=t.currentSlide===void 0?t.initialSlide:t.currentSlide;t.rtl&&t.currentSlide===void 0&&(c=e-1-t.initialSlide);let u=t.lazyLoadedList||[];const d=sg(A(A({},t),{currentSlide:c,lazyLoadedList:u}));u=u.concat(d);const f={slideCount:e,slideWidth:a,listWidth:i,trackWidth:r,currentSlide:c,slideHeight:s,listHeight:l,lazyLoadedList:u};return t.autoplaying===null&&t.autoplay&&(f.autoplaying="playing"),f},kie=t=>{const{waitForAnimate:e,animating:n,fade:i,infinite:o,index:r,slideCount:a,lazyLoad:s,currentSlide:l,centerMode:c,slidesToScroll:u,slidesToShow:d,useCSS:f}=t;let{lazyLoadedList:h}=t;if(e&&n)return{};let p=r,g,m,v,b={},y={};const w=o?r:Hy(r,0,a-1);if(i){if(!o&&(r<0||r>=a))return{};r<0?p=r+a:r>=a&&(p=r-a),s&&h.indexOf(p)<0&&(h=h.concat(p)),b={animating:!0,currentSlide:p,lazyLoadedList:h,targetSlide:p},y={animating:!1,targetSlide:p}}else g=p,p<0?(g=p+a,o?a%u!==0&&(g=a-a%u):g=0):!Ym(t)&&p>l?p=g=l:c&&p>=a?(p=o?a:a-1,g=o?0:a-1):p>=a&&(g=p-a,o?a%u!==0&&(g=0):g=a-d),!o&&p+d>=a&&(g=a-d),m=Ad(A(A({},t),{slideIndex:p})),v=Ad(A(A({},t),{slideIndex:g})),o||(m===v&&(p=g),m=v),s&&(h=h.concat(sg(A(A({},t),{currentSlide:p})))),f?(b={animating:!0,currentSlide:g,trackStyle:E4(A(A({},t),{left:m})),lazyLoadedList:h,targetSlide:w},y={animating:!1,currentSlide:g,trackStyle:$d(A(A({},t),{left:v})),swipeLeft:null,targetSlide:w}):b={currentSlide:g,trackStyle:$d(A(A({},t),{left:v})),lazyLoadedList:h,targetSlide:w};return{state:b,nextState:y}},Die=(t,e)=>{let n,i,o;const{slidesToScroll:r,slidesToShow:a,slideCount:s,currentSlide:l,targetSlide:c,lazyLoad:u,infinite:d}=t,h=s%r!==0?0:(s-l)%r;if(e.message==="previous")i=h===0?r:a-h,o=l-i,u&&!d&&(n=l-i,o=n===-1?s-1:n),d||(o=c-r);else if(e.message==="next")i=h===0?r:h,o=l+i,u&&!d&&(o=(l+r)%s+h),d||(o=c+r);else if(e.message==="dots")o=e.index*e.slidesToScroll;else if(e.message==="children"){if(o=e.index,d){const p=Hie(A(A({},t),{targetSlide:o}));o>e.currentSlide&&p==="left"?o=o-s:ot.target.tagName.match("TEXTAREA|INPUT|SELECT")||!e?"":t.keyCode===37?n?"next":"previous":t.keyCode===39?n?"previous":"next":"",Lie=(t,e,n)=>(t.target.tagName==="IMG"&&Zl(t),!e||!n&&t.type.indexOf("mouse")!==-1?"":{dragging:!0,touchObject:{startX:t.touches?t.touches[0].pageX:t.clientX,startY:t.touches?t.touches[0].pageY:t.clientY,curX:t.touches?t.touches[0].pageX:t.clientX,curY:t.touches?t.touches[0].pageY:t.clientY}}),Fie=(t,e)=>{const{scrolling:n,animating:i,vertical:o,swipeToSlide:r,verticalSwiping:a,rtl:s,currentSlide:l,edgeFriction:c,edgeDragged:u,onEdge:d,swiped:f,swiping:h,slideCount:p,slidesToScroll:g,infinite:m,touchObject:v,swipeEvent:b,listHeight:y,listWidth:w}=e;if(n)return;if(i)return Zl(t);o&&r&&a&&Zl(t);let x,$={};const S=Ad(e);v.curX=t.touches?t.touches[0].pageX:t.clientX,v.curY=t.touches?t.touches[0].pageY:t.clientY,v.swipeLength=Math.round(Math.sqrt(Math.pow(v.curX-v.startX,2)));const _=Math.round(Math.sqrt(Math.pow(v.curY-v.startY,2)));if(!a&&!h&&_>10)return{scrolling:!0};a&&(v.swipeLength=_);let P=(s?-1:1)*(v.curX>v.startX?1:-1);a&&(P=v.curY>v.startY?1:-1);const O=Math.ceil(p/g),T=O4(e.touchObject,a);let M=v.swipeLength;return m||(l===0&&(T==="right"||T==="down")||l+1>=O&&(T==="left"||T==="up")||!Ym(e)&&(T==="left"||T==="up"))&&(M=v.swipeLength*c,u===!1&&d&&(d(T),$.edgeDragged=!0)),!f&&b&&(b(T),$.swiped=!0),o?x=S+M*(y/w)*P:s?x=S-M*P:x=S+M*P,a&&(x=S+M*P),$=A(A({},$),{touchObject:v,swipeLeft:x,trackStyle:$d(A(A({},e),{left:x}))}),Math.abs(v.curX-v.startX)10&&($.swiping=!0,Zl(t)),$},Nie=(t,e)=>{const{dragging:n,swipe:i,touchObject:o,listWidth:r,touchThreshold:a,verticalSwiping:s,listHeight:l,swipeToSlide:c,scrolling:u,onSwipe:d,targetSlide:f,currentSlide:h,infinite:p}=e;if(!n)return i&&Zl(t),{};const g=s?l/a:r/a,m=O4(o,s),v={dragging:!1,edgeDragged:!1,scrolling:!1,swiping:!1,swiped:!1,swipeLeft:null,touchObject:{}};if(u||!o.swipeLength)return v;if(o.swipeLength>g){Zl(t),d&&d(m);let b,y;const w=p?h:f;switch(m){case"left":case"up":y=w+fP(e),b=c?dP(e,y):y,v.currentDirection=0;break;case"right":case"down":y=w-fP(e),b=c?dP(e,y):y,v.currentDirection=1;break;default:b=w}v.triggerSlideHandler=b}else{const b=Ad(e);v.trackStyle=E4(A(A({},e),{left:b}))}return v},Bie=t=>{const e=t.infinite?t.slideCount*2:t.slideCount;let n=t.infinite?t.slidesToShow*-1:0,i=t.infinite?t.slidesToShow*-1:0;const o=[];for(;n{const n=Bie(t);let i=0;if(e>n[n.length-1])e=n[n.length-1];else for(const o in n){if(e{const e=t.centerMode?t.slideWidth*Math.floor(t.slidesToShow/2):0;if(t.swipeToSlide){let n;const i=t.listRef,o=i.querySelectorAll&&i.querySelectorAll(".slick-slide")||[];if(Array.from(o).every(s=>{if(t.vertical){if(s.offsetTop+FS(s)/2>t.swipeLeft*-1)return n=s,!1}else if(s.offsetLeft-e+Wy(s)/2>t.swipeLeft*-1)return n=s,!1;return!0}),!n)return 0;const r=t.rtl===!0?t.slideCount-t.currentSlide:t.currentSlide;return Math.abs(n.dataset.index-r)||1}else return t.slidesToScroll},NS=(t,e)=>e.reduce((n,i)=>n&&t.hasOwnProperty(i),!0)?null:console.error("Keys Missing:",t),$d=t=>{NS(t,["left","variableWidth","slideCount","slidesToShow","slideWidth"]);let e,n;const i=t.slideCount+2*t.slidesToShow;t.vertical?n=i*t.slideHeight:e=zie(t)*t.slideWidth;let o={opacity:1,transition:"",WebkitTransition:""};if(t.useTransform){const r=t.vertical?"translate3d(0px, "+t.left+"px, 0px)":"translate3d("+t.left+"px, 0px, 0px)",a=t.vertical?"translate3d(0px, "+t.left+"px, 0px)":"translate3d("+t.left+"px, 0px, 0px)",s=t.vertical?"translateY("+t.left+"px)":"translateX("+t.left+"px)";o=A(A({},o),{WebkitTransform:r,transform:a,msTransform:s})}else t.vertical?o.top=t.left:o.left=t.left;return t.fade&&(o={opacity:1}),e&&(o.width=e+"px"),n&&(o.height=n+"px"),window&&!window.addEventListener&&window.attachEvent&&(t.vertical?o.marginTop=t.left+"px":o.marginLeft=t.left+"px"),o},E4=t=>{NS(t,["left","variableWidth","slideCount","slidesToShow","slideWidth","speed","cssEase"]);const e=$d(t);return t.useTransform?(e.WebkitTransition="-webkit-transform "+t.speed+"ms "+t.cssEase,e.transition="transform "+t.speed+"ms "+t.cssEase):t.vertical?e.transition="top "+t.speed+"ms "+t.cssEase:e.transition="left "+t.speed+"ms "+t.cssEase,e},Ad=t=>{if(t.unslick)return 0;NS(t,["slideIndex","trackRef","infinite","centerMode","slideCount","slidesToShow","slidesToScroll","slideWidth","listWidth","variableWidth","slideHeight"]);const{slideIndex:e,trackRef:n,infinite:i,centerMode:o,slideCount:r,slidesToShow:a,slidesToScroll:s,slideWidth:l,listWidth:c,variableWidth:u,slideHeight:d,fade:f,vertical:h}=t;let p=0,g,m,v=0;if(f||t.slideCount===1)return 0;let b=0;if(i?(b=-Mr(t),r%s!==0&&e+s>r&&(b=-(e>r?a-(e-r):r%s)),o&&(b+=parseInt(a/2))):(r%s!==0&&e+s>r&&(b=a-r%s),o&&(b=parseInt(a/2))),p=b*l,v=b*d,h?g=e*d*-1+v:g=e*l*-1+p,u===!0){let y;const w=n;if(y=e+Mr(t),m=w&&w.childNodes[y],g=m?m.offsetLeft*-1:0,o===!0){y=i?e+Mr(t):e,m=w&&w.children[y],g=0;for(let x=0;xt.unslick||!t.infinite?0:t.variableWidth?t.slideCount:t.slidesToShow+(t.centerMode?1:0),Ph=t=>t.unslick||!t.infinite?0:t.slideCount,zie=t=>t.slideCount===1?1:Mr(t)+t.slideCount+Ph(t),Hie=t=>t.targetSlide>t.currentSlide?t.targetSlide>t.currentSlide+Wie(t)?"left":"right":t.targetSlide{let{slidesToShow:e,centerMode:n,rtl:i,centerPadding:o}=t;if(n){let r=(e-1)/2+1;return parseInt(o)>0&&(r+=1),i&&e%2===0&&(r+=1),r}return i?0:e-1},jie=t=>{let{slidesToShow:e,centerMode:n,rtl:i,centerPadding:o}=t;if(n){let r=(e-1)/2+1;return parseInt(o)>0&&(r+=1),!i&&e%2===0&&(r+=1),r}return i?e-1:0},hP=()=>!!(typeof window<"u"&&window.document&&window.document.createElement),kb=t=>{let e,n,i,o;t.rtl?o=t.slideCount-1-t.index:o=t.index;const r=o<0||o>=t.slideCount;t.centerMode?(i=Math.floor(t.slidesToShow/2),n=(o-t.currentSlide)%t.slideCount===0,o>t.currentSlide-i-1&&o<=t.currentSlide+i&&(e=!0)):e=t.currentSlide<=o&&o=t.slideCount?a=t.targetSlide-t.slideCount:a=t.targetSlide,{"slick-slide":!0,"slick-active":e,"slick-center":n,"slick-cloned":r,"slick-current":o===a}},Vie=function(t){const e={};return(t.variableWidth===void 0||t.variableWidth===!1)&&(e.width=t.slideWidth+(typeof t.slideWidth=="number"?"px":"")),t.fade&&(e.position="relative",t.vertical?e.top=-t.index*parseInt(t.slideHeight)+"px":e.left=-t.index*parseInt(t.slideWidth)+"px",e.opacity=t.currentSlide===t.index?1:0,t.useCSS&&(e.transition="opacity "+t.speed+"ms "+t.cssEase+", visibility "+t.speed+"ms "+t.cssEase)),e},Db=(t,e)=>t.key+"-"+e,Xie=function(t,e){let n;const i=[],o=[],r=[],a=e.length,s=P4(t),l=T4(t);return e.forEach((c,u)=>{let d;const f={message:"children",index:u,slidesToScroll:t.slidesToScroll,currentSlide:t.currentSlide};!t.lazyLoad||t.lazyLoad&&t.lazyLoadedList.indexOf(u)>=0?d=c:d=C("div");const h=Vie(A(A({},t),{index:u})),p=d.props.class||"";let g=kb(A(A({},t),{index:u}));if(i.push(ku(d,{key:"original"+Db(d,u),tabindex:"-1","data-index":u,"aria-hidden":!g["slick-active"],class:ce(g,p),style:A(A({outline:"none"},d.props.style||{}),h),onClick:()=>{t.focusOnSelect&&t.focusOnSelect(f)}})),t.infinite&&t.fade===!1){const m=a-u;m<=Mr(t)&&a!==t.slidesToShow&&(n=-m,n>=s&&(d=c),g=kb(A(A({},t),{index:n})),o.push(ku(d,{key:"precloned"+Db(d,n),class:ce(g,p),tabindex:"-1","data-index":n,"aria-hidden":!g["slick-active"],style:A(A({},d.props.style||{}),h),onClick:()=>{t.focusOnSelect&&t.focusOnSelect(f)}}))),a!==t.slidesToShow&&(n=a+u,n{t.focusOnSelect&&t.focusOnSelect(f)}})))}}),t.rtl?o.concat(i,r).reverse():o.concat(i,r)},M4=(t,e)=>{let{attrs:n,slots:i}=e;const o=Xie(n,Dt(i==null?void 0:i.default())),{onMouseenter:r,onMouseover:a,onMouseleave:s}=n,l={onMouseenter:r,onMouseover:a,onMouseleave:s},c=A({class:"slick-track",style:n.trackStyle},l);return C("div",c,[o])};M4.inheritAttrs=!1;const Yie=function(t){let e;return t.infinite?e=Math.ceil(t.slideCount/t.slidesToScroll):e=Math.ceil((t.slideCount-t.slidesToShow)/t.slidesToScroll)+1,e},I4=(t,e)=>{let{attrs:n}=e;const{slideCount:i,slidesToScroll:o,slidesToShow:r,infinite:a,currentSlide:s,appendDots:l,customPaging:c,clickHandler:u,dotsClass:d,onMouseenter:f,onMouseover:h,onMouseleave:p}=n,g=Yie({slideCount:i,slidesToScroll:o,slidesToShow:r,infinite:a}),m={onMouseenter:f,onMouseover:h,onMouseleave:p};let v=[];for(let b=0;b=$&&s<=w:s===$}),_={message:"dots",index:b,slidesToScroll:o,currentSlide:s};v=v.concat(C("li",{key:b,class:S},[At(c({i:b}),{onClick:P})]))}return At(l({dots:v}),A({class:d},m))};I4.inheritAttrs=!1;function k4(){}function D4(t,e,n){n&&n.preventDefault(),e(t,n)}const R4=(t,e)=>{let{attrs:n}=e;const{clickHandler:i,infinite:o,currentSlide:r,slideCount:a,slidesToShow:s}=n,l={"slick-arrow":!0,"slick-prev":!0};let c=function(h){D4({message:"previous"},i,h)};!o&&(r===0||a<=s)&&(l["slick-disabled"]=!0,c=k4);const u={key:"0","data-role":"none",class:l,style:{display:"block"},onClick:c},d={currentSlide:r,slideCount:a};let f;return n.prevArrow?f=At(n.prevArrow(A(A({},u),d)),{key:"0",class:l,style:{display:"block"},onClick:c},!1):f=C("button",H({key:"0",type:"button"},u),[" ",Qn("Previous")]),f};R4.inheritAttrs=!1;const L4=(t,e)=>{let{attrs:n}=e;const{clickHandler:i,currentSlide:o,slideCount:r}=n,a={"slick-arrow":!0,"slick-next":!0};let s=function(d){D4({message:"next"},i,d)};Ym(n)||(a["slick-disabled"]=!0,s=k4);const l={key:"1","data-role":"none",class:ce(a),style:{display:"block"},onClick:s},c={currentSlide:o,slideCount:r};let u;return n.nextArrow?u=At(n.nextArrow(A(A({},l),c)),{key:"1",class:ce(a),style:{display:"block"},onClick:s},!1):u=C("button",H({key:"1",type:"button"},l),[" ",Qn("Next")]),u};L4.inheritAttrs=!1;var Gie=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{this.currentSlide>=t.children.length&&this.changeSlide({message:"index",index:t.children.length-t.slidesToShow,currentSlide:this.currentSlide}),!this.preProps.autoplay&&t.autoplay?this.handleAutoPlay("playing"):t.autoplay?this.handleAutoPlay("update"):this.pause("paused")}),this.preProps=A({},t)}},mounted(){if(this.__emit("init"),this.lazyLoad){const t=sg(A(A({},this.$props),this.$data));t.length>0&&(this.setState(e=>({lazyLoadedList:e.lazyLoadedList.concat(t)})),this.__emit("lazyLoad",t))}this.$nextTick(()=>{const t=A({listRef:this.list,trackRef:this.track,children:this.children},this.$props);this.updateState(t,!0,()=>{this.adaptHeight(),this.autoplay&&this.handleAutoPlay("playing")}),this.lazyLoad==="progressive"&&(this.lazyLoadTimer=setInterval(this.progressiveLazyLoad,1e3)),this.ro=new zw(()=>{this.animating?(this.onWindowResized(!1),this.callbackTimers.push(setTimeout(()=>this.onWindowResized(),this.speed))):this.onWindowResized()}),this.ro.observe(this.list),document.querySelectorAll&&Array.prototype.forEach.call(document.querySelectorAll(".slick-slide"),e=>{e.onfocus=this.$props.pauseOnFocus?this.onSlideFocus:null,e.onblur=this.$props.pauseOnFocus?this.onSlideBlur:null}),window.addEventListener?window.addEventListener("resize",this.onWindowResized):window.attachEvent("onresize",this.onWindowResized)})},beforeUnmount(){var t;this.animationEndCallback&&clearTimeout(this.animationEndCallback),this.lazyLoadTimer&&clearInterval(this.lazyLoadTimer),this.callbackTimers.length&&(this.callbackTimers.forEach(e=>clearTimeout(e)),this.callbackTimers=[]),window.addEventListener?window.removeEventListener("resize",this.onWindowResized):window.detachEvent("onresize",this.onWindowResized),this.autoplayTimer&&clearInterval(this.autoplayTimer),(t=this.ro)===null||t===void 0||t.disconnect()},updated(){if(this.checkImagesLoad(),this.__emit("reInit"),this.lazyLoad){const t=sg(A(A({},this.$props),this.$data));t.length>0&&(this.setState(e=>({lazyLoadedList:e.lazyLoadedList.concat(t)})),this.__emit("lazyLoad"))}this.adaptHeight()},methods:{listRefHandler(t){this.list=t},trackRefHandler(t){this.track=t},adaptHeight(){if(this.adaptiveHeight&&this.list){const t=this.list.querySelector(`[data-index="${this.currentSlide}"]`);this.list.style.height=FS(t)+"px"}},onWindowResized(t){this.debouncedResize&&this.debouncedResize.cancel(),this.debouncedResize=W1(()=>this.resizeWindow(t),50),this.debouncedResize()},resizeWindow(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(!!!this.track)return;const n=A(A({listRef:this.list,trackRef:this.track,children:this.children},this.$props),this.$data);this.updateState(n,t,()=>{this.autoplay?this.handleAutoPlay("update"):this.pause("paused")}),this.setState({animating:!1}),clearTimeout(this.animationEndCallback),delete this.animationEndCallback},updateState(t,e,n){const i=Iie(t);t=A(A(A({},t),i),{slideIndex:i.currentSlide});const o=Ad(t);t=A(A({},t),{left:o});const r=$d(t);(e||this.children.length!==t.children.length)&&(i.trackStyle=r),this.setState(i,n)},ssrInit(){const t=this.children;if(this.variableWidth){let l=0,c=0;const u=[],d=Mr(A(A(A({},this.$props),this.$data),{slideCount:t.length})),f=Ph(A(A(A({},this.$props),this.$data),{slideCount:t.length}));t.forEach(p=>{var g,m;const v=((m=(g=p.props.style)===null||g===void 0?void 0:g.width)===null||m===void 0?void 0:m.split("px")[0])||0;u.push(v),l+=v});for(let p=0;p{const o=()=>++n&&n>=e&&this.onWindowResized();if(!i.onclick)i.onclick=()=>i.parentNode.focus();else{const r=i.onclick;i.onclick=()=>{r(),i.parentNode.focus()}}i.onload||(this.$props.lazyLoad?i.onload=()=>{this.adaptHeight(),this.callbackTimers.push(setTimeout(this.onWindowResized,this.speed))}:(i.onload=o,i.onerror=()=>{o(),this.__emit("lazyLoadError")}))})},progressiveLazyLoad(){const t=[],e=A(A({},this.$props),this.$data);for(let n=this.currentSlide;n=-Mr(e);n--)if(this.lazyLoadedList.indexOf(n)<0){t.push(n);break}t.length>0?(this.setState(n=>({lazyLoadedList:n.lazyLoadedList.concat(t)})),this.__emit("lazyLoad",t)):this.lazyLoadTimer&&(clearInterval(this.lazyLoadTimer),delete this.lazyLoadTimer)},slideHandler(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const{asNavFor:n,beforeChange:i,speed:o,afterChange:r}=this.$props,{state:a,nextState:s}=kie(A(A(A({index:t},this.$props),this.$data),{trackRef:this.track,useCSS:this.useCSS&&!e}));if(!a)return;i&&i(this.currentSlide,a.currentSlide);const l=a.lazyLoadedList.filter(c=>this.lazyLoadedList.indexOf(c)<0);this.$attrs.onLazyLoad&&l.length>0&&this.__emit("lazyLoad",l),!this.$props.waitForAnimate&&this.animationEndCallback&&(clearTimeout(this.animationEndCallback),r&&r(this.currentSlide),delete this.animationEndCallback),this.setState(a,()=>{n&&this.asNavForIndex!==t&&(this.asNavForIndex=t,n.innerSlider.slideHandler(t)),s&&(this.animationEndCallback=setTimeout(()=>{const{animating:c}=s,u=Gie(s,["animating"]);this.setState(u,()=>{this.callbackTimers.push(setTimeout(()=>this.setState({animating:c}),10)),r&&r(a.currentSlide),delete this.animationEndCallback})},o))})},changeSlide(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=A(A({},this.$props),this.$data),i=Die(n,t);if(!(i!==0&&!i)&&(e===!0?this.slideHandler(i,e):this.slideHandler(i),this.$props.autoplay&&this.handleAutoPlay("update"),this.$props.focusOnSelect)){const o=this.list.querySelectorAll(".slick-current");o[0]&&o[0].focus()}},clickHandler(t){this.clickable===!1&&(t.stopPropagation(),t.preventDefault()),this.clickable=!0},keyHandler(t){const e=Rie(t,this.accessibility,this.rtl);e!==""&&this.changeSlide({message:e})},selectHandler(t){this.changeSlide(t)},disableBodyScroll(){const t=e=>{e=e||window.event,e.preventDefault&&e.preventDefault(),e.returnValue=!1};window.ontouchmove=t},enableBodyScroll(){window.ontouchmove=null},swipeStart(t){this.verticalSwiping&&this.disableBodyScroll();const e=Lie(t,this.swipe,this.draggable);e!==""&&this.setState(e)},swipeMove(t){const e=Fie(t,A(A(A({},this.$props),this.$data),{trackRef:this.track,listRef:this.list,slideIndex:this.currentSlide}));e&&(e.swiping&&(this.clickable=!1),this.setState(e))},swipeEnd(t){const e=Nie(t,A(A(A({},this.$props),this.$data),{trackRef:this.track,listRef:this.list,slideIndex:this.currentSlide}));if(!e)return;const n=e.triggerSlideHandler;delete e.triggerSlideHandler,this.setState(e),n!==void 0&&(this.slideHandler(n),this.$props.verticalSwiping&&this.enableBodyScroll())},touchEnd(t){this.swipeEnd(t),this.clickable=!0},slickPrev(){this.callbackTimers.push(setTimeout(()=>this.changeSlide({message:"previous"}),0))},slickNext(){this.callbackTimers.push(setTimeout(()=>this.changeSlide({message:"next"}),0))},slickGoTo(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(t=Number(t),isNaN(t))return"";this.callbackTimers.push(setTimeout(()=>this.changeSlide({message:"index",index:t,currentSlide:this.currentSlide},e),0))},play(){let t;if(this.rtl)t=this.currentSlide-this.slidesToScroll;else if(Ym(A(A({},this.$props),this.$data)))t=this.currentSlide+this.slidesToScroll;else return!1;this.slideHandler(t)},handleAutoPlay(t){this.autoplayTimer&&clearInterval(this.autoplayTimer);const e=this.autoplaying;if(t==="update"){if(e==="hovered"||e==="focused"||e==="paused")return}else if(t==="leave"){if(e==="paused"||e==="focused")return}else if(t==="blur"&&(e==="paused"||e==="hovered"))return;this.autoplayTimer=setInterval(this.play,this.autoplaySpeed+50),this.setState({autoplaying:"playing"})},pause(t){this.autoplayTimer&&(clearInterval(this.autoplayTimer),this.autoplayTimer=null);const e=this.autoplaying;t==="paused"?this.setState({autoplaying:"paused"}):t==="focused"?(e==="hovered"||e==="playing")&&this.setState({autoplaying:"focused"}):e==="playing"&&this.setState({autoplaying:"hovered"})},onDotsOver(){this.autoplay&&this.pause("hovered")},onDotsLeave(){this.autoplay&&this.autoplaying==="hovered"&&this.handleAutoPlay("leave")},onTrackOver(){this.autoplay&&this.pause("hovered")},onTrackLeave(){this.autoplay&&this.autoplaying==="hovered"&&this.handleAutoPlay("leave")},onSlideFocus(){this.autoplay&&this.pause("focused")},onSlideBlur(){this.autoplay&&this.autoplaying==="focused"&&this.handleAutoPlay("blur")},customPaging(t){let{i:e}=t;return C("button",null,[e+1])},appendDots(t){let{dots:e}=t;return C("ul",{style:{display:"block"}},[e])}},render(){const t=ce("slick-slider",this.$attrs.class,{"slick-vertical":this.vertical,"slick-initialized":!0}),e=A(A({},this.$props),this.$data);let n=Ib(e,["fade","cssEase","speed","infinite","centerMode","focusOnSelect","currentSlide","lazyLoad","lazyLoadedList","rtl","slideWidth","slideHeight","listHeight","vertical","slidesToShow","slidesToScroll","slideCount","trackStyle","variableWidth","unslick","centerPadding","targetSlide","useCSS"]);const{pauseOnHover:i}=this.$props;n=A(A({},n),{focusOnSelect:this.focusOnSelect&&this.clickable?this.selectHandler:null,ref:this.trackRefHandler,onMouseleave:i?this.onTrackLeave:Di,onMouseover:i?this.onTrackOver:Di});let o;if(this.dots===!0&&this.slideCount>=this.slidesToShow){let m=Ib(e,["dotsClass","slideCount","slidesToShow","currentSlide","slidesToScroll","clickHandler","children","infinite","appendDots"]);m.customPaging=this.customPaging,m.appendDots=this.appendDots;const{customPaging:v,appendDots:b}=this.$slots;v&&(m.customPaging=v),b&&(m.appendDots=b);const{pauseOnDotsHover:y}=this.$props;m=A(A({},m),{clickHandler:this.changeSlide,onMouseover:y?this.onDotsOver:Di,onMouseleave:y?this.onDotsLeave:Di}),o=C(I4,m,null)}let r,a;const s=Ib(e,["infinite","centerMode","currentSlide","slideCount","slidesToShow"]);s.clickHandler=this.changeSlide;const{prevArrow:l,nextArrow:c}=this.$slots;l&&(s.prevArrow=l),c&&(s.nextArrow=c),this.arrows&&(r=C(R4,s,null),a=C(L4,s,null));let u=null;this.vertical&&(u={height:typeof this.listHeight=="number"?`${this.listHeight}px`:this.listHeight});let d=null;this.vertical===!1?this.centerMode===!0&&(d={padding:"0px "+this.centerPadding}):this.centerMode===!0&&(d={padding:this.centerPadding+" 0px"});const f=A(A({},u),d),h=this.touchMove;let p={ref:this.listRefHandler,class:"slick-list",style:f,onClick:this.clickHandler,onMousedown:h?this.swipeStart:Di,onMousemove:this.dragging&&h?this.swipeMove:Di,onMouseup:h?this.swipeEnd:Di,onMouseleave:this.dragging&&h?this.swipeEnd:Di,[pn?"onTouchstartPassive":"onTouchstart"]:h?this.swipeStart:Di,[pn?"onTouchmovePassive":"onTouchmove"]:this.dragging&&h?this.swipeMove:Di,onTouchend:h?this.touchEnd:Di,onTouchcancel:this.dragging&&h?this.swipeEnd:Di,onKeydown:this.accessibility?this.keyHandler:Di},g={class:t,dir:"ltr",style:this.$attrs.style};return this.unslick&&(p={class:"slick-list",ref:this.listRefHandler},g={class:t}),C("div",g,[this.unslick?"":r,C("div",p,[C(M4,n,{default:()=>[this.children]})]),this.unslick?"":a,this.unslick?"":o])}},Uie=oe({name:"Slider",mixins:[el],inheritAttrs:!1,props:A({},_4),data(){return this._responsiveMediaHandlers=[],{breakpoint:null}},mounted(){if(this.responsive){const t=this.responsive.map(n=>n.breakpoint);t.sort((n,i)=>n-i),t.forEach((n,i)=>{let o;i===0?o=Mb({minWidth:0,maxWidth:n}):o=Mb({minWidth:t[i-1]+1,maxWidth:n}),hP()&&this.media(o,()=>{this.setState({breakpoint:n})})});const e=Mb({minWidth:t.slice(-1)[0]});hP()&&this.media(e,()=>{this.setState({breakpoint:null})})}},beforeUnmount(){this._responsiveMediaHandlers.forEach(function(t){t.mql.removeListener(t.listener)})},methods:{innerSliderRefHandler(t){this.innerSlider=t},media(t,e){const n=window.matchMedia(t),i=o=>{let{matches:r}=o;r&&e()};n.addListener(i),i(n),this._responsiveMediaHandlers.push({mql:n,query:t,listener:i})},slickPrev(){var t;(t=this.innerSlider)===null||t===void 0||t.slickPrev()},slickNext(){var t;(t=this.innerSlider)===null||t===void 0||t.slickNext()},slickGoTo(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;var n;(n=this.innerSlider)===null||n===void 0||n.slickGoTo(t,e)},slickPause(){var t;(t=this.innerSlider)===null||t===void 0||t.pause("paused")},slickPlay(){var t;(t=this.innerSlider)===null||t===void 0||t.handleAutoPlay("play")}},render(){var t;let e,n;this.breakpoint?(n=this.responsive.filter(s=>s.breakpoint===this.breakpoint),e=n[0].settings==="unslick"?"unslick":A(A({},this.$props),n[0].settings)):e=A({},this.$props),e.centerMode&&(e.slidesToScroll>1,e.slidesToScroll=1),e.fade&&(e.slidesToShow>1,e.slidesToScroll>1,e.slidesToShow=1,e.slidesToScroll=1);let i=rm(this)||[];i=i.filter(s=>typeof s=="string"?!!s.trim():!!s),e.variableWidth&&(e.rows>1||e.slidesPerRow>1)&&(console.warn("variableWidth is not supported in case of rows > 1 or slidesPerRow > 1"),e.variableWidth=!1);const o=[];let r=null;for(let s=0;s=i.length));d+=1)u.push(At(i[d],{key:100*s+10*c+d,tabindex:-1,style:{width:`${100/e.slidesPerRow}%`,display:"inline-block"}}));l.push(C("div",{key:10*s+c},[u]))}e.variableWidth?o.push(C("div",{key:s,style:{width:r}},[l])):o.push(C("div",{key:s},[l]))}if(e==="unslick"){const s="regular slider "+(this.className||"");return C("div",{class:s},[i])}else o.length<=e.slidesToShow&&(e.unslick=!0);const a=A(A(A({},this.$attrs),e),{children:o,ref:this.innerSliderRefHandler});return C(Kie,H(H({},a),{},{__propsSymbol__:[]}),this.$slots)}}),qie=t=>{const{componentCls:e,antCls:n,carouselArrowSize:i,carouselDotOffset:o,marginXXS:r}=t,a=-i*1.25,s=r;return{[e]:A(A({},rt(t)),{".slick-slider":{position:"relative",display:"block",boxSizing:"border-box",touchAction:"pan-y",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",".slick-track, .slick-list":{transform:"translate3d(0, 0, 0)",touchAction:"pan-y"}},".slick-list":{position:"relative",display:"block",margin:0,padding:0,overflow:"hidden","&:focus":{outline:"none"},"&.dragging":{cursor:"pointer"},".slick-slide":{pointerEvents:"none",[`input${n}-radio-input, input${n}-checkbox-input`]:{visibility:"hidden"},"&.slick-active":{pointerEvents:"auto",[`input${n}-radio-input, input${n}-checkbox-input`]:{visibility:"visible"}},"> div > div":{verticalAlign:"bottom"}}},".slick-track":{position:"relative",top:0,insetInlineStart:0,display:"block","&::before, &::after":{display:"table",content:'""'},"&::after":{clear:"both"}},".slick-slide":{display:"none",float:"left",height:"100%",minHeight:1,img:{display:"block"},"&.dragging img":{pointerEvents:"none"}},".slick-initialized .slick-slide":{display:"block"},".slick-vertical .slick-slide":{display:"block",height:"auto"},".slick-arrow.slick-hidden":{display:"none"},".slick-prev, .slick-next":{position:"absolute",top:"50%",display:"block",width:i,height:i,marginTop:-i/2,padding:0,color:"transparent",fontSize:0,lineHeight:0,background:"transparent",border:0,outline:"none",cursor:"pointer","&:hover, &:focus":{color:"transparent",background:"transparent",outline:"none","&::before":{opacity:1}},"&.slick-disabled::before":{opacity:.25}},".slick-prev":{insetInlineStart:a,"&::before":{content:'"←"'}},".slick-next":{insetInlineEnd:a,"&::before":{content:'"→"'}},".slick-dots":{position:"absolute",insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:15,display:"flex !important",justifyContent:"center",paddingInlineStart:0,listStyle:"none","&-bottom":{bottom:o},"&-top":{top:o,bottom:"auto"},li:{position:"relative",display:"inline-block",flex:"0 1 auto",boxSizing:"content-box",width:t.dotWidth,height:t.dotHeight,marginInline:s,padding:0,textAlign:"center",textIndent:-999,verticalAlign:"top",transition:`all ${t.motionDurationSlow}`,button:{position:"relative",display:"block",width:"100%",height:t.dotHeight,padding:0,color:"transparent",fontSize:0,background:t.colorBgContainer,border:0,borderRadius:1,outline:"none",cursor:"pointer",opacity:.3,transition:`all ${t.motionDurationSlow}`,"&: hover, &:focus":{opacity:.75},"&::after":{position:"absolute",inset:-s,content:'""'}},"&.slick-active":{width:t.dotWidthActive,"& button":{background:t.colorBgContainer,opacity:1},"&: hover, &:focus":{opacity:1}}}}})}},Zie=t=>{const{componentCls:e,carouselDotOffset:n,marginXXS:i}=t,o={width:t.dotHeight,height:t.dotWidth};return{[`${e}-vertical`]:{".slick-dots":{top:"50%",bottom:"auto",flexDirection:"column",width:t.dotHeight,height:"auto",margin:0,transform:"translateY(-50%)","&-left":{insetInlineEnd:"auto",insetInlineStart:n},"&-right":{insetInlineEnd:n,insetInlineStart:"auto"},li:A(A({},o),{margin:`${i}px 0`,verticalAlign:"baseline",button:o,"&.slick-active":A(A({},o),{button:o})})}}}},Jie=t=>{const{componentCls:e}=t;return[{[`${e}-rtl`]:{direction:"rtl",".slick-dots":{[`${e}-rtl&`]:{flexDirection:"row-reverse"}}}},{[`${e}-vertical`]:{".slick-dots":{[`${e}-rtl&`]:{flexDirection:"column"}}}}]},Qie=et("Carousel",t=>{const{controlHeightLG:e,controlHeightSM:n}=t,i=Ve(t,{carouselArrowSize:e/2,carouselDotOffset:n/2});return[qie(i),Zie(i),Jie(i)]},{dotWidth:16,dotHeight:3,dotWidthActive:24});var eoe=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o({effect:Ne(),dots:Ce(!0),vertical:Ce(),autoplay:Ce(),easing:String,beforeChange:ve(),afterChange:ve(),prefixCls:String,accessibility:Ce(),nextArrow:Z.any,prevArrow:Z.any,pauseOnHover:Ce(),adaptiveHeight:Ce(),arrows:Ce(!1),autoplaySpeed:Number,centerMode:Ce(),centerPadding:String,cssEase:String,dotsClass:String,draggable:Ce(!1),fade:Ce(),focusOnSelect:Ce(),infinite:Ce(),initialSlide:Number,lazyLoad:Ne(),rtl:Ce(),slide:String,slidesToShow:Number,slidesToScroll:Number,speed:Number,swipe:Ce(),swipeToSlide:Ce(),swipeEvent:ve(),touchMove:Ce(),touchThreshold:Number,variableWidth:Ce(),useCSS:Ce(),slickGoTo:Number,responsive:Array,dotPosition:Ne(),verticalSwiping:Ce(!1)}),noe=oe({compatConfig:{MODE:3},name:"ACarousel",inheritAttrs:!1,props:toe(),setup(t,e){let{slots:n,attrs:i,expose:o}=e;const r=se();o({goTo:function(p){let g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;var m;(m=r.value)===null||m===void 0||m.slickGoTo(p,g)},autoplay:p=>{var g,m;(m=(g=r.value)===null||g===void 0?void 0:g.innerSlider)===null||m===void 0||m.handleAutoPlay(p)},prev:()=>{var p;(p=r.value)===null||p===void 0||p.slickPrev()},next:()=>{var p;(p=r.value)===null||p===void 0||p.slickNext()},innerSlider:L(()=>{var p;return(p=r.value)===null||p===void 0?void 0:p.innerSlider})}),Ke(()=>{Gi(t.vertical===void 0)});const{prefixCls:s,direction:l}=Me("carousel",t),[c,u]=Qie(s),d=L(()=>t.dotPosition?t.dotPosition:t.vertical!==void 0&&t.vertical?"right":"bottom"),f=L(()=>d.value==="left"||d.value==="right"),h=L(()=>{const p="slick-dots";return ce({[p]:!0,[`${p}-${d.value}`]:!0,[`${t.dotsClass}`]:!!t.dotsClass})});return()=>{const{dots:p,arrows:g,draggable:m,effect:v}=t,{class:b,style:y}=i,w=eoe(i,["class","style"]),x=v==="fade"?!0:t.fade,$=ce(s.value,{[`${s.value}-rtl`]:l.value==="rtl",[`${s.value}-vertical`]:f.value,[`${b}`]:!!b},u.value);return c(C("div",{class:$,style:y},[C(Uie,H(H(H({ref:r},t),w),{},{dots:!!p,dotsClass:h.value,arrows:g,draggable:m,fade:x,vertical:f.value}),n)]))}}}),ioe=Vt(noe),BS="__RC_CASCADER_SPLIT__",F4="SHOW_PARENT",N4="SHOW_CHILD";function Ca(t){return t.join(BS)}function Ll(t){return t.map(Ca)}function ooe(t){return t.split(BS)}function roe(t){const{label:e,value:n,children:i}=t||{},o=n||"value";return{label:e||"label",value:o,key:o,children:i||"children"}}function mu(t,e){var n,i;return(n=t.isLeaf)!==null&&n!==void 0?n:!(!((i=t[e.children])===null||i===void 0)&&i.length)}function aoe(t){const e=t.parentElement;if(!e)return;const n=t.offsetTop-e.offsetTop;n-e.scrollTop<0?e.scrollTo({top:n}):n+t.offsetHeight-e.scrollTop>e.offsetHeight&&e.scrollTo({top:n+t.offsetHeight-e.offsetHeight})}const B4=Symbol("TreeContextKey"),soe=oe({compatConfig:{MODE:3},name:"TreeContext",props:{value:{type:Object}},setup(t,e){let{slots:n}=e;return ot(B4,L(()=>t.value)),()=>{var i;return(i=n.default)===null||i===void 0?void 0:i.call(n)}}}),zS=()=>qe(B4,L(()=>({}))),z4=Symbol("KeysStateKey"),loe=t=>{ot(z4,t)},H4=()=>qe(z4,{expandedKeys:ie([]),selectedKeys:ie([]),loadedKeys:ie([]),loadingKeys:ie([]),checkedKeys:ie([]),halfCheckedKeys:ie([]),expandedKeysSet:L(()=>new Set),selectedKeysSet:L(()=>new Set),loadedKeysSet:L(()=>new Set),loadingKeysSet:L(()=>new Set),checkedKeysSet:L(()=>new Set),halfCheckedKeysSet:L(()=>new Set),flattenNodes:ie([])}),coe=t=>{let{prefixCls:e,level:n,isStart:i,isEnd:o}=t;const r=`${e}-indent-unit`,a=[];for(let s=0;s({prefixCls:String,focusable:{type:Boolean,default:void 0},activeKey:[Number,String],tabindex:Number,children:Z.any,treeData:{type:Array},fieldNames:{type:Object},showLine:{type:[Boolean,Object],default:void 0},showIcon:{type:Boolean,default:void 0},icon:Z.any,selectable:{type:Boolean,default:void 0},expandAction:[String,Boolean],disabled:{type:Boolean,default:void 0},multiple:{type:Boolean,default:void 0},checkable:{type:Boolean,default:void 0},checkStrictly:{type:Boolean,default:void 0},draggable:{type:[Function,Boolean]},defaultExpandParent:{type:Boolean,default:void 0},autoExpandParent:{type:Boolean,default:void 0},defaultExpandAll:{type:Boolean,default:void 0},defaultExpandedKeys:{type:Array},expandedKeys:{type:Array},defaultCheckedKeys:{type:Array},checkedKeys:{type:[Object,Array]},defaultSelectedKeys:{type:Array},selectedKeys:{type:Array},allowDrop:{type:Function},dropIndicatorRender:{type:Function},onFocus:{type:Function},onBlur:{type:Function},onKeydown:{type:Function},onContextmenu:{type:Function},onClick:{type:Function},onDblclick:{type:Function},onScroll:{type:Function},onExpand:{type:Function},onCheck:{type:Function},onSelect:{type:Function},onLoad:{type:Function},loadData:{type:Function},loadedKeys:{type:Array},onMouseenter:{type:Function},onMouseleave:{type:Function},onRightClick:{type:Function},onDragstart:{type:Function},onDragenter:{type:Function},onDragover:{type:Function},onDragleave:{type:Function},onDragend:{type:Function},onDrop:{type:Function},onActiveChange:{type:Function},filterTreeNode:{type:Function},motion:Z.any,switcherIcon:Z.any,height:Number,itemHeight:Number,virtual:{type:Boolean,default:void 0},direction:{type:String},rootClassName:String,rootStyle:Object});var doe=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o"`v-slot:"+fe+"` ")}`;const r=ie(!1),a=zS(),{expandedKeysSet:s,selectedKeysSet:l,loadedKeysSet:c,loadingKeysSet:u,checkedKeysSet:d,halfCheckedKeysSet:f}=H4(),{dragOverNodeKey:h,dropPosition:p,keyEntities:g}=a.value,m=L(()=>Th(t.eventKey,{expandedKeysSet:s.value,selectedKeysSet:l.value,loadedKeysSet:c.value,loadingKeysSet:u.value,checkedKeysSet:d.value,halfCheckedKeysSet:f.value,dragOverNodeKey:h,dropPosition:p,keyEntities:g})),v=Bi(()=>m.value.expanded),b=Bi(()=>m.value.selected),y=Bi(()=>m.value.checked),w=Bi(()=>m.value.loaded),x=Bi(()=>m.value.loading),$=Bi(()=>m.value.halfChecked),S=Bi(()=>m.value.dragOver),_=Bi(()=>m.value.dragOverGapTop),P=Bi(()=>m.value.dragOverGapBottom),O=Bi(()=>m.value.pos),T=ie(),M=L(()=>{const{eventKey:fe}=t,{keyEntities:de}=a.value,{children:xe}=de[fe]||{};return!!(xe||[]).length}),I=L(()=>{const{isLeaf:fe}=t,{loadData:de}=a.value,xe=M.value;return fe===!1?!1:fe||!de&&!xe||de&&w.value&&!xe}),k=L(()=>I.value?null:v.value?pP:gP),E=L(()=>{const{disabled:fe}=t,{disabled:de}=a.value;return!!(de||fe)}),R=L(()=>{const{checkable:fe}=t,{checkable:de}=a.value;return!de||fe===!1?!1:de}),D=L(()=>{const{selectable:fe}=t,{selectable:de}=a.value;return typeof fe=="boolean"?fe:de}),F=L(()=>{const{data:fe,active:de,checkable:xe,disableCheckbox:_e,disabled:Oe,selectable:Re}=t;return A(A({active:de,checkable:xe,disableCheckbox:_e,disabled:Oe,selectable:Re},fe),{dataRef:fe,data:fe,isLeaf:I.value,checked:y.value,expanded:v.value,loading:x.value,selected:b.value,halfChecked:$.value})}),N=Cn(),B=L(()=>{const{eventKey:fe}=t,{keyEntities:de}=a.value,{parent:xe}=de[fe]||{};return A(A({},Oh(A({},t,m.value))),{parent:xe})}),z=$t({eventData:B,eventKey:L(()=>t.eventKey),selectHandle:T,pos:O,key:N.vnode.key});o(z);const W=fe=>{const{onNodeDoubleClick:de}=a.value;de(fe,B.value)},j=fe=>{if(E.value)return;const{onNodeSelect:de}=a.value;fe.preventDefault(),de(fe,B.value)},U=fe=>{if(E.value)return;const{disableCheckbox:de}=t,{onNodeCheck:xe}=a.value;if(!R.value||de)return;fe.preventDefault();const _e=!y.value;xe(fe,B.value,_e)},V=fe=>{const{onNodeClick:de}=a.value;de(fe,B.value),D.value?j(fe):U(fe)},q=fe=>{const{onNodeMouseEnter:de}=a.value;de(fe,B.value)},Y=fe=>{const{onNodeMouseLeave:de}=a.value;de(fe,B.value)},J=fe=>{const{onNodeContextMenu:de}=a.value;de(fe,B.value)},Q=fe=>{const{onNodeDragStart:de}=a.value;fe.stopPropagation(),r.value=!0,de(fe,z);try{fe.dataTransfer.setData("text/plain","")}catch{}},G=fe=>{const{onNodeDragEnter:de}=a.value;fe.preventDefault(),fe.stopPropagation(),de(fe,z)},ee=fe=>{const{onNodeDragOver:de}=a.value;fe.preventDefault(),fe.stopPropagation(),de(fe,z)},X=fe=>{const{onNodeDragLeave:de}=a.value;fe.stopPropagation(),de(fe,z)},K=fe=>{const{onNodeDragEnd:de}=a.value;fe.stopPropagation(),r.value=!1,de(fe,z)},te=fe=>{const{onNodeDrop:de}=a.value;fe.preventDefault(),fe.stopPropagation(),r.value=!1,de(fe,z)},ue=fe=>{const{onNodeExpand:de}=a.value;x.value||de(fe,B.value)},ae=()=>{const{data:fe}=t,{draggable:de}=a.value;return!!(de&&(!de.nodeDraggable||de.nodeDraggable(fe)))},re=()=>{const{draggable:fe,prefixCls:de}=a.value;return fe&&(fe!=null&&fe.icon)?C("span",{class:`${de}-draggable-icon`},[fe.icon]):null},ne=()=>{var fe,de,xe;const{switcherIcon:_e=i.switcherIcon||((fe=a.value.slots)===null||fe===void 0?void 0:fe[(xe=(de=t.data)===null||de===void 0?void 0:de.slots)===null||xe===void 0?void 0:xe.switcherIcon])}=t,{switcherIcon:Oe}=a.value,Re=_e||Oe;return typeof Re=="function"?Re(F.value):Re},le=()=>{const{loadData:fe,onNodeLoad:de}=a.value;x.value||fe&&v.value&&!I.value&&!M.value&&!w.value&&de(B.value)};Ze(()=>{le()}),ri(()=>{le()});const he=()=>{const{prefixCls:fe}=a.value,de=ne();if(I.value)return de!==!1?C("span",{class:ce(`${fe}-switcher`,`${fe}-switcher-noop`)},[de]):null;const xe=ce(`${fe}-switcher`,`${fe}-switcher_${v.value?pP:gP}`);return de!==!1?C("span",{onClick:ue,class:xe},[de]):null},pe=()=>{var fe,de;const{disableCheckbox:xe}=t,{prefixCls:_e}=a.value,Oe=E.value;return R.value?C("span",{class:ce(`${_e}-checkbox`,y.value&&`${_e}-checkbox-checked`,!y.value&&$.value&&`${_e}-checkbox-indeterminate`,(Oe||xe)&&`${_e}-checkbox-disabled`),onClick:U},[(de=(fe=a.value).customCheckable)===null||de===void 0?void 0:de.call(fe)]):null},ge=()=>{const{prefixCls:fe}=a.value;return C("span",{class:ce(`${fe}-iconEle`,`${fe}-icon__${k.value||"docu"}`,x.value&&`${fe}-icon_loading`)},null)},be=()=>{const{disabled:fe,eventKey:de}=t,{draggable:xe,dropLevelOffset:_e,dropPosition:Oe,prefixCls:Re,indent:Se,dropIndicatorRender:Ae,dragOverNodeKey:Pe,direction:ke}=a.value;return!fe&&xe!==!1&&Pe===de?Ae({dropPosition:Oe,dropLevelOffset:_e,indent:Se,prefixCls:Re,direction:ke}):null},$e=()=>{var fe,de,xe,_e,Oe,Re;const{icon:Se=i.icon,data:Ae}=t,Pe=i.title||((fe=a.value.slots)===null||fe===void 0?void 0:fe[(xe=(de=t.data)===null||de===void 0?void 0:de.slots)===null||xe===void 0?void 0:xe.title])||((_e=a.value.slots)===null||_e===void 0?void 0:_e.title)||t.title,{prefixCls:ke,showIcon:Le,icon:De,loadData:je}=a.value,ft=E.value,_t=`${ke}-node-content-wrapper`;let yt;if(Le){const fn=Se||((Oe=a.value.slots)===null||Oe===void 0?void 0:Oe[(Re=Ae==null?void 0:Ae.slots)===null||Re===void 0?void 0:Re.icon])||De;yt=fn?C("span",{class:ce(`${ke}-iconEle`,`${ke}-icon__customize`)},[typeof fn=="function"?fn(F.value):fn]):ge()}else je&&x.value&&(yt=ge());let Pt;typeof Pe=="function"?Pt=Pe(F.value):Pt=Pe,Pt=Pt===void 0?foe:Pt;const Et=C("span",{class:`${ke}-title`},[Pt]);return C("span",{ref:T,title:typeof Pe=="string"?Pe:"",class:ce(`${_t}`,`${_t}-${k.value||"normal"}`,!ft&&(b.value||r.value)&&`${ke}-node-selected`),onMouseenter:q,onMouseleave:Y,onContextmenu:J,onClick:V,onDblclick:W},[yt,Et,be()])};return()=>{const fe=A(A({},t),n),{eventKey:de,isLeaf:xe,isStart:_e,isEnd:Oe,domRef:Re,active:Se,data:Ae,onMousemove:Pe,selectable:ke}=fe,Le=doe(fe,["eventKey","isLeaf","isStart","isEnd","domRef","active","data","onMousemove","selectable"]),{prefixCls:De,filterTreeNode:je,keyEntities:ft,dropContainerKey:_t,dropTargetKey:yt,draggingNodeKey:Pt}=a.value,Et=E.value,fn=ka(Le,{aria:!0,data:!0}),{level:yn}=ft[de]||{},$n=Oe[Oe.length-1],on=ae(),Yn=!Et&&on,wi=Pt===de,Zi=ke!==void 0?{"aria-selected":!!ke}:void 0;return C("div",H(H({ref:Re,class:ce(n.class,`${De}-treenode`,{[`${De}-treenode-disabled`]:Et,[`${De}-treenode-switcher-${v.value?"open":"close"}`]:!xe,[`${De}-treenode-checkbox-checked`]:y.value,[`${De}-treenode-checkbox-indeterminate`]:$.value,[`${De}-treenode-selected`]:b.value,[`${De}-treenode-loading`]:x.value,[`${De}-treenode-active`]:Se,[`${De}-treenode-leaf-last`]:$n,[`${De}-treenode-draggable`]:Yn,dragging:wi,"drop-target":yt===de,"drop-container":_t===de,"drag-over":!Et&&S.value,"drag-over-gap-top":!Et&&_.value,"drag-over-gap-bottom":!Et&&P.value,"filter-node":je&&je(B.value)}),style:n.style,draggable:Yn,"aria-grabbed":wi,onDragstart:Yn?Q:void 0,onDragenter:on?G:void 0,onDragover:on?ee:void 0,onDragleave:on?X:void 0,onDrop:on?te:void 0,onDragend:on?K:void 0,onMousemove:Pe},Zi),fn),[C(coe,{prefixCls:De,level:yn,isStart:_e,isEnd:Oe},null),re(),he(),pe(),$e()])}}});function Go(t,e){if(!t)return[];const n=t.slice(),i=n.indexOf(e);return i>=0&&n.splice(i,1),n}function vr(t,e){const n=(t||[]).slice();return n.indexOf(e)===-1&&n.push(e),n}function HS(t){return t.split("-")}function V4(t,e){return`${t}-${e}`}function hoe(t){return t&&t.type&&t.type.isTreeNode}function poe(t,e){const n=[],i=e[t];function o(){(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[]).forEach(a=>{let{key:s,children:l}=a;n.push(s),o(l)})}return o(i.children),n}function goe(t){if(t.parent){const e=HS(t.pos);return Number(e[e.length-1])===t.parent.children.length-1}return!1}function moe(t){const e=HS(t.pos);return Number(e[e.length-1])===0}function mP(t,e,n,i,o,r,a,s,l,c){var u;const{clientX:d,clientY:f}=t,{top:h,height:p}=t.target.getBoundingClientRect(),m=((c==="rtl"?-1:1)*(((o==null?void 0:o.x)||0)-d)-12)/i;let v=s[n.eventKey];if(fI.key===v.key),T=O<=0?0:O-1,M=a[T].key;v=s[M]}const b=v.key,y=v,w=v.key;let x=0,$=0;if(!l.has(b))for(let O=0;O-1.5?r({dragNode:S,dropNode:_,dropPosition:1})?x=1:P=!1:r({dragNode:S,dropNode:_,dropPosition:0})?x=0:r({dragNode:S,dropNode:_,dropPosition:1})?x=1:P=!1:r({dragNode:S,dropNode:_,dropPosition:1})?x=1:P=!1,{dropPosition:x,dropLevelOffset:$,dropTargetKey:v.key,dropTargetPos:v.pos,dragOverNodeKey:w,dropContainerKey:x===0?null:((u=v.parent)===null||u===void 0?void 0:u.key)||null,dropAllowed:P}}function vP(t,e){if(!t)return;const{multiple:n}=e;return n?t.slice():t.length?[t[0]]:t}function Rb(t){if(!t)return null;let e;if(Array.isArray(t))e={checkedKeys:t,halfCheckedKeys:void 0};else if(typeof t=="object")e={checkedKeys:t.checked||void 0,halfCheckedKeys:t.halfChecked||void 0};else return null;return e}function Vy(t,e){const n=new Set;function i(o){if(n.has(o))return;const r=e[o];if(!r)return;n.add(o);const{parent:a,node:s}=r;s.disabled||a&&i(a.key)}return(t||[]).forEach(o=>{i(o)}),[...n]}var voe=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o0&&arguments[0]!==void 0?arguments[0]:[];return Kt(n).map(o=>{var r,a,s,l;if(!hoe(o))return null;const c=o.children||{},u=o.key,d={};for(const[O,T]of Object.entries(o.props))d[Sc(O)]=T;const{isLeaf:f,checkable:h,selectable:p,disabled:g,disableCheckbox:m}=d,v={isLeaf:f||f===""||void 0,checkable:h||h===""||void 0,selectable:p||p===""||void 0,disabled:g||g===""||void 0,disableCheckbox:m||m===""||void 0},b=A(A({},d),v),{title:y=(r=c.title)===null||r===void 0?void 0:r.call(c,b),icon:w=(a=c.icon)===null||a===void 0?void 0:a.call(c,b),switcherIcon:x=(s=c.switcherIcon)===null||s===void 0?void 0:s.call(c,b)}=d,$=voe(d,["title","icon","switcherIcon"]),S=(l=c.default)===null||l===void 0?void 0:l.call(c),_=A(A(A({},$),{title:y,icon:w,switcherIcon:x,key:u,isLeaf:f}),v),P=e(S);return P.length&&(_.children=P),_})}return e(t)}function boe(t,e,n){const{_title:i,key:o,children:r}=Gm(n),a=new Set(e===!0?[]:e),s=[];function l(c){let u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return c.map((d,f)=>{const h=V4(u?u.pos:"0",f),p=rf(d[o],h);let g;for(let v=0;vf[r]:typeof r=="function"&&(u=f=>r(f)):u=(f,h)=>rf(f[s],h);function d(f,h,p,g){const m=f?f[c]:t,v=f?V4(p.pos,h):"0",b=f?[...g,f]:[];if(f){const y=u(f,v),w={node:f,index:h,pos:v,key:y,parentPos:p.node?p.pos:null,level:p.level+1,nodes:b};e(w)}m&&m.forEach((y,w)=>{d(y,w,{node:f,pos:v,level:p?p.level+1:-1},b)})}d(null)}function af(t){let{initWrapper:e,processEntity:n,onProcessFinished:i,externalGetKey:o,childrenPropName:r,fieldNames:a}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2?arguments[2]:void 0;const l=o||s,c={},u={};let d={posEntities:c,keyEntities:u};return e&&(d=e(d)||d),yoe(t,f=>{const{node:h,index:p,pos:g,key:m,parentPos:v,level:b,nodes:y}=f,w={node:h,nodes:y,index:p,key:m,pos:g,level:b},x=rf(m,g);c[g]=w,u[x]=w,w.parent=c[v],w.parent&&(w.parent.children=w.parent.children||[],w.parent.children.push(w)),n&&n(w,d)},{externalGetKey:l,childrenPropName:r,fieldNames:a}),i&&i(d),d}function Th(t,e){let{expandedKeysSet:n,selectedKeysSet:i,loadedKeysSet:o,loadingKeysSet:r,checkedKeysSet:a,halfCheckedKeysSet:s,dragOverNodeKey:l,dropPosition:c,keyEntities:u}=e;const d=u[t];return{eventKey:t,expanded:n.has(t),selected:i.has(t),loaded:o.has(t),loading:r.has(t),checked:a.has(t),halfChecked:s.has(t),pos:String(d?d.pos:""),parent:d.parent,dragOver:l===t&&c===0,dragOverGapTop:l===t&&c===-1,dragOverGapBottom:l===t&&c===1}}function Oh(t){const{data:e,expanded:n,selected:i,checked:o,loaded:r,loading:a,halfChecked:s,dragOver:l,dragOverGapTop:c,dragOverGapBottom:u,pos:d,active:f,eventKey:h}=t,p=A(A({dataRef:e},e),{expanded:n,selected:i,checked:o,loaded:r,loading:a,halfChecked:s,dragOver:l,dragOverGapTop:c,dragOverGapBottom:u,pos:d,active:f,eventKey:h,key:h});return"props"in p||Object.defineProperty(p,"props",{get(){return t}}),p}const xoe=(t,e)=>L(()=>af(t.value,{fieldNames:e.value,initWrapper:i=>A(A({},i),{pathKeyEntities:{}}),processEntity:(i,o)=>{const r=i.nodes.map(a=>a[e.value.value]).join(BS);o.pathKeyEntities[r]=i,i.key=r}}).pathKeyEntities);function woe(t){const e=ie(!1),n=se({});return Ke(()=>{if(!t.value){e.value=!1,n.value={};return}let i={matchInputWidth:!0,limit:50};t.value&&typeof t.value=="object"&&(i=A(A({},i),t.value)),i.limit<=0&&delete i.limit,e.value=!0,n.value=i}),{showSearch:e,searchConfig:n}}const zu="__rc_cascader_search_mark__",Soe=(t,e,n)=>{let{label:i}=n;return e.some(o=>String(o[i]).toLowerCase().includes(t.toLowerCase()))},Coe=t=>{let{path:e,fieldNames:n}=t;return e.map(i=>i[n.label]).join(" / ")},$oe=(t,e,n,i,o,r)=>L(()=>{const{filter:a=Soe,render:s=Coe,limit:l=50,sort:c}=o.value,u=[];if(!t.value)return[];function d(f,h){f.forEach(p=>{if(!c&&l>0&&u.length>=l)return;const g=[...h,p],m=p[n.value.children];(!m||m.length===0||r.value)&&a(t.value,g,{label:n.value.label})&&u.push(A(A({},p),{[n.value.label]:s({inputValue:t.value,path:g,prefixCls:i.value,fieldNames:n.value}),[zu]:g})),m&&d(p[n.value.children],g)})}return d(e.value,[]),c&&u.sort((f,h)=>c(f[zu],h[zu],t.value,n.value)),l>0?u.slice(0,l):u});function bP(t,e,n){const i=new Set(t);return t.filter(o=>{const r=e[o],a=r?r.parent:null,s=r?r.children:null;return n===N4?!(s&&s.some(l=>l.key&&i.has(l.key))):!(a&&!a.node.disabled&&i.has(a.key))})}function _d(t,e,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;var o;let r=e;const a=[];for(let s=0;s{const f=d[n.value];return i?String(f)===String(l):f===l}),u=c!==-1?r==null?void 0:r[c]:null;a.push({value:(o=u==null?void 0:u[n.value])!==null&&o!==void 0?o:l,index:c,option:u}),r=u==null?void 0:u[n.children]}return a}const Aoe=(t,e,n)=>L(()=>{const i=[],o=[];return n.value.forEach(r=>{_d(r,t.value,e.value).every(s=>s.option)?o.push(r):i.push(r)}),[o,i]});function X4(t,e){const n=new Set;return t.forEach(i=>{e.has(i)||n.add(i)}),n}function _oe(t){const{disabled:e,disableCheckbox:n,checkable:i}=t||{};return!!(e||n)||i===!1}function Poe(t,e,n,i){const o=new Set(t),r=new Set;for(let s=0;s<=n;s+=1)(e.get(s)||new Set).forEach(c=>{const{key:u,node:d,children:f=[]}=c;o.has(u)&&!i(d)&&f.filter(h=>!i(h.node)).forEach(h=>{o.add(h.key)})});const a=new Set;for(let s=n;s>=0;s-=1)(e.get(s)||new Set).forEach(c=>{const{parent:u,node:d}=c;if(i(d)||!c.parent||a.has(c.parent.key))return;if(i(c.parent.node)){a.add(u.key);return}let f=!0,h=!1;(u.children||[]).filter(p=>!i(p.node)).forEach(p=>{let{key:g}=p;const m=o.has(g);f&&!m&&(f=!1),!h&&(m||r.has(g))&&(h=!0)}),f&&o.add(u.key),h&&r.add(u.key),a.add(u.key)});return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(X4(r,o))}}function Toe(t,e,n,i,o){const r=new Set(t);let a=new Set(e);for(let l=0;l<=i;l+=1)(n.get(l)||new Set).forEach(u=>{const{key:d,node:f,children:h=[]}=u;!r.has(d)&&!a.has(d)&&!o(f)&&h.filter(p=>!o(p.node)).forEach(p=>{r.delete(p.key)})});a=new Set;const s=new Set;for(let l=i;l>=0;l-=1)(n.get(l)||new Set).forEach(u=>{const{parent:d,node:f}=u;if(o(f)||!u.parent||s.has(u.parent.key))return;if(o(u.parent.node)){s.add(d.key);return}let h=!0,p=!1;(d.children||[]).filter(g=>!o(g.node)).forEach(g=>{let{key:m}=g;const v=r.has(m);h&&!v&&(h=!1),!p&&(v||a.has(m))&&(p=!0)}),h||r.delete(d.key),p&&a.add(d.key),s.add(d.key)});return{checkedKeys:Array.from(r),halfCheckedKeys:Array.from(X4(a,r))}}function fo(t,e,n,i,o,r){let a;r?a=r:a=_oe;const s=new Set(t.filter(c=>!!n[c]));let l;return e===!0?l=Poe(s,o,i,a):l=Toe(s,e.halfCheckedKeys,o,i,a),l}const Ooe=(t,e,n,i,o)=>L(()=>{const r=o.value||(a=>{let{labels:s}=a;const l=i.value?s.slice(-1):s,c=" / ";return l.every(u=>["string","number"].includes(typeof u))?l.join(c):l.reduce((u,d,f)=>{const h=cn(d)?At(d,{key:f}):d;return f===0?[h]:[...u,c,h]},[])});return t.value.map(a=>{const s=_d(a,e.value,n.value),l=r({labels:s.map(u=>{let{option:d,value:f}=u;var h;return(h=d==null?void 0:d[n.value.label])!==null&&h!==void 0?h:f}),selectedOptions:s.map(u=>{let{option:d}=u;return d})}),c=Ca(a);return{label:l,value:c,key:c,valueCells:a}})}),Y4=Symbol("CascaderContextKey"),Eoe=t=>{ot(Y4,t)},Km=()=>qe(Y4),Moe=()=>{const t=Gd(),{values:e}=Km(),[n,i]=Mt([]);return ye(()=>t.open,()=>{if(t.open&&!t.multiple){const o=e.value[0];i(o||[])}},{immediate:!0}),[n,i]},Ioe=(t,e,n,i,o,r)=>{const a=Gd(),s=L(()=>a.direction==="rtl"),[l,c,u]=[se([]),se(),se([])];Ke(()=>{let g=-1,m=e.value;const v=[],b=[],y=i.value.length;for(let x=0;xS[n.value.value]===i.value[x]);if($===-1)break;g=$,v.push(g),b.push(i.value[x]),m=m[g][n.value.children]}let w=e.value;for(let x=0;x{o(g)},f=g=>{const m=u.value.length;let v=c.value;v===-1&&g<0&&(v=m);for(let b=0;b{if(l.value.length>1){const g=l.value.slice(0,-1);d(g)}else a.toggleOpen(!1)},p=()=>{var g;const v=(((g=u.value[c.value])===null||g===void 0?void 0:g[n.value.children])||[]).find(b=>!b.disabled);if(v){const b=[...l.value,v[n.value.value]];d(b)}};t.expose({onKeydown:g=>{const{which:m}=g;switch(m){case Te.UP:case Te.DOWN:{let v=0;m===Te.UP?v=-1:m===Te.DOWN&&(v=1),v!==0&&f(v);break}case Te.LEFT:{s.value?p():h();break}case Te.RIGHT:{s.value?h():p();break}case Te.BACKSPACE:{a.searchValue||h();break}case Te.ENTER:{if(l.value.length){const v=u.value[c.value],b=(v==null?void 0:v[zu])||[];b.length?r(b.map(y=>y[n.value.value]),b[b.length-1]):r(l.value,v)}break}case Te.ESC:a.toggleOpen(!1),open&&g.stopPropagation()}},onKeyup:()=>{}})};function Um(t){let{prefixCls:e,checked:n,halfChecked:i,disabled:o,onClick:r}=t;const{customSlots:a,checkable:s}=Km(),l=s.value!==!1?a.value.checkable:s.value,c=typeof l=="function"?l():typeof l=="boolean"?null:l;return C("span",{class:{[e]:!0,[`${e}-checked`]:n,[`${e}-indeterminate`]:!n&&i,[`${e}-disabled`]:o},onClick:r},[c])}Um.props=["prefixCls","checked","halfChecked","disabled","onClick"];Um.displayName="Checkbox";Um.inheritAttrs=!1;const G4="__cascader_fix_label__";function qm(t){let{prefixCls:e,multiple:n,options:i,activeValue:o,prevValuePath:r,onToggleOpen:a,onSelect:s,onActive:l,checkedSet:c,halfCheckedSet:u,loadingKeys:d,isSelectable:f}=t;var h,p,g,m,v,b;const y=`${e}-menu`,w=`${e}-menu-item`,{fieldNames:x,changeOnSelect:$,expandTrigger:S,expandIcon:_,loadingIcon:P,dropdownMenuColumnStyle:O,customSlots:T}=Km(),M=(h=_.value)!==null&&h!==void 0?h:(g=(p=T.value).expandIcon)===null||g===void 0?void 0:g.call(p),I=(m=P.value)!==null&&m!==void 0?m:(b=(v=T.value).loadingIcon)===null||b===void 0?void 0:b.call(v),k=S.value==="hover";return C("ul",{class:y,role:"menu"},[i.map(E=>{var R;const{disabled:D}=E,F=E[zu],N=(R=E[G4])!==null&&R!==void 0?R:E[x.value.label],B=E[x.value.value],z=mu(E,x.value),W=F?F.map(G=>G[x.value.value]):[...r,B],j=Ca(W),U=d.includes(j),V=c.has(j),q=u.has(j),Y=()=>{!D&&(!k||!z)&&l(W)},J=()=>{f(E)&&s(W,z)};let Q;return typeof E.title=="string"?Q=E.title:typeof N=="string"&&(Q=N),C("li",{key:j,class:[w,{[`${w}-expand`]:!z,[`${w}-active`]:o===B,[`${w}-disabled`]:D,[`${w}-loading`]:U}],style:O.value,role:"menuitemcheckbox",title:Q,"aria-checked":V,"data-path-key":j,onClick:()=>{Y(),(!n||z)&&J()},onDblclick:()=>{$.value&&a(!1)},onMouseenter:()=>{k&&Y()},onMousedown:G=>{G.preventDefault()}},[n&&C(Um,{prefixCls:`${e}-checkbox`,checked:V,halfChecked:q,disabled:D,onClick:G=>{G.stopPropagation(),J()}},null),C("div",{class:`${w}-content`},[N]),!U&&M&&!z&&C("div",{class:`${w}-expand-icon`},[At(M)]),U&&I&&C("div",{class:`${w}-loading-icon`},[At(I)])])})])}qm.props=["prefixCls","multiple","options","activeValue","prevValuePath","onToggleOpen","onSelect","onActive","checkedSet","halfCheckedSet","loadingKeys","isSelectable"];qm.displayName="Column";qm.inheritAttrs=!1;const koe=oe({compatConfig:{MODE:3},name:"OptionList",inheritAttrs:!1,setup(t,e){const{attrs:n,slots:i}=e,o=Gd(),r=se(),a=L(()=>o.direction==="rtl"),{options:s,values:l,halfValues:c,fieldNames:u,changeOnSelect:d,onSelect:f,searchOptions:h,dropdownPrefixCls:p,loadData:g,expandTrigger:m,customSlots:v}=Km(),b=L(()=>p.value||o.prefixCls),y=ie([]),w=R=>{if(!g.value||o.searchValue)return;const F=_d(R,s.value,u.value).map(B=>{let{option:z}=B;return z}),N=F[F.length-1];if(N&&!mu(N,u.value)){const B=Ca(R);y.value=[...y.value,B],g.value(F)}};Ke(()=>{y.value.length&&y.value.forEach(R=>{const D=ooe(R),F=_d(D,s.value,u.value,!0).map(B=>{let{option:z}=B;return z}),N=F[F.length-1];(!N||N[u.value.children]||mu(N,u.value))&&(y.value=y.value.filter(B=>B!==R))})});const x=L(()=>new Set(Ll(l.value))),$=L(()=>new Set(Ll(c.value))),[S,_]=Moe(),P=R=>{_(R),w(R)},O=R=>{const{disabled:D}=R,F=mu(R,u.value);return!D&&(F||d.value||o.multiple)},T=function(R,D){let F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;f(R),!o.multiple&&(D||d.value&&(m.value==="hover"||F))&&o.toggleOpen(!1)},M=L(()=>o.searchValue?h.value:s.value),I=L(()=>{const R=[{options:M.value}];let D=M.value;for(let F=0;FW[u.value.value]===N),z=B==null?void 0:B[u.value.children];if(!(z!=null&&z.length))break;D=z,R.push({options:z})}return R});Ioe(e,M,u,S,P,(R,D)=>{O(D)&&T(R,mu(D,u.value),!0)});const E=R=>{R.preventDefault()};return Ze(()=>{ye(S,R=>{var D;for(let F=0;F{var R,D,F,N,B;const{notFoundContent:z=((R=i.notFoundContent)===null||R===void 0?void 0:R.call(i))||((F=(D=v.value).notFoundContent)===null||F===void 0?void 0:F.call(D)),multiple:W,toggleOpen:j}=o,U=!(!((B=(N=I.value[0])===null||N===void 0?void 0:N.options)===null||B===void 0)&&B.length),V=[{[u.value.value]:"__EMPTY__",[G4]:z,disabled:!0}],q=A(A({},n),{multiple:!U&&W,onSelect:T,onActive:P,onToggleOpen:j,checkedSet:x.value,halfCheckedSet:$.value,loadingKeys:y.value,isSelectable:O}),J=(U?[{options:V}]:I.value).map((Q,G)=>{const ee=S.value.slice(0,G),X=S.value[G];return C(qm,H(H({key:G},q),{},{prefixCls:b.value,options:Q.options,prevValuePath:ee,activeValue:X}),null)});return C("div",{class:[`${b.value}-menus`,{[`${b.value}-menu-empty`]:U,[`${b.value}-rtl`]:a.value}],onMousedown:E,ref:r},[J])}}});function Zm(t){const e=se(0),n=ie();return Ke(()=>{const i=new Map;let o=0;const r=t.value||{};for(const a in r)if(Object.prototype.hasOwnProperty.call(r,a)){const s=r[a],{level:l}=s;let c=i.get(l);c||(c=new Set,i.set(l,c)),c.add(s),o=Math.max(o,l)}e.value=o,n.value=i}),{maxLevel:e,levelEntities:n}}function Doe(){return A(A({},ht($m(),["tokenSeparators","mode","showSearch"])),{id:String,prefixCls:String,fieldNames:Fe(),children:Array,value:{type:[String,Number,Array]},defaultValue:{type:[String,Number,Array]},changeOnSelect:{type:Boolean,default:void 0},displayRender:Function,checkable:{type:Boolean,default:void 0},showCheckedStrategy:{type:String,default:F4},showSearch:{type:[Boolean,Object],default:void 0},searchValue:String,onSearch:Function,expandTrigger:String,options:Array,dropdownPrefixCls:String,loadData:Function,popupVisible:{type:Boolean,default:void 0},dropdownClassName:String,dropdownMenuColumnStyle:{type:Object,default:void 0},popupStyle:{type:Object,default:void 0},dropdownStyle:{type:Object,default:void 0},popupPlacement:String,placement:String,onPopupVisibleChange:Function,onDropdownVisibleChange:Function,expandIcon:Z.any,loadingIcon:Z.any})}function K4(){return A(A({},Doe()),{onChange:Function,customSlots:Object})}function Roe(t){return Array.isArray(t)&&Array.isArray(t[0])}function yP(t){return t?Roe(t)?t:(t.length===0?[]:[t]).map(e=>Array.isArray(e)?e:[e]):[]}const Loe=oe({compatConfig:{MODE:3},name:"Cascader",inheritAttrs:!1,props:ct(K4(),{}),setup(t,e){let{attrs:n,expose:i,slots:o}=e;const r=$1(Ue(t,"id")),a=L(()=>!!t.checkable),[s,l]=jt(t.defaultValue,{value:L(()=>t.value),postState:yP}),c=L(()=>roe(t.fieldNames)),u=L(()=>t.options||[]),d=xoe(u,c),f=G=>{const ee=d.value;return G.map(X=>{const{nodes:K}=ee[X];return K.map(te=>te[c.value.value])})},[h,p]=jt("",{value:L(()=>t.searchValue),postState:G=>G||""}),g=(G,ee)=>{p(G),ee.source!=="blur"&&t.onSearch&&t.onSearch(G)},{showSearch:m,searchConfig:v}=woe(Ue(t,"showSearch")),b=$oe(h,u,c,L(()=>t.dropdownPrefixCls||t.prefixCls),v,Ue(t,"changeOnSelect")),y=Aoe(u,c,s),[w,x,$]=[se([]),se([]),se([])],{maxLevel:S,levelEntities:_}=Zm(d);Ke(()=>{const[G,ee]=y.value;if(!a.value||!s.value.length){[w.value,x.value,$.value]=[G,[],ee];return}const X=Ll(G),K=d.value,{checkedKeys:te,halfCheckedKeys:ue}=fo(X,!0,K,S.value,_.value);[w.value,x.value,$.value]=[f(te),f(ue),ee]});const P=L(()=>{const G=Ll(w.value),ee=bP(G,d.value,t.showCheckedStrategy);return[...$.value,...f(ee)]}),O=Ooe(P,u,c,a,Ue(t,"displayRender")),T=G=>{if(l(G),t.onChange){const ee=yP(G),X=ee.map(ue=>_d(ue,u.value,c.value).map(ae=>ae.option)),K=a.value?ee:ee[0],te=a.value?X:X[0];t.onChange(K,te)}},M=G=>{if(p(""),!a.value)T(G);else{const ee=Ca(G),X=Ll(w.value),K=Ll(x.value),te=X.includes(ee),ue=$.value.some(ne=>Ca(ne)===ee);let ae=w.value,re=$.value;if(ue&&!te)re=$.value.filter(ne=>Ca(ne)!==ee);else{const ne=te?X.filter(pe=>pe!==ee):[...X,ee];let le;te?{checkedKeys:le}=fo(ne,{halfCheckedKeys:K},d.value,S.value,_.value):{checkedKeys:le}=fo(ne,!0,d.value,S.value,_.value);const he=bP(le,d.value,t.showCheckedStrategy);ae=f(he)}T([...re,...ae])}},I=(G,ee)=>{if(ee.type==="clear"){T([]);return}const{valueCells:X}=ee.values[0];M(X)},k=L(()=>t.open!==void 0?t.open:t.popupVisible),E=L(()=>t.dropdownStyle||t.popupStyle||{}),R=L(()=>t.placement||t.popupPlacement),D=G=>{var ee,X;(ee=t.onDropdownVisibleChange)===null||ee===void 0||ee.call(t,G),(X=t.onPopupVisibleChange)===null||X===void 0||X.call(t,G)},{changeOnSelect:F,checkable:N,dropdownPrefixCls:B,loadData:z,expandTrigger:W,expandIcon:j,loadingIcon:U,dropdownMenuColumnStyle:V,customSlots:q,dropdownClassName:Y}=uo(t);Eoe({options:u,fieldNames:c,values:w,halfValues:x,changeOnSelect:F,onSelect:M,checkable:N,searchOptions:b,dropdownPrefixCls:B,loadData:z,expandTrigger:W,expandIcon:j,loadingIcon:U,dropdownMenuColumnStyle:V,customSlots:q});const J=se();i({focus(){var G;(G=J.value)===null||G===void 0||G.focus()},blur(){var G;(G=J.value)===null||G===void 0||G.blur()},scrollTo(G){var ee;(ee=J.value)===null||ee===void 0||ee.scrollTo(G)}});const Q=L(()=>ht(t,["id","prefixCls","fieldNames","defaultValue","value","changeOnSelect","onChange","displayRender","checkable","searchValue","onSearch","showSearch","expandTrigger","options","dropdownPrefixCls","loadData","popupVisible","open","dropdownClassName","dropdownMenuColumnStyle","popupPlacement","placement","onDropdownVisibleChange","onPopupVisibleChange","expandIcon","loadingIcon","customSlots","showCheckedStrategy","children"]));return()=>{const G=!(h.value?b.value:u.value).length,{dropdownMatchSelectWidth:ee=!1}=t,X=h.value&&v.value.matchInputWidth||G?{}:{minWidth:"auto"};return C(S1,H(H(H({},Q.value),n),{},{ref:J,id:r,prefixCls:t.prefixCls,dropdownMatchSelectWidth:ee,dropdownStyle:A(A({},E.value),X),displayValues:O.value,onDisplayValuesChange:I,mode:a.value?"multiple":void 0,searchValue:h.value,onSearch:g,showSearch:m.value,OptionList:koe,emptyOptions:G,open:k.value,dropdownClassName:Y.value,placement:R.value,onDropdownVisibleChange:D,getRawInputElement:()=>{var K;return(K=o.default)===null||K===void 0?void 0:K.call(o)}}),o)}}});var Foe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};function xP(t){for(var e=1;eii()&&window.document.documentElement,q4=t=>{if(ii()&&window.document.documentElement){const e=Array.isArray(t)?t:[t],{documentElement:n}=window.document;return e.some(i=>i in n.style)}return!1},Boe=(t,e)=>{if(!q4(t))return!1;const n=document.createElement("div"),i=n.style[t];return n.style[t]=e,n.style[t]!==i};function WS(t,e){return!Array.isArray(t)&&e!==void 0?Boe(t,e):q4(t)}let Kf;const zoe=()=>{if(!U4())return!1;if(Kf!==void 0)return Kf;const t=document.createElement("div");return t.style.display="flex",t.style.flexDirection="column",t.style.rowGap="1px",t.appendChild(document.createElement("div")),t.appendChild(document.createElement("div")),document.body.appendChild(t),Kf=t.scrollHeight===1,document.body.removeChild(t),Kf},Z4=()=>{const t=ie(!1);return Ze(()=>{t.value=zoe()}),t},J4=Symbol("rowContextKey"),Hoe=t=>{ot(J4,t)},Woe=()=>qe(J4,{gutter:L(()=>{}),wrap:L(()=>{}),supportFlexGap:L(()=>{})}),joe=t=>{const{componentCls:e}=t;return{[e]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around ":{justifyContent:"space-around"},"&-space-evenly ":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},Voe=t=>{const{componentCls:e}=t;return{[e]:{position:"relative",maxWidth:"100%",minHeight:1}}},Xoe=(t,e)=>{const{componentCls:n,gridColumns:i}=t,o={};for(let r=i;r>=0;r--)r===0?(o[`${n}${e}-${r}`]={display:"none"},o[`${n}-push-${r}`]={insetInlineStart:"auto"},o[`${n}-pull-${r}`]={insetInlineEnd:"auto"},o[`${n}${e}-push-${r}`]={insetInlineStart:"auto"},o[`${n}${e}-pull-${r}`]={insetInlineEnd:"auto"},o[`${n}${e}-offset-${r}`]={marginInlineEnd:0},o[`${n}${e}-order-${r}`]={order:0}):(o[`${n}${e}-${r}`]={display:"block",flex:`0 0 ${r/i*100}%`,maxWidth:`${r/i*100}%`},o[`${n}${e}-push-${r}`]={insetInlineStart:`${r/i*100}%`},o[`${n}${e}-pull-${r}`]={insetInlineEnd:`${r/i*100}%`},o[`${n}${e}-offset-${r}`]={marginInlineStart:`${r/i*100}%`},o[`${n}${e}-order-${r}`]={order:r});return o},Yy=(t,e)=>Xoe(t,e),Yoe=(t,e,n)=>({[`@media (min-width: ${e}px)`]:A({},Yy(t,n))}),Goe=et("Grid",t=>[joe(t)]),Koe=et("Grid",t=>{const e=Ve(t,{gridColumns:24}),n={"-sm":e.screenSMMin,"-md":e.screenMDMin,"-lg":e.screenLGMin,"-xl":e.screenXLMin,"-xxl":e.screenXXLMin};return[Voe(e),Yy(e,""),Yy(e,"-xs"),Object.keys(n).map(i=>Yoe(e,n[i],i)).reduce((i,o)=>A(A({},i),o),{})]}),Uoe=()=>({align:Xe([String,Object]),justify:Xe([String,Object]),prefixCls:String,gutter:Xe([Number,Array,Object],0),wrap:{type:Boolean,default:void 0}}),jS=oe({compatConfig:{MODE:3},name:"ARow",inheritAttrs:!1,props:Uoe(),setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,direction:r}=Me("row",t),[a,s]=Goe(o);let l;const c=Y1(),u=se({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}),d=se({xs:!1,sm:!1,md:!1,lg:!1,xl:!1,xxl:!1}),f=y=>L(()=>{if(typeof t[y]=="string")return t[y];if(typeof t[y]!="object")return"";for(let w=0;w{l=c.value.subscribe(y=>{d.value=y;const w=t.gutter||0;(!Array.isArray(w)&&typeof w=="object"||Array.isArray(w)&&(typeof w[0]=="object"||typeof w[1]=="object"))&&(u.value=y)})}),at(()=>{c.value.unsubscribe(l)});const m=L(()=>{const y=[void 0,void 0],{gutter:w=0}=t;return(Array.isArray(w)?w:[w,void 0]).forEach(($,S)=>{if(typeof $=="object")for(let _=0;_t.wrap)});const v=L(()=>ce(o.value,{[`${o.value}-no-wrap`]:t.wrap===!1,[`${o.value}-${p.value}`]:p.value,[`${o.value}-${h.value}`]:h.value,[`${o.value}-rtl`]:r.value==="rtl"},i.class,s.value)),b=L(()=>{const y=m.value,w={},x=y[0]!=null&&y[0]>0?`${y[0]/-2}px`:void 0,$=y[1]!=null&&y[1]>0?`${y[1]/-2}px`:void 0;return x&&(w.marginLeft=x,w.marginRight=x),g.value?w.rowGap=`${y[1]}px`:$&&(w.marginTop=$,w.marginBottom=$),w});return()=>{var y;return a(C("div",H(H({},i),{},{class:v.value,style:A(A({},b.value),i.style)}),[(y=n.default)===null||y===void 0?void 0:y.call(n)]))}}});function ps(){return ps=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Eh(t,e,n){return Zoe()?Eh=Reflect.construct.bind():Eh=function(o,r,a){var s=[null];s.push.apply(s,r);var l=Function.bind.apply(o,s),c=new l;return a&&Pd(c,a.prototype),c},Eh.apply(null,arguments)}function Joe(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function Ky(t){var e=typeof Map=="function"?new Map:void 0;return Ky=function(i){if(i===null||!Joe(i))return i;if(typeof i!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(i))return e.get(i);e.set(i,o)}function o(){return Eh(i,arguments,Gy(this).constructor)}return o.prototype=Object.create(i.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),Pd(o,i)},Ky(t)}var Qoe=/%[sdj%]/g,ere=function(){};function Uy(t){if(!t||!t.length)return null;var e={};return t.forEach(function(n){var i=n.field;e[i]=e[i]||[],e[i].push(n)}),e}function Wi(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i=r)return s;switch(s){case"%s":return String(n[o++]);case"%d":return Number(n[o++]);case"%j":try{return JSON.stringify(n[o++])}catch{return"[Circular]"}break;default:return s}});return a}return t}function tre(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function In(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||tre(e)&&typeof t=="string"&&!t)}function nre(t,e,n){var i=[],o=0,r=t.length;function a(s){i.push.apply(i,s||[]),o++,o===r&&n(i)}t.forEach(function(s){e(s,a)})}function wP(t,e,n){var i=0,o=t.length;function r(a){if(a&&a.length){n(a);return}var s=i;i=i+1,s()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},mu={integer:function(e){return mu.number(e)&&parseInt(e,10)===e},float:function(e){return mu.number(e)&&!mu.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e=="number"},object:function(e){return typeof e=="object"&&!mu.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(AP.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(lre())},hex:function(e){return typeof e=="string"&&!!e.match(AP.hex)}},cre=function(e,n,i,o,r){if(e.required&&n===void 0){Q4(e,n,i,o,r);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],s=e.type;a.indexOf(s)>-1?mu[s](n)||o.push(Wi(r.messages.types[s],e.fullField,e.type)):s&&typeof n!==e.type&&o.push(Wi(r.messages.types[s],e.fullField,e.type))},ure=function(e,n,i,o,r){var a=typeof e.len=="number",s=typeof e.min=="number",l=typeof e.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=n,d=null,f=typeof n=="number",h=typeof n=="string",p=Array.isArray(n);if(f?d="number":h?d="string":p&&(d="array"),!d)return!1;p&&(u=n.length),h&&(u=n.replace(c,"_").length),a?u!==e.len&&o.push(Wi(r.messages[d].len,e.fullField,e.len)):s&&!l&&ue.max?o.push(Wi(r.messages[d].max,e.fullField,e.max)):s&&l&&(ue.max)&&o.push(Wi(r.messages[d].range,e.fullField,e.min,e.max))},gl="enum",dre=function(e,n,i,o,r){e[gl]=Array.isArray(e[gl])?e[gl]:[],e[gl].indexOf(n)===-1&&o.push(Wi(r.messages[gl],e.fullField,e[gl].join(", ")))},fre=function(e,n,i,o,r){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(n)||o.push(Wi(r.messages.pattern.mismatch,e.fullField,n,e.pattern));else if(typeof e.pattern=="string"){var a=new RegExp(e.pattern);a.test(n)||o.push(Wi(r.messages.pattern.mismatch,e.fullField,n,e.pattern))}}},kt={required:Q4,whitespace:sre,type:cre,range:ure,enum:dre,pattern:fre},hre=function(e,n,i,o,r){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(In(n,"string")&&!e.required)return i();kt.required(e,n,o,a,r,"string"),In(n,"string")||(kt.type(e,n,o,a,r),kt.range(e,n,o,a,r),kt.pattern(e,n,o,a,r),e.whitespace===!0&&kt.whitespace(e,n,o,a,r))}i(a)},pre=function(e,n,i,o,r){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(In(n)&&!e.required)return i();kt.required(e,n,o,a,r),n!==void 0&&kt.type(e,n,o,a,r)}i(a)},gre=function(e,n,i,o,r){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(n===""&&(n=void 0),In(n)&&!e.required)return i();kt.required(e,n,o,a,r),n!==void 0&&(kt.type(e,n,o,a,r),kt.range(e,n,o,a,r))}i(a)},mre=function(e,n,i,o,r){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(In(n)&&!e.required)return i();kt.required(e,n,o,a,r),n!==void 0&&kt.type(e,n,o,a,r)}i(a)},vre=function(e,n,i,o,r){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(In(n)&&!e.required)return i();kt.required(e,n,o,a,r),In(n)||kt.type(e,n,o,a,r)}i(a)},bre=function(e,n,i,o,r){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(In(n)&&!e.required)return i();kt.required(e,n,o,a,r),n!==void 0&&(kt.type(e,n,o,a,r),kt.range(e,n,o,a,r))}i(a)},yre=function(e,n,i,o,r){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(In(n)&&!e.required)return i();kt.required(e,n,o,a,r),n!==void 0&&(kt.type(e,n,o,a,r),kt.range(e,n,o,a,r))}i(a)},xre=function(e,n,i,o,r){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(n==null&&!e.required)return i();kt.required(e,n,o,a,r,"array"),n!=null&&(kt.type(e,n,o,a,r),kt.range(e,n,o,a,r))}i(a)},wre=function(e,n,i,o,r){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(In(n)&&!e.required)return i();kt.required(e,n,o,a,r),n!==void 0&&kt.type(e,n,o,a,r)}i(a)},Sre="enum",Cre=function(e,n,i,o,r){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(In(n)&&!e.required)return i();kt.required(e,n,o,a,r),n!==void 0&&kt[Sre](e,n,o,a,r)}i(a)},$re=function(e,n,i,o,r){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(In(n,"string")&&!e.required)return i();kt.required(e,n,o,a,r),In(n,"string")||kt.pattern(e,n,o,a,r)}i(a)},Are=function(e,n,i,o,r){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(In(n,"date")&&!e.required)return i();if(kt.required(e,n,o,a,r),!In(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),kt.type(e,l,o,a,r),l&&kt.range(e,l.getTime(),o,a,r)}}i(a)},_re=function(e,n,i,o,r){var a=[],s=Array.isArray(n)?"array":typeof n;kt.required(e,n,o,a,r,s),i(a)},Lb=function(e,n,i,o,r){var a=e.type,s=[],l=e.required||!e.required&&o.hasOwnProperty(e.field);if(l){if(In(n,a)&&!e.required)return i();kt.required(e,n,o,s,r,a),In(n,a)||kt.type(e,n,o,s,r)}i(s)},Pre=function(e,n,i,o,r){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(In(n)&&!e.required)return i();kt.required(e,n,o,a,r)}i(a)},zu={string:hre,method:pre,number:gre,boolean:mre,regexp:vre,integer:bre,float:yre,array:xre,object:wre,enum:Cre,pattern:$re,date:Are,url:Lb,hex:Lb,email:Lb,required:_re,any:Pre};function qy(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var Zy=qy(),af=function(){function t(n){this.rules=null,this._messages=Zy,this.define(n)}var e=t.prototype;return e.define=function(i){var o=this;if(!i)throw new Error("Cannot configure a schema with no rules");if(typeof i!="object"||Array.isArray(i))throw new Error("Rules must be an object");this.rules={},Object.keys(i).forEach(function(r){var a=i[r];o.rules[r]=Array.isArray(a)?a:[a]})},e.messages=function(i){return i&&(this._messages=$P(qy(),i)),this._messages},e.validate=function(i,o,r){var a=this;o===void 0&&(o={}),r===void 0&&(r=function(){});var s=i,l=o,c=r;if(typeof l=="function"&&(c=l,l={}),!this.rules||Object.keys(this.rules).length===0)return c&&c(null,s),Promise.resolve(s);function u(g){var m=[],v={};function b(w){if(Array.isArray(w)){var x;m=(x=m).concat.apply(x,w)}else m.push(w)}for(var y=0;y3&&arguments[3]!==void 0?arguments[3]:!1;return e.length&&i&&n===void 0&&!eL(t,e.slice(0,-1))?t:tL(t,e,n,i)}function Jy(t){return $a(t)}function Ore(t,e){return eL(t,e)}function Ere(t,e,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Tre(t,e,n,i)}function Mre(t,e){return t&&t.some(n=>kre(n,e))}function _P(t){return typeof t=="object"&&t!==null&&Object.getPrototypeOf(t)===Object.prototype}function nL(t,e){const n=Array.isArray(t)?[...t]:A({},t);return e&&Object.keys(e).forEach(i=>{const o=n[i],r=e[i],a=_P(o)&&_P(r);n[i]=a?nL(o,r||{}):r}),n}function Ire(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;inL(o,r),t)}function PP(t,e){let n={};return e.forEach(i=>{const o=Ore(t,i);n=Ere(n,i,o)}),n}function kre(t,e){return!t||!e||t.length!==e.length?!1:t.every((n,i)=>e[i]===n)}const Ri="'${name}' is not a valid ${type}",Zm={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:Ri,method:Ri,array:Ri,object:Ri,number:Ri,date:Ri,boolean:Ri,integer:Ri,float:Ri,regexp:Ri,email:Ri,url:Ri,hex:Ri},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}};var Jm=function(t,e,n,i){function o(r){return r instanceof n?r:new n(function(a){a(r)})}return new(n||(n=Promise))(function(r,a){function s(u){try{c(i.next(u))}catch(d){a(d)}}function l(u){try{c(i.throw(u))}catch(d){a(d)}}function c(u){u.done?r(u.value):o(u.value).then(s,l)}c((i=i.apply(t,e||[])).next())})};const Dre=af;function Rre(t,e){return t.replace(/\$\{\w+\}/g,n=>{const i=n.slice(2,-1);return e[i]})}function Qy(t,e,n,i,o){return Jm(this,void 0,void 0,function*(){const r=A({},n);delete r.ruleIndex,delete r.trigger;let a=null;r&&r.type==="array"&&r.defaultField&&(a=r.defaultField,delete r.defaultField);const s=new Dre({[t]:[r]}),l=Ire({},Zm,i.validateMessages);s.messages(l);let c=[];try{yield Promise.resolve(s.validate({[t]:e},A({},i)))}catch(f){f.errors?c=f.errors.map((h,p)=>{let{message:g}=h;return cn(g)?On(g,{key:`error_${p}`}):g}):(console.error(f),c=[l.default()])}if(!c.length&&a)return(yield Promise.all(e.map((h,p)=>Qy(`${t}.${p}`,h,a,i,o)))).reduce((h,p)=>[...h,...p],[]);const u=A(A(A({},n),{name:t,enum:(n.enum||[]).join(", ")}),o);return c.map(f=>typeof f=="string"?Rre(f,u):f)})}function iL(t,e,n,i,o,r){const a=t.join("."),s=n.map((c,u)=>{const d=c.validator,f=A(A({},c),{ruleIndex:u});return d&&(f.validator=(h,p,g)=>{let m=!1;const b=d(h,p,function(){for(var y=arguments.length,w=new Array(y),x=0;x{m||g(...w)})});m=b&&typeof b.then=="function"&&typeof b.catch=="function",m&&b.then(()=>{g()}).catch(y=>{g(y||" ")})}),f}).sort((c,u)=>{let{warningOnly:d,ruleIndex:f}=c,{warningOnly:h,ruleIndex:p}=u;return!!d==!!h?f-p:d?1:-1});let l;if(o===!0)l=new Promise((c,u)=>Jm(this,void 0,void 0,function*(){for(let d=0;dQy(a,e,u,i,r).then(d=>({errors:d,rule:u})));l=(o?Fre(c):Lre(c)).then(u=>Promise.reject(u))}return l.catch(c=>c),l}function Lre(t){return Jm(this,void 0,void 0,function*(){return Promise.all(t).then(e=>[].concat(...e))})}function Fre(t){return Jm(this,void 0,void 0,function*(){let e=0;return new Promise(n=>{t.forEach(i=>{i.then(o=>{o.errors.length&&n([o]),e+=1,e===t.length&&n([])})})})})}const oL=Symbol("formContextKey"),rL=t=>{ot(oL,t)},VS=()=>qe(oL,{name:L(()=>{}),labelAlign:L(()=>"right"),vertical:L(()=>!1),addField:(t,e)=>{},removeField:t=>{},model:L(()=>{}),rules:L(()=>{}),colon:L(()=>{}),labelWrap:L(()=>{}),labelCol:L(()=>{}),requiredMark:L(()=>!1),validateTrigger:L(()=>{}),onValidate:()=>{},validateMessages:L(()=>Zm)}),aL=Symbol("formItemPrefixContextKey"),Nre=t=>{ot(aL,t)},Bre=()=>qe(aL,{prefixCls:L(()=>"")});function zre(t){return typeof t=="number"?`${t} ${t} auto`:/^\d+(\.\d+)?(px|em|rem|%)$/.test(t)?`0 0 ${t}`:t}const Hre=()=>({span:[String,Number],order:[String,Number],offset:[String,Number],push:[String,Number],pull:[String,Number],xs:{type:[String,Number,Object],default:void 0},sm:{type:[String,Number,Object],default:void 0},md:{type:[String,Number,Object],default:void 0},lg:{type:[String,Number,Object],default:void 0},xl:{type:[String,Number,Object],default:void 0},xxl:{type:[String,Number,Object],default:void 0},prefixCls:String,flex:[String,Number]}),Wre=["xs","sm","md","lg","xl","xxl"],Qm=oe({compatConfig:{MODE:3},name:"ACol",inheritAttrs:!1,props:Hre(),setup(t,e){let{slots:n,attrs:i}=e;const{gutter:o,supportFlexGap:r,wrap:a}=Woe(),{prefixCls:s,direction:l}=Me("col",t),[c,u]=Koe(s),d=L(()=>{const{span:h,order:p,offset:g,push:m,pull:v}=t,b=s.value;let y={};return Wre.forEach(w=>{let x={};const $=t[w];typeof $=="number"?x.span=$:typeof $=="object"&&(x=$||{}),y=A(A({},y),{[`${b}-${w}-${x.span}`]:x.span!==void 0,[`${b}-${w}-order-${x.order}`]:x.order||x.order===0,[`${b}-${w}-offset-${x.offset}`]:x.offset||x.offset===0,[`${b}-${w}-push-${x.push}`]:x.push||x.push===0,[`${b}-${w}-pull-${x.pull}`]:x.pull||x.pull===0,[`${b}-rtl`]:l.value==="rtl"})}),ce(b,{[`${b}-${h}`]:h!==void 0,[`${b}-order-${p}`]:p,[`${b}-offset-${g}`]:g,[`${b}-push-${m}`]:m,[`${b}-pull-${v}`]:v},y,i.class,u.value)}),f=L(()=>{const{flex:h}=t,p=o.value,g={};if(p&&p[0]>0){const m=`${p[0]/2}px`;g.paddingLeft=m,g.paddingRight=m}if(p&&p[1]>0&&!r.value){const m=`${p[1]/2}px`;g.paddingTop=m,g.paddingBottom=m}return h&&(g.flex=zre(h),a.value===!1&&!g.minWidth&&(g.minWidth=0)),g});return()=>{var h;return c(C("div",H(H({},i),{},{class:d.value,style:[f.value,i.style]}),[(h=n.default)===null||h===void 0?void 0:h.call(n)]))}}});var jre={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"};function TP(t){for(var e=1;e{let{slots:n,emit:i,attrs:o}=e;var r,a,s,l,c;const{prefixCls:u,htmlFor:d,labelCol:f,labelAlign:h,colon:p,required:g,requiredMark:m}=A(A({},t),o),[v]=xo("Form"),b=(r=t.label)!==null&&r!==void 0?r:(a=n.label)===null||a===void 0?void 0:a.call(n);if(!b)return null;const{vertical:y,labelAlign:w,labelCol:x,labelWrap:$,colon:S}=VS(),_=f||(x==null?void 0:x.value)||{},P=h||(w==null?void 0:w.value),O=`${u}-item-label`,T=ce(O,P==="left"&&`${O}-left`,_.class,{[`${O}-wrap`]:!!$.value});let M=b;const I=p===!0||(S==null?void 0:S.value)!==!1&&p!==!1;if(I&&!y.value&&typeof b=="string"&&b.trim()!==""&&(M=b.replace(/[:|:]\s*$/,"")),t.tooltip||n.tooltip){const R=C("span",{class:`${u}-item-tooltip`},[C(Pi,{title:t.tooltip},{default:()=>[C(XS,null,null)]})]);M=C(Qe,null,[M,n.tooltip?(s=n.tooltip)===null||s===void 0?void 0:s.call(n,{class:`${u}-item-tooltip`}):R])}m==="optional"&&!g&&(M=C(Qe,null,[M,C("span",{class:`${u}-item-optional`},[((l=v.value)===null||l===void 0?void 0:l.optional)||((c=bi.Form)===null||c===void 0?void 0:c.optional)])]));const E=ce({[`${u}-item-required`]:g,[`${u}-item-required-mark-optional`]:m==="optional",[`${u}-item-no-colon`]:!I});return C(Qm,H(H({},_),{},{class:T}),{default:()=>[C("label",{for:d,class:E,title:typeof b=="string"?b:"",onClick:R=>i("click",R)},[M])]})};YS.displayName="FormItemLabel";YS.inheritAttrs=!1;const Xre=t=>{const{componentCls:e}=t,n=`${e}-show-help`,i=`${e}-show-help-item`;return{[n]:{transition:`opacity ${t.motionDurationSlow} ${t.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[i]:{overflow:"hidden",transition:`height ${t.motionDurationSlow} ${t.motionEaseInOut}, +`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),r=new RegExp("(?:^"+n+"$)|(?:^"+o+"$)"),a=new RegExp("^"+n+"$"),s=new RegExp("^"+o+"$"),l=function(w){return w&&w.exact?r:new RegExp("(?:"+e(w)+n+e(w)+")|(?:"+e(w)+o+e(w)+")","g")};l.v4=function(y){return y&&y.exact?a:new RegExp(""+e(y)+n+e(y),"g")},l.v6=function(y){return y&&y.exact?s:new RegExp(""+e(y)+o+e(y),"g")};var c="(?:(?:[a-z]+:)?//)",u="(?:\\S+(?::\\S*)?@)?",d=l.v4().source,f=l.v6().source,h="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",p="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",g="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",m="(?::\\d{2,5})?",v='(?:[/?#][^\\s"]*)?',b="(?:"+c+"|www\\.)"+u+"(?:localhost|"+d+"|"+f+"|"+h+p+g+")"+m+v;return Uf=new RegExp("(?:^"+b+"$)","i"),Uf},AP={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},vu={integer:function(e){return vu.number(e)&&parseInt(e,10)===e},float:function(e){return vu.number(e)&&!vu.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e=="number"},object:function(e){return typeof e=="object"&&!vu.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(AP.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(lre())},hex:function(e){return typeof e=="string"&&!!e.match(AP.hex)}},cre=function(e,n,i,o,r){if(e.required&&n===void 0){Q4(e,n,i,o,r);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],s=e.type;a.indexOf(s)>-1?vu[s](n)||o.push(Wi(r.messages.types[s],e.fullField,e.type)):s&&typeof n!==e.type&&o.push(Wi(r.messages.types[s],e.fullField,e.type))},ure=function(e,n,i,o,r){var a=typeof e.len=="number",s=typeof e.min=="number",l=typeof e.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=n,d=null,f=typeof n=="number",h=typeof n=="string",p=Array.isArray(n);if(f?d="number":h?d="string":p&&(d="array"),!d)return!1;p&&(u=n.length),h&&(u=n.replace(c,"_").length),a?u!==e.len&&o.push(Wi(r.messages[d].len,e.fullField,e.len)):s&&!l&&ue.max?o.push(Wi(r.messages[d].max,e.fullField,e.max)):s&&l&&(ue.max)&&o.push(Wi(r.messages[d].range,e.fullField,e.min,e.max))},gl="enum",dre=function(e,n,i,o,r){e[gl]=Array.isArray(e[gl])?e[gl]:[],e[gl].indexOf(n)===-1&&o.push(Wi(r.messages[gl],e.fullField,e[gl].join(", ")))},fre=function(e,n,i,o,r){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(n)||o.push(Wi(r.messages.pattern.mismatch,e.fullField,n,e.pattern));else if(typeof e.pattern=="string"){var a=new RegExp(e.pattern);a.test(n)||o.push(Wi(r.messages.pattern.mismatch,e.fullField,n,e.pattern))}}},kt={required:Q4,whitespace:sre,type:cre,range:ure,enum:dre,pattern:fre},hre=function(e,n,i,o,r){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(In(n,"string")&&!e.required)return i();kt.required(e,n,o,a,r,"string"),In(n,"string")||(kt.type(e,n,o,a,r),kt.range(e,n,o,a,r),kt.pattern(e,n,o,a,r),e.whitespace===!0&&kt.whitespace(e,n,o,a,r))}i(a)},pre=function(e,n,i,o,r){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(In(n)&&!e.required)return i();kt.required(e,n,o,a,r),n!==void 0&&kt.type(e,n,o,a,r)}i(a)},gre=function(e,n,i,o,r){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(n===""&&(n=void 0),In(n)&&!e.required)return i();kt.required(e,n,o,a,r),n!==void 0&&(kt.type(e,n,o,a,r),kt.range(e,n,o,a,r))}i(a)},mre=function(e,n,i,o,r){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(In(n)&&!e.required)return i();kt.required(e,n,o,a,r),n!==void 0&&kt.type(e,n,o,a,r)}i(a)},vre=function(e,n,i,o,r){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(In(n)&&!e.required)return i();kt.required(e,n,o,a,r),In(n)||kt.type(e,n,o,a,r)}i(a)},bre=function(e,n,i,o,r){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(In(n)&&!e.required)return i();kt.required(e,n,o,a,r),n!==void 0&&(kt.type(e,n,o,a,r),kt.range(e,n,o,a,r))}i(a)},yre=function(e,n,i,o,r){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(In(n)&&!e.required)return i();kt.required(e,n,o,a,r),n!==void 0&&(kt.type(e,n,o,a,r),kt.range(e,n,o,a,r))}i(a)},xre=function(e,n,i,o,r){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(n==null&&!e.required)return i();kt.required(e,n,o,a,r,"array"),n!=null&&(kt.type(e,n,o,a,r),kt.range(e,n,o,a,r))}i(a)},wre=function(e,n,i,o,r){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(In(n)&&!e.required)return i();kt.required(e,n,o,a,r),n!==void 0&&kt.type(e,n,o,a,r)}i(a)},Sre="enum",Cre=function(e,n,i,o,r){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(In(n)&&!e.required)return i();kt.required(e,n,o,a,r),n!==void 0&&kt[Sre](e,n,o,a,r)}i(a)},$re=function(e,n,i,o,r){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(In(n,"string")&&!e.required)return i();kt.required(e,n,o,a,r),In(n,"string")||kt.pattern(e,n,o,a,r)}i(a)},Are=function(e,n,i,o,r){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(In(n,"date")&&!e.required)return i();if(kt.required(e,n,o,a,r),!In(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),kt.type(e,l,o,a,r),l&&kt.range(e,l.getTime(),o,a,r)}}i(a)},_re=function(e,n,i,o,r){var a=[],s=Array.isArray(n)?"array":typeof n;kt.required(e,n,o,a,r,s),i(a)},Lb=function(e,n,i,o,r){var a=e.type,s=[],l=e.required||!e.required&&o.hasOwnProperty(e.field);if(l){if(In(n,a)&&!e.required)return i();kt.required(e,n,o,s,r,a),In(n,a)||kt.type(e,n,o,s,r)}i(s)},Pre=function(e,n,i,o,r){var a=[],s=e.required||!e.required&&o.hasOwnProperty(e.field);if(s){if(In(n)&&!e.required)return i();kt.required(e,n,o,a,r)}i(a)},Hu={string:hre,method:pre,number:gre,boolean:mre,regexp:vre,integer:bre,float:yre,array:xre,object:wre,enum:Cre,pattern:$re,date:Are,url:Lb,hex:Lb,email:Lb,required:_re,any:Pre};function qy(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var Zy=qy(),sf=function(){function t(n){this.rules=null,this._messages=Zy,this.define(n)}var e=t.prototype;return e.define=function(i){var o=this;if(!i)throw new Error("Cannot configure a schema with no rules");if(typeof i!="object"||Array.isArray(i))throw new Error("Rules must be an object");this.rules={},Object.keys(i).forEach(function(r){var a=i[r];o.rules[r]=Array.isArray(a)?a:[a]})},e.messages=function(i){return i&&(this._messages=$P(qy(),i)),this._messages},e.validate=function(i,o,r){var a=this;o===void 0&&(o={}),r===void 0&&(r=function(){});var s=i,l=o,c=r;if(typeof l=="function"&&(c=l,l={}),!this.rules||Object.keys(this.rules).length===0)return c&&c(null,s),Promise.resolve(s);function u(g){var m=[],v={};function b(w){if(Array.isArray(w)){var x;m=(x=m).concat.apply(x,w)}else m.push(w)}for(var y=0;y3&&arguments[3]!==void 0?arguments[3]:!1;return e.length&&i&&n===void 0&&!eL(t,e.slice(0,-1))?t:tL(t,e,n,i)}function Jy(t){return $a(t)}function Ore(t,e){return eL(t,e)}function Ere(t,e,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Tre(t,e,n,i)}function Mre(t,e){return t&&t.some(n=>kre(n,e))}function _P(t){return typeof t=="object"&&t!==null&&Object.getPrototypeOf(t)===Object.prototype}function nL(t,e){const n=Array.isArray(t)?[...t]:A({},t);return e&&Object.keys(e).forEach(i=>{const o=n[i],r=e[i],a=_P(o)&&_P(r);n[i]=a?nL(o,r||{}):r}),n}function Ire(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;inL(o,r),t)}function PP(t,e){let n={};return e.forEach(i=>{const o=Ore(t,i);n=Ere(n,i,o)}),n}function kre(t,e){return!t||!e||t.length!==e.length?!1:t.every((n,i)=>e[i]===n)}const Ri="'${name}' is not a valid ${type}",Jm={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:Ri,method:Ri,array:Ri,object:Ri,number:Ri,date:Ri,boolean:Ri,integer:Ri,float:Ri,regexp:Ri,email:Ri,url:Ri,hex:Ri},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}};var Qm=function(t,e,n,i){function o(r){return r instanceof n?r:new n(function(a){a(r)})}return new(n||(n=Promise))(function(r,a){function s(u){try{c(i.next(u))}catch(d){a(d)}}function l(u){try{c(i.throw(u))}catch(d){a(d)}}function c(u){u.done?r(u.value):o(u.value).then(s,l)}c((i=i.apply(t,e||[])).next())})};const Dre=sf;function Rre(t,e){return t.replace(/\$\{\w+\}/g,n=>{const i=n.slice(2,-1);return e[i]})}function Qy(t,e,n,i,o){return Qm(this,void 0,void 0,function*(){const r=A({},n);delete r.ruleIndex,delete r.trigger;let a=null;r&&r.type==="array"&&r.defaultField&&(a=r.defaultField,delete r.defaultField);const s=new Dre({[t]:[r]}),l=Ire({},Jm,i.validateMessages);s.messages(l);let c=[];try{yield Promise.resolve(s.validate({[t]:e},A({},i)))}catch(f){f.errors?c=f.errors.map((h,p)=>{let{message:g}=h;return cn(g)?On(g,{key:`error_${p}`}):g}):(console.error(f),c=[l.default()])}if(!c.length&&a)return(yield Promise.all(e.map((h,p)=>Qy(`${t}.${p}`,h,a,i,o)))).reduce((h,p)=>[...h,...p],[]);const u=A(A(A({},n),{name:t,enum:(n.enum||[]).join(", ")}),o);return c.map(f=>typeof f=="string"?Rre(f,u):f)})}function iL(t,e,n,i,o,r){const a=t.join("."),s=n.map((c,u)=>{const d=c.validator,f=A(A({},c),{ruleIndex:u});return d&&(f.validator=(h,p,g)=>{let m=!1;const b=d(h,p,function(){for(var y=arguments.length,w=new Array(y),x=0;x{m||g(...w)})});m=b&&typeof b.then=="function"&&typeof b.catch=="function",m&&b.then(()=>{g()}).catch(y=>{g(y||" ")})}),f}).sort((c,u)=>{let{warningOnly:d,ruleIndex:f}=c,{warningOnly:h,ruleIndex:p}=u;return!!d==!!h?f-p:d?1:-1});let l;if(o===!0)l=new Promise((c,u)=>Qm(this,void 0,void 0,function*(){for(let d=0;dQy(a,e,u,i,r).then(d=>({errors:d,rule:u})));l=(o?Fre(c):Lre(c)).then(u=>Promise.reject(u))}return l.catch(c=>c),l}function Lre(t){return Qm(this,void 0,void 0,function*(){return Promise.all(t).then(e=>[].concat(...e))})}function Fre(t){return Qm(this,void 0,void 0,function*(){let e=0;return new Promise(n=>{t.forEach(i=>{i.then(o=>{o.errors.length&&n([o]),e+=1,e===t.length&&n([])})})})})}const oL=Symbol("formContextKey"),rL=t=>{ot(oL,t)},VS=()=>qe(oL,{name:L(()=>{}),labelAlign:L(()=>"right"),vertical:L(()=>!1),addField:(t,e)=>{},removeField:t=>{},model:L(()=>{}),rules:L(()=>{}),colon:L(()=>{}),labelWrap:L(()=>{}),labelCol:L(()=>{}),requiredMark:L(()=>!1),validateTrigger:L(()=>{}),onValidate:()=>{},validateMessages:L(()=>Jm)}),aL=Symbol("formItemPrefixContextKey"),Nre=t=>{ot(aL,t)},Bre=()=>qe(aL,{prefixCls:L(()=>"")});function zre(t){return typeof t=="number"?`${t} ${t} auto`:/^\d+(\.\d+)?(px|em|rem|%)$/.test(t)?`0 0 ${t}`:t}const Hre=()=>({span:[String,Number],order:[String,Number],offset:[String,Number],push:[String,Number],pull:[String,Number],xs:{type:[String,Number,Object],default:void 0},sm:{type:[String,Number,Object],default:void 0},md:{type:[String,Number,Object],default:void 0},lg:{type:[String,Number,Object],default:void 0},xl:{type:[String,Number,Object],default:void 0},xxl:{type:[String,Number,Object],default:void 0},prefixCls:String,flex:[String,Number]}),Wre=["xs","sm","md","lg","xl","xxl"],ev=oe({compatConfig:{MODE:3},name:"ACol",inheritAttrs:!1,props:Hre(),setup(t,e){let{slots:n,attrs:i}=e;const{gutter:o,supportFlexGap:r,wrap:a}=Woe(),{prefixCls:s,direction:l}=Me("col",t),[c,u]=Koe(s),d=L(()=>{const{span:h,order:p,offset:g,push:m,pull:v}=t,b=s.value;let y={};return Wre.forEach(w=>{let x={};const $=t[w];typeof $=="number"?x.span=$:typeof $=="object"&&(x=$||{}),y=A(A({},y),{[`${b}-${w}-${x.span}`]:x.span!==void 0,[`${b}-${w}-order-${x.order}`]:x.order||x.order===0,[`${b}-${w}-offset-${x.offset}`]:x.offset||x.offset===0,[`${b}-${w}-push-${x.push}`]:x.push||x.push===0,[`${b}-${w}-pull-${x.pull}`]:x.pull||x.pull===0,[`${b}-rtl`]:l.value==="rtl"})}),ce(b,{[`${b}-${h}`]:h!==void 0,[`${b}-order-${p}`]:p,[`${b}-offset-${g}`]:g,[`${b}-push-${m}`]:m,[`${b}-pull-${v}`]:v},y,i.class,u.value)}),f=L(()=>{const{flex:h}=t,p=o.value,g={};if(p&&p[0]>0){const m=`${p[0]/2}px`;g.paddingLeft=m,g.paddingRight=m}if(p&&p[1]>0&&!r.value){const m=`${p[1]/2}px`;g.paddingTop=m,g.paddingBottom=m}return h&&(g.flex=zre(h),a.value===!1&&!g.minWidth&&(g.minWidth=0)),g});return()=>{var h;return c(C("div",H(H({},i),{},{class:d.value,style:[f.value,i.style]}),[(h=n.default)===null||h===void 0?void 0:h.call(n)]))}}});var jre={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"};function TP(t){for(var e=1;e{let{slots:n,emit:i,attrs:o}=e;var r,a,s,l,c;const{prefixCls:u,htmlFor:d,labelCol:f,labelAlign:h,colon:p,required:g,requiredMark:m}=A(A({},t),o),[v]=xo("Form"),b=(r=t.label)!==null&&r!==void 0?r:(a=n.label)===null||a===void 0?void 0:a.call(n);if(!b)return null;const{vertical:y,labelAlign:w,labelCol:x,labelWrap:$,colon:S}=VS(),_=f||(x==null?void 0:x.value)||{},P=h||(w==null?void 0:w.value),O=`${u}-item-label`,T=ce(O,P==="left"&&`${O}-left`,_.class,{[`${O}-wrap`]:!!$.value});let M=b;const I=p===!0||(S==null?void 0:S.value)!==!1&&p!==!1;if(I&&!y.value&&typeof b=="string"&&b.trim()!==""&&(M=b.replace(/[:|:]\s*$/,"")),t.tooltip||n.tooltip){const R=C("span",{class:`${u}-item-tooltip`},[C(Pi,{title:t.tooltip},{default:()=>[C(XS,null,null)]})]);M=C(Qe,null,[M,n.tooltip?(s=n.tooltip)===null||s===void 0?void 0:s.call(n,{class:`${u}-item-tooltip`}):R])}m==="optional"&&!g&&(M=C(Qe,null,[M,C("span",{class:`${u}-item-optional`},[((l=v.value)===null||l===void 0?void 0:l.optional)||((c=bi.Form)===null||c===void 0?void 0:c.optional)])]));const E=ce({[`${u}-item-required`]:g,[`${u}-item-required-mark-optional`]:m==="optional",[`${u}-item-no-colon`]:!I});return C(ev,H(H({},_),{},{class:T}),{default:()=>[C("label",{for:d,class:E,title:typeof b=="string"?b:"",onClick:R=>i("click",R)},[M])]})};YS.displayName="FormItemLabel";YS.inheritAttrs=!1;const Xre=t=>{const{componentCls:e}=t,n=`${e}-show-help`,i=`${e}-show-help-item`;return{[n]:{transition:`opacity ${t.motionDurationSlow} ${t.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[i]:{overflow:"hidden",transition:`height ${t.motionDurationSlow} ${t.motionEaseInOut}, opacity ${t.motionDurationSlow} ${t.motionEaseInOut}, transform ${t.motionDurationSlow} ${t.motionEaseInOut} !important`,[`&${i}-appear, &${i}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${i}-leave-active`]:{transform:"translateY(-5px)"}}}}},Yre=t=>({legend:{display:"block",width:"100%",marginBottom:t.marginLG,padding:0,color:t.colorTextDescription,fontSize:t.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${t.lineWidth}px ${t.lineType} ${t.colorBorder}`},label:{fontSize:t.fontSize},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${t.controlOutlineWidth}px ${t.controlOutline}`},output:{display:"block",paddingTop:15,color:t.colorText,fontSize:t.fontSize,lineHeight:t.lineHeight}}),OP=(t,e)=>{const{formItemCls:n}=t;return{[n]:{[`${n}-label > label`]:{height:e},[`${n}-control-input`]:{minHeight:e}}}},Gre=t=>{const{componentCls:e}=t;return{[t.componentCls]:A(A(A({},rt(t)),Yre(t)),{[`${e}-text`]:{display:"inline-block",paddingInlineEnd:t.paddingSM},"&-small":A({},OP(t,t.controlHeightSM)),"&-large":A({},OP(t,t.controlHeightLG))})}},Kre=t=>{const{formItemCls:e,iconCls:n,componentCls:i,rootPrefixCls:o}=t;return{[e]:A(A({},rt(t)),{marginBottom:t.marginLG,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden, &-hidden.${o}-row`]:{display:"none"},"&-has-warning":{[`${e}-split`]:{color:t.colorError}},"&-has-error":{[`${e}-split`]:{color:t.colorWarning}},[`${e}-label`]:{display:"inline-block",flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:`${t.lineHeight} - 0.25em`,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:t.controlHeight,color:t.colorTextHeading,fontSize:t.fontSize,[`> ${n}`]:{fontSize:t.fontSize,verticalAlign:"top"},[`&${e}-required:not(${e}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:t.marginXXS,color:t.colorError,fontSize:t.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${i}-hide-required-mark &`]:{display:"none"}},[`${e}-optional`]:{display:"inline-block",marginInlineStart:t.marginXXS,color:t.colorTextDescription,[`${i}-hide-required-mark &`]:{display:"none"}},[`${e}-tooltip`]:{color:t.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:t.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:t.marginXXS/2,marginInlineEnd:t.marginXS},[`&${e}-no-colon::after`]:{content:'" "'}}},[`${e}-control`]:{display:"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${o}-col-'"]):not([class*="' ${o}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:t.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[e]:{"&-explain, &-extra":{clear:"both",color:t.colorTextDescription,fontSize:t.fontSize,lineHeight:t.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:t.controlHeightSM,transition:`color ${t.motionDurationMid} ${t.motionEaseOut}`},"&-explain":{"&-error":{color:t.colorError},"&-warning":{color:t.colorWarning}}},[`&-with-help ${e}-explain`]:{height:"auto",opacity:1},[`${e}-feedback-icon`]:{fontSize:t.fontSize,textAlign:"center",visibility:"visible",animationName:V1,animationDuration:t.motionDurationMid,animationTimingFunction:t.motionEaseOutBack,pointerEvents:"none","&-success":{color:t.colorSuccess},"&-error":{color:t.colorError},"&-warning":{color:t.colorWarning},"&-validating":{color:t.colorPrimary}}})}},Ure=t=>{const{componentCls:e,formItemCls:n,rootPrefixCls:i}=t;return{[`${e}-horizontal`]:{[`${n}-label`]:{flexGrow:0},[`${n}-control`]:{flex:"1 1 0",minWidth:0},[`${n}-label.${i}-col-24 + ${n}-control`]:{minWidth:"unset"}}}},qre=t=>{const{componentCls:e,formItemCls:n}=t;return{[`${e}-inline`]:{display:"flex",flexWrap:"wrap",[n]:{flex:"none",flexWrap:"nowrap",marginInlineEnd:t.margin,marginBottom:0,"&-with-help":{marginBottom:t.marginLG},[`> ${n}-label, > ${n}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${n}-label`]:{flex:"none"},[`${e}-text`]:{display:"inline-block"},[`${n}-has-feedback`]:{display:"inline-block"}}}}},_l=t=>({margin:0,padding:`0 0 ${t.paddingXS}px`,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{display:"none"}}}),Zre=t=>{const{componentCls:e,formItemCls:n}=t;return{[`${n} ${n}-label`]:_l(t),[e]:{[n]:{flexWrap:"wrap",[`${n}-label, ${n}-control`]:{flex:"0 0 100%",maxWidth:"100%"}}}}},Jre=t=>{const{componentCls:e,formItemCls:n,rootPrefixCls:i}=t;return{[`${e}-vertical`]:{[n]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${e}-item-control`]:{width:"100%"}}},[`${e}-vertical ${n}-label, .${i}-col-24${n}-label, - .${i}-col-xl-24${n}-label`]:_l(t),[`@media (max-width: ${t.screenXSMax}px)`]:[Zre(t),{[e]:{[`.${i}-col-xs-24${n}-label`]:_l(t)}}],[`@media (max-width: ${t.screenSMMax}px)`]:{[e]:{[`.${i}-col-sm-24${n}-label`]:_l(t)}},[`@media (max-width: ${t.screenMDMax}px)`]:{[e]:{[`.${i}-col-md-24${n}-label`]:_l(t)}},[`@media (max-width: ${t.screenLGMax}px)`]:{[e]:{[`.${i}-col-lg-24${n}-label`]:_l(t)}}}},GS=et("Form",(t,e)=>{let{rootPrefixCls:n}=e;const i=Ve(t,{formItemCls:`${t.componentCls}-item`,rootPrefixCls:n});return[Gre(i),Kre(i),Xre(i),Ure(i),qre(i),Jre(i),Ud(i),V1]}),Qre=oe({compatConfig:{MODE:3},name:"ErrorList",inheritAttrs:!1,props:["errors","help","onErrorVisibleChanged","helpStatus","warnings"],setup(t,e){let{attrs:n}=e;const{prefixCls:i,status:o}=Bre(),r=L(()=>`${i.value}-item-explain`),a=L(()=>!!(t.errors&&t.errors.length)),s=se(o.value),[,l]=GS(i);return ye([a,o],()=>{a.value&&(s.value=o.value)}),()=>{var c,u;const d=Zd(`${i.value}-show-help-item`),f=wm(`${i.value}-show-help-item`,d);return f.role="alert",f.class=[l.value,r.value,n.class,`${i.value}-show-help`],C(En,H(H({},yo(`${i.value}-show-help`)),{},{onAfterEnter:()=>t.onErrorVisibleChanged(!0),onAfterLeave:()=>t.onErrorVisibleChanged(!1)}),{default:()=>[ni(C(tm,H(H({},f),{},{tag:"div"}),{default:()=>[(u=t.errors)===null||u===void 0?void 0:u.map((h,p)=>C("div",{key:p,class:s.value?`${r.value}-${s.value}`:""},[h]))]}),[[vi,!!(!((c=t.errors)===null||c===void 0)&&c.length)]])]})}}}),eae=oe({compatConfig:{MODE:3},slots:Object,inheritAttrs:!1,props:["prefixCls","errors","hasFeedback","onDomErrorVisibleChange","wrapperCol","help","extra","status","marginBottom","onErrorVisibleChanged"],setup(t,e){let{slots:n}=e;const i=VS(),{wrapperCol:o}=i,r=A({},i);return delete r.labelCol,delete r.wrapperCol,rL(r),Nre({prefixCls:L(()=>t.prefixCls),status:L(()=>t.status)}),()=>{var a,s,l;const{prefixCls:c,wrapperCol:u,marginBottom:d,onErrorVisibleChanged:f,help:h=(a=n.help)===null||a===void 0?void 0:a.call(n),errors:p=Kt((s=n.errors)===null||s===void 0?void 0:s.call(n)),extra:g=(l=n.extra)===null||l===void 0?void 0:l.call(n)}=t,m=`${c}-item`,v=u||(o==null?void 0:o.value)||{},b=ce(`${m}-control`,v.class);return C(Qm,H(H({},v),{},{class:b}),{default:()=>{var y;return C(Qe,null,[C("div",{class:`${m}-control-input`},[C("div",{class:`${m}-control-input-content`},[(y=n.default)===null||y===void 0?void 0:y.call(n)])]),d!==null||p.length?C("div",{style:{display:"flex",flexWrap:"nowrap"}},[C(Qre,{errors:p,help:h,class:`${m}-explain-connected`,onErrorVisibleChanged:f},null),!!d&&C("div",{style:{width:0,height:`${d}px`}},null)]):null,g?C("div",{class:`${m}-extra`},[g]):null])}})}}});function tae(t){const e=ie(t.value.slice());let n=null;return Ke(()=>{clearTimeout(n),n=setTimeout(()=>{e.value=t.value},t.value.length?0:10)}),e}Wn("success","warning","error","validating","");const nae={success:Ho,warning:Wo,error:si,validating:yi};function Fb(t,e,n){let i=t;const o=e;let r=0;try{for(let a=o.length;r({htmlFor:String,prefixCls:String,label:Z.any,help:Z.any,extra:Z.any,labelCol:{type:Object},wrapperCol:{type:Object},hasFeedback:{type:Boolean,default:!1},colon:{type:Boolean,default:void 0},labelAlign:String,prop:{type:[String,Number,Array]},name:{type:[String,Number,Array]},rules:[Array,Object],autoLink:{type:Boolean,default:!0},required:{type:Boolean,default:void 0},validateFirst:{type:Boolean,default:void 0},validateStatus:Z.oneOf(Wn("","success","warning","error","validating")),validateTrigger:{type:[String,Array]},messageVariables:{type:Object},hidden:Boolean,noStyle:Boolean,tooltip:String});let oae=0;const rae="form_item",sL=oe({compatConfig:{MODE:3},name:"AFormItem",inheritAttrs:!1,__ANT_NEW_FORM_ITEM:!0,props:iae(),slots:Object,setup(t,e){let{slots:n,attrs:i,expose:o}=e;t.prop;const r=`form-item-${++oae}`,{prefixCls:a}=Me("form",t),[s,l]=GS(a),c=ie(),u=VS(),d=L(()=>t.name||t.prop),f=ie([]),h=ie(!1),p=ie(),g=L(()=>{const V=d.value;return Jy(V)}),m=L(()=>{if(g.value.length){const V=u.name.value,q=g.value.join("_");return V?`${V}_${q}`:`${rae}_${q}`}else return}),v=()=>{const V=u.model.value;if(!(!V||!d.value))return Fb(V,g.value,!0).v},b=L(()=>v()),y=ie(Sh(b.value)),w=L(()=>{let V=t.validateTrigger!==void 0?t.validateTrigger:u.validateTrigger.value;return V=V===void 0?"change":V,$a(V)}),x=L(()=>{let V=u.rules.value;const q=t.rules,Y=t.required!==void 0?{required:!!t.required,trigger:w.value}:[],J=Fb(V,g.value);V=V?J.o[J.k]||J.v:[];const Q=[].concat(q||V||[]);return Kq(Q,G=>G.required)?Q:Q.concat(Y)}),$=L(()=>{const V=x.value;let q=!1;return V&&V.length&&V.every(Y=>Y.required?(q=!0,!1):!0),q||t.required}),S=ie();Ke(()=>{S.value=t.validateStatus});const _=L(()=>{let V={};return typeof t.label=="string"?V.label=t.label:t.name&&(V.label=String(t.name)),t.messageVariables&&(V=A(A({},V),t.messageVariables)),V}),P=V=>{if(g.value.length===0)return;const{validateFirst:q=!1}=t,{triggerName:Y}=V||{};let J=x.value;if(Y&&(J=J.filter(G=>{const{trigger:ee}=G;return!ee&&!w.value.length?!0:$a(ee||w.value).includes(Y)})),!J.length)return Promise.resolve();const Q=iL(g.value,b.value,J,A({validateMessages:u.validateMessages.value},V),q,_.value);return S.value="validating",f.value=[],Q.catch(G=>G).then(function(){let G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(S.value==="validating"){const ee=G.filter(X=>X&&X.errors.length);S.value=ee.length?"error":"success",f.value=ee.map(X=>X.errors),u.onValidate(d.value,!f.value.length,f.value.length?dt(f.value[0]):null)}}),Q},O=()=>{P({triggerName:"blur"})},T=()=>{if(h.value){h.value=!1;return}P({triggerName:"change"})},M=()=>{S.value=t.validateStatus,h.value=!1,f.value=[]},I=()=>{var V;S.value=t.validateStatus,h.value=!0,f.value=[];const q=u.model.value||{},Y=b.value,J=Fb(q,g.value,!0);Array.isArray(Y)?J.o[J.k]=[].concat((V=y.value)!==null&&V!==void 0?V:[]):J.o[J.k]=y.value,pt(()=>{h.value=!1})},k=L(()=>t.htmlFor===void 0?m.value:t.htmlFor),E=()=>{const V=k.value;if(!V||!p.value)return;const q=p.value.$el.querySelector(`[id="${V}"]`);q&&q.focus&&q.focus()};o({onFieldBlur:O,onFieldChange:T,clearValidate:M,resetField:I}),nK({id:m,onFieldBlur:()=>{t.autoLink&&O()},onFieldChange:()=>{t.autoLink&&T()},clearValidate:M},L(()=>!!(t.autoLink&&u.model.value&&d.value)));let R=!1;ye(d,V=>{V?R||(R=!0,u.addField(r,{fieldValue:b,fieldId:m,fieldName:d,resetField:I,clearValidate:M,namePath:g,validateRules:P,rules:x})):(R=!1,u.removeField(r))},{immediate:!0}),at(()=>{u.removeField(r)});const D=tae(f),F=L(()=>t.validateStatus!==void 0?t.validateStatus:D.value.length?"error":S.value),N=L(()=>({[`${a.value}-item`]:!0,[l.value]:!0,[`${a.value}-item-has-feedback`]:F.value&&t.hasFeedback,[`${a.value}-item-has-success`]:F.value==="success",[`${a.value}-item-has-warning`]:F.value==="warning",[`${a.value}-item-has-error`]:F.value==="error",[`${a.value}-item-is-validating`]:F.value==="validating",[`${a.value}-item-hidden`]:t.hidden})),B=$t({});Mn.useProvide(B),Ke(()=>{let V;if(t.hasFeedback){const q=F.value&&nae[F.value];V=q?C("span",{class:ce(`${a.value}-item-feedback-icon`,`${a.value}-item-feedback-icon-${F.value}`)},[C(q,null,null)]):null}A(B,{status:F.value,hasFeedback:t.hasFeedback,feedbackIcon:V,isFormItemInput:!0})});const z=ie(null),W=ie(!1),j=()=>{if(c.value){const V=getComputedStyle(c.value);z.value=parseInt(V.marginBottom,10)}};Ze(()=>{ye(W,()=>{W.value&&j()},{flush:"post",immediate:!0})});const U=V=>{V||(z.value=null)};return()=>{var V,q;if(t.noStyle)return(V=n.default)===null||V===void 0?void 0:V.call(n);const Y=(q=t.help)!==null&&q!==void 0?q:n.help?Kt(n.help()):null,J=!!(Y!=null&&Array.isArray(Y)&&Y.length||D.value.length);return W.value=J,s(C("div",{class:[N.value,J?`${a.value}-item-with-help`:"",i.class],ref:c},[C(jS,H(H({},i),{},{class:`${a.value}-item-row`,key:"row"}),{default:()=>{var Q,G;return C(Qe,null,[C(YS,H(H({},t),{},{htmlFor:k.value,required:$.value,requiredMark:u.requiredMark.value,prefixCls:a.value,onClick:E,label:t.label}),{label:n.label,tooltip:n.tooltip}),C(eae,H(H({},t),{},{errors:Y!=null?$a(Y):D.value,marginBottom:z.value,prefixCls:a.value,status:F.value,ref:p,help:Y,extra:(Q=t.extra)!==null&&Q!==void 0?Q:(G=n.extra)===null||G===void 0?void 0:G.call(n),onErrorVisibleChanged:U}),{default:n.default})])}}),!!z.value&&C("div",{class:`${a.value}-margin-offset`,style:{marginBottom:`-${z.value}px`}},null)]))}}});function lL(t){let e=!1,n=t.length;const i=[];return t.length?new Promise((o,r)=>{t.forEach((a,s)=>{a.catch(l=>(e=!0,l)).then(l=>{n-=1,i[s]=l,!(n>0)&&(e&&r(i),o(i))})})}):Promise.resolve([])}function EP(t){let e=!1;return t&&t.length&&t.every(n=>n.required?(e=!0,!1):!0),e}function MP(t){return t==null?[]:Array.isArray(t)?t:[t]}function Nb(t,e,n){let i=t;e=e.replace(/\[(\w+)\]/g,".$1"),e=e.replace(/^\./,"");const o=e.split(".");let r=0;for(let a=o.length;r1&&arguments[1]!==void 0?arguments[1]:se({}),n=arguments.length>2?arguments[2]:void 0;const i=Sh(Yt(t)),o=$t({}),r=ie([]),a=y=>{A(Yt(t),A(A({},Sh(i)),y)),pt(()=>{Object.keys(o).forEach(w=>{o[w]={autoLink:!1,required:EP(Yt(e)[w])}})})},s=function(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],w=arguments.length>1?arguments[1]:void 0;return w.length?y.filter(x=>{const $=MP(x.trigger||"change");return Qq($,w).length}):y};let l=null;const c=function(y){let w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},x=arguments.length>2?arguments[2]:void 0;const $=[],S={};for(let O=0;O({name:T,errors:[],warnings:[]})).catch(k=>{const E=[],R=[];return k.forEach(D=>{let{rule:{warningOnly:F},errors:N}=D;F?R.push(...N):E.push(...N)}),E.length?Promise.reject({name:T,errors:E,warnings:R}):{name:T,errors:E,warnings:R}}))}const _=lL($);l=_;const P=_.then(()=>l===_?Promise.resolve(S):Promise.reject([])).catch(O=>{const T=O.filter(M=>M&&M.errors.length);return T.length?Promise.reject({values:S,errorFields:T,outOfDate:l!==_}):Promise.resolve(S)});return P.catch(O=>O),P},u=function(y,w,x){let $=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const S=iL([y],w,x,A({validateMessages:Zm},$),!!$.validateFirst);return o[y]?(o[y].validateStatus="validating",S.catch(_=>_).then(function(){let _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];var P;if(o[y].validateStatus==="validating"){const O=_.filter(T=>T&&T.errors.length);o[y].validateStatus=O.length?"error":"success",o[y].help=O.length?O.map(T=>T.errors):null,(P=n==null?void 0:n.onValidate)===null||P===void 0||P.call(n,y,!O.length,O.length?dt(o[y].help[0]):null)}}),S):S.catch(_=>_)},d=(y,w)=>{let x=[],$=!0;y?Array.isArray(y)?x=y:x=[y]:($=!1,x=r.value);const S=c(x,w||{},$);return S.catch(_=>_),S},f=y=>{let w=[];y?Array.isArray(y)?w=y:w=[y]:w=r.value,w.forEach(x=>{o[x]&&A(o[x],{validateStatus:"",help:null})})},h=y=>{const w={autoLink:!1},x=[],$=Array.isArray(y)?y:[y];for(let S=0;S<$.length;S++){const _=$[S];(_==null?void 0:_.validateStatus)==="error"&&(w.validateStatus="error",_.help&&x.push(_.help)),w.required=w.required||(_==null?void 0:_.required)}return w.help=x,w};let p=i,g=!0;const m=y=>{const w=[];r.value.forEach(x=>{const $=Nb(y,x,!1),S=Nb(p,x,!1);(g&&(n==null?void 0:n.immediate)&&$.isValid||!v1($.v,S.v))&&w.push(x)}),d(w,{trigger:"change"}),g=!1,p=Sh(dt(y))},v=n==null?void 0:n.debounce;let b=!0;return ye(e,()=>{r.value=e?Object.keys(Yt(e)):[],!b&&n&&n.validateOnRuleChange&&d(),b=!1},{deep:!0,immediate:!0}),ye(r,()=>{const y={};r.value.forEach(w=>{y[w]=A({},o[w],{autoLink:!1,required:EP(Yt(e)[w])}),delete o[w]});for(const w in o)Object.prototype.hasOwnProperty.call(o,w)&&delete o[w];A(o,y)},{immediate:!0}),ye(t,v&&v.wait?W1(m,v.wait,pZ(v,["wait"])):m,{immediate:n&&!!n.immediate,deep:!0}),{modelRef:t,rulesRef:e,initialModel:i,validateInfos:o,resetFields:a,validate:d,validateField:u,mergeValidateInfo:h,clearValidate:f}}const sae=()=>({layout:Z.oneOf(Wn("horizontal","inline","vertical")),labelCol:Fe(),wrapperCol:Fe(),colon:Ce(),labelAlign:Ne(),labelWrap:Ce(),prefixCls:String,requiredMark:Xe([String,Boolean]),hideRequiredMark:Ce(),model:Z.object,rules:Fe(),validateMessages:Fe(),validateOnRuleChange:Ce(),scrollToFirstError:Rt(),onSubmit:ve(),name:String,validateTrigger:Xe([String,Array]),size:Ne(),disabled:Ce(),onValuesChange:ve(),onFieldsChange:ve(),onFinish:ve(),onFinishFailed:ve(),onValidate:ve()});function lae(t,e){return v1($a(t),$a(e))}const ga=oe({compatConfig:{MODE:3},name:"AForm",inheritAttrs:!1,props:ct(sae(),{layout:"horizontal",hideRequiredMark:!1,colon:!0}),Item:sL,useForm:aae,setup(t,e){let{emit:n,slots:i,expose:o,attrs:r}=e;const{prefixCls:a,direction:s,form:l,size:c,disabled:u}=Me("form",t),d=L(()=>t.requiredMark===""||t.requiredMark),f=L(()=>{var D;return d.value!==void 0?d.value:l&&((D=l.value)===null||D===void 0?void 0:D.requiredMark)!==void 0?l.value.requiredMark:!t.hideRequiredMark});TD(c),Uk(u);const h=L(()=>{var D,F;return(D=t.colon)!==null&&D!==void 0?D:(F=l.value)===null||F===void 0?void 0:F.colon}),{validateMessages:p}=c7(),g=L(()=>A(A(A({},Zm),p.value),t.validateMessages)),[m,v]=GS(a),b=L(()=>ce(a.value,{[`${a.value}-${t.layout}`]:!0,[`${a.value}-hide-required-mark`]:f.value===!1,[`${a.value}-rtl`]:s.value==="rtl",[`${a.value}-${c.value}`]:c.value},v.value)),y=se(),w={},x=(D,F)=>{w[D]=F},$=D=>{delete w[D]},S=D=>{const F=!!D,N=F?$a(D).map(Jy):[];return F?Object.values(w).filter(B=>N.findIndex(z=>lae(z,B.fieldName.value))>-1):Object.values(w)},_=D=>{t.model&&S(D).forEach(F=>{F.resetField()})},P=D=>{S(D).forEach(F=>{F.clearValidate()})},O=D=>{const{scrollToFirstError:F}=t;if(n("finishFailed",D),F&&D.errorFields.length){let N={};typeof F=="object"&&(N=F),M(D.errorFields[0].name,N)}},T=function(){return E(...arguments)},M=function(D){let F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const N=S(D?[D]:void 0);if(N.length){const B=N[0].fieldId.value,z=B?document.getElementById(B):null;z&&MD(z,A({scrollMode:"if-needed",block:"nearest"},F))}},I=function(){let D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(D===!0){const F=[];return Object.values(w).forEach(N=>{let{namePath:B}=N;F.push(B.value)}),PP(t.model,F)}else return PP(t.model,D)},k=(D,F)=>{if(!t.model)return Promise.reject("Form `model` is required for validateFields to work.");const N=!!D,B=N?$a(D).map(Jy):[],z=[];Object.values(w).forEach(U=>{var V;if(N||B.push(U.namePath.value),!(!((V=U.rules)===null||V===void 0)&&V.value.length))return;const q=U.namePath.value;if(!N||Mre(B,q)){const Y=U.validateRules(A({validateMessages:g.value},F));z.push(Y.then(()=>({name:q,errors:[],warnings:[]})).catch(J=>{const Q=[],G=[];return J.forEach(ee=>{let{rule:{warningOnly:X},errors:K}=ee;X?G.push(...K):Q.push(...K)}),Q.length?Promise.reject({name:q,errors:Q,warnings:G}):{name:q,errors:Q,warnings:G}}))}});const W=lL(z);y.value=W;const j=W.then(()=>y.value===W?Promise.resolve(I(B)):Promise.reject([])).catch(U=>{const V=U.filter(q=>q&&q.errors.length);return Promise.reject({values:I(B),errorFields:V,outOfDate:y.value!==W})});return j.catch(U=>U),j},E=function(){return k(...arguments)},R=D=>{D.preventDefault(),D.stopPropagation(),n("submit",D),t.model&&k().then(N=>{n("finish",N)}).catch(N=>{O(N)})};return o({resetFields:_,clearValidate:P,validateFields:k,getFieldsValue:I,validate:T,scrollToField:M}),rL({model:L(()=>t.model),name:L(()=>t.name),labelAlign:L(()=>t.labelAlign),labelCol:L(()=>t.labelCol),labelWrap:L(()=>t.labelWrap),wrapperCol:L(()=>t.wrapperCol),vertical:L(()=>t.layout==="vertical"),colon:h,requiredMark:f,validateTrigger:L(()=>t.validateTrigger),rules:L(()=>t.rules),addField:x,removeField:$,onValidate:(D,F,N)=>{n("validate",D,F,N)},validateMessages:g}),ye(()=>t.rules,()=>{t.validateOnRuleChange&&k()}),()=>{var D;return m(C("form",H(H({},r),{},{onSubmit:R,class:[b.value,r.class]}),[(D=i.default)===null||D===void 0?void 0:D.call(i)]))}}});ga.useInjectFormItemContext=vn;ga.ItemRest=Np;ga.install=function(t){return t.component(ga.name,ga),t.component(ga.Item.name,ga.Item),t.component(Np.name,Np),t};const cae=new mt("antCheckboxEffect",{"0%":{transform:"scale(1)",opacity:.5},"100%":{transform:"scale(1.6)",opacity:0}}),uae=t=>{const{checkboxCls:e}=t,n=`${e}-wrapper`;return[{[`${e}-group`]:A(A({},rt(t)),{display:"inline-flex",flexWrap:"wrap",columnGap:t.marginXS,[`> ${t.antCls}-row`]:{flex:1}}),[n]:A(A({},rt(t)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${n}`]:{marginInlineStart:0},[`&${n}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[e]:A(A({},rt(t)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",alignSelf:"center",[`${e}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${e}-inner`]:A({},zr(t))},[`${e}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:t.checkboxSize,height:t.checkboxSize,direction:"ltr",backgroundColor:t.colorBgContainer,border:`${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,borderRadius:t.borderRadiusSM,borderCollapse:"separate",transition:`all ${t.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:t.checkboxSize/14*5,height:t.checkboxSize/14*8,border:`${t.lineWidthBold}px solid ${t.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${t.motionDurationFast} ${t.motionEaseInBack}, opacity ${t.motionDurationFast}`}},"& + span":{paddingInlineStart:t.paddingXS,paddingInlineEnd:t.paddingXS}})},{[e]:{"&-indeterminate":{[`${e}-inner`]:{"&:after":{top:"50%",insetInlineStart:"50%",width:t.fontSizeLG/2,height:t.fontSizeLG/2,backgroundColor:t.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${n}:hover ${e}:after`]:{visibility:"visible"},[` + .${i}-col-xl-24${n}-label`]:_l(t),[`@media (max-width: ${t.screenXSMax}px)`]:[Zre(t),{[e]:{[`.${i}-col-xs-24${n}-label`]:_l(t)}}],[`@media (max-width: ${t.screenSMMax}px)`]:{[e]:{[`.${i}-col-sm-24${n}-label`]:_l(t)}},[`@media (max-width: ${t.screenMDMax}px)`]:{[e]:{[`.${i}-col-md-24${n}-label`]:_l(t)}},[`@media (max-width: ${t.screenLGMax}px)`]:{[e]:{[`.${i}-col-lg-24${n}-label`]:_l(t)}}}},GS=et("Form",(t,e)=>{let{rootPrefixCls:n}=e;const i=Ve(t,{formItemCls:`${t.componentCls}-item`,rootPrefixCls:n});return[Gre(i),Kre(i),Xre(i),Ure(i),qre(i),Jre(i),qd(i),V1]}),Qre=oe({compatConfig:{MODE:3},name:"ErrorList",inheritAttrs:!1,props:["errors","help","onErrorVisibleChanged","helpStatus","warnings"],setup(t,e){let{attrs:n}=e;const{prefixCls:i,status:o}=Bre(),r=L(()=>`${i.value}-item-explain`),a=L(()=>!!(t.errors&&t.errors.length)),s=se(o.value),[,l]=GS(i);return ye([a,o],()=>{a.value&&(s.value=o.value)}),()=>{var c,u;const d=Jd(`${i.value}-show-help-item`),f=Sm(`${i.value}-show-help-item`,d);return f.role="alert",f.class=[l.value,r.value,n.class,`${i.value}-show-help`],C(En,H(H({},yo(`${i.value}-show-help`)),{},{onAfterEnter:()=>t.onErrorVisibleChanged(!0),onAfterLeave:()=>t.onErrorVisibleChanged(!1)}),{default:()=>[ni(C(nm,H(H({},f),{},{tag:"div"}),{default:()=>[(u=t.errors)===null||u===void 0?void 0:u.map((h,p)=>C("div",{key:p,class:s.value?`${r.value}-${s.value}`:""},[h]))]}),[[vi,!!(!((c=t.errors)===null||c===void 0)&&c.length)]])]})}}}),eae=oe({compatConfig:{MODE:3},slots:Object,inheritAttrs:!1,props:["prefixCls","errors","hasFeedback","onDomErrorVisibleChange","wrapperCol","help","extra","status","marginBottom","onErrorVisibleChanged"],setup(t,e){let{slots:n}=e;const i=VS(),{wrapperCol:o}=i,r=A({},i);return delete r.labelCol,delete r.wrapperCol,rL(r),Nre({prefixCls:L(()=>t.prefixCls),status:L(()=>t.status)}),()=>{var a,s,l;const{prefixCls:c,wrapperCol:u,marginBottom:d,onErrorVisibleChanged:f,help:h=(a=n.help)===null||a===void 0?void 0:a.call(n),errors:p=Kt((s=n.errors)===null||s===void 0?void 0:s.call(n)),extra:g=(l=n.extra)===null||l===void 0?void 0:l.call(n)}=t,m=`${c}-item`,v=u||(o==null?void 0:o.value)||{},b=ce(`${m}-control`,v.class);return C(ev,H(H({},v),{},{class:b}),{default:()=>{var y;return C(Qe,null,[C("div",{class:`${m}-control-input`},[C("div",{class:`${m}-control-input-content`},[(y=n.default)===null||y===void 0?void 0:y.call(n)])]),d!==null||p.length?C("div",{style:{display:"flex",flexWrap:"nowrap"}},[C(Qre,{errors:p,help:h,class:`${m}-explain-connected`,onErrorVisibleChanged:f},null),!!d&&C("div",{style:{width:0,height:`${d}px`}},null)]):null,g?C("div",{class:`${m}-extra`},[g]):null])}})}}});function tae(t){const e=ie(t.value.slice());let n=null;return Ke(()=>{clearTimeout(n),n=setTimeout(()=>{e.value=t.value},t.value.length?0:10)}),e}Wn("success","warning","error","validating","");const nae={success:Ho,warning:Wo,error:si,validating:yi};function Fb(t,e,n){let i=t;const o=e;let r=0;try{for(let a=o.length;r({htmlFor:String,prefixCls:String,label:Z.any,help:Z.any,extra:Z.any,labelCol:{type:Object},wrapperCol:{type:Object},hasFeedback:{type:Boolean,default:!1},colon:{type:Boolean,default:void 0},labelAlign:String,prop:{type:[String,Number,Array]},name:{type:[String,Number,Array]},rules:[Array,Object],autoLink:{type:Boolean,default:!0},required:{type:Boolean,default:void 0},validateFirst:{type:Boolean,default:void 0},validateStatus:Z.oneOf(Wn("","success","warning","error","validating")),validateTrigger:{type:[String,Array]},messageVariables:{type:Object},hidden:Boolean,noStyle:Boolean,tooltip:String});let oae=0;const rae="form_item",sL=oe({compatConfig:{MODE:3},name:"AFormItem",inheritAttrs:!1,__ANT_NEW_FORM_ITEM:!0,props:iae(),slots:Object,setup(t,e){let{slots:n,attrs:i,expose:o}=e;t.prop;const r=`form-item-${++oae}`,{prefixCls:a}=Me("form",t),[s,l]=GS(a),c=ie(),u=VS(),d=L(()=>t.name||t.prop),f=ie([]),h=ie(!1),p=ie(),g=L(()=>{const V=d.value;return Jy(V)}),m=L(()=>{if(g.value.length){const V=u.name.value,q=g.value.join("_");return V?`${V}_${q}`:`${rae}_${q}`}else return}),v=()=>{const V=u.model.value;if(!(!V||!d.value))return Fb(V,g.value,!0).v},b=L(()=>v()),y=ie(Ch(b.value)),w=L(()=>{let V=t.validateTrigger!==void 0?t.validateTrigger:u.validateTrigger.value;return V=V===void 0?"change":V,$a(V)}),x=L(()=>{let V=u.rules.value;const q=t.rules,Y=t.required!==void 0?{required:!!t.required,trigger:w.value}:[],J=Fb(V,g.value);V=V?J.o[J.k]||J.v:[];const Q=[].concat(q||V||[]);return Kq(Q,G=>G.required)?Q:Q.concat(Y)}),$=L(()=>{const V=x.value;let q=!1;return V&&V.length&&V.every(Y=>Y.required?(q=!0,!1):!0),q||t.required}),S=ie();Ke(()=>{S.value=t.validateStatus});const _=L(()=>{let V={};return typeof t.label=="string"?V.label=t.label:t.name&&(V.label=String(t.name)),t.messageVariables&&(V=A(A({},V),t.messageVariables)),V}),P=V=>{if(g.value.length===0)return;const{validateFirst:q=!1}=t,{triggerName:Y}=V||{};let J=x.value;if(Y&&(J=J.filter(G=>{const{trigger:ee}=G;return!ee&&!w.value.length?!0:$a(ee||w.value).includes(Y)})),!J.length)return Promise.resolve();const Q=iL(g.value,b.value,J,A({validateMessages:u.validateMessages.value},V),q,_.value);return S.value="validating",f.value=[],Q.catch(G=>G).then(function(){let G=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(S.value==="validating"){const ee=G.filter(X=>X&&X.errors.length);S.value=ee.length?"error":"success",f.value=ee.map(X=>X.errors),u.onValidate(d.value,!f.value.length,f.value.length?dt(f.value[0]):null)}}),Q},O=()=>{P({triggerName:"blur"})},T=()=>{if(h.value){h.value=!1;return}P({triggerName:"change"})},M=()=>{S.value=t.validateStatus,h.value=!1,f.value=[]},I=()=>{var V;S.value=t.validateStatus,h.value=!0,f.value=[];const q=u.model.value||{},Y=b.value,J=Fb(q,g.value,!0);Array.isArray(Y)?J.o[J.k]=[].concat((V=y.value)!==null&&V!==void 0?V:[]):J.o[J.k]=y.value,pt(()=>{h.value=!1})},k=L(()=>t.htmlFor===void 0?m.value:t.htmlFor),E=()=>{const V=k.value;if(!V||!p.value)return;const q=p.value.$el.querySelector(`[id="${V}"]`);q&&q.focus&&q.focus()};o({onFieldBlur:O,onFieldChange:T,clearValidate:M,resetField:I}),nK({id:m,onFieldBlur:()=>{t.autoLink&&O()},onFieldChange:()=>{t.autoLink&&T()},clearValidate:M},L(()=>!!(t.autoLink&&u.model.value&&d.value)));let R=!1;ye(d,V=>{V?R||(R=!0,u.addField(r,{fieldValue:b,fieldId:m,fieldName:d,resetField:I,clearValidate:M,namePath:g,validateRules:P,rules:x})):(R=!1,u.removeField(r))},{immediate:!0}),at(()=>{u.removeField(r)});const D=tae(f),F=L(()=>t.validateStatus!==void 0?t.validateStatus:D.value.length?"error":S.value),N=L(()=>({[`${a.value}-item`]:!0,[l.value]:!0,[`${a.value}-item-has-feedback`]:F.value&&t.hasFeedback,[`${a.value}-item-has-success`]:F.value==="success",[`${a.value}-item-has-warning`]:F.value==="warning",[`${a.value}-item-has-error`]:F.value==="error",[`${a.value}-item-is-validating`]:F.value==="validating",[`${a.value}-item-hidden`]:t.hidden})),B=$t({});Mn.useProvide(B),Ke(()=>{let V;if(t.hasFeedback){const q=F.value&&nae[F.value];V=q?C("span",{class:ce(`${a.value}-item-feedback-icon`,`${a.value}-item-feedback-icon-${F.value}`)},[C(q,null,null)]):null}A(B,{status:F.value,hasFeedback:t.hasFeedback,feedbackIcon:V,isFormItemInput:!0})});const z=ie(null),W=ie(!1),j=()=>{if(c.value){const V=getComputedStyle(c.value);z.value=parseInt(V.marginBottom,10)}};Ze(()=>{ye(W,()=>{W.value&&j()},{flush:"post",immediate:!0})});const U=V=>{V||(z.value=null)};return()=>{var V,q;if(t.noStyle)return(V=n.default)===null||V===void 0?void 0:V.call(n);const Y=(q=t.help)!==null&&q!==void 0?q:n.help?Kt(n.help()):null,J=!!(Y!=null&&Array.isArray(Y)&&Y.length||D.value.length);return W.value=J,s(C("div",{class:[N.value,J?`${a.value}-item-with-help`:"",i.class],ref:c},[C(jS,H(H({},i),{},{class:`${a.value}-item-row`,key:"row"}),{default:()=>{var Q,G;return C(Qe,null,[C(YS,H(H({},t),{},{htmlFor:k.value,required:$.value,requiredMark:u.requiredMark.value,prefixCls:a.value,onClick:E,label:t.label}),{label:n.label,tooltip:n.tooltip}),C(eae,H(H({},t),{},{errors:Y!=null?$a(Y):D.value,marginBottom:z.value,prefixCls:a.value,status:F.value,ref:p,help:Y,extra:(Q=t.extra)!==null&&Q!==void 0?Q:(G=n.extra)===null||G===void 0?void 0:G.call(n),onErrorVisibleChanged:U}),{default:n.default})])}}),!!z.value&&C("div",{class:`${a.value}-margin-offset`,style:{marginBottom:`-${z.value}px`}},null)]))}}});function lL(t){let e=!1,n=t.length;const i=[];return t.length?new Promise((o,r)=>{t.forEach((a,s)=>{a.catch(l=>(e=!0,l)).then(l=>{n-=1,i[s]=l,!(n>0)&&(e&&r(i),o(i))})})}):Promise.resolve([])}function EP(t){let e=!1;return t&&t.length&&t.every(n=>n.required?(e=!0,!1):!0),e}function MP(t){return t==null?[]:Array.isArray(t)?t:[t]}function Nb(t,e,n){let i=t;e=e.replace(/\[(\w+)\]/g,".$1"),e=e.replace(/^\./,"");const o=e.split(".");let r=0;for(let a=o.length;r1&&arguments[1]!==void 0?arguments[1]:se({}),n=arguments.length>2?arguments[2]:void 0;const i=Ch(Yt(t)),o=$t({}),r=ie([]),a=y=>{A(Yt(t),A(A({},Ch(i)),y)),pt(()=>{Object.keys(o).forEach(w=>{o[w]={autoLink:!1,required:EP(Yt(e)[w])}})})},s=function(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],w=arguments.length>1?arguments[1]:void 0;return w.length?y.filter(x=>{const $=MP(x.trigger||"change");return Qq($,w).length}):y};let l=null;const c=function(y){let w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},x=arguments.length>2?arguments[2]:void 0;const $=[],S={};for(let O=0;O({name:T,errors:[],warnings:[]})).catch(k=>{const E=[],R=[];return k.forEach(D=>{let{rule:{warningOnly:F},errors:N}=D;F?R.push(...N):E.push(...N)}),E.length?Promise.reject({name:T,errors:E,warnings:R}):{name:T,errors:E,warnings:R}}))}const _=lL($);l=_;const P=_.then(()=>l===_?Promise.resolve(S):Promise.reject([])).catch(O=>{const T=O.filter(M=>M&&M.errors.length);return T.length?Promise.reject({values:S,errorFields:T,outOfDate:l!==_}):Promise.resolve(S)});return P.catch(O=>O),P},u=function(y,w,x){let $=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const S=iL([y],w,x,A({validateMessages:Jm},$),!!$.validateFirst);return o[y]?(o[y].validateStatus="validating",S.catch(_=>_).then(function(){let _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];var P;if(o[y].validateStatus==="validating"){const O=_.filter(T=>T&&T.errors.length);o[y].validateStatus=O.length?"error":"success",o[y].help=O.length?O.map(T=>T.errors):null,(P=n==null?void 0:n.onValidate)===null||P===void 0||P.call(n,y,!O.length,O.length?dt(o[y].help[0]):null)}}),S):S.catch(_=>_)},d=(y,w)=>{let x=[],$=!0;y?Array.isArray(y)?x=y:x=[y]:($=!1,x=r.value);const S=c(x,w||{},$);return S.catch(_=>_),S},f=y=>{let w=[];y?Array.isArray(y)?w=y:w=[y]:w=r.value,w.forEach(x=>{o[x]&&A(o[x],{validateStatus:"",help:null})})},h=y=>{const w={autoLink:!1},x=[],$=Array.isArray(y)?y:[y];for(let S=0;S<$.length;S++){const _=$[S];(_==null?void 0:_.validateStatus)==="error"&&(w.validateStatus="error",_.help&&x.push(_.help)),w.required=w.required||(_==null?void 0:_.required)}return w.help=x,w};let p=i,g=!0;const m=y=>{const w=[];r.value.forEach(x=>{const $=Nb(y,x,!1),S=Nb(p,x,!1);(g&&(n==null?void 0:n.immediate)&&$.isValid||!v1($.v,S.v))&&w.push(x)}),d(w,{trigger:"change"}),g=!1,p=Ch(dt(y))},v=n==null?void 0:n.debounce;let b=!0;return ye(e,()=>{r.value=e?Object.keys(Yt(e)):[],!b&&n&&n.validateOnRuleChange&&d(),b=!1},{deep:!0,immediate:!0}),ye(r,()=>{const y={};r.value.forEach(w=>{y[w]=A({},o[w],{autoLink:!1,required:EP(Yt(e)[w])}),delete o[w]});for(const w in o)Object.prototype.hasOwnProperty.call(o,w)&&delete o[w];A(o,y)},{immediate:!0}),ye(t,v&&v.wait?W1(m,v.wait,pZ(v,["wait"])):m,{immediate:n&&!!n.immediate,deep:!0}),{modelRef:t,rulesRef:e,initialModel:i,validateInfos:o,resetFields:a,validate:d,validateField:u,mergeValidateInfo:h,clearValidate:f}}const sae=()=>({layout:Z.oneOf(Wn("horizontal","inline","vertical")),labelCol:Fe(),wrapperCol:Fe(),colon:Ce(),labelAlign:Ne(),labelWrap:Ce(),prefixCls:String,requiredMark:Xe([String,Boolean]),hideRequiredMark:Ce(),model:Z.object,rules:Fe(),validateMessages:Fe(),validateOnRuleChange:Ce(),scrollToFirstError:Rt(),onSubmit:ve(),name:String,validateTrigger:Xe([String,Array]),size:Ne(),disabled:Ce(),onValuesChange:ve(),onFieldsChange:ve(),onFinish:ve(),onFinishFailed:ve(),onValidate:ve()});function lae(t,e){return v1($a(t),$a(e))}const ga=oe({compatConfig:{MODE:3},name:"AForm",inheritAttrs:!1,props:ct(sae(),{layout:"horizontal",hideRequiredMark:!1,colon:!0}),Item:sL,useForm:aae,setup(t,e){let{emit:n,slots:i,expose:o,attrs:r}=e;const{prefixCls:a,direction:s,form:l,size:c,disabled:u}=Me("form",t),d=L(()=>t.requiredMark===""||t.requiredMark),f=L(()=>{var D;return d.value!==void 0?d.value:l&&((D=l.value)===null||D===void 0?void 0:D.requiredMark)!==void 0?l.value.requiredMark:!t.hideRequiredMark});TD(c),Uk(u);const h=L(()=>{var D,F;return(D=t.colon)!==null&&D!==void 0?D:(F=l.value)===null||F===void 0?void 0:F.colon}),{validateMessages:p}=c7(),g=L(()=>A(A(A({},Jm),p.value),t.validateMessages)),[m,v]=GS(a),b=L(()=>ce(a.value,{[`${a.value}-${t.layout}`]:!0,[`${a.value}-hide-required-mark`]:f.value===!1,[`${a.value}-rtl`]:s.value==="rtl",[`${a.value}-${c.value}`]:c.value},v.value)),y=se(),w={},x=(D,F)=>{w[D]=F},$=D=>{delete w[D]},S=D=>{const F=!!D,N=F?$a(D).map(Jy):[];return F?Object.values(w).filter(B=>N.findIndex(z=>lae(z,B.fieldName.value))>-1):Object.values(w)},_=D=>{t.model&&S(D).forEach(F=>{F.resetField()})},P=D=>{S(D).forEach(F=>{F.clearValidate()})},O=D=>{const{scrollToFirstError:F}=t;if(n("finishFailed",D),F&&D.errorFields.length){let N={};typeof F=="object"&&(N=F),M(D.errorFields[0].name,N)}},T=function(){return E(...arguments)},M=function(D){let F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const N=S(D?[D]:void 0);if(N.length){const B=N[0].fieldId.value,z=B?document.getElementById(B):null;z&&MD(z,A({scrollMode:"if-needed",block:"nearest"},F))}},I=function(){let D=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(D===!0){const F=[];return Object.values(w).forEach(N=>{let{namePath:B}=N;F.push(B.value)}),PP(t.model,F)}else return PP(t.model,D)},k=(D,F)=>{if(!t.model)return Promise.reject("Form `model` is required for validateFields to work.");const N=!!D,B=N?$a(D).map(Jy):[],z=[];Object.values(w).forEach(U=>{var V;if(N||B.push(U.namePath.value),!(!((V=U.rules)===null||V===void 0)&&V.value.length))return;const q=U.namePath.value;if(!N||Mre(B,q)){const Y=U.validateRules(A({validateMessages:g.value},F));z.push(Y.then(()=>({name:q,errors:[],warnings:[]})).catch(J=>{const Q=[],G=[];return J.forEach(ee=>{let{rule:{warningOnly:X},errors:K}=ee;X?G.push(...K):Q.push(...K)}),Q.length?Promise.reject({name:q,errors:Q,warnings:G}):{name:q,errors:Q,warnings:G}}))}});const W=lL(z);y.value=W;const j=W.then(()=>y.value===W?Promise.resolve(I(B)):Promise.reject([])).catch(U=>{const V=U.filter(q=>q&&q.errors.length);return Promise.reject({values:I(B),errorFields:V,outOfDate:y.value!==W})});return j.catch(U=>U),j},E=function(){return k(...arguments)},R=D=>{D.preventDefault(),D.stopPropagation(),n("submit",D),t.model&&k().then(N=>{n("finish",N)}).catch(N=>{O(N)})};return o({resetFields:_,clearValidate:P,validateFields:k,getFieldsValue:I,validate:T,scrollToField:M}),rL({model:L(()=>t.model),name:L(()=>t.name),labelAlign:L(()=>t.labelAlign),labelCol:L(()=>t.labelCol),labelWrap:L(()=>t.labelWrap),wrapperCol:L(()=>t.wrapperCol),vertical:L(()=>t.layout==="vertical"),colon:h,requiredMark:f,validateTrigger:L(()=>t.validateTrigger),rules:L(()=>t.rules),addField:x,removeField:$,onValidate:(D,F,N)=>{n("validate",D,F,N)},validateMessages:g}),ye(()=>t.rules,()=>{t.validateOnRuleChange&&k()}),()=>{var D;return m(C("form",H(H({},r),{},{onSubmit:R,class:[b.value,r.class]}),[(D=i.default)===null||D===void 0?void 0:D.call(i)]))}}});ga.useInjectFormItemContext=vn;ga.ItemRest=Bp;ga.install=function(t){return t.component(ga.name,ga),t.component(ga.Item.name,ga.Item),t.component(Bp.name,Bp),t};const cae=new mt("antCheckboxEffect",{"0%":{transform:"scale(1)",opacity:.5},"100%":{transform:"scale(1.6)",opacity:0}}),uae=t=>{const{checkboxCls:e}=t,n=`${e}-wrapper`;return[{[`${e}-group`]:A(A({},rt(t)),{display:"inline-flex",flexWrap:"wrap",columnGap:t.marginXS,[`> ${t.antCls}-row`]:{flex:1}}),[n]:A(A({},rt(t)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${n}`]:{marginInlineStart:0},[`&${n}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[e]:A(A({},rt(t)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",alignSelf:"center",[`${e}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${e}-inner`]:A({},zr(t))},[`${e}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:t.checkboxSize,height:t.checkboxSize,direction:"ltr",backgroundColor:t.colorBgContainer,border:`${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,borderRadius:t.borderRadiusSM,borderCollapse:"separate",transition:`all ${t.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:t.checkboxSize/14*5,height:t.checkboxSize/14*8,border:`${t.lineWidthBold}px solid ${t.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${t.motionDurationFast} ${t.motionEaseInBack}, opacity ${t.motionDurationFast}`}},"& + span":{paddingInlineStart:t.paddingXS,paddingInlineEnd:t.paddingXS}})},{[e]:{"&-indeterminate":{[`${e}-inner`]:{"&:after":{top:"50%",insetInlineStart:"50%",width:t.fontSizeLG/2,height:t.fontSizeLG/2,backgroundColor:t.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${n}:hover ${e}:after`]:{visibility:"visible"},[` ${n}:not(${n}-disabled), ${e}:not(${e}-disabled) `]:{[`&:hover ${e}-inner`]:{borderColor:t.colorPrimary}},[`${n}:not(${n}-disabled)`]:{[`&:hover ${e}-checked:not(${e}-disabled) ${e}-inner`]:{backgroundColor:t.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${e}-checked:not(${e}-disabled):after`]:{borderColor:t.colorPrimaryHover}}},{[`${e}-checked`]:{[`${e}-inner`]:{backgroundColor:t.colorPrimary,borderColor:t.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${t.motionDurationMid} ${t.motionEaseOutBack} ${t.motionDurationFast}`}},"&:after":{position:"absolute",top:0,insetInlineStart:0,width:"100%",height:"100%",borderRadius:t.borderRadiusSM,visibility:"hidden",border:`${t.lineWidthBold}px solid ${t.colorPrimary}`,animationName:cae,animationDuration:t.motionDurationSlow,animationTimingFunction:"ease-in-out",animationFillMode:"backwards",content:'""',transition:`all ${t.motionDurationSlow}`}},[` ${n}-checked:not(${n}-disabled), ${e}-checked:not(${e}-disabled) - `]:{[`&:hover ${e}-inner`]:{backgroundColor:t.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${e}:after`]:{borderColor:t.colorPrimaryHover}}},{[`${n}-disabled`]:{cursor:"not-allowed"},[`${e}-disabled`]:{[`&, ${e}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${e}-inner`]:{background:t.colorBgContainerDisabled,borderColor:t.colorBorder,"&:after":{borderColor:t.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:t.colorTextDisabled},[`&${e}-indeterminate ${e}-inner::after`]:{background:t.colorTextDisabled}}}]};function ev(t,e){const n=Ve(e,{checkboxCls:`.${t}`,checkboxSize:e.controlInteractiveSize});return[uae(n)]}const cL=et("Checkbox",(t,e)=>{let{prefixCls:n}=e;return[ev(n,t)]}),dae=t=>{const{prefixCls:e,componentCls:n,antCls:i}=t,o=`${n}-menu-item`,r=` + `]:{[`&:hover ${e}-inner`]:{backgroundColor:t.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${e}:after`]:{borderColor:t.colorPrimaryHover}}},{[`${n}-disabled`]:{cursor:"not-allowed"},[`${e}-disabled`]:{[`&, ${e}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${e}-inner`]:{background:t.colorBgContainerDisabled,borderColor:t.colorBorder,"&:after":{borderColor:t.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:t.colorTextDisabled},[`&${e}-indeterminate ${e}-inner::after`]:{background:t.colorTextDisabled}}}]};function tv(t,e){const n=Ve(e,{checkboxCls:`.${t}`,checkboxSize:e.controlInteractiveSize});return[uae(n)]}const cL=et("Checkbox",(t,e)=>{let{prefixCls:n}=e;return[tv(n,t)]}),dae=t=>{const{prefixCls:e,componentCls:n,antCls:i}=t,o=`${n}-menu-item`,r=` &${o}-expand ${o}-expand-icon, ${o}-loading-icon - `,a=Math.round((t.controlHeight-t.fontSize*t.lineHeight)/2);return[{[n]:{width:t.controlWidth}},{[`${n}-dropdown`]:[ev(`${e}-checkbox`,t),{[`&${i}-select-dropdown`]:{padding:0}},{[n]:{"&-checkbox":{top:0,marginInlineEnd:t.paddingXS},"&-menus":{display:"flex",flexWrap:"nowrap",alignItems:"flex-start",[`&${n}-menu-empty`]:{[`${n}-menu`]:{width:"100%",height:"auto",[o]:{color:t.colorTextDisabled}}}},"&-menu":{flexGrow:1,minWidth:t.controlItemWidth,height:t.dropdownHeight,margin:0,padding:t.paddingXXS,overflow:"auto",verticalAlign:"top",listStyle:"none","-ms-overflow-style":"-ms-autohiding-scrollbar","&:not(:last-child)":{borderInlineEnd:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`},"&-item":A(A({},un),{display:"flex",flexWrap:"nowrap",alignItems:"center",padding:`${a}px ${t.paddingSM}px`,lineHeight:t.lineHeight,cursor:"pointer",transition:`all ${t.motionDurationMid}`,borderRadius:t.borderRadiusSM,"&:hover":{background:t.controlItemBgHover},"&-disabled":{color:t.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"},[r]:{color:t.colorTextDisabled}},[`&-active:not(${o}-disabled)`]:{"&, &:hover":{fontWeight:t.fontWeightStrong,backgroundColor:t.controlItemBgActive}},"&-content":{flex:"auto"},[r]:{marginInlineStart:t.paddingXXS,color:t.colorTextDescription,fontSize:t.fontSizeIcon},"&-keyword":{color:t.colorHighlight}})}}}]},{[`${n}-dropdown-rtl`]:{direction:"rtl"}},Ec(t)]},fae=et("Cascader",t=>[dae(t)],{controlWidth:184,controlItemWidth:111,dropdownHeight:180});var hae=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);ol===0?[s]:[...a,e,s],[]),o=[];let r=0;return i.forEach((a,s)=>{const l=r+a.length;let c=t.slice(r,l);r=l,s%2===1&&(c=C("span",{class:`${n}-menu-item-keyword`,key:"seperator"},[c])),o.push(c)}),o}const gae=t=>{let{inputValue:e,path:n,prefixCls:i,fieldNames:o}=t;const r=[],a=e.toLowerCase();return n.forEach((s,l)=>{l!==0&&r.push(" / ");let c=s[o.label];const u=typeof c;(u==="string"||u==="number")&&(c=pae(String(c),a,i)),r.push(c)}),r};function mae(){return A(A({},ht(K4(),["customSlots","checkable","options"])),{multiple:{type:Boolean,default:void 0},size:String,bordered:{type:Boolean,default:void 0},placement:{type:String},suffixIcon:Z.any,status:String,options:Array,popupClassName:String,dropdownClassName:String,"onUpdate:value":Function})}const vae=oe({compatConfig:{MODE:3},name:"ACascader",inheritAttrs:!1,props:ct(mae(),{bordered:!0,choiceTransitionName:"",allowClear:!0}),setup(t,e){let{attrs:n,expose:i,slots:o,emit:r}=e;const a=vn(),s=Mn.useInject(),l=L(()=>zo(s.status,t.status)),{prefixCls:c,rootPrefixCls:u,getPrefixCls:d,direction:f,getPopupContainer:h,renderEmpty:p,size:g,disabled:m}=Me("cascader",t),v=L(()=>d("select",t.prefixCls)),{compactSize:b,compactItemClassnames:y}=Ra(v,f),w=L(()=>b.value||g.value),x=Oi(),$=L(()=>{var F;return(F=m.value)!==null&&F!==void 0?F:x.value}),[S,_]=X1(v),[P]=fae(c),O=L(()=>f.value==="rtl"),T=L(()=>{if(!t.showSearch)return t.showSearch;let F={render:gae};return typeof t.showSearch=="object"&&(F=A(A({},F),t.showSearch)),F}),M=L(()=>ce(t.popupClassName||t.dropdownClassName,`${c.value}-dropdown`,{[`${c.value}-dropdown-rtl`]:O.value},_.value)),I=se();i({focus(){var F;(F=I.value)===null||F===void 0||F.focus()},blur(){var F;(F=I.value)===null||F===void 0||F.blur()}});const k=function(){for(var F=arguments.length,N=new Array(F),B=0;Bt.showArrow!==void 0?t.showArrow:t.loading||!t.multiple),D=L(()=>t.placement!==void 0?t.placement:f.value==="rtl"?"bottomRight":"bottomLeft");return()=>{var F,N;const{notFoundContent:B=(F=o.notFoundContent)===null||F===void 0?void 0:F.call(o),expandIcon:z=(N=o.expandIcon)===null||N===void 0?void 0:N.call(o),multiple:W,bordered:j,allowClear:U,choiceTransitionName:V,transitionName:q,id:Y=a.id.value}=t,J=hae(t,["notFoundContent","expandIcon","multiple","bordered","allowClear","choiceTransitionName","transitionName","id"]),Q=B||p("Cascader");let G=z;z||(G=O.value?C(cr,null,null):C(qi,null,null));const ee=C("span",{class:`${v.value}-menu-item-loading-icon`},[C(yi,{spin:!0},null)]),{suffixIcon:X,removeIcon:K,clearIcon:te}=O1(A(A({},t),{hasFeedback:s.hasFeedback,feedbackIcon:s.feedbackIcon,multiple:W,prefixCls:v.value,showArrow:R.value}),o);return P(S(C(Loe,H(H(H({},J),n),{},{id:Y,prefixCls:v.value,class:[c.value,{[`${v.value}-lg`]:w.value==="large",[`${v.value}-sm`]:w.value==="small",[`${v.value}-rtl`]:O.value,[`${v.value}-borderless`]:!j,[`${v.value}-in-form-item`]:s.isFormItemInput},ei(v.value,l.value,s.hasFeedback),y.value,n.class,_.value],disabled:$.value,direction:f.value,placement:D.value,notFoundContent:Q,allowClear:U,showSearch:T.value,expandIcon:G,inputIcon:X,removeIcon:K,clearIcon:te,loadingIcon:ee,checkable:!!W,dropdownClassName:M.value,dropdownPrefixCls:c.value,choiceTransitionName:oi(u.value,"",V),transitionName:oi(u.value,b1(D.value),q),getPopupContainer:h==null?void 0:h.value,customSlots:A(A({},o),{checkable:()=>C("span",{class:`${c.value}-checkbox-inner`},null)}),tagRender:t.tagRender||o.tagRender,displayRender:t.displayRender||o.displayRender,maxTagPlaceholder:t.maxTagPlaceholder||o.maxTagPlaceholder,showArrow:s.hasFeedback||t.showArrow,onChange:k,onBlur:E,ref:I}),o)))}}}),bae=Vt(A(vae,{SHOW_CHILD:N4,SHOW_PARENT:F4})),yae=()=>({name:String,prefixCls:String,options:xt([]),disabled:Boolean,id:String}),xae=()=>A(A({},yae()),{defaultValue:xt(),value:xt(),onChange:ve(),"onUpdate:value":ve()}),wae=()=>({prefixCls:String,defaultChecked:Ce(),checked:Ce(),disabled:Ce(),isGroup:Ce(),value:Z.any,name:String,id:String,indeterminate:Ce(),type:Ne("checkbox"),autofocus:Ce(),onChange:ve(),"onUpdate:checked":ve(),onClick:ve(),skipGroup:Ce(!1)}),Sae=()=>A(A({},wae()),{indeterminate:Ce(!1)}),uL=Symbol("CheckboxGroupContext");var IP=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o(p==null?void 0:p.disabled.value)||u.value);Ke(()=>{!t.skipGroup&&p&&p.registerValue(g,t.value)}),at(()=>{p&&p.cancelValue(g)}),Ze(()=>{Gi(!!(t.checked!==void 0||p||t.value===void 0))});const v=x=>{const $=x.target.checked;n("update:checked",$),n("change",x),a.onFieldChange()},b=se();return r({focus:()=>{var x;(x=b.value)===null||x===void 0||x.focus()},blur:()=>{var x;(x=b.value)===null||x===void 0||x.blur()}}),()=>{var x;const $=Dt((x=o.default)===null||x===void 0?void 0:x.call(o)),{indeterminate:S,skipGroup:_,id:P=a.id.value}=t,O=IP(t,["indeterminate","skipGroup","id"]),{onMouseenter:T,onMouseleave:M,onInput:I,class:k,style:E}=i,R=IP(i,["onMouseenter","onMouseleave","onInput","class","style"]),D=A(A(A(A({},O),{id:P,prefixCls:l.value}),R),{disabled:m.value});p&&!_?(D.onChange=function(){for(var z=arguments.length,W=new Array(z),j=0;j`${s.value}-group`),[u,d]=cL(c),f=se((t.value===void 0?t.defaultValue:t.value)||[]);ye(()=>t.value,()=>{f.value=t.value||[]});const h=L(()=>t.options.map(w=>typeof w=="string"||typeof w=="number"?{label:w,value:w}:w)),p=se(Symbol()),g=se(new Map),m=w=>{g.value.delete(w),p.value=Symbol()},v=(w,x)=>{g.value.set(w,x),p.value=Symbol()},b=se(new Map);return ye(p,()=>{const w=new Map;for(const x of g.value.values())w.set(x,!0);b.value=w}),ot(uL,{cancelValue:m,registerValue:v,toggleOption:w=>{const x=f.value.indexOf(w.value),$=[...f.value];x===-1?$.push(w.value):$.splice(x,1),t.value===void 0&&(f.value=$);const S=$.filter(_=>b.value.has(_)).sort((_,P)=>{const O=h.value.findIndex(M=>M.value===_),T=h.value.findIndex(M=>M.value===P);return O-T});o("update:value",S),o("change",S),a.onFieldChange()},mergedValue:f,name:L(()=>t.name),disabled:L(()=>t.disabled)}),r({mergedValue:f}),()=>{var w;const{id:x=a.id.value}=t;let $=null;return h.value&&h.value.length>0&&($=h.value.map(S=>{var _;return C(ho,{prefixCls:s.value,key:S.value.toString(),disabled:"disabled"in S?S.disabled:t.disabled,indeterminate:S.indeterminate,value:S.value,checked:f.value.indexOf(S.value)!==-1,onChange:S.onChange,class:`${c.value}-item`},{default:()=>[n.label!==void 0?(_=n.label)===null||_===void 0?void 0:_.call(n,S):S.label]})})),u(C("div",H(H({},i),{},{class:[c.value,{[`${c.value}-rtl`]:l.value==="rtl"},i.class,d.value],id:x}),[$||((w=n.default)===null||w===void 0?void 0:w.call(n))]))}}});ho.Group=sg;ho.install=function(t){return t.component(ho.name,ho),t.component(sg.name,sg),t};const Cae={useBreakpoint:Mc},$ae=Vt(Qm),Aae=t=>{const{componentCls:e,commentBg:n,commentPaddingBase:i,commentNestIndent:o,commentFontSizeBase:r,commentFontSizeSm:a,commentAuthorNameColor:s,commentAuthorTimeColor:l,commentActionColor:c,commentActionHoverColor:u,commentActionsMarginBottom:d,commentActionsMarginTop:f,commentContentDetailPMarginBottom:h}=t;return{[e]:{position:"relative",backgroundColor:n,[`${e}-inner`]:{display:"flex",padding:i},[`${e}-avatar`]:{position:"relative",flexShrink:0,marginRight:t.marginSM,cursor:"pointer",img:{width:"32px",height:"32px",borderRadius:"50%"}},[`${e}-content`]:{position:"relative",flex:"1 1 auto",minWidth:"1px",fontSize:r,wordWrap:"break-word","&-author":{display:"flex",flexWrap:"wrap",justifyContent:"flex-start",marginBottom:t.marginXXS,fontSize:r,"& > a,& > span":{paddingRight:t.paddingXS,fontSize:a,lineHeight:"18px"},"&-name":{color:s,fontSize:r,transition:`color ${t.motionDurationSlow}`,"> *":{color:s,"&:hover":{color:s}}},"&-time":{color:l,whiteSpace:"nowrap",cursor:"auto"}},"&-detail p":{marginBottom:h,whiteSpace:"pre-wrap"}},[`${e}-actions`]:{marginTop:f,marginBottom:d,paddingLeft:0,"> li":{display:"inline-block",color:c,"> span":{marginRight:"10px",color:c,fontSize:a,cursor:"pointer",transition:`color ${t.motionDurationSlow}`,userSelect:"none","&:hover":{color:u}}}},[`${e}-nested`]:{marginLeft:o},"&-rtl":{direction:"rtl"}}}},_ae=et("Comment",t=>{const e=Ve(t,{commentBg:"inherit",commentPaddingBase:`${t.paddingMD}px 0`,commentNestIndent:"44px",commentFontSizeBase:t.fontSize,commentFontSizeSm:t.fontSizeSM,commentAuthorNameColor:t.colorTextTertiary,commentAuthorTimeColor:t.colorTextPlaceholder,commentActionColor:t.colorTextTertiary,commentActionHoverColor:t.colorTextSecondary,commentActionsMarginBottom:"inherit",commentActionsMarginTop:t.marginSM,commentContentDetailPMarginBottom:"inherit"});return[Aae(e)]}),Pae=()=>({actions:Array,author:Z.any,avatar:Z.any,content:Z.any,prefixCls:String,datetime:Z.any}),Tae=oe({compatConfig:{MODE:3},name:"AComment",inheritAttrs:!1,props:Pae(),slots:Object,setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,direction:r}=Me("comment",t),[a,s]=_ae(o),l=(u,d)=>C("div",{class:`${u}-nested`},[d]),c=u=>!u||!u.length?null:u.map((f,h)=>C("li",{key:`action-${h}`},[f]));return()=>{var u,d,f,h,p,g,m,v,b,y,w;const x=o.value,$=(u=t.actions)!==null&&u!==void 0?u:(d=n.actions)===null||d===void 0?void 0:d.call(n),S=(f=t.author)!==null&&f!==void 0?f:(h=n.author)===null||h===void 0?void 0:h.call(n),_=(p=t.avatar)!==null&&p!==void 0?p:(g=n.avatar)===null||g===void 0?void 0:g.call(n),P=(m=t.content)!==null&&m!==void 0?m:(v=n.content)===null||v===void 0?void 0:v.call(n),O=(b=t.datetime)!==null&&b!==void 0?b:(y=n.datetime)===null||y===void 0?void 0:y.call(n),T=C("div",{class:`${x}-avatar`},[typeof _=="string"?C("img",{src:_,alt:"comment-avatar"},null):_]),M=$?C("ul",{class:`${x}-actions`},[c(Array.isArray($)?$:[$])]):null,I=C("div",{class:`${x}-content-author`},[S&&C("span",{class:`${x}-content-author-name`},[S]),O&&C("span",{class:`${x}-content-author-time`},[O])]),k=C("div",{class:`${x}-content`},[I,C("div",{class:`${x}-content-detail`},[P]),M]),E=C("div",{class:`${x}-inner`},[T,k]),R=Dt((w=n.default)===null||w===void 0?void 0:w.call(n));return a(C("div",H(H({},i),{},{class:[x,{[`${x}-rtl`]:r.value==="rtl"},i.class,s.value]}),[E,R&&R.length?l(x,R):null]))}}}),Oae=Vt(Tae);let Eh=A({},bi.Modal);function Eae(t){t?Eh=A(A({},Eh),t):Eh=A({},bi.Modal)}function Mae(){return Eh}const ex="internalMark",Mh=oe({compatConfig:{MODE:3},name:"ALocaleProvider",props:{locale:{type:Object},ANT_MARK__:String},setup(t,e){let{slots:n}=e;Gi(t.ANT_MARK__===ex);const i=$t({antLocale:A(A({},t.locale),{exist:!0}),ANT_MARK__:ex});return ot("localeData",i),ye(()=>t.locale,o=>{Eae(o&&o.Modal),i.antLocale=A(A({},o),{exist:!0})},{immediate:!0}),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}});Mh.install=function(t){return t.component(Mh.name,Mh),t};const dL=Vt(Mh),fL=oe({name:"Notice",inheritAttrs:!1,props:["prefixCls","duration","updateMark","noticeKey","closeIcon","closable","props","onClick","onClose","holder","visible"],setup(t,e){let{attrs:n,slots:i}=e,o,r=!1;const a=L(()=>t.duration===void 0?4.5:t.duration),s=()=>{a.value&&!r&&(o=setTimeout(()=>{c()},a.value*1e3))},l=()=>{o&&(clearTimeout(o),o=null)},c=d=>{d&&d.stopPropagation(),l();const{onClose:f,noticeKey:h}=t;f&&f(h)},u=()=>{l(),s()};return Ze(()=>{s()}),Xn(()=>{r=!0,l()}),ye([a,()=>t.updateMark,()=>t.visible],(d,f)=>{let[h,p,g]=d,[m,v,b]=f;(h!==m||p!==v||g!==b&&b)&&u()},{flush:"post"}),()=>{var d,f;const{prefixCls:h,closable:p,closeIcon:g=(d=i.closeIcon)===null||d===void 0?void 0:d.call(i),onClick:m,holder:v}=t,{class:b,style:y}=n,w=`${h}-notice`,x=Object.keys(n).reduce((S,_)=>((_.startsWith("data-")||_.startsWith("aria-")||_==="role")&&(S[_]=n[_]),S),{}),$=C("div",H({class:ce(w,b,{[`${w}-closable`]:p}),style:y,onMouseenter:l,onMouseleave:s,onClick:m},x),[C("div",{class:`${w}-content`},[(f=i.default)===null||f===void 0?void 0:f.call(i)]),p?C("a",{tabindex:0,onClick:c,class:`${w}-close`},[g||C("span",{class:`${w}-close-x`},null)]):null]);return v?C(Ow,{to:v},{default:()=>$}):$}}});var Iae=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{const{prefixCls:u,animation:d="fade"}=t;let f=t.transitionName;return!f&&d&&(f=`${u}-${d}`),wm(f)}),l=(u,d)=>{const f=u.key||DP(),h=A(A({},u),{key:f}),{maxCount:p}=t,g=a.value.map(v=>v.notice.key).indexOf(f),m=a.value.concat();g!==-1?m.splice(g,1,{notice:h,holderCallback:d}):(p&&a.value.length>=p&&(h.key=m[0].notice.key,h.updateMark=DP(),h.userPassKey=f,m.shift()),m.push({notice:h,holderCallback:d})),a.value=m},c=u=>{a.value=dt(a.value).filter(d=>{let{notice:{key:f,userPassKey:h}}=d;return(h||f)!==u})};return i({add:l,remove:c,notices:a}),()=>{var u;const{prefixCls:d,closeIcon:f=(u=o.closeIcon)===null||u===void 0?void 0:u.call(o,{prefixCls:d})}=t,h=a.value.map((g,m)=>{let{notice:v,holderCallback:b}=g;const y=m===a.value.length-1?v.updateMark:void 0,{key:w,userPassKey:x}=v,{content:$}=v,S=A(A(A({prefixCls:d,closeIcon:typeof f=="function"?f({prefixCls:d}):f},v),v.props),{key:w,noticeKey:x||w,updateMark:y,onClose:_=>{var P;c(_),(P=v.onClose)===null||P===void 0||P.call(v)},onClick:v.onClick});return b?C("div",{key:w,class:`${d}-hook-holder`,ref:_=>{typeof w>"u"||(_?(r.set(w,_),b(_,S)):r.delete(w))}},null):C(fL,H(H({},S),{},{class:ce(S.class,t.hashId)}),{default:()=>[typeof $=="function"?$({prefixCls:d}):$]})}),p={[d]:1,[n.class]:!!n.class,[t.hashId]:!0};return C("div",{class:p,style:n.style||{top:"65px",left:"50%"}},[C(tm,H({tag:"div"},s.value),{default:()=>[h]})])}}});lg.newInstance=function(e,n){const i=e||{},{name:o="notification",getContainer:r,appContext:a,prefixCls:s,rootPrefixCls:l,transitionName:c,hasTransitionName:u,useStyle:d}=i,f=Iae(i,["name","getContainer","appContext","prefixCls","rootPrefixCls","transitionName","hasTransitionName","useStyle"]),h=document.createElement("div");r?r().appendChild(h):document.body.appendChild(h);const g=C(oe({compatConfig:{MODE:3},name:"NotificationWrapper",setup(m,v){let{attrs:b}=v;const y=ie(),w=L(()=>Fn.getPrefixCls(o,s)),[,x]=d(w);return Ze(()=>{n({notice($){var S;(S=y.value)===null||S===void 0||S.add($)},removeNotice($){var S;(S=y.value)===null||S===void 0||S.remove($)},destroy(){Pa(null,h),h.parentNode&&h.parentNode.removeChild(h)},component:y})}),()=>{const $=Fn,S=$.getRootPrefixCls(l,w.value),_=u?c:`${w.value}-${c}`;return C(As,H(H({},$),{},{prefixCls:S}),{default:()=>[C(lg,H(H({ref:y},b),{},{prefixCls:w.value,transitionName:_,hashId:x.value}),null)]})}}}),f);g.appContext=a||g.appContext,Pa(g,h)};let RP=0;const Dae=Date.now();function LP(){const t=RP;return RP+=1,`rcNotification_${Dae}_${t}`}const Rae=oe({name:"HookNotification",inheritAttrs:!1,props:["prefixCls","transitionName","animation","maxCount","closeIcon","hashId","remove","notices","getStyles","getClassName","onAllRemoved","getContainer"],setup(t,e){let{attrs:n,slots:i}=e;const o=new Map,r=L(()=>t.notices),a=L(()=>{let u=t.transitionName;if(!u&&t.animation)switch(typeof t.animation){case"string":u=t.animation;break;case"function":u=t.animation().name;break;case"object":u=t.animation.name;break;default:u=`${t.prefixCls}-fade`;break}return wm(u)}),s=u=>t.remove(u),l=se({});ye(r,()=>{const u={};Object.keys(l.value).forEach(d=>{u[d]=[]}),t.notices.forEach(d=>{const{placement:f="topRight"}=d.notice;f&&(u[f]=u[f]||[],u[f].push(d))}),l.value=u});const c=L(()=>Object.keys(l.value));return()=>{var u;const{prefixCls:d,closeIcon:f=(u=i.closeIcon)===null||u===void 0?void 0:u.call(i,{prefixCls:d})}=t,h=c.value.map(p=>{var g,m;const v=l.value[p],b=(g=t.getClassName)===null||g===void 0?void 0:g.call(t,p),y=(m=t.getStyles)===null||m===void 0?void 0:m.call(t,p),w=v.map((S,_)=>{let{notice:P,holderCallback:O}=S;const T=_===r.value.length-1?P.updateMark:void 0,{key:M,userPassKey:I}=P,{content:k}=P,E=A(A(A({prefixCls:d,closeIcon:typeof f=="function"?f({prefixCls:d}):f},P),P.props),{key:M,noticeKey:I||M,updateMark:T,onClose:R=>{var D;s(R),(D=P.onClose)===null||D===void 0||D.call(P)},onClick:P.onClick});return O?C("div",{key:M,class:`${d}-hook-holder`,ref:R=>{typeof M>"u"||(R?(o.set(M,R),O(R,E)):o.delete(M))}},null):C(fL,H(H({},E),{},{class:ce(E.class,t.hashId)}),{default:()=>[typeof k=="function"?k({prefixCls:d}):k]})}),x={[d]:1,[`${d}-${p}`]:1,[n.class]:!!n.class,[t.hashId]:!0,[b]:!!b};function $(){var S;v.length>0||(Reflect.deleteProperty(l.value,p),(S=t.onAllRemoved)===null||S===void 0||S.call(t))}return C("div",{key:p,class:x,style:n.style||y||{top:"65px",left:"50%"}},[C(tm,H(H({tag:"div"},a.value),{},{onAfterLeave:$}),{default:()=>[w]})])});return C(pR,{getContainer:t.getContainer},{default:()=>[h]})}}});var Lae=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);odocument.body;let FP=0;function Nae(){const t={};for(var e=arguments.length,n=new Array(e),i=0;i{o&&Object.keys(o).forEach(r=>{const a=o[r];a!==void 0&&(t[r]=a)})}),t}function hL(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{getContainer:e=Fae,motion:n,prefixCls:i,maxCount:o,getClassName:r,getStyles:a,onAllRemoved:s}=t,l=Lae(t,["getContainer","motion","prefixCls","maxCount","getClassName","getStyles","onAllRemoved"]),c=ie([]),u=ie(),d=(v,b)=>{const y=v.key||LP(),w=A(A({},v),{key:y}),x=c.value.map(S=>S.notice.key).indexOf(y),$=c.value.concat();x!==-1?$.splice(x,1,{notice:w,holderCallback:b}):(o&&c.value.length>=o&&(w.key=$[0].notice.key,w.updateMark=LP(),w.userPassKey=y,$.shift()),$.push({notice:w,holderCallback:b})),c.value=$},f=v=>{c.value=c.value.filter(b=>{let{notice:{key:y,userPassKey:w}}=b;return(w||y)!==v})},h=()=>{c.value=[]},p=()=>C(Rae,{ref:u,prefixCls:i,maxCount:o,notices:c.value,remove:f,getClassName:r,getStyles:a,animation:n,hashId:t.hashId,onAllRemoved:s,getContainer:e},null),g=ie([]),m={open:v=>{const b=Nae(l,v);(b.key===null||b.key===void 0)&&(b.key=`vc-notification-${FP}`,FP+=1),g.value=[...g.value,{type:"open",config:b}]},close:v=>{g.value=[...g.value,{type:"close",key:v}]},destroy:()=>{g.value=[...g.value,{type:"destroy"}]}};return ye(g,()=>{g.value.length&&(g.value.forEach(v=>{switch(v.type){case"open":d(v.config);break;case"close":f(v.key);break;case"destroy":h();break}}),g.value=[])}),[m,p]}const Bae=t=>{const{componentCls:e,iconCls:n,boxShadowSecondary:i,colorBgElevated:o,colorSuccess:r,colorError:a,colorWarning:s,colorInfo:l,fontSizeLG:c,motionEaseInOutCirc:u,motionDurationSlow:d,marginXS:f,paddingXS:h,borderRadiusLG:p,zIndexPopup:g,messageNoticeContentPadding:m}=t,v=new mt("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:h,transform:"translateY(0)",opacity:1}}),b=new mt("MessageMoveOut",{"0%":{maxHeight:t.height,padding:h,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}});return[{[e]:A(A({},rt(t)),{position:"fixed",top:f,left:"50%",transform:"translateX(-50%)",width:"100%",pointerEvents:"none",zIndex:g,[`${e}-move-up`]:{animationFillMode:"forwards"},[` + `,a=Math.round((t.controlHeight-t.fontSize*t.lineHeight)/2);return[{[n]:{width:t.controlWidth}},{[`${n}-dropdown`]:[tv(`${e}-checkbox`,t),{[`&${i}-select-dropdown`]:{padding:0}},{[n]:{"&-checkbox":{top:0,marginInlineEnd:t.paddingXS},"&-menus":{display:"flex",flexWrap:"nowrap",alignItems:"flex-start",[`&${n}-menu-empty`]:{[`${n}-menu`]:{width:"100%",height:"auto",[o]:{color:t.colorTextDisabled}}}},"&-menu":{flexGrow:1,minWidth:t.controlItemWidth,height:t.dropdownHeight,margin:0,padding:t.paddingXXS,overflow:"auto",verticalAlign:"top",listStyle:"none","-ms-overflow-style":"-ms-autohiding-scrollbar","&:not(:last-child)":{borderInlineEnd:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`},"&-item":A(A({},un),{display:"flex",flexWrap:"nowrap",alignItems:"center",padding:`${a}px ${t.paddingSM}px`,lineHeight:t.lineHeight,cursor:"pointer",transition:`all ${t.motionDurationMid}`,borderRadius:t.borderRadiusSM,"&:hover":{background:t.controlItemBgHover},"&-disabled":{color:t.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"},[r]:{color:t.colorTextDisabled}},[`&-active:not(${o}-disabled)`]:{"&, &:hover":{fontWeight:t.fontWeightStrong,backgroundColor:t.controlItemBgActive}},"&-content":{flex:"auto"},[r]:{marginInlineStart:t.paddingXXS,color:t.colorTextDescription,fontSize:t.fontSizeIcon},"&-keyword":{color:t.colorHighlight}})}}}]},{[`${n}-dropdown-rtl`]:{direction:"rtl"}},Mc(t)]},fae=et("Cascader",t=>[dae(t)],{controlWidth:184,controlItemWidth:111,dropdownHeight:180});var hae=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);ol===0?[s]:[...a,e,s],[]),o=[];let r=0;return i.forEach((a,s)=>{const l=r+a.length;let c=t.slice(r,l);r=l,s%2===1&&(c=C("span",{class:`${n}-menu-item-keyword`,key:"seperator"},[c])),o.push(c)}),o}const gae=t=>{let{inputValue:e,path:n,prefixCls:i,fieldNames:o}=t;const r=[],a=e.toLowerCase();return n.forEach((s,l)=>{l!==0&&r.push(" / ");let c=s[o.label];const u=typeof c;(u==="string"||u==="number")&&(c=pae(String(c),a,i)),r.push(c)}),r};function mae(){return A(A({},ht(K4(),["customSlots","checkable","options"])),{multiple:{type:Boolean,default:void 0},size:String,bordered:{type:Boolean,default:void 0},placement:{type:String},suffixIcon:Z.any,status:String,options:Array,popupClassName:String,dropdownClassName:String,"onUpdate:value":Function})}const vae=oe({compatConfig:{MODE:3},name:"ACascader",inheritAttrs:!1,props:ct(mae(),{bordered:!0,choiceTransitionName:"",allowClear:!0}),setup(t,e){let{attrs:n,expose:i,slots:o,emit:r}=e;const a=vn(),s=Mn.useInject(),l=L(()=>zo(s.status,t.status)),{prefixCls:c,rootPrefixCls:u,getPrefixCls:d,direction:f,getPopupContainer:h,renderEmpty:p,size:g,disabled:m}=Me("cascader",t),v=L(()=>d("select",t.prefixCls)),{compactSize:b,compactItemClassnames:y}=Ra(v,f),w=L(()=>b.value||g.value),x=Oi(),$=L(()=>{var F;return(F=m.value)!==null&&F!==void 0?F:x.value}),[S,_]=X1(v),[P]=fae(c),O=L(()=>f.value==="rtl"),T=L(()=>{if(!t.showSearch)return t.showSearch;let F={render:gae};return typeof t.showSearch=="object"&&(F=A(A({},F),t.showSearch)),F}),M=L(()=>ce(t.popupClassName||t.dropdownClassName,`${c.value}-dropdown`,{[`${c.value}-dropdown-rtl`]:O.value},_.value)),I=se();i({focus(){var F;(F=I.value)===null||F===void 0||F.focus()},blur(){var F;(F=I.value)===null||F===void 0||F.blur()}});const k=function(){for(var F=arguments.length,N=new Array(F),B=0;Bt.showArrow!==void 0?t.showArrow:t.loading||!t.multiple),D=L(()=>t.placement!==void 0?t.placement:f.value==="rtl"?"bottomRight":"bottomLeft");return()=>{var F,N;const{notFoundContent:B=(F=o.notFoundContent)===null||F===void 0?void 0:F.call(o),expandIcon:z=(N=o.expandIcon)===null||N===void 0?void 0:N.call(o),multiple:W,bordered:j,allowClear:U,choiceTransitionName:V,transitionName:q,id:Y=a.id.value}=t,J=hae(t,["notFoundContent","expandIcon","multiple","bordered","allowClear","choiceTransitionName","transitionName","id"]),Q=B||p("Cascader");let G=z;z||(G=O.value?C(cr,null,null):C(qi,null,null));const ee=C("span",{class:`${v.value}-menu-item-loading-icon`},[C(yi,{spin:!0},null)]),{suffixIcon:X,removeIcon:K,clearIcon:te}=O1(A(A({},t),{hasFeedback:s.hasFeedback,feedbackIcon:s.feedbackIcon,multiple:W,prefixCls:v.value,showArrow:R.value}),o);return P(S(C(Loe,H(H(H({},J),n),{},{id:Y,prefixCls:v.value,class:[c.value,{[`${v.value}-lg`]:w.value==="large",[`${v.value}-sm`]:w.value==="small",[`${v.value}-rtl`]:O.value,[`${v.value}-borderless`]:!j,[`${v.value}-in-form-item`]:s.isFormItemInput},ei(v.value,l.value,s.hasFeedback),y.value,n.class,_.value],disabled:$.value,direction:f.value,placement:D.value,notFoundContent:Q,allowClear:U,showSearch:T.value,expandIcon:G,inputIcon:X,removeIcon:K,clearIcon:te,loadingIcon:ee,checkable:!!W,dropdownClassName:M.value,dropdownPrefixCls:c.value,choiceTransitionName:oi(u.value,"",V),transitionName:oi(u.value,b1(D.value),q),getPopupContainer:h==null?void 0:h.value,customSlots:A(A({},o),{checkable:()=>C("span",{class:`${c.value}-checkbox-inner`},null)}),tagRender:t.tagRender||o.tagRender,displayRender:t.displayRender||o.displayRender,maxTagPlaceholder:t.maxTagPlaceholder||o.maxTagPlaceholder,showArrow:s.hasFeedback||t.showArrow,onChange:k,onBlur:E,ref:I}),o)))}}}),bae=Vt(A(vae,{SHOW_CHILD:N4,SHOW_PARENT:F4})),yae=()=>({name:String,prefixCls:String,options:xt([]),disabled:Boolean,id:String}),xae=()=>A(A({},yae()),{defaultValue:xt(),value:xt(),onChange:ve(),"onUpdate:value":ve()}),wae=()=>({prefixCls:String,defaultChecked:Ce(),checked:Ce(),disabled:Ce(),isGroup:Ce(),value:Z.any,name:String,id:String,indeterminate:Ce(),type:Ne("checkbox"),autofocus:Ce(),onChange:ve(),"onUpdate:checked":ve(),onClick:ve(),skipGroup:Ce(!1)}),Sae=()=>A(A({},wae()),{indeterminate:Ce(!1)}),uL=Symbol("CheckboxGroupContext");var IP=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o(p==null?void 0:p.disabled.value)||u.value);Ke(()=>{!t.skipGroup&&p&&p.registerValue(g,t.value)}),at(()=>{p&&p.cancelValue(g)}),Ze(()=>{Gi(!!(t.checked!==void 0||p||t.value===void 0))});const v=x=>{const $=x.target.checked;n("update:checked",$),n("change",x),a.onFieldChange()},b=se();return r({focus:()=>{var x;(x=b.value)===null||x===void 0||x.focus()},blur:()=>{var x;(x=b.value)===null||x===void 0||x.blur()}}),()=>{var x;const $=Dt((x=o.default)===null||x===void 0?void 0:x.call(o)),{indeterminate:S,skipGroup:_,id:P=a.id.value}=t,O=IP(t,["indeterminate","skipGroup","id"]),{onMouseenter:T,onMouseleave:M,onInput:I,class:k,style:E}=i,R=IP(i,["onMouseenter","onMouseleave","onInput","class","style"]),D=A(A(A(A({},O),{id:P,prefixCls:l.value}),R),{disabled:m.value});p&&!_?(D.onChange=function(){for(var z=arguments.length,W=new Array(z),j=0;j`${s.value}-group`),[u,d]=cL(c),f=se((t.value===void 0?t.defaultValue:t.value)||[]);ye(()=>t.value,()=>{f.value=t.value||[]});const h=L(()=>t.options.map(w=>typeof w=="string"||typeof w=="number"?{label:w,value:w}:w)),p=se(Symbol()),g=se(new Map),m=w=>{g.value.delete(w),p.value=Symbol()},v=(w,x)=>{g.value.set(w,x),p.value=Symbol()},b=se(new Map);return ye(p,()=>{const w=new Map;for(const x of g.value.values())w.set(x,!0);b.value=w}),ot(uL,{cancelValue:m,registerValue:v,toggleOption:w=>{const x=f.value.indexOf(w.value),$=[...f.value];x===-1?$.push(w.value):$.splice(x,1),t.value===void 0&&(f.value=$);const S=$.filter(_=>b.value.has(_)).sort((_,P)=>{const O=h.value.findIndex(M=>M.value===_),T=h.value.findIndex(M=>M.value===P);return O-T});o("update:value",S),o("change",S),a.onFieldChange()},mergedValue:f,name:L(()=>t.name),disabled:L(()=>t.disabled)}),r({mergedValue:f}),()=>{var w;const{id:x=a.id.value}=t;let $=null;return h.value&&h.value.length>0&&($=h.value.map(S=>{var _;return C(ho,{prefixCls:s.value,key:S.value.toString(),disabled:"disabled"in S?S.disabled:t.disabled,indeterminate:S.indeterminate,value:S.value,checked:f.value.indexOf(S.value)!==-1,onChange:S.onChange,class:`${c.value}-item`},{default:()=>[n.label!==void 0?(_=n.label)===null||_===void 0?void 0:_.call(n,S):S.label]})})),u(C("div",H(H({},i),{},{class:[c.value,{[`${c.value}-rtl`]:l.value==="rtl"},i.class,d.value],id:x}),[$||((w=n.default)===null||w===void 0?void 0:w.call(n))]))}}});ho.Group=lg;ho.install=function(t){return t.component(ho.name,ho),t.component(lg.name,lg),t};const Cae={useBreakpoint:Ic},$ae=Vt(ev),Aae=t=>{const{componentCls:e,commentBg:n,commentPaddingBase:i,commentNestIndent:o,commentFontSizeBase:r,commentFontSizeSm:a,commentAuthorNameColor:s,commentAuthorTimeColor:l,commentActionColor:c,commentActionHoverColor:u,commentActionsMarginBottom:d,commentActionsMarginTop:f,commentContentDetailPMarginBottom:h}=t;return{[e]:{position:"relative",backgroundColor:n,[`${e}-inner`]:{display:"flex",padding:i},[`${e}-avatar`]:{position:"relative",flexShrink:0,marginRight:t.marginSM,cursor:"pointer",img:{width:"32px",height:"32px",borderRadius:"50%"}},[`${e}-content`]:{position:"relative",flex:"1 1 auto",minWidth:"1px",fontSize:r,wordWrap:"break-word","&-author":{display:"flex",flexWrap:"wrap",justifyContent:"flex-start",marginBottom:t.marginXXS,fontSize:r,"& > a,& > span":{paddingRight:t.paddingXS,fontSize:a,lineHeight:"18px"},"&-name":{color:s,fontSize:r,transition:`color ${t.motionDurationSlow}`,"> *":{color:s,"&:hover":{color:s}}},"&-time":{color:l,whiteSpace:"nowrap",cursor:"auto"}},"&-detail p":{marginBottom:h,whiteSpace:"pre-wrap"}},[`${e}-actions`]:{marginTop:f,marginBottom:d,paddingLeft:0,"> li":{display:"inline-block",color:c,"> span":{marginRight:"10px",color:c,fontSize:a,cursor:"pointer",transition:`color ${t.motionDurationSlow}`,userSelect:"none","&:hover":{color:u}}}},[`${e}-nested`]:{marginLeft:o},"&-rtl":{direction:"rtl"}}}},_ae=et("Comment",t=>{const e=Ve(t,{commentBg:"inherit",commentPaddingBase:`${t.paddingMD}px 0`,commentNestIndent:"44px",commentFontSizeBase:t.fontSize,commentFontSizeSm:t.fontSizeSM,commentAuthorNameColor:t.colorTextTertiary,commentAuthorTimeColor:t.colorTextPlaceholder,commentActionColor:t.colorTextTertiary,commentActionHoverColor:t.colorTextSecondary,commentActionsMarginBottom:"inherit",commentActionsMarginTop:t.marginSM,commentContentDetailPMarginBottom:"inherit"});return[Aae(e)]}),Pae=()=>({actions:Array,author:Z.any,avatar:Z.any,content:Z.any,prefixCls:String,datetime:Z.any}),Tae=oe({compatConfig:{MODE:3},name:"AComment",inheritAttrs:!1,props:Pae(),slots:Object,setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,direction:r}=Me("comment",t),[a,s]=_ae(o),l=(u,d)=>C("div",{class:`${u}-nested`},[d]),c=u=>!u||!u.length?null:u.map((f,h)=>C("li",{key:`action-${h}`},[f]));return()=>{var u,d,f,h,p,g,m,v,b,y,w;const x=o.value,$=(u=t.actions)!==null&&u!==void 0?u:(d=n.actions)===null||d===void 0?void 0:d.call(n),S=(f=t.author)!==null&&f!==void 0?f:(h=n.author)===null||h===void 0?void 0:h.call(n),_=(p=t.avatar)!==null&&p!==void 0?p:(g=n.avatar)===null||g===void 0?void 0:g.call(n),P=(m=t.content)!==null&&m!==void 0?m:(v=n.content)===null||v===void 0?void 0:v.call(n),O=(b=t.datetime)!==null&&b!==void 0?b:(y=n.datetime)===null||y===void 0?void 0:y.call(n),T=C("div",{class:`${x}-avatar`},[typeof _=="string"?C("img",{src:_,alt:"comment-avatar"},null):_]),M=$?C("ul",{class:`${x}-actions`},[c(Array.isArray($)?$:[$])]):null,I=C("div",{class:`${x}-content-author`},[S&&C("span",{class:`${x}-content-author-name`},[S]),O&&C("span",{class:`${x}-content-author-time`},[O])]),k=C("div",{class:`${x}-content`},[I,C("div",{class:`${x}-content-detail`},[P]),M]),E=C("div",{class:`${x}-inner`},[T,k]),R=Dt((w=n.default)===null||w===void 0?void 0:w.call(n));return a(C("div",H(H({},i),{},{class:[x,{[`${x}-rtl`]:r.value==="rtl"},i.class,s.value]}),[E,R&&R.length?l(x,R):null]))}}}),Oae=Vt(Tae);let Mh=A({},bi.Modal);function Eae(t){t?Mh=A(A({},Mh),t):Mh=A({},bi.Modal)}function Mae(){return Mh}const ex="internalMark",Ih=oe({compatConfig:{MODE:3},name:"ALocaleProvider",props:{locale:{type:Object},ANT_MARK__:String},setup(t,e){let{slots:n}=e;Gi(t.ANT_MARK__===ex);const i=$t({antLocale:A(A({},t.locale),{exist:!0}),ANT_MARK__:ex});return ot("localeData",i),ye(()=>t.locale,o=>{Eae(o&&o.Modal),i.antLocale=A(A({},o),{exist:!0})},{immediate:!0}),()=>{var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}});Ih.install=function(t){return t.component(Ih.name,Ih),t};const dL=Vt(Ih),fL=oe({name:"Notice",inheritAttrs:!1,props:["prefixCls","duration","updateMark","noticeKey","closeIcon","closable","props","onClick","onClose","holder","visible"],setup(t,e){let{attrs:n,slots:i}=e,o,r=!1;const a=L(()=>t.duration===void 0?4.5:t.duration),s=()=>{a.value&&!r&&(o=setTimeout(()=>{c()},a.value*1e3))},l=()=>{o&&(clearTimeout(o),o=null)},c=d=>{d&&d.stopPropagation(),l();const{onClose:f,noticeKey:h}=t;f&&f(h)},u=()=>{l(),s()};return Ze(()=>{s()}),Xn(()=>{r=!0,l()}),ye([a,()=>t.updateMark,()=>t.visible],(d,f)=>{let[h,p,g]=d,[m,v,b]=f;(h!==m||p!==v||g!==b&&b)&&u()},{flush:"post"}),()=>{var d,f;const{prefixCls:h,closable:p,closeIcon:g=(d=i.closeIcon)===null||d===void 0?void 0:d.call(i),onClick:m,holder:v}=t,{class:b,style:y}=n,w=`${h}-notice`,x=Object.keys(n).reduce((S,_)=>((_.startsWith("data-")||_.startsWith("aria-")||_==="role")&&(S[_]=n[_]),S),{}),$=C("div",H({class:ce(w,b,{[`${w}-closable`]:p}),style:y,onMouseenter:l,onMouseleave:s,onClick:m},x),[C("div",{class:`${w}-content`},[(f=i.default)===null||f===void 0?void 0:f.call(i)]),p?C("a",{tabindex:0,onClick:c,class:`${w}-close`},[g||C("span",{class:`${w}-close-x`},null)]):null]);return v?C(Ow,{to:v},{default:()=>$}):$}}});var Iae=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{const{prefixCls:u,animation:d="fade"}=t;let f=t.transitionName;return!f&&d&&(f=`${u}-${d}`),Sm(f)}),l=(u,d)=>{const f=u.key||DP(),h=A(A({},u),{key:f}),{maxCount:p}=t,g=a.value.map(v=>v.notice.key).indexOf(f),m=a.value.concat();g!==-1?m.splice(g,1,{notice:h,holderCallback:d}):(p&&a.value.length>=p&&(h.key=m[0].notice.key,h.updateMark=DP(),h.userPassKey=f,m.shift()),m.push({notice:h,holderCallback:d})),a.value=m},c=u=>{a.value=dt(a.value).filter(d=>{let{notice:{key:f,userPassKey:h}}=d;return(h||f)!==u})};return i({add:l,remove:c,notices:a}),()=>{var u;const{prefixCls:d,closeIcon:f=(u=o.closeIcon)===null||u===void 0?void 0:u.call(o,{prefixCls:d})}=t,h=a.value.map((g,m)=>{let{notice:v,holderCallback:b}=g;const y=m===a.value.length-1?v.updateMark:void 0,{key:w,userPassKey:x}=v,{content:$}=v,S=A(A(A({prefixCls:d,closeIcon:typeof f=="function"?f({prefixCls:d}):f},v),v.props),{key:w,noticeKey:x||w,updateMark:y,onClose:_=>{var P;c(_),(P=v.onClose)===null||P===void 0||P.call(v)},onClick:v.onClick});return b?C("div",{key:w,class:`${d}-hook-holder`,ref:_=>{typeof w>"u"||(_?(r.set(w,_),b(_,S)):r.delete(w))}},null):C(fL,H(H({},S),{},{class:ce(S.class,t.hashId)}),{default:()=>[typeof $=="function"?$({prefixCls:d}):$]})}),p={[d]:1,[n.class]:!!n.class,[t.hashId]:!0};return C("div",{class:p,style:n.style||{top:"65px",left:"50%"}},[C(nm,H({tag:"div"},s.value),{default:()=>[h]})])}}});cg.newInstance=function(e,n){const i=e||{},{name:o="notification",getContainer:r,appContext:a,prefixCls:s,rootPrefixCls:l,transitionName:c,hasTransitionName:u,useStyle:d}=i,f=Iae(i,["name","getContainer","appContext","prefixCls","rootPrefixCls","transitionName","hasTransitionName","useStyle"]),h=document.createElement("div");r?r().appendChild(h):document.body.appendChild(h);const g=C(oe({compatConfig:{MODE:3},name:"NotificationWrapper",setup(m,v){let{attrs:b}=v;const y=ie(),w=L(()=>Fn.getPrefixCls(o,s)),[,x]=d(w);return Ze(()=>{n({notice($){var S;(S=y.value)===null||S===void 0||S.add($)},removeNotice($){var S;(S=y.value)===null||S===void 0||S.remove($)},destroy(){Pa(null,h),h.parentNode&&h.parentNode.removeChild(h)},component:y})}),()=>{const $=Fn,S=$.getRootPrefixCls(l,w.value),_=u?c:`${w.value}-${c}`;return C(As,H(H({},$),{},{prefixCls:S}),{default:()=>[C(cg,H(H({ref:y},b),{},{prefixCls:w.value,transitionName:_,hashId:x.value}),null)]})}}}),f);g.appContext=a||g.appContext,Pa(g,h)};let RP=0;const Dae=Date.now();function LP(){const t=RP;return RP+=1,`rcNotification_${Dae}_${t}`}const Rae=oe({name:"HookNotification",inheritAttrs:!1,props:["prefixCls","transitionName","animation","maxCount","closeIcon","hashId","remove","notices","getStyles","getClassName","onAllRemoved","getContainer"],setup(t,e){let{attrs:n,slots:i}=e;const o=new Map,r=L(()=>t.notices),a=L(()=>{let u=t.transitionName;if(!u&&t.animation)switch(typeof t.animation){case"string":u=t.animation;break;case"function":u=t.animation().name;break;case"object":u=t.animation.name;break;default:u=`${t.prefixCls}-fade`;break}return Sm(u)}),s=u=>t.remove(u),l=se({});ye(r,()=>{const u={};Object.keys(l.value).forEach(d=>{u[d]=[]}),t.notices.forEach(d=>{const{placement:f="topRight"}=d.notice;f&&(u[f]=u[f]||[],u[f].push(d))}),l.value=u});const c=L(()=>Object.keys(l.value));return()=>{var u;const{prefixCls:d,closeIcon:f=(u=i.closeIcon)===null||u===void 0?void 0:u.call(i,{prefixCls:d})}=t,h=c.value.map(p=>{var g,m;const v=l.value[p],b=(g=t.getClassName)===null||g===void 0?void 0:g.call(t,p),y=(m=t.getStyles)===null||m===void 0?void 0:m.call(t,p),w=v.map((S,_)=>{let{notice:P,holderCallback:O}=S;const T=_===r.value.length-1?P.updateMark:void 0,{key:M,userPassKey:I}=P,{content:k}=P,E=A(A(A({prefixCls:d,closeIcon:typeof f=="function"?f({prefixCls:d}):f},P),P.props),{key:M,noticeKey:I||M,updateMark:T,onClose:R=>{var D;s(R),(D=P.onClose)===null||D===void 0||D.call(P)},onClick:P.onClick});return O?C("div",{key:M,class:`${d}-hook-holder`,ref:R=>{typeof M>"u"||(R?(o.set(M,R),O(R,E)):o.delete(M))}},null):C(fL,H(H({},E),{},{class:ce(E.class,t.hashId)}),{default:()=>[typeof k=="function"?k({prefixCls:d}):k]})}),x={[d]:1,[`${d}-${p}`]:1,[n.class]:!!n.class,[t.hashId]:!0,[b]:!!b};function $(){var S;v.length>0||(Reflect.deleteProperty(l.value,p),(S=t.onAllRemoved)===null||S===void 0||S.call(t))}return C("div",{key:p,class:x,style:n.style||y||{top:"65px",left:"50%"}},[C(nm,H(H({tag:"div"},a.value),{},{onAfterLeave:$}),{default:()=>[w]})])});return C(pR,{getContainer:t.getContainer},{default:()=>[h]})}}});var Lae=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);odocument.body;let FP=0;function Nae(){const t={};for(var e=arguments.length,n=new Array(e),i=0;i{o&&Object.keys(o).forEach(r=>{const a=o[r];a!==void 0&&(t[r]=a)})}),t}function hL(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{getContainer:e=Fae,motion:n,prefixCls:i,maxCount:o,getClassName:r,getStyles:a,onAllRemoved:s}=t,l=Lae(t,["getContainer","motion","prefixCls","maxCount","getClassName","getStyles","onAllRemoved"]),c=ie([]),u=ie(),d=(v,b)=>{const y=v.key||LP(),w=A(A({},v),{key:y}),x=c.value.map(S=>S.notice.key).indexOf(y),$=c.value.concat();x!==-1?$.splice(x,1,{notice:w,holderCallback:b}):(o&&c.value.length>=o&&(w.key=$[0].notice.key,w.updateMark=LP(),w.userPassKey=y,$.shift()),$.push({notice:w,holderCallback:b})),c.value=$},f=v=>{c.value=c.value.filter(b=>{let{notice:{key:y,userPassKey:w}}=b;return(w||y)!==v})},h=()=>{c.value=[]},p=()=>C(Rae,{ref:u,prefixCls:i,maxCount:o,notices:c.value,remove:f,getClassName:r,getStyles:a,animation:n,hashId:t.hashId,onAllRemoved:s,getContainer:e},null),g=ie([]),m={open:v=>{const b=Nae(l,v);(b.key===null||b.key===void 0)&&(b.key=`vc-notification-${FP}`,FP+=1),g.value=[...g.value,{type:"open",config:b}]},close:v=>{g.value=[...g.value,{type:"close",key:v}]},destroy:()=>{g.value=[...g.value,{type:"destroy"}]}};return ye(g,()=>{g.value.length&&(g.value.forEach(v=>{switch(v.type){case"open":d(v.config);break;case"close":f(v.key);break;case"destroy":h();break}}),g.value=[])}),[m,p]}const Bae=t=>{const{componentCls:e,iconCls:n,boxShadowSecondary:i,colorBgElevated:o,colorSuccess:r,colorError:a,colorWarning:s,colorInfo:l,fontSizeLG:c,motionEaseInOutCirc:u,motionDurationSlow:d,marginXS:f,paddingXS:h,borderRadiusLG:p,zIndexPopup:g,messageNoticeContentPadding:m}=t,v=new mt("MessageMoveIn",{"0%":{padding:0,transform:"translateY(-100%)",opacity:0},"100%":{padding:h,transform:"translateY(0)",opacity:1}}),b=new mt("MessageMoveOut",{"0%":{maxHeight:t.height,padding:h,opacity:1},"100%":{maxHeight:0,padding:0,opacity:0}});return[{[e]:A(A({},rt(t)),{position:"fixed",top:f,left:"50%",transform:"translateX(-50%)",width:"100%",pointerEvents:"none",zIndex:g,[`${e}-move-up`]:{animationFillMode:"forwards"},[` ${e}-move-up-appear, ${e}-move-up-enter `]:{animationName:v,animationDuration:d,animationPlayState:"paused",animationTimingFunction:u},[` @@ -341,15 +341,15 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho ${e}-move-up-enter${e}-move-up-enter-active `]:{animationPlayState:"running"},[`${e}-move-up-leave`]:{animationName:b,animationDuration:d,animationPlayState:"paused",animationTimingFunction:u},[`${e}-move-up-leave${e}-move-up-leave-active`]:{animationPlayState:"running"},"&-rtl":{direction:"rtl",span:{direction:"rtl"}}})},{[`${e}-notice`]:{padding:h,textAlign:"center",[n]:{verticalAlign:"text-bottom",marginInlineEnd:f,fontSize:c},[`${e}-notice-content`]:{display:"inline-block",padding:m,background:o,borderRadius:p,boxShadow:i,pointerEvents:"all"},[`${e}-success ${n}`]:{color:r},[`${e}-error ${n}`]:{color:a},[`${e}-warning ${n}`]:{color:s},[` ${e}-info ${n}, - ${e}-loading ${n}`]:{color:l}}},{[`${e}-notice-pure-panel`]:{padding:0,textAlign:"start"}}]},pL=et("Message",t=>{const e=Ve(t,{messageNoticeContentPadding:`${(t.controlHeightLG-t.fontSize*t.lineHeight)/2}px ${t.paddingSM}px`});return[Bae(e)]},t=>({height:150,zIndexPopup:t.zIndexPopupBase+10})),zae={info:C(La,null,null),success:C(Ho,null,null),error:C(si,null,null),warning:C(Wo,null,null),loading:C(yi,null,null)},Hae=oe({name:"PureContent",inheritAttrs:!1,props:["prefixCls","type","icon"],setup(t,e){let{slots:n}=e;return()=>{var i;return C("div",{class:ce(`${t.prefixCls}-custom-content`,`${t.prefixCls}-${t.type}`)},[t.icon||zae[t.type],C("span",null,[(i=n.default)===null||i===void 0?void 0:i.call(n)])])}}});var Wae=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);or("message",t.prefixCls)),[,l]=pL(s),c=()=>{var g;const m=(g=t.top)!==null&&g!==void 0?g:jae;return{left:"50%",transform:"translateX(-50%)",top:typeof m=="number"?`${m}px`:m}},u=()=>ce(l.value,t.rtl?`${s.value}-rtl`:""),d=()=>{var g;return i1({prefixCls:s.value,animation:(g=t.animation)!==null&&g!==void 0?g:"move-up",transitionName:t.transitionName})},f=C("span",{class:`${s.value}-close-x`},[C(ai,{class:`${s.value}-close-icon`},null)]),[h,p]=hL({getStyles:c,prefixCls:s.value,getClassName:u,motion:d,closable:!1,closeIcon:f,duration:(i=t.duration)!==null&&i!==void 0?i:Vae,getContainer:(o=t.staticGetContainer)!==null&&o!==void 0?o:a.value,maxCount:t.maxCount,onAllRemoved:t.onAllRemoved});return n(A(A({},h),{prefixCls:s,hashId:l})),p}});let NP=0;function Yae(t){const e=ie(null),n=Symbol("messageHolderKey"),i=l=>{var c;(c=e.value)===null||c===void 0||c.close(l)},o=l=>{if(!e.value){const x=()=>{};return x.then=()=>{},x}const{open:c,prefixCls:u,hashId:d}=e.value,f=`${u}-notice`,{content:h,icon:p,type:g,key:m,class:v,onClose:b}=l,y=Wae(l,["content","icon","type","key","class","onClose"]);let w=m;return w==null&&(NP+=1,w=`antd-message-${NP}`),NH(x=>(c(A(A({},y),{key:w,content:()=>C(Hae,{prefixCls:u,type:g,icon:typeof p=="function"?p():p},{default:()=>[typeof h=="function"?h():h]}),placement:"top",class:ce(g&&`${f}-${g}`,d,v),onClose:()=>{b==null||b(),x()}})),()=>{i(w)}))},a={open:o,destroy:l=>{var c;l!==void 0?i(l):(c=e.value)===null||c===void 0||c.destroy()}};return["info","success","warning","error","loading"].forEach(l=>{const c=(u,d,f)=>{let h;u&&typeof u=="object"&&"content"in u?h=u:h={content:u};let p,g;typeof d=="function"?g=d:(p=d,g=f);const m=A(A({onClose:g,duration:p},h),{type:l});return o(m)};a[l]=c}),[a,()=>C(Xae,H(H({key:n},t),{},{ref:e}),null)]}function gL(t){return Yae(t)}let mL=3,vL,hi,Gae=1,bL="",yL="move-up",xL=!1,wL=()=>document.body,SL,CL=!1;function Kae(){return Gae++}function Uae(t){t.top!==void 0&&(vL=t.top,hi=null),t.duration!==void 0&&(mL=t.duration),t.prefixCls!==void 0&&(bL=t.prefixCls),t.getContainer!==void 0&&(wL=t.getContainer,hi=null),t.transitionName!==void 0&&(yL=t.transitionName,hi=null,xL=!0),t.maxCount!==void 0&&(SL=t.maxCount,hi=null),t.rtl!==void 0&&(CL=t.rtl)}function qae(t,e){if(hi){e(hi);return}lg.newInstance({appContext:t.appContext,prefixCls:t.prefixCls||bL,rootPrefixCls:t.rootPrefixCls,transitionName:yL,hasTransitionName:xL,style:{top:vL},getContainer:wL||t.getPopupContainer,maxCount:SL,name:"message",useStyle:pL},n=>{if(hi){e(hi);return}hi=n,e(n)})}const $L={info:La,success:Ho,error:si,warning:Wo,loading:yi},Zae=Object.keys($L);function Jae(t){const e=t.duration!==void 0?t.duration:mL,n=t.key||Kae(),i=new Promise(r=>{const a=()=>(typeof t.onClose=="function"&&t.onClose(),r(!0));qae(t,s=>{s.notice({key:n,duration:e,style:t.style||{},class:t.class,content:l=>{let{prefixCls:c}=l;const u=$L[t.type],d=u?C(u,null,null):"",f=ce(`${c}-custom-content`,{[`${c}-${t.type}`]:t.type,[`${c}-rtl`]:CL===!0});return C("div",{class:f},[typeof t.icon=="function"?t.icon():t.icon||d,C("span",null,[typeof t.content=="function"?t.content():t.content])])},onClose:a,onClick:t.onClick})})}),o=()=>{hi&&hi.removeNotice(n)};return o.then=(r,a)=>i.then(r,a),o.promise=i,o}function Qae(t){return Object.prototype.toString.call(t)==="[object Object]"&&!!t.content}const Ns={open:Jae,config:Uae,destroy(t){if(hi)if(t){const{removeNotice:e}=hi;e(t)}else{const{destroy:e}=hi;e(),hi=null}}};function ese(t,e){t[e]=(n,i,o)=>Qae(n)?t.open(A(A({},n),{type:e})):(typeof i=="function"&&(o=i,i=void 0),t.open({content:n,duration:i,type:e,onClose:o}))}Zae.forEach(t=>ese(Ns,t));Ns.warn=Ns.warning;Ns.useMessage=gL;const tse=t=>{const{componentCls:e,width:n,notificationMarginEdge:i}=t,o=new mt("antNotificationTopFadeIn",{"0%":{marginTop:"-100%",opacity:0},"100%":{marginTop:0,opacity:1}}),r=new mt("antNotificationBottomFadeIn",{"0%":{marginBottom:"-100%",opacity:0},"100%":{marginBottom:0,opacity:1}}),a=new mt("antNotificationLeftFadeIn",{"0%":{right:{_skip_check_:!0,value:n},opacity:0},"100%":{right:{_skip_check_:!0,value:0},opacity:1}});return{[`&${e}-top, &${e}-bottom`]:{marginInline:0},[`&${e}-top`]:{[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationName:o}},[`&${e}-bottom`]:{[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationName:r}},[`&${e}-topLeft, &${e}-bottomLeft`]:{marginInlineEnd:0,marginInlineStart:i,[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationName:a}}}},nse=t=>{const{iconCls:e,componentCls:n,boxShadowSecondary:i,fontSizeLG:o,notificationMarginBottom:r,borderRadiusLG:a,colorSuccess:s,colorInfo:l,colorWarning:c,colorError:u,colorTextHeading:d,notificationBg:f,notificationPadding:h,notificationMarginEdge:p,motionDurationMid:g,motionEaseInOut:m,fontSize:v,lineHeight:b,width:y,notificationIconSize:w}=t,x=`${n}-notice`,$=new mt("antNotificationFadeIn",{"0%":{left:{_skip_check_:!0,value:y},opacity:0},"100%":{left:{_skip_check_:!0,value:0},opacity:1}}),S=new mt("antNotificationFadeOut",{"0%":{maxHeight:t.animationMaxHeight,marginBottom:r,opacity:1},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}});return[{[n]:A(A(A(A({},rt(t)),{position:"fixed",zIndex:t.zIndexPopup,marginInlineEnd:p,[`${n}-hook-holder`]:{position:"relative"},[`&${n}-top, &${n}-bottom`]:{[`${n}-notice`]:{marginInline:"auto auto"}},[`&${n}-topLeft, &${n}-bottomLeft`]:{[`${n}-notice`]:{marginInlineEnd:"auto",marginInlineStart:0}},[`${n}-fade-enter, ${n}-fade-appear`]:{animationDuration:t.motionDurationMid,animationTimingFunction:m,animationFillMode:"both",opacity:0,animationPlayState:"paused"},[`${n}-fade-leave`]:{animationTimingFunction:m,animationFillMode:"both",animationDuration:g,animationPlayState:"paused"},[`${n}-fade-enter${n}-fade-enter-active, ${n}-fade-appear${n}-fade-appear-active`]:{animationName:$,animationPlayState:"running"},[`${n}-fade-leave${n}-fade-leave-active`]:{animationName:S,animationPlayState:"running"}}),tse(t)),{"&-rtl":{direction:"rtl",[`${n}-notice-btn`]:{float:"left"}}})},{[x]:{position:"relative",width:y,maxWidth:`calc(100vw - ${p*2}px)`,marginBottom:r,marginInlineStart:"auto",padding:h,overflow:"hidden",lineHeight:b,wordWrap:"break-word",background:f,borderRadius:a,boxShadow:i,[`${n}-close-icon`]:{fontSize:v,cursor:"pointer"},[`${x}-message`]:{marginBottom:t.marginXS,color:d,fontSize:o,lineHeight:t.lineHeightLG},[`${x}-description`]:{fontSize:v},[`&${x}-closable ${x}-message`]:{paddingInlineEnd:t.paddingLG},[`${x}-with-icon ${x}-message`]:{marginBottom:t.marginXS,marginInlineStart:t.marginSM+w,fontSize:o},[`${x}-with-icon ${x}-description`]:{marginInlineStart:t.marginSM+w,fontSize:v},[`${x}-icon`]:{position:"absolute",fontSize:w,lineHeight:0,[`&-success${e}`]:{color:s},[`&-info${e}`]:{color:l},[`&-warning${e}`]:{color:c},[`&-error${e}`]:{color:u}},[`${x}-close`]:{position:"absolute",top:t.notificationPaddingVertical,insetInlineEnd:t.notificationPaddingHorizontal,color:t.colorIcon,outline:"none",width:t.notificationCloseButtonSize,height:t.notificationCloseButtonSize,borderRadius:t.borderRadiusSM,transition:`background-color ${t.motionDurationMid}, color ${t.motionDurationMid}`,display:"flex",alignItems:"center",justifyContent:"center","&:hover":{color:t.colorIconHover,backgroundColor:t.wireframe?"transparent":t.colorFillContent}},[`${x}-btn`]:{float:"right",marginTop:t.marginSM}}},{[`${x}-pure-panel`]:{margin:0}}]},AL=et("Notification",t=>{const e=t.paddingMD,n=t.paddingLG,i=Ve(t,{notificationBg:t.colorBgElevated,notificationPaddingVertical:e,notificationPaddingHorizontal:n,notificationPadding:`${t.paddingMD}px ${t.paddingContentHorizontalLG}px`,notificationMarginBottom:t.margin,notificationMarginEdge:t.marginLG,animationMaxHeight:150,notificationIconSize:t.fontSizeLG*t.lineHeightLG,notificationCloseButtonSize:t.controlHeightLG*.55});return[nse(i)]},t=>({zIndexPopup:t.zIndexPopupBase+50,width:384}));function ise(t,e){return e||C("span",{class:`${t}-close-x`},[C(ai,{class:`${t}-close-icon`},null)])}C(La,null,null),C(Ho,null,null),C(si,null,null),C(Wo,null,null),C(yi,null,null);const ose={success:Ho,info:La,error:si,warning:Wo};function rse(t){let{prefixCls:e,icon:n,type:i,message:o,description:r,btn:a}=t,s=null;if(n)s=C("span",{class:`${e}-icon`},[kl(n)]);else if(i){const l=ose[i];s=C(l,{class:`${e}-icon ${e}-icon-${i}`},null)}return C("div",{class:ce({[`${e}-with-icon`]:s}),role:"alert"},[s,C("div",{class:`${e}-message`},[o]),C("div",{class:`${e}-description`},[r]),a&&C("div",{class:`${e}-btn`},[a])])}function _L(t,e,n){let i;switch(e=typeof e=="number"?`${e}px`:e,n=typeof n=="number"?`${n}px`:n,t){case"top":i={left:"50%",transform:"translateX(-50%)",right:"auto",top:e,bottom:"auto"};break;case"topLeft":i={left:0,top:e,bottom:"auto"};break;case"topRight":i={right:0,top:e,bottom:"auto"};break;case"bottom":i={left:"50%",transform:"translateX(-50%)",right:"auto",top:"auto",bottom:n};break;case"bottomLeft":i={left:0,top:"auto",bottom:n};break;default:i={right:0,top:"auto",bottom:n};break}return i}function ase(t){return{name:`${t}-fade`}}var sse=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);ot.prefixCls||i("notification")),a=f=>{var h,p;return _L(f,(h=t.top)!==null&&h!==void 0?h:BP,(p=t.bottom)!==null&&p!==void 0?p:BP)},[,s]=AL(r),l=()=>ce(s.value,{[`${r.value}-rtl`]:t.rtl}),c=()=>ase(r.value),[u,d]=hL({prefixCls:r.value,getStyles:a,getClassName:l,motion:c,closable:!0,closeIcon:ise(r.value),duration:lse,getContainer:()=>{var f,h;return((f=t.getPopupContainer)===null||f===void 0?void 0:f.call(t))||((h=o.value)===null||h===void 0?void 0:h.call(o))||document.body},maxCount:t.maxCount,hashId:s.value,onAllRemoved:t.onAllRemoved});return n(A(A({},u),{prefixCls:r.value,hashId:s})),d}});function use(t){const e=ie(null),n=Symbol("notificationHolderKey"),i=s=>{if(!e.value)return;const{open:l,prefixCls:c,hashId:u}=e.value,d=`${c}-notice`,{message:f,description:h,icon:p,type:g,btn:m,class:v}=s,b=sse(s,["message","description","icon","type","btn","class"]);return l(A(A({placement:"topRight"},b),{content:()=>C(rse,{prefixCls:d,icon:typeof p=="function"?p():p,type:g,message:typeof f=="function"?f():f,description:typeof h=="function"?h():h,btn:typeof m=="function"?m():m},null),class:ce(g&&`${d}-${g}`,u,v)}))},r={open:i,destroy:s=>{var l,c;s!==void 0?(l=e.value)===null||l===void 0||l.close(s):(c=e.value)===null||c===void 0||c.destroy()}};return["success","info","warning","error"].forEach(s=>{r[s]=l=>i(A(A({},l),{type:s}))}),[r,()=>C(cse,H(H({key:n},t),{},{ref:e}),null)]}function PL(t){return use(t)}const us={};let TL=4.5,OL="24px",EL="24px",tx="",ML="topRight",IL=()=>document.body,kL=null,nx=!1,DL;function dse(t){const{duration:e,placement:n,bottom:i,top:o,getContainer:r,closeIcon:a,prefixCls:s}=t;s!==void 0&&(tx=s),e!==void 0&&(TL=e),n!==void 0&&(ML=n),i!==void 0&&(EL=typeof i=="number"?`${i}px`:i),o!==void 0&&(OL=typeof o=="number"?`${o}px`:o),r!==void 0&&(IL=r),a!==void 0&&(kL=a),t.rtl!==void 0&&(nx=t.rtl),t.maxCount!==void 0&&(DL=t.maxCount)}function fse(t,e){let{prefixCls:n,placement:i=ML,getContainer:o=IL,top:r,bottom:a,closeIcon:s=kL,appContext:l}=t;const{getPrefixCls:c}=$se(),u=c("notification",n||tx),d=`${u}-${i}-${nx}`,f=us[d];if(f){Promise.resolve(f).then(p=>{e(p)});return}const h=ce(`${u}-${i}`,{[`${u}-rtl`]:nx===!0});lg.newInstance({name:"notification",prefixCls:n||tx,useStyle:AL,class:h,style:_L(i,r??OL,a??EL),appContext:l,getContainer:o,closeIcon:p=>{let{prefixCls:g}=p;return C("span",{class:`${g}-close-x`},[kl(s,{},C(ai,{class:`${g}-close-icon`},null))])},maxCount:DL,hasTransitionName:!0},p=>{us[d]=p,e(p)})}const hse={success:km,info:Rm,error:Lm,warning:Dm};function pse(t){const{icon:e,type:n,description:i,message:o,btn:r}=t,a=t.duration===void 0?TL:t.duration;fse(t,s=>{s.notice({content:l=>{let{prefixCls:c}=l;const u=`${c}-notice`;let d=null;if(e)d=()=>C("span",{class:`${u}-icon`},[kl(e)]);else if(n){const f=hse[n];d=()=>C(f,{class:`${u}-icon ${u}-icon-${n}`},null)}return C("div",{class:d?`${u}-with-icon`:""},[d&&d(),C("div",{class:`${u}-message`},[!i&&d?C("span",{class:`${u}-message-single-line-auto-margin`},null):null,kl(o)]),C("div",{class:`${u}-description`},[kl(i)]),r?C("span",{class:`${u}-btn`},[kl(r)]):null])},duration:a,closable:!0,onClose:t.onClose,onClick:t.onClick,key:t.key,style:t.style||{},class:t.class})})}const jr={open:pse,close(t){Object.keys(us).forEach(e=>Promise.resolve(us[e]).then(n=>{n.removeNotice(t)}))},config:dse,destroy(){Object.keys(us).forEach(t=>{Promise.resolve(us[t]).then(e=>{e.destroy()}),delete us[t]})}},gse=["success","info","warning","error"];gse.forEach(t=>{jr[t]=e=>jr.open(A(A({},e),{type:t}))});jr.warn=jr.warning;jr.useNotification=PL;const mse=`-ant-${Date.now()}-${Math.random()}`;function vse(t,e){const n={},i=(a,s)=>{let l=a.clone();return l=(s==null?void 0:s(l))||l,l.toRgbString()},o=(a,s)=>{const l=new Ot(a),c=Is(l.toRgbString());n[`${s}-color`]=i(l),n[`${s}-color-disabled`]=c[1],n[`${s}-color-hover`]=c[4],n[`${s}-color-active`]=c[6],n[`${s}-color-outline`]=l.clone().setAlpha(.2).toRgbString(),n[`${s}-color-deprecated-bg`]=c[0],n[`${s}-color-deprecated-border`]=c[2]};if(e.primaryColor){o(e.primaryColor,"primary");const a=new Ot(e.primaryColor),s=Is(a.toRgbString());s.forEach((c,u)=>{n[`primary-${u+1}`]=c}),n["primary-color-deprecated-l-35"]=i(a,c=>c.lighten(35)),n["primary-color-deprecated-l-20"]=i(a,c=>c.lighten(20)),n["primary-color-deprecated-t-20"]=i(a,c=>c.tint(20)),n["primary-color-deprecated-t-50"]=i(a,c=>c.tint(50)),n["primary-color-deprecated-f-12"]=i(a,c=>c.setAlpha(c.getAlpha()*.12));const l=new Ot(s[0]);n["primary-color-active-deprecated-f-30"]=i(l,c=>c.setAlpha(c.getAlpha()*.3)),n["primary-color-active-deprecated-d-02"]=i(l,c=>c.darken(2))}return e.successColor&&o(e.successColor,"success"),e.warningColor&&o(e.warningColor,"warning"),e.errorColor&&o(e.errorColor,"error"),e.infoColor&&o(e.infoColor,"info"),` + ${e}-loading ${n}`]:{color:l}}},{[`${e}-notice-pure-panel`]:{padding:0,textAlign:"start"}}]},pL=et("Message",t=>{const e=Ve(t,{messageNoticeContentPadding:`${(t.controlHeightLG-t.fontSize*t.lineHeight)/2}px ${t.paddingSM}px`});return[Bae(e)]},t=>({height:150,zIndexPopup:t.zIndexPopupBase+10})),zae={info:C(La,null,null),success:C(Ho,null,null),error:C(si,null,null),warning:C(Wo,null,null),loading:C(yi,null,null)},Hae=oe({name:"PureContent",inheritAttrs:!1,props:["prefixCls","type","icon"],setup(t,e){let{slots:n}=e;return()=>{var i;return C("div",{class:ce(`${t.prefixCls}-custom-content`,`${t.prefixCls}-${t.type}`)},[t.icon||zae[t.type],C("span",null,[(i=n.default)===null||i===void 0?void 0:i.call(n)])])}}});var Wae=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);or("message",t.prefixCls)),[,l]=pL(s),c=()=>{var g;const m=(g=t.top)!==null&&g!==void 0?g:jae;return{left:"50%",transform:"translateX(-50%)",top:typeof m=="number"?`${m}px`:m}},u=()=>ce(l.value,t.rtl?`${s.value}-rtl`:""),d=()=>{var g;return i1({prefixCls:s.value,animation:(g=t.animation)!==null&&g!==void 0?g:"move-up",transitionName:t.transitionName})},f=C("span",{class:`${s.value}-close-x`},[C(ai,{class:`${s.value}-close-icon`},null)]),[h,p]=hL({getStyles:c,prefixCls:s.value,getClassName:u,motion:d,closable:!1,closeIcon:f,duration:(i=t.duration)!==null&&i!==void 0?i:Vae,getContainer:(o=t.staticGetContainer)!==null&&o!==void 0?o:a.value,maxCount:t.maxCount,onAllRemoved:t.onAllRemoved});return n(A(A({},h),{prefixCls:s,hashId:l})),p}});let NP=0;function Yae(t){const e=ie(null),n=Symbol("messageHolderKey"),i=l=>{var c;(c=e.value)===null||c===void 0||c.close(l)},o=l=>{if(!e.value){const x=()=>{};return x.then=()=>{},x}const{open:c,prefixCls:u,hashId:d}=e.value,f=`${u}-notice`,{content:h,icon:p,type:g,key:m,class:v,onClose:b}=l,y=Wae(l,["content","icon","type","key","class","onClose"]);let w=m;return w==null&&(NP+=1,w=`antd-message-${NP}`),NH(x=>(c(A(A({},y),{key:w,content:()=>C(Hae,{prefixCls:u,type:g,icon:typeof p=="function"?p():p},{default:()=>[typeof h=="function"?h():h]}),placement:"top",class:ce(g&&`${f}-${g}`,d,v),onClose:()=>{b==null||b(),x()}})),()=>{i(w)}))},a={open:o,destroy:l=>{var c;l!==void 0?i(l):(c=e.value)===null||c===void 0||c.destroy()}};return["info","success","warning","error","loading"].forEach(l=>{const c=(u,d,f)=>{let h;u&&typeof u=="object"&&"content"in u?h=u:h={content:u};let p,g;typeof d=="function"?g=d:(p=d,g=f);const m=A(A({onClose:g,duration:p},h),{type:l});return o(m)};a[l]=c}),[a,()=>C(Xae,H(H({key:n},t),{},{ref:e}),null)]}function gL(t){return Yae(t)}let mL=3,vL,hi,Gae=1,bL="",yL="move-up",xL=!1,wL=()=>document.body,SL,CL=!1;function Kae(){return Gae++}function Uae(t){t.top!==void 0&&(vL=t.top,hi=null),t.duration!==void 0&&(mL=t.duration),t.prefixCls!==void 0&&(bL=t.prefixCls),t.getContainer!==void 0&&(wL=t.getContainer,hi=null),t.transitionName!==void 0&&(yL=t.transitionName,hi=null,xL=!0),t.maxCount!==void 0&&(SL=t.maxCount,hi=null),t.rtl!==void 0&&(CL=t.rtl)}function qae(t,e){if(hi){e(hi);return}cg.newInstance({appContext:t.appContext,prefixCls:t.prefixCls||bL,rootPrefixCls:t.rootPrefixCls,transitionName:yL,hasTransitionName:xL,style:{top:vL},getContainer:wL||t.getPopupContainer,maxCount:SL,name:"message",useStyle:pL},n=>{if(hi){e(hi);return}hi=n,e(n)})}const $L={info:La,success:Ho,error:si,warning:Wo,loading:yi},Zae=Object.keys($L);function Jae(t){const e=t.duration!==void 0?t.duration:mL,n=t.key||Kae(),i=new Promise(r=>{const a=()=>(typeof t.onClose=="function"&&t.onClose(),r(!0));qae(t,s=>{s.notice({key:n,duration:e,style:t.style||{},class:t.class,content:l=>{let{prefixCls:c}=l;const u=$L[t.type],d=u?C(u,null,null):"",f=ce(`${c}-custom-content`,{[`${c}-${t.type}`]:t.type,[`${c}-rtl`]:CL===!0});return C("div",{class:f},[typeof t.icon=="function"?t.icon():t.icon||d,C("span",null,[typeof t.content=="function"?t.content():t.content])])},onClose:a,onClick:t.onClick})})}),o=()=>{hi&&hi.removeNotice(n)};return o.then=(r,a)=>i.then(r,a),o.promise=i,o}function Qae(t){return Object.prototype.toString.call(t)==="[object Object]"&&!!t.content}const Ns={open:Jae,config:Uae,destroy(t){if(hi)if(t){const{removeNotice:e}=hi;e(t)}else{const{destroy:e}=hi;e(),hi=null}}};function ese(t,e){t[e]=(n,i,o)=>Qae(n)?t.open(A(A({},n),{type:e})):(typeof i=="function"&&(o=i,i=void 0),t.open({content:n,duration:i,type:e,onClose:o}))}Zae.forEach(t=>ese(Ns,t));Ns.warn=Ns.warning;Ns.useMessage=gL;const tse=t=>{const{componentCls:e,width:n,notificationMarginEdge:i}=t,o=new mt("antNotificationTopFadeIn",{"0%":{marginTop:"-100%",opacity:0},"100%":{marginTop:0,opacity:1}}),r=new mt("antNotificationBottomFadeIn",{"0%":{marginBottom:"-100%",opacity:0},"100%":{marginBottom:0,opacity:1}}),a=new mt("antNotificationLeftFadeIn",{"0%":{right:{_skip_check_:!0,value:n},opacity:0},"100%":{right:{_skip_check_:!0,value:0},opacity:1}});return{[`&${e}-top, &${e}-bottom`]:{marginInline:0},[`&${e}-top`]:{[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationName:o}},[`&${e}-bottom`]:{[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationName:r}},[`&${e}-topLeft, &${e}-bottomLeft`]:{marginInlineEnd:0,marginInlineStart:i,[`${e}-fade-enter${e}-fade-enter-active, ${e}-fade-appear${e}-fade-appear-active`]:{animationName:a}}}},nse=t=>{const{iconCls:e,componentCls:n,boxShadowSecondary:i,fontSizeLG:o,notificationMarginBottom:r,borderRadiusLG:a,colorSuccess:s,colorInfo:l,colorWarning:c,colorError:u,colorTextHeading:d,notificationBg:f,notificationPadding:h,notificationMarginEdge:p,motionDurationMid:g,motionEaseInOut:m,fontSize:v,lineHeight:b,width:y,notificationIconSize:w}=t,x=`${n}-notice`,$=new mt("antNotificationFadeIn",{"0%":{left:{_skip_check_:!0,value:y},opacity:0},"100%":{left:{_skip_check_:!0,value:0},opacity:1}}),S=new mt("antNotificationFadeOut",{"0%":{maxHeight:t.animationMaxHeight,marginBottom:r,opacity:1},"100%":{maxHeight:0,marginBottom:0,paddingTop:0,paddingBottom:0,opacity:0}});return[{[n]:A(A(A(A({},rt(t)),{position:"fixed",zIndex:t.zIndexPopup,marginInlineEnd:p,[`${n}-hook-holder`]:{position:"relative"},[`&${n}-top, &${n}-bottom`]:{[`${n}-notice`]:{marginInline:"auto auto"}},[`&${n}-topLeft, &${n}-bottomLeft`]:{[`${n}-notice`]:{marginInlineEnd:"auto",marginInlineStart:0}},[`${n}-fade-enter, ${n}-fade-appear`]:{animationDuration:t.motionDurationMid,animationTimingFunction:m,animationFillMode:"both",opacity:0,animationPlayState:"paused"},[`${n}-fade-leave`]:{animationTimingFunction:m,animationFillMode:"both",animationDuration:g,animationPlayState:"paused"},[`${n}-fade-enter${n}-fade-enter-active, ${n}-fade-appear${n}-fade-appear-active`]:{animationName:$,animationPlayState:"running"},[`${n}-fade-leave${n}-fade-leave-active`]:{animationName:S,animationPlayState:"running"}}),tse(t)),{"&-rtl":{direction:"rtl",[`${n}-notice-btn`]:{float:"left"}}})},{[x]:{position:"relative",width:y,maxWidth:`calc(100vw - ${p*2}px)`,marginBottom:r,marginInlineStart:"auto",padding:h,overflow:"hidden",lineHeight:b,wordWrap:"break-word",background:f,borderRadius:a,boxShadow:i,[`${n}-close-icon`]:{fontSize:v,cursor:"pointer"},[`${x}-message`]:{marginBottom:t.marginXS,color:d,fontSize:o,lineHeight:t.lineHeightLG},[`${x}-description`]:{fontSize:v},[`&${x}-closable ${x}-message`]:{paddingInlineEnd:t.paddingLG},[`${x}-with-icon ${x}-message`]:{marginBottom:t.marginXS,marginInlineStart:t.marginSM+w,fontSize:o},[`${x}-with-icon ${x}-description`]:{marginInlineStart:t.marginSM+w,fontSize:v},[`${x}-icon`]:{position:"absolute",fontSize:w,lineHeight:0,[`&-success${e}`]:{color:s},[`&-info${e}`]:{color:l},[`&-warning${e}`]:{color:c},[`&-error${e}`]:{color:u}},[`${x}-close`]:{position:"absolute",top:t.notificationPaddingVertical,insetInlineEnd:t.notificationPaddingHorizontal,color:t.colorIcon,outline:"none",width:t.notificationCloseButtonSize,height:t.notificationCloseButtonSize,borderRadius:t.borderRadiusSM,transition:`background-color ${t.motionDurationMid}, color ${t.motionDurationMid}`,display:"flex",alignItems:"center",justifyContent:"center","&:hover":{color:t.colorIconHover,backgroundColor:t.wireframe?"transparent":t.colorFillContent}},[`${x}-btn`]:{float:"right",marginTop:t.marginSM}}},{[`${x}-pure-panel`]:{margin:0}}]},AL=et("Notification",t=>{const e=t.paddingMD,n=t.paddingLG,i=Ve(t,{notificationBg:t.colorBgElevated,notificationPaddingVertical:e,notificationPaddingHorizontal:n,notificationPadding:`${t.paddingMD}px ${t.paddingContentHorizontalLG}px`,notificationMarginBottom:t.margin,notificationMarginEdge:t.marginLG,animationMaxHeight:150,notificationIconSize:t.fontSizeLG*t.lineHeightLG,notificationCloseButtonSize:t.controlHeightLG*.55});return[nse(i)]},t=>({zIndexPopup:t.zIndexPopupBase+50,width:384}));function ise(t,e){return e||C("span",{class:`${t}-close-x`},[C(ai,{class:`${t}-close-icon`},null)])}C(La,null,null),C(Ho,null,null),C(si,null,null),C(Wo,null,null),C(yi,null,null);const ose={success:Ho,info:La,error:si,warning:Wo};function rse(t){let{prefixCls:e,icon:n,type:i,message:o,description:r,btn:a}=t,s=null;if(n)s=C("span",{class:`${e}-icon`},[kl(n)]);else if(i){const l=ose[i];s=C(l,{class:`${e}-icon ${e}-icon-${i}`},null)}return C("div",{class:ce({[`${e}-with-icon`]:s}),role:"alert"},[s,C("div",{class:`${e}-message`},[o]),C("div",{class:`${e}-description`},[r]),a&&C("div",{class:`${e}-btn`},[a])])}function _L(t,e,n){let i;switch(e=typeof e=="number"?`${e}px`:e,n=typeof n=="number"?`${n}px`:n,t){case"top":i={left:"50%",transform:"translateX(-50%)",right:"auto",top:e,bottom:"auto"};break;case"topLeft":i={left:0,top:e,bottom:"auto"};break;case"topRight":i={right:0,top:e,bottom:"auto"};break;case"bottom":i={left:"50%",transform:"translateX(-50%)",right:"auto",top:"auto",bottom:n};break;case"bottomLeft":i={left:0,top:"auto",bottom:n};break;default:i={right:0,top:"auto",bottom:n};break}return i}function ase(t){return{name:`${t}-fade`}}var sse=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);ot.prefixCls||i("notification")),a=f=>{var h,p;return _L(f,(h=t.top)!==null&&h!==void 0?h:BP,(p=t.bottom)!==null&&p!==void 0?p:BP)},[,s]=AL(r),l=()=>ce(s.value,{[`${r.value}-rtl`]:t.rtl}),c=()=>ase(r.value),[u,d]=hL({prefixCls:r.value,getStyles:a,getClassName:l,motion:c,closable:!0,closeIcon:ise(r.value),duration:lse,getContainer:()=>{var f,h;return((f=t.getPopupContainer)===null||f===void 0?void 0:f.call(t))||((h=o.value)===null||h===void 0?void 0:h.call(o))||document.body},maxCount:t.maxCount,hashId:s.value,onAllRemoved:t.onAllRemoved});return n(A(A({},u),{prefixCls:r.value,hashId:s})),d}});function use(t){const e=ie(null),n=Symbol("notificationHolderKey"),i=s=>{if(!e.value)return;const{open:l,prefixCls:c,hashId:u}=e.value,d=`${c}-notice`,{message:f,description:h,icon:p,type:g,btn:m,class:v}=s,b=sse(s,["message","description","icon","type","btn","class"]);return l(A(A({placement:"topRight"},b),{content:()=>C(rse,{prefixCls:d,icon:typeof p=="function"?p():p,type:g,message:typeof f=="function"?f():f,description:typeof h=="function"?h():h,btn:typeof m=="function"?m():m},null),class:ce(g&&`${d}-${g}`,u,v)}))},r={open:i,destroy:s=>{var l,c;s!==void 0?(l=e.value)===null||l===void 0||l.close(s):(c=e.value)===null||c===void 0||c.destroy()}};return["success","info","warning","error"].forEach(s=>{r[s]=l=>i(A(A({},l),{type:s}))}),[r,()=>C(cse,H(H({key:n},t),{},{ref:e}),null)]}function PL(t){return use(t)}const us={};let TL=4.5,OL="24px",EL="24px",tx="",ML="topRight",IL=()=>document.body,kL=null,nx=!1,DL;function dse(t){const{duration:e,placement:n,bottom:i,top:o,getContainer:r,closeIcon:a,prefixCls:s}=t;s!==void 0&&(tx=s),e!==void 0&&(TL=e),n!==void 0&&(ML=n),i!==void 0&&(EL=typeof i=="number"?`${i}px`:i),o!==void 0&&(OL=typeof o=="number"?`${o}px`:o),r!==void 0&&(IL=r),a!==void 0&&(kL=a),t.rtl!==void 0&&(nx=t.rtl),t.maxCount!==void 0&&(DL=t.maxCount)}function fse(t,e){let{prefixCls:n,placement:i=ML,getContainer:o=IL,top:r,bottom:a,closeIcon:s=kL,appContext:l}=t;const{getPrefixCls:c}=$se(),u=c("notification",n||tx),d=`${u}-${i}-${nx}`,f=us[d];if(f){Promise.resolve(f).then(p=>{e(p)});return}const h=ce(`${u}-${i}`,{[`${u}-rtl`]:nx===!0});cg.newInstance({name:"notification",prefixCls:n||tx,useStyle:AL,class:h,style:_L(i,r??OL,a??EL),appContext:l,getContainer:o,closeIcon:p=>{let{prefixCls:g}=p;return C("span",{class:`${g}-close-x`},[kl(s,{},C(ai,{class:`${g}-close-icon`},null))])},maxCount:DL,hasTransitionName:!0},p=>{us[d]=p,e(p)})}const hse={success:Dm,info:Lm,error:Fm,warning:Rm};function pse(t){const{icon:e,type:n,description:i,message:o,btn:r}=t,a=t.duration===void 0?TL:t.duration;fse(t,s=>{s.notice({content:l=>{let{prefixCls:c}=l;const u=`${c}-notice`;let d=null;if(e)d=()=>C("span",{class:`${u}-icon`},[kl(e)]);else if(n){const f=hse[n];d=()=>C(f,{class:`${u}-icon ${u}-icon-${n}`},null)}return C("div",{class:d?`${u}-with-icon`:""},[d&&d(),C("div",{class:`${u}-message`},[!i&&d?C("span",{class:`${u}-message-single-line-auto-margin`},null):null,kl(o)]),C("div",{class:`${u}-description`},[kl(i)]),r?C("span",{class:`${u}-btn`},[kl(r)]):null])},duration:a,closable:!0,onClose:t.onClose,onClick:t.onClick,key:t.key,style:t.style||{},class:t.class})})}const jr={open:pse,close(t){Object.keys(us).forEach(e=>Promise.resolve(us[e]).then(n=>{n.removeNotice(t)}))},config:dse,destroy(){Object.keys(us).forEach(t=>{Promise.resolve(us[t]).then(e=>{e.destroy()}),delete us[t]})}},gse=["success","info","warning","error"];gse.forEach(t=>{jr[t]=e=>jr.open(A(A({},e),{type:t}))});jr.warn=jr.warning;jr.useNotification=PL;const mse=`-ant-${Date.now()}-${Math.random()}`;function vse(t,e){const n={},i=(a,s)=>{let l=a.clone();return l=(s==null?void 0:s(l))||l,l.toRgbString()},o=(a,s)=>{const l=new Ot(a),c=Is(l.toRgbString());n[`${s}-color`]=i(l),n[`${s}-color-disabled`]=c[1],n[`${s}-color-hover`]=c[4],n[`${s}-color-active`]=c[6],n[`${s}-color-outline`]=l.clone().setAlpha(.2).toRgbString(),n[`${s}-color-deprecated-bg`]=c[0],n[`${s}-color-deprecated-border`]=c[2]};if(e.primaryColor){o(e.primaryColor,"primary");const a=new Ot(e.primaryColor),s=Is(a.toRgbString());s.forEach((c,u)=>{n[`primary-${u+1}`]=c}),n["primary-color-deprecated-l-35"]=i(a,c=>c.lighten(35)),n["primary-color-deprecated-l-20"]=i(a,c=>c.lighten(20)),n["primary-color-deprecated-t-20"]=i(a,c=>c.tint(20)),n["primary-color-deprecated-t-50"]=i(a,c=>c.tint(50)),n["primary-color-deprecated-f-12"]=i(a,c=>c.setAlpha(c.getAlpha()*.12));const l=new Ot(s[0]);n["primary-color-active-deprecated-f-30"]=i(l,c=>c.setAlpha(c.getAlpha()*.3)),n["primary-color-active-deprecated-d-02"]=i(l,c=>c.darken(2))}return e.successColor&&o(e.successColor,"success"),e.warningColor&&o(e.warningColor,"warning"),e.errorColor&&o(e.errorColor,"error"),e.infoColor&&o(e.infoColor,"info"),` :root { ${Object.keys(n).map(a=>`--${t}-${a}: ${n[a]};`).join(` `)} } - `.trim()}function bse(t,e){const n=vse(t,e);ii()&&cd(n,`${mse}-dynamic-theme`)}const yse=t=>{const[e,n]=Xr();return cy(L(()=>({theme:e.value,token:n.value,hashId:"",path:["ant-design-icons",t.value]})),()=>[{[`.${t.value}`]:A(A({},qs()),{[`.${t.value} .${t.value}-icon`]:{display:"block"}})}])};function xse(t,e){const n=L(()=>(t==null?void 0:t.value)||{}),i=L(()=>n.value.inherit===!1||!(e!=null&&e.value)?CD:e.value);return L(()=>{if(!(t!=null&&t.value))return e==null?void 0:e.value;const r=A({},i.value.components);return Object.keys(t.value.components||{}).forEach(a=>{r[a]=A(A({},r[a]),t.value.components[a])}),A(A(A({},i.value),n.value),{token:A(A({},i.value.token),n.value.token),components:r})})}var wse=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{A(Fn,KS),Fn.prefixCls=Jl(),Fn.iconPrefixCls=RL(),Fn.getPrefixCls=(t,e)=>e||(t?`${Fn.prefixCls}-${t}`:Fn.prefixCls),Fn.getRootPrefixCls=()=>Fn.prefixCls?Fn.prefixCls:Jl()});let Bb;const Cse=t=>{Bb&&Bb(),Bb=Ke(()=>{A(KS,$t(t)),A(Fn,$t(t))}),t.theme&&bse(Jl(),t.theme)},$se=()=>({getPrefixCls:(t,e)=>e||(t?`${Jl()}-${t}`:Jl()),getIconPrefixCls:RL,getRootPrefixCls:()=>Fn.prefixCls?Fn.prefixCls:Jl()}),As=oe({compatConfig:{MODE:3},name:"AConfigProvider",inheritAttrs:!1,props:u7(),setup(t,e){let{slots:n}=e;const i=rm(),o=(E,R)=>{const{prefixCls:D="ant"}=t;if(R)return R;const F=D||i.getPrefixCls("");return E?`${F}-${E}`:F},r=L(()=>t.iconPrefixCls||i.iconPrefixCls.value||jw),a=L(()=>r.value!==i.iconPrefixCls.value),s=L(()=>{var E;return t.csp||((E=i.csp)===null||E===void 0?void 0:E.value)}),l=yse(r),c=xse(L(()=>t.theme),L(()=>{var E;return(E=i.theme)===null||E===void 0?void 0:E.value})),u=E=>(t.renderEmpty||n.renderEmpty||i.renderEmpty||q9)(E),d=L(()=>{var E,R;return(E=t.autoInsertSpaceInButton)!==null&&E!==void 0?E:(R=i.autoInsertSpaceInButton)===null||R===void 0?void 0:R.value}),f=L(()=>{var E;return t.locale||((E=i.locale)===null||E===void 0?void 0:E.value)});ye(f,()=>{KS.locale=f.value},{immediate:!0});const h=L(()=>{var E;return t.direction||((E=i.direction)===null||E===void 0?void 0:E.value)}),p=L(()=>{var E,R;return(E=t.space)!==null&&E!==void 0?E:(R=i.space)===null||R===void 0?void 0:R.value}),g=L(()=>{var E,R;return(E=t.virtual)!==null&&E!==void 0?E:(R=i.virtual)===null||R===void 0?void 0:R.value}),m=L(()=>{var E,R;return(E=t.dropdownMatchSelectWidth)!==null&&E!==void 0?E:(R=i.dropdownMatchSelectWidth)===null||R===void 0?void 0:R.value}),v=L(()=>{var E;return t.getTargetContainer!==void 0?t.getTargetContainer:(E=i.getTargetContainer)===null||E===void 0?void 0:E.value}),b=L(()=>{var E;return t.getPopupContainer!==void 0?t.getPopupContainer:(E=i.getPopupContainer)===null||E===void 0?void 0:E.value}),y=L(()=>{var E;return t.pageHeader!==void 0?t.pageHeader:(E=i.pageHeader)===null||E===void 0?void 0:E.value}),w=L(()=>{var E;return t.input!==void 0?t.input:(E=i.input)===null||E===void 0?void 0:E.value}),x=L(()=>{var E;return t.pagination!==void 0?t.pagination:(E=i.pagination)===null||E===void 0?void 0:E.value}),$=L(()=>{var E;return t.form!==void 0?t.form:(E=i.form)===null||E===void 0?void 0:E.value}),S=L(()=>{var E;return t.select!==void 0?t.select:(E=i.select)===null||E===void 0?void 0:E.value}),_=L(()=>t.componentSize),P=L(()=>t.componentDisabled),O=L(()=>{var E,R;return(E=t.wave)!==null&&E!==void 0?E:(R=i.wave)===null||R===void 0?void 0:R.value}),T={csp:s,autoInsertSpaceInButton:d,locale:f,direction:h,space:p,virtual:g,dropdownMatchSelectWidth:m,getPrefixCls:o,iconPrefixCls:r,theme:L(()=>{var E,R;return(E=c.value)!==null&&E!==void 0?E:(R=i.theme)===null||R===void 0?void 0:R.value}),renderEmpty:u,getTargetContainer:v,getPopupContainer:b,pageHeader:y,input:w,pagination:x,form:$,select:S,componentSize:_,componentDisabled:P,transformCellText:L(()=>t.transformCellText),wave:O},M=L(()=>{const E=c.value||{},{algorithm:R,token:D}=E,F=wse(E,["algorithm","token"]),N=R&&(!Array.isArray(R)||R.length>0)?lD(R):void 0;return A(A({},F),{theme:N,token:A(A({},um),D)})}),I=L(()=>{var E,R;let D={};return f.value&&(D=((E=f.value.Form)===null||E===void 0?void 0:E.defaultValidateMessages)||((R=bi.Form)===null||R===void 0?void 0:R.defaultValidateMessages)||{}),t.form&&t.form.validateMessages&&(D=A(A({},D),t.form.validateMessages)),D});d7(T),l7({validateMessages:I}),TD(_),Uk(P);const k=E=>{var R,D;let F=a.value?l((R=n.default)===null||R===void 0?void 0:R.call(n)):(D=n.default)===null||D===void 0?void 0:D.call(n);if(t.theme){const N=function(){return F}();F=C(X9,{value:M.value},{default:()=>[N]})}return C(dL,{locale:f.value||E,ANT_MARK__:ex},{default:()=>[F]})};return Ke(()=>{h.value&&(Ns.config({rtl:h.value==="rtl"}),jr.config({rtl:h.value==="rtl"}))}),()=>C(Us,{children:(E,R,D)=>k(D)},null)}});As.config=Cse;As.install=function(t){t.component(As.name,As)};const Ase=(t,e)=>{let{attrs:n,slots:i}=e;return C(nn,H(H({size:"small",type:"primary"},t),n),i)},Uf=(t,e,n)=>{const i=DH(n);return{[`${t.componentCls}-${e}`]:{color:t[`color${n}`],background:t[`color${i}Bg`],borderColor:t[`color${i}Border`],[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}}},_se=t=>Tp(t,(e,n)=>{let{textColor:i,lightBorderColor:o,lightColor:r,darkColor:a}=n;return{[`${t.componentCls}-${e}`]:{color:i,background:r,borderColor:o,"&-inverse":{color:t.colorTextLightSolid,background:a,borderColor:a},[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}}}),Pse=t=>{const{paddingXXS:e,lineWidth:n,tagPaddingHorizontal:i,componentCls:o}=t,r=i-n,a=e-n;return{[o]:A(A({},rt(t)),{display:"inline-block",height:"auto",marginInlineEnd:t.marginXS,paddingInline:r,fontSize:t.tagFontSize,lineHeight:`${t.tagLineHeight}px`,whiteSpace:"nowrap",background:t.tagDefaultBg,border:`${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,borderRadius:t.borderRadiusSM,opacity:1,transition:`all ${t.motionDurationMid}`,textAlign:"start",[`&${o}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:t.tagDefaultColor},[`${o}-close-icon`]:{marginInlineStart:a,color:t.colorTextDescription,fontSize:t.tagIconSize,cursor:"pointer",transition:`all ${t.motionDurationMid}`,"&:hover":{color:t.colorTextHeading}},[`&${o}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${t.iconCls}-close, ${t.iconCls}-close:hover`]:{color:t.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${o}-checkable-checked):hover`]:{color:t.colorPrimary,backgroundColor:t.colorFillSecondary},"&:active, &-checked":{color:t.colorTextLightSolid},"&-checked":{backgroundColor:t.colorPrimary,"&:hover":{backgroundColor:t.colorPrimaryHover}},"&:active":{backgroundColor:t.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${t.iconCls} + span, > span + ${t.iconCls}`]:{marginInlineStart:r}}),[`${o}-borderless`]:{borderColor:"transparent",background:t.tagBorderlessBg}}},LL=et("Tag",t=>{const{fontSize:e,lineHeight:n,lineWidth:i,fontSizeIcon:o}=t,r=Math.round(e*n),a=t.fontSizeSM,s=r-i*2,l=t.colorFillAlter,c=t.colorText,u=Ve(t,{tagFontSize:a,tagLineHeight:s,tagDefaultBg:l,tagDefaultColor:c,tagIconSize:o-2*i,tagPaddingHorizontal:8,tagBorderlessBg:t.colorFillTertiary});return[Pse(u),_se(u),Uf(u,"success","Success"),Uf(u,"processing","Info"),Uf(u,"error","Error"),Uf(u,"warning","Warning")]}),Tse=()=>({prefixCls:String,checked:{type:Boolean,default:void 0},onChange:{type:Function},onClick:{type:Function},"onUpdate:checked":Function}),cg=oe({compatConfig:{MODE:3},name:"ACheckableTag",inheritAttrs:!1,props:Tse(),setup(t,e){let{slots:n,emit:i,attrs:o}=e;const{prefixCls:r}=Me("tag",t),[a,s]=LL(r),l=u=>{const{checked:d}=t;i("update:checked",!d),i("change",!d),i("click",u)},c=L(()=>ce(r.value,s.value,{[`${r.value}-checkable`]:!0,[`${r.value}-checkable-checked`]:t.checked}));return()=>{var u;return a(C("span",H(H({},o),{},{class:[c.value,o.class],onClick:l}),[(u=n.default)===null||u===void 0?void 0:u.call(n)]))}}}),Ose=()=>({prefixCls:String,color:{type:String},closable:{type:Boolean,default:!1},closeIcon:Z.any,visible:{type:Boolean,default:void 0},onClose:{type:Function},onClick:Ms(),"onUpdate:visible":Function,icon:Z.any,bordered:{type:Boolean,default:!0}}),Ql=oe({compatConfig:{MODE:3},name:"ATag",inheritAttrs:!1,props:Ose(),slots:Object,setup(t,e){let{slots:n,emit:i,attrs:o}=e;const{prefixCls:r,direction:a}=Me("tag",t),[s,l]=LL(r),c=ie(!0);Ke(()=>{t.visible!==void 0&&(c.value=t.visible)});const u=p=>{p.stopPropagation(),i("update:visible",!1),i("close",p),!p.defaultPrevented&&t.visible===void 0&&(c.value=!1)},d=L(()=>Fm(t.color)||tQ(t.color)),f=L(()=>ce(r.value,l.value,{[`${r.value}-${t.color}`]:d.value,[`${r.value}-has-color`]:t.color&&!d.value,[`${r.value}-hidden`]:!c.value,[`${r.value}-rtl`]:a.value==="rtl",[`${r.value}-borderless`]:!t.bordered})),h=p=>{i("click",p)};return()=>{var p,g,m;const{icon:v=(p=n.icon)===null||p===void 0?void 0:p.call(n),color:b,closeIcon:y=(g=n.closeIcon)===null||g===void 0?void 0:g.call(n),closable:w=!1}=t,x=()=>w?y?C("span",{class:`${r.value}-close-icon`,onClick:u},[y]):C(ai,{class:`${r.value}-close-icon`,onClick:u},null):null,$={backgroundColor:b&&!d.value?b:void 0},S=v||null,_=(m=n.default)===null||m===void 0?void 0:m.call(n),P=S?C(Qe,null,[S,C("span",null,[_])]):_,O=t.onClick!==void 0,T=C("span",H(H({},o),{},{onClick:h,class:[f.value,o.class],style:[$,o.style]}),[P,x()]);return s(O?C(J1,null,{default:()=>[T]}):T)}}});Ql.CheckableTag=cg;Ql.install=function(t){return t.component(Ql.name,Ql),t.component(cg.name,cg),t};function Ese(t,e){let{slots:n,attrs:i}=e;return C(Ql,H(H({color:"blue"},t),i),n)}var Mse={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"};function zP(t){for(var e=1;eT.value||_.value),[k,E]=x4(x),R=se();g({focus:()=>{var J;(J=R.value)===null||J===void 0||J.focus()},blur:()=>{var J;(J=R.value)===null||J===void 0||J.blur()}});const D=J=>b.valueFormat?t.toString(J,b.valueFormat):J,F=(J,Q)=>{const G=D(J);v("update:value",G),v("change",G,Q),y.onFieldChange()},N=J=>{v("update:open",J),v("openChange",J)},B=J=>{v("focus",J)},z=J=>{v("blur",J),y.onFieldBlur()},W=(J,Q)=>{const G=D(J);v("panelChange",G,Q)},j=J=>{const Q=D(J);v("ok",Q)},[U]=xo("DatePicker",sd),V=L(()=>b.value?b.valueFormat?t.toDate(b.value,b.valueFormat):b.value:b.value===""?void 0:b.value),q=L(()=>b.defaultValue?b.valueFormat?t.toDate(b.defaultValue,b.valueFormat):b.defaultValue:b.defaultValue===""?void 0:b.defaultValue),Y=L(()=>b.defaultPickerValue?b.valueFormat?t.toDate(b.defaultPickerValue,b.valueFormat):b.defaultPickerValue:b.defaultPickerValue===""?void 0:b.defaultPickerValue);return()=>{var J,Q,G,ee,X,K;const te=A(A({},U.value),b.locale),ue=A(A({},b),m),{bordered:ae=!0,placeholder:re,suffixIcon:ne=(J=p.suffixIcon)===null||J===void 0?void 0:J.call(p),showToday:le=!0,transitionName:he,allowClear:pe=!0,dateRender:ge=p.dateRender,renderExtraFooter:be=p.renderExtraFooter,monthCellRender:$e=p.monthCellRender||b.monthCellContentRender||p.monthCellContentRender,clearIcon:fe=(Q=p.clearIcon)===null||Q===void 0?void 0:Q.call(p),id:de=y.id.value}=ue,xe=Fse(ue,["bordered","placeholder","suffixIcon","showToday","transitionName","allowClear","dateRender","renderExtraFooter","monthCellRender","clearIcon","id"]),_e=ue.showTime===""?!0:ue.showTime,{format:Oe}=ue;let Re={};c&&(Re.picker=c);const Se=c||ue.picker||"date";Re=A(A(A({},Re),_e?dg(A({format:Oe,picker:Se},typeof _e=="object"?_e:{})):{}),Se==="time"?dg(A(A({format:Oe},xe),{picker:Se})):{});const Ae=x.value,Pe=C(Qe,null,[ne||C(c==="time"?nv:tv,null,null),w.hasFeedback&&w.feedbackIcon]);return k(C(Ite,H(H(H({monthCellRender:$e,dateRender:ge,renderExtraFooter:be,ref:R,placeholder:Rse(te,Se,re),suffixIcon:Pe,dropdownAlign:FL($.value,b.placement),clearIcon:fe||C(si,null,null),allowClear:pe,transitionName:he||`${P.value}-slide-up`},xe),Re),{},{id:de,picker:Se,value:V.value,defaultValue:q.value,defaultPickerValue:Y.value,showToday:le,locale:te.lang,class:ce({[`${Ae}-${I.value}`]:I.value,[`${Ae}-borderless`]:!ae},ei(Ae,zo(w.status,b.status),w.hasFeedback),m.class,E.value,M.value),disabled:O.value,prefixCls:Ae,getPopupContainer:m.getCalendarContainer||S.value,generateConfig:t,prevIcon:((G=p.prevIcon)===null||G===void 0?void 0:G.call(p))||C("span",{class:`${Ae}-prev-icon`},null),nextIcon:((ee=p.nextIcon)===null||ee===void 0?void 0:ee.call(p))||C("span",{class:`${Ae}-next-icon`},null),superPrevIcon:((X=p.superPrevIcon)===null||X===void 0?void 0:X.call(p))||C("span",{class:`${Ae}-super-prev-icon`},null),superNextIcon:((K=p.superNextIcon)===null||K===void 0?void 0:K.call(p))||C("span",{class:`${Ae}-super-next-icon`},null),components:zL,direction:$.value,dropdownClassName:ce(E.value,b.popupClassName,b.dropdownClassName),onChange:F,onOpenChange:N,onFocus:B,onBlur:z,onPanelChange:W,onOk:j}),null))}}})}const i=n(void 0,"ADatePicker"),o=n("week","AWeekPicker"),r=n("month","AMonthPicker"),a=n("year","AYearPicker"),s=n("time","TimePicker"),l=n("quarter","AQuarterPicker");return{DatePicker:i,WeekPicker:o,MonthPicker:r,YearPicker:a,TimePicker:s,QuarterPicker:l}}var Bse={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z"}}]},name:"swap-right",theme:"outlined"};function WP(t){for(var e=1;eb.value||g.value),[x,$]=x4(f),S=se();r({focus:()=>{var B;(B=S.value)===null||B===void 0||B.focus()},blur:()=>{var B;(B=S.value)===null||B===void 0||B.blur()}});const _=B=>c.valueFormat?t.toString(B,c.valueFormat):B,P=(B,z)=>{const W=_(B);l("update:value",W),l("change",W,z),u.onFieldChange()},O=B=>{l("update:open",B),l("openChange",B)},T=B=>{l("focus",B)},M=B=>{l("blur",B),u.onFieldBlur()},I=(B,z)=>{const W=_(B);l("panelChange",W,z)},k=B=>{const z=_(B);l("ok",z)},E=(B,z,W)=>{const j=_(B);l("calendarChange",j,z,W)},[R]=xo("DatePicker",sd),D=L(()=>c.value&&c.valueFormat?t.toDate(c.value,c.valueFormat):c.value),F=L(()=>c.defaultValue&&c.valueFormat?t.toDate(c.defaultValue,c.valueFormat):c.defaultValue),N=L(()=>c.defaultPickerValue&&c.valueFormat?t.toDate(c.defaultPickerValue,c.valueFormat):c.defaultPickerValue);return()=>{var B,z,W,j,U,V,q;const Y=A(A({},R.value),c.locale),J=A(A({},c),s),{prefixCls:Q,bordered:G=!0,placeholder:ee,suffixIcon:X=(B=a.suffixIcon)===null||B===void 0?void 0:B.call(a),picker:K="date",transitionName:te,allowClear:ue=!0,dateRender:ae=a.dateRender,renderExtraFooter:re=a.renderExtraFooter,separator:ne=(z=a.separator)===null||z===void 0?void 0:z.call(a),clearIcon:le=(W=a.clearIcon)===null||W===void 0?void 0:W.call(a),id:he=u.id.value}=J,pe=Hse(J,["prefixCls","bordered","placeholder","suffixIcon","picker","transitionName","allowClear","dateRender","renderExtraFooter","separator","clearIcon","id"]);delete pe["onUpdate:value"],delete pe["onUpdate:open"];const{format:ge,showTime:be}=J;let $e={};$e=A(A(A({},$e),be?dg(A({format:ge,picker:K},be)):{}),K==="time"?dg(A(A({format:ge},ht(pe,["disabledTime"])),{picker:K})):{});const fe=f.value,de=C(Qe,null,[X||C(K==="time"?nv:tv,null,null),d.hasFeedback&&d.feedbackIcon]);return x(C(Wte,H(H(H({dateRender:ae,renderExtraFooter:re,separator:ne||C("span",{"aria-label":"to",class:`${fe}-separator`},[C(US,null,null)]),ref:S,dropdownAlign:FL(h.value,c.placement),placeholder:Lse(Y,K,ee),suffixIcon:de,clearIcon:le||C(si,null,null),allowClear:ue,transitionName:te||`${m.value}-slide-up`},pe),$e),{},{disabled:v.value,id:he,value:D.value,defaultValue:F.value,defaultPickerValue:N.value,picker:K,class:ce({[`${fe}-${w.value}`]:w.value,[`${fe}-borderless`]:!G},ei(fe,zo(d.status,c.status),d.hasFeedback),s.class,$.value,y.value),locale:Y.lang,prefixCls:fe,getPopupContainer:s.getCalendarContainer||p.value,generateConfig:t,prevIcon:((j=a.prevIcon)===null||j===void 0?void 0:j.call(a))||C("span",{class:`${fe}-prev-icon`},null),nextIcon:((U=a.nextIcon)===null||U===void 0?void 0:U.call(a))||C("span",{class:`${fe}-next-icon`},null),superPrevIcon:((V=a.superPrevIcon)===null||V===void 0?void 0:V.call(a))||C("span",{class:`${fe}-super-prev-icon`},null),superNextIcon:((q=a.superNextIcon)===null||q===void 0?void 0:q.call(a))||C("span",{class:`${fe}-super-next-icon`},null),components:zL,direction:h.value,dropdownClassName:ce($.value,c.popupClassName,c.dropdownClassName),onChange:P,onOpenChange:O,onFocus:T,onBlur:M,onPanelChange:I,onOk:k,onCalendarChange:E}),null))}}})}const zL={button:Ase,rangeItem:Ese};function jse(t){return t?Array.isArray(t)?t:[t]:[]}function dg(t){const{format:e,picker:n,showHour:i,showMinute:o,showSecond:r,use12Hours:a}=t,s=jse(e)[0],l=A({},t);return s&&typeof s=="string"&&(!s.includes("s")&&r===void 0&&(l.showSecond=!1),!s.includes("m")&&o===void 0&&(l.showMinute=!1),!s.includes("H")&&!s.includes("h")&&i===void 0&&(l.showHour=!1),(s.includes("a")||s.includes("A"))&&a===void 0&&(l.use12Hours=!0)),n==="time"?l:(typeof s=="function"&&delete l.format,{showTime:l})}function HL(t,e){const{DatePicker:n,WeekPicker:i,MonthPicker:o,YearPicker:r,TimePicker:a,QuarterPicker:s}=Nse(t,e),l=Wse(t,e);return{DatePicker:n,WeekPicker:i,MonthPicker:o,YearPicker:r,TimePicker:a,QuarterPicker:s,RangePicker:l}}const{DatePicker:zb,WeekPicker:Ih,MonthPicker:kh,YearPicker:Vse,TimePicker:Xse,QuarterPicker:Dh,RangePicker:Rh}=HL(rS),Yse=A(zb,{WeekPicker:Ih,MonthPicker:kh,YearPicker:Vse,RangePicker:Rh,TimePicker:Xse,QuarterPicker:Dh,install:t=>(t.component(zb.name,zb),t.component(Rh.name,Rh),t.component(kh.name,kh),t.component(Ih.name,Ih),t.component(Dh.name,Dh),t)});function qf(t){return t!=null}const Hb=t=>{const{itemPrefixCls:e,component:n,span:i,labelStyle:o,contentStyle:r,bordered:a,label:s,content:l,colon:c}=t,u=n;return a?C(u,{class:[{[`${e}-item-label`]:qf(s),[`${e}-item-content`]:qf(l)}],colSpan:i},{default:()=>[qf(s)&&C("span",{style:o},[s]),qf(l)&&C("span",{style:r},[l])]}):C(u,{class:[`${e}-item`],colSpan:i},{default:()=>[C("div",{class:`${e}-item-container`},[(s||s===0)&&C("span",{class:[`${e}-item-label`,{[`${e}-item-no-colon`]:!c}],style:o},[s]),(l||l===0)&&C("span",{class:`${e}-item-content`,style:r},[l])])]})},Gse=t=>{const e=(c,u,d)=>{let{colon:f,prefixCls:h,bordered:p}=u,{component:g,type:m,showLabel:v,showContent:b,labelStyle:y,contentStyle:w}=d;return c.map((x,$)=>{var S,_;const P=x.props||{},{prefixCls:O=h,span:T=1,labelStyle:M=P["label-style"],contentStyle:I=P["content-style"],label:k=(_=(S=x.children)===null||S===void 0?void 0:S.label)===null||_===void 0?void 0:_.call(S)}=P,E=om(x),R=i7(x),D=Hk(x),{key:F}=x;return typeof g=="string"?C(Hb,{key:`${m}-${String(F)||$}`,class:R,style:D,labelStyle:A(A({},y),M),contentStyle:A(A({},w),I),span:T,colon:f,component:g,itemPrefixCls:O,bordered:p,label:v?k:null,content:b?E:null},null):[C(Hb,{key:`label-${String(F)||$}`,class:R,style:A(A(A({},y),D),M),span:1,colon:f,component:g[0],itemPrefixCls:O,bordered:p,label:k},null),C(Hb,{key:`content-${String(F)||$}`,class:R,style:A(A(A({},w),D),I),span:T*2-1,component:g[1],itemPrefixCls:O,bordered:p,content:E},null)]})},{prefixCls:n,vertical:i,row:o,index:r,bordered:a}=t,{labelStyle:s,contentStyle:l}=qe(VL,{labelStyle:se({}),contentStyle:se({})});return i?C(Qe,null,[C("tr",{key:`label-${r}`,class:`${n}-row`},[e(o,t,{component:"th",type:"label",showLabel:!0,labelStyle:s.value,contentStyle:l.value})]),C("tr",{key:`content-${r}`,class:`${n}-row`},[e(o,t,{component:"td",type:"content",showContent:!0,labelStyle:s.value,contentStyle:l.value})])]):C("tr",{key:r,class:`${n}-row`},[e(o,t,{component:a?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0,labelStyle:s.value,contentStyle:l.value})])},Kse=t=>{const{componentCls:e,descriptionsSmallPadding:n,descriptionsDefaultPadding:i,descriptionsMiddlePadding:o,descriptionsBg:r}=t;return{[`&${e}-bordered`]:{[`${e}-view`]:{border:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`,"> table":{tableLayout:"auto",borderCollapse:"collapse"}},[`${e}-item-label, ${e}-item-content`]:{padding:i,borderInlineEnd:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`,"&:last-child":{borderInlineEnd:"none"}},[`${e}-item-label`]:{backgroundColor:r,"&::after":{display:"none"}},[`${e}-row`]:{borderBottom:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`,"&:last-child":{borderBottom:"none"}},[`&${e}-middle`]:{[`${e}-item-label, ${e}-item-content`]:{padding:o}},[`&${e}-small`]:{[`${e}-item-label, ${e}-item-content`]:{padding:n}}}}},Use=t=>{const{componentCls:e,descriptionsExtraColor:n,descriptionItemPaddingBottom:i,descriptionsItemLabelColonMarginRight:o,descriptionsItemLabelColonMarginLeft:r,descriptionsTitleMarginBottom:a}=t;return{[e]:A(A(A({},rt(t)),Kse(t)),{"&-rtl":{direction:"rtl"},[`${e}-header`]:{display:"flex",alignItems:"center",marginBottom:a},[`${e}-title`]:A(A({},un),{flex:"auto",color:t.colorText,fontWeight:t.fontWeightStrong,fontSize:t.fontSizeLG,lineHeight:t.lineHeightLG}),[`${e}-extra`]:{marginInlineStart:"auto",color:n,fontSize:t.fontSize},[`${e}-view`]:{width:"100%",borderRadius:t.borderRadiusLG,table:{width:"100%",tableLayout:"fixed"}},[`${e}-row`]:{"> th, > td":{paddingBottom:i},"&:last-child":{borderBottom:"none"}},[`${e}-item-label`]:{color:t.colorText,fontWeight:"normal",fontSize:t.fontSize,lineHeight:t.lineHeight,textAlign:"start","&::after":{content:'":"',position:"relative",top:-.5,marginInline:`${r}px ${o}px`},[`&${e}-item-no-colon::after`]:{content:'""'}},[`${e}-item-no-label`]:{"&::after":{margin:0,content:'""'}},[`${e}-item-content`]:{display:"table-cell",flex:1,color:t.colorText,fontSize:t.fontSize,lineHeight:t.lineHeight,wordBreak:"break-word",overflowWrap:"break-word"},[`${e}-item`]:{paddingBottom:0,verticalAlign:"top","&-container":{display:"flex",[`${e}-item-label`]:{display:"inline-flex",alignItems:"baseline"},[`${e}-item-content`]:{display:"inline-flex",alignItems:"baseline"}}},"&-middle":{[`${e}-row`]:{"> th, > td":{paddingBottom:t.paddingSM}}},"&-small":{[`${e}-row`]:{"> th, > td":{paddingBottom:t.paddingXS}}}})}},qse=et("Descriptions",t=>{const e=t.colorFillAlter,n=t.fontSizeSM*t.lineHeightSM,i=t.colorText,o=`${t.paddingXS}px ${t.padding}px`,r=`${t.padding}px ${t.paddingLG}px`,a=`${t.paddingSM}px ${t.paddingLG}px`,s=t.padding,l=t.marginXS,c=t.marginXXS/2,u=Ve(t,{descriptionsBg:e,descriptionsTitleMarginBottom:n,descriptionsExtraColor:i,descriptionItemPaddingBottom:s,descriptionsSmallPadding:o,descriptionsDefaultPadding:r,descriptionsMiddlePadding:a,descriptionsItemLabelColonMarginRight:l,descriptionsItemLabelColonMarginLeft:c});return[Use(u)]});Z.any;const Zse=()=>({prefixCls:String,label:Z.any,labelStyle:{type:Object,default:void 0},contentStyle:{type:Object,default:void 0},span:{type:Number,default:1}}),WL=oe({compatConfig:{MODE:3},name:"ADescriptionsItem",props:Zse(),setup(t,e){let{slots:n}=e;return()=>{var i;return(i=n.default)===null||i===void 0?void 0:i.call(n)}}}),jL={xxxl:3,xxl:3,xl:3,lg:3,md:3,sm:2,xs:1};function Jse(t,e){if(typeof t=="number")return t;if(typeof t=="object")for(let n=0;ne)&&(i=At(t,{span:e})),i}function Qse(t,e){const n=Dt(t),i=[];let o=[],r=e;return n.forEach((a,s)=>{var l;const c=(l=a.props)===null||l===void 0?void 0:l.span,u=c||1;if(s===n.length-1){o.push(jP(a,r,c)),i.push(o);return}u({prefixCls:String,bordered:{type:Boolean,default:void 0},size:{type:String,default:"default"},title:Z.any,extra:Z.any,column:{type:[Number,Object],default:()=>jL},layout:String,colon:{type:Boolean,default:void 0},labelStyle:{type:Object,default:void 0},contentStyle:{type:Object,default:void 0}}),VL=Symbol("descriptionsContext"),Pl=oe({compatConfig:{MODE:3},name:"ADescriptions",inheritAttrs:!1,props:ele(),slots:Object,Item:WL,setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,direction:r}=Me("descriptions",t);let a;const s=se({}),[l,c]=qse(o),u=Y1();Hd(()=>{a=u.value.subscribe(f=>{typeof t.column=="object"&&(s.value=f)})}),at(()=>{u.value.unsubscribe(a)}),ot(VL,{labelStyle:Ue(t,"labelStyle"),contentStyle:Ue(t,"contentStyle")});const d=L(()=>Jse(t.column,s.value));return()=>{var f,h,p;const{size:g,bordered:m=!1,layout:v="horizontal",colon:b=!0,title:y=(f=n.title)===null||f===void 0?void 0:f.call(n),extra:w=(h=n.extra)===null||h===void 0?void 0:h.call(n)}=t,x=(p=n.default)===null||p===void 0?void 0:p.call(n),$=Qse(x,d.value);return l(C("div",H(H({},i),{},{class:[o.value,{[`${o.value}-${g}`]:g!=="default",[`${o.value}-bordered`]:!!m,[`${o.value}-rtl`]:r.value==="rtl"},i.class,c.value]}),[(y||w)&&C("div",{class:`${o.value}-header`},[y&&C("div",{class:`${o.value}-title`},[y]),w&&C("div",{class:`${o.value}-extra`},[w])]),C("div",{class:`${o.value}-view`},[C("table",null,[C("tbody",null,[$.map((S,_)=>C(Gse,{key:_,index:_,colon:b,prefixCls:o.value,vertical:v==="vertical",bordered:m,row:S},null))])])])]))}}});Pl.install=function(t){return t.component(Pl.name,Pl),t.component(Pl.Item.name,Pl.Item),t};const tle=t=>{const{componentCls:e,sizePaddingEdgeHorizontal:n,colorSplit:i,lineWidth:o}=t;return{[e]:A(A({},rt(t)),{borderBlockStart:`${o}px solid ${i}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",margin:`0 ${t.dividerVerticalGutterMargin}px`,verticalAlign:"middle",borderTop:0,borderInlineStart:`${o}px solid ${i}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${t.dividerHorizontalGutterMargin}px 0`},[`&-horizontal${e}-with-text`]:{display:"flex",alignItems:"center",margin:`${t.dividerHorizontalWithTextGutterMargin}px 0`,color:t.colorTextHeading,fontWeight:500,fontSize:t.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${i}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${o}px solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${e}-with-text-left`]:{"&::before":{width:"5%"},"&::after":{width:"95%"}},[`&-horizontal${e}-with-text-right`]:{"&::before":{width:"95%"},"&::after":{width:"5%"}},[`${e}-inner-text`]:{display:"inline-block",padding:"0 1em"},"&-dashed":{background:"none",borderColor:i,borderStyle:"dashed",borderWidth:`${o}px 0 0`},[`&-horizontal${e}-with-text${e}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${e}-dashed`]:{borderInlineStartWidth:o,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${e}-with-text`]:{color:t.colorText,fontWeight:"normal",fontSize:t.fontSize},[`&-horizontal${e}-with-text-left${e}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${e}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${e}-with-text-right${e}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${e}-inner-text`]:{paddingInlineEnd:n}}})}},nle=et("Divider",t=>{const e=Ve(t,{dividerVerticalGutterMargin:t.marginXS,dividerHorizontalWithTextGutterMargin:t.margin,dividerHorizontalGutterMargin:t.marginLG});return[tle(e)]},{sizePaddingEdgeHorizontal:0}),ile=()=>({prefixCls:String,type:{type:String,default:"horizontal"},dashed:{type:Boolean,default:!1},orientation:{type:String,default:"center"},plain:{type:Boolean,default:!1},orientationMargin:[String,Number]}),ole=oe({name:"ADivider",inheritAttrs:!1,compatConfig:{MODE:3},props:ile(),setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,direction:r}=Me("divider",t),[a,s]=nle(o),l=L(()=>t.orientation==="left"&&t.orientationMargin!=null),c=L(()=>t.orientation==="right"&&t.orientationMargin!=null),u=L(()=>{const{type:h,dashed:p,plain:g}=t,m=o.value;return{[m]:!0,[s.value]:!!s.value,[`${m}-${h}`]:!0,[`${m}-dashed`]:!!p,[`${m}-plain`]:!!g,[`${m}-rtl`]:r.value==="rtl",[`${m}-no-default-orientation-margin-left`]:l.value,[`${m}-no-default-orientation-margin-right`]:c.value}}),d=L(()=>{const h=typeof t.orientationMargin=="number"?`${t.orientationMargin}px`:t.orientationMargin;return A(A({},l.value&&{marginLeft:h}),c.value&&{marginRight:h})}),f=L(()=>t.orientation.length>0?"-"+t.orientation:t.orientation);return()=>{var h;const p=Dt((h=n.default)===null||h===void 0?void 0:h.call(n));return a(C("div",H(H({},i),{},{class:[u.value,p.length?`${o.value}-with-text ${o.value}-with-text${f.value}`:"",i.class],role:"separator"}),[p.length?C("span",{class:`${o.value}-inner-text`,style:d.value},[p]):null]))}}}),rle=Vt(ole);Io.Button=yd;Io.install=function(t){return t.component(Io.name,Io),t.component(yd.name,yd),t};const XL=()=>({prefixCls:String,width:Z.oneOfType([Z.string,Z.number]),height:Z.oneOfType([Z.string,Z.number]),style:{type:Object,default:void 0},class:String,rootClassName:String,rootStyle:Fe(),placement:{type:String},wrapperClassName:String,level:{type:[String,Array]},levelMove:{type:[Number,Function,Array]},duration:String,ease:String,showMask:{type:Boolean,default:void 0},maskClosable:{type:Boolean,default:void 0},maskStyle:{type:Object,default:void 0},afterVisibleChange:Function,keyboard:{type:Boolean,default:void 0},contentWrapperStyle:xt(),autofocus:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},motion:ve(),maskMotion:Fe()}),ale=()=>A(A({},XL()),{forceRender:{type:Boolean,default:void 0},getContainer:Z.oneOfType([Z.string,Z.func,Z.object,Z.looseBool])}),sle=()=>A(A({},XL()),{getContainer:Function,getOpenCount:Function,scrollLocker:Z.any,inline:Boolean});function lle(t){return Array.isArray(t)?t:[t]}const cle={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"};Object.keys(cle).filter(t=>{if(typeof document>"u")return!1;const e=document.getElementsByTagName("html")[0];return t in(e?e.style:{})})[0];const ule=!(typeof window<"u"&&window.document&&window.document.createElement);var dle=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{pt(()=>{var v;const{open:b,getContainer:y,showMask:w,autofocus:x}=t,$=y==null?void 0:y();p(t),b&&($&&($.parentNode,document.body),pt(()=>{x&&u()}),w&&((v=t.scrollLocker)===null||v===void 0||v.lock()))})}),ye(()=>t.level,()=>{p(t)},{flush:"post"}),ye(()=>t.open,()=>{const{open:v,getContainer:b,scrollLocker:y,showMask:w,autofocus:x}=t,$=b==null?void 0:b();$&&($.parentNode,document.body),v?(x&&u(),w&&(y==null||y.lock())):y==null||y.unLock()},{flush:"post"}),Xn(()=>{var v;const{open:b}=t;b&&(document.body.style.touchAction=""),(v=t.scrollLocker)===null||v===void 0||v.unLock()}),ye(()=>t.placement,v=>{v&&(l.value=null)});const u=()=>{var v,b;(b=(v=r.value)===null||v===void 0?void 0:v.focus)===null||b===void 0||b.call(v)},d=v=>{n("close",v)},f=v=>{v.keyCode===Te.ESC&&(v.stopPropagation(),d(v))},h=()=>{const{open:v,afterVisibleChange:b}=t;b&&b(!!v)},p=v=>{let{level:b,getContainer:y}=v;if(ule)return;const w=y==null?void 0:y(),x=w?w.parentNode:null;c=[],b==="all"?(x?Array.prototype.slice.call(x.children):[]).forEach(S=>{S.nodeName!=="SCRIPT"&&S.nodeName!=="STYLE"&&S.nodeName!=="LINK"&&S!==w&&c.push(S)}):b&&lle(b).forEach($=>{document.querySelectorAll($).forEach(S=>{c.push(S)})})},g=v=>{n("handleClick",v)},m=ie(!1);return ye(r,()=>{pt(()=>{m.value=!0})}),()=>{var v,b;const{width:y,height:w,open:x,prefixCls:$,placement:S,level:_,levelMove:P,ease:O,duration:T,getContainer:M,onChange:I,afterVisibleChange:k,showMask:E,maskClosable:R,maskStyle:D,keyboard:F,getOpenCount:N,scrollLocker:B,contentWrapperStyle:z,style:W,class:j,rootClassName:U,rootStyle:V,maskMotion:q,motion:Y,inline:J}=t,Q=dle(t,["width","height","open","prefixCls","placement","level","levelMove","ease","duration","getContainer","onChange","afterVisibleChange","showMask","maskClosable","maskStyle","keyboard","getOpenCount","scrollLocker","contentWrapperStyle","style","class","rootClassName","rootStyle","maskMotion","motion","inline"]),G=x&&m.value,ee=ce($,{[`${$}-${S}`]:!0,[`${$}-open`]:G,[`${$}-inline`]:J,"no-mask":!E,[U]:!0}),X=typeof Y=="function"?Y(S):Y;return C("div",H(H({},ht(Q,["autofocus"])),{},{tabindex:-1,class:ee,style:V,ref:r,onKeydown:G&&F?f:void 0}),[C(En,q,{default:()=>[E&&ni(C("div",{class:`${$}-mask`,onClick:R?d:void 0,style:D,ref:a},null),[[vi,G]])]}),C(En,H(H({},X),{},{onAfterEnter:h,onAfterLeave:h}),{default:()=>[ni(C("div",{class:`${$}-content-wrapper`,style:[z],ref:o},[C("div",{class:[`${$}-content`,j],style:W,ref:l},[(v=i.default)===null||v===void 0?void 0:v.call(i)]),i.handler?C("div",{onClick:g,ref:s},[(b=i.handler)===null||b===void 0?void 0:b.call(i)]):null]),[[vi,G]])]})])}}});var XP=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{},showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",keyboard:!0,forceRender:!1,autofocus:!0}),emits:["handleClick","close"],setup(t,e){let{emit:n,slots:i}=e;const o=se(null),r=s=>{n("handleClick",s)},a=s=>{n("close",s)};return()=>{const{getContainer:s,wrapperClassName:l,rootClassName:c,rootStyle:u,forceRender:d}=t,f=XP(t,["getContainer","wrapperClassName","rootClassName","rootStyle","forceRender"]);let h=null;if(!s)return C(VP,H(H({},f),{},{rootClassName:c,rootStyle:u,open:t.open,onClose:a,onHandleClick:r,inline:!0}),i);const p=!!i.handler||d;return(p||t.open||o.value)&&(h=C(Xd,{autoLock:!0,visible:t.open,forceRender:p,getContainer:s,wrapperClassName:l},{default:g=>{var{visible:m,afterClose:v}=g,b=XP(g,["visible","afterClose"]);return C(VP,H(H(H({ref:o},f),b),{},{rootClassName:c,rootStyle:u,open:m!==void 0?m:t.open,afterVisibleChange:v!==void 0?v:t.afterVisibleChange,onClose:a,onHandleClick:r}),i)}})),h}}}),hle=t=>{const{componentCls:e,motionDurationSlow:n}=t,i={"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${n}`}}};return{[e]:{[`${e}-mask-motion`]:{"&-enter, &-appear, &-leave":{"&-active":{transition:`all ${n}`}},"&-enter, &-appear":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}}},[`${e}-panel-motion`]:{"&-left":[i,{"&-enter, &-appear":{"&-start":{transform:"translateX(-100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(-100%)"}}}],"&-right":[i,{"&-enter, &-appear":{"&-start":{transform:"translateX(100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(100%)"}}}],"&-top":[i,{"&-enter, &-appear":{"&-start":{transform:"translateY(-100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(-100%)"}}}],"&-bottom":[i,{"&-enter, &-appear":{"&-start":{transform:"translateY(100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(100%)"}}}]}}}},ple=t=>{const{componentCls:e,zIndexPopup:n,colorBgMask:i,colorBgElevated:o,motionDurationSlow:r,motionDurationMid:a,padding:s,paddingLG:l,fontSizeLG:c,lineHeightLG:u,lineWidth:d,lineType:f,colorSplit:h,marginSM:p,colorIcon:g,colorIconHover:m,colorText:v,fontWeightStrong:b,drawerFooterPaddingVertical:y,drawerFooterPaddingHorizontal:w}=t,x=`${e}-content-wrapper`;return{[e]:{position:"fixed",inset:0,zIndex:n,pointerEvents:"none","&-pure":{position:"relative",background:o,[`&${e}-left`]:{boxShadow:t.boxShadowDrawerLeft},[`&${e}-right`]:{boxShadow:t.boxShadowDrawerRight},[`&${e}-top`]:{boxShadow:t.boxShadowDrawerUp},[`&${e}-bottom`]:{boxShadow:t.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${e}-mask`]:{position:"absolute",inset:0,zIndex:n,background:i,pointerEvents:"auto"},[x]:{position:"absolute",zIndex:n,transition:`all ${r}`,"&-hidden":{display:"none"}},[`&-left > ${x}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:t.boxShadowDrawerLeft},[`&-right > ${x}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:t.boxShadowDrawerRight},[`&-top > ${x}`]:{top:0,insetInline:0,boxShadow:t.boxShadowDrawerUp},[`&-bottom > ${x}`]:{bottom:0,insetInline:0,boxShadow:t.boxShadowDrawerDown},[`${e}-content`]:{width:"100%",height:"100%",overflow:"auto",background:o,pointerEvents:"auto"},[`${e}-wrapper-body`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},[`${e}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${s}px ${l}px`,fontSize:c,lineHeight:u,borderBottom:`${d}px ${f} ${h}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${e}-extra`]:{flex:"none"},[`${e}-close`]:{display:"inline-block",marginInlineEnd:p,color:g,fontWeight:b,fontSize:c,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,outline:0,cursor:"pointer",transition:`color ${a}`,textRendering:"auto","&:focus, &:hover":{color:m,textDecoration:"none"}},[`${e}-title`]:{flex:1,margin:0,color:v,fontWeight:t.fontWeightStrong,fontSize:c,lineHeight:u},[`${e}-body`]:{flex:1,minWidth:0,minHeight:0,padding:l,overflow:"auto"},[`${e}-footer`]:{flexShrink:0,padding:`${y}px ${w}px`,borderTop:`${d}px ${f} ${h}`},"&-rtl":{direction:"rtl"}}}},gle=et("Drawer",t=>{const e=Ve(t,{drawerFooterPaddingVertical:t.paddingXS,drawerFooterPaddingHorizontal:t.padding});return[ple(e),hle(e)]},t=>({zIndexPopup:t.zIndexPopupBase}));var mle=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o({autofocus:{type:Boolean,default:void 0},closable:{type:Boolean,default:void 0},closeIcon:Z.any,destroyOnClose:{type:Boolean,default:void 0},forceRender:{type:Boolean,default:void 0},getContainer:{type:[String,Function,Boolean,Object],default:void 0},maskClosable:{type:Boolean,default:void 0},mask:{type:Boolean,default:void 0},maskStyle:Fe(),rootClassName:String,rootStyle:Fe(),size:{type:String},drawerStyle:Fe(),headerStyle:Fe(),bodyStyle:Fe(),contentWrapperStyle:{type:Object,default:void 0},title:Z.any,visible:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},width:Z.oneOfType([Z.string,Z.number]),height:Z.oneOfType([Z.string,Z.number]),zIndex:Number,prefixCls:String,push:Z.oneOfType([Z.looseBool,{type:Object}]),placement:Z.oneOf(vle),keyboard:{type:Boolean,default:void 0},extra:Z.any,footer:Z.any,footerStyle:Fe(),level:Z.any,levelMove:{type:[Number,Array,Function]},handle:Z.any,afterVisibleChange:Function,onAfterVisibleChange:Function,onAfterOpenChange:Function,"onUpdate:visible":Function,"onUpdate:open":Function,onClose:Function}),yle=oe({compatConfig:{MODE:3},name:"ADrawer",inheritAttrs:!1,props:ct(ble(),{closable:!0,placement:"right",maskClosable:!0,mask:!0,level:null,keyboard:!0,push:YP}),slots:Object,setup(t,e){let{emit:n,slots:i,attrs:o}=e;const r=ie(!1),a=ie(!1),s=ie(null),l=ie(!1),c=ie(!1),u=L(()=>{var N;return(N=t.open)!==null&&N!==void 0?N:t.visible});ye(u,()=>{u.value?l.value=!0:c.value=!1},{immediate:!0}),ye([u,l],()=>{u.value&&l.value&&(c.value=!0)},{immediate:!0});const d=qe("parentDrawerOpts",null),{prefixCls:f,getPopupContainer:h,direction:p}=Me("drawer",t),[g,m]=gle(f),v=L(()=>t.getContainer===void 0&&(h!=null&&h.value)?()=>h.value(document.body):t.getContainer);Nt(!t.afterVisibleChange,"Drawer","`afterVisibleChange` prop is deprecated, please use `@afterVisibleChange` event instead"),ot("parentDrawerOpts",{setPush:()=>{r.value=!0},setPull:()=>{r.value=!1,pt(()=>{w()})}}),Ze(()=>{u.value&&d&&d.setPush()}),Xn(()=>{d&&d.setPull()}),ye(c,()=>{d&&(c.value?d.setPush():d.setPull())},{flush:"post"});const w=()=>{var N,B;(B=(N=s.value)===null||N===void 0?void 0:N.domFocus)===null||B===void 0||B.call(N)},x=N=>{n("update:visible",!1),n("update:open",!1),n("close",N)},$=N=>{var B;N||(a.value===!1&&(a.value=!0),t.destroyOnClose&&(l.value=!1)),(B=t.afterVisibleChange)===null||B===void 0||B.call(t,N),n("afterVisibleChange",N),n("afterOpenChange",N)},S=L(()=>{const{push:N,placement:B}=t;let z;return typeof N=="boolean"?z=N?YP.distance:0:z=N.distance,z=parseFloat(String(z||0)),B==="left"||B==="right"?`translateX(${B==="left"?z:-z}px)`:B==="top"||B==="bottom"?`translateY(${B==="top"?z:-z}px)`:null}),_=L(()=>{var N;return(N=t.width)!==null&&N!==void 0?N:t.size==="large"?736:378}),P=L(()=>{var N;return(N=t.height)!==null&&N!==void 0?N:t.size==="large"?736:378}),O=L(()=>{const{mask:N,placement:B}=t;if(!c.value&&!N)return{};const z={};return B==="left"||B==="right"?z.width=Xp(_.value)?`${_.value}px`:_.value:z.height=Xp(P.value)?`${P.value}px`:P.value,z}),T=L(()=>{const{zIndex:N,contentWrapperStyle:B}=t,z=O.value;return[{zIndex:N,transform:r.value?S.value:void 0},A({},B),z]}),M=N=>{const{closable:B,headerStyle:z}=t,W=gn(i,t,"extra"),j=gn(i,t,"title");return!j&&!B?null:C("div",{class:ce(`${N}-header`,{[`${N}-header-close-only`]:B&&!j&&!W}),style:z},[C("div",{class:`${N}-header-title`},[I(N),j&&C("div",{class:`${N}-title`},[j])]),W&&C("div",{class:`${N}-extra`},[W])])},I=N=>{var B;const{closable:z}=t,W=i.closeIcon?(B=i.closeIcon)===null||B===void 0?void 0:B.call(i):t.closeIcon;return z&&C("button",{key:"closer",onClick:x,"aria-label":"Close",class:`${N}-close`},[W===void 0?C(ai,null,null):W])},k=N=>{var B;if(a.value&&!t.forceRender&&!l.value)return null;const{bodyStyle:z,drawerStyle:W}=t;return C("div",{class:`${N}-wrapper-body`,style:W},[M(N),C("div",{key:"body",class:`${N}-body`,style:z},[(B=i.default)===null||B===void 0?void 0:B.call(i)]),E(N)])},E=N=>{const B=gn(i,t,"footer");if(!B)return null;const z=`${N}-footer`;return C("div",{class:z,style:t.footerStyle},[B])},R=L(()=>ce({"no-mask":!t.mask,[`${f.value}-rtl`]:p.value==="rtl"},t.rootClassName,m.value)),D=L(()=>yo(oi(f.value,"mask-motion"))),F=N=>yo(oi(f.value,`panel-motion-${N}`));return()=>{const{width:N,height:B,placement:z,mask:W,forceRender:j}=t,U=mle(t,["width","height","placement","mask","forceRender"]),V=A(A(A({},o),ht(U,["size","closeIcon","closable","destroyOnClose","drawerStyle","headerStyle","bodyStyle","title","push","onAfterVisibleChange","onClose","onUpdate:visible","onUpdate:open","visible"])),{forceRender:j,onClose:x,afterVisibleChange:$,handler:!1,prefixCls:f.value,open:c.value,showMask:W,placement:z,ref:s});return g(C(bd,null,{default:()=>[C(fle,H(H({},V),{},{maskMotion:D.value,motion:F,width:_.value,height:P.value,getContainer:v.value,rootClassName:R.value,rootStyle:t.rootStyle,contentWrapperStyle:T.value}),{handler:t.handle?()=>t.handle:i.handle,default:()=>k(f.value)})]}))}}}),xle=Vt(yle);var wle={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"};function GP(t){for(var e=1;e({prefixCls:String,description:Z.any,type:Ne("default"),shape:Ne("circle"),tooltip:Z.any,href:String,target:String,badge:Fe(),onClick:ve()}),Cle=()=>({prefixCls:Ne()}),$le=()=>A(A({},qS()),{trigger:Ne(),open:Ce(),onOpenChange:ve(),"onUpdate:open":ve()}),Ale=()=>A(A({},qS()),{prefixCls:String,duration:Number,target:ve(),visibilityHeight:Number,onClick:ve()}),_le=oe({compatConfig:{MODE:3},name:"AFloatButtonContent",inheritAttrs:!1,props:Cle(),setup(t,e){let{attrs:n,slots:i}=e;return()=>{var o;const{prefixCls:r}=t,a=Kt((o=i.description)===null||o===void 0?void 0:o.call(i));return C("div",H(H({},n),{},{class:[n.class,`${r}-content`]}),[i.icon||a.length?C(Qe,null,[i.icon&&C("div",{class:`${r}-icon`},[i.icon()]),a.length?C("div",{class:`${r}-description`},[a]):null]):C("div",{class:`${r}-icon`},[C(iv,null,null)])])}}}),YL=Symbol("floatButtonGroupContext"),Ple=t=>(ot(YL,t),t),GL=()=>qe(YL,{shape:se()}),KP=t=>t===0?0:t-Math.sqrt(Math.pow(t,2)/2),Tle=t=>{const{componentCls:e,floatButtonSize:n,motionDurationSlow:i,motionEaseInOutCirc:o}=t,r=`${e}-group`,a=new mt("antFloatButtonMoveDownIn",{"0%":{transform:`translate3d(0, ${n}px, 0)`,transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),s=new mt("antFloatButtonMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:`translate3d(0, ${n}px, 0)`,transformOrigin:"0 0",opacity:0}});return[{[`${r}-wrap`]:A({},Kd(`${r}-wrap`,a,s,i,!0))},{[`${r}-wrap`]:{[` + `.trim()}function bse(t,e){const n=vse(t,e);ii()&&ud(n,`${mse}-dynamic-theme`)}const yse=t=>{const[e,n]=Xr();return cy(L(()=>({theme:e.value,token:n.value,hashId:"",path:["ant-design-icons",t.value]})),()=>[{[`.${t.value}`]:A(A({},qs()),{[`.${t.value} .${t.value}-icon`]:{display:"block"}})}])};function xse(t,e){const n=L(()=>(t==null?void 0:t.value)||{}),i=L(()=>n.value.inherit===!1||!(e!=null&&e.value)?CD:e.value);return L(()=>{if(!(t!=null&&t.value))return e==null?void 0:e.value;const r=A({},i.value.components);return Object.keys(t.value.components||{}).forEach(a=>{r[a]=A(A({},r[a]),t.value.components[a])}),A(A(A({},i.value),n.value),{token:A(A({},i.value.token),n.value.token),components:r})})}var wse=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{A(Fn,KS),Fn.prefixCls=Jl(),Fn.iconPrefixCls=RL(),Fn.getPrefixCls=(t,e)=>e||(t?`${Fn.prefixCls}-${t}`:Fn.prefixCls),Fn.getRootPrefixCls=()=>Fn.prefixCls?Fn.prefixCls:Jl()});let Bb;const Cse=t=>{Bb&&Bb(),Bb=Ke(()=>{A(KS,$t(t)),A(Fn,$t(t))}),t.theme&&bse(Jl(),t.theme)},$se=()=>({getPrefixCls:(t,e)=>e||(t?`${Jl()}-${t}`:Jl()),getIconPrefixCls:RL,getRootPrefixCls:()=>Fn.prefixCls?Fn.prefixCls:Jl()}),As=oe({compatConfig:{MODE:3},name:"AConfigProvider",inheritAttrs:!1,props:u7(),setup(t,e){let{slots:n}=e;const i=am(),o=(E,R)=>{const{prefixCls:D="ant"}=t;if(R)return R;const F=D||i.getPrefixCls("");return E?`${F}-${E}`:F},r=L(()=>t.iconPrefixCls||i.iconPrefixCls.value||jw),a=L(()=>r.value!==i.iconPrefixCls.value),s=L(()=>{var E;return t.csp||((E=i.csp)===null||E===void 0?void 0:E.value)}),l=yse(r),c=xse(L(()=>t.theme),L(()=>{var E;return(E=i.theme)===null||E===void 0?void 0:E.value})),u=E=>(t.renderEmpty||n.renderEmpty||i.renderEmpty||q9)(E),d=L(()=>{var E,R;return(E=t.autoInsertSpaceInButton)!==null&&E!==void 0?E:(R=i.autoInsertSpaceInButton)===null||R===void 0?void 0:R.value}),f=L(()=>{var E;return t.locale||((E=i.locale)===null||E===void 0?void 0:E.value)});ye(f,()=>{KS.locale=f.value},{immediate:!0});const h=L(()=>{var E;return t.direction||((E=i.direction)===null||E===void 0?void 0:E.value)}),p=L(()=>{var E,R;return(E=t.space)!==null&&E!==void 0?E:(R=i.space)===null||R===void 0?void 0:R.value}),g=L(()=>{var E,R;return(E=t.virtual)!==null&&E!==void 0?E:(R=i.virtual)===null||R===void 0?void 0:R.value}),m=L(()=>{var E,R;return(E=t.dropdownMatchSelectWidth)!==null&&E!==void 0?E:(R=i.dropdownMatchSelectWidth)===null||R===void 0?void 0:R.value}),v=L(()=>{var E;return t.getTargetContainer!==void 0?t.getTargetContainer:(E=i.getTargetContainer)===null||E===void 0?void 0:E.value}),b=L(()=>{var E;return t.getPopupContainer!==void 0?t.getPopupContainer:(E=i.getPopupContainer)===null||E===void 0?void 0:E.value}),y=L(()=>{var E;return t.pageHeader!==void 0?t.pageHeader:(E=i.pageHeader)===null||E===void 0?void 0:E.value}),w=L(()=>{var E;return t.input!==void 0?t.input:(E=i.input)===null||E===void 0?void 0:E.value}),x=L(()=>{var E;return t.pagination!==void 0?t.pagination:(E=i.pagination)===null||E===void 0?void 0:E.value}),$=L(()=>{var E;return t.form!==void 0?t.form:(E=i.form)===null||E===void 0?void 0:E.value}),S=L(()=>{var E;return t.select!==void 0?t.select:(E=i.select)===null||E===void 0?void 0:E.value}),_=L(()=>t.componentSize),P=L(()=>t.componentDisabled),O=L(()=>{var E,R;return(E=t.wave)!==null&&E!==void 0?E:(R=i.wave)===null||R===void 0?void 0:R.value}),T={csp:s,autoInsertSpaceInButton:d,locale:f,direction:h,space:p,virtual:g,dropdownMatchSelectWidth:m,getPrefixCls:o,iconPrefixCls:r,theme:L(()=>{var E,R;return(E=c.value)!==null&&E!==void 0?E:(R=i.theme)===null||R===void 0?void 0:R.value}),renderEmpty:u,getTargetContainer:v,getPopupContainer:b,pageHeader:y,input:w,pagination:x,form:$,select:S,componentSize:_,componentDisabled:P,transformCellText:L(()=>t.transformCellText),wave:O},M=L(()=>{const E=c.value||{},{algorithm:R,token:D}=E,F=wse(E,["algorithm","token"]),N=R&&(!Array.isArray(R)||R.length>0)?lD(R):void 0;return A(A({},F),{theme:N,token:A(A({},dm),D)})}),I=L(()=>{var E,R;let D={};return f.value&&(D=((E=f.value.Form)===null||E===void 0?void 0:E.defaultValidateMessages)||((R=bi.Form)===null||R===void 0?void 0:R.defaultValidateMessages)||{}),t.form&&t.form.validateMessages&&(D=A(A({},D),t.form.validateMessages)),D});d7(T),l7({validateMessages:I}),TD(_),Uk(P);const k=E=>{var R,D;let F=a.value?l((R=n.default)===null||R===void 0?void 0:R.call(n)):(D=n.default)===null||D===void 0?void 0:D.call(n);if(t.theme){const N=function(){return F}();F=C(X9,{value:M.value},{default:()=>[N]})}return C(dL,{locale:f.value||E,ANT_MARK__:ex},{default:()=>[F]})};return Ke(()=>{h.value&&(Ns.config({rtl:h.value==="rtl"}),jr.config({rtl:h.value==="rtl"}))}),()=>C(Us,{children:(E,R,D)=>k(D)},null)}});As.config=Cse;As.install=function(t){t.component(As.name,As)};const Ase=(t,e)=>{let{attrs:n,slots:i}=e;return C(nn,H(H({size:"small",type:"primary"},t),n),i)},qf=(t,e,n)=>{const i=DH(n);return{[`${t.componentCls}-${e}`]:{color:t[`color${n}`],background:t[`color${i}Bg`],borderColor:t[`color${i}Border`],[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}}},_se=t=>Op(t,(e,n)=>{let{textColor:i,lightBorderColor:o,lightColor:r,darkColor:a}=n;return{[`${t.componentCls}-${e}`]:{color:i,background:r,borderColor:o,"&-inverse":{color:t.colorTextLightSolid,background:a,borderColor:a},[`&${t.componentCls}-borderless`]:{borderColor:"transparent"}}}}),Pse=t=>{const{paddingXXS:e,lineWidth:n,tagPaddingHorizontal:i,componentCls:o}=t,r=i-n,a=e-n;return{[o]:A(A({},rt(t)),{display:"inline-block",height:"auto",marginInlineEnd:t.marginXS,paddingInline:r,fontSize:t.tagFontSize,lineHeight:`${t.tagLineHeight}px`,whiteSpace:"nowrap",background:t.tagDefaultBg,border:`${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,borderRadius:t.borderRadiusSM,opacity:1,transition:`all ${t.motionDurationMid}`,textAlign:"start",[`&${o}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:t.tagDefaultColor},[`${o}-close-icon`]:{marginInlineStart:a,color:t.colorTextDescription,fontSize:t.tagIconSize,cursor:"pointer",transition:`all ${t.motionDurationMid}`,"&:hover":{color:t.colorTextHeading}},[`&${o}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${t.iconCls}-close, ${t.iconCls}-close:hover`]:{color:t.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${o}-checkable-checked):hover`]:{color:t.colorPrimary,backgroundColor:t.colorFillSecondary},"&:active, &-checked":{color:t.colorTextLightSolid},"&-checked":{backgroundColor:t.colorPrimary,"&:hover":{backgroundColor:t.colorPrimaryHover}},"&:active":{backgroundColor:t.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${t.iconCls} + span, > span + ${t.iconCls}`]:{marginInlineStart:r}}),[`${o}-borderless`]:{borderColor:"transparent",background:t.tagBorderlessBg}}},LL=et("Tag",t=>{const{fontSize:e,lineHeight:n,lineWidth:i,fontSizeIcon:o}=t,r=Math.round(e*n),a=t.fontSizeSM,s=r-i*2,l=t.colorFillAlter,c=t.colorText,u=Ve(t,{tagFontSize:a,tagLineHeight:s,tagDefaultBg:l,tagDefaultColor:c,tagIconSize:o-2*i,tagPaddingHorizontal:8,tagBorderlessBg:t.colorFillTertiary});return[Pse(u),_se(u),qf(u,"success","Success"),qf(u,"processing","Info"),qf(u,"error","Error"),qf(u,"warning","Warning")]}),Tse=()=>({prefixCls:String,checked:{type:Boolean,default:void 0},onChange:{type:Function},onClick:{type:Function},"onUpdate:checked":Function}),ug=oe({compatConfig:{MODE:3},name:"ACheckableTag",inheritAttrs:!1,props:Tse(),setup(t,e){let{slots:n,emit:i,attrs:o}=e;const{prefixCls:r}=Me("tag",t),[a,s]=LL(r),l=u=>{const{checked:d}=t;i("update:checked",!d),i("change",!d),i("click",u)},c=L(()=>ce(r.value,s.value,{[`${r.value}-checkable`]:!0,[`${r.value}-checkable-checked`]:t.checked}));return()=>{var u;return a(C("span",H(H({},o),{},{class:[c.value,o.class],onClick:l}),[(u=n.default)===null||u===void 0?void 0:u.call(n)]))}}}),Ose=()=>({prefixCls:String,color:{type:String},closable:{type:Boolean,default:!1},closeIcon:Z.any,visible:{type:Boolean,default:void 0},onClose:{type:Function},onClick:Ms(),"onUpdate:visible":Function,icon:Z.any,bordered:{type:Boolean,default:!0}}),Ql=oe({compatConfig:{MODE:3},name:"ATag",inheritAttrs:!1,props:Ose(),slots:Object,setup(t,e){let{slots:n,emit:i,attrs:o}=e;const{prefixCls:r,direction:a}=Me("tag",t),[s,l]=LL(r),c=ie(!0);Ke(()=>{t.visible!==void 0&&(c.value=t.visible)});const u=p=>{p.stopPropagation(),i("update:visible",!1),i("close",p),!p.defaultPrevented&&t.visible===void 0&&(c.value=!1)},d=L(()=>Nm(t.color)||tQ(t.color)),f=L(()=>ce(r.value,l.value,{[`${r.value}-${t.color}`]:d.value,[`${r.value}-has-color`]:t.color&&!d.value,[`${r.value}-hidden`]:!c.value,[`${r.value}-rtl`]:a.value==="rtl",[`${r.value}-borderless`]:!t.bordered})),h=p=>{i("click",p)};return()=>{var p,g,m;const{icon:v=(p=n.icon)===null||p===void 0?void 0:p.call(n),color:b,closeIcon:y=(g=n.closeIcon)===null||g===void 0?void 0:g.call(n),closable:w=!1}=t,x=()=>w?y?C("span",{class:`${r.value}-close-icon`,onClick:u},[y]):C(ai,{class:`${r.value}-close-icon`,onClick:u},null):null,$={backgroundColor:b&&!d.value?b:void 0},S=v||null,_=(m=n.default)===null||m===void 0?void 0:m.call(n),P=S?C(Qe,null,[S,C("span",null,[_])]):_,O=t.onClick!==void 0,T=C("span",H(H({},o),{},{onClick:h,class:[f.value,o.class],style:[$,o.style]}),[P,x()]);return s(O?C(J1,null,{default:()=>[T]}):T)}}});Ql.CheckableTag=ug;Ql.install=function(t){return t.component(Ql.name,Ql),t.component(ug.name,ug),t};function Ese(t,e){let{slots:n,attrs:i}=e;return C(Ql,H(H({color:"blue"},t),i),n)}var Mse={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 184H712v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H384v-64c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v64H144c-17.7 0-32 14.3-32 32v664c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V216c0-17.7-14.3-32-32-32zm-40 656H184V460h656v380zM184 392V256h128v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h256v48c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-48h128v136H184z"}}]},name:"calendar",theme:"outlined"};function zP(t){for(var e=1;eT.value||_.value),[k,E]=x4(x),R=se();g({focus:()=>{var J;(J=R.value)===null||J===void 0||J.focus()},blur:()=>{var J;(J=R.value)===null||J===void 0||J.blur()}});const D=J=>b.valueFormat?t.toString(J,b.valueFormat):J,F=(J,Q)=>{const G=D(J);v("update:value",G),v("change",G,Q),y.onFieldChange()},N=J=>{v("update:open",J),v("openChange",J)},B=J=>{v("focus",J)},z=J=>{v("blur",J),y.onFieldBlur()},W=(J,Q)=>{const G=D(J);v("panelChange",G,Q)},j=J=>{const Q=D(J);v("ok",Q)},[U]=xo("DatePicker",ld),V=L(()=>b.value?b.valueFormat?t.toDate(b.value,b.valueFormat):b.value:b.value===""?void 0:b.value),q=L(()=>b.defaultValue?b.valueFormat?t.toDate(b.defaultValue,b.valueFormat):b.defaultValue:b.defaultValue===""?void 0:b.defaultValue),Y=L(()=>b.defaultPickerValue?b.valueFormat?t.toDate(b.defaultPickerValue,b.valueFormat):b.defaultPickerValue:b.defaultPickerValue===""?void 0:b.defaultPickerValue);return()=>{var J,Q,G,ee,X,K;const te=A(A({},U.value),b.locale),ue=A(A({},b),m),{bordered:ae=!0,placeholder:re,suffixIcon:ne=(J=p.suffixIcon)===null||J===void 0?void 0:J.call(p),showToday:le=!0,transitionName:he,allowClear:pe=!0,dateRender:ge=p.dateRender,renderExtraFooter:be=p.renderExtraFooter,monthCellRender:$e=p.monthCellRender||b.monthCellContentRender||p.monthCellContentRender,clearIcon:fe=(Q=p.clearIcon)===null||Q===void 0?void 0:Q.call(p),id:de=y.id.value}=ue,xe=Fse(ue,["bordered","placeholder","suffixIcon","showToday","transitionName","allowClear","dateRender","renderExtraFooter","monthCellRender","clearIcon","id"]),_e=ue.showTime===""?!0:ue.showTime,{format:Oe}=ue;let Re={};c&&(Re.picker=c);const Se=c||ue.picker||"date";Re=A(A(A({},Re),_e?fg(A({format:Oe,picker:Se},typeof _e=="object"?_e:{})):{}),Se==="time"?fg(A(A({format:Oe},xe),{picker:Se})):{});const Ae=x.value,Pe=C(Qe,null,[ne||C(c==="time"?iv:nv,null,null),w.hasFeedback&&w.feedbackIcon]);return k(C(Ite,H(H(H({monthCellRender:$e,dateRender:ge,renderExtraFooter:be,ref:R,placeholder:Rse(te,Se,re),suffixIcon:Pe,dropdownAlign:FL($.value,b.placement),clearIcon:fe||C(si,null,null),allowClear:pe,transitionName:he||`${P.value}-slide-up`},xe),Re),{},{id:de,picker:Se,value:V.value,defaultValue:q.value,defaultPickerValue:Y.value,showToday:le,locale:te.lang,class:ce({[`${Ae}-${I.value}`]:I.value,[`${Ae}-borderless`]:!ae},ei(Ae,zo(w.status,b.status),w.hasFeedback),m.class,E.value,M.value),disabled:O.value,prefixCls:Ae,getPopupContainer:m.getCalendarContainer||S.value,generateConfig:t,prevIcon:((G=p.prevIcon)===null||G===void 0?void 0:G.call(p))||C("span",{class:`${Ae}-prev-icon`},null),nextIcon:((ee=p.nextIcon)===null||ee===void 0?void 0:ee.call(p))||C("span",{class:`${Ae}-next-icon`},null),superPrevIcon:((X=p.superPrevIcon)===null||X===void 0?void 0:X.call(p))||C("span",{class:`${Ae}-super-prev-icon`},null),superNextIcon:((K=p.superNextIcon)===null||K===void 0?void 0:K.call(p))||C("span",{class:`${Ae}-super-next-icon`},null),components:zL,direction:$.value,dropdownClassName:ce(E.value,b.popupClassName,b.dropdownClassName),onChange:F,onOpenChange:N,onFocus:B,onBlur:z,onPanelChange:W,onOk:j}),null))}}})}const i=n(void 0,"ADatePicker"),o=n("week","AWeekPicker"),r=n("month","AMonthPicker"),a=n("year","AYearPicker"),s=n("time","TimePicker"),l=n("quarter","AQuarterPicker");return{DatePicker:i,WeekPicker:o,MonthPicker:r,YearPicker:a,TimePicker:s,QuarterPicker:l}}var Bse={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M873.1 596.2l-164-208A32 32 0 00684 376h-64.8c-6.7 0-10.4 7.7-6.3 13l144.3 183H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h695.9c26.8 0 41.7-30.8 25.2-51.8z"}}]},name:"swap-right",theme:"outlined"};function WP(t){for(var e=1;eb.value||g.value),[x,$]=x4(f),S=se();r({focus:()=>{var B;(B=S.value)===null||B===void 0||B.focus()},blur:()=>{var B;(B=S.value)===null||B===void 0||B.blur()}});const _=B=>c.valueFormat?t.toString(B,c.valueFormat):B,P=(B,z)=>{const W=_(B);l("update:value",W),l("change",W,z),u.onFieldChange()},O=B=>{l("update:open",B),l("openChange",B)},T=B=>{l("focus",B)},M=B=>{l("blur",B),u.onFieldBlur()},I=(B,z)=>{const W=_(B);l("panelChange",W,z)},k=B=>{const z=_(B);l("ok",z)},E=(B,z,W)=>{const j=_(B);l("calendarChange",j,z,W)},[R]=xo("DatePicker",ld),D=L(()=>c.value&&c.valueFormat?t.toDate(c.value,c.valueFormat):c.value),F=L(()=>c.defaultValue&&c.valueFormat?t.toDate(c.defaultValue,c.valueFormat):c.defaultValue),N=L(()=>c.defaultPickerValue&&c.valueFormat?t.toDate(c.defaultPickerValue,c.valueFormat):c.defaultPickerValue);return()=>{var B,z,W,j,U,V,q;const Y=A(A({},R.value),c.locale),J=A(A({},c),s),{prefixCls:Q,bordered:G=!0,placeholder:ee,suffixIcon:X=(B=a.suffixIcon)===null||B===void 0?void 0:B.call(a),picker:K="date",transitionName:te,allowClear:ue=!0,dateRender:ae=a.dateRender,renderExtraFooter:re=a.renderExtraFooter,separator:ne=(z=a.separator)===null||z===void 0?void 0:z.call(a),clearIcon:le=(W=a.clearIcon)===null||W===void 0?void 0:W.call(a),id:he=u.id.value}=J,pe=Hse(J,["prefixCls","bordered","placeholder","suffixIcon","picker","transitionName","allowClear","dateRender","renderExtraFooter","separator","clearIcon","id"]);delete pe["onUpdate:value"],delete pe["onUpdate:open"];const{format:ge,showTime:be}=J;let $e={};$e=A(A(A({},$e),be?fg(A({format:ge,picker:K},be)):{}),K==="time"?fg(A(A({format:ge},ht(pe,["disabledTime"])),{picker:K})):{});const fe=f.value,de=C(Qe,null,[X||C(K==="time"?iv:nv,null,null),d.hasFeedback&&d.feedbackIcon]);return x(C(Wte,H(H(H({dateRender:ae,renderExtraFooter:re,separator:ne||C("span",{"aria-label":"to",class:`${fe}-separator`},[C(US,null,null)]),ref:S,dropdownAlign:FL(h.value,c.placement),placeholder:Lse(Y,K,ee),suffixIcon:de,clearIcon:le||C(si,null,null),allowClear:ue,transitionName:te||`${m.value}-slide-up`},pe),$e),{},{disabled:v.value,id:he,value:D.value,defaultValue:F.value,defaultPickerValue:N.value,picker:K,class:ce({[`${fe}-${w.value}`]:w.value,[`${fe}-borderless`]:!G},ei(fe,zo(d.status,c.status),d.hasFeedback),s.class,$.value,y.value),locale:Y.lang,prefixCls:fe,getPopupContainer:s.getCalendarContainer||p.value,generateConfig:t,prevIcon:((j=a.prevIcon)===null||j===void 0?void 0:j.call(a))||C("span",{class:`${fe}-prev-icon`},null),nextIcon:((U=a.nextIcon)===null||U===void 0?void 0:U.call(a))||C("span",{class:`${fe}-next-icon`},null),superPrevIcon:((V=a.superPrevIcon)===null||V===void 0?void 0:V.call(a))||C("span",{class:`${fe}-super-prev-icon`},null),superNextIcon:((q=a.superNextIcon)===null||q===void 0?void 0:q.call(a))||C("span",{class:`${fe}-super-next-icon`},null),components:zL,direction:h.value,dropdownClassName:ce($.value,c.popupClassName,c.dropdownClassName),onChange:P,onOpenChange:O,onFocus:T,onBlur:M,onPanelChange:I,onOk:k,onCalendarChange:E}),null))}}})}const zL={button:Ase,rangeItem:Ese};function jse(t){return t?Array.isArray(t)?t:[t]:[]}function fg(t){const{format:e,picker:n,showHour:i,showMinute:o,showSecond:r,use12Hours:a}=t,s=jse(e)[0],l=A({},t);return s&&typeof s=="string"&&(!s.includes("s")&&r===void 0&&(l.showSecond=!1),!s.includes("m")&&o===void 0&&(l.showMinute=!1),!s.includes("H")&&!s.includes("h")&&i===void 0&&(l.showHour=!1),(s.includes("a")||s.includes("A"))&&a===void 0&&(l.use12Hours=!0)),n==="time"?l:(typeof s=="function"&&delete l.format,{showTime:l})}function HL(t,e){const{DatePicker:n,WeekPicker:i,MonthPicker:o,YearPicker:r,TimePicker:a,QuarterPicker:s}=Nse(t,e),l=Wse(t,e);return{DatePicker:n,WeekPicker:i,MonthPicker:o,YearPicker:r,TimePicker:a,QuarterPicker:s,RangePicker:l}}const{DatePicker:zb,WeekPicker:kh,MonthPicker:Dh,YearPicker:Vse,TimePicker:Xse,QuarterPicker:Rh,RangePicker:Lh}=HL(rS),Yse=A(zb,{WeekPicker:kh,MonthPicker:Dh,YearPicker:Vse,RangePicker:Lh,TimePicker:Xse,QuarterPicker:Rh,install:t=>(t.component(zb.name,zb),t.component(Lh.name,Lh),t.component(Dh.name,Dh),t.component(kh.name,kh),t.component(Rh.name,Rh),t)});function Zf(t){return t!=null}const Hb=t=>{const{itemPrefixCls:e,component:n,span:i,labelStyle:o,contentStyle:r,bordered:a,label:s,content:l,colon:c}=t,u=n;return a?C(u,{class:[{[`${e}-item-label`]:Zf(s),[`${e}-item-content`]:Zf(l)}],colSpan:i},{default:()=>[Zf(s)&&C("span",{style:o},[s]),Zf(l)&&C("span",{style:r},[l])]}):C(u,{class:[`${e}-item`],colSpan:i},{default:()=>[C("div",{class:`${e}-item-container`},[(s||s===0)&&C("span",{class:[`${e}-item-label`,{[`${e}-item-no-colon`]:!c}],style:o},[s]),(l||l===0)&&C("span",{class:`${e}-item-content`,style:r},[l])])]})},Gse=t=>{const e=(c,u,d)=>{let{colon:f,prefixCls:h,bordered:p}=u,{component:g,type:m,showLabel:v,showContent:b,labelStyle:y,contentStyle:w}=d;return c.map((x,$)=>{var S,_;const P=x.props||{},{prefixCls:O=h,span:T=1,labelStyle:M=P["label-style"],contentStyle:I=P["content-style"],label:k=(_=(S=x.children)===null||S===void 0?void 0:S.label)===null||_===void 0?void 0:_.call(S)}=P,E=rm(x),R=i7(x),D=Hk(x),{key:F}=x;return typeof g=="string"?C(Hb,{key:`${m}-${String(F)||$}`,class:R,style:D,labelStyle:A(A({},y),M),contentStyle:A(A({},w),I),span:T,colon:f,component:g,itemPrefixCls:O,bordered:p,label:v?k:null,content:b?E:null},null):[C(Hb,{key:`label-${String(F)||$}`,class:R,style:A(A(A({},y),D),M),span:1,colon:f,component:g[0],itemPrefixCls:O,bordered:p,label:k},null),C(Hb,{key:`content-${String(F)||$}`,class:R,style:A(A(A({},w),D),I),span:T*2-1,component:g[1],itemPrefixCls:O,bordered:p,content:E},null)]})},{prefixCls:n,vertical:i,row:o,index:r,bordered:a}=t,{labelStyle:s,contentStyle:l}=qe(VL,{labelStyle:se({}),contentStyle:se({})});return i?C(Qe,null,[C("tr",{key:`label-${r}`,class:`${n}-row`},[e(o,t,{component:"th",type:"label",showLabel:!0,labelStyle:s.value,contentStyle:l.value})]),C("tr",{key:`content-${r}`,class:`${n}-row`},[e(o,t,{component:"td",type:"content",showContent:!0,labelStyle:s.value,contentStyle:l.value})])]):C("tr",{key:r,class:`${n}-row`},[e(o,t,{component:a?["th","td"]:"td",type:"item",showLabel:!0,showContent:!0,labelStyle:s.value,contentStyle:l.value})])},Kse=t=>{const{componentCls:e,descriptionsSmallPadding:n,descriptionsDefaultPadding:i,descriptionsMiddlePadding:o,descriptionsBg:r}=t;return{[`&${e}-bordered`]:{[`${e}-view`]:{border:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`,"> table":{tableLayout:"auto",borderCollapse:"collapse"}},[`${e}-item-label, ${e}-item-content`]:{padding:i,borderInlineEnd:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`,"&:last-child":{borderInlineEnd:"none"}},[`${e}-item-label`]:{backgroundColor:r,"&::after":{display:"none"}},[`${e}-row`]:{borderBottom:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`,"&:last-child":{borderBottom:"none"}},[`&${e}-middle`]:{[`${e}-item-label, ${e}-item-content`]:{padding:o}},[`&${e}-small`]:{[`${e}-item-label, ${e}-item-content`]:{padding:n}}}}},Use=t=>{const{componentCls:e,descriptionsExtraColor:n,descriptionItemPaddingBottom:i,descriptionsItemLabelColonMarginRight:o,descriptionsItemLabelColonMarginLeft:r,descriptionsTitleMarginBottom:a}=t;return{[e]:A(A(A({},rt(t)),Kse(t)),{"&-rtl":{direction:"rtl"},[`${e}-header`]:{display:"flex",alignItems:"center",marginBottom:a},[`${e}-title`]:A(A({},un),{flex:"auto",color:t.colorText,fontWeight:t.fontWeightStrong,fontSize:t.fontSizeLG,lineHeight:t.lineHeightLG}),[`${e}-extra`]:{marginInlineStart:"auto",color:n,fontSize:t.fontSize},[`${e}-view`]:{width:"100%",borderRadius:t.borderRadiusLG,table:{width:"100%",tableLayout:"fixed"}},[`${e}-row`]:{"> th, > td":{paddingBottom:i},"&:last-child":{borderBottom:"none"}},[`${e}-item-label`]:{color:t.colorText,fontWeight:"normal",fontSize:t.fontSize,lineHeight:t.lineHeight,textAlign:"start","&::after":{content:'":"',position:"relative",top:-.5,marginInline:`${r}px ${o}px`},[`&${e}-item-no-colon::after`]:{content:'""'}},[`${e}-item-no-label`]:{"&::after":{margin:0,content:'""'}},[`${e}-item-content`]:{display:"table-cell",flex:1,color:t.colorText,fontSize:t.fontSize,lineHeight:t.lineHeight,wordBreak:"break-word",overflowWrap:"break-word"},[`${e}-item`]:{paddingBottom:0,verticalAlign:"top","&-container":{display:"flex",[`${e}-item-label`]:{display:"inline-flex",alignItems:"baseline"},[`${e}-item-content`]:{display:"inline-flex",alignItems:"baseline"}}},"&-middle":{[`${e}-row`]:{"> th, > td":{paddingBottom:t.paddingSM}}},"&-small":{[`${e}-row`]:{"> th, > td":{paddingBottom:t.paddingXS}}}})}},qse=et("Descriptions",t=>{const e=t.colorFillAlter,n=t.fontSizeSM*t.lineHeightSM,i=t.colorText,o=`${t.paddingXS}px ${t.padding}px`,r=`${t.padding}px ${t.paddingLG}px`,a=`${t.paddingSM}px ${t.paddingLG}px`,s=t.padding,l=t.marginXS,c=t.marginXXS/2,u=Ve(t,{descriptionsBg:e,descriptionsTitleMarginBottom:n,descriptionsExtraColor:i,descriptionItemPaddingBottom:s,descriptionsSmallPadding:o,descriptionsDefaultPadding:r,descriptionsMiddlePadding:a,descriptionsItemLabelColonMarginRight:l,descriptionsItemLabelColonMarginLeft:c});return[Use(u)]});Z.any;const Zse=()=>({prefixCls:String,label:Z.any,labelStyle:{type:Object,default:void 0},contentStyle:{type:Object,default:void 0},span:{type:Number,default:1}}),WL=oe({compatConfig:{MODE:3},name:"ADescriptionsItem",props:Zse(),setup(t,e){let{slots:n}=e;return()=>{var i;return(i=n.default)===null||i===void 0?void 0:i.call(n)}}}),jL={xxxl:3,xxl:3,xl:3,lg:3,md:3,sm:2,xs:1};function Jse(t,e){if(typeof t=="number")return t;if(typeof t=="object")for(let n=0;ne)&&(i=At(t,{span:e})),i}function Qse(t,e){const n=Dt(t),i=[];let o=[],r=e;return n.forEach((a,s)=>{var l;const c=(l=a.props)===null||l===void 0?void 0:l.span,u=c||1;if(s===n.length-1){o.push(jP(a,r,c)),i.push(o);return}u({prefixCls:String,bordered:{type:Boolean,default:void 0},size:{type:String,default:"default"},title:Z.any,extra:Z.any,column:{type:[Number,Object],default:()=>jL},layout:String,colon:{type:Boolean,default:void 0},labelStyle:{type:Object,default:void 0},contentStyle:{type:Object,default:void 0}}),VL=Symbol("descriptionsContext"),Pl=oe({compatConfig:{MODE:3},name:"ADescriptions",inheritAttrs:!1,props:ele(),slots:Object,Item:WL,setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,direction:r}=Me("descriptions",t);let a;const s=se({}),[l,c]=qse(o),u=Y1();Wd(()=>{a=u.value.subscribe(f=>{typeof t.column=="object"&&(s.value=f)})}),at(()=>{u.value.unsubscribe(a)}),ot(VL,{labelStyle:Ue(t,"labelStyle"),contentStyle:Ue(t,"contentStyle")});const d=L(()=>Jse(t.column,s.value));return()=>{var f,h,p;const{size:g,bordered:m=!1,layout:v="horizontal",colon:b=!0,title:y=(f=n.title)===null||f===void 0?void 0:f.call(n),extra:w=(h=n.extra)===null||h===void 0?void 0:h.call(n)}=t,x=(p=n.default)===null||p===void 0?void 0:p.call(n),$=Qse(x,d.value);return l(C("div",H(H({},i),{},{class:[o.value,{[`${o.value}-${g}`]:g!=="default",[`${o.value}-bordered`]:!!m,[`${o.value}-rtl`]:r.value==="rtl"},i.class,c.value]}),[(y||w)&&C("div",{class:`${o.value}-header`},[y&&C("div",{class:`${o.value}-title`},[y]),w&&C("div",{class:`${o.value}-extra`},[w])]),C("div",{class:`${o.value}-view`},[C("table",null,[C("tbody",null,[$.map((S,_)=>C(Gse,{key:_,index:_,colon:b,prefixCls:o.value,vertical:v==="vertical",bordered:m,row:S},null))])])])]))}}});Pl.install=function(t){return t.component(Pl.name,Pl),t.component(Pl.Item.name,Pl.Item),t};const tle=t=>{const{componentCls:e,sizePaddingEdgeHorizontal:n,colorSplit:i,lineWidth:o}=t;return{[e]:A(A({},rt(t)),{borderBlockStart:`${o}px solid ${i}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",margin:`0 ${t.dividerVerticalGutterMargin}px`,verticalAlign:"middle",borderTop:0,borderInlineStart:`${o}px solid ${i}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${t.dividerHorizontalGutterMargin}px 0`},[`&-horizontal${e}-with-text`]:{display:"flex",alignItems:"center",margin:`${t.dividerHorizontalWithTextGutterMargin}px 0`,color:t.colorTextHeading,fontWeight:500,fontSize:t.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${i}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${o}px solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${e}-with-text-left`]:{"&::before":{width:"5%"},"&::after":{width:"95%"}},[`&-horizontal${e}-with-text-right`]:{"&::before":{width:"95%"},"&::after":{width:"5%"}},[`${e}-inner-text`]:{display:"inline-block",padding:"0 1em"},"&-dashed":{background:"none",borderColor:i,borderStyle:"dashed",borderWidth:`${o}px 0 0`},[`&-horizontal${e}-with-text${e}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${e}-dashed`]:{borderInlineStartWidth:o,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${e}-with-text`]:{color:t.colorText,fontWeight:"normal",fontSize:t.fontSize},[`&-horizontal${e}-with-text-left${e}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${e}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${e}-with-text-right${e}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${e}-inner-text`]:{paddingInlineEnd:n}}})}},nle=et("Divider",t=>{const e=Ve(t,{dividerVerticalGutterMargin:t.marginXS,dividerHorizontalWithTextGutterMargin:t.margin,dividerHorizontalGutterMargin:t.marginLG});return[tle(e)]},{sizePaddingEdgeHorizontal:0}),ile=()=>({prefixCls:String,type:{type:String,default:"horizontal"},dashed:{type:Boolean,default:!1},orientation:{type:String,default:"center"},plain:{type:Boolean,default:!1},orientationMargin:[String,Number]}),ole=oe({name:"ADivider",inheritAttrs:!1,compatConfig:{MODE:3},props:ile(),setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,direction:r}=Me("divider",t),[a,s]=nle(o),l=L(()=>t.orientation==="left"&&t.orientationMargin!=null),c=L(()=>t.orientation==="right"&&t.orientationMargin!=null),u=L(()=>{const{type:h,dashed:p,plain:g}=t,m=o.value;return{[m]:!0,[s.value]:!!s.value,[`${m}-${h}`]:!0,[`${m}-dashed`]:!!p,[`${m}-plain`]:!!g,[`${m}-rtl`]:r.value==="rtl",[`${m}-no-default-orientation-margin-left`]:l.value,[`${m}-no-default-orientation-margin-right`]:c.value}}),d=L(()=>{const h=typeof t.orientationMargin=="number"?`${t.orientationMargin}px`:t.orientationMargin;return A(A({},l.value&&{marginLeft:h}),c.value&&{marginRight:h})}),f=L(()=>t.orientation.length>0?"-"+t.orientation:t.orientation);return()=>{var h;const p=Dt((h=n.default)===null||h===void 0?void 0:h.call(n));return a(C("div",H(H({},i),{},{class:[u.value,p.length?`${o.value}-with-text ${o.value}-with-text${f.value}`:"",i.class],role:"separator"}),[p.length?C("span",{class:`${o.value}-inner-text`,style:d.value},[p]):null]))}}}),rle=Vt(ole);Io.Button=xd;Io.install=function(t){return t.component(Io.name,Io),t.component(xd.name,xd),t};const XL=()=>({prefixCls:String,width:Z.oneOfType([Z.string,Z.number]),height:Z.oneOfType([Z.string,Z.number]),style:{type:Object,default:void 0},class:String,rootClassName:String,rootStyle:Fe(),placement:{type:String},wrapperClassName:String,level:{type:[String,Array]},levelMove:{type:[Number,Function,Array]},duration:String,ease:String,showMask:{type:Boolean,default:void 0},maskClosable:{type:Boolean,default:void 0},maskStyle:{type:Object,default:void 0},afterVisibleChange:Function,keyboard:{type:Boolean,default:void 0},contentWrapperStyle:xt(),autofocus:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},motion:ve(),maskMotion:Fe()}),ale=()=>A(A({},XL()),{forceRender:{type:Boolean,default:void 0},getContainer:Z.oneOfType([Z.string,Z.func,Z.object,Z.looseBool])}),sle=()=>A(A({},XL()),{getContainer:Function,getOpenCount:Function,scrollLocker:Z.any,inline:Boolean});function lle(t){return Array.isArray(t)?t:[t]}const cle={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"};Object.keys(cle).filter(t=>{if(typeof document>"u")return!1;const e=document.getElementsByTagName("html")[0];return t in(e?e.style:{})})[0];const ule=!(typeof window<"u"&&window.document&&window.document.createElement);var dle=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{pt(()=>{var v;const{open:b,getContainer:y,showMask:w,autofocus:x}=t,$=y==null?void 0:y();p(t),b&&($&&($.parentNode,document.body),pt(()=>{x&&u()}),w&&((v=t.scrollLocker)===null||v===void 0||v.lock()))})}),ye(()=>t.level,()=>{p(t)},{flush:"post"}),ye(()=>t.open,()=>{const{open:v,getContainer:b,scrollLocker:y,showMask:w,autofocus:x}=t,$=b==null?void 0:b();$&&($.parentNode,document.body),v?(x&&u(),w&&(y==null||y.lock())):y==null||y.unLock()},{flush:"post"}),Xn(()=>{var v;const{open:b}=t;b&&(document.body.style.touchAction=""),(v=t.scrollLocker)===null||v===void 0||v.unLock()}),ye(()=>t.placement,v=>{v&&(l.value=null)});const u=()=>{var v,b;(b=(v=r.value)===null||v===void 0?void 0:v.focus)===null||b===void 0||b.call(v)},d=v=>{n("close",v)},f=v=>{v.keyCode===Te.ESC&&(v.stopPropagation(),d(v))},h=()=>{const{open:v,afterVisibleChange:b}=t;b&&b(!!v)},p=v=>{let{level:b,getContainer:y}=v;if(ule)return;const w=y==null?void 0:y(),x=w?w.parentNode:null;c=[],b==="all"?(x?Array.prototype.slice.call(x.children):[]).forEach(S=>{S.nodeName!=="SCRIPT"&&S.nodeName!=="STYLE"&&S.nodeName!=="LINK"&&S!==w&&c.push(S)}):b&&lle(b).forEach($=>{document.querySelectorAll($).forEach(S=>{c.push(S)})})},g=v=>{n("handleClick",v)},m=ie(!1);return ye(r,()=>{pt(()=>{m.value=!0})}),()=>{var v,b;const{width:y,height:w,open:x,prefixCls:$,placement:S,level:_,levelMove:P,ease:O,duration:T,getContainer:M,onChange:I,afterVisibleChange:k,showMask:E,maskClosable:R,maskStyle:D,keyboard:F,getOpenCount:N,scrollLocker:B,contentWrapperStyle:z,style:W,class:j,rootClassName:U,rootStyle:V,maskMotion:q,motion:Y,inline:J}=t,Q=dle(t,["width","height","open","prefixCls","placement","level","levelMove","ease","duration","getContainer","onChange","afterVisibleChange","showMask","maskClosable","maskStyle","keyboard","getOpenCount","scrollLocker","contentWrapperStyle","style","class","rootClassName","rootStyle","maskMotion","motion","inline"]),G=x&&m.value,ee=ce($,{[`${$}-${S}`]:!0,[`${$}-open`]:G,[`${$}-inline`]:J,"no-mask":!E,[U]:!0}),X=typeof Y=="function"?Y(S):Y;return C("div",H(H({},ht(Q,["autofocus"])),{},{tabindex:-1,class:ee,style:V,ref:r,onKeydown:G&&F?f:void 0}),[C(En,q,{default:()=>[E&&ni(C("div",{class:`${$}-mask`,onClick:R?d:void 0,style:D,ref:a},null),[[vi,G]])]}),C(En,H(H({},X),{},{onAfterEnter:h,onAfterLeave:h}),{default:()=>[ni(C("div",{class:`${$}-content-wrapper`,style:[z],ref:o},[C("div",{class:[`${$}-content`,j],style:W,ref:l},[(v=i.default)===null||v===void 0?void 0:v.call(i)]),i.handler?C("div",{onClick:g,ref:s},[(b=i.handler)===null||b===void 0?void 0:b.call(i)]):null]),[[vi,G]])]})])}}});var XP=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{},showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",keyboard:!0,forceRender:!1,autofocus:!0}),emits:["handleClick","close"],setup(t,e){let{emit:n,slots:i}=e;const o=se(null),r=s=>{n("handleClick",s)},a=s=>{n("close",s)};return()=>{const{getContainer:s,wrapperClassName:l,rootClassName:c,rootStyle:u,forceRender:d}=t,f=XP(t,["getContainer","wrapperClassName","rootClassName","rootStyle","forceRender"]);let h=null;if(!s)return C(VP,H(H({},f),{},{rootClassName:c,rootStyle:u,open:t.open,onClose:a,onHandleClick:r,inline:!0}),i);const p=!!i.handler||d;return(p||t.open||o.value)&&(h=C(Yd,{autoLock:!0,visible:t.open,forceRender:p,getContainer:s,wrapperClassName:l},{default:g=>{var{visible:m,afterClose:v}=g,b=XP(g,["visible","afterClose"]);return C(VP,H(H(H({ref:o},f),b),{},{rootClassName:c,rootStyle:u,open:m!==void 0?m:t.open,afterVisibleChange:v!==void 0?v:t.afterVisibleChange,onClose:a,onHandleClick:r}),i)}})),h}}}),hle=t=>{const{componentCls:e,motionDurationSlow:n}=t,i={"&-enter, &-appear, &-leave":{"&-start":{transition:"none"},"&-active":{transition:`all ${n}`}}};return{[e]:{[`${e}-mask-motion`]:{"&-enter, &-appear, &-leave":{"&-active":{transition:`all ${n}`}},"&-enter, &-appear":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}}},[`${e}-panel-motion`]:{"&-left":[i,{"&-enter, &-appear":{"&-start":{transform:"translateX(-100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(-100%)"}}}],"&-right":[i,{"&-enter, &-appear":{"&-start":{transform:"translateX(100%) !important"},"&-active":{transform:"translateX(0)"}},"&-leave":{transform:"translateX(0)","&-active":{transform:"translateX(100%)"}}}],"&-top":[i,{"&-enter, &-appear":{"&-start":{transform:"translateY(-100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(-100%)"}}}],"&-bottom":[i,{"&-enter, &-appear":{"&-start":{transform:"translateY(100%) !important"},"&-active":{transform:"translateY(0)"}},"&-leave":{transform:"translateY(0)","&-active":{transform:"translateY(100%)"}}}]}}}},ple=t=>{const{componentCls:e,zIndexPopup:n,colorBgMask:i,colorBgElevated:o,motionDurationSlow:r,motionDurationMid:a,padding:s,paddingLG:l,fontSizeLG:c,lineHeightLG:u,lineWidth:d,lineType:f,colorSplit:h,marginSM:p,colorIcon:g,colorIconHover:m,colorText:v,fontWeightStrong:b,drawerFooterPaddingVertical:y,drawerFooterPaddingHorizontal:w}=t,x=`${e}-content-wrapper`;return{[e]:{position:"fixed",inset:0,zIndex:n,pointerEvents:"none","&-pure":{position:"relative",background:o,[`&${e}-left`]:{boxShadow:t.boxShadowDrawerLeft},[`&${e}-right`]:{boxShadow:t.boxShadowDrawerRight},[`&${e}-top`]:{boxShadow:t.boxShadowDrawerUp},[`&${e}-bottom`]:{boxShadow:t.boxShadowDrawerDown}},"&-inline":{position:"absolute"},[`${e}-mask`]:{position:"absolute",inset:0,zIndex:n,background:i,pointerEvents:"auto"},[x]:{position:"absolute",zIndex:n,transition:`all ${r}`,"&-hidden":{display:"none"}},[`&-left > ${x}`]:{top:0,bottom:0,left:{_skip_check_:!0,value:0},boxShadow:t.boxShadowDrawerLeft},[`&-right > ${x}`]:{top:0,right:{_skip_check_:!0,value:0},bottom:0,boxShadow:t.boxShadowDrawerRight},[`&-top > ${x}`]:{top:0,insetInline:0,boxShadow:t.boxShadowDrawerUp},[`&-bottom > ${x}`]:{bottom:0,insetInline:0,boxShadow:t.boxShadowDrawerDown},[`${e}-content`]:{width:"100%",height:"100%",overflow:"auto",background:o,pointerEvents:"auto"},[`${e}-wrapper-body`]:{display:"flex",flexDirection:"column",width:"100%",height:"100%"},[`${e}-header`]:{display:"flex",flex:0,alignItems:"center",padding:`${s}px ${l}px`,fontSize:c,lineHeight:u,borderBottom:`${d}px ${f} ${h}`,"&-title":{display:"flex",flex:1,alignItems:"center",minWidth:0,minHeight:0}},[`${e}-extra`]:{flex:"none"},[`${e}-close`]:{display:"inline-block",marginInlineEnd:p,color:g,fontWeight:b,fontSize:c,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",textDecoration:"none",background:"transparent",border:0,outline:0,cursor:"pointer",transition:`color ${a}`,textRendering:"auto","&:focus, &:hover":{color:m,textDecoration:"none"}},[`${e}-title`]:{flex:1,margin:0,color:v,fontWeight:t.fontWeightStrong,fontSize:c,lineHeight:u},[`${e}-body`]:{flex:1,minWidth:0,minHeight:0,padding:l,overflow:"auto"},[`${e}-footer`]:{flexShrink:0,padding:`${y}px ${w}px`,borderTop:`${d}px ${f} ${h}`},"&-rtl":{direction:"rtl"}}}},gle=et("Drawer",t=>{const e=Ve(t,{drawerFooterPaddingVertical:t.paddingXS,drawerFooterPaddingHorizontal:t.padding});return[ple(e),hle(e)]},t=>({zIndexPopup:t.zIndexPopupBase}));var mle=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o({autofocus:{type:Boolean,default:void 0},closable:{type:Boolean,default:void 0},closeIcon:Z.any,destroyOnClose:{type:Boolean,default:void 0},forceRender:{type:Boolean,default:void 0},getContainer:{type:[String,Function,Boolean,Object],default:void 0},maskClosable:{type:Boolean,default:void 0},mask:{type:Boolean,default:void 0},maskStyle:Fe(),rootClassName:String,rootStyle:Fe(),size:{type:String},drawerStyle:Fe(),headerStyle:Fe(),bodyStyle:Fe(),contentWrapperStyle:{type:Object,default:void 0},title:Z.any,visible:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},width:Z.oneOfType([Z.string,Z.number]),height:Z.oneOfType([Z.string,Z.number]),zIndex:Number,prefixCls:String,push:Z.oneOfType([Z.looseBool,{type:Object}]),placement:Z.oneOf(vle),keyboard:{type:Boolean,default:void 0},extra:Z.any,footer:Z.any,footerStyle:Fe(),level:Z.any,levelMove:{type:[Number,Array,Function]},handle:Z.any,afterVisibleChange:Function,onAfterVisibleChange:Function,onAfterOpenChange:Function,"onUpdate:visible":Function,"onUpdate:open":Function,onClose:Function}),yle=oe({compatConfig:{MODE:3},name:"ADrawer",inheritAttrs:!1,props:ct(ble(),{closable:!0,placement:"right",maskClosable:!0,mask:!0,level:null,keyboard:!0,push:YP}),slots:Object,setup(t,e){let{emit:n,slots:i,attrs:o}=e;const r=ie(!1),a=ie(!1),s=ie(null),l=ie(!1),c=ie(!1),u=L(()=>{var N;return(N=t.open)!==null&&N!==void 0?N:t.visible});ye(u,()=>{u.value?l.value=!0:c.value=!1},{immediate:!0}),ye([u,l],()=>{u.value&&l.value&&(c.value=!0)},{immediate:!0});const d=qe("parentDrawerOpts",null),{prefixCls:f,getPopupContainer:h,direction:p}=Me("drawer",t),[g,m]=gle(f),v=L(()=>t.getContainer===void 0&&(h!=null&&h.value)?()=>h.value(document.body):t.getContainer);Nt(!t.afterVisibleChange,"Drawer","`afterVisibleChange` prop is deprecated, please use `@afterVisibleChange` event instead"),ot("parentDrawerOpts",{setPush:()=>{r.value=!0},setPull:()=>{r.value=!1,pt(()=>{w()})}}),Ze(()=>{u.value&&d&&d.setPush()}),Xn(()=>{d&&d.setPull()}),ye(c,()=>{d&&(c.value?d.setPush():d.setPull())},{flush:"post"});const w=()=>{var N,B;(B=(N=s.value)===null||N===void 0?void 0:N.domFocus)===null||B===void 0||B.call(N)},x=N=>{n("update:visible",!1),n("update:open",!1),n("close",N)},$=N=>{var B;N||(a.value===!1&&(a.value=!0),t.destroyOnClose&&(l.value=!1)),(B=t.afterVisibleChange)===null||B===void 0||B.call(t,N),n("afterVisibleChange",N),n("afterOpenChange",N)},S=L(()=>{const{push:N,placement:B}=t;let z;return typeof N=="boolean"?z=N?YP.distance:0:z=N.distance,z=parseFloat(String(z||0)),B==="left"||B==="right"?`translateX(${B==="left"?z:-z}px)`:B==="top"||B==="bottom"?`translateY(${B==="top"?z:-z}px)`:null}),_=L(()=>{var N;return(N=t.width)!==null&&N!==void 0?N:t.size==="large"?736:378}),P=L(()=>{var N;return(N=t.height)!==null&&N!==void 0?N:t.size==="large"?736:378}),O=L(()=>{const{mask:N,placement:B}=t;if(!c.value&&!N)return{};const z={};return B==="left"||B==="right"?z.width=Yp(_.value)?`${_.value}px`:_.value:z.height=Yp(P.value)?`${P.value}px`:P.value,z}),T=L(()=>{const{zIndex:N,contentWrapperStyle:B}=t,z=O.value;return[{zIndex:N,transform:r.value?S.value:void 0},A({},B),z]}),M=N=>{const{closable:B,headerStyle:z}=t,W=gn(i,t,"extra"),j=gn(i,t,"title");return!j&&!B?null:C("div",{class:ce(`${N}-header`,{[`${N}-header-close-only`]:B&&!j&&!W}),style:z},[C("div",{class:`${N}-header-title`},[I(N),j&&C("div",{class:`${N}-title`},[j])]),W&&C("div",{class:`${N}-extra`},[W])])},I=N=>{var B;const{closable:z}=t,W=i.closeIcon?(B=i.closeIcon)===null||B===void 0?void 0:B.call(i):t.closeIcon;return z&&C("button",{key:"closer",onClick:x,"aria-label":"Close",class:`${N}-close`},[W===void 0?C(ai,null,null):W])},k=N=>{var B;if(a.value&&!t.forceRender&&!l.value)return null;const{bodyStyle:z,drawerStyle:W}=t;return C("div",{class:`${N}-wrapper-body`,style:W},[M(N),C("div",{key:"body",class:`${N}-body`,style:z},[(B=i.default)===null||B===void 0?void 0:B.call(i)]),E(N)])},E=N=>{const B=gn(i,t,"footer");if(!B)return null;const z=`${N}-footer`;return C("div",{class:z,style:t.footerStyle},[B])},R=L(()=>ce({"no-mask":!t.mask,[`${f.value}-rtl`]:p.value==="rtl"},t.rootClassName,m.value)),D=L(()=>yo(oi(f.value,"mask-motion"))),F=N=>yo(oi(f.value,`panel-motion-${N}`));return()=>{const{width:N,height:B,placement:z,mask:W,forceRender:j}=t,U=mle(t,["width","height","placement","mask","forceRender"]),V=A(A(A({},o),ht(U,["size","closeIcon","closable","destroyOnClose","drawerStyle","headerStyle","bodyStyle","title","push","onAfterVisibleChange","onClose","onUpdate:visible","onUpdate:open","visible"])),{forceRender:j,onClose:x,afterVisibleChange:$,handler:!1,prefixCls:f.value,open:c.value,showMask:W,placement:z,ref:s});return g(C(yd,null,{default:()=>[C(fle,H(H({},V),{},{maskMotion:D.value,motion:F,width:_.value,height:P.value,getContainer:v.value,rootClassName:R.value,rootStyle:t.rootStyle,contentWrapperStyle:T.value}),{handler:t.handle?()=>t.handle:i.handle,default:()=>k(f.value)})]}))}}}),xle=Vt(yle);var wle={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"};function GP(t){for(var e=1;e({prefixCls:String,description:Z.any,type:Ne("default"),shape:Ne("circle"),tooltip:Z.any,href:String,target:String,badge:Fe(),onClick:ve()}),Cle=()=>({prefixCls:Ne()}),$le=()=>A(A({},qS()),{trigger:Ne(),open:Ce(),onOpenChange:ve(),"onUpdate:open":ve()}),Ale=()=>A(A({},qS()),{prefixCls:String,duration:Number,target:ve(),visibilityHeight:Number,onClick:ve()}),_le=oe({compatConfig:{MODE:3},name:"AFloatButtonContent",inheritAttrs:!1,props:Cle(),setup(t,e){let{attrs:n,slots:i}=e;return()=>{var o;const{prefixCls:r}=t,a=Kt((o=i.description)===null||o===void 0?void 0:o.call(i));return C("div",H(H({},n),{},{class:[n.class,`${r}-content`]}),[i.icon||a.length?C(Qe,null,[i.icon&&C("div",{class:`${r}-icon`},[i.icon()]),a.length?C("div",{class:`${r}-description`},[a]):null]):C("div",{class:`${r}-icon`},[C(ov,null,null)])])}}}),YL=Symbol("floatButtonGroupContext"),Ple=t=>(ot(YL,t),t),GL=()=>qe(YL,{shape:se()}),KP=t=>t===0?0:t-Math.sqrt(Math.pow(t,2)/2),Tle=t=>{const{componentCls:e,floatButtonSize:n,motionDurationSlow:i,motionEaseInOutCirc:o}=t,r=`${e}-group`,a=new mt("antFloatButtonMoveDownIn",{"0%":{transform:`translate3d(0, ${n}px, 0)`,transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),s=new mt("antFloatButtonMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:`translate3d(0, ${n}px, 0)`,transformOrigin:"0 0",opacity:0}});return[{[`${r}-wrap`]:A({},Ud(`${r}-wrap`,a,s,i,!0))},{[`${r}-wrap`]:{[` &${r}-wrap-enter, &${r}-wrap-appear - `]:{opacity:0,animationTimingFunction:o},[`&${r}-wrap-leave`]:{animationTimingFunction:o}}}]},Ole=t=>{const{antCls:e,componentCls:n,floatButtonSize:i,margin:o,borderRadiusLG:r,borderRadiusSM:a,badgeOffset:s,floatButtonBodyPadding:l}=t,c=`${n}-group`;return{[c]:A(A({},rt(t)),{zIndex:99,display:"block",border:"none",position:"fixed",width:i,height:"auto",boxShadow:"none",minHeight:i,insetInlineEnd:t.floatButtonInsetInlineEnd,insetBlockEnd:t.floatButtonInsetBlockEnd,borderRadius:r,[`${c}-wrap`]:{zIndex:-1,display:"block",position:"relative",marginBottom:o},[`&${c}-rtl`]:{direction:"rtl"},[n]:{position:"static"}}),[`${c}-circle`]:{[`${n}-circle:not(:last-child)`]:{marginBottom:t.margin,[`${n}-body`]:{width:i,height:i,borderRadius:"50%"}}},[`${c}-square`]:{[`${n}-square`]:{borderRadius:0,padding:0,"&:first-child":{borderStartStartRadius:r,borderStartEndRadius:r},"&:last-child":{borderEndStartRadius:r,borderEndEndRadius:r},"&:not(:last-child)":{borderBottom:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`},[`${e}-badge`]:{[`${e}-badge-count`]:{top:-(l+s),insetInlineEnd:-(l+s)}}},[`${c}-wrap`]:{display:"block",borderRadius:r,boxShadow:t.boxShadowSecondary,[`${n}-square`]:{boxShadow:"none",marginTop:0,borderRadius:0,padding:l,"&:first-child":{borderStartStartRadius:r,borderStartEndRadius:r},"&:last-child":{borderEndStartRadius:r,borderEndEndRadius:r},"&:not(:last-child)":{borderBottom:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`},[`${n}-body`]:{width:t.floatButtonBodySize,height:t.floatButtonBodySize}}}},[`${c}-circle-shadow`]:{boxShadow:"none"},[`${c}-square-shadow`]:{boxShadow:t.boxShadowSecondary,[`${n}-square`]:{boxShadow:"none",padding:l,[`${n}-body`]:{width:t.floatButtonBodySize,height:t.floatButtonBodySize,borderRadius:a}}}}},Ele=t=>{const{antCls:e,componentCls:n,floatButtonBodyPadding:i,floatButtonIconSize:o,floatButtonSize:r,borderRadiusLG:a,badgeOffset:s,dotOffsetInSquare:l,dotOffsetInCircle:c}=t;return{[n]:A(A({},rt(t)),{border:"none",position:"fixed",cursor:"pointer",zIndex:99,display:"block",justifyContent:"center",alignItems:"center",width:r,height:r,insetInlineEnd:t.floatButtonInsetInlineEnd,insetBlockEnd:t.floatButtonInsetBlockEnd,boxShadow:t.boxShadowSecondary,"&-pure":{position:"relative",inset:"auto"},"&:empty":{display:"none"},[`${e}-badge`]:{width:"100%",height:"100%",[`${e}-badge-count`]:{transform:"translate(0, 0)",transformOrigin:"center",top:-s,insetInlineEnd:-s}},[`${n}-body`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",transition:`all ${t.motionDurationMid}`,[`${n}-content`]:{overflow:"hidden",textAlign:"center",minHeight:r,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:`${i/2}px ${i}px`,[`${n}-icon`]:{textAlign:"center",margin:"auto",width:o,fontSize:o,lineHeight:1}}}}),[`${n}-rtl`]:{direction:"rtl"},[`${n}-circle`]:{height:r,borderRadius:"50%",[`${e}-badge`]:{[`${e}-badge-dot`]:{top:c,insetInlineEnd:c}},[`${n}-body`]:{borderRadius:"50%"}},[`${n}-square`]:{height:"auto",minHeight:r,borderRadius:a,[`${e}-badge`]:{[`${e}-badge-dot`]:{top:l,insetInlineEnd:l}},[`${n}-body`]:{height:"auto",borderRadius:a}},[`${n}-default`]:{backgroundColor:t.floatButtonBackgroundColor,transition:`background-color ${t.motionDurationMid}`,[`${n}-body`]:{backgroundColor:t.floatButtonBackgroundColor,transition:`background-color ${t.motionDurationMid}`,"&:hover":{backgroundColor:t.colorFillContent},[`${n}-content`]:{[`${n}-icon`]:{color:t.colorText},[`${n}-description`]:{display:"flex",alignItems:"center",lineHeight:`${t.fontSizeLG}px`,color:t.colorText,fontSize:t.fontSizeSM}}}},[`${n}-primary`]:{backgroundColor:t.colorPrimary,[`${n}-body`]:{backgroundColor:t.colorPrimary,transition:`background-color ${t.motionDurationMid}`,"&:hover":{backgroundColor:t.colorPrimaryHover},[`${n}-content`]:{[`${n}-icon`]:{color:t.colorTextLightSolid},[`${n}-description`]:{display:"flex",alignItems:"center",lineHeight:`${t.fontSizeLG}px`,color:t.colorTextLightSolid,fontSize:t.fontSizeSM}}}}}},ZS=et("FloatButton",t=>{const{colorTextLightSolid:e,colorBgElevated:n,controlHeightLG:i,marginXXL:o,marginLG:r,fontSize:a,fontSizeIcon:s,controlItemBgHover:l,paddingXXS:c,borderRadiusLG:u}=t,d=Ve(t,{floatButtonBackgroundColor:n,floatButtonColor:e,floatButtonHoverBackgroundColor:l,floatButtonFontSize:a,floatButtonIconSize:s*1.5,floatButtonSize:i,floatButtonInsetBlockEnd:o,floatButtonInsetInlineEnd:r,floatButtonBodySize:i-c*2,floatButtonBodyPadding:c,badgeOffset:c*1.5,dotOffsetInCircle:KP(i/2),dotOffsetInSquare:KP(u)});return[Ole(d),Ele(d),j1(t),Tle(d)]});var Mle=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o(l==null?void 0:l.value)||t.shape);return()=>{var d;const{prefixCls:f,type:h="default",shape:p="circle",description:g=(d=i.description)===null||d===void 0?void 0:d.call(i),tooltip:m,badge:v={}}=t,b=Mle(t,["prefixCls","type","shape","description","tooltip","badge"]),y=ce(o.value,`${o.value}-${h}`,`${o.value}-${u.value}`,{[`${o.value}-rtl`]:r.value==="rtl"},n.class,s.value),w=C(Pi,{placement:"left"},{title:i.tooltip||m?()=>i.tooltip&&i.tooltip()||m:void 0,default:()=>C(Lu,v,{default:()=>[C("div",{class:`${o.value}-body`},[C(_le,{prefixCls:o.value},{icon:i.icon,description:()=>g})])]})});return a(t.href?C("a",H(H(H({ref:c},n),b),{},{class:y}),[w]):C("button",H(H(H({ref:c},n),b),{},{class:y,type:"button"}),[w]))}}}),fg=oe({compatConfig:{MODE:3},name:"AFloatButtonGroup",inheritAttrs:!1,props:ct($le(),{type:"default",shape:"circle"}),setup(t,e){let{attrs:n,slots:i,emit:o}=e;const{prefixCls:r,direction:a}=Me(JS,t),[s,l]=ZS(r),[c,u]=jt(!1,{value:L(()=>t.open)}),d=se(null),f=se(null);Ple({shape:L(()=>t.shape)});const h={onMouseenter(){var v;u(!0),o("update:open",!0),(v=t.onOpenChange)===null||v===void 0||v.call(t,!0)},onMouseleave(){var v;u(!1),o("update:open",!1),(v=t.onOpenChange)===null||v===void 0||v.call(t,!1)}},p=L(()=>t.trigger==="hover"?h:{}),g=()=>{var v;const b=!c.value;o("update:open",b),(v=t.onOpenChange)===null||v===void 0||v.call(t,b),u(b)},m=v=>{var b,y,w;if(!((b=d.value)===null||b===void 0)&&b.contains(v.target)){!((y=gi(f.value))===null||y===void 0)&&y.contains(v.target)&&g();return}u(!1),o("update:open",!1),(w=t.onOpenChange)===null||w===void 0||w.call(t,!1)};return ye(L(()=>t.trigger),v=>{ii()&&(document.removeEventListener("click",m),v==="click"&&document.addEventListener("click",m))},{immediate:!0}),at(()=>{document.removeEventListener("click",m)}),()=>{var v;const{shape:b="circle",type:y="default",tooltip:w,description:x,trigger:$}=t,S=`${r.value}-group`,_=ce(S,l.value,n.class,{[`${S}-rtl`]:a.value==="rtl",[`${S}-${b}`]:b,[`${S}-${b}-shadow`]:!$}),P=ce(l.value,`${S}-wrap`),O=yo(`${S}-wrap`);return s(C("div",H(H({ref:d},n),{},{class:_},p.value),[$&&["click","hover"].includes($)?C(Qe,null,[C(En,O,{default:()=>[ni(C("div",{class:P},[i.default&&i.default()]),[[vi,c.value]])]}),C(Aa,{ref:f,type:y,shape:b,tooltip:w,description:x},{icon:()=>{var T,M;return c.value?((T=i.closeIcon)===null||T===void 0?void 0:T.call(i))||C(ai,null,null):((M=i.icon)===null||M===void 0?void 0:M.call(i))||C(iv,null,null)},tooltip:i.tooltip,description:i.description})]):(v=i.default)===null||v===void 0?void 0:v.call(i)]))}}});var Ile={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M859.9 168H164.1c-4.5 0-8.1 3.6-8.1 8v60c0 4.4 3.6 8 8.1 8h695.8c4.5 0 8.1-3.6 8.1-8v-60c0-4.4-3.6-8-8.1-8zM518.3 355a8 8 0 00-12.6 0l-112 141.7a7.98 7.98 0 006.3 12.9h73.9V848c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V509.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 355z"}}]},name:"vertical-align-top",theme:"outlined"};function UP(t){for(var e=1;ewindow,duration:450,type:"default",shape:"circle"}),setup(t,e){let{slots:n,attrs:i,emit:o}=e;const{prefixCls:r,direction:a}=Me(JS,t),[s]=ZS(r),l=se(),c=$t({visible:t.visibilityHeight===0,scrollEvent:null}),u=()=>l.value&&l.value.ownerDocument?l.value.ownerDocument:window,d=m=>{const{target:v=u,duration:b}=t;Qw(0,{getContainer:v,duration:b}),o("click",m)},f=iy(m=>{const{visibilityHeight:v}=t,b=Jw(m.target);c.visible=b>=v}),h=()=>{const{target:m}=t,b=(m||u)();f({target:b}),b==null||b.addEventListener("scroll",f)},p=()=>{const{target:m}=t,b=(m||u)();f.cancel(),b==null||b.removeEventListener("scroll",f)};ye(()=>t.target,()=>{p(),pt(()=>{h()})}),Ze(()=>{pt(()=>{h()})}),qg(()=>{pt(()=>{h()})}),YI(()=>{p()}),at(()=>{p()});const g=GL();return()=>{const{description:m,type:v,shape:b,tooltip:y,badge:w}=t,x=A(A({},i),{shape:(g==null?void 0:g.shape.value)||b,onClick:d,class:{[`${r.value}`]:!0,[`${i.class}`]:i.class,[`${r.value}-rtl`]:a.value==="rtl"},description:m,type:v,tooltip:y,badge:w}),$=yo("fade");return s(C(En,$,{default:()=>[ni(C(Aa,H(H({},x),{},{ref:l}),{icon:()=>{var S;return((S=n.icon)===null||S===void 0?void 0:S.call(n))||C(QS,null,null)}}),[[vi,c.visible]])]}))}}});Aa.Group=fg;Aa.BackTop=hg;Aa.install=function(t){return t.component(Aa.name,Aa),t.component(fg.name,fg),t.component(hg.name,hg),t};const Hu=t=>t!=null&&(Array.isArray(t)?Kt(t).length:!0);function eC(t){return Hu(t.prefix)||Hu(t.suffix)||Hu(t.allowClear)}function Lh(t){return Hu(t.addonBefore)||Hu(t.addonAfter)}function ix(t){return typeof t>"u"||t===null?"":String(t)}function Wu(t,e,n,i){if(!n)return;const o=e;if(e.type==="click"){Object.defineProperty(o,"target",{writable:!0}),Object.defineProperty(o,"currentTarget",{writable:!0});const r=t.cloneNode(!0);o.target=r,o.currentTarget=r,r.value="",n(o);return}if(i!==void 0){Object.defineProperty(o,"target",{writable:!0}),Object.defineProperty(o,"currentTarget",{writable:!0}),o.target=t,o.currentTarget=t,t.value=i,n(o);return}n(o)}function KL(t,e){if(!t)return;t.focus(e);const{cursor:n}=e||{};if(n){const i=t.value.length;switch(n){case"start":t.setSelectionRange(0,0);break;case"end":t.setSelectionRange(i,i);break;default:t.setSelectionRange(0,i)}}}const Dle=()=>({addonBefore:Z.any,addonAfter:Z.any,prefix:Z.any,suffix:Z.any,clearIcon:Z.any,affixWrapperClassName:String,groupClassName:String,wrapperClassName:String,inputClassName:String,allowClear:{type:Boolean,default:void 0}}),UL=()=>A(A({},Dle()),{value:{type:[String,Number,Symbol],default:void 0},defaultValue:{type:[String,Number,Symbol],default:void 0},inputElement:Z.any,prefixCls:String,disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:void 0},triggerFocus:Function,readonly:{type:Boolean,default:void 0},handleReset:Function,hidden:{type:Boolean,default:void 0}}),qL=()=>A(A({},UL()),{id:String,placeholder:{type:[String,Number]},autocomplete:String,type:Ne("text"),name:String,size:{type:String},autofocus:{type:Boolean,default:void 0},lazy:{type:Boolean,default:!0},maxlength:Number,loading:{type:Boolean,default:void 0},bordered:{type:Boolean,default:void 0},showCount:{type:[Boolean,Object]},htmlSize:Number,onPressEnter:Function,onKeydown:Function,onKeyup:Function,onFocus:Function,onBlur:Function,onChange:Function,onInput:Function,"onUpdate:value":Function,onCompositionstart:Function,onCompositionend:Function,valueModifiers:Object,hidden:{type:Boolean,default:void 0},status:String}),Rle=oe({name:"BaseInput",inheritAttrs:!1,props:UL(),setup(t,e){let{slots:n,attrs:i}=e;const o=se(),r=s=>{var l;if(!((l=o.value)===null||l===void 0)&&l.contains(s.target)){const{triggerFocus:c}=t;c==null||c()}},a=()=>{var s;const{allowClear:l,value:c,disabled:u,readonly:d,handleReset:f,suffix:h=n.suffix,prefixCls:p}=t;if(!l)return null;const g=!u&&!d&&c,m=`${p}-clear-icon`,v=((s=n.clearIcon)===null||s===void 0?void 0:s.call(n))||"*";return C("span",{onClick:f,onMousedown:b=>b.preventDefault(),class:ce({[`${m}-hidden`]:!g,[`${m}-has-suffix`]:!!h},m),role:"button",tabindex:-1},[v])};return()=>{var s,l;const{focused:c,value:u,disabled:d,allowClear:f,readonly:h,hidden:p,prefixCls:g,prefix:m=(s=n.prefix)===null||s===void 0?void 0:s.call(n),suffix:v=(l=n.suffix)===null||l===void 0?void 0:l.call(n),addonAfter:b=n.addonAfter,addonBefore:y=n.addonBefore,inputElement:w,affixWrapperClassName:x,wrapperClassName:$,groupClassName:S}=t;let _=At(w,{value:u,hidden:p});if(eC({prefix:m,suffix:v,allowClear:f})){const P=`${g}-affix-wrapper`,O=ce(P,{[`${P}-disabled`]:d,[`${P}-focused`]:c,[`${P}-readonly`]:h,[`${P}-input-with-clear-btn`]:v&&f&&u},!Lh({addonAfter:b,addonBefore:y})&&i.class,x),T=(v||f)&&C("span",{class:`${g}-suffix`},[a(),v]);_=C("span",{class:O,style:i.style,hidden:!Lh({addonAfter:b,addonBefore:y})&&p,onMousedown:r,ref:o},[m&&C("span",{class:`${g}-prefix`},[m]),At(w,{style:null,value:u,hidden:null}),T])}if(Lh({addonAfter:b,addonBefore:y})){const P=`${g}-group`,O=`${P}-addon`,T=ce(`${g}-wrapper`,P,$),M=ce(`${g}-group-wrapper`,i.class,S);return C("span",{class:M,style:i.style,hidden:p},[C("span",{class:T},[y&&C("span",{class:O},[y]),At(_,{style:null,hidden:null}),b&&C("span",{class:O},[b])])])}return _}}});var Lle=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);ot.value,()=>{a.value=t.value}),ye(()=>t.disabled,()=>{t.disabled&&(s.value=!1)});const u=S=>{l.value&&KL(l.value.input,S)},d=()=>{var S;(S=l.value.input)===null||S===void 0||S.blur()},f=(S,_,P)=>{var O;(O=l.value.input)===null||O===void 0||O.setSelectionRange(S,_,P)},h=()=>{var S;(S=l.value.input)===null||S===void 0||S.select()};o({focus:u,blur:d,input:L(()=>{var S;return(S=l.value.input)===null||S===void 0?void 0:S.input}),stateValue:a,setSelectionRange:f,select:h});const p=S=>{r("change",S)},g=(S,_)=>{a.value!==S&&(t.value===void 0?a.value=S:pt(()=>{var P;l.value.input.value!==a.value&&((P=c.value)===null||P===void 0||P.$forceUpdate())}),pt(()=>{_&&_()}))},m=S=>{const{value:_}=S.target;if(a.value===_)return;const P=S.target.value;Wu(l.value.input,S,p),g(P)},v=S=>{S.keyCode===13&&r("pressEnter",S),r("keydown",S)},b=S=>{s.value=!0,r("focus",S)},y=S=>{s.value=!1,r("blur",S)},w=S=>{Wu(l.value.input,S,p),g("",()=>{u()})},x=()=>{var S,_;const{addonBefore:P=n.addonBefore,addonAfter:O=n.addonAfter,disabled:T,valueModifiers:M={},htmlSize:I,autocomplete:k,prefixCls:E,inputClassName:R,prefix:D=(S=n.prefix)===null||S===void 0?void 0:S.call(n),suffix:F=(_=n.suffix)===null||_===void 0?void 0:_.call(n),allowClear:N,type:B="text"}=t,z=ht(t,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","size","bordered","htmlSize","lazy","showCount","valueModifiers","showCount","affixWrapperClassName","groupClassName","inputClassName","wrapperClassName"]),W=A(A(A({},z),i),{autocomplete:k,onChange:m,onInput:m,onFocus:b,onBlur:y,onKeydown:v,class:ce(E,{[`${E}-disabled`]:T},R,!Lh({addonAfter:O,addonBefore:P})&&!eC({prefix:D,suffix:F,allowClear:N})&&i.class),ref:l,key:"ant-input",size:I,type:B,lazy:t.lazy});return M.lazy&&delete W.onInput,W.autofocus||delete W.autofocus,C(Ac,ht(W,["size"]),null)},$=()=>{var S;const{maxlength:_,suffix:P=(S=n.suffix)===null||S===void 0?void 0:S.call(n),showCount:O,prefixCls:T}=t,M=Number(_)>0;if(P||O){const I=[...ix(a.value)].length,k=typeof O=="object"?O.formatter({count:I,maxlength:_}):`${I}${M?` / ${_}`:""}`;return C(Qe,null,[!!O&&C("span",{class:ce(`${T}-show-count-suffix`,{[`${T}-show-count-has-suffix`]:!!P})},[k]),P])}return null};return Ze(()=>{}),()=>{const{prefixCls:S,disabled:_}=t,P=Lle(t,["prefixCls","disabled"]);return C(Rle,H(H(H({},P),i),{},{ref:c,prefixCls:S,inputElement:x(),handleReset:w,value:ix(a.value),focused:s.value,triggerFocus:u,suffix:$(),disabled:_}),n)}}}),ov=()=>ht(qL(),["wrapperClassName","groupClassName","inputClassName","affixWrapperClassName"]),ZL=()=>A(A({},ht(ov(),["prefix","addonBefore","addonAfter","suffix"])),{rows:Number,autosize:{type:[Boolean,Object],default:void 0},autoSize:{type:[Boolean,Object],default:void 0},onResize:{type:Function},onCompositionstart:Ms(),onCompositionend:Ms(),valueModifiers:Object});var Nle=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);ozo(l.status,t.status)),{direction:u,prefixCls:d,size:f,autocomplete:h}=Me("input",t),{compactSize:p,compactItemClassnames:g}=Ra(d,u),m=L(()=>p.value||f.value),[v,b]=ES(d),y=Oi();o({focus:I=>{var k;(k=a.value)===null||k===void 0||k.focus(I)},blur:()=>{var I;(I=a.value)===null||I===void 0||I.blur()},input:a,setSelectionRange:(I,k,E)=>{var R;(R=a.value)===null||R===void 0||R.setSelectionRange(I,k,E)},select:()=>{var I;(I=a.value)===null||I===void 0||I.select()}});const _=se([]),P=()=>{_.value.push(setTimeout(()=>{var I,k,E,R;!((I=a.value)===null||I===void 0)&&I.input&&((k=a.value)===null||k===void 0?void 0:k.input.getAttribute("type"))==="password"&&(!((E=a.value)===null||E===void 0)&&E.input.hasAttribute("value"))&&((R=a.value)===null||R===void 0||R.input.removeAttribute("value"))}))};Ze(()=>{P()}),Jg(()=>{_.value.forEach(I=>clearTimeout(I))}),at(()=>{_.value.forEach(I=>clearTimeout(I))});const O=I=>{P(),r("blur",I),s.onFieldBlur()},T=I=>{P(),r("focus",I)},M=I=>{r("update:value",I.target.value),r("change",I),r("input",I),s.onFieldChange()};return()=>{var I,k,E,R,D,F;const{hasFeedback:N,feedbackIcon:B}=l,{allowClear:z,bordered:W=!0,prefix:j=(I=n.prefix)===null||I===void 0?void 0:I.call(n),suffix:U=(k=n.suffix)===null||k===void 0?void 0:k.call(n),addonAfter:V=(E=n.addonAfter)===null||E===void 0?void 0:E.call(n),addonBefore:q=(R=n.addonBefore)===null||R===void 0?void 0:R.call(n),id:Y=(D=s.id)===null||D===void 0?void 0:D.value}=t,J=Nle(t,["allowClear","bordered","prefix","suffix","addonAfter","addonBefore","id"]),Q=(N||U)&&C(Qe,null,[U,N&&B]),G=d.value,ee=eC({prefix:j,suffix:U})||!!N,X=n.clearIcon||(()=>C(si,null,null));return v(C(Fle,H(H(H({},i),ht(J,["onUpdate:value","onChange","onInput"])),{},{onChange:M,id:Y,disabled:(F=t.disabled)!==null&&F!==void 0?F:y.value,ref:a,prefixCls:G,autocomplete:h.value,onBlur:O,onFocus:T,prefix:j,suffix:Q,allowClear:z,addonAfter:V&&C(bd,null,{default:()=>[C(Bp,null,{default:()=>[V]})]}),addonBefore:q&&C(bd,null,{default:()=>[C(Bp,null,{default:()=>[q]})]}),class:[i.class,g.value],inputClassName:ce({[`${G}-sm`]:m.value==="small",[`${G}-lg`]:m.value==="large",[`${G}-rtl`]:u.value==="rtl",[`${G}-borderless`]:!W},!ee&&ei(G,c.value),b.value),affixWrapperClassName:ce({[`${G}-affix-wrapper-sm`]:m.value==="small",[`${G}-affix-wrapper-lg`]:m.value==="large",[`${G}-affix-wrapper-rtl`]:u.value==="rtl",[`${G}-affix-wrapper-borderless`]:!W},ei(`${G}-affix-wrapper`,c.value,N),b.value),wrapperClassName:ce({[`${G}-group-rtl`]:u.value==="rtl"},b.value),groupClassName:ce({[`${G}-group-wrapper-sm`]:m.value==="small",[`${G}-group-wrapper-lg`]:m.value==="large",[`${G}-group-wrapper-rtl`]:u.value==="rtl"},ei(`${G}-group-wrapper`,c.value,N),b.value)}),A(A({},n),{clearIcon:X})))}}}),JL=oe({compatConfig:{MODE:3},name:"AInputGroup",inheritAttrs:!1,props:{prefixCls:String,size:{type:String},compact:{type:Boolean,default:void 0}},setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,direction:r,getPrefixCls:a}=Me("input-group",t),s=Mn.useInject();Mn.useProvide(s,{isFormItemInput:!1});const l=L(()=>a("input")),[c,u]=ES(l),d=L(()=>{const f=o.value;return{[`${f}`]:!0,[u.value]:!0,[`${f}-lg`]:t.size==="large",[`${f}-sm`]:t.size==="small",[`${f}-compact`]:t.compact,[`${f}-rtl`]:r.value==="rtl"}});return()=>{var f;return c(C("span",H(H({},i),{},{class:ce(d.value,i.class)}),[(f=n.default)===null||f===void 0?void 0:f.call(n)]))}}});var Ble=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{var x;(x=a.value)===null||x===void 0||x.focus()},blur:()=>{var x;(x=a.value)===null||x===void 0||x.blur()}});const u=x=>{r("update:value",x.target.value),x&&x.target&&x.type==="click"&&r("search",x.target.value,x),r("change",x)},d=x=>{var $;document.activeElement===(($=a.value)===null||$===void 0?void 0:$.input)&&x.preventDefault()},f=x=>{var $,S;r("search",(S=($=a.value)===null||$===void 0?void 0:$.input)===null||S===void 0?void 0:S.stateValue,x)},h=x=>{s.value||t.loading||f(x)},p=x=>{s.value=!0,r("compositionstart",x)},g=x=>{s.value=!1,r("compositionend",x)},{prefixCls:m,getPrefixCls:v,direction:b,size:y}=Me("input-search",t),w=L(()=>v("input",t.inputPrefixCls));return()=>{var x,$,S,_;const{disabled:P,loading:O,addonAfter:T=(x=n.addonAfter)===null||x===void 0?void 0:x.call(n),suffix:M=($=n.suffix)===null||$===void 0?void 0:$.call(n)}=t,I=Ble(t,["disabled","loading","addonAfter","suffix"]);let{enterButton:k=(_=(S=n.enterButton)===null||S===void 0?void 0:S.call(n))!==null&&_!==void 0?_:!1}=t;k=k||k==="";const E=typeof k=="boolean"?C(Pc,null,null):null,R=`${m.value}-button`,D=Array.isArray(k)?k[0]:k;let F;const N=D.type&&B1(D.type)&&D.type.__ANT_BUTTON;if(N||D.tagName==="button")F=At(D,A({onMousedown:d,onClick:f,key:"enterButton"},N?{class:R,size:y.value}:{}),!1);else{const z=E&&!k;F=C(nn,{class:R,type:k?"primary":void 0,size:y.value,disabled:P,key:"enterButton",onMousedown:d,onClick:f,loading:O,icon:z?E:null},{default:()=>[z?null:E||k]})}T&&(F=[F,T]);const B=ce(m.value,{[`${m.value}-rtl`]:b.value==="rtl",[`${m.value}-${y.value}`]:!!y.value,[`${m.value}-with-button`]:!!k},i.class);return C(wn,H(H(H({ref:a},ht(I,["onUpdate:value","onSearch","enterButton"])),i),{},{onPressEnter:h,onCompositionstart:p,onCompositionend:g,size:y.value,prefixCls:w.value,addonAfter:F,suffix:M,onChange:u,class:B,disabled:P}),n)}}}),qP=t=>t!=null&&(Array.isArray(t)?Kt(t).length:!0);function zle(t){return qP(t.addonBefore)||qP(t.addonAfter)}const Hle=["text","input"],Wle=oe({compatConfig:{MODE:3},name:"ClearableLabeledInput",inheritAttrs:!1,props:{prefixCls:String,inputType:Z.oneOf(Wn("text","input")),value:Rt(),defaultValue:Rt(),allowClear:{type:Boolean,default:void 0},element:Rt(),handleReset:Function,disabled:{type:Boolean,default:void 0},direction:{type:String},size:{type:String},suffix:Rt(),prefix:Rt(),addonBefore:Rt(),addonAfter:Rt(),readonly:{type:Boolean,default:void 0},focused:{type:Boolean,default:void 0},bordered:{type:Boolean,default:!0},triggerFocus:{type:Function},hidden:Boolean,status:String,hashId:String},setup(t,e){let{slots:n,attrs:i}=e;const o=Mn.useInject(),r=s=>{const{value:l,disabled:c,readonly:u,handleReset:d,suffix:f=n.suffix}=t,h=!c&&!u&&l,p=`${s}-clear-icon`;return C(si,{onClick:d,onMousedown:g=>g.preventDefault(),class:ce({[`${p}-hidden`]:!h,[`${p}-has-suffix`]:!!f},p),role:"button"},null)},a=(s,l)=>{const{value:c,allowClear:u,direction:d,bordered:f,hidden:h,status:p,addonAfter:g=n.addonAfter,addonBefore:m=n.addonBefore,hashId:v}=t,{status:b,hasFeedback:y}=o;if(!u)return At(l,{value:c,disabled:t.disabled});const w=ce(`${s}-affix-wrapper`,`${s}-affix-wrapper-textarea-with-clear-btn`,ei(`${s}-affix-wrapper`,zo(b,p),y),{[`${s}-affix-wrapper-rtl`]:d==="rtl",[`${s}-affix-wrapper-borderless`]:!f,[`${i.class}`]:!zle({addonAfter:g,addonBefore:m})&&i.class},v);return C("span",{class:w,style:i.style,hidden:h},[At(l,{style:null,value:c,disabled:t.disabled}),r(s)])};return()=>{var s;const{prefixCls:l,inputType:c,element:u=(s=n.element)===null||s===void 0?void 0:s.call(n)}=t;return c===Hle[0]?a(l,u):null}}}),jle=` + `]:{opacity:0,animationTimingFunction:o},[`&${r}-wrap-leave`]:{animationTimingFunction:o}}}]},Ole=t=>{const{antCls:e,componentCls:n,floatButtonSize:i,margin:o,borderRadiusLG:r,borderRadiusSM:a,badgeOffset:s,floatButtonBodyPadding:l}=t,c=`${n}-group`;return{[c]:A(A({},rt(t)),{zIndex:99,display:"block",border:"none",position:"fixed",width:i,height:"auto",boxShadow:"none",minHeight:i,insetInlineEnd:t.floatButtonInsetInlineEnd,insetBlockEnd:t.floatButtonInsetBlockEnd,borderRadius:r,[`${c}-wrap`]:{zIndex:-1,display:"block",position:"relative",marginBottom:o},[`&${c}-rtl`]:{direction:"rtl"},[n]:{position:"static"}}),[`${c}-circle`]:{[`${n}-circle:not(:last-child)`]:{marginBottom:t.margin,[`${n}-body`]:{width:i,height:i,borderRadius:"50%"}}},[`${c}-square`]:{[`${n}-square`]:{borderRadius:0,padding:0,"&:first-child":{borderStartStartRadius:r,borderStartEndRadius:r},"&:last-child":{borderEndStartRadius:r,borderEndEndRadius:r},"&:not(:last-child)":{borderBottom:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`},[`${e}-badge`]:{[`${e}-badge-count`]:{top:-(l+s),insetInlineEnd:-(l+s)}}},[`${c}-wrap`]:{display:"block",borderRadius:r,boxShadow:t.boxShadowSecondary,[`${n}-square`]:{boxShadow:"none",marginTop:0,borderRadius:0,padding:l,"&:first-child":{borderStartStartRadius:r,borderStartEndRadius:r},"&:last-child":{borderEndStartRadius:r,borderEndEndRadius:r},"&:not(:last-child)":{borderBottom:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`},[`${n}-body`]:{width:t.floatButtonBodySize,height:t.floatButtonBodySize}}}},[`${c}-circle-shadow`]:{boxShadow:"none"},[`${c}-square-shadow`]:{boxShadow:t.boxShadowSecondary,[`${n}-square`]:{boxShadow:"none",padding:l,[`${n}-body`]:{width:t.floatButtonBodySize,height:t.floatButtonBodySize,borderRadius:a}}}}},Ele=t=>{const{antCls:e,componentCls:n,floatButtonBodyPadding:i,floatButtonIconSize:o,floatButtonSize:r,borderRadiusLG:a,badgeOffset:s,dotOffsetInSquare:l,dotOffsetInCircle:c}=t;return{[n]:A(A({},rt(t)),{border:"none",position:"fixed",cursor:"pointer",zIndex:99,display:"block",justifyContent:"center",alignItems:"center",width:r,height:r,insetInlineEnd:t.floatButtonInsetInlineEnd,insetBlockEnd:t.floatButtonInsetBlockEnd,boxShadow:t.boxShadowSecondary,"&-pure":{position:"relative",inset:"auto"},"&:empty":{display:"none"},[`${e}-badge`]:{width:"100%",height:"100%",[`${e}-badge-count`]:{transform:"translate(0, 0)",transformOrigin:"center",top:-s,insetInlineEnd:-s}},[`${n}-body`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",transition:`all ${t.motionDurationMid}`,[`${n}-content`]:{overflow:"hidden",textAlign:"center",minHeight:r,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",padding:`${i/2}px ${i}px`,[`${n}-icon`]:{textAlign:"center",margin:"auto",width:o,fontSize:o,lineHeight:1}}}}),[`${n}-rtl`]:{direction:"rtl"},[`${n}-circle`]:{height:r,borderRadius:"50%",[`${e}-badge`]:{[`${e}-badge-dot`]:{top:c,insetInlineEnd:c}},[`${n}-body`]:{borderRadius:"50%"}},[`${n}-square`]:{height:"auto",minHeight:r,borderRadius:a,[`${e}-badge`]:{[`${e}-badge-dot`]:{top:l,insetInlineEnd:l}},[`${n}-body`]:{height:"auto",borderRadius:a}},[`${n}-default`]:{backgroundColor:t.floatButtonBackgroundColor,transition:`background-color ${t.motionDurationMid}`,[`${n}-body`]:{backgroundColor:t.floatButtonBackgroundColor,transition:`background-color ${t.motionDurationMid}`,"&:hover":{backgroundColor:t.colorFillContent},[`${n}-content`]:{[`${n}-icon`]:{color:t.colorText},[`${n}-description`]:{display:"flex",alignItems:"center",lineHeight:`${t.fontSizeLG}px`,color:t.colorText,fontSize:t.fontSizeSM}}}},[`${n}-primary`]:{backgroundColor:t.colorPrimary,[`${n}-body`]:{backgroundColor:t.colorPrimary,transition:`background-color ${t.motionDurationMid}`,"&:hover":{backgroundColor:t.colorPrimaryHover},[`${n}-content`]:{[`${n}-icon`]:{color:t.colorTextLightSolid},[`${n}-description`]:{display:"flex",alignItems:"center",lineHeight:`${t.fontSizeLG}px`,color:t.colorTextLightSolid,fontSize:t.fontSizeSM}}}}}},ZS=et("FloatButton",t=>{const{colorTextLightSolid:e,colorBgElevated:n,controlHeightLG:i,marginXXL:o,marginLG:r,fontSize:a,fontSizeIcon:s,controlItemBgHover:l,paddingXXS:c,borderRadiusLG:u}=t,d=Ve(t,{floatButtonBackgroundColor:n,floatButtonColor:e,floatButtonHoverBackgroundColor:l,floatButtonFontSize:a,floatButtonIconSize:s*1.5,floatButtonSize:i,floatButtonInsetBlockEnd:o,floatButtonInsetInlineEnd:r,floatButtonBodySize:i-c*2,floatButtonBodyPadding:c,badgeOffset:c*1.5,dotOffsetInCircle:KP(i/2),dotOffsetInSquare:KP(u)});return[Ole(d),Ele(d),j1(t),Tle(d)]});var Mle=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o(l==null?void 0:l.value)||t.shape);return()=>{var d;const{prefixCls:f,type:h="default",shape:p="circle",description:g=(d=i.description)===null||d===void 0?void 0:d.call(i),tooltip:m,badge:v={}}=t,b=Mle(t,["prefixCls","type","shape","description","tooltip","badge"]),y=ce(o.value,`${o.value}-${h}`,`${o.value}-${u.value}`,{[`${o.value}-rtl`]:r.value==="rtl"},n.class,s.value),w=C(Pi,{placement:"left"},{title:i.tooltip||m?()=>i.tooltip&&i.tooltip()||m:void 0,default:()=>C(Fu,v,{default:()=>[C("div",{class:`${o.value}-body`},[C(_le,{prefixCls:o.value},{icon:i.icon,description:()=>g})])]})});return a(t.href?C("a",H(H(H({ref:c},n),b),{},{class:y}),[w]):C("button",H(H(H({ref:c},n),b),{},{class:y,type:"button"}),[w]))}}}),hg=oe({compatConfig:{MODE:3},name:"AFloatButtonGroup",inheritAttrs:!1,props:ct($le(),{type:"default",shape:"circle"}),setup(t,e){let{attrs:n,slots:i,emit:o}=e;const{prefixCls:r,direction:a}=Me(JS,t),[s,l]=ZS(r),[c,u]=jt(!1,{value:L(()=>t.open)}),d=se(null),f=se(null);Ple({shape:L(()=>t.shape)});const h={onMouseenter(){var v;u(!0),o("update:open",!0),(v=t.onOpenChange)===null||v===void 0||v.call(t,!0)},onMouseleave(){var v;u(!1),o("update:open",!1),(v=t.onOpenChange)===null||v===void 0||v.call(t,!1)}},p=L(()=>t.trigger==="hover"?h:{}),g=()=>{var v;const b=!c.value;o("update:open",b),(v=t.onOpenChange)===null||v===void 0||v.call(t,b),u(b)},m=v=>{var b,y,w;if(!((b=d.value)===null||b===void 0)&&b.contains(v.target)){!((y=gi(f.value))===null||y===void 0)&&y.contains(v.target)&&g();return}u(!1),o("update:open",!1),(w=t.onOpenChange)===null||w===void 0||w.call(t,!1)};return ye(L(()=>t.trigger),v=>{ii()&&(document.removeEventListener("click",m),v==="click"&&document.addEventListener("click",m))},{immediate:!0}),at(()=>{document.removeEventListener("click",m)}),()=>{var v;const{shape:b="circle",type:y="default",tooltip:w,description:x,trigger:$}=t,S=`${r.value}-group`,_=ce(S,l.value,n.class,{[`${S}-rtl`]:a.value==="rtl",[`${S}-${b}`]:b,[`${S}-${b}-shadow`]:!$}),P=ce(l.value,`${S}-wrap`),O=yo(`${S}-wrap`);return s(C("div",H(H({ref:d},n),{},{class:_},p.value),[$&&["click","hover"].includes($)?C(Qe,null,[C(En,O,{default:()=>[ni(C("div",{class:P},[i.default&&i.default()]),[[vi,c.value]])]}),C(Aa,{ref:f,type:y,shape:b,tooltip:w,description:x},{icon:()=>{var T,M;return c.value?((T=i.closeIcon)===null||T===void 0?void 0:T.call(i))||C(ai,null,null):((M=i.icon)===null||M===void 0?void 0:M.call(i))||C(ov,null,null)},tooltip:i.tooltip,description:i.description})]):(v=i.default)===null||v===void 0?void 0:v.call(i)]))}}});var Ile={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M859.9 168H164.1c-4.5 0-8.1 3.6-8.1 8v60c0 4.4 3.6 8 8.1 8h695.8c4.5 0 8.1-3.6 8.1-8v-60c0-4.4-3.6-8-8.1-8zM518.3 355a8 8 0 00-12.6 0l-112 141.7a7.98 7.98 0 006.3 12.9h73.9V848c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V509.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 355z"}}]},name:"vertical-align-top",theme:"outlined"};function UP(t){for(var e=1;ewindow,duration:450,type:"default",shape:"circle"}),setup(t,e){let{slots:n,attrs:i,emit:o}=e;const{prefixCls:r,direction:a}=Me(JS,t),[s]=ZS(r),l=se(),c=$t({visible:t.visibilityHeight===0,scrollEvent:null}),u=()=>l.value&&l.value.ownerDocument?l.value.ownerDocument:window,d=m=>{const{target:v=u,duration:b}=t;Qw(0,{getContainer:v,duration:b}),o("click",m)},f=iy(m=>{const{visibilityHeight:v}=t,b=Jw(m.target);c.visible=b>=v}),h=()=>{const{target:m}=t,b=(m||u)();f({target:b}),b==null||b.addEventListener("scroll",f)},p=()=>{const{target:m}=t,b=(m||u)();f.cancel(),b==null||b.removeEventListener("scroll",f)};ye(()=>t.target,()=>{p(),pt(()=>{h()})}),Ze(()=>{pt(()=>{h()})}),Zg(()=>{pt(()=>{h()})}),YI(()=>{p()}),at(()=>{p()});const g=GL();return()=>{const{description:m,type:v,shape:b,tooltip:y,badge:w}=t,x=A(A({},i),{shape:(g==null?void 0:g.shape.value)||b,onClick:d,class:{[`${r.value}`]:!0,[`${i.class}`]:i.class,[`${r.value}-rtl`]:a.value==="rtl"},description:m,type:v,tooltip:y,badge:w}),$=yo("fade");return s(C(En,$,{default:()=>[ni(C(Aa,H(H({},x),{},{ref:l}),{icon:()=>{var S;return((S=n.icon)===null||S===void 0?void 0:S.call(n))||C(QS,null,null)}}),[[vi,c.visible]])]}))}}});Aa.Group=hg;Aa.BackTop=pg;Aa.install=function(t){return t.component(Aa.name,Aa),t.component(hg.name,hg),t.component(pg.name,pg),t};const Wu=t=>t!=null&&(Array.isArray(t)?Kt(t).length:!0);function eC(t){return Wu(t.prefix)||Wu(t.suffix)||Wu(t.allowClear)}function Fh(t){return Wu(t.addonBefore)||Wu(t.addonAfter)}function ix(t){return typeof t>"u"||t===null?"":String(t)}function ju(t,e,n,i){if(!n)return;const o=e;if(e.type==="click"){Object.defineProperty(o,"target",{writable:!0}),Object.defineProperty(o,"currentTarget",{writable:!0});const r=t.cloneNode(!0);o.target=r,o.currentTarget=r,r.value="",n(o);return}if(i!==void 0){Object.defineProperty(o,"target",{writable:!0}),Object.defineProperty(o,"currentTarget",{writable:!0}),o.target=t,o.currentTarget=t,t.value=i,n(o);return}n(o)}function KL(t,e){if(!t)return;t.focus(e);const{cursor:n}=e||{};if(n){const i=t.value.length;switch(n){case"start":t.setSelectionRange(0,0);break;case"end":t.setSelectionRange(i,i);break;default:t.setSelectionRange(0,i)}}}const Dle=()=>({addonBefore:Z.any,addonAfter:Z.any,prefix:Z.any,suffix:Z.any,clearIcon:Z.any,affixWrapperClassName:String,groupClassName:String,wrapperClassName:String,inputClassName:String,allowClear:{type:Boolean,default:void 0}}),UL=()=>A(A({},Dle()),{value:{type:[String,Number,Symbol],default:void 0},defaultValue:{type:[String,Number,Symbol],default:void 0},inputElement:Z.any,prefixCls:String,disabled:{type:Boolean,default:void 0},focused:{type:Boolean,default:void 0},triggerFocus:Function,readonly:{type:Boolean,default:void 0},handleReset:Function,hidden:{type:Boolean,default:void 0}}),qL=()=>A(A({},UL()),{id:String,placeholder:{type:[String,Number]},autocomplete:String,type:Ne("text"),name:String,size:{type:String},autofocus:{type:Boolean,default:void 0},lazy:{type:Boolean,default:!0},maxlength:Number,loading:{type:Boolean,default:void 0},bordered:{type:Boolean,default:void 0},showCount:{type:[Boolean,Object]},htmlSize:Number,onPressEnter:Function,onKeydown:Function,onKeyup:Function,onFocus:Function,onBlur:Function,onChange:Function,onInput:Function,"onUpdate:value":Function,onCompositionstart:Function,onCompositionend:Function,valueModifiers:Object,hidden:{type:Boolean,default:void 0},status:String}),Rle=oe({name:"BaseInput",inheritAttrs:!1,props:UL(),setup(t,e){let{slots:n,attrs:i}=e;const o=se(),r=s=>{var l;if(!((l=o.value)===null||l===void 0)&&l.contains(s.target)){const{triggerFocus:c}=t;c==null||c()}},a=()=>{var s;const{allowClear:l,value:c,disabled:u,readonly:d,handleReset:f,suffix:h=n.suffix,prefixCls:p}=t;if(!l)return null;const g=!u&&!d&&c,m=`${p}-clear-icon`,v=((s=n.clearIcon)===null||s===void 0?void 0:s.call(n))||"*";return C("span",{onClick:f,onMousedown:b=>b.preventDefault(),class:ce({[`${m}-hidden`]:!g,[`${m}-has-suffix`]:!!h},m),role:"button",tabindex:-1},[v])};return()=>{var s,l;const{focused:c,value:u,disabled:d,allowClear:f,readonly:h,hidden:p,prefixCls:g,prefix:m=(s=n.prefix)===null||s===void 0?void 0:s.call(n),suffix:v=(l=n.suffix)===null||l===void 0?void 0:l.call(n),addonAfter:b=n.addonAfter,addonBefore:y=n.addonBefore,inputElement:w,affixWrapperClassName:x,wrapperClassName:$,groupClassName:S}=t;let _=At(w,{value:u,hidden:p});if(eC({prefix:m,suffix:v,allowClear:f})){const P=`${g}-affix-wrapper`,O=ce(P,{[`${P}-disabled`]:d,[`${P}-focused`]:c,[`${P}-readonly`]:h,[`${P}-input-with-clear-btn`]:v&&f&&u},!Fh({addonAfter:b,addonBefore:y})&&i.class,x),T=(v||f)&&C("span",{class:`${g}-suffix`},[a(),v]);_=C("span",{class:O,style:i.style,hidden:!Fh({addonAfter:b,addonBefore:y})&&p,onMousedown:r,ref:o},[m&&C("span",{class:`${g}-prefix`},[m]),At(w,{style:null,value:u,hidden:null}),T])}if(Fh({addonAfter:b,addonBefore:y})){const P=`${g}-group`,O=`${P}-addon`,T=ce(`${g}-wrapper`,P,$),M=ce(`${g}-group-wrapper`,i.class,S);return C("span",{class:M,style:i.style,hidden:p},[C("span",{class:T},[y&&C("span",{class:O},[y]),At(_,{style:null,hidden:null}),b&&C("span",{class:O},[b])])])}return _}}});var Lle=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);ot.value,()=>{a.value=t.value}),ye(()=>t.disabled,()=>{t.disabled&&(s.value=!1)});const u=S=>{l.value&&KL(l.value.input,S)},d=()=>{var S;(S=l.value.input)===null||S===void 0||S.blur()},f=(S,_,P)=>{var O;(O=l.value.input)===null||O===void 0||O.setSelectionRange(S,_,P)},h=()=>{var S;(S=l.value.input)===null||S===void 0||S.select()};o({focus:u,blur:d,input:L(()=>{var S;return(S=l.value.input)===null||S===void 0?void 0:S.input}),stateValue:a,setSelectionRange:f,select:h});const p=S=>{r("change",S)},g=(S,_)=>{a.value!==S&&(t.value===void 0?a.value=S:pt(()=>{var P;l.value.input.value!==a.value&&((P=c.value)===null||P===void 0||P.$forceUpdate())}),pt(()=>{_&&_()}))},m=S=>{const{value:_}=S.target;if(a.value===_)return;const P=S.target.value;ju(l.value.input,S,p),g(P)},v=S=>{S.keyCode===13&&r("pressEnter",S),r("keydown",S)},b=S=>{s.value=!0,r("focus",S)},y=S=>{s.value=!1,r("blur",S)},w=S=>{ju(l.value.input,S,p),g("",()=>{u()})},x=()=>{var S,_;const{addonBefore:P=n.addonBefore,addonAfter:O=n.addonAfter,disabled:T,valueModifiers:M={},htmlSize:I,autocomplete:k,prefixCls:E,inputClassName:R,prefix:D=(S=n.prefix)===null||S===void 0?void 0:S.call(n),suffix:F=(_=n.suffix)===null||_===void 0?void 0:_.call(n),allowClear:N,type:B="text"}=t,z=ht(t,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","size","bordered","htmlSize","lazy","showCount","valueModifiers","showCount","affixWrapperClassName","groupClassName","inputClassName","wrapperClassName"]),W=A(A(A({},z),i),{autocomplete:k,onChange:m,onInput:m,onFocus:b,onBlur:y,onKeydown:v,class:ce(E,{[`${E}-disabled`]:T},R,!Fh({addonAfter:O,addonBefore:P})&&!eC({prefix:D,suffix:F,allowClear:N})&&i.class),ref:l,key:"ant-input",size:I,type:B,lazy:t.lazy});return M.lazy&&delete W.onInput,W.autofocus||delete W.autofocus,C(_c,ht(W,["size"]),null)},$=()=>{var S;const{maxlength:_,suffix:P=(S=n.suffix)===null||S===void 0?void 0:S.call(n),showCount:O,prefixCls:T}=t,M=Number(_)>0;if(P||O){const I=[...ix(a.value)].length,k=typeof O=="object"?O.formatter({count:I,maxlength:_}):`${I}${M?` / ${_}`:""}`;return C(Qe,null,[!!O&&C("span",{class:ce(`${T}-show-count-suffix`,{[`${T}-show-count-has-suffix`]:!!P})},[k]),P])}return null};return Ze(()=>{}),()=>{const{prefixCls:S,disabled:_}=t,P=Lle(t,["prefixCls","disabled"]);return C(Rle,H(H(H({},P),i),{},{ref:c,prefixCls:S,inputElement:x(),handleReset:w,value:ix(a.value),focused:s.value,triggerFocus:u,suffix:$(),disabled:_}),n)}}}),rv=()=>ht(qL(),["wrapperClassName","groupClassName","inputClassName","affixWrapperClassName"]),ZL=()=>A(A({},ht(rv(),["prefix","addonBefore","addonAfter","suffix"])),{rows:Number,autosize:{type:[Boolean,Object],default:void 0},autoSize:{type:[Boolean,Object],default:void 0},onResize:{type:Function},onCompositionstart:Ms(),onCompositionend:Ms(),valueModifiers:Object});var Nle=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);ozo(l.status,t.status)),{direction:u,prefixCls:d,size:f,autocomplete:h}=Me("input",t),{compactSize:p,compactItemClassnames:g}=Ra(d,u),m=L(()=>p.value||f.value),[v,b]=ES(d),y=Oi();o({focus:I=>{var k;(k=a.value)===null||k===void 0||k.focus(I)},blur:()=>{var I;(I=a.value)===null||I===void 0||I.blur()},input:a,setSelectionRange:(I,k,E)=>{var R;(R=a.value)===null||R===void 0||R.setSelectionRange(I,k,E)},select:()=>{var I;(I=a.value)===null||I===void 0||I.select()}});const _=se([]),P=()=>{_.value.push(setTimeout(()=>{var I,k,E,R;!((I=a.value)===null||I===void 0)&&I.input&&((k=a.value)===null||k===void 0?void 0:k.input.getAttribute("type"))==="password"&&(!((E=a.value)===null||E===void 0)&&E.input.hasAttribute("value"))&&((R=a.value)===null||R===void 0||R.input.removeAttribute("value"))}))};Ze(()=>{P()}),Qg(()=>{_.value.forEach(I=>clearTimeout(I))}),at(()=>{_.value.forEach(I=>clearTimeout(I))});const O=I=>{P(),r("blur",I),s.onFieldBlur()},T=I=>{P(),r("focus",I)},M=I=>{r("update:value",I.target.value),r("change",I),r("input",I),s.onFieldChange()};return()=>{var I,k,E,R,D,F;const{hasFeedback:N,feedbackIcon:B}=l,{allowClear:z,bordered:W=!0,prefix:j=(I=n.prefix)===null||I===void 0?void 0:I.call(n),suffix:U=(k=n.suffix)===null||k===void 0?void 0:k.call(n),addonAfter:V=(E=n.addonAfter)===null||E===void 0?void 0:E.call(n),addonBefore:q=(R=n.addonBefore)===null||R===void 0?void 0:R.call(n),id:Y=(D=s.id)===null||D===void 0?void 0:D.value}=t,J=Nle(t,["allowClear","bordered","prefix","suffix","addonAfter","addonBefore","id"]),Q=(N||U)&&C(Qe,null,[U,N&&B]),G=d.value,ee=eC({prefix:j,suffix:U})||!!N,X=n.clearIcon||(()=>C(si,null,null));return v(C(Fle,H(H(H({},i),ht(J,["onUpdate:value","onChange","onInput"])),{},{onChange:M,id:Y,disabled:(F=t.disabled)!==null&&F!==void 0?F:y.value,ref:a,prefixCls:G,autocomplete:h.value,onBlur:O,onFocus:T,prefix:j,suffix:Q,allowClear:z,addonAfter:V&&C(yd,null,{default:()=>[C(zp,null,{default:()=>[V]})]}),addonBefore:q&&C(yd,null,{default:()=>[C(zp,null,{default:()=>[q]})]}),class:[i.class,g.value],inputClassName:ce({[`${G}-sm`]:m.value==="small",[`${G}-lg`]:m.value==="large",[`${G}-rtl`]:u.value==="rtl",[`${G}-borderless`]:!W},!ee&&ei(G,c.value),b.value),affixWrapperClassName:ce({[`${G}-affix-wrapper-sm`]:m.value==="small",[`${G}-affix-wrapper-lg`]:m.value==="large",[`${G}-affix-wrapper-rtl`]:u.value==="rtl",[`${G}-affix-wrapper-borderless`]:!W},ei(`${G}-affix-wrapper`,c.value,N),b.value),wrapperClassName:ce({[`${G}-group-rtl`]:u.value==="rtl"},b.value),groupClassName:ce({[`${G}-group-wrapper-sm`]:m.value==="small",[`${G}-group-wrapper-lg`]:m.value==="large",[`${G}-group-wrapper-rtl`]:u.value==="rtl"},ei(`${G}-group-wrapper`,c.value,N),b.value)}),A(A({},n),{clearIcon:X})))}}}),JL=oe({compatConfig:{MODE:3},name:"AInputGroup",inheritAttrs:!1,props:{prefixCls:String,size:{type:String},compact:{type:Boolean,default:void 0}},setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,direction:r,getPrefixCls:a}=Me("input-group",t),s=Mn.useInject();Mn.useProvide(s,{isFormItemInput:!1});const l=L(()=>a("input")),[c,u]=ES(l),d=L(()=>{const f=o.value;return{[`${f}`]:!0,[u.value]:!0,[`${f}-lg`]:t.size==="large",[`${f}-sm`]:t.size==="small",[`${f}-compact`]:t.compact,[`${f}-rtl`]:r.value==="rtl"}});return()=>{var f;return c(C("span",H(H({},i),{},{class:ce(d.value,i.class)}),[(f=n.default)===null||f===void 0?void 0:f.call(n)]))}}});var Ble=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{var x;(x=a.value)===null||x===void 0||x.focus()},blur:()=>{var x;(x=a.value)===null||x===void 0||x.blur()}});const u=x=>{r("update:value",x.target.value),x&&x.target&&x.type==="click"&&r("search",x.target.value,x),r("change",x)},d=x=>{var $;document.activeElement===(($=a.value)===null||$===void 0?void 0:$.input)&&x.preventDefault()},f=x=>{var $,S;r("search",(S=($=a.value)===null||$===void 0?void 0:$.input)===null||S===void 0?void 0:S.stateValue,x)},h=x=>{s.value||t.loading||f(x)},p=x=>{s.value=!0,r("compositionstart",x)},g=x=>{s.value=!1,r("compositionend",x)},{prefixCls:m,getPrefixCls:v,direction:b,size:y}=Me("input-search",t),w=L(()=>v("input",t.inputPrefixCls));return()=>{var x,$,S,_;const{disabled:P,loading:O,addonAfter:T=(x=n.addonAfter)===null||x===void 0?void 0:x.call(n),suffix:M=($=n.suffix)===null||$===void 0?void 0:$.call(n)}=t,I=Ble(t,["disabled","loading","addonAfter","suffix"]);let{enterButton:k=(_=(S=n.enterButton)===null||S===void 0?void 0:S.call(n))!==null&&_!==void 0?_:!1}=t;k=k||k==="";const E=typeof k=="boolean"?C(Tc,null,null):null,R=`${m.value}-button`,D=Array.isArray(k)?k[0]:k;let F;const N=D.type&&B1(D.type)&&D.type.__ANT_BUTTON;if(N||D.tagName==="button")F=At(D,A({onMousedown:d,onClick:f,key:"enterButton"},N?{class:R,size:y.value}:{}),!1);else{const z=E&&!k;F=C(nn,{class:R,type:k?"primary":void 0,size:y.value,disabled:P,key:"enterButton",onMousedown:d,onClick:f,loading:O,icon:z?E:null},{default:()=>[z?null:E||k]})}T&&(F=[F,T]);const B=ce(m.value,{[`${m.value}-rtl`]:b.value==="rtl",[`${m.value}-${y.value}`]:!!y.value,[`${m.value}-with-button`]:!!k},i.class);return C(wn,H(H(H({ref:a},ht(I,["onUpdate:value","onSearch","enterButton"])),i),{},{onPressEnter:h,onCompositionstart:p,onCompositionend:g,size:y.value,prefixCls:w.value,addonAfter:F,suffix:M,onChange:u,class:B,disabled:P}),n)}}}),qP=t=>t!=null&&(Array.isArray(t)?Kt(t).length:!0);function zle(t){return qP(t.addonBefore)||qP(t.addonAfter)}const Hle=["text","input"],Wle=oe({compatConfig:{MODE:3},name:"ClearableLabeledInput",inheritAttrs:!1,props:{prefixCls:String,inputType:Z.oneOf(Wn("text","input")),value:Rt(),defaultValue:Rt(),allowClear:{type:Boolean,default:void 0},element:Rt(),handleReset:Function,disabled:{type:Boolean,default:void 0},direction:{type:String},size:{type:String},suffix:Rt(),prefix:Rt(),addonBefore:Rt(),addonAfter:Rt(),readonly:{type:Boolean,default:void 0},focused:{type:Boolean,default:void 0},bordered:{type:Boolean,default:!0},triggerFocus:{type:Function},hidden:Boolean,status:String,hashId:String},setup(t,e){let{slots:n,attrs:i}=e;const o=Mn.useInject(),r=s=>{const{value:l,disabled:c,readonly:u,handleReset:d,suffix:f=n.suffix}=t,h=!c&&!u&&l,p=`${s}-clear-icon`;return C(si,{onClick:d,onMousedown:g=>g.preventDefault(),class:ce({[`${p}-hidden`]:!h,[`${p}-has-suffix`]:!!f},p),role:"button"},null)},a=(s,l)=>{const{value:c,allowClear:u,direction:d,bordered:f,hidden:h,status:p,addonAfter:g=n.addonAfter,addonBefore:m=n.addonBefore,hashId:v}=t,{status:b,hasFeedback:y}=o;if(!u)return At(l,{value:c,disabled:t.disabled});const w=ce(`${s}-affix-wrapper`,`${s}-affix-wrapper-textarea-with-clear-btn`,ei(`${s}-affix-wrapper`,zo(b,p),y),{[`${s}-affix-wrapper-rtl`]:d==="rtl",[`${s}-affix-wrapper-borderless`]:!f,[`${i.class}`]:!zle({addonAfter:g,addonBefore:m})&&i.class},v);return C("span",{class:w,style:i.style,hidden:h},[At(l,{style:null,value:c,disabled:t.disabled}),r(s)])};return()=>{var s;const{prefixCls:l,inputType:c,element:u=(s=n.element)===null||s===void 0?void 0:s.call(n)}=t;return c===Hle[0]?a(l,u):null}}}),jle=` min-height:0 !important; max-height:none !important; height:0 !important; @@ -360,10 +360,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho top:0 !important; right:0 !important; pointer-events: none !important; -`,Vle=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],Wb={};let io;function Xle(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=t.getAttribute("id")||t.getAttribute("data-reactid")||t.getAttribute("name");if(e&&Wb[n])return Wb[n];const i=window.getComputedStyle(t),o=i.getPropertyValue("box-sizing")||i.getPropertyValue("-moz-box-sizing")||i.getPropertyValue("-webkit-box-sizing"),r=parseFloat(i.getPropertyValue("padding-bottom"))+parseFloat(i.getPropertyValue("padding-top")),a=parseFloat(i.getPropertyValue("border-bottom-width"))+parseFloat(i.getPropertyValue("border-top-width")),l={sizingStyle:Vle.map(c=>`${c}:${i.getPropertyValue(c)}`).join(";"),paddingSize:r,borderSize:a,boxSizing:o};return e&&n&&(Wb[n]=l),l}function Yle(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;io||(io=document.createElement("textarea"),io.setAttribute("tab-index","-1"),io.setAttribute("aria-hidden","true"),document.body.appendChild(io)),t.getAttribute("wrap")?io.setAttribute("wrap",t.getAttribute("wrap")):io.removeAttribute("wrap");const{paddingSize:o,borderSize:r,boxSizing:a,sizingStyle:s}=Xle(t,e);io.setAttribute("style",`${s};${jle}`),io.value=t.value||t.placeholder||"";let l,c,u,d=io.scrollHeight;if(a==="border-box"?d+=r:a==="content-box"&&(d-=o),n!==null||i!==null){io.value=" ";const h=io.scrollHeight-o;n!==null&&(l=h*n,a==="border-box"&&(l=l+o+r),d=Math.max(l,d)),i!==null&&(c=h*i,a==="border-box"&&(c=c+o+r),u=d>c?"":"hidden",d=Math.min(c,d))}const f={height:`${d}px`,overflowY:u,resize:"none"};return l&&(f.minHeight=`${l}px`),c&&(f.maxHeight=`${c}px`),f}const jb=0,Vb=1,Xb=2,Gle=oe({compatConfig:{MODE:3},name:"ResizableTextArea",inheritAttrs:!1,props:ZL(),setup(t,e){let{attrs:n,emit:i,expose:o}=e,r,a;const s=se(),l=se({}),c=se(Xb);at(()=>{lt.cancel(r),lt.cancel(a)});const u=()=>{try{if(s.value&&document.activeElement===s.value.input){const $=s.value.getSelectionStart(),S=s.value.getSelectionEnd(),_=s.value.getScrollTop();s.value.setSelectionRange($,S),s.value.setScrollTop(_)}}catch{}},d=se(),f=se();Ke(()=>{const $=t.autoSize||t.autosize;$?(d.value=$.minRows,f.value=$.maxRows):(d.value=void 0,f.value=void 0)});const h=L(()=>!!(t.autoSize||t.autosize)),p=()=>{c.value=jb};ye([()=>t.value,d,f,h],()=>{h.value&&p()},{immediate:!0});const g=se();ye([c,s],()=>{if(s.value)if(c.value===jb)c.value=Vb;else if(c.value===Vb){const $=Yle(s.value.input,!1,d.value,f.value);c.value=Xb,g.value=$}else u()},{immediate:!0,flush:"post"});const m=Cn(),v=se(),b=()=>{lt.cancel(v.value)},y=$=>{c.value===Xb&&(i("resize",$),h.value&&(b(),v.value=lt(()=>{p()})))};at(()=>{b()}),o({resizeTextarea:()=>{p()},textArea:L(()=>{var $;return($=s.value)===null||$===void 0?void 0:$.input}),instance:m}),Gi(t.autosize===void 0);const x=()=>{const{prefixCls:$,disabled:S}=t,_=ht(t,["prefixCls","onPressEnter","autoSize","autosize","defaultValue","allowClear","type","maxlength","valueModifiers"]),P=ce($,n.class,{[`${$}-disabled`]:S}),O=h.value?g.value:null,T=[n.style,l.value,O],M=A(A(A({},_),n),{style:T,class:P});return(c.value===jb||c.value===Vb)&&T.push({overflowX:"hidden",overflowY:"hidden"}),M.autofocus||delete M.autofocus,M.rows===0&&delete M.rows,C(mo,{onResize:y,disabled:!h.value},{default:()=>[C(Ac,H(H({},M),{},{ref:s,tag:"textarea"}),null)]})};return()=>x()}});function e6(t,e){return[...t||""].slice(0,e).join("")}function ZP(t,e,n,i){let o=n;return t?o=e6(n,i):[...e||""].lengthi&&(o=e),o}const tC=oe({compatConfig:{MODE:3},name:"ATextarea",inheritAttrs:!1,props:ZL(),setup(t,e){let{attrs:n,expose:i,emit:o}=e;var r;const a=vn(),s=Mn.useInject(),l=L(()=>zo(s.status,t.status)),c=ie((r=t.value)!==null&&r!==void 0?r:t.defaultValue),u=ie(),d=ie(""),{prefixCls:f,size:h,direction:p}=Me("input",t),[g,m]=ES(f),v=Oi(),b=L(()=>t.showCount===""||t.showCount||!1),y=L(()=>Number(t.maxlength)>0),w=ie(!1),x=ie(),$=ie(0),S=N=>{w.value=!0,x.value=d.value,$.value=N.currentTarget.selectionStart,o("compositionstart",N)},_=N=>{var B;w.value=!1;let z=N.currentTarget.value;if(y.value){const W=$.value>=t.maxlength+1||$.value===((B=x.value)===null||B===void 0?void 0:B.length);z=ZP(W,x.value,z,t.maxlength)}z!==d.value&&(M(z),Wu(N.currentTarget,N,E,z)),o("compositionend",N)},P=Cn();ye(()=>t.value,()=>{var N;"value"in P.vnode.props,c.value=(N=t.value)!==null&&N!==void 0?N:""});const O=N=>{var B;KL((B=u.value)===null||B===void 0?void 0:B.textArea,N)},T=()=>{var N,B;(B=(N=u.value)===null||N===void 0?void 0:N.textArea)===null||B===void 0||B.blur()},M=(N,B)=>{c.value!==N&&(t.value===void 0?c.value=N:pt(()=>{var z,W,j;u.value.textArea.value!==d.value&&((j=(z=u.value)===null||z===void 0?void 0:(W=z.instance).update)===null||j===void 0||j.call(W))}),pt(()=>{B&&B()}))},I=N=>{N.keyCode===13&&o("pressEnter",N),o("keydown",N)},k=N=>{const{onBlur:B}=t;B==null||B(N),a.onFieldBlur()},E=N=>{o("update:value",N.target.value),o("change",N),o("input",N),a.onFieldChange()},R=N=>{Wu(u.value.textArea,N,E),M("",()=>{O()})},D=N=>{let B=N.target.value;if(c.value!==B){if(y.value){const z=N.target,W=z.selectionStart>=t.maxlength+1||z.selectionStart===B.length||!z.selectionStart;B=ZP(W,d.value,B,t.maxlength)}Wu(N.currentTarget,N,E,B),M(B)}},F=()=>{var N,B;const{class:z}=n,{bordered:W=!0}=t,j=A(A(A({},ht(t,["allowClear"])),n),{class:[{[`${f.value}-borderless`]:!W,[`${z}`]:z&&!b.value,[`${f.value}-sm`]:h.value==="small",[`${f.value}-lg`]:h.value==="large"},ei(f.value,l.value),m.value],disabled:v.value,showCount:null,prefixCls:f.value,onInput:D,onChange:D,onBlur:k,onKeydown:I,onCompositionstart:S,onCompositionend:_});return!((N=t.valueModifiers)===null||N===void 0)&&N.lazy&&delete j.onInput,C(Gle,H(H({},j),{},{id:(B=j==null?void 0:j.id)!==null&&B!==void 0?B:a.id.value,ref:u,maxlength:t.maxlength,lazy:t.lazy}),null)};return i({focus:O,blur:T,resizableTextArea:u}),Ke(()=>{let N=ix(c.value);!w.value&&y.value&&(t.value===null||t.value===void 0)&&(N=e6(N,t.maxlength)),d.value=N}),()=>{var N;const{maxlength:B,bordered:z=!0,hidden:W}=t,{style:j,class:U}=n,V=A(A(A({},t),n),{prefixCls:f.value,inputType:"text",handleReset:R,direction:p.value,bordered:z,style:b.value?void 0:j,hashId:m.value,disabled:(N=t.disabled)!==null&&N!==void 0?N:v.value});let q=C(Wle,H(H({},V),{},{value:d.value,status:t.status}),{element:F});if(b.value||s.hasFeedback){const Y=[...d.value].length;let J="";typeof b.value=="object"?J=b.value.formatter({value:d.value,count:Y,maxlength:B}):J=`${Y}${y.value?` / ${B}`:""}`,q=C("div",{hidden:W,class:ce(`${f.value}-textarea`,{[`${f.value}-textarea-rtl`]:p.value==="rtl",[`${f.value}-textarea-show-count`]:b.value,[`${f.value}-textarea-in-form-item`]:s.isFormItemInput},`${f.value}-textarea-show-count`,U,m.value),style:j,"data-count":typeof J!="object"?J:void 0},[q,s.hasFeedback&&C("span",{class:`${f.value}-textarea-suffix`},[s.feedbackIcon])])}return g(q)}}});var Kle={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};function JP(t){for(var e=1;eC(t?sf:nC,null,null),t6=oe({compatConfig:{MODE:3},name:"AInputPassword",inheritAttrs:!1,props:A(A({},ov()),{prefixCls:String,inputPrefixCls:String,action:{type:String,default:"click"},visibilityToggle:{type:Boolean,default:!0},visible:{type:Boolean,default:void 0},"onUpdate:visible":Function,iconRender:Function}),setup(t,e){let{slots:n,attrs:i,expose:o,emit:r}=e;const a=ie(!1),s=()=>{const{disabled:m}=t;m||(a.value=!a.value,r("update:visible",a.value))};Ke(()=>{t.visible!==void 0&&(a.value=!!t.visible)});const l=ie();o({focus:()=>{var m;(m=l.value)===null||m===void 0||m.focus()},blur:()=>{var m;(m=l.value)===null||m===void 0||m.blur()}});const d=m=>{const{action:v,iconRender:b=n.iconRender||ece}=t,y=Qle[v]||"",w=b(a.value),x={[y]:s,class:`${m}-icon`,key:"passwordIcon",onMousedown:$=>{$.preventDefault()},onMouseup:$=>{$.preventDefault()}};return At(cn(w)?w:C("span",null,[w]),x)},{prefixCls:f,getPrefixCls:h}=Me("input-password",t),p=L(()=>h("input",t.inputPrefixCls)),g=()=>{const{size:m,visibilityToggle:v}=t,b=Jle(t,["size","visibilityToggle"]),y=v&&d(f.value),w=ce(f.value,i.class,{[`${f.value}-${m}`]:!!m}),x=A(A(A({},ht(b,["suffix","iconRender","action"])),i),{type:a.value?"text":"password",class:w,prefixCls:p.value,suffix:y});return m&&(x.size=m),C(wn,H({ref:l},x),n)};return()=>g()}});wn.Group=JL;wn.Search=QL;wn.TextArea=tC;wn.Password=t6;wn.install=function(t){return t.component(wn.name,wn),t.component(wn.Group.name,wn.Group),t.component(wn.Search.name,wn.Search),t.component(wn.TextArea.name,wn.TextArea),t.component(wn.Password.name,wn.Password),t};function rv(){return{keyboard:{type:Boolean,default:void 0},mask:{type:Boolean,default:void 0},afterClose:Function,closable:{type:Boolean,default:void 0},maskClosable:{type:Boolean,default:void 0},visible:{type:Boolean,default:void 0},destroyOnClose:{type:Boolean,default:void 0},mousePosition:Z.shape({x:Number,y:Number}).loose,title:Z.any,footer:Z.any,transitionName:String,maskTransitionName:String,animation:Z.any,maskAnimation:Z.any,wrapStyle:{type:Object,default:void 0},bodyStyle:{type:Object,default:void 0},maskStyle:{type:Object,default:void 0},prefixCls:String,wrapClassName:String,rootClassName:String,width:[String,Number],height:[String,Number],zIndex:Number,bodyProps:Z.any,maskProps:Z.any,wrapProps:Z.any,getContainer:Z.any,dialogStyle:{type:Object,default:void 0},dialogClass:String,closeIcon:Z.any,forceRender:{type:Boolean,default:void 0},getOpenCount:Function,focusTriggerAfterClose:{type:Boolean,default:void 0},onClose:Function,modalRender:Function}}function eT(t,e,n){let i=e;return!i&&n&&(i=`${t}-${n}`),i}let tT=-1;function tce(){return tT+=1,tT}function nT(t,e){let n=t[`page${e?"Y":"X"}Offset`];const i=`scroll${e?"Top":"Left"}`;if(typeof n!="number"){const o=t.document;n=o.documentElement[i],typeof n!="number"&&(n=o.body[i])}return n}function nce(t){const e=t.getBoundingClientRect(),n={left:e.left,top:e.top},i=t.ownerDocument,o=i.defaultView||i.parentWindow;return n.left+=nT(o),n.top+=nT(o,!0),n}const ice={width:0,height:0,overflow:"hidden",outline:"none"},oce={outline:"none"},rce=oe({compatConfig:{MODE:3},name:"DialogContent",inheritAttrs:!1,props:A(A({},rv()),{motionName:String,ariaId:String,onVisibleChanged:Function,onMousedown:Function,onMouseup:Function}),setup(t,e){let{expose:n,slots:i,attrs:o}=e;const r=se(),a=se(),s=se();n({focus:()=>{var f;(f=r.value)===null||f===void 0||f.focus({preventScroll:!0})},changeActive:f=>{const{activeElement:h}=document;f&&h===a.value?r.value.focus({preventScroll:!0}):!f&&h===r.value&&a.value.focus({preventScroll:!0})}});const l=se(),c=L(()=>{const{width:f,height:h}=t,p={};return f!==void 0&&(p.width=typeof f=="number"?`${f}px`:f),h!==void 0&&(p.height=typeof h=="number"?`${h}px`:h),l.value&&(p.transformOrigin=l.value),p}),u=()=>{pt(()=>{if(s.value){const f=nce(s.value);l.value=t.mousePosition?`${t.mousePosition.x-f.left}px ${t.mousePosition.y-f.top}px`:""}})},d=f=>{t.onVisibleChanged(f)};return()=>{var f,h,p,g;const{prefixCls:m,footer:v=(f=i.footer)===null||f===void 0?void 0:f.call(i),title:b=(h=i.title)===null||h===void 0?void 0:h.call(i),ariaId:y,closable:w,closeIcon:x=(p=i.closeIcon)===null||p===void 0?void 0:p.call(i),onClose:$,bodyStyle:S,bodyProps:_,onMousedown:P,onMouseup:O,visible:T,modalRender:M=i.modalRender,destroyOnClose:I,motionName:k}=t;let E;v&&(E=C("div",{class:`${m}-footer`},[v]));let R;b&&(R=C("div",{class:`${m}-header`},[C("div",{class:`${m}-title`,id:y},[b])]));let D;w&&(D=C("button",{type:"button",onClick:$,"aria-label":"Close",class:`${m}-close`},[x||C("span",{class:`${m}-close-x`},null)]));const F=C("div",{class:`${m}-content`},[D,R,C("div",H({class:`${m}-body`,style:S},_),[(g=i.default)===null||g===void 0?void 0:g.call(i)]),E]),N=yo(k);return C(En,H(H({},N),{},{onBeforeEnter:u,onAfterEnter:()=>d(!0),onAfterLeave:()=>d(!1)}),{default:()=>[T||!I?ni(C("div",H(H({},o),{},{ref:s,key:"dialog-element",role:"document",style:[c.value,o.style],class:[m,o.class],onMousedown:P,onMouseup:O}),[C("div",{tabindex:0,ref:r,style:oce},[M?M({originVNode:F}):F]),C("div",{tabindex:0,ref:a,style:ice},null)]),[[vi,T]]):null]})}}}),ace=oe({compatConfig:{MODE:3},name:"DialogMask",props:{prefixCls:String,visible:Boolean,motionName:String,maskProps:Object},setup(t,e){return()=>{const{prefixCls:n,visible:i,maskProps:o,motionName:r}=t,a=yo(r);return C(En,a,{default:()=>[ni(C("div",H({class:`${n}-mask`},o),null),[[vi,i]])]})}}}),iT=oe({compatConfig:{MODE:3},name:"VcDialog",inheritAttrs:!1,props:ct(A(A({},rv()),{getOpenCount:Function,scrollLocker:Object}),{mask:!0,visible:!1,keyboard:!0,closable:!0,maskClosable:!0,destroyOnClose:!1,prefixCls:"rc-dialog",getOpenCount:()=>null,focusTriggerAfterClose:!0}),setup(t,e){let{attrs:n,slots:i}=e;const o=ie(),r=ie(),a=ie(),s=ie(t.visible),l=ie(`vcDialogTitle${tce()}`),c=v=>{var b,y;if(v)ha(r.value,document.activeElement)||(o.value=document.activeElement,(b=a.value)===null||b===void 0||b.focus());else{const w=s.value;if(s.value=!1,t.mask&&o.value&&t.focusTriggerAfterClose){try{o.value.focus({preventScroll:!0})}catch{}o.value=null}w&&((y=t.afterClose)===null||y===void 0||y.call(t))}},u=v=>{var b;(b=t.onClose)===null||b===void 0||b.call(t,v)},d=ie(!1),f=ie(),h=()=>{clearTimeout(f.value),d.value=!0},p=()=>{f.value=setTimeout(()=>{d.value=!1})},g=v=>{if(!t.maskClosable)return null;d.value?d.value=!1:r.value===v.target&&u(v)},m=v=>{if(t.keyboard&&v.keyCode===Te.ESC){v.stopPropagation(),u(v);return}t.visible&&v.keyCode===Te.TAB&&a.value.changeActive(!v.shiftKey)};return ye(()=>t.visible,()=>{t.visible&&(s.value=!0)},{flush:"post"}),at(()=>{var v;clearTimeout(f.value),(v=t.scrollLocker)===null||v===void 0||v.unLock()}),Ke(()=>{var v,b;(v=t.scrollLocker)===null||v===void 0||v.unLock(),s.value&&((b=t.scrollLocker)===null||b===void 0||b.lock())}),()=>{const{prefixCls:v,mask:b,visible:y,maskTransitionName:w,maskAnimation:x,zIndex:$,wrapClassName:S,rootClassName:_,wrapStyle:P,closable:O,maskProps:T,maskStyle:M,transitionName:I,animation:k,wrapProps:E,title:R=i.title}=t,{style:D,class:F}=n;return C("div",H({class:[`${v}-root`,_]},ka(t,{data:!0})),[C(ace,{prefixCls:v,visible:b&&y,motionName:eT(v,w,x),style:A({zIndex:$},M),maskProps:T},null),C("div",H({tabIndex:-1,onKeydown:m,class:ce(`${v}-wrap`,S),ref:r,onClick:g,role:"dialog","aria-labelledby":R?l.value:null,style:A(A({zIndex:$},P),{display:s.value?null:"none"})},E),[C(rce,H(H({},ht(t,["scrollLocker"])),{},{style:D,class:F,onMousedown:h,onMouseup:p,ref:a,closable:O,ariaId:l.value,prefixCls:v,visible:y,onClose:u,onVisibleChanged:c,motionName:eT(v,I,k)}),i)])])}}}),sce=rv(),n6=oe({compatConfig:{MODE:3},name:"DialogWrap",inheritAttrs:!1,props:ct(sce,{visible:!1}),setup(t,e){let{attrs:n,slots:i}=e;const o=se(t.visible);return y1({},{inTriggerContext:!1}),ye(()=>t.visible,()=>{t.visible&&(o.value=!0)},{flush:"post"}),()=>{const{visible:r,getContainer:a,forceRender:s,destroyOnClose:l=!1,afterClose:c}=t;let u=A(A(A({},t),n),{ref:"_component",key:"dialog"});return a===!1?C(iT,H(H({},u),{},{getOpenCount:()=>2}),i):!s&&l&&!o.value?null:C(Xd,{autoLock:!0,visible:r,forceRender:s,getContainer:a},{default:d=>(u=A(A(A({},u),d),{afterClose:()=>{c==null||c(),o.value=!1}}),C(iT,u,i))})}}});function lce(t){const e=se(null),n=$t(A({},t)),i=se([]),o=r=>{e.value===null&&(i.value=[],e.value=lt(()=>{let a;i.value.forEach(s=>{a=A(A({},a),s)}),A(n,a),e.value=null})),i.value.push(r)};return Ze(()=>{e.value&<.cancel(e.value)}),[n,o]}function oT(t,e,n,i){const o=e+n,r=(n-i)/2;if(n>i){if(e>0)return{[t]:r};if(e<0&&oi)return{[t]:e<0?r:-r};return{}}function cce(t,e,n,i){const{width:o,height:r}=uY();let a=null;return t<=o&&e<=r?a={x:0,y:0}:(t>o||e>r)&&(a=A(A({},oT("x",n,t,o)),oT("y",i,e,r))),a}var uce=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{ot(rT,t)},inject:()=>qe(rT,{isPreviewGroup:ie(!1),previewUrls:L(()=>new Map),setPreviewUrls:()=>{},current:se(null),setCurrent:()=>{},setShowPreview:()=>{},setMousePosition:()=>{},registerImage:null,rootClassName:""})},dce=()=>({previewPrefixCls:String,preview:{type:[Boolean,Object],default:!0},icons:{type:Object,default:()=>({})}}),i6=oe({compatConfig:{MODE:3},name:"PreviewGroup",inheritAttrs:!1,props:dce(),setup(t,e){let{slots:n}=e;const i=L(()=>{const x={visible:void 0,onVisibleChange:()=>{},getContainer:void 0,current:0};return typeof t.preview=="object"?a6(t.preview,x):x}),o=$t(new Map),r=se(),a=L(()=>i.value.visible),s=L(()=>i.value.getContainer),l=(x,$)=>{var S,_;(_=(S=i.value).onVisibleChange)===null||_===void 0||_.call(S,x,$)},[c,u]=jt(!!a.value,{value:a,onChange:l}),d=se(null),f=L(()=>a.value!==void 0),h=L(()=>Array.from(o.keys())),p=L(()=>h.value[i.value.current]),g=L(()=>new Map(Array.from(o).filter(x=>{let[,{canPreview:$}]=x;return!!$}).map(x=>{let[$,{url:S}]=x;return[$,S]}))),m=function(x,$){let S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;o.set(x,{url:$,canPreview:S})},v=x=>{r.value=x},b=x=>{d.value=x},y=function(x,$){let S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;const _=()=>{o.delete(x)};return o.set(x,{url:$,canPreview:S}),_},w=x=>{x==null||x.stopPropagation(),u(!1),b(null)};return ye(p,x=>{v(x)},{immediate:!0,flush:"post"}),Ke(()=>{c.value&&f.value&&v(p.value)},{flush:"post"}),iC.provide({isPreviewGroup:ie(!0),previewUrls:g,setPreviewUrls:m,current:r,setCurrent:v,setShowPreview:u,setMousePosition:b,registerImage:y}),()=>{const x=uce(i.value,[]);return C(Qe,null,[n.default&&n.default(),C(o6,H(H({},x),{},{"ria-hidden":!c.value,visible:c.value,prefixCls:t.previewPrefixCls,onClose:w,mousePosition:d.value,src:g.value.get(r.value),icons:t.icons,getContainer:s.value}),null)])}}}),Ga={x:0,y:0},fce=A(A({},rv()),{src:String,alt:String,rootClassName:String,icons:{type:Object,default:()=>({})}}),o6=oe({compatConfig:{MODE:3},name:"Preview",inheritAttrs:!1,props:fce,emits:["close","afterClose"],setup(t,e){let{emit:n,attrs:i}=e;const{rotateLeft:o,rotateRight:r,zoomIn:a,zoomOut:s,close:l,left:c,right:u,flipX:d,flipY:f}=$t(t.icons),h=ie(1),p=ie(0),g=$t({x:1,y:1}),[m,v]=lce(Ga),b=()=>n("close"),y=ie(),w=$t({originX:0,originY:0,deltaX:0,deltaY:0}),x=ie(!1),$=iC.inject(),{previewUrls:S,current:_,isPreviewGroup:P,setCurrent:O}=$,T=L(()=>S.value.size),M=L(()=>Array.from(S.value.keys())),I=L(()=>M.value.indexOf(_.value)),k=L(()=>P.value?S.value.get(_.value):t.src),E=L(()=>P.value&&T.value>1),R=ie({wheelDirection:0}),D=()=>{h.value=1,p.value=0,g.x=1,g.y=1,v(Ga),n("afterClose")},F=re=>{re?h.value+=.5:h.value++,v(Ga)},N=re=>{h.value>1&&(re?h.value-=.5:h.value--),v(Ga)},B=()=>{p.value+=90},z=()=>{p.value-=90},W=()=>{g.x=-g.x},j=()=>{g.y=-g.y},U=re=>{re.preventDefault(),re.stopPropagation(),I.value>0&&O(M.value[I.value-1])},V=re=>{re.preventDefault(),re.stopPropagation(),I.valueF(),type:"zoomIn"},{icon:s,onClick:()=>N(),type:"zoomOut",disabled:L(()=>h.value===1)},{icon:r,onClick:B,type:"rotateRight"},{icon:o,onClick:z,type:"rotateLeft"},{icon:d,onClick:W,type:"flipX"},{icon:f,onClick:j,type:"flipY"}],G=()=>{if(t.visible&&x.value){const re=y.value.offsetWidth*h.value,ne=y.value.offsetHeight*h.value,{left:le,top:he}=Dp(y.value),pe=p.value%180!==0;x.value=!1;const ge=cce(pe?ne:re,pe?re:ne,le,he);ge&&v(A({},ge))}},ee=re=>{re.button===0&&(re.preventDefault(),re.stopPropagation(),w.deltaX=re.pageX-m.x,w.deltaY=re.pageY-m.y,w.originX=m.x,w.originY=m.y,x.value=!0)},X=re=>{t.visible&&x.value&&v({x:re.pageX-w.deltaX,y:re.pageY-w.deltaY})},K=re=>{if(!t.visible)return;re.preventDefault();const ne=re.deltaY;R.value={wheelDirection:ne}},te=re=>{!t.visible||!E.value||(re.preventDefault(),re.keyCode===Te.LEFT?I.value>0&&O(M.value[I.value-1]):re.keyCode===Te.RIGHT&&I.value{t.visible&&(h.value!==1&&(h.value=1),(m.x!==Ga.x||m.y!==Ga.y)&&v(Ga))};let ae=()=>{};return Ze(()=>{ye([()=>t.visible,x],()=>{ae();let re,ne;const le=Gt(window,"mouseup",G,!1),he=Gt(window,"mousemove",X,!1),pe=Gt(window,"wheel",K,{passive:!1}),ge=Gt(window,"keydown",te,!1);try{window.top!==window.self&&(re=Gt(window.top,"mouseup",G,!1),ne=Gt(window.top,"mousemove",X,!1))}catch{}ae=()=>{le.remove(),he.remove(),pe.remove(),ge.remove(),re&&re.remove(),ne&&ne.remove()}},{flush:"post",immediate:!0}),ye([R],()=>{const{wheelDirection:re}=R.value;re>0?N(!0):re<0&&F(!0)})}),Xn(()=>{ae()}),()=>{const{visible:re,prefixCls:ne,rootClassName:le}=t;return C(n6,H(H({},i),{},{transitionName:t.transitionName,maskTransitionName:t.maskTransitionName,closable:!1,keyboard:!0,prefixCls:ne,onClose:b,afterClose:D,visible:re,wrapClassName:q,rootClassName:le,getContainer:t.getContainer}),{default:()=>[C("div",{class:[`${t.prefixCls}-operations-wrapper`,le]},[C("ul",{class:`${t.prefixCls}-operations`},[Q.map(he=>{let{icon:pe,onClick:ge,type:be,disabled:$e}=he;return C("li",{class:ce(Y,{[`${t.prefixCls}-operations-operation-disabled`]:$e&&($e==null?void 0:$e.value)}),onClick:ge,key:be},[On(pe,{class:J})])})])]),C("div",{class:`${t.prefixCls}-img-wrapper`,style:{transform:`translate3d(${m.x}px, ${m.y}px, 0)`}},[C("img",{onMousedown:ee,onDblclick:ue,ref:y,class:`${t.prefixCls}-img`,src:k.value,alt:t.alt,style:{transform:`scale3d(${g.x*h.value}, ${g.y*h.value}, 1) rotate(${p.value}deg)`}},null)]),E.value&&C("div",{class:ce(`${t.prefixCls}-switch-left`,{[`${t.prefixCls}-switch-left-disabled`]:I.value<=0}),onClick:U},[c]),E.value&&C("div",{class:ce(`${t.prefixCls}-switch-right`,{[`${t.prefixCls}-switch-right-disabled`]:I.value>=T.value-1}),onClick:V},[u])]})}}});var hce=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o({src:String,wrapperClassName:String,wrapperStyle:{type:Object,default:void 0},rootClassName:String,prefixCls:String,previewPrefixCls:String,width:[Number,String],height:[Number,String],previewMask:{type:[Boolean,Function],default:void 0},placeholder:Z.any,fallback:String,preview:{type:[Boolean,Object],default:!0},onClick:{type:Function},onError:{type:Function}}),a6=(t,e)=>{const n=A({},t);return Object.keys(e).forEach(i=>{t[i]===void 0&&(n[i]=e[i])}),n};let pce=0;const s6=oe({compatConfig:{MODE:3},name:"VcImage",inheritAttrs:!1,props:r6(),emits:["click","error"],setup(t,e){let{attrs:n,slots:i,emit:o}=e;const r=L(()=>t.prefixCls),a=L(()=>`${r.value}-preview`),s=L(()=>{const F={visible:void 0,onVisibleChange:()=>{},getContainer:void 0};return typeof t.preview=="object"?a6(t.preview,F):F}),l=L(()=>{var F;return(F=s.value.src)!==null&&F!==void 0?F:t.src}),c=L(()=>t.placeholder&&t.placeholder!==!0||i.placeholder),u=L(()=>s.value.visible),d=L(()=>s.value.getContainer),f=L(()=>u.value!==void 0),h=(F,N)=>{var B,z;(z=(B=s.value).onVisibleChange)===null||z===void 0||z.call(B,F,N)},[p,g]=jt(!!u.value,{value:u,onChange:h}),m=se(c.value?"loading":"normal");ye(()=>t.src,()=>{m.value=c.value?"loading":"normal"});const v=se(null),b=L(()=>m.value==="error"),y=iC.inject(),{isPreviewGroup:w,setCurrent:x,setShowPreview:$,setMousePosition:S,registerImage:_}=y,P=se(pce++),O=L(()=>t.preview&&!b.value),T=()=>{m.value="normal"},M=F=>{m.value="error",o("error",F)},I=F=>{if(!f.value){const{left:N,top:B}=Dp(F.target);w.value?(x(P.value),S({x:N,y:B})):v.value={x:N,y:B}}w.value?$(!0):g(!0),o("click",F)},k=()=>{g(!1),f.value||(v.value=null)},E=se(null);ye(()=>E,()=>{m.value==="loading"&&E.value.complete&&(E.value.naturalWidth||E.value.naturalHeight)&&T()});let R=()=>{};Ze(()=>{ye([l,O],()=>{if(R(),!w.value)return()=>{};R=_(P.value,l.value,O.value),O.value||R()},{flush:"post",immediate:!0})}),Xn(()=>{R()});const D=F=>aZ(F)?F+"px":F;return()=>{const{prefixCls:F,wrapperClassName:N,fallback:B,src:z,placeholder:W,wrapperStyle:j,rootClassName:U,width:V,height:q,crossorigin:Y,decoding:J,alt:Q,sizes:G,srcset:ee,usemap:X,class:K,style:te}=A(A({},t),n),ue=s.value,{icons:ae,maskClassName:re}=ue,ne=hce(ue,["icons","maskClassName"]),le=ce(F,N,U,{[`${F}-error`]:b.value}),he=b.value&&B?B:l.value,pe={crossorigin:Y,decoding:J,alt:Q,sizes:G,srcset:ee,usemap:X,width:V,height:q,class:ce(`${F}-img`,{[`${F}-img-placeholder`]:W===!0},K),style:A({height:D(q)},te)};return C(Qe,null,[C("div",{class:le,onClick:O.value?I:ge=>{o("click",ge)},style:A({width:D(V),height:D(q)},j)},[C("img",H(H(H({},pe),b.value&&B?{src:B}:{onLoad:T,onError:M,src:z}),{},{ref:E}),null),m.value==="loading"&&C("div",{"aria-hidden":"true",class:`${F}-placeholder`},[W||i.placeholder&&i.placeholder()]),i.previewMask&&O.value&&C("div",{class:[`${F}-mask`,re]},[i.previewMask()])]),!w.value&&O.value&&C(o6,H(H({},ne),{},{"aria-hidden":!p.value,visible:p.value,prefixCls:a.value,onClose:k,mousePosition:v.value,src:he,alt:Q,getContainer:d.value,icons:ae,rootClassName:U}),null)])}}});s6.PreviewGroup=i6;var gce={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z"}},{tag:"path",attrs:{d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z"}}]},name:"rotate-left",theme:"outlined"};function aT(t){for(var e=1;e{const{componentCls:e}=t;return[{[`${e}-root`]:{[`${e}${t.antCls}-zoom-enter, ${e}${t.antCls}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:t.motionDurationSlow,userSelect:"none"},[`${e}${t.antCls}-zoom-leave ${e}-content`]:{pointerEvents:"none"},[`${e}-mask`]:A(A({},dT("fixed")),{zIndex:t.zIndexPopupBase,height:"100%",backgroundColor:t.colorBgMask,[`${e}-hidden`]:{display:"none"}}),[`${e}-wrap`]:A(A({},dT("fixed")),{overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${e}-root`]:j1(t)}]},Ace=t=>{const{componentCls:e}=t;return[{[`${e}-root`]:{[`${e}-wrap`]:{zIndex:t.zIndexPopupBase,position:"fixed",inset:0,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"},[`${e}-wrap-rtl`]:{direction:"rtl"},[`${e}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[e]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${t.screenSMMax})`]:{[e]:{maxWidth:"calc(100vw - 16px)",margin:`${t.marginXS} auto`},[`${e}-centered`]:{[e]:{flex:1}}}}},{[e]:A(A({},rt(t)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${t.margin*2}px)`,margin:"0 auto",paddingBottom:t.paddingLG,[`${e}-title`]:{margin:0,color:t.modalHeadingColor,fontWeight:t.fontWeightStrong,fontSize:t.modalHeaderTitleFontSize,lineHeight:t.modalHeaderTitleLineHeight,wordWrap:"break-word"},[`${e}-content`]:{position:"relative",backgroundColor:t.modalContentBg,backgroundClip:"padding-box",border:0,borderRadius:t.borderRadiusLG,boxShadow:t.boxShadowSecondary,pointerEvents:"auto",padding:`${t.paddingMD}px ${t.paddingContentHorizontalLG}px`},[`${e}-close`]:A({position:"absolute",top:(t.modalHeaderCloseSize-t.modalCloseBtnSize)/2,insetInlineEnd:(t.modalHeaderCloseSize-t.modalCloseBtnSize)/2,zIndex:t.zIndexPopupBase+10,padding:0,color:t.modalCloseColor,fontWeight:t.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:t.borderRadiusSM,width:t.modalConfirmIconSize,height:t.modalConfirmIconSize,border:0,outline:0,cursor:"pointer",transition:`color ${t.motionDurationMid}, background-color ${t.motionDurationMid}`,"&-x":{display:"block",fontSize:t.fontSizeLG,fontStyle:"normal",lineHeight:`${t.modalCloseBtnSize}px`,textAlign:"center",textTransform:"none",textRendering:"auto"},"&:hover":{color:t.modalIconHoverColor,backgroundColor:t.wireframe?"transparent":t.colorFillContent,textDecoration:"none"},"&:active":{backgroundColor:t.wireframe?"transparent":t.colorFillContentHover}},Hr(t)),[`${e}-header`]:{color:t.colorText,background:t.modalHeaderBg,borderRadius:`${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`,marginBottom:t.marginXS},[`${e}-body`]:{fontSize:t.fontSize,lineHeight:t.lineHeight,wordWrap:"break-word"},[`${e}-footer`]:{textAlign:"end",background:t.modalFooterBg,marginTop:t.marginSM,[`${t.antCls}-btn + ${t.antCls}-btn:not(${t.antCls}-dropdown-trigger)`]:{marginBottom:0,marginInlineStart:t.marginXS}},[`${e}-open`]:{overflow:"hidden"}})},{[`${e}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${e}-content, +`,Vle=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],Wb={};let io;function Xle(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=t.getAttribute("id")||t.getAttribute("data-reactid")||t.getAttribute("name");if(e&&Wb[n])return Wb[n];const i=window.getComputedStyle(t),o=i.getPropertyValue("box-sizing")||i.getPropertyValue("-moz-box-sizing")||i.getPropertyValue("-webkit-box-sizing"),r=parseFloat(i.getPropertyValue("padding-bottom"))+parseFloat(i.getPropertyValue("padding-top")),a=parseFloat(i.getPropertyValue("border-bottom-width"))+parseFloat(i.getPropertyValue("border-top-width")),l={sizingStyle:Vle.map(c=>`${c}:${i.getPropertyValue(c)}`).join(";"),paddingSize:r,borderSize:a,boxSizing:o};return e&&n&&(Wb[n]=l),l}function Yle(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;io||(io=document.createElement("textarea"),io.setAttribute("tab-index","-1"),io.setAttribute("aria-hidden","true"),document.body.appendChild(io)),t.getAttribute("wrap")?io.setAttribute("wrap",t.getAttribute("wrap")):io.removeAttribute("wrap");const{paddingSize:o,borderSize:r,boxSizing:a,sizingStyle:s}=Xle(t,e);io.setAttribute("style",`${s};${jle}`),io.value=t.value||t.placeholder||"";let l,c,u,d=io.scrollHeight;if(a==="border-box"?d+=r:a==="content-box"&&(d-=o),n!==null||i!==null){io.value=" ";const h=io.scrollHeight-o;n!==null&&(l=h*n,a==="border-box"&&(l=l+o+r),d=Math.max(l,d)),i!==null&&(c=h*i,a==="border-box"&&(c=c+o+r),u=d>c?"":"hidden",d=Math.min(c,d))}const f={height:`${d}px`,overflowY:u,resize:"none"};return l&&(f.minHeight=`${l}px`),c&&(f.maxHeight=`${c}px`),f}const jb=0,Vb=1,Xb=2,Gle=oe({compatConfig:{MODE:3},name:"ResizableTextArea",inheritAttrs:!1,props:ZL(),setup(t,e){let{attrs:n,emit:i,expose:o}=e,r,a;const s=se(),l=se({}),c=se(Xb);at(()=>{lt.cancel(r),lt.cancel(a)});const u=()=>{try{if(s.value&&document.activeElement===s.value.input){const $=s.value.getSelectionStart(),S=s.value.getSelectionEnd(),_=s.value.getScrollTop();s.value.setSelectionRange($,S),s.value.setScrollTop(_)}}catch{}},d=se(),f=se();Ke(()=>{const $=t.autoSize||t.autosize;$?(d.value=$.minRows,f.value=$.maxRows):(d.value=void 0,f.value=void 0)});const h=L(()=>!!(t.autoSize||t.autosize)),p=()=>{c.value=jb};ye([()=>t.value,d,f,h],()=>{h.value&&p()},{immediate:!0});const g=se();ye([c,s],()=>{if(s.value)if(c.value===jb)c.value=Vb;else if(c.value===Vb){const $=Yle(s.value.input,!1,d.value,f.value);c.value=Xb,g.value=$}else u()},{immediate:!0,flush:"post"});const m=Cn(),v=se(),b=()=>{lt.cancel(v.value)},y=$=>{c.value===Xb&&(i("resize",$),h.value&&(b(),v.value=lt(()=>{p()})))};at(()=>{b()}),o({resizeTextarea:()=>{p()},textArea:L(()=>{var $;return($=s.value)===null||$===void 0?void 0:$.input}),instance:m}),Gi(t.autosize===void 0);const x=()=>{const{prefixCls:$,disabled:S}=t,_=ht(t,["prefixCls","onPressEnter","autoSize","autosize","defaultValue","allowClear","type","maxlength","valueModifiers"]),P=ce($,n.class,{[`${$}-disabled`]:S}),O=h.value?g.value:null,T=[n.style,l.value,O],M=A(A(A({},_),n),{style:T,class:P});return(c.value===jb||c.value===Vb)&&T.push({overflowX:"hidden",overflowY:"hidden"}),M.autofocus||delete M.autofocus,M.rows===0&&delete M.rows,C(mo,{onResize:y,disabled:!h.value},{default:()=>[C(_c,H(H({},M),{},{ref:s,tag:"textarea"}),null)]})};return()=>x()}});function e6(t,e){return[...t||""].slice(0,e).join("")}function ZP(t,e,n,i){let o=n;return t?o=e6(n,i):[...e||""].lengthi&&(o=e),o}const tC=oe({compatConfig:{MODE:3},name:"ATextarea",inheritAttrs:!1,props:ZL(),setup(t,e){let{attrs:n,expose:i,emit:o}=e;var r;const a=vn(),s=Mn.useInject(),l=L(()=>zo(s.status,t.status)),c=ie((r=t.value)!==null&&r!==void 0?r:t.defaultValue),u=ie(),d=ie(""),{prefixCls:f,size:h,direction:p}=Me("input",t),[g,m]=ES(f),v=Oi(),b=L(()=>t.showCount===""||t.showCount||!1),y=L(()=>Number(t.maxlength)>0),w=ie(!1),x=ie(),$=ie(0),S=N=>{w.value=!0,x.value=d.value,$.value=N.currentTarget.selectionStart,o("compositionstart",N)},_=N=>{var B;w.value=!1;let z=N.currentTarget.value;if(y.value){const W=$.value>=t.maxlength+1||$.value===((B=x.value)===null||B===void 0?void 0:B.length);z=ZP(W,x.value,z,t.maxlength)}z!==d.value&&(M(z),ju(N.currentTarget,N,E,z)),o("compositionend",N)},P=Cn();ye(()=>t.value,()=>{var N;"value"in P.vnode.props,c.value=(N=t.value)!==null&&N!==void 0?N:""});const O=N=>{var B;KL((B=u.value)===null||B===void 0?void 0:B.textArea,N)},T=()=>{var N,B;(B=(N=u.value)===null||N===void 0?void 0:N.textArea)===null||B===void 0||B.blur()},M=(N,B)=>{c.value!==N&&(t.value===void 0?c.value=N:pt(()=>{var z,W,j;u.value.textArea.value!==d.value&&((j=(z=u.value)===null||z===void 0?void 0:(W=z.instance).update)===null||j===void 0||j.call(W))}),pt(()=>{B&&B()}))},I=N=>{N.keyCode===13&&o("pressEnter",N),o("keydown",N)},k=N=>{const{onBlur:B}=t;B==null||B(N),a.onFieldBlur()},E=N=>{o("update:value",N.target.value),o("change",N),o("input",N),a.onFieldChange()},R=N=>{ju(u.value.textArea,N,E),M("",()=>{O()})},D=N=>{let B=N.target.value;if(c.value!==B){if(y.value){const z=N.target,W=z.selectionStart>=t.maxlength+1||z.selectionStart===B.length||!z.selectionStart;B=ZP(W,d.value,B,t.maxlength)}ju(N.currentTarget,N,E,B),M(B)}},F=()=>{var N,B;const{class:z}=n,{bordered:W=!0}=t,j=A(A(A({},ht(t,["allowClear"])),n),{class:[{[`${f.value}-borderless`]:!W,[`${z}`]:z&&!b.value,[`${f.value}-sm`]:h.value==="small",[`${f.value}-lg`]:h.value==="large"},ei(f.value,l.value),m.value],disabled:v.value,showCount:null,prefixCls:f.value,onInput:D,onChange:D,onBlur:k,onKeydown:I,onCompositionstart:S,onCompositionend:_});return!((N=t.valueModifiers)===null||N===void 0)&&N.lazy&&delete j.onInput,C(Gle,H(H({},j),{},{id:(B=j==null?void 0:j.id)!==null&&B!==void 0?B:a.id.value,ref:u,maxlength:t.maxlength,lazy:t.lazy}),null)};return i({focus:O,blur:T,resizableTextArea:u}),Ke(()=>{let N=ix(c.value);!w.value&&y.value&&(t.value===null||t.value===void 0)&&(N=e6(N,t.maxlength)),d.value=N}),()=>{var N;const{maxlength:B,bordered:z=!0,hidden:W}=t,{style:j,class:U}=n,V=A(A(A({},t),n),{prefixCls:f.value,inputType:"text",handleReset:R,direction:p.value,bordered:z,style:b.value?void 0:j,hashId:m.value,disabled:(N=t.disabled)!==null&&N!==void 0?N:v.value});let q=C(Wle,H(H({},V),{},{value:d.value,status:t.status}),{element:F});if(b.value||s.hasFeedback){const Y=[...d.value].length;let J="";typeof b.value=="object"?J=b.value.formatter({value:d.value,count:Y,maxlength:B}):J=`${Y}${y.value?` / ${B}`:""}`,q=C("div",{hidden:W,class:ce(`${f.value}-textarea`,{[`${f.value}-textarea-rtl`]:p.value==="rtl",[`${f.value}-textarea-show-count`]:b.value,[`${f.value}-textarea-in-form-item`]:s.isFormItemInput},`${f.value}-textarea-show-count`,U,m.value),style:j,"data-count":typeof J!="object"?J:void 0},[q,s.hasFeedback&&C("span",{class:`${f.value}-textarea-suffix`},[s.feedbackIcon])])}return g(q)}}});var Kle={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};function JP(t){for(var e=1;eC(t?lf:nC,null,null),t6=oe({compatConfig:{MODE:3},name:"AInputPassword",inheritAttrs:!1,props:A(A({},rv()),{prefixCls:String,inputPrefixCls:String,action:{type:String,default:"click"},visibilityToggle:{type:Boolean,default:!0},visible:{type:Boolean,default:void 0},"onUpdate:visible":Function,iconRender:Function}),setup(t,e){let{slots:n,attrs:i,expose:o,emit:r}=e;const a=ie(!1),s=()=>{const{disabled:m}=t;m||(a.value=!a.value,r("update:visible",a.value))};Ke(()=>{t.visible!==void 0&&(a.value=!!t.visible)});const l=ie();o({focus:()=>{var m;(m=l.value)===null||m===void 0||m.focus()},blur:()=>{var m;(m=l.value)===null||m===void 0||m.blur()}});const d=m=>{const{action:v,iconRender:b=n.iconRender||ece}=t,y=Qle[v]||"",w=b(a.value),x={[y]:s,class:`${m}-icon`,key:"passwordIcon",onMousedown:$=>{$.preventDefault()},onMouseup:$=>{$.preventDefault()}};return At(cn(w)?w:C("span",null,[w]),x)},{prefixCls:f,getPrefixCls:h}=Me("input-password",t),p=L(()=>h("input",t.inputPrefixCls)),g=()=>{const{size:m,visibilityToggle:v}=t,b=Jle(t,["size","visibilityToggle"]),y=v&&d(f.value),w=ce(f.value,i.class,{[`${f.value}-${m}`]:!!m}),x=A(A(A({},ht(b,["suffix","iconRender","action"])),i),{type:a.value?"text":"password",class:w,prefixCls:p.value,suffix:y});return m&&(x.size=m),C(wn,H({ref:l},x),n)};return()=>g()}});wn.Group=JL;wn.Search=QL;wn.TextArea=tC;wn.Password=t6;wn.install=function(t){return t.component(wn.name,wn),t.component(wn.Group.name,wn.Group),t.component(wn.Search.name,wn.Search),t.component(wn.TextArea.name,wn.TextArea),t.component(wn.Password.name,wn.Password),t};function av(){return{keyboard:{type:Boolean,default:void 0},mask:{type:Boolean,default:void 0},afterClose:Function,closable:{type:Boolean,default:void 0},maskClosable:{type:Boolean,default:void 0},visible:{type:Boolean,default:void 0},destroyOnClose:{type:Boolean,default:void 0},mousePosition:Z.shape({x:Number,y:Number}).loose,title:Z.any,footer:Z.any,transitionName:String,maskTransitionName:String,animation:Z.any,maskAnimation:Z.any,wrapStyle:{type:Object,default:void 0},bodyStyle:{type:Object,default:void 0},maskStyle:{type:Object,default:void 0},prefixCls:String,wrapClassName:String,rootClassName:String,width:[String,Number],height:[String,Number],zIndex:Number,bodyProps:Z.any,maskProps:Z.any,wrapProps:Z.any,getContainer:Z.any,dialogStyle:{type:Object,default:void 0},dialogClass:String,closeIcon:Z.any,forceRender:{type:Boolean,default:void 0},getOpenCount:Function,focusTriggerAfterClose:{type:Boolean,default:void 0},onClose:Function,modalRender:Function}}function eT(t,e,n){let i=e;return!i&&n&&(i=`${t}-${n}`),i}let tT=-1;function tce(){return tT+=1,tT}function nT(t,e){let n=t[`page${e?"Y":"X"}Offset`];const i=`scroll${e?"Top":"Left"}`;if(typeof n!="number"){const o=t.document;n=o.documentElement[i],typeof n!="number"&&(n=o.body[i])}return n}function nce(t){const e=t.getBoundingClientRect(),n={left:e.left,top:e.top},i=t.ownerDocument,o=i.defaultView||i.parentWindow;return n.left+=nT(o),n.top+=nT(o,!0),n}const ice={width:0,height:0,overflow:"hidden",outline:"none"},oce={outline:"none"},rce=oe({compatConfig:{MODE:3},name:"DialogContent",inheritAttrs:!1,props:A(A({},av()),{motionName:String,ariaId:String,onVisibleChanged:Function,onMousedown:Function,onMouseup:Function}),setup(t,e){let{expose:n,slots:i,attrs:o}=e;const r=se(),a=se(),s=se();n({focus:()=>{var f;(f=r.value)===null||f===void 0||f.focus({preventScroll:!0})},changeActive:f=>{const{activeElement:h}=document;f&&h===a.value?r.value.focus({preventScroll:!0}):!f&&h===r.value&&a.value.focus({preventScroll:!0})}});const l=se(),c=L(()=>{const{width:f,height:h}=t,p={};return f!==void 0&&(p.width=typeof f=="number"?`${f}px`:f),h!==void 0&&(p.height=typeof h=="number"?`${h}px`:h),l.value&&(p.transformOrigin=l.value),p}),u=()=>{pt(()=>{if(s.value){const f=nce(s.value);l.value=t.mousePosition?`${t.mousePosition.x-f.left}px ${t.mousePosition.y-f.top}px`:""}})},d=f=>{t.onVisibleChanged(f)};return()=>{var f,h,p,g;const{prefixCls:m,footer:v=(f=i.footer)===null||f===void 0?void 0:f.call(i),title:b=(h=i.title)===null||h===void 0?void 0:h.call(i),ariaId:y,closable:w,closeIcon:x=(p=i.closeIcon)===null||p===void 0?void 0:p.call(i),onClose:$,bodyStyle:S,bodyProps:_,onMousedown:P,onMouseup:O,visible:T,modalRender:M=i.modalRender,destroyOnClose:I,motionName:k}=t;let E;v&&(E=C("div",{class:`${m}-footer`},[v]));let R;b&&(R=C("div",{class:`${m}-header`},[C("div",{class:`${m}-title`,id:y},[b])]));let D;w&&(D=C("button",{type:"button",onClick:$,"aria-label":"Close",class:`${m}-close`},[x||C("span",{class:`${m}-close-x`},null)]));const F=C("div",{class:`${m}-content`},[D,R,C("div",H({class:`${m}-body`,style:S},_),[(g=i.default)===null||g===void 0?void 0:g.call(i)]),E]),N=yo(k);return C(En,H(H({},N),{},{onBeforeEnter:u,onAfterEnter:()=>d(!0),onAfterLeave:()=>d(!1)}),{default:()=>[T||!I?ni(C("div",H(H({},o),{},{ref:s,key:"dialog-element",role:"document",style:[c.value,o.style],class:[m,o.class],onMousedown:P,onMouseup:O}),[C("div",{tabindex:0,ref:r,style:oce},[M?M({originVNode:F}):F]),C("div",{tabindex:0,ref:a,style:ice},null)]),[[vi,T]]):null]})}}}),ace=oe({compatConfig:{MODE:3},name:"DialogMask",props:{prefixCls:String,visible:Boolean,motionName:String,maskProps:Object},setup(t,e){return()=>{const{prefixCls:n,visible:i,maskProps:o,motionName:r}=t,a=yo(r);return C(En,a,{default:()=>[ni(C("div",H({class:`${n}-mask`},o),null),[[vi,i]])]})}}}),iT=oe({compatConfig:{MODE:3},name:"VcDialog",inheritAttrs:!1,props:ct(A(A({},av()),{getOpenCount:Function,scrollLocker:Object}),{mask:!0,visible:!1,keyboard:!0,closable:!0,maskClosable:!0,destroyOnClose:!1,prefixCls:"rc-dialog",getOpenCount:()=>null,focusTriggerAfterClose:!0}),setup(t,e){let{attrs:n,slots:i}=e;const o=ie(),r=ie(),a=ie(),s=ie(t.visible),l=ie(`vcDialogTitle${tce()}`),c=v=>{var b,y;if(v)ha(r.value,document.activeElement)||(o.value=document.activeElement,(b=a.value)===null||b===void 0||b.focus());else{const w=s.value;if(s.value=!1,t.mask&&o.value&&t.focusTriggerAfterClose){try{o.value.focus({preventScroll:!0})}catch{}o.value=null}w&&((y=t.afterClose)===null||y===void 0||y.call(t))}},u=v=>{var b;(b=t.onClose)===null||b===void 0||b.call(t,v)},d=ie(!1),f=ie(),h=()=>{clearTimeout(f.value),d.value=!0},p=()=>{f.value=setTimeout(()=>{d.value=!1})},g=v=>{if(!t.maskClosable)return null;d.value?d.value=!1:r.value===v.target&&u(v)},m=v=>{if(t.keyboard&&v.keyCode===Te.ESC){v.stopPropagation(),u(v);return}t.visible&&v.keyCode===Te.TAB&&a.value.changeActive(!v.shiftKey)};return ye(()=>t.visible,()=>{t.visible&&(s.value=!0)},{flush:"post"}),at(()=>{var v;clearTimeout(f.value),(v=t.scrollLocker)===null||v===void 0||v.unLock()}),Ke(()=>{var v,b;(v=t.scrollLocker)===null||v===void 0||v.unLock(),s.value&&((b=t.scrollLocker)===null||b===void 0||b.lock())}),()=>{const{prefixCls:v,mask:b,visible:y,maskTransitionName:w,maskAnimation:x,zIndex:$,wrapClassName:S,rootClassName:_,wrapStyle:P,closable:O,maskProps:T,maskStyle:M,transitionName:I,animation:k,wrapProps:E,title:R=i.title}=t,{style:D,class:F}=n;return C("div",H({class:[`${v}-root`,_]},ka(t,{data:!0})),[C(ace,{prefixCls:v,visible:b&&y,motionName:eT(v,w,x),style:A({zIndex:$},M),maskProps:T},null),C("div",H({tabIndex:-1,onKeydown:m,class:ce(`${v}-wrap`,S),ref:r,onClick:g,role:"dialog","aria-labelledby":R?l.value:null,style:A(A({zIndex:$},P),{display:s.value?null:"none"})},E),[C(rce,H(H({},ht(t,["scrollLocker"])),{},{style:D,class:F,onMousedown:h,onMouseup:p,ref:a,closable:O,ariaId:l.value,prefixCls:v,visible:y,onClose:u,onVisibleChanged:c,motionName:eT(v,I,k)}),i)])])}}}),sce=av(),n6=oe({compatConfig:{MODE:3},name:"DialogWrap",inheritAttrs:!1,props:ct(sce,{visible:!1}),setup(t,e){let{attrs:n,slots:i}=e;const o=se(t.visible);return y1({},{inTriggerContext:!1}),ye(()=>t.visible,()=>{t.visible&&(o.value=!0)},{flush:"post"}),()=>{const{visible:r,getContainer:a,forceRender:s,destroyOnClose:l=!1,afterClose:c}=t;let u=A(A(A({},t),n),{ref:"_component",key:"dialog"});return a===!1?C(iT,H(H({},u),{},{getOpenCount:()=>2}),i):!s&&l&&!o.value?null:C(Yd,{autoLock:!0,visible:r,forceRender:s,getContainer:a},{default:d=>(u=A(A(A({},u),d),{afterClose:()=>{c==null||c(),o.value=!1}}),C(iT,u,i))})}}});function lce(t){const e=se(null),n=$t(A({},t)),i=se([]),o=r=>{e.value===null&&(i.value=[],e.value=lt(()=>{let a;i.value.forEach(s=>{a=A(A({},a),s)}),A(n,a),e.value=null})),i.value.push(r)};return Ze(()=>{e.value&<.cancel(e.value)}),[n,o]}function oT(t,e,n,i){const o=e+n,r=(n-i)/2;if(n>i){if(e>0)return{[t]:r};if(e<0&&oi)return{[t]:e<0?r:-r};return{}}function cce(t,e,n,i){const{width:o,height:r}=uY();let a=null;return t<=o&&e<=r?a={x:0,y:0}:(t>o||e>r)&&(a=A(A({},oT("x",n,t,o)),oT("y",i,e,r))),a}var uce=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{ot(rT,t)},inject:()=>qe(rT,{isPreviewGroup:ie(!1),previewUrls:L(()=>new Map),setPreviewUrls:()=>{},current:se(null),setCurrent:()=>{},setShowPreview:()=>{},setMousePosition:()=>{},registerImage:null,rootClassName:""})},dce=()=>({previewPrefixCls:String,preview:{type:[Boolean,Object],default:!0},icons:{type:Object,default:()=>({})}}),i6=oe({compatConfig:{MODE:3},name:"PreviewGroup",inheritAttrs:!1,props:dce(),setup(t,e){let{slots:n}=e;const i=L(()=>{const x={visible:void 0,onVisibleChange:()=>{},getContainer:void 0,current:0};return typeof t.preview=="object"?a6(t.preview,x):x}),o=$t(new Map),r=se(),a=L(()=>i.value.visible),s=L(()=>i.value.getContainer),l=(x,$)=>{var S,_;(_=(S=i.value).onVisibleChange)===null||_===void 0||_.call(S,x,$)},[c,u]=jt(!!a.value,{value:a,onChange:l}),d=se(null),f=L(()=>a.value!==void 0),h=L(()=>Array.from(o.keys())),p=L(()=>h.value[i.value.current]),g=L(()=>new Map(Array.from(o).filter(x=>{let[,{canPreview:$}]=x;return!!$}).map(x=>{let[$,{url:S}]=x;return[$,S]}))),m=function(x,$){let S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;o.set(x,{url:$,canPreview:S})},v=x=>{r.value=x},b=x=>{d.value=x},y=function(x,$){let S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;const _=()=>{o.delete(x)};return o.set(x,{url:$,canPreview:S}),_},w=x=>{x==null||x.stopPropagation(),u(!1),b(null)};return ye(p,x=>{v(x)},{immediate:!0,flush:"post"}),Ke(()=>{c.value&&f.value&&v(p.value)},{flush:"post"}),iC.provide({isPreviewGroup:ie(!0),previewUrls:g,setPreviewUrls:m,current:r,setCurrent:v,setShowPreview:u,setMousePosition:b,registerImage:y}),()=>{const x=uce(i.value,[]);return C(Qe,null,[n.default&&n.default(),C(o6,H(H({},x),{},{"ria-hidden":!c.value,visible:c.value,prefixCls:t.previewPrefixCls,onClose:w,mousePosition:d.value,src:g.value.get(r.value),icons:t.icons,getContainer:s.value}),null)])}}}),Ga={x:0,y:0},fce=A(A({},av()),{src:String,alt:String,rootClassName:String,icons:{type:Object,default:()=>({})}}),o6=oe({compatConfig:{MODE:3},name:"Preview",inheritAttrs:!1,props:fce,emits:["close","afterClose"],setup(t,e){let{emit:n,attrs:i}=e;const{rotateLeft:o,rotateRight:r,zoomIn:a,zoomOut:s,close:l,left:c,right:u,flipX:d,flipY:f}=$t(t.icons),h=ie(1),p=ie(0),g=$t({x:1,y:1}),[m,v]=lce(Ga),b=()=>n("close"),y=ie(),w=$t({originX:0,originY:0,deltaX:0,deltaY:0}),x=ie(!1),$=iC.inject(),{previewUrls:S,current:_,isPreviewGroup:P,setCurrent:O}=$,T=L(()=>S.value.size),M=L(()=>Array.from(S.value.keys())),I=L(()=>M.value.indexOf(_.value)),k=L(()=>P.value?S.value.get(_.value):t.src),E=L(()=>P.value&&T.value>1),R=ie({wheelDirection:0}),D=()=>{h.value=1,p.value=0,g.x=1,g.y=1,v(Ga),n("afterClose")},F=re=>{re?h.value+=.5:h.value++,v(Ga)},N=re=>{h.value>1&&(re?h.value-=.5:h.value--),v(Ga)},B=()=>{p.value+=90},z=()=>{p.value-=90},W=()=>{g.x=-g.x},j=()=>{g.y=-g.y},U=re=>{re.preventDefault(),re.stopPropagation(),I.value>0&&O(M.value[I.value-1])},V=re=>{re.preventDefault(),re.stopPropagation(),I.valueF(),type:"zoomIn"},{icon:s,onClick:()=>N(),type:"zoomOut",disabled:L(()=>h.value===1)},{icon:r,onClick:B,type:"rotateRight"},{icon:o,onClick:z,type:"rotateLeft"},{icon:d,onClick:W,type:"flipX"},{icon:f,onClick:j,type:"flipY"}],G=()=>{if(t.visible&&x.value){const re=y.value.offsetWidth*h.value,ne=y.value.offsetHeight*h.value,{left:le,top:he}=Rp(y.value),pe=p.value%180!==0;x.value=!1;const ge=cce(pe?ne:re,pe?re:ne,le,he);ge&&v(A({},ge))}},ee=re=>{re.button===0&&(re.preventDefault(),re.stopPropagation(),w.deltaX=re.pageX-m.x,w.deltaY=re.pageY-m.y,w.originX=m.x,w.originY=m.y,x.value=!0)},X=re=>{t.visible&&x.value&&v({x:re.pageX-w.deltaX,y:re.pageY-w.deltaY})},K=re=>{if(!t.visible)return;re.preventDefault();const ne=re.deltaY;R.value={wheelDirection:ne}},te=re=>{!t.visible||!E.value||(re.preventDefault(),re.keyCode===Te.LEFT?I.value>0&&O(M.value[I.value-1]):re.keyCode===Te.RIGHT&&I.value{t.visible&&(h.value!==1&&(h.value=1),(m.x!==Ga.x||m.y!==Ga.y)&&v(Ga))};let ae=()=>{};return Ze(()=>{ye([()=>t.visible,x],()=>{ae();let re,ne;const le=Gt(window,"mouseup",G,!1),he=Gt(window,"mousemove",X,!1),pe=Gt(window,"wheel",K,{passive:!1}),ge=Gt(window,"keydown",te,!1);try{window.top!==window.self&&(re=Gt(window.top,"mouseup",G,!1),ne=Gt(window.top,"mousemove",X,!1))}catch{}ae=()=>{le.remove(),he.remove(),pe.remove(),ge.remove(),re&&re.remove(),ne&&ne.remove()}},{flush:"post",immediate:!0}),ye([R],()=>{const{wheelDirection:re}=R.value;re>0?N(!0):re<0&&F(!0)})}),Xn(()=>{ae()}),()=>{const{visible:re,prefixCls:ne,rootClassName:le}=t;return C(n6,H(H({},i),{},{transitionName:t.transitionName,maskTransitionName:t.maskTransitionName,closable:!1,keyboard:!0,prefixCls:ne,onClose:b,afterClose:D,visible:re,wrapClassName:q,rootClassName:le,getContainer:t.getContainer}),{default:()=>[C("div",{class:[`${t.prefixCls}-operations-wrapper`,le]},[C("ul",{class:`${t.prefixCls}-operations`},[Q.map(he=>{let{icon:pe,onClick:ge,type:be,disabled:$e}=he;return C("li",{class:ce(Y,{[`${t.prefixCls}-operations-operation-disabled`]:$e&&($e==null?void 0:$e.value)}),onClick:ge,key:be},[On(pe,{class:J})])})])]),C("div",{class:`${t.prefixCls}-img-wrapper`,style:{transform:`translate3d(${m.x}px, ${m.y}px, 0)`}},[C("img",{onMousedown:ee,onDblclick:ue,ref:y,class:`${t.prefixCls}-img`,src:k.value,alt:t.alt,style:{transform:`scale3d(${g.x*h.value}, ${g.y*h.value}, 1) rotate(${p.value}deg)`}},null)]),E.value&&C("div",{class:ce(`${t.prefixCls}-switch-left`,{[`${t.prefixCls}-switch-left-disabled`]:I.value<=0}),onClick:U},[c]),E.value&&C("div",{class:ce(`${t.prefixCls}-switch-right`,{[`${t.prefixCls}-switch-right-disabled`]:I.value>=T.value-1}),onClick:V},[u])]})}}});var hce=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o({src:String,wrapperClassName:String,wrapperStyle:{type:Object,default:void 0},rootClassName:String,prefixCls:String,previewPrefixCls:String,width:[Number,String],height:[Number,String],previewMask:{type:[Boolean,Function],default:void 0},placeholder:Z.any,fallback:String,preview:{type:[Boolean,Object],default:!0},onClick:{type:Function},onError:{type:Function}}),a6=(t,e)=>{const n=A({},t);return Object.keys(e).forEach(i=>{t[i]===void 0&&(n[i]=e[i])}),n};let pce=0;const s6=oe({compatConfig:{MODE:3},name:"VcImage",inheritAttrs:!1,props:r6(),emits:["click","error"],setup(t,e){let{attrs:n,slots:i,emit:o}=e;const r=L(()=>t.prefixCls),a=L(()=>`${r.value}-preview`),s=L(()=>{const F={visible:void 0,onVisibleChange:()=>{},getContainer:void 0};return typeof t.preview=="object"?a6(t.preview,F):F}),l=L(()=>{var F;return(F=s.value.src)!==null&&F!==void 0?F:t.src}),c=L(()=>t.placeholder&&t.placeholder!==!0||i.placeholder),u=L(()=>s.value.visible),d=L(()=>s.value.getContainer),f=L(()=>u.value!==void 0),h=(F,N)=>{var B,z;(z=(B=s.value).onVisibleChange)===null||z===void 0||z.call(B,F,N)},[p,g]=jt(!!u.value,{value:u,onChange:h}),m=se(c.value?"loading":"normal");ye(()=>t.src,()=>{m.value=c.value?"loading":"normal"});const v=se(null),b=L(()=>m.value==="error"),y=iC.inject(),{isPreviewGroup:w,setCurrent:x,setShowPreview:$,setMousePosition:S,registerImage:_}=y,P=se(pce++),O=L(()=>t.preview&&!b.value),T=()=>{m.value="normal"},M=F=>{m.value="error",o("error",F)},I=F=>{if(!f.value){const{left:N,top:B}=Rp(F.target);w.value?(x(P.value),S({x:N,y:B})):v.value={x:N,y:B}}w.value?$(!0):g(!0),o("click",F)},k=()=>{g(!1),f.value||(v.value=null)},E=se(null);ye(()=>E,()=>{m.value==="loading"&&E.value.complete&&(E.value.naturalWidth||E.value.naturalHeight)&&T()});let R=()=>{};Ze(()=>{ye([l,O],()=>{if(R(),!w.value)return()=>{};R=_(P.value,l.value,O.value),O.value||R()},{flush:"post",immediate:!0})}),Xn(()=>{R()});const D=F=>aZ(F)?F+"px":F;return()=>{const{prefixCls:F,wrapperClassName:N,fallback:B,src:z,placeholder:W,wrapperStyle:j,rootClassName:U,width:V,height:q,crossorigin:Y,decoding:J,alt:Q,sizes:G,srcset:ee,usemap:X,class:K,style:te}=A(A({},t),n),ue=s.value,{icons:ae,maskClassName:re}=ue,ne=hce(ue,["icons","maskClassName"]),le=ce(F,N,U,{[`${F}-error`]:b.value}),he=b.value&&B?B:l.value,pe={crossorigin:Y,decoding:J,alt:Q,sizes:G,srcset:ee,usemap:X,width:V,height:q,class:ce(`${F}-img`,{[`${F}-img-placeholder`]:W===!0},K),style:A({height:D(q)},te)};return C(Qe,null,[C("div",{class:le,onClick:O.value?I:ge=>{o("click",ge)},style:A({width:D(V),height:D(q)},j)},[C("img",H(H(H({},pe),b.value&&B?{src:B}:{onLoad:T,onError:M,src:z}),{},{ref:E}),null),m.value==="loading"&&C("div",{"aria-hidden":"true",class:`${F}-placeholder`},[W||i.placeholder&&i.placeholder()]),i.previewMask&&O.value&&C("div",{class:[`${F}-mask`,re]},[i.previewMask()])]),!w.value&&O.value&&C(o6,H(H({},ne),{},{"aria-hidden":!p.value,visible:p.value,prefixCls:a.value,onClose:k,mousePosition:v.value,src:he,alt:Q,getContainer:d.value,icons:ae,rootClassName:U}),null)])}}});s6.PreviewGroup=i6;var gce={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z"}},{tag:"path",attrs:{d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z"}}]},name:"rotate-left",theme:"outlined"};function aT(t){for(var e=1;e{const{componentCls:e}=t;return[{[`${e}-root`]:{[`${e}${t.antCls}-zoom-enter, ${e}${t.antCls}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:t.motionDurationSlow,userSelect:"none"},[`${e}${t.antCls}-zoom-leave ${e}-content`]:{pointerEvents:"none"},[`${e}-mask`]:A(A({},dT("fixed")),{zIndex:t.zIndexPopupBase,height:"100%",backgroundColor:t.colorBgMask,[`${e}-hidden`]:{display:"none"}}),[`${e}-wrap`]:A(A({},dT("fixed")),{overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${e}-root`]:j1(t)}]},Ace=t=>{const{componentCls:e}=t;return[{[`${e}-root`]:{[`${e}-wrap`]:{zIndex:t.zIndexPopupBase,position:"fixed",inset:0,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"},[`${e}-wrap-rtl`]:{direction:"rtl"},[`${e}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[e]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${t.screenSMMax})`]:{[e]:{maxWidth:"calc(100vw - 16px)",margin:`${t.marginXS} auto`},[`${e}-centered`]:{[e]:{flex:1}}}}},{[e]:A(A({},rt(t)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${t.margin*2}px)`,margin:"0 auto",paddingBottom:t.paddingLG,[`${e}-title`]:{margin:0,color:t.modalHeadingColor,fontWeight:t.fontWeightStrong,fontSize:t.modalHeaderTitleFontSize,lineHeight:t.modalHeaderTitleLineHeight,wordWrap:"break-word"},[`${e}-content`]:{position:"relative",backgroundColor:t.modalContentBg,backgroundClip:"padding-box",border:0,borderRadius:t.borderRadiusLG,boxShadow:t.boxShadowSecondary,pointerEvents:"auto",padding:`${t.paddingMD}px ${t.paddingContentHorizontalLG}px`},[`${e}-close`]:A({position:"absolute",top:(t.modalHeaderCloseSize-t.modalCloseBtnSize)/2,insetInlineEnd:(t.modalHeaderCloseSize-t.modalCloseBtnSize)/2,zIndex:t.zIndexPopupBase+10,padding:0,color:t.modalCloseColor,fontWeight:t.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:t.borderRadiusSM,width:t.modalConfirmIconSize,height:t.modalConfirmIconSize,border:0,outline:0,cursor:"pointer",transition:`color ${t.motionDurationMid}, background-color ${t.motionDurationMid}`,"&-x":{display:"block",fontSize:t.fontSizeLG,fontStyle:"normal",lineHeight:`${t.modalCloseBtnSize}px`,textAlign:"center",textTransform:"none",textRendering:"auto"},"&:hover":{color:t.modalIconHoverColor,backgroundColor:t.wireframe?"transparent":t.colorFillContent,textDecoration:"none"},"&:active":{backgroundColor:t.wireframe?"transparent":t.colorFillContentHover}},Hr(t)),[`${e}-header`]:{color:t.colorText,background:t.modalHeaderBg,borderRadius:`${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`,marginBottom:t.marginXS},[`${e}-body`]:{fontSize:t.fontSize,lineHeight:t.lineHeight,wordWrap:"break-word"},[`${e}-footer`]:{textAlign:"end",background:t.modalFooterBg,marginTop:t.marginSM,[`${t.antCls}-btn + ${t.antCls}-btn:not(${t.antCls}-dropdown-trigger)`]:{marginBottom:0,marginInlineStart:t.marginXS}},[`${e}-open`]:{overflow:"hidden"}})},{[`${e}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${e}-content, ${e}-body, ${e}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${e}-confirm-body`]:{marginBottom:"auto"}}}]},_ce=t=>{const{componentCls:e}=t,n=`${e}-confirm`;return{[n]:{"&-rtl":{direction:"rtl"},[`${t.antCls}-modal-header`]:{display:"none"},[`${n}-body-wrapper`]:A({},Do()),[`${n}-body`]:{display:"flex",flexWrap:"wrap",alignItems:"center",[`${n}-title`]:{flex:"0 0 100%",display:"block",overflow:"hidden",color:t.colorTextHeading,fontWeight:t.fontWeightStrong,fontSize:t.modalHeaderTitleFontSize,lineHeight:t.modalHeaderTitleLineHeight,[`+ ${n}-content`]:{marginBlockStart:t.marginXS,flexBasis:"100%",maxWidth:`calc(100% - ${t.modalConfirmIconSize+t.marginSM}px)`}},[`${n}-content`]:{color:t.colorText,fontSize:t.fontSize},[`> ${t.iconCls}`]:{flex:"none",marginInlineEnd:t.marginSM,fontSize:t.modalConfirmIconSize,[`+ ${n}-title`]:{flex:1},[`+ ${n}-title + ${n}-content`]:{marginInlineStart:t.modalConfirmIconSize+t.marginSM}}},[`${n}-btns`]:{textAlign:"end",marginTop:t.marginSM,[`${t.antCls}-btn + ${t.antCls}-btn`]:{marginBottom:0,marginInlineStart:t.marginXS}}},[`${n}-error ${n}-body > ${t.iconCls}`]:{color:t.colorError},[`${n}-warning ${n}-body > ${t.iconCls}, - ${n}-confirm ${n}-body > ${t.iconCls}`]:{color:t.colorWarning},[`${n}-info ${n}-body > ${t.iconCls}`]:{color:t.colorInfo},[`${n}-success ${n}-body > ${t.iconCls}`]:{color:t.colorSuccess},[`${e}-zoom-leave ${e}-btns`]:{pointerEvents:"none"}}},Pce=t=>{const{componentCls:e}=t;return{[`${e}-root`]:{[`${e}-wrap-rtl`]:{direction:"rtl",[`${e}-confirm-body`]:{direction:"rtl"}}}}},Tce=t=>{const{componentCls:e,antCls:n}=t,i=`${e}-confirm`;return{[e]:{[`${e}-content`]:{padding:0},[`${e}-header`]:{padding:t.modalHeaderPadding,borderBottom:`${t.modalHeaderBorderWidth}px ${t.modalHeaderBorderStyle} ${t.modalHeaderBorderColorSplit}`,marginBottom:0},[`${e}-body`]:{padding:t.modalBodyPadding},[`${e}-footer`]:{padding:`${t.modalFooterPaddingVertical}px ${t.modalFooterPaddingHorizontal}px`,borderTop:`${t.modalFooterBorderWidth}px ${t.modalFooterBorderStyle} ${t.modalFooterBorderColorSplit}`,borderRadius:`0 0 ${t.borderRadiusLG}px ${t.borderRadiusLG}px`,marginTop:0}},[i]:{[`${n}-modal-body`]:{padding:`${t.padding*2}px ${t.padding*2}px ${t.paddingLG}px`},[`${i}-body`]:{[`> ${t.iconCls}`]:{marginInlineEnd:t.margin,[`+ ${i}-title + ${i}-content`]:{marginInlineStart:t.modalConfirmIconSize+t.margin}}},[`${i}-btns`]:{marginTop:t.marginLG}}}},Oce=et("Modal",t=>{const e=t.padding,n=t.fontSizeHeading5,i=t.lineHeightHeading5,o=Ve(t,{modalBodyPadding:t.paddingLG,modalHeaderBg:t.colorBgElevated,modalHeaderPadding:`${e}px ${t.paddingLG}px`,modalHeaderBorderWidth:t.lineWidth,modalHeaderBorderStyle:t.lineType,modalHeaderTitleLineHeight:i,modalHeaderTitleFontSize:n,modalHeaderBorderColorSplit:t.colorSplit,modalHeaderCloseSize:i*n+e*2,modalContentBg:t.colorBgElevated,modalHeadingColor:t.colorTextHeading,modalCloseColor:t.colorTextDescription,modalFooterBg:"transparent",modalFooterBorderColorSplit:t.colorSplit,modalFooterBorderStyle:t.lineType,modalFooterPaddingVertical:t.paddingXS,modalFooterPaddingHorizontal:t.padding,modalFooterBorderWidth:t.lineWidth,modalConfirmTitleFontSize:t.fontSizeLG,modalIconHoverColor:t.colorIconHover,modalConfirmIconSize:t.fontSize*t.lineHeight,modalCloseBtnSize:t.controlHeightLG*.55});return[Ace(o),_ce(o),Pce(o),l6(o),t.wireframe&&Tce(o),Oc(o,"zoom")]}),ox=t=>({position:t||"absolute",inset:0}),Ece=t=>{const{iconCls:e,motionDurationSlow:n,paddingXXS:i,marginXXS:o,prefixCls:r}=t;return{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",background:new Ot("#000").setAlpha(.5).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${n}`,[`.${r}-mask-info`]:A(A({},un),{padding:`0 ${i}px`,[e]:{marginInlineEnd:o,svg:{verticalAlign:"baseline"}}})}},Mce=t=>{const{previewCls:e,modalMaskBg:n,paddingSM:i,previewOperationColorDisabled:o,motionDurationSlow:r}=t,a=new Ot(n).setAlpha(.1),s=a.clone().setAlpha(.2);return{[`${e}-operations`]:A(A({},rt(t)),{display:"flex",flexDirection:"row-reverse",alignItems:"center",color:t.previewOperationColor,listStyle:"none",background:a.toRgbString(),pointerEvents:"auto","&-operation":{marginInlineStart:i,padding:i,cursor:"pointer",transition:`all ${r}`,userSelect:"none","&:hover":{background:s.toRgbString()},"&-disabled":{color:o,pointerEvents:"none"},"&:last-of-type":{marginInlineStart:0}},"&-progress":{position:"absolute",left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%)"},"&-icon":{fontSize:t.previewOperationSize}})}},Ice=t=>{const{modalMaskBg:e,iconCls:n,previewOperationColorDisabled:i,previewCls:o,zIndexPopup:r,motionDurationSlow:a}=t,s=new Ot(e).setAlpha(.1),l=s.clone().setAlpha(.2);return{[`${o}-switch-left, ${o}-switch-right`]:{position:"fixed",insetBlockStart:"50%",zIndex:r+1,display:"flex",alignItems:"center",justifyContent:"center",width:t.imagePreviewSwitchSize,height:t.imagePreviewSwitchSize,marginTop:-t.imagePreviewSwitchSize/2,color:t.previewOperationColor,background:s.toRgbString(),borderRadius:"50%",transform:"translateY(-50%)",cursor:"pointer",transition:`all ${a}`,pointerEvents:"auto",userSelect:"none","&:hover":{background:l.toRgbString()},"&-disabled":{"&, &:hover":{color:i,background:"transparent",cursor:"not-allowed",[`> ${n}`]:{cursor:"not-allowed"}}},[`> ${n}`]:{fontSize:t.previewOperationSize}},[`${o}-switch-left`]:{insetInlineStart:t.marginSM},[`${o}-switch-right`]:{insetInlineEnd:t.marginSM}}},kce=t=>{const{motionEaseOut:e,previewCls:n,motionDurationSlow:i,componentCls:o}=t;return[{[`${o}-preview-root`]:{[n]:{height:"100%",textAlign:"center",pointerEvents:"none"},[`${n}-body`]:A(A({},ox()),{overflow:"hidden"}),[`${n}-img`]:{maxWidth:"100%",maxHeight:"100%",verticalAlign:"middle",transform:"scale3d(1, 1, 1)",cursor:"grab",transition:`transform ${i} ${e} 0s`,userSelect:"none",pointerEvents:"auto","&-wrapper":A(A({},ox()),{transition:`transform ${i} ${e} 0s`,display:"flex",justifyContent:"center",alignItems:"center","&::before":{display:"inline-block",width:1,height:"50%",marginInlineEnd:-1,content:'""'}})},[`${n}-moving`]:{[`${n}-preview-img`]:{cursor:"grabbing","&-wrapper":{transitionDuration:"0s"}}}}},{[`${o}-preview-root`]:{[`${n}-wrap`]:{zIndex:t.zIndexPopup}}},{[`${o}-preview-operations-wrapper`]:{position:"fixed",insetBlockStart:0,insetInlineEnd:0,zIndex:t.zIndexPopup+1,width:"100%"},"&":[Mce(t),Ice(t)]}]},Dce=t=>{const{componentCls:e}=t;return{[e]:{position:"relative",display:"inline-block",[`${e}-img`]:{width:"100%",height:"auto",verticalAlign:"middle"},[`${e}-img-placeholder`]:{backgroundColor:t.colorBgContainerDisabled,backgroundImage:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"30%"},[`${e}-mask`]:A({},Ece(t)),[`${e}-mask:hover`]:{opacity:1},[`${e}-placeholder`]:A({},ox())}}},Rce=t=>{const{previewCls:e}=t;return{[`${e}-root`]:Oc(t,"zoom"),"&":j1(t,!0)}},c6=et("Image",t=>{const e=`${t.componentCls}-preview`,n=Ve(t,{previewCls:e,modalMaskBg:new Ot("#000").setAlpha(.45).toRgbString(),imagePreviewSwitchSize:t.controlHeightLG});return[Dce(n),kce(n),l6(Ve(n,{componentCls:e})),Rce(n)]},t=>({zIndexPopup:t.zIndexPopupBase+80,previewOperationColor:new Ot(t.colorTextLightSolid).toRgbString(),previewOperationColorDisabled:new Ot(t.colorTextLightSolid).setAlpha(.25).toRgbString(),previewOperationSize:t.fontSizeIcon*1.5})),u6={rotateLeft:C(oC,null,null),rotateRight:C(rC,null,null),zoomIn:C(aC,null,null),zoomOut:C(sC,null,null),close:C(ai,null,null),left:C(cr,null,null),right:C(qi,null,null),flipX:C(pg,null,null),flipY:C(pg,{rotate:90},null)},Lce=()=>({previewPrefixCls:String,preview:Rt()}),d6=oe({compatConfig:{MODE:3},name:"AImagePreviewGroup",inheritAttrs:!1,props:Lce(),setup(t,e){let{attrs:n,slots:i}=e;const{prefixCls:o,rootPrefixCls:r}=Me("image",t),a=L(()=>`${o.value}-preview`),[s,l]=c6(o),c=L(()=>{const{preview:u}=t;if(u===!1)return u;const d=typeof u=="object"?u:{};return A(A({},d),{rootClassName:l.value,transitionName:oi(r.value,"zoom",d.transitionName),maskTransitionName:oi(r.value,"fade",d.maskTransitionName)})});return()=>s(C(i6,H(H({},A(A({},n),t)),{},{preview:c.value,icons:u6,previewPrefixCls:a.value}),i))}}),ds=oe({name:"AImage",inheritAttrs:!1,props:r6(),setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,rootPrefixCls:r,configProvider:a}=Me("image",t),[s,l]=c6(o),c=L(()=>{const{preview:u}=t;if(u===!1)return u;const d=typeof u=="object"?u:{};return A(A({icons:u6},d),{transitionName:oi(r.value,"zoom",d.transitionName),maskTransitionName:oi(r.value,"fade",d.maskTransitionName)})});return()=>{var u,d;const f=((d=(u=a.locale)===null||u===void 0?void 0:u.value)===null||d===void 0?void 0:d.Image)||bi.Image,h=()=>C("div",{class:`${o.value}-mask-info`},[C(sf,null,null),f==null?void 0:f.preview]),{previewMask:p=n.previewMask||h}=t;return s(C(s6,H(H({},A(A(A({},i),t),{prefixCls:o.value})),{},{preview:c.value,rootClassName:ce(t.rootClassName,l.value)}),A(A({},n),{previewMask:typeof p=="function"?p:null})))}}});ds.PreviewGroup=d6;ds.install=function(t){return t.component(ds.name,ds),t.component(ds.PreviewGroup.name,ds.PreviewGroup),t};var Fce={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"};function fT(t){for(var e=1;eNumber.MAX_SAFE_INTEGER)return String(rx()?BigInt(t).toString():Number.MAX_SAFE_INTEGER);if(tNumber.MAX_SAFE_INTEGER)return new fs(Number.MAX_SAFE_INTEGER);if(i0&&arguments[0]!==void 0?arguments[0]:!0)?this.isInvalidate()?"":uC(this.number):this.origin}}class Fl{constructor(e){if(this.origin="",f6(e)){this.empty=!0;return}if(this.origin=String(e),e==="-"||Number.isNaN(e)){this.nan=!0;return}let n=e;if(cC(n)&&(n=Number(n)),n=typeof n=="string"?n:uC(n),dC(n)){const i=ju(n);this.negative=i.negative;const o=i.trimStr.split(".");this.integer=BigInt(o[0]);const r=o[1]||"0";this.decimal=BigInt(r),this.decimalLen=r.length}else this.nan=!0}getMark(){return this.negative?"-":""}getIntegerStr(){return this.integer.toString()}getDecimalStr(){return this.decimal.toString().padStart(this.decimalLen,"0")}alignDecimal(e){const n=`${this.getMark()}${this.getIntegerStr()}${this.getDecimalStr().padEnd(e,"0")}`;return BigInt(n)}negate(){const e=new Fl(this.toString());return e.negative=!e.negative,e}add(e){if(this.isInvalidate())return new Fl(e);const n=new Fl(e);if(n.isInvalidate())return this;const i=Math.max(this.getDecimalStr().length,n.getDecimalStr().length),o=this.alignDecimal(i),r=n.alignDecimal(i),a=(o+r).toString(),{negativeStr:s,trimStr:l}=ju(a),c=`${s}${l.padStart(i+1,"0")}`;return new Fl(`${c.slice(0,-i)}.${c.slice(-i)}`)}isEmpty(){return this.empty}isNaN(){return this.nan}isInvalidate(){return this.isEmpty()||this.isNaN()}equals(e){return this.toString()===(e==null?void 0:e.toString())}lessEquals(e){return this.add(e.negate().toString()).toNumber()<=0}toNumber(){return this.isNaN()?NaN:Number(this.toString())}toString(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0)?this.isInvalidate()?"":ju(`${this.getMark()}${this.getIntegerStr()}.${this.getDecimalStr()}`).fullStr:this.origin}}function Uo(t){return rx()?new Fl(t):new fs(t)}function ax(t,e,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(t==="")return"";const{negativeStr:o,integerStr:r,decimalStr:a}=ju(t),s=`${e}${a}`,l=`${o}${r}`;if(n>=0){const c=Number(a[n]);if(c>=5&&!i){const u=Uo(t).add(`${o}0.${"0".repeat(n)}${10-c}`);return ax(u.toString(),e,n,i)}return n===0?l:`${l}${e}${a.padEnd(n,"0").slice(0,n)}`}return s===".0"?l:`${l}${s}`}const Bce=200,zce=600,Hce=oe({compatConfig:{MODE:3},name:"StepHandler",inheritAttrs:!1,props:{prefixCls:String,upDisabled:Boolean,downDisabled:Boolean,onStep:ve()},slots:Object,setup(t,e){let{slots:n,emit:i}=e;const o=se(),r=(s,l)=>{s.preventDefault(),i("step",l);function c(){i("step",l),o.value=setTimeout(c,Bce)}o.value=setTimeout(c,zce)},a=()=>{clearTimeout(o.value)};return at(()=>{a()}),()=>{if(w1())return null;const{prefixCls:s,upDisabled:l,downDisabled:c}=t,u=`${s}-handler`,d=ce(u,`${u}-up`,{[`${u}-up-disabled`]:l}),f=ce(u,`${u}-down`,{[`${u}-down-disabled`]:c}),h={unselectable:"on",role:"button",onMouseup:a,onMouseleave:a},{upNode:p,downNode:g}=n;return C("div",{class:`${u}-wrap`},[C("span",H(H({},h),{},{onMousedown:m=>{r(m,!0)},"aria-label":"Increase Value","aria-disabled":l,class:d}),[(p==null?void 0:p())||C("span",{unselectable:"on",class:`${s}-handler-up-inner`},null)]),C("span",H(H({},h),{},{onMousedown:m=>{r(m,!1)},"aria-label":"Decrease Value","aria-disabled":c,class:f}),[(g==null?void 0:g())||C("span",{unselectable:"on",class:`${s}-handler-down-inner`},null)])])}}});function Wce(t,e){const n=se(null);function i(){try{const{selectionStart:r,selectionEnd:a,value:s}=t.value,l=s.substring(0,r),c=s.substring(a);n.value={start:r,end:a,value:s,beforeTxt:l,afterTxt:c}}catch{}}function o(){if(t.value&&n.value&&e.value)try{const{value:r}=t.value,{beforeTxt:a,afterTxt:s,start:l}=n.value;let c=r.length;if(r.endsWith(s))c=r.length-n.value.afterTxt.length;else if(r.startsWith(a))c=a.length;else{const u=a[l-1],d=r.indexOf(u,l-1);d!==-1&&(c=d+1)}t.value.setSelectionRange(c,c)}catch(r){`${r.message}`}}return[i,o]}const jce=()=>{const t=ie(0),e=()=>{lt.cancel(t.value)};return at(()=>{e()}),n=>{e(),t.value=lt(()=>{n()})}};var Vce=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);ot||e.isEmpty()?e.toString():e.toNumber(),pT=t=>{const e=Uo(t);return e.isInvalidate()?null:e},h6=()=>({stringMode:Ce(),defaultValue:Xe([String,Number]),value:Xe([String,Number]),prefixCls:Ne(),min:Xe([String,Number]),max:Xe([String,Number]),step:Xe([String,Number],1),tabindex:Number,controls:Ce(!0),readonly:Ce(),disabled:Ce(),autofocus:Ce(),keyboard:Ce(!0),parser:ve(),formatter:ve(),precision:Number,decimalSeparator:String,onInput:ve(),onChange:ve(),onPressEnter:ve(),onStep:ve(),onBlur:ve(),onFocus:ve()}),Xce=oe({compatConfig:{MODE:3},name:"InnerInputNumber",inheritAttrs:!1,props:A(A({},h6()),{lazy:Boolean}),slots:Object,setup(t,e){let{attrs:n,slots:i,emit:o,expose:r}=e;const a=ie(),s=ie(!1),l=ie(!1),c=ie(!1),u=ie(Uo(t.value));function d(W){t.value===void 0&&(u.value=W)}const f=(W,j)=>{if(!j)return t.precision>=0?t.precision:Math.max(Pd(W),Pd(t.step))},h=W=>{const j=String(W);if(t.parser)return t.parser(j);let U=j;return t.decimalSeparator&&(U=U.replace(t.decimalSeparator,".")),U.replace(/[^\w.-]+/g,"")},p=ie(""),g=(W,j)=>{if(t.formatter)return t.formatter(W,{userTyping:j,input:String(p.value)});let U=typeof W=="number"?uC(W):W;if(!j){const V=f(U,j);if(dC(U)&&(t.decimalSeparator||V>=0)){const q=t.decimalSeparator||".";U=ax(U,q,V)}}return U},m=(()=>{const W=t.value;return u.value.isInvalidate()&&["string","number"].includes(typeof W)?Number.isNaN(W)?"":W:g(u.value.toString(),!1)})();p.value=m;function v(W,j){p.value=g(W.isInvalidate()?W.toString(!1):W.toString(!j),j)}const b=L(()=>pT(t.max)),y=L(()=>pT(t.min)),w=L(()=>!b.value||!u.value||u.value.isInvalidate()?!1:b.value.lessEquals(u.value)),x=L(()=>!y.value||!u.value||u.value.isInvalidate()?!1:u.value.lessEquals(y.value)),[$,S]=Wce(a,s),_=W=>b.value&&!W.lessEquals(b.value)?b.value:y.value&&!y.value.lessEquals(W)?y.value:null,P=W=>!_(W),O=(W,j)=>{var U;let V=W,q=P(V)||V.isEmpty();if(!V.isEmpty()&&!j&&(V=_(V)||V,q=!0),!t.readonly&&!t.disabled&&q){const Y=V.toString(),J=f(Y,j);return J>=0&&(V=Uo(ax(Y,".",J))),V.equals(u.value)||(d(V),(U=t.onChange)===null||U===void 0||U.call(t,V.isEmpty()?null:hT(t.stringMode,V)),t.value===void 0&&v(V,j)),V}return u.value},T=jce(),M=W=>{var j;if($(),p.value=W,!c.value){const U=h(W),V=Uo(U);V.isNaN()||O(V,!0)}(j=t.onInput)===null||j===void 0||j.call(t,W),T(()=>{let U=W;t.parser||(U=W.replace(/。/g,".")),U!==W&&M(U)})},I=()=>{c.value=!0},k=()=>{c.value=!1,M(a.value.value)},E=W=>{M(W.target.value)},R=W=>{var j,U;if(W&&w.value||!W&&x.value)return;l.value=!1;let V=Uo(t.step);W||(V=V.negate());const q=(u.value||Uo(0)).add(V.toString()),Y=O(q,!1);(j=t.onStep)===null||j===void 0||j.call(t,hT(t.stringMode,Y),{offset:t.step,type:W?"up":"down"}),(U=a.value)===null||U===void 0||U.focus()},D=W=>{const j=Uo(h(p.value));let U=j;j.isNaN()?U=u.value:U=O(j,W),t.value!==void 0?v(u.value,!1):U.isNaN()||v(U,!1)},F=()=>{l.value=!0},N=W=>{var j;const{which:U}=W;l.value=!0,U===Te.ENTER&&(c.value||(l.value=!1),D(!1),(j=t.onPressEnter)===null||j===void 0||j.call(t,W)),t.keyboard!==!1&&!c.value&&[Te.UP,Te.DOWN].includes(U)&&(R(Te.UP===U),W.preventDefault())},B=()=>{l.value=!1},z=W=>{D(!1),s.value=!1,l.value=!1,o("blur",W)};return ye(()=>t.precision,()=>{u.value.isInvalidate()||v(u.value,!1)},{flush:"post"}),ye(()=>t.value,()=>{const W=Uo(t.value);u.value=W;const j=Uo(h(p.value));(!W.equals(j)||!l.value||t.formatter)&&v(W,l.value)},{flush:"post"}),ye(p,()=>{t.formatter&&S()},{flush:"post"}),ye(()=>t.disabled,W=>{W&&(s.value=!1)}),r({focus:()=>{var W;(W=a.value)===null||W===void 0||W.focus()},blur:()=>{var W;(W=a.value)===null||W===void 0||W.blur()}}),()=>{const W=A(A({},n),t),{prefixCls:j="rc-input-number",min:U,max:V,step:q=1,defaultValue:Y,value:J,disabled:Q,readonly:G,keyboard:ee,controls:X=!0,autofocus:K,stringMode:te,parser:ue,formatter:ae,precision:re,decimalSeparator:ne,onChange:le,onInput:he,onPressEnter:pe,onStep:ge,lazy:be,class:$e,style:fe}=W,de=Vce(W,["prefixCls","min","max","step","defaultValue","value","disabled","readonly","keyboard","controls","autofocus","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","lazy","class","style"]),{upHandler:xe,downHandler:_e}=i,Oe=`${j}-input`,Re={};return be?Re.onChange=E:Re.onInput=E,C("div",{class:ce(j,$e,{[`${j}-focused`]:s.value,[`${j}-disabled`]:Q,[`${j}-readonly`]:G,[`${j}-not-a-number`]:u.value.isNaN(),[`${j}-out-of-range`]:!u.value.isInvalidate()&&!P(u.value)}),style:fe,onKeydown:N,onKeyup:B},[X&&C(Hce,{prefixCls:j,upDisabled:w.value,downDisabled:x.value,onStep:R},{upNode:xe,downNode:_e}),C("div",{class:`${Oe}-wrap`},[C("input",H(H(H({autofocus:K,autocomplete:"off",role:"spinbutton","aria-valuemin":U,"aria-valuemax":V,"aria-valuenow":u.value.isInvalidate()?null:u.value.toString(),step:q},de),{},{ref:a,class:Oe,value:p.value,disabled:Q,readonly:G,onFocus:Se=>{s.value=!0,o("focus",Se)}},Re),{},{onBlur:z,onCompositionstart:I,onCompositionend:k,onBeforeinput:F}),null)])])}}});function Yb(t){return t!=null}const Yce=t=>{const{componentCls:e,lineWidth:n,lineType:i,colorBorder:o,borderRadius:r,fontSizeLG:a,controlHeightLG:s,controlHeightSM:l,colorError:c,inputPaddingHorizontalSM:u,colorTextDescription:d,motionDurationMid:f,colorPrimary:h,controlHeight:p,inputPaddingHorizontal:g,colorBgContainer:m,colorTextDisabled:v,borderRadiusSM:b,borderRadiusLG:y,controlWidth:w,handleVisible:x}=t;return[{[e]:A(A(A(A({},rt(t)),rl(t)),ef(t,e)),{display:"inline-block",width:w,margin:0,padding:0,border:`${n}px ${i} ${o}`,borderRadius:r,"&-rtl":{direction:"rtl",[`${e}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:a,borderRadius:y,[`input${e}-input`]:{height:s-2*n}},"&-sm":{padding:0,borderRadius:b,[`input${e}-input`]:{height:l-2*n,padding:`0 ${u}px`}},"&:hover":A({},kc(t)),"&-focused":A({},Ta(t)),"&-disabled":A(A({},TS(t)),{[`${e}-input`]:{cursor:"not-allowed"}}),"&-out-of-range":{input:{color:c}},"&-group":A(A(A({},rt(t)),v4(t)),{"&-wrapper":{display:"inline-block",textAlign:"start",verticalAlign:"top",[`${e}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${e}-group-addon`]:{borderRadius:y}},"&-sm":{[`${e}-group-addon`]:{borderRadius:b}}}}),[e]:{"&-input":A(A({width:"100%",height:p-2*n,padding:`0 ${g}px`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:r,outline:0,transition:`all ${f} linear`,appearance:"textfield",color:t.colorText,fontSize:"inherit",verticalAlign:"top"},PS(t.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[e]:{[`&:hover ${e}-handler-wrap, &-focused ${e}-handler-wrap`]:{opacity:1},[`${e}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:t.handleWidth,height:"100%",background:m,borderStartStartRadius:0,borderStartEndRadius:r,borderEndEndRadius:r,borderEndStartRadius:0,opacity:x===!0?1:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`opacity ${f} linear ${f}`,[`${e}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[` + ${n}-confirm ${n}-body > ${t.iconCls}`]:{color:t.colorWarning},[`${n}-info ${n}-body > ${t.iconCls}`]:{color:t.colorInfo},[`${n}-success ${n}-body > ${t.iconCls}`]:{color:t.colorSuccess},[`${e}-zoom-leave ${e}-btns`]:{pointerEvents:"none"}}},Pce=t=>{const{componentCls:e}=t;return{[`${e}-root`]:{[`${e}-wrap-rtl`]:{direction:"rtl",[`${e}-confirm-body`]:{direction:"rtl"}}}}},Tce=t=>{const{componentCls:e,antCls:n}=t,i=`${e}-confirm`;return{[e]:{[`${e}-content`]:{padding:0},[`${e}-header`]:{padding:t.modalHeaderPadding,borderBottom:`${t.modalHeaderBorderWidth}px ${t.modalHeaderBorderStyle} ${t.modalHeaderBorderColorSplit}`,marginBottom:0},[`${e}-body`]:{padding:t.modalBodyPadding},[`${e}-footer`]:{padding:`${t.modalFooterPaddingVertical}px ${t.modalFooterPaddingHorizontal}px`,borderTop:`${t.modalFooterBorderWidth}px ${t.modalFooterBorderStyle} ${t.modalFooterBorderColorSplit}`,borderRadius:`0 0 ${t.borderRadiusLG}px ${t.borderRadiusLG}px`,marginTop:0}},[i]:{[`${n}-modal-body`]:{padding:`${t.padding*2}px ${t.padding*2}px ${t.paddingLG}px`},[`${i}-body`]:{[`> ${t.iconCls}`]:{marginInlineEnd:t.margin,[`+ ${i}-title + ${i}-content`]:{marginInlineStart:t.modalConfirmIconSize+t.margin}}},[`${i}-btns`]:{marginTop:t.marginLG}}}},Oce=et("Modal",t=>{const e=t.padding,n=t.fontSizeHeading5,i=t.lineHeightHeading5,o=Ve(t,{modalBodyPadding:t.paddingLG,modalHeaderBg:t.colorBgElevated,modalHeaderPadding:`${e}px ${t.paddingLG}px`,modalHeaderBorderWidth:t.lineWidth,modalHeaderBorderStyle:t.lineType,modalHeaderTitleLineHeight:i,modalHeaderTitleFontSize:n,modalHeaderBorderColorSplit:t.colorSplit,modalHeaderCloseSize:i*n+e*2,modalContentBg:t.colorBgElevated,modalHeadingColor:t.colorTextHeading,modalCloseColor:t.colorTextDescription,modalFooterBg:"transparent",modalFooterBorderColorSplit:t.colorSplit,modalFooterBorderStyle:t.lineType,modalFooterPaddingVertical:t.paddingXS,modalFooterPaddingHorizontal:t.padding,modalFooterBorderWidth:t.lineWidth,modalConfirmTitleFontSize:t.fontSizeLG,modalIconHoverColor:t.colorIconHover,modalConfirmIconSize:t.fontSize*t.lineHeight,modalCloseBtnSize:t.controlHeightLG*.55});return[Ace(o),_ce(o),Pce(o),l6(o),t.wireframe&&Tce(o),Ec(o,"zoom")]}),ox=t=>({position:t||"absolute",inset:0}),Ece=t=>{const{iconCls:e,motionDurationSlow:n,paddingXXS:i,marginXXS:o,prefixCls:r}=t;return{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:"#fff",background:new Ot("#000").setAlpha(.5).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${n}`,[`.${r}-mask-info`]:A(A({},un),{padding:`0 ${i}px`,[e]:{marginInlineEnd:o,svg:{verticalAlign:"baseline"}}})}},Mce=t=>{const{previewCls:e,modalMaskBg:n,paddingSM:i,previewOperationColorDisabled:o,motionDurationSlow:r}=t,a=new Ot(n).setAlpha(.1),s=a.clone().setAlpha(.2);return{[`${e}-operations`]:A(A({},rt(t)),{display:"flex",flexDirection:"row-reverse",alignItems:"center",color:t.previewOperationColor,listStyle:"none",background:a.toRgbString(),pointerEvents:"auto","&-operation":{marginInlineStart:i,padding:i,cursor:"pointer",transition:`all ${r}`,userSelect:"none","&:hover":{background:s.toRgbString()},"&-disabled":{color:o,pointerEvents:"none"},"&:last-of-type":{marginInlineStart:0}},"&-progress":{position:"absolute",left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%)"},"&-icon":{fontSize:t.previewOperationSize}})}},Ice=t=>{const{modalMaskBg:e,iconCls:n,previewOperationColorDisabled:i,previewCls:o,zIndexPopup:r,motionDurationSlow:a}=t,s=new Ot(e).setAlpha(.1),l=s.clone().setAlpha(.2);return{[`${o}-switch-left, ${o}-switch-right`]:{position:"fixed",insetBlockStart:"50%",zIndex:r+1,display:"flex",alignItems:"center",justifyContent:"center",width:t.imagePreviewSwitchSize,height:t.imagePreviewSwitchSize,marginTop:-t.imagePreviewSwitchSize/2,color:t.previewOperationColor,background:s.toRgbString(),borderRadius:"50%",transform:"translateY(-50%)",cursor:"pointer",transition:`all ${a}`,pointerEvents:"auto",userSelect:"none","&:hover":{background:l.toRgbString()},"&-disabled":{"&, &:hover":{color:i,background:"transparent",cursor:"not-allowed",[`> ${n}`]:{cursor:"not-allowed"}}},[`> ${n}`]:{fontSize:t.previewOperationSize}},[`${o}-switch-left`]:{insetInlineStart:t.marginSM},[`${o}-switch-right`]:{insetInlineEnd:t.marginSM}}},kce=t=>{const{motionEaseOut:e,previewCls:n,motionDurationSlow:i,componentCls:o}=t;return[{[`${o}-preview-root`]:{[n]:{height:"100%",textAlign:"center",pointerEvents:"none"},[`${n}-body`]:A(A({},ox()),{overflow:"hidden"}),[`${n}-img`]:{maxWidth:"100%",maxHeight:"100%",verticalAlign:"middle",transform:"scale3d(1, 1, 1)",cursor:"grab",transition:`transform ${i} ${e} 0s`,userSelect:"none",pointerEvents:"auto","&-wrapper":A(A({},ox()),{transition:`transform ${i} ${e} 0s`,display:"flex",justifyContent:"center",alignItems:"center","&::before":{display:"inline-block",width:1,height:"50%",marginInlineEnd:-1,content:'""'}})},[`${n}-moving`]:{[`${n}-preview-img`]:{cursor:"grabbing","&-wrapper":{transitionDuration:"0s"}}}}},{[`${o}-preview-root`]:{[`${n}-wrap`]:{zIndex:t.zIndexPopup}}},{[`${o}-preview-operations-wrapper`]:{position:"fixed",insetBlockStart:0,insetInlineEnd:0,zIndex:t.zIndexPopup+1,width:"100%"},"&":[Mce(t),Ice(t)]}]},Dce=t=>{const{componentCls:e}=t;return{[e]:{position:"relative",display:"inline-block",[`${e}-img`]:{width:"100%",height:"auto",verticalAlign:"middle"},[`${e}-img-placeholder`]:{backgroundColor:t.colorBgContainerDisabled,backgroundImage:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"30%"},[`${e}-mask`]:A({},Ece(t)),[`${e}-mask:hover`]:{opacity:1},[`${e}-placeholder`]:A({},ox())}}},Rce=t=>{const{previewCls:e}=t;return{[`${e}-root`]:Ec(t,"zoom"),"&":j1(t,!0)}},c6=et("Image",t=>{const e=`${t.componentCls}-preview`,n=Ve(t,{previewCls:e,modalMaskBg:new Ot("#000").setAlpha(.45).toRgbString(),imagePreviewSwitchSize:t.controlHeightLG});return[Dce(n),kce(n),l6(Ve(n,{componentCls:e})),Rce(n)]},t=>({zIndexPopup:t.zIndexPopupBase+80,previewOperationColor:new Ot(t.colorTextLightSolid).toRgbString(),previewOperationColorDisabled:new Ot(t.colorTextLightSolid).setAlpha(.25).toRgbString(),previewOperationSize:t.fontSizeIcon*1.5})),u6={rotateLeft:C(oC,null,null),rotateRight:C(rC,null,null),zoomIn:C(aC,null,null),zoomOut:C(sC,null,null),close:C(ai,null,null),left:C(cr,null,null),right:C(qi,null,null),flipX:C(gg,null,null),flipY:C(gg,{rotate:90},null)},Lce=()=>({previewPrefixCls:String,preview:Rt()}),d6=oe({compatConfig:{MODE:3},name:"AImagePreviewGroup",inheritAttrs:!1,props:Lce(),setup(t,e){let{attrs:n,slots:i}=e;const{prefixCls:o,rootPrefixCls:r}=Me("image",t),a=L(()=>`${o.value}-preview`),[s,l]=c6(o),c=L(()=>{const{preview:u}=t;if(u===!1)return u;const d=typeof u=="object"?u:{};return A(A({},d),{rootClassName:l.value,transitionName:oi(r.value,"zoom",d.transitionName),maskTransitionName:oi(r.value,"fade",d.maskTransitionName)})});return()=>s(C(i6,H(H({},A(A({},n),t)),{},{preview:c.value,icons:u6,previewPrefixCls:a.value}),i))}}),ds=oe({name:"AImage",inheritAttrs:!1,props:r6(),setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,rootPrefixCls:r,configProvider:a}=Me("image",t),[s,l]=c6(o),c=L(()=>{const{preview:u}=t;if(u===!1)return u;const d=typeof u=="object"?u:{};return A(A({icons:u6},d),{transitionName:oi(r.value,"zoom",d.transitionName),maskTransitionName:oi(r.value,"fade",d.maskTransitionName)})});return()=>{var u,d;const f=((d=(u=a.locale)===null||u===void 0?void 0:u.value)===null||d===void 0?void 0:d.Image)||bi.Image,h=()=>C("div",{class:`${o.value}-mask-info`},[C(lf,null,null),f==null?void 0:f.preview]),{previewMask:p=n.previewMask||h}=t;return s(C(s6,H(H({},A(A(A({},i),t),{prefixCls:o.value})),{},{preview:c.value,rootClassName:ce(t.rootClassName,l.value)}),A(A({},n),{previewMask:typeof p=="function"?p:null})))}}});ds.PreviewGroup=d6;ds.install=function(t){return t.component(ds.name,ds),t.component(ds.PreviewGroup.name,ds.PreviewGroup),t};var Fce={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"};function fT(t){for(var e=1;eNumber.MAX_SAFE_INTEGER)return String(rx()?BigInt(t).toString():Number.MAX_SAFE_INTEGER);if(tNumber.MAX_SAFE_INTEGER)return new fs(Number.MAX_SAFE_INTEGER);if(i0&&arguments[0]!==void 0?arguments[0]:!0)?this.isInvalidate()?"":uC(this.number):this.origin}}class Fl{constructor(e){if(this.origin="",f6(e)){this.empty=!0;return}if(this.origin=String(e),e==="-"||Number.isNaN(e)){this.nan=!0;return}let n=e;if(cC(n)&&(n=Number(n)),n=typeof n=="string"?n:uC(n),dC(n)){const i=Vu(n);this.negative=i.negative;const o=i.trimStr.split(".");this.integer=BigInt(o[0]);const r=o[1]||"0";this.decimal=BigInt(r),this.decimalLen=r.length}else this.nan=!0}getMark(){return this.negative?"-":""}getIntegerStr(){return this.integer.toString()}getDecimalStr(){return this.decimal.toString().padStart(this.decimalLen,"0")}alignDecimal(e){const n=`${this.getMark()}${this.getIntegerStr()}${this.getDecimalStr().padEnd(e,"0")}`;return BigInt(n)}negate(){const e=new Fl(this.toString());return e.negative=!e.negative,e}add(e){if(this.isInvalidate())return new Fl(e);const n=new Fl(e);if(n.isInvalidate())return this;const i=Math.max(this.getDecimalStr().length,n.getDecimalStr().length),o=this.alignDecimal(i),r=n.alignDecimal(i),a=(o+r).toString(),{negativeStr:s,trimStr:l}=Vu(a),c=`${s}${l.padStart(i+1,"0")}`;return new Fl(`${c.slice(0,-i)}.${c.slice(-i)}`)}isEmpty(){return this.empty}isNaN(){return this.nan}isInvalidate(){return this.isEmpty()||this.isNaN()}equals(e){return this.toString()===(e==null?void 0:e.toString())}lessEquals(e){return this.add(e.negate().toString()).toNumber()<=0}toNumber(){return this.isNaN()?NaN:Number(this.toString())}toString(){return(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0)?this.isInvalidate()?"":Vu(`${this.getMark()}${this.getIntegerStr()}.${this.getDecimalStr()}`).fullStr:this.origin}}function Uo(t){return rx()?new Fl(t):new fs(t)}function ax(t,e,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(t==="")return"";const{negativeStr:o,integerStr:r,decimalStr:a}=Vu(t),s=`${e}${a}`,l=`${o}${r}`;if(n>=0){const c=Number(a[n]);if(c>=5&&!i){const u=Uo(t).add(`${o}0.${"0".repeat(n)}${10-c}`);return ax(u.toString(),e,n,i)}return n===0?l:`${l}${e}${a.padEnd(n,"0").slice(0,n)}`}return s===".0"?l:`${l}${s}`}const Bce=200,zce=600,Hce=oe({compatConfig:{MODE:3},name:"StepHandler",inheritAttrs:!1,props:{prefixCls:String,upDisabled:Boolean,downDisabled:Boolean,onStep:ve()},slots:Object,setup(t,e){let{slots:n,emit:i}=e;const o=se(),r=(s,l)=>{s.preventDefault(),i("step",l);function c(){i("step",l),o.value=setTimeout(c,Bce)}o.value=setTimeout(c,zce)},a=()=>{clearTimeout(o.value)};return at(()=>{a()}),()=>{if(w1())return null;const{prefixCls:s,upDisabled:l,downDisabled:c}=t,u=`${s}-handler`,d=ce(u,`${u}-up`,{[`${u}-up-disabled`]:l}),f=ce(u,`${u}-down`,{[`${u}-down-disabled`]:c}),h={unselectable:"on",role:"button",onMouseup:a,onMouseleave:a},{upNode:p,downNode:g}=n;return C("div",{class:`${u}-wrap`},[C("span",H(H({},h),{},{onMousedown:m=>{r(m,!0)},"aria-label":"Increase Value","aria-disabled":l,class:d}),[(p==null?void 0:p())||C("span",{unselectable:"on",class:`${s}-handler-up-inner`},null)]),C("span",H(H({},h),{},{onMousedown:m=>{r(m,!1)},"aria-label":"Decrease Value","aria-disabled":c,class:f}),[(g==null?void 0:g())||C("span",{unselectable:"on",class:`${s}-handler-down-inner`},null)])])}}});function Wce(t,e){const n=se(null);function i(){try{const{selectionStart:r,selectionEnd:a,value:s}=t.value,l=s.substring(0,r),c=s.substring(a);n.value={start:r,end:a,value:s,beforeTxt:l,afterTxt:c}}catch{}}function o(){if(t.value&&n.value&&e.value)try{const{value:r}=t.value,{beforeTxt:a,afterTxt:s,start:l}=n.value;let c=r.length;if(r.endsWith(s))c=r.length-n.value.afterTxt.length;else if(r.startsWith(a))c=a.length;else{const u=a[l-1],d=r.indexOf(u,l-1);d!==-1&&(c=d+1)}t.value.setSelectionRange(c,c)}catch(r){`${r.message}`}}return[i,o]}const jce=()=>{const t=ie(0),e=()=>{lt.cancel(t.value)};return at(()=>{e()}),n=>{e(),t.value=lt(()=>{n()})}};var Vce=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);ot||e.isEmpty()?e.toString():e.toNumber(),pT=t=>{const e=Uo(t);return e.isInvalidate()?null:e},h6=()=>({stringMode:Ce(),defaultValue:Xe([String,Number]),value:Xe([String,Number]),prefixCls:Ne(),min:Xe([String,Number]),max:Xe([String,Number]),step:Xe([String,Number],1),tabindex:Number,controls:Ce(!0),readonly:Ce(),disabled:Ce(),autofocus:Ce(),keyboard:Ce(!0),parser:ve(),formatter:ve(),precision:Number,decimalSeparator:String,onInput:ve(),onChange:ve(),onPressEnter:ve(),onStep:ve(),onBlur:ve(),onFocus:ve()}),Xce=oe({compatConfig:{MODE:3},name:"InnerInputNumber",inheritAttrs:!1,props:A(A({},h6()),{lazy:Boolean}),slots:Object,setup(t,e){let{attrs:n,slots:i,emit:o,expose:r}=e;const a=ie(),s=ie(!1),l=ie(!1),c=ie(!1),u=ie(Uo(t.value));function d(W){t.value===void 0&&(u.value=W)}const f=(W,j)=>{if(!j)return t.precision>=0?t.precision:Math.max(Td(W),Td(t.step))},h=W=>{const j=String(W);if(t.parser)return t.parser(j);let U=j;return t.decimalSeparator&&(U=U.replace(t.decimalSeparator,".")),U.replace(/[^\w.-]+/g,"")},p=ie(""),g=(W,j)=>{if(t.formatter)return t.formatter(W,{userTyping:j,input:String(p.value)});let U=typeof W=="number"?uC(W):W;if(!j){const V=f(U,j);if(dC(U)&&(t.decimalSeparator||V>=0)){const q=t.decimalSeparator||".";U=ax(U,q,V)}}return U},m=(()=>{const W=t.value;return u.value.isInvalidate()&&["string","number"].includes(typeof W)?Number.isNaN(W)?"":W:g(u.value.toString(),!1)})();p.value=m;function v(W,j){p.value=g(W.isInvalidate()?W.toString(!1):W.toString(!j),j)}const b=L(()=>pT(t.max)),y=L(()=>pT(t.min)),w=L(()=>!b.value||!u.value||u.value.isInvalidate()?!1:b.value.lessEquals(u.value)),x=L(()=>!y.value||!u.value||u.value.isInvalidate()?!1:u.value.lessEquals(y.value)),[$,S]=Wce(a,s),_=W=>b.value&&!W.lessEquals(b.value)?b.value:y.value&&!y.value.lessEquals(W)?y.value:null,P=W=>!_(W),O=(W,j)=>{var U;let V=W,q=P(V)||V.isEmpty();if(!V.isEmpty()&&!j&&(V=_(V)||V,q=!0),!t.readonly&&!t.disabled&&q){const Y=V.toString(),J=f(Y,j);return J>=0&&(V=Uo(ax(Y,".",J))),V.equals(u.value)||(d(V),(U=t.onChange)===null||U===void 0||U.call(t,V.isEmpty()?null:hT(t.stringMode,V)),t.value===void 0&&v(V,j)),V}return u.value},T=jce(),M=W=>{var j;if($(),p.value=W,!c.value){const U=h(W),V=Uo(U);V.isNaN()||O(V,!0)}(j=t.onInput)===null||j===void 0||j.call(t,W),T(()=>{let U=W;t.parser||(U=W.replace(/。/g,".")),U!==W&&M(U)})},I=()=>{c.value=!0},k=()=>{c.value=!1,M(a.value.value)},E=W=>{M(W.target.value)},R=W=>{var j,U;if(W&&w.value||!W&&x.value)return;l.value=!1;let V=Uo(t.step);W||(V=V.negate());const q=(u.value||Uo(0)).add(V.toString()),Y=O(q,!1);(j=t.onStep)===null||j===void 0||j.call(t,hT(t.stringMode,Y),{offset:t.step,type:W?"up":"down"}),(U=a.value)===null||U===void 0||U.focus()},D=W=>{const j=Uo(h(p.value));let U=j;j.isNaN()?U=u.value:U=O(j,W),t.value!==void 0?v(u.value,!1):U.isNaN()||v(U,!1)},F=()=>{l.value=!0},N=W=>{var j;const{which:U}=W;l.value=!0,U===Te.ENTER&&(c.value||(l.value=!1),D(!1),(j=t.onPressEnter)===null||j===void 0||j.call(t,W)),t.keyboard!==!1&&!c.value&&[Te.UP,Te.DOWN].includes(U)&&(R(Te.UP===U),W.preventDefault())},B=()=>{l.value=!1},z=W=>{D(!1),s.value=!1,l.value=!1,o("blur",W)};return ye(()=>t.precision,()=>{u.value.isInvalidate()||v(u.value,!1)},{flush:"post"}),ye(()=>t.value,()=>{const W=Uo(t.value);u.value=W;const j=Uo(h(p.value));(!W.equals(j)||!l.value||t.formatter)&&v(W,l.value)},{flush:"post"}),ye(p,()=>{t.formatter&&S()},{flush:"post"}),ye(()=>t.disabled,W=>{W&&(s.value=!1)}),r({focus:()=>{var W;(W=a.value)===null||W===void 0||W.focus()},blur:()=>{var W;(W=a.value)===null||W===void 0||W.blur()}}),()=>{const W=A(A({},n),t),{prefixCls:j="rc-input-number",min:U,max:V,step:q=1,defaultValue:Y,value:J,disabled:Q,readonly:G,keyboard:ee,controls:X=!0,autofocus:K,stringMode:te,parser:ue,formatter:ae,precision:re,decimalSeparator:ne,onChange:le,onInput:he,onPressEnter:pe,onStep:ge,lazy:be,class:$e,style:fe}=W,de=Vce(W,["prefixCls","min","max","step","defaultValue","value","disabled","readonly","keyboard","controls","autofocus","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","lazy","class","style"]),{upHandler:xe,downHandler:_e}=i,Oe=`${j}-input`,Re={};return be?Re.onChange=E:Re.onInput=E,C("div",{class:ce(j,$e,{[`${j}-focused`]:s.value,[`${j}-disabled`]:Q,[`${j}-readonly`]:G,[`${j}-not-a-number`]:u.value.isNaN(),[`${j}-out-of-range`]:!u.value.isInvalidate()&&!P(u.value)}),style:fe,onKeydown:N,onKeyup:B},[X&&C(Hce,{prefixCls:j,upDisabled:w.value,downDisabled:x.value,onStep:R},{upNode:xe,downNode:_e}),C("div",{class:`${Oe}-wrap`},[C("input",H(H(H({autofocus:K,autocomplete:"off",role:"spinbutton","aria-valuemin":U,"aria-valuemax":V,"aria-valuenow":u.value.isInvalidate()?null:u.value.toString(),step:q},de),{},{ref:a,class:Oe,value:p.value,disabled:Q,readonly:G,onFocus:Se=>{s.value=!0,o("focus",Se)}},Re),{},{onBlur:z,onCompositionstart:I,onCompositionend:k,onBeforeinput:F}),null)])])}}});function Yb(t){return t!=null}const Yce=t=>{const{componentCls:e,lineWidth:n,lineType:i,colorBorder:o,borderRadius:r,fontSizeLG:a,controlHeightLG:s,controlHeightSM:l,colorError:c,inputPaddingHorizontalSM:u,colorTextDescription:d,motionDurationMid:f,colorPrimary:h,controlHeight:p,inputPaddingHorizontal:g,colorBgContainer:m,colorTextDisabled:v,borderRadiusSM:b,borderRadiusLG:y,controlWidth:w,handleVisible:x}=t;return[{[e]:A(A(A(A({},rt(t)),rl(t)),tf(t,e)),{display:"inline-block",width:w,margin:0,padding:0,border:`${n}px ${i} ${o}`,borderRadius:r,"&-rtl":{direction:"rtl",[`${e}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:a,borderRadius:y,[`input${e}-input`]:{height:s-2*n}},"&-sm":{padding:0,borderRadius:b,[`input${e}-input`]:{height:l-2*n,padding:`0 ${u}px`}},"&:hover":A({},Dc(t)),"&-focused":A({},Ta(t)),"&-disabled":A(A({},TS(t)),{[`${e}-input`]:{cursor:"not-allowed"}}),"&-out-of-range":{input:{color:c}},"&-group":A(A(A({},rt(t)),v4(t)),{"&-wrapper":{display:"inline-block",textAlign:"start",verticalAlign:"top",[`${e}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${e}-group-addon`]:{borderRadius:y}},"&-sm":{[`${e}-group-addon`]:{borderRadius:b}}}}),[e]:{"&-input":A(A({width:"100%",height:p-2*n,padding:`0 ${g}px`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:r,outline:0,transition:`all ${f} linear`,appearance:"textfield",color:t.colorText,fontSize:"inherit",verticalAlign:"top"},PS(t.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[e]:{[`&:hover ${e}-handler-wrap, &-focused ${e}-handler-wrap`]:{opacity:1},[`${e}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:t.handleWidth,height:"100%",background:m,borderStartStartRadius:0,borderStartEndRadius:r,borderEndEndRadius:r,borderEndStartRadius:0,opacity:x===!0?1:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`opacity ${f} linear ${f}`,[`${e}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[` ${e}-handler-up-inner, ${e}-handler-down-inner `]:{marginInlineEnd:0,fontSize:t.handleFontSize}}},[`${e}-handler`]:{height:"50%",overflow:"hidden",color:d,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${n}px ${i} ${o}`,transition:`all ${f} linear`,"&:active":{background:t.colorFillAlter},"&:hover":{height:"60%",[` @@ -375,7 +375,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `]:{cursor:"not-allowed"},[` ${e}-handler-up-disabled:hover &-handler-up-inner, ${e}-handler-down-disabled:hover &-handler-down-inner - `]:{color:v}}},{[`${e}-borderless`]:{borderColor:"transparent",boxShadow:"none",[`${e}-handler-down`]:{borderBlockStartWidth:0}}}]},Gce=t=>{const{componentCls:e,inputPaddingHorizontal:n,inputAffixPadding:i,controlWidth:o,borderRadiusLG:r,borderRadiusSM:a}=t;return{[`${e}-affix-wrapper`]:A(A(A({},rl(t)),ef(t,`${e}-affix-wrapper`)),{position:"relative",display:"inline-flex",width:o,padding:0,paddingInlineStart:n,"&-lg":{borderRadius:r},"&-sm":{borderRadius:a},[`&:not(${e}-affix-wrapper-disabled):hover`]:A(A({},kc(t)),{zIndex:1}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${e}[disabled]`]:{background:"transparent"}},[`> div${e}`]:{width:"100%",border:"none",outline:"none",[`&${e}-focused`]:{boxShadow:"none !important"}},[`input${e}-input`]:{padding:0},"&::before":{width:0,visibility:"hidden",content:'"\\a0"'},[`${e}-handler-wrap`]:{zIndex:2},[e]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:i},"&-suffix":{position:"absolute",insetBlockStart:0,insetInlineEnd:0,zIndex:1,height:"100%",marginInlineEnd:n,marginInlineStart:i}}})}},Kce=et("InputNumber",t=>{const e=al(t);return[Yce(e),Gce(e),Ec(e)]},t=>({controlWidth:90,handleWidth:t.controlHeightSM-t.lineWidth*2,handleFontSize:t.fontSize/2,handleVisible:"auto"}));var Uce=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);oA(A({},gT),{size:Ne(),bordered:Ce(!0),placeholder:String,name:String,id:String,type:String,addonBefore:Z.any,addonAfter:Z.any,prefix:Z.any,"onUpdate:value":gT.onChange,valueModifiers:Object,status:Ne()}),Gb=oe({compatConfig:{MODE:3},name:"AInputNumber",inheritAttrs:!1,props:qce(),slots:Object,setup(t,e){let{emit:n,expose:i,attrs:o,slots:r}=e;var a;const s=vn(),l=Mn.useInject(),c=L(()=>zo(l.status,t.status)),{prefixCls:u,size:d,direction:f,disabled:h}=Me("input-number",t),{compactSize:p,compactItemClassnames:g}=Ra(u,f),m=Oi(),v=L(()=>{var I;return(I=h.value)!==null&&I!==void 0?I:m.value}),[b,y]=Kce(u),w=L(()=>p.value||d.value),x=ie((a=t.value)!==null&&a!==void 0?a:t.defaultValue),$=ie(!1);ye(()=>t.value,()=>{x.value=t.value});const S=ie(null),_=()=>{var I;(I=S.value)===null||I===void 0||I.focus()};i({focus:_,blur:()=>{var I;(I=S.value)===null||I===void 0||I.blur()}});const O=I=>{t.value===void 0&&(x.value=I),n("update:value",I),n("change",I),s.onFieldChange()},T=I=>{$.value=!1,n("blur",I),s.onFieldBlur()},M=I=>{$.value=!0,n("focus",I)};return()=>{var I,k,E,R;const{hasFeedback:D,isFormItemInput:F,feedbackIcon:N}=l,B=(I=t.id)!==null&&I!==void 0?I:s.id.value,z=A(A(A({},o),t),{id:B,disabled:v.value}),{class:W,bordered:j,readonly:U,style:V,addonBefore:q=(k=r.addonBefore)===null||k===void 0?void 0:k.call(r),addonAfter:Y=(E=r.addonAfter)===null||E===void 0?void 0:E.call(r),prefix:J=(R=r.prefix)===null||R===void 0?void 0:R.call(r),valueModifiers:Q={}}=z,G=Uce(z,["class","bordered","readonly","style","addonBefore","addonAfter","prefix","valueModifiers"]),ee=u.value,X=ce({[`${ee}-lg`]:w.value==="large",[`${ee}-sm`]:w.value==="small",[`${ee}-rtl`]:f.value==="rtl",[`${ee}-readonly`]:U,[`${ee}-borderless`]:!j,[`${ee}-in-form-item`]:F},ei(ee,c.value),W,g.value,y.value);let K=C(Xce,H(H({},ht(G,["size","defaultValue"])),{},{ref:S,lazy:!!Q.lazy,value:x.value,class:X,prefixCls:ee,readonly:U,onChange:O,onBlur:T,onFocus:M}),{upHandler:r.upIcon?()=>C("span",{class:`${ee}-handler-up-inner`},[r.upIcon()]):()=>C(lC,{class:`${ee}-handler-up-inner`},null),downHandler:r.downIcon?()=>C("span",{class:`${ee}-handler-down-inner`},[r.downIcon()]):()=>C(nl,{class:`${ee}-handler-down-inner`},null)});const te=Yb(q)||Yb(Y),ue=Yb(J);if(ue||D){const ae=ce(`${ee}-affix-wrapper`,ei(`${ee}-affix-wrapper`,c.value,D),{[`${ee}-affix-wrapper-focused`]:$.value,[`${ee}-affix-wrapper-disabled`]:v.value,[`${ee}-affix-wrapper-sm`]:w.value==="small",[`${ee}-affix-wrapper-lg`]:w.value==="large",[`${ee}-affix-wrapper-rtl`]:f.value==="rtl",[`${ee}-affix-wrapper-readonly`]:U,[`${ee}-affix-wrapper-borderless`]:!j,[`${W}`]:!te&&W},y.value);K=C("div",{class:ae,style:V,onClick:_},[ue&&C("span",{class:`${ee}-prefix`},[J]),K,D&&C("span",{class:`${ee}-suffix`},[N])])}if(te){const ae=`${ee}-group`,re=`${ae}-addon`,ne=q?C("div",{class:re},[q]):null,le=Y?C("div",{class:re},[Y]):null,he=ce(`${ee}-wrapper`,ae,{[`${ae}-rtl`]:f.value==="rtl"},y.value),pe=ce(`${ee}-group-wrapper`,{[`${ee}-group-wrapper-sm`]:w.value==="small",[`${ee}-group-wrapper-lg`]:w.value==="large",[`${ee}-group-wrapper-rtl`]:f.value==="rtl"},ei(`${u}-group-wrapper`,c.value,D),W,y.value);K=C("div",{class:pe,style:V},[C("div",{class:he},[ne&&C(bd,null,{default:()=>[C(Bp,null,{default:()=>[ne]})]}),K,le&&C(bd,null,{default:()=>[C(Bp,null,{default:()=>[le]})]})])])}return b(At(K,{style:V}))}}}),Zce=A(Gb,{install:t=>(t.component(Gb.name,Gb),t)}),Jce=t=>{const{componentCls:e,colorBgContainer:n,colorBgBody:i,colorText:o}=t;return{[`${e}-sider-light`]:{background:n,[`${e}-sider-trigger`]:{color:o,background:n},[`${e}-sider-zero-width-trigger`]:{color:o,background:n,border:`1px solid ${i}`,borderInlineStart:0}}}},Qce=t=>{const{antCls:e,componentCls:n,colorText:i,colorTextLightSolid:o,colorBgHeader:r,colorBgBody:a,colorBgTrigger:s,layoutHeaderHeight:l,layoutHeaderPaddingInline:c,layoutHeaderColor:u,layoutFooterPadding:d,layoutTriggerHeight:f,layoutZeroTriggerSize:h,motionDurationMid:p,motionDurationSlow:g,fontSize:m,borderRadius:v}=t;return{[n]:A(A({display:"flex",flex:"auto",flexDirection:"column",color:i,minHeight:0,background:a,"&, *":{boxSizing:"border-box"},[`&${n}-has-sider`]:{flexDirection:"row",[`> ${n}, > ${n}-content`]:{width:0}},[`${n}-header, &${n}-footer`]:{flex:"0 0 auto"},[`${n}-header`]:{height:l,paddingInline:c,color:u,lineHeight:`${l}px`,background:r,[`${e}-menu`]:{lineHeight:"inherit"}},[`${n}-footer`]:{padding:d,color:i,fontSize:m,background:a},[`${n}-content`]:{flex:"auto",minHeight:0},[`${n}-sider`]:{position:"relative",minWidth:0,background:r,transition:`all ${p}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${e}-menu${e}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:f},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:f,color:o,lineHeight:`${f}px`,textAlign:"center",background:s,cursor:"pointer",transition:`all ${p}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:l,insetInlineEnd:-h,zIndex:1,width:h,height:h,color:o,fontSize:t.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:r,borderStartStartRadius:0,borderStartEndRadius:v,borderEndEndRadius:v,borderEndStartRadius:0,cursor:"pointer",transition:`background ${g} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${g}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-h,borderStartStartRadius:v,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:v}}}}},Jce(t)),{"&-rtl":{direction:"rtl"}})}},eue=et("Layout",t=>{const{colorText:e,controlHeightSM:n,controlHeight:i,controlHeightLG:o,marginXXS:r}=t,a=o*1.25,s=Ve(t,{layoutHeaderHeight:i*2,layoutHeaderPaddingInline:a,layoutHeaderColor:e,layoutFooterPadding:`${n}px ${a}px`,layoutTriggerHeight:o+r*2,layoutZeroTriggerSize:o});return[Qce(s)]},t=>{const{colorBgLayout:e}=t;return{colorBgHeader:"#001529",colorBgBody:e,colorBgTrigger:"#002140"}}),fC=()=>({prefixCls:String,hasSider:{type:Boolean,default:void 0},tagName:String});function av(t){let{suffixCls:e,tagName:n,name:i}=t;return o=>oe({compatConfig:{MODE:3},name:i,props:fC(),setup(a,s){let{slots:l}=s;const{prefixCls:c}=Me(e,a);return()=>{const u=A(A({},a),{prefixCls:c.value,tagName:n});return C(o,u,l)}}})}const hC=oe({compatConfig:{MODE:3},props:fC(),setup(t,e){let{slots:n}=e;return()=>C(t.tagName,{class:t.prefixCls},n)}}),tue=oe({compatConfig:{MODE:3},inheritAttrs:!1,props:fC(),setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,direction:r}=Me("",t),[a,s]=eue(o),l=se([]);ot(P3,{addSider:d=>{l.value=[...l.value,d]},removeSider:d=>{l.value=l.value.filter(f=>f!==d)}});const u=L(()=>{const{prefixCls:d,hasSider:f}=t;return{[s.value]:!0,[`${d}`]:!0,[`${d}-has-sider`]:typeof f=="boolean"?f:l.value.length>0,[`${d}-rtl`]:r.value==="rtl"}});return()=>{const{tagName:d}=t;return a(C(d,A(A({},i),{class:[u.value,i.class]}),n))}}}),Kb=av({suffixCls:"layout",tagName:"section",name:"ALayout"})(tue),Fh=av({suffixCls:"layout-header",tagName:"header",name:"ALayoutHeader"})(hC),Nh=av({suffixCls:"layout-footer",tagName:"footer",name:"ALayoutFooter"})(hC),Bh=av({suffixCls:"layout-content",tagName:"main",name:"ALayoutContent"})(hC);var nue={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"};function mT(t){for(var e=1;e({prefixCls:String,collapsible:{type:Boolean,default:void 0},collapsed:{type:Boolean,default:void 0},defaultCollapsed:{type:Boolean,default:void 0},reverseArrow:{type:Boolean,default:void 0},zeroWidthTriggerStyle:{type:Object,default:void 0},trigger:Z.any,width:Z.oneOfType([Z.number,Z.string]),collapsedWidth:Z.oneOfType([Z.number,Z.string]),breakpoint:Z.oneOf(Wn("xs","sm","md","lg","xl","xxl","xxxl")),theme:Z.oneOf(Wn("light","dark")).def("dark"),onBreakpoint:Function,onCollapse:Function}),rue=(()=>{let t=0;return function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return t+=1,`${e}${t}`}})(),zh=oe({compatConfig:{MODE:3},name:"ALayoutSider",inheritAttrs:!1,props:ct(oue(),{collapsible:!1,defaultCollapsed:!1,reverseArrow:!1,width:200,collapsedWidth:80}),emits:["breakpoint","update:collapsed","collapse"],setup(t,e){let{emit:n,attrs:i,slots:o}=e;const{prefixCls:r}=Me("layout-sider",t),a=qe(P3,void 0),s=ie(!!(t.collapsed!==void 0?t.collapsed:t.defaultCollapsed)),l=ie(!1);ye(()=>t.collapsed,()=>{s.value=!!t.collapsed}),ot(_3,s);const c=(g,m)=>{t.collapsed===void 0&&(s.value=g),n("update:collapsed",g),n("collapse",g,m)},u=ie(g=>{l.value=g.matches,n("breakpoint",g.matches),s.value!==g.matches&&c(g.matches,"responsive")});let d;function f(g){return u.value(g)}const h=rue("ant-sider-");a&&a.addSider(h),Ze(()=>{ye(()=>t.breakpoint,()=>{try{d==null||d.removeEventListener("change",f)}catch{d==null||d.removeListener(f)}if(typeof window<"u"){const{matchMedia:g}=window;if(g&&t.breakpoint&&t.breakpoint in vT){d=g(`(max-width: ${vT[t.breakpoint]})`);try{d.addEventListener("change",f)}catch{d.addListener(f)}f(d)}}},{immediate:!0})}),at(()=>{try{d==null||d.removeEventListener("change",f)}catch{d==null||d.removeListener(f)}a&&a.removeSider(h)});const p=()=>{c(!s.value,"clickTrigger")};return()=>{var g,m;const v=r.value,{collapsedWidth:b,width:y,reverseArrow:w,zeroWidthTriggerStyle:x,trigger:$=(g=o.trigger)===null||g===void 0?void 0:g.call(o),collapsible:S,theme:_}=t,P=s.value?b:y,O=Xp(P)?`${P}px`:String(P),T=parseFloat(String(b||0))===0?C("span",{onClick:p,class:ce(`${v}-zero-width-trigger`,`${v}-zero-width-trigger-${w?"right":"left"}`),style:x},[$||C(pC,null,null)]):null,M={expanded:C(w?qi:cr,null,null),collapsed:C(w?cr:qi,null,null)},I=s.value?"collapsed":"expanded",k=M[I],E=$!==null?T||C("div",{class:`${v}-trigger`,onClick:p,style:{width:O}},[$||k]):null,R=[i.style,{flex:`0 0 ${O}`,maxWidth:O,minWidth:O,width:O}],D=ce(v,`${v}-${_}`,{[`${v}-collapsed`]:!!s.value,[`${v}-has-trigger`]:S&&$!==null&&!T,[`${v}-below`]:!!l.value,[`${v}-zero-width`]:parseFloat(O)===0},i.class);return C("aside",H(H({},i),{},{class:D,style:R}),[C("div",{class:`${v}-children`},[(m=o.default)===null||m===void 0?void 0:m.call(o)]),S||l.value&&T?E:null])}}}),aue=Fh,sue=Nh,lue=zh,cue=Bh,uue=A(Kb,{Header:Fh,Footer:Nh,Content:Bh,Sider:zh,install:t=>(t.component(Kb.name,Kb),t.component(Fh.name,Fh),t.component(Nh.name,Nh),t.component(zh.name,zh),t.component(Bh.name,Bh),t)});function due(t,e,n){var i=n||{},o=i.noTrailing,r=o===void 0?!1:o,a=i.noLeading,s=a===void 0?!1:a,l=i.debounceMode,c=l===void 0?void 0:l,u,d=!1,f=0;function h(){u&&clearTimeout(u)}function p(m){var v=m||{},b=v.upcomingOnly,y=b===void 0?!1:b;h(),d=!y}function g(){for(var m=arguments.length,v=new Array(m),b=0;bt?s?(f=Date.now(),r||(u=setTimeout(c?$:x,t))):x():r!==!0&&(u=setTimeout(c?$:x,c===void 0?t-w:t))}return g.cancel=p,g}function fue(t,e,n){var i={},o=i.atBegin,r=o===void 0?!1:o;return due(t,e,{debounceMode:r!==!1})}const hue=new mt("antSpinMove",{to:{opacity:1}}),pue=new mt("antRotate",{to:{transform:"rotate(405deg)"}}),gue=t=>({[`${t.componentCls}`]:A(A({},rt(t)),{position:"absolute",display:"none",color:t.colorPrimary,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${t.motionDurationSlow} ${t.motionEaseInOutCirc}`,"&-spinning":{position:"static",display:"inline-block",opacity:1},"&-nested-loading":{position:"relative",[`> div > ${t.componentCls}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:t.contentHeight,[`${t.componentCls}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:-t.spinDotSize/2},[`${t.componentCls}-text`]:{position:"absolute",top:"50%",width:"100%",paddingTop:(t.spinDotSize-t.fontSize)/2+2,textShadow:`0 1px 2px ${t.colorBgContainer}`},[`&${t.componentCls}-show-text ${t.componentCls}-dot`]:{marginTop:-(t.spinDotSize/2)-10},"&-sm":{[`${t.componentCls}-dot`]:{margin:-t.spinDotSizeSM/2},[`${t.componentCls}-text`]:{paddingTop:(t.spinDotSizeSM-t.fontSize)/2+2},[`&${t.componentCls}-show-text ${t.componentCls}-dot`]:{marginTop:-(t.spinDotSizeSM/2)-10}},"&-lg":{[`${t.componentCls}-dot`]:{margin:-(t.spinDotSizeLG/2)},[`${t.componentCls}-text`]:{paddingTop:(t.spinDotSizeLG-t.fontSize)/2+2},[`&${t.componentCls}-show-text ${t.componentCls}-dot`]:{marginTop:-(t.spinDotSizeLG/2)-10}}},[`${t.componentCls}-container`]:{position:"relative",transition:`opacity ${t.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:t.colorBgContainer,opacity:0,transition:`all ${t.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${t.componentCls}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:t.spinDotDefault},[`${t.componentCls}-dot`]:{position:"relative",display:"inline-block",fontSize:t.spinDotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:(t.spinDotSize-t.marginXXS/2)/2,height:(t.spinDotSize-t.marginXXS/2)/2,backgroundColor:t.colorPrimary,borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:hue,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:pue,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&-sm ${t.componentCls}-dot`]:{fontSize:t.spinDotSizeSM,i:{width:(t.spinDotSizeSM-t.marginXXS/2)/2,height:(t.spinDotSizeSM-t.marginXXS/2)/2}},[`&-lg ${t.componentCls}-dot`]:{fontSize:t.spinDotSizeLG,i:{width:(t.spinDotSizeLG-t.marginXXS)/2,height:(t.spinDotSizeLG-t.marginXXS)/2}},[`&${t.componentCls}-show-text ${t.componentCls}-text`]:{display:"block"}})}),mue=et("Spin",t=>{const e=Ve(t,{spinDotDefault:t.colorTextDescription,spinDotSize:t.controlHeightLG/2,spinDotSizeSM:t.controlHeightLG*.35,spinDotSizeLG:t.controlHeight});return[gue(e)]},{contentHeight:400});var vue=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o({prefixCls:String,spinning:{type:Boolean,default:void 0},size:String,wrapperClassName:String,tip:Z.any,delay:Number,indicator:Z.any});let Hh=null;function yue(t,e){return!!t&&!!e&&!isNaN(Number(e))}function xue(t){const e=t.indicator;Hh=typeof e=="function"?e:()=>C(e,null,null)}const rr=oe({compatConfig:{MODE:3},name:"ASpin",inheritAttrs:!1,props:ct(bue(),{size:"default",spinning:!0,wrapperClassName:""}),setup(t,e){let{attrs:n,slots:i}=e;const{prefixCls:o,size:r,direction:a}=Me("spin",t),[s,l]=mue(o),c=ie(t.spinning&&!yue(t.spinning,t.delay));let u;return ye([()=>t.spinning,()=>t.delay],()=>{u==null||u.cancel(),u=fue(t.delay,()=>{c.value=t.spinning}),u==null||u()},{immediate:!0,flush:"post"}),at(()=>{u==null||u.cancel()}),()=>{var d,f;const{class:h}=n,p=vue(n,["class"]),{tip:g=(d=i.tip)===null||d===void 0?void 0:d.call(i)}=t,m=(f=i.default)===null||f===void 0?void 0:f.call(i),v={[l.value]:!0,[o.value]:!0,[`${o.value}-sm`]:r.value==="small",[`${o.value}-lg`]:r.value==="large",[`${o.value}-spinning`]:c.value,[`${o.value}-show-text`]:!!g,[`${o.value}-rtl`]:a.value==="rtl",[h]:!!h};function b(w){const x=`${w}-dot`;let $=gn(i,t,"indicator");return $===null?null:(Array.isArray($)&&($=$.length===1?$[0]:$),ln($)?On($,{class:x}):Hh&&ln(Hh())?On(Hh(),{class:x}):C("span",{class:`${x} ${w}-dot-spin`},[C("i",{class:`${w}-dot-item`},null),C("i",{class:`${w}-dot-item`},null),C("i",{class:`${w}-dot-item`},null),C("i",{class:`${w}-dot-item`},null)]))}const y=C("div",H(H({},p),{},{class:v,"aria-live":"polite","aria-busy":c.value}),[b(o.value),g?C("div",{class:`${o.value}-text`},[g]):null]);if(m&&Kt(m).length){const w={[`${o.value}-container`]:!0,[`${o.value}-blur`]:c.value};return s(C("div",{class:[`${o.value}-nested-loading`,t.wrapperClassName,l.value]},[c.value&&C("div",{key:"loading"},[y]),C("div",{class:w,key:"container"},[m])]))}return s(y)}}});rr.setDefaultIndicator=xue;rr.install=function(t){return t.component(rr.name,rr),t};var wue={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"};function bT(t){for(var e=1;e{const o=A(A(A({},t),{size:"small"}),n);return C(kn,o,i)}}}),_ue=oe({name:"MiddleSelect",inheritAttrs:!1,props:Im(),Option:kn.Option,setup(t,e){let{attrs:n,slots:i}=e;return()=>{const o=A(A(A({},t),{size:"middle"}),n);return C(kn,o,i)}}}),Ka=oe({compatConfig:{MODE:3},name:"Pager",inheritAttrs:!1,props:{rootPrefixCls:String,page:Number,active:{type:Boolean,default:void 0},last:{type:Boolean,default:void 0},locale:Z.object,showTitle:{type:Boolean,default:void 0},itemRender:{type:Function,default:()=>{}},onClick:{type:Function},onKeypress:{type:Function}},eimt:["click","keypress"],setup(t,e){let{emit:n,attrs:i}=e;const o=()=>{n("click",t.page)},r=a=>{n("keypress",a,o,t.page)};return()=>{const{showTitle:a,page:s,itemRender:l}=t,{class:c,style:u}=i,d=`${t.rootPrefixCls}-item`,f=ce(d,`${d}-${t.page}`,{[`${d}-active`]:t.active,[`${d}-disabled`]:!t.page},c);return C("li",{onClick:o,onKeypress:r,title:a?String(s):null,tabindex:"0",class:f,style:u},[l({page:s,type:"page",originalElement:C("a",{rel:"nofollow"},[s])})])}}}),ts={ENTER:13,ARROW_UP:38,ARROW_DOWN:40},Pue=oe({compatConfig:{MODE:3},props:{disabled:{type:Boolean,default:void 0},changeSize:Function,quickGo:Function,selectComponentClass:Z.any,current:Number,pageSizeOptions:Z.array.def(["10","20","50","100"]),pageSize:Number,buildOptionText:Function,locale:Z.object,rootPrefixCls:String,selectPrefixCls:String,goButton:Z.any},setup(t){const e=se(""),n=L(()=>!e.value||isNaN(e.value)?void 0:Number(e.value)),i=l=>`${l.value} ${t.locale.items_per_page}`,o=l=>{const{value:c}=l.target;e.value!==c&&(e.value=c)},r=l=>{const{goButton:c,quickGo:u,rootPrefixCls:d}=t;if(!(c||e.value===""))if(l.relatedTarget&&(l.relatedTarget.className.indexOf(`${d}-item-link`)>=0||l.relatedTarget.className.indexOf(`${d}-item`)>=0)){e.value="";return}else u(n.value),e.value=""},a=l=>{e.value!==""&&(l.keyCode===ts.ENTER||l.type==="click")&&(t.quickGo(n.value),e.value="")},s=L(()=>{const{pageSize:l,pageSizeOptions:c}=t;return c.some(u=>u.toString()===l.toString())?c:c.concat([l.toString()]).sort((u,d)=>{const f=isNaN(Number(u))?0:Number(u),h=isNaN(Number(d))?0:Number(d);return f-h})});return()=>{const{rootPrefixCls:l,locale:c,changeSize:u,quickGo:d,goButton:f,selectComponentClass:h,selectPrefixCls:p,pageSize:g,disabled:m}=t,v=`${l}-options`;let b=null,y=null,w=null;if(!u&&!d)return null;if(u&&h){const x=t.buildOptionText||i,$=s.value.map((S,_)=>C(h.Option,{key:_,value:S},{default:()=>[x({value:S})]}));b=C(h,{disabled:m,prefixCls:p,showSearch:!1,class:`${v}-size-changer`,optionLabelProp:"children",value:(g||s.value[0]).toString(),onChange:S=>u(Number(S)),getPopupContainer:S=>S.parentNode},{default:()=>[$]})}return d&&(f&&(w=typeof f=="boolean"?C("button",{type:"button",onClick:a,onKeyup:a,disabled:m,class:`${v}-quick-jumper-button`},[c.jump_to_confirm]):C("span",{onClick:a,onKeyup:a},[f])),y=C("div",{class:`${v}-quick-jumper`},[c.jump_to,C(Ac,{disabled:m,type:"text",value:e.value,onInput:o,onChange:o,onKeyup:a,onBlur:r},null),c.page,w])),C("li",{class:`${v}`},[b,y])}}}),Tue={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页"};var Oue=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o"u"?e.statePageSize:t;return Math.floor((n.total-1)/i)+1}const Iue=oe({compatConfig:{MODE:3},name:"Pagination",mixins:[el],inheritAttrs:!1,props:{disabled:{type:Boolean,default:void 0},prefixCls:Z.string.def("rc-pagination"),selectPrefixCls:Z.string.def("rc-select"),current:Number,defaultCurrent:Z.number.def(1),total:Z.number.def(0),pageSize:Number,defaultPageSize:Z.number.def(10),hideOnSinglePage:{type:Boolean,default:!1},showSizeChanger:{type:Boolean,default:void 0},showLessItems:{type:Boolean,default:!1},selectComponentClass:Z.any,showPrevNextJumpers:{type:Boolean,default:!0},showQuickJumper:Z.oneOfType([Z.looseBool,Z.object]).def(!1),showTitle:{type:Boolean,default:!0},pageSizeOptions:Z.arrayOf(Z.oneOfType([Z.number,Z.string])),buildOptionText:Function,showTotal:Function,simple:{type:Boolean,default:void 0},locale:Z.object.def(Tue),itemRender:Z.func.def(Mue),prevIcon:Z.any,nextIcon:Z.any,jumpPrevIcon:Z.any,jumpNextIcon:Z.any,totalBoundaryShowSizeChanger:Z.number.def(50)},data(){const t=this.$props;let e=Wp([this.current,this.defaultCurrent]);const n=Wp([this.pageSize,this.defaultPageSize]);return e=Math.min(e,gr(n,void 0,t)),{stateCurrent:e,stateCurrentInputValue:e,statePageSize:n}},watch:{current(t){this.setState({stateCurrent:t,stateCurrentInputValue:t})},pageSize(t){const e={};let n=this.stateCurrent;const i=gr(t,this.$data,this.$props);n=n>i?i:n,Ar(this,"current")||(e.stateCurrent=n,e.stateCurrentInputValue=n),e.statePageSize=t,this.setState(e)},stateCurrent(t,e){this.$nextTick(()=>{if(this.$refs.paginationNode){const n=this.$refs.paginationNode.querySelector(`.${this.prefixCls}-item-${e}`);n&&document.activeElement===n&&n.blur()}})},total(){const t={},e=gr(this.pageSize,this.$data,this.$props);if(Ar(this,"current")){const n=Math.min(this.current,e);t.stateCurrent=n,t.stateCurrentInputValue=n}else{let n=this.stateCurrent;n===0&&e>0?n=1:n=Math.min(this.stateCurrent,e),t.stateCurrent=n}this.setState(t)}},methods:{getJumpPrevPage(){return Math.max(1,this.stateCurrent-(this.showLessItems?3:5))},getJumpNextPage(){return Math.min(gr(void 0,this.$data,this.$props),this.stateCurrent+(this.showLessItems?3:5))},getItemIcon(t,e){const{prefixCls:n}=this.$props;return zk(this,t,this.$props)||C("button",{type:"button","aria-label":e,class:`${n}-item-link`},null)},getValidValue(t){const e=t.target.value,n=gr(void 0,this.$data,this.$props),{stateCurrentInputValue:i}=this.$data;let o;return e===""?o=e:isNaN(Number(e))?o=i:e>=n?o=n:o=Number(e),o},isValid(t){return Eue(t)&&t!==this.stateCurrent},shouldDisplayQuickJumper(){const{showQuickJumper:t,pageSize:e,total:n}=this.$props;return n<=e?!1:t},handleKeyDown(t){(t.keyCode===ts.ARROW_UP||t.keyCode===ts.ARROW_DOWN)&&t.preventDefault()},handleKeyUp(t){const e=this.getValidValue(t),n=this.stateCurrentInputValue;e!==n&&this.setState({stateCurrentInputValue:e}),t.keyCode===ts.ENTER?this.handleChange(e):t.keyCode===ts.ARROW_UP?this.handleChange(e-1):t.keyCode===ts.ARROW_DOWN&&this.handleChange(e+1)},changePageSize(t){let e=this.stateCurrent;const n=e,i=gr(t,this.$data,this.$props);e=e>i?i:e,i===0&&(e=this.stateCurrent),typeof t=="number"&&(Ar(this,"pageSize")||this.setState({statePageSize:t}),Ar(this,"current")||this.setState({stateCurrent:e,stateCurrentInputValue:e})),this.__emit("update:pageSize",t),e!==n&&this.__emit("update:current",e),this.__emit("showSizeChange",e,t),this.__emit("change",e,t)},handleChange(t){const{disabled:e}=this.$props;let n=t;if(this.isValid(n)&&!e){const i=gr(void 0,this.$data,this.$props);return n>i?n=i:n<1&&(n=1),Ar(this,"current")||this.setState({stateCurrent:n,stateCurrentInputValue:n}),this.__emit("update:current",n),this.__emit("change",n,this.statePageSize),n}return this.stateCurrent},prev(){this.hasPrev()&&this.handleChange(this.stateCurrent-1)},next(){this.hasNext()&&this.handleChange(this.stateCurrent+1)},jumpPrev(){this.handleChange(this.getJumpPrevPage())},jumpNext(){this.handleChange(this.getJumpNextPage())},hasPrev(){return this.stateCurrent>1},hasNext(){return this.stateCurrentn},runIfEnter(t,e){if(t.key==="Enter"||t.charCode===13){t.preventDefault();for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o0?v-1:0,R=v+1<$?v+1:$,D=this.hasPrev(),F=this.hasNext();if(c)return I&&(typeof I=="boolean"?M=C("button",{type:"button",onClick:this.handleGoTO,onKeyup:this.handleGoTO},[o.jump_to_confirm]):M=C("span",{onClick:this.handleGoTO,onKeyup:this.handleGoTO},[I]),M=C("li",{title:s?`${o.jump_to}${v}/${$}`:null,class:`${t}-simple-pager`},[M])),C("ul",H({class:ce(`${t} ${t}-simple`,{[`${t}-disabled`]:e},w)},x),[C("li",{title:s?o.prev_page:null,onClick:this.prev,tabindex:D?0:null,onKeypress:this.runIfEnterPrev,class:ce(`${t}-prev`,{[`${t}-disabled`]:!D}),"aria-disabled":!D},[this.renderPrev(E)]),C("li",{title:s?`${v}/${$}`:null,class:`${t}-simple-pager`},[C(Ac,{type:"text",value:this.stateCurrentInputValue,disabled:e,onKeydown:this.handleKeyDown,onKeyup:this.handleKeyUp,onInput:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"},null),C("span",{class:`${t}-slash`},[Qn("/")]),$]),C("li",{title:s?o.next_page:null,onClick:this.next,tabindex:F?0:null,onKeypress:this.runIfEnterNext,class:ce(`${t}-next`,{[`${t}-disabled`]:!F}),"aria-disabled":!F},[this.renderNext(R)]),M]);if($<=3+k*2){const j={locale:o,rootPrefixCls:t,showTitle:s,itemRender:u,onClick:this.handleChange,onKeypress:this.runIfEnter};$||S.push(C(Ka,H(H({},j),{},{key:"noPager",page:1,class:`${t}-item-disabled`}),null));for(let U=1;U<=$;U+=1){const V=v===U;S.push(C(Ka,H(H({},j),{},{key:U,page:U,active:V}),null))}}else{const j=a?o.prev_3:o.prev_5,U=a?o.next_3:o.next_5;d&&(_=C("li",{title:this.showTitle?j:null,key:"prev",onClick:this.jumpPrev,tabindex:"0",onKeypress:this.runIfEnterJumpPrev,class:ce(`${t}-jump-prev`,{[`${t}-jump-prev-custom-icon`]:!!f})},[u({page:this.getJumpPrevPage(),type:"jump-prev",originalElement:this.getItemIcon("jumpPrevIcon","prev page")})]),P=C("li",{title:this.showTitle?U:null,key:"next",tabindex:"0",onClick:this.jumpNext,onKeypress:this.runIfEnterJumpNext,class:ce(`${t}-jump-next`,{[`${t}-jump-next-custom-icon`]:!!h})},[u({page:this.getJumpNextPage(),type:"jump-next",originalElement:this.getItemIcon("jumpNextIcon","next page")})])),T=C(Ka,{locale:o,last:!0,rootPrefixCls:t,onClick:this.handleChange,onKeypress:this.runIfEnter,key:$,page:$,active:!1,showTitle:s,itemRender:u},null),O=C(Ka,{locale:o,rootPrefixCls:t,onClick:this.handleChange,onKeypress:this.runIfEnter,key:1,page:1,active:!1,showTitle:s,itemRender:u},null);let V=Math.max(1,v-k),q=Math.min(v+k,$);v-1<=k&&(q=1+k*2),$-v<=k&&(V=$-k*2);for(let Y=V;Y<=q;Y+=1){const J=v===Y;S.push(C(Ka,{locale:o,rootPrefixCls:t,onClick:this.handleChange,onKeypress:this.runIfEnter,key:Y,page:Y,active:J,showTitle:s,itemRender:u},null))}v-1>=k*2&&v!==3&&(S[0]=C(Ka,{locale:o,rootPrefixCls:t,onClick:this.handleChange,onKeypress:this.runIfEnter,key:V,page:V,class:`${t}-item-after-jump-prev`,active:!1,showTitle:this.showTitle,itemRender:u},null),S.unshift(_)),$-v>=k*2&&v!==$-2&&(S[S.length-1]=C(Ka,{locale:o,rootPrefixCls:t,onClick:this.handleChange,onKeypress:this.runIfEnter,key:q,page:q,class:`${t}-item-before-jump-next`,active:!1,showTitle:this.showTitle,itemRender:u},null),S.push(P)),V!==1&&S.unshift(O),q!==$&&S.push(T)}let N=null;l&&(N=C("li",{class:`${t}-total-text`},[l(i,[i===0?0:(v-1)*b+1,v*b>i?i:v*b])]));const B=!D||!$,z=!F||!$,W=this.buildOptionText||this.$slots.buildOptionText;return C("ul",H(H({unselectable:"on",ref:"paginationNode"},x),{},{class:ce({[`${t}`]:!0,[`${t}-disabled`]:e},w)}),[N,C("li",{title:s?o.prev_page:null,onClick:this.prev,tabindex:B?null:0,onKeypress:this.runIfEnterPrev,class:ce(`${t}-prev`,{[`${t}-disabled`]:B}),"aria-disabled":B},[this.renderPrev(E)]),S,C("li",{title:s?o.next_page:null,onClick:this.next,tabindex:z?null:0,onKeypress:this.runIfEnterNext,class:ce(`${t}-next`,{[`${t}-disabled`]:z}),"aria-disabled":z},[this.renderNext(R)]),C(Pue,{disabled:e,locale:o,rootPrefixCls:t,selectComponentClass:p,selectPrefixCls:g,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:v,pageSize:b,pageSizeOptions:m,buildOptionText:W||null,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:I},null)])}}),kue=t=>{const{componentCls:e}=t;return{[`${e}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${e}-item-link`]:{color:t.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${e}-item-link`]:{color:t.colorTextDisabled,cursor:"not-allowed"}}},[`&${e}-disabled`]:{cursor:"not-allowed",[`&${e}-mini`]:{[` + `]:{color:v}}},{[`${e}-borderless`]:{borderColor:"transparent",boxShadow:"none",[`${e}-handler-down`]:{borderBlockStartWidth:0}}}]},Gce=t=>{const{componentCls:e,inputPaddingHorizontal:n,inputAffixPadding:i,controlWidth:o,borderRadiusLG:r,borderRadiusSM:a}=t;return{[`${e}-affix-wrapper`]:A(A(A({},rl(t)),tf(t,`${e}-affix-wrapper`)),{position:"relative",display:"inline-flex",width:o,padding:0,paddingInlineStart:n,"&-lg":{borderRadius:r},"&-sm":{borderRadius:a},[`&:not(${e}-affix-wrapper-disabled):hover`]:A(A({},Dc(t)),{zIndex:1}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${e}[disabled]`]:{background:"transparent"}},[`> div${e}`]:{width:"100%",border:"none",outline:"none",[`&${e}-focused`]:{boxShadow:"none !important"}},[`input${e}-input`]:{padding:0},"&::before":{width:0,visibility:"hidden",content:'"\\a0"'},[`${e}-handler-wrap`]:{zIndex:2},[e]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:i},"&-suffix":{position:"absolute",insetBlockStart:0,insetInlineEnd:0,zIndex:1,height:"100%",marginInlineEnd:n,marginInlineStart:i}}})}},Kce=et("InputNumber",t=>{const e=al(t);return[Yce(e),Gce(e),Mc(e)]},t=>({controlWidth:90,handleWidth:t.controlHeightSM-t.lineWidth*2,handleFontSize:t.fontSize/2,handleVisible:"auto"}));var Uce=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);oA(A({},gT),{size:Ne(),bordered:Ce(!0),placeholder:String,name:String,id:String,type:String,addonBefore:Z.any,addonAfter:Z.any,prefix:Z.any,"onUpdate:value":gT.onChange,valueModifiers:Object,status:Ne()}),Gb=oe({compatConfig:{MODE:3},name:"AInputNumber",inheritAttrs:!1,props:qce(),slots:Object,setup(t,e){let{emit:n,expose:i,attrs:o,slots:r}=e;var a;const s=vn(),l=Mn.useInject(),c=L(()=>zo(l.status,t.status)),{prefixCls:u,size:d,direction:f,disabled:h}=Me("input-number",t),{compactSize:p,compactItemClassnames:g}=Ra(u,f),m=Oi(),v=L(()=>{var I;return(I=h.value)!==null&&I!==void 0?I:m.value}),[b,y]=Kce(u),w=L(()=>p.value||d.value),x=ie((a=t.value)!==null&&a!==void 0?a:t.defaultValue),$=ie(!1);ye(()=>t.value,()=>{x.value=t.value});const S=ie(null),_=()=>{var I;(I=S.value)===null||I===void 0||I.focus()};i({focus:_,blur:()=>{var I;(I=S.value)===null||I===void 0||I.blur()}});const O=I=>{t.value===void 0&&(x.value=I),n("update:value",I),n("change",I),s.onFieldChange()},T=I=>{$.value=!1,n("blur",I),s.onFieldBlur()},M=I=>{$.value=!0,n("focus",I)};return()=>{var I,k,E,R;const{hasFeedback:D,isFormItemInput:F,feedbackIcon:N}=l,B=(I=t.id)!==null&&I!==void 0?I:s.id.value,z=A(A(A({},o),t),{id:B,disabled:v.value}),{class:W,bordered:j,readonly:U,style:V,addonBefore:q=(k=r.addonBefore)===null||k===void 0?void 0:k.call(r),addonAfter:Y=(E=r.addonAfter)===null||E===void 0?void 0:E.call(r),prefix:J=(R=r.prefix)===null||R===void 0?void 0:R.call(r),valueModifiers:Q={}}=z,G=Uce(z,["class","bordered","readonly","style","addonBefore","addonAfter","prefix","valueModifiers"]),ee=u.value,X=ce({[`${ee}-lg`]:w.value==="large",[`${ee}-sm`]:w.value==="small",[`${ee}-rtl`]:f.value==="rtl",[`${ee}-readonly`]:U,[`${ee}-borderless`]:!j,[`${ee}-in-form-item`]:F},ei(ee,c.value),W,g.value,y.value);let K=C(Xce,H(H({},ht(G,["size","defaultValue"])),{},{ref:S,lazy:!!Q.lazy,value:x.value,class:X,prefixCls:ee,readonly:U,onChange:O,onBlur:T,onFocus:M}),{upHandler:r.upIcon?()=>C("span",{class:`${ee}-handler-up-inner`},[r.upIcon()]):()=>C(lC,{class:`${ee}-handler-up-inner`},null),downHandler:r.downIcon?()=>C("span",{class:`${ee}-handler-down-inner`},[r.downIcon()]):()=>C(nl,{class:`${ee}-handler-down-inner`},null)});const te=Yb(q)||Yb(Y),ue=Yb(J);if(ue||D){const ae=ce(`${ee}-affix-wrapper`,ei(`${ee}-affix-wrapper`,c.value,D),{[`${ee}-affix-wrapper-focused`]:$.value,[`${ee}-affix-wrapper-disabled`]:v.value,[`${ee}-affix-wrapper-sm`]:w.value==="small",[`${ee}-affix-wrapper-lg`]:w.value==="large",[`${ee}-affix-wrapper-rtl`]:f.value==="rtl",[`${ee}-affix-wrapper-readonly`]:U,[`${ee}-affix-wrapper-borderless`]:!j,[`${W}`]:!te&&W},y.value);K=C("div",{class:ae,style:V,onClick:_},[ue&&C("span",{class:`${ee}-prefix`},[J]),K,D&&C("span",{class:`${ee}-suffix`},[N])])}if(te){const ae=`${ee}-group`,re=`${ae}-addon`,ne=q?C("div",{class:re},[q]):null,le=Y?C("div",{class:re},[Y]):null,he=ce(`${ee}-wrapper`,ae,{[`${ae}-rtl`]:f.value==="rtl"},y.value),pe=ce(`${ee}-group-wrapper`,{[`${ee}-group-wrapper-sm`]:w.value==="small",[`${ee}-group-wrapper-lg`]:w.value==="large",[`${ee}-group-wrapper-rtl`]:f.value==="rtl"},ei(`${u}-group-wrapper`,c.value,D),W,y.value);K=C("div",{class:pe,style:V},[C("div",{class:he},[ne&&C(yd,null,{default:()=>[C(zp,null,{default:()=>[ne]})]}),K,le&&C(yd,null,{default:()=>[C(zp,null,{default:()=>[le]})]})])])}return b(At(K,{style:V}))}}}),Zce=A(Gb,{install:t=>(t.component(Gb.name,Gb),t)}),Jce=t=>{const{componentCls:e,colorBgContainer:n,colorBgBody:i,colorText:o}=t;return{[`${e}-sider-light`]:{background:n,[`${e}-sider-trigger`]:{color:o,background:n},[`${e}-sider-zero-width-trigger`]:{color:o,background:n,border:`1px solid ${i}`,borderInlineStart:0}}}},Qce=t=>{const{antCls:e,componentCls:n,colorText:i,colorTextLightSolid:o,colorBgHeader:r,colorBgBody:a,colorBgTrigger:s,layoutHeaderHeight:l,layoutHeaderPaddingInline:c,layoutHeaderColor:u,layoutFooterPadding:d,layoutTriggerHeight:f,layoutZeroTriggerSize:h,motionDurationMid:p,motionDurationSlow:g,fontSize:m,borderRadius:v}=t;return{[n]:A(A({display:"flex",flex:"auto",flexDirection:"column",color:i,minHeight:0,background:a,"&, *":{boxSizing:"border-box"},[`&${n}-has-sider`]:{flexDirection:"row",[`> ${n}, > ${n}-content`]:{width:0}},[`${n}-header, &${n}-footer`]:{flex:"0 0 auto"},[`${n}-header`]:{height:l,paddingInline:c,color:u,lineHeight:`${l}px`,background:r,[`${e}-menu`]:{lineHeight:"inherit"}},[`${n}-footer`]:{padding:d,color:i,fontSize:m,background:a},[`${n}-content`]:{flex:"auto",minHeight:0},[`${n}-sider`]:{position:"relative",minWidth:0,background:r,transition:`all ${p}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${e}-menu${e}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:f},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:f,color:o,lineHeight:`${f}px`,textAlign:"center",background:s,cursor:"pointer",transition:`all ${p}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:l,insetInlineEnd:-h,zIndex:1,width:h,height:h,color:o,fontSize:t.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:r,borderStartStartRadius:0,borderStartEndRadius:v,borderEndEndRadius:v,borderEndStartRadius:0,cursor:"pointer",transition:`background ${g} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${g}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-h,borderStartStartRadius:v,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:v}}}}},Jce(t)),{"&-rtl":{direction:"rtl"}})}},eue=et("Layout",t=>{const{colorText:e,controlHeightSM:n,controlHeight:i,controlHeightLG:o,marginXXS:r}=t,a=o*1.25,s=Ve(t,{layoutHeaderHeight:i*2,layoutHeaderPaddingInline:a,layoutHeaderColor:e,layoutFooterPadding:`${n}px ${a}px`,layoutTriggerHeight:o+r*2,layoutZeroTriggerSize:o});return[Qce(s)]},t=>{const{colorBgLayout:e}=t;return{colorBgHeader:"#001529",colorBgBody:e,colorBgTrigger:"#002140"}}),fC=()=>({prefixCls:String,hasSider:{type:Boolean,default:void 0},tagName:String});function sv(t){let{suffixCls:e,tagName:n,name:i}=t;return o=>oe({compatConfig:{MODE:3},name:i,props:fC(),setup(a,s){let{slots:l}=s;const{prefixCls:c}=Me(e,a);return()=>{const u=A(A({},a),{prefixCls:c.value,tagName:n});return C(o,u,l)}}})}const hC=oe({compatConfig:{MODE:3},props:fC(),setup(t,e){let{slots:n}=e;return()=>C(t.tagName,{class:t.prefixCls},n)}}),tue=oe({compatConfig:{MODE:3},inheritAttrs:!1,props:fC(),setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,direction:r}=Me("",t),[a,s]=eue(o),l=se([]);ot(P3,{addSider:d=>{l.value=[...l.value,d]},removeSider:d=>{l.value=l.value.filter(f=>f!==d)}});const u=L(()=>{const{prefixCls:d,hasSider:f}=t;return{[s.value]:!0,[`${d}`]:!0,[`${d}-has-sider`]:typeof f=="boolean"?f:l.value.length>0,[`${d}-rtl`]:r.value==="rtl"}});return()=>{const{tagName:d}=t;return a(C(d,A(A({},i),{class:[u.value,i.class]}),n))}}}),Kb=sv({suffixCls:"layout",tagName:"section",name:"ALayout"})(tue),Nh=sv({suffixCls:"layout-header",tagName:"header",name:"ALayoutHeader"})(hC),Bh=sv({suffixCls:"layout-footer",tagName:"footer",name:"ALayoutFooter"})(hC),zh=sv({suffixCls:"layout-content",tagName:"main",name:"ALayoutContent"})(hC);var nue={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"};function mT(t){for(var e=1;e({prefixCls:String,collapsible:{type:Boolean,default:void 0},collapsed:{type:Boolean,default:void 0},defaultCollapsed:{type:Boolean,default:void 0},reverseArrow:{type:Boolean,default:void 0},zeroWidthTriggerStyle:{type:Object,default:void 0},trigger:Z.any,width:Z.oneOfType([Z.number,Z.string]),collapsedWidth:Z.oneOfType([Z.number,Z.string]),breakpoint:Z.oneOf(Wn("xs","sm","md","lg","xl","xxl","xxxl")),theme:Z.oneOf(Wn("light","dark")).def("dark"),onBreakpoint:Function,onCollapse:Function}),rue=(()=>{let t=0;return function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return t+=1,`${e}${t}`}})(),Hh=oe({compatConfig:{MODE:3},name:"ALayoutSider",inheritAttrs:!1,props:ct(oue(),{collapsible:!1,defaultCollapsed:!1,reverseArrow:!1,width:200,collapsedWidth:80}),emits:["breakpoint","update:collapsed","collapse"],setup(t,e){let{emit:n,attrs:i,slots:o}=e;const{prefixCls:r}=Me("layout-sider",t),a=qe(P3,void 0),s=ie(!!(t.collapsed!==void 0?t.collapsed:t.defaultCollapsed)),l=ie(!1);ye(()=>t.collapsed,()=>{s.value=!!t.collapsed}),ot(_3,s);const c=(g,m)=>{t.collapsed===void 0&&(s.value=g),n("update:collapsed",g),n("collapse",g,m)},u=ie(g=>{l.value=g.matches,n("breakpoint",g.matches),s.value!==g.matches&&c(g.matches,"responsive")});let d;function f(g){return u.value(g)}const h=rue("ant-sider-");a&&a.addSider(h),Ze(()=>{ye(()=>t.breakpoint,()=>{try{d==null||d.removeEventListener("change",f)}catch{d==null||d.removeListener(f)}if(typeof window<"u"){const{matchMedia:g}=window;if(g&&t.breakpoint&&t.breakpoint in vT){d=g(`(max-width: ${vT[t.breakpoint]})`);try{d.addEventListener("change",f)}catch{d.addListener(f)}f(d)}}},{immediate:!0})}),at(()=>{try{d==null||d.removeEventListener("change",f)}catch{d==null||d.removeListener(f)}a&&a.removeSider(h)});const p=()=>{c(!s.value,"clickTrigger")};return()=>{var g,m;const v=r.value,{collapsedWidth:b,width:y,reverseArrow:w,zeroWidthTriggerStyle:x,trigger:$=(g=o.trigger)===null||g===void 0?void 0:g.call(o),collapsible:S,theme:_}=t,P=s.value?b:y,O=Yp(P)?`${P}px`:String(P),T=parseFloat(String(b||0))===0?C("span",{onClick:p,class:ce(`${v}-zero-width-trigger`,`${v}-zero-width-trigger-${w?"right":"left"}`),style:x},[$||C(pC,null,null)]):null,M={expanded:C(w?qi:cr,null,null),collapsed:C(w?cr:qi,null,null)},I=s.value?"collapsed":"expanded",k=M[I],E=$!==null?T||C("div",{class:`${v}-trigger`,onClick:p,style:{width:O}},[$||k]):null,R=[i.style,{flex:`0 0 ${O}`,maxWidth:O,minWidth:O,width:O}],D=ce(v,`${v}-${_}`,{[`${v}-collapsed`]:!!s.value,[`${v}-has-trigger`]:S&&$!==null&&!T,[`${v}-below`]:!!l.value,[`${v}-zero-width`]:parseFloat(O)===0},i.class);return C("aside",H(H({},i),{},{class:D,style:R}),[C("div",{class:`${v}-children`},[(m=o.default)===null||m===void 0?void 0:m.call(o)]),S||l.value&&T?E:null])}}}),aue=Nh,sue=Bh,lue=Hh,cue=zh,uue=A(Kb,{Header:Nh,Footer:Bh,Content:zh,Sider:Hh,install:t=>(t.component(Kb.name,Kb),t.component(Nh.name,Nh),t.component(Bh.name,Bh),t.component(Hh.name,Hh),t.component(zh.name,zh),t)});function due(t,e,n){var i=n||{},o=i.noTrailing,r=o===void 0?!1:o,a=i.noLeading,s=a===void 0?!1:a,l=i.debounceMode,c=l===void 0?void 0:l,u,d=!1,f=0;function h(){u&&clearTimeout(u)}function p(m){var v=m||{},b=v.upcomingOnly,y=b===void 0?!1:b;h(),d=!y}function g(){for(var m=arguments.length,v=new Array(m),b=0;bt?s?(f=Date.now(),r||(u=setTimeout(c?$:x,t))):x():r!==!0&&(u=setTimeout(c?$:x,c===void 0?t-w:t))}return g.cancel=p,g}function fue(t,e,n){var i={},o=i.atBegin,r=o===void 0?!1:o;return due(t,e,{debounceMode:r!==!1})}const hue=new mt("antSpinMove",{to:{opacity:1}}),pue=new mt("antRotate",{to:{transform:"rotate(405deg)"}}),gue=t=>({[`${t.componentCls}`]:A(A({},rt(t)),{position:"absolute",display:"none",color:t.colorPrimary,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${t.motionDurationSlow} ${t.motionEaseInOutCirc}`,"&-spinning":{position:"static",display:"inline-block",opacity:1},"&-nested-loading":{position:"relative",[`> div > ${t.componentCls}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:t.contentHeight,[`${t.componentCls}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:-t.spinDotSize/2},[`${t.componentCls}-text`]:{position:"absolute",top:"50%",width:"100%",paddingTop:(t.spinDotSize-t.fontSize)/2+2,textShadow:`0 1px 2px ${t.colorBgContainer}`},[`&${t.componentCls}-show-text ${t.componentCls}-dot`]:{marginTop:-(t.spinDotSize/2)-10},"&-sm":{[`${t.componentCls}-dot`]:{margin:-t.spinDotSizeSM/2},[`${t.componentCls}-text`]:{paddingTop:(t.spinDotSizeSM-t.fontSize)/2+2},[`&${t.componentCls}-show-text ${t.componentCls}-dot`]:{marginTop:-(t.spinDotSizeSM/2)-10}},"&-lg":{[`${t.componentCls}-dot`]:{margin:-(t.spinDotSizeLG/2)},[`${t.componentCls}-text`]:{paddingTop:(t.spinDotSizeLG-t.fontSize)/2+2},[`&${t.componentCls}-show-text ${t.componentCls}-dot`]:{marginTop:-(t.spinDotSizeLG/2)-10}}},[`${t.componentCls}-container`]:{position:"relative",transition:`opacity ${t.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:t.colorBgContainer,opacity:0,transition:`all ${t.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${t.componentCls}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:t.spinDotDefault},[`${t.componentCls}-dot`]:{position:"relative",display:"inline-block",fontSize:t.spinDotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:(t.spinDotSize-t.marginXXS/2)/2,height:(t.spinDotSize-t.marginXXS/2)/2,backgroundColor:t.colorPrimary,borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:hue,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:pue,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"}},[`&-sm ${t.componentCls}-dot`]:{fontSize:t.spinDotSizeSM,i:{width:(t.spinDotSizeSM-t.marginXXS/2)/2,height:(t.spinDotSizeSM-t.marginXXS/2)/2}},[`&-lg ${t.componentCls}-dot`]:{fontSize:t.spinDotSizeLG,i:{width:(t.spinDotSizeLG-t.marginXXS)/2,height:(t.spinDotSizeLG-t.marginXXS)/2}},[`&${t.componentCls}-show-text ${t.componentCls}-text`]:{display:"block"}})}),mue=et("Spin",t=>{const e=Ve(t,{spinDotDefault:t.colorTextDescription,spinDotSize:t.controlHeightLG/2,spinDotSizeSM:t.controlHeightLG*.35,spinDotSizeLG:t.controlHeight});return[gue(e)]},{contentHeight:400});var vue=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o({prefixCls:String,spinning:{type:Boolean,default:void 0},size:String,wrapperClassName:String,tip:Z.any,delay:Number,indicator:Z.any});let Wh=null;function yue(t,e){return!!t&&!!e&&!isNaN(Number(e))}function xue(t){const e=t.indicator;Wh=typeof e=="function"?e:()=>C(e,null,null)}const rr=oe({compatConfig:{MODE:3},name:"ASpin",inheritAttrs:!1,props:ct(bue(),{size:"default",spinning:!0,wrapperClassName:""}),setup(t,e){let{attrs:n,slots:i}=e;const{prefixCls:o,size:r,direction:a}=Me("spin",t),[s,l]=mue(o),c=ie(t.spinning&&!yue(t.spinning,t.delay));let u;return ye([()=>t.spinning,()=>t.delay],()=>{u==null||u.cancel(),u=fue(t.delay,()=>{c.value=t.spinning}),u==null||u()},{immediate:!0,flush:"post"}),at(()=>{u==null||u.cancel()}),()=>{var d,f;const{class:h}=n,p=vue(n,["class"]),{tip:g=(d=i.tip)===null||d===void 0?void 0:d.call(i)}=t,m=(f=i.default)===null||f===void 0?void 0:f.call(i),v={[l.value]:!0,[o.value]:!0,[`${o.value}-sm`]:r.value==="small",[`${o.value}-lg`]:r.value==="large",[`${o.value}-spinning`]:c.value,[`${o.value}-show-text`]:!!g,[`${o.value}-rtl`]:a.value==="rtl",[h]:!!h};function b(w){const x=`${w}-dot`;let $=gn(i,t,"indicator");return $===null?null:(Array.isArray($)&&($=$.length===1?$[0]:$),ln($)?On($,{class:x}):Wh&&ln(Wh())?On(Wh(),{class:x}):C("span",{class:`${x} ${w}-dot-spin`},[C("i",{class:`${w}-dot-item`},null),C("i",{class:`${w}-dot-item`},null),C("i",{class:`${w}-dot-item`},null),C("i",{class:`${w}-dot-item`},null)]))}const y=C("div",H(H({},p),{},{class:v,"aria-live":"polite","aria-busy":c.value}),[b(o.value),g?C("div",{class:`${o.value}-text`},[g]):null]);if(m&&Kt(m).length){const w={[`${o.value}-container`]:!0,[`${o.value}-blur`]:c.value};return s(C("div",{class:[`${o.value}-nested-loading`,t.wrapperClassName,l.value]},[c.value&&C("div",{key:"loading"},[y]),C("div",{class:w,key:"container"},[m])]))}return s(y)}}});rr.setDefaultIndicator=xue;rr.install=function(t){return t.component(rr.name,rr),t};var wue={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"};function bT(t){for(var e=1;e{const o=A(A(A({},t),{size:"small"}),n);return C(kn,o,i)}}}),_ue=oe({name:"MiddleSelect",inheritAttrs:!1,props:km(),Option:kn.Option,setup(t,e){let{attrs:n,slots:i}=e;return()=>{const o=A(A(A({},t),{size:"middle"}),n);return C(kn,o,i)}}}),Ka=oe({compatConfig:{MODE:3},name:"Pager",inheritAttrs:!1,props:{rootPrefixCls:String,page:Number,active:{type:Boolean,default:void 0},last:{type:Boolean,default:void 0},locale:Z.object,showTitle:{type:Boolean,default:void 0},itemRender:{type:Function,default:()=>{}},onClick:{type:Function},onKeypress:{type:Function}},eimt:["click","keypress"],setup(t,e){let{emit:n,attrs:i}=e;const o=()=>{n("click",t.page)},r=a=>{n("keypress",a,o,t.page)};return()=>{const{showTitle:a,page:s,itemRender:l}=t,{class:c,style:u}=i,d=`${t.rootPrefixCls}-item`,f=ce(d,`${d}-${t.page}`,{[`${d}-active`]:t.active,[`${d}-disabled`]:!t.page},c);return C("li",{onClick:o,onKeypress:r,title:a?String(s):null,tabindex:"0",class:f,style:u},[l({page:s,type:"page",originalElement:C("a",{rel:"nofollow"},[s])})])}}}),ts={ENTER:13,ARROW_UP:38,ARROW_DOWN:40},Pue=oe({compatConfig:{MODE:3},props:{disabled:{type:Boolean,default:void 0},changeSize:Function,quickGo:Function,selectComponentClass:Z.any,current:Number,pageSizeOptions:Z.array.def(["10","20","50","100"]),pageSize:Number,buildOptionText:Function,locale:Z.object,rootPrefixCls:String,selectPrefixCls:String,goButton:Z.any},setup(t){const e=se(""),n=L(()=>!e.value||isNaN(e.value)?void 0:Number(e.value)),i=l=>`${l.value} ${t.locale.items_per_page}`,o=l=>{const{value:c}=l.target;e.value!==c&&(e.value=c)},r=l=>{const{goButton:c,quickGo:u,rootPrefixCls:d}=t;if(!(c||e.value===""))if(l.relatedTarget&&(l.relatedTarget.className.indexOf(`${d}-item-link`)>=0||l.relatedTarget.className.indexOf(`${d}-item`)>=0)){e.value="";return}else u(n.value),e.value=""},a=l=>{e.value!==""&&(l.keyCode===ts.ENTER||l.type==="click")&&(t.quickGo(n.value),e.value="")},s=L(()=>{const{pageSize:l,pageSizeOptions:c}=t;return c.some(u=>u.toString()===l.toString())?c:c.concat([l.toString()]).sort((u,d)=>{const f=isNaN(Number(u))?0:Number(u),h=isNaN(Number(d))?0:Number(d);return f-h})});return()=>{const{rootPrefixCls:l,locale:c,changeSize:u,quickGo:d,goButton:f,selectComponentClass:h,selectPrefixCls:p,pageSize:g,disabled:m}=t,v=`${l}-options`;let b=null,y=null,w=null;if(!u&&!d)return null;if(u&&h){const x=t.buildOptionText||i,$=s.value.map((S,_)=>C(h.Option,{key:_,value:S},{default:()=>[x({value:S})]}));b=C(h,{disabled:m,prefixCls:p,showSearch:!1,class:`${v}-size-changer`,optionLabelProp:"children",value:(g||s.value[0]).toString(),onChange:S=>u(Number(S)),getPopupContainer:S=>S.parentNode},{default:()=>[$]})}return d&&(f&&(w=typeof f=="boolean"?C("button",{type:"button",onClick:a,onKeyup:a,disabled:m,class:`${v}-quick-jumper-button`},[c.jump_to_confirm]):C("span",{onClick:a,onKeyup:a},[f])),y=C("div",{class:`${v}-quick-jumper`},[c.jump_to,C(_c,{disabled:m,type:"text",value:e.value,onInput:o,onChange:o,onKeyup:a,onBlur:r},null),c.page,w])),C("li",{class:`${v}`},[b,y])}}}),Tue={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页"};var Oue=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o"u"?e.statePageSize:t;return Math.floor((n.total-1)/i)+1}const Iue=oe({compatConfig:{MODE:3},name:"Pagination",mixins:[el],inheritAttrs:!1,props:{disabled:{type:Boolean,default:void 0},prefixCls:Z.string.def("rc-pagination"),selectPrefixCls:Z.string.def("rc-select"),current:Number,defaultCurrent:Z.number.def(1),total:Z.number.def(0),pageSize:Number,defaultPageSize:Z.number.def(10),hideOnSinglePage:{type:Boolean,default:!1},showSizeChanger:{type:Boolean,default:void 0},showLessItems:{type:Boolean,default:!1},selectComponentClass:Z.any,showPrevNextJumpers:{type:Boolean,default:!0},showQuickJumper:Z.oneOfType([Z.looseBool,Z.object]).def(!1),showTitle:{type:Boolean,default:!0},pageSizeOptions:Z.arrayOf(Z.oneOfType([Z.number,Z.string])),buildOptionText:Function,showTotal:Function,simple:{type:Boolean,default:void 0},locale:Z.object.def(Tue),itemRender:Z.func.def(Mue),prevIcon:Z.any,nextIcon:Z.any,jumpPrevIcon:Z.any,jumpNextIcon:Z.any,totalBoundaryShowSizeChanger:Z.number.def(50)},data(){const t=this.$props;let e=jp([this.current,this.defaultCurrent]);const n=jp([this.pageSize,this.defaultPageSize]);return e=Math.min(e,gr(n,void 0,t)),{stateCurrent:e,stateCurrentInputValue:e,statePageSize:n}},watch:{current(t){this.setState({stateCurrent:t,stateCurrentInputValue:t})},pageSize(t){const e={};let n=this.stateCurrent;const i=gr(t,this.$data,this.$props);n=n>i?i:n,Ar(this,"current")||(e.stateCurrent=n,e.stateCurrentInputValue=n),e.statePageSize=t,this.setState(e)},stateCurrent(t,e){this.$nextTick(()=>{if(this.$refs.paginationNode){const n=this.$refs.paginationNode.querySelector(`.${this.prefixCls}-item-${e}`);n&&document.activeElement===n&&n.blur()}})},total(){const t={},e=gr(this.pageSize,this.$data,this.$props);if(Ar(this,"current")){const n=Math.min(this.current,e);t.stateCurrent=n,t.stateCurrentInputValue=n}else{let n=this.stateCurrent;n===0&&e>0?n=1:n=Math.min(this.stateCurrent,e),t.stateCurrent=n}this.setState(t)}},methods:{getJumpPrevPage(){return Math.max(1,this.stateCurrent-(this.showLessItems?3:5))},getJumpNextPage(){return Math.min(gr(void 0,this.$data,this.$props),this.stateCurrent+(this.showLessItems?3:5))},getItemIcon(t,e){const{prefixCls:n}=this.$props;return zk(this,t,this.$props)||C("button",{type:"button","aria-label":e,class:`${n}-item-link`},null)},getValidValue(t){const e=t.target.value,n=gr(void 0,this.$data,this.$props),{stateCurrentInputValue:i}=this.$data;let o;return e===""?o=e:isNaN(Number(e))?o=i:e>=n?o=n:o=Number(e),o},isValid(t){return Eue(t)&&t!==this.stateCurrent},shouldDisplayQuickJumper(){const{showQuickJumper:t,pageSize:e,total:n}=this.$props;return n<=e?!1:t},handleKeyDown(t){(t.keyCode===ts.ARROW_UP||t.keyCode===ts.ARROW_DOWN)&&t.preventDefault()},handleKeyUp(t){const e=this.getValidValue(t),n=this.stateCurrentInputValue;e!==n&&this.setState({stateCurrentInputValue:e}),t.keyCode===ts.ENTER?this.handleChange(e):t.keyCode===ts.ARROW_UP?this.handleChange(e-1):t.keyCode===ts.ARROW_DOWN&&this.handleChange(e+1)},changePageSize(t){let e=this.stateCurrent;const n=e,i=gr(t,this.$data,this.$props);e=e>i?i:e,i===0&&(e=this.stateCurrent),typeof t=="number"&&(Ar(this,"pageSize")||this.setState({statePageSize:t}),Ar(this,"current")||this.setState({stateCurrent:e,stateCurrentInputValue:e})),this.__emit("update:pageSize",t),e!==n&&this.__emit("update:current",e),this.__emit("showSizeChange",e,t),this.__emit("change",e,t)},handleChange(t){const{disabled:e}=this.$props;let n=t;if(this.isValid(n)&&!e){const i=gr(void 0,this.$data,this.$props);return n>i?n=i:n<1&&(n=1),Ar(this,"current")||this.setState({stateCurrent:n,stateCurrentInputValue:n}),this.__emit("update:current",n),this.__emit("change",n,this.statePageSize),n}return this.stateCurrent},prev(){this.hasPrev()&&this.handleChange(this.stateCurrent-1)},next(){this.hasNext()&&this.handleChange(this.stateCurrent+1)},jumpPrev(){this.handleChange(this.getJumpPrevPage())},jumpNext(){this.handleChange(this.getJumpNextPage())},hasPrev(){return this.stateCurrent>1},hasNext(){return this.stateCurrentn},runIfEnter(t,e){if(t.key==="Enter"||t.charCode===13){t.preventDefault();for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o0?v-1:0,R=v+1<$?v+1:$,D=this.hasPrev(),F=this.hasNext();if(c)return I&&(typeof I=="boolean"?M=C("button",{type:"button",onClick:this.handleGoTO,onKeyup:this.handleGoTO},[o.jump_to_confirm]):M=C("span",{onClick:this.handleGoTO,onKeyup:this.handleGoTO},[I]),M=C("li",{title:s?`${o.jump_to}${v}/${$}`:null,class:`${t}-simple-pager`},[M])),C("ul",H({class:ce(`${t} ${t}-simple`,{[`${t}-disabled`]:e},w)},x),[C("li",{title:s?o.prev_page:null,onClick:this.prev,tabindex:D?0:null,onKeypress:this.runIfEnterPrev,class:ce(`${t}-prev`,{[`${t}-disabled`]:!D}),"aria-disabled":!D},[this.renderPrev(E)]),C("li",{title:s?`${v}/${$}`:null,class:`${t}-simple-pager`},[C(_c,{type:"text",value:this.stateCurrentInputValue,disabled:e,onKeydown:this.handleKeyDown,onKeyup:this.handleKeyUp,onInput:this.handleKeyUp,onChange:this.handleKeyUp,size:"3"},null),C("span",{class:`${t}-slash`},[Qn("/")]),$]),C("li",{title:s?o.next_page:null,onClick:this.next,tabindex:F?0:null,onKeypress:this.runIfEnterNext,class:ce(`${t}-next`,{[`${t}-disabled`]:!F}),"aria-disabled":!F},[this.renderNext(R)]),M]);if($<=3+k*2){const j={locale:o,rootPrefixCls:t,showTitle:s,itemRender:u,onClick:this.handleChange,onKeypress:this.runIfEnter};$||S.push(C(Ka,H(H({},j),{},{key:"noPager",page:1,class:`${t}-item-disabled`}),null));for(let U=1;U<=$;U+=1){const V=v===U;S.push(C(Ka,H(H({},j),{},{key:U,page:U,active:V}),null))}}else{const j=a?o.prev_3:o.prev_5,U=a?o.next_3:o.next_5;d&&(_=C("li",{title:this.showTitle?j:null,key:"prev",onClick:this.jumpPrev,tabindex:"0",onKeypress:this.runIfEnterJumpPrev,class:ce(`${t}-jump-prev`,{[`${t}-jump-prev-custom-icon`]:!!f})},[u({page:this.getJumpPrevPage(),type:"jump-prev",originalElement:this.getItemIcon("jumpPrevIcon","prev page")})]),P=C("li",{title:this.showTitle?U:null,key:"next",tabindex:"0",onClick:this.jumpNext,onKeypress:this.runIfEnterJumpNext,class:ce(`${t}-jump-next`,{[`${t}-jump-next-custom-icon`]:!!h})},[u({page:this.getJumpNextPage(),type:"jump-next",originalElement:this.getItemIcon("jumpNextIcon","next page")})])),T=C(Ka,{locale:o,last:!0,rootPrefixCls:t,onClick:this.handleChange,onKeypress:this.runIfEnter,key:$,page:$,active:!1,showTitle:s,itemRender:u},null),O=C(Ka,{locale:o,rootPrefixCls:t,onClick:this.handleChange,onKeypress:this.runIfEnter,key:1,page:1,active:!1,showTitle:s,itemRender:u},null);let V=Math.max(1,v-k),q=Math.min(v+k,$);v-1<=k&&(q=1+k*2),$-v<=k&&(V=$-k*2);for(let Y=V;Y<=q;Y+=1){const J=v===Y;S.push(C(Ka,{locale:o,rootPrefixCls:t,onClick:this.handleChange,onKeypress:this.runIfEnter,key:Y,page:Y,active:J,showTitle:s,itemRender:u},null))}v-1>=k*2&&v!==3&&(S[0]=C(Ka,{locale:o,rootPrefixCls:t,onClick:this.handleChange,onKeypress:this.runIfEnter,key:V,page:V,class:`${t}-item-after-jump-prev`,active:!1,showTitle:this.showTitle,itemRender:u},null),S.unshift(_)),$-v>=k*2&&v!==$-2&&(S[S.length-1]=C(Ka,{locale:o,rootPrefixCls:t,onClick:this.handleChange,onKeypress:this.runIfEnter,key:q,page:q,class:`${t}-item-before-jump-next`,active:!1,showTitle:this.showTitle,itemRender:u},null),S.push(P)),V!==1&&S.unshift(O),q!==$&&S.push(T)}let N=null;l&&(N=C("li",{class:`${t}-total-text`},[l(i,[i===0?0:(v-1)*b+1,v*b>i?i:v*b])]));const B=!D||!$,z=!F||!$,W=this.buildOptionText||this.$slots.buildOptionText;return C("ul",H(H({unselectable:"on",ref:"paginationNode"},x),{},{class:ce({[`${t}`]:!0,[`${t}-disabled`]:e},w)}),[N,C("li",{title:s?o.prev_page:null,onClick:this.prev,tabindex:B?null:0,onKeypress:this.runIfEnterPrev,class:ce(`${t}-prev`,{[`${t}-disabled`]:B}),"aria-disabled":B},[this.renderPrev(E)]),S,C("li",{title:s?o.next_page:null,onClick:this.next,tabindex:z?null:0,onKeypress:this.runIfEnterNext,class:ce(`${t}-next`,{[`${t}-disabled`]:z}),"aria-disabled":z},[this.renderNext(R)]),C(Pue,{disabled:e,locale:o,rootPrefixCls:t,selectComponentClass:p,selectPrefixCls:g,changeSize:this.getShowSizeChanger()?this.changePageSize:null,current:v,pageSize:b,pageSizeOptions:m,buildOptionText:W||null,quickGo:this.shouldDisplayQuickJumper()?this.handleChange:null,goButton:I},null)])}}),kue=t=>{const{componentCls:e}=t;return{[`${e}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${e}-item-link`]:{color:t.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${e}-item-link`]:{color:t.colorTextDisabled,cursor:"not-allowed"}}},[`&${e}-disabled`]:{cursor:"not-allowed",[`&${e}-mini`]:{[` &:hover ${e}-item:not(${e}-item-active), &:active ${e}-item:not(${e}-item-active), &:hover ${e}-item-link, @@ -395,9 +395,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho ${e}-next, ${e}-jump-prev, ${e}-jump-next - `]:{display:"inline-block",minWidth:t.paginationItemSize,height:t.paginationItemSize,color:t.colorText,fontFamily:t.paginationFontFamily,lineHeight:`${t.paginationItemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:t.borderRadius,cursor:"pointer",transition:`all ${t.motionDurationMid}`},[`${e}-prev, ${e}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:t.colorText,cursor:"pointer",userSelect:"none"},[`${e}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:t.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${t.lineWidth}px ${t.lineType} transparent`,borderRadius:t.borderRadius,outline:"none",transition:`all ${t.motionDurationMid}`},[`&:focus-visible ${e}-item-link`]:A({},zr(t)),[`&:hover ${e}-item-link`]:{backgroundColor:t.colorBgTextHover},[`&:active ${e}-item-link`]:{backgroundColor:t.colorBgTextActive},[`&${e}-disabled:hover`]:{[`${e}-item-link`]:{backgroundColor:"transparent"}}},[`${e}-slash`]:{marginInlineEnd:t.paginationSlashMarginInlineEnd,marginInlineStart:t.paginationSlashMarginInlineStart},[`${e}-options`]:{display:"inline-block",marginInlineStart:t.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:t.controlHeight,marginInlineStart:t.marginXS,lineHeight:`${t.controlHeight}px`,verticalAlign:"top",input:A(A({},rl(t)),{width:t.controlHeightLG*1.25,height:t.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:t.marginXS,marginInlineEnd:t.marginXS})}}}},Fue=t=>{const{componentCls:e}=t;return{[`${e}-item`]:A(A({display:"inline-block",minWidth:t.paginationItemSize,height:t.paginationItemSize,marginInlineEnd:t.marginXS,fontFamily:t.paginationFontFamily,lineHeight:`${t.paginationItemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${t.lineWidth}px ${t.lineType} transparent`,borderRadius:t.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${t.paginationItemPaddingInline}px`,color:t.colorText,transition:"none","&:hover":{textDecoration:"none"}},[`&:not(${e}-item-active)`]:{"&:hover":{transition:`all ${t.motionDurationMid}`,backgroundColor:t.colorBgTextHover},"&:active":{backgroundColor:t.colorBgTextActive}}},Hr(t)),{"&-active":{fontWeight:t.paginationFontWeightActive,backgroundColor:t.paginationItemBgActive,borderColor:t.colorPrimary,a:{color:t.colorPrimary},"&:hover":{borderColor:t.colorPrimaryHover},"&:hover a":{color:t.colorPrimaryHover}}})}},Nue=t=>{const{componentCls:e}=t;return{[e]:A(A(A(A(A(A(A(A({},rt(t)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${e}-total-text`]:{display:"inline-block",height:t.paginationItemSize,marginInlineEnd:t.marginXS,lineHeight:`${t.paginationItemSize-2}px`,verticalAlign:"middle"}}),Fue(t)),Lue(t)),Rue(t)),Due(t)),kue(t)),{[`@media only screen and (max-width: ${t.screenLG}px)`]:{[`${e}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${t.screenSM}px)`]:{[`${e}-options`]:{display:"none"}}}),[`&${t.componentCls}-rtl`]:{direction:"rtl"}}},Bue=t=>{const{componentCls:e}=t;return{[`${e}${e}-disabled`]:{"&, &:hover":{[`${e}-item-link`]:{borderColor:t.colorBorder}},"&:focus-visible":{[`${e}-item-link`]:{borderColor:t.colorBorder}},[`${e}-item, ${e}-item-link`]:{backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder,[`&:hover:not(${e}-item-active)`]:{backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder,a:{color:t.colorTextDisabled}},[`&${e}-item-active`]:{backgroundColor:t.paginationItemDisabledBgActive}},[`${e}-prev, ${e}-next`]:{"&:hover button":{backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder,color:t.colorTextDisabled},[`${e}-item-link`]:{backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder}}},[e]:{[`${e}-prev, ${e}-next`]:{"&:hover button":{borderColor:t.colorPrimaryHover,backgroundColor:t.paginationItemBg},[`${e}-item-link`]:{backgroundColor:t.paginationItemLinkBg,borderColor:t.colorBorder},[`&:hover ${e}-item-link`]:{borderColor:t.colorPrimary,backgroundColor:t.paginationItemBg,color:t.colorPrimary},[`&${e}-disabled`]:{[`${e}-item-link`]:{borderColor:t.colorBorder,color:t.colorTextDisabled}}},[`${e}-item`]:{backgroundColor:t.paginationItemBg,border:`${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,[`&:hover:not(${e}-item-active)`]:{borderColor:t.colorPrimary,backgroundColor:t.paginationItemBg,a:{color:t.colorPrimary}},"&-active":{borderColor:t.colorPrimary}}}}},zue=et("Pagination",t=>{const e=Ve(t,{paginationItemSize:t.controlHeight,paginationFontFamily:t.fontFamily,paginationItemBg:t.colorBgContainer,paginationItemBgActive:t.colorBgContainer,paginationFontWeightActive:t.fontWeightStrong,paginationItemSizeSM:t.controlHeightSM,paginationItemInputBg:t.colorBgContainer,paginationMiniOptionsSizeChangerTop:0,paginationItemDisabledBgActive:t.controlItemBgActiveDisabled,paginationItemDisabledColorActive:t.colorTextDisabled,paginationItemLinkBg:t.colorBgContainer,inputOutlineOffset:"0 0",paginationMiniOptionsMarginInlineStart:t.marginXXS/2,paginationMiniQuickJumperInputWidth:t.controlHeightLG*1.1,paginationItemPaddingInline:t.marginXXS*1.5,paginationEllipsisLetterSpacing:t.marginXXS/2,paginationSlashMarginInlineStart:t.marginXXS,paginationSlashMarginInlineEnd:t.marginSM,paginationEllipsisTextIndent:"0.13em"},al(t));return[Nue(e),t.wireframe&&Bue(e)]});var Hue=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o({total:Number,defaultCurrent:Number,disabled:Ce(),current:Number,defaultPageSize:Number,pageSize:Number,hideOnSinglePage:Ce(),showSizeChanger:Ce(),pageSizeOptions:xt(),buildOptionText:ve(),showQuickJumper:Xe([Boolean,Object]),showTotal:ve(),size:Ne(),simple:Ce(),locale:Object,prefixCls:String,selectPrefixCls:String,totalBoundaryShowSizeChanger:Number,selectComponentClass:String,itemRender:ve(),role:String,responsive:Boolean,showLessItems:Ce(),onChange:ve(),onShowSizeChange:ve(),"onUpdate:current":ve(),"onUpdate:pageSize":ve()}),jue=oe({compatConfig:{MODE:3},name:"APagination",inheritAttrs:!1,props:Wue(),setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,configProvider:r,direction:a,size:s}=Me("pagination",t),[l,c]=zue(o),u=L(()=>r.getPrefixCls("select",t.selectPrefixCls)),d=Mc(),[f]=xo("Pagination",qk,Ue(t,"locale")),h=p=>{const g=C("span",{class:`${p}-item-ellipsis`},[Qn("•••")]),m=C("button",{class:`${p}-item-link`,type:"button",tabindex:-1},[a.value==="rtl"?C(qi,null,null):C(cr,null,null)]),v=C("button",{class:`${p}-item-link`,type:"button",tabindex:-1},[a.value==="rtl"?C(cr,null,null):C(qi,null,null)]),b=C("a",{rel:"nofollow",class:`${p}-item-link`},[C("div",{class:`${p}-item-container`},[a.value==="rtl"?C(mg,{class:`${p}-item-link-icon`},null):C(gg,{class:`${p}-item-link-icon`},null),g])]),y=C("a",{rel:"nofollow",class:`${p}-item-link`},[C("div",{class:`${p}-item-container`},[a.value==="rtl"?C(gg,{class:`${p}-item-link-icon`},null):C(mg,{class:`${p}-item-link-icon`},null),g])]);return{prevIcon:m,nextIcon:v,jumpPrevIcon:b,jumpNextIcon:y}};return()=>{var p;const{itemRender:g=n.itemRender,buildOptionText:m=n.buildOptionText,selectComponentClass:v,responsive:b}=t,y=Hue(t,["itemRender","buildOptionText","selectComponentClass","responsive"]),w=s.value==="small"||!!(!((p=d.value)===null||p===void 0)&&p.xs&&!s.value&&b),x=A(A(A(A(A({},y),h(o.value)),{prefixCls:o.value,selectPrefixCls:u.value,selectComponentClass:v||(w?Aue:_ue),locale:f.value,buildOptionText:m}),i),{class:ce({[`${o.value}-mini`]:w,[`${o.value}-rtl`]:a.value==="rtl"},i.class,c.value),itemRender:g});return l(C(Iue,x,null))}}}),sv=Vt(jue),Vue=()=>({avatar:Z.any,description:Z.any,prefixCls:String,title:Z.any}),p6=oe({compatConfig:{MODE:3},name:"AListItemMeta",props:Vue(),displayName:"AListItemMeta",__ANT_LIST_ITEM_META:!0,slots:Object,setup(t,e){let{slots:n}=e;const{prefixCls:i}=Me("list",t);return()=>{var o,r,a,s,l,c;const u=`${i.value}-item-meta`,d=(o=t.title)!==null&&o!==void 0?o:(r=n.title)===null||r===void 0?void 0:r.call(n),f=(a=t.description)!==null&&a!==void 0?a:(s=n.description)===null||s===void 0?void 0:s.call(n),h=(l=t.avatar)!==null&&l!==void 0?l:(c=n.avatar)===null||c===void 0?void 0:c.call(n),p=C("div",{class:`${i.value}-item-meta-content`},[d&&C("h4",{class:`${i.value}-item-meta-title`},[d]),f&&C("div",{class:`${i.value}-item-meta-description`},[f])]);return C("div",{class:u},[h&&C("div",{class:`${i.value}-item-meta-avatar`},[h]),(d||f)&&p])}}}),g6=Symbol("ListContextKey");var Xue=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o({prefixCls:String,extra:Z.any,actions:Z.array,grid:Object,colStyle:{type:Object,default:void 0}}),m6=oe({compatConfig:{MODE:3},name:"AListItem",inheritAttrs:!1,Meta:p6,props:Yue(),slots:Object,setup(t,e){let{slots:n,attrs:i}=e;const{itemLayout:o,grid:r}=qe(g6,{grid:se(),itemLayout:se()}),{prefixCls:a}=Me("list",t),s=()=>{var c;const u=((c=n.default)===null||c===void 0?void 0:c.call(n))||[];let d;return u.forEach(f=>{a7(f)&&!jd(f)&&(d=!0)}),d&&u.length>1},l=()=>{var c,u;const d=(c=t.extra)!==null&&c!==void 0?c:(u=n.extra)===null||u===void 0?void 0:u.call(n);return o.value==="vertical"?!!d:!s()};return()=>{var c,u,d,f,h;const{class:p}=i,g=Xue(i,["class"]),m=a.value,v=(c=t.extra)!==null&&c!==void 0?c:(u=n.extra)===null||u===void 0?void 0:u.call(n),b=(d=n.default)===null||d===void 0?void 0:d.call(n);let y=(f=t.actions)!==null&&f!==void 0?f:Dt((h=n.actions)===null||h===void 0?void 0:h.call(n));y=y&&!Array.isArray(y)?[y]:y;const w=y&&y.length>0&&C("ul",{class:`${m}-item-action`,key:"actions"},[y.map((S,_)=>C("li",{key:`${m}-item-action-${_}`},[S,_!==y.length-1&&C("em",{class:`${m}-item-action-split`},null)]))]),x=r.value?"div":"li",$=C(x,H(H({},g),{},{class:ce(`${m}-item`,{[`${m}-item-no-flex`]:!l()},p)}),{default:()=>[o.value==="vertical"&&v?[C("div",{class:`${m}-item-main`,key:"content"},[b,w]),C("div",{class:`${m}-item-extra`,key:"extra"},[v])]:[b,w,At(v,{key:"extra"})]]});return r.value?C(Qm,{flex:1,style:t.colStyle},{default:()=>[$]}):$}}}),Gue=t=>{const{listBorderedCls:e,componentCls:n,paddingLG:i,margin:o,padding:r,listItemPaddingSM:a,marginLG:s,borderRadiusLG:l}=t;return{[`${e}`]:{border:`${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,borderRadius:l,[`${n}-header,${n}-footer,${n}-item`]:{paddingInline:i},[`${n}-pagination`]:{margin:`${o}px ${s}px`}},[`${e}${n}-sm`]:{[`${n}-item,${n}-header,${n}-footer`]:{padding:a}},[`${e}${n}-lg`]:{[`${n}-item,${n}-header,${n}-footer`]:{padding:`${r}px ${i}px`}}}},Kue=t=>{const{componentCls:e,screenSM:n,screenMD:i,marginLG:o,marginSM:r,margin:a}=t;return{[`@media screen and (max-width:${i})`]:{[`${e}`]:{[`${e}-item`]:{[`${e}-item-action`]:{marginInlineStart:o}}},[`${e}-vertical`]:{[`${e}-item`]:{[`${e}-item-extra`]:{marginInlineStart:o}}}},[`@media screen and (max-width: ${n})`]:{[`${e}`]:{[`${e}-item`]:{flexWrap:"wrap",[`${e}-action`]:{marginInlineStart:r}}},[`${e}-vertical`]:{[`${e}-item`]:{flexWrap:"wrap-reverse",[`${e}-item-main`]:{minWidth:t.contentWidth},[`${e}-item-extra`]:{margin:`auto auto ${a}px`}}}}}},Uue=t=>{const{componentCls:e,antCls:n,controlHeight:i,minHeight:o,paddingSM:r,marginLG:a,padding:s,listItemPadding:l,colorPrimary:c,listItemPaddingSM:u,listItemPaddingLG:d,paddingXS:f,margin:h,colorText:p,colorTextDescription:g,motionDurationSlow:m,lineWidth:v}=t;return{[`${e}`]:A(A({},rt(t)),{position:"relative","*":{outline:"none"},[`${e}-header, ${e}-footer`]:{background:"transparent",paddingBlock:r},[`${e}-pagination`]:{marginBlockStart:a,textAlign:"end",[`${n}-pagination-options`]:{textAlign:"start"}},[`${e}-spin`]:{minHeight:o,textAlign:"center"},[`${e}-items`]:{margin:0,padding:0,listStyle:"none"},[`${e}-item`]:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:l,color:p,[`${e}-item-meta`]:{display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%",[`${e}-item-meta-avatar`]:{marginInlineEnd:s},[`${e}-item-meta-content`]:{flex:"1 0",width:0,color:p},[`${e}-item-meta-title`]:{marginBottom:t.marginXXS,color:p,fontSize:t.fontSize,lineHeight:t.lineHeight,"> a":{color:p,transition:`all ${m}`,"&:hover":{color:c}}},[`${e}-item-meta-description`]:{color:g,fontSize:t.fontSize,lineHeight:t.lineHeight}},[`${e}-item-action`]:{flex:"0 0 auto",marginInlineStart:t.marginXXL,padding:0,fontSize:0,listStyle:"none","& > li":{position:"relative",display:"inline-block",padding:`0 ${f}px`,color:g,fontSize:t.fontSize,lineHeight:t.lineHeight,textAlign:"center","&:first-child":{paddingInlineStart:0}},[`${e}-item-action-split`]:{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:v,height:Math.ceil(t.fontSize*t.lineHeight)-t.marginXXS*2,transform:"translateY(-50%)",backgroundColor:t.colorSplit}}},[`${e}-empty`]:{padding:`${s}px 0`,color:g,fontSize:t.fontSizeSM,textAlign:"center"},[`${e}-empty-text`]:{padding:s,color:t.colorTextDisabled,fontSize:t.fontSize,textAlign:"center"},[`${e}-item-no-flex`]:{display:"block"}}),[`${e}-grid ${n}-col > ${e}-item`]:{display:"block",maxWidth:"100%",marginBlockEnd:h,paddingBlock:0,borderBlockEnd:"none"},[`${e}-vertical ${e}-item`]:{alignItems:"initial",[`${e}-item-main`]:{display:"block",flex:1},[`${e}-item-extra`]:{marginInlineStart:a},[`${e}-item-meta`]:{marginBlockEnd:s,[`${e}-item-meta-title`]:{marginBlockEnd:r,color:p,fontSize:t.fontSizeLG,lineHeight:t.lineHeightLG}},[`${e}-item-action`]:{marginBlockStart:s,marginInlineStart:"auto","> li":{padding:`0 ${s}px`,"&:first-child":{paddingInlineStart:0}}}},[`${e}-split ${e}-item`]:{borderBlockEnd:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`,"&:last-child":{borderBlockEnd:"none"}},[`${e}-split ${e}-header`]:{borderBlockEnd:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`},[`${e}-split${e}-empty ${e}-footer`]:{borderTop:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`},[`${e}-loading ${e}-spin-nested-loading`]:{minHeight:i},[`${e}-split${e}-something-after-last-item ${n}-spin-container > ${e}-items > ${e}-item:last-child`]:{borderBlockEnd:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`},[`${e}-lg ${e}-item`]:{padding:d},[`${e}-sm ${e}-item`]:{padding:u},[`${e}:not(${e}-vertical)`]:{[`${e}-item-no-flex`]:{[`${e}-item-action`]:{float:"right"}}}}},que=et("List",t=>{const e=Ve(t,{listBorderedCls:`${t.componentCls}-bordered`,minHeight:t.controlHeightLG,listItemPadding:`${t.paddingContentVertical}px ${t.paddingContentHorizontalLG}px`,listItemPaddingSM:`${t.paddingContentVerticalSM}px ${t.paddingContentHorizontal}px`,listItemPaddingLG:`${t.paddingContentVerticalLG}px ${t.paddingContentHorizontalLG}px`});return[Uue(e),Gue(e),Kue(e)]},{contentWidth:220}),Zue=()=>({bordered:Ce(),dataSource:xt(),extra:Zn(),grid:Fe(),itemLayout:String,loading:Xe([Boolean,Object]),loadMore:Zn(),pagination:Xe([Boolean,Object]),prefixCls:String,rowKey:Xe([String,Number,Function]),renderItem:ve(),size:String,split:Ce(),header:Zn(),footer:Zn(),locale:Fe()}),sa=oe({compatConfig:{MODE:3},name:"AList",inheritAttrs:!1,Item:m6,props:ct(Zue(),{dataSource:[],bordered:!1,split:!0,loading:!1,pagination:!1}),slots:Object,setup(t,e){let{slots:n,attrs:i}=e;var o,r;ot(g6,{grid:Ue(t,"grid"),itemLayout:Ue(t,"itemLayout")});const a={current:1,total:0},{prefixCls:s,direction:l,renderEmpty:c}=Me("list",t),[u,d]=que(s),f=L(()=>t.pagination&&typeof t.pagination=="object"?t.pagination:{}),h=se((o=f.value.defaultCurrent)!==null&&o!==void 0?o:1),p=se((r=f.value.defaultPageSize)!==null&&r!==void 0?r:10);ye(f,()=>{"current"in f.value&&(h.value=f.value.current),"pageSize"in f.value&&(p.value=f.value.pageSize)});const g=[],m=I=>(k,E)=>{h.value=k,p.value=E,f.value[I]&&f.value[I](k,E)},v=m("onChange"),b=m("onShowSizeChange"),y=L(()=>typeof t.loading=="boolean"?{spinning:t.loading}:t.loading),w=L(()=>y.value&&y.value.spinning),x=L(()=>{let I="";switch(t.size){case"large":I="lg";break;case"small":I="sm";break}return I}),$=L(()=>({[`${s.value}`]:!0,[`${s.value}-vertical`]:t.itemLayout==="vertical",[`${s.value}-${x.value}`]:x.value,[`${s.value}-split`]:t.split,[`${s.value}-bordered`]:t.bordered,[`${s.value}-loading`]:w.value,[`${s.value}-grid`]:!!t.grid,[`${s.value}-rtl`]:l.value==="rtl"})),S=L(()=>{const I=A(A(A({},a),{total:t.dataSource.length,current:h.value,pageSize:p.value}),t.pagination||{}),k=Math.ceil(I.total/I.pageSize);return I.current>k&&(I.current=k),I}),_=L(()=>{let I=[...t.dataSource];return t.pagination&&t.dataSource.length>(S.value.current-1)*S.value.pageSize&&(I=[...t.dataSource].splice((S.value.current-1)*S.value.pageSize,S.value.pageSize)),I}),P=Mc(),O=Bi(()=>{for(let I=0;I{if(!t.grid)return;const I=O.value&&t.grid[O.value]?t.grid[O.value]:t.grid.column;if(I)return{width:`${100/I}%`,maxWidth:`${100/I}%`}}),M=(I,k)=>{var E;const R=(E=t.renderItem)!==null&&E!==void 0?E:n.renderItem;if(!R)return null;let D;const F=typeof t.rowKey;return F==="function"?D=t.rowKey(I):F==="string"||F==="number"?D=I[t.rowKey]:D=I.key,D||(D=`list-item-${k}`),g[k]=D,R({item:I,index:k})};return()=>{var I,k,E,R,D,F,N,B;const z=(I=t.loadMore)!==null&&I!==void 0?I:(k=n.loadMore)===null||k===void 0?void 0:k.call(n),W=(E=t.footer)!==null&&E!==void 0?E:(R=n.footer)===null||R===void 0?void 0:R.call(n),j=(D=t.header)!==null&&D!==void 0?D:(F=n.header)===null||F===void 0?void 0:F.call(n),U=Dt((N=n.default)===null||N===void 0?void 0:N.call(n)),V=!!(z||t.pagination||W),q=ce(A(A({},$.value),{[`${s.value}-something-after-last-item`]:V}),i.class,d.value),Y=t.pagination?C("div",{class:`${s.value}-pagination`},[C(sv,H(H({},S.value),{},{onChange:v,onShowSizeChange:b}),null)]):null;let J=w.value&&C("div",{style:{minHeight:"53px"}},null);if(_.value.length>0){g.length=0;const G=_.value.map((X,K)=>M(X,K)),ee=G.map((X,K)=>C("div",{key:g[K],style:T.value},[X]));J=t.grid?C(jS,{gutter:t.grid.gutter},{default:()=>[ee]}):C("ul",{class:`${s.value}-items`},[G])}else!U.length&&!w.value&&(J=C("div",{class:`${s.value}-empty-text`},[((B=t.locale)===null||B===void 0?void 0:B.emptyText)||c("List")]));const Q=S.value.position||"bottom";return u(C("div",H(H({},i),{},{class:q}),[(Q==="top"||Q==="both")&&Y,j&&C("div",{class:`${s.value}-header`},[j]),C(rr,y.value,{default:()=>[J,U]}),W&&C("div",{class:`${s.value}-footer`},[W]),z||(Q==="bottom"||Q==="both")&&Y]))}}});sa.install=function(t){return t.component(sa.name,sa),t.component(sa.Item.name,sa.Item),t.component(sa.Item.Meta.name,sa.Item.Meta),t};function Jue(t){const{selectionStart:e}=t;return t.value.slice(0,e)}function Que(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(Array.isArray(e)?e:[e]).reduce((i,o)=>{const r=t.lastIndexOf(o);return r>i.location?{location:r,prefix:o}:i},{location:-1,prefix:""})}function xT(t){return(t||"").toLowerCase()}function ede(t,e,n){const i=t[0];if(!i||i===n)return t;let o=t;const r=e.length;for(let a=0;a[]}},setup(t,e){let{slots:n}=e;const{activeIndex:i,setActiveIndex:o,selectOption:r,onFocus:a=rde,loading:s}=qe(v6,{activeIndex:ie(),loading:ie(!1)});let l;const c=u=>{clearTimeout(l),l=setTimeout(()=>{a(u)})};return at(()=>{clearTimeout(l)}),()=>{var u;const{prefixCls:d,options:f}=t,h=f[i.value]||{};return C(sn,{prefixCls:`${d}-menu`,activeKey:h.value,onSelect:p=>{let{key:g}=p;const m=f.find(v=>{let{value:b}=v;return b===g});r(m)},onMousedown:c},{default:()=>[!s.value&&f.map((p,g)=>{var m,v;const{value:b,disabled:y,label:w=p.value,class:x,style:$}=p;return C(or,{key:b,disabled:y,onMouseenter:()=>{o(g)},class:x,style:$},{default:()=>[(v=(m=n.option)===null||m===void 0?void 0:m.call(n,p))!==null&&v!==void 0?v:typeof w=="function"?w(p):w]})}),!s.value&&f.length===0?C(or,{key:"notFoundContent",disabled:!0},{default:()=>[(u=n.notFoundContent)===null||u===void 0?void 0:u.call(n)]}):null,s.value&&C(or,{key:"loading",disabled:!0},{default:()=>[C(rr,{size:"small"},null)]})]})}}}),sde={bottomRight:{points:["tl","br"],offset:[0,4],overflow:{adjustX:0,adjustY:1}},bottomLeft:{points:["tr","bl"],offset:[0,4],overflow:{adjustX:0,adjustY:1}},topRight:{points:["bl","tr"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}},topLeft:{points:["br","tl"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}}},lde=oe({compatConfig:{MODE:3},name:"KeywordTrigger",props:{loading:{type:Boolean,default:void 0},options:{type:Array,default:()=>[]},prefixCls:String,placement:String,visible:{type:Boolean,default:void 0},transitionName:String,getPopupContainer:Function,direction:String,dropdownClassName:String},setup(t,e){let{slots:n}=e;const i=()=>`${t.prefixCls}-dropdown`,o=()=>{const{options:a}=t;return C(ade,{prefixCls:i(),options:a},{notFoundContent:n.notFoundContent,option:n.option})},r=L(()=>{const{placement:a,direction:s}=t;let l="topRight";return s==="rtl"?l=a==="top"?"topLeft":"bottomLeft":l=a==="top"?"topRight":"bottomRight",l});return()=>{const{visible:a,transitionName:s,getPopupContainer:l}=t;return C(tl,{prefixCls:i(),popupVisible:a,popup:o(),popupClassName:t.dropdownClassName,popupPlacement:r.value,popupTransitionName:s,builtinPlacements:sde,getPopupContainer:l},{default:n.default})}}}),cde=Wn("top","bottom"),b6={autofocus:{type:Boolean,default:void 0},prefix:Z.oneOfType([Z.string,Z.arrayOf(Z.string)]),prefixCls:String,value:String,disabled:{type:Boolean,default:void 0},split:String,transitionName:String,placement:Z.oneOf(cde),character:Z.any,characterRender:Function,filterOption:{type:[Boolean,Function]},validateSearch:Function,getPopupContainer:{type:Function},options:xt(),loading:{type:Boolean,default:void 0},rows:[Number,String],direction:{type:String}},y6=A(A({},b6),{dropdownClassName:String}),x6={prefix:"@",split:" ",rows:1,validateSearch:ide,filterOption:()=>ode};ct(y6,x6);var wT=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{c.value=t.value});const u=T=>{n("change",T)},d=T=>{let{target:{value:M}}=T;u(M)},f=(T,M,I)=>{A(c,{measuring:!0,measureText:T,measurePrefix:M,measureLocation:I,activeIndex:0})},h=T=>{A(c,{measuring:!1,measureLocation:0,measureText:null}),T==null||T()},p=T=>{const{which:M}=T;if(c.measuring){if(M===Te.UP||M===Te.DOWN){const I=_.value.length,k=M===Te.UP?-1:1,E=(c.activeIndex+k+I)%I;c.activeIndex=E,T.preventDefault()}else if(M===Te.ESC)h();else if(M===Te.ENTER){if(T.preventDefault(),!_.value.length){h();return}const I=_.value[c.activeIndex];x(I)}}},g=T=>{const{key:M,which:I}=T,{measureText:k,measuring:E}=c,{prefix:R,validateSearch:D}=t,F=T.target;if(F.composing)return;const N=Jue(F),{location:B,prefix:z}=Que(N,R);if([Te.ESC,Te.UP,Te.DOWN,Te.ENTER].indexOf(I)===-1)if(B!==-1){const W=N.slice(B+z.length),j=D(W,t),U=!!S(W).length;j?(M===z||M==="Shift"||E||W!==k&&U)&&f(W,z,B):E&&h(),j&&n("search",W,z)}else E&&h()},m=T=>{c.measuring||n("pressenter",T)},v=T=>{y(T)},b=T=>{w(T)},y=T=>{clearTimeout(l.value);const{isFocus:M}=c;!M&&T&&n("focus",T),c.isFocus=!0},w=T=>{l.value=setTimeout(()=>{c.isFocus=!1,h(),n("blur",T)},100)},x=T=>{const{split:M}=t,{value:I=""}=T,{text:k,selectionLocation:E}=tde(c.value,{measureLocation:c.measureLocation,targetText:I,prefix:c.measurePrefix,selectionStart:s.value.getSelectionStart(),split:M});u(k),h(()=>{nde(s.value.input,E)}),n("select",T,c.measurePrefix)},$=T=>{c.activeIndex=T},S=T=>{const M=T||c.measureText||"",{filterOption:I}=t;return t.options.filter(E=>I?I(M,E):!0)},_=L(()=>S());return o({blur:()=>{s.value.blur()},focus:()=>{s.value.focus()}}),ot(v6,{activeIndex:Ue(c,"activeIndex"),setActiveIndex:$,selectOption:x,onFocus:y,onBlur:w,loading:Ue(t,"loading")}),ri(()=>{pt(()=>{c.measuring&&(a.value.scrollTop=s.value.getScrollTop())})}),()=>{const{measureLocation:T,measurePrefix:M,measuring:I}=c,{prefixCls:k,placement:E,transitionName:R,getPopupContainer:D,direction:F}=t,N=wT(t,["prefixCls","placement","transitionName","getPopupContainer","direction"]),{class:B,style:z}=i,W=wT(i,["class","style"]),j=ht(N,["value","prefix","split","validateSearch","filterOption","options","loading"]),U=A(A(A({},j),W),{onChange:ST,onSelect:ST,value:c.value,onInput:d,onBlur:b,onKeydown:p,onKeyup:g,onFocus:v,onPressenter:m});return C("div",{class:ce(k,B),style:z},[C(Ac,H(H({},U),{},{ref:s,tag:"textarea"}),null),I&&C("div",{ref:a,class:`${k}-measure`},[c.value.slice(0,T),C(lde,{prefixCls:k,transitionName:R,dropdownClassName:t.dropdownClassName,placement:E,options:I?_.value:[],visible:!0,direction:F,getPopupContainer:D},{default:()=>[C("span",null,[M])],notFoundContent:r.notFoundContent,option:r.option}),c.value.slice(T+M.length)])])}}}),dde={value:String,disabled:Boolean,payload:Fe()},w6=A(A({},dde),{label:Rt([])}),S6={name:"Option",props:w6,render(t,e){let{slots:n}=e;var i;return(i=n.default)===null||i===void 0?void 0:i.call(n)}};A({compatConfig:{MODE:3}},S6);const fde=t=>{const{componentCls:e,colorTextDisabled:n,controlItemBgHover:i,controlPaddingHorizontal:o,colorText:r,motionDurationSlow:a,lineHeight:s,controlHeight:l,inputPaddingHorizontal:c,inputPaddingVertical:u,fontSize:d,colorBgElevated:f,borderRadiusLG:h,boxShadowSecondary:p}=t,g=Math.round((t.controlHeight-t.fontSize*t.lineHeight)/2);return{[e]:A(A(A(A(A({},rt(t)),rl(t)),{position:"relative",display:"inline-block",height:"auto",padding:0,overflow:"hidden",lineHeight:s,whiteSpace:"pre-wrap",verticalAlign:"bottom"}),ef(t,e)),{"&-disabled":{"> textarea":A({},TS(t))},"&-focused":A({},Ta(t)),[`&-affix-wrapper ${e}-suffix`]:{position:"absolute",top:0,insetInlineEnd:c,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto"},[`> textarea, ${e}-measure`]:{color:r,boxSizing:"border-box",minHeight:l-2,margin:0,padding:`${u}px ${c}px`,overflow:"inherit",overflowX:"hidden",overflowY:"auto",fontWeight:"inherit",fontSize:"inherit",fontFamily:"inherit",fontStyle:"inherit",fontVariant:"inherit",fontSizeAdjust:"inherit",fontStretch:"inherit",lineHeight:"inherit",direction:"inherit",letterSpacing:"inherit",whiteSpace:"inherit",textAlign:"inherit",verticalAlign:"top",wordWrap:"break-word",wordBreak:"inherit",tabSize:"inherit"},"> textarea":A({width:"100%",border:"none",outline:"none",resize:"none",backgroundColor:"inherit"},PS(t.colorTextPlaceholder)),[`${e}-measure`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:-1,color:"transparent",pointerEvents:"none","> span":{display:"inline-block",minHeight:"1em"}},"&-dropdown":A(A({},rt(t)),{position:"absolute",top:-9999,insetInlineStart:-9999,zIndex:t.zIndexPopup,boxSizing:"border-box",fontSize:d,fontVariant:"initial",backgroundColor:f,borderRadius:h,outline:"none",boxShadow:p,"&-hidden":{display:"none"},[`${e}-dropdown-menu`]:{maxHeight:t.dropdownHeight,marginBottom:0,paddingInlineStart:0,overflow:"auto",listStyle:"none",outline:"none","&-item":A(A({},un),{position:"relative",display:"block",minWidth:t.controlItemWidth,padding:`${g}px ${o}px`,color:r,fontWeight:"normal",lineHeight:s,cursor:"pointer",transition:`background ${a} ease`,"&:hover":{backgroundColor:i},"&:first-child":{borderStartStartRadius:h,borderStartEndRadius:h,borderEndStartRadius:0,borderEndEndRadius:0},"&:last-child":{borderStartStartRadius:0,borderStartEndRadius:0,borderEndStartRadius:h,borderEndEndRadius:h},"&-disabled":{color:n,cursor:"not-allowed","&:hover":{color:n,backgroundColor:i,cursor:"not-allowed"}},"&-selected":{color:r,fontWeight:t.fontWeightStrong,backgroundColor:i},"&-active":{backgroundColor:i}})}})})}},hde=et("Mentions",t=>{const e=al(t);return[fde(e)]},t=>({dropdownHeight:250,controlItemWidth:100,zIndexPopup:t.zIndexPopupBase+50}));var CT=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o0&&arguments[0]!==void 0?arguments[0]:"",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{prefix:n="@",split:i=" "}=e,o=Array.isArray(n)?n:[n];return t.split(i).map(function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",a=null;return o.some(s=>r.slice(0,s.length)===s?(a=s,!0):!1),a!==null?{prefix:a,value:r.slice(a.length)}:null}).filter(r=>!!r&&!!r.value)},mde=()=>A(A({},b6),{loading:{type:Boolean,default:void 0},onFocus:{type:Function},onBlur:{type:Function},onSelect:{type:Function},onChange:{type:Function},onPressenter:{type:Function},"onUpdate:value":{type:Function},notFoundContent:Z.any,defaultValue:String,id:String,status:String}),Ub=oe({compatConfig:{MODE:3},name:"AMentions",inheritAttrs:!1,props:mde(),slots:Object,setup(t,e){let{slots:n,emit:i,attrs:o,expose:r}=e;var a,s;const{prefixCls:l,renderEmpty:c,direction:u}=Me("mentions",t),[d,f]=hde(l),h=ie(!1),p=ie(null),g=ie((s=(a=t.value)!==null&&a!==void 0?a:t.defaultValue)!==null&&s!==void 0?s:""),m=vn(),v=Mn.useInject(),b=L(()=>zo(v.status,t.status));tS({prefixCls:L(()=>`${l.value}-menu`),mode:L(()=>"vertical"),selectable:L(()=>!1),onClick:()=>{},validator:M=>{let{mode:I}=M}}),ye(()=>t.value,M=>{g.value=M});const y=M=>{h.value=!0,i("focus",M)},w=M=>{h.value=!1,i("blur",M),m.onFieldBlur()},x=function(){for(var M=arguments.length,I=new Array(M),k=0;k{t.value===void 0&&(g.value=M),i("update:value",M),i("change",M),m.onFieldChange()},S=()=>{const M=t.notFoundContent;return M!==void 0?M:n.notFoundContent?n.notFoundContent():c("Select")},_=()=>{var M;return Dt(((M=n.default)===null||M===void 0?void 0:M.call(n))||[]).map(I=>{var k,E;return A(A({},Bk(I)),{label:(E=(k=I.children)===null||k===void 0?void 0:k.default)===null||E===void 0?void 0:E.call(k)})})};r({focus:()=>{p.value.focus()},blur:()=>{p.value.blur()}});const T=L(()=>t.loading?pde:t.filterOption);return()=>{const{disabled:M,getPopupContainer:I,rows:k=1,id:E=m.id.value}=t,R=CT(t,["disabled","getPopupContainer","rows","id"]),{hasFeedback:D,feedbackIcon:F}=v,{class:N}=o,B=CT(o,["class"]),z=ht(R,["defaultValue","onUpdate:value","prefixCls"]),W=ce({[`${l.value}-disabled`]:M,[`${l.value}-focused`]:h.value,[`${l.value}-rtl`]:u.value==="rtl"},ei(l.value,b.value),!D&&N,f.value),j=A(A(A(A({prefixCls:l.value},z),{disabled:M,direction:u.value,filterOption:T.value,getPopupContainer:I,options:t.loading?[{value:"ANTDV_SEARCHING",disabled:!0,label:C(rr,{size:"small"},null)}]:t.options||_(),class:W}),B),{rows:k,onChange:$,onSelect:x,onFocus:y,onBlur:w,ref:p,value:g.value,id:E}),U=C(ude,H(H({},j),{},{dropdownClassName:f.value}),{notFoundContent:S,option:n.option});return d(D?C("div",{class:ce(`${l.value}-affix-wrapper`,ei(`${l.value}-affix-wrapper`,b.value,D),N,f.value)},[U,C("span",{class:`${l.value}-suffix`},[F])]):U)}}}),Wh=oe(A(A({compatConfig:{MODE:3}},S6),{name:"AMentionsOption",props:w6})),vde=A(Ub,{Option:Wh,getMentions:gde,install:t=>(t.component(Ub.name,Ub),t.component(Wh.name,Wh),t)});var bde=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{sx={x:t.pageX,y:t.pageY},setTimeout(()=>sx=null,100)};U4()&&Gt(document.documentElement,"click",yde,!0);const xde=()=>({prefixCls:String,visible:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},confirmLoading:{type:Boolean,default:void 0},title:Z.any,closable:{type:Boolean,default:void 0},closeIcon:Z.any,onOk:Function,onCancel:Function,"onUpdate:visible":Function,"onUpdate:open":Function,onChange:Function,afterClose:Function,centered:{type:Boolean,default:void 0},width:[String,Number],footer:Z.any,okText:Z.any,okType:String,cancelText:Z.any,icon:Z.any,maskClosable:{type:Boolean,default:void 0},forceRender:{type:Boolean,default:void 0},okButtonProps:Fe(),cancelButtonProps:Fe(),destroyOnClose:{type:Boolean,default:void 0},wrapClassName:String,maskTransitionName:String,transitionName:String,getContainer:{type:[String,Function,Boolean,Object],default:void 0},zIndex:Number,bodyStyle:Fe(),maskStyle:Fe(),mask:{type:Boolean,default:void 0},keyboard:{type:Boolean,default:void 0},wrapProps:Object,focusTriggerAfterClose:{type:Boolean,default:void 0},modalRender:Function,mousePosition:Fe()}),Tn=oe({compatConfig:{MODE:3},name:"AModal",inheritAttrs:!1,props:ct(xde(),{width:520,confirmLoading:!1,okType:"primary"}),setup(t,e){let{emit:n,slots:i,attrs:o}=e;const[r]=xo("Modal"),{prefixCls:a,rootPrefixCls:s,direction:l,getPopupContainer:c}=Me("modal",t),[u,d]=Oce(a);Gi(t.visible===void 0);const f=g=>{n("update:visible",!1),n("update:open",!1),n("cancel",g),n("change",!1)},h=g=>{n("ok",g)},p=()=>{var g,m;const{okText:v=(g=i.okText)===null||g===void 0?void 0:g.call(i),okType:b,cancelText:y=(m=i.cancelText)===null||m===void 0?void 0:m.call(i),confirmLoading:w}=t;return C(Qe,null,[C(nn,H({onClick:f},t.cancelButtonProps),{default:()=>[y||r.value.cancelText]}),C(nn,H(H({},Yp(b)),{},{loading:w,onClick:h},t.okButtonProps),{default:()=>[v||r.value.okText]})])};return()=>{var g,m;const{prefixCls:v,visible:b,open:y,wrapClassName:w,centered:x,getContainer:$,closeIcon:S=(g=i.closeIcon)===null||g===void 0?void 0:g.call(i),focusTriggerAfterClose:_=!0}=t,P=bde(t,["prefixCls","visible","open","wrapClassName","centered","getContainer","closeIcon","focusTriggerAfterClose"]),O=ce(w,{[`${a.value}-centered`]:!!x,[`${a.value}-wrap-rtl`]:l.value==="rtl"});return u(C(n6,H(H(H({},P),o),{},{rootClassName:d.value,class:ce(d.value,o.class),getContainer:$||(c==null?void 0:c.value),prefixCls:a.value,wrapClassName:O,visible:y??b,onClose:f,focusTriggerAfterClose:_,transitionName:oi(s.value,"zoom",t.transitionName),maskTransitionName:oi(s.value,"fade",t.maskTransitionName),mousePosition:(m=P.mousePosition)!==null&&m!==void 0?m:sx}),A(A({},i),{footer:i.footer||p,closeIcon:()=>C("span",{class:`${a.value}-close-x`},[S||C(ai,{class:`${a.value}-close-icon`},null)])})))}}}),C6=()=>{const t=ie(!1);return at(()=>{t.value=!0}),t},wde={type:{type:String},actionFn:Function,close:Function,autofocus:Boolean,prefixCls:String,buttonProps:Fe(),emitEvent:Boolean,quitOnNullishReturnValue:Boolean};function $T(t){return!!(t&&t.then)}const lx=oe({compatConfig:{MODE:3},name:"ActionButton",props:wde,setup(t,e){let{slots:n}=e;const i=ie(!1),o=ie(),r=ie(!1);let a;const s=C6();Ze(()=>{t.autofocus&&(a=setTimeout(()=>{var d,f;return(f=(d=gi(o.value))===null||d===void 0?void 0:d.focus)===null||f===void 0?void 0:f.call(d)}))}),at(()=>{clearTimeout(a)});const l=function(){for(var d,f=arguments.length,h=new Array(f),p=0;p{$T(d)&&(r.value=!0,d.then(function(){s.value||(r.value=!1),l(...arguments),i.value=!1},f=>(s.value||(r.value=!1),i.value=!1,Promise.reject(f))))},u=d=>{const{actionFn:f}=t;if(i.value)return;if(i.value=!0,!f){l();return}let h;if(t.emitEvent){if(h=f(d),t.quitOnNullishReturnValue&&!$T(h)){i.value=!1,l(d);return}}else if(f.length)h=f(t.close),i.value=!1;else if(h=f(),!h){l();return}c(h)};return()=>{const{type:d,prefixCls:f,buttonProps:h}=t;return C(nn,H(H(H({},Yp(d)),{},{onClick:u,loading:r.value,prefixCls:f},h),{},{ref:o}),n)}}});function ml(t){return typeof t=="function"?t():t}const $6=oe({name:"ConfirmDialog",inheritAttrs:!1,props:["icon","onCancel","onOk","close","closable","zIndex","afterClose","visible","open","keyboard","centered","getContainer","maskStyle","okButtonProps","cancelButtonProps","okType","prefixCls","okCancel","width","mask","maskClosable","okText","cancelText","autoFocusButton","transitionName","maskTransitionName","type","title","content","direction","rootPrefixCls","bodyStyle","closeIcon","modalRender","focusTriggerAfterClose","wrapClassName","confirmPrefixCls","footer"],setup(t,e){let{attrs:n}=e;const[i]=xo("Modal");return()=>{const{icon:o,onCancel:r,onOk:a,close:s,okText:l,closable:c=!1,zIndex:u,afterClose:d,keyboard:f,centered:h,getContainer:p,maskStyle:g,okButtonProps:m,cancelButtonProps:v,okCancel:b,width:y=416,mask:w=!0,maskClosable:x=!1,type:$,open:S,title:_,content:P,direction:O,closeIcon:T,modalRender:M,focusTriggerAfterClose:I,rootPrefixCls:k,bodyStyle:E,wrapClassName:R,footer:D}=t;let F=o;if(!o&&o!==null)switch($){case"info":F=C(La,null,null);break;case"success":F=C(Ho,null,null);break;case"error":F=C(si,null,null);break;default:F=C(Wo,null,null)}const N=t.okType||"primary",B=t.prefixCls||"ant-modal",z=`${B}-confirm`,W=n.style||{},j=b??$==="confirm",U=t.autoFocusButton===null?!1:t.autoFocusButton||"ok",V=`${B}-confirm`,q=ce(V,`${V}-${t.type}`,{[`${V}-rtl`]:O==="rtl"},n.class),Y=i.value,J=j&&C(lx,{actionFn:r,close:s,autofocus:U==="cancel",buttonProps:v,prefixCls:`${k}-btn`},{default:()=>[ml(t.cancelText)||Y.cancelText]});return C(Tn,{prefixCls:B,class:q,wrapClassName:ce({[`${V}-centered`]:!!h},R),onCancel:Q=>s==null?void 0:s({triggerCancel:!0},Q),open:S,title:"",footer:"",transitionName:oi(k,"zoom",t.transitionName),maskTransitionName:oi(k,"fade",t.maskTransitionName),mask:w,maskClosable:x,maskStyle:g,style:W,bodyStyle:E,width:y,zIndex:u,afterClose:d,keyboard:f,centered:h,getContainer:p,closable:c,closeIcon:T,modalRender:M,focusTriggerAfterClose:I},{default:()=>[C("div",{class:`${z}-body-wrapper`},[C("div",{class:`${z}-body`},[ml(F),_===void 0?null:C("span",{class:`${z}-title`},[ml(_)]),C("div",{class:`${z}-content`},[ml(P)])]),D!==void 0?ml(D):C("div",{class:`${z}-btns`},[J,C(lx,{type:N,actionFn:a,close:s,autofocus:U==="ok",buttonProps:m,prefixCls:`${k}-btn`},{default:()=>[ml(l)||(j?Y.okText:Y.justOkText)]})])])]})}}}),gs=[],lf=t=>{const e=document.createDocumentFragment();let n=A(A({},ht(t,["parentContext","appContext"])),{close:r,open:!0}),i=null;function o(){i&&(Pa(null,e),i=null);for(var c=arguments.length,u=new Array(c),d=0;dh&&h.triggerCancel);t.onCancel&&f&&t.onCancel(()=>{},...u.slice(1));for(let h=0;h{typeof t.afterClose=="function"&&t.afterClose(),o.apply(this,u)}}),n.visible&&delete n.visible,a(n)}function a(c){typeof c=="function"?n=c(n):n=A(A({},n),c),i&&vj(i,n,e)}const s=c=>{const u=Fn,d=u.prefixCls,f=c.prefixCls||`${d}-modal`,h=u.iconPrefixCls,p=Mae();return C(As,H(H({},u),{},{prefixCls:d}),{default:()=>[C($6,H(H({},c),{},{rootPrefixCls:d,prefixCls:f,iconPrefixCls:h,locale:p,cancelText:c.cancelText||p.cancelText}),null)]})};function l(c){const u=C(s,A({},c));return u.appContext=t.parentContext||t.appContext||u.appContext,Pa(u,e),u}return i=l(n),gs.push(r),{destroy:r,update:a}};function A6(t){return A(A({},t),{type:"warning"})}function _6(t){return A(A({},t),{type:"info"})}function P6(t){return A(A({},t),{type:"success"})}function T6(t){return A(A({},t),{type:"error"})}function O6(t){return A(A({},t),{type:"confirm"})}const Sde=()=>({config:Object,afterClose:Function,destroyAction:Function,open:Boolean}),Cde=oe({name:"HookModal",inheritAttrs:!1,props:ct(Sde(),{config:{width:520,okType:"primary"}}),setup(t,e){let{expose:n}=e;var i;const o=L(()=>t.open),r=L(()=>t.config),{direction:a,getPrefixCls:s}=rm(),l=s("modal"),c=s(),u=()=>{var p,g;t==null||t.afterClose(),(g=(p=r.value).afterClose)===null||g===void 0||g.call(p)},d=function(){t.destroyAction(...arguments)};n({destroy:d});const f=(i=r.value.okCancel)!==null&&i!==void 0?i:r.value.type==="confirm",[h]=xo("Modal",bi.Modal);return()=>C($6,H(H({prefixCls:l,rootPrefixCls:c},r.value),{},{close:d,open:o.value,afterClose:u,okText:r.value.okText||(f?h==null?void 0:h.value.okText:h==null?void 0:h.value.justOkText),direction:r.value.direction||a.value,cancelText:r.value.cancelText||(h==null?void 0:h.value.cancelText)}),null)}});let AT=0;const $de=oe({name:"ElementsHolder",inheritAttrs:!1,setup(t,e){let{expose:n}=e;const i=ie([]);return n({addModal:r=>(i.value.push(r),i.value=i.value.slice(),()=>{i.value=i.value.filter(a=>a!==r)})}),()=>i.value.map(r=>r())}});function E6(){const t=ie(null),e=ie([]);ye(e,()=>{e.value.length&&([...e.value].forEach(a=>{a()}),e.value=[])},{immediate:!0});const n=r=>function(s){var l;AT+=1;const c=ie(!0),u=ie(null),d=ie(Yt(s)),f=ie({});ye(()=>s,y=>{m(A(A({},en(y)?y.value:y),f.value))});const h=function(){c.value=!1;for(var y=arguments.length,w=new Array(y),x=0;xS&&S.triggerCancel);d.value.onCancel&&$&&d.value.onCancel(()=>{},...w.slice(1))};let p;const g=()=>C(Cde,{key:`modal-${AT}`,config:r(d.value),ref:u,open:c.value,destroyAction:h,afterClose:()=>{p==null||p()}},null);p=(l=t.value)===null||l===void 0?void 0:l.addModal(g),p&&gs.push(p);const m=y=>{d.value=A(A({},d.value),y)};return{destroy:()=>{u.value?h():e.value=[...e.value,h]},update:y=>{f.value=y,u.value?m(y):e.value=[...e.value,()=>m(y)]}}},i=L(()=>({info:n(_6),success:n(P6),error:n(T6),warning:n(A6),confirm:n(O6)})),o=Symbol("modalHolderKey");return[i.value,()=>C($de,{key:o,ref:t},null)]}function M6(t){return lf(A6(t))}Tn.useModal=E6;Tn.info=function(e){return lf(_6(e))};Tn.success=function(e){return lf(P6(e))};Tn.error=function(e){return lf(T6(e))};Tn.warning=M6;Tn.warn=M6;Tn.confirm=function(e){return lf(O6(e))};Tn.destroyAll=function(){for(;gs.length;){const e=gs.pop();e&&e()}};Tn.install=function(t){return t.component(Tn.name,Tn),t};const I6=t=>{const{value:e,formatter:n,precision:i,decimalSeparator:o,groupSeparator:r="",prefixCls:a}=t;let s;if(typeof n=="function")s=n({value:e});else{const l=String(e),c=l.match(/^(-?)(\d*)(\.(\d+))?$/);if(!c)s=l;else{const u=c[1];let d=c[2]||"0",f=c[4]||"";d=d.replace(/\B(?=(\d{3})+(?!\d))/g,r),typeof i=="number"&&(f=f.padEnd(i,"0").slice(0,i>0?i:0)),f&&(f=`${o}${f}`),s=[C("span",{key:"int",class:`${a}-content-value-int`},[u,d]),f&&C("span",{key:"decimal",class:`${a}-content-value-decimal`},[f])]}}return C("span",{class:`${a}-content-value`},[s])};I6.displayName="StatisticNumber";const Ade=t=>{const{componentCls:e,marginXXS:n,padding:i,colorTextDescription:o,statisticTitleFontSize:r,colorTextHeading:a,statisticContentFontSize:s,statisticFontFamily:l}=t;return{[`${e}`]:A(A({},rt(t)),{[`${e}-title`]:{marginBottom:n,color:o,fontSize:r},[`${e}-skeleton`]:{paddingTop:i},[`${e}-content`]:{color:a,fontSize:s,fontFamily:l,[`${e}-content-value`]:{display:"inline-block",direction:"ltr"},[`${e}-content-prefix, ${e}-content-suffix`]:{display:"inline-block"},[`${e}-content-prefix`]:{marginInlineEnd:n},[`${e}-content-suffix`]:{marginInlineStart:n}}})}},_de=et("Statistic",t=>{const{fontSizeHeading3:e,fontSize:n,fontFamily:i}=t,o=Ve(t,{statisticTitleFontSize:n,statisticContentFontSize:e,statisticFontFamily:i});return[Ade(o)]}),k6=()=>({prefixCls:String,decimalSeparator:String,groupSeparator:String,format:String,value:Xe([Number,String,Object]),valueStyle:{type:Object,default:void 0},valueRender:ve(),formatter:Rt(),precision:Number,prefix:Zn(),suffix:Zn(),title:Zn(),loading:Ce()}),_r=oe({compatConfig:{MODE:3},name:"AStatistic",inheritAttrs:!1,props:ct(k6(),{decimalSeparator:".",groupSeparator:",",loading:!1}),slots:Object,setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,direction:r}=Me("statistic",t),[a,s]=_de(o);return()=>{var l,c,u,d,f,h,p;const{value:g=0,valueStyle:m,valueRender:v}=t,b=o.value,y=(l=t.title)!==null&&l!==void 0?l:(c=n.title)===null||c===void 0?void 0:c.call(n),w=(u=t.prefix)!==null&&u!==void 0?u:(d=n.prefix)===null||d===void 0?void 0:d.call(n),x=(f=t.suffix)!==null&&f!==void 0?f:(h=n.suffix)===null||h===void 0?void 0:h.call(n),$=(p=t.formatter)!==null&&p!==void 0?p:n.formatter;let S=C(I6,H({"data-for-update":Date.now()},A(A({},t),{prefixCls:b,value:g,formatter:$})),null);return v&&(S=v(S)),a(C("div",H(H({},i),{},{class:[b,{[`${b}-rtl`]:r.value==="rtl"},i.class,s.value]}),[y&&C("div",{class:`${b}-title`},[y]),C(Un,{paragraph:!1,loading:t.loading},{default:()=>[C("div",{style:m,class:`${b}-content`},[w&&C("span",{class:`${b}-content-prefix`},[w]),S,x&&C("span",{class:`${b}-content-suffix`},[x])])]})]))}}}),Pde=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function Tde(t,e){let n=t;const i=/\[[^\]]*]/g,o=(e.match(i)||[]).map(l=>l.slice(1,-1)),r=e.replace(i,"[]"),a=Pde.reduce((l,c)=>{let[u,d]=c;if(l.includes(u)){const f=Math.floor(n/d);return n-=f*d,l.replace(new RegExp(`${u}+`,"g"),h=>{const p=h.length;return f.toString().padStart(p,"0")})}return l},r);let s=0;return a.replace(i,()=>{const l=o[s];return s+=1,l})}function Ode(t,e){const{format:n=""}=e,i=new Date(t).getTime(),o=Date.now(),r=Math.max(i-o,0);return Tde(r,n)}const Ede=1e3/30;function qb(t){return new Date(t).getTime()}const Mde=()=>A(A({},k6()),{value:Xe([Number,String,Object]),format:String,onFinish:Function,onChange:Function}),Ide=oe({compatConfig:{MODE:3},name:"AStatisticCountdown",props:ct(Mde(),{format:"HH:mm:ss"}),setup(t,e){let{emit:n,slots:i}=e;const o=se(),r=se(),a=()=>{const{value:d}=t;qb(d)>=Date.now()?s():l()},s=()=>{if(o.value)return;const d=qb(t.value);o.value=setInterval(()=>{r.value.$forceUpdate(),d>Date.now()&&n("change",d-Date.now()),a()},Ede)},l=()=>{const{value:d}=t;o.value&&(clearInterval(o.value),o.value=void 0,qb(d){let{value:f,config:h}=d;const{format:p}=t;return Ode(f,A(A({},h),{format:p}))},u=d=>d;return Ze(()=>{a()}),ri(()=>{a()}),at(()=>{l()}),()=>{const d=t.value;return C(_r,H({ref:r},A(A({},ht(t,["onFinish","onChange"])),{value:d,valueRender:u,formatter:c})),i)}}});_r.Countdown=Ide;_r.install=function(t){return t.component(_r.name,_r),t.component(_r.Countdown.name,_r.Countdown),t};const kde=_r.Countdown;var Dde={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};function _T(t){for(var e=1;e{const{keyCode:h}=f;h===Te.ENTER&&f.preventDefault()},l=f=>{const{keyCode:h}=f;h===Te.ENTER&&i("click",f)},c=f=>{i("click",f)},u=()=>{a.value&&a.value.focus()},d=()=>{a.value&&a.value.blur()};return Ze(()=>{t.autofocus&&u()}),r({focus:u,blur:d}),()=>{var f;const{noStyle:h,disabled:p}=t,g=Nde(t,["noStyle","disabled"]);let m={};return h||(m=A({},Bde)),p&&(m.pointerEvents="none"),C("div",H(H(H({role:"button",tabindex:0,ref:a},g),o),{},{onClick:c,onKeydown:s,onKeyup:l,style:A(A({},m),o.style||{})}),[(f=n.default)===null||f===void 0?void 0:f.call(n)])}}}),zde={small:8,middle:16,large:24},Hde=()=>({prefixCls:String,size:{type:[String,Number,Array]},direction:Z.oneOf(Wn("horizontal","vertical")).def("horizontal"),align:Z.oneOf(Wn("start","end","center","baseline")),wrap:Ce()});function Wde(t){return typeof t=="string"?zde[t]:t||0}const ec=oe({compatConfig:{MODE:3},name:"ASpace",inheritAttrs:!1,props:Hde(),slots:Object,setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,space:r,direction:a}=Me("space",t),[s,l]=NR(o),c=Z4(),u=L(()=>{var v,b,y;return(y=(v=t.size)!==null&&v!==void 0?v:(b=r==null?void 0:r.value)===null||b===void 0?void 0:b.size)!==null&&y!==void 0?y:"small"}),d=se(),f=se();ye(u,()=>{[d.value,f.value]=(Array.isArray(u.value)?u.value:[u.value,u.value]).map(v=>Wde(v))},{immediate:!0});const h=L(()=>t.align===void 0&&t.direction==="horizontal"?"center":t.align),p=L(()=>ce(o.value,l.value,`${o.value}-${t.direction}`,{[`${o.value}-rtl`]:a.value==="rtl",[`${o.value}-align-${h.value}`]:h.value})),g=L(()=>a.value==="rtl"?"marginLeft":"marginRight"),m=L(()=>{const v={};return c.value&&(v.columnGap=`${d.value}px`,v.rowGap=`${f.value}px`),A(A({},v),t.wrap&&{flexWrap:"wrap",marginBottom:`${-f.value}px`})});return()=>{var v,b;const{wrap:y,direction:w="horizontal"}=t,x=(v=n.default)===null||v===void 0?void 0:v.call(n),$=Kt(x),S=$.length;if(S===0)return null;const _=(b=n.split)===null||b===void 0?void 0:b.call(n),P=`${o.value}-item`,O=d.value,T=S-1;return C("div",H(H({},i),{},{class:[p.value,i.class],style:[m.value,i.style]}),[$.map((M,I)=>{let k=x.indexOf(M);k===-1&&(k=`$$space-${I}`);let E={};return c.value||(w==="vertical"?I{const{componentCls:e,antCls:n}=t;return{[e]:A(A({},rt(t)),{position:"relative",padding:`${t.pageHeaderPaddingVertical}px ${t.pageHeaderPadding}px`,backgroundColor:t.colorBgContainer,[`&${e}-ghost`]:{backgroundColor:t.pageHeaderGhostBg},"&.has-footer":{paddingBottom:0},[`${e}-back`]:{marginRight:t.marginMD,fontSize:t.fontSizeLG,lineHeight:1,"&-button":A(A({},dm(t)),{color:t.pageHeaderBackColor,cursor:"pointer"})},[`${n}-divider-vertical`]:{height:"14px",margin:`0 ${t.marginSM}`,verticalAlign:"middle"},[`${n}-breadcrumb + &-heading`]:{marginTop:t.marginXS},[`${e}-heading`]:{display:"flex",justifyContent:"space-between","&-left":{display:"flex",alignItems:"center",margin:`${t.marginXS/2}px 0`,overflow:"hidden"},"&-title":A({marginRight:t.marginSM,marginBottom:0,color:t.colorTextHeading,fontWeight:600,fontSize:t.pageHeaderHeadingTitle,lineHeight:`${t.controlHeight}px`},un),[`${n}-avatar`]:{marginRight:t.marginSM},"&-sub-title":A({marginRight:t.marginSM,color:t.colorTextDescription,fontSize:t.pageHeaderHeadingSubTitle,lineHeight:t.lineHeight},un),"&-extra":{margin:`${t.marginXS/2}px 0`,whiteSpace:"nowrap","> *":{marginLeft:t.marginSM,whiteSpace:"unset"},"> *:first-child":{marginLeft:0}}},[`${e}-content`]:{paddingTop:t.pageHeaderContentPaddingVertical},[`${e}-footer`]:{marginTop:t.marginMD,[`${n}-tabs`]:{[`> ${n}-tabs-nav`]:{margin:0,"&::before":{border:"none"}},[`${n}-tabs-tab`]:{paddingTop:t.paddingXS,paddingBottom:t.paddingXS,fontSize:t.pageHeaderTabFontSize}}},[`${e}-compact ${e}-heading`]:{flexWrap:"wrap"},[`&${t.componentCls}-rtl`]:{direction:"rtl"}})}},Vde=et("PageHeader",t=>{const e=Ve(t,{pageHeaderPadding:t.paddingLG,pageHeaderPaddingVertical:t.paddingMD,pageHeaderPaddingBreadcrumb:t.paddingSM,pageHeaderContentPaddingVertical:t.paddingSM,pageHeaderBackColor:t.colorTextBase,pageHeaderGhostBg:"transparent",pageHeaderHeadingTitle:t.fontSizeHeading4,pageHeaderHeadingSubTitle:t.fontSize,pageHeaderTabFontSize:t.fontSizeLG});return[jde(e)]}),Xde=()=>({backIcon:Zn(),prefixCls:String,title:Zn(),subTitle:Zn(),breadcrumb:Z.object,tags:Zn(),footer:Zn(),extra:Zn(),avatar:Fe(),ghost:{type:Boolean,default:void 0},onBack:Function}),Yde=oe({compatConfig:{MODE:3},name:"APageHeader",inheritAttrs:!1,props:Xde(),slots:Object,setup(t,e){let{emit:n,slots:i,attrs:o}=e;const{prefixCls:r,direction:a,pageHeader:s}=Me("page-header",t),[l,c]=Vde(r),u=ie(!1),d=C6(),f=w=>{let{width:x}=w;d.value||(u.value=x<768)},h=L(()=>{var w,x,$;return($=(w=t.ghost)!==null&&w!==void 0?w:(x=s==null?void 0:s.value)===null||x===void 0?void 0:x.ghost)!==null&&$!==void 0?$:!0}),p=()=>{var w,x,$;return($=(w=t.backIcon)!==null&&w!==void 0?w:(x=i.backIcon)===null||x===void 0?void 0:x.call(i))!==null&&$!==void 0?$:a.value==="rtl"?C(mC,null,null):C(gC,null,null)},g=w=>!w||!t.onBack?null:C(Us,{componentName:"PageHeader",children:x=>{let{back:$}=x;return C("div",{class:`${r.value}-back`},[C(vg,{onClick:S=>{n("back",S)},class:`${r.value}-back-button`,"aria-label":$},{default:()=>[w]})])}},null),m=()=>{var w;return t.breadcrumb?C(Cs,t.breadcrumb,null):(w=i.breadcrumb)===null||w===void 0?void 0:w.call(i)},v=()=>{var w,x,$,S,_,P,O,T,M;const{avatar:I}=t,k=(w=t.title)!==null&&w!==void 0?w:(x=i.title)===null||x===void 0?void 0:x.call(i),E=($=t.subTitle)!==null&&$!==void 0?$:(S=i.subTitle)===null||S===void 0?void 0:S.call(i),R=(_=t.tags)!==null&&_!==void 0?_:(P=i.tags)===null||P===void 0?void 0:P.call(i),D=(O=t.extra)!==null&&O!==void 0?O:(T=i.extra)===null||T===void 0?void 0:T.call(i),F=`${r.value}-heading`,N=k||E||R||D;if(!N)return null;const B=p(),z=g(B);return C("div",{class:F},[(z||I||N)&&C("div",{class:`${F}-left`},[z,I?C(Ss,I,null):(M=i.avatar)===null||M===void 0?void 0:M.call(i),k&&C("span",{class:`${F}-title`,title:typeof k=="string"?k:void 0},[k]),E&&C("span",{class:`${F}-sub-title`,title:typeof E=="string"?E:void 0},[E]),R&&C("span",{class:`${F}-tags`},[R])]),D&&C("span",{class:`${F}-extra`},[C(ec,null,{default:()=>[D]})])])},b=()=>{var w,x;const $=(w=t.footer)!==null&&w!==void 0?w:Kt((x=i.footer)===null||x===void 0?void 0:x.call(i));return r7($)?null:C("div",{class:`${r.value}-footer`},[$])},y=w=>C("div",{class:`${r.value}-content`},[w]);return()=>{var w,x;const $=((w=t.breadcrumb)===null||w===void 0?void 0:w.routes)||i.breadcrumb,S=t.footer||i.footer,_=Dt((x=i.default)===null||x===void 0?void 0:x.call(i)),P=ce(r.value,{"has-breadcrumb":$,"has-footer":S,[`${r.value}-ghost`]:h.value,[`${r.value}-rtl`]:a.value==="rtl",[`${r.value}-compact`]:u.value},o.class,c.value);return l(C(mo,{onResize:f},{default:()=>[C("div",H(H({},o),{},{class:P}),[m(),v(),_.length?y(_):null,b()])]}))}}}),Gde=Vt(Yde),Kde=t=>{const{componentCls:e,iconCls:n,zIndexPopup:i,colorText:o,colorWarning:r,marginXS:a,fontSize:s,fontWeightStrong:l,lineHeight:c}=t;return{[e]:{zIndex:i,[`${e}-inner-content`]:{color:o},[`${e}-message`]:{position:"relative",marginBottom:a,color:o,fontSize:s,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${e}-message-icon ${n}`]:{color:r,fontSize:s,flex:"none",lineHeight:1,paddingTop:(Math.round(s*c)-s)/2},"&-title":{flex:"auto",marginInlineStart:a},"&-title-only":{fontWeight:l}},[`${e}-description`]:{position:"relative",marginInlineStart:s+a,marginBottom:a,color:o,fontSize:s},[`${e}-buttons`]:{textAlign:"end",button:{marginInlineStart:a}}}}},Ude=et("Popconfirm",t=>Kde(t),t=>{const{zIndexPopupBase:e}=t;return{zIndexPopup:e+60}});var qde=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);oA(A({},G1()),{prefixCls:String,content:Rt(),title:Rt(),description:Rt(),okType:Ne("primary"),disabled:{type:Boolean,default:!1},okText:Rt(),cancelText:Rt(),icon:Rt(),okButtonProps:Fe(),cancelButtonProps:Fe(),showCancel:{type:Boolean,default:!0},onConfirm:Function,onCancel:Function}),Jde=oe({compatConfig:{MODE:3},name:"APopconfirm",inheritAttrs:!1,props:ct(Zde(),A(A({},c3()),{trigger:"click",placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0,okType:"primary",disabled:!1})),slots:Object,setup(t,e){let{slots:n,emit:i,expose:o,attrs:r}=e;const a=se();Gi(t.visible===void 0),o({getPopupDomNode:()=>{var $,S;return(S=($=a.value)===null||$===void 0?void 0:$.getPopupDomNode)===null||S===void 0?void 0:S.call($)}});const[s,l]=jt(!1,{value:Ue(t,"open")}),c=($,S)=>{t.open===void 0&&l($),i("update:open",$),i("openChange",$,S)},u=$=>{c(!1,$)},d=$=>{var S;return(S=t.onConfirm)===null||S===void 0?void 0:S.call(t,$)},f=$=>{var S;c(!1,$),(S=t.onCancel)===null||S===void 0||S.call(t,$)},h=$=>{$.keyCode===Te.ESC&&s&&c(!1,$)},p=$=>{const{disabled:S}=t;S||c($)},{prefixCls:g,getPrefixCls:m}=Me("popconfirm",t),v=L(()=>m()),b=L(()=>m("btn")),[y]=Ude(g),[w]=xo("Popconfirm",bi.Popconfirm),x=()=>{var $,S,_,P,O;const{okButtonProps:T,cancelButtonProps:M,title:I=($=n.title)===null||$===void 0?void 0:$.call(n),description:k=(S=n.description)===null||S===void 0?void 0:S.call(n),cancelText:E=(_=n.cancel)===null||_===void 0?void 0:_.call(n),okText:R=(P=n.okText)===null||P===void 0?void 0:P.call(n),okType:D,icon:F=((O=n.icon)===null||O===void 0?void 0:O.call(n))||C(Wo,null,null),showCancel:N=!0}=t,{cancelButton:B,okButton:z}=n,W=A({onClick:f,size:"small"},M),j=A(A(A({onClick:d},Yp(D)),{size:"small"}),T);return C("div",{class:`${g.value}-inner-content`},[C("div",{class:`${g.value}-message`},[F&&C("span",{class:`${g.value}-message-icon`},[F]),C("div",{class:[`${g.value}-message-title`,{[`${g.value}-message-title-only`]:!!k}]},[I])]),k&&C("div",{class:`${g.value}-description`},[k]),C("div",{class:`${g.value}-buttons`},[N?B?B(W):C(nn,W,{default:()=>[E||w.value.cancelText]}):null,z?z(j):C(lx,{buttonProps:A(A({size:"small"},Yp(D)),T),actionFn:d,close:u,prefixCls:b.value,quitOnNullishReturnValue:!0,emitEvent:!0},{default:()=>[R||w.value.okText]})])])};return()=>{var $;const{placement:S,overlayClassName:_,trigger:P="click"}=t,O=qde(t,["placement","overlayClassName","trigger"]),T=ht(O,["title","content","cancelText","okText","onUpdate:open","onConfirm","onCancel","prefixCls"]),M=ce(g.value,_);return y(C(Z1,H(H(H({},T),r),{},{trigger:P,placement:S,onOpenChange:p,open:s.value,overlayClassName:M,transitionName:oi(v.value,"zoom-big",t.transitionName),ref:a,"data-popover-inject":!0}),{default:()=>[mj((($=n.default)===null||$===void 0?void 0:$.call(n))||[],{onKeydown:I=>{h(I)}},!1)],content:x}))}}}),Qde=Vt(Jde),efe=["normal","exception","active","success"],lv=()=>({prefixCls:String,type:Ne(),percent:Number,format:ve(),status:Ne(),showInfo:Ce(),strokeWidth:Number,strokeLinecap:Ne(),strokeColor:Rt(),trailColor:String,width:Number,success:Fe(),gapDegree:Number,gapPosition:Ne(),size:Xe([String,Number,Array]),steps:Number,successPercent:Number,title:String,progressStatus:Ne()});function _s(t){return!t||t<0?0:t>100?100:t}function bg(t){let{success:e,successPercent:n}=t,i=n;return e&&"progress"in e&&(Nt(!1,"Progress","`success.progress` is deprecated. Please use `success.percent` instead."),i=e.progress),e&&"percent"in e&&(i=e.percent),i}function tfe(t){let{percent:e,success:n,successPercent:i}=t;const o=_s(bg({success:n,successPercent:i}));return[o,_s(_s(e)-o)]}function nfe(t){let{success:e={},strokeColor:n}=t;const{strokeColor:i}=e;return[i||Vl.green,n||null]}const cv=(t,e,n)=>{var i,o,r,a;let s=-1,l=-1;if(e==="step"){const c=n.steps,u=n.strokeWidth;typeof t=="string"||typeof t>"u"?(s=t==="small"?2:14,l=u??8):typeof t=="number"?[s,l]=[t,t]:[s=14,l=8]=t,s*=c}else if(e==="line"){const c=n==null?void 0:n.strokeWidth;typeof t=="string"||typeof t>"u"?l=c||(t==="small"?6:8):typeof t=="number"?[s,l]=[t,t]:[s=-1,l=8]=t}else(e==="circle"||e==="dashboard")&&(typeof t=="string"||typeof t>"u"?[s,l]=t==="small"?[60,60]:[120,120]:typeof t=="number"?[s,l]=[t,t]:(s=(o=(i=t[0])!==null&&i!==void 0?i:t[1])!==null&&o!==void 0?o:120,l=(a=(r=t[0])!==null&&r!==void 0?r:t[1])!==null&&a!==void 0?a:120));return{width:s,height:l}};var ife=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);oA(A({},lv()),{strokeColor:Rt(),direction:Ne()}),rfe=t=>{let e=[];return Object.keys(t).forEach(n=>{const i=parseFloat(n.replace(/%/g,""));isNaN(i)||e.push({key:i,value:t[n]})}),e=e.sort((n,i)=>n.key-i.key),e.map(n=>{let{key:i,value:o}=n;return`${o} ${i}%`}).join(", ")},afe=(t,e)=>{const{from:n=Vl.blue,to:i=Vl.blue,direction:o=e==="rtl"?"to left":"to right"}=t,r=ife(t,["from","to","direction"]);if(Object.keys(r).length!==0){const a=rfe(r);return{backgroundImage:`linear-gradient(${o}, ${a})`}}return{backgroundImage:`linear-gradient(${o}, ${n}, ${i})`}},sfe=oe({compatConfig:{MODE:3},name:"ProgressLine",inheritAttrs:!1,props:ofe(),setup(t,e){let{slots:n,attrs:i}=e;const o=L(()=>{const{strokeColor:h,direction:p}=t;return h&&typeof h!="string"?afe(h,p):{backgroundColor:h}}),r=L(()=>t.strokeLinecap==="square"||t.strokeLinecap==="butt"?0:void 0),a=L(()=>t.trailColor?{backgroundColor:t.trailColor}:void 0),s=L(()=>{var h;return(h=t.size)!==null&&h!==void 0?h:[-1,t.strokeWidth||(t.size==="small"?6:8)]}),l=L(()=>cv(s.value,"line",{strokeWidth:t.strokeWidth})),c=L(()=>{const{percent:h}=t;return A({width:`${_s(h)}%`,height:`${l.value.height}px`,borderRadius:r.value},o.value)}),u=L(()=>bg(t)),d=L(()=>{const{success:h}=t;return{width:`${_s(u.value)}%`,height:`${l.value.height}px`,borderRadius:r.value,backgroundColor:h==null?void 0:h.strokeColor}}),f={width:l.value.width<0?"100%":l.value.width,height:`${l.value.height}px`};return()=>{var h;return C(Qe,null,[C("div",H(H({},i),{},{class:[`${t.prefixCls}-outer`,i.class],style:[i.style,f]}),[C("div",{class:`${t.prefixCls}-inner`,style:a.value},[C("div",{class:`${t.prefixCls}-bg`,style:c.value},null),u.value!==void 0?C("div",{class:`${t.prefixCls}-success-bg`,style:d.value},null):null])]),(h=n.default)===null||h===void 0?void 0:h.call(n)])}}}),lfe={percent:0,prefixCls:"vc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1},cfe=t=>{const e=se(null);return ri(()=>{const n=Date.now();let i=!1;t.value.forEach(o=>{const r=(o==null?void 0:o.$el)||o;if(!r)return;i=!0;const a=r.style;a.transitionDuration=".3s, .3s, .3s, .06s",e.value&&n-e.value<100&&(a.transitionDuration="0s, 0s")}),i&&(e.value=Date.now())}),t},ufe={gapDegree:Number,gapPosition:{type:String},percent:{type:[Array,Number]},prefixCls:String,strokeColor:{type:[Object,String,Array]},strokeLinecap:{type:String},strokeWidth:Number,trailColor:String,trailWidth:Number,transition:String};var dfe=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o4&&arguments[4]!==void 0?arguments[4]:0,r=arguments.length>5?arguments[5]:void 0;const a=50-i/2;let s=0,l=-a,c=0,u=-2*a;switch(r){case"left":s=-a,l=0,c=2*a,u=0;break;case"right":s=a,l=0,c=-2*a,u=0;break;case"bottom":l=a,u=2*a;break}const d=`M 50,50 m ${s},${l} + `]:{display:"inline-block",minWidth:t.paginationItemSize,height:t.paginationItemSize,color:t.colorText,fontFamily:t.paginationFontFamily,lineHeight:`${t.paginationItemSize}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:t.borderRadius,cursor:"pointer",transition:`all ${t.motionDurationMid}`},[`${e}-prev, ${e}-next`]:{fontFamily:"Arial, Helvetica, sans-serif",outline:0,button:{color:t.colorText,cursor:"pointer",userSelect:"none"},[`${e}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:t.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${t.lineWidth}px ${t.lineType} transparent`,borderRadius:t.borderRadius,outline:"none",transition:`all ${t.motionDurationMid}`},[`&:focus-visible ${e}-item-link`]:A({},zr(t)),[`&:hover ${e}-item-link`]:{backgroundColor:t.colorBgTextHover},[`&:active ${e}-item-link`]:{backgroundColor:t.colorBgTextActive},[`&${e}-disabled:hover`]:{[`${e}-item-link`]:{backgroundColor:"transparent"}}},[`${e}-slash`]:{marginInlineEnd:t.paginationSlashMarginInlineEnd,marginInlineStart:t.paginationSlashMarginInlineStart},[`${e}-options`]:{display:"inline-block",marginInlineStart:t.margin,verticalAlign:"middle","&-size-changer.-select":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:t.controlHeight,marginInlineStart:t.marginXS,lineHeight:`${t.controlHeight}px`,verticalAlign:"top",input:A(A({},rl(t)),{width:t.controlHeightLG*1.25,height:t.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:t.marginXS,marginInlineEnd:t.marginXS})}}}},Fue=t=>{const{componentCls:e}=t;return{[`${e}-item`]:A(A({display:"inline-block",minWidth:t.paginationItemSize,height:t.paginationItemSize,marginInlineEnd:t.marginXS,fontFamily:t.paginationFontFamily,lineHeight:`${t.paginationItemSize-2}px`,textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:"transparent",border:`${t.lineWidth}px ${t.lineType} transparent`,borderRadius:t.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${t.paginationItemPaddingInline}px`,color:t.colorText,transition:"none","&:hover":{textDecoration:"none"}},[`&:not(${e}-item-active)`]:{"&:hover":{transition:`all ${t.motionDurationMid}`,backgroundColor:t.colorBgTextHover},"&:active":{backgroundColor:t.colorBgTextActive}}},Hr(t)),{"&-active":{fontWeight:t.paginationFontWeightActive,backgroundColor:t.paginationItemBgActive,borderColor:t.colorPrimary,a:{color:t.colorPrimary},"&:hover":{borderColor:t.colorPrimaryHover},"&:hover a":{color:t.colorPrimaryHover}}})}},Nue=t=>{const{componentCls:e}=t;return{[e]:A(A(A(A(A(A(A(A({},rt(t)),{"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${e}-total-text`]:{display:"inline-block",height:t.paginationItemSize,marginInlineEnd:t.marginXS,lineHeight:`${t.paginationItemSize-2}px`,verticalAlign:"middle"}}),Fue(t)),Lue(t)),Rue(t)),Due(t)),kue(t)),{[`@media only screen and (max-width: ${t.screenLG}px)`]:{[`${e}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${t.screenSM}px)`]:{[`${e}-options`]:{display:"none"}}}),[`&${t.componentCls}-rtl`]:{direction:"rtl"}}},Bue=t=>{const{componentCls:e}=t;return{[`${e}${e}-disabled`]:{"&, &:hover":{[`${e}-item-link`]:{borderColor:t.colorBorder}},"&:focus-visible":{[`${e}-item-link`]:{borderColor:t.colorBorder}},[`${e}-item, ${e}-item-link`]:{backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder,[`&:hover:not(${e}-item-active)`]:{backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder,a:{color:t.colorTextDisabled}},[`&${e}-item-active`]:{backgroundColor:t.paginationItemDisabledBgActive}},[`${e}-prev, ${e}-next`]:{"&:hover button":{backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder,color:t.colorTextDisabled},[`${e}-item-link`]:{backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder}}},[e]:{[`${e}-prev, ${e}-next`]:{"&:hover button":{borderColor:t.colorPrimaryHover,backgroundColor:t.paginationItemBg},[`${e}-item-link`]:{backgroundColor:t.paginationItemLinkBg,borderColor:t.colorBorder},[`&:hover ${e}-item-link`]:{borderColor:t.colorPrimary,backgroundColor:t.paginationItemBg,color:t.colorPrimary},[`&${e}-disabled`]:{[`${e}-item-link`]:{borderColor:t.colorBorder,color:t.colorTextDisabled}}},[`${e}-item`]:{backgroundColor:t.paginationItemBg,border:`${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,[`&:hover:not(${e}-item-active)`]:{borderColor:t.colorPrimary,backgroundColor:t.paginationItemBg,a:{color:t.colorPrimary}},"&-active":{borderColor:t.colorPrimary}}}}},zue=et("Pagination",t=>{const e=Ve(t,{paginationItemSize:t.controlHeight,paginationFontFamily:t.fontFamily,paginationItemBg:t.colorBgContainer,paginationItemBgActive:t.colorBgContainer,paginationFontWeightActive:t.fontWeightStrong,paginationItemSizeSM:t.controlHeightSM,paginationItemInputBg:t.colorBgContainer,paginationMiniOptionsSizeChangerTop:0,paginationItemDisabledBgActive:t.controlItemBgActiveDisabled,paginationItemDisabledColorActive:t.colorTextDisabled,paginationItemLinkBg:t.colorBgContainer,inputOutlineOffset:"0 0",paginationMiniOptionsMarginInlineStart:t.marginXXS/2,paginationMiniQuickJumperInputWidth:t.controlHeightLG*1.1,paginationItemPaddingInline:t.marginXXS*1.5,paginationEllipsisLetterSpacing:t.marginXXS/2,paginationSlashMarginInlineStart:t.marginXXS,paginationSlashMarginInlineEnd:t.marginSM,paginationEllipsisTextIndent:"0.13em"},al(t));return[Nue(e),t.wireframe&&Bue(e)]});var Hue=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o({total:Number,defaultCurrent:Number,disabled:Ce(),current:Number,defaultPageSize:Number,pageSize:Number,hideOnSinglePage:Ce(),showSizeChanger:Ce(),pageSizeOptions:xt(),buildOptionText:ve(),showQuickJumper:Xe([Boolean,Object]),showTotal:ve(),size:Ne(),simple:Ce(),locale:Object,prefixCls:String,selectPrefixCls:String,totalBoundaryShowSizeChanger:Number,selectComponentClass:String,itemRender:ve(),role:String,responsive:Boolean,showLessItems:Ce(),onChange:ve(),onShowSizeChange:ve(),"onUpdate:current":ve(),"onUpdate:pageSize":ve()}),jue=oe({compatConfig:{MODE:3},name:"APagination",inheritAttrs:!1,props:Wue(),setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,configProvider:r,direction:a,size:s}=Me("pagination",t),[l,c]=zue(o),u=L(()=>r.getPrefixCls("select",t.selectPrefixCls)),d=Ic(),[f]=xo("Pagination",qk,Ue(t,"locale")),h=p=>{const g=C("span",{class:`${p}-item-ellipsis`},[Qn("•••")]),m=C("button",{class:`${p}-item-link`,type:"button",tabindex:-1},[a.value==="rtl"?C(qi,null,null):C(cr,null,null)]),v=C("button",{class:`${p}-item-link`,type:"button",tabindex:-1},[a.value==="rtl"?C(cr,null,null):C(qi,null,null)]),b=C("a",{rel:"nofollow",class:`${p}-item-link`},[C("div",{class:`${p}-item-container`},[a.value==="rtl"?C(vg,{class:`${p}-item-link-icon`},null):C(mg,{class:`${p}-item-link-icon`},null),g])]),y=C("a",{rel:"nofollow",class:`${p}-item-link`},[C("div",{class:`${p}-item-container`},[a.value==="rtl"?C(mg,{class:`${p}-item-link-icon`},null):C(vg,{class:`${p}-item-link-icon`},null),g])]);return{prevIcon:m,nextIcon:v,jumpPrevIcon:b,jumpNextIcon:y}};return()=>{var p;const{itemRender:g=n.itemRender,buildOptionText:m=n.buildOptionText,selectComponentClass:v,responsive:b}=t,y=Hue(t,["itemRender","buildOptionText","selectComponentClass","responsive"]),w=s.value==="small"||!!(!((p=d.value)===null||p===void 0)&&p.xs&&!s.value&&b),x=A(A(A(A(A({},y),h(o.value)),{prefixCls:o.value,selectPrefixCls:u.value,selectComponentClass:v||(w?Aue:_ue),locale:f.value,buildOptionText:m}),i),{class:ce({[`${o.value}-mini`]:w,[`${o.value}-rtl`]:a.value==="rtl"},i.class,c.value),itemRender:g});return l(C(Iue,x,null))}}}),lv=Vt(jue),Vue=()=>({avatar:Z.any,description:Z.any,prefixCls:String,title:Z.any}),p6=oe({compatConfig:{MODE:3},name:"AListItemMeta",props:Vue(),displayName:"AListItemMeta",__ANT_LIST_ITEM_META:!0,slots:Object,setup(t,e){let{slots:n}=e;const{prefixCls:i}=Me("list",t);return()=>{var o,r,a,s,l,c;const u=`${i.value}-item-meta`,d=(o=t.title)!==null&&o!==void 0?o:(r=n.title)===null||r===void 0?void 0:r.call(n),f=(a=t.description)!==null&&a!==void 0?a:(s=n.description)===null||s===void 0?void 0:s.call(n),h=(l=t.avatar)!==null&&l!==void 0?l:(c=n.avatar)===null||c===void 0?void 0:c.call(n),p=C("div",{class:`${i.value}-item-meta-content`},[d&&C("h4",{class:`${i.value}-item-meta-title`},[d]),f&&C("div",{class:`${i.value}-item-meta-description`},[f])]);return C("div",{class:u},[h&&C("div",{class:`${i.value}-item-meta-avatar`},[h]),(d||f)&&p])}}}),g6=Symbol("ListContextKey");var Xue=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o({prefixCls:String,extra:Z.any,actions:Z.array,grid:Object,colStyle:{type:Object,default:void 0}}),m6=oe({compatConfig:{MODE:3},name:"AListItem",inheritAttrs:!1,Meta:p6,props:Yue(),slots:Object,setup(t,e){let{slots:n,attrs:i}=e;const{itemLayout:o,grid:r}=qe(g6,{grid:se(),itemLayout:se()}),{prefixCls:a}=Me("list",t),s=()=>{var c;const u=((c=n.default)===null||c===void 0?void 0:c.call(n))||[];let d;return u.forEach(f=>{a7(f)&&!Vd(f)&&(d=!0)}),d&&u.length>1},l=()=>{var c,u;const d=(c=t.extra)!==null&&c!==void 0?c:(u=n.extra)===null||u===void 0?void 0:u.call(n);return o.value==="vertical"?!!d:!s()};return()=>{var c,u,d,f,h;const{class:p}=i,g=Xue(i,["class"]),m=a.value,v=(c=t.extra)!==null&&c!==void 0?c:(u=n.extra)===null||u===void 0?void 0:u.call(n),b=(d=n.default)===null||d===void 0?void 0:d.call(n);let y=(f=t.actions)!==null&&f!==void 0?f:Dt((h=n.actions)===null||h===void 0?void 0:h.call(n));y=y&&!Array.isArray(y)?[y]:y;const w=y&&y.length>0&&C("ul",{class:`${m}-item-action`,key:"actions"},[y.map((S,_)=>C("li",{key:`${m}-item-action-${_}`},[S,_!==y.length-1&&C("em",{class:`${m}-item-action-split`},null)]))]),x=r.value?"div":"li",$=C(x,H(H({},g),{},{class:ce(`${m}-item`,{[`${m}-item-no-flex`]:!l()},p)}),{default:()=>[o.value==="vertical"&&v?[C("div",{class:`${m}-item-main`,key:"content"},[b,w]),C("div",{class:`${m}-item-extra`,key:"extra"},[v])]:[b,w,At(v,{key:"extra"})]]});return r.value?C(ev,{flex:1,style:t.colStyle},{default:()=>[$]}):$}}}),Gue=t=>{const{listBorderedCls:e,componentCls:n,paddingLG:i,margin:o,padding:r,listItemPaddingSM:a,marginLG:s,borderRadiusLG:l}=t;return{[`${e}`]:{border:`${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,borderRadius:l,[`${n}-header,${n}-footer,${n}-item`]:{paddingInline:i},[`${n}-pagination`]:{margin:`${o}px ${s}px`}},[`${e}${n}-sm`]:{[`${n}-item,${n}-header,${n}-footer`]:{padding:a}},[`${e}${n}-lg`]:{[`${n}-item,${n}-header,${n}-footer`]:{padding:`${r}px ${i}px`}}}},Kue=t=>{const{componentCls:e,screenSM:n,screenMD:i,marginLG:o,marginSM:r,margin:a}=t;return{[`@media screen and (max-width:${i})`]:{[`${e}`]:{[`${e}-item`]:{[`${e}-item-action`]:{marginInlineStart:o}}},[`${e}-vertical`]:{[`${e}-item`]:{[`${e}-item-extra`]:{marginInlineStart:o}}}},[`@media screen and (max-width: ${n})`]:{[`${e}`]:{[`${e}-item`]:{flexWrap:"wrap",[`${e}-action`]:{marginInlineStart:r}}},[`${e}-vertical`]:{[`${e}-item`]:{flexWrap:"wrap-reverse",[`${e}-item-main`]:{minWidth:t.contentWidth},[`${e}-item-extra`]:{margin:`auto auto ${a}px`}}}}}},Uue=t=>{const{componentCls:e,antCls:n,controlHeight:i,minHeight:o,paddingSM:r,marginLG:a,padding:s,listItemPadding:l,colorPrimary:c,listItemPaddingSM:u,listItemPaddingLG:d,paddingXS:f,margin:h,colorText:p,colorTextDescription:g,motionDurationSlow:m,lineWidth:v}=t;return{[`${e}`]:A(A({},rt(t)),{position:"relative","*":{outline:"none"},[`${e}-header, ${e}-footer`]:{background:"transparent",paddingBlock:r},[`${e}-pagination`]:{marginBlockStart:a,textAlign:"end",[`${n}-pagination-options`]:{textAlign:"start"}},[`${e}-spin`]:{minHeight:o,textAlign:"center"},[`${e}-items`]:{margin:0,padding:0,listStyle:"none"},[`${e}-item`]:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:l,color:p,[`${e}-item-meta`]:{display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%",[`${e}-item-meta-avatar`]:{marginInlineEnd:s},[`${e}-item-meta-content`]:{flex:"1 0",width:0,color:p},[`${e}-item-meta-title`]:{marginBottom:t.marginXXS,color:p,fontSize:t.fontSize,lineHeight:t.lineHeight,"> a":{color:p,transition:`all ${m}`,"&:hover":{color:c}}},[`${e}-item-meta-description`]:{color:g,fontSize:t.fontSize,lineHeight:t.lineHeight}},[`${e}-item-action`]:{flex:"0 0 auto",marginInlineStart:t.marginXXL,padding:0,fontSize:0,listStyle:"none","& > li":{position:"relative",display:"inline-block",padding:`0 ${f}px`,color:g,fontSize:t.fontSize,lineHeight:t.lineHeight,textAlign:"center","&:first-child":{paddingInlineStart:0}},[`${e}-item-action-split`]:{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:v,height:Math.ceil(t.fontSize*t.lineHeight)-t.marginXXS*2,transform:"translateY(-50%)",backgroundColor:t.colorSplit}}},[`${e}-empty`]:{padding:`${s}px 0`,color:g,fontSize:t.fontSizeSM,textAlign:"center"},[`${e}-empty-text`]:{padding:s,color:t.colorTextDisabled,fontSize:t.fontSize,textAlign:"center"},[`${e}-item-no-flex`]:{display:"block"}}),[`${e}-grid ${n}-col > ${e}-item`]:{display:"block",maxWidth:"100%",marginBlockEnd:h,paddingBlock:0,borderBlockEnd:"none"},[`${e}-vertical ${e}-item`]:{alignItems:"initial",[`${e}-item-main`]:{display:"block",flex:1},[`${e}-item-extra`]:{marginInlineStart:a},[`${e}-item-meta`]:{marginBlockEnd:s,[`${e}-item-meta-title`]:{marginBlockEnd:r,color:p,fontSize:t.fontSizeLG,lineHeight:t.lineHeightLG}},[`${e}-item-action`]:{marginBlockStart:s,marginInlineStart:"auto","> li":{padding:`0 ${s}px`,"&:first-child":{paddingInlineStart:0}}}},[`${e}-split ${e}-item`]:{borderBlockEnd:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`,"&:last-child":{borderBlockEnd:"none"}},[`${e}-split ${e}-header`]:{borderBlockEnd:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`},[`${e}-split${e}-empty ${e}-footer`]:{borderTop:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`},[`${e}-loading ${e}-spin-nested-loading`]:{minHeight:i},[`${e}-split${e}-something-after-last-item ${n}-spin-container > ${e}-items > ${e}-item:last-child`]:{borderBlockEnd:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`},[`${e}-lg ${e}-item`]:{padding:d},[`${e}-sm ${e}-item`]:{padding:u},[`${e}:not(${e}-vertical)`]:{[`${e}-item-no-flex`]:{[`${e}-item-action`]:{float:"right"}}}}},que=et("List",t=>{const e=Ve(t,{listBorderedCls:`${t.componentCls}-bordered`,minHeight:t.controlHeightLG,listItemPadding:`${t.paddingContentVertical}px ${t.paddingContentHorizontalLG}px`,listItemPaddingSM:`${t.paddingContentVerticalSM}px ${t.paddingContentHorizontal}px`,listItemPaddingLG:`${t.paddingContentVerticalLG}px ${t.paddingContentHorizontalLG}px`});return[Uue(e),Gue(e),Kue(e)]},{contentWidth:220}),Zue=()=>({bordered:Ce(),dataSource:xt(),extra:Zn(),grid:Fe(),itemLayout:String,loading:Xe([Boolean,Object]),loadMore:Zn(),pagination:Xe([Boolean,Object]),prefixCls:String,rowKey:Xe([String,Number,Function]),renderItem:ve(),size:String,split:Ce(),header:Zn(),footer:Zn(),locale:Fe()}),sa=oe({compatConfig:{MODE:3},name:"AList",inheritAttrs:!1,Item:m6,props:ct(Zue(),{dataSource:[],bordered:!1,split:!0,loading:!1,pagination:!1}),slots:Object,setup(t,e){let{slots:n,attrs:i}=e;var o,r;ot(g6,{grid:Ue(t,"grid"),itemLayout:Ue(t,"itemLayout")});const a={current:1,total:0},{prefixCls:s,direction:l,renderEmpty:c}=Me("list",t),[u,d]=que(s),f=L(()=>t.pagination&&typeof t.pagination=="object"?t.pagination:{}),h=se((o=f.value.defaultCurrent)!==null&&o!==void 0?o:1),p=se((r=f.value.defaultPageSize)!==null&&r!==void 0?r:10);ye(f,()=>{"current"in f.value&&(h.value=f.value.current),"pageSize"in f.value&&(p.value=f.value.pageSize)});const g=[],m=I=>(k,E)=>{h.value=k,p.value=E,f.value[I]&&f.value[I](k,E)},v=m("onChange"),b=m("onShowSizeChange"),y=L(()=>typeof t.loading=="boolean"?{spinning:t.loading}:t.loading),w=L(()=>y.value&&y.value.spinning),x=L(()=>{let I="";switch(t.size){case"large":I="lg";break;case"small":I="sm";break}return I}),$=L(()=>({[`${s.value}`]:!0,[`${s.value}-vertical`]:t.itemLayout==="vertical",[`${s.value}-${x.value}`]:x.value,[`${s.value}-split`]:t.split,[`${s.value}-bordered`]:t.bordered,[`${s.value}-loading`]:w.value,[`${s.value}-grid`]:!!t.grid,[`${s.value}-rtl`]:l.value==="rtl"})),S=L(()=>{const I=A(A(A({},a),{total:t.dataSource.length,current:h.value,pageSize:p.value}),t.pagination||{}),k=Math.ceil(I.total/I.pageSize);return I.current>k&&(I.current=k),I}),_=L(()=>{let I=[...t.dataSource];return t.pagination&&t.dataSource.length>(S.value.current-1)*S.value.pageSize&&(I=[...t.dataSource].splice((S.value.current-1)*S.value.pageSize,S.value.pageSize)),I}),P=Ic(),O=Bi(()=>{for(let I=0;I{if(!t.grid)return;const I=O.value&&t.grid[O.value]?t.grid[O.value]:t.grid.column;if(I)return{width:`${100/I}%`,maxWidth:`${100/I}%`}}),M=(I,k)=>{var E;const R=(E=t.renderItem)!==null&&E!==void 0?E:n.renderItem;if(!R)return null;let D;const F=typeof t.rowKey;return F==="function"?D=t.rowKey(I):F==="string"||F==="number"?D=I[t.rowKey]:D=I.key,D||(D=`list-item-${k}`),g[k]=D,R({item:I,index:k})};return()=>{var I,k,E,R,D,F,N,B;const z=(I=t.loadMore)!==null&&I!==void 0?I:(k=n.loadMore)===null||k===void 0?void 0:k.call(n),W=(E=t.footer)!==null&&E!==void 0?E:(R=n.footer)===null||R===void 0?void 0:R.call(n),j=(D=t.header)!==null&&D!==void 0?D:(F=n.header)===null||F===void 0?void 0:F.call(n),U=Dt((N=n.default)===null||N===void 0?void 0:N.call(n)),V=!!(z||t.pagination||W),q=ce(A(A({},$.value),{[`${s.value}-something-after-last-item`]:V}),i.class,d.value),Y=t.pagination?C("div",{class:`${s.value}-pagination`},[C(lv,H(H({},S.value),{},{onChange:v,onShowSizeChange:b}),null)]):null;let J=w.value&&C("div",{style:{minHeight:"53px"}},null);if(_.value.length>0){g.length=0;const G=_.value.map((X,K)=>M(X,K)),ee=G.map((X,K)=>C("div",{key:g[K],style:T.value},[X]));J=t.grid?C(jS,{gutter:t.grid.gutter},{default:()=>[ee]}):C("ul",{class:`${s.value}-items`},[G])}else!U.length&&!w.value&&(J=C("div",{class:`${s.value}-empty-text`},[((B=t.locale)===null||B===void 0?void 0:B.emptyText)||c("List")]));const Q=S.value.position||"bottom";return u(C("div",H(H({},i),{},{class:q}),[(Q==="top"||Q==="both")&&Y,j&&C("div",{class:`${s.value}-header`},[j]),C(rr,y.value,{default:()=>[J,U]}),W&&C("div",{class:`${s.value}-footer`},[W]),z||(Q==="bottom"||Q==="both")&&Y]))}}});sa.install=function(t){return t.component(sa.name,sa),t.component(sa.Item.name,sa.Item),t.component(sa.Item.Meta.name,sa.Item.Meta),t};function Jue(t){const{selectionStart:e}=t;return t.value.slice(0,e)}function Que(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(Array.isArray(e)?e:[e]).reduce((i,o)=>{const r=t.lastIndexOf(o);return r>i.location?{location:r,prefix:o}:i},{location:-1,prefix:""})}function xT(t){return(t||"").toLowerCase()}function ede(t,e,n){const i=t[0];if(!i||i===n)return t;let o=t;const r=e.length;for(let a=0;a[]}},setup(t,e){let{slots:n}=e;const{activeIndex:i,setActiveIndex:o,selectOption:r,onFocus:a=rde,loading:s}=qe(v6,{activeIndex:ie(),loading:ie(!1)});let l;const c=u=>{clearTimeout(l),l=setTimeout(()=>{a(u)})};return at(()=>{clearTimeout(l)}),()=>{var u;const{prefixCls:d,options:f}=t,h=f[i.value]||{};return C(sn,{prefixCls:`${d}-menu`,activeKey:h.value,onSelect:p=>{let{key:g}=p;const m=f.find(v=>{let{value:b}=v;return b===g});r(m)},onMousedown:c},{default:()=>[!s.value&&f.map((p,g)=>{var m,v;const{value:b,disabled:y,label:w=p.value,class:x,style:$}=p;return C(or,{key:b,disabled:y,onMouseenter:()=>{o(g)},class:x,style:$},{default:()=>[(v=(m=n.option)===null||m===void 0?void 0:m.call(n,p))!==null&&v!==void 0?v:typeof w=="function"?w(p):w]})}),!s.value&&f.length===0?C(or,{key:"notFoundContent",disabled:!0},{default:()=>[(u=n.notFoundContent)===null||u===void 0?void 0:u.call(n)]}):null,s.value&&C(or,{key:"loading",disabled:!0},{default:()=>[C(rr,{size:"small"},null)]})]})}}}),sde={bottomRight:{points:["tl","br"],offset:[0,4],overflow:{adjustX:0,adjustY:1}},bottomLeft:{points:["tr","bl"],offset:[0,4],overflow:{adjustX:0,adjustY:1}},topRight:{points:["bl","tr"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}},topLeft:{points:["br","tl"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}}},lde=oe({compatConfig:{MODE:3},name:"KeywordTrigger",props:{loading:{type:Boolean,default:void 0},options:{type:Array,default:()=>[]},prefixCls:String,placement:String,visible:{type:Boolean,default:void 0},transitionName:String,getPopupContainer:Function,direction:String,dropdownClassName:String},setup(t,e){let{slots:n}=e;const i=()=>`${t.prefixCls}-dropdown`,o=()=>{const{options:a}=t;return C(ade,{prefixCls:i(),options:a},{notFoundContent:n.notFoundContent,option:n.option})},r=L(()=>{const{placement:a,direction:s}=t;let l="topRight";return s==="rtl"?l=a==="top"?"topLeft":"bottomLeft":l=a==="top"?"topRight":"bottomRight",l});return()=>{const{visible:a,transitionName:s,getPopupContainer:l}=t;return C(tl,{prefixCls:i(),popupVisible:a,popup:o(),popupClassName:t.dropdownClassName,popupPlacement:r.value,popupTransitionName:s,builtinPlacements:sde,getPopupContainer:l},{default:n.default})}}}),cde=Wn("top","bottom"),b6={autofocus:{type:Boolean,default:void 0},prefix:Z.oneOfType([Z.string,Z.arrayOf(Z.string)]),prefixCls:String,value:String,disabled:{type:Boolean,default:void 0},split:String,transitionName:String,placement:Z.oneOf(cde),character:Z.any,characterRender:Function,filterOption:{type:[Boolean,Function]},validateSearch:Function,getPopupContainer:{type:Function},options:xt(),loading:{type:Boolean,default:void 0},rows:[Number,String],direction:{type:String}},y6=A(A({},b6),{dropdownClassName:String}),x6={prefix:"@",split:" ",rows:1,validateSearch:ide,filterOption:()=>ode};ct(y6,x6);var wT=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{c.value=t.value});const u=T=>{n("change",T)},d=T=>{let{target:{value:M}}=T;u(M)},f=(T,M,I)=>{A(c,{measuring:!0,measureText:T,measurePrefix:M,measureLocation:I,activeIndex:0})},h=T=>{A(c,{measuring:!1,measureLocation:0,measureText:null}),T==null||T()},p=T=>{const{which:M}=T;if(c.measuring){if(M===Te.UP||M===Te.DOWN){const I=_.value.length,k=M===Te.UP?-1:1,E=(c.activeIndex+k+I)%I;c.activeIndex=E,T.preventDefault()}else if(M===Te.ESC)h();else if(M===Te.ENTER){if(T.preventDefault(),!_.value.length){h();return}const I=_.value[c.activeIndex];x(I)}}},g=T=>{const{key:M,which:I}=T,{measureText:k,measuring:E}=c,{prefix:R,validateSearch:D}=t,F=T.target;if(F.composing)return;const N=Jue(F),{location:B,prefix:z}=Que(N,R);if([Te.ESC,Te.UP,Te.DOWN,Te.ENTER].indexOf(I)===-1)if(B!==-1){const W=N.slice(B+z.length),j=D(W,t),U=!!S(W).length;j?(M===z||M==="Shift"||E||W!==k&&U)&&f(W,z,B):E&&h(),j&&n("search",W,z)}else E&&h()},m=T=>{c.measuring||n("pressenter",T)},v=T=>{y(T)},b=T=>{w(T)},y=T=>{clearTimeout(l.value);const{isFocus:M}=c;!M&&T&&n("focus",T),c.isFocus=!0},w=T=>{l.value=setTimeout(()=>{c.isFocus=!1,h(),n("blur",T)},100)},x=T=>{const{split:M}=t,{value:I=""}=T,{text:k,selectionLocation:E}=tde(c.value,{measureLocation:c.measureLocation,targetText:I,prefix:c.measurePrefix,selectionStart:s.value.getSelectionStart(),split:M});u(k),h(()=>{nde(s.value.input,E)}),n("select",T,c.measurePrefix)},$=T=>{c.activeIndex=T},S=T=>{const M=T||c.measureText||"",{filterOption:I}=t;return t.options.filter(E=>I?I(M,E):!0)},_=L(()=>S());return o({blur:()=>{s.value.blur()},focus:()=>{s.value.focus()}}),ot(v6,{activeIndex:Ue(c,"activeIndex"),setActiveIndex:$,selectOption:x,onFocus:y,onBlur:w,loading:Ue(t,"loading")}),ri(()=>{pt(()=>{c.measuring&&(a.value.scrollTop=s.value.getScrollTop())})}),()=>{const{measureLocation:T,measurePrefix:M,measuring:I}=c,{prefixCls:k,placement:E,transitionName:R,getPopupContainer:D,direction:F}=t,N=wT(t,["prefixCls","placement","transitionName","getPopupContainer","direction"]),{class:B,style:z}=i,W=wT(i,["class","style"]),j=ht(N,["value","prefix","split","validateSearch","filterOption","options","loading"]),U=A(A(A({},j),W),{onChange:ST,onSelect:ST,value:c.value,onInput:d,onBlur:b,onKeydown:p,onKeyup:g,onFocus:v,onPressenter:m});return C("div",{class:ce(k,B),style:z},[C(_c,H(H({},U),{},{ref:s,tag:"textarea"}),null),I&&C("div",{ref:a,class:`${k}-measure`},[c.value.slice(0,T),C(lde,{prefixCls:k,transitionName:R,dropdownClassName:t.dropdownClassName,placement:E,options:I?_.value:[],visible:!0,direction:F,getPopupContainer:D},{default:()=>[C("span",null,[M])],notFoundContent:r.notFoundContent,option:r.option}),c.value.slice(T+M.length)])])}}}),dde={value:String,disabled:Boolean,payload:Fe()},w6=A(A({},dde),{label:Rt([])}),S6={name:"Option",props:w6,render(t,e){let{slots:n}=e;var i;return(i=n.default)===null||i===void 0?void 0:i.call(n)}};A({compatConfig:{MODE:3}},S6);const fde=t=>{const{componentCls:e,colorTextDisabled:n,controlItemBgHover:i,controlPaddingHorizontal:o,colorText:r,motionDurationSlow:a,lineHeight:s,controlHeight:l,inputPaddingHorizontal:c,inputPaddingVertical:u,fontSize:d,colorBgElevated:f,borderRadiusLG:h,boxShadowSecondary:p}=t,g=Math.round((t.controlHeight-t.fontSize*t.lineHeight)/2);return{[e]:A(A(A(A(A({},rt(t)),rl(t)),{position:"relative",display:"inline-block",height:"auto",padding:0,overflow:"hidden",lineHeight:s,whiteSpace:"pre-wrap",verticalAlign:"bottom"}),tf(t,e)),{"&-disabled":{"> textarea":A({},TS(t))},"&-focused":A({},Ta(t)),[`&-affix-wrapper ${e}-suffix`]:{position:"absolute",top:0,insetInlineEnd:c,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto"},[`> textarea, ${e}-measure`]:{color:r,boxSizing:"border-box",minHeight:l-2,margin:0,padding:`${u}px ${c}px`,overflow:"inherit",overflowX:"hidden",overflowY:"auto",fontWeight:"inherit",fontSize:"inherit",fontFamily:"inherit",fontStyle:"inherit",fontVariant:"inherit",fontSizeAdjust:"inherit",fontStretch:"inherit",lineHeight:"inherit",direction:"inherit",letterSpacing:"inherit",whiteSpace:"inherit",textAlign:"inherit",verticalAlign:"top",wordWrap:"break-word",wordBreak:"inherit",tabSize:"inherit"},"> textarea":A({width:"100%",border:"none",outline:"none",resize:"none",backgroundColor:"inherit"},PS(t.colorTextPlaceholder)),[`${e}-measure`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:-1,color:"transparent",pointerEvents:"none","> span":{display:"inline-block",minHeight:"1em"}},"&-dropdown":A(A({},rt(t)),{position:"absolute",top:-9999,insetInlineStart:-9999,zIndex:t.zIndexPopup,boxSizing:"border-box",fontSize:d,fontVariant:"initial",backgroundColor:f,borderRadius:h,outline:"none",boxShadow:p,"&-hidden":{display:"none"},[`${e}-dropdown-menu`]:{maxHeight:t.dropdownHeight,marginBottom:0,paddingInlineStart:0,overflow:"auto",listStyle:"none",outline:"none","&-item":A(A({},un),{position:"relative",display:"block",minWidth:t.controlItemWidth,padding:`${g}px ${o}px`,color:r,fontWeight:"normal",lineHeight:s,cursor:"pointer",transition:`background ${a} ease`,"&:hover":{backgroundColor:i},"&:first-child":{borderStartStartRadius:h,borderStartEndRadius:h,borderEndStartRadius:0,borderEndEndRadius:0},"&:last-child":{borderStartStartRadius:0,borderStartEndRadius:0,borderEndStartRadius:h,borderEndEndRadius:h},"&-disabled":{color:n,cursor:"not-allowed","&:hover":{color:n,backgroundColor:i,cursor:"not-allowed"}},"&-selected":{color:r,fontWeight:t.fontWeightStrong,backgroundColor:i},"&-active":{backgroundColor:i}})}})})}},hde=et("Mentions",t=>{const e=al(t);return[fde(e)]},t=>({dropdownHeight:250,controlItemWidth:100,zIndexPopup:t.zIndexPopupBase+50}));var CT=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o0&&arguments[0]!==void 0?arguments[0]:"",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{prefix:n="@",split:i=" "}=e,o=Array.isArray(n)?n:[n];return t.split(i).map(function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",a=null;return o.some(s=>r.slice(0,s.length)===s?(a=s,!0):!1),a!==null?{prefix:a,value:r.slice(a.length)}:null}).filter(r=>!!r&&!!r.value)},mde=()=>A(A({},b6),{loading:{type:Boolean,default:void 0},onFocus:{type:Function},onBlur:{type:Function},onSelect:{type:Function},onChange:{type:Function},onPressenter:{type:Function},"onUpdate:value":{type:Function},notFoundContent:Z.any,defaultValue:String,id:String,status:String}),Ub=oe({compatConfig:{MODE:3},name:"AMentions",inheritAttrs:!1,props:mde(),slots:Object,setup(t,e){let{slots:n,emit:i,attrs:o,expose:r}=e;var a,s;const{prefixCls:l,renderEmpty:c,direction:u}=Me("mentions",t),[d,f]=hde(l),h=ie(!1),p=ie(null),g=ie((s=(a=t.value)!==null&&a!==void 0?a:t.defaultValue)!==null&&s!==void 0?s:""),m=vn(),v=Mn.useInject(),b=L(()=>zo(v.status,t.status));tS({prefixCls:L(()=>`${l.value}-menu`),mode:L(()=>"vertical"),selectable:L(()=>!1),onClick:()=>{},validator:M=>{let{mode:I}=M}}),ye(()=>t.value,M=>{g.value=M});const y=M=>{h.value=!0,i("focus",M)},w=M=>{h.value=!1,i("blur",M),m.onFieldBlur()},x=function(){for(var M=arguments.length,I=new Array(M),k=0;k{t.value===void 0&&(g.value=M),i("update:value",M),i("change",M),m.onFieldChange()},S=()=>{const M=t.notFoundContent;return M!==void 0?M:n.notFoundContent?n.notFoundContent():c("Select")},_=()=>{var M;return Dt(((M=n.default)===null||M===void 0?void 0:M.call(n))||[]).map(I=>{var k,E;return A(A({},Bk(I)),{label:(E=(k=I.children)===null||k===void 0?void 0:k.default)===null||E===void 0?void 0:E.call(k)})})};r({focus:()=>{p.value.focus()},blur:()=>{p.value.blur()}});const T=L(()=>t.loading?pde:t.filterOption);return()=>{const{disabled:M,getPopupContainer:I,rows:k=1,id:E=m.id.value}=t,R=CT(t,["disabled","getPopupContainer","rows","id"]),{hasFeedback:D,feedbackIcon:F}=v,{class:N}=o,B=CT(o,["class"]),z=ht(R,["defaultValue","onUpdate:value","prefixCls"]),W=ce({[`${l.value}-disabled`]:M,[`${l.value}-focused`]:h.value,[`${l.value}-rtl`]:u.value==="rtl"},ei(l.value,b.value),!D&&N,f.value),j=A(A(A(A({prefixCls:l.value},z),{disabled:M,direction:u.value,filterOption:T.value,getPopupContainer:I,options:t.loading?[{value:"ANTDV_SEARCHING",disabled:!0,label:C(rr,{size:"small"},null)}]:t.options||_(),class:W}),B),{rows:k,onChange:$,onSelect:x,onFocus:y,onBlur:w,ref:p,value:g.value,id:E}),U=C(ude,H(H({},j),{},{dropdownClassName:f.value}),{notFoundContent:S,option:n.option});return d(D?C("div",{class:ce(`${l.value}-affix-wrapper`,ei(`${l.value}-affix-wrapper`,b.value,D),N,f.value)},[U,C("span",{class:`${l.value}-suffix`},[F])]):U)}}}),jh=oe(A(A({compatConfig:{MODE:3}},S6),{name:"AMentionsOption",props:w6})),vde=A(Ub,{Option:jh,getMentions:gde,install:t=>(t.component(Ub.name,Ub),t.component(jh.name,jh),t)});var bde=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{sx={x:t.pageX,y:t.pageY},setTimeout(()=>sx=null,100)};U4()&&Gt(document.documentElement,"click",yde,!0);const xde=()=>({prefixCls:String,visible:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0},confirmLoading:{type:Boolean,default:void 0},title:Z.any,closable:{type:Boolean,default:void 0},closeIcon:Z.any,onOk:Function,onCancel:Function,"onUpdate:visible":Function,"onUpdate:open":Function,onChange:Function,afterClose:Function,centered:{type:Boolean,default:void 0},width:[String,Number],footer:Z.any,okText:Z.any,okType:String,cancelText:Z.any,icon:Z.any,maskClosable:{type:Boolean,default:void 0},forceRender:{type:Boolean,default:void 0},okButtonProps:Fe(),cancelButtonProps:Fe(),destroyOnClose:{type:Boolean,default:void 0},wrapClassName:String,maskTransitionName:String,transitionName:String,getContainer:{type:[String,Function,Boolean,Object],default:void 0},zIndex:Number,bodyStyle:Fe(),maskStyle:Fe(),mask:{type:Boolean,default:void 0},keyboard:{type:Boolean,default:void 0},wrapProps:Object,focusTriggerAfterClose:{type:Boolean,default:void 0},modalRender:Function,mousePosition:Fe()}),Tn=oe({compatConfig:{MODE:3},name:"AModal",inheritAttrs:!1,props:ct(xde(),{width:520,confirmLoading:!1,okType:"primary"}),setup(t,e){let{emit:n,slots:i,attrs:o}=e;const[r]=xo("Modal"),{prefixCls:a,rootPrefixCls:s,direction:l,getPopupContainer:c}=Me("modal",t),[u,d]=Oce(a);Gi(t.visible===void 0);const f=g=>{n("update:visible",!1),n("update:open",!1),n("cancel",g),n("change",!1)},h=g=>{n("ok",g)},p=()=>{var g,m;const{okText:v=(g=i.okText)===null||g===void 0?void 0:g.call(i),okType:b,cancelText:y=(m=i.cancelText)===null||m===void 0?void 0:m.call(i),confirmLoading:w}=t;return C(Qe,null,[C(nn,H({onClick:f},t.cancelButtonProps),{default:()=>[y||r.value.cancelText]}),C(nn,H(H({},Gp(b)),{},{loading:w,onClick:h},t.okButtonProps),{default:()=>[v||r.value.okText]})])};return()=>{var g,m;const{prefixCls:v,visible:b,open:y,wrapClassName:w,centered:x,getContainer:$,closeIcon:S=(g=i.closeIcon)===null||g===void 0?void 0:g.call(i),focusTriggerAfterClose:_=!0}=t,P=bde(t,["prefixCls","visible","open","wrapClassName","centered","getContainer","closeIcon","focusTriggerAfterClose"]),O=ce(w,{[`${a.value}-centered`]:!!x,[`${a.value}-wrap-rtl`]:l.value==="rtl"});return u(C(n6,H(H(H({},P),o),{},{rootClassName:d.value,class:ce(d.value,o.class),getContainer:$||(c==null?void 0:c.value),prefixCls:a.value,wrapClassName:O,visible:y??b,onClose:f,focusTriggerAfterClose:_,transitionName:oi(s.value,"zoom",t.transitionName),maskTransitionName:oi(s.value,"fade",t.maskTransitionName),mousePosition:(m=P.mousePosition)!==null&&m!==void 0?m:sx}),A(A({},i),{footer:i.footer||p,closeIcon:()=>C("span",{class:`${a.value}-close-x`},[S||C(ai,{class:`${a.value}-close-icon`},null)])})))}}}),C6=()=>{const t=ie(!1);return at(()=>{t.value=!0}),t},wde={type:{type:String},actionFn:Function,close:Function,autofocus:Boolean,prefixCls:String,buttonProps:Fe(),emitEvent:Boolean,quitOnNullishReturnValue:Boolean};function $T(t){return!!(t&&t.then)}const lx=oe({compatConfig:{MODE:3},name:"ActionButton",props:wde,setup(t,e){let{slots:n}=e;const i=ie(!1),o=ie(),r=ie(!1);let a;const s=C6();Ze(()=>{t.autofocus&&(a=setTimeout(()=>{var d,f;return(f=(d=gi(o.value))===null||d===void 0?void 0:d.focus)===null||f===void 0?void 0:f.call(d)}))}),at(()=>{clearTimeout(a)});const l=function(){for(var d,f=arguments.length,h=new Array(f),p=0;p{$T(d)&&(r.value=!0,d.then(function(){s.value||(r.value=!1),l(...arguments),i.value=!1},f=>(s.value||(r.value=!1),i.value=!1,Promise.reject(f))))},u=d=>{const{actionFn:f}=t;if(i.value)return;if(i.value=!0,!f){l();return}let h;if(t.emitEvent){if(h=f(d),t.quitOnNullishReturnValue&&!$T(h)){i.value=!1,l(d);return}}else if(f.length)h=f(t.close),i.value=!1;else if(h=f(),!h){l();return}c(h)};return()=>{const{type:d,prefixCls:f,buttonProps:h}=t;return C(nn,H(H(H({},Gp(d)),{},{onClick:u,loading:r.value,prefixCls:f},h),{},{ref:o}),n)}}});function ml(t){return typeof t=="function"?t():t}const $6=oe({name:"ConfirmDialog",inheritAttrs:!1,props:["icon","onCancel","onOk","close","closable","zIndex","afterClose","visible","open","keyboard","centered","getContainer","maskStyle","okButtonProps","cancelButtonProps","okType","prefixCls","okCancel","width","mask","maskClosable","okText","cancelText","autoFocusButton","transitionName","maskTransitionName","type","title","content","direction","rootPrefixCls","bodyStyle","closeIcon","modalRender","focusTriggerAfterClose","wrapClassName","confirmPrefixCls","footer"],setup(t,e){let{attrs:n}=e;const[i]=xo("Modal");return()=>{const{icon:o,onCancel:r,onOk:a,close:s,okText:l,closable:c=!1,zIndex:u,afterClose:d,keyboard:f,centered:h,getContainer:p,maskStyle:g,okButtonProps:m,cancelButtonProps:v,okCancel:b,width:y=416,mask:w=!0,maskClosable:x=!1,type:$,open:S,title:_,content:P,direction:O,closeIcon:T,modalRender:M,focusTriggerAfterClose:I,rootPrefixCls:k,bodyStyle:E,wrapClassName:R,footer:D}=t;let F=o;if(!o&&o!==null)switch($){case"info":F=C(La,null,null);break;case"success":F=C(Ho,null,null);break;case"error":F=C(si,null,null);break;default:F=C(Wo,null,null)}const N=t.okType||"primary",B=t.prefixCls||"ant-modal",z=`${B}-confirm`,W=n.style||{},j=b??$==="confirm",U=t.autoFocusButton===null?!1:t.autoFocusButton||"ok",V=`${B}-confirm`,q=ce(V,`${V}-${t.type}`,{[`${V}-rtl`]:O==="rtl"},n.class),Y=i.value,J=j&&C(lx,{actionFn:r,close:s,autofocus:U==="cancel",buttonProps:v,prefixCls:`${k}-btn`},{default:()=>[ml(t.cancelText)||Y.cancelText]});return C(Tn,{prefixCls:B,class:q,wrapClassName:ce({[`${V}-centered`]:!!h},R),onCancel:Q=>s==null?void 0:s({triggerCancel:!0},Q),open:S,title:"",footer:"",transitionName:oi(k,"zoom",t.transitionName),maskTransitionName:oi(k,"fade",t.maskTransitionName),mask:w,maskClosable:x,maskStyle:g,style:W,bodyStyle:E,width:y,zIndex:u,afterClose:d,keyboard:f,centered:h,getContainer:p,closable:c,closeIcon:T,modalRender:M,focusTriggerAfterClose:I},{default:()=>[C("div",{class:`${z}-body-wrapper`},[C("div",{class:`${z}-body`},[ml(F),_===void 0?null:C("span",{class:`${z}-title`},[ml(_)]),C("div",{class:`${z}-content`},[ml(P)])]),D!==void 0?ml(D):C("div",{class:`${z}-btns`},[J,C(lx,{type:N,actionFn:a,close:s,autofocus:U==="ok",buttonProps:m,prefixCls:`${k}-btn`},{default:()=>[ml(l)||(j?Y.okText:Y.justOkText)]})])])]})}}}),gs=[],cf=t=>{const e=document.createDocumentFragment();let n=A(A({},ht(t,["parentContext","appContext"])),{close:r,open:!0}),i=null;function o(){i&&(Pa(null,e),i=null);for(var c=arguments.length,u=new Array(c),d=0;dh&&h.triggerCancel);t.onCancel&&f&&t.onCancel(()=>{},...u.slice(1));for(let h=0;h{typeof t.afterClose=="function"&&t.afterClose(),o.apply(this,u)}}),n.visible&&delete n.visible,a(n)}function a(c){typeof c=="function"?n=c(n):n=A(A({},n),c),i&&vj(i,n,e)}const s=c=>{const u=Fn,d=u.prefixCls,f=c.prefixCls||`${d}-modal`,h=u.iconPrefixCls,p=Mae();return C(As,H(H({},u),{},{prefixCls:d}),{default:()=>[C($6,H(H({},c),{},{rootPrefixCls:d,prefixCls:f,iconPrefixCls:h,locale:p,cancelText:c.cancelText||p.cancelText}),null)]})};function l(c){const u=C(s,A({},c));return u.appContext=t.parentContext||t.appContext||u.appContext,Pa(u,e),u}return i=l(n),gs.push(r),{destroy:r,update:a}};function A6(t){return A(A({},t),{type:"warning"})}function _6(t){return A(A({},t),{type:"info"})}function P6(t){return A(A({},t),{type:"success"})}function T6(t){return A(A({},t),{type:"error"})}function O6(t){return A(A({},t),{type:"confirm"})}const Sde=()=>({config:Object,afterClose:Function,destroyAction:Function,open:Boolean}),Cde=oe({name:"HookModal",inheritAttrs:!1,props:ct(Sde(),{config:{width:520,okType:"primary"}}),setup(t,e){let{expose:n}=e;var i;const o=L(()=>t.open),r=L(()=>t.config),{direction:a,getPrefixCls:s}=am(),l=s("modal"),c=s(),u=()=>{var p,g;t==null||t.afterClose(),(g=(p=r.value).afterClose)===null||g===void 0||g.call(p)},d=function(){t.destroyAction(...arguments)};n({destroy:d});const f=(i=r.value.okCancel)!==null&&i!==void 0?i:r.value.type==="confirm",[h]=xo("Modal",bi.Modal);return()=>C($6,H(H({prefixCls:l,rootPrefixCls:c},r.value),{},{close:d,open:o.value,afterClose:u,okText:r.value.okText||(f?h==null?void 0:h.value.okText:h==null?void 0:h.value.justOkText),direction:r.value.direction||a.value,cancelText:r.value.cancelText||(h==null?void 0:h.value.cancelText)}),null)}});let AT=0;const $de=oe({name:"ElementsHolder",inheritAttrs:!1,setup(t,e){let{expose:n}=e;const i=ie([]);return n({addModal:r=>(i.value.push(r),i.value=i.value.slice(),()=>{i.value=i.value.filter(a=>a!==r)})}),()=>i.value.map(r=>r())}});function E6(){const t=ie(null),e=ie([]);ye(e,()=>{e.value.length&&([...e.value].forEach(a=>{a()}),e.value=[])},{immediate:!0});const n=r=>function(s){var l;AT+=1;const c=ie(!0),u=ie(null),d=ie(Yt(s)),f=ie({});ye(()=>s,y=>{m(A(A({},en(y)?y.value:y),f.value))});const h=function(){c.value=!1;for(var y=arguments.length,w=new Array(y),x=0;xS&&S.triggerCancel);d.value.onCancel&&$&&d.value.onCancel(()=>{},...w.slice(1))};let p;const g=()=>C(Cde,{key:`modal-${AT}`,config:r(d.value),ref:u,open:c.value,destroyAction:h,afterClose:()=>{p==null||p()}},null);p=(l=t.value)===null||l===void 0?void 0:l.addModal(g),p&&gs.push(p);const m=y=>{d.value=A(A({},d.value),y)};return{destroy:()=>{u.value?h():e.value=[...e.value,h]},update:y=>{f.value=y,u.value?m(y):e.value=[...e.value,()=>m(y)]}}},i=L(()=>({info:n(_6),success:n(P6),error:n(T6),warning:n(A6),confirm:n(O6)})),o=Symbol("modalHolderKey");return[i.value,()=>C($de,{key:o,ref:t},null)]}function M6(t){return cf(A6(t))}Tn.useModal=E6;Tn.info=function(e){return cf(_6(e))};Tn.success=function(e){return cf(P6(e))};Tn.error=function(e){return cf(T6(e))};Tn.warning=M6;Tn.warn=M6;Tn.confirm=function(e){return cf(O6(e))};Tn.destroyAll=function(){for(;gs.length;){const e=gs.pop();e&&e()}};Tn.install=function(t){return t.component(Tn.name,Tn),t};const I6=t=>{const{value:e,formatter:n,precision:i,decimalSeparator:o,groupSeparator:r="",prefixCls:a}=t;let s;if(typeof n=="function")s=n({value:e});else{const l=String(e),c=l.match(/^(-?)(\d*)(\.(\d+))?$/);if(!c)s=l;else{const u=c[1];let d=c[2]||"0",f=c[4]||"";d=d.replace(/\B(?=(\d{3})+(?!\d))/g,r),typeof i=="number"&&(f=f.padEnd(i,"0").slice(0,i>0?i:0)),f&&(f=`${o}${f}`),s=[C("span",{key:"int",class:`${a}-content-value-int`},[u,d]),f&&C("span",{key:"decimal",class:`${a}-content-value-decimal`},[f])]}}return C("span",{class:`${a}-content-value`},[s])};I6.displayName="StatisticNumber";const Ade=t=>{const{componentCls:e,marginXXS:n,padding:i,colorTextDescription:o,statisticTitleFontSize:r,colorTextHeading:a,statisticContentFontSize:s,statisticFontFamily:l}=t;return{[`${e}`]:A(A({},rt(t)),{[`${e}-title`]:{marginBottom:n,color:o,fontSize:r},[`${e}-skeleton`]:{paddingTop:i},[`${e}-content`]:{color:a,fontSize:s,fontFamily:l,[`${e}-content-value`]:{display:"inline-block",direction:"ltr"},[`${e}-content-prefix, ${e}-content-suffix`]:{display:"inline-block"},[`${e}-content-prefix`]:{marginInlineEnd:n},[`${e}-content-suffix`]:{marginInlineStart:n}}})}},_de=et("Statistic",t=>{const{fontSizeHeading3:e,fontSize:n,fontFamily:i}=t,o=Ve(t,{statisticTitleFontSize:n,statisticContentFontSize:e,statisticFontFamily:i});return[Ade(o)]}),k6=()=>({prefixCls:String,decimalSeparator:String,groupSeparator:String,format:String,value:Xe([Number,String,Object]),valueStyle:{type:Object,default:void 0},valueRender:ve(),formatter:Rt(),precision:Number,prefix:Zn(),suffix:Zn(),title:Zn(),loading:Ce()}),_r=oe({compatConfig:{MODE:3},name:"AStatistic",inheritAttrs:!1,props:ct(k6(),{decimalSeparator:".",groupSeparator:",",loading:!1}),slots:Object,setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,direction:r}=Me("statistic",t),[a,s]=_de(o);return()=>{var l,c,u,d,f,h,p;const{value:g=0,valueStyle:m,valueRender:v}=t,b=o.value,y=(l=t.title)!==null&&l!==void 0?l:(c=n.title)===null||c===void 0?void 0:c.call(n),w=(u=t.prefix)!==null&&u!==void 0?u:(d=n.prefix)===null||d===void 0?void 0:d.call(n),x=(f=t.suffix)!==null&&f!==void 0?f:(h=n.suffix)===null||h===void 0?void 0:h.call(n),$=(p=t.formatter)!==null&&p!==void 0?p:n.formatter;let S=C(I6,H({"data-for-update":Date.now()},A(A({},t),{prefixCls:b,value:g,formatter:$})),null);return v&&(S=v(S)),a(C("div",H(H({},i),{},{class:[b,{[`${b}-rtl`]:r.value==="rtl"},i.class,s.value]}),[y&&C("div",{class:`${b}-title`},[y]),C(Un,{paragraph:!1,loading:t.loading},{default:()=>[C("div",{style:m,class:`${b}-content`},[w&&C("span",{class:`${b}-content-prefix`},[w]),S,x&&C("span",{class:`${b}-content-suffix`},[x])])]})]))}}}),Pde=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]];function Tde(t,e){let n=t;const i=/\[[^\]]*]/g,o=(e.match(i)||[]).map(l=>l.slice(1,-1)),r=e.replace(i,"[]"),a=Pde.reduce((l,c)=>{let[u,d]=c;if(l.includes(u)){const f=Math.floor(n/d);return n-=f*d,l.replace(new RegExp(`${u}+`,"g"),h=>{const p=h.length;return f.toString().padStart(p,"0")})}return l},r);let s=0;return a.replace(i,()=>{const l=o[s];return s+=1,l})}function Ode(t,e){const{format:n=""}=e,i=new Date(t).getTime(),o=Date.now(),r=Math.max(i-o,0);return Tde(r,n)}const Ede=1e3/30;function qb(t){return new Date(t).getTime()}const Mde=()=>A(A({},k6()),{value:Xe([Number,String,Object]),format:String,onFinish:Function,onChange:Function}),Ide=oe({compatConfig:{MODE:3},name:"AStatisticCountdown",props:ct(Mde(),{format:"HH:mm:ss"}),setup(t,e){let{emit:n,slots:i}=e;const o=se(),r=se(),a=()=>{const{value:d}=t;qb(d)>=Date.now()?s():l()},s=()=>{if(o.value)return;const d=qb(t.value);o.value=setInterval(()=>{r.value.$forceUpdate(),d>Date.now()&&n("change",d-Date.now()),a()},Ede)},l=()=>{const{value:d}=t;o.value&&(clearInterval(o.value),o.value=void 0,qb(d){let{value:f,config:h}=d;const{format:p}=t;return Ode(f,A(A({},h),{format:p}))},u=d=>d;return Ze(()=>{a()}),ri(()=>{a()}),at(()=>{l()}),()=>{const d=t.value;return C(_r,H({ref:r},A(A({},ht(t,["onFinish","onChange"])),{value:d,valueRender:u,formatter:c})),i)}}});_r.Countdown=Ide;_r.install=function(t){return t.component(_r.name,_r),t.component(_r.Countdown.name,_r.Countdown),t};const kde=_r.Countdown;var Dde={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"};function _T(t){for(var e=1;e{const{keyCode:h}=f;h===Te.ENTER&&f.preventDefault()},l=f=>{const{keyCode:h}=f;h===Te.ENTER&&i("click",f)},c=f=>{i("click",f)},u=()=>{a.value&&a.value.focus()},d=()=>{a.value&&a.value.blur()};return Ze(()=>{t.autofocus&&u()}),r({focus:u,blur:d}),()=>{var f;const{noStyle:h,disabled:p}=t,g=Nde(t,["noStyle","disabled"]);let m={};return h||(m=A({},Bde)),p&&(m.pointerEvents="none"),C("div",H(H(H({role:"button",tabindex:0,ref:a},g),o),{},{onClick:c,onKeydown:s,onKeyup:l,style:A(A({},m),o.style||{})}),[(f=n.default)===null||f===void 0?void 0:f.call(n)])}}}),zde={small:8,middle:16,large:24},Hde=()=>({prefixCls:String,size:{type:[String,Number,Array]},direction:Z.oneOf(Wn("horizontal","vertical")).def("horizontal"),align:Z.oneOf(Wn("start","end","center","baseline")),wrap:Ce()});function Wde(t){return typeof t=="string"?zde[t]:t||0}const ec=oe({compatConfig:{MODE:3},name:"ASpace",inheritAttrs:!1,props:Hde(),slots:Object,setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,space:r,direction:a}=Me("space",t),[s,l]=NR(o),c=Z4(),u=L(()=>{var v,b,y;return(y=(v=t.size)!==null&&v!==void 0?v:(b=r==null?void 0:r.value)===null||b===void 0?void 0:b.size)!==null&&y!==void 0?y:"small"}),d=se(),f=se();ye(u,()=>{[d.value,f.value]=(Array.isArray(u.value)?u.value:[u.value,u.value]).map(v=>Wde(v))},{immediate:!0});const h=L(()=>t.align===void 0&&t.direction==="horizontal"?"center":t.align),p=L(()=>ce(o.value,l.value,`${o.value}-${t.direction}`,{[`${o.value}-rtl`]:a.value==="rtl",[`${o.value}-align-${h.value}`]:h.value})),g=L(()=>a.value==="rtl"?"marginLeft":"marginRight"),m=L(()=>{const v={};return c.value&&(v.columnGap=`${d.value}px`,v.rowGap=`${f.value}px`),A(A({},v),t.wrap&&{flexWrap:"wrap",marginBottom:`${-f.value}px`})});return()=>{var v,b;const{wrap:y,direction:w="horizontal"}=t,x=(v=n.default)===null||v===void 0?void 0:v.call(n),$=Kt(x),S=$.length;if(S===0)return null;const _=(b=n.split)===null||b===void 0?void 0:b.call(n),P=`${o.value}-item`,O=d.value,T=S-1;return C("div",H(H({},i),{},{class:[p.value,i.class],style:[m.value,i.style]}),[$.map((M,I)=>{let k=x.indexOf(M);k===-1&&(k=`$$space-${I}`);let E={};return c.value||(w==="vertical"?I{const{componentCls:e,antCls:n}=t;return{[e]:A(A({},rt(t)),{position:"relative",padding:`${t.pageHeaderPaddingVertical}px ${t.pageHeaderPadding}px`,backgroundColor:t.colorBgContainer,[`&${e}-ghost`]:{backgroundColor:t.pageHeaderGhostBg},"&.has-footer":{paddingBottom:0},[`${e}-back`]:{marginRight:t.marginMD,fontSize:t.fontSizeLG,lineHeight:1,"&-button":A(A({},fm(t)),{color:t.pageHeaderBackColor,cursor:"pointer"})},[`${n}-divider-vertical`]:{height:"14px",margin:`0 ${t.marginSM}`,verticalAlign:"middle"},[`${n}-breadcrumb + &-heading`]:{marginTop:t.marginXS},[`${e}-heading`]:{display:"flex",justifyContent:"space-between","&-left":{display:"flex",alignItems:"center",margin:`${t.marginXS/2}px 0`,overflow:"hidden"},"&-title":A({marginRight:t.marginSM,marginBottom:0,color:t.colorTextHeading,fontWeight:600,fontSize:t.pageHeaderHeadingTitle,lineHeight:`${t.controlHeight}px`},un),[`${n}-avatar`]:{marginRight:t.marginSM},"&-sub-title":A({marginRight:t.marginSM,color:t.colorTextDescription,fontSize:t.pageHeaderHeadingSubTitle,lineHeight:t.lineHeight},un),"&-extra":{margin:`${t.marginXS/2}px 0`,whiteSpace:"nowrap","> *":{marginLeft:t.marginSM,whiteSpace:"unset"},"> *:first-child":{marginLeft:0}}},[`${e}-content`]:{paddingTop:t.pageHeaderContentPaddingVertical},[`${e}-footer`]:{marginTop:t.marginMD,[`${n}-tabs`]:{[`> ${n}-tabs-nav`]:{margin:0,"&::before":{border:"none"}},[`${n}-tabs-tab`]:{paddingTop:t.paddingXS,paddingBottom:t.paddingXS,fontSize:t.pageHeaderTabFontSize}}},[`${e}-compact ${e}-heading`]:{flexWrap:"wrap"},[`&${t.componentCls}-rtl`]:{direction:"rtl"}})}},Vde=et("PageHeader",t=>{const e=Ve(t,{pageHeaderPadding:t.paddingLG,pageHeaderPaddingVertical:t.paddingMD,pageHeaderPaddingBreadcrumb:t.paddingSM,pageHeaderContentPaddingVertical:t.paddingSM,pageHeaderBackColor:t.colorTextBase,pageHeaderGhostBg:"transparent",pageHeaderHeadingTitle:t.fontSizeHeading4,pageHeaderHeadingSubTitle:t.fontSize,pageHeaderTabFontSize:t.fontSizeLG});return[jde(e)]}),Xde=()=>({backIcon:Zn(),prefixCls:String,title:Zn(),subTitle:Zn(),breadcrumb:Z.object,tags:Zn(),footer:Zn(),extra:Zn(),avatar:Fe(),ghost:{type:Boolean,default:void 0},onBack:Function}),Yde=oe({compatConfig:{MODE:3},name:"APageHeader",inheritAttrs:!1,props:Xde(),slots:Object,setup(t,e){let{emit:n,slots:i,attrs:o}=e;const{prefixCls:r,direction:a,pageHeader:s}=Me("page-header",t),[l,c]=Vde(r),u=ie(!1),d=C6(),f=w=>{let{width:x}=w;d.value||(u.value=x<768)},h=L(()=>{var w,x,$;return($=(w=t.ghost)!==null&&w!==void 0?w:(x=s==null?void 0:s.value)===null||x===void 0?void 0:x.ghost)!==null&&$!==void 0?$:!0}),p=()=>{var w,x,$;return($=(w=t.backIcon)!==null&&w!==void 0?w:(x=i.backIcon)===null||x===void 0?void 0:x.call(i))!==null&&$!==void 0?$:a.value==="rtl"?C(mC,null,null):C(gC,null,null)},g=w=>!w||!t.onBack?null:C(Us,{componentName:"PageHeader",children:x=>{let{back:$}=x;return C("div",{class:`${r.value}-back`},[C(bg,{onClick:S=>{n("back",S)},class:`${r.value}-back-button`,"aria-label":$},{default:()=>[w]})])}},null),m=()=>{var w;return t.breadcrumb?C(Cs,t.breadcrumb,null):(w=i.breadcrumb)===null||w===void 0?void 0:w.call(i)},v=()=>{var w,x,$,S,_,P,O,T,M;const{avatar:I}=t,k=(w=t.title)!==null&&w!==void 0?w:(x=i.title)===null||x===void 0?void 0:x.call(i),E=($=t.subTitle)!==null&&$!==void 0?$:(S=i.subTitle)===null||S===void 0?void 0:S.call(i),R=(_=t.tags)!==null&&_!==void 0?_:(P=i.tags)===null||P===void 0?void 0:P.call(i),D=(O=t.extra)!==null&&O!==void 0?O:(T=i.extra)===null||T===void 0?void 0:T.call(i),F=`${r.value}-heading`,N=k||E||R||D;if(!N)return null;const B=p(),z=g(B);return C("div",{class:F},[(z||I||N)&&C("div",{class:`${F}-left`},[z,I?C(Ss,I,null):(M=i.avatar)===null||M===void 0?void 0:M.call(i),k&&C("span",{class:`${F}-title`,title:typeof k=="string"?k:void 0},[k]),E&&C("span",{class:`${F}-sub-title`,title:typeof E=="string"?E:void 0},[E]),R&&C("span",{class:`${F}-tags`},[R])]),D&&C("span",{class:`${F}-extra`},[C(ec,null,{default:()=>[D]})])])},b=()=>{var w,x;const $=(w=t.footer)!==null&&w!==void 0?w:Kt((x=i.footer)===null||x===void 0?void 0:x.call(i));return r7($)?null:C("div",{class:`${r.value}-footer`},[$])},y=w=>C("div",{class:`${r.value}-content`},[w]);return()=>{var w,x;const $=((w=t.breadcrumb)===null||w===void 0?void 0:w.routes)||i.breadcrumb,S=t.footer||i.footer,_=Dt((x=i.default)===null||x===void 0?void 0:x.call(i)),P=ce(r.value,{"has-breadcrumb":$,"has-footer":S,[`${r.value}-ghost`]:h.value,[`${r.value}-rtl`]:a.value==="rtl",[`${r.value}-compact`]:u.value},o.class,c.value);return l(C(mo,{onResize:f},{default:()=>[C("div",H(H({},o),{},{class:P}),[m(),v(),_.length?y(_):null,b()])]}))}}}),Gde=Vt(Yde),Kde=t=>{const{componentCls:e,iconCls:n,zIndexPopup:i,colorText:o,colorWarning:r,marginXS:a,fontSize:s,fontWeightStrong:l,lineHeight:c}=t;return{[e]:{zIndex:i,[`${e}-inner-content`]:{color:o},[`${e}-message`]:{position:"relative",marginBottom:a,color:o,fontSize:s,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${e}-message-icon ${n}`]:{color:r,fontSize:s,flex:"none",lineHeight:1,paddingTop:(Math.round(s*c)-s)/2},"&-title":{flex:"auto",marginInlineStart:a},"&-title-only":{fontWeight:l}},[`${e}-description`]:{position:"relative",marginInlineStart:s+a,marginBottom:a,color:o,fontSize:s},[`${e}-buttons`]:{textAlign:"end",button:{marginInlineStart:a}}}}},Ude=et("Popconfirm",t=>Kde(t),t=>{const{zIndexPopupBase:e}=t;return{zIndexPopup:e+60}});var qde=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);oA(A({},G1()),{prefixCls:String,content:Rt(),title:Rt(),description:Rt(),okType:Ne("primary"),disabled:{type:Boolean,default:!1},okText:Rt(),cancelText:Rt(),icon:Rt(),okButtonProps:Fe(),cancelButtonProps:Fe(),showCancel:{type:Boolean,default:!0},onConfirm:Function,onCancel:Function}),Jde=oe({compatConfig:{MODE:3},name:"APopconfirm",inheritAttrs:!1,props:ct(Zde(),A(A({},c3()),{trigger:"click",placement:"top",mouseEnterDelay:.1,mouseLeaveDelay:.1,arrowPointAtCenter:!1,autoAdjustOverflow:!0,okType:"primary",disabled:!1})),slots:Object,setup(t,e){let{slots:n,emit:i,expose:o,attrs:r}=e;const a=se();Gi(t.visible===void 0),o({getPopupDomNode:()=>{var $,S;return(S=($=a.value)===null||$===void 0?void 0:$.getPopupDomNode)===null||S===void 0?void 0:S.call($)}});const[s,l]=jt(!1,{value:Ue(t,"open")}),c=($,S)=>{t.open===void 0&&l($),i("update:open",$),i("openChange",$,S)},u=$=>{c(!1,$)},d=$=>{var S;return(S=t.onConfirm)===null||S===void 0?void 0:S.call(t,$)},f=$=>{var S;c(!1,$),(S=t.onCancel)===null||S===void 0||S.call(t,$)},h=$=>{$.keyCode===Te.ESC&&s&&c(!1,$)},p=$=>{const{disabled:S}=t;S||c($)},{prefixCls:g,getPrefixCls:m}=Me("popconfirm",t),v=L(()=>m()),b=L(()=>m("btn")),[y]=Ude(g),[w]=xo("Popconfirm",bi.Popconfirm),x=()=>{var $,S,_,P,O;const{okButtonProps:T,cancelButtonProps:M,title:I=($=n.title)===null||$===void 0?void 0:$.call(n),description:k=(S=n.description)===null||S===void 0?void 0:S.call(n),cancelText:E=(_=n.cancel)===null||_===void 0?void 0:_.call(n),okText:R=(P=n.okText)===null||P===void 0?void 0:P.call(n),okType:D,icon:F=((O=n.icon)===null||O===void 0?void 0:O.call(n))||C(Wo,null,null),showCancel:N=!0}=t,{cancelButton:B,okButton:z}=n,W=A({onClick:f,size:"small"},M),j=A(A(A({onClick:d},Gp(D)),{size:"small"}),T);return C("div",{class:`${g.value}-inner-content`},[C("div",{class:`${g.value}-message`},[F&&C("span",{class:`${g.value}-message-icon`},[F]),C("div",{class:[`${g.value}-message-title`,{[`${g.value}-message-title-only`]:!!k}]},[I])]),k&&C("div",{class:`${g.value}-description`},[k]),C("div",{class:`${g.value}-buttons`},[N?B?B(W):C(nn,W,{default:()=>[E||w.value.cancelText]}):null,z?z(j):C(lx,{buttonProps:A(A({size:"small"},Gp(D)),T),actionFn:d,close:u,prefixCls:b.value,quitOnNullishReturnValue:!0,emitEvent:!0},{default:()=>[R||w.value.okText]})])])};return()=>{var $;const{placement:S,overlayClassName:_,trigger:P="click"}=t,O=qde(t,["placement","overlayClassName","trigger"]),T=ht(O,["title","content","cancelText","okText","onUpdate:open","onConfirm","onCancel","prefixCls"]),M=ce(g.value,_);return y(C(Z1,H(H(H({},T),r),{},{trigger:P,placement:S,onOpenChange:p,open:s.value,overlayClassName:M,transitionName:oi(v.value,"zoom-big",t.transitionName),ref:a,"data-popover-inject":!0}),{default:()=>[mj((($=n.default)===null||$===void 0?void 0:$.call(n))||[],{onKeydown:I=>{h(I)}},!1)],content:x}))}}}),Qde=Vt(Jde),efe=["normal","exception","active","success"],cv=()=>({prefixCls:String,type:Ne(),percent:Number,format:ve(),status:Ne(),showInfo:Ce(),strokeWidth:Number,strokeLinecap:Ne(),strokeColor:Rt(),trailColor:String,width:Number,success:Fe(),gapDegree:Number,gapPosition:Ne(),size:Xe([String,Number,Array]),steps:Number,successPercent:Number,title:String,progressStatus:Ne()});function _s(t){return!t||t<0?0:t>100?100:t}function yg(t){let{success:e,successPercent:n}=t,i=n;return e&&"progress"in e&&(Nt(!1,"Progress","`success.progress` is deprecated. Please use `success.percent` instead."),i=e.progress),e&&"percent"in e&&(i=e.percent),i}function tfe(t){let{percent:e,success:n,successPercent:i}=t;const o=_s(yg({success:n,successPercent:i}));return[o,_s(_s(e)-o)]}function nfe(t){let{success:e={},strokeColor:n}=t;const{strokeColor:i}=e;return[i||Vl.green,n||null]}const uv=(t,e,n)=>{var i,o,r,a;let s=-1,l=-1;if(e==="step"){const c=n.steps,u=n.strokeWidth;typeof t=="string"||typeof t>"u"?(s=t==="small"?2:14,l=u??8):typeof t=="number"?[s,l]=[t,t]:[s=14,l=8]=t,s*=c}else if(e==="line"){const c=n==null?void 0:n.strokeWidth;typeof t=="string"||typeof t>"u"?l=c||(t==="small"?6:8):typeof t=="number"?[s,l]=[t,t]:[s=-1,l=8]=t}else(e==="circle"||e==="dashboard")&&(typeof t=="string"||typeof t>"u"?[s,l]=t==="small"?[60,60]:[120,120]:typeof t=="number"?[s,l]=[t,t]:(s=(o=(i=t[0])!==null&&i!==void 0?i:t[1])!==null&&o!==void 0?o:120,l=(a=(r=t[0])!==null&&r!==void 0?r:t[1])!==null&&a!==void 0?a:120));return{width:s,height:l}};var ife=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);oA(A({},cv()),{strokeColor:Rt(),direction:Ne()}),rfe=t=>{let e=[];return Object.keys(t).forEach(n=>{const i=parseFloat(n.replace(/%/g,""));isNaN(i)||e.push({key:i,value:t[n]})}),e=e.sort((n,i)=>n.key-i.key),e.map(n=>{let{key:i,value:o}=n;return`${o} ${i}%`}).join(", ")},afe=(t,e)=>{const{from:n=Vl.blue,to:i=Vl.blue,direction:o=e==="rtl"?"to left":"to right"}=t,r=ife(t,["from","to","direction"]);if(Object.keys(r).length!==0){const a=rfe(r);return{backgroundImage:`linear-gradient(${o}, ${a})`}}return{backgroundImage:`linear-gradient(${o}, ${n}, ${i})`}},sfe=oe({compatConfig:{MODE:3},name:"ProgressLine",inheritAttrs:!1,props:ofe(),setup(t,e){let{slots:n,attrs:i}=e;const o=L(()=>{const{strokeColor:h,direction:p}=t;return h&&typeof h!="string"?afe(h,p):{backgroundColor:h}}),r=L(()=>t.strokeLinecap==="square"||t.strokeLinecap==="butt"?0:void 0),a=L(()=>t.trailColor?{backgroundColor:t.trailColor}:void 0),s=L(()=>{var h;return(h=t.size)!==null&&h!==void 0?h:[-1,t.strokeWidth||(t.size==="small"?6:8)]}),l=L(()=>uv(s.value,"line",{strokeWidth:t.strokeWidth})),c=L(()=>{const{percent:h}=t;return A({width:`${_s(h)}%`,height:`${l.value.height}px`,borderRadius:r.value},o.value)}),u=L(()=>yg(t)),d=L(()=>{const{success:h}=t;return{width:`${_s(u.value)}%`,height:`${l.value.height}px`,borderRadius:r.value,backgroundColor:h==null?void 0:h.strokeColor}}),f={width:l.value.width<0?"100%":l.value.width,height:`${l.value.height}px`};return()=>{var h;return C(Qe,null,[C("div",H(H({},i),{},{class:[`${t.prefixCls}-outer`,i.class],style:[i.style,f]}),[C("div",{class:`${t.prefixCls}-inner`,style:a.value},[C("div",{class:`${t.prefixCls}-bg`,style:c.value},null),u.value!==void 0?C("div",{class:`${t.prefixCls}-success-bg`,style:d.value},null):null])]),(h=n.default)===null||h===void 0?void 0:h.call(n)])}}}),lfe={percent:0,prefixCls:"vc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1},cfe=t=>{const e=se(null);return ri(()=>{const n=Date.now();let i=!1;t.value.forEach(o=>{const r=(o==null?void 0:o.$el)||o;if(!r)return;i=!0;const a=r.style;a.transitionDuration=".3s, .3s, .3s, .06s",e.value&&n-e.value<100&&(a.transitionDuration="0s, 0s")}),i&&(e.value=Date.now())}),t},ufe={gapDegree:Number,gapPosition:{type:String},percent:{type:[Array,Number]},prefixCls:String,strokeColor:{type:[Object,String,Array]},strokeLinecap:{type:String},strokeWidth:Number,trailColor:String,trailWidth:Number,transition:String};var dfe=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o4&&arguments[4]!==void 0?arguments[4]:0,r=arguments.length>5?arguments[5]:void 0;const a=50-i/2;let s=0,l=-a,c=0,u=-2*a;switch(r){case"left":s=-a,l=0,c=2*a,u=0;break;case"right":s=a,l=0,c=-2*a,u=0;break;case"bottom":l=a,u=2*a;break}const d=`M 50,50 m ${s},${l} a ${a},${a} 0 1 1 ${c},${-u} - a ${a},${a} 0 1 1 ${-c},${u}`,f=Math.PI*2*a,h={stroke:n,strokeDasharray:`${e/100*(f-o)}px ${f}px`,strokeDashoffset:`-${o/2+t/100*(f-o)}px`,transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s"};return{pathString:d,pathStyle:h}}const ffe=oe({compatConfig:{MODE:3},name:"VCCircle",props:ct(ufe,lfe),setup(t){TT+=1;const e=se(TT),n=L(()=>ET(t.percent)),i=L(()=>ET(t.strokeColor)),[o,r]=MS();cfe(r);const a=()=>{const{prefixCls:s,strokeWidth:l,strokeLinecap:c,gapDegree:u,gapPosition:d}=t;let f=0;return n.value.map((h,p)=>{const g=i.value[p]||i.value[i.value.length-1],m=Object.prototype.toString.call(g)==="[object Object]"?`url(#${s}-gradient-${e.value})`:"",{pathString:v,pathStyle:b}=MT(f,h,g,l,u,d);f+=h;const y={key:p,d:v,stroke:m,"stroke-linecap":c,"stroke-width":l,opacity:h===0?0:1,"fill-opacity":"0",class:`${s}-circle-path`,style:b};return C("path",H({ref:o(p)},y),null)})};return()=>{const{prefixCls:s,strokeWidth:l,trailWidth:c,gapDegree:u,gapPosition:d,trailColor:f,strokeLinecap:h,strokeColor:p}=t,g=dfe(t,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","strokeColor"]),{pathString:m,pathStyle:v}=MT(0,100,f,l,u,d);delete g.percent;const b=i.value.find(w=>Object.prototype.toString.call(w)==="[object Object]"),y={d:m,stroke:f,"stroke-linecap":h,"stroke-width":c||l,"fill-opacity":"0",class:`${s}-circle-trail`,style:v};return C("svg",H({class:`${s}-circle`,viewBox:"0 0 100 100"},g),[b&&C("defs",null,[C("linearGradient",{id:`${s}-gradient-${e.value}`,x1:"100%",y1:"0%",x2:"0%",y2:"0%"},[Object.keys(b).sort((w,x)=>OT(w)-OT(x)).map((w,x)=>C("stop",{key:x,offset:w,"stop-color":b[w]},null))])]),C("path",y,null),a().reverse()])}}}),hfe=()=>A(A({},lv()),{strokeColor:Rt()}),pfe=3,gfe=t=>pfe/t*100,mfe=oe({compatConfig:{MODE:3},name:"ProgressCircle",inheritAttrs:!1,props:ct(hfe(),{trailColor:null}),setup(t,e){let{slots:n,attrs:i}=e;const o=L(()=>{var g;return(g=t.width)!==null&&g!==void 0?g:120}),r=L(()=>{var g;return(g=t.size)!==null&&g!==void 0?g:[o.value,o.value]}),a=L(()=>cv(r.value,"circle")),s=L(()=>{if(t.gapDegree||t.gapDegree===0)return t.gapDegree;if(t.type==="dashboard")return 75}),l=L(()=>({width:`${a.value.width}px`,height:`${a.value.height}px`,fontSize:`${a.value.width*.15+6}px`})),c=L(()=>{var g;return(g=t.strokeWidth)!==null&&g!==void 0?g:Math.max(gfe(a.value.width),6)}),u=L(()=>t.gapPosition||t.type==="dashboard"&&"bottom"||void 0),d=L(()=>tfe(t)),f=L(()=>Object.prototype.toString.call(t.strokeColor)==="[object Object]"),h=L(()=>nfe({success:t.success,strokeColor:t.strokeColor})),p=L(()=>({[`${t.prefixCls}-inner`]:!0,[`${t.prefixCls}-circle-gradient`]:f.value}));return()=>{var g;const m=C(ffe,{percent:d.value,strokeWidth:c.value,trailWidth:c.value,strokeColor:h.value,strokeLinecap:t.strokeLinecap,trailColor:t.trailColor,prefixCls:t.prefixCls,gapDegree:s.value,gapPosition:u.value},null);return C("div",H(H({},i),{},{class:[p.value,i.class],style:[i.style,l.value]}),[a.value.width<=20?C(Pi,null,{default:()=>[C("span",null,[m])],title:n.default}):C(Qe,null,[m,(g=n.default)===null||g===void 0?void 0:g.call(n)])])}}}),vfe=()=>A(A({},lv()),{steps:Number,strokeColor:Xe(),trailColor:String}),bfe=oe({compatConfig:{MODE:3},name:"Steps",props:vfe(),setup(t,e){let{slots:n}=e;const i=L(()=>Math.round(t.steps*((t.percent||0)/100))),o=L(()=>{var s;return(s=t.size)!==null&&s!==void 0?s:[t.size==="small"?2:14,t.strokeWidth||8]}),r=L(()=>cv(o.value,"step",{steps:t.steps,strokeWidth:t.strokeWidth||8})),a=L(()=>{const{steps:s,strokeColor:l,trailColor:c,prefixCls:u}=t,d=[];for(let f=0;f{var s;return C("div",{class:`${t.prefixCls}-steps-outer`},[a.value,(s=n.default)===null||s===void 0?void 0:s.call(n)])}}}),yfe=new mt("antProgressActive",{"0%":{transform:"translateX(-100%) scaleX(0)",opacity:.1},"20%":{transform:"translateX(-100%) scaleX(0)",opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}}),xfe=t=>{const{componentCls:e,iconCls:n}=t;return{[e]:A(A({},rt(t)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:t.fontSize,marginInlineEnd:t.marginXS,marginBottom:t.marginXS},[`${e}-outer`]:{display:"inline-block",width:"100%"},[`&${e}-show-info`]:{[`${e}-outer`]:{marginInlineEnd:`calc(-2em - ${t.marginXS}px)`,paddingInlineEnd:`calc(2em + ${t.paddingXS}px)`}},[`${e}-inner`]:{position:"relative",display:"inline-block",width:"100%",overflow:"hidden",verticalAlign:"middle",backgroundColor:t.progressRemainingColor,borderRadius:t.progressLineRadius},[`${e}-inner:not(${e}-circle-gradient)`]:{[`${e}-circle-path`]:{stroke:t.colorInfo}},[`${e}-success-bg, ${e}-bg`]:{position:"relative",backgroundColor:t.colorInfo,borderRadius:t.progressLineRadius,transition:`all ${t.motionDurationSlow} ${t.motionEaseInOutCirc}`},[`${e}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:t.colorSuccess},[`${e}-text`]:{display:"inline-block",width:"2em",marginInlineStart:t.marginXS,color:t.progressInfoTextColor,lineHeight:1,whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[n]:{fontSize:t.fontSize}},[`&${e}-status-active`]:{[`${e}-bg::before`]:{position:"absolute",inset:0,backgroundColor:t.colorBgContainer,borderRadius:t.progressLineRadius,opacity:0,animationName:yfe,animationDuration:t.progressActiveMotionDuration,animationTimingFunction:t.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${e}-status-exception`]:{[`${e}-bg`]:{backgroundColor:t.colorError},[`${e}-text`]:{color:t.colorError}},[`&${e}-status-exception ${e}-inner:not(${e}-circle-gradient)`]:{[`${e}-circle-path`]:{stroke:t.colorError}},[`&${e}-status-success`]:{[`${e}-bg`]:{backgroundColor:t.colorSuccess},[`${e}-text`]:{color:t.colorSuccess}},[`&${e}-status-success ${e}-inner:not(${e}-circle-gradient)`]:{[`${e}-circle-path`]:{stroke:t.colorSuccess}}})}},wfe=t=>{const{componentCls:e,iconCls:n}=t;return{[e]:{[`${e}-circle-trail`]:{stroke:t.progressRemainingColor},[`&${e}-circle ${e}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${e}-circle ${e}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:t.colorText,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[n]:{fontSize:`${t.fontSize/t.fontSizeSM}em`}},[`${e}-circle&-status-exception`]:{[`${e}-text`]:{color:t.colorError}},[`${e}-circle&-status-success`]:{[`${e}-text`]:{color:t.colorSuccess}}},[`${e}-inline-circle`]:{lineHeight:1,[`${e}-inner`]:{verticalAlign:"bottom"}}}},Sfe=t=>{const{componentCls:e}=t;return{[e]:{[`${e}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:t.progressStepMinWidth,marginInlineEnd:t.progressStepMarginInlineEnd,backgroundColor:t.progressRemainingColor,transition:`all ${t.motionDurationSlow}`,"&-active":{backgroundColor:t.colorInfo}}}}}},Cfe=t=>{const{componentCls:e,iconCls:n}=t;return{[e]:{[`${e}-small&-line, ${e}-small&-line ${e}-text ${n}`]:{fontSize:t.fontSizeSM}}}},$fe=et("Progress",t=>{const e=t.marginXXS/2,n=Ve(t,{progressLineRadius:100,progressInfoTextColor:t.colorText,progressDefaultColor:t.colorInfo,progressRemainingColor:t.colorFillSecondary,progressStepMarginInlineEnd:e,progressStepMinWidth:e,progressActiveMotionDuration:"2.4s"});return[xfe(n),wfe(n),Sfe(n),Cfe(n)]});var Afe=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);oArray.isArray(t.strokeColor)?t.strokeColor[0]:t.strokeColor),c=L(()=>{const{percent:p=0}=t,g=bg(t);return parseInt(g!==void 0?g.toString():p.toString(),10)}),u=L(()=>{const{status:p}=t;return!efe.includes(p)&&c.value>=100?"success":p||"normal"}),d=L(()=>{const{type:p,showInfo:g,size:m}=t,v=o.value;return{[v]:!0,[`${v}-inline-circle`]:p==="circle"&&cv(m,"circle").width<=20,[`${v}-${p==="dashboard"&&"circle"||p}`]:!0,[`${v}-status-${u.value}`]:!0,[`${v}-show-info`]:g,[`${v}-${m}`]:m,[`${v}-rtl`]:r.value==="rtl",[s.value]:!0}}),f=L(()=>typeof t.strokeColor=="string"||Array.isArray(t.strokeColor)?t.strokeColor:void 0),h=()=>{const{showInfo:p,format:g,type:m,percent:v,title:b}=t,y=bg(t);if(!p)return null;let w;const x=g||(n==null?void 0:n.format)||(S=>`${S}%`),$=m==="line";return g||n!=null&&n.format||u.value!=="exception"&&u.value!=="success"?w=x(_s(v),_s(y)):u.value==="exception"?w=C($?si:ai,null,null):u.value==="success"&&(w=C($?Ho:_c,null,null)),C("span",{class:`${o.value}-text`,title:b===void 0&&typeof w=="string"?w:void 0},[w])};return()=>{const{type:p,steps:g,title:m}=t,{class:v}=i,b=Afe(i,["class"]),y=h();let w;return p==="line"?w=g?C(bfe,H(H({},t),{},{strokeColor:f.value,prefixCls:o.value,steps:g}),{default:()=>[y]}):C(sfe,H(H({},t),{},{strokeColor:l.value,prefixCls:o.value,direction:r.value}),{default:()=>[y]}):(p==="circle"||p==="dashboard")&&(w=C(mfe,H(H({},t),{},{prefixCls:o.value,strokeColor:l.value,progressStatus:u.value}),{default:()=>[y]})),a(C("div",H(H({role:"progressbar"},b),{},{class:[d.value,v],title:m}),[w]))}}}),vC=Vt(_fe);function Pfe(t){let e=t.scrollX;const n="scrollLeft";if(typeof e!="number"){const i=t.document;e=i.documentElement[n],typeof e!="number"&&(e=i.body[n])}return e}function Tfe(t){let e,n;const i=t.ownerDocument,{body:o}=i,r=i&&i.documentElement,a=t.getBoundingClientRect();return e=a.left,n=a.top,e-=r.clientLeft||o.clientLeft||0,n-=r.clientTop||o.clientTop||0,{left:e,top:n}}function Ofe(t){const e=Tfe(t),n=t.ownerDocument,i=n.defaultView||n.parentWindow;return e.left+=Pfe(i),e.left}var Efe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z"}}]},name:"star",theme:"filled"};function IT(t){for(var e=1;e{const{index:l}=t;n("hover",s,l)},o=s=>{const{index:l}=t;n("click",s,l)},r=s=>{const{index:l}=t;s.keyCode===13&&n("click",s,l)},a=L(()=>{const{prefixCls:s,index:l,value:c,allowHalf:u,focused:d}=t,f=l+1;let h=s;return c===0&&l===0&&d?h+=` ${s}-focused`:u&&c+.5>=f&&c{const{disabled:s,prefixCls:l,characterRender:c,character:u,index:d,count:f,value:h}=t,p=typeof u=="function"?u({disabled:s,prefixCls:l,index:d,count:f,value:h}):u;let g=C("li",{class:a.value},[C("div",{onClick:s?null:o,onKeydown:s?null:r,onMousemove:s?null:i,role:"radio","aria-checked":h>d?"true":"false","aria-posinset":d+1,"aria-setsize":f,tabindex:s?-1:0},[C("div",{class:`${l}-first`},[p]),C("div",{class:`${l}-second`},[p])])]);return c&&(g=c(g,t)),g}}}),Dfe=t=>{const{componentCls:e}=t;return{[`${e}-star`]:{position:"relative",display:"inline-block",color:"inherit",cursor:"pointer","&:not(:last-child)":{marginInlineEnd:t.marginXS},"> div":{transition:`all ${t.motionDurationMid}, outline 0s`,"&:hover":{transform:t.rateStarHoverScale},"&:focus":{outline:0},"&:focus-visible":{outline:`${t.lineWidth}px dashed ${t.rateStarColor}`,transform:t.rateStarHoverScale}},"&-first, &-second":{color:t.defaultColor,transition:`all ${t.motionDurationMid}`,userSelect:"none",[t.iconCls]:{verticalAlign:"middle"}},"&-first":{position:"absolute",top:0,insetInlineStart:0,width:"50%",height:"100%",overflow:"hidden",opacity:0},[`&-half ${e}-star-first, &-half ${e}-star-second`]:{opacity:1},[`&-half ${e}-star-first, &-full ${e}-star-second`]:{color:"inherit"}}}},Rfe=t=>({[`&-rtl${t.componentCls}`]:{direction:"rtl"}}),Lfe=t=>{const{componentCls:e}=t;return{[e]:A(A(A(A(A({},rt(t)),{display:"inline-block",margin:0,padding:0,color:t.rateStarColor,fontSize:t.rateStarSize,lineHeight:"unset",listStyle:"none",outline:"none",[`&-disabled${e} ${e}-star`]:{cursor:"default","&:hover":{transform:"scale(1)"}}}),Dfe(t)),{[`+ ${e}-text`]:{display:"inline-block",marginInlineStart:t.marginXS,fontSize:t.fontSize}}),Rfe(t))}},Ffe=et("Rate",t=>{const{colorFillContent:e}=t,n=Ve(t,{rateStarColor:t["yellow-6"],rateStarSize:t.controlHeightLG*.5,rateStarHoverScale:"scale(1.1)",defaultColor:e});return[Lfe(n)]}),Nfe=()=>({prefixCls:String,count:Number,value:Number,allowHalf:{type:Boolean,default:void 0},allowClear:{type:Boolean,default:void 0},tooltips:Array,disabled:{type:Boolean,default:void 0},character:Z.any,autofocus:{type:Boolean,default:void 0},tabindex:Z.oneOfType([Z.number,Z.string]),direction:String,id:String,onChange:Function,onHoverChange:Function,"onUpdate:value":Function,onFocus:Function,onBlur:Function,onKeydown:Function}),Bfe=oe({compatConfig:{MODE:3},name:"ARate",inheritAttrs:!1,props:ct(Nfe(),{value:0,count:5,allowHalf:!1,allowClear:!0,tabindex:0,direction:"ltr"}),setup(t,e){let{slots:n,attrs:i,emit:o,expose:r}=e;const{prefixCls:a,direction:s}=Me("rate",t),[l,c]=Ffe(a),u=vn(),d=se(),[f,h]=MS(),p=$t({value:t.value,focused:!1,cleanedValue:null,hoverValue:void 0});ye(()=>t.value,()=>{p.value=t.value});const g=T=>gi(h.value.get(T)),m=(T,M)=>{const I=s.value==="rtl";let k=T+1;if(t.allowHalf){const E=g(T),R=Ofe(E),D=E.clientWidth;(I&&M-R>D/2||!I&&M-R{t.value===void 0&&(p.value=T),o("update:value",T),o("change",T),u.onFieldChange()},b=(T,M)=>{const I=m(M,T.pageX);I!==p.cleanedValue&&(p.hoverValue=I,p.cleanedValue=null),o("hoverChange",I)},y=()=>{p.hoverValue=void 0,p.cleanedValue=null,o("hoverChange",void 0)},w=(T,M)=>{const{allowClear:I}=t,k=m(M,T.pageX);let E=!1;I&&(E=k===p.value),y(),v(E?0:k),p.cleanedValue=E?k:null},x=T=>{p.focused=!0,o("focus",T)},$=T=>{p.focused=!1,o("blur",T),u.onFieldBlur()},S=T=>{const{keyCode:M}=T,{count:I,allowHalf:k}=t,E=s.value==="rtl";M===Te.RIGHT&&p.value0&&!E||M===Te.RIGHT&&p.value>0&&E?(k?p.value-=.5:p.value-=1,v(p.value),T.preventDefault()):M===Te.LEFT&&p.value{t.disabled||d.value.focus()};r({focus:_,blur:()=>{t.disabled||d.value.blur()}}),Ze(()=>{const{autofocus:T,disabled:M}=t;T&&!M&&_()});const O=(T,M)=>{let{index:I}=M;const{tooltips:k}=t;return k?C(Pi,{title:k[I]},{default:()=>[T]}):T};return()=>{const{count:T,allowHalf:M,disabled:I,tabindex:k,id:E=u.id.value}=t,{class:R,style:D}=i,F=[],N=I?`${a.value}-disabled`:"",B=t.character||n.character||(()=>C(bC,null,null));for(let W=0;WC("svg",{width:"252",height:"294"},[C("defs",null,[C("path",{d:"M0 .387h251.772v251.772H0z"},null)]),C("g",{fill:"none","fill-rule":"evenodd"},[C("g",{transform:"translate(0 .012)"},[C("mask",{fill:"#fff"},null),C("path",{d:"M0 127.32v-2.095C0 56.279 55.892.387 124.838.387h2.096c68.946 0 124.838 55.892 124.838 124.838v2.096c0 68.946-55.892 124.838-124.838 124.838h-2.096C55.892 252.16 0 196.267 0 127.321",fill:"#E4EBF7",mask:"url(#b)"},null)]),C("path",{d:"M39.755 130.84a8.276 8.276 0 1 1-16.468-1.66 8.276 8.276 0 0 1 16.468 1.66",fill:"#FFF"},null),C("path",{d:"M36.975 134.297l10.482 5.943M48.373 146.508l-12.648 10.788",stroke:"#FFF","stroke-width":"2"},null),C("path",{d:"M39.875 159.352a5.667 5.667 0 1 1-11.277-1.136 5.667 5.667 0 0 1 11.277 1.136M57.588 143.247a5.708 5.708 0 1 1-11.358-1.145 5.708 5.708 0 0 1 11.358 1.145M99.018 26.875l29.82-.014a4.587 4.587 0 1 0-.003-9.175l-29.82.013a4.587 4.587 0 1 0 .003 9.176M110.424 45.211l29.82-.013a4.588 4.588 0 0 0-.004-9.175l-29.82.013a4.587 4.587 0 1 0 .004 9.175",fill:"#FFF"},null),C("path",{d:"M112.798 26.861v-.002l15.784-.006a4.588 4.588 0 1 0 .003 9.175l-15.783.007v-.002a4.586 4.586 0 0 0-.004-9.172M184.523 135.668c-.553 5.485-5.447 9.483-10.931 8.93-5.485-.553-9.483-5.448-8.93-10.932.552-5.485 5.447-9.483 10.932-8.93 5.485.553 9.483 5.447 8.93 10.932",fill:"#FFF"},null),C("path",{d:"M179.26 141.75l12.64 7.167M193.006 156.477l-15.255 13.011",stroke:"#FFF","stroke-width":"2"},null),C("path",{d:"M184.668 170.057a6.835 6.835 0 1 1-13.6-1.372 6.835 6.835 0 0 1 13.6 1.372M203.34 153.325a6.885 6.885 0 1 1-13.7-1.382 6.885 6.885 0 0 1 13.7 1.382",fill:"#FFF"},null),C("path",{d:"M151.931 192.324a2.222 2.222 0 1 1-4.444 0 2.222 2.222 0 0 1 4.444 0zM225.27 116.056a2.222 2.222 0 1 1-4.445 0 2.222 2.222 0 0 1 4.444 0zM216.38 151.08a2.223 2.223 0 1 1-4.446-.001 2.223 2.223 0 0 1 4.446 0zM176.917 107.636a2.223 2.223 0 1 1-4.445 0 2.223 2.223 0 0 1 4.445 0zM195.291 92.165a2.223 2.223 0 1 1-4.445 0 2.223 2.223 0 0 1 4.445 0zM202.058 180.711a2.223 2.223 0 1 1-4.446 0 2.223 2.223 0 0 1 4.446 0z",stroke:"#FFF","stroke-width":"2"},null),C("path",{stroke:"#FFF","stroke-width":"2",d:"M214.404 153.302l-1.912 20.184-10.928 5.99M173.661 174.792l-6.356 9.814h-11.36l-4.508 6.484M174.941 125.168v-15.804M220.824 117.25l-12.84 7.901-15.31-7.902V94.39"},null),C("path",{d:"M166.588 65.936h-3.951a4.756 4.756 0 0 1-4.743-4.742 4.756 4.756 0 0 1 4.743-4.743h3.951a4.756 4.756 0 0 1 4.743 4.743 4.756 4.756 0 0 1-4.743 4.742",fill:"#FFF"},null),C("path",{d:"M174.823 30.03c0-16.281 13.198-29.48 29.48-29.48 16.28 0 29.48 13.199 29.48 29.48 0 16.28-13.2 29.48-29.48 29.48-16.282 0-29.48-13.2-29.48-29.48",fill:"#1890FF"},null),C("path",{d:"M205.952 38.387c.5.5.785 1.142.785 1.928s-.286 1.465-.785 1.964c-.572.5-1.214.75-2 .75-.785 0-1.429-.285-1.929-.785-.572-.5-.82-1.143-.82-1.929s.248-1.428.82-1.928c.5-.5 1.144-.75 1.93-.75.785 0 1.462.25 1.999.75m4.285-19.463c1.428 1.249 2.143 2.963 2.143 5.142 0 1.712-.427 3.13-1.219 4.25-.067.096-.137.18-.218.265-.416.429-1.41 1.346-2.956 2.699a5.07 5.07 0 0 0-1.428 1.75 5.207 5.207 0 0 0-.536 2.357v.5h-4.107v-.5c0-1.357.215-2.536.714-3.5.464-.964 1.857-2.464 4.178-4.536l.43-.5c.643-.785.964-1.643.964-2.535 0-1.18-.358-2.108-1-2.785-.678-.68-1.643-1.001-2.858-1.001-1.536 0-2.642.464-3.357 1.43-.37.5-.621 1.135-.76 1.904a1.999 1.999 0 0 1-1.971 1.63h-.004c-1.277 0-2.257-1.183-1.98-2.43.337-1.518 1.02-2.78 2.073-3.784 1.536-1.5 3.607-2.25 6.25-2.25 2.32 0 4.214.607 5.642 1.894",fill:"#FFF"},null),C("path",{d:"M52.04 76.131s21.81 5.36 27.307 15.945c5.575 10.74-6.352 9.26-15.73 4.935-10.86-5.008-24.7-11.822-11.577-20.88",fill:"#FFB594"},null),C("path",{d:"M90.483 67.504l-.449 2.893c-.753.49-4.748-2.663-4.748-2.663l-1.645.748-1.346-5.684s6.815-4.589 8.917-5.018c2.452-.501 9.884.94 10.7 2.278 0 0 1.32.486-2.227.69-3.548.203-5.043.447-6.79 3.132-1.747 2.686-2.412 3.624-2.412 3.624",fill:"#FFC6A0"},null),C("path",{d:"M128.055 111.367c-2.627-7.724-6.15-13.18-8.917-15.478-3.5-2.906-9.34-2.225-11.366-4.187-1.27-1.231-3.215-1.197-3.215-1.197s-14.98-3.158-16.828-3.479c-2.37-.41-2.124-.714-6.054-1.405-1.57-1.907-2.917-1.122-2.917-1.122l-7.11-1.383c-.853-1.472-2.423-1.023-2.423-1.023l-2.468-.897c-1.645 9.976-7.74 13.796-7.74 13.796 1.795 1.122 15.703 8.3 15.703 8.3l5.107 37.11s-3.321 5.694 1.346 9.109c0 0 19.883-3.743 34.921-.329 0 0 3.047-2.546.972-8.806.523-3.01 1.394-8.263 1.736-11.622.385.772 2.019 1.918 3.14 3.477 0 0 9.407-7.365 11.052-14.012-.832-.723-1.598-1.585-2.267-2.453-.567-.736-.358-2.056-.765-2.717-.669-1.084-1.804-1.378-1.907-1.682",fill:"#FFF"},null),C("path",{d:"M101.09 289.998s4.295 2.041 7.354 1.021c2.821-.94 4.53.668 7.08 1.178 2.55.51 6.874 1.1 11.686-1.26-.103-5.51-6.889-3.98-11.96-6.713-2.563-1.38-3.784-4.722-3.598-8.799h-9.402s-1.392 10.52-1.16 14.573",fill:"#CBD1D1"},null),C("path",{d:"M101.067 289.826s2.428 1.271 6.759.653c3.058-.437 3.712.481 7.423 1.031 3.712.55 10.724-.069 11.823-.894.413 1.1-.343 2.063-.343 2.063s-1.512.603-4.812.824c-2.03.136-5.8.291-7.607-.503-1.787-1.375-5.247-1.903-5.728-.241-3.918.95-7.355-.286-7.355-.286l-.16-2.647z",fill:"#2B0849"},null),C("path",{d:"M108.341 276.044h3.094s-.103 6.702 4.536 8.558c-4.64.618-8.558-2.303-7.63-8.558",fill:"#A4AABA"},null),C("path",{d:"M57.542 272.401s-2.107 7.416-4.485 12.306c-1.798 3.695-4.225 7.492 5.465 7.492 6.648 0 8.953-.48 7.423-6.599-1.53-6.12.266-13.199.266-13.199h-8.669z",fill:"#CBD1D1"},null),C("path",{d:"M51.476 289.793s2.097 1.169 6.633 1.169c6.083 0 8.249-1.65 8.249-1.65s.602 1.114-.619 2.165c-.993.855-3.597 1.591-7.39 1.546-4.145-.048-5.832-.566-6.736-1.168-.825-.55-.687-1.58-.137-2.062",fill:"#2B0849"},null),C("path",{d:"M58.419 274.304s.033 1.519-.314 2.93c-.349 1.42-1.078 3.104-1.13 4.139-.058 1.151 4.537 1.58 5.155.034.62-1.547 1.294-6.427 1.913-7.252.619-.825-4.903-2.119-5.624.15",fill:"#A4AABA"},null),C("path",{d:"M99.66 278.514l13.378.092s1.298-54.52 1.853-64.403c.554-9.882 3.776-43.364 1.002-63.128l-12.547-.644-22.849.78s-.434 3.966-1.195 9.976c-.063.496-.682.843-.749 1.365-.075.585.423 1.354.32 1.966-2.364 14.08-6.377 33.104-8.744 46.677-.116.666-1.234 1.009-1.458 2.691-.04.302.211 1.525.112 1.795-6.873 18.744-10.949 47.842-14.277 61.885l14.607-.014s2.197-8.57 4.03-16.97c2.811-12.886 23.111-85.01 23.111-85.01l3.016-.521 1.043 46.35s-.224 1.234.337 2.02c.56.785-.56 1.123-.392 2.244l.392 1.794s-.449 7.178-.898 11.89c-.448 4.71-.092 39.165-.092 39.165",fill:"#7BB2F9"},null),C("path",{d:"M76.085 221.626c1.153.094 4.038-2.019 6.955-4.935M106.36 225.142s2.774-1.11 6.103-3.883",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M107.275 222.1s2.773-1.11 6.102-3.884",stroke:"#648BD8","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M74.74 224.767s2.622-.591 6.505-3.365M86.03 151.634c-.27 3.106.3 8.525-4.336 9.123M103.625 149.88s.11 14.012-1.293 15.065c-2.219 1.664-2.99 1.944-2.99 1.944M99.79 150.438s.035 12.88-1.196 24.377M93.673 175.911s7.212-1.664 9.431-1.664M74.31 205.861a212.013 212.013 0 0 1-.979 4.56s-1.458 1.832-1.009 3.776c.449 1.944-.947 2.045-4.985 15.355-1.696 5.59-4.49 18.591-6.348 27.597l-.231 1.12M75.689 197.807a320.934 320.934 0 0 1-.882 4.754M82.591 152.233L81.395 162.7s-1.097.15-.5 2.244c.113 1.346-2.674 15.775-5.18 30.43M56.12 274.418h13.31",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M116.241 148.22s-17.047-3.104-35.893.2c.158 2.514-.003 4.15-.003 4.15s14.687-2.818 35.67-.312c.252-2.355.226-4.038.226-4.038",fill:"#192064"},null),C("path",{d:"M106.322 151.165l.003-4.911a.81.81 0 0 0-.778-.815c-2.44-.091-5.066-.108-7.836-.014a.818.818 0 0 0-.789.815l-.003 4.906a.81.81 0 0 0 .831.813c2.385-.06 4.973-.064 7.73.017a.815.815 0 0 0 .842-.81",fill:"#FFF"},null),C("path",{d:"M105.207 150.233l.002-3.076a.642.642 0 0 0-.619-.646 94.321 94.321 0 0 0-5.866-.01.65.65 0 0 0-.63.647v3.072a.64.64 0 0 0 .654.644 121.12 121.12 0 0 1 5.794.011c.362.01.665-.28.665-.642",fill:"#192064"},null),C("path",{d:"M100.263 275.415h12.338M101.436 270.53c.006 3.387.042 5.79.111 6.506M101.451 264.548a915.75 915.75 0 0 0-.015 4.337M100.986 174.965l.898 44.642s.673 1.57-.225 2.692c-.897 1.122 2.468.673.898 2.243-1.57 1.57.897 1.122 0 3.365-.596 1.489-.994 21.1-1.096 35.146",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M46.876 83.427s-.516 6.045 7.223 5.552c11.2-.712 9.218-9.345 31.54-21.655-.786-2.708-2.447-4.744-2.447-4.744s-11.068 3.11-22.584 8.046c-6.766 2.9-13.395 6.352-13.732 12.801M104.46 91.057l.941-5.372-8.884-11.43-5.037 5.372-1.74 7.834a.321.321 0 0 0 .108.32c.965.8 6.5 5.013 14.347 3.544a.332.332 0 0 0 .264-.268",fill:"#FFC6A0"},null),C("path",{d:"M93.942 79.387s-4.533-2.853-2.432-6.855c1.623-3.09 4.513 1.133 4.513 1.133s.52-3.642 3.121-3.642c.52-1.04 1.561-4.162 1.561-4.162s11.445 2.601 13.526 3.121c0 5.203-2.304 19.424-7.84 19.861-8.892.703-12.449-9.456-12.449-9.456",fill:"#FFC6A0"},null),C("path",{d:"M113.874 73.446c2.601-2.081 3.47-9.722 3.47-9.722s-2.479-.49-6.64-2.05c-4.683-2.081-12.798-4.747-17.48.976-9.668 3.223-2.05 19.823-2.05 19.823l2.713-3.021s-3.935-3.287-2.08-6.243c2.17-3.462 3.92 1.073 3.92 1.073s.637-2.387 3.581-3.342c.355-.71 1.036-2.674 1.432-3.85a1.073 1.073 0 0 1 1.263-.704c2.4.558 8.677 2.019 11.356 2.662.522.125.871.615.82 1.15l-.305 3.248z",fill:"#520038"},null),C("path",{d:"M104.977 76.064c-.103.61-.582 1.038-1.07.956-.489-.083-.801-.644-.698-1.254.103-.61.582-1.038 1.07-.956.488.082.8.644.698 1.254M112.132 77.694c-.103.61-.582 1.038-1.07.956-.488-.083-.8-.644-.698-1.254.103-.61.582-1.038 1.07-.956.488.082.8.643.698 1.254",fill:"#552950"},null),C("path",{stroke:"#DB836E","stroke-width":"1.118","stroke-linecap":"round","stroke-linejoin":"round",d:"M110.13 74.84l-.896 1.61-.298 4.357h-2.228"},null),C("path",{d:"M110.846 74.481s1.79-.716 2.506.537",stroke:"#5C2552","stroke-width":"1.118","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M92.386 74.282s.477-1.114 1.113-.716c.637.398 1.274 1.433.558 1.99-.717.556.159 1.67.159 1.67",stroke:"#DB836E","stroke-width":"1.118","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M103.287 72.93s1.83 1.113 4.137.954",stroke:"#5C2552","stroke-width":"1.118","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M103.685 81.762s2.227 1.193 4.376 1.193M104.64 84.308s.954.398 1.511.318M94.693 81.205s2.308 7.4 10.424 7.639",stroke:"#DB836E","stroke-width":"1.118","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M81.45 89.384s.45 5.647-4.935 12.787M69 82.654s-.726 9.282-8.204 14.206",stroke:"#E4EBF7","stroke-width":"1.101","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M129.405 122.865s-5.272 7.403-9.422 10.768",stroke:"#E4EBF7","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M119.306 107.329s.452 4.366-2.127 32.062",stroke:"#E4EBF7","stroke-width":"1.101","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M150.028 151.232h-49.837a1.01 1.01 0 0 1-1.01-1.01v-31.688c0-.557.452-1.01 1.01-1.01h49.837c.558 0 1.01.453 1.01 1.01v31.688a1.01 1.01 0 0 1-1.01 1.01",fill:"#F2D7AD"},null),C("path",{d:"M150.29 151.232h-19.863v-33.707h20.784v32.786a.92.92 0 0 1-.92.92",fill:"#F4D19D"},null),C("path",{d:"M123.554 127.896H92.917a.518.518 0 0 1-.425-.816l6.38-9.113c.193-.277.51-.442.85-.442h31.092l-7.26 10.371z",fill:"#F2D7AD"},null),C("path",{fill:"#CC9B6E",d:"M123.689 128.447H99.25v-.519h24.169l7.183-10.26.424.298z"},null),C("path",{d:"M158.298 127.896h-18.669a2.073 2.073 0 0 1-1.659-.83l-7.156-9.541h19.965c.49 0 .95.23 1.244.622l6.69 8.92a.519.519 0 0 1-.415.83",fill:"#F4D19D"},null),C("path",{fill:"#CC9B6E",d:"M157.847 128.479h-19.384l-7.857-10.475.415-.31 7.7 10.266h19.126zM130.554 150.685l-.032-8.177.519-.002.032 8.177z"},null),C("path",{fill:"#CC9B6E",d:"M130.511 139.783l-.08-21.414.519-.002.08 21.414zM111.876 140.932l-.498-.143 1.479-5.167.498.143zM108.437 141.06l-2.679-2.935 2.665-3.434.41.318-2.397 3.089 2.384 2.612zM116.607 141.06l-.383-.35 2.383-2.612-2.397-3.089.41-.318 2.665 3.434z"},null),C("path",{d:"M154.316 131.892l-3.114-1.96.038 3.514-1.043.092c-1.682.115-3.634.23-4.789.23-1.902 0-2.693 2.258 2.23 2.648l-2.645-.596s-2.168 1.317.504 2.3c0 0-1.58 1.217.561 2.58-.584 3.504 5.247 4.058 7.122 3.59 1.876-.47 4.233-2.359 4.487-5.16.28-3.085-.89-5.432-3.35-7.238",fill:"#FFC6A0"},null),C("path",{d:"M153.686 133.577s-6.522.47-8.36.372c-1.836-.098-1.904 2.19 2.359 2.264 3.739.15 5.451-.044 5.451-.044",stroke:"#DB836E","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M145.16 135.877c-1.85 1.346.561 2.355.561 2.355s3.478.898 6.73.617",stroke:"#DB836E","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M151.89 141.71s-6.28.111-6.73-2.132c-.223-1.346.45-1.402.45-1.402M146.114 140.868s-1.103 3.16 5.44 3.533M151.202 129.932v3.477M52.838 89.286c3.533-.337 8.423-1.248 13.582-7.754",stroke:"#DB836E","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M168.567 248.318a6.647 6.647 0 0 1-6.647-6.647v-66.466a6.647 6.647 0 1 1 13.294 0v66.466a6.647 6.647 0 0 1-6.647 6.647",fill:"#5BA02E"},null),C("path",{d:"M176.543 247.653a6.647 6.647 0 0 1-6.646-6.647v-33.232a6.647 6.647 0 1 1 13.293 0v33.232a6.647 6.647 0 0 1-6.647 6.647",fill:"#92C110"},null),C("path",{d:"M186.443 293.613H158.92a3.187 3.187 0 0 1-3.187-3.187v-46.134a3.187 3.187 0 0 1 3.187-3.187h27.524a3.187 3.187 0 0 1 3.187 3.187v46.134a3.187 3.187 0 0 1-3.187 3.187",fill:"#F2D7AD"},null),C("path",{d:"M88.979 89.48s7.776 5.384 16.6 2.842",stroke:"#E4EBF7","stroke-width":"1.101","stroke-linecap":"round","stroke-linejoin":"round"},null)])]),Vfe=()=>C("svg",{width:"254",height:"294"},[C("defs",null,[C("path",{d:"M0 .335h253.49v253.49H0z"},null),C("path",{d:"M0 293.665h253.49V.401H0z"},null)]),C("g",{fill:"none","fill-rule":"evenodd"},[C("g",{transform:"translate(0 .067)"},[C("mask",{fill:"#fff"},null),C("path",{d:"M0 128.134v-2.11C0 56.608 56.273.334 125.69.334h2.11c69.416 0 125.69 56.274 125.69 125.69v2.11c0 69.417-56.274 125.69-125.69 125.69h-2.11C56.273 253.824 0 197.551 0 128.134",fill:"#E4EBF7",mask:"url(#b)"},null)]),C("path",{d:"M39.989 132.108a8.332 8.332 0 1 1-16.581-1.671 8.332 8.332 0 0 1 16.58 1.671",fill:"#FFF"},null),C("path",{d:"M37.19 135.59l10.553 5.983M48.665 147.884l-12.734 10.861",stroke:"#FFF","stroke-width":"2"},null),C("path",{d:"M40.11 160.816a5.706 5.706 0 1 1-11.354-1.145 5.706 5.706 0 0 1 11.354 1.145M57.943 144.6a5.747 5.747 0 1 1-11.436-1.152 5.747 5.747 0 0 1 11.436 1.153M99.656 27.434l30.024-.013a4.619 4.619 0 1 0-.004-9.238l-30.024.013a4.62 4.62 0 0 0 .004 9.238M111.14 45.896l30.023-.013a4.62 4.62 0 1 0-.004-9.238l-30.024.013a4.619 4.619 0 1 0 .004 9.238",fill:"#FFF"},null),C("path",{d:"M113.53 27.421v-.002l15.89-.007a4.619 4.619 0 1 0 .005 9.238l-15.892.007v-.002a4.618 4.618 0 0 0-.004-9.234M150.167 70.091h-3.979a4.789 4.789 0 0 1-4.774-4.775 4.788 4.788 0 0 1 4.774-4.774h3.979a4.789 4.789 0 0 1 4.775 4.774 4.789 4.789 0 0 1-4.775 4.775",fill:"#FFF"},null),C("path",{d:"M171.687 30.234c0-16.392 13.289-29.68 29.681-29.68 16.392 0 29.68 13.288 29.68 29.68 0 16.393-13.288 29.681-29.68 29.681s-29.68-13.288-29.68-29.68",fill:"#FF603B"},null),C("path",{d:"M203.557 19.435l-.676 15.035a1.514 1.514 0 0 1-3.026 0l-.675-15.035a2.19 2.19 0 1 1 4.377 0m-.264 19.378c.513.477.77 1.1.77 1.87s-.257 1.393-.77 1.907c-.55.476-1.21.733-1.943.733a2.545 2.545 0 0 1-1.87-.77c-.55-.514-.806-1.136-.806-1.87 0-.77.256-1.393.806-1.87.513-.513 1.137-.733 1.87-.733.77 0 1.43.22 1.943.733",fill:"#FFF"},null),C("path",{d:"M119.3 133.275c4.426-.598 3.612-1.204 4.079-4.778.675-5.18-3.108-16.935-8.262-25.118-1.088-10.72-12.598-11.24-12.598-11.24s4.312 4.895 4.196 16.199c1.398 5.243.804 14.45.804 14.45s5.255 11.369 11.78 10.487",fill:"#FFB594"},null),C("path",{d:"M100.944 91.61s1.463-.583 3.211.582c8.08 1.398 10.368 6.706 11.3 11.368 1.864 1.282 1.864 2.33 1.864 3.496.365.777 1.515 3.03 1.515 3.03s-7.225 1.748-10.954 6.758c-1.399-6.41-6.936-25.235-6.936-25.235",fill:"#FFF"},null),C("path",{d:"M94.008 90.5l1.019-5.815-9.23-11.874-5.233 5.581-2.593 9.863s8.39 5.128 16.037 2.246",fill:"#FFB594"},null),C("path",{d:"M82.931 78.216s-4.557-2.868-2.445-6.892c1.632-3.107 4.537 1.139 4.537 1.139s.524-3.662 3.139-3.662c.523-1.046 1.569-4.184 1.569-4.184s11.507 2.615 13.6 3.138c-.001 5.23-2.317 19.529-7.884 19.969-8.94.706-12.516-9.508-12.516-9.508",fill:"#FFC6A0"},null),C("path",{d:"M102.971 72.243c2.616-2.093 3.489-9.775 3.489-9.775s-2.492-.492-6.676-2.062c-4.708-2.092-12.867-4.771-17.575.982-9.54 4.41-2.062 19.93-2.062 19.93l2.729-3.037s-3.956-3.304-2.092-6.277c2.183-3.48 3.943 1.08 3.943 1.08s.64-2.4 3.6-3.36c.356-.714 1.04-2.69 1.44-3.872a1.08 1.08 0 0 1 1.27-.707c2.41.56 8.723 2.03 11.417 2.676.524.126.876.619.825 1.156l-.308 3.266z",fill:"#520038"},null),C("path",{d:"M101.22 76.514c-.104.613-.585 1.044-1.076.96-.49-.082-.805-.646-.702-1.26.104-.613.585-1.044 1.076-.961.491.083.805.647.702 1.26M94.26 75.074c-.104.613-.585 1.044-1.076.96-.49-.082-.805-.646-.702-1.26.104-.613.585-1.044 1.076-.96.491.082.805.646.702 1.26",fill:"#552950"},null),C("path",{stroke:"#DB836E","stroke-width":"1.063","stroke-linecap":"round","stroke-linejoin":"round",d:"M99.206 73.644l-.9 1.62-.3 4.38h-2.24"},null),C("path",{d:"M99.926 73.284s1.8-.72 2.52.54",stroke:"#5C2552","stroke-width":"1.117","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M81.367 73.084s.48-1.12 1.12-.72c.64.4 1.28 1.44.56 2s.16 1.68.16 1.68",stroke:"#DB836E","stroke-width":"1.117","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M92.326 71.724s1.84 1.12 4.16.96",stroke:"#5C2552","stroke-width":"1.117","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M92.726 80.604s2.24 1.2 4.4 1.2M93.686 83.164s.96.4 1.52.32M83.687 80.044s1.786 6.547 9.262 7.954",stroke:"#DB836E","stroke-width":"1.063","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M95.548 91.663s-1.068 2.821-8.298 2.105c-7.23-.717-10.29-5.044-10.29-5.044",stroke:"#E4EBF7","stroke-width":"1.136","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M78.126 87.478s6.526 4.972 16.47 2.486c0 0 9.577 1.02 11.536 5.322 5.36 11.77.543 36.835 0 39.962 3.496 4.055-.466 8.483-.466 8.483-15.624-3.548-35.81-.6-35.81-.6-4.849-3.546-1.223-9.044-1.223-9.044L62.38 110.32c-2.485-15.227.833-19.803 3.549-20.743 3.03-1.049 8.04-1.282 8.04-1.282.496-.058 1.08-.076 1.37-.233 2.36-1.282 2.787-.583 2.787-.583",fill:"#FFF"},null),C("path",{d:"M65.828 89.81s-6.875.465-7.59 8.156c-.466 8.857 3.03 10.954 3.03 10.954s6.075 22.102 16.796 22.957c8.39-2.176 4.758-6.702 4.661-11.42-.233-11.304-7.108-16.897-7.108-16.897s-4.212-13.75-9.789-13.75",fill:"#FFC6A0"},null),C("path",{d:"M71.716 124.225s.855 11.264 9.828 6.486c4.765-2.536 7.581-13.828 9.789-22.568 1.456-5.768 2.58-12.197 2.58-12.197l-4.973-1.709s-2.408 5.516-7.769 12.275c-4.335 5.467-9.144 11.11-9.455 17.713",fill:"#FFC6A0"},null),C("path",{d:"M108.463 105.191s1.747 2.724-2.331 30.535c2.376 2.216 1.053 6.012-.233 7.51",stroke:"#E4EBF7","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M123.262 131.527s-.427 2.732-11.77 1.981c-15.187-1.006-25.326-3.25-25.326-3.25l.933-5.8s.723.215 9.71-.068c11.887-.373 18.714-6.07 24.964-1.022 4.039 3.263 1.489 8.16 1.489 8.16",fill:"#FFC6A0"},null),C("path",{d:"M70.24 90.974s-5.593-4.739-11.054 2.68c-3.318 7.223.517 15.284 2.664 19.578-.31 3.729 2.33 4.311 2.33 4.311s.108.895 1.516 2.68c4.078-7.03 6.72-9.166 13.711-12.546-.328-.656-1.877-3.265-1.825-3.767.175-1.69-1.282-2.623-1.282-2.623s-.286-.156-1.165-2.738c-.788-2.313-2.036-5.177-4.895-7.575",fill:"#FFF"},null),C("path",{d:"M90.232 288.027s4.855 2.308 8.313 1.155c3.188-1.063 5.12.755 8.002 1.331 2.881.577 7.769 1.243 13.207-1.424-.117-6.228-7.786-4.499-13.518-7.588-2.895-1.56-4.276-5.336-4.066-9.944H91.544s-1.573 11.89-1.312 16.47",fill:"#CBD1D1"},null),C("path",{d:"M90.207 287.833s2.745 1.437 7.639.738c3.456-.494 3.223.66 7.418 1.282 4.195.621 13.092-.194 14.334-1.126.466 1.242-.388 2.33-.388 2.33s-1.709.682-5.438.932c-2.295.154-8.098.276-10.14-.621-2.02-1.554-4.894-1.515-6.06-.234-4.427 1.075-7.184-.31-7.184-.31l-.181-2.991z",fill:"#2B0849"},null),C("path",{d:"M98.429 272.257h3.496s-.117 7.574 5.127 9.671c-5.244.7-9.672-2.602-8.623-9.671",fill:"#A4AABA"},null),C("path",{d:"M44.425 272.046s-2.208 7.774-4.702 12.899c-1.884 3.874-4.428 7.854 5.729 7.854 6.97 0 9.385-.503 7.782-6.917-1.604-6.415.279-13.836.279-13.836h-9.088z",fill:"#CBD1D1"},null),C("path",{d:"M38.066 290.277s2.198 1.225 6.954 1.225c6.376 0 8.646-1.73 8.646-1.73s.63 1.168-.649 2.27c-1.04.897-3.77 1.668-7.745 1.621-4.347-.05-6.115-.593-7.062-1.224-.864-.577-.72-1.657-.144-2.162",fill:"#2B0849"},null),C("path",{d:"M45.344 274.041s.035 1.592-.329 3.07c-.365 1.49-1.13 3.255-1.184 4.34-.061 1.206 4.755 1.657 5.403.036.65-1.622 1.357-6.737 2.006-7.602.648-.865-5.14-2.222-5.896.156",fill:"#A4AABA"},null),C("path",{d:"M89.476 277.57l13.899.095s1.349-56.643 1.925-66.909c.576-10.267 3.923-45.052 1.042-65.585l-13.037-.669-23.737.81s-.452 4.12-1.243 10.365c-.065.515-.708.874-.777 1.417-.078.608.439 1.407.332 2.044-2.455 14.627-5.797 32.736-8.256 46.837-.121.693-1.282 1.048-1.515 2.796-.042.314.22 1.584.116 1.865-7.14 19.473-12.202 52.601-15.66 67.19l15.176-.015s2.282-10.145 4.185-18.871c2.922-13.389 24.012-88.32 24.012-88.32l3.133-.954-.158 48.568s-.233 1.282.35 2.098c.583.815-.581 1.167-.408 2.331l.408 1.864s-.466 7.458-.932 12.352c-.467 4.895 1.145 40.69 1.145 40.69",fill:"#7BB2F9"},null),C("path",{d:"M64.57 218.881c1.197.099 4.195-2.097 7.225-5.127M96.024 222.534s2.881-1.152 6.34-4.034",stroke:"#648BD8","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M96.973 219.373s2.882-1.153 6.34-4.034",stroke:"#648BD8","stroke-width":"1.032","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M63.172 222.144s2.724-.614 6.759-3.496M74.903 146.166c-.281 3.226.31 8.856-4.506 9.478M93.182 144.344s.115 14.557-1.344 15.65c-2.305 1.73-3.107 2.02-3.107 2.02M89.197 144.923s.269 13.144-1.01 25.088M83.525 170.71s6.81-1.051 9.116-1.051M46.026 270.045l-.892 4.538M46.937 263.289l-.815 4.157M62.725 202.503c-.33 1.618-.102 1.904-.449 3.438 0 0-2.756 1.903-2.29 3.923.466 2.02-.31 3.424-4.505 17.252-1.762 5.807-4.233 18.922-6.165 28.278-.03.144-.521 2.646-1.14 5.8M64.158 194.136c-.295 1.658-.6 3.31-.917 4.938M71.33 146.787l-1.244 10.877s-1.14.155-.519 2.33c.117 1.399-2.778 16.39-5.382 31.615M44.242 273.727H58.07",stroke:"#648BD8","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M106.18 142.117c-3.028-.489-18.825-2.744-36.219.2a.625.625 0 0 0-.518.644c.063 1.307.044 2.343.015 2.995a.617.617 0 0 0 .716.636c3.303-.534 17.037-2.412 35.664-.266.347.04.66-.214.692-.56.124-1.347.16-2.425.17-3.029a.616.616 0 0 0-.52-.62",fill:"#192064"},null),C("path",{d:"M96.398 145.264l.003-5.102a.843.843 0 0 0-.809-.847 114.104 114.104 0 0 0-8.141-.014.85.85 0 0 0-.82.847l-.003 5.097c0 .476.388.857.864.845 2.478-.064 5.166-.067 8.03.017a.848.848 0 0 0 .876-.843",fill:"#FFF"},null),C("path",{d:"M95.239 144.296l.002-3.195a.667.667 0 0 0-.643-.672c-1.9-.061-3.941-.073-6.094-.01a.675.675 0 0 0-.654.672l-.002 3.192c0 .376.305.677.68.669 1.859-.042 3.874-.043 6.02.012.376.01.69-.291.691-.668",fill:"#192064"},null),C("path",{d:"M90.102 273.522h12.819M91.216 269.761c.006 3.519-.072 5.55 0 6.292M90.923 263.474c-.009 1.599-.016 2.558-.016 4.505M90.44 170.404l.932 46.38s.7 1.631-.233 2.796c-.932 1.166 2.564.7.932 2.33-1.63 1.633.933 1.166 0 3.497-.618 1.546-1.031 21.921-1.138 36.513",stroke:"#648BD8","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M73.736 98.665l2.214 4.312s2.098.816 1.865 2.68l.816 2.214M64.297 116.611c.233-.932 2.176-7.147 12.585-10.488M77.598 90.042s7.691 6.137 16.547 2.72",stroke:"#E4EBF7","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M91.974 86.954s5.476-.816 7.574-4.545c1.297-.345.72 2.212-.33 3.671-.7.971-1.01 1.554-1.01 1.554s.194.31.155.816c-.053.697-.175.653-.272 1.048-.081.335.108.657 0 1.049-.046.17-.198.5-.382.878-.12.249-.072.687-.2.948-.231.469-1.562 1.87-2.622 2.855-3.826 3.554-5.018 1.644-6.001-.408-.894-1.865-.661-5.127-.874-6.875-.35-2.914-2.622-3.03-1.923-4.429.343-.685 2.87.69 3.263 1.748.757 2.04 2.952 1.807 2.622 1.69",fill:"#FFC6A0"},null),C("path",{d:"M99.8 82.429c-.465.077-.35.272-.97 1.243-.622.971-4.817 2.932-6.39 3.224-2.589.48-2.278-1.56-4.254-2.855-1.69-1.107-3.562-.638-1.398 1.398.99.932.932 1.107 1.398 3.205.335 1.506-.64 3.67.7 5.593",stroke:"#DB836E","stroke-width":".774","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M79.543 108.673c-2.1 2.926-4.266 6.175-5.557 8.762",stroke:"#E59788","stroke-width":".774","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M87.72 124.768s-2.098-1.942-5.127-2.719c-3.03-.777-3.574-.155-5.516.078-1.942.233-3.885-.932-3.652.7.233 1.63 5.05 1.01 5.206 2.097.155 1.087-6.37 2.796-8.313 2.175-.777.777.466 1.864 2.02 2.175.233 1.554 2.253 1.554 2.253 1.554s.699 1.01 2.641 1.088c2.486 1.32 8.934-.7 10.954-1.554 2.02-.855-.466-5.594-.466-5.594",fill:"#FFC6A0"},null),C("path",{d:"M73.425 122.826s.66 1.127 3.167 1.418c2.315.27 2.563.583 2.563.583s-2.545 2.894-9.07 2.272M72.416 129.274s3.826.097 4.933-.718M74.98 130.75s1.961.136 3.36-.505M77.232 131.916s1.748.019 2.914-.505M73.328 122.321s-.595-1.032 1.262-.427c1.671.544 2.833.055 5.128.155 1.389.061 3.067-.297 3.982.15 1.606.784 3.632 2.181 3.632 2.181s10.526 1.204 19.033-1.127M78.864 108.104s-8.39 2.758-13.168 12.12",stroke:"#E59788","stroke-width":".774","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M109.278 112.533s3.38-3.613 7.575-4.662",stroke:"#E4EBF7","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M107.375 123.006s9.697-2.745 11.445-.88",stroke:"#E59788","stroke-width":".774","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M194.605 83.656l3.971-3.886M187.166 90.933l3.736-3.655M191.752 84.207l-4.462-4.56M198.453 91.057l-4.133-4.225M129.256 163.074l3.718-3.718M122.291 170.039l3.498-3.498M126.561 163.626l-4.27-4.27M132.975 170.039l-3.955-3.955",stroke:"#BFCDDD","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M190.156 211.779h-1.604a4.023 4.023 0 0 1-4.011-4.011V175.68a4.023 4.023 0 0 1 4.01-4.01h1.605a4.023 4.023 0 0 1 4.011 4.01v32.088a4.023 4.023 0 0 1-4.01 4.01",fill:"#A3B4C6"},null),C("path",{d:"M237.824 212.977a4.813 4.813 0 0 1-4.813 4.813h-86.636a4.813 4.813 0 0 1 0-9.626h86.636a4.813 4.813 0 0 1 4.813 4.813",fill:"#A3B4C6"},null),C("mask",{fill:"#fff"},null),C("path",{fill:"#A3B4C6",mask:"url(#d)",d:"M154.098 190.096h70.513v-84.617h-70.513z"},null),C("path",{d:"M224.928 190.096H153.78a3.219 3.219 0 0 1-3.208-3.209V167.92a3.219 3.219 0 0 1 3.208-3.21h71.148a3.219 3.219 0 0 1 3.209 3.21v18.967a3.219 3.219 0 0 1-3.21 3.209M224.928 130.832H153.78a3.218 3.218 0 0 1-3.208-3.208v-18.968a3.219 3.219 0 0 1 3.208-3.209h71.148a3.219 3.219 0 0 1 3.209 3.21v18.967a3.218 3.218 0 0 1-3.21 3.208",fill:"#BFCDDD",mask:"url(#d)"},null),C("path",{d:"M159.563 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M166.98 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M174.397 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M222.539 120.546h-22.461a.802.802 0 0 1-.802-.802v-3.208c0-.443.359-.803.802-.803h22.46c.444 0 .803.36.803.803v3.208c0 .443-.36.802-.802.802",fill:"#FFF",mask:"url(#d)"},null),C("path",{d:"M224.928 160.464H153.78a3.218 3.218 0 0 1-3.208-3.209v-18.967a3.219 3.219 0 0 1 3.208-3.209h71.148a3.219 3.219 0 0 1 3.209 3.209v18.967a3.218 3.218 0 0 1-3.21 3.209",fill:"#BFCDDD",mask:"url(#d)"},null),C("path",{d:"M173.455 130.832h49.301M164.984 130.832h6.089M155.952 130.832h6.75M173.837 160.613h49.3M165.365 160.613h6.089M155.57 160.613h6.751",stroke:"#7C90A5","stroke-width":"1.124","stroke-linecap":"round","stroke-linejoin":"round",mask:"url(#d)"},null),C("path",{d:"M159.563 151.038a2.407 2.407 0 1 1 0-4.814 2.407 2.407 0 0 1 0 4.814M166.98 151.038a2.407 2.407 0 1 1 0-4.814 2.407 2.407 0 0 1 0 4.814M174.397 151.038a2.407 2.407 0 1 1 .001-4.814 2.407 2.407 0 0 1 0 4.814M222.539 151.038h-22.461a.802.802 0 0 1-.802-.802v-3.209c0-.443.359-.802.802-.802h22.46c.444 0 .803.36.803.802v3.209c0 .443-.36.802-.802.802M159.563 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M166.98 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M174.397 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M222.539 179.987h-22.461a.802.802 0 0 1-.802-.802v-3.209c0-.443.359-.802.802-.802h22.46c.444 0 .803.36.803.802v3.209c0 .443-.36.802-.802.802",fill:"#FFF",mask:"url(#d)"},null),C("path",{d:"M203.04 221.108h-27.372a2.413 2.413 0 0 1-2.406-2.407v-11.448a2.414 2.414 0 0 1 2.406-2.407h27.372a2.414 2.414 0 0 1 2.407 2.407V218.7a2.413 2.413 0 0 1-2.407 2.407",fill:"#BFCDDD",mask:"url(#d)"},null),C("path",{d:"M177.259 207.217v11.52M201.05 207.217v11.52",stroke:"#A3B4C6","stroke-width":"1.124","stroke-linecap":"round","stroke-linejoin":"round",mask:"url(#d)"},null),C("path",{d:"M162.873 267.894a9.422 9.422 0 0 1-9.422-9.422v-14.82a9.423 9.423 0 0 1 18.845 0v14.82a9.423 9.423 0 0 1-9.423 9.422",fill:"#5BA02E",mask:"url(#d)"},null),C("path",{d:"M171.22 267.83a9.422 9.422 0 0 1-9.422-9.423v-3.438a9.423 9.423 0 0 1 18.845 0v3.438a9.423 9.423 0 0 1-9.422 9.423",fill:"#92C110",mask:"url(#d)"},null),C("path",{d:"M181.31 293.666h-27.712a3.209 3.209 0 0 1-3.209-3.21V269.79a3.209 3.209 0 0 1 3.209-3.21h27.711a3.209 3.209 0 0 1 3.209 3.21v20.668a3.209 3.209 0 0 1-3.209 3.209",fill:"#F2D7AD",mask:"url(#d)"},null)])]),Xfe=()=>C("svg",{width:"251",height:"294"},[C("g",{fill:"none","fill-rule":"evenodd"},[C("path",{d:"M0 129.023v-2.084C0 58.364 55.591 2.774 124.165 2.774h2.085c68.574 0 124.165 55.59 124.165 124.165v2.084c0 68.575-55.59 124.166-124.165 124.166h-2.085C55.591 253.189 0 197.598 0 129.023",fill:"#E4EBF7"},null),C("path",{d:"M41.417 132.92a8.231 8.231 0 1 1-16.38-1.65 8.231 8.231 0 0 1 16.38 1.65",fill:"#FFF"},null),C("path",{d:"M38.652 136.36l10.425 5.91M49.989 148.505l-12.58 10.73",stroke:"#FFF","stroke-width":"2"},null),C("path",{d:"M41.536 161.28a5.636 5.636 0 1 1-11.216-1.13 5.636 5.636 0 0 1 11.216 1.13M59.154 145.261a5.677 5.677 0 1 1-11.297-1.138 5.677 5.677 0 0 1 11.297 1.138M100.36 29.516l29.66-.013a4.562 4.562 0 1 0-.004-9.126l-29.66.013a4.563 4.563 0 0 0 .005 9.126M111.705 47.754l29.659-.013a4.563 4.563 0 1 0-.004-9.126l-29.66.013a4.563 4.563 0 1 0 .005 9.126",fill:"#FFF"},null),C("path",{d:"M114.066 29.503V29.5l15.698-.007a4.563 4.563 0 1 0 .004 9.126l-15.698.007v-.002a4.562 4.562 0 0 0-.004-9.122M185.405 137.723c-.55 5.455-5.418 9.432-10.873 8.882-5.456-.55-9.432-5.418-8.882-10.873.55-5.455 5.418-9.432 10.873-8.882 5.455.55 9.432 5.418 8.882 10.873",fill:"#FFF"},null),C("path",{d:"M180.17 143.772l12.572 7.129M193.841 158.42L178.67 171.36",stroke:"#FFF","stroke-width":"2"},null),C("path",{d:"M185.55 171.926a6.798 6.798 0 1 1-13.528-1.363 6.798 6.798 0 0 1 13.527 1.363M204.12 155.285a6.848 6.848 0 1 1-13.627-1.375 6.848 6.848 0 0 1 13.626 1.375",fill:"#FFF"},null),C("path",{d:"M152.988 194.074a2.21 2.21 0 1 1-4.42 0 2.21 2.21 0 0 1 4.42 0zM225.931 118.217a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.421 0zM217.09 153.051a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.42 0zM177.84 109.842a2.21 2.21 0 1 1-4.422 0 2.21 2.21 0 0 1 4.421 0zM196.114 94.454a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.421 0zM202.844 182.523a2.21 2.21 0 1 1-4.42 0 2.21 2.21 0 0 1 4.42 0z",stroke:"#FFF","stroke-width":"2"},null),C("path",{stroke:"#FFF","stroke-width":"2",d:"M215.125 155.262l-1.902 20.075-10.87 5.958M174.601 176.636l-6.322 9.761H156.98l-4.484 6.449M175.874 127.28V111.56M221.51 119.404l-12.77 7.859-15.228-7.86V96.668"},null),C("path",{d:"M180.68 29.32C180.68 13.128 193.806 0 210 0c16.193 0 29.32 13.127 29.32 29.32 0 16.194-13.127 29.322-29.32 29.322-16.193 0-29.32-13.128-29.32-29.321",fill:"#A26EF4"},null),C("path",{d:"M221.45 41.706l-21.563-.125a1.744 1.744 0 0 1-1.734-1.754l.071-12.23a1.744 1.744 0 0 1 1.754-1.734l21.562.125c.964.006 1.74.791 1.735 1.755l-.071 12.229a1.744 1.744 0 0 1-1.754 1.734",fill:"#FFF"},null),C("path",{d:"M215.106 29.192c-.015 2.577-2.049 4.654-4.543 4.64-2.494-.014-4.504-2.115-4.489-4.693l.04-6.925c.016-2.577 2.05-4.654 4.543-4.64 2.494.015 4.504 2.116 4.49 4.693l-.04 6.925zm-4.53-14.074a6.877 6.877 0 0 0-6.916 6.837l-.043 7.368a6.877 6.877 0 0 0 13.754.08l.042-7.368a6.878 6.878 0 0 0-6.837-6.917zM167.566 68.367h-3.93a4.73 4.73 0 0 1-4.717-4.717 4.73 4.73 0 0 1 4.717-4.717h3.93a4.73 4.73 0 0 1 4.717 4.717 4.73 4.73 0 0 1-4.717 4.717",fill:"#FFF"},null),C("path",{d:"M168.214 248.838a6.611 6.611 0 0 1-6.61-6.611v-66.108a6.611 6.611 0 0 1 13.221 0v66.108a6.611 6.611 0 0 1-6.61 6.61",fill:"#5BA02E"},null),C("path",{d:"M176.147 248.176a6.611 6.611 0 0 1-6.61-6.61v-33.054a6.611 6.611 0 1 1 13.221 0v33.053a6.611 6.611 0 0 1-6.61 6.611",fill:"#92C110"},null),C("path",{d:"M185.994 293.89h-27.376a3.17 3.17 0 0 1-3.17-3.17v-45.887a3.17 3.17 0 0 1 3.17-3.17h27.376a3.17 3.17 0 0 1 3.17 3.17v45.886a3.17 3.17 0 0 1-3.17 3.17",fill:"#F2D7AD"},null),C("path",{d:"M81.972 147.673s6.377-.927 17.566-1.28c11.729-.371 17.57 1.086 17.57 1.086s3.697-3.855.968-8.424c1.278-12.077 5.982-32.827.335-48.273-1.116-1.339-3.743-1.512-7.536-.62-1.337.315-7.147-.149-7.983-.1l-15.311-.347s-3.487-.17-8.035-.508c-1.512-.113-4.227-1.683-5.458-.338-.406.443-2.425 5.669-1.97 16.077l8.635 35.642s-3.141 3.61 1.219 7.085",fill:"#FFF"},null),C("path",{d:"M75.768 73.325l-.9-6.397 11.982-6.52s7.302-.118 8.038 1.205c.737 1.324-5.616.993-5.616.993s-1.836 1.388-2.615 2.5c-1.654 2.363-.986 6.471-8.318 5.986-1.708.284-2.57 2.233-2.57 2.233",fill:"#FFC6A0"},null),C("path",{d:"M52.44 77.672s14.217 9.406 24.973 14.444c1.061.497-2.094 16.183-11.892 11.811-7.436-3.318-20.162-8.44-21.482-14.496-.71-3.258 2.543-7.643 8.401-11.76M141.862 80.113s-6.693 2.999-13.844 6.876c-3.894 2.11-10.137 4.704-12.33 7.988-6.224 9.314 3.536 11.22 12.947 7.503 6.71-2.651 28.999-12.127 13.227-22.367",fill:"#FFB594"},null),C("path",{d:"M76.166 66.36l3.06 3.881s-2.783 2.67-6.31 5.747c-7.103 6.195-12.803 14.296-15.995 16.44-3.966 2.662-9.754 3.314-12.177-.118-3.553-5.032.464-14.628 31.422-25.95",fill:"#FFC6A0"},null),C("path",{d:"M64.674 85.116s-2.34 8.413-8.912 14.447c.652.548 18.586 10.51 22.144 10.056 5.238-.669 6.417-18.968 1.145-20.531-.702-.208-5.901-1.286-8.853-2.167-.87-.26-1.611-1.71-3.545-.936l-1.98-.869zM128.362 85.826s5.318 1.956 7.325 13.734c-.546.274-17.55 12.35-21.829 7.805-6.534-6.94-.766-17.393 4.275-18.61 4.646-1.121 5.03-1.37 10.23-2.929",fill:"#FFF"},null),C("path",{d:"M78.18 94.656s.911 7.41-4.914 13.078",stroke:"#E4EBF7","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M87.397 94.68s3.124 2.572 10.263 2.572c7.14 0 9.074-3.437 9.074-3.437",stroke:"#E4EBF7","stroke-width":".932","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M117.184 68.639l-6.781-6.177s-5.355-4.314-9.223-.893c-3.867 3.422 4.463 2.083 5.653 4.165 1.19 2.082.848 1.143-2.083.446-5.603-1.331-2.082.893 2.975 5.355 2.091 1.845 6.992.955 6.992.955l2.467-3.851z",fill:"#FFC6A0"},null),C("path",{d:"M105.282 91.315l-.297-10.937-15.918-.027-.53 10.45c-.026.403.17.788.515.999 2.049 1.251 9.387 5.093 15.799.424.287-.21.443-.554.431-.91",fill:"#FFB594"},null),C("path",{d:"M107.573 74.24c.817-1.147.982-9.118 1.015-11.928a1.046 1.046 0 0 0-.965-1.055l-4.62-.365c-7.71-1.044-17.071.624-18.253 6.346-5.482 5.813-.421 13.244-.421 13.244s1.963 3.566 4.305 6.791c.756 1.041.398-3.731 3.04-5.929 5.524-4.594 15.899-7.103 15.899-7.103",fill:"#5C2552"},null),C("path",{d:"M88.426 83.206s2.685 6.202 11.602 6.522c7.82.28 8.973-7.008 7.434-17.505l-.909-5.483c-6.118-2.897-15.478.54-15.478.54s-.576 2.044-.19 5.504c-2.276 2.066-1.824 5.618-1.824 5.618s-.905-1.922-1.98-2.321c-.86-.32-1.897.089-2.322 1.98-1.04 4.632 3.667 5.145 3.667 5.145",fill:"#FFC6A0"},null),C("path",{stroke:"#DB836E","stroke-width":"1.145","stroke-linecap":"round","stroke-linejoin":"round",d:"M100.843 77.099l1.701-.928-1.015-4.324.674-1.406"},null),C("path",{d:"M105.546 74.092c-.022.713-.452 1.279-.96 1.263-.51-.016-.904-.607-.882-1.32.021-.713.452-1.278.96-1.263.51.016.904.607.882 1.32M97.592 74.349c-.022.713-.452 1.278-.961 1.263-.509-.016-.904-.607-.882-1.32.022-.713.452-1.279.961-1.263.51.016.904.606.882 1.32",fill:"#552950"},null),C("path",{d:"M91.132 86.786s5.269 4.957 12.679 2.327",stroke:"#DB836E","stroke-width":"1.145","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M99.776 81.903s-3.592.232-1.44-2.79c1.59-1.496 4.897-.46 4.897-.46s1.156 3.906-3.457 3.25",fill:"#DB836E"},null),C("path",{d:"M102.88 70.6s2.483.84 3.402.715M93.883 71.975s2.492-1.144 4.778-1.073",stroke:"#5C2552","stroke-width":"1.526","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M86.32 77.374s.961.879 1.458 2.106c-.377.48-1.033 1.152-.236 1.809M99.337 83.719s1.911.151 2.509-.254",stroke:"#DB836E","stroke-width":"1.145","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M87.782 115.821l15.73-3.012M100.165 115.821l10.04-2.008",stroke:"#E4EBF7","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M66.508 86.763s-1.598 8.83-6.697 14.078",stroke:"#E4EBF7","stroke-width":"1.114","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M128.31 87.934s3.013 4.121 4.06 11.785",stroke:"#E4EBF7","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M64.09 84.816s-6.03 9.912-13.607 9.903",stroke:"#DB836E","stroke-width":".795","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M112.366 65.909l-.142 5.32s5.993 4.472 11.945 9.202c4.482 3.562 8.888 7.455 10.985 8.662 4.804 2.766 8.9 3.355 11.076 1.808 4.071-2.894 4.373-9.878-8.136-15.263-4.271-1.838-16.144-6.36-25.728-9.73",fill:"#FFC6A0"},null),C("path",{d:"M130.532 85.488s4.588 5.757 11.619 6.214",stroke:"#DB836E","stroke-width":".75","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M121.708 105.73s-.393 8.564-1.34 13.612",stroke:"#E4EBF7","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M115.784 161.512s-3.57-1.488-2.678-7.14",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M101.52 290.246s4.326 2.057 7.408 1.03c2.842-.948 4.564.673 7.132 1.186 2.57.514 6.925 1.108 11.772-1.269-.104-5.551-6.939-4.01-12.048-6.763-2.582-1.39-3.812-4.757-3.625-8.863h-9.471s-1.402 10.596-1.169 14.68",fill:"#CBD1D1"},null),C("path",{d:"M101.496 290.073s2.447 1.281 6.809.658c3.081-.44 3.74.485 7.479 1.039 3.739.554 10.802-.07 11.91-.9.415 1.108-.347 2.077-.347 2.077s-1.523.608-4.847.831c-2.045.137-5.843.293-7.663-.507-1.8-1.385-5.286-1.917-5.77-.243-3.947.958-7.41-.288-7.41-.288l-.16-2.667z",fill:"#2B0849"},null),C("path",{d:"M108.824 276.19h3.116s-.103 6.751 4.57 8.62c-4.673.624-8.62-2.32-7.686-8.62",fill:"#A4AABA"},null),C("path",{d:"M57.65 272.52s-2.122 7.47-4.518 12.396c-1.811 3.724-4.255 7.548 5.505 7.548 6.698 0 9.02-.483 7.479-6.648-1.541-6.164.268-13.296.268-13.296H57.65z",fill:"#CBD1D1"},null),C("path",{d:"M51.54 290.04s2.111 1.178 6.682 1.178c6.128 0 8.31-1.662 8.31-1.662s.605 1.122-.624 2.18c-1 .862-3.624 1.603-7.444 1.559-4.177-.049-5.876-.57-6.786-1.177-.831-.554-.692-1.593-.138-2.078",fill:"#2B0849"},null),C("path",{d:"M58.533 274.438s.034 1.529-.315 2.95c-.352 1.431-1.087 3.127-1.139 4.17-.058 1.16 4.57 1.592 5.194.035.623-1.559 1.303-6.475 1.927-7.306.622-.831-4.94-2.135-5.667.15",fill:"#A4AABA"},null),C("path",{d:"M100.885 277.015l13.306.092s1.291-54.228 1.843-64.056c.552-9.828 3.756-43.13.997-62.788l-12.48-.64-22.725.776s-.433 3.944-1.19 9.921c-.062.493-.677.838-.744 1.358-.075.582.42 1.347.318 1.956-2.35 14.003-6.343 32.926-8.697 46.425-.116.663-1.227 1.004-1.45 2.677-.04.3.21 1.516.112 1.785-6.836 18.643-10.89 47.584-14.2 61.551l14.528-.014s2.185-8.524 4.008-16.878c2.796-12.817 22.987-84.553 22.987-84.553l3-.517 1.037 46.1s-.223 1.228.334 2.008c.558.782-.556 1.117-.39 2.233l.39 1.784s-.446 7.14-.892 11.826c-.446 4.685-.092 38.954-.092 38.954",fill:"#7BB2F9"},null),C("path",{d:"M77.438 220.434c1.146.094 4.016-2.008 6.916-4.91M107.55 223.931s2.758-1.103 6.069-3.862",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M108.459 220.905s2.759-1.104 6.07-3.863",stroke:"#648BD8","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M76.099 223.557s2.608-.587 6.47-3.346M87.33 150.82c-.27 3.088.297 8.478-4.315 9.073M104.829 149.075s.11 13.936-1.286 14.983c-2.207 1.655-2.975 1.934-2.975 1.934M101.014 149.63s.035 12.81-1.19 24.245M94.93 174.965s7.174-1.655 9.38-1.655M75.671 204.754c-.316 1.55-.64 3.067-.973 4.535 0 0-1.45 1.822-1.003 3.756.446 1.934-.943 2.034-4.96 15.273-1.686 5.559-4.464 18.49-6.313 27.447-.078.38-4.018 18.06-4.093 18.423M77.043 196.743a313.269 313.269 0 0 1-.877 4.729M83.908 151.414l-1.19 10.413s-1.091.148-.496 2.23c.111 1.34-2.66 15.692-5.153 30.267M57.58 272.94h13.238",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M117.377 147.423s-16.955-3.087-35.7.199c.157 2.501-.002 4.128-.002 4.128s14.607-2.802 35.476-.31c.251-2.342.226-4.017.226-4.017",fill:"#192064"},null),C("path",{d:"M107.511 150.353l.004-4.885a.807.807 0 0 0-.774-.81c-2.428-.092-5.04-.108-7.795-.014a.814.814 0 0 0-.784.81l-.003 4.88c0 .456.371.82.827.808a140.76 140.76 0 0 1 7.688.017.81.81 0 0 0 .837-.806",fill:"#FFF"},null),C("path",{d:"M106.402 149.426l.002-3.06a.64.64 0 0 0-.616-.643 94.135 94.135 0 0 0-5.834-.009.647.647 0 0 0-.626.643l-.001 3.056c0 .36.291.648.651.64 1.78-.04 3.708-.041 5.762.012.36.009.662-.279.662-.64",fill:"#192064"},null),C("path",{d:"M101.485 273.933h12.272M102.652 269.075c.006 3.368.04 5.759.11 6.47M102.667 263.125c-.009 1.53-.015 2.98-.016 4.313M102.204 174.024l.893 44.402s.669 1.561-.224 2.677c-.892 1.116 2.455.67.893 2.231-1.562 1.562.893 1.116 0 3.347-.592 1.48-.988 20.987-1.09 34.956",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null)])]),Yfe=t=>{const{componentCls:e,lineHeightHeading3:n,iconCls:i,padding:o,paddingXL:r,paddingXS:a,paddingLG:s,marginXS:l,lineHeight:c}=t;return{[e]:{padding:`${s*2}px ${r}px`,"&-rtl":{direction:"rtl"}},[`${e} ${e}-image`]:{width:t.imageWidth,height:t.imageHeight,margin:"auto"},[`${e} ${e}-icon`]:{marginBottom:s,textAlign:"center",[`& > ${i}`]:{fontSize:t.resultIconFontSize}},[`${e} ${e}-title`]:{color:t.colorTextHeading,fontSize:t.resultTitleFontSize,lineHeight:n,marginBlock:l,textAlign:"center"},[`${e} ${e}-subtitle`]:{color:t.colorTextDescription,fontSize:t.resultSubtitleFontSize,lineHeight:c,textAlign:"center"},[`${e} ${e}-content`]:{marginTop:s,padding:`${s}px ${o*2.5}px`,backgroundColor:t.colorFillAlter},[`${e} ${e}-extra`]:{margin:t.resultExtraMargin,textAlign:"center","& > *":{marginInlineEnd:a,"&:last-child":{marginInlineEnd:0}}}}},Gfe=t=>{const{componentCls:e,iconCls:n}=t;return{[`${e}-success ${e}-icon > ${n}`]:{color:t.resultSuccessIconColor},[`${e}-error ${e}-icon > ${n}`]:{color:t.resultErrorIconColor},[`${e}-info ${e}-icon > ${n}`]:{color:t.resultInfoIconColor},[`${e}-warning ${e}-icon > ${n}`]:{color:t.resultWarningIconColor}}},Kfe=t=>[Yfe(t),Gfe(t)],Ufe=t=>Kfe(t),qfe=et("Result",t=>{const{paddingLG:e,fontSizeHeading3:n}=t,i=t.fontSize,o=`${e}px 0 0 0`,r=t.colorInfo,a=t.colorError,s=t.colorSuccess,l=t.colorWarning,c=Ve(t,{resultTitleFontSize:n,resultSubtitleFontSize:i,resultIconFontSize:n*3,resultExtraMargin:o,resultInfoIconColor:r,resultErrorIconColor:a,resultSuccessIconColor:s,resultWarningIconColor:l});return[Ufe(c)]},{imageWidth:250,imageHeight:295}),Zfe={success:Ho,error:si,info:Wo,warning:yC},cf={404:jfe,500:Vfe,403:Xfe},Jfe=Object.keys(cf),Qfe=()=>({prefixCls:String,icon:Z.any,status:{type:[Number,String],default:"info"},title:Z.any,subTitle:Z.any,extra:Z.any}),ehe=(t,e)=>{let{status:n,icon:i}=e;if(Jfe.includes(`${n}`)){const a=cf[n];return C("div",{class:`${t}-icon ${t}-image`},[C(a,null,null)])}const o=Zfe[n],r=i||C(o,null,null);return C("div",{class:`${t}-icon`},[r])},the=(t,e)=>e&&C("div",{class:`${t}-extra`},[e]),Ps=oe({compatConfig:{MODE:3},name:"AResult",inheritAttrs:!1,props:Qfe(),slots:Object,setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,direction:r}=Me("result",t),[a,s]=qfe(o),l=L(()=>ce(o.value,s.value,`${o.value}-${t.status}`,{[`${o.value}-rtl`]:r.value==="rtl"}));return()=>{var c,u,d,f,h,p,g,m;const v=(c=t.title)!==null&&c!==void 0?c:(u=n.title)===null||u===void 0?void 0:u.call(n),b=(d=t.subTitle)!==null&&d!==void 0?d:(f=n.subTitle)===null||f===void 0?void 0:f.call(n),y=(h=t.icon)!==null&&h!==void 0?h:(p=n.icon)===null||p===void 0?void 0:p.call(n),w=(g=t.extra)!==null&&g!==void 0?g:(m=n.extra)===null||m===void 0?void 0:m.call(n),x=o.value;return a(C("div",H(H({},i),{},{class:[l.value,i.class]}),[ehe(x,{status:t.status,icon:y}),C("div",{class:`${x}-title`},[v]),b&&C("div",{class:`${x}-subtitle`},[b]),the(x,w),n.default&&C("div",{class:`${x}-content`},[n.default()])]))}}});Ps.PRESENTED_IMAGE_403=cf[403];Ps.PRESENTED_IMAGE_404=cf[404];Ps.PRESENTED_IMAGE_500=cf[500];Ps.install=function(t){return t.component(Ps.name,Ps),t};const nhe=Vt(jS),xC=(t,e)=>{let{attrs:n}=e;const{included:i,vertical:o,style:r,class:a}=n;let{length:s,offset:l,reverse:c}=n;s<0&&(c=!c,s=Math.abs(s),l=100-l);const u=o?{[c?"top":"bottom"]:`${l}%`,[c?"bottom":"top"]:"auto",height:`${s}%`}:{[c?"right":"left"]:`${l}%`,[c?"left":"right"]:"auto",width:`${s}%`},d=A(A({},r),u);return i?C("div",{class:a,style:d},null):null};xC.inheritAttrs=!1;const ihe=(t,e,n,i,o,r)=>{const a=Object.keys(e).map(parseFloat).sort((s,l)=>s-l);if(n&&i)for(let s=o;s<=r;s+=i)a.indexOf(s)===-1&&a.push(s);return a},D6=(t,e)=>{let{attrs:n}=e;const{prefixCls:i,vertical:o,reverse:r,marks:a,dots:s,step:l,included:c,lowerBound:u,upperBound:d,max:f,min:h,dotStyle:p,activeDotStyle:g}=n,m=f-h,v=ihe(o,a,s,l,h,f).map(b=>{const y=`${Math.abs(b-h)/m*100}%`,w=!c&&b===d||c&&b<=d&&b>=u;let x=o?A(A({},p),{[r?"top":"bottom"]:y}):A(A({},p),{[r?"right":"left"]:y});w&&(x=A(A({},x),g));const $=ce({[`${i}-dot`]:!0,[`${i}-dot-active`]:w,[`${i}-dot-reverse`]:r});return C("span",{class:$,style:x,key:b},null)});return C("div",{class:`${i}-step`},[v])};D6.inheritAttrs=!1;const R6=(t,e)=>{let{attrs:n,slots:i}=e;const{class:o,vertical:r,reverse:a,marks:s,included:l,upperBound:c,lowerBound:u,max:d,min:f,onClickLabel:h}=n,p=Object.keys(s),g=i.mark,m=d-f,v=p.map(parseFloat).sort((b,y)=>b-y).map(b=>{const y=typeof s[b]=="function"?s[b]():s[b],w=typeof y=="object"&&!cn(y);let x=w?y.label:y;if(!x&&x!==0)return null;g&&(x=g({point:b,label:x}));const $=!l&&b===c||l&&b<=c&&b>=u,S=ce({[`${o}-text`]:!0,[`${o}-text-active`]:$}),_={marginBottom:"-50%",[a?"top":"bottom"]:`${(b-f)/m*100}%`},P={transform:`translateX(${a?"50%":"-50%"})`,msTransform:`translateX(${a?"50%":"-50%"})`,[a?"right":"left"]:`${(b-f)/m*100}%`},O=r?_:P,T=w?A(A({},O),y.style):O,M={[pn?"onTouchstartPassive":"onTouchstart"]:I=>h(I,b)};return C("span",H({class:S,style:T,key:b,onMousedown:I=>h(I,b)},M),[x])});return C("div",{class:o},[v])};R6.inheritAttrs=!1;const L6=oe({compatConfig:{MODE:3},name:"Handle",inheritAttrs:!1,props:{prefixCls:String,vertical:{type:Boolean,default:void 0},offset:Number,disabled:{type:Boolean,default:void 0},min:Number,max:Number,value:Number,tabindex:Z.oneOfType([Z.number,Z.string]),reverse:{type:Boolean,default:void 0},ariaLabel:String,ariaLabelledBy:String,ariaValueTextFormatter:Function,onMouseenter:{type:Function},onMouseleave:{type:Function},onMousedown:{type:Function}},setup(t,e){let{attrs:n,emit:i,expose:o}=e;const r=ie(!1),a=ie(),s=()=>{document.activeElement===a.value&&(r.value=!0)},l=m=>{r.value=!1,i("blur",m)},c=()=>{r.value=!1},u=()=>{var m;(m=a.value)===null||m===void 0||m.focus()},d=()=>{var m;(m=a.value)===null||m===void 0||m.blur()},f=()=>{r.value=!0,u()},h=m=>{m.preventDefault(),u(),i("mousedown",m)};o({focus:u,blur:d,clickFocus:f,ref:a});let p=null;Ze(()=>{p=Gt(document,"mouseup",s)}),at(()=>{p==null||p.remove()});const g=L(()=>{const{vertical:m,offset:v,reverse:b}=t;return m?{[b?"top":"bottom"]:`${v}%`,[b?"bottom":"top"]:"auto",transform:b?null:"translateY(+50%)"}:{[b?"right":"left"]:`${v}%`,[b?"left":"right"]:"auto",transform:`translateX(${b?"+":"-"}50%)`}});return()=>{const{prefixCls:m,disabled:v,min:b,max:y,value:w,tabindex:x,ariaLabel:$,ariaLabelledBy:S,ariaValueTextFormatter:_,onMouseenter:P,onMouseleave:O}=t,T=ce(n.class,{[`${m}-handle-click-focused`]:r.value}),M={"aria-valuemin":b,"aria-valuemax":y,"aria-valuenow":w,"aria-disabled":!!v},I=[n.style,g.value];let k=x||0;(v||x===null)&&(k=null);let E;_&&(E=_(w));const R=A(A(A(A({},n),{role:"slider",tabindex:k}),M),{class:T,onBlur:l,onKeydown:c,onMousedown:h,onMouseenter:P,onMouseleave:O,ref:a,style:I});return C("div",H(H({},R),{},{"aria-label":$,"aria-labelledby":S,"aria-valuetext":E}),null)}}});function Zb(t,e){try{return Object.keys(e).some(n=>t.target===e[n].ref)}catch{return!1}}function F6(t,e){let{min:n,max:i}=e;return ti}function DT(t){return t.touches.length>1||t.type.toLowerCase()==="touchend"&&t.touches.length>0}function RT(t,e){let{marks:n,step:i,min:o,max:r}=e;const a=Object.keys(n).map(parseFloat);if(i!==null){const l=Math.pow(10,N6(i)),c=Math.floor((r*l-o*l)/(i*l)),u=Math.min((t-o)/i,c),d=Math.round(u)*i+o;a.push(d)}const s=a.map(l=>Math.abs(t-l));return a[s.indexOf(Math.min(...s))]}function N6(t){const e=t.toString();let n=0;return e.indexOf(".")>=0&&(n=e.length-e.indexOf(".")-1),n}function LT(t,e){let n=1;return window.visualViewport&&(n=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(t?e.clientY:e.pageX)/n}function FT(t,e){let n=1;return window.visualViewport&&(n=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(t?e.touches[0].clientY:e.touches[0].pageX)/n}function NT(t,e){const n=e.getBoundingClientRect();return t?n.top+n.height*.5:window.scrollX+n.left+n.width*.5}function wC(t,e){let{max:n,min:i}=e;return t<=i?i:t>=n?n:t}function B6(t,e){const{step:n}=e,i=isFinite(RT(t,e))?RT(t,e):0;return n===null?i:parseFloat(i.toFixed(N6(n)))}function gc(t){t.stopPropagation(),t.preventDefault()}function ohe(t,e,n){const i={increase:(a,s)=>a+s,decrease:(a,s)=>a-s},o=i[t](Object.keys(n.marks).indexOf(JSON.stringify(e)),1),r=Object.keys(n.marks)[o];return n.step?i[t](e,n.step):Object.keys(n.marks).length&&n.marks[r]?n.marks[r]:e}function z6(t,e,n){const i="increase",o="decrease";let r=i;switch(t.keyCode){case Te.UP:r=e&&n?o:i;break;case Te.RIGHT:r=!e&&n?o:i;break;case Te.DOWN:r=e&&n?i:o;break;case Te.LEFT:r=!e&&n?i:o;break;case Te.END:return(a,s)=>s.max;case Te.HOME:return(a,s)=>s.min;case Te.PAGE_UP:return(a,s)=>a+s.step*2;case Te.PAGE_DOWN:return(a,s)=>a-s.step*2;default:return}return(a,s)=>ohe(r,a,s)}var rhe=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{this.document=this.sliderRef&&this.sliderRef.ownerDocument;const{autofocus:n,disabled:i}=this;n&&!i&&this.focus()})},beforeUnmount(){this.$nextTick(()=>{this.removeDocumentEvents()})},methods:{defaultHandle(n){var{index:i,directives:o,className:r,style:a}=n,s=rhe(n,["index","directives","className","style"]);if(delete s.dragging,s.value===null)return null;const l=A(A({},s),{class:r,style:a,key:i});return C(L6,l,null)},onDown(n,i){let o=i;const{draggableTrack:r,vertical:a}=this.$props,{bounds:s}=this.$data,l=r&&this.positionGetValue?this.positionGetValue(o)||[]:[],c=Zb(n,this.handlesRefs);if(this.dragTrack=r&&s.length>=2&&!c&&!l.map((u,d)=>{const f=d?!0:u>=s[d];return d===l.length-1?u<=s[d]:f}).some(u=>!u),this.dragTrack)this.dragOffset=o,this.startBounds=[...s];else{if(!c)this.dragOffset=0;else{const u=NT(a,n.target);this.dragOffset=o-u,o=u}this.onStart(o)}},onMouseDown(n){if(n.button!==0)return;this.removeDocumentEvents();const i=this.$props.vertical,o=LT(i,n);this.onDown(n,o),this.addDocumentMouseEvents()},onTouchStart(n){if(DT(n))return;const i=this.vertical,o=FT(i,n);this.onDown(n,o),this.addDocumentTouchEvents(),gc(n)},onFocus(n){const{vertical:i}=this;if(Zb(n,this.handlesRefs)&&!this.dragTrack){const o=NT(i,n.target);this.dragOffset=0,this.onStart(o),gc(n),this.$emit("focus",n)}},onBlur(n){this.dragTrack||this.onEnd(),this.$emit("blur",n)},onMouseUp(){this.handlesRefs[this.prevMovedHandleIndex]&&this.handlesRefs[this.prevMovedHandleIndex].clickFocus()},onMouseMove(n){if(!this.sliderRef){this.onEnd();return}const i=LT(this.vertical,n);this.onMove(n,i-this.dragOffset,this.dragTrack,this.startBounds)},onTouchMove(n){if(DT(n)||!this.sliderRef){this.onEnd();return}const i=FT(this.vertical,n);this.onMove(n,i-this.dragOffset,this.dragTrack,this.startBounds)},onKeyDown(n){this.sliderRef&&Zb(n,this.handlesRefs)&&this.onKeyboard(n)},onClickMarkLabel(n,i){n.stopPropagation(),this.onChange({sValue:i}),this.setState({sValue:i},()=>this.onEnd(!0))},getSliderStart(){const n=this.sliderRef,{vertical:i,reverse:o}=this,r=n.getBoundingClientRect();return i?o?r.bottom:r.top:window.scrollX+(o?r.right:r.left)},getSliderLength(){const n=this.sliderRef;if(!n)return 0;const i=n.getBoundingClientRect();return this.vertical?i.height:i.width},addDocumentTouchEvents(){this.onTouchMoveListener=Gt(this.document,"touchmove",this.onTouchMove),this.onTouchUpListener=Gt(this.document,"touchend",this.onEnd)},addDocumentMouseEvents(){this.onMouseMoveListener=Gt(this.document,"mousemove",this.onMouseMove),this.onMouseUpListener=Gt(this.document,"mouseup",this.onEnd)},removeDocumentEvents(){this.onTouchMoveListener&&this.onTouchMoveListener.remove(),this.onTouchUpListener&&this.onTouchUpListener.remove(),this.onMouseMoveListener&&this.onMouseMoveListener.remove(),this.onMouseUpListener&&this.onMouseUpListener.remove()},focus(){var n;this.$props.disabled||(n=this.handlesRefs[0])===null||n===void 0||n.focus()},blur(){this.$props.disabled||Object.keys(this.handlesRefs).forEach(n=>{var i,o;(o=(i=this.handlesRefs[n])===null||i===void 0?void 0:i.blur)===null||o===void 0||o.call(i)})},calcValue(n){const{vertical:i,min:o,max:r}=this,a=Math.abs(Math.max(n,0)/this.getSliderLength());return i?(1-a)*(r-o)+o:a*(r-o)+o},calcValueByPos(n){const o=(this.reverse?-1:1)*(n-this.getSliderStart());return this.trimAlignValue(this.calcValue(o))},calcOffset(n){const{min:i,max:o}=this,r=(n-i)/(o-i);return Math.max(0,r*100)},saveSlider(n){this.sliderRef=n},saveHandle(n,i){this.handlesRefs[n]=i}},render(){const{prefixCls:n,marks:i,dots:o,step:r,included:a,disabled:s,vertical:l,reverse:c,min:u,max:d,maximumTrackStyle:f,railStyle:h,dotStyle:p,activeDotStyle:g,id:m}=this,{class:v,style:b}=this.$attrs,{tracks:y,handles:w}=this.renderSlider(),x=ce(n,v,{[`${n}-with-marks`]:Object.keys(i).length,[`${n}-disabled`]:s,[`${n}-vertical`]:l,[`${n}-horizontal`]:!l}),$={vertical:l,marks:i,included:a,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:d,min:u,reverse:c,class:`${n}-mark`,onClickLabel:s?Ua:this.onClickMarkLabel},S={[pn?"onTouchstartPassive":"onTouchstart"]:s?Ua:this.onTouchStart};return C("div",H(H({id:m,ref:this.saveSlider,tabindex:"-1",class:x},S),{},{onMousedown:s?Ua:this.onMouseDown,onMouseup:s?Ua:this.onMouseUp,onKeydown:s?Ua:this.onKeyDown,onFocus:s?Ua:this.onFocus,onBlur:s?Ua:this.onBlur,style:b}),[C("div",{class:`${n}-rail`,style:A(A({},f),h)},null),y,C(D6,{prefixCls:n,vertical:l,reverse:c,marks:i,dots:o,step:r,included:a,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:d,min:u,dotStyle:p,activeDotStyle:g},null),w,C(R6,$,{mark:this.$slots.mark}),om(this)])}})}const ahe=oe({compatConfig:{MODE:3},name:"Slider",mixins:[el],inheritAttrs:!1,props:{defaultValue:Number,value:Number,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},tabindex:Z.oneOfType([Z.number,Z.string]),reverse:{type:Boolean,default:void 0},min:Number,max:Number,ariaLabelForHandle:String,ariaLabelledByForHandle:String,ariaValueTextFormatterForHandle:String,startPoint:Number},emits:["beforeChange","afterChange","change"],data(){const t=this.defaultValue!==void 0?this.defaultValue:this.min,e=this.value!==void 0?this.value:t;return{sValue:this.trimAlignValue(e),dragging:!1}},watch:{value:{handler(t){this.setChangeValue(t)},deep:!0},min(){const{sValue:t}=this;this.setChangeValue(t)},max(){const{sValue:t}=this;this.setChangeValue(t)}},methods:{setChangeValue(t){const e=t!==void 0?t:this.sValue,n=this.trimAlignValue(e,this.$props);n!==this.sValue&&(this.setState({sValue:n}),F6(e,this.$props)&&this.$emit("change",n))},onChange(t){const e=!Ar(this,"value"),n=t.sValue>this.max?A(A({},t),{sValue:this.max}):t;e&&this.setState(n);const i=n.sValue;this.$emit("change",i)},onStart(t){this.setState({dragging:!0});const{sValue:e}=this;this.$emit("beforeChange",e);const n=this.calcValueByPos(t);this.startValue=n,this.startPosition=t,n!==e&&(this.prevMovedHandleIndex=0,this.onChange({sValue:n}))},onEnd(t){const{dragging:e}=this;this.removeDocumentEvents(),(e||t)&&this.$emit("afterChange",this.sValue),this.setState({dragging:!1})},onMove(t,e){gc(t);const{sValue:n}=this,i=this.calcValueByPos(e);i!==n&&this.onChange({sValue:i})},onKeyboard(t){const{reverse:e,vertical:n}=this.$props,i=z6(t,n,e);if(i){gc(t);const{sValue:o}=this,r=i(o,this.$props),a=this.trimAlignValue(r);if(a===o)return;this.onChange({sValue:a}),this.$emit("afterChange",a),this.onEnd()}},getLowerBound(){const t=this.$props.startPoint||this.$props.min;return this.$data.sValue>t?t:this.$data.sValue},getUpperBound(){return this.$data.sValue1&&arguments[1]!==void 0?arguments[1]:{};if(t===null)return null;const n=A(A({},this.$props),e),i=wC(t,n);return B6(i,n)},getTrack(t){let{prefixCls:e,reverse:n,vertical:i,included:o,minimumTrackStyle:r,mergedTrackStyle:a,length:s,offset:l}=t;return C(xC,{class:`${e}-track`,vertical:i,included:o,offset:l,reverse:n,length:s,style:A(A({},r),a)},null)},renderSlider(){const{prefixCls:t,vertical:e,included:n,disabled:i,minimumTrackStyle:o,trackStyle:r,handleStyle:a,tabindex:s,ariaLabelForHandle:l,ariaLabelledByForHandle:c,ariaValueTextFormatterForHandle:u,min:d,max:f,startPoint:h,reverse:p,handle:g,defaultHandle:m}=this,v=g||m,{sValue:b,dragging:y}=this,w=this.calcOffset(b),x=v({class:`${t}-handle`,prefixCls:t,vertical:e,offset:w,value:b,dragging:y,disabled:i,min:d,max:f,reverse:p,index:0,tabindex:s,ariaLabel:l,ariaLabelledBy:c,ariaValueTextFormatter:u,style:a[0]||a,ref:_=>this.saveHandle(0,_),onFocus:this.onFocus,onBlur:this.onBlur}),$=h!==void 0?this.calcOffset(h):0,S=r[0]||r;return{tracks:this.getTrack({prefixCls:t,reverse:p,vertical:e,included:n,offset:$,minimumTrackStyle:o,mergedTrackStyle:S,length:w-$}),handles:x}}}}),she=H6(ahe),eu=t=>{let{value:e,handle:n,bounds:i,props:o}=t;const{allowCross:r,pushable:a}=o,s=Number(a),l=wC(e,o);let c=l;return!r&&n!=null&&i!==void 0&&(n>0&&l<=i[n-1]+s&&(c=i[n-1]+s),n=i[n+1]-s&&(c=i[n+1]-s)),B6(c,o)},lhe={defaultValue:Z.arrayOf(Z.number),value:Z.arrayOf(Z.number),count:Number,pushable:HD(Z.oneOfType([Z.looseBool,Z.number])),allowCross:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},reverse:{type:Boolean,default:void 0},tabindex:Z.arrayOf(Z.number),prefixCls:String,min:Number,max:Number,autofocus:{type:Boolean,default:void 0},ariaLabelGroupForHandles:Array,ariaLabelledByGroupForHandles:Array,ariaValueTextFormatterGroupForHandles:Array,draggableTrack:{type:Boolean,default:void 0}},che=oe({compatConfig:{MODE:3},name:"Range",mixins:[el],inheritAttrs:!1,props:ct(lhe,{count:1,allowCross:!0,pushable:!1,tabindex:[],draggableTrack:!1,ariaLabelGroupForHandles:[],ariaLabelledByGroupForHandles:[],ariaValueTextFormatterGroupForHandles:[]}),emits:["beforeChange","afterChange","change"],displayName:"Range",data(){const{count:t,min:e,max:n}=this,i=Array(...Array(t+1)).map(()=>e),o=Ar(this,"defaultValue")?this.defaultValue:i;let{value:r}=this;r===void 0&&(r=o);const a=r.map((l,c)=>eu({value:l,handle:c,props:this.$props}));return{sHandle:null,recent:a[0]===n?0:a.length-1,bounds:a}},watch:{value:{handler(t){const{bounds:e}=this;this.setChangeValue(t||e)},deep:!0},min(){const{value:t}=this;this.setChangeValue(t||this.bounds)},max(){const{value:t}=this;this.setChangeValue(t||this.bounds)}},methods:{setChangeValue(t){const{bounds:e}=this;let n=t.map((i,o)=>eu({value:i,handle:o,bounds:e,props:this.$props}));if(e.length===n.length){if(n.every((i,o)=>i===e[o]))return null}else n=t.map((i,o)=>eu({value:i,handle:o,props:this.$props}));if(this.setState({bounds:n}),t.some(i=>F6(i,this.$props))){const i=t.map(o=>wC(o,this.$props));this.$emit("change",i)}},onChange(t){if(!Ar(this,"value"))this.setState(t);else{const o={};["sHandle","recent"].forEach(r=>{t[r]!==void 0&&(o[r]=t[r])}),Object.keys(o).length&&this.setState(o)}const i=A(A({},this.$data),t).bounds;this.$emit("change",i)},positionGetValue(t){const e=this.getValue(),n=this.calcValueByPos(t),i=this.getClosestBound(n),o=this.getBoundNeedMoving(n,i),r=e[o];if(n===r)return null;const a=[...e];return a[o]=n,a},onStart(t){const{bounds:e}=this;this.$emit("beforeChange",e);const n=this.calcValueByPos(t);this.startValue=n,this.startPosition=t;const i=this.getClosestBound(n);this.prevMovedHandleIndex=this.getBoundNeedMoving(n,i),this.setState({sHandle:this.prevMovedHandleIndex,recent:this.prevMovedHandleIndex});const o=e[this.prevMovedHandleIndex];if(n===o)return;const r=[...e];r[this.prevMovedHandleIndex]=n,this.onChange({bounds:r})},onEnd(t){const{sHandle:e}=this;this.removeDocumentEvents(),e||(this.dragTrack=!1),(e!==null||t)&&this.$emit("afterChange",this.bounds),this.setState({sHandle:null})},onMove(t,e,n,i){gc(t);const{$data:o,$props:r}=this,a=r.max||100,s=r.min||0;if(n){let f=r.vertical?-e:e;f=r.reverse?-f:f;const h=a-Math.max(...i),p=s-Math.min(...i),g=Math.min(Math.max(f/(this.getSliderLength()/100),p),h),m=i.map(v=>Math.floor(Math.max(Math.min(v+g,a),s)));o.bounds.map((v,b)=>v===m[b]).some(v=>!v)&&this.onChange({bounds:m});return}const{bounds:l,sHandle:c}=this,u=this.calcValueByPos(e),d=l[c];u!==d&&this.moveTo(u)},onKeyboard(t){const{reverse:e,vertical:n}=this.$props,i=z6(t,n,e);if(i){gc(t);const{bounds:o,sHandle:r}=this,a=o[r===null?this.recent:r],s=i(a,this.$props),l=eu({value:s,handle:r,bounds:o,props:this.$props});if(l===a)return;this.moveTo(l,!0)}},getClosestBound(t){const{bounds:e}=this;let n=0;for(let i=1;i=e[i]&&(n=i);return Math.abs(e[n+1]-t)s-l),this.internalPointsCache={marks:t,step:e,points:a}}return this.internalPointsCache.points},moveTo(t,e){const n=[...this.bounds],{sHandle:i,recent:o}=this,r=i===null?o:i;n[r]=t;let a=r;this.$props.pushable!==!1?this.pushSurroundingHandles(n,a):this.$props.allowCross&&(n.sort((s,l)=>s-l),a=n.indexOf(t)),this.onChange({recent:a,sHandle:a,bounds:n}),e&&(this.$emit("afterChange",n),this.setState({},()=>{this.handlesRefs[a].focus()}),this.onEnd())},pushSurroundingHandles(t,e){const n=t[e],{pushable:i}=this,o=Number(i);let r=0;if(t[e+1]-n=i.length||r<0)return!1;const a=e+n,s=i[r],{pushable:l}=this,c=Number(l),u=n*(t[a]-s);return this.pushHandle(t,a,n,c-u)?(t[e]=s,!0):!1},trimAlignValue(t){const{sHandle:e,bounds:n}=this;return eu({value:t,handle:e,bounds:n,props:this.$props})},ensureValueNotConflict(t,e,n){let{allowCross:i,pushable:o}=n;const r=this.$data||{},{bounds:a}=r;if(t=t===void 0?r.sHandle:t,o=Number(o),!i&&t!=null&&a!==void 0){if(t>0&&e<=a[t-1]+o)return a[t-1]+o;if(t=a[t+1]-o)return a[t+1]-o}return e},getTrack(t){let{bounds:e,prefixCls:n,reverse:i,vertical:o,included:r,offsets:a,trackStyle:s}=t;return e.slice(0,-1).map((l,c)=>{const u=c+1,d=ce({[`${n}-track`]:!0,[`${n}-track-${u}`]:!0});return C(xC,{class:d,vertical:o,reverse:i,included:r,offset:a[u-1],length:a[u]-a[u-1],style:s[c],key:u},null)})},renderSlider(){const{sHandle:t,bounds:e,prefixCls:n,vertical:i,included:o,disabled:r,min:a,max:s,reverse:l,handle:c,defaultHandle:u,trackStyle:d,handleStyle:f,tabindex:h,ariaLabelGroupForHandles:p,ariaLabelledByGroupForHandles:g,ariaValueTextFormatterGroupForHandles:m}=this,v=c||u,b=e.map(x=>this.calcOffset(x)),y=`${n}-handle`,w=e.map((x,$)=>{let S=h[$]||0;(r||h[$]===null)&&(S=null);const _=t===$;return v({class:ce({[y]:!0,[`${y}-${$+1}`]:!0,[`${y}-dragging`]:_}),prefixCls:n,vertical:i,dragging:_,offset:b[$],value:x,index:$,tabindex:S,min:a,max:s,reverse:l,disabled:r,style:f[$],ref:P=>this.saveHandle($,P),onFocus:this.onFocus,onBlur:this.onBlur,ariaLabel:p[$],ariaLabelledBy:g[$],ariaValueTextFormatter:m[$]})});return{tracks:this.getTrack({bounds:e,prefixCls:n,reverse:l,vertical:i,included:o,offsets:b,trackStyle:d}),handles:w}}}}),uhe=H6(che),dhe=oe({compatConfig:{MODE:3},name:"SliderTooltip",inheritAttrs:!1,props:l3(),setup(t,e){let{attrs:n,slots:i}=e;const o=se(null),r=se(null);function a(){lt.cancel(r.value),r.value=null}function s(){r.value=lt(()=>{var c;(c=o.value)===null||c===void 0||c.forcePopupAlign(),r.value=null})}const l=()=>{a(),t.open&&s()};return ye([()=>t.open,()=>t.title],()=>{l()},{flush:"post",immediate:!0}),qg(()=>{l()}),at(()=>{a()}),()=>C(Pi,H(H({ref:o},t),n),i)}}),fhe=t=>{const{componentCls:e,controlSize:n,dotSize:i,marginFull:o,marginPart:r,colorFillContentHover:a}=t;return{[e]:A(A({},rt(t)),{position:"relative",height:n,margin:`${r}px ${o}px`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${o}px ${r}px`},[`${e}-rail`]:{position:"absolute",backgroundColor:t.colorFillTertiary,borderRadius:t.borderRadiusXS,transition:`background-color ${t.motionDurationMid}`},[`${e}-track`]:{position:"absolute",backgroundColor:t.colorPrimaryBorder,borderRadius:t.borderRadiusXS,transition:`background-color ${t.motionDurationMid}`},"&:hover":{[`${e}-rail`]:{backgroundColor:t.colorFillSecondary},[`${e}-track`]:{backgroundColor:t.colorPrimaryBorderHover},[`${e}-dot`]:{borderColor:a},[`${e}-handle::after`]:{boxShadow:`0 0 0 ${t.handleLineWidth}px ${t.colorPrimaryBorderHover}`},[`${e}-dot-active`]:{borderColor:t.colorPrimary}},[`${e}-handle`]:{position:"absolute",width:t.handleSize,height:t.handleSize,outline:"none",[`${e}-dragging`]:{zIndex:1},"&::before":{content:'""',position:"absolute",insetInlineStart:-t.handleLineWidth,insetBlockStart:-t.handleLineWidth,width:t.handleSize+t.handleLineWidth*2,height:t.handleSize+t.handleLineWidth*2,backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:t.handleSize,height:t.handleSize,backgroundColor:t.colorBgElevated,boxShadow:`0 0 0 ${t.handleLineWidth}px ${t.colorPrimaryBorder}`,borderRadius:"50%",cursor:"pointer",transition:` + a ${a},${a} 0 1 1 ${-c},${u}`,f=Math.PI*2*a,h={stroke:n,strokeDasharray:`${e/100*(f-o)}px ${f}px`,strokeDashoffset:`-${o/2+t/100*(f-o)}px`,transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s"};return{pathString:d,pathStyle:h}}const ffe=oe({compatConfig:{MODE:3},name:"VCCircle",props:ct(ufe,lfe),setup(t){TT+=1;const e=se(TT),n=L(()=>ET(t.percent)),i=L(()=>ET(t.strokeColor)),[o,r]=MS();cfe(r);const a=()=>{const{prefixCls:s,strokeWidth:l,strokeLinecap:c,gapDegree:u,gapPosition:d}=t;let f=0;return n.value.map((h,p)=>{const g=i.value[p]||i.value[i.value.length-1],m=Object.prototype.toString.call(g)==="[object Object]"?`url(#${s}-gradient-${e.value})`:"",{pathString:v,pathStyle:b}=MT(f,h,g,l,u,d);f+=h;const y={key:p,d:v,stroke:m,"stroke-linecap":c,"stroke-width":l,opacity:h===0?0:1,"fill-opacity":"0",class:`${s}-circle-path`,style:b};return C("path",H({ref:o(p)},y),null)})};return()=>{const{prefixCls:s,strokeWidth:l,trailWidth:c,gapDegree:u,gapPosition:d,trailColor:f,strokeLinecap:h,strokeColor:p}=t,g=dfe(t,["prefixCls","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","strokeColor"]),{pathString:m,pathStyle:v}=MT(0,100,f,l,u,d);delete g.percent;const b=i.value.find(w=>Object.prototype.toString.call(w)==="[object Object]"),y={d:m,stroke:f,"stroke-linecap":h,"stroke-width":c||l,"fill-opacity":"0",class:`${s}-circle-trail`,style:v};return C("svg",H({class:`${s}-circle`,viewBox:"0 0 100 100"},g),[b&&C("defs",null,[C("linearGradient",{id:`${s}-gradient-${e.value}`,x1:"100%",y1:"0%",x2:"0%",y2:"0%"},[Object.keys(b).sort((w,x)=>OT(w)-OT(x)).map((w,x)=>C("stop",{key:x,offset:w,"stop-color":b[w]},null))])]),C("path",y,null),a().reverse()])}}}),hfe=()=>A(A({},cv()),{strokeColor:Rt()}),pfe=3,gfe=t=>pfe/t*100,mfe=oe({compatConfig:{MODE:3},name:"ProgressCircle",inheritAttrs:!1,props:ct(hfe(),{trailColor:null}),setup(t,e){let{slots:n,attrs:i}=e;const o=L(()=>{var g;return(g=t.width)!==null&&g!==void 0?g:120}),r=L(()=>{var g;return(g=t.size)!==null&&g!==void 0?g:[o.value,o.value]}),a=L(()=>uv(r.value,"circle")),s=L(()=>{if(t.gapDegree||t.gapDegree===0)return t.gapDegree;if(t.type==="dashboard")return 75}),l=L(()=>({width:`${a.value.width}px`,height:`${a.value.height}px`,fontSize:`${a.value.width*.15+6}px`})),c=L(()=>{var g;return(g=t.strokeWidth)!==null&&g!==void 0?g:Math.max(gfe(a.value.width),6)}),u=L(()=>t.gapPosition||t.type==="dashboard"&&"bottom"||void 0),d=L(()=>tfe(t)),f=L(()=>Object.prototype.toString.call(t.strokeColor)==="[object Object]"),h=L(()=>nfe({success:t.success,strokeColor:t.strokeColor})),p=L(()=>({[`${t.prefixCls}-inner`]:!0,[`${t.prefixCls}-circle-gradient`]:f.value}));return()=>{var g;const m=C(ffe,{percent:d.value,strokeWidth:c.value,trailWidth:c.value,strokeColor:h.value,strokeLinecap:t.strokeLinecap,trailColor:t.trailColor,prefixCls:t.prefixCls,gapDegree:s.value,gapPosition:u.value},null);return C("div",H(H({},i),{},{class:[p.value,i.class],style:[i.style,l.value]}),[a.value.width<=20?C(Pi,null,{default:()=>[C("span",null,[m])],title:n.default}):C(Qe,null,[m,(g=n.default)===null||g===void 0?void 0:g.call(n)])])}}}),vfe=()=>A(A({},cv()),{steps:Number,strokeColor:Xe(),trailColor:String}),bfe=oe({compatConfig:{MODE:3},name:"Steps",props:vfe(),setup(t,e){let{slots:n}=e;const i=L(()=>Math.round(t.steps*((t.percent||0)/100))),o=L(()=>{var s;return(s=t.size)!==null&&s!==void 0?s:[t.size==="small"?2:14,t.strokeWidth||8]}),r=L(()=>uv(o.value,"step",{steps:t.steps,strokeWidth:t.strokeWidth||8})),a=L(()=>{const{steps:s,strokeColor:l,trailColor:c,prefixCls:u}=t,d=[];for(let f=0;f{var s;return C("div",{class:`${t.prefixCls}-steps-outer`},[a.value,(s=n.default)===null||s===void 0?void 0:s.call(n)])}}}),yfe=new mt("antProgressActive",{"0%":{transform:"translateX(-100%) scaleX(0)",opacity:.1},"20%":{transform:"translateX(-100%) scaleX(0)",opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}}),xfe=t=>{const{componentCls:e,iconCls:n}=t;return{[e]:A(A({},rt(t)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:t.fontSize,marginInlineEnd:t.marginXS,marginBottom:t.marginXS},[`${e}-outer`]:{display:"inline-block",width:"100%"},[`&${e}-show-info`]:{[`${e}-outer`]:{marginInlineEnd:`calc(-2em - ${t.marginXS}px)`,paddingInlineEnd:`calc(2em + ${t.paddingXS}px)`}},[`${e}-inner`]:{position:"relative",display:"inline-block",width:"100%",overflow:"hidden",verticalAlign:"middle",backgroundColor:t.progressRemainingColor,borderRadius:t.progressLineRadius},[`${e}-inner:not(${e}-circle-gradient)`]:{[`${e}-circle-path`]:{stroke:t.colorInfo}},[`${e}-success-bg, ${e}-bg`]:{position:"relative",backgroundColor:t.colorInfo,borderRadius:t.progressLineRadius,transition:`all ${t.motionDurationSlow} ${t.motionEaseInOutCirc}`},[`${e}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:t.colorSuccess},[`${e}-text`]:{display:"inline-block",width:"2em",marginInlineStart:t.marginXS,color:t.progressInfoTextColor,lineHeight:1,whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[n]:{fontSize:t.fontSize}},[`&${e}-status-active`]:{[`${e}-bg::before`]:{position:"absolute",inset:0,backgroundColor:t.colorBgContainer,borderRadius:t.progressLineRadius,opacity:0,animationName:yfe,animationDuration:t.progressActiveMotionDuration,animationTimingFunction:t.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${e}-status-exception`]:{[`${e}-bg`]:{backgroundColor:t.colorError},[`${e}-text`]:{color:t.colorError}},[`&${e}-status-exception ${e}-inner:not(${e}-circle-gradient)`]:{[`${e}-circle-path`]:{stroke:t.colorError}},[`&${e}-status-success`]:{[`${e}-bg`]:{backgroundColor:t.colorSuccess},[`${e}-text`]:{color:t.colorSuccess}},[`&${e}-status-success ${e}-inner:not(${e}-circle-gradient)`]:{[`${e}-circle-path`]:{stroke:t.colorSuccess}}})}},wfe=t=>{const{componentCls:e,iconCls:n}=t;return{[e]:{[`${e}-circle-trail`]:{stroke:t.progressRemainingColor},[`&${e}-circle ${e}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${e}-circle ${e}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:t.colorText,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[n]:{fontSize:`${t.fontSize/t.fontSizeSM}em`}},[`${e}-circle&-status-exception`]:{[`${e}-text`]:{color:t.colorError}},[`${e}-circle&-status-success`]:{[`${e}-text`]:{color:t.colorSuccess}}},[`${e}-inline-circle`]:{lineHeight:1,[`${e}-inner`]:{verticalAlign:"bottom"}}}},Sfe=t=>{const{componentCls:e}=t;return{[e]:{[`${e}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:t.progressStepMinWidth,marginInlineEnd:t.progressStepMarginInlineEnd,backgroundColor:t.progressRemainingColor,transition:`all ${t.motionDurationSlow}`,"&-active":{backgroundColor:t.colorInfo}}}}}},Cfe=t=>{const{componentCls:e,iconCls:n}=t;return{[e]:{[`${e}-small&-line, ${e}-small&-line ${e}-text ${n}`]:{fontSize:t.fontSizeSM}}}},$fe=et("Progress",t=>{const e=t.marginXXS/2,n=Ve(t,{progressLineRadius:100,progressInfoTextColor:t.colorText,progressDefaultColor:t.colorInfo,progressRemainingColor:t.colorFillSecondary,progressStepMarginInlineEnd:e,progressStepMinWidth:e,progressActiveMotionDuration:"2.4s"});return[xfe(n),wfe(n),Sfe(n),Cfe(n)]});var Afe=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);oArray.isArray(t.strokeColor)?t.strokeColor[0]:t.strokeColor),c=L(()=>{const{percent:p=0}=t,g=yg(t);return parseInt(g!==void 0?g.toString():p.toString(),10)}),u=L(()=>{const{status:p}=t;return!efe.includes(p)&&c.value>=100?"success":p||"normal"}),d=L(()=>{const{type:p,showInfo:g,size:m}=t,v=o.value;return{[v]:!0,[`${v}-inline-circle`]:p==="circle"&&uv(m,"circle").width<=20,[`${v}-${p==="dashboard"&&"circle"||p}`]:!0,[`${v}-status-${u.value}`]:!0,[`${v}-show-info`]:g,[`${v}-${m}`]:m,[`${v}-rtl`]:r.value==="rtl",[s.value]:!0}}),f=L(()=>typeof t.strokeColor=="string"||Array.isArray(t.strokeColor)?t.strokeColor:void 0),h=()=>{const{showInfo:p,format:g,type:m,percent:v,title:b}=t,y=yg(t);if(!p)return null;let w;const x=g||(n==null?void 0:n.format)||(S=>`${S}%`),$=m==="line";return g||n!=null&&n.format||u.value!=="exception"&&u.value!=="success"?w=x(_s(v),_s(y)):u.value==="exception"?w=C($?si:ai,null,null):u.value==="success"&&(w=C($?Ho:Pc,null,null)),C("span",{class:`${o.value}-text`,title:b===void 0&&typeof w=="string"?w:void 0},[w])};return()=>{const{type:p,steps:g,title:m}=t,{class:v}=i,b=Afe(i,["class"]),y=h();let w;return p==="line"?w=g?C(bfe,H(H({},t),{},{strokeColor:f.value,prefixCls:o.value,steps:g}),{default:()=>[y]}):C(sfe,H(H({},t),{},{strokeColor:l.value,prefixCls:o.value,direction:r.value}),{default:()=>[y]}):(p==="circle"||p==="dashboard")&&(w=C(mfe,H(H({},t),{},{prefixCls:o.value,strokeColor:l.value,progressStatus:u.value}),{default:()=>[y]})),a(C("div",H(H({role:"progressbar"},b),{},{class:[d.value,v],title:m}),[w]))}}}),vC=Vt(_fe);function Pfe(t){let e=t.scrollX;const n="scrollLeft";if(typeof e!="number"){const i=t.document;e=i.documentElement[n],typeof e!="number"&&(e=i.body[n])}return e}function Tfe(t){let e,n;const i=t.ownerDocument,{body:o}=i,r=i&&i.documentElement,a=t.getBoundingClientRect();return e=a.left,n=a.top,e-=r.clientLeft||o.clientLeft||0,n-=r.clientTop||o.clientTop||0,{left:e,top:n}}function Ofe(t){const e=Tfe(t),n=t.ownerDocument,i=n.defaultView||n.parentWindow;return e.left+=Pfe(i),e.left}var Efe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z"}}]},name:"star",theme:"filled"};function IT(t){for(var e=1;e{const{index:l}=t;n("hover",s,l)},o=s=>{const{index:l}=t;n("click",s,l)},r=s=>{const{index:l}=t;s.keyCode===13&&n("click",s,l)},a=L(()=>{const{prefixCls:s,index:l,value:c,allowHalf:u,focused:d}=t,f=l+1;let h=s;return c===0&&l===0&&d?h+=` ${s}-focused`:u&&c+.5>=f&&c{const{disabled:s,prefixCls:l,characterRender:c,character:u,index:d,count:f,value:h}=t,p=typeof u=="function"?u({disabled:s,prefixCls:l,index:d,count:f,value:h}):u;let g=C("li",{class:a.value},[C("div",{onClick:s?null:o,onKeydown:s?null:r,onMousemove:s?null:i,role:"radio","aria-checked":h>d?"true":"false","aria-posinset":d+1,"aria-setsize":f,tabindex:s?-1:0},[C("div",{class:`${l}-first`},[p]),C("div",{class:`${l}-second`},[p])])]);return c&&(g=c(g,t)),g}}}),Dfe=t=>{const{componentCls:e}=t;return{[`${e}-star`]:{position:"relative",display:"inline-block",color:"inherit",cursor:"pointer","&:not(:last-child)":{marginInlineEnd:t.marginXS},"> div":{transition:`all ${t.motionDurationMid}, outline 0s`,"&:hover":{transform:t.rateStarHoverScale},"&:focus":{outline:0},"&:focus-visible":{outline:`${t.lineWidth}px dashed ${t.rateStarColor}`,transform:t.rateStarHoverScale}},"&-first, &-second":{color:t.defaultColor,transition:`all ${t.motionDurationMid}`,userSelect:"none",[t.iconCls]:{verticalAlign:"middle"}},"&-first":{position:"absolute",top:0,insetInlineStart:0,width:"50%",height:"100%",overflow:"hidden",opacity:0},[`&-half ${e}-star-first, &-half ${e}-star-second`]:{opacity:1},[`&-half ${e}-star-first, &-full ${e}-star-second`]:{color:"inherit"}}}},Rfe=t=>({[`&-rtl${t.componentCls}`]:{direction:"rtl"}}),Lfe=t=>{const{componentCls:e}=t;return{[e]:A(A(A(A(A({},rt(t)),{display:"inline-block",margin:0,padding:0,color:t.rateStarColor,fontSize:t.rateStarSize,lineHeight:"unset",listStyle:"none",outline:"none",[`&-disabled${e} ${e}-star`]:{cursor:"default","&:hover":{transform:"scale(1)"}}}),Dfe(t)),{[`+ ${e}-text`]:{display:"inline-block",marginInlineStart:t.marginXS,fontSize:t.fontSize}}),Rfe(t))}},Ffe=et("Rate",t=>{const{colorFillContent:e}=t,n=Ve(t,{rateStarColor:t["yellow-6"],rateStarSize:t.controlHeightLG*.5,rateStarHoverScale:"scale(1.1)",defaultColor:e});return[Lfe(n)]}),Nfe=()=>({prefixCls:String,count:Number,value:Number,allowHalf:{type:Boolean,default:void 0},allowClear:{type:Boolean,default:void 0},tooltips:Array,disabled:{type:Boolean,default:void 0},character:Z.any,autofocus:{type:Boolean,default:void 0},tabindex:Z.oneOfType([Z.number,Z.string]),direction:String,id:String,onChange:Function,onHoverChange:Function,"onUpdate:value":Function,onFocus:Function,onBlur:Function,onKeydown:Function}),Bfe=oe({compatConfig:{MODE:3},name:"ARate",inheritAttrs:!1,props:ct(Nfe(),{value:0,count:5,allowHalf:!1,allowClear:!0,tabindex:0,direction:"ltr"}),setup(t,e){let{slots:n,attrs:i,emit:o,expose:r}=e;const{prefixCls:a,direction:s}=Me("rate",t),[l,c]=Ffe(a),u=vn(),d=se(),[f,h]=MS(),p=$t({value:t.value,focused:!1,cleanedValue:null,hoverValue:void 0});ye(()=>t.value,()=>{p.value=t.value});const g=T=>gi(h.value.get(T)),m=(T,M)=>{const I=s.value==="rtl";let k=T+1;if(t.allowHalf){const E=g(T),R=Ofe(E),D=E.clientWidth;(I&&M-R>D/2||!I&&M-R{t.value===void 0&&(p.value=T),o("update:value",T),o("change",T),u.onFieldChange()},b=(T,M)=>{const I=m(M,T.pageX);I!==p.cleanedValue&&(p.hoverValue=I,p.cleanedValue=null),o("hoverChange",I)},y=()=>{p.hoverValue=void 0,p.cleanedValue=null,o("hoverChange",void 0)},w=(T,M)=>{const{allowClear:I}=t,k=m(M,T.pageX);let E=!1;I&&(E=k===p.value),y(),v(E?0:k),p.cleanedValue=E?k:null},x=T=>{p.focused=!0,o("focus",T)},$=T=>{p.focused=!1,o("blur",T),u.onFieldBlur()},S=T=>{const{keyCode:M}=T,{count:I,allowHalf:k}=t,E=s.value==="rtl";M===Te.RIGHT&&p.value0&&!E||M===Te.RIGHT&&p.value>0&&E?(k?p.value-=.5:p.value-=1,v(p.value),T.preventDefault()):M===Te.LEFT&&p.value{t.disabled||d.value.focus()};r({focus:_,blur:()=>{t.disabled||d.value.blur()}}),Ze(()=>{const{autofocus:T,disabled:M}=t;T&&!M&&_()});const O=(T,M)=>{let{index:I}=M;const{tooltips:k}=t;return k?C(Pi,{title:k[I]},{default:()=>[T]}):T};return()=>{const{count:T,allowHalf:M,disabled:I,tabindex:k,id:E=u.id.value}=t,{class:R,style:D}=i,F=[],N=I?`${a.value}-disabled`:"",B=t.character||n.character||(()=>C(bC,null,null));for(let W=0;WC("svg",{width:"252",height:"294"},[C("defs",null,[C("path",{d:"M0 .387h251.772v251.772H0z"},null)]),C("g",{fill:"none","fill-rule":"evenodd"},[C("g",{transform:"translate(0 .012)"},[C("mask",{fill:"#fff"},null),C("path",{d:"M0 127.32v-2.095C0 56.279 55.892.387 124.838.387h2.096c68.946 0 124.838 55.892 124.838 124.838v2.096c0 68.946-55.892 124.838-124.838 124.838h-2.096C55.892 252.16 0 196.267 0 127.321",fill:"#E4EBF7",mask:"url(#b)"},null)]),C("path",{d:"M39.755 130.84a8.276 8.276 0 1 1-16.468-1.66 8.276 8.276 0 0 1 16.468 1.66",fill:"#FFF"},null),C("path",{d:"M36.975 134.297l10.482 5.943M48.373 146.508l-12.648 10.788",stroke:"#FFF","stroke-width":"2"},null),C("path",{d:"M39.875 159.352a5.667 5.667 0 1 1-11.277-1.136 5.667 5.667 0 0 1 11.277 1.136M57.588 143.247a5.708 5.708 0 1 1-11.358-1.145 5.708 5.708 0 0 1 11.358 1.145M99.018 26.875l29.82-.014a4.587 4.587 0 1 0-.003-9.175l-29.82.013a4.587 4.587 0 1 0 .003 9.176M110.424 45.211l29.82-.013a4.588 4.588 0 0 0-.004-9.175l-29.82.013a4.587 4.587 0 1 0 .004 9.175",fill:"#FFF"},null),C("path",{d:"M112.798 26.861v-.002l15.784-.006a4.588 4.588 0 1 0 .003 9.175l-15.783.007v-.002a4.586 4.586 0 0 0-.004-9.172M184.523 135.668c-.553 5.485-5.447 9.483-10.931 8.93-5.485-.553-9.483-5.448-8.93-10.932.552-5.485 5.447-9.483 10.932-8.93 5.485.553 9.483 5.447 8.93 10.932",fill:"#FFF"},null),C("path",{d:"M179.26 141.75l12.64 7.167M193.006 156.477l-15.255 13.011",stroke:"#FFF","stroke-width":"2"},null),C("path",{d:"M184.668 170.057a6.835 6.835 0 1 1-13.6-1.372 6.835 6.835 0 0 1 13.6 1.372M203.34 153.325a6.885 6.885 0 1 1-13.7-1.382 6.885 6.885 0 0 1 13.7 1.382",fill:"#FFF"},null),C("path",{d:"M151.931 192.324a2.222 2.222 0 1 1-4.444 0 2.222 2.222 0 0 1 4.444 0zM225.27 116.056a2.222 2.222 0 1 1-4.445 0 2.222 2.222 0 0 1 4.444 0zM216.38 151.08a2.223 2.223 0 1 1-4.446-.001 2.223 2.223 0 0 1 4.446 0zM176.917 107.636a2.223 2.223 0 1 1-4.445 0 2.223 2.223 0 0 1 4.445 0zM195.291 92.165a2.223 2.223 0 1 1-4.445 0 2.223 2.223 0 0 1 4.445 0zM202.058 180.711a2.223 2.223 0 1 1-4.446 0 2.223 2.223 0 0 1 4.446 0z",stroke:"#FFF","stroke-width":"2"},null),C("path",{stroke:"#FFF","stroke-width":"2",d:"M214.404 153.302l-1.912 20.184-10.928 5.99M173.661 174.792l-6.356 9.814h-11.36l-4.508 6.484M174.941 125.168v-15.804M220.824 117.25l-12.84 7.901-15.31-7.902V94.39"},null),C("path",{d:"M166.588 65.936h-3.951a4.756 4.756 0 0 1-4.743-4.742 4.756 4.756 0 0 1 4.743-4.743h3.951a4.756 4.756 0 0 1 4.743 4.743 4.756 4.756 0 0 1-4.743 4.742",fill:"#FFF"},null),C("path",{d:"M174.823 30.03c0-16.281 13.198-29.48 29.48-29.48 16.28 0 29.48 13.199 29.48 29.48 0 16.28-13.2 29.48-29.48 29.48-16.282 0-29.48-13.2-29.48-29.48",fill:"#1890FF"},null),C("path",{d:"M205.952 38.387c.5.5.785 1.142.785 1.928s-.286 1.465-.785 1.964c-.572.5-1.214.75-2 .75-.785 0-1.429-.285-1.929-.785-.572-.5-.82-1.143-.82-1.929s.248-1.428.82-1.928c.5-.5 1.144-.75 1.93-.75.785 0 1.462.25 1.999.75m4.285-19.463c1.428 1.249 2.143 2.963 2.143 5.142 0 1.712-.427 3.13-1.219 4.25-.067.096-.137.18-.218.265-.416.429-1.41 1.346-2.956 2.699a5.07 5.07 0 0 0-1.428 1.75 5.207 5.207 0 0 0-.536 2.357v.5h-4.107v-.5c0-1.357.215-2.536.714-3.5.464-.964 1.857-2.464 4.178-4.536l.43-.5c.643-.785.964-1.643.964-2.535 0-1.18-.358-2.108-1-2.785-.678-.68-1.643-1.001-2.858-1.001-1.536 0-2.642.464-3.357 1.43-.37.5-.621 1.135-.76 1.904a1.999 1.999 0 0 1-1.971 1.63h-.004c-1.277 0-2.257-1.183-1.98-2.43.337-1.518 1.02-2.78 2.073-3.784 1.536-1.5 3.607-2.25 6.25-2.25 2.32 0 4.214.607 5.642 1.894",fill:"#FFF"},null),C("path",{d:"M52.04 76.131s21.81 5.36 27.307 15.945c5.575 10.74-6.352 9.26-15.73 4.935-10.86-5.008-24.7-11.822-11.577-20.88",fill:"#FFB594"},null),C("path",{d:"M90.483 67.504l-.449 2.893c-.753.49-4.748-2.663-4.748-2.663l-1.645.748-1.346-5.684s6.815-4.589 8.917-5.018c2.452-.501 9.884.94 10.7 2.278 0 0 1.32.486-2.227.69-3.548.203-5.043.447-6.79 3.132-1.747 2.686-2.412 3.624-2.412 3.624",fill:"#FFC6A0"},null),C("path",{d:"M128.055 111.367c-2.627-7.724-6.15-13.18-8.917-15.478-3.5-2.906-9.34-2.225-11.366-4.187-1.27-1.231-3.215-1.197-3.215-1.197s-14.98-3.158-16.828-3.479c-2.37-.41-2.124-.714-6.054-1.405-1.57-1.907-2.917-1.122-2.917-1.122l-7.11-1.383c-.853-1.472-2.423-1.023-2.423-1.023l-2.468-.897c-1.645 9.976-7.74 13.796-7.74 13.796 1.795 1.122 15.703 8.3 15.703 8.3l5.107 37.11s-3.321 5.694 1.346 9.109c0 0 19.883-3.743 34.921-.329 0 0 3.047-2.546.972-8.806.523-3.01 1.394-8.263 1.736-11.622.385.772 2.019 1.918 3.14 3.477 0 0 9.407-7.365 11.052-14.012-.832-.723-1.598-1.585-2.267-2.453-.567-.736-.358-2.056-.765-2.717-.669-1.084-1.804-1.378-1.907-1.682",fill:"#FFF"},null),C("path",{d:"M101.09 289.998s4.295 2.041 7.354 1.021c2.821-.94 4.53.668 7.08 1.178 2.55.51 6.874 1.1 11.686-1.26-.103-5.51-6.889-3.98-11.96-6.713-2.563-1.38-3.784-4.722-3.598-8.799h-9.402s-1.392 10.52-1.16 14.573",fill:"#CBD1D1"},null),C("path",{d:"M101.067 289.826s2.428 1.271 6.759.653c3.058-.437 3.712.481 7.423 1.031 3.712.55 10.724-.069 11.823-.894.413 1.1-.343 2.063-.343 2.063s-1.512.603-4.812.824c-2.03.136-5.8.291-7.607-.503-1.787-1.375-5.247-1.903-5.728-.241-3.918.95-7.355-.286-7.355-.286l-.16-2.647z",fill:"#2B0849"},null),C("path",{d:"M108.341 276.044h3.094s-.103 6.702 4.536 8.558c-4.64.618-8.558-2.303-7.63-8.558",fill:"#A4AABA"},null),C("path",{d:"M57.542 272.401s-2.107 7.416-4.485 12.306c-1.798 3.695-4.225 7.492 5.465 7.492 6.648 0 8.953-.48 7.423-6.599-1.53-6.12.266-13.199.266-13.199h-8.669z",fill:"#CBD1D1"},null),C("path",{d:"M51.476 289.793s2.097 1.169 6.633 1.169c6.083 0 8.249-1.65 8.249-1.65s.602 1.114-.619 2.165c-.993.855-3.597 1.591-7.39 1.546-4.145-.048-5.832-.566-6.736-1.168-.825-.55-.687-1.58-.137-2.062",fill:"#2B0849"},null),C("path",{d:"M58.419 274.304s.033 1.519-.314 2.93c-.349 1.42-1.078 3.104-1.13 4.139-.058 1.151 4.537 1.58 5.155.034.62-1.547 1.294-6.427 1.913-7.252.619-.825-4.903-2.119-5.624.15",fill:"#A4AABA"},null),C("path",{d:"M99.66 278.514l13.378.092s1.298-54.52 1.853-64.403c.554-9.882 3.776-43.364 1.002-63.128l-12.547-.644-22.849.78s-.434 3.966-1.195 9.976c-.063.496-.682.843-.749 1.365-.075.585.423 1.354.32 1.966-2.364 14.08-6.377 33.104-8.744 46.677-.116.666-1.234 1.009-1.458 2.691-.04.302.211 1.525.112 1.795-6.873 18.744-10.949 47.842-14.277 61.885l14.607-.014s2.197-8.57 4.03-16.97c2.811-12.886 23.111-85.01 23.111-85.01l3.016-.521 1.043 46.35s-.224 1.234.337 2.02c.56.785-.56 1.123-.392 2.244l.392 1.794s-.449 7.178-.898 11.89c-.448 4.71-.092 39.165-.092 39.165",fill:"#7BB2F9"},null),C("path",{d:"M76.085 221.626c1.153.094 4.038-2.019 6.955-4.935M106.36 225.142s2.774-1.11 6.103-3.883",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M107.275 222.1s2.773-1.11 6.102-3.884",stroke:"#648BD8","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M74.74 224.767s2.622-.591 6.505-3.365M86.03 151.634c-.27 3.106.3 8.525-4.336 9.123M103.625 149.88s.11 14.012-1.293 15.065c-2.219 1.664-2.99 1.944-2.99 1.944M99.79 150.438s.035 12.88-1.196 24.377M93.673 175.911s7.212-1.664 9.431-1.664M74.31 205.861a212.013 212.013 0 0 1-.979 4.56s-1.458 1.832-1.009 3.776c.449 1.944-.947 2.045-4.985 15.355-1.696 5.59-4.49 18.591-6.348 27.597l-.231 1.12M75.689 197.807a320.934 320.934 0 0 1-.882 4.754M82.591 152.233L81.395 162.7s-1.097.15-.5 2.244c.113 1.346-2.674 15.775-5.18 30.43M56.12 274.418h13.31",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M116.241 148.22s-17.047-3.104-35.893.2c.158 2.514-.003 4.15-.003 4.15s14.687-2.818 35.67-.312c.252-2.355.226-4.038.226-4.038",fill:"#192064"},null),C("path",{d:"M106.322 151.165l.003-4.911a.81.81 0 0 0-.778-.815c-2.44-.091-5.066-.108-7.836-.014a.818.818 0 0 0-.789.815l-.003 4.906a.81.81 0 0 0 .831.813c2.385-.06 4.973-.064 7.73.017a.815.815 0 0 0 .842-.81",fill:"#FFF"},null),C("path",{d:"M105.207 150.233l.002-3.076a.642.642 0 0 0-.619-.646 94.321 94.321 0 0 0-5.866-.01.65.65 0 0 0-.63.647v3.072a.64.64 0 0 0 .654.644 121.12 121.12 0 0 1 5.794.011c.362.01.665-.28.665-.642",fill:"#192064"},null),C("path",{d:"M100.263 275.415h12.338M101.436 270.53c.006 3.387.042 5.79.111 6.506M101.451 264.548a915.75 915.75 0 0 0-.015 4.337M100.986 174.965l.898 44.642s.673 1.57-.225 2.692c-.897 1.122 2.468.673.898 2.243-1.57 1.57.897 1.122 0 3.365-.596 1.489-.994 21.1-1.096 35.146",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M46.876 83.427s-.516 6.045 7.223 5.552c11.2-.712 9.218-9.345 31.54-21.655-.786-2.708-2.447-4.744-2.447-4.744s-11.068 3.11-22.584 8.046c-6.766 2.9-13.395 6.352-13.732 12.801M104.46 91.057l.941-5.372-8.884-11.43-5.037 5.372-1.74 7.834a.321.321 0 0 0 .108.32c.965.8 6.5 5.013 14.347 3.544a.332.332 0 0 0 .264-.268",fill:"#FFC6A0"},null),C("path",{d:"M93.942 79.387s-4.533-2.853-2.432-6.855c1.623-3.09 4.513 1.133 4.513 1.133s.52-3.642 3.121-3.642c.52-1.04 1.561-4.162 1.561-4.162s11.445 2.601 13.526 3.121c0 5.203-2.304 19.424-7.84 19.861-8.892.703-12.449-9.456-12.449-9.456",fill:"#FFC6A0"},null),C("path",{d:"M113.874 73.446c2.601-2.081 3.47-9.722 3.47-9.722s-2.479-.49-6.64-2.05c-4.683-2.081-12.798-4.747-17.48.976-9.668 3.223-2.05 19.823-2.05 19.823l2.713-3.021s-3.935-3.287-2.08-6.243c2.17-3.462 3.92 1.073 3.92 1.073s.637-2.387 3.581-3.342c.355-.71 1.036-2.674 1.432-3.85a1.073 1.073 0 0 1 1.263-.704c2.4.558 8.677 2.019 11.356 2.662.522.125.871.615.82 1.15l-.305 3.248z",fill:"#520038"},null),C("path",{d:"M104.977 76.064c-.103.61-.582 1.038-1.07.956-.489-.083-.801-.644-.698-1.254.103-.61.582-1.038 1.07-.956.488.082.8.644.698 1.254M112.132 77.694c-.103.61-.582 1.038-1.07.956-.488-.083-.8-.644-.698-1.254.103-.61.582-1.038 1.07-.956.488.082.8.643.698 1.254",fill:"#552950"},null),C("path",{stroke:"#DB836E","stroke-width":"1.118","stroke-linecap":"round","stroke-linejoin":"round",d:"M110.13 74.84l-.896 1.61-.298 4.357h-2.228"},null),C("path",{d:"M110.846 74.481s1.79-.716 2.506.537",stroke:"#5C2552","stroke-width":"1.118","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M92.386 74.282s.477-1.114 1.113-.716c.637.398 1.274 1.433.558 1.99-.717.556.159 1.67.159 1.67",stroke:"#DB836E","stroke-width":"1.118","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M103.287 72.93s1.83 1.113 4.137.954",stroke:"#5C2552","stroke-width":"1.118","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M103.685 81.762s2.227 1.193 4.376 1.193M104.64 84.308s.954.398 1.511.318M94.693 81.205s2.308 7.4 10.424 7.639",stroke:"#DB836E","stroke-width":"1.118","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M81.45 89.384s.45 5.647-4.935 12.787M69 82.654s-.726 9.282-8.204 14.206",stroke:"#E4EBF7","stroke-width":"1.101","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M129.405 122.865s-5.272 7.403-9.422 10.768",stroke:"#E4EBF7","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M119.306 107.329s.452 4.366-2.127 32.062",stroke:"#E4EBF7","stroke-width":"1.101","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M150.028 151.232h-49.837a1.01 1.01 0 0 1-1.01-1.01v-31.688c0-.557.452-1.01 1.01-1.01h49.837c.558 0 1.01.453 1.01 1.01v31.688a1.01 1.01 0 0 1-1.01 1.01",fill:"#F2D7AD"},null),C("path",{d:"M150.29 151.232h-19.863v-33.707h20.784v32.786a.92.92 0 0 1-.92.92",fill:"#F4D19D"},null),C("path",{d:"M123.554 127.896H92.917a.518.518 0 0 1-.425-.816l6.38-9.113c.193-.277.51-.442.85-.442h31.092l-7.26 10.371z",fill:"#F2D7AD"},null),C("path",{fill:"#CC9B6E",d:"M123.689 128.447H99.25v-.519h24.169l7.183-10.26.424.298z"},null),C("path",{d:"M158.298 127.896h-18.669a2.073 2.073 0 0 1-1.659-.83l-7.156-9.541h19.965c.49 0 .95.23 1.244.622l6.69 8.92a.519.519 0 0 1-.415.83",fill:"#F4D19D"},null),C("path",{fill:"#CC9B6E",d:"M157.847 128.479h-19.384l-7.857-10.475.415-.31 7.7 10.266h19.126zM130.554 150.685l-.032-8.177.519-.002.032 8.177z"},null),C("path",{fill:"#CC9B6E",d:"M130.511 139.783l-.08-21.414.519-.002.08 21.414zM111.876 140.932l-.498-.143 1.479-5.167.498.143zM108.437 141.06l-2.679-2.935 2.665-3.434.41.318-2.397 3.089 2.384 2.612zM116.607 141.06l-.383-.35 2.383-2.612-2.397-3.089.41-.318 2.665 3.434z"},null),C("path",{d:"M154.316 131.892l-3.114-1.96.038 3.514-1.043.092c-1.682.115-3.634.23-4.789.23-1.902 0-2.693 2.258 2.23 2.648l-2.645-.596s-2.168 1.317.504 2.3c0 0-1.58 1.217.561 2.58-.584 3.504 5.247 4.058 7.122 3.59 1.876-.47 4.233-2.359 4.487-5.16.28-3.085-.89-5.432-3.35-7.238",fill:"#FFC6A0"},null),C("path",{d:"M153.686 133.577s-6.522.47-8.36.372c-1.836-.098-1.904 2.19 2.359 2.264 3.739.15 5.451-.044 5.451-.044",stroke:"#DB836E","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M145.16 135.877c-1.85 1.346.561 2.355.561 2.355s3.478.898 6.73.617",stroke:"#DB836E","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M151.89 141.71s-6.28.111-6.73-2.132c-.223-1.346.45-1.402.45-1.402M146.114 140.868s-1.103 3.16 5.44 3.533M151.202 129.932v3.477M52.838 89.286c3.533-.337 8.423-1.248 13.582-7.754",stroke:"#DB836E","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M168.567 248.318a6.647 6.647 0 0 1-6.647-6.647v-66.466a6.647 6.647 0 1 1 13.294 0v66.466a6.647 6.647 0 0 1-6.647 6.647",fill:"#5BA02E"},null),C("path",{d:"M176.543 247.653a6.647 6.647 0 0 1-6.646-6.647v-33.232a6.647 6.647 0 1 1 13.293 0v33.232a6.647 6.647 0 0 1-6.647 6.647",fill:"#92C110"},null),C("path",{d:"M186.443 293.613H158.92a3.187 3.187 0 0 1-3.187-3.187v-46.134a3.187 3.187 0 0 1 3.187-3.187h27.524a3.187 3.187 0 0 1 3.187 3.187v46.134a3.187 3.187 0 0 1-3.187 3.187",fill:"#F2D7AD"},null),C("path",{d:"M88.979 89.48s7.776 5.384 16.6 2.842",stroke:"#E4EBF7","stroke-width":"1.101","stroke-linecap":"round","stroke-linejoin":"round"},null)])]),Vfe=()=>C("svg",{width:"254",height:"294"},[C("defs",null,[C("path",{d:"M0 .335h253.49v253.49H0z"},null),C("path",{d:"M0 293.665h253.49V.401H0z"},null)]),C("g",{fill:"none","fill-rule":"evenodd"},[C("g",{transform:"translate(0 .067)"},[C("mask",{fill:"#fff"},null),C("path",{d:"M0 128.134v-2.11C0 56.608 56.273.334 125.69.334h2.11c69.416 0 125.69 56.274 125.69 125.69v2.11c0 69.417-56.274 125.69-125.69 125.69h-2.11C56.273 253.824 0 197.551 0 128.134",fill:"#E4EBF7",mask:"url(#b)"},null)]),C("path",{d:"M39.989 132.108a8.332 8.332 0 1 1-16.581-1.671 8.332 8.332 0 0 1 16.58 1.671",fill:"#FFF"},null),C("path",{d:"M37.19 135.59l10.553 5.983M48.665 147.884l-12.734 10.861",stroke:"#FFF","stroke-width":"2"},null),C("path",{d:"M40.11 160.816a5.706 5.706 0 1 1-11.354-1.145 5.706 5.706 0 0 1 11.354 1.145M57.943 144.6a5.747 5.747 0 1 1-11.436-1.152 5.747 5.747 0 0 1 11.436 1.153M99.656 27.434l30.024-.013a4.619 4.619 0 1 0-.004-9.238l-30.024.013a4.62 4.62 0 0 0 .004 9.238M111.14 45.896l30.023-.013a4.62 4.62 0 1 0-.004-9.238l-30.024.013a4.619 4.619 0 1 0 .004 9.238",fill:"#FFF"},null),C("path",{d:"M113.53 27.421v-.002l15.89-.007a4.619 4.619 0 1 0 .005 9.238l-15.892.007v-.002a4.618 4.618 0 0 0-.004-9.234M150.167 70.091h-3.979a4.789 4.789 0 0 1-4.774-4.775 4.788 4.788 0 0 1 4.774-4.774h3.979a4.789 4.789 0 0 1 4.775 4.774 4.789 4.789 0 0 1-4.775 4.775",fill:"#FFF"},null),C("path",{d:"M171.687 30.234c0-16.392 13.289-29.68 29.681-29.68 16.392 0 29.68 13.288 29.68 29.68 0 16.393-13.288 29.681-29.68 29.681s-29.68-13.288-29.68-29.68",fill:"#FF603B"},null),C("path",{d:"M203.557 19.435l-.676 15.035a1.514 1.514 0 0 1-3.026 0l-.675-15.035a2.19 2.19 0 1 1 4.377 0m-.264 19.378c.513.477.77 1.1.77 1.87s-.257 1.393-.77 1.907c-.55.476-1.21.733-1.943.733a2.545 2.545 0 0 1-1.87-.77c-.55-.514-.806-1.136-.806-1.87 0-.77.256-1.393.806-1.87.513-.513 1.137-.733 1.87-.733.77 0 1.43.22 1.943.733",fill:"#FFF"},null),C("path",{d:"M119.3 133.275c4.426-.598 3.612-1.204 4.079-4.778.675-5.18-3.108-16.935-8.262-25.118-1.088-10.72-12.598-11.24-12.598-11.24s4.312 4.895 4.196 16.199c1.398 5.243.804 14.45.804 14.45s5.255 11.369 11.78 10.487",fill:"#FFB594"},null),C("path",{d:"M100.944 91.61s1.463-.583 3.211.582c8.08 1.398 10.368 6.706 11.3 11.368 1.864 1.282 1.864 2.33 1.864 3.496.365.777 1.515 3.03 1.515 3.03s-7.225 1.748-10.954 6.758c-1.399-6.41-6.936-25.235-6.936-25.235",fill:"#FFF"},null),C("path",{d:"M94.008 90.5l1.019-5.815-9.23-11.874-5.233 5.581-2.593 9.863s8.39 5.128 16.037 2.246",fill:"#FFB594"},null),C("path",{d:"M82.931 78.216s-4.557-2.868-2.445-6.892c1.632-3.107 4.537 1.139 4.537 1.139s.524-3.662 3.139-3.662c.523-1.046 1.569-4.184 1.569-4.184s11.507 2.615 13.6 3.138c-.001 5.23-2.317 19.529-7.884 19.969-8.94.706-12.516-9.508-12.516-9.508",fill:"#FFC6A0"},null),C("path",{d:"M102.971 72.243c2.616-2.093 3.489-9.775 3.489-9.775s-2.492-.492-6.676-2.062c-4.708-2.092-12.867-4.771-17.575.982-9.54 4.41-2.062 19.93-2.062 19.93l2.729-3.037s-3.956-3.304-2.092-6.277c2.183-3.48 3.943 1.08 3.943 1.08s.64-2.4 3.6-3.36c.356-.714 1.04-2.69 1.44-3.872a1.08 1.08 0 0 1 1.27-.707c2.41.56 8.723 2.03 11.417 2.676.524.126.876.619.825 1.156l-.308 3.266z",fill:"#520038"},null),C("path",{d:"M101.22 76.514c-.104.613-.585 1.044-1.076.96-.49-.082-.805-.646-.702-1.26.104-.613.585-1.044 1.076-.961.491.083.805.647.702 1.26M94.26 75.074c-.104.613-.585 1.044-1.076.96-.49-.082-.805-.646-.702-1.26.104-.613.585-1.044 1.076-.96.491.082.805.646.702 1.26",fill:"#552950"},null),C("path",{stroke:"#DB836E","stroke-width":"1.063","stroke-linecap":"round","stroke-linejoin":"round",d:"M99.206 73.644l-.9 1.62-.3 4.38h-2.24"},null),C("path",{d:"M99.926 73.284s1.8-.72 2.52.54",stroke:"#5C2552","stroke-width":"1.117","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M81.367 73.084s.48-1.12 1.12-.72c.64.4 1.28 1.44.56 2s.16 1.68.16 1.68",stroke:"#DB836E","stroke-width":"1.117","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M92.326 71.724s1.84 1.12 4.16.96",stroke:"#5C2552","stroke-width":"1.117","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M92.726 80.604s2.24 1.2 4.4 1.2M93.686 83.164s.96.4 1.52.32M83.687 80.044s1.786 6.547 9.262 7.954",stroke:"#DB836E","stroke-width":"1.063","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M95.548 91.663s-1.068 2.821-8.298 2.105c-7.23-.717-10.29-5.044-10.29-5.044",stroke:"#E4EBF7","stroke-width":"1.136","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M78.126 87.478s6.526 4.972 16.47 2.486c0 0 9.577 1.02 11.536 5.322 5.36 11.77.543 36.835 0 39.962 3.496 4.055-.466 8.483-.466 8.483-15.624-3.548-35.81-.6-35.81-.6-4.849-3.546-1.223-9.044-1.223-9.044L62.38 110.32c-2.485-15.227.833-19.803 3.549-20.743 3.03-1.049 8.04-1.282 8.04-1.282.496-.058 1.08-.076 1.37-.233 2.36-1.282 2.787-.583 2.787-.583",fill:"#FFF"},null),C("path",{d:"M65.828 89.81s-6.875.465-7.59 8.156c-.466 8.857 3.03 10.954 3.03 10.954s6.075 22.102 16.796 22.957c8.39-2.176 4.758-6.702 4.661-11.42-.233-11.304-7.108-16.897-7.108-16.897s-4.212-13.75-9.789-13.75",fill:"#FFC6A0"},null),C("path",{d:"M71.716 124.225s.855 11.264 9.828 6.486c4.765-2.536 7.581-13.828 9.789-22.568 1.456-5.768 2.58-12.197 2.58-12.197l-4.973-1.709s-2.408 5.516-7.769 12.275c-4.335 5.467-9.144 11.11-9.455 17.713",fill:"#FFC6A0"},null),C("path",{d:"M108.463 105.191s1.747 2.724-2.331 30.535c2.376 2.216 1.053 6.012-.233 7.51",stroke:"#E4EBF7","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M123.262 131.527s-.427 2.732-11.77 1.981c-15.187-1.006-25.326-3.25-25.326-3.25l.933-5.8s.723.215 9.71-.068c11.887-.373 18.714-6.07 24.964-1.022 4.039 3.263 1.489 8.16 1.489 8.16",fill:"#FFC6A0"},null),C("path",{d:"M70.24 90.974s-5.593-4.739-11.054 2.68c-3.318 7.223.517 15.284 2.664 19.578-.31 3.729 2.33 4.311 2.33 4.311s.108.895 1.516 2.68c4.078-7.03 6.72-9.166 13.711-12.546-.328-.656-1.877-3.265-1.825-3.767.175-1.69-1.282-2.623-1.282-2.623s-.286-.156-1.165-2.738c-.788-2.313-2.036-5.177-4.895-7.575",fill:"#FFF"},null),C("path",{d:"M90.232 288.027s4.855 2.308 8.313 1.155c3.188-1.063 5.12.755 8.002 1.331 2.881.577 7.769 1.243 13.207-1.424-.117-6.228-7.786-4.499-13.518-7.588-2.895-1.56-4.276-5.336-4.066-9.944H91.544s-1.573 11.89-1.312 16.47",fill:"#CBD1D1"},null),C("path",{d:"M90.207 287.833s2.745 1.437 7.639.738c3.456-.494 3.223.66 7.418 1.282 4.195.621 13.092-.194 14.334-1.126.466 1.242-.388 2.33-.388 2.33s-1.709.682-5.438.932c-2.295.154-8.098.276-10.14-.621-2.02-1.554-4.894-1.515-6.06-.234-4.427 1.075-7.184-.31-7.184-.31l-.181-2.991z",fill:"#2B0849"},null),C("path",{d:"M98.429 272.257h3.496s-.117 7.574 5.127 9.671c-5.244.7-9.672-2.602-8.623-9.671",fill:"#A4AABA"},null),C("path",{d:"M44.425 272.046s-2.208 7.774-4.702 12.899c-1.884 3.874-4.428 7.854 5.729 7.854 6.97 0 9.385-.503 7.782-6.917-1.604-6.415.279-13.836.279-13.836h-9.088z",fill:"#CBD1D1"},null),C("path",{d:"M38.066 290.277s2.198 1.225 6.954 1.225c6.376 0 8.646-1.73 8.646-1.73s.63 1.168-.649 2.27c-1.04.897-3.77 1.668-7.745 1.621-4.347-.05-6.115-.593-7.062-1.224-.864-.577-.72-1.657-.144-2.162",fill:"#2B0849"},null),C("path",{d:"M45.344 274.041s.035 1.592-.329 3.07c-.365 1.49-1.13 3.255-1.184 4.34-.061 1.206 4.755 1.657 5.403.036.65-1.622 1.357-6.737 2.006-7.602.648-.865-5.14-2.222-5.896.156",fill:"#A4AABA"},null),C("path",{d:"M89.476 277.57l13.899.095s1.349-56.643 1.925-66.909c.576-10.267 3.923-45.052 1.042-65.585l-13.037-.669-23.737.81s-.452 4.12-1.243 10.365c-.065.515-.708.874-.777 1.417-.078.608.439 1.407.332 2.044-2.455 14.627-5.797 32.736-8.256 46.837-.121.693-1.282 1.048-1.515 2.796-.042.314.22 1.584.116 1.865-7.14 19.473-12.202 52.601-15.66 67.19l15.176-.015s2.282-10.145 4.185-18.871c2.922-13.389 24.012-88.32 24.012-88.32l3.133-.954-.158 48.568s-.233 1.282.35 2.098c.583.815-.581 1.167-.408 2.331l.408 1.864s-.466 7.458-.932 12.352c-.467 4.895 1.145 40.69 1.145 40.69",fill:"#7BB2F9"},null),C("path",{d:"M64.57 218.881c1.197.099 4.195-2.097 7.225-5.127M96.024 222.534s2.881-1.152 6.34-4.034",stroke:"#648BD8","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M96.973 219.373s2.882-1.153 6.34-4.034",stroke:"#648BD8","stroke-width":"1.032","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M63.172 222.144s2.724-.614 6.759-3.496M74.903 146.166c-.281 3.226.31 8.856-4.506 9.478M93.182 144.344s.115 14.557-1.344 15.65c-2.305 1.73-3.107 2.02-3.107 2.02M89.197 144.923s.269 13.144-1.01 25.088M83.525 170.71s6.81-1.051 9.116-1.051M46.026 270.045l-.892 4.538M46.937 263.289l-.815 4.157M62.725 202.503c-.33 1.618-.102 1.904-.449 3.438 0 0-2.756 1.903-2.29 3.923.466 2.02-.31 3.424-4.505 17.252-1.762 5.807-4.233 18.922-6.165 28.278-.03.144-.521 2.646-1.14 5.8M64.158 194.136c-.295 1.658-.6 3.31-.917 4.938M71.33 146.787l-1.244 10.877s-1.14.155-.519 2.33c.117 1.399-2.778 16.39-5.382 31.615M44.242 273.727H58.07",stroke:"#648BD8","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M106.18 142.117c-3.028-.489-18.825-2.744-36.219.2a.625.625 0 0 0-.518.644c.063 1.307.044 2.343.015 2.995a.617.617 0 0 0 .716.636c3.303-.534 17.037-2.412 35.664-.266.347.04.66-.214.692-.56.124-1.347.16-2.425.17-3.029a.616.616 0 0 0-.52-.62",fill:"#192064"},null),C("path",{d:"M96.398 145.264l.003-5.102a.843.843 0 0 0-.809-.847 114.104 114.104 0 0 0-8.141-.014.85.85 0 0 0-.82.847l-.003 5.097c0 .476.388.857.864.845 2.478-.064 5.166-.067 8.03.017a.848.848 0 0 0 .876-.843",fill:"#FFF"},null),C("path",{d:"M95.239 144.296l.002-3.195a.667.667 0 0 0-.643-.672c-1.9-.061-3.941-.073-6.094-.01a.675.675 0 0 0-.654.672l-.002 3.192c0 .376.305.677.68.669 1.859-.042 3.874-.043 6.02.012.376.01.69-.291.691-.668",fill:"#192064"},null),C("path",{d:"M90.102 273.522h12.819M91.216 269.761c.006 3.519-.072 5.55 0 6.292M90.923 263.474c-.009 1.599-.016 2.558-.016 4.505M90.44 170.404l.932 46.38s.7 1.631-.233 2.796c-.932 1.166 2.564.7.932 2.33-1.63 1.633.933 1.166 0 3.497-.618 1.546-1.031 21.921-1.138 36.513",stroke:"#648BD8","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M73.736 98.665l2.214 4.312s2.098.816 1.865 2.68l.816 2.214M64.297 116.611c.233-.932 2.176-7.147 12.585-10.488M77.598 90.042s7.691 6.137 16.547 2.72",stroke:"#E4EBF7","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M91.974 86.954s5.476-.816 7.574-4.545c1.297-.345.72 2.212-.33 3.671-.7.971-1.01 1.554-1.01 1.554s.194.31.155.816c-.053.697-.175.653-.272 1.048-.081.335.108.657 0 1.049-.046.17-.198.5-.382.878-.12.249-.072.687-.2.948-.231.469-1.562 1.87-2.622 2.855-3.826 3.554-5.018 1.644-6.001-.408-.894-1.865-.661-5.127-.874-6.875-.35-2.914-2.622-3.03-1.923-4.429.343-.685 2.87.69 3.263 1.748.757 2.04 2.952 1.807 2.622 1.69",fill:"#FFC6A0"},null),C("path",{d:"M99.8 82.429c-.465.077-.35.272-.97 1.243-.622.971-4.817 2.932-6.39 3.224-2.589.48-2.278-1.56-4.254-2.855-1.69-1.107-3.562-.638-1.398 1.398.99.932.932 1.107 1.398 3.205.335 1.506-.64 3.67.7 5.593",stroke:"#DB836E","stroke-width":".774","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M79.543 108.673c-2.1 2.926-4.266 6.175-5.557 8.762",stroke:"#E59788","stroke-width":".774","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M87.72 124.768s-2.098-1.942-5.127-2.719c-3.03-.777-3.574-.155-5.516.078-1.942.233-3.885-.932-3.652.7.233 1.63 5.05 1.01 5.206 2.097.155 1.087-6.37 2.796-8.313 2.175-.777.777.466 1.864 2.02 2.175.233 1.554 2.253 1.554 2.253 1.554s.699 1.01 2.641 1.088c2.486 1.32 8.934-.7 10.954-1.554 2.02-.855-.466-5.594-.466-5.594",fill:"#FFC6A0"},null),C("path",{d:"M73.425 122.826s.66 1.127 3.167 1.418c2.315.27 2.563.583 2.563.583s-2.545 2.894-9.07 2.272M72.416 129.274s3.826.097 4.933-.718M74.98 130.75s1.961.136 3.36-.505M77.232 131.916s1.748.019 2.914-.505M73.328 122.321s-.595-1.032 1.262-.427c1.671.544 2.833.055 5.128.155 1.389.061 3.067-.297 3.982.15 1.606.784 3.632 2.181 3.632 2.181s10.526 1.204 19.033-1.127M78.864 108.104s-8.39 2.758-13.168 12.12",stroke:"#E59788","stroke-width":".774","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M109.278 112.533s3.38-3.613 7.575-4.662",stroke:"#E4EBF7","stroke-width":"1.085","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M107.375 123.006s9.697-2.745 11.445-.88",stroke:"#E59788","stroke-width":".774","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M194.605 83.656l3.971-3.886M187.166 90.933l3.736-3.655M191.752 84.207l-4.462-4.56M198.453 91.057l-4.133-4.225M129.256 163.074l3.718-3.718M122.291 170.039l3.498-3.498M126.561 163.626l-4.27-4.27M132.975 170.039l-3.955-3.955",stroke:"#BFCDDD","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M190.156 211.779h-1.604a4.023 4.023 0 0 1-4.011-4.011V175.68a4.023 4.023 0 0 1 4.01-4.01h1.605a4.023 4.023 0 0 1 4.011 4.01v32.088a4.023 4.023 0 0 1-4.01 4.01",fill:"#A3B4C6"},null),C("path",{d:"M237.824 212.977a4.813 4.813 0 0 1-4.813 4.813h-86.636a4.813 4.813 0 0 1 0-9.626h86.636a4.813 4.813 0 0 1 4.813 4.813",fill:"#A3B4C6"},null),C("mask",{fill:"#fff"},null),C("path",{fill:"#A3B4C6",mask:"url(#d)",d:"M154.098 190.096h70.513v-84.617h-70.513z"},null),C("path",{d:"M224.928 190.096H153.78a3.219 3.219 0 0 1-3.208-3.209V167.92a3.219 3.219 0 0 1 3.208-3.21h71.148a3.219 3.219 0 0 1 3.209 3.21v18.967a3.219 3.219 0 0 1-3.21 3.209M224.928 130.832H153.78a3.218 3.218 0 0 1-3.208-3.208v-18.968a3.219 3.219 0 0 1 3.208-3.209h71.148a3.219 3.219 0 0 1 3.209 3.21v18.967a3.218 3.218 0 0 1-3.21 3.208",fill:"#BFCDDD",mask:"url(#d)"},null),C("path",{d:"M159.563 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M166.98 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M174.397 120.546a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M222.539 120.546h-22.461a.802.802 0 0 1-.802-.802v-3.208c0-.443.359-.803.802-.803h22.46c.444 0 .803.36.803.803v3.208c0 .443-.36.802-.802.802",fill:"#FFF",mask:"url(#d)"},null),C("path",{d:"M224.928 160.464H153.78a3.218 3.218 0 0 1-3.208-3.209v-18.967a3.219 3.219 0 0 1 3.208-3.209h71.148a3.219 3.219 0 0 1 3.209 3.209v18.967a3.218 3.218 0 0 1-3.21 3.209",fill:"#BFCDDD",mask:"url(#d)"},null),C("path",{d:"M173.455 130.832h49.301M164.984 130.832h6.089M155.952 130.832h6.75M173.837 160.613h49.3M165.365 160.613h6.089M155.57 160.613h6.751",stroke:"#7C90A5","stroke-width":"1.124","stroke-linecap":"round","stroke-linejoin":"round",mask:"url(#d)"},null),C("path",{d:"M159.563 151.038a2.407 2.407 0 1 1 0-4.814 2.407 2.407 0 0 1 0 4.814M166.98 151.038a2.407 2.407 0 1 1 0-4.814 2.407 2.407 0 0 1 0 4.814M174.397 151.038a2.407 2.407 0 1 1 .001-4.814 2.407 2.407 0 0 1 0 4.814M222.539 151.038h-22.461a.802.802 0 0 1-.802-.802v-3.209c0-.443.359-.802.802-.802h22.46c.444 0 .803.36.803.802v3.209c0 .443-.36.802-.802.802M159.563 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M166.98 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M174.397 179.987a2.407 2.407 0 1 1 0-4.813 2.407 2.407 0 0 1 0 4.813M222.539 179.987h-22.461a.802.802 0 0 1-.802-.802v-3.209c0-.443.359-.802.802-.802h22.46c.444 0 .803.36.803.802v3.209c0 .443-.36.802-.802.802",fill:"#FFF",mask:"url(#d)"},null),C("path",{d:"M203.04 221.108h-27.372a2.413 2.413 0 0 1-2.406-2.407v-11.448a2.414 2.414 0 0 1 2.406-2.407h27.372a2.414 2.414 0 0 1 2.407 2.407V218.7a2.413 2.413 0 0 1-2.407 2.407",fill:"#BFCDDD",mask:"url(#d)"},null),C("path",{d:"M177.259 207.217v11.52M201.05 207.217v11.52",stroke:"#A3B4C6","stroke-width":"1.124","stroke-linecap":"round","stroke-linejoin":"round",mask:"url(#d)"},null),C("path",{d:"M162.873 267.894a9.422 9.422 0 0 1-9.422-9.422v-14.82a9.423 9.423 0 0 1 18.845 0v14.82a9.423 9.423 0 0 1-9.423 9.422",fill:"#5BA02E",mask:"url(#d)"},null),C("path",{d:"M171.22 267.83a9.422 9.422 0 0 1-9.422-9.423v-3.438a9.423 9.423 0 0 1 18.845 0v3.438a9.423 9.423 0 0 1-9.422 9.423",fill:"#92C110",mask:"url(#d)"},null),C("path",{d:"M181.31 293.666h-27.712a3.209 3.209 0 0 1-3.209-3.21V269.79a3.209 3.209 0 0 1 3.209-3.21h27.711a3.209 3.209 0 0 1 3.209 3.21v20.668a3.209 3.209 0 0 1-3.209 3.209",fill:"#F2D7AD",mask:"url(#d)"},null)])]),Xfe=()=>C("svg",{width:"251",height:"294"},[C("g",{fill:"none","fill-rule":"evenodd"},[C("path",{d:"M0 129.023v-2.084C0 58.364 55.591 2.774 124.165 2.774h2.085c68.574 0 124.165 55.59 124.165 124.165v2.084c0 68.575-55.59 124.166-124.165 124.166h-2.085C55.591 253.189 0 197.598 0 129.023",fill:"#E4EBF7"},null),C("path",{d:"M41.417 132.92a8.231 8.231 0 1 1-16.38-1.65 8.231 8.231 0 0 1 16.38 1.65",fill:"#FFF"},null),C("path",{d:"M38.652 136.36l10.425 5.91M49.989 148.505l-12.58 10.73",stroke:"#FFF","stroke-width":"2"},null),C("path",{d:"M41.536 161.28a5.636 5.636 0 1 1-11.216-1.13 5.636 5.636 0 0 1 11.216 1.13M59.154 145.261a5.677 5.677 0 1 1-11.297-1.138 5.677 5.677 0 0 1 11.297 1.138M100.36 29.516l29.66-.013a4.562 4.562 0 1 0-.004-9.126l-29.66.013a4.563 4.563 0 0 0 .005 9.126M111.705 47.754l29.659-.013a4.563 4.563 0 1 0-.004-9.126l-29.66.013a4.563 4.563 0 1 0 .005 9.126",fill:"#FFF"},null),C("path",{d:"M114.066 29.503V29.5l15.698-.007a4.563 4.563 0 1 0 .004 9.126l-15.698.007v-.002a4.562 4.562 0 0 0-.004-9.122M185.405 137.723c-.55 5.455-5.418 9.432-10.873 8.882-5.456-.55-9.432-5.418-8.882-10.873.55-5.455 5.418-9.432 10.873-8.882 5.455.55 9.432 5.418 8.882 10.873",fill:"#FFF"},null),C("path",{d:"M180.17 143.772l12.572 7.129M193.841 158.42L178.67 171.36",stroke:"#FFF","stroke-width":"2"},null),C("path",{d:"M185.55 171.926a6.798 6.798 0 1 1-13.528-1.363 6.798 6.798 0 0 1 13.527 1.363M204.12 155.285a6.848 6.848 0 1 1-13.627-1.375 6.848 6.848 0 0 1 13.626 1.375",fill:"#FFF"},null),C("path",{d:"M152.988 194.074a2.21 2.21 0 1 1-4.42 0 2.21 2.21 0 0 1 4.42 0zM225.931 118.217a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.421 0zM217.09 153.051a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.42 0zM177.84 109.842a2.21 2.21 0 1 1-4.422 0 2.21 2.21 0 0 1 4.421 0zM196.114 94.454a2.21 2.21 0 1 1-4.421 0 2.21 2.21 0 0 1 4.421 0zM202.844 182.523a2.21 2.21 0 1 1-4.42 0 2.21 2.21 0 0 1 4.42 0z",stroke:"#FFF","stroke-width":"2"},null),C("path",{stroke:"#FFF","stroke-width":"2",d:"M215.125 155.262l-1.902 20.075-10.87 5.958M174.601 176.636l-6.322 9.761H156.98l-4.484 6.449M175.874 127.28V111.56M221.51 119.404l-12.77 7.859-15.228-7.86V96.668"},null),C("path",{d:"M180.68 29.32C180.68 13.128 193.806 0 210 0c16.193 0 29.32 13.127 29.32 29.32 0 16.194-13.127 29.322-29.32 29.322-16.193 0-29.32-13.128-29.32-29.321",fill:"#A26EF4"},null),C("path",{d:"M221.45 41.706l-21.563-.125a1.744 1.744 0 0 1-1.734-1.754l.071-12.23a1.744 1.744 0 0 1 1.754-1.734l21.562.125c.964.006 1.74.791 1.735 1.755l-.071 12.229a1.744 1.744 0 0 1-1.754 1.734",fill:"#FFF"},null),C("path",{d:"M215.106 29.192c-.015 2.577-2.049 4.654-4.543 4.64-2.494-.014-4.504-2.115-4.489-4.693l.04-6.925c.016-2.577 2.05-4.654 4.543-4.64 2.494.015 4.504 2.116 4.49 4.693l-.04 6.925zm-4.53-14.074a6.877 6.877 0 0 0-6.916 6.837l-.043 7.368a6.877 6.877 0 0 0 13.754.08l.042-7.368a6.878 6.878 0 0 0-6.837-6.917zM167.566 68.367h-3.93a4.73 4.73 0 0 1-4.717-4.717 4.73 4.73 0 0 1 4.717-4.717h3.93a4.73 4.73 0 0 1 4.717 4.717 4.73 4.73 0 0 1-4.717 4.717",fill:"#FFF"},null),C("path",{d:"M168.214 248.838a6.611 6.611 0 0 1-6.61-6.611v-66.108a6.611 6.611 0 0 1 13.221 0v66.108a6.611 6.611 0 0 1-6.61 6.61",fill:"#5BA02E"},null),C("path",{d:"M176.147 248.176a6.611 6.611 0 0 1-6.61-6.61v-33.054a6.611 6.611 0 1 1 13.221 0v33.053a6.611 6.611 0 0 1-6.61 6.611",fill:"#92C110"},null),C("path",{d:"M185.994 293.89h-27.376a3.17 3.17 0 0 1-3.17-3.17v-45.887a3.17 3.17 0 0 1 3.17-3.17h27.376a3.17 3.17 0 0 1 3.17 3.17v45.886a3.17 3.17 0 0 1-3.17 3.17",fill:"#F2D7AD"},null),C("path",{d:"M81.972 147.673s6.377-.927 17.566-1.28c11.729-.371 17.57 1.086 17.57 1.086s3.697-3.855.968-8.424c1.278-12.077 5.982-32.827.335-48.273-1.116-1.339-3.743-1.512-7.536-.62-1.337.315-7.147-.149-7.983-.1l-15.311-.347s-3.487-.17-8.035-.508c-1.512-.113-4.227-1.683-5.458-.338-.406.443-2.425 5.669-1.97 16.077l8.635 35.642s-3.141 3.61 1.219 7.085",fill:"#FFF"},null),C("path",{d:"M75.768 73.325l-.9-6.397 11.982-6.52s7.302-.118 8.038 1.205c.737 1.324-5.616.993-5.616.993s-1.836 1.388-2.615 2.5c-1.654 2.363-.986 6.471-8.318 5.986-1.708.284-2.57 2.233-2.57 2.233",fill:"#FFC6A0"},null),C("path",{d:"M52.44 77.672s14.217 9.406 24.973 14.444c1.061.497-2.094 16.183-11.892 11.811-7.436-3.318-20.162-8.44-21.482-14.496-.71-3.258 2.543-7.643 8.401-11.76M141.862 80.113s-6.693 2.999-13.844 6.876c-3.894 2.11-10.137 4.704-12.33 7.988-6.224 9.314 3.536 11.22 12.947 7.503 6.71-2.651 28.999-12.127 13.227-22.367",fill:"#FFB594"},null),C("path",{d:"M76.166 66.36l3.06 3.881s-2.783 2.67-6.31 5.747c-7.103 6.195-12.803 14.296-15.995 16.44-3.966 2.662-9.754 3.314-12.177-.118-3.553-5.032.464-14.628 31.422-25.95",fill:"#FFC6A0"},null),C("path",{d:"M64.674 85.116s-2.34 8.413-8.912 14.447c.652.548 18.586 10.51 22.144 10.056 5.238-.669 6.417-18.968 1.145-20.531-.702-.208-5.901-1.286-8.853-2.167-.87-.26-1.611-1.71-3.545-.936l-1.98-.869zM128.362 85.826s5.318 1.956 7.325 13.734c-.546.274-17.55 12.35-21.829 7.805-6.534-6.94-.766-17.393 4.275-18.61 4.646-1.121 5.03-1.37 10.23-2.929",fill:"#FFF"},null),C("path",{d:"M78.18 94.656s.911 7.41-4.914 13.078",stroke:"#E4EBF7","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M87.397 94.68s3.124 2.572 10.263 2.572c7.14 0 9.074-3.437 9.074-3.437",stroke:"#E4EBF7","stroke-width":".932","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M117.184 68.639l-6.781-6.177s-5.355-4.314-9.223-.893c-3.867 3.422 4.463 2.083 5.653 4.165 1.19 2.082.848 1.143-2.083.446-5.603-1.331-2.082.893 2.975 5.355 2.091 1.845 6.992.955 6.992.955l2.467-3.851z",fill:"#FFC6A0"},null),C("path",{d:"M105.282 91.315l-.297-10.937-15.918-.027-.53 10.45c-.026.403.17.788.515.999 2.049 1.251 9.387 5.093 15.799.424.287-.21.443-.554.431-.91",fill:"#FFB594"},null),C("path",{d:"M107.573 74.24c.817-1.147.982-9.118 1.015-11.928a1.046 1.046 0 0 0-.965-1.055l-4.62-.365c-7.71-1.044-17.071.624-18.253 6.346-5.482 5.813-.421 13.244-.421 13.244s1.963 3.566 4.305 6.791c.756 1.041.398-3.731 3.04-5.929 5.524-4.594 15.899-7.103 15.899-7.103",fill:"#5C2552"},null),C("path",{d:"M88.426 83.206s2.685 6.202 11.602 6.522c7.82.28 8.973-7.008 7.434-17.505l-.909-5.483c-6.118-2.897-15.478.54-15.478.54s-.576 2.044-.19 5.504c-2.276 2.066-1.824 5.618-1.824 5.618s-.905-1.922-1.98-2.321c-.86-.32-1.897.089-2.322 1.98-1.04 4.632 3.667 5.145 3.667 5.145",fill:"#FFC6A0"},null),C("path",{stroke:"#DB836E","stroke-width":"1.145","stroke-linecap":"round","stroke-linejoin":"round",d:"M100.843 77.099l1.701-.928-1.015-4.324.674-1.406"},null),C("path",{d:"M105.546 74.092c-.022.713-.452 1.279-.96 1.263-.51-.016-.904-.607-.882-1.32.021-.713.452-1.278.96-1.263.51.016.904.607.882 1.32M97.592 74.349c-.022.713-.452 1.278-.961 1.263-.509-.016-.904-.607-.882-1.32.022-.713.452-1.279.961-1.263.51.016.904.606.882 1.32",fill:"#552950"},null),C("path",{d:"M91.132 86.786s5.269 4.957 12.679 2.327",stroke:"#DB836E","stroke-width":"1.145","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M99.776 81.903s-3.592.232-1.44-2.79c1.59-1.496 4.897-.46 4.897-.46s1.156 3.906-3.457 3.25",fill:"#DB836E"},null),C("path",{d:"M102.88 70.6s2.483.84 3.402.715M93.883 71.975s2.492-1.144 4.778-1.073",stroke:"#5C2552","stroke-width":"1.526","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M86.32 77.374s.961.879 1.458 2.106c-.377.48-1.033 1.152-.236 1.809M99.337 83.719s1.911.151 2.509-.254",stroke:"#DB836E","stroke-width":"1.145","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M87.782 115.821l15.73-3.012M100.165 115.821l10.04-2.008",stroke:"#E4EBF7","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M66.508 86.763s-1.598 8.83-6.697 14.078",stroke:"#E4EBF7","stroke-width":"1.114","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M128.31 87.934s3.013 4.121 4.06 11.785",stroke:"#E4EBF7","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M64.09 84.816s-6.03 9.912-13.607 9.903",stroke:"#DB836E","stroke-width":".795","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M112.366 65.909l-.142 5.32s5.993 4.472 11.945 9.202c4.482 3.562 8.888 7.455 10.985 8.662 4.804 2.766 8.9 3.355 11.076 1.808 4.071-2.894 4.373-9.878-8.136-15.263-4.271-1.838-16.144-6.36-25.728-9.73",fill:"#FFC6A0"},null),C("path",{d:"M130.532 85.488s4.588 5.757 11.619 6.214",stroke:"#DB836E","stroke-width":".75","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M121.708 105.73s-.393 8.564-1.34 13.612",stroke:"#E4EBF7","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M115.784 161.512s-3.57-1.488-2.678-7.14",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M101.52 290.246s4.326 2.057 7.408 1.03c2.842-.948 4.564.673 7.132 1.186 2.57.514 6.925 1.108 11.772-1.269-.104-5.551-6.939-4.01-12.048-6.763-2.582-1.39-3.812-4.757-3.625-8.863h-9.471s-1.402 10.596-1.169 14.68",fill:"#CBD1D1"},null),C("path",{d:"M101.496 290.073s2.447 1.281 6.809.658c3.081-.44 3.74.485 7.479 1.039 3.739.554 10.802-.07 11.91-.9.415 1.108-.347 2.077-.347 2.077s-1.523.608-4.847.831c-2.045.137-5.843.293-7.663-.507-1.8-1.385-5.286-1.917-5.77-.243-3.947.958-7.41-.288-7.41-.288l-.16-2.667z",fill:"#2B0849"},null),C("path",{d:"M108.824 276.19h3.116s-.103 6.751 4.57 8.62c-4.673.624-8.62-2.32-7.686-8.62",fill:"#A4AABA"},null),C("path",{d:"M57.65 272.52s-2.122 7.47-4.518 12.396c-1.811 3.724-4.255 7.548 5.505 7.548 6.698 0 9.02-.483 7.479-6.648-1.541-6.164.268-13.296.268-13.296H57.65z",fill:"#CBD1D1"},null),C("path",{d:"M51.54 290.04s2.111 1.178 6.682 1.178c6.128 0 8.31-1.662 8.31-1.662s.605 1.122-.624 2.18c-1 .862-3.624 1.603-7.444 1.559-4.177-.049-5.876-.57-6.786-1.177-.831-.554-.692-1.593-.138-2.078",fill:"#2B0849"},null),C("path",{d:"M58.533 274.438s.034 1.529-.315 2.95c-.352 1.431-1.087 3.127-1.139 4.17-.058 1.16 4.57 1.592 5.194.035.623-1.559 1.303-6.475 1.927-7.306.622-.831-4.94-2.135-5.667.15",fill:"#A4AABA"},null),C("path",{d:"M100.885 277.015l13.306.092s1.291-54.228 1.843-64.056c.552-9.828 3.756-43.13.997-62.788l-12.48-.64-22.725.776s-.433 3.944-1.19 9.921c-.062.493-.677.838-.744 1.358-.075.582.42 1.347.318 1.956-2.35 14.003-6.343 32.926-8.697 46.425-.116.663-1.227 1.004-1.45 2.677-.04.3.21 1.516.112 1.785-6.836 18.643-10.89 47.584-14.2 61.551l14.528-.014s2.185-8.524 4.008-16.878c2.796-12.817 22.987-84.553 22.987-84.553l3-.517 1.037 46.1s-.223 1.228.334 2.008c.558.782-.556 1.117-.39 2.233l.39 1.784s-.446 7.14-.892 11.826c-.446 4.685-.092 38.954-.092 38.954",fill:"#7BB2F9"},null),C("path",{d:"M77.438 220.434c1.146.094 4.016-2.008 6.916-4.91M107.55 223.931s2.758-1.103 6.069-3.862",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M108.459 220.905s2.759-1.104 6.07-3.863",stroke:"#648BD8","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M76.099 223.557s2.608-.587 6.47-3.346M87.33 150.82c-.27 3.088.297 8.478-4.315 9.073M104.829 149.075s.11 13.936-1.286 14.983c-2.207 1.655-2.975 1.934-2.975 1.934M101.014 149.63s.035 12.81-1.19 24.245M94.93 174.965s7.174-1.655 9.38-1.655M75.671 204.754c-.316 1.55-.64 3.067-.973 4.535 0 0-1.45 1.822-1.003 3.756.446 1.934-.943 2.034-4.96 15.273-1.686 5.559-4.464 18.49-6.313 27.447-.078.38-4.018 18.06-4.093 18.423M77.043 196.743a313.269 313.269 0 0 1-.877 4.729M83.908 151.414l-1.19 10.413s-1.091.148-.496 2.23c.111 1.34-2.66 15.692-5.153 30.267M57.58 272.94h13.238",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null),C("path",{d:"M117.377 147.423s-16.955-3.087-35.7.199c.157 2.501-.002 4.128-.002 4.128s14.607-2.802 35.476-.31c.251-2.342.226-4.017.226-4.017",fill:"#192064"},null),C("path",{d:"M107.511 150.353l.004-4.885a.807.807 0 0 0-.774-.81c-2.428-.092-5.04-.108-7.795-.014a.814.814 0 0 0-.784.81l-.003 4.88c0 .456.371.82.827.808a140.76 140.76 0 0 1 7.688.017.81.81 0 0 0 .837-.806",fill:"#FFF"},null),C("path",{d:"M106.402 149.426l.002-3.06a.64.64 0 0 0-.616-.643 94.135 94.135 0 0 0-5.834-.009.647.647 0 0 0-.626.643l-.001 3.056c0 .36.291.648.651.64 1.78-.04 3.708-.041 5.762.012.36.009.662-.279.662-.64",fill:"#192064"},null),C("path",{d:"M101.485 273.933h12.272M102.652 269.075c.006 3.368.04 5.759.11 6.47M102.667 263.125c-.009 1.53-.015 2.98-.016 4.313M102.204 174.024l.893 44.402s.669 1.561-.224 2.677c-.892 1.116 2.455.67.893 2.231-1.562 1.562.893 1.116 0 3.347-.592 1.48-.988 20.987-1.09 34.956",stroke:"#648BD8","stroke-width":"1.051","stroke-linecap":"round","stroke-linejoin":"round"},null)])]),Yfe=t=>{const{componentCls:e,lineHeightHeading3:n,iconCls:i,padding:o,paddingXL:r,paddingXS:a,paddingLG:s,marginXS:l,lineHeight:c}=t;return{[e]:{padding:`${s*2}px ${r}px`,"&-rtl":{direction:"rtl"}},[`${e} ${e}-image`]:{width:t.imageWidth,height:t.imageHeight,margin:"auto"},[`${e} ${e}-icon`]:{marginBottom:s,textAlign:"center",[`& > ${i}`]:{fontSize:t.resultIconFontSize}},[`${e} ${e}-title`]:{color:t.colorTextHeading,fontSize:t.resultTitleFontSize,lineHeight:n,marginBlock:l,textAlign:"center"},[`${e} ${e}-subtitle`]:{color:t.colorTextDescription,fontSize:t.resultSubtitleFontSize,lineHeight:c,textAlign:"center"},[`${e} ${e}-content`]:{marginTop:s,padding:`${s}px ${o*2.5}px`,backgroundColor:t.colorFillAlter},[`${e} ${e}-extra`]:{margin:t.resultExtraMargin,textAlign:"center","& > *":{marginInlineEnd:a,"&:last-child":{marginInlineEnd:0}}}}},Gfe=t=>{const{componentCls:e,iconCls:n}=t;return{[`${e}-success ${e}-icon > ${n}`]:{color:t.resultSuccessIconColor},[`${e}-error ${e}-icon > ${n}`]:{color:t.resultErrorIconColor},[`${e}-info ${e}-icon > ${n}`]:{color:t.resultInfoIconColor},[`${e}-warning ${e}-icon > ${n}`]:{color:t.resultWarningIconColor}}},Kfe=t=>[Yfe(t),Gfe(t)],Ufe=t=>Kfe(t),qfe=et("Result",t=>{const{paddingLG:e,fontSizeHeading3:n}=t,i=t.fontSize,o=`${e}px 0 0 0`,r=t.colorInfo,a=t.colorError,s=t.colorSuccess,l=t.colorWarning,c=Ve(t,{resultTitleFontSize:n,resultSubtitleFontSize:i,resultIconFontSize:n*3,resultExtraMargin:o,resultInfoIconColor:r,resultErrorIconColor:a,resultSuccessIconColor:s,resultWarningIconColor:l});return[Ufe(c)]},{imageWidth:250,imageHeight:295}),Zfe={success:Ho,error:si,info:Wo,warning:yC},uf={404:jfe,500:Vfe,403:Xfe},Jfe=Object.keys(uf),Qfe=()=>({prefixCls:String,icon:Z.any,status:{type:[Number,String],default:"info"},title:Z.any,subTitle:Z.any,extra:Z.any}),ehe=(t,e)=>{let{status:n,icon:i}=e;if(Jfe.includes(`${n}`)){const a=uf[n];return C("div",{class:`${t}-icon ${t}-image`},[C(a,null,null)])}const o=Zfe[n],r=i||C(o,null,null);return C("div",{class:`${t}-icon`},[r])},the=(t,e)=>e&&C("div",{class:`${t}-extra`},[e]),Ps=oe({compatConfig:{MODE:3},name:"AResult",inheritAttrs:!1,props:Qfe(),slots:Object,setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,direction:r}=Me("result",t),[a,s]=qfe(o),l=L(()=>ce(o.value,s.value,`${o.value}-${t.status}`,{[`${o.value}-rtl`]:r.value==="rtl"}));return()=>{var c,u,d,f,h,p,g,m;const v=(c=t.title)!==null&&c!==void 0?c:(u=n.title)===null||u===void 0?void 0:u.call(n),b=(d=t.subTitle)!==null&&d!==void 0?d:(f=n.subTitle)===null||f===void 0?void 0:f.call(n),y=(h=t.icon)!==null&&h!==void 0?h:(p=n.icon)===null||p===void 0?void 0:p.call(n),w=(g=t.extra)!==null&&g!==void 0?g:(m=n.extra)===null||m===void 0?void 0:m.call(n),x=o.value;return a(C("div",H(H({},i),{},{class:[l.value,i.class]}),[ehe(x,{status:t.status,icon:y}),C("div",{class:`${x}-title`},[v]),b&&C("div",{class:`${x}-subtitle`},[b]),the(x,w),n.default&&C("div",{class:`${x}-content`},[n.default()])]))}}});Ps.PRESENTED_IMAGE_403=uf[403];Ps.PRESENTED_IMAGE_404=uf[404];Ps.PRESENTED_IMAGE_500=uf[500];Ps.install=function(t){return t.component(Ps.name,Ps),t};const nhe=Vt(jS),xC=(t,e)=>{let{attrs:n}=e;const{included:i,vertical:o,style:r,class:a}=n;let{length:s,offset:l,reverse:c}=n;s<0&&(c=!c,s=Math.abs(s),l=100-l);const u=o?{[c?"top":"bottom"]:`${l}%`,[c?"bottom":"top"]:"auto",height:`${s}%`}:{[c?"right":"left"]:`${l}%`,[c?"left":"right"]:"auto",width:`${s}%`},d=A(A({},r),u);return i?C("div",{class:a,style:d},null):null};xC.inheritAttrs=!1;const ihe=(t,e,n,i,o,r)=>{const a=Object.keys(e).map(parseFloat).sort((s,l)=>s-l);if(n&&i)for(let s=o;s<=r;s+=i)a.indexOf(s)===-1&&a.push(s);return a},D6=(t,e)=>{let{attrs:n}=e;const{prefixCls:i,vertical:o,reverse:r,marks:a,dots:s,step:l,included:c,lowerBound:u,upperBound:d,max:f,min:h,dotStyle:p,activeDotStyle:g}=n,m=f-h,v=ihe(o,a,s,l,h,f).map(b=>{const y=`${Math.abs(b-h)/m*100}%`,w=!c&&b===d||c&&b<=d&&b>=u;let x=o?A(A({},p),{[r?"top":"bottom"]:y}):A(A({},p),{[r?"right":"left"]:y});w&&(x=A(A({},x),g));const $=ce({[`${i}-dot`]:!0,[`${i}-dot-active`]:w,[`${i}-dot-reverse`]:r});return C("span",{class:$,style:x,key:b},null)});return C("div",{class:`${i}-step`},[v])};D6.inheritAttrs=!1;const R6=(t,e)=>{let{attrs:n,slots:i}=e;const{class:o,vertical:r,reverse:a,marks:s,included:l,upperBound:c,lowerBound:u,max:d,min:f,onClickLabel:h}=n,p=Object.keys(s),g=i.mark,m=d-f,v=p.map(parseFloat).sort((b,y)=>b-y).map(b=>{const y=typeof s[b]=="function"?s[b]():s[b],w=typeof y=="object"&&!cn(y);let x=w?y.label:y;if(!x&&x!==0)return null;g&&(x=g({point:b,label:x}));const $=!l&&b===c||l&&b<=c&&b>=u,S=ce({[`${o}-text`]:!0,[`${o}-text-active`]:$}),_={marginBottom:"-50%",[a?"top":"bottom"]:`${(b-f)/m*100}%`},P={transform:`translateX(${a?"50%":"-50%"})`,msTransform:`translateX(${a?"50%":"-50%"})`,[a?"right":"left"]:`${(b-f)/m*100}%`},O=r?_:P,T=w?A(A({},O),y.style):O,M={[pn?"onTouchstartPassive":"onTouchstart"]:I=>h(I,b)};return C("span",H({class:S,style:T,key:b,onMousedown:I=>h(I,b)},M),[x])});return C("div",{class:o},[v])};R6.inheritAttrs=!1;const L6=oe({compatConfig:{MODE:3},name:"Handle",inheritAttrs:!1,props:{prefixCls:String,vertical:{type:Boolean,default:void 0},offset:Number,disabled:{type:Boolean,default:void 0},min:Number,max:Number,value:Number,tabindex:Z.oneOfType([Z.number,Z.string]),reverse:{type:Boolean,default:void 0},ariaLabel:String,ariaLabelledBy:String,ariaValueTextFormatter:Function,onMouseenter:{type:Function},onMouseleave:{type:Function},onMousedown:{type:Function}},setup(t,e){let{attrs:n,emit:i,expose:o}=e;const r=ie(!1),a=ie(),s=()=>{document.activeElement===a.value&&(r.value=!0)},l=m=>{r.value=!1,i("blur",m)},c=()=>{r.value=!1},u=()=>{var m;(m=a.value)===null||m===void 0||m.focus()},d=()=>{var m;(m=a.value)===null||m===void 0||m.blur()},f=()=>{r.value=!0,u()},h=m=>{m.preventDefault(),u(),i("mousedown",m)};o({focus:u,blur:d,clickFocus:f,ref:a});let p=null;Ze(()=>{p=Gt(document,"mouseup",s)}),at(()=>{p==null||p.remove()});const g=L(()=>{const{vertical:m,offset:v,reverse:b}=t;return m?{[b?"top":"bottom"]:`${v}%`,[b?"bottom":"top"]:"auto",transform:b?null:"translateY(+50%)"}:{[b?"right":"left"]:`${v}%`,[b?"left":"right"]:"auto",transform:`translateX(${b?"+":"-"}50%)`}});return()=>{const{prefixCls:m,disabled:v,min:b,max:y,value:w,tabindex:x,ariaLabel:$,ariaLabelledBy:S,ariaValueTextFormatter:_,onMouseenter:P,onMouseleave:O}=t,T=ce(n.class,{[`${m}-handle-click-focused`]:r.value}),M={"aria-valuemin":b,"aria-valuemax":y,"aria-valuenow":w,"aria-disabled":!!v},I=[n.style,g.value];let k=x||0;(v||x===null)&&(k=null);let E;_&&(E=_(w));const R=A(A(A(A({},n),{role:"slider",tabindex:k}),M),{class:T,onBlur:l,onKeydown:c,onMousedown:h,onMouseenter:P,onMouseleave:O,ref:a,style:I});return C("div",H(H({},R),{},{"aria-label":$,"aria-labelledby":S,"aria-valuetext":E}),null)}}});function Zb(t,e){try{return Object.keys(e).some(n=>t.target===e[n].ref)}catch{return!1}}function F6(t,e){let{min:n,max:i}=e;return ti}function DT(t){return t.touches.length>1||t.type.toLowerCase()==="touchend"&&t.touches.length>0}function RT(t,e){let{marks:n,step:i,min:o,max:r}=e;const a=Object.keys(n).map(parseFloat);if(i!==null){const l=Math.pow(10,N6(i)),c=Math.floor((r*l-o*l)/(i*l)),u=Math.min((t-o)/i,c),d=Math.round(u)*i+o;a.push(d)}const s=a.map(l=>Math.abs(t-l));return a[s.indexOf(Math.min(...s))]}function N6(t){const e=t.toString();let n=0;return e.indexOf(".")>=0&&(n=e.length-e.indexOf(".")-1),n}function LT(t,e){let n=1;return window.visualViewport&&(n=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(t?e.clientY:e.pageX)/n}function FT(t,e){let n=1;return window.visualViewport&&(n=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(t?e.touches[0].clientY:e.touches[0].pageX)/n}function NT(t,e){const n=e.getBoundingClientRect();return t?n.top+n.height*.5:window.scrollX+n.left+n.width*.5}function wC(t,e){let{max:n,min:i}=e;return t<=i?i:t>=n?n:t}function B6(t,e){const{step:n}=e,i=isFinite(RT(t,e))?RT(t,e):0;return n===null?i:parseFloat(i.toFixed(N6(n)))}function gc(t){t.stopPropagation(),t.preventDefault()}function ohe(t,e,n){const i={increase:(a,s)=>a+s,decrease:(a,s)=>a-s},o=i[t](Object.keys(n.marks).indexOf(JSON.stringify(e)),1),r=Object.keys(n.marks)[o];return n.step?i[t](e,n.step):Object.keys(n.marks).length&&n.marks[r]?n.marks[r]:e}function z6(t,e,n){const i="increase",o="decrease";let r=i;switch(t.keyCode){case Te.UP:r=e&&n?o:i;break;case Te.RIGHT:r=!e&&n?o:i;break;case Te.DOWN:r=e&&n?i:o;break;case Te.LEFT:r=!e&&n?i:o;break;case Te.END:return(a,s)=>s.max;case Te.HOME:return(a,s)=>s.min;case Te.PAGE_UP:return(a,s)=>a+s.step*2;case Te.PAGE_DOWN:return(a,s)=>a-s.step*2;default:return}return(a,s)=>ohe(r,a,s)}var rhe=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{this.document=this.sliderRef&&this.sliderRef.ownerDocument;const{autofocus:n,disabled:i}=this;n&&!i&&this.focus()})},beforeUnmount(){this.$nextTick(()=>{this.removeDocumentEvents()})},methods:{defaultHandle(n){var{index:i,directives:o,className:r,style:a}=n,s=rhe(n,["index","directives","className","style"]);if(delete s.dragging,s.value===null)return null;const l=A(A({},s),{class:r,style:a,key:i});return C(L6,l,null)},onDown(n,i){let o=i;const{draggableTrack:r,vertical:a}=this.$props,{bounds:s}=this.$data,l=r&&this.positionGetValue?this.positionGetValue(o)||[]:[],c=Zb(n,this.handlesRefs);if(this.dragTrack=r&&s.length>=2&&!c&&!l.map((u,d)=>{const f=d?!0:u>=s[d];return d===l.length-1?u<=s[d]:f}).some(u=>!u),this.dragTrack)this.dragOffset=o,this.startBounds=[...s];else{if(!c)this.dragOffset=0;else{const u=NT(a,n.target);this.dragOffset=o-u,o=u}this.onStart(o)}},onMouseDown(n){if(n.button!==0)return;this.removeDocumentEvents();const i=this.$props.vertical,o=LT(i,n);this.onDown(n,o),this.addDocumentMouseEvents()},onTouchStart(n){if(DT(n))return;const i=this.vertical,o=FT(i,n);this.onDown(n,o),this.addDocumentTouchEvents(),gc(n)},onFocus(n){const{vertical:i}=this;if(Zb(n,this.handlesRefs)&&!this.dragTrack){const o=NT(i,n.target);this.dragOffset=0,this.onStart(o),gc(n),this.$emit("focus",n)}},onBlur(n){this.dragTrack||this.onEnd(),this.$emit("blur",n)},onMouseUp(){this.handlesRefs[this.prevMovedHandleIndex]&&this.handlesRefs[this.prevMovedHandleIndex].clickFocus()},onMouseMove(n){if(!this.sliderRef){this.onEnd();return}const i=LT(this.vertical,n);this.onMove(n,i-this.dragOffset,this.dragTrack,this.startBounds)},onTouchMove(n){if(DT(n)||!this.sliderRef){this.onEnd();return}const i=FT(this.vertical,n);this.onMove(n,i-this.dragOffset,this.dragTrack,this.startBounds)},onKeyDown(n){this.sliderRef&&Zb(n,this.handlesRefs)&&this.onKeyboard(n)},onClickMarkLabel(n,i){n.stopPropagation(),this.onChange({sValue:i}),this.setState({sValue:i},()=>this.onEnd(!0))},getSliderStart(){const n=this.sliderRef,{vertical:i,reverse:o}=this,r=n.getBoundingClientRect();return i?o?r.bottom:r.top:window.scrollX+(o?r.right:r.left)},getSliderLength(){const n=this.sliderRef;if(!n)return 0;const i=n.getBoundingClientRect();return this.vertical?i.height:i.width},addDocumentTouchEvents(){this.onTouchMoveListener=Gt(this.document,"touchmove",this.onTouchMove),this.onTouchUpListener=Gt(this.document,"touchend",this.onEnd)},addDocumentMouseEvents(){this.onMouseMoveListener=Gt(this.document,"mousemove",this.onMouseMove),this.onMouseUpListener=Gt(this.document,"mouseup",this.onEnd)},removeDocumentEvents(){this.onTouchMoveListener&&this.onTouchMoveListener.remove(),this.onTouchUpListener&&this.onTouchUpListener.remove(),this.onMouseMoveListener&&this.onMouseMoveListener.remove(),this.onMouseUpListener&&this.onMouseUpListener.remove()},focus(){var n;this.$props.disabled||(n=this.handlesRefs[0])===null||n===void 0||n.focus()},blur(){this.$props.disabled||Object.keys(this.handlesRefs).forEach(n=>{var i,o;(o=(i=this.handlesRefs[n])===null||i===void 0?void 0:i.blur)===null||o===void 0||o.call(i)})},calcValue(n){const{vertical:i,min:o,max:r}=this,a=Math.abs(Math.max(n,0)/this.getSliderLength());return i?(1-a)*(r-o)+o:a*(r-o)+o},calcValueByPos(n){const o=(this.reverse?-1:1)*(n-this.getSliderStart());return this.trimAlignValue(this.calcValue(o))},calcOffset(n){const{min:i,max:o}=this,r=(n-i)/(o-i);return Math.max(0,r*100)},saveSlider(n){this.sliderRef=n},saveHandle(n,i){this.handlesRefs[n]=i}},render(){const{prefixCls:n,marks:i,dots:o,step:r,included:a,disabled:s,vertical:l,reverse:c,min:u,max:d,maximumTrackStyle:f,railStyle:h,dotStyle:p,activeDotStyle:g,id:m}=this,{class:v,style:b}=this.$attrs,{tracks:y,handles:w}=this.renderSlider(),x=ce(n,v,{[`${n}-with-marks`]:Object.keys(i).length,[`${n}-disabled`]:s,[`${n}-vertical`]:l,[`${n}-horizontal`]:!l}),$={vertical:l,marks:i,included:a,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:d,min:u,reverse:c,class:`${n}-mark`,onClickLabel:s?Ua:this.onClickMarkLabel},S={[pn?"onTouchstartPassive":"onTouchstart"]:s?Ua:this.onTouchStart};return C("div",H(H({id:m,ref:this.saveSlider,tabindex:"-1",class:x},S),{},{onMousedown:s?Ua:this.onMouseDown,onMouseup:s?Ua:this.onMouseUp,onKeydown:s?Ua:this.onKeyDown,onFocus:s?Ua:this.onFocus,onBlur:s?Ua:this.onBlur,style:b}),[C("div",{class:`${n}-rail`,style:A(A({},f),h)},null),y,C(D6,{prefixCls:n,vertical:l,reverse:c,marks:i,dots:o,step:r,included:a,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:d,min:u,dotStyle:p,activeDotStyle:g},null),w,C(R6,$,{mark:this.$slots.mark}),rm(this)])}})}const ahe=oe({compatConfig:{MODE:3},name:"Slider",mixins:[el],inheritAttrs:!1,props:{defaultValue:Number,value:Number,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},tabindex:Z.oneOfType([Z.number,Z.string]),reverse:{type:Boolean,default:void 0},min:Number,max:Number,ariaLabelForHandle:String,ariaLabelledByForHandle:String,ariaValueTextFormatterForHandle:String,startPoint:Number},emits:["beforeChange","afterChange","change"],data(){const t=this.defaultValue!==void 0?this.defaultValue:this.min,e=this.value!==void 0?this.value:t;return{sValue:this.trimAlignValue(e),dragging:!1}},watch:{value:{handler(t){this.setChangeValue(t)},deep:!0},min(){const{sValue:t}=this;this.setChangeValue(t)},max(){const{sValue:t}=this;this.setChangeValue(t)}},methods:{setChangeValue(t){const e=t!==void 0?t:this.sValue,n=this.trimAlignValue(e,this.$props);n!==this.sValue&&(this.setState({sValue:n}),F6(e,this.$props)&&this.$emit("change",n))},onChange(t){const e=!Ar(this,"value"),n=t.sValue>this.max?A(A({},t),{sValue:this.max}):t;e&&this.setState(n);const i=n.sValue;this.$emit("change",i)},onStart(t){this.setState({dragging:!0});const{sValue:e}=this;this.$emit("beforeChange",e);const n=this.calcValueByPos(t);this.startValue=n,this.startPosition=t,n!==e&&(this.prevMovedHandleIndex=0,this.onChange({sValue:n}))},onEnd(t){const{dragging:e}=this;this.removeDocumentEvents(),(e||t)&&this.$emit("afterChange",this.sValue),this.setState({dragging:!1})},onMove(t,e){gc(t);const{sValue:n}=this,i=this.calcValueByPos(e);i!==n&&this.onChange({sValue:i})},onKeyboard(t){const{reverse:e,vertical:n}=this.$props,i=z6(t,n,e);if(i){gc(t);const{sValue:o}=this,r=i(o,this.$props),a=this.trimAlignValue(r);if(a===o)return;this.onChange({sValue:a}),this.$emit("afterChange",a),this.onEnd()}},getLowerBound(){const t=this.$props.startPoint||this.$props.min;return this.$data.sValue>t?t:this.$data.sValue},getUpperBound(){return this.$data.sValue1&&arguments[1]!==void 0?arguments[1]:{};if(t===null)return null;const n=A(A({},this.$props),e),i=wC(t,n);return B6(i,n)},getTrack(t){let{prefixCls:e,reverse:n,vertical:i,included:o,minimumTrackStyle:r,mergedTrackStyle:a,length:s,offset:l}=t;return C(xC,{class:`${e}-track`,vertical:i,included:o,offset:l,reverse:n,length:s,style:A(A({},r),a)},null)},renderSlider(){const{prefixCls:t,vertical:e,included:n,disabled:i,minimumTrackStyle:o,trackStyle:r,handleStyle:a,tabindex:s,ariaLabelForHandle:l,ariaLabelledByForHandle:c,ariaValueTextFormatterForHandle:u,min:d,max:f,startPoint:h,reverse:p,handle:g,defaultHandle:m}=this,v=g||m,{sValue:b,dragging:y}=this,w=this.calcOffset(b),x=v({class:`${t}-handle`,prefixCls:t,vertical:e,offset:w,value:b,dragging:y,disabled:i,min:d,max:f,reverse:p,index:0,tabindex:s,ariaLabel:l,ariaLabelledBy:c,ariaValueTextFormatter:u,style:a[0]||a,ref:_=>this.saveHandle(0,_),onFocus:this.onFocus,onBlur:this.onBlur}),$=h!==void 0?this.calcOffset(h):0,S=r[0]||r;return{tracks:this.getTrack({prefixCls:t,reverse:p,vertical:e,included:n,offset:$,minimumTrackStyle:o,mergedTrackStyle:S,length:w-$}),handles:x}}}}),she=H6(ahe),tu=t=>{let{value:e,handle:n,bounds:i,props:o}=t;const{allowCross:r,pushable:a}=o,s=Number(a),l=wC(e,o);let c=l;return!r&&n!=null&&i!==void 0&&(n>0&&l<=i[n-1]+s&&(c=i[n-1]+s),n=i[n+1]-s&&(c=i[n+1]-s)),B6(c,o)},lhe={defaultValue:Z.arrayOf(Z.number),value:Z.arrayOf(Z.number),count:Number,pushable:HD(Z.oneOfType([Z.looseBool,Z.number])),allowCross:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},reverse:{type:Boolean,default:void 0},tabindex:Z.arrayOf(Z.number),prefixCls:String,min:Number,max:Number,autofocus:{type:Boolean,default:void 0},ariaLabelGroupForHandles:Array,ariaLabelledByGroupForHandles:Array,ariaValueTextFormatterGroupForHandles:Array,draggableTrack:{type:Boolean,default:void 0}},che=oe({compatConfig:{MODE:3},name:"Range",mixins:[el],inheritAttrs:!1,props:ct(lhe,{count:1,allowCross:!0,pushable:!1,tabindex:[],draggableTrack:!1,ariaLabelGroupForHandles:[],ariaLabelledByGroupForHandles:[],ariaValueTextFormatterGroupForHandles:[]}),emits:["beforeChange","afterChange","change"],displayName:"Range",data(){const{count:t,min:e,max:n}=this,i=Array(...Array(t+1)).map(()=>e),o=Ar(this,"defaultValue")?this.defaultValue:i;let{value:r}=this;r===void 0&&(r=o);const a=r.map((l,c)=>tu({value:l,handle:c,props:this.$props}));return{sHandle:null,recent:a[0]===n?0:a.length-1,bounds:a}},watch:{value:{handler(t){const{bounds:e}=this;this.setChangeValue(t||e)},deep:!0},min(){const{value:t}=this;this.setChangeValue(t||this.bounds)},max(){const{value:t}=this;this.setChangeValue(t||this.bounds)}},methods:{setChangeValue(t){const{bounds:e}=this;let n=t.map((i,o)=>tu({value:i,handle:o,bounds:e,props:this.$props}));if(e.length===n.length){if(n.every((i,o)=>i===e[o]))return null}else n=t.map((i,o)=>tu({value:i,handle:o,props:this.$props}));if(this.setState({bounds:n}),t.some(i=>F6(i,this.$props))){const i=t.map(o=>wC(o,this.$props));this.$emit("change",i)}},onChange(t){if(!Ar(this,"value"))this.setState(t);else{const o={};["sHandle","recent"].forEach(r=>{t[r]!==void 0&&(o[r]=t[r])}),Object.keys(o).length&&this.setState(o)}const i=A(A({},this.$data),t).bounds;this.$emit("change",i)},positionGetValue(t){const e=this.getValue(),n=this.calcValueByPos(t),i=this.getClosestBound(n),o=this.getBoundNeedMoving(n,i),r=e[o];if(n===r)return null;const a=[...e];return a[o]=n,a},onStart(t){const{bounds:e}=this;this.$emit("beforeChange",e);const n=this.calcValueByPos(t);this.startValue=n,this.startPosition=t;const i=this.getClosestBound(n);this.prevMovedHandleIndex=this.getBoundNeedMoving(n,i),this.setState({sHandle:this.prevMovedHandleIndex,recent:this.prevMovedHandleIndex});const o=e[this.prevMovedHandleIndex];if(n===o)return;const r=[...e];r[this.prevMovedHandleIndex]=n,this.onChange({bounds:r})},onEnd(t){const{sHandle:e}=this;this.removeDocumentEvents(),e||(this.dragTrack=!1),(e!==null||t)&&this.$emit("afterChange",this.bounds),this.setState({sHandle:null})},onMove(t,e,n,i){gc(t);const{$data:o,$props:r}=this,a=r.max||100,s=r.min||0;if(n){let f=r.vertical?-e:e;f=r.reverse?-f:f;const h=a-Math.max(...i),p=s-Math.min(...i),g=Math.min(Math.max(f/(this.getSliderLength()/100),p),h),m=i.map(v=>Math.floor(Math.max(Math.min(v+g,a),s)));o.bounds.map((v,b)=>v===m[b]).some(v=>!v)&&this.onChange({bounds:m});return}const{bounds:l,sHandle:c}=this,u=this.calcValueByPos(e),d=l[c];u!==d&&this.moveTo(u)},onKeyboard(t){const{reverse:e,vertical:n}=this.$props,i=z6(t,n,e);if(i){gc(t);const{bounds:o,sHandle:r}=this,a=o[r===null?this.recent:r],s=i(a,this.$props),l=tu({value:s,handle:r,bounds:o,props:this.$props});if(l===a)return;this.moveTo(l,!0)}},getClosestBound(t){const{bounds:e}=this;let n=0;for(let i=1;i=e[i]&&(n=i);return Math.abs(e[n+1]-t)s-l),this.internalPointsCache={marks:t,step:e,points:a}}return this.internalPointsCache.points},moveTo(t,e){const n=[...this.bounds],{sHandle:i,recent:o}=this,r=i===null?o:i;n[r]=t;let a=r;this.$props.pushable!==!1?this.pushSurroundingHandles(n,a):this.$props.allowCross&&(n.sort((s,l)=>s-l),a=n.indexOf(t)),this.onChange({recent:a,sHandle:a,bounds:n}),e&&(this.$emit("afterChange",n),this.setState({},()=>{this.handlesRefs[a].focus()}),this.onEnd())},pushSurroundingHandles(t,e){const n=t[e],{pushable:i}=this,o=Number(i);let r=0;if(t[e+1]-n=i.length||r<0)return!1;const a=e+n,s=i[r],{pushable:l}=this,c=Number(l),u=n*(t[a]-s);return this.pushHandle(t,a,n,c-u)?(t[e]=s,!0):!1},trimAlignValue(t){const{sHandle:e,bounds:n}=this;return tu({value:t,handle:e,bounds:n,props:this.$props})},ensureValueNotConflict(t,e,n){let{allowCross:i,pushable:o}=n;const r=this.$data||{},{bounds:a}=r;if(t=t===void 0?r.sHandle:t,o=Number(o),!i&&t!=null&&a!==void 0){if(t>0&&e<=a[t-1]+o)return a[t-1]+o;if(t=a[t+1]-o)return a[t+1]-o}return e},getTrack(t){let{bounds:e,prefixCls:n,reverse:i,vertical:o,included:r,offsets:a,trackStyle:s}=t;return e.slice(0,-1).map((l,c)=>{const u=c+1,d=ce({[`${n}-track`]:!0,[`${n}-track-${u}`]:!0});return C(xC,{class:d,vertical:o,reverse:i,included:r,offset:a[u-1],length:a[u]-a[u-1],style:s[c],key:u},null)})},renderSlider(){const{sHandle:t,bounds:e,prefixCls:n,vertical:i,included:o,disabled:r,min:a,max:s,reverse:l,handle:c,defaultHandle:u,trackStyle:d,handleStyle:f,tabindex:h,ariaLabelGroupForHandles:p,ariaLabelledByGroupForHandles:g,ariaValueTextFormatterGroupForHandles:m}=this,v=c||u,b=e.map(x=>this.calcOffset(x)),y=`${n}-handle`,w=e.map((x,$)=>{let S=h[$]||0;(r||h[$]===null)&&(S=null);const _=t===$;return v({class:ce({[y]:!0,[`${y}-${$+1}`]:!0,[`${y}-dragging`]:_}),prefixCls:n,vertical:i,dragging:_,offset:b[$],value:x,index:$,tabindex:S,min:a,max:s,reverse:l,disabled:r,style:f[$],ref:P=>this.saveHandle($,P),onFocus:this.onFocus,onBlur:this.onBlur,ariaLabel:p[$],ariaLabelledBy:g[$],ariaValueTextFormatter:m[$]})});return{tracks:this.getTrack({bounds:e,prefixCls:n,reverse:l,vertical:i,included:o,offsets:b,trackStyle:d}),handles:w}}}}),uhe=H6(che),dhe=oe({compatConfig:{MODE:3},name:"SliderTooltip",inheritAttrs:!1,props:l3(),setup(t,e){let{attrs:n,slots:i}=e;const o=se(null),r=se(null);function a(){lt.cancel(r.value),r.value=null}function s(){r.value=lt(()=>{var c;(c=o.value)===null||c===void 0||c.forcePopupAlign(),r.value=null})}const l=()=>{a(),t.open&&s()};return ye([()=>t.open,()=>t.title],()=>{l()},{flush:"post",immediate:!0}),Zg(()=>{l()}),at(()=>{a()}),()=>C(Pi,H(H({ref:o},t),n),i)}}),fhe=t=>{const{componentCls:e,controlSize:n,dotSize:i,marginFull:o,marginPart:r,colorFillContentHover:a}=t;return{[e]:A(A({},rt(t)),{position:"relative",height:n,margin:`${r}px ${o}px`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${o}px ${r}px`},[`${e}-rail`]:{position:"absolute",backgroundColor:t.colorFillTertiary,borderRadius:t.borderRadiusXS,transition:`background-color ${t.motionDurationMid}`},[`${e}-track`]:{position:"absolute",backgroundColor:t.colorPrimaryBorder,borderRadius:t.borderRadiusXS,transition:`background-color ${t.motionDurationMid}`},"&:hover":{[`${e}-rail`]:{backgroundColor:t.colorFillSecondary},[`${e}-track`]:{backgroundColor:t.colorPrimaryBorderHover},[`${e}-dot`]:{borderColor:a},[`${e}-handle::after`]:{boxShadow:`0 0 0 ${t.handleLineWidth}px ${t.colorPrimaryBorderHover}`},[`${e}-dot-active`]:{borderColor:t.colorPrimary}},[`${e}-handle`]:{position:"absolute",width:t.handleSize,height:t.handleSize,outline:"none",[`${e}-dragging`]:{zIndex:1},"&::before":{content:'""',position:"absolute",insetInlineStart:-t.handleLineWidth,insetBlockStart:-t.handleLineWidth,width:t.handleSize+t.handleLineWidth*2,height:t.handleSize+t.handleLineWidth*2,backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:t.handleSize,height:t.handleSize,backgroundColor:t.colorBgElevated,boxShadow:`0 0 0 ${t.handleLineWidth}px ${t.colorPrimaryBorder}`,borderRadius:"50%",cursor:"pointer",transition:` inset-inline-start ${t.motionDurationMid}, inset-block-start ${t.motionDurationMid}, width ${t.motionDurationMid}, @@ -408,7 +408,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `]:{backgroundColor:t.colorBgElevated,borderColor:t.colorTextDisabled,boxShadow:"none",cursor:"not-allowed"},[`${e}-handle::after`]:{backgroundColor:t.colorBgElevated,cursor:"not-allowed",width:t.handleSize,height:t.handleSize,boxShadow:`0 0 0 ${t.handleLineWidth}px ${new Ot(t.colorTextDisabled).onBackground(t.colorBgContainer).toHexString()}`,insetInlineStart:0,insetBlockStart:0},[` ${e}-mark-text, ${e}-dot - `]:{cursor:"not-allowed !important"}}})}},W6=(t,e)=>{const{componentCls:n,railSize:i,handleSize:o,dotSize:r}=t,a=e?"paddingBlock":"paddingInline",s=e?"width":"height",l=e?"height":"width",c=e?"insetBlockStart":"insetInlineStart",u=e?"top":"insetInlineStart";return{[a]:i,[l]:i*3,[`${n}-rail`]:{[s]:"100%",[l]:i},[`${n}-track`]:{[l]:i},[`${n}-handle`]:{[c]:(i*3-o)/2},[`${n}-mark`]:{insetInlineStart:0,top:0,[u]:o,[s]:"100%"},[`${n}-step`]:{insetInlineStart:0,top:0,[u]:i,[s]:"100%",[l]:i},[`${n}-dot`]:{position:"absolute",[c]:(i-r)/2}}},hhe=t=>{const{componentCls:e,marginPartWithMark:n}=t;return{[`${e}-horizontal`]:A(A({},W6(t,!0)),{[`&${e}-with-marks`]:{marginBottom:n}})}},phe=t=>{const{componentCls:e}=t;return{[`${e}-vertical`]:A(A({},W6(t,!1)),{height:"100%"})}},ghe=et("Slider",t=>{const e=Ve(t,{marginPart:(t.controlHeight-t.controlSize)/2,marginFull:t.controlSize/2,marginPartWithMark:t.controlHeightLG-t.controlSize});return[fhe(e),hhe(e),phe(e)]},t=>{const n=t.controlHeightLG/4,i=t.controlHeightSM/2,o=t.lineWidth+1,r=t.lineWidth+1*3;return{controlSize:n,railSize:4,handleSize:n,handleSizeHover:i,dotSize:8,handleLineWidth:o,handleLineWidthHover:r}});var BT=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);otypeof t=="number"?t.toString():"",vhe=()=>({id:String,prefixCls:String,tooltipPrefixCls:String,range:Xe([Boolean,Object]),reverse:Ce(),min:Number,max:Number,step:Xe([Object,Number]),marks:Fe(),dots:Ce(),value:Xe([Array,Number]),defaultValue:Xe([Array,Number]),included:Ce(),disabled:Ce(),vertical:Ce(),tipFormatter:Xe([Function,Object],()=>mhe),tooltipOpen:Ce(),tooltipVisible:Ce(),tooltipPlacement:Ne(),getTooltipPopupContainer:ve(),autofocus:Ce(),handleStyle:Xe([Array,Object]),trackStyle:Xe([Array,Object]),onChange:ve(),onAfterChange:ve(),onFocus:ve(),onBlur:ve(),"onUpdate:value":ve()}),bhe=oe({compatConfig:{MODE:3},name:"ASlider",inheritAttrs:!1,props:vhe(),slots:Object,setup(t,e){let{attrs:n,slots:i,emit:o,expose:r}=e;const{prefixCls:a,rootPrefixCls:s,direction:l,getPopupContainer:c,configProvider:u}=Me("slider",t),[d,f]=ghe(a),h=vn(),p=se(),g=se({}),m=(S,_)=>{g.value[S]=_},v=L(()=>t.tooltipPlacement?t.tooltipPlacement:t.vertical?l.value==="rtl"?"left":"right":"top"),b=()=>{var S;(S=p.value)===null||S===void 0||S.focus()},y=()=>{var S;(S=p.value)===null||S===void 0||S.blur()},w=S=>{o("update:value",S),o("change",S),h.onFieldChange()},x=S=>{o("blur",S)};r({focus:b,blur:y});const $=S=>{var{tooltipPrefixCls:_}=S,P=S.info,{value:O,dragging:T,index:M}=P,I=BT(P,["value","dragging","index"]);const{tipFormatter:k,tooltipOpen:E=t.tooltipVisible,getTooltipPopupContainer:R}=t,D=k?g.value[M]||T:!1,F=E||E===void 0&&D;return C(dhe,{prefixCls:_,title:k?k(O):"",open:F,placement:v.value,transitionName:`${s.value}-zoom-down`,key:M,overlayClassName:`${a.value}-tooltip`,getPopupContainer:R||(c==null?void 0:c.value)},{default:()=>[C(L6,H(H({},I),{},{value:O,onMouseenter:()=>m(M,!0),onMouseleave:()=>m(M,!1)}),null)]})};return()=>{const{tooltipPrefixCls:S,range:_,id:P=h.id.value}=t,O=BT(t,["tooltipPrefixCls","range","id"]),T=u.getPrefixCls("tooltip",S),M=ce(n.class,{[`${a.value}-rtl`]:l.value==="rtl"},f.value);l.value==="rtl"&&!O.vertical&&(O.reverse=!O.reverse);let I;return typeof _=="object"&&(I=_.draggableTrack),d(_?C(uhe,H(H(H({},n),O),{},{step:O.step,draggableTrack:I,class:M,ref:p,handle:k=>$({tooltipPrefixCls:T,prefixCls:a.value,info:k}),prefixCls:a.value,onChange:w,onBlur:x}),{mark:i.mark}):C(she,H(H(H({},n),O),{},{id:P,step:O.step,class:M,ref:p,handle:k=>$({tooltipPrefixCls:T,prefixCls:a.value,info:k}),prefixCls:a.value,onChange:w,onBlur:x}),{mark:i.mark}))}}}),yhe=Vt(bhe);function zT(t){return typeof t=="string"}function xhe(){}const j6=()=>({prefixCls:String,itemWidth:String,active:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},status:Ne(),iconPrefix:String,icon:Z.any,adjustMarginRight:String,stepNumber:Number,stepIndex:Number,description:Z.any,title:Z.any,subTitle:Z.any,progressDot:HD(Z.oneOfType([Z.looseBool,Z.func])),tailContent:Z.any,icons:Z.shape({finish:Z.any,error:Z.any}).loose,onClick:ve(),onStepClick:ve(),stepIcon:ve(),itemRender:ve(),__legacy:Ce()}),V6=oe({compatConfig:{MODE:3},name:"Step",inheritAttrs:!1,props:j6(),setup(t,e){let{slots:n,emit:i,attrs:o}=e;const r=s=>{i("click",s),i("stepClick",t.stepIndex)},a=s=>{let{icon:l,title:c,description:u}=s;const{prefixCls:d,stepNumber:f,status:h,iconPrefix:p,icons:g,progressDot:m=n.progressDot,stepIcon:v=n.stepIcon}=t;let b;const y=ce(`${d}-icon`,`${p}icon`,{[`${p}icon-${l}`]:l&&zT(l),[`${p}icon-check`]:!l&&h==="finish"&&(g&&!g.finish||!g),[`${p}icon-cross`]:!l&&h==="error"&&(g&&!g.error||!g)}),w=C("span",{class:`${d}-icon-dot`},null);return m?typeof m=="function"?b=C("span",{class:`${d}-icon`},[m({iconDot:w,index:f-1,status:h,title:c,description:u,prefixCls:d})]):b=C("span",{class:`${d}-icon`},[w]):l&&!zT(l)?b=C("span",{class:`${d}-icon`},[l]):g&&g.finish&&h==="finish"?b=C("span",{class:`${d}-icon`},[g.finish]):g&&g.error&&h==="error"?b=C("span",{class:`${d}-icon`},[g.error]):l||h==="finish"||h==="error"?b=C("span",{class:y},null):b=C("span",{class:`${d}-icon`},[f]),v&&(b=v({index:f-1,status:h,title:c,description:u,node:b})),b};return()=>{var s,l,c,u;const{prefixCls:d,itemWidth:f,active:h,status:p="wait",tailContent:g,adjustMarginRight:m,disabled:v,title:b=(s=n.title)===null||s===void 0?void 0:s.call(n),description:y=(l=n.description)===null||l===void 0?void 0:l.call(n),subTitle:w=(c=n.subTitle)===null||c===void 0?void 0:c.call(n),icon:x=(u=n.icon)===null||u===void 0?void 0:u.call(n),onClick:$,onStepClick:S}=t,_=p||"wait",P=ce(`${d}-item`,`${d}-item-${_}`,{[`${d}-item-custom`]:x,[`${d}-item-active`]:h,[`${d}-item-disabled`]:v===!0}),O={};f&&(O.width=f),m&&(O.marginRight=m);const T={onClick:$||xhe};S&&!v&&(T.role="button",T.tabindex=0,T.onClick=r);const M=C("div",H(H({},ht(o,["__legacy"])),{},{class:[P,o.class],style:[o.style,O]}),[C("div",H(H({},T),{},{class:`${d}-item-container`}),[C("div",{class:`${d}-item-tail`},[g]),C("div",{class:`${d}-item-icon`},[a({icon:x,title:b,description:y})]),C("div",{class:`${d}-item-content`},[C("div",{class:`${d}-item-title`},[b,w&&C("div",{title:typeof w=="string"?w:void 0,class:`${d}-item-subtitle`},[w])]),y&&C("div",{class:`${d}-item-description`},[y])])])]);return t.itemRender?t.itemRender(M):M}}});var whe=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o[]),icons:Z.shape({finish:Z.any,error:Z.any}).loose,stepIcon:ve(),isInline:Z.looseBool,itemRender:ve()},emits:["change"],setup(t,e){let{slots:n,emit:i}=e;const o=s=>{const{current:l}=t;l!==s&&i("change",s)},r=(s,l,c)=>{const{prefixCls:u,iconPrefix:d,status:f,current:h,initial:p,icons:g,stepIcon:m=n.stepIcon,isInline:v,itemRender:b,progressDot:y=n.progressDot}=t,w=v||y,x=A(A({},s),{class:""}),$=p+l,S={active:$===h,stepNumber:$+1,stepIndex:$,key:$,prefixCls:u,iconPrefix:d,progressDot:w,stepIcon:m,icons:g,onStepClick:o};return f==="error"&&l===h-1&&(x.class=`${u}-next-error`),x.status||($===h?x.status=f:$b(x,_)),C(V6,H(H(H({},x),S),{},{__legacy:!1}),null))},a=(s,l)=>r(A({},s.props),l,c=>At(s,c));return()=>{var s;const{prefixCls:l,direction:c,type:u,labelPlacement:d,iconPrefix:f,status:h,size:p,current:g,progressDot:m=n.progressDot,initial:v,icons:b,items:y,isInline:w,itemRender:x}=t,$=whe(t,["prefixCls","direction","type","labelPlacement","iconPrefix","status","size","current","progressDot","initial","icons","items","isInline","itemRender"]),S=u==="navigation",_=w||m,P=w?"horizontal":c,O=w?void 0:p,T=_?"vertical":d,M=ce(l,`${l}-${c}`,{[`${l}-${O}`]:O,[`${l}-label-${T}`]:P==="horizontal",[`${l}-dot`]:!!_,[`${l}-navigation`]:S,[`${l}-inline`]:w});return C("div",H({class:M},$),[y.filter(I=>I).map((I,k)=>r(I,k)),Kt((s=n.default)===null||s===void 0?void 0:s.call(n)).map(a)])}}}),Che=t=>{const{componentCls:e,stepsIconCustomTop:n,stepsIconCustomSize:i,stepsIconCustomFontSize:o}=t;return{[`${e}-item-custom`]:{[`> ${e}-item-container > ${e}-item-icon`]:{height:"auto",background:"none",border:0,[`> ${e}-icon`]:{top:n,width:i,height:i,fontSize:o,lineHeight:`${i}px`}}},[`&:not(${e}-vertical)`]:{[`${e}-item-custom`]:{[`${e}-item-icon`]:{width:"auto",background:"none"}}}}},$he=t=>{const{componentCls:e,stepsIconSize:n,lineHeight:i,stepsSmallIconSize:o}=t;return{[`&${e}-label-vertical`]:{[`${e}-item`]:{overflow:"visible","&-tail":{marginInlineStart:n/2+t.controlHeightLG,padding:`${t.paddingXXS}px ${t.paddingLG}px`},"&-content":{display:"block",width:(n/2+t.controlHeightLG)*2,marginTop:t.marginSM,textAlign:"center"},"&-icon":{display:"inline-block",marginInlineStart:t.controlHeightLG},"&-title":{paddingInlineEnd:0,paddingInlineStart:0,"&::after":{display:"none"}},"&-subtitle":{display:"block",marginBottom:t.marginXXS,marginInlineStart:0,lineHeight:i}},[`&${e}-small:not(${e}-dot)`]:{[`${e}-item`]:{"&-icon":{marginInlineStart:t.controlHeightLG+(n-o)/2}}}}}},Ahe=t=>{const{componentCls:e,stepsNavContentMaxWidth:n,stepsNavArrowColor:i,stepsNavActiveColor:o,motionDurationSlow:r}=t;return{[`&${e}-navigation`]:{paddingTop:t.paddingSM,[`&${e}-small`]:{[`${e}-item`]:{"&-container":{marginInlineStart:-t.marginSM}}},[`${e}-item`]:{overflow:"visible",textAlign:"center","&-container":{display:"inline-block",height:"100%",marginInlineStart:-t.margin,paddingBottom:t.paddingSM,textAlign:"start",transition:`opacity ${r}`,[`${e}-item-content`]:{maxWidth:n},[`${e}-item-title`]:A(A({maxWidth:"100%",paddingInlineEnd:0},un),{"&::after":{display:"none"}})},[`&:not(${e}-item-active)`]:{[`${e}-item-container[role='button']`]:{cursor:"pointer","&:hover":{opacity:.85}}},"&:last-child":{flex:1,"&::after":{display:"none"}},"&::after":{position:"absolute",top:`calc(50% - ${t.paddingSM/2}px)`,insetInlineStart:"100%",display:"inline-block",width:t.fontSizeIcon,height:t.fontSizeIcon,borderTop:`${t.lineWidth}px ${t.lineType} ${i}`,borderBottom:"none",borderInlineStart:"none",borderInlineEnd:`${t.lineWidth}px ${t.lineType} ${i}`,transform:"translateY(-50%) translateX(-50%) rotate(45deg)",content:'""'},"&::before":{position:"absolute",bottom:0,insetInlineStart:"50%",display:"inline-block",width:0,height:t.lineWidthBold,backgroundColor:o,transition:`width ${r}, inset-inline-start ${r}`,transitionTimingFunction:"ease-out",content:'""'}},[`${e}-item${e}-item-active::before`]:{insetInlineStart:0,width:"100%"}},[`&${e}-navigation${e}-vertical`]:{[`> ${e}-item`]:{marginInlineEnd:0,"&::before":{display:"none"},[`&${e}-item-active::before`]:{top:0,insetInlineEnd:0,insetInlineStart:"unset",display:"block",width:t.lineWidth*3,height:`calc(100% - ${t.marginLG}px)`},"&::after":{position:"relative",insetInlineStart:"50%",display:"block",width:t.controlHeight*.25,height:t.controlHeight*.25,marginBottom:t.marginXS,textAlign:"center",transform:"translateY(-50%) translateX(-50%) rotate(135deg)"},[`> ${e}-item-container > ${e}-item-tail`]:{visibility:"hidden"}}},[`&${e}-navigation${e}-horizontal`]:{[`> ${e}-item > ${e}-item-container > ${e}-item-tail`]:{visibility:"hidden"}}}},_he=t=>{const{antCls:e,componentCls:n}=t;return{[`&${n}-with-progress`]:{[`${n}-item`]:{paddingTop:t.paddingXXS,[`&-process ${n}-item-container ${n}-item-icon ${n}-icon`]:{color:t.processIconColor}},[`&${n}-vertical > ${n}-item `]:{paddingInlineStart:t.paddingXXS,[`> ${n}-item-container > ${n}-item-tail`]:{top:t.marginXXS,insetInlineStart:t.stepsIconSize/2-t.lineWidth+t.paddingXXS}},[`&, &${n}-small`]:{[`&${n}-horizontal ${n}-item:first-child`]:{paddingBottom:t.paddingXXS,paddingInlineStart:t.paddingXXS}},[`&${n}-small${n}-vertical > ${n}-item > ${n}-item-container > ${n}-item-tail`]:{insetInlineStart:t.stepsSmallIconSize/2-t.lineWidth+t.paddingXXS},[`&${n}-label-vertical`]:{[`${n}-item ${n}-item-tail`]:{top:t.margin-2*t.lineWidth}},[`${n}-item-icon`]:{position:"relative",[`${e}-progress`]:{position:"absolute",insetBlockStart:(t.stepsIconSize-t.stepsProgressSize-t.lineWidth*2)/2,insetInlineStart:(t.stepsIconSize-t.stepsProgressSize-t.lineWidth*2)/2}}}}},Phe=t=>{const{componentCls:e,descriptionWidth:n,lineHeight:i,stepsCurrentDotSize:o,stepsDotSize:r,motionDurationSlow:a}=t;return{[`&${e}-dot, &${e}-dot${e}-small`]:{[`${e}-item`]:{"&-title":{lineHeight:i},"&-tail":{top:Math.floor((t.stepsDotSize-t.lineWidth*3)/2),width:"100%",marginTop:0,marginBottom:0,marginInline:`${n/2}px 0`,padding:0,"&::after":{width:`calc(100% - ${t.marginSM*2}px)`,height:t.lineWidth*3,marginInlineStart:t.marginSM}},"&-icon":{width:r,height:r,marginInlineStart:(t.descriptionWidth-r)/2,paddingInlineEnd:0,lineHeight:`${r}px`,background:"transparent",border:0,[`${e}-icon-dot`]:{position:"relative",float:"left",width:"100%",height:"100%",borderRadius:100,transition:`all ${a}`,"&::after":{position:"absolute",top:-t.marginSM,insetInlineStart:(r-t.controlHeightLG*1.5)/2,width:t.controlHeightLG*1.5,height:t.controlHeight,background:"transparent",content:'""'}}},"&-content":{width:n},[`&-process ${e}-item-icon`]:{position:"relative",top:(r-o)/2,width:o,height:o,lineHeight:`${o}px`,background:"none",marginInlineStart:(t.descriptionWidth-o)/2},[`&-process ${e}-icon`]:{[`&:first-child ${e}-icon-dot`]:{insetInlineStart:0}}}},[`&${e}-vertical${e}-dot`]:{[`${e}-item-icon`]:{marginTop:(t.controlHeight-r)/2,marginInlineStart:0,background:"none"},[`${e}-item-process ${e}-item-icon`]:{marginTop:(t.controlHeight-o)/2,top:0,insetInlineStart:(r-o)/2,marginInlineStart:0},[`${e}-item > ${e}-item-container > ${e}-item-tail`]:{top:(t.controlHeight-r)/2,insetInlineStart:0,margin:0,padding:`${r+t.paddingXS}px 0 ${t.paddingXS}px`,"&::after":{marginInlineStart:(r-t.lineWidth)/2}},[`&${e}-small`]:{[`${e}-item-icon`]:{marginTop:(t.controlHeightSM-r)/2},[`${e}-item-process ${e}-item-icon`]:{marginTop:(t.controlHeightSM-o)/2},[`${e}-item > ${e}-item-container > ${e}-item-tail`]:{top:(t.controlHeightSM-r)/2}},[`${e}-item:first-child ${e}-icon-dot`]:{insetInlineStart:0},[`${e}-item-content`]:{width:"inherit"}}}},The=t=>{const{componentCls:e}=t;return{[`&${e}-rtl`]:{direction:"rtl",[`${e}-item`]:{"&-subtitle":{float:"left"}},[`&${e}-navigation`]:{[`${e}-item::after`]:{transform:"rotate(-45deg)"}},[`&${e}-vertical`]:{[`> ${e}-item`]:{"&::after":{transform:"rotate(225deg)"},[`${e}-item-icon`]:{float:"right"}}},[`&${e}-dot`]:{[`${e}-item-icon ${e}-icon-dot, &${e}-small ${e}-item-icon ${e}-icon-dot`]:{float:"right"}}}}},Ohe=t=>{const{componentCls:e,stepsSmallIconSize:n,fontSizeSM:i,fontSize:o,colorTextDescription:r}=t;return{[`&${e}-small`]:{[`&${e}-horizontal:not(${e}-label-vertical) ${e}-item`]:{paddingInlineStart:t.paddingSM,"&:first-child":{paddingInlineStart:0}},[`${e}-item-icon`]:{width:n,height:n,marginTop:0,marginBottom:0,marginInline:`0 ${t.marginXS}px`,fontSize:i,lineHeight:`${n}px`,textAlign:"center",borderRadius:n},[`${e}-item-title`]:{paddingInlineEnd:t.paddingSM,fontSize:o,lineHeight:`${n}px`,"&::after":{top:n/2}},[`${e}-item-description`]:{color:r,fontSize:o},[`${e}-item-tail`]:{top:n/2-t.paddingXXS},[`${e}-item-custom ${e}-item-icon`]:{width:"inherit",height:"inherit",lineHeight:"inherit",background:"none",border:0,borderRadius:0,[`> ${e}-icon`]:{fontSize:n,lineHeight:`${n}px`,transform:"none"}}}}},Ehe=t=>{const{componentCls:e,stepsSmallIconSize:n,stepsIconSize:i}=t;return{[`&${e}-vertical`]:{display:"flex",flexDirection:"column",[`> ${e}-item`]:{display:"block",flex:"1 0 auto",paddingInlineStart:0,overflow:"visible",[`${e}-item-icon`]:{float:"left",marginInlineEnd:t.margin},[`${e}-item-content`]:{display:"block",minHeight:t.controlHeight*1.5,overflow:"hidden"},[`${e}-item-title`]:{lineHeight:`${i}px`},[`${e}-item-description`]:{paddingBottom:t.paddingSM}},[`> ${e}-item > ${e}-item-container > ${e}-item-tail`]:{position:"absolute",top:0,insetInlineStart:t.stepsIconSize/2-t.lineWidth,width:t.lineWidth,height:"100%",padding:`${i+t.marginXXS*1.5}px 0 ${t.marginXXS*1.5}px`,"&::after":{width:t.lineWidth,height:"100%"}},[`> ${e}-item:not(:last-child) > ${e}-item-container > ${e}-item-tail`]:{display:"block"},[` > ${e}-item > ${e}-item-container > ${e}-item-content > ${e}-item-title`]:{"&::after":{display:"none"}},[`&${e}-small ${e}-item-container`]:{[`${e}-item-tail`]:{position:"absolute",top:0,insetInlineStart:t.stepsSmallIconSize/2-t.lineWidth,padding:`${n+t.marginXXS*1.5}px 0 ${t.marginXXS*1.5}px`},[`${e}-item-title`]:{lineHeight:`${n}px`}}}}},Mhe=t=>{const{componentCls:e,inlineDotSize:n,inlineTitleColor:i,inlineTailColor:o}=t,r=t.paddingXS+t.lineWidth,a={[`${e}-item-container ${e}-item-content ${e}-item-title`]:{color:i}};return{[`&${e}-inline`]:{width:"auto",display:"inline-flex",[`${e}-item`]:{flex:"none","&-container":{padding:`${r}px ${t.paddingXXS}px 0`,margin:`0 ${t.marginXXS/2}px`,borderRadius:t.borderRadiusSM,cursor:"pointer",transition:`background-color ${t.motionDurationMid}`,"&:hover":{background:t.controlItemBgHover},"&[role='button']:hover":{opacity:1}},"&-icon":{width:n,height:n,marginInlineStart:`calc(50% - ${n/2}px)`,[`> ${e}-icon`]:{top:0},[`${e}-icon-dot`]:{borderRadius:t.fontSizeSM/4}},"&-content":{width:"auto",marginTop:t.marginXS-t.lineWidth},"&-title":{color:i,fontSize:t.fontSizeSM,lineHeight:t.lineHeightSM,fontWeight:"normal",marginBottom:t.marginXXS/2},"&-description":{display:"none"},"&-tail":{marginInlineStart:0,top:r+n/2,transform:"translateY(-50%)","&:after":{width:"100%",height:t.lineWidth,borderRadius:0,marginInlineStart:0,background:o}},[`&:first-child ${e}-item-tail`]:{width:"50%",marginInlineStart:"50%"},[`&:last-child ${e}-item-tail`]:{display:"block",width:"50%"},"&-wait":A({[`${e}-item-icon ${e}-icon ${e}-icon-dot`]:{backgroundColor:t.colorBorderBg,border:`${t.lineWidth}px ${t.lineType} ${o}`}},a),"&-finish":A({[`${e}-item-tail::after`]:{backgroundColor:o},[`${e}-item-icon ${e}-icon ${e}-icon-dot`]:{backgroundColor:o,border:`${t.lineWidth}px ${t.lineType} ${o}`}},a),"&-error":a,"&-active, &-process":A({[`${e}-item-icon`]:{width:n,height:n,marginInlineStart:`calc(50% - ${n/2}px)`,top:0}},a),[`&:not(${e}-item-active) > ${e}-item-container[role='button']:hover`]:{[`${e}-item-title`]:{color:i}}}}}};var Nl;(function(t){t.wait="wait",t.process="process",t.finish="finish",t.error="error"})(Nl||(Nl={}));const Zf=(t,e)=>{const n=`${e.componentCls}-item`,i=`${t}IconColor`,o=`${t}TitleColor`,r=`${t}DescriptionColor`,a=`${t}TailColor`,s=`${t}IconBgColor`,l=`${t}IconBorderColor`,c=`${t}DotColor`;return{[`${n}-${t} ${n}-icon`]:{backgroundColor:e[s],borderColor:e[l],[`> ${e.componentCls}-icon`]:{color:e[i],[`${e.componentCls}-icon-dot`]:{background:e[c]}}},[`${n}-${t}${n}-custom ${n}-icon`]:{[`> ${e.componentCls}-icon`]:{color:e[c]}},[`${n}-${t} > ${n}-container > ${n}-content > ${n}-title`]:{color:e[o],"&::after":{backgroundColor:e[a]}},[`${n}-${t} > ${n}-container > ${n}-content > ${n}-description`]:{color:e[r]},[`${n}-${t} > ${n}-container > ${n}-tail::after`]:{backgroundColor:e[a]}}},Ihe=t=>{const{componentCls:e,motionDurationSlow:n}=t,i=`${e}-item`;return A(A(A(A(A(A({[i]:{position:"relative",display:"inline-block",flex:1,overflow:"hidden",verticalAlign:"top","&:last-child":{flex:"none",[`> ${i}-container > ${i}-tail, > ${i}-container > ${i}-content > ${i}-title::after`]:{display:"none"}}},[`${i}-container`]:{outline:"none"},[`${i}-icon, ${i}-content`]:{display:"inline-block",verticalAlign:"top"},[`${i}-icon`]:{width:t.stepsIconSize,height:t.stepsIconSize,marginTop:0,marginBottom:0,marginInlineStart:0,marginInlineEnd:t.marginXS,fontSize:t.stepsIconFontSize,fontFamily:t.fontFamily,lineHeight:`${t.stepsIconSize}px`,textAlign:"center",borderRadius:t.stepsIconSize,border:`${t.lineWidth}px ${t.lineType} transparent`,transition:`background-color ${n}, border-color ${n}`,[`${e}-icon`]:{position:"relative",top:t.stepsIconTop,color:t.colorPrimary,lineHeight:1}},[`${i}-tail`]:{position:"absolute",top:t.stepsIconSize/2-t.paddingXXS,insetInlineStart:0,width:"100%","&::after":{display:"inline-block",width:"100%",height:t.lineWidth,background:t.colorSplit,borderRadius:t.lineWidth,transition:`background ${n}`,content:'""'}},[`${i}-title`]:{position:"relative",display:"inline-block",paddingInlineEnd:t.padding,color:t.colorText,fontSize:t.fontSizeLG,lineHeight:`${t.stepsTitleLineHeight}px`,"&::after":{position:"absolute",top:t.stepsTitleLineHeight/2,insetInlineStart:"100%",display:"block",width:9999,height:t.lineWidth,background:t.processTailColor,content:'""'}},[`${i}-subtitle`]:{display:"inline",marginInlineStart:t.marginXS,color:t.colorTextDescription,fontWeight:"normal",fontSize:t.fontSize},[`${i}-description`]:{color:t.colorTextDescription,fontSize:t.fontSize}},Zf(Nl.wait,t)),Zf(Nl.process,t)),{[`${i}-process > ${i}-container > ${i}-title`]:{fontWeight:t.fontWeightStrong}}),Zf(Nl.finish,t)),Zf(Nl.error,t)),{[`${i}${e}-next-error > ${e}-item-title::after`]:{background:t.colorError},[`${i}-disabled`]:{cursor:"not-allowed"}})},khe=t=>{const{componentCls:e,motionDurationSlow:n}=t;return{[`& ${e}-item`]:{[`&:not(${e}-item-active)`]:{[`& > ${e}-item-container[role='button']`]:{cursor:"pointer",[`${e}-item`]:{[`&-title, &-subtitle, &-description, &-icon ${e}-icon`]:{transition:`color ${n}`}},"&:hover":{[`${e}-item`]:{"&-title, &-subtitle, &-description":{color:t.colorPrimary}}}},[`&:not(${e}-item-process)`]:{[`& > ${e}-item-container[role='button']:hover`]:{[`${e}-item`]:{"&-icon":{borderColor:t.colorPrimary,[`${e}-icon`]:{color:t.colorPrimary}}}}}}},[`&${e}-horizontal:not(${e}-label-vertical)`]:{[`${e}-item`]:{paddingInlineStart:t.padding,whiteSpace:"nowrap","&:first-child":{paddingInlineStart:0},[`&:last-child ${e}-item-title`]:{paddingInlineEnd:0},"&-tail":{display:"none"},"&-description":{maxWidth:t.descriptionWidth,whiteSpace:"normal"}}}}},Dhe=t=>{const{componentCls:e}=t;return{[e]:A(A(A(A(A(A(A(A(A(A(A(A(A({},rt(t)),{display:"flex",width:"100%",fontSize:0,textAlign:"initial"}),Ihe(t)),khe(t)),Che(t)),Ohe(t)),Ehe(t)),$he(t)),Phe(t)),Ahe(t)),The(t)),_he(t)),Mhe(t))}},Rhe=et("Steps",t=>{const{wireframe:e,colorTextDisabled:n,fontSizeHeading3:i,fontSize:o,controlHeight:r,controlHeightLG:a,colorTextLightSolid:s,colorText:l,colorPrimary:c,colorTextLabel:u,colorTextDescription:d,colorTextQuaternary:f,colorFillContent:h,controlItemBgActive:p,colorError:g,colorBgContainer:m,colorBorderSecondary:v}=t,b=t.controlHeight,y=t.colorSplit,w=Ve(t,{processTailColor:y,stepsNavArrowColor:n,stepsIconSize:b,stepsIconCustomSize:b,stepsIconCustomTop:0,stepsIconCustomFontSize:a/2,stepsIconTop:-.5,stepsIconFontSize:o,stepsTitleLineHeight:r,stepsSmallIconSize:i,stepsDotSize:r/4,stepsCurrentDotSize:a/4,stepsNavContentMaxWidth:"auto",processIconColor:s,processTitleColor:l,processDescriptionColor:l,processIconBgColor:c,processIconBorderColor:c,processDotColor:c,waitIconColor:e?n:u,waitTitleColor:d,waitDescriptionColor:d,waitTailColor:y,waitIconBgColor:e?m:h,waitIconBorderColor:e?n:"transparent",waitDotColor:n,finishIconColor:c,finishTitleColor:l,finishDescriptionColor:d,finishTailColor:c,finishIconBgColor:e?m:p,finishIconBorderColor:e?c:p,finishDotColor:c,errorIconColor:s,errorTitleColor:g,errorDescriptionColor:g,errorTailColor:y,errorIconBgColor:g,errorIconBorderColor:g,errorDotColor:g,stepsNavActiveColor:c,stepsProgressSize:a,inlineDotSize:6,inlineTitleColor:f,inlineTailColor:v});return[Dhe(w)]},{descriptionWidth:140}),Lhe=()=>({prefixCls:String,iconPrefix:String,current:Number,initial:Number,percent:Number,responsive:Ce(),items:xt(),labelPlacement:Ne(),status:Ne(),size:Ne(),direction:Ne(),progressDot:Xe([Boolean,Function]),type:Ne(),onChange:ve(),"onUpdate:current":ve()}),Jb=oe({compatConfig:{MODE:3},name:"ASteps",inheritAttrs:!1,props:ct(Lhe(),{current:0,responsive:!0,labelPlacement:"horizontal"}),slots:Object,setup(t,e){let{attrs:n,slots:i,emit:o}=e;const{prefixCls:r,direction:a,configProvider:s}=Me("steps",t),[l,c]=Rhe(r),[,u]=Xr(),d=Mc(),f=L(()=>t.responsive&&d.value.xs?"vertical":t.direction),h=L(()=>s.getPrefixCls("",t.iconPrefix)),p=y=>{o("update:current",y),o("change",y)},g=L(()=>t.type==="inline"),m=L(()=>g.value?void 0:t.percent),v=y=>{let{node:w,status:x}=y;if(x==="process"&&t.percent!==void 0){const $=t.size==="small"?u.value.controlHeight:u.value.controlHeightLG;return C("div",{class:`${r.value}-progress-icon`},[C(vC,{type:"circle",percent:m.value,size:$,strokeWidth:4,format:()=>null},null),w])}return w},b=L(()=>({finish:C(_c,{class:`${r.value}-finish-icon`},null),error:C(ai,{class:`${r.value}-error-icon`},null)}));return()=>{const y=ce({[`${r.value}-rtl`]:a.value==="rtl",[`${r.value}-with-progress`]:m.value!==void 0},n.class,c.value),w=(x,$)=>x.description?C(Pi,{title:x.description},{default:()=>[$]}):$;return l(C(She,H(H(H({icons:b.value},n),ht(t,["percent","responsive"])),{},{items:t.items,direction:f.value,prefixCls:r.value,iconPrefix:h.value,class:y,onChange:p,isInline:g.value,itemRender:g.value?w:void 0}),A({stepIcon:v},i)))}}}),jh=oe(A(A({compatConfig:{MODE:3}},V6),{name:"AStep",props:j6()})),Fhe=A(Jb,{Step:jh,install:t=>(t.component(Jb.name,Jb),t.component(jh.name,jh),t)}),Nhe=t=>{const{componentCls:e}=t,n=`${e}-inner`;return{[e]:{[`&${e}-small`]:{minWidth:t.switchMinWidthSM,height:t.switchHeightSM,lineHeight:`${t.switchHeightSM}px`,[`${e}-inner`]:{paddingInlineStart:t.switchInnerMarginMaxSM,paddingInlineEnd:t.switchInnerMarginMinSM,[`${n}-checked`]:{marginInlineStart:`calc(-100% + ${t.switchPinSizeSM+t.switchPadding*2}px - ${t.switchInnerMarginMaxSM*2}px)`,marginInlineEnd:`calc(100% - ${t.switchPinSizeSM+t.switchPadding*2}px + ${t.switchInnerMarginMaxSM*2}px)`},[`${n}-unchecked`]:{marginTop:-t.switchHeightSM,marginInlineStart:0,marginInlineEnd:0}},[`${e}-handle`]:{width:t.switchPinSizeSM,height:t.switchPinSizeSM},[`${e}-loading-icon`]:{top:(t.switchPinSizeSM-t.switchLoadingIconSize)/2,fontSize:t.switchLoadingIconSize},[`&${e}-checked`]:{[`${e}-inner`]:{paddingInlineStart:t.switchInnerMarginMinSM,paddingInlineEnd:t.switchInnerMarginMaxSM,[`${n}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${n}-unchecked`]:{marginInlineStart:`calc(100% - ${t.switchPinSizeSM+t.switchPadding*2}px + ${t.switchInnerMarginMaxSM*2}px)`,marginInlineEnd:`calc(-100% + ${t.switchPinSizeSM+t.switchPadding*2}px - ${t.switchInnerMarginMaxSM*2}px)`}},[`${e}-handle`]:{insetInlineStart:`calc(100% - ${t.switchPinSizeSM+t.switchPadding}px)`}},[`&:not(${e}-disabled):active`]:{[`&:not(${e}-checked) ${n}`]:{[`${n}-unchecked`]:{marginInlineStart:t.marginXXS/2,marginInlineEnd:-t.marginXXS/2}},[`&${e}-checked ${n}`]:{[`${n}-checked`]:{marginInlineStart:-t.marginXXS/2,marginInlineEnd:t.marginXXS/2}}}}}}},Bhe=t=>{const{componentCls:e}=t;return{[e]:{[`${e}-loading-icon${t.iconCls}`]:{position:"relative",top:(t.switchPinSize-t.fontSize)/2,color:t.switchLoadingIconColor,verticalAlign:"top"},[`&${e}-checked ${e}-loading-icon`]:{color:t.switchColor}}}},zhe=t=>{const{componentCls:e}=t,n=`${e}-handle`;return{[e]:{[n]:{position:"absolute",top:t.switchPadding,insetInlineStart:t.switchPadding,width:t.switchPinSize,height:t.switchPinSize,transition:`all ${t.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:t.colorWhite,borderRadius:t.switchPinSize/2,boxShadow:t.switchHandleShadow,transition:`all ${t.switchDuration} ease-in-out`,content:'""'}},[`&${e}-checked ${n}`]:{insetInlineStart:`calc(100% - ${t.switchPinSize+t.switchPadding}px)`},[`&:not(${e}-disabled):active`]:{[`${n}::before`]:{insetInlineEnd:t.switchHandleActiveInset,insetInlineStart:0},[`&${e}-checked ${n}::before`]:{insetInlineEnd:0,insetInlineStart:t.switchHandleActiveInset}}}}},Hhe=t=>{const{componentCls:e}=t,n=`${e}-inner`;return{[e]:{[n]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:t.switchInnerMarginMax,paddingInlineEnd:t.switchInnerMarginMin,transition:`padding-inline-start ${t.switchDuration} ease-in-out, padding-inline-end ${t.switchDuration} ease-in-out`,[`${n}-checked, ${n}-unchecked`]:{display:"block",color:t.colorTextLightSolid,fontSize:t.fontSizeSM,transition:`margin-inline-start ${t.switchDuration} ease-in-out, margin-inline-end ${t.switchDuration} ease-in-out`,pointerEvents:"none"},[`${n}-checked`]:{marginInlineStart:`calc(-100% + ${t.switchPinSize+t.switchPadding*2}px - ${t.switchInnerMarginMax*2}px)`,marginInlineEnd:`calc(100% - ${t.switchPinSize+t.switchPadding*2}px + ${t.switchInnerMarginMax*2}px)`},[`${n}-unchecked`]:{marginTop:-t.switchHeight,marginInlineStart:0,marginInlineEnd:0}},[`&${e}-checked ${n}`]:{paddingInlineStart:t.switchInnerMarginMin,paddingInlineEnd:t.switchInnerMarginMax,[`${n}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${n}-unchecked`]:{marginInlineStart:`calc(100% - ${t.switchPinSize+t.switchPadding*2}px + ${t.switchInnerMarginMax*2}px)`,marginInlineEnd:`calc(-100% + ${t.switchPinSize+t.switchPadding*2}px - ${t.switchInnerMarginMax*2}px)`}},[`&:not(${e}-disabled):active`]:{[`&:not(${e}-checked) ${n}`]:{[`${n}-unchecked`]:{marginInlineStart:t.switchPadding*2,marginInlineEnd:-t.switchPadding*2}},[`&${e}-checked ${n}`]:{[`${n}-checked`]:{marginInlineStart:-t.switchPadding*2,marginInlineEnd:t.switchPadding*2}}}}}},Whe=t=>{const{componentCls:e}=t;return{[e]:A(A(A(A({},rt(t)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:t.switchMinWidth,height:t.switchHeight,lineHeight:`${t.switchHeight}px`,verticalAlign:"middle",background:t.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${t.motionDurationMid}`,userSelect:"none",[`&:hover:not(${e}-disabled)`]:{background:t.colorTextTertiary}}),Hr(t)),{[`&${e}-checked`]:{background:t.switchColor,[`&:hover:not(${e}-disabled)`]:{background:t.colorPrimaryHover}},[`&${e}-loading, &${e}-disabled`]:{cursor:"not-allowed",opacity:t.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${e}-rtl`]:{direction:"rtl"}})}},jhe=et("Switch",t=>{const e=t.fontSize*t.lineHeight,n=t.controlHeight/2,i=2,o=e-i*2,r=n-i*2,a=Ve(t,{switchMinWidth:o*2+i*4,switchHeight:e,switchDuration:t.motionDurationMid,switchColor:t.colorPrimary,switchDisabledOpacity:t.opacityLoading,switchInnerMarginMin:o/2,switchInnerMarginMax:o+i+i*2,switchPadding:i,switchPinSize:o,switchBg:t.colorBgContainer,switchMinWidthSM:r*2+i*2,switchHeightSM:n,switchInnerMarginMinSM:r/2,switchInnerMarginMaxSM:r+i+i*2,switchPinSizeSM:r,switchHandleShadow:`0 2px 4px 0 ${new Ot("#00230b").setAlpha(.2).toRgbString()}`,switchLoadingIconSize:t.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${t.opacityLoading})`,switchHandleActiveInset:"-30%"});return[Whe(a),Hhe(a),zhe(a),Bhe(a),Nhe(a)]}),Vhe=Wn("small","default"),Xhe=()=>({id:String,prefixCls:String,size:Z.oneOf(Vhe),disabled:{type:Boolean,default:void 0},checkedChildren:Z.any,unCheckedChildren:Z.any,tabindex:Z.oneOfType([Z.string,Z.number]),autofocus:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},checked:Z.oneOfType([Z.string,Z.number,Z.looseBool]),checkedValue:Z.oneOfType([Z.string,Z.number,Z.looseBool]).def(!0),unCheckedValue:Z.oneOfType([Z.string,Z.number,Z.looseBool]).def(!1),onChange:{type:Function},onClick:{type:Function},onKeydown:{type:Function},onMouseup:{type:Function},"onUpdate:checked":{type:Function},onBlur:Function,onFocus:Function}),Yhe=oe({compatConfig:{MODE:3},name:"ASwitch",__ANT_SWITCH:!0,inheritAttrs:!1,props:Xhe(),slots:Object,setup(t,e){let{attrs:n,slots:i,expose:o,emit:r}=e;const a=vn(),s=Oi(),l=L(()=>{var P;return(P=t.disabled)!==null&&P!==void 0?P:s.value});Hd(()=>{});const c=se(t.checked!==void 0?t.checked:n.defaultChecked),u=L(()=>c.value===t.checkedValue);ye(()=>t.checked,()=>{c.value=t.checked});const{prefixCls:d,direction:f,size:h}=Me("switch",t),[p,g]=jhe(d),m=se(),v=()=>{var P;(P=m.value)===null||P===void 0||P.focus()};o({focus:v,blur:()=>{var P;(P=m.value)===null||P===void 0||P.blur()}}),Ze(()=>{pt(()=>{t.autofocus&&!l.value&&m.value.focus()})});const y=(P,O)=>{l.value||(r("update:checked",P),r("change",P,O),a.onFieldChange())},w=P=>{r("blur",P)},x=P=>{v();const O=u.value?t.unCheckedValue:t.checkedValue;y(O,P),r("click",O,P)},$=P=>{P.keyCode===Te.LEFT?y(t.unCheckedValue,P):P.keyCode===Te.RIGHT&&y(t.checkedValue,P),r("keydown",P)},S=P=>{var O;(O=m.value)===null||O===void 0||O.blur(),r("mouseup",P)},_=L(()=>({[`${d.value}-small`]:h.value==="small",[`${d.value}-loading`]:t.loading,[`${d.value}-checked`]:u.value,[`${d.value}-disabled`]:l.value,[d.value]:!0,[`${d.value}-rtl`]:f.value==="rtl",[g.value]:!0}));return()=>{var P;return p(C(J1,null,{default:()=>[C("button",H(H(H({},ht(t,["prefixCls","checkedChildren","unCheckedChildren","checked","autofocus","checkedValue","unCheckedValue","id","onChange","onUpdate:checked"])),n),{},{id:(P=t.id)!==null&&P!==void 0?P:a.id.value,onKeydown:$,onClick:x,onBlur:w,onMouseup:S,type:"button",role:"switch","aria-checked":c.value,disabled:l.value||t.loading,class:[n.class,_.value],ref:m}),[C("div",{class:`${d.value}-handle`},[t.loading?C(yi,{class:`${d.value}-loading-icon`},null):null]),C("span",{class:`${d.value}-inner`},[C("span",{class:`${d.value}-inner-checked`},[gn(i,t,"checkedChildren")]),C("span",{class:`${d.value}-inner-unchecked`},[gn(i,t,"unCheckedChildren")])])])]}))}}}),Ghe=Vt(Yhe),X6=Symbol("TableContextProps"),Khe=t=>{ot(X6,t)},dr=()=>qe(X6,{}),Uhe="RC_TABLE_KEY";function Y6(t){return t==null?[]:Array.isArray(t)?t:[t]}function G6(t,e){if(!e&&typeof e!="number")return t;const n=Y6(e);let i=t;for(let o=0;o{const{key:o,dataIndex:r}=i||{};let a=o||Y6(r).join("-")||Uhe;for(;n[a];)a=`${a}_next`;n[a]=!0,e.push(a)}),e}function qhe(){const t={};function e(r,a){a&&Object.keys(a).forEach(s=>{const l=a[s];l&&typeof l=="object"?(r[s]=r[s]||{},e(r[s],l)):r[s]=l})}for(var n=arguments.length,i=new Array(n),o=0;o{e(t,r)}),t}function cx(t){return t!=null}const K6=Symbol("SlotsContextProps"),Zhe=t=>{ot(K6,t)},SC=()=>qe(K6,L(()=>({}))),U6=Symbol("ContextProps"),Jhe=t=>{ot(U6,t)},Qhe=()=>qe(U6,{onResizeColumn:()=>{}}),tc="RC_TABLE_INTERNAL_COL_DEFINE",q6=Symbol("HoverContextProps"),epe=t=>{ot(q6,t)},tpe=()=>qe(q6,{startRow:ie(-1),endRow:ie(-1),onHover(){}}),ux=ie(!1),npe=()=>{Ze(()=>{ux.value=ux.value||WS("position","sticky")})},ipe=()=>ux;var ope=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o=n}function ape(t){return t&&typeof t=="object"&&!Array.isArray(t)&&!ln(t)}const dv=oe({name:"Cell",props:["prefixCls","record","index","renderIndex","dataIndex","customRender","component","colSpan","rowSpan","fixLeft","fixRight","firstFixLeft","lastFixLeft","firstFixRight","lastFixRight","appendNode","additionalProps","ellipsis","align","rowType","isSticky","column","cellType","transformCellText"],setup(t,e){let{slots:n}=e;const i=SC(),{onHover:o,startRow:r,endRow:a}=tpe(),s=L(()=>{var g,m,v,b;return(v=(g=t.colSpan)!==null&&g!==void 0?g:(m=t.additionalProps)===null||m===void 0?void 0:m.colSpan)!==null&&v!==void 0?v:(b=t.additionalProps)===null||b===void 0?void 0:b.colspan}),l=L(()=>{var g,m,v,b;return(v=(g=t.rowSpan)!==null&&g!==void 0?g:(m=t.additionalProps)===null||m===void 0?void 0:m.rowSpan)!==null&&v!==void 0?v:(b=t.additionalProps)===null||b===void 0?void 0:b.rowspan}),c=Bi(()=>{const{index:g}=t;return rpe(g,l.value||1,r.value,a.value)}),u=ipe(),d=(g,m)=>{var v;const{record:b,index:y,additionalProps:w}=t;b&&o(y,y+m-1),(v=w==null?void 0:w.onMouseenter)===null||v===void 0||v.call(w,g)},f=g=>{var m;const{record:v,additionalProps:b}=t;v&&o(-1,-1),(m=b==null?void 0:b.onMouseleave)===null||m===void 0||m.call(b,g)},h=g=>{const m=Kt(g)[0];return ln(m)?m.type===Ma?m.children:Array.isArray(m.children)?h(m.children):void 0:m},p=ie(null);return ye([c,()=>t.prefixCls,p],()=>{const g=gi(p.value);g&&(c.value?Zp(g,`${t.prefixCls}-cell-row-hover`):Jp(g,`${t.prefixCls}-cell-row-hover`))}),()=>{var g,m,v,b,y,w;const{prefixCls:x,record:$,index:S,renderIndex:_,dataIndex:P,customRender:O,component:T="td",fixLeft:M,fixRight:I,firstFixLeft:k,lastFixLeft:E,firstFixRight:R,lastFixRight:D,appendNode:F=(g=n.appendNode)===null||g===void 0?void 0:g.call(n),additionalProps:N={},ellipsis:B,align:z,rowType:W,isSticky:j,column:U={},cellType:V}=t,q=`${x}-cell`;let Y,J;const Q=(m=n.default)===null||m===void 0?void 0:m.call(n);if(cx(Q)||V==="header")J=Q;else{const fe=G6($,P);if(J=fe,O){const de=O({text:fe,value:fe,record:$,index:S,renderIndex:_,column:U.__originColumn__});ape(de)?(J=de.children,Y=de.props):J=de}if(!(tc in U)&&V==="body"&&i.value.bodyCell&&!(!((v=U.slots)===null||v===void 0)&&v.customRender)){const de=pm(i.value,"bodyCell",{text:fe,value:fe,record:$,index:S,column:U.__originColumn__},()=>{const xe=J===void 0?fe:J;return[typeof xe=="object"&&cn(xe)||typeof xe!="object"?xe:null]});J=Dt(de)}t.transformCellText&&(J=t.transformCellText({text:J,record:$,index:S,column:U.__originColumn__}))}typeof J=="object"&&!Array.isArray(J)&&!ln(J)&&(J=null),B&&(E||R)&&(J=C("span",{class:`${q}-content`},[J])),Array.isArray(J)&&J.length===1&&(J=J[0]);const G=Y||{},{colSpan:ee,rowSpan:X,style:K,class:te}=G,ue=ope(G,["colSpan","rowSpan","style","class"]),ae=(b=ee!==void 0?ee:s.value)!==null&&b!==void 0?b:1,re=(y=X!==void 0?X:l.value)!==null&&y!==void 0?y:1;if(ae===0||re===0)return null;const ne={},le=typeof M=="number"&&u.value,he=typeof I=="number"&&u.value;le&&(ne.position="sticky",ne.left=`${M}px`),he&&(ne.position="sticky",ne.right=`${I}px`);const pe={};z&&(pe.textAlign=z);let ge;const be=B===!0?{showTitle:!0}:B;be&&(be.showTitle||W==="header")&&(typeof J=="string"||typeof J=="number"?ge=J.toString():ln(J)&&(ge=h([J])));const $e=A(A(A({title:ge},ue),N),{colSpan:ae!==1?ae:null,rowSpan:re!==1?re:null,class:ce(q,{[`${q}-fix-left`]:le&&u.value,[`${q}-fix-left-first`]:k&&u.value,[`${q}-fix-left-last`]:E&&u.value,[`${q}-fix-right`]:he&&u.value,[`${q}-fix-right-first`]:R&&u.value,[`${q}-fix-right-last`]:D&&u.value,[`${q}-ellipsis`]:B,[`${q}-with-append`]:F,[`${q}-fix-sticky`]:(le||he)&&j&&u.value},N.class,te),onMouseenter:fe=>{d(fe,re)},onMouseleave:f,style:[N.style,pe,ne,K]});return C(T,H(H({},$e),{},{ref:p}),{default:()=>[F,J,(w=n.dragHandle)===null||w===void 0?void 0:w.call(n)]})}}});function CC(t,e,n,i,o){const r=n[t]||{},a=n[e]||{};let s,l;r.fixed==="left"?s=i.left[t]:a.fixed==="right"&&(l=i.right[e]);let c=!1,u=!1,d=!1,f=!1;const h=n[e+1],p=n[t-1];return o==="rtl"?s!==void 0?f=!(p&&p.fixed==="left"):l!==void 0&&(d=!(h&&h.fixed==="right")):s!==void 0?c=!(h&&h.fixed==="left"):l!==void 0&&(u=!(p&&p.fixed==="right")),{fixLeft:s,fixRight:l,lastFixLeft:c,firstFixRight:u,lastFixRight:d,firstFixLeft:f,isSticky:i.isSticky}}const HT={mouse:{move:"mousemove",stop:"mouseup"},touch:{move:"touchmove",stop:"touchend"}},WT=50,spe=oe({compatConfig:{MODE:3},name:"DragHandle",props:{prefixCls:String,width:{type:Number,required:!0},minWidth:{type:Number,default:WT},maxWidth:{type:Number,default:1/0},column:{type:Object,default:void 0}},setup(t){let e=0,n={remove:()=>{}},i={remove:()=>{}};const o=()=>{n.remove(),i.remove()};Xn(()=>{o()}),Ke(()=>{Nt(!isNaN(t.width),"Table","width must be a number when use resizable")});const{onResizeColumn:r}=Qhe(),a=L(()=>typeof t.minWidth=="number"&&!isNaN(t.minWidth)?t.minWidth:WT),s=L(()=>typeof t.maxWidth=="number"&&!isNaN(t.maxWidth)?t.maxWidth:1/0),l=Cn();let c=0;const u=ie(!1);let d;const f=y=>{let w=0;y.touches?y.touches.length?w=y.touches[0].pageX:w=y.changedTouches[0].pageX:w=y.pageX;const x=e-w;let $=Math.max(c-x,a.value);$=Math.min($,s.value),lt.cancel(d),d=lt(()=>{r($,t.column.__originColumn__)})},h=y=>{f(y)},p=y=>{u.value=!1,f(y),o()},g=(y,w)=>{u.value=!0,o(),c=l.vnode.el.parentNode.getBoundingClientRect().width,!(y instanceof MouseEvent&&y.which!==1)&&(y.stopPropagation&&y.stopPropagation(),e=y.touches?y.touches[0].pageX:y.pageX,n=Gt(document.documentElement,w.move,h),i=Gt(document.documentElement,w.stop,p))},m=y=>{y.stopPropagation(),y.preventDefault(),g(y,HT.mouse)},v=y=>{y.stopPropagation(),y.preventDefault(),g(y,HT.touch)},b=y=>{y.stopPropagation(),y.preventDefault()};return()=>{const{prefixCls:y}=t,w={[pn?"onTouchstartPassive":"onTouchstart"]:x=>v(x)};return C("div",H(H({class:`${y}-resize-handle ${u.value?"dragging":""}`,onMousedown:m},w),{},{onClick:b}),[C("div",{class:`${y}-resize-handle-line`},null)])}}}),lpe=oe({name:"HeaderRow",props:["cells","stickyOffsets","flattenColumns","rowComponent","cellComponent","index","customHeaderRow"],setup(t){const e=dr();return()=>{const{prefixCls:n,direction:i}=e,{cells:o,stickyOffsets:r,flattenColumns:a,rowComponent:s,cellComponent:l,customHeaderRow:c,index:u}=t;let d;c&&(d=c(o.map(h=>h.column),u));const f=uv(o.map(h=>h.column));return C(s,d,{default:()=>[o.map((h,p)=>{const{column:g}=h,m=CC(h.colStart,h.colEnd,a,r,i);let v;g&&g.customHeaderCell&&(v=h.column.customHeaderCell(g));const b=g;return C(dv,H(H(H({},h),{},{cellType:"header",ellipsis:g.ellipsis,align:g.align,component:l,prefixCls:n,key:f[p]},m),{},{additionalProps:v,rowType:"header",column:g}),{default:()=>g.title,dragHandle:()=>b.resizable?C(spe,{prefixCls:n,width:b.width,minWidth:b.minWidth,maxWidth:b.maxWidth,column:b},null):null})})]})}}});function cpe(t){const e=[];function n(o,r){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;e[a]=e[a]||[];let s=r;return o.filter(Boolean).map(c=>{const u={key:c.key,class:ce(c.className,c.class),column:c,colStart:s};let d=1;const f=c.children;return f&&f.length>0&&(d=n(f,s,a+1).reduce((h,p)=>h+p,0),u.hasSubColumns=!0),"colSpan"in c&&({colSpan:d}=c),"rowSpan"in c&&(u.rowSpan=c.rowSpan),u.colSpan=d,u.colEnd=u.colStart+d-1,e[a].push(u),s+=d,d})}n(t,0);const i=e.length;for(let o=0;o{!("rowSpan"in r)&&!r.hasSubColumns&&(r.rowSpan=i-o)});return e}const jT=oe({name:"TableHeader",inheritAttrs:!1,props:["columns","flattenColumns","stickyOffsets","customHeaderRow"],setup(t){const e=dr(),n=L(()=>cpe(t.columns));return()=>{const{prefixCls:i,getComponent:o}=e,{stickyOffsets:r,flattenColumns:a,customHeaderRow:s}=t,l=o(["header","wrapper"],"thead"),c=o(["header","row"],"tr"),u=o(["header","cell"],"th");return C(l,{class:`${i}-thead`},{default:()=>[n.value.map((d,f)=>C(lpe,{key:f,flattenColumns:a,cells:d,stickyOffsets:r,rowComponent:c,cellComponent:u,customHeaderRow:s,index:f},null))]})}}}),Z6=Symbol("ExpandedRowProps"),upe=t=>{ot(Z6,t)},dpe=()=>qe(Z6,{}),J6=oe({name:"ExpandedRow",inheritAttrs:!1,props:["prefixCls","component","cellComponent","expanded","colSpan","isEmpty"],setup(t,e){let{slots:n,attrs:i}=e;const o=dr(),r=dpe(),{fixHeader:a,fixColumn:s,componentWidth:l,horizonScroll:c}=r;return()=>{const{prefixCls:u,component:d,cellComponent:f,expanded:h,colSpan:p,isEmpty:g}=t;return C(d,{class:i.class,style:{display:h?null:"none"}},{default:()=>[C(dv,{component:f,prefixCls:u,colSpan:p},{default:()=>{var m;let v=(m=n.default)===null||m===void 0?void 0:m.call(n);return(g?c.value:s.value)&&(v=C("div",{style:{width:`${l.value-(a.value?o.scrollbarSize:0)}px`,position:"sticky",left:0,overflow:"hidden"},class:`${u}-expanded-row-fixed`},[v])),v}})]})}}}),fpe=oe({name:"MeasureCell",props:["columnKey"],setup(t,e){let{emit:n}=e;const i=se();return Ze(()=>{i.value&&n("columnResize",t.columnKey,i.value.offsetWidth)}),()=>C(mo,{onResize:o=>{let{offsetWidth:r}=o;n("columnResize",t.columnKey,r)}},{default:()=>[C("td",{ref:i,style:{padding:0,border:0,height:0}},[C("div",{style:{height:0,overflow:"hidden"}},[Qn(" ")])])]})}}),Q6=Symbol("BodyContextProps"),hpe=t=>{ot(Q6,t)},e5=()=>qe(Q6,{}),ppe=oe({name:"BodyRow",inheritAttrs:!1,props:["record","index","renderIndex","recordKey","expandedKeys","rowComponent","cellComponent","customRow","rowExpandable","indent","rowKey","getRowKey","childrenColumnName"],setup(t,e){let{attrs:n}=e;const i=dr(),o=e5(),r=ie(!1),a=L(()=>t.expandedKeys&&t.expandedKeys.has(t.recordKey));Ke(()=>{a.value&&(r.value=!0)});const s=L(()=>o.expandableType==="row"&&(!t.rowExpandable||t.rowExpandable(t.record))),l=L(()=>o.expandableType==="nest"),c=L(()=>t.childrenColumnName&&t.record&&t.record[t.childrenColumnName]),u=L(()=>s.value||l.value),d=(m,v)=>{o.onTriggerExpand(m,v)},f=L(()=>{var m;return((m=t.customRow)===null||m===void 0?void 0:m.call(t,t.record,t.index))||{}}),h=function(m){var v,b;o.expandRowByClick&&u.value&&d(t.record,m);for(var y=arguments.length,w=new Array(y>1?y-1:0),x=1;x{const{record:m,index:v,indent:b}=t,{rowClassName:y}=o;return typeof y=="string"?y:typeof y=="function"?y(m,v,b):""}),g=L(()=>uv(o.flattenColumns));return()=>{const{class:m,style:v}=n,{record:b,index:y,rowKey:w,indent:x=0,rowComponent:$,cellComponent:S}=t,{prefixCls:_,fixedInfoList:P,transformCellText:O}=i,{flattenColumns:T,expandedRowClassName:M,indentSize:I,expandIcon:k,expandedRowRender:E,expandIconColumnIndex:R}=o,D=C($,H(H({},f.value),{},{"data-row-key":w,class:ce(m,`${_}-row`,`${_}-row-level-${x}`,p.value,f.value.class),style:[v,f.value.style],onClick:h}),{default:()=>[T.map((N,B)=>{const{customRender:z,dataIndex:W,className:j}=N,U=g[B],V=P[B];let q;N.customCell&&(q=N.customCell(b,y,N));const Y=B===(R||0)&&l.value?C(Qe,null,[C("span",{style:{paddingLeft:`${I*x}px`},class:`${_}-row-indent indent-level-${x}`},null),k({prefixCls:_,expanded:a.value,expandable:c.value,record:b,onExpand:d})]):null;return C(dv,H(H({cellType:"body",class:j,ellipsis:N.ellipsis,align:N.align,component:S,prefixCls:_,key:U,record:b,index:y,renderIndex:t.renderIndex,dataIndex:W,customRender:z},V),{},{additionalProps:q,column:N,transformCellText:O,appendNode:Y}),null)})]});let F;if(s.value&&(r.value||a.value)){const N=E({record:b,index:y,indent:x+1,expanded:a.value}),B=M&&M(b,y,x);F=C(J6,{expanded:a.value,class:ce(`${_}-expanded-row`,`${_}-expanded-row-level-${x+1}`,B),prefixCls:_,component:$,cellComponent:S,colSpan:T.length,isEmpty:!1},{default:()=>[N]})}return C(Qe,null,[D,F])}}});function t5(t,e,n,i,o,r){const a=[];a.push({record:t,indent:e,index:r});const s=o(t),l=i==null?void 0:i.has(s);if(t&&Array.isArray(t[n])&&l)for(let c=0;c{const r=e.value,a=n.value,s=t.value;if(a!=null&&a.size){const l=[];for(let c=0;c<(s==null?void 0:s.length);c+=1){const u=s[c];l.push(...t5(u,0,r,a,i.value,c))}return l}return s==null?void 0:s.map((l,c)=>({record:l,indent:0,index:c}))})}const n5=Symbol("ResizeContextProps"),mpe=t=>{ot(n5,t)},vpe=()=>qe(n5,{onColumnResize:()=>{}}),bpe=oe({name:"TableBody",props:["data","getRowKey","measureColumnWidth","expandedKeys","customRow","rowExpandable","childrenColumnName"],setup(t,e){let{slots:n}=e;const i=vpe(),o=dr(),r=e5(),a=gpe(Ue(t,"data"),Ue(t,"childrenColumnName"),Ue(t,"expandedKeys"),Ue(t,"getRowKey")),s=ie(-1),l=ie(-1);let c;return epe({startRow:s,endRow:l,onHover:(u,d)=>{clearTimeout(c),c=setTimeout(()=>{s.value=u,l.value=d},100)}}),()=>{var u;const{data:d,getRowKey:f,measureColumnWidth:h,expandedKeys:p,customRow:g,rowExpandable:m,childrenColumnName:v}=t,{onColumnResize:b}=i,{prefixCls:y,getComponent:w}=o,{flattenColumns:x}=r,$=w(["body","wrapper"],"tbody"),S=w(["body","row"],"tr"),_=w(["body","cell"],"td");let P;d.length?P=a.value.map((T,M)=>{const{record:I,indent:k,index:E}=T,R=f(I,M);return C(ppe,{key:R,rowKey:R,record:I,recordKey:R,index:M,renderIndex:E,rowComponent:S,cellComponent:_,expandedKeys:p,customRow:g,getRowKey:f,rowExpandable:m,childrenColumnName:v,indent:k},null)}):P=C(J6,{expanded:!0,class:`${y}-placeholder`,prefixCls:y,component:S,cellComponent:_,colSpan:x.length,isEmpty:!0},{default:()=>[(u=n.emptyNode)===null||u===void 0?void 0:u.call(n)]});const O=uv(x);return C($,{class:`${y}-tbody`},{default:()=>[h&&C("tr",{"aria-hidden":"true",class:`${y}-measure-row`,style:{height:0,fontSize:0}},[O.map(T=>C(fpe,{key:T,columnKey:T,onColumnResize:b},null))]),P]})}}}),da={};var ype=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{const{fixed:i}=n,o=i===!0?"left":i,r=n.children;return r&&r.length>0?[...e,...dx(r).map(a=>A({fixed:o},a))]:[...e,A(A({},n),{fixed:o})]},[])}function xpe(t){return t.map(e=>{const{fixed:n}=e,i=ype(e,["fixed"]);let o=n;return n==="left"?o="right":n==="right"&&(o="left"),A({fixed:o},i)})}function wpe(t,e){let{prefixCls:n,columns:i,expandable:o,expandedKeys:r,getRowKey:a,onTriggerExpand:s,expandIcon:l,rowExpandable:c,expandIconColumnIndex:u,direction:d,expandRowByClick:f,expandColumnWidth:h,expandFixed:p}=t;const g=SC(),m=L(()=>{if(o.value){let y=i.value.slice();if(!y.includes(da)){const I=u.value||0;I>=0&&y.splice(I,0,da)}const w=y.indexOf(da);y=y.filter((I,k)=>I!==da||k===w);const x=i.value[w];let $;(p.value==="left"||p.value)&&!u.value?$="left":(p.value==="right"||p.value)&&u.value===i.value.length?$="right":$=x?x.fixed:null;const S=r.value,_=c.value,P=l.value,O=n.value,T=f.value,M={[tc]:{class:`${n.value}-expand-icon-col`,columnType:"EXPAND_COLUMN"},title:pm(g.value,"expandColumnTitle",{},()=>[""]),fixed:$,class:`${n.value}-row-expand-icon-cell`,width:h.value,customRender:I=>{let{record:k,index:E}=I;const R=a.value(k,E),D=S.has(R),F=_?_(k):!0,N=P({prefixCls:O,expanded:D,expandable:F,record:k,onExpand:s});return T?C("span",{onClick:B=>B.stopPropagation()},[N]):N}};return y.map(I=>I===da?M:I)}return i.value.filter(y=>y!==da)}),v=L(()=>{let y=m.value;return e.value&&(y=e.value(y)),y.length||(y=[{customRender:()=>null}]),y}),b=L(()=>d.value==="rtl"?xpe(dx(v.value)):dx(v.value));return[v,b]}function i5(t){const e=ie(t);let n;const i=ie([]);function o(r){i.value.push(r),lt.cancel(n),n=lt(()=>{const a=i.value;i.value=[],a.forEach(s=>{e.value=s(e.value)})})}return at(()=>{lt.cancel(n)}),[e,o]}function Spe(t){const e=se(null),n=se();function i(){clearTimeout(n.value)}function o(a){e.value=a,i(),n.value=setTimeout(()=>{e.value=null,n.value=void 0},100)}function r(){return e.value}return at(()=>{i()}),[o,r]}function Cpe(t,e,n){return L(()=>{const o=[],r=[];let a=0,s=0;const l=t.value,c=e.value,u=n.value;for(let d=0;d=0;s-=1){const l=e[s],c=n&&n[s],u=c&&c[tc];if(l||u||a){const d=u||{},{columnType:f}=d,h=$pe(d,["columnType"]);o.unshift(C("col",H({key:s,style:{width:typeof l=="number"?`${l}px`:l}},h),null)),a=!0}}return C("colgroup",null,[o])}function fx(t,e){let{slots:n}=e;var i;return C("div",null,[(i=n.default)===null||i===void 0?void 0:i.call(n)])}fx.displayName="Panel";let Ape=0;const _pe=oe({name:"TableSummary",props:["fixed"],setup(t,e){let{slots:n}=e;const i=dr(),o=`table-summary-uni-key-${++Ape}`,r=L(()=>t.fixed===""||t.fixed);return Ke(()=>{i.summaryCollect(o,r.value)}),at(()=>{i.summaryCollect(o,!1)}),()=>{var a;return(a=n.default)===null||a===void 0?void 0:a.call(n)}}}),Ppe=oe({compatConfig:{MODE:3},name:"ATableSummaryRow",setup(t,e){let{slots:n}=e;return()=>{var i;return C("tr",null,[(i=n.default)===null||i===void 0?void 0:i.call(n)])}}}),r5=Symbol("SummaryContextProps"),Tpe=t=>{ot(r5,t)},Ope=()=>qe(r5,{}),Epe=oe({name:"ATableSummaryCell",props:["index","colSpan","rowSpan","align"],setup(t,e){let{attrs:n,slots:i}=e;const o=dr(),r=Ope();return()=>{const{index:a,colSpan:s=1,rowSpan:l,align:c}=t,{prefixCls:u,direction:d}=o,{scrollColumnIndex:f,stickyOffsets:h,flattenColumns:p}=r,m=a+s-1+1===f?s+1:s,v=CC(a,a+m-1,p,h,d);return C(dv,H({class:n.class,index:a,component:"td",prefixCls:u,record:null,dataIndex:null,align:c,colSpan:m,rowSpan:l,customRender:()=>{var b;return(b=i.default)===null||b===void 0?void 0:b.call(i)}},v),null)}}}),Jf=oe({name:"TableFooter",inheritAttrs:!1,props:["stickyOffsets","flattenColumns"],setup(t,e){let{slots:n}=e;const i=dr();return Tpe($t({stickyOffsets:Ue(t,"stickyOffsets"),flattenColumns:Ue(t,"flattenColumns"),scrollColumnIndex:L(()=>{const o=t.flattenColumns.length-1,r=t.flattenColumns[o];return r!=null&&r.scrollbar?o:null})})),()=>{var o;const{prefixCls:r}=i;return C("tfoot",{class:`${r}-summary`},[(o=n.default)===null||o===void 0?void 0:o.call(n)])}}}),Mpe=_pe;function Ipe(t){let{prefixCls:e,record:n,onExpand:i,expanded:o,expandable:r}=t;const a=`${e}-row-expand-icon`;if(!r)return C("span",{class:[a,`${e}-row-spaced`]},null);const s=l=>{i(n,l),l.stopPropagation()};return C("span",{class:{[a]:!0,[`${e}-row-expanded`]:o,[`${e}-row-collapsed`]:!o},onClick:s},null)}function kpe(t,e,n){const i=[];function o(r){(r||[]).forEach((a,s)=>{i.push(e(a,s)),o(a[n])})}return o(t),i}const Dpe=oe({name:"StickyScrollBar",inheritAttrs:!1,props:["offsetScroll","container","scrollBodyRef","scrollBodySizeInfo"],emits:["scroll"],setup(t,e){let{emit:n,expose:i}=e;const o=dr(),r=ie(0),a=ie(0),s=ie(0);Ke(()=>{r.value=t.scrollBodySizeInfo.scrollWidth||0,a.value=t.scrollBodySizeInfo.clientWidth||0,s.value=r.value&&a.value*(a.value/r.value)},{flush:"post"});const l=ie(),[c,u]=i5({scrollLeft:0,isHiddenScrollBar:!0}),d=se({delta:0,x:0}),f=ie(!1),h=()=>{f.value=!1},p=S=>{d.value={delta:S.pageX-c.value.scrollLeft,x:0},f.value=!0,S.preventDefault()},g=S=>{const{buttons:_}=S||(window==null?void 0:window.event);if(!f.value||_===0){f.value&&(f.value=!1);return}let P=d.value.x+S.pageX-d.value.x-d.value.delta;P<=0&&(P=0),P+s.value>=a.value&&(P=a.value-s.value),n("scroll",{scrollLeft:P/a.value*(r.value+2)}),d.value.x=S.pageX},m=()=>{if(!t.scrollBodyRef.value)return;const S=Dp(t.scrollBodyRef.value).top,_=S+t.scrollBodyRef.value.offsetHeight,P=t.container===window?document.documentElement.scrollTop+window.innerHeight:Dp(t.container).top+t.container.clientHeight;_-kp()<=P||S>=P-t.offsetScroll?u(O=>A(A({},O),{isHiddenScrollBar:!0})):u(O=>A(A({},O),{isHiddenScrollBar:!1}))};i({setScrollLeft:S=>{u(_=>A(A({},_),{scrollLeft:S/r.value*a.value||0}))}});let b=null,y=null,w=null,x=null;Ze(()=>{b=Gt(document.body,"mouseup",h,!1),y=Gt(document.body,"mousemove",g,!1),w=Gt(window,"resize",m,!1)}),qg(()=>{pt(()=>{m()})}),Ze(()=>{setTimeout(()=>{ye([s,f],()=>{m()},{immediate:!0,flush:"post"})})}),ye(()=>t.container,()=>{x==null||x.remove(),x=Gt(t.container,"scroll",m,!1)},{immediate:!0,flush:"post"}),at(()=>{b==null||b.remove(),y==null||y.remove(),x==null||x.remove(),w==null||w.remove()}),ye(()=>A({},c.value),(S,_)=>{S.isHiddenScrollBar!==(_==null?void 0:_.isHiddenScrollBar)&&!S.isHiddenScrollBar&&u(P=>{const O=t.scrollBodyRef.value;return O?A(A({},P),{scrollLeft:O.scrollLeft/O.scrollWidth*O.clientWidth}):P})},{immediate:!0});const $=kp();return()=>{if(r.value<=a.value||!s.value||c.value.isHiddenScrollBar)return null;const{prefixCls:S}=o;return C("div",{style:{height:`${$}px`,width:`${a.value}px`,bottom:`${t.offsetScroll}px`},class:`${S}-sticky-scroll`},[C("div",{onMousedown:p,ref:l,class:ce(`${S}-sticky-scroll-bar`,{[`${S}-sticky-scroll-bar-active`]:f.value}),style:{width:`${s.value}px`,transform:`translate3d(${c.value.scrollLeft}px, 0, 0)`}},null)])}}}),VT=ii()?window:null;function Rpe(t,e){return L(()=>{const{offsetHeader:n=0,offsetSummary:i=0,offsetScroll:o=0,getContainer:r=()=>VT}=typeof t.value=="object"?t.value:{},a=r()||VT,s=!!t.value;return{isSticky:s,stickyClassName:s?`${e.value}-sticky-holder`:"",offsetHeader:n,offsetSummary:i,offsetScroll:o,container:a}})}function Lpe(t,e){return L(()=>{const n=[],i=t.value,o=e.value;for(let r=0;rr.isSticky&&!t.fixHeader?0:r.scrollbarSize),s=se(),l=g=>{const{currentTarget:m,deltaX:v}=g;v&&(o("scroll",{currentTarget:m,scrollLeft:m.scrollLeft+v}),g.preventDefault())},c=se();Ze(()=>{pt(()=>{c.value=Gt(s.value,"wheel",l)})}),at(()=>{var g;(g=c.value)===null||g===void 0||g.remove()});const u=L(()=>t.flattenColumns.every(g=>g.width&&g.width!==0&&g.width!=="0px")),d=se([]),f=se([]);Ke(()=>{const g=t.flattenColumns[t.flattenColumns.length-1],m={fixed:g?g.fixed:null,scrollbar:!0,customHeaderCell:()=>({class:`${r.prefixCls}-cell-scrollbar`})};d.value=a.value?[...t.columns,m]:t.columns,f.value=a.value?[...t.flattenColumns,m]:t.flattenColumns});const h=L(()=>{const{stickyOffsets:g,direction:m}=t,{right:v,left:b}=g;return A(A({},g),{left:m==="rtl"?[...b.map(y=>y+a.value),0]:b,right:m==="rtl"?v:[...v.map(y=>y+a.value),0],isSticky:r.isSticky})}),p=Lpe(Ue(t,"colWidths"),Ue(t,"columCount"));return()=>{var g;const{noData:m,columCount:v,stickyTopOffset:b,stickyBottomOffset:y,stickyClassName:w,maxContentScroll:x}=t,{isSticky:$}=r;return C("div",{style:A({overflow:"hidden"},$?{top:`${b}px`,bottom:`${y}px`}:{}),ref:s,class:ce(n.class,{[w]:!!w})},[C("table",{style:{tableLayout:"fixed",visibility:m||p.value?null:"hidden"}},[(!m||!x||u.value)&&C(o5,{colWidths:p.value?[...p.value,a.value]:[],columCount:v+1,columns:f.value},null),(g=i.default)===null||g===void 0?void 0:g.call(i,A(A({},t),{stickyOffsets:h.value,columns:d.value,flattenColumns:f.value}))])])}}});function YT(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i[o,Ue(t,o)])))}const Fpe=[],Npe={},hx="rc-table-internal-hook",Bpe=oe({name:"VcTable",inheritAttrs:!1,props:["prefixCls","data","columns","rowKey","tableLayout","scroll","rowClassName","title","footer","id","showHeader","components","customRow","customHeaderRow","direction","expandFixed","expandColumnWidth","expandedRowKeys","defaultExpandedRowKeys","expandedRowRender","expandRowByClick","expandIcon","onExpand","onExpandedRowsChange","onUpdate:expandedRowKeys","defaultExpandAllRows","indentSize","expandIconColumnIndex","expandedRowClassName","childrenColumnName","rowExpandable","sticky","transformColumns","internalHooks","internalRefs","canExpandable","onUpdateInternalRefs","transformCellText"],emits:["expand","expandedRowsChange","updateInternalRefs","update:expandedRowKeys"],setup(t,e){let{attrs:n,slots:i,emit:o}=e;const r=L(()=>t.data||Fpe),a=L(()=>!!r.value.length),s=L(()=>qhe(t.components,{})),l=(de,xe)=>G6(s.value,de)||xe,c=L(()=>{const de=t.rowKey;return typeof de=="function"?de:xe=>xe&&xe[de]}),u=L(()=>t.expandIcon||Ipe),d=L(()=>t.childrenColumnName||"children"),f=L(()=>t.expandedRowRender?"row":t.canExpandable||r.value.some(de=>de&&typeof de=="object"&&de[d.value])?"nest":!1),h=ie([]);Ke(()=>{t.defaultExpandedRowKeys&&(h.value=t.defaultExpandedRowKeys),t.defaultExpandAllRows&&(h.value=kpe(r.value,c.value,d.value))})();const g=L(()=>new Set(t.expandedRowKeys||h.value||[])),m=de=>{const xe=c.value(de,r.value.indexOf(de));let _e;const Oe=g.value.has(xe);Oe?(g.value.delete(xe),_e=[...g.value]):_e=[...g.value,xe],h.value=_e,o("expand",!Oe,de),o("update:expandedRowKeys",_e),o("expandedRowsChange",_e)},v=se(0),[b,y]=wpe(A(A({},uo(t)),{expandable:L(()=>!!t.expandedRowRender),expandedKeys:g,getRowKey:c,onTriggerExpand:m,expandIcon:u}),L(()=>t.internalHooks===hx?t.transformColumns:null)),w=L(()=>({columns:b.value,flattenColumns:y.value})),x=se(),$=se(),S=se(),_=se({scrollWidth:0,clientWidth:0}),P=se(),[O,T]=Mt(!1),[M,I]=Mt(!1),[k,E]=i5(new Map),R=L(()=>uv(y.value)),D=L(()=>R.value.map(de=>k.value.get(de))),F=L(()=>y.value.length),N=Cpe(D,F,Ue(t,"direction")),B=L(()=>t.scroll&&cx(t.scroll.y)),z=L(()=>t.scroll&&cx(t.scroll.x)||!!t.expandFixed),W=L(()=>z.value&&y.value.some(de=>{let{fixed:xe}=de;return xe})),j=se(),U=Rpe(Ue(t,"sticky"),Ue(t,"prefixCls")),V=$t({}),q=L(()=>{const de=Object.values(V)[0];return(B.value||U.value.isSticky)&&de}),Y=(de,xe)=>{xe?V[de]=xe:delete V[de]},J=se({}),Q=se({}),G=se({});Ke(()=>{B.value&&(Q.value={overflowY:"scroll",maxHeight:ss(t.scroll.y)}),z.value&&(J.value={overflowX:"auto"},B.value||(Q.value={overflowY:"hidden"}),G.value={width:t.scroll.x===!0?"auto":ss(t.scroll.x),minWidth:"100%"})});const ee=(de,xe)=>{gm(x.value)&&E(_e=>{if(_e.get(de)!==xe){const Oe=new Map(_e);return Oe.set(de,xe),Oe}return _e})},[X,K]=Spe();function te(de,xe){if(!xe)return;if(typeof xe=="function"){xe(de);return}const _e=xe.$el||xe;_e.scrollLeft!==de&&(_e.scrollLeft=de)}const ue=de=>{let{currentTarget:xe,scrollLeft:_e}=de;var Oe;const Re=t.direction==="rtl",Se=typeof _e=="number"?_e:xe.scrollLeft,Ae=xe||Npe;if((!K()||K()===Ae)&&(X(Ae),te(Se,$.value),te(Se,S.value),te(Se,P.value),te(Se,(Oe=j.value)===null||Oe===void 0?void 0:Oe.setScrollLeft)),xe){const{scrollWidth:Pe,clientWidth:ke}=xe;Re?(T(-Se0)):(T(Se>0),I(Se{z.value&&S.value?ue({currentTarget:S.value}):(T(!1),I(!1))};let re;const ne=de=>{de!==v.value&&(ae(),v.value=x.value?x.value.offsetWidth:de)},le=de=>{let{width:xe}=de;if(clearTimeout(re),v.value===0){ne(xe);return}re=setTimeout(()=>{ne(xe)},100)};ye([z,()=>t.data,()=>t.columns],()=>{z.value&&ae()},{flush:"post"});const[he,pe]=Mt(0);npe(),Ze(()=>{pt(()=>{var de,xe;ae(),pe(eY(S.value).width),_.value={scrollWidth:((de=S.value)===null||de===void 0?void 0:de.scrollWidth)||0,clientWidth:((xe=S.value)===null||xe===void 0?void 0:xe.clientWidth)||0}})}),ri(()=>{pt(()=>{var de,xe;const _e=((de=S.value)===null||de===void 0?void 0:de.scrollWidth)||0,Oe=((xe=S.value)===null||xe===void 0?void 0:xe.clientWidth)||0;(_.value.scrollWidth!==_e||_.value.clientWidth!==Oe)&&(_.value={scrollWidth:_e,clientWidth:Oe})})}),Ke(()=>{t.internalHooks===hx&&t.internalRefs&&t.onUpdateInternalRefs({body:S.value?S.value.$el||S.value:null})},{flush:"post"});const ge=L(()=>t.tableLayout?t.tableLayout:W.value?t.scroll.x==="max-content"?"auto":"fixed":B.value||U.value.isSticky||y.value.some(de=>{let{ellipsis:xe}=de;return xe})?"fixed":"auto"),be=()=>{var de;return a.value?null:((de=i.emptyText)===null||de===void 0?void 0:de.call(i))||"No Data"};Khe($t(A(A({},uo(YT(t,"prefixCls","direction","transformCellText"))),{getComponent:l,scrollbarSize:he,fixedInfoList:L(()=>y.value.map((de,xe)=>CC(xe,xe,y.value,N.value,t.direction))),isSticky:L(()=>U.value.isSticky),summaryCollect:Y}))),hpe($t(A(A({},uo(YT(t,"rowClassName","expandedRowClassName","expandRowByClick","expandedRowRender","expandIconColumnIndex","indentSize"))),{columns:b,flattenColumns:y,tableLayout:ge,expandIcon:u,expandableType:f,onTriggerExpand:m}))),mpe({onColumnResize:ee}),upe({componentWidth:v,fixHeader:B,fixColumn:W,horizonScroll:z});const $e=()=>C(bpe,{data:r.value,measureColumnWidth:B.value||z.value||U.value.isSticky,expandedKeys:g.value,rowExpandable:t.rowExpandable,getRowKey:c.value,customRow:t.customRow,childrenColumnName:d.value},{emptyNode:be}),fe=()=>C(o5,{colWidths:y.value.map(de=>{let{width:xe}=de;return xe}),columns:y.value},null);return()=>{var de;const{prefixCls:xe,scroll:_e,tableLayout:Oe,direction:Re,title:Se=i.title,footer:Ae=i.footer,id:Pe,showHeader:ke,customHeaderRow:Le}=t,{isSticky:De,offsetHeader:je,offsetSummary:ft,offsetScroll:_t,stickyClassName:yt,container:Pt}=U.value,Et=l(["table"],"table"),fn=l(["body"]),yn=(de=i.summary)===null||de===void 0?void 0:de.call(i,{pageData:r.value});let $n=()=>null;const on={colWidths:D.value,columCount:y.value.length,stickyOffsets:N.value,customHeaderRow:Le,fixHeader:B.value,scroll:_e};if(B.value||De){let Zi=()=>null;typeof fn=="function"?(Zi=()=>fn(r.value,{scrollbarSize:he.value,ref:S,onScroll:ue}),on.colWidths=y.value.map((Si,za)=>{let{width:Ie}=Si;const st=za===b.value.length-1?Ie-he.value:Ie;return typeof st=="number"&&!Number.isNaN(st)?st:0})):Zi=()=>C("div",{style:A(A({},J.value),Q.value),onScroll:ue,ref:S,class:ce(`${xe}-body`)},[C(Et,{style:A(A({},G.value),{tableLayout:ge.value})},{default:()=>[fe(),$e(),!q.value&&yn&&C(Jf,{stickyOffsets:N.value,flattenColumns:y.value},{default:()=>[yn]})]})]);const So=A(A(A({noData:!r.value.length,maxContentScroll:z.value&&_e.x==="max-content"},on),w.value),{direction:Re,stickyClassName:yt,onScroll:ue});$n=()=>C(Qe,null,[ke!==!1&&C(XT,H(H({},So),{},{stickyTopOffset:je,class:`${xe}-header`,ref:$}),{default:Si=>C(Qe,null,[C(jT,Si,null),q.value==="top"&&C(Jf,Si,{default:()=>[yn]})])}),Zi(),q.value&&q.value!=="top"&&C(XT,H(H({},So),{},{stickyBottomOffset:ft,class:`${xe}-summary`,ref:P}),{default:Si=>C(Jf,Si,{default:()=>[yn]})}),De&&S.value&&C(Dpe,{ref:j,offsetScroll:_t,scrollBodyRef:S,onScroll:ue,container:Pt,scrollBodySizeInfo:_.value},null)])}else $n=()=>C("div",{style:A(A({},J.value),Q.value),class:ce(`${xe}-content`),onScroll:ue,ref:S},[C(Et,{style:A(A({},G.value),{tableLayout:ge.value})},{default:()=>[fe(),ke!==!1&&C(jT,H(H({},on),w.value),null),$e(),yn&&C(Jf,{stickyOffsets:N.value,flattenColumns:y.value},{default:()=>[yn]})]})]);const Yn=ka(n,{aria:!0,data:!0}),wi=()=>C("div",H(H({},Yn),{},{class:ce(xe,{[`${xe}-rtl`]:Re==="rtl",[`${xe}-ping-left`]:O.value,[`${xe}-ping-right`]:M.value,[`${xe}-layout-fixed`]:Oe==="fixed",[`${xe}-fixed-header`]:B.value,[`${xe}-fixed-column`]:W.value,[`${xe}-scroll-horizontal`]:z.value,[`${xe}-has-fix-left`]:y.value[0]&&y.value[0].fixed,[`${xe}-has-fix-right`]:y.value[F.value-1]&&y.value[F.value-1].fixed==="right",[n.class]:n.class}),style:n.style,id:Pe,ref:x}),[Se&&C(fx,{class:`${xe}-title`},{default:()=>[Se(r.value)]}),C("div",{class:`${xe}-container`},[$n()]),Ae&&C(fx,{class:`${xe}-footer`},{default:()=>[Ae(r.value)]})]);return z.value?C(mo,{onResize:le},{default:wi}):wi()}}});function zpe(){const t=A({},arguments.length<=0?void 0:arguments[0]);for(let e=1;e{const o=n[i];o!==void 0&&(t[i]=o)})}return t}const px=10;function Hpe(t,e){const n={current:t.current,pageSize:t.pageSize};return Object.keys(e&&typeof e=="object"?e:{}).forEach(o=>{const r=t[o];typeof r!="function"&&(n[o]=r)}),n}function Wpe(t,e,n){const i=L(()=>e.value&&typeof e.value=="object"?e.value:{}),o=L(()=>i.value.total||0),[r,a]=Mt(()=>({current:"defaultCurrent"in i.value?i.value.defaultCurrent:1,pageSize:"defaultPageSize"in i.value?i.value.defaultPageSize:px})),s=L(()=>{const u=zpe(r.value,i.value,{total:o.value>0?o.value:t.value}),d=Math.ceil((o.value||t.value)/u.pageSize);return u.current>d&&(u.current=d||1),u}),l=(u,d)=>{e.value!==!1&&a({current:u??1,pageSize:d||s.value.pageSize})},c=(u,d)=>{var f,h;e.value&&((h=(f=i.value).onChange)===null||h===void 0||h.call(f,u,d)),l(u,d),n(u,d||s.value.pageSize)};return[L(()=>e.value===!1?{}:A(A({},s.value),{onChange:c})),l]}function jpe(t,e,n){const i=ie({});ye([t,e,n],()=>{const r=new Map,a=n.value,s=e.value;function l(c){c.forEach((u,d)=>{const f=a(u,d);r.set(f,u),u&&typeof u=="object"&&s in u&&l(u[s]||[])})}l(t.value),i.value={kvMap:r}},{deep:!0,immediate:!0});function o(r){return i.value.kvMap.get(r)}return[o]}const yr={},gx="SELECT_ALL",mx="SELECT_INVERT",vx="SELECT_NONE",Vpe=[];function a5(t,e){let n=[];return(e||[]).forEach(i=>{n.push(i),i&&typeof i=="object"&&t in i&&(n=[...n,...a5(t,i[t])])}),n}function Xpe(t,e){const n=L(()=>{const P=t.value||{},{checkStrictly:O=!0}=P;return A(A({},P),{checkStrictly:O})}),[i,o]=jt(n.value.selectedRowKeys||n.value.defaultSelectedRowKeys||Vpe,{value:L(()=>n.value.selectedRowKeys)}),r=ie(new Map),a=P=>{if(n.value.preserveSelectedRowKeys){const O=new Map;P.forEach(T=>{let M=e.getRecordByKey(T);!M&&r.value.has(T)&&(M=r.value.get(T)),O.set(T,M)}),r.value=O}};Ke(()=>{a(i.value)});const s=L(()=>n.value.checkStrictly?null:rf(e.data.value,{externalGetKey:e.getRowKey.value,childrenPropName:e.childrenColumnName.value}).keyEntities),l=L(()=>a5(e.childrenColumnName.value,e.pageData.value)),c=L(()=>{const P=new Map,O=e.getRowKey.value,T=n.value.getCheckboxProps;return l.value.forEach((M,I)=>{const k=O(M,I),E=(T?T(M):null)||{};P.set(k,E)}),P}),{maxLevel:u,levelEntities:d}=qm(s),f=P=>{var O;return!!(!((O=c.value.get(e.getRowKey.value(P)))===null||O===void 0)&&O.disabled)},h=L(()=>{if(n.value.checkStrictly)return[i.value||[],[]];const{checkedKeys:P,halfCheckedKeys:O}=fo(i.value,!0,s.value,u.value,d.value,f);return[P||[],O]}),p=L(()=>h.value[0]),g=L(()=>h.value[1]),m=L(()=>{const P=n.value.type==="radio"?p.value.slice(0,1):p.value;return new Set(P)}),v=L(()=>n.value.type==="radio"?new Set:new Set(g.value)),[b,y]=Mt(null),w=P=>{let O,T;a(P);const{preserveSelectedRowKeys:M,onChange:I}=n.value,{getRecordByKey:k}=e;M?(O=P,T=P.map(E=>r.value.get(E))):(O=[],T=[],P.forEach(E=>{const R=k(E);R!==void 0&&(O.push(E),T.push(R))})),o(O),I==null||I(O,T)},x=(P,O,T,M)=>{const{onSelect:I}=n.value,{getRecordByKey:k}=e||{};if(I){const E=T.map(R=>k(R));I(k(P),O,E,M)}w(T)},$=L(()=>{const{onSelectInvert:P,onSelectNone:O,selections:T,hideSelectAll:M}=n.value,{data:I,pageData:k,getRowKey:E,locale:R}=e;return!T||M?null:(T===!0?[gx,mx,vx]:T).map(F=>F===gx?{key:"all",text:R.value.selectionAll,onSelect(){w(I.value.map((N,B)=>E.value(N,B)).filter(N=>{const B=c.value.get(N);return!(B!=null&&B.disabled)||m.value.has(N)}))}}:F===mx?{key:"invert",text:R.value.selectInvert,onSelect(){const N=new Set(m.value);k.value.forEach((z,W)=>{const j=E.value(z,W),U=c.value.get(j);U!=null&&U.disabled||(N.has(j)?N.delete(j):N.add(j))});const B=Array.from(N);P&&(Nt(!1,"Table","`onSelectInvert` will be removed in future. Please use `onChange` instead."),P(B)),w(B)}}:F===vx?{key:"none",text:R.value.selectNone,onSelect(){O==null||O(),w(Array.from(m.value).filter(N=>{const B=c.value.get(N);return B==null?void 0:B.disabled}))}}:F)}),S=L(()=>l.value.length);return[P=>{var O;const{onSelectAll:T,onSelectMultiple:M,columnWidth:I,type:k,fixed:E,renderCell:R,hideSelectAll:D,checkStrictly:F}=n.value,{prefixCls:N,getRecordByKey:B,getRowKey:z,expandType:W,getPopupContainer:j}=e;if(!t.value)return P.filter(ne=>ne!==yr);let U=P.slice();const V=new Set(m.value),q=l.value.map(z.value).filter(ne=>!c.value.get(ne).disabled),Y=q.every(ne=>V.has(ne)),J=q.some(ne=>V.has(ne)),Q=()=>{const ne=[];Y?q.forEach(he=>{V.delete(he),ne.push(he)}):q.forEach(he=>{V.has(he)||(V.add(he),ne.push(he))});const le=Array.from(V);T==null||T(!Y,le.map(he=>B(he)),ne.map(he=>B(he))),w(le)};let G;if(k!=="radio"){let ne;if($.value){const be=C(sn,{getPopupContainer:j.value},{default:()=>[$.value.map(($e,fe)=>{const{key:de,text:xe,onSelect:_e}=$e;return C(sn.Item,{key:de||fe,onClick:()=>{_e==null||_e(q)}},{default:()=>[xe]})})]});ne=C("div",{class:`${N.value}-selection-extra`},[C(Io,{overlay:be,getPopupContainer:j.value},{default:()=>[C("span",null,[C(nl,null,null)])]})])}const le=l.value.map((be,$e)=>{const fe=z.value(be,$e),de=c.value.get(fe)||{};return A({checked:V.has(fe)},de)}).filter(be=>{let{disabled:$e}=be;return $e}),he=!!le.length&&le.length===S.value,pe=he&&le.every(be=>{let{checked:$e}=be;return $e}),ge=he&&le.some(be=>{let{checked:$e}=be;return $e});G=!D&&C("div",{class:`${N.value}-selection`},[C(ho,{checked:he?pe:!!S.value&&Y,indeterminate:he?!pe&&ge:!Y&&J,onChange:Q,disabled:S.value===0||he,"aria-label":ne?"Custom selection":"Select all",skipGroup:!0},null),ne])}let ee;k==="radio"?ee=ne=>{let{record:le,index:he}=ne;const pe=z.value(le,he),ge=V.has(pe);return{node:C(di,H(H({},c.value.get(pe)),{},{checked:ge,onClick:be=>be.stopPropagation(),onChange:be=>{V.has(pe)||x(pe,!0,[pe],be.nativeEvent)}}),null),checked:ge}}:ee=ne=>{let{record:le,index:he}=ne;var pe;const ge=z.value(le,he),be=V.has(ge),$e=v.value.has(ge),fe=c.value.get(ge);let de;return W.value==="nest"?(de=$e,Nt(typeof(fe==null?void 0:fe.indeterminate)!="boolean","Table","set `indeterminate` using `rowSelection.getCheckboxProps` is not allowed with tree structured dataSource.")):de=(pe=fe==null?void 0:fe.indeterminate)!==null&&pe!==void 0?pe:$e,{node:C(ho,H(H({},fe),{},{indeterminate:de,checked:be,skipGroup:!0,onClick:xe=>xe.stopPropagation(),onChange:xe=>{let{nativeEvent:_e}=xe;const{shiftKey:Oe}=_e;let Re=-1,Se=-1;if(Oe&&F){const Ae=new Set([b.value,ge]);q.some((Pe,ke)=>{if(Ae.has(Pe))if(Re===-1)Re=ke;else return Se=ke,!0;return!1})}if(Se!==-1&&Re!==Se&&F){const Ae=q.slice(Re,Se+1),Pe=[];be?Ae.forEach(Le=>{V.has(Le)&&(Pe.push(Le),V.delete(Le))}):Ae.forEach(Le=>{V.has(Le)||(Pe.push(Le),V.add(Le))});const ke=Array.from(V);M==null||M(!be,ke.map(Le=>B(Le)),Pe.map(Le=>B(Le))),w(ke)}else{const Ae=p.value;if(F){const Pe=be?Go(Ae,ge):vr(Ae,ge);x(ge,!be,Pe,_e)}else{const Pe=fo([...Ae,ge],!0,s.value,u.value,d.value,f),{checkedKeys:ke,halfCheckedKeys:Le}=Pe;let De=ke;if(be){const je=new Set(ke);je.delete(ge),De=fo(Array.from(je),{halfCheckedKeys:Le},s.value,u.value,d.value,f).checkedKeys}x(ge,!be,De,_e)}}y(ge)}}),null),checked:be}};const X=ne=>{let{record:le,index:he}=ne;const{node:pe,checked:ge}=ee({record:le,index:he});return R?R(ge,le,he,pe):pe};if(!U.includes(yr))if(U.findIndex(ne=>{var le;return((le=ne[tc])===null||le===void 0?void 0:le.columnType)==="EXPAND_COLUMN"})===0){const[ne,...le]=U;U=[ne,yr,...le]}else U=[yr,...U];const K=U.indexOf(yr);U=U.filter((ne,le)=>ne!==yr||le===K);const te=U[K-1],ue=U[K+1];let ae=E;ae===void 0&&((ue==null?void 0:ue.fixed)!==void 0?ae=ue.fixed:(te==null?void 0:te.fixed)!==void 0&&(ae=te.fixed)),ae&&te&&((O=te[tc])===null||O===void 0?void 0:O.columnType)==="EXPAND_COLUMN"&&te.fixed===void 0&&(te.fixed=ae);const re={fixed:ae,width:I,className:`${N.value}-selection-column`,title:n.value.columnTitle||G,customRender:X,[tc]:{class:`${N.value}-selection-col`}};return U.map(ne=>ne===yr?re:ne)},m]}var Ype={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"};function GT(t){for(var e=1;e0&&arguments[0]!==void 0?arguments[0]:[];const e=Dt(t),n=[];return e.forEach(i=>{var o,r,a,s;if(!i)return;const l=i.key,c=((o=i.props)===null||o===void 0?void 0:o.style)||{},u=((r=i.props)===null||r===void 0?void 0:r.class)||"",d=i.props||{};for(const[m,v]of Object.entries(d))d[wc(m)]=v;const f=i.children||{},{default:h}=f,p=qpe(f,["default"]),g=A(A(A({},p),d),{style:c,class:u});if(l&&(g.key=l),!((a=i.type)===null||a===void 0)&&a.__ANT_TABLE_COLUMN_GROUP)g.children=s5(typeof h=="function"?h():h);else{const m=(s=i.children)===null||s===void 0?void 0:s.default;g.customRender=g.customRender||m}n.push(g)}),n}const Vh="ascend",Qb="descend";function yg(t){return typeof t.sorter=="object"&&typeof t.sorter.multiple=="number"?t.sorter.multiple:!1}function UT(t){return typeof t=="function"?t:t&&typeof t=="object"&&t.compare?t.compare:!1}function Zpe(t,e){return e?t[t.indexOf(e)+1]:t[0]}function bx(t,e,n){let i=[];function o(r,a){i.push({column:r,key:Bs(r,a),multiplePriority:yg(r),sortOrder:r.sortOrder})}return(t||[]).forEach((r,a)=>{const s=uf(a,n);r.children?("sortOrder"in r&&o(r,s),i=[...i,...bx(r.children,e,s)]):r.sorter&&("sortOrder"in r?o(r,s):e&&r.defaultSortOrder&&i.push({column:r,key:Bs(r,s),multiplePriority:yg(r),sortOrder:r.defaultSortOrder}))}),i}function l5(t,e,n,i,o,r,a,s){return(e||[]).map((l,c)=>{const u=uf(c,s);let d=l;if(d.sorter){const f=d.sortDirections||o,h=d.showSorterTooltip===void 0?a:d.showSorterTooltip,p=Bs(d,u),g=n.find(P=>{let{key:O}=P;return O===p}),m=g?g.sortOrder:null,v=Zpe(f,m),b=f.includes(Vh)&&C(AC,{class:ce(`${t}-column-sorter-up`,{active:m===Vh}),role:"presentation"},null),y=f.includes(Qb)&&C($C,{role:"presentation",class:ce(`${t}-column-sorter-down`,{active:m===Qb})},null),{cancelSort:w,triggerAsc:x,triggerDesc:$}=r||{};let S=w;v===Qb?S=$:v===Vh&&(S=x);const _=typeof h=="object"?h:{title:S};d=A(A({},d),{className:ce(d.className,{[`${t}-column-sort`]:m}),title:P=>{const O=C("div",{class:`${t}-column-sorters`},[C("span",{class:`${t}-column-title`},[_C(l.title,P)]),C("span",{class:ce(`${t}-column-sorter`,{[`${t}-column-sorter-full`]:!!(b&&y)})},[C("span",{class:`${t}-column-sorter-inner`},[b,y])])]);return h?C(Pi,_,{default:()=>[O]}):O},customHeaderCell:P=>{const O=l.customHeaderCell&&l.customHeaderCell(P)||{},T=O.onClick,M=O.onKeydown;return O.onClick=I=>{i({column:l,key:p,sortOrder:v,multiplePriority:yg(l)}),T&&T(I)},O.onKeydown=I=>{I.keyCode===Te.ENTER&&(i({column:l,key:p,sortOrder:v,multiplePriority:yg(l)}),M==null||M(I))},m&&(O["aria-sort"]=m==="ascend"?"ascending":"descending"),O.class=ce(O.class,`${t}-column-has-sorters`),O.tabindex=0,O}})}return"children"in d&&(d=A(A({},d),{children:l5(t,d.children,n,i,o,r,a,u)})),d})}function qT(t){const{column:e,sortOrder:n}=t;return{column:e,order:n,field:e.dataIndex,columnKey:e.key}}function ZT(t){const e=t.filter(n=>{let{sortOrder:i}=n;return i}).map(qT);return e.length===0&&t.length?A(A({},qT(t[t.length-1])),{column:void 0}):e.length<=1?e[0]||{}:e}function yx(t,e,n){const i=e.slice().sort((a,s)=>s.multiplePriority-a.multiplePriority),o=t.slice(),r=i.filter(a=>{let{column:{sorter:s},sortOrder:l}=a;return UT(s)&&l});return r.length?o.sort((a,s)=>{for(let l=0;l{const s=a[n];return s?A(A({},a),{[n]:yx(s,e,n)}):a}):o}function Jpe(t){let{prefixCls:e,mergedColumns:n,onSorterChange:i,sortDirections:o,tableLocale:r,showSorterTooltip:a}=t;const[s,l]=Mt(bx(n.value,!0)),c=L(()=>{let p=!0;const g=bx(n.value,!1);if(!g.length)return s.value;const m=[];function v(y){p?m.push(y):m.push(A(A({},y),{sortOrder:null}))}let b=null;return g.forEach(y=>{b===null?(v(y),y.sortOrder&&(y.multiplePriority===!1?p=!1:b=!0)):(b&&y.multiplePriority!==!1||(p=!1),v(y))}),m}),u=L(()=>{const p=c.value.map(g=>{let{column:m,sortOrder:v}=g;return{column:m,order:v}});return{sortColumns:p,sortColumn:p[0]&&p[0].column,sortOrder:p[0]&&p[0].order}});function d(p){let g;p.multiplePriority===!1||!c.value.length||c.value[0].multiplePriority===!1?g=[p]:g=[...c.value.filter(m=>{let{key:v}=m;return v!==p.key}),p],l(g),i(ZT(g),g)}const f=p=>l5(e.value,p,c.value,d,o.value,r.value,a.value),h=L(()=>ZT(c.value));return[f,c,u,h]}var Qpe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"};function JT(t){for(var e=1;e{const{keyCode:e}=t;e===Te.ENTER&&t.stopPropagation()},nge=(t,e)=>{let{slots:n}=e;var i;return C("div",{onClick:o=>o.stopPropagation(),onKeydown:tge},[(i=n.default)===null||i===void 0?void 0:i.call(n)])},QT=oe({compatConfig:{MODE:3},name:"FilterSearch",inheritAttrs:!1,props:{value:Ne(),onChange:ve(),filterSearch:Xe([Boolean,Function]),tablePrefixCls:Ne(),locale:Fe()},setup(t){return()=>{const{value:e,onChange:n,filterSearch:i,tablePrefixCls:o,locale:r}=t;return i?C("div",{class:`${o}-filter-dropdown-search`},[C(wn,{placeholder:r.filterSearchPlaceholder,onChange:n,value:e,htmlSize:1,class:`${o}-filter-dropdown-search-input`},{prefix:()=>C(Pc,null,null)})]):null}}});var eO=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);ot.motion?t.motion:Zd()),l=(c,u)=>{var d,f,h,p;u==="appear"?(f=(d=s.value)===null||d===void 0?void 0:d.onAfterEnter)===null||f===void 0||f.call(d,c):u==="leave"&&((p=(h=s.value)===null||h===void 0?void 0:h.onAfterLeave)===null||p===void 0||p.call(h,c)),a.value||t.onMotionEnd(),a.value=!0};return ye(()=>t.motionNodes,()=>{t.motionNodes&&t.motionType==="hide"&&o.value&&pt(()=>{o.value=!1})},{immediate:!0,flush:"post"}),Ze(()=>{t.motionNodes&&t.onMotionStart()}),at(()=>{t.motionNodes&&l()}),()=>{const{motion:c,motionNodes:u,motionType:d,active:f,eventKey:h}=t,p=eO(t,["motion","motionNodes","motionType","active","eventKey"]);return u?C(En,H(H({},s.value),{},{appear:d==="show",onAfterAppear:g=>l(g,"appear"),onAfterLeave:g=>l(g,"leave")}),{default:()=>[ni(C("div",{class:`${r.value.prefixCls}-treenode-motion`},[u.map(g=>{const m=eO(g.data,[]),{title:v,key:b,isStart:y,isEnd:w}=g;return delete m.children,C(jy,H(H({},m),{},{title:v,active:f,data:g.data,key:b,eventKey:b,isStart:y,isEnd:w}),i)})]),[[vi,o.value]])]}):C(jy,H(H({class:n.class,style:n.style},p),{},{active:f,eventKey:h}),i)}}});function oge(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const n=t.length,i=e.length;if(Math.abs(n-i)!==1)return{add:!1,key:null};function o(r,a){const s=new Map;r.forEach(c=>{s.set(c,!0)});const l=a.filter(c=>!s.has(c));return l.length===1?l[0]:null}return na.key===n),o=t[i+1],r=e.findIndex(a=>a.key===n);if(o){const a=e.findIndex(s=>s.key===o.key);return e.slice(r+1,a)}return e.slice(r+1)}var nO=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{},zs=`RC_TREE_MOTION_${Math.random()}`,xx={key:zs},c5={key:zs,level:0,index:0,pos:"0",node:xx,nodes:[xx]},oO={parent:null,children:[],pos:c5.pos,data:xx,title:null,key:zs,isStart:[],isEnd:[]};function rO(t,e,n,i){return e===!1||!n?t:t.slice(0,Math.ceil(n/i)+1)}function aO(t){const{key:e,pos:n}=t;return of(e,n)}function age(t){let e=String(t.key),n=t;for(;n.parent;)n=n.parent,e=`${n.key} > ${e}`;return e}const sge=oe({compatConfig:{MODE:3},name:"NodeList",inheritAttrs:!1,props:uoe,setup(t,e){let{expose:n,attrs:i}=e;const o=se(),r=se(),{expandedKeys:a,flattenNodes:s}=H4();n({scrollTo:g=>{o.value.scrollTo(g)},getIndentWidth:()=>r.value.offsetWidth});const l=ie(s.value),c=ie([]),u=se(null);function d(){l.value=s.value,c.value=[],u.value=null,t.onListChangeEnd()}const f=zS();ye([()=>a.value.slice(),s],(g,m)=>{let[v,b]=g,[y,w]=m;const x=oge(y,v);if(x.key!==null){const{virtual:$,height:S,itemHeight:_}=t;if(x.add){const P=w.findIndex(M=>{let{key:I}=M;return I===x.key}),O=rO(tO(w,b,x.key),$,S,_),T=w.slice();T.splice(P+1,0,oO),l.value=T,c.value=O,u.value="show"}else{const P=b.findIndex(M=>{let{key:I}=M;return I===x.key}),O=rO(tO(b,w,x.key),$,S,_),T=b.slice();T.splice(P+1,0,oO),l.value=T,c.value=O,u.value="hide"}}else w!==b&&(l.value=b)}),ye(()=>f.value.dragging,g=>{g||d()});const h=L(()=>t.motion===void 0?l.value:s.value),p=()=>{t.onActiveChange(null)};return()=>{const g=A(A({},t),i),{prefixCls:m,selectable:v,checkable:b,disabled:y,motion:w,height:x,itemHeight:$,virtual:S,focusable:_,activeItem:P,focused:O,tabindex:T,onKeydown:M,onFocus:I,onBlur:k,onListChangeStart:E,onListChangeEnd:R}=g,D=nO(g,["prefixCls","selectable","checkable","disabled","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabindex","onKeydown","onFocus","onBlur","onListChangeStart","onListChangeEnd"]);return C(Qe,null,[O&&P&&C("span",{style:iO,"aria-live":"assertive"},[age(P)]),C("div",null,[C("input",{style:iO,disabled:_===!1||y,tabindex:_!==!1?T:null,onKeydown:M,onFocus:I,onBlur:k,value:"",onChange:rge,"aria-label":"for screen reader"},null)]),C("div",{class:`${m}-treenode`,"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden"}},[C("div",{class:`${m}-indent`},[C("div",{ref:r,class:`${m}-indent-unit`},null)])]),C(AR,H(H({},ht(D,["onActiveChange"])),{},{data:h.value,itemKey:aO,height:x,fullHeight:!1,virtual:S,itemHeight:$,prefixCls:`${m}-list`,ref:o,onVisibleChange:(F,N)=>{const B=new Set(F);N.filter(W=>!B.has(W)).some(W=>aO(W)===zs)&&d()}}),{default:F=>{const{pos:N}=F,B=nO(F.data,[]),{title:z,key:W,isStart:j,isEnd:U}=F,V=of(W,N);return delete B.key,delete B.children,C(ige,H(H({},B),{},{eventKey:V,title:z,active:!!P&&W===P.key,data:F.data,isStart:j,isEnd:U,motion:w,motionNodes:W===zs?c.value:null,motionType:u.value,onMotionStart:E,onMotionEnd:d,onMousemove:p}),null)}})])}}});function lge(t){let{dropPosition:e,dropLevelOffset:n,indent:i}=t;const o={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:"2px"};switch(e){case-1:o.top=0,o.left=`${-n*i}px`;break;case 1:o.bottom=0,o.left=`${-n*i}px`;break;case 0:o.bottom=0,o.left=`${i}`;break}return C("div",{style:o},null)}const cge=10,u5=oe({compatConfig:{MODE:3},name:"Tree",inheritAttrs:!1,props:ct(j4(),{prefixCls:"vc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,expandAction:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:lge,allowDrop:()=>!0}),setup(t,e){let{attrs:n,slots:i,expose:o}=e;const r=ie(!1);let a={};const s=ie(),l=ie([]),c=ie([]),u=ie([]),d=ie([]),f=ie([]),h=ie([]),p={},g=$t({draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null}),m=ie([]);ye([()=>t.treeData,()=>t.children],()=>{m.value=t.treeData!==void 0?t.treeData.slice():Xy(dt(t.children))},{immediate:!0,deep:!0});const v=ie({}),b=ie(!1),y=ie(null),w=ie(!1),x=L(()=>Ym(t.fieldNames)),$=ie();let S=null,_=null,P=null;const O=L(()=>({expandedKeysSet:T.value,selectedKeysSet:M.value,loadedKeysSet:I.value,loadingKeysSet:k.value,checkedKeysSet:E.value,halfCheckedKeysSet:R.value,dragOverNodeKey:g.dragOverNodeKey,dropPosition:g.dropPosition,keyEntities:v.value})),T=L(()=>new Set(h.value)),M=L(()=>new Set(l.value)),I=L(()=>new Set(d.value)),k=L(()=>new Set(f.value)),E=L(()=>new Set(c.value)),R=L(()=>new Set(u.value));Ke(()=>{if(m.value){const Se=rf(m.value,{fieldNames:x.value});v.value=A({[zs]:c5},Se.keyEntities)}});let D=!1;ye([()=>t.expandedKeys,()=>t.autoExpandParent,v],(Se,Ae)=>{let[Pe,ke]=Se,[Le,De]=Ae,je=h.value;if(t.expandedKeys!==void 0||D&&ke!==De)je=t.autoExpandParent||!D&&t.defaultExpandParent?Vy(t.expandedKeys,v.value):t.expandedKeys;else if(!D&&t.defaultExpandAll){const ft=A({},v.value);delete ft[zs],je=Object.keys(ft).map(_t=>ft[_t].key)}else!D&&t.defaultExpandedKeys&&(je=t.autoExpandParent||t.defaultExpandParent?Vy(t.defaultExpandedKeys,v.value):t.defaultExpandedKeys);je&&(h.value=je),D=!0},{immediate:!0});const F=ie([]);Ke(()=>{F.value=boe(m.value,h.value,x.value)}),Ke(()=>{t.selectable&&(t.selectedKeys!==void 0?l.value=vP(t.selectedKeys,t):!D&&t.defaultSelectedKeys&&(l.value=vP(t.defaultSelectedKeys,t)))});const{maxLevel:N,levelEntities:B}=qm(v);Ke(()=>{if(t.checkable){let Se;if(t.checkedKeys!==void 0?Se=Rb(t.checkedKeys)||{}:!D&&t.defaultCheckedKeys?Se=Rb(t.defaultCheckedKeys)||{}:m.value&&(Se=Rb(t.checkedKeys)||{checkedKeys:c.value,halfCheckedKeys:u.value}),Se){let{checkedKeys:Ae=[],halfCheckedKeys:Pe=[]}=Se;t.checkStrictly||({checkedKeys:Ae,halfCheckedKeys:Pe}=fo(Ae,!0,v.value,N.value,B.value)),c.value=Ae,u.value=Pe}}}),Ke(()=>{t.loadedKeys&&(d.value=t.loadedKeys)});const z=()=>{A(g,{dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})},W=Se=>{$.value.scrollTo(Se)};ye(()=>t.activeKey,()=>{t.activeKey!==void 0&&(y.value=t.activeKey)},{immediate:!0}),ye(y,Se=>{pt(()=>{Se!==null&&W({key:Se})})},{immediate:!0,flush:"post"});const j=Se=>{t.expandedKeys===void 0&&(h.value=Se)},U=()=>{g.draggingNodeKey!==null&&A(g,{draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),S=null,P=null},V=(Se,Ae)=>{const{onDragend:Pe}=t;g.dragOverNodeKey=null,U(),Pe==null||Pe({event:Se,node:Ae.eventData}),_=null},q=Se=>{V(Se,null),window.removeEventListener("dragend",q)},Y=(Se,Ae)=>{const{onDragstart:Pe}=t,{eventKey:ke,eventData:Le}=Ae;_=Ae,S={x:Se.clientX,y:Se.clientY};const De=Go(h.value,ke);g.draggingNodeKey=ke,g.dragChildrenKeys=poe(ke,v.value),s.value=$.value.getIndentWidth(),j(De),window.addEventListener("dragend",q),Pe&&Pe({event:Se,node:Le})},J=(Se,Ae)=>{const{onDragenter:Pe,onExpand:ke,allowDrop:Le,direction:De}=t,{pos:je,eventKey:ft}=Ae;if(P!==ft&&(P=ft),!_){z();return}const{dropPosition:_t,dropLevelOffset:yt,dropTargetKey:Pt,dropContainerKey:Et,dropTargetPos:fn,dropAllowed:yn,dragOverNodeKey:$n}=mP(Se,_,Ae,s.value,S,Le,F.value,v.value,T.value,De);if(g.dragChildrenKeys.indexOf(Pt)!==-1||!yn){z();return}if(a||(a={}),Object.keys(a).forEach(on=>{clearTimeout(a[on])}),_.eventKey!==Ae.eventKey&&(a[je]=window.setTimeout(()=>{if(g.draggingNodeKey===null)return;let on=h.value.slice();const Yn=v.value[Ae.eventKey];Yn&&(Yn.children||[]).length&&(on=vr(h.value,Ae.eventKey)),j(on),ke&&ke(on,{node:Ae.eventData,expanded:!0,nativeEvent:Se})},800)),_.eventKey===Pt&&yt===0){z();return}A(g,{dragOverNodeKey:$n,dropPosition:_t,dropLevelOffset:yt,dropTargetKey:Pt,dropContainerKey:Et,dropTargetPos:fn,dropAllowed:yn}),Pe&&Pe({event:Se,node:Ae.eventData,expandedKeys:h.value})},Q=(Se,Ae)=>{const{onDragover:Pe,allowDrop:ke,direction:Le}=t;if(!_)return;const{dropPosition:De,dropLevelOffset:je,dropTargetKey:ft,dropContainerKey:_t,dropAllowed:yt,dropTargetPos:Pt,dragOverNodeKey:Et}=mP(Se,_,Ae,s.value,S,ke,F.value,v.value,T.value,Le);g.dragChildrenKeys.indexOf(ft)!==-1||!yt||(_.eventKey===ft&&je===0?g.dropPosition===null&&g.dropLevelOffset===null&&g.dropTargetKey===null&&g.dropContainerKey===null&&g.dropTargetPos===null&&g.dropAllowed===!1&&g.dragOverNodeKey===null||z():De===g.dropPosition&&je===g.dropLevelOffset&&ft===g.dropTargetKey&&_t===g.dropContainerKey&&Pt===g.dropTargetPos&&yt===g.dropAllowed&&Et===g.dragOverNodeKey||A(g,{dropPosition:De,dropLevelOffset:je,dropTargetKey:ft,dropContainerKey:_t,dropTargetPos:Pt,dropAllowed:yt,dragOverNodeKey:Et}),Pe&&Pe({event:Se,node:Ae.eventData}))},G=(Se,Ae)=>{P===Ae.eventKey&&!Se.currentTarget.contains(Se.relatedTarget)&&(z(),P=null);const{onDragleave:Pe}=t;Pe&&Pe({event:Se,node:Ae.eventData})},ee=function(Se,Ae){let Pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var ke;const{dragChildrenKeys:Le,dropPosition:De,dropTargetKey:je,dropTargetPos:ft,dropAllowed:_t}=g;if(!_t)return;const{onDrop:yt}=t;if(g.dragOverNodeKey=null,U(),je===null)return;const Pt=A(A({},Ph(je,dt(O.value))),{active:((ke=xe.value)===null||ke===void 0?void 0:ke.key)===je,data:v.value[je].node});Le.indexOf(je);const Et=HS(ft),fn={event:Se,node:Th(Pt),dragNode:_?_.eventData:null,dragNodesKeys:[_.eventKey].concat(Le),dropToGap:De!==0,dropPosition:De+Number(Et[Et.length-1])};Pe||yt==null||yt(fn),_=null},X=(Se,Ae)=>{const{expanded:Pe,key:ke}=Ae,Le=F.value.filter(je=>je.key===ke)[0],De=Th(A(A({},Ph(ke,O.value)),{data:Le.data}));j(Pe?Go(h.value,ke):vr(h.value,ke)),be(Se,De)},K=(Se,Ae)=>{const{onClick:Pe,expandAction:ke}=t;ke==="click"&&X(Se,Ae),Pe&&Pe(Se,Ae)},te=(Se,Ae)=>{const{onDblclick:Pe,expandAction:ke}=t;(ke==="doubleclick"||ke==="dblclick")&&X(Se,Ae),Pe&&Pe(Se,Ae)},ue=(Se,Ae)=>{let Pe=l.value;const{onSelect:ke,multiple:Le}=t,{selected:De}=Ae,je=Ae[x.value.key],ft=!De;ft?Le?Pe=vr(Pe,je):Pe=[je]:Pe=Go(Pe,je);const _t=v.value,yt=Pe.map(Pt=>{const Et=_t[Pt];return Et?Et.node:null}).filter(Pt=>Pt);t.selectedKeys===void 0&&(l.value=Pe),ke&&ke(Pe,{event:"select",selected:ft,node:Ae,selectedNodes:yt,nativeEvent:Se})},ae=(Se,Ae,Pe)=>{const{checkStrictly:ke,onCheck:Le}=t,De=Ae[x.value.key];let je;const ft={event:"check",node:Ae,checked:Pe,nativeEvent:Se},_t=v.value;if(ke){const yt=Pe?vr(c.value,De):Go(c.value,De),Pt=Go(u.value,De);je={checked:yt,halfChecked:Pt},ft.checkedNodes=yt.map(Et=>_t[Et]).filter(Et=>Et).map(Et=>Et.node),t.checkedKeys===void 0&&(c.value=yt)}else{let{checkedKeys:yt,halfCheckedKeys:Pt}=fo([...c.value,De],!0,_t,N.value,B.value);if(!Pe){const Et=new Set(yt);Et.delete(De),{checkedKeys:yt,halfCheckedKeys:Pt}=fo(Array.from(Et),{halfCheckedKeys:Pt},_t,N.value,B.value)}je=yt,ft.checkedNodes=[],ft.checkedNodesPositions=[],ft.halfCheckedKeys=Pt,yt.forEach(Et=>{const fn=_t[Et];if(!fn)return;const{node:yn,pos:$n}=fn;ft.checkedNodes.push(yn),ft.checkedNodesPositions.push({node:yn,pos:$n})}),t.checkedKeys===void 0&&(c.value=yt,u.value=Pt)}Le&&Le(je,ft)},re=Se=>{const Ae=Se[x.value.key],Pe=new Promise((ke,Le)=>{const{loadData:De,onLoad:je}=t;if(!De||I.value.has(Ae)||k.value.has(Ae))return null;De(Se).then(()=>{const _t=vr(d.value,Ae),yt=Go(f.value,Ae);je&&je(_t,{event:"load",node:Se}),t.loadedKeys===void 0&&(d.value=_t),f.value=yt,ke()}).catch(_t=>{const yt=Go(f.value,Ae);if(f.value=yt,p[Ae]=(p[Ae]||0)+1,p[Ae]>=cge){const Pt=vr(d.value,Ae);t.loadedKeys===void 0&&(d.value=Pt),ke()}Le(_t)}),f.value=vr(f.value,Ae)});return Pe.catch(()=>{}),Pe},ne=(Se,Ae)=>{const{onMouseenter:Pe}=t;Pe&&Pe({event:Se,node:Ae})},le=(Se,Ae)=>{const{onMouseleave:Pe}=t;Pe&&Pe({event:Se,node:Ae})},he=(Se,Ae)=>{const{onRightClick:Pe}=t;Pe&&(Se.preventDefault(),Pe({event:Se,node:Ae}))},pe=Se=>{const{onFocus:Ae}=t;b.value=!0,Ae&&Ae(Se)},ge=Se=>{const{onBlur:Ae}=t;b.value=!1,de(null),Ae&&Ae(Se)},be=(Se,Ae)=>{let Pe=h.value;const{onExpand:ke,loadData:Le}=t,{expanded:De}=Ae,je=Ae[x.value.key];if(w.value)return;Pe.indexOf(je);const ft=!De;if(ft?Pe=vr(Pe,je):Pe=Go(Pe,je),j(Pe),ke&&ke(Pe,{node:Ae,expanded:ft,nativeEvent:Se}),ft&&Le){const _t=re(Ae);_t&&_t.then(()=>{}).catch(yt=>{const Pt=Go(h.value,je);j(Pt),Promise.reject(yt)})}},$e=()=>{w.value=!0},fe=()=>{setTimeout(()=>{w.value=!1})},de=Se=>{const{onActiveChange:Ae}=t;y.value!==Se&&(t.activeKey!==void 0&&(y.value=Se),Se!==null&&W({key:Se}),Ae&&Ae(Se))},xe=L(()=>y.value===null?null:F.value.find(Se=>{let{key:Ae}=Se;return Ae===y.value})||null),_e=Se=>{let Ae=F.value.findIndex(ke=>{let{key:Le}=ke;return Le===y.value});Ae===-1&&Se<0&&(Ae=F.value.length),Ae=(Ae+Se+F.value.length)%F.value.length;const Pe=F.value[Ae];if(Pe){const{key:ke}=Pe;de(ke)}else de(null)},Oe=L(()=>Th(A(A({},Ph(y.value,O.value)),{data:xe.value.data,active:!0}))),Re=Se=>{const{onKeydown:Ae,checkable:Pe,selectable:ke}=t;switch(Se.which){case Te.UP:{_e(-1),Se.preventDefault();break}case Te.DOWN:{_e(1),Se.preventDefault();break}}const Le=xe.value;if(Le&&Le.data){const De=Le.data.isLeaf===!1||!!(Le.data.children||[]).length,je=Oe.value;switch(Se.which){case Te.LEFT:{De&&T.value.has(y.value)?be({},je):Le.parent&&de(Le.parent.key),Se.preventDefault();break}case Te.RIGHT:{De&&!T.value.has(y.value)?be({},je):Le.children&&Le.children.length&&de(Le.children[0].key),Se.preventDefault();break}case Te.ENTER:case Te.SPACE:{Pe&&!je.disabled&&je.checkable!==!1&&!je.disableCheckbox?ae({},je,!E.value.has(y.value)):!Pe&&ke&&!je.disabled&&je.selectable!==!1&&ue({},je);break}}}Ae&&Ae(Se)};return o({onNodeExpand:be,scrollTo:W,onKeydown:Re,selectedKeys:L(()=>l.value),checkedKeys:L(()=>c.value),halfCheckedKeys:L(()=>u.value),loadedKeys:L(()=>d.value),loadingKeys:L(()=>f.value),expandedKeys:L(()=>h.value)}),Xn(()=>{window.removeEventListener("dragend",q),r.value=!0}),loe({expandedKeys:h,selectedKeys:l,loadedKeys:d,loadingKeys:f,checkedKeys:c,halfCheckedKeys:u,expandedKeysSet:T,selectedKeysSet:M,loadedKeysSet:I,loadingKeysSet:k,checkedKeysSet:E,halfCheckedKeysSet:R,flattenNodes:F}),()=>{const{draggingNodeKey:Se,dropLevelOffset:Ae,dropContainerKey:Pe,dropTargetKey:ke,dropPosition:Le,dragOverNodeKey:De}=g,{prefixCls:je,showLine:ft,focusable:_t,tabindex:yt=0,selectable:Pt,showIcon:Et,icon:fn=i.icon,switcherIcon:yn,draggable:$n,checkable:on,checkStrictly:Yn,disabled:wi,motion:Zi,loadData:So,filterTreeNode:Si,height:za,itemHeight:Ie,virtual:st,dropIndicatorRender:tt,onContextmenu:Lt,onScroll:xn,direction:rn,rootClassName:Ci,rootStyle:Ln}=t,{class:jo,style:Ii}=n,Ji=ka(A(A({},t),n),{aria:!0,data:!0});let Ut;return $n?typeof $n=="object"?Ut=$n:typeof $n=="function"?Ut={nodeDraggable:$n}:Ut={}:Ut=!1,C(soe,{value:{prefixCls:je,selectable:Pt,showIcon:Et,icon:fn,switcherIcon:yn,draggable:Ut,draggingNodeKey:Se,checkable:on,customCheckable:i.checkable,checkStrictly:Yn,disabled:wi,keyEntities:v.value,dropLevelOffset:Ae,dropContainerKey:Pe,dropTargetKey:ke,dropPosition:Le,dragOverNodeKey:De,dragging:Se!==null,indent:s.value,direction:rn,dropIndicatorRender:tt,loadData:So,filterTreeNode:Si,onNodeClick:K,onNodeDoubleClick:te,onNodeExpand:be,onNodeSelect:ue,onNodeCheck:ae,onNodeLoad:re,onNodeMouseEnter:ne,onNodeMouseLeave:le,onNodeContextMenu:he,onNodeDragStart:Y,onNodeDragEnter:J,onNodeDragOver:Q,onNodeDragLeave:G,onNodeDragEnd:V,onNodeDrop:ee,slots:i}},{default:()=>[C("div",{role:"tree",class:ce(je,jo,Ci,{[`${je}-show-line`]:ft,[`${je}-focused`]:b.value,[`${je}-active-focused`]:y.value!==null}),style:Ln},[C(sge,H({ref:$,prefixCls:je,style:Ii,disabled:wi,selectable:Pt,checkable:!!on,motion:Zi,height:za,itemHeight:Ie,virtual:st,focusable:_t,focused:b.value,tabindex:yt,activeItem:xe.value,onFocus:pe,onBlur:ge,onKeydown:Re,onActiveChange:de,onListChangeStart:$e,onListChangeEnd:fe,onContextmenu:Lt,onScroll:xn},Ji),null)])]})}}});var uge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"};function sO(t){for(var e=1;e({[`.${t}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${e.motionDurationSlow}`}}}),wge=(t,e)=>({[`.${t}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:e.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${e.lineWidthBold}px solid ${e.colorPrimary}`,borderRadius:"50%",content:'""'}}}),Sge=(t,e)=>{const{treeCls:n,treeNodeCls:i,treeNodePadding:o,treeTitleHeight:r}=e,a=(r-e.fontSizeLG)/2,s=e.paddingXS;return{[n]:A(A({},rt(e)),{background:e.colorBgContainer,borderRadius:e.borderRadius,transition:`background-color ${e.motionDurationSlow}`,[`&${n}-rtl`]:{[`${n}-switcher`]:{"&_close":{[`${n}-switcher-icon`]:{svg:{transform:"rotate(90deg)"}}}}},[`&-focused:not(:hover):not(${n}-active-focused)`]:A({},zr(e)),[`${n}-list-holder-inner`]:{alignItems:"flex-start"},[`&${n}-block-node`]:{[`${n}-list-holder-inner`]:{alignItems:"stretch",[`${n}-node-content-wrapper`]:{flex:"auto"},[`${i}.dragging`]:{position:"relative","&:after":{position:"absolute",top:0,insetInlineEnd:0,bottom:o,insetInlineStart:0,border:`1px solid ${e.colorPrimary}`,opacity:0,animationName:yge,animationDuration:e.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none"}}}},[`${i}`]:{display:"flex",alignItems:"flex-start",padding:`0 0 ${o}px 0`,outline:"none","&-rtl":{direction:"rtl"},"&-disabled":{[`${n}-node-content-wrapper`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}}},[`&-active ${n}-node-content-wrapper`]:A({},zr(e)),[`&:not(${i}-disabled).filter-node ${n}-title`]:{color:"inherit",fontWeight:500},"&-draggable":{[`${n}-draggable-icon`]:{width:r,lineHeight:`${r}px`,textAlign:"center",visibility:"visible",opacity:.2,transition:`opacity ${e.motionDurationSlow}`,[`${i}:hover &`]:{opacity:.45}},[`&${i}-disabled`]:{[`${n}-draggable-icon`]:{visibility:"hidden"}}}},[`${n}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:r}},[`${n}-draggable-icon`]:{visibility:"hidden"},[`${n}-switcher`]:A(A({},xge(t,e)),{position:"relative",flex:"none",alignSelf:"stretch",width:r,margin:0,lineHeight:`${r}px`,textAlign:"center",cursor:"pointer",userSelect:"none","&-noop":{cursor:"default"},"&_close":{[`${n}-switcher-icon`]:{svg:{transform:"rotate(-90deg)"}}},"&-loading-icon":{color:e.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:r/2,bottom:-o,marginInlineStart:-1,borderInlineEnd:`1px solid ${e.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:r/2*.8,height:r/2,borderBottom:`1px solid ${e.colorBorder}`,content:'""'}}}),[`${n}-checkbox`]:{top:"initial",marginInlineEnd:s,marginBlockStart:a},[`${n}-node-content-wrapper, ${n}-checkbox + span`]:{position:"relative",zIndex:"auto",minHeight:r,margin:0,padding:`0 ${e.paddingXS/2}px`,color:"inherit",lineHeight:`${r}px`,background:"transparent",borderRadius:e.borderRadius,cursor:"pointer",transition:`all ${e.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`,"&:hover":{backgroundColor:e.controlItemBgHover},[`&${n}-node-selected`]:{backgroundColor:e.controlItemBgActive},[`${n}-iconEle`]:{display:"inline-block",width:r,height:r,lineHeight:`${r}px`,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},[`${n}-unselectable ${n}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${n}-node-content-wrapper`]:A({lineHeight:`${r}px`,userSelect:"none"},wge(t,e)),[`${i}.drop-container`]:{"> [draggable]":{boxShadow:`0 0 0 2px ${e.colorPrimary}`}},"&-show-line":{[`${n}-indent`]:{"&-unit":{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:r/2,bottom:-o,borderInlineEnd:`1px solid ${e.colorBorder}`,content:'""'},"&-end":{"&:before":{display:"none"}}}},[`${n}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${i}-leaf-last`]:{[`${n}-switcher`]:{"&-leaf-line":{"&:before":{top:"auto !important",bottom:"auto !important",height:`${r/2}px !important`}}}}})}},Cge=t=>{const{treeCls:e,treeNodeCls:n,treeNodePadding:i}=t;return{[`${e}${e}-directory`]:{[n]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:i,insetInlineStart:0,transition:`background-color ${t.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:t.controlItemBgHover}},"> *":{zIndex:1},[`${e}-switcher`]:{transition:`color ${t.motionDurationMid}`},[`${e}-node-content-wrapper`]:{borderRadius:0,userSelect:"none","&:hover":{background:"transparent"},[`&${e}-node-selected`]:{color:t.colorTextLightSolid,background:"transparent"}},"&-selected":{"\n &:hover::before,\n &::before\n ":{background:t.colorPrimary},[`${e}-switcher`]:{color:t.colorTextLightSolid},[`${e}-node-content-wrapper`]:{color:t.colorTextLightSolid,background:"transparent"}}}}}},f5=(t,e)=>{const n=`.${t}`,i=`${n}-treenode`,o=e.paddingXS/2,r=e.controlHeightSM,a=Ve(e,{treeCls:n,treeNodeCls:i,treeNodePadding:o,treeTitleHeight:r});return[Sge(t,a),Cge(a)]},$ge=et("Tree",(t,e)=>{let{prefixCls:n}=e;return[{[t.componentCls]:ev(`${n}-checkbox`,t)},f5(n,t),Ud(t)]}),h5=()=>{const t=j4();return A(A({},t),{showLine:Xe([Boolean,Object]),multiple:Ce(),autoExpandParent:Ce(),checkStrictly:Ce(),checkable:Ce(),disabled:Ce(),defaultExpandAll:Ce(),defaultExpandParent:Ce(),defaultExpandedKeys:xt(),expandedKeys:xt(),checkedKeys:Xe([Array,Object]),defaultCheckedKeys:xt(),selectedKeys:xt(),defaultSelectedKeys:xt(),selectable:Ce(),loadedKeys:xt(),draggable:Ce(),showIcon:Ce(),icon:ve(),switcherIcon:Z.any,prefixCls:String,replaceFields:Fe(),blockNode:Ce(),openAnimation:Z.any,onDoubleclick:t.onDblclick,"onUpdate:selectedKeys":ve(),"onUpdate:checkedKeys":ve(),"onUpdate:expandedKeys":ve()})},Xh=oe({compatConfig:{MODE:3},name:"ATree",inheritAttrs:!1,props:ct(h5(),{checkable:!1,selectable:!0,showIcon:!1,blockNode:!1}),slots:Object,setup(t,e){let{attrs:n,expose:i,emit:o,slots:r}=e;t.treeData===void 0&&r.default;const{prefixCls:a,direction:s,virtual:l}=Me("tree",t),[c,u]=$ge(a),d=se();i({treeRef:d,onNodeExpand:function(){var m;(m=d.value)===null||m===void 0||m.onNodeExpand(...arguments)},scrollTo:m=>{var v;(v=d.value)===null||v===void 0||v.scrollTo(m)},selectedKeys:L(()=>{var m;return(m=d.value)===null||m===void 0?void 0:m.selectedKeys}),checkedKeys:L(()=>{var m;return(m=d.value)===null||m===void 0?void 0:m.checkedKeys}),halfCheckedKeys:L(()=>{var m;return(m=d.value)===null||m===void 0?void 0:m.halfCheckedKeys}),loadedKeys:L(()=>{var m;return(m=d.value)===null||m===void 0?void 0:m.loadedKeys}),loadingKeys:L(()=>{var m;return(m=d.value)===null||m===void 0?void 0:m.loadingKeys}),expandedKeys:L(()=>{var m;return(m=d.value)===null||m===void 0?void 0:m.expandedKeys})}),Ke(()=>{Nt(t.replaceFields===void 0,"Tree","`replaceFields` is deprecated, please use fieldNames instead")});const h=(m,v)=>{o("update:checkedKeys",m),o("check",m,v)},p=(m,v)=>{o("update:expandedKeys",m),o("expand",m,v)},g=(m,v)=>{o("update:selectedKeys",m),o("select",m,v)};return()=>{const{showIcon:m,showLine:v,switcherIcon:b=r.switcherIcon,icon:y=r.icon,blockNode:w,checkable:x,selectable:$,fieldNames:S=t.replaceFields,motion:_=t.openAnimation,itemHeight:P=28,onDoubleclick:O,onDblclick:T}=t,M=A(A(A({},n),ht(t,["onUpdate:checkedKeys","onUpdate:expandedKeys","onUpdate:selectedKeys","onDoubleclick"])),{showLine:!!v,dropIndicatorRender:bge,fieldNames:S,icon:y,itemHeight:P}),I=r.default?Kt(r.default()):void 0;return c(C(u5,H(H({},M),{},{virtual:l.value,motion:_,ref:d,prefixCls:a.value,class:ce({[`${a.value}-icon-hide`]:!m,[`${a.value}-block-node`]:w,[`${a.value}-unselectable`]:!$,[`${a.value}-rtl`]:s.value==="rtl"},n.class,u.value),direction:s.value,checkable:x,selectable:$,switcherIcon:k=>d5(a.value,b,k,r.leafIcon,v),onCheck:h,onExpand:p,onSelect:g,onDblclick:T||O,children:I}),A(A({},r),{checkable:()=>C("span",{class:`${a.value}-checkbox-inner`},null)})))}}});var Age={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"};function fO(t){for(var e=1;e{if(s===xr.End)return!1;if(l(c)){if(a.push(c),s===xr.None)s=xr.Start;else if(s===xr.Start)return s=xr.End,!1}else s===xr.Start&&a.push(c);return n.includes(c)}),a}function e0(t,e,n){const i=[...e],o=[];return kC(t,n,(r,a)=>{const s=i.indexOf(r);return s!==-1&&(o.push(a),i.splice(s,1)),!!i.length}),o}var Ege=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);oA(A({},h5()),{expandAction:Xe([Boolean,String])});function Ige(t){const{isLeaf:e,expanded:n}=t;return C(e?fv:n?MC:IC,null,null)}const Yh=oe({compatConfig:{MODE:3},name:"ADirectoryTree",inheritAttrs:!1,props:ct(Mge(),{showIcon:!0,expandAction:"click"}),slots:Object,setup(t,e){let{attrs:n,slots:i,emit:o,expose:r}=e;var a;const s=se(t.treeData||Xy(Kt((a=i.default)===null||a===void 0?void 0:a.call(i))));ye(()=>t.treeData,()=>{s.value=t.treeData}),ri(()=>{pt(()=>{var P;t.treeData===void 0&&i.default&&(s.value=Xy(Kt((P=i.default)===null||P===void 0?void 0:P.call(i))))})});const l=se(),c=se(),u=L(()=>Ym(t.fieldNames)),d=se();r({scrollTo:P=>{var O;(O=d.value)===null||O===void 0||O.scrollTo(P)},selectedKeys:L(()=>{var P;return(P=d.value)===null||P===void 0?void 0:P.selectedKeys}),checkedKeys:L(()=>{var P;return(P=d.value)===null||P===void 0?void 0:P.checkedKeys}),halfCheckedKeys:L(()=>{var P;return(P=d.value)===null||P===void 0?void 0:P.halfCheckedKeys}),loadedKeys:L(()=>{var P;return(P=d.value)===null||P===void 0?void 0:P.loadedKeys}),loadingKeys:L(()=>{var P;return(P=d.value)===null||P===void 0?void 0:P.loadingKeys}),expandedKeys:L(()=>{var P;return(P=d.value)===null||P===void 0?void 0:P.expandedKeys})});const h=()=>{const{keyEntities:P}=rf(s.value,{fieldNames:u.value});let O;return t.defaultExpandAll?O=Object.keys(P):t.defaultExpandParent?O=Vy(t.expandedKeys||t.defaultExpandedKeys||[],P):O=t.expandedKeys||t.defaultExpandedKeys,O},p=se(t.selectedKeys||t.defaultSelectedKeys||[]),g=se(h());ye(()=>t.selectedKeys,()=>{t.selectedKeys!==void 0&&(p.value=t.selectedKeys)},{immediate:!0}),ye(()=>t.expandedKeys,()=>{t.expandedKeys!==void 0&&(g.value=t.expandedKeys)},{immediate:!0});const v=W1((P,O)=>{const{isLeaf:T}=O;T||P.shiftKey||P.metaKey||P.ctrlKey||d.value.onNodeExpand(P,O)},200,{leading:!0}),b=(P,O)=>{t.expandedKeys===void 0&&(g.value=P),o("update:expandedKeys",P),o("expand",P,O)},y=(P,O)=>{const{expandAction:T}=t;T==="click"&&v(P,O),o("click",P,O)},w=(P,O)=>{const{expandAction:T}=t;(T==="dblclick"||T==="doubleclick")&&v(P,O),o("doubleclick",P,O),o("dblclick",P,O)},x=(P,O)=>{const{multiple:T}=t,{node:M,nativeEvent:I}=O,k=M[u.value.key],E=A(A({},O),{selected:!0}),R=(I==null?void 0:I.ctrlKey)||(I==null?void 0:I.metaKey),D=I==null?void 0:I.shiftKey;let F;T&&R?(F=P,l.value=k,c.value=F,E.selectedNodes=e0(s.value,F,u.value)):T&&D?(F=Array.from(new Set([...c.value||[],...Oge({treeData:s.value,expandedKeys:g.value,startKey:k,endKey:l.value,fieldNames:u.value})])),E.selectedNodes=e0(s.value,F,u.value)):(F=[k],l.value=k,c.value=F,E.selectedNodes=e0(s.value,F,u.value)),o("update:selectedKeys",F),o("select",F,E),t.selectedKeys===void 0&&(p.value=F)},$=(P,O)=>{o("update:checkedKeys",P),o("check",P,O)},{prefixCls:S,direction:_}=Me("tree",t);return()=>{const P=ce(`${S.value}-directory`,{[`${S.value}-directory-rtl`]:_.value==="rtl"},n.class),{icon:O=i.icon,blockNode:T=!0}=t,M=Ege(t,["icon","blockNode"]);return C(Xh,H(H(H({},n),{},{icon:O||Ige,ref:d,blockNode:T},M),{},{prefixCls:S.value,class:P,expandedKeys:g.value,selectedKeys:p.value,onSelect:x,onClick:y,onDblclick:w,onExpand:b,onCheck:$}),i)}}}),Gh=jy,p5=A(Xh,{DirectoryTree:Yh,TreeNode:Gh,install:t=>(t.component(Xh.name,Xh),t.component(Gh.name,Gh),t.component(Yh.name,Yh),t)});function pO(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const i=new Set;function o(r,a){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;const l=i.has(r);if(Yw(!l,"Warning: There may be circular references"),l)return!1;if(r===a)return!0;if(n&&s>1)return!1;i.add(r);const c=s+1;if(Array.isArray(r)){if(!Array.isArray(a)||r.length!==a.length)return!1;for(let u=0;uo(r[d],a[d],c))}return!1}return o(t,e)}const{SubMenu:kge,Item:Dge}=sn;function Rge(t){return t.some(e=>{let{children:n}=e;return n&&n.length>0})}function g5(t,e){return typeof e=="string"||typeof e=="number"?e==null?void 0:e.toString().toLowerCase().includes(t.trim().toLowerCase()):!1}function m5(t){let{filters:e,prefixCls:n,filteredKeys:i,filterMultiple:o,searchValue:r,filterSearch:a}=t;return e.map((s,l)=>{const c=String(s.value);if(s.children)return C(kge,{key:c||l,title:s.text,popupClassName:`${n}-dropdown-submenu`},{default:()=>[m5({filters:s.children,prefixCls:n,filteredKeys:i,filterMultiple:o,searchValue:r,filterSearch:a})]});const u=o?ho:di,d=C(Dge,{key:s.value!==void 0?c:l},{default:()=>[C(u,{checked:i.includes(c)},null),C("span",null,[s.text])]});return r.trim()?typeof a=="function"?a(r,s)?d:void 0:g5(r,s.text)?d:void 0:d})}const Lge=oe({name:"FilterDropdown",props:["tablePrefixCls","prefixCls","dropdownPrefixCls","column","filterState","filterMultiple","filterMode","filterSearch","columnKey","triggerFilter","locale","getPopupContainer"],setup(t,e){let{slots:n}=e;const i=SC(),o=L(()=>{var W;return(W=t.filterMode)!==null&&W!==void 0?W:"menu"}),r=L(()=>{var W;return(W=t.filterSearch)!==null&&W!==void 0?W:!1}),a=L(()=>t.column.filterDropdownOpen||t.column.filterDropdownVisible),s=L(()=>t.column.onFilterDropdownOpenChange||t.column.onFilterDropdownVisibleChange),l=ie(!1),c=L(()=>{var W;return!!(t.filterState&&(!((W=t.filterState.filteredKeys)===null||W===void 0)&&W.length||t.filterState.forceFiltered))}),u=L(()=>{var W;return hv((W=t.column)===null||W===void 0?void 0:W.filters)}),d=L(()=>{const{filterDropdown:W,slots:j={},customFilterDropdown:U}=t.column;return W||j.filterDropdown&&i.value[j.filterDropdown]||U&&i.value.customFilterDropdown}),f=L(()=>{const{filterIcon:W,slots:j={}}=t.column;return W||j.filterIcon&&i.value[j.filterIcon]||i.value.customFilterIcon}),h=W=>{var j;l.value=W,(j=s.value)===null||j===void 0||j.call(s,W)},p=L(()=>typeof a.value=="boolean"?a.value:l.value),g=L(()=>{var W;return(W=t.filterState)===null||W===void 0?void 0:W.filteredKeys}),m=ie([]),v=W=>{let{selectedKeys:j}=W;m.value=j},b=(W,j)=>{let{node:U,checked:V}=j;t.filterMultiple?v({selectedKeys:W}):v({selectedKeys:V&&U.key?[U.key]:[]})};ye(g,()=>{l.value&&v({selectedKeys:g.value||[]})},{immediate:!0});const y=ie([]),w=ie(),x=W=>{w.value=setTimeout(()=>{y.value=W})},$=()=>{clearTimeout(w.value)};at(()=>{clearTimeout(w.value)});const S=ie(""),_=W=>{const{value:j}=W.target;S.value=j};ye(l,()=>{l.value||(S.value="")});const P=W=>{const{column:j,columnKey:U,filterState:V}=t,q=W&&W.length?W:null;if(q===null&&(!V||!V.filteredKeys)||pO(q,V==null?void 0:V.filteredKeys,!0))return null;t.triggerFilter({column:j,key:U,filteredKeys:q})},O=()=>{h(!1),P(m.value)},T=function(){let{confirm:W,closeDropdown:j}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};W&&P([]),j&&h(!1),S.value="",t.column.filterResetToDefaultFilteredValue?m.value=(t.column.defaultFilteredValue||[]).map(U=>String(U)):m.value=[]},M=function(){let{closeDropdown:W}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};W&&h(!1),P(m.value)},I=W=>{W&&g.value!==void 0&&(m.value=g.value||[]),h(W),!W&&!d.value&&O()},{direction:k}=Me("",t),E=W=>{if(W.target.checked){const j=u.value;m.value=j}else m.value=[]},R=W=>{let{filters:j}=W;return(j||[]).map((U,V)=>{const q=String(U.value),Y={title:U.text,key:U.value!==void 0?q:V};return U.children&&(Y.children=R({filters:U.children})),Y})},D=W=>{var j;return A(A({},W),{text:W.title,value:W.key,children:((j=W.children)===null||j===void 0?void 0:j.map(U=>D(U)))||[]})},F=L(()=>R({filters:t.column.filters})),N=L(()=>ce({[`${t.dropdownPrefixCls}-menu-without-submenu`]:!Rge(t.column.filters||[])})),B=()=>{const W=m.value,{column:j,locale:U,tablePrefixCls:V,filterMultiple:q,dropdownPrefixCls:Y,getPopupContainer:J,prefixCls:Q}=t;return(j.filters||[]).length===0?C(pa,{image:pa.PRESENTED_IMAGE_SIMPLE,description:U.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}},null):o.value==="tree"?C(Qe,null,[C(QT,{filterSearch:r.value,value:S.value,onChange:_,tablePrefixCls:V,locale:U},null),C("div",{class:`${V}-filter-dropdown-tree`},[q?C(ho,{class:`${V}-filter-dropdown-checkall`,onChange:E,checked:W.length===u.value.length,indeterminate:W.length>0&&W.length[U.filterCheckall]}):null,C(p5,{checkable:!0,selectable:!1,blockNode:!0,multiple:q,checkStrictly:!q,class:`${Y}-menu`,onCheck:b,checkedKeys:W,selectedKeys:W,showIcon:!1,treeData:F.value,autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:S.value.trim()?G=>typeof r.value=="function"?r.value(S.value,D(G)):g5(S.value,G.title):void 0},null)])]):C(Qe,null,[C(QT,{filterSearch:r.value,value:S.value,onChange:_,tablePrefixCls:V,locale:U},null),C(sn,{multiple:q,prefixCls:`${Y}-menu`,class:N.value,onClick:$,onSelect:v,onDeselect:v,selectedKeys:W,getPopupContainer:J,openKeys:y.value,onOpenChange:x},{default:()=>m5({filters:j.filters||[],filterSearch:r.value,prefixCls:Q,filteredKeys:m.value,filterMultiple:q,searchValue:S.value})})])},z=L(()=>{const W=m.value;return t.column.filterResetToDefaultFilteredValue?pO((t.column.defaultFilteredValue||[]).map(j=>String(j)),W,!0):W.length===0});return()=>{var W;const{tablePrefixCls:j,prefixCls:U,column:V,dropdownPrefixCls:q,locale:Y,getPopupContainer:J}=t;let Q;typeof d.value=="function"?Q=d.value({prefixCls:`${q}-custom`,setSelectedKeys:X=>v({selectedKeys:X}),selectedKeys:m.value,confirm:M,clearFilters:T,filters:V.filters,visible:p.value,column:V.__originColumn__,close:()=>{h(!1)}}):d.value?Q=d.value:Q=C(Qe,null,[B(),C("div",{class:`${U}-dropdown-btns`},[C(nn,{type:"link",size:"small",disabled:z.value,onClick:()=>T()},{default:()=>[Y.filterReset]}),C(nn,{type:"primary",size:"small",onClick:O},{default:()=>[Y.filterConfirm]})])]);const G=C(nge,{class:`${U}-dropdown`},{default:()=>[Q]});let ee;return typeof f.value=="function"?ee=f.value({filtered:c.value,column:V.__originColumn__}):f.value?ee=f.value:ee=C(PC,null,null),C("div",{class:`${U}-column`},[C("span",{class:`${j}-column-title`},[(W=n.default)===null||W===void 0?void 0:W.call(n)]),C(Io,{overlay:G,trigger:["click"],open:p.value,onOpenChange:I,getPopupContainer:J,placement:k.value==="rtl"?"bottomLeft":"bottomRight"},{default:()=>[C("span",{role:"button",tabindex:-1,class:ce(`${U}-trigger`,{active:c.value}),onClick:X=>{X.stopPropagation()}},[ee])]})])}}});function wx(t,e,n){let i=[];return(t||[]).forEach((o,r)=>{var a,s;const l=uf(r,n),c=o.filterDropdown||((a=o==null?void 0:o.slots)===null||a===void 0?void 0:a.filterDropdown)||o.customFilterDropdown;if(o.filters||c||"onFilter"in o)if("filteredValue"in o){let u=o.filteredValue;c||(u=(s=u==null?void 0:u.map(String))!==null&&s!==void 0?s:u),i.push({column:o,key:Bs(o,l),filteredKeys:u,forceFiltered:o.filtered})}else i.push({column:o,key:Bs(o,l),filteredKeys:e&&o.defaultFilteredValue?o.defaultFilteredValue:void 0,forceFiltered:o.filtered});"children"in o&&(i=[...i,...wx(o.children,e,l)])}),i}function v5(t,e,n,i,o,r,a,s){return n.map((l,c)=>{var u;const d=uf(c,s),{filterMultiple:f=!0,filterMode:h,filterSearch:p}=l;let g=l;const m=l.filterDropdown||((u=l==null?void 0:l.slots)===null||u===void 0?void 0:u.filterDropdown)||l.customFilterDropdown;if(g.filters||m){const v=Bs(g,d),b=i.find(y=>{let{key:w}=y;return v===w});g=A(A({},g),{title:y=>C(Lge,{tablePrefixCls:t,prefixCls:`${t}-filter`,dropdownPrefixCls:e,column:g,columnKey:v,filterState:b,filterMultiple:f,filterMode:h,filterSearch:p,triggerFilter:r,locale:o,getPopupContainer:a},{default:()=>[_C(l.title,y)]})})}return"children"in g&&(g=A(A({},g),{children:v5(t,e,g.children,i,o,r,a,d)})),g})}function hv(t){let e=[];return(t||[]).forEach(n=>{let{value:i,children:o}=n;e.push(i),o&&(e=[...e,...hv(o)])}),e}function gO(t){const e={};return t.forEach(n=>{let{key:i,filteredKeys:o,column:r}=n;var a;const s=r.filterDropdown||((a=r==null?void 0:r.slots)===null||a===void 0?void 0:a.filterDropdown)||r.customFilterDropdown,{filters:l}=r;if(s)e[i]=o||null;else if(Array.isArray(o)){const c=hv(l);e[i]=c.filter(u=>o.includes(String(u)))}else e[i]=null}),e}function mO(t,e){return e.reduce((n,i)=>{const{column:{onFilter:o,filters:r},filteredKeys:a}=i;return o&&a&&a.length?n.filter(s=>a.some(l=>{const c=hv(r),u=c.findIndex(f=>String(f)===String(l)),d=u!==-1?c[u]:l;return o(d,s)})):n},t)}function b5(t){return t.flatMap(e=>"children"in e?[e,...b5(e.children||[])]:[e])}function Fge(t){let{prefixCls:e,dropdownPrefixCls:n,mergedColumns:i,locale:o,onFilterChange:r,getPopupContainer:a}=t;const s=L(()=>b5(i.value)),[l,c]=Mt(wx(s.value,!0)),u=L(()=>{const p=wx(s.value,!1);if(p.length===0)return p;let g=!0,m=!0;if(p.forEach(v=>{let{filteredKeys:b}=v;b!==void 0?g=!1:m=!1}),g){const v=(s.value||[]).map((b,y)=>Bs(b,uf(y)));return l.value.filter(b=>{let{key:y}=b;return v.includes(y)}).map(b=>{const y=s.value[v.findIndex(w=>w===b.key)];return A(A({},b),{column:A(A({},b.column),y),forceFiltered:y.filtered})})}return Nt(m,"Table","Columns should all contain `filteredValue` or not contain `filteredValue`."),p}),d=L(()=>gO(u.value)),f=p=>{const g=u.value.filter(m=>{let{key:v}=m;return v!==p.key});g.push(p),c(g),r(gO(g),g)};return[p=>v5(e.value,n.value,p,u.value,o.value,f,a.value),u,d]}function y5(t,e){return t.map(n=>{const i=A({},n);return i.title=_C(i.title,e),"children"in i&&(i.children=y5(i.children,e)),i})}function Nge(t){return[n=>y5(n,t.value)]}function Bge(t){return function(n){let{prefixCls:i,onExpand:o,record:r,expanded:a,expandable:s}=n;const l=`${i}-row-expand-icon`;return C("button",{type:"button",onClick:c=>{o(r,c),c.stopPropagation()},class:ce(l,{[`${l}-spaced`]:!s,[`${l}-expanded`]:s&&a,[`${l}-collapsed`]:s&&!a}),"aria-label":a?t.collapse:t.expand,"aria-expanded":a},null)}}function x5(t,e){const n=e.value;return t.map(i=>{var o;if(i===yr||i===da)return i;const r=A({},i),{slots:a={}}=r;return r.__originColumn__=i,Nt(!("slots"in r),"Table","`column.slots` is deprecated. Please use `v-slot:headerCell` `v-slot:bodyCell` instead."),Object.keys(a).forEach(s=>{const l=a[s];r[s]===void 0&&n[l]&&(r[s]=n[l])}),e.value.headerCell&&!(!((o=i.slots)===null||o===void 0)&&o.title)&&(r.title=pm(e.value,"headerCell",{title:i.title,column:i},()=>[i.title])),"children"in r&&Array.isArray(r.children)&&(r.children=x5(r.children,e)),r})}function zge(t){return[n=>x5(n,t)]}const Hge=t=>{const{componentCls:e}=t,n=`${t.lineWidth}px ${t.lineType} ${t.tableBorderColor}`,i=(o,r,a)=>({[`&${e}-${o}`]:{[`> ${e}-container`]:{[`> ${e}-content, > ${e}-body`]:{"> table > tbody > tr > td":{[`> ${e}-expanded-row-fixed`]:{margin:`-${r}px -${a+t.lineWidth}px`}}}}}});return{[`${e}-wrapper`]:{[`${e}${e}-bordered`]:A(A(A({[`> ${e}-title`]:{border:n,borderBottom:0},[`> ${e}-container`]:{borderInlineStart:n,[` + `]:{cursor:"not-allowed !important"}}})}},W6=(t,e)=>{const{componentCls:n,railSize:i,handleSize:o,dotSize:r}=t,a=e?"paddingBlock":"paddingInline",s=e?"width":"height",l=e?"height":"width",c=e?"insetBlockStart":"insetInlineStart",u=e?"top":"insetInlineStart";return{[a]:i,[l]:i*3,[`${n}-rail`]:{[s]:"100%",[l]:i},[`${n}-track`]:{[l]:i},[`${n}-handle`]:{[c]:(i*3-o)/2},[`${n}-mark`]:{insetInlineStart:0,top:0,[u]:o,[s]:"100%"},[`${n}-step`]:{insetInlineStart:0,top:0,[u]:i,[s]:"100%",[l]:i},[`${n}-dot`]:{position:"absolute",[c]:(i-r)/2}}},hhe=t=>{const{componentCls:e,marginPartWithMark:n}=t;return{[`${e}-horizontal`]:A(A({},W6(t,!0)),{[`&${e}-with-marks`]:{marginBottom:n}})}},phe=t=>{const{componentCls:e}=t;return{[`${e}-vertical`]:A(A({},W6(t,!1)),{height:"100%"})}},ghe=et("Slider",t=>{const e=Ve(t,{marginPart:(t.controlHeight-t.controlSize)/2,marginFull:t.controlSize/2,marginPartWithMark:t.controlHeightLG-t.controlSize});return[fhe(e),hhe(e),phe(e)]},t=>{const n=t.controlHeightLG/4,i=t.controlHeightSM/2,o=t.lineWidth+1,r=t.lineWidth+1*3;return{controlSize:n,railSize:4,handleSize:n,handleSizeHover:i,dotSize:8,handleLineWidth:o,handleLineWidthHover:r}});var BT=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);otypeof t=="number"?t.toString():"",vhe=()=>({id:String,prefixCls:String,tooltipPrefixCls:String,range:Xe([Boolean,Object]),reverse:Ce(),min:Number,max:Number,step:Xe([Object,Number]),marks:Fe(),dots:Ce(),value:Xe([Array,Number]),defaultValue:Xe([Array,Number]),included:Ce(),disabled:Ce(),vertical:Ce(),tipFormatter:Xe([Function,Object],()=>mhe),tooltipOpen:Ce(),tooltipVisible:Ce(),tooltipPlacement:Ne(),getTooltipPopupContainer:ve(),autofocus:Ce(),handleStyle:Xe([Array,Object]),trackStyle:Xe([Array,Object]),onChange:ve(),onAfterChange:ve(),onFocus:ve(),onBlur:ve(),"onUpdate:value":ve()}),bhe=oe({compatConfig:{MODE:3},name:"ASlider",inheritAttrs:!1,props:vhe(),slots:Object,setup(t,e){let{attrs:n,slots:i,emit:o,expose:r}=e;const{prefixCls:a,rootPrefixCls:s,direction:l,getPopupContainer:c,configProvider:u}=Me("slider",t),[d,f]=ghe(a),h=vn(),p=se(),g=se({}),m=(S,_)=>{g.value[S]=_},v=L(()=>t.tooltipPlacement?t.tooltipPlacement:t.vertical?l.value==="rtl"?"left":"right":"top"),b=()=>{var S;(S=p.value)===null||S===void 0||S.focus()},y=()=>{var S;(S=p.value)===null||S===void 0||S.blur()},w=S=>{o("update:value",S),o("change",S),h.onFieldChange()},x=S=>{o("blur",S)};r({focus:b,blur:y});const $=S=>{var{tooltipPrefixCls:_}=S,P=S.info,{value:O,dragging:T,index:M}=P,I=BT(P,["value","dragging","index"]);const{tipFormatter:k,tooltipOpen:E=t.tooltipVisible,getTooltipPopupContainer:R}=t,D=k?g.value[M]||T:!1,F=E||E===void 0&&D;return C(dhe,{prefixCls:_,title:k?k(O):"",open:F,placement:v.value,transitionName:`${s.value}-zoom-down`,key:M,overlayClassName:`${a.value}-tooltip`,getPopupContainer:R||(c==null?void 0:c.value)},{default:()=>[C(L6,H(H({},I),{},{value:O,onMouseenter:()=>m(M,!0),onMouseleave:()=>m(M,!1)}),null)]})};return()=>{const{tooltipPrefixCls:S,range:_,id:P=h.id.value}=t,O=BT(t,["tooltipPrefixCls","range","id"]),T=u.getPrefixCls("tooltip",S),M=ce(n.class,{[`${a.value}-rtl`]:l.value==="rtl"},f.value);l.value==="rtl"&&!O.vertical&&(O.reverse=!O.reverse);let I;return typeof _=="object"&&(I=_.draggableTrack),d(_?C(uhe,H(H(H({},n),O),{},{step:O.step,draggableTrack:I,class:M,ref:p,handle:k=>$({tooltipPrefixCls:T,prefixCls:a.value,info:k}),prefixCls:a.value,onChange:w,onBlur:x}),{mark:i.mark}):C(she,H(H(H({},n),O),{},{id:P,step:O.step,class:M,ref:p,handle:k=>$({tooltipPrefixCls:T,prefixCls:a.value,info:k}),prefixCls:a.value,onChange:w,onBlur:x}),{mark:i.mark}))}}}),yhe=Vt(bhe);function zT(t){return typeof t=="string"}function xhe(){}const j6=()=>({prefixCls:String,itemWidth:String,active:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},status:Ne(),iconPrefix:String,icon:Z.any,adjustMarginRight:String,stepNumber:Number,stepIndex:Number,description:Z.any,title:Z.any,subTitle:Z.any,progressDot:HD(Z.oneOfType([Z.looseBool,Z.func])),tailContent:Z.any,icons:Z.shape({finish:Z.any,error:Z.any}).loose,onClick:ve(),onStepClick:ve(),stepIcon:ve(),itemRender:ve(),__legacy:Ce()}),V6=oe({compatConfig:{MODE:3},name:"Step",inheritAttrs:!1,props:j6(),setup(t,e){let{slots:n,emit:i,attrs:o}=e;const r=s=>{i("click",s),i("stepClick",t.stepIndex)},a=s=>{let{icon:l,title:c,description:u}=s;const{prefixCls:d,stepNumber:f,status:h,iconPrefix:p,icons:g,progressDot:m=n.progressDot,stepIcon:v=n.stepIcon}=t;let b;const y=ce(`${d}-icon`,`${p}icon`,{[`${p}icon-${l}`]:l&&zT(l),[`${p}icon-check`]:!l&&h==="finish"&&(g&&!g.finish||!g),[`${p}icon-cross`]:!l&&h==="error"&&(g&&!g.error||!g)}),w=C("span",{class:`${d}-icon-dot`},null);return m?typeof m=="function"?b=C("span",{class:`${d}-icon`},[m({iconDot:w,index:f-1,status:h,title:c,description:u,prefixCls:d})]):b=C("span",{class:`${d}-icon`},[w]):l&&!zT(l)?b=C("span",{class:`${d}-icon`},[l]):g&&g.finish&&h==="finish"?b=C("span",{class:`${d}-icon`},[g.finish]):g&&g.error&&h==="error"?b=C("span",{class:`${d}-icon`},[g.error]):l||h==="finish"||h==="error"?b=C("span",{class:y},null):b=C("span",{class:`${d}-icon`},[f]),v&&(b=v({index:f-1,status:h,title:c,description:u,node:b})),b};return()=>{var s,l,c,u;const{prefixCls:d,itemWidth:f,active:h,status:p="wait",tailContent:g,adjustMarginRight:m,disabled:v,title:b=(s=n.title)===null||s===void 0?void 0:s.call(n),description:y=(l=n.description)===null||l===void 0?void 0:l.call(n),subTitle:w=(c=n.subTitle)===null||c===void 0?void 0:c.call(n),icon:x=(u=n.icon)===null||u===void 0?void 0:u.call(n),onClick:$,onStepClick:S}=t,_=p||"wait",P=ce(`${d}-item`,`${d}-item-${_}`,{[`${d}-item-custom`]:x,[`${d}-item-active`]:h,[`${d}-item-disabled`]:v===!0}),O={};f&&(O.width=f),m&&(O.marginRight=m);const T={onClick:$||xhe};S&&!v&&(T.role="button",T.tabindex=0,T.onClick=r);const M=C("div",H(H({},ht(o,["__legacy"])),{},{class:[P,o.class],style:[o.style,O]}),[C("div",H(H({},T),{},{class:`${d}-item-container`}),[C("div",{class:`${d}-item-tail`},[g]),C("div",{class:`${d}-item-icon`},[a({icon:x,title:b,description:y})]),C("div",{class:`${d}-item-content`},[C("div",{class:`${d}-item-title`},[b,w&&C("div",{title:typeof w=="string"?w:void 0,class:`${d}-item-subtitle`},[w])]),y&&C("div",{class:`${d}-item-description`},[y])])])]);return t.itemRender?t.itemRender(M):M}}});var whe=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o[]),icons:Z.shape({finish:Z.any,error:Z.any}).loose,stepIcon:ve(),isInline:Z.looseBool,itemRender:ve()},emits:["change"],setup(t,e){let{slots:n,emit:i}=e;const o=s=>{const{current:l}=t;l!==s&&i("change",s)},r=(s,l,c)=>{const{prefixCls:u,iconPrefix:d,status:f,current:h,initial:p,icons:g,stepIcon:m=n.stepIcon,isInline:v,itemRender:b,progressDot:y=n.progressDot}=t,w=v||y,x=A(A({},s),{class:""}),$=p+l,S={active:$===h,stepNumber:$+1,stepIndex:$,key:$,prefixCls:u,iconPrefix:d,progressDot:w,stepIcon:m,icons:g,onStepClick:o};return f==="error"&&l===h-1&&(x.class=`${u}-next-error`),x.status||($===h?x.status=f:$b(x,_)),C(V6,H(H(H({},x),S),{},{__legacy:!1}),null))},a=(s,l)=>r(A({},s.props),l,c=>At(s,c));return()=>{var s;const{prefixCls:l,direction:c,type:u,labelPlacement:d,iconPrefix:f,status:h,size:p,current:g,progressDot:m=n.progressDot,initial:v,icons:b,items:y,isInline:w,itemRender:x}=t,$=whe(t,["prefixCls","direction","type","labelPlacement","iconPrefix","status","size","current","progressDot","initial","icons","items","isInline","itemRender"]),S=u==="navigation",_=w||m,P=w?"horizontal":c,O=w?void 0:p,T=_?"vertical":d,M=ce(l,`${l}-${c}`,{[`${l}-${O}`]:O,[`${l}-label-${T}`]:P==="horizontal",[`${l}-dot`]:!!_,[`${l}-navigation`]:S,[`${l}-inline`]:w});return C("div",H({class:M},$),[y.filter(I=>I).map((I,k)=>r(I,k)),Kt((s=n.default)===null||s===void 0?void 0:s.call(n)).map(a)])}}}),Che=t=>{const{componentCls:e,stepsIconCustomTop:n,stepsIconCustomSize:i,stepsIconCustomFontSize:o}=t;return{[`${e}-item-custom`]:{[`> ${e}-item-container > ${e}-item-icon`]:{height:"auto",background:"none",border:0,[`> ${e}-icon`]:{top:n,width:i,height:i,fontSize:o,lineHeight:`${i}px`}}},[`&:not(${e}-vertical)`]:{[`${e}-item-custom`]:{[`${e}-item-icon`]:{width:"auto",background:"none"}}}}},$he=t=>{const{componentCls:e,stepsIconSize:n,lineHeight:i,stepsSmallIconSize:o}=t;return{[`&${e}-label-vertical`]:{[`${e}-item`]:{overflow:"visible","&-tail":{marginInlineStart:n/2+t.controlHeightLG,padding:`${t.paddingXXS}px ${t.paddingLG}px`},"&-content":{display:"block",width:(n/2+t.controlHeightLG)*2,marginTop:t.marginSM,textAlign:"center"},"&-icon":{display:"inline-block",marginInlineStart:t.controlHeightLG},"&-title":{paddingInlineEnd:0,paddingInlineStart:0,"&::after":{display:"none"}},"&-subtitle":{display:"block",marginBottom:t.marginXXS,marginInlineStart:0,lineHeight:i}},[`&${e}-small:not(${e}-dot)`]:{[`${e}-item`]:{"&-icon":{marginInlineStart:t.controlHeightLG+(n-o)/2}}}}}},Ahe=t=>{const{componentCls:e,stepsNavContentMaxWidth:n,stepsNavArrowColor:i,stepsNavActiveColor:o,motionDurationSlow:r}=t;return{[`&${e}-navigation`]:{paddingTop:t.paddingSM,[`&${e}-small`]:{[`${e}-item`]:{"&-container":{marginInlineStart:-t.marginSM}}},[`${e}-item`]:{overflow:"visible",textAlign:"center","&-container":{display:"inline-block",height:"100%",marginInlineStart:-t.margin,paddingBottom:t.paddingSM,textAlign:"start",transition:`opacity ${r}`,[`${e}-item-content`]:{maxWidth:n},[`${e}-item-title`]:A(A({maxWidth:"100%",paddingInlineEnd:0},un),{"&::after":{display:"none"}})},[`&:not(${e}-item-active)`]:{[`${e}-item-container[role='button']`]:{cursor:"pointer","&:hover":{opacity:.85}}},"&:last-child":{flex:1,"&::after":{display:"none"}},"&::after":{position:"absolute",top:`calc(50% - ${t.paddingSM/2}px)`,insetInlineStart:"100%",display:"inline-block",width:t.fontSizeIcon,height:t.fontSizeIcon,borderTop:`${t.lineWidth}px ${t.lineType} ${i}`,borderBottom:"none",borderInlineStart:"none",borderInlineEnd:`${t.lineWidth}px ${t.lineType} ${i}`,transform:"translateY(-50%) translateX(-50%) rotate(45deg)",content:'""'},"&::before":{position:"absolute",bottom:0,insetInlineStart:"50%",display:"inline-block",width:0,height:t.lineWidthBold,backgroundColor:o,transition:`width ${r}, inset-inline-start ${r}`,transitionTimingFunction:"ease-out",content:'""'}},[`${e}-item${e}-item-active::before`]:{insetInlineStart:0,width:"100%"}},[`&${e}-navigation${e}-vertical`]:{[`> ${e}-item`]:{marginInlineEnd:0,"&::before":{display:"none"},[`&${e}-item-active::before`]:{top:0,insetInlineEnd:0,insetInlineStart:"unset",display:"block",width:t.lineWidth*3,height:`calc(100% - ${t.marginLG}px)`},"&::after":{position:"relative",insetInlineStart:"50%",display:"block",width:t.controlHeight*.25,height:t.controlHeight*.25,marginBottom:t.marginXS,textAlign:"center",transform:"translateY(-50%) translateX(-50%) rotate(135deg)"},[`> ${e}-item-container > ${e}-item-tail`]:{visibility:"hidden"}}},[`&${e}-navigation${e}-horizontal`]:{[`> ${e}-item > ${e}-item-container > ${e}-item-tail`]:{visibility:"hidden"}}}},_he=t=>{const{antCls:e,componentCls:n}=t;return{[`&${n}-with-progress`]:{[`${n}-item`]:{paddingTop:t.paddingXXS,[`&-process ${n}-item-container ${n}-item-icon ${n}-icon`]:{color:t.processIconColor}},[`&${n}-vertical > ${n}-item `]:{paddingInlineStart:t.paddingXXS,[`> ${n}-item-container > ${n}-item-tail`]:{top:t.marginXXS,insetInlineStart:t.stepsIconSize/2-t.lineWidth+t.paddingXXS}},[`&, &${n}-small`]:{[`&${n}-horizontal ${n}-item:first-child`]:{paddingBottom:t.paddingXXS,paddingInlineStart:t.paddingXXS}},[`&${n}-small${n}-vertical > ${n}-item > ${n}-item-container > ${n}-item-tail`]:{insetInlineStart:t.stepsSmallIconSize/2-t.lineWidth+t.paddingXXS},[`&${n}-label-vertical`]:{[`${n}-item ${n}-item-tail`]:{top:t.margin-2*t.lineWidth}},[`${n}-item-icon`]:{position:"relative",[`${e}-progress`]:{position:"absolute",insetBlockStart:(t.stepsIconSize-t.stepsProgressSize-t.lineWidth*2)/2,insetInlineStart:(t.stepsIconSize-t.stepsProgressSize-t.lineWidth*2)/2}}}}},Phe=t=>{const{componentCls:e,descriptionWidth:n,lineHeight:i,stepsCurrentDotSize:o,stepsDotSize:r,motionDurationSlow:a}=t;return{[`&${e}-dot, &${e}-dot${e}-small`]:{[`${e}-item`]:{"&-title":{lineHeight:i},"&-tail":{top:Math.floor((t.stepsDotSize-t.lineWidth*3)/2),width:"100%",marginTop:0,marginBottom:0,marginInline:`${n/2}px 0`,padding:0,"&::after":{width:`calc(100% - ${t.marginSM*2}px)`,height:t.lineWidth*3,marginInlineStart:t.marginSM}},"&-icon":{width:r,height:r,marginInlineStart:(t.descriptionWidth-r)/2,paddingInlineEnd:0,lineHeight:`${r}px`,background:"transparent",border:0,[`${e}-icon-dot`]:{position:"relative",float:"left",width:"100%",height:"100%",borderRadius:100,transition:`all ${a}`,"&::after":{position:"absolute",top:-t.marginSM,insetInlineStart:(r-t.controlHeightLG*1.5)/2,width:t.controlHeightLG*1.5,height:t.controlHeight,background:"transparent",content:'""'}}},"&-content":{width:n},[`&-process ${e}-item-icon`]:{position:"relative",top:(r-o)/2,width:o,height:o,lineHeight:`${o}px`,background:"none",marginInlineStart:(t.descriptionWidth-o)/2},[`&-process ${e}-icon`]:{[`&:first-child ${e}-icon-dot`]:{insetInlineStart:0}}}},[`&${e}-vertical${e}-dot`]:{[`${e}-item-icon`]:{marginTop:(t.controlHeight-r)/2,marginInlineStart:0,background:"none"},[`${e}-item-process ${e}-item-icon`]:{marginTop:(t.controlHeight-o)/2,top:0,insetInlineStart:(r-o)/2,marginInlineStart:0},[`${e}-item > ${e}-item-container > ${e}-item-tail`]:{top:(t.controlHeight-r)/2,insetInlineStart:0,margin:0,padding:`${r+t.paddingXS}px 0 ${t.paddingXS}px`,"&::after":{marginInlineStart:(r-t.lineWidth)/2}},[`&${e}-small`]:{[`${e}-item-icon`]:{marginTop:(t.controlHeightSM-r)/2},[`${e}-item-process ${e}-item-icon`]:{marginTop:(t.controlHeightSM-o)/2},[`${e}-item > ${e}-item-container > ${e}-item-tail`]:{top:(t.controlHeightSM-r)/2}},[`${e}-item:first-child ${e}-icon-dot`]:{insetInlineStart:0},[`${e}-item-content`]:{width:"inherit"}}}},The=t=>{const{componentCls:e}=t;return{[`&${e}-rtl`]:{direction:"rtl",[`${e}-item`]:{"&-subtitle":{float:"left"}},[`&${e}-navigation`]:{[`${e}-item::after`]:{transform:"rotate(-45deg)"}},[`&${e}-vertical`]:{[`> ${e}-item`]:{"&::after":{transform:"rotate(225deg)"},[`${e}-item-icon`]:{float:"right"}}},[`&${e}-dot`]:{[`${e}-item-icon ${e}-icon-dot, &${e}-small ${e}-item-icon ${e}-icon-dot`]:{float:"right"}}}}},Ohe=t=>{const{componentCls:e,stepsSmallIconSize:n,fontSizeSM:i,fontSize:o,colorTextDescription:r}=t;return{[`&${e}-small`]:{[`&${e}-horizontal:not(${e}-label-vertical) ${e}-item`]:{paddingInlineStart:t.paddingSM,"&:first-child":{paddingInlineStart:0}},[`${e}-item-icon`]:{width:n,height:n,marginTop:0,marginBottom:0,marginInline:`0 ${t.marginXS}px`,fontSize:i,lineHeight:`${n}px`,textAlign:"center",borderRadius:n},[`${e}-item-title`]:{paddingInlineEnd:t.paddingSM,fontSize:o,lineHeight:`${n}px`,"&::after":{top:n/2}},[`${e}-item-description`]:{color:r,fontSize:o},[`${e}-item-tail`]:{top:n/2-t.paddingXXS},[`${e}-item-custom ${e}-item-icon`]:{width:"inherit",height:"inherit",lineHeight:"inherit",background:"none",border:0,borderRadius:0,[`> ${e}-icon`]:{fontSize:n,lineHeight:`${n}px`,transform:"none"}}}}},Ehe=t=>{const{componentCls:e,stepsSmallIconSize:n,stepsIconSize:i}=t;return{[`&${e}-vertical`]:{display:"flex",flexDirection:"column",[`> ${e}-item`]:{display:"block",flex:"1 0 auto",paddingInlineStart:0,overflow:"visible",[`${e}-item-icon`]:{float:"left",marginInlineEnd:t.margin},[`${e}-item-content`]:{display:"block",minHeight:t.controlHeight*1.5,overflow:"hidden"},[`${e}-item-title`]:{lineHeight:`${i}px`},[`${e}-item-description`]:{paddingBottom:t.paddingSM}},[`> ${e}-item > ${e}-item-container > ${e}-item-tail`]:{position:"absolute",top:0,insetInlineStart:t.stepsIconSize/2-t.lineWidth,width:t.lineWidth,height:"100%",padding:`${i+t.marginXXS*1.5}px 0 ${t.marginXXS*1.5}px`,"&::after":{width:t.lineWidth,height:"100%"}},[`> ${e}-item:not(:last-child) > ${e}-item-container > ${e}-item-tail`]:{display:"block"},[` > ${e}-item > ${e}-item-container > ${e}-item-content > ${e}-item-title`]:{"&::after":{display:"none"}},[`&${e}-small ${e}-item-container`]:{[`${e}-item-tail`]:{position:"absolute",top:0,insetInlineStart:t.stepsSmallIconSize/2-t.lineWidth,padding:`${n+t.marginXXS*1.5}px 0 ${t.marginXXS*1.5}px`},[`${e}-item-title`]:{lineHeight:`${n}px`}}}}},Mhe=t=>{const{componentCls:e,inlineDotSize:n,inlineTitleColor:i,inlineTailColor:o}=t,r=t.paddingXS+t.lineWidth,a={[`${e}-item-container ${e}-item-content ${e}-item-title`]:{color:i}};return{[`&${e}-inline`]:{width:"auto",display:"inline-flex",[`${e}-item`]:{flex:"none","&-container":{padding:`${r}px ${t.paddingXXS}px 0`,margin:`0 ${t.marginXXS/2}px`,borderRadius:t.borderRadiusSM,cursor:"pointer",transition:`background-color ${t.motionDurationMid}`,"&:hover":{background:t.controlItemBgHover},"&[role='button']:hover":{opacity:1}},"&-icon":{width:n,height:n,marginInlineStart:`calc(50% - ${n/2}px)`,[`> ${e}-icon`]:{top:0},[`${e}-icon-dot`]:{borderRadius:t.fontSizeSM/4}},"&-content":{width:"auto",marginTop:t.marginXS-t.lineWidth},"&-title":{color:i,fontSize:t.fontSizeSM,lineHeight:t.lineHeightSM,fontWeight:"normal",marginBottom:t.marginXXS/2},"&-description":{display:"none"},"&-tail":{marginInlineStart:0,top:r+n/2,transform:"translateY(-50%)","&:after":{width:"100%",height:t.lineWidth,borderRadius:0,marginInlineStart:0,background:o}},[`&:first-child ${e}-item-tail`]:{width:"50%",marginInlineStart:"50%"},[`&:last-child ${e}-item-tail`]:{display:"block",width:"50%"},"&-wait":A({[`${e}-item-icon ${e}-icon ${e}-icon-dot`]:{backgroundColor:t.colorBorderBg,border:`${t.lineWidth}px ${t.lineType} ${o}`}},a),"&-finish":A({[`${e}-item-tail::after`]:{backgroundColor:o},[`${e}-item-icon ${e}-icon ${e}-icon-dot`]:{backgroundColor:o,border:`${t.lineWidth}px ${t.lineType} ${o}`}},a),"&-error":a,"&-active, &-process":A({[`${e}-item-icon`]:{width:n,height:n,marginInlineStart:`calc(50% - ${n/2}px)`,top:0}},a),[`&:not(${e}-item-active) > ${e}-item-container[role='button']:hover`]:{[`${e}-item-title`]:{color:i}}}}}};var Nl;(function(t){t.wait="wait",t.process="process",t.finish="finish",t.error="error"})(Nl||(Nl={}));const Jf=(t,e)=>{const n=`${e.componentCls}-item`,i=`${t}IconColor`,o=`${t}TitleColor`,r=`${t}DescriptionColor`,a=`${t}TailColor`,s=`${t}IconBgColor`,l=`${t}IconBorderColor`,c=`${t}DotColor`;return{[`${n}-${t} ${n}-icon`]:{backgroundColor:e[s],borderColor:e[l],[`> ${e.componentCls}-icon`]:{color:e[i],[`${e.componentCls}-icon-dot`]:{background:e[c]}}},[`${n}-${t}${n}-custom ${n}-icon`]:{[`> ${e.componentCls}-icon`]:{color:e[c]}},[`${n}-${t} > ${n}-container > ${n}-content > ${n}-title`]:{color:e[o],"&::after":{backgroundColor:e[a]}},[`${n}-${t} > ${n}-container > ${n}-content > ${n}-description`]:{color:e[r]},[`${n}-${t} > ${n}-container > ${n}-tail::after`]:{backgroundColor:e[a]}}},Ihe=t=>{const{componentCls:e,motionDurationSlow:n}=t,i=`${e}-item`;return A(A(A(A(A(A({[i]:{position:"relative",display:"inline-block",flex:1,overflow:"hidden",verticalAlign:"top","&:last-child":{flex:"none",[`> ${i}-container > ${i}-tail, > ${i}-container > ${i}-content > ${i}-title::after`]:{display:"none"}}},[`${i}-container`]:{outline:"none"},[`${i}-icon, ${i}-content`]:{display:"inline-block",verticalAlign:"top"},[`${i}-icon`]:{width:t.stepsIconSize,height:t.stepsIconSize,marginTop:0,marginBottom:0,marginInlineStart:0,marginInlineEnd:t.marginXS,fontSize:t.stepsIconFontSize,fontFamily:t.fontFamily,lineHeight:`${t.stepsIconSize}px`,textAlign:"center",borderRadius:t.stepsIconSize,border:`${t.lineWidth}px ${t.lineType} transparent`,transition:`background-color ${n}, border-color ${n}`,[`${e}-icon`]:{position:"relative",top:t.stepsIconTop,color:t.colorPrimary,lineHeight:1}},[`${i}-tail`]:{position:"absolute",top:t.stepsIconSize/2-t.paddingXXS,insetInlineStart:0,width:"100%","&::after":{display:"inline-block",width:"100%",height:t.lineWidth,background:t.colorSplit,borderRadius:t.lineWidth,transition:`background ${n}`,content:'""'}},[`${i}-title`]:{position:"relative",display:"inline-block",paddingInlineEnd:t.padding,color:t.colorText,fontSize:t.fontSizeLG,lineHeight:`${t.stepsTitleLineHeight}px`,"&::after":{position:"absolute",top:t.stepsTitleLineHeight/2,insetInlineStart:"100%",display:"block",width:9999,height:t.lineWidth,background:t.processTailColor,content:'""'}},[`${i}-subtitle`]:{display:"inline",marginInlineStart:t.marginXS,color:t.colorTextDescription,fontWeight:"normal",fontSize:t.fontSize},[`${i}-description`]:{color:t.colorTextDescription,fontSize:t.fontSize}},Jf(Nl.wait,t)),Jf(Nl.process,t)),{[`${i}-process > ${i}-container > ${i}-title`]:{fontWeight:t.fontWeightStrong}}),Jf(Nl.finish,t)),Jf(Nl.error,t)),{[`${i}${e}-next-error > ${e}-item-title::after`]:{background:t.colorError},[`${i}-disabled`]:{cursor:"not-allowed"}})},khe=t=>{const{componentCls:e,motionDurationSlow:n}=t;return{[`& ${e}-item`]:{[`&:not(${e}-item-active)`]:{[`& > ${e}-item-container[role='button']`]:{cursor:"pointer",[`${e}-item`]:{[`&-title, &-subtitle, &-description, &-icon ${e}-icon`]:{transition:`color ${n}`}},"&:hover":{[`${e}-item`]:{"&-title, &-subtitle, &-description":{color:t.colorPrimary}}}},[`&:not(${e}-item-process)`]:{[`& > ${e}-item-container[role='button']:hover`]:{[`${e}-item`]:{"&-icon":{borderColor:t.colorPrimary,[`${e}-icon`]:{color:t.colorPrimary}}}}}}},[`&${e}-horizontal:not(${e}-label-vertical)`]:{[`${e}-item`]:{paddingInlineStart:t.padding,whiteSpace:"nowrap","&:first-child":{paddingInlineStart:0},[`&:last-child ${e}-item-title`]:{paddingInlineEnd:0},"&-tail":{display:"none"},"&-description":{maxWidth:t.descriptionWidth,whiteSpace:"normal"}}}}},Dhe=t=>{const{componentCls:e}=t;return{[e]:A(A(A(A(A(A(A(A(A(A(A(A(A({},rt(t)),{display:"flex",width:"100%",fontSize:0,textAlign:"initial"}),Ihe(t)),khe(t)),Che(t)),Ohe(t)),Ehe(t)),$he(t)),Phe(t)),Ahe(t)),The(t)),_he(t)),Mhe(t))}},Rhe=et("Steps",t=>{const{wireframe:e,colorTextDisabled:n,fontSizeHeading3:i,fontSize:o,controlHeight:r,controlHeightLG:a,colorTextLightSolid:s,colorText:l,colorPrimary:c,colorTextLabel:u,colorTextDescription:d,colorTextQuaternary:f,colorFillContent:h,controlItemBgActive:p,colorError:g,colorBgContainer:m,colorBorderSecondary:v}=t,b=t.controlHeight,y=t.colorSplit,w=Ve(t,{processTailColor:y,stepsNavArrowColor:n,stepsIconSize:b,stepsIconCustomSize:b,stepsIconCustomTop:0,stepsIconCustomFontSize:a/2,stepsIconTop:-.5,stepsIconFontSize:o,stepsTitleLineHeight:r,stepsSmallIconSize:i,stepsDotSize:r/4,stepsCurrentDotSize:a/4,stepsNavContentMaxWidth:"auto",processIconColor:s,processTitleColor:l,processDescriptionColor:l,processIconBgColor:c,processIconBorderColor:c,processDotColor:c,waitIconColor:e?n:u,waitTitleColor:d,waitDescriptionColor:d,waitTailColor:y,waitIconBgColor:e?m:h,waitIconBorderColor:e?n:"transparent",waitDotColor:n,finishIconColor:c,finishTitleColor:l,finishDescriptionColor:d,finishTailColor:c,finishIconBgColor:e?m:p,finishIconBorderColor:e?c:p,finishDotColor:c,errorIconColor:s,errorTitleColor:g,errorDescriptionColor:g,errorTailColor:y,errorIconBgColor:g,errorIconBorderColor:g,errorDotColor:g,stepsNavActiveColor:c,stepsProgressSize:a,inlineDotSize:6,inlineTitleColor:f,inlineTailColor:v});return[Dhe(w)]},{descriptionWidth:140}),Lhe=()=>({prefixCls:String,iconPrefix:String,current:Number,initial:Number,percent:Number,responsive:Ce(),items:xt(),labelPlacement:Ne(),status:Ne(),size:Ne(),direction:Ne(),progressDot:Xe([Boolean,Function]),type:Ne(),onChange:ve(),"onUpdate:current":ve()}),Jb=oe({compatConfig:{MODE:3},name:"ASteps",inheritAttrs:!1,props:ct(Lhe(),{current:0,responsive:!0,labelPlacement:"horizontal"}),slots:Object,setup(t,e){let{attrs:n,slots:i,emit:o}=e;const{prefixCls:r,direction:a,configProvider:s}=Me("steps",t),[l,c]=Rhe(r),[,u]=Xr(),d=Ic(),f=L(()=>t.responsive&&d.value.xs?"vertical":t.direction),h=L(()=>s.getPrefixCls("",t.iconPrefix)),p=y=>{o("update:current",y),o("change",y)},g=L(()=>t.type==="inline"),m=L(()=>g.value?void 0:t.percent),v=y=>{let{node:w,status:x}=y;if(x==="process"&&t.percent!==void 0){const $=t.size==="small"?u.value.controlHeight:u.value.controlHeightLG;return C("div",{class:`${r.value}-progress-icon`},[C(vC,{type:"circle",percent:m.value,size:$,strokeWidth:4,format:()=>null},null),w])}return w},b=L(()=>({finish:C(Pc,{class:`${r.value}-finish-icon`},null),error:C(ai,{class:`${r.value}-error-icon`},null)}));return()=>{const y=ce({[`${r.value}-rtl`]:a.value==="rtl",[`${r.value}-with-progress`]:m.value!==void 0},n.class,c.value),w=(x,$)=>x.description?C(Pi,{title:x.description},{default:()=>[$]}):$;return l(C(She,H(H(H({icons:b.value},n),ht(t,["percent","responsive"])),{},{items:t.items,direction:f.value,prefixCls:r.value,iconPrefix:h.value,class:y,onChange:p,isInline:g.value,itemRender:g.value?w:void 0}),A({stepIcon:v},i)))}}}),Vh=oe(A(A({compatConfig:{MODE:3}},V6),{name:"AStep",props:j6()})),Fhe=A(Jb,{Step:Vh,install:t=>(t.component(Jb.name,Jb),t.component(Vh.name,Vh),t)}),Nhe=t=>{const{componentCls:e}=t,n=`${e}-inner`;return{[e]:{[`&${e}-small`]:{minWidth:t.switchMinWidthSM,height:t.switchHeightSM,lineHeight:`${t.switchHeightSM}px`,[`${e}-inner`]:{paddingInlineStart:t.switchInnerMarginMaxSM,paddingInlineEnd:t.switchInnerMarginMinSM,[`${n}-checked`]:{marginInlineStart:`calc(-100% + ${t.switchPinSizeSM+t.switchPadding*2}px - ${t.switchInnerMarginMaxSM*2}px)`,marginInlineEnd:`calc(100% - ${t.switchPinSizeSM+t.switchPadding*2}px + ${t.switchInnerMarginMaxSM*2}px)`},[`${n}-unchecked`]:{marginTop:-t.switchHeightSM,marginInlineStart:0,marginInlineEnd:0}},[`${e}-handle`]:{width:t.switchPinSizeSM,height:t.switchPinSizeSM},[`${e}-loading-icon`]:{top:(t.switchPinSizeSM-t.switchLoadingIconSize)/2,fontSize:t.switchLoadingIconSize},[`&${e}-checked`]:{[`${e}-inner`]:{paddingInlineStart:t.switchInnerMarginMinSM,paddingInlineEnd:t.switchInnerMarginMaxSM,[`${n}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${n}-unchecked`]:{marginInlineStart:`calc(100% - ${t.switchPinSizeSM+t.switchPadding*2}px + ${t.switchInnerMarginMaxSM*2}px)`,marginInlineEnd:`calc(-100% + ${t.switchPinSizeSM+t.switchPadding*2}px - ${t.switchInnerMarginMaxSM*2}px)`}},[`${e}-handle`]:{insetInlineStart:`calc(100% - ${t.switchPinSizeSM+t.switchPadding}px)`}},[`&:not(${e}-disabled):active`]:{[`&:not(${e}-checked) ${n}`]:{[`${n}-unchecked`]:{marginInlineStart:t.marginXXS/2,marginInlineEnd:-t.marginXXS/2}},[`&${e}-checked ${n}`]:{[`${n}-checked`]:{marginInlineStart:-t.marginXXS/2,marginInlineEnd:t.marginXXS/2}}}}}}},Bhe=t=>{const{componentCls:e}=t;return{[e]:{[`${e}-loading-icon${t.iconCls}`]:{position:"relative",top:(t.switchPinSize-t.fontSize)/2,color:t.switchLoadingIconColor,verticalAlign:"top"},[`&${e}-checked ${e}-loading-icon`]:{color:t.switchColor}}}},zhe=t=>{const{componentCls:e}=t,n=`${e}-handle`;return{[e]:{[n]:{position:"absolute",top:t.switchPadding,insetInlineStart:t.switchPadding,width:t.switchPinSize,height:t.switchPinSize,transition:`all ${t.switchDuration} ease-in-out`,"&::before":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,backgroundColor:t.colorWhite,borderRadius:t.switchPinSize/2,boxShadow:t.switchHandleShadow,transition:`all ${t.switchDuration} ease-in-out`,content:'""'}},[`&${e}-checked ${n}`]:{insetInlineStart:`calc(100% - ${t.switchPinSize+t.switchPadding}px)`},[`&:not(${e}-disabled):active`]:{[`${n}::before`]:{insetInlineEnd:t.switchHandleActiveInset,insetInlineStart:0},[`&${e}-checked ${n}::before`]:{insetInlineEnd:0,insetInlineStart:t.switchHandleActiveInset}}}}},Hhe=t=>{const{componentCls:e}=t,n=`${e}-inner`;return{[e]:{[n]:{display:"block",overflow:"hidden",borderRadius:100,height:"100%",paddingInlineStart:t.switchInnerMarginMax,paddingInlineEnd:t.switchInnerMarginMin,transition:`padding-inline-start ${t.switchDuration} ease-in-out, padding-inline-end ${t.switchDuration} ease-in-out`,[`${n}-checked, ${n}-unchecked`]:{display:"block",color:t.colorTextLightSolid,fontSize:t.fontSizeSM,transition:`margin-inline-start ${t.switchDuration} ease-in-out, margin-inline-end ${t.switchDuration} ease-in-out`,pointerEvents:"none"},[`${n}-checked`]:{marginInlineStart:`calc(-100% + ${t.switchPinSize+t.switchPadding*2}px - ${t.switchInnerMarginMax*2}px)`,marginInlineEnd:`calc(100% - ${t.switchPinSize+t.switchPadding*2}px + ${t.switchInnerMarginMax*2}px)`},[`${n}-unchecked`]:{marginTop:-t.switchHeight,marginInlineStart:0,marginInlineEnd:0}},[`&${e}-checked ${n}`]:{paddingInlineStart:t.switchInnerMarginMin,paddingInlineEnd:t.switchInnerMarginMax,[`${n}-checked`]:{marginInlineStart:0,marginInlineEnd:0},[`${n}-unchecked`]:{marginInlineStart:`calc(100% - ${t.switchPinSize+t.switchPadding*2}px + ${t.switchInnerMarginMax*2}px)`,marginInlineEnd:`calc(-100% + ${t.switchPinSize+t.switchPadding*2}px - ${t.switchInnerMarginMax*2}px)`}},[`&:not(${e}-disabled):active`]:{[`&:not(${e}-checked) ${n}`]:{[`${n}-unchecked`]:{marginInlineStart:t.switchPadding*2,marginInlineEnd:-t.switchPadding*2}},[`&${e}-checked ${n}`]:{[`${n}-checked`]:{marginInlineStart:-t.switchPadding*2,marginInlineEnd:t.switchPadding*2}}}}}},Whe=t=>{const{componentCls:e}=t;return{[e]:A(A(A(A({},rt(t)),{position:"relative",display:"inline-block",boxSizing:"border-box",minWidth:t.switchMinWidth,height:t.switchHeight,lineHeight:`${t.switchHeight}px`,verticalAlign:"middle",background:t.colorTextQuaternary,border:"0",borderRadius:100,cursor:"pointer",transition:`all ${t.motionDurationMid}`,userSelect:"none",[`&:hover:not(${e}-disabled)`]:{background:t.colorTextTertiary}}),Hr(t)),{[`&${e}-checked`]:{background:t.switchColor,[`&:hover:not(${e}-disabled)`]:{background:t.colorPrimaryHover}},[`&${e}-loading, &${e}-disabled`]:{cursor:"not-allowed",opacity:t.switchDisabledOpacity,"*":{boxShadow:"none",cursor:"not-allowed"}},[`&${e}-rtl`]:{direction:"rtl"}})}},jhe=et("Switch",t=>{const e=t.fontSize*t.lineHeight,n=t.controlHeight/2,i=2,o=e-i*2,r=n-i*2,a=Ve(t,{switchMinWidth:o*2+i*4,switchHeight:e,switchDuration:t.motionDurationMid,switchColor:t.colorPrimary,switchDisabledOpacity:t.opacityLoading,switchInnerMarginMin:o/2,switchInnerMarginMax:o+i+i*2,switchPadding:i,switchPinSize:o,switchBg:t.colorBgContainer,switchMinWidthSM:r*2+i*2,switchHeightSM:n,switchInnerMarginMinSM:r/2,switchInnerMarginMaxSM:r+i+i*2,switchPinSizeSM:r,switchHandleShadow:`0 2px 4px 0 ${new Ot("#00230b").setAlpha(.2).toRgbString()}`,switchLoadingIconSize:t.fontSizeIcon*.75,switchLoadingIconColor:`rgba(0, 0, 0, ${t.opacityLoading})`,switchHandleActiveInset:"-30%"});return[Whe(a),Hhe(a),zhe(a),Bhe(a),Nhe(a)]}),Vhe=Wn("small","default"),Xhe=()=>({id:String,prefixCls:String,size:Z.oneOf(Vhe),disabled:{type:Boolean,default:void 0},checkedChildren:Z.any,unCheckedChildren:Z.any,tabindex:Z.oneOfType([Z.string,Z.number]),autofocus:{type:Boolean,default:void 0},loading:{type:Boolean,default:void 0},checked:Z.oneOfType([Z.string,Z.number,Z.looseBool]),checkedValue:Z.oneOfType([Z.string,Z.number,Z.looseBool]).def(!0),unCheckedValue:Z.oneOfType([Z.string,Z.number,Z.looseBool]).def(!1),onChange:{type:Function},onClick:{type:Function},onKeydown:{type:Function},onMouseup:{type:Function},"onUpdate:checked":{type:Function},onBlur:Function,onFocus:Function}),Yhe=oe({compatConfig:{MODE:3},name:"ASwitch",__ANT_SWITCH:!0,inheritAttrs:!1,props:Xhe(),slots:Object,setup(t,e){let{attrs:n,slots:i,expose:o,emit:r}=e;const a=vn(),s=Oi(),l=L(()=>{var P;return(P=t.disabled)!==null&&P!==void 0?P:s.value});Wd(()=>{});const c=se(t.checked!==void 0?t.checked:n.defaultChecked),u=L(()=>c.value===t.checkedValue);ye(()=>t.checked,()=>{c.value=t.checked});const{prefixCls:d,direction:f,size:h}=Me("switch",t),[p,g]=jhe(d),m=se(),v=()=>{var P;(P=m.value)===null||P===void 0||P.focus()};o({focus:v,blur:()=>{var P;(P=m.value)===null||P===void 0||P.blur()}}),Ze(()=>{pt(()=>{t.autofocus&&!l.value&&m.value.focus()})});const y=(P,O)=>{l.value||(r("update:checked",P),r("change",P,O),a.onFieldChange())},w=P=>{r("blur",P)},x=P=>{v();const O=u.value?t.unCheckedValue:t.checkedValue;y(O,P),r("click",O,P)},$=P=>{P.keyCode===Te.LEFT?y(t.unCheckedValue,P):P.keyCode===Te.RIGHT&&y(t.checkedValue,P),r("keydown",P)},S=P=>{var O;(O=m.value)===null||O===void 0||O.blur(),r("mouseup",P)},_=L(()=>({[`${d.value}-small`]:h.value==="small",[`${d.value}-loading`]:t.loading,[`${d.value}-checked`]:u.value,[`${d.value}-disabled`]:l.value,[d.value]:!0,[`${d.value}-rtl`]:f.value==="rtl",[g.value]:!0}));return()=>{var P;return p(C(J1,null,{default:()=>[C("button",H(H(H({},ht(t,["prefixCls","checkedChildren","unCheckedChildren","checked","autofocus","checkedValue","unCheckedValue","id","onChange","onUpdate:checked"])),n),{},{id:(P=t.id)!==null&&P!==void 0?P:a.id.value,onKeydown:$,onClick:x,onBlur:w,onMouseup:S,type:"button",role:"switch","aria-checked":c.value,disabled:l.value||t.loading,class:[n.class,_.value],ref:m}),[C("div",{class:`${d.value}-handle`},[t.loading?C(yi,{class:`${d.value}-loading-icon`},null):null]),C("span",{class:`${d.value}-inner`},[C("span",{class:`${d.value}-inner-checked`},[gn(i,t,"checkedChildren")]),C("span",{class:`${d.value}-inner-unchecked`},[gn(i,t,"unCheckedChildren")])])])]}))}}}),Ghe=Vt(Yhe),X6=Symbol("TableContextProps"),Khe=t=>{ot(X6,t)},dr=()=>qe(X6,{}),Uhe="RC_TABLE_KEY";function Y6(t){return t==null?[]:Array.isArray(t)?t:[t]}function G6(t,e){if(!e&&typeof e!="number")return t;const n=Y6(e);let i=t;for(let o=0;o{const{key:o,dataIndex:r}=i||{};let a=o||Y6(r).join("-")||Uhe;for(;n[a];)a=`${a}_next`;n[a]=!0,e.push(a)}),e}function qhe(){const t={};function e(r,a){a&&Object.keys(a).forEach(s=>{const l=a[s];l&&typeof l=="object"?(r[s]=r[s]||{},e(r[s],l)):r[s]=l})}for(var n=arguments.length,i=new Array(n),o=0;o{e(t,r)}),t}function cx(t){return t!=null}const K6=Symbol("SlotsContextProps"),Zhe=t=>{ot(K6,t)},SC=()=>qe(K6,L(()=>({}))),U6=Symbol("ContextProps"),Jhe=t=>{ot(U6,t)},Qhe=()=>qe(U6,{onResizeColumn:()=>{}}),tc="RC_TABLE_INTERNAL_COL_DEFINE",q6=Symbol("HoverContextProps"),epe=t=>{ot(q6,t)},tpe=()=>qe(q6,{startRow:ie(-1),endRow:ie(-1),onHover(){}}),ux=ie(!1),npe=()=>{Ze(()=>{ux.value=ux.value||WS("position","sticky")})},ipe=()=>ux;var ope=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o=n}function ape(t){return t&&typeof t=="object"&&!Array.isArray(t)&&!ln(t)}const fv=oe({name:"Cell",props:["prefixCls","record","index","renderIndex","dataIndex","customRender","component","colSpan","rowSpan","fixLeft","fixRight","firstFixLeft","lastFixLeft","firstFixRight","lastFixRight","appendNode","additionalProps","ellipsis","align","rowType","isSticky","column","cellType","transformCellText"],setup(t,e){let{slots:n}=e;const i=SC(),{onHover:o,startRow:r,endRow:a}=tpe(),s=L(()=>{var g,m,v,b;return(v=(g=t.colSpan)!==null&&g!==void 0?g:(m=t.additionalProps)===null||m===void 0?void 0:m.colSpan)!==null&&v!==void 0?v:(b=t.additionalProps)===null||b===void 0?void 0:b.colspan}),l=L(()=>{var g,m,v,b;return(v=(g=t.rowSpan)!==null&&g!==void 0?g:(m=t.additionalProps)===null||m===void 0?void 0:m.rowSpan)!==null&&v!==void 0?v:(b=t.additionalProps)===null||b===void 0?void 0:b.rowspan}),c=Bi(()=>{const{index:g}=t;return rpe(g,l.value||1,r.value,a.value)}),u=ipe(),d=(g,m)=>{var v;const{record:b,index:y,additionalProps:w}=t;b&&o(y,y+m-1),(v=w==null?void 0:w.onMouseenter)===null||v===void 0||v.call(w,g)},f=g=>{var m;const{record:v,additionalProps:b}=t;v&&o(-1,-1),(m=b==null?void 0:b.onMouseleave)===null||m===void 0||m.call(b,g)},h=g=>{const m=Kt(g)[0];return ln(m)?m.type===Ma?m.children:Array.isArray(m.children)?h(m.children):void 0:m},p=ie(null);return ye([c,()=>t.prefixCls,p],()=>{const g=gi(p.value);g&&(c.value?Jp(g,`${t.prefixCls}-cell-row-hover`):Qp(g,`${t.prefixCls}-cell-row-hover`))}),()=>{var g,m,v,b,y,w;const{prefixCls:x,record:$,index:S,renderIndex:_,dataIndex:P,customRender:O,component:T="td",fixLeft:M,fixRight:I,firstFixLeft:k,lastFixLeft:E,firstFixRight:R,lastFixRight:D,appendNode:F=(g=n.appendNode)===null||g===void 0?void 0:g.call(n),additionalProps:N={},ellipsis:B,align:z,rowType:W,isSticky:j,column:U={},cellType:V}=t,q=`${x}-cell`;let Y,J;const Q=(m=n.default)===null||m===void 0?void 0:m.call(n);if(cx(Q)||V==="header")J=Q;else{const fe=G6($,P);if(J=fe,O){const de=O({text:fe,value:fe,record:$,index:S,renderIndex:_,column:U.__originColumn__});ape(de)?(J=de.children,Y=de.props):J=de}if(!(tc in U)&&V==="body"&&i.value.bodyCell&&!(!((v=U.slots)===null||v===void 0)&&v.customRender)){const de=gm(i.value,"bodyCell",{text:fe,value:fe,record:$,index:S,column:U.__originColumn__},()=>{const xe=J===void 0?fe:J;return[typeof xe=="object"&&cn(xe)||typeof xe!="object"?xe:null]});J=Dt(de)}t.transformCellText&&(J=t.transformCellText({text:J,record:$,index:S,column:U.__originColumn__}))}typeof J=="object"&&!Array.isArray(J)&&!ln(J)&&(J=null),B&&(E||R)&&(J=C("span",{class:`${q}-content`},[J])),Array.isArray(J)&&J.length===1&&(J=J[0]);const G=Y||{},{colSpan:ee,rowSpan:X,style:K,class:te}=G,ue=ope(G,["colSpan","rowSpan","style","class"]),ae=(b=ee!==void 0?ee:s.value)!==null&&b!==void 0?b:1,re=(y=X!==void 0?X:l.value)!==null&&y!==void 0?y:1;if(ae===0||re===0)return null;const ne={},le=typeof M=="number"&&u.value,he=typeof I=="number"&&u.value;le&&(ne.position="sticky",ne.left=`${M}px`),he&&(ne.position="sticky",ne.right=`${I}px`);const pe={};z&&(pe.textAlign=z);let ge;const be=B===!0?{showTitle:!0}:B;be&&(be.showTitle||W==="header")&&(typeof J=="string"||typeof J=="number"?ge=J.toString():ln(J)&&(ge=h([J])));const $e=A(A(A({title:ge},ue),N),{colSpan:ae!==1?ae:null,rowSpan:re!==1?re:null,class:ce(q,{[`${q}-fix-left`]:le&&u.value,[`${q}-fix-left-first`]:k&&u.value,[`${q}-fix-left-last`]:E&&u.value,[`${q}-fix-right`]:he&&u.value,[`${q}-fix-right-first`]:R&&u.value,[`${q}-fix-right-last`]:D&&u.value,[`${q}-ellipsis`]:B,[`${q}-with-append`]:F,[`${q}-fix-sticky`]:(le||he)&&j&&u.value},N.class,te),onMouseenter:fe=>{d(fe,re)},onMouseleave:f,style:[N.style,pe,ne,K]});return C(T,H(H({},$e),{},{ref:p}),{default:()=>[F,J,(w=n.dragHandle)===null||w===void 0?void 0:w.call(n)]})}}});function CC(t,e,n,i,o){const r=n[t]||{},a=n[e]||{};let s,l;r.fixed==="left"?s=i.left[t]:a.fixed==="right"&&(l=i.right[e]);let c=!1,u=!1,d=!1,f=!1;const h=n[e+1],p=n[t-1];return o==="rtl"?s!==void 0?f=!(p&&p.fixed==="left"):l!==void 0&&(d=!(h&&h.fixed==="right")):s!==void 0?c=!(h&&h.fixed==="left"):l!==void 0&&(u=!(p&&p.fixed==="right")),{fixLeft:s,fixRight:l,lastFixLeft:c,firstFixRight:u,lastFixRight:d,firstFixLeft:f,isSticky:i.isSticky}}const HT={mouse:{move:"mousemove",stop:"mouseup"},touch:{move:"touchmove",stop:"touchend"}},WT=50,spe=oe({compatConfig:{MODE:3},name:"DragHandle",props:{prefixCls:String,width:{type:Number,required:!0},minWidth:{type:Number,default:WT},maxWidth:{type:Number,default:1/0},column:{type:Object,default:void 0}},setup(t){let e=0,n={remove:()=>{}},i={remove:()=>{}};const o=()=>{n.remove(),i.remove()};Xn(()=>{o()}),Ke(()=>{Nt(!isNaN(t.width),"Table","width must be a number when use resizable")});const{onResizeColumn:r}=Qhe(),a=L(()=>typeof t.minWidth=="number"&&!isNaN(t.minWidth)?t.minWidth:WT),s=L(()=>typeof t.maxWidth=="number"&&!isNaN(t.maxWidth)?t.maxWidth:1/0),l=Cn();let c=0;const u=ie(!1);let d;const f=y=>{let w=0;y.touches?y.touches.length?w=y.touches[0].pageX:w=y.changedTouches[0].pageX:w=y.pageX;const x=e-w;let $=Math.max(c-x,a.value);$=Math.min($,s.value),lt.cancel(d),d=lt(()=>{r($,t.column.__originColumn__)})},h=y=>{f(y)},p=y=>{u.value=!1,f(y),o()},g=(y,w)=>{u.value=!0,o(),c=l.vnode.el.parentNode.getBoundingClientRect().width,!(y instanceof MouseEvent&&y.which!==1)&&(y.stopPropagation&&y.stopPropagation(),e=y.touches?y.touches[0].pageX:y.pageX,n=Gt(document.documentElement,w.move,h),i=Gt(document.documentElement,w.stop,p))},m=y=>{y.stopPropagation(),y.preventDefault(),g(y,HT.mouse)},v=y=>{y.stopPropagation(),y.preventDefault(),g(y,HT.touch)},b=y=>{y.stopPropagation(),y.preventDefault()};return()=>{const{prefixCls:y}=t,w={[pn?"onTouchstartPassive":"onTouchstart"]:x=>v(x)};return C("div",H(H({class:`${y}-resize-handle ${u.value?"dragging":""}`,onMousedown:m},w),{},{onClick:b}),[C("div",{class:`${y}-resize-handle-line`},null)])}}}),lpe=oe({name:"HeaderRow",props:["cells","stickyOffsets","flattenColumns","rowComponent","cellComponent","index","customHeaderRow"],setup(t){const e=dr();return()=>{const{prefixCls:n,direction:i}=e,{cells:o,stickyOffsets:r,flattenColumns:a,rowComponent:s,cellComponent:l,customHeaderRow:c,index:u}=t;let d;c&&(d=c(o.map(h=>h.column),u));const f=dv(o.map(h=>h.column));return C(s,d,{default:()=>[o.map((h,p)=>{const{column:g}=h,m=CC(h.colStart,h.colEnd,a,r,i);let v;g&&g.customHeaderCell&&(v=h.column.customHeaderCell(g));const b=g;return C(fv,H(H(H({},h),{},{cellType:"header",ellipsis:g.ellipsis,align:g.align,component:l,prefixCls:n,key:f[p]},m),{},{additionalProps:v,rowType:"header",column:g}),{default:()=>g.title,dragHandle:()=>b.resizable?C(spe,{prefixCls:n,width:b.width,minWidth:b.minWidth,maxWidth:b.maxWidth,column:b},null):null})})]})}}});function cpe(t){const e=[];function n(o,r){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;e[a]=e[a]||[];let s=r;return o.filter(Boolean).map(c=>{const u={key:c.key,class:ce(c.className,c.class),column:c,colStart:s};let d=1;const f=c.children;return f&&f.length>0&&(d=n(f,s,a+1).reduce((h,p)=>h+p,0),u.hasSubColumns=!0),"colSpan"in c&&({colSpan:d}=c),"rowSpan"in c&&(u.rowSpan=c.rowSpan),u.colSpan=d,u.colEnd=u.colStart+d-1,e[a].push(u),s+=d,d})}n(t,0);const i=e.length;for(let o=0;o{!("rowSpan"in r)&&!r.hasSubColumns&&(r.rowSpan=i-o)});return e}const jT=oe({name:"TableHeader",inheritAttrs:!1,props:["columns","flattenColumns","stickyOffsets","customHeaderRow"],setup(t){const e=dr(),n=L(()=>cpe(t.columns));return()=>{const{prefixCls:i,getComponent:o}=e,{stickyOffsets:r,flattenColumns:a,customHeaderRow:s}=t,l=o(["header","wrapper"],"thead"),c=o(["header","row"],"tr"),u=o(["header","cell"],"th");return C(l,{class:`${i}-thead`},{default:()=>[n.value.map((d,f)=>C(lpe,{key:f,flattenColumns:a,cells:d,stickyOffsets:r,rowComponent:c,cellComponent:u,customHeaderRow:s,index:f},null))]})}}}),Z6=Symbol("ExpandedRowProps"),upe=t=>{ot(Z6,t)},dpe=()=>qe(Z6,{}),J6=oe({name:"ExpandedRow",inheritAttrs:!1,props:["prefixCls","component","cellComponent","expanded","colSpan","isEmpty"],setup(t,e){let{slots:n,attrs:i}=e;const o=dr(),r=dpe(),{fixHeader:a,fixColumn:s,componentWidth:l,horizonScroll:c}=r;return()=>{const{prefixCls:u,component:d,cellComponent:f,expanded:h,colSpan:p,isEmpty:g}=t;return C(d,{class:i.class,style:{display:h?null:"none"}},{default:()=>[C(fv,{component:f,prefixCls:u,colSpan:p},{default:()=>{var m;let v=(m=n.default)===null||m===void 0?void 0:m.call(n);return(g?c.value:s.value)&&(v=C("div",{style:{width:`${l.value-(a.value?o.scrollbarSize:0)}px`,position:"sticky",left:0,overflow:"hidden"},class:`${u}-expanded-row-fixed`},[v])),v}})]})}}}),fpe=oe({name:"MeasureCell",props:["columnKey"],setup(t,e){let{emit:n}=e;const i=se();return Ze(()=>{i.value&&n("columnResize",t.columnKey,i.value.offsetWidth)}),()=>C(mo,{onResize:o=>{let{offsetWidth:r}=o;n("columnResize",t.columnKey,r)}},{default:()=>[C("td",{ref:i,style:{padding:0,border:0,height:0}},[C("div",{style:{height:0,overflow:"hidden"}},[Qn(" ")])])]})}}),Q6=Symbol("BodyContextProps"),hpe=t=>{ot(Q6,t)},e5=()=>qe(Q6,{}),ppe=oe({name:"BodyRow",inheritAttrs:!1,props:["record","index","renderIndex","recordKey","expandedKeys","rowComponent","cellComponent","customRow","rowExpandable","indent","rowKey","getRowKey","childrenColumnName"],setup(t,e){let{attrs:n}=e;const i=dr(),o=e5(),r=ie(!1),a=L(()=>t.expandedKeys&&t.expandedKeys.has(t.recordKey));Ke(()=>{a.value&&(r.value=!0)});const s=L(()=>o.expandableType==="row"&&(!t.rowExpandable||t.rowExpandable(t.record))),l=L(()=>o.expandableType==="nest"),c=L(()=>t.childrenColumnName&&t.record&&t.record[t.childrenColumnName]),u=L(()=>s.value||l.value),d=(m,v)=>{o.onTriggerExpand(m,v)},f=L(()=>{var m;return((m=t.customRow)===null||m===void 0?void 0:m.call(t,t.record,t.index))||{}}),h=function(m){var v,b;o.expandRowByClick&&u.value&&d(t.record,m);for(var y=arguments.length,w=new Array(y>1?y-1:0),x=1;x{const{record:m,index:v,indent:b}=t,{rowClassName:y}=o;return typeof y=="string"?y:typeof y=="function"?y(m,v,b):""}),g=L(()=>dv(o.flattenColumns));return()=>{const{class:m,style:v}=n,{record:b,index:y,rowKey:w,indent:x=0,rowComponent:$,cellComponent:S}=t,{prefixCls:_,fixedInfoList:P,transformCellText:O}=i,{flattenColumns:T,expandedRowClassName:M,indentSize:I,expandIcon:k,expandedRowRender:E,expandIconColumnIndex:R}=o,D=C($,H(H({},f.value),{},{"data-row-key":w,class:ce(m,`${_}-row`,`${_}-row-level-${x}`,p.value,f.value.class),style:[v,f.value.style],onClick:h}),{default:()=>[T.map((N,B)=>{const{customRender:z,dataIndex:W,className:j}=N,U=g[B],V=P[B];let q;N.customCell&&(q=N.customCell(b,y,N));const Y=B===(R||0)&&l.value?C(Qe,null,[C("span",{style:{paddingLeft:`${I*x}px`},class:`${_}-row-indent indent-level-${x}`},null),k({prefixCls:_,expanded:a.value,expandable:c.value,record:b,onExpand:d})]):null;return C(fv,H(H({cellType:"body",class:j,ellipsis:N.ellipsis,align:N.align,component:S,prefixCls:_,key:U,record:b,index:y,renderIndex:t.renderIndex,dataIndex:W,customRender:z},V),{},{additionalProps:q,column:N,transformCellText:O,appendNode:Y}),null)})]});let F;if(s.value&&(r.value||a.value)){const N=E({record:b,index:y,indent:x+1,expanded:a.value}),B=M&&M(b,y,x);F=C(J6,{expanded:a.value,class:ce(`${_}-expanded-row`,`${_}-expanded-row-level-${x+1}`,B),prefixCls:_,component:$,cellComponent:S,colSpan:T.length,isEmpty:!1},{default:()=>[N]})}return C(Qe,null,[D,F])}}});function t5(t,e,n,i,o,r){const a=[];a.push({record:t,indent:e,index:r});const s=o(t),l=i==null?void 0:i.has(s);if(t&&Array.isArray(t[n])&&l)for(let c=0;c{const r=e.value,a=n.value,s=t.value;if(a!=null&&a.size){const l=[];for(let c=0;c<(s==null?void 0:s.length);c+=1){const u=s[c];l.push(...t5(u,0,r,a,i.value,c))}return l}return s==null?void 0:s.map((l,c)=>({record:l,indent:0,index:c}))})}const n5=Symbol("ResizeContextProps"),mpe=t=>{ot(n5,t)},vpe=()=>qe(n5,{onColumnResize:()=>{}}),bpe=oe({name:"TableBody",props:["data","getRowKey","measureColumnWidth","expandedKeys","customRow","rowExpandable","childrenColumnName"],setup(t,e){let{slots:n}=e;const i=vpe(),o=dr(),r=e5(),a=gpe(Ue(t,"data"),Ue(t,"childrenColumnName"),Ue(t,"expandedKeys"),Ue(t,"getRowKey")),s=ie(-1),l=ie(-1);let c;return epe({startRow:s,endRow:l,onHover:(u,d)=>{clearTimeout(c),c=setTimeout(()=>{s.value=u,l.value=d},100)}}),()=>{var u;const{data:d,getRowKey:f,measureColumnWidth:h,expandedKeys:p,customRow:g,rowExpandable:m,childrenColumnName:v}=t,{onColumnResize:b}=i,{prefixCls:y,getComponent:w}=o,{flattenColumns:x}=r,$=w(["body","wrapper"],"tbody"),S=w(["body","row"],"tr"),_=w(["body","cell"],"td");let P;d.length?P=a.value.map((T,M)=>{const{record:I,indent:k,index:E}=T,R=f(I,M);return C(ppe,{key:R,rowKey:R,record:I,recordKey:R,index:M,renderIndex:E,rowComponent:S,cellComponent:_,expandedKeys:p,customRow:g,getRowKey:f,rowExpandable:m,childrenColumnName:v,indent:k},null)}):P=C(J6,{expanded:!0,class:`${y}-placeholder`,prefixCls:y,component:S,cellComponent:_,colSpan:x.length,isEmpty:!0},{default:()=>[(u=n.emptyNode)===null||u===void 0?void 0:u.call(n)]});const O=dv(x);return C($,{class:`${y}-tbody`},{default:()=>[h&&C("tr",{"aria-hidden":"true",class:`${y}-measure-row`,style:{height:0,fontSize:0}},[O.map(T=>C(fpe,{key:T,columnKey:T,onColumnResize:b},null))]),P]})}}}),da={};var ype=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{const{fixed:i}=n,o=i===!0?"left":i,r=n.children;return r&&r.length>0?[...e,...dx(r).map(a=>A({fixed:o},a))]:[...e,A(A({},n),{fixed:o})]},[])}function xpe(t){return t.map(e=>{const{fixed:n}=e,i=ype(e,["fixed"]);let o=n;return n==="left"?o="right":n==="right"&&(o="left"),A({fixed:o},i)})}function wpe(t,e){let{prefixCls:n,columns:i,expandable:o,expandedKeys:r,getRowKey:a,onTriggerExpand:s,expandIcon:l,rowExpandable:c,expandIconColumnIndex:u,direction:d,expandRowByClick:f,expandColumnWidth:h,expandFixed:p}=t;const g=SC(),m=L(()=>{if(o.value){let y=i.value.slice();if(!y.includes(da)){const I=u.value||0;I>=0&&y.splice(I,0,da)}const w=y.indexOf(da);y=y.filter((I,k)=>I!==da||k===w);const x=i.value[w];let $;(p.value==="left"||p.value)&&!u.value?$="left":(p.value==="right"||p.value)&&u.value===i.value.length?$="right":$=x?x.fixed:null;const S=r.value,_=c.value,P=l.value,O=n.value,T=f.value,M={[tc]:{class:`${n.value}-expand-icon-col`,columnType:"EXPAND_COLUMN"},title:gm(g.value,"expandColumnTitle",{},()=>[""]),fixed:$,class:`${n.value}-row-expand-icon-cell`,width:h.value,customRender:I=>{let{record:k,index:E}=I;const R=a.value(k,E),D=S.has(R),F=_?_(k):!0,N=P({prefixCls:O,expanded:D,expandable:F,record:k,onExpand:s});return T?C("span",{onClick:B=>B.stopPropagation()},[N]):N}};return y.map(I=>I===da?M:I)}return i.value.filter(y=>y!==da)}),v=L(()=>{let y=m.value;return e.value&&(y=e.value(y)),y.length||(y=[{customRender:()=>null}]),y}),b=L(()=>d.value==="rtl"?xpe(dx(v.value)):dx(v.value));return[v,b]}function i5(t){const e=ie(t);let n;const i=ie([]);function o(r){i.value.push(r),lt.cancel(n),n=lt(()=>{const a=i.value;i.value=[],a.forEach(s=>{e.value=s(e.value)})})}return at(()=>{lt.cancel(n)}),[e,o]}function Spe(t){const e=se(null),n=se();function i(){clearTimeout(n.value)}function o(a){e.value=a,i(),n.value=setTimeout(()=>{e.value=null,n.value=void 0},100)}function r(){return e.value}return at(()=>{i()}),[o,r]}function Cpe(t,e,n){return L(()=>{const o=[],r=[];let a=0,s=0;const l=t.value,c=e.value,u=n.value;for(let d=0;d=0;s-=1){const l=e[s],c=n&&n[s],u=c&&c[tc];if(l||u||a){const d=u||{},{columnType:f}=d,h=$pe(d,["columnType"]);o.unshift(C("col",H({key:s,style:{width:typeof l=="number"?`${l}px`:l}},h),null)),a=!0}}return C("colgroup",null,[o])}function fx(t,e){let{slots:n}=e;var i;return C("div",null,[(i=n.default)===null||i===void 0?void 0:i.call(n)])}fx.displayName="Panel";let Ape=0;const _pe=oe({name:"TableSummary",props:["fixed"],setup(t,e){let{slots:n}=e;const i=dr(),o=`table-summary-uni-key-${++Ape}`,r=L(()=>t.fixed===""||t.fixed);return Ke(()=>{i.summaryCollect(o,r.value)}),at(()=>{i.summaryCollect(o,!1)}),()=>{var a;return(a=n.default)===null||a===void 0?void 0:a.call(n)}}}),Ppe=oe({compatConfig:{MODE:3},name:"ATableSummaryRow",setup(t,e){let{slots:n}=e;return()=>{var i;return C("tr",null,[(i=n.default)===null||i===void 0?void 0:i.call(n)])}}}),r5=Symbol("SummaryContextProps"),Tpe=t=>{ot(r5,t)},Ope=()=>qe(r5,{}),Epe=oe({name:"ATableSummaryCell",props:["index","colSpan","rowSpan","align"],setup(t,e){let{attrs:n,slots:i}=e;const o=dr(),r=Ope();return()=>{const{index:a,colSpan:s=1,rowSpan:l,align:c}=t,{prefixCls:u,direction:d}=o,{scrollColumnIndex:f,stickyOffsets:h,flattenColumns:p}=r,m=a+s-1+1===f?s+1:s,v=CC(a,a+m-1,p,h,d);return C(fv,H({class:n.class,index:a,component:"td",prefixCls:u,record:null,dataIndex:null,align:c,colSpan:m,rowSpan:l,customRender:()=>{var b;return(b=i.default)===null||b===void 0?void 0:b.call(i)}},v),null)}}}),Qf=oe({name:"TableFooter",inheritAttrs:!1,props:["stickyOffsets","flattenColumns"],setup(t,e){let{slots:n}=e;const i=dr();return Tpe($t({stickyOffsets:Ue(t,"stickyOffsets"),flattenColumns:Ue(t,"flattenColumns"),scrollColumnIndex:L(()=>{const o=t.flattenColumns.length-1,r=t.flattenColumns[o];return r!=null&&r.scrollbar?o:null})})),()=>{var o;const{prefixCls:r}=i;return C("tfoot",{class:`${r}-summary`},[(o=n.default)===null||o===void 0?void 0:o.call(n)])}}}),Mpe=_pe;function Ipe(t){let{prefixCls:e,record:n,onExpand:i,expanded:o,expandable:r}=t;const a=`${e}-row-expand-icon`;if(!r)return C("span",{class:[a,`${e}-row-spaced`]},null);const s=l=>{i(n,l),l.stopPropagation()};return C("span",{class:{[a]:!0,[`${e}-row-expanded`]:o,[`${e}-row-collapsed`]:!o},onClick:s},null)}function kpe(t,e,n){const i=[];function o(r){(r||[]).forEach((a,s)=>{i.push(e(a,s)),o(a[n])})}return o(t),i}const Dpe=oe({name:"StickyScrollBar",inheritAttrs:!1,props:["offsetScroll","container","scrollBodyRef","scrollBodySizeInfo"],emits:["scroll"],setup(t,e){let{emit:n,expose:i}=e;const o=dr(),r=ie(0),a=ie(0),s=ie(0);Ke(()=>{r.value=t.scrollBodySizeInfo.scrollWidth||0,a.value=t.scrollBodySizeInfo.clientWidth||0,s.value=r.value&&a.value*(a.value/r.value)},{flush:"post"});const l=ie(),[c,u]=i5({scrollLeft:0,isHiddenScrollBar:!0}),d=se({delta:0,x:0}),f=ie(!1),h=()=>{f.value=!1},p=S=>{d.value={delta:S.pageX-c.value.scrollLeft,x:0},f.value=!0,S.preventDefault()},g=S=>{const{buttons:_}=S||(window==null?void 0:window.event);if(!f.value||_===0){f.value&&(f.value=!1);return}let P=d.value.x+S.pageX-d.value.x-d.value.delta;P<=0&&(P=0),P+s.value>=a.value&&(P=a.value-s.value),n("scroll",{scrollLeft:P/a.value*(r.value+2)}),d.value.x=S.pageX},m=()=>{if(!t.scrollBodyRef.value)return;const S=Rp(t.scrollBodyRef.value).top,_=S+t.scrollBodyRef.value.offsetHeight,P=t.container===window?document.documentElement.scrollTop+window.innerHeight:Rp(t.container).top+t.container.clientHeight;_-Dp()<=P||S>=P-t.offsetScroll?u(O=>A(A({},O),{isHiddenScrollBar:!0})):u(O=>A(A({},O),{isHiddenScrollBar:!1}))};i({setScrollLeft:S=>{u(_=>A(A({},_),{scrollLeft:S/r.value*a.value||0}))}});let b=null,y=null,w=null,x=null;Ze(()=>{b=Gt(document.body,"mouseup",h,!1),y=Gt(document.body,"mousemove",g,!1),w=Gt(window,"resize",m,!1)}),Zg(()=>{pt(()=>{m()})}),Ze(()=>{setTimeout(()=>{ye([s,f],()=>{m()},{immediate:!0,flush:"post"})})}),ye(()=>t.container,()=>{x==null||x.remove(),x=Gt(t.container,"scroll",m,!1)},{immediate:!0,flush:"post"}),at(()=>{b==null||b.remove(),y==null||y.remove(),x==null||x.remove(),w==null||w.remove()}),ye(()=>A({},c.value),(S,_)=>{S.isHiddenScrollBar!==(_==null?void 0:_.isHiddenScrollBar)&&!S.isHiddenScrollBar&&u(P=>{const O=t.scrollBodyRef.value;return O?A(A({},P),{scrollLeft:O.scrollLeft/O.scrollWidth*O.clientWidth}):P})},{immediate:!0});const $=Dp();return()=>{if(r.value<=a.value||!s.value||c.value.isHiddenScrollBar)return null;const{prefixCls:S}=o;return C("div",{style:{height:`${$}px`,width:`${a.value}px`,bottom:`${t.offsetScroll}px`},class:`${S}-sticky-scroll`},[C("div",{onMousedown:p,ref:l,class:ce(`${S}-sticky-scroll-bar`,{[`${S}-sticky-scroll-bar-active`]:f.value}),style:{width:`${s.value}px`,transform:`translate3d(${c.value.scrollLeft}px, 0, 0)`}},null)])}}}),VT=ii()?window:null;function Rpe(t,e){return L(()=>{const{offsetHeader:n=0,offsetSummary:i=0,offsetScroll:o=0,getContainer:r=()=>VT}=typeof t.value=="object"?t.value:{},a=r()||VT,s=!!t.value;return{isSticky:s,stickyClassName:s?`${e.value}-sticky-holder`:"",offsetHeader:n,offsetSummary:i,offsetScroll:o,container:a}})}function Lpe(t,e){return L(()=>{const n=[],i=t.value,o=e.value;for(let r=0;rr.isSticky&&!t.fixHeader?0:r.scrollbarSize),s=se(),l=g=>{const{currentTarget:m,deltaX:v}=g;v&&(o("scroll",{currentTarget:m,scrollLeft:m.scrollLeft+v}),g.preventDefault())},c=se();Ze(()=>{pt(()=>{c.value=Gt(s.value,"wheel",l)})}),at(()=>{var g;(g=c.value)===null||g===void 0||g.remove()});const u=L(()=>t.flattenColumns.every(g=>g.width&&g.width!==0&&g.width!=="0px")),d=se([]),f=se([]);Ke(()=>{const g=t.flattenColumns[t.flattenColumns.length-1],m={fixed:g?g.fixed:null,scrollbar:!0,customHeaderCell:()=>({class:`${r.prefixCls}-cell-scrollbar`})};d.value=a.value?[...t.columns,m]:t.columns,f.value=a.value?[...t.flattenColumns,m]:t.flattenColumns});const h=L(()=>{const{stickyOffsets:g,direction:m}=t,{right:v,left:b}=g;return A(A({},g),{left:m==="rtl"?[...b.map(y=>y+a.value),0]:b,right:m==="rtl"?v:[...v.map(y=>y+a.value),0],isSticky:r.isSticky})}),p=Lpe(Ue(t,"colWidths"),Ue(t,"columCount"));return()=>{var g;const{noData:m,columCount:v,stickyTopOffset:b,stickyBottomOffset:y,stickyClassName:w,maxContentScroll:x}=t,{isSticky:$}=r;return C("div",{style:A({overflow:"hidden"},$?{top:`${b}px`,bottom:`${y}px`}:{}),ref:s,class:ce(n.class,{[w]:!!w})},[C("table",{style:{tableLayout:"fixed",visibility:m||p.value?null:"hidden"}},[(!m||!x||u.value)&&C(o5,{colWidths:p.value?[...p.value,a.value]:[],columCount:v+1,columns:f.value},null),(g=i.default)===null||g===void 0?void 0:g.call(i,A(A({},t),{stickyOffsets:h.value,columns:d.value,flattenColumns:f.value}))])])}}});function YT(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i[o,Ue(t,o)])))}const Fpe=[],Npe={},hx="rc-table-internal-hook",Bpe=oe({name:"VcTable",inheritAttrs:!1,props:["prefixCls","data","columns","rowKey","tableLayout","scroll","rowClassName","title","footer","id","showHeader","components","customRow","customHeaderRow","direction","expandFixed","expandColumnWidth","expandedRowKeys","defaultExpandedRowKeys","expandedRowRender","expandRowByClick","expandIcon","onExpand","onExpandedRowsChange","onUpdate:expandedRowKeys","defaultExpandAllRows","indentSize","expandIconColumnIndex","expandedRowClassName","childrenColumnName","rowExpandable","sticky","transformColumns","internalHooks","internalRefs","canExpandable","onUpdateInternalRefs","transformCellText"],emits:["expand","expandedRowsChange","updateInternalRefs","update:expandedRowKeys"],setup(t,e){let{attrs:n,slots:i,emit:o}=e;const r=L(()=>t.data||Fpe),a=L(()=>!!r.value.length),s=L(()=>qhe(t.components,{})),l=(de,xe)=>G6(s.value,de)||xe,c=L(()=>{const de=t.rowKey;return typeof de=="function"?de:xe=>xe&&xe[de]}),u=L(()=>t.expandIcon||Ipe),d=L(()=>t.childrenColumnName||"children"),f=L(()=>t.expandedRowRender?"row":t.canExpandable||r.value.some(de=>de&&typeof de=="object"&&de[d.value])?"nest":!1),h=ie([]);Ke(()=>{t.defaultExpandedRowKeys&&(h.value=t.defaultExpandedRowKeys),t.defaultExpandAllRows&&(h.value=kpe(r.value,c.value,d.value))})();const g=L(()=>new Set(t.expandedRowKeys||h.value||[])),m=de=>{const xe=c.value(de,r.value.indexOf(de));let _e;const Oe=g.value.has(xe);Oe?(g.value.delete(xe),_e=[...g.value]):_e=[...g.value,xe],h.value=_e,o("expand",!Oe,de),o("update:expandedRowKeys",_e),o("expandedRowsChange",_e)},v=se(0),[b,y]=wpe(A(A({},uo(t)),{expandable:L(()=>!!t.expandedRowRender),expandedKeys:g,getRowKey:c,onTriggerExpand:m,expandIcon:u}),L(()=>t.internalHooks===hx?t.transformColumns:null)),w=L(()=>({columns:b.value,flattenColumns:y.value})),x=se(),$=se(),S=se(),_=se({scrollWidth:0,clientWidth:0}),P=se(),[O,T]=Mt(!1),[M,I]=Mt(!1),[k,E]=i5(new Map),R=L(()=>dv(y.value)),D=L(()=>R.value.map(de=>k.value.get(de))),F=L(()=>y.value.length),N=Cpe(D,F,Ue(t,"direction")),B=L(()=>t.scroll&&cx(t.scroll.y)),z=L(()=>t.scroll&&cx(t.scroll.x)||!!t.expandFixed),W=L(()=>z.value&&y.value.some(de=>{let{fixed:xe}=de;return xe})),j=se(),U=Rpe(Ue(t,"sticky"),Ue(t,"prefixCls")),V=$t({}),q=L(()=>{const de=Object.values(V)[0];return(B.value||U.value.isSticky)&&de}),Y=(de,xe)=>{xe?V[de]=xe:delete V[de]},J=se({}),Q=se({}),G=se({});Ke(()=>{B.value&&(Q.value={overflowY:"scroll",maxHeight:ss(t.scroll.y)}),z.value&&(J.value={overflowX:"auto"},B.value||(Q.value={overflowY:"hidden"}),G.value={width:t.scroll.x===!0?"auto":ss(t.scroll.x),minWidth:"100%"})});const ee=(de,xe)=>{mm(x.value)&&E(_e=>{if(_e.get(de)!==xe){const Oe=new Map(_e);return Oe.set(de,xe),Oe}return _e})},[X,K]=Spe();function te(de,xe){if(!xe)return;if(typeof xe=="function"){xe(de);return}const _e=xe.$el||xe;_e.scrollLeft!==de&&(_e.scrollLeft=de)}const ue=de=>{let{currentTarget:xe,scrollLeft:_e}=de;var Oe;const Re=t.direction==="rtl",Se=typeof _e=="number"?_e:xe.scrollLeft,Ae=xe||Npe;if((!K()||K()===Ae)&&(X(Ae),te(Se,$.value),te(Se,S.value),te(Se,P.value),te(Se,(Oe=j.value)===null||Oe===void 0?void 0:Oe.setScrollLeft)),xe){const{scrollWidth:Pe,clientWidth:ke}=xe;Re?(T(-Se0)):(T(Se>0),I(Se{z.value&&S.value?ue({currentTarget:S.value}):(T(!1),I(!1))};let re;const ne=de=>{de!==v.value&&(ae(),v.value=x.value?x.value.offsetWidth:de)},le=de=>{let{width:xe}=de;if(clearTimeout(re),v.value===0){ne(xe);return}re=setTimeout(()=>{ne(xe)},100)};ye([z,()=>t.data,()=>t.columns],()=>{z.value&&ae()},{flush:"post"});const[he,pe]=Mt(0);npe(),Ze(()=>{pt(()=>{var de,xe;ae(),pe(eY(S.value).width),_.value={scrollWidth:((de=S.value)===null||de===void 0?void 0:de.scrollWidth)||0,clientWidth:((xe=S.value)===null||xe===void 0?void 0:xe.clientWidth)||0}})}),ri(()=>{pt(()=>{var de,xe;const _e=((de=S.value)===null||de===void 0?void 0:de.scrollWidth)||0,Oe=((xe=S.value)===null||xe===void 0?void 0:xe.clientWidth)||0;(_.value.scrollWidth!==_e||_.value.clientWidth!==Oe)&&(_.value={scrollWidth:_e,clientWidth:Oe})})}),Ke(()=>{t.internalHooks===hx&&t.internalRefs&&t.onUpdateInternalRefs({body:S.value?S.value.$el||S.value:null})},{flush:"post"});const ge=L(()=>t.tableLayout?t.tableLayout:W.value?t.scroll.x==="max-content"?"auto":"fixed":B.value||U.value.isSticky||y.value.some(de=>{let{ellipsis:xe}=de;return xe})?"fixed":"auto"),be=()=>{var de;return a.value?null:((de=i.emptyText)===null||de===void 0?void 0:de.call(i))||"No Data"};Khe($t(A(A({},uo(YT(t,"prefixCls","direction","transformCellText"))),{getComponent:l,scrollbarSize:he,fixedInfoList:L(()=>y.value.map((de,xe)=>CC(xe,xe,y.value,N.value,t.direction))),isSticky:L(()=>U.value.isSticky),summaryCollect:Y}))),hpe($t(A(A({},uo(YT(t,"rowClassName","expandedRowClassName","expandRowByClick","expandedRowRender","expandIconColumnIndex","indentSize"))),{columns:b,flattenColumns:y,tableLayout:ge,expandIcon:u,expandableType:f,onTriggerExpand:m}))),mpe({onColumnResize:ee}),upe({componentWidth:v,fixHeader:B,fixColumn:W,horizonScroll:z});const $e=()=>C(bpe,{data:r.value,measureColumnWidth:B.value||z.value||U.value.isSticky,expandedKeys:g.value,rowExpandable:t.rowExpandable,getRowKey:c.value,customRow:t.customRow,childrenColumnName:d.value},{emptyNode:be}),fe=()=>C(o5,{colWidths:y.value.map(de=>{let{width:xe}=de;return xe}),columns:y.value},null);return()=>{var de;const{prefixCls:xe,scroll:_e,tableLayout:Oe,direction:Re,title:Se=i.title,footer:Ae=i.footer,id:Pe,showHeader:ke,customHeaderRow:Le}=t,{isSticky:De,offsetHeader:je,offsetSummary:ft,offsetScroll:_t,stickyClassName:yt,container:Pt}=U.value,Et=l(["table"],"table"),fn=l(["body"]),yn=(de=i.summary)===null||de===void 0?void 0:de.call(i,{pageData:r.value});let $n=()=>null;const on={colWidths:D.value,columCount:y.value.length,stickyOffsets:N.value,customHeaderRow:Le,fixHeader:B.value,scroll:_e};if(B.value||De){let Zi=()=>null;typeof fn=="function"?(Zi=()=>fn(r.value,{scrollbarSize:he.value,ref:S,onScroll:ue}),on.colWidths=y.value.map((Si,za)=>{let{width:Ie}=Si;const st=za===b.value.length-1?Ie-he.value:Ie;return typeof st=="number"&&!Number.isNaN(st)?st:0})):Zi=()=>C("div",{style:A(A({},J.value),Q.value),onScroll:ue,ref:S,class:ce(`${xe}-body`)},[C(Et,{style:A(A({},G.value),{tableLayout:ge.value})},{default:()=>[fe(),$e(),!q.value&&yn&&C(Qf,{stickyOffsets:N.value,flattenColumns:y.value},{default:()=>[yn]})]})]);const So=A(A(A({noData:!r.value.length,maxContentScroll:z.value&&_e.x==="max-content"},on),w.value),{direction:Re,stickyClassName:yt,onScroll:ue});$n=()=>C(Qe,null,[ke!==!1&&C(XT,H(H({},So),{},{stickyTopOffset:je,class:`${xe}-header`,ref:$}),{default:Si=>C(Qe,null,[C(jT,Si,null),q.value==="top"&&C(Qf,Si,{default:()=>[yn]})])}),Zi(),q.value&&q.value!=="top"&&C(XT,H(H({},So),{},{stickyBottomOffset:ft,class:`${xe}-summary`,ref:P}),{default:Si=>C(Qf,Si,{default:()=>[yn]})}),De&&S.value&&C(Dpe,{ref:j,offsetScroll:_t,scrollBodyRef:S,onScroll:ue,container:Pt,scrollBodySizeInfo:_.value},null)])}else $n=()=>C("div",{style:A(A({},J.value),Q.value),class:ce(`${xe}-content`),onScroll:ue,ref:S},[C(Et,{style:A(A({},G.value),{tableLayout:ge.value})},{default:()=>[fe(),ke!==!1&&C(jT,H(H({},on),w.value),null),$e(),yn&&C(Qf,{stickyOffsets:N.value,flattenColumns:y.value},{default:()=>[yn]})]})]);const Yn=ka(n,{aria:!0,data:!0}),wi=()=>C("div",H(H({},Yn),{},{class:ce(xe,{[`${xe}-rtl`]:Re==="rtl",[`${xe}-ping-left`]:O.value,[`${xe}-ping-right`]:M.value,[`${xe}-layout-fixed`]:Oe==="fixed",[`${xe}-fixed-header`]:B.value,[`${xe}-fixed-column`]:W.value,[`${xe}-scroll-horizontal`]:z.value,[`${xe}-has-fix-left`]:y.value[0]&&y.value[0].fixed,[`${xe}-has-fix-right`]:y.value[F.value-1]&&y.value[F.value-1].fixed==="right",[n.class]:n.class}),style:n.style,id:Pe,ref:x}),[Se&&C(fx,{class:`${xe}-title`},{default:()=>[Se(r.value)]}),C("div",{class:`${xe}-container`},[$n()]),Ae&&C(fx,{class:`${xe}-footer`},{default:()=>[Ae(r.value)]})]);return z.value?C(mo,{onResize:le},{default:wi}):wi()}}});function zpe(){const t=A({},arguments.length<=0?void 0:arguments[0]);for(let e=1;e{const o=n[i];o!==void 0&&(t[i]=o)})}return t}const px=10;function Hpe(t,e){const n={current:t.current,pageSize:t.pageSize};return Object.keys(e&&typeof e=="object"?e:{}).forEach(o=>{const r=t[o];typeof r!="function"&&(n[o]=r)}),n}function Wpe(t,e,n){const i=L(()=>e.value&&typeof e.value=="object"?e.value:{}),o=L(()=>i.value.total||0),[r,a]=Mt(()=>({current:"defaultCurrent"in i.value?i.value.defaultCurrent:1,pageSize:"defaultPageSize"in i.value?i.value.defaultPageSize:px})),s=L(()=>{const u=zpe(r.value,i.value,{total:o.value>0?o.value:t.value}),d=Math.ceil((o.value||t.value)/u.pageSize);return u.current>d&&(u.current=d||1),u}),l=(u,d)=>{e.value!==!1&&a({current:u??1,pageSize:d||s.value.pageSize})},c=(u,d)=>{var f,h;e.value&&((h=(f=i.value).onChange)===null||h===void 0||h.call(f,u,d)),l(u,d),n(u,d||s.value.pageSize)};return[L(()=>e.value===!1?{}:A(A({},s.value),{onChange:c})),l]}function jpe(t,e,n){const i=ie({});ye([t,e,n],()=>{const r=new Map,a=n.value,s=e.value;function l(c){c.forEach((u,d)=>{const f=a(u,d);r.set(f,u),u&&typeof u=="object"&&s in u&&l(u[s]||[])})}l(t.value),i.value={kvMap:r}},{deep:!0,immediate:!0});function o(r){return i.value.kvMap.get(r)}return[o]}const yr={},gx="SELECT_ALL",mx="SELECT_INVERT",vx="SELECT_NONE",Vpe=[];function a5(t,e){let n=[];return(e||[]).forEach(i=>{n.push(i),i&&typeof i=="object"&&t in i&&(n=[...n,...a5(t,i[t])])}),n}function Xpe(t,e){const n=L(()=>{const P=t.value||{},{checkStrictly:O=!0}=P;return A(A({},P),{checkStrictly:O})}),[i,o]=jt(n.value.selectedRowKeys||n.value.defaultSelectedRowKeys||Vpe,{value:L(()=>n.value.selectedRowKeys)}),r=ie(new Map),a=P=>{if(n.value.preserveSelectedRowKeys){const O=new Map;P.forEach(T=>{let M=e.getRecordByKey(T);!M&&r.value.has(T)&&(M=r.value.get(T)),O.set(T,M)}),r.value=O}};Ke(()=>{a(i.value)});const s=L(()=>n.value.checkStrictly?null:af(e.data.value,{externalGetKey:e.getRowKey.value,childrenPropName:e.childrenColumnName.value}).keyEntities),l=L(()=>a5(e.childrenColumnName.value,e.pageData.value)),c=L(()=>{const P=new Map,O=e.getRowKey.value,T=n.value.getCheckboxProps;return l.value.forEach((M,I)=>{const k=O(M,I),E=(T?T(M):null)||{};P.set(k,E)}),P}),{maxLevel:u,levelEntities:d}=Zm(s),f=P=>{var O;return!!(!((O=c.value.get(e.getRowKey.value(P)))===null||O===void 0)&&O.disabled)},h=L(()=>{if(n.value.checkStrictly)return[i.value||[],[]];const{checkedKeys:P,halfCheckedKeys:O}=fo(i.value,!0,s.value,u.value,d.value,f);return[P||[],O]}),p=L(()=>h.value[0]),g=L(()=>h.value[1]),m=L(()=>{const P=n.value.type==="radio"?p.value.slice(0,1):p.value;return new Set(P)}),v=L(()=>n.value.type==="radio"?new Set:new Set(g.value)),[b,y]=Mt(null),w=P=>{let O,T;a(P);const{preserveSelectedRowKeys:M,onChange:I}=n.value,{getRecordByKey:k}=e;M?(O=P,T=P.map(E=>r.value.get(E))):(O=[],T=[],P.forEach(E=>{const R=k(E);R!==void 0&&(O.push(E),T.push(R))})),o(O),I==null||I(O,T)},x=(P,O,T,M)=>{const{onSelect:I}=n.value,{getRecordByKey:k}=e||{};if(I){const E=T.map(R=>k(R));I(k(P),O,E,M)}w(T)},$=L(()=>{const{onSelectInvert:P,onSelectNone:O,selections:T,hideSelectAll:M}=n.value,{data:I,pageData:k,getRowKey:E,locale:R}=e;return!T||M?null:(T===!0?[gx,mx,vx]:T).map(F=>F===gx?{key:"all",text:R.value.selectionAll,onSelect(){w(I.value.map((N,B)=>E.value(N,B)).filter(N=>{const B=c.value.get(N);return!(B!=null&&B.disabled)||m.value.has(N)}))}}:F===mx?{key:"invert",text:R.value.selectInvert,onSelect(){const N=new Set(m.value);k.value.forEach((z,W)=>{const j=E.value(z,W),U=c.value.get(j);U!=null&&U.disabled||(N.has(j)?N.delete(j):N.add(j))});const B=Array.from(N);P&&(Nt(!1,"Table","`onSelectInvert` will be removed in future. Please use `onChange` instead."),P(B)),w(B)}}:F===vx?{key:"none",text:R.value.selectNone,onSelect(){O==null||O(),w(Array.from(m.value).filter(N=>{const B=c.value.get(N);return B==null?void 0:B.disabled}))}}:F)}),S=L(()=>l.value.length);return[P=>{var O;const{onSelectAll:T,onSelectMultiple:M,columnWidth:I,type:k,fixed:E,renderCell:R,hideSelectAll:D,checkStrictly:F}=n.value,{prefixCls:N,getRecordByKey:B,getRowKey:z,expandType:W,getPopupContainer:j}=e;if(!t.value)return P.filter(ne=>ne!==yr);let U=P.slice();const V=new Set(m.value),q=l.value.map(z.value).filter(ne=>!c.value.get(ne).disabled),Y=q.every(ne=>V.has(ne)),J=q.some(ne=>V.has(ne)),Q=()=>{const ne=[];Y?q.forEach(he=>{V.delete(he),ne.push(he)}):q.forEach(he=>{V.has(he)||(V.add(he),ne.push(he))});const le=Array.from(V);T==null||T(!Y,le.map(he=>B(he)),ne.map(he=>B(he))),w(le)};let G;if(k!=="radio"){let ne;if($.value){const be=C(sn,{getPopupContainer:j.value},{default:()=>[$.value.map(($e,fe)=>{const{key:de,text:xe,onSelect:_e}=$e;return C(sn.Item,{key:de||fe,onClick:()=>{_e==null||_e(q)}},{default:()=>[xe]})})]});ne=C("div",{class:`${N.value}-selection-extra`},[C(Io,{overlay:be,getPopupContainer:j.value},{default:()=>[C("span",null,[C(nl,null,null)])]})])}const le=l.value.map((be,$e)=>{const fe=z.value(be,$e),de=c.value.get(fe)||{};return A({checked:V.has(fe)},de)}).filter(be=>{let{disabled:$e}=be;return $e}),he=!!le.length&&le.length===S.value,pe=he&&le.every(be=>{let{checked:$e}=be;return $e}),ge=he&&le.some(be=>{let{checked:$e}=be;return $e});G=!D&&C("div",{class:`${N.value}-selection`},[C(ho,{checked:he?pe:!!S.value&&Y,indeterminate:he?!pe&&ge:!Y&&J,onChange:Q,disabled:S.value===0||he,"aria-label":ne?"Custom selection":"Select all",skipGroup:!0},null),ne])}let ee;k==="radio"?ee=ne=>{let{record:le,index:he}=ne;const pe=z.value(le,he),ge=V.has(pe);return{node:C(di,H(H({},c.value.get(pe)),{},{checked:ge,onClick:be=>be.stopPropagation(),onChange:be=>{V.has(pe)||x(pe,!0,[pe],be.nativeEvent)}}),null),checked:ge}}:ee=ne=>{let{record:le,index:he}=ne;var pe;const ge=z.value(le,he),be=V.has(ge),$e=v.value.has(ge),fe=c.value.get(ge);let de;return W.value==="nest"?(de=$e,Nt(typeof(fe==null?void 0:fe.indeterminate)!="boolean","Table","set `indeterminate` using `rowSelection.getCheckboxProps` is not allowed with tree structured dataSource.")):de=(pe=fe==null?void 0:fe.indeterminate)!==null&&pe!==void 0?pe:$e,{node:C(ho,H(H({},fe),{},{indeterminate:de,checked:be,skipGroup:!0,onClick:xe=>xe.stopPropagation(),onChange:xe=>{let{nativeEvent:_e}=xe;const{shiftKey:Oe}=_e;let Re=-1,Se=-1;if(Oe&&F){const Ae=new Set([b.value,ge]);q.some((Pe,ke)=>{if(Ae.has(Pe))if(Re===-1)Re=ke;else return Se=ke,!0;return!1})}if(Se!==-1&&Re!==Se&&F){const Ae=q.slice(Re,Se+1),Pe=[];be?Ae.forEach(Le=>{V.has(Le)&&(Pe.push(Le),V.delete(Le))}):Ae.forEach(Le=>{V.has(Le)||(Pe.push(Le),V.add(Le))});const ke=Array.from(V);M==null||M(!be,ke.map(Le=>B(Le)),Pe.map(Le=>B(Le))),w(ke)}else{const Ae=p.value;if(F){const Pe=be?Go(Ae,ge):vr(Ae,ge);x(ge,!be,Pe,_e)}else{const Pe=fo([...Ae,ge],!0,s.value,u.value,d.value,f),{checkedKeys:ke,halfCheckedKeys:Le}=Pe;let De=ke;if(be){const je=new Set(ke);je.delete(ge),De=fo(Array.from(je),{halfCheckedKeys:Le},s.value,u.value,d.value,f).checkedKeys}x(ge,!be,De,_e)}}y(ge)}}),null),checked:be}};const X=ne=>{let{record:le,index:he}=ne;const{node:pe,checked:ge}=ee({record:le,index:he});return R?R(ge,le,he,pe):pe};if(!U.includes(yr))if(U.findIndex(ne=>{var le;return((le=ne[tc])===null||le===void 0?void 0:le.columnType)==="EXPAND_COLUMN"})===0){const[ne,...le]=U;U=[ne,yr,...le]}else U=[yr,...U];const K=U.indexOf(yr);U=U.filter((ne,le)=>ne!==yr||le===K);const te=U[K-1],ue=U[K+1];let ae=E;ae===void 0&&((ue==null?void 0:ue.fixed)!==void 0?ae=ue.fixed:(te==null?void 0:te.fixed)!==void 0&&(ae=te.fixed)),ae&&te&&((O=te[tc])===null||O===void 0?void 0:O.columnType)==="EXPAND_COLUMN"&&te.fixed===void 0&&(te.fixed=ae);const re={fixed:ae,width:I,className:`${N.value}-selection-column`,title:n.value.columnTitle||G,customRender:X,[tc]:{class:`${N.value}-selection-col`}};return U.map(ne=>ne===yr?re:ne)},m]}var Ype={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"};function GT(t){for(var e=1;e0&&arguments[0]!==void 0?arguments[0]:[];const e=Dt(t),n=[];return e.forEach(i=>{var o,r,a,s;if(!i)return;const l=i.key,c=((o=i.props)===null||o===void 0?void 0:o.style)||{},u=((r=i.props)===null||r===void 0?void 0:r.class)||"",d=i.props||{};for(const[m,v]of Object.entries(d))d[Sc(m)]=v;const f=i.children||{},{default:h}=f,p=qpe(f,["default"]),g=A(A(A({},p),d),{style:c,class:u});if(l&&(g.key=l),!((a=i.type)===null||a===void 0)&&a.__ANT_TABLE_COLUMN_GROUP)g.children=s5(typeof h=="function"?h():h);else{const m=(s=i.children)===null||s===void 0?void 0:s.default;g.customRender=g.customRender||m}n.push(g)}),n}const Xh="ascend",Qb="descend";function xg(t){return typeof t.sorter=="object"&&typeof t.sorter.multiple=="number"?t.sorter.multiple:!1}function UT(t){return typeof t=="function"?t:t&&typeof t=="object"&&t.compare?t.compare:!1}function Zpe(t,e){return e?t[t.indexOf(e)+1]:t[0]}function bx(t,e,n){let i=[];function o(r,a){i.push({column:r,key:Bs(r,a),multiplePriority:xg(r),sortOrder:r.sortOrder})}return(t||[]).forEach((r,a)=>{const s=df(a,n);r.children?("sortOrder"in r&&o(r,s),i=[...i,...bx(r.children,e,s)]):r.sorter&&("sortOrder"in r?o(r,s):e&&r.defaultSortOrder&&i.push({column:r,key:Bs(r,s),multiplePriority:xg(r),sortOrder:r.defaultSortOrder}))}),i}function l5(t,e,n,i,o,r,a,s){return(e||[]).map((l,c)=>{const u=df(c,s);let d=l;if(d.sorter){const f=d.sortDirections||o,h=d.showSorterTooltip===void 0?a:d.showSorterTooltip,p=Bs(d,u),g=n.find(P=>{let{key:O}=P;return O===p}),m=g?g.sortOrder:null,v=Zpe(f,m),b=f.includes(Xh)&&C(AC,{class:ce(`${t}-column-sorter-up`,{active:m===Xh}),role:"presentation"},null),y=f.includes(Qb)&&C($C,{role:"presentation",class:ce(`${t}-column-sorter-down`,{active:m===Qb})},null),{cancelSort:w,triggerAsc:x,triggerDesc:$}=r||{};let S=w;v===Qb?S=$:v===Xh&&(S=x);const _=typeof h=="object"?h:{title:S};d=A(A({},d),{className:ce(d.className,{[`${t}-column-sort`]:m}),title:P=>{const O=C("div",{class:`${t}-column-sorters`},[C("span",{class:`${t}-column-title`},[_C(l.title,P)]),C("span",{class:ce(`${t}-column-sorter`,{[`${t}-column-sorter-full`]:!!(b&&y)})},[C("span",{class:`${t}-column-sorter-inner`},[b,y])])]);return h?C(Pi,_,{default:()=>[O]}):O},customHeaderCell:P=>{const O=l.customHeaderCell&&l.customHeaderCell(P)||{},T=O.onClick,M=O.onKeydown;return O.onClick=I=>{i({column:l,key:p,sortOrder:v,multiplePriority:xg(l)}),T&&T(I)},O.onKeydown=I=>{I.keyCode===Te.ENTER&&(i({column:l,key:p,sortOrder:v,multiplePriority:xg(l)}),M==null||M(I))},m&&(O["aria-sort"]=m==="ascend"?"ascending":"descending"),O.class=ce(O.class,`${t}-column-has-sorters`),O.tabindex=0,O}})}return"children"in d&&(d=A(A({},d),{children:l5(t,d.children,n,i,o,r,a,u)})),d})}function qT(t){const{column:e,sortOrder:n}=t;return{column:e,order:n,field:e.dataIndex,columnKey:e.key}}function ZT(t){const e=t.filter(n=>{let{sortOrder:i}=n;return i}).map(qT);return e.length===0&&t.length?A(A({},qT(t[t.length-1])),{column:void 0}):e.length<=1?e[0]||{}:e}function yx(t,e,n){const i=e.slice().sort((a,s)=>s.multiplePriority-a.multiplePriority),o=t.slice(),r=i.filter(a=>{let{column:{sorter:s},sortOrder:l}=a;return UT(s)&&l});return r.length?o.sort((a,s)=>{for(let l=0;l{const s=a[n];return s?A(A({},a),{[n]:yx(s,e,n)}):a}):o}function Jpe(t){let{prefixCls:e,mergedColumns:n,onSorterChange:i,sortDirections:o,tableLocale:r,showSorterTooltip:a}=t;const[s,l]=Mt(bx(n.value,!0)),c=L(()=>{let p=!0;const g=bx(n.value,!1);if(!g.length)return s.value;const m=[];function v(y){p?m.push(y):m.push(A(A({},y),{sortOrder:null}))}let b=null;return g.forEach(y=>{b===null?(v(y),y.sortOrder&&(y.multiplePriority===!1?p=!1:b=!0)):(b&&y.multiplePriority!==!1||(p=!1),v(y))}),m}),u=L(()=>{const p=c.value.map(g=>{let{column:m,sortOrder:v}=g;return{column:m,order:v}});return{sortColumns:p,sortColumn:p[0]&&p[0].column,sortOrder:p[0]&&p[0].order}});function d(p){let g;p.multiplePriority===!1||!c.value.length||c.value[0].multiplePriority===!1?g=[p]:g=[...c.value.filter(m=>{let{key:v}=m;return v!==p.key}),p],l(g),i(ZT(g),g)}const f=p=>l5(e.value,p,c.value,d,o.value,r.value,a.value),h=L(()=>ZT(c.value));return[f,c,u,h]}var Qpe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"};function JT(t){for(var e=1;e{const{keyCode:e}=t;e===Te.ENTER&&t.stopPropagation()},nge=(t,e)=>{let{slots:n}=e;var i;return C("div",{onClick:o=>o.stopPropagation(),onKeydown:tge},[(i=n.default)===null||i===void 0?void 0:i.call(n)])},QT=oe({compatConfig:{MODE:3},name:"FilterSearch",inheritAttrs:!1,props:{value:Ne(),onChange:ve(),filterSearch:Xe([Boolean,Function]),tablePrefixCls:Ne(),locale:Fe()},setup(t){return()=>{const{value:e,onChange:n,filterSearch:i,tablePrefixCls:o,locale:r}=t;return i?C("div",{class:`${o}-filter-dropdown-search`},[C(wn,{placeholder:r.filterSearchPlaceholder,onChange:n,value:e,htmlSize:1,class:`${o}-filter-dropdown-search-input`},{prefix:()=>C(Tc,null,null)})]):null}}});var eO=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);ot.motion?t.motion:Jd()),l=(c,u)=>{var d,f,h,p;u==="appear"?(f=(d=s.value)===null||d===void 0?void 0:d.onAfterEnter)===null||f===void 0||f.call(d,c):u==="leave"&&((p=(h=s.value)===null||h===void 0?void 0:h.onAfterLeave)===null||p===void 0||p.call(h,c)),a.value||t.onMotionEnd(),a.value=!0};return ye(()=>t.motionNodes,()=>{t.motionNodes&&t.motionType==="hide"&&o.value&&pt(()=>{o.value=!1})},{immediate:!0,flush:"post"}),Ze(()=>{t.motionNodes&&t.onMotionStart()}),at(()=>{t.motionNodes&&l()}),()=>{const{motion:c,motionNodes:u,motionType:d,active:f,eventKey:h}=t,p=eO(t,["motion","motionNodes","motionType","active","eventKey"]);return u?C(En,H(H({},s.value),{},{appear:d==="show",onAfterAppear:g=>l(g,"appear"),onAfterLeave:g=>l(g,"leave")}),{default:()=>[ni(C("div",{class:`${r.value.prefixCls}-treenode-motion`},[u.map(g=>{const m=eO(g.data,[]),{title:v,key:b,isStart:y,isEnd:w}=g;return delete m.children,C(jy,H(H({},m),{},{title:v,active:f,data:g.data,key:b,eventKey:b,isStart:y,isEnd:w}),i)})]),[[vi,o.value]])]}):C(jy,H(H({class:n.class,style:n.style},p),{},{active:f,eventKey:h}),i)}}});function oge(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];const n=t.length,i=e.length;if(Math.abs(n-i)!==1)return{add:!1,key:null};function o(r,a){const s=new Map;r.forEach(c=>{s.set(c,!0)});const l=a.filter(c=>!s.has(c));return l.length===1?l[0]:null}return na.key===n),o=t[i+1],r=e.findIndex(a=>a.key===n);if(o){const a=e.findIndex(s=>s.key===o.key);return e.slice(r+1,a)}return e.slice(r+1)}var nO=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{},zs=`RC_TREE_MOTION_${Math.random()}`,xx={key:zs},c5={key:zs,level:0,index:0,pos:"0",node:xx,nodes:[xx]},oO={parent:null,children:[],pos:c5.pos,data:xx,title:null,key:zs,isStart:[],isEnd:[]};function rO(t,e,n,i){return e===!1||!n?t:t.slice(0,Math.ceil(n/i)+1)}function aO(t){const{key:e,pos:n}=t;return rf(e,n)}function age(t){let e=String(t.key),n=t;for(;n.parent;)n=n.parent,e=`${n.key} > ${e}`;return e}const sge=oe({compatConfig:{MODE:3},name:"NodeList",inheritAttrs:!1,props:uoe,setup(t,e){let{expose:n,attrs:i}=e;const o=se(),r=se(),{expandedKeys:a,flattenNodes:s}=H4();n({scrollTo:g=>{o.value.scrollTo(g)},getIndentWidth:()=>r.value.offsetWidth});const l=ie(s.value),c=ie([]),u=se(null);function d(){l.value=s.value,c.value=[],u.value=null,t.onListChangeEnd()}const f=zS();ye([()=>a.value.slice(),s],(g,m)=>{let[v,b]=g,[y,w]=m;const x=oge(y,v);if(x.key!==null){const{virtual:$,height:S,itemHeight:_}=t;if(x.add){const P=w.findIndex(M=>{let{key:I}=M;return I===x.key}),O=rO(tO(w,b,x.key),$,S,_),T=w.slice();T.splice(P+1,0,oO),l.value=T,c.value=O,u.value="show"}else{const P=b.findIndex(M=>{let{key:I}=M;return I===x.key}),O=rO(tO(b,w,x.key),$,S,_),T=b.slice();T.splice(P+1,0,oO),l.value=T,c.value=O,u.value="hide"}}else w!==b&&(l.value=b)}),ye(()=>f.value.dragging,g=>{g||d()});const h=L(()=>t.motion===void 0?l.value:s.value),p=()=>{t.onActiveChange(null)};return()=>{const g=A(A({},t),i),{prefixCls:m,selectable:v,checkable:b,disabled:y,motion:w,height:x,itemHeight:$,virtual:S,focusable:_,activeItem:P,focused:O,tabindex:T,onKeydown:M,onFocus:I,onBlur:k,onListChangeStart:E,onListChangeEnd:R}=g,D=nO(g,["prefixCls","selectable","checkable","disabled","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabindex","onKeydown","onFocus","onBlur","onListChangeStart","onListChangeEnd"]);return C(Qe,null,[O&&P&&C("span",{style:iO,"aria-live":"assertive"},[age(P)]),C("div",null,[C("input",{style:iO,disabled:_===!1||y,tabindex:_!==!1?T:null,onKeydown:M,onFocus:I,onBlur:k,value:"",onChange:rge,"aria-label":"for screen reader"},null)]),C("div",{class:`${m}-treenode`,"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden"}},[C("div",{class:`${m}-indent`},[C("div",{ref:r,class:`${m}-indent-unit`},null)])]),C(AR,H(H({},ht(D,["onActiveChange"])),{},{data:h.value,itemKey:aO,height:x,fullHeight:!1,virtual:S,itemHeight:$,prefixCls:`${m}-list`,ref:o,onVisibleChange:(F,N)=>{const B=new Set(F);N.filter(W=>!B.has(W)).some(W=>aO(W)===zs)&&d()}}),{default:F=>{const{pos:N}=F,B=nO(F.data,[]),{title:z,key:W,isStart:j,isEnd:U}=F,V=rf(W,N);return delete B.key,delete B.children,C(ige,H(H({},B),{},{eventKey:V,title:z,active:!!P&&W===P.key,data:F.data,isStart:j,isEnd:U,motion:w,motionNodes:W===zs?c.value:null,motionType:u.value,onMotionStart:E,onMotionEnd:d,onMousemove:p}),null)}})])}}});function lge(t){let{dropPosition:e,dropLevelOffset:n,indent:i}=t;const o={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:"2px"};switch(e){case-1:o.top=0,o.left=`${-n*i}px`;break;case 1:o.bottom=0,o.left=`${-n*i}px`;break;case 0:o.bottom=0,o.left=`${i}`;break}return C("div",{style:o},null)}const cge=10,u5=oe({compatConfig:{MODE:3},name:"Tree",inheritAttrs:!1,props:ct(j4(),{prefixCls:"vc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,expandAction:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:lge,allowDrop:()=>!0}),setup(t,e){let{attrs:n,slots:i,expose:o}=e;const r=ie(!1);let a={};const s=ie(),l=ie([]),c=ie([]),u=ie([]),d=ie([]),f=ie([]),h=ie([]),p={},g=$t({draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null}),m=ie([]);ye([()=>t.treeData,()=>t.children],()=>{m.value=t.treeData!==void 0?t.treeData.slice():Xy(dt(t.children))},{immediate:!0,deep:!0});const v=ie({}),b=ie(!1),y=ie(null),w=ie(!1),x=L(()=>Gm(t.fieldNames)),$=ie();let S=null,_=null,P=null;const O=L(()=>({expandedKeysSet:T.value,selectedKeysSet:M.value,loadedKeysSet:I.value,loadingKeysSet:k.value,checkedKeysSet:E.value,halfCheckedKeysSet:R.value,dragOverNodeKey:g.dragOverNodeKey,dropPosition:g.dropPosition,keyEntities:v.value})),T=L(()=>new Set(h.value)),M=L(()=>new Set(l.value)),I=L(()=>new Set(d.value)),k=L(()=>new Set(f.value)),E=L(()=>new Set(c.value)),R=L(()=>new Set(u.value));Ke(()=>{if(m.value){const Se=af(m.value,{fieldNames:x.value});v.value=A({[zs]:c5},Se.keyEntities)}});let D=!1;ye([()=>t.expandedKeys,()=>t.autoExpandParent,v],(Se,Ae)=>{let[Pe,ke]=Se,[Le,De]=Ae,je=h.value;if(t.expandedKeys!==void 0||D&&ke!==De)je=t.autoExpandParent||!D&&t.defaultExpandParent?Vy(t.expandedKeys,v.value):t.expandedKeys;else if(!D&&t.defaultExpandAll){const ft=A({},v.value);delete ft[zs],je=Object.keys(ft).map(_t=>ft[_t].key)}else!D&&t.defaultExpandedKeys&&(je=t.autoExpandParent||t.defaultExpandParent?Vy(t.defaultExpandedKeys,v.value):t.defaultExpandedKeys);je&&(h.value=je),D=!0},{immediate:!0});const F=ie([]);Ke(()=>{F.value=boe(m.value,h.value,x.value)}),Ke(()=>{t.selectable&&(t.selectedKeys!==void 0?l.value=vP(t.selectedKeys,t):!D&&t.defaultSelectedKeys&&(l.value=vP(t.defaultSelectedKeys,t)))});const{maxLevel:N,levelEntities:B}=Zm(v);Ke(()=>{if(t.checkable){let Se;if(t.checkedKeys!==void 0?Se=Rb(t.checkedKeys)||{}:!D&&t.defaultCheckedKeys?Se=Rb(t.defaultCheckedKeys)||{}:m.value&&(Se=Rb(t.checkedKeys)||{checkedKeys:c.value,halfCheckedKeys:u.value}),Se){let{checkedKeys:Ae=[],halfCheckedKeys:Pe=[]}=Se;t.checkStrictly||({checkedKeys:Ae,halfCheckedKeys:Pe}=fo(Ae,!0,v.value,N.value,B.value)),c.value=Ae,u.value=Pe}}}),Ke(()=>{t.loadedKeys&&(d.value=t.loadedKeys)});const z=()=>{A(g,{dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})},W=Se=>{$.value.scrollTo(Se)};ye(()=>t.activeKey,()=>{t.activeKey!==void 0&&(y.value=t.activeKey)},{immediate:!0}),ye(y,Se=>{pt(()=>{Se!==null&&W({key:Se})})},{immediate:!0,flush:"post"});const j=Se=>{t.expandedKeys===void 0&&(h.value=Se)},U=()=>{g.draggingNodeKey!==null&&A(g,{draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),S=null,P=null},V=(Se,Ae)=>{const{onDragend:Pe}=t;g.dragOverNodeKey=null,U(),Pe==null||Pe({event:Se,node:Ae.eventData}),_=null},q=Se=>{V(Se,null),window.removeEventListener("dragend",q)},Y=(Se,Ae)=>{const{onDragstart:Pe}=t,{eventKey:ke,eventData:Le}=Ae;_=Ae,S={x:Se.clientX,y:Se.clientY};const De=Go(h.value,ke);g.draggingNodeKey=ke,g.dragChildrenKeys=poe(ke,v.value),s.value=$.value.getIndentWidth(),j(De),window.addEventListener("dragend",q),Pe&&Pe({event:Se,node:Le})},J=(Se,Ae)=>{const{onDragenter:Pe,onExpand:ke,allowDrop:Le,direction:De}=t,{pos:je,eventKey:ft}=Ae;if(P!==ft&&(P=ft),!_){z();return}const{dropPosition:_t,dropLevelOffset:yt,dropTargetKey:Pt,dropContainerKey:Et,dropTargetPos:fn,dropAllowed:yn,dragOverNodeKey:$n}=mP(Se,_,Ae,s.value,S,Le,F.value,v.value,T.value,De);if(g.dragChildrenKeys.indexOf(Pt)!==-1||!yn){z();return}if(a||(a={}),Object.keys(a).forEach(on=>{clearTimeout(a[on])}),_.eventKey!==Ae.eventKey&&(a[je]=window.setTimeout(()=>{if(g.draggingNodeKey===null)return;let on=h.value.slice();const Yn=v.value[Ae.eventKey];Yn&&(Yn.children||[]).length&&(on=vr(h.value,Ae.eventKey)),j(on),ke&&ke(on,{node:Ae.eventData,expanded:!0,nativeEvent:Se})},800)),_.eventKey===Pt&&yt===0){z();return}A(g,{dragOverNodeKey:$n,dropPosition:_t,dropLevelOffset:yt,dropTargetKey:Pt,dropContainerKey:Et,dropTargetPos:fn,dropAllowed:yn}),Pe&&Pe({event:Se,node:Ae.eventData,expandedKeys:h.value})},Q=(Se,Ae)=>{const{onDragover:Pe,allowDrop:ke,direction:Le}=t;if(!_)return;const{dropPosition:De,dropLevelOffset:je,dropTargetKey:ft,dropContainerKey:_t,dropAllowed:yt,dropTargetPos:Pt,dragOverNodeKey:Et}=mP(Se,_,Ae,s.value,S,ke,F.value,v.value,T.value,Le);g.dragChildrenKeys.indexOf(ft)!==-1||!yt||(_.eventKey===ft&&je===0?g.dropPosition===null&&g.dropLevelOffset===null&&g.dropTargetKey===null&&g.dropContainerKey===null&&g.dropTargetPos===null&&g.dropAllowed===!1&&g.dragOverNodeKey===null||z():De===g.dropPosition&&je===g.dropLevelOffset&&ft===g.dropTargetKey&&_t===g.dropContainerKey&&Pt===g.dropTargetPos&&yt===g.dropAllowed&&Et===g.dragOverNodeKey||A(g,{dropPosition:De,dropLevelOffset:je,dropTargetKey:ft,dropContainerKey:_t,dropTargetPos:Pt,dropAllowed:yt,dragOverNodeKey:Et}),Pe&&Pe({event:Se,node:Ae.eventData}))},G=(Se,Ae)=>{P===Ae.eventKey&&!Se.currentTarget.contains(Se.relatedTarget)&&(z(),P=null);const{onDragleave:Pe}=t;Pe&&Pe({event:Se,node:Ae.eventData})},ee=function(Se,Ae){let Pe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;var ke;const{dragChildrenKeys:Le,dropPosition:De,dropTargetKey:je,dropTargetPos:ft,dropAllowed:_t}=g;if(!_t)return;const{onDrop:yt}=t;if(g.dragOverNodeKey=null,U(),je===null)return;const Pt=A(A({},Th(je,dt(O.value))),{active:((ke=xe.value)===null||ke===void 0?void 0:ke.key)===je,data:v.value[je].node});Le.indexOf(je);const Et=HS(ft),fn={event:Se,node:Oh(Pt),dragNode:_?_.eventData:null,dragNodesKeys:[_.eventKey].concat(Le),dropToGap:De!==0,dropPosition:De+Number(Et[Et.length-1])};Pe||yt==null||yt(fn),_=null},X=(Se,Ae)=>{const{expanded:Pe,key:ke}=Ae,Le=F.value.filter(je=>je.key===ke)[0],De=Oh(A(A({},Th(ke,O.value)),{data:Le.data}));j(Pe?Go(h.value,ke):vr(h.value,ke)),be(Se,De)},K=(Se,Ae)=>{const{onClick:Pe,expandAction:ke}=t;ke==="click"&&X(Se,Ae),Pe&&Pe(Se,Ae)},te=(Se,Ae)=>{const{onDblclick:Pe,expandAction:ke}=t;(ke==="doubleclick"||ke==="dblclick")&&X(Se,Ae),Pe&&Pe(Se,Ae)},ue=(Se,Ae)=>{let Pe=l.value;const{onSelect:ke,multiple:Le}=t,{selected:De}=Ae,je=Ae[x.value.key],ft=!De;ft?Le?Pe=vr(Pe,je):Pe=[je]:Pe=Go(Pe,je);const _t=v.value,yt=Pe.map(Pt=>{const Et=_t[Pt];return Et?Et.node:null}).filter(Pt=>Pt);t.selectedKeys===void 0&&(l.value=Pe),ke&&ke(Pe,{event:"select",selected:ft,node:Ae,selectedNodes:yt,nativeEvent:Se})},ae=(Se,Ae,Pe)=>{const{checkStrictly:ke,onCheck:Le}=t,De=Ae[x.value.key];let je;const ft={event:"check",node:Ae,checked:Pe,nativeEvent:Se},_t=v.value;if(ke){const yt=Pe?vr(c.value,De):Go(c.value,De),Pt=Go(u.value,De);je={checked:yt,halfChecked:Pt},ft.checkedNodes=yt.map(Et=>_t[Et]).filter(Et=>Et).map(Et=>Et.node),t.checkedKeys===void 0&&(c.value=yt)}else{let{checkedKeys:yt,halfCheckedKeys:Pt}=fo([...c.value,De],!0,_t,N.value,B.value);if(!Pe){const Et=new Set(yt);Et.delete(De),{checkedKeys:yt,halfCheckedKeys:Pt}=fo(Array.from(Et),{halfCheckedKeys:Pt},_t,N.value,B.value)}je=yt,ft.checkedNodes=[],ft.checkedNodesPositions=[],ft.halfCheckedKeys=Pt,yt.forEach(Et=>{const fn=_t[Et];if(!fn)return;const{node:yn,pos:$n}=fn;ft.checkedNodes.push(yn),ft.checkedNodesPositions.push({node:yn,pos:$n})}),t.checkedKeys===void 0&&(c.value=yt,u.value=Pt)}Le&&Le(je,ft)},re=Se=>{const Ae=Se[x.value.key],Pe=new Promise((ke,Le)=>{const{loadData:De,onLoad:je}=t;if(!De||I.value.has(Ae)||k.value.has(Ae))return null;De(Se).then(()=>{const _t=vr(d.value,Ae),yt=Go(f.value,Ae);je&&je(_t,{event:"load",node:Se}),t.loadedKeys===void 0&&(d.value=_t),f.value=yt,ke()}).catch(_t=>{const yt=Go(f.value,Ae);if(f.value=yt,p[Ae]=(p[Ae]||0)+1,p[Ae]>=cge){const Pt=vr(d.value,Ae);t.loadedKeys===void 0&&(d.value=Pt),ke()}Le(_t)}),f.value=vr(f.value,Ae)});return Pe.catch(()=>{}),Pe},ne=(Se,Ae)=>{const{onMouseenter:Pe}=t;Pe&&Pe({event:Se,node:Ae})},le=(Se,Ae)=>{const{onMouseleave:Pe}=t;Pe&&Pe({event:Se,node:Ae})},he=(Se,Ae)=>{const{onRightClick:Pe}=t;Pe&&(Se.preventDefault(),Pe({event:Se,node:Ae}))},pe=Se=>{const{onFocus:Ae}=t;b.value=!0,Ae&&Ae(Se)},ge=Se=>{const{onBlur:Ae}=t;b.value=!1,de(null),Ae&&Ae(Se)},be=(Se,Ae)=>{let Pe=h.value;const{onExpand:ke,loadData:Le}=t,{expanded:De}=Ae,je=Ae[x.value.key];if(w.value)return;Pe.indexOf(je);const ft=!De;if(ft?Pe=vr(Pe,je):Pe=Go(Pe,je),j(Pe),ke&&ke(Pe,{node:Ae,expanded:ft,nativeEvent:Se}),ft&&Le){const _t=re(Ae);_t&&_t.then(()=>{}).catch(yt=>{const Pt=Go(h.value,je);j(Pt),Promise.reject(yt)})}},$e=()=>{w.value=!0},fe=()=>{setTimeout(()=>{w.value=!1})},de=Se=>{const{onActiveChange:Ae}=t;y.value!==Se&&(t.activeKey!==void 0&&(y.value=Se),Se!==null&&W({key:Se}),Ae&&Ae(Se))},xe=L(()=>y.value===null?null:F.value.find(Se=>{let{key:Ae}=Se;return Ae===y.value})||null),_e=Se=>{let Ae=F.value.findIndex(ke=>{let{key:Le}=ke;return Le===y.value});Ae===-1&&Se<0&&(Ae=F.value.length),Ae=(Ae+Se+F.value.length)%F.value.length;const Pe=F.value[Ae];if(Pe){const{key:ke}=Pe;de(ke)}else de(null)},Oe=L(()=>Oh(A(A({},Th(y.value,O.value)),{data:xe.value.data,active:!0}))),Re=Se=>{const{onKeydown:Ae,checkable:Pe,selectable:ke}=t;switch(Se.which){case Te.UP:{_e(-1),Se.preventDefault();break}case Te.DOWN:{_e(1),Se.preventDefault();break}}const Le=xe.value;if(Le&&Le.data){const De=Le.data.isLeaf===!1||!!(Le.data.children||[]).length,je=Oe.value;switch(Se.which){case Te.LEFT:{De&&T.value.has(y.value)?be({},je):Le.parent&&de(Le.parent.key),Se.preventDefault();break}case Te.RIGHT:{De&&!T.value.has(y.value)?be({},je):Le.children&&Le.children.length&&de(Le.children[0].key),Se.preventDefault();break}case Te.ENTER:case Te.SPACE:{Pe&&!je.disabled&&je.checkable!==!1&&!je.disableCheckbox?ae({},je,!E.value.has(y.value)):!Pe&&ke&&!je.disabled&&je.selectable!==!1&&ue({},je);break}}}Ae&&Ae(Se)};return o({onNodeExpand:be,scrollTo:W,onKeydown:Re,selectedKeys:L(()=>l.value),checkedKeys:L(()=>c.value),halfCheckedKeys:L(()=>u.value),loadedKeys:L(()=>d.value),loadingKeys:L(()=>f.value),expandedKeys:L(()=>h.value)}),Xn(()=>{window.removeEventListener("dragend",q),r.value=!0}),loe({expandedKeys:h,selectedKeys:l,loadedKeys:d,loadingKeys:f,checkedKeys:c,halfCheckedKeys:u,expandedKeysSet:T,selectedKeysSet:M,loadedKeysSet:I,loadingKeysSet:k,checkedKeysSet:E,halfCheckedKeysSet:R,flattenNodes:F}),()=>{const{draggingNodeKey:Se,dropLevelOffset:Ae,dropContainerKey:Pe,dropTargetKey:ke,dropPosition:Le,dragOverNodeKey:De}=g,{prefixCls:je,showLine:ft,focusable:_t,tabindex:yt=0,selectable:Pt,showIcon:Et,icon:fn=i.icon,switcherIcon:yn,draggable:$n,checkable:on,checkStrictly:Yn,disabled:wi,motion:Zi,loadData:So,filterTreeNode:Si,height:za,itemHeight:Ie,virtual:st,dropIndicatorRender:tt,onContextmenu:Lt,onScroll:xn,direction:rn,rootClassName:Ci,rootStyle:Ln}=t,{class:jo,style:Ii}=n,Ji=ka(A(A({},t),n),{aria:!0,data:!0});let Ut;return $n?typeof $n=="object"?Ut=$n:typeof $n=="function"?Ut={nodeDraggable:$n}:Ut={}:Ut=!1,C(soe,{value:{prefixCls:je,selectable:Pt,showIcon:Et,icon:fn,switcherIcon:yn,draggable:Ut,draggingNodeKey:Se,checkable:on,customCheckable:i.checkable,checkStrictly:Yn,disabled:wi,keyEntities:v.value,dropLevelOffset:Ae,dropContainerKey:Pe,dropTargetKey:ke,dropPosition:Le,dragOverNodeKey:De,dragging:Se!==null,indent:s.value,direction:rn,dropIndicatorRender:tt,loadData:So,filterTreeNode:Si,onNodeClick:K,onNodeDoubleClick:te,onNodeExpand:be,onNodeSelect:ue,onNodeCheck:ae,onNodeLoad:re,onNodeMouseEnter:ne,onNodeMouseLeave:le,onNodeContextMenu:he,onNodeDragStart:Y,onNodeDragEnter:J,onNodeDragOver:Q,onNodeDragLeave:G,onNodeDragEnd:V,onNodeDrop:ee,slots:i}},{default:()=>[C("div",{role:"tree",class:ce(je,jo,Ci,{[`${je}-show-line`]:ft,[`${je}-focused`]:b.value,[`${je}-active-focused`]:y.value!==null}),style:Ln},[C(sge,H({ref:$,prefixCls:je,style:Ii,disabled:wi,selectable:Pt,checkable:!!on,motion:Zi,height:za,itemHeight:Ie,virtual:st,focusable:_t,focused:b.value,tabindex:yt,activeItem:xe.value,onFocus:pe,onBlur:ge,onKeydown:Re,onActiveChange:de,onListChangeStart:$e,onListChangeEnd:fe,onContextmenu:Lt,onScroll:xn},Ji),null)])]})}}});var uge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"};function sO(t){for(var e=1;e({[`.${t}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${e.motionDurationSlow}`}}}),wge=(t,e)=>({[`.${t}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:e.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${e.lineWidthBold}px solid ${e.colorPrimary}`,borderRadius:"50%",content:'""'}}}),Sge=(t,e)=>{const{treeCls:n,treeNodeCls:i,treeNodePadding:o,treeTitleHeight:r}=e,a=(r-e.fontSizeLG)/2,s=e.paddingXS;return{[n]:A(A({},rt(e)),{background:e.colorBgContainer,borderRadius:e.borderRadius,transition:`background-color ${e.motionDurationSlow}`,[`&${n}-rtl`]:{[`${n}-switcher`]:{"&_close":{[`${n}-switcher-icon`]:{svg:{transform:"rotate(90deg)"}}}}},[`&-focused:not(:hover):not(${n}-active-focused)`]:A({},zr(e)),[`${n}-list-holder-inner`]:{alignItems:"flex-start"},[`&${n}-block-node`]:{[`${n}-list-holder-inner`]:{alignItems:"stretch",[`${n}-node-content-wrapper`]:{flex:"auto"},[`${i}.dragging`]:{position:"relative","&:after":{position:"absolute",top:0,insetInlineEnd:0,bottom:o,insetInlineStart:0,border:`1px solid ${e.colorPrimary}`,opacity:0,animationName:yge,animationDuration:e.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none"}}}},[`${i}`]:{display:"flex",alignItems:"flex-start",padding:`0 0 ${o}px 0`,outline:"none","&-rtl":{direction:"rtl"},"&-disabled":{[`${n}-node-content-wrapper`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}}},[`&-active ${n}-node-content-wrapper`]:A({},zr(e)),[`&:not(${i}-disabled).filter-node ${n}-title`]:{color:"inherit",fontWeight:500},"&-draggable":{[`${n}-draggable-icon`]:{width:r,lineHeight:`${r}px`,textAlign:"center",visibility:"visible",opacity:.2,transition:`opacity ${e.motionDurationSlow}`,[`${i}:hover &`]:{opacity:.45}},[`&${i}-disabled`]:{[`${n}-draggable-icon`]:{visibility:"hidden"}}}},[`${n}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:r}},[`${n}-draggable-icon`]:{visibility:"hidden"},[`${n}-switcher`]:A(A({},xge(t,e)),{position:"relative",flex:"none",alignSelf:"stretch",width:r,margin:0,lineHeight:`${r}px`,textAlign:"center",cursor:"pointer",userSelect:"none","&-noop":{cursor:"default"},"&_close":{[`${n}-switcher-icon`]:{svg:{transform:"rotate(-90deg)"}}},"&-loading-icon":{color:e.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:r/2,bottom:-o,marginInlineStart:-1,borderInlineEnd:`1px solid ${e.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:r/2*.8,height:r/2,borderBottom:`1px solid ${e.colorBorder}`,content:'""'}}}),[`${n}-checkbox`]:{top:"initial",marginInlineEnd:s,marginBlockStart:a},[`${n}-node-content-wrapper, ${n}-checkbox + span`]:{position:"relative",zIndex:"auto",minHeight:r,margin:0,padding:`0 ${e.paddingXS/2}px`,color:"inherit",lineHeight:`${r}px`,background:"transparent",borderRadius:e.borderRadius,cursor:"pointer",transition:`all ${e.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`,"&:hover":{backgroundColor:e.controlItemBgHover},[`&${n}-node-selected`]:{backgroundColor:e.controlItemBgActive},[`${n}-iconEle`]:{display:"inline-block",width:r,height:r,lineHeight:`${r}px`,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},[`${n}-unselectable ${n}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${n}-node-content-wrapper`]:A({lineHeight:`${r}px`,userSelect:"none"},wge(t,e)),[`${i}.drop-container`]:{"> [draggable]":{boxShadow:`0 0 0 2px ${e.colorPrimary}`}},"&-show-line":{[`${n}-indent`]:{"&-unit":{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:r/2,bottom:-o,borderInlineEnd:`1px solid ${e.colorBorder}`,content:'""'},"&-end":{"&:before":{display:"none"}}}},[`${n}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${i}-leaf-last`]:{[`${n}-switcher`]:{"&-leaf-line":{"&:before":{top:"auto !important",bottom:"auto !important",height:`${r/2}px !important`}}}}})}},Cge=t=>{const{treeCls:e,treeNodeCls:n,treeNodePadding:i}=t;return{[`${e}${e}-directory`]:{[n]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:i,insetInlineStart:0,transition:`background-color ${t.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:t.controlItemBgHover}},"> *":{zIndex:1},[`${e}-switcher`]:{transition:`color ${t.motionDurationMid}`},[`${e}-node-content-wrapper`]:{borderRadius:0,userSelect:"none","&:hover":{background:"transparent"},[`&${e}-node-selected`]:{color:t.colorTextLightSolid,background:"transparent"}},"&-selected":{"\n &:hover::before,\n &::before\n ":{background:t.colorPrimary},[`${e}-switcher`]:{color:t.colorTextLightSolid},[`${e}-node-content-wrapper`]:{color:t.colorTextLightSolid,background:"transparent"}}}}}},f5=(t,e)=>{const n=`.${t}`,i=`${n}-treenode`,o=e.paddingXS/2,r=e.controlHeightSM,a=Ve(e,{treeCls:n,treeNodeCls:i,treeNodePadding:o,treeTitleHeight:r});return[Sge(t,a),Cge(a)]},$ge=et("Tree",(t,e)=>{let{prefixCls:n}=e;return[{[t.componentCls]:tv(`${n}-checkbox`,t)},f5(n,t),qd(t)]}),h5=()=>{const t=j4();return A(A({},t),{showLine:Xe([Boolean,Object]),multiple:Ce(),autoExpandParent:Ce(),checkStrictly:Ce(),checkable:Ce(),disabled:Ce(),defaultExpandAll:Ce(),defaultExpandParent:Ce(),defaultExpandedKeys:xt(),expandedKeys:xt(),checkedKeys:Xe([Array,Object]),defaultCheckedKeys:xt(),selectedKeys:xt(),defaultSelectedKeys:xt(),selectable:Ce(),loadedKeys:xt(),draggable:Ce(),showIcon:Ce(),icon:ve(),switcherIcon:Z.any,prefixCls:String,replaceFields:Fe(),blockNode:Ce(),openAnimation:Z.any,onDoubleclick:t.onDblclick,"onUpdate:selectedKeys":ve(),"onUpdate:checkedKeys":ve(),"onUpdate:expandedKeys":ve()})},Yh=oe({compatConfig:{MODE:3},name:"ATree",inheritAttrs:!1,props:ct(h5(),{checkable:!1,selectable:!0,showIcon:!1,blockNode:!1}),slots:Object,setup(t,e){let{attrs:n,expose:i,emit:o,slots:r}=e;t.treeData===void 0&&r.default;const{prefixCls:a,direction:s,virtual:l}=Me("tree",t),[c,u]=$ge(a),d=se();i({treeRef:d,onNodeExpand:function(){var m;(m=d.value)===null||m===void 0||m.onNodeExpand(...arguments)},scrollTo:m=>{var v;(v=d.value)===null||v===void 0||v.scrollTo(m)},selectedKeys:L(()=>{var m;return(m=d.value)===null||m===void 0?void 0:m.selectedKeys}),checkedKeys:L(()=>{var m;return(m=d.value)===null||m===void 0?void 0:m.checkedKeys}),halfCheckedKeys:L(()=>{var m;return(m=d.value)===null||m===void 0?void 0:m.halfCheckedKeys}),loadedKeys:L(()=>{var m;return(m=d.value)===null||m===void 0?void 0:m.loadedKeys}),loadingKeys:L(()=>{var m;return(m=d.value)===null||m===void 0?void 0:m.loadingKeys}),expandedKeys:L(()=>{var m;return(m=d.value)===null||m===void 0?void 0:m.expandedKeys})}),Ke(()=>{Nt(t.replaceFields===void 0,"Tree","`replaceFields` is deprecated, please use fieldNames instead")});const h=(m,v)=>{o("update:checkedKeys",m),o("check",m,v)},p=(m,v)=>{o("update:expandedKeys",m),o("expand",m,v)},g=(m,v)=>{o("update:selectedKeys",m),o("select",m,v)};return()=>{const{showIcon:m,showLine:v,switcherIcon:b=r.switcherIcon,icon:y=r.icon,blockNode:w,checkable:x,selectable:$,fieldNames:S=t.replaceFields,motion:_=t.openAnimation,itemHeight:P=28,onDoubleclick:O,onDblclick:T}=t,M=A(A(A({},n),ht(t,["onUpdate:checkedKeys","onUpdate:expandedKeys","onUpdate:selectedKeys","onDoubleclick"])),{showLine:!!v,dropIndicatorRender:bge,fieldNames:S,icon:y,itemHeight:P}),I=r.default?Kt(r.default()):void 0;return c(C(u5,H(H({},M),{},{virtual:l.value,motion:_,ref:d,prefixCls:a.value,class:ce({[`${a.value}-icon-hide`]:!m,[`${a.value}-block-node`]:w,[`${a.value}-unselectable`]:!$,[`${a.value}-rtl`]:s.value==="rtl"},n.class,u.value),direction:s.value,checkable:x,selectable:$,switcherIcon:k=>d5(a.value,b,k,r.leafIcon,v),onCheck:h,onExpand:p,onSelect:g,onDblclick:T||O,children:I}),A(A({},r),{checkable:()=>C("span",{class:`${a.value}-checkbox-inner`},null)})))}}});var Age={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"};function fO(t){for(var e=1;e{if(s===xr.End)return!1;if(l(c)){if(a.push(c),s===xr.None)s=xr.Start;else if(s===xr.Start)return s=xr.End,!1}else s===xr.Start&&a.push(c);return n.includes(c)}),a}function e0(t,e,n){const i=[...e],o=[];return kC(t,n,(r,a)=>{const s=i.indexOf(r);return s!==-1&&(o.push(a),i.splice(s,1)),!!i.length}),o}var Ege=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);oA(A({},h5()),{expandAction:Xe([Boolean,String])});function Ige(t){const{isLeaf:e,expanded:n}=t;return C(e?hv:n?MC:IC,null,null)}const Gh=oe({compatConfig:{MODE:3},name:"ADirectoryTree",inheritAttrs:!1,props:ct(Mge(),{showIcon:!0,expandAction:"click"}),slots:Object,setup(t,e){let{attrs:n,slots:i,emit:o,expose:r}=e;var a;const s=se(t.treeData||Xy(Kt((a=i.default)===null||a===void 0?void 0:a.call(i))));ye(()=>t.treeData,()=>{s.value=t.treeData}),ri(()=>{pt(()=>{var P;t.treeData===void 0&&i.default&&(s.value=Xy(Kt((P=i.default)===null||P===void 0?void 0:P.call(i))))})});const l=se(),c=se(),u=L(()=>Gm(t.fieldNames)),d=se();r({scrollTo:P=>{var O;(O=d.value)===null||O===void 0||O.scrollTo(P)},selectedKeys:L(()=>{var P;return(P=d.value)===null||P===void 0?void 0:P.selectedKeys}),checkedKeys:L(()=>{var P;return(P=d.value)===null||P===void 0?void 0:P.checkedKeys}),halfCheckedKeys:L(()=>{var P;return(P=d.value)===null||P===void 0?void 0:P.halfCheckedKeys}),loadedKeys:L(()=>{var P;return(P=d.value)===null||P===void 0?void 0:P.loadedKeys}),loadingKeys:L(()=>{var P;return(P=d.value)===null||P===void 0?void 0:P.loadingKeys}),expandedKeys:L(()=>{var P;return(P=d.value)===null||P===void 0?void 0:P.expandedKeys})});const h=()=>{const{keyEntities:P}=af(s.value,{fieldNames:u.value});let O;return t.defaultExpandAll?O=Object.keys(P):t.defaultExpandParent?O=Vy(t.expandedKeys||t.defaultExpandedKeys||[],P):O=t.expandedKeys||t.defaultExpandedKeys,O},p=se(t.selectedKeys||t.defaultSelectedKeys||[]),g=se(h());ye(()=>t.selectedKeys,()=>{t.selectedKeys!==void 0&&(p.value=t.selectedKeys)},{immediate:!0}),ye(()=>t.expandedKeys,()=>{t.expandedKeys!==void 0&&(g.value=t.expandedKeys)},{immediate:!0});const v=W1((P,O)=>{const{isLeaf:T}=O;T||P.shiftKey||P.metaKey||P.ctrlKey||d.value.onNodeExpand(P,O)},200,{leading:!0}),b=(P,O)=>{t.expandedKeys===void 0&&(g.value=P),o("update:expandedKeys",P),o("expand",P,O)},y=(P,O)=>{const{expandAction:T}=t;T==="click"&&v(P,O),o("click",P,O)},w=(P,O)=>{const{expandAction:T}=t;(T==="dblclick"||T==="doubleclick")&&v(P,O),o("doubleclick",P,O),o("dblclick",P,O)},x=(P,O)=>{const{multiple:T}=t,{node:M,nativeEvent:I}=O,k=M[u.value.key],E=A(A({},O),{selected:!0}),R=(I==null?void 0:I.ctrlKey)||(I==null?void 0:I.metaKey),D=I==null?void 0:I.shiftKey;let F;T&&R?(F=P,l.value=k,c.value=F,E.selectedNodes=e0(s.value,F,u.value)):T&&D?(F=Array.from(new Set([...c.value||[],...Oge({treeData:s.value,expandedKeys:g.value,startKey:k,endKey:l.value,fieldNames:u.value})])),E.selectedNodes=e0(s.value,F,u.value)):(F=[k],l.value=k,c.value=F,E.selectedNodes=e0(s.value,F,u.value)),o("update:selectedKeys",F),o("select",F,E),t.selectedKeys===void 0&&(p.value=F)},$=(P,O)=>{o("update:checkedKeys",P),o("check",P,O)},{prefixCls:S,direction:_}=Me("tree",t);return()=>{const P=ce(`${S.value}-directory`,{[`${S.value}-directory-rtl`]:_.value==="rtl"},n.class),{icon:O=i.icon,blockNode:T=!0}=t,M=Ege(t,["icon","blockNode"]);return C(Yh,H(H(H({},n),{},{icon:O||Ige,ref:d,blockNode:T},M),{},{prefixCls:S.value,class:P,expandedKeys:g.value,selectedKeys:p.value,onSelect:x,onClick:y,onDblclick:w,onExpand:b,onCheck:$}),i)}}}),Kh=jy,p5=A(Yh,{DirectoryTree:Gh,TreeNode:Kh,install:t=>(t.component(Yh.name,Yh),t.component(Kh.name,Kh),t.component(Gh.name,Gh),t)});function pO(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const i=new Set;function o(r,a){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;const l=i.has(r);if(Yw(!l,"Warning: There may be circular references"),l)return!1;if(r===a)return!0;if(n&&s>1)return!1;i.add(r);const c=s+1;if(Array.isArray(r)){if(!Array.isArray(a)||r.length!==a.length)return!1;for(let u=0;uo(r[d],a[d],c))}return!1}return o(t,e)}const{SubMenu:kge,Item:Dge}=sn;function Rge(t){return t.some(e=>{let{children:n}=e;return n&&n.length>0})}function g5(t,e){return typeof e=="string"||typeof e=="number"?e==null?void 0:e.toString().toLowerCase().includes(t.trim().toLowerCase()):!1}function m5(t){let{filters:e,prefixCls:n,filteredKeys:i,filterMultiple:o,searchValue:r,filterSearch:a}=t;return e.map((s,l)=>{const c=String(s.value);if(s.children)return C(kge,{key:c||l,title:s.text,popupClassName:`${n}-dropdown-submenu`},{default:()=>[m5({filters:s.children,prefixCls:n,filteredKeys:i,filterMultiple:o,searchValue:r,filterSearch:a})]});const u=o?ho:di,d=C(Dge,{key:s.value!==void 0?c:l},{default:()=>[C(u,{checked:i.includes(c)},null),C("span",null,[s.text])]});return r.trim()?typeof a=="function"?a(r,s)?d:void 0:g5(r,s.text)?d:void 0:d})}const Lge=oe({name:"FilterDropdown",props:["tablePrefixCls","prefixCls","dropdownPrefixCls","column","filterState","filterMultiple","filterMode","filterSearch","columnKey","triggerFilter","locale","getPopupContainer"],setup(t,e){let{slots:n}=e;const i=SC(),o=L(()=>{var W;return(W=t.filterMode)!==null&&W!==void 0?W:"menu"}),r=L(()=>{var W;return(W=t.filterSearch)!==null&&W!==void 0?W:!1}),a=L(()=>t.column.filterDropdownOpen||t.column.filterDropdownVisible),s=L(()=>t.column.onFilterDropdownOpenChange||t.column.onFilterDropdownVisibleChange),l=ie(!1),c=L(()=>{var W;return!!(t.filterState&&(!((W=t.filterState.filteredKeys)===null||W===void 0)&&W.length||t.filterState.forceFiltered))}),u=L(()=>{var W;return pv((W=t.column)===null||W===void 0?void 0:W.filters)}),d=L(()=>{const{filterDropdown:W,slots:j={},customFilterDropdown:U}=t.column;return W||j.filterDropdown&&i.value[j.filterDropdown]||U&&i.value.customFilterDropdown}),f=L(()=>{const{filterIcon:W,slots:j={}}=t.column;return W||j.filterIcon&&i.value[j.filterIcon]||i.value.customFilterIcon}),h=W=>{var j;l.value=W,(j=s.value)===null||j===void 0||j.call(s,W)},p=L(()=>typeof a.value=="boolean"?a.value:l.value),g=L(()=>{var W;return(W=t.filterState)===null||W===void 0?void 0:W.filteredKeys}),m=ie([]),v=W=>{let{selectedKeys:j}=W;m.value=j},b=(W,j)=>{let{node:U,checked:V}=j;t.filterMultiple?v({selectedKeys:W}):v({selectedKeys:V&&U.key?[U.key]:[]})};ye(g,()=>{l.value&&v({selectedKeys:g.value||[]})},{immediate:!0});const y=ie([]),w=ie(),x=W=>{w.value=setTimeout(()=>{y.value=W})},$=()=>{clearTimeout(w.value)};at(()=>{clearTimeout(w.value)});const S=ie(""),_=W=>{const{value:j}=W.target;S.value=j};ye(l,()=>{l.value||(S.value="")});const P=W=>{const{column:j,columnKey:U,filterState:V}=t,q=W&&W.length?W:null;if(q===null&&(!V||!V.filteredKeys)||pO(q,V==null?void 0:V.filteredKeys,!0))return null;t.triggerFilter({column:j,key:U,filteredKeys:q})},O=()=>{h(!1),P(m.value)},T=function(){let{confirm:W,closeDropdown:j}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{confirm:!1,closeDropdown:!1};W&&P([]),j&&h(!1),S.value="",t.column.filterResetToDefaultFilteredValue?m.value=(t.column.defaultFilteredValue||[]).map(U=>String(U)):m.value=[]},M=function(){let{closeDropdown:W}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{closeDropdown:!0};W&&h(!1),P(m.value)},I=W=>{W&&g.value!==void 0&&(m.value=g.value||[]),h(W),!W&&!d.value&&O()},{direction:k}=Me("",t),E=W=>{if(W.target.checked){const j=u.value;m.value=j}else m.value=[]},R=W=>{let{filters:j}=W;return(j||[]).map((U,V)=>{const q=String(U.value),Y={title:U.text,key:U.value!==void 0?q:V};return U.children&&(Y.children=R({filters:U.children})),Y})},D=W=>{var j;return A(A({},W),{text:W.title,value:W.key,children:((j=W.children)===null||j===void 0?void 0:j.map(U=>D(U)))||[]})},F=L(()=>R({filters:t.column.filters})),N=L(()=>ce({[`${t.dropdownPrefixCls}-menu-without-submenu`]:!Rge(t.column.filters||[])})),B=()=>{const W=m.value,{column:j,locale:U,tablePrefixCls:V,filterMultiple:q,dropdownPrefixCls:Y,getPopupContainer:J,prefixCls:Q}=t;return(j.filters||[]).length===0?C(pa,{image:pa.PRESENTED_IMAGE_SIMPLE,description:U.filterEmptyText,imageStyle:{height:24},style:{margin:0,padding:"16px 0"}},null):o.value==="tree"?C(Qe,null,[C(QT,{filterSearch:r.value,value:S.value,onChange:_,tablePrefixCls:V,locale:U},null),C("div",{class:`${V}-filter-dropdown-tree`},[q?C(ho,{class:`${V}-filter-dropdown-checkall`,onChange:E,checked:W.length===u.value.length,indeterminate:W.length>0&&W.length[U.filterCheckall]}):null,C(p5,{checkable:!0,selectable:!1,blockNode:!0,multiple:q,checkStrictly:!q,class:`${Y}-menu`,onCheck:b,checkedKeys:W,selectedKeys:W,showIcon:!1,treeData:F.value,autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:S.value.trim()?G=>typeof r.value=="function"?r.value(S.value,D(G)):g5(S.value,G.title):void 0},null)])]):C(Qe,null,[C(QT,{filterSearch:r.value,value:S.value,onChange:_,tablePrefixCls:V,locale:U},null),C(sn,{multiple:q,prefixCls:`${Y}-menu`,class:N.value,onClick:$,onSelect:v,onDeselect:v,selectedKeys:W,getPopupContainer:J,openKeys:y.value,onOpenChange:x},{default:()=>m5({filters:j.filters||[],filterSearch:r.value,prefixCls:Q,filteredKeys:m.value,filterMultiple:q,searchValue:S.value})})])},z=L(()=>{const W=m.value;return t.column.filterResetToDefaultFilteredValue?pO((t.column.defaultFilteredValue||[]).map(j=>String(j)),W,!0):W.length===0});return()=>{var W;const{tablePrefixCls:j,prefixCls:U,column:V,dropdownPrefixCls:q,locale:Y,getPopupContainer:J}=t;let Q;typeof d.value=="function"?Q=d.value({prefixCls:`${q}-custom`,setSelectedKeys:X=>v({selectedKeys:X}),selectedKeys:m.value,confirm:M,clearFilters:T,filters:V.filters,visible:p.value,column:V.__originColumn__,close:()=>{h(!1)}}):d.value?Q=d.value:Q=C(Qe,null,[B(),C("div",{class:`${U}-dropdown-btns`},[C(nn,{type:"link",size:"small",disabled:z.value,onClick:()=>T()},{default:()=>[Y.filterReset]}),C(nn,{type:"primary",size:"small",onClick:O},{default:()=>[Y.filterConfirm]})])]);const G=C(nge,{class:`${U}-dropdown`},{default:()=>[Q]});let ee;return typeof f.value=="function"?ee=f.value({filtered:c.value,column:V.__originColumn__}):f.value?ee=f.value:ee=C(PC,null,null),C("div",{class:`${U}-column`},[C("span",{class:`${j}-column-title`},[(W=n.default)===null||W===void 0?void 0:W.call(n)]),C(Io,{overlay:G,trigger:["click"],open:p.value,onOpenChange:I,getPopupContainer:J,placement:k.value==="rtl"?"bottomLeft":"bottomRight"},{default:()=>[C("span",{role:"button",tabindex:-1,class:ce(`${U}-trigger`,{active:c.value}),onClick:X=>{X.stopPropagation()}},[ee])]})])}}});function wx(t,e,n){let i=[];return(t||[]).forEach((o,r)=>{var a,s;const l=df(r,n),c=o.filterDropdown||((a=o==null?void 0:o.slots)===null||a===void 0?void 0:a.filterDropdown)||o.customFilterDropdown;if(o.filters||c||"onFilter"in o)if("filteredValue"in o){let u=o.filteredValue;c||(u=(s=u==null?void 0:u.map(String))!==null&&s!==void 0?s:u),i.push({column:o,key:Bs(o,l),filteredKeys:u,forceFiltered:o.filtered})}else i.push({column:o,key:Bs(o,l),filteredKeys:e&&o.defaultFilteredValue?o.defaultFilteredValue:void 0,forceFiltered:o.filtered});"children"in o&&(i=[...i,...wx(o.children,e,l)])}),i}function v5(t,e,n,i,o,r,a,s){return n.map((l,c)=>{var u;const d=df(c,s),{filterMultiple:f=!0,filterMode:h,filterSearch:p}=l;let g=l;const m=l.filterDropdown||((u=l==null?void 0:l.slots)===null||u===void 0?void 0:u.filterDropdown)||l.customFilterDropdown;if(g.filters||m){const v=Bs(g,d),b=i.find(y=>{let{key:w}=y;return v===w});g=A(A({},g),{title:y=>C(Lge,{tablePrefixCls:t,prefixCls:`${t}-filter`,dropdownPrefixCls:e,column:g,columnKey:v,filterState:b,filterMultiple:f,filterMode:h,filterSearch:p,triggerFilter:r,locale:o,getPopupContainer:a},{default:()=>[_C(l.title,y)]})})}return"children"in g&&(g=A(A({},g),{children:v5(t,e,g.children,i,o,r,a,d)})),g})}function pv(t){let e=[];return(t||[]).forEach(n=>{let{value:i,children:o}=n;e.push(i),o&&(e=[...e,...pv(o)])}),e}function gO(t){const e={};return t.forEach(n=>{let{key:i,filteredKeys:o,column:r}=n;var a;const s=r.filterDropdown||((a=r==null?void 0:r.slots)===null||a===void 0?void 0:a.filterDropdown)||r.customFilterDropdown,{filters:l}=r;if(s)e[i]=o||null;else if(Array.isArray(o)){const c=pv(l);e[i]=c.filter(u=>o.includes(String(u)))}else e[i]=null}),e}function mO(t,e){return e.reduce((n,i)=>{const{column:{onFilter:o,filters:r},filteredKeys:a}=i;return o&&a&&a.length?n.filter(s=>a.some(l=>{const c=pv(r),u=c.findIndex(f=>String(f)===String(l)),d=u!==-1?c[u]:l;return o(d,s)})):n},t)}function b5(t){return t.flatMap(e=>"children"in e?[e,...b5(e.children||[])]:[e])}function Fge(t){let{prefixCls:e,dropdownPrefixCls:n,mergedColumns:i,locale:o,onFilterChange:r,getPopupContainer:a}=t;const s=L(()=>b5(i.value)),[l,c]=Mt(wx(s.value,!0)),u=L(()=>{const p=wx(s.value,!1);if(p.length===0)return p;let g=!0,m=!0;if(p.forEach(v=>{let{filteredKeys:b}=v;b!==void 0?g=!1:m=!1}),g){const v=(s.value||[]).map((b,y)=>Bs(b,df(y)));return l.value.filter(b=>{let{key:y}=b;return v.includes(y)}).map(b=>{const y=s.value[v.findIndex(w=>w===b.key)];return A(A({},b),{column:A(A({},b.column),y),forceFiltered:y.filtered})})}return Nt(m,"Table","Columns should all contain `filteredValue` or not contain `filteredValue`."),p}),d=L(()=>gO(u.value)),f=p=>{const g=u.value.filter(m=>{let{key:v}=m;return v!==p.key});g.push(p),c(g),r(gO(g),g)};return[p=>v5(e.value,n.value,p,u.value,o.value,f,a.value),u,d]}function y5(t,e){return t.map(n=>{const i=A({},n);return i.title=_C(i.title,e),"children"in i&&(i.children=y5(i.children,e)),i})}function Nge(t){return[n=>y5(n,t.value)]}function Bge(t){return function(n){let{prefixCls:i,onExpand:o,record:r,expanded:a,expandable:s}=n;const l=`${i}-row-expand-icon`;return C("button",{type:"button",onClick:c=>{o(r,c),c.stopPropagation()},class:ce(l,{[`${l}-spaced`]:!s,[`${l}-expanded`]:s&&a,[`${l}-collapsed`]:s&&!a}),"aria-label":a?t.collapse:t.expand,"aria-expanded":a},null)}}function x5(t,e){const n=e.value;return t.map(i=>{var o;if(i===yr||i===da)return i;const r=A({},i),{slots:a={}}=r;return r.__originColumn__=i,Nt(!("slots"in r),"Table","`column.slots` is deprecated. Please use `v-slot:headerCell` `v-slot:bodyCell` instead."),Object.keys(a).forEach(s=>{const l=a[s];r[s]===void 0&&n[l]&&(r[s]=n[l])}),e.value.headerCell&&!(!((o=i.slots)===null||o===void 0)&&o.title)&&(r.title=gm(e.value,"headerCell",{title:i.title,column:i},()=>[i.title])),"children"in r&&Array.isArray(r.children)&&(r.children=x5(r.children,e)),r})}function zge(t){return[n=>x5(n,t)]}const Hge=t=>{const{componentCls:e}=t,n=`${t.lineWidth}px ${t.lineType} ${t.tableBorderColor}`,i=(o,r,a)=>({[`&${e}-${o}`]:{[`> ${e}-container`]:{[`> ${e}-content, > ${e}-body`]:{"> table > tbody > tr > td":{[`> ${e}-expanded-row-fixed`]:{margin:`-${r}px -${a+t.lineWidth}px`}}}}}});return{[`${e}-wrapper`]:{[`${e}${e}-bordered`]:A(A(A({[`> ${e}-title`]:{border:n,borderBottom:0},[`> ${e}-container`]:{borderInlineStart:n,[` > ${e}-content, > ${e}-header, > ${e}-body, @@ -422,7 +422,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `]:{"> td":{borderInlineEnd:0}}}}}},i("middle",t.tablePaddingVerticalMiddle,t.tablePaddingHorizontalMiddle)),i("small",t.tablePaddingVerticalSmall,t.tablePaddingHorizontalSmall)),{[`> ${e}-footer`]:{border:n,borderTop:0}}),[`${e}-cell`]:{[`${e}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${t.lineWidth}px 0 ${t.lineWidth}px ${t.tableHeaderBg}`}}}}},Wge=t=>{const{componentCls:e}=t;return{[`${e}-wrapper`]:{[`${e}-cell-ellipsis`]:A(A({},un),{wordBreak:"keep-all",[` &${e}-cell-fix-left-last, &${e}-cell-fix-right-first - `]:{overflow:"visible",[`${e}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${e}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},jge=t=>{const{componentCls:e}=t;return{[`${e}-wrapper`]:{[`${e}-tbody > tr${e}-placeholder`]:{textAlign:"center",color:t.colorTextDisabled,"&:hover > td":{background:t.colorBgContainer}}}}},Vge=t=>{const{componentCls:e,antCls:n,controlInteractiveSize:i,motionDurationSlow:o,lineWidth:r,paddingXS:a,lineType:s,tableBorderColor:l,tableExpandIconBg:c,tableExpandColumnWidth:u,borderRadius:d,fontSize:f,fontSizeSM:h,lineHeight:p,tablePaddingVertical:g,tablePaddingHorizontal:m,tableExpandedRowBg:v,paddingXXS:b}=t,y=i/2-r,w=y*2+r*3,x=`${r}px ${s} ${l}`,$=b-r;return{[`${e}-wrapper`]:{[`${e}-expand-icon-col`]:{width:u},[`${e}-row-expand-icon-cell`]:{textAlign:"center",[`${e}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${e}-row-indent`]:{height:1,float:"left"},[`${e}-row-expand-icon`]:A(A({},dm(t)),{position:"relative",float:"left",boxSizing:"border-box",width:w,height:w,padding:0,color:"inherit",lineHeight:`${w}px`,background:c,border:x,borderRadius:d,transform:`scale(${i/w})`,transition:`all ${o}`,userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${o} ease-out`,content:'""'},"&::before":{top:y,insetInlineEnd:$,insetInlineStart:$,height:r},"&::after":{top:$,bottom:$,insetInlineStart:y,width:r,transform:"rotate(90deg)"},"&-collapsed::before":{transform:"rotate(-180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"},"&-spaced":{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}}),[`${e}-row-indent + ${e}-row-expand-icon`]:{marginTop:(f*p-r*3)/2-Math.ceil((h*1.4-r*3)/2),marginInlineEnd:a},[`tr${e}-expanded-row`]:{"&, &:hover":{"> td":{background:v}},[`${n}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"auto"}}},[`${e}-expanded-row-fixed`]:{position:"relative",margin:`-${g}px -${m}px`,padding:`${g}px ${m}px`}}}},Xge=t=>{const{componentCls:e,antCls:n,iconCls:i,tableFilterDropdownWidth:o,tableFilterDropdownSearchWidth:r,paddingXXS:a,paddingXS:s,colorText:l,lineWidth:c,lineType:u,tableBorderColor:d,tableHeaderIconColor:f,fontSizeSM:h,tablePaddingHorizontal:p,borderRadius:g,motionDurationSlow:m,colorTextDescription:v,colorPrimary:b,tableHeaderFilterActiveBg:y,colorTextDisabled:w,tableFilterDropdownBg:x,tableFilterDropdownHeight:$,controlItemBgHover:S,controlItemBgActive:_,boxShadowSecondary:P}=t,O=`${n}-dropdown`,T=`${e}-filter-dropdown`,M=`${n}-tree`,I=`${c}px ${u} ${d}`;return[{[`${e}-wrapper`]:{[`${e}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${e}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:-a,marginInline:`${a}px ${-p/2}px`,padding:`0 ${a}px`,color:f,fontSize:h,borderRadius:g,cursor:"pointer",transition:`all ${m}`,"&:hover":{color:v,background:y},"&.active":{color:b}}}},{[`${n}-dropdown`]:{[T]:A(A({},rt(t)),{minWidth:o,backgroundColor:x,borderRadius:g,boxShadow:P,[`${O}-menu`]:{maxHeight:$,overflowX:"hidden",border:0,boxShadow:"none","&:empty::after":{display:"block",padding:`${s}px 0`,color:w,fontSize:h,textAlign:"center",content:'"Not Found"'}},[`${T}-tree`]:{paddingBlock:`${s}px 0`,paddingInline:s,[M]:{padding:0},[`${M}-treenode ${M}-node-content-wrapper:hover`]:{backgroundColor:S},[`${M}-treenode-checkbox-checked ${M}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:_}}},[`${T}-search`]:{padding:s,borderBottom:I,"&-input":{input:{minWidth:r},[i]:{color:w}}},[`${T}-checkall`]:{width:"100%",marginBottom:a,marginInlineStart:a},[`${T}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${s-c}px ${s}px`,overflow:"hidden",backgroundColor:"inherit",borderTop:I}})}},{[`${n}-dropdown ${T}, ${T}-submenu`]:{[`${n}-checkbox-wrapper + span`]:{paddingInlineStart:s,color:l},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},Yge=t=>{const{componentCls:e,lineWidth:n,colorSplit:i,motionDurationSlow:o,zIndexTableFixed:r,tableBg:a,zIndexTableSticky:s}=t,l=i;return{[`${e}-wrapper`]:{[` + `]:{overflow:"visible",[`${e}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${e}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},jge=t=>{const{componentCls:e}=t;return{[`${e}-wrapper`]:{[`${e}-tbody > tr${e}-placeholder`]:{textAlign:"center",color:t.colorTextDisabled,"&:hover > td":{background:t.colorBgContainer}}}}},Vge=t=>{const{componentCls:e,antCls:n,controlInteractiveSize:i,motionDurationSlow:o,lineWidth:r,paddingXS:a,lineType:s,tableBorderColor:l,tableExpandIconBg:c,tableExpandColumnWidth:u,borderRadius:d,fontSize:f,fontSizeSM:h,lineHeight:p,tablePaddingVertical:g,tablePaddingHorizontal:m,tableExpandedRowBg:v,paddingXXS:b}=t,y=i/2-r,w=y*2+r*3,x=`${r}px ${s} ${l}`,$=b-r;return{[`${e}-wrapper`]:{[`${e}-expand-icon-col`]:{width:u},[`${e}-row-expand-icon-cell`]:{textAlign:"center",[`${e}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${e}-row-indent`]:{height:1,float:"left"},[`${e}-row-expand-icon`]:A(A({},fm(t)),{position:"relative",float:"left",boxSizing:"border-box",width:w,height:w,padding:0,color:"inherit",lineHeight:`${w}px`,background:c,border:x,borderRadius:d,transform:`scale(${i/w})`,transition:`all ${o}`,userSelect:"none","&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${o} ease-out`,content:'""'},"&::before":{top:y,insetInlineEnd:$,insetInlineStart:$,height:r},"&::after":{top:$,bottom:$,insetInlineStart:y,width:r,transform:"rotate(90deg)"},"&-collapsed::before":{transform:"rotate(-180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"},"&-spaced":{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}}),[`${e}-row-indent + ${e}-row-expand-icon`]:{marginTop:(f*p-r*3)/2-Math.ceil((h*1.4-r*3)/2),marginInlineEnd:a},[`tr${e}-expanded-row`]:{"&, &:hover":{"> td":{background:v}},[`${n}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"auto"}}},[`${e}-expanded-row-fixed`]:{position:"relative",margin:`-${g}px -${m}px`,padding:`${g}px ${m}px`}}}},Xge=t=>{const{componentCls:e,antCls:n,iconCls:i,tableFilterDropdownWidth:o,tableFilterDropdownSearchWidth:r,paddingXXS:a,paddingXS:s,colorText:l,lineWidth:c,lineType:u,tableBorderColor:d,tableHeaderIconColor:f,fontSizeSM:h,tablePaddingHorizontal:p,borderRadius:g,motionDurationSlow:m,colorTextDescription:v,colorPrimary:b,tableHeaderFilterActiveBg:y,colorTextDisabled:w,tableFilterDropdownBg:x,tableFilterDropdownHeight:$,controlItemBgHover:S,controlItemBgActive:_,boxShadowSecondary:P}=t,O=`${n}-dropdown`,T=`${e}-filter-dropdown`,M=`${n}-tree`,I=`${c}px ${u} ${d}`;return[{[`${e}-wrapper`]:{[`${e}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${e}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:-a,marginInline:`${a}px ${-p/2}px`,padding:`0 ${a}px`,color:f,fontSize:h,borderRadius:g,cursor:"pointer",transition:`all ${m}`,"&:hover":{color:v,background:y},"&.active":{color:b}}}},{[`${n}-dropdown`]:{[T]:A(A({},rt(t)),{minWidth:o,backgroundColor:x,borderRadius:g,boxShadow:P,[`${O}-menu`]:{maxHeight:$,overflowX:"hidden",border:0,boxShadow:"none","&:empty::after":{display:"block",padding:`${s}px 0`,color:w,fontSize:h,textAlign:"center",content:'"Not Found"'}},[`${T}-tree`]:{paddingBlock:`${s}px 0`,paddingInline:s,[M]:{padding:0},[`${M}-treenode ${M}-node-content-wrapper:hover`]:{backgroundColor:S},[`${M}-treenode-checkbox-checked ${M}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:_}}},[`${T}-search`]:{padding:s,borderBottom:I,"&-input":{input:{minWidth:r},[i]:{color:w}}},[`${T}-checkall`]:{width:"100%",marginBottom:a,marginInlineStart:a},[`${T}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${s-c}px ${s}px`,overflow:"hidden",backgroundColor:"inherit",borderTop:I}})}},{[`${n}-dropdown ${T}, ${T}-submenu`]:{[`${n}-checkbox-wrapper + span`]:{paddingInlineStart:s,color:l},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},Yge=t=>{const{componentCls:e,lineWidth:n,colorSplit:i,motionDurationSlow:o,zIndexTableFixed:r,tableBg:a,zIndexTableSticky:s}=t,l=i;return{[`${e}-wrapper`]:{[` ${e}-cell-fix-left, ${e}-cell-fix-right `]:{position:"sticky !important",zIndex:r,background:a},[` @@ -462,7 +462,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `]:{[e]:{marginBlock:`-${i}px`,marginInline:`${t.tableExpandColumnWidth-o}px -${o}px`,[`${e}-tbody > tr:last-child > td`]:{borderBottom:0,"&:first-child, &:last-child":{borderRadius:0}}}}},[` &${e}-row:hover > td, > td${e}-cell-row-hover - `]:{background:g},[`&${e}-row-selected`]:{"> td":{background:m},"&:hover > td":{background:v}}}},[`${e}-footer`]:{padding:`${i}px ${o}px`,color:b,background:y}})}},nme=et("Table",t=>{const{controlItemBgActive:e,controlItemBgActiveHover:n,colorTextPlaceholder:i,colorTextHeading:o,colorSplit:r,colorBorderSecondary:a,fontSize:s,padding:l,paddingXS:c,paddingSM:u,controlHeight:d,colorFillAlter:f,colorIcon:h,colorIconHover:p,opacityLoading:g,colorBgContainer:m,borderRadiusLG:v,colorFillContent:b,colorFillSecondary:y,controlInteractiveSize:w}=t,x=new Ot(h),$=new Ot(p),S=e,_=2,P=new Ot(y).onBackground(m).toHexString(),O=new Ot(b).onBackground(m).toHexString(),T=new Ot(f).onBackground(m).toHexString(),M=Ve(t,{tableFontSize:s,tableBg:m,tableRadius:v,tablePaddingVertical:l,tablePaddingHorizontal:l,tablePaddingVerticalMiddle:u,tablePaddingHorizontalMiddle:c,tablePaddingVerticalSmall:c,tablePaddingHorizontalSmall:c,tableBorderColor:a,tableHeaderTextColor:o,tableHeaderBg:T,tableFooterTextColor:o,tableFooterBg:T,tableHeaderCellSplitColor:a,tableHeaderSortBg:P,tableHeaderSortHoverBg:O,tableHeaderIconColor:x.clone().setAlpha(x.getAlpha()*g).toRgbString(),tableHeaderIconColorHover:$.clone().setAlpha($.getAlpha()*g).toRgbString(),tableBodySortBg:T,tableFixedHeaderSortActiveBg:P,tableHeaderFilterActiveBg:b,tableFilterDropdownBg:m,tableRowHoverBg:T,tableSelectedRowBg:S,tableSelectedRowHoverBg:n,zIndexTableFixed:_,zIndexTableSticky:_+1,tableFontSizeMiddle:s,tableFontSizeSmall:s,tableSelectionColumnWidth:d,tableExpandIconBg:m,tableExpandColumnWidth:w+2*t.padding,tableExpandedRowBg:f,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:i,tableScrollThumbBgHover:o,tableScrollBg:r});return[tme(M),Gge(M),vO(M),Qge(M),Xge(M),Hge(M),Kge(M),Vge(M),vO(M),jge(M),qge(M),Yge(M),eme(M),Wge(M),Zge(M),Jge(M),Uge(M)]}),ime=[],w5=()=>({prefixCls:Ne(),columns:xt(),rowKey:Xe([String,Function]),tableLayout:Ne(),rowClassName:Xe([String,Function]),title:ve(),footer:ve(),id:Ne(),showHeader:Ce(),components:Fe(),customRow:ve(),customHeaderRow:ve(),direction:Ne(),expandFixed:Xe([Boolean,String]),expandColumnWidth:Number,expandedRowKeys:xt(),defaultExpandedRowKeys:xt(),expandedRowRender:ve(),expandRowByClick:Ce(),expandIcon:ve(),onExpand:ve(),onExpandedRowsChange:ve(),"onUpdate:expandedRowKeys":ve(),defaultExpandAllRows:Ce(),indentSize:Number,expandIconColumnIndex:Number,showExpandColumn:Ce(),expandedRowClassName:ve(),childrenColumnName:Ne(),rowExpandable:ve(),sticky:Xe([Boolean,Object]),dropdownPrefixCls:String,dataSource:xt(),pagination:Xe([Boolean,Object]),loading:Xe([Boolean,Object]),size:Ne(),bordered:Ce(),locale:Fe(),onChange:ve(),onResizeColumn:ve(),rowSelection:Fe(),getPopupContainer:ve(),scroll:Fe(),sortDirections:xt(),showSorterTooltip:Xe([Boolean,Object],!0),transformCellText:ve()}),ome=oe({name:"InternalTable",inheritAttrs:!1,props:ct(A(A({},w5()),{contextSlots:Fe()}),{rowKey:"key"}),setup(t,e){let{attrs:n,slots:i,expose:o,emit:r}=e;Nt(!(typeof t.rowKey=="function"&&t.rowKey.length>1),"Table","`index` parameter of `rowKey` function is deprecated. There is no guarantee that it will work as expected."),Zhe(L(()=>t.contextSlots)),Jhe({onResizeColumn:(ae,re)=>{r("resizeColumn",ae,re)}});const a=Mc(),s=L(()=>{const ae=new Set(Object.keys(a.value).filter(re=>a.value[re]));return t.columns.filter(re=>!re.responsive||re.responsive.some(ne=>ae.has(ne)))}),{size:l,renderEmpty:c,direction:u,prefixCls:d,configProvider:f}=Me("table",t),[h,p]=nme(d),g=L(()=>{var ae;return t.transformCellText||((ae=f.transformCellText)===null||ae===void 0?void 0:ae.value)}),[m]=xo("Table",bi.Table,Ue(t,"locale")),v=L(()=>t.dataSource||ime),b=L(()=>f.getPrefixCls("dropdown",t.dropdownPrefixCls)),y=L(()=>t.childrenColumnName||"children"),w=L(()=>v.value.some(ae=>ae==null?void 0:ae[y.value])?"nest":t.expandedRowRender?"row":null),x=$t({body:null}),$=ae=>{A(x,ae)},S=L(()=>typeof t.rowKey=="function"?t.rowKey:ae=>ae==null?void 0:ae[t.rowKey]),[_]=jpe(v,y,S),P={},O=function(ae,re){let ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{pagination:le,scroll:he,onChange:pe}=t,ge=A(A({},P),ae);ne&&(P.resetPagination(),ge.pagination.current&&(ge.pagination.current=1),le&&le.onChange&&le.onChange(1,ge.pagination.pageSize)),he&&he.scrollToFirstRowOnChange!==!1&&x.body&&Qw(0,{getContainer:()=>x.body}),pe==null||pe(ge.pagination,ge.filters,ge.sorter,{currentDataSource:mO(yx(v.value,ge.sorterStates,y.value),ge.filterStates),action:re})},T=(ae,re)=>{O({sorter:ae,sorterStates:re},"sort",!1)},[M,I,k,E]=Jpe({prefixCls:d,mergedColumns:s,onSorterChange:T,sortDirections:L(()=>t.sortDirections||["ascend","descend"]),tableLocale:m,showSorterTooltip:Ue(t,"showSorterTooltip")}),R=L(()=>yx(v.value,I.value,y.value)),D=(ae,re)=>{O({filters:ae,filterStates:re},"filter",!0)},[F,N,B]=Fge({prefixCls:d,locale:m,dropdownPrefixCls:b,mergedColumns:s,onFilterChange:D,getPopupContainer:Ue(t,"getPopupContainer")}),z=L(()=>mO(R.value,N.value)),[W]=zge(Ue(t,"contextSlots")),j=L(()=>{const ae={},re=B.value;return Object.keys(re).forEach(ne=>{re[ne]!==null&&(ae[ne]=re[ne])}),A(A({},k.value),{filters:ae})}),[U]=Nge(j),V=(ae,re)=>{O({pagination:A(A({},P.pagination),{current:ae,pageSize:re})},"paginate")},[q,Y]=Wpe(L(()=>z.value.length),Ue(t,"pagination"),V);Ke(()=>{P.sorter=E.value,P.sorterStates=I.value,P.filters=B.value,P.filterStates=N.value,P.pagination=t.pagination===!1?{}:Hpe(q.value,t.pagination),P.resetPagination=Y});const J=L(()=>{if(t.pagination===!1||!q.value.pageSize)return z.value;const{current:ae=1,total:re,pageSize:ne=px}=q.value;return Nt(ae>0,"Table","`current` should be positive number."),z.value.lengthne?z.value.slice((ae-1)*ne,ae*ne):z.value:z.value.slice((ae-1)*ne,ae*ne)});Ke(()=>{pt(()=>{const{total:ae,pageSize:re=px}=q.value;z.value.lengthre&&Nt(!1,"Table","`dataSource` length is less than `pagination.total` but large than `pagination.pageSize`. Please make sure your config correct data with async mode.")})},{flush:"post"});const Q=L(()=>t.showExpandColumn===!1?-1:w.value==="nest"&&t.expandIconColumnIndex===void 0?t.rowSelection?1:0:t.expandIconColumnIndex>0&&t.rowSelection?t.expandIconColumnIndex-1:t.expandIconColumnIndex),G=se();ye(()=>t.rowSelection,()=>{G.value=t.rowSelection?A({},t.rowSelection):t.rowSelection},{deep:!0,immediate:!0});const[ee,X]=Xpe(G,{prefixCls:d,data:z,pageData:J,getRowKey:S,getRecordByKey:_,expandType:w,childrenColumnName:y,locale:m,getPopupContainer:L(()=>t.getPopupContainer)}),K=(ae,re,ne)=>{let le;const{rowClassName:he}=t;return typeof he=="function"?le=ce(he(ae,re,ne)):le=ce(he),ce({[`${d.value}-row-selected`]:X.value.has(S.value(ae,re))},le)};o({selectedKeySet:X});const te=L(()=>typeof t.indentSize=="number"?t.indentSize:15),ue=ae=>U(ee(F(M(W(ae)))));return()=>{var ae;const{expandIcon:re=i.expandIcon||Bge(m.value),pagination:ne,loading:le,bordered:he}=t;let pe,ge;if(ne!==!1&&(!((ae=q.value)===null||ae===void 0)&&ae.total)){let de;q.value.size?de=q.value.size:de=l.value==="small"||l.value==="middle"?"small":void 0;const xe=Re=>C(sv,H(H({},q.value),{},{class:[`${d.value}-pagination ${d.value}-pagination-${Re}`,q.value.class],size:de}),null),_e=u.value==="rtl"?"left":"right",{position:Oe}=q.value;if(Oe!==null&&Array.isArray(Oe)){const Re=Oe.find(Pe=>Pe.includes("top")),Se=Oe.find(Pe=>Pe.includes("bottom")),Ae=Oe.every(Pe=>`${Pe}`=="none");!Re&&!Se&&!Ae&&(ge=xe(_e)),Re&&(pe=xe(Re.toLowerCase().replace("top",""))),Se&&(ge=xe(Se.toLowerCase().replace("bottom","")))}else ge=xe(_e)}let be;typeof le=="boolean"?be={spinning:le}:typeof le=="object"&&(be=A({spinning:!0},le));const $e=ce(`${d.value}-wrapper`,{[`${d.value}-wrapper-rtl`]:u.value==="rtl"},n.class,p.value),fe=ht(t,["columns"]);return h(C("div",{class:$e,style:n.style},[C(rr,H({spinning:!1},be),{default:()=>[pe,C(Bpe,H(H(H({},n),fe),{},{expandedRowKeys:t.expandedRowKeys,defaultExpandedRowKeys:t.defaultExpandedRowKeys,expandIconColumnIndex:Q.value,indentSize:te.value,expandIcon:re,columns:s.value,direction:u.value,prefixCls:d.value,class:ce({[`${d.value}-middle`]:l.value==="middle",[`${d.value}-small`]:l.value==="small",[`${d.value}-bordered`]:he,[`${d.value}-empty`]:v.value.length===0}),data:J.value,rowKey:S.value,rowClassName:K,internalHooks:hx,internalRefs:x,onUpdateInternalRefs:$,transformColumns:ue,transformCellText:g.value}),A(A({},i),{emptyText:()=>{var de,xe;return((de=i.emptyText)===null||de===void 0?void 0:de.call(i))||((xe=t.locale)===null||xe===void 0?void 0:xe.emptyText)||c("Table")}})),ge]})]))}}}),t0=oe({name:"ATable",inheritAttrs:!1,props:ct(w5(),{rowKey:"key"}),slots:Object,setup(t,e){let{attrs:n,slots:i,expose:o}=e;const r=se();return o({table:r}),()=>{var a;const s=t.columns||s5((a=i.default)===null||a===void 0?void 0:a.call(i));return C(ome,H(H(H({ref:r},n),t),{},{columns:s||[],expandedRowRender:i.expandedRowRender||t.expandedRowRender,contextSlots:A({},i)}),i)}}}),Kh=oe({name:"ATableColumn",slots:Object,render(){return null}}),Uh=oe({name:"ATableColumnGroup",slots:Object,__ANT_TABLE_COLUMN_GROUP:!0,render(){return null}}),xg=Ppe,wg=Epe,qh=A(Mpe,{Cell:wg,Row:xg,name:"ATableSummary"}),rme=A(t0,{SELECTION_ALL:gx,SELECTION_INVERT:mx,SELECTION_NONE:vx,SELECTION_COLUMN:yr,EXPAND_COLUMN:da,Column:Kh,ColumnGroup:Uh,Summary:qh,install:t=>(t.component(qh.name,qh),t.component(wg.name,wg),t.component(xg.name,xg),t.component(t0.name,t0),t.component(Kh.name,Kh),t.component(Uh.name,Uh),t)}),ame={prefixCls:String,placeholder:String,value:String,handleClear:Function,disabled:{type:Boolean,default:void 0},onChange:Function},sme=oe({compatConfig:{MODE:3},name:"Search",inheritAttrs:!1,props:ct(ame,{placeholder:""}),emits:["change"],setup(t,e){let{emit:n}=e;const i=o=>{var r;n("change",o),o.target.value===""&&((r=t.handleClear)===null||r===void 0||r.call(t))};return()=>{const{placeholder:o,value:r,prefixCls:a,disabled:s}=t;return C(wn,{placeholder:o,class:a,value:r,onChange:i,disabled:s,allowClear:!0},{prefix:()=>C(Pc,null,null)})}}});var lme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};function bO(t){for(var e=1;e{const{renderedText:i,renderedEl:o,item:r,checked:a,disabled:s,prefixCls:l,showRemove:c}=t,u=ce({[`${l}-content-item`]:!0,[`${l}-content-item-disabled`]:s||r.disabled});let d;return(typeof i=="string"||typeof i=="number")&&(d=String(i)),C(Us,{componentName:"Transfer",defaultLocale:bi.Transfer},{default:f=>{const h=C("span",{class:`${l}-content-item-text`},[o]);return c?C("li",{class:u,title:d},[h,C(vg,{disabled:s||r.disabled,class:`${l}-content-item-remove`,"aria-label":f.remove,onClick:()=>{n("remove",r)}},{default:()=>[C(pv,null,null)]})]):C("li",{class:u,title:d,onClick:s||r.disabled?ume:()=>{n("click",r)}},[C(ho,{class:`${l}-checkbox`,checked:a,disabled:s||r.disabled},null),h])}})}}}),hme={prefixCls:String,filteredRenderItems:Z.array.def([]),selectedKeys:Z.array,disabled:Ce(),showRemove:Ce(),pagination:Z.any,onItemSelect:Function,onScroll:Function,onItemRemove:Function};function pme(t){if(!t)return null;const e={pageSize:10,simple:!0,showSizeChanger:!1,showLessItems:!1};return typeof t=="object"?A(A({},e),t):e}const gme=oe({compatConfig:{MODE:3},name:"ListBody",inheritAttrs:!1,props:hme,emits:["itemSelect","itemRemove","scroll"],setup(t,e){let{emit:n,expose:i}=e;const o=se(1),r=d=>{const{selectedKeys:f}=t,h=f.indexOf(d.key)>=0;n("itemSelect",d.key,!h)},a=d=>{n("itemRemove",[d.key])},s=d=>{n("scroll",d)},l=L(()=>pme(t.pagination));ye([l,()=>t.filteredRenderItems],()=>{if(l.value){const d=Math.ceil(t.filteredRenderItems.length/l.value.pageSize);o.value=Math.min(o.value,d)}},{immediate:!0});const c=L(()=>{const{filteredRenderItems:d}=t;let f=d;return l.value&&(f=d.slice((o.value-1)*l.value.pageSize,o.value*l.value.pageSize)),f}),u=d=>{o.value=d};return i({items:c}),()=>{const{prefixCls:d,filteredRenderItems:f,selectedKeys:h,disabled:p,showRemove:g}=t;let m=null;l.value&&(m=C(sv,{simple:l.value.simple,showSizeChanger:l.value.showSizeChanger,showLessItems:l.value.showLessItems,size:"small",disabled:p,class:`${d}-pagination`,total:f.length,pageSize:l.value.pageSize,current:o.value,onChange:u},null));const v=c.value.map(b=>{let{renderedEl:y,renderedText:w,item:x}=b;const{disabled:$}=x,S=h.indexOf(x.key)>=0;return C(fme,{disabled:p||$,key:x.key,item:x,renderedText:w,renderedEl:y,checked:S,prefixCls:d,onClick:r,onRemove:a,showRemove:g},null)});return C(Qe,null,[C("ul",{class:ce(`${d}-content`,{[`${d}-content-show-remove`]:g}),onScroll:s},[v]),m])}}}),Sx=t=>{const e=new Map;return t.forEach((n,i)=>{e.set(n,i)}),e},mme=t=>{const e=new Map;return t.forEach((n,i)=>{let{disabled:o,key:r}=n;o&&e.set(r,i)}),e},vme=()=>null;function bme(t){return!!(t&&!cn(t)&&Object.prototype.toString.call(t)==="[object Object]")}function Qf(t){return t.filter(e=>!e.disabled).map(e=>e.key)}const yme={prefixCls:String,dataSource:xt([]),filter:String,filterOption:Function,checkedKeys:Z.arrayOf(Z.string),handleFilter:Function,handleClear:Function,renderItem:Function,showSearch:Ce(!1),searchPlaceholder:String,notFoundContent:Z.any,itemUnit:String,itemsUnit:String,renderList:Z.any,disabled:Ce(),direction:Ne(),showSelectAll:Ce(),remove:String,selectAll:String,selectCurrent:String,selectInvert:String,removeAll:String,removeCurrent:String,selectAllLabel:Z.any,showRemove:Ce(),pagination:Z.any,onItemSelect:Function,onItemSelectAll:Function,onItemRemove:Function,onScroll:Function},yO=oe({compatConfig:{MODE:3},name:"TransferList",inheritAttrs:!1,props:yme,slots:Object,setup(t,e){let{attrs:n,slots:i}=e;const o=se(""),r=se(),a=se(),s=(x,$)=>{let S=x?x($):null;const _=!!S&&Kt(S).length>0;return _||(S=C(gme,H(H({},$),{},{ref:a}),null)),{customize:_,bodyContent:S}},l=x=>{const{renderItem:$=vme}=t,S=$(x),_=bme(S);return{renderedText:_?S.value:S,renderedEl:_?S.label:S,item:x}},c=se([]),u=se([]);Ke(()=>{const x=[],$=[];t.dataSource.forEach(S=>{const _=l(S),{renderedText:P}=_;if(o.value&&o.value.trim()&&!v(P,S))return null;x.push(S),$.push(_)}),c.value=x,u.value=$});const d=L(()=>{const{checkedKeys:x}=t;if(x.length===0)return"none";const $=Sx(x);return c.value.every(S=>$.has(S.key)||!!S.disabled)?"all":"part"}),f=L(()=>Qf(c.value)),h=(x,$)=>Array.from(new Set([...x,...t.checkedKeys])).filter(S=>$.indexOf(S)===-1),p=x=>{let{disabled:$,prefixCls:S}=x;var _;const P=d.value==="all";return C(ho,{disabled:((_=t.dataSource)===null||_===void 0?void 0:_.length)===0||$,checked:P,indeterminate:d.value==="part",class:`${S}-checkbox`,onChange:()=>{const T=f.value;t.onItemSelectAll(h(P?[]:T,P?t.checkedKeys:[]))}},null)},g=x=>{var $;const{target:{value:S}}=x;o.value=S,($=t.handleFilter)===null||$===void 0||$.call(t,x)},m=x=>{var $;o.value="",($=t.handleClear)===null||$===void 0||$.call(t,x)},v=(x,$)=>{const{filterOption:S}=t;return S?S(o.value,$):x.includes(o.value)},b=(x,$)=>{const{itemsUnit:S,itemUnit:_,selectAllLabel:P}=t;if(P)return typeof P=="function"?P({selectedCount:x,totalCount:$}):P;const O=$>1?S:_;return C(Qe,null,[(x>0?`${x}/`:"")+$,Qn(" "),O])},y=L(()=>Array.isArray(t.notFoundContent)?t.notFoundContent[t.direction==="left"?0:1]:t.notFoundContent),w=(x,$,S,_,P,O)=>{const T=P?C("div",{class:`${x}-body-search-wrapper`},[C(sme,{prefixCls:`${x}-search`,onChange:g,handleClear:m,placeholder:$,value:o.value,disabled:O},null)]):null;let M;const{onEvents:I}=Hw(n),{bodyContent:k,customize:E}=s(_,A(A(A({},t),{filteredItems:c.value,filteredRenderItems:u.value,selectedKeys:S}),I));return E?M=C("div",{class:`${x}-body-customize-wrapper`},[k]):M=c.value.length?k:C("div",{class:`${x}-body-not-found`},[y.value]),C("div",{class:P?`${x}-body ${x}-body-with-search`:`${x}-body`,ref:r},[T,M])};return()=>{var x,$;const{prefixCls:S,checkedKeys:_,disabled:P,showSearch:O,searchPlaceholder:T,selectAll:M,selectCurrent:I,selectInvert:k,removeAll:E,removeCurrent:R,renderList:D,onItemSelectAll:F,onItemRemove:N,showSelectAll:B=!0,showRemove:z,pagination:W}=t,j=(x=i.footer)===null||x===void 0?void 0:x.call(i,A({},t)),U=ce(S,{[`${S}-with-pagination`]:!!W,[`${S}-with-footer`]:!!j}),V=w(S,T,_,D,O,P),q=j?C("div",{class:`${S}-footer`},[j]):null,Y=!z&&!W&&p({disabled:P,prefixCls:S});let J=null;z?J=C(sn,null,{default:()=>[W&&C(sn.Item,{key:"removeCurrent",onClick:()=>{const G=Qf((a.value.items||[]).map(ee=>ee.item));N==null||N(G)}},{default:()=>[R]}),C(sn.Item,{key:"removeAll",onClick:()=>{N==null||N(f.value)}},{default:()=>[E]})]}):J=C(sn,null,{default:()=>[C(sn.Item,{key:"selectAll",onClick:()=>{const G=f.value;F(h(G,[]))}},{default:()=>[M]}),W&&C(sn.Item,{onClick:()=>{const G=Qf((a.value.items||[]).map(ee=>ee.item));F(h(G,[]))}},{default:()=>[I]}),C(sn.Item,{key:"selectInvert",onClick:()=>{let G;W?G=Qf((a.value.items||[]).map(te=>te.item)):G=f.value;const ee=new Set(_),X=[],K=[];G.forEach(te=>{ee.has(te)?K.push(te):X.push(te)}),F(h(X,K))}},{default:()=>[k]})]});const Q=C(Io,{class:`${S}-header-dropdown`,overlay:J,disabled:P},{default:()=>[C(nl,null,null)]});return C("div",{class:U,style:n.style},[C("div",{class:`${S}-header`},[B?C(Qe,null,[Y,Q]):null,C("span",{class:`${S}-header-selected`},[C("span",null,[b(_.length,c.value.length)]),C("span",{class:`${S}-header-title`},[($=i.titleText)===null||$===void 0?void 0:$.call(i)])])]),V,q])}}});function xO(){}const DC=t=>{const{disabled:e,moveToLeft:n=xO,moveToRight:i=xO,leftArrowText:o="",rightArrowText:r="",leftActive:a,rightActive:s,class:l,style:c,direction:u,oneWay:d}=t;return C("div",{class:l,style:c},[C(nn,{type:"primary",size:"small",disabled:e||!s,onClick:i,icon:C(u!=="rtl"?qi:cr,null,null)},{default:()=>[r]}),!d&&C(nn,{type:"primary",size:"small",disabled:e||!a,onClick:n,icon:C(u!=="rtl"?cr:qi,null,null)},{default:()=>[o]})])};DC.displayName="Operation";DC.inheritAttrs=!1;const xme=t=>{const{antCls:e,componentCls:n,listHeight:i,controlHeightLG:o,marginXXS:r,margin:a}=t,s=`${e}-table`,l=`${e}-input`;return{[`${n}-customize-list`]:{[`${n}-list`]:{flex:"1 1 50%",width:"auto",height:"auto",minHeight:i},[`${s}-wrapper`]:{[`${s}-small`]:{border:0,borderRadius:0,[`${s}-selection-column`]:{width:o,minWidth:o}},[`${s}-pagination${s}-pagination`]:{margin:`${a}px 0 ${r}px`}},[`${l}[disabled]`]:{backgroundColor:"transparent"}}}},wO=(t,e)=>{const{componentCls:n,colorBorder:i}=t;return{[`${n}-list`]:{borderColor:e,"&-search:not([disabled])":{borderColor:i}}}},wme=t=>{const{componentCls:e}=t;return{[`${e}-status-error`]:A({},wO(t,t.colorError)),[`${e}-status-warning`]:A({},wO(t,t.colorWarning))}},Sme=t=>{const{componentCls:e,colorBorder:n,colorSplit:i,lineWidth:o,transferItemHeight:r,transferHeaderHeight:a,transferHeaderVerticalPadding:s,transferItemPaddingVertical:l,controlItemBgActive:c,controlItemBgActiveHover:u,colorTextDisabled:d,listHeight:f,listWidth:h,listWidthLG:p,fontSizeIcon:g,marginXS:m,paddingSM:v,lineType:b,iconCls:y,motionDurationSlow:w}=t;return{display:"flex",flexDirection:"column",width:h,height:f,border:`${o}px ${b} ${n}`,borderRadius:t.borderRadiusLG,"&-with-pagination":{width:p,height:"auto"},"&-search":{[`${y}-search`]:{color:d}},"&-header":{display:"flex",flex:"none",alignItems:"center",height:a,padding:`${s-o}px ${v}px ${s}px`,color:t.colorText,background:t.colorBgContainer,borderBottom:`${o}px ${b} ${i}`,borderRadius:`${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`,"> *:not(:last-child)":{marginInlineEnd:4},"> *":{flex:"none"},"&-title":A(A({},un),{flex:"auto",textAlign:"end"}),"&-dropdown":A(A({},qs()),{fontSize:g,transform:"translateY(10%)",cursor:"pointer","&[disabled]":{cursor:"not-allowed"}})},"&-body":{display:"flex",flex:"auto",flexDirection:"column",overflow:"hidden",fontSize:t.fontSize,"&-search-wrapper":{position:"relative",flex:"none",padding:v}},"&-content":{flex:"auto",margin:0,padding:0,overflow:"auto",listStyle:"none","&-item":{display:"flex",alignItems:"center",minHeight:r,padding:`${l}px ${v}px`,transition:`all ${w}`,"> *:not(:last-child)":{marginInlineEnd:m},"> *":{flex:"none"},"&-text":A(A({},un),{flex:"auto"}),"&-remove":{position:"relative",color:n,cursor:"pointer",transition:`all ${w}`,"&:hover":{color:t.colorLinkHover},"&::after":{position:"absolute",insert:`-${l}px -50%`,content:'""'}},[`&:not(${e}-list-content-item-disabled)`]:{"&:hover":{backgroundColor:t.controlItemBgHover,cursor:"pointer"},[`&${e}-list-content-item-checked:hover`]:{backgroundColor:u}},"&-checked":{backgroundColor:c},"&-disabled":{color:d,cursor:"not-allowed"}},[`&-show-remove ${e}-list-content-item:not(${e}-list-content-item-disabled):hover`]:{background:"transparent",cursor:"default"}},"&-pagination":{padding:`${t.paddingXS}px 0`,textAlign:"end",borderTop:`${o}px ${b} ${i}`},"&-body-not-found":{flex:"none",width:"100%",margin:"auto 0",color:d,textAlign:"center"},"&-footer":{borderTop:`${o}px ${b} ${i}`},"&-checkbox":{lineHeight:1}}},Cme=t=>{const{antCls:e,iconCls:n,componentCls:i,transferHeaderHeight:o,marginXS:r,marginXXS:a,fontSizeIcon:s,fontSize:l,lineHeight:c}=t;return{[i]:A(A({},rt(t)),{position:"relative",display:"flex",alignItems:"stretch",[`${i}-disabled`]:{[`${i}-list`]:{background:t.colorBgContainerDisabled}},[`${i}-list`]:Sme(t),[`${i}-operation`]:{display:"flex",flex:"none",flexDirection:"column",alignSelf:"center",margin:`0 ${r}px`,verticalAlign:"middle",[`${e}-btn`]:{display:"block","&:first-child":{marginBottom:a},[n]:{fontSize:s}}},[`${e}-empty-image`]:{maxHeight:o/2-Math.round(l*c)}})}},$me=t=>{const{componentCls:e}=t;return{[`${e}-rtl`]:{direction:"rtl"}}},Ame=et("Transfer",t=>{const{fontSize:e,lineHeight:n,lineWidth:i,controlHeightLG:o,controlHeight:r}=t,a=Math.round(e*n),s=o,l=r,c=Ve(t,{transferItemHeight:l,transferHeaderHeight:s,transferHeaderVerticalPadding:Math.ceil((s-i-a)/2),transferItemPaddingVertical:(l-a)/2});return[Cme(c),xme(c),wme(c),$me(c)]},{listWidth:180,listHeight:200,listWidthLG:250}),_me=()=>({id:String,prefixCls:String,dataSource:xt([]),disabled:Ce(),targetKeys:xt(),selectedKeys:xt(),render:ve(),listStyle:Xe([Function,Object],()=>({})),operationStyle:Fe(void 0),titles:xt(),operations:xt(),showSearch:Ce(!1),filterOption:ve(),searchPlaceholder:String,notFoundContent:Z.any,locale:Fe(),rowKey:ve(),showSelectAll:Ce(),selectAllLabels:xt(),children:ve(),oneWay:Ce(),pagination:Xe([Object,Boolean]),status:Ne(),onChange:ve(),onSelectChange:ve(),onSearch:ve(),onScroll:ve(),"onUpdate:targetKeys":ve(),"onUpdate:selectedKeys":ve()}),Pme=oe({compatConfig:{MODE:3},name:"ATransfer",inheritAttrs:!1,props:_me(),slots:Object,setup(t,e){let{emit:n,attrs:i,slots:o,expose:r}=e;const{configProvider:a,prefixCls:s,direction:l}=Me("transfer",t),[c,u]=Ame(s),d=se([]),f=se([]),h=vn(),p=Mn.useInject(),g=L(()=>zo(p.status,t.status));ye(()=>t.selectedKeys,()=>{var V,q;d.value=((V=t.selectedKeys)===null||V===void 0?void 0:V.filter(Y=>t.targetKeys.indexOf(Y)===-1))||[],f.value=((q=t.selectedKeys)===null||q===void 0?void 0:q.filter(Y=>t.targetKeys.indexOf(Y)>-1))||[]},{immediate:!0});const m=(V,q)=>{const Y={notFoundContent:q("Transfer")},J=gn(o,t,"notFoundContent");return J&&(Y.notFoundContent=J),t.searchPlaceholder!==void 0&&(Y.searchPlaceholder=t.searchPlaceholder),A(A(A({},V),Y),t.locale)},v=V=>{const{targetKeys:q=[],dataSource:Y=[]}=t,J=V==="right"?d.value:f.value,Q=mme(Y),G=J.filter(te=>!Q.has(te)),ee=Sx(G),X=V==="right"?G.concat(q):q.filter(te=>!ee.has(te)),K=V==="right"?"left":"right";V==="right"?d.value=[]:f.value=[],n("update:targetKeys",X),S(K,[]),n("change",X,V,G),h.onFieldChange()},b=()=>{v("left")},y=()=>{v("right")},w=(V,q)=>{S(V,q)},x=V=>w("left",V),$=V=>w("right",V),S=(V,q)=>{V==="left"?(t.selectedKeys||(d.value=q),n("update:selectedKeys",[...q,...f.value]),n("selectChange",q,dt(f.value))):(t.selectedKeys||(f.value=q),n("update:selectedKeys",[...q,...d.value]),n("selectChange",dt(d.value),q))},_=(V,q)=>{const Y=q.target.value;n("search",V,Y)},P=V=>{_("left",V)},O=V=>{_("right",V)},T=V=>{n("search",V,"")},M=()=>{T("left")},I=()=>{T("right")},k=(V,q,Y)=>{const J=V==="left"?[...d.value]:[...f.value],Q=J.indexOf(q);Q>-1&&J.splice(Q,1),Y&&J.push(q),S(V,J)},E=(V,q)=>k("left",V,q),R=(V,q)=>k("right",V,q),D=V=>{const{targetKeys:q=[]}=t,Y=q.filter(J=>!V.includes(J));n("update:targetKeys",Y),n("change",Y,"left",[...V])},F=(V,q)=>{n("scroll",V,q)},N=V=>{F("left",V)},B=V=>{F("right",V)},z=(V,q)=>typeof V=="function"?V({direction:q}):V,W=se([]),j=se([]);Ke(()=>{const{dataSource:V,rowKey:q,targetKeys:Y=[]}=t,J=[],Q=new Array(Y.length),G=Sx(Y);V.forEach(ee=>{q&&(ee.key=q(ee)),G.has(ee.key)?Q[G.get(ee.key)]=ee:J.push(ee)}),W.value=J,j.value=Q}),r({handleSelectChange:S});const U=V=>{var q,Y,J,Q,G,ee;const{disabled:X,operations:K=[],showSearch:te,listStyle:ue,operationStyle:ae,filterOption:re,showSelectAll:ne,selectAllLabels:le=[],oneWay:he,pagination:pe,id:ge=h.id.value}=t,{class:be,style:$e}=i,fe=o.children,de=!fe&&pe,xe=a.renderEmpty,_e=m(V,xe),{footer:Oe}=o,Re=t.render||o.render,Se=f.value.length>0,Ae=d.value.length>0,Pe=ce(s.value,be,{[`${s.value}-disabled`]:X,[`${s.value}-customize-list`]:!!fe,[`${s.value}-rtl`]:l.value==="rtl"},ei(s.value,g.value,p.hasFeedback),u.value),ke=t.titles,Le=(J=(q=ke&&ke[0])!==null&&q!==void 0?q:(Y=o.leftTitle)===null||Y===void 0?void 0:Y.call(o))!==null&&J!==void 0?J:(_e.titles||["",""])[0],De=(ee=(Q=ke&&ke[1])!==null&&Q!==void 0?Q:(G=o.rightTitle)===null||G===void 0?void 0:G.call(o))!==null&&ee!==void 0?ee:(_e.titles||["",""])[1];return C("div",H(H({},i),{},{class:Pe,style:$e,id:ge}),[C(yO,H({key:"leftList",prefixCls:`${s.value}-list`,dataSource:W.value,filterOption:re,style:z(ue,"left"),checkedKeys:d.value,handleFilter:P,handleClear:M,onItemSelect:E,onItemSelectAll:x,renderItem:Re,showSearch:te,renderList:fe,onScroll:N,disabled:X,direction:l.value==="rtl"?"right":"left",showSelectAll:ne,selectAllLabel:le[0]||o.leftSelectAllLabel,pagination:de},_e),{titleText:()=>Le,footer:Oe}),C(DC,{key:"operation",class:`${s.value}-operation`,rightActive:Ae,rightArrowText:K[0],moveToRight:y,leftActive:Se,leftArrowText:K[1],moveToLeft:b,style:ae,disabled:X,direction:l.value,oneWay:he},null),C(yO,H({key:"rightList",prefixCls:`${s.value}-list`,dataSource:j.value,filterOption:re,style:z(ue,"right"),checkedKeys:f.value,handleFilter:O,handleClear:I,onItemSelect:R,onItemSelectAll:$,onItemRemove:D,renderItem:Re,showSearch:te,renderList:fe,onScroll:B,disabled:X,direction:l.value==="rtl"?"left":"right",showSelectAll:ne,selectAllLabel:le[1]||o.rightSelectAllLabel,showRemove:he,pagination:de},_e),{titleText:()=>De,footer:Oe})])};return()=>c(C(Us,{componentName:"Transfer",defaultLocale:bi.Transfer,children:U},null))}}),Tme=Vt(Pme);function Ome(t){return Array.isArray(t)?t:t!==void 0?[t]:[]}function Eme(t){const{label:e,value:n,children:i}=t||{},o=n||"value";return{_title:e?[e]:["title","label"],value:o,key:o,children:i||"children"}}function Cx(t){return t.disabled||t.disableCheckbox||t.checkable===!1}function Mme(t,e){const n=[];function i(o){o.forEach(r=>{n.push(r[e.value]);const a=r[e.children];a&&i(a)})}return i(t),n}function SO(t){return t==null}const S5=Symbol("TreeSelectContextPropsKey");function Ime(t){return ot(S5,t)}function kme(){return qe(S5,{})}const Dme={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Rme=oe({compatConfig:{MODE:3},name:"OptionList",inheritAttrs:!1,setup(t,e){let{slots:n,expose:i}=e;const o=Yd(),r=Sm(),a=kme(),s=se(),l=C1(()=>a.treeData,[()=>o.open,()=>a.treeData],x=>x[0]),c=L(()=>{const{checkable:x,halfCheckedKeys:$,checkedKeys:S}=r;return x?{checked:S,halfChecked:$}:null});ye(()=>o.open,()=>{pt(()=>{var x;o.open&&!o.multiple&&r.checkedKeys.length&&((x=s.value)===null||x===void 0||x.scrollTo({key:r.checkedKeys[0]}))})},{immediate:!0,flush:"post"});const u=L(()=>String(o.searchValue).toLowerCase()),d=x=>u.value?String(x[r.treeNodeFilterProp]).toLowerCase().includes(u.value):!1,f=ie(r.treeDefaultExpandedKeys),h=ie(null);ye(()=>o.searchValue,()=>{o.searchValue&&(h.value=Mme(dt(a.treeData),dt(a.fieldNames)))},{immediate:!0});const p=L(()=>r.treeExpandedKeys?r.treeExpandedKeys.slice():o.searchValue?h.value:f.value),g=x=>{var $;f.value=x,h.value=x,($=r.onTreeExpand)===null||$===void 0||$.call(r,x)},m=x=>{x.preventDefault()},v=(x,$)=>{let{node:S}=$;var _,P;const{checkable:O,checkedKeys:T}=r;O&&Cx(S)||((_=a.onSelect)===null||_===void 0||_.call(a,S.key,{selected:!T.includes(S.key)}),o.multiple||(P=o.toggleOpen)===null||P===void 0||P.call(o,!1))},b=se(null),y=L(()=>r.keyEntities[b.value]),w=x=>{b.value=x};return i({scrollTo:function(){for(var x,$,S=arguments.length,_=new Array(S),P=0;P{var $;const{which:S}=x;switch(S){case Te.UP:case Te.DOWN:case Te.LEFT:case Te.RIGHT:($=s.value)===null||$===void 0||$.onKeydown(x);break;case Te.ENTER:{if(y.value){const{selectable:_,value:P}=y.value.node||{};_!==!1&&v(null,{node:{key:b.value},selected:!r.checkedKeys.includes(P)})}break}case Te.ESC:o.toggleOpen(!1)}},onKeyup:()=>{}}),()=>{var x;const{prefixCls:$,multiple:S,searchValue:_,open:P,notFoundContent:O=(x=n.notFoundContent)===null||x===void 0?void 0:x.call(n)}=o,{listHeight:T,listItemHeight:M,virtual:I,dropdownMatchSelectWidth:k,treeExpandAction:E}=a,{checkable:R,treeDefaultExpandAll:D,treeIcon:F,showTreeIcon:N,switcherIcon:B,treeLine:z,loadData:W,treeLoadedKeys:j,treeMotion:U,onTreeLoad:V,checkedKeys:q}=r;if(l.value.length===0)return C("div",{role:"listbox",class:`${$}-empty`,onMousedown:m},[O]);const Y={fieldNames:a.fieldNames};return j&&(Y.loadedKeys=j),p.value&&(Y.expandedKeys=p.value),C("div",{onMousedown:m},[y.value&&P&&C("span",{style:Dme,"aria-live":"assertive"},[y.value.node.value]),C(u5,H(H({ref:s,focusable:!1,prefixCls:`${$}-tree`,treeData:l.value,height:T,itemHeight:M,virtual:I!==!1&&k!==!1,multiple:S,icon:F,showIcon:N,switcherIcon:B,showLine:z,loadData:_?null:W,motion:U,activeKey:b.value,checkable:R,checkStrictly:!0,checkedKeys:c.value,selectedKeys:R?[]:q,defaultExpandAll:D},Y),{},{onActiveChange:w,onSelect:v,onCheck:v,onExpand:g,onLoad:V,filterTreeNode:d,expandAction:E}),A(A({},n),{checkable:r.customSlots.treeCheckable}))])}}}),Lme="SHOW_ALL",C5="SHOW_PARENT",RC="SHOW_CHILD";function CO(t,e,n,i){const o=new Set(t);return e===RC?t.filter(r=>{const a=n[r];return!(a&&a.children&&a.children.some(s=>{let{node:l}=s;return o.has(l[i.value])})&&a.children.every(s=>{let{node:l}=s;return Cx(l)||o.has(l[i.value])}))}):e===C5?t.filter(r=>{const a=n[r],s=a?a.parent:null;return!(s&&!Cx(s.node)&&o.has(s.key))}):t}const Dc=()=>null;Dc.inheritAttrs=!1;Dc.displayName="ATreeSelectNode";Dc.isTreeSelectNode=!0;var Fme=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o0&&arguments[0]!==void 0?arguments[0]:[];return Kt(n).map(i=>{var o,r,a;if(!Nme(i))return null;const s=i.children||{},l=i.key,c={};for(const[S,_]of Object.entries(i.props))c[wc(S)]=_;const{isLeaf:u,checkable:d,selectable:f,disabled:h,disableCheckbox:p}=c,g={isLeaf:u||u===""||void 0,checkable:d||d===""||void 0,selectable:f||f===""||void 0,disabled:h||h===""||void 0,disableCheckbox:p||p===""||void 0},m=A(A({},c),g),{title:v=(o=s.title)===null||o===void 0?void 0:o.call(s,m),switcherIcon:b=(r=s.switcherIcon)===null||r===void 0?void 0:r.call(s,m)}=c,y=Fme(c,["title","switcherIcon"]),w=(a=s.default)===null||a===void 0?void 0:a.call(s),x=A(A(A({},y),{title:v,switcherIcon:b,key:l,isLeaf:u}),g),$=e(w);return $.length&&(x.children=$),x})}return e(t)}function $x(t){if(!t)return t;const e=A({},t);return"props"in e||Object.defineProperty(e,"props",{get(){return e}}),e}function zme(t,e,n,i,o,r){let a=null,s=null;function l(){function c(u){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"0",f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return u.map((h,p)=>{const g=`${d}-${p}`,m=h[r.value],v=n.includes(m),b=c(h[r.children]||[],g,v),y=C(Dc,h,{default:()=>[b.map(w=>w.node)]});if(e===m&&(a=y),v){const w={pos:g,node:y,children:b};return f||s.push(w),w}return null}).filter(h=>h)}s||(s=[],c(i),s.sort((u,d)=>{let{node:{props:{value:f}}}=u,{node:{props:{value:h}}}=d;const p=n.indexOf(f),g=n.indexOf(h);return p-g}))}Object.defineProperty(t,"triggerNode",{get(){return l(),a}}),Object.defineProperty(t,"allCheckedNodes",{get(){return l(),o?s:s.map(c=>{let{node:u}=c;return u})}})}function Hme(t,e){let{id:n,pId:i,rootPId:o}=e;const r={},a=[];return t.map(l=>{const c=A({},l),u=c[n];return r[u]=c,c.key=c.key||u,c}).forEach(l=>{const c=l[i],u=r[c];u&&(u.children=u.children||[],u.children.push(l)),(c===o||!u&&o===null)&&a.push(l)}),a}function Wme(t,e,n){const i=ie();return ye([n,t,e],()=>{const o=n.value;t.value?i.value=n.value?Hme(dt(t.value),A({id:"id",pId:"pId",rootPId:null},o!==!0?o:{})):dt(t.value).slice():i.value=Bme(dt(e.value))},{immediate:!0,deep:!0}),i}const jme=t=>{const e=ie({valueLabels:new Map}),n=ie();return ye(t,()=>{n.value=dt(t.value)},{immediate:!0}),[L(()=>{const{valueLabels:o}=e.value,r=new Map,a=n.value.map(s=>{var l;const{value:c}=s,u=(l=s.label)!==null&&l!==void 0?l:o.get(c);return r.set(c,u),A(A({},s),{label:u})});return e.value.valueLabels=r,a})]},Vme=(t,e)=>{const n=ie(new Map),i=ie({});return Ke(()=>{const o=e.value,r=rf(t.value,{fieldNames:o,initWrapper:a=>A(A({},a),{valueEntities:new Map}),processEntity:(a,s)=>{const l=a.node[o.value];s.valueEntities.set(l,a)}});n.value=r.valueEntities,i.value=r.keyEntities}),{valueEntities:n,keyEntities:i}},Xme=(t,e,n,i,o,r)=>{const a=ie([]),s=ie([]);return Ke(()=>{let l=t.value.map(d=>{let{value:f}=d;return f}),c=e.value.map(d=>{let{value:f}=d;return f});const u=l.filter(d=>!i.value[d]);n.value&&({checkedKeys:l,halfCheckedKeys:c}=fo(l,!0,i.value,o.value,r.value)),a.value=Array.from(new Set([...u,...l])),s.value=c}),[a,s]},Yme=(t,e,n)=>{let{treeNodeFilterProp:i,filterTreeNode:o,fieldNames:r}=n;return L(()=>{const{children:a}=r.value,s=e.value,l=i==null?void 0:i.value;if(!s||o.value===!1)return t.value;let c;if(typeof o.value=="function")c=o.value;else{const d=s.toUpperCase();c=(f,h)=>{const p=h[l];return String(p).toUpperCase().includes(d)}}function u(d){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const h=[];for(let p=0,g=d.length;pt.treeCheckable&&!t.treeCheckStrictly),s=L(()=>t.treeCheckable||t.treeCheckStrictly),l=L(()=>t.treeCheckStrictly||t.labelInValue),c=L(()=>s.value||t.multiple),u=L(()=>Eme(t.fieldNames)),[d,f]=jt("",{value:L(()=>t.searchValue!==void 0?t.searchValue:t.inputValue),postState:ge=>ge||""}),h=ge=>{var be;f(ge),(be=t.onSearch)===null||be===void 0||be.call(t,ge)},p=Wme(Ue(t,"treeData"),Ue(t,"children"),Ue(t,"treeDataSimpleMode")),{keyEntities:g,valueEntities:m}=Vme(p,u),v=ge=>{const be=[],$e=[];return ge.forEach(fe=>{m.value.has(fe)?$e.push(fe):be.push(fe)}),{missingRawValues:be,existRawValues:$e}},b=Yme(p,d,{fieldNames:u,treeNodeFilterProp:Ue(t,"treeNodeFilterProp"),filterTreeNode:Ue(t,"filterTreeNode")}),y=ge=>{if(ge){if(t.treeNodeLabelProp)return ge[t.treeNodeLabelProp];const{_title:be}=u.value;for(let $e=0;$eOme(ge).map($e=>Gme($e)?{value:$e}:$e),x=ge=>w(ge).map($e=>{let{label:fe}=$e;const{value:de,halfChecked:xe}=$e;let _e;const Oe=m.value.get(de);return Oe&&(fe=fe??y(Oe.node),_e=Oe.node.disabled),{label:fe,value:de,halfChecked:xe,disabled:_e}}),[$,S]=jt(t.defaultValue,{value:Ue(t,"value")}),_=L(()=>w($.value)),P=ie([]),O=ie([]);Ke(()=>{const ge=[],be=[];_.value.forEach($e=>{$e.halfChecked?be.push($e):ge.push($e)}),P.value=ge,O.value=be});const T=L(()=>P.value.map(ge=>ge.value)),{maxLevel:M,levelEntities:I}=qm(g),[k,E]=Xme(P,O,a,g,M,I),R=L(()=>{const $e=CO(k.value,t.showCheckedStrategy,g.value,u.value).map(xe=>{var _e,Oe,Re;return(Re=(Oe=(_e=g.value[xe])===null||_e===void 0?void 0:_e.node)===null||Oe===void 0?void 0:Oe[u.value.value])!==null&&Re!==void 0?Re:xe}).map(xe=>{const _e=P.value.find(Oe=>Oe.value===xe);return{value:xe,label:_e==null?void 0:_e.label}}),fe=x($e),de=fe[0];return!c.value&&de&&SO(de.value)&&SO(de.label)?[]:fe.map(xe=>{var _e;return A(A({},xe),{label:(_e=xe.label)!==null&&_e!==void 0?_e:xe.value})})}),[D]=jme(R),F=(ge,be,$e)=>{const fe=x(ge);if(S(fe),t.autoClearSearchValue&&f(""),t.onChange){let de=ge;a.value&&(de=CO(ge,t.showCheckedStrategy,g.value,u.value).map(Le=>{const De=m.value.get(Le);return De?De.node[u.value.value]:Le}));const{triggerValue:xe,selected:_e}=be||{triggerValue:void 0,selected:void 0};let Oe=de;if(t.treeCheckStrictly){const ke=O.value.filter(Le=>!de.includes(Le.value));Oe=[...Oe,...ke]}const Re=x(Oe),Se={preValue:P.value,triggerValue:xe};let Ae=!0;(t.treeCheckStrictly||$e==="selection"&&!_e)&&(Ae=!1),zme(Se,xe,ge,p.value,Ae,u.value),s.value?Se.checked=_e:Se.selected=_e;const Pe=l.value?Re:Re.map(ke=>ke.value);t.onChange(c.value?Pe:Pe[0],l.value?null:Re.map(ke=>ke.label),Se)}},N=(ge,be)=>{let{selected:$e,source:fe}=be;var de,xe,_e;const Oe=dt(g.value),Re=dt(m.value),Se=Oe[ge],Ae=Se==null?void 0:Se.node,Pe=(de=Ae==null?void 0:Ae[u.value.value])!==null&&de!==void 0?de:ge;if(!c.value)F([Pe],{selected:!0,triggerValue:Pe},"option");else{let ke=$e?[...T.value,Pe]:k.value.filter(Le=>Le!==Pe);if(a.value){const{missingRawValues:Le,existRawValues:De}=v(ke),je=De.map(_t=>Re.get(_t).key);let ft;$e?{checkedKeys:ft}=fo(je,!0,Oe,M.value,I.value):{checkedKeys:ft}=fo(je,{halfCheckedKeys:E.value},Oe,M.value,I.value),ke=[...Le,...ft.map(_t=>Oe[_t].node[u.value.value])]}F(ke,{selected:$e,triggerValue:Pe},fe||"option")}$e||!c.value?(xe=t.onSelect)===null||xe===void 0||xe.call(t,Pe,$x(Ae)):(_e=t.onDeselect)===null||_e===void 0||_e.call(t,Pe,$x(Ae))},B=ge=>{if(t.onDropdownVisibleChange){const be={};Object.defineProperty(be,"documentClickClose",{get(){return!1}}),t.onDropdownVisibleChange(ge,be)}},z=(ge,be)=>{const $e=ge.map(fe=>fe.value);if(be.type==="clear"){F($e,{},"selection");return}be.values.length&&N(be.values[0].value,{selected:!1,source:"selection"})},{treeNodeFilterProp:W,loadData:j,treeLoadedKeys:U,onTreeLoad:V,treeDefaultExpandAll:q,treeExpandedKeys:Y,treeDefaultExpandedKeys:J,onTreeExpand:Q,virtual:G,listHeight:ee,listItemHeight:X,treeLine:K,treeIcon:te,showTreeIcon:ue,switcherIcon:ae,treeMotion:re,customSlots:ne,dropdownMatchSelectWidth:le,treeExpandAction:he}=uo(t);AY(Rp({checkable:s,loadData:j,treeLoadedKeys:U,onTreeLoad:V,checkedKeys:k,halfCheckedKeys:E,treeDefaultExpandAll:q,treeExpandedKeys:Y,treeDefaultExpandedKeys:J,onTreeExpand:Q,treeIcon:te,treeMotion:re,showTreeIcon:ue,switcherIcon:ae,treeLine:K,treeNodeFilterProp:W,keyEntities:g,customSlots:ne})),Ime(Rp({virtual:G,listHeight:ee,listItemHeight:X,treeData:b,fieldNames:u,onSelect:N,dropdownMatchSelectWidth:le,treeExpandAction:he}));const pe=se();return i({focus(){var ge;(ge=pe.value)===null||ge===void 0||ge.focus()},blur(){var ge;(ge=pe.value)===null||ge===void 0||ge.blur()},scrollTo(ge){var be;(be=pe.value)===null||be===void 0||be.scrollTo(ge)}}),()=>{var ge;const be=ht(t,["id","prefixCls","customSlots","value","defaultValue","onChange","onSelect","onDeselect","searchValue","inputValue","onSearch","autoClearSearchValue","filterTreeNode","treeNodeFilterProp","showCheckedStrategy","treeNodeLabelProp","multiple","treeCheckable","treeCheckStrictly","labelInValue","fieldNames","treeDataSimpleMode","treeData","children","loadData","treeLoadedKeys","onTreeLoad","treeDefaultExpandAll","treeExpandedKeys","treeDefaultExpandedKeys","onTreeExpand","virtual","listHeight","listItemHeight","onDropdownVisibleChange","treeLine","treeIcon","showTreeIcon","switcherIcon","treeMotion"]);return C(S1,H(H(H({ref:pe},n),be),{},{id:r,prefixCls:t.prefixCls,mode:c.value?"multiple":void 0,displayValues:D.value,onDisplayValuesChange:z,searchValue:d.value,onSearch:h,OptionList:Rme,emptyOptions:!p.value.length,onDropdownVisibleChange:B,tagRender:t.tagRender||o.tagRender,dropdownMatchSelectWidth:(ge=t.dropdownMatchSelectWidth)!==null&&ge!==void 0?ge:!0}),o)}}}),Ume=t=>{const{componentCls:e,treePrefixCls:n,colorBgElevated:i}=t,o=`.${n}`;return[{[`${e}-dropdown`]:[{padding:`${t.paddingXS}px ${t.paddingXS/2}px`},f5(n,Ve(t,{colorBgContainer:i})),{[o]:{borderRadius:0,"&-list-holder-inner":{alignItems:"stretch",[`${o}-treenode`]:{[`${o}-node-content-wrapper`]:{flex:"auto"}}}}},ev(`${n}-checkbox`,t),{"&-rtl":{direction:"rtl",[`${o}-switcher${o}-switcher_close`]:{[`${o}-switcher-icon svg`]:{transform:"rotate(90deg)"}}}}]}]};function qme(t,e){return et("TreeSelect",n=>{const i=Ve(n,{treePrefixCls:e.value});return[Ume(i)]})(t)}const $O=(t,e,n)=>n!==void 0?n:`${t}-${e}`;function Zme(){return A(A({},ht($5(),["showTreeIcon","treeMotion","inputIcon","getInputElement","treeLine","customSlots"])),{suffixIcon:Z.any,size:Ne(),bordered:Ce(),treeLine:Xe([Boolean,Object]),replaceFields:Fe(),placement:Ne(),status:Ne(),popupClassName:String,dropdownClassName:String,"onUpdate:value":ve(),"onUpdate:treeExpandedKeys":ve(),"onUpdate:searchValue":ve()})}const n0=oe({compatConfig:{MODE:3},name:"ATreeSelect",inheritAttrs:!1,props:ct(Zme(),{choiceTransitionName:"",listHeight:256,treeIcon:!1,listItemHeight:26,bordered:!0}),slots:Object,setup(t,e){let{attrs:n,slots:i,expose:o,emit:r}=e;t.treeData===void 0&&i.default,Nt(t.multiple!==!1||!t.treeCheckable,"TreeSelect","`multiple` will always be `true` when `treeCheckable` is true"),Nt(t.replaceFields===void 0,"TreeSelect","`replaceFields` is deprecated, please use fieldNames instead"),Nt(!t.dropdownClassName,"TreeSelect","`dropdownClassName` is deprecated. Please use `popupClassName` instead.");const a=vn(),s=Mn.useInject(),l=L(()=>zo(s.status,t.status)),{prefixCls:c,renderEmpty:u,direction:d,virtual:f,dropdownMatchSelectWidth:h,size:p,getPopupContainer:g,getPrefixCls:m,disabled:v}=Me("select",t),{compactSize:b,compactItemClassnames:y}=Ra(c,d),w=L(()=>b.value||p.value),x=Oi(),$=L(()=>{var U;return(U=v.value)!==null&&U!==void 0?U:x.value}),S=L(()=>m()),_=L(()=>t.placement!==void 0?t.placement:d.value==="rtl"?"bottomRight":"bottomLeft"),P=L(()=>$O(S.value,b1(_.value),t.transitionName)),O=L(()=>$O(S.value,"",t.choiceTransitionName)),T=L(()=>m("select-tree",t.prefixCls)),M=L(()=>m("tree-select",t.prefixCls)),[I,k]=X1(c),[E]=qme(M,T),R=L(()=>ce(t.popupClassName||t.dropdownClassName,`${M.value}-dropdown`,{[`${M.value}-dropdown-rtl`]:d.value==="rtl"},k.value)),D=L(()=>!!(t.treeCheckable||t.multiple)),F=L(()=>t.showArrow!==void 0?t.showArrow:t.loading||!D.value),N=se();o({focus(){var U,V;(V=(U=N.value).focus)===null||V===void 0||V.call(U)},blur(){var U,V;(V=(U=N.value).blur)===null||V===void 0||V.call(U)}});const B=function(){for(var U=arguments.length,V=new Array(U),q=0;q{r("update:treeExpandedKeys",U),r("treeExpand",U)},W=U=>{r("update:searchValue",U),r("search",U)},j=U=>{r("blur",U),a.onFieldBlur()};return()=>{var U,V,q;const{notFoundContent:Y=(U=i.notFoundContent)===null||U===void 0?void 0:U.call(i),prefixCls:J,bordered:Q,listHeight:G,listItemHeight:ee,multiple:X,treeIcon:K,treeLine:te,showArrow:ue,switcherIcon:ae=(V=i.switcherIcon)===null||V===void 0?void 0:V.call(i),fieldNames:re=t.replaceFields,id:ne=a.id.value,placeholder:le=(q=i.placeholder)===null||q===void 0?void 0:q.call(i)}=t,{isFormItemInput:he,hasFeedback:pe,feedbackIcon:ge}=s,{suffixIcon:be,removeIcon:$e,clearIcon:fe}=O1(A(A({},t),{multiple:D.value,showArrow:F.value,hasFeedback:pe,feedbackIcon:ge,prefixCls:c.value}),i);let de;Y!==void 0?de=Y:de=u("Select");const xe=ht(t,["suffixIcon","itemIcon","removeIcon","clearIcon","switcherIcon","bordered","status","onUpdate:value","onUpdate:treeExpandedKeys","onUpdate:searchValue"]),_e=ce(!J&&M.value,{[`${c.value}-lg`]:w.value==="large",[`${c.value}-sm`]:w.value==="small",[`${c.value}-rtl`]:d.value==="rtl",[`${c.value}-borderless`]:!Q,[`${c.value}-in-form-item`]:he},ei(c.value,l.value,pe),y.value,n.class,k.value),Oe={};return t.treeData===void 0&&i.default&&(Oe.children=Dt(i.default())),I(E(C(Kme,H(H(H(H({},n),xe),{},{disabled:$.value,virtual:f.value,dropdownMatchSelectWidth:h.value,id:ne,fieldNames:re,ref:N,prefixCls:c.value,class:_e,listHeight:G,listItemHeight:ee,treeLine:!!te,inputIcon:be,multiple:X,removeIcon:$e,clearIcon:fe,switcherIcon:Re=>d5(T.value,ae,Re,i.leafIcon,te),showTreeIcon:K,notFoundContent:de,getPopupContainer:g==null?void 0:g.value,treeMotion:null,dropdownClassName:R.value,choiceTransitionName:O.value,onChange:B,onBlur:j,onSearch:W,onTreeExpand:z},Oe),{},{transitionName:P.value,customSlots:A(A({},i),{treeCheckable:()=>C("span",{class:`${c.value}-tree-checkbox-inner`},null)}),maxTagPlaceholder:t.maxTagPlaceholder||i.maxTagPlaceholder,placement:_.value,showArrow:pe||ue,placeholder:le}),A(A({},i),{treeCheckable:()=>C("span",{class:`${c.value}-tree-checkbox-inner`},null)}))))}}}),Ax=Dc,Jme=A(n0,{TreeNode:Dc,SHOW_ALL:Lme,SHOW_PARENT:C5,SHOW_CHILD:RC,install:t=>(t.component(n0.name,n0),t.component(Ax.displayName,Ax),t)}),i0=()=>({format:String,showNow:Ce(),showHour:Ce(),showMinute:Ce(),showSecond:Ce(),use12Hours:Ce(),hourStep:Number,minuteStep:Number,secondStep:Number,hideDisabledOptions:Ce(),popupClassName:String,status:Ne()});function Qme(t){const e=HL(t,A(A({},i0()),{order:{type:Boolean,default:!0}})),{TimePicker:n,RangePicker:i}=e,o=oe({name:"ATimePicker",inheritAttrs:!1,props:A(A(A(A({},ug()),NL()),i0()),{addon:{type:Function}}),slots:Object,setup(a,s){let{slots:l,expose:c,emit:u,attrs:d}=s;const f=a,h=vn();Nt(!(l.addon||f.addon),"TimePicker","`addon` is deprecated. Please use `v-slot:renderExtraFooter` instead.");const p=se();c({focus:()=>{var w;(w=p.value)===null||w===void 0||w.focus()},blur:()=>{var w;(w=p.value)===null||w===void 0||w.blur()}});const g=(w,x)=>{u("update:value",w),u("change",w,x),h.onFieldChange()},m=w=>{u("update:open",w),u("openChange",w)},v=w=>{u("focus",w)},b=w=>{u("blur",w),h.onFieldBlur()},y=w=>{u("ok",w)};return()=>{const{id:w=h.id.value}=f;return C(n,H(H(H({},d),ht(f,["onUpdate:value","onUpdate:open"])),{},{id:w,dropdownClassName:f.popupClassName,mode:void 0,ref:p,renderExtraFooter:f.addon||l.addon||f.renderExtraFooter||l.renderExtraFooter,onChange:g,onOpenChange:m,onFocus:v,onBlur:b,onOk:y}),l)}}}),r=oe({name:"ATimeRangePicker",inheritAttrs:!1,props:A(A(A(A({},ug()),BL()),i0()),{order:{type:Boolean,default:!0}}),slots:Object,setup(a,s){let{slots:l,expose:c,emit:u,attrs:d}=s;const f=a,h=se(),p=vn();c({focus:()=>{var $;($=h.value)===null||$===void 0||$.focus()},blur:()=>{var $;($=h.value)===null||$===void 0||$.blur()}});const g=($,S)=>{u("update:value",$),u("change",$,S),p.onFieldChange()},m=$=>{u("update:open",$),u("openChange",$)},v=$=>{u("focus",$)},b=$=>{u("blur",$),p.onFieldBlur()},y=($,S)=>{u("panelChange",$,S)},w=$=>{u("ok",$)},x=($,S,_)=>{u("calendarChange",$,S,_)};return()=>{const{id:$=p.id.value}=f;return C(i,H(H(H({},d),ht(f,["onUpdate:open","onUpdate:value"])),{},{id:$,dropdownClassName:f.popupClassName,picker:"time",mode:void 0,ref:h,onChange:g,onOpenChange:m,onFocus:v,onBlur:b,onPanelChange:y,onOk:w,onCalendarChange:x}),l)}}});return{TimePicker:o,TimeRangePicker:r}}const{TimePicker:eh,TimeRangePicker:Zh}=Qme(rS),eve=A(eh,{TimePicker:eh,TimeRangePicker:Zh,install:t=>(t.component(eh.name,eh),t.component(Zh.name,Zh),t)}),tve=()=>({prefixCls:String,color:String,dot:Z.any,pending:Ce(),position:Z.oneOf(Wn("left","right","")).def(""),label:Z.any}),Td=oe({compatConfig:{MODE:3},name:"ATimelineItem",props:ct(tve(),{color:"blue",pending:!1}),slots:Object,setup(t,e){let{slots:n}=e;const{prefixCls:i}=Me("timeline",t),o=L(()=>({[`${i.value}-item`]:!0,[`${i.value}-item-pending`]:t.pending})),r=L(()=>/blue|red|green|gray/.test(t.color||"")?void 0:t.color||"blue"),a=L(()=>({[`${i.value}-item-head`]:!0,[`${i.value}-item-head-${t.color||"blue"}`]:!r.value}));return()=>{var s,l,c;const{label:u=(s=n.label)===null||s===void 0?void 0:s.call(n),dot:d=(l=n.dot)===null||l===void 0?void 0:l.call(n)}=t;return C("li",{class:o.value},[u&&C("div",{class:`${i.value}-item-label`},[u]),C("div",{class:`${i.value}-item-tail`},null),C("div",{class:[a.value,!!d&&`${i.value}-item-head-custom`],style:{borderColor:r.value,color:r.value}},[d]),C("div",{class:`${i.value}-item-content`},[(c=n.default)===null||c===void 0?void 0:c.call(n)])])}}}),nve=t=>{const{componentCls:e}=t;return{[e]:A(A({},rt(t)),{margin:0,padding:0,listStyle:"none",[`${e}-item`]:{position:"relative",margin:0,paddingBottom:t.timeLineItemPaddingBottom,fontSize:t.fontSize,listStyle:"none","&-tail":{position:"absolute",insetBlockStart:t.timeLineItemHeadSize,insetInlineStart:(t.timeLineItemHeadSize-t.timeLineItemTailWidth)/2,height:`calc(100% - ${t.timeLineItemHeadSize}px)`,borderInlineStart:`${t.timeLineItemTailWidth}px ${t.lineType} ${t.colorSplit}`},"&-pending":{[`${e}-item-head`]:{fontSize:t.fontSizeSM,backgroundColor:"transparent"},[`${e}-item-tail`]:{display:"none"}},"&-head":{position:"absolute",width:t.timeLineItemHeadSize,height:t.timeLineItemHeadSize,backgroundColor:t.colorBgContainer,border:`${t.timeLineHeadBorderWidth}px ${t.lineType} transparent`,borderRadius:"50%","&-blue":{color:t.colorPrimary,borderColor:t.colorPrimary},"&-red":{color:t.colorError,borderColor:t.colorError},"&-green":{color:t.colorSuccess,borderColor:t.colorSuccess},"&-gray":{color:t.colorTextDisabled,borderColor:t.colorTextDisabled}},"&-head-custom":{position:"absolute",insetBlockStart:t.timeLineItemHeadSize/2,insetInlineStart:t.timeLineItemHeadSize/2,width:"auto",height:"auto",marginBlockStart:0,paddingBlock:t.timeLineItemCustomHeadPaddingVertical,lineHeight:1,textAlign:"center",border:0,borderRadius:0,transform:"translate(-50%, -50%)"},"&-content":{position:"relative",insetBlockStart:-(t.fontSize*t.lineHeight-t.fontSize)+t.lineWidth,marginInlineStart:t.margin+t.timeLineItemHeadSize,marginInlineEnd:0,marginBlockStart:0,marginBlockEnd:0,wordBreak:"break-word"},"&-last":{[`> ${e}-item-tail`]:{display:"none"},[`> ${e}-item-content`]:{minHeight:t.controlHeightLG*1.2}}},[`&${e}-alternate, + `]:{background:g},[`&${e}-row-selected`]:{"> td":{background:m},"&:hover > td":{background:v}}}},[`${e}-footer`]:{padding:`${i}px ${o}px`,color:b,background:y}})}},nme=et("Table",t=>{const{controlItemBgActive:e,controlItemBgActiveHover:n,colorTextPlaceholder:i,colorTextHeading:o,colorSplit:r,colorBorderSecondary:a,fontSize:s,padding:l,paddingXS:c,paddingSM:u,controlHeight:d,colorFillAlter:f,colorIcon:h,colorIconHover:p,opacityLoading:g,colorBgContainer:m,borderRadiusLG:v,colorFillContent:b,colorFillSecondary:y,controlInteractiveSize:w}=t,x=new Ot(h),$=new Ot(p),S=e,_=2,P=new Ot(y).onBackground(m).toHexString(),O=new Ot(b).onBackground(m).toHexString(),T=new Ot(f).onBackground(m).toHexString(),M=Ve(t,{tableFontSize:s,tableBg:m,tableRadius:v,tablePaddingVertical:l,tablePaddingHorizontal:l,tablePaddingVerticalMiddle:u,tablePaddingHorizontalMiddle:c,tablePaddingVerticalSmall:c,tablePaddingHorizontalSmall:c,tableBorderColor:a,tableHeaderTextColor:o,tableHeaderBg:T,tableFooterTextColor:o,tableFooterBg:T,tableHeaderCellSplitColor:a,tableHeaderSortBg:P,tableHeaderSortHoverBg:O,tableHeaderIconColor:x.clone().setAlpha(x.getAlpha()*g).toRgbString(),tableHeaderIconColorHover:$.clone().setAlpha($.getAlpha()*g).toRgbString(),tableBodySortBg:T,tableFixedHeaderSortActiveBg:P,tableHeaderFilterActiveBg:b,tableFilterDropdownBg:m,tableRowHoverBg:T,tableSelectedRowBg:S,tableSelectedRowHoverBg:n,zIndexTableFixed:_,zIndexTableSticky:_+1,tableFontSizeMiddle:s,tableFontSizeSmall:s,tableSelectionColumnWidth:d,tableExpandIconBg:m,tableExpandColumnWidth:w+2*t.padding,tableExpandedRowBg:f,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:i,tableScrollThumbBgHover:o,tableScrollBg:r});return[tme(M),Gge(M),vO(M),Qge(M),Xge(M),Hge(M),Kge(M),Vge(M),vO(M),jge(M),qge(M),Yge(M),eme(M),Wge(M),Zge(M),Jge(M),Uge(M)]}),ime=[],w5=()=>({prefixCls:Ne(),columns:xt(),rowKey:Xe([String,Function]),tableLayout:Ne(),rowClassName:Xe([String,Function]),title:ve(),footer:ve(),id:Ne(),showHeader:Ce(),components:Fe(),customRow:ve(),customHeaderRow:ve(),direction:Ne(),expandFixed:Xe([Boolean,String]),expandColumnWidth:Number,expandedRowKeys:xt(),defaultExpandedRowKeys:xt(),expandedRowRender:ve(),expandRowByClick:Ce(),expandIcon:ve(),onExpand:ve(),onExpandedRowsChange:ve(),"onUpdate:expandedRowKeys":ve(),defaultExpandAllRows:Ce(),indentSize:Number,expandIconColumnIndex:Number,showExpandColumn:Ce(),expandedRowClassName:ve(),childrenColumnName:Ne(),rowExpandable:ve(),sticky:Xe([Boolean,Object]),dropdownPrefixCls:String,dataSource:xt(),pagination:Xe([Boolean,Object]),loading:Xe([Boolean,Object]),size:Ne(),bordered:Ce(),locale:Fe(),onChange:ve(),onResizeColumn:ve(),rowSelection:Fe(),getPopupContainer:ve(),scroll:Fe(),sortDirections:xt(),showSorterTooltip:Xe([Boolean,Object],!0),transformCellText:ve()}),ome=oe({name:"InternalTable",inheritAttrs:!1,props:ct(A(A({},w5()),{contextSlots:Fe()}),{rowKey:"key"}),setup(t,e){let{attrs:n,slots:i,expose:o,emit:r}=e;Nt(!(typeof t.rowKey=="function"&&t.rowKey.length>1),"Table","`index` parameter of `rowKey` function is deprecated. There is no guarantee that it will work as expected."),Zhe(L(()=>t.contextSlots)),Jhe({onResizeColumn:(ae,re)=>{r("resizeColumn",ae,re)}});const a=Ic(),s=L(()=>{const ae=new Set(Object.keys(a.value).filter(re=>a.value[re]));return t.columns.filter(re=>!re.responsive||re.responsive.some(ne=>ae.has(ne)))}),{size:l,renderEmpty:c,direction:u,prefixCls:d,configProvider:f}=Me("table",t),[h,p]=nme(d),g=L(()=>{var ae;return t.transformCellText||((ae=f.transformCellText)===null||ae===void 0?void 0:ae.value)}),[m]=xo("Table",bi.Table,Ue(t,"locale")),v=L(()=>t.dataSource||ime),b=L(()=>f.getPrefixCls("dropdown",t.dropdownPrefixCls)),y=L(()=>t.childrenColumnName||"children"),w=L(()=>v.value.some(ae=>ae==null?void 0:ae[y.value])?"nest":t.expandedRowRender?"row":null),x=$t({body:null}),$=ae=>{A(x,ae)},S=L(()=>typeof t.rowKey=="function"?t.rowKey:ae=>ae==null?void 0:ae[t.rowKey]),[_]=jpe(v,y,S),P={},O=function(ae,re){let ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const{pagination:le,scroll:he,onChange:pe}=t,ge=A(A({},P),ae);ne&&(P.resetPagination(),ge.pagination.current&&(ge.pagination.current=1),le&&le.onChange&&le.onChange(1,ge.pagination.pageSize)),he&&he.scrollToFirstRowOnChange!==!1&&x.body&&Qw(0,{getContainer:()=>x.body}),pe==null||pe(ge.pagination,ge.filters,ge.sorter,{currentDataSource:mO(yx(v.value,ge.sorterStates,y.value),ge.filterStates),action:re})},T=(ae,re)=>{O({sorter:ae,sorterStates:re},"sort",!1)},[M,I,k,E]=Jpe({prefixCls:d,mergedColumns:s,onSorterChange:T,sortDirections:L(()=>t.sortDirections||["ascend","descend"]),tableLocale:m,showSorterTooltip:Ue(t,"showSorterTooltip")}),R=L(()=>yx(v.value,I.value,y.value)),D=(ae,re)=>{O({filters:ae,filterStates:re},"filter",!0)},[F,N,B]=Fge({prefixCls:d,locale:m,dropdownPrefixCls:b,mergedColumns:s,onFilterChange:D,getPopupContainer:Ue(t,"getPopupContainer")}),z=L(()=>mO(R.value,N.value)),[W]=zge(Ue(t,"contextSlots")),j=L(()=>{const ae={},re=B.value;return Object.keys(re).forEach(ne=>{re[ne]!==null&&(ae[ne]=re[ne])}),A(A({},k.value),{filters:ae})}),[U]=Nge(j),V=(ae,re)=>{O({pagination:A(A({},P.pagination),{current:ae,pageSize:re})},"paginate")},[q,Y]=Wpe(L(()=>z.value.length),Ue(t,"pagination"),V);Ke(()=>{P.sorter=E.value,P.sorterStates=I.value,P.filters=B.value,P.filterStates=N.value,P.pagination=t.pagination===!1?{}:Hpe(q.value,t.pagination),P.resetPagination=Y});const J=L(()=>{if(t.pagination===!1||!q.value.pageSize)return z.value;const{current:ae=1,total:re,pageSize:ne=px}=q.value;return Nt(ae>0,"Table","`current` should be positive number."),z.value.lengthne?z.value.slice((ae-1)*ne,ae*ne):z.value:z.value.slice((ae-1)*ne,ae*ne)});Ke(()=>{pt(()=>{const{total:ae,pageSize:re=px}=q.value;z.value.lengthre&&Nt(!1,"Table","`dataSource` length is less than `pagination.total` but large than `pagination.pageSize`. Please make sure your config correct data with async mode.")})},{flush:"post"});const Q=L(()=>t.showExpandColumn===!1?-1:w.value==="nest"&&t.expandIconColumnIndex===void 0?t.rowSelection?1:0:t.expandIconColumnIndex>0&&t.rowSelection?t.expandIconColumnIndex-1:t.expandIconColumnIndex),G=se();ye(()=>t.rowSelection,()=>{G.value=t.rowSelection?A({},t.rowSelection):t.rowSelection},{deep:!0,immediate:!0});const[ee,X]=Xpe(G,{prefixCls:d,data:z,pageData:J,getRowKey:S,getRecordByKey:_,expandType:w,childrenColumnName:y,locale:m,getPopupContainer:L(()=>t.getPopupContainer)}),K=(ae,re,ne)=>{let le;const{rowClassName:he}=t;return typeof he=="function"?le=ce(he(ae,re,ne)):le=ce(he),ce({[`${d.value}-row-selected`]:X.value.has(S.value(ae,re))},le)};o({selectedKeySet:X});const te=L(()=>typeof t.indentSize=="number"?t.indentSize:15),ue=ae=>U(ee(F(M(W(ae)))));return()=>{var ae;const{expandIcon:re=i.expandIcon||Bge(m.value),pagination:ne,loading:le,bordered:he}=t;let pe,ge;if(ne!==!1&&(!((ae=q.value)===null||ae===void 0)&&ae.total)){let de;q.value.size?de=q.value.size:de=l.value==="small"||l.value==="middle"?"small":void 0;const xe=Re=>C(lv,H(H({},q.value),{},{class:[`${d.value}-pagination ${d.value}-pagination-${Re}`,q.value.class],size:de}),null),_e=u.value==="rtl"?"left":"right",{position:Oe}=q.value;if(Oe!==null&&Array.isArray(Oe)){const Re=Oe.find(Pe=>Pe.includes("top")),Se=Oe.find(Pe=>Pe.includes("bottom")),Ae=Oe.every(Pe=>`${Pe}`=="none");!Re&&!Se&&!Ae&&(ge=xe(_e)),Re&&(pe=xe(Re.toLowerCase().replace("top",""))),Se&&(ge=xe(Se.toLowerCase().replace("bottom","")))}else ge=xe(_e)}let be;typeof le=="boolean"?be={spinning:le}:typeof le=="object"&&(be=A({spinning:!0},le));const $e=ce(`${d.value}-wrapper`,{[`${d.value}-wrapper-rtl`]:u.value==="rtl"},n.class,p.value),fe=ht(t,["columns"]);return h(C("div",{class:$e,style:n.style},[C(rr,H({spinning:!1},be),{default:()=>[pe,C(Bpe,H(H(H({},n),fe),{},{expandedRowKeys:t.expandedRowKeys,defaultExpandedRowKeys:t.defaultExpandedRowKeys,expandIconColumnIndex:Q.value,indentSize:te.value,expandIcon:re,columns:s.value,direction:u.value,prefixCls:d.value,class:ce({[`${d.value}-middle`]:l.value==="middle",[`${d.value}-small`]:l.value==="small",[`${d.value}-bordered`]:he,[`${d.value}-empty`]:v.value.length===0}),data:J.value,rowKey:S.value,rowClassName:K,internalHooks:hx,internalRefs:x,onUpdateInternalRefs:$,transformColumns:ue,transformCellText:g.value}),A(A({},i),{emptyText:()=>{var de,xe;return((de=i.emptyText)===null||de===void 0?void 0:de.call(i))||((xe=t.locale)===null||xe===void 0?void 0:xe.emptyText)||c("Table")}})),ge]})]))}}}),t0=oe({name:"ATable",inheritAttrs:!1,props:ct(w5(),{rowKey:"key"}),slots:Object,setup(t,e){let{attrs:n,slots:i,expose:o}=e;const r=se();return o({table:r}),()=>{var a;const s=t.columns||s5((a=i.default)===null||a===void 0?void 0:a.call(i));return C(ome,H(H(H({ref:r},n),t),{},{columns:s||[],expandedRowRender:i.expandedRowRender||t.expandedRowRender,contextSlots:A({},i)}),i)}}}),Uh=oe({name:"ATableColumn",slots:Object,render(){return null}}),qh=oe({name:"ATableColumnGroup",slots:Object,__ANT_TABLE_COLUMN_GROUP:!0,render(){return null}}),wg=Ppe,Sg=Epe,Zh=A(Mpe,{Cell:Sg,Row:wg,name:"ATableSummary"}),rme=A(t0,{SELECTION_ALL:gx,SELECTION_INVERT:mx,SELECTION_NONE:vx,SELECTION_COLUMN:yr,EXPAND_COLUMN:da,Column:Uh,ColumnGroup:qh,Summary:Zh,install:t=>(t.component(Zh.name,Zh),t.component(Sg.name,Sg),t.component(wg.name,wg),t.component(t0.name,t0),t.component(Uh.name,Uh),t.component(qh.name,qh),t)}),ame={prefixCls:String,placeholder:String,value:String,handleClear:Function,disabled:{type:Boolean,default:void 0},onChange:Function},sme=oe({compatConfig:{MODE:3},name:"Search",inheritAttrs:!1,props:ct(ame,{placeholder:""}),emits:["change"],setup(t,e){let{emit:n}=e;const i=o=>{var r;n("change",o),o.target.value===""&&((r=t.handleClear)===null||r===void 0||r.call(t))};return()=>{const{placeholder:o,value:r,prefixCls:a,disabled:s}=t;return C(wn,{placeholder:o,class:a,value:r,onChange:i,disabled:s,allowClear:!0},{prefix:()=>C(Tc,null,null)})}}});var lme={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};function bO(t){for(var e=1;e{const{renderedText:i,renderedEl:o,item:r,checked:a,disabled:s,prefixCls:l,showRemove:c}=t,u=ce({[`${l}-content-item`]:!0,[`${l}-content-item-disabled`]:s||r.disabled});let d;return(typeof i=="string"||typeof i=="number")&&(d=String(i)),C(Us,{componentName:"Transfer",defaultLocale:bi.Transfer},{default:f=>{const h=C("span",{class:`${l}-content-item-text`},[o]);return c?C("li",{class:u,title:d},[h,C(bg,{disabled:s||r.disabled,class:`${l}-content-item-remove`,"aria-label":f.remove,onClick:()=>{n("remove",r)}},{default:()=>[C(gv,null,null)]})]):C("li",{class:u,title:d,onClick:s||r.disabled?ume:()=>{n("click",r)}},[C(ho,{class:`${l}-checkbox`,checked:a,disabled:s||r.disabled},null),h])}})}}}),hme={prefixCls:String,filteredRenderItems:Z.array.def([]),selectedKeys:Z.array,disabled:Ce(),showRemove:Ce(),pagination:Z.any,onItemSelect:Function,onScroll:Function,onItemRemove:Function};function pme(t){if(!t)return null;const e={pageSize:10,simple:!0,showSizeChanger:!1,showLessItems:!1};return typeof t=="object"?A(A({},e),t):e}const gme=oe({compatConfig:{MODE:3},name:"ListBody",inheritAttrs:!1,props:hme,emits:["itemSelect","itemRemove","scroll"],setup(t,e){let{emit:n,expose:i}=e;const o=se(1),r=d=>{const{selectedKeys:f}=t,h=f.indexOf(d.key)>=0;n("itemSelect",d.key,!h)},a=d=>{n("itemRemove",[d.key])},s=d=>{n("scroll",d)},l=L(()=>pme(t.pagination));ye([l,()=>t.filteredRenderItems],()=>{if(l.value){const d=Math.ceil(t.filteredRenderItems.length/l.value.pageSize);o.value=Math.min(o.value,d)}},{immediate:!0});const c=L(()=>{const{filteredRenderItems:d}=t;let f=d;return l.value&&(f=d.slice((o.value-1)*l.value.pageSize,o.value*l.value.pageSize)),f}),u=d=>{o.value=d};return i({items:c}),()=>{const{prefixCls:d,filteredRenderItems:f,selectedKeys:h,disabled:p,showRemove:g}=t;let m=null;l.value&&(m=C(lv,{simple:l.value.simple,showSizeChanger:l.value.showSizeChanger,showLessItems:l.value.showLessItems,size:"small",disabled:p,class:`${d}-pagination`,total:f.length,pageSize:l.value.pageSize,current:o.value,onChange:u},null));const v=c.value.map(b=>{let{renderedEl:y,renderedText:w,item:x}=b;const{disabled:$}=x,S=h.indexOf(x.key)>=0;return C(fme,{disabled:p||$,key:x.key,item:x,renderedText:w,renderedEl:y,checked:S,prefixCls:d,onClick:r,onRemove:a,showRemove:g},null)});return C(Qe,null,[C("ul",{class:ce(`${d}-content`,{[`${d}-content-show-remove`]:g}),onScroll:s},[v]),m])}}}),Sx=t=>{const e=new Map;return t.forEach((n,i)=>{e.set(n,i)}),e},mme=t=>{const e=new Map;return t.forEach((n,i)=>{let{disabled:o,key:r}=n;o&&e.set(r,i)}),e},vme=()=>null;function bme(t){return!!(t&&!cn(t)&&Object.prototype.toString.call(t)==="[object Object]")}function eh(t){return t.filter(e=>!e.disabled).map(e=>e.key)}const yme={prefixCls:String,dataSource:xt([]),filter:String,filterOption:Function,checkedKeys:Z.arrayOf(Z.string),handleFilter:Function,handleClear:Function,renderItem:Function,showSearch:Ce(!1),searchPlaceholder:String,notFoundContent:Z.any,itemUnit:String,itemsUnit:String,renderList:Z.any,disabled:Ce(),direction:Ne(),showSelectAll:Ce(),remove:String,selectAll:String,selectCurrent:String,selectInvert:String,removeAll:String,removeCurrent:String,selectAllLabel:Z.any,showRemove:Ce(),pagination:Z.any,onItemSelect:Function,onItemSelectAll:Function,onItemRemove:Function,onScroll:Function},yO=oe({compatConfig:{MODE:3},name:"TransferList",inheritAttrs:!1,props:yme,slots:Object,setup(t,e){let{attrs:n,slots:i}=e;const o=se(""),r=se(),a=se(),s=(x,$)=>{let S=x?x($):null;const _=!!S&&Kt(S).length>0;return _||(S=C(gme,H(H({},$),{},{ref:a}),null)),{customize:_,bodyContent:S}},l=x=>{const{renderItem:$=vme}=t,S=$(x),_=bme(S);return{renderedText:_?S.value:S,renderedEl:_?S.label:S,item:x}},c=se([]),u=se([]);Ke(()=>{const x=[],$=[];t.dataSource.forEach(S=>{const _=l(S),{renderedText:P}=_;if(o.value&&o.value.trim()&&!v(P,S))return null;x.push(S),$.push(_)}),c.value=x,u.value=$});const d=L(()=>{const{checkedKeys:x}=t;if(x.length===0)return"none";const $=Sx(x);return c.value.every(S=>$.has(S.key)||!!S.disabled)?"all":"part"}),f=L(()=>eh(c.value)),h=(x,$)=>Array.from(new Set([...x,...t.checkedKeys])).filter(S=>$.indexOf(S)===-1),p=x=>{let{disabled:$,prefixCls:S}=x;var _;const P=d.value==="all";return C(ho,{disabled:((_=t.dataSource)===null||_===void 0?void 0:_.length)===0||$,checked:P,indeterminate:d.value==="part",class:`${S}-checkbox`,onChange:()=>{const T=f.value;t.onItemSelectAll(h(P?[]:T,P?t.checkedKeys:[]))}},null)},g=x=>{var $;const{target:{value:S}}=x;o.value=S,($=t.handleFilter)===null||$===void 0||$.call(t,x)},m=x=>{var $;o.value="",($=t.handleClear)===null||$===void 0||$.call(t,x)},v=(x,$)=>{const{filterOption:S}=t;return S?S(o.value,$):x.includes(o.value)},b=(x,$)=>{const{itemsUnit:S,itemUnit:_,selectAllLabel:P}=t;if(P)return typeof P=="function"?P({selectedCount:x,totalCount:$}):P;const O=$>1?S:_;return C(Qe,null,[(x>0?`${x}/`:"")+$,Qn(" "),O])},y=L(()=>Array.isArray(t.notFoundContent)?t.notFoundContent[t.direction==="left"?0:1]:t.notFoundContent),w=(x,$,S,_,P,O)=>{const T=P?C("div",{class:`${x}-body-search-wrapper`},[C(sme,{prefixCls:`${x}-search`,onChange:g,handleClear:m,placeholder:$,value:o.value,disabled:O},null)]):null;let M;const{onEvents:I}=Hw(n),{bodyContent:k,customize:E}=s(_,A(A(A({},t),{filteredItems:c.value,filteredRenderItems:u.value,selectedKeys:S}),I));return E?M=C("div",{class:`${x}-body-customize-wrapper`},[k]):M=c.value.length?k:C("div",{class:`${x}-body-not-found`},[y.value]),C("div",{class:P?`${x}-body ${x}-body-with-search`:`${x}-body`,ref:r},[T,M])};return()=>{var x,$;const{prefixCls:S,checkedKeys:_,disabled:P,showSearch:O,searchPlaceholder:T,selectAll:M,selectCurrent:I,selectInvert:k,removeAll:E,removeCurrent:R,renderList:D,onItemSelectAll:F,onItemRemove:N,showSelectAll:B=!0,showRemove:z,pagination:W}=t,j=(x=i.footer)===null||x===void 0?void 0:x.call(i,A({},t)),U=ce(S,{[`${S}-with-pagination`]:!!W,[`${S}-with-footer`]:!!j}),V=w(S,T,_,D,O,P),q=j?C("div",{class:`${S}-footer`},[j]):null,Y=!z&&!W&&p({disabled:P,prefixCls:S});let J=null;z?J=C(sn,null,{default:()=>[W&&C(sn.Item,{key:"removeCurrent",onClick:()=>{const G=eh((a.value.items||[]).map(ee=>ee.item));N==null||N(G)}},{default:()=>[R]}),C(sn.Item,{key:"removeAll",onClick:()=>{N==null||N(f.value)}},{default:()=>[E]})]}):J=C(sn,null,{default:()=>[C(sn.Item,{key:"selectAll",onClick:()=>{const G=f.value;F(h(G,[]))}},{default:()=>[M]}),W&&C(sn.Item,{onClick:()=>{const G=eh((a.value.items||[]).map(ee=>ee.item));F(h(G,[]))}},{default:()=>[I]}),C(sn.Item,{key:"selectInvert",onClick:()=>{let G;W?G=eh((a.value.items||[]).map(te=>te.item)):G=f.value;const ee=new Set(_),X=[],K=[];G.forEach(te=>{ee.has(te)?K.push(te):X.push(te)}),F(h(X,K))}},{default:()=>[k]})]});const Q=C(Io,{class:`${S}-header-dropdown`,overlay:J,disabled:P},{default:()=>[C(nl,null,null)]});return C("div",{class:U,style:n.style},[C("div",{class:`${S}-header`},[B?C(Qe,null,[Y,Q]):null,C("span",{class:`${S}-header-selected`},[C("span",null,[b(_.length,c.value.length)]),C("span",{class:`${S}-header-title`},[($=i.titleText)===null||$===void 0?void 0:$.call(i)])])]),V,q])}}});function xO(){}const DC=t=>{const{disabled:e,moveToLeft:n=xO,moveToRight:i=xO,leftArrowText:o="",rightArrowText:r="",leftActive:a,rightActive:s,class:l,style:c,direction:u,oneWay:d}=t;return C("div",{class:l,style:c},[C(nn,{type:"primary",size:"small",disabled:e||!s,onClick:i,icon:C(u!=="rtl"?qi:cr,null,null)},{default:()=>[r]}),!d&&C(nn,{type:"primary",size:"small",disabled:e||!a,onClick:n,icon:C(u!=="rtl"?cr:qi,null,null)},{default:()=>[o]})])};DC.displayName="Operation";DC.inheritAttrs=!1;const xme=t=>{const{antCls:e,componentCls:n,listHeight:i,controlHeightLG:o,marginXXS:r,margin:a}=t,s=`${e}-table`,l=`${e}-input`;return{[`${n}-customize-list`]:{[`${n}-list`]:{flex:"1 1 50%",width:"auto",height:"auto",minHeight:i},[`${s}-wrapper`]:{[`${s}-small`]:{border:0,borderRadius:0,[`${s}-selection-column`]:{width:o,minWidth:o}},[`${s}-pagination${s}-pagination`]:{margin:`${a}px 0 ${r}px`}},[`${l}[disabled]`]:{backgroundColor:"transparent"}}}},wO=(t,e)=>{const{componentCls:n,colorBorder:i}=t;return{[`${n}-list`]:{borderColor:e,"&-search:not([disabled])":{borderColor:i}}}},wme=t=>{const{componentCls:e}=t;return{[`${e}-status-error`]:A({},wO(t,t.colorError)),[`${e}-status-warning`]:A({},wO(t,t.colorWarning))}},Sme=t=>{const{componentCls:e,colorBorder:n,colorSplit:i,lineWidth:o,transferItemHeight:r,transferHeaderHeight:a,transferHeaderVerticalPadding:s,transferItemPaddingVertical:l,controlItemBgActive:c,controlItemBgActiveHover:u,colorTextDisabled:d,listHeight:f,listWidth:h,listWidthLG:p,fontSizeIcon:g,marginXS:m,paddingSM:v,lineType:b,iconCls:y,motionDurationSlow:w}=t;return{display:"flex",flexDirection:"column",width:h,height:f,border:`${o}px ${b} ${n}`,borderRadius:t.borderRadiusLG,"&-with-pagination":{width:p,height:"auto"},"&-search":{[`${y}-search`]:{color:d}},"&-header":{display:"flex",flex:"none",alignItems:"center",height:a,padding:`${s-o}px ${v}px ${s}px`,color:t.colorText,background:t.colorBgContainer,borderBottom:`${o}px ${b} ${i}`,borderRadius:`${t.borderRadiusLG}px ${t.borderRadiusLG}px 0 0`,"> *:not(:last-child)":{marginInlineEnd:4},"> *":{flex:"none"},"&-title":A(A({},un),{flex:"auto",textAlign:"end"}),"&-dropdown":A(A({},qs()),{fontSize:g,transform:"translateY(10%)",cursor:"pointer","&[disabled]":{cursor:"not-allowed"}})},"&-body":{display:"flex",flex:"auto",flexDirection:"column",overflow:"hidden",fontSize:t.fontSize,"&-search-wrapper":{position:"relative",flex:"none",padding:v}},"&-content":{flex:"auto",margin:0,padding:0,overflow:"auto",listStyle:"none","&-item":{display:"flex",alignItems:"center",minHeight:r,padding:`${l}px ${v}px`,transition:`all ${w}`,"> *:not(:last-child)":{marginInlineEnd:m},"> *":{flex:"none"},"&-text":A(A({},un),{flex:"auto"}),"&-remove":{position:"relative",color:n,cursor:"pointer",transition:`all ${w}`,"&:hover":{color:t.colorLinkHover},"&::after":{position:"absolute",insert:`-${l}px -50%`,content:'""'}},[`&:not(${e}-list-content-item-disabled)`]:{"&:hover":{backgroundColor:t.controlItemBgHover,cursor:"pointer"},[`&${e}-list-content-item-checked:hover`]:{backgroundColor:u}},"&-checked":{backgroundColor:c},"&-disabled":{color:d,cursor:"not-allowed"}},[`&-show-remove ${e}-list-content-item:not(${e}-list-content-item-disabled):hover`]:{background:"transparent",cursor:"default"}},"&-pagination":{padding:`${t.paddingXS}px 0`,textAlign:"end",borderTop:`${o}px ${b} ${i}`},"&-body-not-found":{flex:"none",width:"100%",margin:"auto 0",color:d,textAlign:"center"},"&-footer":{borderTop:`${o}px ${b} ${i}`},"&-checkbox":{lineHeight:1}}},Cme=t=>{const{antCls:e,iconCls:n,componentCls:i,transferHeaderHeight:o,marginXS:r,marginXXS:a,fontSizeIcon:s,fontSize:l,lineHeight:c}=t;return{[i]:A(A({},rt(t)),{position:"relative",display:"flex",alignItems:"stretch",[`${i}-disabled`]:{[`${i}-list`]:{background:t.colorBgContainerDisabled}},[`${i}-list`]:Sme(t),[`${i}-operation`]:{display:"flex",flex:"none",flexDirection:"column",alignSelf:"center",margin:`0 ${r}px`,verticalAlign:"middle",[`${e}-btn`]:{display:"block","&:first-child":{marginBottom:a},[n]:{fontSize:s}}},[`${e}-empty-image`]:{maxHeight:o/2-Math.round(l*c)}})}},$me=t=>{const{componentCls:e}=t;return{[`${e}-rtl`]:{direction:"rtl"}}},Ame=et("Transfer",t=>{const{fontSize:e,lineHeight:n,lineWidth:i,controlHeightLG:o,controlHeight:r}=t,a=Math.round(e*n),s=o,l=r,c=Ve(t,{transferItemHeight:l,transferHeaderHeight:s,transferHeaderVerticalPadding:Math.ceil((s-i-a)/2),transferItemPaddingVertical:(l-a)/2});return[Cme(c),xme(c),wme(c),$me(c)]},{listWidth:180,listHeight:200,listWidthLG:250}),_me=()=>({id:String,prefixCls:String,dataSource:xt([]),disabled:Ce(),targetKeys:xt(),selectedKeys:xt(),render:ve(),listStyle:Xe([Function,Object],()=>({})),operationStyle:Fe(void 0),titles:xt(),operations:xt(),showSearch:Ce(!1),filterOption:ve(),searchPlaceholder:String,notFoundContent:Z.any,locale:Fe(),rowKey:ve(),showSelectAll:Ce(),selectAllLabels:xt(),children:ve(),oneWay:Ce(),pagination:Xe([Object,Boolean]),status:Ne(),onChange:ve(),onSelectChange:ve(),onSearch:ve(),onScroll:ve(),"onUpdate:targetKeys":ve(),"onUpdate:selectedKeys":ve()}),Pme=oe({compatConfig:{MODE:3},name:"ATransfer",inheritAttrs:!1,props:_me(),slots:Object,setup(t,e){let{emit:n,attrs:i,slots:o,expose:r}=e;const{configProvider:a,prefixCls:s,direction:l}=Me("transfer",t),[c,u]=Ame(s),d=se([]),f=se([]),h=vn(),p=Mn.useInject(),g=L(()=>zo(p.status,t.status));ye(()=>t.selectedKeys,()=>{var V,q;d.value=((V=t.selectedKeys)===null||V===void 0?void 0:V.filter(Y=>t.targetKeys.indexOf(Y)===-1))||[],f.value=((q=t.selectedKeys)===null||q===void 0?void 0:q.filter(Y=>t.targetKeys.indexOf(Y)>-1))||[]},{immediate:!0});const m=(V,q)=>{const Y={notFoundContent:q("Transfer")},J=gn(o,t,"notFoundContent");return J&&(Y.notFoundContent=J),t.searchPlaceholder!==void 0&&(Y.searchPlaceholder=t.searchPlaceholder),A(A(A({},V),Y),t.locale)},v=V=>{const{targetKeys:q=[],dataSource:Y=[]}=t,J=V==="right"?d.value:f.value,Q=mme(Y),G=J.filter(te=>!Q.has(te)),ee=Sx(G),X=V==="right"?G.concat(q):q.filter(te=>!ee.has(te)),K=V==="right"?"left":"right";V==="right"?d.value=[]:f.value=[],n("update:targetKeys",X),S(K,[]),n("change",X,V,G),h.onFieldChange()},b=()=>{v("left")},y=()=>{v("right")},w=(V,q)=>{S(V,q)},x=V=>w("left",V),$=V=>w("right",V),S=(V,q)=>{V==="left"?(t.selectedKeys||(d.value=q),n("update:selectedKeys",[...q,...f.value]),n("selectChange",q,dt(f.value))):(t.selectedKeys||(f.value=q),n("update:selectedKeys",[...q,...d.value]),n("selectChange",dt(d.value),q))},_=(V,q)=>{const Y=q.target.value;n("search",V,Y)},P=V=>{_("left",V)},O=V=>{_("right",V)},T=V=>{n("search",V,"")},M=()=>{T("left")},I=()=>{T("right")},k=(V,q,Y)=>{const J=V==="left"?[...d.value]:[...f.value],Q=J.indexOf(q);Q>-1&&J.splice(Q,1),Y&&J.push(q),S(V,J)},E=(V,q)=>k("left",V,q),R=(V,q)=>k("right",V,q),D=V=>{const{targetKeys:q=[]}=t,Y=q.filter(J=>!V.includes(J));n("update:targetKeys",Y),n("change",Y,"left",[...V])},F=(V,q)=>{n("scroll",V,q)},N=V=>{F("left",V)},B=V=>{F("right",V)},z=(V,q)=>typeof V=="function"?V({direction:q}):V,W=se([]),j=se([]);Ke(()=>{const{dataSource:V,rowKey:q,targetKeys:Y=[]}=t,J=[],Q=new Array(Y.length),G=Sx(Y);V.forEach(ee=>{q&&(ee.key=q(ee)),G.has(ee.key)?Q[G.get(ee.key)]=ee:J.push(ee)}),W.value=J,j.value=Q}),r({handleSelectChange:S});const U=V=>{var q,Y,J,Q,G,ee;const{disabled:X,operations:K=[],showSearch:te,listStyle:ue,operationStyle:ae,filterOption:re,showSelectAll:ne,selectAllLabels:le=[],oneWay:he,pagination:pe,id:ge=h.id.value}=t,{class:be,style:$e}=i,fe=o.children,de=!fe&&pe,xe=a.renderEmpty,_e=m(V,xe),{footer:Oe}=o,Re=t.render||o.render,Se=f.value.length>0,Ae=d.value.length>0,Pe=ce(s.value,be,{[`${s.value}-disabled`]:X,[`${s.value}-customize-list`]:!!fe,[`${s.value}-rtl`]:l.value==="rtl"},ei(s.value,g.value,p.hasFeedback),u.value),ke=t.titles,Le=(J=(q=ke&&ke[0])!==null&&q!==void 0?q:(Y=o.leftTitle)===null||Y===void 0?void 0:Y.call(o))!==null&&J!==void 0?J:(_e.titles||["",""])[0],De=(ee=(Q=ke&&ke[1])!==null&&Q!==void 0?Q:(G=o.rightTitle)===null||G===void 0?void 0:G.call(o))!==null&&ee!==void 0?ee:(_e.titles||["",""])[1];return C("div",H(H({},i),{},{class:Pe,style:$e,id:ge}),[C(yO,H({key:"leftList",prefixCls:`${s.value}-list`,dataSource:W.value,filterOption:re,style:z(ue,"left"),checkedKeys:d.value,handleFilter:P,handleClear:M,onItemSelect:E,onItemSelectAll:x,renderItem:Re,showSearch:te,renderList:fe,onScroll:N,disabled:X,direction:l.value==="rtl"?"right":"left",showSelectAll:ne,selectAllLabel:le[0]||o.leftSelectAllLabel,pagination:de},_e),{titleText:()=>Le,footer:Oe}),C(DC,{key:"operation",class:`${s.value}-operation`,rightActive:Ae,rightArrowText:K[0],moveToRight:y,leftActive:Se,leftArrowText:K[1],moveToLeft:b,style:ae,disabled:X,direction:l.value,oneWay:he},null),C(yO,H({key:"rightList",prefixCls:`${s.value}-list`,dataSource:j.value,filterOption:re,style:z(ue,"right"),checkedKeys:f.value,handleFilter:O,handleClear:I,onItemSelect:R,onItemSelectAll:$,onItemRemove:D,renderItem:Re,showSearch:te,renderList:fe,onScroll:B,disabled:X,direction:l.value==="rtl"?"left":"right",showSelectAll:ne,selectAllLabel:le[1]||o.rightSelectAllLabel,showRemove:he,pagination:de},_e),{titleText:()=>De,footer:Oe})])};return()=>c(C(Us,{componentName:"Transfer",defaultLocale:bi.Transfer,children:U},null))}}),Tme=Vt(Pme);function Ome(t){return Array.isArray(t)?t:t!==void 0?[t]:[]}function Eme(t){const{label:e,value:n,children:i}=t||{},o=n||"value";return{_title:e?[e]:["title","label"],value:o,key:o,children:i||"children"}}function Cx(t){return t.disabled||t.disableCheckbox||t.checkable===!1}function Mme(t,e){const n=[];function i(o){o.forEach(r=>{n.push(r[e.value]);const a=r[e.children];a&&i(a)})}return i(t),n}function SO(t){return t==null}const S5=Symbol("TreeSelectContextPropsKey");function Ime(t){return ot(S5,t)}function kme(){return qe(S5,{})}const Dme={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Rme=oe({compatConfig:{MODE:3},name:"OptionList",inheritAttrs:!1,setup(t,e){let{slots:n,expose:i}=e;const o=Gd(),r=Cm(),a=kme(),s=se(),l=C1(()=>a.treeData,[()=>o.open,()=>a.treeData],x=>x[0]),c=L(()=>{const{checkable:x,halfCheckedKeys:$,checkedKeys:S}=r;return x?{checked:S,halfChecked:$}:null});ye(()=>o.open,()=>{pt(()=>{var x;o.open&&!o.multiple&&r.checkedKeys.length&&((x=s.value)===null||x===void 0||x.scrollTo({key:r.checkedKeys[0]}))})},{immediate:!0,flush:"post"});const u=L(()=>String(o.searchValue).toLowerCase()),d=x=>u.value?String(x[r.treeNodeFilterProp]).toLowerCase().includes(u.value):!1,f=ie(r.treeDefaultExpandedKeys),h=ie(null);ye(()=>o.searchValue,()=>{o.searchValue&&(h.value=Mme(dt(a.treeData),dt(a.fieldNames)))},{immediate:!0});const p=L(()=>r.treeExpandedKeys?r.treeExpandedKeys.slice():o.searchValue?h.value:f.value),g=x=>{var $;f.value=x,h.value=x,($=r.onTreeExpand)===null||$===void 0||$.call(r,x)},m=x=>{x.preventDefault()},v=(x,$)=>{let{node:S}=$;var _,P;const{checkable:O,checkedKeys:T}=r;O&&Cx(S)||((_=a.onSelect)===null||_===void 0||_.call(a,S.key,{selected:!T.includes(S.key)}),o.multiple||(P=o.toggleOpen)===null||P===void 0||P.call(o,!1))},b=se(null),y=L(()=>r.keyEntities[b.value]),w=x=>{b.value=x};return i({scrollTo:function(){for(var x,$,S=arguments.length,_=new Array(S),P=0;P{var $;const{which:S}=x;switch(S){case Te.UP:case Te.DOWN:case Te.LEFT:case Te.RIGHT:($=s.value)===null||$===void 0||$.onKeydown(x);break;case Te.ENTER:{if(y.value){const{selectable:_,value:P}=y.value.node||{};_!==!1&&v(null,{node:{key:b.value},selected:!r.checkedKeys.includes(P)})}break}case Te.ESC:o.toggleOpen(!1)}},onKeyup:()=>{}}),()=>{var x;const{prefixCls:$,multiple:S,searchValue:_,open:P,notFoundContent:O=(x=n.notFoundContent)===null||x===void 0?void 0:x.call(n)}=o,{listHeight:T,listItemHeight:M,virtual:I,dropdownMatchSelectWidth:k,treeExpandAction:E}=a,{checkable:R,treeDefaultExpandAll:D,treeIcon:F,showTreeIcon:N,switcherIcon:B,treeLine:z,loadData:W,treeLoadedKeys:j,treeMotion:U,onTreeLoad:V,checkedKeys:q}=r;if(l.value.length===0)return C("div",{role:"listbox",class:`${$}-empty`,onMousedown:m},[O]);const Y={fieldNames:a.fieldNames};return j&&(Y.loadedKeys=j),p.value&&(Y.expandedKeys=p.value),C("div",{onMousedown:m},[y.value&&P&&C("span",{style:Dme,"aria-live":"assertive"},[y.value.node.value]),C(u5,H(H({ref:s,focusable:!1,prefixCls:`${$}-tree`,treeData:l.value,height:T,itemHeight:M,virtual:I!==!1&&k!==!1,multiple:S,icon:F,showIcon:N,switcherIcon:B,showLine:z,loadData:_?null:W,motion:U,activeKey:b.value,checkable:R,checkStrictly:!0,checkedKeys:c.value,selectedKeys:R?[]:q,defaultExpandAll:D},Y),{},{onActiveChange:w,onSelect:v,onCheck:v,onExpand:g,onLoad:V,filterTreeNode:d,expandAction:E}),A(A({},n),{checkable:r.customSlots.treeCheckable}))])}}}),Lme="SHOW_ALL",C5="SHOW_PARENT",RC="SHOW_CHILD";function CO(t,e,n,i){const o=new Set(t);return e===RC?t.filter(r=>{const a=n[r];return!(a&&a.children&&a.children.some(s=>{let{node:l}=s;return o.has(l[i.value])})&&a.children.every(s=>{let{node:l}=s;return Cx(l)||o.has(l[i.value])}))}):e===C5?t.filter(r=>{const a=n[r],s=a?a.parent:null;return!(s&&!Cx(s.node)&&o.has(s.key))}):t}const Rc=()=>null;Rc.inheritAttrs=!1;Rc.displayName="ATreeSelectNode";Rc.isTreeSelectNode=!0;var Fme=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o0&&arguments[0]!==void 0?arguments[0]:[];return Kt(n).map(i=>{var o,r,a;if(!Nme(i))return null;const s=i.children||{},l=i.key,c={};for(const[S,_]of Object.entries(i.props))c[Sc(S)]=_;const{isLeaf:u,checkable:d,selectable:f,disabled:h,disableCheckbox:p}=c,g={isLeaf:u||u===""||void 0,checkable:d||d===""||void 0,selectable:f||f===""||void 0,disabled:h||h===""||void 0,disableCheckbox:p||p===""||void 0},m=A(A({},c),g),{title:v=(o=s.title)===null||o===void 0?void 0:o.call(s,m),switcherIcon:b=(r=s.switcherIcon)===null||r===void 0?void 0:r.call(s,m)}=c,y=Fme(c,["title","switcherIcon"]),w=(a=s.default)===null||a===void 0?void 0:a.call(s),x=A(A(A({},y),{title:v,switcherIcon:b,key:l,isLeaf:u}),g),$=e(w);return $.length&&(x.children=$),x})}return e(t)}function $x(t){if(!t)return t;const e=A({},t);return"props"in e||Object.defineProperty(e,"props",{get(){return e}}),e}function zme(t,e,n,i,o,r){let a=null,s=null;function l(){function c(u){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"0",f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return u.map((h,p)=>{const g=`${d}-${p}`,m=h[r.value],v=n.includes(m),b=c(h[r.children]||[],g,v),y=C(Rc,h,{default:()=>[b.map(w=>w.node)]});if(e===m&&(a=y),v){const w={pos:g,node:y,children:b};return f||s.push(w),w}return null}).filter(h=>h)}s||(s=[],c(i),s.sort((u,d)=>{let{node:{props:{value:f}}}=u,{node:{props:{value:h}}}=d;const p=n.indexOf(f),g=n.indexOf(h);return p-g}))}Object.defineProperty(t,"triggerNode",{get(){return l(),a}}),Object.defineProperty(t,"allCheckedNodes",{get(){return l(),o?s:s.map(c=>{let{node:u}=c;return u})}})}function Hme(t,e){let{id:n,pId:i,rootPId:o}=e;const r={},a=[];return t.map(l=>{const c=A({},l),u=c[n];return r[u]=c,c.key=c.key||u,c}).forEach(l=>{const c=l[i],u=r[c];u&&(u.children=u.children||[],u.children.push(l)),(c===o||!u&&o===null)&&a.push(l)}),a}function Wme(t,e,n){const i=ie();return ye([n,t,e],()=>{const o=n.value;t.value?i.value=n.value?Hme(dt(t.value),A({id:"id",pId:"pId",rootPId:null},o!==!0?o:{})):dt(t.value).slice():i.value=Bme(dt(e.value))},{immediate:!0,deep:!0}),i}const jme=t=>{const e=ie({valueLabels:new Map}),n=ie();return ye(t,()=>{n.value=dt(t.value)},{immediate:!0}),[L(()=>{const{valueLabels:o}=e.value,r=new Map,a=n.value.map(s=>{var l;const{value:c}=s,u=(l=s.label)!==null&&l!==void 0?l:o.get(c);return r.set(c,u),A(A({},s),{label:u})});return e.value.valueLabels=r,a})]},Vme=(t,e)=>{const n=ie(new Map),i=ie({});return Ke(()=>{const o=e.value,r=af(t.value,{fieldNames:o,initWrapper:a=>A(A({},a),{valueEntities:new Map}),processEntity:(a,s)=>{const l=a.node[o.value];s.valueEntities.set(l,a)}});n.value=r.valueEntities,i.value=r.keyEntities}),{valueEntities:n,keyEntities:i}},Xme=(t,e,n,i,o,r)=>{const a=ie([]),s=ie([]);return Ke(()=>{let l=t.value.map(d=>{let{value:f}=d;return f}),c=e.value.map(d=>{let{value:f}=d;return f});const u=l.filter(d=>!i.value[d]);n.value&&({checkedKeys:l,halfCheckedKeys:c}=fo(l,!0,i.value,o.value,r.value)),a.value=Array.from(new Set([...u,...l])),s.value=c}),[a,s]},Yme=(t,e,n)=>{let{treeNodeFilterProp:i,filterTreeNode:o,fieldNames:r}=n;return L(()=>{const{children:a}=r.value,s=e.value,l=i==null?void 0:i.value;if(!s||o.value===!1)return t.value;let c;if(typeof o.value=="function")c=o.value;else{const d=s.toUpperCase();c=(f,h)=>{const p=h[l];return String(p).toUpperCase().includes(d)}}function u(d){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const h=[];for(let p=0,g=d.length;pt.treeCheckable&&!t.treeCheckStrictly),s=L(()=>t.treeCheckable||t.treeCheckStrictly),l=L(()=>t.treeCheckStrictly||t.labelInValue),c=L(()=>s.value||t.multiple),u=L(()=>Eme(t.fieldNames)),[d,f]=jt("",{value:L(()=>t.searchValue!==void 0?t.searchValue:t.inputValue),postState:ge=>ge||""}),h=ge=>{var be;f(ge),(be=t.onSearch)===null||be===void 0||be.call(t,ge)},p=Wme(Ue(t,"treeData"),Ue(t,"children"),Ue(t,"treeDataSimpleMode")),{keyEntities:g,valueEntities:m}=Vme(p,u),v=ge=>{const be=[],$e=[];return ge.forEach(fe=>{m.value.has(fe)?$e.push(fe):be.push(fe)}),{missingRawValues:be,existRawValues:$e}},b=Yme(p,d,{fieldNames:u,treeNodeFilterProp:Ue(t,"treeNodeFilterProp"),filterTreeNode:Ue(t,"filterTreeNode")}),y=ge=>{if(ge){if(t.treeNodeLabelProp)return ge[t.treeNodeLabelProp];const{_title:be}=u.value;for(let $e=0;$eOme(ge).map($e=>Gme($e)?{value:$e}:$e),x=ge=>w(ge).map($e=>{let{label:fe}=$e;const{value:de,halfChecked:xe}=$e;let _e;const Oe=m.value.get(de);return Oe&&(fe=fe??y(Oe.node),_e=Oe.node.disabled),{label:fe,value:de,halfChecked:xe,disabled:_e}}),[$,S]=jt(t.defaultValue,{value:Ue(t,"value")}),_=L(()=>w($.value)),P=ie([]),O=ie([]);Ke(()=>{const ge=[],be=[];_.value.forEach($e=>{$e.halfChecked?be.push($e):ge.push($e)}),P.value=ge,O.value=be});const T=L(()=>P.value.map(ge=>ge.value)),{maxLevel:M,levelEntities:I}=Zm(g),[k,E]=Xme(P,O,a,g,M,I),R=L(()=>{const $e=CO(k.value,t.showCheckedStrategy,g.value,u.value).map(xe=>{var _e,Oe,Re;return(Re=(Oe=(_e=g.value[xe])===null||_e===void 0?void 0:_e.node)===null||Oe===void 0?void 0:Oe[u.value.value])!==null&&Re!==void 0?Re:xe}).map(xe=>{const _e=P.value.find(Oe=>Oe.value===xe);return{value:xe,label:_e==null?void 0:_e.label}}),fe=x($e),de=fe[0];return!c.value&&de&&SO(de.value)&&SO(de.label)?[]:fe.map(xe=>{var _e;return A(A({},xe),{label:(_e=xe.label)!==null&&_e!==void 0?_e:xe.value})})}),[D]=jme(R),F=(ge,be,$e)=>{const fe=x(ge);if(S(fe),t.autoClearSearchValue&&f(""),t.onChange){let de=ge;a.value&&(de=CO(ge,t.showCheckedStrategy,g.value,u.value).map(Le=>{const De=m.value.get(Le);return De?De.node[u.value.value]:Le}));const{triggerValue:xe,selected:_e}=be||{triggerValue:void 0,selected:void 0};let Oe=de;if(t.treeCheckStrictly){const ke=O.value.filter(Le=>!de.includes(Le.value));Oe=[...Oe,...ke]}const Re=x(Oe),Se={preValue:P.value,triggerValue:xe};let Ae=!0;(t.treeCheckStrictly||$e==="selection"&&!_e)&&(Ae=!1),zme(Se,xe,ge,p.value,Ae,u.value),s.value?Se.checked=_e:Se.selected=_e;const Pe=l.value?Re:Re.map(ke=>ke.value);t.onChange(c.value?Pe:Pe[0],l.value?null:Re.map(ke=>ke.label),Se)}},N=(ge,be)=>{let{selected:$e,source:fe}=be;var de,xe,_e;const Oe=dt(g.value),Re=dt(m.value),Se=Oe[ge],Ae=Se==null?void 0:Se.node,Pe=(de=Ae==null?void 0:Ae[u.value.value])!==null&&de!==void 0?de:ge;if(!c.value)F([Pe],{selected:!0,triggerValue:Pe},"option");else{let ke=$e?[...T.value,Pe]:k.value.filter(Le=>Le!==Pe);if(a.value){const{missingRawValues:Le,existRawValues:De}=v(ke),je=De.map(_t=>Re.get(_t).key);let ft;$e?{checkedKeys:ft}=fo(je,!0,Oe,M.value,I.value):{checkedKeys:ft}=fo(je,{halfCheckedKeys:E.value},Oe,M.value,I.value),ke=[...Le,...ft.map(_t=>Oe[_t].node[u.value.value])]}F(ke,{selected:$e,triggerValue:Pe},fe||"option")}$e||!c.value?(xe=t.onSelect)===null||xe===void 0||xe.call(t,Pe,$x(Ae)):(_e=t.onDeselect)===null||_e===void 0||_e.call(t,Pe,$x(Ae))},B=ge=>{if(t.onDropdownVisibleChange){const be={};Object.defineProperty(be,"documentClickClose",{get(){return!1}}),t.onDropdownVisibleChange(ge,be)}},z=(ge,be)=>{const $e=ge.map(fe=>fe.value);if(be.type==="clear"){F($e,{},"selection");return}be.values.length&&N(be.values[0].value,{selected:!1,source:"selection"})},{treeNodeFilterProp:W,loadData:j,treeLoadedKeys:U,onTreeLoad:V,treeDefaultExpandAll:q,treeExpandedKeys:Y,treeDefaultExpandedKeys:J,onTreeExpand:Q,virtual:G,listHeight:ee,listItemHeight:X,treeLine:K,treeIcon:te,showTreeIcon:ue,switcherIcon:ae,treeMotion:re,customSlots:ne,dropdownMatchSelectWidth:le,treeExpandAction:he}=uo(t);AY(Lp({checkable:s,loadData:j,treeLoadedKeys:U,onTreeLoad:V,checkedKeys:k,halfCheckedKeys:E,treeDefaultExpandAll:q,treeExpandedKeys:Y,treeDefaultExpandedKeys:J,onTreeExpand:Q,treeIcon:te,treeMotion:re,showTreeIcon:ue,switcherIcon:ae,treeLine:K,treeNodeFilterProp:W,keyEntities:g,customSlots:ne})),Ime(Lp({virtual:G,listHeight:ee,listItemHeight:X,treeData:b,fieldNames:u,onSelect:N,dropdownMatchSelectWidth:le,treeExpandAction:he}));const pe=se();return i({focus(){var ge;(ge=pe.value)===null||ge===void 0||ge.focus()},blur(){var ge;(ge=pe.value)===null||ge===void 0||ge.blur()},scrollTo(ge){var be;(be=pe.value)===null||be===void 0||be.scrollTo(ge)}}),()=>{var ge;const be=ht(t,["id","prefixCls","customSlots","value","defaultValue","onChange","onSelect","onDeselect","searchValue","inputValue","onSearch","autoClearSearchValue","filterTreeNode","treeNodeFilterProp","showCheckedStrategy","treeNodeLabelProp","multiple","treeCheckable","treeCheckStrictly","labelInValue","fieldNames","treeDataSimpleMode","treeData","children","loadData","treeLoadedKeys","onTreeLoad","treeDefaultExpandAll","treeExpandedKeys","treeDefaultExpandedKeys","onTreeExpand","virtual","listHeight","listItemHeight","onDropdownVisibleChange","treeLine","treeIcon","showTreeIcon","switcherIcon","treeMotion"]);return C(S1,H(H(H({ref:pe},n),be),{},{id:r,prefixCls:t.prefixCls,mode:c.value?"multiple":void 0,displayValues:D.value,onDisplayValuesChange:z,searchValue:d.value,onSearch:h,OptionList:Rme,emptyOptions:!p.value.length,onDropdownVisibleChange:B,tagRender:t.tagRender||o.tagRender,dropdownMatchSelectWidth:(ge=t.dropdownMatchSelectWidth)!==null&&ge!==void 0?ge:!0}),o)}}}),Ume=t=>{const{componentCls:e,treePrefixCls:n,colorBgElevated:i}=t,o=`.${n}`;return[{[`${e}-dropdown`]:[{padding:`${t.paddingXS}px ${t.paddingXS/2}px`},f5(n,Ve(t,{colorBgContainer:i})),{[o]:{borderRadius:0,"&-list-holder-inner":{alignItems:"stretch",[`${o}-treenode`]:{[`${o}-node-content-wrapper`]:{flex:"auto"}}}}},tv(`${n}-checkbox`,t),{"&-rtl":{direction:"rtl",[`${o}-switcher${o}-switcher_close`]:{[`${o}-switcher-icon svg`]:{transform:"rotate(90deg)"}}}}]}]};function qme(t,e){return et("TreeSelect",n=>{const i=Ve(n,{treePrefixCls:e.value});return[Ume(i)]})(t)}const $O=(t,e,n)=>n!==void 0?n:`${t}-${e}`;function Zme(){return A(A({},ht($5(),["showTreeIcon","treeMotion","inputIcon","getInputElement","treeLine","customSlots"])),{suffixIcon:Z.any,size:Ne(),bordered:Ce(),treeLine:Xe([Boolean,Object]),replaceFields:Fe(),placement:Ne(),status:Ne(),popupClassName:String,dropdownClassName:String,"onUpdate:value":ve(),"onUpdate:treeExpandedKeys":ve(),"onUpdate:searchValue":ve()})}const n0=oe({compatConfig:{MODE:3},name:"ATreeSelect",inheritAttrs:!1,props:ct(Zme(),{choiceTransitionName:"",listHeight:256,treeIcon:!1,listItemHeight:26,bordered:!0}),slots:Object,setup(t,e){let{attrs:n,slots:i,expose:o,emit:r}=e;t.treeData===void 0&&i.default,Nt(t.multiple!==!1||!t.treeCheckable,"TreeSelect","`multiple` will always be `true` when `treeCheckable` is true"),Nt(t.replaceFields===void 0,"TreeSelect","`replaceFields` is deprecated, please use fieldNames instead"),Nt(!t.dropdownClassName,"TreeSelect","`dropdownClassName` is deprecated. Please use `popupClassName` instead.");const a=vn(),s=Mn.useInject(),l=L(()=>zo(s.status,t.status)),{prefixCls:c,renderEmpty:u,direction:d,virtual:f,dropdownMatchSelectWidth:h,size:p,getPopupContainer:g,getPrefixCls:m,disabled:v}=Me("select",t),{compactSize:b,compactItemClassnames:y}=Ra(c,d),w=L(()=>b.value||p.value),x=Oi(),$=L(()=>{var U;return(U=v.value)!==null&&U!==void 0?U:x.value}),S=L(()=>m()),_=L(()=>t.placement!==void 0?t.placement:d.value==="rtl"?"bottomRight":"bottomLeft"),P=L(()=>$O(S.value,b1(_.value),t.transitionName)),O=L(()=>$O(S.value,"",t.choiceTransitionName)),T=L(()=>m("select-tree",t.prefixCls)),M=L(()=>m("tree-select",t.prefixCls)),[I,k]=X1(c),[E]=qme(M,T),R=L(()=>ce(t.popupClassName||t.dropdownClassName,`${M.value}-dropdown`,{[`${M.value}-dropdown-rtl`]:d.value==="rtl"},k.value)),D=L(()=>!!(t.treeCheckable||t.multiple)),F=L(()=>t.showArrow!==void 0?t.showArrow:t.loading||!D.value),N=se();o({focus(){var U,V;(V=(U=N.value).focus)===null||V===void 0||V.call(U)},blur(){var U,V;(V=(U=N.value).blur)===null||V===void 0||V.call(U)}});const B=function(){for(var U=arguments.length,V=new Array(U),q=0;q{r("update:treeExpandedKeys",U),r("treeExpand",U)},W=U=>{r("update:searchValue",U),r("search",U)},j=U=>{r("blur",U),a.onFieldBlur()};return()=>{var U,V,q;const{notFoundContent:Y=(U=i.notFoundContent)===null||U===void 0?void 0:U.call(i),prefixCls:J,bordered:Q,listHeight:G,listItemHeight:ee,multiple:X,treeIcon:K,treeLine:te,showArrow:ue,switcherIcon:ae=(V=i.switcherIcon)===null||V===void 0?void 0:V.call(i),fieldNames:re=t.replaceFields,id:ne=a.id.value,placeholder:le=(q=i.placeholder)===null||q===void 0?void 0:q.call(i)}=t,{isFormItemInput:he,hasFeedback:pe,feedbackIcon:ge}=s,{suffixIcon:be,removeIcon:$e,clearIcon:fe}=O1(A(A({},t),{multiple:D.value,showArrow:F.value,hasFeedback:pe,feedbackIcon:ge,prefixCls:c.value}),i);let de;Y!==void 0?de=Y:de=u("Select");const xe=ht(t,["suffixIcon","itemIcon","removeIcon","clearIcon","switcherIcon","bordered","status","onUpdate:value","onUpdate:treeExpandedKeys","onUpdate:searchValue"]),_e=ce(!J&&M.value,{[`${c.value}-lg`]:w.value==="large",[`${c.value}-sm`]:w.value==="small",[`${c.value}-rtl`]:d.value==="rtl",[`${c.value}-borderless`]:!Q,[`${c.value}-in-form-item`]:he},ei(c.value,l.value,pe),y.value,n.class,k.value),Oe={};return t.treeData===void 0&&i.default&&(Oe.children=Dt(i.default())),I(E(C(Kme,H(H(H(H({},n),xe),{},{disabled:$.value,virtual:f.value,dropdownMatchSelectWidth:h.value,id:ne,fieldNames:re,ref:N,prefixCls:c.value,class:_e,listHeight:G,listItemHeight:ee,treeLine:!!te,inputIcon:be,multiple:X,removeIcon:$e,clearIcon:fe,switcherIcon:Re=>d5(T.value,ae,Re,i.leafIcon,te),showTreeIcon:K,notFoundContent:de,getPopupContainer:g==null?void 0:g.value,treeMotion:null,dropdownClassName:R.value,choiceTransitionName:O.value,onChange:B,onBlur:j,onSearch:W,onTreeExpand:z},Oe),{},{transitionName:P.value,customSlots:A(A({},i),{treeCheckable:()=>C("span",{class:`${c.value}-tree-checkbox-inner`},null)}),maxTagPlaceholder:t.maxTagPlaceholder||i.maxTagPlaceholder,placement:_.value,showArrow:pe||ue,placeholder:le}),A(A({},i),{treeCheckable:()=>C("span",{class:`${c.value}-tree-checkbox-inner`},null)}))))}}}),Ax=Rc,Jme=A(n0,{TreeNode:Rc,SHOW_ALL:Lme,SHOW_PARENT:C5,SHOW_CHILD:RC,install:t=>(t.component(n0.name,n0),t.component(Ax.displayName,Ax),t)}),i0=()=>({format:String,showNow:Ce(),showHour:Ce(),showMinute:Ce(),showSecond:Ce(),use12Hours:Ce(),hourStep:Number,minuteStep:Number,secondStep:Number,hideDisabledOptions:Ce(),popupClassName:String,status:Ne()});function Qme(t){const e=HL(t,A(A({},i0()),{order:{type:Boolean,default:!0}})),{TimePicker:n,RangePicker:i}=e,o=oe({name:"ATimePicker",inheritAttrs:!1,props:A(A(A(A({},dg()),NL()),i0()),{addon:{type:Function}}),slots:Object,setup(a,s){let{slots:l,expose:c,emit:u,attrs:d}=s;const f=a,h=vn();Nt(!(l.addon||f.addon),"TimePicker","`addon` is deprecated. Please use `v-slot:renderExtraFooter` instead.");const p=se();c({focus:()=>{var w;(w=p.value)===null||w===void 0||w.focus()},blur:()=>{var w;(w=p.value)===null||w===void 0||w.blur()}});const g=(w,x)=>{u("update:value",w),u("change",w,x),h.onFieldChange()},m=w=>{u("update:open",w),u("openChange",w)},v=w=>{u("focus",w)},b=w=>{u("blur",w),h.onFieldBlur()},y=w=>{u("ok",w)};return()=>{const{id:w=h.id.value}=f;return C(n,H(H(H({},d),ht(f,["onUpdate:value","onUpdate:open"])),{},{id:w,dropdownClassName:f.popupClassName,mode:void 0,ref:p,renderExtraFooter:f.addon||l.addon||f.renderExtraFooter||l.renderExtraFooter,onChange:g,onOpenChange:m,onFocus:v,onBlur:b,onOk:y}),l)}}}),r=oe({name:"ATimeRangePicker",inheritAttrs:!1,props:A(A(A(A({},dg()),BL()),i0()),{order:{type:Boolean,default:!0}}),slots:Object,setup(a,s){let{slots:l,expose:c,emit:u,attrs:d}=s;const f=a,h=se(),p=vn();c({focus:()=>{var $;($=h.value)===null||$===void 0||$.focus()},blur:()=>{var $;($=h.value)===null||$===void 0||$.blur()}});const g=($,S)=>{u("update:value",$),u("change",$,S),p.onFieldChange()},m=$=>{u("update:open",$),u("openChange",$)},v=$=>{u("focus",$)},b=$=>{u("blur",$),p.onFieldBlur()},y=($,S)=>{u("panelChange",$,S)},w=$=>{u("ok",$)},x=($,S,_)=>{u("calendarChange",$,S,_)};return()=>{const{id:$=p.id.value}=f;return C(i,H(H(H({},d),ht(f,["onUpdate:open","onUpdate:value"])),{},{id:$,dropdownClassName:f.popupClassName,picker:"time",mode:void 0,ref:h,onChange:g,onOpenChange:m,onFocus:v,onBlur:b,onPanelChange:y,onOk:w,onCalendarChange:x}),l)}}});return{TimePicker:o,TimeRangePicker:r}}const{TimePicker:th,TimeRangePicker:Jh}=Qme(rS),eve=A(th,{TimePicker:th,TimeRangePicker:Jh,install:t=>(t.component(th.name,th),t.component(Jh.name,Jh),t)}),tve=()=>({prefixCls:String,color:String,dot:Z.any,pending:Ce(),position:Z.oneOf(Wn("left","right","")).def(""),label:Z.any}),Od=oe({compatConfig:{MODE:3},name:"ATimelineItem",props:ct(tve(),{color:"blue",pending:!1}),slots:Object,setup(t,e){let{slots:n}=e;const{prefixCls:i}=Me("timeline",t),o=L(()=>({[`${i.value}-item`]:!0,[`${i.value}-item-pending`]:t.pending})),r=L(()=>/blue|red|green|gray/.test(t.color||"")?void 0:t.color||"blue"),a=L(()=>({[`${i.value}-item-head`]:!0,[`${i.value}-item-head-${t.color||"blue"}`]:!r.value}));return()=>{var s,l,c;const{label:u=(s=n.label)===null||s===void 0?void 0:s.call(n),dot:d=(l=n.dot)===null||l===void 0?void 0:l.call(n)}=t;return C("li",{class:o.value},[u&&C("div",{class:`${i.value}-item-label`},[u]),C("div",{class:`${i.value}-item-tail`},null),C("div",{class:[a.value,!!d&&`${i.value}-item-head-custom`],style:{borderColor:r.value,color:r.value}},[d]),C("div",{class:`${i.value}-item-content`},[(c=n.default)===null||c===void 0?void 0:c.call(n)])])}}}),nve=t=>{const{componentCls:e}=t;return{[e]:A(A({},rt(t)),{margin:0,padding:0,listStyle:"none",[`${e}-item`]:{position:"relative",margin:0,paddingBottom:t.timeLineItemPaddingBottom,fontSize:t.fontSize,listStyle:"none","&-tail":{position:"absolute",insetBlockStart:t.timeLineItemHeadSize,insetInlineStart:(t.timeLineItemHeadSize-t.timeLineItemTailWidth)/2,height:`calc(100% - ${t.timeLineItemHeadSize}px)`,borderInlineStart:`${t.timeLineItemTailWidth}px ${t.lineType} ${t.colorSplit}`},"&-pending":{[`${e}-item-head`]:{fontSize:t.fontSizeSM,backgroundColor:"transparent"},[`${e}-item-tail`]:{display:"none"}},"&-head":{position:"absolute",width:t.timeLineItemHeadSize,height:t.timeLineItemHeadSize,backgroundColor:t.colorBgContainer,border:`${t.timeLineHeadBorderWidth}px ${t.lineType} transparent`,borderRadius:"50%","&-blue":{color:t.colorPrimary,borderColor:t.colorPrimary},"&-red":{color:t.colorError,borderColor:t.colorError},"&-green":{color:t.colorSuccess,borderColor:t.colorSuccess},"&-gray":{color:t.colorTextDisabled,borderColor:t.colorTextDisabled}},"&-head-custom":{position:"absolute",insetBlockStart:t.timeLineItemHeadSize/2,insetInlineStart:t.timeLineItemHeadSize/2,width:"auto",height:"auto",marginBlockStart:0,paddingBlock:t.timeLineItemCustomHeadPaddingVertical,lineHeight:1,textAlign:"center",border:0,borderRadius:0,transform:"translate(-50%, -50%)"},"&-content":{position:"relative",insetBlockStart:-(t.fontSize*t.lineHeight-t.fontSize)+t.lineWidth,marginInlineStart:t.margin+t.timeLineItemHeadSize,marginInlineEnd:0,marginBlockStart:0,marginBlockEnd:0,wordBreak:"break-word"},"&-last":{[`> ${e}-item-tail`]:{display:"none"},[`> ${e}-item-content`]:{minHeight:t.controlHeightLG*1.2}}},[`&${e}-alternate, &${e}-right, &${e}-label`]:{[`${e}-item`]:{"&-tail, &-head, &-head-custom":{insetInlineStart:"50%"},"&-head":{marginInlineStart:`-${t.marginXXS}px`,"&-custom":{marginInlineStart:t.timeLineItemTailWidth/2}},"&-left":{[`${e}-item-content`]:{insetInlineStart:`calc(50% - ${t.marginXXS}px)`,width:`calc(50% - ${t.marginSM}px)`,textAlign:"start"}},"&-right":{[`${e}-item-content`]:{width:`calc(50% - ${t.marginSM}px)`,margin:0,textAlign:"end"}}}},[`&${e}-right`]:{[`${e}-item-right`]:{[`${e}-item-tail, ${e}-item-head, @@ -470,12 +470,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho ${e}-item-last ${e}-item-tail`]:{display:"block",height:`calc(100% - ${t.margin}px)`,borderInlineStart:`${t.timeLineItemTailWidth}px dotted ${t.colorSplit}`},[`&${e}-reverse ${e}-item-last - ${e}-item-tail`]:{display:"none"},[`&${e}-reverse ${e}-item-pending`]:{[`${e}-item-tail`]:{insetBlockStart:t.margin,display:"block",height:`calc(100% - ${t.margin}px)`,borderInlineStart:`${t.timeLineItemTailWidth}px dotted ${t.colorSplit}`},[`${e}-item-content`]:{minHeight:t.controlHeightLG*1.2}},[`&${e}-label`]:{[`${e}-item-label`]:{position:"absolute",insetBlockStart:-(t.fontSize*t.lineHeight-t.fontSize)+t.timeLineItemTailWidth,width:`calc(50% - ${t.marginSM}px)`,textAlign:"end"},[`${e}-item-right`]:{[`${e}-item-label`]:{insetInlineStart:`calc(50% + ${t.marginSM}px)`,width:`calc(50% - ${t.marginSM}px)`,textAlign:"start"}}},"&-rtl":{direction:"rtl",[`${e}-item-head-custom`]:{transform:"translate(50%, -50%)"}}})}},ive=et("Timeline",t=>{const e=Ve(t,{timeLineItemPaddingBottom:t.padding*1.25,timeLineItemHeadSize:10,timeLineItemCustomHeadPaddingVertical:t.paddingXXS,timeLinePaddingInlineEnd:2,timeLineItemTailWidth:t.lineWidthBold,timeLineHeadBorderWidth:t.wireframe?t.lineWidthBold:t.lineWidth*3});return[nve(e)]}),ove=()=>({prefixCls:String,pending:Z.any,pendingDot:Z.any,reverse:Ce(),mode:Z.oneOf(Wn("left","alternate","right",""))}),Vu=oe({compatConfig:{MODE:3},name:"ATimeline",inheritAttrs:!1,props:ct(ove(),{reverse:!1,mode:""}),slots:Object,setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,direction:r}=Me("timeline",t),[a,s]=ive(o),l=(c,u)=>{const d=c.props||{};return t.mode==="alternate"?d.position==="right"?`${o.value}-item-right`:d.position==="left"?`${o.value}-item-left`:u%2===0?`${o.value}-item-left`:`${o.value}-item-right`:t.mode==="left"?`${o.value}-item-left`:t.mode==="right"?`${o.value}-item-right`:d.position==="right"?`${o.value}-item-right`:""};return()=>{var c,u,d;const{pending:f=(c=n.pending)===null||c===void 0?void 0:c.call(n),pendingDot:h=(u=n.pendingDot)===null||u===void 0?void 0:u.call(n),reverse:p,mode:g}=t,m=typeof f=="boolean"?null:f,v=Kt((d=n.default)===null||d===void 0?void 0:d.call(n)),b=f?C(Td,{pending:!!f,dot:h||C(yi,null,null)},{default:()=>[m]}):null;b&&v.push(b);const y=p?v.reverse():v,w=y.length,x=`${o.value}-item-last`,$=y.map((P,O)=>{const T=O===w-2?x:"",M=O===w-1?x:"";return On(P,{class:ce([!p&&f?T:M,l(P,O)])})}),S=y.some(P=>{var O,T;return!!(!((O=P.props)===null||O===void 0)&&O.label||!((T=P.children)===null||T===void 0)&&T.label)}),_=ce(o.value,{[`${o.value}-pending`]:!!f,[`${o.value}-reverse`]:!!p,[`${o.value}-${g}`]:!!g&&!S,[`${o.value}-label`]:S,[`${o.value}-rtl`]:r.value==="rtl"},i.class,s.value);return a(C("ul",H(H({},i),{},{class:_}),[$]))}}});Vu.Item=Td;Vu.install=function(t){return t.component(Vu.name,Vu),t.component(Td.name,Td),t};var rve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"};function AO(t){for(var e=1;e{const{sizeMarginHeadingVerticalEnd:o,fontWeightStrong:r}=i;return{marginBottom:o,color:n,fontWeight:r,fontSize:t,lineHeight:e}},lve=t=>{const e=[1,2,3,4,5],n={};return e.forEach(i=>{n[` + ${e}-item-tail`]:{display:"none"},[`&${e}-reverse ${e}-item-pending`]:{[`${e}-item-tail`]:{insetBlockStart:t.margin,display:"block",height:`calc(100% - ${t.margin}px)`,borderInlineStart:`${t.timeLineItemTailWidth}px dotted ${t.colorSplit}`},[`${e}-item-content`]:{minHeight:t.controlHeightLG*1.2}},[`&${e}-label`]:{[`${e}-item-label`]:{position:"absolute",insetBlockStart:-(t.fontSize*t.lineHeight-t.fontSize)+t.timeLineItemTailWidth,width:`calc(50% - ${t.marginSM}px)`,textAlign:"end"},[`${e}-item-right`]:{[`${e}-item-label`]:{insetInlineStart:`calc(50% + ${t.marginSM}px)`,width:`calc(50% - ${t.marginSM}px)`,textAlign:"start"}}},"&-rtl":{direction:"rtl",[`${e}-item-head-custom`]:{transform:"translate(50%, -50%)"}}})}},ive=et("Timeline",t=>{const e=Ve(t,{timeLineItemPaddingBottom:t.padding*1.25,timeLineItemHeadSize:10,timeLineItemCustomHeadPaddingVertical:t.paddingXXS,timeLinePaddingInlineEnd:2,timeLineItemTailWidth:t.lineWidthBold,timeLineHeadBorderWidth:t.wireframe?t.lineWidthBold:t.lineWidth*3});return[nve(e)]}),ove=()=>({prefixCls:String,pending:Z.any,pendingDot:Z.any,reverse:Ce(),mode:Z.oneOf(Wn("left","alternate","right",""))}),Xu=oe({compatConfig:{MODE:3},name:"ATimeline",inheritAttrs:!1,props:ct(ove(),{reverse:!1,mode:""}),slots:Object,setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,direction:r}=Me("timeline",t),[a,s]=ive(o),l=(c,u)=>{const d=c.props||{};return t.mode==="alternate"?d.position==="right"?`${o.value}-item-right`:d.position==="left"?`${o.value}-item-left`:u%2===0?`${o.value}-item-left`:`${o.value}-item-right`:t.mode==="left"?`${o.value}-item-left`:t.mode==="right"?`${o.value}-item-right`:d.position==="right"?`${o.value}-item-right`:""};return()=>{var c,u,d;const{pending:f=(c=n.pending)===null||c===void 0?void 0:c.call(n),pendingDot:h=(u=n.pendingDot)===null||u===void 0?void 0:u.call(n),reverse:p,mode:g}=t,m=typeof f=="boolean"?null:f,v=Kt((d=n.default)===null||d===void 0?void 0:d.call(n)),b=f?C(Od,{pending:!!f,dot:h||C(yi,null,null)},{default:()=>[m]}):null;b&&v.push(b);const y=p?v.reverse():v,w=y.length,x=`${o.value}-item-last`,$=y.map((P,O)=>{const T=O===w-2?x:"",M=O===w-1?x:"";return On(P,{class:ce([!p&&f?T:M,l(P,O)])})}),S=y.some(P=>{var O,T;return!!(!((O=P.props)===null||O===void 0)&&O.label||!((T=P.children)===null||T===void 0)&&T.label)}),_=ce(o.value,{[`${o.value}-pending`]:!!f,[`${o.value}-reverse`]:!!p,[`${o.value}-${g}`]:!!g&&!S,[`${o.value}-label`]:S,[`${o.value}-rtl`]:r.value==="rtl"},i.class,s.value);return a(C("ul",H(H({},i),{},{class:_}),[$]))}}});Xu.Item=Od;Xu.install=function(t){return t.component(Xu.name,Xu),t.component(Od.name,Od),t};var rve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 170h-60c-4.4 0-8 3.6-8 8v518H310v-73c0-6.7-7.8-10.5-13-6.3l-141.9 112a8 8 0 000 12.6l141.9 112c5.3 4.2 13 .4 13-6.3v-75h498c35.3 0 64-28.7 64-64V178c0-4.4-3.6-8-8-8z"}}]},name:"enter",theme:"outlined"};function AO(t){for(var e=1;e{const{sizeMarginHeadingVerticalEnd:o,fontWeightStrong:r}=i;return{marginBottom:o,color:n,fontWeight:r,fontSize:t,lineHeight:e}},lve=t=>{const e=[1,2,3,4,5],n={};return e.forEach(i=>{n[` h${i}&, div&-h${i}, div&-h${i} > textarea, h${i} - `]=sve(t[`fontSizeHeading${i}`],t[`lineHeightHeading${i}`],t.colorTextHeading,t)}),n},cve=t=>{const{componentCls:e}=t;return{"a&, a":A(A({},dm(t)),{textDecoration:t.linkDecoration,"&:active, &:hover":{textDecoration:t.linkHoverDecoration},[`&[disabled], &${e}-disabled`]:{color:t.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:t.colorTextDisabled},"&:active":{pointerEvents:"none"}}})}},uve=()=>({code:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.2em 0.1em",fontSize:"85%",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3},kbd:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.15em 0.1em",fontSize:"90%",background:"rgba(150, 150, 150, 0.06)",border:"1px solid rgba(100, 100, 100, 0.2)",borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:A9[2]},"u, ins":{textDecoration:"underline",textDecorationSkipInk:"auto"},"s, del":{textDecoration:"line-through"},strong:{fontWeight:600},"ul, ol":{marginInline:0,marginBlock:"0 1em",padding:0,li:{marginInline:"20px 0",marginBlock:0,paddingInline:"4px 0",paddingBlock:0}},ul:{listStyleType:"circle",ul:{listStyleType:"disc"}},ol:{listStyleType:"decimal"},"pre, blockquote":{margin:"1em 0"},pre:{padding:"0.4em 0.6em",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3,code:{display:"inline",margin:0,padding:0,fontSize:"inherit",fontFamily:"inherit",background:"transparent",border:0}},blockquote:{paddingInline:"0.6em 0",paddingBlock:0,borderInlineStart:"4px solid rgba(100, 100, 100, 0.2)",opacity:.85}}),dve=t=>{const{componentCls:e}=t,i=al(t).inputPaddingVertical+1;return{"&-edit-content":{position:"relative","div&":{insetInlineStart:-t.paddingSM,marginTop:-i,marginBottom:`calc(1em - ${i}px)`},[`${e}-edit-content-confirm`]:{position:"absolute",insetInlineEnd:t.marginXS+2,insetBlockEnd:t.marginXS,color:t.colorTextDescription,fontWeight:"normal",fontSize:t.fontSize,fontStyle:"normal",pointerEvents:"none"},textarea:{margin:"0!important",MozTransition:"none",height:"1em"}}}},fve=t=>({"&-copy-success":{"\n &,\n &:hover,\n &:focus":{color:t.colorSuccess}}}),hve=()=>({"\n a&-ellipsis,\n span&-ellipsis\n ":{display:"inline-block",maxWidth:"100%"},"&-single-line":{whiteSpace:"nowrap"},"&-ellipsis-single-line":{overflow:"hidden",textOverflow:"ellipsis","a&, span&":{verticalAlign:"bottom"}},"&-ellipsis-multiple-line":{display:"-webkit-box",overflow:"hidden",WebkitLineClamp:3,WebkitBoxOrient:"vertical"}}),pve=t=>{const{componentCls:e,sizeMarginHeadingVerticalStart:n}=t;return{[e]:A(A(A(A(A(A(A(A(A({color:t.colorText,wordBreak:"break-word",lineHeight:t.lineHeight,[`&${e}-secondary`]:{color:t.colorTextDescription},[`&${e}-success`]:{color:t.colorSuccess},[`&${e}-warning`]:{color:t.colorWarning},[`&${e}-danger`]:{color:t.colorError,"a&:active, a&:focus":{color:t.colorErrorActive},"a&:hover":{color:t.colorErrorHover}},[`&${e}-disabled`]:{color:t.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},"\n div&,\n p\n ":{marginBottom:"1em"}},lve(t)),{[` + `]=sve(t[`fontSizeHeading${i}`],t[`lineHeightHeading${i}`],t.colorTextHeading,t)}),n},cve=t=>{const{componentCls:e}=t;return{"a&, a":A(A({},fm(t)),{textDecoration:t.linkDecoration,"&:active, &:hover":{textDecoration:t.linkHoverDecoration},[`&[disabled], &${e}-disabled`]:{color:t.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:t.colorTextDisabled},"&:active":{pointerEvents:"none"}}})}},uve=()=>({code:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.2em 0.1em",fontSize:"85%",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3},kbd:{margin:"0 0.2em",paddingInline:"0.4em",paddingBlock:"0.15em 0.1em",fontSize:"90%",background:"rgba(150, 150, 150, 0.06)",border:"1px solid rgba(100, 100, 100, 0.2)",borderBottomWidth:2,borderRadius:3},mark:{padding:0,backgroundColor:A9[2]},"u, ins":{textDecoration:"underline",textDecorationSkipInk:"auto"},"s, del":{textDecoration:"line-through"},strong:{fontWeight:600},"ul, ol":{marginInline:0,marginBlock:"0 1em",padding:0,li:{marginInline:"20px 0",marginBlock:0,paddingInline:"4px 0",paddingBlock:0}},ul:{listStyleType:"circle",ul:{listStyleType:"disc"}},ol:{listStyleType:"decimal"},"pre, blockquote":{margin:"1em 0"},pre:{padding:"0.4em 0.6em",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"rgba(150, 150, 150, 0.1)",border:"1px solid rgba(100, 100, 100, 0.2)",borderRadius:3,code:{display:"inline",margin:0,padding:0,fontSize:"inherit",fontFamily:"inherit",background:"transparent",border:0}},blockquote:{paddingInline:"0.6em 0",paddingBlock:0,borderInlineStart:"4px solid rgba(100, 100, 100, 0.2)",opacity:.85}}),dve=t=>{const{componentCls:e}=t,i=al(t).inputPaddingVertical+1;return{"&-edit-content":{position:"relative","div&":{insetInlineStart:-t.paddingSM,marginTop:-i,marginBottom:`calc(1em - ${i}px)`},[`${e}-edit-content-confirm`]:{position:"absolute",insetInlineEnd:t.marginXS+2,insetBlockEnd:t.marginXS,color:t.colorTextDescription,fontWeight:"normal",fontSize:t.fontSize,fontStyle:"normal",pointerEvents:"none"},textarea:{margin:"0!important",MozTransition:"none",height:"1em"}}}},fve=t=>({"&-copy-success":{"\n &,\n &:hover,\n &:focus":{color:t.colorSuccess}}}),hve=()=>({"\n a&-ellipsis,\n span&-ellipsis\n ":{display:"inline-block",maxWidth:"100%"},"&-single-line":{whiteSpace:"nowrap"},"&-ellipsis-single-line":{overflow:"hidden",textOverflow:"ellipsis","a&, span&":{verticalAlign:"bottom"}},"&-ellipsis-multiple-line":{display:"-webkit-box",overflow:"hidden",WebkitLineClamp:3,WebkitBoxOrient:"vertical"}}),pve=t=>{const{componentCls:e,sizeMarginHeadingVerticalStart:n}=t;return{[e]:A(A(A(A(A(A(A(A(A({color:t.colorText,wordBreak:"break-word",lineHeight:t.lineHeight,[`&${e}-secondary`]:{color:t.colorTextDescription},[`&${e}-success`]:{color:t.colorSuccess},[`&${e}-warning`]:{color:t.colorWarning},[`&${e}-danger`]:{color:t.colorError,"a&:active, a&:focus":{color:t.colorErrorActive},"a&:hover":{color:t.colorErrorHover}},[`&${e}-disabled`]:{color:t.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},"\n div&,\n p\n ":{marginBottom:"1em"}},lve(t)),{[` & + h1${e}, & + h2${e}, & + h3${e}, @@ -485,26 +485,26 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho ${e}-expand, ${e}-edit, ${e}-copy - `]:A(A({},dm(t)),{marginInlineStart:t.marginXXS})}),dve(t)),fve(t)),hve()),{"&-rtl":{direction:"rtl"}})}},A5=et("Typography",t=>[pve(t)],{sizeMarginHeadingVerticalStart:"1.2em",sizeMarginHeadingVerticalEnd:"0.5em"}),gve=()=>({prefixCls:String,value:String,maxlength:Number,autoSize:{type:[Boolean,Object]},onSave:Function,onCancel:Function,onEnd:Function,onChange:Function,originContent:String,direction:String,component:String}),mve=oe({compatConfig:{MODE:3},name:"Editable",inheritAttrs:!1,props:gve(),setup(t,e){let{emit:n,slots:i,attrs:o}=e;const{prefixCls:r}=uo(t),a=$t({current:t.value||"",lastKeyCode:void 0,inComposition:!1,cancelFlag:!1});ye(()=>t.value,b=>{a.current=b});const s=se();Ze(()=>{var b;if(s.value){const y=(b=s.value)===null||b===void 0?void 0:b.resizableTextArea,w=y==null?void 0:y.textArea;w.focus();const{length:x}=w.value;w.setSelectionRange(x,x)}});function l(b){s.value=b}function c(b){let{target:{value:y}}=b;a.current=y.replace(/[\r\n]/g,""),n("change",a.current)}function u(){a.inComposition=!0}function d(){a.inComposition=!1}function f(b){const{keyCode:y}=b;y===Te.ENTER&&b.preventDefault(),!a.inComposition&&(a.lastKeyCode=y)}function h(b){const{keyCode:y,ctrlKey:w,altKey:x,metaKey:$,shiftKey:S}=b;a.lastKeyCode===y&&!a.inComposition&&!w&&!x&&!$&&!S&&(y===Te.ENTER?(g(),n("end")):y===Te.ESC&&(a.current=t.originContent,n("cancel")))}function p(){g()}function g(){n("save",a.current.trim())}const[m,v]=A5(r);return()=>{const b=ce({[`${r.value}`]:!0,[`${r.value}-edit-content`]:!0,[`${r.value}-rtl`]:t.direction==="rtl",[t.component?`${r.value}-${t.component}`:""]:!0},o.class,v.value);return m(C("div",H(H({},o),{},{class:b}),[C(tC,{ref:l,maxlength:t.maxlength,value:a.current,onChange:c,onKeydown:f,onKeyup:h,onCompositionstart:u,onCompositionend:d,onBlur:p,rows:1,autoSize:t.autoSize===void 0||t.autoSize},null),i.enterIcon?i.enterIcon({className:`${t.prefixCls}-edit-content-confirm`}):C(LC,{class:`${t.prefixCls}-edit-content-confirm`},null)]))}}}),vve=3,bve=8;let Ai;const o0={padding:0,margin:0,display:"inline",lineHeight:"inherit"};function _5(t,e){t.setAttribute("aria-hidden","true");const n=window.getComputedStyle(e),i=dY(n);t.setAttribute("style",i),t.style.position="fixed",t.style.left="0",t.style.height="auto",t.style.minHeight="auto",t.style.maxHeight="auto",t.style.paddingTop="0",t.style.paddingBottom="0",t.style.borderTopWidth="0",t.style.borderBottomWidth="0",t.style.top="-999999px",t.style.zIndex="-1000",t.style.textOverflow="clip",t.style.whiteSpace="normal",t.style.webkitLineClamp="none"}function yve(t){const e=document.createElement("div");_5(e,t),e.appendChild(document.createTextNode("text")),document.body.appendChild(e);const n=e.getBoundingClientRect().height;return document.body.removeChild(e),n}const xve=(t,e,n,i,o)=>{Ai||(Ai=document.createElement("div"),Ai.setAttribute("aria-hidden","true"),document.body.appendChild(Ai));const{rows:r,suffix:a=""}=e,s=yve(t),l=Math.round(s*r*100)/100;_5(Ai,t);const c=Pk({render(){return C("div",{style:o0},[C("span",{style:o0},[n,a]),C("span",{style:o0},[i])])}});c.mount(Ai);function u(){return Math.round(Ai.getBoundingClientRect().height*100)/100-.1<=l}if(u())return c.unmount(),{content:n,text:Ai.innerHTML,ellipsis:!1};const d=Array.prototype.slice.apply(Ai.childNodes[0].childNodes[0].cloneNode(!0).childNodes).filter(y=>{let{nodeType:w,data:x}=y;return w!==bve&&x!==""}),f=Array.prototype.slice.apply(Ai.childNodes[0].childNodes[1].cloneNode(!0).childNodes);c.unmount();const h=[];Ai.innerHTML="";const p=document.createElement("span");Ai.appendChild(p);const g=document.createTextNode(o+a);p.appendChild(g),f.forEach(y=>{Ai.appendChild(y)});function m(y){p.insertBefore(y,g)}function v(y,w){let x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,$=arguments.length>3&&arguments[3]!==void 0?arguments[3]:w.length,S=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;const _=Math.floor((x+$)/2),P=w.slice(0,_);if(y.textContent=P,x>=$-1)for(let O=$;O>=x;O-=1){const T=w.slice(0,O);if(y.textContent=T,u()||!T)return O===w.length?{finished:!1,vNode:w}:{finished:!0,vNode:T}}return u()?v(y,w,_,$,_):v(y,w,x,_,S)}function b(y){if(y.nodeType===vve){const x=y.textContent||"",$=document.createTextNode(x);return m($),v($,x)}return{finished:!1,vNode:null}}return d.some(y=>{const{finished:w,vNode:x}=b(y);return x&&h.push(x),w}),{content:h,text:Ai.innerHTML,ellipsis:!0}};var wve=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o({prefixCls:String,direction:String,component:String}),_i=oe({name:"ATypography",inheritAttrs:!1,props:Sve(),setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,direction:r}=Me("typography",t),[a,s]=A5(o);return()=>{var l;const c=A(A({},t),i),{prefixCls:u,direction:d,component:f="article"}=c,h=wve(c,["prefixCls","direction","component"]);return a(C(f,H(H({},h),{},{class:ce(o.value,{[`${o.value}-rtl`]:r.value==="rtl"},i.class,s.value)}),{default:()=>[(l=n.default)===null||l===void 0?void 0:l.call(n)]}))}}}),Cve=()=>{const t=document.getSelection();if(!t.rangeCount)return function(){};let e=document.activeElement;const n=[];for(let i=0;i"u"){l&&console.warn("unable to use e.clipboardData"),l&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();const d=_O[e.format]||_O.default;window.clipboardData.setData(d,t)}else u.clipboardData.clearData(),u.clipboardData.setData(e.format,t);e.onCopy&&(u.preventDefault(),e.onCopy(u.clipboardData))}),document.body.appendChild(a),o.selectNodeContents(a),r.addRange(o),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");s=!0}catch(c){l&&console.error("unable to copy using execCommand: ",c),l&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),s=!0}catch(u){l&&console.error("unable to copy using clipboardData: ",u),l&&console.error("falling back to prompt"),n=Ave("message"in e?e.message:$ve),window.prompt(n,t)}}finally{r&&(typeof r.removeRange=="function"?r.removeRange(o):r.removeAllRanges()),a&&document.body.removeChild(a),i()}return s}var Pve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};function PO(t){for(var e=1;e({editable:{type:[Boolean,Object],default:void 0},copyable:{type:[Boolean,Object],default:void 0},prefixCls:String,component:String,type:String,disabled:{type:Boolean,default:void 0},ellipsis:{type:[Boolean,Object],default:void 0},code:{type:Boolean,default:void 0},mark:{type:Boolean,default:void 0},underline:{type:Boolean,default:void 0},delete:{type:Boolean,default:void 0},strong:{type:Boolean,default:void 0},keyboard:{type:Boolean,default:void 0},content:String,"onUpdate:content":Function}),ff=oe({compatConfig:{MODE:3},name:"TypographyBase",inheritAttrs:!1,props:df(),setup(t,e){let{slots:n,attrs:i,emit:o}=e;const{prefixCls:r,direction:a}=Me("typography",t),s=$t({copied:!1,ellipsisText:"",ellipsisContent:null,isEllipsis:!1,expanded:!1,clientRendered:!1,expandStr:"",copyStr:"",copiedStr:"",editStr:"",copyId:void 0,rafId:void 0,prevProps:void 0,originContent:""}),l=se(),c=se(),u=L(()=>{const E=t.ellipsis;return E?A({rows:1,expandable:!1},typeof E=="object"?E:null):{}});Ze(()=>{s.clientRendered=!0,_()}),at(()=>{clearTimeout(s.copyId),lt.cancel(s.rafId)}),ye([()=>u.value.rows,()=>t.content],()=>{pt(()=>{$()})},{flush:"post",deep:!0}),Ke(()=>{t.content===void 0&&(Gi(!t.editable),Gi(!t.ellipsis))});function d(){var E;return t.ellipsis||t.editable?t.content:(E=gi(l.value))===null||E===void 0?void 0:E.innerText}function f(E){const{onExpand:R}=u.value;s.expanded=!0,R==null||R(E)}function h(E){E.preventDefault(),s.originContent=t.content,x(!0)}function p(E){g(E),x(!1)}function g(E){const{onChange:R}=b.value;E!==t.content&&(o("update:content",E),R==null||R(E))}function m(){var E,R;(R=(E=b.value).onCancel)===null||R===void 0||R.call(E),x(!1)}function v(E){E.preventDefault(),E.stopPropagation();const{copyable:R}=t,D=A({},typeof R=="object"?R:null);D.text===void 0&&(D.text=d()),_ve(D.text||""),s.copied=!0,pt(()=>{D.onCopy&&D.onCopy(E),s.copyId=setTimeout(()=>{s.copied=!1},3e3)})}const b=L(()=>{const E=t.editable;return E?A({},typeof E=="object"?E:null):{editing:!1}}),[y,w]=jt(!1,{value:L(()=>b.value.editing)});function x(E){const{onStart:R}=b.value;E&&R&&R(),w(E)}ye(y,E=>{var R;E||(R=c.value)===null||R===void 0||R.focus()},{flush:"post"});function $(E){if(E){const{width:R,height:D}=E;if(!R||!D)return}lt.cancel(s.rafId),s.rafId=lt(()=>{_()})}const S=L(()=>{const{rows:E,expandable:R,suffix:D,onEllipsis:F,tooltip:N}=u.value;return D||N||t.editable||t.copyable||R||F?!1:E===1?kve:Ive}),_=()=>{const{ellipsisText:E,isEllipsis:R}=s,{rows:D,suffix:F,onEllipsis:N}=u.value;if(!D||D<0||!gi(l.value)||s.expanded||t.content===void 0||S.value)return;const{content:B,text:z,ellipsis:W}=xve(gi(l.value),{rows:D,suffix:F},t.content,k(!0),OO);(E!==z||s.isEllipsis!==W)&&(s.ellipsisText=z,s.ellipsisContent=B,s.isEllipsis=W,R!==W&&N&&N(W))};function P(E,R){let{mark:D,code:F,underline:N,delete:B,strong:z,keyboard:W}=E,j=R;function U(V,q){if(!V)return;const Y=function(){return j}();j=C(q,null,{default:()=>[Y]})}return U(z,"strong"),U(N,"u"),U(B,"del"),U(F,"code"),U(D,"mark"),U(W,"kbd"),j}function O(E){const{expandable:R,symbol:D}=u.value;if(!R||!E&&(s.expanded||!s.isEllipsis))return null;const F=(n.ellipsisSymbol?n.ellipsisSymbol():D)||s.expandStr;return C("a",{key:"expand",class:`${r.value}-expand`,onClick:f,"aria-label":s.expandStr},[F])}function T(){if(!t.editable)return;const{tooltip:E,triggerType:R=["icon"]}=t.editable,D=n.editableIcon?n.editableIcon():C(NC,{role:"button"},null),F=n.editableTooltip?n.editableTooltip():s.editStr,N=typeof F=="string"?F:"";return R.indexOf("icon")!==-1?C(Pi,{key:"edit",title:E===!1?"":F},{default:()=>[C(vg,{ref:c,class:`${r.value}-edit`,onClick:h,"aria-label":N},{default:()=>[D]})]}):null}function M(){if(!t.copyable)return;const{tooltip:E}=t.copyable,R=s.copied?s.copiedStr:s.copyStr,D=n.copyableTooltip?n.copyableTooltip({copied:s.copied}):R,F=typeof D=="string"?D:"",N=s.copied?C(_c,null,null):C(FC,null,null),B=n.copyableIcon?n.copyableIcon({copied:!!s.copied}):N;return C(Pi,{key:"copy",title:E===!1?"":D},{default:()=>[C(vg,{class:[`${r.value}-copy`,{[`${r.value}-copy-success`]:s.copied}],onClick:v,"aria-label":F},{default:()=>[B]})]})}function I(){const{class:E,style:R}=i,{maxlength:D,autoSize:F,onEnd:N}=b.value;return C(mve,{class:E,style:R,prefixCls:r.value,value:t.content,originContent:s.originContent,maxlength:D,autoSize:F,onSave:p,onChange:g,onCancel:m,onEnd:N,direction:a.value,component:t.component},{enterIcon:n.editableEnterIcon})}function k(E){return[O(E),T(),M()].filter(R=>R)}return()=>{var E;const{triggerType:R=["icon"]}=b.value,D=t.ellipsis||t.editable?t.content!==void 0?t.content:(E=n.default)===null||E===void 0?void 0:E.call(n):n.default?n.default():t.content;return y.value?I():C(Us,{componentName:"Text",children:F=>{const N=A(A({},t),i),{type:B,disabled:z,content:W,class:j,style:U}=N,V=Mve(N,["type","disabled","content","class","style"]),{rows:q,suffix:Y,tooltip:J}=u.value,{edit:Q,copy:G,copied:ee,expand:X}=F;s.editStr=Q,s.copyStr=G,s.copiedStr=ee,s.expandStr=X;const K=ht(V,["prefixCls","editable","copyable","ellipsis","mark","code","delete","underline","strong","keyboard","onUpdate:content"]),te=S.value,ue=q===1&&te,ae=q&&q>1&&te;let re=D,ne;if(q&&s.isEllipsis&&!s.expanded&&!te){const{title:pe}=V;let ge=pe||"";!pe&&(typeof D=="string"||typeof D=="number")&&(ge=String(D)),ge=ge==null?void 0:ge.slice(String(s.ellipsisContent||"").length),re=C(Qe,null,[dt(s.ellipsisContent),C("span",{title:ge,"aria-hidden":"true"},[OO]),Y])}else re=C(Qe,null,[D,Y]);re=P(t,re);const le=J&&q&&s.isEllipsis&&!s.expanded&&!te,he=n.ellipsisTooltip?n.ellipsisTooltip():J;return C(mo,{onResize:$,disabled:!q},{default:()=>[C(_i,H({ref:l,class:[{[`${r.value}-${B}`]:B,[`${r.value}-disabled`]:z,[`${r.value}-ellipsis`]:q,[`${r.value}-single-line`]:q===1&&!s.isEllipsis,[`${r.value}-ellipsis-single-line`]:ue,[`${r.value}-ellipsis-multiple-line`]:ae},j],style:A(A({},U),{WebkitLineClamp:ae?q:void 0}),"aria-label":ne,direction:a.value,onClick:R.indexOf("text")!==-1?h:()=>{}},K),{default:()=>[le?C(Pi,{title:J===!0?D:he},{default:()=>[C("span",null,[re])]}):re,k()]})]})}},null)}}});var Dve=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);oht(A(A({},df()),{ellipsis:{type:Boolean,default:void 0}}),["component"]),Rc=(t,e)=>{let{slots:n,attrs:i}=e;const o=A(A({},t),i),{ellipsis:r,rel:a}=o,s=Dve(o,["ellipsis","rel"]),l=A(A({},s),{rel:a===void 0&&s.target==="_blank"?"noopener noreferrer":a,ellipsis:!!r,component:"a"});return delete l.navigate,C(ff,l,n)};Rc.displayName="ATypographyLink";Rc.inheritAttrs=!1;Rc.props=Rve();const Lve=()=>ht(df(),["component"]),Lc=(t,e)=>{let{slots:n,attrs:i}=e;const o=A(A(A({},t),{component:"div"}),i);return C(ff,o,n)};Lc.displayName="ATypographyParagraph";Lc.inheritAttrs=!1;Lc.props=Lve();const Fve=()=>A(A({},ht(df(),["component"])),{ellipsis:{type:[Boolean,Object],default:void 0}}),Fc=(t,e)=>{let{slots:n,attrs:i}=e;const{ellipsis:o}=t,r=A(A(A({},t),{ellipsis:o&&typeof o=="object"?ht(o,["expandable","rows"]):o,component:"span"}),i);return C(ff,r,n)};Fc.displayName="ATypographyText";Fc.inheritAttrs=!1;Fc.props=Fve();var Nve=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);oA(A({},ht(df(),["component","strong"])),{level:Number}),Nc=(t,e)=>{let{slots:n,attrs:i}=e;const{level:o=1}=t,r=Nve(t,["level"]);let a;Bve.includes(o)?a=`h${o}`:a="h1";const s=A(A(A({},r),{component:a}),i);return C(ff,s,n)};Nc.displayName="ATypographyTitle";Nc.inheritAttrs=!1;Nc.props=zve();_i.Text=Fc;_i.Title=Nc;_i.Paragraph=Lc;_i.Link=Rc;_i.Base=ff;_i.install=function(t){return t.component(_i.name,_i),t.component(_i.Text.displayName,Fc),t.component(_i.Title.displayName,Nc),t.component(_i.Paragraph.displayName,Lc),t.component(_i.Link.displayName,Rc),t};function Hve(t,e){const n=`cannot ${t.method} ${t.action} ${e.status}'`,i=new Error(n);return i.status=e.status,i.method=t.method,i.url=t.action,i}function EO(t){const e=t.responseText||t.response;if(!e)return e;try{return JSON.parse(e)}catch{return e}}function Wve(t){const e=new XMLHttpRequest;t.onProgress&&e.upload&&(e.upload.onprogress=function(r){r.total>0&&(r.percent=r.loaded/r.total*100),t.onProgress(r)});const n=new FormData;t.data&&Object.keys(t.data).forEach(o=>{const r=t.data[o];if(Array.isArray(r)){r.forEach(a=>{n.append(`${o}[]`,a)});return}n.append(o,r)}),t.file instanceof Blob?n.append(t.filename,t.file,t.file.name):n.append(t.filename,t.file),e.onerror=function(r){t.onError(r)},e.onload=function(){return e.status<200||e.status>=300?t.onError(Hve(t,e),EO(e)):t.onSuccess(EO(e),e)},e.open(t.method,t.action,!0),t.withCredentials&&"withCredentials"in e&&(e.withCredentials=!0);const i=t.headers||{};return i["X-Requested-With"]!==null&&e.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(i).forEach(o=>{i[o]!==null&&e.setRequestHeader(o,i[o])}),e.send(n),{abort(){e.abort()}}}const jve=+new Date;let Vve=0;function r0(){return`vc-upload-${jve}-${++Vve}`}const a0=(t,e)=>{if(t&&e){const n=Array.isArray(e)?e:e.split(","),i=t.name||"",o=t.type||"",r=o.replace(/\/.*$/,"");return n.some(a=>{const s=a.trim();if(/^\*(\/\*)?$/.test(a))return!0;if(s.charAt(0)==="."){const l=i.toLowerCase(),c=s.toLowerCase();let u=[c];return(c===".jpg"||c===".jpeg")&&(u=[".jpg",".jpeg"]),u.some(d=>l.endsWith(d))}return/\/\*$/.test(s)?r===s.replace(/\/.*$/,""):!!(o===s||/^\w+$/.test(s))})}return!0};function Xve(t,e){const n=t.createReader();let i=[];function o(){n.readEntries(r=>{const a=Array.prototype.slice.apply(r);i=i.concat(a),!a.length?e(i):o()})}o()}const Yve=(t,e,n)=>{const i=(o,r)=>{o.path=r||"",o.isFile?o.file(a=>{n(a)&&(o.fullPath&&!a.webkitRelativePath&&(Object.defineProperties(a,{webkitRelativePath:{writable:!0}}),a.webkitRelativePath=o.fullPath.replace(/^\//,""),Object.defineProperties(a,{webkitRelativePath:{writable:!1}})),e([a]))}):o.isDirectory&&Xve(o,a=>{a.forEach(s=>{i(s,`${r}${o.name}/`)})})};t.forEach(o=>{i(o.webkitGetAsEntry())})},P5=()=>({capture:[Boolean,String],multipart:{type:Boolean,default:void 0},name:String,disabled:{type:Boolean,default:void 0},componentTag:String,action:[String,Function],method:String,directory:{type:Boolean,default:void 0},data:[Object,Function],headers:Object,accept:String,multiple:{type:Boolean,default:void 0},onBatchStart:Function,onReject:Function,onStart:Function,onError:Function,onSuccess:Function,onProgress:Function,beforeUpload:Function,customRequest:Function,withCredentials:{type:Boolean,default:void 0},openFileDialogOnClick:{type:Boolean,default:void 0},prefixCls:String,id:String,onMouseenter:Function,onMouseleave:Function,onClick:Function});var Gve=function(t,e,n,i){function o(r){return r instanceof n?r:new n(function(a){a(r)})}return new(n||(n=Promise))(function(r,a){function s(u){try{c(i.next(u))}catch(d){a(d)}}function l(u){try{c(i.throw(u))}catch(d){a(d)}}function c(u){u.done?r(u.value):o(u.value).then(s,l)}c((i=i.apply(t,e||[])).next())})},Kve=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);oGve(this,void 0,void 0,function*(){const{beforeUpload:w}=t;let x=b;if(w){try{x=yield w(b,y)}catch{x=!1}if(x===!1)return{origin:b,parsedFile:null,action:null,data:null}}const{action:$}=t;let S;typeof $=="function"?S=yield $(b):S=$;const{data:_}=t;let P;typeof _=="function"?P=yield _(b):P=_;const O=(typeof x=="object"||typeof x=="string")&&x?x:b;let T;O instanceof File?T=O:T=new File([O],b.name,{type:b.type});const M=T;return M.uid=b.uid,{origin:b,data:P,parsedFile:M,action:S}}),u=b=>{let{data:y,origin:w,action:x,parsedFile:$}=b;if(!l)return;const{onStart:S,customRequest:_,name:P,headers:O,withCredentials:T,method:M}=t,{uid:I}=w,k=_||Wve,E={action:x,filename:P,data:y,file:$,headers:O,withCredentials:T,method:M||"post",onProgress:R=>{const{onProgress:D}=t;D==null||D(R,$)},onSuccess:(R,D)=>{const{onSuccess:F}=t;F==null||F(R,$,D),delete a[I]},onError:(R,D)=>{const{onError:F}=t;F==null||F(R,D,$),delete a[I]}};S(w),a[I]=k(E)},d=()=>{r.value=r0()},f=b=>{if(b){const y=b.uid?b.uid:b;a[y]&&a[y].abort&&a[y].abort(),delete a[y]}else Object.keys(a).forEach(y=>{a[y]&&a[y].abort&&a[y].abort(),delete a[y]})};Ze(()=>{l=!0}),at(()=>{l=!1,f()});const h=b=>{const y=[...b],w=y.map(x=>(x.uid=r0(),c(x,y)));Promise.all(w).then(x=>{const{onBatchStart:$}=t;$==null||$(x.map(S=>{let{origin:_,parsedFile:P}=S;return{file:_,parsedFile:P}})),x.filter(S=>S.parsedFile!==null).forEach(S=>{u(S)})})},p=b=>{const{accept:y,directory:w}=t,{files:x}=b.target,$=[...x].filter(S=>!w||a0(S,y));h($),d()},g=b=>{const y=s.value;if(!y)return;const{onClick:w}=t;y.click(),w&&w(b)},m=b=>{b.key==="Enter"&&g(b)},v=b=>{const{multiple:y}=t;if(b.preventDefault(),b.type!=="dragover")if(t.directory)Yve(Array.prototype.slice.call(b.dataTransfer.items),h,w=>a0(w,t.accept));else{const w=vZ(Array.prototype.slice.call(b.dataTransfer.files),S=>a0(S,t.accept));let x=w[0];const $=w[1];y===!1&&(x=x.slice(0,1)),h(x),$.length&&t.onReject&&t.onReject($)}};return o({abort:f}),()=>{var b;const{componentTag:y,prefixCls:w,disabled:x,id:$,multiple:S,accept:_,capture:P,directory:O,openFileDialogOnClick:T,onMouseenter:M,onMouseleave:I}=t,k=Kve(t,["componentTag","prefixCls","disabled","id","multiple","accept","capture","directory","openFileDialogOnClick","onMouseenter","onMouseleave"]),E={[w]:!0,[`${w}-disabled`]:x,[i.class]:!!i.class},R=O?{directory:"directory",webkitdirectory:"webkitdirectory"}:{};return C(y,H(H({},x?{}:{onClick:T?g:()=>{},onKeydown:T?m:()=>{},onMouseenter:M,onMouseleave:I,onDrop:v,onDragover:v,tabindex:"0"}),{},{class:E,role:"button",style:i.style}),{default:()=>[C("input",H(H(H({},ka(k,{aria:!0,data:!0})),{},{id:$,type:"file",ref:s,onClick:F=>F.stopPropagation(),onCancel:F=>F.stopPropagation(),key:r.value,style:{display:"none"},accept:_},R),{},{multiple:S,onChange:p},P!=null?{capture:P}:{}),null),(b=n.default)===null||b===void 0?void 0:b.call(n)]})}}});function s0(){}const MO=oe({compatConfig:{MODE:3},name:"Upload",inheritAttrs:!1,props:ct(P5(),{componentTag:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:s0,onError:s0,onSuccess:s0,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0}),setup(t,e){let{slots:n,attrs:i,expose:o}=e;const r=se();return o({abort:s=>{var l;(l=r.value)===null||l===void 0||l.abort(s)}}),()=>C(Uve,H(H(H({},t),i),{},{ref:r}),n)}});var qve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"};function IO(t){for(var e=1;e{let{uid:r}=o;return r===t.uid});return i===-1?n.push(t):n[i]=t,n}function l0(t,e){const n=t.uid!==void 0?"uid":"name";return e.filter(i=>i[n]===t[n])[0]}function ibe(t,e){const n=t.uid!==void 0?"uid":"name",i=e.filter(o=>o[n]!==t[n]);return i.length===e.length?null:i}const obe=function(){const e=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),i=e[e.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(i)||[""])[0]},O5=t=>t.indexOf("image/")===0,rbe=t=>{if(t.type&&!t.thumbUrl)return O5(t.type);const e=t.thumbUrl||t.url||"",n=obe(e);return/^data:image\//.test(e)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i.test(n)?!0:!(/^data:/.test(e)||n)},ea=200;function abe(t){return new Promise(e=>{if(!t.type||!O5(t.type)){e("");return}const n=document.createElement("canvas");n.width=ea,n.height=ea,n.style.cssText=`position: fixed; left: 0; top: 0; width: ${ea}px; height: ${ea}px; z-index: 9999; display: none;`,document.body.appendChild(n);const i=n.getContext("2d"),o=new Image;if(o.onload=()=>{const{width:r,height:a}=o;let s=ea,l=ea,c=0,u=0;r>a?(l=a*(ea/r),u=-(l-s)/2):(s=r*(ea/a),c=-(s-l)/2),i.drawImage(o,c,u,s,l);const d=n.toDataURL();document.body.removeChild(n),e(d)},o.crossOrigin="anonymous",t.type.startsWith("image/svg+xml")){const r=new FileReader;r.addEventListener("load",()=>{r.result&&(o.src=r.result)}),r.readAsDataURL(t)}else o.src=window.URL.createObjectURL(t)})}var sbe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};function RO(t){for(var e=1;e({prefixCls:String,locale:Fe(void 0),file:Fe(),items:xt(),listType:Ne(),isImgUrl:ve(),showRemoveIcon:Ce(),showDownloadIcon:Ce(),showPreviewIcon:Ce(),removeIcon:ve(),downloadIcon:ve(),previewIcon:ve(),iconRender:ve(),actionIconRender:ve(),itemRender:ve(),onPreview:ve(),onClose:ve(),onDownload:ve(),progress:Fe()}),ube=oe({compatConfig:{MODE:3},name:"ListItem",inheritAttrs:!1,props:cbe(),setup(t,e){let{slots:n,attrs:i}=e;var o;const r=ie(!1),a=ie();Ze(()=>{a.value=setTimeout(()=>{r.value=!0},300)}),at(()=>{clearTimeout(a.value)});const s=ie((o=t.file)===null||o===void 0?void 0:o.status);ye(()=>{var u;return(u=t.file)===null||u===void 0?void 0:u.status},u=>{u!=="removed"&&(s.value=u)});const{rootPrefixCls:l}=Me("upload",t),c=L(()=>yo(`${l.value}-fade`));return()=>{var u,d;const{prefixCls:f,locale:h,listType:p,file:g,items:m,progress:v,iconRender:b=n.iconRender,actionIconRender:y=n.actionIconRender,itemRender:w=n.itemRender,isImgUrl:x,showPreviewIcon:$,showRemoveIcon:S,showDownloadIcon:_,previewIcon:P=n.previewIcon,removeIcon:O=n.removeIcon,downloadIcon:T=n.downloadIcon,onPreview:M,onDownload:I,onClose:k}=t,{class:E,style:R}=i,D=b({file:g});let F=C("div",{class:`${f}-text-icon`},[D]);if(p==="picture"||p==="picture-card")if(s.value==="uploading"||!g.thumbUrl&&!g.url){const K={[`${f}-list-item-thumbnail`]:!0,[`${f}-list-item-file`]:s.value!=="uploading"};F=C("div",{class:K},[D])}else{const K=x!=null&&x(g)?C("img",{src:g.thumbUrl||g.url,alt:g.name,class:`${f}-list-item-image`,crossorigin:g.crossOrigin},null):D,te={[`${f}-list-item-thumbnail`]:!0,[`${f}-list-item-file`]:x&&!x(g)};F=C("a",{class:te,onClick:ue=>M(g,ue),href:g.url||g.thumbUrl,target:"_blank",rel:"noopener noreferrer"},[K])}const N={[`${f}-list-item`]:!0,[`${f}-list-item-${s.value}`]:!0},B=typeof g.linkProps=="string"?JSON.parse(g.linkProps):g.linkProps,z=S?y({customIcon:O?O({file:g}):C(pv,null,null),callback:()=>k(g),prefixCls:f,title:h.removeFile}):null,W=_&&s.value==="done"?y({customIcon:T?T({file:g}):C(WC,null,null),callback:()=>I(g),prefixCls:f,title:h.downloadFile}):null,j=p!=="picture-card"&&C("span",{key:"download-delete",class:[`${f}-list-item-actions`,{picture:p==="picture"}]},[W,z]),U=`${f}-list-item-name`,V=g.url?[C("a",H(H({key:"view",target:"_blank",rel:"noopener noreferrer",class:U,title:g.name},B),{},{href:g.url,onClick:K=>M(g,K)}),[g.name]),j]:[C("span",{key:"view",class:U,onClick:K=>M(g,K),title:g.name},[g.name]),j],q={pointerEvents:"none",opacity:.5},Y=$?C("a",{href:g.url||g.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:g.url||g.thumbUrl?void 0:q,onClick:K=>M(g,K),title:h.previewFile},[P?P({file:g}):C(sf,null,null)]):null,J=p==="picture-card"&&s.value!=="uploading"&&C("span",{class:`${f}-list-item-actions`},[Y,s.value==="done"&&W,z]),Q=C("div",{class:N},[F,V,J,r.value&&C(En,c.value,{default:()=>[ni(C("div",{class:`${f}-list-item-progress`},["percent"in g?C(vC,H(H({},v),{},{type:"line",percent:g.percent}),null):null]),[[vi,s.value==="uploading"]])]})]),G={[`${f}-list-item-container`]:!0,[`${E}`]:!!E},ee=g.response&&typeof g.response=="string"?g.response:((u=g.error)===null||u===void 0?void 0:u.statusText)||((d=g.error)===null||d===void 0?void 0:d.message)||h.uploadError,X=s.value==="error"?C(Pi,{title:ee,getPopupContainer:K=>K.parentNode},{default:()=>[Q]}):Q;return C("div",{class:G,style:R},[w?w({originNode:X,file:g,fileList:m,actions:{download:I.bind(null,g),preview:M.bind(null,g),remove:k.bind(null,g)}}):X])}}}),dbe=(t,e)=>{let{slots:n}=e;var i;return Kt((i=n.default)===null||i===void 0?void 0:i.call(n))[0]},fbe=oe({compatConfig:{MODE:3},name:"AUploadList",props:ct(nbe(),{listType:"text",progress:{strokeWidth:2,showInfo:!1},showRemoveIcon:!0,showDownloadIcon:!1,showPreviewIcon:!0,previewFile:abe,isImageUrl:rbe,items:[],appendActionVisible:!0}),setup(t,e){let{slots:n,expose:i}=e;const o=ie(!1);Ze(()=>{o.value==!0});const r=ie([]);ye(()=>t.items,function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];r.value=g.slice()},{immediate:!0,deep:!0}),Ke(()=>{if(t.listType!=="picture"&&t.listType!=="picture-card")return;let g=!1;(t.items||[]).forEach((m,v)=>{typeof document>"u"||typeof window>"u"||!window.FileReader||!window.File||!(m.originFileObj instanceof File||m.originFileObj instanceof Blob)||m.thumbUrl!==void 0||(m.thumbUrl="",t.previewFile&&t.previewFile(m.originFileObj).then(b=>{const y=b||"";y!==m.thumbUrl&&(r.value[v].thumbUrl=y,g=!0)}))}),g&&OI(r)});const a=(g,m)=>{if(t.onPreview)return m==null||m.preventDefault(),t.onPreview(g)},s=g=>{typeof t.onDownload=="function"?t.onDownload(g):g.url&&window.open(g.url)},l=g=>{var m;(m=t.onRemove)===null||m===void 0||m.call(t,g)},c=g=>{let{file:m}=g;const v=t.iconRender||n.iconRender;if(v)return v({file:m,listType:t.listType});const b=m.status==="uploading",y=t.isImageUrl&&t.isImageUrl(m)?C(zC,null,null):C(HC,null,null);let w=C(b?yi:BC,null,null);return t.listType==="picture"?w=b?C(yi,null,null):y:t.listType==="picture-card"&&(w=b?t.locale.uploading:y),w},u=g=>{const{customIcon:m,callback:v,prefixCls:b,title:y}=g,w={type:"text",size:"small",title:y,onClick:()=>{v()},class:`${b}-list-item-action`};return cn(m)?C(nn,w,{icon:()=>m}):C(nn,w,{default:()=>[C("span",null,[m])]})};i({handlePreview:a,handleDownload:s});const{prefixCls:d,rootPrefixCls:f}=Me("upload",t),h=L(()=>({[`${d.value}-list`]:!0,[`${d.value}-list-${t.listType}`]:!0})),p=L(()=>{const g=A({},Zd(`${f.value}-motion-collapse`));delete g.onAfterAppear,delete g.onAfterEnter,delete g.onAfterLeave;const m=A(A({},wm(`${d.value}-${t.listType==="picture-card"?"animate-inline":"animate"}`)),{class:h.value,appear:o.value});return t.listType!=="picture-card"?A(A({},g),m):m});return()=>{const{listType:g,locale:m,isImageUrl:v,showPreviewIcon:b,showRemoveIcon:y,showDownloadIcon:w,removeIcon:x,previewIcon:$,downloadIcon:S,progress:_,appendAction:P,itemRender:O,appendActionVisible:T}=t,M=P==null?void 0:P(),I=r.value;return C(tm,H(H({},p.value),{},{tag:"div"}),{default:()=>[I.map(k=>{const{uid:E}=k;return C(ube,{key:E,locale:m,prefixCls:d.value,file:k,items:I,progress:_,listType:g,isImgUrl:v,showPreviewIcon:b,showRemoveIcon:y,showDownloadIcon:w,onPreview:a,onDownload:s,onClose:l,removeIcon:x,previewIcon:$,downloadIcon:S,itemRender:O},A(A({},n),{iconRender:c,actionIconRender:u}))}),P?ni(C(dbe,{key:"__ant_upload_appendAction"},{default:()=>M}),[[vi,!!T]]):null]})}}}),hbe=t=>{const{componentCls:e,iconCls:n}=t;return{[`${e}-wrapper`]:{[`${e}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:t.colorFillAlter,border:`${t.lineWidth}px dashed ${t.colorBorder}`,borderRadius:t.borderRadiusLG,cursor:"pointer",transition:`border-color ${t.motionDurationSlow}`,[e]:{padding:`${t.padding}px 0`},[`${e}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none"},[`${e}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`&:not(${e}-disabled):hover`]:{borderColor:t.colorPrimaryHover},[`p${e}-drag-icon`]:{marginBottom:t.margin,[n]:{color:t.colorPrimary,fontSize:t.uploadThumbnailSize}},[`p${e}-text`]:{margin:`0 0 ${t.marginXXS}px`,color:t.colorTextHeading,fontSize:t.fontSizeLG},[`p${e}-hint`]:{color:t.colorTextDescription,fontSize:t.fontSize},[`&${e}-disabled`]:{cursor:"not-allowed",[`p${e}-drag-icon ${n}, + `]:A(A({},fm(t)),{marginInlineStart:t.marginXXS})}),dve(t)),fve(t)),hve()),{"&-rtl":{direction:"rtl"}})}},A5=et("Typography",t=>[pve(t)],{sizeMarginHeadingVerticalStart:"1.2em",sizeMarginHeadingVerticalEnd:"0.5em"}),gve=()=>({prefixCls:String,value:String,maxlength:Number,autoSize:{type:[Boolean,Object]},onSave:Function,onCancel:Function,onEnd:Function,onChange:Function,originContent:String,direction:String,component:String}),mve=oe({compatConfig:{MODE:3},name:"Editable",inheritAttrs:!1,props:gve(),setup(t,e){let{emit:n,slots:i,attrs:o}=e;const{prefixCls:r}=uo(t),a=$t({current:t.value||"",lastKeyCode:void 0,inComposition:!1,cancelFlag:!1});ye(()=>t.value,b=>{a.current=b});const s=se();Ze(()=>{var b;if(s.value){const y=(b=s.value)===null||b===void 0?void 0:b.resizableTextArea,w=y==null?void 0:y.textArea;w.focus();const{length:x}=w.value;w.setSelectionRange(x,x)}});function l(b){s.value=b}function c(b){let{target:{value:y}}=b;a.current=y.replace(/[\r\n]/g,""),n("change",a.current)}function u(){a.inComposition=!0}function d(){a.inComposition=!1}function f(b){const{keyCode:y}=b;y===Te.ENTER&&b.preventDefault(),!a.inComposition&&(a.lastKeyCode=y)}function h(b){const{keyCode:y,ctrlKey:w,altKey:x,metaKey:$,shiftKey:S}=b;a.lastKeyCode===y&&!a.inComposition&&!w&&!x&&!$&&!S&&(y===Te.ENTER?(g(),n("end")):y===Te.ESC&&(a.current=t.originContent,n("cancel")))}function p(){g()}function g(){n("save",a.current.trim())}const[m,v]=A5(r);return()=>{const b=ce({[`${r.value}`]:!0,[`${r.value}-edit-content`]:!0,[`${r.value}-rtl`]:t.direction==="rtl",[t.component?`${r.value}-${t.component}`:""]:!0},o.class,v.value);return m(C("div",H(H({},o),{},{class:b}),[C(tC,{ref:l,maxlength:t.maxlength,value:a.current,onChange:c,onKeydown:f,onKeyup:h,onCompositionstart:u,onCompositionend:d,onBlur:p,rows:1,autoSize:t.autoSize===void 0||t.autoSize},null),i.enterIcon?i.enterIcon({className:`${t.prefixCls}-edit-content-confirm`}):C(LC,{class:`${t.prefixCls}-edit-content-confirm`},null)]))}}}),vve=3,bve=8;let Ai;const o0={padding:0,margin:0,display:"inline",lineHeight:"inherit"};function _5(t,e){t.setAttribute("aria-hidden","true");const n=window.getComputedStyle(e),i=dY(n);t.setAttribute("style",i),t.style.position="fixed",t.style.left="0",t.style.height="auto",t.style.minHeight="auto",t.style.maxHeight="auto",t.style.paddingTop="0",t.style.paddingBottom="0",t.style.borderTopWidth="0",t.style.borderBottomWidth="0",t.style.top="-999999px",t.style.zIndex="-1000",t.style.textOverflow="clip",t.style.whiteSpace="normal",t.style.webkitLineClamp="none"}function yve(t){const e=document.createElement("div");_5(e,t),e.appendChild(document.createTextNode("text")),document.body.appendChild(e);const n=e.getBoundingClientRect().height;return document.body.removeChild(e),n}const xve=(t,e,n,i,o)=>{Ai||(Ai=document.createElement("div"),Ai.setAttribute("aria-hidden","true"),document.body.appendChild(Ai));const{rows:r,suffix:a=""}=e,s=yve(t),l=Math.round(s*r*100)/100;_5(Ai,t);const c=Pk({render(){return C("div",{style:o0},[C("span",{style:o0},[n,a]),C("span",{style:o0},[i])])}});c.mount(Ai);function u(){return Math.round(Ai.getBoundingClientRect().height*100)/100-.1<=l}if(u())return c.unmount(),{content:n,text:Ai.innerHTML,ellipsis:!1};const d=Array.prototype.slice.apply(Ai.childNodes[0].childNodes[0].cloneNode(!0).childNodes).filter(y=>{let{nodeType:w,data:x}=y;return w!==bve&&x!==""}),f=Array.prototype.slice.apply(Ai.childNodes[0].childNodes[1].cloneNode(!0).childNodes);c.unmount();const h=[];Ai.innerHTML="";const p=document.createElement("span");Ai.appendChild(p);const g=document.createTextNode(o+a);p.appendChild(g),f.forEach(y=>{Ai.appendChild(y)});function m(y){p.insertBefore(y,g)}function v(y,w){let x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,$=arguments.length>3&&arguments[3]!==void 0?arguments[3]:w.length,S=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;const _=Math.floor((x+$)/2),P=w.slice(0,_);if(y.textContent=P,x>=$-1)for(let O=$;O>=x;O-=1){const T=w.slice(0,O);if(y.textContent=T,u()||!T)return O===w.length?{finished:!1,vNode:w}:{finished:!0,vNode:T}}return u()?v(y,w,_,$,_):v(y,w,x,_,S)}function b(y){if(y.nodeType===vve){const x=y.textContent||"",$=document.createTextNode(x);return m($),v($,x)}return{finished:!1,vNode:null}}return d.some(y=>{const{finished:w,vNode:x}=b(y);return x&&h.push(x),w}),{content:h,text:Ai.innerHTML,ellipsis:!0}};var wve=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o({prefixCls:String,direction:String,component:String}),_i=oe({name:"ATypography",inheritAttrs:!1,props:Sve(),setup(t,e){let{slots:n,attrs:i}=e;const{prefixCls:o,direction:r}=Me("typography",t),[a,s]=A5(o);return()=>{var l;const c=A(A({},t),i),{prefixCls:u,direction:d,component:f="article"}=c,h=wve(c,["prefixCls","direction","component"]);return a(C(f,H(H({},h),{},{class:ce(o.value,{[`${o.value}-rtl`]:r.value==="rtl"},i.class,s.value)}),{default:()=>[(l=n.default)===null||l===void 0?void 0:l.call(n)]}))}}}),Cve=()=>{const t=document.getSelection();if(!t.rangeCount)return function(){};let e=document.activeElement;const n=[];for(let i=0;i"u"){l&&console.warn("unable to use e.clipboardData"),l&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();const d=_O[e.format]||_O.default;window.clipboardData.setData(d,t)}else u.clipboardData.clearData(),u.clipboardData.setData(e.format,t);e.onCopy&&(u.preventDefault(),e.onCopy(u.clipboardData))}),document.body.appendChild(a),o.selectNodeContents(a),r.addRange(o),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");s=!0}catch(c){l&&console.error("unable to copy using execCommand: ",c),l&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(e.format||"text",t),e.onCopy&&e.onCopy(window.clipboardData),s=!0}catch(u){l&&console.error("unable to copy using clipboardData: ",u),l&&console.error("falling back to prompt"),n=Ave("message"in e?e.message:$ve),window.prompt(n,t)}}finally{r&&(typeof r.removeRange=="function"?r.removeRange(o):r.removeAllRanges()),a&&document.body.removeChild(a),i()}return s}var Pve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};function PO(t){for(var e=1;e({editable:{type:[Boolean,Object],default:void 0},copyable:{type:[Boolean,Object],default:void 0},prefixCls:String,component:String,type:String,disabled:{type:Boolean,default:void 0},ellipsis:{type:[Boolean,Object],default:void 0},code:{type:Boolean,default:void 0},mark:{type:Boolean,default:void 0},underline:{type:Boolean,default:void 0},delete:{type:Boolean,default:void 0},strong:{type:Boolean,default:void 0},keyboard:{type:Boolean,default:void 0},content:String,"onUpdate:content":Function}),hf=oe({compatConfig:{MODE:3},name:"TypographyBase",inheritAttrs:!1,props:ff(),setup(t,e){let{slots:n,attrs:i,emit:o}=e;const{prefixCls:r,direction:a}=Me("typography",t),s=$t({copied:!1,ellipsisText:"",ellipsisContent:null,isEllipsis:!1,expanded:!1,clientRendered:!1,expandStr:"",copyStr:"",copiedStr:"",editStr:"",copyId:void 0,rafId:void 0,prevProps:void 0,originContent:""}),l=se(),c=se(),u=L(()=>{const E=t.ellipsis;return E?A({rows:1,expandable:!1},typeof E=="object"?E:null):{}});Ze(()=>{s.clientRendered=!0,_()}),at(()=>{clearTimeout(s.copyId),lt.cancel(s.rafId)}),ye([()=>u.value.rows,()=>t.content],()=>{pt(()=>{$()})},{flush:"post",deep:!0}),Ke(()=>{t.content===void 0&&(Gi(!t.editable),Gi(!t.ellipsis))});function d(){var E;return t.ellipsis||t.editable?t.content:(E=gi(l.value))===null||E===void 0?void 0:E.innerText}function f(E){const{onExpand:R}=u.value;s.expanded=!0,R==null||R(E)}function h(E){E.preventDefault(),s.originContent=t.content,x(!0)}function p(E){g(E),x(!1)}function g(E){const{onChange:R}=b.value;E!==t.content&&(o("update:content",E),R==null||R(E))}function m(){var E,R;(R=(E=b.value).onCancel)===null||R===void 0||R.call(E),x(!1)}function v(E){E.preventDefault(),E.stopPropagation();const{copyable:R}=t,D=A({},typeof R=="object"?R:null);D.text===void 0&&(D.text=d()),_ve(D.text||""),s.copied=!0,pt(()=>{D.onCopy&&D.onCopy(E),s.copyId=setTimeout(()=>{s.copied=!1},3e3)})}const b=L(()=>{const E=t.editable;return E?A({},typeof E=="object"?E:null):{editing:!1}}),[y,w]=jt(!1,{value:L(()=>b.value.editing)});function x(E){const{onStart:R}=b.value;E&&R&&R(),w(E)}ye(y,E=>{var R;E||(R=c.value)===null||R===void 0||R.focus()},{flush:"post"});function $(E){if(E){const{width:R,height:D}=E;if(!R||!D)return}lt.cancel(s.rafId),s.rafId=lt(()=>{_()})}const S=L(()=>{const{rows:E,expandable:R,suffix:D,onEllipsis:F,tooltip:N}=u.value;return D||N||t.editable||t.copyable||R||F?!1:E===1?kve:Ive}),_=()=>{const{ellipsisText:E,isEllipsis:R}=s,{rows:D,suffix:F,onEllipsis:N}=u.value;if(!D||D<0||!gi(l.value)||s.expanded||t.content===void 0||S.value)return;const{content:B,text:z,ellipsis:W}=xve(gi(l.value),{rows:D,suffix:F},t.content,k(!0),OO);(E!==z||s.isEllipsis!==W)&&(s.ellipsisText=z,s.ellipsisContent=B,s.isEllipsis=W,R!==W&&N&&N(W))};function P(E,R){let{mark:D,code:F,underline:N,delete:B,strong:z,keyboard:W}=E,j=R;function U(V,q){if(!V)return;const Y=function(){return j}();j=C(q,null,{default:()=>[Y]})}return U(z,"strong"),U(N,"u"),U(B,"del"),U(F,"code"),U(D,"mark"),U(W,"kbd"),j}function O(E){const{expandable:R,symbol:D}=u.value;if(!R||!E&&(s.expanded||!s.isEllipsis))return null;const F=(n.ellipsisSymbol?n.ellipsisSymbol():D)||s.expandStr;return C("a",{key:"expand",class:`${r.value}-expand`,onClick:f,"aria-label":s.expandStr},[F])}function T(){if(!t.editable)return;const{tooltip:E,triggerType:R=["icon"]}=t.editable,D=n.editableIcon?n.editableIcon():C(NC,{role:"button"},null),F=n.editableTooltip?n.editableTooltip():s.editStr,N=typeof F=="string"?F:"";return R.indexOf("icon")!==-1?C(Pi,{key:"edit",title:E===!1?"":F},{default:()=>[C(bg,{ref:c,class:`${r.value}-edit`,onClick:h,"aria-label":N},{default:()=>[D]})]}):null}function M(){if(!t.copyable)return;const{tooltip:E}=t.copyable,R=s.copied?s.copiedStr:s.copyStr,D=n.copyableTooltip?n.copyableTooltip({copied:s.copied}):R,F=typeof D=="string"?D:"",N=s.copied?C(Pc,null,null):C(FC,null,null),B=n.copyableIcon?n.copyableIcon({copied:!!s.copied}):N;return C(Pi,{key:"copy",title:E===!1?"":D},{default:()=>[C(bg,{class:[`${r.value}-copy`,{[`${r.value}-copy-success`]:s.copied}],onClick:v,"aria-label":F},{default:()=>[B]})]})}function I(){const{class:E,style:R}=i,{maxlength:D,autoSize:F,onEnd:N}=b.value;return C(mve,{class:E,style:R,prefixCls:r.value,value:t.content,originContent:s.originContent,maxlength:D,autoSize:F,onSave:p,onChange:g,onCancel:m,onEnd:N,direction:a.value,component:t.component},{enterIcon:n.editableEnterIcon})}function k(E){return[O(E),T(),M()].filter(R=>R)}return()=>{var E;const{triggerType:R=["icon"]}=b.value,D=t.ellipsis||t.editable?t.content!==void 0?t.content:(E=n.default)===null||E===void 0?void 0:E.call(n):n.default?n.default():t.content;return y.value?I():C(Us,{componentName:"Text",children:F=>{const N=A(A({},t),i),{type:B,disabled:z,content:W,class:j,style:U}=N,V=Mve(N,["type","disabled","content","class","style"]),{rows:q,suffix:Y,tooltip:J}=u.value,{edit:Q,copy:G,copied:ee,expand:X}=F;s.editStr=Q,s.copyStr=G,s.copiedStr=ee,s.expandStr=X;const K=ht(V,["prefixCls","editable","copyable","ellipsis","mark","code","delete","underline","strong","keyboard","onUpdate:content"]),te=S.value,ue=q===1&&te,ae=q&&q>1&&te;let re=D,ne;if(q&&s.isEllipsis&&!s.expanded&&!te){const{title:pe}=V;let ge=pe||"";!pe&&(typeof D=="string"||typeof D=="number")&&(ge=String(D)),ge=ge==null?void 0:ge.slice(String(s.ellipsisContent||"").length),re=C(Qe,null,[dt(s.ellipsisContent),C("span",{title:ge,"aria-hidden":"true"},[OO]),Y])}else re=C(Qe,null,[D,Y]);re=P(t,re);const le=J&&q&&s.isEllipsis&&!s.expanded&&!te,he=n.ellipsisTooltip?n.ellipsisTooltip():J;return C(mo,{onResize:$,disabled:!q},{default:()=>[C(_i,H({ref:l,class:[{[`${r.value}-${B}`]:B,[`${r.value}-disabled`]:z,[`${r.value}-ellipsis`]:q,[`${r.value}-single-line`]:q===1&&!s.isEllipsis,[`${r.value}-ellipsis-single-line`]:ue,[`${r.value}-ellipsis-multiple-line`]:ae},j],style:A(A({},U),{WebkitLineClamp:ae?q:void 0}),"aria-label":ne,direction:a.value,onClick:R.indexOf("text")!==-1?h:()=>{}},K),{default:()=>[le?C(Pi,{title:J===!0?D:he},{default:()=>[C("span",null,[re])]}):re,k()]})]})}},null)}}});var Dve=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);oht(A(A({},ff()),{ellipsis:{type:Boolean,default:void 0}}),["component"]),Lc=(t,e)=>{let{slots:n,attrs:i}=e;const o=A(A({},t),i),{ellipsis:r,rel:a}=o,s=Dve(o,["ellipsis","rel"]),l=A(A({},s),{rel:a===void 0&&s.target==="_blank"?"noopener noreferrer":a,ellipsis:!!r,component:"a"});return delete l.navigate,C(hf,l,n)};Lc.displayName="ATypographyLink";Lc.inheritAttrs=!1;Lc.props=Rve();const Lve=()=>ht(ff(),["component"]),Fc=(t,e)=>{let{slots:n,attrs:i}=e;const o=A(A(A({},t),{component:"div"}),i);return C(hf,o,n)};Fc.displayName="ATypographyParagraph";Fc.inheritAttrs=!1;Fc.props=Lve();const Fve=()=>A(A({},ht(ff(),["component"])),{ellipsis:{type:[Boolean,Object],default:void 0}}),Nc=(t,e)=>{let{slots:n,attrs:i}=e;const{ellipsis:o}=t,r=A(A(A({},t),{ellipsis:o&&typeof o=="object"?ht(o,["expandable","rows"]):o,component:"span"}),i);return C(hf,r,n)};Nc.displayName="ATypographyText";Nc.inheritAttrs=!1;Nc.props=Fve();var Nve=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);oA(A({},ht(ff(),["component","strong"])),{level:Number}),Bc=(t,e)=>{let{slots:n,attrs:i}=e;const{level:o=1}=t,r=Nve(t,["level"]);let a;Bve.includes(o)?a=`h${o}`:a="h1";const s=A(A(A({},r),{component:a}),i);return C(hf,s,n)};Bc.displayName="ATypographyTitle";Bc.inheritAttrs=!1;Bc.props=zve();_i.Text=Nc;_i.Title=Bc;_i.Paragraph=Fc;_i.Link=Lc;_i.Base=hf;_i.install=function(t){return t.component(_i.name,_i),t.component(_i.Text.displayName,Nc),t.component(_i.Title.displayName,Bc),t.component(_i.Paragraph.displayName,Fc),t.component(_i.Link.displayName,Lc),t};function Hve(t,e){const n=`cannot ${t.method} ${t.action} ${e.status}'`,i=new Error(n);return i.status=e.status,i.method=t.method,i.url=t.action,i}function EO(t){const e=t.responseText||t.response;if(!e)return e;try{return JSON.parse(e)}catch{return e}}function Wve(t){const e=new XMLHttpRequest;t.onProgress&&e.upload&&(e.upload.onprogress=function(r){r.total>0&&(r.percent=r.loaded/r.total*100),t.onProgress(r)});const n=new FormData;t.data&&Object.keys(t.data).forEach(o=>{const r=t.data[o];if(Array.isArray(r)){r.forEach(a=>{n.append(`${o}[]`,a)});return}n.append(o,r)}),t.file instanceof Blob?n.append(t.filename,t.file,t.file.name):n.append(t.filename,t.file),e.onerror=function(r){t.onError(r)},e.onload=function(){return e.status<200||e.status>=300?t.onError(Hve(t,e),EO(e)):t.onSuccess(EO(e),e)},e.open(t.method,t.action,!0),t.withCredentials&&"withCredentials"in e&&(e.withCredentials=!0);const i=t.headers||{};return i["X-Requested-With"]!==null&&e.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(i).forEach(o=>{i[o]!==null&&e.setRequestHeader(o,i[o])}),e.send(n),{abort(){e.abort()}}}const jve=+new Date;let Vve=0;function r0(){return`vc-upload-${jve}-${++Vve}`}const a0=(t,e)=>{if(t&&e){const n=Array.isArray(e)?e:e.split(","),i=t.name||"",o=t.type||"",r=o.replace(/\/.*$/,"");return n.some(a=>{const s=a.trim();if(/^\*(\/\*)?$/.test(a))return!0;if(s.charAt(0)==="."){const l=i.toLowerCase(),c=s.toLowerCase();let u=[c];return(c===".jpg"||c===".jpeg")&&(u=[".jpg",".jpeg"]),u.some(d=>l.endsWith(d))}return/\/\*$/.test(s)?r===s.replace(/\/.*$/,""):!!(o===s||/^\w+$/.test(s))})}return!0};function Xve(t,e){const n=t.createReader();let i=[];function o(){n.readEntries(r=>{const a=Array.prototype.slice.apply(r);i=i.concat(a),!a.length?e(i):o()})}o()}const Yve=(t,e,n)=>{const i=(o,r)=>{o.path=r||"",o.isFile?o.file(a=>{n(a)&&(o.fullPath&&!a.webkitRelativePath&&(Object.defineProperties(a,{webkitRelativePath:{writable:!0}}),a.webkitRelativePath=o.fullPath.replace(/^\//,""),Object.defineProperties(a,{webkitRelativePath:{writable:!1}})),e([a]))}):o.isDirectory&&Xve(o,a=>{a.forEach(s=>{i(s,`${r}${o.name}/`)})})};t.forEach(o=>{i(o.webkitGetAsEntry())})},P5=()=>({capture:[Boolean,String],multipart:{type:Boolean,default:void 0},name:String,disabled:{type:Boolean,default:void 0},componentTag:String,action:[String,Function],method:String,directory:{type:Boolean,default:void 0},data:[Object,Function],headers:Object,accept:String,multiple:{type:Boolean,default:void 0},onBatchStart:Function,onReject:Function,onStart:Function,onError:Function,onSuccess:Function,onProgress:Function,beforeUpload:Function,customRequest:Function,withCredentials:{type:Boolean,default:void 0},openFileDialogOnClick:{type:Boolean,default:void 0},prefixCls:String,id:String,onMouseenter:Function,onMouseleave:Function,onClick:Function});var Gve=function(t,e,n,i){function o(r){return r instanceof n?r:new n(function(a){a(r)})}return new(n||(n=Promise))(function(r,a){function s(u){try{c(i.next(u))}catch(d){a(d)}}function l(u){try{c(i.throw(u))}catch(d){a(d)}}function c(u){u.done?r(u.value):o(u.value).then(s,l)}c((i=i.apply(t,e||[])).next())})},Kve=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);oGve(this,void 0,void 0,function*(){const{beforeUpload:w}=t;let x=b;if(w){try{x=yield w(b,y)}catch{x=!1}if(x===!1)return{origin:b,parsedFile:null,action:null,data:null}}const{action:$}=t;let S;typeof $=="function"?S=yield $(b):S=$;const{data:_}=t;let P;typeof _=="function"?P=yield _(b):P=_;const O=(typeof x=="object"||typeof x=="string")&&x?x:b;let T;O instanceof File?T=O:T=new File([O],b.name,{type:b.type});const M=T;return M.uid=b.uid,{origin:b,data:P,parsedFile:M,action:S}}),u=b=>{let{data:y,origin:w,action:x,parsedFile:$}=b;if(!l)return;const{onStart:S,customRequest:_,name:P,headers:O,withCredentials:T,method:M}=t,{uid:I}=w,k=_||Wve,E={action:x,filename:P,data:y,file:$,headers:O,withCredentials:T,method:M||"post",onProgress:R=>{const{onProgress:D}=t;D==null||D(R,$)},onSuccess:(R,D)=>{const{onSuccess:F}=t;F==null||F(R,$,D),delete a[I]},onError:(R,D)=>{const{onError:F}=t;F==null||F(R,D,$),delete a[I]}};S(w),a[I]=k(E)},d=()=>{r.value=r0()},f=b=>{if(b){const y=b.uid?b.uid:b;a[y]&&a[y].abort&&a[y].abort(),delete a[y]}else Object.keys(a).forEach(y=>{a[y]&&a[y].abort&&a[y].abort(),delete a[y]})};Ze(()=>{l=!0}),at(()=>{l=!1,f()});const h=b=>{const y=[...b],w=y.map(x=>(x.uid=r0(),c(x,y)));Promise.all(w).then(x=>{const{onBatchStart:$}=t;$==null||$(x.map(S=>{let{origin:_,parsedFile:P}=S;return{file:_,parsedFile:P}})),x.filter(S=>S.parsedFile!==null).forEach(S=>{u(S)})})},p=b=>{const{accept:y,directory:w}=t,{files:x}=b.target,$=[...x].filter(S=>!w||a0(S,y));h($),d()},g=b=>{const y=s.value;if(!y)return;const{onClick:w}=t;y.click(),w&&w(b)},m=b=>{b.key==="Enter"&&g(b)},v=b=>{const{multiple:y}=t;if(b.preventDefault(),b.type!=="dragover")if(t.directory)Yve(Array.prototype.slice.call(b.dataTransfer.items),h,w=>a0(w,t.accept));else{const w=vZ(Array.prototype.slice.call(b.dataTransfer.files),S=>a0(S,t.accept));let x=w[0];const $=w[1];y===!1&&(x=x.slice(0,1)),h(x),$.length&&t.onReject&&t.onReject($)}};return o({abort:f}),()=>{var b;const{componentTag:y,prefixCls:w,disabled:x,id:$,multiple:S,accept:_,capture:P,directory:O,openFileDialogOnClick:T,onMouseenter:M,onMouseleave:I}=t,k=Kve(t,["componentTag","prefixCls","disabled","id","multiple","accept","capture","directory","openFileDialogOnClick","onMouseenter","onMouseleave"]),E={[w]:!0,[`${w}-disabled`]:x,[i.class]:!!i.class},R=O?{directory:"directory",webkitdirectory:"webkitdirectory"}:{};return C(y,H(H({},x?{}:{onClick:T?g:()=>{},onKeydown:T?m:()=>{},onMouseenter:M,onMouseleave:I,onDrop:v,onDragover:v,tabindex:"0"}),{},{class:E,role:"button",style:i.style}),{default:()=>[C("input",H(H(H({},ka(k,{aria:!0,data:!0})),{},{id:$,type:"file",ref:s,onClick:F=>F.stopPropagation(),onCancel:F=>F.stopPropagation(),key:r.value,style:{display:"none"},accept:_},R),{},{multiple:S,onChange:p},P!=null?{capture:P}:{}),null),(b=n.default)===null||b===void 0?void 0:b.call(n)]})}}});function s0(){}const MO=oe({compatConfig:{MODE:3},name:"Upload",inheritAttrs:!1,props:ct(P5(),{componentTag:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:s0,onError:s0,onSuccess:s0,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0}),setup(t,e){let{slots:n,attrs:i,expose:o}=e;const r=se();return o({abort:s=>{var l;(l=r.value)===null||l===void 0||l.abort(s)}}),()=>C(Uve,H(H(H({},t),i),{},{ref:r}),n)}});var qve={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"};function IO(t){for(var e=1;e{let{uid:r}=o;return r===t.uid});return i===-1?n.push(t):n[i]=t,n}function l0(t,e){const n=t.uid!==void 0?"uid":"name";return e.filter(i=>i[n]===t[n])[0]}function ibe(t,e){const n=t.uid!==void 0?"uid":"name",i=e.filter(o=>o[n]!==t[n]);return i.length===e.length?null:i}const obe=function(){const e=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),i=e[e.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(i)||[""])[0]},O5=t=>t.indexOf("image/")===0,rbe=t=>{if(t.type&&!t.thumbUrl)return O5(t.type);const e=t.thumbUrl||t.url||"",n=obe(e);return/^data:image\//.test(e)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i.test(n)?!0:!(/^data:/.test(e)||n)},ea=200;function abe(t){return new Promise(e=>{if(!t.type||!O5(t.type)){e("");return}const n=document.createElement("canvas");n.width=ea,n.height=ea,n.style.cssText=`position: fixed; left: 0; top: 0; width: ${ea}px; height: ${ea}px; z-index: 9999; display: none;`,document.body.appendChild(n);const i=n.getContext("2d"),o=new Image;if(o.onload=()=>{const{width:r,height:a}=o;let s=ea,l=ea,c=0,u=0;r>a?(l=a*(ea/r),u=-(l-s)/2):(s=r*(ea/a),c=-(s-l)/2),i.drawImage(o,c,u,s,l);const d=n.toDataURL();document.body.removeChild(n),e(d)},o.crossOrigin="anonymous",t.type.startsWith("image/svg+xml")){const r=new FileReader;r.addEventListener("load",()=>{r.result&&(o.src=r.result)}),r.readAsDataURL(t)}else o.src=window.URL.createObjectURL(t)})}var sbe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};function RO(t){for(var e=1;e({prefixCls:String,locale:Fe(void 0),file:Fe(),items:xt(),listType:Ne(),isImgUrl:ve(),showRemoveIcon:Ce(),showDownloadIcon:Ce(),showPreviewIcon:Ce(),removeIcon:ve(),downloadIcon:ve(),previewIcon:ve(),iconRender:ve(),actionIconRender:ve(),itemRender:ve(),onPreview:ve(),onClose:ve(),onDownload:ve(),progress:Fe()}),ube=oe({compatConfig:{MODE:3},name:"ListItem",inheritAttrs:!1,props:cbe(),setup(t,e){let{slots:n,attrs:i}=e;var o;const r=ie(!1),a=ie();Ze(()=>{a.value=setTimeout(()=>{r.value=!0},300)}),at(()=>{clearTimeout(a.value)});const s=ie((o=t.file)===null||o===void 0?void 0:o.status);ye(()=>{var u;return(u=t.file)===null||u===void 0?void 0:u.status},u=>{u!=="removed"&&(s.value=u)});const{rootPrefixCls:l}=Me("upload",t),c=L(()=>yo(`${l.value}-fade`));return()=>{var u,d;const{prefixCls:f,locale:h,listType:p,file:g,items:m,progress:v,iconRender:b=n.iconRender,actionIconRender:y=n.actionIconRender,itemRender:w=n.itemRender,isImgUrl:x,showPreviewIcon:$,showRemoveIcon:S,showDownloadIcon:_,previewIcon:P=n.previewIcon,removeIcon:O=n.removeIcon,downloadIcon:T=n.downloadIcon,onPreview:M,onDownload:I,onClose:k}=t,{class:E,style:R}=i,D=b({file:g});let F=C("div",{class:`${f}-text-icon`},[D]);if(p==="picture"||p==="picture-card")if(s.value==="uploading"||!g.thumbUrl&&!g.url){const K={[`${f}-list-item-thumbnail`]:!0,[`${f}-list-item-file`]:s.value!=="uploading"};F=C("div",{class:K},[D])}else{const K=x!=null&&x(g)?C("img",{src:g.thumbUrl||g.url,alt:g.name,class:`${f}-list-item-image`,crossorigin:g.crossOrigin},null):D,te={[`${f}-list-item-thumbnail`]:!0,[`${f}-list-item-file`]:x&&!x(g)};F=C("a",{class:te,onClick:ue=>M(g,ue),href:g.url||g.thumbUrl,target:"_blank",rel:"noopener noreferrer"},[K])}const N={[`${f}-list-item`]:!0,[`${f}-list-item-${s.value}`]:!0},B=typeof g.linkProps=="string"?JSON.parse(g.linkProps):g.linkProps,z=S?y({customIcon:O?O({file:g}):C(gv,null,null),callback:()=>k(g),prefixCls:f,title:h.removeFile}):null,W=_&&s.value==="done"?y({customIcon:T?T({file:g}):C(WC,null,null),callback:()=>I(g),prefixCls:f,title:h.downloadFile}):null,j=p!=="picture-card"&&C("span",{key:"download-delete",class:[`${f}-list-item-actions`,{picture:p==="picture"}]},[W,z]),U=`${f}-list-item-name`,V=g.url?[C("a",H(H({key:"view",target:"_blank",rel:"noopener noreferrer",class:U,title:g.name},B),{},{href:g.url,onClick:K=>M(g,K)}),[g.name]),j]:[C("span",{key:"view",class:U,onClick:K=>M(g,K),title:g.name},[g.name]),j],q={pointerEvents:"none",opacity:.5},Y=$?C("a",{href:g.url||g.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:g.url||g.thumbUrl?void 0:q,onClick:K=>M(g,K),title:h.previewFile},[P?P({file:g}):C(lf,null,null)]):null,J=p==="picture-card"&&s.value!=="uploading"&&C("span",{class:`${f}-list-item-actions`},[Y,s.value==="done"&&W,z]),Q=C("div",{class:N},[F,V,J,r.value&&C(En,c.value,{default:()=>[ni(C("div",{class:`${f}-list-item-progress`},["percent"in g?C(vC,H(H({},v),{},{type:"line",percent:g.percent}),null):null]),[[vi,s.value==="uploading"]])]})]),G={[`${f}-list-item-container`]:!0,[`${E}`]:!!E},ee=g.response&&typeof g.response=="string"?g.response:((u=g.error)===null||u===void 0?void 0:u.statusText)||((d=g.error)===null||d===void 0?void 0:d.message)||h.uploadError,X=s.value==="error"?C(Pi,{title:ee,getPopupContainer:K=>K.parentNode},{default:()=>[Q]}):Q;return C("div",{class:G,style:R},[w?w({originNode:X,file:g,fileList:m,actions:{download:I.bind(null,g),preview:M.bind(null,g),remove:k.bind(null,g)}}):X])}}}),dbe=(t,e)=>{let{slots:n}=e;var i;return Kt((i=n.default)===null||i===void 0?void 0:i.call(n))[0]},fbe=oe({compatConfig:{MODE:3},name:"AUploadList",props:ct(nbe(),{listType:"text",progress:{strokeWidth:2,showInfo:!1},showRemoveIcon:!0,showDownloadIcon:!1,showPreviewIcon:!0,previewFile:abe,isImageUrl:rbe,items:[],appendActionVisible:!0}),setup(t,e){let{slots:n,expose:i}=e;const o=ie(!1);Ze(()=>{o.value==!0});const r=ie([]);ye(()=>t.items,function(){let g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];r.value=g.slice()},{immediate:!0,deep:!0}),Ke(()=>{if(t.listType!=="picture"&&t.listType!=="picture-card")return;let g=!1;(t.items||[]).forEach((m,v)=>{typeof document>"u"||typeof window>"u"||!window.FileReader||!window.File||!(m.originFileObj instanceof File||m.originFileObj instanceof Blob)||m.thumbUrl!==void 0||(m.thumbUrl="",t.previewFile&&t.previewFile(m.originFileObj).then(b=>{const y=b||"";y!==m.thumbUrl&&(r.value[v].thumbUrl=y,g=!0)}))}),g&&OI(r)});const a=(g,m)=>{if(t.onPreview)return m==null||m.preventDefault(),t.onPreview(g)},s=g=>{typeof t.onDownload=="function"?t.onDownload(g):g.url&&window.open(g.url)},l=g=>{var m;(m=t.onRemove)===null||m===void 0||m.call(t,g)},c=g=>{let{file:m}=g;const v=t.iconRender||n.iconRender;if(v)return v({file:m,listType:t.listType});const b=m.status==="uploading",y=t.isImageUrl&&t.isImageUrl(m)?C(zC,null,null):C(HC,null,null);let w=C(b?yi:BC,null,null);return t.listType==="picture"?w=b?C(yi,null,null):y:t.listType==="picture-card"&&(w=b?t.locale.uploading:y),w},u=g=>{const{customIcon:m,callback:v,prefixCls:b,title:y}=g,w={type:"text",size:"small",title:y,onClick:()=>{v()},class:`${b}-list-item-action`};return cn(m)?C(nn,w,{icon:()=>m}):C(nn,w,{default:()=>[C("span",null,[m])]})};i({handlePreview:a,handleDownload:s});const{prefixCls:d,rootPrefixCls:f}=Me("upload",t),h=L(()=>({[`${d.value}-list`]:!0,[`${d.value}-list-${t.listType}`]:!0})),p=L(()=>{const g=A({},Jd(`${f.value}-motion-collapse`));delete g.onAfterAppear,delete g.onAfterEnter,delete g.onAfterLeave;const m=A(A({},Sm(`${d.value}-${t.listType==="picture-card"?"animate-inline":"animate"}`)),{class:h.value,appear:o.value});return t.listType!=="picture-card"?A(A({},g),m):m});return()=>{const{listType:g,locale:m,isImageUrl:v,showPreviewIcon:b,showRemoveIcon:y,showDownloadIcon:w,removeIcon:x,previewIcon:$,downloadIcon:S,progress:_,appendAction:P,itemRender:O,appendActionVisible:T}=t,M=P==null?void 0:P(),I=r.value;return C(nm,H(H({},p.value),{},{tag:"div"}),{default:()=>[I.map(k=>{const{uid:E}=k;return C(ube,{key:E,locale:m,prefixCls:d.value,file:k,items:I,progress:_,listType:g,isImgUrl:v,showPreviewIcon:b,showRemoveIcon:y,showDownloadIcon:w,onPreview:a,onDownload:s,onClose:l,removeIcon:x,previewIcon:$,downloadIcon:S,itemRender:O},A(A({},n),{iconRender:c,actionIconRender:u}))}),P?ni(C(dbe,{key:"__ant_upload_appendAction"},{default:()=>M}),[[vi,!!T]]):null]})}}}),hbe=t=>{const{componentCls:e,iconCls:n}=t;return{[`${e}-wrapper`]:{[`${e}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:t.colorFillAlter,border:`${t.lineWidth}px dashed ${t.colorBorder}`,borderRadius:t.borderRadiusLG,cursor:"pointer",transition:`border-color ${t.motionDurationSlow}`,[e]:{padding:`${t.padding}px 0`},[`${e}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none"},[`${e}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[`&:not(${e}-disabled):hover`]:{borderColor:t.colorPrimaryHover},[`p${e}-drag-icon`]:{marginBottom:t.margin,[n]:{color:t.colorPrimary,fontSize:t.uploadThumbnailSize}},[`p${e}-text`]:{margin:`0 0 ${t.marginXXS}px`,color:t.colorTextHeading,fontSize:t.fontSizeLG},[`p${e}-hint`]:{color:t.colorTextDescription,fontSize:t.fontSize},[`&${e}-disabled`]:{cursor:"not-allowed",[`p${e}-drag-icon ${n}, p${e}-text, p${e}-hint `]:{color:t.colorTextDisabled}}}}}},pbe=t=>{const{componentCls:e,antCls:n,iconCls:i,fontSize:o,lineHeight:r}=t,a=`${e}-list-item`,s=`${a}-actions`,l=`${a}-action`,c=Math.round(o*r);return{[`${e}-wrapper`]:{[`${e}-list`]:A(A({},Do()),{lineHeight:t.lineHeight,[a]:{position:"relative",height:t.lineHeight*o,marginTop:t.marginXS,fontSize:o,display:"flex",alignItems:"center",transition:`background-color ${t.motionDurationSlow}`,"&:hover":{backgroundColor:t.controlItemBgHover},[`${a}-name`]:A(A({},un),{padding:`0 ${t.paddingXS}px`,lineHeight:r,flex:"auto",transition:`all ${t.motionDurationSlow}`}),[s]:{[l]:{opacity:0},[`${l}${n}-btn-sm`]:{height:c,border:0,lineHeight:1,"> span":{transform:"scale(1)"}},[` ${l}:focus, &.picture ${l} - `]:{opacity:1},[i]:{color:t.colorTextDescription,transition:`all ${t.motionDurationSlow}`},[`&:hover ${i}`]:{color:t.colorText}},[`${e}-icon ${i}`]:{color:t.colorTextDescription,fontSize:o},[`${a}-progress`]:{position:"absolute",bottom:-t.uploadProgressOffset,width:"100%",paddingInlineStart:o+t.paddingXS,fontSize:o,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${a}:hover ${l}`]:{opacity:1,color:t.colorText},[`${a}-error`]:{color:t.colorError,[`${a}-name, ${e}-icon ${i}`]:{color:t.colorError},[s]:{[`${i}, ${i}:hover`]:{color:t.colorError},[l]:{opacity:1}}},[`${e}-list-item-container`]:{transition:`opacity ${t.motionDurationSlow}, height ${t.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},LO=new mt("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),FO=new mt("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}}),gbe=t=>{const{componentCls:e}=t,n=`${e}-animate-inline`;return[{[`${e}-wrapper`]:{[`${n}-appear, ${n}-enter, ${n}-leave`]:{animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseInOutCirc,animationFillMode:"forwards"},[`${n}-appear, ${n}-enter`]:{animationName:LO},[`${n}-leave`]:{animationName:FO}}},LO,FO]},mbe=t=>{const{componentCls:e,iconCls:n,uploadThumbnailSize:i,uploadProgressOffset:o}=t,r=`${e}-list`,a=`${r}-item`;return{[`${e}-wrapper`]:{[`${r}${r}-picture, ${r}${r}-picture-card`]:{[a]:{position:"relative",height:i+t.lineWidth*2+t.paddingXS*2,padding:t.paddingXS,border:`${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,borderRadius:t.borderRadiusLG,"&:hover":{background:"transparent"},[`${a}-thumbnail`]:A(A({},un),{width:i,height:i,lineHeight:`${i+t.paddingSM}px`,textAlign:"center",flex:"none",[n]:{fontSize:t.fontSizeHeading2,color:t.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${a}-progress`]:{bottom:o,width:`calc(100% - ${t.paddingSM*2}px)`,marginTop:0,paddingInlineStart:i+t.paddingXS}},[`${a}-error`]:{borderColor:t.colorError,[`${a}-thumbnail ${n}`]:{"svg path[fill='#e6f7ff']":{fill:t.colorErrorBg},"svg path[fill='#1890ff']":{fill:t.colorError}}},[`${a}-uploading`]:{borderStyle:"dashed",[`${a}-name`]:{marginBottom:o}}}}}},vbe=t=>{const{componentCls:e,iconCls:n,fontSizeLG:i,colorTextLightSolid:o}=t,r=`${e}-list`,a=`${r}-item`,s=t.uploadPicCardSize;return{[`${e}-wrapper${e}-picture-card-wrapper`]:A(A({},Do()),{display:"inline-block",width:"100%",[`${e}${e}-select`]:{width:s,height:s,marginInlineEnd:t.marginXS,marginBottom:t.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:t.colorFillAlter,border:`${t.lineWidth}px dashed ${t.colorBorder}`,borderRadius:t.borderRadiusLG,cursor:"pointer",transition:`border-color ${t.motionDurationSlow}`,[`> ${e}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${e}-disabled):hover`]:{borderColor:t.colorPrimary}},[`${r}${r}-picture-card`]:{[`${r}-item-container`]:{display:"inline-block",width:s,height:s,marginBlock:`0 ${t.marginXS}px`,marginInline:`0 ${t.marginXS}px`,verticalAlign:"top"},"&::after":{display:"none"},[a]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${t.paddingXS*2}px)`,height:`calc(100% - ${t.paddingXS*2}px)`,backgroundColor:t.colorBgMask,opacity:0,transition:`all ${t.motionDurationSlow}`,content:'" "'}},[`${a}:hover`]:{[`&::before, ${a}-actions`]:{opacity:1}},[`${a}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${t.motionDurationSlow}`,[`${n}-eye, ${n}-download, ${n}-delete`]:{zIndex:10,width:i,margin:`0 ${t.marginXXS}px`,fontSize:i,cursor:"pointer",transition:`all ${t.motionDurationSlow}`}},[`${a}-actions, ${a}-actions:hover`]:{[`${n}-eye, ${n}-download, ${n}-delete`]:{color:new Ot(o).setAlpha(.65).toRgbString(),"&:hover":{color:o}}},[`${a}-thumbnail, ${a}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${a}-name`]:{display:"none",textAlign:"center"},[`${a}-file + ${a}-name`]:{position:"absolute",bottom:t.margin,display:"block",width:`calc(100% - ${t.paddingXS*2}px)`},[`${a}-uploading`]:{[`&${a}`]:{backgroundColor:t.colorFillAlter},[`&::before, ${n}-eye, ${n}-download, ${n}-delete`]:{display:"none"}},[`${a}-progress`]:{bottom:t.marginXL,width:`calc(100% - ${t.paddingXS*2}px)`,paddingInlineStart:0}}})}},bbe=t=>{const{componentCls:e}=t;return{[`${e}-rtl`]:{direction:"rtl"}}},ybe=t=>{const{componentCls:e,colorTextDisabled:n}=t;return{[`${e}-wrapper`]:A(A({},rt(t)),{[e]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${e}-select`]:{display:"inline-block"},[`${e}-disabled`]:{color:n,cursor:"not-allowed"}})}},xbe=et("Upload",t=>{const{fontSizeHeading3:e,fontSize:n,lineHeight:i,lineWidth:o,controlHeightLG:r}=t,a=Math.round(n*i),s=Ve(t,{uploadThumbnailSize:e*2,uploadProgressOffset:a/2+o,uploadPicCardSize:r*2.55});return[ybe(s),hbe(s),mbe(s),vbe(s),pbe(s),gbe(s),bbe(s),Ud(s)]});var wbe=function(t,e,n,i){function o(r){return r instanceof n?r:new n(function(a){a(r)})}return new(n||(n=Promise))(function(r,a){function s(u){try{c(i.next(u))}catch(d){a(d)}}function l(u){try{c(i.throw(u))}catch(d){a(d)}}function c(u){u.done?r(u.value):o(u.value).then(s,l)}c((i=i.apply(t,e||[])).next())})},Sbe=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{var T;return(T=l.value)!==null&&T!==void 0?T:d.value}),[h,p]=jt(t.defaultFileList||[],{value:Ue(t,"fileList"),postState:T=>{const M=Date.now();return(T??[]).map((I,k)=>(!I.uid&&!Object.isFrozen(I)&&(I.uid=`__AUTO__${M}_${k}__`),I))}}),g=se("drop"),m=se(null);Ze(()=>{Nt(t.fileList!==void 0||i.value===void 0,"Upload","`value` is not a valid prop, do you mean `fileList`?"),Nt(t.transformFile===void 0,"Upload","`transformFile` is deprecated. Please use `beforeUpload` directly."),Nt(t.remove===void 0,"Upload","`remove` props is deprecated. Please use `remove` event.")});const v=(T,M,I)=>{var k,E;let R=[...M];t.maxCount===1?R=R.slice(-1):t.maxCount&&(R=R.slice(0,t.maxCount)),p(R);const D={file:T,fileList:R};I&&(D.event=I),(k=t["onUpdate:fileList"])===null||k===void 0||k.call(t,D.fileList),(E=t.onChange)===null||E===void 0||E.call(t,D),r.onFieldChange()},b=(T,M)=>wbe(this,void 0,void 0,function*(){const{beforeUpload:I,transformFile:k}=t;let E=T;if(I){const R=yield I(T,M);if(R===!1)return!1;if(delete T[vu],R===vu)return Object.defineProperty(T,vu,{value:!0,configurable:!0}),!1;typeof R=="object"&&R&&(E=R)}return k&&(E=yield k(E)),E}),y=T=>{const M=T.filter(E=>!E.file[vu]);if(!M.length)return;const I=M.map(E=>th(E.file));let k=[...h.value];I.forEach(E=>{k=nh(E,k)}),I.forEach((E,R)=>{let D=E;if(M[R].parsedFile)E.status="uploading";else{const{originFileObj:F}=E;let N;try{N=new File([F],F.name,{type:F.type})}catch{N=new Blob([F],{type:F.type}),N.name=F.name,N.lastModifiedDate=new Date,N.lastModified=new Date().getTime()}N.uid=E.uid,D=N}v(D,k)})},w=(T,M,I)=>{try{typeof T=="string"&&(T=JSON.parse(T))}catch{}if(!l0(M,h.value))return;const k=th(M);k.status="done",k.percent=100,k.response=T,k.xhr=I;const E=nh(k,h.value);v(k,E)},x=(T,M)=>{if(!l0(M,h.value))return;const I=th(M);I.status="uploading",I.percent=T.percent;const k=nh(I,h.value);v(I,k,T)},$=(T,M,I)=>{if(!l0(I,h.value))return;const k=th(I);k.error=T,k.response=M,k.status="error";const E=nh(k,h.value);v(k,E)},S=T=>{let M;const I=t.onRemove||t.remove;Promise.resolve(typeof I=="function"?I(T):I).then(k=>{var E,R;if(k===!1)return;const D=ibe(T,h.value);D&&(M=A(A({},T),{status:"removed"}),(E=h.value)===null||E===void 0||E.forEach(F=>{const N=M.uid!==void 0?"uid":"name";F[N]===M[N]&&!Object.isFrozen(F)&&(F.status="removed")}),(R=m.value)===null||R===void 0||R.abort(M),v(M,D))})},_=T=>{var M;g.value=T.type,T.type==="drop"&&((M=t.onDrop)===null||M===void 0||M.call(t,T))};o({onBatchStart:y,onSuccess:w,onProgress:x,onError:$,fileList:h,upload:m});const[P]=xo("Upload",bi.Upload,L(()=>t.locale)),O=(T,M)=>{const{removeIcon:I,previewIcon:k,downloadIcon:E,previewFile:R,onPreview:D,onDownload:F,isImageUrl:N,progress:B,itemRender:z,iconRender:W,showUploadList:j}=t,{showDownloadIcon:U,showPreviewIcon:V,showRemoveIcon:q}=typeof j=="boolean"?{}:j;return j?C(fbe,{prefixCls:a.value,listType:t.listType,items:h.value,previewFile:R,onPreview:D,onDownload:F,onRemove:S,showRemoveIcon:!f.value&&q,showPreviewIcon:V,showDownloadIcon:U,removeIcon:I,previewIcon:k,downloadIcon:E,iconRender:W,locale:P.value,isImageUrl:N,progress:B,itemRender:z,appendActionVisible:M,appendAction:T},A({},n)):T==null?void 0:T()};return()=>{var T,M,I;const{listType:k,type:E}=t,{class:R,style:D}=i,F=Sbe(i,["class","style"]),N=A(A(A({onBatchStart:y,onError:$,onProgress:x,onSuccess:w},F),t),{id:(T=t.id)!==null&&T!==void 0?T:r.id.value,prefixCls:a.value,beforeUpload:b,onChange:void 0,disabled:f.value});delete N.remove,(!n.default||f.value)&&delete N.id;const B={[`${a.value}-rtl`]:s.value==="rtl"};if(E==="drag"){const U=ce(a.value,{[`${a.value}-drag`]:!0,[`${a.value}-drag-uploading`]:h.value.some(V=>V.status==="uploading"),[`${a.value}-drag-hover`]:g.value==="dragover",[`${a.value}-disabled`]:f.value,[`${a.value}-rtl`]:s.value==="rtl"},i.class,u.value);return c(C("span",H(H({},i),{},{class:ce(`${a.value}-wrapper`,B,R,u.value)}),[C("div",{class:U,onDrop:_,onDragover:_,onDragleave:_,style:i.style},[C(MO,H(H({},N),{},{ref:m,class:`${a.value}-btn`}),H({default:()=>[C("div",{class:`${a.value}-drag-container`},[(M=n.default)===null||M===void 0?void 0:M.call(n)])]},n))]),O()]))}const z=ce(a.value,{[`${a.value}-select`]:!0,[`${a.value}-select-${k}`]:!0,[`${a.value}-disabled`]:f.value,[`${a.value}-rtl`]:s.value==="rtl"}),W=Dt((I=n.default)===null||I===void 0?void 0:I.call(n)),j=U=>C("div",{class:z,style:U},[C(MO,H(H({},N),{},{ref:m}),n)]);return c(k==="picture-card"?C("span",H(H({},i),{},{class:ce(`${a.value}-wrapper`,`${a.value}-picture-card-wrapper`,B,i.class,u.value)}),[O(j,!!(W&&W.length))]):C("span",H(H({},i),{},{class:ce(`${a.value}-wrapper`,B,i.class,u.value)}),[j(W&&W.length?void 0:{display:"none"}),O()]))}}});var NO=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{const{height:o}=t,r=NO(t,["height"]),{style:a}=i,s=NO(i,["style"]),l=A(A(A({},r),s),{type:"drag",style:A(A({},a),{height:typeof o=="number"?`${o}px`:o})});return C(Jh,l,n)}}}),Cbe=Qh,$be=A(Jh,{Dragger:Qh,LIST_IGNORE:vu,install(t){return t.component(Jh.name,Jh),t.component(Qh.name,Qh),t}});function Abe(t){return t.replace(/([A-Z])/g,"-$1").toLowerCase()}function _be(t){return Object.keys(t).map(e=>`${Abe(e)}: ${t[e]};`).join(" ")}function BO(){return window.devicePixelRatio||1}function c0(t,e,n,i){t.translate(e,n),t.rotate(Math.PI/180*Number(i)),t.translate(-e,-n)}const Pbe=(t,e)=>{let n=!1;return t.removedNodes.length&&(n=Array.from(t.removedNodes).some(i=>i===e)),t.type==="attributes"&&t.target===e&&(n=!0),n};var Tbe=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o2&&arguments[2]!==void 0?arguments[2]:{};const{window:i=s4}=n,o=Tbe(n,["window"]);let r;const a=r4(()=>i&&"MutationObserver"in i),s=()=>{r&&(r.disconnect(),r=void 0)},l=ye(()=>AS(t),u=>{s(),a.value&&i&&u&&(r=new MutationObserver(e),r.observe(u,o))},{immediate:!0}),c=()=>{s(),l()};return o4(c),{isSupported:a,stop:c}}const u0=2,zO=3,Ebe=()=>({zIndex:Number,rotate:Number,width:Number,height:Number,image:String,content:Xe([String,Array]),font:Fe(),rootClassName:String,gap:xt(),offset:xt()}),Mbe=oe({name:"AWatermark",inheritAttrs:!1,props:ct(Ebe(),{zIndex:9,rotate:-22,font:{},gap:[100,100]}),setup(t,e){let{slots:n,attrs:i}=e;const[,o]=Xr(),r=ie(),a=ie(),s=ie(!1),l=L(()=>{var O,T;return(T=(O=t.gap)===null||O===void 0?void 0:O[0])!==null&&T!==void 0?T:100}),c=L(()=>{var O,T;return(T=(O=t.gap)===null||O===void 0?void 0:O[1])!==null&&T!==void 0?T:100}),u=L(()=>l.value/2),d=L(()=>c.value/2),f=L(()=>{var O,T;return(T=(O=t.offset)===null||O===void 0?void 0:O[0])!==null&&T!==void 0?T:u.value}),h=L(()=>{var O,T;return(T=(O=t.offset)===null||O===void 0?void 0:O[1])!==null&&T!==void 0?T:d.value}),p=L(()=>{var O,T;return(T=(O=t.font)===null||O===void 0?void 0:O.fontSize)!==null&&T!==void 0?T:o.value.fontSizeLG}),g=L(()=>{var O,T;return(T=(O=t.font)===null||O===void 0?void 0:O.fontWeight)!==null&&T!==void 0?T:"normal"}),m=L(()=>{var O,T;return(T=(O=t.font)===null||O===void 0?void 0:O.fontStyle)!==null&&T!==void 0?T:"normal"}),v=L(()=>{var O,T;return(T=(O=t.font)===null||O===void 0?void 0:O.fontFamily)!==null&&T!==void 0?T:"sans-serif"}),b=L(()=>{var O,T;return(T=(O=t.font)===null||O===void 0?void 0:O.color)!==null&&T!==void 0?T:o.value.colorFill}),y=L(()=>{var O;const T={zIndex:(O=t.zIndex)!==null&&O!==void 0?O:9,position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",backgroundRepeat:"repeat"};let M=f.value-u.value,I=h.value-d.value;return M>0&&(T.left=`${M}px`,T.width=`calc(100% - ${M}px)`,M=0),I>0&&(T.top=`${I}px`,T.height=`calc(100% - ${I}px)`,I=0),T.backgroundPosition=`${M}px ${I}px`,T}),w=()=>{a.value&&(a.value.remove(),a.value=void 0)},x=(O,T)=>{var M;r.value&&a.value&&(s.value=!0,a.value.setAttribute("style",_be(A(A({},y.value),{backgroundImage:`url('${O}')`,backgroundSize:`${(l.value+T)*u0}px`}))),(M=r.value)===null||M===void 0||M.append(a.value),setTimeout(()=>{s.value=!1}))},$=O=>{let T=120,M=64;const I=t.content,k=t.image,E=t.width,R=t.height;if(!k&&O.measureText){O.font=`${Number(p.value)}px ${v.value}`;const D=Array.isArray(I)?I:[I],F=D.map(N=>O.measureText(N).width);T=Math.ceil(Math.max(...F)),M=Number(p.value)*D.length+(D.length-1)*zO}return[E??T,R??M]},S=(O,T,M,I,k)=>{const E=BO(),R=t.content,D=Number(p.value)*E;O.font=`${m.value} normal ${g.value} ${D}px/${k}px ${v.value}`,O.fillStyle=b.value,O.textAlign="center",O.textBaseline="top",O.translate(I/2,0);const F=Array.isArray(R)?R:[R];F==null||F.forEach((N,B)=>{O.fillText(N??"",T,M+B*(D+zO*E))})},_=()=>{var O;const T=document.createElement("canvas"),M=T.getContext("2d"),I=t.image,k=(O=t.rotate)!==null&&O!==void 0?O:-22;if(M){a.value||(a.value=document.createElement("div"));const E=BO(),[R,D]=$(M),F=(l.value+R)*E,N=(c.value+D)*E;T.setAttribute("width",`${F*u0}px`),T.setAttribute("height",`${N*u0}px`);const B=l.value*E/2,z=c.value*E/2,W=R*E,j=D*E,U=(W+l.value*E)/2,V=(j+c.value*E)/2,q=B+F,Y=z+N,J=U+F,Q=V+N;if(M.save(),c0(M,U,V,k),I){const G=new Image;G.onload=()=>{M.drawImage(G,B,z,W,j),M.restore(),c0(M,J,Q,k),M.drawImage(G,q,Y,W,j),x(T.toDataURL(),R)},G.crossOrigin="anonymous",G.referrerPolicy="no-referrer",G.src=I}else S(M,B,z,W,j),M.restore(),c0(M,J,Q,k),S(M,q,Y,W,j),x(T.toDataURL(),R)}};return Ze(()=>{_()}),ye(()=>[t,o.value.colorFill,o.value.fontSizeLG],()=>{_()},{deep:!0,flush:"post"}),at(()=>{w()}),Obe(r,O=>{s.value||O.forEach(T=>{Pbe(T,a.value)&&(w(),_())})},{attributes:!0,subtree:!0,childList:!0,attributeFilter:["style","class"]}),()=>{var O;return C("div",H(H({},i),{},{ref:r,class:[i.class,t.rootClassName],style:[{position:"relative"},i.style]}),[(O=n.default)===null||O===void 0?void 0:O.call(n)])}}}),Ibe=Vt(Mbe);function HO(t,e){return{[`${t}, ${t}:hover, ${t}:focus`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}}function WO(t){return{backgroundColor:t.bgColorSelected,boxShadow:t.boxShadow}}const kbe=A({overflow:"hidden"},un),Dbe=t=>{const{componentCls:e}=t;return{[e]:A(A(A(A(A({},rt(t)),{display:"inline-block",padding:t.segmentedContainerPadding,color:t.labelColor,backgroundColor:t.bgColor,borderRadius:t.borderRadius,transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`,[`${e}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",width:"100%"},[`&${e}-rtl`]:{direction:"rtl"},[`&${e}-block`]:{display:"flex"},[`&${e}-block ${e}-item`]:{flex:1,minWidth:0},[`${e}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${t.motionDurationMid} ${t.motionEaseInOut}`,borderRadius:t.borderRadiusSM,"&-selected":A(A({},WO(t)),{color:t.labelColorHover}),"&::after":{content:'""',position:"absolute",width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",transition:`background-color ${t.motionDurationMid}`,pointerEvents:"none"},[`&:hover:not(${e}-item-selected):not(${e}-item-disabled)`]:{color:t.labelColorHover,"&::after":{backgroundColor:t.bgColorHover}},"&-label":A({minHeight:t.controlHeight-t.segmentedContainerPadding*2,lineHeight:`${t.controlHeight-t.segmentedContainerPadding*2}px`,padding:`0 ${t.segmentedPaddingHorizontal}px`},kbe),"&-icon + *":{marginInlineStart:t.marginSM/2},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${e}-thumb`]:A(A({},WO(t)),{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${t.paddingXXS}px 0`,borderRadius:t.borderRadiusSM,[`& ~ ${e}-item:not(${e}-item-selected):not(${e}-item-disabled)::after`]:{backgroundColor:"transparent"}}),[`&${e}-lg`]:{borderRadius:t.borderRadiusLG,[`${e}-item-label`]:{minHeight:t.controlHeightLG-t.segmentedContainerPadding*2,lineHeight:`${t.controlHeightLG-t.segmentedContainerPadding*2}px`,padding:`0 ${t.segmentedPaddingHorizontal}px`,fontSize:t.fontSizeLG},[`${e}-item, ${e}-thumb`]:{borderRadius:t.borderRadius}},[`&${e}-sm`]:{borderRadius:t.borderRadiusSM,[`${e}-item-label`]:{minHeight:t.controlHeightSM-t.segmentedContainerPadding*2,lineHeight:`${t.controlHeightSM-t.segmentedContainerPadding*2}px`,padding:`0 ${t.segmentedPaddingHorizontalSM}px`},[`${e}-item, ${e}-thumb`]:{borderRadius:t.borderRadiusXS}}}),HO(`&-disabled ${e}-item`,t)),HO(`${e}-item-disabled`,t)),{[`${e}-thumb-motion-appear-active`]:{transition:`transform ${t.motionDurationSlow} ${t.motionEaseInOut}, width ${t.motionDurationSlow} ${t.motionEaseInOut}`,willChange:"transform, width"}})}},Rbe=et("Segmented",t=>{const{lineWidthBold:e,lineWidth:n,colorTextLabel:i,colorText:o,colorFillSecondary:r,colorBgLayout:a,colorBgElevated:s}=t,l=Ve(t,{segmentedPaddingHorizontal:t.controlPaddingHorizontal-n,segmentedPaddingHorizontalSM:t.controlPaddingHorizontalSM-n,segmentedContainerPadding:e,labelColor:i,labelColorHover:o,bgColor:a,bgColorHover:r,bgColorSelected:s});return[Dbe(l)]}),jO=t=>t?{left:t.offsetLeft,right:t.parentElement.clientWidth-t.clientWidth-t.offsetLeft,width:t.clientWidth}:null,vl=t=>t!==void 0?`${t}px`:void 0,Lbe=oe({props:{value:Rt(),getValueIndex:Rt(),prefixCls:Rt(),motionName:Rt(),onMotionStart:Rt(),onMotionEnd:Rt(),direction:Rt(),containerRef:Rt()},emits:["motionStart","motionEnd"],setup(t,e){let{emit:n}=e;const i=se(),o=p=>{var g;const m=t.getValueIndex(p),v=(g=t.containerRef.value)===null||g===void 0?void 0:g.querySelectorAll(`.${t.prefixCls}-item`)[m];return(v==null?void 0:v.offsetParent)&&v},r=se(null),a=se(null);ye(()=>t.value,(p,g)=>{const m=o(g),v=o(p),b=jO(m),y=jO(v);r.value=b,a.value=y,n(m&&v?"motionStart":"motionEnd")},{flush:"post"});const s=L(()=>{var p,g;return t.direction==="rtl"?vl(-((p=r.value)===null||p===void 0?void 0:p.right)):vl((g=r.value)===null||g===void 0?void 0:g.left)}),l=L(()=>{var p,g;return t.direction==="rtl"?vl(-((p=a.value)===null||p===void 0?void 0:p.right)):vl((g=a.value)===null||g===void 0?void 0:g.left)});let c;const u=p=>{clearTimeout(c),pt(()=>{p&&(p.style.transform="translateX(var(--thumb-start-left))",p.style.width="var(--thumb-start-width)")})},d=p=>{c=setTimeout(()=>{p&&(Zp(p,`${t.motionName}-appear-active`),p.style.transform="translateX(var(--thumb-active-left))",p.style.width="var(--thumb-active-width)")})},f=p=>{r.value=null,a.value=null,p&&(p.style.transform=null,p.style.width=null,Jp(p,`${t.motionName}-appear-active`)),n("motionEnd")},h=L(()=>{var p,g;return{"--thumb-start-left":s.value,"--thumb-start-width":vl((p=r.value)===null||p===void 0?void 0:p.width),"--thumb-active-left":l.value,"--thumb-active-width":vl((g=a.value)===null||g===void 0?void 0:g.width)}});return at(()=>{clearTimeout(c)}),()=>{const p={ref:i,style:h.value,class:[`${t.prefixCls}-thumb`]};return C(En,{appear:!0,onBeforeEnter:u,onEnter:d,onAfterEnter:f},{default:()=>[!r.value||!a.value?null:C("div",p,null)]})}}});function Fbe(t){return t.map(e=>typeof e=="object"&&e!==null?e:{label:e==null?void 0:e.toString(),title:e==null?void 0:e.toString(),value:e})}const Nbe=()=>({prefixCls:String,options:xt(),block:Ce(),disabled:Ce(),size:Ne(),value:A(A({},Xe([String,Number])),{required:!0}),motionName:String,onChange:ve(),"onUpdate:value":ve()}),E5=(t,e)=>{let{slots:n,emit:i}=e;const{value:o,disabled:r,payload:a,title:s,prefixCls:l,label:c=n.label,checked:u,className:d}=t,f=h=>{r||i("change",h,o)};return C("label",{class:ce({[`${l}-item-disabled`]:r},d)},[C("input",{class:`${l}-item-input`,type:"radio",disabled:r,checked:u,onChange:f},null),C("div",{class:`${l}-item-label`,title:typeof s=="string"?s:""},[typeof c=="function"?c({value:o,disabled:r,payload:a,title:s}):c??o])])};E5.inheritAttrs=!1;const Bbe=oe({name:"ASegmented",inheritAttrs:!1,props:ct(Nbe(),{options:[],motionName:"thumb-motion"}),slots:Object,setup(t,e){let{emit:n,slots:i,attrs:o}=e;const{prefixCls:r,direction:a,size:s}=Me("segmented",t),[l,c]=Rbe(r),u=ie(),d=ie(!1),f=L(()=>Fbe(t.options)),h=(p,g)=>{t.disabled||(n("update:value",g),n("change",g))};return()=>{const p=r.value;return l(C("div",H(H({},o),{},{class:ce(p,{[c.value]:!0,[`${p}-block`]:t.block,[`${p}-disabled`]:t.disabled,[`${p}-lg`]:s.value=="large",[`${p}-sm`]:s.value=="small",[`${p}-rtl`]:a.value==="rtl"},o.class),ref:u}),[C("div",{class:`${p}-group`},[C(Lbe,{containerRef:u,prefixCls:p,value:t.value,motionName:`${p}-${t.motionName}`,direction:a.value,getValueIndex:g=>f.value.findIndex(m=>m.value===g),onMotionStart:()=>{d.value=!0},onMotionEnd:()=>{d.value=!1}},null),f.value.map(g=>C(E5,H(H({key:g.value,prefixCls:p,checked:g.value===t.value,onChange:h},g),{},{className:ce(g.className,`${p}-item`,{[`${p}-item-selected`]:g.value===t.value&&!d.value}),disabled:!!t.disabled||!!g.disabled}),i))])]))}}}),zbe=Vt(Bbe),Hbe=t=>{const{componentCls:e}=t;return{[e]:A(A({},rt(t)),{display:"flex",justifyContent:"center",alignItems:"center",padding:t.paddingSM,backgroundColor:t.colorWhite,borderRadius:t.borderRadiusLG,border:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`,position:"relative",width:"100%",height:"100%",overflow:"hidden",[`& > ${e}-mask`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:10,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",color:t.colorText,lineHeight:t.lineHeight,background:t.QRCodeMaskBackgroundColor,textAlign:"center",[`& > ${e}-expired , & > ${e}-scanned`]:{color:t.QRCodeTextColor}},"&-icon":{marginBlockEnd:t.marginXS,fontSize:t.controlHeight}}),[`${e}-borderless`]:{borderColor:"transparent"}}},Wbe=et("QRCode",t=>Hbe(Ve(t,{QRCodeTextColor:"rgba(0, 0, 0, 0.88)",QRCodeMaskBackgroundColor:"rgba(255, 255, 255, 0.96)"})));var jbe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"};function VO(t){for(var e=1;e({size:{type:Number,default:160},value:{type:String,required:!0},type:Ne("canvas"),color:String,bgColor:String,includeMargin:Boolean,imageSettings:Fe()}),Xbe=()=>A(A({},VC()),{errorLevel:Ne("M"),icon:String,iconSize:{type:Number,default:40},status:Ne("active"),bordered:{type:Boolean,default:!0}});/** + `]:{opacity:1},[i]:{color:t.colorTextDescription,transition:`all ${t.motionDurationSlow}`},[`&:hover ${i}`]:{color:t.colorText}},[`${e}-icon ${i}`]:{color:t.colorTextDescription,fontSize:o},[`${a}-progress`]:{position:"absolute",bottom:-t.uploadProgressOffset,width:"100%",paddingInlineStart:o+t.paddingXS,fontSize:o,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${a}:hover ${l}`]:{opacity:1,color:t.colorText},[`${a}-error`]:{color:t.colorError,[`${a}-name, ${e}-icon ${i}`]:{color:t.colorError},[s]:{[`${i}, ${i}:hover`]:{color:t.colorError},[l]:{opacity:1}}},[`${e}-list-item-container`]:{transition:`opacity ${t.motionDurationSlow}, height ${t.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},LO=new mt("uploadAnimateInlineIn",{from:{width:0,height:0,margin:0,padding:0,opacity:0}}),FO=new mt("uploadAnimateInlineOut",{to:{width:0,height:0,margin:0,padding:0,opacity:0}}),gbe=t=>{const{componentCls:e}=t,n=`${e}-animate-inline`;return[{[`${e}-wrapper`]:{[`${n}-appear, ${n}-enter, ${n}-leave`]:{animationDuration:t.motionDurationSlow,animationTimingFunction:t.motionEaseInOutCirc,animationFillMode:"forwards"},[`${n}-appear, ${n}-enter`]:{animationName:LO},[`${n}-leave`]:{animationName:FO}}},LO,FO]},mbe=t=>{const{componentCls:e,iconCls:n,uploadThumbnailSize:i,uploadProgressOffset:o}=t,r=`${e}-list`,a=`${r}-item`;return{[`${e}-wrapper`]:{[`${r}${r}-picture, ${r}${r}-picture-card`]:{[a]:{position:"relative",height:i+t.lineWidth*2+t.paddingXS*2,padding:t.paddingXS,border:`${t.lineWidth}px ${t.lineType} ${t.colorBorder}`,borderRadius:t.borderRadiusLG,"&:hover":{background:"transparent"},[`${a}-thumbnail`]:A(A({},un),{width:i,height:i,lineHeight:`${i+t.paddingSM}px`,textAlign:"center",flex:"none",[n]:{fontSize:t.fontSizeHeading2,color:t.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${a}-progress`]:{bottom:o,width:`calc(100% - ${t.paddingSM*2}px)`,marginTop:0,paddingInlineStart:i+t.paddingXS}},[`${a}-error`]:{borderColor:t.colorError,[`${a}-thumbnail ${n}`]:{"svg path[fill='#e6f7ff']":{fill:t.colorErrorBg},"svg path[fill='#1890ff']":{fill:t.colorError}}},[`${a}-uploading`]:{borderStyle:"dashed",[`${a}-name`]:{marginBottom:o}}}}}},vbe=t=>{const{componentCls:e,iconCls:n,fontSizeLG:i,colorTextLightSolid:o}=t,r=`${e}-list`,a=`${r}-item`,s=t.uploadPicCardSize;return{[`${e}-wrapper${e}-picture-card-wrapper`]:A(A({},Do()),{display:"inline-block",width:"100%",[`${e}${e}-select`]:{width:s,height:s,marginInlineEnd:t.marginXS,marginBottom:t.marginXS,textAlign:"center",verticalAlign:"top",backgroundColor:t.colorFillAlter,border:`${t.lineWidth}px dashed ${t.colorBorder}`,borderRadius:t.borderRadiusLG,cursor:"pointer",transition:`border-color ${t.motionDurationSlow}`,[`> ${e}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${e}-disabled):hover`]:{borderColor:t.colorPrimary}},[`${r}${r}-picture-card`]:{[`${r}-item-container`]:{display:"inline-block",width:s,height:s,marginBlock:`0 ${t.marginXS}px`,marginInline:`0 ${t.marginXS}px`,verticalAlign:"top"},"&::after":{display:"none"},[a]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${t.paddingXS*2}px)`,height:`calc(100% - ${t.paddingXS*2}px)`,backgroundColor:t.colorBgMask,opacity:0,transition:`all ${t.motionDurationSlow}`,content:'" "'}},[`${a}:hover`]:{[`&::before, ${a}-actions`]:{opacity:1}},[`${a}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${t.motionDurationSlow}`,[`${n}-eye, ${n}-download, ${n}-delete`]:{zIndex:10,width:i,margin:`0 ${t.marginXXS}px`,fontSize:i,cursor:"pointer",transition:`all ${t.motionDurationSlow}`}},[`${a}-actions, ${a}-actions:hover`]:{[`${n}-eye, ${n}-download, ${n}-delete`]:{color:new Ot(o).setAlpha(.65).toRgbString(),"&:hover":{color:o}}},[`${a}-thumbnail, ${a}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${a}-name`]:{display:"none",textAlign:"center"},[`${a}-file + ${a}-name`]:{position:"absolute",bottom:t.margin,display:"block",width:`calc(100% - ${t.paddingXS*2}px)`},[`${a}-uploading`]:{[`&${a}`]:{backgroundColor:t.colorFillAlter},[`&::before, ${n}-eye, ${n}-download, ${n}-delete`]:{display:"none"}},[`${a}-progress`]:{bottom:t.marginXL,width:`calc(100% - ${t.paddingXS*2}px)`,paddingInlineStart:0}}})}},bbe=t=>{const{componentCls:e}=t;return{[`${e}-rtl`]:{direction:"rtl"}}},ybe=t=>{const{componentCls:e,colorTextDisabled:n}=t;return{[`${e}-wrapper`]:A(A({},rt(t)),{[e]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${e}-select`]:{display:"inline-block"},[`${e}-disabled`]:{color:n,cursor:"not-allowed"}})}},xbe=et("Upload",t=>{const{fontSizeHeading3:e,fontSize:n,lineHeight:i,lineWidth:o,controlHeightLG:r}=t,a=Math.round(n*i),s=Ve(t,{uploadThumbnailSize:e*2,uploadProgressOffset:a/2+o,uploadPicCardSize:r*2.55});return[ybe(s),hbe(s),mbe(s),vbe(s),pbe(s),gbe(s),bbe(s),qd(s)]});var wbe=function(t,e,n,i){function o(r){return r instanceof n?r:new n(function(a){a(r)})}return new(n||(n=Promise))(function(r,a){function s(u){try{c(i.next(u))}catch(d){a(d)}}function l(u){try{c(i.throw(u))}catch(d){a(d)}}function c(u){u.done?r(u.value):o(u.value).then(s,l)}c((i=i.apply(t,e||[])).next())})},Sbe=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{var T;return(T=l.value)!==null&&T!==void 0?T:d.value}),[h,p]=jt(t.defaultFileList||[],{value:Ue(t,"fileList"),postState:T=>{const M=Date.now();return(T??[]).map((I,k)=>(!I.uid&&!Object.isFrozen(I)&&(I.uid=`__AUTO__${M}_${k}__`),I))}}),g=se("drop"),m=se(null);Ze(()=>{Nt(t.fileList!==void 0||i.value===void 0,"Upload","`value` is not a valid prop, do you mean `fileList`?"),Nt(t.transformFile===void 0,"Upload","`transformFile` is deprecated. Please use `beforeUpload` directly."),Nt(t.remove===void 0,"Upload","`remove` props is deprecated. Please use `remove` event.")});const v=(T,M,I)=>{var k,E;let R=[...M];t.maxCount===1?R=R.slice(-1):t.maxCount&&(R=R.slice(0,t.maxCount)),p(R);const D={file:T,fileList:R};I&&(D.event=I),(k=t["onUpdate:fileList"])===null||k===void 0||k.call(t,D.fileList),(E=t.onChange)===null||E===void 0||E.call(t,D),r.onFieldChange()},b=(T,M)=>wbe(this,void 0,void 0,function*(){const{beforeUpload:I,transformFile:k}=t;let E=T;if(I){const R=yield I(T,M);if(R===!1)return!1;if(delete T[bu],R===bu)return Object.defineProperty(T,bu,{value:!0,configurable:!0}),!1;typeof R=="object"&&R&&(E=R)}return k&&(E=yield k(E)),E}),y=T=>{const M=T.filter(E=>!E.file[bu]);if(!M.length)return;const I=M.map(E=>nh(E.file));let k=[...h.value];I.forEach(E=>{k=ih(E,k)}),I.forEach((E,R)=>{let D=E;if(M[R].parsedFile)E.status="uploading";else{const{originFileObj:F}=E;let N;try{N=new File([F],F.name,{type:F.type})}catch{N=new Blob([F],{type:F.type}),N.name=F.name,N.lastModifiedDate=new Date,N.lastModified=new Date().getTime()}N.uid=E.uid,D=N}v(D,k)})},w=(T,M,I)=>{try{typeof T=="string"&&(T=JSON.parse(T))}catch{}if(!l0(M,h.value))return;const k=nh(M);k.status="done",k.percent=100,k.response=T,k.xhr=I;const E=ih(k,h.value);v(k,E)},x=(T,M)=>{if(!l0(M,h.value))return;const I=nh(M);I.status="uploading",I.percent=T.percent;const k=ih(I,h.value);v(I,k,T)},$=(T,M,I)=>{if(!l0(I,h.value))return;const k=nh(I);k.error=T,k.response=M,k.status="error";const E=ih(k,h.value);v(k,E)},S=T=>{let M;const I=t.onRemove||t.remove;Promise.resolve(typeof I=="function"?I(T):I).then(k=>{var E,R;if(k===!1)return;const D=ibe(T,h.value);D&&(M=A(A({},T),{status:"removed"}),(E=h.value)===null||E===void 0||E.forEach(F=>{const N=M.uid!==void 0?"uid":"name";F[N]===M[N]&&!Object.isFrozen(F)&&(F.status="removed")}),(R=m.value)===null||R===void 0||R.abort(M),v(M,D))})},_=T=>{var M;g.value=T.type,T.type==="drop"&&((M=t.onDrop)===null||M===void 0||M.call(t,T))};o({onBatchStart:y,onSuccess:w,onProgress:x,onError:$,fileList:h,upload:m});const[P]=xo("Upload",bi.Upload,L(()=>t.locale)),O=(T,M)=>{const{removeIcon:I,previewIcon:k,downloadIcon:E,previewFile:R,onPreview:D,onDownload:F,isImageUrl:N,progress:B,itemRender:z,iconRender:W,showUploadList:j}=t,{showDownloadIcon:U,showPreviewIcon:V,showRemoveIcon:q}=typeof j=="boolean"?{}:j;return j?C(fbe,{prefixCls:a.value,listType:t.listType,items:h.value,previewFile:R,onPreview:D,onDownload:F,onRemove:S,showRemoveIcon:!f.value&&q,showPreviewIcon:V,showDownloadIcon:U,removeIcon:I,previewIcon:k,downloadIcon:E,iconRender:W,locale:P.value,isImageUrl:N,progress:B,itemRender:z,appendActionVisible:M,appendAction:T},A({},n)):T==null?void 0:T()};return()=>{var T,M,I;const{listType:k,type:E}=t,{class:R,style:D}=i,F=Sbe(i,["class","style"]),N=A(A(A({onBatchStart:y,onError:$,onProgress:x,onSuccess:w},F),t),{id:(T=t.id)!==null&&T!==void 0?T:r.id.value,prefixCls:a.value,beforeUpload:b,onChange:void 0,disabled:f.value});delete N.remove,(!n.default||f.value)&&delete N.id;const B={[`${a.value}-rtl`]:s.value==="rtl"};if(E==="drag"){const U=ce(a.value,{[`${a.value}-drag`]:!0,[`${a.value}-drag-uploading`]:h.value.some(V=>V.status==="uploading"),[`${a.value}-drag-hover`]:g.value==="dragover",[`${a.value}-disabled`]:f.value,[`${a.value}-rtl`]:s.value==="rtl"},i.class,u.value);return c(C("span",H(H({},i),{},{class:ce(`${a.value}-wrapper`,B,R,u.value)}),[C("div",{class:U,onDrop:_,onDragover:_,onDragleave:_,style:i.style},[C(MO,H(H({},N),{},{ref:m,class:`${a.value}-btn`}),H({default:()=>[C("div",{class:`${a.value}-drag-container`},[(M=n.default)===null||M===void 0?void 0:M.call(n)])]},n))]),O()]))}const z=ce(a.value,{[`${a.value}-select`]:!0,[`${a.value}-select-${k}`]:!0,[`${a.value}-disabled`]:f.value,[`${a.value}-rtl`]:s.value==="rtl"}),W=Dt((I=n.default)===null||I===void 0?void 0:I.call(n)),j=U=>C("div",{class:z,style:U},[C(MO,H(H({},N),{},{ref:m}),n)]);return c(k==="picture-card"?C("span",H(H({},i),{},{class:ce(`${a.value}-wrapper`,`${a.value}-picture-card-wrapper`,B,i.class,u.value)}),[O(j,!!(W&&W.length))]):C("span",H(H({},i),{},{class:ce(`${a.value}-wrapper`,B,i.class,u.value)}),[j(W&&W.length?void 0:{display:"none"}),O()]))}}});var NO=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{const{height:o}=t,r=NO(t,["height"]),{style:a}=i,s=NO(i,["style"]),l=A(A(A({},r),s),{type:"drag",style:A(A({},a),{height:typeof o=="number"?`${o}px`:o})});return C(Qh,l,n)}}}),Cbe=ep,$be=A(Qh,{Dragger:ep,LIST_IGNORE:bu,install(t){return t.component(Qh.name,Qh),t.component(ep.name,ep),t}});function Abe(t){return t.replace(/([A-Z])/g,"-$1").toLowerCase()}function _be(t){return Object.keys(t).map(e=>`${Abe(e)}: ${t[e]};`).join(" ")}function BO(){return window.devicePixelRatio||1}function c0(t,e,n,i){t.translate(e,n),t.rotate(Math.PI/180*Number(i)),t.translate(-e,-n)}const Pbe=(t,e)=>{let n=!1;return t.removedNodes.length&&(n=Array.from(t.removedNodes).some(i=>i===e)),t.type==="attributes"&&t.target===e&&(n=!0),n};var Tbe=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o2&&arguments[2]!==void 0?arguments[2]:{};const{window:i=s4}=n,o=Tbe(n,["window"]);let r;const a=r4(()=>i&&"MutationObserver"in i),s=()=>{r&&(r.disconnect(),r=void 0)},l=ye(()=>AS(t),u=>{s(),a.value&&i&&u&&(r=new MutationObserver(e),r.observe(u,o))},{immediate:!0}),c=()=>{s(),l()};return o4(c),{isSupported:a,stop:c}}const u0=2,zO=3,Ebe=()=>({zIndex:Number,rotate:Number,width:Number,height:Number,image:String,content:Xe([String,Array]),font:Fe(),rootClassName:String,gap:xt(),offset:xt()}),Mbe=oe({name:"AWatermark",inheritAttrs:!1,props:ct(Ebe(),{zIndex:9,rotate:-22,font:{},gap:[100,100]}),setup(t,e){let{slots:n,attrs:i}=e;const[,o]=Xr(),r=ie(),a=ie(),s=ie(!1),l=L(()=>{var O,T;return(T=(O=t.gap)===null||O===void 0?void 0:O[0])!==null&&T!==void 0?T:100}),c=L(()=>{var O,T;return(T=(O=t.gap)===null||O===void 0?void 0:O[1])!==null&&T!==void 0?T:100}),u=L(()=>l.value/2),d=L(()=>c.value/2),f=L(()=>{var O,T;return(T=(O=t.offset)===null||O===void 0?void 0:O[0])!==null&&T!==void 0?T:u.value}),h=L(()=>{var O,T;return(T=(O=t.offset)===null||O===void 0?void 0:O[1])!==null&&T!==void 0?T:d.value}),p=L(()=>{var O,T;return(T=(O=t.font)===null||O===void 0?void 0:O.fontSize)!==null&&T!==void 0?T:o.value.fontSizeLG}),g=L(()=>{var O,T;return(T=(O=t.font)===null||O===void 0?void 0:O.fontWeight)!==null&&T!==void 0?T:"normal"}),m=L(()=>{var O,T;return(T=(O=t.font)===null||O===void 0?void 0:O.fontStyle)!==null&&T!==void 0?T:"normal"}),v=L(()=>{var O,T;return(T=(O=t.font)===null||O===void 0?void 0:O.fontFamily)!==null&&T!==void 0?T:"sans-serif"}),b=L(()=>{var O,T;return(T=(O=t.font)===null||O===void 0?void 0:O.color)!==null&&T!==void 0?T:o.value.colorFill}),y=L(()=>{var O;const T={zIndex:(O=t.zIndex)!==null&&O!==void 0?O:9,position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",backgroundRepeat:"repeat"};let M=f.value-u.value,I=h.value-d.value;return M>0&&(T.left=`${M}px`,T.width=`calc(100% - ${M}px)`,M=0),I>0&&(T.top=`${I}px`,T.height=`calc(100% - ${I}px)`,I=0),T.backgroundPosition=`${M}px ${I}px`,T}),w=()=>{a.value&&(a.value.remove(),a.value=void 0)},x=(O,T)=>{var M;r.value&&a.value&&(s.value=!0,a.value.setAttribute("style",_be(A(A({},y.value),{backgroundImage:`url('${O}')`,backgroundSize:`${(l.value+T)*u0}px`}))),(M=r.value)===null||M===void 0||M.append(a.value),setTimeout(()=>{s.value=!1}))},$=O=>{let T=120,M=64;const I=t.content,k=t.image,E=t.width,R=t.height;if(!k&&O.measureText){O.font=`${Number(p.value)}px ${v.value}`;const D=Array.isArray(I)?I:[I],F=D.map(N=>O.measureText(N).width);T=Math.ceil(Math.max(...F)),M=Number(p.value)*D.length+(D.length-1)*zO}return[E??T,R??M]},S=(O,T,M,I,k)=>{const E=BO(),R=t.content,D=Number(p.value)*E;O.font=`${m.value} normal ${g.value} ${D}px/${k}px ${v.value}`,O.fillStyle=b.value,O.textAlign="center",O.textBaseline="top",O.translate(I/2,0);const F=Array.isArray(R)?R:[R];F==null||F.forEach((N,B)=>{O.fillText(N??"",T,M+B*(D+zO*E))})},_=()=>{var O;const T=document.createElement("canvas"),M=T.getContext("2d"),I=t.image,k=(O=t.rotate)!==null&&O!==void 0?O:-22;if(M){a.value||(a.value=document.createElement("div"));const E=BO(),[R,D]=$(M),F=(l.value+R)*E,N=(c.value+D)*E;T.setAttribute("width",`${F*u0}px`),T.setAttribute("height",`${N*u0}px`);const B=l.value*E/2,z=c.value*E/2,W=R*E,j=D*E,U=(W+l.value*E)/2,V=(j+c.value*E)/2,q=B+F,Y=z+N,J=U+F,Q=V+N;if(M.save(),c0(M,U,V,k),I){const G=new Image;G.onload=()=>{M.drawImage(G,B,z,W,j),M.restore(),c0(M,J,Q,k),M.drawImage(G,q,Y,W,j),x(T.toDataURL(),R)},G.crossOrigin="anonymous",G.referrerPolicy="no-referrer",G.src=I}else S(M,B,z,W,j),M.restore(),c0(M,J,Q,k),S(M,q,Y,W,j),x(T.toDataURL(),R)}};return Ze(()=>{_()}),ye(()=>[t,o.value.colorFill,o.value.fontSizeLG],()=>{_()},{deep:!0,flush:"post"}),at(()=>{w()}),Obe(r,O=>{s.value||O.forEach(T=>{Pbe(T,a.value)&&(w(),_())})},{attributes:!0,subtree:!0,childList:!0,attributeFilter:["style","class"]}),()=>{var O;return C("div",H(H({},i),{},{ref:r,class:[i.class,t.rootClassName],style:[{position:"relative"},i.style]}),[(O=n.default)===null||O===void 0?void 0:O.call(n)])}}}),Ibe=Vt(Mbe);function HO(t,e){return{[`${t}, ${t}:hover, ${t}:focus`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}}function WO(t){return{backgroundColor:t.bgColorSelected,boxShadow:t.boxShadow}}const kbe=A({overflow:"hidden"},un),Dbe=t=>{const{componentCls:e}=t;return{[e]:A(A(A(A(A({},rt(t)),{display:"inline-block",padding:t.segmentedContainerPadding,color:t.labelColor,backgroundColor:t.bgColor,borderRadius:t.borderRadius,transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`,[`${e}-group`]:{position:"relative",display:"flex",alignItems:"stretch",justifyItems:"flex-start",width:"100%"},[`&${e}-rtl`]:{direction:"rtl"},[`&${e}-block`]:{display:"flex"},[`&${e}-block ${e}-item`]:{flex:1,minWidth:0},[`${e}-item`]:{position:"relative",textAlign:"center",cursor:"pointer",transition:`color ${t.motionDurationMid} ${t.motionEaseInOut}`,borderRadius:t.borderRadiusSM,"&-selected":A(A({},WO(t)),{color:t.labelColorHover}),"&::after":{content:'""',position:"absolute",width:"100%",height:"100%",top:0,insetInlineStart:0,borderRadius:"inherit",transition:`background-color ${t.motionDurationMid}`,pointerEvents:"none"},[`&:hover:not(${e}-item-selected):not(${e}-item-disabled)`]:{color:t.labelColorHover,"&::after":{backgroundColor:t.bgColorHover}},"&-label":A({minHeight:t.controlHeight-t.segmentedContainerPadding*2,lineHeight:`${t.controlHeight-t.segmentedContainerPadding*2}px`,padding:`0 ${t.segmentedPaddingHorizontal}px`},kbe),"&-icon + *":{marginInlineStart:t.marginSM/2},"&-input":{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:0,opacity:0,pointerEvents:"none"}},[`${e}-thumb`]:A(A({},WO(t)),{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:0,height:"100%",padding:`${t.paddingXXS}px 0`,borderRadius:t.borderRadiusSM,[`& ~ ${e}-item:not(${e}-item-selected):not(${e}-item-disabled)::after`]:{backgroundColor:"transparent"}}),[`&${e}-lg`]:{borderRadius:t.borderRadiusLG,[`${e}-item-label`]:{minHeight:t.controlHeightLG-t.segmentedContainerPadding*2,lineHeight:`${t.controlHeightLG-t.segmentedContainerPadding*2}px`,padding:`0 ${t.segmentedPaddingHorizontal}px`,fontSize:t.fontSizeLG},[`${e}-item, ${e}-thumb`]:{borderRadius:t.borderRadius}},[`&${e}-sm`]:{borderRadius:t.borderRadiusSM,[`${e}-item-label`]:{minHeight:t.controlHeightSM-t.segmentedContainerPadding*2,lineHeight:`${t.controlHeightSM-t.segmentedContainerPadding*2}px`,padding:`0 ${t.segmentedPaddingHorizontalSM}px`},[`${e}-item, ${e}-thumb`]:{borderRadius:t.borderRadiusXS}}}),HO(`&-disabled ${e}-item`,t)),HO(`${e}-item-disabled`,t)),{[`${e}-thumb-motion-appear-active`]:{transition:`transform ${t.motionDurationSlow} ${t.motionEaseInOut}, width ${t.motionDurationSlow} ${t.motionEaseInOut}`,willChange:"transform, width"}})}},Rbe=et("Segmented",t=>{const{lineWidthBold:e,lineWidth:n,colorTextLabel:i,colorText:o,colorFillSecondary:r,colorBgLayout:a,colorBgElevated:s}=t,l=Ve(t,{segmentedPaddingHorizontal:t.controlPaddingHorizontal-n,segmentedPaddingHorizontalSM:t.controlPaddingHorizontalSM-n,segmentedContainerPadding:e,labelColor:i,labelColorHover:o,bgColor:a,bgColorHover:r,bgColorSelected:s});return[Dbe(l)]}),jO=t=>t?{left:t.offsetLeft,right:t.parentElement.clientWidth-t.clientWidth-t.offsetLeft,width:t.clientWidth}:null,vl=t=>t!==void 0?`${t}px`:void 0,Lbe=oe({props:{value:Rt(),getValueIndex:Rt(),prefixCls:Rt(),motionName:Rt(),onMotionStart:Rt(),onMotionEnd:Rt(),direction:Rt(),containerRef:Rt()},emits:["motionStart","motionEnd"],setup(t,e){let{emit:n}=e;const i=se(),o=p=>{var g;const m=t.getValueIndex(p),v=(g=t.containerRef.value)===null||g===void 0?void 0:g.querySelectorAll(`.${t.prefixCls}-item`)[m];return(v==null?void 0:v.offsetParent)&&v},r=se(null),a=se(null);ye(()=>t.value,(p,g)=>{const m=o(g),v=o(p),b=jO(m),y=jO(v);r.value=b,a.value=y,n(m&&v?"motionStart":"motionEnd")},{flush:"post"});const s=L(()=>{var p,g;return t.direction==="rtl"?vl(-((p=r.value)===null||p===void 0?void 0:p.right)):vl((g=r.value)===null||g===void 0?void 0:g.left)}),l=L(()=>{var p,g;return t.direction==="rtl"?vl(-((p=a.value)===null||p===void 0?void 0:p.right)):vl((g=a.value)===null||g===void 0?void 0:g.left)});let c;const u=p=>{clearTimeout(c),pt(()=>{p&&(p.style.transform="translateX(var(--thumb-start-left))",p.style.width="var(--thumb-start-width)")})},d=p=>{c=setTimeout(()=>{p&&(Jp(p,`${t.motionName}-appear-active`),p.style.transform="translateX(var(--thumb-active-left))",p.style.width="var(--thumb-active-width)")})},f=p=>{r.value=null,a.value=null,p&&(p.style.transform=null,p.style.width=null,Qp(p,`${t.motionName}-appear-active`)),n("motionEnd")},h=L(()=>{var p,g;return{"--thumb-start-left":s.value,"--thumb-start-width":vl((p=r.value)===null||p===void 0?void 0:p.width),"--thumb-active-left":l.value,"--thumb-active-width":vl((g=a.value)===null||g===void 0?void 0:g.width)}});return at(()=>{clearTimeout(c)}),()=>{const p={ref:i,style:h.value,class:[`${t.prefixCls}-thumb`]};return C(En,{appear:!0,onBeforeEnter:u,onEnter:d,onAfterEnter:f},{default:()=>[!r.value||!a.value?null:C("div",p,null)]})}}});function Fbe(t){return t.map(e=>typeof e=="object"&&e!==null?e:{label:e==null?void 0:e.toString(),title:e==null?void 0:e.toString(),value:e})}const Nbe=()=>({prefixCls:String,options:xt(),block:Ce(),disabled:Ce(),size:Ne(),value:A(A({},Xe([String,Number])),{required:!0}),motionName:String,onChange:ve(),"onUpdate:value":ve()}),E5=(t,e)=>{let{slots:n,emit:i}=e;const{value:o,disabled:r,payload:a,title:s,prefixCls:l,label:c=n.label,checked:u,className:d}=t,f=h=>{r||i("change",h,o)};return C("label",{class:ce({[`${l}-item-disabled`]:r},d)},[C("input",{class:`${l}-item-input`,type:"radio",disabled:r,checked:u,onChange:f},null),C("div",{class:`${l}-item-label`,title:typeof s=="string"?s:""},[typeof c=="function"?c({value:o,disabled:r,payload:a,title:s}):c??o])])};E5.inheritAttrs=!1;const Bbe=oe({name:"ASegmented",inheritAttrs:!1,props:ct(Nbe(),{options:[],motionName:"thumb-motion"}),slots:Object,setup(t,e){let{emit:n,slots:i,attrs:o}=e;const{prefixCls:r,direction:a,size:s}=Me("segmented",t),[l,c]=Rbe(r),u=ie(),d=ie(!1),f=L(()=>Fbe(t.options)),h=(p,g)=>{t.disabled||(n("update:value",g),n("change",g))};return()=>{const p=r.value;return l(C("div",H(H({},o),{},{class:ce(p,{[c.value]:!0,[`${p}-block`]:t.block,[`${p}-disabled`]:t.disabled,[`${p}-lg`]:s.value=="large",[`${p}-sm`]:s.value=="small",[`${p}-rtl`]:a.value==="rtl"},o.class),ref:u}),[C("div",{class:`${p}-group`},[C(Lbe,{containerRef:u,prefixCls:p,value:t.value,motionName:`${p}-${t.motionName}`,direction:a.value,getValueIndex:g=>f.value.findIndex(m=>m.value===g),onMotionStart:()=>{d.value=!0},onMotionEnd:()=>{d.value=!1}},null),f.value.map(g=>C(E5,H(H({key:g.value,prefixCls:p,checked:g.value===t.value,onChange:h},g),{},{className:ce(g.className,`${p}-item`,{[`${p}-item-selected`]:g.value===t.value&&!d.value}),disabled:!!t.disabled||!!g.disabled}),i))])]))}}}),zbe=Vt(Bbe),Hbe=t=>{const{componentCls:e}=t;return{[e]:A(A({},rt(t)),{display:"flex",justifyContent:"center",alignItems:"center",padding:t.paddingSM,backgroundColor:t.colorWhite,borderRadius:t.borderRadiusLG,border:`${t.lineWidth}px ${t.lineType} ${t.colorSplit}`,position:"relative",width:"100%",height:"100%",overflow:"hidden",[`& > ${e}-mask`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:10,display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",color:t.colorText,lineHeight:t.lineHeight,background:t.QRCodeMaskBackgroundColor,textAlign:"center",[`& > ${e}-expired , & > ${e}-scanned`]:{color:t.QRCodeTextColor}},"&-icon":{marginBlockEnd:t.marginXS,fontSize:t.controlHeight}}),[`${e}-borderless`]:{borderColor:"transparent"}}},Wbe=et("QRCode",t=>Hbe(Ve(t,{QRCodeTextColor:"rgba(0, 0, 0, 0.88)",QRCodeMaskBackgroundColor:"rgba(255, 255, 255, 0.96)"})));var jbe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"};function VO(t){for(var e=1;e({size:{type:Number,default:160},value:{type:String,required:!0},type:Ne("canvas"),color:String,bgColor:String,includeMargin:Boolean,imageSettings:Fe()}),Xbe=()=>A(A({},VC()),{errorLevel:Ne("M"),icon:String,iconSize:{type:Number,default:40},status:Ne("active"),bordered:{type:Boolean,default:!0}});/** * @license QR Code generator library (TypeScript) * Copyright (c) Project Nayuki. * SPDX-License-Identifier: MIT - */var lo;(function(t){class e{static encodeText(s,l){const c=t.QrSegment.makeSegments(s);return e.encodeSegments(c,l)}static encodeBinary(s,l){const c=t.QrSegment.makeBytes(s);return e.encodeSegments([c],l)}static encodeSegments(s,l){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:40,d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1,f=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;if(!(e.MIN_VERSION<=c&&c<=u&&u<=e.MAX_VERSION)||d<-1||d>7)throw new RangeError("Invalid value");let h,p;for(h=c;;h++){const b=e.getNumDataCodewords(h,l)*8,y=r.getTotalBits(s,h);if(y<=b){p=y;break}if(h>=u)throw new RangeError("Data too long")}for(const b of[e.Ecc.MEDIUM,e.Ecc.QUARTILE,e.Ecc.HIGH])f&&p<=e.getNumDataCodewords(h,b)*8&&(l=b);const g=[];for(const b of s){n(b.mode.modeBits,4,g),n(b.numChars,b.mode.numCharCountBits(h),g);for(const y of b.getData())g.push(y)}o(g.length==p);const m=e.getNumDataCodewords(h,l)*8;o(g.length<=m),n(0,Math.min(4,m-g.length),g),n(0,(8-g.length%8)%8,g),o(g.length%8==0);for(let b=236;g.lengthv[y>>>3]|=b<<7-(y&7)),new e(h,l,v,d)}constructor(s,l,c,u){if(this.version=s,this.errorCorrectionLevel=l,this.modules=[],this.isFunction=[],se.MAX_VERSION)throw new RangeError("Version value out of range");if(u<-1||u>7)throw new RangeError("Mask value out of range");this.size=s*4+17;const d=[];for(let h=0;h>>9)*1335;const u=(l<<10|c)^21522;o(u>>>15==0);for(let d=0;d<=5;d++)this.setFunctionModule(8,d,i(u,d));this.setFunctionModule(8,7,i(u,6)),this.setFunctionModule(8,8,i(u,7)),this.setFunctionModule(7,8,i(u,8));for(let d=9;d<15;d++)this.setFunctionModule(14-d,8,i(u,d));for(let d=0;d<8;d++)this.setFunctionModule(this.size-1-d,8,i(u,d));for(let d=8;d<15;d++)this.setFunctionModule(8,this.size-15+d,i(u,d));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let s=this.version;for(let c=0;c<12;c++)s=s<<1^(s>>>11)*7973;const l=this.version<<12|s;o(l>>>18==0);for(let c=0;c<18;c++){const u=i(l,c),d=this.size-11+c%3,f=Math.floor(c/3);this.setFunctionModule(d,f,u),this.setFunctionModule(f,d,u)}}drawFinderPattern(s,l){for(let c=-4;c<=4;c++)for(let u=-4;u<=4;u++){const d=Math.max(Math.abs(u),Math.abs(c)),f=s+u,h=l+c;0<=f&&f{(b!=p-d||w>=h)&&v.push(y[b])});return o(v.length==f),v}drawCodewords(s){if(s.length!=Math.floor(e.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let l=0;for(let c=this.size-1;c>=1;c-=2){c==6&&(c=5);for(let u=0;u>>3],7-(l&7)),l++)}}o(l==s.length*8)}applyMask(s){if(s<0||s>7)throw new RangeError("Mask value out of range");for(let l=0;l5&&s++):(this.finderPenaltyAddHistory(h,p),f||(s+=this.finderPenaltyCountPatterns(p)*e.PENALTY_N3),f=this.modules[d][g],h=1);s+=this.finderPenaltyTerminateAndCount(f,h,p)*e.PENALTY_N3}for(let d=0;d5&&s++):(this.finderPenaltyAddHistory(h,p),f||(s+=this.finderPenaltyCountPatterns(p)*e.PENALTY_N3),f=this.modules[g][d],h=1);s+=this.finderPenaltyTerminateAndCount(f,h,p)*e.PENALTY_N3}for(let d=0;df+(h?1:0),l);const c=this.size*this.size,u=Math.ceil(Math.abs(l*20-c*10)/c)-1;return o(0<=u&&u<=9),s+=u*e.PENALTY_N4,o(0<=s&&s<=2568888),s}getAlignmentPatternPositions(){if(this.version==1)return[];{const s=Math.floor(this.version/7)+2,l=this.version==32?26:Math.ceil((this.version*4+4)/(s*2-2))*2,c=[6];for(let u=this.size-7;c.lengthe.MAX_VERSION)throw new RangeError("Version number out of range");let l=(16*s+128)*s+64;if(s>=2){const c=Math.floor(s/7)+2;l-=(25*c-10)*c-55,s>=7&&(l-=36)}return o(208<=l&&l<=29648),l}static getNumDataCodewords(s,l){return Math.floor(e.getNumRawDataModules(s)/8)-e.ECC_CODEWORDS_PER_BLOCK[l.ordinal][s]*e.NUM_ERROR_CORRECTION_BLOCKS[l.ordinal][s]}static reedSolomonComputeDivisor(s){if(s<1||s>255)throw new RangeError("Degree out of range");const l=[];for(let u=0;u0);for(const u of s){const d=u^c.shift();c.push(0),l.forEach((f,h)=>c[h]^=e.reedSolomonMultiply(f,d))}return c}static reedSolomonMultiply(s,l){if(s>>>8||l>>>8)throw new RangeError("Byte out of range");let c=0;for(let u=7;u>=0;u--)c=c<<1^(c>>>7)*285,c^=(l>>>u&1)*s;return o(c>>>8==0),c}finderPenaltyCountPatterns(s){const l=s[1];o(l<=this.size*3);const c=l>0&&s[2]==l&&s[3]==l*3&&s[4]==l&&s[5]==l;return(c&&s[0]>=l*4&&s[6]>=l?1:0)+(c&&s[6]>=l*4&&s[0]>=l?1:0)}finderPenaltyTerminateAndCount(s,l,c){return s&&(this.finderPenaltyAddHistory(l,c),l=0),l+=this.size,this.finderPenaltyAddHistory(l,c),this.finderPenaltyCountPatterns(c)}finderPenaltyAddHistory(s,l){l[0]==0&&(s+=this.size),l.pop(),l.unshift(s)}}e.MIN_VERSION=1,e.MAX_VERSION=40,e.PENALTY_N1=3,e.PENALTY_N2=3,e.PENALTY_N3=40,e.PENALTY_N4=10,e.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],e.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],t.QrCode=e;function n(a,s,l){if(s<0||s>31||a>>>s)throw new RangeError("Value out of range");for(let c=s-1;c>=0;c--)l.push(a>>>c&1)}function i(a,s){return(a>>>s&1)!=0}function o(a){if(!a)throw new Error("Assertion error")}class r{static makeBytes(s){const l=[];for(const c of s)n(c,8,l);return new r(r.Mode.BYTE,s.length,l)}static makeNumeric(s){if(!r.isNumeric(s))throw new RangeError("String contains non-numeric characters");const l=[];for(let c=0;c=1<1&&arguments[1]!==void 0?arguments[1]:0;const n=[];return t.forEach(function(i,o){let r=null;i.forEach(function(a,s){if(!a&&r!==null){n.push(`M${r+e} ${o+e}h${s-r}v1H${r+e}z`),r=null;return}if(s===i.length-1){if(!a)return;r===null?n.push(`M${s+e},${o+e} h1v1H${s+e}z`):n.push(`M${r+e},${o+e} h${s+1-r}v1H${r+e}z`);return}a&&r===null&&(r=s)})}),n.join("")}function F5(t,e){return t.slice().map((n,i)=>i=e.y+e.h?n:n.map((o,r)=>r=e.x+e.w?o:!1))}function N5(t,e,n,i){if(i==null)return null;const o=t.length+n*2,r=Math.floor(e*Kbe),a=o/e,s=(i.width||r)*a,l=(i.height||r)*a,c=i.x==null?t.length/2-s/2:i.x*a,u=i.y==null?t.length/2-l/2:i.y*a;let d=null;if(i.excavate){const f=Math.floor(c),h=Math.floor(u),p=Math.ceil(s+c-f),g=Math.ceil(l+u-h);d={x:f,y:h,w:p,h:g}}return{x:c,y:u,h:l,w:s,excavation:d}}function B5(t,e){return e!=null?Math.floor(e):t?Ybe:Gbe}const Ube=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}(),qbe=oe({name:"QRCodeCanvas",inheritAttrs:!1,props:A(A({},VC()),{level:String,bgColor:String,fgColor:String,marginSize:Number}),setup(t,e){let{attrs:n,expose:i}=e;const o=L(()=>{var l;return(l=t.imageSettings)===null||l===void 0?void 0:l.src}),r=ie(null),a=ie(null),s=ie(!1);return i({toDataURL:(l,c)=>{var u;return(u=r.value)===null||u===void 0?void 0:u.toDataURL(l,c)}}),Ke(()=>{const{value:l,size:c=_x,level:u=I5,bgColor:d=k5,fgColor:f=D5,includeMargin:h=R5,marginSize:p,imageSettings:g}=t;if(r.value!=null){const m=r.value,v=m.getContext("2d");if(!v)return;let b=lo.QrCode.encodeText(l,M5[u]).getModules();const y=B5(h,p),w=b.length+y*2,x=N5(b,c,y,g),$=a.value,S=s.value&&x!=null&&$!==null&&$.complete&&$.naturalHeight!==0&&$.naturalWidth!==0;S&&x.excavation!=null&&(b=F5(b,x.excavation));const _=window.devicePixelRatio||1;m.height=m.width=c*_;const P=c/w*_;v.scale(P,P),v.fillStyle=d,v.fillRect(0,0,w,w),v.fillStyle=f,Ube?v.fill(new Path2D(L5(b,y))):b.forEach(function(O,T){O.forEach(function(M,I){M&&v.fillRect(I+y,T+y,1,1)})}),S&&v.drawImage($,x.x+y,x.y+y,x.w,x.h)}},{flush:"post"}),ye(o,()=>{s.value=!1}),()=>{var l;const c=(l=t.size)!==null&&l!==void 0?l:_x,u={height:`${c}px`,width:`${c}px`};let d=null;return o.value!=null&&(d=C("img",{src:o.value,key:o.value,style:{display:"none"},onLoad:()=>{s.value=!0},ref:a},null)),C(Qe,null,[C("canvas",H(H({},n),{},{style:[u,n.style],ref:r}),null),d])}}}),Zbe=oe({name:"QRCodeSVG",inheritAttrs:!1,props:A(A({},VC()),{color:String,level:String,bgColor:String,fgColor:String,marginSize:Number,title:String}),setup(t){let e=null,n=null,i=null,o=null,r=null,a=null;return Ke(()=>{const{value:s,size:l=_x,level:c=I5,includeMargin:u=R5,marginSize:d,imageSettings:f}=t;e=lo.QrCode.encodeText(s,M5[c]).getModules(),n=B5(u,d),i=e.length+n*2,o=N5(e,l,n,f),f!=null&&o!=null&&(o.excavation!=null&&(e=F5(e,o.excavation)),a=C("image",{"xlink:href":f.src,height:o.h,width:o.w,x:o.x+n,y:o.y+n,preserveAspectRatio:"none"},null)),r=L5(e,n)}),()=>{const s=t.bgColor&&k5,l=t.fgColor&&D5;return C("svg",{height:t.size,width:t.size,viewBox:`0 0 ${i} ${i}`},[!!t.title&&C("title",null,[t.title]),C("path",{fill:s,d:`M0,0 h${i}v${i}H0z`,"shape-rendering":"crispEdges"},null),C("path",{fill:l,d:r,"shape-rendering":"crispEdges"},null),a])}}}),Jbe=oe({name:"AQrcode",inheritAttrs:!1,props:Xbe(),emits:["refresh"],setup(t,e){let{emit:n,attrs:i,expose:o}=e;const[r]=xo("QRCode"),{prefixCls:a}=Me("qrcode",t),[s,l]=Wbe(a),[,c]=Xr(),u=se();o({toDataURL:(f,h)=>{var p;return(p=u.value)===null||p===void 0?void 0:p.toDataURL(f,h)}});const d=L(()=>{const{value:f,icon:h="",size:p=160,iconSize:g=40,color:m=c.value.colorText,bgColor:v="transparent",errorLevel:b="M"}=t,y={src:h,x:void 0,y:void 0,height:g,width:g,excavate:!0};return{value:f,size:p-(c.value.paddingSM+c.value.lineWidth)*2,level:b,bgColor:v,fgColor:m,imageSettings:h?y:void 0}});return()=>{const f=a.value;return s(C("div",H(H({},i),{},{style:[i.style,{width:`${t.size}px`,height:`${t.size}px`,backgroundColor:d.value.bgColor}],class:[l.value,f,{[`${f}-borderless`]:!t.bordered}]}),[t.status!=="active"&&C("div",{class:`${f}-mask`},[t.status==="loading"&&C(rr,null,null),t.status==="expired"&&C(Qe,null,[C("p",{class:`${f}-expired`},[r.value.expired]),C(nn,{type:"link",onClick:h=>n("refresh",h)},{default:()=>[r.value.refresh],icon:()=>C(jC,null,null)})]),t.status==="scanned"&&C("p",{class:`${f}-scanned`},[r.value.scanned])]),t.type==="canvas"?C(qbe,H({ref:u},d.value),null):C(Zbe,d.value,null)]))}}}),Qbe=Vt(Jbe);function e0e(t){const e=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,{top:i,right:o,bottom:r,left:a}=t.getBoundingClientRect();return i>=0&&a>=0&&o<=e&&r<=n}function t0e(t,e,n,i){const[o,r]=Mt(void 0);Ke(()=>{const u=typeof t.value=="function"?t.value():t.value;r(u||null)},{flush:"post"});const[a,s]=Mt(null),l=()=>{if(!e.value){s(null);return}if(o.value){!e0e(o.value)&&e.value&&o.value.scrollIntoView(i.value);const{left:u,top:d,width:f,height:h}=o.value.getBoundingClientRect(),p={left:u,top:d,width:f,height:h,radius:0};JSON.stringify(a.value)!==JSON.stringify(p)&&s(p)}else s(null)};return Ze(()=>{ye([e,o],()=>{l()},{flush:"post",immediate:!0}),window.addEventListener("resize",l)}),at(()=>{window.removeEventListener("resize",l)}),[L(()=>{var u,d;if(!a.value)return a.value;const f=((u=n.value)===null||u===void 0?void 0:u.offset)||6,h=((d=n.value)===null||d===void 0?void 0:d.radius)||2;return{left:a.value.left-f,top:a.value.top-f,width:a.value.width+f*2,height:a.value.height+f*2,radius:h}}),o]}const n0e=()=>({arrow:Xe([Boolean,Object]),target:Xe([String,Function,Object]),title:Xe([String,Object]),description:Xe([String,Object]),placement:Ne(),mask:Xe([Object,Boolean],!0),className:{type:String},style:Fe(),scrollIntoViewOptions:Xe([Boolean,Object])}),XC=()=>A(A({},n0e()),{prefixCls:{type:String},total:{type:Number},current:{type:Number},onClose:ve(),onFinish:ve(),renderPanel:ve(),onPrev:ve(),onNext:ve()}),i0e=oe({name:"DefaultPanel",inheritAttrs:!1,props:XC(),setup(t,e){let{attrs:n}=e;return()=>{const{prefixCls:i,current:o,total:r,title:a,description:s,onClose:l,onPrev:c,onNext:u,onFinish:d}=t;return C("div",H(H({},n),{},{class:ce(`${i}-content`,n.class)}),[C("div",{class:`${i}-inner`},[C("button",{type:"button",onClick:l,"aria-label":"Close",class:`${i}-close`},[C("span",{class:`${i}-close-x`},[Qn("×")])]),C("div",{class:`${i}-header`},[C("div",{class:`${i}-title`},[a])]),C("div",{class:`${i}-description`},[s]),C("div",{class:`${i}-footer`},[C("div",{class:`${i}-sliders`},[r>1?[...Array.from({length:r}).keys()].map((f,h)=>C("span",{key:f,class:h===o?"active":""},null)):null]),C("div",{class:`${i}-buttons`},[o!==0?C("button",{class:`${i}-prev-btn`,onClick:c},[Qn("Prev")]):null,o===r-1?C("button",{class:`${i}-finish-btn`,onClick:d},[Qn("Finish")]):C("button",{class:`${i}-next-btn`,onClick:u},[Qn("Next")])])])])])}}}),o0e=oe({name:"TourStep",inheritAttrs:!1,props:XC(),setup(t,e){let{attrs:n}=e;return()=>{const{current:i,renderPanel:o}=t;return C(Qe,null,[typeof o=="function"?o(A(A({},n),t),i):C(i0e,H(H({},n),t),null)])}}});let XO=0;const r0e=ii();function a0e(){let t;return r0e?(t=XO,XO+=1):t="TEST_OR_SSR",t}function s0e(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:se("");const e=`vc_unique_${a0e()}`;return t.value||e}const ih={fill:"transparent","pointer-events":"auto"},l0e=oe({name:"TourMask",props:{prefixCls:{type:String},pos:Fe(),rootClassName:{type:String},showMask:Ce(),fill:{type:String,default:"rgba(0,0,0,0.5)"},open:Ce(),animated:Xe([Boolean,Object]),zIndex:{type:Number}},setup(t,e){let{attrs:n}=e;const i=s0e();return()=>{const{prefixCls:o,open:r,rootClassName:a,pos:s,showMask:l,fill:c,animated:u,zIndex:d}=t,f=`${o}-mask-${i}`,h=typeof u=="object"?u==null?void 0:u.placeholder:u;return C(Xd,{visible:r,autoLock:!0},{default:()=>r&&C("div",H(H({},n),{},{class:ce(`${o}-mask`,a,n.class),style:[{position:"fixed",left:0,right:0,top:0,bottom:0,zIndex:d,pointerEvents:"none"},n.style]}),[l?C("svg",{style:{width:"100%",height:"100%"}},[C("defs",null,[C("mask",{id:f},[C("rect",{x:"0",y:"0",width:"100vw",height:"100vh",fill:"white"},null),s&&C("rect",{x:s.left,y:s.top,rx:s.radius,width:s.width,height:s.height,fill:"black",class:h?`${o}-placeholder-animated`:""},null)])]),C("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:c,mask:`url(#${f})`},null),s&&C(Qe,null,[C("rect",H(H({},ih),{},{x:"0",y:"0",width:"100%",height:s.top}),null),C("rect",H(H({},ih),{},{x:"0",y:"0",width:s.left,height:"100%"}),null),C("rect",H(H({},ih),{},{x:"0",y:s.top+s.height,width:"100%",height:`calc(100vh - ${s.top+s.height}px)`}),null),C("rect",H(H({},ih),{},{x:s.left+s.width,y:"0",width:`calc(100vw - ${s.left+s.width}px)`,height:"100%"}),null)])]):null])})}}}),c0e=[0,0],YO={left:{points:["cr","cl"],offset:[-8,0]},right:{points:["cl","cr"],offset:[8,0]},top:{points:["bc","tc"],offset:[0,-8]},bottom:{points:["tc","bc"],offset:[0,8]},topLeft:{points:["bl","tl"],offset:[0,-8]},leftTop:{points:["tr","tl"],offset:[-8,0]},topRight:{points:["br","tr"],offset:[0,-8]},rightTop:{points:["tl","tr"],offset:[8,0]},bottomRight:{points:["tr","br"],offset:[0,8]},rightBottom:{points:["bl","br"],offset:[8,0]},bottomLeft:{points:["tl","bl"],offset:[0,8]},leftBottom:{points:["br","bl"],offset:[-8,0]}};function z5(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const e={};return Object.keys(YO).forEach(n=>{e[n]=A(A({},YO[n]),{autoArrow:t,targetOffset:c0e})}),e}z5();var u0e=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{const{builtinPlacements:t,popupAlign:e}=VD();return{builtinPlacements:t,popupAlign:e,steps:xt(),open:Ce(),defaultCurrent:{type:Number},current:{type:Number},onChange:ve(),onClose:ve(),onFinish:ve(),mask:Xe([Boolean,Object],!0),arrow:Xe([Boolean,Object],!0),rootClassName:{type:String},placement:Ne("bottom"),prefixCls:{type:String,default:"rc-tour"},renderPanel:ve(),gap:Fe(),animated:Xe([Boolean,Object]),scrollIntoViewOptions:Xe([Boolean,Object],!0),zIndex:{type:Number,default:1001}}},d0e=oe({name:"Tour",inheritAttrs:!1,props:ct(H5(),{}),setup(t){const{defaultCurrent:e,placement:n,mask:i,scrollIntoViewOptions:o,open:r,gap:a,arrow:s}=uo(t),l=se(),[c,u]=jt(0,{value:L(()=>t.current),defaultValue:e.value}),[d,f]=jt(void 0,{value:L(()=>t.open),postState:S=>c.value<0||c.value>=t.steps.length?!1:S??!0}),h=ie(d.value);Ke(()=>{d.value&&!h.value&&u(0),h.value=d.value});const p=L(()=>t.steps[c.value]||{}),g=L(()=>{var S;return(S=p.value.placement)!==null&&S!==void 0?S:n.value}),m=L(()=>{var S;return d.value&&((S=p.value.mask)!==null&&S!==void 0?S:i.value)}),v=L(()=>{var S;return(S=p.value.scrollIntoViewOptions)!==null&&S!==void 0?S:o.value}),[b,y]=t0e(L(()=>p.value.target),r,a,v),w=L(()=>y.value?typeof p.value.arrow>"u"?s.value:p.value.arrow:!1),x=L(()=>typeof w.value=="object"?w.value.pointAtCenter:!1);ye(x,()=>{var S;(S=l.value)===null||S===void 0||S.forcePopupAlign()}),ye(c,()=>{var S;(S=l.value)===null||S===void 0||S.forcePopupAlign()});const $=S=>{var _;u(S),(_=t.onChange)===null||_===void 0||_.call(t,S)};return()=>{var S;const{prefixCls:_,steps:P,onClose:O,onFinish:T,rootClassName:M,renderPanel:I,animated:k,zIndex:E}=t,R=u0e(t,["prefixCls","steps","onClose","onFinish","rootClassName","renderPanel","animated","zIndex"]);if(y.value===void 0)return null;const D=()=>{f(!1),O==null||O(c.value)},F=typeof m.value=="boolean"?m.value:!!m.value,N=typeof m.value=="boolean"?void 0:m.value,B=()=>y.value||document.body,z=()=>C(o0e,H({arrow:w.value,key:"content",prefixCls:_,total:P.length,renderPanel:I,onPrev:()=>{$(c.value-1)},onNext:()=>{$(c.value+1)},onClose:D,current:c.value,onFinish:()=>{D(),T==null||T()}},p.value),null),W=L(()=>{const j=b.value||d0,U={};return Object.keys(j).forEach(V=>{typeof j[V]=="number"?U[V]=`${j[V]}px`:U[V]=j[V]}),U});return d.value?C(Qe,null,[C(l0e,{zIndex:E,prefixCls:_,pos:b.value,showMask:F,style:N==null?void 0:N.style,fill:N==null?void 0:N.color,open:d.value,animated:k,rootClassName:M},null),C(tl,H(H({},R),{},{arrow:!!R.arrow,builtinPlacements:p.value.target?(S=R.builtinPlacements)!==null&&S!==void 0?S:z5(x.value):void 0,ref:l,popupStyle:p.value.target?p.value.style:A(A({},p.value.style),{position:"fixed",left:d0.left,top:d0.top,transform:"translate(-50%, -50%)"}),popupPlacement:g.value,popupVisible:d.value,popupClassName:ce(M,p.value.className),prefixCls:_,popup:z,forceRender:!1,destroyPopupOnHide:!0,zIndex:E,mask:!1,getTriggerDOMNode:B}),{default:()=>[C(Xd,{visible:d.value,autoLock:!0},{default:()=>[C("div",{class:ce(M,`${_}-target-placeholder`),style:A(A({},W.value),{position:"fixed",pointerEvents:"none"})},null)]})]})]):null}}}),f0e=()=>A(A({},H5()),{steps:{type:Array},prefixCls:{type:String},current:{type:Number},type:{type:String},"onUpdate:current":Function}),h0e=()=>A(A({},XC()),{cover:{type:Object},nextButtonProps:{type:Object},prevButtonProps:{type:Object},current:{type:Number},type:{type:String}}),p0e=oe({name:"ATourPanel",inheritAttrs:!1,props:h0e(),setup(t,e){let{attrs:n,slots:i}=e;const{current:o,total:r}=uo(t),a=L(()=>o.value===r.value-1),s=c=>{var u;const d=t.prevButtonProps;(u=t.onPrev)===null||u===void 0||u.call(t,c),typeof(d==null?void 0:d.onClick)=="function"&&(d==null||d.onClick())},l=c=>{var u,d;const f=t.nextButtonProps;a.value?(u=t.onFinish)===null||u===void 0||u.call(t,c):(d=t.onNext)===null||d===void 0||d.call(t,c),typeof(f==null?void 0:f.onClick)=="function"&&(f==null||f.onClick())};return()=>{const{prefixCls:c,title:u,onClose:d,cover:f,description:h,type:p,arrow:g}=t,m=t.prevButtonProps,v=t.nextButtonProps;let b;u&&(b=C("div",{class:`${c}-header`},[C("div",{class:`${c}-title`},[u])]));let y;h&&(y=C("div",{class:`${c}-description`},[h]));let w;f&&(w=C("div",{class:`${c}-cover`},[f]));let x;i.indicatorsRender?x=i.indicatorsRender({current:o.value,total:r}):x=[...Array.from({length:r.value}).keys()].map((_,P)=>C("span",{key:_,class:ce(P===o.value&&`${c}-indicator-active`,`${c}-indicator`)},null));const $=p==="primary"?"default":"primary",S={type:"default",ghost:p==="primary"};return C(Us,{componentName:"Tour",defaultLocale:bi.Tour},{default:_=>{var P;return C("div",H(H({},n),{},{class:ce(p==="primary"?`${c}-primary`:"",n.class,`${c}-content`)}),[g&&C("div",{class:`${c}-arrow`,key:"arrow"},null),C("div",{class:`${c}-inner`},[C(ai,{class:`${c}-close`,onClick:d},null),w,b,y,C("div",{class:`${c}-footer`},[r.value>1&&C("div",{class:`${c}-indicators`},[x]),C("div",{class:`${c}-buttons`},[o.value!==0?C(nn,H(H(H({},S),m),{},{onClick:s,size:"small",class:ce(`${c}-prev-btn`,m==null?void 0:m.className)}),{default:()=>[ey(m==null?void 0:m.children)?m.children():(P=m==null?void 0:m.children)!==null&&P!==void 0?P:_.Previous]}):null,C(nn,H(H({type:$},v),{},{onClick:l,size:"small",class:ce(`${c}-next-btn`,v==null?void 0:v.className)}),{default:()=>[ey(v==null?void 0:v.children)?v==null?void 0:v.children():a.value?_.Finish:_.Next]})])])])])}})}}}),g0e=t=>{let{defaultType:e,steps:n,current:i,defaultCurrent:o}=t;const r=se(o==null?void 0:o.value),a=L(()=>i==null?void 0:i.value);ye(a,u=>{r.value=u??(o==null?void 0:o.value)},{immediate:!0});const s=u=>{r.value=u},l=L(()=>{var u,d;return typeof r.value=="number"?n&&((d=(u=n.value)===null||u===void 0?void 0:u[r.value])===null||d===void 0?void 0:d.type):e==null?void 0:e.value});return{currentMergedType:L(()=>{var u;return(u=l.value)!==null&&u!==void 0?u:e==null?void 0:e.value}),updateInnerCurrent:s}},m0e=t=>{const{componentCls:e,lineHeight:n,padding:i,paddingXS:o,borderRadius:r,borderRadiusXS:a,colorPrimary:s,colorText:l,colorFill:c,indicatorHeight:u,indicatorWidth:d,boxShadowTertiary:f,tourZIndexPopup:h,fontSize:p,colorBgContainer:g,fontWeightStrong:m,marginXS:v,colorTextLightSolid:b,tourBorderRadius:y,colorWhite:w,colorBgTextHover:x,tourCloseSize:$,motionDurationSlow:S,antCls:_}=t;return[{[e]:A(A({},rt(t)),{color:l,position:"absolute",zIndex:h,display:"block",visibility:"visible",fontSize:p,lineHeight:n,width:520,"--antd-arrow-background-color":g,"&-pure":{maxWidth:"100%",position:"relative"},[`&${e}-hidden`]:{display:"none"},[`${e}-content`]:{position:"relative"},[`${e}-inner`]:{textAlign:"start",textDecoration:"none",borderRadius:y,boxShadow:f,position:"relative",backgroundColor:g,border:"none",backgroundClip:"padding-box",[`${e}-close`]:{position:"absolute",top:i,insetInlineEnd:i,color:t.colorIcon,outline:"none",width:$,height:$,borderRadius:t.borderRadiusSM,transition:`background-color ${t.motionDurationMid}, color ${t.motionDurationMid}`,display:"flex",alignItems:"center",justifyContent:"center","&:hover":{color:t.colorIconHover,backgroundColor:t.wireframe?"transparent":t.colorFillContent}},[`${e}-cover`]:{textAlign:"center",padding:`${i+$+o}px ${i}px 0`,img:{width:"100%"}},[`${e}-header`]:{padding:`${i}px ${i}px ${o}px`,[`${e}-title`]:{lineHeight:n,fontSize:p,fontWeight:m}},[`${e}-description`]:{padding:`0 ${i}px`,lineHeight:n,wordWrap:"break-word"},[`${e}-footer`]:{padding:`${o}px ${i}px ${i}px`,textAlign:"end",borderRadius:`0 0 ${a}px ${a}px`,display:"flex",[`${e}-indicators`]:{display:"inline-block",[`${e}-indicator`]:{width:d,height:u,display:"inline-block",borderRadius:"50%",background:c,"&:not(:last-child)":{marginInlineEnd:u},"&-active":{background:s}}},[`${e}-buttons`]:{marginInlineStart:"auto",[`${_}-btn`]:{marginInlineStart:v}}}},[`${e}-primary, &${e}-primary`]:{"--antd-arrow-background-color":s,[`${e}-inner`]:{color:b,textAlign:"start",textDecoration:"none",backgroundColor:s,borderRadius:r,boxShadow:f,[`${e}-close`]:{color:b},[`${e}-indicators`]:{[`${e}-indicator`]:{background:new Ot(b).setAlpha(.15).toRgbString(),"&-active":{background:b}}},[`${e}-prev-btn`]:{color:b,borderColor:new Ot(b).setAlpha(.15).toRgbString(),backgroundColor:s,"&:hover":{backgroundColor:new Ot(b).setAlpha(.15).toRgbString(),borderColor:"transparent"}},[`${e}-next-btn`]:{color:s,borderColor:"transparent",background:w,"&:hover":{background:new Ot(x).onBackground(w).toRgbString()}}}}}),[`${e}-mask`]:{[`${e}-placeholder-animated`]:{transition:`all ${S}`}},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${e}-inner`]:{borderRadius:Math.min(y,U1)}}},q1(t,{colorBg:"var(--antd-arrow-background-color)",contentRadius:y,limitVerticalRadius:!0})]},v0e=et("Tour",t=>{const{borderRadiusLG:e,fontSize:n,lineHeight:i}=t,o=Ve(t,{tourZIndexPopup:t.zIndexPopupBase+70,indicatorWidth:6,indicatorHeight:6,tourBorderRadius:e,tourCloseSize:n*i});return[m0e(o)]});var b0e=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{const{steps:g,current:m,type:v,rootClassName:b}=t,y=b0e(t,["steps","current","type","rootClassName"]),w=ce({[`${c.value}-primary`]:h.value==="primary",[`${c.value}-rtl`]:u.value==="rtl"},f.value,b),x=(_,P)=>C(p0e,H(H({},_),{},{type:v,current:P}),{indicatorsRender:o.indicatorsRender}),$=_=>{p(_),i("update:current",_),i("change",_)},S=L(()=>K1({arrowPointAtCenter:!0,autoAdjustOverflow:!0}));return d(C(d0e,H(H(H({},n),y),{},{rootClassName:w,prefixCls:c.value,current:m,defaultCurrent:t.defaultCurrent,animated:!0,renderPanel:x,onChange:$,steps:g,builtinPlacements:S.value}),null))}}}),x0e=Vt(y0e),W5=Symbol("appConfigContext"),w0e=t=>ot(W5,t),S0e=()=>qe(W5,{}),j5=Symbol("appContext"),C0e=t=>ot(j5,t),$0e=$t({message:{},notification:{},modal:{}}),A0e=()=>qe(j5,$0e),_0e=t=>{const{componentCls:e,colorText:n,fontSize:i,lineHeight:o,fontFamily:r}=t;return{[e]:{color:n,fontSize:i,lineHeight:o,fontFamily:r}}},P0e=et("App",t=>[_0e(t)]),T0e=()=>({rootClassName:String,message:Fe(),notification:Fe()}),O0e=()=>A0e(),Xu=oe({name:"AApp",props:ct(T0e(),{}),setup(t,e){let{slots:n}=e;const{prefixCls:i}=Me("app",t),[o,r]=P0e(i),a=L(()=>ce(r.value,i.value,t.rootClassName)),s=S0e(),l=L(()=>({message:A(A({},s.message),t.message),notification:A(A({},s.notification),t.notification)}));w0e(l.value);const[c,u]=gL(l.value.message),[d,f]=PL(l.value.notification),[h,p]=E6(),g=L(()=>({message:c,notification:d,modal:h}));return C0e(g.value),()=>{var m;return o(C("div",{class:a.value},[p(),u(),f(),(m=n.default)===null||m===void 0?void 0:m.call(n)]))}}});Xu.useApp=O0e;Xu.install=function(t){t.component(Xu.name,Xu)};const V5=["wrap","nowrap","wrap-reverse"],X5=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],Y5=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],E0e=(t,e)=>{const n={};return V5.forEach(i=>{n[`${t}-wrap-${i}`]=e.wrap===i}),n},M0e=(t,e)=>{const n={};return Y5.forEach(i=>{n[`${t}-align-${i}`]=e.align===i}),n[`${t}-align-stretch`]=!e.align&&!!e.vertical,n},I0e=(t,e)=>{const n={};return X5.forEach(i=>{n[`${t}-justify-${i}`]=e.justify===i}),n};function k0e(t,e){return ce(A(A(A({},E0e(t,e)),M0e(t,e)),I0e(t,e)))}const D0e=t=>{const{componentCls:e}=t;return{[e]:{display:"flex","&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},R0e=t=>{const{componentCls:e}=t;return{[e]:{"&-gap-small":{gap:t.flexGapSM},"&-gap-middle":{gap:t.flexGap},"&-gap-large":{gap:t.flexGapLG}}}},L0e=t=>{const{componentCls:e}=t,n={};return V5.forEach(i=>{n[`${e}-wrap-${i}`]={flexWrap:i}}),n},F0e=t=>{const{componentCls:e}=t,n={};return Y5.forEach(i=>{n[`${e}-align-${i}`]={alignItems:i}}),n},N0e=t=>{const{componentCls:e}=t,n={};return X5.forEach(i=>{n[`${e}-justify-${i}`]={justifyContent:i}}),n},B0e=et("Flex",t=>{const e=Ve(t,{flexGapSM:t.paddingXS,flexGap:t.padding,flexGapLG:t.paddingLG});return[D0e(e),R0e(e),L0e(e),F0e(e),N0e(e)]});function GO(t){return["small","middle","large"].includes(t)}const z0e=()=>({prefixCls:Ne(),vertical:Ce(),wrap:Ne(),justify:Ne(),align:Ne(),flex:Xe([Number,String]),gap:Xe([Number,String]),component:Rt()});var H0e=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{var u;return[a.value,l.value,k0e(a.value,t),{[`${a.value}-rtl`]:r.value==="rtl",[`${a.value}-gap-${t.gap}`]:GO(t.gap),[`${a.value}-vertical`]:(u=t.vertical)!==null&&u!==void 0?u:o==null?void 0:o.value.vertical}]});return()=>{var u;const{flex:d,gap:f,component:h="div"}=t,p=H0e(t,["flex","gap","component"]),g={};return d&&(g.flex=d),f&&!GO(f)&&(g.gap=`${f}px`),s(C(h,H({class:[i.class,c.value],style:[i.style,g]},ht(p,["justify","wrap","align","vertical"])),{default:()=>[(u=n.default)===null||u===void 0?void 0:u.call(n)]}))}}}),j0e=Vt(W0e),KO=Object.freeze(Object.defineProperty({__proto__:null,Affix:OD,Alert:zJ,Anchor:cs,AnchorLink:e1,App:Xu,AutoComplete:gJ,AutoCompleteOptGroup:pJ,AutoCompleteOption:hJ,Avatar:Ss,AvatarGroup:jp,BackTop:hg,Badge:Lu,BadgeRibbon:Vp,Breadcrumb:Cs,BreadcrumbItem:xd,BreadcrumbSeparator:Qp,Button:nn,ButtonGroup:Up,Calendar:vne,Card:ql,CardGrid:og,CardMeta:ig,Carousel:ioe,Cascader:bae,CheckableTag:cg,Checkbox:ho,CheckboxGroup:sg,Col:$ae,Collapse:Nu,CollapsePanel:rg,Comment:Oae,Compact:Hp,ConfigProvider:As,DatePicker:Yse,Descriptions:Pl,DescriptionsItem:WL,DirectoryTree:Yh,Divider:rle,Drawer:xle,Dropdown:Io,DropdownButton:yd,Empty:pa,Flex:j0e,FloatButton:Aa,FloatButtonGroup:fg,Form:ga,FormItem:sL,FormItemRest:Np,Grid:Cae,Image:ds,ImagePreviewGroup:d6,Input:wn,InputGroup:JL,InputNumber:Zce,InputPassword:t6,InputSearch:QL,Layout:uue,LayoutContent:cue,LayoutFooter:sue,LayoutHeader:aue,LayoutSider:lue,List:sa,ListItem:m6,ListItemMeta:p6,LocaleProvider:dL,Mentions:vde,MentionsOption:Wh,Menu:sn,MenuDivider:Sd,MenuItem:or,MenuItemGroup:wd,Modal:Tn,MonthPicker:kh,PageHeader:Gde,Pagination:sv,Popconfirm:Qde,Popover:Z1,Progress:vC,QRCode:Qbe,QuarterPicker:Dh,Radio:di,RadioButton:tg,RadioGroup:_S,RangePicker:Rh,Rate:zfe,Result:Ps,Row:nhe,Segmented:zbe,Select:kn,SelectOptGroup:uJ,SelectOption:cJ,Skeleton:Un,SkeletonAvatar:LS,SkeletonButton:kS,SkeletonImage:RS,SkeletonInput:DS,SkeletonTitle:Wm,Slider:yhe,Space:ec,Spin:rr,Statistic:_r,StatisticCountdown:kde,Step:jh,Steps:Fhe,SubMenu:Fs,Switch:Ghe,TabPane:ng,Table:rme,TableColumn:Kh,TableColumnGroup:Uh,TableSummary:qh,TableSummaryCell:wg,TableSummaryRow:xg,Tabs:$s,Tag:Ql,Textarea:tC,TimePicker:eve,TimeRangePicker:Zh,Timeline:Vu,TimelineItem:Td,Tooltip:Pi,Tour:x0e,Transfer:Tme,Tree:p5,TreeNode:Gh,TreeSelect:Jme,TreeSelectNode:Ax,Typography:_i,TypographyLink:Rc,TypographyParagraph:Lc,TypographyText:Fc,TypographyTitle:Nc,Upload:$be,UploadDragger:Cbe,Watermark:Ibe,WeekPicker:Ih,message:Ns,notification:jr},Symbol.toStringTag,{value:"Module"})),V0e=function(t){return Object.keys(KO).forEach(e=>{const n=KO[e];n.install&&t.use(n)}),t.use(l9.StyleProvider),t.config.globalProperties.$message=Ns,t.config.globalProperties.$notification=jr,t.config.globalProperties.$info=Tn.info,t.config.globalProperties.$success=Tn.success,t.config.globalProperties.$error=Tn.error,t.config.globalProperties.$warning=Tn.warning,t.config.globalProperties.$confirm=Tn.confirm,t.config.globalProperties.$destroyAll=Tn.destroyAll,t},X0e={version:vD,install:V0e},Y0e="modulepreload",G0e=function(t){return"/"+t},UO={},ze=function(e,n,i){let o=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),s=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));o=Promise.allSettled(n.map(l=>{if(l=G0e(l),l in UO)return;UO[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":Y0e,c||(d.as="script"),d.crossOrigin="",d.href=l,s&&d.setAttribute("nonce",s),document.head.appendChild(d),c)return new Promise((f,h)=>{d.addEventListener("load",f),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${l}`)))})}))}function r(a){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a}return o.then(a=>{for(const s of a||[])s.status==="rejected"&&r(s.reason);return e().catch(r)})};var K0e=Object.defineProperty,U0e=Object.defineProperties,q0e=Object.getOwnPropertyDescriptors,qO=Object.getOwnPropertySymbols,Z0e=Object.prototype.hasOwnProperty,J0e=Object.prototype.propertyIsEnumerable,Px=(t,e,n)=>e in t?K0e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Je=(t,e)=>{for(var n in e||(e={}))Z0e.call(e,n)&&Px(t,n,e[n]);if(qO)for(var n of qO(e))J0e.call(e,n)&&Px(t,n,e[n]);return t},wt=(t,e)=>U0e(t,q0e(e)),gt=(t,e,n)=>Px(t,typeof e!="symbol"?e+"":e,n),Q0e=(t,e,n)=>new Promise((i,o)=>{var r=l=>{try{s(n.next(l))}catch(c){o(c)}},a=l=>{try{s(n.throw(l))}catch(c){o(c)}},s=l=>l.done?i(l.value):Promise.resolve(l.value).then(r,a);s((n=n.apply(t,e)).next())});/*! + */var lo;(function(t){class e{static encodeText(s,l){const c=t.QrSegment.makeSegments(s);return e.encodeSegments(c,l)}static encodeBinary(s,l){const c=t.QrSegment.makeBytes(s);return e.encodeSegments([c],l)}static encodeSegments(s,l){let c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:40,d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1,f=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;if(!(e.MIN_VERSION<=c&&c<=u&&u<=e.MAX_VERSION)||d<-1||d>7)throw new RangeError("Invalid value");let h,p;for(h=c;;h++){const b=e.getNumDataCodewords(h,l)*8,y=r.getTotalBits(s,h);if(y<=b){p=y;break}if(h>=u)throw new RangeError("Data too long")}for(const b of[e.Ecc.MEDIUM,e.Ecc.QUARTILE,e.Ecc.HIGH])f&&p<=e.getNumDataCodewords(h,b)*8&&(l=b);const g=[];for(const b of s){n(b.mode.modeBits,4,g),n(b.numChars,b.mode.numCharCountBits(h),g);for(const y of b.getData())g.push(y)}o(g.length==p);const m=e.getNumDataCodewords(h,l)*8;o(g.length<=m),n(0,Math.min(4,m-g.length),g),n(0,(8-g.length%8)%8,g),o(g.length%8==0);for(let b=236;g.lengthv[y>>>3]|=b<<7-(y&7)),new e(h,l,v,d)}constructor(s,l,c,u){if(this.version=s,this.errorCorrectionLevel=l,this.modules=[],this.isFunction=[],se.MAX_VERSION)throw new RangeError("Version value out of range");if(u<-1||u>7)throw new RangeError("Mask value out of range");this.size=s*4+17;const d=[];for(let h=0;h>>9)*1335;const u=(l<<10|c)^21522;o(u>>>15==0);for(let d=0;d<=5;d++)this.setFunctionModule(8,d,i(u,d));this.setFunctionModule(8,7,i(u,6)),this.setFunctionModule(8,8,i(u,7)),this.setFunctionModule(7,8,i(u,8));for(let d=9;d<15;d++)this.setFunctionModule(14-d,8,i(u,d));for(let d=0;d<8;d++)this.setFunctionModule(this.size-1-d,8,i(u,d));for(let d=8;d<15;d++)this.setFunctionModule(8,this.size-15+d,i(u,d));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let s=this.version;for(let c=0;c<12;c++)s=s<<1^(s>>>11)*7973;const l=this.version<<12|s;o(l>>>18==0);for(let c=0;c<18;c++){const u=i(l,c),d=this.size-11+c%3,f=Math.floor(c/3);this.setFunctionModule(d,f,u),this.setFunctionModule(f,d,u)}}drawFinderPattern(s,l){for(let c=-4;c<=4;c++)for(let u=-4;u<=4;u++){const d=Math.max(Math.abs(u),Math.abs(c)),f=s+u,h=l+c;0<=f&&f{(b!=p-d||w>=h)&&v.push(y[b])});return o(v.length==f),v}drawCodewords(s){if(s.length!=Math.floor(e.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let l=0;for(let c=this.size-1;c>=1;c-=2){c==6&&(c=5);for(let u=0;u>>3],7-(l&7)),l++)}}o(l==s.length*8)}applyMask(s){if(s<0||s>7)throw new RangeError("Mask value out of range");for(let l=0;l5&&s++):(this.finderPenaltyAddHistory(h,p),f||(s+=this.finderPenaltyCountPatterns(p)*e.PENALTY_N3),f=this.modules[d][g],h=1);s+=this.finderPenaltyTerminateAndCount(f,h,p)*e.PENALTY_N3}for(let d=0;d5&&s++):(this.finderPenaltyAddHistory(h,p),f||(s+=this.finderPenaltyCountPatterns(p)*e.PENALTY_N3),f=this.modules[g][d],h=1);s+=this.finderPenaltyTerminateAndCount(f,h,p)*e.PENALTY_N3}for(let d=0;df+(h?1:0),l);const c=this.size*this.size,u=Math.ceil(Math.abs(l*20-c*10)/c)-1;return o(0<=u&&u<=9),s+=u*e.PENALTY_N4,o(0<=s&&s<=2568888),s}getAlignmentPatternPositions(){if(this.version==1)return[];{const s=Math.floor(this.version/7)+2,l=this.version==32?26:Math.ceil((this.version*4+4)/(s*2-2))*2,c=[6];for(let u=this.size-7;c.lengthe.MAX_VERSION)throw new RangeError("Version number out of range");let l=(16*s+128)*s+64;if(s>=2){const c=Math.floor(s/7)+2;l-=(25*c-10)*c-55,s>=7&&(l-=36)}return o(208<=l&&l<=29648),l}static getNumDataCodewords(s,l){return Math.floor(e.getNumRawDataModules(s)/8)-e.ECC_CODEWORDS_PER_BLOCK[l.ordinal][s]*e.NUM_ERROR_CORRECTION_BLOCKS[l.ordinal][s]}static reedSolomonComputeDivisor(s){if(s<1||s>255)throw new RangeError("Degree out of range");const l=[];for(let u=0;u0);for(const u of s){const d=u^c.shift();c.push(0),l.forEach((f,h)=>c[h]^=e.reedSolomonMultiply(f,d))}return c}static reedSolomonMultiply(s,l){if(s>>>8||l>>>8)throw new RangeError("Byte out of range");let c=0;for(let u=7;u>=0;u--)c=c<<1^(c>>>7)*285,c^=(l>>>u&1)*s;return o(c>>>8==0),c}finderPenaltyCountPatterns(s){const l=s[1];o(l<=this.size*3);const c=l>0&&s[2]==l&&s[3]==l*3&&s[4]==l&&s[5]==l;return(c&&s[0]>=l*4&&s[6]>=l?1:0)+(c&&s[6]>=l*4&&s[0]>=l?1:0)}finderPenaltyTerminateAndCount(s,l,c){return s&&(this.finderPenaltyAddHistory(l,c),l=0),l+=this.size,this.finderPenaltyAddHistory(l,c),this.finderPenaltyCountPatterns(c)}finderPenaltyAddHistory(s,l){l[0]==0&&(s+=this.size),l.pop(),l.unshift(s)}}e.MIN_VERSION=1,e.MAX_VERSION=40,e.PENALTY_N1=3,e.PENALTY_N2=3,e.PENALTY_N3=40,e.PENALTY_N4=10,e.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],e.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],t.QrCode=e;function n(a,s,l){if(s<0||s>31||a>>>s)throw new RangeError("Value out of range");for(let c=s-1;c>=0;c--)l.push(a>>>c&1)}function i(a,s){return(a>>>s&1)!=0}function o(a){if(!a)throw new Error("Assertion error")}class r{static makeBytes(s){const l=[];for(const c of s)n(c,8,l);return new r(r.Mode.BYTE,s.length,l)}static makeNumeric(s){if(!r.isNumeric(s))throw new RangeError("String contains non-numeric characters");const l=[];for(let c=0;c=1<1&&arguments[1]!==void 0?arguments[1]:0;const n=[];return t.forEach(function(i,o){let r=null;i.forEach(function(a,s){if(!a&&r!==null){n.push(`M${r+e} ${o+e}h${s-r}v1H${r+e}z`),r=null;return}if(s===i.length-1){if(!a)return;r===null?n.push(`M${s+e},${o+e} h1v1H${s+e}z`):n.push(`M${r+e},${o+e} h${s+1-r}v1H${r+e}z`);return}a&&r===null&&(r=s)})}),n.join("")}function F5(t,e){return t.slice().map((n,i)=>i=e.y+e.h?n:n.map((o,r)=>r=e.x+e.w?o:!1))}function N5(t,e,n,i){if(i==null)return null;const o=t.length+n*2,r=Math.floor(e*Kbe),a=o/e,s=(i.width||r)*a,l=(i.height||r)*a,c=i.x==null?t.length/2-s/2:i.x*a,u=i.y==null?t.length/2-l/2:i.y*a;let d=null;if(i.excavate){const f=Math.floor(c),h=Math.floor(u),p=Math.ceil(s+c-f),g=Math.ceil(l+u-h);d={x:f,y:h,w:p,h:g}}return{x:c,y:u,h:l,w:s,excavation:d}}function B5(t,e){return e!=null?Math.floor(e):t?Ybe:Gbe}const Ube=function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0}(),qbe=oe({name:"QRCodeCanvas",inheritAttrs:!1,props:A(A({},VC()),{level:String,bgColor:String,fgColor:String,marginSize:Number}),setup(t,e){let{attrs:n,expose:i}=e;const o=L(()=>{var l;return(l=t.imageSettings)===null||l===void 0?void 0:l.src}),r=ie(null),a=ie(null),s=ie(!1);return i({toDataURL:(l,c)=>{var u;return(u=r.value)===null||u===void 0?void 0:u.toDataURL(l,c)}}),Ke(()=>{const{value:l,size:c=_x,level:u=I5,bgColor:d=k5,fgColor:f=D5,includeMargin:h=R5,marginSize:p,imageSettings:g}=t;if(r.value!=null){const m=r.value,v=m.getContext("2d");if(!v)return;let b=lo.QrCode.encodeText(l,M5[u]).getModules();const y=B5(h,p),w=b.length+y*2,x=N5(b,c,y,g),$=a.value,S=s.value&&x!=null&&$!==null&&$.complete&&$.naturalHeight!==0&&$.naturalWidth!==0;S&&x.excavation!=null&&(b=F5(b,x.excavation));const _=window.devicePixelRatio||1;m.height=m.width=c*_;const P=c/w*_;v.scale(P,P),v.fillStyle=d,v.fillRect(0,0,w,w),v.fillStyle=f,Ube?v.fill(new Path2D(L5(b,y))):b.forEach(function(O,T){O.forEach(function(M,I){M&&v.fillRect(I+y,T+y,1,1)})}),S&&v.drawImage($,x.x+y,x.y+y,x.w,x.h)}},{flush:"post"}),ye(o,()=>{s.value=!1}),()=>{var l;const c=(l=t.size)!==null&&l!==void 0?l:_x,u={height:`${c}px`,width:`${c}px`};let d=null;return o.value!=null&&(d=C("img",{src:o.value,key:o.value,style:{display:"none"},onLoad:()=>{s.value=!0},ref:a},null)),C(Qe,null,[C("canvas",H(H({},n),{},{style:[u,n.style],ref:r}),null),d])}}}),Zbe=oe({name:"QRCodeSVG",inheritAttrs:!1,props:A(A({},VC()),{color:String,level:String,bgColor:String,fgColor:String,marginSize:Number,title:String}),setup(t){let e=null,n=null,i=null,o=null,r=null,a=null;return Ke(()=>{const{value:s,size:l=_x,level:c=I5,includeMargin:u=R5,marginSize:d,imageSettings:f}=t;e=lo.QrCode.encodeText(s,M5[c]).getModules(),n=B5(u,d),i=e.length+n*2,o=N5(e,l,n,f),f!=null&&o!=null&&(o.excavation!=null&&(e=F5(e,o.excavation)),a=C("image",{"xlink:href":f.src,height:o.h,width:o.w,x:o.x+n,y:o.y+n,preserveAspectRatio:"none"},null)),r=L5(e,n)}),()=>{const s=t.bgColor&&k5,l=t.fgColor&&D5;return C("svg",{height:t.size,width:t.size,viewBox:`0 0 ${i} ${i}`},[!!t.title&&C("title",null,[t.title]),C("path",{fill:s,d:`M0,0 h${i}v${i}H0z`,"shape-rendering":"crispEdges"},null),C("path",{fill:l,d:r,"shape-rendering":"crispEdges"},null),a])}}}),Jbe=oe({name:"AQrcode",inheritAttrs:!1,props:Xbe(),emits:["refresh"],setup(t,e){let{emit:n,attrs:i,expose:o}=e;const[r]=xo("QRCode"),{prefixCls:a}=Me("qrcode",t),[s,l]=Wbe(a),[,c]=Xr(),u=se();o({toDataURL:(f,h)=>{var p;return(p=u.value)===null||p===void 0?void 0:p.toDataURL(f,h)}});const d=L(()=>{const{value:f,icon:h="",size:p=160,iconSize:g=40,color:m=c.value.colorText,bgColor:v="transparent",errorLevel:b="M"}=t,y={src:h,x:void 0,y:void 0,height:g,width:g,excavate:!0};return{value:f,size:p-(c.value.paddingSM+c.value.lineWidth)*2,level:b,bgColor:v,fgColor:m,imageSettings:h?y:void 0}});return()=>{const f=a.value;return s(C("div",H(H({},i),{},{style:[i.style,{width:`${t.size}px`,height:`${t.size}px`,backgroundColor:d.value.bgColor}],class:[l.value,f,{[`${f}-borderless`]:!t.bordered}]}),[t.status!=="active"&&C("div",{class:`${f}-mask`},[t.status==="loading"&&C(rr,null,null),t.status==="expired"&&C(Qe,null,[C("p",{class:`${f}-expired`},[r.value.expired]),C(nn,{type:"link",onClick:h=>n("refresh",h)},{default:()=>[r.value.refresh],icon:()=>C(jC,null,null)})]),t.status==="scanned"&&C("p",{class:`${f}-scanned`},[r.value.scanned])]),t.type==="canvas"?C(qbe,H({ref:u},d.value),null):C(Zbe,d.value,null)]))}}}),Qbe=Vt(Jbe);function e0e(t){const e=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,{top:i,right:o,bottom:r,left:a}=t.getBoundingClientRect();return i>=0&&a>=0&&o<=e&&r<=n}function t0e(t,e,n,i){const[o,r]=Mt(void 0);Ke(()=>{const u=typeof t.value=="function"?t.value():t.value;r(u||null)},{flush:"post"});const[a,s]=Mt(null),l=()=>{if(!e.value){s(null);return}if(o.value){!e0e(o.value)&&e.value&&o.value.scrollIntoView(i.value);const{left:u,top:d,width:f,height:h}=o.value.getBoundingClientRect(),p={left:u,top:d,width:f,height:h,radius:0};JSON.stringify(a.value)!==JSON.stringify(p)&&s(p)}else s(null)};return Ze(()=>{ye([e,o],()=>{l()},{flush:"post",immediate:!0}),window.addEventListener("resize",l)}),at(()=>{window.removeEventListener("resize",l)}),[L(()=>{var u,d;if(!a.value)return a.value;const f=((u=n.value)===null||u===void 0?void 0:u.offset)||6,h=((d=n.value)===null||d===void 0?void 0:d.radius)||2;return{left:a.value.left-f,top:a.value.top-f,width:a.value.width+f*2,height:a.value.height+f*2,radius:h}}),o]}const n0e=()=>({arrow:Xe([Boolean,Object]),target:Xe([String,Function,Object]),title:Xe([String,Object]),description:Xe([String,Object]),placement:Ne(),mask:Xe([Object,Boolean],!0),className:{type:String},style:Fe(),scrollIntoViewOptions:Xe([Boolean,Object])}),XC=()=>A(A({},n0e()),{prefixCls:{type:String},total:{type:Number},current:{type:Number},onClose:ve(),onFinish:ve(),renderPanel:ve(),onPrev:ve(),onNext:ve()}),i0e=oe({name:"DefaultPanel",inheritAttrs:!1,props:XC(),setup(t,e){let{attrs:n}=e;return()=>{const{prefixCls:i,current:o,total:r,title:a,description:s,onClose:l,onPrev:c,onNext:u,onFinish:d}=t;return C("div",H(H({},n),{},{class:ce(`${i}-content`,n.class)}),[C("div",{class:`${i}-inner`},[C("button",{type:"button",onClick:l,"aria-label":"Close",class:`${i}-close`},[C("span",{class:`${i}-close-x`},[Qn("×")])]),C("div",{class:`${i}-header`},[C("div",{class:`${i}-title`},[a])]),C("div",{class:`${i}-description`},[s]),C("div",{class:`${i}-footer`},[C("div",{class:`${i}-sliders`},[r>1?[...Array.from({length:r}).keys()].map((f,h)=>C("span",{key:f,class:h===o?"active":""},null)):null]),C("div",{class:`${i}-buttons`},[o!==0?C("button",{class:`${i}-prev-btn`,onClick:c},[Qn("Prev")]):null,o===r-1?C("button",{class:`${i}-finish-btn`,onClick:d},[Qn("Finish")]):C("button",{class:`${i}-next-btn`,onClick:u},[Qn("Next")])])])])])}}}),o0e=oe({name:"TourStep",inheritAttrs:!1,props:XC(),setup(t,e){let{attrs:n}=e;return()=>{const{current:i,renderPanel:o}=t;return C(Qe,null,[typeof o=="function"?o(A(A({},n),t),i):C(i0e,H(H({},n),t),null)])}}});let XO=0;const r0e=ii();function a0e(){let t;return r0e?(t=XO,XO+=1):t="TEST_OR_SSR",t}function s0e(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:se("");const e=`vc_unique_${a0e()}`;return t.value||e}const oh={fill:"transparent","pointer-events":"auto"},l0e=oe({name:"TourMask",props:{prefixCls:{type:String},pos:Fe(),rootClassName:{type:String},showMask:Ce(),fill:{type:String,default:"rgba(0,0,0,0.5)"},open:Ce(),animated:Xe([Boolean,Object]),zIndex:{type:Number}},setup(t,e){let{attrs:n}=e;const i=s0e();return()=>{const{prefixCls:o,open:r,rootClassName:a,pos:s,showMask:l,fill:c,animated:u,zIndex:d}=t,f=`${o}-mask-${i}`,h=typeof u=="object"?u==null?void 0:u.placeholder:u;return C(Yd,{visible:r,autoLock:!0},{default:()=>r&&C("div",H(H({},n),{},{class:ce(`${o}-mask`,a,n.class),style:[{position:"fixed",left:0,right:0,top:0,bottom:0,zIndex:d,pointerEvents:"none"},n.style]}),[l?C("svg",{style:{width:"100%",height:"100%"}},[C("defs",null,[C("mask",{id:f},[C("rect",{x:"0",y:"0",width:"100vw",height:"100vh",fill:"white"},null),s&&C("rect",{x:s.left,y:s.top,rx:s.radius,width:s.width,height:s.height,fill:"black",class:h?`${o}-placeholder-animated`:""},null)])]),C("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:c,mask:`url(#${f})`},null),s&&C(Qe,null,[C("rect",H(H({},oh),{},{x:"0",y:"0",width:"100%",height:s.top}),null),C("rect",H(H({},oh),{},{x:"0",y:"0",width:s.left,height:"100%"}),null),C("rect",H(H({},oh),{},{x:"0",y:s.top+s.height,width:"100%",height:`calc(100vh - ${s.top+s.height}px)`}),null),C("rect",H(H({},oh),{},{x:s.left+s.width,y:"0",width:`calc(100vw - ${s.left+s.width}px)`,height:"100%"}),null)])]):null])})}}}),c0e=[0,0],YO={left:{points:["cr","cl"],offset:[-8,0]},right:{points:["cl","cr"],offset:[8,0]},top:{points:["bc","tc"],offset:[0,-8]},bottom:{points:["tc","bc"],offset:[0,8]},topLeft:{points:["bl","tl"],offset:[0,-8]},leftTop:{points:["tr","tl"],offset:[-8,0]},topRight:{points:["br","tr"],offset:[0,-8]},rightTop:{points:["tl","tr"],offset:[8,0]},bottomRight:{points:["tr","br"],offset:[0,8]},rightBottom:{points:["bl","br"],offset:[8,0]},bottomLeft:{points:["tl","bl"],offset:[0,8]},leftBottom:{points:["br","bl"],offset:[-8,0]}};function z5(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const e={};return Object.keys(YO).forEach(n=>{e[n]=A(A({},YO[n]),{autoArrow:t,targetOffset:c0e})}),e}z5();var u0e=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{const{builtinPlacements:t,popupAlign:e}=VD();return{builtinPlacements:t,popupAlign:e,steps:xt(),open:Ce(),defaultCurrent:{type:Number},current:{type:Number},onChange:ve(),onClose:ve(),onFinish:ve(),mask:Xe([Boolean,Object],!0),arrow:Xe([Boolean,Object],!0),rootClassName:{type:String},placement:Ne("bottom"),prefixCls:{type:String,default:"rc-tour"},renderPanel:ve(),gap:Fe(),animated:Xe([Boolean,Object]),scrollIntoViewOptions:Xe([Boolean,Object],!0),zIndex:{type:Number,default:1001}}},d0e=oe({name:"Tour",inheritAttrs:!1,props:ct(H5(),{}),setup(t){const{defaultCurrent:e,placement:n,mask:i,scrollIntoViewOptions:o,open:r,gap:a,arrow:s}=uo(t),l=se(),[c,u]=jt(0,{value:L(()=>t.current),defaultValue:e.value}),[d,f]=jt(void 0,{value:L(()=>t.open),postState:S=>c.value<0||c.value>=t.steps.length?!1:S??!0}),h=ie(d.value);Ke(()=>{d.value&&!h.value&&u(0),h.value=d.value});const p=L(()=>t.steps[c.value]||{}),g=L(()=>{var S;return(S=p.value.placement)!==null&&S!==void 0?S:n.value}),m=L(()=>{var S;return d.value&&((S=p.value.mask)!==null&&S!==void 0?S:i.value)}),v=L(()=>{var S;return(S=p.value.scrollIntoViewOptions)!==null&&S!==void 0?S:o.value}),[b,y]=t0e(L(()=>p.value.target),r,a,v),w=L(()=>y.value?typeof p.value.arrow>"u"?s.value:p.value.arrow:!1),x=L(()=>typeof w.value=="object"?w.value.pointAtCenter:!1);ye(x,()=>{var S;(S=l.value)===null||S===void 0||S.forcePopupAlign()}),ye(c,()=>{var S;(S=l.value)===null||S===void 0||S.forcePopupAlign()});const $=S=>{var _;u(S),(_=t.onChange)===null||_===void 0||_.call(t,S)};return()=>{var S;const{prefixCls:_,steps:P,onClose:O,onFinish:T,rootClassName:M,renderPanel:I,animated:k,zIndex:E}=t,R=u0e(t,["prefixCls","steps","onClose","onFinish","rootClassName","renderPanel","animated","zIndex"]);if(y.value===void 0)return null;const D=()=>{f(!1),O==null||O(c.value)},F=typeof m.value=="boolean"?m.value:!!m.value,N=typeof m.value=="boolean"?void 0:m.value,B=()=>y.value||document.body,z=()=>C(o0e,H({arrow:w.value,key:"content",prefixCls:_,total:P.length,renderPanel:I,onPrev:()=>{$(c.value-1)},onNext:()=>{$(c.value+1)},onClose:D,current:c.value,onFinish:()=>{D(),T==null||T()}},p.value),null),W=L(()=>{const j=b.value||d0,U={};return Object.keys(j).forEach(V=>{typeof j[V]=="number"?U[V]=`${j[V]}px`:U[V]=j[V]}),U});return d.value?C(Qe,null,[C(l0e,{zIndex:E,prefixCls:_,pos:b.value,showMask:F,style:N==null?void 0:N.style,fill:N==null?void 0:N.color,open:d.value,animated:k,rootClassName:M},null),C(tl,H(H({},R),{},{arrow:!!R.arrow,builtinPlacements:p.value.target?(S=R.builtinPlacements)!==null&&S!==void 0?S:z5(x.value):void 0,ref:l,popupStyle:p.value.target?p.value.style:A(A({},p.value.style),{position:"fixed",left:d0.left,top:d0.top,transform:"translate(-50%, -50%)"}),popupPlacement:g.value,popupVisible:d.value,popupClassName:ce(M,p.value.className),prefixCls:_,popup:z,forceRender:!1,destroyPopupOnHide:!0,zIndex:E,mask:!1,getTriggerDOMNode:B}),{default:()=>[C(Yd,{visible:d.value,autoLock:!0},{default:()=>[C("div",{class:ce(M,`${_}-target-placeholder`),style:A(A({},W.value),{position:"fixed",pointerEvents:"none"})},null)]})]})]):null}}}),f0e=()=>A(A({},H5()),{steps:{type:Array},prefixCls:{type:String},current:{type:Number},type:{type:String},"onUpdate:current":Function}),h0e=()=>A(A({},XC()),{cover:{type:Object},nextButtonProps:{type:Object},prevButtonProps:{type:Object},current:{type:Number},type:{type:String}}),p0e=oe({name:"ATourPanel",inheritAttrs:!1,props:h0e(),setup(t,e){let{attrs:n,slots:i}=e;const{current:o,total:r}=uo(t),a=L(()=>o.value===r.value-1),s=c=>{var u;const d=t.prevButtonProps;(u=t.onPrev)===null||u===void 0||u.call(t,c),typeof(d==null?void 0:d.onClick)=="function"&&(d==null||d.onClick())},l=c=>{var u,d;const f=t.nextButtonProps;a.value?(u=t.onFinish)===null||u===void 0||u.call(t,c):(d=t.onNext)===null||d===void 0||d.call(t,c),typeof(f==null?void 0:f.onClick)=="function"&&(f==null||f.onClick())};return()=>{const{prefixCls:c,title:u,onClose:d,cover:f,description:h,type:p,arrow:g}=t,m=t.prevButtonProps,v=t.nextButtonProps;let b;u&&(b=C("div",{class:`${c}-header`},[C("div",{class:`${c}-title`},[u])]));let y;h&&(y=C("div",{class:`${c}-description`},[h]));let w;f&&(w=C("div",{class:`${c}-cover`},[f]));let x;i.indicatorsRender?x=i.indicatorsRender({current:o.value,total:r}):x=[...Array.from({length:r.value}).keys()].map((_,P)=>C("span",{key:_,class:ce(P===o.value&&`${c}-indicator-active`,`${c}-indicator`)},null));const $=p==="primary"?"default":"primary",S={type:"default",ghost:p==="primary"};return C(Us,{componentName:"Tour",defaultLocale:bi.Tour},{default:_=>{var P;return C("div",H(H({},n),{},{class:ce(p==="primary"?`${c}-primary`:"",n.class,`${c}-content`)}),[g&&C("div",{class:`${c}-arrow`,key:"arrow"},null),C("div",{class:`${c}-inner`},[C(ai,{class:`${c}-close`,onClick:d},null),w,b,y,C("div",{class:`${c}-footer`},[r.value>1&&C("div",{class:`${c}-indicators`},[x]),C("div",{class:`${c}-buttons`},[o.value!==0?C(nn,H(H(H({},S),m),{},{onClick:s,size:"small",class:ce(`${c}-prev-btn`,m==null?void 0:m.className)}),{default:()=>[ey(m==null?void 0:m.children)?m.children():(P=m==null?void 0:m.children)!==null&&P!==void 0?P:_.Previous]}):null,C(nn,H(H({type:$},v),{},{onClick:l,size:"small",class:ce(`${c}-next-btn`,v==null?void 0:v.className)}),{default:()=>[ey(v==null?void 0:v.children)?v==null?void 0:v.children():a.value?_.Finish:_.Next]})])])])])}})}}}),g0e=t=>{let{defaultType:e,steps:n,current:i,defaultCurrent:o}=t;const r=se(o==null?void 0:o.value),a=L(()=>i==null?void 0:i.value);ye(a,u=>{r.value=u??(o==null?void 0:o.value)},{immediate:!0});const s=u=>{r.value=u},l=L(()=>{var u,d;return typeof r.value=="number"?n&&((d=(u=n.value)===null||u===void 0?void 0:u[r.value])===null||d===void 0?void 0:d.type):e==null?void 0:e.value});return{currentMergedType:L(()=>{var u;return(u=l.value)!==null&&u!==void 0?u:e==null?void 0:e.value}),updateInnerCurrent:s}},m0e=t=>{const{componentCls:e,lineHeight:n,padding:i,paddingXS:o,borderRadius:r,borderRadiusXS:a,colorPrimary:s,colorText:l,colorFill:c,indicatorHeight:u,indicatorWidth:d,boxShadowTertiary:f,tourZIndexPopup:h,fontSize:p,colorBgContainer:g,fontWeightStrong:m,marginXS:v,colorTextLightSolid:b,tourBorderRadius:y,colorWhite:w,colorBgTextHover:x,tourCloseSize:$,motionDurationSlow:S,antCls:_}=t;return[{[e]:A(A({},rt(t)),{color:l,position:"absolute",zIndex:h,display:"block",visibility:"visible",fontSize:p,lineHeight:n,width:520,"--antd-arrow-background-color":g,"&-pure":{maxWidth:"100%",position:"relative"},[`&${e}-hidden`]:{display:"none"},[`${e}-content`]:{position:"relative"},[`${e}-inner`]:{textAlign:"start",textDecoration:"none",borderRadius:y,boxShadow:f,position:"relative",backgroundColor:g,border:"none",backgroundClip:"padding-box",[`${e}-close`]:{position:"absolute",top:i,insetInlineEnd:i,color:t.colorIcon,outline:"none",width:$,height:$,borderRadius:t.borderRadiusSM,transition:`background-color ${t.motionDurationMid}, color ${t.motionDurationMid}`,display:"flex",alignItems:"center",justifyContent:"center","&:hover":{color:t.colorIconHover,backgroundColor:t.wireframe?"transparent":t.colorFillContent}},[`${e}-cover`]:{textAlign:"center",padding:`${i+$+o}px ${i}px 0`,img:{width:"100%"}},[`${e}-header`]:{padding:`${i}px ${i}px ${o}px`,[`${e}-title`]:{lineHeight:n,fontSize:p,fontWeight:m}},[`${e}-description`]:{padding:`0 ${i}px`,lineHeight:n,wordWrap:"break-word"},[`${e}-footer`]:{padding:`${o}px ${i}px ${i}px`,textAlign:"end",borderRadius:`0 0 ${a}px ${a}px`,display:"flex",[`${e}-indicators`]:{display:"inline-block",[`${e}-indicator`]:{width:d,height:u,display:"inline-block",borderRadius:"50%",background:c,"&:not(:last-child)":{marginInlineEnd:u},"&-active":{background:s}}},[`${e}-buttons`]:{marginInlineStart:"auto",[`${_}-btn`]:{marginInlineStart:v}}}},[`${e}-primary, &${e}-primary`]:{"--antd-arrow-background-color":s,[`${e}-inner`]:{color:b,textAlign:"start",textDecoration:"none",backgroundColor:s,borderRadius:r,boxShadow:f,[`${e}-close`]:{color:b},[`${e}-indicators`]:{[`${e}-indicator`]:{background:new Ot(b).setAlpha(.15).toRgbString(),"&-active":{background:b}}},[`${e}-prev-btn`]:{color:b,borderColor:new Ot(b).setAlpha(.15).toRgbString(),backgroundColor:s,"&:hover":{backgroundColor:new Ot(b).setAlpha(.15).toRgbString(),borderColor:"transparent"}},[`${e}-next-btn`]:{color:s,borderColor:"transparent",background:w,"&:hover":{background:new Ot(x).onBackground(w).toRgbString()}}}}}),[`${e}-mask`]:{[`${e}-placeholder-animated`]:{transition:`all ${S}`}},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${e}-inner`]:{borderRadius:Math.min(y,U1)}}},q1(t,{colorBg:"var(--antd-arrow-background-color)",contentRadius:y,limitVerticalRadius:!0})]},v0e=et("Tour",t=>{const{borderRadiusLG:e,fontSize:n,lineHeight:i}=t,o=Ve(t,{tourZIndexPopup:t.zIndexPopupBase+70,indicatorWidth:6,indicatorHeight:6,tourBorderRadius:e,tourCloseSize:n*i});return[m0e(o)]});var b0e=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{const{steps:g,current:m,type:v,rootClassName:b}=t,y=b0e(t,["steps","current","type","rootClassName"]),w=ce({[`${c.value}-primary`]:h.value==="primary",[`${c.value}-rtl`]:u.value==="rtl"},f.value,b),x=(_,P)=>C(p0e,H(H({},_),{},{type:v,current:P}),{indicatorsRender:o.indicatorsRender}),$=_=>{p(_),i("update:current",_),i("change",_)},S=L(()=>K1({arrowPointAtCenter:!0,autoAdjustOverflow:!0}));return d(C(d0e,H(H(H({},n),y),{},{rootClassName:w,prefixCls:c.value,current:m,defaultCurrent:t.defaultCurrent,animated:!0,renderPanel:x,onChange:$,steps:g,builtinPlacements:S.value}),null))}}}),x0e=Vt(y0e),W5=Symbol("appConfigContext"),w0e=t=>ot(W5,t),S0e=()=>qe(W5,{}),j5=Symbol("appContext"),C0e=t=>ot(j5,t),$0e=$t({message:{},notification:{},modal:{}}),A0e=()=>qe(j5,$0e),_0e=t=>{const{componentCls:e,colorText:n,fontSize:i,lineHeight:o,fontFamily:r}=t;return{[e]:{color:n,fontSize:i,lineHeight:o,fontFamily:r}}},P0e=et("App",t=>[_0e(t)]),T0e=()=>({rootClassName:String,message:Fe(),notification:Fe()}),O0e=()=>A0e(),Yu=oe({name:"AApp",props:ct(T0e(),{}),setup(t,e){let{slots:n}=e;const{prefixCls:i}=Me("app",t),[o,r]=P0e(i),a=L(()=>ce(r.value,i.value,t.rootClassName)),s=S0e(),l=L(()=>({message:A(A({},s.message),t.message),notification:A(A({},s.notification),t.notification)}));w0e(l.value);const[c,u]=gL(l.value.message),[d,f]=PL(l.value.notification),[h,p]=E6(),g=L(()=>({message:c,notification:d,modal:h}));return C0e(g.value),()=>{var m;return o(C("div",{class:a.value},[p(),u(),f(),(m=n.default)===null||m===void 0?void 0:m.call(n)]))}}});Yu.useApp=O0e;Yu.install=function(t){t.component(Yu.name,Yu)};const V5=["wrap","nowrap","wrap-reverse"],X5=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],Y5=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],E0e=(t,e)=>{const n={};return V5.forEach(i=>{n[`${t}-wrap-${i}`]=e.wrap===i}),n},M0e=(t,e)=>{const n={};return Y5.forEach(i=>{n[`${t}-align-${i}`]=e.align===i}),n[`${t}-align-stretch`]=!e.align&&!!e.vertical,n},I0e=(t,e)=>{const n={};return X5.forEach(i=>{n[`${t}-justify-${i}`]=e.justify===i}),n};function k0e(t,e){return ce(A(A(A({},E0e(t,e)),M0e(t,e)),I0e(t,e)))}const D0e=t=>{const{componentCls:e}=t;return{[e]:{display:"flex","&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},R0e=t=>{const{componentCls:e}=t;return{[e]:{"&-gap-small":{gap:t.flexGapSM},"&-gap-middle":{gap:t.flexGap},"&-gap-large":{gap:t.flexGapLG}}}},L0e=t=>{const{componentCls:e}=t,n={};return V5.forEach(i=>{n[`${e}-wrap-${i}`]={flexWrap:i}}),n},F0e=t=>{const{componentCls:e}=t,n={};return Y5.forEach(i=>{n[`${e}-align-${i}`]={alignItems:i}}),n},N0e=t=>{const{componentCls:e}=t,n={};return X5.forEach(i=>{n[`${e}-justify-${i}`]={justifyContent:i}}),n},B0e=et("Flex",t=>{const e=Ve(t,{flexGapSM:t.paddingXS,flexGap:t.padding,flexGapLG:t.paddingLG});return[D0e(e),R0e(e),L0e(e),F0e(e),N0e(e)]});function GO(t){return["small","middle","large"].includes(t)}const z0e=()=>({prefixCls:Ne(),vertical:Ce(),wrap:Ne(),justify:Ne(),align:Ne(),flex:Xe([Number,String]),gap:Xe([Number,String]),component:Rt()});var H0e=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,i=Object.getOwnPropertySymbols(t);o{var u;return[a.value,l.value,k0e(a.value,t),{[`${a.value}-rtl`]:r.value==="rtl",[`${a.value}-gap-${t.gap}`]:GO(t.gap),[`${a.value}-vertical`]:(u=t.vertical)!==null&&u!==void 0?u:o==null?void 0:o.value.vertical}]});return()=>{var u;const{flex:d,gap:f,component:h="div"}=t,p=H0e(t,["flex","gap","component"]),g={};return d&&(g.flex=d),f&&!GO(f)&&(g.gap=`${f}px`),s(C(h,H({class:[i.class,c.value],style:[i.style,g]},ht(p,["justify","wrap","align","vertical"])),{default:()=>[(u=n.default)===null||u===void 0?void 0:u.call(n)]}))}}}),j0e=Vt(W0e),KO=Object.freeze(Object.defineProperty({__proto__:null,Affix:OD,Alert:zJ,Anchor:cs,AnchorLink:e1,App:Yu,AutoComplete:gJ,AutoCompleteOptGroup:pJ,AutoCompleteOption:hJ,Avatar:Ss,AvatarGroup:Vp,BackTop:pg,Badge:Fu,BadgeRibbon:Xp,Breadcrumb:Cs,BreadcrumbItem:wd,BreadcrumbSeparator:eg,Button:nn,ButtonGroup:qp,Calendar:vne,Card:ql,CardGrid:rg,CardMeta:og,Carousel:ioe,Cascader:bae,CheckableTag:ug,Checkbox:ho,CheckboxGroup:lg,Col:$ae,Collapse:Bu,CollapsePanel:ag,Comment:Oae,Compact:Wp,ConfigProvider:As,DatePicker:Yse,Descriptions:Pl,DescriptionsItem:WL,DirectoryTree:Gh,Divider:rle,Drawer:xle,Dropdown:Io,DropdownButton:xd,Empty:pa,Flex:j0e,FloatButton:Aa,FloatButtonGroup:hg,Form:ga,FormItem:sL,FormItemRest:Bp,Grid:Cae,Image:ds,ImagePreviewGroup:d6,Input:wn,InputGroup:JL,InputNumber:Zce,InputPassword:t6,InputSearch:QL,Layout:uue,LayoutContent:cue,LayoutFooter:sue,LayoutHeader:aue,LayoutSider:lue,List:sa,ListItem:m6,ListItemMeta:p6,LocaleProvider:dL,Mentions:vde,MentionsOption:jh,Menu:sn,MenuDivider:Cd,MenuItem:or,MenuItemGroup:Sd,Modal:Tn,MonthPicker:Dh,PageHeader:Gde,Pagination:lv,Popconfirm:Qde,Popover:Z1,Progress:vC,QRCode:Qbe,QuarterPicker:Rh,Radio:di,RadioButton:ng,RadioGroup:_S,RangePicker:Lh,Rate:zfe,Result:Ps,Row:nhe,Segmented:zbe,Select:kn,SelectOptGroup:uJ,SelectOption:cJ,Skeleton:Un,SkeletonAvatar:LS,SkeletonButton:kS,SkeletonImage:RS,SkeletonInput:DS,SkeletonTitle:jm,Slider:yhe,Space:ec,Spin:rr,Statistic:_r,StatisticCountdown:kde,Step:Vh,Steps:Fhe,SubMenu:Fs,Switch:Ghe,TabPane:ig,Table:rme,TableColumn:Uh,TableColumnGroup:qh,TableSummary:Zh,TableSummaryCell:Sg,TableSummaryRow:wg,Tabs:$s,Tag:Ql,Textarea:tC,TimePicker:eve,TimeRangePicker:Jh,Timeline:Xu,TimelineItem:Od,Tooltip:Pi,Tour:x0e,Transfer:Tme,Tree:p5,TreeNode:Kh,TreeSelect:Jme,TreeSelectNode:Ax,Typography:_i,TypographyLink:Lc,TypographyParagraph:Fc,TypographyText:Nc,TypographyTitle:Bc,Upload:$be,UploadDragger:Cbe,Watermark:Ibe,WeekPicker:kh,message:Ns,notification:jr},Symbol.toStringTag,{value:"Module"})),V0e=function(t){return Object.keys(KO).forEach(e=>{const n=KO[e];n.install&&t.use(n)}),t.use(l9.StyleProvider),t.config.globalProperties.$message=Ns,t.config.globalProperties.$notification=jr,t.config.globalProperties.$info=Tn.info,t.config.globalProperties.$success=Tn.success,t.config.globalProperties.$error=Tn.error,t.config.globalProperties.$warning=Tn.warning,t.config.globalProperties.$confirm=Tn.confirm,t.config.globalProperties.$destroyAll=Tn.destroyAll,t},X0e={version:vD,install:V0e},Y0e="modulepreload",G0e=function(t){return"/"+t},UO={},ze=function(e,n,i){let o=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),s=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));o=Promise.allSettled(n.map(l=>{if(l=G0e(l),l in UO)return;UO[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":Y0e,c||(d.as="script"),d.crossOrigin="",d.href=l,s&&d.setAttribute("nonce",s),document.head.appendChild(d),c)return new Promise((f,h)=>{d.addEventListener("load",f),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${l}`)))})}))}function r(a){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a}return o.then(a=>{for(const s of a||[])s.status==="rejected"&&r(s.reason);return e().catch(r)})};var K0e=Object.defineProperty,U0e=Object.defineProperties,q0e=Object.getOwnPropertyDescriptors,qO=Object.getOwnPropertySymbols,Z0e=Object.prototype.hasOwnProperty,J0e=Object.prototype.propertyIsEnumerable,Px=(t,e,n)=>e in t?K0e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Je=(t,e)=>{for(var n in e||(e={}))Z0e.call(e,n)&&Px(t,n,e[n]);if(qO)for(var n of qO(e))J0e.call(e,n)&&Px(t,n,e[n]);return t},wt=(t,e)=>U0e(t,q0e(e)),gt=(t,e,n)=>Px(t,typeof e!="symbol"?e+"":e,n),Q0e=(t,e,n)=>new Promise((i,o)=>{var r=l=>{try{s(n.next(l))}catch(c){o(c)}},a=l=>{try{s(n.throw(l))}catch(c){o(c)}},s=l=>l.done?i(l.value):Promise.resolve(l.value).then(r,a);s((n=n.apply(t,e)).next())});/*! * ApexCharts v7.4.0 * (c) 2018-2026 ApexCharts - */let Ge=class{static isSSR(){return typeof window>"u"||typeof document>"u"}static isBrowser(){return!this.isSSR()}static hasAPI(e){return this.isSSR()?!1:typeof window[e]<"u"}static getApex(){return typeof window<"u"&&window.Apex?window.Apex:typeof global<"u"&&global.Apex?global.Apex:{}}};const eye=.55,ZO=.917,tye=.25,nye=1.1,iye=11;let Tx=class G5{constructor(e,n=null){this.nodeName=e,this.namespaceURI=n,this.attributes=new Map,this.children=[],this.textContent="",this.style={},this.classList=new K5,this.parentNode=null,this._ssrWidth=void 0,this._ssrHeight=void 0,this._ssrMode=void 0}setAttribute(e,n){this.attributes.set(e,n)}getAttribute(e){return this.attributes.get(e)}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){if(e&&e!==this){if(e.parentNode&&e.parentNode!==this)e.parentNode.removeChild(e);else if(e.parentNode===this){const n=this.children.indexOf(e);n!==-1&&this.children.splice(n,1)}e.parentNode=this,this.children.push(e)}return e}removeChild(e){const n=this.children.indexOf(e);return n!==-1&&(this.children.splice(n,1),e.parentNode=null),e}insertBefore(e,n){if(!n)return this.appendChild(e);if(e.parentNode&&e.parentNode!==this)e.parentNode.removeChild(e);else if(e.parentNode===this){const o=this.children.indexOf(e);o!==-1&&this.children.splice(o,1)}const i=this.children.indexOf(n);return i!==-1&&(e.parentNode=this,this.children.splice(i,0,e)),e}cloneNode(e=!1){const n=new G5(this.nodeName,this.namespaceURI);return n.textContent=this.textContent,this.attributes.forEach((i,o)=>{n.attributes.set(o,i)}),Object.assign(n.style,this.style),e&&this.children.forEach(i=>{i.cloneNode&&n.appendChild(i.cloneNode(!0))}),n}getBoundingClientRect(){return{width:this._ssrWidth||0,height:this._ssrHeight||0,top:0,left:0,right:this._ssrWidth||0,bottom:this._ssrHeight||0,x:0,y:0}}getBBox(){if(this.nodeName!=="text"&&this.nodeName!=="tspan")return{x:0,y:0,width:0,height:0};const e=this._textLines(),n=e.reduce((c,u)=>Math.max(c,u.length),0);if(!n)return{x:0,y:0,width:0,height:0};const i=parseFloat(this.attributes.get("font-size"))||iye,o=n*i*eye,r=i*(ZO+tye)+(e.length-1)*i*nye,a=this.attributes.get("text-anchor"),s=parseFloat(this.attributes.get("x"))||0,l=parseFloat(this.attributes.get("y"))||0;return{x:a==="middle"?s-o/2:a==="end"?s-o:s,y:l-i*ZO,width:o,height:r}}_textLines(){var e;const n=this.children.filter(i=>i.nodeName==="tspan");return n.length?n.map(i=>{var o;return String((o=i.textContent)!=null?o:"")}):[String((e=this.textContent)!=null?e:"")]}getRootNode(){let e=this;for(;e.parentNode;)e=e.parentNode;return e}querySelector(){return null}querySelectorAll(){return[]}getElementsByClassName(){return[]}addEventListener(){}removeEventListener(){}get childNodes(){return this.children}toString(){let e="";if(this.attributes.forEach((i,o)=>{e+=` ${o}="${i}"`}),this.children.length===0&&!this.textContent)return`<${this.nodeName}${e}/>`;const n=this.children.map(i=>i.toString()).join("");return`<${this.nodeName}${e}>${this.textContent}${n}`}get innerHTML(){return this.children.map(e=>e.toString()).join("")}set innerHTML(e){this.children=[],this.textContent=e}get outerHTML(){return this.toString()}get isConnected(){return!0}},K5=class{constructor(){this.classes=new Set}add(...e){e.forEach(n=>this.classes.add(n))}remove(...e){e.forEach(n=>this.classes.delete(n))}contains(e){return this.classes.has(e)}toggle(e,n){return n===!0?(this.classes.add(e),!0):n===!1?(this.classes.delete(e),!1):this.classes.has(e)?(this.classes.delete(e),!1):(this.classes.add(e),!0)}toString(){return Array.from(this.classes).join(" ")}},U5=class{constructor(){this.SVGNS="http://www.w3.org/2000/svg",this.XLINKNS="http://www.w3.org/1999/xlink"}createElementNS(e,n){return new Tx(n,e)}createTextNode(e){const n={nodeName:"#text",nodeType:3,textContent:e,toString(){return n.textContent}};return n}querySelector(){return null}querySelectorAll(){return[]}getComputedStyle(){return{}}getBoundingClientRect(e){return e&&e.getBoundingClientRect?e.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}createXMLSerializer(){return{serializeToString(e){return e.toString?e.toString():""}}}createDOMParser(){return{parseFromString(e,n){const i=new Tx("root");return i.innerHTML=e,{documentElement:i}}}}},Gn=null,qa=null,Za=null,nt=class{static init(){Ge.isSSR()&&!Gn&&(Gn=new U5)}static createElement(e){return Ge.isSSR()?(Gn||this.init(),Gn.createElementNS(null,e)):document.createElement(e)}static createElementNS(e,n){return Ge.isSSR()?(Gn||this.init(),Gn.createElementNS(e,n)):document.createElementNS(e,n)}static createTextNode(e){return Ge.isSSR()?(Gn||this.init(),Gn.createTextNode(e)):document.createTextNode(e)}static querySelector(e){return Ge.isSSR()?null:document.querySelector(e)}static querySelectorAll(e){return Ge.isSSR()?[]:document.querySelectorAll(e)}static getComputedStyle(e){return Ge.isSSR()?{}:window.getComputedStyle(e)}static matchMedia(e){if(Ge.isSSR()||typeof window.matchMedia!="function")return null;try{return window.matchMedia(e)}catch{return null}}static getBoundingClientRect(e){return Ge.isSSR()?(Gn||this.init(),Gn.getBoundingClientRect(e)):e?e.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}static getXMLSerializer(){return Ge.isSSR()?(Gn||this.init(),qa||(qa=Gn.createXMLSerializer()),qa):(qa||(qa=new XMLSerializer),qa)}static getDOMParser(){return Ge.isSSR()?(Gn||this.init(),Za||(Za=Gn.createDOMParser()),Za):(Za||(Za=new DOMParser),Za)}static addWindowEventListener(e,n,i){Ge.isBrowser()&&window.addEventListener(e,n,i)}static removeWindowEventListener(e,n,i){Ge.isBrowser()&&window.removeEventListener(e,n,i)}static requestAnimationFrame(e){return Ge.isBrowser()?window.requestAnimationFrame(e):(e(0),null)}static cancelAnimationFrame(e){Ge.isBrowser()&&e&&window.cancelAnimationFrame(e)}static elementExists(e){return e?Ge.isSSR()?e._ssrMode===!0||e.nodeName!==void 0:e.getRootNode?e.getRootNode({composed:!0})===document||e.isConnected:!1:!1}static getWindow(){return Ge.isBrowser()?window:null}static getDocument(){return Ge.isBrowser()?document:null}static _getShim(){return Gn}static _resetShim(){Gn=null,qa=null,Za=null}};const JO=new WeakMap;let oye=0,we=class la{static isObject(e){return e&&typeof e=="object"&&!Array.isArray(e)}static is(e,n){return Object.prototype.toString.call(n)==="[object "+e+"]"}static isSafari(){return Ge.isBrowser()&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}static extend(e,n){if(!this.isObject(e)&&this.isObject(n))return this.clone(n);const i=Object.assign({},e);return this.isObject(e)&&this.isObject(n)&&Object.keys(n).forEach(o=>{this.isObject(n[o])?o in e?i[o]=this.extend(e[o],n[o]):Object.assign(i,{[o]:n[o]}):Object.assign(i,{[o]:n[o]})}),i}static copySeriesShallow(e){return Array.isArray(e)?e.map(n=>this.isObject(n)?Je({},n):n):e}static extendArray(e,n){const i=[];return e.map(o=>{i.push(la.extend(n,o))}),e=i,e}static monthMod(e){return e%12}static clone(e,n=new WeakMap,i=!1){if(e===null||typeof e!="object")return e;if(n.has(e))return n.get(e);let o;if(Array.isArray(e))if(i)o=e.slice();else{o=[],n.set(e,o);for(let r=0;r{if(typeof i!="function")return i;let o=JO.get(i);return o===void 0&&(o=++oye,JO.set(i,o)),`__apx_fn_${o}`})}static shallowEqual(e,n){if(e===n)return!0;if(!e||!n)return!1;if(typeof e!="object"||typeof n!="object")return e===n;const i=Object.keys(e),o=Object.keys(n);if(i.length!==o.length)return!1;for(const r of i)if(e[r]!==n[r])return!1;return!0}static log10(e){return Math.log(e)/Math.LN10}static roundToBase10(e){return Math.pow(10,Math.floor(Math.log10(e)))}static roundToBase(e,n){return Math.pow(n,Math.floor(Math.log(e)/Math.log(n)))}static parseNumber(e){return typeof e=="number"||e===null?e:parseFloat(e)}static stripNumber(e,n=2){return Number.isInteger(e)?e:parseFloat(e.toPrecision(n))}static randomId(){return(Math.random()+1).toString(36).substring(4)}static noExponents(e){return e.toString().includes("e")?Math.round(e):e}static elementExists(e){return!(!e||!e.isConnected)}static getDimensions(e){if(!e)return[0,0];if(Ge.isSSR())return[e._ssrWidth||400,e._ssrHeight||300];let n;try{n=getComputedStyle(e,null)}catch{return[e.clientWidth||0,e.clientHeight||0]}let i=e.clientWidth,o=e.clientHeight;if(!i||!o){const r=e.getBoundingClientRect();i=i||r.width,o=o||r.height}return o-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),i-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),[i,o]}static getBoundingClientRect(e){if(!e)return{top:0,right:0,bottom:0,left:0,width:0,height:0,x:0,y:0};if(Ge.isSSR())return nt.getBoundingClientRect(e);const n=e.getBoundingClientRect();return{top:n.top,right:n.right,bottom:n.bottom,left:n.left,width:e.clientWidth,height:e.clientHeight,x:n.left,y:n.top}}static getLargestStringFromArr(e){return e.reduce((n,i)=>(Array.isArray(i)&&(i=i.reduce((o,r)=>o.length>r.length?o:r)),n.length>i.length?n:i),0)}static hexToRgba(e="#999999",n=.6){e.substring(0,1)!=="#"&&(e="#999999");const i=e.replace("#",""),o=i.match(new RegExp("(.{"+i.length/3+"})","g"))||[];for(let r=0;ri+i).join("")),/^[0-9a-fA-F]{6}$/.test(n)?[parseInt(n.slice(0,2),16),parseInt(n.slice(2,4),16),parseInt(n.slice(4,6),16)]:null}static relativeLuminance([e,n,i]){const o=r=>{const a=r/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)};return .2126*o(e)+.7152*o(n)+.0722*o(i)}static getContrastRatio(e,n){const i=la.parseHex(e),o=la.parseHex(n);if(!i||!o)return 0;const r=la.relativeLuminance(i),a=la.relativeLuminance(o),s=Math.max(r,a),l=Math.min(r,a);return(s+.05)/(l+.05)}static rgb2hex(e){return e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i),e&&e.length===4?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):""}shadeRGBColor(e,n){const i=n.split(","),o=e<0?0:255,r=e<0?e*-1:e,a=parseInt(i[0].slice(4),10),s=parseInt(i[1],10),l=parseInt(i[2],10);return"rgb("+(Math.round((o-a)*r)+a)+","+(Math.round((o-s)*r)+s)+","+(Math.round((o-l)*r)+l)+")"}shadeHexColor(e,n){const i=parseInt(n.slice(1),16),o=e<0?0:255,r=e<0?e*-1:e,a=i>>16,s=i>>8&255,l=i&255;return"#"+(16777216+(Math.round((o-a)*r)+a)*65536+(Math.round((o-s)*r)+s)*256+(Math.round((o-l)*r)+l)).toString(16).slice(1)}shadeColor(e,n){return la.isColorHex(n)?this.shadeHexColor(e,n):this.shadeRGBColor(e,n)}static isColorHex(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(e)}static isCSSVariable(e){if(typeof e!="string")return!1;const n=e.trim();return n.startsWith("var(")&&n.endsWith(")")}static getThemeColor(e){if(!la.isCSSVariable(e)||Ge.isSSR())return e;const n=document.createElement("div");n.style.cssText="position:fixed; left: -9999px; visibility:hidden;",n.style.color=e,document.body.appendChild(n);let i;try{i=window.getComputedStyle(n).color}finally{n.parentNode&&n.parentNode.removeChild(n)}return i}static applyOpacityToColor(e,n){const i=Number(n);if(!Number.isFinite(i))return e;if(i<=0)return"transparent";if(i>=1)return e;const o=Math.round(i*100);return`color-mix(in srgb, ${e} ${o}%, transparent)`}static getPolygonPos(e,n){const i=[],o=Math.PI*2/n;for(let r=0;r{}[\]\\/]/gi,n),i}static negToZero(e){return e<0?0:e}static moveIndexInArray(e,n,i){if(i>=e.length){let o=i-e.length+1;for(;o--;)e.push(void 0)}return e.splice(i,0,e.splice(n,1)[0]),e}static extractNumber(e){return parseFloat(e.replace(/[^\d.]*/g,""))}static findAncestor(e,n){for(;(e=e.parentElement)&&!e.classList.contains(n););return e}static setELstyles(e,n){for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e.style[i]=n[i])}static preciseAddition(e,n){const i=(String(e).split(".")[1]||"").length,o=(String(n).split(".")[1]||"").length,r=Math.pow(10,Math.max(i,o));return(Math.round(e*r)+Math.round(n*r))/r}static isNumber(e){return!isNaN(e)&&parseFloat(String(Number(e)))===e&&!isNaN(parseInt(e,10))}static isFloat(e){return Number(e)===e&&e%1!==0}static isMsEdge(){if(Ge.isSSR())return!1;const e=window.navigator.userAgent,n=e.indexOf("Edge/");return n>0?parseInt(e.substring(n+5,e.indexOf(".",n)),10):!1}static getGCD(e,n,i=7){let o=Math.pow(10,i-Math.floor(Math.log10(Math.max(e,n))));for(o>1?(e=Math.round(Math.abs(e)*o),n=Math.round(Math.abs(n)*o)):o=1;n;){const r=n;n=e%n,e=r}return e/o}static getPrimeFactors(e){const n=[];let i=2;for(;e>=2;)e%i==0?(n.push(i),e=e/i):i++;return n}static mod(e,n,i=7){const o=Math.pow(10,i-Math.floor(Math.log10(Math.max(e,n))));return e=Math.round(Math.abs(e)*o),n=Math.round(Math.abs(n)*o),e%n/o}},Ei=class{constructor(e){this.w=e,this.months31=[1,3,5,7,8,10,12],this.months30=[2,4,6,9,11],this.daysCntOfYear=[0,31,59,90,120,151,181,212,243,273,304,334]}isValidDate(e){return typeof e=="number"?!1:!isNaN(this.parseDate(e))}getTimeStamp(e){return isNaN(Date.parse(e))?e:this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toISOString().substr(0,25)).getTime():new Date(e).getTime()}getDate(e){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toUTCString()):new Date(e)}parseDate(e){const n=Date.parse(e);if(!isNaN(n))return this.getTimeStamp(e);if(typeof e!="string")return NaN;let i=Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "));return i=this.getTimeStamp(i),i}parseDateWithTimezone(e){return Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "))}formatDate(e,n){const i=this.w.globals.locale,o=this.w.config.xaxis.labels.datetimeUTC,r=["\0",...i.months],a=["",...i.shortMonths],s=["",...i.days],l=["",...i.shortDays];function c(S,_=2){let P=S+"";for(;P.length<_;)P="0"+P;return P}const u=o?e.getUTCFullYear():e.getFullYear();n=n.replace(/(^|[^\\])yyyy+/g,"$1"+u),n=n.replace(/(^|[^\\])yy/g,"$1"+u.toString().substr(2,2)),n=n.replace(/(^|[^\\])y/g,"$1"+u);const d=(o?e.getUTCMonth():e.getMonth())+1;n=n.replace(/(^|[^\\])MMMM+/g,"$1"+r[0]),n=n.replace(/(^|[^\\])MMM/g,"$1"+a[0]),n=n.replace(/(^|[^\\])MM/g,"$1"+c(d)),n=n.replace(/(^|[^\\])M/g,"$1"+d);const f=o?e.getUTCDate():e.getDate();n=n.replace(/(^|[^\\])dddd+/g,"$1"+s[0]),n=n.replace(/(^|[^\\])ddd/g,"$1"+l[0]),n=n.replace(/(^|[^\\])dd/g,"$1"+c(f)),n=n.replace(/(^|[^\\])d/g,"$1"+f);const h=o?e.getUTCHours():e.getHours();n=n.replace(/(^|[^\\])HH+/g,"$1"+c(h)),n=n.replace(/(^|[^\\])H/g,"$1"+h);const p=h>12?h-12:h===0?12:h;n=n.replace(/(^|[^\\])hh+/g,"$1"+c(p)),n=n.replace(/(^|[^\\])h/g,"$1"+p);const g=o?e.getUTCMinutes():e.getMinutes();n=n.replace(/(^|[^\\])mm+/g,"$1"+c(g)),n=n.replace(/(^|[^\\])m/g,"$1"+g);const m=o?e.getUTCSeconds():e.getSeconds();n=n.replace(/(^|[^\\])ss+/g,"$1"+c(m)),n=n.replace(/(^|[^\\])s/g,"$1"+m);let v=o?e.getUTCMilliseconds():e.getMilliseconds();n=n.replace(/(^|[^\\])fff+/g,"$1"+c(v,3)),v=Math.round(v/10),n=n.replace(/(^|[^\\])ff/g,"$1"+c(v)),v=Math.round(v/10),n=n.replace(/(^|[^\\])f/g,"$1"+v);const b=h<12?"AM":"PM";n=n.replace(/(^|[^\\])TT+/g,"$1"+b),n=n.replace(/(^|[^\\])T/g,"$1"+b.charAt(0));const y=b.toLowerCase();n=n.replace(/(^|[^\\])tt+/g,"$1"+y),n=n.replace(/(^|[^\\])t/g,"$1"+y.charAt(0));let w=-e.getTimezoneOffset(),x=o||!w?"Z":w>0?"+":"-";if(!o){w=Math.abs(w);const S=Math.floor(w/60),_=w%60;x+=c(S)+":"+c(_)}n=n.replace(/(^|[^\\])K/g,"$1"+x);const $=(o?e.getUTCDay():e.getDay())+1;return n=n.replace(new RegExp(s[0],"g"),s[$]),n=n.replace(new RegExp(l[0],"g"),l[$]),n=n.replace(new RegExp(r[0],"g"),r[d]),n=n.replace(new RegExp(a[0],"g"),a[d]),n=n.replace(/\\(.)/g,"$1"),n}getTimeUnitsfromTimestamp(e,n){const i=this.w;i.config.xaxis.min!==void 0&&(e=i.config.xaxis.min),i.config.xaxis.max!==void 0&&(n=i.config.xaxis.max);const o=this.getDate(e),r=this.getDate(n),a=this.formatDate(o,"yyyy MM dd HH mm ss fff").split(" "),s=this.formatDate(r,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(a[6],10),maxMillisecond:parseInt(s[6],10),minSecond:parseInt(a[5],10),maxSecond:parseInt(s[5],10),minMinute:parseInt(a[4],10),maxMinute:parseInt(s[4],10),minHour:parseInt(a[3],10),maxHour:parseInt(s[3],10),minDate:parseInt(a[2],10),maxDate:parseInt(s[2],10),minMonth:parseInt(a[1],10)-1,maxMonth:parseInt(s[1],10)-1,minYear:parseInt(a[0],10),maxYear:parseInt(s[0],10)}}isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}calculcateLastDaysOfMonth(e,n,i){return this.determineDaysOfMonths(e,n)-i}determineDaysOfYear(e){let n=365;return this.isLeapYear(e)&&(n=366),n}determineRemainingDaysOfYear(e,n,i){let o=this.daysCntOfYear[n]+i;return n>1&&this.isLeapYear(e)&&o++,o}determineDaysOfMonths(e,n){let i=30;switch(e=we.monthMod(e),!0){case this.months30.indexOf(e)>-1:e===2&&(this.isLeapYear(n)?i=29:i=28);break;case this.months31.indexOf(e)>-1:i=31;break;default:i=31;break}return i}getDateFields(e,n){const i=new Date(e);return n?{year:i.getUTCFullYear(),month:i.getUTCMonth(),date:i.getUTCDate(),hour:i.getUTCHours(),minute:i.getUTCMinutes(),second:i.getUTCSeconds(),ms:i.getUTCMilliseconds(),weekday:i.getUTCDay()}:{year:i.getFullYear(),month:i.getMonth(),date:i.getDate(),hour:i.getHours(),minute:i.getMinutes(),second:i.getSeconds(),ms:i.getMilliseconds(),weekday:i.getDay()}}addInterval(e,n,i,o){const r=new Date(e);if(o)switch(n){case"year":r.setUTCFullYear(r.getUTCFullYear()+i);break;case"month":r.setUTCMonth(r.getUTCMonth()+i);break;case"week":r.setUTCDate(r.getUTCDate()+i*7);break;case"day":r.setUTCDate(r.getUTCDate()+i);break;case"hour":r.setUTCHours(r.getUTCHours()+i);break;case"minute":r.setUTCMinutes(r.getUTCMinutes()+i);break;case"second":r.setUTCSeconds(r.getUTCSeconds()+i);break}else switch(n){case"year":r.setFullYear(r.getFullYear()+i);break;case"month":r.setMonth(r.getMonth()+i);break;case"week":r.setDate(r.getDate()+i*7);break;case"day":r.setDate(r.getDate()+i);break;case"hour":r.setHours(r.getHours()+i);break;case"minute":r.setMinutes(r.getMinutes()+i);break;case"second":r.setSeconds(r.getSeconds()+i);break}return r.getTime()}ceilToBoundary(e,n,i,o){const r=new Date(e);if(o)switch(n){case"second":{const a=r.getUTCSeconds(),s=Math.ceil(a/i)*i;return s===a&&r.getUTCMilliseconds()===0?e:(r.setUTCMilliseconds(0),r.setUTCSeconds(s),r.getTime())}case"minute":{const a=r.getUTCMinutes(),s=Math.ceil(a/i)*i;return s===a&&r.getUTCSeconds()===0&&r.getUTCMilliseconds()===0?e:(r.setUTCMilliseconds(0),r.setUTCSeconds(0),r.setUTCMinutes(s),r.getTime())}case"hour":{const a=r.getUTCHours(),s=Math.ceil(a/i)*i;return s===a&&r.getUTCMinutes()===0&&r.getUTCSeconds()===0&&r.getUTCMilliseconds()===0?e:(r.setUTCMilliseconds(0),r.setUTCSeconds(0),r.setUTCMinutes(0),r.setUTCHours(s),r.getTime())}case"day":return r.getUTCHours()===0&&r.getUTCMinutes()===0&&r.getUTCSeconds()===0&&r.getUTCMilliseconds()===0?e:(r.setUTCMilliseconds(0),r.setUTCSeconds(0),r.setUTCMinutes(0),r.setUTCHours(0),r.setUTCDate(r.getUTCDate()+1),r.getTime());case"week":{const s=Date.UTC(1970,0,5);r.setUTCMilliseconds(0),r.setUTCSeconds(0),r.setUTCMinutes(0),r.setUTCHours(0);const l=r.getTime(),c=Math.ceil((l-s)/6048e5),u=Math.ceil(c/i)*i,d=s+u*6048e5;return d>=e?d:d+i*6048e5}case"month":{const a=r.getUTCMonth(),s=Math.ceil(a/i)*i;return s===a&&r.getUTCDate()===1&&r.getUTCHours()===0&&r.getUTCMinutes()===0&&r.getUTCSeconds()===0&&r.getUTCMilliseconds()===0?e:(r.setUTCMilliseconds(0),r.setUTCSeconds(0),r.setUTCMinutes(0),r.setUTCHours(0),r.setUTCDate(1),r.setUTCMonth(s),r.getTime())}case"year":{const a=r.getUTCFullYear(),s=Math.ceil(a/i)*i;return s===a&&r.getUTCMonth()===0&&r.getUTCDate()===1&&r.getUTCHours()===0&&r.getUTCMinutes()===0&&r.getUTCSeconds()===0&&r.getUTCMilliseconds()===0?e:Date.UTC(s,0,1)}}else switch(n){case"second":{const a=r.getSeconds(),s=Math.ceil(a/i)*i;return s===a&&r.getMilliseconds()===0?e:(r.setMilliseconds(0),r.setSeconds(s),r.getTime())}case"minute":{const a=r.getMinutes(),s=Math.ceil(a/i)*i;return s===a&&r.getSeconds()===0&&r.getMilliseconds()===0?e:(r.setMilliseconds(0),r.setSeconds(0),r.setMinutes(s),r.getTime())}case"hour":{const a=r.getHours(),s=Math.ceil(a/i)*i;return s===a&&r.getMinutes()===0&&r.getSeconds()===0&&r.getMilliseconds()===0?e:(r.setMilliseconds(0),r.setSeconds(0),r.setMinutes(0),r.setHours(s),r.getTime())}case"day":return r.getHours()===0&&r.getMinutes()===0&&r.getSeconds()===0&&r.getMilliseconds()===0?e:(r.setMilliseconds(0),r.setSeconds(0),r.setMinutes(0),r.setHours(0),r.setDate(r.getDate()+1),r.getTime());case"week":{const s=new Date(1970,0,5).getTime();r.setMilliseconds(0),r.setSeconds(0),r.setMinutes(0),r.setHours(0);const l=r.getTime(),c=Math.ceil((l-s)/6048e5),u=Math.ceil(c/i)*i,d=s+u*6048e5;return d>=e?d:d+i*6048e5}case"month":{const a=r.getMonth(),s=Math.ceil(a/i)*i;return s===a&&r.getDate()===1&&r.getHours()===0&&r.getMinutes()===0&&r.getSeconds()===0&&r.getMilliseconds()===0?e:(r.setMilliseconds(0),r.setSeconds(0),r.setMinutes(0),r.setHours(0),r.setDate(1),r.setMonth(s),r.getTime())}case"year":{const a=r.getFullYear(),s=Math.ceil(a/i)*i;return s===a&&r.getMonth()===0&&r.getDate()===1&&r.getHours()===0&&r.getMinutes()===0&&r.getSeconds()===0&&r.getMilliseconds()===0?e:new Date(s,0,1).getTime()}}return e}isAtBoundary(e,n,i){const o=this.getDateFields(e,i);switch(n){case"year":return o.month===0&&o.date===1&&o.hour===0&&o.minute===0&&o.second===0&&o.ms===0;case"month":return o.date===1&&o.hour===0&&o.minute===0&&o.second===0&&o.ms===0;case"day":return o.hour===0&&o.minute===0&&o.second===0&&o.ms===0;case"hour":return o.minute===0&&o.second===0&&o.ms===0;case"minute":return o.second===0&&o.ms===0;case"second":return o.ms===0}return!1}},Bc=class{constructor(e){this.w=e,this.tooltipKeyFormat="dd MMM"}xLabelFormat(e,n,i,o){const r=this.w;if(r.config.xaxis.type==="datetime"&&r.config.xaxis.labels.formatter===void 0&&r.config.tooltip.x.formatter===void 0){const a=new Ei(this.w);return a.formatDate(a.getDate(n),r.config.tooltip.x.format)}return e(n,i,o)}defaultGeneralFormatter(e){return Array.isArray(e)?e.map(n=>n):e}defaultYFormatter(e,n){const i=this.w;if(we.isNumber(e))if(i.globals.yValueDecimal!==0)e=e.toFixed(n.decimalsInFloat!==void 0?n.decimalsInFloat:i.globals.yValueDecimal);else{const o=e.toFixed(0);e=Number(o)===e?o:e.toFixed(1)}return e}setLabelFormatters(){const e=this.w,n=e.formatters,i=e.axisFlags.isXNumeric&&e.axisFlags.dataFormatXNumeric&&e.config.xaxis.type!=="datetime"&&!e.config.xaxis.convertedCatToNumeric&&!e.globals.isBarHorizontal;if(n.xaxisTooltipFormatter=o=>this.defaultGeneralFormatter(o),n.ttKeyFormatter=o=>this.defaultGeneralFormatter(o),n.ttZFormatter=o=>o,n.legendFormatter=o=>this.defaultGeneralFormatter(o),e.config.xaxis.labels.formatter!==void 0?n.xLabelFormatter=e.config.xaxis.labels.formatter:n.xLabelFormatter=o=>{var r;if(we.isNumber(o)){if(!e.config.xaxis.convertedCatToNumeric&&(e.config.xaxis.type==="numeric"||i)){const a=(r=e.globals.xAxisScale)==null?void 0:r.result;if(i&&Array.isArray(a)&&a.every(Number.isInteger))return o.toFixed(0);if(we.isNumber(e.config.xaxis.decimalsInFloat))return o.toFixed(e.config.xaxis.decimalsInFloat);{const s=e.globals.maxX-e.globals.minX;if(s>0){const l=s/10,c=Math.max(0,-Math.floor(Math.log10(l)));return o.toFixed(c)}return o.toFixed(0)}}return e.globals.isBarHorizontal&&e.globals.maxY-e.globals.minY<4?o.toFixed(1):o.toFixed(0)}return o},typeof e.config.tooltip.x.formatter=="function")n.ttKeyFormatter=e.config.tooltip.x.formatter;else if(e.config.xaxis.labels.formatter===void 0&&i){const o=n.xLabelFormatter;n.ttKeyFormatter=r=>Number.isInteger(r)?r.toFixed(0):o(r)}else n.ttKeyFormatter=n.xLabelFormatter;return typeof e.config.xaxis.tooltip.formatter=="function"&&(n.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||e.config.tooltip.y.formatter!==void 0)&&(n.ttVal=e.config.tooltip.y),e.config.tooltip.z.formatter!==void 0&&(n.ttZFormatter=e.config.tooltip.z.formatter),e.config.legend.formatter!==void 0&&(n.legendFormatter=e.config.legend.formatter),n.yLabelFormatters=[],e.config.yaxis.forEach((o,r)=>{if(o.labels.formatter!==void 0)n.yLabelFormatters[r]=o.labels.formatter;else if(e.config.chart.type==="violin"){const a=s=>typeof s=="number"&&isFinite(s)?`${Math.round(s*100)/100}`:s;n.yLabelFormatters[r]=s=>e.globals.xyCharts?Array.isArray(s)?s.map(a):a(s):s}else n.yLabelFormatters[r]=a=>e.globals.xyCharts?Array.isArray(a)?a.map(s=>this.defaultYFormatter(s,o)):this.defaultYFormatter(a,o):a}),e.globals}heatmapLabelFormatters(){const e=this.w;if(e.config.chart.type==="heatmap"){e.globals.yAxisScale[0].result=e.seriesData.seriesNames.slice();const n=e.seriesData.seriesNames.reduce((i,o)=>i.length>o.length?i:o,0);e.globals.yAxisScale[0].niceMax=n,e.globals.yAxisScale[0].niceMin=n}}};const rye="en",aye={months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom",measure:"Measure"}},q5={name:rye,options:aye};let ma=class{constructor(){this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,alignZero:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0},tooltip:{enabled:!1,text:void 0,formatter:void 0,theme:void 0,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}init(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},plugins:[],trellis:{by:void 0,row:void 0,column:void 0,emptyPanels:"placeholder",data:void 0,x:void 0,y:void 0,seriesBy:void 0,columns:"auto",minPanelWidth:220,gap:12,aspectRatio:1.6,panelHeight:void 0,order:"first-seen",limit:void 0,virtualize:"auto",scales:{x:"shared",y:"shared",color:"shared",size:"shared"},header:{show:!0,formatter:void 0,style:{fontSize:void 0,fontWeight:void 0,color:void 0}},axes:{labels:"edges"},legend:"shared",toolbar:"shared",tooltip:"panel",zoom:"sync",promote:!0,radiusByTotal:!1,targetTicks:3,panel:void 0},chart:{animations:{enabled:!0,speed:800,easing:"easeInOutSine",animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350,easing:void 0},chartTypeMorph:{enabled:!0,speed:600},respectReducedMotion:!0,largeDatasetThreshold:1e3},background:"",locales:[q5],defaultLocale:"en",perspectives:{serializeOptions:["theme","xaxis","yaxis","title","subtitle"]},history:{enabled:!1,maxDepth:100,coalesceMs:250,keyboard:!0},renderer:"svg",rendererThreshold:8e3,layers:{series:"auto",grid:"svg",annotations:"svg",dataLabels:"svg"},dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.7},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0,crossFilter:void 0,filterChange:void 0,annotationDragged:void 0,annotationEdited:void 0,annotationCreated:void 0,annotationStyled:void 0,annotationDeleted:void 0,measured:void 0,keyDown:void 0,keyUp:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,print:{enabled:!0,width:700},id:void 0,group:void 0,nonce:void 0,license:void 0,offsetX:0,offsetY:0,injectStyleSheet:!0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},link:{enabled:!1,mode:"highlight",dimOpacity:.2,id:void 0,dimension:void 0,reduce:void 0,type:void 0,bins:void 0,order:void 0,seriesName:void 0},ink:{enabled:!1,palette:!1,snap:!1,noteColors:void 0},measure:{enabled:!1,mode:"span",key:"m",pinOnRelease:!0,colors:{up:void 0,down:void 0,neutral:void 0,guide:void 0},band:!0,guides:!0,markers:!0,format:{x:void 0,y:void 0,percent:void 0},label:void 0},contextMenu:{enabled:!1,items:["annotate","xline","yline","measure"],labels:{annotate:void 0,xline:void 0,yline:void 0,measure:void 0},noteText:"Note",line:{text:"",strokeDashArray:4,color:void 0}},stacked:!1,stackOnlyBar:!0,stackType:"normal",streaming:{enabled:!1,maxPoints:void 0},toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,measure:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0,embedFonts:!0},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:"auto",pinch:"auto",resetControl:"auto",zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}},pan:{inertia:!0,friction:.92},accessibility:{enabled:!0,description:void 0,announcements:{enabled:!0},keyboard:{enabled:!0,navigation:{enabled:!0,wrapAround:!1}}},dataReducer:{enabled:!1,algorithm:"lttb",targetPoints:250,threshold:500}},parsing:{x:void 0,y:void 0},plotOptions:{line:{isSlopeChart:!1,colors:{threshold:0,colorAboveThreshold:void 0,colorBelowThreshold:void 0}},area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"all",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,dumbbell:{connector:{color:void 0,opacity:.55},dataLabels:{enabled:!1,offset:6,colorFromMarker:!0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0}},tooltip:{differenceLabel:"Difference"}},isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0,minZ:void 0,maxZ:void 0},scatter:{jitter:{enabled:!1,x:0,y:0,distributed:!1,maxPoints:5e3}},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"},whiskers:"minmax",points:{show:!1,shape:"circle",size:2.5,jitter:.5,maxPoints:3e3,opacity:.9,fillColor:"series-dark",strokeColor:"#fff",strokeWidth:1}},violin:{bandwidthScale:1,kde:{bandwidth:void 0,resolution:64},normalize:"individual",side:"both",box:{show:!1,width:"15%",whiskers:"minmax",strokeWidth:1,fillColor:void 0,capWidth:.5},points:{show:!0,shape:"circle",size:2.5,jitter:.5,constrainToViolin:!0,position:"center",laneWidth:"40%",maxPoints:3e3,opacity:.9,fillColor:"series-dark",strokeColor:"#fff",strokeWidth:1}},histogram:{bins:"auto",binWidth:void 0,range:void 0,normalize:"count",cumulative:!1,overlap:!0},heatmap:{shape:"rect",radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0,gradientLegend:{enabled:!1,width:"70%",height:"70%",thickness:12,align:"center",stops:16,showLabels:!0,showHoverValue:!0,labelStyle:{fontSize:"11px",fontFamily:void 0,colors:void 0},arrow:{size:8,color:void 0},formatter:void 0}}},waterfall:{colors:{positive:"#00A86F",negative:"#FF4560",subtotal:void 0,total:void 0},connectors:{show:!0,color:void 0,strokeWidth:1,strokeDashArray:3}},streamgraph:{offset:"wiggle",order:"inside-out",hover:{show:!0,opacity:.35},labels:{show:!0,minWidth:24,minFontSize:9,maxFontSize:30,style:{fontSize:"auto",fontFamily:void 0,fontWeight:600,colors:void 0}}},funnel:{shape:"rectangle",lastShape:"flat"},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale",minFontSize:4},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0,colorValue:void 0,gradient:{enabled:void 0,min:void 0,max:void 0,midpoint:void 0,symmetric:!0,colors:void 0,stops:void 0},gradientLegend:{enabled:!1,width:"70%",height:"70%",thickness:12,align:"center",stops:16,showLabels:!0,showHoverValue:!0,labelStyle:{fontSize:"11px",fontFamily:void 0,colors:void 0},arrow:{size:8,color:void 0},formatter:void 0}},nested:{enabled:void 0,drilldownAsLevels:!1},parents:{show:"auto",padding:4,fill:void 0,fillOpacity:1,borderColor:void 0,borderWidth:1,borderRadius:void 0,hover:{show:!0,color:void 0,width:2},header:{show:!0,height:22,minWidth:40,align:"left",offsetX:0,offsetY:0,showValue:!1,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,color:void 0,background:void 0,cssClass:""}},tooltip:{formatter:void 0}},levels:[],zoom:{enabled:!1,breadcrumb:void 0},seriesTitle:{show:!0,offsetY:1,offsetX:1,borderColor:"#000",borderWidth:1,borderRadius:2,style:{background:"rgba(0, 0, 0, 0.6)",color:"#fff",fontSize:"12px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:6,right:6,top:2,bottom:2}}}},unit:{layout:"grouped",positions:void 0,transition:"group",shape:"circle",image:{src:void 0,width:20,height:20,tint:!1},pictogram:{mark:void 0,fit:"contain",scale:1,padding:0,fallback:"circle"},size:"auto",columns:{size:"inherit"},grid:{columns:10,total:void 0,fillFrom:"bottom",split:!1,tileColumns:void 0,max:void 0,trackColor:void 0},scatter:{y:"lanes",spread:"swarm",orientation:"horizontal",tickAmount:5,xMin:void 0,xMax:void 0,xTitle:void 0,xFormatter:void 0,yTickAmount:5,yMin:void 0,yMax:void 0,yTitle:void 0,yFormatter:void 0,sizeField:"z",sizeRange:void 0,laneLabelWidth:void 0,gridlines:!0},sizeByValue:{enabled:!1,maxRadius:"auto",minRadius:void 0,scale:"area"},spacing:1.05,borderRadius:0,gather:{motion:"auto",spring:"crisp",easing:"outCubic",overshoot:1.70158,enter:"burst"},arc:{startAngle:-90,endAngle:90,innerRadiusRatio:.4,rows:"auto"},unitValue:1,maxUnits:5e3,sortByGroup:!0,clusterLabels:{show:!0,position:"top",curved:!0,fontSize:"13px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:void 0,external:{show:!1,connector:{show:!0,width:1.5,color:void 0,gap:8,length:22},offsetX:0,offsetY:0}},tooltip:{formatter:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,shape:"arc",min:0,max:100,bands:[],bandsStyle:{strokeWidth:"40%",gap:0,hideTrackWhenPresent:!0},ticks:{show:!1,major:{count:11,length:10,width:2,color:"#666",placement:"outside"},minor:{count:4,length:5,width:1,color:"#999",placement:"outside"},labels:{show:!1,offset:6,fontSize:"11px",fontFamily:void 0,fontWeight:400,color:"#666",formatter(e){return String(e)}}},needle:{color:"#333",length:"85%",baseWidth:4,tipWidth:1,offsetY:0,showValueArc:!1,animation:{enabled:!0,duration:800,easing:"ease-out"}},hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",stroke:void 0,strokeWidth:1,strokeDasharray:void 0,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter(e){return e}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter(e){return e+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter(e){return e.globals.seriesTotals.reduce((n,i)=>n+i,0)/e.seriesData.series.length+"%"}}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter(e){return e},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,expandOffset:10,hoverOutline:{show:!0,size:8,gap:0,opacity:.3,color:void 0},borderRadius:0,spacing:0,dataLabels:{offset:0,minAngleToShowLabel:10,external:{show:!1,offsetX:0,offsetY:0,fontSize:void 0,fontFamily:void 0,fontWeight:void 0,color:void 0,formatter:void 0,connector:{show:!0,width:1,color:void 0,length:16,gap:6}}},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter(e){return e}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter(e){return e}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter(e){return e.globals.seriesTotals.reduce((n,i)=>n+i,0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},sunburst:{offsetX:0,offsetY:0,startAngle:0,endAngle:360,innerSize:"15%",borderRadius:0,spacing:1,leaf:"extend",partition:"normalize",tint:.14,zoomOnClick:!0,dataLabels:{show:!0,minAngleToShow:8,style:{fontSize:"12px",fontFamily:void 0,fontWeight:400,colors:void 0}}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter(e){return e!==null?e:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",backgroundColor:void 0,borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8},animate:{enabled:!0},countUp:{enabled:!1}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],drilldown:{enabled:!1,series:[],breadcrumb:{show:!0,position:"top-left",separator:" / ",rootLabel:"All",offsetX:0,offsetY:0},animation:{enabled:!0,zoomFromPoint:!1,speed:260},loading:{show:!0},cache:!0,marker:{show:!0,size:6,strokeColor:"#fff"}},legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],clusterGroupedSeries:!0,clusterGroupedSeriesOrientation:"vertical",labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3},largeDatasetThreshold:0},noData:{text:void 0,align:"center",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:"lighten",value:.15}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken",value:.35}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,arrow:!0,compact:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0,background:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter(e){return e?e+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM",day:"dd MMM",hour:"HH:mm",minute:"HH:mm",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.8}},tooltip:{enabled:!1,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",tokens:!0,follow:!1,name:"",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65},accessibility:{colorBlindMode:""}}}}};const YC={funnel:"bar",pyramid:"bar",gauge:"radialBar",waffle:"unit",histogram:"bar",waterfall:"rangeBar",dumbbell:"rangeBar",streamgraph:"rangeArea",raincloud:"violin"},Z5="_apexOwnedByType",ta=(t,e)=>{const n=e;return n[Z5]=t,e},sye=["tooltip.custom","tooltip.shared","tooltip.intersect","tooltip.followCursor","dataLabels.enabled","dataLabels.formatter","plotOptions.bar.dataLabels.position","markers.size","plotOptions.violin.side","plotOptions.violin.box.show","plotOptions.violin.box.whiskers","plotOptions.violin.points.position","states.hover.filter.type","states.active.filter.type","xaxis.crosshairs.width","xaxis.tickPlacement","xaxis.tooltip.enabled","chart.zoom.enabled","chart.animations.dynamicAnimation.enabled"],oh=(t,e)=>{let n=t;for(const i of e.split(".")){if(n==null||typeof n!="object")return;n=n[i]}return n},lye=(t,e,n)=>{const i=e.split("."),o=i.pop();let r=t;for(const a of i)(r[a]==null||typeof r[a]!="object")&&(r[a]={}),r=r[a];n===void 0?delete r[o]:r[o]=n},QO=(t,e)=>{var n,i;const o=YC[t];return{chart:{type:o||t,requestedType:o?t:void 0,stacked:(n=e.chart)==null?void 0:n.stacked},plotOptions:{bar:{isFunnel:t==="funnel"||t==="pyramid"},histogram:(i=e.plotOptions)==null?void 0:i.histogram},series:e.series,yaxis:[{title:{},labels:{},axisBorder:{},axisTicks:{}}]}},cye=(t,e)=>{if(typeof t=="function")return Array.isArray(t[Z5])?!0:typeof e=="function"&&String(t)===String(e);if(typeof e=="function")return t===void 0;if(t===e)return!0;try{return JSON.stringify(t)===JSON.stringify(e)}catch{return!1}},bl=({isTimeline:t,seriesIndex:e,dataPointIndex:n,y1:i,y2:o,w:r})=>{var a;let s=r.rangeData.seriesRangeStart[e][n],l=r.rangeData.seriesRangeEnd[e][n],c=r.labelData.labels[n],u=r.config.series[e].name?r.config.series[e].name:"";const d=r.formatters.ttKeyFormatter,f=r.config.tooltip.y.title.formatter,h={w:r,seriesIndex:e,dataPointIndex:n,start:s,end:l};typeof f=="function"&&(u=f(u,h)),(a=r.config.series[e].data[n])!=null&&a.x&&(c=r.config.series[e].data[n].x),t||r.config.xaxis.type==="datetime"&&(c=new Bc(r).xLabelFormat(r.formatters.ttKeyFormatter,c,c,{i:void 0,dateFormatter:new Ei(r).formatDate,w:r})),typeof d=="function"&&(c=d(c,h)),Number.isFinite(i)&&Number.isFinite(o)&&(s=i,l=o);let p="",g="";const m=r.globals.colors[e];if(r.config.tooltip.x.formatter===void 0)if(r.config.xaxis.type==="datetime"){const v=new Ei(r);p=v.formatDate(v.getDate(s),r.config.tooltip.x.format),g=v.formatDate(v.getDate(l),r.config.tooltip.x.format)}else p=s,g=l;else p=r.config.tooltip.x.formatter(s),g=r.config.tooltip.x.formatter(l);return{start:s,end:l,startVal:p,endVal:g,ylabel:c,color:m,seriesName:u}},tu=t=>{let{color:e,seriesName:n,ylabel:i,start:o,end:r,seriesIndex:a,dataPointIndex:s}=t;const l=t.w.globals.tooltip.tooltipLabels.getFormatters(a);o=l.yLbFormatter(o),r=l.yLbFormatter(r);const c=l.yLbFormatter(t.w.seriesData.series[a][s]);let u="";const d=` + */let Ge=class{static isSSR(){return typeof window>"u"||typeof document>"u"}static isBrowser(){return!this.isSSR()}static hasAPI(e){return this.isSSR()?!1:typeof window[e]<"u"}static getApex(){return typeof window<"u"&&window.Apex?window.Apex:typeof global<"u"&&global.Apex?global.Apex:{}}};const eye=.55,ZO=.917,tye=.25,nye=1.1,iye=11;let Tx=class G5{constructor(e,n=null){this.nodeName=e,this.namespaceURI=n,this.attributes=new Map,this.children=[],this.textContent="",this.style={},this.classList=new K5,this.parentNode=null,this._ssrWidth=void 0,this._ssrHeight=void 0,this._ssrMode=void 0}setAttribute(e,n){this.attributes.set(e,n)}getAttribute(e){return this.attributes.get(e)}removeAttribute(e){this.attributes.delete(e)}hasAttribute(e){return this.attributes.has(e)}appendChild(e){if(e&&e!==this){if(e.parentNode&&e.parentNode!==this)e.parentNode.removeChild(e);else if(e.parentNode===this){const n=this.children.indexOf(e);n!==-1&&this.children.splice(n,1)}e.parentNode=this,this.children.push(e)}return e}removeChild(e){const n=this.children.indexOf(e);return n!==-1&&(this.children.splice(n,1),e.parentNode=null),e}insertBefore(e,n){if(!n)return this.appendChild(e);if(e.parentNode&&e.parentNode!==this)e.parentNode.removeChild(e);else if(e.parentNode===this){const o=this.children.indexOf(e);o!==-1&&this.children.splice(o,1)}const i=this.children.indexOf(n);return i!==-1&&(e.parentNode=this,this.children.splice(i,0,e)),e}cloneNode(e=!1){const n=new G5(this.nodeName,this.namespaceURI);return n.textContent=this.textContent,this.attributes.forEach((i,o)=>{n.attributes.set(o,i)}),Object.assign(n.style,this.style),e&&this.children.forEach(i=>{i.cloneNode&&n.appendChild(i.cloneNode(!0))}),n}getBoundingClientRect(){return{width:this._ssrWidth||0,height:this._ssrHeight||0,top:0,left:0,right:this._ssrWidth||0,bottom:this._ssrHeight||0,x:0,y:0}}getBBox(){if(this.nodeName!=="text"&&this.nodeName!=="tspan")return{x:0,y:0,width:0,height:0};const e=this._textLines(),n=e.reduce((c,u)=>Math.max(c,u.length),0);if(!n)return{x:0,y:0,width:0,height:0};const i=parseFloat(this.attributes.get("font-size"))||iye,o=n*i*eye,r=i*(ZO+tye)+(e.length-1)*i*nye,a=this.attributes.get("text-anchor"),s=parseFloat(this.attributes.get("x"))||0,l=parseFloat(this.attributes.get("y"))||0;return{x:a==="middle"?s-o/2:a==="end"?s-o:s,y:l-i*ZO,width:o,height:r}}_textLines(){var e;const n=this.children.filter(i=>i.nodeName==="tspan");return n.length?n.map(i=>{var o;return String((o=i.textContent)!=null?o:"")}):[String((e=this.textContent)!=null?e:"")]}getRootNode(){let e=this;for(;e.parentNode;)e=e.parentNode;return e}querySelector(){return null}querySelectorAll(){return[]}getElementsByClassName(){return[]}addEventListener(){}removeEventListener(){}get childNodes(){return this.children}toString(){let e="";if(this.attributes.forEach((i,o)=>{e+=` ${o}="${i}"`}),this.children.length===0&&!this.textContent)return`<${this.nodeName}${e}/>`;const n=this.children.map(i=>i.toString()).join("");return`<${this.nodeName}${e}>${this.textContent}${n}`}get innerHTML(){return this.children.map(e=>e.toString()).join("")}set innerHTML(e){this.children=[],this.textContent=e}get outerHTML(){return this.toString()}get isConnected(){return!0}},K5=class{constructor(){this.classes=new Set}add(...e){e.forEach(n=>this.classes.add(n))}remove(...e){e.forEach(n=>this.classes.delete(n))}contains(e){return this.classes.has(e)}toggle(e,n){return n===!0?(this.classes.add(e),!0):n===!1?(this.classes.delete(e),!1):this.classes.has(e)?(this.classes.delete(e),!1):(this.classes.add(e),!0)}toString(){return Array.from(this.classes).join(" ")}},U5=class{constructor(){this.SVGNS="http://www.w3.org/2000/svg",this.XLINKNS="http://www.w3.org/1999/xlink"}createElementNS(e,n){return new Tx(n,e)}createTextNode(e){const n={nodeName:"#text",nodeType:3,textContent:e,toString(){return n.textContent}};return n}querySelector(){return null}querySelectorAll(){return[]}getComputedStyle(){return{}}getBoundingClientRect(e){return e&&e.getBoundingClientRect?e.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}createXMLSerializer(){return{serializeToString(e){return e.toString?e.toString():""}}}createDOMParser(){return{parseFromString(e,n){const i=new Tx("root");return i.innerHTML=e,{documentElement:i}}}}},Gn=null,qa=null,Za=null,nt=class{static init(){Ge.isSSR()&&!Gn&&(Gn=new U5)}static createElement(e){return Ge.isSSR()?(Gn||this.init(),Gn.createElementNS(null,e)):document.createElement(e)}static createElementNS(e,n){return Ge.isSSR()?(Gn||this.init(),Gn.createElementNS(e,n)):document.createElementNS(e,n)}static createTextNode(e){return Ge.isSSR()?(Gn||this.init(),Gn.createTextNode(e)):document.createTextNode(e)}static querySelector(e){return Ge.isSSR()?null:document.querySelector(e)}static querySelectorAll(e){return Ge.isSSR()?[]:document.querySelectorAll(e)}static getComputedStyle(e){return Ge.isSSR()?{}:window.getComputedStyle(e)}static matchMedia(e){if(Ge.isSSR()||typeof window.matchMedia!="function")return null;try{return window.matchMedia(e)}catch{return null}}static getBoundingClientRect(e){return Ge.isSSR()?(Gn||this.init(),Gn.getBoundingClientRect(e)):e?e.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}static getXMLSerializer(){return Ge.isSSR()?(Gn||this.init(),qa||(qa=Gn.createXMLSerializer()),qa):(qa||(qa=new XMLSerializer),qa)}static getDOMParser(){return Ge.isSSR()?(Gn||this.init(),Za||(Za=Gn.createDOMParser()),Za):(Za||(Za=new DOMParser),Za)}static addWindowEventListener(e,n,i){Ge.isBrowser()&&window.addEventListener(e,n,i)}static removeWindowEventListener(e,n,i){Ge.isBrowser()&&window.removeEventListener(e,n,i)}static requestAnimationFrame(e){return Ge.isBrowser()?window.requestAnimationFrame(e):(e(0),null)}static cancelAnimationFrame(e){Ge.isBrowser()&&e&&window.cancelAnimationFrame(e)}static elementExists(e){return e?Ge.isSSR()?e._ssrMode===!0||e.nodeName!==void 0:e.getRootNode?e.getRootNode({composed:!0})===document||e.isConnected:!1:!1}static getWindow(){return Ge.isBrowser()?window:null}static getDocument(){return Ge.isBrowser()?document:null}static _getShim(){return Gn}static _resetShim(){Gn=null,qa=null,Za=null}};const JO=new WeakMap;let oye=0,we=class la{static isObject(e){return e&&typeof e=="object"&&!Array.isArray(e)}static is(e,n){return Object.prototype.toString.call(n)==="[object "+e+"]"}static isSafari(){return Ge.isBrowser()&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}static extend(e,n){if(!this.isObject(e)&&this.isObject(n))return this.clone(n);const i=Object.assign({},e);return this.isObject(e)&&this.isObject(n)&&Object.keys(n).forEach(o=>{this.isObject(n[o])?o in e?i[o]=this.extend(e[o],n[o]):Object.assign(i,{[o]:n[o]}):Object.assign(i,{[o]:n[o]})}),i}static copySeriesShallow(e){return Array.isArray(e)?e.map(n=>this.isObject(n)?Je({},n):n):e}static extendArray(e,n){const i=[];return e.map(o=>{i.push(la.extend(n,o))}),e=i,e}static monthMod(e){return e%12}static clone(e,n=new WeakMap,i=!1){if(e===null||typeof e!="object")return e;if(n.has(e))return n.get(e);let o;if(Array.isArray(e))if(i)o=e.slice();else{o=[],n.set(e,o);for(let r=0;r{if(typeof i!="function")return i;let o=JO.get(i);return o===void 0&&(o=++oye,JO.set(i,o)),`__apx_fn_${o}`})}static shallowEqual(e,n){if(e===n)return!0;if(!e||!n)return!1;if(typeof e!="object"||typeof n!="object")return e===n;const i=Object.keys(e),o=Object.keys(n);if(i.length!==o.length)return!1;for(const r of i)if(e[r]!==n[r])return!1;return!0}static log10(e){return Math.log(e)/Math.LN10}static roundToBase10(e){return Math.pow(10,Math.floor(Math.log10(e)))}static roundToBase(e,n){return Math.pow(n,Math.floor(Math.log(e)/Math.log(n)))}static parseNumber(e){return typeof e=="number"||e===null?e:parseFloat(e)}static stripNumber(e,n=2){return Number.isInteger(e)?e:parseFloat(e.toPrecision(n))}static randomId(){return(Math.random()+1).toString(36).substring(4)}static noExponents(e){return e.toString().includes("e")?Math.round(e):e}static elementExists(e){return!(!e||!e.isConnected)}static getDimensions(e){if(!e)return[0,0];if(Ge.isSSR())return[e._ssrWidth||400,e._ssrHeight||300];let n;try{n=getComputedStyle(e,null)}catch{return[e.clientWidth||0,e.clientHeight||0]}let i=e.clientWidth,o=e.clientHeight;if(!i||!o){const r=e.getBoundingClientRect();i=i||r.width,o=o||r.height}return o-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),i-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),[i,o]}static getBoundingClientRect(e){if(!e)return{top:0,right:0,bottom:0,left:0,width:0,height:0,x:0,y:0};if(Ge.isSSR())return nt.getBoundingClientRect(e);const n=e.getBoundingClientRect();return{top:n.top,right:n.right,bottom:n.bottom,left:n.left,width:e.clientWidth,height:e.clientHeight,x:n.left,y:n.top}}static getLargestStringFromArr(e){return e.reduce((n,i)=>(Array.isArray(i)&&(i=i.reduce((o,r)=>o.length>r.length?o:r)),n.length>i.length?n:i),0)}static hexToRgba(e="#999999",n=.6){e.substring(0,1)!=="#"&&(e="#999999");const i=e.replace("#",""),o=i.match(new RegExp("(.{"+i.length/3+"})","g"))||[];for(let r=0;ri+i).join("")),/^[0-9a-fA-F]{6}$/.test(n)?[parseInt(n.slice(0,2),16),parseInt(n.slice(2,4),16),parseInt(n.slice(4,6),16)]:null}static relativeLuminance([e,n,i]){const o=r=>{const a=r/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)};return .2126*o(e)+.7152*o(n)+.0722*o(i)}static getContrastRatio(e,n){const i=la.parseHex(e),o=la.parseHex(n);if(!i||!o)return 0;const r=la.relativeLuminance(i),a=la.relativeLuminance(o),s=Math.max(r,a),l=Math.min(r,a);return(s+.05)/(l+.05)}static rgb2hex(e){return e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i),e&&e.length===4?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):""}shadeRGBColor(e,n){const i=n.split(","),o=e<0?0:255,r=e<0?e*-1:e,a=parseInt(i[0].slice(4),10),s=parseInt(i[1],10),l=parseInt(i[2],10);return"rgb("+(Math.round((o-a)*r)+a)+","+(Math.round((o-s)*r)+s)+","+(Math.round((o-l)*r)+l)+")"}shadeHexColor(e,n){const i=parseInt(n.slice(1),16),o=e<0?0:255,r=e<0?e*-1:e,a=i>>16,s=i>>8&255,l=i&255;return"#"+(16777216+(Math.round((o-a)*r)+a)*65536+(Math.round((o-s)*r)+s)*256+(Math.round((o-l)*r)+l)).toString(16).slice(1)}shadeColor(e,n){return la.isColorHex(n)?this.shadeHexColor(e,n):this.shadeRGBColor(e,n)}static isColorHex(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(e)}static isCSSVariable(e){if(typeof e!="string")return!1;const n=e.trim();return n.startsWith("var(")&&n.endsWith(")")}static getThemeColor(e){if(!la.isCSSVariable(e)||Ge.isSSR())return e;const n=document.createElement("div");n.style.cssText="position:fixed; left: -9999px; visibility:hidden;",n.style.color=e,document.body.appendChild(n);let i;try{i=window.getComputedStyle(n).color}finally{n.parentNode&&n.parentNode.removeChild(n)}return i}static applyOpacityToColor(e,n){const i=Number(n);if(!Number.isFinite(i))return e;if(i<=0)return"transparent";if(i>=1)return e;const o=Math.round(i*100);return`color-mix(in srgb, ${e} ${o}%, transparent)`}static getPolygonPos(e,n){const i=[],o=Math.PI*2/n;for(let r=0;r{}[\]\\/]/gi,n),i}static negToZero(e){return e<0?0:e}static moveIndexInArray(e,n,i){if(i>=e.length){let o=i-e.length+1;for(;o--;)e.push(void 0)}return e.splice(i,0,e.splice(n,1)[0]),e}static extractNumber(e){return parseFloat(e.replace(/[^\d.]*/g,""))}static findAncestor(e,n){for(;(e=e.parentElement)&&!e.classList.contains(n););return e}static setELstyles(e,n){for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e.style[i]=n[i])}static preciseAddition(e,n){const i=(String(e).split(".")[1]||"").length,o=(String(n).split(".")[1]||"").length,r=Math.pow(10,Math.max(i,o));return(Math.round(e*r)+Math.round(n*r))/r}static isNumber(e){return!isNaN(e)&&parseFloat(String(Number(e)))===e&&!isNaN(parseInt(e,10))}static isFloat(e){return Number(e)===e&&e%1!==0}static isMsEdge(){if(Ge.isSSR())return!1;const e=window.navigator.userAgent,n=e.indexOf("Edge/");return n>0?parseInt(e.substring(n+5,e.indexOf(".",n)),10):!1}static getGCD(e,n,i=7){let o=Math.pow(10,i-Math.floor(Math.log10(Math.max(e,n))));for(o>1?(e=Math.round(Math.abs(e)*o),n=Math.round(Math.abs(n)*o)):o=1;n;){const r=n;n=e%n,e=r}return e/o}static getPrimeFactors(e){const n=[];let i=2;for(;e>=2;)e%i==0?(n.push(i),e=e/i):i++;return n}static mod(e,n,i=7){const o=Math.pow(10,i-Math.floor(Math.log10(Math.max(e,n))));return e=Math.round(Math.abs(e)*o),n=Math.round(Math.abs(n)*o),e%n/o}},Ei=class{constructor(e){this.w=e,this.months31=[1,3,5,7,8,10,12],this.months30=[2,4,6,9,11],this.daysCntOfYear=[0,31,59,90,120,151,181,212,243,273,304,334]}isValidDate(e){return typeof e=="number"?!1:!isNaN(this.parseDate(e))}getTimeStamp(e){return isNaN(Date.parse(e))?e:this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toISOString().substr(0,25)).getTime():new Date(e).getTime()}getDate(e){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toUTCString()):new Date(e)}parseDate(e){const n=Date.parse(e);if(!isNaN(n))return this.getTimeStamp(e);if(typeof e!="string")return NaN;let i=Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "));return i=this.getTimeStamp(i),i}parseDateWithTimezone(e){return Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "))}formatDate(e,n){const i=this.w.globals.locale,o=this.w.config.xaxis.labels.datetimeUTC,r=["\0",...i.months],a=["",...i.shortMonths],s=["",...i.days],l=["",...i.shortDays];function c(S,_=2){let P=S+"";for(;P.length<_;)P="0"+P;return P}const u=o?e.getUTCFullYear():e.getFullYear();n=n.replace(/(^|[^\\])yyyy+/g,"$1"+u),n=n.replace(/(^|[^\\])yy/g,"$1"+u.toString().substr(2,2)),n=n.replace(/(^|[^\\])y/g,"$1"+u);const d=(o?e.getUTCMonth():e.getMonth())+1;n=n.replace(/(^|[^\\])MMMM+/g,"$1"+r[0]),n=n.replace(/(^|[^\\])MMM/g,"$1"+a[0]),n=n.replace(/(^|[^\\])MM/g,"$1"+c(d)),n=n.replace(/(^|[^\\])M/g,"$1"+d);const f=o?e.getUTCDate():e.getDate();n=n.replace(/(^|[^\\])dddd+/g,"$1"+s[0]),n=n.replace(/(^|[^\\])ddd/g,"$1"+l[0]),n=n.replace(/(^|[^\\])dd/g,"$1"+c(f)),n=n.replace(/(^|[^\\])d/g,"$1"+f);const h=o?e.getUTCHours():e.getHours();n=n.replace(/(^|[^\\])HH+/g,"$1"+c(h)),n=n.replace(/(^|[^\\])H/g,"$1"+h);const p=h>12?h-12:h===0?12:h;n=n.replace(/(^|[^\\])hh+/g,"$1"+c(p)),n=n.replace(/(^|[^\\])h/g,"$1"+p);const g=o?e.getUTCMinutes():e.getMinutes();n=n.replace(/(^|[^\\])mm+/g,"$1"+c(g)),n=n.replace(/(^|[^\\])m/g,"$1"+g);const m=o?e.getUTCSeconds():e.getSeconds();n=n.replace(/(^|[^\\])ss+/g,"$1"+c(m)),n=n.replace(/(^|[^\\])s/g,"$1"+m);let v=o?e.getUTCMilliseconds():e.getMilliseconds();n=n.replace(/(^|[^\\])fff+/g,"$1"+c(v,3)),v=Math.round(v/10),n=n.replace(/(^|[^\\])ff/g,"$1"+c(v)),v=Math.round(v/10),n=n.replace(/(^|[^\\])f/g,"$1"+v);const b=h<12?"AM":"PM";n=n.replace(/(^|[^\\])TT+/g,"$1"+b),n=n.replace(/(^|[^\\])T/g,"$1"+b.charAt(0));const y=b.toLowerCase();n=n.replace(/(^|[^\\])tt+/g,"$1"+y),n=n.replace(/(^|[^\\])t/g,"$1"+y.charAt(0));let w=-e.getTimezoneOffset(),x=o||!w?"Z":w>0?"+":"-";if(!o){w=Math.abs(w);const S=Math.floor(w/60),_=w%60;x+=c(S)+":"+c(_)}n=n.replace(/(^|[^\\])K/g,"$1"+x);const $=(o?e.getUTCDay():e.getDay())+1;return n=n.replace(new RegExp(s[0],"g"),s[$]),n=n.replace(new RegExp(l[0],"g"),l[$]),n=n.replace(new RegExp(r[0],"g"),r[d]),n=n.replace(new RegExp(a[0],"g"),a[d]),n=n.replace(/\\(.)/g,"$1"),n}getTimeUnitsfromTimestamp(e,n){const i=this.w;i.config.xaxis.min!==void 0&&(e=i.config.xaxis.min),i.config.xaxis.max!==void 0&&(n=i.config.xaxis.max);const o=this.getDate(e),r=this.getDate(n),a=this.formatDate(o,"yyyy MM dd HH mm ss fff").split(" "),s=this.formatDate(r,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(a[6],10),maxMillisecond:parseInt(s[6],10),minSecond:parseInt(a[5],10),maxSecond:parseInt(s[5],10),minMinute:parseInt(a[4],10),maxMinute:parseInt(s[4],10),minHour:parseInt(a[3],10),maxHour:parseInt(s[3],10),minDate:parseInt(a[2],10),maxDate:parseInt(s[2],10),minMonth:parseInt(a[1],10)-1,maxMonth:parseInt(s[1],10)-1,minYear:parseInt(a[0],10),maxYear:parseInt(s[0],10)}}isLeapYear(e){return e%4===0&&e%100!==0||e%400===0}calculcateLastDaysOfMonth(e,n,i){return this.determineDaysOfMonths(e,n)-i}determineDaysOfYear(e){let n=365;return this.isLeapYear(e)&&(n=366),n}determineRemainingDaysOfYear(e,n,i){let o=this.daysCntOfYear[n]+i;return n>1&&this.isLeapYear(e)&&o++,o}determineDaysOfMonths(e,n){let i=30;switch(e=we.monthMod(e),!0){case this.months30.indexOf(e)>-1:e===2&&(this.isLeapYear(n)?i=29:i=28);break;case this.months31.indexOf(e)>-1:i=31;break;default:i=31;break}return i}getDateFields(e,n){const i=new Date(e);return n?{year:i.getUTCFullYear(),month:i.getUTCMonth(),date:i.getUTCDate(),hour:i.getUTCHours(),minute:i.getUTCMinutes(),second:i.getUTCSeconds(),ms:i.getUTCMilliseconds(),weekday:i.getUTCDay()}:{year:i.getFullYear(),month:i.getMonth(),date:i.getDate(),hour:i.getHours(),minute:i.getMinutes(),second:i.getSeconds(),ms:i.getMilliseconds(),weekday:i.getDay()}}addInterval(e,n,i,o){const r=new Date(e);if(o)switch(n){case"year":r.setUTCFullYear(r.getUTCFullYear()+i);break;case"month":r.setUTCMonth(r.getUTCMonth()+i);break;case"week":r.setUTCDate(r.getUTCDate()+i*7);break;case"day":r.setUTCDate(r.getUTCDate()+i);break;case"hour":r.setUTCHours(r.getUTCHours()+i);break;case"minute":r.setUTCMinutes(r.getUTCMinutes()+i);break;case"second":r.setUTCSeconds(r.getUTCSeconds()+i);break}else switch(n){case"year":r.setFullYear(r.getFullYear()+i);break;case"month":r.setMonth(r.getMonth()+i);break;case"week":r.setDate(r.getDate()+i*7);break;case"day":r.setDate(r.getDate()+i);break;case"hour":r.setHours(r.getHours()+i);break;case"minute":r.setMinutes(r.getMinutes()+i);break;case"second":r.setSeconds(r.getSeconds()+i);break}return r.getTime()}ceilToBoundary(e,n,i,o){const r=new Date(e);if(o)switch(n){case"second":{const a=r.getUTCSeconds(),s=Math.ceil(a/i)*i;return s===a&&r.getUTCMilliseconds()===0?e:(r.setUTCMilliseconds(0),r.setUTCSeconds(s),r.getTime())}case"minute":{const a=r.getUTCMinutes(),s=Math.ceil(a/i)*i;return s===a&&r.getUTCSeconds()===0&&r.getUTCMilliseconds()===0?e:(r.setUTCMilliseconds(0),r.setUTCSeconds(0),r.setUTCMinutes(s),r.getTime())}case"hour":{const a=r.getUTCHours(),s=Math.ceil(a/i)*i;return s===a&&r.getUTCMinutes()===0&&r.getUTCSeconds()===0&&r.getUTCMilliseconds()===0?e:(r.setUTCMilliseconds(0),r.setUTCSeconds(0),r.setUTCMinutes(0),r.setUTCHours(s),r.getTime())}case"day":return r.getUTCHours()===0&&r.getUTCMinutes()===0&&r.getUTCSeconds()===0&&r.getUTCMilliseconds()===0?e:(r.setUTCMilliseconds(0),r.setUTCSeconds(0),r.setUTCMinutes(0),r.setUTCHours(0),r.setUTCDate(r.getUTCDate()+1),r.getTime());case"week":{const s=Date.UTC(1970,0,5);r.setUTCMilliseconds(0),r.setUTCSeconds(0),r.setUTCMinutes(0),r.setUTCHours(0);const l=r.getTime(),c=Math.ceil((l-s)/6048e5),u=Math.ceil(c/i)*i,d=s+u*6048e5;return d>=e?d:d+i*6048e5}case"month":{const a=r.getUTCMonth(),s=Math.ceil(a/i)*i;return s===a&&r.getUTCDate()===1&&r.getUTCHours()===0&&r.getUTCMinutes()===0&&r.getUTCSeconds()===0&&r.getUTCMilliseconds()===0?e:(r.setUTCMilliseconds(0),r.setUTCSeconds(0),r.setUTCMinutes(0),r.setUTCHours(0),r.setUTCDate(1),r.setUTCMonth(s),r.getTime())}case"year":{const a=r.getUTCFullYear(),s=Math.ceil(a/i)*i;return s===a&&r.getUTCMonth()===0&&r.getUTCDate()===1&&r.getUTCHours()===0&&r.getUTCMinutes()===0&&r.getUTCSeconds()===0&&r.getUTCMilliseconds()===0?e:Date.UTC(s,0,1)}}else switch(n){case"second":{const a=r.getSeconds(),s=Math.ceil(a/i)*i;return s===a&&r.getMilliseconds()===0?e:(r.setMilliseconds(0),r.setSeconds(s),r.getTime())}case"minute":{const a=r.getMinutes(),s=Math.ceil(a/i)*i;return s===a&&r.getSeconds()===0&&r.getMilliseconds()===0?e:(r.setMilliseconds(0),r.setSeconds(0),r.setMinutes(s),r.getTime())}case"hour":{const a=r.getHours(),s=Math.ceil(a/i)*i;return s===a&&r.getMinutes()===0&&r.getSeconds()===0&&r.getMilliseconds()===0?e:(r.setMilliseconds(0),r.setSeconds(0),r.setMinutes(0),r.setHours(s),r.getTime())}case"day":return r.getHours()===0&&r.getMinutes()===0&&r.getSeconds()===0&&r.getMilliseconds()===0?e:(r.setMilliseconds(0),r.setSeconds(0),r.setMinutes(0),r.setHours(0),r.setDate(r.getDate()+1),r.getTime());case"week":{const s=new Date(1970,0,5).getTime();r.setMilliseconds(0),r.setSeconds(0),r.setMinutes(0),r.setHours(0);const l=r.getTime(),c=Math.ceil((l-s)/6048e5),u=Math.ceil(c/i)*i,d=s+u*6048e5;return d>=e?d:d+i*6048e5}case"month":{const a=r.getMonth(),s=Math.ceil(a/i)*i;return s===a&&r.getDate()===1&&r.getHours()===0&&r.getMinutes()===0&&r.getSeconds()===0&&r.getMilliseconds()===0?e:(r.setMilliseconds(0),r.setSeconds(0),r.setMinutes(0),r.setHours(0),r.setDate(1),r.setMonth(s),r.getTime())}case"year":{const a=r.getFullYear(),s=Math.ceil(a/i)*i;return s===a&&r.getMonth()===0&&r.getDate()===1&&r.getHours()===0&&r.getMinutes()===0&&r.getSeconds()===0&&r.getMilliseconds()===0?e:new Date(s,0,1).getTime()}}return e}isAtBoundary(e,n,i){const o=this.getDateFields(e,i);switch(n){case"year":return o.month===0&&o.date===1&&o.hour===0&&o.minute===0&&o.second===0&&o.ms===0;case"month":return o.date===1&&o.hour===0&&o.minute===0&&o.second===0&&o.ms===0;case"day":return o.hour===0&&o.minute===0&&o.second===0&&o.ms===0;case"hour":return o.minute===0&&o.second===0&&o.ms===0;case"minute":return o.second===0&&o.ms===0;case"second":return o.ms===0}return!1}},zc=class{constructor(e){this.w=e,this.tooltipKeyFormat="dd MMM"}xLabelFormat(e,n,i,o){const r=this.w;if(r.config.xaxis.type==="datetime"&&r.config.xaxis.labels.formatter===void 0&&r.config.tooltip.x.formatter===void 0){const a=new Ei(this.w);return a.formatDate(a.getDate(n),r.config.tooltip.x.format)}return e(n,i,o)}defaultGeneralFormatter(e){return Array.isArray(e)?e.map(n=>n):e}defaultYFormatter(e,n){const i=this.w;if(we.isNumber(e))if(i.globals.yValueDecimal!==0)e=e.toFixed(n.decimalsInFloat!==void 0?n.decimalsInFloat:i.globals.yValueDecimal);else{const o=e.toFixed(0);e=Number(o)===e?o:e.toFixed(1)}return e}setLabelFormatters(){const e=this.w,n=e.formatters,i=e.axisFlags.isXNumeric&&e.axisFlags.dataFormatXNumeric&&e.config.xaxis.type!=="datetime"&&!e.config.xaxis.convertedCatToNumeric&&!e.globals.isBarHorizontal;if(n.xaxisTooltipFormatter=o=>this.defaultGeneralFormatter(o),n.ttKeyFormatter=o=>this.defaultGeneralFormatter(o),n.ttZFormatter=o=>o,n.legendFormatter=o=>this.defaultGeneralFormatter(o),e.config.xaxis.labels.formatter!==void 0?n.xLabelFormatter=e.config.xaxis.labels.formatter:n.xLabelFormatter=o=>{var r;if(we.isNumber(o)){if(!e.config.xaxis.convertedCatToNumeric&&(e.config.xaxis.type==="numeric"||i)){const a=(r=e.globals.xAxisScale)==null?void 0:r.result;if(i&&Array.isArray(a)&&a.every(Number.isInteger))return o.toFixed(0);if(we.isNumber(e.config.xaxis.decimalsInFloat))return o.toFixed(e.config.xaxis.decimalsInFloat);{const s=e.globals.maxX-e.globals.minX;if(s>0){const l=s/10,c=Math.max(0,-Math.floor(Math.log10(l)));return o.toFixed(c)}return o.toFixed(0)}}return e.globals.isBarHorizontal&&e.globals.maxY-e.globals.minY<4?o.toFixed(1):o.toFixed(0)}return o},typeof e.config.tooltip.x.formatter=="function")n.ttKeyFormatter=e.config.tooltip.x.formatter;else if(e.config.xaxis.labels.formatter===void 0&&i){const o=n.xLabelFormatter;n.ttKeyFormatter=r=>Number.isInteger(r)?r.toFixed(0):o(r)}else n.ttKeyFormatter=n.xLabelFormatter;return typeof e.config.xaxis.tooltip.formatter=="function"&&(n.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||e.config.tooltip.y.formatter!==void 0)&&(n.ttVal=e.config.tooltip.y),e.config.tooltip.z.formatter!==void 0&&(n.ttZFormatter=e.config.tooltip.z.formatter),e.config.legend.formatter!==void 0&&(n.legendFormatter=e.config.legend.formatter),n.yLabelFormatters=[],e.config.yaxis.forEach((o,r)=>{if(o.labels.formatter!==void 0)n.yLabelFormatters[r]=o.labels.formatter;else if(e.config.chart.type==="violin"){const a=s=>typeof s=="number"&&isFinite(s)?`${Math.round(s*100)/100}`:s;n.yLabelFormatters[r]=s=>e.globals.xyCharts?Array.isArray(s)?s.map(a):a(s):s}else n.yLabelFormatters[r]=a=>e.globals.xyCharts?Array.isArray(a)?a.map(s=>this.defaultYFormatter(s,o)):this.defaultYFormatter(a,o):a}),e.globals}heatmapLabelFormatters(){const e=this.w;if(e.config.chart.type==="heatmap"){e.globals.yAxisScale[0].result=e.seriesData.seriesNames.slice();const n=e.seriesData.seriesNames.reduce((i,o)=>i.length>o.length?i:o,0);e.globals.yAxisScale[0].niceMax=n,e.globals.yAxisScale[0].niceMin=n}}};const rye="en",aye={months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom",measure:"Measure"}},q5={name:rye,options:aye};let ma=class{constructor(){this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,alignZero:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0},tooltip:{enabled:!1,text:void 0,formatter:void 0,theme:void 0,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}init(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},plugins:[],trellis:{by:void 0,row:void 0,column:void 0,emptyPanels:"placeholder",data:void 0,x:void 0,y:void 0,seriesBy:void 0,columns:"auto",minPanelWidth:220,gap:12,aspectRatio:1.6,panelHeight:void 0,order:"first-seen",limit:void 0,virtualize:"auto",scales:{x:"shared",y:"shared",color:"shared",size:"shared"},header:{show:!0,formatter:void 0,style:{fontSize:void 0,fontWeight:void 0,color:void 0}},axes:{labels:"edges"},legend:"shared",toolbar:"shared",tooltip:"panel",zoom:"sync",promote:!0,radiusByTotal:!1,targetTicks:3,panel:void 0},chart:{animations:{enabled:!0,speed:800,easing:"easeInOutSine",animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350,easing:void 0},chartTypeMorph:{enabled:!0,speed:600},respectReducedMotion:!0,largeDatasetThreshold:1e3},background:"",locales:[q5],defaultLocale:"en",perspectives:{serializeOptions:["theme","xaxis","yaxis","title","subtitle"]},history:{enabled:!1,maxDepth:100,coalesceMs:250,keyboard:!0},renderer:"svg",rendererThreshold:8e3,layers:{series:"auto",grid:"svg",annotations:"svg",dataLabels:"svg"},dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.7},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0,crossFilter:void 0,filterChange:void 0,annotationDragged:void 0,annotationEdited:void 0,annotationCreated:void 0,annotationStyled:void 0,annotationDeleted:void 0,measured:void 0,keyDown:void 0,keyUp:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,print:{enabled:!0,width:700},id:void 0,group:void 0,nonce:void 0,license:void 0,offsetX:0,offsetY:0,injectStyleSheet:!0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},link:{enabled:!1,mode:"highlight",dimOpacity:.2,id:void 0,dimension:void 0,reduce:void 0,type:void 0,bins:void 0,order:void 0,seriesName:void 0},ink:{enabled:!1,palette:!1,snap:!1,noteColors:void 0},measure:{enabled:!1,mode:"span",key:"m",pinOnRelease:!0,colors:{up:void 0,down:void 0,neutral:void 0,guide:void 0},band:!0,guides:!0,markers:!0,format:{x:void 0,y:void 0,percent:void 0},label:void 0},contextMenu:{enabled:!1,items:["annotate","xline","yline","measure"],labels:{annotate:void 0,xline:void 0,yline:void 0,measure:void 0},noteText:"Note",line:{text:"",strokeDashArray:4,color:void 0}},stacked:!1,stackOnlyBar:!0,stackType:"normal",streaming:{enabled:!1,maxPoints:void 0},toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,measure:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0,embedFonts:!0},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:"auto",pinch:"auto",resetControl:"auto",zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}},pan:{inertia:!0,friction:.92},accessibility:{enabled:!0,description:void 0,announcements:{enabled:!0},keyboard:{enabled:!0,navigation:{enabled:!0,wrapAround:!1}}},dataReducer:{enabled:!1,algorithm:"lttb",targetPoints:250,threshold:500}},parsing:{x:void 0,y:void 0},plotOptions:{line:{isSlopeChart:!1,colors:{threshold:0,colorAboveThreshold:void 0,colorBelowThreshold:void 0}},area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"all",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,dumbbell:{connector:{color:void 0,opacity:.55},dataLabels:{enabled:!1,offset:6,colorFromMarker:!0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0}},tooltip:{differenceLabel:"Difference"}},isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0,minZ:void 0,maxZ:void 0},scatter:{jitter:{enabled:!1,x:0,y:0,distributed:!1,maxPoints:5e3}},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"},whiskers:"minmax",points:{show:!1,shape:"circle",size:2.5,jitter:.5,maxPoints:3e3,opacity:.9,fillColor:"series-dark",strokeColor:"#fff",strokeWidth:1}},violin:{bandwidthScale:1,kde:{bandwidth:void 0,resolution:64},normalize:"individual",side:"both",box:{show:!1,width:"15%",whiskers:"minmax",strokeWidth:1,fillColor:void 0,capWidth:.5},points:{show:!0,shape:"circle",size:2.5,jitter:.5,constrainToViolin:!0,position:"center",laneWidth:"40%",maxPoints:3e3,opacity:.9,fillColor:"series-dark",strokeColor:"#fff",strokeWidth:1}},histogram:{bins:"auto",binWidth:void 0,range:void 0,normalize:"count",cumulative:!1,overlap:!0},heatmap:{shape:"rect",radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0,gradientLegend:{enabled:!1,width:"70%",height:"70%",thickness:12,align:"center",stops:16,showLabels:!0,showHoverValue:!0,labelStyle:{fontSize:"11px",fontFamily:void 0,colors:void 0},arrow:{size:8,color:void 0},formatter:void 0}}},waterfall:{colors:{positive:"#00A86F",negative:"#FF4560",subtotal:void 0,total:void 0},connectors:{show:!0,color:void 0,strokeWidth:1,strokeDashArray:3}},streamgraph:{offset:"wiggle",order:"inside-out",hover:{show:!0,opacity:.35},labels:{show:!0,minWidth:24,minFontSize:9,maxFontSize:30,style:{fontSize:"auto",fontFamily:void 0,fontWeight:600,colors:void 0}}},funnel:{shape:"rectangle",lastShape:"flat"},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale",minFontSize:4},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0,colorValue:void 0,gradient:{enabled:void 0,min:void 0,max:void 0,midpoint:void 0,symmetric:!0,colors:void 0,stops:void 0},gradientLegend:{enabled:!1,width:"70%",height:"70%",thickness:12,align:"center",stops:16,showLabels:!0,showHoverValue:!0,labelStyle:{fontSize:"11px",fontFamily:void 0,colors:void 0},arrow:{size:8,color:void 0},formatter:void 0}},nested:{enabled:void 0,drilldownAsLevels:!1},parents:{show:"auto",padding:4,fill:void 0,fillOpacity:1,borderColor:void 0,borderWidth:1,borderRadius:void 0,hover:{show:!0,color:void 0,width:2},header:{show:!0,height:22,minWidth:40,align:"left",offsetX:0,offsetY:0,showValue:!1,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,color:void 0,background:void 0,cssClass:""}},tooltip:{formatter:void 0}},levels:[],zoom:{enabled:!1,breadcrumb:void 0},seriesTitle:{show:!0,offsetY:1,offsetX:1,borderColor:"#000",borderWidth:1,borderRadius:2,style:{background:"rgba(0, 0, 0, 0.6)",color:"#fff",fontSize:"12px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:6,right:6,top:2,bottom:2}}}},unit:{layout:"grouped",positions:void 0,transition:"group",shape:"circle",image:{src:void 0,width:20,height:20,tint:!1},pictogram:{mark:void 0,fit:"contain",scale:1,padding:0,fallback:"circle"},size:"auto",columns:{size:"inherit"},grid:{columns:10,total:void 0,fillFrom:"bottom",split:!1,tileColumns:void 0,max:void 0,trackColor:void 0},scatter:{y:"lanes",spread:"swarm",orientation:"horizontal",tickAmount:5,xMin:void 0,xMax:void 0,xTitle:void 0,xFormatter:void 0,yTickAmount:5,yMin:void 0,yMax:void 0,yTitle:void 0,yFormatter:void 0,sizeField:"z",sizeRange:void 0,laneLabelWidth:void 0,gridlines:!0},sizeByValue:{enabled:!1,maxRadius:"auto",minRadius:void 0,scale:"area"},spacing:1.05,borderRadius:0,gather:{motion:"auto",spring:"crisp",easing:"outCubic",overshoot:1.70158,enter:"burst"},arc:{startAngle:-90,endAngle:90,innerRadiusRatio:.4,rows:"auto"},unitValue:1,maxUnits:5e3,sortByGroup:!0,clusterLabels:{show:!0,position:"top",curved:!0,fontSize:"13px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:void 0,external:{show:!1,connector:{show:!0,width:1.5,color:void 0,gap:8,length:22},offsetX:0,offsetY:0}},tooltip:{formatter:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,shape:"arc",min:0,max:100,bands:[],bandsStyle:{strokeWidth:"40%",gap:0,hideTrackWhenPresent:!0},ticks:{show:!1,major:{count:11,length:10,width:2,color:"#666",placement:"outside"},minor:{count:4,length:5,width:1,color:"#999",placement:"outside"},labels:{show:!1,offset:6,fontSize:"11px",fontFamily:void 0,fontWeight:400,color:"#666",formatter(e){return String(e)}}},needle:{color:"#333",length:"85%",baseWidth:4,tipWidth:1,offsetY:0,showValueArc:!1,animation:{enabled:!0,duration:800,easing:"ease-out"}},hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",stroke:void 0,strokeWidth:1,strokeDasharray:void 0,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter(e){return e}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter(e){return e+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter(e){return e.globals.seriesTotals.reduce((n,i)=>n+i,0)/e.seriesData.series.length+"%"}}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter(e){return e},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,expandOffset:10,hoverOutline:{show:!0,size:8,gap:0,opacity:.3,color:void 0},borderRadius:0,spacing:0,dataLabels:{offset:0,minAngleToShowLabel:10,external:{show:!1,offsetX:0,offsetY:0,fontSize:void 0,fontFamily:void 0,fontWeight:void 0,color:void 0,formatter:void 0,connector:{show:!0,width:1,color:void 0,length:16,gap:6}}},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter(e){return e}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter(e){return e}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter(e){return e.globals.seriesTotals.reduce((n,i)=>n+i,0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},sunburst:{offsetX:0,offsetY:0,startAngle:0,endAngle:360,innerSize:"15%",borderRadius:0,spacing:1,leaf:"extend",partition:"normalize",tint:.14,zoomOnClick:!0,dataLabels:{show:!0,minAngleToShow:8,style:{fontSize:"12px",fontFamily:void 0,fontWeight:400,colors:void 0}}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter(e){return e!==null?e:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",backgroundColor:void 0,borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8},animate:{enabled:!0},countUp:{enabled:!1}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],drilldown:{enabled:!1,series:[],breadcrumb:{show:!0,position:"top-left",separator:" / ",rootLabel:"All",offsetX:0,offsetY:0},animation:{enabled:!0,zoomFromPoint:!1,speed:260},loading:{show:!0},cache:!0,marker:{show:!0,size:6,strokeColor:"#fff"}},legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],clusterGroupedSeries:!0,clusterGroupedSeriesOrientation:"vertical",labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3},largeDatasetThreshold:0},noData:{text:void 0,align:"center",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:"lighten",value:.15}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken",value:.35}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,arrow:!0,compact:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0,background:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter(e){return e?e+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM",day:"dd MMM",hour:"HH:mm",minute:"HH:mm",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.8}},tooltip:{enabled:!1,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",tokens:!0,follow:!1,name:"",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65},accessibility:{colorBlindMode:""}}}}};const YC={funnel:"bar",pyramid:"bar",gauge:"radialBar",waffle:"unit",histogram:"bar",waterfall:"rangeBar",dumbbell:"rangeBar",streamgraph:"rangeArea",raincloud:"violin"},Z5="_apexOwnedByType",ta=(t,e)=>{const n=e;return n[Z5]=t,e},sye=["tooltip.custom","tooltip.shared","tooltip.intersect","tooltip.followCursor","dataLabels.enabled","dataLabels.formatter","plotOptions.bar.dataLabels.position","markers.size","plotOptions.violin.side","plotOptions.violin.box.show","plotOptions.violin.box.whiskers","plotOptions.violin.points.position","states.hover.filter.type","states.active.filter.type","xaxis.crosshairs.width","xaxis.tickPlacement","xaxis.tooltip.enabled","chart.zoom.enabled","chart.animations.dynamicAnimation.enabled"],rh=(t,e)=>{let n=t;for(const i of e.split(".")){if(n==null||typeof n!="object")return;n=n[i]}return n},lye=(t,e,n)=>{const i=e.split("."),o=i.pop();let r=t;for(const a of i)(r[a]==null||typeof r[a]!="object")&&(r[a]={}),r=r[a];n===void 0?delete r[o]:r[o]=n},QO=(t,e)=>{var n,i;const o=YC[t];return{chart:{type:o||t,requestedType:o?t:void 0,stacked:(n=e.chart)==null?void 0:n.stacked},plotOptions:{bar:{isFunnel:t==="funnel"||t==="pyramid"},histogram:(i=e.plotOptions)==null?void 0:i.histogram},series:e.series,yaxis:[{title:{},labels:{},axisBorder:{},axisTicks:{}}]}},cye=(t,e)=>{if(typeof t=="function")return Array.isArray(t[Z5])?!0:typeof e=="function"&&String(t)===String(e);if(typeof e=="function")return t===void 0;if(t===e)return!0;try{return JSON.stringify(t)===JSON.stringify(e)}catch{return!1}},bl=({isTimeline:t,seriesIndex:e,dataPointIndex:n,y1:i,y2:o,w:r})=>{var a;let s=r.rangeData.seriesRangeStart[e][n],l=r.rangeData.seriesRangeEnd[e][n],c=r.labelData.labels[n],u=r.config.series[e].name?r.config.series[e].name:"";const d=r.formatters.ttKeyFormatter,f=r.config.tooltip.y.title.formatter,h={w:r,seriesIndex:e,dataPointIndex:n,start:s,end:l};typeof f=="function"&&(u=f(u,h)),(a=r.config.series[e].data[n])!=null&&a.x&&(c=r.config.series[e].data[n].x),t||r.config.xaxis.type==="datetime"&&(c=new zc(r).xLabelFormat(r.formatters.ttKeyFormatter,c,c,{i:void 0,dateFormatter:new Ei(r).formatDate,w:r})),typeof d=="function"&&(c=d(c,h)),Number.isFinite(i)&&Number.isFinite(o)&&(s=i,l=o);let p="",g="";const m=r.globals.colors[e];if(r.config.tooltip.x.formatter===void 0)if(r.config.xaxis.type==="datetime"){const v=new Ei(r);p=v.formatDate(v.getDate(s),r.config.tooltip.x.format),g=v.formatDate(v.getDate(l),r.config.tooltip.x.format)}else p=s,g=l;else p=r.config.tooltip.x.formatter(s),g=r.config.tooltip.x.formatter(l);return{start:s,end:l,startVal:p,endVal:g,ylabel:c,color:m,seriesName:u}},nu=t=>{let{color:e,seriesName:n,ylabel:i,start:o,end:r,seriesIndex:a,dataPointIndex:s}=t;const l=t.w.globals.tooltip.tooltipLabels.getFormatters(a);o=l.yLbFormatter(o),r=l.yLbFormatter(r);const c=l.yLbFormatter(t.w.seriesData.series[a][s]);let u="";const d=` ${o} - ${r} - `;return t.w.globals.comboCharts?t.w.config.series[a].type==="rangeArea"||t.w.config.series[a].type==="rangeBar"?u=d:u=`${c}`:u=d,'
'+(n||"")+'
'+i+": "+u+"
"};let _a=class ep{constructor(e){this.opts=e}static forType(e){var n,i;const o=new ep(e),r=["line","area","bar","candlestick","boxPlot","violin","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","unit","sunburst","pie","polarArea","donut","radar","radialBar"],a=e.chart.requestedType;let s;return a==="funnel"||a==="pyramid"?s=o[a]():a==="gauge"?s=o.gauge():a==="histogram"?s=o.histogram():a==="waterfall"?s=o.waterfall():a==="dumbbell"?s=o.dumbbell():a==="streamgraph"?s=o.streamgraph():a==="raincloud"?s=o.raincloud():r.indexOf(e.chart.type)!==-1?s=o[e.chart.type]():s=o.line(),(i=(n=e.plotOptions)==null?void 0:n.bar)!=null&&i.isFunnel&&(s=o.funnel()),e.chart.stacked&&e.chart.type==="bar"&&(s=o.stackedBars()),s}static handOverTypeDefaults(e,n,i){const o=e.chart.requestedType||e.chart.type;if(!n||n===o)return;const r=new ma().init(),a=we.extend(r,ep.forType(QO(n,e))),s=we.extend(r,ep.forType(QO(o,e)));for(const l of sye){if(i&&oh(i,l)!==void 0)continue;const c=oh(a,l),u=oh(s,l);c===void 0&&u===void 0||cye(oh(e,l),c)&&lye(e,l,u)}}hideYAxis(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}line(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}sparkline(e){this.hideYAxis();const n={grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}};return we.extend(e,n)}slope(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter(e,n){const i=n.w.config.series[n.seriesIndex].name;return e!==null?i+": "+e:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}bar(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"square"},fill:{opacity:.85},legend:{markers:{shape:"square"}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}funnel(){return this.hideYAxis(),wt(Je({},this.bar()),{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}pyramid(){return this.funnel()}gauge(){const e=this.radialBar();return wt(Je({},e),{plotOptions:{radialBar:{startAngle:-135,endAngle:135,hollow:{margin:0,size:"60%"},track:{background:"#e7e7e7",strokeWidth:"100%",margin:5},dataLabels:{name:{show:!1},value:{show:!0,fontSize:"32px",fontWeight:600,offsetY:8}}}}})}waterfall(){const e=this.rangeBar();return wt(Je({},e),{chart:{stacked:!1,zoom:{enabled:!1},animations:{animateGradually:{enabled:!0}}},plotOptions:wt(Je({},e.plotOptions),{bar:wt(Je({},e.plotOptions.bar),{columnWidth:"60%",barHeight:"60%"})}),dataLabels:wt(Je({},e.dataLabels),{enabled:!0,background:{enabled:!0,backgroundColor:"#fff",foreColor:"#373d3f",borderColor:"#e3e8ee",opacity:.92}}),legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!1}})}histogram(){var e,n,i,o;const r=Array.isArray((e=this.opts)==null?void 0:e.series)&&this.opts.series.length>1&&((o=(i=(n=this.opts)==null?void 0:n.plotOptions)==null?void 0:i.histogram)==null?void 0:o.overlap)!==!1;return wt(Je({},this.bar()),{chart:{stacked:!1,zoom:{enabled:!1},animations:{animateGradually:{enabled:!1}}},plotOptions:{bar:{columnWidth:"100%",borderRadius:0,dataLabels:{position:"top"}}},dataLabels:{enabled:!1},fill:r?{opacity:.65}:{},stroke:r?{show:!1}:{show:!0,width:1,colors:["#fff"]},xaxis:{type:"numeric",tooltip:{enabled:!1}},tooltip:{shared:r,intersect:!1,x:{formatter:(a,s)=>{var l,c;const u=(c=(l=s==null?void 0:s.w)==null?void 0:l.histogramData)==null?void 0:c.edges,d=s==null?void 0:s.dataPointIndex;if(!Array.isArray(u)||typeof d!="number"||d<0)return String(a);const f=u[d],h=u[d+1];if(f===void 0||h===void 0)return String(a);const p=g=>Number.isInteger(g)?String(g):g.toFixed(2);return`${p(f)} to ${p(h)}`}}}})}candlestick(){return{stroke:{width:1},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:ta(["candlestick"],({seriesIndex:e,dataPointIndex:n,w:i})=>this._getBoxTooltip(i,e,n,["Open","High","","Low","Close"],"candlestick"))},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}boxPlot(){return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:ta(["boxPlot"],({seriesIndex:e,dataPointIndex:n,w:i})=>this._getBoxTooltip(i,e,n,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot"))},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}violin(){return{chart:{zoom:{enabled:!1},animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},fill:{opacity:.7},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:ta(["violin"],({seriesIndex:e,dataPointIndex:n,w:i})=>this._getViolinTooltip(i,e,n))},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}raincloud(){var e,n,i;const o=this.violin(),r=((i=(n=(e=this.opts)==null?void 0:e.plotOptions)==null?void 0:n.bar)==null?void 0:i.horizontal)===!0;return wt(Je({},o),{plotOptions:{violin:{side:r?"top":"right",box:{show:!0,whiskers:"tukey"},points:{position:r?"bottom":"left",jitter:.85}}},tooltip:wt(Je({},o.tooltip),{custom:ta(["raincloud"],({seriesIndex:a,dataPointIndex:s,w:l})=>this._getRaincloudTooltip(l,a,s))})})}rangeBar(){const e=i=>{const{color:o,seriesName:r,ylabel:a,startVal:s,endVal:l}=bl(wt(Je({},i),{isTimeline:!0}));return tu(wt(Je({},i),{color:o,seriesName:r,ylabel:a,start:s,end:l}))},n=i=>{const{color:o,seriesName:r,ylabel:a,start:s,end:l}=bl(i);return tu(wt(Je({},i),{color:o,seriesName:r,ylabel:a,start:s,end:l}))};return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter(i,{seriesIndex:o,dataPointIndex:r,w:a}){const s=()=>{const l=a.rangeData.seriesRangeStart[o][r];return a.rangeData.seriesRangeEnd[o][r]-l};return a.globals.comboCharts?a.config.series[o].type==="rangeBar"||a.config.series[o].type==="rangeArea"?s():i:s()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:ta(["rangeBar"],i=>i.w.config.plotOptions&&i.w.config.plotOptions.bar&&i.w.config.plotOptions.bar.horizontal?e(i):n(i))},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}dumbbell(){const e=this.rangeBar(),n=(o,r,a)=>'
'+o+' '+a+"
",i=o=>{var r;const{w:a,dataPointIndex:s,seriesIndex:l}=o,c=a.dumbbellData;if(!c||c.form!=="series"){const{color:m,seriesName:v,ylabel:b,start:y,end:w}=bl(o);return tu(wt(Je({},o),{color:m,seriesName:v,ylabel:b,start:y,end:w}))}const u=c.values[s]||[],d=a.globals.tooltip.tooltipLabels.getFormatters(l),f=(r=a.labelData.labels[s])!=null?r:"";let h="";const p=[];for(let m=0;m'+a.config.plotOptions.bar.dumbbell.tooltip.differenceLabel+': '+d.yLbFormatter(Math.abs(p[1]-p[0]))+"":"";return'
'+f+"
"+h+g+"
"};return wt(Je({},e),{chart:{stacked:!1,zoom:{enabled:!1}},plotOptions:wt(Je({},e.plotOptions),{bar:wt(Je({},e.plotOptions.bar),{barHeight:6,columnWidth:6,dumbbell:{dataLabels:{enabled:!0}}})}),dataLabels:wt(Je({},e.dataLabels),{enabled:!1}),legend:{show:!0,position:"bottom",horizontalAlign:"left",markers:{shape:"circle"}},tooltip:{shared:!1,intersect:!0,followCursor:!1,custom:ta(["rangeBar"],i)}})}dumbbellSizing(e){var n,i;return(n=e.plotOptions.bar)!=null&&n.barHeight||(e.plotOptions.bar.barHeight=2),(i=e.plotOptions.bar)!=null&&i.columnWidth||(e.plotOptions.bar.columnWidth=2),e}area(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}rangeArea(){const e=n=>{const{color:i,seriesName:o,ylabel:r,start:a,end:s}=bl(n);return tu(wt(Je({},n),{color:i,seriesName:o,ylabel:r,start:a,end:s}))};return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:ta(["rangeArea"],n=>e(n))}}}streamgraph(){const e=this.rangeArea(),n=i=>{var o;const{w:r,dataPointIndex:a,seriesIndex:s}=i,l=r.streamgraphData;if(!l||!Array.isArray(l.order)){const{color:m,seriesName:v,ylabel:b,start:y,end:w}=bl(i);return tu(wt(Je({},i),{color:m,seriesName:v,ylabel:b,start:y,end:w}))}const{ylabel:c}=bl(i),u=(()=>{const m=r.streamgraphData,v=r.dom.baseEl&&r.dom.baseEl.querySelector(".apexcharts-svg"),b=r.interact&&r.interact.clientY,y=r.globals.maxY-r.globals.minY;if(!v||b==null||!y||!isFinite(y))return s;const w=v.getBoundingClientRect(),x=r.globals.svgWidth?w.width/r.globals.svgWidth:1,$=(b-w.top)/(x||1)-r.layout.translateY,S=r.layout.gridHeight,_=T=>{var M;const I=(T-r.globals.minY)/y;return(M=r.config.yaxis[0])!=null&&M.reversed?I*S:S-I*S};let P=s,O=1/0;for(let T=0;T=D&&$<=F)return M;const N=${if(d){const b=r.globals.tooltip.tooltipLabels.getFormatters(m);if(typeof b.yLbFormatter=="function")return b.yLbFormatter(v)}return Number.isInteger(v)?String(v):String(Number(v.toFixed(6)))};let h="",p=0;for(let m=l.order.length-1;m>=0;m--){const v=l.order[m],b=(o=l.values[v])==null?void 0:o[a];b==null||!isFinite(b)||(p+=b,h+='
'+l.names[v]+' '+f(v,b)+"
")}const g=l.offset==="expand"?"":'
Total '+f(s,p)+"
";return'
'+c+"
"+h+g+"
"};return wt(Je({},e),{chart:{stacked:!1},stroke:{curve:"monotoneCubic",width:0},fill:{type:"solid",opacity:1},dataLabels:{enabled:!1},grid:{yaxis:{lines:{show:!1}}},markers:{size:0,hover:{size:0,sizeOffset:0}},tooltip:{intersect:!1,shared:!1,followCursor:!0,custom:ta(["streamgraph"],i=>n(i))},legend:{show:!0,position:"top",horizontalAlign:"center"}})}brush(e){const n={chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}};return we.extend(e,n)}stacked100(e){e.dataLabels=e.dataLabels||{},e.dataLabels.formatter=e.dataLabels.formatter||void 0;const n=e.dataLabels.formatter;return e.yaxis.forEach((o,r)=>{e.yaxis[r].min=0,e.yaxis[r].max=100}),e.chart.type==="bar"&&(e.dataLabels.formatter=n||function(o){return typeof o=="number"?o&&o.toFixed(0)+"%":o}),e}stackedBars(){const e=this.bar();return wt(Je({},e),{plotOptions:wt(Je({},e.plotOptions),{bar:wt(Je({},e.plotOptions.bar),{borderRadiusApplication:"end"})})})}convertCatToNumeric(e){return e.xaxis.convertedCatToNumeric=!0,e}convertCatToNumericXaxis(e,n){e.xaxis.type="numeric",e.xaxis.labels=e.xaxis.labels||{},e.xaxis.labels.formatter=e.xaxis.labels.formatter||function(r){return we.isNumber(r)?Math.floor(r):r};const i=e.xaxis.labels.formatter;let o=e.xaxis.categories&&e.xaxis.categories.length?e.xaxis.categories:e.labels;return n&&n.length&&(o=n.map(r=>Array.isArray(r)?r:String(r))),o&&o.length&&(e.xaxis.labels.formatter=function(r){return we.isNumber(r)?i(o[Math.floor(r)-1]):i(r)}),e.xaxis.categories=[],e.labels=[],e.xaxis.tickAmount=e.xaxis.tickAmount||"dataPoints",e}bubble(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}scatter(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}heatmap(){return{chart:{stacked:!1,zoom:{enabled:!1}},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!1,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}treemap(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1},axisTicks:{show:!1}}}}unit(){return{chart:{toolbar:{show:!1}},dataLabels:{enabled:!1},stroke:{show:!1,width:0},fill:{opacity:1},tooltip:{followCursor:!0,x:{show:!1}},legend:{show:!0,position:"bottom"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}sunburst(){return{chart:{toolbar:{show:!1}},dataLabels:{style:{colors:["#fff"]},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}pie(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter(e){return typeof e=="number"?e.toFixed(1)+"%":e},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}donut(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter(e){return typeof e=="number"?e.toFixed(1)+"%":e},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}polarArea(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter(e){return typeof e=="number"?e.toFixed(1)+"%":e},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}radar(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:e=>e,style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}radialBar(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},stroke:{lineCap:"butt"},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}_getBoxTooltip(e,n,i,o,r){const a=e.candleData.seriesCandleO[n][i],s=e.candleData.seriesCandleH[n][i],l=e.candleData.seriesCandleM[n][i],c=e.candleData.seriesCandleL[n][i],u=e.candleData.seriesCandleC[n][i],d=e.config.series[n];return d.type&&d.type!==r?`
+ `;return t.w.globals.comboCharts?t.w.config.series[a].type==="rangeArea"||t.w.config.series[a].type==="rangeBar"?u=d:u=`${c}`:u=d,'
'+(n||"")+'
'+i+": "+u+"
"};let _a=class tp{constructor(e){this.opts=e}static forType(e){var n,i;const o=new tp(e),r=["line","area","bar","candlestick","boxPlot","violin","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","unit","sunburst","pie","polarArea","donut","radar","radialBar"],a=e.chart.requestedType;let s;return a==="funnel"||a==="pyramid"?s=o[a]():a==="gauge"?s=o.gauge():a==="histogram"?s=o.histogram():a==="waterfall"?s=o.waterfall():a==="dumbbell"?s=o.dumbbell():a==="streamgraph"?s=o.streamgraph():a==="raincloud"?s=o.raincloud():r.indexOf(e.chart.type)!==-1?s=o[e.chart.type]():s=o.line(),(i=(n=e.plotOptions)==null?void 0:n.bar)!=null&&i.isFunnel&&(s=o.funnel()),e.chart.stacked&&e.chart.type==="bar"&&(s=o.stackedBars()),s}static handOverTypeDefaults(e,n,i){const o=e.chart.requestedType||e.chart.type;if(!n||n===o)return;const r=new ma().init(),a=we.extend(r,tp.forType(QO(n,e))),s=we.extend(r,tp.forType(QO(o,e)));for(const l of sye){if(i&&rh(i,l)!==void 0)continue;const c=rh(a,l),u=rh(s,l);c===void 0&&u===void 0||cye(rh(e,l),c)&&lye(e,l,u)}}hideYAxis(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}line(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}sparkline(e){this.hideYAxis();const n={grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}};return we.extend(e,n)}slope(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter(e,n){const i=n.w.config.series[n.seriesIndex].name;return e!==null?i+": "+e:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}bar(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"square"},fill:{opacity:.85},legend:{markers:{shape:"square"}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}funnel(){return this.hideYAxis(),wt(Je({},this.bar()),{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}pyramid(){return this.funnel()}gauge(){const e=this.radialBar();return wt(Je({},e),{plotOptions:{radialBar:{startAngle:-135,endAngle:135,hollow:{margin:0,size:"60%"},track:{background:"#e7e7e7",strokeWidth:"100%",margin:5},dataLabels:{name:{show:!1},value:{show:!0,fontSize:"32px",fontWeight:600,offsetY:8}}}}})}waterfall(){const e=this.rangeBar();return wt(Je({},e),{chart:{stacked:!1,zoom:{enabled:!1},animations:{animateGradually:{enabled:!0}}},plotOptions:wt(Je({},e.plotOptions),{bar:wt(Je({},e.plotOptions.bar),{columnWidth:"60%",barHeight:"60%"})}),dataLabels:wt(Je({},e.dataLabels),{enabled:!0,background:{enabled:!0,backgroundColor:"#fff",foreColor:"#373d3f",borderColor:"#e3e8ee",opacity:.92}}),legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!1}})}histogram(){var e,n,i,o;const r=Array.isArray((e=this.opts)==null?void 0:e.series)&&this.opts.series.length>1&&((o=(i=(n=this.opts)==null?void 0:n.plotOptions)==null?void 0:i.histogram)==null?void 0:o.overlap)!==!1;return wt(Je({},this.bar()),{chart:{stacked:!1,zoom:{enabled:!1},animations:{animateGradually:{enabled:!1}}},plotOptions:{bar:{columnWidth:"100%",borderRadius:0,dataLabels:{position:"top"}}},dataLabels:{enabled:!1},fill:r?{opacity:.65}:{},stroke:r?{show:!1}:{show:!0,width:1,colors:["#fff"]},xaxis:{type:"numeric",tooltip:{enabled:!1}},tooltip:{shared:r,intersect:!1,x:{formatter:(a,s)=>{var l,c;const u=(c=(l=s==null?void 0:s.w)==null?void 0:l.histogramData)==null?void 0:c.edges,d=s==null?void 0:s.dataPointIndex;if(!Array.isArray(u)||typeof d!="number"||d<0)return String(a);const f=u[d],h=u[d+1];if(f===void 0||h===void 0)return String(a);const p=g=>Number.isInteger(g)?String(g):g.toFixed(2);return`${p(f)} to ${p(h)}`}}}})}candlestick(){return{stroke:{width:1},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:ta(["candlestick"],({seriesIndex:e,dataPointIndex:n,w:i})=>this._getBoxTooltip(i,e,n,["Open","High","","Low","Close"],"candlestick"))},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}boxPlot(){return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:ta(["boxPlot"],({seriesIndex:e,dataPointIndex:n,w:i})=>this._getBoxTooltip(i,e,n,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot"))},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}violin(){return{chart:{zoom:{enabled:!1},animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},fill:{opacity:.7},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:ta(["violin"],({seriesIndex:e,dataPointIndex:n,w:i})=>this._getViolinTooltip(i,e,n))},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}raincloud(){var e,n,i;const o=this.violin(),r=((i=(n=(e=this.opts)==null?void 0:e.plotOptions)==null?void 0:n.bar)==null?void 0:i.horizontal)===!0;return wt(Je({},o),{plotOptions:{violin:{side:r?"top":"right",box:{show:!0,whiskers:"tukey"},points:{position:r?"bottom":"left",jitter:.85}}},tooltip:wt(Je({},o.tooltip),{custom:ta(["raincloud"],({seriesIndex:a,dataPointIndex:s,w:l})=>this._getRaincloudTooltip(l,a,s))})})}rangeBar(){const e=i=>{const{color:o,seriesName:r,ylabel:a,startVal:s,endVal:l}=bl(wt(Je({},i),{isTimeline:!0}));return nu(wt(Je({},i),{color:o,seriesName:r,ylabel:a,start:s,end:l}))},n=i=>{const{color:o,seriesName:r,ylabel:a,start:s,end:l}=bl(i);return nu(wt(Je({},i),{color:o,seriesName:r,ylabel:a,start:s,end:l}))};return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter(i,{seriesIndex:o,dataPointIndex:r,w:a}){const s=()=>{const l=a.rangeData.seriesRangeStart[o][r];return a.rangeData.seriesRangeEnd[o][r]-l};return a.globals.comboCharts?a.config.series[o].type==="rangeBar"||a.config.series[o].type==="rangeArea"?s():i:s()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:ta(["rangeBar"],i=>i.w.config.plotOptions&&i.w.config.plotOptions.bar&&i.w.config.plotOptions.bar.horizontal?e(i):n(i))},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}dumbbell(){const e=this.rangeBar(),n=(o,r,a)=>'
'+o+' '+a+"
",i=o=>{var r;const{w:a,dataPointIndex:s,seriesIndex:l}=o,c=a.dumbbellData;if(!c||c.form!=="series"){const{color:m,seriesName:v,ylabel:b,start:y,end:w}=bl(o);return nu(wt(Je({},o),{color:m,seriesName:v,ylabel:b,start:y,end:w}))}const u=c.values[s]||[],d=a.globals.tooltip.tooltipLabels.getFormatters(l),f=(r=a.labelData.labels[s])!=null?r:"";let h="";const p=[];for(let m=0;m'+a.config.plotOptions.bar.dumbbell.tooltip.differenceLabel+': '+d.yLbFormatter(Math.abs(p[1]-p[0]))+"
":"";return'
'+f+"
"+h+g+"
"};return wt(Je({},e),{chart:{stacked:!1,zoom:{enabled:!1}},plotOptions:wt(Je({},e.plotOptions),{bar:wt(Je({},e.plotOptions.bar),{barHeight:6,columnWidth:6,dumbbell:{dataLabels:{enabled:!0}}})}),dataLabels:wt(Je({},e.dataLabels),{enabled:!1}),legend:{show:!0,position:"bottom",horizontalAlign:"left",markers:{shape:"circle"}},tooltip:{shared:!1,intersect:!0,followCursor:!1,custom:ta(["rangeBar"],i)}})}dumbbellSizing(e){var n,i;return(n=e.plotOptions.bar)!=null&&n.barHeight||(e.plotOptions.bar.barHeight=2),(i=e.plotOptions.bar)!=null&&i.columnWidth||(e.plotOptions.bar.columnWidth=2),e}area(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}rangeArea(){const e=n=>{const{color:i,seriesName:o,ylabel:r,start:a,end:s}=bl(n);return nu(wt(Je({},n),{color:i,seriesName:o,ylabel:r,start:a,end:s}))};return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:ta(["rangeArea"],n=>e(n))}}}streamgraph(){const e=this.rangeArea(),n=i=>{var o;const{w:r,dataPointIndex:a,seriesIndex:s}=i,l=r.streamgraphData;if(!l||!Array.isArray(l.order)){const{color:m,seriesName:v,ylabel:b,start:y,end:w}=bl(i);return nu(wt(Je({},i),{color:m,seriesName:v,ylabel:b,start:y,end:w}))}const{ylabel:c}=bl(i),u=(()=>{const m=r.streamgraphData,v=r.dom.baseEl&&r.dom.baseEl.querySelector(".apexcharts-svg"),b=r.interact&&r.interact.clientY,y=r.globals.maxY-r.globals.minY;if(!v||b==null||!y||!isFinite(y))return s;const w=v.getBoundingClientRect(),x=r.globals.svgWidth?w.width/r.globals.svgWidth:1,$=(b-w.top)/(x||1)-r.layout.translateY,S=r.layout.gridHeight,_=T=>{var M;const I=(T-r.globals.minY)/y;return(M=r.config.yaxis[0])!=null&&M.reversed?I*S:S-I*S};let P=s,O=1/0;for(let T=0;T=D&&$<=F)return M;const N=${if(d){const b=r.globals.tooltip.tooltipLabels.getFormatters(m);if(typeof b.yLbFormatter=="function")return b.yLbFormatter(v)}return Number.isInteger(v)?String(v):String(Number(v.toFixed(6)))};let h="",p=0;for(let m=l.order.length-1;m>=0;m--){const v=l.order[m],b=(o=l.values[v])==null?void 0:o[a];b==null||!isFinite(b)||(p+=b,h+='
'+l.names[v]+' '+f(v,b)+"
")}const g=l.offset==="expand"?"":'
Total '+f(s,p)+"
";return'
'+c+"
"+h+g+"
"};return wt(Je({},e),{chart:{stacked:!1},stroke:{curve:"monotoneCubic",width:0},fill:{type:"solid",opacity:1},dataLabels:{enabled:!1},grid:{yaxis:{lines:{show:!1}}},markers:{size:0,hover:{size:0,sizeOffset:0}},tooltip:{intersect:!1,shared:!1,followCursor:!0,custom:ta(["streamgraph"],i=>n(i))},legend:{show:!0,position:"top",horizontalAlign:"center"}})}brush(e){const n={chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}};return we.extend(e,n)}stacked100(e){e.dataLabels=e.dataLabels||{},e.dataLabels.formatter=e.dataLabels.formatter||void 0;const n=e.dataLabels.formatter;return e.yaxis.forEach((o,r)=>{e.yaxis[r].min=0,e.yaxis[r].max=100}),e.chart.type==="bar"&&(e.dataLabels.formatter=n||function(o){return typeof o=="number"?o&&o.toFixed(0)+"%":o}),e}stackedBars(){const e=this.bar();return wt(Je({},e),{plotOptions:wt(Je({},e.plotOptions),{bar:wt(Je({},e.plotOptions.bar),{borderRadiusApplication:"end"})})})}convertCatToNumeric(e){return e.xaxis.convertedCatToNumeric=!0,e}convertCatToNumericXaxis(e,n){e.xaxis.type="numeric",e.xaxis.labels=e.xaxis.labels||{},e.xaxis.labels.formatter=e.xaxis.labels.formatter||function(r){return we.isNumber(r)?Math.floor(r):r};const i=e.xaxis.labels.formatter;let o=e.xaxis.categories&&e.xaxis.categories.length?e.xaxis.categories:e.labels;return n&&n.length&&(o=n.map(r=>Array.isArray(r)?r:String(r))),o&&o.length&&(e.xaxis.labels.formatter=function(r){return we.isNumber(r)?i(o[Math.floor(r)-1]):i(r)}),e.xaxis.categories=[],e.labels=[],e.xaxis.tickAmount=e.xaxis.tickAmount||"dataPoints",e}bubble(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}scatter(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}heatmap(){return{chart:{stacked:!1,zoom:{enabled:!1}},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!1,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}treemap(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1},axisTicks:{show:!1}}}}unit(){return{chart:{toolbar:{show:!1}},dataLabels:{enabled:!1},stroke:{show:!1,width:0},fill:{opacity:1},tooltip:{followCursor:!0,x:{show:!1}},legend:{show:!0,position:"bottom"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}sunburst(){return{chart:{toolbar:{show:!1}},dataLabels:{style:{colors:["#fff"]},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}pie(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter(e){return typeof e=="number"?e.toFixed(1)+"%":e},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}donut(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter(e){return typeof e=="number"?e.toFixed(1)+"%":e},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}polarArea(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter(e){return typeof e=="number"?e.toFixed(1)+"%":e},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}radar(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:e=>e,style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}radialBar(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},stroke:{lineCap:"butt"},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}_getBoxTooltip(e,n,i,o,r){const a=e.candleData.seriesCandleO[n][i],s=e.candleData.seriesCandleH[n][i],l=e.candleData.seriesCandleM[n][i],c=e.candleData.seriesCandleL[n][i],u=e.candleData.seriesCandleC[n][i],d=e.config.series[n];return d.type&&d.type!==r?`
${d.name?d.name:"series-"+(n+1)}: ${e.seriesData.series[n][i]} -
`:`
${o[0]}: `+a+`
${o[1]}: `+s+"
"+(l?`
${o[2]}: `+l+"
":"")+`
${o[3]}: `+c+`
${o[4]}: `+u+"
"}_getViolinTooltip(e,n,i){var o,r,a;const s=(o=e.violinData.seriesViolinMin[n])==null?void 0:o[i],l=(r=e.violinData.seriesViolinMax[n])==null?void 0:r[i],c=((a=e.violinData.seriesViolinPoints[n])==null?void 0:a[i])||[],u=e.config.series[n].name||"series-"+(n+1);return`
${u}
Min: ${s}
Max: ${l}
Observations: ${c.length}
`}_getRaincloudTooltip(e,n,i){var o,r;const a=(o=e.violinData.seriesViolinSummary[n])==null?void 0:o[i];if(!a)return this._getViolinTooltip(e,n,i);const s=((r=e.violinData.seriesViolinPoints[n])==null?void 0:r[i])||[],l=e.config.series[n].name||"series-"+(n+1),c=g=>{if(!isFinite(g))return String(g);const m=Math.round(g);return Math.abs(g-m)<1e-6?String(m):String(Number(g.toFixed(2)))},[u,d,f,h,p]=a;return`
${l}
Whisker high: ${c(p)}
Q3: ${c(h)}
Median: ${c(f)}
Q1: ${c(d)}
Whisker low: ${c(u)}
Observations: ${s.length}
`}},mc=class{constructor(e){this.opts=e}init({responsiveOverride:e}){var n,i,o,r,a,s,l,c;let u=this.opts;const d=new ma,f=new _a(u);u=this.normalizeAliasedChartType(u),this.chartType=u.chart.type,u=this.extendYAxis(u),u=this.extendAnnotations(u);let h=d.init(),p={};if(u&&typeof u=="object"){let m=_a.forType(u);(n=u.chart.brush)!=null&&n.enabled&&(m=f.brush(m)),(o=(i=u.plotOptions)==null?void 0:i.line)!=null&&o.isSlopeChart&&(m=f.slope()),u.chart.stacked&&u.chart.stackType==="100%"&&(u=f.stacked100(u)),(a=(r=u.plotOptions)==null?void 0:r.bar)!=null&&a.isDumbbell&&u.chart.requestedType!=="dumbbell"&&(u=f.dumbbellSizing(u)),this.checkForDarkTheme(Ge.getApex()),this.checkForDarkTheme(u),u.xaxis=u.xaxis||Ge.getApex().xaxis||{},e||(u.xaxis.convertedCatToNumeric=!1),u=this.checkForCatToNumericXAxis(this.chartType,m,u),((s=u.chart.sparkline)!=null&&s.enabled||(c=(l=Ge.getApex().chart)==null?void 0:l.sparkline)!=null&&c.enabled)&&(m=f.sparkline(m)),p=we.extend(h,m)}const g=we.extend(p,Ge.getApex());return h=we.extend(g,u),h=this.handleUserInputErrors(h),h}normalizeAliasedChartType(e){if(!e||!e.chart)return e;const n=e.chart.type;return!n||!YC[n]||(e.chart.requestedType=n,n==="waffle"?(e.plotOptions=e.plotOptions||{},e.plotOptions.unit=e.plotOptions.unit||{},e.plotOptions.unit.layout==null&&(e.plotOptions.unit.layout="grid"),e.plotOptions.unit.shape==null&&(e.plotOptions.unit.shape="square"),e.chart.type="unit"):n==="funnel"||n==="pyramid"?(e.plotOptions=e.plotOptions||{},e.plotOptions.bar=e.plotOptions.bar||{},e.plotOptions.bar.isFunnel=!0,e.plotOptions.bar.horizontal=!0,e.chart.type="bar",n==="pyramid"?e.plotOptions.bar.isPyramid=!0:e.plotOptions.bar.isPyramid=!1):n==="gauge"?e.chart.type="radialBar":n==="waterfall"?(e.chart.stacked=!1,e.chart.type="rangeBar"):n==="dumbbell"?(e.plotOptions=e.plotOptions||{},e.plotOptions.bar=e.plotOptions.bar||{},e.plotOptions.bar.isDumbbell=!0,e.plotOptions.bar.horizontal==null&&(e.plotOptions.bar.horizontal=!0),e.chart.stacked=!1,e.chart.type="rangeBar"):n==="streamgraph"?(e.chart.stacked=!1,e.yaxis=e.yaxis||{},!Array.isArray(e.yaxis)&&e.yaxis.show==null&&(e.yaxis.show=!1),e.chart.type="rangeArea"):n==="histogram"?(e.xaxis=e.xaxis||{},e.xaxis.type==null&&(e.xaxis.type="numeric"),e.chart.type="bar"):n==="raincloud"&&(e.chart.type="violin")),e}checkForCatToNumericXAxis(e,n,i){var o,r,a,s,l;const c=new _a(i),u=(e==="bar"||e==="boxPlot"||e==="violin")&&((r=(o=i.plotOptions)==null?void 0:o.bar)==null?void 0:r.horizontal),d=e==="pie"||e==="polarArea"||e==="donut"||e==="radar"||e==="radialBar"||e==="heatmap"||e==="unit"||e==="sunburst",f=i.xaxis.type!=="datetime"&&i.xaxis.type!=="numeric",h=(e==="scatter"||e==="bubble")&&((l=(s=(a=i.plotOptions)==null?void 0:a.scatter)==null?void 0:s.jitter)==null?void 0:l.enabled),p=i.xaxis.tickPlacement?i.xaxis.tickPlacement:n.xaxis&&n.xaxis.tickPlacement;return!u&&!d&&!h&&f&&p!=="between"&&(i=c.convertCatToNumeric(i)),i}extendYAxis(e,n){const i=new ma;(typeof e.yaxis>"u"||!e.yaxis||Array.isArray(e.yaxis)&&e.yaxis.length===0)&&(e.yaxis={});const o=Ge.getApex();e.yaxis.constructor!==Array&&o.yaxis&&o.yaxis.constructor!==Array&&(e.yaxis=we.extend(e.yaxis,o.yaxis)),e.yaxis.constructor!==Array?e.yaxis=[we.extend(i.yAxis,e.yaxis)]:e.yaxis=we.extendArray(e.yaxis,i.yAxis);let r=!1;e.yaxis.forEach(s=>{s.logarithmic&&(r=!0)});let a=e.series;return n&&!a&&(a=n.config.series),r&&a.length!==e.yaxis.length&&a.length&&(e.yaxis=a.map((s,l)=>{if(s.name||(a[l].name=`series-${l+1}`),e.yaxis[l])return e.yaxis[l].seriesName=a[l].name,e.yaxis[l];{const c=we.extend(i.yAxis,e.yaxis[0]);return c.show=!1,c}})),r&&a.length>1&&a.length!==e.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),e}extendAnnotations(e){return typeof e.annotations>"u"&&(e.annotations={},e.annotations.yaxis=[],e.annotations.xaxis=[],e.annotations.points=[]),e=this.extendYAxisAnnotations(e),e=this.extendXAxisAnnotations(e),e=this.extendPointAnnotations(e),e}extendYAxisAnnotations(e){const n=new ma;return e.annotations.yaxis=we.extendArray(typeof e.annotations.yaxis<"u"?e.annotations.yaxis:[],n.yAxisAnnotation),e}extendXAxisAnnotations(e){const n=new ma;return e.annotations.xaxis=we.extendArray(typeof e.annotations.xaxis<"u"?e.annotations.xaxis:[],n.xAxisAnnotation),e}extendPointAnnotations(e){const n=new ma;return e.annotations.points=we.extendArray(typeof e.annotations.points<"u"?e.annotations.points:[],n.pointAnnotation),e}checkForDarkTheme(e){e.theme&&e.theme.mode==="dark"&&(e.tooltip||(e.tooltip={}),e.tooltip.theme!=="light"&&(e.tooltip.theme="dark"),e.chart.foreColor||(e.chart.foreColor="#f6f7f8"),e.theme.palette||(e.theme.palette="palette4"))}handleUserInputErrors(e){const n=e;if(n.tooltip.shared&&n.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if(n.chart.type==="bar"&&n.plotOptions.bar.horizontal){if(n.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");n.yaxis[0].reversed&&(n.yaxis[0].opposite=!0),n.xaxis.tooltip.enabled=!1,n.yaxis[0].tooltip.enabled=!1,n.chart.zoom.enabled=!1}return(n.chart.type==="bar"||n.chart.type==="rangeBar")&&n.tooltip.shared&&n.xaxis.crosshairs.width==="barWidth"&&n.series.length>1&&(n.xaxis.crosshairs.width="tickWidth"),(n.chart.type==="candlestick"||n.chart.type==="boxPlot")&&n.yaxis[0].reversed&&(console.warn(`Reversed y-axis in ${n.chart.type} chart is not supported.`),n.yaxis[0].reversed=!1),n}};const Sg=1.618,GC=[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],Cg=[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24];let KC=class{initGlobalVars(e){e.series=[],e.seriesCandleO=[],e.seriesCandleH=[],e.seriesCandleM=[],e.seriesCandleL=[],e.seriesCandleC=[],e.seriesRangeStart=[],e.seriesRangeEnd=[],e.seriesRange=[],e.seriesPercent=[],e.seriesGoals=[],e.seriesX=[],e.seriesZ=[],e.seriesNames=[],e.seriesTotals=[],e.seriesLog=[],e.seriesColors=[],e.stackedSeriesTotals=[],e.seriesXvalues=[],e.seriesYvalues=[],e.dataWasParsed=!1,e.originalSeries=null,e.maxValsInArrayIndex=0,e.yValueDecimal=0,e.allSeriesHasEqualX=!0,e.hasNullValues=!1,e.invalidLogScale=!1,e.seriesRangeName={},e.labels=[],e.hasXaxisGroups=!1,e.groups=[],e.barGroups=[],e.lineGroups=[],e.areaGroups=[],e.hasSeriesGroups=!1,e.seriesGroups=[],e.categoryLabels=[],e.timescaleLabels=[],e.noLabelsProvided=!1,e.isXNumeric=!1,e.skipLastTimelinelabel=!1,e.skipFirstTimelinelabel=!1,e.isDataXYZ=!1,e.isMultiLineX=!1,e.isMultipleYAxis=!1,e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE,e.minYArr=[],e.maxYArr=[],e.maxX=-Number.MAX_VALUE,e.minX=Number.MAX_VALUE,e.initialMaxX=-Number.MAX_VALUE,e.initialMinX=Number.MAX_VALUE,e.maxDate=0,e.minDate=Number.MAX_VALUE,e.minZ=Number.MAX_VALUE,e.maxZ=-Number.MAX_VALUE,e.minXDiff=Number.MAX_VALUE,e.yAxisScale=[],e.xAxisScale=null,e.xAxisTicksPositions=[],e.xRange=0,e.yRange=[],e.zRange=0,e.dataPoints=0,e.xTickAmount=0,e.multiAxisTickAmount=0,e.disableZoomIn=!1,e.disableZoomOut=!1,e.yLabelsCoords=[],e.yTitleCoords=[],e.barPadForNumericAxis=0,e.padHorizontal=0,e.rotateXLabels=!1,e.overlappingXLabels=!1,e.radialSize=0,e.barHeight=0,e.barWidth=0,e.animationEnded=!1,e.isDestroyed=!1,e.bulkRevealScheduled=!1,e.resizeTimer=null,e.selectionResizeTimer=null,e.delayedElements=[],e.pointsArray=[],e.barCanvasCoords=null,e.activeRenderer=null,e.dataLabelsRects=[],e.lastDrawnDataLabelsIndexes=[],e.textRectsCache=new Map,e.domCache=new Map,e.dimensionCache={},e.cachedSelectors={},e.seriesNS||this._attachNamespaces(e)}_attachNamespaces(e){const n=(s,l,c=l)=>{Object.defineProperty(s,c,{get(){return e[l]},set(u){e[l]=u},enumerable:!0,configurable:!0})},i={};n(i,"series","data");for(const s of["seriesNames","seriesX","seriesZ","seriesXvalues","seriesYvalues","seriesGoals","seriesLog","seriesColors","seriesPercent","seriesTotals","stackedSeriesTotals","seriesCandleO","seriesCandleH","seriesCandleM","seriesCandleL","seriesCandleC","seriesRangeStart","seriesRangeEnd","seriesRange","seriesYAxisMap","seriesYAxisReverseMap","seriesGroups","barGroups","lineGroups","areaGroups","originalSeries","collapsedSeries","collapsedSeriesIndices","ancillaryCollapsedSeries","ancillaryCollapsedSeriesIndices","collapsingSeriesIndices","allSeriesCollapsed","risingSeries","previousPaths","ignoreYAxisIndexes","labels","categoryLabels","timescaleLabels","groups"])n(i,s);Object.defineProperty(e,"seriesNS",{value:i,writable:!1,enumerable:!1,configurable:!0});const o={};for(const s of["minX","maxX","initialMinX","initialMaxX","minY","maxY","minYArr","maxYArr","minZ","maxZ","minDate","maxDate","minXDiff","xRange","yRange","zRange","xAxisScale","yAxisScale","xAxisTicksPositions","xTickAmount","multiAxisTickAmount","dataPoints","maxValsInArrayIndex","isXNumeric","isMultipleYAxis","isMultiLineX","isDataXYZ","dataFormatXNumeric","allSeriesHasEqualX","hasNullValues","dataWasParsed","hasXaxisGroups","hasSeriesGroups","skipFirstTimelinelabel","skipLastTimelinelabel","yValueDecimal","invalidLogScale","noLabelsProvided"])n(o,s);Object.defineProperty(e,"axes",{value:o,writable:!1,enumerable:!1,configurable:!0});const r={};for(const s of["svgWidth","svgHeight","gridWidth","gridHeight","translateX","translateY","translateXAxisX","translateXAxisY","translateYAxisX","xAxisLabelsHeight","xAxisGroupLabelsHeight","xAxisLabelsWidth","yAxisLabelsWidth","yAxisWidths","yLabelsCoords","yTitleCoords","padHorizontal","barPadForNumericAxis","rotateXLabels","scaleX","scaleY","radialSize","defaultLabels","overlappingXLabels"])n(r,s);Object.defineProperty(e,"layout",{value:r,writable:!1,enumerable:!1,configurable:!0});const a={};for(const s of["domCache","dimensionCache","cachedSelectors","textRectsCache","pointsArray","dataLabelsRects","lastDrawnDataLabelsIndexes","delayedElements","resizeTimer","selectionResizeTimer","resizeObserver"])n(a,s);Object.defineProperty(e,"cache",{value:a,writable:!1,enumerable:!1,configurable:!0})}globalVars(e){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],fill:{colors:[]},radialNeedleRAF:null,unitGatherRAF:null,unitExitRAF:null,stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:e.markers.size,largestSize:0,batched:!1},LINE_HEIGHT_RATIO:Sg,axisCharts:!0,isSlopeChart:e.plotOptions.line.isSlopeChart,comboCharts:!1,initialConfig:null,initialSeries:[],tokenSurface:void 0,lastXAxis:[],lastYAxis:[],allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],collapsingSeriesIndices:[],risingSeries:[],ignoreYAxisIndexes:[],isDirty:!1,isExecCalled:!1,dataChanged:!1,resized:!1,columnSeries:null,yaxis:null,total:0,shouldAnimate:!0,previousPaths:[],prevPolarAngles:null,prevStreamFrame:null,streamScrolled:!1,prevChromeFrame:null,svgWidth:0,svgHeight:0,lastResizeSignature:null,defaultLabels:!1,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateYAxisX:[],yAxisWidths:[],tooltip:null,resizeObserver:null,locale:{},memory:{methodsToExec:[]},niceScaleAllowedMagMsd:GC,niceScaleDefaultTicks:Cg,seriesYAxisMap:[],seriesYAxisReverseMap:[],noData:!1}}defineLazyInitialSeries(e){let n=[],i=null;Object.defineProperty(e,"initialSeries",{configurable:!0,enumerable:!0,get(){return i===null&&(i=we.clone(n)),i},set(o){n=we.copySeriesShallow(o),i=null,e._initialSeriesPeek=n}}),e._initialSeriesPeek=n}init(e){const n=this.globalVars(e);this.initGlobalVars(n),this.defineLazyInitialSeries(n);const i=we.extend({},e);return i.series=we.copySeriesShallow(e.series),n.initialConfig=i,n.initialSeries=e.series,n.lastXAxis=we.clone(n.initialConfig.xaxis),n.lastYAxis=we.clone(n.initialConfig.yaxis),n}},J5=class{constructor(e){this.opts=e}init(){const e=new mc(this.opts).init({responsiveOverride:!1}),n=new KC().init(e),i={config:e,globals:n,dom:{},interact:{zoomEnabled:e.chart.toolbar.autoSelected==="zoom"&&e.chart.toolbar.tools.zoom&&e.chart.zoom.enabled,panEnabled:e.chart.toolbar.autoSelected==="pan"&&e.chart.toolbar.tools.pan,selectionEnabled:e.chart.toolbar.autoSelected==="selection"&&e.chart.toolbar.tools.selection,measureEnabled:e.chart.toolbar.autoSelected==="measure"&&!!e.chart.toolbar.tools.measure&&!!(e.chart.measure&&e.chart.measure.enabled),zoomed:!1,selection:void 0,visibleXRange:void 0,selectedDataPoints:[],mousedown:!1,clientX:null,clientY:null,lastClientPosition:{},capturedSeriesIndex:-1,capturedDataPointIndex:-1,disableZoomIn:!1,disableZoomOut:!1,isTouchDevice:Ge.isBrowser()?"ontouchstart"in window||navigator.maxTouchPoints>0:!1},formatters:{xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,legendFormatter:void 0},candleData:{seriesCandleO:[],seriesCandleH:[],seriesCandleM:[],seriesCandleL:[],seriesCandleC:[],seriesBoxPoints:[]},rangeData:{seriesRangeStart:[],seriesRangeEnd:[],seriesRange:[]},violinData:{seriesViolinDensity:[],seriesViolinPoints:[],seriesViolinSummary:[],seriesViolinMin:[],seriesViolinMax:[]},histogramData:{edges:[],binWidth:0,counts:[],rule:"",capped:!1},waterfallData:{values:[],cumulative:[],kinds:[],geometry:null},dumbbellData:null,streamgraphData:null,labelData:{labels:[],categoryLabels:[],timescaleLabels:[],hasXaxisGroups:!1,groups:[],seriesGroups:[]},axisFlags:{isXNumeric:!1,dataFormatXNumeric:!1,isDataXYZ:!1,isRangeData:!1,isRangeBar:!1,isMultiLineX:!1,noLabelsProvided:!1,dataWasParsed:!1},seriesData:{series:[],seriesNames:[],seriesX:[],seriesZ:[],seriesColors:[],seriesGoals:[],stackedSeriesTotals:[],stackedSeriesTotalsByGroups:[],unitData:[]},layout:{gridHeight:0,gridWidth:0,translateX:0,translateY:0,translateXAxisX:0,translateXAxisY:0,rotateXLabels:!1,xAxisHeight:0,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yLabelsCoords:[],yTitleCoords:[],gridPad:{top:0,right:0,bottom:0,left:0}}};Object.defineProperty(n,"dom",{get(){return i.dom},set(o){i.dom=o},enumerable:!1,configurable:!0});for(const o of["xLabelFormatter","yLabelFormatters","xaxisTooltipFormatter","ttKeyFormatter","ttVal","ttZFormatter","legendFormatter"])Object.defineProperty(n,o,{get(){return i.formatters[o]},set(r){i.formatters[o]=r},enumerable:!1,configurable:!0});for(const o of["zoomEnabled","panEnabled","selectionEnabled","zoomed","selection","visibleXRange","selectedDataPoints","mousedown","clientX","clientY","lastClientPosition","capturedSeriesIndex","capturedDataPointIndex","disableZoomIn","disableZoomOut","isTouchDevice"])Object.defineProperty(n,o,{get(){return i.interact[o]},set(r){i.interact[o]=r},enumerable:!1,configurable:!0});for(const o of["gridHeight","gridWidth","translateX","translateY","translateXAxisX","translateXAxisY","rotateXLabels","xAxisHeight","xAxisLabelsHeight","xAxisGroupLabelsHeight","xAxisLabelsWidth","yLabelsCoords","yTitleCoords","gridPad"])Object.defineProperty(n,o,{get(){return i.layout[o]},set(r){i.layout[o]=r},enumerable:!1,configurable:!0});for(const o of["series","seriesNames","seriesX","seriesZ","seriesColors","seriesGoals","stackedSeriesTotals","stackedSeriesTotalsByGroups"])Object.defineProperty(n,o,{get(){return i.seriesData[o]},set(r){i.seriesData[o]=r},enumerable:!1,configurable:!0});for(const o of["isXNumeric","dataFormatXNumeric","isDataXYZ","isRangeData","isRangeBar","isMultiLineX","noLabelsProvided","dataWasParsed"])Object.defineProperty(n,o,{get(){return i.axisFlags[o]},set(r){i.axisFlags[o]=r},enumerable:!1,configurable:!0});for(const o of["labels","categoryLabels","timescaleLabels","hasXaxisGroups","groups","seriesGroups"])Object.defineProperty(n,o,{get(){return i.labelData[o]},set(r){i.labelData[o]=r},enumerable:!1,configurable:!0});for(const o of["seriesRangeStart","seriesRangeEnd","seriesRange"])Object.defineProperty(n,o,{get(){return i.rangeData[o]},set(r){i.rangeData[o]=r},enumerable:!1,configurable:!0});for(const o of["seriesCandleO","seriesCandleH","seriesCandleM","seriesCandleL","seriesCandleC"])Object.defineProperty(n,o,{get(){return i.candleData[o]},set(r){i.candleData[o]=r},enumerable:!1,configurable:!0});for(const o of["seriesViolinDensity","seriesViolinPoints","seriesViolinMin","seriesViolinMax"])Object.defineProperty(n,o,{get(){return i.violinData[o]},set(r){i.violinData[o]=r},enumerable:!1,configurable:!0});return i}},Xi=class{constructor(e){this.w=e}static checkComboSeries(e,n){let i=!1,o=0,r=0;return n===void 0&&(n="line"),e.length&&typeof e[0].type<"u"&&e.forEach(a=>{(a.type==="bar"||a.type==="column"||a.type==="candlestick"||a.type==="boxPlot"||a.type==="violin")&&o++,typeof a.type<"u"&&a.type!==n&&r++}),r>0&&(i=!0),{comboBarCount:o,comboCharts:i}}getStackedSeriesTotals(e=[]){const n=this.w,i=[];if(n.seriesData.series.length===0)return i;for(let o=0;on+i,0);{const n=this.w.seriesData.series[e];return Array.isArray(n)?n.reduce((i,o)=>i+o,0):n??0}}getStackedSeriesTotalsByGroups(){const e=this.w,n=[];return e.labelData.seriesGroups.forEach(i=>{const o=[];e.config.series.forEach((a,s)=>{i.indexOf(e.seriesData.seriesNames[s])>-1&&o.push(s)});const r=e.seriesData.series.map((a,s)=>o.indexOf(s)===-1?s:-1).filter(a=>a!==-1);n.push(this.getStackedSeriesTotals(r))}),n}setSeriesYAxisMappings(){const e=this.w.globals,n=this.w.config;let i=[];const o=[],r=[],a=this.w.seriesData.series.length>n.yaxis.length||n.yaxis.some(c=>Array.isArray(c.seriesName));n.series.forEach((c,u)=>{r.push(u),o.push(null)}),n.yaxis.forEach((c,u)=>{i[u]=[]});const s=[];n.yaxis.forEach((c,u)=>{let d=!1;if(c.seriesName){let f=[];Array.isArray(c.seriesName)?f=c.seriesName:f.push(c.seriesName),f.forEach(h=>{n.series.forEach((p,g)=>{if(p.name===h){let m=g;u===g||a?!a||r.indexOf(g)>-1?i[u].push([u,g]):console.warn("Series '"+p.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(i[g].push([g,u]),m=u),d=!0,m=r.indexOf(m),m!==-1&&r.splice(m,1)}})})}d||s.push(u)}),i=i.map(c=>{const u=[];return c.forEach(d=>{o[d[1]]=d[0],u.push(d[1])}),u});let l=n.yaxis.length-1;for(let c=0;c{i[l].push(c),o[c]=l}),e.seriesYAxisMap=i.map(c=>c),e.seriesYAxisReverseMap=o.map(c=>c),e.seriesYAxisMap.forEach((c,u)=>{c.forEach(d=>{if(n.series[d]&&n.series[d].group===void 0){const f=n.series[d];f.group="apexcharts-axis-".concat(u.toString())}})})}isSeriesNull(e=null){let n=[];const i=this.w.config.series;return e===null?n=i.filter(o=>o!==null):i[e]&&Array.isArray(i[e].data)?n=i[e].data.filter(o=>o!==null):n=i[e]!==null&&i[e]!==void 0?[i[e]]:[],n.length===0}seriesHaveSameValues(e){const n=this.w.seriesData.series[e];return Array.isArray(n)?n.every((i,o,r)=>i===r[0]):!0}getCategoryLabels(e){const n=this.w;let i=e.slice();return n.config.xaxis.convertedCatToNumeric&&(i=e.map(o=>n.config.xaxis.labels.formatter(o-n.globals.minX+1))),i}getLargestSeries(){const e=this.w;e.globals.maxValsInArrayIndex=e.seriesData.series.map(n=>n.length).indexOf(Math.max.apply(Math,e.seriesData.series.map(n=>n.length)))}getLargestMarkerSize(){const e=this.w;let n=0;return e.globals.markers.size.forEach(i=>{n=Math.max(n,i)}),e.config.markers.discrete&&e.config.markers.discrete.length&&e.config.markers.discrete.forEach(i=>{n=Math.max(n,i.size)}),n>0&&(e.config.markers.hover.size>0?n=e.config.markers.hover.size:n+=e.config.markers.hover.sizeOffset),e.globals.markers.largestSize=n,n}getSeriesTotals(){const e=this.w;e.globals.seriesTotals=e.seriesData.series.map(n=>{let i=0;if(Array.isArray(n))for(let o=0;o{let s=0;for(let l=0;le&&i.seriesData.seriesX[a][l]{const i=[];if(Array.isArray(n))for(let o=0;oa+s,0),r=100*n/o;i.push(r)}return i})}getCalculatedRatios(){const e=this.w,n=e.globals,i=[];let o=0,r=0,a=0,s=0,l=[],c=.1,u=0;if(n.yRange=[],n.isMultipleYAxis)for(let d=0;d0){const d=(f,h)=>{const p=e.config.yaxis[e.globals.seriesYAxisReverseMap[h]];if(!p||p.logarithmic)return 0;const g=f<0?-1:1;return f=Math.abs(f),-g*f/i[h]};if(n.isMultipleYAxis){l=[];for(let f=0;f{const r=n.globals.seriesYAxisReverseMap[o];return n.config.yaxis[r]&&n.config.yaxis[r].logarithmic?i.map(a=>a===null?null:this.getLogVal(n.config.yaxis[r].logBase,a,o)):i}),n.globals.invalidLogScale?e:n.globals.seriesLog}getLogValAtSeriesIndex(e,n){if(e===null)return null;const i=this.w,o=i.globals.seriesYAxisReverseMap[n];return i.config.yaxis[o]&&i.config.yaxis[o].logarithmic?this.getLogVal(i.config.yaxis[o].logBase,e,n):e}getBaseLog(e,n){return Math.log(n)/Math.log(e)}getLogVal(e,n,i){if(n<=0)return 0;const o=this.w,r=o.globals.minYArr[i]===0?-1:this.getBaseLog(e,o.globals.minYArr[i]),s=(o.globals.maxYArr[i]===0?0:this.getBaseLog(e,o.globals.maxYArr[i]))-r;return(this.getBaseLog(e,n)-r)/s}getLogYRatios(e){const n=this.w,i=this.w.globals,o=i;return o.yLogRatio=e.slice(),o.logYRange=i.yRange.map((r,a)=>{const s=n.globals.seriesYAxisReverseMap[a];return n.config.yaxis[s]&&this.w.config.yaxis[s].logarithmic?(o.yLogRatio[a]=1/this.w.layout.gridHeight,1):i.yRange[a]}),o.invalidLogScale?e.slice():o.yLogRatio}static extendArrayProps(e,n,i){var o,r;return n!=null&&n.yaxis&&(n=e.extendYAxis(n,i)),n!=null&&n.annotations&&(n.annotations.yaxis&&(n=e.extendYAxisAnnotations(n)),(o=n==null?void 0:n.annotations)!=null&&o.xaxis&&(n=e.extendXAxisAnnotations(n)),(r=n==null?void 0:n.annotations)!=null&&r.points&&(n=e.extendPointAnnotations(n))),n}drawSeriesByGroup(e,n,i,o){const r=this.w,a=[];return e.series.length>0&&n.forEach(s=>{const l=[],c=[];e.i.forEach((u,d)=>{r.config.series[u].group===s&&(l.push(e.series[d]),c.push(u))}),l.length>0&&a.push(o.draw(l,i,c))}),a}};const Wt="http://www.w3.org/2000/svg";let Po=class Q5{constructor(e,n){typeof e=="object"?(this.x=e.x,this.y=e.y):(this.x=e||0,this.y=n||0)}transform(e){return e.apply(this)}clone(){return new Q5(this.x,this.y)}},tp=class np{constructor(e,n,i,o,r,a){this.a=e??1,this.b=n??0,this.c=i??0,this.d=o??1,this.e=r??0,this.f=a??0}rotate(e){const n=e*Math.PI/180,i=Math.cos(n),o=Math.sin(n);return this.multiply(new np(i,o,-o,i,0,0))}scale(e,n){return this.multiply(new np(e,0,0,n??e,0,0))}multiply(e){return new np(this.a*e.a+this.c*e.b,this.b*e.a+this.d*e.b,this.a*e.c+this.c*e.d,this.b*e.c+this.d*e.d,this.a*e.e+this.c*e.f+this.e,this.b*e.e+this.d*e.f+this.f)}apply(e){return new Po(this.a*e.x+this.c*e.y+this.e,this.b*e.x+this.d*e.y+this.f)}},eF=class{constructor(e,n,i,o){this.x=e,this.y=n,this.w=i,this.h=o,this.width=i,this.height=o,this.x2=e+i,this.y2=n+o}};/*! + `:`
${o[0]}: `+a+`
${o[1]}: `+s+"
"+(l?`
${o[2]}: `+l+"
":"")+`
${o[3]}: `+c+`
${o[4]}: `+u+"
"}_getViolinTooltip(e,n,i){var o,r,a;const s=(o=e.violinData.seriesViolinMin[n])==null?void 0:o[i],l=(r=e.violinData.seriesViolinMax[n])==null?void 0:r[i],c=((a=e.violinData.seriesViolinPoints[n])==null?void 0:a[i])||[],u=e.config.series[n].name||"series-"+(n+1);return`
${u}
Min: ${s}
Max: ${l}
Observations: ${c.length}
`}_getRaincloudTooltip(e,n,i){var o,r;const a=(o=e.violinData.seriesViolinSummary[n])==null?void 0:o[i];if(!a)return this._getViolinTooltip(e,n,i);const s=((r=e.violinData.seriesViolinPoints[n])==null?void 0:r[i])||[],l=e.config.series[n].name||"series-"+(n+1),c=g=>{if(!isFinite(g))return String(g);const m=Math.round(g);return Math.abs(g-m)<1e-6?String(m):String(Number(g.toFixed(2)))},[u,d,f,h,p]=a;return`
${l}
Whisker high: ${c(p)}
Q3: ${c(h)}
Median: ${c(f)}
Q1: ${c(d)}
Whisker low: ${c(u)}
Observations: ${s.length}
`}},mc=class{constructor(e){this.opts=e}init({responsiveOverride:e}){var n,i,o,r,a,s,l,c;let u=this.opts;const d=new ma,f=new _a(u);u=this.normalizeAliasedChartType(u),this.chartType=u.chart.type,u=this.extendYAxis(u),u=this.extendAnnotations(u);let h=d.init(),p={};if(u&&typeof u=="object"){let m=_a.forType(u);(n=u.chart.brush)!=null&&n.enabled&&(m=f.brush(m)),(o=(i=u.plotOptions)==null?void 0:i.line)!=null&&o.isSlopeChart&&(m=f.slope()),u.chart.stacked&&u.chart.stackType==="100%"&&(u=f.stacked100(u)),(a=(r=u.plotOptions)==null?void 0:r.bar)!=null&&a.isDumbbell&&u.chart.requestedType!=="dumbbell"&&(u=f.dumbbellSizing(u)),this.checkForDarkTheme(Ge.getApex()),this.checkForDarkTheme(u),u.xaxis=u.xaxis||Ge.getApex().xaxis||{},e||(u.xaxis.convertedCatToNumeric=!1),u=this.checkForCatToNumericXAxis(this.chartType,m,u),((s=u.chart.sparkline)!=null&&s.enabled||(c=(l=Ge.getApex().chart)==null?void 0:l.sparkline)!=null&&c.enabled)&&(m=f.sparkline(m)),p=we.extend(h,m)}const g=we.extend(p,Ge.getApex());return h=we.extend(g,u),h=this.handleUserInputErrors(h),h}normalizeAliasedChartType(e){if(!e||!e.chart)return e;const n=e.chart.type;return!n||!YC[n]||(e.chart.requestedType=n,n==="waffle"?(e.plotOptions=e.plotOptions||{},e.plotOptions.unit=e.plotOptions.unit||{},e.plotOptions.unit.layout==null&&(e.plotOptions.unit.layout="grid"),e.plotOptions.unit.shape==null&&(e.plotOptions.unit.shape="square"),e.chart.type="unit"):n==="funnel"||n==="pyramid"?(e.plotOptions=e.plotOptions||{},e.plotOptions.bar=e.plotOptions.bar||{},e.plotOptions.bar.isFunnel=!0,e.plotOptions.bar.horizontal=!0,e.chart.type="bar",n==="pyramid"?e.plotOptions.bar.isPyramid=!0:e.plotOptions.bar.isPyramid=!1):n==="gauge"?e.chart.type="radialBar":n==="waterfall"?(e.chart.stacked=!1,e.chart.type="rangeBar"):n==="dumbbell"?(e.plotOptions=e.plotOptions||{},e.plotOptions.bar=e.plotOptions.bar||{},e.plotOptions.bar.isDumbbell=!0,e.plotOptions.bar.horizontal==null&&(e.plotOptions.bar.horizontal=!0),e.chart.stacked=!1,e.chart.type="rangeBar"):n==="streamgraph"?(e.chart.stacked=!1,e.yaxis=e.yaxis||{},!Array.isArray(e.yaxis)&&e.yaxis.show==null&&(e.yaxis.show=!1),e.chart.type="rangeArea"):n==="histogram"?(e.xaxis=e.xaxis||{},e.xaxis.type==null&&(e.xaxis.type="numeric"),e.chart.type="bar"):n==="raincloud"&&(e.chart.type="violin")),e}checkForCatToNumericXAxis(e,n,i){var o,r,a,s,l;const c=new _a(i),u=(e==="bar"||e==="boxPlot"||e==="violin")&&((r=(o=i.plotOptions)==null?void 0:o.bar)==null?void 0:r.horizontal),d=e==="pie"||e==="polarArea"||e==="donut"||e==="radar"||e==="radialBar"||e==="heatmap"||e==="unit"||e==="sunburst",f=i.xaxis.type!=="datetime"&&i.xaxis.type!=="numeric",h=(e==="scatter"||e==="bubble")&&((l=(s=(a=i.plotOptions)==null?void 0:a.scatter)==null?void 0:s.jitter)==null?void 0:l.enabled),p=i.xaxis.tickPlacement?i.xaxis.tickPlacement:n.xaxis&&n.xaxis.tickPlacement;return!u&&!d&&!h&&f&&p!=="between"&&(i=c.convertCatToNumeric(i)),i}extendYAxis(e,n){const i=new ma;(typeof e.yaxis>"u"||!e.yaxis||Array.isArray(e.yaxis)&&e.yaxis.length===0)&&(e.yaxis={});const o=Ge.getApex();e.yaxis.constructor!==Array&&o.yaxis&&o.yaxis.constructor!==Array&&(e.yaxis=we.extend(e.yaxis,o.yaxis)),e.yaxis.constructor!==Array?e.yaxis=[we.extend(i.yAxis,e.yaxis)]:e.yaxis=we.extendArray(e.yaxis,i.yAxis);let r=!1;e.yaxis.forEach(s=>{s.logarithmic&&(r=!0)});let a=e.series;return n&&!a&&(a=n.config.series),r&&a.length!==e.yaxis.length&&a.length&&(e.yaxis=a.map((s,l)=>{if(s.name||(a[l].name=`series-${l+1}`),e.yaxis[l])return e.yaxis[l].seriesName=a[l].name,e.yaxis[l];{const c=we.extend(i.yAxis,e.yaxis[0]);return c.show=!1,c}})),r&&a.length>1&&a.length!==e.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),e}extendAnnotations(e){return typeof e.annotations>"u"&&(e.annotations={},e.annotations.yaxis=[],e.annotations.xaxis=[],e.annotations.points=[]),e=this.extendYAxisAnnotations(e),e=this.extendXAxisAnnotations(e),e=this.extendPointAnnotations(e),e}extendYAxisAnnotations(e){const n=new ma;return e.annotations.yaxis=we.extendArray(typeof e.annotations.yaxis<"u"?e.annotations.yaxis:[],n.yAxisAnnotation),e}extendXAxisAnnotations(e){const n=new ma;return e.annotations.xaxis=we.extendArray(typeof e.annotations.xaxis<"u"?e.annotations.xaxis:[],n.xAxisAnnotation),e}extendPointAnnotations(e){const n=new ma;return e.annotations.points=we.extendArray(typeof e.annotations.points<"u"?e.annotations.points:[],n.pointAnnotation),e}checkForDarkTheme(e){e.theme&&e.theme.mode==="dark"&&(e.tooltip||(e.tooltip={}),e.tooltip.theme!=="light"&&(e.tooltip.theme="dark"),e.chart.foreColor||(e.chart.foreColor="#f6f7f8"),e.theme.palette||(e.theme.palette="palette4"))}handleUserInputErrors(e){const n=e;if(n.tooltip.shared&&n.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if(n.chart.type==="bar"&&n.plotOptions.bar.horizontal){if(n.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");n.yaxis[0].reversed&&(n.yaxis[0].opposite=!0),n.xaxis.tooltip.enabled=!1,n.yaxis[0].tooltip.enabled=!1,n.chart.zoom.enabled=!1}return(n.chart.type==="bar"||n.chart.type==="rangeBar")&&n.tooltip.shared&&n.xaxis.crosshairs.width==="barWidth"&&n.series.length>1&&(n.xaxis.crosshairs.width="tickWidth"),(n.chart.type==="candlestick"||n.chart.type==="boxPlot")&&n.yaxis[0].reversed&&(console.warn(`Reversed y-axis in ${n.chart.type} chart is not supported.`),n.yaxis[0].reversed=!1),n}};const Cg=1.618,GC=[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],$g=[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24];let KC=class{initGlobalVars(e){e.series=[],e.seriesCandleO=[],e.seriesCandleH=[],e.seriesCandleM=[],e.seriesCandleL=[],e.seriesCandleC=[],e.seriesRangeStart=[],e.seriesRangeEnd=[],e.seriesRange=[],e.seriesPercent=[],e.seriesGoals=[],e.seriesX=[],e.seriesZ=[],e.seriesNames=[],e.seriesTotals=[],e.seriesLog=[],e.seriesColors=[],e.stackedSeriesTotals=[],e.seriesXvalues=[],e.seriesYvalues=[],e.dataWasParsed=!1,e.originalSeries=null,e.maxValsInArrayIndex=0,e.yValueDecimal=0,e.allSeriesHasEqualX=!0,e.hasNullValues=!1,e.invalidLogScale=!1,e.seriesRangeName={},e.labels=[],e.hasXaxisGroups=!1,e.groups=[],e.barGroups=[],e.lineGroups=[],e.areaGroups=[],e.hasSeriesGroups=!1,e.seriesGroups=[],e.categoryLabels=[],e.timescaleLabels=[],e.noLabelsProvided=!1,e.isXNumeric=!1,e.skipLastTimelinelabel=!1,e.skipFirstTimelinelabel=!1,e.isDataXYZ=!1,e.isMultiLineX=!1,e.isMultipleYAxis=!1,e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE,e.minYArr=[],e.maxYArr=[],e.maxX=-Number.MAX_VALUE,e.minX=Number.MAX_VALUE,e.initialMaxX=-Number.MAX_VALUE,e.initialMinX=Number.MAX_VALUE,e.maxDate=0,e.minDate=Number.MAX_VALUE,e.minZ=Number.MAX_VALUE,e.maxZ=-Number.MAX_VALUE,e.minXDiff=Number.MAX_VALUE,e.yAxisScale=[],e.xAxisScale=null,e.xAxisTicksPositions=[],e.xRange=0,e.yRange=[],e.zRange=0,e.dataPoints=0,e.xTickAmount=0,e.multiAxisTickAmount=0,e.disableZoomIn=!1,e.disableZoomOut=!1,e.yLabelsCoords=[],e.yTitleCoords=[],e.barPadForNumericAxis=0,e.padHorizontal=0,e.rotateXLabels=!1,e.overlappingXLabels=!1,e.radialSize=0,e.barHeight=0,e.barWidth=0,e.animationEnded=!1,e.isDestroyed=!1,e.bulkRevealScheduled=!1,e.resizeTimer=null,e.selectionResizeTimer=null,e.delayedElements=[],e.pointsArray=[],e.barCanvasCoords=null,e.activeRenderer=null,e.dataLabelsRects=[],e.lastDrawnDataLabelsIndexes=[],e.textRectsCache=new Map,e.domCache=new Map,e.dimensionCache={},e.cachedSelectors={},e.seriesNS||this._attachNamespaces(e)}_attachNamespaces(e){const n=(s,l,c=l)=>{Object.defineProperty(s,c,{get(){return e[l]},set(u){e[l]=u},enumerable:!0,configurable:!0})},i={};n(i,"series","data");for(const s of["seriesNames","seriesX","seriesZ","seriesXvalues","seriesYvalues","seriesGoals","seriesLog","seriesColors","seriesPercent","seriesTotals","stackedSeriesTotals","seriesCandleO","seriesCandleH","seriesCandleM","seriesCandleL","seriesCandleC","seriesRangeStart","seriesRangeEnd","seriesRange","seriesYAxisMap","seriesYAxisReverseMap","seriesGroups","barGroups","lineGroups","areaGroups","originalSeries","collapsedSeries","collapsedSeriesIndices","ancillaryCollapsedSeries","ancillaryCollapsedSeriesIndices","collapsingSeriesIndices","allSeriesCollapsed","risingSeries","previousPaths","ignoreYAxisIndexes","labels","categoryLabels","timescaleLabels","groups"])n(i,s);Object.defineProperty(e,"seriesNS",{value:i,writable:!1,enumerable:!1,configurable:!0});const o={};for(const s of["minX","maxX","initialMinX","initialMaxX","minY","maxY","minYArr","maxYArr","minZ","maxZ","minDate","maxDate","minXDiff","xRange","yRange","zRange","xAxisScale","yAxisScale","xAxisTicksPositions","xTickAmount","multiAxisTickAmount","dataPoints","maxValsInArrayIndex","isXNumeric","isMultipleYAxis","isMultiLineX","isDataXYZ","dataFormatXNumeric","allSeriesHasEqualX","hasNullValues","dataWasParsed","hasXaxisGroups","hasSeriesGroups","skipFirstTimelinelabel","skipLastTimelinelabel","yValueDecimal","invalidLogScale","noLabelsProvided"])n(o,s);Object.defineProperty(e,"axes",{value:o,writable:!1,enumerable:!1,configurable:!0});const r={};for(const s of["svgWidth","svgHeight","gridWidth","gridHeight","translateX","translateY","translateXAxisX","translateXAxisY","translateYAxisX","xAxisLabelsHeight","xAxisGroupLabelsHeight","xAxisLabelsWidth","yAxisLabelsWidth","yAxisWidths","yLabelsCoords","yTitleCoords","padHorizontal","barPadForNumericAxis","rotateXLabels","scaleX","scaleY","radialSize","defaultLabels","overlappingXLabels"])n(r,s);Object.defineProperty(e,"layout",{value:r,writable:!1,enumerable:!1,configurable:!0});const a={};for(const s of["domCache","dimensionCache","cachedSelectors","textRectsCache","pointsArray","dataLabelsRects","lastDrawnDataLabelsIndexes","delayedElements","resizeTimer","selectionResizeTimer","resizeObserver"])n(a,s);Object.defineProperty(e,"cache",{value:a,writable:!1,enumerable:!1,configurable:!0})}globalVars(e){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],fill:{colors:[]},radialNeedleRAF:null,unitGatherRAF:null,unitExitRAF:null,stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:e.markers.size,largestSize:0,batched:!1},LINE_HEIGHT_RATIO:Cg,axisCharts:!0,isSlopeChart:e.plotOptions.line.isSlopeChart,comboCharts:!1,initialConfig:null,initialSeries:[],tokenSurface:void 0,lastXAxis:[],lastYAxis:[],allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],collapsingSeriesIndices:[],risingSeries:[],ignoreYAxisIndexes:[],isDirty:!1,isExecCalled:!1,dataChanged:!1,resized:!1,columnSeries:null,yaxis:null,total:0,shouldAnimate:!0,previousPaths:[],prevPolarAngles:null,prevStreamFrame:null,streamScrolled:!1,prevChromeFrame:null,svgWidth:0,svgHeight:0,lastResizeSignature:null,defaultLabels:!1,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateYAxisX:[],yAxisWidths:[],tooltip:null,resizeObserver:null,locale:{},memory:{methodsToExec:[]},niceScaleAllowedMagMsd:GC,niceScaleDefaultTicks:$g,seriesYAxisMap:[],seriesYAxisReverseMap:[],noData:!1}}defineLazyInitialSeries(e){let n=[],i=null;Object.defineProperty(e,"initialSeries",{configurable:!0,enumerable:!0,get(){return i===null&&(i=we.clone(n)),i},set(o){n=we.copySeriesShallow(o),i=null,e._initialSeriesPeek=n}}),e._initialSeriesPeek=n}init(e){const n=this.globalVars(e);this.initGlobalVars(n),this.defineLazyInitialSeries(n);const i=we.extend({},e);return i.series=we.copySeriesShallow(e.series),n.initialConfig=i,n.initialSeries=e.series,n.lastXAxis=we.clone(n.initialConfig.xaxis),n.lastYAxis=we.clone(n.initialConfig.yaxis),n}},J5=class{constructor(e){this.opts=e}init(){const e=new mc(this.opts).init({responsiveOverride:!1}),n=new KC().init(e),i={config:e,globals:n,dom:{},interact:{zoomEnabled:e.chart.toolbar.autoSelected==="zoom"&&e.chart.toolbar.tools.zoom&&e.chart.zoom.enabled,panEnabled:e.chart.toolbar.autoSelected==="pan"&&e.chart.toolbar.tools.pan,selectionEnabled:e.chart.toolbar.autoSelected==="selection"&&e.chart.toolbar.tools.selection,measureEnabled:e.chart.toolbar.autoSelected==="measure"&&!!e.chart.toolbar.tools.measure&&!!(e.chart.measure&&e.chart.measure.enabled),zoomed:!1,selection:void 0,visibleXRange:void 0,selectedDataPoints:[],mousedown:!1,clientX:null,clientY:null,lastClientPosition:{},capturedSeriesIndex:-1,capturedDataPointIndex:-1,disableZoomIn:!1,disableZoomOut:!1,isTouchDevice:Ge.isBrowser()?"ontouchstart"in window||navigator.maxTouchPoints>0:!1},formatters:{xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,legendFormatter:void 0},candleData:{seriesCandleO:[],seriesCandleH:[],seriesCandleM:[],seriesCandleL:[],seriesCandleC:[],seriesBoxPoints:[]},rangeData:{seriesRangeStart:[],seriesRangeEnd:[],seriesRange:[]},violinData:{seriesViolinDensity:[],seriesViolinPoints:[],seriesViolinSummary:[],seriesViolinMin:[],seriesViolinMax:[]},histogramData:{edges:[],binWidth:0,counts:[],rule:"",capped:!1},waterfallData:{values:[],cumulative:[],kinds:[],geometry:null},dumbbellData:null,streamgraphData:null,labelData:{labels:[],categoryLabels:[],timescaleLabels:[],hasXaxisGroups:!1,groups:[],seriesGroups:[]},axisFlags:{isXNumeric:!1,dataFormatXNumeric:!1,isDataXYZ:!1,isRangeData:!1,isRangeBar:!1,isMultiLineX:!1,noLabelsProvided:!1,dataWasParsed:!1},seriesData:{series:[],seriesNames:[],seriesX:[],seriesZ:[],seriesColors:[],seriesGoals:[],stackedSeriesTotals:[],stackedSeriesTotalsByGroups:[],unitData:[]},layout:{gridHeight:0,gridWidth:0,translateX:0,translateY:0,translateXAxisX:0,translateXAxisY:0,rotateXLabels:!1,xAxisHeight:0,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yLabelsCoords:[],yTitleCoords:[],gridPad:{top:0,right:0,bottom:0,left:0}}};Object.defineProperty(n,"dom",{get(){return i.dom},set(o){i.dom=o},enumerable:!1,configurable:!0});for(const o of["xLabelFormatter","yLabelFormatters","xaxisTooltipFormatter","ttKeyFormatter","ttVal","ttZFormatter","legendFormatter"])Object.defineProperty(n,o,{get(){return i.formatters[o]},set(r){i.formatters[o]=r},enumerable:!1,configurable:!0});for(const o of["zoomEnabled","panEnabled","selectionEnabled","zoomed","selection","visibleXRange","selectedDataPoints","mousedown","clientX","clientY","lastClientPosition","capturedSeriesIndex","capturedDataPointIndex","disableZoomIn","disableZoomOut","isTouchDevice"])Object.defineProperty(n,o,{get(){return i.interact[o]},set(r){i.interact[o]=r},enumerable:!1,configurable:!0});for(const o of["gridHeight","gridWidth","translateX","translateY","translateXAxisX","translateXAxisY","rotateXLabels","xAxisHeight","xAxisLabelsHeight","xAxisGroupLabelsHeight","xAxisLabelsWidth","yLabelsCoords","yTitleCoords","gridPad"])Object.defineProperty(n,o,{get(){return i.layout[o]},set(r){i.layout[o]=r},enumerable:!1,configurable:!0});for(const o of["series","seriesNames","seriesX","seriesZ","seriesColors","seriesGoals","stackedSeriesTotals","stackedSeriesTotalsByGroups"])Object.defineProperty(n,o,{get(){return i.seriesData[o]},set(r){i.seriesData[o]=r},enumerable:!1,configurable:!0});for(const o of["isXNumeric","dataFormatXNumeric","isDataXYZ","isRangeData","isRangeBar","isMultiLineX","noLabelsProvided","dataWasParsed"])Object.defineProperty(n,o,{get(){return i.axisFlags[o]},set(r){i.axisFlags[o]=r},enumerable:!1,configurable:!0});for(const o of["labels","categoryLabels","timescaleLabels","hasXaxisGroups","groups","seriesGroups"])Object.defineProperty(n,o,{get(){return i.labelData[o]},set(r){i.labelData[o]=r},enumerable:!1,configurable:!0});for(const o of["seriesRangeStart","seriesRangeEnd","seriesRange"])Object.defineProperty(n,o,{get(){return i.rangeData[o]},set(r){i.rangeData[o]=r},enumerable:!1,configurable:!0});for(const o of["seriesCandleO","seriesCandleH","seriesCandleM","seriesCandleL","seriesCandleC"])Object.defineProperty(n,o,{get(){return i.candleData[o]},set(r){i.candleData[o]=r},enumerable:!1,configurable:!0});for(const o of["seriesViolinDensity","seriesViolinPoints","seriesViolinMin","seriesViolinMax"])Object.defineProperty(n,o,{get(){return i.violinData[o]},set(r){i.violinData[o]=r},enumerable:!1,configurable:!0});return i}},Xi=class{constructor(e){this.w=e}static checkComboSeries(e,n){let i=!1,o=0,r=0;return n===void 0&&(n="line"),e.length&&typeof e[0].type<"u"&&e.forEach(a=>{(a.type==="bar"||a.type==="column"||a.type==="candlestick"||a.type==="boxPlot"||a.type==="violin")&&o++,typeof a.type<"u"&&a.type!==n&&r++}),r>0&&(i=!0),{comboBarCount:o,comboCharts:i}}getStackedSeriesTotals(e=[]){const n=this.w,i=[];if(n.seriesData.series.length===0)return i;for(let o=0;on+i,0);{const n=this.w.seriesData.series[e];return Array.isArray(n)?n.reduce((i,o)=>i+o,0):n??0}}getStackedSeriesTotalsByGroups(){const e=this.w,n=[];return e.labelData.seriesGroups.forEach(i=>{const o=[];e.config.series.forEach((a,s)=>{i.indexOf(e.seriesData.seriesNames[s])>-1&&o.push(s)});const r=e.seriesData.series.map((a,s)=>o.indexOf(s)===-1?s:-1).filter(a=>a!==-1);n.push(this.getStackedSeriesTotals(r))}),n}setSeriesYAxisMappings(){const e=this.w.globals,n=this.w.config;let i=[];const o=[],r=[],a=this.w.seriesData.series.length>n.yaxis.length||n.yaxis.some(c=>Array.isArray(c.seriesName));n.series.forEach((c,u)=>{r.push(u),o.push(null)}),n.yaxis.forEach((c,u)=>{i[u]=[]});const s=[];n.yaxis.forEach((c,u)=>{let d=!1;if(c.seriesName){let f=[];Array.isArray(c.seriesName)?f=c.seriesName:f.push(c.seriesName),f.forEach(h=>{n.series.forEach((p,g)=>{if(p.name===h){let m=g;u===g||a?!a||r.indexOf(g)>-1?i[u].push([u,g]):console.warn("Series '"+p.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(i[g].push([g,u]),m=u),d=!0,m=r.indexOf(m),m!==-1&&r.splice(m,1)}})})}d||s.push(u)}),i=i.map(c=>{const u=[];return c.forEach(d=>{o[d[1]]=d[0],u.push(d[1])}),u});let l=n.yaxis.length-1;for(let c=0;c{i[l].push(c),o[c]=l}),e.seriesYAxisMap=i.map(c=>c),e.seriesYAxisReverseMap=o.map(c=>c),e.seriesYAxisMap.forEach((c,u)=>{c.forEach(d=>{if(n.series[d]&&n.series[d].group===void 0){const f=n.series[d];f.group="apexcharts-axis-".concat(u.toString())}})})}isSeriesNull(e=null){let n=[];const i=this.w.config.series;return e===null?n=i.filter(o=>o!==null):i[e]&&Array.isArray(i[e].data)?n=i[e].data.filter(o=>o!==null):n=i[e]!==null&&i[e]!==void 0?[i[e]]:[],n.length===0}seriesHaveSameValues(e){const n=this.w.seriesData.series[e];return Array.isArray(n)?n.every((i,o,r)=>i===r[0]):!0}getCategoryLabels(e){const n=this.w;let i=e.slice();return n.config.xaxis.convertedCatToNumeric&&(i=e.map(o=>n.config.xaxis.labels.formatter(o-n.globals.minX+1))),i}getLargestSeries(){const e=this.w;e.globals.maxValsInArrayIndex=e.seriesData.series.map(n=>n.length).indexOf(Math.max.apply(Math,e.seriesData.series.map(n=>n.length)))}getLargestMarkerSize(){const e=this.w;let n=0;return e.globals.markers.size.forEach(i=>{n=Math.max(n,i)}),e.config.markers.discrete&&e.config.markers.discrete.length&&e.config.markers.discrete.forEach(i=>{n=Math.max(n,i.size)}),n>0&&(e.config.markers.hover.size>0?n=e.config.markers.hover.size:n+=e.config.markers.hover.sizeOffset),e.globals.markers.largestSize=n,n}getSeriesTotals(){const e=this.w;e.globals.seriesTotals=e.seriesData.series.map(n=>{let i=0;if(Array.isArray(n))for(let o=0;o{let s=0;for(let l=0;le&&i.seriesData.seriesX[a][l]{const i=[];if(Array.isArray(n))for(let o=0;oa+s,0),r=100*n/o;i.push(r)}return i})}getCalculatedRatios(){const e=this.w,n=e.globals,i=[];let o=0,r=0,a=0,s=0,l=[],c=.1,u=0;if(n.yRange=[],n.isMultipleYAxis)for(let d=0;d0){const d=(f,h)=>{const p=e.config.yaxis[e.globals.seriesYAxisReverseMap[h]];if(!p||p.logarithmic)return 0;const g=f<0?-1:1;return f=Math.abs(f),-g*f/i[h]};if(n.isMultipleYAxis){l=[];for(let f=0;f{const r=n.globals.seriesYAxisReverseMap[o];return n.config.yaxis[r]&&n.config.yaxis[r].logarithmic?i.map(a=>a===null?null:this.getLogVal(n.config.yaxis[r].logBase,a,o)):i}),n.globals.invalidLogScale?e:n.globals.seriesLog}getLogValAtSeriesIndex(e,n){if(e===null)return null;const i=this.w,o=i.globals.seriesYAxisReverseMap[n];return i.config.yaxis[o]&&i.config.yaxis[o].logarithmic?this.getLogVal(i.config.yaxis[o].logBase,e,n):e}getBaseLog(e,n){return Math.log(n)/Math.log(e)}getLogVal(e,n,i){if(n<=0)return 0;const o=this.w,r=o.globals.minYArr[i]===0?-1:this.getBaseLog(e,o.globals.minYArr[i]),s=(o.globals.maxYArr[i]===0?0:this.getBaseLog(e,o.globals.maxYArr[i]))-r;return(this.getBaseLog(e,n)-r)/s}getLogYRatios(e){const n=this.w,i=this.w.globals,o=i;return o.yLogRatio=e.slice(),o.logYRange=i.yRange.map((r,a)=>{const s=n.globals.seriesYAxisReverseMap[a];return n.config.yaxis[s]&&this.w.config.yaxis[s].logarithmic?(o.yLogRatio[a]=1/this.w.layout.gridHeight,1):i.yRange[a]}),o.invalidLogScale?e.slice():o.yLogRatio}static extendArrayProps(e,n,i){var o,r;return n!=null&&n.yaxis&&(n=e.extendYAxis(n,i)),n!=null&&n.annotations&&(n.annotations.yaxis&&(n=e.extendYAxisAnnotations(n)),(o=n==null?void 0:n.annotations)!=null&&o.xaxis&&(n=e.extendXAxisAnnotations(n)),(r=n==null?void 0:n.annotations)!=null&&r.points&&(n=e.extendPointAnnotations(n))),n}drawSeriesByGroup(e,n,i,o){const r=this.w,a=[];return e.series.length>0&&n.forEach(s=>{const l=[],c=[];e.i.forEach((u,d)=>{r.config.series[u].group===s&&(l.push(e.series[d]),c.push(u))}),l.length>0&&a.push(o.draw(l,i,c))}),a}};const Wt="http://www.w3.org/2000/svg";let Po=class Q5{constructor(e,n){typeof e=="object"?(this.x=e.x,this.y=e.y):(this.x=e||0,this.y=n||0)}transform(e){return e.apply(this)}clone(){return new Q5(this.x,this.y)}},np=class ip{constructor(e,n,i,o,r,a){this.a=e??1,this.b=n??0,this.c=i??0,this.d=o??1,this.e=r??0,this.f=a??0}rotate(e){const n=e*Math.PI/180,i=Math.cos(n),o=Math.sin(n);return this.multiply(new ip(i,o,-o,i,0,0))}scale(e,n){return this.multiply(new ip(e,0,0,n??e,0,0))}multiply(e){return new ip(this.a*e.a+this.c*e.b,this.b*e.a+this.d*e.b,this.a*e.c+this.c*e.d,this.b*e.c+this.d*e.d,this.a*e.e+this.c*e.f+this.e,this.b*e.e+this.d*e.f+this.f)}apply(e){return new Po(this.a*e.x+this.c*e.y+this.e,this.b*e.x+this.d*e.y+this.f)}},eF=class{constructor(e,n,i,o){this.x=e,this.y=n,this.w=i,this.h=o,this.width=i,this.height=o,this.x2=e+i,this.y2=n+o}};/*! * Path morphing for SVG path animations * Based on svg.pathmorphing.js by Ulrich-Matthias Schäfer (MIT License) * Refactored to be standalone (no SVG.js dependency) @@ -517,12 +517,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho * points and tweens point-by-point with rotation-search * alignment; always smooth and non-self-intersecting, * at the cost of throwing away curve smoothness. - */function Od(t){if(!t||typeof t!="string")return[["M",0,0]];const e=[],n=/([MmLlHhVvCcSsQqTtAaZz])\s*/g,i=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;let o;const r=[],a=[];for(;(o=n.exec(t))!==null;)r.push(o[1]),a.push(o.index);for(let s=0;s{for(let a=1;ai&&(i=s),lo&&(o=l))}}),e===1/0?{x:0,y:0,width:0,height:0}:{x:e,y:n,width:i-e,height:o-n}}function tF(t){return t.map(e=>e.join(" ")).join(" ")}function eE(t){switch(t[0]){case"z":case"Z":t[0]="L",t[1]=this.start[0],t[2]=this.start[1];break;case"H":t[0]="L",t[2]=this.pos[1];break;case"V":t[0]="L",t[2]=t[1],t[1]=this.pos[0];break;case"T":t[0]="Q",t[3]=t[1],t[4]=t[2],t[1]=this.reflection[1],t[2]=this.reflection[0];break;case"S":t[0]="C",t[6]=t[4],t[5]=t[3],t[4]=t[2],t[3]=t[1],t[2]=this.reflection[1],t[1]=this.reflection[0];break}return t}function tE(t){var e=t.length;return this.pos=[t[e-2],t[e-1]],"SCQT".indexOf(t[0])!=-1&&(this.reflection=[2*this.pos[0]-t[e-4],2*this.pos[1]-t[e-3]]),t}function nE(t){var e,n=[t];switch(t[0]){case"M":return this.pos=this.start=[t[1],t[2]],n;case"L":t[5]=t[3]=t[1],t[6]=t[4]=t[2],t[1]=this.pos[0],t[2]=this.pos[1];break;case"Q":t[6]=t[4],t[5]=t[3],t[4]=t[4]*1/3+t[2]*2/3,t[3]=t[3]*1/3+t[1]*2/3,t[2]=this.pos[1]*1/3+t[2]*2/3,t[1]=this.pos[0]*1/3+t[1]*2/3;break;case"A":n=uye((e=this.pos)!=null?e:[],t),t=n[0];break}return t[0]="C",this.pos=[t[5],t[6]],this.reflection=[2*t[5]-t[3],2*t[6]-t[4]],n}function iE(t,e){if(e===!1)return!1;for(var n=e,i=t.length;n1&&(f=Math.sqrt(f),n=f*n,i=f*i),h=new tp().rotate(o).scale(1/n,1/i).rotate(-o),c=c.transform(h),u=u.transform(h),p=[u.x-c.x,u.y-c.y],m=p[0]*p[0]+p[1]*p[1],g=Math.sqrt(m),p[0]/=g,p[1]/=g,v=m<4?Math.sqrt(1-m/4):0,r===a&&(v*=-1),b=new Po((u.x+c.x)/2+v*-p[1],(u.y+c.y)/2+v*p[0]),y=new Po(c.x-b.x,c.y-b.y),w=new Po(u.x-b.x,u.y-b.y),x=Math.acos(y.x/Math.sqrt(y.x*y.x+y.y*y.y)),y.y<0&&(x*=-1),$=Math.acos(w.x/Math.sqrt(w.x*w.x+w.y*w.y)),w.y<0&&($*=-1),a&&x>$&&($+=2*Math.PI),!a&&x<$&&($-=2*Math.PI),_=Math.ceil(Math.abs(x-$)*2/Math.PI),O=[],T=x,S=($-x)/_,P=4*Math.tan(S/4)/3,E=0;E<=_;E++)I=Math.cos(T),M=Math.sin(T),k=new Po(b.x+I,b.y+M),O[E]=[new Po(k.x+P*M,k.y-P*I),k,new Po(k.x-P*M,k.y+P*I)],T+=S;for(O[0][0]=O[0][1].clone(),O[O.length-1][2]=O[O.length-1][1].clone(),h=new tp().rotate(o).scale(n,i).rotate(-o),E=0,R=O.length;E=a)break}c>16&255,i>>8&255,i&255,1]}const e=t.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/);return e?[+e[1],+e[2],+e[3],e[4]!==void 0?+e[4]:1]:null}function gye(t,e,n){return`rgba(${Math.round(t[0]+(e[0]-t[0])*n)},${Math.round(t[1]+(e[1]-t[1])*n)},${Math.round(t[2]+(e[2]-t[2])*n)},${t[3]+(e[3]-t[3])*n})`}let rF=class aF{constructor(e,n,i){this.el=e,this.duration=n??300,this.delay=i||0,this._attrTarget=null,this._plotTarget=null,this._plotSnap=null,this._plotAlgorithm="commands",this._afterCb=null,this._duringCb=null,this._easing=null,this._next=null,this._root=null,this._scheduled=!1}ease(e){return typeof e=="function"&&(this._easing=e),this._schedule(),this}attr(e){return this._attrTarget=e,this._schedule(),this}plot(e,n,i){return this._plotTarget=e,n&&(this._plotAlgorithm=n),this._plotSnap=i||null,this._schedule(),this}after(e){return this._afterCb=e,this._schedule(),this}during(e){return this._duringCb=e,this._schedule(),this}animate(e,n){const i=new aF(this.el,e,n);return this._next=i,i._root=this._root||this,i}_schedule(){const e=this._root||this;e._scheduled||(e._scheduled=!0,queueMicrotask(()=>e._executeChain()))}_executeChain(){const e=[];let n=this;for(;n;)e.push(n),n=n._next;let i=0;e.forEach(o=>{i+=o.delay,o._execute(i),i+=o.duration})}_execute(e){const n=this.el,i=this.duration;if(i<=1){const r=()=>{this._attrTarget&&n.attr(this._attrTarget),this._plotTarget&&n.plot(this._plotSnap||this._plotTarget),this._afterCb&&this._afterCb.call(n)};e>0?setTimeout(r,e):r();return}const o=()=>{const r={},a={},s={};if(this._attrTarget)for(const f of Object.keys(this._attrTarget)){const h=n.attr(f);r[f]=h;const p=rE(h),g=rE(String(this._attrTarget[f]));p&&g&&(a[f]=p,s[f]=g)}let l=null;if(this._plotTarget){const f=n.attr("d")||"";try{l=this._plotAlgorithm==="polygons"?hye(f,this._plotTarget):nF(f,this._plotTarget)}catch{l=null}}const c=performance.now(),u=this._easing||oF,d=f=>{const h=f-c,p=Math.min(h/i,1),g=u(p);if(this._attrTarget)if(p>=1)n.attr(this._attrTarget);else{const m={};for(const v of Object.keys(this._attrTarget))if(a[v]&&s[v])m[v]=gye(a[v],s[v],g);else{const b=parseFloat(r[v]),y=parseFloat(this._attrTarget[v]);!isNaN(b)&&!isNaN(y)&&(m[v]=b+(y-b)*g)}n.attr(m)}l&&p<1&&n.attr("d",l(g)),this._duringCb&&this._duringCb(g),p<1?nt.requestAnimationFrame(d):(this._plotTarget&&n.attr("d",this._plotSnap||this._plotTarget),this._afterCb&&this._afterCb.call(n))};nt.requestAnimationFrame(d)};e>0?setTimeout(o,e):o()}};function sF(t){t.prototype.animate=function(e,n){return new rF(this,e,n)}}function lF(t){return-Math.cos(t*Math.PI)/2+.5}function mye(t,e,n,i){t=Math.min(Math.max(t,0),1),n=Math.min(Math.max(n,0),1);const o=3*t,r=3*(n-t)-o,a=1-o-r,s=3*e,l=3*(i-e)-s,c=1-s-l,u=h=>((a*h+r)*h+o)*h,d=h=>((c*h+l)*h+s)*h,f=h=>{let p=0,g=1,m=h;if(mg)return g;for(;pv?p=m:g=m,m=(p+g)/2}return m};return h=>h<=0?0:h>=1?1:d(f(h))}const xi=new Map,vye=t=>t;xi.set("linear",vye);xi.set("easeInOutSine",lF);xi.set("easeInSine",t=>1-Math.cos(t*Math.PI/2));xi.set("easeOutSine",t=>Math.sin(t*Math.PI/2));xi.set("easeInQuad",t=>t*t);xi.set("easeOutQuad",t=>1-(1-t)*(1-t));xi.set("easeInOutQuad",t=>t<.5?2*t*t:1-Math.pow(-2*t+2,2)/2);xi.set("easeInCubic",t=>t*t*t);xi.set("easeOutCubic",t=>1-Math.pow(1-t,3));xi.set("easeInOutCubic",t=>t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2);xi.set("easeOutBack",t=>1+2.70158*Math.pow(t-1,3)+1.70158*Math.pow(t-1,2));xi.set("easeInOutBack",t=>{const n=2.5949095;return t<.5?Math.pow(2*t,2)*((n+1)*2*t-n)/2:(Math.pow(2*t-2,2)*((n+1)*(t*2-2)+n)+2)/2});function bye(t,e){typeof t=="string"&&t&&typeof e=="function"&&xi.set(t,e)}function yye(t){return Array.isArray(t)&&t.length===4&&t.every(e=>typeof e=="number")}function $g(t){return typeof t=="function"?aE(t):yye(t)?mye(t[0],t[1],t[2],t[3]):typeof t=="string"&&xi.has(t)?aE(xi.get(t)):lF}function aE(t){return e=>{const n=t(e);return typeof n=="number"&&isFinite(n)?n:e}}const f0="http://www.w3.org/2000/svg";function sE(t){return 1-Math.pow(1-t,3)}function xye(t){return 1+2.70158*Math.pow(t-1,3)+1.70158*Math.pow(t-1,2)}let h0=null;function cF(){if(!Ge.isBrowser())return!1;try{return h0||(h0=window.matchMedia("(prefers-reduced-motion: reduce)")),!!h0.matches}catch{return!1}}function Ag(t,e,n){if(!Ge.isBrowser()||n.globals.dataChanged||n.globals.resized)return!1;const i=n.config.chart.animations;if(!i||i.enabled===!1)return!1;const o=n.config.chart.type;if(o!=="line"&&o!=="area"&&o!=="rangeArea"||!(n.layout.gridWidth>0))return!1;const r=(i.speed||800)*2,a=Math.max(0,Math.min(1,e/n.layout.gridWidth)),l=(1-Math.cbrt(1-a))*r,u=t.node.style;u.opacity="0";let d=null;const f=h=>{d===null&&(d=h),h-d>=l?u.opacity="":nt.requestAnimationFrame(f)};return nt.requestAnimationFrame(f),!0}function Ox(t){const e=t.config.chart.animations;e&&(e.respectReducedMotion!==!1&&cF()&&(e.enabled=!1,e.dynamicAnimation&&(e.dynamicAnimation.enabled=!1)),pye($g(e.easing)))}function uF(t){const e=t.style,n=t.index||0,i=typeof t.baseDelay=="number"?t.baseDelay:40,o=t.row||0,r=t.col||0,a=t.groupIndex||0,s=t.perGroup||1,l=t.centerDistance||0;switch(e){case"none":return 0;case"diagonal":return(o+r)*i;case"group":return a*i+n%s*(i/4);case"centroid":return l*i*(n+1);case"sequential":default:return n*i}}let gv=class{constructor(e,n){this.w=e,this.ctx=n}animateLine(e,n,i,o){e.attr(n).animate(o).attr(i)}animateMarker(e,n,i,o){e.attr({opacity:0}).animate(n).attr({opacity:1}).after(()=>{o()})}animatePop(e,{speed:n,delay:i=0,onComplete:o}){const r=this.w;if(!Ge.isBrowser()||!r.globals.shouldAnimate||n<1){o&&o();return}const s=e.node.style;s.transformBox="fill-box",s.transformOrigin="center",s.transform="scale(0)",s.opacity="0";const l=performance.now()+i,c=u=>{if(r.globals.isDestroyed)return;const d=Math.max(0,Math.min(1,(u-l)/n));s.transform=`scale(${xye(d)})`,s.opacity=String(Math.min(1,d*2)),d<1?nt.requestAnimationFrame(c):(s.transform="",s.transformOrigin="",s.transformBox="",s.opacity="",o&&o())};nt.requestAnimationFrame(c)}animateRect(e,n,i,o,r,a=0){e.attr(n).animate(o,a).attr(i).after(()=>r())}animatePathsGradually(e){const{el:n,realIndex:i,j:o,fill:r,pathFrom:a,pathTo:s,pathToInterp:l,speed:c,delay:u,scrollMorph:d}=e,f=this,h=this.w;let p=0;h.config.chart.animations.animateGradually.enabled&&(p=h.config.chart.animations.animateGradually.delay),h.config.chart.animations.dynamicAnimation.enabled&&h.globals.dataChanged&&h.config.chart.type!=="bar"&&(p=0),f.morphSVG(n,i,o,h.config.chart.type==="line"&&!h.globals.comboCharts?"stroke":r,a,s,c,u*p,d,l)}revealBulk(e){const n=this.w;if(e.node.classList.add("apexcharts-element-hidden"),n.globals.delayedElements.push({el:e.node}),!Ge.isBrowser()||!n.globals.shouldAnimate){this.animationCompleted(e);return}n.globals.bulkRevealScheduled||(n.globals.bulkRevealScheduled=!0,nt.requestAnimationFrame(()=>{n.globals.isDestroyed||(n.globals.bulkRevealScheduled=!1,this.animationCompleted(e))}))}showDelayedElements(){this.w.globals.delayedElements.forEach(e=>{if(e.holdUntilComplete&&!this.w.globals.animationEnded)return;const n=e.el;n.classList.remove("apexcharts-element-hidden"),n.classList.add("apexcharts-hidden-element-shown")})}animationCompleted(e){const n=this.w;n.globals.animationEnded||(n.globals.animationEnded=!0,this.showDelayedElements(),typeof n.config.chart.events.animationEnd=="function"&&n.config.chart.events.animationEnd(this.ctx,{el:e,w:n}))}animateDraw(e,{realIndex:n,j:i,isFill:o,isLast:r,speed:a,delay:s,mask:l}){const c=this.w,u=this,d=()=>{r&&c.globals.shouldAnimate&&u.animationCompleted(e),u.showDelayedElements()};if(!Ge.isBrowser()||!c.globals.shouldAnimate||a<1){d();return}const f=e.node,h=()=>{const m=l&&l.type==="radial",v=c.layout.gridWidth+4*2,b=l&&l.cx||0,y=l&&l.cy||0,w=(l&&l.r||c.layout.gridWidth/2)+4,x=`apexDrawMask${c.globals.cuid}-${n}-${i??0}-${o?"f":"s"}`,$=nt.createElementNS(f0,"mask");$.setAttribute("id",x),$.setAttribute("maskUnits","userSpaceOnUse");let S;if(m){const O=w;$.setAttribute("x",String(b-O)),$.setAttribute("y",String(y-O)),$.setAttribute("width",String(O*2)),$.setAttribute("height",String(O*2)),S=nt.createElementNS(f0,"circle"),S.setAttribute("cx",String(b)),S.setAttribute("cy",String(y)),S.setAttribute("r","0"),S.setAttribute("fill","#fff")}else $.setAttribute("x",String(-4)),$.setAttribute("y",String(-4)),$.setAttribute("width",String(v)),$.setAttribute("height",String(c.layout.gridHeight+4*2)),S=nt.createElementNS(f0,"rect"),S.setAttribute("x",String(-4)),S.setAttribute("y",String(-4)),S.setAttribute("width","0"),S.setAttribute("height",String(c.layout.gridHeight+4*2)),S.setAttribute("fill","#fff");$.appendChild(S),c.dom.elDefs.node.appendChild($),f.setAttribute("mask",`url(#${x})`);const _=performance.now()+(s||0),P=O=>{if(c.globals.isDestroyed)return;const T=Math.max(0,Math.min(1,(O-_)/a)),M=sE(T);m?S.setAttribute("r",String(M*w)):S.setAttribute("width",String(M*v)),T<1?nt.requestAnimationFrame(P):(f.removeAttribute("mask"),$.parentNode&&$.parentNode.removeChild($),d())};nt.requestAnimationFrame(P)},p=g=>{f.setAttribute("stroke-dasharray",String(g)),f.setAttribute("stroke-dashoffset",String(g));const m=performance.now()+(s||0),v=b=>{if(c.globals.isDestroyed)return;const y=Math.max(0,Math.min(1,(b-m)/a));f.setAttribute("stroke-dashoffset",String(g*(1-sE(y)))),y<1?nt.requestAnimationFrame(v):(f.removeAttribute("stroke-dasharray"),f.removeAttribute("stroke-dashoffset"),d())};nt.requestAnimationFrame(v)};nt.requestAnimationFrame(()=>{if(c.globals.isDestroyed)return;if(o){h();return}const g=f.getAttribute("stroke-dasharray");if(!!g&&g!=="0"&&g!==""){h();return}let v=0;try{typeof f.getTotalLength=="function"&&(v=f.getTotalLength())}catch{v=0}if(!v){d();return}p(v)})}morphSVG(e,n,i,o,r,a,s,l,c,u){var d,f;const h=this.w;r||(r=e.attr("pathFrom")),a||(a=e.attr("pathTo"));const p=()=>(h.config.chart.type==="radar"&&(s=1),`M 0 ${h.layout.gridHeight}`);(!r||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=p()),(!a.trim()||a.indexOf("undefined")>-1||a.indexOf("NaN")>-1)&&(a=p(),u=void 0),u&&(!u.trim()||u.indexOf("undefined")>-1||u.indexOf("NaN")>-1)&&(u=void 0),h.globals.shouldAnimate||(s=1);const m=((f=(d=this.ctx)==null?void 0:d.morphTypeChange)==null?void 0:f.isActive())===!0?"polygons":"commands";let v=null;if(h.globals.dataChanged){const y=h.config.chart.animations.dynamicAnimation.easing;y!=null?v=$g(y):c&&(v=$g("linear"))}const b=e.plot(r).animate(s,l);v&&b.ease(v),b.plot(u||a,m,u?a:void 0).after(()=>{if(we.isNumber(i)){const y=h.seriesData.series[h.globals.maxValsInArrayIndex];y&&i===y.length-2&&h.globals.shouldAnimate&&this.animationCompleted(e)}else o!=="none"&&h.globals.shouldAnimate&&(!h.globals.comboCharts&&n===h.seriesData.series.length-1||h.globals.comboCharts)&&this.animationCompleted(e);this.showDelayedElements()})}};const lE={lighten:.15,darken:.35};let zi=class Tl{constructor(e){this.w=e}static isSliceChart(e){const n=e.config.chart.type;return n==="pie"||n==="donut"||n==="polarArea"}static hoverOutlineOwnsHoverState(e){var n;return Tl.isSliceChart(e)&&e.config.states.hover.filter.type!=="none"&&((n=e.config.plotOptions.pie.hoverOutline)==null?void 0:n.show)===!0}static sliceOffsetOwnsActiveState(e){return Tl.isSliceChart(e)&&e.config.chart.type!=="polarArea"&&e.config.plotOptions.pie.expandOnClick===!0&&e.config.plotOptions.pie.expandOffset>0&&!Tl.drilldownBlocksSliceOffset(e)}static drilldownBlocksSliceOffset(e){var n;return Tl.isSliceChart(e)&&((n=e.config.drilldown)==null?void 0:n.enabled)===!0}getDefaultFilter(e,n){const i=this.w;e.unfilter&&e.unfilter(!0),i.config.chart.dropShadow.enabled&&this.dropShadow(e,i.config.chart.dropShadow,n)}applyFilter(e,n,i,o){var r,a,s;const l=this.w;if(e.unfilter&&e.unfilter(!0),i==="none"){this.getDefaultFilter(e,n);return}const c=l.config.chart.dropShadow,u=i==="lighten"?lE.lighten:lE.darken,d=Math.max(0,Math.min(1,typeof o=="number"?o:u)),f=1-d,h=i==="lighten"?d:0;e.filterWith&&(e.filterWith(p=>{p.colorMatrix({type:"matrix",values:` + */function Ed(t){if(!t||typeof t!="string")return[["M",0,0]];const e=[],n=/([MmLlHhVvCcSsQqTtAaZz])\s*/g,i=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;let o;const r=[],a=[];for(;(o=n.exec(t))!==null;)r.push(o[1]),a.push(o.index);for(let s=0;s{for(let a=1;ai&&(i=s),lo&&(o=l))}}),e===1/0?{x:0,y:0,width:0,height:0}:{x:e,y:n,width:i-e,height:o-n}}function tF(t){return t.map(e=>e.join(" ")).join(" ")}function eE(t){switch(t[0]){case"z":case"Z":t[0]="L",t[1]=this.start[0],t[2]=this.start[1];break;case"H":t[0]="L",t[2]=this.pos[1];break;case"V":t[0]="L",t[2]=t[1],t[1]=this.pos[0];break;case"T":t[0]="Q",t[3]=t[1],t[4]=t[2],t[1]=this.reflection[1],t[2]=this.reflection[0];break;case"S":t[0]="C",t[6]=t[4],t[5]=t[3],t[4]=t[2],t[3]=t[1],t[2]=this.reflection[1],t[1]=this.reflection[0];break}return t}function tE(t){var e=t.length;return this.pos=[t[e-2],t[e-1]],"SCQT".indexOf(t[0])!=-1&&(this.reflection=[2*this.pos[0]-t[e-4],2*this.pos[1]-t[e-3]]),t}function nE(t){var e,n=[t];switch(t[0]){case"M":return this.pos=this.start=[t[1],t[2]],n;case"L":t[5]=t[3]=t[1],t[6]=t[4]=t[2],t[1]=this.pos[0],t[2]=this.pos[1];break;case"Q":t[6]=t[4],t[5]=t[3],t[4]=t[4]*1/3+t[2]*2/3,t[3]=t[3]*1/3+t[1]*2/3,t[2]=this.pos[1]*1/3+t[2]*2/3,t[1]=this.pos[0]*1/3+t[1]*2/3;break;case"A":n=uye((e=this.pos)!=null?e:[],t),t=n[0];break}return t[0]="C",this.pos=[t[5],t[6]],this.reflection=[2*t[5]-t[3],2*t[6]-t[4]],n}function iE(t,e){if(e===!1)return!1;for(var n=e,i=t.length;n1&&(f=Math.sqrt(f),n=f*n,i=f*i),h=new np().rotate(o).scale(1/n,1/i).rotate(-o),c=c.transform(h),u=u.transform(h),p=[u.x-c.x,u.y-c.y],m=p[0]*p[0]+p[1]*p[1],g=Math.sqrt(m),p[0]/=g,p[1]/=g,v=m<4?Math.sqrt(1-m/4):0,r===a&&(v*=-1),b=new Po((u.x+c.x)/2+v*-p[1],(u.y+c.y)/2+v*p[0]),y=new Po(c.x-b.x,c.y-b.y),w=new Po(u.x-b.x,u.y-b.y),x=Math.acos(y.x/Math.sqrt(y.x*y.x+y.y*y.y)),y.y<0&&(x*=-1),$=Math.acos(w.x/Math.sqrt(w.x*w.x+w.y*w.y)),w.y<0&&($*=-1),a&&x>$&&($+=2*Math.PI),!a&&x<$&&($-=2*Math.PI),_=Math.ceil(Math.abs(x-$)*2/Math.PI),O=[],T=x,S=($-x)/_,P=4*Math.tan(S/4)/3,E=0;E<=_;E++)I=Math.cos(T),M=Math.sin(T),k=new Po(b.x+I,b.y+M),O[E]=[new Po(k.x+P*M,k.y-P*I),k,new Po(k.x-P*M,k.y+P*I)],T+=S;for(O[0][0]=O[0][1].clone(),O[O.length-1][2]=O[O.length-1][1].clone(),h=new np().rotate(o).scale(n,i).rotate(-o),E=0,R=O.length;E=a)break}c>16&255,i>>8&255,i&255,1]}const e=t.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/);return e?[+e[1],+e[2],+e[3],e[4]!==void 0?+e[4]:1]:null}function gye(t,e,n){return`rgba(${Math.round(t[0]+(e[0]-t[0])*n)},${Math.round(t[1]+(e[1]-t[1])*n)},${Math.round(t[2]+(e[2]-t[2])*n)},${t[3]+(e[3]-t[3])*n})`}let rF=class aF{constructor(e,n,i){this.el=e,this.duration=n??300,this.delay=i||0,this._attrTarget=null,this._plotTarget=null,this._plotSnap=null,this._plotAlgorithm="commands",this._afterCb=null,this._duringCb=null,this._easing=null,this._next=null,this._root=null,this._scheduled=!1}ease(e){return typeof e=="function"&&(this._easing=e),this._schedule(),this}attr(e){return this._attrTarget=e,this._schedule(),this}plot(e,n,i){return this._plotTarget=e,n&&(this._plotAlgorithm=n),this._plotSnap=i||null,this._schedule(),this}after(e){return this._afterCb=e,this._schedule(),this}during(e){return this._duringCb=e,this._schedule(),this}animate(e,n){const i=new aF(this.el,e,n);return this._next=i,i._root=this._root||this,i}_schedule(){const e=this._root||this;e._scheduled||(e._scheduled=!0,queueMicrotask(()=>e._executeChain()))}_executeChain(){const e=[];let n=this;for(;n;)e.push(n),n=n._next;let i=0;e.forEach(o=>{i+=o.delay,o._execute(i),i+=o.duration})}_execute(e){const n=this.el,i=this.duration;if(i<=1){const r=()=>{this._attrTarget&&n.attr(this._attrTarget),this._plotTarget&&n.plot(this._plotSnap||this._plotTarget),this._afterCb&&this._afterCb.call(n)};e>0?setTimeout(r,e):r();return}const o=()=>{const r={},a={},s={};if(this._attrTarget)for(const f of Object.keys(this._attrTarget)){const h=n.attr(f);r[f]=h;const p=rE(h),g=rE(String(this._attrTarget[f]));p&&g&&(a[f]=p,s[f]=g)}let l=null;if(this._plotTarget){const f=n.attr("d")||"";try{l=this._plotAlgorithm==="polygons"?hye(f,this._plotTarget):nF(f,this._plotTarget)}catch{l=null}}const c=performance.now(),u=this._easing||oF,d=f=>{const h=f-c,p=Math.min(h/i,1),g=u(p);if(this._attrTarget)if(p>=1)n.attr(this._attrTarget);else{const m={};for(const v of Object.keys(this._attrTarget))if(a[v]&&s[v])m[v]=gye(a[v],s[v],g);else{const b=parseFloat(r[v]),y=parseFloat(this._attrTarget[v]);!isNaN(b)&&!isNaN(y)&&(m[v]=b+(y-b)*g)}n.attr(m)}l&&p<1&&n.attr("d",l(g)),this._duringCb&&this._duringCb(g),p<1?nt.requestAnimationFrame(d):(this._plotTarget&&n.attr("d",this._plotSnap||this._plotTarget),this._afterCb&&this._afterCb.call(n))};nt.requestAnimationFrame(d)};e>0?setTimeout(o,e):o()}};function sF(t){t.prototype.animate=function(e,n){return new rF(this,e,n)}}function lF(t){return-Math.cos(t*Math.PI)/2+.5}function mye(t,e,n,i){t=Math.min(Math.max(t,0),1),n=Math.min(Math.max(n,0),1);const o=3*t,r=3*(n-t)-o,a=1-o-r,s=3*e,l=3*(i-e)-s,c=1-s-l,u=h=>((a*h+r)*h+o)*h,d=h=>((c*h+l)*h+s)*h,f=h=>{let p=0,g=1,m=h;if(mg)return g;for(;pv?p=m:g=m,m=(p+g)/2}return m};return h=>h<=0?0:h>=1?1:d(f(h))}const xi=new Map,vye=t=>t;xi.set("linear",vye);xi.set("easeInOutSine",lF);xi.set("easeInSine",t=>1-Math.cos(t*Math.PI/2));xi.set("easeOutSine",t=>Math.sin(t*Math.PI/2));xi.set("easeInQuad",t=>t*t);xi.set("easeOutQuad",t=>1-(1-t)*(1-t));xi.set("easeInOutQuad",t=>t<.5?2*t*t:1-Math.pow(-2*t+2,2)/2);xi.set("easeInCubic",t=>t*t*t);xi.set("easeOutCubic",t=>1-Math.pow(1-t,3));xi.set("easeInOutCubic",t=>t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2);xi.set("easeOutBack",t=>1+2.70158*Math.pow(t-1,3)+1.70158*Math.pow(t-1,2));xi.set("easeInOutBack",t=>{const n=2.5949095;return t<.5?Math.pow(2*t,2)*((n+1)*2*t-n)/2:(Math.pow(2*t-2,2)*((n+1)*(t*2-2)+n)+2)/2});function bye(t,e){typeof t=="string"&&t&&typeof e=="function"&&xi.set(t,e)}function yye(t){return Array.isArray(t)&&t.length===4&&t.every(e=>typeof e=="number")}function Ag(t){return typeof t=="function"?aE(t):yye(t)?mye(t[0],t[1],t[2],t[3]):typeof t=="string"&&xi.has(t)?aE(xi.get(t)):lF}function aE(t){return e=>{const n=t(e);return typeof n=="number"&&isFinite(n)?n:e}}const f0="http://www.w3.org/2000/svg";function sE(t){return 1-Math.pow(1-t,3)}function xye(t){return 1+2.70158*Math.pow(t-1,3)+1.70158*Math.pow(t-1,2)}let h0=null;function cF(){if(!Ge.isBrowser())return!1;try{return h0||(h0=window.matchMedia("(prefers-reduced-motion: reduce)")),!!h0.matches}catch{return!1}}function _g(t,e,n){if(!Ge.isBrowser()||n.globals.dataChanged||n.globals.resized)return!1;const i=n.config.chart.animations;if(!i||i.enabled===!1)return!1;const o=n.config.chart.type;if(o!=="line"&&o!=="area"&&o!=="rangeArea"||!(n.layout.gridWidth>0))return!1;const r=(i.speed||800)*2,a=Math.max(0,Math.min(1,e/n.layout.gridWidth)),l=(1-Math.cbrt(1-a))*r,u=t.node.style;u.opacity="0";let d=null;const f=h=>{d===null&&(d=h),h-d>=l?u.opacity="":nt.requestAnimationFrame(f)};return nt.requestAnimationFrame(f),!0}function Ox(t){const e=t.config.chart.animations;e&&(e.respectReducedMotion!==!1&&cF()&&(e.enabled=!1,e.dynamicAnimation&&(e.dynamicAnimation.enabled=!1)),pye(Ag(e.easing)))}function uF(t){const e=t.style,n=t.index||0,i=typeof t.baseDelay=="number"?t.baseDelay:40,o=t.row||0,r=t.col||0,a=t.groupIndex||0,s=t.perGroup||1,l=t.centerDistance||0;switch(e){case"none":return 0;case"diagonal":return(o+r)*i;case"group":return a*i+n%s*(i/4);case"centroid":return l*i*(n+1);case"sequential":default:return n*i}}let mv=class{constructor(e,n){this.w=e,this.ctx=n}animateLine(e,n,i,o){e.attr(n).animate(o).attr(i)}animateMarker(e,n,i,o){e.attr({opacity:0}).animate(n).attr({opacity:1}).after(()=>{o()})}animatePop(e,{speed:n,delay:i=0,onComplete:o}){const r=this.w;if(!Ge.isBrowser()||!r.globals.shouldAnimate||n<1){o&&o();return}const s=e.node.style;s.transformBox="fill-box",s.transformOrigin="center",s.transform="scale(0)",s.opacity="0";const l=performance.now()+i,c=u=>{if(r.globals.isDestroyed)return;const d=Math.max(0,Math.min(1,(u-l)/n));s.transform=`scale(${xye(d)})`,s.opacity=String(Math.min(1,d*2)),d<1?nt.requestAnimationFrame(c):(s.transform="",s.transformOrigin="",s.transformBox="",s.opacity="",o&&o())};nt.requestAnimationFrame(c)}animateRect(e,n,i,o,r,a=0){e.attr(n).animate(o,a).attr(i).after(()=>r())}animatePathsGradually(e){const{el:n,realIndex:i,j:o,fill:r,pathFrom:a,pathTo:s,pathToInterp:l,speed:c,delay:u,scrollMorph:d}=e,f=this,h=this.w;let p=0;h.config.chart.animations.animateGradually.enabled&&(p=h.config.chart.animations.animateGradually.delay),h.config.chart.animations.dynamicAnimation.enabled&&h.globals.dataChanged&&h.config.chart.type!=="bar"&&(p=0),f.morphSVG(n,i,o,h.config.chart.type==="line"&&!h.globals.comboCharts?"stroke":r,a,s,c,u*p,d,l)}revealBulk(e){const n=this.w;if(e.node.classList.add("apexcharts-element-hidden"),n.globals.delayedElements.push({el:e.node}),!Ge.isBrowser()||!n.globals.shouldAnimate){this.animationCompleted(e);return}n.globals.bulkRevealScheduled||(n.globals.bulkRevealScheduled=!0,nt.requestAnimationFrame(()=>{n.globals.isDestroyed||(n.globals.bulkRevealScheduled=!1,this.animationCompleted(e))}))}showDelayedElements(){this.w.globals.delayedElements.forEach(e=>{if(e.holdUntilComplete&&!this.w.globals.animationEnded)return;const n=e.el;n.classList.remove("apexcharts-element-hidden"),n.classList.add("apexcharts-hidden-element-shown")})}animationCompleted(e){const n=this.w;n.globals.animationEnded||(n.globals.animationEnded=!0,this.showDelayedElements(),typeof n.config.chart.events.animationEnd=="function"&&n.config.chart.events.animationEnd(this.ctx,{el:e,w:n}))}animateDraw(e,{realIndex:n,j:i,isFill:o,isLast:r,speed:a,delay:s,mask:l}){const c=this.w,u=this,d=()=>{r&&c.globals.shouldAnimate&&u.animationCompleted(e),u.showDelayedElements()};if(!Ge.isBrowser()||!c.globals.shouldAnimate||a<1){d();return}const f=e.node,h=()=>{const m=l&&l.type==="radial",v=c.layout.gridWidth+4*2,b=l&&l.cx||0,y=l&&l.cy||0,w=(l&&l.r||c.layout.gridWidth/2)+4,x=`apexDrawMask${c.globals.cuid}-${n}-${i??0}-${o?"f":"s"}`,$=nt.createElementNS(f0,"mask");$.setAttribute("id",x),$.setAttribute("maskUnits","userSpaceOnUse");let S;if(m){const O=w;$.setAttribute("x",String(b-O)),$.setAttribute("y",String(y-O)),$.setAttribute("width",String(O*2)),$.setAttribute("height",String(O*2)),S=nt.createElementNS(f0,"circle"),S.setAttribute("cx",String(b)),S.setAttribute("cy",String(y)),S.setAttribute("r","0"),S.setAttribute("fill","#fff")}else $.setAttribute("x",String(-4)),$.setAttribute("y",String(-4)),$.setAttribute("width",String(v)),$.setAttribute("height",String(c.layout.gridHeight+4*2)),S=nt.createElementNS(f0,"rect"),S.setAttribute("x",String(-4)),S.setAttribute("y",String(-4)),S.setAttribute("width","0"),S.setAttribute("height",String(c.layout.gridHeight+4*2)),S.setAttribute("fill","#fff");$.appendChild(S),c.dom.elDefs.node.appendChild($),f.setAttribute("mask",`url(#${x})`);const _=performance.now()+(s||0),P=O=>{if(c.globals.isDestroyed)return;const T=Math.max(0,Math.min(1,(O-_)/a)),M=sE(T);m?S.setAttribute("r",String(M*w)):S.setAttribute("width",String(M*v)),T<1?nt.requestAnimationFrame(P):(f.removeAttribute("mask"),$.parentNode&&$.parentNode.removeChild($),d())};nt.requestAnimationFrame(P)},p=g=>{f.setAttribute("stroke-dasharray",String(g)),f.setAttribute("stroke-dashoffset",String(g));const m=performance.now()+(s||0),v=b=>{if(c.globals.isDestroyed)return;const y=Math.max(0,Math.min(1,(b-m)/a));f.setAttribute("stroke-dashoffset",String(g*(1-sE(y)))),y<1?nt.requestAnimationFrame(v):(f.removeAttribute("stroke-dasharray"),f.removeAttribute("stroke-dashoffset"),d())};nt.requestAnimationFrame(v)};nt.requestAnimationFrame(()=>{if(c.globals.isDestroyed)return;if(o){h();return}const g=f.getAttribute("stroke-dasharray");if(!!g&&g!=="0"&&g!==""){h();return}let v=0;try{typeof f.getTotalLength=="function"&&(v=f.getTotalLength())}catch{v=0}if(!v){d();return}p(v)})}morphSVG(e,n,i,o,r,a,s,l,c,u){var d,f;const h=this.w;r||(r=e.attr("pathFrom")),a||(a=e.attr("pathTo"));const p=()=>(h.config.chart.type==="radar"&&(s=1),`M 0 ${h.layout.gridHeight}`);(!r||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=p()),(!a.trim()||a.indexOf("undefined")>-1||a.indexOf("NaN")>-1)&&(a=p(),u=void 0),u&&(!u.trim()||u.indexOf("undefined")>-1||u.indexOf("NaN")>-1)&&(u=void 0),h.globals.shouldAnimate||(s=1);const m=((f=(d=this.ctx)==null?void 0:d.morphTypeChange)==null?void 0:f.isActive())===!0?"polygons":"commands";let v=null;if(h.globals.dataChanged){const y=h.config.chart.animations.dynamicAnimation.easing;y!=null?v=Ag(y):c&&(v=Ag("linear"))}const b=e.plot(r).animate(s,l);v&&b.ease(v),b.plot(u||a,m,u?a:void 0).after(()=>{if(we.isNumber(i)){const y=h.seriesData.series[h.globals.maxValsInArrayIndex];y&&i===y.length-2&&h.globals.shouldAnimate&&this.animationCompleted(e)}else o!=="none"&&h.globals.shouldAnimate&&(!h.globals.comboCharts&&n===h.seriesData.series.length-1||h.globals.comboCharts)&&this.animationCompleted(e);this.showDelayedElements()})}};const lE={lighten:.15,darken:.35};let zi=class Tl{constructor(e){this.w=e}static isSliceChart(e){const n=e.config.chart.type;return n==="pie"||n==="donut"||n==="polarArea"}static hoverOutlineOwnsHoverState(e){var n;return Tl.isSliceChart(e)&&e.config.states.hover.filter.type!=="none"&&((n=e.config.plotOptions.pie.hoverOutline)==null?void 0:n.show)===!0}static sliceOffsetOwnsActiveState(e){return Tl.isSliceChart(e)&&e.config.chart.type!=="polarArea"&&e.config.plotOptions.pie.expandOnClick===!0&&e.config.plotOptions.pie.expandOffset>0&&!Tl.drilldownBlocksSliceOffset(e)}static drilldownBlocksSliceOffset(e){var n;return Tl.isSliceChart(e)&&((n=e.config.drilldown)==null?void 0:n.enabled)===!0}getDefaultFilter(e,n){const i=this.w;e.unfilter&&e.unfilter(!0),i.config.chart.dropShadow.enabled&&this.dropShadow(e,i.config.chart.dropShadow,n)}applyFilter(e,n,i,o){var r,a,s;const l=this.w;if(e.unfilter&&e.unfilter(!0),i==="none"){this.getDefaultFilter(e,n);return}const c=l.config.chart.dropShadow,u=i==="lighten"?lE.lighten:lE.darken,d=Math.max(0,Math.min(1,typeof o=="number"?o:u)),f=1-d,h=i==="lighten"?d:0;e.filterWith&&(e.filterWith(p=>{p.colorMatrix({type:"matrix",values:` ${f} 0 0 0 ${h} 0 ${f} 0 0 ${h} 0 0 ${f} 0 ${h} 0 0 0 1 0 - `,in:"SourceGraphic",result:"brightness"}),c.enabled&&this.addShadow(p,n,c,"brightness")}),c.noUserSpaceOnUse||(a=(r=e.filterer())==null?void 0:r.node)==null||a.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize((s=e.filterer())==null?void 0:s.node))}addShadow(e,n,i,o){var r;const a=this.w;let{blur:s,top:l,left:c,color:u,opacity:d}=i;if(u=Array.isArray(u)?u[n]:u,((r=a.config.chart.dropShadow.enabledOnSeries)==null?void 0:r.length)>0&&a.config.chart.dropShadow.enabledOnSeries.indexOf(n)===-1)return e;e.offset({in:o,dx:c,dy:l,result:"offset"}),e.gaussianBlur({in:"offset",stdDeviation:s,result:"blur"}),e.flood({"flood-color":u,"flood-opacity":d,result:"flood"}),e.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),e.merge(["shadow",o])}dropShadow(e,n,i=0){var o,r,a,s,l;const c=this.w;return e.unfilter&&e.unfilter(!0),we.isMsEdge()&&c.config.chart.type==="radialBar"||((o=c.config.chart.dropShadow.enabledOnSeries)==null?void 0:o.length)>0&&((r=c.config.chart.dropShadow.enabledOnSeries)==null?void 0:r.indexOf(i))===-1||e.filterWith&&(e.filterWith(u=>{this.addShadow(u,i,n,"SourceGraphic")}),n.noUserSpaceOnUse||(s=(a=e.filterer())==null?void 0:a.node)==null||s.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize((l=e.filterer())==null?void 0:l.node)),e}setSelectionFilter(e,n,i){const o=this.w;if(typeof o.interact.selectedDataPoints[n]<"u"&&o.interact.selectedDataPoints[n].indexOf(i)>-1){if(e.node.setAttribute("selected",!0),Tl.sliceOffsetOwnsActiveState(o))return;const r=o.config.states.active.filter;r.type!=="none"&&this.applyFilter(e,n,r.type,r.value)}}_scaleFilterSize(e){if(!e)return;(i=>{for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&e.setAttribute(o,i[o])})({width:"200%",height:"200%",x:"-50%",y:"-50%"})}},it=class ns{constructor(e,n=null){this.w=e,this.ctx=n}roundPathCorners(e,n){e.indexOf("NaN")>-1&&(e="");function i(P,O,T){var M=O.x-P.x,I=O.y-P.y,k=Math.sqrt(M*M+I*I);return k?o(P,O,Math.min(1,T/k)):{x:P.x,y:P.y}}function o(P,O,T){return{x:P.x+(O.x-P.x)*T,y:P.y+(O.y-P.y)*T}}function r(P,O){P.length>2&&(P[P.length-2]=O.x,P[P.length-1]=O.y)}function a(P){return{x:parseFloat(P[P.length-2]),y:parseFloat(P[P.length-1])}}var s=e.split(/[,\s]/).reduce(function(P,O){var T=O.match(/^([a-zA-Z])(.+)/);return T?(P.push(T[1]),P.push(T[2])):P.push(O),P},[]),l=s.reduce(function(P,O){return parseFloat(O)==O&&P.length?P[P.length-1].push(O):P.push([O]),P},[]),c=[];if(l.length>1){var u=a(l[0]),d=null;l[l.length-1][0]=="Z"&&l[0].length>2&&(d=["L",u.x,u.y],l[l.length-1]=d),c.push(l[0]);for(var f=1;f2&&p[0]=="L"&&g.length>2&&g[0]=="L"){var m=a(h),v=a(p),b=a(g),y,w;y=i(v,m,n),w=i(v,b,n),r(p,y),p.origPoint=v,c.push(p);var x=o(y,v,.5),$=o(v,w,.5),S=["C",x.x,x.y,$.x,$.y,w.x,w.y];S.origPoint=v,c.push(S)}else c.push(p)}if(d){var _=a(c[c.length-1]);c.push(["Z"]),r(c[0],_)}}else c=l;return c.reduce(function(P,O){return P+O.join(" ")+" "},"")}drawLine(e,n,i,o,r="#a8a8a8",a=0,s=null,l="butt"){return this.w.dom.Paper.line().attr({x1:e,y1:n,x2:i,y2:o,stroke:r,"stroke-dasharray":a,"stroke-width":s,"stroke-linecap":l})}drawRect(e=0,n=0,i=0,o=0,r=0,a="#fefefe",s=1,l=null,c=null,u=0){const f=this.w.dom.Paper.rect();return f.attr({x:e,y:n,width:i>0?i:0,height:o>0?o:0,rx:r,ry:r,opacity:s,"stroke-width":l!==null?l:0,stroke:c!==null?c:"none","stroke-dasharray":u}),f.node.setAttribute("fill",a),f}drawPolygon(e,n="#e1e1e1",i=1,o="none"){return this.w.dom.Paper.polygon(e).attr({fill:o,stroke:n,"stroke-width":i})}drawCircle(e,n=null){const i=this.w;e<0&&(e=0);const o=i.dom.Paper.circle(e*2);return n!==null&&o.attr(n),o}drawPath({d:e="",stroke:n="#a8a8a8",strokeWidth:i=1,fill:o,fillOpacity:r=1,strokeOpacity:a=1,classes:s,strokeLinecap:l=null,strokeDashArray:c=0}){const u=this.w;return l===null&&(l=u.config.stroke.lineCap),(e.indexOf("undefined")>-1||e.indexOf("NaN")>-1)&&(e=`M 0 ${u.layout.gridHeight}`),u.dom.Paper.path(e).attr({fill:o,"fill-opacity":r,stroke:n,"stroke-opacity":a,"stroke-linecap":l,"stroke-width":i,"stroke-dasharray":c,class:s})}group(e=null){const i=this.w.dom.Paper.group();return e!==null&&i.attr(e),i}move(e,n){return["M",e,n].join(" ")}line(e,n,i=null){return i==="H"?[" H",e].join(" "):i==="V"?[" V",n].join(" "):[" L",e,n].join(" ")}curve(e,n,i,o,r,a){return["C",e,n,i,o,r,a].join(" ")}quadraticCurve(e,n,i,o){return["Q",e,n,i,o].join(" ")}arc(e,n,i,o,r,a,s,l=!1){let c="A";return l&&(c="a"),[c,e,n,i,o,r,a,s].join(" ")}renderPaths({j:e,realIndex:n,pathFrom:i,pathTo:o,pathToInterp:r,stroke:a,strokeWidth:s,strokeLinecap:l,fill:c,animationDelay:u,initialSpeed:d,dataChangeSpeed:f,className:h,chartType:p,shouldClipToGrid:g=!0,bindEventsOnPaths:m=!0,drawShadow:v=!0,drawMask:b=null,scrollMorph:y=!1}){var w,x,$,S;const _=this.w,P=new zi(this.w),O=new gv(this.w,(w=this.ctx)!=null?w:void 0),T=this.w.config.chart.animations.enabled,M=T&&this.w.config.chart.animations.dynamicAnimation.enabled;if(i&&i.startsWith("M 0 0 ")&&o){const J=o.match(/^M\s+[\d.-]+\s+[\d.-]+/);J&&(i=i.replace(/^M\s+0\s+0/,J[0]))}let I;const k=(($=(x=this.ctx)==null?void 0:x.morphTypeChange)==null?void 0:$.isActive())===!0,E=!!(T&&!_.globals.resized||M&&_.globals.dataChanged&&_.globals.shouldAnimate||k&&T&&_.globals.shouldAnimate),R=typeof h=="string"&&(h.indexOf("apexcharts-line")>-1||h.indexOf("apexcharts-area")>-1||h.indexOf("apexcharts-rangeArea")>-1||h.indexOf("apexcharts-radar")>-1),D=!!(T&&!_.globals.resized&&!_.globals.dataChanged&&R),F=(S=_.config.chart.animations.largeDatasetThreshold)!=null?S:0,N=!!(E&&!D&&F>0&&_.globals.dataPoints>F),z=!!((p==="candlestick"||p==="boxPlot")&&E&&!D&&_.globals.dataChanged&&!k),W=N||z;E&&!D&&!W?I=i:(I=o,E||(_.globals.animationEnded=!0));const j=_.config.stroke.dashArray;let U=0;Array.isArray(j)?U=j[n]:U=_.config.stroke.dashArray;const V=this.drawPath({d:I,stroke:a,strokeWidth:s,fill:c,fillOpacity:1,classes:h,strokeLinecap:l,strokeDashArray:U});V.attr("index",n),g&&(p==="bar"&&!_.globals.isBarHorizontal||_.globals.comboCharts?V.attr({"clip-path":`url(#gridRectBarMask${_.globals.cuid})`}):V.attr({"clip-path":`url(#gridRectMask${_.globals.cuid})`})),_.config.chart.dropShadow.enabled&&v&&P.dropShadow(V,_.config.chart.dropShadow,n),m&&(V.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,V)),V.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,V)),V.node.addEventListener("mousedown",this.pathMouseDown.bind(this,V))),V.attr({pathTo:o,pathFrom:i});const q={el:V,j:e,realIndex:n,pathFrom:i,pathTo:o,pathToInterp:r,fill:c,strokeWidth:s,delay:u,scrollMorph:y};if(T&&!_.globals.resized&&!_.globals.dataChanged)if(D){const J=d*2,Q=a==="none"||s===0,G=_.seriesData.series.length,ee=_.globals.comboCharts?!0:n===G-1;O.animateDraw(V,{realIndex:n,j:e,isFill:Q,isLast:ee,speed:J,delay:0,mask:b})}else W||O.animatePathsGradually(wt(Je({},q),{speed:d}));else(_.globals.resized||!_.globals.dataChanged)&&!W&&O.showDelayedElements();return E&&!W&&(_.globals.dataChanged&&M||k)&&O.animatePathsGradually(wt(Je({},q),{speed:f})),W&&O.revealBulk(V),V}drawPattern(e,n,i,o="#a8a8a8",r=0){return this.w.dom.Paper.pattern(n,i,l=>{e==="horizontalLines"?l.line(0,0,i,0).stroke({color:o,width:r+1}):e==="verticalLines"?l.line(0,0,0,n).stroke({color:o,width:r+1}):e==="slantedLines"?l.line(0,0,n,i).stroke({color:o,width:r}):e==="squares"?l.rect(n,i).fill("none").stroke({color:o,width:r}):e==="circles"&&l.circle(n).fill("none").stroke({color:o,width:r})})}drawGradient(e,n,i,o,r,a=null,s=null,l=[],c=0,u=!1){const d=this.w;let f;n.length<9&&n.indexOf("#")===0&&(n=we.hexToRgba(n,o)),i.length<9&&i.indexOf("#")===0&&(i=we.hexToRgba(i,r));let h=0,p=1,g=1,m=null;s!==null&&(h=typeof s[0]<"u"?s[0]/100:0,p=typeof s[1]<"u"?s[1]/100:1,g=typeof s[2]<"u"?s[2]/100:1,m=typeof s[3]<"u"?s[3]/100:null);const v=d.config.chart.type==="donut"||d.config.chart.type==="pie"||d.config.chart.type==="polarArea"||d.config.chart.type==="bubble";if(!l||l.length===0?f=d.dom.Paper.gradient(v?"radial":"linear",b=>{b.stop(h,n,o),b.stop(p,i,r),b.stop(g,i,r),m!==null&&b.stop(m,n,o)}):f=d.dom.Paper.gradient(v?"radial":"linear",b=>{(Array.isArray(l[c])?l[c]:Array.isArray(l[0])?l[0]||[]:l).forEach(w=>{b.stop(w.offset/100,w.color,w.opacity)})}),!v)e==="vertical"?u?(f.attr({gradientUnits:"userSpaceOnUse"}),f.from(0,0).to(0,d.layout.gridHeight)):f.from(0,0).to(0,1):e==="diagonal"?f.from(0,0).to(1,1):e==="horizontal"?f.from(0,1).to(1,1):e==="diagonal2"&&f.from(1,0).to(0,1);else{const b=d.layout.gridWidth/2,y=d.layout.gridHeight/2;d.config.chart.type!=="bubble"?f.attr({gradientUnits:"userSpaceOnUse",cx:b,cy:y,r:a}):f.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}return f}getTextBasedOnMaxWidth({text:e,maxWidth:n,fontSize:i,fontFamily:o}){const r=this.getTextRects(e,i,o,""),a=r.width/e.length,s=Math.floor(n/a);return n"u"&&(i="");let g=i;o||(o="start"),(!l||!l.length)&&(l=p.config.chart.foreColor),a=a||p.config.chart.fontFamily,r=r||"11px",s=s||"regular";const m={maxWidth:u,fontSize:r,fontFamily:a};let v;return Array.isArray(i)?v=p.dom.Paper.text(b=>{for(let y=0;yb.tspan(g))),v.attr({x:e,y:n,"text-anchor":o,"dominant-baseline":h,"font-size":r,"font-family":a,"font-weight":s,fill:l,class:"apexcharts-text "+d}),v.node.style.fontFamily=a,v.node.style.opacity=c,v}getMarkerPath(e,n,i,o){let h="";switch(i){case"cross":o=o/1.4,h=`M ${e-o} ${n-o} L ${e+o} ${n+o} M ${e-o} ${n+o} L ${e+o} ${n-o}`;break;case"plus":o=o/1.12,h=`M ${e-o} ${n} L ${e+o} ${n} M ${e} ${n-o} L ${e} ${n+o}`;break;case"star":case"sparkle":{let p=5;o=o*1.15,i==="sparkle"&&(o=o/1.1,p=4);const g=Math.PI/p;for(let m=0;m<=2*p;m++){const v=m*g,b=m%2===0?o:o/2,y=e+b*Math.sin(v),w=n-b*Math.cos(v);h+=(m===0?"M":"L")+y+","+w}h+="Z";break}case"triangle":h=`M ${e} ${n-o} + `,in:"SourceGraphic",result:"brightness"}),c.enabled&&this.addShadow(p,n,c,"brightness")}),c.noUserSpaceOnUse||(a=(r=e.filterer())==null?void 0:r.node)==null||a.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize((s=e.filterer())==null?void 0:s.node))}addShadow(e,n,i,o){var r;const a=this.w;let{blur:s,top:l,left:c,color:u,opacity:d}=i;if(u=Array.isArray(u)?u[n]:u,((r=a.config.chart.dropShadow.enabledOnSeries)==null?void 0:r.length)>0&&a.config.chart.dropShadow.enabledOnSeries.indexOf(n)===-1)return e;e.offset({in:o,dx:c,dy:l,result:"offset"}),e.gaussianBlur({in:"offset",stdDeviation:s,result:"blur"}),e.flood({"flood-color":u,"flood-opacity":d,result:"flood"}),e.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),e.merge(["shadow",o])}dropShadow(e,n,i=0){var o,r,a,s,l;const c=this.w;return e.unfilter&&e.unfilter(!0),we.isMsEdge()&&c.config.chart.type==="radialBar"||((o=c.config.chart.dropShadow.enabledOnSeries)==null?void 0:o.length)>0&&((r=c.config.chart.dropShadow.enabledOnSeries)==null?void 0:r.indexOf(i))===-1||e.filterWith&&(e.filterWith(u=>{this.addShadow(u,i,n,"SourceGraphic")}),n.noUserSpaceOnUse||(s=(a=e.filterer())==null?void 0:a.node)==null||s.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize((l=e.filterer())==null?void 0:l.node)),e}setSelectionFilter(e,n,i){const o=this.w;if(typeof o.interact.selectedDataPoints[n]<"u"&&o.interact.selectedDataPoints[n].indexOf(i)>-1){if(e.node.setAttribute("selected",!0),Tl.sliceOffsetOwnsActiveState(o))return;const r=o.config.states.active.filter;r.type!=="none"&&this.applyFilter(e,n,r.type,r.value)}}_scaleFilterSize(e){if(!e)return;(i=>{for(const o in i)Object.prototype.hasOwnProperty.call(i,o)&&e.setAttribute(o,i[o])})({width:"200%",height:"200%",x:"-50%",y:"-50%"})}},it=class ns{constructor(e,n=null){this.w=e,this.ctx=n}roundPathCorners(e,n){e.indexOf("NaN")>-1&&(e="");function i(P,O,T){var M=O.x-P.x,I=O.y-P.y,k=Math.sqrt(M*M+I*I);return k?o(P,O,Math.min(1,T/k)):{x:P.x,y:P.y}}function o(P,O,T){return{x:P.x+(O.x-P.x)*T,y:P.y+(O.y-P.y)*T}}function r(P,O){P.length>2&&(P[P.length-2]=O.x,P[P.length-1]=O.y)}function a(P){return{x:parseFloat(P[P.length-2]),y:parseFloat(P[P.length-1])}}var s=e.split(/[,\s]/).reduce(function(P,O){var T=O.match(/^([a-zA-Z])(.+)/);return T?(P.push(T[1]),P.push(T[2])):P.push(O),P},[]),l=s.reduce(function(P,O){return parseFloat(O)==O&&P.length?P[P.length-1].push(O):P.push([O]),P},[]),c=[];if(l.length>1){var u=a(l[0]),d=null;l[l.length-1][0]=="Z"&&l[0].length>2&&(d=["L",u.x,u.y],l[l.length-1]=d),c.push(l[0]);for(var f=1;f2&&p[0]=="L"&&g.length>2&&g[0]=="L"){var m=a(h),v=a(p),b=a(g),y,w;y=i(v,m,n),w=i(v,b,n),r(p,y),p.origPoint=v,c.push(p);var x=o(y,v,.5),$=o(v,w,.5),S=["C",x.x,x.y,$.x,$.y,w.x,w.y];S.origPoint=v,c.push(S)}else c.push(p)}if(d){var _=a(c[c.length-1]);c.push(["Z"]),r(c[0],_)}}else c=l;return c.reduce(function(P,O){return P+O.join(" ")+" "},"")}drawLine(e,n,i,o,r="#a8a8a8",a=0,s=null,l="butt"){return this.w.dom.Paper.line().attr({x1:e,y1:n,x2:i,y2:o,stroke:r,"stroke-dasharray":a,"stroke-width":s,"stroke-linecap":l})}drawRect(e=0,n=0,i=0,o=0,r=0,a="#fefefe",s=1,l=null,c=null,u=0){const f=this.w.dom.Paper.rect();return f.attr({x:e,y:n,width:i>0?i:0,height:o>0?o:0,rx:r,ry:r,opacity:s,"stroke-width":l!==null?l:0,stroke:c!==null?c:"none","stroke-dasharray":u}),f.node.setAttribute("fill",a),f}drawPolygon(e,n="#e1e1e1",i=1,o="none"){return this.w.dom.Paper.polygon(e).attr({fill:o,stroke:n,"stroke-width":i})}drawCircle(e,n=null){const i=this.w;e<0&&(e=0);const o=i.dom.Paper.circle(e*2);return n!==null&&o.attr(n),o}drawPath({d:e="",stroke:n="#a8a8a8",strokeWidth:i=1,fill:o,fillOpacity:r=1,strokeOpacity:a=1,classes:s,strokeLinecap:l=null,strokeDashArray:c=0}){const u=this.w;return l===null&&(l=u.config.stroke.lineCap),(e.indexOf("undefined")>-1||e.indexOf("NaN")>-1)&&(e=`M 0 ${u.layout.gridHeight}`),u.dom.Paper.path(e).attr({fill:o,"fill-opacity":r,stroke:n,"stroke-opacity":a,"stroke-linecap":l,"stroke-width":i,"stroke-dasharray":c,class:s})}group(e=null){const i=this.w.dom.Paper.group();return e!==null&&i.attr(e),i}move(e,n){return["M",e,n].join(" ")}line(e,n,i=null){return i==="H"?[" H",e].join(" "):i==="V"?[" V",n].join(" "):[" L",e,n].join(" ")}curve(e,n,i,o,r,a){return["C",e,n,i,o,r,a].join(" ")}quadraticCurve(e,n,i,o){return["Q",e,n,i,o].join(" ")}arc(e,n,i,o,r,a,s,l=!1){let c="A";return l&&(c="a"),[c,e,n,i,o,r,a,s].join(" ")}renderPaths({j:e,realIndex:n,pathFrom:i,pathTo:o,pathToInterp:r,stroke:a,strokeWidth:s,strokeLinecap:l,fill:c,animationDelay:u,initialSpeed:d,dataChangeSpeed:f,className:h,chartType:p,shouldClipToGrid:g=!0,bindEventsOnPaths:m=!0,drawShadow:v=!0,drawMask:b=null,scrollMorph:y=!1}){var w,x,$,S;const _=this.w,P=new zi(this.w),O=new mv(this.w,(w=this.ctx)!=null?w:void 0),T=this.w.config.chart.animations.enabled,M=T&&this.w.config.chart.animations.dynamicAnimation.enabled;if(i&&i.startsWith("M 0 0 ")&&o){const J=o.match(/^M\s+[\d.-]+\s+[\d.-]+/);J&&(i=i.replace(/^M\s+0\s+0/,J[0]))}let I;const k=(($=(x=this.ctx)==null?void 0:x.morphTypeChange)==null?void 0:$.isActive())===!0,E=!!(T&&!_.globals.resized||M&&_.globals.dataChanged&&_.globals.shouldAnimate||k&&T&&_.globals.shouldAnimate),R=typeof h=="string"&&(h.indexOf("apexcharts-line")>-1||h.indexOf("apexcharts-area")>-1||h.indexOf("apexcharts-rangeArea")>-1||h.indexOf("apexcharts-radar")>-1),D=!!(T&&!_.globals.resized&&!_.globals.dataChanged&&R),F=(S=_.config.chart.animations.largeDatasetThreshold)!=null?S:0,N=!!(E&&!D&&F>0&&_.globals.dataPoints>F),z=!!((p==="candlestick"||p==="boxPlot")&&E&&!D&&_.globals.dataChanged&&!k),W=N||z;E&&!D&&!W?I=i:(I=o,E||(_.globals.animationEnded=!0));const j=_.config.stroke.dashArray;let U=0;Array.isArray(j)?U=j[n]:U=_.config.stroke.dashArray;const V=this.drawPath({d:I,stroke:a,strokeWidth:s,fill:c,fillOpacity:1,classes:h,strokeLinecap:l,strokeDashArray:U});V.attr("index",n),g&&(p==="bar"&&!_.globals.isBarHorizontal||_.globals.comboCharts?V.attr({"clip-path":`url(#gridRectBarMask${_.globals.cuid})`}):V.attr({"clip-path":`url(#gridRectMask${_.globals.cuid})`})),_.config.chart.dropShadow.enabled&&v&&P.dropShadow(V,_.config.chart.dropShadow,n),m&&(V.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,V)),V.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,V)),V.node.addEventListener("mousedown",this.pathMouseDown.bind(this,V))),V.attr({pathTo:o,pathFrom:i});const q={el:V,j:e,realIndex:n,pathFrom:i,pathTo:o,pathToInterp:r,fill:c,strokeWidth:s,delay:u,scrollMorph:y};if(T&&!_.globals.resized&&!_.globals.dataChanged)if(D){const J=d*2,Q=a==="none"||s===0,G=_.seriesData.series.length,ee=_.globals.comboCharts?!0:n===G-1;O.animateDraw(V,{realIndex:n,j:e,isFill:Q,isLast:ee,speed:J,delay:0,mask:b})}else W||O.animatePathsGradually(wt(Je({},q),{speed:d}));else(_.globals.resized||!_.globals.dataChanged)&&!W&&O.showDelayedElements();return E&&!W&&(_.globals.dataChanged&&M||k)&&O.animatePathsGradually(wt(Je({},q),{speed:f})),W&&O.revealBulk(V),V}drawPattern(e,n,i,o="#a8a8a8",r=0){return this.w.dom.Paper.pattern(n,i,l=>{e==="horizontalLines"?l.line(0,0,i,0).stroke({color:o,width:r+1}):e==="verticalLines"?l.line(0,0,0,n).stroke({color:o,width:r+1}):e==="slantedLines"?l.line(0,0,n,i).stroke({color:o,width:r}):e==="squares"?l.rect(n,i).fill("none").stroke({color:o,width:r}):e==="circles"&&l.circle(n).fill("none").stroke({color:o,width:r})})}drawGradient(e,n,i,o,r,a=null,s=null,l=[],c=0,u=!1){const d=this.w;let f;n.length<9&&n.indexOf("#")===0&&(n=we.hexToRgba(n,o)),i.length<9&&i.indexOf("#")===0&&(i=we.hexToRgba(i,r));let h=0,p=1,g=1,m=null;s!==null&&(h=typeof s[0]<"u"?s[0]/100:0,p=typeof s[1]<"u"?s[1]/100:1,g=typeof s[2]<"u"?s[2]/100:1,m=typeof s[3]<"u"?s[3]/100:null);const v=d.config.chart.type==="donut"||d.config.chart.type==="pie"||d.config.chart.type==="polarArea"||d.config.chart.type==="bubble";if(!l||l.length===0?f=d.dom.Paper.gradient(v?"radial":"linear",b=>{b.stop(h,n,o),b.stop(p,i,r),b.stop(g,i,r),m!==null&&b.stop(m,n,o)}):f=d.dom.Paper.gradient(v?"radial":"linear",b=>{(Array.isArray(l[c])?l[c]:Array.isArray(l[0])?l[0]||[]:l).forEach(w=>{b.stop(w.offset/100,w.color,w.opacity)})}),!v)e==="vertical"?u?(f.attr({gradientUnits:"userSpaceOnUse"}),f.from(0,0).to(0,d.layout.gridHeight)):f.from(0,0).to(0,1):e==="diagonal"?f.from(0,0).to(1,1):e==="horizontal"?f.from(0,1).to(1,1):e==="diagonal2"&&f.from(1,0).to(0,1);else{const b=d.layout.gridWidth/2,y=d.layout.gridHeight/2;d.config.chart.type!=="bubble"?f.attr({gradientUnits:"userSpaceOnUse",cx:b,cy:y,r:a}):f.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}return f}getTextBasedOnMaxWidth({text:e,maxWidth:n,fontSize:i,fontFamily:o}){const r=this.getTextRects(e,i,o,""),a=r.width/e.length,s=Math.floor(n/a);return n"u"&&(i="");let g=i;o||(o="start"),(!l||!l.length)&&(l=p.config.chart.foreColor),a=a||p.config.chart.fontFamily,r=r||"11px",s=s||"regular";const m={maxWidth:u,fontSize:r,fontFamily:a};let v;return Array.isArray(i)?v=p.dom.Paper.text(b=>{for(let y=0;yb.tspan(g))),v.attr({x:e,y:n,"text-anchor":o,"dominant-baseline":h,"font-size":r,"font-family":a,"font-weight":s,fill:l,class:"apexcharts-text "+d}),v.node.style.fontFamily=a,v.node.style.opacity=c,v}getMarkerPath(e,n,i,o){let h="";switch(i){case"cross":o=o/1.4,h=`M ${e-o} ${n-o} L ${e+o} ${n+o} M ${e-o} ${n+o} L ${e+o} ${n-o}`;break;case"plus":o=o/1.12,h=`M ${e-o} ${n} L ${e+o} ${n} M ${e} ${n-o} L ${e} ${n+o}`;break;case"star":case"sparkle":{let p=5;o=o*1.15,i==="sparkle"&&(o=o/1.1,p=4);const g=Math.PI/p;for(let m=0;m<=2*p;m++){const v=m*g,b=m%2===0?o:o/2,y=e+b*Math.sin(v),w=n-b*Math.cos(v);h+=(m===0?"M":"L")+y+","+w}h+="Z";break}case"triangle":h=`M ${e} ${n-o} L ${e+o} ${n+o} L ${e-o} ${n+o} Z`;break;case"square":case"rect":o=o/1.125,h=`M ${e-o} ${n-o} @@ -537,11 +537,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho L ${e+o} ${n}`;break;case"circle":default:o=o*2,h=`M ${e}, ${n} m -${o/2}, 0 a ${o/2},${o/2} 0 1,0 ${o},0 - a ${o/2},${o/2} 0 1,0 -${o},0`;break}return h}drawMarkerShape(e,n,i,o,r){const a=this.drawPath({d:this.getMarkerPath(e,n,i,o),stroke:r.pointStrokeColor,strokeDashArray:r.pointStrokeDashArray,strokeWidth:r.pointStrokeWidth,fill:r.pointFillColor,fillOpacity:r.pointFillOpacity,strokeOpacity:r.pointStrokeOpacity});return a.attr({cx:e,cy:n,shape:r.shape,class:r.class?r.class:""}),a}drawMarker(e,n,i){e=e||0;let o=i.pSize||0;return we.isNumber(n)||(o=0,n=0),this.drawMarkerShape(e,n,i==null?void 0:i.shape,o,Je(Je({},i),i.shape==="line"||i.shape==="plus"||i.shape==="cross"?{pointStrokeColor:i.pointFillColor,pointStrokeOpacity:i.pointFillOpacity}:{}))}pathMouseEnter(e,n){var i,o;const r=this.w,a=new zi(this.w),s=parseInt((i=e.node.getAttribute("index"))!=null?i:"",10),l=parseInt((o=e.node.getAttribute("j"))!=null?o:"",10);if(!(isNaN(s)||isNaN(l))&&(typeof r.config.chart.events.dataPointMouseEnter=="function"&&r.config.chart.events.dataPointMouseEnter(n,this.ctx,{seriesIndex:s,dataPointIndex:l,w:r}),ns._fireEvent(r,"dataPointMouseEnter",[n,this.ctx,{seriesIndex:s,dataPointIndex:l,w:r}]),!(r.config.states.active.filter.type!=="none"&&e.node.getAttribute("selected")==="true")&&!zi.hoverOutlineOwnsHoverState(r)&&r.config.states.hover.filter.type!=="none"&&!r.interact.isTouchDevice)){const c=r.config.states.hover.filter;a.applyFilter(e,s,c.type,c.value)}}pathMouseLeave(e,n){var i,o;const r=this.w,a=new zi(this.w),s=parseInt((i=e.node.getAttribute("index"))!=null?i:"",10),l=parseInt((o=e.node.getAttribute("j"))!=null?o:"",10);isNaN(s)||isNaN(l)||(typeof r.config.chart.events.dataPointMouseLeave=="function"&&r.config.chart.events.dataPointMouseLeave(n,this.ctx,{seriesIndex:s,dataPointIndex:l,w:r}),ns._fireEvent(r,"dataPointMouseLeave",[n,this.ctx,{seriesIndex:s,dataPointIndex:l,w:r}]),!(r.config.states.active.filter.type!=="none"&&e.node.getAttribute("selected")==="true")&&(zi.hoverOutlineOwnsHoverState(r)||r.config.states.hover.filter.type!=="none"&&a.getDefaultFilter(e,s)))}_clearAllDataPointSelections(e,n){const i=this.w;i.interact.selectedDataPoints=[];const o=i.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),r=i.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),a=s=>{Array.prototype.forEach.call(s,l=>{l.node.setAttribute("selected","false"),e.getDefaultFilter(l,n)})};a(o),a(r)}_togglePointSelection(e,n,i,o){const r=this.w;if(e.node.getAttribute("selected")==="true"){e.node.setAttribute("selected","false");const a=r.interact.selectedDataPoints[i].indexOf(o);return a>-1&&r.interact.selectedDataPoints[i].splice(a,1),"false"}return!r.config.states.active.allowMultipleDataPointsSelection&&r.interact.selectedDataPoints.length>0&&this._clearAllDataPointSelections(n,i),e.node.setAttribute("selected","true"),typeof r.interact.selectedDataPoints[i]>"u"&&(r.interact.selectedDataPoints[i]=[]),r.interact.selectedDataPoints[i].push(o),"true"}_applyPointSelectionFilter(e,n,i,o){const r=this.w;if(!zi.sliceOffsetOwnsActiveState(r)){if(o==="true"){const a=r.config.states.active.filter;if(a!=="none")n.applyFilter(e,i,a.type,a.value);else if(r.config.states.hover.filter!=="none"&&!r.interact.isTouchDevice){const s=r.config.states.hover.filter;n.applyFilter(e,i,s.type,s.value)}}else if(r.config.states.active.filter.type!=="none")if(r.config.states.hover.filter.type!=="none"&&!r.interact.isTouchDevice){const a=r.config.states.hover.filter;n.applyFilter(e,i,a.type,a.value)}else n.getDefaultFilter(e,i)}}pathMouseDown(e,n){var i,o;const r=this.w,a=new zi(this.w),s=parseInt((i=e.node.getAttribute("index"))!=null?i:"",10),l=parseInt((o=e.node.getAttribute("j"))!=null?o:"",10);if(isNaN(s)||isNaN(l))return;const c=r.config.chart.link;if(!!!(c&&(typeof c.dimension=="function"||c.enabled))){const d=this._togglePointSelection(e,a,s,l);this._applyPointSelectionFilter(e,a,s,d)}typeof r.config.chart.events.dataPointSelection=="function"&&r.config.chart.events.dataPointSelection(n,this.ctx,{selectedDataPoints:r.interact.selectedDataPoints,seriesIndex:s,dataPointIndex:l,w:r}),n&&ns._fireEvent(r,"dataPointSelection",[n,this.ctx,{selectedDataPoints:r.interact.selectedDataPoints,seriesIndex:s,dataPointIndex:l,w:r}])}rotateAroundCenter(e){let n={};e&&typeof e.getBBox=="function"&&(n=e.getBBox());const i=n.x+n.width/2,o=n.y+n.height/2;return{x:i,y:o}}setupEventDelegation(e,n){let i=null;e.node.addEventListener("mouseover",o=>{const r=ns._findDelegateTarget(o.target,e.node,n);!r||r===i||(i&&i.instance&&this.pathMouseLeave(i.instance,o),i=r,r.instance&&this.pathMouseEnter(r.instance,o))}),e.node.addEventListener("mouseout",o=>{if(!i)return;(o.relatedTarget?ns._findDelegateTarget(o.relatedTarget,e.node,n):null)!==i&&(i&&i.instance&&this.pathMouseLeave(i.instance,o),i=null)}),e.node.addEventListener("mousedown",o=>{const r=ns._findDelegateTarget(o.target,e.node,n);r&&r.instance&&this.pathMouseDown(r.instance,o)})}static _fireEvent(e,n,i){const o=e.globals.events;if(!o||!Object.prototype.hasOwnProperty.call(o,n))return;const r=o[n];for(let a=0;a0&&e.getComputedTextLength()>=i/1.1)){for(let o=n.length-3;o>0;o-=3)if(e.getSubStringLength(0,o)<=i/1.1){e.textContent=n.substring(0,o)+"...";return}e.textContent="."}}},UC=class{constructor(e){this.w=e,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}clippedImgArea(e){const n=this.w,i=n.config,o=parseInt(String(n.layout.gridWidth),10),r=parseInt(String(n.layout.gridHeight),10),a=o>r?o:r,s=e.image;let l=0,c=0;typeof e.width>"u"&&typeof e.height>"u"?i.fill.image.width!==void 0&&i.fill.image.height!==void 0?(l=i.fill.image.width+1,c=i.fill.image.height):(l=a+1,c=a):(l=e.width,c=e.height);const u=nt.createElementNS(Wt,"pattern");it.setAttrs(u,{id:e.patternID,patternUnits:e.patternUnits?e.patternUnits:"userSpaceOnUse",width:l+"px",height:c+"px"});const d=nt.createElementNS(Wt,"image");u.appendChild(d);const f=Ge.isBrowser()?window.SVG:global.SVG;d.setAttributeNS(f.xlink,"href",s),it.setAttrs(d,{x:0,y:0,preserveAspectRatio:"none",width:l+"px",height:c+"px"}),d.style.opacity=e.opacity,n.dom.elDefs.node.appendChild(u)}getSeriesIndex(e){const n=this.w,i=n.config.chart.type;return(i==="bar"||i==="rangeBar")&&n.config.plotOptions.bar.distributed||i==="heatmap"||i==="treemap"?this.seriesIndex=e.seriesNumber:this.seriesIndex=e.seriesNumber%n.seriesData.series.length,this.seriesIndex}getSeriesAxisRange(e){var n,i,o;const r=this.w,a=(i=(n=r.globals.seriesYAxisReverseMap)==null?void 0:n[e])!=null?i:0;return{minY:we.isNumber(r.globals.minYArr[e])?r.globals.minYArr[e]:r.globals.minY,maxY:we.isNumber(r.globals.maxYArr[e])?r.globals.maxYArr[e]:r.globals.maxY,reversed:!!((o=r.config.yaxis[a])!=null&&o.reversed)}}computeColorStops(e,n){const i=this.w,{threshold:o,colorAboveThreshold:r,colorBelowThreshold:a}=n,{minY:s,maxY:l}=e,c=l-s;let u=c===0?o>l?0:100:(l-o)/c*100;e.reversed&&(u=100-u),u=Math.max(0,Math.min(u,100));const d=Array.isArray(i.config.fill.opacity)?i.config.fill.opacity[this.seriesIndex]:i.config.fill.opacity,f={offset:u,color:r,opacity:d},h={offset:u,color:a,opacity:d};return e.reversed?[h,f]:[f,h]}fillPath(e){var n,i,o,r,a,s,l;const c=this.w;this.opts=e;const u=this.w.config;let d,f,h;this.seriesIndex=this.getSeriesIndex(e);const p=u.plotOptions.line.colors.colorAboveThreshold&&u.plotOptions.line.colors.colorBelowThreshold;let m=this.getFillColors()[this.seriesIndex];c.seriesData.seriesColors[this.seriesIndex]!==void 0&&(m=c.seriesData.seriesColors[this.seriesIndex]),typeof m=="function"&&(m=m({seriesIndex:this.seriesIndex,dataPointIndex:e.dataPointIndex,value:e.value,w:c}));const v=e.fillType?e.fillType:this.getFillType(this.seriesIndex);let b=Array.isArray(u.fill.opacity)?u.fill.opacity[this.seriesIndex]:u.fill.opacity;const y=v==="gradient"||p;e.color&&(m=e.color);const w=c.config.series[this.seriesIndex];(i=(n=w==null?void 0:w.data)==null?void 0:n[e.dataPointIndex])!=null&&i.fillColor&&(m=(r=(o=w==null?void 0:w.data)==null?void 0:o[e.dataPointIndex])==null?void 0:r.fillColor),m||(m="#fff",console.warn("undefined color - ApexCharts")),e.opacity!==void 0&&e.opacity!==null&&(b=e.opacity);let x=m;we.isCSSVariable(m)?x=we.applyOpacityToColor(m,b):m.indexOf("rgb")===-1?m.indexOf("#")===-1?x=m:m.length<9&&(x=we.hexToRgba(m,b)):m.indexOf("rgba")>-1?b=we.getOpacityFromRGBA(m):x=we.hexToRgba(we.rgb2hex(m),b);const $=we.isCSSVariable(m)?we.getThemeColor(m):m;if(v==="pattern"&&(f=this.handlePatternFill({fillConfig:e.fillConfig,patternFill:f,fillColor:$,defaultColor:x})),y){const S=u.fill.gradient.colorStops?[...u.fill.gradient.colorStops]:[];let _=(l=(s=(a=e.fillConfig)==null?void 0:a.gradient)==null?void 0:s.type)!=null?l:u.fill.gradient.type;p&&(S[this.seriesIndex]=this.computeColorStops(this.getSeriesAxisRange(this.seriesIndex),u.plotOptions.line.colors),_="vertical"),h=this.handleGradientFill({type:_,fillConfig:e.fillConfig,fillColor:$,fillOpacity:b,colorStops:S,i:this.seriesIndex,verticalUserSpace:p})}if(v==="image"){const S=u.fill.image.src,_=e.patternID?e.patternID:"",P=`pattern${c.globals.cuid}${e.seriesNumber+1}${_}`;this.patternIDs.indexOf(P)===-1&&(this.clippedImgArea({opacity:b,image:Array.isArray(S)?e.seriesNumber-1&&(p=we.getOpacityFromRGBA(f));let g=l.gradient.opacityTo===void 0?i:Array.isArray(l.gradient.opacityTo)?l.gradient.opacityTo[a]:l.gradient.opacityTo;if(l.gradient.gradientToColors===void 0||l.gradient.gradientToColors.length===0)l.gradient.shade==="dark"?h=d.shadeColor(parseFloat(l.gradient.shadeIntensity)*-1,n.indexOf("rgb")>-1?we.rgb2hex(n):n):h=d.shadeColor(parseFloat(l.gradient.shadeIntensity),n.indexOf("rgb")>-1?we.rgb2hex(n):n);else if(l.gradient.gradientToColors[c.seriesNumber]){const m=l.gradient.gradientToColors[c.seriesNumber];h=m,m.indexOf("rgba")>-1&&(g=we.getOpacityFromRGBA(m))}else h=n;if(l.gradient.gradientFrom&&(f=l.gradient.gradientFrom),l.gradient.gradientTo&&(h=l.gradient.gradientTo),l.gradient.inverseColors){const m=f;f=h,h=m}return f.indexOf("rgb")>-1&&(f=we.rgb2hex(f)),h.indexOf("rgb")>-1&&(h=we.rgb2hex(h)),u.drawGradient(e,f,h,p,g,c.size,l.gradient.stops,r,a,s)}};const cE=["none","lighten","darken"];function Ex(t,e){const n=t&&t.renderer;return n&&n.kind&&n.kind!=="svg"?n:e}function wye(t){const e=t.config.series||[],n=t.config.chart.type,i=n==="scatter"||n==="bubble",o=t.config.markers&&t.config.markers.size,r=Array.isArray(o)?o.some(d=>d>0):(o||0)>0,a=!!(t.config.dataLabels&&t.config.dataLabels.enabled),s=n==="heatmap";let l=0,c=0;return e.forEach(d=>{const f=Array.isArray(d.data)?d.data.length:0;f>c&&(c=f),(i||r||s)&&(l+=f),a&&(l+=f)}),c>=5e4&&(l=Math.max(l,c)),l}function uE(t){var e,n,i,o;const r=t.config.fill&&t.config.fill.type,a=d=>d==="pattern"||d==="image"||d==="gradient";if(Array.isArray(r)?r.some(a):a(r))return!0;const s=(n=(e=t.config.plotOptions)==null?void 0:e.line)==null?void 0:n.colors;if(s&&s.colorAboveThreshold&&s.colorBelowThreshold||t.config.chart.type==="heatmap"&&(((o=(i=t.config.plotOptions)==null?void 0:i.heatmap)==null?void 0:o.shape)||"rect")!=="rect")return!0;const l=t.config.states||{},c=l.hover&&l.hover.filter&&l.hover.filter.type,u=l.active&&l.active.filter&&l.active.filter.type;return!!(c&&!cE.includes(c)||u&&!cE.includes(u))}let Md=class ip{constructor(e,n){this.w=e,this.ctx=n,this._filters=new zi(this.w),this._graphics=new it(this.w,this.ctx),this._seriesWrap=null,this._seriesWrapIndex=-1,this._batch=null}resetSeriesWrapCache(){this._seriesWrap=null,this._seriesWrapIndex=-1,this._batch=null}static markersAreInert(e){const n=e.config.chart.type;return(n==="line"||n==="area")&&!e.globals.comboCharts&&!e.config.tooltip.intersect}_shouldBatch(){var e,n,i,o,r;const a=this.w,s=a.config.markers,l=(e=s.largeDatasetThreshold)!=null?e:0;if(l<=0||((i=(n=this.ctx)==null?void 0:n.renderer)==null?void 0:i.kind)==="canvas"||!ip.markersAreInert(a)||s.discrete&&s.discrete.length||s.onClick||s.onDblClick||(o=a.config.chart.events)!=null&&o.dataPointSelection)return!1;const c=a.seriesData.series;if(!Array.isArray(c)||!c.length)return!1;let u=!1;for(let d=0;d0||f&&s.showNullDataPoints)&&c[d].length>l&&(u=!0)}return u}setGlobalMarkerSize(){const e=this.w;if(e.globals.markers.size=Array.isArray(e.config.markers.size)?e.config.markers.size:[e.config.markers.size],e.globals.markers.size.length>0){if(e.globals.markers.size.length"u"&&e.globals.markers.size.push(e.globals.markers.size[0])}else e.globals.markers.size=e.config.series.map(()=>e.config.markers.size);e.globals.markers.batched=this._shouldBatch()}plotChartMarkers({pointsPos:e,seriesIndex:n,j:i,pSize:o,alwaysDrawMarker:r=!1,isVirtualPoint:a=!1}){const s=this.w,l=n,c=e;let u=null;const d=new it(this.w),f=Ex(this.ctx,d),h=s.config.markers.discrete&&s.config.markers.discrete.length;if(Array.isArray(c.x))for(let p=0;p0:s.config.markers.size>0;if(s.globals.markers.batched&&(y||r)&&!h&&!a){this._batchPoint(n,m,c.x[p],c.y[p],{invalid:v,graphics:d,pSize:r?o:void 0,trackPoint:!r});continue}if(y||r||h){f.kind==="canvas"&&(typeof s.globals.pointsArray[n]>"u"&&(s.globals.pointsArray[n]=[]),s.globals.pointsArray[n][m]=[c.x[p],c.y[p]]),v||(b+=` w${we.randomId()}`);const x=this.getMarkerConfig({cssClass:b,seriesIndex:n,dataPointIndex:m}),$=s.config.series[l];if($.data[m]&&($.data[m].fillColor&&(x.pointFillColor=$.data[m].fillColor),$.data[m].strokeColor&&(x.pointStrokeColor=$.data[m].strokeColor)),typeof o<"u"&&(x.pSize=o),(c.x[p]<-s.globals.markers.largestSize||c.x[p]>s.layout.gridWidth+s.globals.markers.largestSize||c.y[p]<-s.globals.markers.largestSize||c.y[p]>s.layout.gridHeight+s.globals.markers.largestSize)&&(x.pSize=0),!v){if((s.globals.markers.size[n]>0||r||h)&&!u){const _=!r&&!h;_&&this._seriesWrap&&this._seriesWrapIndex===n?u=this._seriesWrap:(u=f.group({class:_?"apexcharts-series-markers":""}),u.attr("clip-path",`url(#gridRectMarkerMask${s.globals.cuid})`),this.setupMarkerDelegation(u),_&&(this._seriesWrap=u,this._seriesWrapIndex=n))}g=f.drawMarker(c.x[p],c.y[p],x),g.attr("rel",m),g.attr("j",m),g.attr("index",n),g.node.setAttribute("default-marker-size",x.pSize),Ag(g,c.x[p],s),this._filters.setSelectionFilter(g,n,m),u&&u.add(g)}}else typeof s.globals.pointsArray[n]>"u"&&(s.globals.pointsArray[n]=[]),s.globals.pointsArray[n].push([c.x[p],c.y[p]])}return u}_batchPoint(e,n,i,o,{invalid:r,graphics:a,pSize:s,trackPoint:l}){const c=this.w;if(l&&(typeof c.globals.pointsArray[e]>"u"&&(c.globals.pointsArray[e]=[]),c.globals.pointsArray[e][n]=[i,o]),r)return;(!this._batch||this._batch.seriesIndex!==e)&&(this._batch={seriesIndex:e,opts:this.getMarkerConfig({cssClass:"",seriesIndex:e}),sizes:new Map});const u=s===void 0?this._batch.opts.pSize:s;if(!(u>0))return;const d=c.globals.markers.largestSize;if(i<-d||i>c.layout.gridWidth+d||o<-d||o>c.layout.gridHeight+d)return;let f=this._batch.sizes.get(u);f||(f=[],this._batch.sizes.set(u,f)),f.push(a.getMarkerPath(i,o,this._batch.opts.shape,u))}flushBatch(e,n){const i=this._batch;if(this._batch=null,!i||i.seriesIndex!==n||!i.sizes.size)return[];const o=this.w,r=new it(this.w),a=i.opts,s=a.shape==="line"||a.shape==="plus"||a.shape==="cross",l=s?a.pointFillColor:a.pointStrokeColor,c=s?a.pointFillOpacity:a.pointStrokeOpacity,u=[];return i.sizes.forEach((d,f)=>{if(!d.length)return;const h=r.drawPath({d:d.join(" "),fill:a.pointFillColor,fillOpacity:a.pointFillOpacity,stroke:l,strokeOpacity:c,strokeWidth:a.pointStrokeWidth,strokeDashArray:a.pointStrokeDashArray});h.attr({class:`apexcharts-marker-batch${ip.markersAreInert(o)?" no-pointer-events":""}`,"clip-path":`url(#gridRectMarkerMask${o.globals.cuid})`,shape:a.shape,index:n,"default-marker-size":f}),e.add(h),u.push(h)}),u}getMarkerConfig({cssClass:e,seriesIndex:n,dataPointIndex:i=null,radius:o=null,size:r=null,strokeWidth:a=null}){const s=this.w,l=this.getMarkerStyle(n);let c=r===null?s.globals.markers.size[n]:r;const u=s.config.markers;return i!==null&&u.discrete.length&&u.discrete.map(d=>{d.seriesIndex===n&&d.dataPointIndex===i&&(d.strokeColor!==void 0&&(l.pointStrokeColor=d.strokeColor),d.fillColor!==void 0&&(l.pointFillColor=d.fillColor),d.size!==void 0&&(c=d.size),d.shape!==void 0&&(l.pointShape=d.shape))}),{pSize:o===null?c:o,pRadius:o!==null?o:u.radius,pointStrokeWidth:a!==null?a:Array.isArray(u.strokeWidth)?u.strokeWidth[n]:u.strokeWidth,pointStrokeColor:l.pointStrokeColor,pointFillColor:l.pointFillColor,shape:l.pointShape||(Array.isArray(u.shape)?u.shape[n]:u.shape),class:e,pointStrokeOpacity:Array.isArray(u.strokeOpacity)?u.strokeOpacity[n]:u.strokeOpacity,pointStrokeDashArray:Array.isArray(u.strokeDashArray)?u.strokeDashArray[n]:u.strokeDashArray,pointFillOpacity:Array.isArray(u.fillOpacity)?u.fillOpacity[n]:u.fillOpacity,seriesIndex:n}}setupMarkerDelegation(e){const n=this.w,i=".apexcharts-marker";this._graphics.setupEventDelegation(e,i),e.node.addEventListener("click",o=>{n.config.markers.onClick&&it._findDelegateTarget(o.target,e.node,i)&&n.config.markers.onClick(o)}),e.node.addEventListener("dblclick",o=>{n.config.markers.onDblClick&&it._findDelegateTarget(o.target,e.node,i)&&n.config.markers.onDblClick(o)}),e.node.addEventListener("touchstart",o=>{const r=it._findDelegateTarget(o.target,e.node,i);r&&r.instance&&this._graphics.pathMouseDown(r.instance,o)},{passive:!0})}getMarkerStyle(e){const n=this.w,i=n.globals.markers.colors,o=n.config.markers.strokeColor||n.config.markers.strokeColors,r=Array.isArray(o)?o[e]:o,a=Array.isArray(i)?i[e]:i;return{pointStrokeColor:r,pointFillColor:a}}},dF=class{constructor(e,n){this.ctx=n,this.w=e,this.initialAnim=this.w.config.chart.animations.enabled,this.anim=new gv(this.w),this.filters=new zi(this.w),this.fill=new UC(this.w),this.markers=new Md(this.w,this.ctx),this.graphics=new it(this.w),this._elPointsWrap=null,this._elPointsWrapParent=null,this._perSeries=null}draw(e,n,i){const o=this.w,r=this.graphics,a=Ex(this.ctx,r),s=i.realIndex,l=i.pointsPos,c=i.zRatio,u=i.elParent;let d=this._elPointsWrap;if((!d||this._elPointsWrapParent!==u)&&(d=a.group({class:`apexcharts-series-markers apexcharts-series-${o.config.chart.type}`}),d.attr("clip-path",`url(#gridRectMarkerMask${o.globals.cuid})`),this.markers.setupMarkerDelegation(d),u.add(d),this._elPointsWrap=d,this._elPointsWrapParent=u,this._perSeries=this._buildPerSeriesCache(s,a)),Array.isArray(l.x))for(let f=0;fb.maxBubbleRadius&&(g=b.maxBubbleRadius)}const m=l.x[f],v=l.y[f];if(g=g||0,(v===null||typeof o.seriesData.series[s][h]>"u")&&(p=!1),p){const b=this.drawPoint(m,v,g,s,h,n);d.add(b),a.kind==="canvas"&&(typeof o.globals.pointsArray[s]>"u"&&(o.globals.pointsArray[s]=[]),o.globals.pointsArray[s][h]=[m,v])}}}_buildPerSeriesCache(e,n){var i;const o=this.w;return{realIndex:e,emit:n,isBubble:o.config.chart.type==="bubble"||o.globals.comboCharts&&o.config.series[e]&&o.config.series[e].type==="bubble",canCacheConfig:!o.config.markers.discrete.length,markerConfig:null,fillCacheable:void 0,fillCircle:void 0,dropShadowEnabled:o.config.chart.dropShadow.enabled,doInitialAnim:this.initialAnim&&!o.globals.dataChanged&&!o.globals.resized,jitter:(i=o.config.plotOptions.scatter)==null?void 0:i.jitter,anim:null}}drawPoint(e,n,i,o,r,a){var s;const l=this.w,c=o,u=this.anim,d=this.filters,f=this.fill,h=this.markers;let p=this._perSeries;(!p||p.realIndex!==o)&&(p=this._perSeries=this._buildPerSeriesCache(o,Ex(this.ctx,this.graphics)));const g=p.emit;let m;p.canCacheConfig?(p.markerConfig||(p.markerConfig=h.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:c,dataPointIndex:r,radius:p.isBubble?i:null})),m=p.markerConfig,p.isBubble&&(m.pSize=i,m.pRadius=i)):m=h.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:c,dataPointIndex:r,radius:p.isBubble?i:null});const b=l.config.series[c].data[r];let y;p.fillCircle!==void 0?y=p.fillCircle:(y=f.fillPath({seriesNumber:o,dataPointIndex:r,color:m.pointFillColor,patternUnits:"objectBoundingBox",value:l.seriesData.series[o][a]}),p.fillCacheable===void 0&&(p.fillCacheable=p.canCacheConfig&&f.getFillType(o)==="solid"&&typeof m.pointFillColor=="string"&&!!m.pointFillColor),p.fillCacheable&&!(b!=null&&b.fillColor)&&(p.fillCircle=y));const w=g.drawMarker(e,n,m);b!=null&&b.fillColor&&(y=b.fillColor);const x=p.jitter;if(x!=null&&x.enabled&&x.distributed&&l.globals.colors.length){const $=Math.round((s=l.seriesData.seriesX[o])==null?void 0:s[r]);isNaN($)||(y=l.globals.colors[$%l.globals.colors.length])}if(w.attr({fill:y}),p.dropShadowEnabled){const $=l.config.chart.dropShadow;d.dropShadow(w,$,o)}if(p.doInitialAnim){if(!p.anim){const S=l.config.chart.animations,_=l.globals.dataPoints||1,P=S.animateGradually,O=P&&P.enabled!==!1;p.anim={popSpeed:S.speed,baseDelay:O?Math.min(20,S.speed*.5/Math.max(1,_)):0}}const $=uF({style:p.anim.baseDelay>0?"sequential":"none",index:r,baseDelay:p.anim.baseDelay});u.animatePop(w,{speed:p.anim.popSpeed,delay:$,onComplete:()=>u.animationCompleted(w)})}else l.globals.animationEnded=!0;return w.attr({rel:r,j:r,index:o,"default-marker-size":m.pSize}),d.setSelectionFilter(w,o,r),w}centerTextInBubble(e){const n=this.w;return e=e+parseInt(n.config.dataLabels.style.fontSize,10)/4,{y:e}}};const rh=(t,e,n,i)=>{if(typeof t!="function")return t;const o=t({series:e.seriesData.series,seriesIndex:n,dataPointIndex:i,w:e});return Number.isFinite(o)?o:0};let Mx=class{constructor(e,n=null){this.w=e,this.ctx=n}dataLabelsCorrection(e,n,i,o,r,a,s){const l=this.w,c=new it(this.w);let u=!1;const d=c.getTextRects(i,s),f=d.width,h=d.height;n<0&&(n=0),n>l.layout.gridHeight+h&&(n=l.layout.gridHeight+h/2),typeof l.globals.dataLabelsRects[o]>"u"&&(l.globals.dataLabelsRects[o]=[]),l.globals.dataLabelsRects[o].push({x:e,y:n,width:f,height:h});const p=l.globals.dataLabelsRects[o].length-2,g=typeof l.globals.lastDrawnDataLabelsIndexes[o]<"u"?l.globals.lastDrawnDataLabelsIndexes[o][l.globals.lastDrawnDataLabelsIndexes[o].length-1]:0;if(typeof l.globals.dataLabelsRects[o][p]<"u"){const m=l.globals.dataLabelsRects[o][g];(e>m.x+m.width||n>m.y+m.height||n+hs.config.dataLabels.formatter(w,{seriesIndex:i,dataPointIndex:f,w:s});s.config.chart.type==="bubble"?(m=s.seriesData.seriesZ[i][f],v=b(m),d=n.y[g],d=new dF(this.w,this.ctx).centerTextInBubble(d).y):typeof m<"u"&&(v=b(m));let y=s.config.dataLabels.textAnchor;s.globals.isSlopeChart&&(f===0?y="end":f===s.config.series[i].data.length-1?y="start":y="middle"),this.plotDataLabelsText({x:u,y:d,text:v,i,j:f,parent:h,offsetCorrection:!0,dataLabelsConfig:s.config.dataLabels,textAnchor:y})}return h}plotDataLabelsText(e){const n=this.w,i=new it(this.w);let{x:o,y:r,i:a,j:s,text:l,textAnchor:c,fontSize:u,parent:d,dataLabelsConfig:f,color:h,alwaysDrawDataLabel:p,offsetCorrection:g,className:m,seriesIndex:v=a,dataPointIndex:b=s}=e,y=null;if(Array.isArray(n.config.dataLabels.enabledOnSeries)&&n.config.dataLabels.enabledOnSeries.indexOf(a)<0)return y;let w={x:o,y:r,drawnextLabel:!0,textRects:null};if(g&&(w=this.dataLabelsCorrection(o,r,l,a,s,p,parseInt(f.style.fontSize,10).toString())),n.interact.zoomed||(o=w.x,r=w.y),w.textRects){const T=n.globals.barPadForNumericAxis||0;(o<-(T+20)-w.textRects.width||o>n.layout.gridWidth+w.textRects.width+T+30)&&(l="")}let x=n.globals.dataLabels.style.colors[a];((n.config.chart.type==="bar"||n.config.chart.type==="rangeBar")&&n.config.plotOptions.bar.distributed||n.config.dataLabels.distributed)&&(x=n.globals.dataLabels.style.colors[s]),typeof x=="function"&&(x=x({series:n.seriesData.series,seriesIndex:a,dataPointIndex:s,w:n})),h&&(x=h);const $=n.config.chart.type==="bar"||n.config.chart.type==="rangeBar",S=$?0:rh(f.offsetX,n,v,b),_=$?0:rh(f.offsetY,n,v,b);let P=S;const O=_;if(n.globals.isSlopeChart&&(s!==0&&(P=S*-2+5),s!==0&&s!==n.config.series[a].data.length-1&&(P=0)),w.drawnextLabel){if(c==="middle"&&o===n.layout.gridWidth&&(c="end"),y=i.drawText({x:o+P,y:r+O,foreColor:x,textAnchor:c||f.textAnchor,text:l,fontSize:u||f.style.fontSize,fontFamily:f.style.fontFamily,fontWeight:f.style.fontWeight||"normal"}),y.attr({class:m||"apexcharts-datalabel",cx:o,cy:r}),f.dropShadow.enabled){const T=f.dropShadow;new zi(this.w).dropShadow(y,T)}d.add(y),Ag(y,o,n),typeof n.globals.lastDrawnDataLabelsIndexes[a]>"u"&&(n.globals.lastDrawnDataLabelsIndexes[a]=[]),n.globals.lastDrawnDataLabelsIndexes[a].push(s)}return y}addBackgroundToDataLabel(e,n){const i=this.w,o=i.config.dataLabels.background,r=o.padding,a=o.padding/2,s=n.width,l=n.height,u=new it(this.w).drawRect(n.x-r,n.y-a/2,s+r*2,l+a,o.borderRadius,i.config.chart.background==="transparent"||!i.config.chart.background?"#fff":i.config.chart.background,o.opacity,o.borderWidth,o.borderColor);return o.dropShadow.enabled&&new zi(this.w).dropShadow(u,o.dropShadow),u}dataLabelsBackground(){var e;const n=this.w;if(n.config.chart.type==="bubble")return;const i=n.dom.baseEl.querySelectorAll(".apexcharts-datalabels text");for(let o=0;o"u"?"":e[o];let u=c;const d=l.formatters.xLabelFormatter,f=l.config.xaxis.labels.formatter,h=new Bc(this.w),p=c;s&&(u=h.xLabelFormat(d,c,p,{i:o,dateFormatter:new Ei(this.w).formatDate,w:l}),f!==void 0&&(u=f(c,e[o],{i:o,dateFormatter:new Ei(this.w).formatDate,w:l}))),n.length>0?(i=n[o].position,u=n[o].value):l.config.xaxis.type==="datetime"&&f===void 0&&(u=""),typeof u>"u"&&(u=""),u=Array.isArray(u)?u:u.toString();const g=new it(this.w);let m={};l.layout.rotateXLabels&&s?m=g.getTextRects(u,parseInt(a,10).toString(),null,`rotate(${l.config.xaxis.labels.rotate} 0 0)`,!1):m=g.getTextRects(u,parseInt(a,10).toString());const v=!l.config.xaxis.labels.showDuplicates&&this.timeScale;return!Array.isArray(u)&&(String(u)==="NaN"||r.indexOf(u)>=0&&v)&&(u=""),{x:i,text:u,textRect:m}}checkLabelBasedOnTickamount(e,n,i){const o=this.w;let r=o.config.xaxis.tickAmount;if(r==="dataPoints"&&(r=Math.round(o.layout.gridWidth/120)),r>i)return n;const a=Math.round(i/(r+1));return e%a===0||(n.text=""),n}checkForOverflowingLabels(e,n,i,o,r){const a=this.w;if(e===0&&a.globals.skipFirstTimelinelabel&&(n.text=""),e===i-1&&a.globals.skipLastTimelinelabel&&(n.text=""),a.config.xaxis.labels.hideOverlappingLabels&&o.length>0){const s=r[r.length-1];if(a.config.xaxis.labels.trim&&a.config.xaxis.type!=="datetime")return n;n.xn.collapsedSeriesIndices.indexOf(i)===-1)}translateYAxisIndex(e){const n=this.w,i=n.globals,o=n.config.yaxis;return n.seriesData.series.length>o.length||o.some(a=>Array.isArray(a.seriesName))?e:i.seriesYAxisReverseMap[e]}isYAxisHidden(e){const n=this.w,i=n.config.yaxis[e];if(!i.show||this.yAxisAllSeriesCollapsed(e))return!0;if(!i.showForNullSeries){const o=n.globals.seriesYAxisMap[e],r=new Xi(this.w);return o.every(a=>r.isSeriesNull(a))}return!1}getYAxisForeColor(e,n){var i;const o=this.w;return Array.isArray(e)&&o.globals.yAxisScale[n]&&((i=this.theme)==null||i.pushExtraColors(e,o.globals.yAxisScale[n].result.length,!1)),e}drawYAxisTicks(e,n,i,o,r,a,s){const l=this.w,c=new it(this.w);let u=l.layout.translateY+l.config.yaxis[r].labels.offsetY;if(l.globals.isBarHorizontal?u=0:l.config.chart.type==="heatmap"&&(u+=a/2),o.show&&n>0){l.config.yaxis[r].opposite===!0&&(e=e+o.width);for(let d=n;d>=0;d--){const f=c.drawLine(e+i.offsetX-o.width+o.offsetX,u+o.offsetY,e+i.offsetX+o.offsetX,u+o.offsetY,o.color);s.add(f),u+=a}}}},Ws=class{constructor(e,n,i){this.w=e,this.ctx=n,this.elgrid=i,this.axesUtils=new Hs(e,{theme:n.theme,timeScale:n.timeScale}),this.xaxisLabels=e.labelData.labels.slice(),e.labelData.timescaleLabels.length>0&&!e.globals.isBarHorizontal&&(this.xaxisLabels=e.labelData.timescaleLabels.slice()),e.config.xaxis.overwriteCategories&&(this.xaxisLabels=e.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],e.config.xaxis.position==="top"?this.offY=0:this.offY=e.layout.gridHeight,this.offY=this.offY+e.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal=e.config.chart.type==="bar"&&e.config.plotOptions.bar.horizontal,this.xaxisFontSize=e.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=e.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=e.config.xaxis.labels.style.colors,this.xaxisBorderWidth=e.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=e.config.yaxis[0].axisBorder.width.toString()),String(this.xaxisBorderWidth).indexOf("%")>-1?this.xaxisBorderWidth=e.layout.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=e.config.xaxis.axisBorder.height,this.yaxis=e.config.yaxis[0]}drawXaxis(){const e=this.w,n=new it(this.w),i=n.group({class:"apexcharts-xaxis",transform:`translate(${e.config.xaxis.offsetX}, ${e.config.xaxis.offsetY})`}),o=n.group({class:"apexcharts-xaxis-texts-g",transform:`translate(${e.layout.translateXAxisX}, ${e.layout.translateXAxisY})`});i.add(o);let r=[];for(let a=0;as),e.labelData.hasXaxisGroups){const a=e.labelData.groups;r=[];for(let l=0;la[l].cols*c,s)}if(e.config.xaxis.title.text!==void 0){const a=n.group({class:"apexcharts-xaxis-title"}),s=n.drawText({x:e.layout.gridWidth/2+e.config.xaxis.title.offsetX,y:this.offY+parseFloat(this.xaxisFontSize)+(e.config.xaxis.position==="bottom"?e.layout.xAxisLabelsHeight:-e.layout.xAxisLabelsHeight-10)+e.config.xaxis.title.offsetY,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+e.config.xaxis.title.style.cssClass});a.add(s),i.add(a)}if(e.config.xaxis.axisBorder.show){const a=e.globals.barPadForNumericAxis,s=n.drawLine(e.globals.padHorizontal+e.config.xaxis.axisBorder.offsetX-a,this.offY,this.xaxisBorderWidth+a,this.offY,e.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(s):i.add(s)}return i}drawXAxisLabelAndGroup(e,n,i,o,r,a,s={}){var l,c;const u=[],d=[],f=this.w,h=s.xaxisFontSize||this.xaxisFontSize,p=s.xaxisFontFamily||this.xaxisFontFamily,g=s.xaxisForeColors||this.xaxisForeColors,m=s.fontWeight||f.config.xaxis.labels.style.fontWeight,v=s.cssClass||f.config.xaxis.labels.style.cssClass;let b,y=f.globals.padHorizontal;const w=o.length;let x=f.config.xaxis.type==="category"?f.globals.dataPoints:w;if(x===0&&w>x&&(x=w),r){const $=Math.max(Number(f.config.xaxis.tickAmount)||1,x>1?x-1:x);b=f.layout.gridWidth/Math.min($,w-1),y=y+a(0,b)/2+f.config.xaxis.labels.offsetX}else b=f.layout.gridWidth/x,y=y+a(0,b)+f.config.xaxis.labels.offsetX;for(let $=0;$<=w-1;$++){let S=y-a($,b)/2+f.config.xaxis.labels.offsetX;$===0&&w===1&&b/2===y&&x===1&&(S=f.layout.gridWidth/2);let _=this.axesUtils.getLabel(o,f.labelData.timescaleLabels,S,$,u,h,e),P=28;f.layout.rotateXLabels&&e&&(P=22),f.config.xaxis.title.text&&f.config.xaxis.position==="top"&&(P+=parseFloat(f.config.xaxis.title.style.fontSize)+2),e||(P=P+parseFloat(h)+(f.layout.xAxisLabelsHeight-f.layout.xAxisGroupLabelsHeight)+(f.layout.rotateXLabels?10:0)),typeof f.config.xaxis.tickAmount<"u"&&f.config.xaxis.tickAmount!=="dataPoints"&&f.config.xaxis.type!=="datetime"?_=this.axesUtils.checkLabelBasedOnTickamount($,_,w):_=this.axesUtils.checkForOverflowingLabels($,_,w,u,d);const T=()=>e&&f.config.xaxis.convertedCatToNumeric?g[f.globals.minX+$-1]:g[$],I=((c=(l=_.textRect)==null?void 0:l.width)!=null?c:0)/2,k=_.x+I<0;if(f.config.xaxis.labels.show&&!k){const E=n.drawText({x:_.x,y:this.offY+f.config.xaxis.labels.offsetY+P-(f.config.xaxis.position==="top"?f.layout.xAxisHeight+f.config.xaxis.axisTicks.height-2:0),text:_.text,textAnchor:"middle",fontWeight:m,fontSize:h,fontFamily:p,foreColor:Array.isArray(g)?T():g,isPlainText:!1,cssClass:(e?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+v});if(i.add(E),E.on("click",R=>{if(typeof f.config.chart.events.xAxisLabelClick=="function"){const D=Object.assign({},f,{labelIndex:$});f.config.chart.events.xAxisLabelClick(R,this.ctx,D)}}),e){const R=nt.createElementNS(Wt,"title");R.textContent=Array.isArray(_.text)?_.text.join(" "):_.text,E.node.appendChild(R),_.text!==""&&(u.push(_.text),d.push(_))}}$"u"?"":s[p];g=u(g,{seriesIndex:e,dataPointIndex:p,w:n});const m=this.axesUtils.getYAxisForeColor(d.style.colors,e),v=()=>Array.isArray(m)?m[p]:m;let b=0;Array.isArray(g)&&(b=g.length/2*parseInt(d.style.fontSize,10));let y=d.offsetX-15,w="end";this.yaxis.opposite&&(w="start"),n.config.yaxis[0].labels.align==="left"?(y=d.offsetX,w="start"):n.config.yaxis[0].labels.align==="center"?(y=d.offsetX,w="middle"):n.config.yaxis[0].labels.align==="right"&&(w="end");const x=i.drawText({x:y,y:c+l+d.offsetY-b,text:g,textAnchor:w,foreColor:v(),fontSize:d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+d.style.cssClass,maxWidth:d.maxWidth});a.add(x),x.on("click",S=>{if(typeof n.config.chart.events.xAxisLabelClick=="function"){const _=Object.assign({},n,{labelIndex:p});n.config.chart.events.xAxisLabelClick(S,this.ctx,_)}});const $=nt.createElementNS(Wt,"title");if($.textContent=Array.isArray(g)?g.join(" "):g,x.node.appendChild($),n.config.yaxis[e].labels.rotate!==0){const S=i.rotateAroundCenter(x.node);x.node.setAttribute("transform",`rotate(${n.config.yaxis[e].labels.rotate} 0 ${S.y})`)}c=c+l}if(n.config.yaxis[0].title.text!==void 0){const p=i.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+o+", 0)"}),g=i.drawText({x:n.config.yaxis[0].title.offsetX,y:n.layout.gridHeight/2+n.config.yaxis[0].title.offsetY,text:n.config.yaxis[0].title.text,textAnchor:"middle",foreColor:n.config.yaxis[0].title.style.color,fontSize:n.config.yaxis[0].title.style.fontSize,fontWeight:n.config.yaxis[0].title.style.fontWeight,fontFamily:n.config.yaxis[0].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+n.config.yaxis[0].title.style.cssClass});p.add(g),r.add(p)}let f=0;this.isCategoryBarHorizontal&&n.config.yaxis[0].opposite&&(f=n.layout.gridWidth);const h=n.config.xaxis.axisBorder;if(h.show){const p=i.drawLine(n.globals.padHorizontal+h.offsetX+f,1+h.offsetY,n.globals.padHorizontal+h.offsetX+f,n.layout.gridHeight+h.offsetY,h.color,0);this.elgrid&&this.elgrid.elGridBorders&&n.config.grid.show?this.elgrid.elGridBorders.add(p):r.add(p)}return n.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(f,s.length,n.config.yaxis[0].axisBorder,n.config.yaxis[0].axisTicks,0,l,r),r}drawXaxisTicks(e,n,i){const o=this.w,r=e;if(e<0||e-2>o.layout.gridWidth)return;const a=this.offY+o.config.xaxis.axisTicks.offsetY;if(n=n+a+o.config.xaxis.axisTicks.height,o.config.xaxis.position==="top"&&(n=a-o.config.xaxis.axisTicks.height),o.config.xaxis.axisTicks.show){const l=new it(this.w).drawLine(e+o.config.xaxis.axisTicks.offsetX,a+o.config.xaxis.offsetY,r+o.config.xaxis.axisTicks.offsetX,n+o.config.xaxis.offsetY,o.config.xaxis.axisTicks.color);i.add(l),l.node.classList.add("apexcharts-xaxis-tick")}}getXAxisTicksPositions(){const e=this.w,n=[],i=this.xaxisLabels.length;let o=e.globals.padHorizontal;if(e.labelData.timescaleLabels.length>0)for(let r=0;r{r.placeTextWithEllipsis(h,h.textContent,o.layout.xAxisLabelsHeight-(o.config.legend.position==="bottom"?20:10))})}else{const u=o.layout.gridWidth/(o.labelData.labels.length+1);for(let d=0;d{r.placeTextWithEllipsis(h,h.textContent,u)})}}if(l.length>0){const u=l[l.length-1].getBBox(),d=l[0].getBBox();u.x<-20&&((e=l[l.length-1].parentNode)==null||e.removeChild(l[l.length-1])),d.x+d.width>o.layout.gridWidth&&!o.globals.isBarHorizontal&&((n=l[0].parentNode)==null||n.removeChild(l[0]));for(let f=0;f0&&(this.xaxisLabels=e.labelData.timescaleLabels.slice())}drawGridArea(e=null){const n=this.w,i=new it(this.w);e||(e=i.group({class:"apexcharts-grid"}));const o=i.drawLine(n.globals.padHorizontal,1,n.globals.padHorizontal,n.layout.gridHeight,"transparent"),r=i.drawLine(n.globals.padHorizontal,n.layout.gridHeight,n.layout.gridWidth,n.layout.gridHeight,"transparent");return e.add(r),e.add(o),e}drawGrid(){if(this.w.globals.axisCharts){const n=this.renderGrid();return this.drawGridArea(n.el),n}return null}createGridMask(){const e=this.w,n=e.globals,i=new it(this.w),o=Array.isArray(e.config.stroke.width)?Math.max(...e.config.stroke.width):e.config.stroke.width,r=d=>{const f=nt.createElementNS(Wt,"clipPath");return f.setAttribute("id",d),f};e.dom.elGridRectMask=r(`gridRectMask${n.cuid}`),e.dom.elGridRectBarMask=r(`gridRectBarMask${n.cuid}`),e.dom.elGridRectMarkerMask=r(`gridRectMarkerMask${n.cuid}`),e.dom.elForecastMask=r(`forecastMask${n.cuid}`),e.dom.elNonForecastMask=r(`nonForecastMask${n.cuid}`);const a=["bar","rangeBar","candlestick","boxPlot","violin"].includes(e.config.chart.type)||e.globals.comboBarCount>0;let s=0,l=0;a&&e.axisFlags.isXNumeric&&!e.globals.isBarHorizontal&&(s=Math.max(e.layout.gridPad.left,n.barPadForNumericAxis),l=Math.max(e.layout.gridPad.right,n.barPadForNumericAxis)),e.dom.elGridRect=i.drawRect(-o/2-2,-o/2-2,e.layout.gridWidth+o+4,e.layout.gridHeight+o+4,0,"#fff"),e.dom.elGridRectBar=i.drawRect(-o/2-s-2,-o/2-2,e.layout.gridWidth+o+l+s+4,e.layout.gridHeight+o+4,0,"#fff");const c=e.globals.markers.largestSize;e.dom.elGridRectMarker=i.drawRect(Math.min(-o/2-s-2,-c),-c,e.layout.gridWidth+Math.max(o+l+s+4,c*2),e.layout.gridHeight+c*2,0,"#fff"),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectBarMask.appendChild(e.dom.elGridRectBar.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);const u=e.dom.elDefs.node;u.appendChild(e.dom.elGridRectMask),u.appendChild(e.dom.elGridRectBarMask),u.appendChild(e.dom.elGridRectMarkerMask),u.appendChild(e.dom.elForecastMask),u.appendChild(e.dom.elNonForecastMask)}_drawGridLines({i:e,x1:n,y1:i,x2:o,y2:r,xCount:a,parent:s}){const l=this.w;if(!(e===0&&l.globals.skipFirstTimelinelabel||e===a-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||l.config.chart.type==="radar")){l.config.grid.xaxis.lines.show&&this._drawGridLine({i:e,x1:n,y1:i,x2:o,y2:r,xCount:a,parent:s});let u=0;if(l.labelData.hasXaxisGroups&&l.config.xaxis.tickPlacement==="between"){const f=l.labelData.groups;if(f){let h=0;for(let p=0;h{for(let f=0;fo.layout.gridWidth)&&this._drawGridLines({i:f,x1:l,y1:c,x2:u,y2:d,xCount:e,parent:this.elgridLinesV})},a=({xC:s,x1:l,y1:c,x2:u,y2:d})=>{for(let f=0;f0&&o.config.xaxis.type!=="datetime"&&(c=r.yAxisScale[s].result.length-1)),this._drawXYLines({xCount:c,tickAmount:l})):(c=l,l=r.xTickAmount,this._drawInvertedXYLines({xCount:c,tickAmount:l})),this.drawGridBands(c,l),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:o.layout.gridWidth/c}}drawGridBands(e,n){var i,o,r,a,s;const l=this.w,c=(u,d,f,h,p,g)=>{for(let m=0,v=0;m=l.config.grid[u].colors.length&&(v=0),this._drawGridBandRect({c:v,x1:f,y1:h,x2:p,y2:g,type:u}),h+=l.layout.gridHeight/n};if(((i=l.config.grid.row.colors)==null?void 0:i.length)>0&&c("row",n,0,0,l.layout.gridWidth,l.layout.gridHeight/n),((o=l.config.grid.column.colors)==null?void 0:o.length)>0){let u=!l.globals.isBarHorizontal&&l.config.xaxis.tickPlacement==="on"&&(l.config.xaxis.type==="category"||l.config.xaxis.convertedCatToNumeric)?e-1:e;l.axisFlags.isXNumeric&&(u=((a=(r=l.globals.xAxisScale)==null?void 0:r.result.length)!=null?a:1)-1);let d=l.globals.padHorizontal;const f=0;let h=l.globals.padHorizontal+l.layout.gridWidth/u;const p=l.layout.gridHeight;for(let g=0,m=0;g=l.config.grid.column.colors.length&&(m=0),l.config.xaxis.type==="datetime"&&(d=this.xaxisLabels[g].position,h=(((s=this.xaxisLabels[g+1])==null?void 0:s.position)||l.layout.gridWidth)-this.xaxisLabels[g].position),this._drawGridBandRect({c:m,x1:d,y1:f,x2:h,y2:p,type:"column"}),d+=l.layout.gridWidth/u}}},fF=class{constructor(e){this.w=e,this.coreUtils=new Xi(this.w)}niceScale(e,n,i=0){const r=this.w,a=r.globals;let s,l,c,u;a.isBarHorizontal?(s=r.config.xaxis,l=Math.max((a.svgWidth-100)/25,2)):(s=r.config.yaxis[i],l=Math.max((a.svgHeight-100)/15,2)),we.isNumber(l)||(l=10),c=s.min!==void 0&&s.min!==null,u=s.max!==void 0&&s.max!==null;let d=s.stepSize!==void 0&&s.stepSize!==null,f=s.tickAmount!==void 0&&s.tickAmount!==null,h=f?s.tickAmount:Cg[Math.min(Math.round(l/2),Cg.length-1)];if(a.isMultipleYAxis&&!f&&a.multiAxisTickAmount>0&&(h=a.multiAxisTickAmount,f=!0),h==="dataPoints"?h=a.dataPoints-1:h=Math.abs(Math.round(h)),(e===Number.MIN_VALUE&&n===0||!we.isNumber(e)&&!we.isNumber(n)||e===Number.MIN_VALUE&&n===-Number.MAX_VALUE)&&(e=we.isNumber(s.min)?s.min:0,n=we.isNumber(s.max)?s.max:e+h,a.allSeriesCollapsed=!1),e>n){console.warn("axis.min cannot be greater than axis.max: swapping min and max");const M=n;n=e,e=M}else e===n&&(e=e===0?0:e-1,n=n===0?2:n+1);const p=[];h<1&&(h=1);let g=h,m=Math.abs(n-e);const v=.15;!c&&e>0&&e/m0&&el&&(e=n-b*h,e+=b*Math.floor((M-e)/b))}else if(c)if(f)n=e+b*g;else{const M=n;n=b*Math.ceil(n/b),Math.abs(n-e)/we.getGCD(m,b)>l&&(n=e+b*h,n+=b*Math.ceil((M-n)/b))}m=Math.abs(n-e),b=we.getGCD(m,b),g=Math.round(m/b)}if(!f&&!(c||u)&&(g=Math.ceil((m-1e-11)/(b+1e-11)),g>16&&we.getPrimeFactors(g).length<2&&g++),!f&&s.forceNiceScale&&a.yValueDecimal===0&&g>m&&(g=m,b=Math.round(m/g)),g>l&&(!(f||d)||s.forceNiceScale)){const M=we.getPrimeFactors(g),I=M.length-1;let k=g;e:for(var S=0;ST);return{result:p,niceMin:p[0],niceMax:p[p.length-1]}}linearScale(e,n,i=10,o=0,r=void 0){const a=Math.abs(n-e);let s=[];if(e===n)return s=[e],{result:s,niceMin:s[0],niceMax:s[s.length-1]};i=this._adjustTicksForSmallRange(i,o,a),i==="dataPoints"&&(i=this.w.globals.dataPoints-1);const l=i;r||(r=a/l);const c=2;if(r!==0&&isFinite(r)){const f=Math.floor(Math.log10(Math.abs(r))),h=Math.max(c,-f+c),p=Math.pow(10,h);r=Math.round((r+Number.EPSILON)*p)/p}let u=i===Number.MAX_VALUE?5:l;i===Number.MAX_VALUE&&(r=1);let d=e;for(;u>=0;)s.push(d),d=we.preciseAddition(d,r),u-=1;return{result:s,niceMin:s[0],niceMax:s[s.length-1]}}_resolveLogTickAmount(e){let n=e.tickAmount;return n==="dataPoints"&&(n=this.w.globals.dataPoints-1),we.isNumber(n)&&n>=1?Number(n):null}_thinToTickAmount(e,n){if(n===null||!we.isNumber(n)||n<1)return e;const i=n+1;if(e.length<=i)return e;const o=e.length-1;let r=null;for(let s=1;s<=o;s++){if(o%s!==0)continue;const l=o/s+1;l>i||(r===null||l>r.count)&&(r={stride:s,count:l})}if(!r)return[e[0],e[e.length-1]];const a=[];for(let s=0;s"u"&&(o.yAxisScale[e]=[]);const s=Math.abs(i-n),l=a.logarithmic&&this._logDomainSpan(n,i,a.logBase)>=1,c=a.logarithmic&&(l||s>5);if(a.logarithmic&&!c&&(o.invalidLogScale=!0),c){o.allSeriesCollapsed=!1;const u=this._resolveLogTickAmount(a);o.yAxisScale[e]=a.forceNiceScale?this.logarithmicScaleNice(n,i,a.logBase,u):this.logarithmicScale(n,i,a.logBase,u)}else i===-Number.MAX_VALUE||!we.isNumber(i)||n===Number.MAX_VALUE||!we.isNumber(n)?o.yAxisScale[e]=this.niceScale(Number.MIN_VALUE,0,e):(o.allSeriesCollapsed=!1,o.yAxisScale[e]=this.niceScale(n,i,e))}setXScale(e,n){const i=this.w,o=i.globals;if(n===-Number.MAX_VALUE||!we.isNumber(n))o.xAxisScale=this.linearScale(0,10,10);else{const r=o.xTickAmount;o.xAxisScale=this.linearScale(e,n,r,0,i.config.xaxis.max===void 0?i.config.xaxis.stepSize:void 0)}return o.xAxisScale}scaleMultipleYAxes(){const e=this.w.config,n=this.w.globals;this.coreUtils.setSeriesYAxisMappings();const i=n.seriesYAxisMap,o=n.minYArr,r=n.maxYArr,a=[],s=!n.isBarHorizontal;if(n.allSeriesCollapsed=!0,n.barGroups=[],i.forEach((l,c)=>{const u=[];if(l.forEach(d=>{var f;const h=(f=e.series[d])==null?void 0:f.group;u.indexOf(h)<0&&u.push(h)}),l.length>0){let d=Number.MAX_VALUE,f=-Number.MAX_VALUE,h=d,p=f,g,m;if(e.chart.stacked){const y=new Array(n.dataPoints).fill(0),w=[],x=[],$=[];u.forEach(()=>{w.push(y.map(()=>Number.MIN_VALUE)),x.push(y.map(()=>Number.MIN_VALUE)),$.push(y.map(()=>Number.MIN_VALUE))});for(let S=0;S{if(e.series[_].group===O)for(let M=0;M=0?x[T][M]+=I:$[T][M]+=I,w[T][M]+=I,h=Math.min(h,I),p=Math.max(p,I)}})),(g==="bar"||g==="column")&&n.barGroups.push(m)}g||(g=e.chart.type),g==="bar"||g==="column"?u.forEach((S,_)=>{d=Math.min(d,Math.min.apply(null,$[_])),f=Math.max(f,Math.max.apply(null,x[_]))}):(u.forEach((S,_)=>{h=Math.min(h,Math.min.apply(null,w[_])),p=Math.max(p,Math.max.apply(null,w[_]))}),d=h,f=p),d===Number.MIN_VALUE&&f===Number.MIN_VALUE&&(f=-Number.MAX_VALUE)}else for(let y=0;yx.indexOf(y)===w);const v=e.yaxis[c];s&&v.alignZero===!0&&!v.logarithmic&&v.min===void 0&&v.max===void 0&&n.ignoreYAxisIndexes.indexOf(c)<0&&we.isNumber(d)&&we.isNumber(f)?a.push({ai:c,minY:d,maxY:f}):(this.setYScaleForIndex(c,d,f),l.forEach(y=>{o[y]=n.yAxisScale[c].niceMin,r[y]=n.yAxisScale[c].niceMax}))}else this.setYScaleForIndex(c,0,-Number.MAX_VALUE)}),a.length>=2){a.forEach(u=>{this.setYScaleForIndex(u.ai,u.minY,u.maxY),i[u.ai].forEach(d=>{o[d]=n.yAxisScale[u.ai].niceMin,r[d]=n.yAxisScale[u.ai].niceMax})});let l=0;a.forEach(u=>{const d=n.yAxisScale[u.ai],f=d.niceMax-d.niceMin;if(f>0){const h=-d.niceMin/f;h>l&&(l=h)}}),l>1&&(l=1),l<0&&(l=0);const c=u=>{if(u<=0)return 1;const d=Math.floor(Math.log10(u)),f=Math.pow(10,d),h=u/f;let p;return h<=1+1e-9?p=1:h<=2+1e-9?p=2:h<=2.5+1e-9?p=2.5:h<=5+1e-9?p=5:p=10,p*f};a.forEach(u=>{const d=n.yAxisScale[u.ai];if(!d.result||d.result.length<2)return;const f=d.niceMax-d.niceMin;if(f<=0)return;const h=-d.niceMin/f;if(Math.abs(h-l)<=1e-9)return;const p=hl&&l>1e-9;if(!p&&!g)return;const m=p?-l*d.niceMax/(1-l):d.niceMin,v=g?-d.niceMin*(1-l)/l:d.niceMax,b=v-m;if(b<=0)return;const y=Math.max(d.result.length,5),w=c(b/Math.max(y-1,1));if(w<=0)return;let x,$;if(p){x=Math.floor(m/w+1e-9)*w;const S=l>1e-9?x*(l-1)/l:d.niceMax,_=Math.max(S,d.niceMax);$=Math.ceil(_/w-1e-9)*w}else{$=Math.ceil(v/w-1e-9)*w;const S=l<1-1e-9?-l*$/(1-l):d.niceMin,_=Math.min(S,d.niceMin);x=Math.floor(_/w+1e-9)*w}d.result=[];for(let S=x;S<=$+w*1e-9;S=we.preciseAddition(S,w))d.result.push(we.stripNumber(S,7));d.niceMin=x,d.niceMax=$,i[u.ai].forEach(S=>{o[S]=d.niceMin,r[S]=d.niceMax})})}else if(a.length===1){const l=a[0];this.setYScaleForIndex(l.ai,l.minY,l.maxY),i[l.ai].forEach(c=>{o[c]=n.yAxisScale[l.ai].niceMin,r[c]=n.yAxisScale[l.ai].niceMax})}}},Pg=class{constructor(e){this.w=e,this.scales=new fF(this.w)}init(){this.setYRange(),this.setXRange(),this.setZRange()}_xPixelTolerance(e){const n=this.w.layout.gridWidth;if(!n||!e||!e.length)return 0;const i=this.w.config.xaxis,o=typeof i.min=="number"?i.min:e[0],r=typeof i.max=="number"?i.max:e[e.length-1];return r>o?(r-o)/n:0}_autoScaleYEnabled(){var e;const n=this.w.config,i=(e=this.w.globals.brushSource)==null?void 0:e.w.config.chart.brush;return!!(n.chart.zoom.enabled&&n.chart.zoom.autoScaleYaxis||i!=null&&i.enabled&&(i!=null&&i.autoScaleYaxis))}_autoScaleXBounds(e){const n=this.w.config.xaxis;if(!n.min&&!n.max)return null;const i=this._xPixelTolerance(this.w.seriesData.seriesX[e]);return{lo:n.min?n.min-i:-1/0,hi:n.max?n.max+i:1/0}}getMinYMaxY(e,n=Number.MAX_VALUE,i=-Number.MAX_VALUE,o=null){var r,a,s,l,c,u,d,f;const h=this.w.config,p=this.w.globals;let g=-Number.MAX_VALUE,m=Number.MIN_VALUE;o===null&&(o=e+1);const v=this.w.seriesData.series;let b=v,y=v;h.chart.type==="candlestick"?(b=this.w.candleData.seriesCandleL,y=this.w.candleData.seriesCandleH):h.chart.type==="boxPlot"?(b=this.w.candleData.seriesCandleO,y=this.w.candleData.seriesCandleC):h.chart.type==="violin"?(b=this.w.violinData.seriesViolinMin,y=this.w.violinData.seriesViolinMax):this.w.axisFlags.isRangeData&&(b=this.w.rangeData.seriesRangeStart,y=this.w.rangeData.seriesRangeEnd);let w=!1,x=!1;this.w.seriesData.seriesX.length>=o&&this._autoScaleYEnabled()&&!this._ignoreAutoScaleWindow&&(w=!0);for(let $=e;$typeof T<"u").length),this.w.labelData.labels.length&&h.xaxis.type!=="datetime"&&this.w.seriesData.series.reduce((T,M)=>T+M.length,0)!==0&&(p.dataPoints=Math.max(p.dataPoints,this.w.labelData.labels.length));let _=0,P=v[$].length-1;if(w){const T=this.w.seriesData.seriesX[$],M=this._autoScaleXBounds($);if(M&&h.xaxis.min)for(;__&&T[P]>M.hi;P--);M&&T&&T.length&&(T[_]>=M.lo&&T[_]<=M.hi||(T[0]M.hi&&_>0?(P=_,_=P-1):(_=0,P=-1,x=!0)))}if(b===v&&y===v&&h.chart.type!=="boxPlot"&&S!=="candlestick"&&S!=="boxPlot"&&S!=="violin"&&S!=="rangeArea"&&S!=="rangeBar"&&!(this.w.seriesData.seriesGoals[$]&&this.w.seriesData.seriesGoals[$].length)){const T=v[$],M=Math.min(P,T.length-1),I=(r=this.w.seriesData._parsedExtrema)==null?void 0:r[$];if(I&&I.ref===T&&I.len===T.length&&_===0&&M===T.length-1)I.maxY>g&&(g=I.maxY),I.lowestYp.yValueDecimal&&(p.yValueDecimal=I.yDec),I.hasNulls&&(p.hasNullValues=!0);else{let k=p.yValueDecimal,E=!1;for(let R=_;R<=M;R++){const D=T[R];if(D!==null&&typeof D=="number"&&D===D&&D!==1/0&&D!==-1/0){if(D>g&&(g=D),DD&&D<0&&(m=D),!Number.isInteger(D)){const F=D<0?-D:D;if(F>=1e-6&&F<1e21){const N=""+D,B=N.indexOf("."),z=B===-1?0:N.length-B-1;z>k&&(k=z)}else{const N=we.noExponents(D);we.isFloat(N)&&(k=Math.max(k,N.toString().split(".")[1].length))}}}else E=!0}p.yValueDecimal=k,E&&(p.hasNullValues=!0)}i=g,(S==="bar"||S==="column")&&(m<0&&g<0&&(g=0,i=Math.max(i,0)),m===Number.MIN_VALUE&&(m=0,n=Math.min(n,0)));continue}for(let T=_;T<=P&&T{g=Math.max(g,I.value),n=Math.min(n,I.value)}),this.w.config.chart.type==="boxPlot"||S==="boxPlot"){const I=(u=(c=this.w.candleData.seriesBoxPoints)==null?void 0:c[$])==null?void 0:u[T];if(I)for(let k=0;k((d=b[$])==null?void 0:d[T])&&((f=b[$])==null?void 0:f[T])<0&&(m=b[$][T])}else p.hasNullValues=!0}(S==="bar"||S==="column")&&(m<0&&g<0&&(g=0,i=Math.max(i,0)),m===Number.MIN_VALUE&&(m=0,n=Math.min(n,0)))}if(h.chart.type==="rangeBar"&&this.w.rangeData.seriesRangeStart.length&&p.isBarHorizontal&&(m=n),h.chart.type==="bar"&&(m<0&&g<0&&(g=0),m===Number.MIN_VALUE&&(m=0)),x&&g===-Number.MAX_VALUE){this._ignoreAutoScaleWindow=!0;try{return this.getMinYMaxY(e,Number.MAX_VALUE,-Number.MAX_VALUE,o)}finally{this._ignoreAutoScaleWindow=!1}}return{minY:m,maxY:g,lowestY:n,highestY:i}}setYRange(){const e=this.w.globals,n=this.w.config;e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE;let i=Number.MAX_VALUE,o;if(e.isMultipleYAxis){i=Number.MAX_VALUE;for(let r=0;r{r.max!==void 0&&(typeof r.max=="number"?e.maxYArr[a]=r.max:typeof r.max=="function"&&(e.maxYArr[a]=r.max(e.isMultipleYAxis?e.maxYArr[a]:e.maxY)),e.maxY=e.maxYArr[a]),r.min!==void 0&&(typeof r.min=="number"?e.minYArr[a]=r.min:typeof r.min=="function"&&(e.minYArr[a]=r.min(e.isMultipleYAxis?e.minYArr[a]===Number.MIN_VALUE?0:e.minYArr[a]:e.minY)),e.minY=e.minYArr[a])}),e.isBarHorizontal&&["min","max"].forEach(a=>{n.xaxis[a]!==void 0&&typeof n.xaxis[a]=="number"&&(a==="min"?e.minY=n.xaxis[a]:e.maxY=n.xaxis[a])}),e.isMultipleYAxis?(this.scales.scaleMultipleYAxes(),e.minY=i):(this.scales.setYScaleForIndex(0,e.minY,e.maxY),e.minY=e.yAxisScale[0].niceMin,e.maxY=e.yAxisScale[0].niceMax,e.minYArr[0]=e.minY,e.maxYArr[0]=e.maxY),e.barGroups=[],e.lineGroups=[],e.areaGroups=[],n.series.forEach(r=>{const a=r;switch(a.type||n.chart.type){case"bar":case"column":e.barGroups.push(a.group);break;case"line":e.lineGroups.push(a.group);break;case"area":e.areaGroups.push(a.group);break}}),e.barGroups=e.barGroups.filter((r,a,s)=>s.indexOf(r)===a),e.lineGroups=e.lineGroups.filter((r,a,s)=>s.indexOf(r)===a),e.areaGroups=e.areaGroups.filter((r,a,s)=>s.indexOf(r)===a),{minY:e.minY,maxY:e.maxY,minYArr:e.minYArr,maxYArr:e.maxYArr,yAxisScale:e.yAxisScale}}setXRange(){const e=this.w.globals,n=this.w.config,i=n.xaxis.type==="numeric"||n.xaxis.type==="datetime"||n.xaxis.type==="category"&&!this.w.axisFlags.noLabelsProvided||this.w.axisFlags.noLabelsProvided||this.w.axisFlags.isXNumeric,o=()=>{var r;let a=e.minX,s=e.maxX;for(let l=0;ls&&(s=u.maxX),u.minXs&&(s=f),fArray.isArray(d)?d.reduce((f,h)=>Math.max(f,String(h).length),u):u,0),c=e.dataPoints*l*s*.6<=e.svgWidth;(n.xaxis.type==="numeric"||a&&c)&&e.dataPoints<30&&(r=e.dataPoints-1),r>e.dataPoints&&e.dataPoints!==0&&(r=e.dataPoints-1)}else if(n.xaxis.tickAmount==="dataPoints"){if(this.w.seriesData.series.length>1&&(r=this.w.seriesData.series[e.maxValsInArrayIndex].length-1),this.w.axisFlags.isXNumeric){const a=Math.round(e.maxX-e.minX);a<30&&(r=a)}}else r=n.xaxis.tickAmount;if(e.xTickAmount=r,n.xaxis.max!==void 0&&typeof n.xaxis.max=="number"&&(e.maxX=n.xaxis.max),n.xaxis.min!==void 0&&typeof n.xaxis.min=="number"&&(e.minX=n.xaxis.min),n.xaxis.range!==void 0&&(e.minX=e.maxX-n.xaxis.range),e.minX!==Number.MAX_VALUE&&e.maxX!==-Number.MAX_VALUE)if(n.xaxis.convertedCatToNumeric&&!this.w.axisFlags.dataFormatXNumeric){const a=[];for(let s=e.minX-1;s0&&(e.xAxisScale=this.scales.linearScale(1,this.w.labelData.labels.length,r-1,0,n.xaxis.stepSize),this.w.seriesData.seriesX=this.w.labelData.labels.slice());i&&(this.w.labelData.labels=e.xAxisScale.result.slice())}return e.isBarHorizontal&&this.w.labelData.labels.length&&(e.xTickAmount=this.w.labelData.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:e.minX,maxX:e.maxX}}setZRange(){var e;const n=this.w.globals;if(!this.w.axisFlags.isDataXYZ)return;for(let o=0;on.maxZ&&(n.maxZ=i.maxZ)}_handleSingleDataPoint(){const e=this.w.globals,n=this.w.config;if(e.minX===e.maxX){const i=new Ei(this.w);if(n.xaxis.type==="datetime"){const o=i.getDate(e.minX);n.xaxis.labels.datetimeUTC?o.setUTCDate(o.getUTCDate()-2):o.setDate(o.getDate()-2),e.minX=new Date(o).getTime();const r=i.getDate(e.maxX);n.xaxis.labels.datetimeUTC?r.setUTCDate(r.getUTCDate()+2):r.setDate(r.getDate()+2),e.maxX=new Date(r).getTime()}else(n.xaxis.type==="numeric"||n.xaxis.type==="category"&&!this.w.axisFlags.noLabelsProvided)&&(e.minX=e.minX-2,e.initialMinX=e.minX,e.maxX=e.maxX+2,e.initialMaxX=e.maxX)}}_getMinXDiff(){const e=this.w.globals;this.w.axisFlags.isXNumeric&&this.w.seriesData.seriesX.forEach((n,i)=>{var o;if(n.length){n.length===1&&n.push(this.w.seriesData.seriesX[e.maxValsInArrayIndex][this.w.seriesData.seriesX[e.maxValsInArrayIndex].length-1]);const r=(o=this.w.seriesData._parsedExtrema)==null?void 0:o[i];if(r&&r.xNumeric&&r.xSorted&&r.xref===n&&r.len===n.length){r.minXDiff0)uc-u),l.forEach((c,u)=>{if(u>0){const d=c-l[u-1];d>0&&(e.minXDiff=Math.min(d,e.minXDiff))}}),(e.dataPoints===1||e.minXDiff===Number.MAX_VALUE)&&(e.minXDiff=.5)}})}_setStackedMinMax(){const e=this.w.globals,n=this._autoScaleYEnabled();if(!this.w.seriesData.series.length)return;let i=this.w.labelData.seriesGroups;i.length||(i=[this.w.seriesData.seriesNames.map(a=>a)]);const o={},r={};i.forEach(a=>{o[a]=[],r[a]=[],this.w.config.series.map((l,c)=>a.indexOf(this.w.seriesData.seriesNames[c])>-1?c:null).filter(l=>l!==null).forEach(l=>{var c,u,d,f;const h=n?this._autoScaleXBounds(l):null,p=this.w.seriesData.seriesX[l],g=!!(h&&p&&p.length);for(let m=0;mh.hi))continue;typeof o[a][m]>"u"&&(o[a][m]=0,r[a][m]=0),(this.w.config.chart.stacked&&!e.comboCharts||this.w.config.chart.stacked&&e.comboCharts&&(!this.w.config.chart.stackOnlyBar||((u=(c=this.w.config.series)==null?void 0:c[l])==null?void 0:u.type)==="bar"||((f=(d=this.w.config.series)==null?void 0:d[l])==null?void 0:f.type)==="column"))&&this.w.seriesData.series[l][m]!==null&&we.isNumber(this.w.seriesData.series[l][m])&&(this.w.seriesData.series[l][m]>0?o[a][m]+=parseFloat(String(this.w.seriesData.series[l][m]))+1e-4:r[a][m]+=parseFloat(String(this.w.seriesData.series[l][m])))}})}),Object.entries(o).forEach(([a])=>{o[a].forEach((s,l)=>{e.maxY=Math.max(e.maxY,o[a][l]),e.minY=Math.min(e.minY,r[a][l])})})}};function Tg(){return{palette1:["#008FFB","#00A86F","#CA8501","#FF4560","#846DD5"],palette2:["#6978CB","#039DE2","#49A84D","#B39105","#D68000"],palette3:["#209FCC","#648291","#D4526E","#0FA783","#A19285"],palette4:["#2FA59D","#73A20B","#099DE1","#FD5D5D","#648291"],palette5:["#2B908F","#F56566","#2EAB16","#FA4443","#1EA2BD"],palette6:["#449DD1","#F86624","#EA3A4A","#9C63D1","#899E2A"],palette7:["#DF475B","#1B998B","#7E75B7","#F46036","#B1911B"],palette8:["#9C63D1","#F86624","#B38F04","#EA3A4A","#2FA2B3"],palette9:["#98776F","#A19285","#A8705E","#BA6560","#A0927F"],palette10:["#C91EFF","#A94BFD","#6C6AFE","#2983FF","#009ED8"],cvdDeuteranopia:["#0072B2","#E69F00","#56B4E9","#009E73","#F0E442","#D55E00","#CC79A7"],cvdProtanopia:["#0077BB","#EE7733","#009988","#EE3377","#BBBBBB","#33BBEE","#CC3311"],cvdTritanopia:["#CC3311","#009988","#EE7733","#0077BB","#EE3377","#BBBBBB","#33BBEE"],highContrast:["#005A9C","#C00000","#007A33","#6C3483","#7B3F00","#0097A7","#4A235A"]}}let Id=class{constructor(e,{theme:n=null,timeScale:i=null}={},o){this.w=e,this.elgrid=o,this.xaxisFontSize=e.config.xaxis.labels.style.fontSize,this.axisFontFamily=e.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=e.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal=e.config.chart.type==="bar"&&e.config.plotOptions.bar.horizontal,this.xAxisoffX=e.config.xaxis.position==="bottom"?e.layout.gridHeight:0,this.drawnLabels=[],this.axesUtils=new Hs(e,{theme:n,timeScale:i})}drawYaxis(e){const n=this.w,i=new it(this.w),o=n.config.yaxis[e].labels.style,{fontSize:r,fontFamily:a,fontWeight:s}=o,l=i.group({class:"apexcharts-yaxis",rel:e,transform:`translate(${n.globals.translateYAxisX[e]}, 0)`});if(this.axesUtils.isYAxisHidden(e))return l;const c=i.group({class:"apexcharts-yaxis-texts-g"});l.add(c);const u=n.globals.yAxisScale[e].result.length-1,d=n.layout.gridHeight/u,f=n.formatters.yLabelFormatters[e],h=this.axesUtils.checkForReversedLabels(e,n.globals.yAxisScale[e].result.slice());let p=1;if(n.config.chart.type==="heatmap"&&!n.config.yaxis[e].labels.formatter){const g=parseInt(r,10)||11,m=Math.max(1,Math.floor(n.layout.gridHeight/(g*1.4))),v=u+1;v>m&&(p=Math.ceil(v/m))}if(n.config.yaxis[e].labels.show){let g=n.layout.translateY+n.config.yaxis[e].labels.offsetY;n.globals.isBarHorizontal?g=0:n.config.chart.type==="heatmap"&&(g-=d/2),g+=parseInt(r,10)/3;let m=null;for(let v=u;v>=0;v--){const y=p>1&&v%p!==0?"":f(h[v],v,n);let w=n.config.yaxis[e].labels.padding;n.config.yaxis[e].opposite&&n.config.yaxis.length!==0&&(w*=-1);const x=this.getTextAnchor(n.config.yaxis[e].labels.align,n.config.yaxis[e].opposite),$=this.axesUtils.getYAxisForeColor(o.colors,e),S=Array.isArray($)?$[v]:$,_=Array.from(n.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${e}'] .apexcharts-yaxis-label tspan`)).map(O=>O.textContent),P=i.drawText({x:w,y:g,text:_.includes(y)&&!n.config.yaxis[e].labels.showDuplicates?"":y,textAnchor:x,fontSize:r,fontFamily:a,fontWeight:s,maxWidth:n.config.yaxis[e].labels.maxWidth,foreColor:S,isPlainText:!1,cssClass:`apexcharts-yaxis-label ${o.cssClass}`});c.add(P),this.addTooltip(P,y),m===null&&(m=P),n.config.yaxis[e].labels.rotate!==0&&this.rotateLabel(i,P,m,n.config.yaxis[e].labels.rotate),g+=d}}return this.addYAxisTitle(i,l,e),this.addAxisBorder(i,l,e,u,d),l}getTextAnchor(e,n){return e==="left"?"start":e==="center"?"middle":e==="right"?"end":n?"start":"end"}addTooltip(e,n){const i=nt.createElementNS(Wt,"title");i.textContent=Array.isArray(n)?n.join(" "):n,e.node.appendChild(i)}rotateLabel(e,n,i,o){const r=e.rotateAroundCenter(i.node),a=e.rotateAroundCenter(n.node);n.node.setAttribute("transform",`rotate(${o} ${r.x} ${a.y})`)}addYAxisTitle(e,n,i){const o=this.w;if(o.config.yaxis[i].title.text!==void 0){const r=e.group({class:"apexcharts-yaxis-title"}),a=o.config.yaxis[i].opposite?o.globals.translateYAxisX[i]:0,s=e.drawText({x:a,y:o.layout.gridHeight/2+o.layout.translateY+o.config.yaxis[i].title.offsetY,text:o.config.yaxis[i].title.text,textAnchor:"end",foreColor:o.config.yaxis[i].title.style.color,fontSize:o.config.yaxis[i].title.style.fontSize,fontWeight:o.config.yaxis[i].title.style.fontWeight,fontFamily:o.config.yaxis[i].title.style.fontFamily,cssClass:`apexcharts-yaxis-title-text ${o.config.yaxis[i].title.style.cssClass}`});r.add(s),n.add(r)}}addAxisBorder(e,n,i,o,r){const a=this.w,s=a.config.yaxis[i].axisBorder;let l=31+s.offsetX;if(a.config.yaxis[i].opposite&&(l=-31-s.offsetX),s.show){const c=e.drawLine(l,a.layout.translateY+s.offsetY-2,l,a.layout.gridHeight+a.layout.translateY+s.offsetY+2,s.color,0,s.width);n.add(c)}a.config.yaxis[i].axisTicks.show&&this.axesUtils.drawYAxisTicks(l,o,s,a.config.yaxis[i].axisTicks,i,r,n)}drawYaxisInversed(e){const n=this.w,i=new it(this.w),o=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),r=i.group({class:"apexcharts-xaxis-texts-g",transform:`translate(${n.layout.translateXAxisX}, ${n.layout.translateXAxisY})`});o.add(r);let a=n.globals.yAxisScale[e].result.length-1;const s=n.layout.gridWidth/a+.1;let l=s+n.config.xaxis.labels.offsetX;const c=n.formatters.xLabelFormatter;let u=this.axesUtils.checkForReversedLabels(e,n.globals.yAxisScale[e].result.slice());const d=n.labelData.timescaleLabels;if(d.length>0&&(this.xaxisLabels=d.slice(),u=d.slice(),a=u.length),n.config.xaxis.labels.show)for(let f=d.length?0:a;d.length?f=0;d.length?f++:f--){let h=c==null?void 0:c(u[f],f,n),p=n.layout.gridWidth+n.globals.padHorizontal-(l-s+n.config.xaxis.labels.offsetX);if(d.length){const m=this.axesUtils.getLabel(u,d,p,f,this.drawnLabels,this.xaxisFontSize);p=m.x,h=m.text,this.drawnLabels.push(m.text),f===0&&n.globals.skipFirstTimelinelabel&&(h=""),f===u.length-1&&n.globals.skipLastTimelinelabel&&(h="")}const g=i.drawText({x:p,y:this.xAxisoffX+n.config.xaxis.labels.offsetY+30-(n.config.xaxis.position==="top"?n.layout.xAxisHeight+n.config.xaxis.axisTicks.height-2:0),text:h,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[e]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.axisFontFamily,fontWeight:n.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:`apexcharts-xaxis-label ${n.config.xaxis.labels.style.cssClass}`});r.add(g),this.addTooltip(g,h),l+=s}return this.inversedYAxisTitleText(o),this.inversedYAxisBorder(o),o}inversedYAxisBorder(e){const n=this.w,i=new it(this.w),o=n.config.xaxis.axisBorder;if(o.show){let r=0;n.config.chart.type==="bar"&&n.axisFlags.isXNumeric&&(r-=15);const a=i.drawLine(n.globals.padHorizontal+r+o.offsetX,this.xAxisoffX,n.layout.gridWidth,this.xAxisoffX,o.color,0,o.height);this.elgrid&&this.elgrid.elGridBorders&&n.config.grid.show?this.elgrid.elGridBorders.add(a):e.add(a)}}inversedYAxisTitleText(e){const n=this.w,i=new it(this.w);if(n.config.xaxis.title.text!==void 0){const o=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),r=i.drawText({x:n.layout.gridWidth/2+n.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(n.config.xaxis.title.style.fontSize)+n.config.xaxis.title.offsetY+20,text:n.config.xaxis.title.text,textAnchor:"middle",fontSize:n.config.xaxis.title.style.fontSize,fontFamily:n.config.xaxis.title.style.fontFamily,fontWeight:n.config.xaxis.title.style.fontWeight,foreColor:n.config.xaxis.title.style.color,cssClass:`apexcharts-xaxis-title-text ${n.config.xaxis.title.style.cssClass}`});o.add(r),e.add(o)}}yAxisTitleRotate(e,n){const i=this.w,o=new it(this.w),r=i.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${e}'] .apexcharts-yaxis-texts-g`),a=r?r.getBoundingClientRect():{width:0,height:0},s=i.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${e}'] .apexcharts-yaxis-title text`),l=s?s.getBoundingClientRect():{width:0,height:0};if(s){const c=this.xPaddingForYAxisTitle(e,a,l,n);s.setAttribute("x",String(c.xPos-(n?10:0)));const u=o.rotateAroundCenter(s);s.setAttribute("transform",`rotate(${n?i.config.yaxis[e].title.rotate*-1:i.config.yaxis[e].title.rotate} ${u.x} ${u.y})`)}}xPaddingForYAxisTitle(e,n,i,o){const r=this.w;let a=0,s=10;return r.config.yaxis[e].title.text===void 0||e<0?{xPos:a,padd:0}:(o?a=n.width+r.config.yaxis[e].title.offsetX+i.width/2+s/2:(a=n.width*-1+r.config.yaxis[e].title.offsetX+s/2+i.width/2,r.globals.isBarHorizontal&&(s=25,a=n.width*-1-r.config.yaxis[e].title.offsetX-s)),{xPos:a,padd:s})}setYAxisXPosition(e,n){const i=this.w;let o=0,r=0,a=18,s=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.forEach((l,c)=>{const u=i.globals.ignoreYAxisIndexes.includes(c)||!l.show||l.floating||e[c].width===0,d=e[c].width+n[c].width;l.opposite?i.globals.isBarHorizontal?(r=i.layout.gridWidth+i.layout.translateX-1,i.globals.translateYAxisX[c]=r-l.labels.offsetX):(r=i.layout.gridWidth+i.layout.translateX+s,u||(s+=d+20),i.globals.translateYAxisX[c]=r-l.labels.offsetX+20):(o=i.layout.translateX-a,u||(a+=d+20),i.globals.translateYAxisX[c]=o+l.labels.offsetX)})}setYAxisTextAlignments(){const e=this.w;e.config.yaxis.forEach((n,i)=>{if(n&&!n.floating&&n.labels.align!==void 0){const o=e.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${i}'] .apexcharts-yaxis-texts-g`);if(!o)return;const r=Array.from(e.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${i}'] .apexcharts-yaxis-label`)),a=o.getBoundingClientRect();r.forEach(s=>{s.setAttribute("text-anchor",n.labels.align)}),n.labels.align==="left"&&!n.opposite?o.setAttribute("transform",`translate(-${a.width}, 0)`):n.labels.align==="center"?o.setAttribute("transform",`translate(${a.width/2*(n.opposite?1:-1)}, 0)`):n.labels.align==="right"&&n.opposite&&o.setAttribute("transform",`translate(${a.width}, 0)`)}})}},hF=class{constructor(e,n){this.w=e,this.ctx=n,this.documentEvent=this.documentEvent.bind(this)}addEventListener(e,n){const i=this.w;Object.prototype.hasOwnProperty.call(i.globals.events,e)?i.globals.events[e].push(n):i.globals.events[e]=[n]}removeEventListener(e,n){const i=this.w;if(!Object.prototype.hasOwnProperty.call(i.globals.events,e))return;const o=i.globals.events[e].indexOf(n);o!==-1&&i.globals.events[e].splice(o,1)}fireEvent(e,n){const i=this.w;if(!Object.prototype.hasOwnProperty.call(i.globals.events,e))return;(!n||!n.length)&&(n=[]);const o=i.globals.events[e],r=o.length;for(let a=0;a{i==null||i.addEventListener(o,r=>{const a=r.target.getAttribute("i")===null&&e.interact.capturedSeriesIndex!==-1?e.interact.capturedSeriesIndex:r.target.getAttribute("i"),s=r.target.getAttribute("j")===null&&e.interact.capturedDataPointIndex!==-1?e.interact.capturedDataPointIndex:r.target.getAttribute("j"),l=Object.assign({},e,{seriesIndex:e.globals.axisCharts?a:0,dataPointIndex:s});r.type==="keydown"?e.config.chart.accessibility.enabled&&e.config.chart.accessibility.keyboard.enabled&&(n.ctx.keyboardNavigation&&n.ctx.keyboardNavigation.handleKey(r),typeof e.config.chart.events.keyDown=="function"&&e.config.chart.events.keyDown(r,n,l),n.ctx.events.fireEvent("keydown",[r,n,l])):r.type==="keyup"?e.config.chart.accessibility.enabled&&e.config.chart.accessibility.keyboard.enabled&&(typeof e.config.chart.events.keyUp=="function"&&e.config.chart.events.keyUp(r,n,l),n.ctx.events.fireEvent("keyup",[r,n,l])):r.type==="mousemove"||r.type==="touchmove"?typeof e.config.chart.events.mouseMove=="function"&&e.config.chart.events.mouseMove(r,n,l):r.type==="mouseleave"||r.type==="touchleave"?typeof e.config.chart.events.mouseLeave=="function"&&e.config.chart.events.mouseLeave(r,n,l):(r.type==="mouseup"&&r.which===1||r.type==="touchend")&&(typeof e.config.chart.events.click=="function"&&e.config.chart.events.click(r,n,l),n.ctx.events.fireEvent("click",[r,n,l]))},{capture:!1,passive:!0})}),this.ctx.eventList.forEach(o=>{e.dom.baseEl.addEventListener(o,this.documentEvent,{passive:!0})}),this.ctx.core.setupBrushHandler()}documentEvent(e){const n=this.w,i=e.target.className;if(e.type==="click"){const o=n.dom.baseEl.querySelector(".apexcharts-menu");o&&o.classList.contains("apexcharts-menu-open")&&i!=="apexcharts-menu-icon"&&o.classList.remove("apexcharts-menu-open")}n.interact.clientX=e.type==="touchmove"?e.touches[0].clientX:e.clientX,n.interact.clientY=e.type==="touchmove"?e.touches[0].clientY:e.clientY}},pF=class{constructor(e){this.w=e}setCurrentLocaleValues(e){let n=this.w.config.chart.locales;const i=Ge.getApex();i.chart&&i.chart.locales&&i.chart.locales.length>0&&(n=this.w.config.chart.locales.concat(i.chart.locales));const o=n.filter(r=>r.name===e)[0];if(o){const r=we.extend(q5,o);this.w.globals.locale=r.options}else throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options")}},gF=class{constructor(e,n){this.w=e,this.ctx=n}drawAxis(e,n){const i=this.w.globals,o=this.w.config,r=new Ws(this.w,this.ctx,n),a=new Id(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale},n);if(i.axisCharts&&e!=="radar"){let s,l;i.isBarHorizontal?(l=a.drawYaxisInversed(0),s=r.drawXaxisInversed(0),this.w.dom.elGraphical.add(s),this.w.dom.elGraphical.add(l)):(s=r.drawXaxis(),this.w.dom.elGraphical.add(s),o.yaxis.map((c,u)=>{if(i.ignoreYAxisIndexes.indexOf(u)===-1&&(l=a.drawYaxis(u),this.w.dom.Paper.add(l),this.w.config.grid.position==="back")){const d=this.w.dom.Paper.children()[1];d&&(d.remove(),this.w.dom.Paper.add(d))}}))}}},Og=class{constructor(e){this.w=e}drawXCrosshairs(){const e=this.w;e.dom.elGraphical.node.querySelectorAll(":scope > .apexcharts-xcrosshairs").forEach(w=>w.remove());const n=new it(this.w),i=new zi(this.w),o=e.config.xaxis.crosshairs.fill.gradient,r=e.config.xaxis.crosshairs.dropShadow,a=e.config.xaxis.crosshairs.fill.type,s=o.colorFrom,l=o.colorTo,c=o.opacityFrom,u=o.opacityTo,d=o.stops,f="none",h=r.enabled,p=r.left,g=r.top,m=r.blur,v=r.color,b=r.opacity;let y=e.config.xaxis.crosshairs.fill.color;if(e.config.xaxis.crosshairs.show){a==="gradient"&&(y=n.drawGradient("vertical",s,l,c,u,null,d,[]));let w=e.config.xaxis.crosshairs.width===1?n.drawLine(0,0,0,0):n.drawRect(),x=e.layout.gridHeight;(!we.isNumber(x)||x<0)&&(x=0);let $=e.config.xaxis.crosshairs.width;(!we.isNumber($)||Number($)<0)&&($=0),w.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:x,width:$,height:x,fill:y,filter:f,"fill-opacity":e.config.xaxis.crosshairs.opacity,stroke:e.config.xaxis.crosshairs.stroke.color,"stroke-width":e.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":e.config.xaxis.crosshairs.stroke.dashArray}),h&&(w=i.dropShadow(w,{left:p,top:g,blur:m,color:v,opacity:b})),e.dom.elGraphical.add(w)}}drawYCrosshairs(){const e=this.w;e.dom.elGraphical.node.querySelectorAll(":scope > .apexcharts-ycrosshairs, :scope > .apexcharts-ycrosshairs-hidden").forEach(a=>a.remove());const n=new it(this.w),i=e.config.yaxis[0].crosshairs,o=e.globals.barPadForNumericAxis;if(e.config.yaxis[0].crosshairs.show){const a=n.drawLine(-o,0,e.layout.gridWidth+o,0,i.stroke.color,i.stroke.dashArray,i.stroke.width);a.attr({class:"apexcharts-ycrosshairs"}),e.dom.elGraphical.add(a)}const r=n.drawLine(-o,0,e.layout.gridWidth+o,0,i.stroke.color,0,0);r.attr({class:"apexcharts-ycrosshairs-hidden"}),e.dom.elGraphical.add(r)}};function mF(t,e){if(!we.isObject(t)||!we.isObject(e))return e!==void 0?e:t;const n=Je({},t);for(const i of Object.keys(e)){const o=e[i];o!==void 0&&(we.isObject(o)&&we.isObject(t[i])?n[i]=mF(t[i],o):n[i]=o)}return n}let vF=class{constructor(e){this.w=e,this._activeBreakpoint=null}checkResponsiveConfig(e){const n=this.w,i=n.config;if(i.responsive.length===0)return;const o=i.responsive.slice();o.sort((s,l)=>s.breakpoint>l.breakpoint?1:l.breakpoint>s.breakpoint?-1:0).reverse();const r=new mc({}),a=(s={})=>{var l;const c=o[0].breakpoint,u=Ge.isBrowser()?window.innerWidth>0?window.innerWidth:screen.width:0;if(u>c){if(this._activeBreakpoint!==null){if(!n.globals.initialConfig)return;const d=we.clone(n.globals.initialConfig);d.series=we.clone(n.config.series);const f=Xi.extendArrayProps(r,d,n);s=we.extend(f,s),this.overrideResponsiveOptions(s),this._activeBreakpoint=null}}else for(let d=0;dmF(p,h[g]))})}this.overrideResponsiveOptions(s),this._activeBreakpoint=o[d].breakpoint}};if(e){let s=Xi.extendArrayProps(r,e,n);s=we.extend(n.config,s),s=we.extend(s,e),a(s)}else a({})}overrideResponsiveOptions(e){const n=new mc(e).init({responsiveOverride:!0});this.w.config=n}};function Sye(t){var e,n,i;const o=t.globals;if(o.streamScrolled=!1,!o.axisCharts||!t.seriesData||!Array.isArray(t.seriesData.series)||t.seriesData.series.length===0){o.prevStreamFrame=null;return}const r=[];(n=(e=t.dom)==null?void 0:e.baseEl)!=null&&n.querySelectorAll&&t.dom.baseEl.querySelectorAll(".apexcharts-marker").forEach(a=>{var s,l,c,u,d;const f=parseInt((s=a.getAttribute("index"))!=null?s:"",10),h=parseInt((c=(l=a.getAttribute("j"))!=null?l:a.getAttribute("rel"))!=null?c:"",10),p=parseFloat((d=(u=a.getAttribute("r"))!=null?u:a.getAttribute("default-marker-size"))!=null?d:"");isFinite(f)&&isFinite(h)&&isFinite(p)&&((r[f]=r[f]||[])[h]=p)}),o.prevStreamFrame={seriesX:(t.seriesData.seriesX||[]).slice(),seriesY:t.seriesData.series.slice(),xPixels:(o.seriesXvalues||[]).slice(),yPixels:(o.seriesYvalues||[]).slice(),rPixels:r,labels:(o.labels||[]).slice(),isXNumeric:!!((i=t.axisFlags)!=null&&i.isXNumeric)}}function Cye(t,e){const n=e.config.chart.streaming;if(!n||!n.enabled)return;const i=n.maxPoints,o=e.config.xaxis.range,r=a=>a==null?null:Array.isArray(a)?typeof a[0]=="number"?a[0]:null:typeof a=="object"&&typeof a.x=="number"?a.x:null;t.forEach(a=>{var s;const l=a==null?void 0:a.data;if(!Array.isArray(l)||l.length<2)return;if(typeof i=="number"&&i>0){l.length>i&&(a.data=l.slice(l.length-i));return}if(!o)return;const c=r(l[l.length-1]),u=r(l[0]);if(c==null||u==null||c<=u)return;const d=(c-u)/(l.length-1),f=c-o-2*d;let h=0;for(;h0&&(a.data=l.slice(h))})}function qC(t){var e;const n=t.config.chart.animations;if(!n||n.enabled===!1||!n.dynamicAnimation||n.dynamicAnimation.enabled===!1)return!1;const i=(e=n.largeDatasetThreshold)!=null?e:0;return i>0&&t.globals.dataPoints>i?!1:!!(Ge.isBrowser()&&t.globals.dataChanged&&t.globals.shouldAnimate)}function $ye(t,e,n){var i,o,r,a;if((i=t.axisFlags)!=null&&i.isXNumeric){const l=(r=(o=t.seriesData)==null?void 0:o.seriesX)==null?void 0:r[e];if(l&&l.length&&l[n]!=null)return"x:"+l[n]}const s=(a=t.globals.labels)==null?void 0:a[n];return s!=null&&String(s)!==""?"c:"+(Array.isArray(s)?s.join(" "):String(s)):"j:"+n}function Aye(t,e,n){var i,o;if(t.isXNumeric){const a=(i=t.seriesX)==null?void 0:i[e];if(a&&a.length&&a[n]!=null)return"x:"+a[n]}const r=(o=t.labels)==null?void 0:o[n];return r!=null&&String(r)!==""?"c:"+(Array.isArray(r)?r.join(" "):String(r)):"j:"+n}function _ye(t,e){const n=new Map;t.forEach((c,u)=>{n.has(c)||n.set(c,u)});const i=new Array(e.length),o=new Set;let r=-1,a=!0,s=t.length===e.length;e.forEach((c,u)=>{const d=n.has(c)&&!o.has(n.get(c))?n.get(c):-1;i[u]=d,d!==-1&&(o.add(d),d{const i=e.get(n)||0;return e.set(n,i+1),i===0?n:`${n}#${i}`})}function Pye(t,e,n=!1,i=!1){var o,r;if(!qC(t))return null;const a=t.globals.prevStreamFrame;if(!a)return null;const s=(o=a.seriesY)==null?void 0:o[e],l=(r=t.seriesData.series)==null?void 0:r[e];if(!Array.isArray(s)||!Array.isArray(l)||!s.length||!l.length)return null;const c=dE(s.map((f,h)=>Aye(a,e,h))),u=dE(l.map((f,h)=>$ye(t,e,h))),d=_ye(c,u);return!d.ordered&&!i||!d.changed&&!n?null:{join:d,oldKeys:c,newKeys:u}}function bF(t){var e,n;const i=t.config.chart.animations;return $g((n=(e=i.dynamicAnimation)==null?void 0:e.easing)!=null?n:i.easing)}function sl(t,e,n,i,o){const r=performance.now(),a=s=>{if(t.globals.isDestroyed)return;const l=Math.max(0,Math.min(1,(s-r)/e));i(n(l),l),l<1?nt.requestAnimationFrame(a):o&&o()};nt.requestAnimationFrame(a)}function fE(t,e,n){return[...t.querySelectorAll(e)].map(i=>{var o,r,a;return{text:i.textContent||"",display:(a=(r=(o=i.querySelector("tspan"))==null?void 0:o.textContent)!=null?r:i.textContent)!=null?a:"",pos:parseFloat(i.getAttribute(n)||""),transform:i.getAttribute("transform")}})}function hE(t,e,n){return[...t.querySelectorAll(e)].map(i=>parseFloat(i.getAttribute(n)||""))}const vv=":not(.apexcharts-tick-ghost)",yF=`.apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)${vv}`,xF=`.apexcharts-yaxis-texts-g text${vv}`,wF=`.apexcharts-gridlines-vertical line${vv}`,SF=`.apexcharts-gridlines-horizontal line${vv}`;function CF(t){var e,n;const i=t.globals;if(!((e=t.axisFlags)!=null&&e.isXNumeric)||i.isBarHorizontal||(n=t.config.xaxis)!=null&&n.reversed)return null;const o=i.minX,r=i.maxX,a=t.layout.gridWidth;return!isFinite(o)||!isFinite(r)||!(r>o)||!(a>0)?null:{min:o,max:r,width:a}}function $F(t,e){var n;const i=t.globals;if(i.isBarHorizontal||!Array.isArray(t.config.yaxis)||t.config.yaxis.length!==1||(n=t.config.yaxis[0])!=null&&n.logarithmic)return null;const o=i.minY,r=i.maxY;if(!isFinite(o)||!isFinite(r)||!(r>o))return null;const a=e.map(s=>s.pos).filter(s=>isFinite(s));return a.length<2?null:{min:o,max:r,pLo:Math.max(...a),pHi:Math.min(...a)}}function Tye(t,e){if(!t||!e)return null;const n=t.max-t.min,i=e.max-e.min;return!(n>0)||!(i>0)||!(t.width>0)||!(e.width>0)?null:{toNew:o=>(t.min+o/t.width*n-e.min)/i*e.width,toOld:o=>(e.min+o/e.width*i-t.min)/n*t.width}}function Oye(t,e){if(!t||!e)return null;const n=t.pHi-t.pLo,i=e.pHi-e.pLo,o=t.max-t.min,r=e.max-e.min;if(!n||!i||!(o>0)||!(r>0))return null;const a=l=>t.min+(l-t.pLo)/n*o,s=l=>e.min+(l-e.pLo)/i*r;return{toNew:l=>e.pLo+(a(l)-e.min)/r*i,toOld:l=>t.pLo+(s(l)-t.min)/o*n}}function Eye(t){const e=t.globals;if(e.prevChromeFrame=null,!e.axisCharts||!Ge.isBrowser())return;const n=t.dom.baseEl;if(we.elementExists(n))try{const i=fE(n,xF,"y");e.prevChromeFrame={xLabels:fE(n,yF,"x"),yLabels:i,vGrid:hE(n,wF,"x1"),hGrid:hE(n,SF,"y1"),xScale:CF(t),yAnchors:$F(t,i)}}catch{e.prevChromeFrame=null}}function pE(t,e,n,i){const o=e.style;o.opacity="0",sl(t,n,i,r=>{o.opacity=String(r)},()=>{o.opacity=""})}function ah(t,e,n,i,o,r,a){n.forEach(s=>e.setAttribute(s,String(i))),sl(t,r,a,s=>{const l=String(i+(o-i)*s);n.forEach(c=>e.setAttribute(c,l))},()=>{n.forEach(s=>e.setAttribute(s,String(o)))})}function gE(t,{template:e,display:n,attrs:i,from:o,to:r,duration:a,ease:s}){const l=e.parentNode;if(!l)return;const c=e.cloneNode(!0);if(c.classList.add("apexcharts-tick-ghost"),c.setAttribute("pointer-events","none"),c.removeAttribute("id"),n!==void 0){const d=c.querySelector("tspan");d?d.textContent=n:c.textContent=n;const f=c.querySelector("title");f&&(f.textContent=n)}i.forEach(d=>c.setAttribute(d,String(o)));const u=c.style;u.opacity="1",l.appendChild(c),sl(t,a,s,d=>{const f=String(o+(r-o)*d);i.forEach(h=>c.setAttribute(h,f)),u.opacity=String(1-d)},()=>{c.parentNode&&c.parentNode.removeChild(c)})}const Mye=20;function mE(t,{newLabels:e,oldLabels:n,posAttr:i,newLines:o,oldLines:r,lineAttrs:a,duration:s,ease:l,project:c}){const u=new Map;n.forEach((x,$)=>{u.has(x.text)||u.set(x.text,wt(Je({},x),{i:$}))});const d=new Set,f=o.length===e.length,h=r.length===n.length,p=n.map(x=>x.pos).concat(e.map(x=>parseFloat(x.getAttribute(i)||""))).filter(x=>isFinite(x)),g=Math.min(...p),m=Math.max(...p),v=Math.max(40,(m-g)*.25),b=x=>Math.max(g-v,Math.min(m+v,x)),y=(x,$)=>{if(!x)return;const S=parseFloat(x.getAttribute(a[0])||""),_=r[$.i];isFinite(S)&&isFinite(_)&&ah(t,x,a,_,S,s,l)};if(e.forEach((x,$)=>{const S=parseFloat(x.getAttribute(i)||""),_=u.get(x.textContent||""),P=f?o[$]:null;_&&d.add(_.i);const O=x.getAttribute("transform");if(!_||!isFinite(_.pos)){if(!_){if(c&&isFinite(S)&&!O){const T=isFinite(c.toOld(S))?b(c.toOld(S)):NaN;isFinite(T)&&Math.abs(T-S)>.5&&(ah(t,x,[i],T,S,s,l),P&&ah(t,P,a,T,S,s,l))}pE(t,x,s,l),P&&pE(t,P,s,l)}return}if(!(!isFinite(S)||Math.abs(_.pos-S)<.5)){if(O||_.transform){const T=_.pos-S;if(isFinite(T)){const M=O||"";sl(t,s,l,I=>{const k=T*(1-I),E=i==="x"?`translate(${k} 0)`:`translate(0 ${k})`;x.setAttribute("transform",`${E} ${M}`.trim())},()=>{M?x.setAttribute("transform",M):x.removeAttribute("transform")})}y(P,_);return}ah(t,x,[i],_.pos,S,s,l),y(P,_)}}),!c||!e.length)return;let w=0;n.forEach((x,$)=>{if(d.has($)||!isFinite(x.pos)||x.transform||w>=Mye)return;const S=c.toNew(x.pos);!isFinite(S)||Math.abs(S-x.pos)<.5||(w++,gE(t,{template:e[0],display:x.display,attrs:[i],from:x.pos,to:b(S),duration:s,ease:l}),h&&o.length&&isFinite(r[$])&&gE(t,{template:o[0],attrs:a,from:r[$],to:b(c.toNew(r[$])),duration:s,ease:l}))})}function vE(t){const e=t.globals,n=e.prevChromeFrame;if(e.prevChromeFrame=null,!n||!e.axisCharts||!Ge.isBrowser()||!qC(t)||!(t.seriesData.series||[]).some((s,l)=>Pye(t,l,!0,!0)!==null))return;const o=t.dom.baseEl;if(!we.elementExists(o))return;const r=Math.max(1,t.config.chart.animations.dynamicAnimation.speed||1),a=bF(t);try{const s=[...o.querySelectorAll(xF)],l=Tye(n.xScale,CF(t)),c=Oye(n.yAnchors,$F(t,s.map(u=>({pos:parseFloat(u.getAttribute("y")||"")}))));mE(t,{newLabels:[...o.querySelectorAll(yF)],oldLabels:n.xLabels,posAttr:"x",newLines:[...o.querySelectorAll(wF)],oldLines:n.vGrid,lineAttrs:["x1","x2"],duration:r,ease:a,project:l}),mE(t,{newLabels:s,oldLabels:n.yLabels,posAttr:"y",newLines:[...o.querySelectorAll(SF)],oldLines:n.hGrid,lineAttrs:["y1","y2"],duration:r,ease:a,project:c})}catch{}}const AF=".apexcharts-data-labels[data\\:dlKey]",ZC=".apexcharts-datalabel",_F=".apexcharts-datalabel-total[data\\:dlTotalKey]";function PF(t){var e,n;const i=t.config.dataLabels;return!!((e=i==null?void 0:i.animate)!=null&&e.enabled||(n=i==null?void 0:i.countUp)!=null&&n.enabled)}function bE(t){if(!isFinite(t))return 0;const e=String(Math.abs(t)),n=e.indexOf("e");if(n!==-1){const o=e.slice(0,n),r=parseInt(e.slice(n+1),10),a=o.indexOf("."),s=a===-1?0:o.length-a-1;return Math.min(6,Math.max(0,s-r))}const i=e.indexOf(".");return i===-1?0:Math.min(6,e.length-i-1)}function p0(t,e){const n=t.querySelector("tspan");n?n.textContent=e:t.textContent=e}function Iye(t){const e=t.globals;if(e.prevDataLabels=null,!e.axisCharts||!Ge.isBrowser()||!PF(t))return;const n=t.dom.baseEl;if(we.elementExists(n))try{const i=new Map;n.querySelectorAll(AF).forEach(o=>{const r=o.getAttribute("data:dlKey");if(!r)return;const a=o.querySelector(ZC);a&&i.set(r,{cx:parseFloat(a.getAttribute("cx")||""),cy:parseFloat(a.getAttribute("cy")||""),val:parseFloat(o.getAttribute("data:dlVal")||"")})}),n.querySelectorAll(_F).forEach(o=>{const r=o.getAttribute("data:dlTotalKey");r&&i.set(`total::${r}`,{cx:parseFloat(o.getAttribute("cx")||""),cy:parseFloat(o.getAttribute("cy")||""),val:parseFloat(o.getAttribute("data:dlTotalVal")||"")})}),e.prevDataLabels=i.size?i:null}catch{e.prevDataLabels=null}}function kye(t,e,n,i){const o=e.style;o.opacity="0",sl(t,n,i,r=>{o.opacity=String(r)},()=>{o.opacity=""})}function yE(t,{el:e,oldCx:n,oldCy:i,duration:o,ease:r,delay:a=0}){const s=e.hasAttribute("cx")?e:e.querySelector(ZC);if(!s)return;const l=n-parseFloat(s.getAttribute("cx")||""),c=i-parseFloat(s.getAttribute("cy")||"");if(!isFinite(l)||!isFinite(c)||Math.abs(l)+Math.abs(c)<=.5)return;const u=e.getAttribute("transform")||"",d=()=>sl(t,o,r,f=>{const h=1-f;e.setAttribute("transform",`translate(${l*h} ${c*h}) ${u}`.trim())},()=>{u?e.setAttribute("transform",u):e.removeAttribute("transform")});a>0?(e.setAttribute("transform",`translate(${l} ${c}) ${u}`.trim()),setTimeout(()=>{t.globals.isDestroyed||d()},a)):d()}function xE(t,{el:e,from:n,to:i,formatter:o,fmtOpts:r,duration:a,ease:s,delay:l=0}){if(!isFinite(n)||!isFinite(i)||Math.abs(i-n)<=1e-9)return;const c=Math.max(bE(n),bE(i)),u=f=>{const h=Number(f.toFixed(c));let p=h;if(typeof o=="function")try{p=o(h,r)}catch{p=h}return String(p)},d=()=>sl(t,a,s,f=>{p0(e,u(n+(i-n)*f))},()=>{p0(e,u(i))});l>0?(p0(e,u(n)),setTimeout(()=>{t.globals.isDestroyed||d()},l)):d()}function wE(t){var e,n;const i=t.globals,o=i.prevDataLabels;if(i.prevDataLabels=null,!o||!i.axisCharts||!Ge.isBrowser()||!PF(t)||!qC(t))return;const r=t.dom.baseEl;if(!we.elementExists(r))return;const a=t.config.dataLabels,s=!!((e=a.animate)!=null&&e.enabled),l=!!((n=a.countUp)!=null&&n.enabled),c=a.formatter,u=Math.max(1,t.config.chart.animations.dynamicAnimation.speed||1),d=bF(t);try{r.querySelectorAll(AF).forEach(h=>{const p=h.getAttribute("data:dlKey");if(!p)return;const g=h.querySelector(ZC);if(!g)return;const m=o.get(p),v=parseInt(h.getAttribute("data:dlDelay")||"0",10)||0;if(s&&(m&&isFinite(m.cx)&&isFinite(m.cy)?yE(t,{el:h,oldCx:m.cx,oldCy:m.cy,duration:u,ease:d,delay:v}):m||kye(t,h,u,d)),l&&m){const b=parseInt(p,10),y=parseInt(h.getAttribute("data:dlJ")||"",10);xE(t,{el:g,from:m.val,to:parseFloat(h.getAttribute("data:dlVal")||""),formatter:c,fmtOpts:wt(Je({},t),{seriesIndex:b,dataPointIndex:isFinite(y)?y:0,w:t}),duration:u,ease:d,delay:v})}});const f=t.config.plotOptions.bar.dataLabels.total.formatter||c;r.querySelectorAll(_F).forEach(h=>{const p=h.getAttribute("data:dlTotalKey");if(!p)return;const g=o.get(`total::${p}`);if(!g)return;const m=parseInt(h.getAttribute("data:dlDelay")||"0",10)||0;if(s&&isFinite(g.cx)&&isFinite(g.cy)&&yE(t,{el:h,oldCx:g.cx,oldCy:g.cy,duration:u,ease:d,delay:m}),l){const v=parseInt(h.getAttribute("data:dlTotalSeries")||p,10);xE(t,{el:h,from:g.val,to:parseFloat(h.getAttribute("data:dlTotalVal")||""),formatter:f,fmtOpts:wt(Je({},t),{seriesIndex:v,dataPointIndex:0,w:t}),duration:u,ease:d,delay:m})}})}catch{}}let js=class TF{constructor(e,{toggleDataSeries:n=void 0,revertDefaultAxisMinMax:i=void 0,updateSeries:o=void 0}={}){this.w=e,this._toggleDataSeries=n||null,this._revertDefaultAxisMinMax=i||null,this._updateSeries=o||null,this.legendInactiveClass="legend-mouseover-inactive"}clearSeriesCache(){const e=this.w;e.globals.cachedSelectors&&(delete e.globals.cachedSelectors.allSeriesEls,delete e.globals.cachedSelectors.highlightSeriesEls)}getAllSeriesEls(){const e=this.w,n="allSeriesEls";return e.globals.cachedSelectors[n]||(e.globals.cachedSelectors[n]=e.dom.baseEl.getElementsByClassName("apexcharts-series")),e.globals.cachedSelectors[n]}getSeriesByName(e){return this.w.dom.baseEl.querySelector(`.apexcharts-inner .apexcharts-series[seriesName='${we.escapeString(e)}']`)}isSeriesHidden(e){var n;const o=this.getSeriesByName(e),r=parseInt((n=o.getAttribute("data:realIndex"))!=null?n:"0",10);return{isHidden:o.classList.contains("apexcharts-series-collapsed"),realIndex:r}}addCollapsedClassToSeries(e,n){TF.addCollapsedClassToSeries(this.w,e,n)}static addCollapsedClassToSeries(e,n,i){let o=!1;function r(l){for(let c=0;c{e.globals.isDestroyed||n.node.classList.remove("apexcharts-series-collapsing")},s)}toggleSeries(e){var n;const i=this.isSeriesHidden(e);return(n=this._toggleDataSeries)==null||n.call(this,i.realIndex,i.isHidden),i.isHidden}showSeries(e){var n;const i=this.isSeriesHidden(e);i.isHidden&&((n=this._toggleDataSeries)==null||n.call(this,i.realIndex,!0))}hideSeries(e){var n;const i=this.isSeriesHidden(e);i.isHidden||(n=this._toggleDataSeries)==null||n.call(this,i.realIndex,!1)}prepareDataUpdate(){const e=this.w;this.clearSeriesCache(),e.globals.previousPaths=[],e.globals.axisCharts||(e.globals.collapsedSeries=[],e.globals.ancillaryCollapsedSeries=[],e.globals.collapsedSeriesIndices=[],e.globals.ancillaryCollapsedSeriesIndices=[])}resetSeries(e=!0,n=!0,i=!0){var o,r;const a=this.w;this.clearSeriesCache();let s=we.clone(a.globals.initialSeries);Array.isArray(s)||(s=we.clone(a.config.series)||[]),a.globals.previousPaths=[],i?(a.globals.collapsedSeries=[],a.globals.ancillaryCollapsedSeries=[],a.globals.collapsedSeriesIndices=[],a.globals.ancillaryCollapsedSeriesIndices=[]):s=this.emptyCollapsedSeries(s),a.config.series=s,e&&(n&&(a.interact.zoomed=!1,(o=this._revertDefaultAxisMinMax)==null||o.call(this)),(r=this._updateSeries)==null||r.call(this,s,a.config.chart.animations.dynamicAnimation.enabled))}emptyCollapsedSeries(e){const n=this.w;if(!Array.isArray(e))return e;for(let i=0;i-1&&(e[i]&&typeof e[i]=="object"?e[i].data=[]:e[i]=0);return e}_deriveSeriesNames(e){const n=this.w,i=e||n.config.series||[],o=n.config.labels||[];return i.map((r,a)=>r&&typeof r=="object"&&r.name!=null?String(r.name):o[a]!=null?String(o[a]):`series-${a+1}`)}reconcileCollapsedByName(e){const n=this.w,i=n.globals,o=e||n.config.series,r=this._deriveSeriesNames(o),a=c=>{const u=[],d=[];return c.forEach(f=>{const h=f&&f.name!=null?r.indexOf(f.name):f.index;if(h==null||h<0||h>=o.length)return;const p=o[h];f.index=h,i.axisCharts?p&&Array.isArray(p.data)&&p.data.length&&(f.data=p.data.slice()):f.data=p,u.push(f),d.push(h)}),{records:u,indices:d}},s=a(i.collapsedSeries);i.collapsedSeries=s.records,i.collapsedSeriesIndices=s.indices;const l=a(i.ancillaryCollapsedSeries);i.ancillaryCollapsedSeries=l.records,i.ancillaryCollapsedSeriesIndices=l.indices,i.allSeriesCollapsed=i.collapsedSeries.length+i.ancillaryCollapsedSeries.length===o.length,this.emptyCollapsedSeries(o)}canvasRestyle(e){const n=this.w.globals.activeRenderer;n&&n.kind==="canvas"&&typeof n.restyle=="function"&&n.restyle(e)}highlightSeries(e){var n;const i=this.w,o=this.getSeriesByName(e),r=parseInt((n=o==null?void 0:o.getAttribute("data:realIndex"))!=null?n:"",10),a="highlightSeriesEls";let s=i.globals.cachedSelectors[a];s||(s=i.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),i.globals.cachedSelectors[a]=s);let l=null,c=null,u=null;if(i.globals.axisCharts||i.config.chart.type==="radialBar")if(i.globals.axisCharts){l=i.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${r}']`),c=i.dom.baseEl.querySelector(`.apexcharts-datalabels[data\\:realIndex='${r}']`);const d=i.globals.seriesYAxisReverseMap[r];u=i.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${d}']`)}else l=i.dom.baseEl.querySelector(`.apexcharts-series[rel='${r+1}']`);else l=i.dom.baseEl.querySelector(`.apexcharts-series[rel='${r+1}'] path`);for(let d=0;d{for(let c=0;c=s.from&&c<=s.to&&o[l].classList.remove(this.legendInactiveClass)}}}getActiveConfigSeriesIndex(e="asc",n=[]){const i=this.w;let o=0;if(i.config.series.length>1){const r=i.config.series.map((a,s)=>{const l=()=>i.globals.comboCharts?n.length===0||n.length&&n.indexOf(i.config.series[s].type)>-1:!0;return a.data&&a.data.length>0&&i.globals.collapsedSeriesIndices.indexOf(s)===-1&&l()?s:-1});for(let a=e==="asc"?0:r.length-1;e==="asc"?a=0;e==="asc"?a++:a--)if(r[a]!==-1){o=r[a];break}}return o}getActiveConfigSeriesIndexByGroup(e=[]){const n=this.w;return(n.labelData.seriesGroups||[]).map(o=>{let r=-1;return n.config.series.forEach((a,s)=>{if(o.indexOf(n.seriesData.seriesNames[s])===-1||n.globals.comboCharts&&e.length&&e.indexOf(a.type)===-1)return;a.data&&a.data.length>0&&n.globals.collapsedSeriesIndices.indexOf(s)===-1&&(r=s)}),r})}getBarSeriesIndices(){return this.w.globals.comboCharts?this.w.config.series.map((n,i)=>n.type==="bar"||n.type==="column"?i:-1).filter(n=>n!==-1):this.w.config.series.map((n,i)=>i)}getPreviousPaths(){var e,n,i,o;const r=this.w;if(Sye(r),Eye(r),Iye(r),!r.globals.axisCharts){r.globals.previousPaths=r.seriesData.series;return}if(!we.elementExists(r.dom.baseEl)){r.globals.previousPaths=[];return}r.globals.previousPaths=[];function a(u,d,f){const h=u[d].childNodes,p={type:f,paths:[],realIndex:u[d].getAttribute("data:realIndex")};for(let g=0;gr.dom.baseEl.querySelectorAll(`.apexcharts-${u}-series .apexcharts-series`);["line","area","bar","rangebar","rangeArea","candlestick","radar"].forEach(u=>{const d=s(u);for(let f=0;f0)for(let u=0;uf[p].getAttribute(v),m={x:parseFloat((e=g("x"))!=null?e:"0"),y:parseFloat((n=g("y"))!=null?n:"0"),width:parseFloat((i=g("width"))!=null?i:"0"),height:parseFloat((o=g("height"))!=null?o:"0")};h.push({rect:m,color:f[p].getAttribute("color")})}r.globals.previousPaths.push(h)}}clearPreviousPaths(){const e=this.w;e.globals.previousPaths=[],e.globals.allSeriesCollapsed=!1}handleNoData(){const e=this.w,n=this,i=e.config.noData,o=new it(n.w);let r=e.globals.svgWidth/2,a=e.globals.svgHeight/2,s="middle";if(e.globals.noData=!0,e.globals.animationEnded=!0,i.align==="left"?(r=10,s="start"):i.align==="right"&&(r=e.globals.svgWidth-10,s="end"),i.verticalAlign==="top"?a=50:i.verticalAlign==="bottom"&&(a=e.globals.svgHeight-50),r=r+i.offsetX,a=a+parseInt(i.style.fontSize,10)+2+i.offsetY,i.text!==void 0&&i.text!==""){const l=o.drawText({x:r,y:a,text:i.text,textAnchor:s,fontSize:i.style.fontSize,fontFamily:i.style.fontFamily,foreColor:i.style.color,opacity:1,cssClass:"apexcharts-text-nodata"});e.dom.Paper.add(l)}}setNullSeriesToZeroValues(e){const n=this.w;for(let i=0;ii.length>0?i:[])}};const SE={accent:"--apx-accent",fore:"--apx-fore",grid:"--apx-grid",surface:"--apx-surface"},Dye=24;function Rye(t){if(!Ge.isBrowser())return{};const e=t.dom&&(t.dom.elWrap||t.dom.baseEl)||null;if(!e)return{};const n=nt.getComputedStyle(e);if(!n||typeof n.getPropertyValue!="function")return{};const i=a=>{const s=n.getPropertyValue(a);return s?String(s).trim():""},o={};for(const a in SE){const s=i(SE[a]);s&&(o[a]=s)}const r=[];for(let a=1;a<=Dye;a++){const s=i(`--apx-series-${a}`);if(!s)break;r.push(s)}return r.length&&(o.series=r),o}const Ix="__apexcharts_themes__";globalThis[Ix]||(globalThis[Ix]={});function JC(){return globalThis[Ix]}function Lye(t,e){if(!t||typeof t!="string"){console.warn("ApexCharts: registerTheme requires a non-empty name.");return}if(e!=null&&(typeof e!="object"||Array.isArray(e))){console.warn(`ApexCharts: registerTheme("${t}") expects an object like { mode, palette, tokens, monochrome, accessibility }.`);return}JC()[t]=e||{}}function Fye(t){return t&&JC()[t]||null}function Nye(t){t&&delete JC()[t]}const g0="#373d3f",m0="#f6f7f8",v0="#e0e0e0";let OF=class{constructor(e){this.w=e,this.colors=[],this.isColorFn=!1,this.isHeatmapDistributed=this.checkHeatmapDistributed(),this.isBarDistributed=this.checkBarDistributed(),this._tokens={},this._namedTheme=null}checkHeatmapDistributed(){const{chart:e,plotOptions:n}=this.w.config;return e.type==="treemap"&&n.treemap&&n.treemap.distributed||e.type==="heatmap"&&n.heatmap&&n.heatmap.distributed}checkBarDistributed(){const{chart:e,plotOptions:n}=this.w.config;return n.bar&&n.bar.distributed&&(e.type==="bar"||e.type==="rangeBar")}init(){this.setDefaultColors()}setDefaultColors(){var e;const n=this.w,i=new we;this._namedTheme=Fye(n.config.theme.name),this._applyNamedThemeMode(),n.dom.elWrap.classList.add(`apexcharts-theme-${n.config.theme.mode||"light"}`),this._applyModeDefaults(),this._tokens=this._resolveTokens(),this.applyTokenChrome(this._tokens);const o=(e=n.config.theme.accessibility)==null?void 0:e.colorBlindMode;if(o){n.globals.colors=this.getColorBlindColors(o),this.applySeriesColors(n.seriesData.seriesColors,n.globals.colors);const s=n.globals.colors.slice();this.pushExtraColors(n.globals.colors),this.applyColorTypes(["fill","stroke"],s),this.applyDataLabelsColors(s),this.applyRadarPolygonsColors(),this.applyMarkersColors(s),o==="highContrast"&&n.dom.elWrap.classList.add("apexcharts-high-contrast");return}const r=[...n.config.colors||n.config.fill.colors||[]];n.globals.colors=this.getColors(r),this.applySeriesColors(n.seriesData.seriesColors,n.globals.colors),n.config.theme.monochrome.enabled&&(n.globals.colors=this.getMonochromeColors(n.config.theme.monochrome,n.seriesData.series,i));const a=n.globals.colors.slice();this.pushExtraColors(n.globals.colors),this.applyColorTypes(["fill","stroke"],a),this.applyDataLabelsColors(a),this.applyRadarPolygonsColors(),this.applyMarkersColors(a)}_applyModeDefaults(){const e=this.w,n=e.config.theme.mode;n==="dark"?(e.config.chart.foreColor===g0&&(e.config.chart.foreColor=m0),e.config.theme.palette==="palette1"&&(e.config.theme.palette="palette4"),e.config.tooltip&&e.config.tooltip.theme!=="light"&&(e.config.tooltip.theme="dark")):n==="light"&&(e.config.chart.foreColor===m0&&(e.config.chart.foreColor=g0),e.config.theme.palette==="palette4"&&(e.config.theme.palette="palette1"))}_applyNamedThemeMode(){const e=this._namedTheme;if(!e)return;const n=this.w.config.theme;e.mode&&!n.mode&&(n.mode=e.mode),e.accessibility&&e.accessibility.colorBlindMode&&!(n.accessibility&&n.accessibility.colorBlindMode)&&(n.accessibility=n.accessibility||{},n.accessibility.colorBlindMode=e.accessibility.colorBlindMode),e.monochrome&&e.monochrome.enabled&&!n.monochrome.enabled&&(n.monochrome=Je(Je({},n.monochrome),e.monochrome))}_resolveTokens(){const e=this._namedTheme&&this._namedTheme.tokens||{},n=this._shouldUseTokens()?Rye(this.w):{};return Je(Je({},e),n)}_shouldUseTokens(){return this.w.config.theme.tokens!==!1}applyTokenChrome(e){if(!e)return;const n=this.w;if(e.fore&&(n.config.chart.foreColor===g0||n.config.chart.foreColor===m0)&&(n.config.chart.foreColor=e.fore),e.grid){n.config.grid.borderColor===v0&&(n.config.grid.borderColor=e.grid);const a=s=>{s&&(s.axisBorder&&s.axisBorder.color===v0&&(s.axisBorder.color=e.grid),s.axisTicks&&s.axisTicks.color===v0&&(s.axisTicks.color=e.grid))};a(n.config.xaxis),Array.isArray(n.config.yaxis)?n.config.yaxis.forEach(a):a(n.config.yaxis)}const i=n.globals.tokenSurface,o=n.config.chart.background,r=!o||o===i;if(e.surface){if(r){n.config.chart.background=e.surface,n.globals.tokenSurface=e.surface;const a=n.dom.Paper&&n.dom.Paper.node;a&&a.style&&(a.style.background=e.surface)}}else if(i&&o===i){n.config.chart.background="",n.globals.tokenSurface=void 0;const a=n.dom.Paper&&n.dom.Paper.node;a&&a.style&&(a.style.background="")}}getColors(e){const n=this.w;return!e||e.length===0?this.predefined():Array.isArray(e)&&e.length>0&&typeof e[0]=="function"?(this.isColorFn=!0,n.config.series.map((i,o)=>{const r=e[o]||e[0];return typeof r=="function"?r({value:n.globals.axisCharts?n.seriesData.series[o][0]||0:n.seriesData.series[o],seriesIndex:o,dataPointIndex:o,w:this.w}):r})):e}applySeriesColors(e,n){e.forEach((i,o)=>{i&&(n[o]=i)})}getMonochromeColors(e,n,i){const{color:o,shadeIntensity:r,shadeTo:a}=e,s=this.isBarDistributed||this.isHeatmapDistributed?n[0].length*n.length:n.length,l=1/(s/r);let c=0;return Array.from({length:s},()=>{const u=a==="dark"?i.shadeColor(c*-1,o):i.shadeColor(c,o);return c+=l,u})}applyColorTypes(e,n){const i=this.w;e.forEach(o=>{i.globals[o].colors=i.config[o].colors===void 0?this.isColorFn?i.config.colors:n:i.config[o].colors.slice(),this.pushExtraColors(i.globals[o].colors)})}applyDataLabelsColors(e){const n=this.w;n.globals.dataLabels.style.colors=n.config.dataLabels.style.colors===void 0?e:n.config.dataLabels.style.colors.slice(),this.pushExtraColors(n.globals.dataLabels.style.colors,50)}applyRadarPolygonsColors(){const e=this.w;e.globals.radarPolygons.fill.colors=e.config.plotOptions.radar.polygons.fill.colors===void 0?[e.config.theme.mode==="dark"?"#343A3F":"none"]:e.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(e.globals.radarPolygons.fill.colors,20)}applyMarkersColors(e){const n=this.w;n.globals.markers.colors=n.config.markers.colors===void 0?e:n.config.markers.colors.slice(),this.pushExtraColors(n.globals.markers.colors)}pushExtraColors(e,n,i=null){const o=this.w;let r=n||o.seriesData.series.length;if(i===null&&(i=this.isBarDistributed||this.isHeatmapDistributed||o.config.chart.type==="heatmap"&&o.config.plotOptions.heatmap&&o.config.plotOptions.heatmap.colorScale.inverse),i&&o.seriesData.series.length&&(r=o.seriesData.series[o.globals.maxValsInArrayIndex].length*o.seriesData.series.length),e.lengthe.globals.svgWidth&&(this.dCtx.lgRect.width=e.globals.svgWidth/1.5),this.dCtx.lgRect}getDatalabelsRect(){const e=this.w,n=[];e.config.series.forEach((s,l)=>{s.data.forEach((c,u)=>{const f=(h=>e.config.dataLabels.formatter(h,{seriesIndex:l,dataPointIndex:u,w:e}))(e.seriesData.series[l][u]);n.push(f)})});const i=we.getLargestStringFromArr(n),o=new it(this.w),r=e.config.dataLabels.style,a=o.getTextRects(i,parseInt(r.fontSize).toString(),r.fontFamily);return{width:a.width*1.05,height:a.height}}getLargestStringFromMultiArr(e,n){const i=this.w;let o=e;if(i.axisFlags.isMultiLineX){const r=n.map(l=>Array.isArray(l)?l.length:1),a=Math.max(...r),s=r.indexOf(a);o=n[s]}return o}getSparklineStrokeInset(){const e=this.w,n=Array.isArray(e.config.stroke.width)?Math.max(...e.config.stroke.width):e.config.stroke.width,i=n/2;if(!e.config.stroke.show||!(i>0))return{top:0,bottom:0};const o=e.globals.maxY-e.globals.minY,r=this._getSeriesYExtremes();if(!this._strokeTracesDataPoints()||!(o>0)||!r)return{top:i,bottom:i};const a=Math.max(e.globals.svgHeight-n,0),s=a*(e.globals.maxY-r.max)/o,l=a*(r.min-e.globals.minY)/o;return{top:Math.min(Math.max(i-s,0),i),bottom:Math.min(Math.max(i-l,0),i)}}_strokeTracesDataPoints(){const e=this.w;if(!e.globals.axisCharts||e.config.chart.stacked)return!1;const n=["line","area","scatter"];return e.config.series.every(i=>n.includes(i.type||e.config.chart.type))}_getSeriesYExtremes(){let e=1/0,n=-1/0;return this.w.seriesData.series.forEach(i=>{Array.isArray(i)&&i.forEach(o=>{Number.isFinite(o)&&(on&&(n=o))})}),e===1/0?null:{min:e,max:n}}}class IF{constructor(e){this.w=e.w,this.dCtx=e}getxAxisLabelsCoords(){const e=this.w;let n=e.labelData.labels.slice();e.config.xaxis.convertedCatToNumeric&&n.length===0&&(n=e.labelData.categoryLabels);let i;if(e.labelData.timescaleLabels.length>0){const o=this.getxAxisTimeScaleLabelsCoords();i={width:o.width,height:o.height},e.layout.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends=(e.config.legend.position==="left"||e.config.legend.position==="right")&&!e.config.legend.floating?this.dCtx.lgRect.width:0;const o=e.formatters.xLabelFormatter;let r=we.getLargestStringFromArr(n),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,n);e.globals.isBarHorizontal&&(r=e.globals.yAxisScale[0].result.reduce((f,h)=>f.length>h.length?f:h,0),a=r);const s=new Bc(this.w),l=r;r=s.xLabelFormat(o,r,l,{i:void 0,dateFormatter:new Ei(this.w).formatDate,w:e}),a=s.xLabelFormat(o,a,l,{i:void 0,dateFormatter:new Ei(this.w).formatDate,w:e}),(e.config.xaxis.convertedCatToNumeric&&typeof r>"u"||String(r).trim()==="")&&(r="1",a=r);const c=new it(this.w);let u=c.getTextRects(r,e.config.xaxis.labels.style.fontSize),d=u;if(r!==a&&(d=c.getTextRects(a,e.config.xaxis.labels.style.fontSize)),i={width:u.width>=d.width?u.width:d.width,height:u.height>=d.height?u.height:d.height},i.width*n.length>e.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&e.config.xaxis.labels.rotate!==0||e.config.xaxis.labels.rotateAlways){if(!e.globals.isBarHorizontal){e.layout.rotateXLabels=!0;const f=h=>c.getTextRects(h,e.config.xaxis.labels.style.fontSize,e.config.xaxis.labels.style.fontFamily,`rotate(${e.config.xaxis.labels.rotate} 0 0)`,!1);u=f(r),r!==a&&(d=f(a)),i.height=(u.height>d.height?u.height:d.height)/1.5,i.width=u.width>d.width?u.width:d.width}}else e.layout.rotateXLabels=!1}return e.config.xaxis.labels.show||(i={width:0,height:0}),{width:i.width,height:i.height}}getxAxisGroupLabelsCoords(){var e;const n=this.w;if(!n.labelData.hasXaxisGroups)return{width:0,height:0};const i=((e=n.config.xaxis.group.style)==null?void 0:e.fontSize)||n.config.xaxis.labels.style.fontSize,o=n.labelData.groups.map(d=>d.title);let r;const a=we.getLargestStringFromArr(o),s=this.dCtx.dimHelpers.getLargestStringFromMultiArr(a,o),l=new it(this.w),c=l.getTextRects(a,i);let u=c;return a!==s&&(u=l.getTextRects(s,i)),r={width:c.width>=u.width?c.width:u.width,height:c.height>=u.height?c.height:u.height},n.config.xaxis.labels.show||(r={width:0,height:0}),{width:r.width,height:r.height}}getxAxisTitleCoords(){const e=this.w;let n=0,i=0;if(e.config.xaxis.title.text!==void 0){const r=new it(this.w).getTextRects(e.config.xaxis.title.text,e.config.xaxis.title.style.fontSize);n=r.width,i=r.height}return{width:n,height:i}}getxAxisTimeScaleLabelsCoords(){const e=this.w;this.dCtx.timescaleLabels=e.labelData.timescaleLabels.slice();const n=this.dCtx.timescaleLabels.map(s=>s.value),i=n.reduce((s,l)=>typeof s>"u"?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):s.length>l.length?s:l,0),r=new it(this.w).getTextRects(i,e.config.xaxis.labels.style.fontSize);return r.width*1.05*n.length>e.layout.gridWidth&&e.config.xaxis.labels.rotate!==0&&(e.globals.overlappingXLabels=!0),r}additionalPaddingXLabels(e){const n=this.w,i=n.globals,o=n.config,r=o.xaxis.type,a=e.width;i.skipLastTimelinelabel=!1,i.skipFirstTimelinelabel=!1;const s=n.config.yaxis[0].opposite&&n.globals.isBarHorizontal,l=d=>i.collapsedSeriesIndices.indexOf(d)!==-1,c=d=>{if(this.dCtx.timescaleLabels&&this.dCtx.timescaleLabels.length){const f=this.dCtx.timescaleLabels[0],p=this.dCtx.timescaleLabels[this.dCtx.timescaleLabels.length-1].position+a/1.75-this.dCtx.yAxisWidthRight,g=f.position-a/1.75+this.dCtx.yAxisWidthLeft,m=n.config.legend.position==="right"&&this.dCtx.lgRect.width>0?this.dCtx.lgRect.width:0;p>i.svgWidth-n.layout.translateX-m&&(i.skipLastTimelinelabel=!0),g<-((!d.show||d.floating)&&(o.chart.type==="bar"||o.chart.type==="candlestick"||o.chart.type==="rangeBar"||o.chart.type==="boxPlot"||o.chart.type==="violin")?a/1.75:10)&&(i.skipFirstTimelinelabel=!0)}else r==="datetime"?this.dCtx.gridPad.right{o.yaxis.length>1&&l(f)||c(d)};o.yaxis.forEach((d,f)=>{s?(this.dCtx.gridPad.left{const c={seriesIndex:l,dataPointIndex:-1,w:e},u=e.globals.yAxisScale[l];let d=0;if(!a.isYAxisHidden(l)&&s.labels.show&&s.labels.minWidth!==void 0&&(d=s.labels.minWidth),!a.isYAxisHidden(l)&&s.labels.show&&u.result.length){const f=e.formatters.yLabelFormatters[l],h=u.niceMin===Number.MIN_VALUE?0:u.niceMin;let p=u.result.reduce((w,x)=>{var $,S;return(($=String(f(w,c)))==null?void 0:$.length)>((S=String(f(x,c)))==null?void 0:S.length)?w:x},h);p=f(p,c);let g=p;if((typeof p>"u"||p.length===0)&&(p=u.niceMax),String(p).length===1&&(p=p+".0",g=p),e.globals.isBarHorizontal){r=0;const w=e.labelData.labels.slice();p=we.getLargestStringFromArr(w),p=f(p,{seriesIndex:l,dataPointIndex:-1,w:e}),g=this.dCtx.dimHelpers.getLargestStringFromMultiArr(p,w)}const m=new it(this.w),v="rotate(".concat(s.labels.rotate," 0 0)"),b=m.getTextRects(p,s.labels.style.fontSize,s.labels.style.fontFamily,v,!1);let y=b;p!==g&&(y=m.getTextRects(g,s.labels.style.fontSize,s.labels.style.fontFamily,v,!1)),o.push({width:(d>y.width||d>b.width?d:y.width>b.width?y.width:b.width)+r,height:y.height>b.height?y.height:b.height})}else o.push({width:n,height:i})}),o}getyAxisTitleCoords(){const e=this.w,n=[];return e.config.yaxis.map(i=>{if(i.show&&i.title.text!==void 0){const o=new it(this.w),r="rotate(".concat(i.title.rotate," 0 0)"),a=o.getTextRects(i.title.text,i.title.style.fontSize,i.title.style.fontFamily,r,!1);n.push({width:a.width,height:a.height})}else n.push({width:0,height:0})}),n}getTotalYAxisWidth(){const e=this.w;let n=0,i=0,o=0;const r=e.globals.yAxisScale.length>1?10:0,a=new Hs(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale}),s=function(c){return e.globals.ignoreYAxisIndexes.indexOf(c)>-1},l=(c,u)=>{const d=e.config.yaxis[u].floating;let f=0;c.width>0&&!d?(f=c.width+r,s(u)&&(f=f-c.width-r)):f=d||a.isYAxisHidden(u)?0:5,e.config.yaxis[u].opposite?o=o+f:i=i+f,n=n+f};return e.layout.yLabelsCoords.map((c,u)=>{l(c,u)}),e.layout.yTitleCoords.map((c,u)=>{l(c,u)}),e.globals.isBarHorizontal&&!e.config.yaxis[0].floating&&(n=e.layout.yLabelsCoords[0].width+e.layout.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=i,this.dCtx.yAxisWidthRight=o,n}}class DF{constructor(e){this.w=e.w,this.dCtx=e}gridPadForColumnsInNumericAxis(e){const{w:n}=this,{config:i,globals:o}=n;if(o.noData||o.collapsedSeries.length+o.ancillaryCollapsedSeries.length===i.series.length)return 0;const r=d=>["bar","rangeBar","candlestick","boxPlot","violin"].includes(d),a=i.chart.type;let s=0,l=r(a)?i.series.length:1;o.comboBarCount>0&&(l=o.comboBarCount),o.collapsedSeries.forEach(d=>{r(d.type)&&(l-=1)}),i.chart.stacked&&(l=1);const c=r(a)||o.comboBarCount>0;let u=Math.abs(o.initialMaxX-o.initialMinX);if(c&&n.axisFlags.isXNumeric&&!o.isBarHorizontal&&l>0&&u!==0){u<=3&&(u=o.dataPoints);const d=u/e;let f=o.minXDiff&&o.minXDiff/d>0?o.minXDiff/d:0;f>e/2&&(f/=2),s=f*parseInt(i.plotOptions.bar.columnWidth,10)/100,s<1&&(s=1),o.barPadForNumericAxis=s}return s}gridPadForStackedTotalDataLabels(){const{w:e}=this,n=e.config.plotOptions.bar.dataLabels.total;if(!e.globals.isBarHorizontal||!e.config.chart.stacked||e.config.chart.stackType!=="100%"||!n.enabled)return;const i=e.seriesData.stackedSeriesTotals||[];if(!i.length)return;const o=n.formatter||e.config.dataLabels.formatter,r=i.map((c,u)=>String(o?o(c,wt(Je({},e),{seriesIndex:0,dataPointIndex:u,w:e})):c)),l=new it(e).getTextRects(we.getLargestStringFromArr(r),parseFloat(n.style.fontSize).toString(),n.style.fontFamily).width+Math.abs(n.offsetX||0)+2;this.dCtx.xPadRight=Math.max(this.dCtx.xPadRight,l)}gridPadFortitleSubtitle(){const{w:e}=this,{globals:n}=e;let i=this.dCtx.isSparkline||!n.axisCharts?0:10;["title","subtitle"].forEach(s=>{e.config[s].text!==void 0?i+=e.config[s].margin:i+=this.dCtx.isSparkline||!n.axisCharts?0:5}),e.config.legend.show&&e.config.legend.position==="bottom"&&!e.config.legend.floating&&!n.axisCharts&&(i+=10);const r=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),a=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");this.dCtx.titleBlockPad=i,e.layout.gridHeight-=r.height+a.height+i,e.layout.translateY+=r.height+a.height+i}setGridXPosForDualYAxis(e,n){const{w:i}=this,o=new Hs(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale});i.config.yaxis.forEach((r,a)=>{i.globals.ignoreYAxisIndexes.indexOf(a)===-1&&!r.floating&&!o.isYAxisHidden(a)&&(r.opposite&&(i.layout.translateX-=n[a].width+e[a].width+parseInt(r.labels.style.fontSize,10)/1.2+12),i.layout.translateX<2&&(i.layout.translateX=2))})}}const Bye=18,zye=23;function CE(t,e){const n=t.config.drilldown&&t.config.drilldown.breadcrumb||{};return Je(Je({show:!0,position:"top-left",separator:" / ",rootLabel:"All",offsetX:0,offsetY:0,formatter:void 0},n),e||{})}let QC=class{constructor(e,n){this.w=e,this.ctx=n,this.theme=n.theme,this.timeScale=n.timeScale,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new MF(this),this.dimYAxis=new kF(this),this.dimXAxis=new IF(this),this.dimGrid=new DF(this),this.lgWidthForSideLegends=0,this.gridPad=Je({},this.w.config.grid.padding),this.xPadRight=0,this.titleBlockPad=0,this.xPadLeft=0,this.datalabelsCoords={width:0,height:0},this.xAxisWidth=0,this.timescaleLabels=[]}plotCoords(){const e=this.w,n=e.globals;if(this.gridPad=Je({},e.config.grid.padding),this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0},this.isSparkline){this.w.globals.markers.largestSize>0&&Object.entries(this.gridPad).forEach(([r,a])=>{this.gridPad[r]=Math.max(a,this.w.globals.markers.largestSize/1.5)});const o=this.dimHelpers.getSparklineStrokeInset();this.gridPad.top=Math.max(o.top,this.gridPad.top),this.gridPad.bottom=Math.max(o.bottom,this.gridPad.bottom)}if(n.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),this.gridPadForBreadcrumb(),this.dimGrid.gridPadForStackedTotalDataLabels(),e.config.chart.type==="heatmap"&&e.config.plotOptions.heatmap.shape==="hexagon"&&!((e.config.xaxis.type==="numeric"||e.config.xaxis.type==="datetime")&&e.axisFlags.isXNumeric)){const o=n.dataPoints||1,r=(e.seriesData.series||[]).length||1,a=e.layout.gridWidth-this.xPadRight-this.xPadLeft,s=e.layout.gridHeight,l=e.config.stroke.show?Array.isArray(e.config.stroke.width)?Math.max(...e.config.stroke.width):e.config.stroke.width:0,c=l/2+6,u=l/2,d=(a+4*o*c)/(4*o+2),f=(s+6*r*u)/(6*r+2);this.gridPad.left=Math.max(d,this.gridPad.left),this.gridPad.right=Math.max(d,this.gridPad.right),this.gridPad.top=Math.max(f,this.gridPad.top),this.gridPad.bottom=Math.max(f,this.gridPad.bottom)}e.layout.gridHeight=e.layout.gridHeight-this.gridPad.top-this.gridPad.bottom,e.layout.gridWidth=e.layout.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;const i=this.dimGrid.gridPadForColumnsInNumericAxis(e.layout.gridWidth);return e.layout.gridWidth=e.layout.gridWidth-i*2,e.layout.translateX=e.layout.translateX+this.gridPad.left+this.xPadLeft+(i>0?i:0),e.layout.translateY=e.layout.translateY+this.gridPad.top,{layout:{gridHeight:e.layout.gridHeight,gridWidth:e.layout.gridWidth,translateX:e.layout.translateX,translateY:e.layout.translateY,translateXAxisX:e.layout.translateXAxisX,translateXAxisY:e.layout.translateXAxisY,rotateXLabels:e.layout.rotateXLabels,xAxisHeight:e.layout.xAxisHeight,xAxisLabelsHeight:e.layout.xAxisLabelsHeight,xAxisGroupLabelsHeight:e.layout.xAxisGroupLabelsHeight,xAxisLabelsWidth:e.layout.xAxisLabelsWidth,yLabelsCoords:e.layout.yLabelsCoords,yTitleCoords:e.layout.yTitleCoords,gridPad:Je({},this.gridPad)}}}gridPadForBreadcrumb(){var e,n,i,o,r,a;const s=this.w,l=s.config.chart.type==="treemap";if(l){const h=(n=(e=s.config.plotOptions)==null?void 0:e.treemap)==null?void 0:n.zoom;if(h&&h.enabled){if(CE(s,h.breadcrumb).show===!1)return;this.gridPad.top+=Bye+4;return}}if(!s.globals.axisCharts||!this.ctx.drilldown||!s.config.drilldown||!s.config.drilldown.enabled||CE(s).show===!1)return;const c=parseFloat(String((a=(r=(o=(i=s.config.yaxis)==null?void 0:i[0])==null?void 0:o.labels)==null?void 0:r.style)==null?void 0:a.fontSize))||11,u=l?0:Math.ceil(c*Sg/2),d=zye+1+u,f=l?0:this.titleBlockPad||0;this.gridPad.top+=Math.max(0,d-f)}setDimensionsForAxisCharts(){const e=this.w,n=e.globals,i=this.dimYAxis.getyAxisLabelsCoords(),o=this.dimYAxis.getyAxisTitleCoords();n.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),e.layout.yLabelsCoords=[],e.layout.yTitleCoords=[],e.config.yaxis.map((h,p)=>{e.layout.yLabelsCoords.push({width:i[p].width,index:p}),e.layout.yTitleCoords.push({width:o[p].width,index:p})}),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();const r=this.dimXAxis.getxAxisLabelsCoords(),a=this.dimXAxis.getxAxisGroupLabelsCoords(),s=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(r,s,a),e.layout.translateXAxisY=e.layout.rotateXLabels?this.xAxisHeight/8:-4,e.layout.translateXAxisX=e.layout.rotateXLabels&&e.axisFlags.isXNumeric&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,e.globals.isBarHorizontal&&(e.layout.rotateXLabels=!1,e.layout.translateXAxisY=-1*((parseInt(e.config.xaxis.labels.style.fontSize,10)||12)/1.5)),e.layout.translateXAxisY=e.layout.translateXAxisY+e.config.xaxis.labels.offsetY,e.layout.translateXAxisX=e.layout.translateXAxisX+e.config.xaxis.labels.offsetX;let l=this.yAxisWidth,c=this.xAxisHeight;e.layout.xAxisLabelsHeight=this.xAxisHeight-s.height,e.layout.xAxisGroupLabelsHeight=e.layout.xAxisLabelsHeight-r.height,e.layout.xAxisLabelsWidth=this.xAxisWidth,e.layout.xAxisHeight=this.xAxisHeight;let u=10;(e.config.chart.type==="radar"||this.isSparkline)&&(l=0,c=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||e.config.chart.type==="treemap")&&(l=0,c=0,u=0),!this.isSparkline&&e.config.chart.type!=="treemap"&&this.dimXAxis.additionalPaddingXLabels(r);const d=()=>{e.layout.translateX=l+this.datalabelsCoords.width,e.layout.gridHeight=n.svgHeight-this.lgRect.height-c-(!this.isSparkline&&e.config.chart.type!=="treemap"?e.layout.rotateXLabels?10:15:0),e.layout.gridWidth=n.svgWidth-l-this.datalabelsCoords.width*2};switch(e.config.xaxis.position==="top"&&(u=e.layout.xAxisHeight-e.config.xaxis.axisTicks.height-5),e.config.legend.position){case"bottom":e.layout.translateY=u,d();break;case"top":e.layout.translateY=this.lgRect.height+u,d();break;case"left":e.layout.translateY=u,e.layout.translateX=this.lgRect.width+l+this.datalabelsCoords.width,e.layout.gridHeight=n.svgHeight-c-12,e.layout.gridWidth=n.svgWidth-this.lgRect.width-l-this.datalabelsCoords.width*2;break;case"right":e.layout.translateY=u,e.layout.translateX=l+this.datalabelsCoords.width,e.layout.gridHeight=n.svgHeight-c-12,e.layout.gridWidth=n.svgWidth-this.lgRect.width-l-this.datalabelsCoords.width*2-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(o,i),new Id(this.w,{theme:this.theme,timeScale:this.timeScale}).setYAxisXPosition(i,o)}setDimensionsForNonAxisCharts(){const e=this.w,n=e.globals,i=e.config;let o=0;if(e.config.legend.show&&!e.config.legend.floating&&(o=20),i.chart.type==="unit"){const l=i.legend.show&&!i.legend.floating,c=i.legend.position;let u=0,d=0;l&&(c==="bottom"||c==="top"?u=this.lgRect.height:d=this.lgRect.width+o),e.layout.gridWidth=n.svgWidth-d,e.layout.gridHeight=n.svgHeight-u,e.layout.translateX=c==="left"?d:0,e.layout.translateY=c==="top"?u:0;return}const r=i.chart.type==="sunburst"?"sunburst":i.chart.type==="pie"||i.chart.type==="polarArea"||i.chart.type==="donut"?"pie":"radialBar",a=i.plotOptions[r].offsetY,s=i.plotOptions[r].offsetX;if(!i.legend.show||i.legend.floating){e.layout.gridHeight=n.svgHeight;const l=e.dom.elWrap.getBoundingClientRect().width;e.layout.gridWidth=Math.min(l,e.layout.gridHeight),e.layout.translateY=a,e.layout.translateX=s+(n.svgWidth-e.layout.gridWidth)/2;return}switch(i.legend.position){case"bottom":e.layout.gridHeight=n.svgHeight-this.lgRect.height,e.layout.gridWidth=n.svgWidth,e.layout.translateY=a-10,e.layout.translateX=s+(n.svgWidth-e.layout.gridWidth)/2;break;case"top":e.layout.gridHeight=n.svgHeight-this.lgRect.height,e.layout.gridWidth=n.svgWidth,e.layout.translateY=this.lgRect.height+a+10,e.layout.translateX=s+(n.svgWidth-e.layout.gridWidth)/2;break;case"left":e.layout.gridWidth=n.svgWidth-this.lgRect.width-o,e.layout.gridHeight=i.chart.height!=="auto"?n.svgHeight:e.layout.gridWidth,e.layout.translateY=a,e.layout.translateX=s+this.lgRect.width+o;break;case"right":e.layout.gridWidth=n.svgWidth-this.lgRect.width-o-5,e.layout.gridHeight=i.chart.height!=="auto"?n.svgHeight:e.layout.gridWidth,e.layout.translateY=a,e.layout.translateX=s+10;break;default:throw new Error("Legend position not supported")}}conditionalChecksForAxisCoords(e,n,i){const o=this.w,r=o.labelData.hasXaxisGroups?2:1,a=i.height+e.height+n.height,s=o.axisFlags.isMultiLineX?1.2:Sg,l=o.layout.rotateXLabels?22:10,u=o.layout.rotateXLabels&&o.config.legend.position==="bottom"?10:0;this.xAxisHeight=a*s+r*l+u,this.xAxisWidth=e.width,this.xAxisHeight-n.height>o.config.xaxis.labels.maxHeight&&(this.xAxisHeight=o.config.xaxis.labels.maxHeight),o.config.xaxis.labels.minHeight&&this.xAxisHeight{d+=h.labels.minWidth,f+=h.labels.maxWidth}),this.yAxisWidthf&&(this.yAxisWidth=f)}};const bu=1e3,yu=60*bu,xu=60*yu,vc=24*xu,$E=7*vc,b0=30*vc,Qa=365*vc,Hye=10/(24*60*60),y0=[{unit:"second",step:1,approxMs:bu},{unit:"second",step:5,approxMs:5*bu},{unit:"second",step:15,approxMs:15*bu},{unit:"second",step:30,approxMs:30*bu},{unit:"minute",step:1,approxMs:yu},{unit:"minute",step:5,approxMs:5*yu},{unit:"minute",step:15,approxMs:15*yu},{unit:"minute",step:30,approxMs:30*yu},{unit:"hour",step:1,approxMs:xu},{unit:"hour",step:3,approxMs:3*xu},{unit:"hour",step:6,approxMs:6*xu},{unit:"hour",step:12,approxMs:12*xu},{unit:"day",step:1,approxMs:vc},{unit:"day",step:2,approxMs:2*vc},{unit:"week",step:1,approxMs:$E},{unit:"week",step:2,approxMs:2*$E},{unit:"month",step:1,approxMs:b0},{unit:"month",step:3,approxMs:3*b0},{unit:"month",step:6,approxMs:6*b0},{unit:"year",step:1,approxMs:Qa},{unit:"year",step:2,approxMs:2*Qa},{unit:"year",step:5,approxMs:5*Qa},{unit:"year",step:10,approxMs:10*Qa},{unit:"year",step:25,approxMs:25*Qa},{unit:"year",step:50,approxMs:50*Qa},{unit:"year",step:100,approxMs:100*Qa}],RF=10;let LF=class{constructor(e,n){this.w=e,this.ctx=n,this.tickInterval=null,this.timeScaleArray=[],this.utc=e.config.xaxis.labels.datetimeUTC}calculateTimeScaleTicks(e,n){const i=this.w;if(i.globals.allSeriesCollapsed)return i.labelData.labels=[],i.labelData.timescaleLabels=[],this.timeScaleArray=[],[];const o=n-e,r=o/vc;i.interact.disableZoomIn=!1,i.interact.disableZoomOut=!1,r5e4&&(i.interact.disableZoomOut=!0);const a=Number.isFinite(i.config.xaxis.tickAmount)?i.config.xaxis.tickAmount:RF;this.tickInterval=Wye(o,a);const s=this.generateBaseTicks(e,n,this.tickInterval);return this.timeScaleArray=s,s}generateBaseTicks(e,n,i){const o=this.w,r=new Ei(o),a=this.utc,s=o.layout.gridWidth,l=n-e,c=[];let u=r.ceilToBoundary(e,i.unit,i.step,a),d=0;const f=5e3;for(;u<=n&&d0?(u-e)/l*s:0;c.push({timestamp:u,position:p,unit:i.unit,year:h.year,month:h.month+1,day:h.date,hour:h.hour,minute:h.minute,second:h.second,value:u}),u=r.addInterval(u,i.unit,i.step,a),d++}return c}recalcDimensionsBasedOnFormat(e){const n=this.w,i=this.formatDates(e),o=this.removeOverlappingTS(i);n.labelData.timescaleLabels=o.slice();const a=new QC(this.w,this.ctx).plotCoords();this.ctx._writeLayoutCoords(a.layout)}formatDates(e){const n=this.w,i=new Ei(n),o=n.config.xaxis.labels.format,r=n.config.xaxis.labels.datetimeFormatter,a=this.utc,s=(c,u=2)=>String(c).padStart(u,"0"),l=o||this._effectiveFormat(e,r);return e.map(c=>{const u=i.getDate(c.timestamp),d=i.formatDate(u,l);return{dateString:`${c.year}-${s(c.month)}-${s(c.day)}T${s(c.hour)}:${s(c.minute)}:${s(c.second)}.000${a?"Z":""}`,position:c.position,value:d,unit:c.unit,year:c.year,month:c.month}})}_effectiveFormat(e,n){if(e.length===0)return n.day||"dd MMM";const i=this.tickInterval&&this.tickInterval.unit||e[0].unit,o=n[i==="week"?"day":i]||n.day||"dd MMM",r=e[0],a=e[e.length-1],s=r.year!==a.year,c=s||r.month!==a.month||r.day!==a.day,u=/y/i.test(o),d=/M/.test(o),f=/d/i.test(o);return i==="month"||i==="week"||i==="day"?s&&!u?o+" yyyy":o:(i==="hour"||i==="minute"||i==="second")&&c&&!f&&!d?(s?"dd MMM yyyy":"dd MMM")+" "+o:o}removeOverlappingTS(e){if(e.length===0)return[];const n=this.w,i=new it(n);let o=!1,r;e[0].value&&e.every(l=>l.value.length===e[0].value.length)&&(o=!0,r=i.getTextRects(e[0].value,n.config.xaxis.labels.style.fontSize).width);let a=0;return e.map((l,c)=>{if(c===0||!n.config.xaxis.labels.hideOverlappingLabels)return l;const u=o?r:i.getTextRects(e[a].value,n.config.xaxis.labels.style.fontSize).width,d=e[a].position;return l.position>d+u+10?(a=c,l):null}).filter(l=>l!==null)}};function Wye(t,e){if((!Number.isFinite(e)||e<=0)&&(e=RF),t<=0)return y0[0];const n=t/e;let i=y0[0],o=1/0;for(const r of y0){const a=Math.abs(Math.log(r.approxMs/n));a after apexcharts.core.js, or load the full apexcharts.js instead.`);return e}let FF=class{constructor(e,n,i){this.w=n,this.ctx=i,this.el=e}setupElements(){const{globals:e,config:n}=this.w,i=n.chart.type,o=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","violin","scatter","bubble"],r=[...o,"radar","heatmap","treemap"],a=!r.includes(i)&&!["pie","donut","polarArea","radialBar"].includes(i)&&Lr(i);e.axisCharts=r.includes(i)||a,e.xyCharts=o.includes(i)||a,e.isBarHorizontal=["bar","rangeBar","boxPlot","violin"].includes(i)&&n.plotOptions.bar.horizontal,e.chartClass=`.apexcharts${e.chartID}`,this.w.dom.baseEl=this.el,this.w.dom.elWrap=nt.createElementNS("http://www.w3.org/1999/xhtml","div"),it.setAttrs(this.w.dom.elWrap,{id:e.chartClass.substring(1),class:`apexcharts-canvas ${e.chartClass.substring(1)}`}),this.el.appendChild(this.w.dom.elWrap);const s=globalThis.SVG;if(this.w.dom.Paper=s().addTo(this.w.dom.elWrap),this.w.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:`translate(${n.chart.offsetX}, ${n.chart.offsetY})`}),this.w.dom.Paper.node.style.background=n.theme.mode==="dark"&&!n.chart.background?"#343A3F":n.theme.mode==="light"&&!n.chart.background?"#fff":n.chart.background,this.setSVGDimensions(),this.w.dom.elLegendForeign=nt.createElementNS(Wt,"foreignObject"),it.setAttrs(this.w.dom.elLegendForeign,{x:0,y:0,width:e.svgWidth,height:e.svgHeight}),this.w.dom.elLegendWrap=nt.createElementNS("http://www.w3.org/1999/xhtml","div"),this.w.dom.elLegendWrap.classList.add("apexcharts-legend"),this.w.dom.elWrap.appendChild(this.w.dom.elLegendWrap),this.w.dom.Paper.node.appendChild(this.w.dom.elLegendForeign),n.chart.accessibility.enabled&&n.chart.accessibility.announcements.enabled){const l=nt.createElement("div");l.className="apexcharts-sr-status",l.setAttribute("role","status"),l.setAttribute("aria-live","polite"),l.setAttribute("aria-atomic","true"),this.w.dom.elWrap.appendChild(l)}if(n.chart.accessibility.enabled){const l=this.getAccessibleChartLabel(),c=n.chart.accessibility.keyboard.enabled&&n.chart.accessibility.keyboard.navigation.enabled?"application":"img";if(this.w.dom.Paper.attr({role:c,"aria-label":l}),n.chart.accessibility.description){const u=nt.createElementNS(Wt,"desc");u.textContent=n.chart.accessibility.description,this.w.dom.Paper.node.insertBefore(u,this.w.dom.elLegendForeign.nextSibling)}}this.w.dom.elGraphical=this.w.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),this.w.dom.elDefs=this.w.dom.Paper.defs(),this.w.dom.Paper.add(this.w.dom.elGraphical),this.w.dom.elGraphical.add(this.w.dom.elDefs)}_classifySeriesByType(e){const{w:n}=this,{config:i,globals:o}=n,r={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},bar:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},violin:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},a={},s=i.chart.type||"line";let l=null,c=0;return this.w.seriesData.series.forEach((u,d)=>{var f,h;const p=((f=e[d])==null?void 0:f.type)==="column"?"bar":((h=e[d])==null?void 0:h.type)||(s==="column"?"bar":s),g=r;g[p]?(p==="rangeArea"?(g[p].series.push(this.w.rangeData.seriesRangeStart[d]),g[p].seriesRangeEnd.push(this.w.rangeData.seriesRangeEnd[d])):g[p].series.push(u),g[p].i.push(d),p==="bar"&&(n.globals.columnSeries=r.bar)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar","unit","sunburst"].includes(p)?l=p:Lr(p)?(a[p]||(a[p]={series:[],i:[]}),a[p].series.push(u),a[p].i.push(d)):console.warn(`You have specified an unrecognized series type (${p}).`),s!==p&&p!=="scatter"&&c++}),c>0&&(l&&console.warn(`Chart or series type ${l} cannot appear with other chart or series types.`),r.bar.series.length>0&&i.plotOptions.bar.horizontal&&(c-=r.bar.series.length,r.bar={series:[],i:[]},n.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),o.comboCharts||(o.comboCharts=c>0),{seriesTypes:r,customBuckets:a}}plotChartType(e,n){const{w:i,ctx:o}=this,r=o.renderer&&o.renderer.kind==="canvas";r&&o.renderer.beginSeries();const{seriesTypes:a,customBuckets:s}=this._classifySeriesByType(e),l=this._instantiateSeriesRenderers(a,n),c=this._assembleSeriesGraphics(a,s,l,n);if(r){const u=o.renderer;if(u&&u._repaintHostInPlace){u._repaintHostInPlace=!1;const f=this.w.dom.elGraphical.node.querySelector(".apexcharts-canvas-series-wrap");if(f&&u.canRepaintInPlace&&u.canRepaintInPlace())return u.repaintInPlace(),(Array.isArray(c)?c:[c]).forEach(p=>{p&&p.node&&f.appendChild(p.node)}),[]}const d=o.renderer.present();if(d){const f=new it(i).group({class:"apexcharts-canvas-series-wrap"});return f.add(d),(Array.isArray(c)?c:[c]).forEach(p=>{p&&f.add(p)}),f}}return c}_instantiateSeriesRenderers(e,n){const{w:i,ctx:o}=this,{config:r,globals:a}=i,l=e.line.series.length>0||e.area.series.length>0||e.scatter.series.length>0||e.bubble.series.length>0||e.rangeArea.series.length>0||!a.comboCharts&&["line","area","scatter","bubble","rangeArea"].includes(r.chart.type)?new(hn("line"))(o.w,o,n):null,u=e.candlestick.series.length>0||e.boxPlot.series.length>0||!a.comboCharts&&["candlestick","boxPlot"].includes(r.chart.type)?new(hn("candlestick"))(o.w,o,n):null,f=e.violin.series.length>0||!a.comboCharts&&r.chart.type==="violin"?new(hn("violin"))(o.w,o,n):null,h=!a.comboCharts&&["pie","donut","polarArea"].includes(r.chart.type);o.pie=h?new(hn("pie"))(o.w,o):null;const p=e.rangeBar.series.length>0||!a.comboCharts&&r.chart.type==="rangeBar";return o.rangeBar=p?new(hn("rangeBar"))(o.w,o,n):null,{line:l,boxCandlestick:u,violin:f}}_assembleSeriesGraphics(e,n,i,o){const{w:r,ctx:a}=this,{config:s,globals:l}=r,{line:c,boxCandlestick:u,violin:d}=i;let f=[];if(l.comboCharts){const h=new Xi(this.w);if(e.area.series.length>0&&f.push(...h.drawSeriesByGroup(e.area,l.areaGroups,"area",c)),e.bar.series.length>0)if(s.chart.stacked){const p=new(hn("barStacked"))(a.w,a,o);f.push(p.draw(e.bar.series,e.bar.i))}else a.bar=new(hn("bar"))(a.w,a,o),f.push(a.bar.draw(e.bar.series,e.bar.i));if(e.rangeArea.series.length>0&&f.push(c.draw(e.rangeArea.series,"rangeArea",e.rangeArea.i,e.rangeArea.seriesRangeEnd)),e.line.series.length>0&&f.push(...h.drawSeriesByGroup(e.line,l.lineGroups,"line",c)),e.candlestick.series.length>0&&f.push(u.draw(e.candlestick.series,"candlestick",e.candlestick.i)),e.boxPlot.series.length>0&&f.push(u.draw(e.boxPlot.series,"boxPlot",e.boxPlot.i)),e.violin.series.length>0&&f.push(d.draw(e.violin.series,"violin",e.violin.i)),e.rangeBar.series.length>0&&f.push(a.rangeBar.draw(e.rangeBar.series,e.rangeBar.i)),e.scatter.series.length>0){const p=new(hn("line"))(a.w,a,o,!0);f.push(p.draw(e.scatter.series,"scatter",e.scatter.i))}if(e.bubble.series.length>0){const p=new(hn("line"))(a.w,a,o,!0);f.push(p.draw(e.bubble.series,"bubble",e.bubble.i))}Object.keys(n).forEach(p=>{const g=n[p];if(g.series.length>0){const m=new(hn(p))(a.w,a,o);f.push(m.draw(g.series,p,g.i))}})}else{const h=s.chart.type;switch(h){case"line":f=c.draw(this.w.seriesData.series,"line");break;case"area":f=c.draw(this.w.seriesData.series,"area");break;case"bar":s.chart.stacked?f=new(hn("barStacked"))(a.w,a,o).draw(this.w.seriesData.series):(a.bar=new(hn("bar"))(a.w,a,o),f=a.bar.draw(this.w.seriesData.series));break;case"candlestick":f=u.draw(this.w.seriesData.series,"candlestick");break;case"boxPlot":f=u.draw(this.w.seriesData.series,h);break;case"violin":f=d.draw(this.w.seriesData.series,"violin");break;case"rangeBar":f=a.rangeBar.draw(this.w.seriesData.series);break;case"rangeArea":f=c.draw(this.w.rangeData.seriesRangeStart,"rangeArea",void 0,this.w.rangeData.seriesRangeEnd);break;case"heatmap":{f=new(hn("heatmap"))(a.w,a,o).draw(this.w.seriesData.series);break}case"treemap":{f=new(hn("treemap"))(a.w,a).draw(this.w.seriesData.series);break}case"unit":{f=new(hn("unit"))(a.w,a).draw(this.w.seriesData.series);break}case"sunburst":{f=new(hn("sunburst"))(a.w,a).draw(this.w.seriesData.series);break}case"pie":case"donut":case"polarArea":f=a.pie.draw(this.w.seriesData.series);break;case"radialBar":{f=new(hn("radialBar"))(a.w,a).draw(this.w.seriesData.series);break}case"radar":{f=new(hn("radar"))(a.w,a).draw(this.w.seriesData.series);break}default:Lr(h)?f=new(hn(h))(a.w,a,o).draw(this.w.seriesData.series,h):f=c.draw(this.w.seriesData.series)}}return f}_extractDimensionUnit(e){return String(e).split(/[0-9]+/g).pop()}setSVGDimensions(){var e;const{globals:n,config:i}=this.w;i.chart.width=i.chart.width||"100%",i.chart.height=i.chart.height||"auto";const o=i.chart.width,r=i.chart.height;n.svgWidth=NaN,n.svgHeight=NaN;let a=we.getDimensions(this.el);const s=this._extractDimensionUnit(o);s==="%"?we.isNumber(a[0])&&(a[0].width===0&&(a=we.getDimensions(this.el.parentNode)),n.svgWidth=a[0]*parseInt(o,10)/100):(s==="px"||s==="")&&(n.svgWidth=parseInt(o,10));const l=this._extractDimensionUnit(r);if(r!=="auto"&&r!=="")if(l==="%"){const c=we.getDimensions(this.el.parentNode);n.svgHeight=c[1]*parseInt(r,10)/100}else n.svgHeight=parseInt(r,10);else n.svgHeight=n.axisCharts?n.svgWidth/1.61:n.svgWidth/1.2;if(this._applyWeaveReservation(n),n.svgWidth=Math.max(n.svgWidth,0),n.svgHeight=Math.max(n.svgHeight,0),it.setAttrs(this.w.dom.Paper.node,{width:n.svgWidth,height:n.svgHeight}),l!=="%"&&Ge.isBrowser()){const c=n.axisCharts&&(i.grid.show||i.dataLabels.enabled||i.xaxis.labels.show||i.xaxis.axisBorder.show||i.xaxis.axisTicks.show||i.yaxis.some(f=>f.show&&(f.labels.show||f.axisBorder.show||f.axisTicks.show))),u=i.chart.sparkline.enabled||!c?0:i.chart.parentHeightOffset,d=this.w.dom.Paper.node;(e=d.parentNode)!=null&&e.parentNode&&(d.parentNode.parentNode.style.minHeight=`${n.svgHeight+u}px`)}this.w.dom.elWrap.style.width=`${n.svgWidth}px`,this.w.dom.elWrap.style.height=`${n.svgHeight}px`,n.lastResizeSignature=this.getResizeSignature()}_applyWeaveReservation(e){const n=this.ctx&&this.ctx.weave;if(!n||typeof n.reservedBox!="function")return;const i=n.reservedBox(),o=i.left+i.right,r=i.top+i.bottom;!o&&!r||(o&&Number.isFinite(e.svgWidth)&&(e.svgWidth-=Math.min(o,e.svgWidth/2)),r&&Number.isFinite(e.svgHeight)&&(e.svgHeight-=Math.min(r,e.svgHeight/2)))}getResizeSignature(){const{config:e}=this.w,n=(e.chart.width||"100%").toString().trim(),i=(e.chart.height||"auto").toString().trim();let o=0,r=0;if(n.endsWith("%")){let s=we.getDimensions(this.el);s[0]||(s=we.getDimensions(this.el.parentNode)),o=s[0]||0}i.endsWith("%")&&(r=we.getDimensions(this.el.parentNode)[1]||0);const a={w:Math.round(o),h:Math.round(r)};return e.responsive&&e.responsive.length&&Ge.isBrowser()&&(a.iw=window.innerWidth),a}shiftGraphPosition(){const{globals:e}=this.w,{translateY:n,translateX:i}=e;it.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${i}, ${n})`})}resizeNonAxisCharts(){var e,n,i,o,r,a,s,l,c;const{w:u}=this,d=u.config.chart.height?String(u.config.chart.height):"",f=d!==""&&d!=="auto",h=d.includes("%");let p=0,g=u.config.chart.sparkline.enabled?1:15;g+=u.layout.gridPad.bottom,["top","bottom"].includes(u.config.legend.position)&&u.config.legend.show&&!u.config.legend.floating&&(p=((n=(e=this.ctx.legend)==null?void 0:e.legendHelpers.getLegendDimensions().clwh)!=null?n:0)+7);const m=u.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie, .apexcharts-sunburst"),v=u.globals.pieExternalLabelMarginY||0;let b=v>0?u.globals.radialSize*2+v*2:u.globals.radialSize*2.05;const y=u.config.chart.type==="sunburst"?"sunburst":u.config.chart.type==="pie"||u.config.chart.type==="donut"||u.config.chart.type==="polarArea"?"pie":"radialBar",w=Math.abs(u.config.plotOptions[y].endAngle-u.config.plotOptions[y].startAngle);if(m&&!u.config.chart.sparkline.enabled&&w<360){const $=we.getBoundingClientRect(this.w.dom.Paper.node);let S=1/0,_=-1/0;const P=R=>{var D,F,N,B;if((D=R.classList)!=null&&D.contains("apexcharts-radialbar-hollow"))return;const z=(N=(F=R.tagName)==null?void 0:F.toLowerCase)==null?void 0:N.call(F);if(z==="text"||z==="tspan")return;const W=Array.from((B=R.children)!=null?B:[]);if(W.length>0){W.forEach(V=>P(V));return}const j=we.getBoundingClientRect(R);if(j.bottom-j.top>0){const V=j.top-$.top,q=j.bottom-$.top;V_&&(_=q)}};Array.from((i=m.children)!=null?i:[]).forEach(R=>P(R)),Number.isFinite(S)||(S=0),Number.isFinite(_)||(_=we.getBoundingClientRect(m).bottom-$.top);const O=Math.max(g,u.globals.radialSize*.2),T=Math.max(O-S,0);T!==0&&(u.layout.translateY=((o=u.layout.translateY)!=null?o:0)+T,it.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${(r=u.layout.translateX)!=null?r:0}, ${u.layout.translateY})`}),_+=T),b=_>0?_:u.globals.radialSize*2.05;const M=Math.max(O,S),I=Math.ceil(b+p+M),k=(a=u.config.chart.offsetY)!=null?a:0,E=I+Math.max(k,0);if(!h){if(this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute("height",String(E)),this.w.dom.elWrap.style.height=`${E}px`,it.setAttrs(this.w.dom.Paper.node,{height:I}),Ge.isBrowser()){const R=(s=this.w.dom.Paper.node.parentNode)==null?void 0:s.parentNode;R&&(R.style.minHeight=`${E}px`)}u.globals.svgHeight=I,u.config.legend.position==="bottom"&&u.config.legend.show&&!u.config.legend.floating&&((l=this.ctx.legend)==null||l.setLegendWrapXY(20,0))}return}const x=Math.ceil(b+this.w.layout.translateY+p+g);if(!f&&(this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute("height",String(x)),this.w.dom.elWrap.style.height=`${x}px`,it.setAttrs(this.w.dom.Paper.node,{height:x}),Ge.isBrowser())){const $=(c=this.w.dom.Paper.node.parentNode)==null?void 0:c.parentNode;$&&($.style.minHeight=`${x}px`)}}coreCalculations(){new Pg(this.w).init()}resetGlobals(){const e=()=>this.w.config.series.map(()=>[]),n=new KC,{globals:i}=this.w,o={dataWasParsed:this.w.axisFlags.dataWasParsed,originalSeries:i.originalSeries};n.initGlobalVars(i),i.seriesXvalues=e(),i.seriesYvalues=e(),o.dataWasParsed&&(this.w.axisFlags.dataWasParsed=o.dataWasParsed,i.originalSeries=o.originalSeries)}isMultipleY(){return Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1?(this.w.globals.isMultipleYAxis=!0,!0):!1}xySettings(){const{w:e}=this;let n=null;if(e.globals.axisCharts){if(e.config.xaxis.crosshairs.position==="back"&&new Og(this.w).drawXCrosshairs(),e.config.yaxis[0].crosshairs.position==="back"&&new Og(this.w).drawYCrosshairs(),e.config.xaxis.type==="datetime"&&e.config.xaxis.labels.formatter===void 0){this.ctx.timeScale=new LF(this.w,this.ctx);let o=[];isFinite(e.globals.minX)&&isFinite(e.globals.maxX)&&!e.globals.isBarHorizontal?o=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minX,e.globals.maxX):e.globals.isBarHorizontal&&(o=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minY,e.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(o)}n=new Xi(this.w).getCalculatedRatios()}return n}updateSourceChart(e){this.ctx.w.interact.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:e.w.globals.minX,max:e.w.globals.maxX}}}},!1,!1)}setupBrushHandler(){const{ctx:e,w:n}=this;if(n.config.chart.brush.enabled&&typeof n.config.chart.events.selection!="function"){const i=Array.isArray(n.config.chart.brush.targets)?n.config.chart.brush.targets:[n.config.chart.brush.target];i.forEach(o=>{const r=e.constructor.getChartByID(o);if(!r){console.warn(`ApexCharts: brush target "${o}" was not found. Ensure the target chart is rendered (and its chart.id matches) before the brush chart.`);return}r.w.globals.brushSource=this.ctx,typeof r.w.config.chart.events.zoomed!="function"&&(r.w.config.chart.events.zoomed=()=>this.updateSourceChart(r)),typeof r.w.config.chart.events.scrolled!="function"&&(r.w.config.chart.events.scrolled=()=>this.updateSourceChart(r))}),n.config.chart.events.selection=(o,r)=>{i.forEach(a=>{const s=e.constructor.getChartByID(a);s&&s.ctx.updateHelpers._updateOptions({xaxis:{min:r.xaxis.min,max:r.xaxis.max}},!1,!1,!1,!1)})}}}getAccessibleChartLabel(){const e=this.w,n=e.config;if(n.chart.accessibility&&n.chart.accessibility.description)return n.chart.accessibility.description;const i=n.chart.type,o=[];if(n.title.text)o.push(`${n.title.text}. ${i} chart`),n.subtitle.text&&o.push(n.subtitle.text);else{const r=Array.isArray(e.seriesData.seriesNames)&&e.seriesData.seriesNames.length?e.seriesData.seriesNames.filter(Boolean):Array.isArray(n.series)?n.series.map(s=>typeof s=="object"&&s!==null?s.name:null).filter(Boolean):[],a=e.seriesData.series.length||(n.series?n.series.length:0);r.length?o.push(`${i} chart with ${a} data series: ${r.join(", ")}`):o.push(`${i} chart with ${a} data series`)}return o.join(". ")}};const Lx="__apexcharts_series_transforms__";globalThis[Lx]||(globalThis[Lx]={});function Yye(){return globalThis[Lx]}function Gye(t){return t&&Yye()[t]||null}function Kye(t,e){const n=t.config.drilldown;return(n&&Array.isArray(n.series)?n.series:[]).find(o=>o&&o.id===e)}function Fx(t,e,n,i,o,r=null,a={}){var s,l,c;const u=e&&typeof e=="object",d=u&&(l=(s=e.x)!=null?s:e.name)!=null?l:"",f=Number(u?(c=e.y)!=null?c:e.value:e),h={name:String(d),value:isNaN(f)?null:f,color:u&&e.color?e.color:void 0,_key:`${o}/${n}:${d}`};if(i&&!h.color&&(h.color=i[n%i.length]),a.keepDatum&&(h._datum=e),u&&Array.isArray(e.children)&&e.children.length)h.children=e.children.map((p,g)=>Fx(t,p,g,null,h._key,r,a));else if(u&&e.drilldown!=null&&a.expandDrilldown!==!1){const p=r||new Set;if(!p.has(e.drilldown)){const g=Kye(t,e.drilldown);if(g&&Array.isArray(g.data)&&g.data.length){const m=new Set(p);m.add(e.drilldown);const v=Array.isArray(g.colors)?g.colors:null;h.children=g.data.map((b,y)=>Fx(t,b,y,v,h._key,m,a))}}}return h}function Uye(t,e,n={}){const i=e||t.config.series;return Array.isArray(i)?i.map((o,r)=>{var a,s;const l=o&&Array.isArray(o.data)?o.data:[],c=`${r}:${(a=o==null?void 0:o.name)!=null?a:""}`;return{name:String((s=o==null?void 0:o.name)!=null?s:""),value:null,color:(o==null?void 0:o.color)||void 0,_key:c,_seriesIndex:r,children:l.map((d,f)=>Fx(t,d,f,null,c,null,n))}}):[]}function NF(t){t.children&&t.children.length&&(t.children.forEach(e=>NF(e)),(t.value==null||isNaN(t.value))&&(t.value=t.children.reduce((e,n)=>e+Math.max(0,n.value||0),0))),(t.value==null||isNaN(t.value))&&(t.value=0)}function qye(t,e={}){if(!Array.isArray(t))return!1;const n=e.drilldown!==!1;for(let i=0;i{const r=[],a=(s,l,c)=>{s._parent=c,s._depth=l,s._si=o,s._leaf=!(s.children&&s.children.length),l>n&&(n=l),s._leaf?(s._di=r.length,r.push(s)):(s._di=-1,s.children.forEach(u=>a(u,l+1,s)))};a(i,0,null),e.push(r)}),{leaves:e,maxDepth:n}}function Qye(t){const e=t._datum;if(e&&typeof e=="object"){const n=wt(Je({},e),{x:t.name,y:t.value});return delete n.children,n}return{x:t.name,y:t.value}}function exe(t,e){const n=Uye(t,e,{keepDatum:!0,expandDrilldown:BF(t)});n.forEach(NF);const{leaves:i,maxDepth:o}=Jye(n),r=e.map((a,s)=>wt(Je({},a),{data:(i[s]||[]).map(Qye)}));return{roots:n,leafSeries:r,maxDepth:o}}const txe={histogram:"stats",raincloud:"raincloud"};let t$=class ca{constructor(e,{resetGlobals:n=()=>{},isMultipleY:i=()=>{}}={}){this.w=e,this.resetGlobals=n,this.isMultipleY=i,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this._warnedMissingTransform=!1,this.coreUtils=new Xi(this.w),this.activeSeriesIndex=0}getFirstDataPoint(){const e=this.w.config.series,n=new js(this.w);this.activeSeriesIndex=n.getActiveConfigSeriesIndex();const i=e[this.activeSeriesIndex];return i&&i.data&&i.data.length>0&&i.data[0]!==null&&typeof i.data[0]<"u"?i.data[0]:null}isMultiFormat(){return this.isFormatXY()||this.isFormat2DArray()}isFormatXY(){var e;const n=this.getFirstDataPoint();if(!n||typeof n.x>"u")return!1;const i=(e=this.w.config.series[this.activeSeriesIndex])==null?void 0:e.data;if(i){const o=r=>r&&typeof r.x<"u";for(let r=1;r2)return!1;const $=x[0],S=x[1];if(h)if(typeof $=="number"){$===$&&($g&&(g=$));const _=$-b;_>0?_l&&(l=S),S=1e-6&&_<1e21){const P=""+S,O=P.indexOf("."),T=O===-1?0:P.length-O-1;T>f&&(f=T)}else{const P=we.noExponents(S);we.isFloat(P)&&(f=Math.max(f,P.toString().split(".")[1].length))}}}else d=!0;else if(S===null)d=!0;else return!1;a[w]=S,s[w]=$}this.twoDSeries=a,this.twoDSeriesX=s,this.w.axisFlags.dataFormatXNumeric=!0;const y=(o=(i=this.w.seriesData)._parsedExtrema)!=null?o:i._parsedExtrema=[];return y[n]={ref:a,len:r,maxY:l,lowestY:c,negMinY:u,hasNulls:d,yDec:f,xref:s,xNumeric:h,minX:p,maxX:g,xSorted:m,minXDiff:v},!0}handleFormat2DArray(e,n){const i=this.w.config,o=e[n].data,r=i.chart.type==="boxPlot"||i.series[n].type==="boxPlot";if(!(!r&&i.xaxis.type!=="datetime"&&this._fast2DArrayParse(o,n)))for(let a=0;a=5?this.twoDSeries.push(we.parseNumber(s[4])):this.twoDSeries.push(we.parseNumber(c)),this.w.axisFlags.dataFormatXNumeric=!0),i.xaxis.type==="datetime"){const d=new Date(l).getTime();this.twoDSeriesX.push(d)}else this.twoDSeriesX.push(l);typeof u<"u"&&(this.threeDSeries.push(u),this.w.axisFlags.isDataXYZ=!0)}}handleFormatXY(e,n){const i=this.w.config,o=this.w.globals,r=new Ei(this.w),a=e[n].data;let s=n;o.collapsedSeriesIndices.indexOf(n)>-1&&(s=this.activeSeriesIndex);const l=e[s].data;for(let c=0;c"u"&&(this.seriesGoals[n]=[]),typeof u.goals<"u"&&Array.isArray(u.goals)?this.seriesGoals[n].push(u.goals):this.seriesGoals[n].push(null),typeof u.z<"u"&&(this.threeDSeries.push(u.z),this.w.axisFlags.isDataXYZ=!0)}for(let c=0;c{o&&o.forEach(r=>{const a=r.y,s=a.length;if(!(s<=1))for(let l=0;lwe.parseNumber(h)).filter(h=>h!==null&&!isNaN(h));c=f.length?Math.min(...f):null,u=f.length?Math.max(...f):null}else{const d=l==null?null:l.y;Array.isArray(d)?(c=we.parseNumber(d[0]),u=we.parseNumber(d[d.length-1])):c=u=we.parseNumber(d)}r.push(c),a.push(u)}this.w.rangeData.seriesRangeStart[n]=r,this.w.rangeData.seriesRangeEnd[n]=a}handleCandleStickBoxData(e,n){let i={o:[],h:[],m:[],l:[],c:[]};return this.isFormat2DArray()?i=this.handleCandleStickBoxDataFormat("array",e,n):this.isFormatXY()&&(i=this.handleCandleStickBoxDataFormat("xy",e,n)),this.w.candleData.seriesCandleO[n]=i.o,this.w.candleData.seriesCandleH[n]=i.h,this.w.candleData.seriesCandleM[n]=i.m,this.w.candleData.seriesCandleL[n]=i.l,this.w.candleData.seriesCandleC[n]=i.c,this.w.candleData.seriesBoxPoints[n]=i.points||[],i}handleViolinData(e,n){var i,o,r,a,s,l,c,u;const d=this.w,f=e[n].data,h=[],p=[],g=[],m=[],v=[],b=[];for(let y=0;yO&&(O=D,T=R),RI&&(I=R))}const k=[];for(let E=0;E<$.length;E++){const R=we.parseNumber($[E]);R!==null&&(k.push(R),RI&&(I=R))}S&&(S[0]I&&(I=S[4])),h.push({values:_,weights:P,maxWeight:O}),p.push(k),g.push(S),m.push(M===1/0?0:M),v.push(I===-1/0?0:I),b.push(T!==null?T:k.length?k[Math.floor(k.length/2)]:0)}d.violinData.seriesViolinDensity[n]=h,d.violinData.seriesViolinPoints[n]=p,d.violinData.seriesViolinSummary[n]=g,d.violinData.seriesViolinMin[n]=m,d.violinData.seriesViolinMax[n]=v,this.twoDSeries=b}_parseViolinSummary(e){if(!Array.isArray(e)||e.length!==5)return null;const n=[];for(let i=0;i<5;i++){const o=we.parseNumber(e[i]);if(o===null||i>0&&o{if(!a.has(l.x)){const c={x:l.x,overlaps:new Set,y:[]};a.set(l.x,c),s.push(c)}}),e==="array")for(let l=0;lm.slice(1):h=m=>Array.isArray(m[1])?m[1]:[]}else h=p=>Array.isArray(p.y)?p.y:[];for(let p=0;p=2&&(a.push(g[0]),s.push(g[1]),r?(l.push(g[2]),c.push(g[3]),u.push(g[4])):(c.push(g[2]),u.push(g[3])));const m=f[p]&&f[p].points;d.push(Array.isArray(m)?m:[])}return{o:a,h:s,m:l,l:c,c:u,points:d}}parseDataAxisCharts(e){var n,i,o,r,a,s;const l=this.w.config,c=this.w.globals,u=new Ei(this.w);this.w.seriesData._parsedExtrema=[];const d=l.labels.length>0?l.labels.slice():l.xaxis.categories.slice();this.w.axisFlags.isRangeBar=l.chart.type==="rangeBar"&&c.isBarHorizontal,this.w.labelData.hasXaxisGroups=l.xaxis.type==="category"&&l.xaxis.group.groups.length>0,this.w.labelData.hasXaxisGroups&&(this.w.labelData.groups=l.xaxis.group.groups),e.forEach((g,m)=>{g.name!==void 0?this.w.seriesData.seriesNames.push(g.name):this.w.seriesData.seriesNames.push("series-"+parseInt(String(m+1),10))}),this.coreUtils.setSeriesYAxisMappings();const f=[],h=[...new Set(l.series.map(g=>g.group))];l.series.forEach((g,m)=>{const v=h.indexOf(g.group);f[v]||(f[v]=[]),f[v].push(this.w.seriesData.seriesNames[m])}),this.w.labelData.seriesGroups=f;const p=()=>{for(let g=0;g"u"&&(console.error("It is a possibility that you may have not included 'data' property in series."),e[g]=wt(Je({},e[g]),{data:[]}));const m=l.chart.dataReducer,v=(i=(n=c.dataReducerRawSeries)==null?void 0:n[g])==null?void 0:i.data;if(m!=null&&m.enabled&&this.isMultiFormat()&&Array.isArray(v)&&v.length>((o=m.threshold)!=null?o:500)){const y=(r=m.targetPoints)!=null?r:250,w=l.xaxis.min,x=l.xaxis.max,$=w==null&&x==null?v:ca.sliceByXRange(v,w,x);let S=$;if($.length>y){const _=Array.isArray($[0])?(s=$[0])==null?void 0:s[1]:(a=$[0])==null?void 0:a.y;Array.isArray(_)?_.length===4?S=ca.ohlcAggregate($,y):_.length===2&&(S=ca.rangeAggregate($,y)):S=ca.lttbDownsample($,y)}e[g]=wt(Je({},e[g]),{data:S})}(l.chart.type==="rangeBar"||l.chart.type==="rangeArea"||e[g].type==="rangeBar"||e[g].type==="rangeArea")&&(this.w.axisFlags.isRangeData=!0,this.handleRangeData(e,g));const b=e[g].type||l.chart.type;if(Lr(b)){const y=hn(b),w=y&&y.yExtent;(y&&y.dataType==="rangeXY"||typeof w=="function")&&(this.w.axisFlags.isRangeData=!0,this.handleCustomRangeData(e,g,w))}if(this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(e,g):this.isFormatXY()&&this.handleFormatXY(e,g),(l.chart.type==="candlestick"||e[g].type==="candlestick"||l.chart.type==="boxPlot"||e[g].type==="boxPlot")&&this.handleCandleStickBoxData(e,g),(l.chart.type==="violin"||e[g].type==="violin")&&this.handleViolinData(e,g),this.w.seriesData.series.push(this.twoDSeries),this.w.labelData.labels.push(this.twoDSeriesX),this.w.seriesData.seriesX.push(this.twoDSeriesX),this.w.seriesData.seriesGoals=this.seriesGoals,g===this.activeSeriesIndex&&!this.fallbackToCategory&&(this.w.axisFlags.isXNumeric=!0);else{l.xaxis.type==="datetime"?(this.w.axisFlags.isXNumeric=!0,p(),this.w.seriesData.seriesX.push(this.twoDSeriesX)):l.xaxis.type==="numeric"&&(this.w.axisFlags.isXNumeric=!0,d.length>0&&(this.twoDSeriesX=d,this.w.seriesData.seriesX.push(this.twoDSeriesX))),this.w.labelData.labels.push(this.twoDSeriesX);const y=e[g].data.map(w=>we.parseNumber(w));this.w.seriesData.series.push(y)}this.w.seriesData.seriesZ.push(this.threeDSeries),e[g].color!==void 0?this.w.seriesData.seriesColors.push(e[g].color):this.w.seriesData.seriesColors.push(void 0)}return this.w}parseDataNonAxisCharts(e){const n=this.w.config;this.w.seriesData.unitData=[];const i=Array.isArray(e)&&e.every(a=>typeof a=="number")&&n.labels.length>0,o=Array.isArray(e)&&e.some(a=>a&&typeof a=="object"&&a.data||a&&typeof a=="object"&&a.parsing);if(n.chart.type==="unit"&&o&&!i)return this.parseUnitSeries(e);if(i&&o&&console.warn("ApexCharts: Both old format (numeric series + labels) and new format (series objects with data/parsing) detected. Using old format for backward compatibility."),i){this.w.seriesData.series=e.slice(),this.w.seriesData.seriesNames=n.labels.slice();for(let a=0;atypeof a=="number")){this.w.seriesData.series=e.slice(),this.w.seriesData.seriesNames=[];for(let a=0;a{const s=we.parseNumber(a);return s>100&&console.warn(`ApexCharts: RadialBar value ${s} > 100, consider using percentage values (0-100)`),s}));for(let a=0;a{var l;const c=a&&Array.isArray(a.data)?a.data:[];i.push(c.length);const u=a&&a.name!==void 0&&a.name!==null?a.name:void 0;o.push((l=u??n.labels[s])!=null?l:`series-${s+1}`),r.push(c.slice())}),this.w.seriesData.series=i,this.w.seriesData.seriesNames=o,this.w.seriesData.unitData=r,this.w}resetParsingFlags(){const e=this.w;e.axisFlags.dataWasParsed=!1,e.globals.originalSeries=null,e.config.series&&e.config.series.forEach(n=>{n.__apexParsed&&delete n.__apexParsed})}extractPieDataFromSeries(e){const n=[],i=[];if(!Array.isArray(e))return console.warn("ApexCharts: Expected array for series data"),{values:[],labels:[]};if(e.length===0)return console.warn("ApexCharts: Empty series array"),{values:[],labels:[]};const o=e[0];if(typeof o=="object"&&o!==null&&o.data)this.extractPieDataFromSeriesObjects(e,n,i);else return console.warn("ApexCharts: Unsupported series format for pie/donut/radialBar. Expected series objects with data property."),{values:[],labels:[]};return{values:n,labels:i}}extractPieDataFromSeriesObjects(e,n,i){e.forEach((o,r)=>{if(!o.data||!Array.isArray(o.data)){console.warn(`ApexCharts: Series ${r} has no valid data array`);return}o.data.forEach(a=>{typeof a=="object"&&a!==null?a.x!==void 0&&a.y!==void 0?(i.push(String(a.x)),n.push(we.parseNumber(a.y))):console.warn("ApexCharts: Invalid data point format for pie chart. Expected {x, y} format:",a):console.warn("ApexCharts: Expected object data point, got:",typeof a)})})}handleExternalLabelsData(e){const n=this.w.config;if(n.xaxis.categories.length>0)this.w.labelData.labels=n.xaxis.categories;else if(n.labels.length>0)this.w.labelData.labels=n.labels.slice();else if(this.fallbackToCategory){if(this.w.labelData.labels=this.w.labelData.labels[0],this.w.rangeData.seriesRange.length){this.w.rangeData.seriesRange.map(o=>{o.forEach(r=>{this.w.labelData.labels.indexOf(r.x)<0&&r.x&&this.w.labelData.labels.push(r.x)})});const i=this.w.labelData.labels;if(i.length>0&&(typeof i[0]=="number"||typeof i[0]=="string"))this.w.labelData.labels=[...new Set(i)];else{const o=new Map;for(const r of i){const a=JSON.stringify(r);o.has(a)||o.set(a,r)}this.w.labelData.labels=Array.from(o.values())}}n.xaxis.convertedCatToNumeric&&(new _a(n).convertCatToNumericXaxis(n,this.w.seriesData.seriesX[0]),this._generateExternalLabels(e))}else this._generateExternalLabels(e)}_generateExternalLabels(e){const n=this.w.globals,i=this.w.config;let o=[];if(n.axisCharts){if(this.w.seriesData.series.length>0)if(this.isFormatXY()){const r=i.series.map(s=>{const l=new Map;for(const c of s.data)l.has(c.x)||l.set(c.x,c);return Array.from(l.values())}),a=r.reduce((s,l,c,u)=>u[s].length>l.length?s:c,0);for(let s=0;sa+1);for(let r=0;ri.xaxis.labels.formatter(r))),this.w.axisFlags.noLabelsProvided=!0}parseRawDataIfNeeded(e){const n=this.w.config,i=this.w.globals,o=n.parsing;if(this.w.axisFlags.dataWasParsed)return e;const r=!!(o&&(o.x||o.y||o.z)),a=e.some(l=>l.parsing&&(l.parsing.x||l.parsing.y||l.parsing.z));if(!r&&!a)return e;const s=e.map((l,c)=>{var u,d,f,h,p;if(!l.data||!Array.isArray(l.data)||l.data.length===0)return l;const g={x:((u=l.parsing)==null?void 0:u.x)||(o==null?void 0:o.x),y:((d=l.parsing)==null?void 0:d.y)||(o==null?void 0:o.y),z:((f=l.parsing)==null?void 0:f.z)||(o==null?void 0:o.z)};if(!g.x&&!g.y)return l;const m=l.data[0];if(typeof m=="object"&&m!==null&&(Object.prototype.hasOwnProperty.call(m,"x")||Object.prototype.hasOwnProperty.call(m,"y"))||Array.isArray(m))return l;if(!g.x||!g.y||Array.isArray(g.y)&&g.y.length===0){const b=[];g.x||b.push("x"),(!g.y||Array.isArray(g.y)&&g.y.length===0)&&b.push("y");const y=(h=l.name)!=null?h:`series[${c}]`;return console.warn(`ApexCharts [${this.w.globals.chartID}]: "${y}" has a parseData config but is missing the '${b.join("', '")}' field specification.`,{parsing:(p=l.parsing)!=null?p:o}),l}const v=l.data.map((b,y)=>{if(typeof b!="object"||b===null)return console.warn(`ApexCharts: Series ${c}, data point ${y} is not an object, skipping parsing`),b;const w=this.getNestedValue(b,g.x);let x,$;if(Array.isArray(g.y)){const _=g.y.map(P=>this.getNestedValue(b,P));this.w.config.chart.type==="bubble"?(_.length<2&&console.warn(`ApexCharts: series[${c}] bubble chart requires parseData.y to have at least 2 fields (y and z). Got: ${JSON.stringify(g.y)}`),x=_[0]):x=_}else x=this.getNestedValue(b,g.y);g.z&&($=this.getNestedValue(b,g.z)),w===void 0&&console.warn(`ApexCharts: Series ${c}, data point ${y} missing field '${g.x}'`),x===void 0&&console.warn(`ApexCharts: Series ${c}, data point ${y} missing field '${g.y}'`);const S={x:w,y:x,z:void 0};if(this.w.config.chart.type==="bubble"&&Array.isArray(g.y)&&g.y.length===2){const _=this.getNestedValue(b,g.y[1]);_!==void 0&&(S.z=_)}return $!==void 0&&(S.z=$),S});return wt(Je({},l),{data:v,__apexParsed:!0})});return this.w.axisFlags.dataWasParsed=!0,i.originalSeries||(i.originalSeries=we.clone(e)),s}getNestedValue(e,n){if(!e||typeof e!="object"||!n)return;if(n.indexOf(".")===-1)return e[n];const i=n.split(".");let o=e;for(let r=0;r after apexcharts.js.`)),e.map(a=>wt(Je({},a),{data:[]})))}flattenTreemapHierarchy(e){const n=this.w,i=n.globals;if(n.config.chart.type!=="treemap"||!Array.isArray(e))return e;if(!i.treemapRawSeries){if(!Zye(n,e))return i.treemapRoots=null,e;i.treemapRawSeries=e.map(s=>wt(Je({},s),{data:Array.isArray(s==null?void 0:s.data)?s.data.slice():s==null?void 0:s.data}))}const{roots:o,leafSeries:r,maxDepth:a}=exe(n,i.treemapRawSeries);return i.treemapRoots=o,i.treemapMaxDepth=a,r}expandScatterJitterData(e){var n,i;const o=this.w.config,r=o.chart.type==="scatter"||o.chart.type==="bubble",a=(i=(n=o.plotOptions)==null?void 0:n.scatter)==null?void 0:i.jitter;if(!r||!a||!a.enabled||!Array.isArray(e))return e;if(!e.some(f=>Array.isArray(f==null?void 0:f.data)&&f.data.some(h=>h&&!Array.isArray(h)&&Array.isArray(h.y))))return o.xaxis.type!=="datetime"&&(Array.isArray(o.xaxis.categories)&&o.xaxis.categories.length?this._applyBandAxis(o.xaxis.categories.slice()):Array.isArray(o.xaxis._scatterBandLabels)&&o.xaxis._scatterBandLabels.length&&this._applyBandAxis(o.xaxis._scatterBandLabels)),e;const l=[],c=new Map;e.forEach(f=>{Array.isArray(f==null?void 0:f.data)&&f.data.forEach(h=>{if(h&&Array.isArray(h.y)){const p=String(h.x);c.has(p)||(c.set(p,l.length),l.push(h.x))}})});const u=a.maxPoints||5e3,d=e.map(f=>{if(!Array.isArray(f==null?void 0:f.data))return f;const h=[];return f.data.forEach(p=>{if(p&&Array.isArray(p.y)){const g=c.get(String(p.x)),m=p.y,v=m.length>u?Math.ceil(m.length/u):1;for(let b=0;bMath.max(0,Math.min(o-1,u));let l=s(Math.round(i.min+.49)),c=s(Math.round(i.max-.49));c{const c=Math.round(l);return Math.abs(l-c)<1e-6&&e[c]!==void 0?e[c]:""};s._scatterBand=!0,i.labels.formatter=s}}parseData(e,n=!0){var i,o,r,a,s,l,c;const u=this.w,d=u.config,f=u.globals;if(e=this.parseRawDataIfNeeded(e),e=this.applySeriesTransform(e),e=this.expandScatterJitterData(e),e=this.flattenTreemapHierarchy(e),(i=d.chart.dataReducer)!=null&&i.enabled&&f.axisCharts&&!f.dataReducerRawSeries){f.dataReducerRawSeries=e.map(m=>({data:Array.isArray(m==null?void 0:m.data)?m.data.slice():m==null?void 0:m.data}));let p=1/0,g=-1/0;for(const m of e){const v=m==null?void 0:m.data;if(!Array.isArray(v)||v.length===0)continue;const b=!Array.isArray(v[0]),y=b?(o=v[0])==null?void 0:o.x:(r=v[0])==null?void 0:r[0],w=b?(a=v[v.length-1])==null?void 0:a.x:(s=v[v.length-1])==null?void 0:s[0];typeof y=="number"&&(p=Math.min(p,y)),typeof w=="number"&&(g=Math.max(g,w))}p!==1/0&&(f.dataReducerRawMinX=p,f.dataReducerRawMaxX=g)}if(f.dataReducerRawSeries&&((l=d.chart.dataReducer)!=null&&l.enabled)&&(e=e.map(p=>Je({},p))),d.series=e,n)if(f.dataReducerRawSeries&&((c=d.chart.dataReducer)!=null&&c.enabled)){const p=f.dataReducerRawSeries;f.initialSeries=e.map((g,m)=>{var v,b,y;return wt(Je({},g),{data:(y=(b=(v=p[m])==null?void 0:v.data)==null?void 0:b.slice())!=null?y:g.data})})}else f.histogramRawSeries?f.initialSeries=f.histogramRawSeries:f.dumbbellRawSeries?f.initialSeries=f.dumbbellRawSeries:f.streamgraphRawSeries?f.initialSeries=f.streamgraphRawSeries:f.waterfallRawSeries?f.initialSeries=f.waterfallRawSeries:f.treemapRawSeries?f.initialSeries=f.treemapRawSeries:f.initialSeries=e;if(this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.resetGlobals(),this.isMultipleY(),f.axisCharts?(this.parseDataAxisCharts(e),this.coreUtils.getLargestSeries()):this.parseDataNonAxisCharts(e),d.chart.stacked){const p=new js(this.w);this.w.seriesData.series=p.setNullSeriesToZeroValues(this.w.seriesData.series)}this.coreUtils.getSeriesTotals(),f.axisCharts?(ca._defineLazyResult(this.w.seriesData,"stackedSeriesTotals",()=>this.coreUtils.getStackedSeriesTotals()),ca._defineLazyResult(this.w.seriesData,"stackedSeriesTotalsByGroups",()=>this.coreUtils.getStackedSeriesTotalsByGroups()),ca._defineLazyResult(f,"seriesPercent",()=>(this.coreUtils.getPercentSeries(),f.seriesPercent))):this.coreUtils.getPercentSeries(),!this.w.axisFlags.dataFormatXNumeric&&(!this.w.axisFlags.isXNumeric||d.xaxis.type==="numeric"&&d.labels.length===0&&d.xaxis.categories.length===0)&&this.handleExternalLabelsData(e);const h=this.coreUtils.getCategoryLabels(this.w.labelData.labels);for(let p=0;pc.x:c=>c[0];let s=0;if(n!=null){let c=0,u=o-1;for(;c<=u;){const d=c+u>>1;a(e[d])>1;a(e[d])>i?u=d-1:c=d+1}l=Math.min(o,c+1)}return s===0&&l===o?e.slice():e.slice(s,l)}static lttbDownsample(e,n){const i=e.length;if(n>=i||n<3)return e;const o=!Array.isArray(e[0]),r=o?u=>u.x:u=>u[0],a=o?u=>u.y:u=>u[1],s=[];s.push(e[0]);const l=(i-2)/(n-2);let c=0;for(let u=0;uw&&(w=S,x=$)}s.push(e[x]),c=x}return s.push(e[i-1]),s}static ohlcAggregate(e,n){const i=e.length;if(n>=i||n<1)return e;const o=!Array.isArray(e[0]),r=o?u=>u.x:u=>u[0],a=o?u=>u.y:u=>u[1],s=o?(u,d)=>({x:u,y:d}):(u,d)=>[u,d],l=[],c=i/n;for(let u=0;ug&&(g=y[1]),y[2]=i||n<1)return e;const o=!Array.isArray(e[0]),r=o?u=>u.x:u=>u[0],a=o?u=>u.y:u=>u[1],s=o?(u,d)=>({x:u,y:d}):(u,d)=>[u,d],l=[],c=i/n;for(let u=0;up&&(p=b))}}l.push(s(r(e[d]),h===1/0?[null,null]:[h,p]))}return l}excludeCollapsedSeriesInYAxis(){const e=this.w,n=[];e.globals.seriesYAxisMap.forEach((i,o)=>{let r=0;i.forEach(a=>{e.globals.collapsedSeriesIndices.indexOf(a)!==-1&&r++}),r>0&&r==i.length&&n.push(o)}),e.globals.ignoreYAxisIndexes=n.map(i=>i)}},zF=class{constructor(e,n){this.w=e,this.ctx=n}_updateOptions(e,n=!1,i=!0,o=!0,r=!1){return new Promise((a,s)=>{let l=[this.ctx];o&&(l=this.ctx.getSyncedCharts()),this.w.globals.isExecCalled&&(l=[this.ctx],this.w.globals.isExecCalled=!1),l.forEach((c,u)=>{var d,f;const h=c.w;h.globals.shouldAnimate=i,n||(h.globals.resized=!0,h.globals.dataChanged=!0,i&&h.config.chart.animations.enabled&&c.series.getPreviousPaths());const p=h.config.chart.requestedType||h.config.chart.type;if(i&&e&&typeof e=="object"){const g=(d=e==null?void 0:e.chart)==null?void 0:d.type;g&&g!==p&&((f=c.morphTypeChange)==null||f.captureBeforeDestroy({fromType:p,toType:g,newSeries:e.series||h.config.series}))}if(e&&typeof e=="object"){c.config=new mc(e);const g=e.chart&&e.chart.type,m=g==="funnel"||g==="pyramid"||g==="gauge",v=!!h.config.chart.requestedType;if(g&&!m&&v){e.chart=e.chart||{},e.chart.requestedType=g;const b=h.config.chart.requestedType;(b==="funnel"||b==="pyramid")&&(e.plotOptions=e.plotOptions||{},e.plotOptions.bar=e.plotOptions.bar||{},e.plotOptions.bar.isFunnel===void 0&&(e.plotOptions.bar.isFunnel=!1),e.plotOptions.bar.isPyramid===void 0&&(e.plotOptions.bar.isPyramid=!1))}if(c.config.normalizeAliasedChartType(e),e=Xi.extendArrayProps(c.config,e,h),c.w.globals.chartID!==this.w.globals.chartID&&(delete e.series,delete e.yaxis),h.config=we.extend(h.config,e),_a.handOverTypeDefaults(h.config,p,e),r){h.globals.lastXAxis=e.xaxis?we.clone(e.xaxis):[],h.globals.lastYAxis=e.yaxis?we.clone(e.yaxis):[];const b=h.globals.initialConfig&&h.globals.initialConfig.series,y=we.extend({},h.config);y.series=!e.series&&b?b:we.copySeriesShallow(h.config.series),h.globals.initialConfig=y,e.series&&(h.globals.initialSeries=h.config.series)}e.series&&(h.globals.collapsedSeriesIndices.length>0||h.globals.ancillaryCollapsedSeriesIndices.length>0)&&c.series.reconcileCollapsedByName()}return c.update(e).then(()=>{u===l.length-1&&a(c)}).catch(s)})})}_updateSeries(e,n,i=!1){return new Promise((o,r)=>{const a=this.w;a.globals.shouldAnimate=n,a.globals.dataChanged=!0;const s=JSON.stringify({y:(a.globals.yAxisScale||[]).map(h=>h?h.result:null),xMin:a.globals.minX,xMax:a.globals.maxX});mv.invalidateSelectors(a),n&&a.config.chart.animations.enabled&&this.ctx.series.getPreviousPaths();const l=a.config.series.length,c=a.config.series.map(h=>{var p,g;return(g=(p=h==null?void 0:h.data)==null?void 0:p.length)!=null?g:0});i&&(a.globals.dataReducerRawSeries=null,a.globals.histogramRawSeries=null,a.globals.waterfallRawSeries=null,a.globals.dumbbellRawSeries=null,a.globals.streamgraphRawSeries=null,a.globals.treemapRawSeries=null);const u=e;let d=!1;a.globals.axisCharts&&(a.globals.collapsedSeriesIndices.length>0||a.globals.ancillaryCollapsedSeriesIndices.length>0)&&(e=e.map(h=>h&&typeof h=="object"?Je({},h):h),this.ctx.series.reconcileCollapsedByName(e),d=!0),this.ctx.data.resetParsingFlags();const f=this.ctx.data.parseData(e,i);return this.ctx._writeParsedSeriesData(f.seriesData),this.ctx._writeParsedRangeData(f.rangeData),this.ctx._writeParsedCandleData(f.candleData),this.ctx._writeParsedLabelData(f.labelData),this.ctx._writeParsedAxisFlags(f.axisFlags),i&&(a.globals.initialConfig&&(a.globals.initialConfig.series=we.copySeriesShallow(d?u:a.config.series)),d&&(a.globals.initialSeries=u)),this._canUseFastPath(e,l,c,a)?this.ctx.fastUpdate(n,s).then(()=>{o(this.ctx)}).catch(r):(this.ctx._updateStats&&this.ctx._updateStats.full++,this.ctx.update().then(()=>{o(this.ctx)}).catch(r))})}_canUseFastPath(e,n,i,o){return!(!o.dom.elGraphical||!o.globals.axisCharts||e.length!==n||e.some((r,a)=>{var s,l;return((l=(s=r==null?void 0:r.data)==null?void 0:s.length)!=null?l:0)!==i[a]})||o.globals.collapsedSeries.length>0||o.globals.ancillaryCollapsedSeries.length>0||o.globals.risingSeries.length>0||o.globals.comboCharts||o.interact.zoomed)}_extendSeries(e,n){const i=this.w,o=i.config.series[n];return wt(Je({},i.config.series[n]),{name:e.name?e.name:o==null?void 0:o.name,color:e.color?e.color:o==null?void 0:o.color,type:e.type?e.type:o==null?void 0:o.type,group:e.group?e.group:o==null?void 0:o.group,hidden:typeof e.hidden<"u"?e.hidden:o==null?void 0:o.hidden,data:e.data?e.data:o==null?void 0:o.data,zIndex:typeof e.zIndex<"u"?e.zIndex:n})}toggleDataPointSelection(e,n){const i=this.w;let o=null;const r=`.apexcharts-series[data\\:realIndex='${e}']`;if(i.globals.axisCharts?o=i.dom.Paper.findOne(`${r} path[j='${n}'], ${r} circle[j='${n}'], ${r} rect[j='${n}']`):typeof n>"u"&&(o=i.dom.Paper.findOne(`${r} path[j='${e}']`),(i.config.chart.type==="pie"||i.config.chart.type==="polarArea"||i.config.chart.type==="donut")&&this.ctx.pie.pieClicked(e)),o)new it(this.w).pathMouseDown(o,null);else return console.warn("toggleDataPointSelection: Element not found"),null;return o.node?o.node:null}forceXAxisUpdate(e){const n=this.w;return["min","max"].forEach(o=>{typeof e.xaxis[o]<"u"&&(n.config.xaxis[o]=e.xaxis[o],n.globals.lastXAxis[o]=e.xaxis[o])}),e.xaxis.categories&&e.xaxis.categories.length&&(n.config.xaxis.categories=e.xaxis.categories),n.config.xaxis.convertedCatToNumeric&&(e=new _a(e).convertCatToNumericXaxis(e,this.ctx)),e}forceYAxisUpdate(e){return e.chart&&e.chart.stacked&&e.chart.stackType==="100%"&&(Array.isArray(e.yaxis)?e.yaxis.forEach((n,i)=>{e.yaxis[i].min=0,e.yaxis[i].max=100}):(e.yaxis.min=0,e.yaxis.max=100)),e}revertDefaultAxisMinMax(e){const n=this.w;let i=n.globals.lastXAxis,o=n.globals.lastYAxis;e&&e.xaxis&&(i=e.xaxis),e&&e.yaxis&&(o=e.yaxis);const r=i;n.config.xaxis.min=r.min,n.config.xaxis.max=r.max;const a=s=>{if(typeof o[s]<"u"){const l=o[s];n.config.yaxis[s].min=l.min,n.config.yaxis[s].max=l.max}};n.config.yaxis.map((s,l)=>{n.interact.zoomed||typeof o[l]<"u"?a(l):typeof this.ctx.opts.yaxis[l]<"u"&&(s.min=this.ctx.opts.yaxis[l].min,s.max=this.ctx.opts.yaxis[l].max)})}},HF=class Nx{static xRatio(e){const n=e.layout.gridWidth||1;return(e.globals.maxX-e.globals.minX)/n}static dataXToPx(e,n){return(n-e.globals.minX)/Nx.xRatio(e)}static pxToDataX(e,n){return e.globals.minX+n*Nx.xRatio(e)}static screenXToPlotPx(e,n){const i=e.dom.baseEl,o=i&&i.querySelector(".apexcharts-svg");if(!o)return n-e.layout.translateX;const r=o.getBoundingClientRect(),a=e.globals.svgWidth?r.width/e.globals.svgWidth:1;return(n-r.left)/(a||1)-e.layout.translateX}};class Oo{constructor(e){this.w=e.w,this.ttCtx=e}static hoverTarget(e){return e?(e.eventPhase&&e.target&&(e.apexHoverTarget=e.target),e.apexHoverTarget||e.target):null}getNearestValues({hoverArea:e,elGrid:n,clientX:i,clientY:o}){var r;const a=this.w,s=n.getBoundingClientRect(),l=a.layout.gridWidth,c=s.height;let u=l/(a.globals.dataPoints-1);const d=c/a.globals.dataPoints,f=this.hasBars();(a.globals.comboCharts||f)&&!a.config.xaxis.convertedCatToNumeric&&(u=l/a.globals.dataPoints);const h=HF.screenXToPlotPx(a,i),p=o-s.top,g=a.globals.barPadForNumericAxis||0;h<-g||p<0||h>l+g||p>c?(e.classList.remove("hovering-zoom"),e.classList.remove("hovering-pan")):a.interact.zoomEnabled?(e.classList.remove("hovering-pan"),e.classList.add("hovering-zoom")):a.interact.panEnabled&&(e.classList.remove("hovering-zoom"),e.classList.add("hovering-pan"));let v=Math.round(h/u);const b=Math.floor(p/d);f&&!a.config.xaxis.convertedCatToNumeric&&(v=Math.ceil(h/u),v=v-1);let y=null,w=null;const x=a.globals.seriesXvalues.map(S=>S.filter(_=>we.isNumber(_))),$=a.globals.seriesYvalues.map(S=>S.filter(_=>we.isNumber(_)));if(a.axisFlags.isXNumeric){w=this.closestInMultiArray(h,p,x,$),y=w.index,v=(r=w.j)!=null?r:0;const S=x.some((_,P)=>_.length!==a.globals.seriesXvalues[P].length);if(y!==null&&S){const _=a.globals.seriesXvalues[y];let P=null,O=1/0;for(let T=0;T<_.length;T++){if(!we.isNumber(_[T]))continue;const M=Math.abs(h-_[T]);Mr.length>0?a:-1);for(let r=0;rr.globals.collapsedSeriesIndices.indexOf(f)===-1&&r.globals.ancillaryCollapsedSeriesIndices.indexOf(f)===-1,s=r.config.chart.type,l=!r.globals.comboCharts&&(s==="line"||s==="area");let c=1/0,u=null,d=null;if(r.globals.allSeriesHasEqualX){let f=1/0;for(let h=0;h=2){for(let m=0;m1&&(u=1);const d=i+u*s,f=o+u*l,h=e-d,p=n-f;return{dist:Math.sqrt(h*h+p*p),t:u}}closestInArray(e,n){const i=n[0];let o=null,r=Math.abs(e-i);for(let a=0;atypeof r[0]<"u");if(o.length>0)for(let r=0;r{var c;return!((c=this.w.globals.collapsedSeriesIndices)!=null&&c.includes(l))}))||[];for(let s=0;so+r.getBBox().height,0)}getElMarkers(e){return typeof e=="number"?this.w.dom.baseEl.querySelectorAll(`.apexcharts-series[data\\:realIndex='${e}'] .apexcharts-series-markers-wrap > *`):this.w.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}getAllMarkers(e=!1){let n=[...this.w.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap")];e&&(n=n.filter(o=>{const r=Number(o.getAttribute("data:realIndex"));return this.w.globals.collapsedSeriesIndices.indexOf(r)===-1})),n.sort((o,r)=>{var a=Number(o.getAttribute("data:realIndex")),s=Number(r.getAttribute("data:realIndex"));return sa?-1:0});const i=[];return n.forEach(o=>{i.push(o.querySelector(".apexcharts-marker"))}),i}hasMarkers(e){return this.getElMarkers(e).length>0}getPathFromPoint(e,n){const i=Number(e.getAttribute("cx")),o=Number(e.getAttribute("cy")),r=e.getAttribute("shape");return new it(this.w).getMarkerPath(i,o,r,n)}getElBars(){return this.w.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-violin-series, .apexcharts-rangebar-series")}hasBars(){return this.getElBars().length>0}getHoverMarkerSize(e){const n=this.w;let i=n.config.markers.hover.size;return i===void 0&&(i=n.globals.markers.size[e]+n.config.markers.hover.sizeOffset),i}toggleAllTooltipSeriesGroups(e){const n=this.w,i=this.ttCtx;i.allTooltipSeriesGroups.length===0&&(i.allTooltipSeriesGroups=n.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));const o=i.allTooltipSeriesGroups;for(let r=0;r({attrs:s,val:e.yLbFormatter(s.value,{seriesIndex:n,dataPointIndex:i,w:r})})):[]}resolvePatternColor(e,n){var i,o,r,a;const s=this.w,l=(o=(i=Oo.hoverTarget(e))==null?void 0:i.getAttribute)==null?void 0:o.call(i,"fill");if(!l)return n;if(l.indexOf("url")===-1)return l;if(l.indexOf("Pattern")===-1)return n;const c=s.dom.baseEl.querySelector(l.substr(4).slice(0,-1));return(a=(r=c==null?void 0:c.childNodes[0])==null?void 0:r.getAttribute("stroke"))!=null?a:n}getFormatters(e){const n=this.w;let i=n.formatters.yLabelFormatters[e],o;return n.formatters.ttVal!==void 0?Array.isArray(n.formatters.ttVal)?(i=n.formatters.ttVal[e]&&n.formatters.ttVal[e].formatter,o=n.formatters.ttVal[e]&&n.formatters.ttVal[e].title&&n.formatters.ttVal[e].title.formatter):(i=n.formatters.ttVal.formatter,typeof n.formatters.ttVal.title.formatter=="function"&&(o=n.formatters.ttVal.title.formatter)):o=n.config.tooltip.y.title.formatter,typeof i!="function"&&(n.formatters.yLabelFormatters[0]?i=n.formatters.yLabelFormatters[0]:i=function(r){return r}),typeof o!="function"&&(o=function(r){return r?r+": ":""}),{yLbFormatter:i,yLbTitleFormatter:o}}getSeriesName({fn:e,index:n,seriesIndex:i,j:o}){const r=this.w;return e(String(r.seriesData.seriesNames[n]),{series:r.seriesData.series,seriesIndex:i,dataPointIndex:o,w:r})}DOMHandling({t:e,j:n,ttItems:i,values:o,seriesName:r,shared:a,pColor:s}){const l=this.w,c=this.ttCtx,{val:u,goalVals:d,xVal:f,xAxisTTVal:h,zVal:p}=o;if(!i||!i[e])return;let g=null;g=i[e].children,l.config.tooltip.fillSeriesColor&&(i[e].style.backgroundColor=s,g[0].style.display="none"),c.showTooltipTitle&&(c.tooltipTitle===null&&(c.tooltipTitle=l.dom.baseEl.querySelector(".apexcharts-tooltip-title")),c.tooltipTitle&&(c.tooltipTitle.innerHTML=f)),c.isXAxisTooltipEnabled&&c.xaxisTooltipText&&(c.xaxisTooltipText.innerHTML=h!==""?h:f);const m=i[e].querySelector(".apexcharts-tooltip-text-y-label");m&&(m.innerHTML=r||"");const v=i[e].querySelector(".apexcharts-tooltip-text-y-value");v&&(v.innerHTML=typeof u<"u"?u:""),g[0]&&g[0].classList.contains("apexcharts-tooltip-marker")&&(l.config.tooltip.marker.fillColors&&Array.isArray(l.config.tooltip.marker.fillColors)&&(s=l.config.tooltip.marker.fillColors[e]),l.config.tooltip.fillSeriesColor?g[0].style.backgroundColor=s:g[0].style.color=s),l.config.tooltip.marker.show||(g[0].style.display="none");const b=i[e].querySelector(".apexcharts-tooltip-text-goals-label"),y=i[e].querySelector(".apexcharts-tooltip-text-goals-value");if(d.length&&l.seriesData.seriesGoals[e]){const w=()=>{let x="
",$="
";d.forEach(S=>{x+=`
${S.attrs.name}
`,$+=`
${S.val}
`}),b.innerHTML=x+"
",y.innerHTML=$+"
"};a?l.seriesData.seriesGoals[e][n]&&Array.isArray(l.seriesData.seriesGoals[e][n])?w():(b.innerHTML="",y.innerHTML=""):w()}else b.innerHTML="",y.innerHTML="";if(p!==null){const w=i[e].querySelector(".apexcharts-tooltip-text-z-label");w.innerHTML=l.config.tooltip.z.title;const x=i[e].querySelector(".apexcharts-tooltip-text-z-value");x.innerHTML=typeof p<"u"?p:""}if(a&&g[0]){if(l.config.tooltip.hideEmptySeries){const w=i[e].querySelector(".apexcharts-tooltip-marker"),x=i[e].querySelector(".apexcharts-tooltip-text");parseFloat(u)==0?(w.style.display="none",x.style.display="none"):(w.style.display="block",x.style.display="block")}typeof u>"u"||u===null||l.globals.ancillaryCollapsedSeriesIndices.indexOf(e)>-1||l.globals.collapsedSeriesIndices.indexOf(e)>-1||Array.isArray(c.tConfig.enabledOnSeries)&&c.tConfig.enabledOnSeries.indexOf(e)===-1?g[0].parentNode.style.display="none":g[0].parentNode.style.display=l.config.tooltip.items.display}else Array.isArray(c.tConfig.enabledOnSeries)&&c.tConfig.enabledOnSeries.indexOf(e)===-1&&(g[0].parentNode.style.display="none")}toggleActiveInactiveSeries(e,n){const i=this.w;if(e)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");const o=i.dom.baseEl.querySelector(`.apexcharts-tooltip-series-group-${n}`);if(o){const r=o;r.classList.add("apexcharts-active"),r.style.display=i.config.tooltip.items.display}}}getValuesToPrint({i:e,j:n}){var i,o,r,a,s,l,c,u;const d=this.w,f=d.seriesData.seriesX.map(w=>w.length>0?w:[]);let h="",p="",g=null,m=null;const v={series:d.seriesData.series,seriesIndex:e,dataPointIndex:n,w:d},b=d.formatters.ttZFormatter;if(n===null)m=d.seriesData.series[e];else if(d.axisFlags.isXNumeric&&d.config.chart.type!=="treemap"){if(h=f[e][n],f[e].length===0){const w=this.tooltipUtil.getFirstActiveXArray(f);h=f[w][n]}}else new t$(this.w).isFormatXY()?h=typeof d.config.series[e].data[n]<"u"?d.config.series[e].data[n].x:"":h=typeof d.labelData.labels[n]<"u"?d.labelData.labels[n]:"";const y=h;return d.axisFlags.isXNumeric&&d.config.xaxis.type==="datetime"?h=new Bc(this.w).xLabelFormat(d.formatters.ttKeyFormatter,y,y,{i:void 0,dateFormatter:new Ei(this.w).formatDate,w:this.w}):d.globals.isBarHorizontal?h=d.formatters.yLabelFormatters[0](y,v):h=(r=(o=(i=d.formatters).xLabelFormatter)==null?void 0:o.call(i,y,v))!=null?r:y,d.config.tooltip.x.formatter!==void 0&&(h=(l=(s=(a=d.formatters).ttKeyFormatter)==null?void 0:s.call(a,y,v))!=null?l:y),d.seriesData.seriesZ.length>0&&d.seriesData.seriesZ[e].length>0&&(g=b==null?void 0:b(d.seriesData.seriesZ[e][n],d)),typeof d.config.xaxis.tooltip.formatter=="function"?p=(u=(c=d.formatters).xaxisTooltipFormatter)==null?void 0:u.call(c,y,v):p=h,{val:Array.isArray(m)?m.join(" "):m,xVal:Array.isArray(h)?h.join(" "):h,xAxisTTVal:Array.isArray(p)?p.join(" "):p,zVal:g}}handleCustomTooltip({i:e,j:n,y1:i,y2:o,w:r}){const a=this.ttCtx.getElTooltip();let s=r.config.tooltip.custom;if(Array.isArray(s)&&(s=s[e]),typeof s!="function")return;const l=s({series:r.seriesData.series,seriesIndex:e,dataPointIndex:n,y1:i,y2:o,w:r});if(a){const c=a.querySelector(".apexcharts-tooltip-arrow");typeof l=="string"||typeof l=="number"?a.innerHTML=String(l):l!=null&&(l instanceof Element||typeof l.nodeName=="string")&&(a.innerHTML="",a.appendChild(l.cloneNode(!0))),c&&a.appendChild(c)}}};const Sr=7,nxe=0;let n$=class{constructor(e){this.ttCtx=e,this.w=e.w}moveXCrosshairs(e,n=null){const i=this.ttCtx,o=this.w,r=i.getElXCrosshairs();let a=e-i.xcrosshairsWidth/2;const s=o.labelData.labels.slice().length;if(n!==null&&(a=o.layout.gridWidth/s*n),r!==null&&!o.globals.isBarHorizontal&&(r.setAttribute("x",String(a)),r.setAttribute("x1",String(a)),r.setAttribute("x2",String(a)),r.setAttribute("y2",String(o.layout.gridHeight)),r.classList.add("apexcharts-active")),a<0&&(a=0),a>o.layout.gridWidth&&(a=o.layout.gridWidth),i.isXAxisTooltipEnabled){let l=a;(o.config.xaxis.crosshairs.width==="tickWidth"||o.config.xaxis.crosshairs.width==="barWidth")&&(l=a+i.xcrosshairsWidth/2),this.moveXAxisTooltip(l)}}moveYCrosshairs(e){const n=this.ttCtx;n.ycrosshairs!==null&&it.setAttrs(n.ycrosshairs,{y1:e,y2:e}),n.ycrosshairsHidden!==null&&it.setAttrs(n.ycrosshairsHidden,{y1:e,y2:e})}moveXAxisTooltip(e){var n,i;const o=this.w,r=this.ttCtx;if(r.xaxisTooltip!==null&&r.xcrosshairsWidth!==0){r.xaxisTooltip.classList.add("apexcharts-active");const a=r.xaxisOffY+o.config.xaxis.tooltip.offsetY+o.layout.translateY+5+o.config.xaxis.offsetY,l=r.xaxisTooltip.getBoundingClientRect().width;if(e=e-l/2,!isNaN(e)){e=e+o.layout.translateX;const u=new it(this.w).getTextRects((i=(n=r.xaxisTooltipText)==null?void 0:n.innerHTML)!=null?i:"",o.config.xaxis.labels.style.fontSize);r.xaxisTooltipText&&(r.xaxisTooltipText.style.minWidth=u.width+"px"),r.xaxisTooltip.style.left=e+"px",r.xaxisTooltip.style.top=a+"px"}}}moveYAxisTooltip(e){var n,i;const o=this.w,r=this.ttCtx;r.yaxisTTEls===null&&(r.yaxisTTEls=[...o.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip")]);const a=parseInt((i=(n=r.ycrosshairsHidden)==null?void 0:n.getAttribute("y1"))!=null?i:"0",10);let s=o.layout.translateY+a;if(r.yaxisTTEls){const l=r.yaxisTTEls[e].getBoundingClientRect(),c=l.height;let u;const d=o.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${e}'] .apexcharts-yaxis-texts-g`),f=o.dom.elWrap.getBoundingClientRect();if(d){const h=d.getBoundingClientRect();h.width>0&&(u=h.left+h.width/2-f.left-l.width/2)}u==null&&(u=o.config.yaxis[e].opposite?o.globals.translateYAxisX[e]+4:o.globals.translateYAxisX[e]-l.width-4),s=s-c/2,o.globals.ignoreYAxisIndexes.indexOf(e)===-1&&s>0&&sh.layout.gridWidth/2&&(S=w-y-$,O="left"),S>h.layout.gridWidth-y-10&&(S=O==="left"?Math.min(h.layout.gridWidth-y,S):h.layout.gridWidth-y),S<-20&&(S=-20),h.config.tooltip.followCursor){const I=p.getElGrid();if(!I)return null;const k=I.getBoundingClientRect();S=((o=p.clientX)!=null?o:p.e.clientX)-k.left,S>h.layout.gridWidth/2?(S=S-y,O="left"):O="right",P=((r=p.clientY)!=null?r:p.e.clientY)+h.layout.translateY-k.top,P>h.layout.gridHeight/2&&(P=P-b)}else if(!h.globals.isBarHorizontal)if(m){const I=h.layout.translateY,k=h.layout.translateY+h.layout.gridHeight;P+b>k&&(P=k-b),Ph.layout.gridHeight&&(P=h.layout.gridHeight-b+h.layout.translateY);if(isNaN(S))return null;S=S+h.layout.translateX;const T=(s=(a=h.config)==null?void 0:a.chart)==null?void 0:s.accessibility;if(T!=null&&T.enabled&&((c=(l=T==null?void 0:T.keyboard)==null?void 0:l.navigation)!=null&&c.enabled)&&((f=(d=(u=h.dom)==null?void 0:u.baseEl)==null?void 0:d.querySelector)!=null&&f.call(d,".apexcharts-keyboard-focused"))){const I=m?_:x,k=(v||1)+12,E=P,R=P+b;!isNaN(I)&&b>0&&EI-k&&(P=I-b-k,P<0&&(P=I+k))}let M=null;if(m&&b>0){const I=_-P,k=10,E=b-10;M=Math.max(k,Math.min(E,I))}return{x:S,y:P,placement:O,arrowY:M}}applyTooltipPosition(e,n){if(!e)return;const i=e.dataset.positioned!=="true";i&&(e.style.transitionProperty="none"),e.style.left=n.x+"px",e.style.top=n.y+"px",n.placement&&(e.dataset.placement=n.placement),n.arrowY!=null&&e.style.setProperty("--apx-tt-arrow-y",n.arrowY+"px"),n.arrowX!=null&&e.style.setProperty("--apx-tt-arrow-x",n.arrowX+"px"),i&&(e.offsetWidth,e.dataset.positioned="true",requestAnimationFrame(()=>{e.style.transitionProperty=""}))}moveMarkers(e,n){var i;const o=this.w,r=this.ttCtx;if(o.globals.markers.size[e]>0&&!o.globals.markers.batched){const a=o.dom.baseEl.querySelectorAll(` .apexcharts-series[data\\:realIndex='${e}'] .apexcharts-marker`);for(let s=0;s0){const v=(s=m.getAttribute("shape"))!=null?s:"circle",b=f.getMarkerPath(u,d,v,p*1.5);m.setAttribute("d",b)}this.moveXCrosshairs(u),c.fixedTooltip||this.moveTooltip(u,d,p)}moveDynamicPointsOnHover(e){var n,i;const o=this.ttCtx,r=o.w;let a=0,s=0,l=0;const c=r.globals.pointsArray,u=new js(this.w),d=new it(this.w);l=u.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);const f=o.tooltipUtil.getHoverMarkerSize(l);if((n=c[l])!=null&&n[e]&&(a=c[l][e][0],s=c[l][e][1]),isNaN(a))return;const h=o.tooltipUtil.getAllMarkers();if(h.length)for(let p=0;p"u"&&h.splice(p,0,null),h[p]&&g&&g.length){let m=c[p][e][1],v;h[p].setAttribute("cx",a);const b=(i=h[p].getAttribute("shape"))!=null?i:"circle";if(r.config.chart.type==="rangeArea"&&!r.globals.comboCharts){const y=e+r.seriesData.series[p].length;v=c[p][y][1];const w=Math.abs(m-v)/2;m=m-w}if(m!==null&&!isNaN(m)&&m0){const y=d.getMarkerPath(a,m,b,f);h[p].setAttribute("d",y)}else h[p].setAttribute("d","")}}this.moveXCrosshairs(a),o.fixedTooltip||this.moveTooltip(a,s||r.layout.gridHeight,f)}moveStickyTooltipOverBars(e,n){var i,o,r,a,s;const l=this.w,c=this.ttCtx;let u=l.globals.columnSeries?l.globals.columnSeries.length:l.seriesData.series.length;l.config.chart.stacked&&(u=l.globals.barGroups.length);let d=u>=2&&u%2===0?Math.floor(u/2):Math.floor(u/2)+1;l.globals.isBarHorizontal&&(d=new js(this.w).getActiveConfigSeriesIndex("desc")+1);let f=l.dom.baseEl.querySelector(`.apexcharts-bar-series .apexcharts-series[rel='${d}'] path[j='${e}'], .apexcharts-candlestick-series .apexcharts-series[rel='${d}'] path[j='${e}'], .apexcharts-boxPlot-series .apexcharts-series[rel='${d}'] path[j='${e}'], .apexcharts-violin-series .apexcharts-series[rel='${d}'] path[j='${e}'], .apexcharts-rangebar-series .apexcharts-series[rel='${d}'] path[j='${e}']`);!f&&typeof n=="number"&&(f=l.dom.baseEl.querySelector(`.apexcharts-bar-series .apexcharts-series[data\\:realIndex='${n}'] path[j='${e}'], + a ${o/2},${o/2} 0 1,0 -${o},0`;break}return h}drawMarkerShape(e,n,i,o,r){const a=this.drawPath({d:this.getMarkerPath(e,n,i,o),stroke:r.pointStrokeColor,strokeDashArray:r.pointStrokeDashArray,strokeWidth:r.pointStrokeWidth,fill:r.pointFillColor,fillOpacity:r.pointFillOpacity,strokeOpacity:r.pointStrokeOpacity});return a.attr({cx:e,cy:n,shape:r.shape,class:r.class?r.class:""}),a}drawMarker(e,n,i){e=e||0;let o=i.pSize||0;return we.isNumber(n)||(o=0,n=0),this.drawMarkerShape(e,n,i==null?void 0:i.shape,o,Je(Je({},i),i.shape==="line"||i.shape==="plus"||i.shape==="cross"?{pointStrokeColor:i.pointFillColor,pointStrokeOpacity:i.pointFillOpacity}:{}))}pathMouseEnter(e,n){var i,o;const r=this.w,a=new zi(this.w),s=parseInt((i=e.node.getAttribute("index"))!=null?i:"",10),l=parseInt((o=e.node.getAttribute("j"))!=null?o:"",10);if(!(isNaN(s)||isNaN(l))&&(typeof r.config.chart.events.dataPointMouseEnter=="function"&&r.config.chart.events.dataPointMouseEnter(n,this.ctx,{seriesIndex:s,dataPointIndex:l,w:r}),ns._fireEvent(r,"dataPointMouseEnter",[n,this.ctx,{seriesIndex:s,dataPointIndex:l,w:r}]),!(r.config.states.active.filter.type!=="none"&&e.node.getAttribute("selected")==="true")&&!zi.hoverOutlineOwnsHoverState(r)&&r.config.states.hover.filter.type!=="none"&&!r.interact.isTouchDevice)){const c=r.config.states.hover.filter;a.applyFilter(e,s,c.type,c.value)}}pathMouseLeave(e,n){var i,o;const r=this.w,a=new zi(this.w),s=parseInt((i=e.node.getAttribute("index"))!=null?i:"",10),l=parseInt((o=e.node.getAttribute("j"))!=null?o:"",10);isNaN(s)||isNaN(l)||(typeof r.config.chart.events.dataPointMouseLeave=="function"&&r.config.chart.events.dataPointMouseLeave(n,this.ctx,{seriesIndex:s,dataPointIndex:l,w:r}),ns._fireEvent(r,"dataPointMouseLeave",[n,this.ctx,{seriesIndex:s,dataPointIndex:l,w:r}]),!(r.config.states.active.filter.type!=="none"&&e.node.getAttribute("selected")==="true")&&(zi.hoverOutlineOwnsHoverState(r)||r.config.states.hover.filter.type!=="none"&&a.getDefaultFilter(e,s)))}_clearAllDataPointSelections(e,n){const i=this.w;i.interact.selectedDataPoints=[];const o=i.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),r=i.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),a=s=>{Array.prototype.forEach.call(s,l=>{l.node.setAttribute("selected","false"),e.getDefaultFilter(l,n)})};a(o),a(r)}_togglePointSelection(e,n,i,o){const r=this.w;if(e.node.getAttribute("selected")==="true"){e.node.setAttribute("selected","false");const a=r.interact.selectedDataPoints[i].indexOf(o);return a>-1&&r.interact.selectedDataPoints[i].splice(a,1),"false"}return!r.config.states.active.allowMultipleDataPointsSelection&&r.interact.selectedDataPoints.length>0&&this._clearAllDataPointSelections(n,i),e.node.setAttribute("selected","true"),typeof r.interact.selectedDataPoints[i]>"u"&&(r.interact.selectedDataPoints[i]=[]),r.interact.selectedDataPoints[i].push(o),"true"}_applyPointSelectionFilter(e,n,i,o){const r=this.w;if(!zi.sliceOffsetOwnsActiveState(r)){if(o==="true"){const a=r.config.states.active.filter;if(a!=="none")n.applyFilter(e,i,a.type,a.value);else if(r.config.states.hover.filter!=="none"&&!r.interact.isTouchDevice){const s=r.config.states.hover.filter;n.applyFilter(e,i,s.type,s.value)}}else if(r.config.states.active.filter.type!=="none")if(r.config.states.hover.filter.type!=="none"&&!r.interact.isTouchDevice){const a=r.config.states.hover.filter;n.applyFilter(e,i,a.type,a.value)}else n.getDefaultFilter(e,i)}}pathMouseDown(e,n){var i,o;const r=this.w,a=new zi(this.w),s=parseInt((i=e.node.getAttribute("index"))!=null?i:"",10),l=parseInt((o=e.node.getAttribute("j"))!=null?o:"",10);if(isNaN(s)||isNaN(l))return;const c=r.config.chart.link;if(!!!(c&&(typeof c.dimension=="function"||c.enabled))){const d=this._togglePointSelection(e,a,s,l);this._applyPointSelectionFilter(e,a,s,d)}typeof r.config.chart.events.dataPointSelection=="function"&&r.config.chart.events.dataPointSelection(n,this.ctx,{selectedDataPoints:r.interact.selectedDataPoints,seriesIndex:s,dataPointIndex:l,w:r}),n&&ns._fireEvent(r,"dataPointSelection",[n,this.ctx,{selectedDataPoints:r.interact.selectedDataPoints,seriesIndex:s,dataPointIndex:l,w:r}])}rotateAroundCenter(e){let n={};e&&typeof e.getBBox=="function"&&(n=e.getBBox());const i=n.x+n.width/2,o=n.y+n.height/2;return{x:i,y:o}}setupEventDelegation(e,n){let i=null;e.node.addEventListener("mouseover",o=>{const r=ns._findDelegateTarget(o.target,e.node,n);!r||r===i||(i&&i.instance&&this.pathMouseLeave(i.instance,o),i=r,r.instance&&this.pathMouseEnter(r.instance,o))}),e.node.addEventListener("mouseout",o=>{if(!i)return;(o.relatedTarget?ns._findDelegateTarget(o.relatedTarget,e.node,n):null)!==i&&(i&&i.instance&&this.pathMouseLeave(i.instance,o),i=null)}),e.node.addEventListener("mousedown",o=>{const r=ns._findDelegateTarget(o.target,e.node,n);r&&r.instance&&this.pathMouseDown(r.instance,o)})}static _fireEvent(e,n,i){const o=e.globals.events;if(!o||!Object.prototype.hasOwnProperty.call(o,n))return;const r=o[n];for(let a=0;a0&&e.getComputedTextLength()>=i/1.1)){for(let o=n.length-3;o>0;o-=3)if(e.getSubStringLength(0,o)<=i/1.1){e.textContent=n.substring(0,o)+"...";return}e.textContent="."}}},UC=class{constructor(e){this.w=e,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}clippedImgArea(e){const n=this.w,i=n.config,o=parseInt(String(n.layout.gridWidth),10),r=parseInt(String(n.layout.gridHeight),10),a=o>r?o:r,s=e.image;let l=0,c=0;typeof e.width>"u"&&typeof e.height>"u"?i.fill.image.width!==void 0&&i.fill.image.height!==void 0?(l=i.fill.image.width+1,c=i.fill.image.height):(l=a+1,c=a):(l=e.width,c=e.height);const u=nt.createElementNS(Wt,"pattern");it.setAttrs(u,{id:e.patternID,patternUnits:e.patternUnits?e.patternUnits:"userSpaceOnUse",width:l+"px",height:c+"px"});const d=nt.createElementNS(Wt,"image");u.appendChild(d);const f=Ge.isBrowser()?window.SVG:global.SVG;d.setAttributeNS(f.xlink,"href",s),it.setAttrs(d,{x:0,y:0,preserveAspectRatio:"none",width:l+"px",height:c+"px"}),d.style.opacity=e.opacity,n.dom.elDefs.node.appendChild(u)}getSeriesIndex(e){const n=this.w,i=n.config.chart.type;return(i==="bar"||i==="rangeBar")&&n.config.plotOptions.bar.distributed||i==="heatmap"||i==="treemap"?this.seriesIndex=e.seriesNumber:this.seriesIndex=e.seriesNumber%n.seriesData.series.length,this.seriesIndex}getSeriesAxisRange(e){var n,i,o;const r=this.w,a=(i=(n=r.globals.seriesYAxisReverseMap)==null?void 0:n[e])!=null?i:0;return{minY:we.isNumber(r.globals.minYArr[e])?r.globals.minYArr[e]:r.globals.minY,maxY:we.isNumber(r.globals.maxYArr[e])?r.globals.maxYArr[e]:r.globals.maxY,reversed:!!((o=r.config.yaxis[a])!=null&&o.reversed)}}computeColorStops(e,n){const i=this.w,{threshold:o,colorAboveThreshold:r,colorBelowThreshold:a}=n,{minY:s,maxY:l}=e,c=l-s;let u=c===0?o>l?0:100:(l-o)/c*100;e.reversed&&(u=100-u),u=Math.max(0,Math.min(u,100));const d=Array.isArray(i.config.fill.opacity)?i.config.fill.opacity[this.seriesIndex]:i.config.fill.opacity,f={offset:u,color:r,opacity:d},h={offset:u,color:a,opacity:d};return e.reversed?[h,f]:[f,h]}fillPath(e){var n,i,o,r,a,s,l;const c=this.w;this.opts=e;const u=this.w.config;let d,f,h;this.seriesIndex=this.getSeriesIndex(e);const p=u.plotOptions.line.colors.colorAboveThreshold&&u.plotOptions.line.colors.colorBelowThreshold;let m=this.getFillColors()[this.seriesIndex];c.seriesData.seriesColors[this.seriesIndex]!==void 0&&(m=c.seriesData.seriesColors[this.seriesIndex]),typeof m=="function"&&(m=m({seriesIndex:this.seriesIndex,dataPointIndex:e.dataPointIndex,value:e.value,w:c}));const v=e.fillType?e.fillType:this.getFillType(this.seriesIndex);let b=Array.isArray(u.fill.opacity)?u.fill.opacity[this.seriesIndex]:u.fill.opacity;const y=v==="gradient"||p;e.color&&(m=e.color);const w=c.config.series[this.seriesIndex];(i=(n=w==null?void 0:w.data)==null?void 0:n[e.dataPointIndex])!=null&&i.fillColor&&(m=(r=(o=w==null?void 0:w.data)==null?void 0:o[e.dataPointIndex])==null?void 0:r.fillColor),m||(m="#fff",console.warn("undefined color - ApexCharts")),e.opacity!==void 0&&e.opacity!==null&&(b=e.opacity);let x=m;we.isCSSVariable(m)?x=we.applyOpacityToColor(m,b):m.indexOf("rgb")===-1?m.indexOf("#")===-1?x=m:m.length<9&&(x=we.hexToRgba(m,b)):m.indexOf("rgba")>-1?b=we.getOpacityFromRGBA(m):x=we.hexToRgba(we.rgb2hex(m),b);const $=we.isCSSVariable(m)?we.getThemeColor(m):m;if(v==="pattern"&&(f=this.handlePatternFill({fillConfig:e.fillConfig,patternFill:f,fillColor:$,defaultColor:x})),y){const S=u.fill.gradient.colorStops?[...u.fill.gradient.colorStops]:[];let _=(l=(s=(a=e.fillConfig)==null?void 0:a.gradient)==null?void 0:s.type)!=null?l:u.fill.gradient.type;p&&(S[this.seriesIndex]=this.computeColorStops(this.getSeriesAxisRange(this.seriesIndex),u.plotOptions.line.colors),_="vertical"),h=this.handleGradientFill({type:_,fillConfig:e.fillConfig,fillColor:$,fillOpacity:b,colorStops:S,i:this.seriesIndex,verticalUserSpace:p})}if(v==="image"){const S=u.fill.image.src,_=e.patternID?e.patternID:"",P=`pattern${c.globals.cuid}${e.seriesNumber+1}${_}`;this.patternIDs.indexOf(P)===-1&&(this.clippedImgArea({opacity:b,image:Array.isArray(S)?e.seriesNumber-1&&(p=we.getOpacityFromRGBA(f));let g=l.gradient.opacityTo===void 0?i:Array.isArray(l.gradient.opacityTo)?l.gradient.opacityTo[a]:l.gradient.opacityTo;if(l.gradient.gradientToColors===void 0||l.gradient.gradientToColors.length===0)l.gradient.shade==="dark"?h=d.shadeColor(parseFloat(l.gradient.shadeIntensity)*-1,n.indexOf("rgb")>-1?we.rgb2hex(n):n):h=d.shadeColor(parseFloat(l.gradient.shadeIntensity),n.indexOf("rgb")>-1?we.rgb2hex(n):n);else if(l.gradient.gradientToColors[c.seriesNumber]){const m=l.gradient.gradientToColors[c.seriesNumber];h=m,m.indexOf("rgba")>-1&&(g=we.getOpacityFromRGBA(m))}else h=n;if(l.gradient.gradientFrom&&(f=l.gradient.gradientFrom),l.gradient.gradientTo&&(h=l.gradient.gradientTo),l.gradient.inverseColors){const m=f;f=h,h=m}return f.indexOf("rgb")>-1&&(f=we.rgb2hex(f)),h.indexOf("rgb")>-1&&(h=we.rgb2hex(h)),u.drawGradient(e,f,h,p,g,c.size,l.gradient.stops,r,a,s)}};const cE=["none","lighten","darken"];function Ex(t,e){const n=t&&t.renderer;return n&&n.kind&&n.kind!=="svg"?n:e}function wye(t){const e=t.config.series||[],n=t.config.chart.type,i=n==="scatter"||n==="bubble",o=t.config.markers&&t.config.markers.size,r=Array.isArray(o)?o.some(d=>d>0):(o||0)>0,a=!!(t.config.dataLabels&&t.config.dataLabels.enabled),s=n==="heatmap";let l=0,c=0;return e.forEach(d=>{const f=Array.isArray(d.data)?d.data.length:0;f>c&&(c=f),(i||r||s)&&(l+=f),a&&(l+=f)}),c>=5e4&&(l=Math.max(l,c)),l}function uE(t){var e,n,i,o;const r=t.config.fill&&t.config.fill.type,a=d=>d==="pattern"||d==="image"||d==="gradient";if(Array.isArray(r)?r.some(a):a(r))return!0;const s=(n=(e=t.config.plotOptions)==null?void 0:e.line)==null?void 0:n.colors;if(s&&s.colorAboveThreshold&&s.colorBelowThreshold||t.config.chart.type==="heatmap"&&(((o=(i=t.config.plotOptions)==null?void 0:i.heatmap)==null?void 0:o.shape)||"rect")!=="rect")return!0;const l=t.config.states||{},c=l.hover&&l.hover.filter&&l.hover.filter.type,u=l.active&&l.active.filter&&l.active.filter.type;return!!(c&&!cE.includes(c)||u&&!cE.includes(u))}let Id=class op{constructor(e,n){this.w=e,this.ctx=n,this._filters=new zi(this.w),this._graphics=new it(this.w,this.ctx),this._seriesWrap=null,this._seriesWrapIndex=-1,this._batch=null}resetSeriesWrapCache(){this._seriesWrap=null,this._seriesWrapIndex=-1,this._batch=null}static markersAreInert(e){const n=e.config.chart.type;return(n==="line"||n==="area")&&!e.globals.comboCharts&&!e.config.tooltip.intersect}_shouldBatch(){var e,n,i,o,r;const a=this.w,s=a.config.markers,l=(e=s.largeDatasetThreshold)!=null?e:0;if(l<=0||((i=(n=this.ctx)==null?void 0:n.renderer)==null?void 0:i.kind)==="canvas"||!op.markersAreInert(a)||s.discrete&&s.discrete.length||s.onClick||s.onDblClick||(o=a.config.chart.events)!=null&&o.dataPointSelection)return!1;const c=a.seriesData.series;if(!Array.isArray(c)||!c.length)return!1;let u=!1;for(let d=0;d0||f&&s.showNullDataPoints)&&c[d].length>l&&(u=!0)}return u}setGlobalMarkerSize(){const e=this.w;if(e.globals.markers.size=Array.isArray(e.config.markers.size)?e.config.markers.size:[e.config.markers.size],e.globals.markers.size.length>0){if(e.globals.markers.size.length"u"&&e.globals.markers.size.push(e.globals.markers.size[0])}else e.globals.markers.size=e.config.series.map(()=>e.config.markers.size);e.globals.markers.batched=this._shouldBatch()}plotChartMarkers({pointsPos:e,seriesIndex:n,j:i,pSize:o,alwaysDrawMarker:r=!1,isVirtualPoint:a=!1}){const s=this.w,l=n,c=e;let u=null;const d=new it(this.w),f=Ex(this.ctx,d),h=s.config.markers.discrete&&s.config.markers.discrete.length;if(Array.isArray(c.x))for(let p=0;p0:s.config.markers.size>0;if(s.globals.markers.batched&&(y||r)&&!h&&!a){this._batchPoint(n,m,c.x[p],c.y[p],{invalid:v,graphics:d,pSize:r?o:void 0,trackPoint:!r});continue}if(y||r||h){f.kind==="canvas"&&(typeof s.globals.pointsArray[n]>"u"&&(s.globals.pointsArray[n]=[]),s.globals.pointsArray[n][m]=[c.x[p],c.y[p]]),v||(b+=` w${we.randomId()}`);const x=this.getMarkerConfig({cssClass:b,seriesIndex:n,dataPointIndex:m}),$=s.config.series[l];if($.data[m]&&($.data[m].fillColor&&(x.pointFillColor=$.data[m].fillColor),$.data[m].strokeColor&&(x.pointStrokeColor=$.data[m].strokeColor)),typeof o<"u"&&(x.pSize=o),(c.x[p]<-s.globals.markers.largestSize||c.x[p]>s.layout.gridWidth+s.globals.markers.largestSize||c.y[p]<-s.globals.markers.largestSize||c.y[p]>s.layout.gridHeight+s.globals.markers.largestSize)&&(x.pSize=0),!v){if((s.globals.markers.size[n]>0||r||h)&&!u){const _=!r&&!h;_&&this._seriesWrap&&this._seriesWrapIndex===n?u=this._seriesWrap:(u=f.group({class:_?"apexcharts-series-markers":""}),u.attr("clip-path",`url(#gridRectMarkerMask${s.globals.cuid})`),this.setupMarkerDelegation(u),_&&(this._seriesWrap=u,this._seriesWrapIndex=n))}g=f.drawMarker(c.x[p],c.y[p],x),g.attr("rel",m),g.attr("j",m),g.attr("index",n),g.node.setAttribute("default-marker-size",x.pSize),_g(g,c.x[p],s),this._filters.setSelectionFilter(g,n,m),u&&u.add(g)}}else typeof s.globals.pointsArray[n]>"u"&&(s.globals.pointsArray[n]=[]),s.globals.pointsArray[n].push([c.x[p],c.y[p]])}return u}_batchPoint(e,n,i,o,{invalid:r,graphics:a,pSize:s,trackPoint:l}){const c=this.w;if(l&&(typeof c.globals.pointsArray[e]>"u"&&(c.globals.pointsArray[e]=[]),c.globals.pointsArray[e][n]=[i,o]),r)return;(!this._batch||this._batch.seriesIndex!==e)&&(this._batch={seriesIndex:e,opts:this.getMarkerConfig({cssClass:"",seriesIndex:e}),sizes:new Map});const u=s===void 0?this._batch.opts.pSize:s;if(!(u>0))return;const d=c.globals.markers.largestSize;if(i<-d||i>c.layout.gridWidth+d||o<-d||o>c.layout.gridHeight+d)return;let f=this._batch.sizes.get(u);f||(f=[],this._batch.sizes.set(u,f)),f.push(a.getMarkerPath(i,o,this._batch.opts.shape,u))}flushBatch(e,n){const i=this._batch;if(this._batch=null,!i||i.seriesIndex!==n||!i.sizes.size)return[];const o=this.w,r=new it(this.w),a=i.opts,s=a.shape==="line"||a.shape==="plus"||a.shape==="cross",l=s?a.pointFillColor:a.pointStrokeColor,c=s?a.pointFillOpacity:a.pointStrokeOpacity,u=[];return i.sizes.forEach((d,f)=>{if(!d.length)return;const h=r.drawPath({d:d.join(" "),fill:a.pointFillColor,fillOpacity:a.pointFillOpacity,stroke:l,strokeOpacity:c,strokeWidth:a.pointStrokeWidth,strokeDashArray:a.pointStrokeDashArray});h.attr({class:`apexcharts-marker-batch${op.markersAreInert(o)?" no-pointer-events":""}`,"clip-path":`url(#gridRectMarkerMask${o.globals.cuid})`,shape:a.shape,index:n,"default-marker-size":f}),e.add(h),u.push(h)}),u}getMarkerConfig({cssClass:e,seriesIndex:n,dataPointIndex:i=null,radius:o=null,size:r=null,strokeWidth:a=null}){const s=this.w,l=this.getMarkerStyle(n);let c=r===null?s.globals.markers.size[n]:r;const u=s.config.markers;return i!==null&&u.discrete.length&&u.discrete.map(d=>{d.seriesIndex===n&&d.dataPointIndex===i&&(d.strokeColor!==void 0&&(l.pointStrokeColor=d.strokeColor),d.fillColor!==void 0&&(l.pointFillColor=d.fillColor),d.size!==void 0&&(c=d.size),d.shape!==void 0&&(l.pointShape=d.shape))}),{pSize:o===null?c:o,pRadius:o!==null?o:u.radius,pointStrokeWidth:a!==null?a:Array.isArray(u.strokeWidth)?u.strokeWidth[n]:u.strokeWidth,pointStrokeColor:l.pointStrokeColor,pointFillColor:l.pointFillColor,shape:l.pointShape||(Array.isArray(u.shape)?u.shape[n]:u.shape),class:e,pointStrokeOpacity:Array.isArray(u.strokeOpacity)?u.strokeOpacity[n]:u.strokeOpacity,pointStrokeDashArray:Array.isArray(u.strokeDashArray)?u.strokeDashArray[n]:u.strokeDashArray,pointFillOpacity:Array.isArray(u.fillOpacity)?u.fillOpacity[n]:u.fillOpacity,seriesIndex:n}}setupMarkerDelegation(e){const n=this.w,i=".apexcharts-marker";this._graphics.setupEventDelegation(e,i),e.node.addEventListener("click",o=>{n.config.markers.onClick&&it._findDelegateTarget(o.target,e.node,i)&&n.config.markers.onClick(o)}),e.node.addEventListener("dblclick",o=>{n.config.markers.onDblClick&&it._findDelegateTarget(o.target,e.node,i)&&n.config.markers.onDblClick(o)}),e.node.addEventListener("touchstart",o=>{const r=it._findDelegateTarget(o.target,e.node,i);r&&r.instance&&this._graphics.pathMouseDown(r.instance,o)},{passive:!0})}getMarkerStyle(e){const n=this.w,i=n.globals.markers.colors,o=n.config.markers.strokeColor||n.config.markers.strokeColors,r=Array.isArray(o)?o[e]:o,a=Array.isArray(i)?i[e]:i;return{pointStrokeColor:r,pointFillColor:a}}},dF=class{constructor(e,n){this.ctx=n,this.w=e,this.initialAnim=this.w.config.chart.animations.enabled,this.anim=new mv(this.w),this.filters=new zi(this.w),this.fill=new UC(this.w),this.markers=new Id(this.w,this.ctx),this.graphics=new it(this.w),this._elPointsWrap=null,this._elPointsWrapParent=null,this._perSeries=null}draw(e,n,i){const o=this.w,r=this.graphics,a=Ex(this.ctx,r),s=i.realIndex,l=i.pointsPos,c=i.zRatio,u=i.elParent;let d=this._elPointsWrap;if((!d||this._elPointsWrapParent!==u)&&(d=a.group({class:`apexcharts-series-markers apexcharts-series-${o.config.chart.type}`}),d.attr("clip-path",`url(#gridRectMarkerMask${o.globals.cuid})`),this.markers.setupMarkerDelegation(d),u.add(d),this._elPointsWrap=d,this._elPointsWrapParent=u,this._perSeries=this._buildPerSeriesCache(s,a)),Array.isArray(l.x))for(let f=0;fb.maxBubbleRadius&&(g=b.maxBubbleRadius)}const m=l.x[f],v=l.y[f];if(g=g||0,(v===null||typeof o.seriesData.series[s][h]>"u")&&(p=!1),p){const b=this.drawPoint(m,v,g,s,h,n);d.add(b),a.kind==="canvas"&&(typeof o.globals.pointsArray[s]>"u"&&(o.globals.pointsArray[s]=[]),o.globals.pointsArray[s][h]=[m,v])}}}_buildPerSeriesCache(e,n){var i;const o=this.w;return{realIndex:e,emit:n,isBubble:o.config.chart.type==="bubble"||o.globals.comboCharts&&o.config.series[e]&&o.config.series[e].type==="bubble",canCacheConfig:!o.config.markers.discrete.length,markerConfig:null,fillCacheable:void 0,fillCircle:void 0,dropShadowEnabled:o.config.chart.dropShadow.enabled,doInitialAnim:this.initialAnim&&!o.globals.dataChanged&&!o.globals.resized,jitter:(i=o.config.plotOptions.scatter)==null?void 0:i.jitter,anim:null}}drawPoint(e,n,i,o,r,a){var s;const l=this.w,c=o,u=this.anim,d=this.filters,f=this.fill,h=this.markers;let p=this._perSeries;(!p||p.realIndex!==o)&&(p=this._perSeries=this._buildPerSeriesCache(o,Ex(this.ctx,this.graphics)));const g=p.emit;let m;p.canCacheConfig?(p.markerConfig||(p.markerConfig=h.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:c,dataPointIndex:r,radius:p.isBubble?i:null})),m=p.markerConfig,p.isBubble&&(m.pSize=i,m.pRadius=i)):m=h.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:c,dataPointIndex:r,radius:p.isBubble?i:null});const b=l.config.series[c].data[r];let y;p.fillCircle!==void 0?y=p.fillCircle:(y=f.fillPath({seriesNumber:o,dataPointIndex:r,color:m.pointFillColor,patternUnits:"objectBoundingBox",value:l.seriesData.series[o][a]}),p.fillCacheable===void 0&&(p.fillCacheable=p.canCacheConfig&&f.getFillType(o)==="solid"&&typeof m.pointFillColor=="string"&&!!m.pointFillColor),p.fillCacheable&&!(b!=null&&b.fillColor)&&(p.fillCircle=y));const w=g.drawMarker(e,n,m);b!=null&&b.fillColor&&(y=b.fillColor);const x=p.jitter;if(x!=null&&x.enabled&&x.distributed&&l.globals.colors.length){const $=Math.round((s=l.seriesData.seriesX[o])==null?void 0:s[r]);isNaN($)||(y=l.globals.colors[$%l.globals.colors.length])}if(w.attr({fill:y}),p.dropShadowEnabled){const $=l.config.chart.dropShadow;d.dropShadow(w,$,o)}if(p.doInitialAnim){if(!p.anim){const S=l.config.chart.animations,_=l.globals.dataPoints||1,P=S.animateGradually,O=P&&P.enabled!==!1;p.anim={popSpeed:S.speed,baseDelay:O?Math.min(20,S.speed*.5/Math.max(1,_)):0}}const $=uF({style:p.anim.baseDelay>0?"sequential":"none",index:r,baseDelay:p.anim.baseDelay});u.animatePop(w,{speed:p.anim.popSpeed,delay:$,onComplete:()=>u.animationCompleted(w)})}else l.globals.animationEnded=!0;return w.attr({rel:r,j:r,index:o,"default-marker-size":m.pSize}),d.setSelectionFilter(w,o,r),w}centerTextInBubble(e){const n=this.w;return e=e+parseInt(n.config.dataLabels.style.fontSize,10)/4,{y:e}}};const ah=(t,e,n,i)=>{if(typeof t!="function")return t;const o=t({series:e.seriesData.series,seriesIndex:n,dataPointIndex:i,w:e});return Number.isFinite(o)?o:0};let Mx=class{constructor(e,n=null){this.w=e,this.ctx=n}dataLabelsCorrection(e,n,i,o,r,a,s){const l=this.w,c=new it(this.w);let u=!1;const d=c.getTextRects(i,s),f=d.width,h=d.height;n<0&&(n=0),n>l.layout.gridHeight+h&&(n=l.layout.gridHeight+h/2),typeof l.globals.dataLabelsRects[o]>"u"&&(l.globals.dataLabelsRects[o]=[]),l.globals.dataLabelsRects[o].push({x:e,y:n,width:f,height:h});const p=l.globals.dataLabelsRects[o].length-2,g=typeof l.globals.lastDrawnDataLabelsIndexes[o]<"u"?l.globals.lastDrawnDataLabelsIndexes[o][l.globals.lastDrawnDataLabelsIndexes[o].length-1]:0;if(typeof l.globals.dataLabelsRects[o][p]<"u"){const m=l.globals.dataLabelsRects[o][g];(e>m.x+m.width||n>m.y+m.height||n+hs.config.dataLabels.formatter(w,{seriesIndex:i,dataPointIndex:f,w:s});s.config.chart.type==="bubble"?(m=s.seriesData.seriesZ[i][f],v=b(m),d=n.y[g],d=new dF(this.w,this.ctx).centerTextInBubble(d).y):typeof m<"u"&&(v=b(m));let y=s.config.dataLabels.textAnchor;s.globals.isSlopeChart&&(f===0?y="end":f===s.config.series[i].data.length-1?y="start":y="middle"),this.plotDataLabelsText({x:u,y:d,text:v,i,j:f,parent:h,offsetCorrection:!0,dataLabelsConfig:s.config.dataLabels,textAnchor:y})}return h}plotDataLabelsText(e){const n=this.w,i=new it(this.w);let{x:o,y:r,i:a,j:s,text:l,textAnchor:c,fontSize:u,parent:d,dataLabelsConfig:f,color:h,alwaysDrawDataLabel:p,offsetCorrection:g,className:m,seriesIndex:v=a,dataPointIndex:b=s}=e,y=null;if(Array.isArray(n.config.dataLabels.enabledOnSeries)&&n.config.dataLabels.enabledOnSeries.indexOf(a)<0)return y;let w={x:o,y:r,drawnextLabel:!0,textRects:null};if(g&&(w=this.dataLabelsCorrection(o,r,l,a,s,p,parseInt(f.style.fontSize,10).toString())),n.interact.zoomed||(o=w.x,r=w.y),w.textRects){const T=n.globals.barPadForNumericAxis||0;(o<-(T+20)-w.textRects.width||o>n.layout.gridWidth+w.textRects.width+T+30)&&(l="")}let x=n.globals.dataLabels.style.colors[a];((n.config.chart.type==="bar"||n.config.chart.type==="rangeBar")&&n.config.plotOptions.bar.distributed||n.config.dataLabels.distributed)&&(x=n.globals.dataLabels.style.colors[s]),typeof x=="function"&&(x=x({series:n.seriesData.series,seriesIndex:a,dataPointIndex:s,w:n})),h&&(x=h);const $=n.config.chart.type==="bar"||n.config.chart.type==="rangeBar",S=$?0:ah(f.offsetX,n,v,b),_=$?0:ah(f.offsetY,n,v,b);let P=S;const O=_;if(n.globals.isSlopeChart&&(s!==0&&(P=S*-2+5),s!==0&&s!==n.config.series[a].data.length-1&&(P=0)),w.drawnextLabel){if(c==="middle"&&o===n.layout.gridWidth&&(c="end"),y=i.drawText({x:o+P,y:r+O,foreColor:x,textAnchor:c||f.textAnchor,text:l,fontSize:u||f.style.fontSize,fontFamily:f.style.fontFamily,fontWeight:f.style.fontWeight||"normal"}),y.attr({class:m||"apexcharts-datalabel",cx:o,cy:r}),f.dropShadow.enabled){const T=f.dropShadow;new zi(this.w).dropShadow(y,T)}d.add(y),_g(y,o,n),typeof n.globals.lastDrawnDataLabelsIndexes[a]>"u"&&(n.globals.lastDrawnDataLabelsIndexes[a]=[]),n.globals.lastDrawnDataLabelsIndexes[a].push(s)}return y}addBackgroundToDataLabel(e,n){const i=this.w,o=i.config.dataLabels.background,r=o.padding,a=o.padding/2,s=n.width,l=n.height,u=new it(this.w).drawRect(n.x-r,n.y-a/2,s+r*2,l+a,o.borderRadius,i.config.chart.background==="transparent"||!i.config.chart.background?"#fff":i.config.chart.background,o.opacity,o.borderWidth,o.borderColor);return o.dropShadow.enabled&&new zi(this.w).dropShadow(u,o.dropShadow),u}dataLabelsBackground(){var e;const n=this.w;if(n.config.chart.type==="bubble")return;const i=n.dom.baseEl.querySelectorAll(".apexcharts-datalabels text");for(let o=0;o"u"?"":e[o];let u=c;const d=l.formatters.xLabelFormatter,f=l.config.xaxis.labels.formatter,h=new zc(this.w),p=c;s&&(u=h.xLabelFormat(d,c,p,{i:o,dateFormatter:new Ei(this.w).formatDate,w:l}),f!==void 0&&(u=f(c,e[o],{i:o,dateFormatter:new Ei(this.w).formatDate,w:l}))),n.length>0?(i=n[o].position,u=n[o].value):l.config.xaxis.type==="datetime"&&f===void 0&&(u=""),typeof u>"u"&&(u=""),u=Array.isArray(u)?u:u.toString();const g=new it(this.w);let m={};l.layout.rotateXLabels&&s?m=g.getTextRects(u,parseInt(a,10).toString(),null,`rotate(${l.config.xaxis.labels.rotate} 0 0)`,!1):m=g.getTextRects(u,parseInt(a,10).toString());const v=!l.config.xaxis.labels.showDuplicates&&this.timeScale;return!Array.isArray(u)&&(String(u)==="NaN"||r.indexOf(u)>=0&&v)&&(u=""),{x:i,text:u,textRect:m}}checkLabelBasedOnTickamount(e,n,i){const o=this.w;let r=o.config.xaxis.tickAmount;if(r==="dataPoints"&&(r=Math.round(o.layout.gridWidth/120)),r>i)return n;const a=Math.round(i/(r+1));return e%a===0||(n.text=""),n}checkForOverflowingLabels(e,n,i,o,r){const a=this.w;if(e===0&&a.globals.skipFirstTimelinelabel&&(n.text=""),e===i-1&&a.globals.skipLastTimelinelabel&&(n.text=""),a.config.xaxis.labels.hideOverlappingLabels&&o.length>0){const s=r[r.length-1];if(a.config.xaxis.labels.trim&&a.config.xaxis.type!=="datetime")return n;n.xn.collapsedSeriesIndices.indexOf(i)===-1)}translateYAxisIndex(e){const n=this.w,i=n.globals,o=n.config.yaxis;return n.seriesData.series.length>o.length||o.some(a=>Array.isArray(a.seriesName))?e:i.seriesYAxisReverseMap[e]}isYAxisHidden(e){const n=this.w,i=n.config.yaxis[e];if(!i.show||this.yAxisAllSeriesCollapsed(e))return!0;if(!i.showForNullSeries){const o=n.globals.seriesYAxisMap[e],r=new Xi(this.w);return o.every(a=>r.isSeriesNull(a))}return!1}getYAxisForeColor(e,n){var i;const o=this.w;return Array.isArray(e)&&o.globals.yAxisScale[n]&&((i=this.theme)==null||i.pushExtraColors(e,o.globals.yAxisScale[n].result.length,!1)),e}drawYAxisTicks(e,n,i,o,r,a,s){const l=this.w,c=new it(this.w);let u=l.layout.translateY+l.config.yaxis[r].labels.offsetY;if(l.globals.isBarHorizontal?u=0:l.config.chart.type==="heatmap"&&(u+=a/2),o.show&&n>0){l.config.yaxis[r].opposite===!0&&(e=e+o.width);for(let d=n;d>=0;d--){const f=c.drawLine(e+i.offsetX-o.width+o.offsetX,u+o.offsetY,e+i.offsetX+o.offsetX,u+o.offsetY,o.color);s.add(f),u+=a}}}},Ws=class{constructor(e,n,i){this.w=e,this.ctx=n,this.elgrid=i,this.axesUtils=new Hs(e,{theme:n.theme,timeScale:n.timeScale}),this.xaxisLabels=e.labelData.labels.slice(),e.labelData.timescaleLabels.length>0&&!e.globals.isBarHorizontal&&(this.xaxisLabels=e.labelData.timescaleLabels.slice()),e.config.xaxis.overwriteCategories&&(this.xaxisLabels=e.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],e.config.xaxis.position==="top"?this.offY=0:this.offY=e.layout.gridHeight,this.offY=this.offY+e.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal=e.config.chart.type==="bar"&&e.config.plotOptions.bar.horizontal,this.xaxisFontSize=e.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=e.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=e.config.xaxis.labels.style.colors,this.xaxisBorderWidth=e.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=e.config.yaxis[0].axisBorder.width.toString()),String(this.xaxisBorderWidth).indexOf("%")>-1?this.xaxisBorderWidth=e.layout.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=e.config.xaxis.axisBorder.height,this.yaxis=e.config.yaxis[0]}drawXaxis(){const e=this.w,n=new it(this.w),i=n.group({class:"apexcharts-xaxis",transform:`translate(${e.config.xaxis.offsetX}, ${e.config.xaxis.offsetY})`}),o=n.group({class:"apexcharts-xaxis-texts-g",transform:`translate(${e.layout.translateXAxisX}, ${e.layout.translateXAxisY})`});i.add(o);let r=[];for(let a=0;as),e.labelData.hasXaxisGroups){const a=e.labelData.groups;r=[];for(let l=0;la[l].cols*c,s)}if(e.config.xaxis.title.text!==void 0){const a=n.group({class:"apexcharts-xaxis-title"}),s=n.drawText({x:e.layout.gridWidth/2+e.config.xaxis.title.offsetX,y:this.offY+parseFloat(this.xaxisFontSize)+(e.config.xaxis.position==="bottom"?e.layout.xAxisLabelsHeight:-e.layout.xAxisLabelsHeight-10)+e.config.xaxis.title.offsetY,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+e.config.xaxis.title.style.cssClass});a.add(s),i.add(a)}if(e.config.xaxis.axisBorder.show){const a=e.globals.barPadForNumericAxis,s=n.drawLine(e.globals.padHorizontal+e.config.xaxis.axisBorder.offsetX-a,this.offY,this.xaxisBorderWidth+a,this.offY,e.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(s):i.add(s)}return i}drawXAxisLabelAndGroup(e,n,i,o,r,a,s={}){var l,c;const u=[],d=[],f=this.w,h=s.xaxisFontSize||this.xaxisFontSize,p=s.xaxisFontFamily||this.xaxisFontFamily,g=s.xaxisForeColors||this.xaxisForeColors,m=s.fontWeight||f.config.xaxis.labels.style.fontWeight,v=s.cssClass||f.config.xaxis.labels.style.cssClass;let b,y=f.globals.padHorizontal;const w=o.length;let x=f.config.xaxis.type==="category"?f.globals.dataPoints:w;if(x===0&&w>x&&(x=w),r){const $=Math.max(Number(f.config.xaxis.tickAmount)||1,x>1?x-1:x);b=f.layout.gridWidth/Math.min($,w-1),y=y+a(0,b)/2+f.config.xaxis.labels.offsetX}else b=f.layout.gridWidth/x,y=y+a(0,b)+f.config.xaxis.labels.offsetX;for(let $=0;$<=w-1;$++){let S=y-a($,b)/2+f.config.xaxis.labels.offsetX;$===0&&w===1&&b/2===y&&x===1&&(S=f.layout.gridWidth/2);let _=this.axesUtils.getLabel(o,f.labelData.timescaleLabels,S,$,u,h,e),P=28;f.layout.rotateXLabels&&e&&(P=22),f.config.xaxis.title.text&&f.config.xaxis.position==="top"&&(P+=parseFloat(f.config.xaxis.title.style.fontSize)+2),e||(P=P+parseFloat(h)+(f.layout.xAxisLabelsHeight-f.layout.xAxisGroupLabelsHeight)+(f.layout.rotateXLabels?10:0)),typeof f.config.xaxis.tickAmount<"u"&&f.config.xaxis.tickAmount!=="dataPoints"&&f.config.xaxis.type!=="datetime"?_=this.axesUtils.checkLabelBasedOnTickamount($,_,w):_=this.axesUtils.checkForOverflowingLabels($,_,w,u,d);const T=()=>e&&f.config.xaxis.convertedCatToNumeric?g[f.globals.minX+$-1]:g[$],I=((c=(l=_.textRect)==null?void 0:l.width)!=null?c:0)/2,k=_.x+I<0;if(f.config.xaxis.labels.show&&!k){const E=n.drawText({x:_.x,y:this.offY+f.config.xaxis.labels.offsetY+P-(f.config.xaxis.position==="top"?f.layout.xAxisHeight+f.config.xaxis.axisTicks.height-2:0),text:_.text,textAnchor:"middle",fontWeight:m,fontSize:h,fontFamily:p,foreColor:Array.isArray(g)?T():g,isPlainText:!1,cssClass:(e?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+v});if(i.add(E),E.on("click",R=>{if(typeof f.config.chart.events.xAxisLabelClick=="function"){const D=Object.assign({},f,{labelIndex:$});f.config.chart.events.xAxisLabelClick(R,this.ctx,D)}}),e){const R=nt.createElementNS(Wt,"title");R.textContent=Array.isArray(_.text)?_.text.join(" "):_.text,E.node.appendChild(R),_.text!==""&&(u.push(_.text),d.push(_))}}$"u"?"":s[p];g=u(g,{seriesIndex:e,dataPointIndex:p,w:n});const m=this.axesUtils.getYAxisForeColor(d.style.colors,e),v=()=>Array.isArray(m)?m[p]:m;let b=0;Array.isArray(g)&&(b=g.length/2*parseInt(d.style.fontSize,10));let y=d.offsetX-15,w="end";this.yaxis.opposite&&(w="start"),n.config.yaxis[0].labels.align==="left"?(y=d.offsetX,w="start"):n.config.yaxis[0].labels.align==="center"?(y=d.offsetX,w="middle"):n.config.yaxis[0].labels.align==="right"&&(w="end");const x=i.drawText({x:y,y:c+l+d.offsetY-b,text:g,textAnchor:w,foreColor:v(),fontSize:d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+d.style.cssClass,maxWidth:d.maxWidth});a.add(x),x.on("click",S=>{if(typeof n.config.chart.events.xAxisLabelClick=="function"){const _=Object.assign({},n,{labelIndex:p});n.config.chart.events.xAxisLabelClick(S,this.ctx,_)}});const $=nt.createElementNS(Wt,"title");if($.textContent=Array.isArray(g)?g.join(" "):g,x.node.appendChild($),n.config.yaxis[e].labels.rotate!==0){const S=i.rotateAroundCenter(x.node);x.node.setAttribute("transform",`rotate(${n.config.yaxis[e].labels.rotate} 0 ${S.y})`)}c=c+l}if(n.config.yaxis[0].title.text!==void 0){const p=i.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+o+", 0)"}),g=i.drawText({x:n.config.yaxis[0].title.offsetX,y:n.layout.gridHeight/2+n.config.yaxis[0].title.offsetY,text:n.config.yaxis[0].title.text,textAnchor:"middle",foreColor:n.config.yaxis[0].title.style.color,fontSize:n.config.yaxis[0].title.style.fontSize,fontWeight:n.config.yaxis[0].title.style.fontWeight,fontFamily:n.config.yaxis[0].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+n.config.yaxis[0].title.style.cssClass});p.add(g),r.add(p)}let f=0;this.isCategoryBarHorizontal&&n.config.yaxis[0].opposite&&(f=n.layout.gridWidth);const h=n.config.xaxis.axisBorder;if(h.show){const p=i.drawLine(n.globals.padHorizontal+h.offsetX+f,1+h.offsetY,n.globals.padHorizontal+h.offsetX+f,n.layout.gridHeight+h.offsetY,h.color,0);this.elgrid&&this.elgrid.elGridBorders&&n.config.grid.show?this.elgrid.elGridBorders.add(p):r.add(p)}return n.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(f,s.length,n.config.yaxis[0].axisBorder,n.config.yaxis[0].axisTicks,0,l,r),r}drawXaxisTicks(e,n,i){const o=this.w,r=e;if(e<0||e-2>o.layout.gridWidth)return;const a=this.offY+o.config.xaxis.axisTicks.offsetY;if(n=n+a+o.config.xaxis.axisTicks.height,o.config.xaxis.position==="top"&&(n=a-o.config.xaxis.axisTicks.height),o.config.xaxis.axisTicks.show){const l=new it(this.w).drawLine(e+o.config.xaxis.axisTicks.offsetX,a+o.config.xaxis.offsetY,r+o.config.xaxis.axisTicks.offsetX,n+o.config.xaxis.offsetY,o.config.xaxis.axisTicks.color);i.add(l),l.node.classList.add("apexcharts-xaxis-tick")}}getXAxisTicksPositions(){const e=this.w,n=[],i=this.xaxisLabels.length;let o=e.globals.padHorizontal;if(e.labelData.timescaleLabels.length>0)for(let r=0;r{r.placeTextWithEllipsis(h,h.textContent,o.layout.xAxisLabelsHeight-(o.config.legend.position==="bottom"?20:10))})}else{const u=o.layout.gridWidth/(o.labelData.labels.length+1);for(let d=0;d{r.placeTextWithEllipsis(h,h.textContent,u)})}}if(l.length>0){const u=l[l.length-1].getBBox(),d=l[0].getBBox();u.x<-20&&((e=l[l.length-1].parentNode)==null||e.removeChild(l[l.length-1])),d.x+d.width>o.layout.gridWidth&&!o.globals.isBarHorizontal&&((n=l[0].parentNode)==null||n.removeChild(l[0]));for(let f=0;f0&&(this.xaxisLabels=e.labelData.timescaleLabels.slice())}drawGridArea(e=null){const n=this.w,i=new it(this.w);e||(e=i.group({class:"apexcharts-grid"}));const o=i.drawLine(n.globals.padHorizontal,1,n.globals.padHorizontal,n.layout.gridHeight,"transparent"),r=i.drawLine(n.globals.padHorizontal,n.layout.gridHeight,n.layout.gridWidth,n.layout.gridHeight,"transparent");return e.add(r),e.add(o),e}drawGrid(){if(this.w.globals.axisCharts){const n=this.renderGrid();return this.drawGridArea(n.el),n}return null}createGridMask(){const e=this.w,n=e.globals,i=new it(this.w),o=Array.isArray(e.config.stroke.width)?Math.max(...e.config.stroke.width):e.config.stroke.width,r=d=>{const f=nt.createElementNS(Wt,"clipPath");return f.setAttribute("id",d),f};e.dom.elGridRectMask=r(`gridRectMask${n.cuid}`),e.dom.elGridRectBarMask=r(`gridRectBarMask${n.cuid}`),e.dom.elGridRectMarkerMask=r(`gridRectMarkerMask${n.cuid}`),e.dom.elForecastMask=r(`forecastMask${n.cuid}`),e.dom.elNonForecastMask=r(`nonForecastMask${n.cuid}`);const a=["bar","rangeBar","candlestick","boxPlot","violin"].includes(e.config.chart.type)||e.globals.comboBarCount>0;let s=0,l=0;a&&e.axisFlags.isXNumeric&&!e.globals.isBarHorizontal&&(s=Math.max(e.layout.gridPad.left,n.barPadForNumericAxis),l=Math.max(e.layout.gridPad.right,n.barPadForNumericAxis)),e.dom.elGridRect=i.drawRect(-o/2-2,-o/2-2,e.layout.gridWidth+o+4,e.layout.gridHeight+o+4,0,"#fff"),e.dom.elGridRectBar=i.drawRect(-o/2-s-2,-o/2-2,e.layout.gridWidth+o+l+s+4,e.layout.gridHeight+o+4,0,"#fff");const c=e.globals.markers.largestSize;e.dom.elGridRectMarker=i.drawRect(Math.min(-o/2-s-2,-c),-c,e.layout.gridWidth+Math.max(o+l+s+4,c*2),e.layout.gridHeight+c*2,0,"#fff"),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectBarMask.appendChild(e.dom.elGridRectBar.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);const u=e.dom.elDefs.node;u.appendChild(e.dom.elGridRectMask),u.appendChild(e.dom.elGridRectBarMask),u.appendChild(e.dom.elGridRectMarkerMask),u.appendChild(e.dom.elForecastMask),u.appendChild(e.dom.elNonForecastMask)}_drawGridLines({i:e,x1:n,y1:i,x2:o,y2:r,xCount:a,parent:s}){const l=this.w;if(!(e===0&&l.globals.skipFirstTimelinelabel||e===a-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||l.config.chart.type==="radar")){l.config.grid.xaxis.lines.show&&this._drawGridLine({i:e,x1:n,y1:i,x2:o,y2:r,xCount:a,parent:s});let u=0;if(l.labelData.hasXaxisGroups&&l.config.xaxis.tickPlacement==="between"){const f=l.labelData.groups;if(f){let h=0;for(let p=0;h{for(let f=0;fo.layout.gridWidth)&&this._drawGridLines({i:f,x1:l,y1:c,x2:u,y2:d,xCount:e,parent:this.elgridLinesV})},a=({xC:s,x1:l,y1:c,x2:u,y2:d})=>{for(let f=0;f0&&o.config.xaxis.type!=="datetime"&&(c=r.yAxisScale[s].result.length-1)),this._drawXYLines({xCount:c,tickAmount:l})):(c=l,l=r.xTickAmount,this._drawInvertedXYLines({xCount:c,tickAmount:l})),this.drawGridBands(c,l),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:o.layout.gridWidth/c}}drawGridBands(e,n){var i,o,r,a,s;const l=this.w,c=(u,d,f,h,p,g)=>{for(let m=0,v=0;m=l.config.grid[u].colors.length&&(v=0),this._drawGridBandRect({c:v,x1:f,y1:h,x2:p,y2:g,type:u}),h+=l.layout.gridHeight/n};if(((i=l.config.grid.row.colors)==null?void 0:i.length)>0&&c("row",n,0,0,l.layout.gridWidth,l.layout.gridHeight/n),((o=l.config.grid.column.colors)==null?void 0:o.length)>0){let u=!l.globals.isBarHorizontal&&l.config.xaxis.tickPlacement==="on"&&(l.config.xaxis.type==="category"||l.config.xaxis.convertedCatToNumeric)?e-1:e;l.axisFlags.isXNumeric&&(u=((a=(r=l.globals.xAxisScale)==null?void 0:r.result.length)!=null?a:1)-1);let d=l.globals.padHorizontal;const f=0;let h=l.globals.padHorizontal+l.layout.gridWidth/u;const p=l.layout.gridHeight;for(let g=0,m=0;g=l.config.grid.column.colors.length&&(m=0),l.config.xaxis.type==="datetime"&&(d=this.xaxisLabels[g].position,h=(((s=this.xaxisLabels[g+1])==null?void 0:s.position)||l.layout.gridWidth)-this.xaxisLabels[g].position),this._drawGridBandRect({c:m,x1:d,y1:f,x2:h,y2:p,type:"column"}),d+=l.layout.gridWidth/u}}},fF=class{constructor(e){this.w=e,this.coreUtils=new Xi(this.w)}niceScale(e,n,i=0){const r=this.w,a=r.globals;let s,l,c,u;a.isBarHorizontal?(s=r.config.xaxis,l=Math.max((a.svgWidth-100)/25,2)):(s=r.config.yaxis[i],l=Math.max((a.svgHeight-100)/15,2)),we.isNumber(l)||(l=10),c=s.min!==void 0&&s.min!==null,u=s.max!==void 0&&s.max!==null;let d=s.stepSize!==void 0&&s.stepSize!==null,f=s.tickAmount!==void 0&&s.tickAmount!==null,h=f?s.tickAmount:$g[Math.min(Math.round(l/2),$g.length-1)];if(a.isMultipleYAxis&&!f&&a.multiAxisTickAmount>0&&(h=a.multiAxisTickAmount,f=!0),h==="dataPoints"?h=a.dataPoints-1:h=Math.abs(Math.round(h)),(e===Number.MIN_VALUE&&n===0||!we.isNumber(e)&&!we.isNumber(n)||e===Number.MIN_VALUE&&n===-Number.MAX_VALUE)&&(e=we.isNumber(s.min)?s.min:0,n=we.isNumber(s.max)?s.max:e+h,a.allSeriesCollapsed=!1),e>n){console.warn("axis.min cannot be greater than axis.max: swapping min and max");const M=n;n=e,e=M}else e===n&&(e=e===0?0:e-1,n=n===0?2:n+1);const p=[];h<1&&(h=1);let g=h,m=Math.abs(n-e);const v=.15;!c&&e>0&&e/m0&&el&&(e=n-b*h,e+=b*Math.floor((M-e)/b))}else if(c)if(f)n=e+b*g;else{const M=n;n=b*Math.ceil(n/b),Math.abs(n-e)/we.getGCD(m,b)>l&&(n=e+b*h,n+=b*Math.ceil((M-n)/b))}m=Math.abs(n-e),b=we.getGCD(m,b),g=Math.round(m/b)}if(!f&&!(c||u)&&(g=Math.ceil((m-1e-11)/(b+1e-11)),g>16&&we.getPrimeFactors(g).length<2&&g++),!f&&s.forceNiceScale&&a.yValueDecimal===0&&g>m&&(g=m,b=Math.round(m/g)),g>l&&(!(f||d)||s.forceNiceScale)){const M=we.getPrimeFactors(g),I=M.length-1;let k=g;e:for(var S=0;ST);return{result:p,niceMin:p[0],niceMax:p[p.length-1]}}linearScale(e,n,i=10,o=0,r=void 0){const a=Math.abs(n-e);let s=[];if(e===n)return s=[e],{result:s,niceMin:s[0],niceMax:s[s.length-1]};i=this._adjustTicksForSmallRange(i,o,a),i==="dataPoints"&&(i=this.w.globals.dataPoints-1);const l=i;r||(r=a/l);const c=2;if(r!==0&&isFinite(r)){const f=Math.floor(Math.log10(Math.abs(r))),h=Math.max(c,-f+c),p=Math.pow(10,h);r=Math.round((r+Number.EPSILON)*p)/p}let u=i===Number.MAX_VALUE?5:l;i===Number.MAX_VALUE&&(r=1);let d=e;for(;u>=0;)s.push(d),d=we.preciseAddition(d,r),u-=1;return{result:s,niceMin:s[0],niceMax:s[s.length-1]}}_resolveLogTickAmount(e){let n=e.tickAmount;return n==="dataPoints"&&(n=this.w.globals.dataPoints-1),we.isNumber(n)&&n>=1?Number(n):null}_thinToTickAmount(e,n){if(n===null||!we.isNumber(n)||n<1)return e;const i=n+1;if(e.length<=i)return e;const o=e.length-1;let r=null;for(let s=1;s<=o;s++){if(o%s!==0)continue;const l=o/s+1;l>i||(r===null||l>r.count)&&(r={stride:s,count:l})}if(!r)return[e[0],e[e.length-1]];const a=[];for(let s=0;s"u"&&(o.yAxisScale[e]=[]);const s=Math.abs(i-n),l=a.logarithmic&&this._logDomainSpan(n,i,a.logBase)>=1,c=a.logarithmic&&(l||s>5);if(a.logarithmic&&!c&&(o.invalidLogScale=!0),c){o.allSeriesCollapsed=!1;const u=this._resolveLogTickAmount(a);o.yAxisScale[e]=a.forceNiceScale?this.logarithmicScaleNice(n,i,a.logBase,u):this.logarithmicScale(n,i,a.logBase,u)}else i===-Number.MAX_VALUE||!we.isNumber(i)||n===Number.MAX_VALUE||!we.isNumber(n)?o.yAxisScale[e]=this.niceScale(Number.MIN_VALUE,0,e):(o.allSeriesCollapsed=!1,o.yAxisScale[e]=this.niceScale(n,i,e))}setXScale(e,n){const i=this.w,o=i.globals;if(n===-Number.MAX_VALUE||!we.isNumber(n))o.xAxisScale=this.linearScale(0,10,10);else{const r=o.xTickAmount;o.xAxisScale=this.linearScale(e,n,r,0,i.config.xaxis.max===void 0?i.config.xaxis.stepSize:void 0)}return o.xAxisScale}scaleMultipleYAxes(){const e=this.w.config,n=this.w.globals;this.coreUtils.setSeriesYAxisMappings();const i=n.seriesYAxisMap,o=n.minYArr,r=n.maxYArr,a=[],s=!n.isBarHorizontal;if(n.allSeriesCollapsed=!0,n.barGroups=[],i.forEach((l,c)=>{const u=[];if(l.forEach(d=>{var f;const h=(f=e.series[d])==null?void 0:f.group;u.indexOf(h)<0&&u.push(h)}),l.length>0){let d=Number.MAX_VALUE,f=-Number.MAX_VALUE,h=d,p=f,g,m;if(e.chart.stacked){const y=new Array(n.dataPoints).fill(0),w=[],x=[],$=[];u.forEach(()=>{w.push(y.map(()=>Number.MIN_VALUE)),x.push(y.map(()=>Number.MIN_VALUE)),$.push(y.map(()=>Number.MIN_VALUE))});for(let S=0;S{if(e.series[_].group===O)for(let M=0;M=0?x[T][M]+=I:$[T][M]+=I,w[T][M]+=I,h=Math.min(h,I),p=Math.max(p,I)}})),(g==="bar"||g==="column")&&n.barGroups.push(m)}g||(g=e.chart.type),g==="bar"||g==="column"?u.forEach((S,_)=>{d=Math.min(d,Math.min.apply(null,$[_])),f=Math.max(f,Math.max.apply(null,x[_]))}):(u.forEach((S,_)=>{h=Math.min(h,Math.min.apply(null,w[_])),p=Math.max(p,Math.max.apply(null,w[_]))}),d=h,f=p),d===Number.MIN_VALUE&&f===Number.MIN_VALUE&&(f=-Number.MAX_VALUE)}else for(let y=0;yx.indexOf(y)===w);const v=e.yaxis[c];s&&v.alignZero===!0&&!v.logarithmic&&v.min===void 0&&v.max===void 0&&n.ignoreYAxisIndexes.indexOf(c)<0&&we.isNumber(d)&&we.isNumber(f)?a.push({ai:c,minY:d,maxY:f}):(this.setYScaleForIndex(c,d,f),l.forEach(y=>{o[y]=n.yAxisScale[c].niceMin,r[y]=n.yAxisScale[c].niceMax}))}else this.setYScaleForIndex(c,0,-Number.MAX_VALUE)}),a.length>=2){a.forEach(u=>{this.setYScaleForIndex(u.ai,u.minY,u.maxY),i[u.ai].forEach(d=>{o[d]=n.yAxisScale[u.ai].niceMin,r[d]=n.yAxisScale[u.ai].niceMax})});let l=0;a.forEach(u=>{const d=n.yAxisScale[u.ai],f=d.niceMax-d.niceMin;if(f>0){const h=-d.niceMin/f;h>l&&(l=h)}}),l>1&&(l=1),l<0&&(l=0);const c=u=>{if(u<=0)return 1;const d=Math.floor(Math.log10(u)),f=Math.pow(10,d),h=u/f;let p;return h<=1+1e-9?p=1:h<=2+1e-9?p=2:h<=2.5+1e-9?p=2.5:h<=5+1e-9?p=5:p=10,p*f};a.forEach(u=>{const d=n.yAxisScale[u.ai];if(!d.result||d.result.length<2)return;const f=d.niceMax-d.niceMin;if(f<=0)return;const h=-d.niceMin/f;if(Math.abs(h-l)<=1e-9)return;const p=hl&&l>1e-9;if(!p&&!g)return;const m=p?-l*d.niceMax/(1-l):d.niceMin,v=g?-d.niceMin*(1-l)/l:d.niceMax,b=v-m;if(b<=0)return;const y=Math.max(d.result.length,5),w=c(b/Math.max(y-1,1));if(w<=0)return;let x,$;if(p){x=Math.floor(m/w+1e-9)*w;const S=l>1e-9?x*(l-1)/l:d.niceMax,_=Math.max(S,d.niceMax);$=Math.ceil(_/w-1e-9)*w}else{$=Math.ceil(v/w-1e-9)*w;const S=l<1-1e-9?-l*$/(1-l):d.niceMin,_=Math.min(S,d.niceMin);x=Math.floor(_/w+1e-9)*w}d.result=[];for(let S=x;S<=$+w*1e-9;S=we.preciseAddition(S,w))d.result.push(we.stripNumber(S,7));d.niceMin=x,d.niceMax=$,i[u.ai].forEach(S=>{o[S]=d.niceMin,r[S]=d.niceMax})})}else if(a.length===1){const l=a[0];this.setYScaleForIndex(l.ai,l.minY,l.maxY),i[l.ai].forEach(c=>{o[c]=n.yAxisScale[l.ai].niceMin,r[c]=n.yAxisScale[l.ai].niceMax})}}},Tg=class{constructor(e){this.w=e,this.scales=new fF(this.w)}init(){this.setYRange(),this.setXRange(),this.setZRange()}_xPixelTolerance(e){const n=this.w.layout.gridWidth;if(!n||!e||!e.length)return 0;const i=this.w.config.xaxis,o=typeof i.min=="number"?i.min:e[0],r=typeof i.max=="number"?i.max:e[e.length-1];return r>o?(r-o)/n:0}_autoScaleYEnabled(){var e;const n=this.w.config,i=(e=this.w.globals.brushSource)==null?void 0:e.w.config.chart.brush;return!!(n.chart.zoom.enabled&&n.chart.zoom.autoScaleYaxis||i!=null&&i.enabled&&(i!=null&&i.autoScaleYaxis))}_autoScaleXBounds(e){const n=this.w.config.xaxis;if(!n.min&&!n.max)return null;const i=this._xPixelTolerance(this.w.seriesData.seriesX[e]);return{lo:n.min?n.min-i:-1/0,hi:n.max?n.max+i:1/0}}getMinYMaxY(e,n=Number.MAX_VALUE,i=-Number.MAX_VALUE,o=null){var r,a,s,l,c,u,d,f;const h=this.w.config,p=this.w.globals;let g=-Number.MAX_VALUE,m=Number.MIN_VALUE;o===null&&(o=e+1);const v=this.w.seriesData.series;let b=v,y=v;h.chart.type==="candlestick"?(b=this.w.candleData.seriesCandleL,y=this.w.candleData.seriesCandleH):h.chart.type==="boxPlot"?(b=this.w.candleData.seriesCandleO,y=this.w.candleData.seriesCandleC):h.chart.type==="violin"?(b=this.w.violinData.seriesViolinMin,y=this.w.violinData.seriesViolinMax):this.w.axisFlags.isRangeData&&(b=this.w.rangeData.seriesRangeStart,y=this.w.rangeData.seriesRangeEnd);let w=!1,x=!1;this.w.seriesData.seriesX.length>=o&&this._autoScaleYEnabled()&&!this._ignoreAutoScaleWindow&&(w=!0);for(let $=e;$typeof T<"u").length),this.w.labelData.labels.length&&h.xaxis.type!=="datetime"&&this.w.seriesData.series.reduce((T,M)=>T+M.length,0)!==0&&(p.dataPoints=Math.max(p.dataPoints,this.w.labelData.labels.length));let _=0,P=v[$].length-1;if(w){const T=this.w.seriesData.seriesX[$],M=this._autoScaleXBounds($);if(M&&h.xaxis.min)for(;__&&T[P]>M.hi;P--);M&&T&&T.length&&(T[_]>=M.lo&&T[_]<=M.hi||(T[0]M.hi&&_>0?(P=_,_=P-1):(_=0,P=-1,x=!0)))}if(b===v&&y===v&&h.chart.type!=="boxPlot"&&S!=="candlestick"&&S!=="boxPlot"&&S!=="violin"&&S!=="rangeArea"&&S!=="rangeBar"&&!(this.w.seriesData.seriesGoals[$]&&this.w.seriesData.seriesGoals[$].length)){const T=v[$],M=Math.min(P,T.length-1),I=(r=this.w.seriesData._parsedExtrema)==null?void 0:r[$];if(I&&I.ref===T&&I.len===T.length&&_===0&&M===T.length-1)I.maxY>g&&(g=I.maxY),I.lowestYp.yValueDecimal&&(p.yValueDecimal=I.yDec),I.hasNulls&&(p.hasNullValues=!0);else{let k=p.yValueDecimal,E=!1;for(let R=_;R<=M;R++){const D=T[R];if(D!==null&&typeof D=="number"&&D===D&&D!==1/0&&D!==-1/0){if(D>g&&(g=D),DD&&D<0&&(m=D),!Number.isInteger(D)){const F=D<0?-D:D;if(F>=1e-6&&F<1e21){const N=""+D,B=N.indexOf("."),z=B===-1?0:N.length-B-1;z>k&&(k=z)}else{const N=we.noExponents(D);we.isFloat(N)&&(k=Math.max(k,N.toString().split(".")[1].length))}}}else E=!0}p.yValueDecimal=k,E&&(p.hasNullValues=!0)}i=g,(S==="bar"||S==="column")&&(m<0&&g<0&&(g=0,i=Math.max(i,0)),m===Number.MIN_VALUE&&(m=0,n=Math.min(n,0)));continue}for(let T=_;T<=P&&T{g=Math.max(g,I.value),n=Math.min(n,I.value)}),this.w.config.chart.type==="boxPlot"||S==="boxPlot"){const I=(u=(c=this.w.candleData.seriesBoxPoints)==null?void 0:c[$])==null?void 0:u[T];if(I)for(let k=0;k((d=b[$])==null?void 0:d[T])&&((f=b[$])==null?void 0:f[T])<0&&(m=b[$][T])}else p.hasNullValues=!0}(S==="bar"||S==="column")&&(m<0&&g<0&&(g=0,i=Math.max(i,0)),m===Number.MIN_VALUE&&(m=0,n=Math.min(n,0)))}if(h.chart.type==="rangeBar"&&this.w.rangeData.seriesRangeStart.length&&p.isBarHorizontal&&(m=n),h.chart.type==="bar"&&(m<0&&g<0&&(g=0),m===Number.MIN_VALUE&&(m=0)),x&&g===-Number.MAX_VALUE){this._ignoreAutoScaleWindow=!0;try{return this.getMinYMaxY(e,Number.MAX_VALUE,-Number.MAX_VALUE,o)}finally{this._ignoreAutoScaleWindow=!1}}return{minY:m,maxY:g,lowestY:n,highestY:i}}setYRange(){const e=this.w.globals,n=this.w.config;e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE;let i=Number.MAX_VALUE,o;if(e.isMultipleYAxis){i=Number.MAX_VALUE;for(let r=0;r{r.max!==void 0&&(typeof r.max=="number"?e.maxYArr[a]=r.max:typeof r.max=="function"&&(e.maxYArr[a]=r.max(e.isMultipleYAxis?e.maxYArr[a]:e.maxY)),e.maxY=e.maxYArr[a]),r.min!==void 0&&(typeof r.min=="number"?e.minYArr[a]=r.min:typeof r.min=="function"&&(e.minYArr[a]=r.min(e.isMultipleYAxis?e.minYArr[a]===Number.MIN_VALUE?0:e.minYArr[a]:e.minY)),e.minY=e.minYArr[a])}),e.isBarHorizontal&&["min","max"].forEach(a=>{n.xaxis[a]!==void 0&&typeof n.xaxis[a]=="number"&&(a==="min"?e.minY=n.xaxis[a]:e.maxY=n.xaxis[a])}),e.isMultipleYAxis?(this.scales.scaleMultipleYAxes(),e.minY=i):(this.scales.setYScaleForIndex(0,e.minY,e.maxY),e.minY=e.yAxisScale[0].niceMin,e.maxY=e.yAxisScale[0].niceMax,e.minYArr[0]=e.minY,e.maxYArr[0]=e.maxY),e.barGroups=[],e.lineGroups=[],e.areaGroups=[],n.series.forEach(r=>{const a=r;switch(a.type||n.chart.type){case"bar":case"column":e.barGroups.push(a.group);break;case"line":e.lineGroups.push(a.group);break;case"area":e.areaGroups.push(a.group);break}}),e.barGroups=e.barGroups.filter((r,a,s)=>s.indexOf(r)===a),e.lineGroups=e.lineGroups.filter((r,a,s)=>s.indexOf(r)===a),e.areaGroups=e.areaGroups.filter((r,a,s)=>s.indexOf(r)===a),{minY:e.minY,maxY:e.maxY,minYArr:e.minYArr,maxYArr:e.maxYArr,yAxisScale:e.yAxisScale}}setXRange(){const e=this.w.globals,n=this.w.config,i=n.xaxis.type==="numeric"||n.xaxis.type==="datetime"||n.xaxis.type==="category"&&!this.w.axisFlags.noLabelsProvided||this.w.axisFlags.noLabelsProvided||this.w.axisFlags.isXNumeric,o=()=>{var r;let a=e.minX,s=e.maxX;for(let l=0;ls&&(s=u.maxX),u.minXs&&(s=f),fArray.isArray(d)?d.reduce((f,h)=>Math.max(f,String(h).length),u):u,0),c=e.dataPoints*l*s*.6<=e.svgWidth;(n.xaxis.type==="numeric"||a&&c)&&e.dataPoints<30&&(r=e.dataPoints-1),r>e.dataPoints&&e.dataPoints!==0&&(r=e.dataPoints-1)}else if(n.xaxis.tickAmount==="dataPoints"){if(this.w.seriesData.series.length>1&&(r=this.w.seriesData.series[e.maxValsInArrayIndex].length-1),this.w.axisFlags.isXNumeric){const a=Math.round(e.maxX-e.minX);a<30&&(r=a)}}else r=n.xaxis.tickAmount;if(e.xTickAmount=r,n.xaxis.max!==void 0&&typeof n.xaxis.max=="number"&&(e.maxX=n.xaxis.max),n.xaxis.min!==void 0&&typeof n.xaxis.min=="number"&&(e.minX=n.xaxis.min),n.xaxis.range!==void 0&&(e.minX=e.maxX-n.xaxis.range),e.minX!==Number.MAX_VALUE&&e.maxX!==-Number.MAX_VALUE)if(n.xaxis.convertedCatToNumeric&&!this.w.axisFlags.dataFormatXNumeric){const a=[];for(let s=e.minX-1;s0&&(e.xAxisScale=this.scales.linearScale(1,this.w.labelData.labels.length,r-1,0,n.xaxis.stepSize),this.w.seriesData.seriesX=this.w.labelData.labels.slice());i&&(this.w.labelData.labels=e.xAxisScale.result.slice())}return e.isBarHorizontal&&this.w.labelData.labels.length&&(e.xTickAmount=this.w.labelData.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:e.minX,maxX:e.maxX}}setZRange(){var e;const n=this.w.globals;if(!this.w.axisFlags.isDataXYZ)return;for(let o=0;on.maxZ&&(n.maxZ=i.maxZ)}_handleSingleDataPoint(){const e=this.w.globals,n=this.w.config;if(e.minX===e.maxX){const i=new Ei(this.w);if(n.xaxis.type==="datetime"){const o=i.getDate(e.minX);n.xaxis.labels.datetimeUTC?o.setUTCDate(o.getUTCDate()-2):o.setDate(o.getDate()-2),e.minX=new Date(o).getTime();const r=i.getDate(e.maxX);n.xaxis.labels.datetimeUTC?r.setUTCDate(r.getUTCDate()+2):r.setDate(r.getDate()+2),e.maxX=new Date(r).getTime()}else(n.xaxis.type==="numeric"||n.xaxis.type==="category"&&!this.w.axisFlags.noLabelsProvided)&&(e.minX=e.minX-2,e.initialMinX=e.minX,e.maxX=e.maxX+2,e.initialMaxX=e.maxX)}}_getMinXDiff(){const e=this.w.globals;this.w.axisFlags.isXNumeric&&this.w.seriesData.seriesX.forEach((n,i)=>{var o;if(n.length){n.length===1&&n.push(this.w.seriesData.seriesX[e.maxValsInArrayIndex][this.w.seriesData.seriesX[e.maxValsInArrayIndex].length-1]);const r=(o=this.w.seriesData._parsedExtrema)==null?void 0:o[i];if(r&&r.xNumeric&&r.xSorted&&r.xref===n&&r.len===n.length){r.minXDiff0)uc-u),l.forEach((c,u)=>{if(u>0){const d=c-l[u-1];d>0&&(e.minXDiff=Math.min(d,e.minXDiff))}}),(e.dataPoints===1||e.minXDiff===Number.MAX_VALUE)&&(e.minXDiff=.5)}})}_setStackedMinMax(){const e=this.w.globals,n=this._autoScaleYEnabled();if(!this.w.seriesData.series.length)return;let i=this.w.labelData.seriesGroups;i.length||(i=[this.w.seriesData.seriesNames.map(a=>a)]);const o={},r={};i.forEach(a=>{o[a]=[],r[a]=[],this.w.config.series.map((l,c)=>a.indexOf(this.w.seriesData.seriesNames[c])>-1?c:null).filter(l=>l!==null).forEach(l=>{var c,u,d,f;const h=n?this._autoScaleXBounds(l):null,p=this.w.seriesData.seriesX[l],g=!!(h&&p&&p.length);for(let m=0;mh.hi))continue;typeof o[a][m]>"u"&&(o[a][m]=0,r[a][m]=0),(this.w.config.chart.stacked&&!e.comboCharts||this.w.config.chart.stacked&&e.comboCharts&&(!this.w.config.chart.stackOnlyBar||((u=(c=this.w.config.series)==null?void 0:c[l])==null?void 0:u.type)==="bar"||((f=(d=this.w.config.series)==null?void 0:d[l])==null?void 0:f.type)==="column"))&&this.w.seriesData.series[l][m]!==null&&we.isNumber(this.w.seriesData.series[l][m])&&(this.w.seriesData.series[l][m]>0?o[a][m]+=parseFloat(String(this.w.seriesData.series[l][m]))+1e-4:r[a][m]+=parseFloat(String(this.w.seriesData.series[l][m])))}})}),Object.entries(o).forEach(([a])=>{o[a].forEach((s,l)=>{e.maxY=Math.max(e.maxY,o[a][l]),e.minY=Math.min(e.minY,r[a][l])})})}};function Og(){return{palette1:["#008FFB","#00A86F","#CA8501","#FF4560","#846DD5"],palette2:["#6978CB","#039DE2","#49A84D","#B39105","#D68000"],palette3:["#209FCC","#648291","#D4526E","#0FA783","#A19285"],palette4:["#2FA59D","#73A20B","#099DE1","#FD5D5D","#648291"],palette5:["#2B908F","#F56566","#2EAB16","#FA4443","#1EA2BD"],palette6:["#449DD1","#F86624","#EA3A4A","#9C63D1","#899E2A"],palette7:["#DF475B","#1B998B","#7E75B7","#F46036","#B1911B"],palette8:["#9C63D1","#F86624","#B38F04","#EA3A4A","#2FA2B3"],palette9:["#98776F","#A19285","#A8705E","#BA6560","#A0927F"],palette10:["#C91EFF","#A94BFD","#6C6AFE","#2983FF","#009ED8"],cvdDeuteranopia:["#0072B2","#E69F00","#56B4E9","#009E73","#F0E442","#D55E00","#CC79A7"],cvdProtanopia:["#0077BB","#EE7733","#009988","#EE3377","#BBBBBB","#33BBEE","#CC3311"],cvdTritanopia:["#CC3311","#009988","#EE7733","#0077BB","#EE3377","#BBBBBB","#33BBEE"],highContrast:["#005A9C","#C00000","#007A33","#6C3483","#7B3F00","#0097A7","#4A235A"]}}let kd=class{constructor(e,{theme:n=null,timeScale:i=null}={},o){this.w=e,this.elgrid=o,this.xaxisFontSize=e.config.xaxis.labels.style.fontSize,this.axisFontFamily=e.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=e.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal=e.config.chart.type==="bar"&&e.config.plotOptions.bar.horizontal,this.xAxisoffX=e.config.xaxis.position==="bottom"?e.layout.gridHeight:0,this.drawnLabels=[],this.axesUtils=new Hs(e,{theme:n,timeScale:i})}drawYaxis(e){const n=this.w,i=new it(this.w),o=n.config.yaxis[e].labels.style,{fontSize:r,fontFamily:a,fontWeight:s}=o,l=i.group({class:"apexcharts-yaxis",rel:e,transform:`translate(${n.globals.translateYAxisX[e]}, 0)`});if(this.axesUtils.isYAxisHidden(e))return l;const c=i.group({class:"apexcharts-yaxis-texts-g"});l.add(c);const u=n.globals.yAxisScale[e].result.length-1,d=n.layout.gridHeight/u,f=n.formatters.yLabelFormatters[e],h=this.axesUtils.checkForReversedLabels(e,n.globals.yAxisScale[e].result.slice());let p=1;if(n.config.chart.type==="heatmap"&&!n.config.yaxis[e].labels.formatter){const g=parseInt(r,10)||11,m=Math.max(1,Math.floor(n.layout.gridHeight/(g*1.4))),v=u+1;v>m&&(p=Math.ceil(v/m))}if(n.config.yaxis[e].labels.show){let g=n.layout.translateY+n.config.yaxis[e].labels.offsetY;n.globals.isBarHorizontal?g=0:n.config.chart.type==="heatmap"&&(g-=d/2),g+=parseInt(r,10)/3;let m=null;for(let v=u;v>=0;v--){const y=p>1&&v%p!==0?"":f(h[v],v,n);let w=n.config.yaxis[e].labels.padding;n.config.yaxis[e].opposite&&n.config.yaxis.length!==0&&(w*=-1);const x=this.getTextAnchor(n.config.yaxis[e].labels.align,n.config.yaxis[e].opposite),$=this.axesUtils.getYAxisForeColor(o.colors,e),S=Array.isArray($)?$[v]:$,_=Array.from(n.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${e}'] .apexcharts-yaxis-label tspan`)).map(O=>O.textContent),P=i.drawText({x:w,y:g,text:_.includes(y)&&!n.config.yaxis[e].labels.showDuplicates?"":y,textAnchor:x,fontSize:r,fontFamily:a,fontWeight:s,maxWidth:n.config.yaxis[e].labels.maxWidth,foreColor:S,isPlainText:!1,cssClass:`apexcharts-yaxis-label ${o.cssClass}`});c.add(P),this.addTooltip(P,y),m===null&&(m=P),n.config.yaxis[e].labels.rotate!==0&&this.rotateLabel(i,P,m,n.config.yaxis[e].labels.rotate),g+=d}}return this.addYAxisTitle(i,l,e),this.addAxisBorder(i,l,e,u,d),l}getTextAnchor(e,n){return e==="left"?"start":e==="center"?"middle":e==="right"?"end":n?"start":"end"}addTooltip(e,n){const i=nt.createElementNS(Wt,"title");i.textContent=Array.isArray(n)?n.join(" "):n,e.node.appendChild(i)}rotateLabel(e,n,i,o){const r=e.rotateAroundCenter(i.node),a=e.rotateAroundCenter(n.node);n.node.setAttribute("transform",`rotate(${o} ${r.x} ${a.y})`)}addYAxisTitle(e,n,i){const o=this.w;if(o.config.yaxis[i].title.text!==void 0){const r=e.group({class:"apexcharts-yaxis-title"}),a=o.config.yaxis[i].opposite?o.globals.translateYAxisX[i]:0,s=e.drawText({x:a,y:o.layout.gridHeight/2+o.layout.translateY+o.config.yaxis[i].title.offsetY,text:o.config.yaxis[i].title.text,textAnchor:"end",foreColor:o.config.yaxis[i].title.style.color,fontSize:o.config.yaxis[i].title.style.fontSize,fontWeight:o.config.yaxis[i].title.style.fontWeight,fontFamily:o.config.yaxis[i].title.style.fontFamily,cssClass:`apexcharts-yaxis-title-text ${o.config.yaxis[i].title.style.cssClass}`});r.add(s),n.add(r)}}addAxisBorder(e,n,i,o,r){const a=this.w,s=a.config.yaxis[i].axisBorder;let l=31+s.offsetX;if(a.config.yaxis[i].opposite&&(l=-31-s.offsetX),s.show){const c=e.drawLine(l,a.layout.translateY+s.offsetY-2,l,a.layout.gridHeight+a.layout.translateY+s.offsetY+2,s.color,0,s.width);n.add(c)}a.config.yaxis[i].axisTicks.show&&this.axesUtils.drawYAxisTicks(l,o,s,a.config.yaxis[i].axisTicks,i,r,n)}drawYaxisInversed(e){const n=this.w,i=new it(this.w),o=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),r=i.group({class:"apexcharts-xaxis-texts-g",transform:`translate(${n.layout.translateXAxisX}, ${n.layout.translateXAxisY})`});o.add(r);let a=n.globals.yAxisScale[e].result.length-1;const s=n.layout.gridWidth/a+.1;let l=s+n.config.xaxis.labels.offsetX;const c=n.formatters.xLabelFormatter;let u=this.axesUtils.checkForReversedLabels(e,n.globals.yAxisScale[e].result.slice());const d=n.labelData.timescaleLabels;if(d.length>0&&(this.xaxisLabels=d.slice(),u=d.slice(),a=u.length),n.config.xaxis.labels.show)for(let f=d.length?0:a;d.length?f=0;d.length?f++:f--){let h=c==null?void 0:c(u[f],f,n),p=n.layout.gridWidth+n.globals.padHorizontal-(l-s+n.config.xaxis.labels.offsetX);if(d.length){const m=this.axesUtils.getLabel(u,d,p,f,this.drawnLabels,this.xaxisFontSize);p=m.x,h=m.text,this.drawnLabels.push(m.text),f===0&&n.globals.skipFirstTimelinelabel&&(h=""),f===u.length-1&&n.globals.skipLastTimelinelabel&&(h="")}const g=i.drawText({x:p,y:this.xAxisoffX+n.config.xaxis.labels.offsetY+30-(n.config.xaxis.position==="top"?n.layout.xAxisHeight+n.config.xaxis.axisTicks.height-2:0),text:h,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[e]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.axisFontFamily,fontWeight:n.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:`apexcharts-xaxis-label ${n.config.xaxis.labels.style.cssClass}`});r.add(g),this.addTooltip(g,h),l+=s}return this.inversedYAxisTitleText(o),this.inversedYAxisBorder(o),o}inversedYAxisBorder(e){const n=this.w,i=new it(this.w),o=n.config.xaxis.axisBorder;if(o.show){let r=0;n.config.chart.type==="bar"&&n.axisFlags.isXNumeric&&(r-=15);const a=i.drawLine(n.globals.padHorizontal+r+o.offsetX,this.xAxisoffX,n.layout.gridWidth,this.xAxisoffX,o.color,0,o.height);this.elgrid&&this.elgrid.elGridBorders&&n.config.grid.show?this.elgrid.elGridBorders.add(a):e.add(a)}}inversedYAxisTitleText(e){const n=this.w,i=new it(this.w);if(n.config.xaxis.title.text!==void 0){const o=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),r=i.drawText({x:n.layout.gridWidth/2+n.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(n.config.xaxis.title.style.fontSize)+n.config.xaxis.title.offsetY+20,text:n.config.xaxis.title.text,textAnchor:"middle",fontSize:n.config.xaxis.title.style.fontSize,fontFamily:n.config.xaxis.title.style.fontFamily,fontWeight:n.config.xaxis.title.style.fontWeight,foreColor:n.config.xaxis.title.style.color,cssClass:`apexcharts-xaxis-title-text ${n.config.xaxis.title.style.cssClass}`});o.add(r),e.add(o)}}yAxisTitleRotate(e,n){const i=this.w,o=new it(this.w),r=i.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${e}'] .apexcharts-yaxis-texts-g`),a=r?r.getBoundingClientRect():{width:0,height:0},s=i.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${e}'] .apexcharts-yaxis-title text`),l=s?s.getBoundingClientRect():{width:0,height:0};if(s){const c=this.xPaddingForYAxisTitle(e,a,l,n);s.setAttribute("x",String(c.xPos-(n?10:0)));const u=o.rotateAroundCenter(s);s.setAttribute("transform",`rotate(${n?i.config.yaxis[e].title.rotate*-1:i.config.yaxis[e].title.rotate} ${u.x} ${u.y})`)}}xPaddingForYAxisTitle(e,n,i,o){const r=this.w;let a=0,s=10;return r.config.yaxis[e].title.text===void 0||e<0?{xPos:a,padd:0}:(o?a=n.width+r.config.yaxis[e].title.offsetX+i.width/2+s/2:(a=n.width*-1+r.config.yaxis[e].title.offsetX+s/2+i.width/2,r.globals.isBarHorizontal&&(s=25,a=n.width*-1-r.config.yaxis[e].title.offsetX-s)),{xPos:a,padd:s})}setYAxisXPosition(e,n){const i=this.w;let o=0,r=0,a=18,s=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.forEach((l,c)=>{const u=i.globals.ignoreYAxisIndexes.includes(c)||!l.show||l.floating||e[c].width===0,d=e[c].width+n[c].width;l.opposite?i.globals.isBarHorizontal?(r=i.layout.gridWidth+i.layout.translateX-1,i.globals.translateYAxisX[c]=r-l.labels.offsetX):(r=i.layout.gridWidth+i.layout.translateX+s,u||(s+=d+20),i.globals.translateYAxisX[c]=r-l.labels.offsetX+20):(o=i.layout.translateX-a,u||(a+=d+20),i.globals.translateYAxisX[c]=o+l.labels.offsetX)})}setYAxisTextAlignments(){const e=this.w;e.config.yaxis.forEach((n,i)=>{if(n&&!n.floating&&n.labels.align!==void 0){const o=e.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${i}'] .apexcharts-yaxis-texts-g`);if(!o)return;const r=Array.from(e.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${i}'] .apexcharts-yaxis-label`)),a=o.getBoundingClientRect();r.forEach(s=>{s.setAttribute("text-anchor",n.labels.align)}),n.labels.align==="left"&&!n.opposite?o.setAttribute("transform",`translate(-${a.width}, 0)`):n.labels.align==="center"?o.setAttribute("transform",`translate(${a.width/2*(n.opposite?1:-1)}, 0)`):n.labels.align==="right"&&n.opposite&&o.setAttribute("transform",`translate(${a.width}, 0)`)}})}},hF=class{constructor(e,n){this.w=e,this.ctx=n,this.documentEvent=this.documentEvent.bind(this)}addEventListener(e,n){const i=this.w;Object.prototype.hasOwnProperty.call(i.globals.events,e)?i.globals.events[e].push(n):i.globals.events[e]=[n]}removeEventListener(e,n){const i=this.w;if(!Object.prototype.hasOwnProperty.call(i.globals.events,e))return;const o=i.globals.events[e].indexOf(n);o!==-1&&i.globals.events[e].splice(o,1)}fireEvent(e,n){const i=this.w;if(!Object.prototype.hasOwnProperty.call(i.globals.events,e))return;(!n||!n.length)&&(n=[]);const o=i.globals.events[e],r=o.length;for(let a=0;a{i==null||i.addEventListener(o,r=>{const a=r.target.getAttribute("i")===null&&e.interact.capturedSeriesIndex!==-1?e.interact.capturedSeriesIndex:r.target.getAttribute("i"),s=r.target.getAttribute("j")===null&&e.interact.capturedDataPointIndex!==-1?e.interact.capturedDataPointIndex:r.target.getAttribute("j"),l=Object.assign({},e,{seriesIndex:e.globals.axisCharts?a:0,dataPointIndex:s});r.type==="keydown"?e.config.chart.accessibility.enabled&&e.config.chart.accessibility.keyboard.enabled&&(n.ctx.keyboardNavigation&&n.ctx.keyboardNavigation.handleKey(r),typeof e.config.chart.events.keyDown=="function"&&e.config.chart.events.keyDown(r,n,l),n.ctx.events.fireEvent("keydown",[r,n,l])):r.type==="keyup"?e.config.chart.accessibility.enabled&&e.config.chart.accessibility.keyboard.enabled&&(typeof e.config.chart.events.keyUp=="function"&&e.config.chart.events.keyUp(r,n,l),n.ctx.events.fireEvent("keyup",[r,n,l])):r.type==="mousemove"||r.type==="touchmove"?typeof e.config.chart.events.mouseMove=="function"&&e.config.chart.events.mouseMove(r,n,l):r.type==="mouseleave"||r.type==="touchleave"?typeof e.config.chart.events.mouseLeave=="function"&&e.config.chart.events.mouseLeave(r,n,l):(r.type==="mouseup"&&r.which===1||r.type==="touchend")&&(typeof e.config.chart.events.click=="function"&&e.config.chart.events.click(r,n,l),n.ctx.events.fireEvent("click",[r,n,l]))},{capture:!1,passive:!0})}),this.ctx.eventList.forEach(o=>{e.dom.baseEl.addEventListener(o,this.documentEvent,{passive:!0})}),this.ctx.core.setupBrushHandler()}documentEvent(e){const n=this.w,i=e.target.className;if(e.type==="click"){const o=n.dom.baseEl.querySelector(".apexcharts-menu");o&&o.classList.contains("apexcharts-menu-open")&&i!=="apexcharts-menu-icon"&&o.classList.remove("apexcharts-menu-open")}n.interact.clientX=e.type==="touchmove"?e.touches[0].clientX:e.clientX,n.interact.clientY=e.type==="touchmove"?e.touches[0].clientY:e.clientY}},pF=class{constructor(e){this.w=e}setCurrentLocaleValues(e){let n=this.w.config.chart.locales;const i=Ge.getApex();i.chart&&i.chart.locales&&i.chart.locales.length>0&&(n=this.w.config.chart.locales.concat(i.chart.locales));const o=n.filter(r=>r.name===e)[0];if(o){const r=we.extend(q5,o);this.w.globals.locale=r.options}else throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options")}},gF=class{constructor(e,n){this.w=e,this.ctx=n}drawAxis(e,n){const i=this.w.globals,o=this.w.config,r=new Ws(this.w,this.ctx,n),a=new kd(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale},n);if(i.axisCharts&&e!=="radar"){let s,l;i.isBarHorizontal?(l=a.drawYaxisInversed(0),s=r.drawXaxisInversed(0),this.w.dom.elGraphical.add(s),this.w.dom.elGraphical.add(l)):(s=r.drawXaxis(),this.w.dom.elGraphical.add(s),o.yaxis.map((c,u)=>{if(i.ignoreYAxisIndexes.indexOf(u)===-1&&(l=a.drawYaxis(u),this.w.dom.Paper.add(l),this.w.config.grid.position==="back")){const d=this.w.dom.Paper.children()[1];d&&(d.remove(),this.w.dom.Paper.add(d))}}))}}},Eg=class{constructor(e){this.w=e}drawXCrosshairs(){const e=this.w;e.dom.elGraphical.node.querySelectorAll(":scope > .apexcharts-xcrosshairs").forEach(w=>w.remove());const n=new it(this.w),i=new zi(this.w),o=e.config.xaxis.crosshairs.fill.gradient,r=e.config.xaxis.crosshairs.dropShadow,a=e.config.xaxis.crosshairs.fill.type,s=o.colorFrom,l=o.colorTo,c=o.opacityFrom,u=o.opacityTo,d=o.stops,f="none",h=r.enabled,p=r.left,g=r.top,m=r.blur,v=r.color,b=r.opacity;let y=e.config.xaxis.crosshairs.fill.color;if(e.config.xaxis.crosshairs.show){a==="gradient"&&(y=n.drawGradient("vertical",s,l,c,u,null,d,[]));let w=e.config.xaxis.crosshairs.width===1?n.drawLine(0,0,0,0):n.drawRect(),x=e.layout.gridHeight;(!we.isNumber(x)||x<0)&&(x=0);let $=e.config.xaxis.crosshairs.width;(!we.isNumber($)||Number($)<0)&&($=0),w.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:x,width:$,height:x,fill:y,filter:f,"fill-opacity":e.config.xaxis.crosshairs.opacity,stroke:e.config.xaxis.crosshairs.stroke.color,"stroke-width":e.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":e.config.xaxis.crosshairs.stroke.dashArray}),h&&(w=i.dropShadow(w,{left:p,top:g,blur:m,color:v,opacity:b})),e.dom.elGraphical.add(w)}}drawYCrosshairs(){const e=this.w;e.dom.elGraphical.node.querySelectorAll(":scope > .apexcharts-ycrosshairs, :scope > .apexcharts-ycrosshairs-hidden").forEach(a=>a.remove());const n=new it(this.w),i=e.config.yaxis[0].crosshairs,o=e.globals.barPadForNumericAxis;if(e.config.yaxis[0].crosshairs.show){const a=n.drawLine(-o,0,e.layout.gridWidth+o,0,i.stroke.color,i.stroke.dashArray,i.stroke.width);a.attr({class:"apexcharts-ycrosshairs"}),e.dom.elGraphical.add(a)}const r=n.drawLine(-o,0,e.layout.gridWidth+o,0,i.stroke.color,0,0);r.attr({class:"apexcharts-ycrosshairs-hidden"}),e.dom.elGraphical.add(r)}};function mF(t,e){if(!we.isObject(t)||!we.isObject(e))return e!==void 0?e:t;const n=Je({},t);for(const i of Object.keys(e)){const o=e[i];o!==void 0&&(we.isObject(o)&&we.isObject(t[i])?n[i]=mF(t[i],o):n[i]=o)}return n}let vF=class{constructor(e){this.w=e,this._activeBreakpoint=null}checkResponsiveConfig(e){const n=this.w,i=n.config;if(i.responsive.length===0)return;const o=i.responsive.slice();o.sort((s,l)=>s.breakpoint>l.breakpoint?1:l.breakpoint>s.breakpoint?-1:0).reverse();const r=new mc({}),a=(s={})=>{var l;const c=o[0].breakpoint,u=Ge.isBrowser()?window.innerWidth>0?window.innerWidth:screen.width:0;if(u>c){if(this._activeBreakpoint!==null){if(!n.globals.initialConfig)return;const d=we.clone(n.globals.initialConfig);d.series=we.clone(n.config.series);const f=Xi.extendArrayProps(r,d,n);s=we.extend(f,s),this.overrideResponsiveOptions(s),this._activeBreakpoint=null}}else for(let d=0;dmF(p,h[g]))})}this.overrideResponsiveOptions(s),this._activeBreakpoint=o[d].breakpoint}};if(e){let s=Xi.extendArrayProps(r,e,n);s=we.extend(n.config,s),s=we.extend(s,e),a(s)}else a({})}overrideResponsiveOptions(e){const n=new mc(e).init({responsiveOverride:!0});this.w.config=n}};function Sye(t){var e,n,i;const o=t.globals;if(o.streamScrolled=!1,!o.axisCharts||!t.seriesData||!Array.isArray(t.seriesData.series)||t.seriesData.series.length===0){o.prevStreamFrame=null;return}const r=[];(n=(e=t.dom)==null?void 0:e.baseEl)!=null&&n.querySelectorAll&&t.dom.baseEl.querySelectorAll(".apexcharts-marker").forEach(a=>{var s,l,c,u,d;const f=parseInt((s=a.getAttribute("index"))!=null?s:"",10),h=parseInt((c=(l=a.getAttribute("j"))!=null?l:a.getAttribute("rel"))!=null?c:"",10),p=parseFloat((d=(u=a.getAttribute("r"))!=null?u:a.getAttribute("default-marker-size"))!=null?d:"");isFinite(f)&&isFinite(h)&&isFinite(p)&&((r[f]=r[f]||[])[h]=p)}),o.prevStreamFrame={seriesX:(t.seriesData.seriesX||[]).slice(),seriesY:t.seriesData.series.slice(),xPixels:(o.seriesXvalues||[]).slice(),yPixels:(o.seriesYvalues||[]).slice(),rPixels:r,labels:(o.labels||[]).slice(),isXNumeric:!!((i=t.axisFlags)!=null&&i.isXNumeric)}}function Cye(t,e){const n=e.config.chart.streaming;if(!n||!n.enabled)return;const i=n.maxPoints,o=e.config.xaxis.range,r=a=>a==null?null:Array.isArray(a)?typeof a[0]=="number"?a[0]:null:typeof a=="object"&&typeof a.x=="number"?a.x:null;t.forEach(a=>{var s;const l=a==null?void 0:a.data;if(!Array.isArray(l)||l.length<2)return;if(typeof i=="number"&&i>0){l.length>i&&(a.data=l.slice(l.length-i));return}if(!o)return;const c=r(l[l.length-1]),u=r(l[0]);if(c==null||u==null||c<=u)return;const d=(c-u)/(l.length-1),f=c-o-2*d;let h=0;for(;h0&&(a.data=l.slice(h))})}function qC(t){var e;const n=t.config.chart.animations;if(!n||n.enabled===!1||!n.dynamicAnimation||n.dynamicAnimation.enabled===!1)return!1;const i=(e=n.largeDatasetThreshold)!=null?e:0;return i>0&&t.globals.dataPoints>i?!1:!!(Ge.isBrowser()&&t.globals.dataChanged&&t.globals.shouldAnimate)}function $ye(t,e,n){var i,o,r,a;if((i=t.axisFlags)!=null&&i.isXNumeric){const l=(r=(o=t.seriesData)==null?void 0:o.seriesX)==null?void 0:r[e];if(l&&l.length&&l[n]!=null)return"x:"+l[n]}const s=(a=t.globals.labels)==null?void 0:a[n];return s!=null&&String(s)!==""?"c:"+(Array.isArray(s)?s.join(" "):String(s)):"j:"+n}function Aye(t,e,n){var i,o;if(t.isXNumeric){const a=(i=t.seriesX)==null?void 0:i[e];if(a&&a.length&&a[n]!=null)return"x:"+a[n]}const r=(o=t.labels)==null?void 0:o[n];return r!=null&&String(r)!==""?"c:"+(Array.isArray(r)?r.join(" "):String(r)):"j:"+n}function _ye(t,e){const n=new Map;t.forEach((c,u)=>{n.has(c)||n.set(c,u)});const i=new Array(e.length),o=new Set;let r=-1,a=!0,s=t.length===e.length;e.forEach((c,u)=>{const d=n.has(c)&&!o.has(n.get(c))?n.get(c):-1;i[u]=d,d!==-1&&(o.add(d),d{const i=e.get(n)||0;return e.set(n,i+1),i===0?n:`${n}#${i}`})}function Pye(t,e,n=!1,i=!1){var o,r;if(!qC(t))return null;const a=t.globals.prevStreamFrame;if(!a)return null;const s=(o=a.seriesY)==null?void 0:o[e],l=(r=t.seriesData.series)==null?void 0:r[e];if(!Array.isArray(s)||!Array.isArray(l)||!s.length||!l.length)return null;const c=dE(s.map((f,h)=>Aye(a,e,h))),u=dE(l.map((f,h)=>$ye(t,e,h))),d=_ye(c,u);return!d.ordered&&!i||!d.changed&&!n?null:{join:d,oldKeys:c,newKeys:u}}function bF(t){var e,n;const i=t.config.chart.animations;return Ag((n=(e=i.dynamicAnimation)==null?void 0:e.easing)!=null?n:i.easing)}function sl(t,e,n,i,o){const r=performance.now(),a=s=>{if(t.globals.isDestroyed)return;const l=Math.max(0,Math.min(1,(s-r)/e));i(n(l),l),l<1?nt.requestAnimationFrame(a):o&&o()};nt.requestAnimationFrame(a)}function fE(t,e,n){return[...t.querySelectorAll(e)].map(i=>{var o,r,a;return{text:i.textContent||"",display:(a=(r=(o=i.querySelector("tspan"))==null?void 0:o.textContent)!=null?r:i.textContent)!=null?a:"",pos:parseFloat(i.getAttribute(n)||""),transform:i.getAttribute("transform")}})}function hE(t,e,n){return[...t.querySelectorAll(e)].map(i=>parseFloat(i.getAttribute(n)||""))}const bv=":not(.apexcharts-tick-ghost)",yF=`.apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)${bv}`,xF=`.apexcharts-yaxis-texts-g text${bv}`,wF=`.apexcharts-gridlines-vertical line${bv}`,SF=`.apexcharts-gridlines-horizontal line${bv}`;function CF(t){var e,n;const i=t.globals;if(!((e=t.axisFlags)!=null&&e.isXNumeric)||i.isBarHorizontal||(n=t.config.xaxis)!=null&&n.reversed)return null;const o=i.minX,r=i.maxX,a=t.layout.gridWidth;return!isFinite(o)||!isFinite(r)||!(r>o)||!(a>0)?null:{min:o,max:r,width:a}}function $F(t,e){var n;const i=t.globals;if(i.isBarHorizontal||!Array.isArray(t.config.yaxis)||t.config.yaxis.length!==1||(n=t.config.yaxis[0])!=null&&n.logarithmic)return null;const o=i.minY,r=i.maxY;if(!isFinite(o)||!isFinite(r)||!(r>o))return null;const a=e.map(s=>s.pos).filter(s=>isFinite(s));return a.length<2?null:{min:o,max:r,pLo:Math.max(...a),pHi:Math.min(...a)}}function Tye(t,e){if(!t||!e)return null;const n=t.max-t.min,i=e.max-e.min;return!(n>0)||!(i>0)||!(t.width>0)||!(e.width>0)?null:{toNew:o=>(t.min+o/t.width*n-e.min)/i*e.width,toOld:o=>(e.min+o/e.width*i-t.min)/n*t.width}}function Oye(t,e){if(!t||!e)return null;const n=t.pHi-t.pLo,i=e.pHi-e.pLo,o=t.max-t.min,r=e.max-e.min;if(!n||!i||!(o>0)||!(r>0))return null;const a=l=>t.min+(l-t.pLo)/n*o,s=l=>e.min+(l-e.pLo)/i*r;return{toNew:l=>e.pLo+(a(l)-e.min)/r*i,toOld:l=>t.pLo+(s(l)-t.min)/o*n}}function Eye(t){const e=t.globals;if(e.prevChromeFrame=null,!e.axisCharts||!Ge.isBrowser())return;const n=t.dom.baseEl;if(we.elementExists(n))try{const i=fE(n,xF,"y");e.prevChromeFrame={xLabels:fE(n,yF,"x"),yLabels:i,vGrid:hE(n,wF,"x1"),hGrid:hE(n,SF,"y1"),xScale:CF(t),yAnchors:$F(t,i)}}catch{e.prevChromeFrame=null}}function pE(t,e,n,i){const o=e.style;o.opacity="0",sl(t,n,i,r=>{o.opacity=String(r)},()=>{o.opacity=""})}function sh(t,e,n,i,o,r,a){n.forEach(s=>e.setAttribute(s,String(i))),sl(t,r,a,s=>{const l=String(i+(o-i)*s);n.forEach(c=>e.setAttribute(c,l))},()=>{n.forEach(s=>e.setAttribute(s,String(o)))})}function gE(t,{template:e,display:n,attrs:i,from:o,to:r,duration:a,ease:s}){const l=e.parentNode;if(!l)return;const c=e.cloneNode(!0);if(c.classList.add("apexcharts-tick-ghost"),c.setAttribute("pointer-events","none"),c.removeAttribute("id"),n!==void 0){const d=c.querySelector("tspan");d?d.textContent=n:c.textContent=n;const f=c.querySelector("title");f&&(f.textContent=n)}i.forEach(d=>c.setAttribute(d,String(o)));const u=c.style;u.opacity="1",l.appendChild(c),sl(t,a,s,d=>{const f=String(o+(r-o)*d);i.forEach(h=>c.setAttribute(h,f)),u.opacity=String(1-d)},()=>{c.parentNode&&c.parentNode.removeChild(c)})}const Mye=20;function mE(t,{newLabels:e,oldLabels:n,posAttr:i,newLines:o,oldLines:r,lineAttrs:a,duration:s,ease:l,project:c}){const u=new Map;n.forEach((x,$)=>{u.has(x.text)||u.set(x.text,wt(Je({},x),{i:$}))});const d=new Set,f=o.length===e.length,h=r.length===n.length,p=n.map(x=>x.pos).concat(e.map(x=>parseFloat(x.getAttribute(i)||""))).filter(x=>isFinite(x)),g=Math.min(...p),m=Math.max(...p),v=Math.max(40,(m-g)*.25),b=x=>Math.max(g-v,Math.min(m+v,x)),y=(x,$)=>{if(!x)return;const S=parseFloat(x.getAttribute(a[0])||""),_=r[$.i];isFinite(S)&&isFinite(_)&&sh(t,x,a,_,S,s,l)};if(e.forEach((x,$)=>{const S=parseFloat(x.getAttribute(i)||""),_=u.get(x.textContent||""),P=f?o[$]:null;_&&d.add(_.i);const O=x.getAttribute("transform");if(!_||!isFinite(_.pos)){if(!_){if(c&&isFinite(S)&&!O){const T=isFinite(c.toOld(S))?b(c.toOld(S)):NaN;isFinite(T)&&Math.abs(T-S)>.5&&(sh(t,x,[i],T,S,s,l),P&&sh(t,P,a,T,S,s,l))}pE(t,x,s,l),P&&pE(t,P,s,l)}return}if(!(!isFinite(S)||Math.abs(_.pos-S)<.5)){if(O||_.transform){const T=_.pos-S;if(isFinite(T)){const M=O||"";sl(t,s,l,I=>{const k=T*(1-I),E=i==="x"?`translate(${k} 0)`:`translate(0 ${k})`;x.setAttribute("transform",`${E} ${M}`.trim())},()=>{M?x.setAttribute("transform",M):x.removeAttribute("transform")})}y(P,_);return}sh(t,x,[i],_.pos,S,s,l),y(P,_)}}),!c||!e.length)return;let w=0;n.forEach((x,$)=>{if(d.has($)||!isFinite(x.pos)||x.transform||w>=Mye)return;const S=c.toNew(x.pos);!isFinite(S)||Math.abs(S-x.pos)<.5||(w++,gE(t,{template:e[0],display:x.display,attrs:[i],from:x.pos,to:b(S),duration:s,ease:l}),h&&o.length&&isFinite(r[$])&&gE(t,{template:o[0],attrs:a,from:r[$],to:b(c.toNew(r[$])),duration:s,ease:l}))})}function vE(t){const e=t.globals,n=e.prevChromeFrame;if(e.prevChromeFrame=null,!n||!e.axisCharts||!Ge.isBrowser()||!qC(t)||!(t.seriesData.series||[]).some((s,l)=>Pye(t,l,!0,!0)!==null))return;const o=t.dom.baseEl;if(!we.elementExists(o))return;const r=Math.max(1,t.config.chart.animations.dynamicAnimation.speed||1),a=bF(t);try{const s=[...o.querySelectorAll(xF)],l=Tye(n.xScale,CF(t)),c=Oye(n.yAnchors,$F(t,s.map(u=>({pos:parseFloat(u.getAttribute("y")||"")}))));mE(t,{newLabels:[...o.querySelectorAll(yF)],oldLabels:n.xLabels,posAttr:"x",newLines:[...o.querySelectorAll(wF)],oldLines:n.vGrid,lineAttrs:["x1","x2"],duration:r,ease:a,project:l}),mE(t,{newLabels:s,oldLabels:n.yLabels,posAttr:"y",newLines:[...o.querySelectorAll(SF)],oldLines:n.hGrid,lineAttrs:["y1","y2"],duration:r,ease:a,project:c})}catch{}}const AF=".apexcharts-data-labels[data\\:dlKey]",ZC=".apexcharts-datalabel",_F=".apexcharts-datalabel-total[data\\:dlTotalKey]";function PF(t){var e,n;const i=t.config.dataLabels;return!!((e=i==null?void 0:i.animate)!=null&&e.enabled||(n=i==null?void 0:i.countUp)!=null&&n.enabled)}function bE(t){if(!isFinite(t))return 0;const e=String(Math.abs(t)),n=e.indexOf("e");if(n!==-1){const o=e.slice(0,n),r=parseInt(e.slice(n+1),10),a=o.indexOf("."),s=a===-1?0:o.length-a-1;return Math.min(6,Math.max(0,s-r))}const i=e.indexOf(".");return i===-1?0:Math.min(6,e.length-i-1)}function p0(t,e){const n=t.querySelector("tspan");n?n.textContent=e:t.textContent=e}function Iye(t){const e=t.globals;if(e.prevDataLabels=null,!e.axisCharts||!Ge.isBrowser()||!PF(t))return;const n=t.dom.baseEl;if(we.elementExists(n))try{const i=new Map;n.querySelectorAll(AF).forEach(o=>{const r=o.getAttribute("data:dlKey");if(!r)return;const a=o.querySelector(ZC);a&&i.set(r,{cx:parseFloat(a.getAttribute("cx")||""),cy:parseFloat(a.getAttribute("cy")||""),val:parseFloat(o.getAttribute("data:dlVal")||"")})}),n.querySelectorAll(_F).forEach(o=>{const r=o.getAttribute("data:dlTotalKey");r&&i.set(`total::${r}`,{cx:parseFloat(o.getAttribute("cx")||""),cy:parseFloat(o.getAttribute("cy")||""),val:parseFloat(o.getAttribute("data:dlTotalVal")||"")})}),e.prevDataLabels=i.size?i:null}catch{e.prevDataLabels=null}}function kye(t,e,n,i){const o=e.style;o.opacity="0",sl(t,n,i,r=>{o.opacity=String(r)},()=>{o.opacity=""})}function yE(t,{el:e,oldCx:n,oldCy:i,duration:o,ease:r,delay:a=0}){const s=e.hasAttribute("cx")?e:e.querySelector(ZC);if(!s)return;const l=n-parseFloat(s.getAttribute("cx")||""),c=i-parseFloat(s.getAttribute("cy")||"");if(!isFinite(l)||!isFinite(c)||Math.abs(l)+Math.abs(c)<=.5)return;const u=e.getAttribute("transform")||"",d=()=>sl(t,o,r,f=>{const h=1-f;e.setAttribute("transform",`translate(${l*h} ${c*h}) ${u}`.trim())},()=>{u?e.setAttribute("transform",u):e.removeAttribute("transform")});a>0?(e.setAttribute("transform",`translate(${l} ${c}) ${u}`.trim()),setTimeout(()=>{t.globals.isDestroyed||d()},a)):d()}function xE(t,{el:e,from:n,to:i,formatter:o,fmtOpts:r,duration:a,ease:s,delay:l=0}){if(!isFinite(n)||!isFinite(i)||Math.abs(i-n)<=1e-9)return;const c=Math.max(bE(n),bE(i)),u=f=>{const h=Number(f.toFixed(c));let p=h;if(typeof o=="function")try{p=o(h,r)}catch{p=h}return String(p)},d=()=>sl(t,a,s,f=>{p0(e,u(n+(i-n)*f))},()=>{p0(e,u(i))});l>0?(p0(e,u(n)),setTimeout(()=>{t.globals.isDestroyed||d()},l)):d()}function wE(t){var e,n;const i=t.globals,o=i.prevDataLabels;if(i.prevDataLabels=null,!o||!i.axisCharts||!Ge.isBrowser()||!PF(t)||!qC(t))return;const r=t.dom.baseEl;if(!we.elementExists(r))return;const a=t.config.dataLabels,s=!!((e=a.animate)!=null&&e.enabled),l=!!((n=a.countUp)!=null&&n.enabled),c=a.formatter,u=Math.max(1,t.config.chart.animations.dynamicAnimation.speed||1),d=bF(t);try{r.querySelectorAll(AF).forEach(h=>{const p=h.getAttribute("data:dlKey");if(!p)return;const g=h.querySelector(ZC);if(!g)return;const m=o.get(p),v=parseInt(h.getAttribute("data:dlDelay")||"0",10)||0;if(s&&(m&&isFinite(m.cx)&&isFinite(m.cy)?yE(t,{el:h,oldCx:m.cx,oldCy:m.cy,duration:u,ease:d,delay:v}):m||kye(t,h,u,d)),l&&m){const b=parseInt(p,10),y=parseInt(h.getAttribute("data:dlJ")||"",10);xE(t,{el:g,from:m.val,to:parseFloat(h.getAttribute("data:dlVal")||""),formatter:c,fmtOpts:wt(Je({},t),{seriesIndex:b,dataPointIndex:isFinite(y)?y:0,w:t}),duration:u,ease:d,delay:v})}});const f=t.config.plotOptions.bar.dataLabels.total.formatter||c;r.querySelectorAll(_F).forEach(h=>{const p=h.getAttribute("data:dlTotalKey");if(!p)return;const g=o.get(`total::${p}`);if(!g)return;const m=parseInt(h.getAttribute("data:dlDelay")||"0",10)||0;if(s&&isFinite(g.cx)&&isFinite(g.cy)&&yE(t,{el:h,oldCx:g.cx,oldCy:g.cy,duration:u,ease:d,delay:m}),l){const v=parseInt(h.getAttribute("data:dlTotalSeries")||p,10);xE(t,{el:h,from:g.val,to:parseFloat(h.getAttribute("data:dlTotalVal")||""),formatter:f,fmtOpts:wt(Je({},t),{seriesIndex:v,dataPointIndex:0,w:t}),duration:u,ease:d,delay:m})}})}catch{}}let js=class TF{constructor(e,{toggleDataSeries:n=void 0,revertDefaultAxisMinMax:i=void 0,updateSeries:o=void 0}={}){this.w=e,this._toggleDataSeries=n||null,this._revertDefaultAxisMinMax=i||null,this._updateSeries=o||null,this.legendInactiveClass="legend-mouseover-inactive"}clearSeriesCache(){const e=this.w;e.globals.cachedSelectors&&(delete e.globals.cachedSelectors.allSeriesEls,delete e.globals.cachedSelectors.highlightSeriesEls)}getAllSeriesEls(){const e=this.w,n="allSeriesEls";return e.globals.cachedSelectors[n]||(e.globals.cachedSelectors[n]=e.dom.baseEl.getElementsByClassName("apexcharts-series")),e.globals.cachedSelectors[n]}getSeriesByName(e){return this.w.dom.baseEl.querySelector(`.apexcharts-inner .apexcharts-series[seriesName='${we.escapeString(e)}']`)}isSeriesHidden(e){var n;const o=this.getSeriesByName(e),r=parseInt((n=o.getAttribute("data:realIndex"))!=null?n:"0",10);return{isHidden:o.classList.contains("apexcharts-series-collapsed"),realIndex:r}}addCollapsedClassToSeries(e,n){TF.addCollapsedClassToSeries(this.w,e,n)}static addCollapsedClassToSeries(e,n,i){let o=!1;function r(l){for(let c=0;c{e.globals.isDestroyed||n.node.classList.remove("apexcharts-series-collapsing")},s)}toggleSeries(e){var n;const i=this.isSeriesHidden(e);return(n=this._toggleDataSeries)==null||n.call(this,i.realIndex,i.isHidden),i.isHidden}showSeries(e){var n;const i=this.isSeriesHidden(e);i.isHidden&&((n=this._toggleDataSeries)==null||n.call(this,i.realIndex,!0))}hideSeries(e){var n;const i=this.isSeriesHidden(e);i.isHidden||(n=this._toggleDataSeries)==null||n.call(this,i.realIndex,!1)}prepareDataUpdate(){const e=this.w;this.clearSeriesCache(),e.globals.previousPaths=[],e.globals.axisCharts||(e.globals.collapsedSeries=[],e.globals.ancillaryCollapsedSeries=[],e.globals.collapsedSeriesIndices=[],e.globals.ancillaryCollapsedSeriesIndices=[])}resetSeries(e=!0,n=!0,i=!0){var o,r;const a=this.w;this.clearSeriesCache();let s=we.clone(a.globals.initialSeries);Array.isArray(s)||(s=we.clone(a.config.series)||[]),a.globals.previousPaths=[],i?(a.globals.collapsedSeries=[],a.globals.ancillaryCollapsedSeries=[],a.globals.collapsedSeriesIndices=[],a.globals.ancillaryCollapsedSeriesIndices=[]):s=this.emptyCollapsedSeries(s),a.config.series=s,e&&(n&&(a.interact.zoomed=!1,(o=this._revertDefaultAxisMinMax)==null||o.call(this)),(r=this._updateSeries)==null||r.call(this,s,a.config.chart.animations.dynamicAnimation.enabled))}emptyCollapsedSeries(e){const n=this.w;if(!Array.isArray(e))return e;for(let i=0;i-1&&(e[i]&&typeof e[i]=="object"?e[i].data=[]:e[i]=0);return e}_deriveSeriesNames(e){const n=this.w,i=e||n.config.series||[],o=n.config.labels||[];return i.map((r,a)=>r&&typeof r=="object"&&r.name!=null?String(r.name):o[a]!=null?String(o[a]):`series-${a+1}`)}reconcileCollapsedByName(e){const n=this.w,i=n.globals,o=e||n.config.series,r=this._deriveSeriesNames(o),a=c=>{const u=[],d=[];return c.forEach(f=>{const h=f&&f.name!=null?r.indexOf(f.name):f.index;if(h==null||h<0||h>=o.length)return;const p=o[h];f.index=h,i.axisCharts?p&&Array.isArray(p.data)&&p.data.length&&(f.data=p.data.slice()):f.data=p,u.push(f),d.push(h)}),{records:u,indices:d}},s=a(i.collapsedSeries);i.collapsedSeries=s.records,i.collapsedSeriesIndices=s.indices;const l=a(i.ancillaryCollapsedSeries);i.ancillaryCollapsedSeries=l.records,i.ancillaryCollapsedSeriesIndices=l.indices,i.allSeriesCollapsed=i.collapsedSeries.length+i.ancillaryCollapsedSeries.length===o.length,this.emptyCollapsedSeries(o)}canvasRestyle(e){const n=this.w.globals.activeRenderer;n&&n.kind==="canvas"&&typeof n.restyle=="function"&&n.restyle(e)}highlightSeries(e){var n;const i=this.w,o=this.getSeriesByName(e),r=parseInt((n=o==null?void 0:o.getAttribute("data:realIndex"))!=null?n:"",10),a="highlightSeriesEls";let s=i.globals.cachedSelectors[a];s||(s=i.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),i.globals.cachedSelectors[a]=s);let l=null,c=null,u=null;if(i.globals.axisCharts||i.config.chart.type==="radialBar")if(i.globals.axisCharts){l=i.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${r}']`),c=i.dom.baseEl.querySelector(`.apexcharts-datalabels[data\\:realIndex='${r}']`);const d=i.globals.seriesYAxisReverseMap[r];u=i.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${d}']`)}else l=i.dom.baseEl.querySelector(`.apexcharts-series[rel='${r+1}']`);else l=i.dom.baseEl.querySelector(`.apexcharts-series[rel='${r+1}'] path`);for(let d=0;d{for(let c=0;c=s.from&&c<=s.to&&o[l].classList.remove(this.legendInactiveClass)}}}getActiveConfigSeriesIndex(e="asc",n=[]){const i=this.w;let o=0;if(i.config.series.length>1){const r=i.config.series.map((a,s)=>{const l=()=>i.globals.comboCharts?n.length===0||n.length&&n.indexOf(i.config.series[s].type)>-1:!0;return a.data&&a.data.length>0&&i.globals.collapsedSeriesIndices.indexOf(s)===-1&&l()?s:-1});for(let a=e==="asc"?0:r.length-1;e==="asc"?a=0;e==="asc"?a++:a--)if(r[a]!==-1){o=r[a];break}}return o}getActiveConfigSeriesIndexByGroup(e=[]){const n=this.w;return(n.labelData.seriesGroups||[]).map(o=>{let r=-1;return n.config.series.forEach((a,s)=>{if(o.indexOf(n.seriesData.seriesNames[s])===-1||n.globals.comboCharts&&e.length&&e.indexOf(a.type)===-1)return;a.data&&a.data.length>0&&n.globals.collapsedSeriesIndices.indexOf(s)===-1&&(r=s)}),r})}getBarSeriesIndices(){return this.w.globals.comboCharts?this.w.config.series.map((n,i)=>n.type==="bar"||n.type==="column"?i:-1).filter(n=>n!==-1):this.w.config.series.map((n,i)=>i)}getPreviousPaths(){var e,n,i,o;const r=this.w;if(Sye(r),Eye(r),Iye(r),!r.globals.axisCharts){r.globals.previousPaths=r.seriesData.series;return}if(!we.elementExists(r.dom.baseEl)){r.globals.previousPaths=[];return}r.globals.previousPaths=[];function a(u,d,f){const h=u[d].childNodes,p={type:f,paths:[],realIndex:u[d].getAttribute("data:realIndex")};for(let g=0;gr.dom.baseEl.querySelectorAll(`.apexcharts-${u}-series .apexcharts-series`);["line","area","bar","rangebar","rangeArea","candlestick","radar"].forEach(u=>{const d=s(u);for(let f=0;f0)for(let u=0;uf[p].getAttribute(v),m={x:parseFloat((e=g("x"))!=null?e:"0"),y:parseFloat((n=g("y"))!=null?n:"0"),width:parseFloat((i=g("width"))!=null?i:"0"),height:parseFloat((o=g("height"))!=null?o:"0")};h.push({rect:m,color:f[p].getAttribute("color")})}r.globals.previousPaths.push(h)}}clearPreviousPaths(){const e=this.w;e.globals.previousPaths=[],e.globals.allSeriesCollapsed=!1}handleNoData(){const e=this.w,n=this,i=e.config.noData,o=new it(n.w);let r=e.globals.svgWidth/2,a=e.globals.svgHeight/2,s="middle";if(e.globals.noData=!0,e.globals.animationEnded=!0,i.align==="left"?(r=10,s="start"):i.align==="right"&&(r=e.globals.svgWidth-10,s="end"),i.verticalAlign==="top"?a=50:i.verticalAlign==="bottom"&&(a=e.globals.svgHeight-50),r=r+i.offsetX,a=a+parseInt(i.style.fontSize,10)+2+i.offsetY,i.text!==void 0&&i.text!==""){const l=o.drawText({x:r,y:a,text:i.text,textAnchor:s,fontSize:i.style.fontSize,fontFamily:i.style.fontFamily,foreColor:i.style.color,opacity:1,cssClass:"apexcharts-text-nodata"});e.dom.Paper.add(l)}}setNullSeriesToZeroValues(e){const n=this.w;for(let i=0;ii.length>0?i:[])}};const SE={accent:"--apx-accent",fore:"--apx-fore",grid:"--apx-grid",surface:"--apx-surface"},Dye=24;function Rye(t){if(!Ge.isBrowser())return{};const e=t.dom&&(t.dom.elWrap||t.dom.baseEl)||null;if(!e)return{};const n=nt.getComputedStyle(e);if(!n||typeof n.getPropertyValue!="function")return{};const i=a=>{const s=n.getPropertyValue(a);return s?String(s).trim():""},o={};for(const a in SE){const s=i(SE[a]);s&&(o[a]=s)}const r=[];for(let a=1;a<=Dye;a++){const s=i(`--apx-series-${a}`);if(!s)break;r.push(s)}return r.length&&(o.series=r),o}const Ix="__apexcharts_themes__";globalThis[Ix]||(globalThis[Ix]={});function JC(){return globalThis[Ix]}function Lye(t,e){if(!t||typeof t!="string"){console.warn("ApexCharts: registerTheme requires a non-empty name.");return}if(e!=null&&(typeof e!="object"||Array.isArray(e))){console.warn(`ApexCharts: registerTheme("${t}") expects an object like { mode, palette, tokens, monochrome, accessibility }.`);return}JC()[t]=e||{}}function Fye(t){return t&&JC()[t]||null}function Nye(t){t&&delete JC()[t]}const g0="#373d3f",m0="#f6f7f8",v0="#e0e0e0";let OF=class{constructor(e){this.w=e,this.colors=[],this.isColorFn=!1,this.isHeatmapDistributed=this.checkHeatmapDistributed(),this.isBarDistributed=this.checkBarDistributed(),this._tokens={},this._namedTheme=null}checkHeatmapDistributed(){const{chart:e,plotOptions:n}=this.w.config;return e.type==="treemap"&&n.treemap&&n.treemap.distributed||e.type==="heatmap"&&n.heatmap&&n.heatmap.distributed}checkBarDistributed(){const{chart:e,plotOptions:n}=this.w.config;return n.bar&&n.bar.distributed&&(e.type==="bar"||e.type==="rangeBar")}init(){this.setDefaultColors()}setDefaultColors(){var e;const n=this.w,i=new we;this._namedTheme=Fye(n.config.theme.name),this._applyNamedThemeMode(),n.dom.elWrap.classList.add(`apexcharts-theme-${n.config.theme.mode||"light"}`),this._applyModeDefaults(),this._tokens=this._resolveTokens(),this.applyTokenChrome(this._tokens);const o=(e=n.config.theme.accessibility)==null?void 0:e.colorBlindMode;if(o){n.globals.colors=this.getColorBlindColors(o),this.applySeriesColors(n.seriesData.seriesColors,n.globals.colors);const s=n.globals.colors.slice();this.pushExtraColors(n.globals.colors),this.applyColorTypes(["fill","stroke"],s),this.applyDataLabelsColors(s),this.applyRadarPolygonsColors(),this.applyMarkersColors(s),o==="highContrast"&&n.dom.elWrap.classList.add("apexcharts-high-contrast");return}const r=[...n.config.colors||n.config.fill.colors||[]];n.globals.colors=this.getColors(r),this.applySeriesColors(n.seriesData.seriesColors,n.globals.colors),n.config.theme.monochrome.enabled&&(n.globals.colors=this.getMonochromeColors(n.config.theme.monochrome,n.seriesData.series,i));const a=n.globals.colors.slice();this.pushExtraColors(n.globals.colors),this.applyColorTypes(["fill","stroke"],a),this.applyDataLabelsColors(a),this.applyRadarPolygonsColors(),this.applyMarkersColors(a)}_applyModeDefaults(){const e=this.w,n=e.config.theme.mode;n==="dark"?(e.config.chart.foreColor===g0&&(e.config.chart.foreColor=m0),e.config.theme.palette==="palette1"&&(e.config.theme.palette="palette4"),e.config.tooltip&&e.config.tooltip.theme!=="light"&&(e.config.tooltip.theme="dark")):n==="light"&&(e.config.chart.foreColor===m0&&(e.config.chart.foreColor=g0),e.config.theme.palette==="palette4"&&(e.config.theme.palette="palette1"))}_applyNamedThemeMode(){const e=this._namedTheme;if(!e)return;const n=this.w.config.theme;e.mode&&!n.mode&&(n.mode=e.mode),e.accessibility&&e.accessibility.colorBlindMode&&!(n.accessibility&&n.accessibility.colorBlindMode)&&(n.accessibility=n.accessibility||{},n.accessibility.colorBlindMode=e.accessibility.colorBlindMode),e.monochrome&&e.monochrome.enabled&&!n.monochrome.enabled&&(n.monochrome=Je(Je({},n.monochrome),e.monochrome))}_resolveTokens(){const e=this._namedTheme&&this._namedTheme.tokens||{},n=this._shouldUseTokens()?Rye(this.w):{};return Je(Je({},e),n)}_shouldUseTokens(){return this.w.config.theme.tokens!==!1}applyTokenChrome(e){if(!e)return;const n=this.w;if(e.fore&&(n.config.chart.foreColor===g0||n.config.chart.foreColor===m0)&&(n.config.chart.foreColor=e.fore),e.grid){n.config.grid.borderColor===v0&&(n.config.grid.borderColor=e.grid);const a=s=>{s&&(s.axisBorder&&s.axisBorder.color===v0&&(s.axisBorder.color=e.grid),s.axisTicks&&s.axisTicks.color===v0&&(s.axisTicks.color=e.grid))};a(n.config.xaxis),Array.isArray(n.config.yaxis)?n.config.yaxis.forEach(a):a(n.config.yaxis)}const i=n.globals.tokenSurface,o=n.config.chart.background,r=!o||o===i;if(e.surface){if(r){n.config.chart.background=e.surface,n.globals.tokenSurface=e.surface;const a=n.dom.Paper&&n.dom.Paper.node;a&&a.style&&(a.style.background=e.surface)}}else if(i&&o===i){n.config.chart.background="",n.globals.tokenSurface=void 0;const a=n.dom.Paper&&n.dom.Paper.node;a&&a.style&&(a.style.background="")}}getColors(e){const n=this.w;return!e||e.length===0?this.predefined():Array.isArray(e)&&e.length>0&&typeof e[0]=="function"?(this.isColorFn=!0,n.config.series.map((i,o)=>{const r=e[o]||e[0];return typeof r=="function"?r({value:n.globals.axisCharts?n.seriesData.series[o][0]||0:n.seriesData.series[o],seriesIndex:o,dataPointIndex:o,w:this.w}):r})):e}applySeriesColors(e,n){e.forEach((i,o)=>{i&&(n[o]=i)})}getMonochromeColors(e,n,i){const{color:o,shadeIntensity:r,shadeTo:a}=e,s=this.isBarDistributed||this.isHeatmapDistributed?n[0].length*n.length:n.length,l=1/(s/r);let c=0;return Array.from({length:s},()=>{const u=a==="dark"?i.shadeColor(c*-1,o):i.shadeColor(c,o);return c+=l,u})}applyColorTypes(e,n){const i=this.w;e.forEach(o=>{i.globals[o].colors=i.config[o].colors===void 0?this.isColorFn?i.config.colors:n:i.config[o].colors.slice(),this.pushExtraColors(i.globals[o].colors)})}applyDataLabelsColors(e){const n=this.w;n.globals.dataLabels.style.colors=n.config.dataLabels.style.colors===void 0?e:n.config.dataLabels.style.colors.slice(),this.pushExtraColors(n.globals.dataLabels.style.colors,50)}applyRadarPolygonsColors(){const e=this.w;e.globals.radarPolygons.fill.colors=e.config.plotOptions.radar.polygons.fill.colors===void 0?[e.config.theme.mode==="dark"?"#343A3F":"none"]:e.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(e.globals.radarPolygons.fill.colors,20)}applyMarkersColors(e){const n=this.w;n.globals.markers.colors=n.config.markers.colors===void 0?e:n.config.markers.colors.slice(),this.pushExtraColors(n.globals.markers.colors)}pushExtraColors(e,n,i=null){const o=this.w;let r=n||o.seriesData.series.length;if(i===null&&(i=this.isBarDistributed||this.isHeatmapDistributed||o.config.chart.type==="heatmap"&&o.config.plotOptions.heatmap&&o.config.plotOptions.heatmap.colorScale.inverse),i&&o.seriesData.series.length&&(r=o.seriesData.series[o.globals.maxValsInArrayIndex].length*o.seriesData.series.length),e.lengthe.globals.svgWidth&&(this.dCtx.lgRect.width=e.globals.svgWidth/1.5),this.dCtx.lgRect}getDatalabelsRect(){const e=this.w,n=[];e.config.series.forEach((s,l)=>{s.data.forEach((c,u)=>{const f=(h=>e.config.dataLabels.formatter(h,{seriesIndex:l,dataPointIndex:u,w:e}))(e.seriesData.series[l][u]);n.push(f)})});const i=we.getLargestStringFromArr(n),o=new it(this.w),r=e.config.dataLabels.style,a=o.getTextRects(i,parseInt(r.fontSize).toString(),r.fontFamily);return{width:a.width*1.05,height:a.height}}getLargestStringFromMultiArr(e,n){const i=this.w;let o=e;if(i.axisFlags.isMultiLineX){const r=n.map(l=>Array.isArray(l)?l.length:1),a=Math.max(...r),s=r.indexOf(a);o=n[s]}return o}getSparklineStrokeInset(){const e=this.w,n=Array.isArray(e.config.stroke.width)?Math.max(...e.config.stroke.width):e.config.stroke.width,i=n/2;if(!e.config.stroke.show||!(i>0))return{top:0,bottom:0};const o=e.globals.maxY-e.globals.minY,r=this._getSeriesYExtremes();if(!this._strokeTracesDataPoints()||!(o>0)||!r)return{top:i,bottom:i};const a=Math.max(e.globals.svgHeight-n,0),s=a*(e.globals.maxY-r.max)/o,l=a*(r.min-e.globals.minY)/o;return{top:Math.min(Math.max(i-s,0),i),bottom:Math.min(Math.max(i-l,0),i)}}_strokeTracesDataPoints(){const e=this.w;if(!e.globals.axisCharts||e.config.chart.stacked)return!1;const n=["line","area","scatter"];return e.config.series.every(i=>n.includes(i.type||e.config.chart.type))}_getSeriesYExtremes(){let e=1/0,n=-1/0;return this.w.seriesData.series.forEach(i=>{Array.isArray(i)&&i.forEach(o=>{Number.isFinite(o)&&(on&&(n=o))})}),e===1/0?null:{min:e,max:n}}}class IF{constructor(e){this.w=e.w,this.dCtx=e}getxAxisLabelsCoords(){const e=this.w;let n=e.labelData.labels.slice();e.config.xaxis.convertedCatToNumeric&&n.length===0&&(n=e.labelData.categoryLabels);let i;if(e.labelData.timescaleLabels.length>0){const o=this.getxAxisTimeScaleLabelsCoords();i={width:o.width,height:o.height},e.layout.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends=(e.config.legend.position==="left"||e.config.legend.position==="right")&&!e.config.legend.floating?this.dCtx.lgRect.width:0;const o=e.formatters.xLabelFormatter;let r=we.getLargestStringFromArr(n),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,n);e.globals.isBarHorizontal&&(r=e.globals.yAxisScale[0].result.reduce((f,h)=>f.length>h.length?f:h,0),a=r);const s=new zc(this.w),l=r;r=s.xLabelFormat(o,r,l,{i:void 0,dateFormatter:new Ei(this.w).formatDate,w:e}),a=s.xLabelFormat(o,a,l,{i:void 0,dateFormatter:new Ei(this.w).formatDate,w:e}),(e.config.xaxis.convertedCatToNumeric&&typeof r>"u"||String(r).trim()==="")&&(r="1",a=r);const c=new it(this.w);let u=c.getTextRects(r,e.config.xaxis.labels.style.fontSize),d=u;if(r!==a&&(d=c.getTextRects(a,e.config.xaxis.labels.style.fontSize)),i={width:u.width>=d.width?u.width:d.width,height:u.height>=d.height?u.height:d.height},i.width*n.length>e.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&e.config.xaxis.labels.rotate!==0||e.config.xaxis.labels.rotateAlways){if(!e.globals.isBarHorizontal){e.layout.rotateXLabels=!0;const f=h=>c.getTextRects(h,e.config.xaxis.labels.style.fontSize,e.config.xaxis.labels.style.fontFamily,`rotate(${e.config.xaxis.labels.rotate} 0 0)`,!1);u=f(r),r!==a&&(d=f(a)),i.height=(u.height>d.height?u.height:d.height)/1.5,i.width=u.width>d.width?u.width:d.width}}else e.layout.rotateXLabels=!1}return e.config.xaxis.labels.show||(i={width:0,height:0}),{width:i.width,height:i.height}}getxAxisGroupLabelsCoords(){var e;const n=this.w;if(!n.labelData.hasXaxisGroups)return{width:0,height:0};const i=((e=n.config.xaxis.group.style)==null?void 0:e.fontSize)||n.config.xaxis.labels.style.fontSize,o=n.labelData.groups.map(d=>d.title);let r;const a=we.getLargestStringFromArr(o),s=this.dCtx.dimHelpers.getLargestStringFromMultiArr(a,o),l=new it(this.w),c=l.getTextRects(a,i);let u=c;return a!==s&&(u=l.getTextRects(s,i)),r={width:c.width>=u.width?c.width:u.width,height:c.height>=u.height?c.height:u.height},n.config.xaxis.labels.show||(r={width:0,height:0}),{width:r.width,height:r.height}}getxAxisTitleCoords(){const e=this.w;let n=0,i=0;if(e.config.xaxis.title.text!==void 0){const r=new it(this.w).getTextRects(e.config.xaxis.title.text,e.config.xaxis.title.style.fontSize);n=r.width,i=r.height}return{width:n,height:i}}getxAxisTimeScaleLabelsCoords(){const e=this.w;this.dCtx.timescaleLabels=e.labelData.timescaleLabels.slice();const n=this.dCtx.timescaleLabels.map(s=>s.value),i=n.reduce((s,l)=>typeof s>"u"?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):s.length>l.length?s:l,0),r=new it(this.w).getTextRects(i,e.config.xaxis.labels.style.fontSize);return r.width*1.05*n.length>e.layout.gridWidth&&e.config.xaxis.labels.rotate!==0&&(e.globals.overlappingXLabels=!0),r}additionalPaddingXLabels(e){const n=this.w,i=n.globals,o=n.config,r=o.xaxis.type,a=e.width;i.skipLastTimelinelabel=!1,i.skipFirstTimelinelabel=!1;const s=n.config.yaxis[0].opposite&&n.globals.isBarHorizontal,l=d=>i.collapsedSeriesIndices.indexOf(d)!==-1,c=d=>{if(this.dCtx.timescaleLabels&&this.dCtx.timescaleLabels.length){const f=this.dCtx.timescaleLabels[0],p=this.dCtx.timescaleLabels[this.dCtx.timescaleLabels.length-1].position+a/1.75-this.dCtx.yAxisWidthRight,g=f.position-a/1.75+this.dCtx.yAxisWidthLeft,m=n.config.legend.position==="right"&&this.dCtx.lgRect.width>0?this.dCtx.lgRect.width:0;p>i.svgWidth-n.layout.translateX-m&&(i.skipLastTimelinelabel=!0),g<-((!d.show||d.floating)&&(o.chart.type==="bar"||o.chart.type==="candlestick"||o.chart.type==="rangeBar"||o.chart.type==="boxPlot"||o.chart.type==="violin")?a/1.75:10)&&(i.skipFirstTimelinelabel=!0)}else r==="datetime"?this.dCtx.gridPad.right{o.yaxis.length>1&&l(f)||c(d)};o.yaxis.forEach((d,f)=>{s?(this.dCtx.gridPad.left{const c={seriesIndex:l,dataPointIndex:-1,w:e},u=e.globals.yAxisScale[l];let d=0;if(!a.isYAxisHidden(l)&&s.labels.show&&s.labels.minWidth!==void 0&&(d=s.labels.minWidth),!a.isYAxisHidden(l)&&s.labels.show&&u.result.length){const f=e.formatters.yLabelFormatters[l],h=u.niceMin===Number.MIN_VALUE?0:u.niceMin;let p=u.result.reduce((w,x)=>{var $,S;return(($=String(f(w,c)))==null?void 0:$.length)>((S=String(f(x,c)))==null?void 0:S.length)?w:x},h);p=f(p,c);let g=p;if((typeof p>"u"||p.length===0)&&(p=u.niceMax),String(p).length===1&&(p=p+".0",g=p),e.globals.isBarHorizontal){r=0;const w=e.labelData.labels.slice();p=we.getLargestStringFromArr(w),p=f(p,{seriesIndex:l,dataPointIndex:-1,w:e}),g=this.dCtx.dimHelpers.getLargestStringFromMultiArr(p,w)}const m=new it(this.w),v="rotate(".concat(s.labels.rotate," 0 0)"),b=m.getTextRects(p,s.labels.style.fontSize,s.labels.style.fontFamily,v,!1);let y=b;p!==g&&(y=m.getTextRects(g,s.labels.style.fontSize,s.labels.style.fontFamily,v,!1)),o.push({width:(d>y.width||d>b.width?d:y.width>b.width?y.width:b.width)+r,height:y.height>b.height?y.height:b.height})}else o.push({width:n,height:i})}),o}getyAxisTitleCoords(){const e=this.w,n=[];return e.config.yaxis.map(i=>{if(i.show&&i.title.text!==void 0){const o=new it(this.w),r="rotate(".concat(i.title.rotate," 0 0)"),a=o.getTextRects(i.title.text,i.title.style.fontSize,i.title.style.fontFamily,r,!1);n.push({width:a.width,height:a.height})}else n.push({width:0,height:0})}),n}getTotalYAxisWidth(){const e=this.w;let n=0,i=0,o=0;const r=e.globals.yAxisScale.length>1?10:0,a=new Hs(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale}),s=function(c){return e.globals.ignoreYAxisIndexes.indexOf(c)>-1},l=(c,u)=>{const d=e.config.yaxis[u].floating;let f=0;c.width>0&&!d?(f=c.width+r,s(u)&&(f=f-c.width-r)):f=d||a.isYAxisHidden(u)?0:5,e.config.yaxis[u].opposite?o=o+f:i=i+f,n=n+f};return e.layout.yLabelsCoords.map((c,u)=>{l(c,u)}),e.layout.yTitleCoords.map((c,u)=>{l(c,u)}),e.globals.isBarHorizontal&&!e.config.yaxis[0].floating&&(n=e.layout.yLabelsCoords[0].width+e.layout.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=i,this.dCtx.yAxisWidthRight=o,n}}class DF{constructor(e){this.w=e.w,this.dCtx=e}gridPadForColumnsInNumericAxis(e){const{w:n}=this,{config:i,globals:o}=n;if(o.noData||o.collapsedSeries.length+o.ancillaryCollapsedSeries.length===i.series.length)return 0;const r=d=>["bar","rangeBar","candlestick","boxPlot","violin"].includes(d),a=i.chart.type;let s=0,l=r(a)?i.series.length:1;o.comboBarCount>0&&(l=o.comboBarCount),o.collapsedSeries.forEach(d=>{r(d.type)&&(l-=1)}),i.chart.stacked&&(l=1);const c=r(a)||o.comboBarCount>0;let u=Math.abs(o.initialMaxX-o.initialMinX);if(c&&n.axisFlags.isXNumeric&&!o.isBarHorizontal&&l>0&&u!==0){u<=3&&(u=o.dataPoints);const d=u/e;let f=o.minXDiff&&o.minXDiff/d>0?o.minXDiff/d:0;f>e/2&&(f/=2),s=f*parseInt(i.plotOptions.bar.columnWidth,10)/100,s<1&&(s=1),o.barPadForNumericAxis=s}return s}gridPadForStackedTotalDataLabels(){const{w:e}=this,n=e.config.plotOptions.bar.dataLabels.total;if(!e.globals.isBarHorizontal||!e.config.chart.stacked||e.config.chart.stackType!=="100%"||!n.enabled)return;const i=e.seriesData.stackedSeriesTotals||[];if(!i.length)return;const o=n.formatter||e.config.dataLabels.formatter,r=i.map((c,u)=>String(o?o(c,wt(Je({},e),{seriesIndex:0,dataPointIndex:u,w:e})):c)),l=new it(e).getTextRects(we.getLargestStringFromArr(r),parseFloat(n.style.fontSize).toString(),n.style.fontFamily).width+Math.abs(n.offsetX||0)+2;this.dCtx.xPadRight=Math.max(this.dCtx.xPadRight,l)}gridPadFortitleSubtitle(){const{w:e}=this,{globals:n}=e;let i=this.dCtx.isSparkline||!n.axisCharts?0:10;["title","subtitle"].forEach(s=>{e.config[s].text!==void 0?i+=e.config[s].margin:i+=this.dCtx.isSparkline||!n.axisCharts?0:5}),e.config.legend.show&&e.config.legend.position==="bottom"&&!e.config.legend.floating&&!n.axisCharts&&(i+=10);const r=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),a=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");this.dCtx.titleBlockPad=i,e.layout.gridHeight-=r.height+a.height+i,e.layout.translateY+=r.height+a.height+i}setGridXPosForDualYAxis(e,n){const{w:i}=this,o=new Hs(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale});i.config.yaxis.forEach((r,a)=>{i.globals.ignoreYAxisIndexes.indexOf(a)===-1&&!r.floating&&!o.isYAxisHidden(a)&&(r.opposite&&(i.layout.translateX-=n[a].width+e[a].width+parseInt(r.labels.style.fontSize,10)/1.2+12),i.layout.translateX<2&&(i.layout.translateX=2))})}}const Bye=18,zye=23;function CE(t,e){const n=t.config.drilldown&&t.config.drilldown.breadcrumb||{};return Je(Je({show:!0,position:"top-left",separator:" / ",rootLabel:"All",offsetX:0,offsetY:0,formatter:void 0},n),e||{})}let QC=class{constructor(e,n){this.w=e,this.ctx=n,this.theme=n.theme,this.timeScale=n.timeScale,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new MF(this),this.dimYAxis=new kF(this),this.dimXAxis=new IF(this),this.dimGrid=new DF(this),this.lgWidthForSideLegends=0,this.gridPad=Je({},this.w.config.grid.padding),this.xPadRight=0,this.titleBlockPad=0,this.xPadLeft=0,this.datalabelsCoords={width:0,height:0},this.xAxisWidth=0,this.timescaleLabels=[]}plotCoords(){const e=this.w,n=e.globals;if(this.gridPad=Je({},e.config.grid.padding),this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0},this.isSparkline){this.w.globals.markers.largestSize>0&&Object.entries(this.gridPad).forEach(([r,a])=>{this.gridPad[r]=Math.max(a,this.w.globals.markers.largestSize/1.5)});const o=this.dimHelpers.getSparklineStrokeInset();this.gridPad.top=Math.max(o.top,this.gridPad.top),this.gridPad.bottom=Math.max(o.bottom,this.gridPad.bottom)}if(n.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),this.gridPadForBreadcrumb(),this.dimGrid.gridPadForStackedTotalDataLabels(),e.config.chart.type==="heatmap"&&e.config.plotOptions.heatmap.shape==="hexagon"&&!((e.config.xaxis.type==="numeric"||e.config.xaxis.type==="datetime")&&e.axisFlags.isXNumeric)){const o=n.dataPoints||1,r=(e.seriesData.series||[]).length||1,a=e.layout.gridWidth-this.xPadRight-this.xPadLeft,s=e.layout.gridHeight,l=e.config.stroke.show?Array.isArray(e.config.stroke.width)?Math.max(...e.config.stroke.width):e.config.stroke.width:0,c=l/2+6,u=l/2,d=(a+4*o*c)/(4*o+2),f=(s+6*r*u)/(6*r+2);this.gridPad.left=Math.max(d,this.gridPad.left),this.gridPad.right=Math.max(d,this.gridPad.right),this.gridPad.top=Math.max(f,this.gridPad.top),this.gridPad.bottom=Math.max(f,this.gridPad.bottom)}e.layout.gridHeight=e.layout.gridHeight-this.gridPad.top-this.gridPad.bottom,e.layout.gridWidth=e.layout.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;const i=this.dimGrid.gridPadForColumnsInNumericAxis(e.layout.gridWidth);return e.layout.gridWidth=e.layout.gridWidth-i*2,e.layout.translateX=e.layout.translateX+this.gridPad.left+this.xPadLeft+(i>0?i:0),e.layout.translateY=e.layout.translateY+this.gridPad.top,{layout:{gridHeight:e.layout.gridHeight,gridWidth:e.layout.gridWidth,translateX:e.layout.translateX,translateY:e.layout.translateY,translateXAxisX:e.layout.translateXAxisX,translateXAxisY:e.layout.translateXAxisY,rotateXLabels:e.layout.rotateXLabels,xAxisHeight:e.layout.xAxisHeight,xAxisLabelsHeight:e.layout.xAxisLabelsHeight,xAxisGroupLabelsHeight:e.layout.xAxisGroupLabelsHeight,xAxisLabelsWidth:e.layout.xAxisLabelsWidth,yLabelsCoords:e.layout.yLabelsCoords,yTitleCoords:e.layout.yTitleCoords,gridPad:Je({},this.gridPad)}}}gridPadForBreadcrumb(){var e,n,i,o,r,a;const s=this.w,l=s.config.chart.type==="treemap";if(l){const h=(n=(e=s.config.plotOptions)==null?void 0:e.treemap)==null?void 0:n.zoom;if(h&&h.enabled){if(CE(s,h.breadcrumb).show===!1)return;this.gridPad.top+=Bye+4;return}}if(!s.globals.axisCharts||!this.ctx.drilldown||!s.config.drilldown||!s.config.drilldown.enabled||CE(s).show===!1)return;const c=parseFloat(String((a=(r=(o=(i=s.config.yaxis)==null?void 0:i[0])==null?void 0:o.labels)==null?void 0:r.style)==null?void 0:a.fontSize))||11,u=l?0:Math.ceil(c*Cg/2),d=zye+1+u,f=l?0:this.titleBlockPad||0;this.gridPad.top+=Math.max(0,d-f)}setDimensionsForAxisCharts(){const e=this.w,n=e.globals,i=this.dimYAxis.getyAxisLabelsCoords(),o=this.dimYAxis.getyAxisTitleCoords();n.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),e.layout.yLabelsCoords=[],e.layout.yTitleCoords=[],e.config.yaxis.map((h,p)=>{e.layout.yLabelsCoords.push({width:i[p].width,index:p}),e.layout.yTitleCoords.push({width:o[p].width,index:p})}),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();const r=this.dimXAxis.getxAxisLabelsCoords(),a=this.dimXAxis.getxAxisGroupLabelsCoords(),s=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(r,s,a),e.layout.translateXAxisY=e.layout.rotateXLabels?this.xAxisHeight/8:-4,e.layout.translateXAxisX=e.layout.rotateXLabels&&e.axisFlags.isXNumeric&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,e.globals.isBarHorizontal&&(e.layout.rotateXLabels=!1,e.layout.translateXAxisY=-1*((parseInt(e.config.xaxis.labels.style.fontSize,10)||12)/1.5)),e.layout.translateXAxisY=e.layout.translateXAxisY+e.config.xaxis.labels.offsetY,e.layout.translateXAxisX=e.layout.translateXAxisX+e.config.xaxis.labels.offsetX;let l=this.yAxisWidth,c=this.xAxisHeight;e.layout.xAxisLabelsHeight=this.xAxisHeight-s.height,e.layout.xAxisGroupLabelsHeight=e.layout.xAxisLabelsHeight-r.height,e.layout.xAxisLabelsWidth=this.xAxisWidth,e.layout.xAxisHeight=this.xAxisHeight;let u=10;(e.config.chart.type==="radar"||this.isSparkline)&&(l=0,c=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||e.config.chart.type==="treemap")&&(l=0,c=0,u=0),!this.isSparkline&&e.config.chart.type!=="treemap"&&this.dimXAxis.additionalPaddingXLabels(r);const d=()=>{e.layout.translateX=l+this.datalabelsCoords.width,e.layout.gridHeight=n.svgHeight-this.lgRect.height-c-(!this.isSparkline&&e.config.chart.type!=="treemap"?e.layout.rotateXLabels?10:15:0),e.layout.gridWidth=n.svgWidth-l-this.datalabelsCoords.width*2};switch(e.config.xaxis.position==="top"&&(u=e.layout.xAxisHeight-e.config.xaxis.axisTicks.height-5),e.config.legend.position){case"bottom":e.layout.translateY=u,d();break;case"top":e.layout.translateY=this.lgRect.height+u,d();break;case"left":e.layout.translateY=u,e.layout.translateX=this.lgRect.width+l+this.datalabelsCoords.width,e.layout.gridHeight=n.svgHeight-c-12,e.layout.gridWidth=n.svgWidth-this.lgRect.width-l-this.datalabelsCoords.width*2;break;case"right":e.layout.translateY=u,e.layout.translateX=l+this.datalabelsCoords.width,e.layout.gridHeight=n.svgHeight-c-12,e.layout.gridWidth=n.svgWidth-this.lgRect.width-l-this.datalabelsCoords.width*2-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(o,i),new kd(this.w,{theme:this.theme,timeScale:this.timeScale}).setYAxisXPosition(i,o)}setDimensionsForNonAxisCharts(){const e=this.w,n=e.globals,i=e.config;let o=0;if(e.config.legend.show&&!e.config.legend.floating&&(o=20),i.chart.type==="unit"){const l=i.legend.show&&!i.legend.floating,c=i.legend.position;let u=0,d=0;l&&(c==="bottom"||c==="top"?u=this.lgRect.height:d=this.lgRect.width+o),e.layout.gridWidth=n.svgWidth-d,e.layout.gridHeight=n.svgHeight-u,e.layout.translateX=c==="left"?d:0,e.layout.translateY=c==="top"?u:0;return}const r=i.chart.type==="sunburst"?"sunburst":i.chart.type==="pie"||i.chart.type==="polarArea"||i.chart.type==="donut"?"pie":"radialBar",a=i.plotOptions[r].offsetY,s=i.plotOptions[r].offsetX;if(!i.legend.show||i.legend.floating){e.layout.gridHeight=n.svgHeight;const l=e.dom.elWrap.getBoundingClientRect().width;e.layout.gridWidth=Math.min(l,e.layout.gridHeight),e.layout.translateY=a,e.layout.translateX=s+(n.svgWidth-e.layout.gridWidth)/2;return}switch(i.legend.position){case"bottom":e.layout.gridHeight=n.svgHeight-this.lgRect.height,e.layout.gridWidth=n.svgWidth,e.layout.translateY=a-10,e.layout.translateX=s+(n.svgWidth-e.layout.gridWidth)/2;break;case"top":e.layout.gridHeight=n.svgHeight-this.lgRect.height,e.layout.gridWidth=n.svgWidth,e.layout.translateY=this.lgRect.height+a+10,e.layout.translateX=s+(n.svgWidth-e.layout.gridWidth)/2;break;case"left":e.layout.gridWidth=n.svgWidth-this.lgRect.width-o,e.layout.gridHeight=i.chart.height!=="auto"?n.svgHeight:e.layout.gridWidth,e.layout.translateY=a,e.layout.translateX=s+this.lgRect.width+o;break;case"right":e.layout.gridWidth=n.svgWidth-this.lgRect.width-o-5,e.layout.gridHeight=i.chart.height!=="auto"?n.svgHeight:e.layout.gridWidth,e.layout.translateY=a,e.layout.translateX=s+10;break;default:throw new Error("Legend position not supported")}}conditionalChecksForAxisCoords(e,n,i){const o=this.w,r=o.labelData.hasXaxisGroups?2:1,a=i.height+e.height+n.height,s=o.axisFlags.isMultiLineX?1.2:Cg,l=o.layout.rotateXLabels?22:10,u=o.layout.rotateXLabels&&o.config.legend.position==="bottom"?10:0;this.xAxisHeight=a*s+r*l+u,this.xAxisWidth=e.width,this.xAxisHeight-n.height>o.config.xaxis.labels.maxHeight&&(this.xAxisHeight=o.config.xaxis.labels.maxHeight),o.config.xaxis.labels.minHeight&&this.xAxisHeight{d+=h.labels.minWidth,f+=h.labels.maxWidth}),this.yAxisWidthf&&(this.yAxisWidth=f)}};const yu=1e3,xu=60*yu,wu=60*xu,vc=24*wu,$E=7*vc,b0=30*vc,Qa=365*vc,Hye=10/(24*60*60),y0=[{unit:"second",step:1,approxMs:yu},{unit:"second",step:5,approxMs:5*yu},{unit:"second",step:15,approxMs:15*yu},{unit:"second",step:30,approxMs:30*yu},{unit:"minute",step:1,approxMs:xu},{unit:"minute",step:5,approxMs:5*xu},{unit:"minute",step:15,approxMs:15*xu},{unit:"minute",step:30,approxMs:30*xu},{unit:"hour",step:1,approxMs:wu},{unit:"hour",step:3,approxMs:3*wu},{unit:"hour",step:6,approxMs:6*wu},{unit:"hour",step:12,approxMs:12*wu},{unit:"day",step:1,approxMs:vc},{unit:"day",step:2,approxMs:2*vc},{unit:"week",step:1,approxMs:$E},{unit:"week",step:2,approxMs:2*$E},{unit:"month",step:1,approxMs:b0},{unit:"month",step:3,approxMs:3*b0},{unit:"month",step:6,approxMs:6*b0},{unit:"year",step:1,approxMs:Qa},{unit:"year",step:2,approxMs:2*Qa},{unit:"year",step:5,approxMs:5*Qa},{unit:"year",step:10,approxMs:10*Qa},{unit:"year",step:25,approxMs:25*Qa},{unit:"year",step:50,approxMs:50*Qa},{unit:"year",step:100,approxMs:100*Qa}],RF=10;let LF=class{constructor(e,n){this.w=e,this.ctx=n,this.tickInterval=null,this.timeScaleArray=[],this.utc=e.config.xaxis.labels.datetimeUTC}calculateTimeScaleTicks(e,n){const i=this.w;if(i.globals.allSeriesCollapsed)return i.labelData.labels=[],i.labelData.timescaleLabels=[],this.timeScaleArray=[],[];const o=n-e,r=o/vc;i.interact.disableZoomIn=!1,i.interact.disableZoomOut=!1,r5e4&&(i.interact.disableZoomOut=!0);const a=Number.isFinite(i.config.xaxis.tickAmount)?i.config.xaxis.tickAmount:RF;this.tickInterval=Wye(o,a);const s=this.generateBaseTicks(e,n,this.tickInterval);return this.timeScaleArray=s,s}generateBaseTicks(e,n,i){const o=this.w,r=new Ei(o),a=this.utc,s=o.layout.gridWidth,l=n-e,c=[];let u=r.ceilToBoundary(e,i.unit,i.step,a),d=0;const f=5e3;for(;u<=n&&d0?(u-e)/l*s:0;c.push({timestamp:u,position:p,unit:i.unit,year:h.year,month:h.month+1,day:h.date,hour:h.hour,minute:h.minute,second:h.second,value:u}),u=r.addInterval(u,i.unit,i.step,a),d++}return c}recalcDimensionsBasedOnFormat(e){const n=this.w,i=this.formatDates(e),o=this.removeOverlappingTS(i);n.labelData.timescaleLabels=o.slice();const a=new QC(this.w,this.ctx).plotCoords();this.ctx._writeLayoutCoords(a.layout)}formatDates(e){const n=this.w,i=new Ei(n),o=n.config.xaxis.labels.format,r=n.config.xaxis.labels.datetimeFormatter,a=this.utc,s=(c,u=2)=>String(c).padStart(u,"0"),l=o||this._effectiveFormat(e,r);return e.map(c=>{const u=i.getDate(c.timestamp),d=i.formatDate(u,l);return{dateString:`${c.year}-${s(c.month)}-${s(c.day)}T${s(c.hour)}:${s(c.minute)}:${s(c.second)}.000${a?"Z":""}`,position:c.position,value:d,unit:c.unit,year:c.year,month:c.month}})}_effectiveFormat(e,n){if(e.length===0)return n.day||"dd MMM";const i=this.tickInterval&&this.tickInterval.unit||e[0].unit,o=n[i==="week"?"day":i]||n.day||"dd MMM",r=e[0],a=e[e.length-1],s=r.year!==a.year,c=s||r.month!==a.month||r.day!==a.day,u=/y/i.test(o),d=/M/.test(o),f=/d/i.test(o);return i==="month"||i==="week"||i==="day"?s&&!u?o+" yyyy":o:(i==="hour"||i==="minute"||i==="second")&&c&&!f&&!d?(s?"dd MMM yyyy":"dd MMM")+" "+o:o}removeOverlappingTS(e){if(e.length===0)return[];const n=this.w,i=new it(n);let o=!1,r;e[0].value&&e.every(l=>l.value.length===e[0].value.length)&&(o=!0,r=i.getTextRects(e[0].value,n.config.xaxis.labels.style.fontSize).width);let a=0;return e.map((l,c)=>{if(c===0||!n.config.xaxis.labels.hideOverlappingLabels)return l;const u=o?r:i.getTextRects(e[a].value,n.config.xaxis.labels.style.fontSize).width,d=e[a].position;return l.position>d+u+10?(a=c,l):null}).filter(l=>l!==null)}};function Wye(t,e){if((!Number.isFinite(e)||e<=0)&&(e=RF),t<=0)return y0[0];const n=t/e;let i=y0[0],o=1/0;for(const r of y0){const a=Math.abs(Math.log(r.approxMs/n));a after apexcharts.core.js, or load the full apexcharts.js instead.`);return e}let FF=class{constructor(e,n,i){this.w=n,this.ctx=i,this.el=e}setupElements(){const{globals:e,config:n}=this.w,i=n.chart.type,o=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","violin","scatter","bubble"],r=[...o,"radar","heatmap","treemap"],a=!r.includes(i)&&!["pie","donut","polarArea","radialBar"].includes(i)&&Lr(i);e.axisCharts=r.includes(i)||a,e.xyCharts=o.includes(i)||a,e.isBarHorizontal=["bar","rangeBar","boxPlot","violin"].includes(i)&&n.plotOptions.bar.horizontal,e.chartClass=`.apexcharts${e.chartID}`,this.w.dom.baseEl=this.el,this.w.dom.elWrap=nt.createElementNS("http://www.w3.org/1999/xhtml","div"),it.setAttrs(this.w.dom.elWrap,{id:e.chartClass.substring(1),class:`apexcharts-canvas ${e.chartClass.substring(1)}`}),this.el.appendChild(this.w.dom.elWrap);const s=globalThis.SVG;if(this.w.dom.Paper=s().addTo(this.w.dom.elWrap),this.w.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:`translate(${n.chart.offsetX}, ${n.chart.offsetY})`}),this.w.dom.Paper.node.style.background=n.theme.mode==="dark"&&!n.chart.background?"#343A3F":n.theme.mode==="light"&&!n.chart.background?"#fff":n.chart.background,this.setSVGDimensions(),this.w.dom.elLegendForeign=nt.createElementNS(Wt,"foreignObject"),it.setAttrs(this.w.dom.elLegendForeign,{x:0,y:0,width:e.svgWidth,height:e.svgHeight}),this.w.dom.elLegendWrap=nt.createElementNS("http://www.w3.org/1999/xhtml","div"),this.w.dom.elLegendWrap.classList.add("apexcharts-legend"),this.w.dom.elWrap.appendChild(this.w.dom.elLegendWrap),this.w.dom.Paper.node.appendChild(this.w.dom.elLegendForeign),n.chart.accessibility.enabled&&n.chart.accessibility.announcements.enabled){const l=nt.createElement("div");l.className="apexcharts-sr-status",l.setAttribute("role","status"),l.setAttribute("aria-live","polite"),l.setAttribute("aria-atomic","true"),this.w.dom.elWrap.appendChild(l)}if(n.chart.accessibility.enabled){const l=this.getAccessibleChartLabel(),c=n.chart.accessibility.keyboard.enabled&&n.chart.accessibility.keyboard.navigation.enabled?"application":"img";if(this.w.dom.Paper.attr({role:c,"aria-label":l}),n.chart.accessibility.description){const u=nt.createElementNS(Wt,"desc");u.textContent=n.chart.accessibility.description,this.w.dom.Paper.node.insertBefore(u,this.w.dom.elLegendForeign.nextSibling)}}this.w.dom.elGraphical=this.w.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),this.w.dom.elDefs=this.w.dom.Paper.defs(),this.w.dom.Paper.add(this.w.dom.elGraphical),this.w.dom.elGraphical.add(this.w.dom.elDefs)}_classifySeriesByType(e){const{w:n}=this,{config:i,globals:o}=n,r={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},bar:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},violin:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},a={},s=i.chart.type||"line";let l=null,c=0;return this.w.seriesData.series.forEach((u,d)=>{var f,h;const p=((f=e[d])==null?void 0:f.type)==="column"?"bar":((h=e[d])==null?void 0:h.type)||(s==="column"?"bar":s),g=r;g[p]?(p==="rangeArea"?(g[p].series.push(this.w.rangeData.seriesRangeStart[d]),g[p].seriesRangeEnd.push(this.w.rangeData.seriesRangeEnd[d])):g[p].series.push(u),g[p].i.push(d),p==="bar"&&(n.globals.columnSeries=r.bar)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar","unit","sunburst"].includes(p)?l=p:Lr(p)?(a[p]||(a[p]={series:[],i:[]}),a[p].series.push(u),a[p].i.push(d)):console.warn(`You have specified an unrecognized series type (${p}).`),s!==p&&p!=="scatter"&&c++}),c>0&&(l&&console.warn(`Chart or series type ${l} cannot appear with other chart or series types.`),r.bar.series.length>0&&i.plotOptions.bar.horizontal&&(c-=r.bar.series.length,r.bar={series:[],i:[]},n.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),o.comboCharts||(o.comboCharts=c>0),{seriesTypes:r,customBuckets:a}}plotChartType(e,n){const{w:i,ctx:o}=this,r=o.renderer&&o.renderer.kind==="canvas";r&&o.renderer.beginSeries();const{seriesTypes:a,customBuckets:s}=this._classifySeriesByType(e),l=this._instantiateSeriesRenderers(a,n),c=this._assembleSeriesGraphics(a,s,l,n);if(r){const u=o.renderer;if(u&&u._repaintHostInPlace){u._repaintHostInPlace=!1;const f=this.w.dom.elGraphical.node.querySelector(".apexcharts-canvas-series-wrap");if(f&&u.canRepaintInPlace&&u.canRepaintInPlace())return u.repaintInPlace(),(Array.isArray(c)?c:[c]).forEach(p=>{p&&p.node&&f.appendChild(p.node)}),[]}const d=o.renderer.present();if(d){const f=new it(i).group({class:"apexcharts-canvas-series-wrap"});return f.add(d),(Array.isArray(c)?c:[c]).forEach(p=>{p&&f.add(p)}),f}}return c}_instantiateSeriesRenderers(e,n){const{w:i,ctx:o}=this,{config:r,globals:a}=i,l=e.line.series.length>0||e.area.series.length>0||e.scatter.series.length>0||e.bubble.series.length>0||e.rangeArea.series.length>0||!a.comboCharts&&["line","area","scatter","bubble","rangeArea"].includes(r.chart.type)?new(hn("line"))(o.w,o,n):null,u=e.candlestick.series.length>0||e.boxPlot.series.length>0||!a.comboCharts&&["candlestick","boxPlot"].includes(r.chart.type)?new(hn("candlestick"))(o.w,o,n):null,f=e.violin.series.length>0||!a.comboCharts&&r.chart.type==="violin"?new(hn("violin"))(o.w,o,n):null,h=!a.comboCharts&&["pie","donut","polarArea"].includes(r.chart.type);o.pie=h?new(hn("pie"))(o.w,o):null;const p=e.rangeBar.series.length>0||!a.comboCharts&&r.chart.type==="rangeBar";return o.rangeBar=p?new(hn("rangeBar"))(o.w,o,n):null,{line:l,boxCandlestick:u,violin:f}}_assembleSeriesGraphics(e,n,i,o){const{w:r,ctx:a}=this,{config:s,globals:l}=r,{line:c,boxCandlestick:u,violin:d}=i;let f=[];if(l.comboCharts){const h=new Xi(this.w);if(e.area.series.length>0&&f.push(...h.drawSeriesByGroup(e.area,l.areaGroups,"area",c)),e.bar.series.length>0)if(s.chart.stacked){const p=new(hn("barStacked"))(a.w,a,o);f.push(p.draw(e.bar.series,e.bar.i))}else a.bar=new(hn("bar"))(a.w,a,o),f.push(a.bar.draw(e.bar.series,e.bar.i));if(e.rangeArea.series.length>0&&f.push(c.draw(e.rangeArea.series,"rangeArea",e.rangeArea.i,e.rangeArea.seriesRangeEnd)),e.line.series.length>0&&f.push(...h.drawSeriesByGroup(e.line,l.lineGroups,"line",c)),e.candlestick.series.length>0&&f.push(u.draw(e.candlestick.series,"candlestick",e.candlestick.i)),e.boxPlot.series.length>0&&f.push(u.draw(e.boxPlot.series,"boxPlot",e.boxPlot.i)),e.violin.series.length>0&&f.push(d.draw(e.violin.series,"violin",e.violin.i)),e.rangeBar.series.length>0&&f.push(a.rangeBar.draw(e.rangeBar.series,e.rangeBar.i)),e.scatter.series.length>0){const p=new(hn("line"))(a.w,a,o,!0);f.push(p.draw(e.scatter.series,"scatter",e.scatter.i))}if(e.bubble.series.length>0){const p=new(hn("line"))(a.w,a,o,!0);f.push(p.draw(e.bubble.series,"bubble",e.bubble.i))}Object.keys(n).forEach(p=>{const g=n[p];if(g.series.length>0){const m=new(hn(p))(a.w,a,o);f.push(m.draw(g.series,p,g.i))}})}else{const h=s.chart.type;switch(h){case"line":f=c.draw(this.w.seriesData.series,"line");break;case"area":f=c.draw(this.w.seriesData.series,"area");break;case"bar":s.chart.stacked?f=new(hn("barStacked"))(a.w,a,o).draw(this.w.seriesData.series):(a.bar=new(hn("bar"))(a.w,a,o),f=a.bar.draw(this.w.seriesData.series));break;case"candlestick":f=u.draw(this.w.seriesData.series,"candlestick");break;case"boxPlot":f=u.draw(this.w.seriesData.series,h);break;case"violin":f=d.draw(this.w.seriesData.series,"violin");break;case"rangeBar":f=a.rangeBar.draw(this.w.seriesData.series);break;case"rangeArea":f=c.draw(this.w.rangeData.seriesRangeStart,"rangeArea",void 0,this.w.rangeData.seriesRangeEnd);break;case"heatmap":{f=new(hn("heatmap"))(a.w,a,o).draw(this.w.seriesData.series);break}case"treemap":{f=new(hn("treemap"))(a.w,a).draw(this.w.seriesData.series);break}case"unit":{f=new(hn("unit"))(a.w,a).draw(this.w.seriesData.series);break}case"sunburst":{f=new(hn("sunburst"))(a.w,a).draw(this.w.seriesData.series);break}case"pie":case"donut":case"polarArea":f=a.pie.draw(this.w.seriesData.series);break;case"radialBar":{f=new(hn("radialBar"))(a.w,a).draw(this.w.seriesData.series);break}case"radar":{f=new(hn("radar"))(a.w,a).draw(this.w.seriesData.series);break}default:Lr(h)?f=new(hn(h))(a.w,a,o).draw(this.w.seriesData.series,h):f=c.draw(this.w.seriesData.series)}}return f}_extractDimensionUnit(e){return String(e).split(/[0-9]+/g).pop()}setSVGDimensions(){var e;const{globals:n,config:i}=this.w;i.chart.width=i.chart.width||"100%",i.chart.height=i.chart.height||"auto";const o=i.chart.width,r=i.chart.height;n.svgWidth=NaN,n.svgHeight=NaN;let a=we.getDimensions(this.el);const s=this._extractDimensionUnit(o);s==="%"?we.isNumber(a[0])&&(a[0].width===0&&(a=we.getDimensions(this.el.parentNode)),n.svgWidth=a[0]*parseInt(o,10)/100):(s==="px"||s==="")&&(n.svgWidth=parseInt(o,10));const l=this._extractDimensionUnit(r);if(r!=="auto"&&r!=="")if(l==="%"){const c=we.getDimensions(this.el.parentNode);n.svgHeight=c[1]*parseInt(r,10)/100}else n.svgHeight=parseInt(r,10);else n.svgHeight=n.axisCharts?n.svgWidth/1.61:n.svgWidth/1.2;if(this._applyWeaveReservation(n),n.svgWidth=Math.max(n.svgWidth,0),n.svgHeight=Math.max(n.svgHeight,0),it.setAttrs(this.w.dom.Paper.node,{width:n.svgWidth,height:n.svgHeight}),l!=="%"&&Ge.isBrowser()){const c=n.axisCharts&&(i.grid.show||i.dataLabels.enabled||i.xaxis.labels.show||i.xaxis.axisBorder.show||i.xaxis.axisTicks.show||i.yaxis.some(f=>f.show&&(f.labels.show||f.axisBorder.show||f.axisTicks.show))),u=i.chart.sparkline.enabled||!c?0:i.chart.parentHeightOffset,d=this.w.dom.Paper.node;(e=d.parentNode)!=null&&e.parentNode&&(d.parentNode.parentNode.style.minHeight=`${n.svgHeight+u}px`)}this.w.dom.elWrap.style.width=`${n.svgWidth}px`,this.w.dom.elWrap.style.height=`${n.svgHeight}px`,n.lastResizeSignature=this.getResizeSignature()}_applyWeaveReservation(e){const n=this.ctx&&this.ctx.weave;if(!n||typeof n.reservedBox!="function")return;const i=n.reservedBox(),o=i.left+i.right,r=i.top+i.bottom;!o&&!r||(o&&Number.isFinite(e.svgWidth)&&(e.svgWidth-=Math.min(o,e.svgWidth/2)),r&&Number.isFinite(e.svgHeight)&&(e.svgHeight-=Math.min(r,e.svgHeight/2)))}getResizeSignature(){const{config:e}=this.w,n=(e.chart.width||"100%").toString().trim(),i=(e.chart.height||"auto").toString().trim();let o=0,r=0;if(n.endsWith("%")){let s=we.getDimensions(this.el);s[0]||(s=we.getDimensions(this.el.parentNode)),o=s[0]||0}i.endsWith("%")&&(r=we.getDimensions(this.el.parentNode)[1]||0);const a={w:Math.round(o),h:Math.round(r)};return e.responsive&&e.responsive.length&&Ge.isBrowser()&&(a.iw=window.innerWidth),a}shiftGraphPosition(){const{globals:e}=this.w,{translateY:n,translateX:i}=e;it.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${i}, ${n})`})}resizeNonAxisCharts(){var e,n,i,o,r,a,s,l,c;const{w:u}=this,d=u.config.chart.height?String(u.config.chart.height):"",f=d!==""&&d!=="auto",h=d.includes("%");let p=0,g=u.config.chart.sparkline.enabled?1:15;g+=u.layout.gridPad.bottom,["top","bottom"].includes(u.config.legend.position)&&u.config.legend.show&&!u.config.legend.floating&&(p=((n=(e=this.ctx.legend)==null?void 0:e.legendHelpers.getLegendDimensions().clwh)!=null?n:0)+7);const m=u.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie, .apexcharts-sunburst"),v=u.globals.pieExternalLabelMarginY||0;let b=v>0?u.globals.radialSize*2+v*2:u.globals.radialSize*2.05;const y=u.config.chart.type==="sunburst"?"sunburst":u.config.chart.type==="pie"||u.config.chart.type==="donut"||u.config.chart.type==="polarArea"?"pie":"radialBar",w=Math.abs(u.config.plotOptions[y].endAngle-u.config.plotOptions[y].startAngle);if(m&&!u.config.chart.sparkline.enabled&&w<360){const $=we.getBoundingClientRect(this.w.dom.Paper.node);let S=1/0,_=-1/0;const P=R=>{var D,F,N,B;if((D=R.classList)!=null&&D.contains("apexcharts-radialbar-hollow"))return;const z=(N=(F=R.tagName)==null?void 0:F.toLowerCase)==null?void 0:N.call(F);if(z==="text"||z==="tspan")return;const W=Array.from((B=R.children)!=null?B:[]);if(W.length>0){W.forEach(V=>P(V));return}const j=we.getBoundingClientRect(R);if(j.bottom-j.top>0){const V=j.top-$.top,q=j.bottom-$.top;V_&&(_=q)}};Array.from((i=m.children)!=null?i:[]).forEach(R=>P(R)),Number.isFinite(S)||(S=0),Number.isFinite(_)||(_=we.getBoundingClientRect(m).bottom-$.top);const O=Math.max(g,u.globals.radialSize*.2),T=Math.max(O-S,0);T!==0&&(u.layout.translateY=((o=u.layout.translateY)!=null?o:0)+T,it.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${(r=u.layout.translateX)!=null?r:0}, ${u.layout.translateY})`}),_+=T),b=_>0?_:u.globals.radialSize*2.05;const M=Math.max(O,S),I=Math.ceil(b+p+M),k=(a=u.config.chart.offsetY)!=null?a:0,E=I+Math.max(k,0);if(!h){if(this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute("height",String(E)),this.w.dom.elWrap.style.height=`${E}px`,it.setAttrs(this.w.dom.Paper.node,{height:I}),Ge.isBrowser()){const R=(s=this.w.dom.Paper.node.parentNode)==null?void 0:s.parentNode;R&&(R.style.minHeight=`${E}px`)}u.globals.svgHeight=I,u.config.legend.position==="bottom"&&u.config.legend.show&&!u.config.legend.floating&&((l=this.ctx.legend)==null||l.setLegendWrapXY(20,0))}return}const x=Math.ceil(b+this.w.layout.translateY+p+g);if(!f&&(this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute("height",String(x)),this.w.dom.elWrap.style.height=`${x}px`,it.setAttrs(this.w.dom.Paper.node,{height:x}),Ge.isBrowser())){const $=(c=this.w.dom.Paper.node.parentNode)==null?void 0:c.parentNode;$&&($.style.minHeight=`${x}px`)}}coreCalculations(){new Tg(this.w).init()}resetGlobals(){const e=()=>this.w.config.series.map(()=>[]),n=new KC,{globals:i}=this.w,o={dataWasParsed:this.w.axisFlags.dataWasParsed,originalSeries:i.originalSeries};n.initGlobalVars(i),i.seriesXvalues=e(),i.seriesYvalues=e(),o.dataWasParsed&&(this.w.axisFlags.dataWasParsed=o.dataWasParsed,i.originalSeries=o.originalSeries)}isMultipleY(){return Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1?(this.w.globals.isMultipleYAxis=!0,!0):!1}xySettings(){const{w:e}=this;let n=null;if(e.globals.axisCharts){if(e.config.xaxis.crosshairs.position==="back"&&new Eg(this.w).drawXCrosshairs(),e.config.yaxis[0].crosshairs.position==="back"&&new Eg(this.w).drawYCrosshairs(),e.config.xaxis.type==="datetime"&&e.config.xaxis.labels.formatter===void 0){this.ctx.timeScale=new LF(this.w,this.ctx);let o=[];isFinite(e.globals.minX)&&isFinite(e.globals.maxX)&&!e.globals.isBarHorizontal?o=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minX,e.globals.maxX):e.globals.isBarHorizontal&&(o=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minY,e.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(o)}n=new Xi(this.w).getCalculatedRatios()}return n}updateSourceChart(e){this.ctx.w.interact.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:e.w.globals.minX,max:e.w.globals.maxX}}}},!1,!1)}setupBrushHandler(){const{ctx:e,w:n}=this;if(n.config.chart.brush.enabled&&typeof n.config.chart.events.selection!="function"){const i=Array.isArray(n.config.chart.brush.targets)?n.config.chart.brush.targets:[n.config.chart.brush.target];i.forEach(o=>{const r=e.constructor.getChartByID(o);if(!r){console.warn(`ApexCharts: brush target "${o}" was not found. Ensure the target chart is rendered (and its chart.id matches) before the brush chart.`);return}r.w.globals.brushSource=this.ctx,typeof r.w.config.chart.events.zoomed!="function"&&(r.w.config.chart.events.zoomed=()=>this.updateSourceChart(r)),typeof r.w.config.chart.events.scrolled!="function"&&(r.w.config.chart.events.scrolled=()=>this.updateSourceChart(r))}),n.config.chart.events.selection=(o,r)=>{i.forEach(a=>{const s=e.constructor.getChartByID(a);s&&s.ctx.updateHelpers._updateOptions({xaxis:{min:r.xaxis.min,max:r.xaxis.max}},!1,!1,!1,!1)})}}}getAccessibleChartLabel(){const e=this.w,n=e.config;if(n.chart.accessibility&&n.chart.accessibility.description)return n.chart.accessibility.description;const i=n.chart.type,o=[];if(n.title.text)o.push(`${n.title.text}. ${i} chart`),n.subtitle.text&&o.push(n.subtitle.text);else{const r=Array.isArray(e.seriesData.seriesNames)&&e.seriesData.seriesNames.length?e.seriesData.seriesNames.filter(Boolean):Array.isArray(n.series)?n.series.map(s=>typeof s=="object"&&s!==null?s.name:null).filter(Boolean):[],a=e.seriesData.series.length||(n.series?n.series.length:0);r.length?o.push(`${i} chart with ${a} data series: ${r.join(", ")}`):o.push(`${i} chart with ${a} data series`)}return o.join(". ")}};const Lx="__apexcharts_series_transforms__";globalThis[Lx]||(globalThis[Lx]={});function Yye(){return globalThis[Lx]}function Gye(t){return t&&Yye()[t]||null}function Kye(t,e){const n=t.config.drilldown;return(n&&Array.isArray(n.series)?n.series:[]).find(o=>o&&o.id===e)}function Fx(t,e,n,i,o,r=null,a={}){var s,l,c;const u=e&&typeof e=="object",d=u&&(l=(s=e.x)!=null?s:e.name)!=null?l:"",f=Number(u?(c=e.y)!=null?c:e.value:e),h={name:String(d),value:isNaN(f)?null:f,color:u&&e.color?e.color:void 0,_key:`${o}/${n}:${d}`};if(i&&!h.color&&(h.color=i[n%i.length]),a.keepDatum&&(h._datum=e),u&&Array.isArray(e.children)&&e.children.length)h.children=e.children.map((p,g)=>Fx(t,p,g,null,h._key,r,a));else if(u&&e.drilldown!=null&&a.expandDrilldown!==!1){const p=r||new Set;if(!p.has(e.drilldown)){const g=Kye(t,e.drilldown);if(g&&Array.isArray(g.data)&&g.data.length){const m=new Set(p);m.add(e.drilldown);const v=Array.isArray(g.colors)?g.colors:null;h.children=g.data.map((b,y)=>Fx(t,b,y,v,h._key,m,a))}}}return h}function Uye(t,e,n={}){const i=e||t.config.series;return Array.isArray(i)?i.map((o,r)=>{var a,s;const l=o&&Array.isArray(o.data)?o.data:[],c=`${r}:${(a=o==null?void 0:o.name)!=null?a:""}`;return{name:String((s=o==null?void 0:o.name)!=null?s:""),value:null,color:(o==null?void 0:o.color)||void 0,_key:c,_seriesIndex:r,children:l.map((d,f)=>Fx(t,d,f,null,c,null,n))}}):[]}function NF(t){t.children&&t.children.length&&(t.children.forEach(e=>NF(e)),(t.value==null||isNaN(t.value))&&(t.value=t.children.reduce((e,n)=>e+Math.max(0,n.value||0),0))),(t.value==null||isNaN(t.value))&&(t.value=0)}function qye(t,e={}){if(!Array.isArray(t))return!1;const n=e.drilldown!==!1;for(let i=0;i{const r=[],a=(s,l,c)=>{s._parent=c,s._depth=l,s._si=o,s._leaf=!(s.children&&s.children.length),l>n&&(n=l),s._leaf?(s._di=r.length,r.push(s)):(s._di=-1,s.children.forEach(u=>a(u,l+1,s)))};a(i,0,null),e.push(r)}),{leaves:e,maxDepth:n}}function Qye(t){const e=t._datum;if(e&&typeof e=="object"){const n=wt(Je({},e),{x:t.name,y:t.value});return delete n.children,n}return{x:t.name,y:t.value}}function exe(t,e){const n=Uye(t,e,{keepDatum:!0,expandDrilldown:BF(t)});n.forEach(NF);const{leaves:i,maxDepth:o}=Jye(n),r=e.map((a,s)=>wt(Je({},a),{data:(i[s]||[]).map(Qye)}));return{roots:n,leafSeries:r,maxDepth:o}}const txe={histogram:"stats",raincloud:"raincloud"};let t$=class ca{constructor(e,{resetGlobals:n=()=>{},isMultipleY:i=()=>{}}={}){this.w=e,this.resetGlobals=n,this.isMultipleY=i,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this._warnedMissingTransform=!1,this.coreUtils=new Xi(this.w),this.activeSeriesIndex=0}getFirstDataPoint(){const e=this.w.config.series,n=new js(this.w);this.activeSeriesIndex=n.getActiveConfigSeriesIndex();const i=e[this.activeSeriesIndex];return i&&i.data&&i.data.length>0&&i.data[0]!==null&&typeof i.data[0]<"u"?i.data[0]:null}isMultiFormat(){return this.isFormatXY()||this.isFormat2DArray()}isFormatXY(){var e;const n=this.getFirstDataPoint();if(!n||typeof n.x>"u")return!1;const i=(e=this.w.config.series[this.activeSeriesIndex])==null?void 0:e.data;if(i){const o=r=>r&&typeof r.x<"u";for(let r=1;r2)return!1;const $=x[0],S=x[1];if(h)if(typeof $=="number"){$===$&&($g&&(g=$));const _=$-b;_>0?_l&&(l=S),S=1e-6&&_<1e21){const P=""+S,O=P.indexOf("."),T=O===-1?0:P.length-O-1;T>f&&(f=T)}else{const P=we.noExponents(S);we.isFloat(P)&&(f=Math.max(f,P.toString().split(".")[1].length))}}}else d=!0;else if(S===null)d=!0;else return!1;a[w]=S,s[w]=$}this.twoDSeries=a,this.twoDSeriesX=s,this.w.axisFlags.dataFormatXNumeric=!0;const y=(o=(i=this.w.seriesData)._parsedExtrema)!=null?o:i._parsedExtrema=[];return y[n]={ref:a,len:r,maxY:l,lowestY:c,negMinY:u,hasNulls:d,yDec:f,xref:s,xNumeric:h,minX:p,maxX:g,xSorted:m,minXDiff:v},!0}handleFormat2DArray(e,n){const i=this.w.config,o=e[n].data,r=i.chart.type==="boxPlot"||i.series[n].type==="boxPlot";if(!(!r&&i.xaxis.type!=="datetime"&&this._fast2DArrayParse(o,n)))for(let a=0;a=5?this.twoDSeries.push(we.parseNumber(s[4])):this.twoDSeries.push(we.parseNumber(c)),this.w.axisFlags.dataFormatXNumeric=!0),i.xaxis.type==="datetime"){const d=new Date(l).getTime();this.twoDSeriesX.push(d)}else this.twoDSeriesX.push(l);typeof u<"u"&&(this.threeDSeries.push(u),this.w.axisFlags.isDataXYZ=!0)}}handleFormatXY(e,n){const i=this.w.config,o=this.w.globals,r=new Ei(this.w),a=e[n].data;let s=n;o.collapsedSeriesIndices.indexOf(n)>-1&&(s=this.activeSeriesIndex);const l=e[s].data;for(let c=0;c"u"&&(this.seriesGoals[n]=[]),typeof u.goals<"u"&&Array.isArray(u.goals)?this.seriesGoals[n].push(u.goals):this.seriesGoals[n].push(null),typeof u.z<"u"&&(this.threeDSeries.push(u.z),this.w.axisFlags.isDataXYZ=!0)}for(let c=0;c{o&&o.forEach(r=>{const a=r.y,s=a.length;if(!(s<=1))for(let l=0;lwe.parseNumber(h)).filter(h=>h!==null&&!isNaN(h));c=f.length?Math.min(...f):null,u=f.length?Math.max(...f):null}else{const d=l==null?null:l.y;Array.isArray(d)?(c=we.parseNumber(d[0]),u=we.parseNumber(d[d.length-1])):c=u=we.parseNumber(d)}r.push(c),a.push(u)}this.w.rangeData.seriesRangeStart[n]=r,this.w.rangeData.seriesRangeEnd[n]=a}handleCandleStickBoxData(e,n){let i={o:[],h:[],m:[],l:[],c:[]};return this.isFormat2DArray()?i=this.handleCandleStickBoxDataFormat("array",e,n):this.isFormatXY()&&(i=this.handleCandleStickBoxDataFormat("xy",e,n)),this.w.candleData.seriesCandleO[n]=i.o,this.w.candleData.seriesCandleH[n]=i.h,this.w.candleData.seriesCandleM[n]=i.m,this.w.candleData.seriesCandleL[n]=i.l,this.w.candleData.seriesCandleC[n]=i.c,this.w.candleData.seriesBoxPoints[n]=i.points||[],i}handleViolinData(e,n){var i,o,r,a,s,l,c,u;const d=this.w,f=e[n].data,h=[],p=[],g=[],m=[],v=[],b=[];for(let y=0;yO&&(O=D,T=R),RI&&(I=R))}const k=[];for(let E=0;E<$.length;E++){const R=we.parseNumber($[E]);R!==null&&(k.push(R),RI&&(I=R))}S&&(S[0]I&&(I=S[4])),h.push({values:_,weights:P,maxWeight:O}),p.push(k),g.push(S),m.push(M===1/0?0:M),v.push(I===-1/0?0:I),b.push(T!==null?T:k.length?k[Math.floor(k.length/2)]:0)}d.violinData.seriesViolinDensity[n]=h,d.violinData.seriesViolinPoints[n]=p,d.violinData.seriesViolinSummary[n]=g,d.violinData.seriesViolinMin[n]=m,d.violinData.seriesViolinMax[n]=v,this.twoDSeries=b}_parseViolinSummary(e){if(!Array.isArray(e)||e.length!==5)return null;const n=[];for(let i=0;i<5;i++){const o=we.parseNumber(e[i]);if(o===null||i>0&&o{if(!a.has(l.x)){const c={x:l.x,overlaps:new Set,y:[]};a.set(l.x,c),s.push(c)}}),e==="array")for(let l=0;lm.slice(1):h=m=>Array.isArray(m[1])?m[1]:[]}else h=p=>Array.isArray(p.y)?p.y:[];for(let p=0;p=2&&(a.push(g[0]),s.push(g[1]),r?(l.push(g[2]),c.push(g[3]),u.push(g[4])):(c.push(g[2]),u.push(g[3])));const m=f[p]&&f[p].points;d.push(Array.isArray(m)?m:[])}return{o:a,h:s,m:l,l:c,c:u,points:d}}parseDataAxisCharts(e){var n,i,o,r,a,s;const l=this.w.config,c=this.w.globals,u=new Ei(this.w);this.w.seriesData._parsedExtrema=[];const d=l.labels.length>0?l.labels.slice():l.xaxis.categories.slice();this.w.axisFlags.isRangeBar=l.chart.type==="rangeBar"&&c.isBarHorizontal,this.w.labelData.hasXaxisGroups=l.xaxis.type==="category"&&l.xaxis.group.groups.length>0,this.w.labelData.hasXaxisGroups&&(this.w.labelData.groups=l.xaxis.group.groups),e.forEach((g,m)=>{g.name!==void 0?this.w.seriesData.seriesNames.push(g.name):this.w.seriesData.seriesNames.push("series-"+parseInt(String(m+1),10))}),this.coreUtils.setSeriesYAxisMappings();const f=[],h=[...new Set(l.series.map(g=>g.group))];l.series.forEach((g,m)=>{const v=h.indexOf(g.group);f[v]||(f[v]=[]),f[v].push(this.w.seriesData.seriesNames[m])}),this.w.labelData.seriesGroups=f;const p=()=>{for(let g=0;g"u"&&(console.error("It is a possibility that you may have not included 'data' property in series."),e[g]=wt(Je({},e[g]),{data:[]}));const m=l.chart.dataReducer,v=(i=(n=c.dataReducerRawSeries)==null?void 0:n[g])==null?void 0:i.data;if(m!=null&&m.enabled&&this.isMultiFormat()&&Array.isArray(v)&&v.length>((o=m.threshold)!=null?o:500)){const y=(r=m.targetPoints)!=null?r:250,w=l.xaxis.min,x=l.xaxis.max,$=w==null&&x==null?v:ca.sliceByXRange(v,w,x);let S=$;if($.length>y){const _=Array.isArray($[0])?(s=$[0])==null?void 0:s[1]:(a=$[0])==null?void 0:a.y;Array.isArray(_)?_.length===4?S=ca.ohlcAggregate($,y):_.length===2&&(S=ca.rangeAggregate($,y)):S=ca.lttbDownsample($,y)}e[g]=wt(Je({},e[g]),{data:S})}(l.chart.type==="rangeBar"||l.chart.type==="rangeArea"||e[g].type==="rangeBar"||e[g].type==="rangeArea")&&(this.w.axisFlags.isRangeData=!0,this.handleRangeData(e,g));const b=e[g].type||l.chart.type;if(Lr(b)){const y=hn(b),w=y&&y.yExtent;(y&&y.dataType==="rangeXY"||typeof w=="function")&&(this.w.axisFlags.isRangeData=!0,this.handleCustomRangeData(e,g,w))}if(this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(e,g):this.isFormatXY()&&this.handleFormatXY(e,g),(l.chart.type==="candlestick"||e[g].type==="candlestick"||l.chart.type==="boxPlot"||e[g].type==="boxPlot")&&this.handleCandleStickBoxData(e,g),(l.chart.type==="violin"||e[g].type==="violin")&&this.handleViolinData(e,g),this.w.seriesData.series.push(this.twoDSeries),this.w.labelData.labels.push(this.twoDSeriesX),this.w.seriesData.seriesX.push(this.twoDSeriesX),this.w.seriesData.seriesGoals=this.seriesGoals,g===this.activeSeriesIndex&&!this.fallbackToCategory&&(this.w.axisFlags.isXNumeric=!0);else{l.xaxis.type==="datetime"?(this.w.axisFlags.isXNumeric=!0,p(),this.w.seriesData.seriesX.push(this.twoDSeriesX)):l.xaxis.type==="numeric"&&(this.w.axisFlags.isXNumeric=!0,d.length>0&&(this.twoDSeriesX=d,this.w.seriesData.seriesX.push(this.twoDSeriesX))),this.w.labelData.labels.push(this.twoDSeriesX);const y=e[g].data.map(w=>we.parseNumber(w));this.w.seriesData.series.push(y)}this.w.seriesData.seriesZ.push(this.threeDSeries),e[g].color!==void 0?this.w.seriesData.seriesColors.push(e[g].color):this.w.seriesData.seriesColors.push(void 0)}return this.w}parseDataNonAxisCharts(e){const n=this.w.config;this.w.seriesData.unitData=[];const i=Array.isArray(e)&&e.every(a=>typeof a=="number")&&n.labels.length>0,o=Array.isArray(e)&&e.some(a=>a&&typeof a=="object"&&a.data||a&&typeof a=="object"&&a.parsing);if(n.chart.type==="unit"&&o&&!i)return this.parseUnitSeries(e);if(i&&o&&console.warn("ApexCharts: Both old format (numeric series + labels) and new format (series objects with data/parsing) detected. Using old format for backward compatibility."),i){this.w.seriesData.series=e.slice(),this.w.seriesData.seriesNames=n.labels.slice();for(let a=0;atypeof a=="number")){this.w.seriesData.series=e.slice(),this.w.seriesData.seriesNames=[];for(let a=0;a{const s=we.parseNumber(a);return s>100&&console.warn(`ApexCharts: RadialBar value ${s} > 100, consider using percentage values (0-100)`),s}));for(let a=0;a{var l;const c=a&&Array.isArray(a.data)?a.data:[];i.push(c.length);const u=a&&a.name!==void 0&&a.name!==null?a.name:void 0;o.push((l=u??n.labels[s])!=null?l:`series-${s+1}`),r.push(c.slice())}),this.w.seriesData.series=i,this.w.seriesData.seriesNames=o,this.w.seriesData.unitData=r,this.w}resetParsingFlags(){const e=this.w;e.axisFlags.dataWasParsed=!1,e.globals.originalSeries=null,e.config.series&&e.config.series.forEach(n=>{n.__apexParsed&&delete n.__apexParsed})}extractPieDataFromSeries(e){const n=[],i=[];if(!Array.isArray(e))return console.warn("ApexCharts: Expected array for series data"),{values:[],labels:[]};if(e.length===0)return console.warn("ApexCharts: Empty series array"),{values:[],labels:[]};const o=e[0];if(typeof o=="object"&&o!==null&&o.data)this.extractPieDataFromSeriesObjects(e,n,i);else return console.warn("ApexCharts: Unsupported series format for pie/donut/radialBar. Expected series objects with data property."),{values:[],labels:[]};return{values:n,labels:i}}extractPieDataFromSeriesObjects(e,n,i){e.forEach((o,r)=>{if(!o.data||!Array.isArray(o.data)){console.warn(`ApexCharts: Series ${r} has no valid data array`);return}o.data.forEach(a=>{typeof a=="object"&&a!==null?a.x!==void 0&&a.y!==void 0?(i.push(String(a.x)),n.push(we.parseNumber(a.y))):console.warn("ApexCharts: Invalid data point format for pie chart. Expected {x, y} format:",a):console.warn("ApexCharts: Expected object data point, got:",typeof a)})})}handleExternalLabelsData(e){const n=this.w.config;if(n.xaxis.categories.length>0)this.w.labelData.labels=n.xaxis.categories;else if(n.labels.length>0)this.w.labelData.labels=n.labels.slice();else if(this.fallbackToCategory){if(this.w.labelData.labels=this.w.labelData.labels[0],this.w.rangeData.seriesRange.length){this.w.rangeData.seriesRange.map(o=>{o.forEach(r=>{this.w.labelData.labels.indexOf(r.x)<0&&r.x&&this.w.labelData.labels.push(r.x)})});const i=this.w.labelData.labels;if(i.length>0&&(typeof i[0]=="number"||typeof i[0]=="string"))this.w.labelData.labels=[...new Set(i)];else{const o=new Map;for(const r of i){const a=JSON.stringify(r);o.has(a)||o.set(a,r)}this.w.labelData.labels=Array.from(o.values())}}n.xaxis.convertedCatToNumeric&&(new _a(n).convertCatToNumericXaxis(n,this.w.seriesData.seriesX[0]),this._generateExternalLabels(e))}else this._generateExternalLabels(e)}_generateExternalLabels(e){const n=this.w.globals,i=this.w.config;let o=[];if(n.axisCharts){if(this.w.seriesData.series.length>0)if(this.isFormatXY()){const r=i.series.map(s=>{const l=new Map;for(const c of s.data)l.has(c.x)||l.set(c.x,c);return Array.from(l.values())}),a=r.reduce((s,l,c,u)=>u[s].length>l.length?s:c,0);for(let s=0;sa+1);for(let r=0;ri.xaxis.labels.formatter(r))),this.w.axisFlags.noLabelsProvided=!0}parseRawDataIfNeeded(e){const n=this.w.config,i=this.w.globals,o=n.parsing;if(this.w.axisFlags.dataWasParsed)return e;const r=!!(o&&(o.x||o.y||o.z)),a=e.some(l=>l.parsing&&(l.parsing.x||l.parsing.y||l.parsing.z));if(!r&&!a)return e;const s=e.map((l,c)=>{var u,d,f,h,p;if(!l.data||!Array.isArray(l.data)||l.data.length===0)return l;const g={x:((u=l.parsing)==null?void 0:u.x)||(o==null?void 0:o.x),y:((d=l.parsing)==null?void 0:d.y)||(o==null?void 0:o.y),z:((f=l.parsing)==null?void 0:f.z)||(o==null?void 0:o.z)};if(!g.x&&!g.y)return l;const m=l.data[0];if(typeof m=="object"&&m!==null&&(Object.prototype.hasOwnProperty.call(m,"x")||Object.prototype.hasOwnProperty.call(m,"y"))||Array.isArray(m))return l;if(!g.x||!g.y||Array.isArray(g.y)&&g.y.length===0){const b=[];g.x||b.push("x"),(!g.y||Array.isArray(g.y)&&g.y.length===0)&&b.push("y");const y=(h=l.name)!=null?h:`series[${c}]`;return console.warn(`ApexCharts [${this.w.globals.chartID}]: "${y}" has a parseData config but is missing the '${b.join("', '")}' field specification.`,{parsing:(p=l.parsing)!=null?p:o}),l}const v=l.data.map((b,y)=>{if(typeof b!="object"||b===null)return console.warn(`ApexCharts: Series ${c}, data point ${y} is not an object, skipping parsing`),b;const w=this.getNestedValue(b,g.x);let x,$;if(Array.isArray(g.y)){const _=g.y.map(P=>this.getNestedValue(b,P));this.w.config.chart.type==="bubble"?(_.length<2&&console.warn(`ApexCharts: series[${c}] bubble chart requires parseData.y to have at least 2 fields (y and z). Got: ${JSON.stringify(g.y)}`),x=_[0]):x=_}else x=this.getNestedValue(b,g.y);g.z&&($=this.getNestedValue(b,g.z)),w===void 0&&console.warn(`ApexCharts: Series ${c}, data point ${y} missing field '${g.x}'`),x===void 0&&console.warn(`ApexCharts: Series ${c}, data point ${y} missing field '${g.y}'`);const S={x:w,y:x,z:void 0};if(this.w.config.chart.type==="bubble"&&Array.isArray(g.y)&&g.y.length===2){const _=this.getNestedValue(b,g.y[1]);_!==void 0&&(S.z=_)}return $!==void 0&&(S.z=$),S});return wt(Je({},l),{data:v,__apexParsed:!0})});return this.w.axisFlags.dataWasParsed=!0,i.originalSeries||(i.originalSeries=we.clone(e)),s}getNestedValue(e,n){if(!e||typeof e!="object"||!n)return;if(n.indexOf(".")===-1)return e[n];const i=n.split(".");let o=e;for(let r=0;r after apexcharts.js.`)),e.map(a=>wt(Je({},a),{data:[]})))}flattenTreemapHierarchy(e){const n=this.w,i=n.globals;if(n.config.chart.type!=="treemap"||!Array.isArray(e))return e;if(!i.treemapRawSeries){if(!Zye(n,e))return i.treemapRoots=null,e;i.treemapRawSeries=e.map(s=>wt(Je({},s),{data:Array.isArray(s==null?void 0:s.data)?s.data.slice():s==null?void 0:s.data}))}const{roots:o,leafSeries:r,maxDepth:a}=exe(n,i.treemapRawSeries);return i.treemapRoots=o,i.treemapMaxDepth=a,r}expandScatterJitterData(e){var n,i;const o=this.w.config,r=o.chart.type==="scatter"||o.chart.type==="bubble",a=(i=(n=o.plotOptions)==null?void 0:n.scatter)==null?void 0:i.jitter;if(!r||!a||!a.enabled||!Array.isArray(e))return e;if(!e.some(f=>Array.isArray(f==null?void 0:f.data)&&f.data.some(h=>h&&!Array.isArray(h)&&Array.isArray(h.y))))return o.xaxis.type!=="datetime"&&(Array.isArray(o.xaxis.categories)&&o.xaxis.categories.length?this._applyBandAxis(o.xaxis.categories.slice()):Array.isArray(o.xaxis._scatterBandLabels)&&o.xaxis._scatterBandLabels.length&&this._applyBandAxis(o.xaxis._scatterBandLabels)),e;const l=[],c=new Map;e.forEach(f=>{Array.isArray(f==null?void 0:f.data)&&f.data.forEach(h=>{if(h&&Array.isArray(h.y)){const p=String(h.x);c.has(p)||(c.set(p,l.length),l.push(h.x))}})});const u=a.maxPoints||5e3,d=e.map(f=>{if(!Array.isArray(f==null?void 0:f.data))return f;const h=[];return f.data.forEach(p=>{if(p&&Array.isArray(p.y)){const g=c.get(String(p.x)),m=p.y,v=m.length>u?Math.ceil(m.length/u):1;for(let b=0;bMath.max(0,Math.min(o-1,u));let l=s(Math.round(i.min+.49)),c=s(Math.round(i.max-.49));c{const c=Math.round(l);return Math.abs(l-c)<1e-6&&e[c]!==void 0?e[c]:""};s._scatterBand=!0,i.labels.formatter=s}}parseData(e,n=!0){var i,o,r,a,s,l,c;const u=this.w,d=u.config,f=u.globals;if(e=this.parseRawDataIfNeeded(e),e=this.applySeriesTransform(e),e=this.expandScatterJitterData(e),e=this.flattenTreemapHierarchy(e),(i=d.chart.dataReducer)!=null&&i.enabled&&f.axisCharts&&!f.dataReducerRawSeries){f.dataReducerRawSeries=e.map(m=>({data:Array.isArray(m==null?void 0:m.data)?m.data.slice():m==null?void 0:m.data}));let p=1/0,g=-1/0;for(const m of e){const v=m==null?void 0:m.data;if(!Array.isArray(v)||v.length===0)continue;const b=!Array.isArray(v[0]),y=b?(o=v[0])==null?void 0:o.x:(r=v[0])==null?void 0:r[0],w=b?(a=v[v.length-1])==null?void 0:a.x:(s=v[v.length-1])==null?void 0:s[0];typeof y=="number"&&(p=Math.min(p,y)),typeof w=="number"&&(g=Math.max(g,w))}p!==1/0&&(f.dataReducerRawMinX=p,f.dataReducerRawMaxX=g)}if(f.dataReducerRawSeries&&((l=d.chart.dataReducer)!=null&&l.enabled)&&(e=e.map(p=>Je({},p))),d.series=e,n)if(f.dataReducerRawSeries&&((c=d.chart.dataReducer)!=null&&c.enabled)){const p=f.dataReducerRawSeries;f.initialSeries=e.map((g,m)=>{var v,b,y;return wt(Je({},g),{data:(y=(b=(v=p[m])==null?void 0:v.data)==null?void 0:b.slice())!=null?y:g.data})})}else f.histogramRawSeries?f.initialSeries=f.histogramRawSeries:f.dumbbellRawSeries?f.initialSeries=f.dumbbellRawSeries:f.streamgraphRawSeries?f.initialSeries=f.streamgraphRawSeries:f.waterfallRawSeries?f.initialSeries=f.waterfallRawSeries:f.treemapRawSeries?f.initialSeries=f.treemapRawSeries:f.initialSeries=e;if(this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.resetGlobals(),this.isMultipleY(),f.axisCharts?(this.parseDataAxisCharts(e),this.coreUtils.getLargestSeries()):this.parseDataNonAxisCharts(e),d.chart.stacked){const p=new js(this.w);this.w.seriesData.series=p.setNullSeriesToZeroValues(this.w.seriesData.series)}this.coreUtils.getSeriesTotals(),f.axisCharts?(ca._defineLazyResult(this.w.seriesData,"stackedSeriesTotals",()=>this.coreUtils.getStackedSeriesTotals()),ca._defineLazyResult(this.w.seriesData,"stackedSeriesTotalsByGroups",()=>this.coreUtils.getStackedSeriesTotalsByGroups()),ca._defineLazyResult(f,"seriesPercent",()=>(this.coreUtils.getPercentSeries(),f.seriesPercent))):this.coreUtils.getPercentSeries(),!this.w.axisFlags.dataFormatXNumeric&&(!this.w.axisFlags.isXNumeric||d.xaxis.type==="numeric"&&d.labels.length===0&&d.xaxis.categories.length===0)&&this.handleExternalLabelsData(e);const h=this.coreUtils.getCategoryLabels(this.w.labelData.labels);for(let p=0;pc.x:c=>c[0];let s=0;if(n!=null){let c=0,u=o-1;for(;c<=u;){const d=c+u>>1;a(e[d])>1;a(e[d])>i?u=d-1:c=d+1}l=Math.min(o,c+1)}return s===0&&l===o?e.slice():e.slice(s,l)}static lttbDownsample(e,n){const i=e.length;if(n>=i||n<3)return e;const o=!Array.isArray(e[0]),r=o?u=>u.x:u=>u[0],a=o?u=>u.y:u=>u[1],s=[];s.push(e[0]);const l=(i-2)/(n-2);let c=0;for(let u=0;uw&&(w=S,x=$)}s.push(e[x]),c=x}return s.push(e[i-1]),s}static ohlcAggregate(e,n){const i=e.length;if(n>=i||n<1)return e;const o=!Array.isArray(e[0]),r=o?u=>u.x:u=>u[0],a=o?u=>u.y:u=>u[1],s=o?(u,d)=>({x:u,y:d}):(u,d)=>[u,d],l=[],c=i/n;for(let u=0;ug&&(g=y[1]),y[2]=i||n<1)return e;const o=!Array.isArray(e[0]),r=o?u=>u.x:u=>u[0],a=o?u=>u.y:u=>u[1],s=o?(u,d)=>({x:u,y:d}):(u,d)=>[u,d],l=[],c=i/n;for(let u=0;up&&(p=b))}}l.push(s(r(e[d]),h===1/0?[null,null]:[h,p]))}return l}excludeCollapsedSeriesInYAxis(){const e=this.w,n=[];e.globals.seriesYAxisMap.forEach((i,o)=>{let r=0;i.forEach(a=>{e.globals.collapsedSeriesIndices.indexOf(a)!==-1&&r++}),r>0&&r==i.length&&n.push(o)}),e.globals.ignoreYAxisIndexes=n.map(i=>i)}},zF=class{constructor(e,n){this.w=e,this.ctx=n}_updateOptions(e,n=!1,i=!0,o=!0,r=!1){return new Promise((a,s)=>{let l=[this.ctx];o&&(l=this.ctx.getSyncedCharts()),this.w.globals.isExecCalled&&(l=[this.ctx],this.w.globals.isExecCalled=!1),l.forEach((c,u)=>{var d,f;const h=c.w;h.globals.shouldAnimate=i,n||(h.globals.resized=!0,h.globals.dataChanged=!0,i&&h.config.chart.animations.enabled&&c.series.getPreviousPaths());const p=h.config.chart.requestedType||h.config.chart.type;if(i&&e&&typeof e=="object"){const g=(d=e==null?void 0:e.chart)==null?void 0:d.type;g&&g!==p&&((f=c.morphTypeChange)==null||f.captureBeforeDestroy({fromType:p,toType:g,newSeries:e.series||h.config.series}))}if(e&&typeof e=="object"){c.config=new mc(e);const g=e.chart&&e.chart.type,m=g==="funnel"||g==="pyramid"||g==="gauge",v=!!h.config.chart.requestedType;if(g&&!m&&v){e.chart=e.chart||{},e.chart.requestedType=g;const b=h.config.chart.requestedType;(b==="funnel"||b==="pyramid")&&(e.plotOptions=e.plotOptions||{},e.plotOptions.bar=e.plotOptions.bar||{},e.plotOptions.bar.isFunnel===void 0&&(e.plotOptions.bar.isFunnel=!1),e.plotOptions.bar.isPyramid===void 0&&(e.plotOptions.bar.isPyramid=!1))}if(c.config.normalizeAliasedChartType(e),e=Xi.extendArrayProps(c.config,e,h),c.w.globals.chartID!==this.w.globals.chartID&&(delete e.series,delete e.yaxis),h.config=we.extend(h.config,e),_a.handOverTypeDefaults(h.config,p,e),r){h.globals.lastXAxis=e.xaxis?we.clone(e.xaxis):[],h.globals.lastYAxis=e.yaxis?we.clone(e.yaxis):[];const b=h.globals.initialConfig&&h.globals.initialConfig.series,y=we.extend({},h.config);y.series=!e.series&&b?b:we.copySeriesShallow(h.config.series),h.globals.initialConfig=y,e.series&&(h.globals.initialSeries=h.config.series)}e.series&&(h.globals.collapsedSeriesIndices.length>0||h.globals.ancillaryCollapsedSeriesIndices.length>0)&&c.series.reconcileCollapsedByName()}return c.update(e).then(()=>{u===l.length-1&&a(c)}).catch(s)})})}_updateSeries(e,n,i=!1){return new Promise((o,r)=>{const a=this.w;a.globals.shouldAnimate=n,a.globals.dataChanged=!0;const s=JSON.stringify({y:(a.globals.yAxisScale||[]).map(h=>h?h.result:null),xMin:a.globals.minX,xMax:a.globals.maxX});vv.invalidateSelectors(a),n&&a.config.chart.animations.enabled&&this.ctx.series.getPreviousPaths();const l=a.config.series.length,c=a.config.series.map(h=>{var p,g;return(g=(p=h==null?void 0:h.data)==null?void 0:p.length)!=null?g:0});i&&(a.globals.dataReducerRawSeries=null,a.globals.histogramRawSeries=null,a.globals.waterfallRawSeries=null,a.globals.dumbbellRawSeries=null,a.globals.streamgraphRawSeries=null,a.globals.treemapRawSeries=null);const u=e;let d=!1;a.globals.axisCharts&&(a.globals.collapsedSeriesIndices.length>0||a.globals.ancillaryCollapsedSeriesIndices.length>0)&&(e=e.map(h=>h&&typeof h=="object"?Je({},h):h),this.ctx.series.reconcileCollapsedByName(e),d=!0),this.ctx.data.resetParsingFlags();const f=this.ctx.data.parseData(e,i);return this.ctx._writeParsedSeriesData(f.seriesData),this.ctx._writeParsedRangeData(f.rangeData),this.ctx._writeParsedCandleData(f.candleData),this.ctx._writeParsedLabelData(f.labelData),this.ctx._writeParsedAxisFlags(f.axisFlags),i&&(a.globals.initialConfig&&(a.globals.initialConfig.series=we.copySeriesShallow(d?u:a.config.series)),d&&(a.globals.initialSeries=u)),this._canUseFastPath(e,l,c,a)?this.ctx.fastUpdate(n,s).then(()=>{o(this.ctx)}).catch(r):(this.ctx._updateStats&&this.ctx._updateStats.full++,this.ctx.update().then(()=>{o(this.ctx)}).catch(r))})}_canUseFastPath(e,n,i,o){return!(!o.dom.elGraphical||!o.globals.axisCharts||e.length!==n||e.some((r,a)=>{var s,l;return((l=(s=r==null?void 0:r.data)==null?void 0:s.length)!=null?l:0)!==i[a]})||o.globals.collapsedSeries.length>0||o.globals.ancillaryCollapsedSeries.length>0||o.globals.risingSeries.length>0||o.globals.comboCharts||o.interact.zoomed)}_extendSeries(e,n){const i=this.w,o=i.config.series[n];return wt(Je({},i.config.series[n]),{name:e.name?e.name:o==null?void 0:o.name,color:e.color?e.color:o==null?void 0:o.color,type:e.type?e.type:o==null?void 0:o.type,group:e.group?e.group:o==null?void 0:o.group,hidden:typeof e.hidden<"u"?e.hidden:o==null?void 0:o.hidden,data:e.data?e.data:o==null?void 0:o.data,zIndex:typeof e.zIndex<"u"?e.zIndex:n})}toggleDataPointSelection(e,n){const i=this.w;let o=null;const r=`.apexcharts-series[data\\:realIndex='${e}']`;if(i.globals.axisCharts?o=i.dom.Paper.findOne(`${r} path[j='${n}'], ${r} circle[j='${n}'], ${r} rect[j='${n}']`):typeof n>"u"&&(o=i.dom.Paper.findOne(`${r} path[j='${e}']`),(i.config.chart.type==="pie"||i.config.chart.type==="polarArea"||i.config.chart.type==="donut")&&this.ctx.pie.pieClicked(e)),o)new it(this.w).pathMouseDown(o,null);else return console.warn("toggleDataPointSelection: Element not found"),null;return o.node?o.node:null}forceXAxisUpdate(e){const n=this.w;return["min","max"].forEach(o=>{typeof e.xaxis[o]<"u"&&(n.config.xaxis[o]=e.xaxis[o],n.globals.lastXAxis[o]=e.xaxis[o])}),e.xaxis.categories&&e.xaxis.categories.length&&(n.config.xaxis.categories=e.xaxis.categories),n.config.xaxis.convertedCatToNumeric&&(e=new _a(e).convertCatToNumericXaxis(e,this.ctx)),e}forceYAxisUpdate(e){return e.chart&&e.chart.stacked&&e.chart.stackType==="100%"&&(Array.isArray(e.yaxis)?e.yaxis.forEach((n,i)=>{e.yaxis[i].min=0,e.yaxis[i].max=100}):(e.yaxis.min=0,e.yaxis.max=100)),e}revertDefaultAxisMinMax(e){const n=this.w;let i=n.globals.lastXAxis,o=n.globals.lastYAxis;e&&e.xaxis&&(i=e.xaxis),e&&e.yaxis&&(o=e.yaxis);const r=i;n.config.xaxis.min=r.min,n.config.xaxis.max=r.max;const a=s=>{if(typeof o[s]<"u"){const l=o[s];n.config.yaxis[s].min=l.min,n.config.yaxis[s].max=l.max}};n.config.yaxis.map((s,l)=>{n.interact.zoomed||typeof o[l]<"u"?a(l):typeof this.ctx.opts.yaxis[l]<"u"&&(s.min=this.ctx.opts.yaxis[l].min,s.max=this.ctx.opts.yaxis[l].max)})}},HF=class Nx{static xRatio(e){const n=e.layout.gridWidth||1;return(e.globals.maxX-e.globals.minX)/n}static dataXToPx(e,n){return(n-e.globals.minX)/Nx.xRatio(e)}static pxToDataX(e,n){return e.globals.minX+n*Nx.xRatio(e)}static screenXToPlotPx(e,n){const i=e.dom.baseEl,o=i&&i.querySelector(".apexcharts-svg");if(!o)return n-e.layout.translateX;const r=o.getBoundingClientRect(),a=e.globals.svgWidth?r.width/e.globals.svgWidth:1;return(n-r.left)/(a||1)-e.layout.translateX}};class Oo{constructor(e){this.w=e.w,this.ttCtx=e}static hoverTarget(e){return e?(e.eventPhase&&e.target&&(e.apexHoverTarget=e.target),e.apexHoverTarget||e.target):null}getNearestValues({hoverArea:e,elGrid:n,clientX:i,clientY:o}){var r;const a=this.w,s=n.getBoundingClientRect(),l=a.layout.gridWidth,c=s.height;let u=l/(a.globals.dataPoints-1);const d=c/a.globals.dataPoints,f=this.hasBars();(a.globals.comboCharts||f)&&!a.config.xaxis.convertedCatToNumeric&&(u=l/a.globals.dataPoints);const h=HF.screenXToPlotPx(a,i),p=o-s.top,g=a.globals.barPadForNumericAxis||0;h<-g||p<0||h>l+g||p>c?(e.classList.remove("hovering-zoom"),e.classList.remove("hovering-pan")):a.interact.zoomEnabled?(e.classList.remove("hovering-pan"),e.classList.add("hovering-zoom")):a.interact.panEnabled&&(e.classList.remove("hovering-zoom"),e.classList.add("hovering-pan"));let v=Math.round(h/u);const b=Math.floor(p/d);f&&!a.config.xaxis.convertedCatToNumeric&&(v=Math.ceil(h/u),v=v-1);let y=null,w=null;const x=a.globals.seriesXvalues.map(S=>S.filter(_=>we.isNumber(_))),$=a.globals.seriesYvalues.map(S=>S.filter(_=>we.isNumber(_)));if(a.axisFlags.isXNumeric){w=this.closestInMultiArray(h,p,x,$),y=w.index,v=(r=w.j)!=null?r:0;const S=x.some((_,P)=>_.length!==a.globals.seriesXvalues[P].length);if(y!==null&&S){const _=a.globals.seriesXvalues[y];let P=null,O=1/0;for(let T=0;T<_.length;T++){if(!we.isNumber(_[T]))continue;const M=Math.abs(h-_[T]);Mr.length>0?a:-1);for(let r=0;rr.globals.collapsedSeriesIndices.indexOf(f)===-1&&r.globals.ancillaryCollapsedSeriesIndices.indexOf(f)===-1,s=r.config.chart.type,l=!r.globals.comboCharts&&(s==="line"||s==="area");let c=1/0,u=null,d=null;if(r.globals.allSeriesHasEqualX){let f=1/0;for(let h=0;h=2){for(let m=0;m1&&(u=1);const d=i+u*s,f=o+u*l,h=e-d,p=n-f;return{dist:Math.sqrt(h*h+p*p),t:u}}closestInArray(e,n){const i=n[0];let o=null,r=Math.abs(e-i);for(let a=0;atypeof r[0]<"u");if(o.length>0)for(let r=0;r{var c;return!((c=this.w.globals.collapsedSeriesIndices)!=null&&c.includes(l))}))||[];for(let s=0;so+r.getBBox().height,0)}getElMarkers(e){return typeof e=="number"?this.w.dom.baseEl.querySelectorAll(`.apexcharts-series[data\\:realIndex='${e}'] .apexcharts-series-markers-wrap > *`):this.w.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}getAllMarkers(e=!1){let n=[...this.w.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap")];e&&(n=n.filter(o=>{const r=Number(o.getAttribute("data:realIndex"));return this.w.globals.collapsedSeriesIndices.indexOf(r)===-1})),n.sort((o,r)=>{var a=Number(o.getAttribute("data:realIndex")),s=Number(r.getAttribute("data:realIndex"));return sa?-1:0});const i=[];return n.forEach(o=>{i.push(o.querySelector(".apexcharts-marker"))}),i}hasMarkers(e){return this.getElMarkers(e).length>0}getPathFromPoint(e,n){const i=Number(e.getAttribute("cx")),o=Number(e.getAttribute("cy")),r=e.getAttribute("shape");return new it(this.w).getMarkerPath(i,o,r,n)}getElBars(){return this.w.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-violin-series, .apexcharts-rangebar-series")}hasBars(){return this.getElBars().length>0}getHoverMarkerSize(e){const n=this.w;let i=n.config.markers.hover.size;return i===void 0&&(i=n.globals.markers.size[e]+n.config.markers.hover.sizeOffset),i}toggleAllTooltipSeriesGroups(e){const n=this.w,i=this.ttCtx;i.allTooltipSeriesGroups.length===0&&(i.allTooltipSeriesGroups=n.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));const o=i.allTooltipSeriesGroups;for(let r=0;r({attrs:s,val:e.yLbFormatter(s.value,{seriesIndex:n,dataPointIndex:i,w:r})})):[]}resolvePatternColor(e,n){var i,o,r,a;const s=this.w,l=(o=(i=Oo.hoverTarget(e))==null?void 0:i.getAttribute)==null?void 0:o.call(i,"fill");if(!l)return n;if(l.indexOf("url")===-1)return l;if(l.indexOf("Pattern")===-1)return n;const c=s.dom.baseEl.querySelector(l.substr(4).slice(0,-1));return(a=(r=c==null?void 0:c.childNodes[0])==null?void 0:r.getAttribute("stroke"))!=null?a:n}getFormatters(e){const n=this.w;let i=n.formatters.yLabelFormatters[e],o;return n.formatters.ttVal!==void 0?Array.isArray(n.formatters.ttVal)?(i=n.formatters.ttVal[e]&&n.formatters.ttVal[e].formatter,o=n.formatters.ttVal[e]&&n.formatters.ttVal[e].title&&n.formatters.ttVal[e].title.formatter):(i=n.formatters.ttVal.formatter,typeof n.formatters.ttVal.title.formatter=="function"&&(o=n.formatters.ttVal.title.formatter)):o=n.config.tooltip.y.title.formatter,typeof i!="function"&&(n.formatters.yLabelFormatters[0]?i=n.formatters.yLabelFormatters[0]:i=function(r){return r}),typeof o!="function"&&(o=function(r){return r?r+": ":""}),{yLbFormatter:i,yLbTitleFormatter:o}}getSeriesName({fn:e,index:n,seriesIndex:i,j:o}){const r=this.w;return e(String(r.seriesData.seriesNames[n]),{series:r.seriesData.series,seriesIndex:i,dataPointIndex:o,w:r})}DOMHandling({t:e,j:n,ttItems:i,values:o,seriesName:r,shared:a,pColor:s}){const l=this.w,c=this.ttCtx,{val:u,goalVals:d,xVal:f,xAxisTTVal:h,zVal:p}=o;if(!i||!i[e])return;let g=null;g=i[e].children,l.config.tooltip.fillSeriesColor&&(i[e].style.backgroundColor=s,g[0].style.display="none"),c.showTooltipTitle&&(c.tooltipTitle===null&&(c.tooltipTitle=l.dom.baseEl.querySelector(".apexcharts-tooltip-title")),c.tooltipTitle&&(c.tooltipTitle.innerHTML=f)),c.isXAxisTooltipEnabled&&c.xaxisTooltipText&&(c.xaxisTooltipText.innerHTML=h!==""?h:f);const m=i[e].querySelector(".apexcharts-tooltip-text-y-label");m&&(m.innerHTML=r||"");const v=i[e].querySelector(".apexcharts-tooltip-text-y-value");v&&(v.innerHTML=typeof u<"u"?u:""),g[0]&&g[0].classList.contains("apexcharts-tooltip-marker")&&(l.config.tooltip.marker.fillColors&&Array.isArray(l.config.tooltip.marker.fillColors)&&(s=l.config.tooltip.marker.fillColors[e]),l.config.tooltip.fillSeriesColor?g[0].style.backgroundColor=s:g[0].style.color=s),l.config.tooltip.marker.show||(g[0].style.display="none");const b=i[e].querySelector(".apexcharts-tooltip-text-goals-label"),y=i[e].querySelector(".apexcharts-tooltip-text-goals-value");if(d.length&&l.seriesData.seriesGoals[e]){const w=()=>{let x="
",$="
";d.forEach(S=>{x+=`
${S.attrs.name}
`,$+=`
${S.val}
`}),b.innerHTML=x+"
",y.innerHTML=$+"
"};a?l.seriesData.seriesGoals[e][n]&&Array.isArray(l.seriesData.seriesGoals[e][n])?w():(b.innerHTML="",y.innerHTML=""):w()}else b.innerHTML="",y.innerHTML="";if(p!==null){const w=i[e].querySelector(".apexcharts-tooltip-text-z-label");w.innerHTML=l.config.tooltip.z.title;const x=i[e].querySelector(".apexcharts-tooltip-text-z-value");x.innerHTML=typeof p<"u"?p:""}if(a&&g[0]){if(l.config.tooltip.hideEmptySeries){const w=i[e].querySelector(".apexcharts-tooltip-marker"),x=i[e].querySelector(".apexcharts-tooltip-text");parseFloat(u)==0?(w.style.display="none",x.style.display="none"):(w.style.display="block",x.style.display="block")}typeof u>"u"||u===null||l.globals.ancillaryCollapsedSeriesIndices.indexOf(e)>-1||l.globals.collapsedSeriesIndices.indexOf(e)>-1||Array.isArray(c.tConfig.enabledOnSeries)&&c.tConfig.enabledOnSeries.indexOf(e)===-1?g[0].parentNode.style.display="none":g[0].parentNode.style.display=l.config.tooltip.items.display}else Array.isArray(c.tConfig.enabledOnSeries)&&c.tConfig.enabledOnSeries.indexOf(e)===-1&&(g[0].parentNode.style.display="none")}toggleActiveInactiveSeries(e,n){const i=this.w;if(e)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");const o=i.dom.baseEl.querySelector(`.apexcharts-tooltip-series-group-${n}`);if(o){const r=o;r.classList.add("apexcharts-active"),r.style.display=i.config.tooltip.items.display}}}getValuesToPrint({i:e,j:n}){var i,o,r,a,s,l,c,u;const d=this.w,f=d.seriesData.seriesX.map(w=>w.length>0?w:[]);let h="",p="",g=null,m=null;const v={series:d.seriesData.series,seriesIndex:e,dataPointIndex:n,w:d},b=d.formatters.ttZFormatter;if(n===null)m=d.seriesData.series[e];else if(d.axisFlags.isXNumeric&&d.config.chart.type!=="treemap"){if(h=f[e][n],f[e].length===0){const w=this.tooltipUtil.getFirstActiveXArray(f);h=f[w][n]}}else new t$(this.w).isFormatXY()?h=typeof d.config.series[e].data[n]<"u"?d.config.series[e].data[n].x:"":h=typeof d.labelData.labels[n]<"u"?d.labelData.labels[n]:"";const y=h;return d.axisFlags.isXNumeric&&d.config.xaxis.type==="datetime"?h=new zc(this.w).xLabelFormat(d.formatters.ttKeyFormatter,y,y,{i:void 0,dateFormatter:new Ei(this.w).formatDate,w:this.w}):d.globals.isBarHorizontal?h=d.formatters.yLabelFormatters[0](y,v):h=(r=(o=(i=d.formatters).xLabelFormatter)==null?void 0:o.call(i,y,v))!=null?r:y,d.config.tooltip.x.formatter!==void 0&&(h=(l=(s=(a=d.formatters).ttKeyFormatter)==null?void 0:s.call(a,y,v))!=null?l:y),d.seriesData.seriesZ.length>0&&d.seriesData.seriesZ[e].length>0&&(g=b==null?void 0:b(d.seriesData.seriesZ[e][n],d)),typeof d.config.xaxis.tooltip.formatter=="function"?p=(u=(c=d.formatters).xaxisTooltipFormatter)==null?void 0:u.call(c,y,v):p=h,{val:Array.isArray(m)?m.join(" "):m,xVal:Array.isArray(h)?h.join(" "):h,xAxisTTVal:Array.isArray(p)?p.join(" "):p,zVal:g}}handleCustomTooltip({i:e,j:n,y1:i,y2:o,w:r}){const a=this.ttCtx.getElTooltip();let s=r.config.tooltip.custom;if(Array.isArray(s)&&(s=s[e]),typeof s!="function")return;const l=s({series:r.seriesData.series,seriesIndex:e,dataPointIndex:n,y1:i,y2:o,w:r});if(a){const c=a.querySelector(".apexcharts-tooltip-arrow");typeof l=="string"||typeof l=="number"?a.innerHTML=String(l):l!=null&&(l instanceof Element||typeof l.nodeName=="string")&&(a.innerHTML="",a.appendChild(l.cloneNode(!0))),c&&a.appendChild(c)}}};const Sr=7,nxe=0;let n$=class{constructor(e){this.ttCtx=e,this.w=e.w}moveXCrosshairs(e,n=null){const i=this.ttCtx,o=this.w,r=i.getElXCrosshairs();let a=e-i.xcrosshairsWidth/2;const s=o.labelData.labels.slice().length;if(n!==null&&(a=o.layout.gridWidth/s*n),r!==null&&!o.globals.isBarHorizontal&&(r.setAttribute("x",String(a)),r.setAttribute("x1",String(a)),r.setAttribute("x2",String(a)),r.setAttribute("y2",String(o.layout.gridHeight)),r.classList.add("apexcharts-active")),a<0&&(a=0),a>o.layout.gridWidth&&(a=o.layout.gridWidth),i.isXAxisTooltipEnabled){let l=a;(o.config.xaxis.crosshairs.width==="tickWidth"||o.config.xaxis.crosshairs.width==="barWidth")&&(l=a+i.xcrosshairsWidth/2),this.moveXAxisTooltip(l)}}moveYCrosshairs(e){const n=this.ttCtx;n.ycrosshairs!==null&&it.setAttrs(n.ycrosshairs,{y1:e,y2:e}),n.ycrosshairsHidden!==null&&it.setAttrs(n.ycrosshairsHidden,{y1:e,y2:e})}moveXAxisTooltip(e){var n,i;const o=this.w,r=this.ttCtx;if(r.xaxisTooltip!==null&&r.xcrosshairsWidth!==0){r.xaxisTooltip.classList.add("apexcharts-active");const a=r.xaxisOffY+o.config.xaxis.tooltip.offsetY+o.layout.translateY+5+o.config.xaxis.offsetY,l=r.xaxisTooltip.getBoundingClientRect().width;if(e=e-l/2,!isNaN(e)){e=e+o.layout.translateX;const u=new it(this.w).getTextRects((i=(n=r.xaxisTooltipText)==null?void 0:n.innerHTML)!=null?i:"",o.config.xaxis.labels.style.fontSize);r.xaxisTooltipText&&(r.xaxisTooltipText.style.minWidth=u.width+"px"),r.xaxisTooltip.style.left=e+"px",r.xaxisTooltip.style.top=a+"px"}}}moveYAxisTooltip(e){var n,i;const o=this.w,r=this.ttCtx;r.yaxisTTEls===null&&(r.yaxisTTEls=[...o.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip")]);const a=parseInt((i=(n=r.ycrosshairsHidden)==null?void 0:n.getAttribute("y1"))!=null?i:"0",10);let s=o.layout.translateY+a;if(r.yaxisTTEls){const l=r.yaxisTTEls[e].getBoundingClientRect(),c=l.height;let u;const d=o.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${e}'] .apexcharts-yaxis-texts-g`),f=o.dom.elWrap.getBoundingClientRect();if(d){const h=d.getBoundingClientRect();h.width>0&&(u=h.left+h.width/2-f.left-l.width/2)}u==null&&(u=o.config.yaxis[e].opposite?o.globals.translateYAxisX[e]+4:o.globals.translateYAxisX[e]-l.width-4),s=s-c/2,o.globals.ignoreYAxisIndexes.indexOf(e)===-1&&s>0&&sh.layout.gridWidth/2&&(S=w-y-$,O="left"),S>h.layout.gridWidth-y-10&&(S=O==="left"?Math.min(h.layout.gridWidth-y,S):h.layout.gridWidth-y),S<-20&&(S=-20),h.config.tooltip.followCursor){const I=p.getElGrid();if(!I)return null;const k=I.getBoundingClientRect();S=((o=p.clientX)!=null?o:p.e.clientX)-k.left,S>h.layout.gridWidth/2?(S=S-y,O="left"):O="right",P=((r=p.clientY)!=null?r:p.e.clientY)+h.layout.translateY-k.top,P>h.layout.gridHeight/2&&(P=P-b)}else if(!h.globals.isBarHorizontal)if(m){const I=h.layout.translateY,k=h.layout.translateY+h.layout.gridHeight;P+b>k&&(P=k-b),Ph.layout.gridHeight&&(P=h.layout.gridHeight-b+h.layout.translateY);if(isNaN(S))return null;S=S+h.layout.translateX;const T=(s=(a=h.config)==null?void 0:a.chart)==null?void 0:s.accessibility;if(T!=null&&T.enabled&&((c=(l=T==null?void 0:T.keyboard)==null?void 0:l.navigation)!=null&&c.enabled)&&((f=(d=(u=h.dom)==null?void 0:u.baseEl)==null?void 0:d.querySelector)!=null&&f.call(d,".apexcharts-keyboard-focused"))){const I=m?_:x,k=(v||1)+12,E=P,R=P+b;!isNaN(I)&&b>0&&EI-k&&(P=I-b-k,P<0&&(P=I+k))}let M=null;if(m&&b>0){const I=_-P,k=10,E=b-10;M=Math.max(k,Math.min(E,I))}return{x:S,y:P,placement:O,arrowY:M}}applyTooltipPosition(e,n){if(!e)return;const i=e.dataset.positioned!=="true";i&&(e.style.transitionProperty="none"),e.style.left=n.x+"px",e.style.top=n.y+"px",n.placement&&(e.dataset.placement=n.placement),n.arrowY!=null&&e.style.setProperty("--apx-tt-arrow-y",n.arrowY+"px"),n.arrowX!=null&&e.style.setProperty("--apx-tt-arrow-x",n.arrowX+"px"),i&&(e.offsetWidth,e.dataset.positioned="true",requestAnimationFrame(()=>{e.style.transitionProperty=""}))}moveMarkers(e,n){var i;const o=this.w,r=this.ttCtx;if(o.globals.markers.size[e]>0&&!o.globals.markers.batched){const a=o.dom.baseEl.querySelectorAll(` .apexcharts-series[data\\:realIndex='${e}'] .apexcharts-marker`);for(let s=0;s0){const v=(s=m.getAttribute("shape"))!=null?s:"circle",b=f.getMarkerPath(u,d,v,p*1.5);m.setAttribute("d",b)}this.moveXCrosshairs(u),c.fixedTooltip||this.moveTooltip(u,d,p)}moveDynamicPointsOnHover(e){var n,i;const o=this.ttCtx,r=o.w;let a=0,s=0,l=0;const c=r.globals.pointsArray,u=new js(this.w),d=new it(this.w);l=u.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);const f=o.tooltipUtil.getHoverMarkerSize(l);if((n=c[l])!=null&&n[e]&&(a=c[l][e][0],s=c[l][e][1]),isNaN(a))return;const h=o.tooltipUtil.getAllMarkers();if(h.length)for(let p=0;p"u"&&h.splice(p,0,null),h[p]&&g&&g.length){let m=c[p][e][1],v;h[p].setAttribute("cx",a);const b=(i=h[p].getAttribute("shape"))!=null?i:"circle";if(r.config.chart.type==="rangeArea"&&!r.globals.comboCharts){const y=e+r.seriesData.series[p].length;v=c[p][y][1];const w=Math.abs(m-v)/2;m=m-w}if(m!==null&&!isNaN(m)&&m0){const y=d.getMarkerPath(a,m,b,f);h[p].setAttribute("d",y)}else h[p].setAttribute("d","")}}this.moveXCrosshairs(a),o.fixedTooltip||this.moveTooltip(a,s||r.layout.gridHeight,f)}moveStickyTooltipOverBars(e,n){var i,o,r,a,s;const l=this.w,c=this.ttCtx;let u=l.globals.columnSeries?l.globals.columnSeries.length:l.seriesData.series.length;l.config.chart.stacked&&(u=l.globals.barGroups.length);let d=u>=2&&u%2===0?Math.floor(u/2):Math.floor(u/2)+1;l.globals.isBarHorizontal&&(d=new js(this.w).getActiveConfigSeriesIndex("desc")+1);let f=l.dom.baseEl.querySelector(`.apexcharts-bar-series .apexcharts-series[rel='${d}'] path[j='${e}'], .apexcharts-candlestick-series .apexcharts-series[rel='${d}'] path[j='${e}'], .apexcharts-boxPlot-series .apexcharts-series[rel='${d}'] path[j='${e}'], .apexcharts-violin-series .apexcharts-series[rel='${d}'] path[j='${e}'], .apexcharts-rangebar-series .apexcharts-series[rel='${d}'] path[j='${e}']`);!f&&typeof n=="number"&&(f=l.dom.baseEl.querySelector(`.apexcharts-bar-series .apexcharts-series[data\\:realIndex='${n}'] path[j='${e}'], .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='${n}'] path[j='${e}'], .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='${n}'] path[j='${e}'], .apexcharts-violin-series .apexcharts-series[data\\:realIndex='${n}'] path[j='${e}'], - .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='${n}'] path[j='${e}']`));let h=null;const p=l.globals.barCanvasCoords;if(!f&&p&&(h=typeof n=="number"&&((i=p[n])==null?void 0:i[e])||null,!h)){for(const x in p)if((o=p[x])!=null&&o[e]){h=p[x][e];break}}let g=f?parseFloat((r=f.getAttribute("cx"))!=null?r:"0"):h?h.cx:0,m=f?parseFloat((a=f.getAttribute("cy"))!=null?a:"0"):h?h.cy:0;const v=f?parseFloat((s=f.getAttribute("barWidth"))!=null?s:"0"):h?h.barWidth:0,b=c.getElGrid();if(!b)return;const y=b.getBoundingClientRect(),w=f&&(f.classList.contains("apexcharts-candlestick-area")||f.classList.contains("apexcharts-boxPlot-area"));if(l.axisFlags.isXNumeric){if(f&&!w){const x=this._datapointCenterXFromBars(e);x!=null?g=x:g=g-(u%2!==0?v/2:0)}f&&w&&(g=g-v/2)}else!l.globals.isBarHorizontal&&!h&&(g=c.xAxisTicksPositions[e-1]+c.dataPointsDividedWidth/2,isNaN(g)&&(g=c.xAxisTicksPositions[e]-c.dataPointsDividedWidth/2));if(l.globals.isBarHorizontal?m=m-c.tooltipRect.ttHeight:l.config.tooltip.followCursor?m=c.e.clientY-y.top-c.tooltipRect.ttHeight/2:m+c.tooltipRect.ttHeight+15>l.layout.gridHeight&&(m=l.layout.gridHeight),l.globals.isBarHorizontal||this.moveXCrosshairs(g),!c.fixedTooltip){if(l.globals.isBarHorizontal&&!l.config.tooltip.followCursor&&this.placeHorizontalSharedTooltip(e))return;this.moveTooltip(g,m||l.layout.gridHeight)}}_datapointCenterXFromBars(e){var n,i;const o=this.w,r=o.dom.baseEl.querySelectorAll(`.apexcharts-bar-series path[j='${e}'],.apexcharts-rangebar-series path[j='${e}']`);if(!r.length)return null;let a=1/0,s=-1/0;for(const l of r){const c=l.parentNode;if((i=(n=c==null?void 0:c.classList)==null?void 0:n.contains)!=null&&i.call(n,"apexcharts-series-collapsed"))continue;const u=l.getBoundingClientRect();u.width===0&&u.height===0||(u.lefts&&(s=u.right))}return isFinite(a)?HF.screenXToPlotPx(o,(a+s)/2):null}placeHorizontalSharedTooltip(e){var n,i;const o=this.w,r=this.ttCtx,a=r.getElTooltip();if(!a)return!1;const s=r.getElGrid();if(!s)return!1;const l=s.getBoundingClientRect(),c=o.dom.baseEl.querySelectorAll(`.apexcharts-bar-series path[j='${e}'],.apexcharts-rangebar-series path[j='${e}'],.apexcharts-boxPlot-series path[j='${e}']`);if(!c.length)return!1;let u=1/0,d=-1/0,f=1/0,h=-1/0;for(const T of c){const M=T.parentNode;if((i=(n=M==null?void 0:M.classList)==null?void 0:n.contains)!=null&&i.call(n,"apexcharts-series-collapsed"))continue;const I=T.getBoundingClientRect();I.width===0&&I.height===0||(I.leftd&&(d=I.right),I.toph&&(h=I.bottom))}if(!isFinite(u))return!1;const p=r.tooltipRect.ttWidth||0,g=r.tooltipRect.ttHeight||0,m=(u+d)/2-l.left+o.layout.translateX,v=f-l.top+o.layout.translateY,b=h-l.top+o.layout.translateY,y=o.layout.translateY,w=o.layout.translateY+o.layout.gridHeight,x=o.layout.translateX,$=o.layout.translateX+o.layout.gridWidth;let S="top",_=v-g-Sr;if(_$&&(P=$-p);const O=Math.max(10,Math.min(p-10,m-P));return this.applyTooltipPosition(a,{x:P,y:_,placement:S,arrowY:null,arrowX:O}),!0}};function ixe(t){const e=n=>``;switch(t){case"square":case"rect":return e('');case"line":return e('');case"diamond":return e('');case"triangle":return e('');case"cross":return e('');case"plus":return e('');case"star":return e('');case"sparkle":return e('');case"circle":default:return e('')}}let jF=class{constructor(e){this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new n$(e)}drawDynamicPoints(){const e=this.w,n=new it(this.w),i=new Md(this.w,this.ctx),o=[...e.dom.baseEl.querySelectorAll(".apexcharts-series")];e.config.chart.stacked&&o.sort((r,a)=>parseFloat(r.getAttribute("data:realIndex"))-parseFloat(a.getAttribute("data:realIndex")));for(let r=0;r0){const a=this.ttCtx.tooltipUtil.getPathFromPoint(i[o],r);i[o].setAttribute("d",a)}else i[o].setAttribute("d","M0,0")}}},VF=class{constructor(e){this.w=e.w;const n=this.w;this.ttCtx=e,this.isVerticalGroupedRangeBar=!n.globals.isBarHorizontal&&n.config.chart.type==="rangeBar"&&n.config.plotOptions.bar.rangeBarGroupRows}getAttr(e,n){var i;return parseFloat((i=Oo.hoverTarget(e).getAttribute(n))!=null?i:"")}handleHeatTreeTooltip({e,opt:n,x:i,y:o,type:r}){var a,s,l,c;const u=this.ttCtx,d=this.w,f=d.globals.activeRenderer,h=r==="heatmap"&&f&&f.kind==="canvas"&&typeof f.hitTest=="function",p=Oo.hoverTarget(e);let g,m,v,b,y,w;if(h){const O=n.elGrid.getBoundingClientRect(),T=(a=n.clientX)!=null?a:e.type==="touchmove"?e.touches[0].clientX:e.clientX,M=(s=n.clientY)!=null?s:e.type==="touchmove"?e.touches[0].clientY:e.clientY,I=f.hitTest(T-O.left,M-O.top);if(!I)return{x:i,y:o,noHit:!0};g=I.seriesIndex,m=I.dataPointIndex,v=I.x,b=I.y,y=I.width,w=I.height}else if(p.classList.contains(`apexcharts-${r}-rect`))g=this.getAttr(e,"i"),m=this.getAttr(e,"j"),v=this.getAttr(e,"cx"),b=this.getAttr(e,"cy"),y=this.getAttr(e,"width"),w=this.getAttr(e,"height");else return{x:i,y:o};u.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:g,j:m,shared:!1,e}),d.interact.capturedSeriesIndex=g,d.interact.capturedDataPointIndex=m,u.tooltipPosition.moveXCrosshairs(v+y/2);const x=u.getElTooltip();if(r==="heatmap"&&d.config.tooltip.arrow&&!d.config.tooltip.followCursor&&x){const O=n.elGrid.getBoundingClientRect(),T=d.dom.elWrap.getBoundingClientRect(),M=O.left-T.left;let I,k,E,R;if(h)I=v,k=b,E=v+y,R=b+w;else{const G=p.getBoundingClientRect();I=G.left-O.left,k=G.top-O.top,E=G.right-O.left,R=G.bottom-O.top}const D=u.tooltipRect.ttWidth||0,F=u.tooltipRect.ttHeight||0,N=(I+E)/2+M,B=k+d.layout.translateY,z=R+d.layout.translateY,W=d.layout.translateY,j=d.layout.translateY+d.layout.gridHeight,U=M,V=M+d.layout.gridWidth;let q="top",Y=B-F-Sr;if(YV&&(J=V-D);const Q=Math.max(10,Math.min(D-10,N-J));return u.tooltipPosition.applyTooltipPosition(x,{x:J,y:Y,placement:q,arrowY:null,arrowX:Q}),{x:J,y:Y,positioned:!0}}if(i=v+u.tooltipRect.ttWidth/2+y,o=b+u.tooltipRect.ttHeight/2-w/2,i>d.layout.gridWidth/2&&(i=v-u.tooltipRect.ttWidth/2+y),u.w.config.tooltip.followCursor){const O=d.dom.elWrap.getBoundingClientRect();i=((l=d.interact.clientX)!=null?l:0)-O.left-(i>d.layout.gridWidth/2?u.tooltipRect.ttWidth:0),o=((c=d.interact.clientY)!=null?c:0)-O.top-(o>d.layout.gridHeight/2?u.tooltipRect.ttHeight:0)}const $=u.tooltipRect.ttWidth||0,S=n.elGrid?n.elGrid.getBoundingClientRect():null,_=S?S.left-d.dom.elWrap.getBoundingClientRect().left:d.layout.translateX,P=_+d.layout.gridWidth;return i+$>P&&(i=P-$),i<_&&(i=_),{x:i,y:o}}handleMarkerTooltip({e,opt:n,x:i,y:o}){const r=this.w,a=this.ttCtx;let s,l;if(Oo.hoverTarget(e).classList.contains("apexcharts-marker")){const c=parseInt(n.paths.getAttribute("cx"),10),u=parseInt(n.paths.getAttribute("cy"),10),d=parseFloat(n.paths.getAttribute("val"));if(l=parseInt(n.paths.getAttribute("rel"),10),s=parseInt(n.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,a.intersect){const h=we.findAncestor(n.paths,"apexcharts-series");h&&(s=parseInt(h.getAttribute("data:realIndex"),10))}a.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:s,j:l,shared:a.showOnIntersect?!1:r.config.tooltip.shared,e}),e.type==="mouseup"&&a.markerClick(e,s,l),r.interact.capturedSeriesIndex=s,r.interact.capturedDataPointIndex=l;const f=!!r.config.tooltip.arrow;if(i=c,f?o=u:(o=u+r.layout.translateY-a.tooltipRect.ttHeight*1.4,d<0&&(o=u)),a.w.config.tooltip.followCursor){const h=a.getElGrid();if(!h)return{x:i,y:o};const p=h.getBoundingClientRect();o=a.e.clientY+r.layout.translateY-p.top}a.marker.enlargeCurrentPoint(l,n.paths,i,o)}return{x:i,y:o}}handleBarTooltip({e,opt:n}){var i,o,r;const a=this.w,s=this.ttCtx,l=s.getElTooltip();let c=0,u=0,d=0,f=0,h;const p=this.getBarTooltipXY({e,opt:n});if(p.j===null&&p.barHeight===0&&p.barWidth===0)return;f=p.i;const g=p.j;if(a.interact.capturedSeriesIndex=f,a.interact.capturedDataPointIndex=g!==null?g:a.interact.capturedDataPointIndex,a.globals.isBarHorizontal&&s.tooltipUtil.hasBars()||!a.config.tooltip.shared?(u=p.x,d=p.y,h=Array.isArray(a.config.stroke.width)?a.config.stroke.width[f]:a.config.stroke.width,c=u):!a.globals.comboCharts&&!a.config.tooltip.shared&&(c=c/2),isNaN(d)&&(d=a.globals.svgHeight-s.tooltipRect.ttHeight),u+s.tooltipRect.ttWidth>a.layout.gridWidth?u=u-s.tooltipRect.ttWidth:u<0&&(u=0),!(s.w.config.tooltip.followCursor&&!s.getElGrid())&&(s.tooltip===null&&(s.tooltip=a.dom.baseEl.querySelector(".apexcharts-tooltip:not(.apexcharts-annotation-tooltip)")),a.config.tooltip.shared||(a.globals.comboBarCount>0?s.tooltipPosition.moveXCrosshairs(c+h/2):s.tooltipPosition.moveXCrosshairs(c)),!s.fixedTooltip&&(!a.config.tooltip.shared||a.globals.isBarHorizontal&&s.tooltipUtil.hasBars())&&(d=d+a.layout.translateY-s.tooltipRect.ttHeight/2,l))){const m=s.tooltipRect.ttWidth||0,v=s.tooltipRect.ttHeight||0,b=!!a.config.tooltip.arrow,{barAnchorXInGrid:y,barAnchorYInGrid:w,barRectInGrid:x}=p,$=(i=s.getElGrid())==null?void 0:i.getBoundingClientRect(),S=a.dom.elWrap.getBoundingClientRect(),_=$?$.left-S.left:a.layout.translateX;let P,O=null,T=null,M=u+_,I=d;if(b&&a.globals.isBarHorizontal&&x!=null){const k=a.layout.translateY,E=a.layout.translateY+a.layout.gridHeight,R=_,D=_+a.layout.gridWidth,F=(x.left+x.right)/2+_,N=x.top+a.layout.translateY,B=x.bottom+a.layout.translateY;let z=N-v-Sr;if(P="top",zD&&(M=D-m),T=Math.max(10,Math.min(m-10,F-M))}else if(b&&y!=null&&w!=null){const k=y+_,E=_+a.layout.gridWidth/2,R=((o=x==null?void 0:x.left)!=null?o:y)+_,D=((r=x==null?void 0:x.right)!=null?r:y)+_;if(kB&&(I=B-v)}if(v>0&&x){const F=(x.top+x.bottom)/2+a.layout.translateY;O=Math.max(10,Math.min(v-10,F-I))}}s.tooltipPosition.applyTooltipPosition(l,{x:M,y:I,placement:P,arrowY:O,arrowX:T})}}getBarTooltipXY({e,opt:n}){const i=this.w;let o=null;const r=this.ttCtx;let a=0,s=0,l=0,c=0,u=0,d=null,f=null,h=null,p=null,g=null;const m=Oo.hoverTarget(e),v=m.classList;if(v.contains("apexcharts-bar-area")||v.contains("apexcharts-candlestick-area")||v.contains("apexcharts-boxPlot-area")||v.contains("apexcharts-rangebar-area")){const b=m,y=b.getBoundingClientRect(),w=n.elGrid.getBoundingClientRect(),x=y.height;u=y.height;const $=y.width,S=parseInt(b.getAttribute("cx"),10),_=parseInt(b.getAttribute("cy"),10);d=S,f=_,c=parseFloat(b.getAttribute("barWidth"));const P=y.left-w.left,O=y.top-w.top,T=P+$/2,M=O+x/2;h=T,p=i.globals.isBarHorizontal?M:O,g={left:P,top:O,right:P+$,bottom:O+x};const I=e.type==="touchmove"?e.touches[0].clientX:e.clientX;o=parseInt(b.getAttribute("j"),10),a=parseInt(b.parentNode.getAttribute("rel"),10)-1;const k=b.getAttribute("data-range-y1"),E=b.getAttribute("data-range-y2");i.globals.comboCharts&&(a=parseInt(b.parentNode.getAttribute("data:realIndex"),10));const R=F=>(i.axisFlags.isXNumeric?F=S-$/2:this.isVerticalGroupedRangeBar?F=S+$/2:F=S-r.dataPointsDividedWidth+$/2,F),D=()=>_-r.dataPointsDividedHeight+x/2-r.tooltipRect.ttHeight/2;r.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:a,j:o,y1:k?parseInt(k,10):null,y2:E?parseInt(E,10):null,shared:r.showOnIntersect?!1:i.config.tooltip.shared,e}),i.config.tooltip.followCursor?i.globals.isBarHorizontal?(s=I-w.left+15,l=D()):(s=R(s),l=e.clientY-w.top-r.tooltipRect.ttHeight/2-15):i.globals.isBarHorizontal?(s=S,r.xyRatios&&s0&&r.setAttribute("width",String(o.xcrosshairsWidth))}handleYCrosshair(){const e=this.w,n=this.ttCtx;n.ycrosshairs=e.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),n.ycrosshairsHidden=e.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}drawYaxisTooltipText(e,n,i){const o=this.ttCtx,r=this.w,a=r.globals,s=a.seriesYAxisMap[e];if(o.yaxisTooltips[e]&&s.length>0){const l=r.formatters.yLabelFormatters[e],c=o.getElGrid();if(!c)return;const u=c.getBoundingClientRect(),d=s[0];let f=0;i.yRatio.length>1&&(f=d);const h=(n-u.top)*i.yRatio[f],p=a.maxYArr[d]-a.minYArr[d];let g=a.minYArr[d]+(p-h);r.config.yaxis[e].reversed&&(g=a.maxYArr[d]-(p-h)),o.tooltipPosition.moveYCrosshairs(n-u.top),o.yaxisTooltipText[e].innerHTML=l(g),o.tooltipPosition.moveYAxisTooltip(e)}}},YF=class{constructor(e,n){this.w=e,this.ctx=n,this.tConfig=e.config.tooltip,this.tooltipUtil=new Oo(this),this.tooltipLabels=new WF(this),this.tooltipPosition=new n$(this),this.marker=new jF(this),this.intersect=new VF(this),this.axesTooltip=new XF(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.xaxisTooltipText=null,this.yaxisTooltip=null,this.yaxisTooltipText=null,this.yaxisTTEls=null,this.xaxisOffY=0,this.yaxisOffX=0,this.xcrosshairsWidth=0,this.ycrosshairs=null,this.ycrosshairsHidden=null,this.tooltip=null,this.e=null,this.isBarShared=!e.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now(),this.dimensionUpdateScheduled=!1,this.xyRatios=null,this.isXAxisTooltipEnabled=!1,this.yaxisTooltips=[],this.allTooltipSeriesGroups=[],this.xAxisTicksPositions=null,this.dataPointsDividedHeight=0,this.dataPointsDividedWidth=0,this.tooltipTitle=null,this.legendLabels=null,this.ttItems=null,this.seriesBound=null,this.seriesHoverTimeout=void 0,this.clientX=0,this.clientY=0,this.barSeriesHeight=0,this.tooltipRect={x:0,y:0,ttWidth:0,ttHeight:0}}setupDimensionCache(){const e=this.w,n=this.getElTooltip();n&&(this.updateDimensionCache(),typeof ResizeObserver<"u"&&!e.globals.resizeObserver&&(e.globals.resizeObserver=new ResizeObserver(()=>{this.dimensionUpdateScheduled||(this.dimensionUpdateScheduled=!0,requestAnimationFrame(()=>{this.updateDimensionCache(),this.dimensionUpdateScheduled=!1}))}),e.globals.resizeObserver.observe(n)))}updateDimensionCache(){const e=this.w,n=this.getElTooltip();if(!n)return;const i=n.getBoundingClientRect();e.globals.dimensionCache.tooltip={width:i.width,height:i.height,lastUpdate:Date.now()}}getCachedDimensions(){const e=this.w;if(e.globals.dimensionCache.tooltip){const i=e.globals.dimensionCache.tooltip;if(Date.now()-i.lastUpdate<1e3)return{ttWidth:i.width,ttHeight:i.height}}this.updateDimensionCache();const n=e.globals.dimensionCache.tooltip;return n?{ttWidth:n.width,ttHeight:n.height}:{ttWidth:0,ttHeight:0}}getElTooltip(e){return e||(e=this),e.w.dom.baseEl?e.w.dom.baseEl.querySelector(".apexcharts-tooltip:not(.apexcharts-annotation-tooltip)"):null}getElXCrosshairs(){return this.w.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}getElGrid(){return this.w.dom.baseEl.querySelector(".apexcharts-grid")}drawTooltip(e){const n=this.w;this.xyRatios=e,this.isXAxisTooltipEnabled=n.config.xaxis.tooltip.enabled&&n.globals.axisCharts,this.yaxisTooltips=n.config.yaxis.map(l=>!!(l.show&&l.tooltip.enabled&&n.globals.axisCharts)),this.allTooltipSeriesGroups=[],n.globals.axisCharts||(this.showTooltipTitle=!1);const i=this.getElTooltip();i!=null&&i.parentNode&&i.parentNode.removeChild(i),this.tooltipTitle=null;const o=nt.createElementNS("http://www.w3.org/1999/xhtml","div");o.classList.add("apexcharts-tooltip"),n.config.tooltip.cssClass&&o.classList.add(n.config.tooltip.cssClass),o.classList.add(`apexcharts-theme-${this.tConfig.theme||"light"}`),this.tConfig.fillSeriesColor&&o.classList.add("apexcharts-tooltip-fill-series"),this.tConfig.compact&&(o.classList.add("apexcharts-tooltip-compact"),n.config.series.length===1&&o.classList.add("apexcharts-tooltip-value-only")),this.tConfig.style&&this.tConfig.style.background&&o.style.setProperty("--apx-tt-bg",this.tConfig.style.background);const r=this.tConfig.shared&&n.config.series.length>1&&!n.globals.isBarHorizontal&&n.config.chart.type!=="heatmap";if(this.tConfig.arrow&&!this.tConfig.followCursor&&!this.tConfig.fixed.enabled&&!r&&!this.tConfig.fillSeriesColor&&n.globals.axisCharts){const l=nt.createElementNS("http://www.w3.org/1999/xhtml","div");l.classList.add("apexcharts-tooltip-arrow"),o.appendChild(l)}if(n.config.chart.accessibility.enabled&&n.config.chart.accessibility.announcements.enabled&&(o.setAttribute("role","tooltip"),o.setAttribute("aria-live","polite"),o.setAttribute("aria-atomic","true"),o.setAttribute("aria-hidden","true")),n.dom.elWrap.appendChild(o),n.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();const l=new Ws(this.w,this.ctx,void 0);this.xAxisTicksPositions=l.getXAxisTicksPositions()}if((n.globals.comboCharts||this.tConfig.intersect||n.config.chart.type==="rangeBar")&&!this.tConfig.shared&&(this.showOnIntersect=!0),(n.config.markers.size===0||n.globals.markers.largestSize===0||n.globals.markers.batched)&&this.marker.drawDynamicPoints(),n.globals.collapsedSeries.length===n.seriesData.series.length)return;this.dataPointsDividedHeight=n.layout.gridHeight/n.globals.dataPoints,this.dataPointsDividedWidth=n.layout.gridWidth/n.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=nt.createElementNS("http://www.w3.org/1999/xhtml","div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||n.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,o.appendChild(this.tooltipTitle));let s=n.seriesData.series.length;(n.globals.xyCharts||n.globals.comboCharts)&&this.tConfig.shared&&(this.showOnIntersect?s=1:s=n.seriesData.series.length),this.legendLabels=n.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(s),this.addSVGEvents(),this.setupDimensionCache()}createTTElements(e){const n=this.w,i=[],o=this.getElTooltip();if(!o)return i;for(let r=0;r{const f=nt.createElementNS("http://www.w3.org/1999/xhtml","div");f.classList.add(`apexcharts-tooltip-${d}-group`);const h=nt.createElementNS("http://www.w3.org/1999/xhtml","span");h.classList.add(`apexcharts-tooltip-text-${d}-label`),f.appendChild(h);const p=nt.createElementNS("http://www.w3.org/1999/xhtml","span");p.classList.add(`apexcharts-tooltip-text-${d}-value`),f.appendChild(p),u.appendChild(f)}),a.appendChild(u),o.appendChild(a),i.push(a)}return i}addSVGEvents(){const e=this.w,n=e.config.chart.type,i=this.getElTooltip();if(!i)return;const o=n==="bar"||n==="candlestick"||n==="boxPlot"||n==="violin"||n==="rangeBar",r=n==="area"||n==="line"||n==="scatter"||n==="bubble"||n==="radar",a=r&&!e.globals.xyCharts,s=e.dom.Paper.node,l=this.getElGrid();l&&(this.seriesBound=l.getBoundingClientRect());const c=[],u=[],d={hoverArea:s,elGrid:l,tooltipEl:i,tooltipY:c,tooltipX:u,ttItems:this.ttItems};let f;if(e.globals.axisCharts&&(r?f=e.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker"):o?f=e.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-bar-area, .apexcharts-series .apexcharts-candlestick-area, .apexcharts-series .apexcharts-boxPlot-area, .apexcharts-series .apexcharts-violin-area, .apexcharts-series .apexcharts-rangebar-area"):(n==="heatmap"||n==="treemap")&&(f=e.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap")),f&&f.length))for(let p=0;p0&&this.addPathsEventListeners(p,d),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(d)}}drawFixedTooltipRect(){const e=this.w,n=this.getElTooltip();if(!n)return{x:0,y:0,ttWidth:0,ttHeight:0};const i=n.getBoundingClientRect(),o=i.width+10,r=i.height+10;let a=this.tConfig.fixed.offsetX,s=this.tConfig.fixed.offsetY;const l=this.tConfig.fixed.position.toLowerCase();return l.indexOf("right")>-1&&(a=a+e.globals.svgWidth-o+10),l.indexOf("bottom")>-1&&(s=s+e.globals.svgHeight-r-10),this.tooltipPosition.applyTooltipPosition(n,{x:a,y:s}),{x:a,y:s,ttWidth:o,ttHeight:r}}addDatapointEventsListeners(e){const i=this.w.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(i,e)}addPathsEventListeners(e,n){const i=this;for(let o=0;oe[o].addEventListener(s,i.onSeriesHover.bind(i,r),{capture:!1,passive:!0}))}}onSeriesHover(e,n){Oo.hoverTarget(n);const i=20,o=Date.now()-this.lastHoverTime;o>=i?this.seriesHover(e,n):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(()=>{this.seriesHover(e,n)},i-o))}seriesHover(e,n){var i;if(this.w.globals.isDestroyed)return;this.lastHoverTime=Date.now();let o=[];const r=this.w,a=s=>{var l,c,u;const d=(u=(c=(l=s==null?void 0:s.w)==null?void 0:l.config)==null?void 0:c.chart)==null?void 0:u.link;return!!(d&&typeof d.dimension=="function")};if(r.config.chart.group&&!a(this.ctx)&&(o=this.ctx.getSyncedCharts().filter(s=>!a(s))),!(r.globals.axisCharts&&(r.globals.minX===-1/0&&r.globals.maxX===1/0||r.globals.dataPoints===0)))if(o.length){const s=(i=e.elGrid)==null?void 0:i.getBoundingClientRect(),l=n.type==="touchmove"?n.touches[0]:n;o.forEach(c=>{const u=this.getElTooltip(c),d=c.w.globals.tooltip.getElGrid(),f=d==null?void 0:d.getBoundingClientRect(),h=s&&f?f.left+(l.clientX-s.left)/s.width*f.width:l.clientX,p=s&&f?f.top+(l.clientY-s.top)/s.height*f.height:l.clientY,g={paths:e.paths,tooltipEl:u,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:d||e.elGrid,hoverArea:e.hoverArea,ttItems:c.w.globals.tooltip.ttItems,clientX:h,clientY:p};c.w.globals.minX===this.w.globals.minX&&c.w.globals.maxX===this.w.globals.maxX&&c.w.globals.tooltip.seriesHoverByContext({chartCtx:c,ttCtx:c.w.globals.tooltip,opt:g,e:n})})}else this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:e,e:n})}seriesHoverByContext({chartCtx:e,ttCtx:n,opt:i,e:o}){var r;const a=e.w;if(!this.getElTooltip(e))return;const l=n.getCachedDimensions();n.tooltipRect={x:0,y:0,ttWidth:l.ttWidth,ttHeight:l.ttHeight},n.e=o,n.tooltipUtil.hasBars()&&!a.globals.comboCharts&&!n.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries&&new js(e.w).toggleSeriesOnHover(o,(r=Oo.hoverTarget(o))==null?void 0:r.parentNode),a.globals.axisCharts?n.axisChartsTooltips({e:o,opt:i,tooltipRect:n.tooltipRect}):n.nonAxisChartsTooltips({e:o,opt:i,tooltipRect:n.tooltipRect}),n.fixedTooltip&&n.drawFixedTooltipRect()}axisChartsTooltips({e,opt:n}){var i,o,r;const a=this.w;let s,l;if(!n.elGrid)return;const c=n.elGrid.getBoundingClientRect(),u=(i=n.clientX)!=null?i:e.type==="touchmove"?e.touches[0].clientX:e.clientX,d=(o=n.clientY)!=null?o:e.type==="touchmove"?e.touches[0].clientY:e.clientY;if(this.clientY=d,this.clientX=u,a.interact.capturedSeriesIndex=-1,a.interact.capturedDataPointIndex=-1,dc.top+c.height){this.handleMouseOut(n);return}if(a.dom.elWrap.querySelector(".apexcharts-annotation-tooltip.apexcharts-active")){this.handleMouseOut(n);return}if(Array.isArray(this.tConfig.enabledOnSeries)&&!a.config.tooltip.shared){const v=parseInt(n.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(v)<0){this.handleMouseOut(n);return}}const f=this.getElTooltip();if(!f)return;const h=this.getElXCrosshairs(),p=["heatmap","treemap"].includes(a.config.chart.type);let g=[];a.config.chart.group&&!p&&(g=this.ctx.getSyncedCharts());const m=a.globals.xyCharts||a.config.chart.type==="bar"&&!a.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||a.globals.comboCharts&&this.tooltipUtil.hasBars();if(e.type==="mousemove"||e.type==="touchmove"||e.type==="mouseup"){if(a.globals.collapsedSeries.length+a.globals.ancillaryCollapsedSeries.length===a.seriesData.series.length)return;h!==null&&h.classList.add("apexcharts-active");const v=(r=this.yaxisTooltips)==null?void 0:r.filter(y=>y===!0),b=this.ycrosshairs;if(b!==null&&(v!=null&&v.length)&&b.classList.add("apexcharts-active"),!p&&(m&&!this.showOnIntersect||g.length>1))this.handleStickyTooltip(e,u,d,n);else if(a.config.chart.type==="heatmap"||a.config.chart.type==="treemap"){const y=this.intersect.handleHeatTreeTooltip({e,opt:n,x:s,y:l,type:a.config.chart.type});if(y.noHit){this.handleMouseOut(n);return}s=y.x,l=y.y,y.positioned||(f.style.left=s+"px",f.style.top=l+"px")}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e,opt:n}),this.tooltipUtil.hasMarkers(0)&&this.intersect.handleMarkerTooltip({e,opt:n,x:s,y:l});if(this.yaxisTooltips&&this.yaxisTooltips.length)for(let y=0;y{const h=f.getAttribute("data:default-text");f.innerHTML=decodeURIComponent(h??"")})))}renderUnitTooltip(e){var n,i,o,r,a;const s=this.w,l=this.getElTooltip();if(!l)return;const c=parseInt(e.getAttribute("i")||"0",10),u=parseInt(e.getAttribute("j")||"0",10);if(typeof s.config.tooltip.custom=="function"){this.tooltipLabels.handleCustomTooltip({i:c,j:u,y1:null,y2:null,w:s});return}const d=s.seriesData.seriesNames[c]||`series-${c+1}`,f=Math.round(Number(s.seriesData.series[c])||0),h=e.parentNode,p=h&&h.querySelectorAll?h.querySelectorAll(".apexcharts-unit-area").length:f,g=s.config.plotOptions.unit||{},m=g.unitValue>0?g.unitValue:1,v=s.seriesData.unitData&&s.seriesData.unitData[c],b=v?v[u]:void 0,y=b&&typeof b=="object"?b:null,w=y&&y.fillColor||s.globals.colors&&s.globals.colors[c]||"#008FFB";let x;const $=g.tooltip&&g.tooltip.formatter;if(typeof $=="function")x=$({seriesName:d,seriesIndex:c,dataPointIndex:u,count:p,value:f,unitValue:m,datum:b,color:w,w:s});else if(b!=null){const T=y&&(o=(i=(n=y.name)!=null?n:y.label)!=null?i:y.x)!=null?o:null,M=y?(a=(r=y.value)!=null?r:y.y)!=null?a:null:b;x=T!=null&&M!=null?`${T}: ${M}`:T!=null?String(T):M!=null?String(M):`#${(u+1).toLocaleString()} of ${p.toLocaleString()}`}else x=`#${(u+1).toLocaleString()} of ${p.toLocaleString()}`,m!==1&&(x+=` · ${m.toLocaleString()} per dot`);const S=s.config.chart.fontFamily||"inherit",_=s.config.tooltip.style&&s.config.tooltip.style.fontSize||"12px",P=l.querySelector(".apexcharts-tooltip-arrow");l.innerHTML=`
${d}
${x}
`,P&&l.appendChild(P);const O=l.getBoundingClientRect();this.tooltipRect.ttWidth=O.width,this.tooltipRect.ttHeight=O.height}handleStickyTooltip(e,n,i,o){const r=this.w,a=this.tooltipUtil.getNearestValues({context:this,hoverArea:o.hoverArea,elGrid:o.elGrid,clientX:n,clientY:i}),s=a.j;let l=a.capturedSeries;l!==null&&r.globals.collapsedSeriesIndices.includes(l??-1)&&(l=null);const c=r.globals.barPadForNumericAxis||0;if(a.hoverX<-c||a.hoverX>r.layout.gridWidth+c){this.handleMouseOut(o);return}if(l!==null)this.handleStickyCapturedSeries(e,l??-1,o,s??0);else if(this.tooltipUtil.isXoverlap(s??0)||r.globals.isBarHorizontal){const u=r.seriesData.series.findIndex((d,f)=>!r.globals.collapsedSeriesIndices.includes(f));this.create(e,this,u,s??0,o.ttItems)}}handleStickyCapturedSeries(e,n,i,o){const r=this.w;if(!this.tConfig.shared&&r.seriesData.series[n][o]===null){this.handleMouseOut(i);return}if(typeof r.seriesData.series[n][o]<"u")this.tConfig.shared&&this.tooltipUtil.isXoverlap(o)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(e,this,n,o,i.ttItems):this.create(e,this,n,o,i.ttItems,!1);else if(this.tooltipUtil.isXoverlap(o)){const a=r.seriesData.series.findIndex((s,l)=>!r.globals.collapsedSeriesIndices.includes(l));this.create(e,this,a,o,i.ttItems)}}deactivateHoverFilter(){const e=this.w,n=new it(this.w,this.ctx),i=e.dom.Paper.find(".apexcharts-bar-area");for(let o=0;o{const l=s.getAttribute("data:default-text");s.innerHTML=decodeURIComponent(l??"")}))}markerClick(e,n,i){const o=this.w;typeof o.config.chart.events.markerClick=="function"&&o.config.chart.events.markerClick(e,this.ctx,{seriesIndex:n,dataPointIndex:i,w:o}),this.ctx.events.fireEvent("markerClick",[e,this.ctx,{seriesIndex:n,dataPointIndex:i,w:o}])}_hasCustomSeries(){const e=this.w;return Lr(e.config.chart.type)?!0:(e.config.series||[]).some(i=>i&&i.type&&Lr(i.type))}create(e,n,i,o,r,a=null){var s,l,c,u,d,f,h,p,g,m,v,b,y,w,x,$,S,_,P,O,T;const M=this.w,I=n;e.type==="mouseup"&&this.markerClick(e,i,o),a===null&&(a=this.tConfig.shared);const k=this.tooltipUtil.hasMarkers(i),E=((l=(s=this.ctx)==null?void 0:s.renderer)==null?void 0:l.kind)==="canvas",R=E&&!this.tooltipUtil.hasBars(),D=!E&&!k&&!this.tooltipUtil.hasBars()&&this._hasCustomSeries(),F=R||D,N=this.tooltipUtil.getElBars(),B=()=>{M.globals.markers.largestSize>0&&!E&&!M.globals.markers.batched?I.marker.enlargePoints(o):I.tooltipPosition.moveDynamicPointsOnHover(o)};if(M.config.legend.tooltipHoverFormatter){const j=M.config.legend.tooltipHoverFormatter,U=Array.from((c=this.legendLabels)!=null?c:[]);U.forEach(V=>{const q=V.getAttribute("data:default-text");V.innerHTML=decodeURIComponent(q??"")});for(let V=0;V0)){const j=new it(this.w,this.ctx),U=M.dom.Paper.find(`.apexcharts-bar-area[j='${o}']`);this.deactivateHoverFilter(),I.tooltipUtil.getAllMarkers(!0).length&&!this.barSeriesHeight&&B(),I.tooltipPosition.moveStickyTooltipOverBars(o,i);for(let q=0;q=o?"canvas":"svg"}resolve(){const e=this.w.config.chart.renderer||"svg",n=this._desiredKind();if(n!=="svg"){const i=sh().get(n);if(i)return this._instances[n]||(this._instances[n]=i(this.w,this.ctx)),this.active=this._instances[n],this._activeKind=n,this.ctx.renderer=this.active,this.w.globals.activeRenderer=this.active,this._activeKind;e===n&&console.warn(`[apexcharts] renderer:"${n}" requested but that renderer is not in the default bundle. Bundler: import 'apexcharts/features/renderer-${n}'. Script tag: add + diff --git a/apps/admin-panel/src/components/accounting/AccountingConnection.vue b/apps/admin-panel/src/components/accounting/AccountingConnection.vue new file mode 100644 index 0000000..6b7cc03 --- /dev/null +++ b/apps/admin-panel/src/components/accounting/AccountingConnection.vue @@ -0,0 +1,743 @@ + + + + + diff --git a/apps/admin-panel/src/components/accounting/AccountingSyncButton.vue b/apps/admin-panel/src/components/accounting/AccountingSyncButton.vue new file mode 100644 index 0000000..66da21d --- /dev/null +++ b/apps/admin-panel/src/components/accounting/AccountingSyncButton.vue @@ -0,0 +1,76 @@ + + + diff --git a/apps/admin-panel/src/components/accounting/CustomerAccountingCard.vue b/apps/admin-panel/src/components/accounting/CustomerAccountingCard.vue new file mode 100644 index 0000000..6c54ac0 --- /dev/null +++ b/apps/admin-panel/src/components/accounting/CustomerAccountingCard.vue @@ -0,0 +1,142 @@ + + + + + diff --git a/apps/admin-panel/src/components/common/CityTreeSelect.vue b/apps/admin-panel/src/components/common/CityTreeSelect.vue new file mode 100644 index 0000000..0792021 --- /dev/null +++ b/apps/admin-panel/src/components/common/CityTreeSelect.vue @@ -0,0 +1,81 @@ + + + diff --git a/apps/admin-panel/src/components/x-table/XTable.vue b/apps/admin-panel/src/components/x-table/XTable.vue index 67e70c2..d0cb865 100644 --- a/apps/admin-panel/src/components/x-table/XTable.vue +++ b/apps/admin-panel/src/components/x-table/XTable.vue @@ -130,6 +130,7 @@ + @@ -140,6 +141,7 @@ import { computed, onMounted, reactive, ref } from 'vue'; import { FilterOutlined, PrinterOutlined, ReloadOutlined, SettingOutlined } from '@ant-design/icons-vue'; import api from '../../api/client'; import type { XTbl } from './model'; +import { gridDate } from '../../utils/filters'; const props = withDefaults( defineProps<{ @@ -224,6 +226,7 @@ const antColumns = computed(() => sorter: c.__sorter, width: c.width, __slot: c.scopedSlots?.customRender, + __date: c.filterType === 'date', })), ); diff --git a/apps/admin-panel/src/layouts/components/TheNavbar.vue b/apps/admin-panel/src/layouts/components/TheNavbar.vue index d01595a..1677cdc 100644 --- a/apps/admin-panel/src/layouts/components/TheNavbar.vue +++ b/apps/admin-panel/src/layouts/components/TheNavbar.vue @@ -104,9 +104,9 @@ const displayName = computed(() => auth.user?.name ?? auth.user?.fullName ?? 'ک const initial = computed(() => displayName.value.trim().charAt(0) || 'ک'); const canSeePermissions = computed(() => Boolean(users.hasPermission('user.permission'))); -function onLogout() { - auth.logout(); - router.push('/auth/login'); +async function onLogout() { + const left = await auth.logout(); + if (!left) router.push('/auth/login'); } diff --git a/apps/admin-panel/src/layouts/navMenuItems.ts b/apps/admin-panel/src/layouts/navMenuItems.ts index 48baeeb..684b3ac 100644 --- a/apps/admin-panel/src/layouts/navMenuItems.ts +++ b/apps/admin-panel/src/layouts/navMenuItems.ts @@ -463,6 +463,22 @@ export const adminMenu: NavMenuNode[] = [ i18n: 'مدیریت کیف پول', permissionId:"config.wallet" }, + // D27 — Tahesab / Zarrin integration. + { + url: '/config/manage/accounting', + name: 'accounting Integration', + slug: 'manage-accounting', + i18n: 'اتصال حسابداری', + permissionId:"config.accounting" + }, + // MON-08 — the making-charge formula. + { + url: '/config/manage/wage', + name: 'wage Formula', + slug: 'manage-wage', + i18n: 'اجرت', + permissionId:"config.wage" + }, // Moved under "پیکر بندی" per request — same node shape as before // (own submenu / plain leaf), just relocated in the tree. { diff --git a/apps/admin-panel/src/router/admin.ts b/apps/admin-panel/src/router/admin.ts index 1235055..3429689 100644 --- a/apps/admin-panel/src/router/admin.ts +++ b/apps/admin-panel/src/router/admin.ts @@ -101,6 +101,49 @@ export const adminRoute: RouteRecordRaw[] = [ no_scroll: true } }, + { + path: '/config/manage/accounting', + component: () => import('../views/manage/accounting.vue'), + meta: { + breadcrumb: [ + { + title: 'خانه', + url: '/' + }, + { + title: 'اتصال حسابداری', + active: true + } + ], + pageTitle: 'اتصال حسابداری', + rule: 'editor', + role: 'config.accounting', + parent: 'manage', + no_scroll: true + } + }, + // MON-08 — the making-charge formula (owner ruling 2026-10-08). + { + path: '/config/manage/wage', + component: () => import('../views/manage/wage.vue'), + meta: { + breadcrumb: [ + { + title: 'خانه', + url: '/' + }, + { + title: 'اجرت', + active: true + } + ], + pageTitle: 'اجرت', + rule: 'editor', + role: 'config.wage', + parent: 'manage', + no_scroll: true + } + }, { path: '/config/manage/report', component: () => import('../views/manage/report.vue'), diff --git a/apps/admin-panel/src/router/index.ts b/apps/admin-panel/src/router/index.ts index dabcf45..29e10ef 100644 --- a/apps/admin-panel/src/router/index.ts +++ b/apps/admin-panel/src/router/index.ts @@ -2,7 +2,7 @@ import { createRouter, createWebHistory } from 'vue-router'; import { adminRoute, fullPageAdminRoute } from './admin'; import { branchRoute, fullPageBranchRoute } from './branch'; -import { isBranch, tokenName, userName } from '../utils'; +import { iamAppUrl, isBranch, tokenName, userName } from '../utils'; import { useUsersStore } from '../stores/users'; import api from '../api/client'; @@ -25,6 +25,12 @@ const router = createRouter({ component: () => import('../layouts/full-page/FullPage.vue'), children: [ ...(isBranch() ? fullPageBranchRoute : fullPageAdminRoute), + { + path: '/auth/iam/callback', + name: 'iam-callback', + component: () => import('../views/auth/IamCallback.vue'), + meta: { rule: 'editor' }, + }, { path: '/pages/error-404', name: 'page-error-404', @@ -68,7 +74,7 @@ router.afterEach(() => { }); // legacy router.js:156-161 -const noneAuthUrl = ['/auth/login', '/auth/forgot-password', '/auth/register', '/reg']; +const noneAuthUrl = ['/auth/login', '/auth/forgot-password', '/auth/register', '/reg', '/auth/iam/callback']; /** * Port of legacy getPermission() (router.js:163-182). @@ -109,6 +115,21 @@ async function getPermission(): Promise { * equivalent and produces the same user-visible result. */ router.beforeEach(async (to) => { + if (!localStorage.getItem(tokenName) && to.path !== '/auth/iam/callback' && sessionStorage.getItem('gb_admin_iam_sso_checked') !== '1') { + sessionStorage.setItem('gb_admin_iam_sso_checked', '1'); + try { + const { data } = await api.get('admin/auth/sso/start', { + params: { redirect_uri: iamAppUrl('auth/iam/callback') }, + }); + if (data?.enabled && data.authorize_url) { + window.location.assign(data.authorize_url); + return false; + } + } catch { + // سامانه هویت برای این پنل تنظیم نشده + } + } + if (noneAuthUrl.indexOf(to.path) > -1) { return true; } diff --git a/apps/admin-panel/src/stores/auth.ts b/apps/admin-panel/src/stores/auth.ts index 50e83f6..9ac0e42 100644 --- a/apps/admin-panel/src/stores/auth.ts +++ b/apps/admin-panel/src/stores/auth.ts @@ -1,7 +1,7 @@ // Ported from legacy henza_admin/src/store/auth/moduleAuth.js import { defineStore } from 'pinia'; import api from '../api/client'; -import { tokenName, userName } from '../utils'; +import { iamAppUrl, tokenName, userName } from '../utils'; import { useUsersStore } from './users'; import type { UserInfo } from './users'; @@ -67,6 +67,9 @@ export const useAuthStore = defineStore('auth', { delete persisted.ut; this.inject(persisted); + if (data.iamBootstrapUrl) { + window.location.assign(data.iamBootstrapUrl); + } return persisted; }, @@ -83,13 +86,28 @@ export const useAuthStore = defineStore('auth', { * its module-scoped `roles` survived a session change (bug #2). Clearing * both storage and the roles store is the fix for that. */ - logout() { + async logout(): Promise { + let central: string | null = null; + try { + const { data } = await api.get('admin/auth/sso/logout-url', { + params: { return_url: iamAppUrl('auth/login') }, + }); + central = data?.logout_url ?? null; + } catch { + central = null; + } localStorage.removeItem(tokenName); localStorage.removeItem(userName); localStorage.removeItem('login'); + sessionStorage.removeItem('gb_admin_iam_sso_checked'); const users = useUsersStore(); users.deleteRoles(); users.deleteUserInfo(); + if (central) { + window.location.assign(central); + return true; + } + return false; }, }, }); diff --git a/apps/admin-panel/src/utils/filters.ts b/apps/admin-panel/src/utils/filters.ts index 7864b98..444dda2 100644 --- a/apps/admin-panel/src/utils/filters.ts +++ b/apps/admin-panel/src/utils/filters.ts @@ -60,6 +60,19 @@ export function jdate(val: unknown) { } /** Jalali date+time. Legacy used 12-hour 'hh' here — preserved. */ +/** + * A date column in an XTable grid. The legacy API sent `caj`/`uaj`/… already + * formatted (Selector::convertDate, Jalalian) and the grid printed the string; + * the new API sends an ISO timestamp, which the grid printed raw + * ("2026-07-25T12:32:29.000Z"). Same shape the legacy screen shows: + * 1405/5/3-16:02, in the viewer's local (Tehran) time. Anything that is not + * an ISO timestamp is returned untouched. + */ +export function gridDate(val: unknown) { + if (typeof val !== 'string' || !/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}/.test(val)) return val; + return moment(val).format('jYYYY/jM/jD-HH:mm'); +} + export function jdateTime(val: unknown) { if (val) { return moment(val as string).format('jYYYY/jMM/jDD - hh:mm:ss'); diff --git a/apps/admin-panel/src/utils/index.ts b/apps/admin-panel/src/utils/index.ts index 5d397b6..cd8cd1c 100644 --- a/apps/admin-panel/src/utils/index.ts +++ b/apps/admin-panel/src/utils/index.ts @@ -15,5 +15,12 @@ export function isBranch(): boolean { // Legacy stored the token under a different localStorage key per mode. // See henza_admin/src/axios.js:6 and router.js:173-174,188. +/** آدرس همین پنل، با پیشوند /branch در حالت شعبه. */ +export function iamAppUrl(path: string) { + const base = import.meta.env.BASE_URL || '/'; + const prefix = base.endsWith('/') ? base : `${base}/`; + return `${window.location.origin}${prefix}${path.replace(/^\//, '')}`; +} + export const tokenName = isBranch() ? 'branch_token' : 'token'; export const userName = isBranch() ? 'branch_user' : 'user'; diff --git a/apps/admin-panel/src/views/apps/customer/ReagentCustomer.vue b/apps/admin-panel/src/views/apps/customer/ReagentCustomer.vue index 5b6e14e..f5df4d6 100644 --- a/apps/admin-panel/src/views/apps/customer/ReagentCustomer.vue +++ b/apps/admin-panel/src/views/apps/customer/ReagentCustomer.vue @@ -67,10 +67,38 @@ + + + + + + + +
+ + + + + + + +
@@ -86,6 +114,7 @@ import { onMounted, reactive, ref } from 'vue'; import { useRoute, useRouter } from 'vue-router'; import { message } from 'ant-design-vue'; import api from '../../../api/client'; +import CityTreeSelect from '../../../components/common/CityTreeSelect.vue'; import ImageUploadInput from '../../../components/upload/ImageUploadInput.vue'; const route = useRoute(); @@ -104,10 +133,19 @@ const form = reactive>({ pasazh_name: '', address: '', percent: undefined, + // D17 — the sales-expert fields the reference collected on this form and the + // port had dropped. They live on SalesExpertProfile now. + ncode: '', + phone: '', + city_id: undefined, + gram_level: undefined, // legacy kept the FK in `image_id`; `image_url` only drives the thumbnail. image_id: '', image_url: null, }); + +/** Cities for the «شهر» select and the commission autofill. */ +const cities = ref>([]); const err = reactive>({}); /** Snapshot of the server's record, captured after the edit form is populated. */ @@ -127,6 +165,38 @@ function diffFromInitial(omit: string[] = []): Record { function onAvatar(file: Record) { form.image_id = (file.id as string) ?? ''; } + +/** + * Legacy `getPercent(value)` — henza_admin ReagentCustomer.vue:215-228. + * + * Selecting a city fills the commission percentage: + * 1. use `percent` from the already-loaded city row, if it is set; + * 2. otherwise GET cities/get-percent-aux/{id} and use that; + * 3. write the result into the form. + * + * Ported verbatim, including the falsy test on step 1 — legacy used + * `if (!percent)`, so a city percent of 0 also falls through to the aux + * lookup. Replicated rather than "fixed" (D4). + */ +async function onCityChange(value: string | undefined) { + form.city_id = value; + if (!value) return; + + let percent: number | null | undefined = cities.value.find((c) => c.id === value)?.percent; + if (!percent) { + try { + // The endpoint returns a BARE scalar, as the reference does + // (CitiesController::getPercentAux -> _getP, and the target's + // admin-misc.service.ts:125 returns `c.percentAux` directly). + const { data } = await api.get(`cities/get-percent-aux/${value}`); + percent = data as number | null; + } catch (e) { + console.log(e); + return; + } + } + form.percent = percent === null || percent === undefined ? undefined : Number(percent); +} const REQUIRED = 'لطفا مقدار را وارد کنید'; async function handleSubmit() { @@ -145,11 +215,13 @@ async function handleSubmit() { // (blank means "leave unchanged" on the admin-users endpoint). const fields = id ? diffFromInitial(['image_url', 'password']) : allFields; if (id && form.password) fields.password = form.password; - const payload = { - ...fields, - name: `${form.fname} ${form.lname}`.trim(), - role: 'SALES_EXPERT', - }; + const payload: Record = { ...fields, role: 'SALES_EXPERT' }; + // D0 — fname/lname are real columns and already travel in `fields`. `name` + // goes only when a name part actually changed; sending it unconditionally + // would re-submit the whole name on every save and defeat the diff-send. + if (!id || 'fname' in fields || 'lname' in fields) { + payload.name = `${form.fname} ${form.lname}`.trim(); + } if (id) { await api.put(`users/${id}`, payload); } else { @@ -166,6 +238,19 @@ async function handleSubmit() { } onMounted(async () => { + // D17 — the «شهر» select and its commission autofill need the city list. + try { + const { data } = await api.post('cities/list', { page: 1, limit: 500 }); + cities.value = (data.rows ?? []).map((c: any) => ({ + id: c.id, + title: c.title ?? c.name, + parent: c.parent ?? null, + percent: c.percent === null || c.percent === undefined ? null : Number(c.percent), + })); + } catch (e) { + console.log(e); + } + if (id) { try { const { data } = await api.get(`admin/users/${id}`); @@ -175,6 +260,15 @@ onMounted(async () => { mobile: data.mobile ?? '', address: data.address ?? '', percent: data.percent === null ? undefined : Number(data.percent), + // D17 — from SalesExpertProfile. Numbers are coerced so diffFromInitial + // compares like with like and does not re-send an unchanged field. + ncode: data.ncode ?? '', + phone: data.phone ?? '', + city_id: data.city_id ?? undefined, + gram_level: + data.gram_level === null || data.gram_level === undefined + ? undefined + : Number(data.gram_level), // guarded, unlike legacy — an agent with no avatar must not throw image_id: data.image?.id ?? '', image_url: data.image?.image ?? null, diff --git a/apps/admin-panel/src/views/apps/customer/bulkCustomer.vue b/apps/admin-panel/src/views/apps/customer/bulkCustomer.vue index 5c34097..e327540 100644 --- a/apps/admin-panel/src/views/apps/customer/bulkCustomer.vue +++ b/apps/admin-panel/src/views/apps/customer/bulkCustomer.vue @@ -10,8 +10,9 @@ render this component directly as a route-based fallback, but OmdeList.vue now opens it as a modal via open/id props. - Dropped: the MyUpload avatar widget and the Jalali DateInput, which belong to - fields the redesigned Customer schema has no column for. Flagged in + «تاریخ تولد» (legacy's Jalali DateInput, birth_date) is back since the + Customer schema has birthDate (PERS-03). Dropped: the MyUpload avatar widget, + which belongs to a field the redesigned Customer schema has no column for. Flagged in docs/ADMIN-PORT-PLAN.md rather than faked. The نوع کاربری selector is live again now that Customer.type exists; its four @@ -79,6 +80,11 @@ + @@ -86,7 +92,7 @@ - + @@ -98,17 +104,7 @@
- - - {{ c.title }} - - + @@ -192,6 +188,11 @@ + @@ -199,7 +200,7 @@ - + @@ -211,17 +212,7 @@
- - - {{ c.title }} - - + @@ -269,6 +260,8 @@ import { message } from 'ant-design-vue'; import BaseFormModal from '../../../components/common/BaseFormModal.vue'; import ImageUploadInput from '../../../components/upload/ImageUploadInput.vue'; import api from '../../../api/client'; +import CityTreeSelect from '../../../components/common/CityTreeSelect.vue'; +import DateInput from '../../../components/input/DateInput.vue'; const props = defineProps<{ open?: boolean; @@ -299,7 +292,7 @@ const router = useRouter(); const id = asModal ? props.id : (route.params.id as string | undefined); const loading = ref(false); -const cities = ref<{ id: string; title: string }[]>([]); +const cities = ref<{ id: string; title: string; parent?: string | null; percent?: unknown }[]>([]); const reagent = ref<{ id: string; name: string }[]>([]); const form = reactive>({ @@ -313,12 +306,15 @@ const form = reactive>({ pasazh_name: '', city_id: undefined, mcode: '', + birth_date: '', address: '', // legacy defaulted to no selection; 2 (مغازه دار اپلیکیشن) is what the // backend falls back to when the field is absent. type: undefined, reagent_id: undefined, - percent: undefined, + // D9 — the reference defaults a new customer's making-charge offset to 3 + // (AdminController.php:338) and makes the field required (:354). + percent: 3, gram_level: undefined, // The three document photos legacy collected via MyUpload. Stored as plain // URLs (schema: nationalIdImageUrl / businessLicenseUrl / shopImageUrl), @@ -367,8 +363,24 @@ function diffFromInitial(): Record { return out; } -function filterCity(input: string, option: any) { - return String(option?.children?.[0]?.children ?? '').includes(input); +/** + * Legacy getPercent (henza_admin bulkCustomer.vue:260-272): picking a city fills + * «درصد» with the city's own percent, else its commission percent — which, as + * legacy's _getP, a city without one takes from its parent. + */ +async function onCityChange(value: string | undefined) { + if (!value) return; + let percent: unknown = cities.value.find((c) => c.id === value)?.percent; + if (!Number(percent)) { + try { + const { data } = await api.get(`cities/get-percent-aux/${value}`); + percent = data; + } catch (e) { + console.log(e); + return; + } + } + form.percent = percent === null || percent === undefined ? undefined : Number(percent); } function validate(): boolean { @@ -377,6 +389,12 @@ function validate(): boolean { if (!form.fname) err.fname = 'لطفا مقدار را وارد کنید'; if (!form.lname) err.lname = 'لطفا مقدار را وارد کنید'; if (!form.mobile) err.mobile = 'لطفا مقدار را وارد کنید'; + // D9 — `percent` is required on create in the reference + // (AdminController.php:354). 0 is a legitimate value, so test for + // "not supplied", not for falsiness. + if (form.percent === undefined || form.percent === null || (form.percent as unknown) === '') { + err.percent = 'لطفا مقدار را وارد کنید'; + } return Object.keys(err).length === 0; } @@ -390,12 +408,18 @@ async function handleSubmitOmde() { // whole form means any field the edit path failed to repopulate is sent as // '' and overwrites good data — see the note on Object.assign below. const changed = id ? diffFromInitial() : { ...form }; - const payload = { + const payload: Record = { ...changed, id: id ?? null, - name: `${form.fname} ${form.lname}`.trim(), national_code: form.ncode, }; + // D0 — fname/lname are real columns and travel in `changed` on their own. + // `name` is only sent when a name part actually changed; sending it + // unconditionally would re-submit the whole name on every save and defeat + // the diff-send the edit path relies on. + if (!id || 'fname' in changed || 'lname' in changed) { + payload.name = `${form.fname} ${form.lname}`.trim(); + } if (id) { await api.put(`customer/${id}`, payload); } else { @@ -440,7 +464,10 @@ onMounted(async () => { mobile: data.mobile ?? '', city_id: data.city_id ?? undefined, address: data.address ?? '', - percent: data.percent ?? undefined, + // D9 — the API sends a Decimal, which serialises as a string. Coerce + // it, or a-input-number shows it fine but diffFromInitial() compares + // "3" with 3 and re-sends an unchanged field on every save. + percent: data.percent === null || data.percent === undefined ? undefined : Number(data.percent), gram_level: data.gram_level ?? undefined, reagent_id: data.reagent?.id ?? undefined, // These five were previously OMITTED here. Because handleSubmitOmde @@ -451,6 +478,7 @@ onMounted(async () => { store_name: data.store_name ?? '', pasazh_name: data.pasazh_name ?? '', mcode: data.mcode ?? '', + birth_date: data.birth_date ?? '', phone: data.phone ?? '', type: data.type ?? undefined, // Same reason as the five above: omitted here, they would be sent back diff --git a/apps/admin-panel/src/views/apps/customer/singleCustomer.vue b/apps/admin-panel/src/views/apps/customer/singleCustomer.vue index 913ac76..af2ad8e 100644 --- a/apps/admin-panel/src/views/apps/customer/singleCustomer.vue +++ b/apps/admin-panel/src/views/apps/customer/singleCustomer.vue @@ -32,18 +32,13 @@ - - - {{ c.title }} - - + +
ثبت اطلاعات @@ -57,27 +52,26 @@ import { onMounted, reactive, ref } from 'vue'; import { useRoute, useRouter } from 'vue-router'; import { message } from 'ant-design-vue'; import api from '../../../api/client'; +import CityTreeSelect from '../../../components/common/CityTreeSelect.vue'; +import DateInput from '../../../components/input/DateInput.vue'; const route = useRoute(); const router = useRouter(); const id = route.params.id as string | undefined; const loading = ref(false); -const cities = ref<{ id: string; title: string }[]>([]); +const cities = ref<{ id: string; title: string; parent?: string | null }[]>([]); const form = reactive>({ fname: '', lname: '', phone: '', city_id: undefined, + birth_day: '', }); const err = reactive>({}); const REQUIRED = 'لطفا مقدار را وارد کنید'; -function filterOption(input: string, option: any) { - return String(option?.children?.[0]?.children ?? '').includes(input); -} - async function handleSubmit() { Object.keys(err).forEach((k) => delete err[k]); if (!form.fname) err.fname = REQUIRED; @@ -89,7 +83,9 @@ async function handleSubmit() { loading.value = true; const payload = { ...form, - // one fullName in the schema; the two inputs are joined on submit + // D0 — fname and lname are real columns now, so they go as-is (they are + // already in `form`). `name` is still sent for the legacy readers that + // expect a whole name; the server derives it from the parts anyway. name: `${form.fname} ${form.lname}`.trim(), mobile: form.phone, }; @@ -118,12 +114,15 @@ onMounted(async () => { if (id) { try { const { data } = await api.get(`customer/${id}`); - const parts = String(data.name ?? '').trim().split(' '); + // D0 — the API returns the real parts now. The old split(' ') fallback + // is gone: it guessed at the boundary and put two-token first names in + // the wrong box. Object.assign(form, { - fname: data.fname || parts[0] || '', - lname: data.lname || parts.slice(1).join(' '), + fname: data.fname ?? '', + lname: data.lname ?? '', phone: data.mobile ?? '', city_id: data.city_id ?? undefined, + birth_day: data.birth_day ?? '', }); } catch (e) { console.log(e); diff --git a/apps/admin-panel/src/views/apps/product/AddProduct.vue b/apps/admin-panel/src/views/apps/product/AddProduct.vue index 4774561..bdbf116 100644 --- a/apps/admin-panel/src/views/apps/product/AddProduct.vue +++ b/apps/admin-panel/src/views/apps/product/AddProduct.vue @@ -83,16 +83,18 @@
- - + + + - + @@ -286,6 +288,8 @@ const users = useUsersStore(); const hasPermission = (rid: string) => Boolean(users.hasPermission(rid)); const id = route.params.id as string | undefined; +const accountingLocked = ref(false); +const accountingWage = ref(undefined); const loading = ref(false); const brands = ref<{ id: string; title: string }[]>([]); @@ -382,7 +386,8 @@ function showModal(record?: VariantRow, index?: number) { id: undefined, title: '', grams: undefined, - percentage_pay: undefined, + // D27 — the accounting software's sale making charge, as a starting value. + percentage_pay: accountingWage.value, qty: 0, is_active: true, is_pre_order: false, @@ -470,6 +475,9 @@ onMounted(async () => { if (id) { try { const { data } = await api.get(`product/show/${id}`); + accountingLocked.value = Boolean(data.accounting?.locked); + accountingWage.value = + data.accounting?.sale_wage_percent != null ? Number(data.accounting.sale_wage_percent) : undefined; Object.assign(form, { title: data.title ?? '', product_code: data.product_code ?? '', diff --git a/apps/admin-panel/src/views/apps/product/ProductList.vue b/apps/admin-panel/src/views/apps/product/ProductList.vue index bb3d251..5fd654c 100644 --- a/apps/admin-panel/src/views/apps/product/ProductList.vue +++ b/apps/admin-panel/src/views/apps/product/ProductList.vue @@ -6,6 +6,10 @@ -->
+
تعداد {{ selectedRows.length }} محصول انتخاب شده است.
+ + + + diff --git a/apps/admin-panel/src/views/manage/wage.vue b/apps/admin-panel/src/views/manage/wage.vue new file mode 100644 index 0000000..068083c --- /dev/null +++ b/apps/admin-panel/src/views/manage/wage.vue @@ -0,0 +1,501 @@ + + + + + diff --git a/apps/admin-panel/src/views/order/List.vue b/apps/admin-panel/src/views/order/List.vue index 3963919..4ddf769 100644 --- a/apps/admin-panel/src/views/order/List.vue +++ b/apps/admin-panel/src/views/order/List.vue @@ -198,9 +198,22 @@ async function loadDetail(id: string) { return data; } +/** + * Both handlers receive one ACTIVITY entry from the timeline + * (`{status, title, proceed, uaj, note}` — admin-orders.service.ts:249-258), + * which carries no order id. Posting that object straight through left + * `orderId` missing and UpdateOrderStatusDto rejected every call with 400, so + * neither "ثبت وضعیت" nor "حذف وضعیت" worked on this screen at all. The id + * comes from `tempRow`, the order loaded when the dialog opened. OmdeList.vue + * already built its body this way (OmdeList.vue:187). + */ async function setSts(row: Record) { try { - await api.post('single/order-sts/edit', row); + await api.post('single/order-sts/edit', { + orderId: tempRow.value?.id, + status: row.status, + note: row.note, + }); visibleSts.value = false; message.info('ویرایش موفق آمیز'); tbl.value?.fetch(); @@ -211,8 +224,12 @@ async function setSts(row: Record) { async function removeSts(row: Record) { try { - row.remove = true; - await api.post('single/order-sts/edit', row); + await api.post('single/order-sts/edit', { + orderId: tempRow.value?.id, + status: row.status, + note: row.note, + remove: true, + }); visibleSts.value = false; message.info('ویرایش موفق آمیز'); tbl.value?.fetch(); diff --git a/apps/admin-panel/src/views/report/order_item.vue b/apps/admin-panel/src/views/report/order_item.vue index 8df7b42..829b088 100644 --- a/apps/admin-panel/src/views/report/order_item.vue +++ b/apps/admin-panel/src/views/report/order_item.vue @@ -14,7 +14,11 @@ - اعمال + + اعمال + + دریافت فایل اکسل +
@@ -46,6 +50,7 @@ diff --git a/apps/admin-panel/src/views/user/permissionConst.ts b/apps/admin-panel/src/views/user/permissionConst.ts index a7f16ea..d397f3b 100644 --- a/apps/admin-panel/src/views/user/permissionConst.ts +++ b/apps/admin-panel/src/views/user/permissionConst.ts @@ -838,6 +838,14 @@ export const treeData: PermissionNode[] = [ "title": "گزارش", "key": "config.report", }, + { + "title": "اتصال حسابداری", + "key": "config.accounting", + }, + { + "title": "اجرت", + "key": "config.wage", + }, ] }, { diff --git a/apps/api/.env.example b/apps/api/.env.example index 57d6514..d07c8ae 100644 --- a/apps/api/.env.example +++ b/apps/api/.env.example @@ -4,3 +4,65 @@ DATABASE_URL="postgresql://postgres:postgres@localhost:5432/gold_bank?schema=pub # ports). NestJS/Prisma only load .env from this app's own directory, so this # value is kept in sync manually rather than read from the root file. PORT=3000 + +# Customer app sessions (security hotfix stage 2). +# Separate from JWT_SECRET so an admin token can never validate as a customer +# token. Falls back to JWT_SECRET, then to a dev-only string, when unset — +# development only: in production it is REQUIRED, at least 32 characters and +# different from JWT_SECRET, or the API refuses to start (REL-03). +JWT_CUSTOMER_SECRET= +# Customer token lifetime. The reference issued a token that never expired. +JWT_CUSTOMER_EXPIRES_IN=30d + +# --------------------------------------------------------------------------- +# SMS gateway — Trez panel (port of henza_server/app/Models/Sms.php:57-82) +# --------------------------------------------------------------------------- +# Trez: NEVER commit real values. The reference hardcoded its live production +# credentials in the source (SEC-12); those are treated as compromised and are +# not reused. Set the real values in .env, which is gitignored. +# +# The server always starts (D20). A misconfigured provider only warns, and +# outside production OTP codes are then logged locally instead. +# With nothing set, the relay driver SENDS REAL SMS (D26) — set +# SMS_PROVIDER=none on a development machine that must not. + +# "relay" (default, D26), "trez", or "none" to disable sending entirely. +SMS_PROVIDER=relay +# relay — all optional; URL and secret have built-in defaults. +SMS_RELAY_URL= +SMS_RELAY_SECRET= +# The "host" field; blank sends this machine's first external IPv4. +SMS_RELAY_HOST= +# "kave" (default, Kavenegar) or "default" to let the gateway pick the line. +SMS_RELAY_PLATFORM= +# trez — only used with SMS_PROVIDER=trez. +# Defaults to the reference endpoint when unset; override for staging. +SMS_TREZ_URL= +# Required for trez: +SMS_TREZ_USERNAME= +SMS_TREZ_PASSWORD= +# The panel's sender line — the `PhoneNumber` form field. +SMS_TREZ_SENDER_LINE= +# Comma-separated admin numbers for order/document notifications. The reference +# hardcoded six mobile numbers across its controllers (STUB-05); empty means +# no admin notifications are sent. +SMS_ADMIN_RECIPIENTS= + +# Accounting integration (D27) — configured in the admin panel; these two only +# protect the stored token and control the background worker. +ACCOUNTING_SECRET_KEY= +# "off" keeps this instance out of the background sync. +ACCOUNTING_WORKER= + +# SEC-04 — browser origins allowed to call the API, comma-separated, exact +# (e.g. https://adm.example.ir,https://app.example.ir). Blank = any origin, +# development only. In production (NODE_ENV=production) the API refuses to +# start until CORS_ORIGINS lists full origins and JWT_SECRET is a random value +# of at least 32 characters (SEC-04). See docs/SERVER-SETUP-CHECKLIST.md. +CORS_ORIGINS= + +# SEC-05 — the seed runs once on a fresh database at boot. In production it +# creates roles and permissions only; set "true" to force the demo data +# (sample customers, orders, debt and known-password accounts). Never in a +# real deployment. +SEED_DEMO_DATA= diff --git a/apps/api/Dockerfile b/apps/api/Dockerfile index 1058fa1..31d6310 100644 --- a/apps/api/Dockerfile +++ b/apps/api/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.arvancloud.ir/node:20-bookworm +FROM node:20-bookworm # Pre-built on the developer machine: # pnpm build:release diff --git a/apps/api/jest.config.cjs b/apps/api/jest.config.cjs new file mode 100644 index 0000000..3fc84e8 --- /dev/null +++ b/apps/api/jest.config.cjs @@ -0,0 +1,22 @@ +/** + * Jest for apps/api. + * + * `pnpm test` existed in package.json from the start but jest was never a + * dependency, so the script always failed. Added during security-hotfix stage 2 + * with the user's approval, dev-only. + * + * Unit tests live next to the code as *.spec.ts. The live-server integration + * checks stay in scripts/auth-smoke.sh — they need a running API and a seeded + * database, which is a different thing from a unit run. + */ +module.exports = { + preset: 'ts-jest', + testEnvironment: 'node', + rootDir: 'src', + testRegex: '.*\\.spec\\.ts$', + moduleFileExtensions: ['js', 'json', 'ts'], + transform: { + '^.+\\.ts$': ['ts-jest', { tsconfig: '/../tsconfig.json' }], + }, + collectCoverageFrom: ['**/*.ts', '!**/*.spec.ts', '!**/*.module.ts'], +}; diff --git a/apps/api/package.json b/apps/api/package.json index 54e74f7..5e7d526 100644 --- a/apps/api/package.json +++ b/apps/api/package.json @@ -27,6 +27,7 @@ "bcryptjs": "^3.0.3", "class-transformer": "^0.5.1", "class-validator": "^0.14.1", + "exceljs": "^4.4.0", "passport": "^0.7.0", "passport-jwt": "^4.0.1", "reflect-metadata": "^0.2.2", @@ -34,12 +35,19 @@ }, "devDependencies": { "@nestjs/cli": "^10.4.5", + "@nestjs/testing": "^10.4.22", "@types/bcryptjs": "^3.0.0", "@types/express": "^4.17.21", + "@types/jest": "^30.0.0", "@types/node": "^20.14.0", "@types/passport-jwt": "^4.0.1", + "@types/supertest": "^7.2.1", "esbuild": "^0.25.0", + "jest": "^30.5.2", + "mysql2": "^3.24.5", "prisma": "^5.19.0", + "supertest": "^7.2.2", + "ts-jest": "^29.4.12", "ts-node": "^10.9.2", "typescript": "^5.5.0" } diff --git a/apps/api/prisma/migrations/20260922000000_customer_otp/migration.sql b/apps/api/prisma/migrations/20260922000000_customer_otp/migration.sql new file mode 100644 index 0000000..3db98fe --- /dev/null +++ b/apps/api/prisma/migrations/20260922000000_customer_otp/migration.sql @@ -0,0 +1,40 @@ +-- Customer OTP login challenges. +-- +-- Additive only: creates one new table and its indexes. No existing table, +-- column or row is touched. +-- +-- Ports henza_server's SMS login (ApiMobileController.php:39-78). The reference +-- kept the code in plain text on the customer row with no expiry and no attempt +-- limit; this stores a bcrypt hash and adds both, per docs/parity/DECISIONS.md +-- D6 / T1. + +CREATE TABLE IF NOT EXISTS "CustomerOtp" ( + "id" TEXT NOT NULL, + "mobile" TEXT NOT NULL, + "customerId" TEXT NOT NULL, + "codeHash" TEXT NOT NULL, + "expiresAt" TIMESTAMP(3) NOT NULL, + "attempts" INTEGER NOT NULL DEFAULT 0, + "consumedAt" TIMESTAMP(3), + "requestIp" TEXT, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "CustomerOtp_pkey" PRIMARY KEY ("id") +); + +CREATE INDEX IF NOT EXISTS "CustomerOtp_mobile_createdAt_idx" + ON "CustomerOtp"("mobile", "createdAt"); +CREATE INDEX IF NOT EXISTS "CustomerOtp_customerId_idx" + ON "CustomerOtp"("customerId"); +CREATE INDEX IF NOT EXISTS "CustomerOtp_expiresAt_idx" + ON "CustomerOtp"("expiresAt"); + +DO $$ +BEGIN + ALTER TABLE "CustomerOtp" + ADD CONSTRAINT "CustomerOtp_customerId_fkey" + FOREIGN KEY ("customerId") REFERENCES "Customer"("id") + ON DELETE CASCADE ON UPDATE CASCADE; +EXCEPTION + WHEN duplicate_object THEN NULL; +END $$; diff --git a/apps/api/prisma/migrations/20260922120000_customer_name_parts/migration.sql b/apps/api/prisma/migrations/20260922120000_customer_name_parts/migration.sql new file mode 100644 index 0000000..60ecd93 --- /dev/null +++ b/apps/api/prisma/migrations/20260922120000_customer_name_parts/migration.sql @@ -0,0 +1,97 @@ +-- D0 — split Customer.fullName into firstName / lastName (ADDITIVE). +-- +-- Reference: henza_server has two separate columns from the start +-- database/migrations/2020_10_01_120430_customers_table.php:18-19 +-- $table->string('fname')->nullable(); +-- $table->string('lname')->nullable(); +-- The target collapsed them into one `fullName`, so the admin edit form shows +-- the whole name in the "first name" box and saves an empty last name +-- (admin-customers.service.ts:231-233 returns `fname: c.fullName, lname: ''`). +-- +-- NOTHING IS DROPPED. `fullName` stays and is kept in sync as +-- `firstName || ' ' || lastName`, so every existing reader keeps working +-- (D0 requirement 4). +-- +-- D13 / storefront impact: `Customer` is a SHARED table — both the B2B app and +-- the retail storefront read it. This migration only ADDS two nullable columns +-- and leaves `fullName` populated and authoritative, so no storefront query, +-- view or report changes behaviour. No storefront column is touched. + +-- 1. The two new columns. Nullable: a customer may legitimately have no +-- surname, and the reference's own columns are nullable. +ALTER TABLE "Customer" ADD COLUMN IF NOT EXISTS "firstName" TEXT; +ALTER TABLE "Customer" ADD COLUMN IF NOT EXISTS "lastName" TEXT; + +-- 2. Backfill: first whitespace-separated token -> firstName, the REST -> +-- lastName (D0 requirement 2). Multi-space and leading/trailing whitespace +-- are normalised first so " علی محمدی " splits correctly. +-- +-- Rows with a single token get firstName = that token and lastName = NULL. +-- Rows with more than two tokens put every remaining token in lastName; +-- they are ALSO listed in the review report (see the companion script) so a +-- human can correct them — the split cannot be guessed safely +-- (D0 requirement 3). +UPDATE "Customer" +SET + "firstName" = split_part(btrim(regexp_replace("fullName", '\s+', ' ', 'g')), ' ', 1), + "lastName" = NULLIF( + substr( + btrim(regexp_replace("fullName", '\s+', ' ', 'g')), + length(split_part(btrim(regexp_replace("fullName", '\s+', ' ', 'g')), ' ', 1)) + 2 + ), + '' + ) +WHERE "firstName" IS NULL + AND "fullName" IS NOT NULL + AND btrim("fullName") <> ''; + +-- 3. Keep `fullName` in sync from now on. +-- +-- Writers may update either the parts or the whole; this trigger makes the +-- parts authoritative whenever they are the thing that changed, and +-- otherwise leaves an explicit `fullName` write alone. That way old code +-- that still writes only `fullName` is not broken (D0 requirement 4). +-- Precedence when BOTH the parts and fullName change in the SAME statement: +-- THE PARTS WIN. fullName is rebuilt from them and the submitted fullName is +-- discarded. Rationale: after D0 the parts are the field the forms edit, so +-- they carry the operator's intent; fullName is the derived, legacy-facing +-- value. Choosing the opposite would silently undo an edit made in the two +-- boxes the operator actually typed into. +-- The first branch below tests the parts, so it wins by construction. +CREATE OR REPLACE FUNCTION customer_sync_full_name() RETURNS trigger AS $$ +BEGIN + -- The name parts changed (or are being set on insert): rebuild fullName. + -- This is checked FIRST, so when both change in one statement the parts win. + IF (TG_OP = 'INSERT' AND (NEW."firstName" IS NOT NULL OR NEW."lastName" IS NOT NULL)) + OR (TG_OP = 'UPDATE' + AND (NEW."firstName" IS DISTINCT FROM OLD."firstName" + OR NEW."lastName" IS DISTINCT FROM OLD."lastName")) THEN + NEW."fullName" := btrim( + coalesce(NEW."firstName", '') || ' ' || coalesce(NEW."lastName", '') + ); + + -- Only fullName changed: derive the parts from it, so the two never drift. + ELSIF TG_OP = 'UPDATE' AND NEW."fullName" IS DISTINCT FROM OLD."fullName" + AND NEW."fullName" IS NOT NULL AND btrim(NEW."fullName") <> '' THEN + NEW."firstName" := split_part(btrim(regexp_replace(NEW."fullName", '\s+', ' ', 'g')), ' ', 1); + NEW."lastName" := NULLIF( + substr( + btrim(regexp_replace(NEW."fullName", '\s+', ' ', 'g')), + length(split_part(btrim(regexp_replace(NEW."fullName", '\s+', ' ', 'g')), ' ', 1)) + 2 + ), + '' + ); + END IF; + + RETURN NEW; +END; +$$ LANGUAGE plpgsql; + +DROP TRIGGER IF EXISTS customer_sync_full_name_trg ON "Customer"; +CREATE TRIGGER customer_sync_full_name_trg + BEFORE INSERT OR UPDATE ON "Customer" + FOR EACH ROW EXECUTE FUNCTION customer_sync_full_name(); + +-- 4. Name search hits both parts in the admin grid. +CREATE INDEX IF NOT EXISTS "Customer_firstName_idx" ON "Customer" ("firstName"); +CREATE INDEX IF NOT EXISTS "Customer_lastName_idx" ON "Customer" ("lastName"); diff --git a/apps/api/prisma/migrations/20260922120100_customer_making_charge_offset/migration.sql b/apps/api/prisma/migrations/20260922120100_customer_making_charge_offset/migration.sql new file mode 100644 index 0000000..5d35556 --- /dev/null +++ b/apps/api/prisma/migrations/20260922120100_customer_making_charge_offset/migration.sql @@ -0,0 +1,49 @@ +-- D9 — add Customer.makingChargeOffsetPercent (ADDITIVE, behaviour-neutral). +-- +-- Reference: `customers.percent`, a real per-customer column. +-- database/migrations/2020_10_19_153228_customer_add.php:32 +-- $table->double('percent')->default(0); +-- +-- What it does in the reference: +-- * it is ADDED to the variant's making charge when the app builds an order +-- line: henza_pwa/src/Mixins/product/index.ts:69-75 +-- getWage(v) = myStore.state.percent + v.percentage_pay +-- and `state.percent` is this column, delivered by POST /me-data +-- (henza_pwa/src/store/myDataStore.ts:29,59,122-127). +-- * it shifts the catalogue making-charge filter bounds: +-- ApiMobileController.php:391-396 and :76-77. +-- * it is NOT part of the price formula itself — the extra percent there +-- comes from ConfigStatic['product_price_extra_percent'] +-- (ProductVariant.php:50,183). +-- +-- Why this name and not `productPercent`: the reference has three unrelated +-- things called `percent` (see docs/parity/MIGRATION-STATE.md). This is the +-- per-customer making-charge offset. It is mapped back to the legacy key +-- `percent` in toRow(), so the admin panel's field name does not change. +-- No duplicate field is created. +-- +-- The target currently reads `referredByAgent.wagePercent` instead, which is +-- the wrong field entirely (CUST-02) — that is corrected in the service layer, +-- not here. +-- +-- D13 / storefront impact: NONE. `customers.percent` is a B2B wholesale field; +-- it is consumed only by the B2B app's cart and catalogue filter. The +-- storefront's own percent is ConfigStatic['percent'] (the wallet cashback +-- rate), a different key in a different table, which this migration does not +-- touch. `Customer` is a shared table, but adding a column with a default that +-- reproduces today's behaviour changes no storefront read. + +-- DEFAULT 0 is deliberate and behaviour-neutral: +-- * it matches the reference's own column default (customer_add.php:32); +-- * with 0 the computed wage is `0 + variant.percentage_pay`, i.e. exactly +-- the making charge alone — which is what the target does today, since it +-- has no such column. So no existing customer's price moves. +-- NOTE: the reference's createCustomer() writes 3, not 0, for NEW customers +-- (AdminController.php:338) and makes the field required on create (:354). +-- That is an application-layer default for new rows, NOT a backfill value, +-- and it is handled in the service, not in this migration. +ALTER TABLE "Customer" + ADD COLUMN IF NOT EXISTS "makingChargeOffsetPercent" DECIMAL(6,3) NOT NULL DEFAULT 0; + +COMMENT ON COLUMN "Customer"."makingChargeOffsetPercent" IS + 'Legacy customers.percent — per-customer making-charge offset, ADDED to ProductVariant.defaultWagePercent when pricing an order line, and used to shift the catalogue making-charge filter bounds. Not the wallet cashback rate (that is the storefront ConfigStatic[percent]) and not the wholesale per-line charge (that is OrderItem.wagePercentSnapshot).'; diff --git a/apps/api/prisma/migrations/20260922180000_sales_expert_profile_and_admin_name_parts/migration.sql b/apps/api/prisma/migrations/20260922180000_sales_expert_profile_and_admin_name_parts/migration.sql new file mode 100644 index 0000000..fe6a087 --- /dev/null +++ b/apps/api/prisma/migrations/20260922180000_sales_expert_profile_and_admin_name_parts/migration.sql @@ -0,0 +1,180 @@ +-- D17 — SalesExpertProfile, and firstName/lastName on AdminUser. +-- +-- Two additive changes in one migration: +-- +-- 1. SalesExpertProfile — the sales-expert fields that legacy kept on the +-- `customers` row (type=1) and that were lost when a sales expert became +-- an AdminUser. A separate table, not columns on AdminUser, because these +-- are meaningful only for role = SALES_EXPERT and would be permanently +-- null for every other admin. +-- +-- 2. AdminUser.firstName / lastName — closes D0 requirement 7, applying the +-- same split the Customer table already got. For ALL admins, not only +-- sales experts. +-- +-- NOTHING IS DROPPED. `fullName` stays and is kept in sync by a trigger. +-- +-- IDEMPOTENT (D14/D15): this must run cleanly under BOTH paths — the Prisma CLI +-- in development, and the app's own runner (src/prisma/migrate.ts) at container +-- boot, which may replay it. Hence IF NOT EXISTS everywhere, CREATE OR REPLACE +-- for the function, DROP ... IF EXISTS before CREATE TRIGGER, and a guarded +-- backfill that only touches rows not already filled. +-- +-- D13 / storefront impact: NONE. AdminUser is an admin-side table the retail +-- storefront never reads, and SalesExpertProfile is new. `customers` is not +-- touched. + +-- ─────────────────────────────────────────────────────────────────────────── +-- 1. SalesExpertProfile +-- ─────────────────────────────────────────────────────────────────────────── + +CREATE TABLE IF NOT EXISTS "SalesExpertProfile" ( + "id" TEXT NOT NULL, + "adminUserId" TEXT NOT NULL, + -- legacy customers.city_id — a filterable column on the sales-expert grid + -- (ReagentListModel.js:14) AND the source of the commission autofill + -- (ReagentCustomer.vue:215-228). + "cityId" TEXT, + -- legacy customers.gram_level — the «سطح اعتبار» column, filterable + -- (ReagentListModel.js:17). + -- + -- DECIMAL(14,4) deliberately matches Customer.goldCreditLimitGrams exactly + -- (schema.prisma:221, verified numeric_precision=14 numeric_scale=4), so the + -- same credit limit has identical precision and rendering on both tables. + "gramLevel" DECIMAL(14,4) NOT NULL DEFAULT 0, + -- legacy customers.phone / ncode — collected by the reference form + -- (ReagentCustomer.vue:95,31) and stored, though nothing reads them back. + -- Added on the owner's instruction so the form matches the reference. + -- + -- Types and constraints copied from the reference, which is deliberately lax: + -- ncode : string(20), NULLABLE, **NOT UNIQUE** + -- (2020_10_01_120430_customers_table.php:22) + -- phone : string(15), NULLABLE, not unique + -- (2020_10_25_155247_customers_cols.php:17) + -- Neither has a server-side validation rule: createCustomer validates only + -- `mobile` (required|unique) and `percent` (required) — AdminController.php:354. + -- Client-side both are `required: false` (ReagentCustomer.vue:31,95). + -- No uniqueness is invented here; that would reject data the reference accepts. + "phone" VARCHAR(15), + "nationalCode" VARCHAR(20), + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT "SalesExpertProfile_pkey" PRIMARY KEY ("id") +); + +-- One profile per admin user. +CREATE UNIQUE INDEX IF NOT EXISTS "SalesExpertProfile_adminUserId_key" + ON "SalesExpertProfile" ("adminUserId"); + +-- The grid filters on city. +CREATE INDEX IF NOT EXISTS "SalesExpertProfile_cityId_idx" + ON "SalesExpertProfile" ("cityId"); + +DO $$ +BEGIN + ALTER TABLE "SalesExpertProfile" + ADD CONSTRAINT "SalesExpertProfile_adminUserId_fkey" + FOREIGN KEY ("adminUserId") REFERENCES "AdminUser"("id") + ON DELETE CASCADE ON UPDATE CASCADE; +EXCEPTION + WHEN duplicate_object THEN NULL; +END $$; + +DO $$ +BEGIN + ALTER TABLE "SalesExpertProfile" + ADD CONSTRAINT "SalesExpertProfile_cityId_fkey" + FOREIGN KEY ("cityId") REFERENCES "City"("id") + ON DELETE SET NULL ON UPDATE CASCADE; +EXCEPTION + WHEN duplicate_object THEN NULL; +END $$; + +-- Give every EXISTING sales expert a profile row, so the grid's city and +-- credit-limit columns have something to left-join to from day one. +-- +-- Idempotent by construction: `WHERE NOT EXISTS` means a replay inserts +-- nothing, and it never touches a profile an operator has already filled in. +-- +-- The id is derived from the AdminUser id rather than random, so a replay on a +-- database where the row was deleted recreates the same key instead of +-- accumulating duplicates. Values are the column defaults: gramLevel 0 and +-- nulls elsewhere — deliberately neutral, since the reference has no data to +-- migrate here and inventing a credit limit would change behaviour. +INSERT INTO "SalesExpertProfile" ("id", "adminUserId", "gramLevel", "createdAt", "updatedAt") +SELECT 'sep_' || a."id", a."id", 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP +FROM "AdminUser" a +WHERE a."role" = 'SALES_EXPERT' + AND NOT EXISTS ( + SELECT 1 FROM "SalesExpertProfile" s WHERE s."adminUserId" = a."id" + ); + +-- ─────────────────────────────────────────────────────────────────────────── +-- 2. AdminUser.firstName / lastName (D0 requirement 7) +-- ─────────────────────────────────────────────────────────────────────────── + +ALTER TABLE "AdminUser" ADD COLUMN IF NOT EXISTS "firstName" TEXT; +ALTER TABLE "AdminUser" ADD COLUMN IF NOT EXISTS "lastName" TEXT; + +-- Backfill: first whitespace-separated token -> firstName, the REST -> +-- lastName. Identical rule to the Customer migration, so both tables split the +-- same way. Rows with more than two tokens are a guess and are listed by +-- scripts/report-name-split.cjs for a human to correct. +-- +-- `WHERE "firstName" IS NULL` makes the replay a no-op and, just as important, +-- prevents a re-run from overwriting a name a human has since corrected. +UPDATE "AdminUser" +SET + "firstName" = split_part(btrim(regexp_replace("fullName", '\s+', ' ', 'g')), ' ', 1), + "lastName" = NULLIF( + substr( + btrim(regexp_replace("fullName", '\s+', ' ', 'g')), + length(split_part(btrim(regexp_replace("fullName", '\s+', ' ', 'g')), ' ', 1)) + 2 + ), + '' + ) +WHERE "firstName" IS NULL + AND "fullName" IS NOT NULL + AND btrim("fullName") <> ''; + +-- Same two-way sync as Customer. +-- +-- Precedence when BOTH the parts and fullName change in ONE statement: +-- THE PARTS WIN — fullName is rebuilt from them and the submitted fullName is +-- discarded. The parts are what the forms edit, so they carry the operator's +-- intent; fullName is the derived, legacy-facing value. The first branch tests +-- the parts, so it wins by construction. +CREATE OR REPLACE FUNCTION admin_user_sync_full_name() RETURNS trigger AS $$ +BEGIN + IF (TG_OP = 'INSERT' AND (NEW."firstName" IS NOT NULL OR NEW."lastName" IS NOT NULL)) + OR (TG_OP = 'UPDATE' + AND (NEW."firstName" IS DISTINCT FROM OLD."firstName" + OR NEW."lastName" IS DISTINCT FROM OLD."lastName")) THEN + NEW."fullName" := btrim( + coalesce(NEW."firstName", '') || ' ' || coalesce(NEW."lastName", '') + ); + + ELSIF TG_OP = 'UPDATE' AND NEW."fullName" IS DISTINCT FROM OLD."fullName" + AND NEW."fullName" IS NOT NULL AND btrim(NEW."fullName") <> '' THEN + NEW."firstName" := split_part(btrim(regexp_replace(NEW."fullName", '\s+', ' ', 'g')), ' ', 1); + NEW."lastName" := NULLIF( + substr( + btrim(regexp_replace(NEW."fullName", '\s+', ' ', 'g')), + length(split_part(btrim(regexp_replace(NEW."fullName", '\s+', ' ', 'g')), ' ', 1)) + 2 + ), + '' + ); + END IF; + + RETURN NEW; +END; +$$ LANGUAGE plpgsql; + +DROP TRIGGER IF EXISTS admin_user_sync_full_name_trg ON "AdminUser"; +CREATE TRIGGER admin_user_sync_full_name_trg + BEFORE INSERT OR UPDATE ON "AdminUser" + FOR EACH ROW EXECUTE FUNCTION admin_user_sync_full_name(); + +-- Name search and sort hit both parts. +CREATE INDEX IF NOT EXISTS "AdminUser_firstName_idx" ON "AdminUser" ("firstName"); +CREATE INDEX IF NOT EXISTS "AdminUser_lastName_idx" ON "AdminUser" ("lastName"); diff --git a/apps/api/prisma/migrations/20260923120000_sales_expert_trading_customer/migration.sql b/apps/api/prisma/migrations/20260923120000_sales_expert_trading_customer/migration.sql new file mode 100644 index 0000000..b1745ee --- /dev/null +++ b/apps/api/prisma/migrations/20260923120000_sales_expert_trading_customer/migration.sql @@ -0,0 +1,52 @@ +-- Sales-expert app login: the expert's own trading account. +-- +-- WHY THIS COLUMN EXISTS +-- ---------------------- +-- In the reference a sales agent WAS a Customer row (customers.type = 1), so +-- when the agent placed an order from the app, setOrder did +-- $customer = Customer::findOrFail(auth()->id()); +-- $gramLevel = $customer->gram_level; +-- (ApiMobileController.php:534-535) — the order was simply that agent's own +-- order, against that agent's own credit limit and ledger. +-- +-- This system models a sales expert as an AdminUser (role SALES_EXPERT, D17), +-- which has no ledger, no gold debt and no credit limit. An AdminUser therefore +-- cannot be the subject of an Order: Order.customerId is a required FK to +-- Customer, and every ledger entry hangs off a Customer. +-- +-- Rather than reverse D17 (the owner ruled the expert stays an AdminUser), each +-- expert gets ONE linked Customer row that represents only their own trading +-- position. Orders the expert places for themselves land on that row, exactly +-- as the reference's single row did. The expert's REFERRED customers remain +-- separate rows pointing at the AdminUser via Customer.referredByAgentId — +-- that relationship is unchanged. +-- +-- PURELY ADDITIVE +-- --------------- +-- One nullable column plus a unique index. No existing row is modified, no +-- data is backfilled and nothing is deleted. A profile with a NULL +-- tradingCustomerId simply has no trading account yet; the API creates it +-- lazily on first login, so existing experts keep working untouched. + +ALTER TABLE "SalesExpertProfile" + ADD COLUMN IF NOT EXISTS "tradingCustomerId" TEXT; + +COMMENT ON COLUMN "SalesExpertProfile"."tradingCustomerId" IS + 'The Customer row that carries this expert''s OWN orders, debt and credit limit. Their referred customers are separate rows linked by Customer.referredByAgentId. Null until the expert first signs into the app, when it is created from the profile (gramLevel -> goldCreditLimitGrams, wagePercent -> makingChargeOffsetPercent).'; + +-- One trading account per expert, and no two experts may share one. +CREATE UNIQUE INDEX IF NOT EXISTS "SalesExpertProfile_tradingCustomerId_key" + ON "SalesExpertProfile" ("tradingCustomerId"); + +-- SET NULL, not CASCADE: if the trading Customer is ever removed, the expert +-- and their profile must survive — deleting a customer must never delete an +-- admin account. +DO $$ +BEGIN + ALTER TABLE "SalesExpertProfile" + ADD CONSTRAINT "SalesExpertProfile_tradingCustomerId_fkey" + FOREIGN KEY ("tradingCustomerId") REFERENCES "Customer"("id") + ON DELETE SET NULL ON UPDATE CASCADE; +EXCEPTION + WHEN duplicate_object THEN NULL; +END $$; diff --git a/apps/api/prisma/migrations/20260925120000_admin_session/migration.sql b/apps/api/prisma/migrations/20260925120000_admin_session/migration.sql new file mode 100644 index 0000000..fa6ff7e --- /dev/null +++ b/apps/api/prisma/migrations/20260925120000_admin_session/migration.sql @@ -0,0 +1,38 @@ +-- Revocable admin sessions. +-- +-- Until now an admin-panel token was purely self-contained: once signed it was +-- valid for its full 12h and nothing could cut it short — not deactivating the +-- account, not a central "sign out everywhere". Connecting the central IAM made +-- that gap concrete, because an IAM session revocation had no effect on a token +-- this API had already issued. +-- +-- Each issued token now carries a `jti` recorded here, and JwtStrategy rejects a +-- token whose row is revoked. Rows are only written (and only enforced) while +-- session tracking is enabled, so a deployment that leaves it off keeps exactly +-- the previous behaviour and the previous query count. +CREATE TABLE "AdminSession" ( + "id" TEXT NOT NULL, + "jti" TEXT NOT NULL, + "adminUserId" TEXT NOT NULL, + "iamSessionId" TEXT, + "iamSub" TEXT, + "ipAddress" TEXT, + "userAgent" TEXT, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "expiresAt" TIMESTAMP(3), + "lastSeenAt" TIMESTAMP(3), + "revokedAt" TIMESTAMP(3), + "revokedReason" TEXT, + + CONSTRAINT "AdminSession_pkey" PRIMARY KEY ("id") +); + +CREATE UNIQUE INDEX "AdminSession_jti_key" ON "AdminSession"("jti"); +CREATE INDEX "AdminSession_adminUserId_idx" ON "AdminSession"("adminUserId"); +CREATE INDEX "AdminSession_iamSessionId_idx" ON "AdminSession"("iamSessionId"); +CREATE INDEX "AdminSession_iamSub_idx" ON "AdminSession"("iamSub"); +CREATE INDEX "AdminSession_expiresAt_idx" ON "AdminSession"("expiresAt"); + +ALTER TABLE "AdminSession" + ADD CONSTRAINT "AdminSession_adminUserId_fkey" + FOREIGN KEY ("adminUserId") REFERENCES "AdminUser"("id") ON DELETE CASCADE ON UPDATE CASCADE; diff --git a/apps/api/prisma/migrations/20260925150000_app_session/migration.sql b/apps/api/prisma/migrations/20260925150000_app_session/migration.sql new file mode 100644 index 0000000..3e61501 --- /dev/null +++ b/apps/api/prisma/migrations/20260925150000_app_session/migration.sql @@ -0,0 +1,33 @@ +-- Revocable app sessions (customer app and sales-expert app). +-- +-- The admin panel got this in 20260925120000_admin_session; the app token family +-- had the same gap: a 30-day self-contained token that nothing could end early. +-- That matters more here, because the app's login is OTP-only — there is no +-- password an operator could change to cut access. +-- +-- No foreign key on purpose: an app token's subject is a Customer for a customer +-- and an AdminUser for a sales expert (D21), which one FK cannot express. +CREATE TABLE "AppSession" ( + "id" TEXT NOT NULL, + "jti" TEXT NOT NULL, + "subjectId" TEXT NOT NULL, + "subjectType" TEXT NOT NULL, + "mobile" TEXT, + "iamSessionId" TEXT, + "iamSub" TEXT, + "ipAddress" TEXT, + "userAgent" TEXT, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "expiresAt" TIMESTAMP(3), + "lastSeenAt" TIMESTAMP(3), + "revokedAt" TIMESTAMP(3), + "revokedReason" TEXT, + + CONSTRAINT "AppSession_pkey" PRIMARY KEY ("id") +); + +CREATE UNIQUE INDEX "AppSession_jti_key" ON "AppSession"("jti"); +CREATE INDEX "AppSession_subjectId_idx" ON "AppSession"("subjectId"); +CREATE INDEX "AppSession_iamSessionId_idx" ON "AppSession"("iamSessionId"); +CREATE INDEX "AppSession_iamSub_idx" ON "AppSession"("iamSub"); +CREATE INDEX "AppSession_expiresAt_idx" ON "AppSession"("expiresAt"); diff --git a/apps/api/prisma/migrations/20261005120000_accounting_integration/migration.sql b/apps/api/prisma/migrations/20261005120000_accounting_integration/migration.sql new file mode 100644 index 0000000..d3e9193 --- /dev/null +++ b/apps/api/prisma/migrations/20261005120000_accounting_integration/migration.sql @@ -0,0 +1,110 @@ +-- Accounting integration (D27): Tahesab / Zarrin, chosen in the admin panel. +-- Plan: docs/ACCOUNTING-INTEGRATION-PLAN.md. +-- +-- Adds the link table (app row <-> accounting record), the outbox the push +-- jobs run from, the issue list pulls report into, and the cached balance and +-- stock columns read back from the accounting software. Nothing existing +-- changes meaning: goldDebtGrams/fiatDebtRial stay the internal ledger caches. + +-- CreateEnum +CREATE TYPE "AccountingEntityType" AS ENUM ('CUSTOMER', 'PRODUCT'); + +-- CreateEnum +CREATE TYPE "AccountingOutboxKind" AS ENUM ('CUSTOMER_PUSH', 'PRODUCT_PUSH', 'ORDER_DOCUMENT', 'ORDER_DOCUMENT_DELETE'); + +-- CreateEnum +CREATE TYPE "AccountingOutboxStatus" AS ENUM ('PENDING', 'SENDING', 'SENT', 'FAILED', 'NEEDS_REVIEW', 'RESOLVED'); + +-- AlterTable +ALTER TABLE "Customer" ADD COLUMN "accountingBalanceAt" TIMESTAMP(3), +ADD COLUMN "accountingGoldBalance" DECIMAL(14,4), +ADD COLUMN "accountingRialBalance" DECIMAL(20,2); + +-- AlterTable +ALTER TABLE "Product" ADD COLUMN "accountingStockAt" TIMESTAMP(3), +ADD COLUMN "accountingStockCount" DECIMAL(14,4), +ADD COLUMN "accountingStockWeight" DECIMAL(14,4); + +-- CreateTable +CREATE TABLE "AccountingLink" ( + "id" TEXT NOT NULL, + "provider" TEXT NOT NULL, + "entityType" "AccountingEntityType" NOT NULL, + "entityId" TEXT NOT NULL, + "externalCode" TEXT NOT NULL, + "externalName" TEXT, + "origin" TEXT NOT NULL, + "snapshot" JSONB, + "syncedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "AccountingLink_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "AccountingOutbox" ( + "id" TEXT NOT NULL, + "provider" TEXT NOT NULL, + "kind" "AccountingOutboxKind" NOT NULL, + "entityId" TEXT NOT NULL, + "status" "AccountingOutboxStatus" NOT NULL DEFAULT 'PENDING', + "attempts" INTEGER NOT NULL DEFAULT 0, + "nextAttemptAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "lastError" TEXT, + "externalRef" TEXT, + "progress" JSONB, + "lastRequest" JSONB, + "lastResponse" JSONB, + "sentAt" TIMESTAMP(3), + "resolvedById" TEXT, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "AccountingOutbox_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "AccountingIssue" ( + "id" TEXT NOT NULL, + "provider" TEXT NOT NULL, + "kind" TEXT NOT NULL, + "externalCode" TEXT NOT NULL, + "entityId" TEXT, + "message" TEXT NOT NULL, + "data" JSONB, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "resolvedAt" TIMESTAMP(3), + + CONSTRAINT "AccountingIssue_pkey" PRIMARY KEY ("id") +); + +-- CreateIndex +CREATE INDEX "AccountingLink_entityType_entityId_idx" ON "AccountingLink"("entityType", "entityId"); + +-- CreateIndex +CREATE UNIQUE INDEX "AccountingLink_provider_entityType_entityId_key" ON "AccountingLink"("provider", "entityType", "entityId"); + +-- CreateIndex +CREATE UNIQUE INDEX "AccountingLink_provider_entityType_externalCode_key" ON "AccountingLink"("provider", "entityType", "externalCode"); + +-- CreateIndex +CREATE INDEX "AccountingOutbox_status_nextAttemptAt_idx" ON "AccountingOutbox"("status", "nextAttemptAt"); + +-- CreateIndex +CREATE INDEX "AccountingOutbox_kind_entityId_idx" ON "AccountingOutbox"("kind", "entityId"); + +-- CreateIndex +CREATE INDEX "AccountingIssue_resolvedAt_idx" ON "AccountingIssue"("resolvedAt"); + +-- CreateIndex +CREATE UNIQUE INDEX "AccountingIssue_provider_kind_externalCode_key" ON "AccountingIssue"("provider", "kind", "externalCode"); + + +-- The new admin screen's permission. The seeded super-admin user type (85, +-- prisma/seed.ts) gets every rid in ALL_RIDS on a fresh seed; an existing +-- database has to be granted the new one here. +INSERT INTO "permission" ("rid", "userTypeId") +SELECT 'config.accounting', 85 +WHERE EXISTS (SELECT 1 FROM "user_type" WHERE "id" = 85) +ON CONFLICT DO NOTHING; diff --git a/apps/api/prisma/migrations/20261007120000_migration_prep_additive/migration.sql b/apps/api/prisma/migrations/20261007120000_migration_prep_additive/migration.sql new file mode 100644 index 0000000..ff39dc5 --- /dev/null +++ b/apps/api/prisma/migrations/20261007120000_migration_prep_additive/migration.sql @@ -0,0 +1,210 @@ +-- ============================================================================ +-- Preparation for the legacy data migration — PURELY ADDITIVE. +-- +-- Owner decisions of 2026-10-06 and 2026-10-07, recorded in +-- docs/DATA-MIGRATION-MAP.md §5.2, §5.5, §10, §10.4, §10.5.5. +-- +-- Nothing here drops, renames or retypes an existing column. Every statement +-- either removes a constraint or adds a new column/table, so code that works +-- today keeps working. Verified NOT touched: +-- * Customer.accounting{Gold,Rial}Balance / accountingBalanceAt (D27) +-- * Product.accountingStock{Weight,Count} / accountingStockAt (D27) +-- * ProductVariant.imageId (PROTECTED.md §B) +-- * AccountingLink / AccountingOutbox / AccountingIssue +-- * SmsMessage and the SMS module +-- These are target-only capabilities under PROTECTED.md §G ("a keep-out +-- list"), and the owner confirmed on 2026-10-06 that their data is real. +-- +-- D15: idempotent (IF NOT EXISTS / duplicate_object guards) because this runs +-- under BOTH ledgers — the Prisma CLI in development and the app's own runner +-- (src/prisma/migrate.ts) in the deploy container, which wraps each file in a +-- transaction. The runner's splitSqlStatements() handles $$-quoted blocks +-- (migrate.ts:83-91), so the DO blocks below are split correctly. +-- ============================================================================ + + +-- ---------------------------------------------------------------------------- +-- 1. Customer.nationalCode becomes OPTIONAL +-- +-- Source reality (docs/migration-precheck.sql, run 2026-10-06 on the live +-- `oapi` MySQL schema): empty_ncode = 1595 of n_customers = 1595. NOT ONE of +-- the 1,616 legacy customers has a national code. dup_ncode_groups = 0. +-- +-- Owner ruling 2026-10-07: "ساختن کد ملی فیک تخلف دیتایی است و مانع از +-- احراز هویت‌های قانونی بعدی می‌شود" — fabricating one is a data violation, so +-- the column must be nullable. Without this the customer migration cannot +-- insert a single row. +-- +-- This also RETIRES three existing workarounds that only exist because the +-- column is required. They write the MOBILE NUMBER into the national-code +-- field, i.e. they store wrong data today: +-- * admin-customers.service.ts:625 nationalCode: mobile +-- comment: "schema requires it and it is unique; singleCustomer.vue +-- collects no ncode" +-- * admin-customers.service.ts:685 nationalCode: nationalCode || mobile +-- * customer-auth.service.ts:258 ... || admin.mobile +-- Removing those fallbacks is a SERVICE-LAYER change, deliberately NOT done +-- here: this migration only makes it possible. Until they are removed the +-- behaviour is exactly as it is today. +-- +-- The UNIQUE index "Customer_nationalCode_key" (first/migration.sql:304) is +-- left in place. In PostgreSQL NULLs are not equal to each other, so any +-- number of rows may hold NULL under a unique index — which is precisely why +-- the migration tool must write NULL and never the empty string: '' would +-- collide on the second row (see §10.4). +-- +-- DROP NOT NULL takes only a brief ACCESS EXCLUSIVE lock on the catalog; it +-- does not rewrite the table and does not scan the data. +ALTER TABLE "Customer" ALTER COLUMN "nationalCode" DROP NOT NULL; + +COMMENT ON COLUMN "Customer"."nationalCode" IS + 'Legacy customers.ncode. OPTIONAL: no legacy customer has one (1595/1595 empty as of 2026-10-06), and fabricating a value is a data violation (owner, 2026-10-07). Still UNIQUE — write NULL, never '''', because NULLs do not collide under a unique index but empty strings do.'; + + +-- ---------------------------------------------------------------------------- +-- 2. Customer.birthDate — new, nullable, unread until backfilled +-- +-- Legacy `customers.birth_date timestamp NULL` (oapi dump line 484), populated +-- on 917 of 1,595 live rows (~57%). Owner ruling 2026-10-07: migrate it — +-- "نرخ پرشدگی بالای ۵۵٪ است و داده برای کمپین‌های وفاداری و پیامکی کاربرد +-- مستقیم دارد". +-- +-- Two sibling columns were deliberately NOT ported, same ruling: +-- * marriage_date (5 rows) — "۵ ردیف توجیه معماری ندارد" +-- * token_mobile (99 rows) — "توکن‌ها اغلب منقضی شده‌اند · زباله دیتایی" +-- +-- ⚠ THE COLUMN IS CREATED EMPTY ON PURPOSE. Do not backfill it until the +-- calendar question is settled (§5.9): legacy stores some dates as JALALI +-- STRINGS elsewhere (cashes.recive_date is varchar(255), 88 of 89 values +-- starting "14…"), so birth_date may hold Jalali years mis-entered into a +-- timestamp. Copying those unchanged would silently produce 917 WRONG +-- birthdays, which for an SMS campaign is worse than having none. +-- docs/migration-precheck-3.sql answers this. +ALTER TABLE "Customer" ADD COLUMN IF NOT EXISTS "birthDate" TIMESTAMP(3); + +COMMENT ON COLUMN "Customer"."birthDate" IS + 'Legacy customers.birth_date (917 of 1595 rows populated). Created empty: verify Jalali-vs-Gregorian with docs/migration-precheck-3.sql BEFORE backfilling — legacy stores dates as Jalali strings in other tables.'; + + +-- ---------------------------------------------------------------------------- +-- 3. Rejection trail for document verification +-- +-- Legacy has THREE states per verification step, not two +-- (MajorCustomerController.php:106-135): 1 = awaiting review, 2 = approved, +-- 3 = REJECTED. The target's VerificationStep enum has no rejected state, so +-- 14 already-rejected customers had nowhere to go. +-- +-- Owner ruling 2026-10-07: mapping them to "awaiting" is "کاملاً مردود" — +-- it would put closed cases back in the review queue and create duplicate +-- work. REJECTED is added to the enum (statement 4 below) and these two +-- columns carry the reason. +-- +-- Legacy records NO reason: all 49 `customers` columns were checked and none +-- is a reason/note/description field, and on rejection the server sends only +-- a FIXED SMS ("اطلاعات شما تایید نشده است. لطفا با پیشتیبانی تماس حاصل +-- فرمایید") with no cause stored anywhere. So for those 14 rows the reason is +-- unrecoverable; the owner asked the tool to write an explicit sentinel rather +-- than NULL, so support knows WHY it is blank: +-- رد شده در سیستم قدیم — فاقد شرح علت ثبت‌شده +-- That text is written by the migration tool, not by this migration, and only +-- WHERE verificationRejectionReason IS NULL so a re-run can never overwrite a +-- real reason entered in the new system (§5.5). +-- +-- verificationRejectedAt stays NULL for the 14 legacy rows: legacy did not +-- record a rejection timestamp either. +ALTER TABLE "Customer" ADD COLUMN IF NOT EXISTS "verificationRejectionReason" TEXT; +ALTER TABLE "Customer" ADD COLUMN IF NOT EXISTS "verificationRejectedAt" TIMESTAMP(3); + +COMMENT ON COLUMN "Customer"."verificationRejectionReason" IS + 'Why document verification was rejected. Legacy stored no reason (only a fixed SMS), so rows migrated from henza carry the sentinel «رد شده در سیستم قدیم — فاقد شرح علت ثبت‌شده». Write only WHERE this IS NULL so a re-run never overwrites a real reason.'; + +COMMENT ON COLUMN "Customer"."verificationRejectedAt" IS + 'When verification was rejected. NULL for rows migrated from henza — legacy did not record a rejection timestamp.'; + + +-- ---------------------------------------------------------------------------- +-- 4. VerificationStep gains REJECTED +-- +-- ADD VALUE is additive: existing rows and existing queries are unaffected. +-- IF NOT EXISTS makes a re-run a no-op. +-- +-- ⚠ CONSUMER AUDIT STILL OWED. Every read of VerificationStep must be checked +-- for a Persian label / switch that does not yet know this value, or the admin +-- panel will render a blank cell. Flagged in §10.5.5 as a separate task; it is +-- a display gap, not a data risk, and nothing writes REJECTED until the +-- migration tool runs. +-- +-- Postgres note: before v12 ADD VALUE could not run inside a transaction, and +-- the app's own runner wraps each file in one (migrate.ts:198). This project +-- targets a modern Postgres where that restriction is lifted. If the deploy +-- container ever errors with "ALTER TYPE ... ADD VALUE cannot be executed +-- inside a transaction block", this statement must move to its own file. +DO $$ +BEGIN + ALTER TYPE "VerificationStep" ADD VALUE IF NOT EXISTS 'REJECTED'; +EXCEPTION + WHEN duplicate_object THEN NULL; +END $$; + + +-- ---------------------------------------------------------------------------- +-- 5. CustomerFavorite — the legacy `fav` table finally gets a home +-- +-- Legacy `fav` holds 251 rows (customer_id, product_id) and the target had NO +-- model for it, so every customer's saved products would have been lost. +-- Owner ruling 2026-10-06: they matter. docs/PWA-PORT-PLAN.md reached the same +-- conclusion independently. +-- +-- Legacy `fav` has only two columns and NO primary key, so duplicate pairs are +-- possible in principle. The composite primary key here closes that, and the +-- precheck confirmed fav_duplicate_pairs = 0, so no de-duplication is needed — +-- but the tool should still SELECT DISTINCT, since the source cannot enforce it. +-- +-- 14 of the 251 rows point at a customer that no longer exists +-- (fav.customer_id orphans). Those must be SKIPPED by the tool; the foreign +-- keys below would reject them anyway. +-- +-- ON DELETE CASCADE on both sides: a favourite is a pure join row with no +-- meaning once either end is gone. This differs from ProductVariant.imageId, +-- which uses SetNull precisely so a deleted image never cascades into order +-- history — the distinction is deliberate. +-- +-- Legacy also keeps a denormalised `product.count_fav` counter. It is NOT +-- recreated as a column; derive it from this table (§5.2 group B) rather than +-- showing a stale or zero value. +CREATE TABLE IF NOT EXISTS "CustomerFavorite" ( + "customerId" TEXT NOT NULL, + "productId" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT "CustomerFavorite_pkey" PRIMARY KEY ("customerId", "productId") +); + +-- The PK already indexes (customerId, productId) left-to-right, so "my +-- favourites" needs no extra index. This one serves the reverse lookup — +-- "how many customers favourited this product" — which is how count_fav is +-- derived. +CREATE INDEX IF NOT EXISTS "CustomerFavorite_productId_idx" + ON "CustomerFavorite"("productId"); + +DO $$ +BEGIN + ALTER TABLE "CustomerFavorite" + ADD CONSTRAINT "CustomerFavorite_customerId_fkey" + FOREIGN KEY ("customerId") REFERENCES "Customer"("id") + ON DELETE CASCADE ON UPDATE CASCADE; +EXCEPTION + WHEN duplicate_object THEN NULL; +END $$; + +DO $$ +BEGIN + ALTER TABLE "CustomerFavorite" + ADD CONSTRAINT "CustomerFavorite_productId_fkey" + FOREIGN KEY ("productId") REFERENCES "Product"("id") + ON DELETE CASCADE ON UPDATE CASCADE; +EXCEPTION + WHEN duplicate_object THEN NULL; +END $$; + +COMMENT ON TABLE "CustomerFavorite" IS + 'Legacy `fav` (251 rows). Composite PK replaces the source table''s missing primary key. Derive product.count_fav from here rather than storing a counter.'; diff --git a/apps/api/prisma/migrations/20261007190000_customer_city_name_raw/migration.sql b/apps/api/prisma/migrations/20261007190000_customer_city_name_raw/migration.sql new file mode 100644 index 0000000..9ed73ec --- /dev/null +++ b/apps/api/prisma/migrations/20261007190000_customer_city_name_raw/migration.sql @@ -0,0 +1,22 @@ +-- ============================================================================ +-- Customer.cityNameRaw — PURELY ADDITIVE. +-- +-- Owner ruling 2026-10-07 (docs/DATA-MIGRATION-MAP.md §5.9): keep the city a +-- customer typed at sign-up verbatim, and set cityId only on an exact match. +-- +-- Legacy `customers.new_city` is free text (all 172 live values are names, 0 +-- are ids). The legacy city table has only 15 rows, so 43 of those names match +-- no known city at all, and only ~72 match one of the 15 after ي/ك +-- normalisation. Dropping the text would lose where those customers are. +-- +-- Legacy sign-up also forced city_id = 5 (تهران) on every new customer +-- (Major/CustomerController.php:21); 91 of the 92 customers with both values +-- carry that forced Tehran. For them the typed name is the truth. +-- +-- D15: idempotent, runs under both migration ledgers. +-- ============================================================================ + +ALTER TABLE "Customer" ADD COLUMN IF NOT EXISTS "cityNameRaw" TEXT; + +COMMENT ON COLUMN "Customer"."cityNameRaw" IS + 'Legacy customers.new_city — city name as typed at sign-up, kept verbatim. cityId is set too only on an exact (ي/ك-normalised) match; legacy forced city_id=5 (Tehran) on sign-up, so prefer this text over that cityId.'; diff --git a/apps/api/prisma/migrations/20261008090000_customer_identity_cleanup/migration.sql b/apps/api/prisma/migrations/20261008090000_customer_identity_cleanup/migration.sql new file mode 100644 index 0000000..2a86031 --- /dev/null +++ b/apps/api/prisma/migrations/20261008090000_customer_identity_cleanup/migration.sql @@ -0,0 +1,31 @@ +-- ============================================================================ +-- Customer identity cleanup — data only, no schema change. Idempotent. +-- +-- Owner ruling 2026-10-07: «هر دیتایی باید سر جای خودش بشینه». +-- +-- 1. nationalCode held the MOBILE (or "--") on every +-- customer created without a national code, because the column used to be +-- NOT NULL. It is optional since 20261007120000, and the code paths that +-- wrote those stand-ins are fixed in the same change as this file. The +-- stand-ins are cleared to NULL; a real national code is never touched. +-- Accounting is unaffected: it only ever received validNationalCode(), +-- which already mapped a mobile to null. +-- +-- 2. passwordHash '' becomes the explicit "no password login" marker +-- (auth/password-hash.ts). Both are refused before bcrypt by +-- compareLocalHash, so nobody's ability to sign in changes. +-- ============================================================================ + +UPDATE "Customer" + SET "nationalCode" = NULL + WHERE "nationalCode" = '' + OR "nationalCode" = "mobile" + OR "nationalCode" LIKE "mobile" || '-%'; + +UPDATE "Customer" SET "passwordHash" = '!OTP_ONLY_NO_PASSWORD_LOGIN' WHERE "passwordHash" = ''; +UPDATE "AdminUser" SET "passwordHash" = '!NO_PASSWORD_SET_YET' WHERE "passwordHash" = ''; + +-- The earlier comment named the wrong source table: `fav` belongs to the retail +-- shop; wholesale favourites come from `major_favorites` (DATA-MIGRATION-MAP §10.7). +COMMENT ON TABLE "CustomerFavorite" IS + 'Legacy `major_favorites` (wholesale; deduplicated on import). Composite PK replaces the source table''s missing primary key. Derive a favourite count from here rather than storing a counter.'; diff --git a/apps/api/prisma/migrations/20261008120000_order_sales_agent/migration.sql b/apps/api/prisma/migrations/20261008120000_order_sales_agent/migration.sql new file mode 100644 index 0000000..ee34bbc --- /dev/null +++ b/apps/api/prisma/migrations/20261008120000_order_sales_agent/migration.sql @@ -0,0 +1,47 @@ +-- ============================================================================ +-- Order.salesAgentId / Order.referrerCustomerId — additive, idempotent. +-- +-- Owner ruling 2026-10-08: keep legacy's rule exactly. An order is credited to +-- the expert who was the customer's referrer WHEN IT WAS PLACED (legacy +-- `orders.reagent_id`, set once at creation), so a customer moving to another +-- expert later never changes past sales or commission. The app used to credit +-- an order to the customer's CURRENT referrer, which disagreed with legacy for +-- 8 of 49 experts on the imported data. +-- +-- No row is deleted and no existing column changes. +-- ============================================================================ + +ALTER TABLE "Order" ADD COLUMN IF NOT EXISTS "salesAgentId" TEXT; +ALTER TABLE "Order" ADD COLUMN IF NOT EXISTS "referrerCustomerId" TEXT; + +DO $$ BEGIN + ALTER TABLE "Order" ADD CONSTRAINT "Order_salesAgentId_fkey" + FOREIGN KEY ("salesAgentId") REFERENCES "AdminUser"("id") ON DELETE SET NULL ON UPDATE CASCADE; +EXCEPTION WHEN duplicate_object THEN NULL; +END $$; + +DO $$ BEGIN + ALTER TABLE "Order" ADD CONSTRAINT "Order_referrerCustomerId_fkey" + FOREIGN KEY ("referrerCustomerId") REFERENCES "Customer"("id") ON DELETE SET NULL ON UPDATE CASCADE; +EXCEPTION WHEN duplicate_object THEN NULL; +END $$; + +CREATE INDEX IF NOT EXISTS "Order_salesAgentId_idx" ON "Order"("salesAgentId"); +CREATE INDEX IF NOT EXISTS "Order_referrerCustomerId_idx" ON "Order"("referrerCustomerId"); + +-- Orders placed in the new app before this column existed: the customer's +-- referrer today is the best record there is (these are recent). Orders +-- brought over from legacy (orderNumber 'H-') are NOT guessed here — the +-- import writes their real `orders.reagent_id`. +UPDATE "Order" o + SET "salesAgentId" = c."referredByAgentId" + FROM "Customer" c + WHERE c."id" = o."customerId" + AND o."salesAgentId" IS NULL + AND c."referredByAgentId" IS NOT NULL + AND o."orderNumber" NOT LIKE 'H-%'; + +COMMENT ON COLUMN "Order"."salesAgentId" IS + 'Sales expert credited with this order, fixed when it is placed (legacy orders.reagent_id). Never follows a later change of the customer''s referrer.'; +COMMENT ON COLUMN "Order"."referrerCustomerId" IS + 'History only: legacy orders.reagent_id when it named a customer who is not a sales expert. Never set for new orders.'; diff --git a/apps/api/prisma/migrations/20261008150000_wage_formula_permission/migration.sql b/apps/api/prisma/migrations/20261008150000_wage_formula_permission/migration.sql new file mode 100644 index 0000000..a9e4b00 --- /dev/null +++ b/apps/api/prisma/migrations/20261008150000_wage_formula_permission/migration.sql @@ -0,0 +1,9 @@ +-- «اجرت» admin screen (owner ruling 2026-10-08): its permission for the +-- seeded super-admin user type. A fresh seed grants every rid in ALL_RIDS; +-- an existing database gets the new one here. Data only, idempotent. +-- The formula itself needs no row: until an admin approves one, the server +-- uses legacy's formula (pricing/wage-formula.ts LEGACY_WAGE_FORMULA). +INSERT INTO "permission" ("rid", "userTypeId") +SELECT 'config.wage', 85 +WHERE EXISTS (SELECT 1 FROM "user_type" WHERE "id" = 85) +ON CONFLICT DO NOTHING; diff --git a/apps/api/prisma/migrations/20261008160000_dashboard_permission_merge/migration.sql b/apps/api/prisma/migrations/20261008160000_dashboard_permission_merge/migration.sql new file mode 100644 index 0000000..644ba04 --- /dev/null +++ b/apps/api/prisma/migrations/20261008160000_dashboard_permission_merge/migration.sql @@ -0,0 +1,14 @@ +-- PERM-01 (owner approval 2026-10-08): legacy's two dashboard permissions +-- «آمار عمده فروشی» (dashboard.omde) and «آمار تک فروشی» (dashboard.tak), and +-- their tree parent "dashboard", became the single "dashboard.view" when the two +-- dashboards became one. A database seeded before that change still holds the +-- old rows: nothing reads them and the permission screen cannot show or revoke +-- them. Whoever held one keeps the dashboard through "dashboard.view", then the +-- old rows go. Data only, idempotent. +INSERT INTO "permission" ("rid", "userTypeId") +SELECT DISTINCT 'dashboard.view', "userTypeId" +FROM "permission" +WHERE "rid" IN ('dashboard', 'dashboard.omde', 'dashboard.tak') +ON CONFLICT DO NOTHING; + +DELETE FROM "permission" WHERE "rid" IN ('dashboard', 'dashboard.omde', 'dashboard.tak'); diff --git a/apps/api/prisma/migrations/20261008170000_city_tree/migration.sql b/apps/api/prisma/migrations/20261008170000_city_tree/migration.sql new file mode 100644 index 0000000..17eeb16 --- /dev/null +++ b/apps/api/prisma/migrations/20261008170000_city_tree/migration.sql @@ -0,0 +1,33 @@ +-- PERS-02 (owner approval 2026-10-08): cities become a tree again, as in legacy +-- (country > province > city > district, henza `cities.parent`). The flat +-- `province` label is turned into parent rows, nothing is lost, then dropped. + +ALTER TABLE "City" ADD COLUMN "parentId" TEXT; + +-- One province row per distinct label, named as legacy names them +-- («استان تهران»), unless a city row already carries that name. +INSERT INTO "City" ("id", "name") +SELECT 'cprov' || substr(md5(p.pname), 1, 20), p.pname +FROM ( + SELECT DISTINCT + CASE WHEN btrim("province") LIKE 'استان%' THEN btrim("province") ELSE 'استان ' || btrim("province") END AS pname + FROM "City" + WHERE "province" IS NOT NULL AND btrim("province") <> '' +) p +WHERE NOT EXISTS (SELECT 1 FROM "City" c WHERE c."name" = p.pname); + +UPDATE "City" c +SET "parentId" = ( + SELECT p."id" FROM "City" p + WHERE p."id" <> c."id" + AND p."name" = CASE WHEN btrim(c."province") LIKE 'استان%' THEN btrim(c."province") ELSE 'استان ' || btrim(c."province") END + ORDER BY p."id" + LIMIT 1 +) +WHERE c."province" IS NOT NULL AND btrim(c."province") <> ''; + +ALTER TABLE "City" DROP COLUMN "province"; + +CREATE INDEX "City_parentId_idx" ON "City"("parentId"); + +ALTER TABLE "City" ADD CONSTRAINT "City_parentId_fkey" FOREIGN KEY ("parentId") REFERENCES "City"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/apps/api/prisma/schema.prisma b/apps/api/prisma/schema.prisma index 53832f0..6ec28b7 100644 --- a/apps/api/prisma/schema.prisma +++ b/apps/api/prisma/schema.prisma @@ -56,6 +56,13 @@ enum VerificationStep { STEP_ONE_SUBMITTED STEP_TWO_SUBMITTED VERIFIED + + /// Legacy had THREE states per step, not two + /// (MajorCustomerController.php:106-135): 1 = awaiting, 2 = approved, + /// 3 = REJECTED. Mapping rejected customers to UNVERIFIED would put closed + /// cases back in the review queue, so the owner ruled it out (2026-10-07). + /// 14 legacy rows land here; see Customer.verificationRejectionReason. + REJECTED } /// Legacy kept retail and wholesale orders in two SEPARATE tables @@ -111,10 +118,15 @@ enum LedgerSourceType { // Identity // ───────────────────────────────────────────────────────────────────────── +/// Legacy `cities` is a tree (country > province > city > district) and so is +/// this: a city hangs under its `parent`. In the admin pickers a top-level row +/// (the country) is a heading, not selectable (henza_admin citiesModel.js:38). model City { id String @id @default(cuid()) name String - province String? + parentId String? + parent City? @relation("CityTree", fields: [parentId], references: [id], onDelete: Restrict) + children City[] @relation("CityTree") /// Legacy cities.percent / percent_aux — per-city wage surcharges the city /// screen edits through GET cities/get-percent/{id} and get-percent-aux/{id}. percent Decimal? @db.Decimal(6, 3) @@ -123,11 +135,30 @@ model City { addresses CustomerAddress[] branches Branch[] preOrders PreOrder[] + salesExpertProfiles SalesExpertProfile[] + + @@index([parentId]) } model AdminUser { - id String @id @default(cuid()) - fullName String + id String @id @default(cuid()) + + /// ⚠️ Kept in sync BY A DATABASE TRIGGER — `admin_user_sync_full_name`, from + /// migration 20260922180000. Prisma cannot see it, so a write here may store + /// something other than what you passed: + /// + /// * write the parts -> fullName is rebuilt as "first last" + /// * write fullName only -> the parts are re-derived from it + /// * write BOTH in one update -> THE PARTS WIN; the submitted fullName is + /// discarded + /// + /// Re-read after writing if you need the stored value. Same arrangement as + /// Customer (D0 requirement 7 — the split applies to ALL admins, not only + /// sales experts). + fullName String + firstName String? + lastName String? + mobile String @unique passwordHash String role AdminRole @@ -155,6 +186,8 @@ model AdminUser { memberCode String? // legacy mcode referredCustomers Customer[] @relation("ReferralAgent") + /// Orders credited to this sales expert — see Order.salesAgentId. + creditedOrders Order[] @relation("OrderSalesAgent") supervisedWorkshops Workshop[] @relation("WorkshopSupervisor") branchAllocations BranchAllocation[] @relation("AllocationAuthor") postedLedgerEntries LedgerEntry[] @@ -164,20 +197,218 @@ model AdminUser { sentNotifications Notification[] @relation("NotificationAuthor") uploadedFiles UploadedFile[] @relation("FileUploader") + /// Only ever set for role = SALES_EXPERT (D17). + salesExpertProfile SalesExpertProfile? + + /// Issued admin-panel tokens, recorded only while session tracking is on + /// (AUTH_SESSION_TRACKING, or implicitly whenever the IAM is enabled) so a + /// token can be revoked before it expires. See AdminSession. + sessions AdminSession[] + @@index([role]) @@index([userTypeId]) @@index([avatarFileId]) + @@index([firstName]) + @@index([lastName]) +} + +/// An issued APP token (customer app / sales-expert app), so it can be revoked +/// before it expires — the counterpart of AdminSession for the other token family. +/// +/// WHY A SEPARATE TABLE AND NO FOREIGN KEY +/// --------------------------------------- +/// An app token's `sub` is a Customer id for a customer and an **AdminUser id** +/// for a sales expert (D21). One FK cannot point at two tables, so the subject is +/// stored as a plain id plus its type. The rows are short-lived operational data, +/// not part of the accounting model, so the missing FK costs nothing here. +model AppSession { + id String @id @default(cuid()) + + /// The token's `jti` claim. Unique: one row per issued token. + jti String @unique + + /// Customer.id, or AdminUser.id when subjectType is "sales-expert". + subjectId String + subjectType String + + mobile String? + + /// Set when the login was confirmed by the central IAM: its session id (`sid`) + /// and stable user id (`sub`), which is what a back-channel logout arrives with. + iamSessionId String? + iamSub String? + + ipAddress String? + userAgent String? + + createdAt DateTime @default(now()) + expiresAt DateTime? + lastSeenAt DateTime? + + revokedAt DateTime? + revokedReason String? + + @@index([subjectId]) + @@index([iamSessionId]) + @@index([iamSub]) + @@index([expiresAt]) +} + +/// An issued admin-panel JWT, so it can be revoked before it expires. +/// +/// WHY THIS EXISTS +/// --------------- +/// The admin token is self-contained and valid for 12h, which means nothing — +/// not disabling the account, not a central "sign out everywhere" — could cut a +/// session short: the token kept working until it expired. With the central IAM +/// in the loop that gap became visible (an IAM session revocation had no effect +/// here), so every issued token now carries a `jti` recorded on this table and +/// JwtStrategy refuses a token whose row is revoked. +/// +/// Rows are written ONLY while tracking is enabled, and JwtStrategy only +/// enforces them while it is enabled, so a deployment that does not want the +/// extra lookup behaves exactly as before. +model AdminSession { + id String @id @default(cuid()) + + /// The token's `jti` claim. Unique: one row per issued token. + jti String @unique + + adminUserId String + adminUser AdminUser @relation(fields: [adminUserId], references: [id], onDelete: Cascade) + + /// Set when the login was verified by the IAM: its session id (`sid`) and the + /// stable user id (`sub`) there. Back-channel logout arrives keyed by these — + /// deliberately here rather than as columns on AdminUser, so enabling the + /// feature needs no change to an existing table. + iamSessionId String? + iamSub String? + + ipAddress String? + userAgent String? + + createdAt DateTime @default(now()) + expiresAt DateTime? + lastSeenAt DateTime? + + revokedAt DateTime? + revokedReason String? + + @@index([adminUserId]) + @@index([iamSessionId]) + @@index([iamSub]) + @@index([expiresAt]) +} + +/// The sales-expert fields legacy kept on the `customers` row (type=1) and that +/// were lost when a sales expert became an AdminUser (D17). +/// +/// A separate table rather than columns on AdminUser: these are meaningful only +/// for role = SALES_EXPERT and would be permanently null for every other admin. +/// A row is created for every SALES_EXPERT by the migration, and upserted by the +/// service whenever one is created or a user's role becomes SALES_EXPERT — but +/// readers still left-join, so a missing profile degrades to nulls rather than +/// dropping the agent from the grid. +/// +/// `reagent_id` is deliberately NOT here — see D17: in the reference it was a +/// side effect of the shared customers form, and filling it removed that expert +/// from the selectable-agent list (queryReagent, AdminController.php:420). +model SalesExpertProfile { + id String @id @default(cuid()) + adminUserId String @unique + adminUser AdminUser @relation(fields: [adminUserId], references: [id], onDelete: Cascade) + + /// Legacy customers.city_id — a filterable grid column + /// (ReagentListModel.js:14) and the source of the commission autofill + /// (ReagentCustomer.vue:215-228). + cityId String? + city City? @relation(fields: [cityId], references: [id]) + + /// Legacy customers.gram_level — the «سطح اعتبار» column, filterable. + /// Decimal(14,4) matches Customer.goldCreditLimitGrams exactly so the same + /// credit limit has identical precision on both tables. + gramLevel Decimal @default(0) @db.Decimal(14, 4) + + /// Legacy customers.phone (varchar 15) and ncode (varchar 20). The reference + /// stores both and reads neither back; kept so the form matches it. Neither + /// is unique and neither has a validation rule in the reference — inventing + /// one would reject data the reference accepts. + phone String? @db.VarChar(15) + nationalCode String? @db.VarChar(20) + + /// The Customer row carrying this expert's OWN orders, debt and credit limit. + /// + /// The reference stored a sales agent AS a Customer (type=1), so an order the + /// agent placed from the app was simply their own, against their own + /// gram_level (ApiMobileController.php:534-535). Here the expert is an + /// AdminUser (D17), which has no ledger and cannot be an Order's subject, so + /// this one linked Customer plays that part. + /// + /// Distinct from the expert's REFERRED customers, which are ordinary Customer + /// rows pointing at the AdminUser through Customer.referredByAgentId. + /// + /// Null until the expert first signs into the app, when it is created from + /// this profile. See D21. + tradingCustomerId String? @unique + tradingCustomer Customer? @relation("SalesExpertTradingAccount", fields: [tradingCustomerId], references: [id], onDelete: SetNull) + + createdAt DateTime @default(now()) + updatedAt DateTime @default(now()) @updatedAt + + @@index([cityId]) } model Customer { - id String @id @default(cuid()) - fullName String + id String @id @default(cuid()) + + /// ⚠️ `fullName`, `firstName` and `lastName` are kept in sync BY A DATABASE + /// TRIGGER — `customer_sync_full_name`, created in migration + /// 20260922120000_customer_name_parts. Prisma does not know about it, so a + /// write here is NOT the whole story: + /// + /// * write the parts -> fullName is rebuilt as "first last" + /// * write fullName only -> the parts are re-derived from it + /// * write BOTH in one update -> THE PARTS WIN; fullName is overwritten + /// with "first last" and whatever you passed for fullName is discarded + /// + /// So a value you wrote can differ from the value that lands in the row. + /// Re-read after writing if you need the stored value. Prefer writing the + /// parts; `fullName` exists for the legacy readers that predate D0. + /// + /// Reference has these as two columns from the start + /// (henza_server 2020_10_01_120430_customers_table.php:18-19 fname/lname); + /// the port collapsed them, which is the D0 defect. + fullName String + firstName String? + lastName String? + mobile String @unique - nationalCode String @unique + /// Legacy customers.ncode. OPTIONAL since 2026-10-07: not one of the 1,616 + /// legacy customers has a national code (1595/1595 empty), and fabricating + /// one is a data violation that would block later legal identity checks + /// (owner ruling). Still @unique — in PostgreSQL NULLs do not collide, so + /// the migration tool must write NULL and never '', which would collide on + /// the second row. + /// + /// Three service-layer workarounds exist ONLY because this used to be + /// required, and they store the MOBILE NUMBER here: + /// admin-customers.service.ts:625,685 and customer-auth.service.ts:258. + /// Retiring them is a separate change; see docs/DATA-MIGRATION-MAP.md §10.4. + nationalCode String? @unique passwordHash String cityId String? city City? @relation(fields: [cityId], references: [id]) + /// Legacy customers.new_city — the city name exactly as the customer typed it + /// at app sign-up (Major/CustomerController.php:36). Kept verbatim because + /// the legacy city table has only 15 rows, so the typed name is often the only + /// record of where the customer is (172 customers; 43 match no known city). + /// cityId is set alongside it only on an exact, ي/ك-normalised name match. + /// Legacy sign-up also forced city_id = 5 (Tehran) on everyone + /// (Major/CustomerController.php:21), so for those rows the typed name, not + /// cityId, is the truth. Owner ruling 2026-10-07: keep both. + cityNameRaw String? + /// Legacy Customer.type — distinguishes بنکدار from مغازه دار, which the /// BankerList / ShopkeeperList screens filter on. kind CustomerKind @default(APP_SHOPKEEPER) @@ -195,17 +426,73 @@ model Customer { referredByAgentId String? referredByAgent AdminUser? @relation("ReferralAgent", fields: [referredByAgentId], references: [id]) + /// Set only on the one Customer row that acts as a sales expert's own trading + /// account (see SalesExpertProfile.tradingCustomerId). Empty for every + /// ordinary customer. + salesExpertTradingFor SalesExpertProfile? @relation("SalesExpertTradingAccount") + /// Legacy orders that named THIS customer as their referrer — see + /// Order.referrerCustomerId. History only. + referredOrders Order[] @relation("OrderReferrerCustomer") + // Credit limit + cached ledger balances (source of truth is LedgerEntry; these // are denormalized for fast reads and reconciled by a scheduled job). goldCreditLimitGrams Decimal @default(0) @db.Decimal(14, 4) // legacy gram_level goldDebtGrams Decimal @default(0) @db.Decimal(14, 4) // legacy remain fiatDebtRial Decimal @default(0) @db.Decimal(20, 2) // legacy rial_remain + /// Balance as last read from the accounting software (D27), in the app's own + /// sign convention (positive = owes). Shown to the customer when the + /// integration is on; the credit-limit check still uses goldDebtGrams above. + /// Null until the first successful sync. + accountingGoldBalance Decimal? @db.Decimal(14, 4) + accountingRialBalance Decimal? @db.Decimal(20, 2) + accountingBalanceAt DateTime? + + /// Legacy `customers.percent` — the per-customer making-charge offset. It is + /// ADDED to the variant's making charge when pricing an order line + /// (henza_pwa src/Mixins/product/index.ts:69-75: + /// getWage(v) = state.percent + v.percentage_pay) + /// and it shifts the catalogue making-charge filter bounds + /// (ApiMobileController.php:391-396,76-77). It is NOT part of the price + /// formula itself — that extra percent is ConfigStatic['product_price_extra_percent']. + /// + /// NOT the wallet cashback rate (storefront ConfigStatic['percent'], D13) and + /// NOT the wholesale per-line charge (OrderItem.wagePercentSnapshot). + /// + /// DB default 0 keeps every existing customer's price unchanged. The + /// reference's application-layer default for NEW customers is 3 + /// (AdminController.php:338) and the field is required on create (:354). + makingChargeOffsetPercent Decimal @default(0) @db.Decimal(6, 3) + verificationStep VerificationStep @default(UNVERIFIED) nationalIdImageUrl String? businessLicenseUrl String? shopImageUrl String? + /// Why verification was rejected (VerificationStep.REJECTED). + /// + /// Legacy recorded NO reason: none of its 49 `customers` columns is a + /// reason/note field, and on rejection it only sent a fixed SMS. So the 14 + /// rows migrated from henza carry the sentinel + /// «رد شده در سیستم قدیم — فاقد شرح علت ثبت‌شده» instead of NULL, so support + /// knows why it is blank (owner ruling 2026-10-07). The migration tool + /// writes it only WHERE this IS NULL, so a re-run cannot overwrite a real + /// reason entered in the new system. + verificationRejectionReason String? + + /// NULL for rows migrated from henza — legacy recorded no rejection time. + verificationRejectedAt DateTime? + + /// Legacy customers.birth_date, populated on 917 of 1,595 rows. Kept for the + /// birthday SMS / loyalty campaigns (owner ruling 2026-10-07). + /// + /// ⚠ Legacy stores dates as JALALI STRINGS in other tables + /// (cashes.recive_date is varchar, 88/89 values starting "14…"), so this + /// timestamp may hold mis-entered Jalali years. Confirm the calendar with + /// docs/migration-precheck-3.sql BEFORE backfilling: copying them unchanged + /// would produce 917 wrong birthdays, worse for an SMS campaign than none. + birthDate DateTime? + /// Legacy `image_id` — the profile photo (عکس پروفایل) on the sales-agent /// form. Legacy stored an FK to its Image table and read it back as a nested /// `image: { id, image }`, so this is a relation, not a bare URL string. @@ -233,8 +520,34 @@ model Customer { promotions Promotion[] notifications NotificationRecipient[] activityLogs CustomerActivityLog[] + otpChallenges CustomerOtp[] + favorites CustomerFavorite[] @@index([referredByAgentId]) + @@index([firstName]) + @@index([lastName]) +} + +/// Legacy `fav` (251 rows) — saved products. The target had no model for this, +/// so every customer's favourites would have been lost in the migration; the +/// owner confirmed on 2026-10-06 that they matter. +/// +/// Legacy `fav` has two columns and NO primary key. The composite key here +/// supplies the constraint the source lacks (the precheck found 0 duplicate +/// pairs, but the tool should still SELECT DISTINCT). 14 of the 251 rows point +/// at a deleted customer and must be skipped. +/// +/// Legacy's denormalised `product.count_fav` counter is deliberately NOT +/// recreated as a column — derive it from this table. +model CustomerFavorite { + customerId String + customer Customer @relation(fields: [customerId], references: [id], onDelete: Cascade) + productId String + product Product @relation(fields: [productId], references: [id], onDelete: Cascade) + createdAt DateTime @default(now()) + + @@id([customerId, productId]) + @@index([productId]) } model CustomerAddress { @@ -339,12 +652,21 @@ model Product { isActive Boolean @default(true) createdAt DateTime @default(now()) + /// Stock of the linked کارساخته as last read from the accounting software + /// (D27). Weight for gram-type items, count for count-type ones — whichever + /// the software reports. At zero or below the product is unavailable in the + /// app (pre-order variants excepted). Null = not linked or never synced. + accountingStockWeight Decimal? @db.Decimal(14, 4) + accountingStockCount Decimal? @db.Decimal(14, 4) + accountingStockAt DateTime? + variants ProductVariant[] images ProductImage[] collections CollectionProduct[] comments Comment[] promotions Promotion[] allocationItems BranchAllocationItem[] + favoritedBy CustomerFavorite[] } model ProductImage { @@ -426,6 +748,22 @@ model Order { isSuspendedOverCreditLimit Boolean @default(false) deliveredAt DateTime? // setting this is what triggers debt recognition + /// The sales expert this order is credited to, fixed when it is placed: + /// the customer's referring expert AT THAT MOMENT. Legacy `orders.reagent_id`, + /// set once at creation (ApiMobileController.php:601) and never moved, so a + /// customer changing expert later does not move past sales or commission + /// (owner ruling 2026-10-08). «میزان فروش» counts from here, never from the + /// customer's current referrer. + salesAgentId String? + salesAgent AdminUser? @relation("OrderSalesAgent", fields: [salesAgentId], references: [id], onDelete: SetNull) + + /// History only: a legacy order whose `reagent_id` named a customer who is + /// not a sales expert (one such customer, 17 orders in 2022). Legacy counted + /// those orders in that customer's own «میزان فروش»; this keeps that figure + /// exact. Never set for a new order. + referrerCustomerId String? + referrerCustomer Customer? @relation("OrderReferrerCustomer", fields: [referrerCustomerId], references: [id], onDelete: SetNull) + createdAt DateTime @default(now()) updatedAt DateTime @updatedAt @@ -436,6 +774,8 @@ model Order { @@index([customerId]) @@index([status]) + @@index([salesAgentId]) + @@index([referrerCustomerId]) } model OrderItem { @@ -693,6 +1033,115 @@ model Setting { updatedAt DateTime @updatedAt } +// ───────────────────────────────────────────────────────────────────────── +// Accounting integration (D27) — the shop's accounting software, Tahesab or +// Zarrin, chosen in the admin panel. Configuration lives in the Setting row +// `accounting.config` (never served by the generic `const` routes). Plan: +// docs/ACCOUNTING-INTEGRATION-PLAN.md. +// +// `provider` is the driver name ('tahesab' | 'zarrin'), a plain string like +// SMS_PROVIDER so a new driver needs no migration. Links are per provider, so +// switching provider and back loses nothing. +// ───────────────────────────────────────────────────────────────────────── + +enum AccountingEntityType { + CUSTOMER + PRODUCT +} + +/// One app row ↔ one record in the accounting software (customer account or +/// کارساخته). +model AccountingLink { + id String @id @default(cuid()) + provider String + entityType AccountingEntityType + entityId String + /// The record's code in the accounting software (Tahesab Moshtari_Code / + /// Zarrin idHesab; for products the Zarrin idKar or the Tahesab Name_Kar). + externalCode String + externalName String? + /// How the link came to be: LINKED (matched by mobile/name), IMPORTED (app + /// row created from the accounting record), PUSHED (accounting record created + /// from the app row) or MANUAL (an admin typed the code). + origin String + /// The record as last read, for display only. + snapshot Json? + syncedAt DateTime @default(now()) + createdAt DateTime @default(now()) + + @@unique([provider, entityType, entityId]) + @@unique([provider, entityType, externalCode]) + @@index([entityType, entityId]) +} + +enum AccountingOutboxKind { + CUSTOMER_PUSH + PRODUCT_PUSH + ORDER_DOCUMENT + ORDER_DOCUMENT_DELETE +} + +enum AccountingOutboxStatus { + PENDING + /// A call was in flight. Found at startup, it means the process died mid-call + /// and the outcome is unknown — see AccountingOutboxWorker. + SENDING + SENT + FAILED + /// Unsafe to retry automatically (e.g. a Zarrin call timed out: Zarrin has no + /// idempotency key, so a blind retry could post the document twice). + NEEDS_REVIEW + /// Closed by an admin from the log screen. + RESOLVED +} + +/// Work to push to the accounting software. Written in the SAME transaction as +/// the change that causes it, so an outage of the accounting software never +/// loses an event and never blocks the app. +model AccountingOutbox { + id String @id @default(cuid()) + provider String + kind AccountingOutboxKind + entityId String + status AccountingOutboxStatus @default(PENDING) + attempts Int @default(0) + nextAttemptAt DateTime @default(now()) + lastError String? + /// What the accounting software returned as the document/record id. + externalRef String? + /// Per-step progress of multi-call jobs (a Zarrin document is one call per + /// line), so a failure resumes where it stopped. + progress Json? + /// Last request/response, for the log screen. Never contains the token. + lastRequest Json? + lastResponse Json? + sentAt DateTime? + resolvedById String? + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + @@index([status, nextAttemptAt]) + @@index([kind, entityId]) +} + +/// Something a pull found that needs a human: an account with no mobile, two +/// accounts sharing one mobile, a کارساخته group with no category mapping. +model AccountingIssue { + id String @id @default(cuid()) + provider String + kind String + externalCode String + entityId String? + message String + data Json? + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + resolvedAt DateTime? + + @@unique([provider, kind, externalCode]) + @@index([resolvedAt]) +} + // ───────────────────────────────────────────────────────────────────────── // Promotions / discounts — legacy views/promotion/*, served by // PromotionController (`product/variant/promotion`). The redesigned schema had @@ -909,3 +1358,65 @@ model UploadedFile { @@index([purpose]) } + +/// One OTP login challenge for a customer. +/// +/// Ports henza_server's flow (ApiMobileController.php:39-78), where userAuth +/// generated rand(1000,9999), stored it on the customer row as `send_password` +/// and sent it by SMS, and userVerfiy compared the submitted code against it +/// (mismatch -> HTTP 422). +/// +/// Three deliberate improvements over the reference, approved by the user +/// (docs/parity/DECISIONS.md D6 and T1): +/// 1. the code is stored as a bcrypt hash, never in plain text — the +/// reference kept it readable in a customer column; +/// 2. it expires (`expiresAt`) — the reference's code stayed valid forever; +/// 3. attempts are counted and the challenge locks out — the reference had +/// no limit at all. +/// The parity behaviour itself is the code comparison and the rejection. +model CustomerOtp { + id String @id @default(cuid()) + /// Normalised to English digits before storing, as the reference does with + /// Utility::faTOen() on both send and verify. + mobile String + customerId String + customer Customer @relation(fields: [customerId], references: [id], onDelete: Cascade) + + /// bcrypt hash of the 4-digit code. Never the code itself. + codeHash String + expiresAt DateTime + /// Failed verify attempts against THIS challenge. + attempts Int @default(0) + /// Set when the code is accepted, so one challenge cannot be reused. + consumedAt DateTime? + + /// Kept for the per-IP send throttle. + requestIp String? + createdAt DateTime @default(now()) + + @@index([mobile, createdAt]) + @@index([customerId]) + @@index([expiresAt]) +} + +/// Bespoke migration ledger left by the EARLIER, pre-Prisma port. +/// +/// It predates Prisma Migrate in this repo and holds 12 historical rows +/// (`0001_init.sql`, `0002_admin_schema.sql`, `seed:initial`, and the early +/// `2026091…` migrations). It is the only record of how that port was applied, +/// so it is **kept and never written to or deleted from** (DEAD-07). +/// +/// It is declared here purely so `prisma migrate diff` stops proposing +/// `DROP TABLE "_goldbank_migrations"` — an undeclared table reads as drift. +/// `@@ignore` keeps it out of Prisma Client: nothing in the application should +/// ever read or write it, and Prisma Migrate will not manage its shape either. +/// +/// Prisma's own ledger is `_prisma_migrations`, which is separate and is never +/// edited by hand (D14). +model goldbank_migrations { + name String @id + appliedAt DateTime @default(now()) @map("applied_at") @db.Timestamptz(6) + + @@map("_goldbank_migrations") + @@ignore +} diff --git a/apps/api/prisma/seed.ts b/apps/api/prisma/seed.ts index 758916c..e0e9898 100644 --- a/apps/api/prisma/seed.ts +++ b/apps/api/prisma/seed.ts @@ -28,32 +28,12 @@ const DEV_TEST_PHONE_PASSWORD_HASH = bcrypt.hashSync(DEV_TEST_PHONE, 10); // Replace these rows with real photo URLs when product photography exists. const PLACEHOLDER_PRODUCT_IMAGE = '/img/no-items.png'; -async function main() { - // ── Cities ──────────────────────────────────────────────────────────── - const [tehran, mashhad, isfahan, tabriz] = await Promise.all([ - prisma.city.upsert({ where: { id: 'city-tehran' }, update: {}, create: { id: 'city-tehran', name: 'تهران', province: 'تهران' } }), - prisma.city.upsert({ where: { id: 'city-mashhad' }, update: {}, create: { id: 'city-mashhad', name: 'مشهد', province: 'خراسان رضوی' } }), - prisma.city.upsert({ where: { id: 'city-isfahan' }, update: {}, create: { id: 'city-isfahan', name: 'اصفهان', province: 'اصفهان' } }), - prisma.city.upsert({ where: { id: 'city-tabriz' }, update: {}, create: { id: 'city-tabriz', name: 'تبریز', province: 'آذربایجان شرقی' } }), - ]); - - // ── Branches & workshop ────────────────────────────────────────────── - const branchTehran = await prisma.branch.upsert({ - where: { id: 'branch-tehran-bazaar' }, - update: {}, - create: { id: 'branch-tehran-bazaar', name: 'شعبه بازار بزرگ تهران', cityId: tehran.id }, - }); - const branchMashhad = await prisma.branch.upsert({ - where: { id: 'branch-mashhad-main' }, - update: {}, - create: { id: 'branch-mashhad-main', name: 'شعبه مرکزی مشهد', cityId: mashhad.id }, - }); - await prisma.workshop.upsert({ - where: { id: 'workshop-central' }, - update: {}, - create: { id: 'workshop-central', name: 'کارگاه مرکزی ساخت طلا' }, - }); - +/** + * Role definitions and their permissions — the one part of this file a real + * deployment needs (the admin screens and the legacy import map onto these + * ids). Idempotent: upserts and skipDuplicates only. + */ +async function seedAccessControl() { // ── Admin user types + permissions (legacy `permission(rid, ut)`) ──── // // In legacy these lived in the dynamic `config_static` lookup under the key @@ -108,6 +88,65 @@ async function main() { skipDuplicates: true, }); } +} + +/** + * Everything below is DEMO data: sample cities, branches, accounts with known + * passwords (one super admin whose password is its own phone number), sample + * customers, products, orders and posted debt. The app runs this seed once on + * a fresh database at boot (src/prisma/bootstrap.ts), so without this gate a + * production first boot would mix fake customers, fake debt and open admin + * accounts into the real data (SEC-05). Production never gets it unless + * SEED_DEMO_DATA=true is set on purpose. + */ +function demoDataAllowed(): boolean { + if (process.env.SEED_DEMO_DATA?.trim() === 'true') return true; + return process.env.NODE_ENV !== 'production'; +} + +async function main() { + await seedAccessControl(); + + if (!demoDataAllowed()) { + console.log('seed: production — roles and permissions only; demo data skipped (set SEED_DEMO_DATA=true to force)'); + return; + } + + // ── Cities ──────────────────────────────────────────────────────────── + // A tree, as legacy's: country > province > city. The country is a heading + // in the admin pickers; provinces and cities are selectable. + const city = (id: string, name: string, parentId: string | null) => + prisma.city.upsert({ where: { id }, update: {}, create: { id, name, parentId } }); + await city('city-iran', 'ایران', null); + await Promise.all([ + city('city-prov-tehran', 'استان تهران', 'city-iran'), + city('city-prov-khorasan-razavi', 'استان خراسان رضوی', 'city-iran'), + city('city-prov-isfahan', 'استان اصفهان', 'city-iran'), + city('city-prov-east-azarbaijan', 'استان آذربایجان شرقی', 'city-iran'), + ]); + const [tehran, mashhad, isfahan, tabriz] = await Promise.all([ + city('city-tehran', 'تهران', 'city-prov-tehran'), + city('city-mashhad', 'مشهد', 'city-prov-khorasan-razavi'), + city('city-isfahan', 'اصفهان', 'city-prov-isfahan'), + city('city-tabriz', 'تبریز', 'city-prov-east-azarbaijan'), + ]); + + // ── Branches & workshop ────────────────────────────────────────────── + const branchTehran = await prisma.branch.upsert({ + where: { id: 'branch-tehran-bazaar' }, + update: {}, + create: { id: 'branch-tehran-bazaar', name: 'شعبه بازار بزرگ تهران', cityId: tehran.id }, + }); + const branchMashhad = await prisma.branch.upsert({ + where: { id: 'branch-mashhad-main' }, + update: {}, + create: { id: 'branch-mashhad-main', name: 'شعبه مرکزی مشهد', cityId: mashhad.id }, + }); + await prisma.workshop.upsert({ + where: { id: 'workshop-central' }, + update: {}, + create: { id: 'workshop-central', name: 'کارگاه مرکزی ساخت طلا' }, + }); // ── Admin users (sales agents + one super admin) ──────────────────── diff --git a/apps/api/release/app.js b/apps/api/release/app.js index 8ddf06e..8c006ea 100644 --- a/apps/api/release/app.js +++ b/apps/api/release/app.js @@ -58,13 +58,13 @@ var require_Reflect = __commonJS({ function functionThis() { try { return Function("return this;")(); - } catch (_) { + } catch (_2) { } } function indirectEvalThis() { try { return (void 0, eval)("(function() { return this; })()"); - } catch (_) { + } catch (_2) { } } function sloppyModeThis() { @@ -461,11 +461,11 @@ var require_Reflect = __commonJS({ throw new TypeError(); return func; } - function GetIterator(obj) { - var method = GetMethod(obj, iteratorSymbol); + function GetIterator(obj2) { + var method = GetMethod(obj2, iteratorSymbol); if (!IsCallable(method)) throw new TypeError(); - var iterator = method.call(obj); + var iterator = method.call(obj2); if (!IsObject(iterator)) throw new TypeError(); return iterator; @@ -952,10 +952,10 @@ var require_Reflect = __commonJS({ })() ); return Map2; - function getKey(key, _) { + function getKey(key, _2) { return key; } - function getValue(_, value) { + function getValue(_2, value) { return value; } function getEntry(key, value) { @@ -1108,10 +1108,10 @@ var require_Reflect = __commonJS({ return result; } } - function MakeDictionary(obj) { - obj.__ = void 0; - delete obj.__; - return obj; + function MakeDictionary(obj2) { + obj2.__ = void 0; + delete obj2.__; + return obj2; } }); })(Reflect2 || (Reflect2 = {})); @@ -1194,7 +1194,7 @@ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, e var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value"; var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null; var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {}); - var _, done = false; + var _2, done = false; for (var i = decorators.length - 1; i >= 0; i--) { var context = {}; for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p]; @@ -1207,12 +1207,12 @@ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, e if (kind === "accessor") { if (result === void 0) continue; if (result === null || typeof result !== "object") throw new TypeError("Object expected"); - if (_ = accept(result.get)) descriptor.get = _; - if (_ = accept(result.set)) descriptor.set = _; - if (_ = accept(result.init)) initializers.unshift(_); - } else if (_ = accept(result)) { - if (kind === "field") initializers.unshift(_); - else descriptor[key] = _; + if (_2 = accept(result.get)) descriptor.get = _2; + if (_2 = accept(result.set)) descriptor.set = _2; + if (_2 = accept(result.init)) initializers.unshift(_2); + } else if (_2 = accept(result)) { + if (kind === "field") initializers.unshift(_2); + else descriptor[key] = _2; } } if (target) Object.defineProperty(target, contextIn.name, descriptor); @@ -1263,7 +1263,7 @@ function __awaiter(thisArg, _arguments, P, generator) { }); } function __generator(thisArg, body) { - var _ = { label: 0, sent: function() { + var _2 = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype); @@ -1277,7 +1277,7 @@ function __generator(thisArg, body) { } function step(op) { if (f) throw new TypeError("Generator is already executing."); - while (g && (g = 0, op[0] && (_ = 0)), _) try { + while (g && (g = 0, op[0] && (_2 = 0)), _2) try { if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [op[0] & 2, t.value]; switch (op[0]) { @@ -1286,41 +1286,41 @@ function __generator(thisArg, body) { t = op; break; case 4: - _.label++; + _2.label++; return { value: op[1], done: false }; case 5: - _.label++; + _2.label++; y = op[1]; op = [0]; continue; case 7: - op = _.ops.pop(); - _.trys.pop(); + op = _2.ops.pop(); + _2.trys.pop(); continue; default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; + if (!(t = _2.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _2 = 0; continue; } if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; + _2.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; + if (op[0] === 6 && _2.label < t[1]) { + _2.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); + if (t && _2.label < t[2]) { + _2.label = t[2]; + _2.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); + if (t[2]) _2.ops.pop(); + _2.trys.pop(); continue; } - op = body.call(thisArg, _); + op = body.call(thisArg, _2); } catch (e) { op = [6, e]; y = 0; @@ -1375,7 +1375,7 @@ function __spreadArrays() { return r; } function __spreadArray(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (pack || arguments.length === 2) for (var i = 0, l2 = from.length, ar; i < l2; i++) { if (ar || !(i in from)) { if (!ar) ar = Array.prototype.slice.call(from, 0, i); ar[i] = from[i]; @@ -1494,7 +1494,7 @@ function __classPrivateFieldIn(state, receiver) { if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function") throw new TypeError("Cannot use 'in' operator on non-object"); return typeof state === "function" ? receiver === state : state.has(receiver); } -function __addDisposableResource(env, value, async) { +function __addDisposableResource(env2, value, async) { if (value !== null && value !== void 0) { if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected."); var dispose, inner; @@ -1515,22 +1515,22 @@ function __addDisposableResource(env, value, async) { return Promise.reject(e); } }; - env.stack.push({ value, dispose, async }); + env2.stack.push({ value, dispose, async }); } else if (async) { - env.stack.push({ async: true }); + env2.stack.push({ async: true }); } return value; } -function __disposeResources(env) { +function __disposeResources(env2) { function fail(e) { - env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e; - env.hasError = true; + env2.error = env2.hasError ? new _SuppressedError(e, env2.error, "An error was suppressed during disposal.") : e; + env2.hasError = true; } var r, s = 0; function next() { - while (r = env.stack.pop()) { + while (r = env2.stack.pop()) { try { - if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next); + if (!r.async && s === 1) return s = 0, env2.stack.push(r), Promise.resolve().then(next); if (r.dispose) { var result = r.dispose.call(r.value); if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { @@ -1542,8 +1542,8 @@ function __disposeResources(env) { fail(e); } } - if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve(); - if (env.hasError) throw env.error; + if (s === 1) return env2.hasError ? Promise.reject(env2.error) : Promise.resolve(); + if (env2.hasError) throw env2.error; } return next(); } @@ -1942,10 +1942,10 @@ var require_shared_utils = __commonJS({ "use strict"; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isSymbol = exports2.isEmpty = exports2.isNil = exports2.isConstructor = exports2.isNumber = exports2.isString = exports2.isFunction = exports2.stripEndSlash = exports2.normalizePath = exports2.addLeadingSlash = exports2.isPlainObject = exports2.isObject = exports2.isUndefined = void 0; - var isUndefined = (obj) => typeof obj === "undefined"; + var isUndefined = (obj2) => typeof obj2 === "undefined"; exports2.isUndefined = isUndefined; - var isObject = (fn) => !(0, exports2.isNil)(fn) && typeof fn === "object"; - exports2.isObject = isObject; + var isObject2 = (fn) => !(0, exports2.isNil)(fn) && typeof fn === "object"; + exports2.isObject = isObject2; var isPlainObject = (fn) => { if (!(0, exports2.isObject)(fn)) { return false; @@ -2326,12 +2326,12 @@ var require_version_decorator = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.Version = Version; var constants_1 = require_constants2(); - function Version(version) { - if (Array.isArray(version)) { - version = Array.from(new Set(version)); + function Version(version2) { + if (Array.isArray(version2)) { + version2 = Array.from(new Set(version2)); } return (target, key, descriptor) => { - Reflect.defineMetadata(constants_1.VERSION_METADATA, version, descriptor.value); + Reflect.defineMetadata(constants_1.VERSION_METADATA, version2, descriptor.value); return descriptor; }; } @@ -4117,8 +4117,8 @@ var require_console_logger_service = __commonJS({ stringifyMessage(message, logLevel) { if ((0, shared_utils_1.isFunction)(message)) { const messageAsStr = Function.prototype.toString.call(message); - const isClass = messageAsStr.startsWith("class "); - if (isClass) { + const isClass2 = messageAsStr.startsWith("class "); + if (isClass2) { return this.stringifyMessage(message.name, logLevel); } return this.stringifyMessage(message(), logLevel); @@ -6953,17 +6953,17 @@ var require_merge = __commonJS({ }, _typeof(o); } function merge() { - var obj = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; + var obj2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; var defaults = arguments.length > 1 ? arguments[1] : void 0; - if (_typeof(obj) !== "object" || obj === null) { - obj = {}; + if (_typeof(obj2) !== "object" || obj2 === null) { + obj2 = {}; } for (var key in defaults) { - if (typeof obj[key] === "undefined") { - obj[key] = defaults[key]; + if (typeof obj2[key] === "undefined") { + obj2[key] = defaults[key]; } } - return obj; + return obj2; } module2.exports = exports2.default; module2.exports.default = exports2.default; @@ -8471,8 +8471,8 @@ var require_checkHost = __commonJS({ value: true }); exports2.default = checkHost; - function isRegExp(obj) { - return Object.prototype.toString.call(obj) === "[object RegExp]"; + function isRegExp(obj2) { + return Object.prototype.toString.call(obj2) === "[object RegExp]"; } function checkHost(host, matches) { for (var i = 0; i < matches.length; i++) { @@ -8586,18 +8586,18 @@ var require_isIP = __commonJS({ function isIP(ipAddress) { var options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; (0, _assertString.default)(ipAddress); - var version = (_typeof(options) === "object" ? options.version : arguments[1]) || ""; - if (!version) { + var version2 = (_typeof(options) === "object" ? options.version : arguments[1]) || ""; + if (!version2) { return isIP(ipAddress, { version: 4 }) || isIP(ipAddress, { version: 6 }); } - if (version.toString() === "4") { + if (version2.toString() === "4") { return IPv4AddressRegExp.test(ipAddress); } - if (version.toString() === "6") { + if (version2.toString() === "6") { return IPv6AddressRegExp.test(ipAddress); } return false; @@ -9183,15 +9183,15 @@ var require_IsIP = __commonJS({ var ValidateBy_1 = require_ValidateBy(); var isIP_1 = __importDefault2(require_isIP()); exports2.IS_IP = "isIp"; - function isIP(value, version) { - const versionStr = version ? `${version}` : void 0; + function isIP(value, version2) { + const versionStr = version2 ? `${version2}` : void 0; return typeof value === "string" && (0, isIP_1.default)(value, versionStr); } exports2.isIP = isIP; - function IsIP(version, validationOptions) { + function IsIP(version2, validationOptions) { return (0, ValidateBy_1.ValidateBy)({ name: exports2.IS_IP, - constraints: [version], + constraints: [version2], validator: { validate: (value, args) => isIP(value, args === null || args === void 0 ? void 0 : args.constraints[0]), defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be an ip address", validationOptions) @@ -9302,7 +9302,7 @@ var require_isISBN = __commonJS({ var factor = [1, 3]; function isISBN(isbn, options) { (0, _assertString.default)(isbn); - var version = String((options === null || options === void 0 ? void 0 : options.version) || options); + var version2 = String((options === null || options === void 0 ? void 0 : options.version) || options); if (!(options !== null && options !== void 0 && options.version || options)) { return isISBN(isbn, { version: 10 @@ -9312,11 +9312,11 @@ var require_isISBN = __commonJS({ } var sanitizedIsbn = isbn.replace(/[\s-]+/g, ""); var checksum = 0; - if (version === "10") { + if (version2 === "10") { if (!possibleIsbn10.test(sanitizedIsbn)) { return false; } - for (var i = 0; i < version - 1; i++) { + for (var i = 0; i < version2 - 1; i++) { checksum += (i + 1) * sanitizedIsbn.charAt(i); } if (sanitizedIsbn.charAt(9) === "X") { @@ -9327,7 +9327,7 @@ var require_isISBN = __commonJS({ if (checksum % 11 === 0) { return true; } - } else if (version === "13") { + } else if (version2 === "13") { if (!possibleIsbn13.test(sanitizedIsbn)) { return false; } @@ -9357,15 +9357,15 @@ var require_IsISBN = __commonJS({ var ValidateBy_1 = require_ValidateBy(); var isISBN_1 = __importDefault2(require_isISBN()); exports2.IS_ISBN = "isIsbn"; - function isISBN(value, version) { - const versionStr = version ? `${version}` : void 0; + function isISBN(value, version2) { + const versionStr = version2 ? `${version2}` : void 0; return typeof value === "string" && (0, isISBN_1.default)(value, versionStr); } exports2.isISBN = isISBN; - function IsISBN(version, validationOptions) { + function IsISBN(version2, validationOptions) { return (0, ValidateBy_1.ValidateBy)({ name: exports2.IS_ISBN, - constraints: [version], + constraints: [version2], validator: { validate: (value, args) => isISBN(value, args === null || args === void 0 ? void 0 : args.constraints[0]), defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be an ISBN", validationOptions) @@ -9571,7 +9571,7 @@ var require_isJSON = __commonJS({ (0, _assertString.default)(str); try { options = (0, _merge.default)(options, default_json_options); - var obj = JSON.parse(str); + var obj2 = JSON.parse(str); if (options.allow_any_value) { return true; } @@ -9579,7 +9579,7 @@ var require_isJSON = __commonJS({ if (options.allow_primitives) { primitives = [null, false, true]; } - return (0, _includesArray.default)(primitives, obj) || !!obj && _typeof(obj) === "object"; + return (0, _includesArray.default)(primitives, obj2) || !!obj2 && _typeof(obj2) === "object"; } catch (e) { } return false; @@ -10290,15 +10290,15 @@ var require_isURL = __commonJS({ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } - function _iterableToArrayLimit(r, l) { + function _iterableToArrayLimit(r, l2) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = true, o = false; try { - if (i = (t = t.call(r)).next, 0 === l) { + if (i = (t = t.call(r)).next, 0 === l2) { if (Object(t) !== t) return; f = false; - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = true) ; + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l2); f = true) ; } catch (r2) { o = true, n = r2; } finally { @@ -10539,12 +10539,12 @@ var require_isUUID = __commonJS({ // From https://github.com/uuidjs/uuid/blob/main/src/regex.js all: /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i }; - function isUUID(str, version) { + function isUUID(str, version2) { (0, _assertString.default)(str); - if (version === void 0 || version === null) { - version = "all"; + if (version2 === void 0 || version2 === null) { + version2 = "all"; } - return version in uuid ? uuid[version].test(str) : false; + return version2 in uuid ? uuid[version2].test(str) : false; } module2.exports = exports2.default; module2.exports.default = exports2.default; @@ -10563,14 +10563,14 @@ var require_IsUUID = __commonJS({ var ValidateBy_1 = require_ValidateBy(); var isUUID_1 = __importDefault2(require_isUUID()); exports2.IS_UUID = "isUuid"; - function isUUID(value, version) { - return typeof value === "string" && (0, isUUID_1.default)(value, version); + function isUUID(value, version2) { + return typeof value === "string" && (0, isUUID_1.default)(value, version2); } exports2.isUUID = isUUID; - function IsUUID(version, validationOptions) { + function IsUUID(version2, validationOptions) { return (0, ValidateBy_1.ValidateBy)({ name: exports2.IS_UUID, - constraints: [version], + constraints: [version2], validator: { validate: (value, args) => isUUID(value, args === null || args === void 0 ? void 0 : args.constraints[0]), defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be a UUID", validationOptions) @@ -10877,9 +10877,9 @@ var require_isObject = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); - exports2["default"] = isObject; + exports2["default"] = isObject2; var objectConstructor = {}.constructor; - function isObject(object) { + function isObject2(object) { return object !== void 0 && object !== null && object.constructor === objectConstructor; } } @@ -10961,15 +10961,15 @@ var require_normalizeArguments = __commonJS({ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } - function _iterableToArrayLimit(r, l) { + function _iterableToArrayLimit(r, l2) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = true, o = false; try { - if (i = (t = t.call(r)).next, 0 === l) { + if (i = (t = t.call(r)).next, 0 === l2) { if (Object(t) !== t) return; f = false; - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = true) ; + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l2); f = true) ; } catch (r2) { o = true, n = r2; } finally { @@ -11277,8 +11277,8 @@ var require_metadata = __commonJS({ return _createClass(Metadata2, [{ key: "getCountries", value: function getCountries() { - return Object.keys(this.metadata.countries).filter(function(_) { - return _ !== "001"; + return Object.keys(this.metadata.countries).filter(function(_2) { + return _2 !== "001"; }); } }, { @@ -11569,8 +11569,8 @@ var require_metadata = __commonJS({ value: function formats() { var _this = this; var formats2 = this._getFormats(this.metadata) || this._getFormats(this._getDefaultCountryMetadataForThisCallingCode()) || []; - return formats2.map(function(_) { - return new Format(_, _this); + return formats2.map(function(_2) { + return new Format(_2, _this); }); } }, { @@ -11756,8 +11756,8 @@ var require_metadata = __commonJS({ throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat((0, _isObject["default"])(metadata) ? "an object of shape: { " + Object.keys(metadata).join(", ") + " }" : "a " + typeOf(metadata) + ": " + metadata, ".")); } } - var typeOf = function typeOf2(_) { - return _typeof(_); + var typeOf = function typeOf2(_2) { + return _typeof(_2); }; function getExtPrefix(country2, metadataJson) { var metadata = new Metadata(metadataJson); @@ -11777,18 +11777,18 @@ var require_metadata = __commonJS({ return metadataJson.countries.hasOwnProperty(country2); } function setVersion(metadata) { - var version = metadata.version; - if (typeof version === "number") { - this.v1 = version === 1; - this.v2 = version === 2; - this.v3 = version === 3; - this.v4 = version === 4; + var version2 = metadata.version; + if (typeof version2 === "number") { + this.v1 = version2 === 1; + this.v2 = version2 === 2; + this.v3 = version2 === 3; + this.v4 = version2 === 4; } else { - if (!version) { + if (!version2) { this.v1 = true; - } else if ((0, _semverCompare["default"])(version, V3) === -1) { + } else if ((0, _semverCompare["default"])(version2, V3) === -1) { this.v2 = true; - } else if ((0, _semverCompare["default"])(version, V4) === -1) { + } else if ((0, _semverCompare["default"])(version2, V4) === -1) { this.v3 = true; } else { this.v4 = true; @@ -12917,15 +12917,15 @@ var require_RFC3966 = __commonJS({ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } - function _iterableToArrayLimit(r, l) { + function _iterableToArrayLimit(r, l2) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = true, o = false; try { - if (i = (t = t.call(r)).next, 0 === l) { + if (i = (t = t.call(r)).next, 0 === l2) { if (Object(t) !== t) return; f = false; - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = true) ; + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l2); f = true) ; } catch (r2) { o = true, n = r2; } finally { @@ -13550,7 +13550,7 @@ var require_parse = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); - exports2["default"] = parse; + exports2["default"] = parse2; var _constants = require_constants4(); var _ParseError = _interopRequireDefault(require_ParseError()); var _metadata = _interopRequireDefault(require_metadata()); @@ -13586,7 +13586,7 @@ var require_parse = __commonJS({ var PHONE_NUMBER_START_PATTERN = new RegExp("[" + _constants.PLUS_CHARS + _constants.VALID_DIGITS + "]"); var AFTER_PHONE_NUMBER_END_PATTERN = new RegExp("[^" + _constants.VALID_DIGITS + "#]+$"); var USE_NON_GEOGRAPHIC_COUNTRY_CODE = false; - function parse(text, options, metadataJson) { + function parse2(text, options, metadataJson) { options = options || {}; var metadata = new _metadata["default"](metadataJson); if (options.defaultCountry && !metadata.hasCountry(options.defaultCountry)) { @@ -15795,7 +15795,7 @@ var require_AsYouTypeFormatter_PatternParser = __commonJS({ } return _createClass(PatternParser2, [{ key: "parse", - value: function parse(pattern) { + value: function parse2(pattern) { this.context = [{ or: true, instructions: [] @@ -16452,8 +16452,8 @@ var require_AsYouTypeFormatter = __commonJS({ return 1; } if (!_this3.createTemplateForFormat(format, state)) { - _this3.matchingFormats = _this3.matchingFormats.filter(function(_) { - return _ !== format; + _this3.matchingFormats = _this3.matchingFormats.filter(function(_2) { + return _2 !== format; }); return 1; } @@ -16662,15 +16662,15 @@ var require_AsYouTypeParser = __commonJS({ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } - function _iterableToArrayLimit(r, l) { + function _iterableToArrayLimit(r, l2) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = true, o = false; try { - if (i = (t = t.call(r)).next, 0 === l) { + if (i = (t = t.call(r)).next, 0 === l2) { if (Object(t) !== t) return; f = false; - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = true) ; + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l2); f = true) ; } catch (r2) { o = true, n = r2; } finally { @@ -17045,15 +17045,15 @@ var require_AsYouType = __commonJS({ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } - function _iterableToArrayLimit(r, l) { + function _iterableToArrayLimit(r, l2) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = true, o = false; try { - if (i = (t = t.call(r)).next, 0 === l) { + if (i = (t = t.call(r)).next, 0 === l2) { if (Object(t) !== t) return; f = false; - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = true) ; + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l2); f = true) ; } catch (r2) { o = true, n = r2; } finally { @@ -19937,7 +19937,7 @@ var require_isIPRange = __commonJS({ var v4Subnet = 32; var v6Subnet = 128; function isIPRange(str) { - var version = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ""; + var version2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ""; (0, _assertString.default)(str); var parts = str.split("/"); if (parts.length !== 2) { @@ -19949,12 +19949,12 @@ var require_isIPRange = __commonJS({ if (parts[1].length > 1 && parts[1].startsWith("0")) { return false; } - var isValidIP = (0, _isIP.default)(parts[0], version); + var isValidIP = (0, _isIP.default)(parts[0], version2); if (!isValidIP) { return false; } var expectedSubnet = null; - switch (String(version)) { + switch (String(version2)) { case "4": expectedSubnet = v4Subnet; break; @@ -19989,15 +19989,15 @@ var require_isDate = __commonJS({ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } - function _iterableToArrayLimit(r, l) { + function _iterableToArrayLimit(r, l2) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = true, o = false; try { - if (i = (t = t.call(r)).next, 0 === l) { + if (i = (t = t.call(r)).next, 0 === l2) { if (Object(t) !== t) return; f = false; - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = true) ; + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l2); f = true) ; } catch (r2) { o = true, n = r2; } finally { @@ -20231,9 +20231,9 @@ var require_isIMEI = __commonJS({ return false; } str = str.replace(/-/g, ""); - var sum = 0, mul = 2, l = 14; - for (var i = 0; i < l; i++) { - var digit = str.substring(l - i - 1, l - i); + var sum = 0, mul = 2, l2 = 14; + for (var i = 0; i < l2; i++) { + var digit = str.substring(l2 - i - 1, l2 - i); var tp = parseInt(digit, 10) * mul; if (tp >= 10) { sum += tp % 10 + 1; @@ -20269,10 +20269,10 @@ var require_isMD5 = __commonJS({ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } - var md5 = /^[a-f0-9]{32}$/; + var md52 = /^[a-f0-9]{32}$/; function isMD5(str) { (0, _assertString.default)(str); - return md5.test(str); + return md52.test(str); } module2.exports = exports2.default; module2.exports.default = exports2.default; @@ -20585,12 +20585,12 @@ var require_isTaxID = __commonJS({ } function isCanadianSIN(input) { var digitsArray = input.split(""); - var even = digitsArray.filter(function(_, idx) { + var even = digitsArray.filter(function(_2, idx) { return idx % 2; }).map(function(i) { return Number(i) * 2; }).join("").split(""); - var total = digitsArray.filter(function(_, idx) { + var total = digitsArray.filter(function(_2, idx) { return !(idx % 2); }).concat(even).map(function(i) { return Number(i); @@ -21770,15 +21770,15 @@ var require_isMailtoURI = __commonJS({ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } - function _iterableToArrayLimit(r, l) { + function _iterableToArrayLimit(r, l2) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = true, o = false; try { - if (i = (t = t.call(r)).next, 0 === l) { + if (i = (t = t.call(r)).next, 0 === l2) { if (Object(t) !== t) return; f = false; - } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = true) ; + } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l2); f = true) ; } catch (r2) { o = true, n = r2; } finally { @@ -22780,9 +22780,9 @@ var require_validator = __commonJS({ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } - var version = "13.15.35"; + var version2 = "13.15.35"; var validator = { - version, + version: version2, toDate: _toDate.default, toFloat: _toFloat.default, toInt: _toInt.default, @@ -23283,15 +23283,15 @@ var require_IsObject = __commonJS({ exports2.IsObject = exports2.isObject = exports2.IS_OBJECT = void 0; var ValidateBy_1 = require_ValidateBy(); exports2.IS_OBJECT = "isObject"; - function isObject(value) { + function isObject2(value) { return value != null && (typeof value === "object" || typeof value === "function") && !Array.isArray(value); } - exports2.isObject = isObject; + exports2.isObject = isObject2; function IsObject(validationOptions) { return (0, ValidateBy_1.ValidateBy)({ name: exports2.IS_OBJECT, validator: { - validate: (value, args) => isObject(value), + validate: (value, args) => isObject2(value), defaultMessage: (0, ValidateBy_1.buildMessage)((eachPrefix) => eachPrefix + "$property must be an object", validationOptions) } }, validationOptions); @@ -23740,14 +23740,14 @@ var require_cjs = __commonJS({ __exportStar2(require_ValidationSchema(), exports2); __exportStar2(require_register_decorator(), exports2); __exportStar2(require_MetadataStorage(), exports2); - function validate(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions) { + function validate2(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions) { if (typeof schemaNameOrObject === "string") { return (0, container_1.getFromContainer)(Validator_1.Validator).validate(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions); } else { return (0, container_1.getFromContainer)(Validator_1.Validator).validate(schemaNameOrObject, objectOrValidationOptions); } } - exports2.validate = validate; + exports2.validate = validate2; function validateOrReject(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions) { if (typeof schemaNameOrObject === "string") { return (0, container_1.getFromContainer)(Validator_1.Validator).validateOrReject(schemaNameOrObject, objectOrValidationOptions, maybeValidatorOptions); @@ -24326,7 +24326,7 @@ var require_TransformOperationExecutor = __commonJS({ return value; } } - applyCustomTransformations(value, target, key, obj, transformationType) { + applyCustomTransformations(value, target, key, obj2, transformationType) { let metadatas = storage_1.defaultMetadataStorage.findTransformMetadatas(target, key, this.transformationType); if (this.options.version !== void 0) { metadatas = metadatas.filter((metadata) => { @@ -24347,7 +24347,7 @@ var require_TransformOperationExecutor = __commonJS({ }); } metadatas.forEach((metadata) => { - value = metadata.transformFn({ value, key, obj, type: transformationType, options: this.options }); + value = metadata.transformFn({ value, key, obj: obj2, type: transformationType, options: this.options }); }); return value; } @@ -24995,12 +24995,12 @@ var require_validation_pipe = __commonJS({ const originalValue = value; value = this.toEmptyIfNil(value, metatype); const isNil = value !== originalValue; - const isPrimitive = this.isPrimitive(value); + const isPrimitive2 = this.isPrimitive(value); this.stripProtoKeys(value); let entity = classTransformer.plainToClass(metatype, value, this.transformOptions); const originalEntity = entity; const isCtorNotEqual = entity.constructor !== metatype; - if (isCtorNotEqual && !isPrimitive) { + if (isCtorNotEqual && !isPrimitive2) { entity.constructor = metatype; } else if (isCtorNotEqual) { entity = { constructor: metatype }; @@ -25009,7 +25009,7 @@ var require_validation_pipe = __commonJS({ if (errors.length > 0) { throw await this.exceptionFactory(errors); } - if (isPrimitive) { + if (isPrimitive2) { entity = originalEntity; } if (this.isTransformEnabled) { @@ -25493,8 +25493,8 @@ var require_parse_uuid_pipe = __commonJS({ constructor(options) { this.options = options; options = options || {}; - const { exceptionFactory, errorHttpStatusCode = http_status_enum_1.HttpStatus.BAD_REQUEST, version } = options; - this.version = version; + const { exceptionFactory, errorHttpStatusCode = http_status_enum_1.HttpStatus.BAD_REQUEST, version: version2 } = options; + this.version = version2; this.exceptionFactory = exceptionFactory || ((error) => new http_error_by_code_util_1.HttpErrorByCode[errorHttpStatusCode](error)); } async transform(value, metadata) { @@ -25506,11 +25506,11 @@ var require_parse_uuid_pipe = __commonJS({ } return value; } - isUUID(str, version = "all") { + isUUID(str, version2 = "all") { if (!(0, shared_utils_1.isString)(str)) { throw this.exceptionFactory("The value passed as UUID is not a string"); } - const pattern = ParseUUIDPipe_1.uuidRegExps[version]; + const pattern = ParseUUIDPipe_1.uuidRegExps[version2]; return pattern?.test(str); } }; @@ -26610,8 +26610,8 @@ var require_isAsyncIterable = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.isAsyncIterable = void 0; var isFunction_1 = require_isFunction(); - function isAsyncIterable(obj) { - return Symbol.asyncIterator && isFunction_1.isFunction(obj === null || obj === void 0 ? void 0 : obj[Symbol.asyncIterator]); + function isAsyncIterable(obj2) { + return Symbol.asyncIterator && isFunction_1.isFunction(obj2 === null || obj2 === void 0 ? void 0 : obj2[Symbol.asyncIterator]); } exports2.isAsyncIterable = isAsyncIterable; } @@ -26667,7 +26667,7 @@ var require_isReadableStreamLike = __commonJS({ "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/util/isReadableStreamLike.js"(exports2) { "use strict"; var __generator2 = exports2 && exports2.__generator || function(thisArg, body) { - var _ = { label: 0, sent: function() { + var _2 = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; @@ -26681,7 +26681,7 @@ var require_isReadableStreamLike = __commonJS({ } function step(op) { if (f) throw new TypeError("Generator is already executing."); - while (_) try { + while (_2) try { if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [op[0] & 2, t.value]; switch (op[0]) { @@ -26690,41 +26690,41 @@ var require_isReadableStreamLike = __commonJS({ t = op; break; case 4: - _.label++; + _2.label++; return { value: op[1], done: false }; case 5: - _.label++; + _2.label++; y = op[1]; op = [0]; continue; case 7: - op = _.ops.pop(); - _.trys.pop(); + op = _2.ops.pop(); + _2.trys.pop(); continue; default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; + if (!(t = _2.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _2 = 0; continue; } if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; + _2.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; + if (op[0] === 6 && _2.label < t[1]) { + _2.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); + if (t && _2.label < t[2]) { + _2.label = t[2]; + _2.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); + if (t[2]) _2.ops.pop(); + _2.trys.pop(); continue; } - op = body.call(thisArg, _); + op = body.call(thisArg, _2); } catch (e) { op = [6, e]; y = 0; @@ -26813,8 +26813,8 @@ var require_isReadableStreamLike = __commonJS({ }); } exports2.readableStreamLikeToAsyncGenerator = readableStreamLikeToAsyncGenerator; - function isReadableStreamLike(obj) { - return isFunction_1.isFunction(obj === null || obj === void 0 ? void 0 : obj.getReader); + function isReadableStreamLike(obj2) { + return isFunction_1.isFunction(obj2 === null || obj2 === void 0 ? void 0 : obj2.getReader); } exports2.isReadableStreamLike = isReadableStreamLike; } @@ -26852,7 +26852,7 @@ var require_innerFrom = __commonJS({ }); }; var __generator2 = exports2 && exports2.__generator || function(thisArg, body) { - var _ = { label: 0, sent: function() { + var _2 = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; @@ -26866,7 +26866,7 @@ var require_innerFrom = __commonJS({ } function step(op) { if (f) throw new TypeError("Generator is already executing."); - while (_) try { + while (_2) try { if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [op[0] & 2, t.value]; switch (op[0]) { @@ -26875,41 +26875,41 @@ var require_innerFrom = __commonJS({ t = op; break; case 4: - _.label++; + _2.label++; return { value: op[1], done: false }; case 5: - _.label++; + _2.label++; y = op[1]; op = [0]; continue; case 7: - op = _.ops.pop(); - _.trys.pop(); + op = _2.ops.pop(); + _2.trys.pop(); continue; default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; + if (!(t = _2.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _2 = 0; continue; } if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; + _2.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; + if (op[0] === 6 && _2.label < t[1]) { + _2.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); + if (t && _2.label < t[2]) { + _2.label = t[2]; + _2.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); + if (t[2]) _2.ops.pop(); + _2.trys.pop(); continue; } - op = body.call(thisArg, _); + op = body.call(thisArg, _2); } catch (e) { op = [6, e]; y = 0; @@ -26990,9 +26990,9 @@ var require_innerFrom = __commonJS({ throw throwUnobservableError_1.createInvalidObservableTypeError(input); } exports2.innerFrom = innerFrom; - function fromInteropObservable(obj) { + function fromInteropObservable(obj2) { return new Observable_1.Observable(function(subscriber) { - var obs = obj[observable_1.observable](); + var obs = obj2[observable_1.observable](); if (isFunction_1.isFunction(obs.subscribe)) { return obs.subscribe(subscriber); } @@ -28110,8 +28110,8 @@ var require_argsArgArrayOrObject = __commonJS({ return { args, keys: null }; } exports2.argsArgArrayOrObject = argsArgArrayOrObject; - function isPOJO(obj) { - return obj && typeof obj === "object" && getPrototypeOf(obj) === objectProto; + function isPOJO(obj2) { + return obj2 && typeof obj2 === "object" && getPrototypeOf(obj2) === objectProto; } } }); @@ -31889,7 +31889,7 @@ var require_skip = __commonJS({ exports2.skip = void 0; var filter_1 = require_filter2(); function skip(count) { - return filter_1.filter(function(_, index) { + return filter_1.filter(function(_2, index) { return count <= index; }); } @@ -32085,7 +32085,7 @@ var require_switchScan = __commonJS({ var state = seed; switchMap_1.switchMap(function(value, index) { return accumulator(state, value, index); - }, function(_, innerValue) { + }, function(_2, innerValue) { return state = innerValue, innerValue; })(source).subscribe(subscriber); return function() { @@ -34737,8 +34737,8 @@ var require_isObservable = __commonJS({ exports2.isObservable = void 0; var Observable_1 = require_Observable(); var isFunction_1 = require_isFunction(); - function isObservable(obj) { - return !!obj && (obj instanceof Observable_1.Observable || isFunction_1.isFunction(obj.lift) && isFunction_1.isFunction(obj.subscribe)); + function isObservable(obj2) { + return !!obj2 && (obj2 instanceof Observable_1.Observable || isFunction_1.isFunction(obj2.lift) && isFunction_1.isFunction(obj2.subscribe)); } exports2.isObservable = isObservable; } @@ -35186,7 +35186,7 @@ var require_generate = __commonJS({ "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/observable/generate.js"(exports2) { "use strict"; var __generator2 = exports2 && exports2.__generator || function(thisArg, body) { - var _ = { label: 0, sent: function() { + var _2 = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; @@ -35200,7 +35200,7 @@ var require_generate = __commonJS({ } function step(op) { if (f) throw new TypeError("Generator is already executing."); - while (_) try { + while (_2) try { if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [op[0] & 2, t.value]; switch (op[0]) { @@ -35209,41 +35209,41 @@ var require_generate = __commonJS({ t = op; break; case 4: - _.label++; + _2.label++; return { value: op[1], done: false }; case 5: - _.label++; + _2.label++; y = op[1]; op = [0]; continue; case 7: - op = _.ops.pop(); - _.trys.pop(); + op = _2.ops.pop(); + _2.trys.pop(); continue; default: - if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { - _ = 0; + if (!(t = _2.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { + _2 = 0; continue; } if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) { - _.label = op[1]; + _2.label = op[1]; break; } - if (op[0] === 6 && _.label < t[1]) { - _.label = t[1]; + if (op[0] === 6 && _2.label < t[1]) { + _2.label = t[1]; t = op; break; } - if (t && _.label < t[2]) { - _.label = t[2]; - _.ops.push(op); + if (t && _2.label < t[2]) { + _2.label = t[2]; + _2.ops.push(op); break; } - if (t[2]) _.ops.pop(); - _.trys.pop(); + if (t[2]) _2.ops.pop(); + _2.trys.pop(); continue; } - op = body.call(thisArg, _); + op = body.call(thisArg, _2); } catch (e) { op = [6, e]; y = 0; @@ -35368,8 +35368,8 @@ var require_pairs = __commonJS({ Object.defineProperty(exports2, "__esModule", { value: true }); exports2.pairs = void 0; var from_1 = require_from(); - function pairs(obj, scheduler2) { - return from_1.from(Object.entries(obj), scheduler2); + function pairs(obj2, scheduler2) { + return from_1.from(Object.entries(obj2), scheduler2); } exports2.pairs = pairs; } @@ -36465,8 +36465,8 @@ var require_base_exception_filter_context = __commonJS({ })).toArray(); } getFilterInstance(filter, contextId = constants_2.STATIC_CONTEXT, inquirerId) { - const isObject = filter.catch; - if (isObject) { + const isObject2 = filter.catch; + if (isObject2) { return filter; } const instanceWrapper = this.getInstanceByMetatype(filter); @@ -36905,8 +36905,8 @@ var require_guards_context_creator = __commonJS({ return (0, iterare_1.iterate)(metadata).filter((guard) => guard && (guard.name || guard.canActivate)).map((guard) => this.getGuardInstance(guard, contextId, inquirerId)).filter((guard) => guard && (0, shared_utils_1.isFunction)(guard.canActivate)).toArray(); } getGuardInstance(metatype, contextId = constants_2.STATIC_CONTEXT, inquirerId) { - const isObject = metatype.canActivate; - if (isObject) { + const isObject2 = metatype.canActivate; + if (isObject2) { return metatype; } const instanceWrapper = this.getInstanceByMetatype(metatype); @@ -37028,8 +37028,8 @@ var require_interceptors_context_creator = __commonJS({ return (0, iterare_1.iterate)(metadata).filter((interceptor) => interceptor && (interceptor.name || interceptor.intercept)).map((interceptor) => this.getInterceptorInstance(interceptor, contextId, inquirerId)).filter((interceptor) => interceptor && (0, shared_utils_1.isFunction)(interceptor.intercept)).toArray(); } getInterceptorInstance(metatype, contextId = constants_2.STATIC_CONTEXT, inquirerId) { - const isObject = metatype.intercept; - if (isObject) { + const isObject2 = metatype.intercept; + if (isObject2) { return metatype; } const instanceWrapper = this.getInstanceByMetatype(metatype); @@ -37158,8 +37158,8 @@ var require_pipes_context_creator = __commonJS({ return (0, iterare_1.iterate)(metadata).filter((pipe) => pipe && (pipe.name || pipe.transform)).map((pipe) => this.getPipeInstance(pipe, contextId, inquirerId)).filter((pipe) => pipe && pipe.transform && (0, shared_utils_1.isFunction)(pipe.transform)).toArray(); } getPipeInstance(pipe, contextId = constants_2.STATIC_CONTEXT, inquirerId) { - const isObject = pipe.transform; - if (isObject) { + const isObject2 = pipe.transform; + if (isObject2) { return pipe; } const instanceWrapper = this.getInstanceByMetatype(pipe); @@ -39094,10 +39094,10 @@ var require_serialized_graph = __commonJS({ // ../../node_modules/.pnpm/fast-safe-stringify@2.1.1/node_modules/fast-safe-stringify/index.js var require_fast_safe_stringify = __commonJS({ "../../node_modules/.pnpm/fast-safe-stringify@2.1.1/node_modules/fast-safe-stringify/index.js"(exports2, module2) { - module2.exports = stringify; - stringify.default = stringify; - stringify.stable = deterministicStringify; - stringify.stableStringify = deterministicStringify; + module2.exports = stringify2; + stringify2.default = stringify2; + stringify2.stable = deterministicStringify; + stringify2.stableStringify = deterministicStringify; var LIMIT_REPLACE_NODE = "[...]"; var CIRCULAR_REPLACE_NODE = "[Circular]"; var arr = []; @@ -39108,19 +39108,19 @@ var require_fast_safe_stringify = __commonJS({ edgesLimit: Number.MAX_SAFE_INTEGER }; } - function stringify(obj, replacer, spacer, options) { + function stringify2(obj2, replacer, spacer, options) { if (typeof options === "undefined") { options = defaultOptions(); } - decirc(obj, "", 0, [], void 0, 0, options); + decirc(obj2, "", 0, [], void 0, 0, options); var res; try { if (replacerStack.length === 0) { - res = JSON.stringify(obj, replacer, spacer); + res = JSON.stringify(obj2, replacer, spacer); } else { - res = JSON.stringify(obj, replaceGetterValues(replacer), spacer); + res = JSON.stringify(obj2, replaceGetterValues(replacer), spacer); } - } catch (_) { + } catch (_2) { return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]"); } finally { while (arr.length !== 0) { @@ -39190,11 +39190,11 @@ var require_fast_safe_stringify = __commonJS({ } return 0; } - function deterministicStringify(obj, replacer, spacer, options) { + function deterministicStringify(obj2, replacer, spacer, options) { if (typeof options === "undefined") { options = defaultOptions(); } - var tmp = deterministicDecirc(obj, "", 0, [], void 0, 0, options) || obj; + var tmp = deterministicDecirc(obj2, "", 0, [], void 0, 0, options) || obj2; var res; try { if (replacerStack.length === 0) { @@ -39202,7 +39202,7 @@ var require_fast_safe_stringify = __commonJS({ } else { res = JSON.stringify(tmp, replaceGetterValues(replacer), spacer); } - } catch (_) { + } catch (_2) { return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]"); } finally { while (arr.length !== 0) { @@ -39230,7 +39230,7 @@ var require_fast_safe_stringify = __commonJS({ if (typeof val.toJSON === "function") { return; } - } catch (_) { + } catch (_2) { return; } if (typeof options.depthLimit !== "undefined" && depth > options.depthLimit) { @@ -39356,8 +39356,8 @@ var require_module_token_factory = __commonJS({ replacer(key, value) { if ((0, shared_utils_1.isFunction)(value)) { const funcAsString = value.toString(); - const isClass = funcAsString.slice(0, CLASS_STR_LEN) === CLASS_STR; - if (isClass) { + const isClass2 = funcAsString.slice(0, CLASS_STR_LEN) === CLASS_STR; + if (isClass2) { return value.name; } return funcAsString; @@ -39895,7 +39895,7 @@ var require_module = __commonJS({ return Array.from(this._middlewares.values()).find((item) => item.id === id); } getNonAliasProviders() { - return [...this._providers].filter(([_, wrapper]) => !wrapper.isAlias); + return [...this._providers].filter(([_2, wrapper]) => !wrapper.isAlias); } createModuleReferenceType() { const self2 = this; @@ -40383,7 +40383,7 @@ var require_path_to_regexp = __commonJS({ module2.exports = pathToRegexp; module2.exports.match = match; module2.exports.regexpToFunction = regexpToFunction; - module2.exports.parse = parse; + module2.exports.parse = parse2; module2.exports.compile = compile; module2.exports.tokensToFunction = tokensToFunction; module2.exports.tokensToRegExp = tokensToRegExp; @@ -40399,7 +40399,7 @@ var require_path_to_regexp = __commonJS({ // "(\\d+)" => [undefined, undefined, "\d+", undefined] "(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?" ].join("|"), "g"); - function parse(str, options) { + function parse2(str, options) { var tokens = []; var key = 0; var index = 0; @@ -40465,7 +40465,7 @@ var require_path_to_regexp = __commonJS({ return escapeString(prevText) + "|(?:(?!" + escapeString(prevText) + ")" + charGroup + ")+?"; } function compile(str, options) { - return tokensToFunction(parse(str, options), options); + return tokensToFunction(parse2(str, options), options); } function match(str, options) { var keys = []; @@ -40504,7 +40504,7 @@ var require_path_to_regexp = __commonJS({ return function(data, options2) { var path = ""; var encode = options2 && options2.encode || encodeURIComponent; - var validate = options2 ? options2.validate !== false : true; + var validate2 = options2 ? options2.validate !== false : true; for (var i2 = 0; i2 < tokens.length; i2++) { var token = tokens[i2]; if (typeof token === "string") { @@ -40523,7 +40523,7 @@ var require_path_to_regexp = __commonJS({ } for (var j = 0; j < value.length; j++) { segment = encode(value[j], token); - if (validate && !matches[i2].test(segment)) { + if (validate2 && !matches[i2].test(segment)) { throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '"'); } path += (j === 0 ? token.prefix : token.delimiter) + segment; @@ -40532,7 +40532,7 @@ var require_path_to_regexp = __commonJS({ } if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { segment = encode(String(value), token); - if (validate && !matches[i2].test(segment)) { + if (validate2 && !matches[i2].test(segment)) { throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but got "' + segment + '"'); } path += token.prefix + segment; @@ -40578,7 +40578,7 @@ var require_path_to_regexp = __commonJS({ return new RegExp("(?:" + parts.join("|") + ")", flags(options)); } function stringToRegexp(path, keys, options) { - return tokensToRegExp(parse(path, options), keys, options); + return tokensToRegExp(parse2(path, options), keys, options); } function tokensToRegExp(tokens, keys, options) { options = options || {}; @@ -40748,7 +40748,7 @@ var require_utils8 = __commonJS({ } const MiddlewareHost = class extends middleware { use(...params) { - const [req, _, next] = params; + const [req, _2, next] = params; const isExcluded = isMiddlewareRouteExcluded(req, excludedRoutes, httpAdapter); if (isExcluded) { return next(); @@ -40761,7 +40761,7 @@ var require_utils8 = __commonJS({ return assignToken(class { constructor() { this.use = (...params) => { - const [req, _, next] = params; + const [req, _2, next] = params; const isExcluded = isMiddlewareRouteExcluded(req, excludedRoutes, httpAdapter); if (isExcluded) { return next(); @@ -41147,9 +41147,9 @@ var require_route_path_factory = __commonJS({ if (versionOrVersions && metadata.versioningOptions?.type === common_12.VersioningType.URI) { const versionPrefix = this.getVersionPrefix(metadata.versioningOptions); if (Array.isArray(versionOrVersions)) { - paths = (0, common_12.flatten)(paths.map((path) => versionOrVersions.map((version) => ( + paths = (0, common_12.flatten)(paths.map((path) => versionOrVersions.map((version2) => ( // Version Neutral - Do not include version in URL - version === common_12.VERSION_NEUTRAL ? path : `${path}/${versionPrefix}${version}` + version2 === common_12.VERSION_NEUTRAL ? path : `${path}/${versionPrefix}${version2}` )))); } else { if (versionOrVersions !== common_12.VERSION_NEUTRAL) { @@ -41208,9 +41208,9 @@ var require_route_path_factory = __commonJS({ } truncateVersionPrefixFromPath(path, versionValue, versioningOptions) { if (typeof versionValue !== "string") { - versionValue.forEach((version) => { - if (typeof version === "string") { - path = this.truncateVersionPrefixFromPath(path, version, versioningOptions); + versionValue.forEach((version2) => { + if (typeof version2 === "string") { + path = this.truncateVersionPrefixFromPath(path, version2, versioningOptions); } }); return path; @@ -41241,8 +41241,8 @@ var require_route_info_path_extractor = __commonJS({ this.excludedGlobalPrefixRoutes = this.applicationConfig.getGlobalPrefixOptions().exclude; this.versioningConfig = this.applicationConfig.getVersioning(); } - extractPathsFrom({ path, method, version }) { - const versionPaths = this.extractVersionPathFrom(version); + extractPathsFrom({ path, method, version: version2 }) { + const versionPaths = this.extractVersionPathFrom(version2); if (this.isAWildcard(path)) { const entries = versionPaths.length > 0 ? versionPaths.map((versionPath) => [ this.prefixPath + versionPath + "$", @@ -41253,7 +41253,7 @@ var require_route_info_path_extractor = __commonJS({ ...this.excludedGlobalPrefixRoutes.map((route) => versionPaths + (0, shared_utils_1.addLeadingSlash)(route.path)) ] : entries; } - return this.extractNonWildcardPathsFrom({ path, method, version }); + return this.extractNonWildcardPathsFrom({ path, method, version: version2 }); } extractPathFrom(route) { if (this.isAWildcard(route.path) && !route.version) { @@ -41264,8 +41264,8 @@ var require_route_info_path_extractor = __commonJS({ isAWildcard(path) { return ["*", "/*", "/*/", "(.*)", "/(.*)"].includes(path); } - extractNonWildcardPathsFrom({ path, method, version }) { - const versionPaths = this.extractVersionPathFrom(version); + extractNonWildcardPathsFrom({ path, method, version: version2 }) { + const versionPaths = this.extractVersionPathFrom(version2); if (Array.isArray(this.excludedGlobalPrefixRoutes) && (0, utils_1.isRouteExcluded)(this.excludedGlobalPrefixRoutes, path, method)) { if (!versionPaths.length) { return [(0, shared_utils_1.addLeadingSlash)(path)]; @@ -41282,7 +41282,7 @@ var require_route_info_path_extractor = __commonJS({ return []; const versionPrefix = this.routePathFactory.getVersionPrefix(this.versioningConfig); if (Array.isArray(versionValue)) { - return versionValue.map((version) => (0, shared_utils_1.addLeadingSlash)(versionPrefix + version.toString())); + return versionValue.map((version2) => (0, shared_utils_1.addLeadingSlash)(versionPrefix + version2.toString())); } return [(0, shared_utils_1.addLeadingSlash)(versionPrefix + versionValue.toString())]; } @@ -41321,14 +41321,14 @@ var require_paths_explorer = __commonJS({ return null; } const requestMethod = Reflect.getMetadata(constants_1.METHOD_METADATA, prototypeCallback); - const version = Reflect.getMetadata(constants_1.VERSION_METADATA, prototypeCallback); + const version2 = Reflect.getMetadata(constants_1.VERSION_METADATA, prototypeCallback); const path = (0, shared_utils_1.isString)(routePath) ? [(0, shared_utils_1.addLeadingSlash)(routePath)] : routePath.map((p) => (0, shared_utils_1.addLeadingSlash)(p)); return { path, requestMethod, targetCallback: instanceCallback, methodName, - version + version: version2 }; } }; @@ -41472,7 +41472,7 @@ var require_routes_mapper = __commonJS({ const moduleRef = this.getHostModuleOfController(controller); const modulePath = this.getModulePath(moduleRef?.metatype); const concatPaths = (acc, currentValue) => acc.concat(currentValue); - const toUndefinedIfNeural = (version) => version === interfaces_1.VERSION_NEUTRAL ? void 0 : version; + const toUndefinedIfNeural = (version2) => version2 === interfaces_1.VERSION_NEUTRAL ? void 0 : version2; const toRouteInfo = (item, prefix) => item.path?.flatMap((p) => { let endpointPath = modulePath ?? ""; endpointPath += this.normalizeGlobalPath(prefix) + (0, shared_utils_1.addLeadingSlash)(p); @@ -41480,15 +41480,15 @@ var require_routes_mapper = __commonJS({ path: endpointPath, method: item.requestMethod }; - const version = item.version ?? controllerVersion; - if (version && versioningConfig) { - if (typeof version !== "string" && Array.isArray(version)) { - return version.map((v) => ({ + const version2 = item.version ?? controllerVersion; + if (version2 && versioningConfig) { + if (typeof version2 !== "string" && Array.isArray(version2)) { + return version2.map((v) => ({ ...routeInfo, version: toUndefinedIfNeural(v) })); } - routeInfo.version = toUndefinedIfNeural(version); + routeInfo.version = toUndefinedIfNeural(version2); } return routeInfo; }); @@ -41732,7 +41732,7 @@ var require_transient_instances = __commonJS({ exports2.getNonTransientInstances = getNonTransientInstances; var iterare_1 = require_lib(); function getTransientInstances(instances) { - return (0, iterare_1.iterate)(instances).filter(([_, wrapper]) => wrapper.isDependencyTreeStatic()).map(([_, wrapper]) => wrapper.getStaticTransientInstances()).flatten().filter((item) => !!item).map(({ instance }) => instance).toArray(); + return (0, iterare_1.iterate)(instances).filter(([_2, wrapper]) => wrapper.isDependencyTreeStatic()).map(([_2, wrapper]) => wrapper.getStaticTransientInstances()).flatten().filter((item) => !!item).map(({ instance }) => instance).toArray(); } function getNonTransientInstances(instances) { return (0, iterare_1.iterate)(instances).filter(([key, wrapper]) => wrapper.isDependencyTreeStatic() && !wrapper.isTransient).map(([key, { instance }]) => instance).toArray(); @@ -41757,7 +41757,7 @@ var require_on_app_bootstrap_hook = __commonJS({ } async function callModuleBootstrapHook(module3) { const providers = module3.getNonAliasProviders(); - const [_, moduleClassHost] = providers.shift(); + const [_2, moduleClassHost] = providers.shift(); const instances = [ ...module3.controllers, ...providers, @@ -41793,7 +41793,7 @@ var require_on_app_shutdown_hook = __commonJS({ } async function callAppShutdownHook(module3, signal) { const providers = module3.getNonAliasProviders(); - const [_, moduleClassHost] = providers.shift(); + const [_2, moduleClassHost] = providers.shift(); const instances = [ ...module3.controllers, ...providers, @@ -41829,7 +41829,7 @@ var require_on_module_destroy_hook = __commonJS({ } async function callModuleDestroyHook(module3) { const providers = module3.getNonAliasProviders(); - const [_, moduleClassHost] = providers.shift(); + const [_2, moduleClassHost] = providers.shift(); const instances = [ ...module3.controllers, ...providers, @@ -41865,7 +41865,7 @@ var require_on_module_init_hook = __commonJS({ } async function callModuleInitHook(module3) { const providers = module3.getNonAliasProviders(); - const [_, moduleClassHost] = providers.shift(); + const [_2, moduleClassHost] = providers.shift(); const instances = [ ...module3.controllers, ...providers, @@ -41901,7 +41901,7 @@ var require_before_app_shutdown_hook = __commonJS({ } async function callBeforeAppShutdownHook(module3, signal) { const providers = module3.getNonAliasProviders(); - const [_, moduleClassHost] = providers.shift(); + const [_2, moduleClassHost] = providers.shift(); const instances = [ ...module3.controllers, ...providers, @@ -42235,17 +42235,17 @@ var require_messages2 = __commonJS({ exports2.MODULE_INIT_MESSAGE = MODULE_INIT_MESSAGE; var ROUTE_MAPPED_MESSAGE = (path, method) => `Mapped {${path}, ${request_method_enum_1.RequestMethod[method]}} route`; exports2.ROUTE_MAPPED_MESSAGE = ROUTE_MAPPED_MESSAGE; - var VERSIONED_ROUTE_MAPPED_MESSAGE = (path, method, version) => { - const controllerVersions = Array.isArray(version) ? version : [version]; - const versions = controllerVersions.map((version2) => version2 === version_options_interface_1.VERSION_NEUTRAL ? "Neutral" : version2).join(","); + var VERSIONED_ROUTE_MAPPED_MESSAGE = (path, method, version2) => { + const controllerVersions = Array.isArray(version2) ? version2 : [version2]; + const versions = controllerVersions.map((version3) => version3 === version_options_interface_1.VERSION_NEUTRAL ? "Neutral" : version3).join(","); return `Mapped {${path}, ${request_method_enum_1.RequestMethod[method]}} (version: ${versions}) route`; }; exports2.VERSIONED_ROUTE_MAPPED_MESSAGE = VERSIONED_ROUTE_MAPPED_MESSAGE; var CONTROLLER_MAPPING_MESSAGE = (name, path) => `${name} {${path}}:`; exports2.CONTROLLER_MAPPING_MESSAGE = CONTROLLER_MAPPING_MESSAGE; - var VERSIONED_CONTROLLER_MAPPING_MESSAGE = (name, path, version) => { - const controllerVersions = Array.isArray(version) ? version : [version]; - const versions = controllerVersions.map((version2) => version2 === version_options_interface_1.VERSION_NEUTRAL ? "Neutral" : version2).join(","); + var VERSIONED_CONTROLLER_MAPPING_MESSAGE = (name, path, version2) => { + const controllerVersions = Array.isArray(version2) ? version2 : [version2]; + const versions = controllerVersions.map((version3) => version3 === version_options_interface_1.VERSION_NEUTRAL ? "Neutral" : version3).join(","); return `${name} {${path}} (version: ${versions}):`; }; exports2.VERSIONED_CONTROLLER_MAPPING_MESSAGE = VERSIONED_CONTROLLER_MAPPING_MESSAGE; @@ -42803,8 +42803,8 @@ var require_router_explorer = __commonJS({ }, requestMethod); pathsToLog.forEach((path2) => { if (isVersioned) { - const version = this.routePathFactory.getVersion(routePathMetadata); - this.logger.log((0, messages_1.VERSIONED_ROUTE_MAPPED_MESSAGE)(path2, requestMethod, version)); + const version2 = this.routePathFactory.getVersion(routePathMetadata); + this.logger.log((0, messages_1.VERSIONED_ROUTE_MAPPED_MESSAGE)(path2, requestMethod, version2)); } else { this.logger.log((0, messages_1.ROUTE_MAPPED_MESSAGE)(path2, requestMethod)); } @@ -42846,8 +42846,8 @@ var require_router_explorer = __commonJS({ }; } applyVersionFilter(router, routePathMetadata, handler) { - const version = this.routePathFactory.getVersion(routePathMetadata); - return router.applyVersionFilter(handler, version, routePathMetadata.versioningOptions); + const version2 = this.routePathFactory.getVersion(routePathMetadata); + return router.applyVersionFilter(handler, version2, routePathMetadata.versioningOptions); } createCallbackProxy(instance, callback, methodName, moduleRef, requestMethod, contextId = constants_2.STATIC_CONTEXT, inquirerId) { const executionContext = this.executionContextCreator.create(instance, callback, methodName, moduleRef, requestMethod, contextId, inquirerId); @@ -44040,8 +44040,8 @@ var require_depd = __commonJS({ } return false; } - function convertDataDescriptorToAccessor(obj, prop, message) { - var descriptor = Object.getOwnPropertyDescriptor(obj, prop); + function convertDataDescriptorToAccessor(obj2, prop, message) { + var descriptor = Object.getOwnPropertyDescriptor(obj2, prop); var value = descriptor.value; descriptor.get = function getter() { return value; @@ -44053,7 +44053,7 @@ var require_depd = __commonJS({ } delete descriptor.value; delete descriptor.writable; - Object.defineProperty(obj, prop, descriptor); + Object.defineProperty(obj2, prop, descriptor); return descriptor; } function createArgumentsString(arity) { @@ -44222,17 +44222,17 @@ var require_depd = __commonJS({ } function getStack() { var limit = Error.stackTraceLimit; - var obj = {}; + var obj2 = {}; var prep = Error.prepareStackTrace; Error.prepareStackTrace = prepareObjectStackTrace; Error.stackTraceLimit = Math.max(10, limit); - Error.captureStackTrace(obj); - var stack = obj.stack.slice(1); + Error.captureStackTrace(obj2); + var stack = obj2.stack.slice(1); Error.prepareStackTrace = prep; Error.stackTraceLimit = limit; return stack; } - function prepareObjectStackTrace(obj, stack) { + function prepareObjectStackTrace(obj2, stack) { return stack; } function wrapfunction(fn, message) { @@ -44253,11 +44253,11 @@ var require_depd = __commonJS({ )(fn, log, this, message, site); return deprecatedfn; } - function wrapproperty(obj, prop, message) { - if (!obj || typeof obj !== "object" && typeof obj !== "function") { + function wrapproperty(obj2, prop, message) { + if (!obj2 || typeof obj2 !== "object" && typeof obj2 !== "function") { throw new TypeError("argument obj must be object"); } - var descriptor = Object.getOwnPropertyDescriptor(obj, prop); + var descriptor = Object.getOwnPropertyDescriptor(obj2, prop); if (!descriptor) { throw new TypeError("must call property on owner object"); } @@ -44269,7 +44269,7 @@ var require_depd = __commonJS({ var site = callSiteLocation(stack[1]); site.name = prop; if ("value" in descriptor) { - descriptor = convertDataDescriptorToAccessor(obj, prop, message); + descriptor = convertDataDescriptorToAccessor(obj2, prop, message); } var get = descriptor.get; var set = descriptor.set; @@ -44285,7 +44285,7 @@ var require_depd = __commonJS({ return set.apply(this, arguments); }; } - Object.defineProperty(obj, prop, descriptor); + Object.defineProperty(obj2, prop, descriptor); } function DeprecationError(namespace, message, stack) { var error = new Error(); @@ -44335,7 +44335,7 @@ var require_bytes = __commonJS({ "use strict"; module2.exports = bytes; module2.exports.format = format; - module2.exports.parse = parse; + module2.exports.parse = parse2; var formatThousandsRegExp = /\B(?=(\d{3})+(?!\d))/g; var formatDecimalsRegExp = /(?:\.0*|(\.[^0]+)0+)$/; var map = { @@ -44349,7 +44349,7 @@ var require_bytes = __commonJS({ var parseRegExp = /^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i; function bytes(value, options) { if (typeof value === "string") { - return parse(value); + return parse2(value); } if (typeof value === "number") { return format(value, options); @@ -44393,7 +44393,7 @@ var require_bytes = __commonJS({ } return str + unitSeparator + unit; } - function parse(val) { + function parse2(val) { if (typeof val === "number" && !isNaN(val)) { return val; } @@ -44429,13 +44429,13 @@ var require_content_type = __commonJS({ var QUOTE_REGEXP = /([\\"])/g; var TYPE_REGEXP = /^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/; exports2.format = format; - exports2.parse = parse; - function format(obj) { - if (!obj || typeof obj !== "object") { + exports2.parse = parse2; + function format(obj2) { + if (!obj2 || typeof obj2 !== "object") { throw new TypeError("argument obj is required"); } - var parameters = obj.parameters; - var type = obj.type; + var parameters = obj2.parameters; + var type = obj2.type; if (!type || !TYPE_REGEXP.test(type)) { throw new TypeError("invalid type"); } @@ -44453,7 +44453,7 @@ var require_content_type = __commonJS({ } return string; } - function parse(string) { + function parse2(string) { if (!string) { throw new TypeError("argument string is required"); } @@ -44466,7 +44466,7 @@ var require_content_type = __commonJS({ if (!TYPE_REGEXP.test(type)) { throw new TypeError("invalid media type"); } - var obj = new ContentType(type.toLowerCase()); + var obj2 = new ContentType(type.toLowerCase()); if (index !== -1) { var key; var match; @@ -44485,20 +44485,20 @@ var require_content_type = __commonJS({ value = value.replace(QESC_REGEXP, "$1"); } } - obj.parameters[key] = value; + obj2.parameters[key] = value; } if (index !== header.length) { throw new TypeError("invalid parameter format"); } } - return obj; + return obj2; } - function getcontenttype(obj) { + function getcontenttype(obj2) { var header; - if (typeof obj.getHeader === "function") { - header = obj.getHeader("content-type"); - } else if (typeof obj.headers === "object") { - header = obj.headers && obj.headers["content-type"]; + if (typeof obj2.getHeader === "function") { + header = obj2.getHeader("content-type"); + } else if (typeof obj2.headers === "object") { + header = obj2.headers && obj2.headers["content-type"]; } if (typeof header !== "string") { throw new TypeError("content-type header is missing from object"); @@ -44527,17 +44527,17 @@ var require_setprototypeof = __commonJS({ "../../node_modules/.pnpm/setprototypeof@1.2.0/node_modules/setprototypeof/index.js"(exports2, module2) { "use strict"; module2.exports = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties); - function setProtoOf(obj, proto) { - obj.__proto__ = proto; - return obj; + function setProtoOf(obj2, proto) { + obj2.__proto__ = proto; + return obj2; } - function mixinProperties(obj, proto) { + function mixinProperties(obj2, proto) { for (var prop in proto) { - if (!Object.prototype.hasOwnProperty.call(obj, prop)) { - obj[prop] = proto[prop]; + if (!Object.prototype.hasOwnProperty.call(obj2, prop)) { + obj2[prop] = proto[prop]; } } - return obj; + return obj2; } } }); @@ -44688,7 +44688,7 @@ var require_statuses = __commonJS({ var require_inherits_browser = __commonJS({ "../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"(exports2, module2) { if (typeof Object.create === "function") { - module2.exports = function inherits(ctor, superCtor) { + module2.exports = function inherits2(ctor, superCtor) { if (superCtor) { ctor.super_ = superCtor; ctor.prototype = Object.create(superCtor.prototype, { @@ -44702,7 +44702,7 @@ var require_inherits_browser = __commonJS({ } }; } else { - module2.exports = function inherits(ctor, superCtor) { + module2.exports = function inherits2(ctor, superCtor) { if (superCtor) { ctor.super_ = superCtor; var TempCtor = function() { @@ -44750,7 +44750,7 @@ var require_http_errors = __commonJS({ var deprecate = require_depd()("http-errors"); var setPrototypeOf = require_setprototypeof(); var statuses = require_statuses(); - var inherits = require_inherits(); + var inherits2 = require_inherits(); var toIdentifier = require_toidentifier(); module2.exports = createError; module2.exports.HttpError = createHttpErrorConstructor(); @@ -44806,7 +44806,7 @@ var require_http_errors = __commonJS({ function HttpError() { throw new TypeError("cannot construct abstract class"); } - inherits(HttpError, Error); + inherits2(HttpError, Error); return HttpError; } function createClientErrorConstructor(HttpError, name, code) { @@ -44830,7 +44830,7 @@ var require_http_errors = __commonJS({ }); return err; } - inherits(ClientError, HttpError); + inherits2(ClientError, HttpError); nameFunc(ClientError, className); ClientError.prototype.status = code; ClientError.prototype.statusCode = code; @@ -44869,7 +44869,7 @@ var require_http_errors = __commonJS({ }); return err; } - inherits(ServerError, HttpError); + inherits2(ServerError, HttpError); nameFunc(ServerError, className); ServerError.prototype.status = code; ServerError.prototype.statusCode = code; @@ -44919,7 +44919,7 @@ var require_ms = __commonJS({ options = options || {}; var type = typeof val; if (type === "string" && val.length > 0) { - return parse(val); + return parse2(val); } else if (type === "number" && isNaN(val) === false) { return options.long ? fmtLong(val) : fmtShort(val); } @@ -44927,7 +44927,7 @@ var require_ms = __commonJS({ "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) ); }; - function parse(str) { + function parse2(str) { str = String(str); if (str.length > 100) { return; @@ -45215,8 +45215,8 @@ var require_node = __commonJS({ exports2.colors = [6, 2, 3, 4, 5, 1]; exports2.inspectOpts = Object.keys(process.env).filter(function(key) { return /^debug_/i.test(key); - }).reduce(function(obj, key) { - var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function(_, k) { + }).reduce(function(obj2, key) { + var prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, function(_2, k) { return k.toUpperCase(); }); var val = process.env[key]; @@ -45224,8 +45224,8 @@ var require_node = __commonJS({ else if (/^(no|off|false|disabled)$/i.test(val)) val = false; else if (val === "null") val = null; else val = Number(val); - obj[prop] = val; - return obj; + obj2[prop] = val; + return obj2; }, {}); var fd = parseInt(process.env.DEBUG_FD, 10) || 2; if (1 !== fd && 2 !== fd) { @@ -46746,10 +46746,10 @@ var require_dbcs_codec = __commonJS({ for (var k = 1; k < chunk.length; k++) { var part = chunk[k]; if (typeof part === "string") { - for (var l = 0; l < part.length; ) { - var code = part.charCodeAt(l++); + for (var l2 = 0; l2 < part.length; ) { + var code = part.charCodeAt(l2++); if (55296 <= code && code < 56320) { - var codeTrail = part.charCodeAt(l++); + var codeTrail = part.charCodeAt(l2++); if (56320 <= codeTrail && codeTrail < 57344) writeTable[curAddr++] = 65536 + (code - 55296) * 1024 + (codeTrail - 56320); else @@ -46758,7 +46758,7 @@ var require_dbcs_codec = __commonJS({ var len = 4095 - code + 2; var seq = []; for (var m = 0; m < len; m++) - seq.push(part.charCodeAt(l++)); + seq.push(part.charCodeAt(l2++)); writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length; this.decodeTableSeq.push(seq); } else @@ -46766,7 +46766,7 @@ var require_dbcs_codec = __commonJS({ } } else if (typeof part === "number") { var charCode = writeTable[curAddr - 1] + 1; - for (var l = 0; l < part; l++) + for (var l2 = 0; l2 < part; l2++) writeTable[curAddr++] = charCode++; } else throw new Error("Incorrect type '" + typeof part + "' given in " + this.encodingName + " at chunk " + chunk[0]); @@ -47004,30 +47004,30 @@ var require_dbcs_codec = __commonJS({ return newBuf.slice(0, j).toString("ucs2"); }; DBCSDecoder.prototype.end = function() { - var ret = ""; + var ret2 = ""; while (this.prevBuf.length > 0) { - ret += this.defaultCharUnicode; + ret2 += this.defaultCharUnicode; var buf = this.prevBuf.slice(1); this.prevBuf = Buffer2.alloc(0); this.nodeIdx = 0; if (buf.length > 0) - ret += this.write(buf); + ret2 += this.write(buf); } this.nodeIdx = 0; - return ret; + return ret2; }; function findIdx(table, val) { if (table[0] > val) return -1; - var l = 0, r = table.length; - while (l < r - 1) { - var mid = l + Math.floor((r - l + 1) / 2); + var l2 = 0, r = table.length; + while (l2 < r - 1) { + var mid = l2 + Math.floor((r - l2 + 1) / 2); if (table[mid] <= val) - l = mid; + l2 = mid; else r = mid; } - return l; + return l2; } } }); @@ -49245,7 +49245,7 @@ var require_read = __commonJS({ var unpipe = require_unpipe(); var zlib = require("zlib"); module2.exports = read; - function read(req, res, next, parse, debug, options) { + function read(req, res, next, parse2, debug, options) { var length; var opts = options; var stream; @@ -49304,7 +49304,7 @@ var require_read = __commonJS({ try { debug("parse body"); str = typeof body !== "string" && encoding !== null ? iconv.decode(body, encoding) : body; - req.body = parse(str); + req.body = parse2(str); } catch (err) { next(createError(400, err, { body: str, @@ -49372,15 +49372,15 @@ var require_media_typer = __commonJS({ var typeNameRegExp = /^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}$/; var typeRegExp = /^ *([A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126})\/([A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}) *$/; exports2.format = format; - exports2.parse = parse; - function format(obj) { - if (!obj || typeof obj !== "object") { + exports2.parse = parse2; + function format(obj2) { + if (!obj2 || typeof obj2 !== "object") { throw new TypeError("argument obj is required"); } - var parameters = obj.parameters; - var subtype = obj.subtype; - var suffix = obj.suffix; - var type = obj.type; + var parameters = obj2.parameters; + var subtype = obj2.subtype; + var suffix = obj2.suffix; + var type = obj2.type; if (!type || !typeNameRegExp.test(type)) { throw new TypeError("invalid type"); } @@ -49407,7 +49407,7 @@ var require_media_typer = __commonJS({ } return string; } - function parse(string) { + function parse2(string) { if (!string) { throw new TypeError("argument string is required"); } @@ -49421,7 +49421,7 @@ var require_media_typer = __commonJS({ var type = index !== -1 ? string.substr(0, index) : string; var key; var match; - var obj = splitType(type); + var obj2 = splitType(type); var params = {}; var value; paramRegExp.lastIndex = index; @@ -49440,15 +49440,15 @@ var require_media_typer = __commonJS({ if (index !== -1 && index !== string.length) { throw new TypeError("invalid parameter format"); } - obj.parameters = params; - return obj; + obj2.parameters = params; + return obj2; } - function getcontenttype(obj) { - if (typeof obj.getHeader === "function") { - return obj.getHeader("content-type"); + function getcontenttype(obj2) { + if (typeof obj2.getHeader === "function") { + return obj2.getHeader("content-type"); } - if (typeof obj.headers === "object") { - return obj.headers && obj.headers["content-type"]; + if (typeof obj2.headers === "object") { + return obj2.headers && obj2.headers["content-type"]; } } function qstring(val) { @@ -49474,12 +49474,12 @@ var require_media_typer = __commonJS({ suffix = subtype.substr(index + 1); subtype = subtype.substr(0, index); } - var obj = { + var obj2 = { type, subtype, suffix }; - return obj; + return obj2; } } }); @@ -58237,7 +58237,7 @@ var require_json = __commonJS({ throw new TypeError("option verify must be function"); } var shouldParse = typeof type !== "function" ? typeChecker(type) : type; - function parse(body) { + function parse2(body) { if (body.length === 0) { return {}; } @@ -58285,7 +58285,7 @@ var require_json = __commonJS({ })); return; } - read(req, res, next, parse, debug, { + read(req, res, next, parse2, debug, { encoding: charset, inflate, limit, @@ -58325,7 +58325,7 @@ var require_json = __commonJS({ return void 0; } } - function normalizeJsonSyntaxError(error, obj) { + function normalizeJsonSyntaxError(error, obj2) { var keys = Object.getOwnPropertyNames(error); for (var i = 0; i < keys.length; i++) { var key = keys[i]; @@ -58333,8 +58333,8 @@ var require_json = __commonJS({ delete error[key]; } } - error.stack = obj.stack.replace(error.message, obj.message); - error.message = obj.message; + error.stack = obj2.stack.replace(error.message, obj2.message); + error.message = obj2.message; return error; } function typeChecker(type) { @@ -58364,7 +58364,7 @@ var require_raw = __commonJS({ throw new TypeError("option verify must be function"); } var shouldParse = typeof type !== "function" ? typeChecker(type) : type; - function parse(buf) { + function parse2(buf) { return buf; } return function rawParser(req, res, next) { @@ -58385,7 +58385,7 @@ var require_raw = __commonJS({ next(); return; } - read(req, res, next, parse, debug, { + read(req, res, next, parse2, debug, { encoding: null, inflate, limit, @@ -58422,7 +58422,7 @@ var require_text = __commonJS({ throw new TypeError("option verify must be function"); } var shouldParse = typeof type !== "function" ? typeChecker(type) : type; - function parse(buf) { + function parse2(buf) { return buf; } return function textParser(req, res, next) { @@ -58444,7 +58444,7 @@ var require_text = __commonJS({ return; } var charset = getCharset(req) || defaultCharset; - read(req, res, next, parse, debug, { + read(req, res, next, parse2, debug, { encoding: charset, inflate, limit, @@ -58549,7 +58549,7 @@ var require_object_inspect = __commonJS({ "double": /(["\\])/g, single: /(['\\])/g }; - module2.exports = function inspect_(obj, options, depth, seen) { + module2.exports = function inspect_(obj2, options, depth, seen) { var opts = options || {}; if (has(opts, "quoteStyle") && !has(quotes, opts.quoteStyle)) { throw new TypeError('option "quoteStyle" must be "single" or "double"'); @@ -58568,40 +58568,40 @@ var require_object_inspect = __commonJS({ throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`'); } var numericSeparator = opts.numericSeparator; - if (typeof obj === "undefined") { + if (typeof obj2 === "undefined") { return "undefined"; } - if (obj === null) { + if (obj2 === null) { return "null"; } - if (typeof obj === "boolean") { - return obj ? "true" : "false"; + if (typeof obj2 === "boolean") { + return obj2 ? "true" : "false"; } - if (typeof obj === "string") { - return inspectString(obj, opts); + if (typeof obj2 === "string") { + return inspectString(obj2, opts); } - if (typeof obj === "number") { - if (obj === 0) { - return Infinity / obj > 0 ? "0" : "-0"; + if (typeof obj2 === "number") { + if (obj2 === 0) { + return Infinity / obj2 > 0 ? "0" : "-0"; } - var str = String(obj); - return numericSeparator ? addNumericSeparator(obj, str) : str; + var str = String(obj2); + return numericSeparator ? addNumericSeparator(obj2, str) : str; } - if (typeof obj === "bigint") { - var bigIntStr = String(obj) + "n"; - return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr; + if (typeof obj2 === "bigint") { + var bigIntStr = String(obj2) + "n"; + return numericSeparator ? addNumericSeparator(obj2, bigIntStr) : bigIntStr; } var maxDepth = typeof opts.depth === "undefined" ? 5 : opts.depth; if (typeof depth === "undefined") { depth = 0; } - if (depth >= maxDepth && maxDepth > 0 && typeof obj === "object") { - return isArray(obj) ? "[Array]" : "[Object]"; + if (depth >= maxDepth && maxDepth > 0 && typeof obj2 === "object") { + return isArray(obj2) ? "[Array]" : "[Object]"; } var indent = getIndent(opts, depth); if (typeof seen === "undefined") { seen = []; - } else if (indexOf(seen, obj) >= 0) { + } else if (indexOf(seen, obj2) >= 0) { return "[Circular]"; } function inspect(value, from, noIndent) { @@ -58620,106 +58620,106 @@ var require_object_inspect = __commonJS({ } return inspect_(value, opts, depth + 1, seen); } - if (typeof obj === "function" && !isRegExp(obj)) { - var name = nameOf(obj); - var keys = arrObjKeys(obj, inspect); + if (typeof obj2 === "function" && !isRegExp(obj2)) { + var name = nameOf(obj2); + var keys = arrObjKeys(obj2, inspect); return "[Function" + (name ? ": " + name : " (anonymous)") + "]" + (keys.length > 0 ? " { " + $join.call(keys, ", ") + " }" : ""); } - if (isSymbol(obj)) { - var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, "$1") : symToString.call(obj); - return typeof obj === "object" && !hasShammedSymbols ? markBoxed(symString) : symString; + if (isSymbol(obj2)) { + var symString = hasShammedSymbols ? $replace.call(String(obj2), /^(Symbol\(.*\))_[^)]*$/, "$1") : symToString.call(obj2); + return typeof obj2 === "object" && !hasShammedSymbols ? markBoxed(symString) : symString; } - if (isElement(obj)) { - var s = "<" + $toLowerCase.call(String(obj.nodeName)); - var attrs = obj.attributes || []; + if (isElement(obj2)) { + var s = "<" + $toLowerCase.call(String(obj2.nodeName)); + var attrs = obj2.attributes || []; for (var i = 0; i < attrs.length; i++) { s += " " + attrs[i].name + "=" + wrapQuotes(quote(attrs[i].value), "double", opts); } s += ">"; - if (obj.childNodes && obj.childNodes.length) { + if (obj2.childNodes && obj2.childNodes.length) { s += "..."; } - s += ""; + s += ""; return s; } - if (isArray(obj)) { - if (obj.length === 0) { + if (isArray(obj2)) { + if (obj2.length === 0) { return "[]"; } - var xs = arrObjKeys(obj, inspect); + var xs = arrObjKeys(obj2, inspect); if (indent && !singleLineValues(xs)) { return "[" + indentedJoin(xs, indent) + "]"; } return "[ " + $join.call(xs, ", ") + " ]"; } - if (isError(obj)) { - var parts = arrObjKeys(obj, inspect); - if (!("cause" in Error.prototype) && "cause" in obj && !isEnumerable.call(obj, "cause")) { - return "{ [" + String(obj) + "] " + $join.call($concat.call("[cause]: " + inspect(obj.cause), parts), ", ") + " }"; + if (isError2(obj2)) { + var parts = arrObjKeys(obj2, inspect); + if (!("cause" in Error.prototype) && "cause" in obj2 && !isEnumerable.call(obj2, "cause")) { + return "{ [" + String(obj2) + "] " + $join.call($concat.call("[cause]: " + inspect(obj2.cause), parts), ", ") + " }"; } if (parts.length === 0) { - return "[" + String(obj) + "]"; + return "[" + String(obj2) + "]"; } - return "{ [" + String(obj) + "] " + $join.call(parts, ", ") + " }"; + return "{ [" + String(obj2) + "] " + $join.call(parts, ", ") + " }"; } - if (typeof obj === "object" && customInspect) { - if (inspectSymbol && typeof obj[inspectSymbol] === "function" && utilInspect) { - return utilInspect(obj, { depth: maxDepth - depth }); - } else if (customInspect !== "symbol" && typeof obj.inspect === "function") { - return obj.inspect(); + if (typeof obj2 === "object" && customInspect) { + if (inspectSymbol && typeof obj2[inspectSymbol] === "function" && utilInspect) { + return utilInspect(obj2, { depth: maxDepth - depth }); + } else if (customInspect !== "symbol" && typeof obj2.inspect === "function") { + return obj2.inspect(); } } - if (isMap(obj)) { + if (isMap(obj2)) { var mapParts = []; if (mapForEach) { - mapForEach.call(obj, function(value, key) { - mapParts.push(inspect(key, obj, true) + " => " + inspect(value, obj)); + mapForEach.call(obj2, function(value, key) { + mapParts.push(inspect(key, obj2, true) + " => " + inspect(value, obj2)); }); } - return collectionOf("Map", mapSize.call(obj), mapParts, indent); + return collectionOf("Map", mapSize.call(obj2), mapParts, indent); } - if (isSet(obj)) { + if (isSet(obj2)) { var setParts = []; if (setForEach) { - setForEach.call(obj, function(value) { - setParts.push(inspect(value, obj)); + setForEach.call(obj2, function(value) { + setParts.push(inspect(value, obj2)); }); } - return collectionOf("Set", setSize.call(obj), setParts, indent); + return collectionOf("Set", setSize.call(obj2), setParts, indent); } - if (isWeakMap(obj)) { + if (isWeakMap(obj2)) { return weakCollectionOf("WeakMap"); } - if (isWeakSet(obj)) { + if (isWeakSet(obj2)) { return weakCollectionOf("WeakSet"); } - if (isWeakRef(obj)) { + if (isWeakRef(obj2)) { return weakCollectionOf("WeakRef"); } - if (isNumber(obj)) { - return markBoxed(inspect(Number(obj))); + if (isNumber(obj2)) { + return markBoxed(inspect(Number(obj2))); } - if (isBigInt(obj)) { - return markBoxed(inspect(bigIntValueOf.call(obj))); + if (isBigInt(obj2)) { + return markBoxed(inspect(bigIntValueOf.call(obj2))); } - if (isBoolean(obj)) { - return markBoxed(booleanValueOf.call(obj)); + if (isBoolean(obj2)) { + return markBoxed(booleanValueOf.call(obj2)); } - if (isString(obj)) { - return markBoxed(inspect(String(obj))); + if (isString(obj2)) { + return markBoxed(inspect(String(obj2))); } - if (typeof window !== "undefined" && obj === window) { + if (typeof window !== "undefined" && obj2 === window) { return "{ [object Window] }"; } - if (typeof globalThis !== "undefined" && obj === globalThis || typeof global !== "undefined" && obj === global) { + if (typeof globalThis !== "undefined" && obj2 === globalThis || typeof global !== "undefined" && obj2 === global) { return "{ [object globalThis] }"; } - if (!isDate(obj) && !isRegExp(obj)) { - var ys = arrObjKeys(obj, inspect); - var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object; - var protoTag = obj instanceof Object ? "" : "null prototype"; - var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : ""; - var constructorTag = isPlainObject || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : ""; + if (!isDate(obj2) && !isRegExp(obj2)) { + var ys = arrObjKeys(obj2, inspect); + var isPlainObject = gPO ? gPO(obj2) === Object.prototype : obj2 instanceof Object || obj2.constructor === Object; + var protoTag = obj2 instanceof Object ? "" : "null prototype"; + var stringTag = !isPlainObject && toStringTag && Object(obj2) === obj2 && toStringTag in obj2 ? $slice.call(toStr(obj2), 8, -1) : protoTag ? "Object" : ""; + var constructorTag = isPlainObject || typeof obj2.constructor !== "function" ? "" : obj2.constructor.name ? obj2.constructor.name + " " : ""; var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat.call([], stringTag || [], protoTag || []), ": ") + "] " : ""); if (ys.length === 0) { return tag + "{}"; @@ -58729,7 +58729,7 @@ var require_object_inspect = __commonJS({ } return tag + "{ " + $join.call(ys, ", ") + " }"; } - return String(obj); + return String(obj2); }; function wrapQuotes(s, defaultStyle, opts) { var style = opts.quoteStyle || defaultStyle; @@ -58739,53 +58739,53 @@ var require_object_inspect = __commonJS({ function quote(s) { return $replace.call(String(s), /"/g, """); } - function canTrustToString(obj) { - return !toStringTag || !(typeof obj === "object" && (toStringTag in obj || typeof obj[toStringTag] !== "undefined")); + function canTrustToString(obj2) { + return !toStringTag || !(typeof obj2 === "object" && (toStringTag in obj2 || typeof obj2[toStringTag] !== "undefined")); } - function isArray(obj) { - return toStr(obj) === "[object Array]" && canTrustToString(obj); + function isArray(obj2) { + return toStr(obj2) === "[object Array]" && canTrustToString(obj2); } - function isDate(obj) { - return toStr(obj) === "[object Date]" && canTrustToString(obj); + function isDate(obj2) { + return toStr(obj2) === "[object Date]" && canTrustToString(obj2); } - function isRegExp(obj) { - return toStr(obj) === "[object RegExp]" && canTrustToString(obj); + function isRegExp(obj2) { + return toStr(obj2) === "[object RegExp]" && canTrustToString(obj2); } - function isError(obj) { - return toStr(obj) === "[object Error]" && canTrustToString(obj); + function isError2(obj2) { + return toStr(obj2) === "[object Error]" && canTrustToString(obj2); } - function isString(obj) { - return toStr(obj) === "[object String]" && canTrustToString(obj); + function isString(obj2) { + return toStr(obj2) === "[object String]" && canTrustToString(obj2); } - function isNumber(obj) { - return toStr(obj) === "[object Number]" && canTrustToString(obj); + function isNumber(obj2) { + return toStr(obj2) === "[object Number]" && canTrustToString(obj2); } - function isBoolean(obj) { - return toStr(obj) === "[object Boolean]" && canTrustToString(obj); + function isBoolean(obj2) { + return toStr(obj2) === "[object Boolean]" && canTrustToString(obj2); } - function isSymbol(obj) { + function isSymbol(obj2) { if (hasShammedSymbols) { - return obj && typeof obj === "object" && obj instanceof Symbol; + return obj2 && typeof obj2 === "object" && obj2 instanceof Symbol; } - if (typeof obj === "symbol") { + if (typeof obj2 === "symbol") { return true; } - if (!obj || typeof obj !== "object" || !symToString) { + if (!obj2 || typeof obj2 !== "object" || !symToString) { return false; } try { - symToString.call(obj); + symToString.call(obj2); return true; } catch (e) { } return false; } - function isBigInt(obj) { - if (!obj || typeof obj !== "object" || !bigIntValueOf) { + function isBigInt(obj2) { + if (!obj2 || typeof obj2 !== "object" || !bigIntValueOf) { return false; } try { - bigIntValueOf.call(obj); + bigIntValueOf.call(obj2); return true; } catch (e) { } @@ -58794,11 +58794,11 @@ var require_object_inspect = __commonJS({ var hasOwn = Object.prototype.hasOwnProperty || function(key) { return key in this; }; - function has(obj, key) { - return hasOwn.call(obj, key); + function has(obj2, key) { + return hasOwn.call(obj2, key); } - function toStr(obj) { - return objectToString.call(obj); + function toStr(obj2) { + return objectToString.call(obj2); } function nameOf(f) { if (f.name) { @@ -58814,7 +58814,7 @@ var require_object_inspect = __commonJS({ if (xs.indexOf) { return xs.indexOf(x); } - for (var i = 0, l = xs.length; i < l; i++) { + for (var i = 0, l2 = xs.length; i < l2; i++) { if (xs[i] === x) { return i; } @@ -58969,16 +58969,16 @@ var require_object_inspect = __commonJS({ var lineJoiner = "\n" + indent.prev + indent.base; return lineJoiner + $join.call(xs, "," + lineJoiner) + "\n" + indent.prev; } - function arrObjKeys(obj, inspect) { - var isArr = isArray(obj); + function arrObjKeys(obj2, inspect) { + var isArr = isArray(obj2); var xs = []; if (isArr) { - xs.length = obj.length; - for (var i = 0; i < obj.length; i++) { - xs[i] = has(obj, i) ? inspect(obj[i], obj) : ""; + xs.length = obj2.length; + for (var i = 0; i < obj2.length; i++) { + xs[i] = has(obj2, i) ? inspect(obj2[i], obj2) : ""; } } - var syms = typeof gOPS === "function" ? gOPS(obj) : []; + var syms = typeof gOPS === "function" ? gOPS(obj2) : []; var symMap; if (hasShammedSymbols) { symMap = {}; @@ -58986,25 +58986,25 @@ var require_object_inspect = __commonJS({ symMap["$" + syms[k]] = syms[k]; } } - for (var key in obj) { - if (!has(obj, key)) { + for (var key in obj2) { + if (!has(obj2, key)) { continue; } - if (isArr && String(Number(key)) === key && key < obj.length) { + if (isArr && String(Number(key)) === key && key < obj2.length) { continue; } if (hasShammedSymbols && symMap["$" + key] instanceof Symbol) { continue; } else if ($test.call(/[^\w$]/, key)) { - xs.push(inspect(key, obj) + ": " + inspect(obj[key], obj)); + xs.push(inspect(key, obj2) + ": " + inspect(obj2[key], obj2)); } else { - xs.push(key + ": " + inspect(obj[key], obj)); + xs.push(key + ": " + inspect(obj2[key], obj2)); } } if (typeof gOPS === "function") { for (var j = 0; j < syms.length; j++) { - if (isEnumerable.call(obj, syms[j])) { - xs.push("[" + inspect(syms[j]) + "]: " + inspect(obj[syms[j]], obj)); + if (isEnumerable.call(obj2, syms[j])) { + xs.push("[" + inspect(syms[j]) + "]: " + inspect(obj2[syms[j]], obj2)); } } } @@ -59285,7 +59285,7 @@ var require_shams = __commonJS({ if (typeof Symbol.iterator === "symbol") { return true; } - var obj = {}; + var obj2 = {}; var sym = Symbol("test"); var symObj = Object(sym); if (typeof sym === "string") { @@ -59298,27 +59298,27 @@ var require_shams = __commonJS({ return false; } var symVal = 42; - obj[sym] = symVal; - for (var _ in obj) { + obj2[sym] = symVal; + for (var _2 in obj2) { return false; } - if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) { + if (typeof Object.keys === "function" && Object.keys(obj2).length !== 0) { return false; } - if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) { + if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj2).length !== 0) { return false; } - var syms = Object.getOwnPropertySymbols(obj); + var syms = Object.getOwnPropertySymbols(obj2); if (syms.length !== 1 || syms[0] !== sym) { return false; } - if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { + if (!Object.prototype.propertyIsEnumerable.call(obj2, sym)) { return false; } if (typeof Object.getOwnPropertyDescriptor === "function") { var descriptor = ( /** @type {PropertyDescriptor} */ - Object.getOwnPropertyDescriptor(obj, sym) + Object.getOwnPropertyDescriptor(obj2, sym) ); if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; @@ -60128,18 +60128,18 @@ var require_utils9 = __commonJS({ var has = Object.prototype.hasOwnProperty; var isArray = Array.isArray; var overflowChannel = getSideChannel(); - var markOverflow = function markOverflow2(obj, maxIndex) { - overflowChannel.set(obj, maxIndex); - return obj; + var markOverflow = function markOverflow2(obj2, maxIndex) { + overflowChannel.set(obj2, maxIndex); + return obj2; }; - var isOverflow = function isOverflow2(obj) { - return overflowChannel.has(obj); + var isOverflow = function isOverflow2(obj2) { + return overflowChannel.has(obj2); }; - var getMaxIndex = function getMaxIndex2(obj) { - return overflowChannel.get(obj); + var getMaxIndex = function getMaxIndex2(obj2) { + return overflowChannel.get(obj2); }; - var setMaxIndex = function setMaxIndex2(obj, maxIndex) { - overflowChannel.set(obj, maxIndex); + var setMaxIndex = function setMaxIndex2(obj2, maxIndex) { + overflowChannel.set(obj2, maxIndex); }; var hexTable = (function() { var array = []; @@ -60151,12 +60151,12 @@ var require_utils9 = __commonJS({ var compactQueue = function compactQueue2(queue) { while (queue.length > 1) { var item = queue.pop(); - var obj = item.obj[item.prop]; - if (isArray(obj)) { + var obj2 = item.obj[item.prop]; + if (isArray(obj2)) { var compacted = []; - for (var j = 0; j < obj.length; ++j) { - if (typeof obj[j] !== "undefined") { - compacted[compacted.length] = obj[j]; + for (var j = 0; j < obj2.length; ++j) { + if (typeof obj2[j] !== "undefined") { + compacted[compacted.length] = obj2[j]; } } item.obj[item.prop] = compacted; @@ -60164,13 +60164,13 @@ var require_utils9 = __commonJS({ } }; var arrayToObject = function arrayToObject2(source, options) { - var obj = options && options.plainObjects ? { __proto__: null } : {}; + var obj2 = options && options.plainObjects ? { __proto__: null } : {}; for (var i = 0; i < source.length; ++i) { if (typeof source[i] !== "undefined") { - obj[i] = source[i]; + obj2[i] = source[i]; } } - return obj; + return obj2; }; var merge = function merge2(target, source, options) { if (!source) { @@ -60318,13 +60318,13 @@ var require_utils9 = __commonJS({ var refs = []; for (var i = 0; i < queue.length; ++i) { var item = queue[i]; - var obj = item.obj[item.prop]; - var keys = Object.keys(obj); + var obj2 = item.obj[item.prop]; + var keys = Object.keys(obj2); for (var j = 0; j < keys.length; ++j) { var key = keys[j]; - var val = obj[key]; + var val = obj2[key]; if (typeof val === "object" && val !== null && refs.indexOf(val) === -1) { - queue[queue.length] = { obj, prop: key }; + queue[queue.length] = { obj: obj2, prop: key }; refs[refs.length] = val; } } @@ -60332,14 +60332,14 @@ var require_utils9 = __commonJS({ compactQueue(queue); return value; }; - var isRegExp = function isRegExp2(obj) { - return Object.prototype.toString.call(obj) === "[object RegExp]"; + var isRegExp = function isRegExp2(obj2) { + return Object.prototype.toString.call(obj2) === "[object RegExp]"; }; - var isBuffer = function isBuffer2(obj) { - if (!obj || typeof obj !== "object") { + var isBuffer = function isBuffer2(obj2) { + if (!obj2 || typeof obj2 !== "object") { return false; } - return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); + return !!(obj2.constructor && obj2.constructor.isBuffer && obj2.constructor.isBuffer(obj2)); }; var combine = function combine2(a, b, arrayLimit, plainObjects) { if (isOverflow(a)) { @@ -60436,8 +60436,8 @@ var require_stringify = __commonJS({ return typeof v === "string" || typeof v === "number" || typeof v === "boolean" || typeof v === "symbol" || typeof v === "bigint"; }; var sentinel = {}; - var stringify = function stringify2(object, prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel) { - var obj = object; + var stringify2 = function stringify3(object, prefix, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder, filter, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel) { + var obj2 = object; var tmpSc = sideChannel; var step = 0; var findFlag = false; @@ -60456,63 +60456,63 @@ var require_stringify = __commonJS({ } } if (typeof filter === "function") { - obj = filter(prefix, obj); - } else if (obj instanceof Date) { - obj = serializeDate(obj); - } else if (generateArrayPrefix === "comma" && isArray(obj)) { - obj = utils.maybeMap(obj, function(value2) { + obj2 = filter(prefix, obj2); + } else if (obj2 instanceof Date) { + obj2 = serializeDate(obj2); + } else if (generateArrayPrefix === "comma" && isArray(obj2)) { + obj2 = utils.maybeMap(obj2, function(value2) { if (value2 instanceof Date) { return serializeDate(value2); } return value2; }); } - if (obj === null) { + if (obj2 === null) { if (strictNullHandling) { return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, "key", format) : prefix; } - obj = ""; + obj2 = ""; } - if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) { + if (isNonNullishPrimitive(obj2) || utils.isBuffer(obj2)) { if (encoder) { var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, "key", format); - return [formatter(keyValue) + "=" + formatter(encoder(obj, defaults.encoder, charset, "value", format))]; + return [formatter(keyValue) + "=" + formatter(encoder(obj2, defaults.encoder, charset, "value", format))]; } - return [formatter(prefix) + "=" + formatter(String(obj))]; + return [formatter(prefix) + "=" + formatter(String(obj2))]; } var values = []; - if (typeof obj === "undefined") { + if (typeof obj2 === "undefined") { return values; } var objKeys; - if (generateArrayPrefix === "comma" && isArray(obj)) { + if (generateArrayPrefix === "comma" && isArray(obj2)) { if (encodeValuesOnly && encoder) { - obj = utils.maybeMap(obj, encoder); + obj2 = utils.maybeMap(obj2, encoder); } - objKeys = [{ value: obj.length > 0 ? obj.join(",") || null : void 0 }]; + objKeys = [{ value: obj2.length > 0 ? obj2.join(",") || null : void 0 }]; } else if (isArray(filter)) { objKeys = filter; } else { - var keys = Object.keys(obj); + var keys = Object.keys(obj2); objKeys = sort ? keys.sort(sort) : keys; } var encodedPrefix = encodeDotInKeys ? String(prefix).replace(/\./g, "%2E") : String(prefix); - var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? encodedPrefix + "[]" : encodedPrefix; - if (allowEmptyArrays && isArray(obj) && obj.length === 0) { + var adjustedPrefix = commaRoundTrip && isArray(obj2) && obj2.length === 1 ? encodedPrefix + "[]" : encodedPrefix; + if (allowEmptyArrays && isArray(obj2) && obj2.length === 0) { return adjustedPrefix + "[]"; } for (var j = 0; j < objKeys.length; ++j) { var key = objKeys[j]; - var value = typeof key === "object" && key && typeof key.value !== "undefined" ? key.value : obj[key]; + var value = typeof key === "object" && key && typeof key.value !== "undefined" ? key.value : obj2[key]; if (skipNulls && value === null) { continue; } var encodedKey = allowDots && encodeDotInKeys ? String(key).replace(/\./g, "%2E") : String(key); - var keyPrefix = isArray(obj) ? typeof generateArrayPrefix === "function" ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix : adjustedPrefix + (allowDots ? "." + encodedKey : "[" + encodedKey + "]"); + var keyPrefix = isArray(obj2) ? typeof generateArrayPrefix === "function" ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix : adjustedPrefix + (allowDots ? "." + encodedKey : "[" + encodedKey + "]"); sideChannel.set(object, step); var valueSideChannel = getSideChannel(); valueSideChannel.set(sentinel, sideChannel); - pushToArray(values, stringify2( + pushToArray(values, stringify3( value, keyPrefix, generateArrayPrefix, @@ -60521,7 +60521,7 @@ var require_stringify = __commonJS({ strictNullHandling, skipNulls, encodeDotInKeys, - generateArrayPrefix === "comma" && encodeValuesOnly && isArray(obj) ? null : encoder, + generateArrayPrefix === "comma" && encodeValuesOnly && isArray(obj2) ? null : encoder, filter, sort, allowDots, @@ -60599,25 +60599,25 @@ var require_stringify = __commonJS({ }; }; module2.exports = function(object, opts) { - var obj = object; + var obj2 = object; var options = normalizeStringifyOptions(opts); var objKeys; var filter; if (typeof options.filter === "function") { filter = options.filter; - obj = filter("", obj); + obj2 = filter("", obj2); } else if (isArray(options.filter)) { filter = options.filter; objKeys = filter; } var keys = []; - if (typeof obj !== "object" || obj === null) { + if (typeof obj2 !== "object" || obj2 === null) { return ""; } var generateArrayPrefix = arrayPrefixGenerators[options.arrayFormat]; var commaRoundTrip = generateArrayPrefix === "comma" && options.commaRoundTrip; if (!objKeys) { - objKeys = Object.keys(obj); + objKeys = Object.keys(obj2); } if (options.sort) { objKeys.sort(options.sort); @@ -60625,11 +60625,11 @@ var require_stringify = __commonJS({ var sideChannel = getSideChannel(); for (var i = 0; i < objKeys.length; ++i) { var key = objKeys[i]; - var value = obj[key]; + var value = obj2[key]; if (options.skipNulls && value === null) { continue; } - pushToArray(keys, stringify( + pushToArray(keys, stringify2( value, key, generateArrayPrefix, @@ -60711,7 +60711,7 @@ var require_parse2 = __commonJS({ var isoSentinel = "utf8=%26%2310003%3B"; var charsetSentinel = "utf8=%E2%9C%93"; var parseValues = function parseQueryStringValues(str, options) { - var obj = { __proto__: null }; + var obj2 = { __proto__: null }; var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, "") : str; cleanStr = cleanStr.replace(/%5B/gi, "[").replace(/%5D/gi, "]"); var limit = options.parameterLimit === Infinity ? void 0 : options.parameterLimit; @@ -60757,7 +60757,7 @@ var require_parse2 = __commonJS({ parseArrayValue( part.slice(pos + 1), options, - isArray(obj[key]) ? obj[key].length : 0 + isArray(obj2[key]) ? obj2[key].length : 0 ), function(encodedVal) { return options.decoder(encodedVal, defaults.decoder, charset, "value"); @@ -60778,20 +60778,20 @@ var require_parse2 = __commonJS({ val = utils.combine([], val, options.arrayLimit, options.plainObjects); } if (key !== null) { - var existing = has.call(obj, key); + var existing = has.call(obj2, key); if (existing && options.duplicates === "combine") { - obj[key] = utils.combine( - obj[key], + obj2[key] = utils.combine( + obj2[key], val, options.arrayLimit, options.plainObjects ); } else if (!existing || options.duplicates === "last") { - obj[key] = val; + obj2[key] = val; } } } - return obj; + return obj2; }; var parseObject = function(chain, val, options, valuesParsed) { var currentArrayLength = 0; @@ -60801,13 +60801,13 @@ var require_parse2 = __commonJS({ } var leaf = valuesParsed ? val : parseArrayValue(val, options, currentArrayLength); for (var i = chain.length - 1; i >= 0; --i) { - var obj; + var obj2; var root = chain[i]; if (root === "[]" && options.parseArrays) { if (utils.isOverflow(leaf)) { - obj = leaf; + obj2 = leaf; } else { - obj = options.allowEmptyArrays && (leaf === "" || options.strictNullHandling && leaf === null) ? [] : utils.combine( + obj2 = options.allowEmptyArrays && (leaf === "" || options.strictNullHandling && leaf === null) ? [] : utils.combine( [], leaf, options.arrayLimit, @@ -60815,26 +60815,26 @@ var require_parse2 = __commonJS({ ); } } else { - obj = options.plainObjects ? { __proto__: null } : {}; + obj2 = options.plainObjects ? { __proto__: null } : {}; var cleanRoot = root.charAt(0) === "[" && root.charAt(root.length - 1) === "]" ? root.slice(1, -1) : root; var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, ".") : cleanRoot; var index = parseInt(decodedRoot, 10); var isValidArrayIndex = !isNaN(index) && root !== decodedRoot && String(index) === decodedRoot && index >= 0 && options.parseArrays; if (!options.parseArrays && decodedRoot === "") { - obj = { 0: leaf }; + obj2 = { 0: leaf }; } else if (isValidArrayIndex && index < options.arrayLimit) { - obj = []; - obj[index] = leaf; + obj2 = []; + obj2[index] = leaf; } else if (isValidArrayIndex && options.throwOnLimitExceeded) { throw new RangeError("Array limit exceeded. Only " + options.arrayLimit + " element" + (options.arrayLimit === 1 ? "" : "s") + " allowed in an array."); } else if (isValidArrayIndex) { - obj[index] = leaf; - utils.markOverflow(obj, index); + obj2[index] = leaf; + utils.markOverflow(obj2, index); } else if (decodedRoot !== "__proto__") { - obj[decodedRoot] = leaf; + obj2[decodedRoot] = leaf; } } - leaf = obj; + leaf = obj2; } return leaf; }; @@ -60946,17 +60946,17 @@ var require_parse2 = __commonJS({ return options.plainObjects ? { __proto__: null } : {}; } var tempObj = typeof str === "string" ? parseValues(str, options) : str; - var obj = options.plainObjects ? { __proto__: null } : {}; + var obj2 = options.plainObjects ? { __proto__: null } : {}; var keys = Object.keys(tempObj); for (var i = 0; i < keys.length; ++i) { var key = keys[i]; var newObj = parseKeys(key, tempObj[key], options, typeof str === "string"); - obj = utils.merge(obj, newObj, options); + obj2 = utils.merge(obj2, newObj, options); } if (options.allowSparse === true) { - return obj; + return obj2; } - return utils.compact(obj); + return utils.compact(obj2); }; } }); @@ -60965,13 +60965,13 @@ var require_parse2 = __commonJS({ var require_lib3 = __commonJS({ "../../node_modules/.pnpm/qs@6.14.2/node_modules/qs/lib/index.js"(exports2, module2) { "use strict"; - var stringify = require_stringify(); - var parse = require_parse2(); + var stringify2 = require_stringify(); + var parse2 = require_parse2(); var formats = require_formats(); module2.exports = { formats, - parse, - stringify + parse: parse2, + stringify: stringify2 }; } }); @@ -61004,7 +61004,7 @@ var require_urlencoded = __commonJS({ } var queryparse = extended ? extendedparser(opts) : simpleparser(opts); var shouldParse = typeof type !== "function" ? typeChecker(type) : type; - function parse(body) { + function parse2(body) { return body.length ? queryparse(body) : {}; } return function urlencodedParser(req, res, next) { @@ -61034,7 +61034,7 @@ var require_urlencoded = __commonJS({ })); return; } - read(req, res, next, parse, debug, { + read(req, res, next, parse2, debug, { debug, encoding: charset, inflate, @@ -61046,7 +61046,7 @@ var require_urlencoded = __commonJS({ function extendedparser(options) { var parameterLimit = options.parameterLimit !== void 0 ? options.parameterLimit : 1e3; var depth = options.depth !== void 0 ? options.depth : 32; - var parse = parser("qs"); + var parse2 = parser("qs"); if (isNaN(parameterLimit) || parameterLimit < 1) { throw new TypeError("option parameterLimit must be a positive number"); } @@ -61067,7 +61067,7 @@ var require_urlencoded = __commonJS({ var arrayLimit = Math.max(100, paramCount); debug("parse extended urlencoding"); try { - return parse(body, { + return parse2(body, { allowPrototypes: true, arrayLimit, depth, @@ -61122,7 +61122,7 @@ var require_urlencoded = __commonJS({ } function simpleparser(options) { var parameterLimit = options.parameterLimit !== void 0 ? options.parameterLimit : 1e3; - var parse = parser("querystring"); + var parse2 = parser("querystring"); if (isNaN(parameterLimit) || parameterLimit < 1) { throw new TypeError("option parameterLimit must be a positive number"); } @@ -61138,7 +61138,7 @@ var require_urlencoded = __commonJS({ }); } debug("parse urlencoding"); - return parse(body, void 0, void 0, { maxKeys: parameterLimit }); + return parse2(body, void 0, void 0, { maxKeys: parameterLimit }); }; } function typeChecker(type) { @@ -61310,7 +61310,7 @@ var require_vary = __commonJS({ if (!field) { throw new TypeError("field argument is required"); } - var fields = !Array.isArray(field) ? parse(String(field)) : field; + var fields = !Array.isArray(field) ? parse2(String(field)) : field; for (var j = 0; j < fields.length; j++) { if (!FIELD_NAME_REGEXP.test(fields[j])) { throw new TypeError("field argument contains an invalid header name"); @@ -61320,7 +61320,7 @@ var require_vary = __commonJS({ return header; } var val = header; - var vals = parse(header.toLowerCase()); + var vals = parse2(header.toLowerCase()); if (fields.indexOf("*") !== -1 || vals.indexOf("*") !== -1) { return "*"; } @@ -61333,7 +61333,7 @@ var require_vary = __commonJS({ } return val; } - function parse(header) { + function parse2(header) { var end = 0; var list = []; var start = 0; @@ -61671,7 +61671,7 @@ var require_parseurl = __commonJS({ "../../node_modules/.pnpm/parseurl@1.3.3/node_modules/parseurl/index.js"(exports2, module2) { "use strict"; var url = require("url"); - var parse = url.parse; + var parse2 = url.parse; var Url = url.Url; module2.exports = parseurl; module2.exports.original = originalurl; @@ -61703,7 +61703,7 @@ var require_parseurl = __commonJS({ } function fastparse(str) { if (typeof str !== "string" || str.charCodeAt(0) !== 47) { - return parse(str); + return parse2(str); } var pathname = str; var query = null; @@ -61731,7 +61731,7 @@ var require_parseurl = __commonJS({ /* # */ case 160: case 65279: - return parse(str); + return parse2(str); } } var url2 = Url !== void 0 ? new Url() : {}; @@ -61774,7 +61774,7 @@ var require_finalhandler = __commonJS({ module2.exports = finalhandler; function finalhandler(req, res, options) { var opts = options || {}; - var env = opts.env || process.env.NODE_ENV || "development"; + var env2 = opts.env || process.env.NODE_ENV || "development"; var onerror = opts.onerror; return function(err) { var headers; @@ -61791,7 +61791,7 @@ var require_finalhandler = __commonJS({ } else { headers = getErrorHeaders(err); } - msg = getErrorMessage(err, status, env); + msg = getErrorMessage(err, status, env2); } else { status = 404; msg = "Cannot " + req.method + " " + encodeUrl(getResourceName(req)); @@ -61822,9 +61822,9 @@ var require_finalhandler = __commonJS({ } return headers; } - function getErrorMessage(err, status, env) { + function getErrorMessage(err, status, env2) { var msg; - if (env !== "production") { + if (env2 !== "production") { msg = err.stack; if (!msg && typeof err.toString === "function") { msg = err.toString(); @@ -62348,14 +62348,14 @@ var require_router = __commonJS({ } var params = this._params; var len = params.length; - var ret; + var ret2; if (name[0] === ":") { deprecate("router.param(" + JSON.stringify(name) + ", fn): Use router.param(" + JSON.stringify(name.slice(1)) + ", fn) instead"); name = name.slice(1); } for (var i = 0; i < len; ++i) { - if (ret = params[i](name, fn)) { - fn = ret; + if (ret2 = params[i](name, fn)) { + fn = ret2; } } if ("function" !== typeof fn) { @@ -62619,12 +62619,12 @@ var require_router = __commonJS({ var fqdnIndex = url.slice(0, pathLength).indexOf("://"); return fqdnIndex !== -1 ? url.substring(0, url.indexOf("/", 3 + fqdnIndex)) : void 0; } - function gettype(obj) { - var type = typeof obj; + function gettype(obj2) { + var type = typeof obj2; if (type !== "object") { return type; } - return toString2.call(obj).replace(objectRegExp, "$1"); + return toString2.call(obj2).replace(objectRegExp, "$1"); } function matchLayer(layer, path) { try { @@ -62637,9 +62637,9 @@ var require_router = __commonJS({ if (typeof parent !== "object" || !parent) { return params; } - var obj = mixin({}, parent); + var obj2 = mixin({}, parent); if (!(0 in params) || !(0 in parent)) { - return mixin(obj, params); + return mixin(obj2, params); } var i = 0; var o = 0; @@ -62655,18 +62655,18 @@ var require_router = __commonJS({ delete params[i]; } } - return mixin(obj, params); + return mixin(obj2, params); } - function restore(fn, obj) { + function restore(fn, obj2) { var props = new Array(arguments.length - 2); var vals = new Array(arguments.length - 2); for (var i = 0; i < props.length; i++) { props[i] = arguments[i + 2]; - vals[i] = obj[props[i]]; + vals[i] = obj2[props[i]]; } return function() { for (var i2 = 0; i2 < props.length; i2++) { - obj[props[i2]] = vals[i2]; + obj2[props[i2]] = vals[i2]; } return fn.apply(this, arguments); }; @@ -62884,7 +62884,7 @@ var require_content_disposition = __commonJS({ "../../node_modules/.pnpm/content-disposition@0.5.4/node_modules/content-disposition/index.js"(exports2, module2) { "use strict"; module2.exports = contentDisposition; - module2.exports.parse = parse; + module2.exports.parse = parse2; var basename = require("path").basename; var Buffer2 = require_safe_buffer().Buffer; var ENCODE_URL_ATTR_CHAR_REGEXP = /[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g; @@ -62933,9 +62933,9 @@ var require_content_disposition = __commonJS({ } return params; } - function format(obj) { - var parameters = obj.parameters; - var type = obj.type; + function format(obj2) { + var parameters = obj2.parameters; + var type = obj2.type; if (!type || typeof type !== "string" || !TOKEN_REGEXP.test(type)) { throw new TypeError("invalid type"); } @@ -62975,7 +62975,7 @@ var require_content_disposition = __commonJS({ function getlatin1(val) { return String(val).replace(NON_LATIN1_REGEXP, "?"); } - function parse(string) { + function parse2(string) { if (!string || typeof string !== "string") { throw new TypeError("argument string is required"); } @@ -63047,14 +63047,14 @@ var require_etag = __commonJS({ "../../node_modules/.pnpm/etag@1.8.1/node_modules/etag/index.js"(exports2, module2) { "use strict"; module2.exports = etag; - var crypto2 = require("crypto"); + var crypto5 = require("crypto"); var Stats = require("fs").Stats; var toString2 = Object.prototype.toString; function entitytag(entity) { if (entity.length === 0) { return '"0-2jmj7l5rSw0yVb/vlWAYkK/YBwk"'; } - var hash = crypto2.createHash("sha1").update(entity, "utf8").digest("base64").substring(0, 27); + var hash = crypto5.createHash("sha1").update(entity, "utf8").digest("base64").substring(0, 27); var len = typeof entity === "string" ? Buffer.byteLength(entity, "utf8") : entity.length; return '"' + len.toString(16) + "-" + hash + '"'; } @@ -63070,11 +63070,11 @@ var require_etag = __commonJS({ var tag = isStats ? stattag(entity) : entitytag(entity); return weak ? "W/" + tag : tag; } - function isstats(obj) { - if (typeof Stats === "function" && obj instanceof Stats) { + function isstats(obj2) { + if (typeof Stats === "function" && obj2 instanceof Stats) { return true; } - return obj && typeof obj === "object" && "ctime" in obj && toString2.call(obj.ctime) === "[object Date]" && "mtime" in obj && toString2.call(obj.mtime) === "[object Date]" && "ino" in obj && typeof obj.ino === "number" && "size" in obj && typeof obj.size === "number"; + return obj2 && typeof obj2 === "object" && "ctime" in obj2 && toString2.call(obj2.ctime) === "[object Date]" && "mtime" in obj2 && toString2.call(obj2.mtime) === "[object Date]" && "ino" in obj2 && typeof obj2.ino === "number" && "size" in obj2 && typeof obj2.size === "number"; } function stattag(stat) { var mtime = stat.mtime.getTime().toString(16); @@ -63231,7 +63231,7 @@ var require_ms2 = __commonJS({ options = options || {}; var type = typeof val; if (type === "string" && val.length > 0) { - return parse(val); + return parse2(val); } else if (type === "number" && isFinite(val)) { return options.long ? fmtLong(val) : fmtShort(val); } @@ -63239,7 +63239,7 @@ var require_ms2 = __commonJS({ "val is not a non-empty string or a valid number. val=" + JSON.stringify(val) ); }; - function parse(str) { + function parse2(str) { str = String(str); if (str.length > 100) { return; @@ -63969,7 +63969,7 @@ var require_forwarded = __commonJS({ if (!req) { throw new TypeError("argument req is required"); } - var proxyAddrs = parse(req.headers["x-forwarded-for"] || ""); + var proxyAddrs = parse2(req.headers["x-forwarded-for"] || ""); var socketAddr = getSocketAddr(req); var addrs = [socketAddr].concat(proxyAddrs); return addrs; @@ -63977,7 +63977,7 @@ var require_forwarded = __commonJS({ function getSocketAddr(req) { return req.socket ? req.socket.remoteAddress : req.connection.remoteAddress; } - function parse(header) { + function parse2(header) { var end = header.length; var list = []; var start = header.length; @@ -64189,7 +64189,7 @@ var require_ipaddr = __commonJS({ }; ipaddr.IPv6 = (function() { function IPv6(parts, zoneId) { - var i, k, l, len, part, ref; + var i, k, l2, len, part, ref; if (parts.length === 16) { this.parts = []; for (i = k = 0; k <= 14; i = k += 2) { @@ -64201,8 +64201,8 @@ var require_ipaddr = __commonJS({ throw new Error("ipaddr: ipv6 part count should be 8 or 16"); } ref = this.parts; - for (l = 0, len = ref.length; l < len; l++) { - part = ref[l]; + for (l2 = 0, len = ref.length; l2 < len; l2++) { + part = ref[l2]; if (!(0 <= part && part <= 65535)) { throw new Error("ipaddr: ipv6 part should fit in 16 bits"); } @@ -64817,11 +64817,11 @@ var require_utils10 = __commonJS({ return ~type.indexOf("/") ? acceptParams(type) : { value: mime.lookup(type), params: {} }; }; exports2.normalizeTypes = function(types) { - var ret = []; + var ret2 = []; for (var i = 0; i < types.length; ++i) { - ret.push(exports2.normalizeType(types[i])); + ret2.push(exports2.normalizeType(types[i])); } - return ret; + return ret2; }; exports2.contentDisposition = deprecate.function( contentDisposition, @@ -64829,16 +64829,16 @@ var require_utils10 = __commonJS({ ); function acceptParams(str) { var parts = str.split(/ *; */); - var ret = { value: parts[0], quality: 1, params: {} }; + var ret2 = { value: parts[0], quality: 1, params: {} }; for (var i = 1; i < parts.length; ++i) { var pms = parts[i].split(/ *= */); if ("q" === pms[0]) { - ret.quality = parseFloat(pms[1]); + ret2.quality = parseFloat(pms[1]); } else { - ret.params[pms[0]] = pms[1]; + ret2.params[pms[0]] = pms[1]; } } - return ret; + return ret2; } exports2.compileETag = function(val) { var fn; @@ -64956,10 +64956,10 @@ var require_application = __commonJS({ this.defaultConfiguration(); }; app.defaultConfiguration = function defaultConfiguration() { - var env = process.env.NODE_ENV || "development"; + var env2 = process.env.NODE_ENV || "development"; this.enable("x-powered-by"); this.set("etag", "weak"); - this.set("env", env); + this.set("env", env2); this.set("query parser", "extended"); this.set("subdomain offset", 2); this.set("trust proxy", false); @@ -64967,7 +64967,7 @@ var require_application = __commonJS({ configurable: true, value: true }); - debug("booting in %s mode", env); + debug("booting in %s mode", env2); this.on("mount", function onmount(parent) { if (this.settings[trustProxyDefaultSymbol] === true && typeof parent.settings["trust proxy fn"] === "function") { delete this.settings["trust proxy"]; @@ -64984,7 +64984,7 @@ var require_application = __commonJS({ this.set("view", View); this.set("views", resolve("views")); this.set("jsonp callback name", "callback"); - if (env === "production") { + if (env2 === "production") { this.enable("view cache"); } Object.defineProperty(this, "router", { @@ -65790,7 +65790,7 @@ var require_request = __commonJS({ var http = require("http"); var fresh = require_fresh(); var parseRange = require_range_parser(); - var parse = require_parseurl(); + var parse2 = require_parseurl(); var proxyaddr = require_proxy_addr(); var req = Object.create(http.IncomingMessage.prototype); module2.exports = req; @@ -65895,7 +65895,7 @@ var require_request = __commonJS({ return subdomains2.slice(offset); }); defineGetter(req, "path", function path() { - return parse(this).pathname; + return parse2(this).pathname; }); defineGetter(req, "hostname", function hostname() { var trust = this.app.get("trust proxy fn"); @@ -65933,8 +65933,8 @@ var require_request = __commonJS({ var val = this.get("X-Requested-With") || ""; return val.toLowerCase() === "xmlhttprequest"; }); - function defineGetter(obj, name, getter) { - Object.defineProperty(obj, name, { + function defineGetter(obj2, name, getter) { + Object.defineProperty(obj2, name, { configurable: true, enumerable: true, get: getter @@ -65946,20 +65946,20 @@ var require_request = __commonJS({ // ../../node_modules/.pnpm/cookie-signature@1.0.7/node_modules/cookie-signature/index.js var require_cookie_signature = __commonJS({ "../../node_modules/.pnpm/cookie-signature@1.0.7/node_modules/cookie-signature/index.js"(exports2) { - var crypto2 = require("crypto"); + var crypto5 = require("crypto"); exports2.sign = function(val, secret) { if ("string" !== typeof val) throw new TypeError("Cookie value must be provided as a string."); if (null == secret) throw new TypeError("Secret key must be provided."); - return val + "." + crypto2.createHmac("sha256", secret).update(val).digest("base64").replace(/\=+$/, ""); + return val + "." + crypto5.createHmac("sha256", secret).update(val).digest("base64").replace(/\=+$/, ""); }; exports2.unsign = function(val, secret) { if ("string" !== typeof val) throw new TypeError("Signed cookie string must be provided."); if (null == secret) throw new TypeError("Secret key must be provided."); var str = val.slice(0, val.lastIndexOf(".")), mac = exports2.sign(str, secret); - return sha1(mac) == sha1(val) ? str : false; + return sha12(mac) == sha12(val) ? str : false; }; - function sha1(str) { - return crypto2.createHash("sha1").update(str).digest("hex"); + function sha12(str) { + return crypto5.createHash("sha1").update(str).digest("hex"); } } }); @@ -65968,7 +65968,7 @@ var require_cookie_signature = __commonJS({ var require_cookie = __commonJS({ "../../node_modules/.pnpm/cookie@0.7.2/node_modules/cookie/index.js"(exports2) { "use strict"; - exports2.parse = parse; + exports2.parse = parse2; exports2.serialize = serialize; var __toString = Object.prototype.toString; var __hasOwnProperty = Object.prototype.hasOwnProperty; @@ -65976,13 +65976,13 @@ var require_cookie = __commonJS({ var cookieValueRegExp = /^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/; var domainValueRegExp = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i; var pathValueRegExp = /^[\u0020-\u003A\u003D-\u007E]*$/; - function parse(str, opt) { + function parse2(str, opt) { if (typeof str !== "string") { throw new TypeError("argument str must be a string"); } - var obj = {}; + var obj2 = {}; var len = str.length; - if (len < 2) return obj; + if (len < 2) return obj2; var dec = opt && opt.decode || decode; var index = 0; var eqIdx = 0; @@ -66000,7 +66000,7 @@ var require_cookie = __commonJS({ var keyStartIdx = startIndex(str, index, eqIdx); var keyEndIdx = endIndex(str, eqIdx, keyStartIdx); var key = str.slice(keyStartIdx, keyEndIdx); - if (!__hasOwnProperty.call(obj, key)) { + if (!__hasOwnProperty.call(obj2, key)) { var valStartIdx = startIndex(str, eqIdx + 1, endIdx); var valEndIdx = endIndex(str, endIdx, valStartIdx); if (str.charCodeAt(valStartIdx) === 34 && str.charCodeAt(valEndIdx - 1) === 34) { @@ -66008,11 +66008,11 @@ var require_cookie = __commonJS({ valEndIdx--; } var val = str.slice(valStartIdx, valEndIdx); - obj[key] = tryDecode(val, dec); + obj2[key] = tryDecode(val, dec); } index = endIdx + 1; } while (index < len); - return obj; + return obj2; } function startIndex(str, index, max) { do { @@ -66265,8 +66265,8 @@ var require_response = __commonJS({ } return this; }; - res.json = function json(obj) { - var val = obj; + res.json = function json(obj2) { + var val = obj2; if (arguments.length === 2) { if (typeof arguments[1] === "number") { deprecate("res.json(obj, status): Use res.status(status).json(obj) instead"); @@ -66281,14 +66281,14 @@ var require_response = __commonJS({ var escape2 = app.get("json escape"); var replacer = app.get("json replacer"); var spaces = app.get("json spaces"); - var body = stringify(val, replacer, spaces, escape2); + var body = stringify2(val, replacer, spaces, escape2); if (!this.get("Content-Type")) { this.set("Content-Type", "application/json"); } return this.send(body); }; - res.jsonp = function jsonp(obj) { - var val = obj; + res.jsonp = function jsonp(obj2) { + var val = obj2; if (arguments.length === 2) { if (typeof arguments[1] === "number") { deprecate("res.jsonp(obj, status): Use res.status(status).jsonp(obj) instead"); @@ -66303,7 +66303,7 @@ var require_response = __commonJS({ var escape2 = app.get("json escape"); var replacer = app.get("json replacer"); var spaces = app.get("json spaces"); - var body = stringify(val, replacer, spaces, escape2); + var body = stringify2(val, replacer, spaces, escape2); var callback = this.req.query[app.get("jsonp callback name")]; if (!this.get("Content-Type")) { this.set("X-Content-Type-Options", "nosniff"); @@ -66420,19 +66420,19 @@ var require_response = __commonJS({ var ct = type.indexOf("/") === -1 ? mime.lookup(type) : type; return this.set("Content-Type", ct); }; - res.format = function(obj) { + res.format = function(obj2) { var req = this.req; var next = req.next; - var keys = Object.keys(obj).filter(function(v) { + var keys = Object.keys(obj2).filter(function(v) { return v !== "default"; }); var key = keys.length > 0 ? req.accepts(keys) : false; this.vary("Accept"); if (key) { this.set("Content-Type", normalizeType(key).value); - obj[key](req, this, next); - } else if (obj.default) { - obj.default(req, this, next); + obj2[key](req, this, next); + } else if (obj2.default) { + obj2.default(req, this, next); } else { next(createError(406, { types: normalizeTypes(keys).map(function(o) { @@ -66640,17 +66640,17 @@ var require_response = __commonJS({ onFinished(res2, onfinish); if (options.headers) { file2.on("headers", function headers(res3) { - var obj = options.headers; - var keys = Object.keys(obj); + var obj2 = options.headers; + var keys = Object.keys(obj2); for (var i = 0; i < keys.length; i++) { var k = keys[i]; - res3.setHeader(k, obj[k]); + res3.setHeader(k, obj2[k]); } }); } file2.pipe(res2); } - function stringify(value, replacer, spaces, escape2) { + function stringify2(value, replacer, spaces, escape2) { var json = replacer || spaces ? JSON.stringify(value, replacer, spaces) : JSON.stringify(value); if (escape2 && typeof json === "string") { json = json.replace(/[<>&]/g, function(c) { @@ -67051,14 +67051,14 @@ var require_express_adapter = __commonJS({ getType() { return "express"; } - applyVersionFilter(handler, version, versioningOptions) { + applyVersionFilter(handler, version2, versioningOptions) { const callNextHandler = (req, res, next) => { if (!next) { throw new common_12.InternalServerErrorException("HTTP adapter does not support filtering on version"); } return next(); }; - if (version === common_12.VERSION_NEUTRAL || // URL Versioning is done via the path, so the filter continues forward + if (version2 === common_12.VERSION_NEUTRAL || // URL Versioning is done via the path, so the filter continues forward versioningOptions.type === common_12.VersioningType.URI) { const handlerForNoVersioning = (req, res, next) => handler(req, res, next); return handlerForNoVersioning; @@ -67066,18 +67066,18 @@ var require_express_adapter = __commonJS({ if (versioningOptions.type === common_12.VersioningType.CUSTOM) { const handlerForCustomVersioning = (req, res, next) => { const extractedVersion = versioningOptions.extractor(req); - if (Array.isArray(version)) { - if (Array.isArray(extractedVersion) && version.filter((v) => extractedVersion.includes(v)).length) { + if (Array.isArray(version2)) { + if (Array.isArray(extractedVersion) && version2.filter((v) => extractedVersion.includes(v)).length) { return handler(req, res, next); } - if ((0, shared_utils_1.isString)(extractedVersion) && version.includes(extractedVersion)) { + if ((0, shared_utils_1.isString)(extractedVersion) && version2.includes(extractedVersion)) { return handler(req, res, next); } - } else if ((0, shared_utils_1.isString)(version)) { - if (Array.isArray(extractedVersion) && extractedVersion.includes(version)) { + } else if ((0, shared_utils_1.isString)(version2)) { + if (Array.isArray(extractedVersion) && extractedVersion.includes(version2)) { return handler(req, res, next); } - if ((0, shared_utils_1.isString)(extractedVersion) && version === extractedVersion) { + if ((0, shared_utils_1.isString)(extractedVersion) && version2 === extractedVersion) { return handler(req, res, next); } } @@ -67091,19 +67091,19 @@ var require_express_adapter = __commonJS({ const acceptHeaderValue = req.headers?.[MEDIA_TYPE_HEADER] || req.headers?.[MEDIA_TYPE_HEADER.toLowerCase()]; const acceptHeaderVersionParameter = acceptHeaderValue ? acceptHeaderValue.split(";")[1] : void 0; if ((0, shared_utils_1.isUndefined)(acceptHeaderVersionParameter)) { - if (Array.isArray(version)) { - if (version.includes(common_12.VERSION_NEUTRAL)) { + if (Array.isArray(version2)) { + if (version2.includes(common_12.VERSION_NEUTRAL)) { return handler(req, res, next); } } } else { const headerVersion = acceptHeaderVersionParameter.split(versioningOptions.key)[1]; - if (Array.isArray(version)) { - if (version.includes(headerVersion)) { + if (Array.isArray(version2)) { + if (version2.includes(headerVersion)) { return handler(req, res, next); } - } else if ((0, shared_utils_1.isString)(version)) { - if (version === headerVersion) { + } else if ((0, shared_utils_1.isString)(version2)) { + if (version2 === headerVersion) { return handler(req, res, next); } } @@ -67116,18 +67116,18 @@ var require_express_adapter = __commonJS({ const handlerForHeaderVersioning = (req, res, next) => { const customHeaderVersionParameter = req.headers?.[versioningOptions.header] || req.headers?.[versioningOptions.header.toLowerCase()]; if ((0, shared_utils_1.isUndefined)(customHeaderVersionParameter)) { - if (Array.isArray(version)) { - if (version.includes(common_12.VERSION_NEUTRAL)) { + if (Array.isArray(version2)) { + if (version2.includes(common_12.VERSION_NEUTRAL)) { return handler(req, res, next); } } } else { - if (Array.isArray(version)) { - if (version.includes(customHeaderVersionParameter)) { + if (Array.isArray(version2)) { + if (version2.includes(customHeaderVersionParameter)) { return handler(req, res, next); } - } else if ((0, shared_utils_1.isString)(version)) { - if (version === customHeaderVersionParameter) { + } else if ((0, shared_utils_1.isString)(version2)) { + if (version2 === customHeaderVersionParameter) { return handler(req, res, next); } } @@ -69612,14 +69612,14 @@ var require_multipart = __commonJS({ retrydata: while (data) { if (this._hparser !== null) { - const ret = this._hparser.push(data, start, end); - if (ret === -1) { + const ret2 = this._hparser.push(data, start, end); + if (ret2 === -1) { this._hparser = null; hparser.reset(); this.emit("error", new Error("Malformed part header")); break; } - start = ret; + start = ret2; } if (start === end) break; @@ -71025,7 +71025,7 @@ var require_set_value = __commonJS({ } function setValue(context, step, currentValue, entryValue) { if (step.last) return setLastValue(context, step, currentValue, entryValue); - var obj; + var obj2; switch (valueType(currentValue)) { case "undefined": if (step.nextType === "array") { @@ -71040,17 +71040,17 @@ var require_set_value = __commonJS({ if (step.nextType === "array") { return currentValue; } - obj = /* @__PURE__ */ Object.create(null); - context[step.key] = obj; + obj2 = /* @__PURE__ */ Object.create(null); + context[step.key] = obj2; currentValue.forEach(function(item, i) { - if (item !== void 0) obj["" + i] = item; + if (item !== void 0) obj2["" + i] = item; }); - return obj; + return obj2; case "scalar": - obj = /* @__PURE__ */ Object.create(null); - obj[""] = currentValue; - context[step.key] = obj; - return obj; + obj2 = /* @__PURE__ */ Object.create(null); + obj2[""] = currentValue; + context[step.key] = obj2; + return obj2; } } module2.exports = setValue; @@ -71489,10 +71489,10 @@ var require_disk = __commonJS({ var fs = require("fs"); var os = require("os"); var path = require("path"); - var crypto2 = require("crypto"); + var crypto5 = require("crypto"); var mkdirp = require_mkdirp(); function getFilename(req, file2, cb) { - crypto2.randomBytes(16, function(err, raw) { + crypto5.randomBytes(16, function(err, raw) { cb(err, err ? void 0 : raw.toString("hex")); }); } @@ -71576,14 +71576,14 @@ var require_buffer_list = __commonJS({ } return target; } - function _defineProperty(obj, key, value) { + function _defineProperty(obj2, key, value) { key = _toPropertyKey(key); - if (key in obj) { - Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); + if (key in obj2) { + Object.defineProperty(obj2, key, { value, enumerable: true, configurable: true, writable: true }); } else { - obj[key] = value; + obj2[key] = value; } - return obj; + return obj2; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { @@ -71661,11 +71661,11 @@ var require_buffer_list = __commonJS({ key: "shift", value: function shift() { if (this.length === 0) return; - var ret = this.head.data; + var ret2 = this.head.data; if (this.length === 1) this.head = this.tail = null; else this.head = this.head.next; --this.length; - return ret; + return ret2; } }, { key: "clear", @@ -71678,38 +71678,38 @@ var require_buffer_list = __commonJS({ value: function join(s) { if (this.length === 0) return ""; var p = this.head; - var ret = "" + p.data; - while (p = p.next) ret += s + p.data; - return ret; + var ret2 = "" + p.data; + while (p = p.next) ret2 += s + p.data; + return ret2; } }, { key: "concat", value: function concat(n) { if (this.length === 0) return Buffer2.alloc(0); - var ret = Buffer2.allocUnsafe(n >>> 0); + var ret2 = Buffer2.allocUnsafe(n >>> 0); var p = this.head; var i = 0; while (p) { - copyBuffer(p.data, ret, i); + copyBuffer(p.data, ret2, i); i += p.data.length; p = p.next; } - return ret; + return ret2; } // Consumes a specified amount of bytes or characters from the buffered data. }, { key: "consume", value: function consume(n, hasStrings) { - var ret; + var ret2; if (n < this.head.data.length) { - ret = this.head.data.slice(0, n); + ret2 = this.head.data.slice(0, n); this.head.data = this.head.data.slice(n); } else if (n === this.head.data.length) { - ret = this.shift(); + ret2 = this.shift(); } else { - ret = hasStrings ? this._getString(n) : this._getBuffer(n); + ret2 = hasStrings ? this._getString(n) : this._getBuffer(n); } - return ret; + return ret2; } }, { key: "first", @@ -71722,13 +71722,13 @@ var require_buffer_list = __commonJS({ value: function _getString(n) { var p = this.head; var c = 1; - var ret = p.data; - n -= ret.length; + var ret2 = p.data; + n -= ret2.length; while (p = p.next) { var str = p.data; var nb = n > str.length ? str.length : n; - if (nb === str.length) ret += str; - else ret += str.slice(0, n); + if (nb === str.length) ret2 += str; + else ret2 += str.slice(0, n); n -= nb; if (n === 0) { if (nb === str.length) { @@ -71744,21 +71744,21 @@ var require_buffer_list = __commonJS({ ++c; } this.length -= c; - return ret; + return ret2; } // Consumes a specified amount of bytes from the buffered data. }, { key: "_getBuffer", value: function _getBuffer(n) { - var ret = Buffer2.allocUnsafe(n); + var ret2 = Buffer2.allocUnsafe(n); var p = this.head; var c = 1; - p.data.copy(ret); + p.data.copy(ret2); n -= p.data.length; while (p = p.next) { var buf = p.data; var nb = n > buf.length ? buf.length : n; - buf.copy(ret, ret.length - n, 0, nb); + buf.copy(ret2, ret2.length - n, 0, nb); n -= nb; if (n === 0) { if (nb === buf.length) { @@ -71774,12 +71774,12 @@ var require_buffer_list = __commonJS({ ++c; } this.length -= c; - return ret; + return ret2; } // Make sure the linked list only shows the minimal necessary information. }, { key: custom, - value: function value(_, options) { + value: function value(_2, options) { return inspect(this, _objectSpread(_objectSpread({}, options), {}, { // Only inspect one level. depth: 0, @@ -72039,8 +72039,8 @@ var require_stream_writable = __commonJS({ function _uint8ArrayToBuffer(chunk) { return Buffer2.from(chunk); } - function _isUint8Array(obj) { - return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array; + function _isUint8Array(obj2) { + return Buffer2.isBuffer(obj2) || obj2 instanceof OurUint8Array; } var destroyImpl = require_destroy2(); var _require = require_state(); @@ -72110,7 +72110,7 @@ var require_stream_writable = __commonJS({ return this.getBuffer(); }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003") }); - } catch (_) { + } catch (_2) { } })(); var realHasInstance; @@ -72166,7 +72166,7 @@ var require_stream_writable = __commonJS({ } Writable.prototype.write = function(chunk, encoding, cb) { var state = this._writableState; - var ret = false; + var ret2 = false; var isBuf = !state.objectMode && _isUint8Array(chunk); if (isBuf && !Buffer2.isBuffer(chunk)) { chunk = _uint8ArrayToBuffer(chunk); @@ -72181,9 +72181,9 @@ var require_stream_writable = __commonJS({ if (state.ending) writeAfterEnd(this, cb); else if (isBuf || validChunk(this, state, chunk, cb)) { state.pendingcb++; - ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); + ret2 = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); } - return ret; + return ret2; }; Writable.prototype.cork = function() { this._writableState.corked++; @@ -72236,8 +72236,8 @@ var require_stream_writable = __commonJS({ } var len = state.objectMode ? 1 : chunk.length; state.length += len; - var ret = state.length < state.highWaterMark; - if (!ret) state.needDrain = true; + var ret2 = state.length < state.highWaterMark; + if (!ret2) state.needDrain = true; if (state.writing || state.corked) { var last = state.lastBufferedRequest; state.lastBufferedRequest = { @@ -72256,7 +72256,7 @@ var require_stream_writable = __commonJS({ } else { doWrite(stream, state, false, len, chunk, encoding, cb); } - return ret; + return ret2; } function doWrite(stream, state, writev, len, chunk, encoding, cb) { state.writelen = len; @@ -72323,8 +72323,8 @@ var require_stream_writable = __commonJS({ state.bufferProcessing = true; var entry = state.bufferedRequest; if (stream._writev && entry && entry.next) { - var l = state.bufferedRequestCount; - var buffer = new Array(l); + var l2 = state.bufferedRequestCount; + var buffer = new Array(l2); var holder = state.corkedRequestsFree; holder.entry = entry; var count = 0; @@ -72489,9 +72489,9 @@ var require_stream_writable = __commonJS({ var require_stream_duplex = __commonJS({ "../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/_stream_duplex.js"(exports2, module2) { "use strict"; - var objectKeys = Object.keys || function(obj) { + var objectKeys = Object.keys || function(obj2) { var keys2 = []; - for (var key in obj) keys2.push(key); + for (var key in obj2) keys2.push(key); return keys2; }; module2.exports = Duplex; @@ -72910,14 +72910,14 @@ var require_async_iterator = __commonJS({ "../../node_modules/.pnpm/readable-stream@3.6.2/node_modules/readable-stream/lib/internal/streams/async_iterator.js"(exports2, module2) { "use strict"; var _Object$setPrototypeO; - function _defineProperty(obj, key, value) { + function _defineProperty(obj2, key, value) { key = _toPropertyKey(key); - if (key in obj) { - Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); + if (key in obj2) { + Object.defineProperty(obj2, key, { value, enumerable: true, configurable: true, writable: true }); } else { - obj[key] = value; + obj2[key] = value; } - return obj; + return obj2; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); @@ -73142,14 +73142,14 @@ var require_from2 = __commonJS({ } return target; } - function _defineProperty(obj, key, value) { + function _defineProperty(obj2, key, value) { key = _toPropertyKey(key); - if (key in obj) { - Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true }); + if (key in obj2) { + Object.defineProperty(obj2, key, { value, enumerable: true, configurable: true, writable: true }); } else { - obj[key] = value; + obj2[key] = value; } - return obj; + return obj2; } function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); @@ -73227,8 +73227,8 @@ var require_stream_readable = __commonJS({ function _uint8ArrayToBuffer(chunk) { return Buffer2.from(chunk); } - function _isUint8Array(obj) { - return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array; + function _isUint8Array(obj2) { + return Buffer2.isBuffer(obj2) || obj2 instanceof OurUint8Array; } var debugUtil = require("util"); var debug; @@ -73491,10 +73491,10 @@ var require_stream_readable = __commonJS({ state.sync = false; if (!state.reading) n = howMuchToRead(nOrig, state); } - var ret; - if (n > 0) ret = fromList(n, state); - else ret = null; - if (ret === null) { + var ret2; + if (n > 0) ret2 = fromList(n, state); + else ret2 = null; + if (ret2 === null) { state.needReadable = state.length <= state.highWaterMark; n = 0; } else { @@ -73505,8 +73505,8 @@ var require_stream_readable = __commonJS({ if (!state.ended) state.needReadable = true; if (nOrig !== n && state.ended) endReadable(this); } - if (ret !== null) this.emit("data", ret); - return ret; + if (ret2 !== null) this.emit("data", ret2); + return ret2; }; function onEofChunk(stream, state) { debug("onEofChunk"); @@ -73621,9 +73621,9 @@ var require_stream_readable = __commonJS({ src.on("data", ondata); function ondata(chunk) { debug("ondata"); - var ret = dest.write(chunk); - debug("dest.write", ret); - if (ret === false) { + var ret2 = dest.write(chunk); + debug("dest.write", ret2); + if (ret2 === false) { if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { debug("false write response, pause", state.awaitDrain); state.awaitDrain++; @@ -73812,8 +73812,8 @@ var require_stream_readable = __commonJS({ if (state.decoder) chunk = state.decoder.write(chunk); if (state.objectMode && (chunk === null || chunk === void 0)) return; else if (!state.objectMode && (!chunk || !chunk.length)) return; - var ret = _this.push(chunk); - if (!ret) { + var ret2 = _this.push(chunk); + if (!ret2) { paused = true; stream.pause(); } @@ -73891,17 +73891,17 @@ var require_stream_readable = __commonJS({ }); function fromList(n, state) { if (state.length === 0) return null; - var ret; - if (state.objectMode) ret = state.buffer.shift(); + var ret2; + if (state.objectMode) ret2 = state.buffer.shift(); else if (!n || n >= state.length) { - if (state.decoder) ret = state.buffer.join(""); - else if (state.buffer.length === 1) ret = state.buffer.first(); - else ret = state.buffer.concat(state.length); + if (state.decoder) ret2 = state.buffer.join(""); + else if (state.buffer.length === 1) ret2 = state.buffer.first(); + else ret2 = state.buffer.concat(state.length); state.buffer.clear(); } else { - ret = state.buffer.consume(n, state.decoder); + ret2 = state.buffer.consume(n, state.decoder); } - return ret; + return ret2; } function endReadable(stream) { var state = stream._readableState; @@ -73934,7 +73934,7 @@ var require_stream_readable = __commonJS({ }; } function indexOf(xs, x) { - for (var i = 0, l = xs.length; i < l; i++) { + for (var i = 0, l2 = xs.length; i < l2; i++) { if (xs[i] === x) return i; } return -1; @@ -74175,9 +74175,9 @@ var require_buffer_from = __commonJS({ function isArrayBuffer(input) { return toString2.call(input).slice(8, -1) === "ArrayBuffer"; } - function fromArrayBuffer(obj, byteOffset, length) { + function fromArrayBuffer(obj2, byteOffset, length) { byteOffset >>>= 0; - var maxLength = obj.byteLength - byteOffset; + var maxLength = obj2.byteLength - byteOffset; if (maxLength < 0) { throw new RangeError("'offset' is out of bounds"); } @@ -74189,7 +74189,7 @@ var require_buffer_from = __commonJS({ throw new RangeError("'length' is out of bounds"); } } - return isModern ? Buffer.from(obj.slice(byteOffset, byteOffset + length)) : new Buffer(new Uint8Array(obj.slice(byteOffset, byteOffset + length))); + return isModern ? Buffer.from(obj2.slice(byteOffset, byteOffset + length)) : new Buffer(new Uint8Array(obj2.slice(byteOffset, byteOffset + length))); } function fromString(string, encoding) { if (typeof encoding !== "string" || encoding === "") { @@ -74252,12 +74252,12 @@ var require_typedarray = __commonJS({ var min = Math.min; var pow = Math.pow; var round = Math.round; - function configureProperties(obj) { + function configureProperties(obj2) { if (getOwnPropNames && defineProp) { - var props = getOwnPropNames(obj), i; + var props = getOwnPropNames(obj2), i; for (i = 0; i < props.length; i += 1) { - defineProp(obj, props[i], { - value: obj[props[i]], + defineProp(obj2, props[i], { + value: obj2[props[i]], writable: false, enumerable: false, configurable: false @@ -74300,25 +74300,25 @@ var require_typedarray = __commonJS({ } return props; }; - function makeArrayAccessors(obj) { + function makeArrayAccessors(obj2) { if (!defineProp) { return; } - if (obj.length > MAX_ARRAY_LENGTH) throw new RangeError("Array too large for polyfill"); + if (obj2.length > MAX_ARRAY_LENGTH) throw new RangeError("Array too large for polyfill"); function makeArrayAccessor(index) { - defineProp(obj, index, { + defineProp(obj2, index, { "get": function() { - return obj._getter(index); + return obj2._getter(index); }, "set": function(v) { - obj._setter(index, v); + obj2._setter(index, v); }, enumerable: true, configurable: false }); } var i; - for (i = 0; i < obj.length; i += 1) { + for (i = 0; i < obj2.length; i += 1) { makeArrayAccessor(i); } } @@ -74751,7 +74751,7 @@ var require_typedarray = __commonJS({ var require_concat_stream = __commonJS({ "../../node_modules/.pnpm/concat-stream@2.0.0/node_modules/concat-stream/index.js"(exports2, module2) { var Writable = require_readable().Writable; - var inherits = require_inherits(); + var inherits2 = require_inherits(); var bufferFrom = require_buffer_from(); if (typeof Uint8Array === "undefined") { U8 = require_typedarray().Uint8Array; @@ -74785,7 +74785,7 @@ var require_concat_stream = __commonJS({ this.body = []; } module2.exports = ConcatStream; - inherits(ConcatStream, Writable); + inherits2(ConcatStream, Writable); ConcatStream.prototype._write = function(chunk, enc, next) { this.body.push(chunk); next(); @@ -76251,6433 +76251,1798 @@ var require_prisma_module = __commonJS({ } }); -// dist/modules/catalog/catalog.service.js -var require_catalog_service = __commonJS({ - "dist/modules/catalog/catalog.service.js"(exports2) { +// dist/modules/accounting-sync/accounting-config.js +var require_accounting_config = __commonJS({ + "dist/modules/accounting-sync/accounting-config.js"(exports2) { "use strict"; - var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - var __metadata3 = exports2 && exports2.__metadata || function(k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); - }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.CatalogService = void 0; + exports2.DEFAULT_TIMEOUT_MS = exports2.DOCUMENT_TRIGGER_STATUSES = exports2.ACCOUNTING_STATE_KEY = exports2.ACCOUNTING_CONFIG_KEY = exports2.ACCOUNTING_SETTING_PREFIX = void 0; + exports2.isAccountingSettingKey = isAccountingSettingKey; + exports2.documentStatusRank = documentStatusRank; + exports2.defaultConfig = defaultConfig; + exports2.withDefaults = withDefaults; + exports2.cleanUrl = cleanUrl; + exports2.cleanCa = cleanCa; + exports2.cleanInt = cleanInt; + exports2.cleanGroup = cleanGroup; + exports2.cleanGroups = cleanGroups; + exports2.cleanBool = cleanBool; var common_12 = require_common(); - var prisma_service_1 = require_prisma_service(); - var CatalogService = class CatalogService { - prisma; - constructor(prisma) { - this.prisma = prisma; - } - listProducts() { - return this.prisma.product.findMany({ - where: { isActive: true }, - include: { - variants: true, - images: true, - category: true, - brand: true, - collections: { include: { collection: true } } - } - }); - } - async getVariantOrThrow(variantId) { - const variant = await this.prisma.productVariant.findUnique({ where: { id: variantId } }); - if (!variant || !variant.isActive) { - throw new common_12.NotFoundException(`Product variant ${variantId} not found or inactive`); - } - return variant; - } - }; - exports2.CatalogService = CatalogService; - exports2.CatalogService = CatalogService = __decorate4([ - (0, common_12.Injectable)(), - __metadata3("design:paramtypes", [prisma_service_1.PrismaService]) - ], CatalogService); - } -}); - -// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/abstract.strategy.js -var require_abstract_strategy = __commonJS({ - "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/abstract.strategy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AbstractStrategy = void 0; - var AbstractStrategy = class { - }; - exports2.AbstractStrategy = AbstractStrategy; - } -}); - -// ../../node_modules/.pnpm/pause@0.0.1/node_modules/pause/index.js -var require_pause = __commonJS({ - "../../node_modules/.pnpm/pause@0.0.1/node_modules/pause/index.js"(exports2, module2) { - module2.exports = function(obj) { - var onData, onEnd, events = []; - obj.on("data", onData = function(data, encoding) { - events.push(["data", data, encoding]); - }); - obj.on("end", onEnd = function(data, encoding) { - events.push(["end", data, encoding]); - }); + exports2.ACCOUNTING_SETTING_PREFIX = "accounting."; + exports2.ACCOUNTING_CONFIG_KEY = "accounting.config"; + exports2.ACCOUNTING_STATE_KEY = "accounting.state"; + function isAccountingSettingKey(key) { + return key.trim().toLowerCase().startsWith(exports2.ACCOUNTING_SETTING_PREFIX); + } + exports2.DOCUMENT_TRIGGER_STATUSES = [ + "PLACED", + "ADMIN_APPROVED", + "SOURCING", + "PREPARING", + "DELIVERED_TO_AGENT", + "DELIVERED_TO_CUSTOMER" + ]; + function documentStatusRank(status) { + return exports2.DOCUMENT_TRIGGER_STATUSES.indexOf(status) + 1; + } + exports2.DEFAULT_TIMEOUT_MS = 2e4; + function defaultConfig() { return { - end: function() { - obj.removeListener("data", onData); - obj.removeListener("end", onEnd); + provider: "none", + tahesab: { baseUrl: "", tokenSealed: null, caCert: null, timeoutMs: exports2.DEFAULT_TIMEOUT_MS, dbName: "TahesabDB" }, + zarrin: { baseUrl: "", tokenSealed: null, caCert: null, timeoutMs: exports2.DEFAULT_TIMEOUT_MS, balanceOwesWhen: "negative" }, + features: { customers: false, balances: false, report: false, products: false, documents: false }, + intervals: { customersMinutes: 60, balancesMinutes: 10, productsMinutes: 30 }, + mapping: { + importCustomerGroups: [], + newCustomerGroup: null, + newKarSakhteGroup: null, + categoryGroups: [], + newKarSakhteType: null, + karat: 750 }, - resume: function() { - this.end(); - for (var i = 0, len = events.length; i < len; ++i) { - obj.emit.apply(obj, events[i]); - } - } + report: { windowDays: 365 }, + // The point the debt is recognised — the behaviour before the rule existed. + documents: { triggerStatus: "DELIVERED_TO_AGENT" } }; - }; - } -}); - -// ../../node_modules/.pnpm/passport-strategy@1.0.0/node_modules/passport-strategy/lib/strategy.js -var require_strategy = __commonJS({ - "../../node_modules/.pnpm/passport-strategy@1.0.0/node_modules/passport-strategy/lib/strategy.js"(exports2, module2) { - function Strategy() { } - Strategy.prototype.authenticate = function(req, options) { - throw new Error("Strategy#authenticate must be overridden by subclass"); - }; - module2.exports = Strategy; - } -}); - -// ../../node_modules/.pnpm/passport-strategy@1.0.0/node_modules/passport-strategy/lib/index.js -var require_lib6 = __commonJS({ - "../../node_modules/.pnpm/passport-strategy@1.0.0/node_modules/passport-strategy/lib/index.js"(exports2, module2) { - var Strategy = require_strategy(); - exports2 = module2.exports = Strategy; - exports2.Strategy = Strategy; - } -}); - -// ../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/strategies/session.js -var require_session = __commonJS({ - "../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/strategies/session.js"(exports2, module2) { - var pause = require_pause(); - var util2 = require("util"); - var Strategy = require_lib6(); - function SessionStrategy(options, deserializeUser) { - if (typeof options == "function") { - deserializeUser = options; - options = void 0; - } - options = options || {}; - Strategy.call(this); - this.name = "session"; - this._key = options.key || "passport"; - this._deserializeUser = deserializeUser; - } - util2.inherits(SessionStrategy, Strategy); - SessionStrategy.prototype.authenticate = function(req, options) { - if (!req.session) { - return this.error(new Error("Login sessions require session support. Did you forget to use `express-session` middleware?")); - } - options = options || {}; - var self2 = this, su; - if (req.session[this._key]) { - su = req.session[this._key].user; - } - if (su || su === 0) { - var paused = options.pauseStream ? pause(req) : null; - this._deserializeUser(su, req, function(err, user) { - if (err) { - return self2.error(err); - } - if (!user) { - delete req.session[self2._key].user; - } else { - var property = req._userProperty || "user"; - req[property] = user; - } - self2.pass(); - if (paused) { - paused.resume(); - } - }); - } else { - self2.pass(); - } - }; - module2.exports = SessionStrategy; - } -}); - -// ../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/sessionmanager.js -var require_sessionmanager = __commonJS({ - "../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/sessionmanager.js"(exports2, module2) { - var merge = require_utils_merge(); - function SessionManager(options, serializeUser) { - if (typeof options == "function") { - serializeUser = options; - options = void 0; - } - options = options || {}; - this._key = options.key || "passport"; - this._serializeUser = serializeUser; - } - SessionManager.prototype.logIn = function(req, user, options, cb) { - if (typeof options == "function") { - cb = options; - options = {}; - } - options = options || {}; - if (!req.session) { - return cb(new Error("Login sessions require session support. Did you forget to use `express-session` middleware?")); - } - var self2 = this; - var prevSession = req.session; - req.session.regenerate(function(err) { - if (err) { - return cb(err); - } - self2._serializeUser(user, req, function(err2, obj) { - if (err2) { - return cb(err2); - } - if (options.keepSessionInfo) { - merge(req.session, prevSession); - } - if (!req.session[self2._key]) { - req.session[self2._key] = {}; - } - req.session[self2._key].user = obj; - req.session.save(function(err3) { - if (err3) { - return cb(err3); - } - cb(); - }); - }); - }); - }; - SessionManager.prototype.logOut = function(req, options, cb) { - if (typeof options == "function") { - cb = options; - options = {}; - } - options = options || {}; - if (!req.session) { - return cb(new Error("Login sessions require session support. Did you forget to use `express-session` middleware?")); - } - var self2 = this; - if (req.session[this._key]) { - delete req.session[this._key].user; - } - var prevSession = req.session; - req.session.save(function(err) { - if (err) { - return cb(err); - } - req.session.regenerate(function(err2) { - if (err2) { - return cb(err2); - } - if (options.keepSessionInfo) { - merge(req.session, prevSession); - } - cb(); - }); - }); - }; - module2.exports = SessionManager; - } -}); - -// ../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/http/request.js -var require_request3 = __commonJS({ - "../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/http/request.js"(exports2, module2) { - var req = exports2 = module2.exports = {}; - req.login = req.logIn = function(user, options, done) { - if (typeof options == "function") { - done = options; - options = {}; - } - options = options || {}; - var property = this._userProperty || "user"; - var session = options.session === void 0 ? true : options.session; - this[property] = user; - if (session && this._sessionManager) { - if (typeof done != "function") { - throw new Error("req#login requires a callback function"); - } - var self2 = this; - this._sessionManager.logIn(this, user, options, function(err) { - if (err) { - self2[property] = null; - return done(err); - } - done(); - }); - } else { - done && done(); - } - }; - req.logout = req.logOut = function(options, done) { - if (typeof options == "function") { - done = options; - options = {}; - } - options = options || {}; - var property = this._userProperty || "user"; - this[property] = null; - if (this._sessionManager) { - if (typeof done != "function") { - throw new Error("req#logout requires a callback function"); - } - this._sessionManager.logOut(this, options, done); - } else { - done && done(); - } - }; - req.isAuthenticated = function() { - var property = this._userProperty || "user"; - return this[property] ? true : false; - }; - req.isUnauthenticated = function() { - return !this.isAuthenticated(); - }; - } -}); - -// ../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/middleware/initialize.js -var require_initialize = __commonJS({ - "../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/middleware/initialize.js"(exports2, module2) { - var IncomingMessageExt = require_request3(); - module2.exports = function initialize(passport, options) { - options = options || {}; - return function initialize2(req, res, next) { - req.login = req.logIn = req.logIn || IncomingMessageExt.logIn; - req.logout = req.logOut = req.logOut || IncomingMessageExt.logOut; - req.isAuthenticated = req.isAuthenticated || IncomingMessageExt.isAuthenticated; - req.isUnauthenticated = req.isUnauthenticated || IncomingMessageExt.isUnauthenticated; - req._sessionManager = passport._sm; - if (options.userProperty) { - req._userProperty = options.userProperty; - } - var compat = options.compat === void 0 ? true : options.compat; - if (compat) { - passport._userProperty = options.userProperty || "user"; - req._passport = {}; - req._passport.instance = passport; - } - next(); + function withDefaults(raw) { + const d = defaultConfig(); + const r = raw && typeof raw === "object" ? raw : {}; + return { + provider: r.provider === "tahesab" || r.provider === "zarrin" ? r.provider : "none", + tahesab: { ...d.tahesab, ...r.tahesab ?? {} }, + zarrin: { ...d.zarrin, ...r.zarrin ?? {} }, + features: { ...d.features, ...r.features ?? {} }, + intervals: { ...d.intervals, ...r.intervals ?? {} }, + mapping: { ...d.mapping, ...r.mapping ?? {} }, + report: { ...d.report, ...r.report ?? {} }, + documents: { ...d.documents, ...r.documents ?? {} } }; - }; - } -}); - -// ../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/errors/authenticationerror.js -var require_authenticationerror = __commonJS({ - "../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/errors/authenticationerror.js"(exports2, module2) { - function AuthenticationError(message, status) { - Error.call(this); - Error.captureStackTrace(this, arguments.callee); - this.name = "AuthenticationError"; - this.message = message; - this.status = status || 401; } - AuthenticationError.prototype.__proto__ = Error.prototype; - module2.exports = AuthenticationError; + function cleanUrl(v, label) { + const s = typeof v === "string" ? v.trim() : ""; + if (!s) + return ""; + let u; + try { + u = new URL(s); + } catch { + throw new common_12.BadRequestException(`${label}: \u0622\u062F\u0631\u0633 \u0645\u0639\u062A\u0628\u0631 \u0646\u06CC\u0633\u062A`); + } + if (u.protocol !== "http:" && u.protocol !== "https:") { + throw new common_12.BadRequestException(`${label}: \u0622\u062F\u0631\u0633 \u0628\u0627\u06CC\u062F \u0628\u0627 http:// \u06CC\u0627 https:// \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`); + } + if (u.username || u.password) + throw new common_12.BadRequestException(`${label}: \u0622\u062F\u0631\u0633 \u0646\u0628\u0627\u06CC\u062F \u0646\u0627\u0645 \u06A9\u0627\u0631\u0628\u0631\u06CC/\u0631\u0645\u0632 \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`); + return s; + } + function cleanCa(v) { + const s = typeof v === "string" ? v.trim() : ""; + if (!s) + return null; + if (!s.includes("-----BEGIN CERTIFICATE-----")) { + throw new common_12.BadRequestException("\u06AF\u0648\u0627\u0647\u06CC CA \u0628\u0627\u06CC\u062F \u0628\u0627 \u0642\u0627\u0644\u0628 PEM (BEGIN CERTIFICATE) \u0628\u0627\u0634\u062F"); + } + return s; + } + function cleanInt(v, label, min, max, fallback) { + if (v === void 0 || v === null || v === "") + return fallback; + const n = Number(v); + if (!Number.isInteger(n) || n < min || n > max) { + throw new common_12.BadRequestException(`${label}: \u0639\u062F\u062F \u0635\u062D\u06CC\u062D \u0628\u06CC\u0646 ${min} \u0648 ${max}`); + } + return n; + } + function cleanGroup(v) { + if (!v || typeof v !== "object") + return null; + const g = v; + const id = g.id === void 0 || g.id === null ? "" : String(g.id).trim(); + const name = typeof g.name === "string" ? g.name.trim() : ""; + if (!id && !name) + return null; + return { id, name }; + } + function cleanGroups(v) { + return Array.isArray(v) ? v.map(cleanGroup).filter((g) => !!g) : []; + } + function cleanBool(v, fallback) { + return typeof v === "boolean" ? v : fallback; + } } }); -// ../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/middleware/authenticate.js -var require_authenticate = __commonJS({ - "../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/middleware/authenticate.js"(exports2, module2) { - var http = require("http"); - var IncomingMessageExt = require_request3(); - var AuthenticationError = require_authenticationerror(); - module2.exports = function authenticate(passport, name, options, callback) { - if (typeof options == "function") { - callback = options; - options = {}; +// dist/modules/accounting-sync/accounting-http.js +var require_accounting_http = __commonJS({ + "dist/modules/accounting-sync/accounting-http.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; } - options = options || {}; - var multi = true; - if (!Array.isArray(name)) { - name = [name]; - multi = false; - } - return function authenticate2(req, res, next) { - req.login = req.logIn = req.logIn || IncomingMessageExt.logIn; - req.logout = req.logOut = req.logOut || IncomingMessageExt.logOut; - req.isAuthenticated = req.isAuthenticated || IncomingMessageExt.isAuthenticated; - req.isUnauthenticated = req.isUnauthenticated || IncomingMessageExt.isUnauthenticated; - req._sessionManager = passport._sm; - var failures = []; - function allFailed() { - if (callback) { - if (!multi) { - return callback(null, false, failures[0].challenge, failures[0].status); - } else { - var challenges = failures.map(function(f) { - return f.challenge; - }); - var statuses = failures.map(function(f) { - return f.status; - }); - return callback(null, false, challenges, statuses); - } - } - var failure = failures[0] || {}, challenge = failure.challenge || {}, msg; - if (options.failureFlash) { - var flash = options.failureFlash; - if (typeof flash == "string") { - flash = { type: "error", message: flash }; - } - flash.type = flash.type || "error"; - var type = flash.type || challenge.type || "error"; - msg = flash.message || challenge.message || challenge; - if (typeof msg == "string") { - req.flash(type, msg); - } - } - if (options.failureMessage) { - msg = options.failureMessage; - if (typeof msg == "boolean") { - msg = challenge.message || challenge; - } - if (typeof msg == "string") { - req.session.messages = req.session.messages || []; - req.session.messages.push(msg); - } - } - if (options.failureRedirect) { - return res.redirect(options.failureRedirect); - } - var rchallenge = [], rstatus, status; - for (var j = 0, len = failures.length; j < len; j++) { - failure = failures[j]; - challenge = failure.challenge; - status = failure.status; - rstatus = rstatus || status; - if (typeof challenge == "string") { - rchallenge.push(challenge); - } - } - res.statusCode = rstatus || 401; - if (res.statusCode == 401 && rchallenge.length) { - res.setHeader("WWW-Authenticate", rchallenge); - } - if (options.failWithError) { - return next(new AuthenticationError(http.STATUS_CODES[res.statusCode], rstatus)); - } - res.end(http.STATUS_CODES[res.statusCode]); + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); } - (function attempt(i) { - var layer = name[i]; - if (!layer) { - return allFailed(); - } - var strategy, prototype; - if (typeof layer.authenticate == "function") { - strategy = layer; - } else { - prototype = passport._strategy(layer); - if (!prototype) { - return next(new Error('Unknown authentication strategy "' + layer + '"')); - } - strategy = Object.create(prototype); - } - strategy.success = function(user, info) { - if (callback) { - return callback(null, user, info); - } - info = info || {}; - var msg; - if (options.successFlash) { - var flash = options.successFlash; - if (typeof flash == "string") { - flash = { type: "success", message: flash }; - } - flash.type = flash.type || "success"; - var type = flash.type || info.type || "success"; - msg = flash.message || info.message || info; - if (typeof msg == "string") { - req.flash(type, msg); - } - } - if (options.successMessage) { - msg = options.successMessage; - if (typeof msg == "boolean") { - msg = info.message || info; - } - if (typeof msg == "string") { - req.session.messages = req.session.messages || []; - req.session.messages.push(msg); - } - } - if (options.assignProperty) { - req[options.assignProperty] = user; - if (options.authInfo !== false) { - passport.transformAuthInfo(info, req, function(err, tinfo) { - if (err) { - return next(err); - } - req.authInfo = tinfo; - next(); - }); - } else { - next(); - } + __setModuleDefault2(result, mod); + return result; + }; + })(); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountingHttpError = void 0; + exports2.parsePemCertificates = parsePemCertificates; + exports2.pinnedFingerprints = pinnedFingerprints; + exports2.httpRequest = httpRequest; + exports2.fetchServerCertificate = fetchServerCertificate; + exports2.parseLooseJson = parseLooseJson; + var crypto_1 = require("crypto"); + var http = __importStar2(require("http")); + var https = __importStar2(require("https")); + var net = __importStar2(require("net")); + var tls = __importStar2(require("tls")); + var AccountingHttpError = class extends Error { + ambiguous; + code; + constructor(message, ambiguous, code) { + super(message); + this.ambiguous = ambiguous; + this.code = code; + this.name = "AccountingHttpError"; + } + }; + exports2.AccountingHttpError = AccountingHttpError; + var MAX_BODY_BYTES = 20 * 1024 * 1024; + var TLS_CERT_ERRORS = /CERT|SELF_SIGNED|UNABLE_TO_VERIFY|UNABLE_TO_GET_ISSUER/; + function parsePemCertificates(pem) { + const blocks = (pem ?? "").match(/-----BEGIN CERTIFICATE-----[\s\S]+?-----END CERTIFICATE-----/g) ?? []; + const out = []; + for (const block of blocks) { + try { + out.push(new crypto_1.X509Certificate(block)); + } catch { + } + } + return out; + } + function pinnedFingerprints(pem) { + return new Set(parsePemCertificates(pem).map((c) => c.fingerprint256)); + } + function tlsErrorMessage(err, pinned) { + if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { + return pinned ? `\u06AF\u0648\u0627\u0647\u06CC \u0633\u0631\u0648\u0631 \u0628\u0631\u0627\u06CC \u0627\u06CC\u0646 \u0622\u062F\u0631\u0633 \u0635\u0627\u062F\u0631 \u0646\u0634\u062F\u0647 \u0648 \u0628\u0627 \u06AF\u0648\u0627\u0647\u06CC \u062B\u0628\u062A\u200C\u0634\u062F\u0647 \u062F\u0631 \u062A\u0646\u0638\u06CC\u0645\u0627\u062A \u0647\u0645 \u06CC\u06A9\u06CC \u0646\u06CC\u0633\u062A (${err.code}) \u2014 \u0627\u06AF\u0631 \u06AF\u0648\u0627\u0647\u06CC \u0633\u0631\u0648\u0631 \u0639\u0648\u0636 \u0634\u062F\u0647\u060C \u062F\u0631 \u0628\u062E\u0634 \xAB\u06AF\u0648\u0627\u0647\u06CC \u0627\u0645\u0646\u06CC\u062A\u06CC \u0633\u0631\u0648\u0631\xBB \xAB\u0628\u0631\u0631\u0633\u06CC \u062F\u0648\u0628\u0627\u0631\u0647\xBB \u0631\u0627 \u0628\u0632\u0646\u06CC\u062F` : `\u06AF\u0648\u0627\u0647\u06CC TLS \u0633\u0631\u0648\u0631 \u0628\u0631\u0627\u06CC \u0627\u06CC\u0646 \u0622\u062F\u0631\u0633 \u0635\u0627\u062F\u0631 \u0646\u0634\u062F\u0647 (${err.code}) \u2014 \u062F\u0631 \u062A\u0628 \xAB\u0627\u062A\u0635\u0627\u0644\xBB\u060C \u0628\u062E\u0634 \xAB\u06AF\u0648\u0627\u0647\u06CC \u0627\u0645\u0646\u06CC\u062A\u06CC \u0633\u0631\u0648\u0631\xBB\u060C \xAB\u0628\u0631\u0631\u0633\u06CC \u06AF\u0648\u0627\u0647\u06CC \u0633\u0631\u0648\u0631\xBB \u0631\u0627 \u0628\u0632\u0646\u06CC\u062F \u0648 \u067E\u0633 \u0627\u0632 \u062A\u0637\u0628\u06CC\u0642 \u0627\u062B\u0631\u0627\u0646\u06AF\u0634\u062A \u062A\u0623\u06CC\u06CC\u062F \u0648 \u0630\u062E\u06CC\u0631\u0647 \u06A9\u0646\u06CC\u062F`; + } + return pinned ? `\u06AF\u0648\u0627\u0647\u06CC \u0641\u0639\u0644\u06CC \u0633\u0631\u0648\u0631 \u0628\u0627 \u06AF\u0648\u0627\u0647\u06CC \u062B\u0628\u062A\u200C\u0634\u062F\u0647 \u062F\u0631 \u062A\u0646\u0638\u06CC\u0645\u0627\u062A \u06CC\u06A9\u06CC \u0646\u06CC\u0633\u062A (${err.code}) \u2014 \u0627\u06AF\u0631 \u06AF\u0648\u0627\u0647\u06CC \u0633\u0631\u0648\u0631 \u0639\u0648\u0636 \u0634\u062F\u0647\u060C \u062F\u0631 \u0628\u062E\u0634 \xAB\u06AF\u0648\u0627\u0647\u06CC \u0627\u0645\u0646\u06CC\u062A\u06CC \u0633\u0631\u0648\u0631\xBB \xAB\u0628\u0631\u0631\u0633\u06CC \u062F\u0648\u0628\u0627\u0631\u0647\xBB \u0631\u0627 \u0628\u0632\u0646\u06CC\u062F` : `\u06AF\u0648\u0627\u0647\u06CC TLS \u0633\u0631\u0648\u0631 \u0642\u0627\u0628\u0644\u200C\u0627\u0639\u062A\u0645\u0627\u062F \u0646\u06CC\u0633\u062A (${err.code}) \u2014 \u062F\u0631 \u062A\u0628 \xAB\u0627\u062A\u0635\u0627\u0644\xBB\u060C \u0628\u062E\u0634 \xAB\u06AF\u0648\u0627\u0647\u06CC \u0627\u0645\u0646\u06CC\u062A\u06CC \u0633\u0631\u0648\u0631\xBB\u060C \xAB\u0628\u0631\u0631\u0633\u06CC \u06AF\u0648\u0627\u0647\u06CC \u0633\u0631\u0648\u0631\xBB \u0631\u0627 \u0628\u0632\u0646\u06CC\u062F \u0648 \u067E\u0633 \u0627\u0632 \u062A\u0637\u0628\u06CC\u0642 \u0627\u062B\u0631\u0627\u0646\u06AF\u0634\u062A \u062A\u0623\u06CC\u06CC\u062F \u0648 \u0630\u062E\u06CC\u0631\u0647 \u06A9\u0646\u06CC\u062F`; + } + function httpRequest(req) { + let url; + try { + url = new URL(req.url); + } catch { + return Promise.reject(new AccountingHttpError("\u0622\u062F\u0631\u0633 \u0633\u0631\u0648\u0631 \u062D\u0633\u0627\u0628\u062F\u0627\u0631\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u0627\u0633\u062A", false, "BAD_URL")); + } + const isHttps = url.protocol === "https:"; + if (!isHttps && url.protocol !== "http:") { + return Promise.reject(new AccountingHttpError("\u0622\u062F\u0631\u0633 \u0628\u0627\u06CC\u062F \u0628\u0627 http \u06CC\u0627 https \u0634\u0631\u0648\u0639 \u0634\u0648\u062F", false, "BAD_URL")); + } + const headers = { ...req.headers ?? {} }; + if (req.body !== void 0) + headers["Content-Length"] = Buffer.byteLength(req.body); + const options = { + method: req.method, + hostname: url.hostname, + port: url.port || (isHttps ? 443 : 80), + path: `${url.pathname}${url.search}`, + headers + }; + const pins = isHttps ? pinnedFingerprints(req.ca) : /* @__PURE__ */ new Set(); + if (isHttps) { + options.rejectUnauthorized = true; + if (req.ca && req.ca.trim()) { + options.ca = [...tls.rootCertificates, req.ca]; + options.checkServerIdentity = (host, cert) => pins.has(cert.fingerprint256) ? void 0 : tls.checkServerIdentity(host, cert); + } + } + return new Promise((resolve, reject) => { + let connected = false; + let settled = false; + const finish = (fn) => { + if (settled) + return; + settled = true; + clearTimeout(timer); + fn(); + }; + const client = isHttps ? https : http; + const request = client.request(options, (res) => { + const chunks = []; + let size = 0; + res.on("data", (chunk) => { + size += chunk.length; + if (size > MAX_BODY_BYTES) { + request.destroy(); + finish(() => reject(new AccountingHttpError("\u067E\u0627\u0633\u062E \u0633\u0631\u0648\u0631 \u062D\u0633\u0627\u0628\u062F\u0627\u0631\u06CC \u0628\u06CC\u0634 \u0627\u0632 \u062D\u062F \u0628\u0632\u0631\u06AF \u0627\u0633\u062A", true, "TOO_LARGE"))); return; } - req.logIn(user, options, function(err) { - if (err) { - return next(err); - } - function complete() { - if (options.successReturnToOrRedirect) { - var url = options.successReturnToOrRedirect; - if (req.session && req.session.returnTo) { - url = req.session.returnTo; - delete req.session.returnTo; - } - return res.redirect(url); - } - if (options.successRedirect) { - return res.redirect(options.successRedirect); - } - next(); - } - if (options.authInfo !== false) { - passport.transformAuthInfo(info, req, function(err2, tinfo) { - if (err2) { - return next(err2); - } - req.authInfo = tinfo; - complete(); - }); - } else { - complete(); - } - }); - }; - strategy.fail = function(challenge, status) { - if (typeof challenge == "number") { - status = challenge; - challenge = void 0; - } - failures.push({ challenge, status }); - attempt(i + 1); - }; - strategy.redirect = function(url, status) { - res.statusCode = status || 302; - res.setHeader("Location", url); - res.setHeader("Content-Length", "0"); - res.end(); - }; - strategy.pass = function() { - next(); - }; - strategy.error = function(err) { - if (callback) { - return callback(err); - } - next(err); - }; - strategy.authenticate(req, options); - })(0); - }; - }; - } -}); - -// ../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/framework/connect.js -var require_connect2 = __commonJS({ - "../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/framework/connect.js"(exports2, module2) { - var initialize = require_initialize(); - var authenticate = require_authenticate(); - exports2 = module2.exports = function() { - return { - initialize, - authenticate - }; - }; - } -}); - -// ../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/authenticator.js -var require_authenticator = __commonJS({ - "../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/authenticator.js"(exports2, module2) { - var SessionStrategy = require_session(); - var SessionManager = require_sessionmanager(); - function Authenticator() { - this._key = "passport"; - this._strategies = {}; - this._serializers = []; - this._deserializers = []; - this._infoTransformers = []; - this._framework = null; - this.init(); - } - Authenticator.prototype.init = function() { - this.framework(require_connect2()()); - this.use(new SessionStrategy({ key: this._key }, this.deserializeUser.bind(this))); - this._sm = new SessionManager({ key: this._key }, this.serializeUser.bind(this)); - }; - Authenticator.prototype.use = function(name, strategy) { - if (!strategy) { - strategy = name; - name = strategy.name; - } - if (!name) { - throw new Error("Authentication strategies must have a name"); - } - this._strategies[name] = strategy; - return this; - }; - Authenticator.prototype.unuse = function(name) { - delete this._strategies[name]; - return this; - }; - Authenticator.prototype.framework = function(fw) { - this._framework = fw; - return this; - }; - Authenticator.prototype.initialize = function(options) { - options = options || {}; - return this._framework.initialize(this, options); - }; - Authenticator.prototype.authenticate = function(strategy, options, callback) { - return this._framework.authenticate(this, strategy, options, callback); - }; - Authenticator.prototype.authorize = function(strategy, options, callback) { - options = options || {}; - options.assignProperty = "account"; - var fn = this._framework.authorize || this._framework.authenticate; - return fn(this, strategy, options, callback); - }; - Authenticator.prototype.session = function(options) { - return this.authenticate("session", options); - }; - Authenticator.prototype.serializeUser = function(fn, req, done) { - if (typeof fn === "function") { - return this._serializers.push(fn); - } - var user = fn; - if (typeof req === "function") { - done = req; - req = void 0; - } - var stack = this._serializers; - (function pass(i, err, obj) { - if ("pass" === err) { - err = void 0; - } - if (err || obj || obj === 0) { - return done(err, obj); - } - var layer = stack[i]; - if (!layer) { - return done(new Error("Failed to serialize user into session")); - } - function serialized(e, o) { - pass(i + 1, e, o); - } - try { - var arity = layer.length; - if (arity == 3) { - layer(req, user, serialized); - } else { - layer(user, serialized); - } - } catch (e) { - return done(e); - } - })(0); - }; - Authenticator.prototype.deserializeUser = function(fn, req, done) { - if (typeof fn === "function") { - return this._deserializers.push(fn); - } - var obj = fn; - if (typeof req === "function") { - done = req; - req = void 0; - } - var stack = this._deserializers; - (function pass(i, err, user) { - if ("pass" === err) { - err = void 0; - } - if (err || user) { - return done(err, user); - } - if (user === null || user === false) { - return done(null, false); - } - var layer = stack[i]; - if (!layer) { - return done(new Error("Failed to deserialize user out of session")); - } - function deserialized(e, u) { - pass(i + 1, e, u); - } - try { - var arity = layer.length; - if (arity == 3) { - layer(req, obj, deserialized); - } else { - layer(obj, deserialized); - } - } catch (e) { - return done(e); - } - })(0); - }; - Authenticator.prototype.transformAuthInfo = function(fn, req, done) { - if (typeof fn === "function") { - return this._infoTransformers.push(fn); - } - var info = fn; - if (typeof req === "function") { - done = req; - req = void 0; - } - var stack = this._infoTransformers; - (function pass(i, err, tinfo) { - if ("pass" === err) { - err = void 0; - } - if (err || tinfo) { - return done(err, tinfo); - } - var layer = stack[i]; - if (!layer) { - return done(null, info); - } - function transformed(e, t2) { - pass(i + 1, e, t2); - } - try { - var arity = layer.length; - if (arity == 1) { - var t = layer(info); - transformed(null, t); - } else if (arity == 3) { - layer(req, info, transformed); - } else { - layer(info, transformed); - } - } catch (e) { - return done(e); - } - })(0); - }; - Authenticator.prototype._strategy = function(name) { - return this._strategies[name]; - }; - module2.exports = Authenticator; - } -}); - -// ../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/index.js -var require_lib7 = __commonJS({ - "../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/index.js"(exports2, module2) { - var Passport = require_authenticator(); - var SessionStrategy = require_session(); - exports2 = module2.exports = new Passport(); - exports2.Passport = exports2.Authenticator = Passport; - exports2.Strategy = require_lib6(); - exports2.strategies = {}; - exports2.strategies.SessionStrategy = SessionStrategy; - } -}); - -// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/interfaces/auth-module.options.js -var require_auth_module_options = __commonJS({ - "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/interfaces/auth-module.options.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AuthModuleOptions = void 0; - var AuthModuleOptions = class { - }; - exports2.AuthModuleOptions = AuthModuleOptions; - } -}); - -// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/options.js -var require_options = __commonJS({ - "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/options.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.defaultOptions = void 0; - exports2.defaultOptions = { - session: false, - property: "user" - }; - } -}); - -// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/utils/memoize.util.js -var require_memoize_util = __commonJS({ - "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/utils/memoize.util.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.memoize = void 0; - var defaultKey = "default"; - function memoize(fn) { - const cache = {}; - return (...args) => { - const n = args[0] || defaultKey; - if (n in cache) { - return cache[n]; - } else { - const result = fn(n === defaultKey ? void 0 : n); - cache[n] = result; - return result; - } - }; - } - exports2.memoize = memoize; - } -}); - -// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/auth.guard.js -var require_auth_guard = __commonJS({ - "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/auth.guard.js"(exports2) { - "use strict"; - var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - var __metadata3 = exports2 && exports2.__metadata || function(k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); - }; - var __param3 = exports2 && exports2.__param || function(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AuthGuard = void 0; - var common_12 = require_common(); - var passport = require_lib7(); - var auth_module_options_1 = require_auth_module_options(); - var options_1 = require_options(); - var memoize_util_1 = require_memoize_util(); - exports2.AuthGuard = (0, memoize_util_1.memoize)(createAuthGuard); - var NO_STRATEGY_ERROR = `In order to use "defaultStrategy", please, ensure to import PassportModule in each place where AuthGuard() is being used. Otherwise, passport won't work correctly.`; - var authLogger = new common_12.Logger("AuthGuard"); - function createAuthGuard(type) { - let MixinAuthGuard = class MixinAuthGuard { - constructor(options) { - this.options = {}; - this.options = options ?? this.options; - if (!type && !this.options.defaultStrategy) { - authLogger.error(NO_STRATEGY_ERROR); - } - } - async canActivate(context) { - const options = { - ...options_1.defaultOptions, - ...this.options, - ...await this.getAuthenticateOptions(context) - }; - const [request, response] = [ - this.getRequest(context), - this.getResponse(context) - ]; - const passportFn = createPassportContext(request, response); - const user = await passportFn(type || this.options.defaultStrategy, options, (err, user2, info, status) => this.handleRequest(err, user2, info, context, status)); - request[options.property || options_1.defaultOptions.property] = user; - return true; - } - getRequest(context) { - return context.switchToHttp().getRequest(); - } - getResponse(context) { - return context.switchToHttp().getResponse(); - } - async logIn(request) { - const user = request[this.options.property || options_1.defaultOptions.property]; - await new Promise((resolve, reject) => request.logIn(user, this.options, (err) => err ? reject(err) : resolve())); - } - handleRequest(err, user, info, context, status) { - if (err || !user) { - throw err || new common_12.UnauthorizedException(); - } - return user; - } - getAuthenticateOptions(context) { - return void 0; - } - }; - __decorate4([ - (0, common_12.Optional)(), - (0, common_12.Inject)(auth_module_options_1.AuthModuleOptions), - __metadata3("design:type", auth_module_options_1.AuthModuleOptions) - ], MixinAuthGuard.prototype, "options", void 0); - MixinAuthGuard = __decorate4([ - __param3(0, (0, common_12.Optional)()), - __metadata3("design:paramtypes", [auth_module_options_1.AuthModuleOptions]) - ], MixinAuthGuard); - const guard = (0, common_12.mixin)(MixinAuthGuard); - return guard; - } - var createPassportContext = (request, response) => (type, options, callback) => new Promise((resolve, reject) => passport.authenticate(type, options, (err, user, info, status) => { - try { - request.authInfo = info; - return resolve(callback(err, user, info, status)); - } catch (err2) { - reject(err2); - } - })(request, response, (err) => err ? reject(err) : resolve())); - } -}); - -// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/interfaces/type.interface.js -var require_type_interface2 = __commonJS({ - "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/interfaces/type.interface.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - } -}); - -// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/interfaces/index.js -var require_interfaces7 = __commonJS({ - "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/interfaces/index.js"(exports2) { - "use strict"; - var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - __exportStar2(require_auth_module_options(), exports2); - __exportStar2(require_type_interface2(), exports2); - } -}); - -// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/passport.module.js -var require_passport_module = __commonJS({ - "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/passport.module.js"(exports2) { - "use strict"; - var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - var PassportModule_1; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PassportModule = void 0; - var common_12 = require_common(); - var auth_module_options_1 = require_auth_module_options(); - var PassportModule = exports2.PassportModule = PassportModule_1 = class PassportModule { - static register(options) { - return { - module: PassportModule_1, - providers: [{ provide: auth_module_options_1.AuthModuleOptions, useValue: options }], - exports: [auth_module_options_1.AuthModuleOptions] - }; - } - static registerAsync(options) { - return { - module: PassportModule_1, - imports: options.imports || [], - providers: this.createAsyncProviders(options), - exports: [auth_module_options_1.AuthModuleOptions] - }; - } - static createAsyncProviders(options) { - if (options.useExisting || options.useFactory) { - return [this.createAsyncOptionsProvider(options)]; - } - return [ - this.createAsyncOptionsProvider(options), - { - provide: options.useClass, - useClass: options.useClass - } - ]; - } - static createAsyncOptionsProvider(options) { - if (options.useFactory) { - return { - provide: auth_module_options_1.AuthModuleOptions, - useFactory: options.useFactory, - inject: options.inject || [] - }; - } - return { - provide: auth_module_options_1.AuthModuleOptions, - useFactory: async (optionsFactory) => await optionsFactory.createAuthOptions(), - inject: [options.useExisting || options.useClass] - }; - } - }; - exports2.PassportModule = PassportModule = PassportModule_1 = __decorate4([ - (0, common_12.Module)({}) - ], PassportModule); - } -}); - -// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/passport/passport.serializer.js -var require_passport_serializer = __commonJS({ - "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/passport/passport.serializer.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PassportSerializer = void 0; - var passport = require_lib7(); - var PassportSerializer = class { - constructor() { - const passportInstance = this.getPassportInstance(); - passportInstance.serializeUser((user, done) => this.serializeUser(user, done)); - passportInstance.deserializeUser((payload, done) => this.deserializeUser(payload, done)); - } - getPassportInstance() { - return passport; - } - }; - exports2.PassportSerializer = PassportSerializer; - } -}); - -// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/passport/passport.strategy.js -var require_passport_strategy = __commonJS({ - "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/passport/passport.strategy.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PassportStrategy = void 0; - var passport = require_lib7(); - function PassportStrategy(Strategy, name, callbackArity) { - class MixinStrategy extends Strategy { - constructor(...args) { - const callback = async (...params) => { - const done = params[params.length - 1]; - try { - const validateResult = await this.validate(...params); - if (Array.isArray(validateResult)) { - done(null, ...validateResult); - } else { - done(null, validateResult); - } - } catch (err) { - done(err, null); - } - }; - if (callbackArity !== void 0) { - const validate = new.target?.prototype?.validate; - const arity = callbackArity === true ? validate.length + 1 : callbackArity; - if (validate) { - Object.defineProperty(callback, "length", { - value: arity - }); - } - } - super(...args, callback); - const passportInstance = this.getPassportInstance(); - if (name) { - passportInstance.use(name, this); - } else { - passportInstance.use(this); - } - } - getPassportInstance() { - return passport; - } - } - return MixinStrategy; - } - exports2.PassportStrategy = PassportStrategy; - } -}); - -// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/index.js -var require_dist2 = __commonJS({ - "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/index.js"(exports2) { - "use strict"; - var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { - return m[k]; - } }; - } - Object.defineProperty(o, k2, desc); - }) : (function(o, m, k, k2) { - if (k2 === void 0) k2 = k; - o[k2] = m[k]; - })); - var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - __exportStar2(require_abstract_strategy(), exports2); - __exportStar2(require_auth_guard(), exports2); - __exportStar2(require_interfaces7(), exports2); - __exportStar2(require_passport_module(), exports2); - __exportStar2(require_passport_serializer(), exports2); - __exportStar2(require_passport_strategy(), exports2); - } -}); - -// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/index.js -var require_passport = __commonJS({ - "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/index.js"(exports2) { - "use strict"; - function __export2(m) { - for (var p in m) if (!exports2.hasOwnProperty(p)) exports2[p] = m[p]; - } - exports2.__esModule = true; - __export2(require_dist2()); - } -}); - -// dist/modules/auth/guards.js -var require_guards2 = __commonJS({ - "dist/modules/auth/guards.js"(exports2) { - "use strict"; - var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - var __metadata3 = exports2 && exports2.__metadata || function(k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PermissionsGuard = exports2.JwtAuthGuard = exports2.CurrentAdmin = exports2.RequirePermission = exports2.REQUIRED_RID_KEY = exports2.Public = exports2.IS_PUBLIC_KEY = void 0; - var common_12 = require_common(); - var passport_1 = require_passport(); - var core_12 = require_core3(); - exports2.IS_PUBLIC_KEY = "isPublic"; - var Public = () => (0, common_12.SetMetadata)(exports2.IS_PUBLIC_KEY, true); - exports2.Public = Public; - exports2.REQUIRED_RID_KEY = "requiredRid"; - var RequirePermission = (rid) => (0, common_12.SetMetadata)(exports2.REQUIRED_RID_KEY, rid); - exports2.RequirePermission = RequirePermission; - exports2.CurrentAdmin = (0, common_12.createParamDecorator)((_data, ctx) => ctx.switchToHttp().getRequest().user); - var JwtAuthGuard = class JwtAuthGuard extends (0, passport_1.AuthGuard)("jwt") { - reflector; - constructor(reflector) { - super(); - this.reflector = reflector; - } - canActivate(context) { - const isPublic = this.reflector.getAllAndOverride(exports2.IS_PUBLIC_KEY, [ - context.getHandler(), - context.getClass() - ]); - if (isPublic) - return true; - return super.canActivate(context); - } - }; - exports2.JwtAuthGuard = JwtAuthGuard; - exports2.JwtAuthGuard = JwtAuthGuard = __decorate4([ - (0, common_12.Injectable)(), - __metadata3("design:paramtypes", [core_12.Reflector]) - ], JwtAuthGuard); - var PermissionsGuard = class PermissionsGuard { - reflector; - constructor(reflector) { - this.reflector = reflector; - } - canActivate(context) { - const requiredRid = this.reflector.getAllAndOverride(exports2.REQUIRED_RID_KEY, [ - context.getHandler(), - context.getClass() - ]); - if (!requiredRid) - return true; - const user = context.switchToHttp().getRequest().user; - if (!user) - throw new common_12.ForbiddenException(); - if (!user.permissions.includes(requiredRid)) { - throw new common_12.ForbiddenException(`Missing permission: ${requiredRid}`); - } - return true; - } - }; - exports2.PermissionsGuard = PermissionsGuard; - exports2.PermissionsGuard = PermissionsGuard = __decorate4([ - (0, common_12.Injectable)(), - __metadata3("design:paramtypes", [core_12.Reflector]) - ], PermissionsGuard); - } -}); - -// dist/modules/catalog/catalog.controller.js -var require_catalog_controller = __commonJS({ - "dist/modules/catalog/catalog.controller.js"(exports2) { - "use strict"; - var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - var __metadata3 = exports2 && exports2.__metadata || function(k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.CatalogController = void 0; - var common_12 = require_common(); - var catalog_service_1 = require_catalog_service(); - var guards_1 = require_guards2(); - var CatalogController = class CatalogController { - catalog; - constructor(catalog) { - this.catalog = catalog; - } - list() { - return this.catalog.listProducts(); - } - }; - exports2.CatalogController = CatalogController; - __decorate4([ - (0, common_12.Get)(), - __metadata3("design:type", Function), - __metadata3("design:paramtypes", []), - __metadata3("design:returntype", void 0) - ], CatalogController.prototype, "list", null); - exports2.CatalogController = CatalogController = __decorate4([ - (0, guards_1.Public)(), - (0, common_12.Controller)("catalog/products"), - __metadata3("design:paramtypes", [catalog_service_1.CatalogService]) - ], CatalogController); - } -}); - -// dist/modules/catalog/catalog.module.js -var require_catalog_module = __commonJS({ - "dist/modules/catalog/catalog.module.js"(exports2) { - "use strict"; - var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.CatalogModule = void 0; - var common_12 = require_common(); - var catalog_service_1 = require_catalog_service(); - var catalog_controller_1 = require_catalog_controller(); - var CatalogModule = class CatalogModule { - }; - exports2.CatalogModule = CatalogModule; - exports2.CatalogModule = CatalogModule = __decorate4([ - (0, common_12.Module)({ - controllers: [catalog_controller_1.CatalogController], - providers: [catalog_service_1.CatalogService], - exports: [catalog_service_1.CatalogService] - }) - ], CatalogModule); - } -}); - -// dist/modules/customers/customers.service.js -var require_customers_service = __commonJS({ - "dist/modules/customers/customers.service.js"(exports2) { - "use strict"; - var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - var __metadata3 = exports2 && exports2.__metadata || function(k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.CustomersService = void 0; - var common_12 = require_common(); - var prisma_service_1 = require_prisma_service(); - var PUBLIC_CUSTOMER_SELECT = { - id: true, - fullName: true, - mobile: true, - nationalCode: true, - cityId: true, - referredByAgentId: true, - goldCreditLimitGrams: true, - goldDebtGrams: true, - fiatDebtRial: true, - verificationStep: true, - nationalIdImageUrl: true, - businessLicenseUrl: true, - shopImageUrl: true, - isActive: true, - createdAt: true, - updatedAt: true - }; - var CustomersService = class CustomersService { - prisma; - constructor(prisma) { - this.prisma = prisma; - } - async getOrThrow(customerId) { - const customer = await this.prisma.customer.findUnique({ - where: { id: customerId }, - select: PUBLIC_CUSTOMER_SELECT - }); - if (!customer) - throw new common_12.NotFoundException(`Customer ${customerId} not found`); - return customer; - } - list() { - return this.prisma.customer.findMany({ - select: PUBLIC_CUSTOMER_SELECT, - orderBy: { createdAt: "desc" } - }); - } - getOrders(customerId) { - return this.prisma.order.findMany({ - where: { customerId }, - include: { items: true }, - orderBy: { createdAt: "desc" } - }); - } - getLedgerEntries(customerId) { - return this.prisma.ledgerEntry.findMany({ - where: { customerId }, - orderBy: { createdAt: "desc" } - }); - } - }; - exports2.CustomersService = CustomersService; - exports2.CustomersService = CustomersService = __decorate4([ - (0, common_12.Injectable)(), - __metadata3("design:paramtypes", [prisma_service_1.PrismaService]) - ], CustomersService); - } -}); - -// dist/modules/customers/customers.controller.js -var require_customers_controller = __commonJS({ - "dist/modules/customers/customers.controller.js"(exports2) { - "use strict"; - var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - var __metadata3 = exports2 && exports2.__metadata || function(k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); - }; - var __param3 = exports2 && exports2.__param || function(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.CustomersController = void 0; - var common_12 = require_common(); - var customers_service_1 = require_customers_service(); - var guards_1 = require_guards2(); - var CustomersController = class CustomersController { - customers; - constructor(customers) { - this.customers = customers; - } - list() { - return this.customers.list(); - } - get(id) { - return this.customers.getOrThrow(id); - } - getOrders(id) { - return this.customers.getOrders(id); - } - getLedgerEntries(id) { - return this.customers.getLedgerEntries(id); - } - }; - exports2.CustomersController = CustomersController; - __decorate4([ - (0, common_12.Get)(), - __metadata3("design:type", Function), - __metadata3("design:paramtypes", []), - __metadata3("design:returntype", void 0) - ], CustomersController.prototype, "list", null); - __decorate4([ - (0, common_12.Get)(":id"), - __param3(0, (0, common_12.Param)("id")), - __metadata3("design:type", Function), - __metadata3("design:paramtypes", [String]), - __metadata3("design:returntype", void 0) - ], CustomersController.prototype, "get", null); - __decorate4([ - (0, common_12.Get)(":id/orders"), - __param3(0, (0, common_12.Param)("id")), - __metadata3("design:type", Function), - __metadata3("design:paramtypes", [String]), - __metadata3("design:returntype", void 0) - ], CustomersController.prototype, "getOrders", null); - __decorate4([ - (0, common_12.Get)(":id/ledger-entries"), - __param3(0, (0, common_12.Param)("id")), - __metadata3("design:type", Function), - __metadata3("design:paramtypes", [String]), - __metadata3("design:returntype", void 0) - ], CustomersController.prototype, "getLedgerEntries", null); - exports2.CustomersController = CustomersController = __decorate4([ - (0, guards_1.Public)(), - (0, common_12.Controller)("customers"), - __metadata3("design:paramtypes", [customers_service_1.CustomersService]) - ], CustomersController); - } -}); - -// dist/modules/customers/customers.module.js -var require_customers_module = __commonJS({ - "dist/modules/customers/customers.module.js"(exports2) { - "use strict"; - var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.CustomersModule = void 0; - var common_12 = require_common(); - var customers_service_1 = require_customers_service(); - var customers_controller_1 = require_customers_controller(); - var CustomersModule = class CustomersModule { - }; - exports2.CustomersModule = CustomersModule; - exports2.CustomersModule = CustomersModule = __decorate4([ - (0, common_12.Module)({ - controllers: [customers_controller_1.CustomersController], - providers: [customers_service_1.CustomersService], - exports: [customers_service_1.CustomersService] - }) - ], CustomersModule); - } -}); - -// ../../packages/shared-types/dist/index.js -var require_dist3 = __commonJS({ - "../../packages/shared-types/dist/index.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PreOrderStatus = exports2.OrderStatus = exports2.LedgerSourceType = exports2.LedgerDirection = exports2.LedgerCurrency = exports2.GRAMS_PER_MESGHAL = exports2.STANDARD_KARAT_PER_MILLE = void 0; - exports2.STANDARD_KARAT_PER_MILLE = 750; - exports2.GRAMS_PER_MESGHAL = 4.331802; - var LedgerCurrency; - (function(LedgerCurrency2) { - LedgerCurrency2["GOLD_GRAM"] = "GOLD_GRAM"; - LedgerCurrency2["RIAL"] = "RIAL"; - })(LedgerCurrency || (exports2.LedgerCurrency = LedgerCurrency = {})); - var LedgerDirection; - (function(LedgerDirection2) { - LedgerDirection2["DEBIT"] = "DEBIT"; - LedgerDirection2["CREDIT"] = "CREDIT"; - })(LedgerDirection || (exports2.LedgerDirection = LedgerDirection = {})); - var LedgerSourceType; - (function(LedgerSourceType2) { - LedgerSourceType2["ORDER_STOCK"] = "ORDER_STOCK"; - LedgerSourceType2["ORDER_PRE_ORDER"] = "ORDER_PRE_ORDER"; - LedgerSourceType2["REPAYMENT_MELTED_GOLD"] = "REPAYMENT_MELTED_GOLD"; - LedgerSourceType2["REPAYMENT_TRANSFER"] = "REPAYMENT_TRANSFER"; - LedgerSourceType2["REPAYMENT_CHEQUE"] = "REPAYMENT_CHEQUE"; - LedgerSourceType2["REPAYMENT_CASH"] = "REPAYMENT_CASH"; - LedgerSourceType2["WALLET_BONUS"] = "WALLET_BONUS"; - LedgerSourceType2["ADJUSTMENT"] = "ADJUSTMENT"; - })(LedgerSourceType || (exports2.LedgerSourceType = LedgerSourceType = {})); - var OrderStatus; - (function(OrderStatus2) { - OrderStatus2["SUSPENDED"] = "SUSPENDED"; - OrderStatus2["PLACED"] = "PLACED"; - OrderStatus2["ADMIN_APPROVED"] = "ADMIN_APPROVED"; - OrderStatus2["SOURCING"] = "SOURCING"; - OrderStatus2["PREPARING"] = "PREPARING"; - OrderStatus2["DELIVERED_TO_AGENT"] = "DELIVERED_TO_AGENT"; - OrderStatus2["DELIVERED_TO_CUSTOMER"] = "DELIVERED_TO_CUSTOMER"; - OrderStatus2["CANCELLED"] = "CANCELLED"; - })(OrderStatus || (exports2.OrderStatus = OrderStatus = {})); - var PreOrderStatus; - (function(PreOrderStatus2) { - PreOrderStatus2["PLACED"] = "PLACED"; - PreOrderStatus2["ADMIN_APPROVED"] = "ADMIN_APPROVED"; - PreOrderStatus2["WORKSHOP_APPROVED"] = "WORKSHOP_APPROVED"; - PreOrderStatus2["READY_TO_SHIP"] = "READY_TO_SHIP"; - PreOrderStatus2["DELIVERED"] = "DELIVERED"; - PreOrderStatus2["CANCELLED"] = "CANCELLED"; - })(PreOrderStatus || (exports2.PreOrderStatus = PreOrderStatus = {})); - } -}); - -// dist/modules/accounting/ledger.service.js -var require_ledger_service = __commonJS({ - "dist/modules/accounting/ledger.service.js"(exports2) { - "use strict"; - var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - var __metadata3 = exports2 && exports2.__metadata || function(k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.LedgerService = void 0; - var common_12 = require_common(); - var client_1 = require("@prisma/client"); - var shared_types_1 = require_dist3(); - var prisma_service_1 = require_prisma_service(); - var LedgerService = class LedgerService { - prisma; - constructor(prisma) { - this.prisma = prisma; - } - /** Posts a ledger entry and, if confirmed, applies it to the cached customer balance. */ - async postEntry(input, tx = this.prisma) { - const amount = new client_1.Prisma.Decimal(input.amount); - if (amount.lte(0)) { - throw new common_12.BadRequestException("Ledger entry amount must be positive"); - } - const confirmed = input.confirmed ?? false; - const entry = await tx.ledgerEntry.create({ - data: { - customerId: input.customerId, - currency: input.currency, - direction: input.direction, - sourceType: input.sourceType, - amount, - orderId: input.orderId, - karatPerMille: input.karatPerMille, - pricePerGramRialAtEntry: input.pricePerGramRialAtEntry !== void 0 ? new client_1.Prisma.Decimal(input.pricePerGramRialAtEntry) : void 0, - note: input.note, - confirmed, - confirmedAt: confirmed ? /* @__PURE__ */ new Date() : null, - postedByAdminUserId: input.postedByAdminUserId - } - }); - if (confirmed) { - await this.applyToBalance(input.customerId, input.currency, input.direction, amount, tx); - } - return entry; - } - /** - * Marks a pending repayment entry confirmed. Legacy's confirmed toggle - * (Adm\CashController::toggleConfiremCash) is bidirectional and used for - * post-hoc correction/rejection — legacy Cash rows are auto-confirmed - * (confirmed=1) at creation, not created pending. This system intentionally - * requires an explicit confirmation step before a repayment counts (see - * postGoldRepayment for the full rationale) — that is a deliberate design - * change from legacy, not a faithful mirror of it. - */ - async confirmEntry(entryId, adminUserId, tx = this.prisma) { - const entry = await tx.ledgerEntry.findUnique({ where: { id: entryId } }); - if (!entry) - throw new common_12.NotFoundException("Ledger entry not found"); - if (entry.confirmed) - return entry; - const updated = await tx.ledgerEntry.update({ - where: { id: entryId }, - data: { confirmed: true, confirmedAt: /* @__PURE__ */ new Date(), postedByAdminUserId: adminUserId ?? entry.postedByAdminUserId } - }); - await this.applyToBalance(entry.customerId, entry.currency, entry.direction, entry.amount, tx); - return updated; - } - async applyToBalance(customerId, currency, direction, amount, tx) { - const signedDelta = direction === client_1.LedgerDirection.DEBIT ? amount : amount.neg(); - await tx.customer.update({ - where: { id: customerId }, - data: currency === client_1.LedgerCurrency.GOLD_GRAM ? { goldDebtGrams: { increment: signedDelta } } : { fiatDebtRial: { increment: signedDelta } } - }); - } - /** - * Posts the dual-currency debt for a stock order once it reaches - * DELIVERED_TO_AGENT: GOLD_GRAM debt = order.totalGoldWeightGrams, RIAL debt - * = order.flatRialCharge. Both entries are self-confirming — the status - * transition itself is the confirming event (mirrors legacy sts>4, which - * first becomes true at sts=5 "تحویل مسئول فروش" / delivered to agent, not - * sts=6 delivered to customer). - */ - async postOrderDebt(orderId, tx = this.prisma) { - const order = await tx.order.findUnique({ where: { id: orderId } }); - if (!order) - throw new common_12.NotFoundException("Order not found"); - await this.postEntry({ - customerId: order.customerId, - currency: client_1.LedgerCurrency.GOLD_GRAM, - direction: client_1.LedgerDirection.DEBIT, - sourceType: client_1.LedgerSourceType.ORDER_STOCK, - amount: order.totalGoldWeightGrams, - orderId: order.id, - confirmed: true, - note: "Gold-weight debt on delivery" - }, tx); - if (new client_1.Prisma.Decimal(order.flatRialCharge).gt(0)) { - await this.postEntry({ - customerId: order.customerId, - currency: client_1.LedgerCurrency.RIAL, - direction: client_1.LedgerDirection.DEBIT, - sourceType: client_1.LedgerSourceType.ORDER_STOCK, - amount: order.flatRialCharge, - orderId: order.id, - confirmed: true, - note: "Flat Rial charge (e.g. stones) on delivery" - }, tx); - } - } - /** - * Normalizes a physical repayment instrument into gold grams and posts a - * pending (unconfirmed) CREDIT entry against the customer's gold debt. - * Formulas preserved verbatim from legacy CashController::store. Note: - * legacy auto-confirms (confirmed=1) every Cash row at creation — posting - * this as pending instead is an intentional design change, not a mirror of - * legacy's default. - */ - async postGoldRepayment(params, tx = this.prisma) { - const raw = new client_1.Prisma.Decimal(params.rawValue); - let goldGramsValue; - let sourceType; - switch (params.instrument) { - case "MELTED_GOLD": { - if (!params.karatPerMille) { - throw new common_12.BadRequestException("karatPerMille is required for a melted-gold repayment"); - } - goldGramsValue = raw.mul(params.karatPerMille).div(shared_types_1.STANDARD_KARAT_PER_MILLE); - sourceType = client_1.LedgerSourceType.REPAYMENT_MELTED_GOLD; - break; - } - case "CASH": { - if (!params.pricePerGramRial) { - throw new common_12.BadRequestException("pricePerGramRial is required for a cash repayment"); - } - const pricePerGram = new client_1.Prisma.Decimal(params.pricePerGramRial); - goldGramsValue = raw.div(pricePerGram.div(shared_types_1.GRAMS_PER_MESGHAL)); - sourceType = client_1.LedgerSourceType.REPAYMENT_CASH; - break; - } - case "TRANSFER": - goldGramsValue = raw; - sourceType = client_1.LedgerSourceType.REPAYMENT_TRANSFER; - break; - case "CHEQUE": - goldGramsValue = raw; - sourceType = client_1.LedgerSourceType.REPAYMENT_CHEQUE; - break; - } - return this.postEntry({ - customerId: params.customerId, - currency: client_1.LedgerCurrency.GOLD_GRAM, - direction: client_1.LedgerDirection.CREDIT, - sourceType, - amount: goldGramsValue, - karatPerMille: params.karatPerMille, - pricePerGramRialAtEntry: params.pricePerGramRial, - note: params.note, - confirmed: false, - // pending until an admin confirms — intentional deviation from legacy, which auto-confirms on creation - postedByAdminUserId: params.postedByAdminUserId - }, tx); - } - /** - * Direct Rial-debt repayment. Not present in the legacy system (its - * rial_remain had no repayment offset at all — a gap flagged during - * migration analysis) but supported here since the new ledger is symmetric. - */ - async postRialRepayment(params, tx = this.prisma) { - return this.postEntry({ - customerId: params.customerId, - currency: client_1.LedgerCurrency.RIAL, - direction: client_1.LedgerDirection.CREDIT, - sourceType: client_1.LedgerSourceType.REPAYMENT_CASH, - amount: params.amount, - note: params.note, - confirmed: false, - postedByAdminUserId: params.postedByAdminUserId - }, tx); - } - async postAdjustment(params, tx = this.prisma) { - return this.postEntry({ - customerId: params.customerId, - currency: params.currency, - direction: params.direction, - sourceType: client_1.LedgerSourceType.ADJUSTMENT, - amount: params.amount, - note: params.note, - confirmed: true, - postedByAdminUserId: params.postedByAdminUserId - }, tx); - } - async getBalance(customerId) { - const customer = await this.prisma.customer.findUnique({ - where: { id: customerId }, - select: { id: true, goldDebtGrams: true, fiatDebtRial: true, goldCreditLimitGrams: true } - }); - if (!customer) - throw new common_12.NotFoundException("Customer not found"); - return { - customerId: customer.id, - goldDebtGrams: customer.goldDebtGrams, - fiatDebtRial: customer.fiatDebtRial, - goldCreditLimitGrams: customer.goldCreditLimitGrams - }; - } - /** - * Recomputes cached balances from confirmed LedgerEntry rows and overwrites - * the cache — a self-healing reconciliation, run periodically or on demand, - * unlike legacy's recompute-on-every-write (Customer::updateRemain). - */ - async reconcileBalance(customerId) { - const [goldDebits, goldCredits, rialDebits, rialCredits] = await Promise.all([ - this.sumConfirmed(customerId, client_1.LedgerCurrency.GOLD_GRAM, client_1.LedgerDirection.DEBIT), - this.sumConfirmed(customerId, client_1.LedgerCurrency.GOLD_GRAM, client_1.LedgerDirection.CREDIT), - this.sumConfirmed(customerId, client_1.LedgerCurrency.RIAL, client_1.LedgerDirection.DEBIT), - this.sumConfirmed(customerId, client_1.LedgerCurrency.RIAL, client_1.LedgerDirection.CREDIT) - ]); - return this.prisma.customer.update({ - where: { id: customerId }, - data: { - goldDebtGrams: goldDebits.sub(goldCredits), - fiatDebtRial: rialDebits.sub(rialCredits) - } - }); - } - async sumConfirmed(customerId, currency, direction) { - const result = await this.prisma.ledgerEntry.aggregate({ - where: { customerId, currency, direction, confirmed: true }, - _sum: { amount: true } - }); - return result._sum.amount ?? new client_1.Prisma.Decimal(0); - } - }; - exports2.LedgerService = LedgerService; - exports2.LedgerService = LedgerService = __decorate4([ - (0, common_12.Injectable)(), - __metadata3("design:paramtypes", [prisma_service_1.PrismaService]) - ], LedgerService); - } -}); - -// dist/modules/orders/orders.service.js -var require_orders_service = __commonJS({ - "dist/modules/orders/orders.service.js"(exports2) { - "use strict"; - var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - var __metadata3 = exports2 && exports2.__metadata || function(k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.OrdersService = void 0; - var common_12 = require_common(); - var client_1 = require("@prisma/client"); - var prisma_service_1 = require_prisma_service(); - var catalog_service_1 = require_catalog_service(); - var ledger_service_1 = require_ledger_service(); - var OrdersService = class OrdersService { - prisma; - catalog; - ledger; - constructor(prisma, catalog, ledger) { - this.prisma = prisma; - this.catalog = catalog; - this.ledger = ledger; - } - /** - * Places a stock order. Per line item: - * w = rashWeightGrams * (1 + (wagePercent - discountPercent) / 100) - * mirrors legacy ApiMobileController::setOrder. Debt is NOT posted here — - * only once the order reaches DELIVERED_TO_AGENT (see updateStatus). - */ - async createOrder(dto) { - const customer = await this.prisma.customer.findUnique({ where: { id: dto.customerId } }); - if (!customer) - throw new common_12.NotFoundException(`Customer ${dto.customerId} not found`); - const computedItems = await Promise.all(dto.items.map(async (item) => { - const variant = await this.catalog.getVariantOrThrow(item.productVariantId); - const rashWeight = new client_1.Prisma.Decimal(variant.rashWeightGrams); - const wagePercent = new client_1.Prisma.Decimal(item.wagePercent); - const discountPercent = new client_1.Prisma.Decimal(item.discountPercent ?? 0); - const netPercent = wagePercent.sub(discountPercent); - const computedWeightGrams = rashWeight.mul(netPercent.div(100).add(1)); - return { - productVariantId: variant.id, - quantity: item.quantity, - rashWeightGramsSnapshot: rashWeight, - wagePercentSnapshot: wagePercent, - discountPercentSnapshot: discountPercent, - computedWeightGrams, - flatRialCharge: new client_1.Prisma.Decimal(item.flatRialCharge ?? 0) - }; - })); - const totalGoldWeightGrams = computedItems.reduce((sum, item) => sum.add(item.computedWeightGrams.mul(item.quantity)), new client_1.Prisma.Decimal(0)); - const totalRashWeightGrams = computedItems.reduce((sum, item) => sum.add(item.rashWeightGramsSnapshot.mul(item.quantity)), new client_1.Prisma.Decimal(0)); - const wageWeightGrams = totalGoldWeightGrams.sub(totalRashWeightGrams); - const flatRialCharge = computedItems.reduce((sum, item) => sum.add(item.flatRialCharge.mul(item.quantity)), new client_1.Prisma.Decimal(0)); - const isSuspendedOverCreditLimit = totalGoldWeightGrams.add(customer.goldDebtGrams).gt(customer.goldCreditLimitGrams); - const initialStatus = isSuspendedOverCreditLimit ? client_1.OrderStatus.SUSPENDED : client_1.OrderStatus.PLACED; - return this.prisma.$transaction(async (tx) => { - const order = await tx.order.create({ - data: { - orderNumber: this.generateOrderNumber(), - customerId: dto.customerId, - branchId: dto.branchId, - channel: dto.channel ?? client_1.OrderChannel.RETAIL, - status: initialStatus, - totalGoldWeightGrams, - wageWeightGrams, - flatRialCharge, - isSuspendedOverCreditLimit, - items: { - create: computedItems.map((item) => ({ - productVariantId: item.productVariantId, - quantity: item.quantity, - rashWeightGramsSnapshot: item.rashWeightGramsSnapshot, - wagePercentSnapshot: item.wagePercentSnapshot, - discountPercentSnapshot: item.discountPercentSnapshot, - computedWeightGrams: item.computedWeightGrams, - flatRialCharge: item.flatRialCharge - })) - }, - statusEvents: { - create: { toStatus: initialStatus, note: isSuspendedOverCreditLimit ? "Credit limit exceeded" : void 0 } - } - }, - include: { items: true, statusEvents: true } + chunks.push(chunk); }); - return order; + res.on("end", () => finish(() => resolve({ status: res.statusCode ?? 0, body: Buffer.concat(chunks).toString("utf8") }))); + res.on("error", (err) => finish(() => reject(new AccountingHttpError(err.message, true, "RESPONSE")))); }); - } - async updateStatus(orderId, newStatus, actorAdminUserId, note) { - return this.prisma.$transaction(async (tx) => { - const order = await tx.order.findUnique({ where: { id: orderId } }); - if (!order) - throw new common_12.NotFoundException(`Order ${orderId} not found`); - const updated = await tx.order.update({ - where: { id: orderId }, - data: { - status: newStatus, - deliveredAt: newStatus === client_1.OrderStatus.DELIVERED_TO_CUSTOMER ? /* @__PURE__ */ new Date() : order.deliveredAt - } - }); - await tx.orderStatusEvent.create({ - data: { orderId, fromStatus: order.status, toStatus: newStatus, note, actorAdminUserId } - }); - if (newStatus === client_1.OrderStatus.DELIVERED_TO_AGENT && !order.deliveredAt) { - await this.ledger.postOrderDebt(orderId, tx); + request.on("socket", (socket) => { + if (!socket.connecting) { + connected = true; + return; } - return updated; + socket.once(isHttps ? "secureConnect" : "connect", () => { + connected = true; + }); }); - } - getById(orderId) { - return this.prisma.order.findUnique({ - where: { id: orderId }, - include: { items: true, statusEvents: true, ledgerEntries: true } + const timer = setTimeout(() => { + request.destroy(); + finish(() => reject(new AccountingHttpError(connected ? "\u067E\u0627\u0633\u062E \u0633\u0631\u0648\u0631 \u062D\u0633\u0627\u0628\u062F\u0627\u0631\u06CC \u062F\u0631 \u0632\u0645\u0627\u0646 \u0645\u0642\u0631\u0631 \u0646\u0631\u0633\u06CC\u062F" : "\u0627\u062A\u0635\u0627\u0644 \u0628\u0647 \u0633\u0631\u0648\u0631 \u062D\u0633\u0627\u0628\u062F\u0627\u0631\u06CC \u0628\u0631\u0642\u0631\u0627\u0631 \u0646\u0634\u062F (timeout)", connected, "TIMEOUT"))); + }, req.timeoutMs); + request.on("error", (err) => { + const text = isHttps && err.code && TLS_CERT_ERRORS.test(err.code) ? tlsErrorMessage(err, pins.size > 0) : err.message; + finish(() => reject(new AccountingHttpError(text, connected, err.code))); }); - } - generateOrderNumber() { - const random = Math.random().toString(36).slice(2, 8).toUpperCase(); - return `ORD-${Date.now()}-${random}`; - } - }; - exports2.OrdersService = OrdersService; - exports2.OrdersService = OrdersService = __decorate4([ - (0, common_12.Injectable)(), - __metadata3("design:paramtypes", [ - prisma_service_1.PrismaService, - catalog_service_1.CatalogService, - ledger_service_1.LedgerService - ]) - ], OrdersService); - } -}); - -// dist/modules/orders/dto/create-order.dto.js -var require_create_order_dto = __commonJS({ - "dist/modules/orders/dto/create-order.dto.js"(exports2) { - "use strict"; - var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - var __metadata3 = exports2 && exports2.__metadata || function(k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.CreateOrderDto = exports2.CreateOrderItemInputDto = void 0; - var class_transformer_1 = require_cjs2(); - var client_1 = require("@prisma/client"); - var class_validator_1 = require_cjs(); - var CreateOrderItemInputDto = class { - productVariantId; - quantity; - /** Making-charge percentage negotiated for this order (may differ from the variant default). */ - wagePercent; - discountPercent; - /** Flat Rial charge per unit, independent of gold weight (e.g. stones). */ - flatRialCharge; - }; - exports2.CreateOrderItemInputDto = CreateOrderItemInputDto; - __decorate4([ - (0, class_validator_1.IsString)(), - __metadata3("design:type", String) - ], CreateOrderItemInputDto.prototype, "productVariantId", void 0); - __decorate4([ - (0, class_validator_1.IsInt)(), - (0, class_validator_1.Min)(1), - __metadata3("design:type", Number) - ], CreateOrderItemInputDto.prototype, "quantity", void 0); - __decorate4([ - (0, class_validator_1.IsNumber)(), - __metadata3("design:type", Number) - ], CreateOrderItemInputDto.prototype, "wagePercent", void 0); - __decorate4([ - (0, class_validator_1.IsOptional)(), - (0, class_validator_1.IsNumber)(), - __metadata3("design:type", Number) - ], CreateOrderItemInputDto.prototype, "discountPercent", void 0); - __decorate4([ - (0, class_validator_1.IsOptional)(), - (0, class_validator_1.IsNumber)(), - __metadata3("design:type", Number) - ], CreateOrderItemInputDto.prototype, "flatRialCharge", void 0); - var CreateOrderDto = class { - customerId; - branchId; - /** - * Which sales channel placed the order. Legacy had no such field because the - * two channels lived in separate tables (orders vs orders_orders); the one - * Order model carries the distinction here. Defaults to RETAIL. - */ - channel; - items; - }; - exports2.CreateOrderDto = CreateOrderDto; - __decorate4([ - (0, class_validator_1.IsString)(), - __metadata3("design:type", String) - ], CreateOrderDto.prototype, "customerId", void 0); - __decorate4([ - (0, class_validator_1.IsOptional)(), - (0, class_validator_1.IsString)(), - __metadata3("design:type", String) - ], CreateOrderDto.prototype, "branchId", void 0); - __decorate4([ - (0, class_validator_1.IsOptional)(), - (0, class_validator_1.IsEnum)(client_1.OrderChannel), - __metadata3("design:type", String) - ], CreateOrderDto.prototype, "channel", void 0); - __decorate4([ - (0, class_validator_1.IsArray)(), - (0, class_validator_1.ArrayMinSize)(1), - (0, class_validator_1.ValidateNested)({ each: true }), - (0, class_transformer_1.Type)(() => CreateOrderItemInputDto), - __metadata3("design:type", Array) - ], CreateOrderDto.prototype, "items", void 0); - } -}); - -// dist/modules/orders/dto/update-order-status.dto.js -var require_update_order_status_dto = __commonJS({ - "dist/modules/orders/dto/update-order-status.dto.js"(exports2) { - "use strict"; - var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - var __metadata3 = exports2 && exports2.__metadata || function(k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.UpdateOrderStatusDto = void 0; - var class_validator_1 = require_cjs(); - var client_1 = require("@prisma/client"); - var UpdateOrderStatusDto = class { - status; - note; - actorAdminUserId; - }; - exports2.UpdateOrderStatusDto = UpdateOrderStatusDto; - __decorate4([ - (0, class_validator_1.IsEnum)(client_1.OrderStatus), - __metadata3("design:type", String) - ], UpdateOrderStatusDto.prototype, "status", void 0); - __decorate4([ - (0, class_validator_1.IsOptional)(), - (0, class_validator_1.IsString)(), - __metadata3("design:type", String) - ], UpdateOrderStatusDto.prototype, "note", void 0); - __decorate4([ - (0, class_validator_1.IsOptional)(), - (0, class_validator_1.IsString)(), - __metadata3("design:type", String) - ], UpdateOrderStatusDto.prototype, "actorAdminUserId", void 0); - } -}); - -// dist/modules/orders/orders.controller.js -var require_orders_controller = __commonJS({ - "dist/modules/orders/orders.controller.js"(exports2) { - "use strict"; - var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - var __metadata3 = exports2 && exports2.__metadata || function(k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); - }; - var __param3 = exports2 && exports2.__param || function(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.OrdersController = void 0; - var common_12 = require_common(); - var orders_service_1 = require_orders_service(); - var create_order_dto_1 = require_create_order_dto(); - var update_order_status_dto_1 = require_update_order_status_dto(); - var guards_1 = require_guards2(); - var OrdersController = class OrdersController { - orders; - constructor(orders) { - this.orders = orders; - } - create(dto) { - return this.orders.createOrder(dto); - } - get(id) { - return this.orders.getById(id); - } - updateStatus(id, dto) { - return this.orders.updateStatus(id, dto.status, dto.actorAdminUserId, dto.note); - } - }; - exports2.OrdersController = OrdersController; - __decorate4([ - (0, common_12.Post)(), - __param3(0, (0, common_12.Body)()), - __metadata3("design:type", Function), - __metadata3("design:paramtypes", [create_order_dto_1.CreateOrderDto]), - __metadata3("design:returntype", void 0) - ], OrdersController.prototype, "create", null); - __decorate4([ - (0, common_12.Get)(":id"), - __param3(0, (0, common_12.Param)("id")), - __metadata3("design:type", Function), - __metadata3("design:paramtypes", [String]), - __metadata3("design:returntype", void 0) - ], OrdersController.prototype, "get", null); - __decorate4([ - (0, common_12.Patch)(":id/status"), - __param3(0, (0, common_12.Param)("id")), - __param3(1, (0, common_12.Body)()), - __metadata3("design:type", Function), - __metadata3("design:paramtypes", [String, update_order_status_dto_1.UpdateOrderStatusDto]), - __metadata3("design:returntype", void 0) - ], OrdersController.prototype, "updateStatus", null); - exports2.OrdersController = OrdersController = __decorate4([ - (0, guards_1.Public)(), - (0, common_12.Controller)("orders"), - __metadata3("design:paramtypes", [orders_service_1.OrdersService]) - ], OrdersController); - } -}); - -// dist/modules/accounting/dto/post-gold-repayment.dto.js -var require_post_gold_repayment_dto = __commonJS({ - "dist/modules/accounting/dto/post-gold-repayment.dto.js"(exports2) { - "use strict"; - var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - var __metadata3 = exports2 && exports2.__metadata || function(k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PostGoldRepaymentDto = void 0; - var class_validator_1 = require_cjs(); - var PostGoldRepaymentDto = class { - customerId; - instrument; - rawValue; - karatPerMille; - pricePerGramRial; - note; - }; - exports2.PostGoldRepaymentDto = PostGoldRepaymentDto; - __decorate4([ - (0, class_validator_1.IsString)(), - __metadata3("design:type", String) - ], PostGoldRepaymentDto.prototype, "customerId", void 0); - __decorate4([ - (0, class_validator_1.IsIn)(["MELTED_GOLD", "TRANSFER", "CHEQUE", "CASH"]), - __metadata3("design:type", String) - ], PostGoldRepaymentDto.prototype, "instrument", void 0); - __decorate4([ - (0, class_validator_1.IsNumber)(), - (0, class_validator_1.IsPositive)(), - __metadata3("design:type", Number) - ], PostGoldRepaymentDto.prototype, "rawValue", void 0); - __decorate4([ - (0, class_validator_1.IsOptional)(), - (0, class_validator_1.IsNumber)(), - __metadata3("design:type", Number) - ], PostGoldRepaymentDto.prototype, "karatPerMille", void 0); - __decorate4([ - (0, class_validator_1.IsOptional)(), - (0, class_validator_1.IsNumber)(), - (0, class_validator_1.IsPositive)(), - __metadata3("design:type", Number) - ], PostGoldRepaymentDto.prototype, "pricePerGramRial", void 0); - __decorate4([ - (0, class_validator_1.IsOptional)(), - (0, class_validator_1.IsString)(), - __metadata3("design:type", String) - ], PostGoldRepaymentDto.prototype, "note", void 0); - } -}); - -// dist/modules/accounting/dto/post-rial-repayment.dto.js -var require_post_rial_repayment_dto = __commonJS({ - "dist/modules/accounting/dto/post-rial-repayment.dto.js"(exports2) { - "use strict"; - var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - var __metadata3 = exports2 && exports2.__metadata || function(k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PostRialRepaymentDto = void 0; - var class_validator_1 = require_cjs(); - var PostRialRepaymentDto = class { - customerId; - amount; - note; - }; - exports2.PostRialRepaymentDto = PostRialRepaymentDto; - __decorate4([ - (0, class_validator_1.IsString)(), - __metadata3("design:type", String) - ], PostRialRepaymentDto.prototype, "customerId", void 0); - __decorate4([ - (0, class_validator_1.IsNumber)(), - (0, class_validator_1.IsPositive)(), - __metadata3("design:type", Number) - ], PostRialRepaymentDto.prototype, "amount", void 0); - __decorate4([ - (0, class_validator_1.IsOptional)(), - (0, class_validator_1.IsString)(), - __metadata3("design:type", String) - ], PostRialRepaymentDto.prototype, "note", void 0); - } -}); - -// dist/modules/accounting/accounting.controller.js -var require_accounting_controller = __commonJS({ - "dist/modules/accounting/accounting.controller.js"(exports2) { - "use strict"; - var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - var __metadata3 = exports2 && exports2.__metadata || function(k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); - }; - var __param3 = exports2 && exports2.__param || function(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AccountingController = void 0; - var common_12 = require_common(); - var ledger_service_1 = require_ledger_service(); - var post_gold_repayment_dto_1 = require_post_gold_repayment_dto(); - var post_rial_repayment_dto_1 = require_post_rial_repayment_dto(); - var guards_1 = require_guards2(); - var AccountingController = class AccountingController { - ledger; - constructor(ledger) { - this.ledger = ledger; - } - getBalance(customerId) { - return this.ledger.getBalance(customerId); - } - reconcile(customerId) { - return this.ledger.reconcileBalance(customerId); - } - postGoldRepayment(dto) { - return this.ledger.postGoldRepayment(dto); - } - postRialRepayment(dto) { - return this.ledger.postRialRepayment(dto); - } - confirmEntry(entryId) { - return this.ledger.confirmEntry(entryId); - } - }; - exports2.AccountingController = AccountingController; - __decorate4([ - (0, common_12.Get)("customers/:customerId/balance"), - __param3(0, (0, common_12.Param)("customerId")), - __metadata3("design:type", Function), - __metadata3("design:paramtypes", [String]), - __metadata3("design:returntype", void 0) - ], AccountingController.prototype, "getBalance", null); - __decorate4([ - (0, common_12.Post)("customers/:customerId/reconcile"), - __param3(0, (0, common_12.Param)("customerId")), - __metadata3("design:type", Function), - __metadata3("design:paramtypes", [String]), - __metadata3("design:returntype", void 0) - ], AccountingController.prototype, "reconcile", null); - __decorate4([ - (0, common_12.Post)("repayments/gold"), - __param3(0, (0, common_12.Body)()), - __metadata3("design:type", Function), - __metadata3("design:paramtypes", [post_gold_repayment_dto_1.PostGoldRepaymentDto]), - __metadata3("design:returntype", void 0) - ], AccountingController.prototype, "postGoldRepayment", null); - __decorate4([ - (0, common_12.Post)("repayments/rial"), - __param3(0, (0, common_12.Body)()), - __metadata3("design:type", Function), - __metadata3("design:paramtypes", [post_rial_repayment_dto_1.PostRialRepaymentDto]), - __metadata3("design:returntype", void 0) - ], AccountingController.prototype, "postRialRepayment", null); - __decorate4([ - (0, common_12.Post)("entries/:entryId/confirm"), - __param3(0, (0, common_12.Param)("entryId")), - __metadata3("design:type", Function), - __metadata3("design:paramtypes", [String]), - __metadata3("design:returntype", void 0) - ], AccountingController.prototype, "confirmEntry", null); - exports2.AccountingController = AccountingController = __decorate4([ - (0, guards_1.Public)(), - (0, common_12.Controller)("accounting"), - __metadata3("design:paramtypes", [ledger_service_1.LedgerService]) - ], AccountingController); - } -}); - -// dist/modules/accounting/accounting.module.js -var require_accounting_module = __commonJS({ - "dist/modules/accounting/accounting.module.js"(exports2) { - "use strict"; - var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AccountingModule = void 0; - var common_12 = require_common(); - var ledger_service_1 = require_ledger_service(); - var accounting_controller_1 = require_accounting_controller(); - var AccountingModule = class AccountingModule { - }; - exports2.AccountingModule = AccountingModule; - exports2.AccountingModule = AccountingModule = __decorate4([ - (0, common_12.Module)({ - controllers: [accounting_controller_1.AccountingController], - providers: [ledger_service_1.LedgerService], - exports: [ledger_service_1.LedgerService] - }) - ], AccountingModule); - } -}); - -// dist/modules/orders/orders.module.js -var require_orders_module = __commonJS({ - "dist/modules/orders/orders.module.js"(exports2) { - "use strict"; - var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.OrdersModule = void 0; - var common_12 = require_common(); - var orders_service_1 = require_orders_service(); - var orders_controller_1 = require_orders_controller(); - var catalog_module_1 = require_catalog_module(); - var accounting_module_1 = require_accounting_module(); - var OrdersModule = class OrdersModule { - }; - exports2.OrdersModule = OrdersModule; - exports2.OrdersModule = OrdersModule = __decorate4([ - (0, common_12.Module)({ - imports: [catalog_module_1.CatalogModule, accounting_module_1.AccountingModule], - controllers: [orders_controller_1.OrdersController], - providers: [orders_service_1.OrdersService], - exports: [orders_service_1.OrdersService] - }) - ], OrdersModule); - } -}); - -// dist/modules/pricing/pricing.service.js -var require_pricing_service = __commonJS({ - "dist/modules/pricing/pricing.service.js"(exports2) { - "use strict"; - var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - var __metadata3 = exports2 && exports2.__metadata || function(k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PricingService = void 0; - var common_12 = require_common(); - var prisma_service_1 = require_prisma_service(); - var PricingService = class PricingService { - prisma; - constructor(prisma) { - this.prisma = prisma; - } - async recordQuote(karatPerMille, pricePerGramRial, source) { - return this.prisma.goldPriceQuote.create({ - data: { karatPerMille, pricePerGramRial, source } - }); - } - async getLatestQuote(karatPerMille) { - const quote = await this.prisma.goldPriceQuote.findFirst({ - where: { karatPerMille }, - orderBy: { quotedAt: "desc" } - }); - if (!quote) - throw new common_12.NotFoundException(`No gold price quote recorded for ${karatPerMille}\u2030`); - return quote; - } - }; - exports2.PricingService = PricingService; - exports2.PricingService = PricingService = __decorate4([ - (0, common_12.Injectable)(), - __metadata3("design:paramtypes", [prisma_service_1.PrismaService]) - ], PricingService); - } -}); - -// dist/modules/pricing/pricing.controller.js -var require_pricing_controller = __commonJS({ - "dist/modules/pricing/pricing.controller.js"(exports2) { - "use strict"; - var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - var __metadata3 = exports2 && exports2.__metadata || function(k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); - }; - var __param3 = exports2 && exports2.__param || function(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PricingController = void 0; - var common_12 = require_common(); - var pricing_service_1 = require_pricing_service(); - var guards_1 = require_guards2(); - var PricingController = class PricingController { - pricing; - constructor(pricing) { - this.pricing = pricing; - } - getLatest(karatPerMille) { - return this.pricing.getLatestQuote(Number(karatPerMille) || 750); - } - }; - exports2.PricingController = PricingController; - __decorate4([ - (0, common_12.Get)("latest"), - __param3(0, (0, common_12.Query)("karatPerMille")), - __metadata3("design:type", Function), - __metadata3("design:paramtypes", [String]), - __metadata3("design:returntype", void 0) - ], PricingController.prototype, "getLatest", null); - exports2.PricingController = PricingController = __decorate4([ - (0, guards_1.Public)(), - (0, common_12.Controller)("pricing"), - __metadata3("design:paramtypes", [pricing_service_1.PricingService]) - ], PricingController); - } -}); - -// dist/modules/pricing/pricing.module.js -var require_pricing_module = __commonJS({ - "dist/modules/pricing/pricing.module.js"(exports2) { - "use strict"; - var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PricingModule = void 0; - var common_12 = require_common(); - var pricing_service_1 = require_pricing_service(); - var pricing_controller_1 = require_pricing_controller(); - var PricingModule = class PricingModule { - }; - exports2.PricingModule = PricingModule; - exports2.PricingModule = PricingModule = __decorate4([ - (0, common_12.Module)({ - controllers: [pricing_controller_1.PricingController], - providers: [pricing_service_1.PricingService], - exports: [pricing_service_1.PricingService] - }) - ], PricingModule); - } -}); - -// ../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/data-stream.js -var require_data_stream = __commonJS({ - "../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/data-stream.js"(exports2, module2) { - var Buffer2 = require_safe_buffer().Buffer; - var Stream = require("stream"); - var util2 = require("util"); - function DataStream(data) { - this.buffer = null; - this.writable = true; - this.readable = true; - if (!data) { - this.buffer = Buffer2.alloc(0); - return this; - } - if (typeof data.pipe === "function") { - this.buffer = Buffer2.alloc(0); - data.pipe(this); - return this; - } - if (data.length || typeof data === "object") { - this.buffer = data; - this.writable = false; - process.nextTick(function() { - this.emit("end", data); - this.readable = false; - this.emit("close"); - }.bind(this)); - return this; - } - throw new TypeError("Unexpected data type (" + typeof data + ")"); + if (req.body !== void 0) + request.write(req.body); + request.end(); + }); } - util2.inherits(DataStream, Stream); - DataStream.prototype.write = function write(data) { - this.buffer = Buffer2.concat([this.buffer, Buffer2.from(data)]); - this.emit("data", data); - }; - DataStream.prototype.end = function end(data) { - if (data) - this.write(data); - this.emit("end", data); - this.emit("close"); - this.writable = false; - this.readable = false; - }; - module2.exports = DataStream; - } -}); - -// ../../node_modules/.pnpm/ecdsa-sig-formatter@1.0.11/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js -var require_param_bytes_for_alg = __commonJS({ - "../../node_modules/.pnpm/ecdsa-sig-formatter@1.0.11/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js"(exports2, module2) { - "use strict"; - function getParamSize(keySize) { - var result = (keySize / 8 | 0) + (keySize % 8 === 0 ? 0 : 1); - return result; - } - var paramBytesForAlg = { - ES256: getParamSize(256), - ES384: getParamSize(384), - ES512: getParamSize(521) - }; - function getParamBytesForAlg(alg) { - var paramBytes = paramBytesForAlg[alg]; - if (paramBytes) { - return paramBytes; - } - throw new Error('Unknown algorithm "' + alg + '"'); - } - module2.exports = getParamBytesForAlg; - } -}); - -// ../../node_modules/.pnpm/ecdsa-sig-formatter@1.0.11/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js -var require_ecdsa_sig_formatter = __commonJS({ - "../../node_modules/.pnpm/ecdsa-sig-formatter@1.0.11/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js"(exports2, module2) { - "use strict"; - var Buffer2 = require_safe_buffer().Buffer; - var getParamBytesForAlg = require_param_bytes_for_alg(); - var MAX_OCTET = 128; - var CLASS_UNIVERSAL = 0; - var PRIMITIVE_BIT = 32; - var TAG_SEQ = 16; - var TAG_INT = 2; - var ENCODED_TAG_SEQ = TAG_SEQ | PRIMITIVE_BIT | CLASS_UNIVERSAL << 6; - var ENCODED_TAG_INT = TAG_INT | CLASS_UNIVERSAL << 6; - function base64Url(base64) { - return base64.replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_"); - } - function signatureAsBuffer(signature) { - if (Buffer2.isBuffer(signature)) { - return signature; - } else if ("string" === typeof signature) { - return Buffer2.from(signature, "base64"); - } - throw new TypeError("ECDSA signature must be a Base64 string or a Buffer"); - } - function derToJose(signature, alg) { - signature = signatureAsBuffer(signature); - var paramBytes = getParamBytesForAlg(alg); - var maxEncodedParamLength = paramBytes + 1; - var inputLength = signature.length; - var offset = 0; - if (signature[offset++] !== ENCODED_TAG_SEQ) { - throw new Error('Could not find expected "seq"'); - } - var seqLength = signature[offset++]; - if (seqLength === (MAX_OCTET | 1)) { - seqLength = signature[offset++]; - } - if (inputLength - offset < seqLength) { - throw new Error('"seq" specified length of "' + seqLength + '", only "' + (inputLength - offset) + '" remaining'); - } - if (signature[offset++] !== ENCODED_TAG_INT) { - throw new Error('Could not find expected "int" for "r"'); - } - var rLength = signature[offset++]; - if (inputLength - offset - 2 < rLength) { - throw new Error('"r" specified length of "' + rLength + '", only "' + (inputLength - offset - 2) + '" available'); - } - if (maxEncodedParamLength < rLength) { - throw new Error('"r" specified length of "' + rLength + '", max of "' + maxEncodedParamLength + '" is acceptable'); - } - var rOffset = offset; - offset += rLength; - if (signature[offset++] !== ENCODED_TAG_INT) { - throw new Error('Could not find expected "int" for "s"'); - } - var sLength = signature[offset++]; - if (inputLength - offset !== sLength) { - throw new Error('"s" specified length of "' + sLength + '", expected "' + (inputLength - offset) + '"'); - } - if (maxEncodedParamLength < sLength) { - throw new Error('"s" specified length of "' + sLength + '", max of "' + maxEncodedParamLength + '" is acceptable'); - } - var sOffset = offset; - offset += sLength; - if (offset !== inputLength) { - throw new Error('Expected to consume entire buffer, but "' + (inputLength - offset) + '" bytes remain'); - } - var rPadding = paramBytes - rLength, sPadding = paramBytes - sLength; - var dst = Buffer2.allocUnsafe(rPadding + rLength + sPadding + sLength); - for (offset = 0; offset < rPadding; ++offset) { - dst[offset] = 0; - } - signature.copy(dst, offset, rOffset + Math.max(-rPadding, 0), rOffset + rLength); - offset = paramBytes; - for (var o = offset; offset < o + sPadding; ++offset) { - dst[offset] = 0; - } - signature.copy(dst, offset, sOffset + Math.max(-sPadding, 0), sOffset + sLength); - dst = dst.toString("base64"); - dst = base64Url(dst); - return dst; - } - function countPadding(buf, start, stop) { - var padding = 0; - while (start + padding < stop && buf[start + padding] === 0) { - ++padding; - } - var needsSign = buf[start + padding] >= MAX_OCTET; - if (needsSign) { - --padding; - } - return padding; - } - function joseToDer(signature, alg) { - signature = signatureAsBuffer(signature); - var paramBytes = getParamBytesForAlg(alg); - var signatureBytes = signature.length; - if (signatureBytes !== paramBytes * 2) { - throw new TypeError('"' + alg + '" signatures must be "' + paramBytes * 2 + '" bytes, saw "' + signatureBytes + '"'); - } - var rPadding = countPadding(signature, 0, paramBytes); - var sPadding = countPadding(signature, paramBytes, signature.length); - var rLength = paramBytes - rPadding; - var sLength = paramBytes - sPadding; - var rsBytes = 1 + 1 + rLength + 1 + 1 + sLength; - var shortLength = rsBytes < MAX_OCTET; - var dst = Buffer2.allocUnsafe((shortLength ? 2 : 3) + rsBytes); - var offset = 0; - dst[offset++] = ENCODED_TAG_SEQ; - if (shortLength) { - dst[offset++] = rsBytes; - } else { - dst[offset++] = MAX_OCTET | 1; - dst[offset++] = rsBytes & 255; - } - dst[offset++] = ENCODED_TAG_INT; - dst[offset++] = rLength; - if (rPadding < 0) { - dst[offset++] = 0; - offset += signature.copy(dst, offset, 0, paramBytes); - } else { - offset += signature.copy(dst, offset, rPadding, paramBytes); - } - dst[offset++] = ENCODED_TAG_INT; - dst[offset++] = sLength; - if (sPadding < 0) { - dst[offset++] = 0; - signature.copy(dst, offset, paramBytes); - } else { - signature.copy(dst, offset, paramBytes + sPadding); - } - return dst; - } - module2.exports = { - derToJose, - joseToDer - }; - } -}); - -// ../../node_modules/.pnpm/buffer-equal-constant-time@1.0.1/node_modules/buffer-equal-constant-time/index.js -var require_buffer_equal_constant_time = __commonJS({ - "../../node_modules/.pnpm/buffer-equal-constant-time@1.0.1/node_modules/buffer-equal-constant-time/index.js"(exports2, module2) { - "use strict"; - var Buffer2 = require("buffer").Buffer; - var SlowBuffer = require("buffer").SlowBuffer; - module2.exports = bufferEq; - function bufferEq(a, b) { - if (!Buffer2.isBuffer(a) || !Buffer2.isBuffer(b)) { - return false; - } - if (a.length !== b.length) { - return false; - } - var c = 0; - for (var i = 0; i < a.length; i++) { - c |= a[i] ^ b[i]; - } - return c === 0; - } - bufferEq.install = function() { - Buffer2.prototype.equal = SlowBuffer.prototype.equal = function equal(that) { - return bufferEq(this, that); - }; - }; - var origBufEqual = Buffer2.prototype.equal; - var origSlowBufEqual = SlowBuffer.prototype.equal; - bufferEq.restore = function() { - Buffer2.prototype.equal = origBufEqual; - SlowBuffer.prototype.equal = origSlowBufEqual; - }; - } -}); - -// ../../node_modules/.pnpm/jwa@2.0.1/node_modules/jwa/index.js -var require_jwa = __commonJS({ - "../../node_modules/.pnpm/jwa@2.0.1/node_modules/jwa/index.js"(exports2, module2) { - var Buffer2 = require_safe_buffer().Buffer; - var crypto2 = require("crypto"); - var formatEcdsa = require_ecdsa_sig_formatter(); - var util2 = require("util"); - var MSG_INVALID_ALGORITHM = '"%s" is not a valid algorithm.\n Supported algorithms are:\n "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".'; - var MSG_INVALID_SECRET = "secret must be a string or buffer"; - var MSG_INVALID_VERIFIER_KEY = "key must be a string or a buffer"; - var MSG_INVALID_SIGNER_KEY = "key must be a string, a buffer or an object"; - var supportsKeyObjects = typeof crypto2.createPublicKey === "function"; - if (supportsKeyObjects) { - MSG_INVALID_VERIFIER_KEY += " or a KeyObject"; - MSG_INVALID_SECRET += "or a KeyObject"; - } - function checkIsPublicKey(key) { - if (Buffer2.isBuffer(key)) { - return; - } - if (typeof key === "string") { - return; - } - if (!supportsKeyObjects) { - throw typeError(MSG_INVALID_VERIFIER_KEY); - } - if (typeof key !== "object") { - throw typeError(MSG_INVALID_VERIFIER_KEY); - } - if (typeof key.type !== "string") { - throw typeError(MSG_INVALID_VERIFIER_KEY); - } - if (typeof key.asymmetricKeyType !== "string") { - throw typeError(MSG_INVALID_VERIFIER_KEY); - } - if (typeof key.export !== "function") { - throw typeError(MSG_INVALID_VERIFIER_KEY); - } - } - function checkIsPrivateKey(key) { - if (Buffer2.isBuffer(key)) { - return; - } - if (typeof key === "string") { - return; - } - if (typeof key === "object") { - return; - } - throw typeError(MSG_INVALID_SIGNER_KEY); - } - function checkIsSecretKey(key) { - if (Buffer2.isBuffer(key)) { - return; - } - if (typeof key === "string") { - return key; - } - if (!supportsKeyObjects) { - throw typeError(MSG_INVALID_SECRET); - } - if (typeof key !== "object") { - throw typeError(MSG_INVALID_SECRET); - } - if (key.type !== "secret") { - throw typeError(MSG_INVALID_SECRET); - } - if (typeof key.export !== "function") { - throw typeError(MSG_INVALID_SECRET); - } - } - function fromBase64(base64) { - return base64.replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_"); - } - function toBase64(base64url) { - base64url = base64url.toString(); - var padding = 4 - base64url.length % 4; - if (padding !== 4) { - for (var i = 0; i < padding; ++i) { - base64url += "="; - } - } - return base64url.replace(/\-/g, "+").replace(/_/g, "/"); - } - function typeError(template) { - var args = [].slice.call(arguments, 1); - var errMsg = util2.format.bind(util2, template).apply(null, args); - return new TypeError(errMsg); - } - function bufferOrString(obj) { - return Buffer2.isBuffer(obj) || typeof obj === "string"; - } - function normalizeInput(thing) { - if (!bufferOrString(thing)) - thing = JSON.stringify(thing); - return thing; - } - function createHmacSigner(bits) { - return function sign(thing, secret) { - checkIsSecretKey(secret); - thing = normalizeInput(thing); - var hmac = crypto2.createHmac("sha" + bits, secret); - var sig = (hmac.update(thing), hmac.digest("base64")); - return fromBase64(sig); - }; - } - var bufferEqual; - var timingSafeEqual = "timingSafeEqual" in crypto2 ? function timingSafeEqual2(a, b) { - if (a.byteLength !== b.byteLength) { - return false; - } - return crypto2.timingSafeEqual(a, b); - } : function timingSafeEqual2(a, b) { - if (!bufferEqual) { - bufferEqual = require_buffer_equal_constant_time(); - } - return bufferEqual(a, b); - }; - function createHmacVerifier(bits) { - return function verify(thing, signature, secret) { - var computedSig = createHmacSigner(bits)(thing, secret); - return timingSafeEqual(Buffer2.from(signature), Buffer2.from(computedSig)); - }; - } - function createKeySigner(bits) { - return function sign(thing, privateKey) { - checkIsPrivateKey(privateKey); - thing = normalizeInput(thing); - var signer = crypto2.createSign("RSA-SHA" + bits); - var sig = (signer.update(thing), signer.sign(privateKey, "base64")); - return fromBase64(sig); - }; - } - function createKeyVerifier(bits) { - return function verify(thing, signature, publicKey) { - checkIsPublicKey(publicKey); - thing = normalizeInput(thing); - signature = toBase64(signature); - var verifier = crypto2.createVerify("RSA-SHA" + bits); - verifier.update(thing); - return verifier.verify(publicKey, signature, "base64"); - }; - } - function createPSSKeySigner(bits) { - return function sign(thing, privateKey) { - checkIsPrivateKey(privateKey); - thing = normalizeInput(thing); - var signer = crypto2.createSign("RSA-SHA" + bits); - var sig = (signer.update(thing), signer.sign({ - key: privateKey, - padding: crypto2.constants.RSA_PKCS1_PSS_PADDING, - saltLength: crypto2.constants.RSA_PSS_SALTLEN_DIGEST - }, "base64")); - return fromBase64(sig); - }; - } - function createPSSKeyVerifier(bits) { - return function verify(thing, signature, publicKey) { - checkIsPublicKey(publicKey); - thing = normalizeInput(thing); - signature = toBase64(signature); - var verifier = crypto2.createVerify("RSA-SHA" + bits); - verifier.update(thing); - return verifier.verify({ - key: publicKey, - padding: crypto2.constants.RSA_PKCS1_PSS_PADDING, - saltLength: crypto2.constants.RSA_PSS_SALTLEN_DIGEST - }, signature, "base64"); - }; - } - function createECDSASigner(bits) { - var inner = createKeySigner(bits); - return function sign() { - var signature = inner.apply(null, arguments); - signature = formatEcdsa.derToJose(signature, "ES" + bits); - return signature; - }; - } - function createECDSAVerifer(bits) { - var inner = createKeyVerifier(bits); - return function verify(thing, signature, publicKey) { - signature = formatEcdsa.joseToDer(signature, "ES" + bits).toString("base64"); - var result = inner(thing, signature, publicKey); - return result; - }; - } - function createNoneSigner() { - return function sign() { - return ""; - }; - } - function createNoneVerifier() { - return function verify(thing, signature) { - return signature === ""; - }; - } - module2.exports = function jwa(algorithm) { - var signerFactories = { - hs: createHmacSigner, - rs: createKeySigner, - ps: createPSSKeySigner, - es: createECDSASigner, - none: createNoneSigner - }; - var verifierFactories = { - hs: createHmacVerifier, - rs: createKeyVerifier, - ps: createPSSKeyVerifier, - es: createECDSAVerifer, - none: createNoneVerifier - }; - var match = algorithm.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/); - if (!match) - throw typeError(MSG_INVALID_ALGORITHM, algorithm); - var algo = (match[1] || match[3]).toLowerCase(); - var bits = match[2]; - return { - sign: signerFactories[algo](bits), - verify: verifierFactories[algo](bits) - }; - }; - } -}); - -// ../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/tostring.js -var require_tostring = __commonJS({ - "../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/tostring.js"(exports2, module2) { - var Buffer2 = require("buffer").Buffer; - module2.exports = function toString2(obj) { - if (typeof obj === "string") - return obj; - if (typeof obj === "number" || Buffer2.isBuffer(obj)) - return obj.toString(); - return JSON.stringify(obj); - }; - } -}); - -// ../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/sign-stream.js -var require_sign_stream = __commonJS({ - "../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/sign-stream.js"(exports2, module2) { - var Buffer2 = require_safe_buffer().Buffer; - var DataStream = require_data_stream(); - var jwa = require_jwa(); - var Stream = require("stream"); - var toString2 = require_tostring(); - var util2 = require("util"); - function base64url(string, encoding) { - return Buffer2.from(string, encoding).toString("base64").replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_"); - } - function jwsSecuredInput(header, payload, encoding) { - encoding = encoding || "utf8"; - var encodedHeader = base64url(toString2(header), "binary"); - var encodedPayload = base64url(toString2(payload), encoding); - return util2.format("%s.%s", encodedHeader, encodedPayload); - } - function jwsSign(opts) { - var header = opts.header; - var payload = opts.payload; - var secretOrKey = opts.secret || opts.privateKey; - var encoding = opts.encoding; - var algo = jwa(header.alg); - var securedInput = jwsSecuredInput(header, payload, encoding); - var signature = algo.sign(securedInput, secretOrKey); - return util2.format("%s.%s", securedInput, signature); - } - function SignStream(opts) { - var secret = opts.secret; - secret = secret == null ? opts.privateKey : secret; - secret = secret == null ? opts.key : secret; - if (/^hs/i.test(opts.header.alg) === true && secret == null) { - throw new TypeError("secret must be a string or buffer or a KeyObject"); - } - var secretStream = new DataStream(secret); - this.readable = true; - this.header = opts.header; - this.encoding = opts.encoding; - this.secret = this.privateKey = this.key = secretStream; - this.payload = new DataStream(opts.payload); - this.secret.once("close", function() { - if (!this.payload.writable && this.readable) - this.sign(); - }.bind(this)); - this.payload.once("close", function() { - if (!this.secret.writable && this.readable) - this.sign(); - }.bind(this)); - } - util2.inherits(SignStream, Stream); - SignStream.prototype.sign = function sign() { + function fetchServerCertificate(baseUrl, timeoutMs) { + let url; try { - var signature = jwsSign({ - header: this.header, - payload: this.payload.buffer, - secret: this.secret.buffer, - encoding: this.encoding + url = new URL(baseUrl); + } catch { + return Promise.reject(new AccountingHttpError("\u0622\u062F\u0631\u0633 \u0633\u0631\u0648\u0631 \u062D\u0633\u0627\u0628\u062F\u0627\u0631\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u0627\u0633\u062A", false, "BAD_URL")); + } + if (url.protocol !== "https:") { + return Promise.reject(new AccountingHttpError("\u0627\u06CC\u0646 \u0622\u062F\u0631\u0633 https \u0646\u06CC\u0633\u062A\u061B \u06AF\u0648\u0627\u0647\u06CC \u0646\u062F\u0627\u0631\u062F", false, "NOT_HTTPS")); + } + const host = url.hostname.replace(/^\[|\]$/g, ""); + return new Promise((resolve, reject) => { + const socket = tls.connect({ + host, + port: Number(url.port || 443), + servername: net.isIP(host) ? void 0 : host, + rejectUnauthorized: false }); - this.emit("done", signature); - this.emit("data", signature); - this.emit("end"); - this.readable = false; - return signature; - } catch (e) { - this.readable = false; - this.emit("error", e); - this.emit("close"); + const timer = setTimeout(() => { + socket.destroy(); + reject(new AccountingHttpError("\u0627\u062A\u0635\u0627\u0644 \u0628\u0647 \u0633\u0631\u0648\u0631 \u062D\u0633\u0627\u0628\u062F\u0627\u0631\u06CC \u0628\u0631\u0642\u0631\u0627\u0631 \u0646\u0634\u062F (timeout)", false, "TIMEOUT")); + }, timeoutMs); + socket.once("secureConnect", () => { + clearTimeout(timer); + const peer = socket.getPeerCertificate(); + const chainOk = socket.authorized; + socket.end(); + if (!peer?.raw) { + reject(new AccountingHttpError("\u0633\u0631\u0648\u0631 \u06AF\u0648\u0627\u0647\u06CC \u0627\u0631\u0633\u0627\u0644 \u0646\u06A9\u0631\u062F", false, "NO_CERT")); + return; + } + const cert = new crypto_1.X509Certificate(peer.raw); + const nameOk = net.isIP(host) ? !!cert.checkIP(host) : !!cert.checkHost(host); + const b64 = peer.raw.toString("base64").match(/.{1,64}/g).join("\n"); + resolve({ + pem: `-----BEGIN CERTIFICATE----- +${b64} +-----END CERTIFICATE-----`, + subject: cert.subject, + issuer: cert.issuer, + subjectAltName: cert.subjectAltName ?? null, + validFrom: cert.validFrom, + validTo: cert.validTo, + expired: new Date(cert.validTo).getTime() < Date.now(), + fingerprint256: cert.fingerprint256, + // checkIssued() also wants keyCertSign, which Tahesab's certificate lacks. + selfSigned: cert.subject === cert.issuer && cert.verify(cert.publicKey), + trustedBySystem: chainOk && nameOk + }); + }); + socket.once("error", (err) => { + clearTimeout(timer); + reject(new AccountingHttpError(err.message, false, err.code)); + }); + }); + } + function parseLooseJson(body) { + try { + return JSON.parse(body); + } catch { } - }; - SignStream.sign = jwsSign; - module2.exports = SignStream; + let raw = body.replace(/^/, ""); + raw = raw.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]/g, ""); + raw = raw.replace(/\\(?!["\\/bfnrtu])/g, "-"); + const start = raw.search(/[{[]/); + if (start > 0) + raw = raw.slice(start); + return JSON.parse(raw); + } } }); -// ../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/verify-stream.js -var require_verify_stream = __commonJS({ - "../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/verify-stream.js"(exports2, module2) { - var Buffer2 = require_safe_buffer().Buffer; - var DataStream = require_data_stream(); - var jwa = require_jwa(); - var Stream = require("stream"); - var toString2 = require_tostring(); - var util2 = require("util"); - var JWS_REGEX = /^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/; - function isObject(thing) { - return Object.prototype.toString.call(thing) === "[object Object]"; - } - function safeJsonParse(thing) { - if (isObject(thing)) - return thing; - try { - return JSON.parse(thing); - } catch (e) { - return void 0; - } - } - function headerFromJWS(jwsSig) { - var encodedHeader = jwsSig.split(".", 1)[0]; - return safeJsonParse(Buffer2.from(encodedHeader, "base64").toString("binary")); - } - function securedInputFromJWS(jwsSig) { - return jwsSig.split(".", 2).join("."); - } - function signatureFromJWS(jwsSig) { - return jwsSig.split(".")[2]; - } - function payloadFromJWS(jwsSig, encoding) { - encoding = encoding || "utf8"; - var payload = jwsSig.split(".")[1]; - return Buffer2.from(payload, "base64").toString(encoding); - } - function isValidJws(string) { - return JWS_REGEX.test(string) && !!headerFromJWS(string); - } - function jwsVerify(jwsSig, algorithm, secretOrKey) { - if (!algorithm) { - var err = new Error("Missing algorithm parameter for jws.verify"); - err.code = "MISSING_ALGORITHM"; - throw err; - } - jwsSig = toString2(jwsSig); - var signature = signatureFromJWS(jwsSig); - var securedInput = securedInputFromJWS(jwsSig); - var algo = jwa(algorithm); - return algo.verify(securedInput, signature, secretOrKey); - } - function jwsDecode(jwsSig, opts) { - opts = opts || {}; - jwsSig = toString2(jwsSig); - if (!isValidJws(jwsSig)) - return null; - var header = headerFromJWS(jwsSig); - if (!header) - return null; - var payload = payloadFromJWS(jwsSig); - if (header.typ === "JWT" || opts.json) - payload = JSON.parse(payload, opts.encoding); - return { - header, - payload, - signature: signatureFromJWS(jwsSig) - }; - } - function VerifyStream(opts) { - opts = opts || {}; - var secretOrKey = opts.secret; - secretOrKey = secretOrKey == null ? opts.publicKey : secretOrKey; - secretOrKey = secretOrKey == null ? opts.key : secretOrKey; - if (/^hs/i.test(opts.algorithm) === true && secretOrKey == null) { - throw new TypeError("secret must be a string or buffer or a KeyObject"); - } - var secretStream = new DataStream(secretOrKey); - this.readable = true; - this.algorithm = opts.algorithm; - this.encoding = opts.encoding; - this.secret = this.publicKey = this.key = secretStream; - this.signature = new DataStream(opts.signature); - this.secret.once("close", function() { - if (!this.signature.writable && this.readable) - this.verify(); - }.bind(this)); - this.signature.once("close", function() { - if (!this.secret.writable && this.readable) - this.verify(); - }.bind(this)); - } - util2.inherits(VerifyStream, Stream); - VerifyStream.prototype.verify = function verify() { - try { - var valid = jwsVerify(this.signature.buffer, this.algorithm, this.key.buffer); - var obj = jwsDecode(this.signature.buffer, this.encoding); - this.emit("done", valid, obj); - this.emit("data", valid); - this.emit("end"); - this.readable = false; - return valid; - } catch (e) { - this.readable = false; - this.emit("error", e); - this.emit("close"); - } - }; - VerifyStream.decode = jwsDecode; - VerifyStream.isValid = isValidJws; - VerifyStream.verify = jwsVerify; - module2.exports = VerifyStream; - } -}); - -// ../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/index.js -var require_jws = __commonJS({ - "../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/index.js"(exports2) { - var SignStream = require_sign_stream(); - var VerifyStream = require_verify_stream(); - var ALGORITHMS = [ - "HS256", - "HS384", - "HS512", - "RS256", - "RS384", - "RS512", - "PS256", - "PS384", - "PS512", - "ES256", - "ES384", - "ES512" +// dist/modules/accounting-sync/jalali.js +var require_jalali = __commonJS({ + "dist/modules/accounting-sync/jalali.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.toJalali = toJalali; + exports2.jalaliToGregorian = jalaliToGregorian; + exports2.parseJalali = parseJalali; + exports2.formatJalali = formatJalali; + exports2.jalaliToIsoDate = jalaliToIsoDate; + exports2.toIsoDateTehran = toIsoDateTehran; + var BREAKS = [ + -61, + 9, + 38, + 199, + 426, + 686, + 756, + 818, + 1111, + 1181, + 1210, + 1635, + 2060, + 2097, + 2192, + 2262, + 2324, + 2394, + 2456, + 3178 ]; - exports2.ALGORITHMS = ALGORITHMS; - exports2.sign = SignStream.sign; - exports2.verify = VerifyStream.verify; - exports2.decode = VerifyStream.decode; - exports2.isValid = VerifyStream.isValid; - exports2.createSign = function createSign(opts) { - return new SignStream(opts); - }; - exports2.createVerify = function createVerify(opts) { - return new VerifyStream(opts); - }; - } -}); - -// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/decode.js -var require_decode = __commonJS({ - "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/decode.js"(exports2, module2) { - var jws = require_jws(); - module2.exports = function(jwt, options) { - options = options || {}; - var decoded = jws.decode(jwt, options); - if (!decoded) { - return null; - } - var payload = decoded.payload; - if (typeof payload === "string") { - try { - var obj = JSON.parse(payload); - if (obj !== null && typeof obj === "object") { - payload = obj; - } - } catch (e) { - } - } - if (options.complete === true) { - return { - header: decoded.header, - payload, - signature: decoded.signature - }; - } - return payload; - }; - } -}); - -// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/JsonWebTokenError.js -var require_JsonWebTokenError = __commonJS({ - "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/JsonWebTokenError.js"(exports2, module2) { - var JsonWebTokenError2 = function(message, error) { - Error.call(this, message); - if (Error.captureStackTrace) { - Error.captureStackTrace(this, this.constructor); - } - this.name = "JsonWebTokenError"; - this.message = message; - if (error) this.inner = error; - }; - JsonWebTokenError2.prototype = Object.create(Error.prototype); - JsonWebTokenError2.prototype.constructor = JsonWebTokenError2; - module2.exports = JsonWebTokenError2; - } -}); - -// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/NotBeforeError.js -var require_NotBeforeError = __commonJS({ - "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/NotBeforeError.js"(exports2, module2) { - var JsonWebTokenError2 = require_JsonWebTokenError(); - var NotBeforeError2 = function(message, date) { - JsonWebTokenError2.call(this, message); - this.name = "NotBeforeError"; - this.date = date; - }; - NotBeforeError2.prototype = Object.create(JsonWebTokenError2.prototype); - NotBeforeError2.prototype.constructor = NotBeforeError2; - module2.exports = NotBeforeError2; - } -}); - -// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/TokenExpiredError.js -var require_TokenExpiredError = __commonJS({ - "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/TokenExpiredError.js"(exports2, module2) { - var JsonWebTokenError2 = require_JsonWebTokenError(); - var TokenExpiredError2 = function(message, expiredAt) { - JsonWebTokenError2.call(this, message); - this.name = "TokenExpiredError"; - this.expiredAt = expiredAt; - }; - TokenExpiredError2.prototype = Object.create(JsonWebTokenError2.prototype); - TokenExpiredError2.prototype.constructor = TokenExpiredError2; - module2.exports = TokenExpiredError2; - } -}); - -// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/timespan.js -var require_timespan = __commonJS({ - "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/timespan.js"(exports2, module2) { - var ms = require_ms2(); - module2.exports = function(time, iat) { - var timestamp = iat || Math.floor(Date.now() / 1e3); - if (typeof time === "string") { - var milliseconds = ms(time); - if (typeof milliseconds === "undefined") { - return; - } - return Math.floor(timestamp + milliseconds / 1e3); - } else if (typeof time === "number") { - return timestamp + time; - } else { - return; - } - }; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/constants.js -var require_constants8 = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/constants.js"(exports2, module2) { - "use strict"; - var SEMVER_SPEC_VERSION = "2.0.0"; - var MAX_LENGTH = 256; - var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ - 9007199254740991; - var MAX_SAFE_COMPONENT_LENGTH = 16; - var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6; - var RELEASE_TYPES = [ - "major", - "premajor", - "minor", - "preminor", - "patch", - "prepatch", - "prerelease" - ]; - module2.exports = { - MAX_LENGTH, - MAX_SAFE_COMPONENT_LENGTH, - MAX_SAFE_BUILD_LENGTH, - MAX_SAFE_INTEGER, - RELEASE_TYPES, - SEMVER_SPEC_VERSION, - FLAG_INCLUDE_PRERELEASE: 1, - FLAG_LOOSE: 2 - }; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/debug.js -var require_debug2 = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/debug.js"(exports2, module2) { - "use strict"; - var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => { - }; - module2.exports = debug; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/re.js -var require_re = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/re.js"(exports2, module2) { - "use strict"; - var { - MAX_SAFE_COMPONENT_LENGTH, - MAX_SAFE_BUILD_LENGTH, - MAX_LENGTH - } = require_constants8(); - var debug = require_debug2(); - exports2 = module2.exports = {}; - var re = exports2.re = []; - var safeRe = exports2.safeRe = []; - var src = exports2.src = []; - var safeSrc = exports2.safeSrc = []; - var t = exports2.t = {}; - var R = 0; - var LETTERDASHNUMBER = "[a-zA-Z0-9-]"; - var safeRegexReplacements = [ - ["\\s", 1], - ["\\d", MAX_LENGTH], - [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH] - ]; - var makeSafeRegex = (value) => { - for (const [token, max] of safeRegexReplacements) { - value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`); - } - return value; - }; - var createToken = (name, value, isGlobal) => { - const safe = makeSafeRegex(value); - const index = R++; - debug(name, index, value); - t[name] = index; - src[index] = value; - safeSrc[index] = safe; - re[index] = new RegExp(value, isGlobal ? "g" : void 0); - safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0); - }; - createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*"); - createToken("NUMERICIDENTIFIERLOOSE", "\\d+"); - createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`); - createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`); - createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`); - createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`); - createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`); - createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`); - createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`); - createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`); - createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`); - createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`); - createToken("FULL", `^${src[t.FULLPLAIN]}$`); - createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`); - createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`); - createToken("GTLT", "((?:<|>)?=?)"); - createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`); - createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`); - createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`); - createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`); - createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`); - createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`); - createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`); - createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`); - createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`); - createToken("COERCERTL", src[t.COERCE], true); - createToken("COERCERTLFULL", src[t.COERCEFULL], true); - createToken("LONETILDE", "(?:~>?)"); - createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true); - exports2.tildeTrimReplace = "$1~"; - createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`); - createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`); - createToken("LONECARET", "(?:\\^)"); - createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true); - exports2.caretTrimReplace = "$1^"; - createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`); - createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`); - createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`); - createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`); - createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true); - exports2.comparatorTrimReplace = "$1$2$3"; - createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`); - createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`); - createToken("STAR", "(<|>)?=?\\s*\\*"); - createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"); - createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$"); - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/parse-options.js -var require_parse_options = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/parse-options.js"(exports2, module2) { - "use strict"; - var looseOption = Object.freeze({ loose: true }); - var emptyOpts = Object.freeze({}); - var parseOptions = (options) => { - if (!options) { - return emptyOpts; - } - if (typeof options !== "object") { - return looseOption; - } - return options; - }; - module2.exports = parseOptions; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/identifiers.js -var require_identifiers = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/identifiers.js"(exports2, module2) { - "use strict"; - var numeric = /^[0-9]+$/; - var compareIdentifiers = (a, b) => { - if (typeof a === "number" && typeof b === "number") { - return a === b ? 0 : a < b ? -1 : 1; - } - const anum = numeric.test(a); - const bnum = numeric.test(b); - if (anum && bnum) { - a = +a; - b = +b; - } - return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; - }; - var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a); - module2.exports = { - compareIdentifiers, - rcompareIdentifiers - }; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/semver.js -var require_semver = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/semver.js"(exports2, module2) { - "use strict"; - var debug = require_debug2(); - var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants8(); - var { safeRe: re, t } = require_re(); - var parseOptions = require_parse_options(); - var { compareIdentifiers } = require_identifiers(); - var isPrereleaseIdentifier = (prerelease, identifier) => { - const identifiers = identifier.split("."); - if (identifiers.length > prerelease.length) { - return false; - } - for (let i = 0; i < identifiers.length; i++) { - if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) { - return false; - } - } - return true; - }; - var SemVer = class _SemVer { - constructor(version, options) { - options = parseOptions(options); - if (version instanceof _SemVer) { - if (version.loose === !!options.loose && version.includePrerelease === !!options.includePrerelease) { - return version; - } else { - version = version.version; - } - } else if (typeof version !== "string") { - throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`); - } - if (version.length > MAX_LENGTH) { - throw new TypeError( - `version is longer than ${MAX_LENGTH} characters` - ); - } - debug("SemVer", version, options); - this.options = options; - this.loose = !!options.loose; - this.includePrerelease = !!options.includePrerelease; - const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]); - if (!m) { - throw new TypeError(`Invalid Version: ${version}`); - } - this.raw = version; - this.major = +m[1]; - this.minor = +m[2]; - this.patch = +m[3]; - if (this.major > MAX_SAFE_INTEGER || this.major < 0) { - throw new TypeError("Invalid major version"); - } - if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { - throw new TypeError("Invalid minor version"); - } - if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { - throw new TypeError("Invalid patch version"); - } - if (!m[4]) { - this.prerelease = []; - } else { - this.prerelease = m[4].split(".").map((id) => { - if (/^[0-9]+$/.test(id)) { - const num = +id; - if (num >= 0 && num < MAX_SAFE_INTEGER) { - return num; - } - } - return id; - }); - } - this.build = m[5] ? m[5].split(".") : []; - this.format(); - } - format() { - this.version = `${this.major}.${this.minor}.${this.patch}`; - if (this.prerelease.length) { - this.version += `-${this.prerelease.join(".")}`; - } - return this.version; - } - toString() { - return this.version; - } - compare(other) { - debug("SemVer.compare", this.version, this.options, other); - if (!(other instanceof _SemVer)) { - if (typeof other === "string" && other === this.version) { - return 0; - } - other = new _SemVer(other, this.options); - } - if (other.version === this.version) { - return 0; - } - return this.compareMain(other) || this.comparePre(other); - } - compareMain(other) { - if (!(other instanceof _SemVer)) { - other = new _SemVer(other, this.options); - } - if (this.major < other.major) { - return -1; - } - if (this.major > other.major) { - return 1; - } - if (this.minor < other.minor) { - return -1; - } - if (this.minor > other.minor) { - return 1; - } - if (this.patch < other.patch) { - return -1; - } - if (this.patch > other.patch) { - return 1; - } - return 0; - } - comparePre(other) { - if (!(other instanceof _SemVer)) { - other = new _SemVer(other, this.options); - } - if (this.prerelease.length && !other.prerelease.length) { - return -1; - } else if (!this.prerelease.length && other.prerelease.length) { - return 1; - } else if (!this.prerelease.length && !other.prerelease.length) { - return 0; - } - let i = 0; - do { - const a = this.prerelease[i]; - const b = other.prerelease[i]; - debug("prerelease compare", i, a, b); - if (a === void 0 && b === void 0) { - return 0; - } else if (b === void 0) { - return 1; - } else if (a === void 0) { - return -1; - } else if (a === b) { - continue; - } else { - return compareIdentifiers(a, b); - } - } while (++i); - } - compareBuild(other) { - if (!(other instanceof _SemVer)) { - other = new _SemVer(other, this.options); - } - let i = 0; - do { - const a = this.build[i]; - const b = other.build[i]; - debug("build compare", i, a, b); - if (a === void 0 && b === void 0) { - return 0; - } else if (b === void 0) { - return 1; - } else if (a === void 0) { - return -1; - } else if (a === b) { - continue; - } else { - return compareIdentifiers(a, b); - } - } while (++i); - } - // preminor will bump the version up to the next minor release, and immediately - // down to pre-release. premajor and prepatch work the same way. - inc(release, identifier, identifierBase) { - if (release.startsWith("pre")) { - if (!identifier && identifierBase === false) { - throw new Error("invalid increment argument: identifier is empty"); - } - if (identifier) { - const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]); - if (!match || match[1] !== identifier) { - throw new Error(`invalid identifier: ${identifier}`); - } - } - } - switch (release) { - case "premajor": - this.prerelease.length = 0; - this.patch = 0; - this.minor = 0; - this.major++; - this.inc("pre", identifier, identifierBase); - break; - case "preminor": - this.prerelease.length = 0; - this.patch = 0; - this.minor++; - this.inc("pre", identifier, identifierBase); - break; - case "prepatch": - this.prerelease.length = 0; - this.inc("patch", identifier, identifierBase); - this.inc("pre", identifier, identifierBase); - break; - // If the input is a non-prerelease version, this acts the same as - // prepatch. - case "prerelease": - if (this.prerelease.length === 0) { - this.inc("patch", identifier, identifierBase); - } - this.inc("pre", identifier, identifierBase); - break; - case "release": - if (this.prerelease.length === 0) { - throw new Error(`version ${this.raw} is not a prerelease`); - } - this.prerelease.length = 0; - break; - case "major": - if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) { - this.major++; - } - this.minor = 0; - this.patch = 0; - this.prerelease = []; - break; - case "minor": - if (this.patch !== 0 || this.prerelease.length === 0) { - this.minor++; - } - this.patch = 0; - this.prerelease = []; - break; - case "patch": - if (this.prerelease.length === 0) { - this.patch++; - } - this.prerelease = []; - break; - // This probably shouldn't be used publicly. - // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction. - case "pre": { - const base = Number(identifierBase) ? 1 : 0; - if (this.prerelease.length === 0) { - this.prerelease = [base]; - } else { - let i = this.prerelease.length; - while (--i >= 0) { - if (typeof this.prerelease[i] === "number") { - this.prerelease[i]++; - i = -2; - } - } - if (i === -1) { - if (identifier === this.prerelease.join(".") && identifierBase === false) { - throw new Error("invalid increment argument: identifier already exists"); - } - this.prerelease.push(base); - } - } - if (identifier) { - let prerelease = [identifier, base]; - if (identifierBase === false) { - prerelease = [identifier]; - } - if (isPrereleaseIdentifier(this.prerelease, identifier)) { - const prereleaseBase = this.prerelease[identifier.split(".").length]; - if (isNaN(prereleaseBase)) { - this.prerelease = prerelease; - } - } else { - this.prerelease = prerelease; - } - } - break; - } - default: - throw new Error(`invalid increment argument: ${release}`); - } - this.raw = this.format(); - if (this.build.length) { - this.raw += `+${this.build.join(".")}`; - } - return this; - } - }; - module2.exports = SemVer; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/parse.js -var require_parse3 = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/parse.js"(exports2, module2) { - "use strict"; - var SemVer = require_semver(); - var parse = (version, options, throwErrors = false) => { - if (version instanceof SemVer) { - return version; - } - try { - return new SemVer(version, options); - } catch (er) { - if (!throwErrors) { - return null; - } - throw er; - } - }; - module2.exports = parse; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/valid.js -var require_valid = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/valid.js"(exports2, module2) { - "use strict"; - var parse = require_parse3(); - var valid = (version, options) => { - const v = parse(version, options); - return v ? v.version : null; - }; - module2.exports = valid; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/clean.js -var require_clean = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/clean.js"(exports2, module2) { - "use strict"; - var parse = require_parse3(); - var clean = (version, options) => { - const s = parse(version.trim().replace(/^[=v]+/, ""), options); - return s ? s.version : null; - }; - module2.exports = clean; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/inc.js -var require_inc = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/inc.js"(exports2, module2) { - "use strict"; - var SemVer = require_semver(); - var inc = (version, release, options, identifier, identifierBase) => { - if (typeof options === "string") { - identifierBase = identifier; - identifier = options; - options = void 0; - } - try { - return new SemVer( - version instanceof SemVer ? version.version : version, - options - ).inc(release, identifier, identifierBase).version; - } catch (er) { - return null; - } - }; - module2.exports = inc; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/diff.js -var require_diff = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/diff.js"(exports2, module2) { - "use strict"; - var parse = require_parse3(); - var diff = (version1, version2) => { - const v1 = parse(version1, null, true); - const v2 = parse(version2, null, true); - const comparison = v1.compare(v2); - if (comparison === 0) { - return null; - } - const v1Higher = comparison > 0; - const highVersion = v1Higher ? v1 : v2; - const lowVersion = v1Higher ? v2 : v1; - const highHasPre = !!highVersion.prerelease.length; - const lowHasPre = !!lowVersion.prerelease.length; - if (lowHasPre && !highHasPre) { - if (!lowVersion.patch && !lowVersion.minor) { - return "major"; - } - if (lowVersion.compareMain(highVersion) === 0) { - if (lowVersion.minor && !lowVersion.patch) { - return "minor"; - } - return "patch"; - } - } - const prefix = highHasPre ? "pre" : ""; - if (v1.major !== v2.major) { - return prefix + "major"; - } - if (v1.minor !== v2.minor) { - return prefix + "minor"; - } - if (v1.patch !== v2.patch) { - return prefix + "patch"; - } - return "prerelease"; - }; - module2.exports = diff; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/major.js -var require_major = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/major.js"(exports2, module2) { - "use strict"; - var SemVer = require_semver(); - var major = (a, loose) => new SemVer(a, loose).major; - module2.exports = major; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/minor.js -var require_minor = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/minor.js"(exports2, module2) { - "use strict"; - var SemVer = require_semver(); - var minor = (a, loose) => new SemVer(a, loose).minor; - module2.exports = minor; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/patch.js -var require_patch = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/patch.js"(exports2, module2) { - "use strict"; - var SemVer = require_semver(); - var patch = (a, loose) => new SemVer(a, loose).patch; - module2.exports = patch; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/prerelease.js -var require_prerelease = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/prerelease.js"(exports2, module2) { - "use strict"; - var parse = require_parse3(); - var prerelease = (version, options) => { - const parsed = parse(version, options); - return parsed && parsed.prerelease.length ? parsed.prerelease : null; - }; - module2.exports = prerelease; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare.js -var require_compare = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare.js"(exports2, module2) { - "use strict"; - var SemVer = require_semver(); - var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose)); - module2.exports = compare; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rcompare.js -var require_rcompare = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rcompare.js"(exports2, module2) { - "use strict"; - var compare = require_compare(); - var rcompare = (a, b, loose) => compare(b, a, loose); - module2.exports = rcompare; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-loose.js -var require_compare_loose = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-loose.js"(exports2, module2) { - "use strict"; - var compare = require_compare(); - var compareLoose = (a, b) => compare(a, b, true); - module2.exports = compareLoose; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-build.js -var require_compare_build = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-build.js"(exports2, module2) { - "use strict"; - var SemVer = require_semver(); - var compareBuild = (a, b, loose) => { - const versionA = new SemVer(a, loose); - const versionB = new SemVer(b, loose); - return versionA.compare(versionB) || versionA.compareBuild(versionB); - }; - module2.exports = compareBuild; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/sort.js -var require_sort = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/sort.js"(exports2, module2) { - "use strict"; - var compareBuild = require_compare_build(); - var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)); - module2.exports = sort; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rsort.js -var require_rsort = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rsort.js"(exports2, module2) { - "use strict"; - var compareBuild = require_compare_build(); - var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)); - module2.exports = rsort; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gt.js -var require_gt = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gt.js"(exports2, module2) { - "use strict"; - var compare = require_compare(); - var gt = (a, b, loose) => compare(a, b, loose) > 0; - module2.exports = gt; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lt.js -var require_lt = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lt.js"(exports2, module2) { - "use strict"; - var compare = require_compare(); - var lt = (a, b, loose) => compare(a, b, loose) < 0; - module2.exports = lt; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/eq.js -var require_eq = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/eq.js"(exports2, module2) { - "use strict"; - var compare = require_compare(); - var eq = (a, b, loose) => compare(a, b, loose) === 0; - module2.exports = eq; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/neq.js -var require_neq = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/neq.js"(exports2, module2) { - "use strict"; - var compare = require_compare(); - var neq = (a, b, loose) => compare(a, b, loose) !== 0; - module2.exports = neq; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gte.js -var require_gte = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gte.js"(exports2, module2) { - "use strict"; - var compare = require_compare(); - var gte = (a, b, loose) => compare(a, b, loose) >= 0; - module2.exports = gte; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lte.js -var require_lte = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lte.js"(exports2, module2) { - "use strict"; - var compare = require_compare(); - var lte = (a, b, loose) => compare(a, b, loose) <= 0; - module2.exports = lte; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/cmp.js -var require_cmp = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/cmp.js"(exports2, module2) { - "use strict"; - var eq = require_eq(); - var neq = require_neq(); - var gt = require_gt(); - var gte = require_gte(); - var lt = require_lt(); - var lte = require_lte(); - var cmp = (a, op, b, loose) => { - switch (op) { - case "===": - if (typeof a === "object") { - a = a.version; - } - if (typeof b === "object") { - b = b.version; - } - return a === b; - case "!==": - if (typeof a === "object") { - a = a.version; - } - if (typeof b === "object") { - b = b.version; - } - return a !== b; - case "": - case "=": - case "==": - return eq(a, b, loose); - case "!=": - return neq(a, b, loose); - case ">": - return gt(a, b, loose); - case ">=": - return gte(a, b, loose); - case "<": - return lt(a, b, loose); - case "<=": - return lte(a, b, loose); - default: - throw new TypeError(`Invalid operator: ${op}`); - } - }; - module2.exports = cmp; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/coerce.js -var require_coerce = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/coerce.js"(exports2, module2) { - "use strict"; - var SemVer = require_semver(); - var parse = require_parse3(); - var { safeRe: re, t } = require_re(); - var coerce = (version, options) => { - if (version instanceof SemVer) { - return version; - } - if (typeof version === "number") { - version = String(version); - } - if (typeof version !== "string") { - return null; - } - options = options || {}; - let match = null; - if (!options.rtl) { - match = version.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]); - } else { - const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]; - let next; - while ((next = coerceRtlRegex.exec(version)) && (!match || match.index + match[0].length !== version.length)) { - if (!match || next.index + next[0].length !== match.index + match[0].length) { - match = next; - } - coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length; - } - coerceRtlRegex.lastIndex = -1; - } - if (match === null) { - return null; - } - const major = match[2]; - const minor = match[3] || "0"; - const patch = match[4] || "0"; - const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ""; - const build = options.includePrerelease && match[6] ? `+${match[6]}` : ""; - return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options); - }; - module2.exports = coerce; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/truncate.js -var require_truncate = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/truncate.js"(exports2, module2) { - "use strict"; - var parse = require_parse3(); - var constants = require_constants8(); - var SemVer = require_semver(); - var truncate = (version, truncation, options) => { - if (!constants.RELEASE_TYPES.includes(truncation)) { - return null; - } - const clonedVersion = cloneInputVersion(version, options); - return clonedVersion && doTruncation(clonedVersion, truncation); - }; - var cloneInputVersion = (version, options) => { - const versionStringToParse = version instanceof SemVer ? version.version : version; - return parse(versionStringToParse, options); - }; - var doTruncation = (version, truncation) => { - if (isPrerelease(truncation)) { - return version.version; - } - version.prerelease = []; - switch (truncation) { - case "major": - version.minor = 0; - version.patch = 0; - break; - case "minor": - version.patch = 0; - break; - } - return version.format(); - }; - var isPrerelease = (type) => { - return type.startsWith("pre"); - }; - module2.exports = truncate; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/lrucache.js -var require_lrucache = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/lrucache.js"(exports2, module2) { - "use strict"; - var LRUCache = class { - constructor() { - this.max = 1e3; - this.map = /* @__PURE__ */ new Map(); - } - get(key) { - const value = this.map.get(key); - if (value === void 0) { - return void 0; - } else { - this.map.delete(key); - this.map.set(key, value); - return value; - } - } - delete(key) { - return this.map.delete(key); - } - set(key, value) { - const deleted = this.delete(key); - if (!deleted && value !== void 0) { - if (this.map.size >= this.max) { - const firstKey = this.map.keys().next().value; - this.delete(firstKey); - } - this.map.set(key, value); - } - return this; - } - }; - module2.exports = LRUCache; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/range.js -var require_range3 = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/range.js"(exports2, module2) { - "use strict"; - var SPACE_CHARACTERS = /\s+/g; - var Range = class _Range { - constructor(range, options) { - options = parseOptions(options); - if (range instanceof _Range) { - if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { - return range; - } else { - return new _Range(range.raw, options); - } - } - if (range instanceof Comparator) { - this.raw = range.value; - this.set = [[range]]; - this.formatted = void 0; - return this; - } - this.options = options; - this.loose = !!options.loose; - this.includePrerelease = !!options.includePrerelease; - this.raw = range.trim().replace(SPACE_CHARACTERS, " "); - this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length); - if (!this.set.length) { - throw new TypeError(`Invalid SemVer Range: ${this.raw}`); - } - if (this.set.length > 1) { - const first = this.set[0]; - this.set = this.set.filter((c) => !isNullSet(c[0])); - if (this.set.length === 0) { - this.set = [first]; - } else if (this.set.length > 1) { - for (const c of this.set) { - if (c.length === 1 && isAny(c[0])) { - this.set = [c]; - break; - } - } - } - } - this.formatted = void 0; - } - get range() { - if (this.formatted === void 0) { - this.formatted = ""; - for (let i = 0; i < this.set.length; i++) { - if (i > 0) { - this.formatted += "||"; - } - const comps = this.set[i]; - for (let k = 0; k < comps.length; k++) { - if (k > 0) { - this.formatted += " "; - } - this.formatted += comps[k].toString().trim(); - } - } - } - return this.formatted; - } - format() { - return this.range; - } - toString() { - return this.range; - } - parseRange(range) { - range = range.replace(BUILDSTRIPRE, ""); - const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE); - const memoKey = memoOpts + ":" + range; - const cached = cache.get(memoKey); - if (cached) { - return cached; - } - const loose = this.options.loose; - const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]; - range = range.replace(hr, hyphenReplace(this.options.includePrerelease)); - debug("hyphen replace", range); - range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace); - debug("comparator trim", range); - range = range.replace(re[t.TILDETRIM], tildeTrimReplace); - debug("tilde trim", range); - range = range.replace(re[t.CARETTRIM], caretTrimReplace); - debug("caret trim", range); - let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options)); - if (loose) { - rangeList = rangeList.filter((comp) => { - debug("loose invalid filter", comp, this.options); - return !!comp.match(re[t.COMPARATORLOOSE]); - }); - } - debug("range list", rangeList); - const rangeMap = /* @__PURE__ */ new Map(); - const comparators = rangeList.map((comp) => new Comparator(comp, this.options)); - for (const comp of comparators) { - if (isNullSet(comp)) { - return [comp]; - } - rangeMap.set(comp.value, comp); - } - if (rangeMap.size > 1 && rangeMap.has("")) { - rangeMap.delete(""); - } - const result = [...rangeMap.values()]; - cache.set(memoKey, result); - return result; - } - intersects(range, options) { - if (!(range instanceof _Range)) { - throw new TypeError("a Range is required"); - } - return this.set.some((thisComparators) => { - return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => { - return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => { - return rangeComparators.every((rangeComparator) => { - return thisComparator.intersects(rangeComparator, options); - }); - }); - }); - }); - } - // if ANY of the sets match ALL of its comparators, then pass - test(version) { - if (!version) { - return false; - } - if (typeof version === "string") { - try { - version = new SemVer(version, this.options); - } catch (er) { - return false; - } - } - for (let i = 0; i < this.set.length; i++) { - if (testSet(this.set[i], version, this.options)) { - return true; - } - } - return false; - } - }; - module2.exports = Range; - var LRU = require_lrucache(); - var cache = new LRU(); - var parseOptions = require_parse_options(); - var Comparator = require_comparator(); - var debug = require_debug2(); - var SemVer = require_semver(); - var { - safeRe: re, - src, - t, - comparatorTrimReplace, - tildeTrimReplace, - caretTrimReplace - } = require_re(); - var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants8(); - var BUILDSTRIPRE = new RegExp(src[t.BUILD], "g"); - var isNullSet = (c) => c.value === "<0.0.0-0"; - var isAny = (c) => c.value === ""; - var isSatisfiable = (comparators, options) => { - let result = true; - const remainingComparators = comparators.slice(); - let testComparator = remainingComparators.pop(); - while (result && remainingComparators.length) { - result = remainingComparators.every((otherComparator) => { - return testComparator.intersects(otherComparator, options); - }); - testComparator = remainingComparators.pop(); - } - return result; - }; - var parseComparator = (comp, options) => { - comp = comp.replace(re[t.BUILD], ""); - debug("comp", comp, options); - comp = replaceCarets(comp, options); - debug("caret", comp); - comp = replaceTildes(comp, options); - debug("tildes", comp); - comp = replaceXRanges(comp, options); - debug("xrange", comp); - comp = replaceStars(comp, options); - debug("stars", comp); - return comp; - }; - var isX = (id) => !id || id.toLowerCase() === "x" || id === "*"; - var invalidXRangeOrder = (M, m, p) => isX(M) && !isX(m) || isX(m) && p && !isX(p); - var replaceTildes = (comp, options) => { - return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" "); - }; - var replaceTilde = (comp, options) => { - const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]; - const z = options.includePrerelease ? "-0" : ""; - return comp.replace(r, (_, M, m, p, pr) => { - debug("tilde", comp, _, M, m, p, pr); - let ret; - if (isX(M)) { - ret = ""; - } else if (isX(m)) { - ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`; - } else if (isX(p)) { - ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`; - } else if (pr) { - debug("replaceTilde pr", pr); - ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; - } else { - ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`; - } - debug("tilde return", ret); - return ret; - }); - }; - var replaceCarets = (comp, options) => { - return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" "); - }; - var replaceCaret = (comp, options) => { - debug("caret", comp, options); - const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]; - const z = options.includePrerelease ? "-0" : ""; - return comp.replace(r, (_, M, m, p, pr) => { - debug("caret", comp, _, M, m, p, pr); - let ret; - if (isX(M)) { - ret = ""; - } else if (isX(m)) { - ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`; - } else if (isX(p)) { - if (M === "0") { - ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`; - } else { - ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`; - } - } else if (pr) { - debug("replaceCaret pr", pr); - if (M === "0") { - if (m === "0") { - ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`; - } else { - ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; - } - } else { - ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`; - } - } else { - debug("no pr"); - if (M === "0") { - if (m === "0") { - ret = `>=${M}.${m}.${p} <${M}.${m}.${+p + 1}-0`; - } else { - ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`; - } - } else { - ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`; - } - } - debug("caret return", ret); - return ret; - }); - }; - var replaceXRanges = (comp, options) => { - debug("replaceXRanges", comp, options); - return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" "); - }; - var replaceXRange = (comp, options) => { - comp = comp.trim(); - const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]; - return comp.replace(r, (ret, gtlt, M, m, p, pr) => { - debug("xRange", comp, ret, gtlt, M, m, p, pr); - if (invalidXRangeOrder(M, m, p)) { - return comp; - } - const xM = isX(M); - const xm = xM || isX(m); - const xp = xm || isX(p); - const anyX = xp; - if (gtlt === "=" && anyX) { - gtlt = ""; - } - pr = options.includePrerelease ? "-0" : ""; - if (xM) { - if (gtlt === ">" || gtlt === "<") { - ret = "<0.0.0-0"; - } else { - ret = "*"; - } - } else if (gtlt && anyX) { - if (xm) { - m = 0; - } - p = 0; - if (gtlt === ">") { - gtlt = ">="; - if (xm) { - M = +M + 1; - m = 0; - p = 0; - } else { - m = +m + 1; - p = 0; - } - } else if (gtlt === "<=") { - gtlt = "<"; - if (xm) { - M = +M + 1; - } else { - m = +m + 1; - } - } - if (gtlt === "<") { - pr = "-0"; - } - ret = `${gtlt + M}.${m}.${p}${pr}`; - } else if (xm) { - ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`; - } else if (xp) { - ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`; - } - debug("xRange return", ret); - return ret; - }); - }; - var replaceStars = (comp, options) => { - debug("replaceStars", comp, options); - return comp.trim().replace(re[t.STAR], ""); - }; - var replaceGTE0 = (comp, options) => { - debug("replaceGTE0", comp, options); - return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], ""); - }; - var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => { - if (isX(fM)) { - from = ""; - } else if (isX(fm)) { - from = `>=${fM}.0.0${incPr ? "-0" : ""}`; - } else if (isX(fp)) { - from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`; - } else if (fpr) { - from = `>=${from}`; - } else { - from = `>=${from}${incPr ? "-0" : ""}`; - } - if (isX(tM)) { - to = ""; - } else if (isX(tm)) { - to = `<${+tM + 1}.0.0-0`; - } else if (isX(tp)) { - to = `<${tM}.${+tm + 1}.0-0`; - } else if (tpr) { - to = `<=${tM}.${tm}.${tp}-${tpr}`; - } else if (incPr) { - to = `<${tM}.${tm}.${+tp + 1}-0`; - } else { - to = `<=${to}`; - } - return `${from} ${to}`.trim(); - }; - var testSet = (set, version, options) => { - for (let i = 0; i < set.length; i++) { - if (!set[i].test(version)) { - return false; - } - } - if (version.prerelease.length && !options.includePrerelease) { - for (let i = 0; i < set.length; i++) { - debug(set[i].semver); - if (set[i].semver === Comparator.ANY) { - continue; - } - if (set[i].semver.prerelease.length > 0) { - const allowed = set[i].semver; - if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) { - return true; - } - } - } - return false; - } - return true; - }; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/comparator.js -var require_comparator = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/comparator.js"(exports2, module2) { - "use strict"; - var ANY = Symbol("SemVer ANY"); - var Comparator = class _Comparator { - static get ANY() { - return ANY; - } - constructor(comp, options) { - options = parseOptions(options); - if (comp instanceof _Comparator) { - if (comp.loose === !!options.loose) { - return comp; - } else { - comp = comp.value; - } - } - comp = comp.trim().split(/\s+/).join(" "); - debug("comparator", comp, options); - this.options = options; - this.loose = !!options.loose; - this.parse(comp); - if (this.semver === ANY) { - this.value = ""; - } else { - this.value = this.operator + this.semver.version; - } - debug("comp", this); - } - parse(comp) { - const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; - const m = comp.match(r); - if (!m) { - throw new TypeError(`Invalid comparator: ${comp}`); - } - this.operator = m[1] !== void 0 ? m[1] : ""; - if (this.operator === "=") { - this.operator = ""; - } - if (!m[2]) { - this.semver = ANY; - } else { - this.semver = new SemVer(m[2], this.options.loose); - } - } - toString() { - return this.value; - } - test(version) { - debug("Comparator.test", version, this.options.loose); - if (this.semver === ANY || version === ANY) { - return true; - } - if (typeof version === "string") { - try { - version = new SemVer(version, this.options); - } catch (er) { - return false; - } - } - return cmp(version, this.operator, this.semver, this.options); - } - intersects(comp, options) { - if (!(comp instanceof _Comparator)) { - throw new TypeError("a Comparator is required"); - } - if (this.operator === "") { - if (this.value === "") { - return true; - } - return new Range(comp.value, options).test(this.value); - } else if (comp.operator === "") { - if (comp.value === "") { - return true; - } - return new Range(this.value, options).test(comp.semver); - } - options = parseOptions(options); - if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) { - return false; - } - if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) { - return false; - } - if (this.operator.startsWith(">") && comp.operator.startsWith(">")) { - return true; - } - if (this.operator.startsWith("<") && comp.operator.startsWith("<")) { - return true; - } - if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) { - return true; - } - if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) { - return true; - } - if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) { - return true; - } - return false; - } - }; - module2.exports = Comparator; - var parseOptions = require_parse_options(); - var { safeRe: re, t } = require_re(); - var cmp = require_cmp(); - var debug = require_debug2(); - var SemVer = require_semver(); - var Range = require_range3(); - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/satisfies.js -var require_satisfies = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/satisfies.js"(exports2, module2) { - "use strict"; - var Range = require_range3(); - var satisfies = (version, range, options) => { - try { - range = new Range(range, options); - } catch (er) { - return false; - } - return range.test(version); - }; - module2.exports = satisfies; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/to-comparators.js -var require_to_comparators = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/to-comparators.js"(exports2, module2) { - "use strict"; - var Range = require_range3(); - var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" ")); - module2.exports = toComparators; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/max-satisfying.js -var require_max_satisfying = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/max-satisfying.js"(exports2, module2) { - "use strict"; - var SemVer = require_semver(); - var Range = require_range3(); - var maxSatisfying = (versions, range, options) => { - let max = null; - let maxSV = null; - let rangeObj = null; - try { - rangeObj = new Range(range, options); - } catch (er) { - return null; - } - versions.forEach((v) => { - if (rangeObj.test(v)) { - if (!max || maxSV.compare(v) === -1) { - max = v; - maxSV = new SemVer(max, options); - } - } - }); - return max; - }; - module2.exports = maxSatisfying; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-satisfying.js -var require_min_satisfying = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-satisfying.js"(exports2, module2) { - "use strict"; - var SemVer = require_semver(); - var Range = require_range3(); - var minSatisfying = (versions, range, options) => { - let min = null; - let minSV = null; - let rangeObj = null; - try { - rangeObj = new Range(range, options); - } catch (er) { - return null; - } - versions.forEach((v) => { - if (rangeObj.test(v)) { - if (!min || minSV.compare(v) === 1) { - min = v; - minSV = new SemVer(min, options); - } - } - }); - return min; - }; - module2.exports = minSatisfying; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-version.js -var require_min_version = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-version.js"(exports2, module2) { - "use strict"; - var SemVer = require_semver(); - var Range = require_range3(); - var gt = require_gt(); - var minVersion = (range, loose) => { - range = new Range(range, loose); - let minver = new SemVer("0.0.0"); - if (range.test(minver)) { - return minver; - } - minver = new SemVer("0.0.0-0"); - if (range.test(minver)) { - return minver; - } - minver = null; - for (let i = 0; i < range.set.length; ++i) { - const comparators = range.set[i]; - let setMin = null; - comparators.forEach((comparator) => { - const compver = new SemVer(comparator.semver.version); - switch (comparator.operator) { - case ">": - if (compver.prerelease.length === 0) { - compver.patch++; - } else { - compver.prerelease.push(0); - } - compver.raw = compver.format(); - /* fallthrough */ - case "": - case ">=": - if (!setMin || gt(compver, setMin)) { - setMin = compver; - } - break; - case "<": - case "<=": - break; - /* istanbul ignore next */ - default: - throw new Error(`Unexpected operation: ${comparator.operator}`); - } - }); - if (setMin && (!minver || gt(minver, setMin))) { - minver = setMin; - } - } - if (minver && range.test(minver)) { - return minver; - } - return null; - }; - module2.exports = minVersion; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/valid.js -var require_valid2 = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/valid.js"(exports2, module2) { - "use strict"; - var Range = require_range3(); - var validRange = (range, options) => { - try { - return new Range(range, options).range || "*"; - } catch (er) { - return null; - } - }; - module2.exports = validRange; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/outside.js -var require_outside = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/outside.js"(exports2, module2) { - "use strict"; - var SemVer = require_semver(); - var Comparator = require_comparator(); - var { ANY } = Comparator; - var Range = require_range3(); - var satisfies = require_satisfies(); - var gt = require_gt(); - var lt = require_lt(); - var lte = require_lte(); - var gte = require_gte(); - var outside = (version, range, hilo, options) => { - version = new SemVer(version, options); - range = new Range(range, options); - let gtfn, ltefn, ltfn, comp, ecomp; - switch (hilo) { - case ">": - gtfn = gt; - ltefn = lte; - ltfn = lt; - comp = ">"; - ecomp = ">="; - break; - case "<": - gtfn = lt; - ltefn = gte; - ltfn = gt; - comp = "<"; - ecomp = "<="; - break; - default: - throw new TypeError('Must provide a hilo val of "<" or ">"'); - } - if (satisfies(version, range, options)) { - return false; - } - for (let i = 0; i < range.set.length; ++i) { - const comparators = range.set[i]; - let high = null; - let low = null; - comparators.forEach((comparator) => { - if (comparator.semver === ANY) { - comparator = new Comparator(">=0.0.0"); - } - high = high || comparator; - low = low || comparator; - if (gtfn(comparator.semver, high.semver, options)) { - high = comparator; - } else if (ltfn(comparator.semver, low.semver, options)) { - low = comparator; - } - }); - if (high.operator === comp || high.operator === ecomp) { - return false; - } - if ((!low.operator || low.operator === comp) && ltefn(version, low.semver)) { - return false; - } else if (low.operator === ecomp && ltfn(version, low.semver)) { - return false; - } - } - return true; - }; - module2.exports = outside; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/gtr.js -var require_gtr = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/gtr.js"(exports2, module2) { - "use strict"; - var outside = require_outside(); - var gtr = (version, range, options) => outside(version, range, ">", options); - module2.exports = gtr; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/ltr.js -var require_ltr = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/ltr.js"(exports2, module2) { - "use strict"; - var outside = require_outside(); - var ltr = (version, range, options) => outside(version, range, "<", options); - module2.exports = ltr; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/intersects.js -var require_intersects = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/intersects.js"(exports2, module2) { - "use strict"; - var Range = require_range3(); - var intersects = (r1, r2, options) => { - r1 = new Range(r1, options); - r2 = new Range(r2, options); - return r1.intersects(r2, options); - }; - module2.exports = intersects; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/simplify.js -var require_simplify = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/simplify.js"(exports2, module2) { - "use strict"; - var satisfies = require_satisfies(); - var compare = require_compare(); - module2.exports = (versions, range, options) => { - const set = []; - let first = null; - let prev = null; - const v = versions.sort((a, b) => compare(a, b, options)); - for (const version of v) { - const included = satisfies(version, range, options); - if (included) { - prev = version; - if (!first) { - first = version; - } - } else { - if (prev) { - set.push([first, prev]); - } - prev = null; - first = null; - } - } - if (first) { - set.push([first, null]); - } - const ranges = []; - for (const [min, max] of set) { - if (min === max) { - ranges.push(min); - } else if (!max && min === v[0]) { - ranges.push("*"); - } else if (!max) { - ranges.push(`>=${min}`); - } else if (min === v[0]) { - ranges.push(`<=${max}`); - } else { - ranges.push(`${min} - ${max}`); - } - } - const simplified = ranges.join(" || "); - const original = typeof range.raw === "string" ? range.raw : String(range); - return simplified.length < original.length ? simplified : range; - }; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/subset.js -var require_subset = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/subset.js"(exports2, module2) { - "use strict"; - var Range = require_range3(); - var Comparator = require_comparator(); - var { ANY } = Comparator; - var satisfies = require_satisfies(); - var compare = require_compare(); - var subset = (sub, dom, options = {}) => { - if (sub === dom) { - return true; - } - sub = new Range(sub, options); - dom = new Range(dom, options); - let sawNonNull = false; - OUTER: for (const simpleSub of sub.set) { - for (const simpleDom of dom.set) { - const isSub = simpleSubset(simpleSub, simpleDom, options); - sawNonNull = sawNonNull || isSub !== null; - if (isSub) { - continue OUTER; - } - } - if (sawNonNull) { - return false; - } - } - return true; - }; - var minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")]; - var minimumVersion = [new Comparator(">=0.0.0")]; - var simpleSubset = (sub, dom, options) => { - if (sub === dom) { - return true; - } - if (sub.length === 1 && sub[0].semver === ANY) { - if (dom.length === 1 && dom[0].semver === ANY) { - return true; - } else if (options.includePrerelease) { - sub = minimumVersionWithPreRelease; - } else { - sub = minimumVersion; - } - } - if (dom.length === 1 && dom[0].semver === ANY) { - if (options.includePrerelease) { - return true; - } else { - dom = minimumVersion; - } - } - const eqSet = /* @__PURE__ */ new Set(); - let gt, lt; - for (const c of sub) { - if (c.operator === ">" || c.operator === ">=") { - gt = higherGT(gt, c, options); - } else if (c.operator === "<" || c.operator === "<=") { - lt = lowerLT(lt, c, options); - } else { - eqSet.add(c.semver); - } - } - if (eqSet.size > 1) { - return null; - } - let gtltComp; - if (gt && lt) { - gtltComp = compare(gt.semver, lt.semver, options); - if (gtltComp > 0) { - return null; - } else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) { - return null; - } - } - for (const eq of eqSet) { - if (gt && !satisfies(eq, String(gt), options)) { - return null; - } - if (lt && !satisfies(eq, String(lt), options)) { - return null; - } - for (const c of dom) { - if (!satisfies(eq, String(c), options)) { - return false; - } - } - return true; - } - let higher, lower; - let hasDomLT, hasDomGT; - let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false; - let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false; - if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) { - needDomLTPre = false; - } - for (const c of dom) { - hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">="; - hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<="; - if (gt) { - if (needDomGTPre) { - if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) { - needDomGTPre = false; - } - } - if (c.operator === ">" || c.operator === ">=") { - higher = higherGT(gt, c, options); - if (higher === c && higher !== gt) { - return false; - } - } else if (gt.operator === ">=" && !c.test(gt.semver)) { - return false; - } - } - if (lt) { - if (needDomLTPre) { - if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) { - needDomLTPre = false; - } - } - if (c.operator === "<" || c.operator === "<=") { - lower = lowerLT(lt, c, options); - if (lower === c && lower !== lt) { - return false; - } - } else if (lt.operator === "<=" && !c.test(lt.semver)) { - return false; - } - } - if (!c.operator && (lt || gt) && gtltComp !== 0) { - return false; - } - } - if (gt && hasDomLT && !lt && gtltComp !== 0) { - return false; - } - if (lt && hasDomGT && !gt && gtltComp !== 0) { - return false; - } - if (needDomGTPre || needDomLTPre) { - return false; - } - return true; - }; - var higherGT = (a, b, options) => { - if (!a) { - return b; - } - const comp = compare(a.semver, b.semver, options); - return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a; - }; - var lowerLT = (a, b, options) => { - if (!a) { - return b; - } - const comp = compare(a.semver, b.semver, options); - return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a; - }; - module2.exports = subset; - } -}); - -// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/index.js -var require_semver2 = __commonJS({ - "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/index.js"(exports2, module2) { - "use strict"; - var internalRe = require_re(); - var constants = require_constants8(); - var SemVer = require_semver(); - var identifiers = require_identifiers(); - var parse = require_parse3(); - var valid = require_valid(); - var clean = require_clean(); - var inc = require_inc(); - var diff = require_diff(); - var major = require_major(); - var minor = require_minor(); - var patch = require_patch(); - var prerelease = require_prerelease(); - var compare = require_compare(); - var rcompare = require_rcompare(); - var compareLoose = require_compare_loose(); - var compareBuild = require_compare_build(); - var sort = require_sort(); - var rsort = require_rsort(); - var gt = require_gt(); - var lt = require_lt(); - var eq = require_eq(); - var neq = require_neq(); - var gte = require_gte(); - var lte = require_lte(); - var cmp = require_cmp(); - var coerce = require_coerce(); - var truncate = require_truncate(); - var Comparator = require_comparator(); - var Range = require_range3(); - var satisfies = require_satisfies(); - var toComparators = require_to_comparators(); - var maxSatisfying = require_max_satisfying(); - var minSatisfying = require_min_satisfying(); - var minVersion = require_min_version(); - var validRange = require_valid2(); - var outside = require_outside(); - var gtr = require_gtr(); - var ltr = require_ltr(); - var intersects = require_intersects(); - var simplifyRange = require_simplify(); - var subset = require_subset(); - module2.exports = { - parse, - valid, - clean, - inc, - diff, - major, - minor, - patch, - prerelease, - compare, - rcompare, - compareLoose, - compareBuild, - sort, - rsort, - gt, - lt, - eq, - neq, - gte, - lte, - cmp, - coerce, - truncate, - Comparator, - Range, - satisfies, - toComparators, - maxSatisfying, - minSatisfying, - minVersion, - validRange, - outside, - gtr, - ltr, - intersects, - simplifyRange, - subset, - SemVer, - re: internalRe.re, - src: internalRe.src, - tokens: internalRe.t, - SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION, - RELEASE_TYPES: constants.RELEASE_TYPES, - compareIdentifiers: identifiers.compareIdentifiers, - rcompareIdentifiers: identifiers.rcompareIdentifiers - }; - } -}); - -// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js -var require_asymmetricKeyDetailsSupported = __commonJS({ - "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js"(exports2, module2) { - var semver = require_semver2(); - module2.exports = semver.satisfies(process.version, ">=15.7.0"); - } -}); - -// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/rsaPssKeyDetailsSupported.js -var require_rsaPssKeyDetailsSupported = __commonJS({ - "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/rsaPssKeyDetailsSupported.js"(exports2, module2) { - var semver = require_semver2(); - module2.exports = semver.satisfies(process.version, ">=16.9.0"); - } -}); - -// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/validateAsymmetricKey.js -var require_validateAsymmetricKey = __commonJS({ - "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/validateAsymmetricKey.js"(exports2, module2) { - var ASYMMETRIC_KEY_DETAILS_SUPPORTED = require_asymmetricKeyDetailsSupported(); - var RSA_PSS_KEY_DETAILS_SUPPORTED = require_rsaPssKeyDetailsSupported(); - var allowedAlgorithmsForKeys = { - "ec": ["ES256", "ES384", "ES512"], - "rsa": ["RS256", "PS256", "RS384", "PS384", "RS512", "PS512"], - "rsa-pss": ["PS256", "PS384", "PS512"] - }; - var allowedCurves = { - ES256: "prime256v1", - ES384: "secp384r1", - ES512: "secp521r1" - }; - module2.exports = function(algorithm, key) { - if (!algorithm || !key) return; - const keyType = key.asymmetricKeyType; - if (!keyType) return; - const allowedAlgorithms = allowedAlgorithmsForKeys[keyType]; - if (!allowedAlgorithms) { - throw new Error(`Unknown key type "${keyType}".`); - } - if (!allowedAlgorithms.includes(algorithm)) { - throw new Error(`"alg" parameter for "${keyType}" key type must be one of: ${allowedAlgorithms.join(", ")}.`); - } - if (ASYMMETRIC_KEY_DETAILS_SUPPORTED) { - switch (keyType) { - case "ec": - const keyCurve = key.asymmetricKeyDetails.namedCurve; - const allowedCurve = allowedCurves[algorithm]; - if (keyCurve !== allowedCurve) { - throw new Error(`"alg" parameter "${algorithm}" requires curve "${allowedCurve}".`); - } - break; - case "rsa-pss": - if (RSA_PSS_KEY_DETAILS_SUPPORTED) { - const length = parseInt(algorithm.slice(-3), 10); - const { hashAlgorithm, mgf1HashAlgorithm, saltLength } = key.asymmetricKeyDetails; - if (hashAlgorithm !== `sha${length}` || mgf1HashAlgorithm !== hashAlgorithm) { - throw new Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${algorithm}.`); - } - if (saltLength !== void 0 && saltLength > length >> 3) { - throw new Error(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${algorithm}.`); - } - } - break; - } - } - }; - } -}); - -// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/psSupported.js -var require_psSupported = __commonJS({ - "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/psSupported.js"(exports2, module2) { - var semver = require_semver2(); - module2.exports = semver.satisfies(process.version, "^6.12.0 || >=8.0.0"); - } -}); - -// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/verify.js -var require_verify = __commonJS({ - "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/verify.js"(exports2, module2) { - var JsonWebTokenError2 = require_JsonWebTokenError(); - var NotBeforeError2 = require_NotBeforeError(); - var TokenExpiredError2 = require_TokenExpiredError(); - var decode = require_decode(); - var timespan = require_timespan(); - var validateAsymmetricKey = require_validateAsymmetricKey(); - var PS_SUPPORTED = require_psSupported(); - var jws = require_jws(); - var { KeyObject, createSecretKey, createPublicKey } = require("crypto"); - var PUB_KEY_ALGS = ["RS256", "RS384", "RS512"]; - var EC_KEY_ALGS = ["ES256", "ES384", "ES512"]; - var RSA_KEY_ALGS = ["RS256", "RS384", "RS512"]; - var HS_ALGS = ["HS256", "HS384", "HS512"]; - if (PS_SUPPORTED) { - PUB_KEY_ALGS.splice(PUB_KEY_ALGS.length, 0, "PS256", "PS384", "PS512"); - RSA_KEY_ALGS.splice(RSA_KEY_ALGS.length, 0, "PS256", "PS384", "PS512"); + function div(a, b) { + return ~~(a / b); } - module2.exports = function(jwtString, secretOrPublicKey, options, callback) { - if (typeof options === "function" && !callback) { - callback = options; - options = {}; + function mod(a, b) { + return a - ~~(a / b) * b; + } + function jalCal(jy) { + const gy = jy + 621; + let leapJ = -14; + let jp = BREAKS[0]; + let jump = 0; + if (jy < jp || jy >= BREAKS[BREAKS.length - 1]) + throw new RangeError(`Invalid Jalali year ${jy}`); + for (let i = 1; i < BREAKS.length; i += 1) { + const jm = BREAKS[i]; + jump = jm - jp; + if (jy < jm) + break; + leapJ = leapJ + div(jump, 33) * 8 + div(mod(jump, 33), 4); + jp = jm; } - if (!options) { - options = {}; - } - options = Object.assign({}, options); - let done; - if (callback) { - done = callback; + let n = jy - jp; + leapJ = leapJ + div(n, 33) * 8 + div(mod(n, 33) + 3, 4); + if (mod(jump, 33) === 4 && jump - n === 4) + leapJ += 1; + const leapG = div(gy, 4) - div((div(gy, 100) + 1) * 3, 4) - 150; + const march = 20 + leapJ - leapG; + if (jump - n < 6) + n = n - jump + div(jump + 4, 33) * 33; + let leap = mod(mod(n + 1, 33) - 1, 4); + if (leap === -1) + leap = 4; + return { leap, gy, march }; + } + function g2d(gy, gm, gd) { + let d = div((gy + div(gm - 8, 6) + 100100) * 1461, 4) + div(153 * mod(gm + 9, 12) + 2, 5) + gd - 34840408; + d = d - div(div(gy + 100100 + div(gm - 8, 6), 100) * 3, 4) + 752; + return d; + } + function d2g(jdn) { + let j = 4 * jdn + 139361631; + j = j + div(div(4 * jdn + 183187720, 146097) * 3, 4) * 4 - 3908; + const i = div(mod(j, 1461), 4) * 5 + 308; + const gd = div(mod(i, 153), 5) + 1; + const gm = mod(div(i, 153), 12) + 1; + const gy = div(j, 1461) - 100100 + div(8 - gm, 6); + return { gy, gm, gd }; + } + function j2d(jy, jm, jd) { + const r = jalCal(jy); + return g2d(r.gy, 3, r.march) + (jm - 1) * 31 - div(jm, 7) * (jm - 7) + jd - 1; + } + function d2j(jdn) { + const gy = d2g(jdn).gy; + let jy = gy - 621; + const r = jalCal(jy); + const jdn1f = g2d(gy, 3, r.march); + let k = jdn - jdn1f; + if (k >= 0) { + if (k <= 185) + return { jy, jm: 1 + div(k, 31), jd: mod(k, 31) + 1 }; + k -= 186; } else { - done = function(err, data) { - if (err) throw err; - return data; - }; + jy -= 1; + k += 179; + if (r.leap === 1) + k += 1; } - if (options.clockTimestamp && typeof options.clockTimestamp !== "number") { - return done(new JsonWebTokenError2("clockTimestamp must be a number")); - } - if (options.nonce !== void 0 && (typeof options.nonce !== "string" || options.nonce.trim() === "")) { - return done(new JsonWebTokenError2("nonce must be a non-empty string")); - } - if (options.allowInvalidAsymmetricKeyTypes !== void 0 && typeof options.allowInvalidAsymmetricKeyTypes !== "boolean") { - return done(new JsonWebTokenError2("allowInvalidAsymmetricKeyTypes must be a boolean")); - } - const clockTimestamp = options.clockTimestamp || Math.floor(Date.now() / 1e3); - if (!jwtString) { - return done(new JsonWebTokenError2("jwt must be provided")); - } - if (typeof jwtString !== "string") { - return done(new JsonWebTokenError2("jwt must be a string")); - } - const parts = jwtString.split("."); - if (parts.length !== 3) { - return done(new JsonWebTokenError2("jwt malformed")); - } - let decodedToken; + return { jy, jm: 7 + div(k, 30), jd: mod(k, 30) + 1 }; + } + var TEHRAN_OFFSET_MS = (3 * 60 + 30) * 60 * 1e3; + function toJalali(date) { + const local = new Date(date.getTime() + TEHRAN_OFFSET_MS); + return d2j(g2d(local.getUTCFullYear(), local.getUTCMonth() + 1, local.getUTCDate())); + } + function jalaliToGregorian(jy, jm, jd) { + return d2g(j2d(jy, jm, jd)); + } + function parseJalali(input) { + if (!input) + return null; + const ascii = String(input).trim().replace(/[۰-۹]/g, (d) => String("\u06F0\u06F1\u06F2\u06F3\u06F4\u06F5\u06F6\u06F7\u06F8\u06F9".indexOf(d))).replace(/[٠-٩]/g, (d) => String("\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669".indexOf(d))); + const m = ascii.match(/^(\d{4})[/-](\d{1,2})[/-](\d{1,2})$/); + if (!m) + return null; + const jy = Number(m[1]); + const jm = Number(m[2]); + const jd = Number(m[3]); + if (jm < 1 || jm > 12 || jd < 1 || jd > 31 || jm > 6 && jd > 30) + return null; try { - decodedToken = decode(jwtString, { complete: true }); + const back = d2j(j2d(jy, jm, jd)); + return back.jy === jy && back.jm === jm && back.jd === jd ? { jy, jm, jd } : null; + } catch { + return null; + } + } + var pad = (n) => String(n).padStart(2, "0"); + function formatJalali(d, sep = "-") { + return `${d.jy}${sep}${pad(d.jm)}${sep}${pad(d.jd)}`; + } + function jalaliToIsoDate(d) { + const g = jalaliToGregorian(d.jy, d.jm, d.jd); + return `${g.gy}-${pad(g.gm)}-${pad(g.gd)}`; + } + function toIsoDateTehran(date) { + const local = new Date(date.getTime() + TEHRAN_OFFSET_MS); + return `${local.getUTCFullYear()}-${pad(local.getUTCMonth() + 1)}-${pad(local.getUTCDate())}`; + } + } +}); + +// dist/modules/accounting-sync/providers/accounting-provider.js +var require_accounting_provider = __commonJS({ + "dist/modules/accounting-sync/providers/accounting-provider.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ZERO = exports2.AccountingNotSupportedError = exports2.AccountingProviderError = void 0; + exports2.asciiDigits = asciiDigits; + exports2.normalizeMobile = normalizeMobile; + exports2.dec = dec; + exports2.str = str; + exports2.splitName = splitName; + var client_1 = require("@prisma/client"); + var AccountingProviderError = class extends Error { + ambiguous; + response; + notFound; + constructor(message, ambiguous = false, response, notFound = false) { + super(message); + this.ambiguous = ambiguous; + this.response = response; + this.notFound = notFound; + this.name = "AccountingProviderError"; + } + }; + exports2.AccountingProviderError = AccountingProviderError; + var AccountingNotSupportedError = class extends AccountingProviderError { + constructor(what) { + super(`${what} \u062F\u0631 API \u0627\u06CC\u0646 \u0646\u0631\u0645\u200C\u0627\u0641\u0632\u0627\u0631 \u0648\u062C\u0648\u062F \u0646\u062F\u0627\u0631\u062F`); + this.name = "AccountingNotSupportedError"; + } + }; + exports2.AccountingNotSupportedError = AccountingNotSupportedError; + var PERSIAN_DIGITS = "\u06F0\u06F1\u06F2\u06F3\u06F4\u06F5\u06F6\u06F7\u06F8\u06F9"; + var ARABIC_DIGITS = "\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669"; + function asciiDigits(v) { + return v.replace(/[۰-۹]/g, (d) => String(PERSIAN_DIGITS.indexOf(d))).replace(/[٠-٩]/g, (d) => String(ARABIC_DIGITS.indexOf(d))); + } + function normalizeMobile(v) { + if (v === null || v === void 0) + return null; + let d = asciiDigits(String(v)).replace(/\D/g, ""); + if (d.startsWith("0098")) + d = d.slice(4); + else if (d.startsWith("98") && d.length === 12) + d = d.slice(2); + if (d.length === 10 && d.startsWith("9")) + d = `0${d}`; + return /^09\d{9}$/.test(d) ? d : null; + } + function dec(v) { + if (v === null || v === void 0) + return null; + const s = asciiDigits(String(v)).replace(/,/g, "").trim(); + if (s === "" || s.toLowerCase() === "null" || s.toLowerCase() === "nan") + return null; + try { + const d = new client_1.Prisma.Decimal(s); + return d.isFinite() ? d : null; + } catch { + return null; + } + } + exports2.ZERO = new client_1.Prisma.Decimal(0); + function str(v) { + if (v === null || v === void 0) + return null; + const s = String(v).trim(); + return s === "" || s.toLowerCase() === "null" ? null : s; + } + function splitName(full) { + const parts = full.trim().split(/\s+/).filter(Boolean); + if (parts.length <= 1) + return { firstName: parts[0] ?? "", lastName: "" }; + return { firstName: parts[0], lastName: parts.slice(1).join(" ") }; + } + } +}); + +// dist/modules/accounting-sync/providers/tahesab.provider.js +var require_tahesab_provider = __commonJS({ + "dist/modules/accounting-sync/providers/tahesab.provider.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.tahesabProvider = void 0; + exports2.karatWithWage = karatWithWage; + var client_1 = require("@prisma/client"); + var accounting_http_1 = require_accounting_http(); + var jalali_1 = require_jalali(); + var accounting_provider_1 = require_accounting_provider(); + var CUSTOMER_PAGE = 500; + var EMPTY_WINDOWS_TO_STOP = 4; + var MAX_CUSTOMER_CODE = 2e6; + var BALANCE_CHUNK = 100; + var RECENT_DOCUMENTS = 1e3; + var CHANGE_WINDOW = 200; + function baseUrl(s) { + return s.baseUrl.replace(/\/+$/, ""); + } + function headers(s) { + return { + Authorization: `Bearer ${s.token}`, + DBname: s.dbName || "TahesabDB", + "Content-Type": "application/json", + Accept: "application/json" + }; + } + function isNotFoundMessage(msg) { + return /یافت نشد|Not_Found|not found/i.test(msg); + } + async function call(s, method, args) { + let res; + try { + res = await (0, accounting_http_1.httpRequest)({ + method: "POST", + url: `${baseUrl(s)}/`, + headers: headers(s), + body: JSON.stringify({ [method]: args }), + timeoutMs: s.timeoutMs, + ca: s.caCert + }); } catch (err) { - return done(err); - } - if (!decodedToken) { - return done(new JsonWebTokenError2("invalid token")); - } - const header = decodedToken.header; - let getSecret; - if (typeof secretOrPublicKey === "function") { - if (!callback) { - return done(new JsonWebTokenError2("verify must be called asynchronous if secret or public key is provided as a callback")); - } - getSecret = secretOrPublicKey; - } else { - getSecret = function(header2, secretCallback) { - return secretCallback(null, secretOrPublicKey); - }; - } - return getSecret(header, function(err, secretOrPublicKey2) { - if (err) { - return done(new JsonWebTokenError2("error in secret or public key callback: " + err.message)); - } - const hasSignature = parts[2].trim() !== ""; - if (!hasSignature && secretOrPublicKey2) { - return done(new JsonWebTokenError2("jwt signature is required")); - } - if (hasSignature && !secretOrPublicKey2) { - return done(new JsonWebTokenError2("secret or public key must be provided")); - } - if (!hasSignature && !options.algorithms) { - return done(new JsonWebTokenError2('please specify "none" in "algorithms" to verify unsigned tokens')); - } - if (secretOrPublicKey2 != null && !(secretOrPublicKey2 instanceof KeyObject)) { - try { - secretOrPublicKey2 = createPublicKey(secretOrPublicKey2); - } catch (_) { - try { - secretOrPublicKey2 = createSecretKey(typeof secretOrPublicKey2 === "string" ? Buffer.from(secretOrPublicKey2) : secretOrPublicKey2); - } catch (_2) { - return done(new JsonWebTokenError2("secretOrPublicKey is not valid key material")); - } - } - } - if (!options.algorithms) { - if (secretOrPublicKey2.type === "secret") { - options.algorithms = HS_ALGS; - } else if (["rsa", "rsa-pss"].includes(secretOrPublicKey2.asymmetricKeyType)) { - options.algorithms = RSA_KEY_ALGS; - } else if (secretOrPublicKey2.asymmetricKeyType === "ec") { - options.algorithms = EC_KEY_ALGS; - } else { - options.algorithms = PUB_KEY_ALGS; - } - } - if (options.algorithms.indexOf(decodedToken.header.alg) === -1) { - return done(new JsonWebTokenError2("invalid algorithm")); - } - if (header.alg.startsWith("HS") && secretOrPublicKey2.type !== "secret") { - return done(new JsonWebTokenError2(`secretOrPublicKey must be a symmetric key when using ${header.alg}`)); - } else if (/^(?:RS|PS|ES)/.test(header.alg) && secretOrPublicKey2.type !== "public") { - return done(new JsonWebTokenError2(`secretOrPublicKey must be an asymmetric key when using ${header.alg}`)); - } - if (!options.allowInvalidAsymmetricKeyTypes) { - try { - validateAsymmetricKey(header.alg, secretOrPublicKey2); - } catch (e) { - return done(e); - } - } - let valid; - try { - valid = jws.verify(jwtString, decodedToken.header.alg, secretOrPublicKey2); - } catch (e) { - return done(e); - } - if (!valid) { - return done(new JsonWebTokenError2("invalid signature")); - } - const payload = decodedToken.payload; - if (typeof payload.nbf !== "undefined" && !options.ignoreNotBefore) { - if (typeof payload.nbf !== "number") { - return done(new JsonWebTokenError2("invalid nbf value")); - } - if (payload.nbf > clockTimestamp + (options.clockTolerance || 0)) { - return done(new NotBeforeError2("jwt not active", new Date(payload.nbf * 1e3))); - } - } - if (typeof payload.exp !== "undefined" && !options.ignoreExpiration) { - if (typeof payload.exp !== "number") { - return done(new JsonWebTokenError2("invalid exp value")); - } - if (clockTimestamp >= payload.exp + (options.clockTolerance || 0)) { - return done(new TokenExpiredError2("jwt expired", new Date(payload.exp * 1e3))); - } - } - if (options.audience) { - const audiences = Array.isArray(options.audience) ? options.audience : [options.audience]; - const target = Array.isArray(payload.aud) ? payload.aud : [payload.aud]; - const match = target.some(function(targetAudience) { - return audiences.some(function(audience) { - return audience instanceof RegExp ? audience.test(targetAudience) : audience === targetAudience; - }); - }); - if (!match) { - return done(new JsonWebTokenError2("jwt audience invalid. expected: " + audiences.join(" or "))); - } - } - if (options.issuer) { - const invalid_issuer = typeof options.issuer === "string" && payload.iss !== options.issuer || Array.isArray(options.issuer) && options.issuer.indexOf(payload.iss) === -1; - if (invalid_issuer) { - return done(new JsonWebTokenError2("jwt issuer invalid. expected: " + options.issuer)); - } - } - if (options.subject) { - if (payload.sub !== options.subject) { - return done(new JsonWebTokenError2("jwt subject invalid. expected: " + options.subject)); - } - } - if (options.jwtid) { - if (payload.jti !== options.jwtid) { - return done(new JsonWebTokenError2("jwt jwtid invalid. expected: " + options.jwtid)); - } - } - if (options.nonce) { - if (payload.nonce !== options.nonce) { - return done(new JsonWebTokenError2("jwt nonce invalid. expected: " + options.nonce)); - } - } - if (options.maxAge) { - if (typeof payload.iat !== "number") { - return done(new JsonWebTokenError2("iat required when maxAge is specified")); - } - const maxAgeTimestamp = timespan(options.maxAge, payload.iat); - if (typeof maxAgeTimestamp === "undefined") { - return done(new JsonWebTokenError2('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60')); - } - if (clockTimestamp >= maxAgeTimestamp + (options.clockTolerance || 0)) { - return done(new TokenExpiredError2("maxAge exceeded", new Date(maxAgeTimestamp * 1e3))); - } - } - if (options.complete === true) { - const signature = decodedToken.signature; - return done(null, { - header, - payload, - signature - }); - } - return done(null, payload); - }); - }; - } -}); - -// ../../node_modules/.pnpm/lodash.includes@4.3.0/node_modules/lodash.includes/index.js -var require_lodash = __commonJS({ - "../../node_modules/.pnpm/lodash.includes@4.3.0/node_modules/lodash.includes/index.js"(exports2, module2) { - var INFINITY = 1 / 0; - var MAX_SAFE_INTEGER = 9007199254740991; - var MAX_INTEGER = 17976931348623157e292; - var NAN = 0 / 0; - var argsTag = "[object Arguments]"; - var funcTag = "[object Function]"; - var genTag = "[object GeneratorFunction]"; - var stringTag = "[object String]"; - var symbolTag = "[object Symbol]"; - var reTrim = /^\s+|\s+$/g; - var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - var reIsBinary = /^0b[01]+$/i; - var reIsOctal = /^0o[0-7]+$/i; - var reIsUint = /^(?:0|[1-9]\d*)$/; - var freeParseInt = parseInt; - function arrayMap(array, iteratee) { - var index = -1, length = array ? array.length : 0, result = Array(length); - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; - } - function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, index = fromIndex + (fromRight ? 1 : -1); - while (fromRight ? index-- : ++index < length) { - if (predicate(array[index], index, array)) { - return index; - } - } - return -1; - } - function baseIndexOf(array, value, fromIndex) { - if (value !== value) { - return baseFindIndex(array, baseIsNaN, fromIndex); - } - var index = fromIndex - 1, length = array.length; - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; - } - function baseIsNaN(value) { - return value !== value; - } - function baseTimes(n, iteratee) { - var index = -1, result = Array(n); - while (++index < n) { - result[index] = iteratee(index); - } - return result; - } - function baseValues(object, props) { - return arrayMap(props, function(key) { - return object[key]; - }); - } - function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; - } - var objectProto = Object.prototype; - var hasOwnProperty = objectProto.hasOwnProperty; - var objectToString = objectProto.toString; - var propertyIsEnumerable = objectProto.propertyIsEnumerable; - var nativeKeys = overArg(Object.keys, Object); - var nativeMax = Math.max; - function arrayLikeKeys(value, inherited) { - var result = isArray(value) || isArguments(value) ? baseTimes(value.length, String) : []; - var length = result.length, skipIndexes = !!length; - for (var key in value) { - if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isIndex(key, length)))) { - result.push(key); - } - } - return result; - } - function baseKeys(object) { - if (!isPrototype(object)) { - return nativeKeys(object); - } - var result = []; - for (var key in Object(object)) { - if (hasOwnProperty.call(object, key) && key != "constructor") { - result.push(key); - } - } - return result; - } - function isIndex(value, length) { - length = length == null ? MAX_SAFE_INTEGER : length; - return !!length && (typeof value == "number" || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); - } - function isPrototype(value) { - var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto; - return value === proto; - } - function includes(collection, value, fromIndex, guard) { - collection = isArrayLike(collection) ? collection : values(collection); - fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0; - var length = collection.length; - if (fromIndex < 0) { - fromIndex = nativeMax(length + fromIndex, 0); - } - return isString(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1; - } - function isArguments(value) { - return isArrayLikeObject(value) && hasOwnProperty.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString.call(value) == argsTag); - } - var isArray = Array.isArray; - function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); - } - function isArrayLikeObject(value) { - return isObjectLike(value) && isArrayLike(value); - } - function isFunction(value) { - var tag = isObject(value) ? objectToString.call(value) : ""; - return tag == funcTag || tag == genTag; - } - function isLength(value) { - return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; - } - function isObject(value) { - var type = typeof value; - return !!value && (type == "object" || type == "function"); - } - function isObjectLike(value) { - return !!value && typeof value == "object"; - } - function isString(value) { - return typeof value == "string" || !isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag; - } - function isSymbol(value) { - return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag; - } - function toFinite(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = value < 0 ? -1 : 1; - return sign * MAX_INTEGER; - } - return value === value ? value : 0; - } - function toInteger(value) { - var result = toFinite(value), remainder = result % 1; - return result === result ? remainder ? result - remainder : result : 0; - } - function toNumber(value) { - if (typeof value == "number") { - return value; - } - if (isSymbol(value)) { - return NAN; - } - if (isObject(value)) { - var other = typeof value.valueOf == "function" ? value.valueOf() : value; - value = isObject(other) ? other + "" : other; - } - if (typeof value != "string") { - return value === 0 ? value : +value; - } - value = value.replace(reTrim, ""); - var isBinary = reIsBinary.test(value); - return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value; - } - function keys(object) { - return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); - } - function values(object) { - return object ? baseValues(object, keys(object)) : []; - } - module2.exports = includes; - } -}); - -// ../../node_modules/.pnpm/lodash.isboolean@3.0.3/node_modules/lodash.isboolean/index.js -var require_lodash2 = __commonJS({ - "../../node_modules/.pnpm/lodash.isboolean@3.0.3/node_modules/lodash.isboolean/index.js"(exports2, module2) { - var boolTag = "[object Boolean]"; - var objectProto = Object.prototype; - var objectToString = objectProto.toString; - function isBoolean(value) { - return value === true || value === false || isObjectLike(value) && objectToString.call(value) == boolTag; - } - function isObjectLike(value) { - return !!value && typeof value == "object"; - } - module2.exports = isBoolean; - } -}); - -// ../../node_modules/.pnpm/lodash.isinteger@4.0.4/node_modules/lodash.isinteger/index.js -var require_lodash3 = __commonJS({ - "../../node_modules/.pnpm/lodash.isinteger@4.0.4/node_modules/lodash.isinteger/index.js"(exports2, module2) { - var INFINITY = 1 / 0; - var MAX_INTEGER = 17976931348623157e292; - var NAN = 0 / 0; - var symbolTag = "[object Symbol]"; - var reTrim = /^\s+|\s+$/g; - var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - var reIsBinary = /^0b[01]+$/i; - var reIsOctal = /^0o[0-7]+$/i; - var freeParseInt = parseInt; - var objectProto = Object.prototype; - var objectToString = objectProto.toString; - function isInteger(value) { - return typeof value == "number" && value == toInteger(value); - } - function isObject(value) { - var type = typeof value; - return !!value && (type == "object" || type == "function"); - } - function isObjectLike(value) { - return !!value && typeof value == "object"; - } - function isSymbol(value) { - return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag; - } - function toFinite(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = value < 0 ? -1 : 1; - return sign * MAX_INTEGER; - } - return value === value ? value : 0; - } - function toInteger(value) { - var result = toFinite(value), remainder = result % 1; - return result === result ? remainder ? result - remainder : result : 0; - } - function toNumber(value) { - if (typeof value == "number") { - return value; - } - if (isSymbol(value)) { - return NAN; - } - if (isObject(value)) { - var other = typeof value.valueOf == "function" ? value.valueOf() : value; - value = isObject(other) ? other + "" : other; - } - if (typeof value != "string") { - return value === 0 ? value : +value; - } - value = value.replace(reTrim, ""); - var isBinary = reIsBinary.test(value); - return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value; - } - module2.exports = isInteger; - } -}); - -// ../../node_modules/.pnpm/lodash.isnumber@3.0.3/node_modules/lodash.isnumber/index.js -var require_lodash4 = __commonJS({ - "../../node_modules/.pnpm/lodash.isnumber@3.0.3/node_modules/lodash.isnumber/index.js"(exports2, module2) { - var numberTag = "[object Number]"; - var objectProto = Object.prototype; - var objectToString = objectProto.toString; - function isObjectLike(value) { - return !!value && typeof value == "object"; - } - function isNumber(value) { - return typeof value == "number" || isObjectLike(value) && objectToString.call(value) == numberTag; - } - module2.exports = isNumber; - } -}); - -// ../../node_modules/.pnpm/lodash.isplainobject@4.0.6/node_modules/lodash.isplainobject/index.js -var require_lodash5 = __commonJS({ - "../../node_modules/.pnpm/lodash.isplainobject@4.0.6/node_modules/lodash.isplainobject/index.js"(exports2, module2) { - var objectTag = "[object Object]"; - function isHostObject(value) { - var result = false; - if (value != null && typeof value.toString != "function") { - try { - result = !!(value + ""); - } catch (e) { - } - } - return result; - } - function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; - } - var funcProto = Function.prototype; - var objectProto = Object.prototype; - var funcToString = funcProto.toString; - var hasOwnProperty = objectProto.hasOwnProperty; - var objectCtorString = funcToString.call(Object); - var objectToString = objectProto.toString; - var getPrototype = overArg(Object.getPrototypeOf, Object); - function isObjectLike(value) { - return !!value && typeof value == "object"; - } - function isPlainObject(value) { - if (!isObjectLike(value) || objectToString.call(value) != objectTag || isHostObject(value)) { - return false; - } - var proto = getPrototype(value); - if (proto === null) { - return true; - } - var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor; - return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString; - } - module2.exports = isPlainObject; - } -}); - -// ../../node_modules/.pnpm/lodash.isstring@4.0.1/node_modules/lodash.isstring/index.js -var require_lodash6 = __commonJS({ - "../../node_modules/.pnpm/lodash.isstring@4.0.1/node_modules/lodash.isstring/index.js"(exports2, module2) { - var stringTag = "[object String]"; - var objectProto = Object.prototype; - var objectToString = objectProto.toString; - var isArray = Array.isArray; - function isObjectLike(value) { - return !!value && typeof value == "object"; - } - function isString(value) { - return typeof value == "string" || !isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag; - } - module2.exports = isString; - } -}); - -// ../../node_modules/.pnpm/lodash.once@4.1.1/node_modules/lodash.once/index.js -var require_lodash7 = __commonJS({ - "../../node_modules/.pnpm/lodash.once@4.1.1/node_modules/lodash.once/index.js"(exports2, module2) { - var FUNC_ERROR_TEXT = "Expected a function"; - var INFINITY = 1 / 0; - var MAX_INTEGER = 17976931348623157e292; - var NAN = 0 / 0; - var symbolTag = "[object Symbol]"; - var reTrim = /^\s+|\s+$/g; - var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; - var reIsBinary = /^0b[01]+$/i; - var reIsOctal = /^0o[0-7]+$/i; - var freeParseInt = parseInt; - var objectProto = Object.prototype; - var objectToString = objectProto.toString; - function before(n, func) { - var result; - if (typeof func != "function") { - throw new TypeError(FUNC_ERROR_TEXT); - } - n = toInteger(n); - return function() { - if (--n > 0) { - result = func.apply(this, arguments); - } - if (n <= 1) { - func = void 0; - } - return result; - }; - } - function once(func) { - return before(2, func); - } - function isObject(value) { - var type = typeof value; - return !!value && (type == "object" || type == "function"); - } - function isObjectLike(value) { - return !!value && typeof value == "object"; - } - function isSymbol(value) { - return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag; - } - function toFinite(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = value < 0 ? -1 : 1; - return sign * MAX_INTEGER; - } - return value === value ? value : 0; - } - function toInteger(value) { - var result = toFinite(value), remainder = result % 1; - return result === result ? remainder ? result - remainder : result : 0; - } - function toNumber(value) { - if (typeof value == "number") { - return value; - } - if (isSymbol(value)) { - return NAN; - } - if (isObject(value)) { - var other = typeof value.valueOf == "function" ? value.valueOf() : value; - value = isObject(other) ? other + "" : other; - } - if (typeof value != "string") { - return value === 0 ? value : +value; - } - value = value.replace(reTrim, ""); - var isBinary = reIsBinary.test(value); - return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value; - } - module2.exports = once; - } -}); - -// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/sign.js -var require_sign2 = __commonJS({ - "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/sign.js"(exports2, module2) { - var timespan = require_timespan(); - var PS_SUPPORTED = require_psSupported(); - var validateAsymmetricKey = require_validateAsymmetricKey(); - var jws = require_jws(); - var includes = require_lodash(); - var isBoolean = require_lodash2(); - var isInteger = require_lodash3(); - var isNumber = require_lodash4(); - var isPlainObject = require_lodash5(); - var isString = require_lodash6(); - var once = require_lodash7(); - var { KeyObject, createSecretKey, createPrivateKey } = require("crypto"); - var SUPPORTED_ALGS = ["RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "HS256", "HS384", "HS512", "none"]; - if (PS_SUPPORTED) { - SUPPORTED_ALGS.splice(3, 0, "PS256", "PS384", "PS512"); - } - var sign_options_schema = { - expiresIn: { isValid: function(value) { - return isInteger(value) || isString(value) && value; - }, message: '"expiresIn" should be a number of seconds or string representing a timespan' }, - notBefore: { isValid: function(value) { - return isInteger(value) || isString(value) && value; - }, message: '"notBefore" should be a number of seconds or string representing a timespan' }, - audience: { isValid: function(value) { - return isString(value) || Array.isArray(value); - }, message: '"audience" must be a string or array' }, - algorithm: { isValid: includes.bind(null, SUPPORTED_ALGS), message: '"algorithm" must be a valid string enum value' }, - header: { isValid: isPlainObject, message: '"header" must be an object' }, - encoding: { isValid: isString, message: '"encoding" must be a string' }, - issuer: { isValid: isString, message: '"issuer" must be a string' }, - subject: { isValid: isString, message: '"subject" must be a string' }, - jwtid: { isValid: isString, message: '"jwtid" must be a string' }, - noTimestamp: { isValid: isBoolean, message: '"noTimestamp" must be a boolean' }, - keyid: { isValid: isString, message: '"keyid" must be a string' }, - mutatePayload: { isValid: isBoolean, message: '"mutatePayload" must be a boolean' }, - allowInsecureKeySizes: { isValid: isBoolean, message: '"allowInsecureKeySizes" must be a boolean' }, - allowInvalidAsymmetricKeyTypes: { isValid: isBoolean, message: '"allowInvalidAsymmetricKeyTypes" must be a boolean' } - }; - var registered_claims_schema = { - iat: { isValid: isNumber, message: '"iat" should be a number of seconds' }, - exp: { isValid: isNumber, message: '"exp" should be a number of seconds' }, - nbf: { isValid: isNumber, message: '"nbf" should be a number of seconds' } - }; - function validate(schema, allowUnknown, object, parameterName) { - if (!isPlainObject(object)) { - throw new Error('Expected "' + parameterName + '" to be a plain object.'); - } - Object.keys(object).forEach(function(key) { - const validator = schema[key]; - if (!validator) { - if (!allowUnknown) { - throw new Error('"' + key + '" is not allowed in "' + parameterName + '"'); - } - return; - } - if (!validator.isValid(object[key])) { - throw new Error(validator.message); - } - }); - } - function validateOptions(options) { - return validate(sign_options_schema, false, options, "options"); - } - function validatePayload(payload) { - return validate(registered_claims_schema, true, payload, "payload"); - } - var options_to_payload = { - "audience": "aud", - "issuer": "iss", - "subject": "sub", - "jwtid": "jti" - }; - var options_for_objects = [ - "expiresIn", - "notBefore", - "noTimestamp", - "audience", - "issuer", - "subject", - "jwtid" - ]; - module2.exports = function(payload, secretOrPrivateKey, options, callback) { - if (typeof options === "function") { - callback = options; - options = {}; - } else { - options = options || {}; - } - const isObjectPayload = typeof payload === "object" && !Buffer.isBuffer(payload); - const header = Object.assign({ - alg: options.algorithm || "HS256", - typ: isObjectPayload ? "JWT" : void 0, - kid: options.keyid - }, options.header); - function failure(err) { - if (callback) { - return callback(err); + if (err instanceof accounting_http_1.AccountingHttpError) { + throw new accounting_provider_1.AccountingProviderError(`\u062A\u0647\u200C\u062D\u0633\u0627\u0628 (${method}): ${err.message}`, err.ambiguous); } throw err; } - if (!secretOrPrivateKey && options.algorithm !== "none") { - return failure(new Error("secretOrPrivateKey must have a value")); - } - if (secretOrPrivateKey != null && !(secretOrPrivateKey instanceof KeyObject)) { - try { - secretOrPrivateKey = createPrivateKey(secretOrPrivateKey); - } catch (_) { - try { - secretOrPrivateKey = createSecretKey(typeof secretOrPrivateKey === "string" ? Buffer.from(secretOrPrivateKey) : secretOrPrivateKey); - } catch (_2) { - return failure(new Error("secretOrPrivateKey is not valid key material")); - } - } - } - if (header.alg.startsWith("HS") && secretOrPrivateKey.type !== "secret") { - return failure(new Error(`secretOrPrivateKey must be a symmetric key when using ${header.alg}`)); - } else if (/^(?:RS|PS|ES)/.test(header.alg)) { - if (secretOrPrivateKey.type !== "private") { - return failure(new Error(`secretOrPrivateKey must be an asymmetric key when using ${header.alg}`)); - } - if (!options.allowInsecureKeySizes && !header.alg.startsWith("ES") && secretOrPrivateKey.asymmetricKeyDetails !== void 0 && //KeyObject.asymmetricKeyDetails is supported in Node 15+ - secretOrPrivateKey.asymmetricKeyDetails.modulusLength < 2048) { - return failure(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${header.alg}`)); - } - } - if (typeof payload === "undefined") { - return failure(new Error("payload is required")); - } else if (isObjectPayload) { - try { - validatePayload(payload); - } catch (error) { - return failure(error); - } - if (!options.mutatePayload) { - payload = Object.assign({}, payload); - } - } else { - const invalid_options = options_for_objects.filter(function(opt) { - return typeof options[opt] !== "undefined"; - }); - if (invalid_options.length > 0) { - return failure(new Error("invalid " + invalid_options.join(",") + " option for " + typeof payload + " payload")); - } - } - if (typeof payload.exp !== "undefined" && typeof options.expiresIn !== "undefined") { - return failure(new Error('Bad "options.expiresIn" option the payload already has an "exp" property.')); - } - if (typeof payload.nbf !== "undefined" && typeof options.notBefore !== "undefined") { - return failure(new Error('Bad "options.notBefore" option the payload already has an "nbf" property.')); - } + let json; try { - validateOptions(options); - } catch (error) { - return failure(error); + json = (0, accounting_http_1.parseLooseJson)(res.body); + } catch { + throw new accounting_provider_1.AccountingProviderError(`\u062A\u0647\u200C\u062D\u0633\u0627\u0628 (${method}): \u067E\u0627\u0633\u062E \u0646\u0627\u0645\u0639\u062A\u0628\u0631 (HTTP ${res.status})`, res.status >= 200 && res.status < 300, res.body.slice(0, 500)); } - if (!options.allowInvalidAsymmetricKeyTypes) { + const error = json && typeof json === "object" && !Array.isArray(json) ? json.ERROR : void 0; + if (error !== void 0 || res.status < 200 || res.status >= 300) { + const msg = typeof error === "string" ? error : `HTTP ${res.status}`; + throw new accounting_provider_1.AccountingProviderError(`\u062A\u0647\u200C\u062D\u0633\u0627\u0628 (${method}): ${msg.split("\r\n")[0]}`, false, trimDiagnostics(json), res.status === 404 || isNotFoundMessage(msg)); + } + return json; + } + function trimDiagnostics(json) { + if (json && typeof json === "object" && "ERROR" in json) { + return { ERROR: json.ERROR }; + } + return json; + } + async function callList(s, method, args) { + try { + return await call(s, method, args); + } catch (err) { + if (err instanceof accounting_provider_1.AccountingProviderError && err.notFound) + return null; + throw err; + } + } + function rowsOf(json) { + if (!json) + return []; + if (Array.isArray(json)) + return json; + if (typeof json === "object") { + return Object.values(json).filter((v) => !!v && typeof v === "object"); + } + return []; + } + function toCustomer(r) { + return { + code: String(r.Code), + name: (0, accounting_provider_1.str)(r.Name) ?? "", + mobile: (0, accounting_provider_1.normalizeMobile)(r.Mobile), + phone: null, + nationalCode: (0, accounting_provider_1.str)(r.CodeMelli), + address: (0, accounting_provider_1.str)(r.Address), + groupId: (0, accounting_provider_1.str)(r.GID), + groupName: (0, accounting_provider_1.str)(r.GoroupName) + }; + } + var neg = (d) => d ? d.negated() : null; + var METALS = { "0": "\u0637\u0644\u0627", "1": "\u067E\u0644\u0627\u062A\u06CC\u0646", "2": "\u0646\u0642\u0631\u0647" }; + function karatWithWage(karat, wagePercent) { + return new client_1.Prisma.Decimal(karat).mul(new client_1.Prisma.Decimal(1).add(wagePercent.div(100))).toDecimalPlaces(3); + } + exports2.tahesabProvider = { + name: "tahesab", + label: "\u062A\u0647\u200C\u062D\u0633\u0627\u0628", + capabilities: { createKarSakhte: false, documentInquiry: true, movementScope: "recent-documents", changeFeed: true }, + async health(s) { + const path = baseUrl(s).startsWith("https:") ? "CheckHealth-SSL" : "CheckHealth-No-SSL"; + let info = {}; try { - validateAsymmetricKey(header.alg, secretOrPrivateKey); - } catch (error) { - return failure(error); - } - } - const timestamp = payload.iat || Math.floor(Date.now() / 1e3); - if (options.noTimestamp) { - delete payload.iat; - } else if (isObjectPayload) { - payload.iat = timestamp; - } - if (typeof options.notBefore !== "undefined") { - try { - payload.nbf = timespan(options.notBefore, timestamp); + const res = await (0, accounting_http_1.httpRequest)({ + method: "GET", + url: `${baseUrl(s)}/${path}`, + headers: headers(s), + timeoutMs: s.timeoutMs, + ca: s.caCert + }); + const json = (0, accounting_http_1.parseLooseJson)(res.body); + info = { + status: json.Status, + api: json.Api_Status, + db: json.DB_Status, + version: json.TahesabVersion, + dbType: json.DBType, + dbName: json.DBName + }; } catch (err) { - return failure(err); + if (err instanceof accounting_http_1.AccountingHttpError) + throw new accounting_provider_1.AccountingProviderError(`\u062A\u0647\u200C\u062D\u0633\u0627\u0628: ${err.message}`); + throw new accounting_provider_1.AccountingProviderError("\u062A\u0647\u200C\u062D\u0633\u0627\u0628: \u067E\u0627\u0633\u062E CheckHealth \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u0627\u0633\u062A"); } - if (typeof payload.nbf === "undefined") { - return failure(new Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60')); - } - } - if (typeof options.expiresIn !== "undefined" && typeof payload === "object") { - try { - payload.exp = timespan(options.expiresIn, timestamp); - } catch (err) { - return failure(err); - } - if (typeof payload.exp === "undefined") { - return failure(new Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60')); - } - } - Object.keys(options_to_payload).forEach(function(key) { - const claim = options_to_payload[key]; - if (typeof options[key] !== "undefined") { - if (typeof payload[claim] !== "undefined") { - return failure(new Error('Bad "options.' + key + '" option. The payload already has an "' + claim + '" property.')); + const groups = rowsOf(await call(s, "DoListGorooh", [])); + return { ...info, customerGroups: groups.length }; + }, + async listCustomerGroups(s) { + const groups = rowsOf(await call(s, "DoListGorooh", [])).map((g) => ({ + id: String(g.GID), + name: (0, accounting_provider_1.str)(g.Name) ?? String(g.GID) + })); + if (!groups.some((g) => g.id === "0")) + groups.push({ id: "0", name: "\u0628\u062F\u0648\u0646 \u06AF\u0631\u0648\u0647 (GID 0)" }); + return groups; + }, + async listCustomers(s, cursor) { + let [start, empty] = (cursor ?? "1:0").split(":").map(Number); + if (!Number.isFinite(start) || start < 1) + start = 1; + if (!Number.isFinite(empty)) + empty = 0; + const json = await callList(s, "Dolistmoshtari", [start, start + CUSTOMER_PAGE - 1]); + const items = rowsOf(json).map(toCustomer); + empty = items.length === 0 ? empty + 1 : 0; + const nextStart = start + CUSTOMER_PAGE; + const done = empty >= EMPTY_WINDOWS_TO_STOP || nextStart > MAX_CUSTOMER_CODE; + return { items, next: done ? null : `${nextStart}:${empty}` }; + }, + async findCustomersByMobile(s, mobile) { + const target = (0, accounting_provider_1.normalizeMobile)(mobile); + if (!target) + return []; + const found = /* @__PURE__ */ new Map(); + for (const form of [Number(target.slice(1)), target]) { + for (const r of rowsOf(await callList(s, "DoListMoshtari", [form]))) { + const c = toCustomer(r); + if (c.mobile === target) + found.set(c.code, c); } - payload[claim] = options[key]; } - }); - const encoding = options.encoding || "utf8"; - if (typeof callback === "function") { - callback = callback && once(callback); - jws.createSign({ - header, - privateKey: secretOrPrivateKey, - payload, - encoding - }).once("error", callback).once("done", function(signature) { - if (!options.allowInsecureKeySizes && /^(?:RS|PS)/.test(header.alg) && signature.length < 256) { - return callback(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${header.alg}`)); + return [...found.values()]; + }, + async createCustomer(s, p) { + const json = await call(s, "DoNewMoshtari", [ + p.fullName, + p.group.name ?? "", + p.mobile, + p.address ?? "", + p.nationalCode ?? "", + "", + "", + "-1", + -1, + // Moshtari_Code -1: Tahesab assigns the code + 0 + // Jens_Felez: gold + ]); + if (json?.OK === void 0 || json.OK === null) { + throw new accounting_provider_1.AccountingProviderError("\u062A\u0647\u200C\u062D\u0633\u0627\u0628: \u06A9\u062F \u062D\u0633\u0627\u0628 \u062C\u062F\u06CC\u062F \u0628\u0631\u0646\u06AF\u0634\u062A", false, json); + } + return { code: String(json.OK), response: json }; + }, + async updateCustomer(s, code, p) { + const json = await call(s, "DoEditMoshtari", [ + p.fullName, + p.group.name ?? "-1", + p.mobile, + p.address ?? "-1", + p.nationalCode ?? "-1", + "-1", + "-1", + "-1", + Number(code) + ]); + return { response: json }; + }, + async getBalances(s, codes) { + const out = []; + for (let i = 0; i < codes.length; i += BALANCE_CHUNK) { + const chunk = codes.slice(i, i + BALANCE_CHUNK); + const json = await callList(s, "getmandehesabbycode", chunk); + for (const r of rowsOf(json?.MandeHesab)) { + out.push({ + code: String(r.Code), + goldGrams: ((0, accounting_provider_1.dec)(r.MandeyeVazni) ?? accounting_provider_1.ZERO).negated(), + rial: ((0, accounting_provider_1.dec)(r.MandeyeMali) ?? accounting_provider_1.ZERO).negated() + }); } - callback(null, signature); + } + return out; + }, + async getChanges(s, cursor) { + const rows = rowsOf(await callList(s, "DoListUpdatedAsnad", [CHANGE_WINDOW])); + let maxId = 0; + let latestEdit = ""; + for (const r of rows) { + maxId = Math.max(maxId, Number(r.ID) || 0); + const edited = String(r.ZamanEdit ?? ""); + if (edited && edited !== "null" && edited > latestEdit) + latestEdit = edited; + } + const next = `${maxId}|${latestEdit}`; + if (cursor === null) + return { cursor: next, accountCodes: [], itemNames: [], overflow: false }; + const [seenId, seenEdit] = [Number(cursor.split("|")[0]) || 0, cursor.split("|")[1] ?? ""]; + const fresh = rows.filter((r) => { + const edited = String(r.ZamanEdit ?? ""); + return (Number(r.ID) || 0) > seenId || !!edited && edited !== "null" && edited > seenEdit; }); - } else { - let signature = jws.sign({ header, payload, secret: secretOrPrivateKey, encoding }); - if (!options.allowInsecureKeySizes && /^(?:RS|PS)/.test(header.alg) && signature.length < 256) { - throw new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${header.alg}`); + const accounts = /* @__PURE__ */ new Set(); + const items = /* @__PURE__ */ new Set(); + for (const r of fresh) { + const code = (0, accounting_provider_1.str)(r.MCode); + if (code) + accounts.add(code); + const kar = (0, accounting_provider_1.str)(r.No_Kar); + if (kar && /کار/.test(String(r.NO ?? ""))) + items.add(kar); + } + return { + cursor: next, + accountCodes: [...accounts], + itemNames: [...items], + overflow: rows.length >= CHANGE_WINDOW && fresh.length === rows.length + }; + }, + async getStatement(s, q) { + const json = await callList(s, "DoListAsnad", [ + -1, + Number(q.code), + (0, jalali_1.formatJalali)(q.from), + (0, jalali_1.formatJalali)(q.to), + "", + 0, + "IRR" + ]); + return rowsOf(json).map((r) => toStatementRow(r)); + }, + async listKarSakhteGroups() { + return []; + }, + async listKarSakhteTypes() { + return []; + }, + async listKarSakhte(s) { + return rowsOf(await callList(s, "DoListNameKarsakhte", [])).map((r) => (0, accounting_provider_1.str)(r.Name)).filter((name) => !!name && !name.includes("??")).map((name) => ({ + code: name, + name, + groupId: null, + groupName: null, + typeId: null, + typeName: null, + saleWagePercent: null, + stockWeight: null, + stockCount: null + })); + }, + async getKarSakhteStock(s, item) { + const json = await callList(s, "GetMojoodiKarSakhte", [item.name, 0]); + return { weight: (0, accounting_provider_1.dec)(json?.VaznMojood), count: (0, accounting_provider_1.dec)(json?.TedadMojood) }; + }, + async getKarSakhteMovement(s, from, to) { + const lo = (0, jalali_1.formatJalali)(from, "/"); + const hi = (0, jalali_1.formatJalali)(to, "/"); + return rowsOf(await callList(s, "DoListUpdatedAsnad", [RECENT_DOCUMENTS])).filter((r) => /کار/.test(String(r.NO ?? ""))).filter((r) => { + const d = String(r.Tarikh ?? ""); + return d >= lo && d <= hi; + }).map((r) => ({ + itemCode: (0, accounting_provider_1.str)(r.No_Kar), + itemName: (0, accounting_provider_1.str)(r.No_Kar) ?? "\u2014", + date: String(r.Tarikh ?? ""), + description: [(0, accounting_provider_1.str)(r.NO), (0, accounting_provider_1.str)(r.Sharh1)].filter(Boolean).join(" \u2014 ") || null, + weight: (0, accounting_provider_1.dec)(r.Vazn), + amount: (0, accounting_provider_1.dec)(r.Mali), + count: (0, accounting_provider_1.dec)(r.Count) + })); + }, + async createKarSakhte() { + throw new accounting_provider_1.AccountingNotSupportedError("\u0633\u0627\u062E\u062A \u06A9\u0627\u0631\u0633\u0627\u062E\u062A\u0647"); + }, + async postOrderDocument(s, doc, progress, onProgress) { + const d = (0, jalali_1.toJalali)(doc.date); + const multi = doc.lines.length > 1 ? 1 : -1; + let done = progress.doneLines ?? 0; + let last = null; + for (let i = done; i < doc.lines.length; i += 1) { + const line = doc.lines[i]; + const args = [ + doc.temporary ? 0 : 1, + // Sabte_Kol_Or_Movaghat: 0 = temporary + Number(doc.customerCode), + -1, + // Factor_Number: assigned by Tahesab + i + 1, + // Radif_Number + d.jy, + d.jm, + d.jd, + Number(line.weightGrams.toFixed(3)), + Number(karatWithWage(line.karat, line.wagePercent).toString()), + line.count, + line.itemName, + 1, + // IsVoroodOrKhorooj: 1 = exit (goods to the customer) + 1, + // OjratTedadiOrGerami: per gram + Number(line.flatRial.toFixed(0)), + // MablaghKol — the only rial field that moves the balance + 0, + 0, + 0, + // Darsad_Talayee: the charge is already in Ayar; never count it twice + 0, + "", + 0, + 0, + // PoolSang: does not move the balance; the stones are in MablaghKol + line.description, + doc.factorCode, + -1, + multi, + 0, + 0 + ]; + try { + last = await call(s, "DoNewSanadVKHKar", args); + } catch (err) { + if (!(err instanceof accounting_provider_1.AccountingProviderError && /duplicate key/i.test(err.message + JSON.stringify(err.response ?? "")))) { + throw err; + } + last = { duplicate: true }; + } + done = i + 1; + await onProgress({ doneLines: done }); + } + const ref = String(last?.Factor_Code ?? doc.factorCode).toLowerCase(); + return { ref, progress: { doneLines: done }, response: last }; + }, + async documentExists(s, doc) { + try { + await call(s, "DoNewSanadInquiry", [doc.factorCode]); + return true; + } catch (err) { + if (err instanceof accounting_provider_1.AccountingProviderError && err.notFound) + return false; + if (err instanceof accounting_provider_1.AccountingProviderError && /:\s*Duplicate$/i.test(err.message)) + return true; + throw err; + } + }, + async deleteDocument(s, doc) { + try { + return { response: await call(s, "DoDeleteSanad", [doc.factorCode]) }; + } catch (err) { + if (err instanceof accounting_provider_1.AccountingProviderError && err.notFound) + return { response: { alreadyDeleted: true } }; + throw err; } - return signature; } }; + function toStatementRow(r) { + const metal = String(r.Jens_Felez ?? "0"); + const temporary = r.isSanadMovaghat === true; + const isGold = metal === "0"; + const isRial = !r.Arz || String(r.Arz).toUpperCase() === "IRR"; + const tabdil = isGold ? (0, accounting_provider_1.dec)(r.TabdilVazn) ?? accounting_provider_1.ZERO : accounting_provider_1.ZERO; + const mali = isRial ? (0, accounting_provider_1.dec)(r.Mali) ?? accounting_provider_1.ZERO : accounting_provider_1.ZERO; + return { + key: `${r.ID}-${r.Radif ?? 1}`, + documentRef: String(r.Factor_Code ?? r.ID).toLowerCase(), + accountCode: String(r.MCode ?? ""), + documentNo: String(r.Sh_Factor ?? ""), + date: String(r.Tarikh ?? ""), + time: (0, accounting_provider_1.str)(r.Tarikh_Time), + title: (0, accounting_provider_1.str)(r.NO) ?? "", + description: [(0, accounting_provider_1.str)(r.Sharh1), (0, accounting_provider_1.str)(r.Sharh2), (0, accounting_provider_1.str)(r.Baabat)].filter(Boolean).join(" \u2014 ") || null, + itemName: (0, accounting_provider_1.str)(r.No_Kar), + weight: (0, accounting_provider_1.dec)(r.Vazn), + karat: (0, accounting_provider_1.dec)(r.Ayar)?.toNumber() ?? null, + count: (0, accounting_provider_1.dec)(r.Count), + unitPrice: (0, accounting_provider_1.dec)(r.Fi) ?? (0, accounting_provider_1.dec)(r.Mazaneh), + wagePercent: (0, accounting_provider_1.dec)(r.DarsadSood), + goldIn: tabdil.gt(0) ? tabdil : accounting_provider_1.ZERO, + goldOut: tabdil.lt(0) ? tabdil.negated() : accounting_provider_1.ZERO, + rialIn: mali.gt(0) ? mali : accounting_provider_1.ZERO, + rialOut: mali.lt(0) ? mali.negated() : accounting_provider_1.ZERO, + // A temporary row reports TahesabVazni/Mali = 0 because it moves nothing + // yet; null lets the report carry the previous balance forward instead. + goldBalance: temporary ? null : neg((0, accounting_provider_1.dec)(r.TahesabVazni)), + rialBalance: temporary ? null : neg((0, accounting_provider_1.dec)(r.TahesabMali)), + metal: METALS[metal] ?? metal, + temporary + }; + } } }); -// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/index.js -var require_jsonwebtoken = __commonJS({ - "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/index.js"(exports2, module2) { - module2.exports = { - decode: require_decode(), - verify: require_verify(), - sign: require_sign2(), - JsonWebTokenError: require_JsonWebTokenError(), - NotBeforeError: require_NotBeforeError(), - TokenExpiredError: require_TokenExpiredError() +// dist/modules/accounting-sync/providers/zarrin.provider.js +var require_zarrin_provider = __commonJS({ + "dist/modules/accounting-sync/providers/zarrin.provider.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.__zarrinInternals = exports2.zarrinProvider = void 0; + var accounting_http_1 = require_accounting_http(); + var jalali_1 = require_jalali(); + var accounting_provider_1 = require_accounting_provider(); + var STATEMENT_PAGE = 250; + var CHANGE_WINDOW = 50; + var MAX_STATEMENT_PAGES = 20; + function endpoint(s) { + return s.baseUrl.trim(); + } + async function call(s, kind, params = {}) { + let url; + try { + url = new URL(endpoint(s)); + } catch { + throw new accounting_provider_1.AccountingProviderError("\u0632\u0631\u06CC\u0646: \u0622\u062F\u0631\u0633 \u0633\u0631\u0648\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u0627\u0633\u062A"); + } + url.searchParams.set("kind", kind); + url.searchParams.set("token", s.token); + for (const [k, v] of Object.entries(params)) { + if (v !== null && v !== void 0 && v !== "") + url.searchParams.set(k, String(v)); + } + let res; + try { + res = await (0, accounting_http_1.httpRequest)({ method: "GET", url: url.toString(), timeoutMs: s.timeoutMs, ca: s.caCert }); + } catch (err) { + if (err instanceof accounting_http_1.AccountingHttpError) { + throw new accounting_provider_1.AccountingProviderError(`\u0632\u0631\u06CC\u0646 (${kind}): ${err.message}`, err.ambiguous); + } + throw err; + } + if (res.status < 200 || res.status >= 300) { + throw new accounting_provider_1.AccountingProviderError(`\u0632\u0631\u06CC\u0646 (${kind}): HTTP ${res.status}`, false, res.body.slice(0, 500), res.status === 404); + } + let json; + try { + json = (0, accounting_http_1.parseLooseJson)(res.body); + if (typeof json === "string" && /^\s*[{[]/.test(json)) + json = (0, accounting_http_1.parseLooseJson)(json); + } catch { + throw new accounting_provider_1.AccountingProviderError(`\u0632\u0631\u06CC\u0646 (${kind}): \u067E\u0627\u0633\u062E \u0646\u0627\u0645\u0639\u062A\u0628\u0631`, true, res.body.slice(0, 500)); + } + if (!json || typeof json !== "object") { + throw new accounting_provider_1.AccountingProviderError(`\u0632\u0631\u06CC\u0646 (${kind}): \u067E\u0627\u0633\u062E \u0646\u0627\u0645\u0639\u062A\u0628\u0631`, true, json); + } + const o = json; + if (o.state === false || o.status === false) { + const msg = (0, accounting_provider_1.str)(o.msg) ?? (0, accounting_provider_1.str)(o.detail) ?? (0, accounting_provider_1.str)(o.message) ?? "\u062E\u0637\u0627\u06CC \u0646\u0627\u0645\u0634\u062E\u0635"; + throw new accounting_provider_1.AccountingProviderError(`\u0632\u0631\u06CC\u0646 (${kind}): ${msg}`, false, json, /یافت نشد|موجود نیست/.test(msg)); + } + return json; + } + function listOf(json) { + if (Array.isArray(json)) + return json; + if (json && typeof json === "object") { + const o = json; + for (const key of ["data", "date", "mande"]) { + if (Array.isArray(o[key])) + return o[key]; + } + if ("id" in o || "code" in o) + return [o]; + } + return []; + } + function dataOf(json) { + const o = json ?? {}; + const d = o.data; + if (d && typeof d === "object" && !Array.isArray(d)) + return d; + return o; + } + function joinName(first, last) { + return [(0, accounting_provider_1.str)(first), (0, accounting_provider_1.str)(last)].filter(Boolean).join(" ").trim(); + } + function fullJalali(v) { + const s = (0, accounting_provider_1.str)(v) ?? ""; + const m = s.match(/^(\d{2})\/(\d{1,2})\/(\d{1,2})$/); + if (!m) + return s; + return `14${m[1]}/${m[2].padStart(2, "0")}/${m[3].padStart(2, "0")}`; + } + function signed(s, v) { + return (s.balanceOwesWhen ?? "negative") === "negative" ? v.negated() : v; + } + exports2.zarrinProvider = { + name: "zarrin", + label: "\u0632\u0631\u06CC\u0646", + capabilities: { createKarSakhte: true, documentInquiry: false, movementScope: "all", changeFeed: true }, + async health(s) { + const v = await call(s, "version"); + const groups = listOf(await call(s, "listGorooheHesabha")); + return { version: v.version, message: v.message, customerGroups: groups.length }; + }, + async listCustomerGroups(s) { + return listOf(await call(s, "listGorooheHesabha")).map((g) => ({ + id: String(g.id), + name: (0, accounting_provider_1.str)(g.name) ?? String(g.id) + })); + }, + async listCustomers(s, cursor) { + const from = Number(cursor ?? 0) || 0; + const page = listOf(await call(s, "Get100Account", { id: from })); + if (page.length === 0) + return { items: [], next: null }; + const codes = page.map((r) => Number(r.code)).filter(Number.isFinite); + const lo = Math.min(...codes); + const hi = Math.max(...codes); + const details = /* @__PURE__ */ new Map(); + for (const r of listOf(await call(s, "listhesabha", { az: lo, ta: hi }))) + details.set(String(r.id), r); + const items = page.map((r) => { + const code = String(r.code); + const d = details.get(code) ?? {}; + return { + code, + name: (0, accounting_provider_1.str)(d.nam) ?? joinName(r.name, r.namKhanevadegi), + mobile: (0, accounting_provider_1.normalizeMobile)(d.mobile ?? r.mobile), + phone: (0, accounting_provider_1.str)(d.tell), + nationalCode: (0, accounting_provider_1.str)(d.codeMeli), + address: (0, accounting_provider_1.str)(d.address), + groupId: null, + groupName: (0, accounting_provider_1.str)(d.gorooh) + }; + }); + const next = page.length < 100 ? null : String(hi + 1); + return { items, next }; + }, + async findCustomersByMobile(s, mobile) { + const target = (0, accounting_provider_1.normalizeMobile)(mobile); + if (!target) + return []; + let rows; + try { + rows = listOf(await call(s, "getinfoByPhone", { number: target })); + } catch (err) { + if (err instanceof accounting_provider_1.AccountingProviderError && err.notFound) + return []; + throw err; + } + return rows.filter((r) => r.code !== void 0 && (0, accounting_provider_1.normalizeMobile)(r.mobile) === target).map((r) => ({ + code: String(r.code), + name: joinName(r.nam, r.namKhanevadegi), + mobile: target, + phone: (0, accounting_provider_1.str)(r.tel), + nationalCode: null, + address: (0, accounting_provider_1.str)(r.address), + groupId: null, + groupName: null + })); + }, + async createCustomer(s, p) { + const json = await call(s, "addAccount", { + firstName: p.firstName || p.fullName, + lastName: p.lastName || "-", + fkNoe: p.group.id, + mobile: p.mobile, + telephone: p.phone, + address: p.address, + codeMelli: p.nationalCode + }); + const id = json.id ?? dataOf(json).id; + if (id === void 0 || id === null) + throw new accounting_provider_1.AccountingProviderError("\u0632\u0631\u06CC\u0646: \u06A9\u062F \u062D\u0633\u0627\u0628 \u062C\u062F\u06CC\u062F \u0628\u0631\u0646\u06AF\u0634\u062A", false, json); + return { code: String(id), response: json }; + }, + async updateCustomer(s, code, p) { + const json = await call(s, "edithesab", { + id: code, + name: p.firstName || p.fullName, + family: p.lastName, + mobile: p.mobile, + tel: p.phone, + address: p.address, + codeMeli: p.nationalCode, + // Without nameG Zarrin moves the account into its customers group, so the + // current group is always sent back. + nameG: p.group.name + }); + return { response: json }; + }, + async getBalances(s, codes) { + if (codes.length === 0) + return []; + const wanted = new Set(codes); + const rows = codes.length === 1 ? listOf(await call(s, "listMandeHesabha", { id: codes[0], isRial: 0 })) : listOf(await call(s, "listMandeHesabha", { isRial: 0 })); + return rows.filter((r) => wanted.has(String(r.id))).map((r) => ({ + code: String(r.id), + goldGrams: signed(s, (0, accounting_provider_1.dec)(r.geram) ?? accounting_provider_1.ZERO), + rial: signed(s, (0, accounting_provider_1.dec)(r.pool) ?? accounting_provider_1.ZERO) + })); + }, + async getChanges(s, cursor) { + const rows = listOf(await call(s, "parLastTenRadif", { limit: CHANGE_WINDOW })); + let maxId = 0; + for (const r of rows) + maxId = Math.max(maxId, Number(r.idRadif) || 0); + if (cursor === null) + return { cursor: String(maxId), accountCodes: [], itemNames: [], overflow: false }; + const seen = Number(cursor) || 0; + const fresh = rows.filter((r) => (Number(r.idRadif) || 0) > seen); + const accounts = /* @__PURE__ */ new Set(); + for (const r of fresh) { + const code = (0, accounting_provider_1.str)(r.idHesab); + if (code) + accounts.add(code); + } + return { + cursor: String(Math.max(maxId, seen)), + accountCodes: [...accounts], + itemNames: [], + overflow: rows.length >= CHANGE_WINDOW && fresh.length === rows.length + }; + }, + async getStatement(s, q) { + const rows = []; + for (let page = 1; page <= MAX_STATEMENT_PAGES; page += 1) { + const batch = listOf(await call(s, "parvande", { + id: q.code, + dateAz: (0, jalali_1.jalaliToIsoDate)(q.from), + dateTa: (0, jalali_1.jalaliToIsoDate)(q.to), + pageNum: page, + detailCount: STATEMENT_PAGE + })); + rows.push(...batch); + if (batch.length < STATEMENT_PAGE) + break; + } + let gold = accounting_provider_1.ZERO; + let rial = accounting_provider_1.ZERO; + return rows.map((r) => { + const goldIn = (0, accounting_provider_1.dec)(r.vaznTarazooDaryaft) ?? accounting_provider_1.ZERO; + const goldOut = (0, accounting_provider_1.dec)(r.vaznTarazooPardakht) ?? accounting_provider_1.ZERO; + const rialIn = (0, accounting_provider_1.dec)(r.poolDaryaft) ?? accounting_provider_1.ZERO; + const rialOut = (0, accounting_provider_1.dec)(r.poolPardakht) ?? accounting_provider_1.ZERO; + gold = gold.add(goldOut).sub(goldIn); + rial = rial.add(rialOut).sub(rialIn); + const factor = (0, accounting_provider_1.str)(r.idFactor); + return { + key: String(r.idRadif ?? ""), + documentRef: factor && factor !== "0" ? factor : "", + accountCode: String(r.idHesab ?? q.code), + documentNo: factor && factor !== "0" ? factor : "", + date: fullJalali(r.tarikh), + time: null, + title: (0, accounting_provider_1.str)(r.noeRadif) ?? (0, accounting_provider_1.str)(r.noeFactor) ?? (0, accounting_provider_1.str)(r.sharh) ?? "", + description: (0, accounting_provider_1.str)(r.sharh), + itemName: (0, accounting_provider_1.str)(r.namFelez), + weight: (0, accounting_provider_1.dec)(r.vaznDaryaft)?.gt(0) ? (0, accounting_provider_1.dec)(r.vaznDaryaft) : (0, accounting_provider_1.dec)(r.vaznPardakht), + karat: (0, accounting_provider_1.dec)(r.ayar)?.toNumber() || null, + count: null, + unitPrice: null, + wagePercent: null, + goldIn, + goldOut, + rialIn, + rialOut, + goldBalance: gold, + rialBalance: rial, + metal: null, + temporary: false + }; + }); + }, + async listKarSakhteGroups(s) { + return listOf(await call(s, "goroohSakhte")).map((g) => ({ id: String(g.id), name: (0, accounting_provider_1.str)(g.name) ?? String(g.id) })); + }, + async listKarSakhteTypes(s) { + const types = /* @__PURE__ */ new Map(); + for (const r of listOf(await call(s, "listKarSakhte"))) { + if (r.fkNoe !== void 0) + types.set(String(r.fkNoe), (0, accounting_provider_1.str)(r.NoeName) ?? String(r.fkNoe)); + } + return [...types].map(([id, name]) => ({ id, name })); + }, + async listKarSakhte(s) { + return listOf(await call(s, "listKarSakhte")).filter((r) => r.id !== void 0 && (0, accounting_provider_1.str)(r.namFelezsakhthe)).map((r) => ({ + code: String(r.id), + name: (0, accounting_provider_1.str)(r.namFelezsakhthe), + // listKarSakhte carries the item's type (گرمی/تعدادی…) but not its + // group (النگو/انگشتر…); category stays the app's call (D27). + groupId: null, + groupName: null, + typeId: (0, accounting_provider_1.str)(r.fkNoe), + typeName: (0, accounting_provider_1.str)(r.NoeName), + saleWagePercent: (0, accounting_provider_1.dec)(r.darsadForoosh), + stockWeight: (0, accounting_provider_1.dec)(r.vazn), + stockCount: (0, accounting_provider_1.dec)(r.tedad) + })); + }, + async getKarSakhteStock(s, item) { + const d = dataOf(await call(s, "mojoodiKala", { id: item.code, dateTa: (0, jalali_1.toIsoDateTehran)(/* @__PURE__ */ new Date()) })); + const qty = (0, accounting_provider_1.dec)(d.mojoodi); + const byWeight = /گرم/.test(String(d.noeName ?? "\u06AF\u0631\u0645\u06CC")); + return { weight: byWeight ? qty : null, count: byWeight ? null : qty }; + }, + async getKarSakhteMovement(s, from, to) { + return listOf(await call(s, "infogardeshsakhte", { az: (0, jalali_1.jalaliToIsoDate)(from), ta: (0, jalali_1.jalaliToIsoDate)(to) })).map((r) => ({ + itemCode: (0, accounting_provider_1.str)(r.code_kar), + itemName: (0, accounting_provider_1.str)(r.nam_kar) ?? "\u2014", + date: (0, accounting_provider_1.str)(r.tarikh_akharin_gardesh) ?? "", + description: (0, accounting_provider_1.str)(r.sharh_akharin_gardesh), + weight: (0, accounting_provider_1.dec)(r.vazn_akharin_gardesh), + amount: (0, accounting_provider_1.dec)(r.mablagh_akharin_gardesh), + count: null + })); + }, + async createKarSakhte(s, item) { + const json = await call(s, "addFelezsakhteModel", { + nameKar: item.name, + noeKar: item.typeId, + gorooheKar: item.groupId + }); + const id = json.idKar ?? dataOf(json).idKar; + if (id === void 0 || id === null) + throw new accounting_provider_1.AccountingProviderError("\u0632\u0631\u06CC\u0646: \u06A9\u062F \u06A9\u0627\u0631\u0633\u0627\u062E\u062A\u0647\u200C\u06CC \u062C\u062F\u06CC\u062F \u0628\u0631\u0646\u06AF\u0634\u062A", false, json); + return { code: String(id), response: json }; + }, + async postOrderDocument(s, doc, progress, onProgress) { + let factorId = progress.factorId; + let done = progress.doneLines ?? 0; + let last = null; + for (let i = done; i < doc.lines.length; i += 1) { + const line = doc.lines[i]; + const isLast = i === doc.lines.length - 1; + last = await call(s, "foroushSakhte", { + // The first call opens the invoice for the account; the rest append. + ...factorId ? { idFactor: factorId } : { idHesab: doc.customerCode }, + idSakhte: line.itemCode, + // Bonak mode: mablagh is the rial charge, darsad the per-gram making charge. + mablagh: line.flatRial.toFixed(0), + sharh: line.description, + vazn: line.weightGrams.toFixed(3), + vaznSang: 0, + mablaghSang: 0, + pd: -1, + // پرداخت: goods leave to the customer + darsad: line.wagePercent.toString(), + // The invoice has to stay open while lines are still to come; the last + // line closes it unless the document is to stay temporary (D27: it is). + movaghat: doc.temporary || !isLast ? 1 : 0, + bonak: 1 + }); + const id = dataOf(last).idFactor ?? last.idFactor; + if (!factorId) { + if (id === void 0 || id === null) + throw new accounting_provider_1.AccountingProviderError("\u0632\u0631\u06CC\u0646: \u0634\u0645\u0627\u0631\u0647 \u0641\u0627\u06A9\u062A\u0648\u0631 \u0628\u0631\u0646\u06AF\u0634\u062A", true, last); + factorId = String(id); + } + done = i + 1; + await onProgress({ factorId, doneLines: done }); + } + return { ref: String(factorId ?? ""), progress: { factorId, doneLines: done }, response: last }; + }, + async documentExists() { + return false; + }, + async deleteDocument(s, doc) { + if (!doc.ref) + throw new accounting_provider_1.AccountingProviderError("\u0632\u0631\u06CC\u0646: \u0634\u0645\u0627\u0631\u0647 \u0641\u0627\u06A9\u062A\u0648\u0631 \u0633\u0646\u062F \u0645\u0639\u0644\u0648\u0645 \u0646\u06CC\u0633\u062A"); + const today = /* @__PURE__ */ new Date(); + const yearAgo = new Date(today.getTime() - 366 * 24 * 3600 * 1e3); + const rows = listOf(await call(s, "parvande", { + id: doc.customerCode, + dateAz: (0, jalali_1.toIsoDateTehran)(yearAgo), + dateTa: (0, jalali_1.toIsoDateTehran)(today), + pageNum: 1, + detailCount: STATEMENT_PAGE + })); + const row = rows.find((r) => String(r.idFactor) === doc.ref && (0, accounting_provider_1.str)(r.idRadif) && String(r.idRadif) !== "0"); + if (!row) + return { response: { alreadyDeleted: true } }; + const json = await call(s, "hazfRadifSanad", { + pkRadifSanad: String(row.idRadif), + kol: 1, + commentUser: "\u0644\u063A\u0648 \u0633\u0641\u0627\u0631\u0634 \u062F\u0631 \u0627\u067E" + }); + return { response: json }; + } }; + exports2.__zarrinInternals = { listOf, fullJalali }; } }); -// ../../node_modules/.pnpm/@nestjs+jwt@12.0.1_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_zbpccjiygvsshg6zwdywiadlwy/node_modules/@nestjs/jwt/dist/interfaces/jwt-module-options.interface.js -var JwtSecretRequestType; -var init_jwt_module_options_interface = __esm({ - "../../node_modules/.pnpm/@nestjs+jwt@12.0.1_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_zbpccjiygvsshg6zwdywiadlwy/node_modules/@nestjs/jwt/dist/interfaces/jwt-module-options.interface.js"() { - (function(JwtSecretRequestType2) { - JwtSecretRequestType2[JwtSecretRequestType2["SIGN"] = 0] = "SIGN"; - JwtSecretRequestType2[JwtSecretRequestType2["VERIFY"] = 1] = "VERIFY"; - })(JwtSecretRequestType || (JwtSecretRequestType = {})); - } -}); - -// ../../node_modules/.pnpm/@nestjs+jwt@12.0.1_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_zbpccjiygvsshg6zwdywiadlwy/node_modules/@nestjs/jwt/dist/interfaces/index.js -var init_interfaces = __esm({ - "../../node_modules/.pnpm/@nestjs+jwt@12.0.1_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_zbpccjiygvsshg6zwdywiadlwy/node_modules/@nestjs/jwt/dist/interfaces/index.js"() { - init_jwt_module_options_interface(); - } -}); - -// ../../node_modules/.pnpm/@nestjs+jwt@12.0.1_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_zbpccjiygvsshg6zwdywiadlwy/node_modules/@nestjs/jwt/dist/jwt.errors.js -var WrongSecretProviderError; -var init_jwt_errors = __esm({ - "../../node_modules/.pnpm/@nestjs+jwt@12.0.1_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_zbpccjiygvsshg6zwdywiadlwy/node_modules/@nestjs/jwt/dist/jwt.errors.js"() { - WrongSecretProviderError = class extends Error { +// dist/modules/accounting-sync/providers/index.js +var require_providers = __commonJS({ + "dist/modules/accounting-sync/providers/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ACCOUNTING_PROVIDERS = void 0; + exports2.isProviderName = isProviderName; + var tahesab_provider_1 = require_tahesab_provider(); + var zarrin_provider_1 = require_zarrin_provider(); + exports2.ACCOUNTING_PROVIDERS = { + tahesab: tahesab_provider_1.tahesabProvider, + zarrin: zarrin_provider_1.zarrinProvider + }; + function isProviderName(v) { + return typeof v === "string" && Object.prototype.hasOwnProperty.call(exports2.ACCOUNTING_PROVIDERS, v); + } + __exportStar2(require_accounting_provider(), exports2); } }); -// ../../node_modules/.pnpm/@nestjs+jwt@12.0.1_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_zbpccjiygvsshg6zwdywiadlwy/node_modules/@nestjs/jwt/dist/jwt.constants.js -var JWT_MODULE_OPTIONS; -var init_jwt_constants = __esm({ - "../../node_modules/.pnpm/@nestjs+jwt@12.0.1_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_zbpccjiygvsshg6zwdywiadlwy/node_modules/@nestjs/jwt/dist/jwt.constants.js"() { - JWT_MODULE_OPTIONS = "JWT_MODULE_OPTIONS"; +// dist/common/env.js +var require_env = __commonJS({ + "dist/common/env.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.envOr = envOr; + exports2.envOrNull = envOrNull; + exports2.envList = envList; + exports2.pickExactUri = pickExactUri; + function envOr(name, fallback) { + const raw = process.env[name]; + const trimmed = typeof raw === "string" ? raw.trim() : ""; + return trimmed === "" ? fallback : trimmed; + } + function envOrNull(name) { + const raw = process.env[name]; + const trimmed = typeof raw === "string" ? raw.trim() : ""; + return trimmed === "" ? null : trimmed; + } + function envList(name) { + const raw = envOrNull(name); + if (!raw) + return []; + return raw.split(",").map((item) => item.trim()).filter(Boolean); + } + function pickExactUri(requested, allowed) { + const unique = [...new Set(allowed.filter((item) => Boolean(item)))]; + if (requested) + return unique.includes(requested) ? requested : null; + return unique[0] ?? null; + } } }); -// ../../node_modules/.pnpm/@nestjs+jwt@12.0.1_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_zbpccjiygvsshg6zwdywiadlwy/node_modules/@nestjs/jwt/dist/jwt.providers.js -function createJwtProvider(options) { - return [{ provide: JWT_MODULE_OPTIONS, useValue: options || {} }]; -} -var init_jwt_providers = __esm({ - "../../node_modules/.pnpm/@nestjs+jwt@12.0.1_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_zbpccjiygvsshg6zwdywiadlwy/node_modules/@nestjs/jwt/dist/jwt.providers.js"() { - init_jwt_constants(); +// dist/modules/accounting-sync/secret-box.js +var require_secret_box = __commonJS({ + "dist/modules/accounting-sync/secret-box.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.secretKeySource = secretKeySource; + exports2.sealSecret = sealSecret; + exports2.openSecret = openSecret; + var crypto_1 = require("crypto"); + var env_12 = require_env(); + var PREFIX = "enc:v1:"; + function secretKeySource() { + if ((0, env_12.envOrNull)("ACCOUNTING_SECRET_KEY")) + return "ACCOUNTING_SECRET_KEY"; + if ((0, env_12.envOrNull)("JWT_SECRET")) + return "JWT_SECRET"; + return null; + } + function key() { + const material = (0, env_12.envOrNull)("ACCOUNTING_SECRET_KEY") ?? (0, env_12.envOrNull)("JWT_SECRET"); + if (!material) { + throw new Error("ACCOUNTING_SECRET_KEY \u062A\u0646\u0638\u06CC\u0645 \u0646\u0634\u062F\u0647 \u0627\u0633\u062A\u061B \u0630\u062E\u06CC\u0631\u0647\u200C\u06CC \u062A\u0648\u06A9\u0646 \u062D\u0633\u0627\u0628\u062F\u0627\u0631\u06CC \u0645\u0645\u06A9\u0646 \u0646\u06CC\u0633\u062A."); + } + return (0, crypto_1.createHash)("sha256").update(`goldbank-accounting:${material}`).digest(); + } + function sealSecret(plain) { + const iv = (0, crypto_1.randomBytes)(12); + const cipher = (0, crypto_1.createCipheriv)("aes-256-gcm", key(), iv); + const body = Buffer.concat([cipher.update(plain, "utf8"), cipher.final()]); + const tag = cipher.getAuthTag(); + return PREFIX + Buffer.concat([iv, tag, body]).toString("base64"); + } + function openSecret(sealed) { + if (!sealed || !sealed.startsWith(PREFIX)) + return null; + try { + const raw = Buffer.from(sealed.slice(PREFIX.length), "base64"); + const iv = raw.subarray(0, 12); + const tag = raw.subarray(12, 28); + const body = raw.subarray(28); + const decipher = (0, crypto_1.createDecipheriv)("aes-256-gcm", key(), iv); + decipher.setAuthTag(tag); + return Buffer.concat([decipher.update(body), decipher.final()]).toString("utf8"); + } catch { + return null; + } + } } }); -// ../../node_modules/.pnpm/@nestjs+jwt@12.0.1_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_zbpccjiygvsshg6zwdywiadlwy/node_modules/@nestjs/jwt/dist/jwt.service.js -var import_common, import_jsonwebtoken, __decorate2, __metadata2, __param2, JwtService; -var init_jwt_service = __esm({ - "../../node_modules/.pnpm/@nestjs+jwt@12.0.1_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_zbpccjiygvsshg6zwdywiadlwy/node_modules/@nestjs/jwt/dist/jwt.service.js"() { - import_common = __toESM(require_common(), 1); - import_jsonwebtoken = __toESM(require_jsonwebtoken(), 1); - init_interfaces(); - init_jwt_constants(); - init_jwt_errors(); - __decorate2 = function(decorators, target, key, desc) { +// dist/modules/accounting-sync/accounting-config.service.js +var require_accounting_config_service = __commonJS({ + "dist/modules/accounting-sync/accounting-config.service.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; - __metadata2 = function(k, v) { + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; - __param2 = function(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountingConfigService = void 0; + var common_12 = require_common(); + var prisma_service_1 = require_prisma_service(); + var accounting_config_1 = require_accounting_config(); + var providers_1 = require_providers(); + var secret_box_1 = require_secret_box(); + var accounting_http_1 = require_accounting_http(); + function describeCertificate(pem) { + const [c] = (0, accounting_http_1.parsePemCertificates)(pem); + if (!c) + return null; + return { + subject: c.subject, + subjectAltName: c.subjectAltName ?? null, + validTo: c.validTo, + expired: new Date(c.validTo).getTime() < Date.now(), + fingerprint256: c.fingerprint256 }; - }; - JwtService = class JwtService2 { - constructor(options = {}) { - this.options = options; - this.logger = new import_common.Logger("JwtService"); + } + var CACHE_MS = 5e3; + var AccountingConfigService = class AccountingConfigService { + prisma; + logger = new common_12.Logger("Accounting"); + cache = null; + constructor(prisma) { + this.prisma = prisma; } - sign(payload, options) { - const signOptions = this.mergeJwtOptions({ ...options }, "signOptions"); - const secret = this.getSecretKey(payload, options, "privateKey", JwtSecretRequestType.SIGN); - if (secret instanceof Promise) { - secret.catch(() => { - }); - this.logger.warn('For async version of "secretOrKeyProvider", please use "signAsync".'); - throw new WrongSecretProviderError(); + onModuleInit() { + if ((0, secret_box_1.secretKeySource)() !== "ACCOUNTING_SECRET_KEY") { + this.logger.warn("\u26A0\uFE0F ACCOUNTING_SECRET_KEY \u062A\u0646\u0638\u06CC\u0645 \u0646\u0634\u062F\u0647 \u0627\u0633\u062A. \u062A\u0648\u06A9\u0646 \u0646\u0631\u0645\u200C\u0627\u0641\u0632\u0627\u0631 \u062D\u0633\u0627\u0628\u062F\u0627\u0631\u06CC \u0628\u0627 \u06A9\u0644\u06CC\u062F\u06CC \u0645\u0634\u062A\u0642 \u0627\u0632 JWT_SECRET \u0631\u0645\u0632 \u0645\u06CC\u200C\u0634\u0648\u062F\u061B \u0628\u0627 \u0639\u0648\u0636\u200C\u0634\u062F\u0646 JWT_SECRET \u062A\u0648\u06A9\u0646 \u0630\u062E\u06CC\u0631\u0647\u200C\u0634\u062F\u0647 \u0642\u0627\u0628\u0644\u200C\u062E\u0648\u0627\u0646\u062F\u0646 \u0646\u0645\u06CC\u200C\u0645\u0627\u0646\u062F \u0648 \u0628\u0627\u06CC\u062F \u062F\u0648\u0628\u0627\u0631\u0647 \u0648\u0627\u0631\u062F \u0634\u0648\u062F. (D27)"); } - const allowedSignOptKeys = ["secret", "privateKey"]; - const signOptKeys = Object.keys(signOptions); - if (typeof payload === "string" && signOptKeys.some((k) => !allowedSignOptKeys.includes(k))) { - throw new Error("Payload as string is not allowed with the following sign options: " + signOptKeys.join(", ")); - } - return import_jsonwebtoken.default.sign(payload, secret, signOptions); } - signAsync(payload, options) { - const signOptions = this.mergeJwtOptions({ ...options }, "signOptions"); - const secret = this.getSecretKey(payload, options, "privateKey", JwtSecretRequestType.SIGN); - const allowedSignOptKeys = ["secret", "privateKey"]; - const signOptKeys = Object.keys(signOptions); - if (typeof payload === "string" && signOptKeys.some((k) => !allowedSignOptKeys.includes(k))) { - throw new Error("Payload as string is not allowed with the following sign options: " + signOptKeys.join(", ")); - } - return new Promise((resolve, reject) => Promise.resolve().then(() => secret).then((scrt) => { - import_jsonwebtoken.default.sign(payload, scrt, signOptions, (err, encoded) => err ? reject(err) : resolve(encoded)); - })); + async get() { + if (this.cache && Date.now() - this.cache.at < CACHE_MS) + return this.cache.config; + const row = await this.prisma.setting.findUnique({ where: { key: accounting_config_1.ACCOUNTING_CONFIG_KEY } }); + const config = (0, accounting_config_1.withDefaults)(row?.value); + this.cache = { at: Date.now(), config }; + return config; } - verify(token, options) { - const verifyOptions = this.mergeJwtOptions({ ...options }, "verifyOptions"); - const secret = this.getSecretKey(token, options, "publicKey", JwtSecretRequestType.VERIFY); - if (secret instanceof Promise) { - secret.catch(() => { - }); - this.logger.warn('For async version of "secretOrKeyProvider", please use "verifyAsync".'); - throw new WrongSecretProviderError(); - } - return import_jsonwebtoken.default.verify(token, secret, verifyOptions); - } - verifyAsync(token, options) { - const verifyOptions = this.mergeJwtOptions({ ...options }, "verifyOptions"); - const secret = this.getSecretKey(token, options, "publicKey", JwtSecretRequestType.VERIFY); - return new Promise((resolve, reject) => Promise.resolve().then(() => secret).then((scrt) => { - import_jsonwebtoken.default.verify(token, scrt, verifyOptions, (err, decoded) => err ? reject(err) : resolve(decoded)); - }).catch(reject)); - } - decode(token, options) { - return import_jsonwebtoken.default.decode(token, options); - } - mergeJwtOptions(options, key) { - delete options.secret; - if (key === "signOptions") { - delete options.privateKey; - } else { - delete options.publicKey; - } - return options ? { ...this.options[key] || {}, ...options } : this.options[key]; - } - overrideSecretFromOptions(secret) { - if (this.options.secretOrPrivateKey) { - this.logger.warn(`"secretOrPrivateKey" has been deprecated, please use the new explicit "secret" or use "secretOrKeyProvider" or "privateKey"/"publicKey" exclusively.`); - secret = this.options.secretOrPrivateKey; - } - return secret; - } - getSecretKey(token, options, key, secretRequestType) { - const secret = this.options.secretOrKeyProvider ? this.options.secretOrKeyProvider(secretRequestType, token, options) : options?.secret || this.options.secret || (key === "privateKey" ? options?.privateKey || this.options.privateKey : options?.publicKey || this.options.publicKey) || this.options[key]; - return secret instanceof Promise ? secret.then((sec) => this.overrideSecretFromOptions(sec)) : this.overrideSecretFromOptions(secret); - } - }; - JwtService = __decorate2([ - (0, import_common.Injectable)(), - __param2(0, (0, import_common.Optional)()), - __param2(0, (0, import_common.Inject)(JWT_MODULE_OPTIONS)), - __metadata2("design:paramtypes", [Object]) - ], JwtService); - } -}); - -// ../../node_modules/.pnpm/@nestjs+jwt@12.0.1_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_zbpccjiygvsshg6zwdywiadlwy/node_modules/@nestjs/jwt/dist/jwt.module.js -var import_common2, __decorate3, JwtModule_1, JwtModule; -var init_jwt_module = __esm({ - "../../node_modules/.pnpm/@nestjs+jwt@12.0.1_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_zbpccjiygvsshg6zwdywiadlwy/node_modules/@nestjs/jwt/dist/jwt.module.js"() { - import_common2 = __toESM(require_common(), 1); - init_jwt_constants(); - init_jwt_providers(); - init_jwt_service(); - __decorate3 = function(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - JwtModule = JwtModule_1 = class JwtModule2 { - static register(options) { - return { - module: JwtModule_1, - global: options.global, - providers: createJwtProvider(options) - }; - } - static registerAsync(options) { - return { - module: JwtModule_1, - global: options.global, - imports: options.imports || [], - providers: [ - ...this.createAsyncProviders(options), - ...options.extraProviders ?? [] - ] - }; - } - static createAsyncProviders(options) { - if (options.useExisting || options.useFactory) { - return [this.createAsyncOptionsProvider(options)]; - } - return [ - this.createAsyncOptionsProvider(options), - { - provide: options.useClass, - useClass: options.useClass - } - ]; - } - static createAsyncOptionsProvider(options) { - if (options.useFactory) { + /** The configuration as the admin screen sees it: tokens reduced to flags. */ + async getPublic() { + const c = await this.get(); + const publicConn = (conn) => { + const { tokenSealed, ...rest } = conn; return { - provide: JWT_MODULE_OPTIONS, - useFactory: options.useFactory, - inject: options.inject || [] + ...rest, + tokenSet: !!tokenSealed, + tokenReadable: !!tokenSealed && (0, secret_box_1.openSecret)(tokenSealed) !== null, + // What the pinned certificate is, so the screen can show it instead of PEM. + caInfo: describeCertificate(rest.caCert) }; - } + }; return { - provide: JWT_MODULE_OPTIONS, - useFactory: async (optionsFactory) => await optionsFactory.createJwtOptions(), - inject: [options.useExisting || options.useClass] + ...c, + tahesab: publicConn(c.tahesab), + zarrin: publicConn(c.zarrin), + secretKeySource: (0, secret_box_1.secretKeySource)(), + providers: Object.values(providers_1.ACCOUNTING_PROVIDERS).map((p) => ({ + name: p.name, + label: p.label, + capabilities: p.capabilities + })) }; } + /** + * Applies an admin's edit. Anything not sent is kept. A token is replaced + * only by a non-empty string and removed only by an explicit null — so the + * form can be saved without ever having seen the token. + */ + async save(input) { + const current = await this.get(); + const next = JSON.parse(JSON.stringify(current)); + if (input.provider !== void 0) { + if (input.provider !== "none" && !(0, providers_1.isProviderName)(input.provider)) { + throw new common_12.BadRequestException("\u0646\u0631\u0645\u200C\u0627\u0641\u0632\u0627\u0631 \u062D\u0633\u0627\u0628\u062F\u0627\u0631\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u0627\u0633\u062A"); + } + next.provider = input.provider; + } + const conn = (key) => { + const src = input[key]; + if (!src || typeof src !== "object") + return; + const label = providers_1.ACCOUNTING_PROVIDERS[key].label; + const dst = next[key]; + if (src.baseUrl !== void 0) + dst.baseUrl = (0, accounting_config_1.cleanUrl)(src.baseUrl, `\u0622\u062F\u0631\u0633 ${label}`); + if (src.caCert !== void 0) + dst.caCert = (0, accounting_config_1.cleanCa)(src.caCert); + if (src.timeoutMs !== void 0) + dst.timeoutMs = (0, accounting_config_1.cleanInt)(src.timeoutMs, "\u0645\u0647\u0644\u062A \u067E\u0627\u0633\u062E (\u0645\u06CC\u0644\u06CC\u200C\u062B\u0627\u0646\u06CC\u0647)", 3e3, 12e4, dst.timeoutMs); + if (src.token === null) + dst.tokenSealed = null; + else if (typeof src.token === "string" && src.token.trim()) { + try { + dst.tokenSealed = (0, secret_box_1.sealSecret)(src.token.trim()); + } catch (err) { + throw new common_12.BadRequestException(err.message); + } + } + }; + conn("tahesab"); + conn("zarrin"); + if (input.tahesab?.dbName !== void 0) { + const db = String(input.tahesab.dbName ?? "").trim(); + if (!/^[A-Za-z0-9_]{1,64}$/.test(db)) + throw new common_12.BadRequestException("\u0646\u0627\u0645 \u062F\u06CC\u062A\u0627\u0628\u06CC\u0633 \u062A\u0647\u200C\u062D\u0633\u0627\u0628 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u0627\u0633\u062A"); + next.tahesab.dbName = db; + } + if (input.zarrin?.balanceOwesWhen !== void 0) { + if (input.zarrin.balanceOwesWhen !== "negative" && input.zarrin.balanceOwesWhen !== "positive") { + throw new common_12.BadRequestException("\u0639\u0644\u0627\u0645\u062A \u0645\u0627\u0646\u062F\u0647\u200C\u06CC \u0632\u0631\u06CC\u0646 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u0627\u0633\u062A"); + } + next.zarrin.balanceOwesWhen = input.zarrin.balanceOwesWhen; + } + if (input.features && typeof input.features === "object") { + for (const k of Object.keys(next.features)) { + next.features[k] = (0, accounting_config_1.cleanBool)(input.features[k], next.features[k]); + } + } + if (input.intervals && typeof input.intervals === "object") { + const i = input.intervals; + next.intervals.customersMinutes = (0, accounting_config_1.cleanInt)(i.customersMinutes, "\u0628\u0627\u0632\u0647\u200C\u06CC \u0633\u06CC\u0646\u06A9 \u0645\u0634\u062A\u0631\u06CC", 5, 1440, next.intervals.customersMinutes); + next.intervals.balancesMinutes = (0, accounting_config_1.cleanInt)(i.balancesMinutes, "\u0628\u0627\u0632\u0647\u200C\u06CC \u0633\u06CC\u0646\u06A9 \u0645\u0627\u0646\u062F\u0647", 1, 1440, next.intervals.balancesMinutes); + next.intervals.productsMinutes = (0, accounting_config_1.cleanInt)(i.productsMinutes, "\u0628\u0627\u0632\u0647\u200C\u06CC \u0633\u06CC\u0646\u06A9 \u06A9\u0627\u0631\u0633\u0627\u062E\u062A\u0647", 5, 1440, next.intervals.productsMinutes); + } + if (input.mapping && typeof input.mapping === "object") { + const m = input.mapping; + if (m.importCustomerGroups !== void 0) + next.mapping.importCustomerGroups = (0, accounting_config_1.cleanGroups)(m.importCustomerGroups); + if (m.newCustomerGroup !== void 0) + next.mapping.newCustomerGroup = (0, accounting_config_1.cleanGroup)(m.newCustomerGroup); + if (m.newKarSakhteGroup !== void 0) + next.mapping.newKarSakhteGroup = (0, accounting_config_1.cleanGroup)(m.newKarSakhteGroup); + if (m.newKarSakhteType !== void 0) + next.mapping.newKarSakhteType = (0, accounting_config_1.cleanGroup)(m.newKarSakhteType); + if (m.categoryGroups !== void 0) { + next.mapping.categoryGroups = (Array.isArray(m.categoryGroups) ? m.categoryGroups : []).map((x) => ({ categoryId: String(x?.categoryId ?? "").trim(), group: (0, accounting_config_1.cleanGroup)(x?.group) })).filter((x) => x.categoryId && x.group); + } + if (m.karat !== void 0) + next.mapping.karat = (0, accounting_config_1.cleanInt)(m.karat, "\u0639\u06CC\u0627\u0631 \u067E\u0627\u06CC\u0647", 1, 1e3, next.mapping.karat); + } + if (input.documents && typeof input.documents === "object" && input.documents.triggerStatus !== void 0) { + if (!(0, accounting_config_1.documentStatusRank)(String(input.documents.triggerStatus))) { + throw new common_12.BadRequestException("\u0648\u0636\u0639\u06CC\u062A \u062B\u0628\u062A \u0633\u0646\u062F \u0633\u0641\u0627\u0631\u0634 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u0627\u0633\u062A"); + } + next.documents.triggerStatus = input.documents.triggerStatus; + } + if (input.report && typeof input.report === "object") { + next.report.windowDays = (0, accounting_config_1.cleanInt)(input.report.windowDays, "\u0628\u0627\u0632\u0647\u200C\u06CC \u06AF\u0632\u0627\u0631\u0634 (\u0631\u0648\u0632)", 7, 3650, next.report.windowDays); + } + if (next.provider !== "none" && (!next[next.provider].baseUrl || !next[next.provider].tokenSealed)) { + const label = providers_1.ACCOUNTING_PROVIDERS[next.provider].label; + throw new common_12.BadRequestException(`\xAB${label}\xBB \u0627\u0646\u062A\u062E\u0627\u0628 \u0634\u062F\u0647 \u0648\u0644\u06CC \u0622\u062F\u0631\u0633 \u06CC\u0627 \u062A\u0648\u06A9\u0646 \u0622\u0646 \u0648\u0627\u0631\u062F \u0646\u0634\u062F\u0647 \u0627\u0633\u062A`); + } + await this.prisma.setting.upsert({ + where: { key: accounting_config_1.ACCOUNTING_CONFIG_KEY }, + update: { value: next }, + create: { key: accounting_config_1.ACCOUNTING_CONFIG_KEY, value: next } + }); + this.cache = null; + return { providerChanged: current.provider !== next.provider }; + } + /** Decrypted settings for one provider; null when it is not usable. */ + settingsFor(config, name) { + const conn = config[name]; + if (!conn.baseUrl) + return null; + const token = (0, secret_box_1.openSecret)(conn.tokenSealed); + if (!token) + return null; + return { + baseUrl: conn.baseUrl, + token, + caCert: conn.caCert, + timeoutMs: conn.timeoutMs, + dbName: name === "tahesab" ? config.tahesab.dbName : void 0, + balanceOwesWhen: name === "zarrin" ? config.zarrin.balanceOwesWhen : void 0 + }; + } + /** + * Settings as the admin form currently shows them, saved or not, so «تست + * اتصال» checks what is on screen. A blank token means "the saved one". + * Validated like a save; nothing is stored. + */ + draftSettings(config, name, input) { + const src = input && typeof input === "object" ? input : {}; + const label = providers_1.ACCOUNTING_PROVIDERS[name].label; + const saved = config[name]; + const baseUrl = src.baseUrl !== void 0 ? (0, accounting_config_1.cleanUrl)(src.baseUrl, `\u0622\u062F\u0631\u0633 ${label}`) : saved.baseUrl; + const token = typeof src.token === "string" && src.token.trim() ? src.token.trim() : (0, secret_box_1.openSecret)(saved.tokenSealed); + if (!baseUrl || !token) + return null; + let dbName = config.tahesab.dbName; + if (name === "tahesab" && src.dbName !== void 0) { + dbName = String(src.dbName ?? "").trim(); + if (!/^[A-Za-z0-9_]{1,64}$/.test(dbName)) + throw new common_12.BadRequestException("\u0646\u0627\u0645 \u062F\u06CC\u062A\u0627\u0628\u06CC\u0633 \u062A\u0647\u200C\u062D\u0633\u0627\u0628 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u0627\u0633\u062A"); + } + let balanceOwesWhen = config.zarrin.balanceOwesWhen; + if (name === "zarrin" && (src.balanceOwesWhen === "negative" || src.balanceOwesWhen === "positive")) { + balanceOwesWhen = src.balanceOwesWhen; + } + return { + baseUrl, + token, + caCert: src.caCert !== void 0 ? (0, accounting_config_1.cleanCa)(src.caCert) : saved.caCert, + timeoutMs: (0, accounting_config_1.cleanInt)(src.timeoutMs, "\u0645\u0647\u0644\u062A \u067E\u0627\u0633\u062E (\u0645\u06CC\u0644\u06CC\u200C\u062B\u0627\u0646\u06CC\u0647)", 3e3, 12e4, saved.timeoutMs), + dbName: name === "tahesab" ? dbName : void 0, + balanceOwesWhen: name === "zarrin" ? balanceOwesWhen : void 0 + }; + } + /** Why nothing syncs, in words for the admin screen; null when a provider is usable. */ + inactiveReason(config) { + if (config.provider === "none") + return "\u0633\u0648\u06CC\u06CC\u0686 \u0631\u0648\u06CC \xAB\u0628\u062F\u0648\u0646 \u0627\u062A\u0635\u0627\u0644\xBB \u0627\u0633\u062A"; + const label = providers_1.ACCOUNTING_PROVIDERS[config.provider].label; + const conn = config[config.provider]; + if (!conn.baseUrl || !conn.tokenSealed) + return `\xAB${label}\xBB \u0627\u0646\u062A\u062E\u0627\u0628 \u0634\u062F\u0647 \u0648\u0644\u06CC \u0622\u062F\u0631\u0633 \u06CC\u0627 \u062A\u0648\u06A9\u0646 \u0622\u0646 \u0648\u0627\u0631\u062F \u0646\u0634\u062F\u0647 \u0627\u0633\u062A`; + if (!this.settingsFor(config, config.provider)) + return `\u062A\u0648\u06A9\u0646 \u0630\u062E\u06CC\u0631\u0647\u200C\u0634\u062F\u0647\u200C\u06CC \xAB${label}\xBB \u0642\u0627\u0628\u0644\u200C\u062E\u0648\u0627\u0646\u062F\u0646 \u0646\u06CC\u0633\u062A\u061B \u062F\u0648\u0628\u0627\u0631\u0647 \u0648\u0627\u0631\u062F \u06A9\u0646\u06CC\u062F`; + return null; + } + /** The selected, fully configured provider — or null when the switch is off. */ + async active() { + const config = await this.get(); + if (config.provider === "none") + return null; + const settings = this.settingsFor(config, config.provider); + if (!settings) + return null; + return { provider: providers_1.ACCOUNTING_PROVIDERS[config.provider], settings, config }; + } + /** Active provider with this feature switched on, or null. */ + async activeFor(feature) { + const a = await this.active(); + return a && a.config.features[feature] ? a : null; + } + // ── job bookkeeping (shown on the admin screen) ─────────────────────── + async getState() { + const row = await this.prisma.setting.findUnique({ where: { key: accounting_config_1.ACCOUNTING_STATE_KEY } }); + const v = row?.value ?? {}; + return { jobs: v.jobs ?? {} }; + } + async recordJob(job, patch) { + const state = await this.getState(); + state.jobs[job] = { ...state.jobs[job] ?? {}, ...patch }; + await this.prisma.setting.upsert({ + where: { key: accounting_config_1.ACCOUNTING_STATE_KEY }, + update: { value: state }, + create: { key: accounting_config_1.ACCOUNTING_STATE_KEY, value: state } + }); + } }; - JwtModule = JwtModule_1 = __decorate3([ - (0, import_common2.Module)({ - providers: [JwtService], - exports: [JwtService] - }) - ], JwtModule); - } -}); - -// ../../node_modules/.pnpm/@nestjs+jwt@12.0.1_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_zbpccjiygvsshg6zwdywiadlwy/node_modules/@nestjs/jwt/dist/index.js -var dist_exports = {}; -__export(dist_exports, { - JsonWebTokenError: () => JsonWebTokenError, - JwtModule: () => JwtModule, - JwtSecretRequestType: () => JwtSecretRequestType, - JwtService: () => JwtService, - NotBeforeError: () => NotBeforeError, - TokenExpiredError: () => TokenExpiredError, - WrongSecretProviderError: () => WrongSecretProviderError -}); -var import_jsonwebtoken2, TokenExpiredError, NotBeforeError, JsonWebTokenError; -var init_dist = __esm({ - "../../node_modules/.pnpm/@nestjs+jwt@12.0.1_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_zbpccjiygvsshg6zwdywiadlwy/node_modules/@nestjs/jwt/dist/index.js"() { - import_jsonwebtoken2 = __toESM(require_jsonwebtoken(), 1); - init_interfaces(); - init_jwt_errors(); - init_jwt_module(); - init_jwt_service(); - TokenExpiredError = import_jsonwebtoken2.default.TokenExpiredError; - NotBeforeError = import_jsonwebtoken2.default.NotBeforeError; - JsonWebTokenError = import_jsonwebtoken2.default.JsonWebTokenError; + exports2.AccountingConfigService = AccountingConfigService; + exports2.AccountingConfigService = AccountingConfigService = __decorate4([ + (0, common_12.Injectable)(), + __metadata3("design:paramtypes", [prisma_service_1.PrismaService]) + ], AccountingConfigService); } }); @@ -84203,90 +79568,90 @@ var require_umd = __commonJS({ 1869963892 ]; function _encipher(lr, off, P, S) { - var n, l = lr[off], r = lr[off + 1]; - l ^= P[0]; - n = S[l >>> 24]; - n += S[256 | l >> 16 & 255]; - n ^= S[512 | l >> 8 & 255]; - n += S[768 | l & 255]; + var n, l2 = lr[off], r = lr[off + 1]; + l2 ^= P[0]; + n = S[l2 >>> 24]; + n += S[256 | l2 >> 16 & 255]; + n ^= S[512 | l2 >> 8 & 255]; + n += S[768 | l2 & 255]; r ^= n ^ P[1]; n = S[r >>> 24]; n += S[256 | r >> 16 & 255]; n ^= S[512 | r >> 8 & 255]; n += S[768 | r & 255]; - l ^= n ^ P[2]; - n = S[l >>> 24]; - n += S[256 | l >> 16 & 255]; - n ^= S[512 | l >> 8 & 255]; - n += S[768 | l & 255]; + l2 ^= n ^ P[2]; + n = S[l2 >>> 24]; + n += S[256 | l2 >> 16 & 255]; + n ^= S[512 | l2 >> 8 & 255]; + n += S[768 | l2 & 255]; r ^= n ^ P[3]; n = S[r >>> 24]; n += S[256 | r >> 16 & 255]; n ^= S[512 | r >> 8 & 255]; n += S[768 | r & 255]; - l ^= n ^ P[4]; - n = S[l >>> 24]; - n += S[256 | l >> 16 & 255]; - n ^= S[512 | l >> 8 & 255]; - n += S[768 | l & 255]; + l2 ^= n ^ P[4]; + n = S[l2 >>> 24]; + n += S[256 | l2 >> 16 & 255]; + n ^= S[512 | l2 >> 8 & 255]; + n += S[768 | l2 & 255]; r ^= n ^ P[5]; n = S[r >>> 24]; n += S[256 | r >> 16 & 255]; n ^= S[512 | r >> 8 & 255]; n += S[768 | r & 255]; - l ^= n ^ P[6]; - n = S[l >>> 24]; - n += S[256 | l >> 16 & 255]; - n ^= S[512 | l >> 8 & 255]; - n += S[768 | l & 255]; + l2 ^= n ^ P[6]; + n = S[l2 >>> 24]; + n += S[256 | l2 >> 16 & 255]; + n ^= S[512 | l2 >> 8 & 255]; + n += S[768 | l2 & 255]; r ^= n ^ P[7]; n = S[r >>> 24]; n += S[256 | r >> 16 & 255]; n ^= S[512 | r >> 8 & 255]; n += S[768 | r & 255]; - l ^= n ^ P[8]; - n = S[l >>> 24]; - n += S[256 | l >> 16 & 255]; - n ^= S[512 | l >> 8 & 255]; - n += S[768 | l & 255]; + l2 ^= n ^ P[8]; + n = S[l2 >>> 24]; + n += S[256 | l2 >> 16 & 255]; + n ^= S[512 | l2 >> 8 & 255]; + n += S[768 | l2 & 255]; r ^= n ^ P[9]; n = S[r >>> 24]; n += S[256 | r >> 16 & 255]; n ^= S[512 | r >> 8 & 255]; n += S[768 | r & 255]; - l ^= n ^ P[10]; - n = S[l >>> 24]; - n += S[256 | l >> 16 & 255]; - n ^= S[512 | l >> 8 & 255]; - n += S[768 | l & 255]; + l2 ^= n ^ P[10]; + n = S[l2 >>> 24]; + n += S[256 | l2 >> 16 & 255]; + n ^= S[512 | l2 >> 8 & 255]; + n += S[768 | l2 & 255]; r ^= n ^ P[11]; n = S[r >>> 24]; n += S[256 | r >> 16 & 255]; n ^= S[512 | r >> 8 & 255]; n += S[768 | r & 255]; - l ^= n ^ P[12]; - n = S[l >>> 24]; - n += S[256 | l >> 16 & 255]; - n ^= S[512 | l >> 8 & 255]; - n += S[768 | l & 255]; + l2 ^= n ^ P[12]; + n = S[l2 >>> 24]; + n += S[256 | l2 >> 16 & 255]; + n ^= S[512 | l2 >> 8 & 255]; + n += S[768 | l2 & 255]; r ^= n ^ P[13]; n = S[r >>> 24]; n += S[256 | r >> 16 & 255]; n ^= S[512 | r >> 8 & 255]; n += S[768 | r & 255]; - l ^= n ^ P[14]; - n = S[l >>> 24]; - n += S[256 | l >> 16 & 255]; - n ^= S[512 | l >> 8 & 255]; - n += S[768 | l & 255]; + l2 ^= n ^ P[14]; + n = S[l2 >>> 24]; + n += S[256 | l2 >> 16 & 255]; + n ^= S[512 | l2 >> 8 & 255]; + n += S[768 | l2 & 255]; r ^= n ^ P[15]; n = S[r >>> 24]; n += S[256 | r >> 16 & 255]; n ^= S[512 | r >> 8 & 255]; n += S[768 | r & 255]; - l ^= n ^ P[16]; + l2 ^= n ^ P[16]; lr[off] = r ^ P[BLOWFISH_NUM_ROUNDS + 1]; - lr[off + 1] = l; + lr[off + 1] = l2; return lr; } function _streamtoword(data, offp) { @@ -84357,13 +79722,13 @@ var require_umd = __commonJS({ } else { for (i = 0; i < 64; i++) for (j = 0; j < clen >> 1; j++) _encipher(cdata, j << 1, P, S); - var ret = []; + var ret2 = []; for (i = 0; i < clen; i++) - ret.push((cdata[i] >> 24 & 255) >>> 0), ret.push((cdata[i] >> 16 & 255) >>> 0), ret.push((cdata[i] >> 8 & 255) >>> 0), ret.push((cdata[i] & 255) >>> 0); + ret2.push((cdata[i] >> 24 & 255) >>> 0), ret2.push((cdata[i] >> 16 & 255) >>> 0), ret2.push((cdata[i] >> 8 & 255) >>> 0), ret2.push((cdata[i] & 255) >>> 0); if (callback) { - callback(null, ret); + callback(null, ret2); return; - } else return ret; + } else return ret2; } if (callback) nextTick(next); } @@ -84467,9 +79832,9 @@ var require_umd = __commonJS({ } }); -// dist/modules/auth/auth.service.js -var require_auth_service = __commonJS({ - "dist/modules/auth/auth.service.js"(exports2) { +// dist/modules/auth/password-hash.js +var require_password_hash = __commonJS({ + "dist/modules/auth/password-hash.js"(exports2) { "use strict"; var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { if (k2 === void 0) k2 = k; @@ -84489,12 +79854,6 @@ var require_auth_service = __commonJS({ }) : function(o, v) { o["default"] = v; }); - var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { var ownKeys2 = function(o) { ownKeys2 = Object.getOwnPropertyNames || function(o2) { @@ -84514,105 +79873,27 @@ var require_auth_service = __commonJS({ return result; }; })(); - var __metadata3 = exports2 && exports2.__metadata || function(k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); - }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AuthService = void 0; - var common_12 = require_common(); - var jwt_1 = (init_dist(), __toCommonJS(dist_exports)); + exports2.NO_PASSWORD_YET_HASH = exports2.OTP_ONLY_PASSWORD_HASH = void 0; + exports2.compareLocalHash = compareLocalHash; + exports2.isPasswordHash = isPasswordHash; var bcrypt = __importStar2(require_umd()); - var prisma_service_1 = require_prisma_service(); - var AuthService = class AuthService { - prisma; - jwt; - constructor(prisma, jwt) { - this.prisma = prisma; - this.jwt = jwt; - } - /** - * Port of legacy AdminController::login (henza_server). - * - * Legacy issued a random 60-char string as `api_token` and persisted it on the - * user row; this issues a signed JWT instead. The response keeps the legacy - * shape the admin panel's auth store reads: - * - `api_token` -> stored in localStorage under token/branch_token - * - `roles` -> [{ rid }], mapped to rids by the frontend then expanded - * through checkParent() - * - * Deliberate deviation from legacy: a bad phone and a bad password both return - * 401 here. Legacy returned 404 (firstOrFail) for an unknown phone and 422 for - * a wrong password, which let anyone enumerate valid admin phone numbers. - */ - async login(dto) { - const user = await this.prisma.adminUser.findUnique({ - where: { mobile: dto.phone }, - include: { userType: { include: { permissions: true } } } - }); - if (!user || !user.isActive) { - throw new common_12.UnauthorizedException("\u0646\u0627\u0645 \u06A9\u0627\u0631\u0628\u0631\u06CC \u06CC\u0627 \u0631\u0645\u0632 \u0639\u0628\u0648\u0631 \u0627\u0634\u062A\u0628\u0627\u0647 \u0627\u0633\u062A"); - } - const passwordOk = await bcrypt.compare(dto.password, user.passwordHash); - if (!passwordOk) { - throw new common_12.UnauthorizedException("\u0646\u0627\u0645 \u06A9\u0627\u0631\u0628\u0631\u06CC \u06CC\u0627 \u0631\u0645\u0632 \u0639\u0628\u0648\u0631 \u0627\u0634\u062A\u0628\u0627\u0647 \u0627\u0633\u062A"); - } - const apiToken = await this.jwt.signAsync({ sub: user.id, mobile: user.mobile }); - return { - id: user.id, - name: user.fullName, - fullName: user.fullName, - mobile: user.mobile, - role: user.role, - ut: user.userTypeId, - branch_id: user.branchId, - api_token: apiToken, - roles: (user.userType?.permissions ?? []).map((p) => ({ rid: p.rid })) - }; - } - /** - * Port of legacy UserController::showData, which the router guard calls on every - * cold load to refresh the permission list: - * - * $user['permission'] = Permission::where('ut',$user->ut)->select('rid')->get()->pluck('rid'); - * - * Returns raw (unexpanded) rids — the frontend runs checkParent() on them, as in - * legacy. The guard's own checks use the pre-expanded list from JwtStrategy. - */ - async showData(adminId) { - const user = await this.prisma.adminUser.findUnique({ - where: { id: adminId }, - include: { userType: { include: { permissions: true } } } - }); - if (!user) { - throw new common_12.UnauthorizedException(); - } - return { - id: user.id, - name: user.fullName, - fullName: user.fullName, - mobile: user.mobile, - role: user.role, - ut: user.userTypeId, - branch_id: user.branchId, - user_type: user.userType ? { id: user.userType.id, title: user.userType.title } : null, - permission: (user.userType?.permissions ?? []).map((p) => p.rid) - }; - } - }; - exports2.AuthService = AuthService; - exports2.AuthService = AuthService = __decorate4([ - (0, common_12.Injectable)(), - __metadata3("design:paramtypes", [ - prisma_service_1.PrismaService, - jwt_1.JwtService - ]) - ], AuthService); + exports2.OTP_ONLY_PASSWORD_HASH = "!OTP_ONLY_NO_PASSWORD_LOGIN"; + exports2.NO_PASSWORD_YET_HASH = "!NO_PASSWORD_SET_YET"; + async function compareLocalHash(password, passwordHash) { + if (typeof passwordHash !== "string" || !passwordHash.startsWith("$2")) + return false; + return bcrypt.compare(password, passwordHash); + } + function isPasswordHash(hash) { + return typeof hash === "string" && hash.startsWith("$2"); + } } }); -// dist/modules/auth/dto/login.dto.js -var require_login_dto = __commonJS({ - "dist/modules/auth/dto/login.dto.js"(exports2) { +// dist/modules/accounting-sync/accounting-sync.service.js +var require_accounting_sync_service = __commonJS({ + "dist/modules/accounting-sync/accounting-sync.service.js"(exports2) { "use strict"; var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; @@ -84624,29 +79905,2242 @@ var require_login_dto = __commonJS({ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.LoginDto = void 0; - var class_validator_1 = require_cjs(); - var LoginDto = class { - phone; - password; + exports2.AccountingSyncService = exports2.NeedsReviewError = void 0; + exports2.factorCodeFor = factorCodeFor; + exports2.validNationalCode = validNationalCode; + var common_12 = require_common(); + var client_1 = require("@prisma/client"); + var prisma_service_1 = require_prisma_service(); + var password_hash_1 = require_password_hash(); + var accounting_config_service_1 = require_accounting_config_service(); + var jalali_1 = require_jalali(); + var providers_1 = require_providers(); + var NeedsReviewError = class extends Error { + constructor(message) { + super(message); + this.name = "NeedsReviewError"; + } }; - exports2.LoginDto = LoginDto; - __decorate4([ - (0, class_validator_1.IsString)(), - (0, class_validator_1.IsNotEmpty)(), - __metadata3("design:type", String) - ], LoginDto.prototype, "phone", void 0); - __decorate4([ - (0, class_validator_1.IsString)(), - (0, class_validator_1.IsNotEmpty)(), - __metadata3("design:type", String) - ], LoginDto.prototype, "password", void 0); + exports2.NeedsReviewError = NeedsReviewError; + var MAX_CUSTOMER_PAGES = 1e3; + var STATEMENT_CACHE_MS = 1e4; + var BALANCE_FRESH_MS = 5e3; + var BALANCE_ON_DEMAND_TIMEOUT_MS = 3e3; + var STOCK_ON_DEMAND_TIMEOUT_MS = 2500; + function factorCodeFor(orderId) { + return `gbord${orderId}`.toLowerCase().replace(/[^a-z0-9]/g, ""); + } + function groupMatches(selected, c) { + if (selected.length === 0) + return true; + return selected.some((g) => g.id !== "" && c.groupId !== null && g.id === c.groupId || !!g.name && !!c.groupName && g.name === c.groupName); + } + function validNationalCode(v) { + if (!v) + return null; + const d = v.replace(/\D/g, ""); + if (!/^\d{10}$/.test(d) || /^(\d)\1{9}$/.test(d)) + return null; + const check = Number(d[9]); + const sum = d.slice(0, 9).split("").reduce((s, ch, i) => s + Number(ch) * (10 - i), 0); + const r = sum % 11; + return (r < 2 ? check === r : check === 11 - r) ? d : null; + } + var AccountingSyncService = class AccountingSyncService { + prisma; + config; + logger = new common_12.Logger("Accounting"); + statementCache = /* @__PURE__ */ new Map(); + itemCache = null; + constructor(prisma, config) { + this.prisma = prisma; + this.config = config; + } + // ════════════════════════════════════════════════════════════════════ + // F1 — customers + // ════════════════════════════════════════════════════════════════════ + /** + * Reads every account (in the selected groups) and links or imports it. + * Two passes: all accounts first, so two accounts sharing one mobile are + * caught before either is linked. + */ + async pullCustomers(a) { + if (a.config.mapping.importCustomerGroups.length === 0) { + throw new Error("\u0647\u06CC\u0686 \u06AF\u0631\u0648\u0647 \u0645\u0634\u062A\u0631\u06CC \u0628\u0631\u0627\u06CC \u0648\u0631\u0648\u062F \u0627\u0646\u062A\u062E\u0627\u0628 \u0646\u0634\u062F\u0647 \u0627\u0633\u062A (\u062A\u0628 \xAB\u0646\u06AF\u0627\u0634\u062A\xBB)"); + } + const provider = a.provider.name; + const all = []; + let cursor = null; + for (let page = 0; page < MAX_CUSTOMER_PAGES; page += 1) { + const res = await a.provider.listCustomers(a.settings, cursor); + all.push(...res.items); + if (!res.next) + break; + cursor = res.next; + } + const inScope = all.filter((c) => groupMatches(a.config.mapping.importCustomerGroups, c)); + const byMobile = /* @__PURE__ */ new Map(); + for (const c of inScope) { + if (!c.mobile) + continue; + byMobile.set(c.mobile, [...byMobile.get(c.mobile) ?? [], c]); + } + const existingLinks = await this.prisma.accountingLink.findMany({ + where: { provider, entityType: "CUSTOMER" }, + select: { id: true, entityId: true, externalCode: true } + }); + const linkByCode = new Map(existingLinks.map((l2) => [l2.externalCode, l2])); + const linkedCustomerIds = new Set(existingLinks.map((l2) => l2.entityId)); + const summary = { scanned: all.length, inScope: inScope.length, refreshed: 0, linked: 0, imported: 0, issues: 0 }; + for (const ext of inScope) { + const snapshot = ext; + const link = linkByCode.get(ext.code); + if (link) { + await this.prisma.accountingLink.update({ + where: { id: link.id }, + data: { externalName: ext.name, snapshot, syncedAt: /* @__PURE__ */ new Date() } + }); + summary.refreshed += 1; + continue; + } + if (!ext.mobile) { + await this.issue(provider, "CUSTOMER_NO_MOBILE", ext.code, `\u062D\u0633\u0627\u0628 \xAB${ext.name}\xBB (\u06A9\u062F ${ext.code}) \u0645\u0648\u0628\u0627\u06CC\u0644 \u0645\u0639\u062A\u0628\u0631 \u0646\u062F\u0627\u0631\u062F`, ext); + summary.issues += 1; + continue; + } + const siblings = byMobile.get(ext.mobile) ?? []; + if (siblings.length > 1) { + await this.issue(provider, "CUSTOMER_DUPLICATE_MOBILE", ext.code, `\u0645\u0648\u0628\u0627\u06CC\u0644 ${ext.mobile} \u062F\u0631 ${siblings.length} \u062D\u0633\u0627\u0628 \u062D\u0633\u0627\u0628\u062F\u0627\u0631\u06CC \u062A\u06A9\u0631\u0627\u0631 \u0634\u062F\u0647 (\u06A9\u062F\u0647\u0627: ${siblings.map((s) => s.code).join("\u060C ")})`, siblings); + summary.issues += 1; + continue; + } + const appCustomer = await this.prisma.customer.findUnique({ where: { mobile: ext.mobile }, select: { id: true } }); + if (appCustomer) { + if (linkedCustomerIds.has(appCustomer.id)) { + await this.issue(provider, "CUSTOMER_LINK_CONFLICT", ext.code, `\u0645\u0634\u062A\u0631\u06CC \u0628\u0627 \u0645\u0648\u0628\u0627\u06CC\u0644 ${ext.mobile} \u0642\u0628\u0644\u0627\u064B \u0628\u0647 \u062D\u0633\u0627\u0628 \u062F\u06CC\u06AF\u0631\u06CC \u0644\u06CC\u0646\u06A9 \u0634\u062F\u0647\u061B \u062D\u0633\u0627\u0628 ${ext.code} \u0644\u06CC\u0646\u06A9 \u0646\u0634\u062F`, ext, appCustomer.id); + summary.issues += 1; + continue; + } + await this.prisma.accountingLink.create({ + data: { provider, entityType: "CUSTOMER", entityId: appCustomer.id, externalCode: ext.code, externalName: ext.name, origin: "LINKED", snapshot } + }); + linkedCustomerIds.add(appCustomer.id); + summary.linked += 1; + continue; + } + const created = await this.importCustomer(provider, ext); + linkedCustomerIds.add(created); + summary.imported += 1; + } + return summary; + } + /** + * An account that exists only in the accounting software becomes an app + * customer, keyed by mobile (owner: «اولویت با شماره هست نه کد ملی»). The + * national code is the account's own when it is a real one and still free, + * else none (the column is optional since 2026-10-07 and holds national + * codes only — never the mobile or a made-up key). + * Credit limit 0 and UNVERIFIED: everything beyond identity is the app's. + * OTP-only: an imported account has no app password. + */ + async importCustomer(provider, ext) { + const mobile = ext.mobile; + let nationalCode = validNationalCode(ext.nationalCode); + if (nationalCode) { + const taken = await this.prisma.customer.findUnique({ where: { nationalCode }, select: { id: true } }); + if (taken) + nationalCode = null; + } + const { firstName, lastName } = (0, providers_1.splitName)(ext.name || mobile); + return this.prisma.$transaction(async (tx) => { + const customer = await tx.customer.create({ + data: { + // The DB trigger rebuilds fullName from the parts (schema.prisma). + fullName: [firstName, lastName].filter(Boolean).join(" ") || mobile, + firstName: firstName || null, + lastName: lastName || null, + mobile, + nationalCode, + passwordHash: password_hash_1.OTP_ONLY_PASSWORD_HASH, + phone: ext.phone, + address: ext.address + }, + select: { id: true } + }); + await tx.accountingLink.create({ + data: { + provider, + entityType: "CUSTOMER", + entityId: customer.id, + externalCode: ext.code, + externalName: ext.name, + origin: "IMPORTED", + snapshot: ext + } + }); + return customer.id; + }); + } + customerPayload(c, group) { + const parts = c.firstName || c.lastName ? { firstName: c.firstName ?? "", lastName: c.lastName ?? "" } : (0, providers_1.splitName)(c.fullName); + return { + firstName: parts.firstName, + lastName: parts.lastName, + fullName: c.fullName || [parts.firstName, parts.lastName].filter(Boolean).join(" "), + mobile: (0, providers_1.normalizeMobile)(c.mobile) ?? c.mobile, + phone: c.phone, + address: c.address, + nationalCode: validNationalCode(c.nationalCode), + group: { id: group?.id || null, name: group?.name || null } + }; + } + /** + * Makes sure the customer has an account in the accounting software and + * returns its code: existing link → update it (when `update`); else search + * by mobile → link; else create → link. Search-before-create is what makes a + * retried push safe on both providers. + */ + async ensureCustomerAccount(a, customerId, opts) { + const provider = a.provider.name; + const customer = await this.prisma.customer.findUnique({ where: { id: customerId } }); + if (!customer) + throw new NeedsReviewError("\u0645\u0634\u062A\u0631\u06CC \u062F\u0631 \u0627\u067E \u067E\u06CC\u062F\u0627 \u0646\u0634\u062F"); + const link = await this.prisma.accountingLink.findUnique({ + where: { provider_entityType_entityId: { provider, entityType: "CUSTOMER", entityId: customerId } } + }); + if (link) { + if (opts.update) { + const snap = link.snapshot ?? {}; + const group = snap.groupName || snap.groupId ? { id: snap.groupId ?? "", name: snap.groupName ?? "" } : a.config.mapping.newCustomerGroup; + const payload2 = this.customerPayload(customer, group); + const res2 = await a.provider.updateCustomer(a.settings, link.externalCode, payload2); + await this.prisma.accountingLink.update({ where: { id: link.id }, data: { syncedAt: /* @__PURE__ */ new Date() } }); + return { code: link.externalCode, request: { action: "update", code: link.externalCode, payload: payload2 }, response: res2.response }; + } + return { code: link.externalCode, request: { action: "none" }, response: null }; + } + const mobile = (0, providers_1.normalizeMobile)(customer.mobile); + if (!mobile) + throw new NeedsReviewError(`\u0645\u0648\u0628\u0627\u06CC\u0644 \u0645\u0634\u062A\u0631\u06CC (${customer.mobile}) \u0645\u0639\u062A\u0628\u0631 \u0646\u06CC\u0633\u062A`); + const matches = await a.provider.findCustomersByMobile(a.settings, mobile); + const free = []; + for (const m of matches) { + const taken = await this.prisma.accountingLink.findUnique({ + where: { provider_entityType_externalCode: { provider, entityType: "CUSTOMER", externalCode: m.code } }, + select: { id: true } + }); + if (!taken) + free.push(m); + } + if (free.length > 1) { + throw new NeedsReviewError(`\u0645\u0648\u0628\u0627\u06CC\u0644 ${mobile} \u062F\u0631 \u0686\u0646\u062F \u062D\u0633\u0627\u0628 \u062D\u0633\u0627\u0628\u062F\u0627\u0631\u06CC \u0647\u0633\u062A (\u06A9\u062F\u0647\u0627: ${free.map((m) => m.code).join("\u060C ")}). \u0627\u0632 \xAB\u0644\u06CC\u0646\u06A9 \u062F\u0633\u062A\u06CC\xBB \u06CC\u06A9\u06CC \u0631\u0627 \u0627\u0646\u062A\u062E\u0627\u0628 \u06A9\u0646\u06CC\u062F.`); + } + if (free.length === 1) { + const m = free[0]; + await this.prisma.accountingLink.create({ + data: { provider, entityType: "CUSTOMER", entityId: customerId, externalCode: m.code, externalName: m.name, origin: "LINKED", snapshot: m } + }); + return { code: m.code, request: { action: "link", mobile }, response: m }; + } + if (!a.config.mapping.newCustomerGroup) { + throw new NeedsReviewError("\u06AF\u0631\u0648\u0647 \u0645\u0634\u062A\u0631\u06CC \u062C\u062F\u06CC\u062F \u062F\u0631 \u062A\u0628 \xAB\u0646\u06AF\u0627\u0634\u062A\xBB \u062A\u0639\u06CC\u06CC\u0646 \u0646\u0634\u062F\u0647\u061B \u0628\u0639\u062F \u0627\u0632 \u062A\u0639\u06CC\u06CC\u0646\u060C \xAB\u062A\u0644\u0627\u0634 \u062F\u0648\u0628\u0627\u0631\u0647\xBB \u0631\u0627 \u0628\u0632\u0646\u06CC\u062F"); + } + const payload = this.customerPayload(customer, a.config.mapping.newCustomerGroup); + const res = await a.provider.createCustomer(a.settings, payload); + await this.prisma.accountingLink.create({ + data: { + provider, + entityType: "CUSTOMER", + entityId: customerId, + externalCode: res.code, + externalName: payload.fullName, + origin: "PUSHED", + snapshot: { ...payload, groupId: payload.group.id, groupName: payload.group.name } + } + }); + return { code: res.code, request: { action: "create", payload }, response: res.response }; + } + // ════════════════════════════════════════════════════════════════════ + // F2 — balances + // ════════════════════════════════════════════════════════════════════ + async pullBalances(a) { + const links = await this.prisma.accountingLink.findMany({ + where: { provider: a.provider.name, entityType: "CUSTOMER" }, + select: { entityId: true, externalCode: true } + }); + if (links.length === 0) + return { linked: 0, updated: 0 }; + const balances = await a.provider.getBalances(a.settings, links.map((l2) => l2.externalCode)); + const byCode = new Map(balances.map((b) => [b.code, b])); + const now = /* @__PURE__ */ new Date(); + let updated = 0; + for (const l2 of links) { + const b = byCode.get(l2.externalCode); + if (!b) + continue; + await this.prisma.customer.update({ + where: { id: l2.entityId }, + data: { accountingGoldBalance: b.goldGrams, accountingRialBalance: b.rial, accountingBalanceAt: now } + }); + updated += 1; + } + return { linked: links.length, updated }; + } + /** + * The balance the customer sees (D27): the accounting software's, refreshed + * on demand when older than a minute, with a short timeout so the app never + * waits on a slow installation — on any failure the last stored figure is + * served. Null when the integration does not apply to this customer. + */ + async customerBalance(customerId) { + const a = await this.config.activeFor("balances"); + if (!a) + return null; + const link = await this.prisma.accountingLink.findUnique({ + where: { provider_entityType_entityId: { provider: a.provider.name, entityType: "CUSTOMER", entityId: customerId } } + }); + if (!link) + return null; + let c = await this.prisma.customer.findUnique({ + where: { id: customerId }, + select: { accountingGoldBalance: true, accountingRialBalance: true, accountingBalanceAt: true } + }); + const stale = !c?.accountingBalanceAt || Date.now() - c.accountingBalanceAt.getTime() > BALANCE_FRESH_MS; + if (stale) { + try { + const [b] = await a.provider.getBalances({ ...a.settings, timeoutMs: Math.min(a.settings.timeoutMs, BALANCE_ON_DEMAND_TIMEOUT_MS) }, [link.externalCode]); + if (b) { + c = await this.prisma.customer.update({ + where: { id: customerId }, + data: { accountingGoldBalance: b.goldGrams, accountingRialBalance: b.rial, accountingBalanceAt: /* @__PURE__ */ new Date() }, + select: { accountingGoldBalance: true, accountingRialBalance: true, accountingBalanceAt: true } + }); + } + } catch (err) { + this.logger.warn(`On-demand balance for ${customerId} failed, serving the stored one: ${err.message}`); + } + } + if (!c?.accountingBalanceAt) + return null; + return { + gold: c.accountingGoldBalance ?? new client_1.Prisma.Decimal(0), + rial: c.accountingRialBalance ?? new client_1.Prisma.Decimal(0), + at: c.accountingBalanceAt, + provider: a.provider.label + }; + } + // ════════════════════════════════════════════════════════════════════ + // Real-time: change poll + live reads + // ════════════════════════════════════════════════════════════════════ + /** + * One poll of the software's change feed. Only the accounts and کارساخته + * that changed are re-read, so this is cheap enough to run every few + * seconds. Returns the new cursor and what the slow jobs should still do. + */ + async pollChanges(a, cursor) { + const batch = await a.provider.getChanges(a.settings, cursor); + const out = { cursor: batch.cursor, balances: 0, stocks: 0, fullBalances: false, fullProducts: false, newAccounts: false }; + if (cursor === null) + return out; + const provider = a.provider.name; + if (a.config.features.balances) { + if (batch.overflow) + out.fullBalances = true; + else if (batch.accountCodes.length > 0) { + const links = await this.prisma.accountingLink.findMany({ + where: { provider, entityType: "CUSTOMER", externalCode: { in: batch.accountCodes } }, + select: { entityId: true, externalCode: true } + }); + out.newAccounts = links.length < batch.accountCodes.length; + if (links.length > 0) + out.balances = await this.storeBalances(a, links); + } + } + if (a.config.features.products) { + if (batch.overflow) + out.fullProducts = true; + else if (batch.itemNames.length > 0) { + const links = await this.prisma.accountingLink.findMany({ + where: { provider, entityType: "PRODUCT", externalCode: { in: batch.itemNames } }, + select: { entityId: true, externalCode: true } + }); + if (links.length < batch.itemNames.length) + out.fullProducts = true; + for (const l2 of links) { + if (await this.storeStock(a, l2.entityId, l2.externalCode, l2.externalCode)) + out.stocks += 1; + } + } + } + return out; + } + /** Reads the balances of these linked customers and stores them. */ + async storeBalances(a, links) { + const balances = await a.provider.getBalances(a.settings, links.map((l2) => l2.externalCode)); + const byCode = new Map(balances.map((b) => [b.code, b])); + const now = /* @__PURE__ */ new Date(); + let n = 0; + for (const l2 of links) { + const b = byCode.get(l2.externalCode); + if (!b) + continue; + await this.prisma.customer.update({ + where: { id: l2.entityId }, + data: { accountingGoldBalance: b.goldGrams, accountingRialBalance: b.rial, accountingBalanceAt: now } + }); + n += 1; + } + return n; + } + async storeStock(a, productId, code, name, timeoutMs) { + const settings = timeoutMs ? { ...a.settings, timeoutMs: Math.min(a.settings.timeoutMs, timeoutMs) } : a.settings; + const stock = await a.provider.getKarSakhteStock(settings, { code, name }); + const known = stock.weight !== null || stock.count !== null; + await this.prisma.product.update({ + where: { id: productId }, + data: { + accountingStockWeight: stock.weight, + accountingStockCount: stock.count, + accountingStockAt: known ? /* @__PURE__ */ new Date() : null + } + }); + return known; + } + /** + * At order time: the product's stock straight from the accounting software. + * If it cannot answer in time the order goes ahead on the last stored figure + * (owner's ruling) and the next change poll corrects it. Returns the product + * fields stockBlocked() reads, fresh when it could be. + */ + async liveStock(product) { + const a = await this.config.activeFor("products"); + if (!a) + return product; + const link = await this.prisma.accountingLink.findUnique({ + where: { provider_entityType_entityId: { provider: a.provider.name, entityType: "PRODUCT", entityId: product.id } }, + select: { externalCode: true, externalName: true } + }); + if (!link) + return product; + try { + await this.storeStock(a, product.id, link.externalCode, link.externalName ?? link.externalCode, STOCK_ON_DEMAND_TIMEOUT_MS); + const fresh = await this.prisma.product.findUnique({ + where: { id: product.id }, + select: { accountingStockAt: true, accountingStockWeight: true, accountingStockCount: true } + }); + return fresh ? { ...product, ...fresh } : product; + } catch (err) { + this.logger.warn(`Live stock of product ${product.id} unavailable, using the stored figure: ${err.message}`); + return product; + } + } + /** + * The app's profile (plan §12): this one customer's balance, read from the + * accounting software on every call — no freshness window, no feature + * switch, only a connected provider. On no answer the stored figure is + * served and labelled as such. + */ + async customerBalanceLive(customerId) { + const none = { source: "none", gold: null, rial: null, at: null, provider: null }; + const a = await this.config.active(); + if (!a) + return none; + const link = await this.prisma.accountingLink.findUnique({ + where: { provider_entityType_entityId: { provider: a.provider.name, entityType: "CUSTOMER", entityId: customerId } }, + select: { externalCode: true } + }); + if (!link) + return none; + try { + const [b] = await a.provider.getBalances({ ...a.settings, timeoutMs: Math.min(a.settings.timeoutMs, BALANCE_ON_DEMAND_TIMEOUT_MS) }, [link.externalCode]); + if (b) { + const at = /* @__PURE__ */ new Date(); + await this.prisma.customer.update({ + where: { id: customerId }, + data: { accountingGoldBalance: b.goldGrams, accountingRialBalance: b.rial, accountingBalanceAt: at } + }); + return { source: "accounting", gold: b.goldGrams.toString(), rial: b.rial.toString(), at, provider: a.provider.label }; + } + } catch (err) { + this.logger.warn(`Live balance for ${customerId} failed, serving the stored one: ${err.message}`); + } + const c = await this.prisma.customer.findUnique({ + where: { id: customerId }, + select: { accountingGoldBalance: true, accountingRialBalance: true, accountingBalanceAt: true } + }); + if (!c?.accountingBalanceAt) + return none; + return { + source: "stored", + gold: (c.accountingGoldBalance ?? 0).toString(), + rial: (c.accountingRialBalance ?? 0).toString(), + at: c.accountingBalanceAt, + provider: a.provider.label + }; + } + // ════════════════════════════════════════════════════════════════════ + // F6 — statement («گزارش») + // ════════════════════════════════════════════════════════════════════ + /** + * The customer's statement from the accounting software, oldest first, or + * null when the integration does not apply (the report then falls back to + * the internal ledger). Cached for a minute per customer so paging through + * the report costs one call. + */ + async customerStatement(customerId, range) { + const a = await this.config.activeFor("report"); + if (!a) + return null; + const link = await this.prisma.accountingLink.findUnique({ + where: { provider_entityType_entityId: { provider: a.provider.name, entityType: "CUSTOMER", entityId: customerId } } + }); + if (!link) + return null; + const to = (0, jalali_1.parseJalali)(range?.to) ?? (0, jalali_1.toJalali)(/* @__PURE__ */ new Date()); + const from = (0, jalali_1.parseJalali)(range?.from) ?? (0, jalali_1.toJalali)(new Date(Date.now() - a.config.report.windowDays * 24 * 3600 * 1e3)); + const key = `${a.provider.name}:${link.externalCode}:${from.jy}-${from.jm}-${from.jd}:${to.jy}-${to.jm}-${to.jd}`; + const hit = this.statementCache.get(key); + if (hit && Date.now() - hit.at < STATEMENT_CACHE_MS) + return { rows: hit.rows, code: link.externalCode, provider: a.provider.label }; + const rows = await a.provider.getStatement(a.settings, { code: link.externalCode, from, to }); + const own = rows.filter((r) => !r.accountCode || r.accountCode === link.externalCode); + this.statementCache.set(key, { at: Date.now(), rows: own }); + if (this.statementCache.size > 500) + this.statementCache.delete(this.statementCache.keys().next().value); + return { rows: own, code: link.externalCode, provider: a.provider.label }; + } + // ════════════════════════════════════════════════════════════════════ + // F4 — کارساخته ↔ products + // ════════════════════════════════════════════════════════════════════ + /** + * Accounting items → app products. A new item becomes a product with no + * image and no variant, so it stays out of the app (F5) until an admin + * photographs it and adds its weights. Title, code and stock follow the + * accounting software; everything else is the app's (D27). + */ + async pullProducts(a) { + const provider = a.provider.name; + const items = await a.provider.listKarSakhte(a.settings); + const links = await this.prisma.accountingLink.findMany({ where: { provider, entityType: "PRODUCT" } }); + const linkByCode = new Map(links.map((l2) => [l2.externalCode, l2])); + const linkedProductIds = new Set(links.map((l2) => l2.entityId)); + const summary = { items: items.length, updated: 0, linked: 0, imported: 0, stockErrors: 0, issues: 0 }; + const now = /* @__PURE__ */ new Date(); + const touched = /* @__PURE__ */ new Set(); + for (const item of items) { + let stock = { weight: item.stockWeight, count: item.stockCount }; + if (stock.weight === null && stock.count === null) { + try { + stock = await a.provider.getKarSakhteStock(a.settings, item); + } catch (err) { + summary.stockErrors += 1; + this.logger.warn(`Stock of \xAB${item.name}\xBB unavailable: ${err.message}`); + } + } + const stockData = { + accountingStockWeight: stock.weight, + accountingStockCount: stock.count, + accountingStockAt: stock.weight !== null || stock.count !== null ? now : null + }; + const snapshot = item; + const link = linkByCode.get(item.code); + if (link) { + await this.applyItemToProduct(provider, link.entityId, item, stockData); + await this.prisma.accountingLink.update({ + where: { id: link.id }, + data: { externalName: item.name, snapshot, syncedAt: now } + }); + touched.add(link.entityId); + summary.updated += 1; + continue; + } + const sameName = await this.prisma.product.findMany({ where: { title: item.name }, select: { id: true } }); + const candidates = sameName.filter((p) => !linkedProductIds.has(p.id)); + if (candidates.length > 1) { + await this.issue(provider, "PRODUCT_DUPLICATE_TITLE", item.code, `\u0686\u0646\u062F \u0645\u062D\u0635\u0648\u0644 \u0628\u0627 \u0639\u0646\u0648\u0627\u0646 \xAB${item.name}\xBB \u0647\u0633\u062A\u061B \u06A9\u0627\u0631\u0633\u0627\u062E\u062A\u0647 \u0644\u06CC\u0646\u06A9 \u0646\u0634\u062F`, item); + summary.issues += 1; + continue; + } + if (candidates.length === 1) { + const productId2 = candidates[0].id; + await this.prisma.accountingLink.create({ + data: { provider, entityType: "PRODUCT", entityId: productId2, externalCode: item.code, externalName: item.name, origin: "LINKED", snapshot } + }); + await this.applyItemToProduct(provider, productId2, item, stockData); + linkedProductIds.add(productId2); + touched.add(productId2); + summary.linked += 1; + continue; + } + const productId = await this.prisma.$transaction(async (tx) => { + const product = await tx.product.create({ + data: { title: item.name, ...stockData }, + select: { id: true } + }); + await tx.accountingLink.create({ + data: { provider, entityType: "PRODUCT", entityId: product.id, externalCode: item.code, externalName: item.name, origin: "IMPORTED", snapshot } + }); + return product.id; + }); + await this.setProductCode(provider, productId, item); + linkedProductIds.add(productId); + touched.add(productId); + summary.imported += 1; + } + await this.prisma.product.updateMany({ + where: { accountingStockAt: { not: null }, id: { notIn: [...touched] } }, + data: { accountingStockWeight: null, accountingStockCount: null, accountingStockAt: null } + }); + return summary; + } + async applyItemToProduct(provider, productId, item, stockData) { + await this.prisma.product.update({ where: { id: productId }, data: { title: item.name, ...stockData } }); + await this.setProductCode(provider, productId, item); + } + /** + * Zarrin items have a numeric id, which becomes the product's code. Tahesab + * items have none (the name is the key), so the code stays the app's. + */ + async setProductCode(provider, productId, item) { + if (provider !== "zarrin") + return; + const owner = await this.prisma.product.findUnique({ where: { productCode: item.code }, select: { id: true } }); + if (owner && owner.id !== productId) { + await this.issue(provider, "PRODUCT_CODE_TAKEN", item.code, `\u06A9\u062F ${item.code} \u0631\u0648\u06CC \u0645\u062D\u0635\u0648\u0644 \u062F\u06CC\u06AF\u0631\u06CC \u0627\u0633\u062A\u061B \u06A9\u062F \u0645\u062D\u0635\u0648\u0644 \xAB${item.name}\xBB \u0639\u0648\u0636 \u0646\u0634\u062F`, item, productId); + return; + } + if (!owner) + await this.prisma.product.update({ where: { id: productId }, data: { productCode: item.code } }); + } + /** + * Makes sure a product has its کارساخته: existing link → done; an item by + * the same name → link; else create it (Zarrin). Tahesab cannot create items + * through its API — the item comes into being with the first document under + * the product's title, and the next pull links it by name. + */ + async ensureProductItem(a, productId) { + const provider = a.provider.name; + const link = await this.prisma.accountingLink.findUnique({ + where: { provider_entityType_entityId: { provider, entityType: "PRODUCT", entityId: productId } } + }); + const product = await this.prisma.product.findUnique({ where: { id: productId }, select: { id: true, title: true, categoryId: true } }); + if (!product) + throw new NeedsReviewError("\u0645\u062D\u0635\u0648\u0644 \u062F\u0631 \u0627\u067E \u067E\u06CC\u062F\u0627 \u0646\u0634\u062F"); + if (link) + return { code: link.externalCode, name: link.externalName ?? product.title, created: false }; + if (!a.provider.capabilities.createKarSakhte) + return null; + const existing = (await this.itemsCached(a)).filter((i) => i.name === product.title); + for (const item2 of existing) { + const taken = await this.prisma.accountingLink.findUnique({ + where: { provider_entityType_externalCode: { provider, entityType: "PRODUCT", externalCode: item2.code } }, + select: { id: true } + }); + if (!taken) { + await this.prisma.accountingLink.create({ + data: { provider, entityType: "PRODUCT", entityId: productId, externalCode: item2.code, externalName: item2.name, origin: "LINKED", snapshot: item2 } + }); + await this.setProductCode(provider, productId, item2); + return { code: item2.code, name: item2.name, created: false }; + } + } + const m = a.config.mapping; + const group = product.categoryId && m.categoryGroups.find((x) => x.categoryId === product.categoryId)?.group || m.newKarSakhteGroup; + if (!group?.id) + throw new NeedsReviewError("\u06AF\u0631\u0648\u0647 \u0633\u0627\u062E\u062A\u0647 \u0628\u0631\u0627\u06CC \u0627\u06CC\u0646 \u062F\u0633\u062A\u0647\u200C\u0628\u0646\u062F\u06CC/\u067E\u06CC\u0634\u200C\u0641\u0631\u0636 \u062F\u0631 \u062A\u0646\u0638\u06CC\u0645\u0627\u062A \u062D\u0633\u0627\u0628\u062F\u0627\u0631\u06CC \u062A\u0639\u06CC\u06CC\u0646 \u0646\u0634\u062F\u0647"); + if (!m.newKarSakhteType?.id) + throw new NeedsReviewError("\u0646\u0648\u0639 \u06A9\u0627\u0631\u0633\u0627\u062E\u062A\u0647\u200C\u06CC \u067E\u06CC\u0634\u200C\u0641\u0631\u0636 \u062F\u0631 \u062A\u0646\u0638\u06CC\u0645\u0627\u062A \u062D\u0633\u0627\u0628\u062F\u0627\u0631\u06CC \u062A\u0639\u06CC\u06CC\u0646 \u0646\u0634\u062F\u0647"); + const res = await a.provider.createKarSakhte(a.settings, { name: product.title, groupId: group.id, typeId: m.newKarSakhteType.id }); + const item = { + code: res.code, + name: product.title, + groupId: group.id, + groupName: group.name, + typeId: m.newKarSakhteType.id, + typeName: m.newKarSakhteType.name, + saleWagePercent: null, + stockWeight: null, + stockCount: null + }; + await this.prisma.accountingLink.create({ + data: { provider, entityType: "PRODUCT", entityId: productId, externalCode: res.code, externalName: product.title, origin: "PUSHED", snapshot: item } + }); + await this.setProductCode(provider, productId, item); + return { code: res.code, name: product.title, created: true }; + } + /** Zarrin's listKarSakhte takes seconds; an order with several lines needs it once. */ + async itemsCached(a) { + const c = this.itemCache; + if (c && c.provider === a.provider.name && Date.now() - c.at < STATEMENT_CACHE_MS) + return c.items; + const items = await a.provider.listKarSakhte(a.settings); + this.itemCache = { provider: a.provider.name, at: Date.now(), items }; + return items; + } + // ════════════════════════════════════════════════════════════════════ + // F3 — order documents + // ════════════════════════════════════════════════════════════════════ + async buildOrderDocument(a, orderId) { + const order = await this.prisma.order.findUnique({ + where: { id: orderId }, + include: { items: { include: { productVariant: { include: { product: true } } } } } + }); + if (!order) + throw new NeedsReviewError("\u0633\u0641\u0627\u0631\u0634 \u062F\u0631 \u0627\u067E \u067E\u06CC\u062F\u0627 \u0646\u0634\u062F"); + if (order.items.length === 0) + throw new NeedsReviewError("\u0633\u0641\u0627\u0631\u0634 \u0642\u0644\u0645\u06CC \u0646\u062F\u0627\u0631\u062F"); + const customer = await this.ensureCustomerAccount(a, order.customerId, { update: false }); + const lines = []; + let total = new client_1.Prisma.Decimal(0); + for (const item of order.items) { + const product = item.productVariant.product; + let ref; + const ensured = await this.ensureProductItem(a, product.id); + if (ensured) + ref = ensured; + else { + ref = { code: product.title, name: product.title }; + } + const qty = item.quantity; + const wage = new client_1.Prisma.Decimal(item.wagePercentSnapshot).sub(item.discountPercentSnapshot); + const weight = new client_1.Prisma.Decimal(item.rashWeightGramsSnapshot).mul(qty); + total = total.add(new client_1.Prisma.Decimal(item.computedWeightGrams).mul(qty)); + lines.push({ + itemCode: ref.code, + itemName: ref.name, + weightGrams: weight, + count: qty, + wagePercent: wage, + flatRial: new client_1.Prisma.Decimal(item.flatRialCharge).mul(qty), + karat: a.config.mapping.karat, + description: `${product.title} \u2014 ${item.productVariant.title} \u2014 \u0633\u0641\u0627\u0631\u0634 ${order.orderNumber} \u2014 \u0627\u062C\u0631\u062A ${wage.toString()}\u066A` + }); + } + const docGold = lines.reduce((s, l2) => s.add(l2.weightGrams.mul(new client_1.Prisma.Decimal(1).add(l2.wagePercent.div(100)))), new client_1.Prisma.Decimal(0)); + const mismatch = docGold.sub(order.totalGoldWeightGrams).abs(); + if (mismatch.gt("0.01")) { + throw new NeedsReviewError(`\u062C\u0645\u0639 \u0648\u0632\u0646 \u0633\u0646\u062F (${docGold.toFixed(3)}) \u0628\u0627 \u0648\u0632\u0646 \u0633\u0641\u0627\u0631\u0634 (${new client_1.Prisma.Decimal(order.totalGoldWeightGrams).toFixed(3)}) \u0646\u0645\u06CC\u200C\u062E\u0648\u0627\u0646\u062F`); + } + return { + order, + input: { + factorCode: factorCodeFor(order.id), + customerCode: customer.code, + date: order.deliveredAt ?? /* @__PURE__ */ new Date(), + description: `\u0633\u0641\u0627\u0631\u0634 ${order.orderNumber} \u0627\u0632 \u0627\u067E`, + temporary: true, + // D27: the accountant finalises + lines + }, + check: { orderTotal: new client_1.Prisma.Decimal(order.totalGoldWeightGrams).toFixed(3), documentGold: docGold.toFixed(3), linesTotal: total.toFixed(3) } + }; + } + // ════════════════════════════════════════════════════════════════════ + // outbox jobs + // ════════════════════════════════════════════════════════════════════ + /** Runs one outbox job. Throws to signal failure; the worker decides retry vs review. */ + async runJob(a, job) { + switch (job.kind) { + case "CUSTOMER_PUSH": { + const res = await this.ensureCustomerAccount(a, job.entityId, { update: true }); + return { externalRef: res.code, request: res.request, response: res.response }; + } + case "PRODUCT_PUSH": { + const res = await this.ensureProductItem(a, job.entityId); + return { + externalRef: res?.code ?? null, + request: { productId: job.entityId }, + response: res ?? { note: `${a.provider.label} \u0633\u0627\u062E\u062A \u06A9\u0627\u0631\u0633\u0627\u062E\u062A\u0647 \u0646\u062F\u0627\u0631\u062F\u061B \u0628\u0627 \u0627\u0648\u0644\u06CC\u0646 \u0633\u0646\u062F \u0633\u0627\u062E\u062A\u0647 \u0645\u06CC\u200C\u0634\u0648\u062F` } + }; + } + case "ORDER_DOCUMENT": { + const doc = await this.buildOrderDocument(a, job.entityId); + const request = { ...doc.input, lines: doc.input.lines.map((l2) => ({ ...l2, weightGrams: l2.weightGrams.toFixed(3), wagePercent: l2.wagePercent.toString(), flatRial: l2.flatRial.toFixed(0) })), check: doc.check }; + await this.prisma.accountingOutbox.update({ where: { id: job.id }, data: { lastRequest: request } }); + const result = await a.provider.postOrderDocument(a.settings, doc.input, job.progress ?? {}, async (p) => { + await this.prisma.accountingOutbox.update({ where: { id: job.id }, data: { progress: p } }); + }); + return { externalRef: result.ref, request, response: result.response }; + } + case "ORDER_DOCUMENT_DELETE": { + const sent = await this.prisma.accountingOutbox.findFirst({ + where: { provider: job.provider, kind: "ORDER_DOCUMENT", entityId: job.entityId, status: { in: ["SENT", "SENDING", "NEEDS_REVIEW", "FAILED"] } }, + orderBy: { createdAt: "desc" } + }); + if (!sent) + return { response: { note: "\u0633\u0646\u062F\u06CC \u0628\u0631\u0627\u06CC \u062D\u0630\u0641 \u062B\u0628\u062A \u0646\u0634\u062F\u0647 \u0628\u0648\u062F" } }; + const order = await this.prisma.order.findUnique({ where: { id: job.entityId }, select: { customerId: true, deliveredAt: true } }); + let customerCode = sent.lastRequest?.customerCode ?? null; + if (!customerCode && order) { + const link2 = await this.prisma.accountingLink.findUnique({ + where: { provider_entityType_entityId: { provider: job.provider, entityType: "CUSTOMER", entityId: order.customerId } } + }); + customerCode = link2?.externalCode ?? null; + } + if (!customerCode) + throw new NeedsReviewError("\u062D\u0633\u0627\u0628 \u0645\u0634\u062A\u0631\u06CC \u062F\u0631 \u062D\u0633\u0627\u0628\u062F\u0627\u0631\u06CC \u0645\u0639\u0644\u0648\u0645 \u0646\u06CC\u0633\u062A\u061B \u0633\u0646\u062F \u0631\u0627 \u062F\u0633\u062A\u06CC \u062D\u0630\u0641 \u06A9\u0646\u06CC\u062F"); + const link = { externalCode: customerCode }; + const factorCode = factorCodeFor(job.entityId); + if (job.provider === "tahesab") { + const posted = order?.deliveredAt && order.deliveredAt < sent.createdAt ? order.deliveredAt : sent.createdAt; + const date = (0, jalali_1.toJalali)(posted); + const rows = await a.provider.getStatement(a.settings, { code: link.externalCode, from: date, to: (0, jalali_1.toJalali)(/* @__PURE__ */ new Date()) }); + const docRows = rows.filter((r) => r.documentRef === factorCode); + if (docRows.some((r) => !r.temporary)) { + throw new NeedsReviewError("\u0633\u0646\u062F \u062F\u0631 \u062D\u0633\u0627\u0628\u062F\u0627\u0631\u06CC \u0646\u0647\u0627\u06CC\u06CC \u0634\u062F\u0647\u061B \u062D\u0630\u0641 \u062E\u0648\u062F\u06A9\u0627\u0631 \u0627\u0646\u062C\u0627\u0645 \u0646\u0634\u062F. \u062D\u0633\u0627\u0628\u062F\u0627\u0631 \u0628\u0627\u06CC\u062F \u062F\u0633\u062A\u06CC \u0627\u0635\u0644\u0627\u062D \u06A9\u0646\u062F."); + } + } else { + throw new NeedsReviewError(`${a.provider.label} \u0648\u0636\u0639\u06CC\u062A \u0645\u0648\u0642\u062A/\u0646\u0647\u0627\u06CC\u06CC \u0633\u0646\u062F \u0631\u0627 \u06AF\u0632\u0627\u0631\u0634 \u0646\u0645\u06CC\u200C\u062F\u0647\u062F\u061B \u0633\u0646\u062F ${sent.externalRef ?? ""} \u0631\u0627 \u062D\u0633\u0627\u0628\u062F\u0627\u0631 \u0628\u0631\u0631\u0633\u06CC \u0648 \u062D\u0630\u0641 \u06A9\u0646\u062F.`); + } + const res = await a.provider.deleteDocument(a.settings, { factorCode, ref: sent.externalRef, customerCode: link.externalCode }); + await this.prisma.accountingOutbox.update({ + where: { id: sent.id }, + data: { status: "RESOLVED", lastError: "\u0633\u0646\u062F \u0628\u0647\u200C\u062E\u0627\u0637\u0631 \u0644\u063A\u0648 \u0633\u0641\u0627\u0631\u0634 \u062D\u0630\u0641 \u0634\u062F" } + }); + return { externalRef: sent.externalRef, request: { factorCode }, response: res.response }; + } + } + } + /** + * Is a job whose call may or may not have landed safe to send again? + * Customer/product pushes search before they create; Tahesab rejects a + * repeated document row; a Zarrin document has no such guard. + */ + isRetrySafe(provider, kind) { + if (kind === "ORDER_DOCUMENT") + return provider === "tahesab"; + return true; + } + // ════════════════════════════════════════════════════════════════════ + async issue(provider, kind, externalCode, message, data, entityId) { + const json = data === void 0 || data === null ? client_1.Prisma.JsonNull : JSON.parse(JSON.stringify(data)); + await this.prisma.accountingIssue.upsert({ + where: { provider_kind_externalCode: { provider, kind, externalCode } }, + update: { message, data: json, entityId: entityId ?? null, resolvedAt: null }, + create: { provider, kind, externalCode, message, data: json, entityId: entityId ?? null } + }); + } + describeError(err) { + if (err instanceof providers_1.AccountingProviderError) + return err.message; + if (err instanceof NeedsReviewError) + return err.message; + return err?.message ?? String(err); + } + /** For callers that only need to know the configuration. */ + activeConfig() { + return this.config.get(); + } + }; + exports2.AccountingSyncService = AccountingSyncService; + exports2.AccountingSyncService = AccountingSyncService = __decorate4([ + (0, common_12.Injectable)(), + __metadata3("design:paramtypes", [ + prisma_service_1.PrismaService, + accounting_config_service_1.AccountingConfigService + ]) + ], AccountingSyncService); } }); -// dist/modules/auth/auth.controller.js -var require_auth_controller = __commonJS({ - "dist/modules/auth/auth.controller.js"(exports2) { +// dist/modules/accounting-sync/accounting-worker.service.js +var require_accounting_worker_service = __commonJS({ + "dist/modules/accounting-sync/accounting-worker.service.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountingWorkerService = exports2.PULL_FEATURE = void 0; + var common_12 = require_common(); + var client_1 = require("@prisma/client"); + var crypto_1 = require("crypto"); + var env_12 = require_env(); + var prisma_service_1 = require_prisma_service(); + var accounting_config_service_1 = require_accounting_config_service(); + var accounting_sync_service_1 = require_accounting_sync_service(); + var providers_1 = require_providers(); + var TICK_MS = 3e4; + var FAST_TICK_MS = 2e3; + var CHANGES_POLL_MS = 5e3; + var LEASE_MS = 10 * 6e4; + var LEASE_KEY = "accounting.lease"; + var OUTBOX_BATCH = 25; + var MAX_ATTEMPTS = 8; + exports2.PULL_FEATURE = { + customers: "customers", + balances: "balances", + products: "products" + }; + function toJson(v) { + if (v === void 0 || v === null) + return client_1.Prisma.JsonNull; + return JSON.parse(JSON.stringify(v)); + } + var AccountingWorkerService = class AccountingWorkerService { + prisma; + config; + sync; + logger = new common_12.Logger("Accounting"); + owner = (0, crypto_1.randomUUID)(); + timer = null; + running = false; + fastRunning = false; + fastTimer = null; + kickTimer = null; + changes = { provider: "", cursor: null }; + lastChangePollAt = 0; + lastChangeWarnAt = 0; + forced = /* @__PURE__ */ new Set(); + lastForcedCustomersAt = 0; + /** Shown on the admin screen. */ + realtime = {}; + recovered = /* @__PURE__ */ new Set(); + constructor(prisma, config, sync) { + this.prisma = prisma; + this.config = config; + this.sync = sync; + } + onApplicationBootstrap() { + if ((0, env_12.envOr)("ACCOUNTING_WORKER", "on") === "off" || process.env.NODE_ENV === "test") + return; + this.timer = setInterval(() => void this.tick(), TICK_MS); + this.timer.unref?.(); + this.fastTimer = setInterval(() => void this.fastTick(), FAST_TICK_MS); + this.fastTimer.unref?.(); + } + onModuleDestroy() { + if (this.timer) + clearInterval(this.timer); + if (this.fastTimer) + clearInterval(this.fastTimer); + if (this.kickTimer) + clearTimeout(this.kickTimer); + } + /** + * Something was just queued. Hooks run inside the caller's transaction, so + * wake the outbox a moment later, once it has committed, instead of waiting + * for the next tick. + */ + kickSoon() { + if (this.kickTimer || !this.fastTimer) + return; + this.kickTimer = setTimeout(() => { + this.kickTimer = null; + void this.fastTick(true); + }, 700); + this.kickTimer.unref?.(); + } + /** True when this instance holds (or just took) the lease. */ + async acquireLease() { + const value = JSON.stringify({ owner: this.owner, until: new Date(Date.now() + LEASE_MS).toISOString() }); + await this.prisma.$executeRaw` + INSERT INTO "Setting" ("key", "value", "updatedAt") VALUES (${LEASE_KEY}, ${value}::jsonb, now()) + ON CONFLICT ("key") DO NOTHING`; + const n = await this.prisma.$executeRaw` + UPDATE "Setting" SET "value" = ${value}::jsonb, "updatedAt" = now() + WHERE "key" = ${LEASE_KEY} + AND ("value"->>'owner' = ${this.owner} OR ("value"->>'until')::timestamptz < now())`; + return n > 0; + } + async tick(only) { + if (this.running) + return false; + this.running = true; + try { + if (!await this.acquireLease()) + return false; + const a = await this.config.active(); + if (!a) + return false; + if (!this.recovered.has(a.provider.name)) { + await this.recoverInterrupted(a); + this.recovered.add(a.provider.name); + } + if (only === "outbox") + await this.processOutbox(a); + for (const job of ["balances", "customers", "products"]) { + if (only && only !== job) + continue; + if (!a.config.features[exports2.PULL_FEATURE[job]]) + continue; + const wasForced = this.forced.delete(job); + if (!only && !wasForced && !await this.isDue(job, a)) + continue; + await this.acquireLease(); + await this.runPull(job, a); + } + return true; + } catch (err) { + this.logger.error(`Accounting tick failed: ${err.message}`); + return false; + } finally { + this.running = false; + } + } + /** + * The real-time path, every couple of seconds: send queued documents and + * edits at once, and poll the software's change feed so a balance or a stock + * figure changed there is changed here moments later. Never waits behind a + * long scheduled pull (it has its own guard, apart from tick()). + */ + async fastTick(force = false) { + if (this.fastRunning) + return; + this.fastRunning = true; + try { + if (!await this.acquireLease()) + return; + const a = await this.config.active(); + if (!a) + return; + if (!this.recovered.has(a.provider.name)) { + await this.recoverInterrupted(a); + this.recovered.add(a.provider.name); + } + await this.processOutbox(a); + if (!force && Date.now() - this.lastChangePollAt < CHANGES_POLL_MS) + return; + if (!a.provider.capabilities.changeFeed || !(a.config.features.balances || a.config.features.products)) + return; + this.lastChangePollAt = Date.now(); + await this.pollChanges(a); + } catch (err) { + this.logger.error(`Accounting fast tick failed: ${err.message}`); + } finally { + this.fastRunning = false; + } + } + async pollChanges(a) { + if (this.changes.provider !== a.provider.name) + this.changes = { provider: a.provider.name, cursor: null }; + this.realtime.lastPollAt = (/* @__PURE__ */ new Date()).toISOString(); + try { + const baseline = this.changes.cursor === null; + const r = await this.sync.pollChanges(a, this.changes.cursor); + this.changes.cursor = r.cursor; + this.realtime.lastOkAt = (/* @__PURE__ */ new Date()).toISOString(); + this.realtime.lastError = null; + if (r.balances > 0 || r.stocks > 0) { + this.realtime.lastChangeAt = this.realtime.lastOkAt; + this.realtime.lastSummary = { balances: r.balances, stocks: r.stocks }; + } + if (baseline) + return; + if (r.fullBalances) + this.forced.add("balances"); + if (r.fullProducts) + this.forced.add("products"); + if (r.newAccounts && a.config.features.customers && Date.now() - this.lastForcedCustomersAt > 6e4) { + this.lastForcedCustomersAt = Date.now(); + this.forced.add("customers"); + } + if (this.forced.size > 0) + void this.tick(); + } catch (err) { + const msg = this.sync.describeError(err); + this.realtime.lastError = msg; + if (Date.now() - this.lastChangeWarnAt > 6e4) { + this.lastChangeWarnAt = Date.now(); + this.logger.warn(`Accounting change poll failed: ${msg}`); + } + } + } + /** + * A sync button (plan §12): runs these pulls now and waits for them. Needs + * only a connected provider — the feature switches do not apply. Each job + * reports on its own, so one failing does not hide the others. + */ + async runPullsNow(jobs) { + if (this.running) + return null; + this.running = true; + try { + const a = await this.config.active(); + if (!a) + return null; + const out = {}; + for (const job of jobs) { + await this.acquireLease(); + const startedAt = (/* @__PURE__ */ new Date()).toISOString(); + await this.config.recordJob(job, { lastRunAt: startedAt }); + try { + const summary = job === "customers" ? await this.sync.pullCustomers(a) : job === "balances" ? await this.sync.pullBalances(a) : await this.sync.pullProducts(a); + await this.config.recordJob(job, { lastOkAt: (/* @__PURE__ */ new Date()).toISOString(), lastError: null, summary }); + out[job] = { ok: true, summary }; + } catch (err) { + const error = this.sync.describeError(err); + await this.config.recordJob(job, { lastError: error }); + out[job] = { ok: false, error }; + } + } + return out; + } finally { + this.running = false; + } + } + /** «سینک الان» from the admin screen: runs in the background, returns at once. */ + runNow(job) { + if (job === "outbox") { + if (this.fastRunning) + return false; + void this.fastTick(true); + return true; + } + if (this.running) + return false; + void this.tick(job); + return true; + } + get busy() { + return this.running; + } + async isDue(job, a) { + const minutes = { + customers: a.config.intervals.customersMinutes, + balances: a.config.intervals.balancesMinutes, + products: a.config.intervals.productsMinutes + }[job]; + const state = await this.config.getState(); + const last = state.jobs[job]?.lastRunAt; + return !last || Date.now() - new Date(last).getTime() >= minutes * 6e4; + } + async runPull(job, a) { + const startedAt = (/* @__PURE__ */ new Date()).toISOString(); + await this.config.recordJob(job, { lastRunAt: startedAt }); + try { + const summary = job === "customers" ? await this.sync.pullCustomers(a) : job === "balances" ? await this.sync.pullBalances(a) : await this.sync.pullProducts(a); + await this.config.recordJob(job, { lastOkAt: (/* @__PURE__ */ new Date()).toISOString(), lastError: null, summary }); + } catch (err) { + const msg = this.sync.describeError(err); + this.logger.warn(`Accounting ${job} pull failed: ${msg}`); + await this.config.recordJob(job, { lastError: msg }); + } + } + /** + * A job left in SENDING means the process stopped mid-call: its outcome is + * unknown. Safe kinds go back to the queue; a Zarrin document goes to a + * person, since sending it again could post it twice. + */ + async recoverInterrupted(a) { + const stuck = await this.prisma.accountingOutbox.findMany({ where: { provider: a.provider.name, status: "SENDING" } }); + for (const job of stuck) { + const safe = this.sync.isRetrySafe(a.provider.name, job.kind); + await this.prisma.accountingOutbox.update({ + where: { id: job.id }, + data: safe ? { status: "PENDING", nextAttemptAt: /* @__PURE__ */ new Date() } : { + status: "NEEDS_REVIEW", + lastError: "\u0633\u0631\u0648\u0631 \u0647\u0646\u06AF\u0627\u0645 \u0627\u0631\u0633\u0627\u0644 \u0645\u062A\u0648\u0642\u0641 \u0634\u062F\u061B \u0645\u0639\u0644\u0648\u0645 \u0646\u06CC\u0633\u062A \u0633\u0646\u062F \u062B\u0628\u062A \u0634\u062F\u0647 \u06CC\u0627 \u0646\u0647. \u067E\u06CC\u0634 \u0627\u0632 \xAB\u062A\u0644\u0627\u0634 \u062F\u0648\u0628\u0627\u0631\u0647\xBB \u062F\u0631 \u062D\u0633\u0627\u0628\u062F\u0627\u0631\u06CC \u0628\u0631\u0631\u0633\u06CC \u06A9\u0646\u06CC\u062F." + } + }); + } + } + async processOutbox(a) { + const jobs = await this.prisma.accountingOutbox.findMany({ + where: { provider: a.provider.name, status: "PENDING", nextAttemptAt: { lte: /* @__PURE__ */ new Date() } }, + orderBy: { createdAt: "asc" }, + take: OUTBOX_BATCH + }); + const startedAt = (/* @__PURE__ */ new Date()).toISOString(); + let sent = 0; + let failed = 0; + for (const job of jobs) { + await this.acquireLease(); + const ok = await this.runOne(a, job); + if (ok) + sent += 1; + else + failed += 1; + } + if (jobs.length > 0) { + await this.config.recordJob("outbox", { lastRunAt: startedAt, lastOkAt: (/* @__PURE__ */ new Date()).toISOString(), summary: { picked: jobs.length, sent, failed } }); + } + } + async runOne(a, job) { + const attempts = job.attempts + 1; + await this.prisma.accountingOutbox.update({ where: { id: job.id }, data: { status: "SENDING", attempts } }); + const fresh = { ...job, attempts }; + try { + const res = await this.sync.runJob(a, fresh); + await this.prisma.accountingOutbox.update({ + where: { id: job.id }, + data: { + status: "SENT", + sentAt: /* @__PURE__ */ new Date(), + externalRef: res.externalRef ?? null, + lastRequest: toJson(res.request), + lastResponse: toJson(res.response), + lastError: null + } + }); + return true; + } catch (err) { + const msg = this.sync.describeError(err); + const response = err instanceof providers_1.AccountingProviderError ? err.response : void 0; + let data; + if (err instanceof accounting_sync_service_1.NeedsReviewError || err instanceof providers_1.AccountingNotSupportedError) { + data = { status: "NEEDS_REVIEW", lastError: msg }; + } else if (err instanceof providers_1.AccountingProviderError && err.ambiguous && !this.sync.isRetrySafe(a.provider.name, job.kind)) { + data = { + status: "NEEDS_REVIEW", + lastError: `${msg} \u2014 \u0645\u0645\u06A9\u0646 \u0627\u0633\u062A \u0633\u0646\u062F \u062B\u0628\u062A \u0634\u062F\u0647 \u0628\u0627\u0634\u062F\u061B \u067E\u06CC\u0634 \u0627\u0632 \xAB\u062A\u0644\u0627\u0634 \u062F\u0648\u0628\u0627\u0631\u0647\xBB \u062F\u0631 \u062D\u0633\u0627\u0628\u062F\u0627\u0631\u06CC \u0628\u0631\u0631\u0633\u06CC \u06A9\u0646\u06CC\u062F.` + }; + } else if (attempts >= MAX_ATTEMPTS) { + data = { status: "FAILED", lastError: msg }; + } else { + const delayMin = Math.min(2 ** (attempts - 1), 60); + data = { status: "PENDING", lastError: msg, nextAttemptAt: new Date(Date.now() + delayMin * 6e4) }; + } + if (response !== void 0) + data.lastResponse = toJson(response); + await this.prisma.accountingOutbox.update({ where: { id: job.id }, data }); + this.logger.warn(`Accounting job ${job.kind} ${job.entityId} \u2192 ${String(data.status)}: ${msg}`); + return false; + } + } + }; + exports2.AccountingWorkerService = AccountingWorkerService; + exports2.AccountingWorkerService = AccountingWorkerService = __decorate4([ + (0, common_12.Injectable)(), + __metadata3("design:paramtypes", [ + prisma_service_1.PrismaService, + accounting_config_service_1.AccountingConfigService, + accounting_sync_service_1.AccountingSyncService + ]) + ], AccountingWorkerService); + } +}); + +// dist/modules/accounting-sync/accounting-hooks.service.js +var require_accounting_hooks_service = __commonJS({ + "dist/modules/accounting-sync/accounting-hooks.service.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountingHooksService = void 0; + var common_12 = require_common(); + var client_1 = require("@prisma/client"); + var prisma_service_1 = require_prisma_service(); + var accounting_config_service_1 = require_accounting_config_service(); + var accounting_config_1 = require_accounting_config(); + var accounting_sync_service_1 = require_accounting_sync_service(); + var accounting_worker_service_1 = require_accounting_worker_service(); + var providers_1 = require_providers(); + var OPEN = ["PENDING", "SENDING"]; + var AccountingHooksService = class AccountingHooksService { + prisma; + config; + sync; + worker; + constructor(prisma, config, sync, worker) { + this.prisma = prisma; + this.config = config; + this.sync = sync; + this.worker = worker; + } + async enqueue(tx, feature, kind, entityId) { + const c = await this.config.get(); + if (c.provider === "none" || !c.features[feature]) + return false; + const open = await tx.accountingOutbox.findFirst({ + where: { provider: c.provider, kind, entityId, status: { in: OPEN } }, + select: { id: true } + }); + if (open) + return false; + await tx.accountingOutbox.create({ data: { provider: c.provider, kind, entityId } }); + this.worker.kickSoon(); + return true; + } + /** + * F3 — the order is now in `status` (created, advanced, or rolled back). + * The owner's rule (`documents.triggerStatus`, «اتصال حسابداری») says from + * which status on the temporary document (پیش‌فاکتور) belongs in the books: + * at or past it the document is queued once; back below it, a document + * already sent is withdrawn like a cancellation. + */ + async orderStatusReached(tx, orderId, status) { + const c = await this.config.get(); + if (c.provider === "none" || !c.features.documents) + return; + const rank = (0, accounting_config_1.documentStatusRank)(status); + if (!rank) + return; + if (rank >= (0, accounting_config_1.documentStatusRank)(c.documents.triggerStatus)) + await this.queueOrderDocument(tx, c.provider, orderId); + else + await this.orderCancelled(tx, orderId); + } + async queueOrderDocument(tx, provider, orderId) { + const existing = await tx.accountingOutbox.findFirst({ + where: { provider, kind: "ORDER_DOCUMENT", entityId: orderId, status: { notIn: ["RESOLVED"] } }, + select: { id: true } + }); + if (existing) { + const deleting = await tx.accountingOutbox.findFirst({ + where: { provider, kind: "ORDER_DOCUMENT_DELETE", entityId: orderId, status: { in: ["PENDING", "SENDING"] } }, + select: { id: true } + }); + if (!(provider === "tahesab" && deleting)) + return; + } + await this.enqueue(tx, "documents", "ORDER_DOCUMENT", orderId); + } + /** + * F3 — the order was cancelled. A document still waiting is simply dropped; + * one that may already be in the books gets a delete job, which itself only + * deletes a document that is still temporary (worker). + */ + async orderCancelled(tx, orderId) { + const docs = await tx.accountingOutbox.findMany({ + where: { kind: "ORDER_DOCUMENT", entityId: orderId, status: { not: "RESOLVED" } } + }); + for (const doc of docs) { + if (doc.status === "PENDING") { + await tx.accountingOutbox.update({ + where: { id: doc.id }, + data: { status: "RESOLVED", lastError: "\u0633\u0641\u0627\u0631\u0634 \u067E\u06CC\u0634 \u0627\u0632 \u0627\u0631\u0633\u0627\u0644 \u0633\u0646\u062F \u0644\u063A\u0648 \u0634\u062F" } + }); + continue; + } + const open = await tx.accountingOutbox.findFirst({ + where: { provider: doc.provider, kind: "ORDER_DOCUMENT_DELETE", entityId: orderId, status: { not: "RESOLVED" } }, + select: { id: true } + }); + if (!open) { + await tx.accountingOutbox.create({ + data: { provider: doc.provider, kind: "ORDER_DOCUMENT_DELETE", entityId: orderId } + }); + } + } + } + /** F1 — an admin marked the customer VERIFIED. */ + async customerVerified(tx, customerId) { + await this.enqueue(tx, "customers", "CUSTOMER_PUSH", customerId); + } + /** F1 — a linked customer's contact details changed. */ + async customerEdited(tx, customerId) { + const c = await this.config.get(); + if (c.provider === "none" || !c.features.customers) + return; + const link = await tx.accountingLink.findUnique({ + where: { provider_entityType_entityId: { provider: c.provider, entityType: "CUSTOMER", entityId: customerId } }, + select: { id: true } + }); + if (link) + await this.enqueue(tx, "customers", "CUSTOMER_PUSH", customerId); + } + /** F4 — a product was created in the admin panel. */ + async productCreated(tx, productId) { + const c = await this.config.get(); + if (c.provider === "none" || !providers_1.ACCOUNTING_PROVIDERS[c.provider].capabilities.createKarSakhte) + return; + await this.enqueue(tx, "products", "PRODUCT_PUSH", productId); + } + /** + * F4 — title and code of a linked product belong to the accounting software + * (D27); the admin form locks them. Null when the product is not linked. + */ + async productLink(productId) { + const c = await this.config.get(); + if (c.provider === "none" || !c.features.products) + return null; + return this.prisma.accountingLink.findUnique({ + where: { provider_entityType_entityId: { provider: c.provider, entityType: client_1.AccountingEntityType.PRODUCT, entityId: productId } } + }); + } + /** + * Order time: the product with its stock read live from the accounting + * software, or as last stored when that cannot answer in a moment. + */ + liveStock(product) { + return this.sync.liveStock(product); + } + /** + * F4 — is this product out of stock in the accounting software? Only + * meaningful while the product sync is on; stock fields of products that are + * not linked under the active provider are cleared by every product pull. + */ + async stockBlocked(product) { + if (!product.accountingStockAt) + return false; + const c = await this.config.get(); + if (c.provider === "none" || !c.features.products) + return false; + const stock = product.accountingStockWeight ?? product.accountingStockCount; + return stock !== null && new client_1.Prisma.Decimal(stock).lte(0); + } + }; + exports2.AccountingHooksService = AccountingHooksService; + exports2.AccountingHooksService = AccountingHooksService = __decorate4([ + (0, common_12.Injectable)(), + __metadata3("design:paramtypes", [ + prisma_service_1.PrismaService, + accounting_config_service_1.AccountingConfigService, + accounting_sync_service_1.AccountingSyncService, + accounting_worker_service_1.AccountingWorkerService + ]) + ], AccountingHooksService); + } +}); + +// dist/modules/catalog/catalog.service.js +var require_catalog_service = __commonJS({ + "dist/modules/catalog/catalog.service.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CatalogService = void 0; + var common_12 = require_common(); + var prisma_service_1 = require_prisma_service(); + var accounting_hooks_service_1 = require_accounting_hooks_service(); + var CatalogService = class CatalogService { + prisma; + accounting; + constructor(prisma, accounting) { + this.prisma = prisma; + this.accounting = accounting; + } + async listProducts() { + const products = await this.prisma.product.findMany({ + // D27 — a product with no image is never shown in the app. Products now + // also arrive from the accounting software, which carries no pictures; + // they appear once an admin photographs them. + where: { isActive: true, images: { some: {} } }, + include: { + // Only orderable variants reach the storefront. An inactive one used to + // be listed and then rejected by getVariantOrThrow at checkout, so the + // customer could pick a chip and get a 404 on the order. + variants: { + where: { isActive: true }, + // Each variant carries its own gallery picture, so the app can render + // the chip without a second request per variant. + include: { image: true } + }, + // Explicit order: the UI treats images[0] as the product's main photo, + // which is only meaningful if the rows come back sorted. + images: { orderBy: { sortOrder: "asc" } }, + category: true, + brand: true, + collections: { include: { collection: true } } + } + }); + const out = []; + for (const p of products) { + const { accountingStockWeight, accountingStockCount, accountingStockAt, ...product } = p; + const blocked = await this.accounting.stockBlocked({ accountingStockWeight, accountingStockCount, accountingStockAt }); + out.push(blocked ? { ...product, variants: product.variants.map((v) => v.isPreOrder ? v : { ...v, qty: 0 }) } : product); + } + return out; + } + async getVariantOrThrow(variantId) { + const variant = await this.prisma.productVariant.findUnique({ + where: { id: variantId }, + include: { + product: { + select: { + id: true, + accountingStockWeight: true, + accountingStockCount: true, + accountingStockAt: true, + _count: { select: { images: true } } + } + } + } + }); + if (!variant || !variant.isActive) { + throw new common_12.NotFoundException(`Product variant ${variantId} not found or inactive`); + } + if (variant.product._count.images === 0) { + throw new common_12.BadRequestException("\u0627\u06CC\u0646 \u0645\u062D\u0635\u0648\u0644 \u0647\u0646\u0648\u0632 \u062A\u0635\u0648\u06CC\u0631 \u0646\u062F\u0627\u0631\u062F \u0648 \u0642\u0627\u0628\u0644 \u0633\u0641\u0627\u0631\u0634 \u0646\u06CC\u0633\u062A"); + } + if (!variant.isPreOrder && await this.accounting.stockBlocked(await this.accounting.liveStock(variant.product))) { + throw new common_12.BadRequestException("\u0627\u06CC\u0646 \u0645\u062D\u0635\u0648\u0644 \u062F\u0631 \u0627\u0646\u0628\u0627\u0631 \u0645\u0648\u062C\u0648\u062F \u0646\u06CC\u0633\u062A"); + } + const { product: _product, ...plain } = variant; + return plain; + } + }; + exports2.CatalogService = CatalogService; + exports2.CatalogService = CatalogService = __decorate4([ + (0, common_12.Injectable)(), + __metadata3("design:paramtypes", [ + prisma_service_1.PrismaService, + accounting_hooks_service_1.AccountingHooksService + ]) + ], CatalogService); + } +}); + +// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/abstract.strategy.js +var require_abstract_strategy = __commonJS({ + "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/abstract.strategy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AbstractStrategy = void 0; + var AbstractStrategy = class { + }; + exports2.AbstractStrategy = AbstractStrategy; + } +}); + +// ../../node_modules/.pnpm/pause@0.0.1/node_modules/pause/index.js +var require_pause = __commonJS({ + "../../node_modules/.pnpm/pause@0.0.1/node_modules/pause/index.js"(exports2, module2) { + module2.exports = function(obj2) { + var onData, onEnd, events = []; + obj2.on("data", onData = function(data, encoding) { + events.push(["data", data, encoding]); + }); + obj2.on("end", onEnd = function(data, encoding) { + events.push(["end", data, encoding]); + }); + return { + end: function() { + obj2.removeListener("data", onData); + obj2.removeListener("end", onEnd); + }, + resume: function() { + this.end(); + for (var i = 0, len = events.length; i < len; ++i) { + obj2.emit.apply(obj2, events[i]); + } + } + }; + }; + } +}); + +// ../../node_modules/.pnpm/passport-strategy@1.0.0/node_modules/passport-strategy/lib/strategy.js +var require_strategy = __commonJS({ + "../../node_modules/.pnpm/passport-strategy@1.0.0/node_modules/passport-strategy/lib/strategy.js"(exports2, module2) { + function Strategy() { + } + Strategy.prototype.authenticate = function(req, options) { + throw new Error("Strategy#authenticate must be overridden by subclass"); + }; + module2.exports = Strategy; + } +}); + +// ../../node_modules/.pnpm/passport-strategy@1.0.0/node_modules/passport-strategy/lib/index.js +var require_lib6 = __commonJS({ + "../../node_modules/.pnpm/passport-strategy@1.0.0/node_modules/passport-strategy/lib/index.js"(exports2, module2) { + var Strategy = require_strategy(); + exports2 = module2.exports = Strategy; + exports2.Strategy = Strategy; + } +}); + +// ../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/strategies/session.js +var require_session = __commonJS({ + "../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/strategies/session.js"(exports2, module2) { + var pause = require_pause(); + var util2 = require("util"); + var Strategy = require_lib6(); + function SessionStrategy(options, deserializeUser) { + if (typeof options == "function") { + deserializeUser = options; + options = void 0; + } + options = options || {}; + Strategy.call(this); + this.name = "session"; + this._key = options.key || "passport"; + this._deserializeUser = deserializeUser; + } + util2.inherits(SessionStrategy, Strategy); + SessionStrategy.prototype.authenticate = function(req, options) { + if (!req.session) { + return this.error(new Error("Login sessions require session support. Did you forget to use `express-session` middleware?")); + } + options = options || {}; + var self2 = this, su; + if (req.session[this._key]) { + su = req.session[this._key].user; + } + if (su || su === 0) { + var paused = options.pauseStream ? pause(req) : null; + this._deserializeUser(su, req, function(err, user) { + if (err) { + return self2.error(err); + } + if (!user) { + delete req.session[self2._key].user; + } else { + var property = req._userProperty || "user"; + req[property] = user; + } + self2.pass(); + if (paused) { + paused.resume(); + } + }); + } else { + self2.pass(); + } + }; + module2.exports = SessionStrategy; + } +}); + +// ../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/sessionmanager.js +var require_sessionmanager = __commonJS({ + "../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/sessionmanager.js"(exports2, module2) { + var merge = require_utils_merge(); + function SessionManager(options, serializeUser) { + if (typeof options == "function") { + serializeUser = options; + options = void 0; + } + options = options || {}; + this._key = options.key || "passport"; + this._serializeUser = serializeUser; + } + SessionManager.prototype.logIn = function(req, user, options, cb) { + if (typeof options == "function") { + cb = options; + options = {}; + } + options = options || {}; + if (!req.session) { + return cb(new Error("Login sessions require session support. Did you forget to use `express-session` middleware?")); + } + var self2 = this; + var prevSession = req.session; + req.session.regenerate(function(err) { + if (err) { + return cb(err); + } + self2._serializeUser(user, req, function(err2, obj2) { + if (err2) { + return cb(err2); + } + if (options.keepSessionInfo) { + merge(req.session, prevSession); + } + if (!req.session[self2._key]) { + req.session[self2._key] = {}; + } + req.session[self2._key].user = obj2; + req.session.save(function(err3) { + if (err3) { + return cb(err3); + } + cb(); + }); + }); + }); + }; + SessionManager.prototype.logOut = function(req, options, cb) { + if (typeof options == "function") { + cb = options; + options = {}; + } + options = options || {}; + if (!req.session) { + return cb(new Error("Login sessions require session support. Did you forget to use `express-session` middleware?")); + } + var self2 = this; + if (req.session[this._key]) { + delete req.session[this._key].user; + } + var prevSession = req.session; + req.session.save(function(err) { + if (err) { + return cb(err); + } + req.session.regenerate(function(err2) { + if (err2) { + return cb(err2); + } + if (options.keepSessionInfo) { + merge(req.session, prevSession); + } + cb(); + }); + }); + }; + module2.exports = SessionManager; + } +}); + +// ../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/http/request.js +var require_request3 = __commonJS({ + "../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/http/request.js"(exports2, module2) { + var req = exports2 = module2.exports = {}; + req.login = req.logIn = function(user, options, done) { + if (typeof options == "function") { + done = options; + options = {}; + } + options = options || {}; + var property = this._userProperty || "user"; + var session = options.session === void 0 ? true : options.session; + this[property] = user; + if (session && this._sessionManager) { + if (typeof done != "function") { + throw new Error("req#login requires a callback function"); + } + var self2 = this; + this._sessionManager.logIn(this, user, options, function(err) { + if (err) { + self2[property] = null; + return done(err); + } + done(); + }); + } else { + done && done(); + } + }; + req.logout = req.logOut = function(options, done) { + if (typeof options == "function") { + done = options; + options = {}; + } + options = options || {}; + var property = this._userProperty || "user"; + this[property] = null; + if (this._sessionManager) { + if (typeof done != "function") { + throw new Error("req#logout requires a callback function"); + } + this._sessionManager.logOut(this, options, done); + } else { + done && done(); + } + }; + req.isAuthenticated = function() { + var property = this._userProperty || "user"; + return this[property] ? true : false; + }; + req.isUnauthenticated = function() { + return !this.isAuthenticated(); + }; + } +}); + +// ../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/middleware/initialize.js +var require_initialize = __commonJS({ + "../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/middleware/initialize.js"(exports2, module2) { + var IncomingMessageExt = require_request3(); + module2.exports = function initialize(passport, options) { + options = options || {}; + return function initialize2(req, res, next) { + req.login = req.logIn = req.logIn || IncomingMessageExt.logIn; + req.logout = req.logOut = req.logOut || IncomingMessageExt.logOut; + req.isAuthenticated = req.isAuthenticated || IncomingMessageExt.isAuthenticated; + req.isUnauthenticated = req.isUnauthenticated || IncomingMessageExt.isUnauthenticated; + req._sessionManager = passport._sm; + if (options.userProperty) { + req._userProperty = options.userProperty; + } + var compat = options.compat === void 0 ? true : options.compat; + if (compat) { + passport._userProperty = options.userProperty || "user"; + req._passport = {}; + req._passport.instance = passport; + } + next(); + }; + }; + } +}); + +// ../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/errors/authenticationerror.js +var require_authenticationerror = __commonJS({ + "../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/errors/authenticationerror.js"(exports2, module2) { + function AuthenticationError(message, status) { + Error.call(this); + Error.captureStackTrace(this, arguments.callee); + this.name = "AuthenticationError"; + this.message = message; + this.status = status || 401; + } + AuthenticationError.prototype.__proto__ = Error.prototype; + module2.exports = AuthenticationError; + } +}); + +// ../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/middleware/authenticate.js +var require_authenticate = __commonJS({ + "../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/middleware/authenticate.js"(exports2, module2) { + var http = require("http"); + var IncomingMessageExt = require_request3(); + var AuthenticationError = require_authenticationerror(); + module2.exports = function authenticate(passport, name, options, callback) { + if (typeof options == "function") { + callback = options; + options = {}; + } + options = options || {}; + var multi = true; + if (!Array.isArray(name)) { + name = [name]; + multi = false; + } + return function authenticate2(req, res, next) { + req.login = req.logIn = req.logIn || IncomingMessageExt.logIn; + req.logout = req.logOut = req.logOut || IncomingMessageExt.logOut; + req.isAuthenticated = req.isAuthenticated || IncomingMessageExt.isAuthenticated; + req.isUnauthenticated = req.isUnauthenticated || IncomingMessageExt.isUnauthenticated; + req._sessionManager = passport._sm; + var failures = []; + function allFailed() { + if (callback) { + if (!multi) { + return callback(null, false, failures[0].challenge, failures[0].status); + } else { + var challenges = failures.map(function(f) { + return f.challenge; + }); + var statuses = failures.map(function(f) { + return f.status; + }); + return callback(null, false, challenges, statuses); + } + } + var failure = failures[0] || {}, challenge = failure.challenge || {}, msg; + if (options.failureFlash) { + var flash = options.failureFlash; + if (typeof flash == "string") { + flash = { type: "error", message: flash }; + } + flash.type = flash.type || "error"; + var type = flash.type || challenge.type || "error"; + msg = flash.message || challenge.message || challenge; + if (typeof msg == "string") { + req.flash(type, msg); + } + } + if (options.failureMessage) { + msg = options.failureMessage; + if (typeof msg == "boolean") { + msg = challenge.message || challenge; + } + if (typeof msg == "string") { + req.session.messages = req.session.messages || []; + req.session.messages.push(msg); + } + } + if (options.failureRedirect) { + return res.redirect(options.failureRedirect); + } + var rchallenge = [], rstatus, status; + for (var j = 0, len = failures.length; j < len; j++) { + failure = failures[j]; + challenge = failure.challenge; + status = failure.status; + rstatus = rstatus || status; + if (typeof challenge == "string") { + rchallenge.push(challenge); + } + } + res.statusCode = rstatus || 401; + if (res.statusCode == 401 && rchallenge.length) { + res.setHeader("WWW-Authenticate", rchallenge); + } + if (options.failWithError) { + return next(new AuthenticationError(http.STATUS_CODES[res.statusCode], rstatus)); + } + res.end(http.STATUS_CODES[res.statusCode]); + } + (function attempt(i) { + var layer = name[i]; + if (!layer) { + return allFailed(); + } + var strategy, prototype; + if (typeof layer.authenticate == "function") { + strategy = layer; + } else { + prototype = passport._strategy(layer); + if (!prototype) { + return next(new Error('Unknown authentication strategy "' + layer + '"')); + } + strategy = Object.create(prototype); + } + strategy.success = function(user, info) { + if (callback) { + return callback(null, user, info); + } + info = info || {}; + var msg; + if (options.successFlash) { + var flash = options.successFlash; + if (typeof flash == "string") { + flash = { type: "success", message: flash }; + } + flash.type = flash.type || "success"; + var type = flash.type || info.type || "success"; + msg = flash.message || info.message || info; + if (typeof msg == "string") { + req.flash(type, msg); + } + } + if (options.successMessage) { + msg = options.successMessage; + if (typeof msg == "boolean") { + msg = info.message || info; + } + if (typeof msg == "string") { + req.session.messages = req.session.messages || []; + req.session.messages.push(msg); + } + } + if (options.assignProperty) { + req[options.assignProperty] = user; + if (options.authInfo !== false) { + passport.transformAuthInfo(info, req, function(err, tinfo) { + if (err) { + return next(err); + } + req.authInfo = tinfo; + next(); + }); + } else { + next(); + } + return; + } + req.logIn(user, options, function(err) { + if (err) { + return next(err); + } + function complete() { + if (options.successReturnToOrRedirect) { + var url = options.successReturnToOrRedirect; + if (req.session && req.session.returnTo) { + url = req.session.returnTo; + delete req.session.returnTo; + } + return res.redirect(url); + } + if (options.successRedirect) { + return res.redirect(options.successRedirect); + } + next(); + } + if (options.authInfo !== false) { + passport.transformAuthInfo(info, req, function(err2, tinfo) { + if (err2) { + return next(err2); + } + req.authInfo = tinfo; + complete(); + }); + } else { + complete(); + } + }); + }; + strategy.fail = function(challenge, status) { + if (typeof challenge == "number") { + status = challenge; + challenge = void 0; + } + failures.push({ challenge, status }); + attempt(i + 1); + }; + strategy.redirect = function(url, status) { + res.statusCode = status || 302; + res.setHeader("Location", url); + res.setHeader("Content-Length", "0"); + res.end(); + }; + strategy.pass = function() { + next(); + }; + strategy.error = function(err) { + if (callback) { + return callback(err); + } + next(err); + }; + strategy.authenticate(req, options); + })(0); + }; + }; + } +}); + +// ../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/framework/connect.js +var require_connect2 = __commonJS({ + "../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/framework/connect.js"(exports2, module2) { + var initialize = require_initialize(); + var authenticate = require_authenticate(); + exports2 = module2.exports = function() { + return { + initialize, + authenticate + }; + }; + } +}); + +// ../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/authenticator.js +var require_authenticator = __commonJS({ + "../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/authenticator.js"(exports2, module2) { + var SessionStrategy = require_session(); + var SessionManager = require_sessionmanager(); + function Authenticator() { + this._key = "passport"; + this._strategies = {}; + this._serializers = []; + this._deserializers = []; + this._infoTransformers = []; + this._framework = null; + this.init(); + } + Authenticator.prototype.init = function() { + this.framework(require_connect2()()); + this.use(new SessionStrategy({ key: this._key }, this.deserializeUser.bind(this))); + this._sm = new SessionManager({ key: this._key }, this.serializeUser.bind(this)); + }; + Authenticator.prototype.use = function(name, strategy) { + if (!strategy) { + strategy = name; + name = strategy.name; + } + if (!name) { + throw new Error("Authentication strategies must have a name"); + } + this._strategies[name] = strategy; + return this; + }; + Authenticator.prototype.unuse = function(name) { + delete this._strategies[name]; + return this; + }; + Authenticator.prototype.framework = function(fw) { + this._framework = fw; + return this; + }; + Authenticator.prototype.initialize = function(options) { + options = options || {}; + return this._framework.initialize(this, options); + }; + Authenticator.prototype.authenticate = function(strategy, options, callback) { + return this._framework.authenticate(this, strategy, options, callback); + }; + Authenticator.prototype.authorize = function(strategy, options, callback) { + options = options || {}; + options.assignProperty = "account"; + var fn = this._framework.authorize || this._framework.authenticate; + return fn(this, strategy, options, callback); + }; + Authenticator.prototype.session = function(options) { + return this.authenticate("session", options); + }; + Authenticator.prototype.serializeUser = function(fn, req, done) { + if (typeof fn === "function") { + return this._serializers.push(fn); + } + var user = fn; + if (typeof req === "function") { + done = req; + req = void 0; + } + var stack = this._serializers; + (function pass(i, err, obj2) { + if ("pass" === err) { + err = void 0; + } + if (err || obj2 || obj2 === 0) { + return done(err, obj2); + } + var layer = stack[i]; + if (!layer) { + return done(new Error("Failed to serialize user into session")); + } + function serialized(e, o) { + pass(i + 1, e, o); + } + try { + var arity = layer.length; + if (arity == 3) { + layer(req, user, serialized); + } else { + layer(user, serialized); + } + } catch (e) { + return done(e); + } + })(0); + }; + Authenticator.prototype.deserializeUser = function(fn, req, done) { + if (typeof fn === "function") { + return this._deserializers.push(fn); + } + var obj2 = fn; + if (typeof req === "function") { + done = req; + req = void 0; + } + var stack = this._deserializers; + (function pass(i, err, user) { + if ("pass" === err) { + err = void 0; + } + if (err || user) { + return done(err, user); + } + if (user === null || user === false) { + return done(null, false); + } + var layer = stack[i]; + if (!layer) { + return done(new Error("Failed to deserialize user out of session")); + } + function deserialized(e, u) { + pass(i + 1, e, u); + } + try { + var arity = layer.length; + if (arity == 3) { + layer(req, obj2, deserialized); + } else { + layer(obj2, deserialized); + } + } catch (e) { + return done(e); + } + })(0); + }; + Authenticator.prototype.transformAuthInfo = function(fn, req, done) { + if (typeof fn === "function") { + return this._infoTransformers.push(fn); + } + var info = fn; + if (typeof req === "function") { + done = req; + req = void 0; + } + var stack = this._infoTransformers; + (function pass(i, err, tinfo) { + if ("pass" === err) { + err = void 0; + } + if (err || tinfo) { + return done(err, tinfo); + } + var layer = stack[i]; + if (!layer) { + return done(null, info); + } + function transformed(e, t2) { + pass(i + 1, e, t2); + } + try { + var arity = layer.length; + if (arity == 1) { + var t = layer(info); + transformed(null, t); + } else if (arity == 3) { + layer(req, info, transformed); + } else { + layer(info, transformed); + } + } catch (e) { + return done(e); + } + })(0); + }; + Authenticator.prototype._strategy = function(name) { + return this._strategies[name]; + }; + module2.exports = Authenticator; + } +}); + +// ../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/index.js +var require_lib7 = __commonJS({ + "../../node_modules/.pnpm/passport@0.7.0/node_modules/passport/lib/index.js"(exports2, module2) { + var Passport = require_authenticator(); + var SessionStrategy = require_session(); + exports2 = module2.exports = new Passport(); + exports2.Passport = exports2.Authenticator = Passport; + exports2.Strategy = require_lib6(); + exports2.strategies = {}; + exports2.strategies.SessionStrategy = SessionStrategy; + } +}); + +// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/interfaces/auth-module.options.js +var require_auth_module_options = __commonJS({ + "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/interfaces/auth-module.options.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AuthModuleOptions = void 0; + var AuthModuleOptions = class { + }; + exports2.AuthModuleOptions = AuthModuleOptions; + } +}); + +// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/options.js +var require_options = __commonJS({ + "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/options.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.defaultOptions = void 0; + exports2.defaultOptions = { + session: false, + property: "user" + }; + } +}); + +// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/utils/memoize.util.js +var require_memoize_util = __commonJS({ + "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/utils/memoize.util.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.memoize = void 0; + var defaultKey = "default"; + function memoize(fn) { + const cache = {}; + return (...args) => { + const n = args[0] || defaultKey; + if (n in cache) { + return cache[n]; + } else { + const result = fn(n === defaultKey ? void 0 : n); + cache[n] = result; + return result; + } + }; + } + exports2.memoize = memoize; + } +}); + +// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/auth.guard.js +var require_auth_guard = __commonJS({ + "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/auth.guard.js"(exports2) { "use strict"; var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; @@ -84663,45 +82157,4937 @@ var require_auth_controller = __commonJS({ }; }; Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AuthController = void 0; + exports2.AuthGuard = void 0; var common_12 = require_common(); - var auth_service_1 = require_auth_service(); - var login_dto_1 = require_login_dto(); - var guards_1 = require_guards2(); - var AuthController = class AuthController { - authService; - constructor(authService) { - this.authService = authService; + var passport = require_lib7(); + var auth_module_options_1 = require_auth_module_options(); + var options_1 = require_options(); + var memoize_util_1 = require_memoize_util(); + exports2.AuthGuard = (0, memoize_util_1.memoize)(createAuthGuard); + var NO_STRATEGY_ERROR = `In order to use "defaultStrategy", please, ensure to import PassportModule in each place where AuthGuard() is being used. Otherwise, passport won't work correctly.`; + var authLogger = new common_12.Logger("AuthGuard"); + function createAuthGuard(type) { + let MixinAuthGuard = class MixinAuthGuard { + constructor(options) { + this.options = {}; + this.options = options ?? this.options; + if (!type && !this.options.defaultStrategy) { + authLogger.error(NO_STRATEGY_ERROR); + } + } + async canActivate(context) { + const options = { + ...options_1.defaultOptions, + ...this.options, + ...await this.getAuthenticateOptions(context) + }; + const [request, response] = [ + this.getRequest(context), + this.getResponse(context) + ]; + const passportFn = createPassportContext(request, response); + const user = await passportFn(type || this.options.defaultStrategy, options, (err, user2, info, status) => this.handleRequest(err, user2, info, context, status)); + request[options.property || options_1.defaultOptions.property] = user; + return true; + } + getRequest(context) { + return context.switchToHttp().getRequest(); + } + getResponse(context) { + return context.switchToHttp().getResponse(); + } + async logIn(request) { + const user = request[this.options.property || options_1.defaultOptions.property]; + await new Promise((resolve, reject) => request.logIn(user, this.options, (err) => err ? reject(err) : resolve())); + } + handleRequest(err, user, info, context, status) { + if (err || !user) { + throw err || new common_12.UnauthorizedException(); + } + return user; + } + getAuthenticateOptions(context) { + return void 0; + } + }; + __decorate4([ + (0, common_12.Optional)(), + (0, common_12.Inject)(auth_module_options_1.AuthModuleOptions), + __metadata3("design:type", auth_module_options_1.AuthModuleOptions) + ], MixinAuthGuard.prototype, "options", void 0); + MixinAuthGuard = __decorate4([ + __param3(0, (0, common_12.Optional)()), + __metadata3("design:paramtypes", [auth_module_options_1.AuthModuleOptions]) + ], MixinAuthGuard); + const guard = (0, common_12.mixin)(MixinAuthGuard); + return guard; + } + var createPassportContext = (request, response) => (type, options, callback) => new Promise((resolve, reject) => passport.authenticate(type, options, (err, user, info, status) => { + try { + request.authInfo = info; + return resolve(callback(err, user, info, status)); + } catch (err2) { + reject(err2); } - login(dto) { - return this.authService.login(dto); + })(request, response, (err) => err ? reject(err) : resolve())); + } +}); + +// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/interfaces/type.interface.js +var require_type_interface2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/interfaces/type.interface.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + } +}); + +// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/interfaces/index.js +var require_interfaces7 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/interfaces/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; } - /** Legacy `users/show` — the router guard's permission refresh. */ - me(admin) { - return this.authService.showData(admin.id); + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar2(require_auth_module_options(), exports2); + __exportStar2(require_type_interface2(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/passport.module.js +var require_passport_module = __commonJS({ + "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/passport.module.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var PassportModule_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PassportModule = void 0; + var common_12 = require_common(); + var auth_module_options_1 = require_auth_module_options(); + var PassportModule = exports2.PassportModule = PassportModule_1 = class PassportModule { + static register(options) { + return { + module: PassportModule_1, + providers: [{ provide: auth_module_options_1.AuthModuleOptions, useValue: options }], + exports: [auth_module_options_1.AuthModuleOptions] + }; + } + static registerAsync(options) { + return { + module: PassportModule_1, + imports: options.imports || [], + providers: this.createAsyncProviders(options), + exports: [auth_module_options_1.AuthModuleOptions] + }; + } + static createAsyncProviders(options) { + if (options.useExisting || options.useFactory) { + return [this.createAsyncOptionsProvider(options)]; + } + return [ + this.createAsyncOptionsProvider(options), + { + provide: options.useClass, + useClass: options.useClass + } + ]; + } + static createAsyncOptionsProvider(options) { + if (options.useFactory) { + return { + provide: auth_module_options_1.AuthModuleOptions, + useFactory: options.useFactory, + inject: options.inject || [] + }; + } + return { + provide: auth_module_options_1.AuthModuleOptions, + useFactory: async (optionsFactory) => await optionsFactory.createAuthOptions(), + inject: [options.useExisting || options.useClass] + }; } }; - exports2.AuthController = AuthController; + exports2.PassportModule = PassportModule = PassportModule_1 = __decorate4([ + (0, common_12.Module)({}) + ], PassportModule); + } +}); + +// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/passport/passport.serializer.js +var require_passport_serializer = __commonJS({ + "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/passport/passport.serializer.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PassportSerializer = void 0; + var passport = require_lib7(); + var PassportSerializer = class { + constructor() { + const passportInstance = this.getPassportInstance(); + passportInstance.serializeUser((user, done) => this.serializeUser(user, done)); + passportInstance.deserializeUser((payload, done) => this.deserializeUser(payload, done)); + } + getPassportInstance() { + return passport; + } + }; + exports2.PassportSerializer = PassportSerializer; + } +}); + +// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/passport/passport.strategy.js +var require_passport_strategy = __commonJS({ + "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/passport/passport.strategy.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PassportStrategy = void 0; + var passport = require_lib7(); + function PassportStrategy(Strategy, name, callbackArity) { + class MixinStrategy extends Strategy { + constructor(...args) { + const callback = async (...params) => { + const done = params[params.length - 1]; + try { + const validateResult = await this.validate(...params); + if (Array.isArray(validateResult)) { + done(null, ...validateResult); + } else { + done(null, validateResult); + } + } catch (err) { + done(err, null); + } + }; + if (callbackArity !== void 0) { + const validate2 = new.target?.prototype?.validate; + const arity = callbackArity === true ? validate2.length + 1 : callbackArity; + if (validate2) { + Object.defineProperty(callback, "length", { + value: arity + }); + } + } + super(...args, callback); + const passportInstance = this.getPassportInstance(); + if (name) { + passportInstance.use(name, this); + } else { + passportInstance.use(this); + } + } + getPassportInstance() { + return passport; + } + } + return MixinStrategy; + } + exports2.PassportStrategy = PassportStrategy; + } +}); + +// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/index.js +var require_dist2 = __commonJS({ + "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/dist/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + __exportStar2(require_abstract_strategy(), exports2); + __exportStar2(require_auth_guard(), exports2); + __exportStar2(require_interfaces7(), exports2); + __exportStar2(require_passport_module(), exports2); + __exportStar2(require_passport_serializer(), exports2); + __exportStar2(require_passport_strategy(), exports2); + } +}); + +// ../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/index.js +var require_passport = __commonJS({ + "../../node_modules/.pnpm/@nestjs+passport@10.0.3_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_ia6i3gv5hfockxefxn2psg2dxa/node_modules/@nestjs/passport/index.js"(exports2) { + "use strict"; + function __export2(m) { + for (var p in m) if (!exports2.hasOwnProperty(p)) exports2[p] = m[p]; + } + exports2.__esModule = true; + __export2(require_dist2()); + } +}); + +// dist/modules/auth/guards.js +var require_guards2 = __commonJS({ + "dist/modules/auth/guards.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PermissionsGuard = exports2.JwtAuthGuard = exports2.CurrentAdmin = exports2.RequirePermission = exports2.REQUIRED_RID_KEY = exports2.Public = exports2.IS_PUBLIC_KEY = void 0; + var common_12 = require_common(); + var passport_1 = require_passport(); + var core_12 = require_core3(); + exports2.IS_PUBLIC_KEY = "isPublic"; + var Public = () => (0, common_12.SetMetadata)(exports2.IS_PUBLIC_KEY, true); + exports2.Public = Public; + exports2.REQUIRED_RID_KEY = "requiredRid"; + var RequirePermission = (rid) => (0, common_12.SetMetadata)(exports2.REQUIRED_RID_KEY, rid); + exports2.RequirePermission = RequirePermission; + exports2.CurrentAdmin = (0, common_12.createParamDecorator)((_data, ctx) => ctx.switchToHttp().getRequest().user); + var JwtAuthGuard = class JwtAuthGuard extends (0, passport_1.AuthGuard)("jwt") { + reflector; + constructor(reflector) { + super(); + this.reflector = reflector; + } + canActivate(context) { + const isPublic = this.reflector.getAllAndOverride(exports2.IS_PUBLIC_KEY, [ + context.getHandler(), + context.getClass() + ]); + if (isPublic) + return true; + return super.canActivate(context); + } + }; + exports2.JwtAuthGuard = JwtAuthGuard; + exports2.JwtAuthGuard = JwtAuthGuard = __decorate4([ + (0, common_12.Injectable)(), + __metadata3("design:paramtypes", [core_12.Reflector]) + ], JwtAuthGuard); + var PermissionsGuard = class PermissionsGuard { + reflector; + constructor(reflector) { + this.reflector = reflector; + } + canActivate(context) { + const requiredRid = this.reflector.getAllAndOverride(exports2.REQUIRED_RID_KEY, [ + context.getHandler(), + context.getClass() + ]); + if (!requiredRid) + return true; + const user = context.switchToHttp().getRequest().user; + if (!user) + throw new common_12.ForbiddenException(); + if (!user.permissions.includes(requiredRid)) { + throw new common_12.ForbiddenException(`Missing permission: ${requiredRid}`); + } + return true; + } + }; + exports2.PermissionsGuard = PermissionsGuard; + exports2.PermissionsGuard = PermissionsGuard = __decorate4([ + (0, common_12.Injectable)(), + __metadata3("design:paramtypes", [core_12.Reflector]) + ], PermissionsGuard); + } +}); + +// dist/modules/catalog/catalog.controller.js +var require_catalog_controller = __commonJS({ + "dist/modules/catalog/catalog.controller.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CatalogController = void 0; + var common_12 = require_common(); + var catalog_service_1 = require_catalog_service(); + var guards_1 = require_guards2(); + var CatalogController = class CatalogController { + catalog; + constructor(catalog) { + this.catalog = catalog; + } + list() { + return this.catalog.listProducts(); + } + }; + exports2.CatalogController = CatalogController; __decorate4([ + (0, common_12.Get)(), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", []), + __metadata3("design:returntype", void 0) + ], CatalogController.prototype, "list", null); + exports2.CatalogController = CatalogController = __decorate4([ (0, guards_1.Public)(), - (0, common_12.Post)("login"), - (0, common_12.HttpCode)(200), - __param3(0, (0, common_12.Body)()), - __metadata3("design:type", Function), - __metadata3("design:paramtypes", [login_dto_1.LoginDto]), - __metadata3("design:returntype", void 0) - ], AuthController.prototype, "login", null); - __decorate4([ - (0, common_12.Get)("me"), - __param3(0, (0, guards_1.CurrentAdmin)()), - __metadata3("design:type", Function), - __metadata3("design:paramtypes", [Object]), - __metadata3("design:returntype", void 0) - ], AuthController.prototype, "me", null); - exports2.AuthController = AuthController = __decorate4([ - (0, common_12.Controller)("admin/auth"), - __metadata3("design:paramtypes", [auth_service_1.AuthService]) - ], AuthController); + (0, common_12.Controller)("catalog/products"), + __metadata3("design:paramtypes", [catalog_service_1.CatalogService]) + ], CatalogController); + } +}); + +// dist/modules/catalog/catalog.module.js +var require_catalog_module = __commonJS({ + "dist/modules/catalog/catalog.module.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CatalogModule = void 0; + var common_12 = require_common(); + var catalog_service_1 = require_catalog_service(); + var catalog_controller_1 = require_catalog_controller(); + var CatalogModule = class CatalogModule { + }; + exports2.CatalogModule = CatalogModule; + exports2.CatalogModule = CatalogModule = __decorate4([ + (0, common_12.Module)({ + controllers: [catalog_controller_1.CatalogController], + providers: [catalog_service_1.CatalogService], + exports: [catalog_service_1.CatalogService] + }) + ], CatalogModule); + } +}); + +// dist/modules/customers/customers.service.js +var require_customers_service = __commonJS({ + "dist/modules/customers/customers.service.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CustomersService = void 0; + var common_12 = require_common(); + var prisma_service_1 = require_prisma_service(); + var accounting_sync_service_1 = require_accounting_sync_service(); + var PUBLIC_CUSTOMER_SELECT = { + id: true, + fullName: true, + mobile: true, + nationalCode: true, + cityId: true, + referredByAgentId: true, + goldCreditLimitGrams: true, + goldDebtGrams: true, + fiatDebtRial: true, + verificationStep: true, + nationalIdImageUrl: true, + businessLicenseUrl: true, + shopImageUrl: true, + isActive: true, + isArchived: true, + createdAt: true, + updatedAt: true + }; + var CustomersService = class CustomersService { + prisma; + accounting; + constructor(prisma, accounting) { + this.prisma = prisma; + this.accounting = accounting; + } + async getOrThrow(customerId) { + const customer = await this.prisma.customer.findUnique({ + where: { id: customerId }, + select: PUBLIC_CUSTOMER_SELECT + }); + if (!customer) + throw new common_12.NotFoundException(`Customer ${customerId} not found`); + const accounting = await this.accounting.customerBalance(customerId); + if (accounting) { + return { + ...customer, + goldDebtGrams: accounting.gold, + fiatDebtRial: accounting.rial, + balanceSource: "accounting", + balanceAt: accounting.at + }; + } + return { ...customer, balanceSource: "app", balanceAt: null }; + } + getOrders(customerId) { + return this.prisma.order.findMany({ + where: { customerId }, + include: { items: true }, + orderBy: { createdAt: "desc" } + }); + } + getLedgerEntries(customerId) { + return this.prisma.ledgerEntry.findMany({ + where: { customerId }, + orderBy: { createdAt: "desc" } + }); + } + }; + exports2.CustomersService = CustomersService; + exports2.CustomersService = CustomersService = __decorate4([ + (0, common_12.Injectable)(), + __metadata3("design:paramtypes", [ + prisma_service_1.PrismaService, + accounting_sync_service_1.AccountingSyncService + ]) + ], CustomersService); + } +}); + +// dist/modules/customers/customers.module.js +var require_customers_module = __commonJS({ + "dist/modules/customers/customers.module.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CustomersModule = void 0; + var common_12 = require_common(); + var customers_service_1 = require_customers_service(); + var CustomersModule = class CustomersModule { + }; + exports2.CustomersModule = CustomersModule; + exports2.CustomersModule = CustomersModule = __decorate4([ + (0, common_12.Module)({ + providers: [customers_service_1.CustomersService], + exports: [customers_service_1.CustomersService] + }) + ], CustomersModule); + } +}); + +// ../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/data-stream.js +var require_data_stream = __commonJS({ + "../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/data-stream.js"(exports2, module2) { + var Buffer2 = require_safe_buffer().Buffer; + var Stream = require("stream"); + var util2 = require("util"); + function DataStream(data) { + this.buffer = null; + this.writable = true; + this.readable = true; + if (!data) { + this.buffer = Buffer2.alloc(0); + return this; + } + if (typeof data.pipe === "function") { + this.buffer = Buffer2.alloc(0); + data.pipe(this); + return this; + } + if (data.length || typeof data === "object") { + this.buffer = data; + this.writable = false; + process.nextTick(function() { + this.emit("end", data); + this.readable = false; + this.emit("close"); + }.bind(this)); + return this; + } + throw new TypeError("Unexpected data type (" + typeof data + ")"); + } + util2.inherits(DataStream, Stream); + DataStream.prototype.write = function write(data) { + this.buffer = Buffer2.concat([this.buffer, Buffer2.from(data)]); + this.emit("data", data); + }; + DataStream.prototype.end = function end(data) { + if (data) + this.write(data); + this.emit("end", data); + this.emit("close"); + this.writable = false; + this.readable = false; + }; + module2.exports = DataStream; + } +}); + +// ../../node_modules/.pnpm/ecdsa-sig-formatter@1.0.11/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js +var require_param_bytes_for_alg = __commonJS({ + "../../node_modules/.pnpm/ecdsa-sig-formatter@1.0.11/node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js"(exports2, module2) { + "use strict"; + function getParamSize(keySize) { + var result = (keySize / 8 | 0) + (keySize % 8 === 0 ? 0 : 1); + return result; + } + var paramBytesForAlg = { + ES256: getParamSize(256), + ES384: getParamSize(384), + ES512: getParamSize(521) + }; + function getParamBytesForAlg(alg) { + var paramBytes = paramBytesForAlg[alg]; + if (paramBytes) { + return paramBytes; + } + throw new Error('Unknown algorithm "' + alg + '"'); + } + module2.exports = getParamBytesForAlg; + } +}); + +// ../../node_modules/.pnpm/ecdsa-sig-formatter@1.0.11/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js +var require_ecdsa_sig_formatter = __commonJS({ + "../../node_modules/.pnpm/ecdsa-sig-formatter@1.0.11/node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js"(exports2, module2) { + "use strict"; + var Buffer2 = require_safe_buffer().Buffer; + var getParamBytesForAlg = require_param_bytes_for_alg(); + var MAX_OCTET = 128; + var CLASS_UNIVERSAL = 0; + var PRIMITIVE_BIT = 32; + var TAG_SEQ = 16; + var TAG_INT = 2; + var ENCODED_TAG_SEQ = TAG_SEQ | PRIMITIVE_BIT | CLASS_UNIVERSAL << 6; + var ENCODED_TAG_INT = TAG_INT | CLASS_UNIVERSAL << 6; + function base64Url(base64) { + return base64.replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_"); + } + function signatureAsBuffer(signature) { + if (Buffer2.isBuffer(signature)) { + return signature; + } else if ("string" === typeof signature) { + return Buffer2.from(signature, "base64"); + } + throw new TypeError("ECDSA signature must be a Base64 string or a Buffer"); + } + function derToJose(signature, alg) { + signature = signatureAsBuffer(signature); + var paramBytes = getParamBytesForAlg(alg); + var maxEncodedParamLength = paramBytes + 1; + var inputLength = signature.length; + var offset = 0; + if (signature[offset++] !== ENCODED_TAG_SEQ) { + throw new Error('Could not find expected "seq"'); + } + var seqLength = signature[offset++]; + if (seqLength === (MAX_OCTET | 1)) { + seqLength = signature[offset++]; + } + if (inputLength - offset < seqLength) { + throw new Error('"seq" specified length of "' + seqLength + '", only "' + (inputLength - offset) + '" remaining'); + } + if (signature[offset++] !== ENCODED_TAG_INT) { + throw new Error('Could not find expected "int" for "r"'); + } + var rLength = signature[offset++]; + if (inputLength - offset - 2 < rLength) { + throw new Error('"r" specified length of "' + rLength + '", only "' + (inputLength - offset - 2) + '" available'); + } + if (maxEncodedParamLength < rLength) { + throw new Error('"r" specified length of "' + rLength + '", max of "' + maxEncodedParamLength + '" is acceptable'); + } + var rOffset = offset; + offset += rLength; + if (signature[offset++] !== ENCODED_TAG_INT) { + throw new Error('Could not find expected "int" for "s"'); + } + var sLength = signature[offset++]; + if (inputLength - offset !== sLength) { + throw new Error('"s" specified length of "' + sLength + '", expected "' + (inputLength - offset) + '"'); + } + if (maxEncodedParamLength < sLength) { + throw new Error('"s" specified length of "' + sLength + '", max of "' + maxEncodedParamLength + '" is acceptable'); + } + var sOffset = offset; + offset += sLength; + if (offset !== inputLength) { + throw new Error('Expected to consume entire buffer, but "' + (inputLength - offset) + '" bytes remain'); + } + var rPadding = paramBytes - rLength, sPadding = paramBytes - sLength; + var dst = Buffer2.allocUnsafe(rPadding + rLength + sPadding + sLength); + for (offset = 0; offset < rPadding; ++offset) { + dst[offset] = 0; + } + signature.copy(dst, offset, rOffset + Math.max(-rPadding, 0), rOffset + rLength); + offset = paramBytes; + for (var o = offset; offset < o + sPadding; ++offset) { + dst[offset] = 0; + } + signature.copy(dst, offset, sOffset + Math.max(-sPadding, 0), sOffset + sLength); + dst = dst.toString("base64"); + dst = base64Url(dst); + return dst; + } + function countPadding(buf, start, stop) { + var padding = 0; + while (start + padding < stop && buf[start + padding] === 0) { + ++padding; + } + var needsSign = buf[start + padding] >= MAX_OCTET; + if (needsSign) { + --padding; + } + return padding; + } + function joseToDer(signature, alg) { + signature = signatureAsBuffer(signature); + var paramBytes = getParamBytesForAlg(alg); + var signatureBytes = signature.length; + if (signatureBytes !== paramBytes * 2) { + throw new TypeError('"' + alg + '" signatures must be "' + paramBytes * 2 + '" bytes, saw "' + signatureBytes + '"'); + } + var rPadding = countPadding(signature, 0, paramBytes); + var sPadding = countPadding(signature, paramBytes, signature.length); + var rLength = paramBytes - rPadding; + var sLength = paramBytes - sPadding; + var rsBytes = 1 + 1 + rLength + 1 + 1 + sLength; + var shortLength = rsBytes < MAX_OCTET; + var dst = Buffer2.allocUnsafe((shortLength ? 2 : 3) + rsBytes); + var offset = 0; + dst[offset++] = ENCODED_TAG_SEQ; + if (shortLength) { + dst[offset++] = rsBytes; + } else { + dst[offset++] = MAX_OCTET | 1; + dst[offset++] = rsBytes & 255; + } + dst[offset++] = ENCODED_TAG_INT; + dst[offset++] = rLength; + if (rPadding < 0) { + dst[offset++] = 0; + offset += signature.copy(dst, offset, 0, paramBytes); + } else { + offset += signature.copy(dst, offset, rPadding, paramBytes); + } + dst[offset++] = ENCODED_TAG_INT; + dst[offset++] = sLength; + if (sPadding < 0) { + dst[offset++] = 0; + signature.copy(dst, offset, paramBytes); + } else { + signature.copy(dst, offset, paramBytes + sPadding); + } + return dst; + } + module2.exports = { + derToJose, + joseToDer + }; + } +}); + +// ../../node_modules/.pnpm/buffer-equal-constant-time@1.0.1/node_modules/buffer-equal-constant-time/index.js +var require_buffer_equal_constant_time = __commonJS({ + "../../node_modules/.pnpm/buffer-equal-constant-time@1.0.1/node_modules/buffer-equal-constant-time/index.js"(exports2, module2) { + "use strict"; + var Buffer2 = require("buffer").Buffer; + var SlowBuffer = require("buffer").SlowBuffer; + module2.exports = bufferEq; + function bufferEq(a, b) { + if (!Buffer2.isBuffer(a) || !Buffer2.isBuffer(b)) { + return false; + } + if (a.length !== b.length) { + return false; + } + var c = 0; + for (var i = 0; i < a.length; i++) { + c |= a[i] ^ b[i]; + } + return c === 0; + } + bufferEq.install = function() { + Buffer2.prototype.equal = SlowBuffer.prototype.equal = function equal(that) { + return bufferEq(this, that); + }; + }; + var origBufEqual = Buffer2.prototype.equal; + var origSlowBufEqual = SlowBuffer.prototype.equal; + bufferEq.restore = function() { + Buffer2.prototype.equal = origBufEqual; + SlowBuffer.prototype.equal = origSlowBufEqual; + }; + } +}); + +// ../../node_modules/.pnpm/jwa@2.0.1/node_modules/jwa/index.js +var require_jwa = __commonJS({ + "../../node_modules/.pnpm/jwa@2.0.1/node_modules/jwa/index.js"(exports2, module2) { + var Buffer2 = require_safe_buffer().Buffer; + var crypto5 = require("crypto"); + var formatEcdsa = require_ecdsa_sig_formatter(); + var util2 = require("util"); + var MSG_INVALID_ALGORITHM = '"%s" is not a valid algorithm.\n Supported algorithms are:\n "HS256", "HS384", "HS512", "RS256", "RS384", "RS512", "PS256", "PS384", "PS512", "ES256", "ES384", "ES512" and "none".'; + var MSG_INVALID_SECRET = "secret must be a string or buffer"; + var MSG_INVALID_VERIFIER_KEY = "key must be a string or a buffer"; + var MSG_INVALID_SIGNER_KEY = "key must be a string, a buffer or an object"; + var supportsKeyObjects = typeof crypto5.createPublicKey === "function"; + if (supportsKeyObjects) { + MSG_INVALID_VERIFIER_KEY += " or a KeyObject"; + MSG_INVALID_SECRET += "or a KeyObject"; + } + function checkIsPublicKey(key) { + if (Buffer2.isBuffer(key)) { + return; + } + if (typeof key === "string") { + return; + } + if (!supportsKeyObjects) { + throw typeError(MSG_INVALID_VERIFIER_KEY); + } + if (typeof key !== "object") { + throw typeError(MSG_INVALID_VERIFIER_KEY); + } + if (typeof key.type !== "string") { + throw typeError(MSG_INVALID_VERIFIER_KEY); + } + if (typeof key.asymmetricKeyType !== "string") { + throw typeError(MSG_INVALID_VERIFIER_KEY); + } + if (typeof key.export !== "function") { + throw typeError(MSG_INVALID_VERIFIER_KEY); + } + } + function checkIsPrivateKey(key) { + if (Buffer2.isBuffer(key)) { + return; + } + if (typeof key === "string") { + return; + } + if (typeof key === "object") { + return; + } + throw typeError(MSG_INVALID_SIGNER_KEY); + } + function checkIsSecretKey(key) { + if (Buffer2.isBuffer(key)) { + return; + } + if (typeof key === "string") { + return key; + } + if (!supportsKeyObjects) { + throw typeError(MSG_INVALID_SECRET); + } + if (typeof key !== "object") { + throw typeError(MSG_INVALID_SECRET); + } + if (key.type !== "secret") { + throw typeError(MSG_INVALID_SECRET); + } + if (typeof key.export !== "function") { + throw typeError(MSG_INVALID_SECRET); + } + } + function fromBase64(base64) { + return base64.replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_"); + } + function toBase64(base64url) { + base64url = base64url.toString(); + var padding = 4 - base64url.length % 4; + if (padding !== 4) { + for (var i = 0; i < padding; ++i) { + base64url += "="; + } + } + return base64url.replace(/\-/g, "+").replace(/_/g, "/"); + } + function typeError(template) { + var args = [].slice.call(arguments, 1); + var errMsg = util2.format.bind(util2, template).apply(null, args); + return new TypeError(errMsg); + } + function bufferOrString(obj2) { + return Buffer2.isBuffer(obj2) || typeof obj2 === "string"; + } + function normalizeInput(thing) { + if (!bufferOrString(thing)) + thing = JSON.stringify(thing); + return thing; + } + function createHmacSigner(bits) { + return function sign(thing, secret) { + checkIsSecretKey(secret); + thing = normalizeInput(thing); + var hmac = crypto5.createHmac("sha" + bits, secret); + var sig = (hmac.update(thing), hmac.digest("base64")); + return fromBase64(sig); + }; + } + var bufferEqual; + var timingSafeEqual = "timingSafeEqual" in crypto5 ? function timingSafeEqual2(a, b) { + if (a.byteLength !== b.byteLength) { + return false; + } + return crypto5.timingSafeEqual(a, b); + } : function timingSafeEqual2(a, b) { + if (!bufferEqual) { + bufferEqual = require_buffer_equal_constant_time(); + } + return bufferEqual(a, b); + }; + function createHmacVerifier(bits) { + return function verify(thing, signature, secret) { + var computedSig = createHmacSigner(bits)(thing, secret); + return timingSafeEqual(Buffer2.from(signature), Buffer2.from(computedSig)); + }; + } + function createKeySigner(bits) { + return function sign(thing, privateKey) { + checkIsPrivateKey(privateKey); + thing = normalizeInput(thing); + var signer = crypto5.createSign("RSA-SHA" + bits); + var sig = (signer.update(thing), signer.sign(privateKey, "base64")); + return fromBase64(sig); + }; + } + function createKeyVerifier(bits) { + return function verify(thing, signature, publicKey) { + checkIsPublicKey(publicKey); + thing = normalizeInput(thing); + signature = toBase64(signature); + var verifier = crypto5.createVerify("RSA-SHA" + bits); + verifier.update(thing); + return verifier.verify(publicKey, signature, "base64"); + }; + } + function createPSSKeySigner(bits) { + return function sign(thing, privateKey) { + checkIsPrivateKey(privateKey); + thing = normalizeInput(thing); + var signer = crypto5.createSign("RSA-SHA" + bits); + var sig = (signer.update(thing), signer.sign({ + key: privateKey, + padding: crypto5.constants.RSA_PKCS1_PSS_PADDING, + saltLength: crypto5.constants.RSA_PSS_SALTLEN_DIGEST + }, "base64")); + return fromBase64(sig); + }; + } + function createPSSKeyVerifier(bits) { + return function verify(thing, signature, publicKey) { + checkIsPublicKey(publicKey); + thing = normalizeInput(thing); + signature = toBase64(signature); + var verifier = crypto5.createVerify("RSA-SHA" + bits); + verifier.update(thing); + return verifier.verify({ + key: publicKey, + padding: crypto5.constants.RSA_PKCS1_PSS_PADDING, + saltLength: crypto5.constants.RSA_PSS_SALTLEN_DIGEST + }, signature, "base64"); + }; + } + function createECDSASigner(bits) { + var inner = createKeySigner(bits); + return function sign() { + var signature = inner.apply(null, arguments); + signature = formatEcdsa.derToJose(signature, "ES" + bits); + return signature; + }; + } + function createECDSAVerifer(bits) { + var inner = createKeyVerifier(bits); + return function verify(thing, signature, publicKey) { + signature = formatEcdsa.joseToDer(signature, "ES" + bits).toString("base64"); + var result = inner(thing, signature, publicKey); + return result; + }; + } + function createNoneSigner() { + return function sign() { + return ""; + }; + } + function createNoneVerifier() { + return function verify(thing, signature) { + return signature === ""; + }; + } + module2.exports = function jwa(algorithm) { + var signerFactories = { + hs: createHmacSigner, + rs: createKeySigner, + ps: createPSSKeySigner, + es: createECDSASigner, + none: createNoneSigner + }; + var verifierFactories = { + hs: createHmacVerifier, + rs: createKeyVerifier, + ps: createPSSKeyVerifier, + es: createECDSAVerifer, + none: createNoneVerifier + }; + var match = algorithm.match(/^(RS|PS|ES|HS)(256|384|512)$|^(none)$/); + if (!match) + throw typeError(MSG_INVALID_ALGORITHM, algorithm); + var algo = (match[1] || match[3]).toLowerCase(); + var bits = match[2]; + return { + sign: signerFactories[algo](bits), + verify: verifierFactories[algo](bits) + }; + }; + } +}); + +// ../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/tostring.js +var require_tostring = __commonJS({ + "../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/tostring.js"(exports2, module2) { + var Buffer2 = require("buffer").Buffer; + module2.exports = function toString2(obj2) { + if (typeof obj2 === "string") + return obj2; + if (typeof obj2 === "number" || Buffer2.isBuffer(obj2)) + return obj2.toString(); + return JSON.stringify(obj2); + }; + } +}); + +// ../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/sign-stream.js +var require_sign_stream = __commonJS({ + "../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/sign-stream.js"(exports2, module2) { + var Buffer2 = require_safe_buffer().Buffer; + var DataStream = require_data_stream(); + var jwa = require_jwa(); + var Stream = require("stream"); + var toString2 = require_tostring(); + var util2 = require("util"); + function base64url(string, encoding) { + return Buffer2.from(string, encoding).toString("base64").replace(/=/g, "").replace(/\+/g, "-").replace(/\//g, "_"); + } + function jwsSecuredInput(header, payload, encoding) { + encoding = encoding || "utf8"; + var encodedHeader = base64url(toString2(header), "binary"); + var encodedPayload = base64url(toString2(payload), encoding); + return util2.format("%s.%s", encodedHeader, encodedPayload); + } + function jwsSign(opts) { + var header = opts.header; + var payload = opts.payload; + var secretOrKey = opts.secret || opts.privateKey; + var encoding = opts.encoding; + var algo = jwa(header.alg); + var securedInput = jwsSecuredInput(header, payload, encoding); + var signature = algo.sign(securedInput, secretOrKey); + return util2.format("%s.%s", securedInput, signature); + } + function SignStream(opts) { + var secret = opts.secret; + secret = secret == null ? opts.privateKey : secret; + secret = secret == null ? opts.key : secret; + if (/^hs/i.test(opts.header.alg) === true && secret == null) { + throw new TypeError("secret must be a string or buffer or a KeyObject"); + } + var secretStream = new DataStream(secret); + this.readable = true; + this.header = opts.header; + this.encoding = opts.encoding; + this.secret = this.privateKey = this.key = secretStream; + this.payload = new DataStream(opts.payload); + this.secret.once("close", function() { + if (!this.payload.writable && this.readable) + this.sign(); + }.bind(this)); + this.payload.once("close", function() { + if (!this.secret.writable && this.readable) + this.sign(); + }.bind(this)); + } + util2.inherits(SignStream, Stream); + SignStream.prototype.sign = function sign() { + try { + var signature = jwsSign({ + header: this.header, + payload: this.payload.buffer, + secret: this.secret.buffer, + encoding: this.encoding + }); + this.emit("done", signature); + this.emit("data", signature); + this.emit("end"); + this.readable = false; + return signature; + } catch (e) { + this.readable = false; + this.emit("error", e); + this.emit("close"); + } + }; + SignStream.sign = jwsSign; + module2.exports = SignStream; + } +}); + +// ../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/verify-stream.js +var require_verify_stream = __commonJS({ + "../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/lib/verify-stream.js"(exports2, module2) { + var Buffer2 = require_safe_buffer().Buffer; + var DataStream = require_data_stream(); + var jwa = require_jwa(); + var Stream = require("stream"); + var toString2 = require_tostring(); + var util2 = require("util"); + var JWS_REGEX = /^[a-zA-Z0-9\-_]+?\.[a-zA-Z0-9\-_]+?\.([a-zA-Z0-9\-_]+)?$/; + function isObject2(thing) { + return Object.prototype.toString.call(thing) === "[object Object]"; + } + function safeJsonParse(thing) { + if (isObject2(thing)) + return thing; + try { + return JSON.parse(thing); + } catch (e) { + return void 0; + } + } + function headerFromJWS(jwsSig) { + var encodedHeader = jwsSig.split(".", 1)[0]; + return safeJsonParse(Buffer2.from(encodedHeader, "base64").toString("binary")); + } + function securedInputFromJWS(jwsSig) { + return jwsSig.split(".", 2).join("."); + } + function signatureFromJWS(jwsSig) { + return jwsSig.split(".")[2]; + } + function payloadFromJWS(jwsSig, encoding) { + encoding = encoding || "utf8"; + var payload = jwsSig.split(".")[1]; + return Buffer2.from(payload, "base64").toString(encoding); + } + function isValidJws(string) { + return JWS_REGEX.test(string) && !!headerFromJWS(string); + } + function jwsVerify(jwsSig, algorithm, secretOrKey) { + if (!algorithm) { + var err = new Error("Missing algorithm parameter for jws.verify"); + err.code = "MISSING_ALGORITHM"; + throw err; + } + jwsSig = toString2(jwsSig); + var signature = signatureFromJWS(jwsSig); + var securedInput = securedInputFromJWS(jwsSig); + var algo = jwa(algorithm); + return algo.verify(securedInput, signature, secretOrKey); + } + function jwsDecode(jwsSig, opts) { + opts = opts || {}; + jwsSig = toString2(jwsSig); + if (!isValidJws(jwsSig)) + return null; + var header = headerFromJWS(jwsSig); + if (!header) + return null; + var payload = payloadFromJWS(jwsSig); + if (header.typ === "JWT" || opts.json) + payload = JSON.parse(payload, opts.encoding); + return { + header, + payload, + signature: signatureFromJWS(jwsSig) + }; + } + function VerifyStream(opts) { + opts = opts || {}; + var secretOrKey = opts.secret; + secretOrKey = secretOrKey == null ? opts.publicKey : secretOrKey; + secretOrKey = secretOrKey == null ? opts.key : secretOrKey; + if (/^hs/i.test(opts.algorithm) === true && secretOrKey == null) { + throw new TypeError("secret must be a string or buffer or a KeyObject"); + } + var secretStream = new DataStream(secretOrKey); + this.readable = true; + this.algorithm = opts.algorithm; + this.encoding = opts.encoding; + this.secret = this.publicKey = this.key = secretStream; + this.signature = new DataStream(opts.signature); + this.secret.once("close", function() { + if (!this.signature.writable && this.readable) + this.verify(); + }.bind(this)); + this.signature.once("close", function() { + if (!this.secret.writable && this.readable) + this.verify(); + }.bind(this)); + } + util2.inherits(VerifyStream, Stream); + VerifyStream.prototype.verify = function verify() { + try { + var valid = jwsVerify(this.signature.buffer, this.algorithm, this.key.buffer); + var obj2 = jwsDecode(this.signature.buffer, this.encoding); + this.emit("done", valid, obj2); + this.emit("data", valid); + this.emit("end"); + this.readable = false; + return valid; + } catch (e) { + this.readable = false; + this.emit("error", e); + this.emit("close"); + } + }; + VerifyStream.decode = jwsDecode; + VerifyStream.isValid = isValidJws; + VerifyStream.verify = jwsVerify; + module2.exports = VerifyStream; + } +}); + +// ../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/index.js +var require_jws = __commonJS({ + "../../node_modules/.pnpm/jws@4.0.1/node_modules/jws/index.js"(exports2) { + var SignStream = require_sign_stream(); + var VerifyStream = require_verify_stream(); + var ALGORITHMS = [ + "HS256", + "HS384", + "HS512", + "RS256", + "RS384", + "RS512", + "PS256", + "PS384", + "PS512", + "ES256", + "ES384", + "ES512" + ]; + exports2.ALGORITHMS = ALGORITHMS; + exports2.sign = SignStream.sign; + exports2.verify = VerifyStream.verify; + exports2.decode = VerifyStream.decode; + exports2.isValid = VerifyStream.isValid; + exports2.createSign = function createSign(opts) { + return new SignStream(opts); + }; + exports2.createVerify = function createVerify(opts) { + return new VerifyStream(opts); + }; + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/decode.js +var require_decode = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/decode.js"(exports2, module2) { + var jws = require_jws(); + module2.exports = function(jwt, options) { + options = options || {}; + var decoded = jws.decode(jwt, options); + if (!decoded) { + return null; + } + var payload = decoded.payload; + if (typeof payload === "string") { + try { + var obj2 = JSON.parse(payload); + if (obj2 !== null && typeof obj2 === "object") { + payload = obj2; + } + } catch (e) { + } + } + if (options.complete === true) { + return { + header: decoded.header, + payload, + signature: decoded.signature + }; + } + return payload; + }; + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/JsonWebTokenError.js +var require_JsonWebTokenError = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/JsonWebTokenError.js"(exports2, module2) { + var JsonWebTokenError2 = function(message, error) { + Error.call(this, message); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + this.name = "JsonWebTokenError"; + this.message = message; + if (error) this.inner = error; + }; + JsonWebTokenError2.prototype = Object.create(Error.prototype); + JsonWebTokenError2.prototype.constructor = JsonWebTokenError2; + module2.exports = JsonWebTokenError2; + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/NotBeforeError.js +var require_NotBeforeError = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/NotBeforeError.js"(exports2, module2) { + var JsonWebTokenError2 = require_JsonWebTokenError(); + var NotBeforeError2 = function(message, date) { + JsonWebTokenError2.call(this, message); + this.name = "NotBeforeError"; + this.date = date; + }; + NotBeforeError2.prototype = Object.create(JsonWebTokenError2.prototype); + NotBeforeError2.prototype.constructor = NotBeforeError2; + module2.exports = NotBeforeError2; + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/TokenExpiredError.js +var require_TokenExpiredError = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/TokenExpiredError.js"(exports2, module2) { + var JsonWebTokenError2 = require_JsonWebTokenError(); + var TokenExpiredError2 = function(message, expiredAt) { + JsonWebTokenError2.call(this, message); + this.name = "TokenExpiredError"; + this.expiredAt = expiredAt; + }; + TokenExpiredError2.prototype = Object.create(JsonWebTokenError2.prototype); + TokenExpiredError2.prototype.constructor = TokenExpiredError2; + module2.exports = TokenExpiredError2; + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/timespan.js +var require_timespan = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/timespan.js"(exports2, module2) { + var ms = require_ms2(); + module2.exports = function(time, iat) { + var timestamp = iat || Math.floor(Date.now() / 1e3); + if (typeof time === "string") { + var milliseconds = ms(time); + if (typeof milliseconds === "undefined") { + return; + } + return Math.floor(timestamp + milliseconds / 1e3); + } else if (typeof time === "number") { + return timestamp + time; + } else { + return; + } + }; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/constants.js +var require_constants8 = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/constants.js"(exports2, module2) { + "use strict"; + var SEMVER_SPEC_VERSION = "2.0.0"; + var MAX_LENGTH = 256; + var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */ + 9007199254740991; + var MAX_SAFE_COMPONENT_LENGTH = 16; + var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6; + var RELEASE_TYPES = [ + "major", + "premajor", + "minor", + "preminor", + "patch", + "prepatch", + "prerelease" + ]; + module2.exports = { + MAX_LENGTH, + MAX_SAFE_COMPONENT_LENGTH, + MAX_SAFE_BUILD_LENGTH, + MAX_SAFE_INTEGER, + RELEASE_TYPES, + SEMVER_SPEC_VERSION, + FLAG_INCLUDE_PRERELEASE: 1, + FLAG_LOOSE: 2 + }; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/debug.js +var require_debug2 = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/debug.js"(exports2, module2) { + "use strict"; + var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => { + }; + module2.exports = debug; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/re.js +var require_re = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/re.js"(exports2, module2) { + "use strict"; + var { + MAX_SAFE_COMPONENT_LENGTH, + MAX_SAFE_BUILD_LENGTH, + MAX_LENGTH + } = require_constants8(); + var debug = require_debug2(); + exports2 = module2.exports = {}; + var re = exports2.re = []; + var safeRe = exports2.safeRe = []; + var src = exports2.src = []; + var safeSrc = exports2.safeSrc = []; + var t = exports2.t = {}; + var R = 0; + var LETTERDASHNUMBER = "[a-zA-Z0-9-]"; + var safeRegexReplacements = [ + ["\\s", 1], + ["\\d", MAX_LENGTH], + [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH] + ]; + var makeSafeRegex = (value) => { + for (const [token, max] of safeRegexReplacements) { + value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`); + } + return value; + }; + var createToken = (name, value, isGlobal) => { + const safe = makeSafeRegex(value); + const index = R++; + debug(name, index, value); + t[name] = index; + src[index] = value; + safeSrc[index] = safe; + re[index] = new RegExp(value, isGlobal ? "g" : void 0); + safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0); + }; + createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*"); + createToken("NUMERICIDENTIFIERLOOSE", "\\d+"); + createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`); + createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`); + createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`); + createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIER]})`); + createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NONNUMERICIDENTIFIER]}|${src[t.NUMERICIDENTIFIERLOOSE]})`); + createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`); + createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`); + createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`); + createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`); + createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`); + createToken("FULL", `^${src[t.FULLPLAIN]}$`); + createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`); + createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`); + createToken("GTLT", "((?:<|>)?=?)"); + createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`); + createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`); + createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`); + createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`); + createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`); + createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`); + createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`); + createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`); + createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`); + createToken("COERCERTL", src[t.COERCE], true); + createToken("COERCERTLFULL", src[t.COERCEFULL], true); + createToken("LONETILDE", "(?:~>?)"); + createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true); + exports2.tildeTrimReplace = "$1~"; + createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`); + createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`); + createToken("LONECARET", "(?:\\^)"); + createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true); + exports2.caretTrimReplace = "$1^"; + createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`); + createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`); + createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`); + createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`); + createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true); + exports2.comparatorTrimReplace = "$1$2$3"; + createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`); + createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`); + createToken("STAR", "(<|>)?=?\\s*\\*"); + createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"); + createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$"); + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/parse-options.js +var require_parse_options = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/parse-options.js"(exports2, module2) { + "use strict"; + var looseOption = Object.freeze({ loose: true }); + var emptyOpts = Object.freeze({}); + var parseOptions = (options) => { + if (!options) { + return emptyOpts; + } + if (typeof options !== "object") { + return looseOption; + } + return options; + }; + module2.exports = parseOptions; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/identifiers.js +var require_identifiers = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/identifiers.js"(exports2, module2) { + "use strict"; + var numeric = /^[0-9]+$/; + var compareIdentifiers = (a, b) => { + if (typeof a === "number" && typeof b === "number") { + return a === b ? 0 : a < b ? -1 : 1; + } + const anum = numeric.test(a); + const bnum = numeric.test(b); + if (anum && bnum) { + a = +a; + b = +b; + } + return a === b ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b ? -1 : 1; + }; + var rcompareIdentifiers = (a, b) => compareIdentifiers(b, a); + module2.exports = { + compareIdentifiers, + rcompareIdentifiers + }; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/semver.js +var require_semver = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/semver.js"(exports2, module2) { + "use strict"; + var debug = require_debug2(); + var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants8(); + var { safeRe: re, t } = require_re(); + var parseOptions = require_parse_options(); + var { compareIdentifiers } = require_identifiers(); + var isPrereleaseIdentifier = (prerelease, identifier) => { + const identifiers = identifier.split("."); + if (identifiers.length > prerelease.length) { + return false; + } + for (let i = 0; i < identifiers.length; i++) { + if (compareIdentifiers(prerelease[i], identifiers[i]) !== 0) { + return false; + } + } + return true; + }; + var SemVer = class _SemVer { + constructor(version2, options) { + options = parseOptions(options); + if (version2 instanceof _SemVer) { + if (version2.loose === !!options.loose && version2.includePrerelease === !!options.includePrerelease) { + return version2; + } else { + version2 = version2.version; + } + } else if (typeof version2 !== "string") { + throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version2}".`); + } + if (version2.length > MAX_LENGTH) { + throw new TypeError( + `version is longer than ${MAX_LENGTH} characters` + ); + } + debug("SemVer", version2, options); + this.options = options; + this.loose = !!options.loose; + this.includePrerelease = !!options.includePrerelease; + const m = version2.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]); + if (!m) { + throw new TypeError(`Invalid Version: ${version2}`); + } + this.raw = version2; + this.major = +m[1]; + this.minor = +m[2]; + this.patch = +m[3]; + if (this.major > MAX_SAFE_INTEGER || this.major < 0) { + throw new TypeError("Invalid major version"); + } + if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) { + throw new TypeError("Invalid minor version"); + } + if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) { + throw new TypeError("Invalid patch version"); + } + if (!m[4]) { + this.prerelease = []; + } else { + this.prerelease = m[4].split(".").map((id) => { + if (/^[0-9]+$/.test(id)) { + const num = +id; + if (num >= 0 && num < MAX_SAFE_INTEGER) { + return num; + } + } + return id; + }); + } + this.build = m[5] ? m[5].split(".") : []; + this.format(); + } + format() { + this.version = `${this.major}.${this.minor}.${this.patch}`; + if (this.prerelease.length) { + this.version += `-${this.prerelease.join(".")}`; + } + return this.version; + } + toString() { + return this.version; + } + compare(other) { + debug("SemVer.compare", this.version, this.options, other); + if (!(other instanceof _SemVer)) { + if (typeof other === "string" && other === this.version) { + return 0; + } + other = new _SemVer(other, this.options); + } + if (other.version === this.version) { + return 0; + } + return this.compareMain(other) || this.comparePre(other); + } + compareMain(other) { + if (!(other instanceof _SemVer)) { + other = new _SemVer(other, this.options); + } + if (this.major < other.major) { + return -1; + } + if (this.major > other.major) { + return 1; + } + if (this.minor < other.minor) { + return -1; + } + if (this.minor > other.minor) { + return 1; + } + if (this.patch < other.patch) { + return -1; + } + if (this.patch > other.patch) { + return 1; + } + return 0; + } + comparePre(other) { + if (!(other instanceof _SemVer)) { + other = new _SemVer(other, this.options); + } + if (this.prerelease.length && !other.prerelease.length) { + return -1; + } else if (!this.prerelease.length && other.prerelease.length) { + return 1; + } else if (!this.prerelease.length && !other.prerelease.length) { + return 0; + } + let i = 0; + do { + const a = this.prerelease[i]; + const b = other.prerelease[i]; + debug("prerelease compare", i, a, b); + if (a === void 0 && b === void 0) { + return 0; + } else if (b === void 0) { + return 1; + } else if (a === void 0) { + return -1; + } else if (a === b) { + continue; + } else { + return compareIdentifiers(a, b); + } + } while (++i); + } + compareBuild(other) { + if (!(other instanceof _SemVer)) { + other = new _SemVer(other, this.options); + } + let i = 0; + do { + const a = this.build[i]; + const b = other.build[i]; + debug("build compare", i, a, b); + if (a === void 0 && b === void 0) { + return 0; + } else if (b === void 0) { + return 1; + } else if (a === void 0) { + return -1; + } else if (a === b) { + continue; + } else { + return compareIdentifiers(a, b); + } + } while (++i); + } + // preminor will bump the version up to the next minor release, and immediately + // down to pre-release. premajor and prepatch work the same way. + inc(release, identifier, identifierBase) { + if (release.startsWith("pre")) { + if (!identifier && identifierBase === false) { + throw new Error("invalid increment argument: identifier is empty"); + } + if (identifier) { + const match = `-${identifier}`.match(this.options.loose ? re[t.PRERELEASELOOSE] : re[t.PRERELEASE]); + if (!match || match[1] !== identifier) { + throw new Error(`invalid identifier: ${identifier}`); + } + } + } + switch (release) { + case "premajor": + this.prerelease.length = 0; + this.patch = 0; + this.minor = 0; + this.major++; + this.inc("pre", identifier, identifierBase); + break; + case "preminor": + this.prerelease.length = 0; + this.patch = 0; + this.minor++; + this.inc("pre", identifier, identifierBase); + break; + case "prepatch": + this.prerelease.length = 0; + this.inc("patch", identifier, identifierBase); + this.inc("pre", identifier, identifierBase); + break; + // If the input is a non-prerelease version, this acts the same as + // prepatch. + case "prerelease": + if (this.prerelease.length === 0) { + this.inc("patch", identifier, identifierBase); + } + this.inc("pre", identifier, identifierBase); + break; + case "release": + if (this.prerelease.length === 0) { + throw new Error(`version ${this.raw} is not a prerelease`); + } + this.prerelease.length = 0; + break; + case "major": + if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) { + this.major++; + } + this.minor = 0; + this.patch = 0; + this.prerelease = []; + break; + case "minor": + if (this.patch !== 0 || this.prerelease.length === 0) { + this.minor++; + } + this.patch = 0; + this.prerelease = []; + break; + case "patch": + if (this.prerelease.length === 0) { + this.patch++; + } + this.prerelease = []; + break; + // This probably shouldn't be used publicly. + // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction. + case "pre": { + const base = Number(identifierBase) ? 1 : 0; + if (this.prerelease.length === 0) { + this.prerelease = [base]; + } else { + let i = this.prerelease.length; + while (--i >= 0) { + if (typeof this.prerelease[i] === "number") { + this.prerelease[i]++; + i = -2; + } + } + if (i === -1) { + if (identifier === this.prerelease.join(".") && identifierBase === false) { + throw new Error("invalid increment argument: identifier already exists"); + } + this.prerelease.push(base); + } + } + if (identifier) { + let prerelease = [identifier, base]; + if (identifierBase === false) { + prerelease = [identifier]; + } + if (isPrereleaseIdentifier(this.prerelease, identifier)) { + const prereleaseBase = this.prerelease[identifier.split(".").length]; + if (isNaN(prereleaseBase)) { + this.prerelease = prerelease; + } + } else { + this.prerelease = prerelease; + } + } + break; + } + default: + throw new Error(`invalid increment argument: ${release}`); + } + this.raw = this.format(); + if (this.build.length) { + this.raw += `+${this.build.join(".")}`; + } + return this; + } + }; + module2.exports = SemVer; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/parse.js +var require_parse3 = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/parse.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var parse2 = (version2, options, throwErrors = false) => { + if (version2 instanceof SemVer) { + return version2; + } + try { + return new SemVer(version2, options); + } catch (er) { + if (!throwErrors) { + return null; + } + throw er; + } + }; + module2.exports = parse2; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/valid.js +var require_valid = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/valid.js"(exports2, module2) { + "use strict"; + var parse2 = require_parse3(); + var valid = (version2, options) => { + const v = parse2(version2, options); + return v ? v.version : null; + }; + module2.exports = valid; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/clean.js +var require_clean = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/clean.js"(exports2, module2) { + "use strict"; + var parse2 = require_parse3(); + var clean = (version2, options) => { + const s = parse2(version2.trim().replace(/^[=v]+/, ""), options); + return s ? s.version : null; + }; + module2.exports = clean; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/inc.js +var require_inc = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/inc.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var inc = (version2, release, options, identifier, identifierBase) => { + if (typeof options === "string") { + identifierBase = identifier; + identifier = options; + options = void 0; + } + try { + return new SemVer( + version2 instanceof SemVer ? version2.version : version2, + options + ).inc(release, identifier, identifierBase).version; + } catch (er) { + return null; + } + }; + module2.exports = inc; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/diff.js +var require_diff = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/diff.js"(exports2, module2) { + "use strict"; + var parse2 = require_parse3(); + var diff = (version1, version2) => { + const v12 = parse2(version1, null, true); + const v2 = parse2(version2, null, true); + const comparison = v12.compare(v2); + if (comparison === 0) { + return null; + } + const v1Higher = comparison > 0; + const highVersion = v1Higher ? v12 : v2; + const lowVersion = v1Higher ? v2 : v12; + const highHasPre = !!highVersion.prerelease.length; + const lowHasPre = !!lowVersion.prerelease.length; + if (lowHasPre && !highHasPre) { + if (!lowVersion.patch && !lowVersion.minor) { + return "major"; + } + if (lowVersion.compareMain(highVersion) === 0) { + if (lowVersion.minor && !lowVersion.patch) { + return "minor"; + } + return "patch"; + } + } + const prefix = highHasPre ? "pre" : ""; + if (v12.major !== v2.major) { + return prefix + "major"; + } + if (v12.minor !== v2.minor) { + return prefix + "minor"; + } + if (v12.patch !== v2.patch) { + return prefix + "patch"; + } + return "prerelease"; + }; + module2.exports = diff; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/major.js +var require_major = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/major.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var major = (a, loose) => new SemVer(a, loose).major; + module2.exports = major; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/minor.js +var require_minor = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/minor.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var minor = (a, loose) => new SemVer(a, loose).minor; + module2.exports = minor; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/patch.js +var require_patch = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/patch.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var patch = (a, loose) => new SemVer(a, loose).patch; + module2.exports = patch; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/prerelease.js +var require_prerelease = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/prerelease.js"(exports2, module2) { + "use strict"; + var parse2 = require_parse3(); + var prerelease = (version2, options) => { + const parsed = parse2(version2, options); + return parsed && parsed.prerelease.length ? parsed.prerelease : null; + }; + module2.exports = prerelease; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare.js +var require_compare = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var compare = (a, b, loose) => new SemVer(a, loose).compare(new SemVer(b, loose)); + module2.exports = compare; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rcompare.js +var require_rcompare = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rcompare.js"(exports2, module2) { + "use strict"; + var compare = require_compare(); + var rcompare = (a, b, loose) => compare(b, a, loose); + module2.exports = rcompare; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-loose.js +var require_compare_loose = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-loose.js"(exports2, module2) { + "use strict"; + var compare = require_compare(); + var compareLoose = (a, b) => compare(a, b, true); + module2.exports = compareLoose; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-build.js +var require_compare_build = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/compare-build.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var compareBuild = (a, b, loose) => { + const versionA = new SemVer(a, loose); + const versionB = new SemVer(b, loose); + return versionA.compare(versionB) || versionA.compareBuild(versionB); + }; + module2.exports = compareBuild; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/sort.js +var require_sort = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/sort.js"(exports2, module2) { + "use strict"; + var compareBuild = require_compare_build(); + var sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose)); + module2.exports = sort; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rsort.js +var require_rsort = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/rsort.js"(exports2, module2) { + "use strict"; + var compareBuild = require_compare_build(); + var rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose)); + module2.exports = rsort; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gt.js +var require_gt = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gt.js"(exports2, module2) { + "use strict"; + var compare = require_compare(); + var gt = (a, b, loose) => compare(a, b, loose) > 0; + module2.exports = gt; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lt.js +var require_lt = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lt.js"(exports2, module2) { + "use strict"; + var compare = require_compare(); + var lt = (a, b, loose) => compare(a, b, loose) < 0; + module2.exports = lt; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/eq.js +var require_eq = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/eq.js"(exports2, module2) { + "use strict"; + var compare = require_compare(); + var eq = (a, b, loose) => compare(a, b, loose) === 0; + module2.exports = eq; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/neq.js +var require_neq = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/neq.js"(exports2, module2) { + "use strict"; + var compare = require_compare(); + var neq = (a, b, loose) => compare(a, b, loose) !== 0; + module2.exports = neq; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gte.js +var require_gte = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/gte.js"(exports2, module2) { + "use strict"; + var compare = require_compare(); + var gte = (a, b, loose) => compare(a, b, loose) >= 0; + module2.exports = gte; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lte.js +var require_lte = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/lte.js"(exports2, module2) { + "use strict"; + var compare = require_compare(); + var lte = (a, b, loose) => compare(a, b, loose) <= 0; + module2.exports = lte; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/cmp.js +var require_cmp = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/cmp.js"(exports2, module2) { + "use strict"; + var eq = require_eq(); + var neq = require_neq(); + var gt = require_gt(); + var gte = require_gte(); + var lt = require_lt(); + var lte = require_lte(); + var cmp = (a, op, b, loose) => { + switch (op) { + case "===": + if (typeof a === "object") { + a = a.version; + } + if (typeof b === "object") { + b = b.version; + } + return a === b; + case "!==": + if (typeof a === "object") { + a = a.version; + } + if (typeof b === "object") { + b = b.version; + } + return a !== b; + case "": + case "=": + case "==": + return eq(a, b, loose); + case "!=": + return neq(a, b, loose); + case ">": + return gt(a, b, loose); + case ">=": + return gte(a, b, loose); + case "<": + return lt(a, b, loose); + case "<=": + return lte(a, b, loose); + default: + throw new TypeError(`Invalid operator: ${op}`); + } + }; + module2.exports = cmp; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/coerce.js +var require_coerce = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/coerce.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var parse2 = require_parse3(); + var { safeRe: re, t } = require_re(); + var coerce = (version2, options) => { + if (version2 instanceof SemVer) { + return version2; + } + if (typeof version2 === "number") { + version2 = String(version2); + } + if (typeof version2 !== "string") { + return null; + } + options = options || {}; + let match = null; + if (!options.rtl) { + match = version2.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]); + } else { + const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL]; + let next; + while ((next = coerceRtlRegex.exec(version2)) && (!match || match.index + match[0].length !== version2.length)) { + if (!match || next.index + next[0].length !== match.index + match[0].length) { + match = next; + } + coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length; + } + coerceRtlRegex.lastIndex = -1; + } + if (match === null) { + return null; + } + const major = match[2]; + const minor = match[3] || "0"; + const patch = match[4] || "0"; + const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : ""; + const build = options.includePrerelease && match[6] ? `+${match[6]}` : ""; + return parse2(`${major}.${minor}.${patch}${prerelease}${build}`, options); + }; + module2.exports = coerce; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/truncate.js +var require_truncate = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/truncate.js"(exports2, module2) { + "use strict"; + var parse2 = require_parse3(); + var constants = require_constants8(); + var SemVer = require_semver(); + var truncate = (version2, truncation, options) => { + if (!constants.RELEASE_TYPES.includes(truncation)) { + return null; + } + const clonedVersion = cloneInputVersion(version2, options); + return clonedVersion && doTruncation(clonedVersion, truncation); + }; + var cloneInputVersion = (version2, options) => { + const versionStringToParse = version2 instanceof SemVer ? version2.version : version2; + return parse2(versionStringToParse, options); + }; + var doTruncation = (version2, truncation) => { + if (isPrerelease(truncation)) { + return version2.version; + } + version2.prerelease = []; + switch (truncation) { + case "major": + version2.minor = 0; + version2.patch = 0; + break; + case "minor": + version2.patch = 0; + break; + } + return version2.format(); + }; + var isPrerelease = (type) => { + return type.startsWith("pre"); + }; + module2.exports = truncate; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/lrucache.js +var require_lrucache = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/internal/lrucache.js"(exports2, module2) { + "use strict"; + var LRUCache = class { + constructor() { + this.max = 1e3; + this.map = /* @__PURE__ */ new Map(); + } + get(key) { + const value = this.map.get(key); + if (value === void 0) { + return void 0; + } else { + this.map.delete(key); + this.map.set(key, value); + return value; + } + } + delete(key) { + return this.map.delete(key); + } + set(key, value) { + const deleted = this.delete(key); + if (!deleted && value !== void 0) { + if (this.map.size >= this.max) { + const firstKey = this.map.keys().next().value; + this.delete(firstKey); + } + this.map.set(key, value); + } + return this; + } + }; + module2.exports = LRUCache; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/range.js +var require_range3 = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/range.js"(exports2, module2) { + "use strict"; + var SPACE_CHARACTERS = /\s+/g; + var Range = class _Range { + constructor(range, options) { + options = parseOptions(options); + if (range instanceof _Range) { + if (range.loose === !!options.loose && range.includePrerelease === !!options.includePrerelease) { + return range; + } else { + return new _Range(range.raw, options); + } + } + if (range instanceof Comparator) { + this.raw = range.value; + this.set = [[range]]; + this.formatted = void 0; + return this; + } + this.options = options; + this.loose = !!options.loose; + this.includePrerelease = !!options.includePrerelease; + this.raw = range.trim().replace(SPACE_CHARACTERS, " "); + this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length); + if (!this.set.length) { + throw new TypeError(`Invalid SemVer Range: ${this.raw}`); + } + if (this.set.length > 1) { + const first = this.set[0]; + this.set = this.set.filter((c) => !isNullSet(c[0])); + if (this.set.length === 0) { + this.set = [first]; + } else if (this.set.length > 1) { + for (const c of this.set) { + if (c.length === 1 && isAny(c[0])) { + this.set = [c]; + break; + } + } + } + } + this.formatted = void 0; + } + get range() { + if (this.formatted === void 0) { + this.formatted = ""; + for (let i = 0; i < this.set.length; i++) { + if (i > 0) { + this.formatted += "||"; + } + const comps = this.set[i]; + for (let k = 0; k < comps.length; k++) { + if (k > 0) { + this.formatted += " "; + } + this.formatted += comps[k].toString().trim(); + } + } + } + return this.formatted; + } + format() { + return this.range; + } + toString() { + return this.range; + } + parseRange(range) { + range = range.replace(BUILDSTRIPRE, ""); + const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE); + const memoKey = memoOpts + ":" + range; + const cached = cache.get(memoKey); + if (cached) { + return cached; + } + const loose = this.options.loose; + const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]; + range = range.replace(hr, hyphenReplace(this.options.includePrerelease)); + debug("hyphen replace", range); + range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace); + debug("comparator trim", range); + range = range.replace(re[t.TILDETRIM], tildeTrimReplace); + debug("tilde trim", range); + range = range.replace(re[t.CARETTRIM], caretTrimReplace); + debug("caret trim", range); + let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options)); + if (loose) { + rangeList = rangeList.filter((comp) => { + debug("loose invalid filter", comp, this.options); + return !!comp.match(re[t.COMPARATORLOOSE]); + }); + } + debug("range list", rangeList); + const rangeMap = /* @__PURE__ */ new Map(); + const comparators = rangeList.map((comp) => new Comparator(comp, this.options)); + for (const comp of comparators) { + if (isNullSet(comp)) { + return [comp]; + } + rangeMap.set(comp.value, comp); + } + if (rangeMap.size > 1 && rangeMap.has("")) { + rangeMap.delete(""); + } + const result = [...rangeMap.values()]; + cache.set(memoKey, result); + return result; + } + intersects(range, options) { + if (!(range instanceof _Range)) { + throw new TypeError("a Range is required"); + } + return this.set.some((thisComparators) => { + return isSatisfiable(thisComparators, options) && range.set.some((rangeComparators) => { + return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => { + return rangeComparators.every((rangeComparator) => { + return thisComparator.intersects(rangeComparator, options); + }); + }); + }); + }); + } + // if ANY of the sets match ALL of its comparators, then pass + test(version2) { + if (!version2) { + return false; + } + if (typeof version2 === "string") { + try { + version2 = new SemVer(version2, this.options); + } catch (er) { + return false; + } + } + for (let i = 0; i < this.set.length; i++) { + if (testSet(this.set[i], version2, this.options)) { + return true; + } + } + return false; + } + }; + module2.exports = Range; + var LRU = require_lrucache(); + var cache = new LRU(); + var parseOptions = require_parse_options(); + var Comparator = require_comparator(); + var debug = require_debug2(); + var SemVer = require_semver(); + var { + safeRe: re, + src, + t, + comparatorTrimReplace, + tildeTrimReplace, + caretTrimReplace + } = require_re(); + var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants8(); + var BUILDSTRIPRE = new RegExp(src[t.BUILD], "g"); + var isNullSet = (c) => c.value === "<0.0.0-0"; + var isAny = (c) => c.value === ""; + var isSatisfiable = (comparators, options) => { + let result = true; + const remainingComparators = comparators.slice(); + let testComparator = remainingComparators.pop(); + while (result && remainingComparators.length) { + result = remainingComparators.every((otherComparator) => { + return testComparator.intersects(otherComparator, options); + }); + testComparator = remainingComparators.pop(); + } + return result; + }; + var parseComparator = (comp, options) => { + comp = comp.replace(re[t.BUILD], ""); + debug("comp", comp, options); + comp = replaceCarets(comp, options); + debug("caret", comp); + comp = replaceTildes(comp, options); + debug("tildes", comp); + comp = replaceXRanges(comp, options); + debug("xrange", comp); + comp = replaceStars(comp, options); + debug("stars", comp); + return comp; + }; + var isX = (id) => !id || id.toLowerCase() === "x" || id === "*"; + var invalidXRangeOrder = (M, m, p) => isX(M) && !isX(m) || isX(m) && p && !isX(p); + var replaceTildes = (comp, options) => { + return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" "); + }; + var replaceTilde = (comp, options) => { + const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]; + const z = options.includePrerelease ? "-0" : ""; + return comp.replace(r, (_2, M, m, p, pr) => { + debug("tilde", comp, _2, M, m, p, pr); + let ret2; + if (isX(M)) { + ret2 = ""; + } else if (isX(m)) { + ret2 = `>=${M}.0.0${z} <${+M + 1}.0.0-0`; + } else if (isX(p)) { + ret2 = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`; + } else if (pr) { + debug("replaceTilde pr", pr); + ret2 = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; + } else { + ret2 = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`; + } + debug("tilde return", ret2); + return ret2; + }); + }; + var replaceCarets = (comp, options) => { + return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" "); + }; + var replaceCaret = (comp, options) => { + debug("caret", comp, options); + const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]; + const z = options.includePrerelease ? "-0" : ""; + return comp.replace(r, (_2, M, m, p, pr) => { + debug("caret", comp, _2, M, m, p, pr); + let ret2; + if (isX(M)) { + ret2 = ""; + } else if (isX(m)) { + ret2 = `>=${M}.0.0${z} <${+M + 1}.0.0-0`; + } else if (isX(p)) { + if (M === "0") { + ret2 = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`; + } else { + ret2 = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`; + } + } else if (pr) { + debug("replaceCaret pr", pr); + if (M === "0") { + if (m === "0") { + ret2 = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`; + } else { + ret2 = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`; + } + } else { + ret2 = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`; + } + } else { + debug("no pr"); + if (M === "0") { + if (m === "0") { + ret2 = `>=${M}.${m}.${p} <${M}.${m}.${+p + 1}-0`; + } else { + ret2 = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`; + } + } else { + ret2 = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`; + } + } + debug("caret return", ret2); + return ret2; + }); + }; + var replaceXRanges = (comp, options) => { + debug("replaceXRanges", comp, options); + return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" "); + }; + var replaceXRange = (comp, options) => { + comp = comp.trim(); + const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]; + return comp.replace(r, (ret2, gtlt, M, m, p, pr) => { + debug("xRange", comp, ret2, gtlt, M, m, p, pr); + if (invalidXRangeOrder(M, m, p)) { + return comp; + } + const xM = isX(M); + const xm = xM || isX(m); + const xp = xm || isX(p); + const anyX = xp; + if (gtlt === "=" && anyX) { + gtlt = ""; + } + pr = options.includePrerelease ? "-0" : ""; + if (xM) { + if (gtlt === ">" || gtlt === "<") { + ret2 = "<0.0.0-0"; + } else { + ret2 = "*"; + } + } else if (gtlt && anyX) { + if (xm) { + m = 0; + } + p = 0; + if (gtlt === ">") { + gtlt = ">="; + if (xm) { + M = +M + 1; + m = 0; + p = 0; + } else { + m = +m + 1; + p = 0; + } + } else if (gtlt === "<=") { + gtlt = "<"; + if (xm) { + M = +M + 1; + } else { + m = +m + 1; + } + } + if (gtlt === "<") { + pr = "-0"; + } + ret2 = `${gtlt + M}.${m}.${p}${pr}`; + } else if (xm) { + ret2 = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`; + } else if (xp) { + ret2 = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`; + } + debug("xRange return", ret2); + return ret2; + }); + }; + var replaceStars = (comp, options) => { + debug("replaceStars", comp, options); + return comp.trim().replace(re[t.STAR], ""); + }; + var replaceGTE0 = (comp, options) => { + debug("replaceGTE0", comp, options); + return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], ""); + }; + var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => { + if (isX(fM)) { + from = ""; + } else if (isX(fm)) { + from = `>=${fM}.0.0${incPr ? "-0" : ""}`; + } else if (isX(fp)) { + from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`; + } else if (fpr) { + from = `>=${from}`; + } else { + from = `>=${from}${incPr ? "-0" : ""}`; + } + if (isX(tM)) { + to = ""; + } else if (isX(tm)) { + to = `<${+tM + 1}.0.0-0`; + } else if (isX(tp)) { + to = `<${tM}.${+tm + 1}.0-0`; + } else if (tpr) { + to = `<=${tM}.${tm}.${tp}-${tpr}`; + } else if (incPr) { + to = `<${tM}.${tm}.${+tp + 1}-0`; + } else { + to = `<=${to}`; + } + return `${from} ${to}`.trim(); + }; + var testSet = (set, version2, options) => { + for (let i = 0; i < set.length; i++) { + if (!set[i].test(version2)) { + return false; + } + } + if (version2.prerelease.length && !options.includePrerelease) { + for (let i = 0; i < set.length; i++) { + debug(set[i].semver); + if (set[i].semver === Comparator.ANY) { + continue; + } + if (set[i].semver.prerelease.length > 0) { + const allowed = set[i].semver; + if (allowed.major === version2.major && allowed.minor === version2.minor && allowed.patch === version2.patch) { + return true; + } + } + } + return false; + } + return true; + }; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/comparator.js +var require_comparator = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/classes/comparator.js"(exports2, module2) { + "use strict"; + var ANY = Symbol("SemVer ANY"); + var Comparator = class _Comparator { + static get ANY() { + return ANY; + } + constructor(comp, options) { + options = parseOptions(options); + if (comp instanceof _Comparator) { + if (comp.loose === !!options.loose) { + return comp; + } else { + comp = comp.value; + } + } + comp = comp.trim().split(/\s+/).join(" "); + debug("comparator", comp, options); + this.options = options; + this.loose = !!options.loose; + this.parse(comp); + if (this.semver === ANY) { + this.value = ""; + } else { + this.value = this.operator + this.semver.version; + } + debug("comp", this); + } + parse(comp) { + const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]; + const m = comp.match(r); + if (!m) { + throw new TypeError(`Invalid comparator: ${comp}`); + } + this.operator = m[1] !== void 0 ? m[1] : ""; + if (this.operator === "=") { + this.operator = ""; + } + if (!m[2]) { + this.semver = ANY; + } else { + this.semver = new SemVer(m[2], this.options.loose); + } + } + toString() { + return this.value; + } + test(version2) { + debug("Comparator.test", version2, this.options.loose); + if (this.semver === ANY || version2 === ANY) { + return true; + } + if (typeof version2 === "string") { + try { + version2 = new SemVer(version2, this.options); + } catch (er) { + return false; + } + } + return cmp(version2, this.operator, this.semver, this.options); + } + intersects(comp, options) { + if (!(comp instanceof _Comparator)) { + throw new TypeError("a Comparator is required"); + } + if (this.operator === "") { + if (this.value === "") { + return true; + } + return new Range(comp.value, options).test(this.value); + } else if (comp.operator === "") { + if (comp.value === "") { + return true; + } + return new Range(this.value, options).test(comp.semver); + } + options = parseOptions(options); + if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) { + return false; + } + if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) { + return false; + } + if (this.operator.startsWith(">") && comp.operator.startsWith(">")) { + return true; + } + if (this.operator.startsWith("<") && comp.operator.startsWith("<")) { + return true; + } + if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) { + return true; + } + if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) { + return true; + } + if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) { + return true; + } + return false; + } + }; + module2.exports = Comparator; + var parseOptions = require_parse_options(); + var { safeRe: re, t } = require_re(); + var cmp = require_cmp(); + var debug = require_debug2(); + var SemVer = require_semver(); + var Range = require_range3(); + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/satisfies.js +var require_satisfies = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/functions/satisfies.js"(exports2, module2) { + "use strict"; + var Range = require_range3(); + var satisfies = (version2, range, options) => { + try { + range = new Range(range, options); + } catch (er) { + return false; + } + return range.test(version2); + }; + module2.exports = satisfies; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/to-comparators.js +var require_to_comparators = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/to-comparators.js"(exports2, module2) { + "use strict"; + var Range = require_range3(); + var toComparators = (range, options) => new Range(range, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" ")); + module2.exports = toComparators; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/max-satisfying.js +var require_max_satisfying = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/max-satisfying.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var Range = require_range3(); + var maxSatisfying = (versions, range, options) => { + let max = null; + let maxSV = null; + let rangeObj = null; + try { + rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + if (!max || maxSV.compare(v) === -1) { + max = v; + maxSV = new SemVer(max, options); + } + } + }); + return max; + }; + module2.exports = maxSatisfying; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-satisfying.js +var require_min_satisfying = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-satisfying.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var Range = require_range3(); + var minSatisfying = (versions, range, options) => { + let min = null; + let minSV = null; + let rangeObj = null; + try { + rangeObj = new Range(range, options); + } catch (er) { + return null; + } + versions.forEach((v) => { + if (rangeObj.test(v)) { + if (!min || minSV.compare(v) === 1) { + min = v; + minSV = new SemVer(min, options); + } + } + }); + return min; + }; + module2.exports = minSatisfying; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-version.js +var require_min_version = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/min-version.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var Range = require_range3(); + var gt = require_gt(); + var minVersion = (range, loose) => { + range = new Range(range, loose); + let minver = new SemVer("0.0.0"); + if (range.test(minver)) { + return minver; + } + minver = new SemVer("0.0.0-0"); + if (range.test(minver)) { + return minver; + } + minver = null; + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i]; + let setMin = null; + comparators.forEach((comparator) => { + const compver = new SemVer(comparator.semver.version); + switch (comparator.operator) { + case ">": + if (compver.prerelease.length === 0) { + compver.patch++; + } else { + compver.prerelease.push(0); + } + compver.raw = compver.format(); + /* fallthrough */ + case "": + case ">=": + if (!setMin || gt(compver, setMin)) { + setMin = compver; + } + break; + case "<": + case "<=": + break; + /* istanbul ignore next */ + default: + throw new Error(`Unexpected operation: ${comparator.operator}`); + } + }); + if (setMin && (!minver || gt(minver, setMin))) { + minver = setMin; + } + } + if (minver && range.test(minver)) { + return minver; + } + return null; + }; + module2.exports = minVersion; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/valid.js +var require_valid2 = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/valid.js"(exports2, module2) { + "use strict"; + var Range = require_range3(); + var validRange = (range, options) => { + try { + return new Range(range, options).range || "*"; + } catch (er) { + return null; + } + }; + module2.exports = validRange; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/outside.js +var require_outside = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/outside.js"(exports2, module2) { + "use strict"; + var SemVer = require_semver(); + var Comparator = require_comparator(); + var { ANY } = Comparator; + var Range = require_range3(); + var satisfies = require_satisfies(); + var gt = require_gt(); + var lt = require_lt(); + var lte = require_lte(); + var gte = require_gte(); + var outside = (version2, range, hilo, options) => { + version2 = new SemVer(version2, options); + range = new Range(range, options); + let gtfn, ltefn, ltfn, comp, ecomp; + switch (hilo) { + case ">": + gtfn = gt; + ltefn = lte; + ltfn = lt; + comp = ">"; + ecomp = ">="; + break; + case "<": + gtfn = lt; + ltefn = gte; + ltfn = gt; + comp = "<"; + ecomp = "<="; + break; + default: + throw new TypeError('Must provide a hilo val of "<" or ">"'); + } + if (satisfies(version2, range, options)) { + return false; + } + for (let i = 0; i < range.set.length; ++i) { + const comparators = range.set[i]; + let high = null; + let low = null; + comparators.forEach((comparator) => { + if (comparator.semver === ANY) { + comparator = new Comparator(">=0.0.0"); + } + high = high || comparator; + low = low || comparator; + if (gtfn(comparator.semver, high.semver, options)) { + high = comparator; + } else if (ltfn(comparator.semver, low.semver, options)) { + low = comparator; + } + }); + if (high.operator === comp || high.operator === ecomp) { + return false; + } + if ((!low.operator || low.operator === comp) && ltefn(version2, low.semver)) { + return false; + } else if (low.operator === ecomp && ltfn(version2, low.semver)) { + return false; + } + } + return true; + }; + module2.exports = outside; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/gtr.js +var require_gtr = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/gtr.js"(exports2, module2) { + "use strict"; + var outside = require_outside(); + var gtr = (version2, range, options) => outside(version2, range, ">", options); + module2.exports = gtr; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/ltr.js +var require_ltr = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/ltr.js"(exports2, module2) { + "use strict"; + var outside = require_outside(); + var ltr = (version2, range, options) => outside(version2, range, "<", options); + module2.exports = ltr; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/intersects.js +var require_intersects = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/intersects.js"(exports2, module2) { + "use strict"; + var Range = require_range3(); + var intersects = (r1, r2, options) => { + r1 = new Range(r1, options); + r2 = new Range(r2, options); + return r1.intersects(r2, options); + }; + module2.exports = intersects; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/simplify.js +var require_simplify = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/simplify.js"(exports2, module2) { + "use strict"; + var satisfies = require_satisfies(); + var compare = require_compare(); + module2.exports = (versions, range, options) => { + const set = []; + let first = null; + let prev = null; + const v = versions.sort((a, b) => compare(a, b, options)); + for (const version2 of v) { + const included = satisfies(version2, range, options); + if (included) { + prev = version2; + if (!first) { + first = version2; + } + } else { + if (prev) { + set.push([first, prev]); + } + prev = null; + first = null; + } + } + if (first) { + set.push([first, null]); + } + const ranges = []; + for (const [min, max] of set) { + if (min === max) { + ranges.push(min); + } else if (!max && min === v[0]) { + ranges.push("*"); + } else if (!max) { + ranges.push(`>=${min}`); + } else if (min === v[0]) { + ranges.push(`<=${max}`); + } else { + ranges.push(`${min} - ${max}`); + } + } + const simplified = ranges.join(" || "); + const original = typeof range.raw === "string" ? range.raw : String(range); + return simplified.length < original.length ? simplified : range; + }; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/subset.js +var require_subset = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/ranges/subset.js"(exports2, module2) { + "use strict"; + var Range = require_range3(); + var Comparator = require_comparator(); + var { ANY } = Comparator; + var satisfies = require_satisfies(); + var compare = require_compare(); + var subset = (sub, dom, options = {}) => { + if (sub === dom) { + return true; + } + sub = new Range(sub, options); + dom = new Range(dom, options); + let sawNonNull = false; + OUTER: for (const simpleSub of sub.set) { + for (const simpleDom of dom.set) { + const isSub = simpleSubset(simpleSub, simpleDom, options); + sawNonNull = sawNonNull || isSub !== null; + if (isSub) { + continue OUTER; + } + } + if (sawNonNull) { + return false; + } + } + return true; + }; + var minimumVersionWithPreRelease = [new Comparator(">=0.0.0-0")]; + var minimumVersion = [new Comparator(">=0.0.0")]; + var simpleSubset = (sub, dom, options) => { + if (sub === dom) { + return true; + } + if (sub.length === 1 && sub[0].semver === ANY) { + if (dom.length === 1 && dom[0].semver === ANY) { + return true; + } else if (options.includePrerelease) { + sub = minimumVersionWithPreRelease; + } else { + sub = minimumVersion; + } + } + if (dom.length === 1 && dom[0].semver === ANY) { + if (options.includePrerelease) { + return true; + } else { + dom = minimumVersion; + } + } + const eqSet = /* @__PURE__ */ new Set(); + let gt, lt; + for (const c of sub) { + if (c.operator === ">" || c.operator === ">=") { + gt = higherGT(gt, c, options); + } else if (c.operator === "<" || c.operator === "<=") { + lt = lowerLT(lt, c, options); + } else { + eqSet.add(c.semver); + } + } + if (eqSet.size > 1) { + return null; + } + let gtltComp; + if (gt && lt) { + gtltComp = compare(gt.semver, lt.semver, options); + if (gtltComp > 0) { + return null; + } else if (gtltComp === 0 && (gt.operator !== ">=" || lt.operator !== "<=")) { + return null; + } + } + for (const eq of eqSet) { + if (gt && !satisfies(eq, String(gt), options)) { + return null; + } + if (lt && !satisfies(eq, String(lt), options)) { + return null; + } + for (const c of dom) { + if (!satisfies(eq, String(c), options)) { + return false; + } + } + return true; + } + let higher, lower; + let hasDomLT, hasDomGT; + let needDomLTPre = lt && !options.includePrerelease && lt.semver.prerelease.length ? lt.semver : false; + let needDomGTPre = gt && !options.includePrerelease && gt.semver.prerelease.length ? gt.semver : false; + if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt.operator === "<" && needDomLTPre.prerelease[0] === 0) { + needDomLTPre = false; + } + for (const c of dom) { + hasDomGT = hasDomGT || c.operator === ">" || c.operator === ">="; + hasDomLT = hasDomLT || c.operator === "<" || c.operator === "<="; + if (gt) { + if (needDomGTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomGTPre.major && c.semver.minor === needDomGTPre.minor && c.semver.patch === needDomGTPre.patch) { + needDomGTPre = false; + } + } + if (c.operator === ">" || c.operator === ">=") { + higher = higherGT(gt, c, options); + if (higher === c && higher !== gt) { + return false; + } + } else if (gt.operator === ">=" && !c.test(gt.semver)) { + return false; + } + } + if (lt) { + if (needDomLTPre) { + if (c.semver.prerelease && c.semver.prerelease.length && c.semver.major === needDomLTPre.major && c.semver.minor === needDomLTPre.minor && c.semver.patch === needDomLTPre.patch) { + needDomLTPre = false; + } + } + if (c.operator === "<" || c.operator === "<=") { + lower = lowerLT(lt, c, options); + if (lower === c && lower !== lt) { + return false; + } + } else if (lt.operator === "<=" && !c.test(lt.semver)) { + return false; + } + } + if (!c.operator && (lt || gt) && gtltComp !== 0) { + return false; + } + } + if (gt && hasDomLT && !lt && gtltComp !== 0) { + return false; + } + if (lt && hasDomGT && !gt && gtltComp !== 0) { + return false; + } + if (needDomGTPre || needDomLTPre) { + return false; + } + return true; + }; + var higherGT = (a, b, options) => { + if (!a) { + return b; + } + const comp = compare(a.semver, b.semver, options); + return comp > 0 ? a : comp < 0 ? b : b.operator === ">" && a.operator === ">=" ? b : a; + }; + var lowerLT = (a, b, options) => { + if (!a) { + return b; + } + const comp = compare(a.semver, b.semver, options); + return comp < 0 ? a : comp > 0 ? b : b.operator === "<" && a.operator === "<=" ? b : a; + }; + module2.exports = subset; + } +}); + +// ../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/index.js +var require_semver2 = __commonJS({ + "../../node_modules/.pnpm/semver@7.8.5/node_modules/semver/index.js"(exports2, module2) { + "use strict"; + var internalRe = require_re(); + var constants = require_constants8(); + var SemVer = require_semver(); + var identifiers = require_identifiers(); + var parse2 = require_parse3(); + var valid = require_valid(); + var clean = require_clean(); + var inc = require_inc(); + var diff = require_diff(); + var major = require_major(); + var minor = require_minor(); + var patch = require_patch(); + var prerelease = require_prerelease(); + var compare = require_compare(); + var rcompare = require_rcompare(); + var compareLoose = require_compare_loose(); + var compareBuild = require_compare_build(); + var sort = require_sort(); + var rsort = require_rsort(); + var gt = require_gt(); + var lt = require_lt(); + var eq = require_eq(); + var neq = require_neq(); + var gte = require_gte(); + var lte = require_lte(); + var cmp = require_cmp(); + var coerce = require_coerce(); + var truncate = require_truncate(); + var Comparator = require_comparator(); + var Range = require_range3(); + var satisfies = require_satisfies(); + var toComparators = require_to_comparators(); + var maxSatisfying = require_max_satisfying(); + var minSatisfying = require_min_satisfying(); + var minVersion = require_min_version(); + var validRange = require_valid2(); + var outside = require_outside(); + var gtr = require_gtr(); + var ltr = require_ltr(); + var intersects = require_intersects(); + var simplifyRange = require_simplify(); + var subset = require_subset(); + module2.exports = { + parse: parse2, + valid, + clean, + inc, + diff, + major, + minor, + patch, + prerelease, + compare, + rcompare, + compareLoose, + compareBuild, + sort, + rsort, + gt, + lt, + eq, + neq, + gte, + lte, + cmp, + coerce, + truncate, + Comparator, + Range, + satisfies, + toComparators, + maxSatisfying, + minSatisfying, + minVersion, + validRange, + outside, + gtr, + ltr, + intersects, + simplifyRange, + subset, + SemVer, + re: internalRe.re, + src: internalRe.src, + tokens: internalRe.t, + SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION, + RELEASE_TYPES: constants.RELEASE_TYPES, + compareIdentifiers: identifiers.compareIdentifiers, + rcompareIdentifiers: identifiers.rcompareIdentifiers + }; + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js +var require_asymmetricKeyDetailsSupported = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/asymmetricKeyDetailsSupported.js"(exports2, module2) { + var semver = require_semver2(); + module2.exports = semver.satisfies(process.version, ">=15.7.0"); + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/rsaPssKeyDetailsSupported.js +var require_rsaPssKeyDetailsSupported = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/rsaPssKeyDetailsSupported.js"(exports2, module2) { + var semver = require_semver2(); + module2.exports = semver.satisfies(process.version, ">=16.9.0"); + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/validateAsymmetricKey.js +var require_validateAsymmetricKey = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/validateAsymmetricKey.js"(exports2, module2) { + var ASYMMETRIC_KEY_DETAILS_SUPPORTED = require_asymmetricKeyDetailsSupported(); + var RSA_PSS_KEY_DETAILS_SUPPORTED = require_rsaPssKeyDetailsSupported(); + var allowedAlgorithmsForKeys = { + "ec": ["ES256", "ES384", "ES512"], + "rsa": ["RS256", "PS256", "RS384", "PS384", "RS512", "PS512"], + "rsa-pss": ["PS256", "PS384", "PS512"] + }; + var allowedCurves = { + ES256: "prime256v1", + ES384: "secp384r1", + ES512: "secp521r1" + }; + module2.exports = function(algorithm, key) { + if (!algorithm || !key) return; + const keyType = key.asymmetricKeyType; + if (!keyType) return; + const allowedAlgorithms = allowedAlgorithmsForKeys[keyType]; + if (!allowedAlgorithms) { + throw new Error(`Unknown key type "${keyType}".`); + } + if (!allowedAlgorithms.includes(algorithm)) { + throw new Error(`"alg" parameter for "${keyType}" key type must be one of: ${allowedAlgorithms.join(", ")}.`); + } + if (ASYMMETRIC_KEY_DETAILS_SUPPORTED) { + switch (keyType) { + case "ec": + const keyCurve = key.asymmetricKeyDetails.namedCurve; + const allowedCurve = allowedCurves[algorithm]; + if (keyCurve !== allowedCurve) { + throw new Error(`"alg" parameter "${algorithm}" requires curve "${allowedCurve}".`); + } + break; + case "rsa-pss": + if (RSA_PSS_KEY_DETAILS_SUPPORTED) { + const length = parseInt(algorithm.slice(-3), 10); + const { hashAlgorithm, mgf1HashAlgorithm, saltLength } = key.asymmetricKeyDetails; + if (hashAlgorithm !== `sha${length}` || mgf1HashAlgorithm !== hashAlgorithm) { + throw new Error(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${algorithm}.`); + } + if (saltLength !== void 0 && saltLength > length >> 3) { + throw new Error(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${algorithm}.`); + } + } + break; + } + } + }; + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/psSupported.js +var require_psSupported = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/lib/psSupported.js"(exports2, module2) { + var semver = require_semver2(); + module2.exports = semver.satisfies(process.version, "^6.12.0 || >=8.0.0"); + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/verify.js +var require_verify = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/verify.js"(exports2, module2) { + var JsonWebTokenError2 = require_JsonWebTokenError(); + var NotBeforeError2 = require_NotBeforeError(); + var TokenExpiredError2 = require_TokenExpiredError(); + var decode = require_decode(); + var timespan = require_timespan(); + var validateAsymmetricKey = require_validateAsymmetricKey(); + var PS_SUPPORTED = require_psSupported(); + var jws = require_jws(); + var { KeyObject, createSecretKey, createPublicKey } = require("crypto"); + var PUB_KEY_ALGS = ["RS256", "RS384", "RS512"]; + var EC_KEY_ALGS = ["ES256", "ES384", "ES512"]; + var RSA_KEY_ALGS = ["RS256", "RS384", "RS512"]; + var HS_ALGS = ["HS256", "HS384", "HS512"]; + if (PS_SUPPORTED) { + PUB_KEY_ALGS.splice(PUB_KEY_ALGS.length, 0, "PS256", "PS384", "PS512"); + RSA_KEY_ALGS.splice(RSA_KEY_ALGS.length, 0, "PS256", "PS384", "PS512"); + } + module2.exports = function(jwtString, secretOrPublicKey, options, callback) { + if (typeof options === "function" && !callback) { + callback = options; + options = {}; + } + if (!options) { + options = {}; + } + options = Object.assign({}, options); + let done; + if (callback) { + done = callback; + } else { + done = function(err, data) { + if (err) throw err; + return data; + }; + } + if (options.clockTimestamp && typeof options.clockTimestamp !== "number") { + return done(new JsonWebTokenError2("clockTimestamp must be a number")); + } + if (options.nonce !== void 0 && (typeof options.nonce !== "string" || options.nonce.trim() === "")) { + return done(new JsonWebTokenError2("nonce must be a non-empty string")); + } + if (options.allowInvalidAsymmetricKeyTypes !== void 0 && typeof options.allowInvalidAsymmetricKeyTypes !== "boolean") { + return done(new JsonWebTokenError2("allowInvalidAsymmetricKeyTypes must be a boolean")); + } + const clockTimestamp = options.clockTimestamp || Math.floor(Date.now() / 1e3); + if (!jwtString) { + return done(new JsonWebTokenError2("jwt must be provided")); + } + if (typeof jwtString !== "string") { + return done(new JsonWebTokenError2("jwt must be a string")); + } + const parts = jwtString.split("."); + if (parts.length !== 3) { + return done(new JsonWebTokenError2("jwt malformed")); + } + let decodedToken; + try { + decodedToken = decode(jwtString, { complete: true }); + } catch (err) { + return done(err); + } + if (!decodedToken) { + return done(new JsonWebTokenError2("invalid token")); + } + const header = decodedToken.header; + let getSecret; + if (typeof secretOrPublicKey === "function") { + if (!callback) { + return done(new JsonWebTokenError2("verify must be called asynchronous if secret or public key is provided as a callback")); + } + getSecret = secretOrPublicKey; + } else { + getSecret = function(header2, secretCallback) { + return secretCallback(null, secretOrPublicKey); + }; + } + return getSecret(header, function(err, secretOrPublicKey2) { + if (err) { + return done(new JsonWebTokenError2("error in secret or public key callback: " + err.message)); + } + const hasSignature = parts[2].trim() !== ""; + if (!hasSignature && secretOrPublicKey2) { + return done(new JsonWebTokenError2("jwt signature is required")); + } + if (hasSignature && !secretOrPublicKey2) { + return done(new JsonWebTokenError2("secret or public key must be provided")); + } + if (!hasSignature && !options.algorithms) { + return done(new JsonWebTokenError2('please specify "none" in "algorithms" to verify unsigned tokens')); + } + if (secretOrPublicKey2 != null && !(secretOrPublicKey2 instanceof KeyObject)) { + try { + secretOrPublicKey2 = createPublicKey(secretOrPublicKey2); + } catch (_2) { + try { + secretOrPublicKey2 = createSecretKey(typeof secretOrPublicKey2 === "string" ? Buffer.from(secretOrPublicKey2) : secretOrPublicKey2); + } catch (_3) { + return done(new JsonWebTokenError2("secretOrPublicKey is not valid key material")); + } + } + } + if (!options.algorithms) { + if (secretOrPublicKey2.type === "secret") { + options.algorithms = HS_ALGS; + } else if (["rsa", "rsa-pss"].includes(secretOrPublicKey2.asymmetricKeyType)) { + options.algorithms = RSA_KEY_ALGS; + } else if (secretOrPublicKey2.asymmetricKeyType === "ec") { + options.algorithms = EC_KEY_ALGS; + } else { + options.algorithms = PUB_KEY_ALGS; + } + } + if (options.algorithms.indexOf(decodedToken.header.alg) === -1) { + return done(new JsonWebTokenError2("invalid algorithm")); + } + if (header.alg.startsWith("HS") && secretOrPublicKey2.type !== "secret") { + return done(new JsonWebTokenError2(`secretOrPublicKey must be a symmetric key when using ${header.alg}`)); + } else if (/^(?:RS|PS|ES)/.test(header.alg) && secretOrPublicKey2.type !== "public") { + return done(new JsonWebTokenError2(`secretOrPublicKey must be an asymmetric key when using ${header.alg}`)); + } + if (!options.allowInvalidAsymmetricKeyTypes) { + try { + validateAsymmetricKey(header.alg, secretOrPublicKey2); + } catch (e) { + return done(e); + } + } + let valid; + try { + valid = jws.verify(jwtString, decodedToken.header.alg, secretOrPublicKey2); + } catch (e) { + return done(e); + } + if (!valid) { + return done(new JsonWebTokenError2("invalid signature")); + } + const payload = decodedToken.payload; + if (typeof payload.nbf !== "undefined" && !options.ignoreNotBefore) { + if (typeof payload.nbf !== "number") { + return done(new JsonWebTokenError2("invalid nbf value")); + } + if (payload.nbf > clockTimestamp + (options.clockTolerance || 0)) { + return done(new NotBeforeError2("jwt not active", new Date(payload.nbf * 1e3))); + } + } + if (typeof payload.exp !== "undefined" && !options.ignoreExpiration) { + if (typeof payload.exp !== "number") { + return done(new JsonWebTokenError2("invalid exp value")); + } + if (clockTimestamp >= payload.exp + (options.clockTolerance || 0)) { + return done(new TokenExpiredError2("jwt expired", new Date(payload.exp * 1e3))); + } + } + if (options.audience) { + const audiences = Array.isArray(options.audience) ? options.audience : [options.audience]; + const target = Array.isArray(payload.aud) ? payload.aud : [payload.aud]; + const match = target.some(function(targetAudience) { + return audiences.some(function(audience) { + return audience instanceof RegExp ? audience.test(targetAudience) : audience === targetAudience; + }); + }); + if (!match) { + return done(new JsonWebTokenError2("jwt audience invalid. expected: " + audiences.join(" or "))); + } + } + if (options.issuer) { + const invalid_issuer = typeof options.issuer === "string" && payload.iss !== options.issuer || Array.isArray(options.issuer) && options.issuer.indexOf(payload.iss) === -1; + if (invalid_issuer) { + return done(new JsonWebTokenError2("jwt issuer invalid. expected: " + options.issuer)); + } + } + if (options.subject) { + if (payload.sub !== options.subject) { + return done(new JsonWebTokenError2("jwt subject invalid. expected: " + options.subject)); + } + } + if (options.jwtid) { + if (payload.jti !== options.jwtid) { + return done(new JsonWebTokenError2("jwt jwtid invalid. expected: " + options.jwtid)); + } + } + if (options.nonce) { + if (payload.nonce !== options.nonce) { + return done(new JsonWebTokenError2("jwt nonce invalid. expected: " + options.nonce)); + } + } + if (options.maxAge) { + if (typeof payload.iat !== "number") { + return done(new JsonWebTokenError2("iat required when maxAge is specified")); + } + const maxAgeTimestamp = timespan(options.maxAge, payload.iat); + if (typeof maxAgeTimestamp === "undefined") { + return done(new JsonWebTokenError2('"maxAge" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60')); + } + if (clockTimestamp >= maxAgeTimestamp + (options.clockTolerance || 0)) { + return done(new TokenExpiredError2("maxAge exceeded", new Date(maxAgeTimestamp * 1e3))); + } + } + if (options.complete === true) { + const signature = decodedToken.signature; + return done(null, { + header, + payload, + signature + }); + } + return done(null, payload); + }); + }; + } +}); + +// ../../node_modules/.pnpm/lodash.includes@4.3.0/node_modules/lodash.includes/index.js +var require_lodash = __commonJS({ + "../../node_modules/.pnpm/lodash.includes@4.3.0/node_modules/lodash.includes/index.js"(exports2, module2) { + var INFINITY = 1 / 0; + var MAX_SAFE_INTEGER = 9007199254740991; + var MAX_INTEGER = 17976931348623157e292; + var NAN = 0 / 0; + var argsTag = "[object Arguments]"; + var funcTag = "[object Function]"; + var genTag = "[object GeneratorFunction]"; + var stringTag = "[object String]"; + var symbolTag = "[object Symbol]"; + var reTrim = /^\s+|\s+$/g; + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + var reIsBinary = /^0b[01]+$/i; + var reIsOctal = /^0o[0-7]+$/i; + var reIsUint = /^(?:0|[1-9]\d*)$/; + var freeParseInt = parseInt; + function arrayMap(array, iteratee) { + var index = -1, length = array ? array.length : 0, result = Array(length); + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, index = fromIndex + (fromRight ? 1 : -1); + while (fromRight ? index-- : ++index < length) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + function baseIndexOf(array, value, fromIndex) { + if (value !== value) { + return baseFindIndex(array, baseIsNaN, fromIndex); + } + var index = fromIndex - 1, length = array.length; + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + function baseIsNaN(value) { + return value !== value; + } + function baseTimes(n, iteratee) { + var index = -1, result = Array(n); + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + function baseValues(object, props) { + return arrayMap(props, function(key) { + return object[key]; + }); + } + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + var objectToString = objectProto.toString; + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + var nativeKeys = overArg(Object.keys, Object); + var nativeMax = Math.max; + function arrayLikeKeys(value, inherited) { + var result = isArray(value) || isArguments(value) ? baseTimes(value.length, String) : []; + var length = result.length, skipIndexes = !!length; + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isIndex(key, length)))) { + result.push(key); + } + } + return result; + } + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != "constructor") { + result.push(key); + } + } + return result; + } + function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && (typeof value == "number" || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); + } + function isPrototype(value) { + var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto; + return value === proto; + } + function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0; + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + return isString(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1; + } + function isArguments(value) { + return isArrayLikeObject(value) && hasOwnProperty.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString.call(value) == argsTag); + } + var isArray = Array.isArray; + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + function isFunction(value) { + var tag = isObject2(value) ? objectToString.call(value) : ""; + return tag == funcTag || tag == genTag; + } + function isLength(value) { + return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + function isObject2(value) { + var type = typeof value; + return !!value && (type == "object" || type == "function"); + } + function isObjectLike(value) { + return !!value && typeof value == "object"; + } + function isString(value) { + return typeof value == "string" || !isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag; + } + function isSymbol(value) { + return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag; + } + function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = value < 0 ? -1 : 1; + return sign * MAX_INTEGER; + } + return value === value ? value : 0; + } + function toInteger(value) { + var result = toFinite(value), remainder = result % 1; + return result === result ? remainder ? result - remainder : result : 0; + } + function toNumber(value) { + if (typeof value == "number") { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject2(value)) { + var other = typeof value.valueOf == "function" ? value.valueOf() : value; + value = isObject2(other) ? other + "" : other; + } + if (typeof value != "string") { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ""); + var isBinary = reIsBinary.test(value); + return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value; + } + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + function values(object) { + return object ? baseValues(object, keys(object)) : []; + } + module2.exports = includes; + } +}); + +// ../../node_modules/.pnpm/lodash.isboolean@3.0.3/node_modules/lodash.isboolean/index.js +var require_lodash2 = __commonJS({ + "../../node_modules/.pnpm/lodash.isboolean@3.0.3/node_modules/lodash.isboolean/index.js"(exports2, module2) { + var boolTag = "[object Boolean]"; + var objectProto = Object.prototype; + var objectToString = objectProto.toString; + function isBoolean(value) { + return value === true || value === false || isObjectLike(value) && objectToString.call(value) == boolTag; + } + function isObjectLike(value) { + return !!value && typeof value == "object"; + } + module2.exports = isBoolean; + } +}); + +// ../../node_modules/.pnpm/lodash.isinteger@4.0.4/node_modules/lodash.isinteger/index.js +var require_lodash3 = __commonJS({ + "../../node_modules/.pnpm/lodash.isinteger@4.0.4/node_modules/lodash.isinteger/index.js"(exports2, module2) { + var INFINITY = 1 / 0; + var MAX_INTEGER = 17976931348623157e292; + var NAN = 0 / 0; + var symbolTag = "[object Symbol]"; + var reTrim = /^\s+|\s+$/g; + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + var reIsBinary = /^0b[01]+$/i; + var reIsOctal = /^0o[0-7]+$/i; + var freeParseInt = parseInt; + var objectProto = Object.prototype; + var objectToString = objectProto.toString; + function isInteger(value) { + return typeof value == "number" && value == toInteger(value); + } + function isObject2(value) { + var type = typeof value; + return !!value && (type == "object" || type == "function"); + } + function isObjectLike(value) { + return !!value && typeof value == "object"; + } + function isSymbol(value) { + return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag; + } + function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = value < 0 ? -1 : 1; + return sign * MAX_INTEGER; + } + return value === value ? value : 0; + } + function toInteger(value) { + var result = toFinite(value), remainder = result % 1; + return result === result ? remainder ? result - remainder : result : 0; + } + function toNumber(value) { + if (typeof value == "number") { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject2(value)) { + var other = typeof value.valueOf == "function" ? value.valueOf() : value; + value = isObject2(other) ? other + "" : other; + } + if (typeof value != "string") { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ""); + var isBinary = reIsBinary.test(value); + return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value; + } + module2.exports = isInteger; + } +}); + +// ../../node_modules/.pnpm/lodash.isnumber@3.0.3/node_modules/lodash.isnumber/index.js +var require_lodash4 = __commonJS({ + "../../node_modules/.pnpm/lodash.isnumber@3.0.3/node_modules/lodash.isnumber/index.js"(exports2, module2) { + var numberTag = "[object Number]"; + var objectProto = Object.prototype; + var objectToString = objectProto.toString; + function isObjectLike(value) { + return !!value && typeof value == "object"; + } + function isNumber(value) { + return typeof value == "number" || isObjectLike(value) && objectToString.call(value) == numberTag; + } + module2.exports = isNumber; + } +}); + +// ../../node_modules/.pnpm/lodash.isplainobject@4.0.6/node_modules/lodash.isplainobject/index.js +var require_lodash5 = __commonJS({ + "../../node_modules/.pnpm/lodash.isplainobject@4.0.6/node_modules/lodash.isplainobject/index.js"(exports2, module2) { + var objectTag = "[object Object]"; + function isHostObject(value) { + var result = false; + if (value != null && typeof value.toString != "function") { + try { + result = !!(value + ""); + } catch (e) { + } + } + return result; + } + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + var funcProto = Function.prototype; + var objectProto = Object.prototype; + var funcToString = funcProto.toString; + var hasOwnProperty = objectProto.hasOwnProperty; + var objectCtorString = funcToString.call(Object); + var objectToString = objectProto.toString; + var getPrototype = overArg(Object.getPrototypeOf, Object); + function isObjectLike(value) { + return !!value && typeof value == "object"; + } + function isPlainObject(value) { + if (!isObjectLike(value) || objectToString.call(value) != objectTag || isHostObject(value)) { + return false; + } + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, "constructor") && proto.constructor; + return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString; + } + module2.exports = isPlainObject; + } +}); + +// ../../node_modules/.pnpm/lodash.isstring@4.0.1/node_modules/lodash.isstring/index.js +var require_lodash6 = __commonJS({ + "../../node_modules/.pnpm/lodash.isstring@4.0.1/node_modules/lodash.isstring/index.js"(exports2, module2) { + var stringTag = "[object String]"; + var objectProto = Object.prototype; + var objectToString = objectProto.toString; + var isArray = Array.isArray; + function isObjectLike(value) { + return !!value && typeof value == "object"; + } + function isString(value) { + return typeof value == "string" || !isArray(value) && isObjectLike(value) && objectToString.call(value) == stringTag; + } + module2.exports = isString; + } +}); + +// ../../node_modules/.pnpm/lodash.once@4.1.1/node_modules/lodash.once/index.js +var require_lodash7 = __commonJS({ + "../../node_modules/.pnpm/lodash.once@4.1.1/node_modules/lodash.once/index.js"(exports2, module2) { + var FUNC_ERROR_TEXT = "Expected a function"; + var INFINITY = 1 / 0; + var MAX_INTEGER = 17976931348623157e292; + var NAN = 0 / 0; + var symbolTag = "[object Symbol]"; + var reTrim = /^\s+|\s+$/g; + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + var reIsBinary = /^0b[01]+$/i; + var reIsOctal = /^0o[0-7]+$/i; + var freeParseInt = parseInt; + var objectProto = Object.prototype; + var objectToString = objectProto.toString; + function before(n, func) { + var result; + if (typeof func != "function") { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = void 0; + } + return result; + }; + } + function once(func) { + return before(2, func); + } + function isObject2(value) { + var type = typeof value; + return !!value && (type == "object" || type == "function"); + } + function isObjectLike(value) { + return !!value && typeof value == "object"; + } + function isSymbol(value) { + return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag; + } + function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; + } + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = value < 0 ? -1 : 1; + return sign * MAX_INTEGER; + } + return value === value ? value : 0; + } + function toInteger(value) { + var result = toFinite(value), remainder = result % 1; + return result === result ? remainder ? result - remainder : result : 0; + } + function toNumber(value) { + if (typeof value == "number") { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject2(value)) { + var other = typeof value.valueOf == "function" ? value.valueOf() : value; + value = isObject2(other) ? other + "" : other; + } + if (typeof value != "string") { + return value === 0 ? value : +value; + } + value = value.replace(reTrim, ""); + var isBinary = reIsBinary.test(value); + return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value; + } + module2.exports = once; + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/sign.js +var require_sign2 = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/sign.js"(exports2, module2) { + var timespan = require_timespan(); + var PS_SUPPORTED = require_psSupported(); + var validateAsymmetricKey = require_validateAsymmetricKey(); + var jws = require_jws(); + var includes = require_lodash(); + var isBoolean = require_lodash2(); + var isInteger = require_lodash3(); + var isNumber = require_lodash4(); + var isPlainObject = require_lodash5(); + var isString = require_lodash6(); + var once = require_lodash7(); + var { KeyObject, createSecretKey, createPrivateKey } = require("crypto"); + var SUPPORTED_ALGS = ["RS256", "RS384", "RS512", "ES256", "ES384", "ES512", "HS256", "HS384", "HS512", "none"]; + if (PS_SUPPORTED) { + SUPPORTED_ALGS.splice(3, 0, "PS256", "PS384", "PS512"); + } + var sign_options_schema = { + expiresIn: { isValid: function(value) { + return isInteger(value) || isString(value) && value; + }, message: '"expiresIn" should be a number of seconds or string representing a timespan' }, + notBefore: { isValid: function(value) { + return isInteger(value) || isString(value) && value; + }, message: '"notBefore" should be a number of seconds or string representing a timespan' }, + audience: { isValid: function(value) { + return isString(value) || Array.isArray(value); + }, message: '"audience" must be a string or array' }, + algorithm: { isValid: includes.bind(null, SUPPORTED_ALGS), message: '"algorithm" must be a valid string enum value' }, + header: { isValid: isPlainObject, message: '"header" must be an object' }, + encoding: { isValid: isString, message: '"encoding" must be a string' }, + issuer: { isValid: isString, message: '"issuer" must be a string' }, + subject: { isValid: isString, message: '"subject" must be a string' }, + jwtid: { isValid: isString, message: '"jwtid" must be a string' }, + noTimestamp: { isValid: isBoolean, message: '"noTimestamp" must be a boolean' }, + keyid: { isValid: isString, message: '"keyid" must be a string' }, + mutatePayload: { isValid: isBoolean, message: '"mutatePayload" must be a boolean' }, + allowInsecureKeySizes: { isValid: isBoolean, message: '"allowInsecureKeySizes" must be a boolean' }, + allowInvalidAsymmetricKeyTypes: { isValid: isBoolean, message: '"allowInvalidAsymmetricKeyTypes" must be a boolean' } + }; + var registered_claims_schema = { + iat: { isValid: isNumber, message: '"iat" should be a number of seconds' }, + exp: { isValid: isNumber, message: '"exp" should be a number of seconds' }, + nbf: { isValid: isNumber, message: '"nbf" should be a number of seconds' } + }; + function validate2(schema, allowUnknown, object, parameterName) { + if (!isPlainObject(object)) { + throw new Error('Expected "' + parameterName + '" to be a plain object.'); + } + Object.keys(object).forEach(function(key) { + const validator = schema[key]; + if (!validator) { + if (!allowUnknown) { + throw new Error('"' + key + '" is not allowed in "' + parameterName + '"'); + } + return; + } + if (!validator.isValid(object[key])) { + throw new Error(validator.message); + } + }); + } + function validateOptions(options) { + return validate2(sign_options_schema, false, options, "options"); + } + function validatePayload(payload) { + return validate2(registered_claims_schema, true, payload, "payload"); + } + var options_to_payload = { + "audience": "aud", + "issuer": "iss", + "subject": "sub", + "jwtid": "jti" + }; + var options_for_objects = [ + "expiresIn", + "notBefore", + "noTimestamp", + "audience", + "issuer", + "subject", + "jwtid" + ]; + module2.exports = function(payload, secretOrPrivateKey, options, callback) { + if (typeof options === "function") { + callback = options; + options = {}; + } else { + options = options || {}; + } + const isObjectPayload = typeof payload === "object" && !Buffer.isBuffer(payload); + const header = Object.assign({ + alg: options.algorithm || "HS256", + typ: isObjectPayload ? "JWT" : void 0, + kid: options.keyid + }, options.header); + function failure(err) { + if (callback) { + return callback(err); + } + throw err; + } + if (!secretOrPrivateKey && options.algorithm !== "none") { + return failure(new Error("secretOrPrivateKey must have a value")); + } + if (secretOrPrivateKey != null && !(secretOrPrivateKey instanceof KeyObject)) { + try { + secretOrPrivateKey = createPrivateKey(secretOrPrivateKey); + } catch (_2) { + try { + secretOrPrivateKey = createSecretKey(typeof secretOrPrivateKey === "string" ? Buffer.from(secretOrPrivateKey) : secretOrPrivateKey); + } catch (_3) { + return failure(new Error("secretOrPrivateKey is not valid key material")); + } + } + } + if (header.alg.startsWith("HS") && secretOrPrivateKey.type !== "secret") { + return failure(new Error(`secretOrPrivateKey must be a symmetric key when using ${header.alg}`)); + } else if (/^(?:RS|PS|ES)/.test(header.alg)) { + if (secretOrPrivateKey.type !== "private") { + return failure(new Error(`secretOrPrivateKey must be an asymmetric key when using ${header.alg}`)); + } + if (!options.allowInsecureKeySizes && !header.alg.startsWith("ES") && secretOrPrivateKey.asymmetricKeyDetails !== void 0 && //KeyObject.asymmetricKeyDetails is supported in Node 15+ + secretOrPrivateKey.asymmetricKeyDetails.modulusLength < 2048) { + return failure(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${header.alg}`)); + } + } + if (typeof payload === "undefined") { + return failure(new Error("payload is required")); + } else if (isObjectPayload) { + try { + validatePayload(payload); + } catch (error) { + return failure(error); + } + if (!options.mutatePayload) { + payload = Object.assign({}, payload); + } + } else { + const invalid_options = options_for_objects.filter(function(opt) { + return typeof options[opt] !== "undefined"; + }); + if (invalid_options.length > 0) { + return failure(new Error("invalid " + invalid_options.join(",") + " option for " + typeof payload + " payload")); + } + } + if (typeof payload.exp !== "undefined" && typeof options.expiresIn !== "undefined") { + return failure(new Error('Bad "options.expiresIn" option the payload already has an "exp" property.')); + } + if (typeof payload.nbf !== "undefined" && typeof options.notBefore !== "undefined") { + return failure(new Error('Bad "options.notBefore" option the payload already has an "nbf" property.')); + } + try { + validateOptions(options); + } catch (error) { + return failure(error); + } + if (!options.allowInvalidAsymmetricKeyTypes) { + try { + validateAsymmetricKey(header.alg, secretOrPrivateKey); + } catch (error) { + return failure(error); + } + } + const timestamp = payload.iat || Math.floor(Date.now() / 1e3); + if (options.noTimestamp) { + delete payload.iat; + } else if (isObjectPayload) { + payload.iat = timestamp; + } + if (typeof options.notBefore !== "undefined") { + try { + payload.nbf = timespan(options.notBefore, timestamp); + } catch (err) { + return failure(err); + } + if (typeof payload.nbf === "undefined") { + return failure(new Error('"notBefore" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60')); + } + } + if (typeof options.expiresIn !== "undefined" && typeof payload === "object") { + try { + payload.exp = timespan(options.expiresIn, timestamp); + } catch (err) { + return failure(err); + } + if (typeof payload.exp === "undefined") { + return failure(new Error('"expiresIn" should be a number of seconds or string representing a timespan eg: "1d", "20h", 60')); + } + } + Object.keys(options_to_payload).forEach(function(key) { + const claim = options_to_payload[key]; + if (typeof options[key] !== "undefined") { + if (typeof payload[claim] !== "undefined") { + return failure(new Error('Bad "options.' + key + '" option. The payload already has an "' + claim + '" property.')); + } + payload[claim] = options[key]; + } + }); + const encoding = options.encoding || "utf8"; + if (typeof callback === "function") { + callback = callback && once(callback); + jws.createSign({ + header, + privateKey: secretOrPrivateKey, + payload, + encoding + }).once("error", callback).once("done", function(signature) { + if (!options.allowInsecureKeySizes && /^(?:RS|PS)/.test(header.alg) && signature.length < 256) { + return callback(new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${header.alg}`)); + } + callback(null, signature); + }); + } else { + let signature = jws.sign({ header, payload, secret: secretOrPrivateKey, encoding }); + if (!options.allowInsecureKeySizes && /^(?:RS|PS)/.test(header.alg) && signature.length < 256) { + throw new Error(`secretOrPrivateKey has a minimum key size of 2048 bits for ${header.alg}`); + } + return signature; + } + }; + } +}); + +// ../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/index.js +var require_jsonwebtoken = __commonJS({ + "../../node_modules/.pnpm/jsonwebtoken@9.0.3/node_modules/jsonwebtoken/index.js"(exports2, module2) { + module2.exports = { + decode: require_decode(), + verify: require_verify(), + sign: require_sign2(), + JsonWebTokenError: require_JsonWebTokenError(), + NotBeforeError: require_NotBeforeError(), + TokenExpiredError: require_TokenExpiredError() + }; + } +}); + +// ../../node_modules/.pnpm/@nestjs+jwt@12.0.1_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_zbpccjiygvsshg6zwdywiadlwy/node_modules/@nestjs/jwt/dist/interfaces/jwt-module-options.interface.js +var JwtSecretRequestType; +var init_jwt_module_options_interface = __esm({ + "../../node_modules/.pnpm/@nestjs+jwt@12.0.1_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_zbpccjiygvsshg6zwdywiadlwy/node_modules/@nestjs/jwt/dist/interfaces/jwt-module-options.interface.js"() { + (function(JwtSecretRequestType2) { + JwtSecretRequestType2[JwtSecretRequestType2["SIGN"] = 0] = "SIGN"; + JwtSecretRequestType2[JwtSecretRequestType2["VERIFY"] = 1] = "VERIFY"; + })(JwtSecretRequestType || (JwtSecretRequestType = {})); + } +}); + +// ../../node_modules/.pnpm/@nestjs+jwt@12.0.1_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_zbpccjiygvsshg6zwdywiadlwy/node_modules/@nestjs/jwt/dist/interfaces/index.js +var init_interfaces = __esm({ + "../../node_modules/.pnpm/@nestjs+jwt@12.0.1_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_zbpccjiygvsshg6zwdywiadlwy/node_modules/@nestjs/jwt/dist/interfaces/index.js"() { + init_jwt_module_options_interface(); + } +}); + +// ../../node_modules/.pnpm/@nestjs+jwt@12.0.1_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_zbpccjiygvsshg6zwdywiadlwy/node_modules/@nestjs/jwt/dist/jwt.errors.js +var WrongSecretProviderError; +var init_jwt_errors = __esm({ + "../../node_modules/.pnpm/@nestjs+jwt@12.0.1_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_zbpccjiygvsshg6zwdywiadlwy/node_modules/@nestjs/jwt/dist/jwt.errors.js"() { + WrongSecretProviderError = class extends Error { + }; + } +}); + +// ../../node_modules/.pnpm/@nestjs+jwt@12.0.1_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_zbpccjiygvsshg6zwdywiadlwy/node_modules/@nestjs/jwt/dist/jwt.constants.js +var JWT_MODULE_OPTIONS; +var init_jwt_constants = __esm({ + "../../node_modules/.pnpm/@nestjs+jwt@12.0.1_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_zbpccjiygvsshg6zwdywiadlwy/node_modules/@nestjs/jwt/dist/jwt.constants.js"() { + JWT_MODULE_OPTIONS = "JWT_MODULE_OPTIONS"; + } +}); + +// ../../node_modules/.pnpm/@nestjs+jwt@12.0.1_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_zbpccjiygvsshg6zwdywiadlwy/node_modules/@nestjs/jwt/dist/jwt.providers.js +function createJwtProvider(options) { + return [{ provide: JWT_MODULE_OPTIONS, useValue: options || {} }]; +} +var init_jwt_providers = __esm({ + "../../node_modules/.pnpm/@nestjs+jwt@12.0.1_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_zbpccjiygvsshg6zwdywiadlwy/node_modules/@nestjs/jwt/dist/jwt.providers.js"() { + init_jwt_constants(); + } +}); + +// ../../node_modules/.pnpm/@nestjs+jwt@12.0.1_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_zbpccjiygvsshg6zwdywiadlwy/node_modules/@nestjs/jwt/dist/jwt.service.js +var import_common, import_jsonwebtoken, __decorate2, __metadata2, __param2, JwtService; +var init_jwt_service = __esm({ + "../../node_modules/.pnpm/@nestjs+jwt@12.0.1_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_zbpccjiygvsshg6zwdywiadlwy/node_modules/@nestjs/jwt/dist/jwt.service.js"() { + import_common = __toESM(require_common(), 1); + import_jsonwebtoken = __toESM(require_jsonwebtoken(), 1); + init_interfaces(); + init_jwt_constants(); + init_jwt_errors(); + __decorate2 = function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + __metadata2 = function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + __param2 = function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + JwtService = class JwtService2 { + constructor(options = {}) { + this.options = options; + this.logger = new import_common.Logger("JwtService"); + } + sign(payload, options) { + const signOptions = this.mergeJwtOptions({ ...options }, "signOptions"); + const secret = this.getSecretKey(payload, options, "privateKey", JwtSecretRequestType.SIGN); + if (secret instanceof Promise) { + secret.catch(() => { + }); + this.logger.warn('For async version of "secretOrKeyProvider", please use "signAsync".'); + throw new WrongSecretProviderError(); + } + const allowedSignOptKeys = ["secret", "privateKey"]; + const signOptKeys = Object.keys(signOptions); + if (typeof payload === "string" && signOptKeys.some((k) => !allowedSignOptKeys.includes(k))) { + throw new Error("Payload as string is not allowed with the following sign options: " + signOptKeys.join(", ")); + } + return import_jsonwebtoken.default.sign(payload, secret, signOptions); + } + signAsync(payload, options) { + const signOptions = this.mergeJwtOptions({ ...options }, "signOptions"); + const secret = this.getSecretKey(payload, options, "privateKey", JwtSecretRequestType.SIGN); + const allowedSignOptKeys = ["secret", "privateKey"]; + const signOptKeys = Object.keys(signOptions); + if (typeof payload === "string" && signOptKeys.some((k) => !allowedSignOptKeys.includes(k))) { + throw new Error("Payload as string is not allowed with the following sign options: " + signOptKeys.join(", ")); + } + return new Promise((resolve, reject) => Promise.resolve().then(() => secret).then((scrt) => { + import_jsonwebtoken.default.sign(payload, scrt, signOptions, (err, encoded) => err ? reject(err) : resolve(encoded)); + })); + } + verify(token, options) { + const verifyOptions = this.mergeJwtOptions({ ...options }, "verifyOptions"); + const secret = this.getSecretKey(token, options, "publicKey", JwtSecretRequestType.VERIFY); + if (secret instanceof Promise) { + secret.catch(() => { + }); + this.logger.warn('For async version of "secretOrKeyProvider", please use "verifyAsync".'); + throw new WrongSecretProviderError(); + } + return import_jsonwebtoken.default.verify(token, secret, verifyOptions); + } + verifyAsync(token, options) { + const verifyOptions = this.mergeJwtOptions({ ...options }, "verifyOptions"); + const secret = this.getSecretKey(token, options, "publicKey", JwtSecretRequestType.VERIFY); + return new Promise((resolve, reject) => Promise.resolve().then(() => secret).then((scrt) => { + import_jsonwebtoken.default.verify(token, scrt, verifyOptions, (err, decoded) => err ? reject(err) : resolve(decoded)); + }).catch(reject)); + } + decode(token, options) { + return import_jsonwebtoken.default.decode(token, options); + } + mergeJwtOptions(options, key) { + delete options.secret; + if (key === "signOptions") { + delete options.privateKey; + } else { + delete options.publicKey; + } + return options ? { ...this.options[key] || {}, ...options } : this.options[key]; + } + overrideSecretFromOptions(secret) { + if (this.options.secretOrPrivateKey) { + this.logger.warn(`"secretOrPrivateKey" has been deprecated, please use the new explicit "secret" or use "secretOrKeyProvider" or "privateKey"/"publicKey" exclusively.`); + secret = this.options.secretOrPrivateKey; + } + return secret; + } + getSecretKey(token, options, key, secretRequestType) { + const secret = this.options.secretOrKeyProvider ? this.options.secretOrKeyProvider(secretRequestType, token, options) : options?.secret || this.options.secret || (key === "privateKey" ? options?.privateKey || this.options.privateKey : options?.publicKey || this.options.publicKey) || this.options[key]; + return secret instanceof Promise ? secret.then((sec) => this.overrideSecretFromOptions(sec)) : this.overrideSecretFromOptions(secret); + } + }; + JwtService = __decorate2([ + (0, import_common.Injectable)(), + __param2(0, (0, import_common.Optional)()), + __param2(0, (0, import_common.Inject)(JWT_MODULE_OPTIONS)), + __metadata2("design:paramtypes", [Object]) + ], JwtService); + } +}); + +// ../../node_modules/.pnpm/@nestjs+jwt@12.0.1_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_zbpccjiygvsshg6zwdywiadlwy/node_modules/@nestjs/jwt/dist/jwt.module.js +var import_common2, __decorate3, JwtModule_1, JwtModule; +var init_jwt_module = __esm({ + "../../node_modules/.pnpm/@nestjs+jwt@12.0.1_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_zbpccjiygvsshg6zwdywiadlwy/node_modules/@nestjs/jwt/dist/jwt.module.js"() { + import_common2 = __toESM(require_common(), 1); + init_jwt_constants(); + init_jwt_providers(); + init_jwt_service(); + __decorate3 = function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + JwtModule = JwtModule_1 = class JwtModule2 { + static register(options) { + return { + module: JwtModule_1, + global: options.global, + providers: createJwtProvider(options) + }; + } + static registerAsync(options) { + return { + module: JwtModule_1, + global: options.global, + imports: options.imports || [], + providers: [ + ...this.createAsyncProviders(options), + ...options.extraProviders ?? [] + ] + }; + } + static createAsyncProviders(options) { + if (options.useExisting || options.useFactory) { + return [this.createAsyncOptionsProvider(options)]; + } + return [ + this.createAsyncOptionsProvider(options), + { + provide: options.useClass, + useClass: options.useClass + } + ]; + } + static createAsyncOptionsProvider(options) { + if (options.useFactory) { + return { + provide: JWT_MODULE_OPTIONS, + useFactory: options.useFactory, + inject: options.inject || [] + }; + } + return { + provide: JWT_MODULE_OPTIONS, + useFactory: async (optionsFactory) => await optionsFactory.createJwtOptions(), + inject: [options.useExisting || options.useClass] + }; + } + }; + JwtModule = JwtModule_1 = __decorate3([ + (0, import_common2.Module)({ + providers: [JwtService], + exports: [JwtService] + }) + ], JwtModule); + } +}); + +// ../../node_modules/.pnpm/@nestjs+jwt@12.0.1_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_zbpccjiygvsshg6zwdywiadlwy/node_modules/@nestjs/jwt/dist/index.js +var dist_exports = {}; +__export(dist_exports, { + JsonWebTokenError: () => JsonWebTokenError, + JwtModule: () => JwtModule, + JwtSecretRequestType: () => JwtSecretRequestType, + JwtService: () => JwtService, + NotBeforeError: () => NotBeforeError, + TokenExpiredError: () => TokenExpiredError, + WrongSecretProviderError: () => WrongSecretProviderError +}); +var import_jsonwebtoken2, TokenExpiredError, NotBeforeError, JsonWebTokenError; +var init_dist = __esm({ + "../../node_modules/.pnpm/@nestjs+jwt@12.0.1_@nestjs+common@10.4.22_class-transformer@0.5.1_class-validator@0.14.4_refl_zbpccjiygvsshg6zwdywiadlwy/node_modules/@nestjs/jwt/dist/index.js"() { + import_jsonwebtoken2 = __toESM(require_jsonwebtoken(), 1); + init_interfaces(); + init_jwt_errors(); + init_jwt_module(); + init_jwt_service(); + TokenExpiredError = import_jsonwebtoken2.default.TokenExpiredError; + NotBeforeError = import_jsonwebtoken2.default.NotBeforeError; + JsonWebTokenError = import_jsonwebtoken2.default.JsonWebTokenError; + } +}); + +// dist/modules/iam/iam.service.js +var require_iam_service = __commonJS({ + "dist/modules/iam/iam.service.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var IamService_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IamService = exports2.IamAccessDeniedError = exports2.IamUserUnknownError = exports2.IamMfaRequiredError = exports2.IamUnavailableError = exports2.IamInvalidCredentialsError = void 0; + var common_12 = require_common(); + var env_12 = require_env(); + var IamInvalidCredentialsError = class extends Error { + }; + exports2.IamInvalidCredentialsError = IamInvalidCredentialsError; + var IamUnavailableError = class extends Error { + }; + exports2.IamUnavailableError = IamUnavailableError; + var IamMfaRequiredError = class extends Error { + }; + exports2.IamMfaRequiredError = IamMfaRequiredError; + var IamUserUnknownError = class extends Error { + }; + exports2.IamUserUnknownError = IamUserUnknownError; + var IamAccessDeniedError = class extends Error { + reason; + constructor(message, reason) { + super(message); + this.reason = reason; + } + }; + exports2.IamAccessDeniedError = IamAccessDeniedError; + var IamService = IamService_1 = class IamService { + logger = new common_12.Logger(IamService_1.name); + get issuer() { + return ((0, env_12.envOrNull)("IAM_ISSUER") ?? "").replace(/\/$/, ""); + } + get clientId() { + return (0, env_12.envOrNull)("IAM_CLIENT_ID"); + } + get mode() { + const value = (0, env_12.envOr)("IAM_LOGIN_DELEGATION", "fallback"); + return value === "off" || value === "exclusive" ? value : "fallback"; + } + /** + * Enabled only when the switch is on **and** the minimum configuration is + * present. A half-configured deployment behaves exactly like an unconfigured + * one rather than failing in confusing ways at login time. + */ + get enabled() { + return (0, env_12.envOr)("IAM_ENABLED", "false").toLowerCase() === "true" && this.issuer !== "" && this.clientId !== null && (0, env_12.envOrNull)("IAM_CLIENT_SECRET") !== null && this.mode !== "off"; + } + /** Should an unknown user / wrong password still be checked locally? */ + get allowsLocalFallback() { + return this.mode !== "exclusive"; + } + /** + * Verify a phone + password pair against the identity service. + * + * `clientIp` is forwarded so the IAM applies its per-IP rate limit to the + * real end user. Without it every login would share this server's IP and a + * handful of attempts would lock out the whole admin panel. + */ + async verifyCredentials(identifier, password, clientIp) { + const body = { + identifier, + password, + client_id: this.clientId, + client_secret: (0, env_12.envOrNull)("IAM_CLIENT_SECRET") + }; + const tenantId = (0, env_12.envOrNull)("IAM_TENANT_ID"); + const tenantSlug = (0, env_12.envOrNull)("IAM_TENANT_SLUG"); + if (tenantId) + body.tenant_id = tenantId; + else if (tenantSlug) + body.tenant_slug = tenantSlug; + if (clientIp) + body.client_ip = clientIp; + const returnTo = this.adminBrowserReturnUrl(); + if (returnTo) + body.return_to = returnTo; + const timeout = Number((0, env_12.envOr)("IAM_HTTP_TIMEOUT_MS", "8000")); + let response; + try { + response = await fetch(`${this.issuer}/api/v1/auth/login`, { + method: "POST", + headers: { "content-type": "application/json", accept: "application/json" }, + body: JSON.stringify(body), + signal: AbortSignal.timeout(timeout) + }); + } catch (error) { + throw new IamUnavailableError(`identity service unreachable: ${error.message}`); + } + const payload = await response.json().catch(() => ({})); + if (response.ok) { + if (payload.status === "MFA_REQUIRED") { + throw new IamMfaRequiredError("two-factor authentication required"); + } + if (payload.status !== "SUCCESS") { + throw new IamUnavailableError("unexpected response from identity service"); + } + const user = payload.user ?? {}; + return { + sub: String(user.id ?? ""), + email: user.email ?? null, + phoneNumber: user.phone_number ?? null, + firstName: user.first_name ?? null, + lastName: user.last_name ?? null, + sessionId: payload.session_id ?? null, + browserTicket: typeof payload.browser_ticket === "string" ? payload.browser_ticket : null + }; + } + if ([401, 403, 422].includes(response.status)) { + const code = String(payload.error ?? ""); + if (code === "account_locked" || code === "user_inactive") { + throw new IamInvalidCredentialsError(code); + } + throw new IamInvalidCredentialsError("invalid_credentials"); + } + this.logger.warn(`identity service returned ${response.status} for a delegated login`); + throw new IamUnavailableError(`identity service returned ${response.status}`); + } + /** + * Report a one-time code this app generated, sent and verified itself. + * + * The app's login has **no password**, so `verifyCredentials` cannot be used: + * there is nothing to send. Without this call, an OTP login never reaches the + * identity service at all — no central session, no entry in the security log + * and no way for a central sign-out to end it. + * + * The IAM only accepts this from a trusted confidential client carrying the + * explicit `passwordless_delegation_allowed` flag. An unknown mobile is + * created there. A locked or inactive account is still refused. + */ + async attestOtpLogin(identifier, clientIp, factorReference) { + const body = { + identifier, + client_id: this.clientId, + client_secret: (0, env_12.envOrNull)("IAM_CLIENT_SECRET"), + factor: "sms_otp" + }; + const tenantId = (0, env_12.envOrNull)("IAM_TENANT_ID"); + const tenantSlug = (0, env_12.envOrNull)("IAM_TENANT_SLUG"); + if (tenantId) + body.tenant_id = tenantId; + else if (tenantSlug) + body.tenant_slug = tenantSlug; + if (clientIp) + body.client_ip = clientIp; + if (factorReference) + body.factor_reference = factorReference; + const returnTo = this.customerBrowserReturnUrl(); + if (returnTo) + body.return_to = returnTo; + const timeout = Number((0, env_12.envOr)("IAM_HTTP_TIMEOUT_MS", "8000")); + let response; + try { + response = await fetch(`${this.issuer}/api/v1/auth/login/delegated-otp`, { + method: "POST", + headers: { "content-type": "application/json", accept: "application/json" }, + body: JSON.stringify(body), + signal: AbortSignal.timeout(timeout) + }); + } catch (error) { + throw new IamUnavailableError(`identity service unreachable: ${error.message}`); + } + const payload = await response.json().catch(() => ({})); + if (response.ok) { + if (payload.status !== "SUCCESS") { + throw new IamUnavailableError("unexpected response from identity service"); + } + const user = payload.user ?? {}; + return { + sub: String(user.id ?? ""), + email: user.email ?? null, + phoneNumber: user.phone_number ?? null, + firstName: user.first_name ?? null, + lastName: user.last_name ?? null, + sessionId: payload.session_id ?? null, + browserTicket: typeof payload.browser_ticket === "string" ? payload.browser_ticket : null + }; + } + const code = String(payload.error ?? ""); + if (response.status === 401 && code === "user_not_found") { + throw new IamUserUnknownError(identifier); + } + if ([401, 403, 422].includes(response.status)) { + throw new IamAccessDeniedError(`identity service refused the login: ${code}`, code || "denied"); + } + this.logger.warn(`identity service returned ${response.status} for an OTP attestation`); + throw new IamUnavailableError(`identity service returned ${response.status}`); + } + /** + * مقصد بلیت مرورگر. خروج از فهرست گسترده‌تری استفاده می‌کند؛ اگر ورود فقط + * `IAM_BROWSER_RETURN_URL` را ببیند و آن خالی باشد، کوکی مشترک گذاشته نمی‌شود + * و فقط خروج به IAM می‌رود. + */ + customerBrowserReturnUrl() { + return (0, env_12.envOrNull)("IAM_BROWSER_RETURN_URL") || (0, env_12.envOrNull)("IAM_POST_LOGOUT_REDIRECT_URI") || (0, env_12.envList)("IAM_ALLOWED_RETURN_URLS")[0] || null; + } + adminBrowserReturnUrl() { + return (0, env_12.envOrNull)("IAM_ADMIN_BROWSER_RETURN_URL") || (0, env_12.envOrNull)("IAM_ADMIN_POST_LOGOUT_REDIRECT_URI") || (0, env_12.envList)("IAM_ADMIN_ALLOWED_RETURN_URLS")[0] || this.customerBrowserReturnUrl(); + } + browserBootstrapUrl(ticket) { + if (!ticket || !this.issuer) + return null; + return `${this.issuer}/auth/bootstrap?ticket=${encodeURIComponent(ticket)}`; + } + /** تبادل کد مجوز مرورگر. پاسخ از خود issuer و با راز کلاینت آمده است. */ + async exchangeAuthorizationCode(code, codeVerifier, redirectUri) { + const timeout = Number((0, env_12.envOr)("IAM_HTTP_TIMEOUT_MS", "8000")); + const body = new URLSearchParams({ + grant_type: "authorization_code", + code, + redirect_uri: redirectUri, + code_verifier: codeVerifier, + client_id: this.clientId, + client_secret: (0, env_12.envOrNull)("IAM_CLIENT_SECRET") + }); + let response; + try { + response = await fetch(`${this.issuer}/oauth/token`, { + method: "POST", + headers: { "content-type": "application/x-www-form-urlencoded", accept: "application/json" }, + body, + signal: AbortSignal.timeout(timeout) + }); + } catch (error) { + throw new IamUnavailableError(`identity service unreachable: ${error.message}`); + } + const payload = await response.json().catch(() => ({})); + if (!response.ok || typeof payload.id_token !== "string") { + throw new IamUnavailableError(`identity service refused the authorization code (${response.status})`); + } + const claims = decodeIdToken(payload.id_token); + if (claims.iss !== this.issuer) { + throw new IamUnavailableError("identity token issuer does not match"); + } + const aud = claims.aud; + const audiences = Array.isArray(aud) ? aud : [aud]; + if (!audiences.includes(this.clientId)) { + throw new IamUnavailableError("identity token audience does not match"); + } + return { + sub: String(claims.sub ?? ""), + phoneNumber: typeof claims.phone_number === "string" ? claims.phone_number : null, + sessionId: typeof claims.sid === "string" ? claims.sid : null + }; + } + }; + exports2.IamService = IamService; + exports2.IamService = IamService = IamService_1 = __decorate4([ + (0, common_12.Injectable)() + ], IamService); + function decodeIdToken(token) { + const part = token.split(".")[1]; + if (!part) + throw new IamUnavailableError("identity token is malformed"); + return JSON.parse(Buffer.from(part, "base64url").toString("utf8")); + } + } +}); + +// dist/modules/sessions/app-session.service.js +var require_app_session_service = __commonJS({ + "dist/modules/sessions/app-session.service.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var AppSessionService_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AppSessionService = void 0; + var common_12 = require_common(); + var node_crypto_1 = require("node:crypto"); + var prisma_service_1 = require_prisma_service(); + var env_12 = require_env(); + var iam_service_1 = require_iam_service(); + var AppSessionService = AppSessionService_1 = class AppSessionService { + prisma; + iam; + logger = new common_12.Logger(AppSessionService_1.name); + constructor(prisma, iam) { + this.prisma = prisma; + this.iam = iam; + } + get enabled() { + const flag = (0, env_12.envOr)("AUTH_SESSION_TRACKING", "").toLowerCase(); + if (flag === "true") + return true; + if (flag === "false") + return false; + return this.iam.enabled; + } + newTokenId() { + return this.enabled ? (0, node_crypto_1.randomUUID)() : null; + } + /** + * Record an issued token. A failure must not break the login: the worst case + * is a session that cannot be revoked early, which is the behaviour that + * existed before this table. + */ + async record(input) { + if (!this.enabled) + return; + try { + await this.prisma.appSession.create({ + data: { + jti: input.jti, + subjectId: input.subjectId, + subjectType: input.subjectType, + mobile: input.mobile ?? null, + iamSessionId: input.iamSessionId ?? null, + iamSub: input.iamSub ?? null, + ipAddress: input.ipAddress ?? null, + userAgent: input.userAgent ?? null, + expiresAt: this.tokenExpiry() + } + }); + } catch (error) { + this.logger.warn(`could not record the app session: ${error.message}`); + } + } + /** + * Is this token still usable? A token signed before tracking was switched on + * carries no `jti` and stays valid until it expires, so enabling the feature + * does not sign every app user out at once. + */ + async isActive(jti) { + if (!this.enabled || !jti) + return true; + const session = await this.prisma.appSession.findUnique({ + where: { jti }, + select: { revokedAt: true } + }); + return session !== null && session.revokedAt === null; + } + /** Revoke by the IAM's session id (`sid` in a back-channel logout token). */ + revokeByIamSession(iamSessionId, reason = "iam_backchannel_logout") { + return this.revokeWhere({ iamSessionId }, reason); + } + /** Revoke every session of an IAM identity (a logout token carrying only `sub`). */ + revokeByIamSubject(iamSub, reason = "iam_backchannel_logout") { + return this.revokeWhere({ iamSub }, reason); + } + /** Revoke every app session of one subject (customer archived/deactivated). */ + revokeAllForSubject(subjectId, reason = "revoked") { + return this.revokeWhere({ subjectId }, reason); + } + async revokeWhere(where, reason) { + if (!this.enabled) + return 0; + const result = await this.prisma.appSession.updateMany({ + where: { ...where, revokedAt: null }, + data: { revokedAt: /* @__PURE__ */ new Date(), revokedReason: reason } + }); + return result.count; + } + /** Mirrors JWT_CUSTOMER_EXPIRES_IN so old rows can be pruned. */ + tokenExpiry() { + const match = /^(\d+)\s*([smhd])$/.exec((0, env_12.envOr)("JWT_CUSTOMER_EXPIRES_IN", "30d")); + if (!match) + return null; + const seconds = Number(match[1]) * { s: 1, m: 60, h: 3600, d: 86400 }[match[2]]; + return new Date(Date.now() + seconds * 1e3); + } + }; + exports2.AppSessionService = AppSessionService; + exports2.AppSessionService = AppSessionService = AppSessionService_1 = __decorate4([ + (0, common_12.Injectable)(), + __metadata3("design:paramtypes", [ + prisma_service_1.PrismaService, + iam_service_1.IamService + ]) + ], AppSessionService); } }); @@ -84939,6 +87325,5705 @@ var require_lib8 = __commonJS({ } }); +// dist/modules/customer-auth/app-principal.js +var require_app_principal = __commonJS({ + "dist/modules/customer-auth/app-principal.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.EXPERT_TOKEN_TYPE = exports2.CUSTOMER_TOKEN_TYPE = void 0; + exports2.isSalesExpert = isSalesExpert; + exports2.CUSTOMER_TOKEN_TYPE = "customer"; + exports2.EXPERT_TOKEN_TYPE = "sales-expert"; + function isSalesExpert(me) { + return me.type === exports2.EXPERT_TOKEN_TYPE && Boolean(me.adminUserId); + } + } +}); + +// dist/modules/customer-auth/customer-jwt.strategy.js +var require_customer_jwt_strategy = __commonJS({ + "dist/modules/customer-auth/customer-jwt.strategy.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CustomerJwtStrategy = exports2.EXPERT_TOKEN_TYPE = exports2.CUSTOMER_TOKEN_TYPE = void 0; + var common_12 = require_common(); + var passport_1 = require_passport(); + var client_1 = require("@prisma/client"); + var passport_jwt_1 = require_lib8(); + var prisma_service_1 = require_prisma_service(); + var customer_auth_service_12 = require_customer_auth_service(); + var app_principal_1 = require_app_principal(); + var app_session_service_1 = require_app_session_service(); + var app_principal_2 = require_app_principal(); + Object.defineProperty(exports2, "CUSTOMER_TOKEN_TYPE", { enumerable: true, get: function() { + return app_principal_2.CUSTOMER_TOKEN_TYPE; + } }); + Object.defineProperty(exports2, "EXPERT_TOKEN_TYPE", { enumerable: true, get: function() { + return app_principal_2.EXPERT_TOKEN_TYPE; + } }); + var CustomerJwtStrategy = class CustomerJwtStrategy extends (0, passport_1.PassportStrategy)(passport_jwt_1.Strategy, "customer-jwt") { + prisma; + sessions; + constructor(prisma, sessions) { + super({ + jwtFromRequest: passport_jwt_1.ExtractJwt.fromAuthHeaderAsBearerToken(), + ignoreExpiration: false, + secretOrKey: (0, customer_auth_service_12.customerJwtSecret)() + }); + this.prisma = prisma; + this.sessions = sessions; + } + async validate(payload) { + if (!await this.sessions.isActive(payload?.jti)) { + throw new common_12.UnauthorizedException(); + } + if (payload?.typ === app_principal_1.EXPERT_TOKEN_TYPE) { + return this.validateExpert(payload); + } + if (payload?.typ !== app_principal_1.CUSTOMER_TOKEN_TYPE) { + throw new common_12.UnauthorizedException(); + } + const customer = await this.prisma.customer.findUnique({ + where: { id: payload.sub }, + select: { id: true, mobile: true, isActive: true, isArchived: true } + }); + if (!customer || !customer.isActive || customer.isArchived) { + throw new common_12.UnauthorizedException(); + } + return { id: customer.id, mobile: customer.mobile, type: app_principal_1.CUSTOMER_TOKEN_TYPE }; + } + /** + * A sales expert. `sub` is their AdminUser id, so the role and active flag + * are re-checked on every request: demoting an expert or deactivating them + * locks them out immediately rather than at token expiry. + * + * The trading Customer row is resolved here rather than stored in the token, + * so a token issued before that row existed keeps working. + */ + async validateExpert(payload) { + const admin = await this.prisma.adminUser.findUnique({ + where: { id: payload.sub }, + select: { + id: true, + mobile: true, + role: true, + isActive: true, + salesExpertProfile: { + select: { + tradingCustomerId: true, + tradingCustomer: { select: { id: true, isActive: true, isArchived: true } } + } + } + } + }); + if (!admin || !admin.isActive || admin.role !== client_1.AdminRole.SALES_EXPERT) { + throw new common_12.UnauthorizedException(); + } + const trading = admin.salesExpertProfile?.tradingCustomer; + if (!trading || !trading.isActive || trading.isArchived) { + throw new common_12.UnauthorizedException(); + } + return { + id: trading.id, + mobile: admin.mobile, + type: app_principal_1.EXPERT_TOKEN_TYPE, + adminUserId: admin.id + }; + } + }; + exports2.CustomerJwtStrategy = CustomerJwtStrategy; + exports2.CustomerJwtStrategy = CustomerJwtStrategy = __decorate4([ + (0, common_12.Injectable)(), + __metadata3("design:paramtypes", [ + prisma_service_1.PrismaService, + app_session_service_1.AppSessionService + ]) + ], CustomerJwtStrategy); + } +}); + +// dist/modules/customer-auth/digits.js +var require_digits = __commonJS({ + "dist/modules/customer-auth/digits.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.faToEn = faToEn; + function faToEn(input) { + return input.replace(/[۰-۹]/g, (d) => String(d.charCodeAt(0) - 1776)).replace(/[٠-٩]/g, (d) => String(d.charCodeAt(0) - 1632)).trim(); + } + } +}); + +// dist/modules/sms/drivers/sms-driver.js +var require_sms_driver = __commonJS({ + "dist/modules/sms/drivers/sms-driver.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.postWithTimeout = postWithTimeout; + async function postWithTimeout(url, headers, body, timeoutMs) { + const controller = new AbortController(); + const timer = setTimeout(() => controller.abort(), timeoutMs); + try { + const response = await fetch(url, { + method: "POST", + headers, + body, + signal: controller.signal + }); + return { ok: response.ok, status: response.status, body: await response.text() }; + } finally { + clearTimeout(timer); + } + } + } +}); + +// dist/modules/sms/drivers/relay.driver.js +var require_relay_driver = __commonJS({ + "dist/modules/sms/drivers/relay.driver.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.relayDriver = void 0; + exports2.serverIpv4 = serverIpv4; + exports2.relayConfig = relayConfig; + exports2.relayRejection = relayRejection; + var node_os_1 = require("node:os"); + var env_12 = require_env(); + var sms_driver_1 = require_sms_driver(); + var DEFAULT_RELAY_URL = "http://185.231.112.101/api/createsms"; + var DEFAULT_RELAY_SECRET = "f21debfb-83ac-4624-a2f4-f08375043181"; + var DEFAULT_RELAY_PLATFORM = "kave"; + var REQUEST_TIMEOUT_MS = 15e3; + function serverIpv4() { + for (const addresses of Object.values((0, node_os_1.networkInterfaces)())) { + for (const a of addresses ?? []) { + if (a.family === "IPv4" && !a.internal) + return a.address; + } + } + return null; + } + function relayConfig() { + const platform = (0, env_12.envOr)("SMS_RELAY_PLATFORM", DEFAULT_RELAY_PLATFORM); + return { + url: (0, env_12.envOr)("SMS_RELAY_URL", DEFAULT_RELAY_URL), + secret: (0, env_12.envOr)("SMS_RELAY_SECRET", DEFAULT_RELAY_SECRET), + host: (0, env_12.envOrNull)("SMS_RELAY_HOST") ?? serverIpv4(), + // "default" sends null, so the gateway chooses the line itself. + platform: platform.toLowerCase() === "default" ? null : platform + }; + } + function relayRejection(body) { + const text = body.trim(); + if (text === "") + return null; + let data; + try { + data = JSON.parse(text); + } catch { + return text.slice(0, 200); + } + if (!data || typeof data !== "object" || Array.isArray(data)) + return null; + const d = data; + const failedStatus = d.status === false || typeof d.status === "string" && /^(error|fail|failed|failure)$/i.test(d.status); + const failed = failedStatus || d.success === false || d.ok === false || Boolean(d.error); + if (!failed) + return null; + if (typeof d.error === "string" && d.error) + return d.error; + if (typeof d.message === "string" && d.message) + return d.message; + return "rejected-by-gateway"; + } + exports2.relayDriver = { + name: "relay", + missingConfig() { + return relayConfig().host ? [] : ["SMS_RELAY_HOST"]; + }, + async deliver(mobile, text) { + const c = relayConfig(); + const reply = await (0, sms_driver_1.postWithTimeout)(c.url, { "Content-Type": "application/json", secret_key: c.secret }, JSON.stringify({ phone: mobile, host: c.host, text, platform: c.platform }), REQUEST_TIMEOUT_MS); + if (!reply.ok) + return { ok: false, response: reply.body, error: `http-${reply.status}` }; + const rejection = relayRejection(reply.body); + if (rejection) + return { ok: false, response: reply.body, error: rejection }; + return { ok: true, response: reply.body }; + } + }; + } +}); + +// dist/modules/sms/drivers/trez.driver.js +var require_trez_driver = __commonJS({ + "dist/modules/sms/drivers/trez.driver.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.trezDriver = exports2.DEFAULT_TREZ_URL = void 0; + exports2.trezConfig = trezConfig; + var env_12 = require_env(); + var sms_driver_1 = require_sms_driver(); + exports2.DEFAULT_TREZ_URL = "https://smspanel.trez.ir/SendMessageWithCode.ashx"; + var REQUEST_TIMEOUT_MS = 2e4; + function trezConfig() { + return { + url: (0, env_12.envOr)("SMS_TREZ_URL", exports2.DEFAULT_TREZ_URL), + username: process.env.SMS_TREZ_USERNAME ?? "", + password: process.env.SMS_TREZ_PASSWORD ?? "", + senderLine: process.env.SMS_TREZ_SENDER_LINE ?? "" + }; + } + exports2.trezDriver = { + name: "trez", + missingConfig() { + const c = trezConfig(); + return [ + ["SMS_TREZ_USERNAME", c.username], + ["SMS_TREZ_PASSWORD", c.password], + ["SMS_TREZ_SENDER_LINE", c.senderLine] + ].filter(([, v]) => !v).map(([name]) => name); + }, + async deliver(mobile, text) { + const c = trezConfig(); + const reply = await (0, sms_driver_1.postWithTimeout)(c.url, { "Content-Type": "application/x-www-form-urlencoded" }, new URLSearchParams({ + PhoneNumber: c.senderLine, + Username: c.username, + Password: c.password, + Mobile: mobile, + Message: text + }).toString(), REQUEST_TIMEOUT_MS); + if (!reply.ok) + return { ok: false, response: reply.body, error: `http-${reply.status}` }; + return { ok: true, response: reply.body }; + } + }; + } +}); + +// dist/modules/sms/drivers/index.js +var require_drivers = __commonJS({ + "dist/modules/sms/drivers/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_SMS_PROVIDER = exports2.SMS_DRIVERS = void 0; + var relay_driver_1 = require_relay_driver(); + var trez_driver_1 = require_trez_driver(); + exports2.SMS_DRIVERS = { + [relay_driver_1.relayDriver.name]: relay_driver_1.relayDriver, + [trez_driver_1.trezDriver.name]: trez_driver_1.trezDriver + }; + exports2.DEFAULT_SMS_PROVIDER = relay_driver_1.relayDriver.name; + } +}); + +// dist/modules/sms/sms.service.js +var require_sms_service = __commonJS({ + "dist/modules/sms/sms.service.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var SmsService_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SmsService = void 0; + exports2.smsProvider = smsProvider; + exports2.smsDriver = smsDriver; + exports2.smsConfigured = smsConfigured; + exports2.assertSmsConfigured = assertSmsConfigured; + var common_12 = require_common(); + var client_1 = require("@prisma/client"); + var prisma_service_1 = require_prisma_service(); + var env_12 = require_env(); + var drivers_1 = require_drivers(); + function smsProvider() { + return (0, env_12.envOr)("SMS_PROVIDER", drivers_1.DEFAULT_SMS_PROVIDER).toLowerCase(); + } + function smsDriver() { + return drivers_1.SMS_DRIVERS[smsProvider()] ?? null; + } + function smsConfigured() { + const driver = smsDriver(); + return driver !== null && driver.missingConfig().length === 0; + } + function assertSmsConfigured(logger = new common_12.Logger("SmsConfig")) { + const provider = smsProvider(); + if (provider === "none") { + logger.warn("SMS_PROVIDER=none \u2014 no SMS will be sent."); + return; + } + const driver = smsDriver(); + if (!driver) { + const supported = [...Object.keys(drivers_1.SMS_DRIVERS), "none"].map((n) => `"${n}"`).join(", "); + logger.warn(`Unknown SMS_PROVIDER "${provider}" (supported: ${supported}). No SMS will be sent.`); + return; + } + const missing = driver.missingConfig(); + if (missing.length === 0) { + logger.log(`SMS provider: ${driver.name}`); + return; + } + logger.warn(`SMS provider "${driver.name}" is selected but these are not set: ${missing.join(", ")}. Messages are logged, not sent. Customers cannot receive a login code.`); + } + var SmsService = SmsService_1 = class SmsService { + prisma; + logger = new common_12.Logger(SmsService_1.name); + constructor(prisma) { + this.prisma = prisma; + } + /** + * Sends one message. Never throws — a failed SMS must not roll back the + * business operation that triggered it, exactly as in the reference. + */ + async send(mobile, body, options = {}) { + const { persist = true, audience = client_1.MessageAudience.SINGLE_NUMBER } = options; + const text = body.trim(); + console.log("mobile ==>", mobile); + const result = await this.deliver(mobile, text); + if (persist) { + await this.record(mobile, text, audience); + } + return result; + } + async deliver(mobile, text) { + const driver = smsDriver(); + if (!driver || driver.missingConfig().length > 0) { + this.logger.warn(`[dev] SMS not configured; not sending to ${mobile}`); + return { ok: false, error: "sms-not-configured" }; + } + let result; + try { + result = await driver.deliver(mobile, text); + } catch (e) { + result = { ok: false, error: e instanceof Error ? e.message : String(e) }; + } + if (!result.ok) { + const detail = result.response ? ` ${result.response}` : ""; + this.logger.error(`SMS to ${mobile} via ${driver.name} failed: ${result.error}${detail}`); + } + return result; + } + /** The `messages` row the reference writes for every send (`Sms.php:120-129`). */ + async record(mobile, body, audience) { + try { + await this.prisma.smsMessage.create({ + data: { audience, recipients: mobile, body, sentCount: 1 } + }); + } catch (e) { + this.logger.error(`Could not record the SMS to ${mobile}: ${String(e)}`); + } + } + }; + exports2.SmsService = SmsService; + exports2.SmsService = SmsService = SmsService_1 = __decorate4([ + (0, common_12.Injectable)(), + __metadata3("design:paramtypes", [prisma_service_1.PrismaService]) + ], SmsService); + } +}); + +// dist/modules/customer-auth/customer-auth.service.js +var require_customer_auth_service = __commonJS({ + "dist/modules/customer-auth/customer-auth.service.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var CustomerAuthService_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CustomerAuthService = void 0; + exports2.masterOtpCode = masterOtpCode; + exports2.masterOtpEnabled = masterOtpEnabled; + exports2.customerJwtSecret = customerJwtSecret; + var node_crypto_1 = require("node:crypto"); + var common_12 = require_common(); + var jwt_1 = (init_dist(), __toCommonJS(dist_exports)); + var client_1 = require("@prisma/client"); + var bcrypt = __importStar2(require_umd()); + var prisma_service_1 = require_prisma_service(); + var iam_service_1 = require_iam_service(); + var app_session_service_1 = require_app_session_service(); + var password_hash_1 = require_password_hash(); + var env_12 = require_env(); + var customer_jwt_strategy_1 = require_customer_jwt_strategy(); + var digits_1 = require_digits(); + var sms_service_12 = require_sms_service(); + var TooManyRequestsException = class extends common_12.HttpException { + constructor(message) { + super(message, common_12.HttpStatus.TOO_MANY_REQUESTS); + } + }; + var OTP_TTL_MS = 2 * 60 * 1e3; + var MAX_ATTEMPTS = 5; + var MAX_SENDS_PER_MOBILE = 5; + var MAX_SENDS_PER_IP = 20; + var SEND_WINDOW_MS = 10 * 60 * 1e3; + var RESEND_COOLDOWN_MS = 60 * 1e3; + function masterOtpCode() { + const raw = process.env.OTP_MASTER_CODE?.trim(); + return raw ? raw : null; + } + function masterOtpEnabled() { + return masterOtpCode() !== null; + } + function mobileVariants(raw) { + const digits = raw.replace(/\D/g, ""); + const variants = /* @__PURE__ */ new Set([raw.trim(), digits]); + if (digits.startsWith("98") && digits.length >= 12) + variants.add(`0${digits.slice(2)}`); + if (digits.startsWith("0") && digits.length === 11) + variants.add(`98${digits.slice(1)}`); + return [...variants].filter((value) => value !== ""); + } + function maskMobile(mobile) { + return mobile.length < 7 ? null : `${mobile.slice(0, 4)}***${mobile.slice(-4)}`; + } + var CustomerAuthService = CustomerAuthService_1 = class CustomerAuthService { + prisma; + jwt; + sms; + iam; + sessions; + logger = new common_12.Logger(CustomerAuthService_1.name); + constructor(prisma, jwt, sms, iam, sessions) { + this.prisma = prisma; + this.jwt = jwt; + this.sms = sms; + this.iam = iam; + this.sessions = sessions; + } + /** + * Tell the central identity service about a code this app just verified. + * + * The app's login has no password, so this is the only way an OTP login can + * reach the identity service at all. Deliberate asymmetry in how failures are + * treated, mirroring the admin path: + * + * - unknown user / service down / rate limited → local login continues + * (an IAM problem must never lock customers out of the app); + * - locked, deactivated or two-factor there → the login is refused, + * because that is a decision, not a gap. + */ + async attestToIam(mobile, ip) { + if (!this.iam.enabled) + return null; + try { + return await this.iam.attestOtpLogin(mobile, ip, maskMobile(mobile)); + } catch (error) { + if (error instanceof iam_service_1.IamAccessDeniedError) { + this.logger.warn(`identity service refused ${mobile}: ${error.reason}`); + throw new common_12.UnauthorizedException("\u0648\u0631\u0648\u062F \u0627\u06CC\u0646 \u062D\u0633\u0627\u0628 \u062F\u0631 \u062D\u0627\u0644 \u062D\u0627\u0636\u0631 \u0645\u062C\u0627\u0632 \u0646\u06CC\u0633\u062A"); + } + if (!(error instanceof iam_service_1.IamUserUnknownError)) { + this.logger.warn(`OTP attestation skipped: ${error.message}`); + } + return null; + } + } + /** + * Step 1 — port of ApiMobileController::userAuth (henza_server:39-49). + * + * Reference: validate `username`, find an ACTIVE customer by mobile, generate + * rand(1000,9999), store it, send it by SMS, return `true`. + * + * Kept: the active-customer filter, the 4-digit range, the opaque `true` + * response (it never reveals whether the number exists). + * Changed: the code is hashed, it expires, and sends are rate limited. + */ + async requestOtp(rawMobile, ip) { + const mobile = (0, digits_1.faToEn)(rawMobile); + await this.assertSendAllowed(mobile, ip); + const expertAccount = await this.resolveExpertTradingAccount(mobile); + const customer = expertAccount ?? await this.prisma.customer.findFirst({ + where: { mobile, isActive: true, isArchived: false }, + select: { id: true } + }); + if (!customer) { + this.logger.warn(`OTP requested for unknown or inactive mobile ${mobile}`); + return { sent: true }; + } + const code = String(Math.floor(1e3 + Math.random() * 9e3)); + await this.prisma.customerOtp.create({ + data: { + mobile, + customerId: customer.id, + codeHash: await bcrypt.hash(code, 10), + expiresAt: new Date(Date.now() + OTP_TTL_MS), + requestIp: ip ?? null + } + }); + await this.deliver(mobile, code); + return { sent: true }; + } + /** + * D21 — find an active sales expert by mobile and return their trading + * Customer account, creating it on first sign-in. + * + * WHY A TRADING ACCOUNT EXISTS + * In the reference a sales agent WAS a Customer (type=1), so `setOrder` did + * `Customer::findOrFail(auth()->id())` and read that row's `gram_level` + * (ApiMobileController.php:534-535) — the agent's own order, own credit + * limit, own ledger. Here the expert is an AdminUser (D17), which has no + * ledger and cannot be an Order's subject, so this one linked Customer row + * plays that part. It is NOT one of their referred customers. + * + * Seeded from what the reference used for exactly these two numbers: + * gram_level -> goldCreditLimitGrams (SalesExpertProfile.gramLevel) + * percent -> makingChargeOffsetPercent (AdminUser.wagePercent) + * + * Returns null for any mobile that is not an active sales expert, so an + * ordinary customer's login is completely unaffected. + */ + /** `code` when it is set and no customer holds it yet, else null. */ + async freeNationalCode(code) { + if (!code) + return null; + const taken = await this.prisma.customer.findUnique({ where: { nationalCode: code }, select: { id: true } }); + return taken ? null : code; + } + async resolveExpertTradingAccount(mobile) { + const admin = await this.prisma.adminUser.findFirst({ + where: { mobile, isActive: true, role: client_1.AdminRole.SALES_EXPERT }, + select: { + id: true, + fullName: true, + firstName: true, + lastName: true, + mobile: true, + wagePercent: true, + salesExpertProfile: { + select: { id: true, gramLevel: true, nationalCode: true, tradingCustomerId: true } + } + } + }); + if (!admin) + return null; + const existingId = admin.salesExpertProfile?.tradingCustomerId; + if (existingId) { + const existing = await this.prisma.customer.findUnique({ + where: { id: existingId }, + select: { id: true, isActive: true, isArchived: true } + }); + if (existing && existing.isActive && !existing.isArchived) + return { id: existing.id }; + this.logger.warn(`Sales expert ${admin.id} has a trading account that is inactive or archived; refusing to create another.`); + return null; + } + if (!admin.salesExpertProfile) { + this.logger.warn(`Sales expert ${admin.id} has no SalesExpertProfile; cannot sign in to the app.`); + return null; + } + const clash = await this.prisma.customer.findFirst({ + where: { mobile }, + select: { id: true, isActive: true, isArchived: true } + }); + if (clash) { + this.logger.warn(`Mobile ${mobile} belongs to both sales expert ${admin.id} and customer ${clash.id}; adopting the existing customer row as the expert's trading account.`); + if (!clash.isActive || clash.isArchived) + return null; + await this.prisma.salesExpertProfile.update({ + where: { id: admin.salesExpertProfile.id }, + data: { tradingCustomerId: clash.id } + }); + return { id: clash.id }; + } + const created = await this.prisma.customer.create({ + data: { + fullName: admin.fullName, + firstName: admin.firstName, + lastName: admin.lastName, + mobile: admin.mobile, + // The expert's own national code when they have one and no other + // customer holds it (the column is unique); else none. Never the + // mobile — the column holds national codes only. + nationalCode: await this.freeNationalCode(admin.salesExpertProfile.nationalCode), + // No app password: this account is reached only through the expert's + // AdminUser session, never by a password login of its own. + passwordHash: password_hash_1.OTP_ONLY_PASSWORD_HASH, + kind: client_1.CustomerKind.APP_SHOPKEEPER, + goldCreditLimitGrams: admin.salesExpertProfile.gramLevel, + makingChargeOffsetPercent: admin.wagePercent ?? new client_1.Prisma.Decimal(0) + }, + select: { id: true } + }); + await this.prisma.salesExpertProfile.update({ + where: { id: admin.salesExpertProfile.id }, + data: { tradingCustomerId: created.id } + }); + this.logger.log(`Created trading account ${created.id} for sales expert ${admin.id} on first app sign-in.`); + return { id: created.id }; + } + /** + * Step 2 — port of ApiMobileController::userVerfiy (henza_server:51-64). + * + * Reference: `if (faTOen($request->password) != $customer->send_password) abort(422);` + * then issue a token and return THAT ONE customer. + * + * The parity behaviour is the comparison and the rejection. The attempt + * counter, the expiry check and the single-use consumption are the D6 + * additions. + */ + async verifyOtp(rawMobile, rawCode, ip) { + const mobile = (0, digits_1.faToEn)(rawMobile); + const code = (0, digits_1.faToEn)(rawCode); + const reject = () => new common_12.UnauthorizedException("\u06A9\u062F \u0648\u0627\u0631\u062F \u0634\u062F\u0647 \u0635\u062D\u06CC\u062D \u0646\u06CC\u0633\u062A"); + const master = masterOtpCode(); + if (master !== null && code === master) { + const expert2 = await this.resolveExpertPrincipal(mobile); + if (expert2) { + this.logger.warn(`OTP_MASTER_CODE used to sign in SALES EXPERT ${expert2.adminUserId} (mobile ${mobile})`); + return { + token: await this.issueExpertToken(expert2.adminUserId, mobile, { ip }), + customer: { id: expert2.tradingCustomerId, mobile } + }; + } + const customer = await this.prisma.customer.findFirst({ + where: { mobile, isActive: true, isArchived: false }, + select: { id: true, mobile: true } + }); + if (!customer) + throw reject(); + this.logger.warn(`OTP_MASTER_CODE used to sign in customer ${customer.id} (mobile ${customer.mobile})`); + return { + token: await this.issueToken(customer.id, customer.mobile, { ip }), + customer: { id: customer.id, mobile: customer.mobile } + }; + } + const challenge = await this.prisma.customerOtp.findFirst({ + where: { mobile, consumedAt: null }, + orderBy: { createdAt: "desc" }, + include: { + customer: { + select: { id: true, mobile: true, isActive: true, isArchived: true } + } + } + }); + if (!challenge) + throw reject(); + if (challenge.expiresAt.getTime() < Date.now()) + throw reject(); + if (challenge.attempts >= MAX_ATTEMPTS) { + throw new TooManyRequestsException("\u062A\u0639\u062F\u0627\u062F \u062A\u0644\u0627\u0634\u200C\u0647\u0627\u06CC \u0646\u0627\u0645\u0648\u0641\u0642 \u0628\u06CC\u0634 \u0627\u0632 \u062D\u062F \u0645\u062C\u0627\u0632 \u0627\u0633\u062A. \u0644\u0637\u0641\u0627\u064B \u06A9\u062F \u062C\u062F\u06CC\u062F\u06CC \u062F\u0631\u062E\u0648\u0627\u0633\u062A \u06A9\u0646\u06CC\u062F."); + } + const ok = await bcrypt.compare(code, challenge.codeHash); + if (!ok) { + await this.prisma.customerOtp.update({ + where: { id: challenge.id }, + data: { attempts: { increment: 1 } } + }); + throw reject(); + } + if (!challenge.customer.isActive || challenge.customer.isArchived) { + throw reject(); + } + await this.prisma.customerOtp.update({ + where: { id: challenge.id }, + data: { consumedAt: /* @__PURE__ */ new Date() } + }); + const identity = await this.attestToIam(mobile, ip); + const expert = await this.resolveExpertPrincipal(mobile); + if (expert) { + return this.withBootstrap({ + token: await this.issueExpertToken(expert.adminUserId, mobile, { identity, ip }), + customer: { id: expert.tradingCustomerId, mobile } + }, identity); + } + return this.withBootstrap({ + token: await this.issueToken(challenge.customer.id, challenge.customer.mobile, { identity, ip }), + customer: { id: challenge.customer.id, mobile: challenge.customer.mobile } + }, identity); + } + /** + * D21 — is this mobile an active sales expert with a usable trading account? + * + * Read-only: unlike `resolveExpertTradingAccount`, this never creates + * anything, because by verify time requestOtp has already done so. Returns + * null for every ordinary customer, so their path is untouched. + */ + async resolveExpertPrincipal(mobile) { + const admin = await this.prisma.adminUser.findFirst({ + where: { mobile, isActive: true, role: client_1.AdminRole.SALES_EXPERT }, + select: { + id: true, + salesExpertProfile: { + select: { + tradingCustomer: { select: { id: true, isActive: true, isArchived: true } } + } + } + } + }); + const trading = admin?.salesExpertProfile?.tradingCustomer; + if (!admin || !trading || !trading.isActive || trading.isArchived) + return null; + return { adminUserId: admin.id, tradingCustomerId: trading.id }; + } + /** + * Sign a SALES EXPERT app token. + * + * `sub` is the AdminUser id — the durable identity — not the trading + * Customer id, so the token survives anything that changes the trading row + * and the role check can be re-applied on every request. + * + * Same secret and lifetime as a customer token; only `typ` differs. It is + * NOT an admin-panel token: JwtStrategy requires the admin type and refuses + * this one on every admin route. + */ + async issueExpertToken(adminUserId, mobile, context = {}) { + const jti = this.sessions.newTokenId(); + const payload = { + sub: adminUserId, + mobile, + typ: customer_jwt_strategy_1.EXPERT_TOKEN_TYPE, + ...jti ? { jti } : {} + }; + const token = await this.jwt.signAsync(payload, { + secret: customerJwtSecret(), + expiresIn: (0, env_12.envOr)("JWT_CUSTOMER_EXPIRES_IN", "30d") + }); + if (jti) { + await this.sessions.record({ + jti, + subjectId: adminUserId, + subjectType: "sales-expert", + mobile, + iamSessionId: context.identity?.sessionId ?? null, + iamSub: context.identity?.sub ?? null, + ipAddress: context.ip ?? null + }); + } + return token; + } + /** + * Sign a customer JWT. Shared by the normal verify path and the D20 master + * code so both issue exactly the same token — the bypass grants no extra + * privilege and no longer lifetime. + * + * Reference reused api_token forever once set (:60-62); a fresh token is + * issued on every verify here (T1). + */ + /** + * شروع بررسی بی‌صدای نشست IAM. کوکی امضاشده code_verifier را نگه می‌دارد + * تا در آدرس بازگشت دیده نشود. + */ + beginBrowserSso(requestedRedirect) { + if (!this.iam.enabled) + return null; + const redirectUri = (0, env_12.pickExactUri)(requestedRedirect, [ + (0, env_12.envOrNull)("IAM_REDIRECT_URI"), + ...(0, env_12.envList)("IAM_REDIRECT_URIS") + ]); + const clientId = (0, env_12.envOrNull)("IAM_CLIENT_ID"); + if (!redirectUri || !clientId) + return null; + const state = (0, node_crypto_1.randomBytes)(24).toString("base64url"); + const nonce = (0, node_crypto_1.randomBytes)(24).toString("base64url"); + const verifier = (0, node_crypto_1.randomBytes)(48).toString("base64url"); + const challenge = (0, node_crypto_1.createHash)("sha256").update(verifier).digest("base64url"); + const payload = Buffer.from(JSON.stringify({ state, nonce, verifier, redirectUri })).toString("base64url"); + const sig = (0, node_crypto_1.createHmac)("sha256", this.ssoSecret()).update(payload).digest("base64url"); + const secure = redirectUri.startsWith("https:"); + const cookie = `gb_iam_sso=${payload}.${sig}; HttpOnly; Path=/; Max-Age=180; SameSite=Lax` + (secure ? "; Secure" : ""); + const url = new URL(`${this.iam.issuer}/oauth/authorize`); + url.searchParams.set("response_type", "code"); + url.searchParams.set("client_id", clientId); + url.searchParams.set("redirect_uri", redirectUri); + url.searchParams.set("scope", "openid profile email"); + url.searchParams.set("state", state); + url.searchParams.set("nonce", nonce); + url.searchParams.set("code_challenge", challenge); + url.searchParams.set("code_challenge_method", "S256"); + url.searchParams.set("prompt", "none"); + return { authorizeUrl: url.toString(), cookie }; + } + async completeBrowserSso(cookieValue, code, state, ip) { + const pending = this.readSsoCookie(cookieValue); + if (!pending || pending.state !== state) { + throw new common_12.UnauthorizedException("\u062F\u0631\u062E\u0648\u0627\u0633\u062A \u0648\u0631\u0648\u062F \u0645\u0634\u062A\u0631\u06A9 \u0645\u0639\u062A\u0628\u0631 \u0646\u06CC\u0633\u062A"); + } + const claims = await this.iam.exchangeAuthorizationCode(code, pending.verifier, pending.redirectUri); + if (!claims.phoneNumber || !claims.sub) { + throw new common_12.UnauthorizedException("\u0647\u0648\u06CC\u062A \u0645\u0634\u062A\u0631\u06A9 \u0634\u0645\u0627\u0631\u0647 \u0645\u0648\u0628\u0627\u06CC\u0644 \u0646\u062F\u0627\u0631\u062F"); + } + const mobiles = mobileVariants(claims.phoneNumber); + let expert = null; + let expertMobile = claims.phoneNumber; + for (const candidate of mobiles) { + expert = await this.resolveExpertPrincipal(candidate); + if (expert) { + expertMobile = candidate; + break; + } + } + const identity = { + sub: claims.sub, + email: null, + phoneNumber: claims.phoneNumber, + firstName: null, + lastName: null, + sessionId: claims.sessionId, + browserTicket: null + }; + if (expert) { + return { + token: await this.issueExpertToken(expert.adminUserId, expertMobile, { identity, ip }), + customer: { id: expert.tradingCustomerId, mobile: expertMobile } + }; + } + const customer = await this.prisma.customer.findFirst({ + where: { mobile: { in: mobiles }, isActive: true, isArchived: false }, + select: { id: true, mobile: true } + }); + if (!customer) { + throw new common_12.UnauthorizedException("\u062D\u0633\u0627\u0628\u06CC \u0628\u0627 \u0627\u06CC\u0646 \u0634\u0645\u0627\u0631\u0647 \u062F\u0631 \u0627\u06CC\u0646 \u0633\u0627\u0645\u0627\u0646\u0647 \u0646\u06CC\u0633\u062A"); + } + return { + token: await this.issueToken(customer.id, customer.mobile, { identity, ip }), + customer: { id: customer.id, mobile: customer.mobile } + }; + } + centralLogoutUrl(requestedReturn) { + if (!this.iam.enabled) + return null; + const redirect = (0, env_12.pickExactUri)(requestedReturn, [ + (0, env_12.envOrNull)("IAM_POST_LOGOUT_REDIRECT_URI"), + (0, env_12.envOrNull)("IAM_BROWSER_RETURN_URL"), + ...(0, env_12.envList)("IAM_ALLOWED_RETURN_URLS") + ]); + const clientId = (0, env_12.envOrNull)("IAM_CLIENT_ID"); + if (!redirect || !clientId) + return null; + const url = new URL(`${this.iam.issuer}/oauth/logout`); + url.searchParams.set("client_id", clientId); + url.searchParams.set("post_logout_redirect_uri", redirect); + return url.toString(); + } + withBootstrap(body, identity) { + const url = this.iam.browserBootstrapUrl(identity?.browserTicket); + return url ? { ...body, iamBootstrapUrl: url } : body; + } + ssoSecret() { + return (0, env_12.envOrNull)("JWT_CUSTOMER_SECRET") || (0, env_12.envOrNull)("JWT_SECRET") || (0, env_12.envOr)("IAM_CLIENT_SECRET", "iam-sso"); + } + readSsoCookie(value) { + if (!value || !value.includes(".")) + return null; + const split = value.lastIndexOf("."); + const payload = value.slice(0, split); + const sig = value.slice(split + 1); + const expected = (0, node_crypto_1.createHmac)("sha256", this.ssoSecret()).update(payload).digest("base64url"); + if (expected.length !== sig.length) + return null; + let same = 0; + for (let i = 0; i < expected.length; i++) + same |= expected.charCodeAt(i) ^ sig.charCodeAt(i); + if (same !== 0) + return null; + try { + return JSON.parse(Buffer.from(payload, "base64url").toString("utf8")); + } catch { + return null; + } + } + async issueToken(customerId, mobile, context = {}) { + const jti = this.sessions.newTokenId(); + const payload = { + sub: customerId, + mobile, + typ: customer_jwt_strategy_1.CUSTOMER_TOKEN_TYPE, + ...jti ? { jti } : {} + }; + const token = await this.jwt.signAsync(payload, { + secret: customerJwtSecret(), + // jsonwebtoken types expiresIn as a template-literal union, which a plain + // string from process.env does not satisfy — same cast AuthModule uses. + expiresIn: (0, env_12.envOr)("JWT_CUSTOMER_EXPIRES_IN", "30d") + }); + if (jti) { + await this.sessions.record({ + jti, + subjectId: customerId, + subjectType: "customer", + mobile, + iamSessionId: context.identity?.sessionId ?? null, + iamSub: context.identity?.sub ?? null, + ipAddress: context.ip ?? null + }); + } + return token; + } + /** + * Per-mobile and per-IP send throttle. + * + * Counted off the CustomerOtp rows rather than an in-memory map, so the limit + * survives a restart and holds across replicas. The reference had no limit: + * userAuth could be called in a loop, each call sending a real (billed) SMS. + */ + async assertSendAllowed(mobile, ip) { + const since = new Date(Date.now() - SEND_WINDOW_MS); + const lastToMobile = await this.prisma.customerOtp.findFirst({ + where: { mobile }, + orderBy: { createdAt: "desc" }, + select: { createdAt: true } + }); + if (lastToMobile && Date.now() - lastToMobile.createdAt.getTime() < RESEND_COOLDOWN_MS) { + const wait = Math.ceil((RESEND_COOLDOWN_MS - (Date.now() - lastToMobile.createdAt.getTime())) / 1e3); + throw new TooManyRequestsException(`\u0644\u0637\u0641\u0627\u064B ${wait} \u062B\u0627\u0646\u06CC\u0647 \u062F\u06CC\u06AF\u0631 \u062A\u0644\u0627\u0634 \u06A9\u0646\u06CC\u062F`); + } + const sentToMobile = await this.prisma.customerOtp.count({ + where: { mobile, createdAt: { gte: since } } + }); + if (sentToMobile >= MAX_SENDS_PER_MOBILE) { + throw new TooManyRequestsException("\u062A\u0639\u062F\u0627\u062F \u062F\u0631\u062E\u0648\u0627\u0633\u062A\u200C\u0647\u0627\u06CC \u06A9\u062F \u0628\u06CC\u0634 \u0627\u0632 \u062D\u062F \u0645\u062C\u0627\u0632 \u0627\u0633\u062A. \u0644\u0637\u0641\u0627\u064B \u0628\u0639\u062F\u0627\u064B \u062A\u0644\u0627\u0634 \u06A9\u0646\u06CC\u062F."); + } + if (ip) { + const sentFromIp = await this.prisma.customerOtp.count({ + where: { requestIp: ip, createdAt: { gte: since } } + }); + if (sentFromIp >= MAX_SENDS_PER_IP) { + throw new TooManyRequestsException("\u062A\u0639\u062F\u0627\u062F \u062F\u0631\u062E\u0648\u0627\u0633\u062A\u200C\u0647\u0627\u06CC \u06A9\u062F \u0628\u06CC\u0634 \u0627\u0632 \u062D\u062F \u0645\u062C\u0627\u0632 \u0627\u0633\u062A. \u0644\u0637\u0641\u0627\u064B \u0628\u0639\u062F\u0627\u064B \u062A\u0644\u0627\u0634 \u06A9\u0646\u06CC\u062F."); + } + } + } + /** + * Hands the code to the SMS gateway (SmsService -> the SMS_PROVIDER driver, + * relay by default per D26). + * + * When no gateway is configured, SmsService does not send and the code is + * logged instead — outside production only (D20). + * + * A failed send does NOT throw. The reference ignored Sms::Send's result, so + * a gateway outage never blocked the flow that triggered it; the customer + * simply retries, and the throttle in assertSendAllowed still applies. + */ + async deliver(mobile, code) { + const smsText = `<#> code is ${code} +\u0631\u0645\u0632 \u0639\u0628\u0648\u0631 \u06CC\u06A9\u0628\u0627\u0631 \u0645\u0635\u0631\u0641 \u0634\u0645\u0627 \u062C\u0647\u062A \u0648\u0631\u0648\u062F \u0628\u0647 \u0627\u067E\u0644\u06CC\u06A9\u0634\u0646 \u0647\u0646\u0632\u0627 \u06AF\u0644\u062F ${code} \u0645\u06CC \u0628\u0627\u0634\u062F +aMo6iFyUQaY`; + await this.sms.send(mobile, smsText, { persist: false }); + if (process.env.NODE_ENV !== "production" && !(0, sms_service_12.smsConfigured)()) { + this.logger.log(`[dev] OTP for ${mobile}: ${code}`); + } + await this.prisma.smsMessage.create({ + data: { + audience: client_1.MessageAudience.SINGLE_NUMBER, + recipients: mobile, + body: "\u06A9\u062F \u06CC\u06A9\u0628\u0627\u0631 \u0645\u0635\u0631\u0641 \u0648\u0631\u0648\u062F (\u0645\u062A\u0646 \u067E\u06CC\u0627\u0645 \u062B\u0628\u062A \u0646\u0645\u06CC\u200C\u0634\u0648\u062F)", + sentCount: 1 + } + }); + } + }; + exports2.CustomerAuthService = CustomerAuthService; + exports2.CustomerAuthService = CustomerAuthService = CustomerAuthService_1 = __decorate4([ + (0, common_12.Injectable)(), + __metadata3("design:paramtypes", [ + prisma_service_1.PrismaService, + jwt_1.JwtService, + sms_service_12.SmsService, + iam_service_1.IamService, + app_session_service_1.AppSessionService + ]) + ], CustomerAuthService); + function customerJwtSecret() { + return (0, env_12.envOrNull)("JWT_CUSTOMER_SECRET") ?? (0, env_12.envOrNull)("JWT_SECRET") ?? "dev-only-insecure-customer-secret"; + } + } +}); + +// dist/modules/customer-auth/dto/request-otp.dto.js +var require_request_otp_dto = __commonJS({ + "dist/modules/customer-auth/dto/request-otp.dto.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RequestOtpDto = void 0; + var class_validator_1 = require_cjs(); + var RequestOtpDto = class { + username; + }; + exports2.RequestOtpDto = RequestOtpDto; + __decorate4([ + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsNotEmpty)({ message: "\u0634\u0645\u0627\u0631\u0647 \u0645\u0648\u0628\u0627\u06CC\u0644 \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A" }), + (0, class_validator_1.MaxLength)(20), + __metadata3("design:type", String) + ], RequestOtpDto.prototype, "username", void 0); + } +}); + +// dist/modules/customer-auth/dto/verify-otp.dto.js +var require_verify_otp_dto = __commonJS({ + "dist/modules/customer-auth/dto/verify-otp.dto.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.VerifyOtpDto = void 0; + var class_validator_1 = require_cjs(); + var VerifyOtpDto = class { + username; + password; + }; + exports2.VerifyOtpDto = VerifyOtpDto; + __decorate4([ + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsNotEmpty)({ message: "\u0634\u0645\u0627\u0631\u0647 \u0645\u0648\u0628\u0627\u06CC\u0644 \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A" }), + (0, class_validator_1.MaxLength)(20), + __metadata3("design:type", String) + ], VerifyOtpDto.prototype, "username", void 0); + __decorate4([ + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsNotEmpty)({ message: "\u06A9\u062F \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A" }), + (0, class_validator_1.MaxLength)(10), + __metadata3("design:type", String) + ], VerifyOtpDto.prototype, "password", void 0); + } +}); + +// dist/modules/customer-auth/customer.guards.js +var require_customer_guards = __commonJS({ + "dist/modules/customer-auth/customer.guards.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CurrentCustomer = exports2.CustomerAuth = exports2.CustomerJwtGuard = void 0; + var common_12 = require_common(); + var passport_1 = require_passport(); + var guards_1 = require_guards2(); + var common_2 = require_common(); + var CustomerJwtGuard = class CustomerJwtGuard extends (0, passport_1.AuthGuard)("customer-jwt") { + }; + exports2.CustomerJwtGuard = CustomerJwtGuard; + exports2.CustomerJwtGuard = CustomerJwtGuard = __decorate4([ + (0, common_12.Injectable)() + ], CustomerJwtGuard); + var CustomerAuth = () => (0, common_2.applyDecorators)((0, guards_1.Public)(), (0, common_2.UseGuards)(CustomerJwtGuard)); + exports2.CustomerAuth = CustomerAuth; + exports2.CurrentCustomer = (0, common_12.createParamDecorator)((_data, ctx) => ctx.switchToHttp().getRequest().user); + } +}); + +// dist/modules/customer-auth/customer-auth.controller.js +var require_customer_auth_controller = __commonJS({ + "dist/modules/customer-auth/customer-auth.controller.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param3 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CustomerAuthController = void 0; + var common_12 = require_common(); + var customer_auth_service_12 = require_customer_auth_service(); + var customers_service_1 = require_customers_service(); + var request_otp_dto_1 = require_request_otp_dto(); + var verify_otp_dto_1 = require_verify_otp_dto(); + var guards_1 = require_guards2(); + var customer_guards_1 = require_customer_guards(); + var CustomerAuthController = class CustomerAuthController { + auth; + customers; + constructor(auth, customers) { + this.auth = auth; + this.customers = customers; + } + /** Step 1. Always answers `{ sent: true }` — it never reveals whether the number is registered. */ + requestOtp(dto, ip) { + return this.auth.requestOtp(dto.username, ip); + } + /** Step 2. Returns the token and that one customer, as the reference did. */ + verifyOtp(dto, ip) { + return this.auth.verifyOtp(dto.username, dto.password, ip); + } + /** اگر نشست IAM در مرورگر باشد، آدرس authorize با prompt=none برمی‌گردد. */ + startSso(redirectUri, res) { + const started = this.auth.beginBrowserSso(redirectUri); + if (!started) + return { enabled: false, authorize_url: null }; + res.setHeader("Set-Cookie", started.cookie); + return { enabled: true, authorize_url: started.authorizeUrl }; + } + ssoCallback(body, cookieHeader, ip, res) { + res.setHeader("Set-Cookie", "gb_iam_sso=; HttpOnly; Path=/; Max-Age=0; SameSite=Lax"); + return this.auth.completeBrowserSso(readCookie(cookieHeader, "gb_iam_sso"), body.code ?? "", body.state ?? "", ip); + } + ssoLogoutUrl(returnUrl) { + return { logout_url: this.auth.centralLogoutUrl(returnUrl) }; + } + me(me) { + return this.customers.getOrThrow(me.id); + } + myOrders(me) { + return this.customers.getOrders(me.id); + } + myLedgerEntries(me) { + return this.customers.getLedgerEntries(me.id); + } + }; + exports2.CustomerAuthController = CustomerAuthController; + __decorate4([ + (0, guards_1.Public)(), + (0, common_12.Post)("auth/request-otp"), + (0, common_12.HttpCode)(200), + __param3(0, (0, common_12.Body)()), + __param3(1, (0, common_12.Ip)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [request_otp_dto_1.RequestOtpDto, String]), + __metadata3("design:returntype", void 0) + ], CustomerAuthController.prototype, "requestOtp", null); + __decorate4([ + (0, guards_1.Public)(), + (0, common_12.Post)("auth/verify-otp"), + (0, common_12.HttpCode)(200), + __param3(0, (0, common_12.Body)()), + __param3(1, (0, common_12.Ip)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [verify_otp_dto_1.VerifyOtpDto, String]), + __metadata3("design:returntype", void 0) + ], CustomerAuthController.prototype, "verifyOtp", null); + __decorate4([ + (0, guards_1.Public)(), + (0, common_12.Get)("auth/sso/start"), + __param3(0, (0, common_12.Query)("redirect_uri")), + __param3(1, (0, common_12.Res)({ passthrough: true })), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object, Object]), + __metadata3("design:returntype", void 0) + ], CustomerAuthController.prototype, "startSso", null); + __decorate4([ + (0, guards_1.Public)(), + (0, common_12.Post)("auth/sso/callback"), + (0, common_12.HttpCode)(200), + __param3(0, (0, common_12.Body)()), + __param3(1, (0, common_12.Headers)("cookie")), + __param3(2, (0, common_12.Ip)()), + __param3(3, (0, common_12.Res)({ passthrough: true })), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object, Object, String, Object]), + __metadata3("design:returntype", void 0) + ], CustomerAuthController.prototype, "ssoCallback", null); + __decorate4([ + (0, guards_1.Public)(), + (0, common_12.Get)("auth/sso/logout-url"), + __param3(0, (0, common_12.Query)("return_url")), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [String]), + __metadata3("design:returntype", void 0) + ], CustomerAuthController.prototype, "ssoLogoutUrl", null); + __decorate4([ + (0, customer_guards_1.CustomerAuth)(), + (0, common_12.Get)("me"), + __param3(0, (0, customer_guards_1.CurrentCustomer)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object]), + __metadata3("design:returntype", void 0) + ], CustomerAuthController.prototype, "me", null); + __decorate4([ + (0, customer_guards_1.CustomerAuth)(), + (0, common_12.Get)("me/orders"), + __param3(0, (0, customer_guards_1.CurrentCustomer)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object]), + __metadata3("design:returntype", void 0) + ], CustomerAuthController.prototype, "myOrders", null); + __decorate4([ + (0, customer_guards_1.CustomerAuth)(), + (0, common_12.Get)("me/ledger-entries"), + __param3(0, (0, customer_guards_1.CurrentCustomer)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object]), + __metadata3("design:returntype", void 0) + ], CustomerAuthController.prototype, "myLedgerEntries", null); + exports2.CustomerAuthController = CustomerAuthController = __decorate4([ + (0, common_12.Controller)("customer"), + __metadata3("design:paramtypes", [ + customer_auth_service_12.CustomerAuthService, + customers_service_1.CustomersService + ]) + ], CustomerAuthController); + function readCookie(header, name) { + if (!header) + return null; + for (const part of header.split(";")) { + const [key, ...rest] = part.trim().split("="); + if (key === name) + return decodeURIComponent(rest.join("=")); + } + return null; + } + } +}); + +// dist/modules/customer-auth/customer-auth.module.js +var require_customer_auth_module = __commonJS({ + "dist/modules/customer-auth/customer-auth.module.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CustomerAuthModule = void 0; + var common_12 = require_common(); + var jwt_1 = (init_dist(), __toCommonJS(dist_exports)); + var passport_1 = require_passport(); + var prisma_module_1 = require_prisma_module(); + var customers_module_1 = require_customers_module(); + var customer_auth_controller_1 = require_customer_auth_controller(); + var customer_auth_service_12 = require_customer_auth_service(); + var customer_jwt_strategy_1 = require_customer_jwt_strategy(); + var CustomerAuthModule = class CustomerAuthModule { + }; + exports2.CustomerAuthModule = CustomerAuthModule; + exports2.CustomerAuthModule = CustomerAuthModule = __decorate4([ + (0, common_12.Module)({ + imports: [prisma_module_1.PrismaModule, passport_1.PassportModule, jwt_1.JwtModule.register({}), customers_module_1.CustomersModule], + controllers: [customer_auth_controller_1.CustomerAuthController], + providers: [customer_auth_service_12.CustomerAuthService, customer_jwt_strategy_1.CustomerJwtStrategy], + exports: [customer_auth_service_12.CustomerAuthService] + }) + ], CustomerAuthModule); + } +}); + +// dist/modules/sales-expert-app/sales-expert-app.service.js +var require_sales_expert_app_service = __commonJS({ + "dist/modules/sales-expert-app/sales-expert-app.service.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SalesExpertAppService = void 0; + var common_12 = require_common(); + var client_1 = require("@prisma/client"); + var prisma_service_1 = require_prisma_service(); + var SalesExpertAppService = class SalesExpertAppService { + prisma; + constructor(prisma) { + this.prisma = prisma; + } + /** Refuses any principal that is not a sales expert. */ + assertExpert(adminUserId) { + if (!adminUserId) { + throw new common_12.ForbiddenException("\u0627\u06CC\u0646 \u0628\u062E\u0634 \u0641\u0642\u0637 \u0628\u0631\u0627\u06CC \u06A9\u0627\u0631\u0634\u0646\u0627\u0633 \u0641\u0631\u0648\u0634 \u0627\u0633\u062A"); + } + return adminUserId; + } + /** + * Port of `getChildOrder` (ApiMobileController.php:759-781). + * + * The reference filtered `where('sts', 5)` — legacy status 5 is + * «تحویل مسئول فروش» (delivered to the sales agent), the point at which the + * agent has to act on the order. Reproduced with the equivalent status here; + * the heading the reference hardcodes on every card is that same label + * (ChildOrders.vue:48). + * + * Search covers what the reference searched: order id, customer name and + * customer mobile (`initSearch(['id','customer_id','customer.name','customer.mobile'])`). + * Ordered `id DESC`, i.e. newest first. + */ + async childOrders(adminUserId, params) { + const agentId = this.assertExpert(adminUserId); + const page = Math.max(1, Number(params.page ?? 1)); + const limit = Math.min(100, Math.max(1, Number(params.limit ?? 20))); + const search = (params.search ?? "").trim(); + const scope = { + // Legacy getChildOrder: `where('reagent_id', auth()->id())` + // (ApiMobileController.php:779) — the orders credited to THIS expert when + // they were placed (Order.salesAgentId), not the customer's current + // referrer. No id from the request takes part in this. + salesAgentId: agentId, + status: client_1.OrderStatus.DELIVERED_TO_AGENT + }; + const where = search ? { + AND: [ + scope, + { + OR: [ + { orderNumber: { contains: search, mode: "insensitive" } }, + { customer: { fullName: { contains: search, mode: "insensitive" } } }, + { customer: { mobile: { contains: search } } } + ] + } + ] + } : scope; + const [rows, total] = await Promise.all([ + this.prisma.order.findMany({ + where, + orderBy: { createdAt: "desc" }, + skip: (page - 1) * limit, + take: limit, + include: { + items: true, + customer: { select: { id: true, fullName: true, mobile: true } } + } + }), + this.prisma.order.count({ where }) + ]); + return { + rows: rows.map((o) => ({ + id: o.id, + orderNumber: o.orderNumber, + status: o.status, + // The reference's card shows the order's total weight as `item.w` + // (ChildOrders.vue:55) and the item count as `items.length`. + w: o.totalGoldWeightGrams, + totalGoldWeightGrams: o.totalGoldWeightGrams, + createdAt: o.createdAt, + items: o.items, + customer: o.customer ? { id: o.customer.id, name: o.customer.fullName, mobile: o.customer.mobile } : null + })), + total, + page, + limit + }; + } + /** + * Port of `myChild` (ApiMobileController.php:184-195) — the expert's own + * referred customers, for "انتخاب مشتری". + * + * The reference searched name, mobile, phone, store_name and pasazh_name; + * all five exist here. It also returned EVERY referred customer, active or + * not — the `active()` scope is commented out at :187 — so that is + * reproduced rather than "fixed" (D4). + * + * NOT ported: the reference minted an `api_token` for each listed customer + * as a side effect (:197-201), which let an agent act AS that customer. That + * is a session-hijack primitive; this system derives every session from the + * caller's own token. See D21. + */ + async myCustomers(adminUserId, params) { + const agentId = this.assertExpert(adminUserId); + const search = (params.search ?? "").trim(); + const scope = { referredByAgentId: agentId }; + const where = search ? { + AND: [ + scope, + { + OR: [ + { fullName: { contains: search, mode: "insensitive" } }, + { mobile: { contains: search } }, + { phone: { contains: search } }, + { storeName: { contains: search, mode: "insensitive" } }, + { pasazhName: { contains: search, mode: "insensitive" } } + ] + } + ] + } : scope; + const rows = await this.prisma.customer.findMany({ + where, + orderBy: { createdAt: "desc" }, + select: { + id: true, + fullName: true, + mobile: true, + phone: true, + storeName: true, + pasazhName: true, + goldCreditLimitGrams: true, + goldDebtGrams: true, + fiatDebtRial: true, + isActive: true, + createdAt: true + } + }); + return rows.map((c) => ({ + id: c.id, + // legacy key, which the ported card binds to + name: c.fullName, + fullName: c.fullName, + mobile: c.mobile, + phone: c.phone, + store_name: c.storeName, + pasazh_name: c.pasazhName, + gram_level: c.goldCreditLimitGrams, + remain: c.goldDebtGrams, + rial_remain: c.fiatDebtRial, + active: c.isActive ? 1 : -1, + createdAt: c.createdAt + })); + } + /** The expert's own profile strip, for the app header. */ + async me(adminUserId) { + const agentId = this.assertExpert(adminUserId); + const admin = await this.prisma.adminUser.findUnique({ + where: { id: agentId }, + select: { + id: true, + fullName: true, + firstName: true, + lastName: true, + mobile: true, + wagePercent: true, + salesExpertProfile: { + select: { gramLevel: true, tradingCustomerId: true, city: { select: { id: true, name: true } } } + }, + _count: { select: { referredCustomers: true } } + } + }); + return { + id: admin?.id, + name: admin?.fullName, + fname: admin?.firstName ?? admin?.fullName, + lname: admin?.lastName ?? "", + mobile: admin?.mobile, + percent: admin?.wagePercent, + gram_level: admin?.salesExpertProfile?.gramLevel ?? null, + city: admin?.salesExpertProfile?.city ? { id: admin.salesExpertProfile.city.id, title: admin.salesExpertProfile.city.name } : null, + customers_count: admin?._count.referredCustomers ?? 0, + /** The Customer row the expert's OWN orders land on. */ + trading_customer_id: admin?.salesExpertProfile?.tradingCustomerId ?? null + }; + } + }; + exports2.SalesExpertAppService = SalesExpertAppService; + exports2.SalesExpertAppService = SalesExpertAppService = __decorate4([ + (0, common_12.Injectable)(), + __metadata3("design:paramtypes", [prisma_service_1.PrismaService]) + ], SalesExpertAppService); + } +}); + +// dist/modules/sales-expert-app/sales-expert-app.controller.js +var require_sales_expert_app_controller = __commonJS({ + "dist/modules/sales-expert-app/sales-expert-app.controller.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param3 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SalesExpertAppController = void 0; + var common_12 = require_common(); + var sales_expert_app_service_1 = require_sales_expert_app_service(); + var customer_guards_1 = require_customer_guards(); + var SalesExpertAppController = class SalesExpertAppController { + expert; + constructor(expert) { + this.expert = expert; + } + /** Legacy POST /order/child — POST because the reference posted its paging. */ + childOrders(body, me) { + return this.expert.childOrders(me.adminUserId, body ?? {}); + } + /** Legacy POST /my-child. */ + myCustomers(body, me) { + return this.expert.myCustomers(me.adminUserId, { + search: body?.search ?? body?.text_search ?? null + }); + } + me(me) { + return this.expert.me(me.adminUserId); + } + /** + * Whether the signed-in principal is a sales expert. The apps call this once + * after login to decide whether to show the two expert entries; the answer + * comes from the token, so a customer cannot make it say yes. + */ + whoami(me) { + return { isSalesExpert: Boolean(me.adminUserId), type: me.type }; + } + }; + exports2.SalesExpertAppController = SalesExpertAppController; + __decorate4([ + (0, customer_guards_1.CustomerAuth)(), + (0, common_12.Post)("child-orders"), + (0, common_12.HttpCode)(200), + __param3(0, (0, common_12.Body)()), + __param3(1, (0, customer_guards_1.CurrentCustomer)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object, Object]), + __metadata3("design:returntype", void 0) + ], SalesExpertAppController.prototype, "childOrders", null); + __decorate4([ + (0, customer_guards_1.CustomerAuth)(), + (0, common_12.Post)("my-customers"), + (0, common_12.HttpCode)(200), + __param3(0, (0, common_12.Body)()), + __param3(1, (0, customer_guards_1.CurrentCustomer)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object, Object]), + __metadata3("design:returntype", void 0) + ], SalesExpertAppController.prototype, "myCustomers", null); + __decorate4([ + (0, customer_guards_1.CustomerAuth)(), + (0, common_12.Get)("me"), + __param3(0, (0, customer_guards_1.CurrentCustomer)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object]), + __metadata3("design:returntype", void 0) + ], SalesExpertAppController.prototype, "me", null); + __decorate4([ + (0, customer_guards_1.CustomerAuth)(), + (0, common_12.Get)("whoami"), + __param3(0, (0, customer_guards_1.CurrentCustomer)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object]), + __metadata3("design:returntype", void 0) + ], SalesExpertAppController.prototype, "whoami", null); + exports2.SalesExpertAppController = SalesExpertAppController = __decorate4([ + (0, common_12.Controller)("expert"), + __metadata3("design:paramtypes", [sales_expert_app_service_1.SalesExpertAppService]) + ], SalesExpertAppController); + } +}); + +// dist/modules/sales-expert-app/sales-expert-app.module.js +var require_sales_expert_app_module = __commonJS({ + "dist/modules/sales-expert-app/sales-expert-app.module.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SalesExpertAppModule = void 0; + var common_12 = require_common(); + var prisma_module_1 = require_prisma_module(); + var sales_expert_app_controller_1 = require_sales_expert_app_controller(); + var sales_expert_app_service_1 = require_sales_expert_app_service(); + var SalesExpertAppModule = class SalesExpertAppModule { + }; + exports2.SalesExpertAppModule = SalesExpertAppModule; + exports2.SalesExpertAppModule = SalesExpertAppModule = __decorate4([ + (0, common_12.Module)({ + imports: [prisma_module_1.PrismaModule], + controllers: [sales_expert_app_controller_1.SalesExpertAppController], + providers: [sales_expert_app_service_1.SalesExpertAppService], + exports: [sales_expert_app_service_1.SalesExpertAppService] + }) + ], SalesExpertAppModule); + } +}); + +// dist/modules/sms/sms.module.js +var require_sms_module = __commonJS({ + "dist/modules/sms/sms.module.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SmsModule = void 0; + var common_12 = require_common(); + var sms_service_12 = require_sms_service(); + var SmsModule = class SmsModule { + }; + exports2.SmsModule = SmsModule; + exports2.SmsModule = SmsModule = __decorate4([ + (0, common_12.Global)(), + (0, common_12.Module)({ + providers: [sms_service_12.SmsService], + exports: [sms_service_12.SmsService] + }) + ], SmsModule); + } +}); + +// dist/modules/admin-uploads/upload-path.js +var require_upload_path = __commonJS({ + "dist/modules/admin-uploads/upload-path.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.getUploadDir = getUploadDir; + exports2.mimeForUpload = mimeForUpload; + exports2.resolveStoredUpload = resolveStoredUpload; + var node_fs_1 = require("node:fs"); + var node_path_12 = require("node:path"); + var env_12 = require_env(); + function getUploadDir() { + return (0, node_path_12.resolve)((0, env_12.envOr)("UPLOAD_DIR", (0, node_path_12.join)(process.cwd(), "storage", "uploads"))); + } + var UPLOAD_MIME = { + ".png": "image/png", + ".jpg": "image/jpeg", + ".jpeg": "image/jpeg", + ".gif": "image/gif", + ".webp": "image/webp", + ".avif": "image/avif", + ".svg": "image/svg+xml", + ".pdf": "application/pdf" + }; + function mimeForUpload(filePath) { + const dot = filePath.lastIndexOf("."); + const ext = dot >= 0 ? filePath.slice(dot).toLowerCase() : ""; + return UPLOAD_MIME[ext]; + } + function resolveStoredUpload(rawName) { + const safe = (0, node_path_12.basename)(rawName); + if (!safe || safe === "." || safe === "..") + return null; + const dir = getUploadDir(); + const candidates = [(0, node_path_12.join)(dir, safe), (0, node_path_12.join)(dir, "uploads", safe)]; + for (const candidate of candidates) { + const resolved = (0, node_path_12.resolve)(candidate); + const rel = (0, node_path_12.relative)(dir, resolved); + if (!rel || rel.startsWith("..") || (0, node_path_12.isAbsolute)(rel)) + continue; + if ((0, node_fs_1.existsSync)(resolved) && (0, node_fs_1.statSync)(resolved).isFile()) + return resolved; + } + return null; + } + } +}); + +// dist/modules/admin-uploads/admin-uploads.service.js +var require_admin_uploads_service = __commonJS({ + "dist/modules/admin-uploads/admin-uploads.service.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var AdminUploadsService_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AdminUploadsService = void 0; + var common_12 = require_common(); + var node_crypto_1 = require("node:crypto"); + var promises_1 = require("node:fs/promises"); + var node_path_12 = require("node:path"); + var prisma_service_1 = require_prisma_service(); + var upload_path_1 = require_upload_path(); + var AdminUploadsService = class AdminUploadsService { + static { + AdminUploadsService_1 = this; + } + prisma; + /** Matches legacy's flat public/storage directory. */ + dir = (0, upload_path_1.getUploadDir)(); + /** Mirrors legacy's `type` field: 1 = image, 2 = any other document. */ + static IMAGE_MIME = /^image\/(jpeg|png|gif|webp|svg\+xml)$/; + static ALLOWED = /^(image\/(jpeg|png|gif|webp|svg\+xml)|application\/pdf)$/; + /** 8 MB. Legacy relied on PHP's upload_max_filesize; this makes it explicit. */ + static MAX_BYTES = 8 * 1024 * 1024; + constructor(prisma) { + this.prisma = prisma; + } + async store(file2, purpose, actorAdminUserId) { + if (!file2) + throw new common_12.BadRequestException("\u0641\u0627\u06CC\u0644\u06CC \u0627\u0631\u0633\u0627\u0644 \u0646\u0634\u062F\u0647 \u0627\u0633\u062A"); + if (file2.size > AdminUploadsService_1.MAX_BYTES) { + throw new common_12.BadRequestException("\u062D\u062C\u0645 \u0641\u0627\u06CC\u0644 \u0628\u06CC\u0634 \u0627\u0632 \u062D\u062F \u0645\u062C\u0627\u0632 \u0627\u0633\u062A (\u06F8 \u0645\u06AF\u0627\u0628\u0627\u06CC\u062A)"); + } + if (!AdminUploadsService_1.ALLOWED.test(file2.mimetype)) { + throw new common_12.BadRequestException("\u0646\u0648\u0639 \u0641\u0627\u06CC\u0644 \u0645\u062C\u0627\u0632 \u0646\u06CC\u0633\u062A"); + } + const ext = (0, node_path_12.extname)(file2.originalname).toLowerCase(); + const stored = (0, node_crypto_1.createHash)("md5").update(`${Date.now()}${file2.originalname}${(0, node_crypto_1.randomUUID)()}`).digest("hex") + ext; + await (0, promises_1.mkdir)(this.dir, { recursive: true }); + await (0, promises_1.writeFile)((0, node_path_12.join)(this.dir, stored), file2.buffer); + return this.prisma.uploadedFile.create({ + data: { + url: `/uploads/${stored}`, + originalName: file2.originalname, + mimeType: file2.mimetype, + sizeBytes: file2.size, + purpose: purpose ?? null, + uploadedByAdminUserId: actorAdminUserId + } + }); + } + async findOne(id) { + const f = await this.prisma.uploadedFile.findUnique({ where: { id } }); + if (!f) + throw new common_12.NotFoundException("\u0641\u0627\u06CC\u0644 \u06CC\u0627\u0641\u062A \u0646\u0634\u062F"); + return f; + } + /** True when the stored file is an image, for callers that care. */ + static isImage(mime) { + return AdminUploadsService_1.IMAGE_MIME.test(mime); + } + }; + exports2.AdminUploadsService = AdminUploadsService; + exports2.AdminUploadsService = AdminUploadsService = AdminUploadsService_1 = __decorate4([ + (0, common_12.Injectable)(), + __metadata3("design:paramtypes", [prisma_service_1.PrismaService]) + ], AdminUploadsService); + } +}); + +// dist/modules/admin-uploads/admin-uploads.controller.js +var require_admin_uploads_controller = __commonJS({ + "dist/modules/admin-uploads/admin-uploads.controller.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param3 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AdminUploadsController = void 0; + var common_12 = require_common(); + var platform_express_1 = require_platform_express(); + var admin_uploads_service_1 = require_admin_uploads_service(); + var guards_1 = require_guards2(); + var common_2 = require_common(); + var AdminUploadsController = class AdminUploadsController { + uploads; + constructor(uploads) { + this.uploads = uploads; + } + create(file2, purpose, admin) { + return this.uploads.store(file2, purpose, admin.id ?? null); + } + findOne(id) { + return this.uploads.findOne(id); + } + }; + exports2.AdminUploadsController = AdminUploadsController; + __decorate4([ + (0, common_12.Post)("create"), + (0, common_12.HttpCode)(200), + (0, common_12.UseInterceptors)((0, platform_express_1.FileInterceptor)("file")), + __param3(0, (0, common_12.UploadedFile)()), + __param3(1, (0, common_2.Body)("purpose")), + __param3(2, (0, guards_1.CurrentAdmin)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object, Object, Object]), + __metadata3("design:returntype", void 0) + ], AdminUploadsController.prototype, "create", null); + __decorate4([ + (0, common_12.Get)(":id"), + __param3(0, (0, common_12.Param)("id")), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [String]), + __metadata3("design:returntype", void 0) + ], AdminUploadsController.prototype, "findOne", null); + exports2.AdminUploadsController = AdminUploadsController = __decorate4([ + (0, common_12.Controller)("admin/files"), + __metadata3("design:paramtypes", [admin_uploads_service_1.AdminUploadsService]) + ], AdminUploadsController); + } +}); + +// dist/modules/admin-uploads/public-uploads.controller.js +var require_public_uploads_controller = __commonJS({ + "dist/modules/admin-uploads/public-uploads.controller.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param3 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PublicUploadsController = void 0; + var common_12 = require_common(); + var node_fs_1 = require("node:fs"); + var guards_1 = require_guards2(); + var upload_path_1 = require_upload_path(); + var PublicUploadsController = class PublicUploadsController { + stream(filename) { + const file2 = (0, upload_path_1.resolveStoredUpload)(filename); + if (!file2) + throw new common_12.NotFoundException("\u0641\u0627\u06CC\u0644 \u06CC\u0627\u0641\u062A \u0646\u0634\u062F"); + return new common_12.StreamableFile((0, node_fs_1.createReadStream)(file2), { + type: (0, upload_path_1.mimeForUpload)(file2) ?? "application/octet-stream", + disposition: "inline" + }); + } + }; + exports2.PublicUploadsController = PublicUploadsController; + __decorate4([ + (0, common_12.Get)(":filename"), + (0, common_12.Header)("Cache-Control", "public, max-age=86400"), + __param3(0, (0, common_12.Param)("filename")), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [String]), + __metadata3("design:returntype", common_12.StreamableFile) + ], PublicUploadsController.prototype, "stream", null); + exports2.PublicUploadsController = PublicUploadsController = __decorate4([ + (0, guards_1.Public)(), + (0, common_12.Controller)("uploads") + ], PublicUploadsController); + } +}); + +// dist/modules/admin-uploads/admin-uploads.module.js +var require_admin_uploads_module = __commonJS({ + "dist/modules/admin-uploads/admin-uploads.module.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AdminUploadsModule = void 0; + var common_12 = require_common(); + var prisma_module_1 = require_prisma_module(); + var admin_uploads_controller_1 = require_admin_uploads_controller(); + var public_uploads_controller_1 = require_public_uploads_controller(); + var admin_uploads_service_1 = require_admin_uploads_service(); + var AdminUploadsModule = class AdminUploadsModule { + }; + exports2.AdminUploadsModule = AdminUploadsModule; + exports2.AdminUploadsModule = AdminUploadsModule = __decorate4([ + (0, common_12.Module)({ + imports: [prisma_module_1.PrismaModule], + controllers: [admin_uploads_controller_1.AdminUploadsController, public_uploads_controller_1.PublicUploadsController], + providers: [admin_uploads_service_1.AdminUploadsService], + exports: [admin_uploads_service_1.AdminUploadsService] + }) + ], AdminUploadsModule); + } +}); + +// dist/modules/customer-profile/customer-profile.service.js +var require_customer_profile_service = __commonJS({ + "dist/modules/customer-profile/customer-profile.service.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var CustomerProfileService_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CustomerProfileService = void 0; + var common_12 = require_common(); + var prisma_service_1 = require_prisma_service(); + var sms_service_12 = require_sms_service(); + var CustomerProfileService = CustomerProfileService_1 = class CustomerProfileService { + prisma; + sms; + logger = new common_12.Logger(CustomerProfileService_1.name); + constructor(prisma, sms) { + this.prisma = prisma; + this.sms = sms; + } + /** + * The admins who are told a customer uploaded their documents. + * + * The reference hardcoded four numbers; this reads a comma-separated env var + * instead. Unset means nobody is notified, and the customer's own SMS and the + * upload itself still go through — consistent with D20, where SMS never + * blocks an operation. + */ + adminMobiles() { + return (process.env.PROFILE_ADMIN_MOBILES ?? "").split(",").map((m) => m.trim()).filter(Boolean); + } + /** + * Resolves an uploaded-file id to its stored URL. + * + * The reference stored the raw id in the customer row and joined to `files` + * on read; the target's Customer columns hold URLs + * (`nationalIdImageUrl`, `businessLicenseUrl`, `shopImageUrl`), so the id is + * resolved here. An id that names no file is a 400 rather than a silent + * null, so a half-completed profile can never be marked verified. + */ + async urlOf(id, label) { + const file2 = await this.prisma.uploadedFile.findUnique({ where: { id } }); + if (!file2) + throw new common_12.BadRequestException(`${label} \u06CC\u0627\u0641\u062A \u0646\u0634\u062F`); + return file2.url; + } + async complete(customerId, dto) { + const customer = await this.prisma.customer.findUnique({ where: { id: customerId } }); + if (!customer) + throw new common_12.NotFoundException("\u0645\u0634\u062A\u0631\u06CC \u06CC\u0627\u0641\u062A \u0646\u0634\u062F"); + const [businessLicenseUrl, shopImageUrl, nationalIdImageUrl] = await Promise.all([ + this.urlOf(dto.business_license_image_id, "\u062A\u0635\u0648\u06CC\u0631 \u062C\u0648\u0627\u0632 \u06A9\u0633\u0628"), + this.urlOf(dto.shop_image_id, "\u062A\u0635\u0648\u06CC\u0631 \u0633\u0631\u062F\u0631 \u0645\u063A\u0627\u0632\u0647"), + this.urlOf(dto.ncode_image_id, "\u062A\u0635\u0648\u06CC\u0631 \u06A9\u0627\u0631\u062A \u0645\u0644\u06CC") + ]); + const updated = await this.prisma.customer.update({ + where: { id: customerId }, + data: { + businessLicenseUrl, + shopImageUrl, + nationalIdImageUrl, + // The reference's live value: 2, approved outright (:85). + verificationStep: "VERIFIED" + } + }); + this.notify(updated.mobile, updated.firstName ?? "", updated.lastName ?? ""); + return { ok: true }; + } + /** + * Both messages, fire-and-forget. + * + * D20: a failed or unconfigured SMS must never fail the upload, so nothing + * here is awaited and every rejection is swallowed into the log. The + * reference likewise queued them (SendSmsAfterCreate::dispatch, :100). + */ + notify(mobile, firstName, lastName) { + const message = `\u0647\u0646\u0632\u0627 \u06AF\u0644\u062F +\u0647\u0645\u06A9\u0627\u0631 \u06AF\u0631\u0627\u0645\u06CC ${firstName} ${lastName} +\u062A\u06A9\u0645\u06CC\u0644 \u067E\u0631\u0648\u0641\u0627\u06CC\u0644 \u0634\u0645\u0627 \u0628\u0627 \u0645\u0648\u0641\u0642\u06CC\u062A \u0627\u0646\u062C\u0627\u0645 \u0634\u062F.`; + const adminMessage = `\u0647\u0646\u0632\u0627 \u06AF\u0644\u062F +\u0645\u0634\u062A\u0631\u06CC \u0628\u0627 \u0646\u0627\u0645 ${firstName} ${lastName} \u0645\u062F\u0627\u0631\u06A9 \u062E\u0648\u062F \u0631\u0627 \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC \u06A9\u0631\u062F.`; + const fire = (to, body) => { + void this.sms.send(to, body).catch((e) => { + this.logger.error(`Complete-profile SMS to ${to} failed: ${String(e)}`); + }); + }; + fire(mobile, message); + for (const admin of this.adminMobiles()) + fire(admin, adminMessage); + } + }; + exports2.CustomerProfileService = CustomerProfileService; + exports2.CustomerProfileService = CustomerProfileService = CustomerProfileService_1 = __decorate4([ + (0, common_12.Injectable)(), + __metadata3("design:paramtypes", [ + prisma_service_1.PrismaService, + sms_service_12.SmsService + ]) + ], CustomerProfileService); + } +}); + +// dist/modules/customer-profile/dto/complete-profile.dto.js +var require_complete_profile_dto = __commonJS({ + "dist/modules/customer-profile/dto/complete-profile.dto.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CompleteProfileDto = void 0; + var class_validator_1 = require_cjs(); + var CompleteProfileDto = class { + business_license_image_id; + shop_image_id; + ncode_image_id; + }; + exports2.CompleteProfileDto = CompleteProfileDto; + __decorate4([ + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsNotEmpty)({ message: "\u062A\u0635\u0648\u06CC\u0631 \u062C\u0648\u0627\u0632 \u06A9\u0633\u0628 \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A" }), + (0, class_validator_1.MaxLength)(64), + __metadata3("design:type", String) + ], CompleteProfileDto.prototype, "business_license_image_id", void 0); + __decorate4([ + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsNotEmpty)({ message: "\u062A\u0635\u0648\u06CC\u0631 \u0633\u0631\u062F\u0631 \u0645\u063A\u0627\u0632\u0647 \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A" }), + (0, class_validator_1.MaxLength)(64), + __metadata3("design:type", String) + ], CompleteProfileDto.prototype, "shop_image_id", void 0); + __decorate4([ + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsNotEmpty)({ message: "\u062A\u0635\u0648\u06CC\u0631 \u06A9\u0627\u0631\u062A \u0645\u0644\u06CC \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A" }), + (0, class_validator_1.MaxLength)(64), + __metadata3("design:type", String) + ], CompleteProfileDto.prototype, "ncode_image_id", void 0); + } +}); + +// dist/modules/customer-profile/customer-profile.controller.js +var require_customer_profile_controller = __commonJS({ + "dist/modules/customer-profile/customer-profile.controller.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param3 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CustomerProfileController = void 0; + var common_12 = require_common(); + var common_2 = require_common(); + var platform_express_1 = require_platform_express(); + var customer_profile_service_1 = require_customer_profile_service(); + var admin_uploads_service_1 = require_admin_uploads_service(); + var complete_profile_dto_1 = require_complete_profile_dto(); + var customer_guards_1 = require_customer_guards(); + var CustomerProfileController = class CustomerProfileController { + profile; + uploads; + constructor(profile, uploads) { + this.profile = profile; + this.uploads = uploads; + } + /** + * A customer uploading one of their own documents. + * + * The reference let the app upload through the very same `file/create` the + * admin panel used, behind the customer guard (routes/api.php:95). The + * target's copy of that route sits behind an ADMIN guard + * (AdminUploadsController), which no app token can pass — so without this + * route the page could not upload at all. + * + * It reuses AdminUploadsService unchanged, so the size limit, the MIME + * whitelist and the stored-name scheme are identical on both paths. The + * uploader is recorded as null rather than as an admin, because + * `UploadedFile.uploadedByAdminUserId` is an AdminUser FK and this caller is + * a customer; `purpose` carries the document kind instead. + */ + upload(file2, purpose, _me) { + return this.uploads.store(file2, purpose ?? "customer-document", null); + } + /** Ports POST major/complete. The customer is the token's. */ + complete(dto, me) { + return this.profile.complete(me.id, dto); + } + }; + exports2.CustomerProfileController = CustomerProfileController; + __decorate4([ + (0, customer_guards_1.CustomerAuth)(), + (0, common_12.Post)("documents"), + (0, common_12.HttpCode)(200), + (0, common_12.UseInterceptors)((0, platform_express_1.FileInterceptor)("file")), + __param3(0, (0, common_12.UploadedFile)()), + __param3(1, (0, common_2.Body)("purpose")), + __param3(2, (0, customer_guards_1.CurrentCustomer)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object, Object, Object]), + __metadata3("design:returntype", void 0) + ], CustomerProfileController.prototype, "upload", null); + __decorate4([ + (0, customer_guards_1.CustomerAuth)(), + (0, common_12.Post)("complete-profile"), + (0, common_12.HttpCode)(200), + __param3(0, (0, common_2.Body)()), + __param3(1, (0, customer_guards_1.CurrentCustomer)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [complete_profile_dto_1.CompleteProfileDto, Object]), + __metadata3("design:returntype", void 0) + ], CustomerProfileController.prototype, "complete", null); + exports2.CustomerProfileController = CustomerProfileController = __decorate4([ + (0, common_12.Controller)("customer/me"), + __metadata3("design:paramtypes", [ + customer_profile_service_1.CustomerProfileService, + admin_uploads_service_1.AdminUploadsService + ]) + ], CustomerProfileController); + } +}); + +// dist/modules/customer-profile/customer-profile.module.js +var require_customer_profile_module = __commonJS({ + "dist/modules/customer-profile/customer-profile.module.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CustomerProfileModule = void 0; + var common_12 = require_common(); + var prisma_module_1 = require_prisma_module(); + var sms_module_1 = require_sms_module(); + var admin_uploads_module_1 = require_admin_uploads_module(); + var customer_profile_controller_1 = require_customer_profile_controller(); + var customer_profile_service_1 = require_customer_profile_service(); + var CustomerProfileModule = class CustomerProfileModule { + }; + exports2.CustomerProfileModule = CustomerProfileModule; + exports2.CustomerProfileModule = CustomerProfileModule = __decorate4([ + (0, common_12.Module)({ + imports: [prisma_module_1.PrismaModule, sms_module_1.SmsModule, admin_uploads_module_1.AdminUploadsModule], + controllers: [customer_profile_controller_1.CustomerProfileController], + providers: [customer_profile_service_1.CustomerProfileService] + }) + ], CustomerProfileModule); + } +}); + +// dist/modules/customer-favorites/customer-favorites.service.js +var require_customer_favorites_service = __commonJS({ + "dist/modules/customer-favorites/customer-favorites.service.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CustomerFavoritesService = void 0; + var common_12 = require_common(); + var prisma_service_1 = require_prisma_service(); + var CustomerFavoritesService = class CustomerFavoritesService { + prisma; + constructor(prisma) { + this.prisma = prisma; + } + /** + * Product ids, newest first (legacy: `orderBy('updated_at', 'DESC')`). + * Legacy also hid inactive products; the apps render favourites from the + * catalogue, which already lists only active ones, so ids are enough. + */ + async list(customerId) { + const rows = await this.prisma.customerFavorite.findMany({ + where: { customerId }, + orderBy: { createdAt: "desc" }, + select: { productId: true } + }); + return { ids: rows.map((r) => r.productId) }; + } + /** Legacy toggle: delete if present, else add. Answers the new state. */ + async toggle(customerId, productId) { + const key = { customerId_productId: { customerId, productId } }; + const removed = await this.prisma.customerFavorite.deleteMany({ where: { customerId, productId } }); + if (removed.count > 0) + return { favorite: false }; + const product = await this.prisma.product.findUnique({ where: { id: productId }, select: { id: true } }); + if (!product) + throw new common_12.NotFoundException("\u0645\u062D\u0635\u0648\u0644 \u06CC\u0627\u0641\u062A \u0646\u0634\u062F"); + await this.prisma.customerFavorite.upsert({ where: key, create: { customerId, productId }, update: {} }); + return { favorite: true }; + } + }; + exports2.CustomerFavoritesService = CustomerFavoritesService; + exports2.CustomerFavoritesService = CustomerFavoritesService = __decorate4([ + (0, common_12.Injectable)(), + __metadata3("design:paramtypes", [prisma_service_1.PrismaService]) + ], CustomerFavoritesService); + } +}); + +// dist/modules/customer-favorites/dto/toggle-favorite.dto.js +var require_toggle_favorite_dto = __commonJS({ + "dist/modules/customer-favorites/dto/toggle-favorite.dto.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ToggleFavoriteDto = void 0; + var class_validator_1 = require_cjs(); + var ToggleFavoriteDto = class { + productId; + }; + exports2.ToggleFavoriteDto = ToggleFavoriteDto; + __decorate4([ + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsNotEmpty)({ message: "\u0634\u0646\u0627\u0633\u0647\u200C\u06CC \u0645\u062D\u0635\u0648\u0644 \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A" }), + (0, class_validator_1.MaxLength)(64), + __metadata3("design:type", String) + ], ToggleFavoriteDto.prototype, "productId", void 0); + } +}); + +// dist/modules/customer-favorites/customer-favorites.controller.js +var require_customer_favorites_controller = __commonJS({ + "dist/modules/customer-favorites/customer-favorites.controller.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param3 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CustomerFavoritesController = void 0; + var common_12 = require_common(); + var customer_guards_1 = require_customer_guards(); + var customer_favorites_service_1 = require_customer_favorites_service(); + var toggle_favorite_dto_1 = require_toggle_favorite_dto(); + var CustomerFavoritesController = class CustomerFavoritesController { + favorites; + constructor(favorites) { + this.favorites = favorites; + } + list(me) { + return this.favorites.list(me.id); + } + toggle(dto, me) { + return this.favorites.toggle(me.id, dto.productId); + } + }; + exports2.CustomerFavoritesController = CustomerFavoritesController; + __decorate4([ + (0, customer_guards_1.CustomerAuth)(), + (0, common_12.Get)(), + __param3(0, (0, customer_guards_1.CurrentCustomer)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object]), + __metadata3("design:returntype", void 0) + ], CustomerFavoritesController.prototype, "list", null); + __decorate4([ + (0, customer_guards_1.CustomerAuth)(), + (0, common_12.Post)("toggle"), + (0, common_12.HttpCode)(200), + __param3(0, (0, common_12.Body)()), + __param3(1, (0, customer_guards_1.CurrentCustomer)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [toggle_favorite_dto_1.ToggleFavoriteDto, Object]), + __metadata3("design:returntype", void 0) + ], CustomerFavoritesController.prototype, "toggle", null); + exports2.CustomerFavoritesController = CustomerFavoritesController = __decorate4([ + (0, common_12.Controller)("customer/me/favorites"), + __metadata3("design:paramtypes", [customer_favorites_service_1.CustomerFavoritesService]) + ], CustomerFavoritesController); + } +}); + +// dist/modules/customer-favorites/customer-favorites.module.js +var require_customer_favorites_module = __commonJS({ + "dist/modules/customer-favorites/customer-favorites.module.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CustomerFavoritesModule = void 0; + var common_12 = require_common(); + var prisma_module_1 = require_prisma_module(); + var customer_favorites_controller_1 = require_customer_favorites_controller(); + var customer_favorites_service_1 = require_customer_favorites_service(); + var CustomerFavoritesModule = class CustomerFavoritesModule { + }; + exports2.CustomerFavoritesModule = CustomerFavoritesModule; + exports2.CustomerFavoritesModule = CustomerFavoritesModule = __decorate4([ + (0, common_12.Module)({ + imports: [prisma_module_1.PrismaModule], + controllers: [customer_favorites_controller_1.CustomerFavoritesController], + providers: [customer_favorites_service_1.CustomerFavoritesService] + }) + ], CustomerFavoritesModule); + } +}); + +// dist/modules/customer-report/customer-report.service.js +var require_customer_report_service = __commonJS({ + "dist/modules/customer-report/customer-report.service.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var CustomerReportService_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CustomerReportService = void 0; + var common_12 = require_common(); + var client_1 = require("@prisma/client"); + var prisma_service_1 = require_prisma_service(); + var accounting_sync_service_1 = require_accounting_sync_service(); + var jalali_1 = require_jalali(); + var CustomerReportService = class CustomerReportService { + static { + CustomerReportService_1 = this; + } + prisma; + accounting; + logger = new common_12.Logger(CustomerReportService_1.name); + constructor(prisma, accounting) { + this.prisma = prisma; + this.accounting = accounting; + } + /** + * The accounting statement, or null to fall back to the internal ledger — + * when the integration is off, the customer is not linked, or the software + * cannot be reached (the report must still open). + */ + async accountingStatement(customerId) { + try { + return await this.accounting.customerStatement(customerId); + } catch (err) { + this.logger.warn(`Accounting statement unavailable for ${customerId}, using the ledger: ${err.message}`); + return null; + } + } + /** The reference's page size (report/index.vue:96). */ + static LIMIT = 50; + /** + * "کلیات حساب" — one row per ledger entry, oldest first, each carrying the + * running balance AFTER it. + * + * The running balance is why this cannot be a plain paginated query: a row's + * `tahesab_T` depends on every entry before it. Entries are therefore folded + * in chronological order from the beginning of the account, and the requested + * page is sliced out afterwards. At the row counts this app deals with + * (one customer's own documents) that is cheap; if a customer ever + * accumulates enough entries for it to matter, the fold should move into a + * stored running total. Noted in ISSUES.md as REP-02. + * + * The reference's own list arrives oldest-first and is then `.reverse()`d for + * display (report/index.vue:191), so the app shows newest first. Same here. + */ + async summary(customerId, page = 1) { + const statement = await this.accountingStatement(customerId); + if (statement) { + const rows2 = statementToSummary(statement.rows).reverse(); + const start2 = (Math.max(1, page) - 1) * CustomerReportService_1.LIMIT; + return { + result: rows2.slice(start2, start2 + CustomerReportService_1.LIMIT), + count: rows2.length, + page: Math.max(1, page), + limit: CustomerReportService_1.LIMIT, + source: "accounting" + }; + } + const entries = await this.prisma.ledgerEntry.findMany({ + // Only confirmed entries move a balance — the same rule the cached + // Customer.goldDebtGrams / fiatDebtRial follow, so the statement's final + // balance agrees with the figure shown everywhere else in the app. + where: { customerId, confirmed: true }, + orderBy: [{ createdAt: "asc" }, { id: "asc" }], + include: { order: { select: { orderNumber: true } } } + }); + let goldRunning = new client_1.Prisma.Decimal(0); + let rialRunning = new client_1.Prisma.Decimal(0); + const rows = entries.map((e, index) => { + const amount = new client_1.Prisma.Decimal(e.amount); + const isGold = e.currency === "GOLD_GRAM"; + const signed = e.direction === "DEBIT" ? amount : amount.negated(); + if (isGold) + goldRunning = goldRunning.plus(signed); + else + rialRunning = rialRunning.plus(signed); + return { + id: index + 1, + // The reference keyed the detail lookup on factor_Code; here it is the + // entry's own id, so the detail call needs nothing else from the client. + factor_Code: e.id, + sh_factor: e.order?.orderNumber ?? e.id.slice(-8), + tarikh: e.createdAt.toISOString(), + // Gold in / out, as separate positive columns — the reference showed + // them on two lines (Accounting.vue:21-22). + geram_v: isGold && e.direction === "CREDIT" ? amount.toFixed(3) : "0.000", + geram_kh: isGold && e.direction === "DEBIT" ? amount.toFixed(3) : "0.000", + rial_v: !isGold && e.direction === "CREDIT" ? amount.toFixed(2) : "0.00", + rial_kh: !isGold && e.direction === "DEBIT" ? amount.toFixed(2) : "0.00", + // Running balances. The reference colours these by sign + // (Accounting.vue:29, :46), so the sign must be preserved. + tahesab_T: goldRunning.toFixed(3), + tahesab_P: rialRunning.toFixed(2), + // Present so the UI binds, but the target has no foreign-currency + // ledger — always zero rather than invented. REP-01. + rial_V2: "0.00", + rial_Kh2: "0.00", + tahesabP2: "0.00", + sourceType: e.sourceType, + note: e.note + }; + }); + rows.reverse(); + const start = (Math.max(1, page) - 1) * CustomerReportService_1.LIMIT; + return { + result: rows.slice(start, start + CustomerReportService_1.LIMIT), + count: rows.length, + page: Math.max(1, page), + limit: CustomerReportService_1.LIMIT + }; + } + /** + * "جزئیات حساب" — the per-document detail. + * + * With no id, this is the whole list the second tab renders (the reference's + * `my_detail`); with one, it is the single document behind the «جزئیات» link + * (its `GetHesabDetailByFactorCode`). + * + * Scoped on customerId in the WHERE clause, so an id belonging to someone + * else simply returns nothing — ids stay unenumerable, and no id is trusted + * from the client beyond being a filter. + */ + async detail(customerId, entryId, page = 1) { + const statement = await this.accountingStatement(customerId); + if (statement) { + let rows = statement.rows.map(statementToDetail).reverse(); + if (entryId) + rows = rows.filter((r) => r.factor_Code === entryId); + const start = (Math.max(1, page) - 1) * CustomerReportService_1.LIMIT; + return { + result: entryId ? rows : rows.slice(start, start + CustomerReportService_1.LIMIT), + page: Math.max(1, page), + limit: CustomerReportService_1.LIMIT, + source: "accounting" + }; + } + const where = { + customerId, + confirmed: true, + ...entryId ? { id: entryId } : {} + }; + const entries = await this.prisma.ledgerEntry.findMany({ + where, + orderBy: [{ createdAt: "desc" }, { id: "desc" }], + ...entryId ? {} : { + skip: (Math.max(1, page) - 1) * CustomerReportService_1.LIMIT, + take: CustomerReportService_1.LIMIT + }, + include: { + order: { + select: { + orderNumber: true, + totalGoldWeightGrams: true, + wageWeightGrams: true + } + } + } + }); + const result = entries.map((e) => { + const amount = new client_1.Prisma.Decimal(e.amount); + const isGold = e.currency === "GOLD_GRAM"; + return { + factor_Code: e.id, + sh_factor: e.order?.orderNumber ?? e.id.slice(-8), + tarikh: e.createdAt.toISOString(), + /// Net weight. For a melted-gold repayment the ledger keeps the weight + /// as handed over, BEFORE karat normalization (schema.prisma:685), which + /// is what a paper document states; `amount` is the normalized figure. + vazn: isGold ? (e.originalValue ?? amount).toFixed(3) : "0.000", + /// Purity, for the documents that carry one. + ayar: e.karatPerMille ?? null, + no: SOURCE_LABELS[e.sourceType] ?? e.sourceType, + /// Hallmark and lab — the target ledger carries both, from the same + /// legacy `ang` / `lab` columns the reference's document form had. + sh_sharti: e.hallmark, + name_az: e.labName, + /// Gold in / out for this document, normalized to 750 as the reference's + /// tabdil750 columns were. + tabdil750_v: isGold && e.direction === "CREDIT" ? amount.toFixed(3) : "0.000", + tabdil750_kh: isGold && e.direction === "DEBIT" ? amount.toFixed(3) : "0.000", + /// Unit price at the time, for the documents that have one. + fi: e.pricePerGramRialAtEntry ? e.pricePerGramRialAtEntry.toFixed(2) : null, + fiF: e.priceRial ? e.priceRial.toFixed(2) : null, + /// The making charge the order carried, where this entry came from one. + Darsad_Talayee: e.order?.wageWeightGrams ? e.order.wageWeightGrams.toFixed(3) : null, + accountName: e.accountName, + bankName: e.bankName, + transferTo: e.transferTo, + receivedAt: e.receivedAt ? e.receivedAt.toISOString() : null, + note: e.note, + /// No equivalent in the target — shown as null, never invented. REP-01. + nO_kar: null, + jens_felez: null, + Darsad: null, + maliatDarsad: null + }; + }); + return { result, page: Math.max(1, page), limit: CustomerReportService_1.LIMIT }; + } + /** + * "مانده" — the current balances. + * + * Ports the shape of TahesabController::mandeh, which answered a `result` + * array of `{arz, mandeh}`. The reference multiplied the external system's + * figures by -1 to flip its sign convention; here the cached customer + * balances are already in the app's own convention (positive = owes), so no + * flip is applied and the figure matches every other screen. + */ + async balances(customerId) { + const accounting = await this.accounting.customerBalance(customerId); + if (accounting) { + return { + status: 200, + message: "", + source: "accounting", + at: accounting.at, + result: [ + { arz: "IRR", mandeh: accounting.rial.toFixed(2) }, + { arz: "gold", mandeh: accounting.gold.toFixed(3) } + ] + }; + } + const c = await this.prisma.customer.findUnique({ + where: { id: customerId }, + select: { goldDebtGrams: true, fiatDebtRial: true } + }); + return { + status: 200, + message: "", + result: [ + { arz: "IRR", mandeh: (c?.fiatDebtRial ?? new client_1.Prisma.Decimal(0)).toFixed(2) }, + { arz: "gold", mandeh: (c?.goldDebtGrams ?? new client_1.Prisma.Decimal(0)).toFixed(3) } + ] + }; + } + }; + exports2.CustomerReportService = CustomerReportService; + exports2.CustomerReportService = CustomerReportService = CustomerReportService_1 = __decorate4([ + (0, common_12.Injectable)(), + __metadata3("design:paramtypes", [ + prisma_service_1.PrismaService, + accounting_sync_service_1.AccountingSyncService + ]) + ], CustomerReportService); + var SOURCE_LABELS = { + ORDER_STOCK: "\u0633\u0641\u0627\u0631\u0634", + ORDER_PRE_ORDER: "\u067E\u06CC\u0634\u200C\u0633\u0641\u0627\u0631\u0634", + REPAYMENT_MELTED_GOLD: "\u0637\u0644\u0627\u06CC \u0622\u0628\u0634\u062F\u0647", + REPAYMENT_TRANSFER: "\u062D\u0648\u0627\u0644\u0647", + REPAYMENT_CHEQUE: "\u0686\u06A9", + REPAYMENT_CASH: "\u0646\u0642\u062F\u06CC", + WALLET_BONUS: "\u0647\u062F\u06CC\u0647", + ADJUSTMENT: "\u0627\u0635\u0644\u0627\u062D\u06CC\u0647" + }; + function isoFromJalali(date, time) { + const j = (0, jalali_1.parseJalali)(date); + if (!j) + return date; + const g = (0, jalali_1.jalaliToGregorian)(j.jy, j.jm, j.jd); + const pad = (n) => String(n).padStart(2, "0"); + const t = time && /^\d{1,2}:\d{2}(:\d{2})?$/.test(time) ? time.length === 5 ? `${time}:00` : time : "12:00:00"; + return `${g.gy}-${pad(g.gm)}-${pad(g.gd)}T${t.padStart(8, "0")}+03:30`; + } + var fixed = (d, places) => (d ?? new client_1.Prisma.Decimal(0)).toFixed(places); + function statementToSummary(rows) { + let gold = new client_1.Prisma.Decimal(0); + let rial = new client_1.Prisma.Decimal(0); + return rows.map((r, index) => { + if (r.goldBalance) + gold = r.goldBalance; + else if (!r.temporary) + gold = gold.add(r.goldOut).sub(r.goldIn); + if (r.rialBalance) + rial = r.rialBalance; + else if (!r.temporary) + rial = rial.add(r.rialOut).sub(r.rialIn); + return { + id: index + 1, + factor_Code: r.documentRef || r.key, + sh_factor: r.documentNo, + tarikh: isoFromJalali(r.date, r.time), + geram_v: fixed(r.goldIn, 3), + geram_kh: fixed(r.goldOut, 3), + rial_v: fixed(r.rialIn, 2), + rial_kh: fixed(r.rialOut, 2), + tahesab_T: gold.toFixed(3), + tahesab_P: rial.toFixed(2), + rial_V2: "0.00", + rial_Kh2: "0.00", + tahesabP2: "0.00", + sourceType: "ACCOUNTING", + note: [r.title, r.description, r.temporary ? "(\u0645\u0648\u0642\u062A \u2014 \u0647\u0646\u0648\u0632 \u062F\u0631 \u0645\u0627\u0646\u062F\u0647 \u0627\u062B\u0631 \u0646\u062F\u0627\u0631\u062F)" : null].filter(Boolean).join(" \u2014 ") + }; + }); + } + function statementToDetail(r) { + return { + factor_Code: r.documentRef || r.key, + sh_factor: r.documentNo, + tarikh: isoFromJalali(r.date, r.time), + vazn: fixed(r.weight, 3), + ayar: r.karat, + no: r.title, + sh_sharti: null, + name_az: null, + tabdil750_v: fixed(r.goldIn, 3), + tabdil750_kh: fixed(r.goldOut, 3), + fi: r.unitPrice ? r.unitPrice.toFixed(2) : null, + fiF: r.rialIn.gt(0) ? r.rialIn.toFixed(2) : r.rialOut.gt(0) ? r.rialOut.toFixed(2) : null, + Darsad_Talayee: r.wagePercent ? r.wagePercent.toString() : null, + accountName: null, + bankName: null, + transferTo: null, + receivedAt: null, + note: [r.description, r.temporary ? "\u0633\u0646\u062F \u0645\u0648\u0642\u062A" : null].filter(Boolean).join(" \u2014 ") || null, + // REP-01: the accounting software does carry these. + nO_kar: r.itemName, + jens_felez: r.metal, + Darsad: null, + maliatDarsad: null + }; + } + } +}); + +// dist/modules/customer-report/customer-report.controller.js +var require_customer_report_controller = __commonJS({ + "dist/modules/customer-report/customer-report.controller.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param3 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CustomerReportController = void 0; + var common_12 = require_common(); + var customer_report_service_1 = require_customer_report_service(); + var customer_guards_1 = require_customer_guards(); + var CustomerReportController = class CustomerReportController { + report; + constructor(report) { + this.report = report; + } + /** "کلیات حساب" — the running statement. */ + summary(me, page) { + return this.report.summary(me.id, Number(page) || 1); + } + /** "جزئیات حساب" — the whole detail list (the second tab). */ + detailList(me, page) { + return this.report.detail(me.id, void 0, Number(page) || 1); + } + /** The current balances, for the statement header. */ + balances(me) { + return this.report.balances(me.id); + } + /** + * One document. Declared last so the literal routes above are matched first — + * Nest resolves in declaration order. + */ + detail(id, me) { + return this.report.detail(me.id, id); + } + }; + exports2.CustomerReportController = CustomerReportController; + __decorate4([ + (0, customer_guards_1.CustomerAuth)(), + (0, common_12.Get)(), + __param3(0, (0, customer_guards_1.CurrentCustomer)()), + __param3(1, (0, common_12.Query)("page")), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object, String]), + __metadata3("design:returntype", void 0) + ], CustomerReportController.prototype, "summary", null); + __decorate4([ + (0, customer_guards_1.CustomerAuth)(), + (0, common_12.Get)("detail"), + __param3(0, (0, customer_guards_1.CurrentCustomer)()), + __param3(1, (0, common_12.Query)("page")), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object, String]), + __metadata3("design:returntype", void 0) + ], CustomerReportController.prototype, "detailList", null); + __decorate4([ + (0, customer_guards_1.CustomerAuth)(), + (0, common_12.Get)("balances"), + __param3(0, (0, customer_guards_1.CurrentCustomer)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object]), + __metadata3("design:returntype", void 0) + ], CustomerReportController.prototype, "balances", null); + __decorate4([ + (0, customer_guards_1.CustomerAuth)(), + (0, common_12.Get)(":id"), + __param3(0, (0, common_12.Param)("id")), + __param3(1, (0, customer_guards_1.CurrentCustomer)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [String, Object]), + __metadata3("design:returntype", void 0) + ], CustomerReportController.prototype, "detail", null); + exports2.CustomerReportController = CustomerReportController = __decorate4([ + (0, common_12.Controller)("customer/me/report"), + __metadata3("design:paramtypes", [customer_report_service_1.CustomerReportService]) + ], CustomerReportController); + } +}); + +// dist/modules/customer-report/customer-report.module.js +var require_customer_report_module = __commonJS({ + "dist/modules/customer-report/customer-report.module.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CustomerReportModule = void 0; + var common_12 = require_common(); + var prisma_module_1 = require_prisma_module(); + var customer_report_controller_1 = require_customer_report_controller(); + var customer_report_service_1 = require_customer_report_service(); + var CustomerReportModule = class CustomerReportModule { + }; + exports2.CustomerReportModule = CustomerReportModule; + exports2.CustomerReportModule = CustomerReportModule = __decorate4([ + (0, common_12.Module)({ + imports: [prisma_module_1.PrismaModule], + controllers: [customer_report_controller_1.CustomerReportController], + providers: [customer_report_service_1.CustomerReportService] + }) + ], CustomerReportModule); + } +}); + +// ../../packages/shared-types/dist/index.js +var require_dist3 = __commonJS({ + "../../packages/shared-types/dist/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PreOrderStatus = exports2.OrderStatus = exports2.LedgerSourceType = exports2.LedgerDirection = exports2.LedgerCurrency = exports2.GRAMS_PER_MESGHAL = exports2.STANDARD_KARAT_PER_MILLE = void 0; + exports2.STANDARD_KARAT_PER_MILLE = 750; + exports2.GRAMS_PER_MESGHAL = 4.331802; + var LedgerCurrency; + (function(LedgerCurrency2) { + LedgerCurrency2["GOLD_GRAM"] = "GOLD_GRAM"; + LedgerCurrency2["RIAL"] = "RIAL"; + })(LedgerCurrency || (exports2.LedgerCurrency = LedgerCurrency = {})); + var LedgerDirection; + (function(LedgerDirection2) { + LedgerDirection2["DEBIT"] = "DEBIT"; + LedgerDirection2["CREDIT"] = "CREDIT"; + })(LedgerDirection || (exports2.LedgerDirection = LedgerDirection = {})); + var LedgerSourceType; + (function(LedgerSourceType2) { + LedgerSourceType2["ORDER_STOCK"] = "ORDER_STOCK"; + LedgerSourceType2["ORDER_PRE_ORDER"] = "ORDER_PRE_ORDER"; + LedgerSourceType2["REPAYMENT_MELTED_GOLD"] = "REPAYMENT_MELTED_GOLD"; + LedgerSourceType2["REPAYMENT_TRANSFER"] = "REPAYMENT_TRANSFER"; + LedgerSourceType2["REPAYMENT_CHEQUE"] = "REPAYMENT_CHEQUE"; + LedgerSourceType2["REPAYMENT_CASH"] = "REPAYMENT_CASH"; + LedgerSourceType2["WALLET_BONUS"] = "WALLET_BONUS"; + LedgerSourceType2["ADJUSTMENT"] = "ADJUSTMENT"; + })(LedgerSourceType || (exports2.LedgerSourceType = LedgerSourceType = {})); + var OrderStatus; + (function(OrderStatus2) { + OrderStatus2["SUSPENDED"] = "SUSPENDED"; + OrderStatus2["PLACED"] = "PLACED"; + OrderStatus2["ADMIN_APPROVED"] = "ADMIN_APPROVED"; + OrderStatus2["SOURCING"] = "SOURCING"; + OrderStatus2["PREPARING"] = "PREPARING"; + OrderStatus2["DELIVERED_TO_AGENT"] = "DELIVERED_TO_AGENT"; + OrderStatus2["DELIVERED_TO_CUSTOMER"] = "DELIVERED_TO_CUSTOMER"; + OrderStatus2["CANCELLED"] = "CANCELLED"; + })(OrderStatus || (exports2.OrderStatus = OrderStatus = {})); + var PreOrderStatus; + (function(PreOrderStatus2) { + PreOrderStatus2["PLACED"] = "PLACED"; + PreOrderStatus2["ADMIN_APPROVED"] = "ADMIN_APPROVED"; + PreOrderStatus2["WORKSHOP_APPROVED"] = "WORKSHOP_APPROVED"; + PreOrderStatus2["READY_TO_SHIP"] = "READY_TO_SHIP"; + PreOrderStatus2["DELIVERED"] = "DELIVERED"; + PreOrderStatus2["CANCELLED"] = "CANCELLED"; + })(PreOrderStatus || (exports2.PreOrderStatus = PreOrderStatus = {})); + } +}); + +// dist/modules/accounting/ledger.service.js +var require_ledger_service = __commonJS({ + "dist/modules/accounting/ledger.service.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LedgerService = void 0; + var common_12 = require_common(); + var client_1 = require("@prisma/client"); + var shared_types_1 = require_dist3(); + var prisma_service_1 = require_prisma_service(); + var ZERO = new client_1.Prisma.Decimal(0); + var OWING_STATUSES = [client_1.OrderStatus.DELIVERED_TO_AGENT, client_1.OrderStatus.DELIVERED_TO_CUSTOMER]; + var LedgerService = class LedgerService { + prisma; + constructor(prisma) { + this.prisma = prisma; + } + /** Posts a ledger entry and, if confirmed, applies it to the cached customer balance. */ + async postEntry(input, tx = this.prisma) { + const amount = new client_1.Prisma.Decimal(input.amount); + if (amount.lte(0)) { + throw new common_12.BadRequestException("Ledger entry amount must be positive"); + } + const confirmed = input.confirmed ?? false; + const entry = await tx.ledgerEntry.create({ + data: { + customerId: input.customerId, + currency: input.currency, + direction: input.direction, + sourceType: input.sourceType, + amount, + orderId: input.orderId, + karatPerMille: input.karatPerMille, + pricePerGramRialAtEntry: input.pricePerGramRialAtEntry !== void 0 ? new client_1.Prisma.Decimal(input.pricePerGramRialAtEntry) : void 0, + note: input.note, + confirmed, + confirmedAt: confirmed ? /* @__PURE__ */ new Date() : null, + postedByAdminUserId: input.postedByAdminUserId + } + }); + if (confirmed) { + await this.applyToBalance(input.customerId, input.currency, input.direction, amount, tx); + } + return entry; + } + /** + * Marks a pending repayment entry confirmed. Legacy's confirmed toggle + * (Adm\CashController::toggleConfiremCash) is bidirectional and used for + * post-hoc correction/rejection — legacy Cash rows are auto-confirmed + * (confirmed=1) at creation, not created pending. This system intentionally + * requires an explicit confirmation step before a repayment counts (see + * postGoldRepayment for the full rationale) — that is a deliberate design + * change from legacy, not a faithful mirror of it. + */ + async confirmEntry(entryId, adminUserId, tx = this.prisma) { + const entry = await tx.ledgerEntry.findUnique({ where: { id: entryId } }); + if (!entry) + throw new common_12.NotFoundException("Ledger entry not found"); + if (entry.confirmed) + return entry; + const updated = await tx.ledgerEntry.update({ + where: { id: entryId }, + data: { confirmed: true, confirmedAt: /* @__PURE__ */ new Date(), postedByAdminUserId: adminUserId ?? entry.postedByAdminUserId } + }); + await this.applyToBalance(entry.customerId, entry.currency, entry.direction, entry.amount, tx); + return updated; + } + async applyToBalance(customerId, currency, direction, amount, tx) { + const signedDelta = direction === client_1.LedgerDirection.DEBIT ? amount : amount.neg(); + await tx.customer.update({ + where: { id: customerId }, + data: currency === client_1.LedgerCurrency.GOLD_GRAM ? { goldDebtGrams: { increment: signedDelta } } : { fiatDebtRial: { increment: signedDelta } } + }); + } + /** + * Brings an order's debt in line with its status — legacy's rule exactly. + * + * Legacy never "posted" order debt; it RECOMPUTED it + * (CustomerController::updateRemain): Σ orders.input WHERE sts > 4, i.e. an + * order owes its full weight (and its rial charge) while it is delivered — + * to the expert (5) or to the customer (6) — and nothing otherwise. So: + * - moving into a delivered status twice never counts twice (ACC-03 / + * MON-04: the old guard on `deliveredAt` let a second DELIVERED_TO_AGENT + * post the debt again); + * - going straight to DELIVERED_TO_CUSTOMER still creates the debt (the + * old trigger fired only on DELIVERED_TO_AGENT, so that order owed nothing); + * - moving back below delivered, or cancelling, takes it off again. + * + * It compares what the order SHOULD owe with the confirmed ORDER_STOCK + * entries already on it and posts only the difference, as a confirmed + * DEBIT or CREDIT — so it is idempotent and nothing is ever edited or + * deleted (the ledger stays append-only). Entries imported from legacy carry + * their orderId, so imported orders reconcile the same way. + */ + async syncOrderDebt(orderId, tx = this.prisma) { + const order = await tx.order.findUnique({ where: { id: orderId } }); + if (!order) + throw new common_12.NotFoundException("Order not found"); + const owes = OWING_STATUSES.includes(order.status); + const targets = [ + [client_1.LedgerCurrency.GOLD_GRAM, owes ? new client_1.Prisma.Decimal(order.totalGoldWeightGrams) : ZERO, "Gold-weight debt"], + [client_1.LedgerCurrency.RIAL, owes ? new client_1.Prisma.Decimal(order.flatRialCharge) : ZERO, "Flat Rial charge (e.g. stones)"] + ]; + for (const [currency, should, label] of targets) { + const posted = await tx.ledgerEntry.groupBy({ + by: ["direction"], + where: { orderId, currency, sourceType: client_1.LedgerSourceType.ORDER_STOCK, confirmed: true }, + _sum: { amount: true } + }); + const sum = (d) => posted.find((p) => p.direction === d)?._sum.amount ?? ZERO; + const current = new client_1.Prisma.Decimal(sum(client_1.LedgerDirection.DEBIT)).sub(sum(client_1.LedgerDirection.CREDIT)); + const diff = should.sub(current); + if (diff.isZero()) + continue; + await this.postEntry({ + customerId: order.customerId, + currency, + direction: diff.gt(0) ? client_1.LedgerDirection.DEBIT : client_1.LedgerDirection.CREDIT, + sourceType: client_1.LedgerSourceType.ORDER_STOCK, + amount: diff.abs(), + orderId: order.id, + confirmed: true, + note: owes ? `${label} \u2014 order delivered (${order.status})` : `${label} reversed \u2014 order moved to ${order.status}` + }, tx); + } + } + /** + * Normalizes a physical repayment instrument into gold grams and posts a + * pending (unconfirmed) CREDIT entry against the customer's gold debt. + * Formulas preserved verbatim from legacy CashController::store. Note: + * legacy auto-confirms (confirmed=1) every Cash row at creation — posting + * this as pending instead is an intentional design change, not a mirror of + * legacy's default. + */ + async postGoldRepayment(params, tx = this.prisma) { + const raw = new client_1.Prisma.Decimal(params.rawValue); + let goldGramsValue; + let sourceType; + switch (params.instrument) { + case "MELTED_GOLD": { + if (!params.karatPerMille) { + throw new common_12.BadRequestException("karatPerMille is required for a melted-gold repayment"); + } + goldGramsValue = raw.mul(params.karatPerMille).div(shared_types_1.STANDARD_KARAT_PER_MILLE); + sourceType = client_1.LedgerSourceType.REPAYMENT_MELTED_GOLD; + break; + } + case "CASH": { + if (!params.pricePerGramRial) { + throw new common_12.BadRequestException("pricePerGramRial is required for a cash repayment"); + } + const pricePerGram = new client_1.Prisma.Decimal(params.pricePerGramRial); + goldGramsValue = raw.div(pricePerGram.div(shared_types_1.GRAMS_PER_MESGHAL)); + sourceType = client_1.LedgerSourceType.REPAYMENT_CASH; + break; + } + case "TRANSFER": + goldGramsValue = raw; + sourceType = client_1.LedgerSourceType.REPAYMENT_TRANSFER; + break; + case "CHEQUE": + goldGramsValue = raw; + sourceType = client_1.LedgerSourceType.REPAYMENT_CHEQUE; + break; + } + return this.postEntry({ + customerId: params.customerId, + currency: client_1.LedgerCurrency.GOLD_GRAM, + direction: client_1.LedgerDirection.CREDIT, + sourceType, + amount: goldGramsValue, + karatPerMille: params.karatPerMille, + pricePerGramRialAtEntry: params.pricePerGramRial, + note: params.note, + confirmed: false, + // pending until an admin confirms — intentional deviation from legacy, which auto-confirms on creation + postedByAdminUserId: params.postedByAdminUserId + }, tx); + } + /** + * Direct Rial-debt repayment. Not present in the legacy system (its + * rial_remain had no repayment offset at all — a gap flagged during + * migration analysis) but supported here since the new ledger is symmetric. + */ + async postRialRepayment(params, tx = this.prisma) { + return this.postEntry({ + customerId: params.customerId, + currency: client_1.LedgerCurrency.RIAL, + direction: client_1.LedgerDirection.CREDIT, + sourceType: client_1.LedgerSourceType.REPAYMENT_CASH, + amount: params.amount, + note: params.note, + confirmed: false, + postedByAdminUserId: params.postedByAdminUserId + }, tx); + } + async postAdjustment(params, tx = this.prisma) { + return this.postEntry({ + customerId: params.customerId, + currency: params.currency, + direction: params.direction, + sourceType: client_1.LedgerSourceType.ADJUSTMENT, + amount: params.amount, + note: params.note, + confirmed: true, + postedByAdminUserId: params.postedByAdminUserId + }, tx); + } + async getBalance(customerId) { + const customer = await this.prisma.customer.findUnique({ + where: { id: customerId }, + select: { id: true, goldDebtGrams: true, fiatDebtRial: true, goldCreditLimitGrams: true } + }); + if (!customer) + throw new common_12.NotFoundException("Customer not found"); + return { + customerId: customer.id, + goldDebtGrams: customer.goldDebtGrams, + fiatDebtRial: customer.fiatDebtRial, + goldCreditLimitGrams: customer.goldCreditLimitGrams + }; + } + /** + * Recomputes cached balances from confirmed LedgerEntry rows and overwrites + * the cache — a self-healing reconciliation, run periodically or on demand, + * unlike legacy's recompute-on-every-write (Customer::updateRemain). + */ + async reconcileBalance(customerId) { + const [goldDebits, goldCredits, rialDebits, rialCredits] = await Promise.all([ + this.sumConfirmed(customerId, client_1.LedgerCurrency.GOLD_GRAM, client_1.LedgerDirection.DEBIT), + this.sumConfirmed(customerId, client_1.LedgerCurrency.GOLD_GRAM, client_1.LedgerDirection.CREDIT), + this.sumConfirmed(customerId, client_1.LedgerCurrency.RIAL, client_1.LedgerDirection.DEBIT), + this.sumConfirmed(customerId, client_1.LedgerCurrency.RIAL, client_1.LedgerDirection.CREDIT) + ]); + return this.prisma.customer.update({ + where: { id: customerId }, + data: { + goldDebtGrams: goldDebits.sub(goldCredits), + fiatDebtRial: rialDebits.sub(rialCredits) + } + }); + } + async sumConfirmed(customerId, currency, direction) { + const result = await this.prisma.ledgerEntry.aggregate({ + where: { customerId, currency, direction, confirmed: true }, + _sum: { amount: true } + }); + return result._sum.amount ?? new client_1.Prisma.Decimal(0); + } + }; + exports2.LedgerService = LedgerService; + exports2.LedgerService = LedgerService = __decorate4([ + (0, common_12.Injectable)(), + __metadata3("design:paramtypes", [prisma_service_1.PrismaService]) + ], LedgerService); + } +}); + +// dist/modules/pricing/wage-formula.js +var require_wage_formula = __commonJS({ + "dist/modules/pricing/wage-formula.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.DEFAULT_WAGE_SAMPLE = exports2.LEGACY_WAGE_FORMULA = void 0; + exports2.computeWage = computeWage; + exports2.computeSample = computeSample; + exports2.parseWageFormula = parseWageFormula; + exports2.parseWageSample = parseWageSample; + var common_12 = require_common(); + var client_1 = require("@prisma/client"); + exports2.LEGACY_WAGE_FORMULA = Object.freeze({ + version: 1, + variantCoef: "1", + customerCoef: "1", + promotionCoef: "1", + promotionPick: "max", + constant: "0", + min: null, + max: null, + decimals: null + }); + var D = (v) => new client_1.Prisma.Decimal(v ?? 0); + function computeWage(f, i) { + const promos = i.promotionPercents.map(D); + const promo = promos.length === 0 ? D(0) : f.promotionPick === "sum" ? promos.reduce((s, p) => s.add(p), D(0)) : promos.reduce((m, p) => p.gt(m) ? p : m, promos[0]); + const variantTerm = D(f.variantCoef).mul(D(i.variantPercent)); + const customerTerm = D(f.customerCoef).mul(D(i.customerPercent)); + const promotionTerm = D(f.promotionCoef).mul(promo); + const constant = D(f.constant); + const before = variantTerm.add(customerTerm).sub(promotionTerm).add(constant); + let final = before; + let limitedBy = null; + if (f.min !== null && final.lt(D(f.min))) { + final = D(f.min); + limitedBy = "min"; + } + if (f.max !== null && final.gt(D(f.max))) { + final = D(f.max); + limitedBy = "max"; + } + if (f.decimals !== null) + final = final.toDecimalPlaces(f.decimals, client_1.Prisma.Decimal.ROUND_HALF_UP); + return { + variantTerm: variantTerm.toString(), + customerTerm: customerTerm.toString(), + promotionPercent: promo.toString(), + promotionTerm: promotionTerm.toString(), + constant: constant.toString(), + beforeLimits: before.toString(), + limitedBy, + finalPercent: final.toString(), + wagePercentSnapshot: final.add(promotionTerm).toString(), + discountPercentSnapshot: promotionTerm.toString() + }; + } + exports2.DEFAULT_WAGE_SAMPLE = Object.freeze({ + rashWeightGrams: "10", + quantity: 1, + variantPercent: "7", + customerPercent: "3", + promotionPercent: "0" + }); + function computeSample(f, s) { + const wage = computeWage(f, { + variantPercent: s.variantPercent, + customerPercent: s.customerPercent, + promotionPercents: D(s.promotionPercent).isZero() ? [] : [s.promotionPercent] + }); + const rash = D(s.rashWeightGrams).mul(s.quantity); + const total = rash.mul(D(wage.finalPercent).div(100).add(1)); + return { + ...wage, + rashTotalGrams: rash.toString(), + wageGrams: total.sub(rash).toDecimalPlaces(4).toString(), + totalGrams: total.toDecimalPlaces(4).toString() + }; + } + function num(v, field, lo, hi) { + const s = String(v ?? "").trim(); + let d; + try { + d = new client_1.Prisma.Decimal(s); + } catch { + throw new common_12.BadRequestException(`${field}: \u0639\u062F\u062F \u0645\u0639\u062A\u0628\u0631 \u0646\u06CC\u0633\u062A`); + } + if (!d.isFinite() || d.lt(lo) || d.gt(hi)) + throw new common_12.BadRequestException(`${field}: \u0628\u0627\u06CC\u062F \u0628\u06CC\u0646 ${lo} \u0648 ${hi} \u0628\u0627\u0634\u062F`); + return d.toString(); + } + function optNum(v, field, lo, hi) { + return v === null || v === void 0 || String(v).trim() === "" ? null : num(v, field, lo, hi); + } + function parseWageFormula(raw) { + const r = raw ?? {}; + const pick = r.promotionPick === "sum" ? "sum" : r.promotionPick === "max" ? "max" : null; + if (!pick) + throw new common_12.BadRequestException("\u0646\u062D\u0648\u0647\u200C\u06CC \u0627\u0646\u062A\u062E\u0627\u0628 \u062A\u062E\u0641\u06CC\u0641 \u0628\u0627\u06CC\u062F \xAB\u0628\u06CC\u0634\u062A\u0631\u06CC\u0646\xBB \u06CC\u0627 \xAB\u062C\u0645\u0639\xBB \u0628\u0627\u0634\u062F"); + const decimals = r.decimals === null || r.decimals === void 0 || r.decimals === "" ? null : Number(num(r.decimals, "\u062A\u0639\u062F\u0627\u062F \u0631\u0642\u0645 \u0627\u0639\u0634\u0627\u0631", 0, 4)); + if (decimals !== null && !Number.isInteger(decimals)) + throw new common_12.BadRequestException("\u062A\u0639\u062F\u0627\u062F \u0631\u0642\u0645 \u0627\u0639\u0634\u0627\u0631 \u0628\u0627\u06CC\u062F \u0639\u062F\u062F \u0635\u062D\u06CC\u062D \u0628\u0627\u0634\u062F"); + const f = { + version: 1, + variantCoef: num(r.variantCoef, "\u0636\u0631\u06CC\u0628 \u0627\u062C\u0631\u062A \u0645\u062F\u0644", -10, 10), + customerCoef: num(r.customerCoef, "\u0636\u0631\u06CC\u0628 \u062F\u0631\u0635\u062F \u0645\u0634\u062A\u0631\u06CC", -10, 10), + promotionCoef: num(r.promotionCoef, "\u0636\u0631\u06CC\u0628 \u062A\u062E\u0641\u06CC\u0641", -10, 10), + promotionPick: pick, + constant: num(r.constant, "\u0645\u0642\u062F\u0627\u0631 \u062B\u0627\u0628\u062A", -100, 100), + min: optNum(r.min, "\u062D\u062F\u0627\u0642\u0644 \u0627\u062C\u0631\u062A", -100, 1e3), + max: optNum(r.max, "\u062D\u062F\u0627\u06A9\u062B\u0631 \u0627\u062C\u0631\u062A", -100, 1e3), + decimals + }; + if (f.min !== null && f.max !== null && D(f.min).gt(D(f.max))) { + throw new common_12.BadRequestException("\u062D\u062F\u0627\u0642\u0644 \u0627\u062C\u0631\u062A \u0646\u0645\u06CC\u200C\u062A\u0648\u0627\u0646\u062F \u0627\u0632 \u062D\u062F\u0627\u06A9\u062B\u0631 \u0628\u06CC\u0634\u062A\u0631 \u0628\u0627\u0634\u062F"); + } + return f; + } + function parseWageSample(raw) { + const r = raw ?? {}; + const qty = Number(r.quantity); + if (!Number.isInteger(qty) || qty < 1 || qty > 1e3) + throw new common_12.BadRequestException("\u062A\u0639\u062F\u0627\u062F \u0646\u0645\u0648\u0646\u0647 \u0628\u0627\u06CC\u062F \u0639\u062F\u062F \u0635\u062D\u06CC\u062D \u0628\u06CC\u0646 \u06F1 \u0648 \u06F1\u06F0\u06F0\u06F0 \u0628\u0627\u0634\u062F"); + return { + rashWeightGrams: num(r.rashWeightGrams, "\u0648\u0632\u0646 \u062E\u0627\u0645 \u0646\u0645\u0648\u0646\u0647", 0, 1e5), + quantity: qty, + variantPercent: num(r.variantPercent, "\u0627\u062C\u0631\u062A \u0645\u062F\u0644 \u0646\u0645\u0648\u0646\u0647", -100, 1e3), + customerPercent: num(r.customerPercent, "\u062F\u0631\u0635\u062F \u0645\u0634\u062A\u0631\u06CC \u0646\u0645\u0648\u0646\u0647", -100, 1e3), + promotionPercent: num(r.promotionPercent, "\u062A\u062E\u0641\u06CC\u0641 \u0646\u0645\u0648\u0646\u0647", 0, 100) + }; + } + } +}); + +// dist/modules/pricing/wage.service.js +var require_wage_service = __commonJS({ + "dist/modules/pricing/wage.service.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.WageService = exports2.PRICING_SETTING_PREFIX = exports2.WAGE_FORMULA_SETTING_KEY = void 0; + var common_12 = require_common(); + var client_1 = require("@prisma/client"); + var prisma_service_1 = require_prisma_service(); + var wage_formula_1 = require_wage_formula(); + exports2.WAGE_FORMULA_SETTING_KEY = "pricing.wageFormula"; + exports2.PRICING_SETTING_PREFIX = "pricing."; + var WageService = class WageService { + prisma; + constructor(prisma) { + this.prisma = prisma; + } + async stored(tx = this.prisma) { + const row = await tx.setting.findUnique({ where: { key: exports2.WAGE_FORMULA_SETTING_KEY } }); + return row ? row.value : null; + } + /** The formula in force; legacy's exactly until an admin approves another. */ + async formula(tx = this.prisma) { + const s = await this.stored(tx); + return s ? (0, wage_formula_1.parseWageFormula)(s.formula) : { ...wage_formula_1.LEGACY_WAGE_FORMULA }; + } + /* ───────────── admin screen ───────────── */ + async getConfig() { + const s = await this.stored(); + const formula = s ? (0, wage_formula_1.parseWageFormula)(s.formula) : { ...wage_formula_1.LEGACY_WAGE_FORMULA }; + const sample = s ? (0, wage_formula_1.parseWageSample)(s.sample) : { ...wage_formula_1.DEFAULT_WAGE_SAMPLE }; + return { + formula, + sample, + result: (0, wage_formula_1.computeSample)(formula, sample), + approvedAt: s?.approvedAt ?? null, + approvedBy: s?.approvedBy ?? null, + isLegacyDefault: !s, + legacy: wage_formula_1.LEGACY_WAGE_FORMULA, + history: (s?.history ?? []).map((h) => ({ ...h, result: (0, wage_formula_1.computeSample)((0, wage_formula_1.parseWageFormula)(h.formula), (0, wage_formula_1.parseWageSample)(h.sample)) })) + }; + } + /** The draft and the formula in force, side by side, on the same sample. */ + async preview(rawFormula, rawSample) { + const draft = (0, wage_formula_1.parseWageFormula)(rawFormula); + const sample = (0, wage_formula_1.parseWageSample)(rawSample); + return { + draft: (0, wage_formula_1.computeSample)(draft, sample), + current: (0, wage_formula_1.computeSample)(await this.formula(), sample) + }; + } + /** Approves a formula together with the sample it was checked on. */ + async approve(rawFormula, rawSample, admin) { + const formula = (0, wage_formula_1.parseWageFormula)(rawFormula); + const sample = (0, wage_formula_1.parseWageSample)(rawSample); + await this.prisma.$transaction(async (tx) => { + const prev = await this.stored(tx); + const next = { + formula, + sample, + approvedAt: (/* @__PURE__ */ new Date()).toISOString(), + approvedBy: { id: admin.id, name: admin.fullName }, + history: prev ? [{ formula: prev.formula, sample: prev.sample, approvedAt: prev.approvedAt, approvedBy: prev.approvedBy }, ...prev.history].slice(0, 20) : [] + }; + const value = next; + await tx.setting.upsert({ + where: { key: exports2.WAGE_FORMULA_SETTING_KEY }, + update: { value }, + create: { key: exports2.WAGE_FORMULA_SETTING_KEY, value } + }); + }); + return this.getConfig(); + } + /* ───────────── pricing a customer's lines ───────────── */ + /** + * The making charge of each variant for this customer — what the app shows + * and what an app order is charged. The promotions considered are legacy's: + * active, inside their dates, scoped to the product, its category or its + * brand (customer-scoped promotions were switched off in the legacy app). + */ + async quote(customerId, variantIds, tx = this.prisma) { + const customer = await tx.customer.findUnique({ + where: { id: customerId }, + select: { makingChargeOffsetPercent: true } + }); + if (!customer) + throw new common_12.NotFoundException("\u0645\u0634\u062A\u0631\u06CC \u06CC\u0627\u0641\u062A \u0646\u0634\u062F"); + const ids = [...new Set(variantIds)]; + const variants = await tx.productVariant.findMany({ + where: { id: { in: ids } }, + select: { id: true, defaultWagePercent: true, product: { select: { id: true, categoryId: true, brandId: true } } } + }); + const now = /* @__PURE__ */ new Date(); + const promotions = await tx.promotion.findMany({ + where: { + isActive: true, + scope: { in: [client_1.PromotionScope.PRODUCT, client_1.PromotionScope.CATEGORY, client_1.PromotionScope.BRAND] }, + AND: [ + { OR: [{ startsAt: null }, { startsAt: { lte: now } }] }, + { OR: [{ endsAt: null }, { endsAt: { gte: now } }] } + ], + OR: [ + { productId: { in: variants.map((v) => v.product.id) } }, + { categoryId: { in: variants.map((v) => v.product.categoryId).filter((x) => !!x) } }, + { brandId: { in: variants.map((v) => v.product.brandId).filter((x) => !!x) } } + ] + }, + select: { scope: true, productId: true, categoryId: true, brandId: true, discountPercent: true } + }); + const formula = await this.formula(tx); + const out = /* @__PURE__ */ new Map(); + for (const v of variants) { + const applying = promotions.filter((p) => p.scope === client_1.PromotionScope.PRODUCT && p.productId === v.product.id || p.scope === client_1.PromotionScope.CATEGORY && !!v.product.categoryId && p.categoryId === v.product.categoryId || p.scope === client_1.PromotionScope.BRAND && !!v.product.brandId && p.brandId === v.product.brandId); + const inputs = { + variantPercent: v.defaultWagePercent, + customerPercent: customer.makingChargeOffsetPercent, + promotionPercents: applying.map((p) => p.discountPercent) + }; + out.set(v.id, { + variantId: v.id, + variantPercent: new client_1.Prisma.Decimal(v.defaultWagePercent).toString(), + customerPercent: new client_1.Prisma.Decimal(customer.makingChargeOffsetPercent).toString(), + ...(0, wage_formula_1.computeWage)(formula, inputs) + }); + } + return out; + } + }; + exports2.WageService = WageService; + exports2.WageService = WageService = __decorate4([ + (0, common_12.Injectable)(), + __metadata3("design:paramtypes", [prisma_service_1.PrismaService]) + ], WageService); + } +}); + +// dist/modules/orders/orders.service.js +var require_orders_service = __commonJS({ + "dist/modules/orders/orders.service.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var OrdersService_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OrdersService = void 0; + var common_12 = require_common(); + var client_1 = require("@prisma/client"); + var prisma_service_1 = require_prisma_service(); + var catalog_service_1 = require_catalog_service(); + var ledger_service_1 = require_ledger_service(); + var accounting_hooks_service_1 = require_accounting_hooks_service(); + var wage_service_1 = require_wage_service(); + var OrdersService = OrdersService_1 = class OrdersService { + prisma; + catalog; + ledger; + accounting; + wage; + logger = new common_12.Logger(OrdersService_1.name); + constructor(prisma, catalog, ledger, accounting, wage) { + this.prisma = prisma; + this.catalog = catalog; + this.ledger = ledger; + this.accounting = accounting; + this.wage = wage; + } + /** + * Places a stock order. Per line item: + * w = rashWeightGrams * (1 + (wagePercent - discountPercent) / 100) + * mirrors legacy ApiMobileController::setOrder. Debt is NOT posted here — + * only while the order is delivered (see updateStatus / syncOrderDebt). + */ + /** + * @param customerId taken from the caller's token by the controller, NEVER + * from the request body. The body's `customerId` is ignored; see the note + * on CreateOrderDto. + */ + async createOrder(dto, customerId, opts = { placedBy: "operator" }) { + const customer = await this.prisma.customer.findUnique({ where: { id: customerId } }); + if (!customer) + throw new common_12.NotFoundException(`Customer ${customerId} not found`); + if (opts.placedBy === "customer" && !customer.canPlaceOrders) { + throw new common_12.ForbiddenException("\u062B\u0628\u062A \u0633\u0641\u0627\u0631\u0634 \u0628\u0631\u0627\u06CC \u062D\u0633\u0627\u0628 \u0634\u0645\u0627 \u0641\u0639\u0644\u0627\u064B \u063A\u06CC\u0631\u0641\u0639\u0627\u0644 \u0627\u0633\u062A. \u0644\u0637\u0641\u0627\u064B \u0628\u0627 \u067E\u0634\u062A\u06CC\u0628\u0627\u0646\u06CC \u062A\u0645\u0627\u0633 \u0628\u06AF\u06CC\u0631\u06CC\u062F."); + } + if (dto.customerId && dto.customerId !== customerId) { + this.logger.warn(`Order body carried customerId=${dto.customerId} but the token is ${customerId}; the token wins.`); + } + const quotes = opts.placedBy === "customer" ? await this.wage.quote(customerId, dto.items.map((i) => i.productVariantId)) : null; + const computedItems = await Promise.all(dto.items.map(async (item) => { + const variant = await this.catalog.getVariantOrThrow(item.productVariantId); + const rashWeight = new client_1.Prisma.Decimal(variant.rashWeightGrams); + const quote = quotes?.get(variant.id); + if (quotes && !quote) + throw new common_12.NotFoundException(`Variant ${variant.id} not found`); + const wagePercent = new client_1.Prisma.Decimal(quote ? quote.wagePercentSnapshot : item.wagePercent); + const discountPercent = new client_1.Prisma.Decimal(quote ? quote.discountPercentSnapshot : item.discountPercent ?? 0); + const netPercent = wagePercent.sub(discountPercent); + const computedWeightGrams = rashWeight.mul(netPercent.div(100).add(1)); + return { + productVariantId: variant.id, + quantity: item.quantity, + rashWeightGramsSnapshot: rashWeight, + wagePercentSnapshot: wagePercent, + discountPercentSnapshot: discountPercent, + computedWeightGrams, + // Legacy app: rial_pay is always 0 (cart.vue); only an operator sets one. + flatRialCharge: new client_1.Prisma.Decimal(quotes ? 0 : item.flatRialCharge ?? 0) + }; + })); + const totalGoldWeightGrams = computedItems.reduce((sum, item) => sum.add(item.computedWeightGrams.mul(item.quantity)), new client_1.Prisma.Decimal(0)); + const totalRashWeightGrams = computedItems.reduce((sum, item) => sum.add(item.rashWeightGramsSnapshot.mul(item.quantity)), new client_1.Prisma.Decimal(0)); + const wageWeightGrams = totalGoldWeightGrams.sub(totalRashWeightGrams); + const flatRialCharge = computedItems.reduce((sum, item) => sum.add(item.flatRialCharge.mul(item.quantity)), new client_1.Prisma.Decimal(0)); + const isSuspendedOverCreditLimit = totalGoldWeightGrams.add(customer.goldDebtGrams).gt(customer.goldCreditLimitGrams); + const initialStatus = isSuspendedOverCreditLimit ? client_1.OrderStatus.SUSPENDED : client_1.OrderStatus.PLACED; + return this.prisma.$transaction(async (tx) => { + const order = await tx.order.create({ + data: { + orderNumber: this.generateOrderNumber(), + customerId, + branchId: dto.branchId, + channel: dto.channel ?? client_1.OrderChannel.RETAIL, + status: initialStatus, + totalGoldWeightGrams, + wageWeightGrams, + flatRialCharge, + isSuspendedOverCreditLimit, + // Legacy `'reagent_id' => auth()->user()->reagent_id` + // (ApiMobileController.php:601): the customer's expert at THIS + // moment, fixed on the order so a later change of expert never moves + // past sales (owner ruling 2026-10-08). + salesAgentId: customer.referredByAgentId, + items: { + create: computedItems.map((item) => ({ + productVariantId: item.productVariantId, + quantity: item.quantity, + rashWeightGramsSnapshot: item.rashWeightGramsSnapshot, + wagePercentSnapshot: item.wagePercentSnapshot, + discountPercentSnapshot: item.discountPercentSnapshot, + computedWeightGrams: item.computedWeightGrams, + flatRialCharge: item.flatRialCharge + })) + }, + statusEvents: { + create: { toStatus: initialStatus, note: isSuspendedOverCreditLimit ? "Credit limit exceeded" : void 0 } + } + }, + include: { items: true, statusEvents: true } + }); + await this.accounting.orderStatusReached(tx, order.id, initialStatus); + return order; + }); + } + async updateStatus(orderId, newStatus, actorAdminUserId, note) { + return this.prisma.$transaction(async (tx) => { + const order = await tx.order.findUnique({ where: { id: orderId } }); + if (!order) + throw new common_12.NotFoundException(`Order ${orderId} not found`); + const updated = await tx.order.update({ + where: { id: orderId }, + data: { + status: newStatus, + deliveredAt: newStatus === client_1.OrderStatus.DELIVERED_TO_CUSTOMER ? /* @__PURE__ */ new Date() : order.deliveredAt + } + }); + await tx.orderStatusEvent.create({ + data: { orderId, fromStatus: order.status, toStatus: newStatus, note, actorAdminUserId } + }); + await this.ledger.syncOrderDebt(orderId, tx); + if (newStatus === client_1.OrderStatus.CANCELLED && order.status !== client_1.OrderStatus.CANCELLED) { + await this.accounting.orderCancelled(tx, orderId); + } else if (newStatus !== order.status) { + await this.accounting.orderStatusReached(tx, orderId, newStatus); + } + return updated; + }); + } + /** Unscoped read. Only reachable from the admin-guarded route. */ + getById(orderId) { + return this.prisma.order.findUnique({ + where: { id: orderId }, + include: { items: true, statusEvents: true, ledgerEntries: true } + }); + } + /** + * A customer reading one of their own orders. + * + * Someone else's order is reported as 404, not 403: a 403 would confirm the + * id exists, which is the same enumeration leak the id-addressed customer + * routes had. + */ + async getOwnedById(orderId, customerId) { + const order = await this.prisma.order.findFirst({ + where: { id: orderId, customerId }, + include: { items: true, statusEvents: true, ledgerEntries: true } + }); + if (!order) + throw new common_12.NotFoundException("\u0633\u0641\u0627\u0631\u0634 \u06CC\u0627\u0641\u062A \u0646\u0634\u062F"); + return order; + } + generateOrderNumber() { + const random = Math.random().toString(36).slice(2, 8).toUpperCase(); + return `ORD-${Date.now()}-${random}`; + } + }; + exports2.OrdersService = OrdersService; + exports2.OrdersService = OrdersService = OrdersService_1 = __decorate4([ + (0, common_12.Injectable)(), + __metadata3("design:paramtypes", [ + prisma_service_1.PrismaService, + catalog_service_1.CatalogService, + ledger_service_1.LedgerService, + accounting_hooks_service_1.AccountingHooksService, + wage_service_1.WageService + ]) + ], OrdersService); + } +}); + +// dist/modules/orders/dto/create-order.dto.js +var require_create_order_dto = __commonJS({ + "dist/modules/orders/dto/create-order.dto.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CreateOrderDto = exports2.CreateOrderItemInputDto = void 0; + var class_transformer_1 = require_cjs2(); + var client_1 = require("@prisma/client"); + var class_validator_1 = require_cjs(); + var CreateOrderItemInputDto = class { + productVariantId; + quantity; + /** Making-charge percentage negotiated for this order (may differ from the variant default). */ + wagePercent; + discountPercent; + /** Flat Rial charge per unit, independent of gold weight (e.g. stones). */ + flatRialCharge; + }; + exports2.CreateOrderItemInputDto = CreateOrderItemInputDto; + __decorate4([ + (0, class_validator_1.IsString)(), + __metadata3("design:type", String) + ], CreateOrderItemInputDto.prototype, "productVariantId", void 0); + __decorate4([ + (0, class_validator_1.IsInt)(), + (0, class_validator_1.Min)(1), + __metadata3("design:type", Number) + ], CreateOrderItemInputDto.prototype, "quantity", void 0); + __decorate4([ + (0, class_validator_1.IsNumber)(), + __metadata3("design:type", Number) + ], CreateOrderItemInputDto.prototype, "wagePercent", void 0); + __decorate4([ + (0, class_validator_1.IsOptional)(), + (0, class_validator_1.IsNumber)(), + __metadata3("design:type", Number) + ], CreateOrderItemInputDto.prototype, "discountPercent", void 0); + __decorate4([ + (0, class_validator_1.IsOptional)(), + (0, class_validator_1.IsNumber)(), + __metadata3("design:type", Number) + ], CreateOrderItemInputDto.prototype, "flatRialCharge", void 0); + var CreateOrderDto = class { + /** + * IGNORED BY THE SERVER. The customer is taken from the caller's token. + * + * It was required, and the route was public, so anyone could place an order + * on any customer's account — which lands on their gold debt and their + * ledger. Logged as SEC-02 in docs/parity/ISSUES.md. + * + * Kept as an optional field only so the two apps, which still send it, do not + * fail validation mid-flight. OrdersService logs a mismatch and always uses + * the token. Removed from the DTO and from both apps in Phase 2. + */ + customerId; + branchId; + /** + * Which sales channel placed the order. Legacy had no such field because the + * two channels lived in separate tables (orders vs orders_orders); the one + * Order model carries the distinction here. Defaults to RETAIL. + */ + channel; + items; + }; + exports2.CreateOrderDto = CreateOrderDto; + __decorate4([ + (0, class_validator_1.IsOptional)(), + (0, class_validator_1.IsString)(), + __metadata3("design:type", String) + ], CreateOrderDto.prototype, "customerId", void 0); + __decorate4([ + (0, class_validator_1.IsOptional)(), + (0, class_validator_1.IsString)(), + __metadata3("design:type", String) + ], CreateOrderDto.prototype, "branchId", void 0); + __decorate4([ + (0, class_validator_1.IsOptional)(), + (0, class_validator_1.IsEnum)(client_1.OrderChannel), + __metadata3("design:type", String) + ], CreateOrderDto.prototype, "channel", void 0); + __decorate4([ + (0, class_validator_1.IsArray)(), + (0, class_validator_1.ArrayMinSize)(1), + (0, class_validator_1.ValidateNested)({ each: true }), + (0, class_transformer_1.Type)(() => CreateOrderItemInputDto), + __metadata3("design:type", Array) + ], CreateOrderDto.prototype, "items", void 0); + } +}); + +// dist/modules/orders/dto/update-order-status.dto.js +var require_update_order_status_dto = __commonJS({ + "dist/modules/orders/dto/update-order-status.dto.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.UpdateOrderStatusDto = void 0; + var class_validator_1 = require_cjs(); + var client_1 = require("@prisma/client"); + var UpdateOrderStatusDto = class { + status; + note; + actorAdminUserId; + }; + exports2.UpdateOrderStatusDto = UpdateOrderStatusDto; + __decorate4([ + (0, class_validator_1.IsEnum)(client_1.OrderStatus), + __metadata3("design:type", String) + ], UpdateOrderStatusDto.prototype, "status", void 0); + __decorate4([ + (0, class_validator_1.IsOptional)(), + (0, class_validator_1.IsString)(), + __metadata3("design:type", String) + ], UpdateOrderStatusDto.prototype, "note", void 0); + __decorate4([ + (0, class_validator_1.IsOptional)(), + (0, class_validator_1.IsString)(), + __metadata3("design:type", String) + ], UpdateOrderStatusDto.prototype, "actorAdminUserId", void 0); + } +}); + +// dist/modules/orders/orders.controller.js +var require_orders_controller = __commonJS({ + "dist/modules/orders/orders.controller.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param3 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OrdersController = void 0; + var common_12 = require_common(); + var orders_service_1 = require_orders_service(); + var create_order_dto_1 = require_create_order_dto(); + var update_order_status_dto_1 = require_update_order_status_dto(); + var guards_1 = require_guards2(); + var customer_guards_1 = require_customer_guards(); + var OrdersController = class OrdersController { + orders; + constructor(orders) { + this.orders = orders; + } + /** The customer comes from the token; the body's `customerId` is ignored. */ + create(dto, me) { + return this.orders.createOrder(dto, me.id, { placedBy: "customer" }); + } + /** + * Unscoped read for operators. + * + * Declared BEFORE the `:id` route below: Nest matches in declaration order, + * so a literal segment that could also be read as a parameter has to come + * first or it is never reached. + */ + getAsAdmin(id) { + return this.orders.getById(id); + } + /** + * A customer reading one of their own orders. Scoped by token; someone + * else's order is a 404 rather than a 403, so ids stay unenumerable. + * + * Mounted under /orders/:id (not /customer/me/orders/:id) so the existing + * client paths keep working; it is the scoping that matters, not the shape. + */ + get(id, me) { + return this.orders.getOwnedById(id, me.id); + } + updateStatus(id, dto) { + return this.orders.updateStatus(id, dto.status, dto.actorAdminUserId, dto.note); + } + }; + exports2.OrdersController = OrdersController; + __decorate4([ + (0, customer_guards_1.CustomerAuth)(), + (0, common_12.Post)(), + __param3(0, (0, common_12.Body)()), + __param3(1, (0, customer_guards_1.CurrentCustomer)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [create_order_dto_1.CreateOrderDto, Object]), + __metadata3("design:returntype", void 0) + ], OrdersController.prototype, "create", null); + __decorate4([ + (0, common_12.Get)("admin/:id"), + (0, guards_1.RequirePermission)("order.list"), + __param3(0, (0, common_12.Param)("id")), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [String]), + __metadata3("design:returntype", void 0) + ], OrdersController.prototype, "getAsAdmin", null); + __decorate4([ + (0, customer_guards_1.CustomerAuth)(), + (0, common_12.Get)(":id"), + __param3(0, (0, common_12.Param)("id")), + __param3(1, (0, customer_guards_1.CurrentCustomer)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [String, Object]), + __metadata3("design:returntype", void 0) + ], OrdersController.prototype, "get", null); + __decorate4([ + (0, common_12.Patch)(":id/status"), + (0, guards_1.RequirePermission)("order.list.sts.submit"), + __param3(0, (0, common_12.Param)("id")), + __param3(1, (0, common_12.Body)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [String, update_order_status_dto_1.UpdateOrderStatusDto]), + __metadata3("design:returntype", void 0) + ], OrdersController.prototype, "updateStatus", null); + exports2.OrdersController = OrdersController = __decorate4([ + (0, common_12.Controller)("orders"), + __metadata3("design:paramtypes", [orders_service_1.OrdersService]) + ], OrdersController); + } +}); + +// dist/modules/accounting/dto/post-gold-repayment.dto.js +var require_post_gold_repayment_dto = __commonJS({ + "dist/modules/accounting/dto/post-gold-repayment.dto.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PostGoldRepaymentDto = void 0; + var class_validator_1 = require_cjs(); + var PostGoldRepaymentDto = class { + customerId; + instrument; + rawValue; + karatPerMille; + pricePerGramRial; + note; + }; + exports2.PostGoldRepaymentDto = PostGoldRepaymentDto; + __decorate4([ + (0, class_validator_1.IsString)(), + __metadata3("design:type", String) + ], PostGoldRepaymentDto.prototype, "customerId", void 0); + __decorate4([ + (0, class_validator_1.IsIn)(["MELTED_GOLD", "TRANSFER", "CHEQUE", "CASH"]), + __metadata3("design:type", String) + ], PostGoldRepaymentDto.prototype, "instrument", void 0); + __decorate4([ + (0, class_validator_1.IsNumber)(), + (0, class_validator_1.IsPositive)(), + __metadata3("design:type", Number) + ], PostGoldRepaymentDto.prototype, "rawValue", void 0); + __decorate4([ + (0, class_validator_1.IsOptional)(), + (0, class_validator_1.IsNumber)(), + __metadata3("design:type", Number) + ], PostGoldRepaymentDto.prototype, "karatPerMille", void 0); + __decorate4([ + (0, class_validator_1.IsOptional)(), + (0, class_validator_1.IsNumber)(), + (0, class_validator_1.IsPositive)(), + __metadata3("design:type", Number) + ], PostGoldRepaymentDto.prototype, "pricePerGramRial", void 0); + __decorate4([ + (0, class_validator_1.IsOptional)(), + (0, class_validator_1.IsString)(), + __metadata3("design:type", String) + ], PostGoldRepaymentDto.prototype, "note", void 0); + } +}); + +// dist/modules/accounting/dto/post-rial-repayment.dto.js +var require_post_rial_repayment_dto = __commonJS({ + "dist/modules/accounting/dto/post-rial-repayment.dto.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PostRialRepaymentDto = void 0; + var class_validator_1 = require_cjs(); + var PostRialRepaymentDto = class { + customerId; + amount; + note; + }; + exports2.PostRialRepaymentDto = PostRialRepaymentDto; + __decorate4([ + (0, class_validator_1.IsString)(), + __metadata3("design:type", String) + ], PostRialRepaymentDto.prototype, "customerId", void 0); + __decorate4([ + (0, class_validator_1.IsNumber)(), + (0, class_validator_1.IsPositive)(), + __metadata3("design:type", Number) + ], PostRialRepaymentDto.prototype, "amount", void 0); + __decorate4([ + (0, class_validator_1.IsOptional)(), + (0, class_validator_1.IsString)(), + __metadata3("design:type", String) + ], PostRialRepaymentDto.prototype, "note", void 0); + } +}); + +// dist/modules/accounting/accounting.controller.js +var require_accounting_controller = __commonJS({ + "dist/modules/accounting/accounting.controller.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param3 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountingController = void 0; + var common_12 = require_common(); + var ledger_service_1 = require_ledger_service(); + var post_gold_repayment_dto_1 = require_post_gold_repayment_dto(); + var post_rial_repayment_dto_1 = require_post_rial_repayment_dto(); + var guards_1 = require_guards2(); + var AccountingController = class AccountingController { + ledger; + constructor(ledger) { + this.ledger = ledger; + } + getBalance(customerId) { + return this.ledger.getBalance(customerId); + } + reconcile(customerId) { + return this.ledger.reconcileBalance(customerId); + } + postGoldRepayment(dto) { + return this.ledger.postGoldRepayment(dto); + } + postRialRepayment(dto) { + return this.ledger.postRialRepayment(dto); + } + confirmEntry(entryId) { + return this.ledger.confirmEntry(entryId); + } + }; + exports2.AccountingController = AccountingController; + __decorate4([ + (0, common_12.Get)("customers/:customerId/balance"), + (0, guards_1.RequirePermission)("wallet.list"), + __param3(0, (0, common_12.Param)("customerId")), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [String]), + __metadata3("design:returntype", void 0) + ], AccountingController.prototype, "getBalance", null); + __decorate4([ + (0, common_12.Post)("customers/:customerId/reconcile"), + (0, guards_1.RequirePermission)("wallet.charge"), + __param3(0, (0, common_12.Param)("customerId")), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [String]), + __metadata3("design:returntype", void 0) + ], AccountingController.prototype, "reconcile", null); + __decorate4([ + (0, common_12.Post)("repayments/gold"), + (0, guards_1.RequirePermission)("document.create"), + __param3(0, (0, common_12.Body)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [post_gold_repayment_dto_1.PostGoldRepaymentDto]), + __metadata3("design:returntype", void 0) + ], AccountingController.prototype, "postGoldRepayment", null); + __decorate4([ + (0, common_12.Post)("repayments/rial"), + (0, guards_1.RequirePermission)("document.create"), + __param3(0, (0, common_12.Body)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [post_rial_repayment_dto_1.PostRialRepaymentDto]), + __metadata3("design:returntype", void 0) + ], AccountingController.prototype, "postRialRepayment", null); + __decorate4([ + (0, common_12.Post)("entries/:entryId/confirm"), + (0, guards_1.RequirePermission)("document.list.confirm"), + __param3(0, (0, common_12.Param)("entryId")), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [String]), + __metadata3("design:returntype", void 0) + ], AccountingController.prototype, "confirmEntry", null); + exports2.AccountingController = AccountingController = __decorate4([ + (0, common_12.Controller)("accounting"), + __metadata3("design:paramtypes", [ledger_service_1.LedgerService]) + ], AccountingController); + } +}); + +// dist/modules/accounting/accounting.module.js +var require_accounting_module = __commonJS({ + "dist/modules/accounting/accounting.module.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountingModule = void 0; + var common_12 = require_common(); + var ledger_service_1 = require_ledger_service(); + var accounting_controller_1 = require_accounting_controller(); + var AccountingModule = class AccountingModule { + }; + exports2.AccountingModule = AccountingModule; + exports2.AccountingModule = AccountingModule = __decorate4([ + (0, common_12.Module)({ + controllers: [accounting_controller_1.AccountingController], + providers: [ledger_service_1.LedgerService], + exports: [ledger_service_1.LedgerService] + }) + ], AccountingModule); + } +}); + +// dist/modules/pricing/pricing.service.js +var require_pricing_service = __commonJS({ + "dist/modules/pricing/pricing.service.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PricingService = void 0; + var common_12 = require_common(); + var prisma_service_1 = require_prisma_service(); + var PricingService = class PricingService { + prisma; + constructor(prisma) { + this.prisma = prisma; + } + async recordQuote(karatPerMille, pricePerGramRial, source) { + return this.prisma.goldPriceQuote.create({ + data: { karatPerMille, pricePerGramRial, source } + }); + } + async getLatestQuote(karatPerMille) { + const quote = await this.prisma.goldPriceQuote.findFirst({ + where: { karatPerMille }, + orderBy: { quotedAt: "desc" } + }); + if (!quote) + throw new common_12.NotFoundException(`No gold price quote recorded for ${karatPerMille}\u2030`); + return quote; + } + }; + exports2.PricingService = PricingService; + exports2.PricingService = PricingService = __decorate4([ + (0, common_12.Injectable)(), + __metadata3("design:paramtypes", [prisma_service_1.PrismaService]) + ], PricingService); + } +}); + +// dist/modules/pricing/pricing.controller.js +var require_pricing_controller = __commonJS({ + "dist/modules/pricing/pricing.controller.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param3 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PricingController = void 0; + var common_12 = require_common(); + var pricing_service_1 = require_pricing_service(); + var guards_1 = require_guards2(); + var PricingController = class PricingController { + pricing; + constructor(pricing) { + this.pricing = pricing; + } + getLatest(karatPerMille) { + return this.pricing.getLatestQuote(Number(karatPerMille) || 750); + } + }; + exports2.PricingController = PricingController; + __decorate4([ + (0, common_12.Get)("latest"), + __param3(0, (0, common_12.Query)("karatPerMille")), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [String]), + __metadata3("design:returntype", void 0) + ], PricingController.prototype, "getLatest", null); + exports2.PricingController = PricingController = __decorate4([ + (0, guards_1.Public)(), + (0, common_12.Controller)("pricing"), + __metadata3("design:paramtypes", [pricing_service_1.PricingService]) + ], PricingController); + } +}); + +// dist/modules/pricing/wage.controller.js +var require_wage_controller = __commonJS({ + "dist/modules/pricing/wage.controller.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param3 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.WageCustomerController = exports2.WageAdminController = void 0; + var common_12 = require_common(); + var class_validator_1 = require_cjs(); + var guards_1 = require_guards2(); + var customer_guards_1 = require_customer_guards(); + var wage_service_1 = require_wage_service(); + var WageAdminController = class WageAdminController { + wage; + constructor(wage) { + this.wage = wage; + } + get() { + return this.wage.getConfig(); + } + /** Nothing is saved: the draft and the formula in force on the same sample. */ + preview(body) { + return this.wage.preview(body?.formula, body?.sample); + } + /** Puts the formula in force, recorded with the sample it was checked on. */ + approve(body, admin) { + return this.wage.approve(body?.formula, body?.sample, admin); + } + }; + exports2.WageAdminController = WageAdminController; + __decorate4([ + (0, common_12.Get)(), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", []), + __metadata3("design:returntype", void 0) + ], WageAdminController.prototype, "get", null); + __decorate4([ + (0, common_12.Post)("preview"), + (0, common_12.HttpCode)(200), + __param3(0, (0, common_12.Body)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object]), + __metadata3("design:returntype", void 0) + ], WageAdminController.prototype, "preview", null); + __decorate4([ + (0, common_12.Put)(), + __param3(0, (0, common_12.Body)()), + __param3(1, (0, guards_1.CurrentAdmin)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object, Object]), + __metadata3("design:returntype", void 0) + ], WageAdminController.prototype, "approve", null); + exports2.WageAdminController = WageAdminController = __decorate4([ + (0, common_12.Controller)("admin/pricing/wage-formula"), + (0, guards_1.RequirePermission)("config.wage"), + __metadata3("design:paramtypes", [wage_service_1.WageService]) + ], WageAdminController); + var WageQuoteDto = class { + variantIds; + }; + __decorate4([ + (0, class_validator_1.IsArray)(), + (0, class_validator_1.ArrayMaxSize)(200), + (0, class_validator_1.IsString)({ each: true }), + __metadata3("design:type", Array) + ], WageQuoteDto.prototype, "variantIds", void 0); + var WageCustomerController = class WageCustomerController { + wage; + constructor(wage) { + this.wage = wage; + } + async quote(dto, me) { + return [...(await this.wage.quote(me.id, dto.variantIds)).values()]; + } + }; + exports2.WageCustomerController = WageCustomerController; + __decorate4([ + (0, customer_guards_1.CustomerAuth)(), + (0, common_12.Post)(), + (0, common_12.HttpCode)(200), + __param3(0, (0, common_12.Body)()), + __param3(1, (0, customer_guards_1.CurrentCustomer)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [WageQuoteDto, Object]), + __metadata3("design:returntype", Promise) + ], WageCustomerController.prototype, "quote", null); + exports2.WageCustomerController = WageCustomerController = __decorate4([ + (0, common_12.Controller)("customer/me/wage-quote"), + __metadata3("design:paramtypes", [wage_service_1.WageService]) + ], WageCustomerController); + } +}); + +// dist/modules/pricing/pricing.module.js +var require_pricing_module = __commonJS({ + "dist/modules/pricing/pricing.module.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PricingModule = void 0; + var common_12 = require_common(); + var pricing_service_1 = require_pricing_service(); + var pricing_controller_1 = require_pricing_controller(); + var wage_service_1 = require_wage_service(); + var wage_controller_1 = require_wage_controller(); + var PricingModule = class PricingModule { + }; + exports2.PricingModule = PricingModule; + exports2.PricingModule = PricingModule = __decorate4([ + (0, common_12.Module)({ + controllers: [pricing_controller_1.PricingController, wage_controller_1.WageAdminController, wage_controller_1.WageCustomerController], + providers: [pricing_service_1.PricingService, wage_service_1.WageService], + exports: [pricing_service_1.PricingService, wage_service_1.WageService] + }) + ], PricingModule); + } +}); + +// dist/modules/orders/orders.module.js +var require_orders_module = __commonJS({ + "dist/modules/orders/orders.module.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.OrdersModule = void 0; + var common_12 = require_common(); + var orders_service_1 = require_orders_service(); + var orders_controller_1 = require_orders_controller(); + var catalog_module_1 = require_catalog_module(); + var accounting_module_1 = require_accounting_module(); + var pricing_module_1 = require_pricing_module(); + var OrdersModule = class OrdersModule { + }; + exports2.OrdersModule = OrdersModule; + exports2.OrdersModule = OrdersModule = __decorate4([ + (0, common_12.Module)({ + imports: [catalog_module_1.CatalogModule, accounting_module_1.AccountingModule, pricing_module_1.PricingModule], + controllers: [orders_controller_1.OrdersController], + providers: [orders_service_1.OrdersService], + exports: [orders_service_1.OrdersService] + }) + ], OrdersModule); + } +}); + +// dist/modules/accounting-sync/accounting-admin.service.js +var require_accounting_admin_service = __commonJS({ + "dist/modules/accounting-sync/accounting-admin.service.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountingAdminService = void 0; + var common_12 = require_common(); + var client_1 = require("@prisma/client"); + var prisma_service_1 = require_prisma_service(); + var accounting_config_1 = require_accounting_config(); + var accounting_config_service_1 = require_accounting_config_service(); + var accounting_http_1 = require_accounting_http(); + var accounting_sync_service_1 = require_accounting_sync_service(); + var accounting_worker_service_1 = require_accounting_worker_service(); + var jalali_1 = require_jalali(); + var providers_1 = require_providers(); + var JOBS = ["customers", "balances", "products", "outbox"]; + var STATUSES = ["PENDING", "SENDING", "SENT", "FAILED", "NEEDS_REVIEW", "RESOLVED"]; + function page(v) { + const n = Number(v); + return Number.isInteger(n) && n > 0 ? n : 1; + } + function limit(v, max = 100) { + const n = Number(v); + return Number.isInteger(n) && n > 0 ? Math.min(n, max) : 25; + } + var AccountingAdminService = class AccountingAdminService { + prisma; + config; + sync; + worker; + constructor(prisma, config, sync, worker) { + this.prisma = prisma; + this.config = config; + this.sync = sync; + this.worker = worker; + } + async overview() { + const [config, state, counts, openIssues, raw] = await Promise.all([ + this.config.getPublic(), + this.config.getState(), + this.prisma.accountingOutbox.groupBy({ by: ["status"], _count: { _all: true } }), + this.prisma.accountingIssue.count({ where: { resolvedAt: null } }), + this.config.get() + ]); + return { + config, + inactiveReason: this.config.inactiveReason(raw), + state, + busy: this.worker.busy, + realtime: this.worker.realtime, + outbox: Object.fromEntries(counts.map((c) => [c.status, c._count._all])), + openIssues + }; + } + async save(body) { + const { providerChanged } = await this.config.save(body); + return { ...await this.overview(), providerChanged }; + } + async settingsOf(name) { + const config = await this.config.get(); + const provider = (0, providers_1.isProviderName)(name) ? name : config.provider; + if (provider === "none") + throw new common_12.BadRequestException("\u0646\u0631\u0645\u200C\u0627\u0641\u0632\u0627\u0631 \u062D\u0633\u0627\u0628\u062F\u0627\u0631\u06CC \u0627\u0646\u062A\u062E\u0627\u0628 \u0646\u0634\u062F\u0647 \u0627\u0633\u062A"); + const settings = this.config.settingsFor(config, provider); + if (!settings) + throw new common_12.BadRequestException("\u0622\u062F\u0631\u0633 \u06CC\u0627 \u062A\u0648\u06A9\u0646 \u0627\u06CC\u0646 \u0646\u0631\u0645\u200C\u0627\u0641\u0632\u0627\u0631 \u062A\u0646\u0638\u06CC\u0645 \u0646\u0634\u062F\u0647 (\u06CC\u0627 \u062A\u0648\u06A9\u0646 \u0642\u0627\u0628\u0644\u200C\u062E\u0648\u0627\u0646\u062F\u0646 \u0646\u06CC\u0633\u062A)"); + return { provider: providers_1.ACCOUNTING_PROVIDERS[provider], settings, config }; + } + /** For the sync buttons on the lists: connected or not, nothing more. */ + async connectionStatus() { + const config = await this.config.get(); + const reason = this.config.inactiveReason(config); + return { + connected: !reason, + provider: reason || config.provider === "none" ? null : providers_1.ACCOUNTING_PROVIDERS[config.provider].label + }; + } + /** The list-page sync buttons (plan §12): run now, wait, report. */ + async syncNow(jobs) { + const reason = this.config.inactiveReason(await this.config.get()); + if (reason) + throw new common_12.BadRequestException(`\u0633\u06CC\u0646\u06A9 \u0628\u0627 \u062D\u0633\u0627\u0628\u062F\u0627\u0631\u06CC \u0627\u0646\u062C\u0627\u0645 \u0646\u0645\u06CC\u200C\u0634\u0648\u062F: ${reason}`); + const results = await this.worker.runPullsNow(jobs); + if (!results) + throw new common_12.BadRequestException("\u06CC\u06A9 \u0647\u0645\u06AF\u0627\u0645\u200C\u0633\u0627\u0632\u06CC \u062F\u06CC\u06AF\u0631 \u062F\u0631 \u062D\u0627\u0644 \u0627\u062C\u0631\u0627\u0633\u062A\u061B \u06A9\u0645\u06CC \u0628\u0639\u062F \u062F\u0648\u0628\u0627\u0631\u0647 \u0627\u0645\u062A\u062D\u0627\u0646 \u06A9\u0646\u06CC\u062F"); + return { ok: Object.values(results).every((r) => r.ok), results }; + } + /** Tests the connection as typed in the form (`connection`), falling back to what is saved. */ + async test(name, connection) { + if (!(0, providers_1.isProviderName)(name)) + throw new common_12.BadRequestException("\u0646\u0631\u0645\u200C\u0627\u0641\u0632\u0627\u0631 \u062D\u0633\u0627\u0628\u062F\u0627\u0631\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u0627\u0633\u062A"); + const provider = providers_1.ACCOUNTING_PROVIDERS[name]; + const settings = this.config.draftSettings(await this.config.get(), name, connection); + if (!settings) + throw new common_12.BadRequestException("\u0622\u062F\u0631\u0633 \u0648 \u062A\u0648\u06A9\u0646 \u0631\u0627 \u0648\u0627\u0631\u062F \u06A9\u0646\u06CC\u062F"); + const started = Date.now(); + try { + const info = await provider.health(settings); + return { ok: true, provider: provider.label, ms: Date.now() - started, info }; + } catch (err) { + return { ok: false, provider: provider.label, ms: Date.now() - started, error: this.sync.describeError(err) }; + } + } + /** + * The certificate the server at `baseUrl` presents, for the admin to compare + * and pin (a self-signed Tahesab install cannot be verified otherwise). + */ + async certificate(baseUrl) { + const url = (0, accounting_config_1.cleanUrl)(baseUrl, "\u0622\u062F\u0631\u0633"); + if (!url) + throw new common_12.BadRequestException("\u0622\u062F\u0631\u0633 \u0631\u0627 \u0648\u0627\u0631\u062F \u06A9\u0646\u06CC\u062F"); + try { + return await (0, accounting_http_1.fetchServerCertificate)(url, 1e4); + } catch (err) { + throw new common_12.BadRequestException(`\u06AF\u0648\u0627\u0647\u06CC \u062F\u0631\u06CC\u0627\u0641\u062A \u0646\u0634\u062F: ${this.sync.describeError(err)}`); + } + } + /** Dropdown options for the mapping tab; each list fails on its own. */ + async options(name) { + const { provider, settings } = await this.settingsOf(name); + const safe = async (fn) => { + try { + return { ok: true, items: await fn() }; + } catch (err) { + return { ok: false, items: [], error: this.sync.describeError(err) }; + } + }; + const [customerGroups, karSakhteGroups, karSakhteTypes] = await Promise.all([ + safe(() => provider.listCustomerGroups(settings)), + safe(() => provider.listKarSakhteGroups(settings)), + safe(() => provider.listKarSakhteTypes(settings)) + ]); + const categories = await this.prisma.category.findMany({ select: { id: true, title: true }, orderBy: { title: "asc" } }); + return { provider: provider.name, customerGroups, karSakhteGroups, karSakhteTypes, categories }; + } + async run(job) { + if (!JOBS.includes(job)) + throw new common_12.BadRequestException("\u06A9\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u0627\u0633\u062A"); + const config = await this.config.get(); + const reason = this.config.inactiveReason(config); + if (reason) + throw new common_12.BadRequestException(`\u0647\u0645\u06AF\u0627\u0645\u200C\u0633\u0627\u0632\u06CC \u0627\u0646\u062C\u0627\u0645 \u0646\u0645\u06CC\u200C\u0634\u0648\u062F: ${reason}`); + if (job !== "outbox" && !config.features[accounting_worker_service_1.PULL_FEATURE[job]]) { + throw new common_12.BadRequestException("\u0627\u06CC\u0646 \u0642\u0627\u0628\u0644\u06CC\u062A \u062F\u0631 \u062A\u0628 \xAB\u0642\u0627\u0628\u0644\u06CC\u062A\u200C\u0647\u0627 \u0648 \u0632\u0645\u0627\u0646\u200C\u0628\u0646\u062F\u06CC\xBB \u062E\u0627\u0645\u0648\u0634 \u0627\u0633\u062A\u061B \u0627\u0648\u0644 \u0631\u0648\u0634\u0646 \u0648 \u0630\u062E\u06CC\u0631\u0647 \u06A9\u0646\u06CC\u062F"); + } + const started = this.worker.runNow(job); + return { started, message: started ? "\u0634\u0631\u0648\u0639 \u0634\u062F" : "\u06CC\u06A9 \u0647\u0645\u06AF\u0627\u0645\u200C\u0633\u0627\u0632\u06CC \u062F\u06CC\u06AF\u0631 \u062F\u0631 \u062D\u0627\u0644 \u0627\u062C\u0631\u0627\u0633\u062A\u061B \u06A9\u0645\u06CC \u0628\u0639\u062F \u062F\u0648\u0628\u0627\u0631\u0647 \u0627\u0645\u062A\u062D\u0627\u0646 \u06A9\u0646\u06CC\u062F" }; + } + // ── outbox log ────────────────────────────────────────────────────── + async outbox(q) { + const where = {}; + if (typeof q.status === "string" && STATUSES.includes(q.status)) { + where.status = q.status; + } + if (typeof q.kind === "string" && q.kind) + where.kind = q.kind; + if (typeof q.entityId === "string" && q.entityId) + where.entityId = q.entityId; + const p = page(q.page); + const l2 = limit(q.limit); + const [rows, total] = await Promise.all([ + this.prisma.accountingOutbox.findMany({ where, orderBy: { createdAt: "desc" }, skip: (p - 1) * l2, take: l2 }), + this.prisma.accountingOutbox.count({ where }) + ]); + const labels = await this.labelsFor(rows.map((r) => ({ kind: r.kind, entityId: r.entityId }))); + return { rows: rows.map((r) => ({ ...r, entityLabel: labels.get(r.entityId) ?? null })), total, page: p, limit: l2 }; + } + async labelsFor(items) { + const orderIds = items.filter((i) => i.kind.startsWith("ORDER")).map((i) => i.entityId); + const customerIds = items.filter((i) => i.kind === "CUSTOMER_PUSH").map((i) => i.entityId); + const productIds = items.filter((i) => i.kind === "PRODUCT_PUSH").map((i) => i.entityId); + const [orders, customers, products] = await Promise.all([ + orderIds.length ? this.prisma.order.findMany({ where: { id: { in: orderIds } }, select: { id: true, orderNumber: true, customer: { select: { fullName: true } } } }) : [], + customerIds.length ? this.prisma.customer.findMany({ where: { id: { in: customerIds } }, select: { id: true, fullName: true, mobile: true } }) : [], + productIds.length ? this.prisma.product.findMany({ where: { id: { in: productIds } }, select: { id: true, title: true } }) : [] + ]); + const m = /* @__PURE__ */ new Map(); + for (const o of orders) + m.set(o.id, `\u0633\u0641\u0627\u0631\u0634 ${o.orderNumber} \u2014 ${o.customer.fullName}`); + for (const c of customers) + m.set(c.id, `${c.fullName} (${c.mobile})`); + for (const p of products) + m.set(p.id, p.title); + return m; + } + async retry(id) { + const row = await this.prisma.accountingOutbox.findUnique({ where: { id } }); + if (!row) + throw new common_12.NotFoundException("\u0631\u062F\u06CC\u0641 \u067E\u06CC\u062F\u0627 \u0646\u0634\u062F"); + if (row.status === "SENT" || row.status === "SENDING") + throw new common_12.BadRequestException("\u0627\u06CC\u0646 \u0631\u062F\u06CC\u0641 \u0642\u0627\u0628\u0644 \u062A\u0644\u0627\u0634 \u062F\u0648\u0628\u0627\u0631\u0647 \u0646\u06CC\u0633\u062A"); + return this.prisma.accountingOutbox.update({ + where: { id }, + data: { status: "PENDING", nextAttemptAt: /* @__PURE__ */ new Date(), attempts: row.status === "PENDING" ? row.attempts : 0 } + }); + } + async resolve(id, adminId, note) { + const row = await this.prisma.accountingOutbox.findUnique({ where: { id } }); + if (!row) + throw new common_12.NotFoundException("\u0631\u062F\u06CC\u0641 \u067E\u06CC\u062F\u0627 \u0646\u0634\u062F"); + if (row.status === "SENDING") + throw new common_12.BadRequestException("\u062F\u0631 \u062D\u0627\u0644 \u0627\u0631\u0633\u0627\u0644 \u0627\u0633\u062A"); + return this.prisma.accountingOutbox.update({ + where: { id }, + data: { status: "RESOLVED", resolvedById: adminId, lastError: note ? `\u062D\u0644\u200C\u0634\u062F\u0647: ${note}` : row.lastError } + }); + } + // ── issues ────────────────────────────────────────────────────────── + async issues(q) { + const where = q.resolved === "1" ? { resolvedAt: { not: null } } : { resolvedAt: null }; + const p = page(q.page); + const l2 = limit(q.limit); + const [rows, total] = await Promise.all([ + this.prisma.accountingIssue.findMany({ where, orderBy: { updatedAt: "desc" }, skip: (p - 1) * l2, take: l2 }), + this.prisma.accountingIssue.count({ where }) + ]); + return { rows, total, page: p, limit: l2 }; + } + resolveIssue(id) { + return this.prisma.accountingIssue.update({ where: { id }, data: { resolvedAt: /* @__PURE__ */ new Date() } }); + } + // ── links ─────────────────────────────────────────────────────────── + async links(q) { + const config = await this.config.get(); + const where = {}; + if (q.entityType === "CUSTOMER" || q.entityType === "PRODUCT") + where.entityType = q.entityType; + where.provider = (0, providers_1.isProviderName)(q.provider) ? q.provider : config.provider === "none" ? void 0 : config.provider; + if (typeof q.entityId === "string" && q.entityId) + where.entityId = q.entityId; + if (typeof q.q === "string" && q.q.trim()) { + where.OR = [{ externalCode: { contains: q.q.trim() } }, { externalName: { contains: q.q.trim() } }]; + } + const p = page(q.page); + const l2 = limit(q.limit); + const [rows, total] = await Promise.all([ + this.prisma.accountingLink.findMany({ where, orderBy: { createdAt: "desc" }, skip: (p - 1) * l2, take: l2 }), + this.prisma.accountingLink.count({ where }) + ]); + return { rows, total, page: p, limit: l2 }; + } + async manualLink(body) { + const config = await this.config.get(); + if (config.provider === "none") + throw new common_12.BadRequestException("\u0646\u0631\u0645\u200C\u0627\u0641\u0632\u0627\u0631 \u062D\u0633\u0627\u0628\u062F\u0627\u0631\u06CC \u0627\u0646\u062A\u062E\u0627\u0628 \u0646\u0634\u062F\u0647 \u0627\u0633\u062A"); + const provider = config.provider; + const entityType = body.entityType === "PRODUCT" ? client_1.AccountingEntityType.PRODUCT : client_1.AccountingEntityType.CUSTOMER; + const entityId = String(body.entityId ?? "").trim(); + const externalCode = String(body.externalCode ?? "").trim(); + if (!entityId || !externalCode) + throw new common_12.BadRequestException("\u0634\u0646\u0627\u0633\u0647 \u0648 \u06A9\u062F \u062D\u0633\u0627\u0628\u062F\u0627\u0631\u06CC \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A"); + const exists = entityType === "CUSTOMER" ? await this.prisma.customer.findUnique({ where: { id: entityId }, select: { id: true } }) : await this.prisma.product.findUnique({ where: { id: entityId }, select: { id: true } }); + if (!exists) + throw new common_12.NotFoundException("\u0631\u062F\u06CC\u0641 \u0627\u067E \u067E\u06CC\u062F\u0627 \u0646\u0634\u062F"); + const taken = await this.prisma.accountingLink.findUnique({ + where: { provider_entityType_externalCode: { provider, entityType, externalCode } } + }); + if (taken && taken.entityId !== entityId) + throw new common_12.BadRequestException("\u0627\u06CC\u0646 \u06A9\u062F \u0628\u0647 \u0631\u062F\u06CC\u0641 \u062F\u06CC\u06AF\u0631\u06CC \u0644\u06CC\u0646\u06A9 \u0627\u0633\u062A"); + return this.prisma.accountingLink.upsert({ + where: { provider_entityType_entityId: { provider, entityType, entityId } }, + update: { externalCode, origin: "MANUAL", syncedAt: /* @__PURE__ */ new Date() }, + create: { provider, entityType, entityId, externalCode, origin: "MANUAL", externalName: body.externalName || null } + }); + } + async unlink(id) { + await this.prisma.accountingLink.delete({ where: { id } }).catch(() => { + throw new common_12.NotFoundException("\u0644\u06CC\u0646\u06A9 \u067E\u06CC\u062F\u0627 \u0646\u0634\u062F"); + }); + return { success: true }; + } + // ── per-row panels ────────────────────────────────────────────────── + async customer(id) { + const config = await this.config.get(); + const c = await this.prisma.customer.findUnique({ + where: { id }, + select: { + id: true, + goldDebtGrams: true, + fiatDebtRial: true, + accountingGoldBalance: true, + accountingRialBalance: true, + accountingBalanceAt: true + } + }); + if (!c) + throw new common_12.NotFoundException("\u0645\u0634\u062A\u0631\u06CC \u06CC\u0627\u0641\u062A \u0646\u0634\u062F"); + const link = config.provider === "none" ? null : await this.prisma.accountingLink.findUnique({ + where: { provider_entityType_entityId: { provider: config.provider, entityType: "CUSTOMER", entityId: id } } + }); + const fresh = link ? await this.sync.customerBalance(id) : null; + const jobs = await this.prisma.accountingOutbox.findMany({ + where: { entityId: id, kind: "CUSTOMER_PUSH" }, + orderBy: { createdAt: "desc" }, + take: 5 + }); + return { + provider: config.provider, + link, + internal: { gold: c.goldDebtGrams, rial: c.fiatDebtRial }, + accounting: fresh ? { gold: fresh.gold, rial: fresh.rial, at: fresh.at } : c.accountingBalanceAt ? { gold: c.accountingGoldBalance, rial: c.accountingRialBalance, at: c.accountingBalanceAt } : null, + jobs + }; + } + async productsStatus(idsCsv) { + const ids = String(idsCsv ?? "").split(",").map((s) => s.trim()).filter(Boolean).slice(0, 500); + const config = await this.config.get(); + if (ids.length === 0) + return {}; + const [products, links] = await Promise.all([ + this.prisma.product.findMany({ + where: { id: { in: ids } }, + select: { + id: true, + accountingStockWeight: true, + accountingStockCount: true, + accountingStockAt: true, + _count: { select: { images: true } } + } + }), + config.provider === "none" ? [] : this.prisma.accountingLink.findMany({ where: { provider: config.provider, entityType: "PRODUCT", entityId: { in: ids } } }) + ]); + const linkBy = new Map(links.map((l2) => [l2.entityId, l2])); + return Object.fromEntries(products.map((p) => { + const l2 = linkBy.get(p.id); + return [ + p.id, + { + linked: !!l2, + locked: !!l2 && config.features.products, + code: l2?.externalCode ?? null, + origin: l2?.origin ?? null, + stockWeight: p.accountingStockWeight, + stockCount: p.accountingStockCount, + stockAt: p.accountingStockAt, + hasImage: p._count.images > 0 + } + ]; + })); + } + async movement(q) { + const a = await this.config.active(); + if (!a) + throw new common_12.BadRequestException("\u0627\u062A\u0635\u0627\u0644 \u062D\u0633\u0627\u0628\u062F\u0627\u0631\u06CC \u0641\u0639\u0627\u0644 \u0646\u06CC\u0633\u062A"); + const to = (0, jalali_1.parseJalali)(q.to) ?? (0, jalali_1.toJalali)(/* @__PURE__ */ new Date()); + const from = (0, jalali_1.parseJalali)(q.from) ?? (0, jalali_1.toJalali)(new Date(Date.now() - 30 * 24 * 3600 * 1e3)); + const rows = await a.provider.getKarSakhteMovement(a.settings, from, to); + return { provider: a.provider.label, scope: a.provider.capabilities.movementScope, rows }; + } + }; + exports2.AccountingAdminService = AccountingAdminService; + exports2.AccountingAdminService = AccountingAdminService = __decorate4([ + (0, common_12.Injectable)(), + __metadata3("design:paramtypes", [ + prisma_service_1.PrismaService, + accounting_config_service_1.AccountingConfigService, + accounting_sync_service_1.AccountingSyncService, + accounting_worker_service_1.AccountingWorkerService + ]) + ], AccountingAdminService); + } +}); + +// dist/modules/accounting-sync/accounting-admin.controller.js +var require_accounting_admin_controller = __commonJS({ + "dist/modules/accounting-sync/accounting-admin.controller.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param3 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountingAdminController = void 0; + var common_12 = require_common(); + var guards_1 = require_guards2(); + var accounting_admin_service_1 = require_accounting_admin_service(); + var AccountingAdminController = class AccountingAdminController { + admin; + constructor(admin) { + this.admin = admin; + } + overview() { + return this.admin.overview(); + } + save(body) { + return this.admin.save(body); + } + test(body) { + return this.admin.test(body?.provider, body?.connection); + } + certificate(body) { + return this.admin.certificate(body?.baseUrl); + } + options(provider) { + return this.admin.options(provider); + } + run(job) { + return this.admin.run(job); + } + outbox(q) { + return this.admin.outbox(q); + } + retry(id) { + return this.admin.retry(id); + } + resolve(id, me, body) { + return this.admin.resolve(id, me.id, body?.note); + } + issues(q) { + return this.admin.issues(q); + } + resolveIssue(id) { + return this.admin.resolveIssue(id); + } + links(q) { + return this.admin.links(q); + } + link(body) { + return this.admin.manualLink(body); + } + unlink(id) { + return this.admin.unlink(id); + } + customer(id) { + return this.admin.customer(id); + } + productsStatus(ids) { + return this.admin.productsStatus(ids); + } + movement(q) { + return this.admin.movement(q); + } + }; + exports2.AccountingAdminController = AccountingAdminController; + __decorate4([ + (0, common_12.Get)(), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", []), + __metadata3("design:returntype", void 0) + ], AccountingAdminController.prototype, "overview", null); + __decorate4([ + (0, common_12.Put)("config"), + __param3(0, (0, common_12.Body)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object]), + __metadata3("design:returntype", void 0) + ], AccountingAdminController.prototype, "save", null); + __decorate4([ + (0, common_12.Post)("test"), + (0, common_12.HttpCode)(200), + __param3(0, (0, common_12.Body)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object]), + __metadata3("design:returntype", void 0) + ], AccountingAdminController.prototype, "test", null); + __decorate4([ + (0, common_12.Post)("certificate"), + (0, common_12.HttpCode)(200), + __param3(0, (0, common_12.Body)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object]), + __metadata3("design:returntype", void 0) + ], AccountingAdminController.prototype, "certificate", null); + __decorate4([ + (0, common_12.Get)("options"), + __param3(0, (0, common_12.Query)("provider")), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [String]), + __metadata3("design:returntype", void 0) + ], AccountingAdminController.prototype, "options", null); + __decorate4([ + (0, common_12.Post)("run/:job"), + (0, common_12.HttpCode)(200), + __param3(0, (0, common_12.Param)("job")), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [String]), + __metadata3("design:returntype", void 0) + ], AccountingAdminController.prototype, "run", null); + __decorate4([ + (0, common_12.Get)("outbox"), + __param3(0, (0, common_12.Query)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object]), + __metadata3("design:returntype", void 0) + ], AccountingAdminController.prototype, "outbox", null); + __decorate4([ + (0, common_12.Post)("outbox/:id/retry"), + (0, common_12.HttpCode)(200), + __param3(0, (0, common_12.Param)("id")), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [String]), + __metadata3("design:returntype", void 0) + ], AccountingAdminController.prototype, "retry", null); + __decorate4([ + (0, common_12.Post)("outbox/:id/resolve"), + (0, common_12.HttpCode)(200), + __param3(0, (0, common_12.Param)("id")), + __param3(1, (0, guards_1.CurrentAdmin)()), + __param3(2, (0, common_12.Body)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [String, Object, Object]), + __metadata3("design:returntype", void 0) + ], AccountingAdminController.prototype, "resolve", null); + __decorate4([ + (0, common_12.Get)("issues"), + __param3(0, (0, common_12.Query)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object]), + __metadata3("design:returntype", void 0) + ], AccountingAdminController.prototype, "issues", null); + __decorate4([ + (0, common_12.Post)("issues/:id/resolve"), + (0, common_12.HttpCode)(200), + __param3(0, (0, common_12.Param)("id")), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [String]), + __metadata3("design:returntype", void 0) + ], AccountingAdminController.prototype, "resolveIssue", null); + __decorate4([ + (0, common_12.Get)("links"), + __param3(0, (0, common_12.Query)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object]), + __metadata3("design:returntype", void 0) + ], AccountingAdminController.prototype, "links", null); + __decorate4([ + (0, common_12.Post)("links"), + (0, common_12.HttpCode)(200), + __param3(0, (0, common_12.Body)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object]), + __metadata3("design:returntype", void 0) + ], AccountingAdminController.prototype, "link", null); + __decorate4([ + (0, common_12.Delete)("links/:id"), + __param3(0, (0, common_12.Param)("id")), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [String]), + __metadata3("design:returntype", void 0) + ], AccountingAdminController.prototype, "unlink", null); + __decorate4([ + (0, common_12.Get)("customers/:id"), + __param3(0, (0, common_12.Param)("id")), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [String]), + __metadata3("design:returntype", void 0) + ], AccountingAdminController.prototype, "customer", null); + __decorate4([ + (0, common_12.Get)("products/status"), + __param3(0, (0, common_12.Query)("ids")), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [String]), + __metadata3("design:returntype", void 0) + ], AccountingAdminController.prototype, "productsStatus", null); + __decorate4([ + (0, common_12.Get)("movement"), + __param3(0, (0, common_12.Query)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object]), + __metadata3("design:returntype", void 0) + ], AccountingAdminController.prototype, "movement", null); + exports2.AccountingAdminController = AccountingAdminController = __decorate4([ + (0, common_12.Controller)("admin/accounting"), + (0, guards_1.RequirePermission)("config.accounting"), + __metadata3("design:paramtypes", [accounting_admin_service_1.AccountingAdminService]) + ], AccountingAdminController); + } +}); + +// dist/modules/accounting-sync/accounting-quick.controller.js +var require_accounting_quick_controller = __commonJS({ + "dist/modules/accounting-sync/accounting-quick.controller.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param3 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountingQuickController = void 0; + var common_12 = require_common(); + var customer_guards_1 = require_customer_guards(); + var guards_1 = require_guards2(); + var accounting_admin_service_1 = require_accounting_admin_service(); + var accounting_sync_service_1 = require_accounting_sync_service(); + var AccountingQuickController = class AccountingQuickController { + admin; + sync; + constructor(admin, sync) { + this.admin = admin; + this.sync = sync; + } + /** Whether to show the sync buttons. Any signed-in admin; reveals no settings. */ + status() { + return this.admin.connectionStatus(); + } + syncCustomers() { + return this.admin.syncNow(["customers", "balances"]); + } + syncProducts() { + return this.admin.syncNow(["products"]); + } + /** The app's profile: this customer's balance, read from the software now. */ + myBalance(me) { + return this.sync.customerBalanceLive(me.id); + } + }; + exports2.AccountingQuickController = AccountingQuickController; + __decorate4([ + (0, common_12.Get)("admin/accounting-status"), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", []), + __metadata3("design:returntype", void 0) + ], AccountingQuickController.prototype, "status", null); + __decorate4([ + (0, common_12.Post)("admin/customers-omde/accounting-sync"), + (0, common_12.HttpCode)(200), + (0, guards_1.RequirePermission)("persons.list.client.omde"), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", []), + __metadata3("design:returntype", void 0) + ], AccountingQuickController.prototype, "syncCustomers", null); + __decorate4([ + (0, common_12.Post)("admin/products/accounting-sync"), + (0, common_12.HttpCode)(200), + (0, guards_1.RequirePermission)("product.list"), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", []), + __metadata3("design:returntype", void 0) + ], AccountingQuickController.prototype, "syncProducts", null); + __decorate4([ + (0, customer_guards_1.CustomerAuth)(), + (0, common_12.Get)("customer/me/accounting-balance"), + __param3(0, (0, customer_guards_1.CurrentCustomer)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object]), + __metadata3("design:returntype", void 0) + ], AccountingQuickController.prototype, "myBalance", null); + exports2.AccountingQuickController = AccountingQuickController = __decorate4([ + (0, common_12.Controller)(), + __metadata3("design:paramtypes", [ + accounting_admin_service_1.AccountingAdminService, + accounting_sync_service_1.AccountingSyncService + ]) + ], AccountingQuickController); + } +}); + +// dist/modules/accounting-sync/accounting-sync.module.js +var require_accounting_sync_module = __commonJS({ + "dist/modules/accounting-sync/accounting-sync.module.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AccountingSyncModule = void 0; + var common_12 = require_common(); + var accounting_admin_controller_1 = require_accounting_admin_controller(); + var accounting_admin_service_1 = require_accounting_admin_service(); + var accounting_config_service_1 = require_accounting_config_service(); + var accounting_hooks_service_1 = require_accounting_hooks_service(); + var accounting_quick_controller_1 = require_accounting_quick_controller(); + var accounting_sync_service_1 = require_accounting_sync_service(); + var accounting_worker_service_1 = require_accounting_worker_service(); + var AccountingSyncModule = class AccountingSyncModule { + }; + exports2.AccountingSyncModule = AccountingSyncModule; + exports2.AccountingSyncModule = AccountingSyncModule = __decorate4([ + (0, common_12.Global)(), + (0, common_12.Module)({ + controllers: [accounting_admin_controller_1.AccountingAdminController, accounting_quick_controller_1.AccountingQuickController], + providers: [ + accounting_config_service_1.AccountingConfigService, + accounting_hooks_service_1.AccountingHooksService, + accounting_sync_service_1.AccountingSyncService, + accounting_worker_service_1.AccountingWorkerService, + accounting_admin_service_1.AccountingAdminService + ], + exports: [accounting_config_service_1.AccountingConfigService, accounting_hooks_service_1.AccountingHooksService, accounting_sync_service_1.AccountingSyncService] + }) + ], AccountingSyncModule); + } +}); + +// dist/modules/sessions/admin-session.service.js +var require_admin_session_service = __commonJS({ + "dist/modules/sessions/admin-session.service.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var AdminSessionService_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AdminSessionService = void 0; + var common_12 = require_common(); + var node_crypto_1 = require("node:crypto"); + var prisma_service_1 = require_prisma_service(); + var env_12 = require_env(); + var iam_service_1 = require_iam_service(); + var AdminSessionService = AdminSessionService_1 = class AdminSessionService { + prisma; + iam; + logger = new common_12.Logger(AdminSessionService_1.name); + constructor(prisma, iam) { + this.prisma = prisma; + this.iam = iam; + } + get enabled() { + if ((0, env_12.envOr)("AUTH_SESSION_TRACKING", "").toLowerCase() === "true") + return true; + if ((0, env_12.envOr)("AUTH_SESSION_TRACKING", "").toLowerCase() === "false") + return false; + return this.iam.enabled; + } + /** A fresh `jti` for a token about to be signed, or null while tracking is off. */ + newTokenId() { + return this.enabled ? (0, node_crypto_1.randomUUID)() : null; + } + /** + * Record an issued token. A failure here must not break login, so it is logged + * and swallowed: the worst case is a session that cannot be revoked early, + * which is exactly the behaviour before this table existed. + */ + async record(input) { + if (!this.enabled) + return; + try { + await this.prisma.adminSession.create({ + data: { + jti: input.jti, + adminUserId: input.adminUserId, + iamSessionId: input.iamSessionId ?? null, + iamSub: input.iamSub ?? null, + ipAddress: input.ipAddress ?? null, + userAgent: input.userAgent ?? null, + expiresAt: this.tokenExpiry() + } + }); + } catch (error) { + this.logger.warn(`could not record the admin session: ${error.message}`); + } + } + /** + * Is this token still usable? Called on every authenticated request. + * + * A token signed before tracking was switched on carries no `jti`; it stays + * valid until it expires, so enabling the feature does not sign everyone out. + */ + async isActive(jti) { + if (!this.enabled || !jti) + return true; + const session = await this.prisma.adminSession.findUnique({ + where: { jti }, + select: { revokedAt: true } + }); + return session !== null && session.revokedAt === null; + } + /** Revoke by the IAM's session id (`sid` in a back-channel logout token). */ + async revokeByIamSession(iamSessionId, reason = "iam_backchannel_logout") { + return this.revokeWhere({ iamSessionId }, reason); + } + /** Revoke every session of an IAM identity (a logout token carrying only `sub`). */ + async revokeByIamSubject(iamSub, reason = "iam_backchannel_logout") { + return this.revokeWhere({ iamSub }, reason); + } + /** Revoke every session of a local admin (account disabled, password changed). */ + async revokeAllForAdmin(adminUserId, reason = "revoked") { + return this.revokeWhere({ adminUserId }, reason); + } + async revokeWhere(where, reason) { + if (!this.enabled) + return 0; + const result = await this.prisma.adminSession.updateMany({ + where: { ...where, revokedAt: null }, + data: { revokedAt: /* @__PURE__ */ new Date(), revokedReason: reason } + }); + return result.count; + } + /** + * When the recorded token expires, mirroring JWT_EXPIRES_IN so old rows can be + * pruned. Only `h` / `m` / `d` / `s` are understood — anything else + * leaves the column null rather than guessing. + */ + tokenExpiry() { + const raw = (0, env_12.envOr)("JWT_EXPIRES_IN", "12h"); + const match = /^(\d+)\s*([smhd])$/.exec(raw); + if (!match) + return null; + const seconds = Number(match[1]) * { s: 1, m: 60, h: 3600, d: 86400 }[match[2]]; + return new Date(Date.now() + seconds * 1e3); + } + }; + exports2.AdminSessionService = AdminSessionService; + exports2.AdminSessionService = AdminSessionService = AdminSessionService_1 = __decorate4([ + (0, common_12.Injectable)(), + __metadata3("design:paramtypes", [ + prisma_service_1.PrismaService, + iam_service_1.IamService + ]) + ], AdminSessionService); + } +}); + +// dist/modules/auth/auth.service.js +var require_auth_service = __commonJS({ + "dist/modules/auth/auth.service.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var AuthService_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AuthService = exports2.OTP_ONLY_PASSWORD_HASH = exports2.compareLocalHash = void 0; + var node_crypto_1 = require("node:crypto"); + var common_12 = require_common(); + var jwt_1 = (init_dist(), __toCommonJS(dist_exports)); + var prisma_service_1 = require_prisma_service(); + var iam_service_1 = require_iam_service(); + var admin_session_service_1 = require_admin_session_service(); + var env_12 = require_env(); + var password_hash_1 = require_password_hash(); + var password_hash_2 = require_password_hash(); + Object.defineProperty(exports2, "compareLocalHash", { enumerable: true, get: function() { + return password_hash_2.compareLocalHash; + } }); + Object.defineProperty(exports2, "OTP_ONLY_PASSWORD_HASH", { enumerable: true, get: function() { + return password_hash_2.OTP_ONLY_PASSWORD_HASH; + } }); + var AuthService = AuthService_1 = class AuthService { + prisma; + jwt; + iam; + sessions; + logger = new common_12.Logger(AuthService_1.name); + constructor(prisma, jwt, iam, sessions) { + this.prisma = prisma; + this.jwt = jwt; + this.iam = iam; + this.sessions = sessions; + } + /** + * Port of legacy AdminController::login (henza_server). + * + * Legacy issued a random 60-char string as `api_token` and persisted it on the + * user row; this issues a signed JWT instead. The response keeps the legacy + * shape the admin panel's auth store reads: + * - `api_token` -> stored in localStorage under token/branch_token + * - `roles` -> [{ rid }], mapped to rids by the frontend then expanded + * through checkParent() + * + * Deliberate deviation from legacy: a bad phone and a bad password both return + * 401 here. Legacy returned 404 (firstOrFail) for an unknown phone and 422 for + * a wrong password, which let anyone enumerate valid admin phone numbers. + */ + async login(dto, clientIp, userAgent) { + const user = await this.prisma.adminUser.findUnique({ + where: { mobile: dto.phone }, + include: { userType: { include: { permissions: true } } } + }); + if (!user || !user.isActive) { + throw new common_12.UnauthorizedException("\u0646\u0627\u0645 \u06A9\u0627\u0631\u0628\u0631\u06CC \u06CC\u0627 \u0631\u0645\u0632 \u0639\u0628\u0648\u0631 \u0627\u0634\u062A\u0628\u0627\u0647 \u0627\u0633\u062A"); + } + const verified = await this.verifyPassword(dto, user.passwordHash, clientIp); + if (!verified.ok) { + throw new common_12.UnauthorizedException("\u0646\u0627\u0645 \u06A9\u0627\u0631\u0628\u0631\u06CC \u06CC\u0627 \u0631\u0645\u0632 \u0639\u0628\u0648\u0631 \u0627\u0634\u062A\u0628\u0627\u0647 \u0627\u0633\u062A"); + } + const jti = this.sessions.newTokenId(); + const apiToken = await this.jwt.signAsync({ + sub: user.id, + mobile: user.mobile, + ...jti ? { jti } : {} + }); + if (jti) { + await this.sessions.record({ + jti, + adminUserId: user.id, + iamSessionId: verified.identity?.sessionId ?? null, + iamSub: verified.identity?.sub ?? null, + ipAddress: clientIp ?? null, + userAgent: userAgent ?? null + }); + } + const bootstrap2 = this.iam.browserBootstrapUrl(verified.identity?.browserTicket); + return { + id: user.id, + name: user.fullName, + fullName: user.fullName, + mobile: user.mobile, + role: user.role, + ut: user.userTypeId, + branch_id: user.branchId, + api_token: apiToken, + roles: (user.userType?.permissions ?? []).map((p) => ({ rid: p.rid })), + ...bootstrap2 ? { iamBootstrapUrl: bootstrap2 } : {} + }; + } + beginBrowserSso(requestedRedirect) { + if (!this.iam.enabled) + return null; + const redirectUri = (0, env_12.pickExactUri)(requestedRedirect, [ + (0, env_12.envOrNull)("IAM_ADMIN_REDIRECT_URI"), + ...(0, env_12.envList)("IAM_ADMIN_REDIRECT_URIS") + ]); + const clientId = (0, env_12.envOrNull)("IAM_CLIENT_ID"); + if (!redirectUri || !clientId) + return null; + const state = (0, node_crypto_1.randomBytes)(24).toString("base64url"); + const nonce = (0, node_crypto_1.randomBytes)(24).toString("base64url"); + const verifier = (0, node_crypto_1.randomBytes)(48).toString("base64url"); + const challenge = (0, node_crypto_1.createHash)("sha256").update(verifier).digest("base64url"); + const payload = Buffer.from(JSON.stringify({ state, nonce, verifier, redirectUri })).toString("base64url"); + const sig = (0, node_crypto_1.createHmac)("sha256", this.ssoSecret()).update(payload).digest("base64url"); + const secure = redirectUri.startsWith("https:"); + const cookie = `gb_admin_iam_sso=${payload}.${sig}; HttpOnly; Path=/; Max-Age=180; SameSite=Lax` + (secure ? "; Secure" : ""); + const url = new URL(`${this.iam.issuer}/oauth/authorize`); + url.searchParams.set("response_type", "code"); + url.searchParams.set("client_id", clientId); + url.searchParams.set("redirect_uri", redirectUri); + url.searchParams.set("scope", "openid profile email"); + url.searchParams.set("state", state); + url.searchParams.set("nonce", nonce); + url.searchParams.set("code_challenge", challenge); + url.searchParams.set("code_challenge_method", "S256"); + url.searchParams.set("prompt", "none"); + return { authorizeUrl: url.toString(), cookie }; + } + async completeBrowserSso(cookieValue, code, state, ip, userAgent) { + const pending = this.readSsoCookie(cookieValue); + if (!pending || pending.state !== state) { + throw new common_12.UnauthorizedException("\u062F\u0631\u062E\u0648\u0627\u0633\u062A \u0648\u0631\u0648\u062F \u0645\u0634\u062A\u0631\u06A9 \u0645\u0639\u062A\u0628\u0631 \u0646\u06CC\u0633\u062A"); + } + const claims = await this.iam.exchangeAuthorizationCode(code, pending.verifier, pending.redirectUri); + if (!claims.phoneNumber) { + throw new common_12.UnauthorizedException("\u0647\u0648\u06CC\u062A \u0645\u0634\u062A\u0631\u06A9 \u0634\u0645\u0627\u0631\u0647 \u0645\u0648\u0628\u0627\u06CC\u0644 \u0646\u062F\u0627\u0631\u062F"); + } + const user = await this.prisma.adminUser.findFirst({ + where: { mobile: { in: mobileVariants(claims.phoneNumber) }, isActive: true }, + include: { userType: { include: { permissions: true } } } + }); + if (!user) { + throw new common_12.UnauthorizedException("\u062D\u0633\u0627\u0628 \u0645\u062F\u06CC\u0631\u06CC \u0628\u0627 \u0627\u06CC\u0646 \u0634\u0645\u0627\u0631\u0647 \u062F\u0631 \u0627\u06CC\u0646 \u0633\u0627\u0645\u0627\u0646\u0647 \u0646\u06CC\u0633\u062A"); + } + const identity = { + sub: claims.sub, + email: null, + phoneNumber: claims.phoneNumber, + firstName: null, + lastName: null, + sessionId: claims.sessionId, + browserTicket: null + }; + return this.issueAdminToken(user, identity, ip, userAgent); + } + centralLogoutUrl(requestedReturn) { + if (!this.iam.enabled) + return null; + const redirect = (0, env_12.pickExactUri)(requestedReturn, [ + (0, env_12.envOrNull)("IAM_ADMIN_POST_LOGOUT_REDIRECT_URI"), + (0, env_12.envOrNull)("IAM_ADMIN_BROWSER_RETURN_URL"), + ...(0, env_12.envList)("IAM_ADMIN_ALLOWED_RETURN_URLS") + ]); + const clientId = (0, env_12.envOrNull)("IAM_CLIENT_ID"); + if (!redirect || !clientId) + return null; + const url = new URL(`${this.iam.issuer}/oauth/logout`); + url.searchParams.set("client_id", clientId); + url.searchParams.set("post_logout_redirect_uri", redirect); + return url.toString(); + } + async issueAdminToken(user, identity, ip, userAgent) { + const jti = this.sessions.newTokenId(); + const apiToken = await this.jwt.signAsync({ + sub: user.id, + mobile: user.mobile, + ...jti ? { jti } : {} + }); + if (jti) { + await this.sessions.record({ + jti, + adminUserId: user.id, + iamSessionId: identity?.sessionId ?? null, + iamSub: identity?.sub ?? null, + ipAddress: ip ?? null, + userAgent: userAgent ?? null + }); + } + return { + id: user.id, + name: user.fullName, + fullName: user.fullName, + mobile: user.mobile, + role: user.role, + ut: user.userTypeId, + branch_id: user.branchId, + api_token: apiToken, + roles: (user.userType?.permissions ?? []).map((p) => ({ rid: p.rid })) + }; + } + ssoSecret() { + return (0, env_12.envOrNull)("JWT_SECRET") || (0, env_12.envOr)("IAM_CLIENT_SECRET", "iam-sso"); + } + readSsoCookie(value) { + if (!value || !value.includes(".")) + return null; + const split = value.lastIndexOf("."); + const payload = value.slice(0, split); + const sig = value.slice(split + 1); + const expected = (0, node_crypto_1.createHmac)("sha256", this.ssoSecret()).update(payload).digest("base64url"); + if (expected.length !== sig.length) + return null; + let same = 0; + for (let i = 0; i < expected.length; i++) + same |= expected.charCodeAt(i) ^ sig.charCodeAt(i); + if (same !== 0) + return null; + try { + return JSON.parse(Buffer.from(payload, "base64url").toString("utf8")); + } catch { + return null; + } + } + /** + * Password check, optionally delegated to the central identity service. + * + * With `IAM_ENABLED=false` (the default) this is exactly the previous + * behaviour: a single bcrypt compare. With it on, the identity service is + * asked first and the local hash is only consulted when that check could not + * give a definite answer — so an IAM outage never blocks admin login. + */ + async verifyPassword(dto, passwordHash, clientIp) { + if (!this.iam.enabled) { + return { ok: await (0, password_hash_1.compareLocalHash)(dto.password, passwordHash) }; + } + try { + const identity = await this.iam.verifyCredentials(dto.phone, dto.password, clientIp); + return { ok: true, identity }; + } catch (error) { + if (error instanceof iam_service_1.IamMfaRequiredError) { + throw new common_12.UnauthorizedException("\u0628\u0631\u0627\u06CC \u0627\u06CC\u0646 \u062D\u0633\u0627\u0628 \u0627\u062D\u0631\u0627\u0632 \u0647\u0648\u06CC\u062A \u062F\u0648 \u0645\u0631\u062D\u0644\u0647\u200C\u0627\u06CC \u0641\u0639\u0627\u0644 \u0627\u0633\u062A \u0648 \u0627\u0632 \u0627\u06CC\u0646 \u0645\u0633\u06CC\u0631 \u0642\u0627\u0628\u0644 \u062A\u06A9\u0645\u06CC\u0644 \u0646\u06CC\u0633\u062A"); + } + if (error instanceof iam_service_1.IamInvalidCredentialsError && !this.iam.allowsLocalFallback) { + return { ok: false }; + } + if (!(error instanceof iam_service_1.IamInvalidCredentialsError)) { + this.logger.warn(`falling back to the local password check: ${error.message}`); + if (!this.iam.allowsLocalFallback) { + throw new common_12.UnauthorizedException("\u0648\u0631\u0648\u062F \u062F\u0631 \u062D\u0627\u0644 \u062D\u0627\u0636\u0631 \u0645\u0645\u06A9\u0646 \u0646\u06CC\u0633\u062A\u061B \u0633\u0631\u0648\u06CC\u0633 \u0647\u0648\u06CC\u062A \u062F\u0631 \u062F\u0633\u062A\u0631\u0633 \u0646\u06CC\u0633\u062A"); + } + } + return { ok: await (0, password_hash_1.compareLocalHash)(dto.password, passwordHash) }; + } + } + /** + * Port of legacy UserController::showData, which the router guard calls on every + * cold load to refresh the permission list: + * + * $user['permission'] = Permission::where('ut',$user->ut)->select('rid')->get()->pluck('rid'); + * + * Returns raw (unexpanded) rids — the frontend runs checkParent() on them, as in + * legacy. The guard's own checks use the pre-expanded list from JwtStrategy. + */ + async showData(adminId) { + const user = await this.prisma.adminUser.findUnique({ + where: { id: adminId }, + include: { userType: { include: { permissions: true } } } + }); + if (!user) { + throw new common_12.UnauthorizedException(); + } + return { + id: user.id, + name: user.fullName, + fullName: user.fullName, + mobile: user.mobile, + role: user.role, + ut: user.userTypeId, + branch_id: user.branchId, + user_type: user.userType ? { id: user.userType.id, title: user.userType.title } : null, + permission: (user.userType?.permissions ?? []).map((p) => p.rid) + }; + } + }; + exports2.AuthService = AuthService; + exports2.AuthService = AuthService = AuthService_1 = __decorate4([ + (0, common_12.Injectable)(), + __metadata3("design:paramtypes", [ + prisma_service_1.PrismaService, + jwt_1.JwtService, + iam_service_1.IamService, + admin_session_service_1.AdminSessionService + ]) + ], AuthService); + function mobileVariants(raw) { + const digits = raw.replace(/\D/g, ""); + const variants = /* @__PURE__ */ new Set([raw.trim(), digits]); + if (digits.startsWith("98") && digits.length >= 12) + variants.add(`0${digits.slice(2)}`); + if (digits.startsWith("0") && digits.length === 11) + variants.add(`98${digits.slice(1)}`); + return [...variants].filter((value) => value !== ""); + } + } +}); + +// dist/modules/auth/dto/login.dto.js +var require_login_dto = __commonJS({ + "dist/modules/auth/dto/login.dto.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.LoginDto = void 0; + var class_validator_1 = require_cjs(); + var LoginDto = class { + phone; + password; + }; + exports2.LoginDto = LoginDto; + __decorate4([ + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsNotEmpty)(), + __metadata3("design:type", String) + ], LoginDto.prototype, "phone", void 0); + __decorate4([ + (0, class_validator_1.IsString)(), + (0, class_validator_1.IsNotEmpty)(), + __metadata3("design:type", String) + ], LoginDto.prototype, "password", void 0); + } +}); + +// dist/modules/auth/auth.controller.js +var require_auth_controller = __commonJS({ + "dist/modules/auth/auth.controller.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param3 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AuthController = void 0; + var common_12 = require_common(); + var auth_service_1 = require_auth_service(); + var login_dto_1 = require_login_dto(); + var guards_1 = require_guards2(); + var AuthController = class AuthController { + authService; + constructor(authService) { + this.authService = authService; + } + login(dto, ip, userAgent) { + return this.authService.login(dto, ip, userAgent); + } + startSso(redirectUri, res) { + const started = this.authService.beginBrowserSso(redirectUri); + if (!started) + return { enabled: false, authorize_url: null }; + res.setHeader("Set-Cookie", started.cookie); + return { enabled: true, authorize_url: started.authorizeUrl }; + } + ssoCallback(body, cookieHeader, ip, userAgent, res) { + res.setHeader("Set-Cookie", "gb_admin_iam_sso=; HttpOnly; Path=/; Max-Age=0; SameSite=Lax"); + return this.authService.completeBrowserSso(readCookie(cookieHeader, "gb_admin_iam_sso"), body.code ?? "", body.state ?? "", ip, userAgent); + } + ssoLogoutUrl(returnUrl) { + return { logout_url: this.authService.centralLogoutUrl(returnUrl) }; + } + /** Legacy `users/show` — the router guard's permission refresh. */ + me(admin) { + return this.authService.showData(admin.id); + } + }; + exports2.AuthController = AuthController; + __decorate4([ + (0, guards_1.Public)(), + (0, common_12.Post)("login"), + (0, common_12.HttpCode)(200), + __param3(0, (0, common_12.Body)()), + __param3(1, (0, common_12.Ip)()), + __param3(2, (0, common_12.Headers)("user-agent")), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [login_dto_1.LoginDto, String, String]), + __metadata3("design:returntype", void 0) + ], AuthController.prototype, "login", null); + __decorate4([ + (0, guards_1.Public)(), + (0, common_12.Get)("sso/start"), + __param3(0, (0, common_12.Query)("redirect_uri")), + __param3(1, (0, common_12.Res)({ passthrough: true })), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object, Object]), + __metadata3("design:returntype", void 0) + ], AuthController.prototype, "startSso", null); + __decorate4([ + (0, guards_1.Public)(), + (0, common_12.Post)("sso/callback"), + (0, common_12.HttpCode)(200), + __param3(0, (0, common_12.Body)()), + __param3(1, (0, common_12.Headers)("cookie")), + __param3(2, (0, common_12.Ip)()), + __param3(3, (0, common_12.Headers)("user-agent")), + __param3(4, (0, common_12.Res)({ passthrough: true })), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object, Object, String, Object, Object]), + __metadata3("design:returntype", void 0) + ], AuthController.prototype, "ssoCallback", null); + __decorate4([ + (0, guards_1.Public)(), + (0, common_12.Get)("sso/logout-url"), + __param3(0, (0, common_12.Query)("return_url")), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [String]), + __metadata3("design:returntype", void 0) + ], AuthController.prototype, "ssoLogoutUrl", null); + __decorate4([ + (0, common_12.Get)("me"), + __param3(0, (0, guards_1.CurrentAdmin)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object]), + __metadata3("design:returntype", void 0) + ], AuthController.prototype, "me", null); + exports2.AuthController = AuthController = __decorate4([ + (0, common_12.Controller)("admin/auth"), + __metadata3("design:paramtypes", [auth_service_1.AuthService]) + ], AuthController); + function readCookie(header, name) { + if (!header) + return null; + for (const part of header.split(";")) { + const [key, ...rest] = part.trim().split("="); + if (key === name) + return decodeURIComponent(rest.join("=")); + } + return null; + } + } +}); + // dist/modules/auth/acl.constants.js var require_acl_constants = __commonJS({ "dist/modules/auth/acl.constants.js"(exports2) { @@ -84964,6 +93049,9 @@ var require_acl_constants = __commonJS({ "comment.state", "comment.view", "comment.view.edit", + // D27 — «اتصال حسابداری» (Tahesab / Zarrin). Not a legacy rid. + "config.accounting", + "config.wage", "config.report", "config.statics", "config.statics.brand", @@ -85132,18 +93220,29 @@ var require_jwt_strategy = __commonJS({ var passport_1 = require_passport(); var passport_jwt_1 = require_lib8(); var prisma_service_1 = require_prisma_service(); + var env_12 = require_env(); + var admin_session_service_1 = require_admin_session_service(); var acl_constants_1 = require_acl_constants(); + var APP_TOKEN_TYPES = /* @__PURE__ */ new Set(["customer", "sales-expert"]); var JwtStrategy = class JwtStrategy extends (0, passport_1.PassportStrategy)(passport_jwt_1.Strategy, "jwt") { prisma; - constructor(prisma) { + sessions; + constructor(prisma, sessions) { super({ jwtFromRequest: passport_jwt_1.ExtractJwt.fromAuthHeaderAsBearerToken(), ignoreExpiration: false, - secretOrKey: process.env.JWT_SECRET ?? "dev-only-insecure-secret" + secretOrKey: (0, env_12.envOr)("JWT_SECRET", "dev-only-insecure-secret") }); this.prisma = prisma; + this.sessions = sessions; } async validate(payload) { + if (payload?.typ && APP_TOKEN_TYPES.has(payload.typ)) { + throw new common_12.UnauthorizedException(); + } + if (!await this.sessions.isActive(payload.jti)) { + throw new common_12.UnauthorizedException(); + } const user = await this.prisma.adminUser.findUnique({ where: { id: payload.sub }, include: { userType: { include: { permissions: true } } } @@ -85166,7 +93265,10 @@ var require_jwt_strategy = __commonJS({ exports2.JwtStrategy = JwtStrategy; exports2.JwtStrategy = JwtStrategy = __decorate4([ (0, common_12.Injectable)(), - __metadata3("design:paramtypes", [prisma_service_1.PrismaService]) + __metadata3("design:paramtypes", [ + prisma_service_1.PrismaService, + admin_session_service_1.AdminSessionService + ]) ], JwtStrategy); } }); @@ -85188,6 +93290,7 @@ var require_auth_module = __commonJS({ var jwt_1 = (init_dist(), __toCommonJS(dist_exports)); var passport_1 = require_passport(); var prisma_module_1 = require_prisma_module(); + var env_12 = require_env(); var auth_controller_1 = require_auth_controller(); var auth_service_1 = require_auth_service(); var jwt_strategy_1 = require_jwt_strategy(); @@ -85201,11 +93304,15 @@ var require_auth_module = __commonJS({ prisma_module_1.PrismaModule, passport_1.PassportModule, jwt_1.JwtModule.register({ - secret: process.env.JWT_SECRET ?? "dev-only-insecure-secret", + // envOr, not `??`: docker-compose passes every optional variable as + // `${X:-}`, so an unconfigured one arrives as "" rather than undefined. + // An empty expiresIn makes jsonwebtoken throw on EVERY sign, which 500s + // admin login in Docker only. See DEPLOY-02. + secret: (0, env_12.envOr)("JWT_SECRET", "dev-only-insecure-secret"), // jsonwebtoken types expiresIn as a template-literal union, which a plain // `string` from process.env does not satisfy; the cast is the documented escape. signOptions: { - expiresIn: process.env.JWT_EXPIRES_IN ?? "12h" + expiresIn: (0, env_12.envOr)("JWT_EXPIRES_IN", "12h") } }) ], @@ -85223,6 +93330,302 @@ var require_auth_module = __commonJS({ } }); +// dist/modules/iam/iam-logout.service.js +var require_iam_logout_service = __commonJS({ + "dist/modules/iam/iam-logout.service.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var IamLogoutService_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IamLogoutService = exports2.IamLogoutTokenError = void 0; + var common_12 = require_common(); + var node_crypto_1 = require("node:crypto"); + var iam_service_1 = require_iam_service(); + var IamLogoutTokenError = class extends Error { + }; + exports2.IamLogoutTokenError = IamLogoutTokenError; + var BACKCHANNEL_LOGOUT_EVENT = "http://schemas.openid.net/event/backchannel-logout"; + var IamLogoutService = IamLogoutService_1 = class IamLogoutService { + iam; + logger = new common_12.Logger(IamLogoutService_1.name); + /** kid -> public key, plus when the set was fetched. */ + keys = /* @__PURE__ */ new Map(); + keysFetchedAt = 0; + constructor(iam) { + this.iam = iam; + } + /** Seconds of clock skew tolerated on `iat`/`exp`. */ + get leeway() { + return 60; + } + async verify(logoutToken) { + const parts = logoutToken.split("."); + if (parts.length !== 3) + throw new IamLogoutTokenError("logout token is malformed"); + const [rawHeader, rawPayload, rawSignature] = parts; + const header = this.decodeJson(rawHeader, "header"); + const payload = this.decodeJson(rawPayload, "payload"); + if (header.alg !== "RS256") { + throw new IamLogoutTokenError(`unsupported logout token algorithm: ${String(header.alg)}`); + } + const key = await this.publicKey(typeof header.kid === "string" ? header.kid : null); + const verifier = (0, node_crypto_1.createVerify)("RSA-SHA256"); + verifier.update(`${rawHeader}.${rawPayload}`); + if (!verifier.verify(key, Buffer.from(rawSignature, "base64url"))) { + throw new IamLogoutTokenError("logout token signature does not verify"); + } + this.assertClaims(payload); + const sessionId = typeof payload.sid === "string" && payload.sid !== "" ? payload.sid : null; + const subject = typeof payload.sub === "string" && payload.sub !== "" ? payload.sub : null; + if (!sessionId && !subject) { + throw new IamLogoutTokenError("logout token names neither a session nor a subject"); + } + return { sessionId, subject }; + } + assertClaims(payload) { + if (payload.iss !== this.iam.issuer) { + throw new IamLogoutTokenError("logout token was issued by another identity service"); + } + const audiences = Array.isArray(payload.aud) ? payload.aud : [payload.aud]; + if (!audiences.includes(this.iam.clientId)) { + throw new IamLogoutTokenError("logout token is not addressed to this client"); + } + const events = payload.events; + if (!events || typeof events !== "object" || !(BACKCHANNEL_LOGOUT_EVENT in events)) { + throw new IamLogoutTokenError("logout token does not carry the back-channel logout event"); + } + if ("nonce" in payload) { + throw new IamLogoutTokenError("a logout token must not carry a nonce"); + } + const now = Math.floor(Date.now() / 1e3); + if (typeof payload.exp === "number" && payload.exp + this.leeway < now) { + throw new IamLogoutTokenError("logout token has expired"); + } + if (typeof payload.iat === "number" && payload.iat - this.leeway > now) { + throw new IamLogoutTokenError("logout token is not valid yet"); + } + } + /** + * The signing key for this `kid`. An unknown kid triggers one refetch, so a key + * rotation at the IAM takes effect without restarting this service. + */ + async publicKey(kid) { + const cacheAgeSeconds = (Date.now() - this.keysFetchedAt) / 1e3; + const stale = cacheAgeSeconds > 24 * 3600; + const cached = kid ? this.keys.get(kid) : [...this.keys.values()][0]; + if (cached && !stale) + return cached; + await this.loadKeys(); + const key = kid ? this.keys.get(kid) : [...this.keys.values()][0]; + if (!key) + throw new IamLogoutTokenError("no matching signing key at the identity service"); + return key; + } + async loadKeys() { + let response; + try { + response = await fetch(`${this.iam.issuer}/.well-known/jwks.json`, { + headers: { accept: "application/json" } + }); + } catch (error) { + throw new iam_service_1.IamUnavailableError(`could not reach the identity service: ${error.message}`); + } + if (!response.ok) { + throw new iam_service_1.IamUnavailableError(`the identity service returned ${response.status} for its keys`); + } + const body = await response.json(); + const keys = /* @__PURE__ */ new Map(); + for (const jwk of body.keys ?? []) { + if (jwk.kty !== "RSA" || typeof jwk.kid !== "string") + continue; + try { + keys.set(jwk.kid, (0, node_crypto_1.createPublicKey)({ key: jwk, format: "jwk" })); + } catch (error) { + this.logger.warn(`skipping an unusable key from the identity service: ${error.message}`); + } + } + if (keys.size === 0) + throw new iam_service_1.IamUnavailableError("the identity service published no usable keys"); + this.keys = keys; + this.keysFetchedAt = Date.now(); + } + decodeJson(segment, what) { + try { + return JSON.parse(Buffer.from(segment, "base64url").toString("utf8")); + } catch { + throw new IamLogoutTokenError(`logout token ${what} is not readable`); + } + } + }; + exports2.IamLogoutService = IamLogoutService; + exports2.IamLogoutService = IamLogoutService = IamLogoutService_1 = __decorate4([ + (0, common_12.Injectable)(), + __metadata3("design:paramtypes", [iam_service_1.IamService]) + ], IamLogoutService); + } +}); + +// dist/modules/iam/iam.controller.js +var require_iam_controller = __commonJS({ + "dist/modules/iam/iam.controller.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param3 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + var IamController_1; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IamController = void 0; + var common_12 = require_common(); + var guards_1 = require_guards2(); + var admin_session_service_1 = require_admin_session_service(); + var app_session_service_1 = require_app_session_service(); + var iam_logout_service_1 = require_iam_logout_service(); + var iam_service_1 = require_iam_service(); + var IamController = IamController_1 = class IamController { + iam; + logout; + sessions; + appSessions; + logger = new common_12.Logger(IamController_1.name); + constructor(iam, logout, sessions, appSessions) { + this.iam = iam; + this.logout = logout; + this.sessions = sessions; + this.appSessions = appSessions; + } + async backchannelLogout(body) { + if (!this.iam.enabled) { + return { status: "ignored" }; + } + const token = typeof body?.logout_token === "string" ? body.logout_token : ""; + if (!token) { + this.logger.warn("back-channel logout called without a logout token"); + return { status: "ignored" }; + } + try { + const { sessionId, subject } = await this.logout.verify(token); + const [admin, app] = sessionId ? await Promise.all([ + this.sessions.revokeByIamSession(sessionId), + this.appSessions.revokeByIamSession(sessionId) + ]) : await Promise.all([ + this.sessions.revokeByIamSubject(subject), + this.appSessions.revokeByIamSubject(subject) + ]); + const revoked = admin + app; + this.logger.log(`back-channel logout accepted (${sessionId ? `sid=${sessionId}` : `sub=${subject}`}): ${admin} admin + ${app} app session(s) revoked`); + return { status: "ok", revoked }; + } catch (error) { + const detail = error.message; + if (error instanceof iam_logout_service_1.IamLogoutTokenError) { + this.logger.warn(`rejected a back-channel logout token: ${detail}`); + } else { + this.logger.error(`back-channel logout could not be processed: ${detail}`); + } + return { status: "ignored" }; + } + } + }; + exports2.IamController = IamController; + __decorate4([ + (0, guards_1.Public)(), + (0, common_12.Post)("backchannel-logout"), + (0, common_12.HttpCode)(200), + __param3(0, (0, common_12.Body)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object]), + __metadata3("design:returntype", Promise) + ], IamController.prototype, "backchannelLogout", null); + exports2.IamController = IamController = IamController_1 = __decorate4([ + (0, common_12.Controller)("iam"), + __metadata3("design:paramtypes", [ + iam_service_1.IamService, + iam_logout_service_1.IamLogoutService, + admin_session_service_1.AdminSessionService, + app_session_service_1.AppSessionService + ]) + ], IamController); + } +}); + +// dist/modules/iam/iam.module.js +var require_iam_module = __commonJS({ + "dist/modules/iam/iam.module.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.IamModule = void 0; + var common_12 = require_common(); + var iam_controller_1 = require_iam_controller(); + var iam_logout_service_1 = require_iam_logout_service(); + var iam_service_1 = require_iam_service(); + var IamModule = class IamModule { + }; + exports2.IamModule = IamModule; + exports2.IamModule = IamModule = __decorate4([ + (0, common_12.Global)(), + (0, common_12.Module)({ + controllers: [iam_controller_1.IamController], + providers: [iam_service_1.IamService, iam_logout_service_1.IamLogoutService], + exports: [iam_service_1.IamService, iam_logout_service_1.IamLogoutService] + }) + ], IamModule); + } +}); + +// dist/modules/sessions/admin-session.module.js +var require_admin_session_module = __commonJS({ + "dist/modules/sessions/admin-session.module.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AdminSessionModule = void 0; + var common_12 = require_common(); + var prisma_module_1 = require_prisma_module(); + var admin_session_service_1 = require_admin_session_service(); + var app_session_service_1 = require_app_session_service(); + var AdminSessionModule = class AdminSessionModule { + }; + exports2.AdminSessionModule = AdminSessionModule; + exports2.AdminSessionModule = AdminSessionModule = __decorate4([ + (0, common_12.Global)(), + (0, common_12.Module)({ + imports: [prisma_module_1.PrismaModule], + providers: [admin_session_service_1.AdminSessionService, app_session_service_1.AppSessionService], + exports: [admin_session_service_1.AdminSessionService, app_session_service_1.AppSessionService] + }) + ], AdminSessionModule); + } +}); + // dist/modules/admin-table/table.service.js var require_table_service = __commonJS({ "dist/modules/admin-table/table.service.js"(exports2) { @@ -85396,7 +93799,9 @@ var require_admin_orders_service = __commonJS({ var client_1 = require("@prisma/client"); var prisma_service_1 = require_prisma_service(); var table_service_1 = require_table_service(); + var accounting_hooks_service_1 = require_accounting_hooks_service(); var orders_service_1 = require_orders_service(); + var ledger_service_1 = require_ledger_service(); var STATUS_LABELS = { SUSPENDED: "\u0645\u0639\u0644\u0642 (\u0633\u0642\u0641 \u0627\u0639\u062A\u0628\u0627\u0631)", PLACED: "\u062B\u0628\u062A \u0634\u062F\u0647", @@ -85422,10 +93827,14 @@ var require_admin_orders_service = __commonJS({ prisma; table; orders; - constructor(prisma, table, orders) { + accounting; + ledger; + constructor(prisma, table, orders, accounting, ledger) { this.prisma = prisma; this.table = table; this.orders = orders; + this.accounting = accounting; + this.ledger = ledger; } /** Fields the XTable filter bar and sorter may reference. */ static ALLOWED = [ @@ -85502,8 +93911,8 @@ var require_admin_orders_service = __commonJS({ id: o.customer.id, // Legacy split names into fname/lname; the new schema has one fullName. // Both are exposed so ported templates binding either keep working. - fname: o.customer.fullName, - lname: "", + fname: o.customer.firstName ?? o.customer.fullName, + lname: o.customer.lastName ?? "", fullName: o.customer.fullName, phone: o.customer.mobile }, @@ -85580,11 +93989,12 @@ var require_admin_orders_service = __commonJS({ if (order.ledgerEntries.length > 0) { throw new common_12.BadRequestException("\u062D\u0630\u0641 \u0627\u06CC\u0646 \u0633\u0641\u0627\u0631\u0634 \u0645\u0645\u06A9\u0646 \u0646\u06CC\u0633\u062A\u060C \u0686\u0648\u0646 \u0628\u0631\u0627\u06CC \u0622\u0646 \u0633\u0646\u062F \u062D\u0633\u0627\u0628\u062F\u0627\u0631\u06CC \u062B\u0628\u062A \u0634\u062F\u0647 \u0627\u0633\u062A."); } - await this.prisma.$transaction([ - this.prisma.orderStatusEvent.deleteMany({ where: { orderId: id } }), - this.prisma.orderItem.deleteMany({ where: { orderId: id } }), - this.prisma.order.delete({ where: { id } }) - ]); + await this.prisma.$transaction(async (tx) => { + await this.accounting.orderCancelled(tx, id); + await tx.orderStatusEvent.deleteMany({ where: { orderId: id } }); + await tx.orderItem.deleteMany({ where: { orderId: id } }); + await tx.order.delete({ where: { id } }); + }); return { success: true }; } /** Legacy `GET order/:id` detail, including the status timeline. */ @@ -85660,13 +94070,12 @@ var require_admin_orders_service = __commonJS({ }; })); const order = await this.orders.createOrder({ - customerId: payload.customer_id, items, // The admin builder serves the omde (major/*) flow, so orders it creates // belong to the wholesale channel — legacy wrote them to the `orders` // table, which MajorOrderController::index listed. channel: client_1.OrderChannel.WHOLESALE - }); + }, payload.customer_id); const target = this.statusFromLegacyCode(payload.sts); if (target && target !== client_1.OrderStatus.PLACED) { await this.orders.updateStatus(order.id, target, actorAdminUserId, payload.note); @@ -85693,8 +94102,8 @@ var require_admin_orders_service = __commonJS({ * Legacy `POST single/order-sts/edit` — advance or remove a status. * * Setting a status delegates to OrdersService.updateStatus rather than writing - * the row here, because that method also posts the gold debt to the ledger at - * DELIVERED_TO_AGENT. Duplicating the update would silently skip that. + * the row here, because that method also keeps the order's debt in line with its status + * (syncOrderDebt). Duplicating the update would silently skip that. */ async setStatus(dto, actorAdminUserId) { if (dto.remove) { @@ -85705,30 +94114,31 @@ var require_admin_orders_service = __commonJS({ /** * Legacy's `remove: true` branch: drop a recorded status event. * - * Deliberately refuses to remove DELIVERED_TO_AGENT. In legacy, deleting that - * row left the posted debt ledger entries behind, so the customer stayed in - * debt for an order no longer marked delivered. Rather than reproduce a - * data-corrupting path, this rejects and explains — recorded in - * docs/ADMIN-PORT-PLAN.md. + * Any status may be removed, as in legacy (MajorOrderController.php:180-203), + * which stepped `sts` back and then RECOMPUTED the debt (updateRemain). The + * rollback below does the same through syncOrderDebt, so taking an order + * back below «تحویل به نماینده» takes its debt off, and nothing is left + * behind. (This used to be refused, on the belief that legacy left the debt + * in place; legacy recomputed it.) */ async removeStatusEvent(orderId, status) { - if (status === client_1.OrderStatus.DELIVERED_TO_AGENT) { - throw new common_12.BadRequestException("\u062D\u0630\u0641 \u0648\u0636\u0639\u06CC\u062A \xAB\u062A\u062D\u0648\u06CC\u0644 \u0628\u0647 \u0646\u0645\u0627\u06CC\u0646\u062F\u0647\xBB \u0645\u0645\u06A9\u0646 \u0646\u06CC\u0633\u062A\u060C \u0686\u0648\u0646 \u0628\u062F\u0647\u06CC \u0637\u0644\u0627 \u062F\u0631 \u0647\u0645\u06CC\u0646 \u0645\u0631\u062D\u0644\u0647 \u062B\u0628\u062A \u0634\u062F\u0647 \u0627\u0633\u062A."); - } const event = await this.prisma.orderStatusEvent.findFirst({ where: { orderId, toStatus: status }, orderBy: { createdAt: "desc" } }); if (!event) throw new common_12.NotFoundException("\u0648\u0636\u0639\u06CC\u062A \u0645\u0648\u0631\u062F \u0646\u0638\u0631 \u06CC\u0627\u0641\u062A \u0646\u0634\u062F"); - await this.prisma.orderStatusEvent.delete({ where: { id: event.id } }); - const latest = await this.prisma.orderStatusEvent.findFirst({ - where: { orderId }, - orderBy: { createdAt: "desc" } - }); - return this.prisma.order.update({ - where: { id: orderId }, - data: { status: latest?.toStatus ?? client_1.OrderStatus.PLACED } + return this.prisma.$transaction(async (tx) => { + await tx.orderStatusEvent.delete({ where: { id: event.id } }); + const latest = await tx.orderStatusEvent.findFirst({ + where: { orderId }, + orderBy: { createdAt: "desc" } + }); + const rolledBackTo = latest?.toStatus ?? client_1.OrderStatus.PLACED; + const updated = await tx.order.update({ where: { id: orderId }, data: { status: rolledBackTo } }); + await this.ledger.syncOrderDebt(orderId, tx); + await this.accounting.orderStatusReached(tx, orderId, rolledBackTo); + return updated; }); } }; @@ -85738,7 +94148,9 @@ var require_admin_orders_service = __commonJS({ __metadata3("design:paramtypes", [ prisma_service_1.PrismaService, table_service_1.TableService, - orders_service_1.OrdersService + orders_service_1.OrdersService, + accounting_hooks_service_1.AccountingHooksService, + ledger_service_1.LedgerService ]) ], AdminOrdersService); } @@ -86090,6 +94502,7 @@ var require_admin_orders_module = __commonJS({ var common_12 = require_common(); var prisma_module_1 = require_prisma_module(); var orders_module_1 = require_orders_module(); + var accounting_module_1 = require_accounting_module(); var admin_orders_controller_1 = require_admin_orders_controller(); var admin_orders_service_1 = require_admin_orders_service(); var AdminOrdersModule = class AdminOrdersModule { @@ -86097,7 +94510,7 @@ var require_admin_orders_module = __commonJS({ exports2.AdminOrdersModule = AdminOrdersModule; exports2.AdminOrdersModule = AdminOrdersModule = __decorate4([ (0, common_12.Module)({ - imports: [prisma_module_1.PrismaModule, orders_module_1.OrdersModule], + imports: [prisma_module_1.PrismaModule, orders_module_1.OrdersModule, accounting_module_1.AccountingModule], controllers: [admin_orders_controller_1.AdminOrdersController], providers: [admin_orders_service_1.AdminOrdersService] }) @@ -86129,7 +94542,15 @@ var require_admin_cities_controller = __commonJS({ } async list() { const cities = await this.prisma.city.findMany({ orderBy: { name: "asc" } }); - return { rows: cities.map((c) => ({ id: c.id, title: c.name, province: c.province })) }; + return { + rows: cities.map((c) => ({ + id: c.id, + title: c.name, + parent: c.parentId, + percent: c.percent, + percent_aux: c.percentAux + })) + }; } }; exports2.AdminCitiesController = AdminCitiesController; @@ -86269,8 +94690,9 @@ var require_admin_preorders_service = __commonJS({ workshop: p.workshop ? { id: p.workshop.id, name: p.workshop.name } : null, customer: { id: p.customer.id, - fname: p.customer.fullName, - lname: "", + // D0 — real name parts + fname: p.customer.firstName ?? p.customer.fullName, + lname: p.customer.lastName ?? "", name: p.customer.fullName, fullName: p.customer.fullName, mobile: p.customer.mobile @@ -86483,6 +94905,7 @@ var require_admin_branches_service = __commonJS({ var client_1 = require("@prisma/client"); var prisma_service_1 = require_prisma_service(); var table_service_1 = require_table_service(); + var password_hash_1 = require_password_hash(); var AdminBranchesService = class AdminBranchesService { prisma; table; @@ -86745,7 +95168,7 @@ var require_admin_branches_service = __commonJS({ fullName, mobile: phone, // No password is set: the supervisor cannot sign in until one is issued. - passwordHash: "", + passwordHash: password_hash_1.NO_PASSWORD_YET_HASH, role: client_1.AdminRole.WORKSHOP_SUPERVISOR } }); @@ -87049,6 +95472,24 @@ var require_admin_workshops_module = __commonJS({ } }); +// dist/modules/sales-agent/agent-orders.js +var require_agent_orders = __commonJS({ + "dist/modules/sales-agent/agent-orders.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.agentSalesWhere = agentSalesWhere; + exports2.customerSalesWhere = customerSalesWhere; + function agentSalesWhere(agentId) { + return { + OR: [{ salesAgentId: agentId }, { customer: { salesExpertTradingFor: { adminUserId: agentId } } }] + }; + } + function customerSalesWhere(customerId) { + return { OR: [{ customerId }, { referrerCustomerId: customerId }] }; + } + } +}); + // dist/modules/admin-customers/admin-customers.service.js var require_admin_customers_service = __commonJS({ "dist/modules/admin-customers/admin-customers.service.js"(exports2) { @@ -87107,12 +95548,19 @@ var require_admin_customers_service = __commonJS({ var bcrypt = __importStar2(require_umd()); var prisma_service_1 = require_prisma_service(); var table_service_1 = require_table_service(); + var digits_1 = require_digits(); + var password_hash_1 = require_password_hash(); + var agent_orders_1 = require_agent_orders(); + var sms_service_12 = require_sms_service(); + var accounting_hooks_service_1 = require_accounting_hooks_service(); exports2.CUSTOMER_TYPE_STR = { SALES_AGENT: " \u06A9\u0627\u0631\u0634\u0646\u0627\u0633 \u0641\u0631\u0648\u0634", + // legacy value only — see CustomerKind's schema comment APP_SHOPKEEPER: "\u0645\u063A\u0627\u0632\u0647 \u062F\u0627\u0631 \u0627\u067E\u0644\u06CC\u06A9\u06CC\u0634\u0646", WALK_IN_SHOPKEEPER: " \u0645\u063A\u0627\u0632\u0647 \u062F\u0627\u0631 \u062D\u0636\u0648\u0631\u06CC", BANKER: "\u0628\u0646\u06A9\u062F\u0627\u0631", - WORKSHOP_SUPERVISOR: "\u0633\u0631\u067E\u0631\u0633\u062A \u06A9\u0627\u0631\u06AF\u0627\u0647" + WORKSHOP_SUPERVISOR: "\u0633\u0631\u067E\u0631\u0633\u062A \u06A9\u0627\u0631\u06AF\u0627\u0647", + RETAIL: "\u0645\u0634\u062A\u0631\u06CC \u062A\u06A9" }; var LEGACY_TYPE_ID = { SALES_AGENT: 1, @@ -87123,8 +95571,23 @@ var require_admin_customers_service = __commonJS({ }; var legacyTypeToKind = (t) => Object.keys(LEGACY_TYPE_ID).find((k) => LEGACY_TYPE_ID[k] === Number(t)); exports2.legacyTypeToKind = legacyTypeToKind; - var kindToLegacyType = (k) => LEGACY_TYPE_ID[k]; + var kindToLegacyType = (k) => LEGACY_TYPE_ID[k] ?? null; exports2.kindToLegacyType = kindToLegacyType; + function birthDateOrNull(raw) { + if (raw === void 0) + return void 0; + if (raw === null || String(raw).trim() === "") + return null; + const m = /^(\d{4})-(\d{1,2})-(\d{1,2})/.exec(String(raw).trim()); + const d = m ? new Date(Date.UTC(+m[1], +m[2] - 1, +m[3])) : null; + if (!d || d.getUTCMonth() !== +m[2] - 1 || d.getUTCFullYear() < 1900 || d > /* @__PURE__ */ new Date()) { + throw new common_12.BadRequestException("\u062A\u0627\u0631\u06CC\u062E \u062A\u0648\u0644\u062F \u0645\u0639\u062A\u0628\u0631 \u0646\u06CC\u0633\u062A"); + } + return d; + } + function nationalCodeOrNull(raw) { + return (0, digits_1.faToEn)(String(raw ?? "").trim()) || null; + } function verifyStepOne(step) { switch (step) { case client_1.VerificationStep.UNVERIFIED: @@ -87133,7 +95596,10 @@ var require_admin_customers_service = __commonJS({ case client_1.VerificationStep.STEP_ONE_SUBMITTED: return 1; // pending review - default: + case client_1.VerificationStep.REJECTED: + return 3; + case client_1.VerificationStep.STEP_TWO_SUBMITTED: + case client_1.VerificationStep.VERIFIED: return 2; } } @@ -87145,7 +95611,9 @@ var require_admin_customers_service = __commonJS({ case client_1.VerificationStep.VERIFIED: return 2; // accepted - default: + case client_1.VerificationStep.UNVERIFIED: + case client_1.VerificationStep.STEP_ONE_SUBMITTED: + case client_1.VerificationStep.REJECTED: return 3; } } @@ -87155,13 +95623,43 @@ var require_admin_customers_service = __commonJS({ } prisma; table; - constructor(prisma, table) { + sms; + accounting; + logger = new common_12.Logger(AdminCustomersService_1.name); + constructor(prisma, table, sms, accounting) { this.prisma = prisma; this.table = table; + this.sms = sms; + this.accounting = accounting; + } + /** + * The welcome SMS the reference sends after every new customer is created + * (AdminController.php:378-387). Byte-identical, including the line order and + * the trailing PWA link; the commented-out Android/iOS lines are not sent + * there and are not sent here. + * + * D20 — awaiting it would let a slow or unconfigured gateway hold up the + * HTTP response, and `send()` already swallows every error, so the result is + * only logged. The reference behaves the same way: `Sms::Send` is fired + * inline and its return value discarded, so a failed message never blocked + * the creation. + */ + sendWelcomeSms(mobile, firstName, lastName) { + const body = `\u0647\u0646\u0632\u0627 \u06AF\u0644\u062F +\u0647\u0645\u06A9\u0627\u0631 \u06AF\u0631\u0627\u0645\u06CC ${firstName} ${lastName} +\u0646\u0627\u0645 \u06A9\u0627\u0631\u0628\u0631\u06CC : ${mobile} +\u0644\u06CC\u0646\u06A9 pwa +https://app.henzagold.com`; + void this.sms.send(mobile, body).catch((e) => { + this.logger.error(`Welcome SMS to ${mobile} failed: ${String(e)}`); + }); } static ALLOWED = [ "id", "fullName", + "firstName", + "lastName", + "makingChargeOffsetPercent", "mobile", "nationalCode", "cityId", @@ -87184,8 +95682,11 @@ var require_admin_customers_service = __commonJS({ /** Translates legacy filter field names onto real schema paths. */ static FIELD_ALIASES = { name: "fullName", - fname: "fullName", - lname: "fullName", + // D0 — these now have real columns to point at. Sorting or filtering on + // the last name used to silently act on the whole name. + fname: "firstName", + lname: "lastName", + percent: "makingChargeOffsetPercent", city_id: "cityId", active: "isActive", gram_level: "goldCreditLimitGrams", @@ -87248,7 +95749,10 @@ var require_admin_customers_service = __commonJS({ this.table.assertNotExport(query); const aliased = this.applyAliases(query); const { where, orderBy, skip, take, page, limit } = this.table.build(aliased, { - searchable: ["fullName", "mobile", "nationalCode"], + // D0 — `fullName` is kept in sync by the trigger so it still matches, but + // the parts are searched too: a surname-only query is the common case and + // it must not depend on how the whole name happens to be spaced. + searchable: ["fullName", "firstName", "lastName", "mobile", "nationalCode"], allowed: AdminCustomersService_1.ALLOWED, defaultOrderBy: { createdAt: "desc" } }); @@ -87271,10 +95775,15 @@ var require_admin_customers_service = __commonJS({ toRow(c) { return { id: c.id, - // Legacy stored fname/lname separately; the new schema has one fullName. + // D0 — the schema now has the real parts, as the reference always did + // (2020_10_01_120430_customers_table.php:18-19). Before this, the edit + // form showed the WHOLE name in the "first name" box and saved an empty + // last name. `firstName`/`lastName` are backfilled and kept in sync with + // `fullName` by the customer_sync_full_name trigger, so the fallbacks + // below only matter for a row written before the migration ran. name: c.fullName, - fname: c.fullName, - lname: "", + fname: c.firstName ?? c.fullName, + lname: c.lastName ?? "", mobile: c.mobile, national_code: c.nationalCode, city_id: c.cityId, @@ -87283,18 +95792,25 @@ var require_admin_customers_service = __commonJS({ gram_level: c.goldCreditLimitGrams, remain: c.goldDebtGrams, rial_remain: c.fiatDebtRial, - // legacy `percent` came from the referring agent's commission rate - percent: c.referredByAgent?.wagePercent ?? null, + // D9 — legacy `percent` is a column ON THE CUSTOMER + // (customer_add.php:32), the per-customer making-charge offset. The port + // read the referring AGENT's commission rate instead, which is a + // different number entirely (CUST-02). The legacy key is kept so the + // ported table models and forms bind unchanged. + percent: c.makingChargeOffsetPercent, // legacy kept these as two INDEPENDENT switches — see toggleSts/toggleActive active: c.isActive ? 1 : -1, sts: c.canPlaceOrders ? 1 : -1, - sts_str: c.canPlaceOrders ? "\u0645\u062C\u0627\u0632" : "\u063A\u06CC\u0631 \u0645\u062C\u0627\u0632", + // Legacy Customer::$STS labels (Customer.php:94-97). + sts_str: c.canPlaceOrders ? "\u0641\u0639\u0627\u0644" : "\u0639\u062F\u0645 \u0633\u0641\u0627\u0631\u0634", type: (0, exports2.kindToLegacyType)(c.kind), type_str: exports2.CUSTOMER_TYPE_STR[c.kind], is_archive: c.isArchived ? 1 : 0, sts_verify_step_one: verifyStepOne(c.verificationStep), sts_verify_step_two: verifyStepTwo(c.verificationStep), verificationStep: c.verificationStep, + verification_rejection_reason: c.verificationRejectionReason, + verification_rejected_at: c.verificationRejectedAt, national_id_image: c.nationalIdImageUrl, business_license: c.businessLicenseUrl, shop_image: c.shopImageUrl, @@ -87309,7 +95825,10 @@ var require_admin_customers_service = __commonJS({ store_name: c.storeName, zone: c.zone, pasazh_name: c.pasazhName, - mcode: c.memberCode + mcode: c.memberCode, + // Both legacy names: bulkCustomer reads birth_date, singleCustomer birth_day. + birth_date: c.birthDate ? c.birthDate.toISOString().slice(0, 10) : null, + birth_day: c.birthDate ? c.birthDate.toISOString().slice(0, 10) : null }; } async findOne(id) { @@ -87344,10 +95863,16 @@ var require_admin_customers_service = __commonJS({ this.table.assertNotExport(query); const aliases = { name: "fullName", - lname: "fullName", + // D0/D17 — real columns on AdminUser now, as on Customer. + fname: "firstName", + lname: "lastName", caj: "createdAt", active: "isActive", - percent: "wagePercent" + percent: "wagePercent", + // D17 — these live on the related SalesExpertProfile, so the grid's two + // filters have to reach through the relation. + city_id: "salesExpertProfile.cityId", + gram_level: "salesExpertProfile.gramLevel" }; const mapField = (f) => f ? aliases[f] ?? f : f; const aliased = { @@ -87362,8 +95887,21 @@ var require_admin_customers_service = __commonJS({ order: query.order ? `${query.order.startsWith("-") ? "-" : "+"}${mapField(query.order.replace(/^[+-]/, ""))}` : void 0 }; const { where, orderBy, skip, take, page, limit } = this.table.build(aliased, { - searchable: ["fullName", "mobile"], - allowed: ["id", "fullName", "mobile", "isActive", "createdAt", "wagePercent", "role"], + searchable: ["fullName", "firstName", "lastName", "mobile"], + allowed: [ + "id", + "fullName", + "firstName", + "lastName", + "mobile", + "isActive", + "createdAt", + "wagePercent", + "role", + // D17 — the grid's «شهر» and «سطح اعتبار» filters. + "salesExpertProfile.cityId", + "salesExpertProfile.gramLevel" + ], defaultOrderBy: { createdAt: "desc" } }); const scoped = { @@ -87375,50 +95913,131 @@ var require_admin_customers_service = __commonJS({ orderBy, skip, take, - include: { branch: true, _count: { select: { referredCustomers: true } } } + // D17 — a LEFT JOIN by nature in Prisma: an expert without a profile + // still comes back, with `salesExpertProfile` null, so a missing row + // degrades to empty cells rather than dropping the agent from the grid. + include: { + branch: true, + salesExpertProfile: { include: { city: true } }, + _count: { select: { referredCustomers: true } } + } }), this.prisma.adminUser.count({ where: scoped }) ]); const mapped = await Promise.all(rows.map(async (r) => { const agg = await this.prisma.order.aggregate({ - where: { customer: { referredByAgentId: r.id } }, + where: (0, agent_orders_1.agentSalesWhere)(r.id), _sum: { totalGoldWeightGrams: true } }); return { id: r.id, name: r.fullName, - fname: r.fullName, - lname: "", + // D0 requirement 7 — the real parts, as on Customer. This used to be + // `fname: r.fullName, lname: ''`, the same defect the customer forms had. + fname: r.firstName ?? r.fullName, + lname: r.lastName ?? "", mobile: r.mobile, - city_id: null, - city: null, + // D17 — real values now, so the grid's city column and its filter work. + // Null-safe: an expert with no profile row simply shows empty. + city_id: r.salesExpertProfile?.cityId ?? null, + city: r.salesExpertProfile?.city ? { id: r.salesExpertProfile.city.id, title: r.salesExpertProfile.city.name } : null, percent: r.wagePercent, grams_sell: agg._sum.totalGoldWeightGrams ?? 0, child: r._count.referredCustomers, active: r.isActive ? 1 : -1, sts: r.isActive ? 1 : -1, - sts_str: r.isActive ? "\u0645\u062C\u0627\u0632" : "\u063A\u06CC\u0631 \u0645\u062C\u0627\u0632", + sts_str: r.isActive ? "\u0641\u0639\u0627\u0644" : "\u0639\u062F\u0645 \u0633\u0641\u0627\u0631\u0634", caj: r.createdAt, uaj: r.createdAt, branch: r.branch ? { id: r.branch.id, name: r.branch.name } : null, - // Legacy columns an AdminUser has no counterpart for. - gram_level: null, + // D17 — from SalesExpertProfile. Null-safe for an expert with no row. + gram_level: r.salesExpertProfile?.gramLevel ?? null, + phone: r.salesExpertProfile?.phone ?? null, + ncode: r.salesExpertProfile?.nationalCode ?? null, + // Still genuinely absent: a sales expert is an AdminUser and has no + // ledger of its own, so it carries no gram or rial debt (D10). remain: null, rial_remain: null, - phone: null, - address: null + address: r.address ?? null }; })); return this.table.respond(mapped, total, query, page, limit); } + /** + * The sales agent's own detail screen ("مشاهده اطلاعات" on ReagentList.vue). + * + * A sales agent is an AdminUser now, not a Customer, so it has no debt/ + * ledger of its own — "سند های مالی" doesn't apply the way it does for a + * wholesale customer. This shows the agent's profile plus the customers + * they referred and the orders those customers placed instead. + */ + async reagentDetail(id) { + const agent = await this.prisma.adminUser.findUnique({ + where: { id, role: "SALES_EXPERT" }, + include: { branch: true, avatarFile: true } + }); + if (!agent) + throw new common_12.NotFoundException("\u06A9\u0627\u0631\u0634\u0646\u0627\u0633 \u0641\u0631\u0648\u0634 \u06CC\u0627\u0641\u062A \u0646\u0634\u062F"); + const referred = await this.prisma.customer.findMany({ + where: { referredByAgentId: id }, + orderBy: { createdAt: "desc" }, + include: { city: true } + }); + const orders = await this.prisma.order.findMany({ + // The orders credited to this expert (Order.salesAgentId) plus their own — + // the same set «میزان فروش» counts, so the list and the figure agree. + where: (0, agent_orders_1.agentSalesWhere)(id), + orderBy: { createdAt: "desc" }, + take: 100, + include: { customer: true } + }); + const gramsSoldAgg = await this.prisma.order.aggregate({ + // Same figure as the experts list and legacy grams_sell: no status filter + // (CustomerController::updateGramSell). This screen used to count only + // delivered orders, so the same expert showed two different numbers. + where: (0, agent_orders_1.agentSalesWhere)(id), + _sum: { totalGoldWeightGrams: true } + }); + return { + id: agent.id, + name: agent.fullName, + mobile: agent.mobile, + percent: agent.wagePercent, + active: agent.isActive ? 1 : -1, + branch: agent.branch ? { id: agent.branch.id, name: agent.branch.name } : null, + image: agent.avatarFile ? { id: agent.avatarFile.id, image: agent.avatarFile.url } : null, + caj: agent.createdAt, + grams_sell: gramsSoldAgg._sum.totalGoldWeightGrams ?? 0, + referred_customers: referred.map((c) => ({ + id: c.id, + name: c.fullName, + mobile: c.mobile, + city: c.city ? { id: c.city.id, title: c.city.name } : null, + type_str: exports2.CUSTOMER_TYPE_STR[c.kind], + active: c.isActive ? 1 : -1, + caj: c.createdAt + })), + orders: orders.map((o) => ({ + id: o.id, + name: o.orderNumber, + customer: o.customer.fullName, + w: o.totalGoldWeightGrams, + status: o.status, + caj: o.createdAt + })) + }; + } /** * Legacy `POST single-customer` — the retail ("تک") customer list. * - * Legacy read this from a different table than the wholesale list - * (`orders_orders`-era SingleCustomerOrders lived alongside a separate customer - * record). The redesigned schema has one Customer model, so both lists read the - * same rows; only the column set and actions differ, exactly as the two legacy - * table models did. Same gap noted for orders in docs/ADMIN-PORT-PLAN.md. + * Legacy read this from a COMPLETELY SEPARATE table (SingleCustomer / `login`) + * that could never contain a wholesale/agent/shopkeeper/banker row — the + * separation was structural, not a WHERE-clause discipline. The redesigned + * schema folded every kind into one Customer model, so this list MUST filter + * on `kind: RETAIL` to reproduce that same separation; without it, every + * Customer row (including a mis-created sales agent — see admin-users + * module's header comment) leaked in here. Filtered explicitly rather than + * inferred, so a future creation-path bug can't quietly widen this list again. */ async listSingle(query, branchId) { this.table.assertNotExport(query); @@ -87428,9 +96047,12 @@ var require_admin_customers_service = __commonJS({ allowed: [...AdminCustomersService_1.ALLOWED, "branch.name"], defaultOrderBy: { createdAt: "desc" } }); + const scoped = { + AND: [where, { kind: client_1.CustomerKind.RETAIL }] + }; const [rows, total] = await Promise.all([ this.prisma.customer.findMany({ - where, + where: scoped, orderBy, skip, take, @@ -87440,7 +96062,7 @@ var require_admin_customers_service = __commonJS({ referredByAgent: { include: { branch: true } } } }), - this.prisma.customer.count({ where }) + this.prisma.customer.count({ where: scoped }) ]); return this.table.respond(rows.map((r) => ({ ...this.toRow(r), @@ -87449,55 +96071,125 @@ var require_admin_customers_service = __commonJS({ branch: r.referredByAgent?.branch ? { id: r.referredByAgent.branch.id, name: r.referredByAgent.branch.name } : null })), total, query, page, limit); } - /** Legacy `POST customer/create` (omdeSave) and `POST/PUT user/profile`. */ - async create(data) { - const fullName = String(data.name ?? data.fname ?? "").trim(); - const mobile = String(data.mobile ?? "").trim(); - const nationalCode = String(data.national_code ?? data.nationalCode ?? "").trim(); + /** + * Legacy `POST single` — singleCustomer.vue, the retail ("تک") customer + * form. This endpoint never existed before (singleCustomer.vue posted to + * a path nothing served — see this method's git history / the bug report + * that led here); its edit path happened to work only because `update()` + * is generic enough to patch any Customer row, agent or otherwise. + */ + async createSingle(data) { + const firstName = String(data.fname ?? data.name ?? "").trim(); + const lastName = String(data.lname ?? "").trim(); + const fullName = [firstName, lastName].filter(Boolean).join(" "); + const mobile = String(data.mobile ?? data.phone ?? "").trim(); if (!fullName || !mobile) { throw new common_12.BadRequestException("\u0646\u0627\u0645 \u0648 \u0645\u0648\u0628\u0627\u06CC\u0644 \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A"); } return this.prisma.customer.create({ data: { fullName, + firstName: firstName || null, + lastName: lastName || null, mobile, - nationalCode: nationalCode || mobile, - // schema requires it and it is unique + // singleCustomer.vue collects no national code. + nationalCode: null, + passwordHash: password_hash_1.OTP_ONLY_PASSWORD_HASH, + cityId: data.city_id || null, + birthDate: birthDateOrNull(data.birth_day ?? data.birth_date) ?? null, + kind: client_1.CustomerKind.RETAIL + } + }); + } + /** + * Legacy `POST customer/create` (omdeSave) and `POST/PUT user/profile`. + * + * Sales agents (`type`/`kind` SALES_AGENT) are REJECTED here — a sales + * agent is an AdminUser (role SALES_EXPERT) now, created via + * `POST admin/users`, not a Customer row. bulkCustomer.vue no longer offers + * that option; this guard is defense-in-depth against any other caller + * (e.g. reg.vue, or a stale client) still sending type=1. + */ + async create(data) { + const firstName = String(data.fname ?? data.name ?? "").trim(); + const lastName = String(data.lname ?? "").trim(); + const fullName = [firstName, lastName].filter(Boolean).join(" "); + const mobile = (0, digits_1.faToEn)(String(data.mobile ?? "").trim()); + const nationalCode = nationalCodeOrNull(data.national_code ?? data.nationalCode); + if (!fullName || !mobile) { + throw new common_12.BadRequestException("\u0646\u0627\u0645 \u0648 \u0645\u0648\u0628\u0627\u06CC\u0644 \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A"); + } + if (data.percent === void 0 || data.percent === null || data.percent === "") { + throw new common_12.BadRequestException("\u0648\u0627\u0631\u062F \u06A9\u0631\u062F\u0646 percent \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A"); + } + const kind = (0, exports2.legacyTypeToKind)(data.type) ?? client_1.CustomerKind.APP_SHOPKEEPER; + if (kind === client_1.CustomerKind.SALES_AGENT) { + throw new common_12.BadRequestException("\u06A9\u0627\u0631\u0634\u0646\u0627\u0633 \u0641\u0631\u0648\u0634 \u0627\u0632 \u0627\u06CC\u0646 \u0641\u0631\u0645 \u062B\u0628\u062A \u0646\u0645\u06CC\u200C\u0634\u0648\u062F. \u0627\u0632 \u0628\u062E\u0634 \xAB\u0627\u0641\u0632\u0648\u062F\u0646 \u0645\u062F\u06CC\u0631\xBB \u0628\u0627 \u0646\u0642\u0634 \xAB\u06A9\u0627\u0631\u0634\u0646\u0627\u0633 \u0641\u0631\u0648\u0634\xBB \u0627\u0633\u062A\u0641\u0627\u062F\u0647 \u06A9\u0646\u06CC\u062F."); + } + const created = await this.prisma.customer.create({ + data: { + fullName, + firstName: firstName || null, + lastName: lastName || null, + // D9 — per-customer making-charge offset. Required above, so this is + // always a real value; the reference's own form default is 3 + // (AdminController.php:338) and is applied client-side. + makingChargeOffsetPercent: new client_1.Prisma.Decimal(String(data.percent)), + mobile, + nationalCode, // The form collects a password (bulkCustomer.vue / ReagentCustomer.vue). // It used to be discarded and '' stored, so the operator typed a password - // that silently did nothing. Hashed here when supplied; '' still means - // "no password yet", which no bcrypt hash can ever match. - passwordHash: data.password ? await bcrypt.hash(String(data.password), 10) : "", + // that silently did nothing. Hashed here when supplied; otherwise the + // account signs in by OTP only. + passwordHash: data.password ? await bcrypt.hash(String(data.password), 10) : password_hash_1.OTP_ONLY_PASSWORD_HASH, cityId: data.city_id ?? null, goldCreditLimitGrams: data.gram_level ? new client_1.Prisma.Decimal(String(data.gram_level)) : new client_1.Prisma.Decimal(0), // legacy `type` — defaults to 2 (مغازه دار اپلیکیشن), matching the // main omde list, when the form omits it. - kind: (0, exports2.legacyTypeToKind)(data.type) ?? client_1.CustomerKind.APP_SHOPKEEPER, + kind, phone: data.phone ?? null, address: data.address ?? null, storeName: data.store_name ?? null, pasazhName: data.pasazh_name ?? null, zone: data.zone ?? null, memberCode: data.mcode ?? null, + birthDate: birthDateOrNull(data.birth_date ?? data.birth_day) ?? null, // legacy `image_id` from MyUpload's `ok` payload avatarFileId: data.image_id || null, + // The three document photos the wholesale form collects. These were + // already read back in toRow() but never persisted, so every upload was + // silently discarded on save. + nationalIdImageUrl: data.national_id_image || null, + businessLicenseUrl: data.business_license || null, + shopImageUrl: data.shop_image || null, // The sales agent who introduced this customer. The form's dropdown was // populated from a working endpoint and the selection then thrown away. referredByAgentId: data.reagent_id || null } }); + this.sendWelcomeSms(mobile, firstName, lastName); + return created; } async update(id, data) { const existing = await this.prisma.customer.findUnique({ where: { id } }); if (!existing) throw new common_12.NotFoundException("\u0645\u0634\u062A\u0631\u06CC \u06CC\u0627\u0641\u062A \u0646\u0634\u062F"); const patch = {}; - if (data.name !== void 0) + if (data.fname !== void 0 || data.lname !== void 0) { + const firstName = String(data.fname ?? existing.firstName ?? "").trim(); + const lastName = String(data.lname ?? existing.lastName ?? "").trim(); + patch.firstName = firstName || null; + patch.lastName = lastName || null; + } else if (data.name !== void 0) { patch.fullName = String(data.name); + } + if (data.percent !== void 0 && data.percent !== null && data.percent !== "") { + patch.makingChargeOffsetPercent = new client_1.Prisma.Decimal(String(data.percent)); + } if (data.mobile !== void 0) - patch.mobile = String(data.mobile); + patch.mobile = (0, digits_1.faToEn)(String(data.mobile)); if (data.national_code !== void 0) - patch.nationalCode = String(data.national_code); + patch.nationalCode = nationalCodeOrNull(data.national_code); if (data.city_id !== void 0) { patch.city = data.city_id ? { connect: { id: String(data.city_id) } } : { disconnect: true }; } @@ -87508,6 +96200,9 @@ var require_admin_customers_service = __commonJS({ const kind = (0, exports2.legacyTypeToKind)(data.type); if (!kind) throw new common_12.BadRequestException("\u0646\u0648\u0639 \u0645\u0634\u062A\u0631\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u0627\u0633\u062A"); + if (kind === client_1.CustomerKind.SALES_AGENT) { + throw new common_12.BadRequestException("\u06A9\u0627\u0631\u0634\u0646\u0627\u0633 \u0641\u0631\u0648\u0634 \u0627\u0632 \u0627\u06CC\u0646 \u0641\u0631\u0645 \u0648\u06CC\u0631\u0627\u06CC\u0634 \u0646\u0645\u06CC\u200C\u0634\u0648\u062F. \u0627\u0632 \u0628\u062E\u0634 \xAB\u0627\u0641\u0632\u0648\u062F\u0646 \u0645\u062F\u06CC\u0631\xBB \u0628\u0627 \u0646\u0642\u0634 \xAB\u06A9\u0627\u0631\u0634\u0646\u0627\u0633 \u0641\u0631\u0648\u0634\xBB \u0627\u0633\u062A\u0641\u0627\u062F\u0647 \u06A9\u0646\u06CC\u062F."); + } patch.kind = kind; } if (data.phone !== void 0) @@ -87522,6 +96217,9 @@ var require_admin_customers_service = __commonJS({ patch.zone = String(data.zone); if (data.mcode !== void 0) patch.memberCode = String(data.mcode); + const birthDate = birthDateOrNull(data.birth_date !== void 0 ? data.birth_date : data.birth_day); + if (birthDate !== void 0) + patch.birthDate = birthDate; if (data.reagent_id !== void 0) { patch.referredByAgent = data.reagent_id ? { connect: { id: String(data.reagent_id) } } : { disconnect: true }; } @@ -87531,7 +96229,22 @@ var require_admin_customers_service = __commonJS({ if (data.image_id !== void 0) { patch.avatarFile = data.image_id ? { connect: { id: String(data.image_id) } } : { disconnect: true }; } - return this.prisma.customer.update({ where: { id }, data: patch }); + if (data.national_id_image !== void 0) { + patch.nationalIdImageUrl = data.national_id_image || null; + } + if (data.business_license !== void 0) { + patch.businessLicenseUrl = data.business_license || null; + } + if (data.shop_image !== void 0) { + patch.shopImageUrl = data.shop_image || null; + } + const contactChanged = ["fname", "lname", "name", "mobile", "national_code", "phone", "address"].some((k) => data[k] !== void 0); + return this.prisma.$transaction(async (tx) => { + const updated = await tx.customer.update({ where: { id }, data: patch }); + if (contactChanged) + await this.accounting.customerEdited(tx, id); + return updated; + }); } /** * The three per-customer panels the "مشاهده اطلاعات" screens show, ported from @@ -87651,22 +96364,46 @@ var require_admin_customers_service = __commonJS({ * Legacy's payload is `{ customer_id, sts_verify_step_one }` or * `{ customer_id, sts_verify_step_two }`, where the value is 2 (accept) or * 3 (reject) — see OmdeList.vue acceptStepOne/rejectStepOne. Accepted here in - * exactly that shape so the ported view posts unchanged. + * exactly that shape so the ported view posts unchanged, plus an optional + * `reason` on a reject. + * + * A reject at either step records REJECTED with its reason and time (owner + * ruling 2026-10-07). It used to send the customer back to UNVERIFIED / + * STEP_ONE_SUBMITTED, so a rejection left no trace and looked like a + * customer who had simply not finished. Same rule as the legacy import: + * a rejected first OR second step is REJECTED (DATA-MIGRATION-MAP §5.5). + * Accepting again clears the reason. */ async verify(payload) { const id = payload.customer_id; const c = await this.prisma.customer.findUnique({ where: { id } }); if (!c) throw new common_12.NotFoundException("\u0645\u0634\u062A\u0631\u06CC \u06CC\u0627\u0641\u062A \u0646\u0634\u062F"); - let next; - if (payload.sts_verify_step_one !== void 0) { - next = payload.sts_verify_step_one === 2 ? client_1.VerificationStep.STEP_TWO_SUBMITTED : client_1.VerificationStep.UNVERIFIED; - } else if (payload.sts_verify_step_two !== void 0) { - next = payload.sts_verify_step_two === 2 ? client_1.VerificationStep.VERIFIED : client_1.VerificationStep.STEP_ONE_SUBMITTED; - } else { + const step = payload.sts_verify_step_one ?? payload.sts_verify_step_two; + if (step === void 0) throw new common_12.BadRequestException("\u0645\u0631\u062D\u0644\u0647\u200C\u06CC \u062A\u0627\u06CC\u06CC\u062F \u0645\u0634\u062E\u0635 \u0646\u0634\u062F\u0647 \u0627\u0633\u062A"); + let data; + if (step === 2) { + data = { + verificationStep: payload.sts_verify_step_one !== void 0 ? client_1.VerificationStep.STEP_TWO_SUBMITTED : client_1.VerificationStep.VERIFIED, + verificationRejectionReason: null, + verificationRejectedAt: null + }; + } else { + data = { + verificationStep: client_1.VerificationStep.REJECTED, + verificationRejectionReason: String(payload.reason ?? "").trim() || null, + verificationRejectedAt: /* @__PURE__ */ new Date() + }; } - return this.prisma.customer.update({ where: { id }, data: { verificationStep: next } }); + const next = data.verificationStep; + return this.prisma.$transaction(async (tx) => { + const updated = await tx.customer.update({ where: { id }, data }); + if (next === client_1.VerificationStep.VERIFIED && c.verificationStep !== client_1.VerificationStep.VERIFIED) { + await this.accounting.customerVerified(tx, id); + } + return updated; + }); } /** Legacy `GET major/archive/{id}` — MajorCustomerController::archive. */ async toggleArchive(id) { @@ -87683,12 +96420,14 @@ var require_admin_customers_service = __commonJS({ const c = await this.prisma.customer.findUnique({ where: { id } }); if (!c) throw new common_12.NotFoundException("\u0645\u0634\u062A\u0631\u06CC \u06CC\u0627\u0641\u062A \u0646\u0634\u062F"); - const [orderCount, openOrders, ledgerCount] = await Promise.all([ + const [orderCount, openOrders, ledgerCount, sold] = await Promise.all([ this.prisma.order.count({ where: { customerId: id } }), this.prisma.order.count({ where: { customerId: id, deliveredAt: null, status: { not: "CANCELLED" } } }), - this.prisma.ledgerEntry.count({ where: { customerId: id } }) + this.prisma.ledgerEntry.count({ where: { customerId: id } }), + // Legacy ViewOmdeCustomer «میزان فروش» (customers.grams_sell). + this.prisma.order.aggregate({ where: (0, agent_orders_1.customerSalesWhere)(id), _sum: { totalGoldWeightGrams: true } }) ]); return { total_order: orderCount, @@ -87696,7 +96435,8 @@ var require_admin_customers_service = __commonJS({ ledger_entries: ledgerCount, gram_level: c.goldCreditLimitGrams, remain: c.goldDebtGrams, - rial_remain: c.fiatDebtRial + rial_remain: c.fiatDebtRial, + grams_sell: sold._sum.totalGoldWeightGrams ?? 0 }; } /** Legacy `PATCH` of the credit level / commission from the list row menu. */ @@ -87707,10 +96447,13 @@ var require_admin_customers_service = __commonJS({ if (data.gram_level === void 0) { throw new common_12.BadRequestException("\u0645\u0642\u062F\u0627\u0631 \u0633\u0637\u062D \u0627\u0639\u062A\u0628\u0627\u0631 \u0627\u0631\u0633\u0627\u0644 \u0646\u0634\u062F\u0647 \u0627\u0633\u062A"); } - return this.prisma.customer.update({ - where: { id }, - data: { goldCreditLimitGrams: new client_1.Prisma.Decimal(data.gram_level) } - }); + const patch = { + goldCreditLimitGrams: new client_1.Prisma.Decimal(data.gram_level) + }; + if (data.percent !== void 0 && data.percent !== null && String(data.percent) !== "") { + patch.makingChargeOffsetPercent = new client_1.Prisma.Decimal(String(data.percent)); + } + return this.prisma.customer.update({ where: { id }, data: patch }); } }; exports2.AdminCustomersService = AdminCustomersService; @@ -87718,7 +96461,9 @@ var require_admin_customers_service = __commonJS({ (0, common_12.Injectable)(), __metadata3("design:paramtypes", [ prisma_service_1.PrismaService, - table_service_1.TableService + table_service_1.TableService, + sms_service_12.SmsService, + accounting_hooks_service_1.AccountingHooksService ]) ], AdminCustomersService); } @@ -87775,6 +96520,10 @@ var require_admin_customers_controller = __commonJS({ listSingle(query, admin) { return this.customers.listSingle(query, admin.branchId ?? void 0); } + /** Legacy `POST single` — singleCustomer.vue, the retail customer form. */ + createSingle(data) { + return this.customers.createSingle(data); + } /** * Legacy `GET query/reagent` — the sales-expert picker used by the customer * form. Returns a plain array of {id, name}, as legacy did. @@ -87796,6 +96545,10 @@ var require_admin_customers_controller = __commonJS({ listReagents(query) { return this.customers.listReagents(query); } + /** A sales agent's own detail screen — see reagentDetail()'s header comment. */ + reagentDetail(id) { + return this.customers.reagentDetail(id); + } /** Legacy `GET single/order/{id}` — that customer's orders. */ customerOrders(id) { return this.customers.customerOrders(id); @@ -87886,6 +96639,15 @@ var require_admin_customers_controller = __commonJS({ __metadata3("design:paramtypes", [table_query_dto_1.TableQueryDto, Object]), __metadata3("design:returntype", void 0) ], AdminCustomersController.prototype, "listSingle", null); + __decorate4([ + (0, common_12.Post)("single"), + (0, common_12.HttpCode)(200), + (0, guards_1.RequirePermission)("persons.create"), + __param3(0, (0, common_12.Body)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object]), + __metadata3("design:returntype", void 0) + ], AdminCustomersController.prototype, "createSingle", null); __decorate4([ (0, common_12.Get)("query/reagent"), (0, guards_1.RequirePermission)("persons.create"), @@ -87929,6 +96691,14 @@ var require_admin_customers_controller = __commonJS({ __metadata3("design:paramtypes", [table_query_dto_1.TableQueryDto]), __metadata3("design:returntype", void 0) ], AdminCustomersController.prototype, "listReagents", null); + __decorate4([ + (0, common_12.Get)("reagent/:id"), + (0, guards_1.RequirePermission)("persons.list.sellers.view"), + __param3(0, (0, common_12.Param)("id")), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [String]), + __metadata3("design:returntype", void 0) + ], AdminCustomersController.prototype, "reagentDetail", null); __decorate4([ (0, common_12.Get)(":id/orders"), (0, guards_1.RequirePermission)("persons.list.client.omde.view.orders"), @@ -88166,8 +96936,9 @@ var require_admin_comments_service = __commonJS({ customer: { id: c.customer.id, name: c.customer.fullName, - fname: c.customer.fullName, - lname: "", + // D0 — real name parts + fname: c.customer.firstName ?? c.customer.fullName, + lname: c.customer.lastName ?? "", mobile: c.customer.mobile }, caj: c.createdAt, @@ -88398,6 +97169,7 @@ var require_admin_products_service = __commonJS({ var client_1 = require("@prisma/client"); var prisma_service_1 = require_prisma_service(); var table_service_1 = require_table_service(); + var accounting_hooks_service_1 = require_accounting_hooks_service(); var SHOW_TYPE_LABELS = { 1: "\u0633\u0627\u06CC\u062A", 2: "\u06AF\u0648\u0634\u06CC", @@ -88409,9 +97181,11 @@ var require_admin_products_service = __commonJS({ } prisma; table; - constructor(prisma, table) { + accounting; + constructor(prisma, table, accounting) { this.prisma = prisma; this.table = table; + this.accounting = accounting; } static ALLOWED = [ "id", @@ -88487,6 +97261,9 @@ var require_admin_products_service = __commonJS({ category: p.category ? { id: p.category.id, title: p.category.title, collection: { title: p.category.title } } : null, // legacy grid slot reads `ProductImage` ProductImage: p.images.map((i) => ({ id: i.id, image: i.url, full: i.url, url: i.url })), + // D27 — stock as last read from the accounting software (null = not + // linked / never synced). + accounting_stock: p.accountingStockAt ? { weight: p.accountingStockWeight, count: p.accountingStockCount, at: p.accountingStockAt } : null, images: p.images.map((i) => ({ id: i.id, url: i.url, sortOrder: i.sortOrder, role: i.role })), // The order builder's grid reads `thumb.full` and `variants_all` directly // off each row, so both travel with the list as they did in legacy. Legacy's @@ -88514,14 +97291,17 @@ var require_admin_products_service = __commonJS({ brand: true, category: true, images: { orderBy: { sortOrder: "asc" } }, - variants: true, + variants: { include: { image: true } }, collections: { include: { collection: true } } } }); if (!p) throw new common_12.NotFoundException("\u0645\u062D\u0635\u0648\u0644 \u06CC\u0627\u0641\u062A \u0646\u0634\u062F"); + const link = await this.accounting.productLink(p.id); + const snapshot = link?.snapshot ?? {}; return { ...this.toRow(p), + accounting: link ? { locked: true, code: link.externalCode, origin: link.origin, sale_wage_percent: snapshot.saleWagePercent ?? null } : null, body_html: p.description, brand_id: p.brandId, cats: p.categoryId ? [p.categoryId] : [], @@ -88533,7 +97313,16 @@ var require_admin_products_service = __commonJS({ indicator_id: p.images.find((i) => i.role === "FEATURED")?.url ?? null, mobile_pic: p.images.find((i) => i.role === "FEATURED_MOBILE")?.url ?? null, images_gallery: p.images.filter((i) => i.role === "GALLERY").map((i) => i.url), - images_mobile: p.images.filter((i) => i.role === "GALLERY_MOBILE").map((i) => i.url) + images_mobile: p.images.filter((i) => i.role === "GALLERY_MOBILE").map((i) => i.url), + // The same images again, but carrying their ids — the variant image + // picker needs something to select. The four URL-only fields above stay + // exactly as they were so the form's existing bindings keep working. + gallery: p.images.map((i) => ({ + id: i.id, + url: i.url, + role: i.role, + sortOrder: i.sortOrder + })) }; } variantRow(v) { @@ -88547,6 +97336,11 @@ var require_admin_products_service = __commonJS({ qty: v.qty, is_pre_order: v.isPreOrder, is_active: v.isActive, + // The gallery image picked for this variant. `image_id` is what the form + // posts back; `image` is denormalised so the table can render a thumbnail + // without a second lookup. Only populated where the query included it. + image_id: v.imageId, + image: v.image ? { id: v.image.id, url: v.image.url } : null, // Legacy had a separate rial making-charge column; the schema models wage // as a percentage only. Returned as null rather than faked. rial_pay: null, @@ -88568,7 +97362,7 @@ var require_admin_products_service = __commonJS({ orderBy, skip, take, - include: { product: true } + include: { product: true, image: true } }), this.prisma.productVariant.count({ where: scoped }) ]); @@ -88588,7 +97382,7 @@ var require_admin_products_service = __commonJS({ brand: true, category: true, images: { orderBy: { sortOrder: "asc" } }, - variants: true + variants: { include: { image: true } } } }); return rows.map((p) => ({ @@ -88627,20 +97421,64 @@ var require_admin_products_service = __commonJS({ } /** Legacy `GET product/{id}/variant`. */ async variantsOf(productId) { - const rows = await this.prisma.productVariant.findMany({ where: { productId } }); + const rows = await this.prisma.productVariant.findMany({ + where: { productId }, + include: { image: true } + }); return rows.map((v) => this.variantRow(v)); } - /** Shape of one inline variant row posted by the product form. */ - variantCreateData(v) { + /** + * Shape of one inline variant row posted by the product form. + * + * `image_id` is resolved against `allowedImageIds` — the ids of the images + * belonging to *this* product — so a payload can never point a variant at + * another product's image. An absent/empty value clears the picture. + */ + variantCreateData(v, allowedImageIds) { + const rawImageId = v.image_id ?? v.imageId; + const imageId = rawImageId ? String(rawImageId) : null; + if (imageId && !allowedImageIds.has(imageId)) { + throw new common_12.BadRequestException("\u062A\u0635\u0648\u06CC\u0631 \u0627\u0646\u062A\u062E\u0627\u0628\u200C\u0634\u062F\u0647 \u0645\u062A\u0639\u0644\u0642 \u0628\u0647 \u0627\u06CC\u0646 \u0645\u062D\u0635\u0648\u0644 \u0646\u06CC\u0633\u062A"); + } return { title: String(v.title ?? ""), rashWeightGrams: new client_1.Prisma.Decimal(String(v.grams ?? 0)), defaultWagePercent: new client_1.Prisma.Decimal(String(v.percentage_pay ?? 0)), qty: Number(v.qty ?? 0), isPreOrder: Boolean(v.is_pre_order), - isActive: v.is_active !== void 0 ? Boolean(v.is_active) : true + isActive: v.is_active !== void 0 ? Boolean(v.is_active) : true, + imageId }; } + /** + * Builds a commercial SKU for a newly created variant. + * + * Derived from the product's own code (falling back to a slice of its id when + * no code was entered) plus a running number, e.g. `RING-001-01`. Only ever + * called for variants that have no SKU yet — an existing one is never + * rewritten, because it may already be in use in stock/sales systems. + * + * `taken` carries the SKUs handed out earlier in the same request so two new + * variants in one submit cannot collide before either is written. + */ + async generateSku(productCode, productId, taken) { + const base = (productCode?.trim() || productId.slice(-6)).toUpperCase().replace(/\s+/g, "-"); + const existing = await this.prisma.productVariant.findMany({ + where: { sku: { startsWith: `${base}-` } }, + select: { sku: true } + }); + for (const row of existing) + if (row.sku) + taken.add(row.sku); + for (let n = 1; n <= 9999; n++) { + const candidate = `${base}-${String(n).padStart(2, "0")}`; + if (!taken.has(candidate)) { + taken.add(candidate); + return candidate; + } + } + return `${base}-${Date.now()}`; + } /** * Legacy had 4 distinct upload slots (تصویر شاخص / تصویر شاخص موبایل / * گالری تصاویر سایت / گالری تصاویر موبایل — AddProduct.vue's `indicator_id`, @@ -88679,27 +97517,51 @@ var require_admin_products_service = __commonJS({ const cinyIds = Array.isArray(data.ciny_ids) ? data.ciny_ids : []; const variants = Array.isArray(data.variants) ? data.variants : []; const images = this.imageCreateData(data); - return this.prisma.product.create({ + const productCode = data.product_code || null; + const created = await this.prisma.product.create({ data: { title, description: data.body_html ?? data.description ?? null, - productCode: data.product_code || null, + productCode, showType: data.show_type !== void 0 ? Number(data.show_type) : 3, isActive: data.is_active !== void 0 ? Boolean(data.is_active) : true, brandId: data.brand_id || null, categoryId: cats[0] ?? null, collections: cinyIds.length ? { create: cinyIds.map((collectionId) => ({ collectionId })) } : void 0, - variants: variants.length ? { create: variants.map((v) => this.variantCreateData(v)) } : void 0, images: images.length ? { create: images } : void 0 }, - include: { variants: true, images: true } + include: { images: true } }); + if (variants.length) { + const allowed = new Set(created.images.map((i) => i.id)); + const takenSkus = /* @__PURE__ */ new Set(); + for (const v of variants) { + const payload = this.variantCreateData(v, allowed); + await this.prisma.productVariant.create({ + data: { + ...payload, + productId: created.id, + sku: await this.generateSku(productCode, created.id, takenSkus) + } + }); + } + } + await this.accounting.productCreated(this.prisma, created.id); + return this.findOne(created.id); } /** Legacy `PUT product/update/{id}`. */ async update(id, data) { const existing = await this.prisma.product.findUnique({ where: { id } }); if (!existing) throw new common_12.NotFoundException("\u0645\u062D\u0635\u0648\u0644 \u06CC\u0627\u0641\u062A \u0646\u0634\u062F"); + const link = await this.accounting.productLink(id); + if (link) { + const titleChanged = data.title !== void 0 && String(data.title).trim() !== existing.title; + const codeChanged = data.product_code !== void 0 && (data.product_code || null) !== existing.productCode; + if (titleChanged || codeChanged) { + throw new common_12.BadRequestException("\u0639\u0646\u0648\u0627\u0646 \u0648 \u06A9\u062F \u0627\u06CC\u0646 \u0645\u062D\u0635\u0648\u0644 \u0627\u0632 \u0646\u0631\u0645\u200C\u0627\u0641\u0632\u0627\u0631 \u062D\u0633\u0627\u0628\u062F\u0627\u0631\u06CC \u0645\u06CC\u200C\u0622\u06CC\u062F\u061B \u0628\u0631\u0627\u06CC \u062A\u063A\u06CC\u06CC\u0631\u060C \u0622\u0646 \u0631\u0627 \u062F\u0631 \u062D\u0633\u0627\u0628\u062F\u0627\u0631\u06CC \u0648\u06CC\u0631\u0627\u06CC\u0634 \u06A9\u0646\u06CC\u062F."); + } + } const patch = {}; if (data.title !== void 0) patch.title = String(data.title); @@ -88719,11 +97581,19 @@ var require_admin_products_service = __commonJS({ patch.category = catId ? { connect: { id: catId } } : { disconnect: true }; } await this.prisma.product.update({ where: { id }, data: patch }); + await this.syncImages(id, data); if (Array.isArray(data.variants)) { const posted = data.variants; const keptIds = []; + const currentImages = await this.prisma.productImage.findMany({ + where: { productId: id }, + select: { id: true } + }); + const allowed = new Set(currentImages.map((i) => i.id)); + const takenSkus = /* @__PURE__ */ new Set(); + const productCode = data.product_code !== void 0 ? data.product_code || null : existing.productCode; for (const v of posted) { - const payload = this.variantCreateData(v); + const payload = this.variantCreateData(v, allowed); if (v.id) { await this.prisma.productVariant.update({ where: { id: String(v.id) }, @@ -88732,7 +97602,11 @@ var require_admin_products_service = __commonJS({ keptIds.push(String(v.id)); } else { const created = await this.prisma.productVariant.create({ - data: { ...payload, productId: id } + data: { + ...payload, + productId: id, + sku: await this.generateSku(productCode, id, takenSkus) + } }); keptIds.push(created.id); } @@ -88742,16 +97616,61 @@ var require_admin_products_service = __commonJS({ data: { isActive: false } }); } - if (["indicator_id", "mobile_pic", "images", "images_mobile"].some((k) => k in data)) { - const images = this.imageCreateData(data); - await this.prisma.productImage.deleteMany({ where: { productId: id } }); - if (images.length) { - await this.prisma.productImage.createMany({ - data: images.map((img) => ({ ...img, productId: id })) - }); + return this.findOne(id); + } + /** + * Applies the 4 posted image slots to a product WITHOUT churning row ids. + * + * This used to be a delete-everything-and-recreate, which was fine while + * nothing referenced an image. ProductVariant.imageId now does, so a rewrite + * would silently blank every variant's picture on each save (the FK is + * ON DELETE SET NULL). Instead each posted (url, role) pair is matched + * against the rows already stored: survivors keep their id and only have + * their sortOrder refreshed, genuinely new URLs are inserted, and rows the + * form dropped are deleted. + * + * The form always posts all 4 image fields together (even as empty/absent), + * so any one of them being present means this is a real submit rather than a + * partial PATCH that happens to omit the others. + */ + async syncImages(productId, data) { + if (!["indicator_id", "mobile_pic", "images", "images_mobile"].some((k) => k in data)) + return; + const desired = this.imageCreateData(data); + const current = await this.prisma.productImage.findMany({ where: { productId } }); + const pools = /* @__PURE__ */ new Map(); + for (const row of current) { + const key = `${row.role}\0${row.url}`; + const pool = pools.get(key); + if (pool) + pool.push(row); + else + pools.set(key, [row]); + } + const survivingIds = /* @__PURE__ */ new Set(); + for (const img of desired) { + const key = `${img.role}\0${img.url}`; + const match = pools.get(key)?.shift(); + if (match) { + survivingIds.add(match.id); + if (match.sortOrder !== img.sortOrder) { + await this.prisma.productImage.update({ + where: { id: match.id }, + data: { sortOrder: img.sortOrder } + }); + } + } else { + await this.prisma.productImage.create({ data: { ...img, productId } }); } } - return this.findOne(id); + const removedIds = current.filter((row) => !survivingIds.has(row.id)).map((row) => row.id); + if (removedIds.length) { + await this.prisma.productVariant.updateMany({ + where: { imageId: { in: removedIds } }, + data: { imageId: null } + }); + await this.prisma.productImage.deleteMany({ where: { id: { in: removedIds } } }); + } } /** * Legacy `POST delete/product/{id}` — a DELETE expressed as POST. @@ -88774,8 +97693,11 @@ var require_admin_products_service = __commonJS({ await this.prisma.$transaction([ this.prisma.collectionProduct.deleteMany({ where: { productId: id } }), this.prisma.comment.deleteMany({ where: { productId: id } }), - this.prisma.productImage.deleteMany({ where: { productId: id } }), + // Variants reference images (ProductVariant.imageId), so they go first — + // the FK is ON DELETE SET NULL, but deleting in dependency order keeps + // this correct regardless of how the constraint is enforced. this.prisma.productVariant.deleteMany({ where: { productId: id } }), + this.prisma.productImage.deleteMany({ where: { productId: id } }), this.prisma.product.delete({ where: { id } }) ]); return { success: true }; @@ -88851,7 +97773,8 @@ var require_admin_products_service = __commonJS({ (0, common_12.Injectable)(), __metadata3("design:paramtypes", [ prisma_service_1.PrismaService, - table_service_1.TableService + table_service_1.TableService, + accounting_hooks_service_1.AccountingHooksService ]) ], AdminProductsService); } @@ -89587,6 +98510,7 @@ var require_admin_documents_service = __commonJS({ var prisma_service_1 = require_prisma_service(); var table_service_1 = require_table_service(); var ledger_service_1 = require_ledger_service(); + var sms_service_12 = require_sms_service(); var TYPE_BY_CODE = { 1: client_1.LedgerSourceType.REPAYMENT_MELTED_GOLD, 2: client_1.LedgerSourceType.REPAYMENT_TRANSFER, @@ -89622,10 +98546,12 @@ var require_admin_documents_service = __commonJS({ prisma; table; ledger; - constructor(prisma, table, ledger) { + sms; + constructor(prisma, table, ledger, sms) { this.prisma = prisma; this.table = table; this.ledger = ledger; + this.sms = sms; } static ALLOWED = [ "id", @@ -89730,8 +98656,9 @@ var require_admin_documents_service = __commonJS({ customer: { id: e.customer.id, name: e.customer.fullName, - fname: e.customer.fullName, - lname: "", + // D0 — real name parts + fname: e.customer.firstName ?? e.customer.fullName, + lname: e.customer.lastName ?? "", mobile: e.customer.mobile }, posted_by: e.postedByAdminUser ? e.postedByAdminUser.fullName : null, @@ -89842,6 +98769,7 @@ var require_admin_documents_service = __commonJS({ throw new common_12.NotFoundException("\u0633\u0646\u062F \u06CC\u0627\u0641\u062A \u0646\u0634\u062F"); if (!e.confirmed) { await this.ledger.confirmEntry(id, adminUserId); + this.notifyDocumentConfirm(e.customerId, true); return this.findOne(id); } await this.prisma.$transaction(async (tx) => { @@ -89856,8 +98784,18 @@ var require_admin_documents_service = __commonJS({ data: { confirmed: false, confirmedAt: null } }); }); + this.notifyDocumentConfirm(e.customerId, false); return this.findOne(id); } + // Legacy CashController::toggleConfiremCash sent an SMS on both outcomes. + notifyDocumentConfirm(customerId, confirmed) { + const text = confirmed ? "\u0647\u0646\u0632\u0627 \u06AF\u0644\u062F\n\u0633\u0646\u062F \u0645\u0627\u0644\u06CC \u0634\u0645\u0627 \u062A\u0648\u0633\u0637 \u0645\u062F\u06CC\u0631 \u0633\u06CC\u0633\u062A\u0645 \u062A\u0627\u06CC\u06CC\u062F \u0634\u062F." : "\u0647\u0646\u0632\u0627 \u06AF\u0644\u062F\n\u0633\u0646\u062F \u0645\u0627\u0644\u06CC \u0634\u0645\u0627 \u062A\u0648\u0633\u0637 \u0645\u062F\u06CC\u0631 \u0633\u06CC\u0633\u062A\u0645 \u0631\u062F \u0634\u062F."; + this.prisma.customer.findUnique({ where: { id: customerId }, select: { mobile: true } }).then((c) => { + if (c) + this.sms.send(c.mobile, text); + }).catch(() => { + }); + } /** * Legacy `DELETE cash/{id}`. * @@ -89937,9 +98875,15 @@ var require_admin_documents_service = __commonJS({ const rows = await this.prisma.customer.findMany({ where: { isActive: true }, orderBy: { fullName: "asc" }, - select: { id: true, fullName: true, mobile: true } + select: { id: true, fullName: true, firstName: true, lastName: true, mobile: true } }); - return rows.map((c) => ({ id: c.id, name: c.fullName, fname: c.fullName, lname: "", mobile: c.mobile })); + return rows.map((c) => ({ + id: c.id, + name: c.fullName, + fname: c.firstName ?? c.fullName, + lname: c.lastName ?? "", + mobile: c.mobile + })); } }; exports2.AdminDocumentsService = AdminDocumentsService; @@ -89948,7 +98892,8 @@ var require_admin_documents_service = __commonJS({ __metadata3("design:paramtypes", [ prisma_service_1.PrismaService, table_service_1.TableService, - ledger_service_1.LedgerService + ledger_service_1.LedgerService, + sms_service_12.SmsService ]) ], AdminDocumentsService); } @@ -90752,15 +99697,22 @@ var require_admin_users_service = __commonJS({ var bcrypt = __importStar2(require_umd()); var prisma_service_1 = require_prisma_service(); var table_service_1 = require_table_service(); + var admin_session_service_1 = require_admin_session_service(); + var digits_1 = require_digits(); + var acl_constants_1 = require_acl_constants(); + var STORABLE_RIDS = new Set(acl_constants_1.ALL_RIDS.flatMap((rid) => rid.split(".").map((_2, i, parts) => parts.slice(0, i + 1).join(".")))); var AdminUsersService = class AdminUsersService { static { AdminUsersService_1 = this; } prisma; table; - constructor(prisma, table) { + sessions; + logger = new common_12.Logger(AdminUsersService_1.name); + constructor(prisma, table, sessions) { this.prisma = prisma; this.table = table; + this.sessions = sessions; } static ALLOWED = [ "id", @@ -90811,7 +99763,7 @@ var require_admin_users_service = __commonJS({ orderBy, skip, take, - include: { userType: true, branch: true } + include: { userType: true, branch: true, avatarFile: true } }), this.prisma.adminUser.count({ where }) ]); @@ -90822,8 +99774,10 @@ var require_admin_users_service = __commonJS({ return { id: u.id, name: u.fullName, - fname: u.fullName, - lname: "", + // D0 requirement 7 — the real parts. The fallback only matters for a row + // written before the 20260922180000 migration backfilled them. + fname: u.firstName ?? u.fullName, + lname: u.lastName ?? "", mobile: u.mobile, role: u.role, ut: u.userTypeId, @@ -90833,56 +99787,128 @@ var require_admin_users_service = __commonJS({ percent: u.wagePercent, active: u.isActive ? 1 : -1, is_active: u.isActive, - caj: u.createdAt + caj: u.createdAt, + // Sales-agent fields (ReagentCustomer.vue) — set only for role=SALES_EXPERT, + // null for every other admin. Same shapes admin-customers.service.ts used + // when this data still lived on Customer, so the form binds unchanged. + address: u.address, + store_name: u.storeName, + pasazh_name: u.pasazhName, + mcode: u.memberCode, + image_id: u.avatarFileId, + image: u.avatarFile ? { id: u.avatarFile.id, image: u.avatarFile.url } : null, + // D17 — from SalesExpertProfile. Null for a non-expert, and null-safe for + // an expert whose profile row is somehow missing. + city_id: u.salesExpertProfile?.cityId ?? null, + city: u.salesExpertProfile?.city ? { id: u.salesExpertProfile.city.id, title: u.salesExpertProfile.city.name } : null, + gram_level: u.salesExpertProfile?.gramLevel ?? null, + phone: u.salesExpertProfile?.phone ?? null, + ncode: u.salesExpertProfile?.nationalCode ?? null }; } async findOne(id) { const u = await this.prisma.adminUser.findUnique({ where: { id }, - include: { userType: true, branch: true } + // D17 — the edit form needs the sales-expert fields too. + include: { + userType: true, + branch: true, + avatarFile: true, + salesExpertProfile: { include: { city: true } } + } }); if (!u) throw new common_12.NotFoundException("\u06A9\u0627\u0631\u0628\u0631 \u06CC\u0627\u0641\u062A \u0646\u0634\u062F"); return this.toRow(u); } - /** Legacy `POST users`. */ + /** + * Legacy `POST users`. + * + * `role` is REQUIRED — it used to default to SALES_EXPERT whenever the + * caller omitted it, which silently turned every admin created without an + * explicit role into a sales agent regardless of the access level ("نوع + * کاربری") actually chosen. UserCreate.vue now always sends one. + */ async create(data) { - const fullName = String(data.name ?? data.fname ?? "").trim(); - const mobile = String(data.mobile ?? "").trim(); + const firstName = String(data.fname ?? data.name ?? "").trim(); + const lastName = String(data.lname ?? "").trim(); + const fullName = [firstName, lastName].filter(Boolean).join(" "); + const mobile = (0, digits_1.faToEn)(String(data.mobile ?? "").trim()); const password = String(data.password ?? ""); + const role = data.role; if (!fullName) throw new common_12.BadRequestException("\u0646\u0627\u0645 \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A"); if (!mobile) throw new common_12.BadRequestException("\u0645\u0648\u0628\u0627\u06CC\u0644 \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A"); if (!password) throw new common_12.BadRequestException("\u0631\u0645\u0632 \u0639\u0628\u0648\u0631 \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A"); + if (!role) + throw new common_12.BadRequestException("\u0646\u0642\u0634 \u06A9\u0627\u0631\u0628\u0631 \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A"); const existing = await this.prisma.adminUser.findUnique({ where: { mobile } }); if (existing) throw new common_12.BadRequestException("\u0627\u06CC\u0646 \u0634\u0645\u0627\u0631\u0647 \u0645\u0648\u0628\u0627\u06CC\u0644 \u0642\u0628\u0644\u0627\u064B \u062B\u0628\u062A \u0634\u062F\u0647 \u0627\u0633\u062A"); return this.prisma.adminUser.create({ data: { fullName, + firstName: firstName || null, + lastName: lastName || null, mobile, passwordHash: await bcrypt.hash(password, 10), - role: data.role ?? client_1.AdminRole.SALES_EXPERT, + role, userTypeId: data.ut !== void 0 && data.ut !== null ? Number(data.ut) : null, branchId: data.branch_id || null, wagePercent: data.percent !== void 0 && data.percent !== null ? new client_1.Prisma.Decimal(String(data.percent)) : null, - isActive: data.is_active !== void 0 ? Boolean(data.is_active) : true + isActive: data.is_active !== void 0 ? Boolean(data.is_active) : true, + // Sales-agent-only fields (ReagentCustomer.vue); undefined for every + // other role, which Prisma leaves at column default (null). + address: data.address || null, + storeName: data.store_name || null, + pasazhName: data.pasazh_name || null, + memberCode: data.mcode || null, + avatarFileId: data.image_id || null, + // D17 — a sales expert always gets its profile row, so the grid's city + // and credit-limit columns have somewhere to read from immediately. + ...role === "SALES_EXPERT" ? { salesExpertProfile: { create: this.salesExpertProfileData(data) } } : {} }, - include: { userType: true, branch: true } + include: { + userType: true, + branch: true, + avatarFile: true, + salesExpertProfile: { include: { city: true } } + } }); } + /** + * The SalesExpertProfile columns as posted by ReagentCustomer.vue (D17). + * + * `phone` and `nationalCode` are stored exactly as the reference does: + * optional, not unique, no format rule — the reference validates only + * `mobile` and `percent` on this form (AdminController.php:354). + */ + salesExpertProfileData(data) { + return { + cityId: data.city_id || null, + gramLevel: data.gram_level !== void 0 && data.gram_level !== null && data.gram_level !== "" ? new client_1.Prisma.Decimal(String(data.gram_level)) : new client_1.Prisma.Decimal(0), + phone: data.phone || null, + nationalCode: data.ncode || null + }; + } /** Legacy `PUT users/{id}`. */ async update(id, data) { const existing = await this.prisma.adminUser.findUnique({ where: { id } }); if (!existing) throw new common_12.NotFoundException("\u06A9\u0627\u0631\u0628\u0631 \u06CC\u0627\u0641\u062A \u0646\u0634\u062F"); const patch = {}; - if (data.name !== void 0) + if (data.fname !== void 0 || data.lname !== void 0) { + const firstName = String(data.fname ?? existing.firstName ?? "").trim(); + const lastName = String(data.lname ?? existing.lastName ?? "").trim(); + patch.firstName = firstName || null; + patch.lastName = lastName || null; + } else if (data.name !== void 0) { patch.fullName = String(data.name); + } if (data.mobile !== void 0) { - const mobile = String(data.mobile); + const mobile = (0, digits_1.faToEn)(String(data.mobile)); if (mobile !== existing.mobile) { const clash = await this.prisma.adminUser.findUnique({ where: { mobile } }); if (clash) @@ -90905,11 +99931,49 @@ var require_admin_users_service = __commonJS({ } if (data.is_active !== void 0) patch.isActive = Boolean(data.is_active); - return this.prisma.adminUser.update({ + if (data.address !== void 0) + patch.address = data.address || null; + if (data.store_name !== void 0) + patch.storeName = data.store_name || null; + if (data.pasazh_name !== void 0) + patch.pasazhName = data.pasazh_name || null; + if (data.mcode !== void 0) + patch.memberCode = data.mcode || null; + if (data.image_id !== void 0) { + patch.avatarFile = data.image_id ? { connect: { id: String(data.image_id) } } : { disconnect: true }; + } + const effectiveRole = patch.role ?? existing.role; + const touchesProfile = data.city_id !== void 0 || data.gram_level !== void 0 || data.phone !== void 0 || data.ncode !== void 0; + if (effectiveRole === "SALES_EXPERT" && (touchesProfile || patch.role !== void 0)) { + const profile = this.salesExpertProfileData(data); + patch.salesExpertProfile = { + upsert: { + create: profile, + // Only the keys the caller actually sent, so an untouched field is + // not overwritten with a default on a partial (diff-send) save. + update: { + ...data.city_id !== void 0 ? { cityId: profile.cityId } : {}, + ...data.gram_level !== void 0 ? { gramLevel: profile.gramLevel } : {}, + ...data.phone !== void 0 ? { phone: profile.phone } : {}, + ...data.ncode !== void 0 ? { nationalCode: profile.nationalCode } : {} + } + } + }; + } + const updated = await this.prisma.adminUser.update({ where: { id }, data: patch, - include: { userType: true, branch: true } + include: { + userType: true, + branch: true, + avatarFile: true, + salesExpertProfile: { include: { city: true } } + } }); + if (patch.isActive === false || patch.passwordHash !== void 0) { + await this.sessions.revokeAllForAdmin(id, patch.isActive === false ? "account_disabled" : "password_changed"); + } + return updated; } /** * Legacy `DELETE users/{id}`. @@ -90991,7 +100055,12 @@ var require_admin_users_service = __commonJS({ const type = await this.prisma.userType.findUnique({ where: { id: userTypeId } }); if (!type) throw new common_12.NotFoundException("\u0633\u0637\u062D \u062F\u0633\u062A\u0631\u0633\u06CC \u06CC\u0627\u0641\u062A \u0646\u0634\u062F"); - const clean = [...new Set((rids ?? []).map((r) => String(r)).filter(Boolean))]; + const posted = [...new Set((rids ?? []).map((r) => String(r).trim()).filter(Boolean))]; + const clean = posted.filter((r) => STORABLE_RIDS.has(r)); + const dropped = posted.filter((r) => !STORABLE_RIDS.has(r)); + if (dropped.length) { + this.logger.warn(`setRoles(${userTypeId}): ignored ${dropped.length} unknown rid(s): ${dropped.slice(0, 20).join(", ")}`); + } await this.prisma.$transaction([ this.prisma.permission.deleteMany({ where: { userTypeId } }), this.prisma.permission.createMany({ @@ -91033,7 +100102,8 @@ var require_admin_users_service = __commonJS({ (0, common_12.Injectable)(), __metadata3("design:paramtypes", [ prisma_service_1.PrismaService, - table_service_1.TableService + table_service_1.TableService, + admin_session_service_1.AdminSessionService ]) ], AdminUsersService); } @@ -91618,26 +100688,35 @@ var require_admin_misc_service = __commonJS({ var __metadata3 = exports2 && exports2.__metadata || function(k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; + var AdminMiscService_1; Object.defineProperty(exports2, "__esModule", { value: true }); exports2.AdminMiscService = void 0; var common_12 = require_common(); var client_1 = require("@prisma/client"); var prisma_service_1 = require_prisma_service(); var table_service_1 = require_table_service(); - var AdminMiscService = class AdminMiscService { + var sms_service_12 = require_sms_service(); + var accounting_config_1 = require_accounting_config(); + var wage_service_1 = require_wage_service(); + var AdminMiscService = AdminMiscService_1 = class AdminMiscService { prisma; table; - constructor(prisma, table) { + sms; + constructor(prisma, table, sms) { this.prisma = prisma; this.table = table; + this.sms = sms; } // ── Cities ───────────────────────────────────────────────────────── + // + // Legacy cities are a tree (country > province > city > district) and so are + // the target's again (PERS-02): each city may hang under a `parent`. /** Legacy `POST cities/list` grid. */ async listCities(query) { this.table.assertNotExport(query); const { where, orderBy, skip, take, page, limit } = this.table.build(query, { - searchable: ["name", "province"], - allowed: ["id", "name", "province", "percent", "percentAux"], + searchable: ["name"], + allowed: ["id", "name", "parentId", "percent", "percentAux"], defaultOrderBy: { name: "asc" } }); const [rows, total] = await Promise.all([ @@ -91646,7 +100725,10 @@ var require_admin_misc_service = __commonJS({ orderBy, skip, take, - include: { _count: { select: { customers: true, branches: true } } } + include: { + parent: { select: { id: true, name: true } }, + _count: { select: { customers: true, branches: true, children: true } } + } }), this.prisma.city.count({ where }) ]); @@ -91654,52 +100736,109 @@ var require_admin_misc_service = __commonJS({ id: c.id, title: c.name, name: c.name, - province: c.province, + parent: c.parentId, + parent_title: c.parent?.name ?? null, percent: c.percent, percent_aux: c.percentAux, customers_count: c._count.customers, - branches_count: c._count.branches + branches_count: c._count.branches, + children_count: c._count.children })), total, query, page, limit); } - /** Legacy `POST cities`. */ + /** + * The parent a create/update asks for: `parent` (legacy's field name) or + * `parent_id`; empty means top level. Refuses an unknown city, the city + * itself, or one of its own descendants (that would make a loop). + */ + async resolveCityParent(data, selfId) { + const raw = data.parent !== void 0 ? data.parent : data.parent_id; + if (raw === void 0) + return void 0; + if (raw === null || String(raw).trim() === "") + return null; + const parentId = String(raw).trim(); + let cur = parentId; + for (let guard = 0; cur && guard < 50; guard++) { + if (cur === selfId) + throw new common_12.BadRequestException("\u0634\u0647\u0631 \u0646\u0645\u06CC\u200C\u062A\u0648\u0627\u0646\u062F \u0632\u06CC\u0631\u0645\u062C\u0645\u0648\u0639\u0647\u200C\u06CC \u062E\u0648\u062F\u0634 \u0628\u0627\u0634\u062F."); + const row = await this.prisma.city.findUnique({ + where: { id: cur }, + select: { parentId: true } + }); + if (!row) { + if (cur === parentId) + throw new common_12.BadRequestException("\u0648\u0627\u0644\u062F \u0627\u0646\u062A\u062E\u0627\u0628\u200C\u0634\u062F\u0647 \u067E\u06CC\u062F\u0627 \u0646\u0634\u062F."); + break; + } + cur = row.parentId; + } + return parentId; + } + static cityPercent(v) { + if (v === void 0) + return void 0; + if (v === null || String(v).trim() === "") + return null; + try { + return new client_1.Prisma.Decimal(String(v)); + } catch { + throw new common_12.BadRequestException("\u062F\u0631\u0635\u062F \u0628\u0627\u06CC\u062F \u0639\u062F\u062F \u0628\u0627\u0634\u062F."); + } + } + /** Legacy `POST cities` — name, parent and the two percents. */ async createCity(data) { const name = String(data.title ?? data.name ?? "").trim(); if (!name) throw new common_12.BadRequestException("\u0646\u0627\u0645 \u0634\u0647\u0631 \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A"); - return this.prisma.city.create({ data: { name, province: data.province ?? null } }); + const parentId = await this.resolveCityParent(data); + return this.prisma.city.create({ + data: { + name, + parentId: parentId ?? null, + percent: AdminMiscService_1.cityPercent(data.percent) ?? null, + percentAux: AdminMiscService_1.cityPercent(data.percent_aux) ?? null + } + }); } - /** Legacy `PUT cities/{id}` — the grid's inline edit also sets the percents. */ + /** Legacy `PUT cities/{id}` — name, parent and the two percents. */ async updateCity(id, data) { const existing = await this.prisma.city.findUnique({ where: { id } }); if (!existing) throw new common_12.NotFoundException("\u0634\u0647\u0631 \u06CC\u0627\u0641\u062A \u0646\u0634\u062F"); const patch = {}; if (data.title !== void 0 || data.name !== void 0) { - patch.name = String(data.title ?? data.name); - } - if (data.province !== void 0) - patch.province = data.province ?? null; - if (data.percent !== void 0) { - patch.percent = data.percent === null ? null : new client_1.Prisma.Decimal(String(data.percent)); - } - if (data.percent_aux !== void 0) { - patch.percentAux = data.percent_aux === null ? null : new client_1.Prisma.Decimal(String(data.percent_aux)); + const name = String(data.title ?? data.name ?? "").trim(); + if (!name) + throw new common_12.BadRequestException("\u0646\u0627\u0645 \u0634\u0647\u0631 \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A"); + patch.name = name; } + const parentId = await this.resolveCityParent(data, id); + if (parentId !== void 0) + patch.parentId = parentId; + const percent = AdminMiscService_1.cityPercent(data.percent); + if (percent !== void 0) + patch.percent = percent; + const percentAux = AdminMiscService_1.cityPercent(data.percent_aux); + if (percentAux !== void 0) + patch.percentAux = percentAux; return this.prisma.city.update({ where: { id }, data: patch }); } /** * Legacy `DELETE cities/{id}`. * - * Refuses while customers or branches still point at the city — legacy deleted - * regardless, orphaning those rows. + * Refuses while customers, branches or child cities still point at the city — + * legacy deleted regardless, orphaning those rows. */ async removeCity(id) { const c = await this.prisma.city.findUnique({ where: { id }, - include: { _count: { select: { customers: true, branches: true, addresses: true } } } + include: { _count: { select: { customers: true, branches: true, addresses: true, children: true } } } }); if (!c) throw new common_12.NotFoundException("\u0634\u0647\u0631 \u06CC\u0627\u0641\u062A \u0646\u0634\u062F"); + if (c._count.children > 0) { + throw new common_12.BadRequestException(`\u062D\u0630\u0641 \u0627\u06CC\u0646 \u0634\u0647\u0631 \u0645\u0645\u06A9\u0646 \u0646\u06CC\u0633\u062A\u060C \u0686\u0648\u0646 ${c._count.children} \u0634\u0647\u0631 \u0632\u06CC\u0631\u0645\u062C\u0645\u0648\u0639\u0647\u200C\u06CC \u0622\u0646 \u0627\u0633\u062A.`); + } const refs = c._count.customers + c._count.branches + c._count.addresses; if (refs > 0) { throw new common_12.BadRequestException(`\u062D\u0630\u0641 \u0627\u06CC\u0646 \u0634\u0647\u0631 \u0645\u0645\u06A9\u0646 \u0646\u06CC\u0633\u062A\u060C \u0686\u0648\u0646 ${refs} \u0645\u0634\u062A\u0631\u06CC\u060C \u0634\u0639\u0628\u0647 \u06CC\u0627 \u0622\u062F\u0631\u0633 \u0628\u0647 \u0622\u0646 \u0627\u0631\u062C\u0627\u0639 \u062F\u0627\u0631\u062F.`); @@ -91707,12 +100846,29 @@ var require_admin_misc_service = __commonJS({ await this.prisma.city.delete({ where: { id } }); return { success: true }; } - /** Legacy `GET cities/get-percent/{id}` — returns the bare number. */ + /** + * Legacy `GET cities/get-percent/{id}` — returns the bare number. As legacy's + * CitiesController::_getP: a city without its own percent (null or 0) takes + * its parent's, and so on up; 0 when no ancestor has one. + */ async getCityPercent(id, aux) { - const c = await this.prisma.city.findUnique({ where: { id } }); - if (!c) - throw new common_12.NotFoundException("\u0634\u0647\u0631 \u06CC\u0627\u0641\u062A \u0646\u0634\u062F"); - return aux ? c.percentAux : c.percent; + let cur = id; + for (let guard = 0; cur && guard < 50; guard++) { + const c = await this.prisma.city.findUnique({ + where: { id: cur }, + select: { parentId: true, percent: true, percentAux: true } + }); + if (!c) { + if (cur === id) + throw new common_12.NotFoundException("\u0634\u0647\u0631 \u06CC\u0627\u0641\u062A \u0646\u0634\u062F"); + break; + } + const v = aux ? c.percentAux : c.percent; + if (v !== null && v.gt(0)) + return v; + cur = c.parentId; + } + return 0; } // ── SMS ──────────────────────────────────────────────────────────── /** Legacy `POST sms/table` — the sent-message log. */ @@ -91744,12 +100900,9 @@ var require_admin_misc_service = __commonJS({ })), total, query, page, limit); } /** - * Legacy `POST sms` — records the send. - * - * NOTE no SMS gateway is wired up: legacy handed the message to an external - * provider, and this port has no credentials for one. The message is stored - * with the audience it resolved to, so the log is accurate, but nothing is - * actually transmitted. Flagged in docs/ADMIN-PORT-PLAN.md. + * Legacy `POST sms` — resolves the audience, substitutes `%name` per + * recipient (legacy SmsController::batch + replaceName), delivers via the + * configured gateway (D26 relay), and records the send. */ async sendSms(data, actorId) { const body = String(data.text ?? "").trim(); @@ -91757,6 +100910,12 @@ var require_admin_misc_service = __commonJS({ throw new common_12.BadRequestException("\u0645\u062A\u0646 \u067E\u06CC\u0627\u0645\u06A9 \u0627\u0644\u0632\u0627\u0645\u06CC \u0627\u0633\u062A"); const audience = this.resolveAudience(data.type); const recipients = await this.resolveRecipients(audience, data.mobile); + const needsNameSub = body.includes("%name"); + const customersByMobile = needsNameSub ? await this.customerNamesByMobile(recipients) : /* @__PURE__ */ new Map(); + for (const mobile of recipients) { + const text = needsNameSub ? body.replace(/%name/g, customersByMobile.get(mobile) ?? "\u0645\u0634\u062A\u0631\u06CC \u0639\u0632\u06CC\u0632") : body; + this.sms.send(mobile, text, { audience }); + } return this.prisma.smsMessage.create({ data: { audience, @@ -91767,6 +100926,18 @@ var require_admin_misc_service = __commonJS({ } }); } + async customerNamesByMobile(mobiles) { + const rows = await this.prisma.customer.findMany({ + where: { mobile: { in: mobiles } }, + select: { mobile: true, fullName: true } + }); + const map = /* @__PURE__ */ new Map(); + for (const r of rows) { + if (r.fullName) + map.set(r.mobile, r.fullName + " \u0639\u0632\u06CC\u0632"); + } + return map; + } /** * Legacy's numeric audience codes, read off views/sms/create.vue where each * option is gated by its own rid: @@ -91976,11 +101147,11 @@ var require_admin_misc_service = __commonJS({ orderBy: { createdAt: "desc" }, take: 200 }); - return rows.map((l) => ({ - id: l.id, - action: l.action, - detail: l.detail, - caj: l.createdAt + return rows.map((l2) => ({ + id: l2.id, + action: l2.action, + detail: l2.detail, + caj: l2.createdAt })); } // ── Settings ("مدیریت ثابت ها") ─────────────────────────────────── @@ -91999,7 +101170,10 @@ var require_admin_misc_service = __commonJS({ return row.value; } async listConsts() { - const rows = await this.prisma.setting.findMany({ orderBy: { key: "asc" } }); + const rows = await this.prisma.setting.findMany({ + where: { AND: [{ NOT: { key: { startsWith: accounting_config_1.ACCOUNTING_SETTING_PREFIX } } }, { NOT: { key: { startsWith: wage_service_1.PRICING_SETTING_PREFIX } } }] }, + orderBy: { key: "asc" } + }); return rows.map((r) => ({ key: r.key, value: r.value, updated_at: r.updatedAt })); } async removeConst(key) { @@ -92041,11 +101215,12 @@ var require_admin_misc_service = __commonJS({ } }; exports2.AdminMiscService = AdminMiscService; - exports2.AdminMiscService = AdminMiscService = __decorate4([ + exports2.AdminMiscService = AdminMiscService = AdminMiscService_1 = __decorate4([ (0, common_12.Injectable)(), __metadata3("design:paramtypes", [ prisma_service_1.PrismaService, - table_service_1.TableService + table_service_1.TableService, + sms_service_12.SmsService ]) ], AdminMiscService); } @@ -92075,6 +101250,8 @@ var require_admin_misc_controller = __commonJS({ var admin_misc_service_1 = require_admin_misc_service(); var table_query_dto_1 = require_table_query_dto(); var guards_1 = require_guards2(); + var accounting_config_1 = require_accounting_config(); + var wage_service_1 = require_wage_service(); var AdminMiscController = class AdminMiscController { misc; constructor(misc) { @@ -92149,15 +101326,46 @@ var require_admin_misc_controller = __commonJS({ removeBrand(id) { return this.misc.removeBrand(id); } + // The mobile home slider ("اسلایدر موبایل") is stored under the same + // `Setting` table as every other `const/:key` entry (key: mobile_main_slider), + // but it gets its own permission (`custom.config.statics.slider`, per + // acl.constants.ts / permissionConst.ts) rather than the broad `config.statics` + // that guards the rest of the "مدیریت ثابت ها" screen — uploading/replacing the + // public site banner is more sensitive than editing brand/tag lists, so it + // should not be reachable by everyone who can merely open that screen. + // Routes declared ahead of `const/:key` so Nest doesn't match `const/slider` + // (the legacy REST shape) to the generic key handler instead. + getSlider() { + return this.misc.getConst("mobile_main_slider"); + } + setSlider(body) { + return this.misc.setConst("mobile_main_slider", body.val !== void 0 ? body.val : body); + } + removeSlider() { + return this.misc.removeConst("mobile_main_slider"); + } getConst(key) { + this.assertNotSliderKey(key); return this.misc.getConst(key); } setConst(key, body) { + this.assertNotSliderKey(key); return this.misc.setConst(key, body.val !== void 0 ? body.val : body); } removeConst(key) { + this.assertNotSliderKey(key); return this.misc.removeConst(key); } + // Blocks the generic `config.statics`-gated routes from reaching the slider + // setting by its raw key — otherwise anyone with `config.statics` could + // bypass the dedicated `const/slider` routes (guarded by the stricter + // `custom.config.statics.slider`) simply by calling `const/mobile_main_slider` + // directly, since the underlying Setting row is keyed the same either way. + assertNotSliderKey(key) { + if (key === "mobile_main_slider" || (0, accounting_config_1.isAccountingSettingKey)(key) || key.trim().toLowerCase().startsWith(wage_service_1.PRICING_SETTING_PREFIX)) { + throw new common_12.ForbiddenException("\u0627\u06CC\u0646 \u062A\u0646\u0638\u06CC\u0645 \u0641\u0642\u0637 \u0627\u0632 \u0645\u0633\u06CC\u0631 \u0627\u062E\u062A\u0635\u0627\u0635\u06CC \u062E\u0648\u062F \u0642\u0627\u0628\u0644 \u062F\u0633\u062A\u0631\u0633\u06CC \u0627\u0633\u062A"); + } + } }; exports2.AdminMiscController = AdminMiscController; __decorate4([ @@ -92339,6 +101547,28 @@ var require_admin_misc_controller = __commonJS({ __metadata3("design:paramtypes", [String]), __metadata3("design:returntype", void 0) ], AdminMiscController.prototype, "removeBrand", null); + __decorate4([ + (0, common_12.Get)("const/slider"), + (0, guards_1.RequirePermission)("custom.config.statics.slider"), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", []), + __metadata3("design:returntype", void 0) + ], AdminMiscController.prototype, "getSlider", null); + __decorate4([ + (0, common_12.Put)("const/slider"), + (0, guards_1.RequirePermission)("custom.config.statics.slider"), + __param3(0, (0, common_12.Body)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object]), + __metadata3("design:returntype", void 0) + ], AdminMiscController.prototype, "setSlider", null); + __decorate4([ + (0, common_12.Delete)("const/slider"), + (0, guards_1.RequirePermission)("custom.config.statics.slider"), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", []), + __metadata3("design:returntype", void 0) + ], AdminMiscController.prototype, "removeSlider", null); __decorate4([ (0, common_12.Get)("const/:key"), (0, guards_1.RequirePermission)("config.statics"), @@ -92371,6 +101601,49 @@ var require_admin_misc_controller = __commonJS({ } }); +// dist/modules/admin-misc/public-slider.controller.js +var require_public_slider_controller = __commonJS({ + "dist/modules/admin-misc/public-slider.controller.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.PublicSliderController = void 0; + var common_12 = require_common(); + var admin_misc_service_1 = require_admin_misc_service(); + var guards_1 = require_guards2(); + var PublicSliderController = class PublicSliderController { + misc; + constructor(misc) { + this.misc = misc; + } + async getSlider() { + const value = await this.misc.getConst("mobile_main_slider"); + return Array.isArray(value) ? value : []; + } + }; + exports2.PublicSliderController = PublicSliderController; + __decorate4([ + (0, common_12.Get)("slider"), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", []), + __metadata3("design:returntype", Promise) + ], PublicSliderController.prototype, "getSlider", null); + exports2.PublicSliderController = PublicSliderController = __decorate4([ + (0, guards_1.Public)(), + (0, common_12.Controller)("home"), + __metadata3("design:paramtypes", [admin_misc_service_1.AdminMiscService]) + ], PublicSliderController); + } +}); + // dist/modules/admin-misc/admin-misc.module.js var require_admin_misc_module = __commonJS({ "dist/modules/admin-misc/admin-misc.module.js"(exports2) { @@ -92386,6 +101659,7 @@ var require_admin_misc_module = __commonJS({ var common_12 = require_common(); var prisma_module_1 = require_prisma_module(); var admin_misc_controller_1 = require_admin_misc_controller(); + var public_slider_controller_1 = require_public_slider_controller(); var admin_misc_service_1 = require_admin_misc_service(); var AdminMiscModule = class AdminMiscModule { }; @@ -92393,285 +101667,13 @@ var require_admin_misc_module = __commonJS({ exports2.AdminMiscModule = AdminMiscModule = __decorate4([ (0, common_12.Module)({ imports: [prisma_module_1.PrismaModule], - controllers: [admin_misc_controller_1.AdminMiscController], + controllers: [admin_misc_controller_1.AdminMiscController, public_slider_controller_1.PublicSliderController], providers: [admin_misc_service_1.AdminMiscService] }) ], AdminMiscModule); } }); -// dist/modules/admin-uploads/upload-path.js -var require_upload_path = __commonJS({ - "dist/modules/admin-uploads/upload-path.js"(exports2) { - "use strict"; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.getUploadDir = getUploadDir; - exports2.mimeForUpload = mimeForUpload; - exports2.resolveStoredUpload = resolveStoredUpload; - var node_fs_1 = require("node:fs"); - var node_path_12 = require("node:path"); - function getUploadDir() { - return (0, node_path_12.resolve)(process.env.UPLOAD_DIR ?? (0, node_path_12.join)(process.cwd(), "storage", "uploads")); - } - var UPLOAD_MIME = { - ".png": "image/png", - ".jpg": "image/jpeg", - ".jpeg": "image/jpeg", - ".gif": "image/gif", - ".webp": "image/webp", - ".avif": "image/avif", - ".svg": "image/svg+xml", - ".pdf": "application/pdf" - }; - function mimeForUpload(filePath) { - const dot = filePath.lastIndexOf("."); - const ext = dot >= 0 ? filePath.slice(dot).toLowerCase() : ""; - return UPLOAD_MIME[ext]; - } - function resolveStoredUpload(rawName) { - const safe = (0, node_path_12.basename)(rawName); - if (!safe || safe === "." || safe === "..") - return null; - const dir = getUploadDir(); - const candidates = [(0, node_path_12.join)(dir, safe), (0, node_path_12.join)(dir, "uploads", safe)]; - for (const candidate of candidates) { - const resolved = (0, node_path_12.resolve)(candidate); - const rel = (0, node_path_12.relative)(dir, resolved); - if (!rel || rel.startsWith("..") || (0, node_path_12.isAbsolute)(rel)) - continue; - if ((0, node_fs_1.existsSync)(resolved) && (0, node_fs_1.statSync)(resolved).isFile()) - return resolved; - } - return null; - } - } -}); - -// dist/modules/admin-uploads/admin-uploads.service.js -var require_admin_uploads_service = __commonJS({ - "dist/modules/admin-uploads/admin-uploads.service.js"(exports2) { - "use strict"; - var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - var __metadata3 = exports2 && exports2.__metadata || function(k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); - }; - var AdminUploadsService_1; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AdminUploadsService = void 0; - var common_12 = require_common(); - var node_crypto_1 = require("node:crypto"); - var promises_1 = require("node:fs/promises"); - var node_path_12 = require("node:path"); - var prisma_service_1 = require_prisma_service(); - var upload_path_1 = require_upload_path(); - var AdminUploadsService = class AdminUploadsService { - static { - AdminUploadsService_1 = this; - } - prisma; - /** Matches legacy's flat public/storage directory. */ - dir = (0, upload_path_1.getUploadDir)(); - /** Mirrors legacy's `type` field: 1 = image, 2 = any other document. */ - static IMAGE_MIME = /^image\/(jpeg|png|gif|webp|svg\+xml)$/; - static ALLOWED = /^(image\/(jpeg|png|gif|webp|svg\+xml)|application\/pdf)$/; - /** 8 MB. Legacy relied on PHP's upload_max_filesize; this makes it explicit. */ - static MAX_BYTES = 8 * 1024 * 1024; - constructor(prisma) { - this.prisma = prisma; - } - async store(file2, purpose, actorAdminUserId) { - if (!file2) - throw new common_12.BadRequestException("\u0641\u0627\u06CC\u0644\u06CC \u0627\u0631\u0633\u0627\u0644 \u0646\u0634\u062F\u0647 \u0627\u0633\u062A"); - if (file2.size > AdminUploadsService_1.MAX_BYTES) { - throw new common_12.BadRequestException("\u062D\u062C\u0645 \u0641\u0627\u06CC\u0644 \u0628\u06CC\u0634 \u0627\u0632 \u062D\u062F \u0645\u062C\u0627\u0632 \u0627\u0633\u062A (\u06F8 \u0645\u06AF\u0627\u0628\u0627\u06CC\u062A)"); - } - if (!AdminUploadsService_1.ALLOWED.test(file2.mimetype)) { - throw new common_12.BadRequestException("\u0646\u0648\u0639 \u0641\u0627\u06CC\u0644 \u0645\u062C\u0627\u0632 \u0646\u06CC\u0633\u062A"); - } - const ext = (0, node_path_12.extname)(file2.originalname).toLowerCase(); - const stored = (0, node_crypto_1.createHash)("md5").update(`${Date.now()}${file2.originalname}${(0, node_crypto_1.randomUUID)()}`).digest("hex") + ext; - await (0, promises_1.mkdir)(this.dir, { recursive: true }); - await (0, promises_1.writeFile)((0, node_path_12.join)(this.dir, stored), file2.buffer); - return this.prisma.uploadedFile.create({ - data: { - url: `/uploads/${stored}`, - originalName: file2.originalname, - mimeType: file2.mimetype, - sizeBytes: file2.size, - purpose: purpose ?? null, - uploadedByAdminUserId: actorAdminUserId - } - }); - } - async findOne(id) { - const f = await this.prisma.uploadedFile.findUnique({ where: { id } }); - if (!f) - throw new common_12.NotFoundException("\u0641\u0627\u06CC\u0644 \u06CC\u0627\u0641\u062A \u0646\u0634\u062F"); - return f; - } - /** True when the stored file is an image, for callers that care. */ - static isImage(mime) { - return AdminUploadsService_1.IMAGE_MIME.test(mime); - } - }; - exports2.AdminUploadsService = AdminUploadsService; - exports2.AdminUploadsService = AdminUploadsService = AdminUploadsService_1 = __decorate4([ - (0, common_12.Injectable)(), - __metadata3("design:paramtypes", [prisma_service_1.PrismaService]) - ], AdminUploadsService); - } -}); - -// dist/modules/admin-uploads/admin-uploads.controller.js -var require_admin_uploads_controller = __commonJS({ - "dist/modules/admin-uploads/admin-uploads.controller.js"(exports2) { - "use strict"; - var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - var __metadata3 = exports2 && exports2.__metadata || function(k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); - }; - var __param3 = exports2 && exports2.__param || function(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AdminUploadsController = void 0; - var common_12 = require_common(); - var platform_express_1 = require_platform_express(); - var admin_uploads_service_1 = require_admin_uploads_service(); - var guards_1 = require_guards2(); - var common_2 = require_common(); - var AdminUploadsController = class AdminUploadsController { - uploads; - constructor(uploads) { - this.uploads = uploads; - } - create(file2, purpose, admin) { - return this.uploads.store(file2, purpose, admin.id ?? null); - } - findOne(id) { - return this.uploads.findOne(id); - } - }; - exports2.AdminUploadsController = AdminUploadsController; - __decorate4([ - (0, common_12.Post)("create"), - (0, common_12.HttpCode)(200), - (0, common_12.UseInterceptors)((0, platform_express_1.FileInterceptor)("file")), - __param3(0, (0, common_12.UploadedFile)()), - __param3(1, (0, common_2.Body)("purpose")), - __param3(2, (0, guards_1.CurrentAdmin)()), - __metadata3("design:type", Function), - __metadata3("design:paramtypes", [Object, Object, Object]), - __metadata3("design:returntype", void 0) - ], AdminUploadsController.prototype, "create", null); - __decorate4([ - (0, common_12.Get)(":id"), - __param3(0, (0, common_12.Param)("id")), - __metadata3("design:type", Function), - __metadata3("design:paramtypes", [String]), - __metadata3("design:returntype", void 0) - ], AdminUploadsController.prototype, "findOne", null); - exports2.AdminUploadsController = AdminUploadsController = __decorate4([ - (0, common_12.Controller)("admin/files"), - __metadata3("design:paramtypes", [admin_uploads_service_1.AdminUploadsService]) - ], AdminUploadsController); - } -}); - -// dist/modules/admin-uploads/public-uploads.controller.js -var require_public_uploads_controller = __commonJS({ - "dist/modules/admin-uploads/public-uploads.controller.js"(exports2) { - "use strict"; - var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - var __metadata3 = exports2 && exports2.__metadata || function(k, v) { - if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); - }; - var __param3 = exports2 && exports2.__param || function(paramIndex, decorator) { - return function(target, key) { - decorator(target, key, paramIndex); - }; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.PublicUploadsController = void 0; - var common_12 = require_common(); - var node_fs_1 = require("node:fs"); - var guards_1 = require_guards2(); - var upload_path_1 = require_upload_path(); - var PublicUploadsController = class PublicUploadsController { - stream(filename) { - const file2 = (0, upload_path_1.resolveStoredUpload)(filename); - if (!file2) - throw new common_12.NotFoundException("\u0641\u0627\u06CC\u0644 \u06CC\u0627\u0641\u062A \u0646\u0634\u062F"); - return new common_12.StreamableFile((0, node_fs_1.createReadStream)(file2), { - type: (0, upload_path_1.mimeForUpload)(file2) ?? "application/octet-stream", - disposition: "inline" - }); - } - }; - exports2.PublicUploadsController = PublicUploadsController; - __decorate4([ - (0, common_12.Get)(":filename"), - (0, common_12.Header)("Cache-Control", "public, max-age=86400"), - __param3(0, (0, common_12.Param)("filename")), - __metadata3("design:type", Function), - __metadata3("design:paramtypes", [String]), - __metadata3("design:returntype", common_12.StreamableFile) - ], PublicUploadsController.prototype, "stream", null); - exports2.PublicUploadsController = PublicUploadsController = __decorate4([ - (0, guards_1.Public)(), - (0, common_12.Controller)("uploads") - ], PublicUploadsController); - } -}); - -// dist/modules/admin-uploads/admin-uploads.module.js -var require_admin_uploads_module = __commonJS({ - "dist/modules/admin-uploads/admin-uploads.module.js"(exports2) { - "use strict"; - var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { - var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; - if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); - else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; - return c > 3 && r && Object.defineProperty(target, key, r), r; - }; - Object.defineProperty(exports2, "__esModule", { value: true }); - exports2.AdminUploadsModule = void 0; - var common_12 = require_common(); - var prisma_module_1 = require_prisma_module(); - var admin_uploads_controller_1 = require_admin_uploads_controller(); - var public_uploads_controller_1 = require_public_uploads_controller(); - var admin_uploads_service_1 = require_admin_uploads_service(); - var AdminUploadsModule = class AdminUploadsModule { - }; - exports2.AdminUploadsModule = AdminUploadsModule; - exports2.AdminUploadsModule = AdminUploadsModule = __decorate4([ - (0, common_12.Module)({ - imports: [prisma_module_1.PrismaModule], - controllers: [admin_uploads_controller_1.AdminUploadsController, public_uploads_controller_1.PublicUploadsController], - providers: [admin_uploads_service_1.AdminUploadsService], - exports: [admin_uploads_service_1.AdminUploadsService] - }) - ], AdminUploadsModule); - } -}); - // dist/modules/admin-dashboard/admin-dashboard.service.js var require_admin_dashboard_service = __commonJS({ "dist/modules/admin-dashboard/admin-dashboard.service.js"(exports2) { @@ -92691,6 +101693,7 @@ var require_admin_dashboard_service = __commonJS({ var common_12 = require_common(); var client_1 = require("@prisma/client"); var prisma_service_1 = require_prisma_service(); + var agent_orders_1 = require_agent_orders(); var AdminDashboardService = class AdminDashboardService { static { AdminDashboardService_1 = this; @@ -92852,7 +101855,7 @@ var require_admin_dashboard_service = __commonJS({ where: { AND: [ AdminDashboardService_1.SOLD, - { customer: { referredByAgentId: a.id } }, + (0, agent_orders_1.agentSalesWhere)(a.id), { createdAt: { gte: since30 } } ] }, @@ -93138,6 +102141,59964 @@ var require_admin_dashboard_module = __commonJS({ } }); +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/under-dash.js +var require_under_dash = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/under-dash.js"(exports2, module2) { + var { toString: toString2 } = Object.prototype; + var escapeHtmlRegex = /["&<>]/; + var _2 = { + each: function each(obj2, cb) { + if (obj2) { + if (Array.isArray(obj2)) { + obj2.forEach(cb); + } else { + Object.keys(obj2).forEach((key) => { + cb(obj2[key], key); + }); + } + } + }, + some: function some(obj2, cb) { + if (obj2) { + if (Array.isArray(obj2)) { + return obj2.some(cb); + } + return Object.keys(obj2).some((key) => cb(obj2[key], key)); + } + return false; + }, + every: function every(obj2, cb) { + if (obj2) { + if (Array.isArray(obj2)) { + return obj2.every(cb); + } + return Object.keys(obj2).every((key) => cb(obj2[key], key)); + } + return true; + }, + map: function map(obj2, cb) { + if (obj2) { + if (Array.isArray(obj2)) { + return obj2.map(cb); + } + return Object.keys(obj2).map((key) => cb(obj2[key], key)); + } + return []; + }, + keyBy(a, p) { + return a.reduce((o, v) => { + o[v[p]] = v; + return o; + }, {}); + }, + isEqual: function isEqual(a, b) { + const aType = typeof a; + const bType = typeof b; + const aArray = Array.isArray(a); + const bArray = Array.isArray(b); + let keys; + if (aType !== bType) { + return false; + } + switch (typeof a) { + case "object": + if (aArray || bArray) { + if (aArray && bArray) { + return a.length === b.length && a.every((aValue, index) => { + const bValue = b[index]; + return _2.isEqual(aValue, bValue); + }); + } + return false; + } + if (a === null || b === null) { + return a === b; + } + keys = Object.keys(a); + if (Object.keys(b).length !== keys.length) { + return false; + } + for (const key of keys) { + if (!b.hasOwnProperty(key)) { + return false; + } + } + return _2.every(a, (aValue, key) => { + const bValue = b[key]; + return _2.isEqual(aValue, bValue); + }); + default: + return a === b; + } + }, + escapeHtml(html) { + const regexResult = escapeHtmlRegex.exec(html); + if (!regexResult) return html; + let result = ""; + let escape2 = ""; + let lastIndex = 0; + let i = regexResult.index; + for (; i < html.length; i++) { + switch (html.charAt(i)) { + case '"': + escape2 = """; + break; + case "&": + escape2 = "&"; + break; + case "'": + escape2 = "'"; + break; + case "<": + escape2 = "<"; + break; + case ">": + escape2 = ">"; + break; + default: + continue; + } + if (lastIndex !== i) result += html.substring(lastIndex, i); + lastIndex = i + 1; + result += escape2; + } + if (lastIndex !== i) return result + html.substring(lastIndex, i); + return result; + }, + strcmp(a, b) { + if (a < b) return -1; + if (a > b) return 1; + return 0; + }, + isUndefined(val) { + return toString2.call(val) === "[object Undefined]"; + }, + isObject(val) { + return toString2.call(val) === "[object Object]"; + }, + deepMerge() { + const target = arguments[0] || {}; + const { length } = arguments; + let src, clone, copyIsArray; + function assignValue(val, key) { + src = target[key]; + copyIsArray = Array.isArray(val); + if (_2.isObject(val) || copyIsArray) { + if (copyIsArray) { + copyIsArray = false; + clone = src && Array.isArray(src) ? src : []; + } else { + clone = src && _2.isObject(src) ? src : {}; + } + target[key] = _2.deepMerge(clone, val); + } else if (!_2.isUndefined(val)) { + target[key] = val; + } + } + for (let i = 0; i < length; i++) { + _2.each(arguments[i], assignValue); + } + return target; + } + }; + module2.exports = _2; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/col-cache.js +var require_col_cache = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/col-cache.js"(exports2, module2) { + var addressRegex = /^[A-Z]+\d+$/; + var colCache = { + _dictionary: [ + "A", + "B", + "C", + "D", + "E", + "F", + "G", + "H", + "I", + "J", + "K", + "L", + "M", + "N", + "O", + "P", + "Q", + "R", + "S", + "T", + "U", + "V", + "W", + "X", + "Y", + "Z" + ], + _l2nFill: 0, + _l2n: {}, + _n2l: [], + _level(n) { + if (n <= 26) { + return 1; + } + if (n <= 26 * 26) { + return 2; + } + return 3; + }, + _fill(level) { + let c; + let v; + let l1; + let l2; + let l3; + let n = 1; + if (level >= 4) { + throw new Error("Out of bounds. Excel supports columns from 1 to 16384"); + } + if (this._l2nFill < 1 && level >= 1) { + while (n <= 26) { + c = this._dictionary[n - 1]; + this._n2l[n] = c; + this._l2n[c] = n; + n++; + } + this._l2nFill = 1; + } + if (this._l2nFill < 2 && level >= 2) { + n = 27; + while (n <= 26 + 26 * 26) { + v = n - (26 + 1); + l1 = v % 26; + l2 = Math.floor(v / 26); + c = this._dictionary[l2] + this._dictionary[l1]; + this._n2l[n] = c; + this._l2n[c] = n; + n++; + } + this._l2nFill = 2; + } + if (this._l2nFill < 3 && level >= 3) { + n = 26 + 26 * 26 + 1; + while (n <= 16384) { + v = n - (26 * 26 + 26 + 1); + l1 = v % 26; + l2 = Math.floor(v / 26) % 26; + l3 = Math.floor(v / (26 * 26)); + c = this._dictionary[l3] + this._dictionary[l2] + this._dictionary[l1]; + this._n2l[n] = c; + this._l2n[c] = n; + n++; + } + this._l2nFill = 3; + } + }, + l2n(l2) { + if (!this._l2n[l2]) { + this._fill(l2.length); + } + if (!this._l2n[l2]) { + throw new Error(`Out of bounds. Invalid column letter: ${l2}`); + } + return this._l2n[l2]; + }, + n2l(n) { + if (n < 1 || n > 16384) { + throw new Error(`${n} is out of bounds. Excel supports columns from 1 to 16384`); + } + if (!this._n2l[n]) { + this._fill(this._level(n)); + } + return this._n2l[n]; + }, + // ========================================================================= + // Address processing + _hash: {}, + // check if value looks like an address + validateAddress(value) { + if (!addressRegex.test(value)) { + throw new Error(`Invalid Address: ${value}`); + } + return true; + }, + // convert address string into structure + decodeAddress(value) { + const addr = value.length < 5 && this._hash[value]; + if (addr) { + return addr; + } + let hasCol = false; + let col = ""; + let colNumber = 0; + let hasRow = false; + let row = ""; + let rowNumber = 0; + for (let i = 0, char; i < value.length; i++) { + char = value.charCodeAt(i); + if (!hasRow && char >= 65 && char <= 90) { + hasCol = true; + col += value[i]; + colNumber = colNumber * 26 + char - 64; + } else if (char >= 48 && char <= 57) { + hasRow = true; + row += value[i]; + rowNumber = rowNumber * 10 + char - 48; + } else if (hasRow && hasCol && char !== 36) { + break; + } + } + if (!hasCol) { + colNumber = void 0; + } else if (colNumber > 16384) { + throw new Error(`Out of bounds. Invalid column letter: ${col}`); + } + if (!hasRow) { + rowNumber = void 0; + } + value = col + row; + const address = { + address: value, + col: colNumber, + row: rowNumber, + $col$row: `$${col}$${row}` + }; + if (colNumber <= 100 && rowNumber <= 100) { + this._hash[value] = address; + this._hash[address.$col$row] = address; + } + return address; + }, + // convert r,c into structure (if only 1 arg, assume r is address string) + getAddress(r, c) { + if (c) { + const address = this.n2l(c) + r; + return this.decodeAddress(address); + } + return this.decodeAddress(r); + }, + // convert [address], [tl:br] into address structures + decode(value) { + const parts = value.split(":"); + if (parts.length === 2) { + const tl = this.decodeAddress(parts[0]); + const br = this.decodeAddress(parts[1]); + const result = { + top: Math.min(tl.row, br.row), + left: Math.min(tl.col, br.col), + bottom: Math.max(tl.row, br.row), + right: Math.max(tl.col, br.col) + }; + result.tl = this.n2l(result.left) + result.top; + result.br = this.n2l(result.right) + result.bottom; + result.dimensions = `${result.tl}:${result.br}`; + return result; + } + return this.decodeAddress(value); + }, + // convert [sheetName!][$]col[$]row[[$]col[$]row] into address or range structures + decodeEx(value) { + const groups = value.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/); + const sheetName = groups[1] || groups[2]; + const reference = groups[3]; + const parts = reference.split(":"); + if (parts.length > 1) { + let tl = this.decodeAddress(parts[0]); + let br = this.decodeAddress(parts[1]); + const top = Math.min(tl.row, br.row); + const left = Math.min(tl.col, br.col); + const bottom = Math.max(tl.row, br.row); + const right = Math.max(tl.col, br.col); + tl = this.n2l(left) + top; + br = this.n2l(right) + bottom; + return { + top, + left, + bottom, + right, + sheetName, + tl: { address: tl, col: left, row: top, $col$row: `$${this.n2l(left)}$${top}`, sheetName }, + br: { + address: br, + col: right, + row: bottom, + $col$row: `$${this.n2l(right)}$${bottom}`, + sheetName + }, + dimensions: `${tl}:${br}` + }; + } + if (reference.startsWith("#")) { + return sheetName ? { sheetName, error: reference } : { error: reference }; + } + const address = this.decodeAddress(reference); + return sheetName ? { sheetName, ...address } : address; + }, + // convert row,col into address string + encodeAddress(row, col) { + return colCache.n2l(col) + row; + }, + // convert row,col into string address or t,l,b,r into range + encode() { + switch (arguments.length) { + case 2: + return colCache.encodeAddress(arguments[0], arguments[1]); + case 4: + return `${colCache.encodeAddress(arguments[0], arguments[1])}:${colCache.encodeAddress( + arguments[2], + arguments[3] + )}`; + default: + throw new Error("Can only encode with 2 or 4 arguments"); + } + }, + // return true if address is contained within range + inRange(range, address) { + const [left, top, , right, bottom] = range; + const [col, row] = address; + return col >= left && col <= right && row >= top && row <= bottom; + } + }; + module2.exports = colCache; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/range.js +var require_range4 = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/range.js"(exports2, module2) { + var colCache = require_col_cache(); + var Range = class _Range { + constructor() { + this.decode(arguments); + } + setTLBR(t, l2, b, r, s) { + if (arguments.length < 4) { + const tl = colCache.decodeAddress(t); + const br = colCache.decodeAddress(l2); + this.model = { + top: Math.min(tl.row, br.row), + left: Math.min(tl.col, br.col), + bottom: Math.max(tl.row, br.row), + right: Math.max(tl.col, br.col), + sheetName: b + }; + this.setTLBR(tl.row, tl.col, br.row, br.col, s); + } else { + this.model = { + top: Math.min(t, b), + left: Math.min(l2, r), + bottom: Math.max(t, b), + right: Math.max(l2, r), + sheetName: s + }; + } + } + decode(argv) { + switch (argv.length) { + case 5: + this.setTLBR(argv[0], argv[1], argv[2], argv[3], argv[4]); + break; + case 4: + this.setTLBR(argv[0], argv[1], argv[2], argv[3]); + break; + case 3: + this.setTLBR(argv[0], argv[1], argv[2]); + break; + case 2: + this.setTLBR(argv[0], argv[1]); + break; + case 1: { + const value = argv[0]; + if (value instanceof _Range) { + this.model = { + top: value.model.top, + left: value.model.left, + bottom: value.model.bottom, + right: value.model.right, + sheetName: value.sheetName + }; + } else if (value instanceof Array) { + this.decode(value); + } else if (value.top && value.left && value.bottom && value.right) { + this.model = { + top: value.top, + left: value.left, + bottom: value.bottom, + right: value.right, + sheetName: value.sheetName + }; + } else { + const tlbr = colCache.decodeEx(value); + if (tlbr.top) { + this.model = { + top: tlbr.top, + left: tlbr.left, + bottom: tlbr.bottom, + right: tlbr.right, + sheetName: tlbr.sheetName + }; + } else { + this.model = { + top: tlbr.row, + left: tlbr.col, + bottom: tlbr.row, + right: tlbr.col, + sheetName: tlbr.sheetName + }; + } + } + break; + } + case 0: + this.model = { + top: 0, + left: 0, + bottom: 0, + right: 0 + }; + break; + default: + throw new Error(`Invalid number of arguments to _getDimensions() - ${argv.length}`); + } + } + get top() { + return this.model.top || 1; + } + set top(value) { + this.model.top = value; + } + get left() { + return this.model.left || 1; + } + set left(value) { + this.model.left = value; + } + get bottom() { + return this.model.bottom || 1; + } + set bottom(value) { + this.model.bottom = value; + } + get right() { + return this.model.right || 1; + } + set right(value) { + this.model.right = value; + } + get sheetName() { + return this.model.sheetName; + } + set sheetName(value) { + this.model.sheetName = value; + } + get _serialisedSheetName() { + const { sheetName } = this.model; + if (sheetName) { + if (/^[a-zA-Z0-9]*$/.test(sheetName)) { + return `${sheetName}!`; + } + return `'${sheetName}'!`; + } + return ""; + } + expand(top, left, bottom, right) { + if (!this.model.top || top < this.top) this.top = top; + if (!this.model.left || left < this.left) this.left = left; + if (!this.model.bottom || bottom > this.bottom) this.bottom = bottom; + if (!this.model.right || right > this.right) this.right = right; + } + expandRow(row) { + if (row) { + const { dimensions, number } = row; + if (dimensions) { + this.expand(number, dimensions.min, number, dimensions.max); + } + } + } + expandToAddress(addressStr) { + const address = colCache.decodeEx(addressStr); + this.expand(address.row, address.col, address.row, address.col); + } + get tl() { + return colCache.n2l(this.left) + this.top; + } + get $t$l() { + return `$${colCache.n2l(this.left)}$${this.top}`; + } + get br() { + return colCache.n2l(this.right) + this.bottom; + } + get $b$r() { + return `$${colCache.n2l(this.right)}$${this.bottom}`; + } + get range() { + return `${this._serialisedSheetName + this.tl}:${this.br}`; + } + get $range() { + return `${this._serialisedSheetName + this.$t$l}:${this.$b$r}`; + } + get shortRange() { + return this.count > 1 ? this.range : this._serialisedSheetName + this.tl; + } + get $shortRange() { + return this.count > 1 ? this.$range : this._serialisedSheetName + this.$t$l; + } + get count() { + return (1 + this.bottom - this.top) * (1 + this.right - this.left); + } + toString() { + return this.range; + } + intersects(other) { + if (other.sheetName && this.sheetName && other.sheetName !== this.sheetName) return false; + if (other.bottom < this.top) return false; + if (other.top > this.bottom) return false; + if (other.right < this.left) return false; + if (other.left > this.right) return false; + return true; + } + contains(addressStr) { + const address = colCache.decodeEx(addressStr); + return this.containsEx(address); + } + containsEx(address) { + if (address.sheetName && this.sheetName && address.sheetName !== this.sheetName) return false; + return address.row >= this.top && address.row <= this.bottom && address.col >= this.left && address.col <= this.right; + } + forEachAddress(cb) { + for (let col = this.left; col <= this.right; col++) { + for (let row = this.top; row <= this.bottom; row++) { + cb(colCache.encodeAddress(row, col), row, col); + } + } + } + }; + module2.exports = Range; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/enums.js +var require_enums3 = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/enums.js"(exports2, module2) { + "use strict"; + module2.exports = { + ValueType: { + Null: 0, + Merge: 1, + Number: 2, + String: 3, + Date: 4, + Hyperlink: 5, + Formula: 6, + SharedString: 7, + RichText: 8, + Boolean: 9, + Error: 10 + }, + FormulaType: { + None: 0, + Master: 1, + Shared: 2 + }, + RelationshipType: { + None: 0, + OfficeDocument: 1, + Worksheet: 2, + CalcChain: 3, + SharedStrings: 4, + Styles: 5, + Theme: 6, + Hyperlink: 7 + }, + DocumentType: { + Xlsx: 1 + }, + ReadingOrder: { + LeftToRight: 1, + RightToLeft: 2 + }, + ErrorValue: { + NotApplicable: "#N/A", + Ref: "#REF!", + Name: "#NAME?", + DivZero: "#DIV/0!", + Null: "#NULL!", + Value: "#VALUE!", + Num: "#NUM!" + } + }; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/shared-formula.js +var require_shared_formula = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/shared-formula.js"(exports2, module2) { + var colCache = require_col_cache(); + var replacementCandidateRx = /(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi; + var CRrx = /^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i; + function slideFormula(formula, fromCell, toCell) { + const offset = colCache.decode(fromCell); + const to = colCache.decode(toCell); + return formula.replace( + replacementCandidateRx, + (refMatch, sheet, sheetMaybe, addrPart, trailingParen) => { + if (trailingParen) { + return refMatch; + } + const match = CRrx.exec(addrPart); + if (match) { + const colDollar = match[1]; + const colStr = match[2].toUpperCase(); + const rowDollar = match[3]; + const rowStr = match[4]; + if (colStr.length > 3 || colStr.length === 3 && colStr > "XFD") { + return refMatch; + } + let col = colCache.l2n(colStr); + let row = parseInt(rowStr, 10); + if (!colDollar) { + col += to.col - offset.col; + } + if (!rowDollar) { + row += to.row - offset.row; + } + const res = (sheet || "") + (colDollar || "") + colCache.n2l(col) + (rowDollar || "") + row; + return res; + } + return refMatch; + } + ); + } + module2.exports = { + slideFormula + }; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/note.js +var require_note = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/note.js"(exports2, module2) { + var _2 = require_under_dash(); + var Note = class _Note { + constructor(note) { + this.note = note; + } + get model() { + let value = null; + switch (typeof this.note) { + case "string": + value = { + type: "note", + note: { + texts: [ + { + text: this.note + } + ] + } + }; + break; + default: + value = { + type: "note", + note: this.note + }; + break; + } + return _2.deepMerge({}, _Note.DEFAULT_CONFIGS, value); + } + set model(value) { + const { note } = value; + const { texts } = note; + if (texts.length === 1 && Object.keys(texts[0]).length === 1) { + this.note = texts[0].text; + } else { + this.note = note; + } + } + static fromModel(model) { + const note = new _Note(); + note.model = model; + return note; + } + }; + Note.DEFAULT_CONFIGS = { + note: { + margins: { + insetmode: "auto", + inset: [0.13, 0.13, 0.25, 0.25] + }, + protection: { + locked: "True", + lockText: "True" + }, + editAs: "absolute" + } + }; + module2.exports = Note; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/cell.js +var require_cell = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/cell.js"(exports2, module2) { + var colCache = require_col_cache(); + var _2 = require_under_dash(); + var Enums = require_enums3(); + var { slideFormula } = require_shared_formula(); + var Note = require_note(); + var Cell = class _Cell { + constructor(row, column, address) { + if (!row || !column) { + throw new Error("A Cell needs a Row"); + } + this._row = row; + this._column = column; + colCache.validateAddress(address); + this._address = address; + this._value = Value.create(_Cell.Types.Null, this); + this.style = this._mergeStyle(row.style, column.style, {}); + this._mergeCount = 0; + } + get worksheet() { + return this._row.worksheet; + } + get workbook() { + return this._row.worksheet.workbook; + } + // help GC by removing cyclic (and other) references + destroy() { + delete this.style; + delete this._value; + delete this._row; + delete this._column; + delete this._address; + } + // ========================================================================= + // Styles stuff + get numFmt() { + return this.style.numFmt; + } + set numFmt(value) { + this.style.numFmt = value; + } + get font() { + return this.style.font; + } + set font(value) { + this.style.font = value; + } + get alignment() { + return this.style.alignment; + } + set alignment(value) { + this.style.alignment = value; + } + get border() { + return this.style.border; + } + set border(value) { + this.style.border = value; + } + get fill() { + return this.style.fill; + } + set fill(value) { + this.style.fill = value; + } + get protection() { + return this.style.protection; + } + set protection(value) { + this.style.protection = value; + } + _mergeStyle(rowStyle, colStyle, style) { + const numFmt = rowStyle && rowStyle.numFmt || colStyle && colStyle.numFmt; + if (numFmt) style.numFmt = numFmt; + const font = rowStyle && rowStyle.font || colStyle && colStyle.font; + if (font) style.font = font; + const alignment = rowStyle && rowStyle.alignment || colStyle && colStyle.alignment; + if (alignment) style.alignment = alignment; + const border = rowStyle && rowStyle.border || colStyle && colStyle.border; + if (border) style.border = border; + const fill = rowStyle && rowStyle.fill || colStyle && colStyle.fill; + if (fill) style.fill = fill; + const protection = rowStyle && rowStyle.protection || colStyle && colStyle.protection; + if (protection) style.protection = protection; + return style; + } + // ========================================================================= + // return the address for this cell + get address() { + return this._address; + } + get row() { + return this._row.number; + } + get col() { + return this._column.number; + } + get $col$row() { + return `$${this._column.letter}$${this.row}`; + } + // ========================================================================= + // Value stuff + get type() { + return this._value.type; + } + get effectiveType() { + return this._value.effectiveType; + } + toCsvString() { + return this._value.toCsvString(); + } + // ========================================================================= + // Merge stuff + addMergeRef() { + this._mergeCount++; + } + releaseMergeRef() { + this._mergeCount--; + } + get isMerged() { + return this._mergeCount > 0 || this.type === _Cell.Types.Merge; + } + merge(master, ignoreStyle) { + this._value.release(); + this._value = Value.create(_Cell.Types.Merge, this, master); + if (!ignoreStyle) { + this.style = master.style; + } + } + unmerge() { + if (this.type === _Cell.Types.Merge) { + this._value.release(); + this._value = Value.create(_Cell.Types.Null, this); + this.style = this._mergeStyle(this._row.style, this._column.style, {}); + } + } + isMergedTo(master) { + if (this._value.type !== _Cell.Types.Merge) return false; + return this._value.isMergedTo(master); + } + get master() { + if (this.type === _Cell.Types.Merge) { + return this._value.master; + } + return this; + } + get isHyperlink() { + return this._value.type === _Cell.Types.Hyperlink; + } + get hyperlink() { + return this._value.hyperlink; + } + // return the value + get value() { + return this._value.value; + } + // set the value - can be number, string or raw + set value(v) { + if (this.type === _Cell.Types.Merge) { + this._value.master.value = v; + return; + } + this._value.release(); + this._value = Value.create(Value.getType(v), this, v); + } + get note() { + return this._comment && this._comment.note; + } + set note(note) { + this._comment = new Note(note); + } + get text() { + return this._value.toString(); + } + get html() { + return _2.escapeHtml(this.text); + } + toString() { + return this.text; + } + _upgradeToHyperlink(hyperlink) { + if (this.type === _Cell.Types.String) { + this._value = Value.create(_Cell.Types.Hyperlink, this, { + text: this._value.value, + hyperlink + }); + } + } + // ========================================================================= + // Formula stuff + get formula() { + return this._value.formula; + } + get result() { + return this._value.result; + } + get formulaType() { + return this._value.formulaType; + } + // ========================================================================= + // Name stuff + get fullAddress() { + const { worksheet } = this._row; + return { + sheetName: worksheet.name, + address: this.address, + row: this.row, + col: this.col + }; + } + get name() { + return this.names[0]; + } + set name(value) { + this.names = [value]; + } + get names() { + return this.workbook.definedNames.getNamesEx(this.fullAddress); + } + set names(value) { + const { definedNames } = this.workbook; + definedNames.removeAllNames(this.fullAddress); + value.forEach((name) => { + definedNames.addEx(this.fullAddress, name); + }); + } + addName(name) { + this.workbook.definedNames.addEx(this.fullAddress, name); + } + removeName(name) { + this.workbook.definedNames.removeEx(this.fullAddress, name); + } + removeAllNames() { + this.workbook.definedNames.removeAllNames(this.fullAddress); + } + // ========================================================================= + // Data Validation stuff + get _dataValidations() { + return this.worksheet.dataValidations; + } + get dataValidation() { + return this._dataValidations.find(this.address); + } + set dataValidation(value) { + this._dataValidations.add(this.address, value); + } + // ========================================================================= + // Model stuff + get model() { + const { model } = this._value; + model.style = this.style; + if (this._comment) { + model.comment = this._comment.model; + } + return model; + } + set model(value) { + this._value.release(); + this._value = Value.create(value.type, this); + this._value.model = value; + if (value.comment) { + switch (value.comment.type) { + case "note": + this._comment = Note.fromModel(value.comment); + break; + } + } + if (value.style) { + this.style = value.style; + } else { + this.style = {}; + } + } + }; + Cell.Types = Enums.ValueType; + var NullValue = class { + constructor(cell) { + this.model = { + address: cell.address, + type: Cell.Types.Null + }; + } + get value() { + return null; + } + set value(value) { + } + get type() { + return Cell.Types.Null; + } + get effectiveType() { + return Cell.Types.Null; + } + get address() { + return this.model.address; + } + set address(value) { + this.model.address = value; + } + toCsvString() { + return ""; + } + release() { + } + toString() { + return ""; + } + }; + var NumberValue = class { + constructor(cell, value) { + this.model = { + address: cell.address, + type: Cell.Types.Number, + value + }; + } + get value() { + return this.model.value; + } + set value(value) { + this.model.value = value; + } + get type() { + return Cell.Types.Number; + } + get effectiveType() { + return Cell.Types.Number; + } + get address() { + return this.model.address; + } + set address(value) { + this.model.address = value; + } + toCsvString() { + return this.model.value.toString(); + } + release() { + } + toString() { + return this.model.value.toString(); + } + }; + var StringValue = class { + constructor(cell, value) { + this.model = { + address: cell.address, + type: Cell.Types.String, + value + }; + } + get value() { + return this.model.value; + } + set value(value) { + this.model.value = value; + } + get type() { + return Cell.Types.String; + } + get effectiveType() { + return Cell.Types.String; + } + get address() { + return this.model.address; + } + set address(value) { + this.model.address = value; + } + toCsvString() { + return `"${this.model.value.replace(/"/g, '""')}"`; + } + release() { + } + toString() { + return this.model.value; + } + }; + var RichTextValue = class { + constructor(cell, value) { + this.model = { + address: cell.address, + type: Cell.Types.String, + value + }; + } + get value() { + return this.model.value; + } + set value(value) { + this.model.value = value; + } + toString() { + return this.model.value.richText.map((t) => t.text).join(""); + } + get type() { + return Cell.Types.RichText; + } + get effectiveType() { + return Cell.Types.RichText; + } + get address() { + return this.model.address; + } + set address(value) { + this.model.address = value; + } + toCsvString() { + return `"${this.text.replace(/"/g, '""')}"`; + } + release() { + } + }; + var DateValue = class { + constructor(cell, value) { + this.model = { + address: cell.address, + type: Cell.Types.Date, + value + }; + } + get value() { + return this.model.value; + } + set value(value) { + this.model.value = value; + } + get type() { + return Cell.Types.Date; + } + get effectiveType() { + return Cell.Types.Date; + } + get address() { + return this.model.address; + } + set address(value) { + this.model.address = value; + } + toCsvString() { + return this.model.value.toISOString(); + } + release() { + } + toString() { + return this.model.value.toString(); + } + }; + var HyperlinkValue = class { + constructor(cell, value) { + this.model = { + address: cell.address, + type: Cell.Types.Hyperlink, + text: value ? value.text : void 0, + hyperlink: value ? value.hyperlink : void 0 + }; + if (value && value.tooltip) { + this.model.tooltip = value.tooltip; + } + } + get value() { + const v = { + text: this.model.text, + hyperlink: this.model.hyperlink + }; + if (this.model.tooltip) { + v.tooltip = this.model.tooltip; + } + return v; + } + set value(value) { + this.model = { + text: value.text, + hyperlink: value.hyperlink + }; + if (value.tooltip) { + this.model.tooltip = value.tooltip; + } + } + get text() { + return this.model.text; + } + set text(value) { + this.model.text = value; + } + /* + get tooltip() { + return this.model.tooltip; + } + + set tooltip(value) { + this.model.tooltip = value; + } */ + get hyperlink() { + return this.model.hyperlink; + } + set hyperlink(value) { + this.model.hyperlink = value; + } + get type() { + return Cell.Types.Hyperlink; + } + get effectiveType() { + return Cell.Types.Hyperlink; + } + get address() { + return this.model.address; + } + set address(value) { + this.model.address = value; + } + toCsvString() { + return this.model.hyperlink; + } + release() { + } + toString() { + return this.model.text; + } + }; + var MergeValue = class { + constructor(cell, master) { + this.model = { + address: cell.address, + type: Cell.Types.Merge, + master: master ? master.address : void 0 + }; + this._master = master; + if (master) { + master.addMergeRef(); + } + } + get value() { + return this._master.value; + } + set value(value) { + if (value instanceof Cell) { + if (this._master) { + this._master.releaseMergeRef(); + } + value.addMergeRef(); + this._master = value; + } else { + this._master.value = value; + } + } + isMergedTo(master) { + return master === this._master; + } + get master() { + return this._master; + } + get type() { + return Cell.Types.Merge; + } + get effectiveType() { + return this._master.effectiveType; + } + get address() { + return this.model.address; + } + set address(value) { + this.model.address = value; + } + toCsvString() { + return ""; + } + release() { + this._master.releaseMergeRef(); + } + toString() { + return this.value.toString(); + } + }; + var FormulaValue = class { + constructor(cell, value) { + this.cell = cell; + this.model = { + address: cell.address, + type: Cell.Types.Formula, + shareType: value ? value.shareType : void 0, + ref: value ? value.ref : void 0, + formula: value ? value.formula : void 0, + sharedFormula: value ? value.sharedFormula : void 0, + result: value ? value.result : void 0 + }; + } + _copyModel(model) { + const copy = {}; + const cp = (name) => { + const value = model[name]; + if (value) { + copy[name] = value; + } + }; + cp("formula"); + cp("result"); + cp("ref"); + cp("shareType"); + cp("sharedFormula"); + return copy; + } + get value() { + return this._copyModel(this.model); + } + set value(value) { + this.model = this._copyModel(value); + } + validate(value) { + switch (Value.getType(value)) { + case Cell.Types.Null: + case Cell.Types.String: + case Cell.Types.Number: + case Cell.Types.Date: + break; + case Cell.Types.Hyperlink: + case Cell.Types.Formula: + default: + throw new Error("Cannot process that type of result value"); + } + } + get dependencies() { + const ranges = this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g); + const cells = this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g, "").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g); + return { + ranges, + cells + }; + } + get formula() { + return this.model.formula || this._getTranslatedFormula(); + } + set formula(value) { + this.model.formula = value; + } + get formulaType() { + if (this.model.formula) { + return Enums.FormulaType.Master; + } + if (this.model.sharedFormula) { + return Enums.FormulaType.Shared; + } + return Enums.FormulaType.None; + } + get result() { + return this.model.result; + } + set result(value) { + this.model.result = value; + } + get type() { + return Cell.Types.Formula; + } + get effectiveType() { + const v = this.model.result; + if (v === null || v === void 0) { + return Enums.ValueType.Null; + } + if (v instanceof String || typeof v === "string") { + return Enums.ValueType.String; + } + if (typeof v === "number") { + return Enums.ValueType.Number; + } + if (v instanceof Date) { + return Enums.ValueType.Date; + } + if (v.text && v.hyperlink) { + return Enums.ValueType.Hyperlink; + } + if (v.formula) { + return Enums.ValueType.Formula; + } + return Enums.ValueType.Null; + } + get address() { + return this.model.address; + } + set address(value) { + this.model.address = value; + } + _getTranslatedFormula() { + if (!this._translatedFormula && this.model.sharedFormula) { + const { worksheet } = this.cell; + const master = worksheet.findCell(this.model.sharedFormula); + this._translatedFormula = master && slideFormula(master.formula, master.address, this.model.address); + } + return this._translatedFormula; + } + toCsvString() { + return `${this.model.result || ""}`; + } + release() { + } + toString() { + return this.model.result ? this.model.result.toString() : ""; + } + }; + var SharedStringValue = class { + constructor(cell, value) { + this.model = { + address: cell.address, + type: Cell.Types.SharedString, + value + }; + } + get value() { + return this.model.value; + } + set value(value) { + this.model.value = value; + } + get type() { + return Cell.Types.SharedString; + } + get effectiveType() { + return Cell.Types.SharedString; + } + get address() { + return this.model.address; + } + set address(value) { + this.model.address = value; + } + toCsvString() { + return this.model.value.toString(); + } + release() { + } + toString() { + return this.model.value.toString(); + } + }; + var BooleanValue = class { + constructor(cell, value) { + this.model = { + address: cell.address, + type: Cell.Types.Boolean, + value + }; + } + get value() { + return this.model.value; + } + set value(value) { + this.model.value = value; + } + get type() { + return Cell.Types.Boolean; + } + get effectiveType() { + return Cell.Types.Boolean; + } + get address() { + return this.model.address; + } + set address(value) { + this.model.address = value; + } + toCsvString() { + return this.model.value ? 1 : 0; + } + release() { + } + toString() { + return this.model.value.toString(); + } + }; + var ErrorValue = class { + constructor(cell, value) { + this.model = { + address: cell.address, + type: Cell.Types.Error, + value + }; + } + get value() { + return this.model.value; + } + set value(value) { + this.model.value = value; + } + get type() { + return Cell.Types.Error; + } + get effectiveType() { + return Cell.Types.Error; + } + get address() { + return this.model.address; + } + set address(value) { + this.model.address = value; + } + toCsvString() { + return this.toString(); + } + release() { + } + toString() { + return this.model.value.error.toString(); + } + }; + var JSONValue = class { + constructor(cell, value) { + this.model = { + address: cell.address, + type: Cell.Types.String, + value: JSON.stringify(value), + rawValue: value + }; + } + get value() { + return this.model.rawValue; + } + set value(value) { + this.model.rawValue = value; + this.model.value = JSON.stringify(value); + } + get type() { + return Cell.Types.String; + } + get effectiveType() { + return Cell.Types.String; + } + get address() { + return this.model.address; + } + set address(value) { + this.model.address = value; + } + toCsvString() { + return this.model.value; + } + release() { + } + toString() { + return this.model.value; + } + }; + var Value = { + getType(value) { + if (value === null || value === void 0) { + return Cell.Types.Null; + } + if (value instanceof String || typeof value === "string") { + return Cell.Types.String; + } + if (typeof value === "number") { + return Cell.Types.Number; + } + if (typeof value === "boolean") { + return Cell.Types.Boolean; + } + if (value instanceof Date) { + return Cell.Types.Date; + } + if (value.text && value.hyperlink) { + return Cell.Types.Hyperlink; + } + if (value.formula || value.sharedFormula) { + return Cell.Types.Formula; + } + if (value.richText) { + return Cell.Types.RichText; + } + if (value.sharedString) { + return Cell.Types.SharedString; + } + if (value.error) { + return Cell.Types.Error; + } + return Cell.Types.JSON; + }, + // map valueType to constructor + types: [ + { t: Cell.Types.Null, f: NullValue }, + { t: Cell.Types.Number, f: NumberValue }, + { t: Cell.Types.String, f: StringValue }, + { t: Cell.Types.Date, f: DateValue }, + { t: Cell.Types.Hyperlink, f: HyperlinkValue }, + { t: Cell.Types.Formula, f: FormulaValue }, + { t: Cell.Types.Merge, f: MergeValue }, + { t: Cell.Types.JSON, f: JSONValue }, + { t: Cell.Types.SharedString, f: SharedStringValue }, + { t: Cell.Types.RichText, f: RichTextValue }, + { t: Cell.Types.Boolean, f: BooleanValue }, + { t: Cell.Types.Error, f: ErrorValue } + ].reduce((p, t) => { + p[t.t] = t.f; + return p; + }, []), + create(type, cell, value) { + const T = this.types[type]; + if (!T) { + throw new Error(`Could not create Value of type ${type}`); + } + return new T(cell, value); + } + }; + module2.exports = Cell; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/row.js +var require_row = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/row.js"(exports2, module2) { + "use strict"; + var _2 = require_under_dash(); + var Enums = require_enums3(); + var colCache = require_col_cache(); + var Cell = require_cell(); + var Row = class { + constructor(worksheet, number) { + this._worksheet = worksheet; + this._number = number; + this._cells = []; + this.style = {}; + this.outlineLevel = 0; + } + // return the row number + get number() { + return this._number; + } + get worksheet() { + return this._worksheet; + } + // Inform Streaming Writer that this row (and all rows before it) are complete + // and ready to write. Has no effect on Worksheet document + commit() { + this._worksheet._commitRow(this); + } + // helps GC by breaking cyclic references + destroy() { + delete this._worksheet; + delete this._cells; + delete this.style; + } + findCell(colNumber) { + return this._cells[colNumber - 1]; + } + // given {address, row, col}, find or create new cell + getCellEx(address) { + let cell = this._cells[address.col - 1]; + if (!cell) { + const column = this._worksheet.getColumn(address.col); + cell = new Cell(this, column, address.address); + this._cells[address.col - 1] = cell; + } + return cell; + } + // get cell by key, letter or column number + getCell(col) { + if (typeof col === "string") { + const column = this._worksheet.getColumnKey(col); + if (column) { + col = column.number; + } else { + col = colCache.l2n(col); + } + } + return this._cells[col - 1] || this.getCellEx({ + address: colCache.encodeAddress(this._number, col), + row: this._number, + col + }); + } + // remove cell(s) and shift all higher cells down by count + splice(start, count, ...inserts) { + const nKeep = start + count; + const nExpand = inserts.length - count; + const nEnd = this._cells.length; + let i; + let cSrc; + let cDst; + if (nExpand < 0) { + for (i = start + inserts.length; i <= nEnd; i++) { + cDst = this._cells[i - 1]; + cSrc = this._cells[i - nExpand - 1]; + if (cSrc) { + cDst = this.getCell(i); + cDst.value = cSrc.value; + cDst.style = cSrc.style; + cDst._comment = cSrc._comment; + } else if (cDst) { + cDst.value = null; + cDst.style = {}; + cDst._comment = void 0; + } + } + } else if (nExpand > 0) { + for (i = nEnd; i >= nKeep; i--) { + cSrc = this._cells[i - 1]; + if (cSrc) { + cDst = this.getCell(i + nExpand); + cDst.value = cSrc.value; + cDst.style = cSrc.style; + cDst._comment = cSrc._comment; + } else { + this._cells[i + nExpand - 1] = void 0; + } + } + } + for (i = 0; i < inserts.length; i++) { + cDst = this.getCell(start + i); + cDst.value = inserts[i]; + cDst.style = {}; + cDst._comment = void 0; + } + } + // Iterate over all non-null cells in this row + eachCell(options, iteratee) { + if (!iteratee) { + iteratee = options; + options = null; + } + if (options && options.includeEmpty) { + const n = this._cells.length; + for (let i = 1; i <= n; i++) { + iteratee(this.getCell(i), i); + } + } else { + this._cells.forEach((cell, index) => { + if (cell && cell.type !== Enums.ValueType.Null) { + iteratee(cell, index + 1); + } + }); + } + } + // =========================================================================== + // Page Breaks + addPageBreak(lft, rght) { + const ws = this._worksheet; + const left = Math.max(0, lft - 1) || 0; + const right = Math.max(0, rght - 1) || 16838; + const pb = { + id: this._number, + max: right, + man: 1 + }; + if (left) pb.min = left; + ws.rowBreaks.push(pb); + } + // return a sparse array of cell values + get values() { + const values = []; + this._cells.forEach((cell) => { + if (cell && cell.type !== Enums.ValueType.Null) { + values[cell.col] = cell.value; + } + }); + return values; + } + // set the values by contiguous or sparse array, or by key'd object literal + set values(value) { + this._cells = []; + if (!value) { + } else if (value instanceof Array) { + let offset = 0; + if (value.hasOwnProperty("0")) { + offset = 1; + } + value.forEach((item, index) => { + if (item !== void 0) { + this.getCellEx({ + address: colCache.encodeAddress(this._number, index + offset), + row: this._number, + col: index + offset + }).value = item; + } + }); + } else { + this._worksheet.eachColumnKey((column, key) => { + if (value[key] !== void 0) { + this.getCellEx({ + address: colCache.encodeAddress(this._number, column.number), + row: this._number, + col: column.number + }).value = value[key]; + } + }); + } + } + // returns true if the row includes at least one cell with a value + get hasValues() { + return _2.some(this._cells, (cell) => cell && cell.type !== Enums.ValueType.Null); + } + get cellCount() { + return this._cells.length; + } + get actualCellCount() { + let count = 0; + this.eachCell(() => { + count++; + }); + return count; + } + // get the min and max column number for the non-null cells in this row or null + get dimensions() { + let min = 0; + let max = 0; + this._cells.forEach((cell) => { + if (cell && cell.type !== Enums.ValueType.Null) { + if (!min || min > cell.col) { + min = cell.col; + } + if (max < cell.col) { + max = cell.col; + } + } + }); + return min > 0 ? { + min, + max + } : null; + } + // ========================================================================= + // styles + _applyStyle(name, value) { + this.style[name] = value; + this._cells.forEach((cell) => { + if (cell) { + cell[name] = value; + } + }); + return value; + } + get numFmt() { + return this.style.numFmt; + } + set numFmt(value) { + this._applyStyle("numFmt", value); + } + get font() { + return this.style.font; + } + set font(value) { + this._applyStyle("font", value); + } + get alignment() { + return this.style.alignment; + } + set alignment(value) { + this._applyStyle("alignment", value); + } + get protection() { + return this.style.protection; + } + set protection(value) { + this._applyStyle("protection", value); + } + get border() { + return this.style.border; + } + set border(value) { + this._applyStyle("border", value); + } + get fill() { + return this.style.fill; + } + set fill(value) { + this._applyStyle("fill", value); + } + get hidden() { + return !!this._hidden; + } + set hidden(value) { + this._hidden = value; + } + get outlineLevel() { + return this._outlineLevel || 0; + } + set outlineLevel(value) { + this._outlineLevel = value; + } + get collapsed() { + return !!(this._outlineLevel && this._outlineLevel >= this._worksheet.properties.outlineLevelRow); + } + // ========================================================================= + get model() { + const cells = []; + let min = 0; + let max = 0; + this._cells.forEach((cell) => { + if (cell) { + const cellModel = cell.model; + if (cellModel) { + if (!min || min > cell.col) { + min = cell.col; + } + if (max < cell.col) { + max = cell.col; + } + cells.push(cellModel); + } + } + }); + return this.height || cells.length ? { + cells, + number: this.number, + min, + max, + height: this.height, + style: this.style, + hidden: this.hidden, + outlineLevel: this.outlineLevel, + collapsed: this.collapsed + } : null; + } + set model(value) { + if (value.number !== this._number) { + throw new Error("Invalid row number in model"); + } + this._cells = []; + let previousAddress; + value.cells.forEach((cellModel) => { + switch (cellModel.type) { + case Cell.Types.Merge: + break; + default: { + let address; + if (cellModel.address) { + address = colCache.decodeAddress(cellModel.address); + } else if (previousAddress) { + const { row } = previousAddress; + const col = previousAddress.col + 1; + address = { + row, + col, + address: colCache.encodeAddress(row, col), + $col$row: `$${colCache.n2l(col)}$${row}` + }; + } + previousAddress = address; + const cell = this.getCellEx(address); + cell.model = cellModel; + break; + } + } + }); + if (value.height) { + this.height = value.height; + } else { + delete this.height; + } + this.hidden = value.hidden; + this.outlineLevel = value.outlineLevel || 0; + this.style = value.style && JSON.parse(JSON.stringify(value.style)) || {}; + } + }; + module2.exports = Row; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/column.js +var require_column = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/column.js"(exports2, module2) { + "use strict"; + var _2 = require_under_dash(); + var Enums = require_enums3(); + var colCache = require_col_cache(); + var DEFAULT_COLUMN_WIDTH = 9; + var Column = class _Column { + constructor(worksheet, number, defn) { + this._worksheet = worksheet; + this._number = number; + if (defn !== false) { + this.defn = defn; + } + } + get number() { + return this._number; + } + get worksheet() { + return this._worksheet; + } + get letter() { + return colCache.n2l(this._number); + } + get isCustomWidth() { + return this.width !== void 0 && this.width !== DEFAULT_COLUMN_WIDTH; + } + get defn() { + return { + header: this._header, + key: this.key, + width: this.width, + style: this.style, + hidden: this.hidden, + outlineLevel: this.outlineLevel + }; + } + set defn(value) { + if (value) { + this.key = value.key; + this.width = value.width !== void 0 ? value.width : DEFAULT_COLUMN_WIDTH; + this.outlineLevel = value.outlineLevel; + if (value.style) { + this.style = value.style; + } else { + this.style = {}; + } + this.header = value.header; + this._hidden = !!value.hidden; + } else { + delete this._header; + delete this._key; + delete this.width; + this.style = {}; + this.outlineLevel = 0; + } + } + get headers() { + return this._header && this._header instanceof Array ? this._header : [this._header]; + } + get header() { + return this._header; + } + set header(value) { + if (value !== void 0) { + this._header = value; + this.headers.forEach((text, index) => { + this._worksheet.getCell(index + 1, this.number).value = text; + }); + } else { + this._header = void 0; + } + } + get key() { + return this._key; + } + set key(value) { + const column = this._key && this._worksheet.getColumnKey(this._key); + if (column === this) { + this._worksheet.deleteColumnKey(this._key); + } + this._key = value; + if (value) { + this._worksheet.setColumnKey(this._key, this); + } + } + get hidden() { + return !!this._hidden; + } + set hidden(value) { + this._hidden = value; + } + get outlineLevel() { + return this._outlineLevel || 0; + } + set outlineLevel(value) { + this._outlineLevel = value; + } + get collapsed() { + return !!(this._outlineLevel && this._outlineLevel >= this._worksheet.properties.outlineLevelCol); + } + toString() { + return JSON.stringify({ + key: this.key, + width: this.width, + headers: this.headers.length ? this.headers : void 0 + }); + } + equivalentTo(other) { + return this.width === other.width && this.hidden === other.hidden && this.outlineLevel === other.outlineLevel && _2.isEqual(this.style, other.style); + } + get isDefault() { + if (this.isCustomWidth) { + return false; + } + if (this.hidden) { + return false; + } + if (this.outlineLevel) { + return false; + } + const s = this.style; + if (s && (s.font || s.numFmt || s.alignment || s.border || s.fill || s.protection)) { + return false; + } + return true; + } + get headerCount() { + return this.headers.length; + } + eachCell(options, iteratee) { + const colNumber = this.number; + if (!iteratee) { + iteratee = options; + options = null; + } + this._worksheet.eachRow(options, (row, rowNumber) => { + iteratee(row.getCell(colNumber), rowNumber); + }); + } + get values() { + const v = []; + this.eachCell((cell, rowNumber) => { + if (cell && cell.type !== Enums.ValueType.Null) { + v[rowNumber] = cell.value; + } + }); + return v; + } + set values(v) { + if (!v) { + return; + } + const colNumber = this.number; + let offset = 0; + if (v.hasOwnProperty("0")) { + offset = 1; + } + v.forEach((value, index) => { + this._worksheet.getCell(index + offset, colNumber).value = value; + }); + } + // ========================================================================= + // styles + _applyStyle(name, value) { + this.style[name] = value; + this.eachCell((cell) => { + cell[name] = value; + }); + return value; + } + get numFmt() { + return this.style.numFmt; + } + set numFmt(value) { + this._applyStyle("numFmt", value); + } + get font() { + return this.style.font; + } + set font(value) { + this._applyStyle("font", value); + } + get alignment() { + return this.style.alignment; + } + set alignment(value) { + this._applyStyle("alignment", value); + } + get protection() { + return this.style.protection; + } + set protection(value) { + this._applyStyle("protection", value); + } + get border() { + return this.style.border; + } + set border(value) { + this._applyStyle("border", value); + } + get fill() { + return this.style.fill; + } + set fill(value) { + this._applyStyle("fill", value); + } + // ============================================================================= + // static functions + static toModel(columns) { + const cols = []; + let col = null; + if (columns) { + columns.forEach((column, index) => { + if (column.isDefault) { + if (col) { + col = null; + } + } else if (!col || !column.equivalentTo(col)) { + col = { + min: index + 1, + max: index + 1, + width: column.width !== void 0 ? column.width : DEFAULT_COLUMN_WIDTH, + style: column.style, + isCustomWidth: column.isCustomWidth, + hidden: column.hidden, + outlineLevel: column.outlineLevel, + collapsed: column.collapsed + }; + cols.push(col); + } else { + col.max = index + 1; + } + }); + } + return cols.length ? cols : void 0; + } + static fromModel(worksheet, cols) { + cols = cols || []; + const columns = []; + let count = 1; + let index = 0; + cols = cols.sort(function(pre, next) { + return pre.min - next.min; + }); + while (index < cols.length) { + const col = cols[index++]; + while (count < col.min) { + columns.push(new _Column(worksheet, count++)); + } + while (count <= col.max) { + columns.push(new _Column(worksheet, count++, col)); + } + } + return columns.length ? columns : null; + } + }; + module2.exports = Column; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/anchor.js +var require_anchor = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/anchor.js"(exports2, module2) { + "use strict"; + var colCache = require_col_cache(); + var Anchor = class _Anchor { + constructor(worksheet, address, offset = 0) { + this.worksheet = worksheet; + if (!address) { + this.nativeCol = 0; + this.nativeColOff = 0; + this.nativeRow = 0; + this.nativeRowOff = 0; + } else if (typeof address === "string") { + const decoded = colCache.decodeAddress(address); + this.nativeCol = decoded.col + offset; + this.nativeColOff = 0; + this.nativeRow = decoded.row + offset; + this.nativeRowOff = 0; + } else if (address.nativeCol !== void 0) { + this.nativeCol = address.nativeCol || 0; + this.nativeColOff = address.nativeColOff || 0; + this.nativeRow = address.nativeRow || 0; + this.nativeRowOff = address.nativeRowOff || 0; + } else if (address.col !== void 0) { + this.col = address.col + offset; + this.row = address.row + offset; + } else { + this.nativeCol = 0; + this.nativeColOff = 0; + this.nativeRow = 0; + this.nativeRowOff = 0; + } + } + static asInstance(model) { + return model instanceof _Anchor || model == null ? model : new _Anchor(model); + } + get col() { + return this.nativeCol + Math.min(this.colWidth - 1, this.nativeColOff) / this.colWidth; + } + set col(v) { + this.nativeCol = Math.floor(v); + this.nativeColOff = Math.floor((v - this.nativeCol) * this.colWidth); + } + get row() { + return this.nativeRow + Math.min(this.rowHeight - 1, this.nativeRowOff) / this.rowHeight; + } + set row(v) { + this.nativeRow = Math.floor(v); + this.nativeRowOff = Math.floor((v - this.nativeRow) * this.rowHeight); + } + get colWidth() { + return this.worksheet && this.worksheet.getColumn(this.nativeCol + 1) && this.worksheet.getColumn(this.nativeCol + 1).isCustomWidth ? Math.floor(this.worksheet.getColumn(this.nativeCol + 1).width * 1e4) : 64e4; + } + get rowHeight() { + return this.worksheet && this.worksheet.getRow(this.nativeRow + 1) && this.worksheet.getRow(this.nativeRow + 1).height ? Math.floor(this.worksheet.getRow(this.nativeRow + 1).height * 1e4) : 18e4; + } + get model() { + return { + nativeCol: this.nativeCol, + nativeColOff: this.nativeColOff, + nativeRow: this.nativeRow, + nativeRowOff: this.nativeRowOff + }; + } + set model(value) { + this.nativeCol = value.nativeCol; + this.nativeColOff = value.nativeColOff; + this.nativeRow = value.nativeRow; + this.nativeRowOff = value.nativeRowOff; + } + }; + module2.exports = Anchor; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/image.js +var require_image = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/image.js"(exports2, module2) { + var colCache = require_col_cache(); + var Anchor = require_anchor(); + var Image = class { + constructor(worksheet, model) { + this.worksheet = worksheet; + this.model = model; + } + get model() { + switch (this.type) { + case "background": + return { + type: this.type, + imageId: this.imageId + }; + case "image": + return { + type: this.type, + imageId: this.imageId, + hyperlinks: this.range.hyperlinks, + range: { + tl: this.range.tl.model, + br: this.range.br && this.range.br.model, + ext: this.range.ext, + editAs: this.range.editAs + } + }; + default: + throw new Error("Invalid Image Type"); + } + } + set model({ type, imageId, range, hyperlinks }) { + this.type = type; + this.imageId = imageId; + if (type === "image") { + if (typeof range === "string") { + const decoded = colCache.decode(range); + this.range = { + tl: new Anchor(this.worksheet, { col: decoded.left, row: decoded.top }, -1), + br: new Anchor(this.worksheet, { col: decoded.right, row: decoded.bottom }, 0), + editAs: "oneCell" + }; + } else { + this.range = { + tl: new Anchor(this.worksheet, range.tl, 0), + br: range.br && new Anchor(this.worksheet, range.br, 0), + ext: range.ext, + editAs: range.editAs, + hyperlinks: hyperlinks || range.hyperlinks + }; + } + } + } + }; + module2.exports = Image; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/table.js +var require_table = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/table.js"(exports2, module2) { + var colCache = require_col_cache(); + var Column = class { + // wrapper around column model, allowing access and manipulation + constructor(table, column, index) { + this.table = table; + this.column = column; + this.index = index; + } + _set(name, value) { + this.table.cacheState(); + this.column[name] = value; + } + /* eslint-disable lines-between-class-members */ + get name() { + return this.column.name; + } + set name(value) { + this._set("name", value); + } + get filterButton() { + return this.column.filterButton; + } + set filterButton(value) { + this.column.filterButton = value; + } + get style() { + return this.column.style; + } + set style(value) { + this.column.style = value; + } + get totalsRowLabel() { + return this.column.totalsRowLabel; + } + set totalsRowLabel(value) { + this._set("totalsRowLabel", value); + } + get totalsRowFunction() { + return this.column.totalsRowFunction; + } + set totalsRowFunction(value) { + this._set("totalsRowFunction", value); + } + get totalsRowResult() { + return this.column.totalsRowResult; + } + set totalsRowResult(value) { + this._set("totalsRowResult", value); + } + get totalsRowFormula() { + return this.column.totalsRowFormula; + } + set totalsRowFormula(value) { + this._set("totalsRowFormula", value); + } + /* eslint-enable lines-between-class-members */ + }; + var Table = class { + constructor(worksheet, table) { + this.worksheet = worksheet; + if (table) { + this.table = table; + this.validate(); + this.store(); + } + } + getFormula(column) { + switch (column.totalsRowFunction) { + case "none": + return null; + case "average": + return `SUBTOTAL(101,${this.table.name}[${column.name}])`; + case "countNums": + return `SUBTOTAL(102,${this.table.name}[${column.name}])`; + case "count": + return `SUBTOTAL(103,${this.table.name}[${column.name}])`; + case "max": + return `SUBTOTAL(104,${this.table.name}[${column.name}])`; + case "min": + return `SUBTOTAL(105,${this.table.name}[${column.name}])`; + case "stdDev": + return `SUBTOTAL(106,${this.table.name}[${column.name}])`; + case "var": + return `SUBTOTAL(107,${this.table.name}[${column.name}])`; + case "sum": + return `SUBTOTAL(109,${this.table.name}[${column.name}])`; + case "custom": + return column.totalsRowFormula; + default: + throw new Error(`Invalid Totals Row Function: ${column.totalsRowFunction}`); + } + } + get width() { + return this.table.columns.length; + } + get height() { + return this.table.rows.length; + } + get filterHeight() { + return this.height + (this.table.headerRow ? 1 : 0); + } + get tableHeight() { + return this.filterHeight + (this.table.totalsRow ? 1 : 0); + } + validate() { + const { table } = this; + const assign = (o, name, dflt) => { + if (o[name] === void 0) { + o[name] = dflt; + } + }; + assign(table, "headerRow", true); + assign(table, "totalsRow", false); + assign(table, "style", {}); + assign(table.style, "theme", "TableStyleMedium2"); + assign(table.style, "showFirstColumn", false); + assign(table.style, "showLastColumn", false); + assign(table.style, "showRowStripes", false); + assign(table.style, "showColumnStripes", false); + const assert = (test, message) => { + if (!test) { + throw new Error(message); + } + }; + assert(table.ref, "Table must have ref"); + assert(table.columns, "Table must have column definitions"); + assert(table.rows, "Table must have row definitions"); + table.tl = colCache.decodeAddress(table.ref); + const { row, col } = table.tl; + assert(row > 0, "Table must be on valid row"); + assert(col > 0, "Table must be on valid col"); + const { width, filterHeight, tableHeight } = this; + table.autoFilterRef = colCache.encode(row, col, row + filterHeight - 1, col + width - 1); + table.tableRef = colCache.encode(row, col, row + tableHeight - 1, col + width - 1); + table.columns.forEach((column, i) => { + assert(column.name, `Column ${i} must have a name`); + if (i === 0) { + assign(column, "totalsRowLabel", "Total"); + } else { + assign(column, "totalsRowFunction", "none"); + column.totalsRowFormula = this.getFormula(column); + } + }); + } + store() { + const assignStyle = (cell, style) => { + if (style) { + Object.keys(style).forEach((key) => { + cell[key] = style[key]; + }); + } + }; + const { worksheet, table } = this; + const { row, col } = table.tl; + let count = 0; + if (table.headerRow) { + const r = worksheet.getRow(row + count++); + table.columns.forEach((column, j) => { + const { style, name } = column; + const cell = r.getCell(col + j); + cell.value = name; + assignStyle(cell, style); + }); + } + table.rows.forEach((data) => { + const r = worksheet.getRow(row + count++); + data.forEach((value, j) => { + const cell = r.getCell(col + j); + cell.value = value; + assignStyle(cell, table.columns[j].style); + }); + }); + if (table.totalsRow) { + const r = worksheet.getRow(row + count++); + table.columns.forEach((column, j) => { + const cell = r.getCell(col + j); + if (j === 0) { + cell.value = column.totalsRowLabel; + } else { + const formula = this.getFormula(column); + if (formula) { + cell.value = { + formula: column.totalsRowFormula, + result: column.totalsRowResult + }; + } else { + cell.value = null; + } + } + assignStyle(cell, column.style); + }); + } + } + load(worksheet) { + const { table } = this; + const { row, col } = table.tl; + let count = 0; + if (table.headerRow) { + const r = worksheet.getRow(row + count++); + table.columns.forEach((column, j) => { + const cell = r.getCell(col + j); + cell.value = column.name; + }); + } + table.rows.forEach((data) => { + const r = worksheet.getRow(row + count++); + data.forEach((value, j) => { + const cell = r.getCell(col + j); + cell.value = value; + }); + }); + if (table.totalsRow) { + const r = worksheet.getRow(row + count++); + table.columns.forEach((column, j) => { + const cell = r.getCell(col + j); + if (j === 0) { + cell.value = column.totalsRowLabel; + } else { + const formula = this.getFormula(column); + if (formula) { + cell.value = { + formula: column.totalsRowFormula, + result: column.totalsRowResult + }; + } + } + }); + } + } + get model() { + return this.table; + } + set model(value) { + this.table = value; + } + // ================================================================ + // TODO: Mutating methods + cacheState() { + if (!this._cache) { + this._cache = { + ref: this.ref, + width: this.width, + tableHeight: this.tableHeight + }; + } + } + commit() { + if (!this._cache) { + return; + } + this.validate(); + const ref = colCache.decodeAddress(this._cache.ref); + if (this.ref !== this._cache.ref) { + for (let i = 0; i < this._cache.tableHeight; i++) { + const row = this.worksheet.getRow(ref.row + i); + for (let j = 0; j < this._cache.width; j++) { + const cell = row.getCell(ref.col + j); + cell.value = null; + } + } + } else { + for (let i = this.tableHeight; i < this._cache.tableHeight; i++) { + const row = this.worksheet.getRow(ref.row + i); + for (let j = 0; j < this._cache.width; j++) { + const cell = row.getCell(ref.col + j); + cell.value = null; + } + } + for (let i = 0; i < this.tableHeight; i++) { + const row = this.worksheet.getRow(ref.row + i); + for (let j = this.width; j < this._cache.width; j++) { + const cell = row.getCell(ref.col + j); + cell.value = null; + } + } + } + this.store(); + } + addRow(values, rowNumber) { + this.cacheState(); + if (rowNumber === void 0) { + this.table.rows.push(values); + } else { + this.table.rows.splice(rowNumber, 0, values); + } + } + removeRows(rowIndex, count = 1) { + this.cacheState(); + this.table.rows.splice(rowIndex, count); + } + getColumn(colIndex) { + const column = this.table.columns[colIndex]; + return new Column(this, column, colIndex); + } + addColumn(column, values, colIndex) { + this.cacheState(); + if (colIndex === void 0) { + this.table.columns.push(column); + this.table.rows.forEach((row, i) => { + row.push(values[i]); + }); + } else { + this.table.columns.splice(colIndex, 0, column); + this.table.rows.forEach((row, i) => { + row.splice(colIndex, 0, values[i]); + }); + } + } + removeColumns(colIndex, count = 1) { + this.cacheState(); + this.table.columns.splice(colIndex, count); + this.table.rows.forEach((row) => { + row.splice(colIndex, count); + }); + } + _assign(target, prop, value) { + this.cacheState(); + target[prop] = value; + } + /* eslint-disable lines-between-class-members */ + get ref() { + return this.table.ref; + } + set ref(value) { + this._assign(this.table, "ref", value); + } + get name() { + return this.table.name; + } + set name(value) { + this.table.name = value; + } + get displayName() { + return this.table.displyName || this.table.name; + } + set displayNamename(value) { + this.table.displayName = value; + } + get headerRow() { + return this.table.headerRow; + } + set headerRow(value) { + this._assign(this.table, "headerRow", value); + } + get totalsRow() { + return this.table.totalsRow; + } + set totalsRow(value) { + this._assign(this.table, "totalsRow", value); + } + get theme() { + return this.table.style.name; + } + set theme(value) { + this.table.style.name = value; + } + get showFirstColumn() { + return this.table.style.showFirstColumn; + } + set showFirstColumn(value) { + this.table.style.showFirstColumn = value; + } + get showLastColumn() { + return this.table.style.showLastColumn; + } + set showLastColumn(value) { + this.table.style.showLastColumn = value; + } + get showRowStripes() { + return this.table.style.showRowStripes; + } + set showRowStripes(value) { + this.table.style.showRowStripes = value; + } + get showColumnStripes() { + return this.table.style.showColumnStripes; + } + set showColumnStripes(value) { + this.table.style.showColumnStripes = value; + } + /* eslint-enable lines-between-class-members */ + }; + module2.exports = Table; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/data-validations.js +var require_data_validations = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/data-validations.js"(exports2, module2) { + var DataValidations = class { + constructor(model) { + this.model = model || {}; + } + add(address, validation) { + return this.model[address] = validation; + } + find(address) { + return this.model[address]; + } + remove(address) { + this.model[address] = void 0; + } + }; + module2.exports = DataValidations; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/encryptor.js +var require_encryptor = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/encryptor.js"(exports2, module2) { + "use strict"; + var crypto5 = require("crypto"); + var Encryptor = { + /** + * Calculate a hash of the concatenated buffers with the given algorithm. + * @param {string} algorithm - The hash algorithm. + * @returns {Buffer} The hash + */ + hash(algorithm, ...buffers) { + const hash = crypto5.createHash(algorithm); + hash.update(Buffer.concat(buffers)); + return hash.digest(); + }, + /** + * Convert a password into an encryption key + * @param {string} password - The password + * @param {string} hashAlgorithm - The hash algoritm + * @param {string} saltValue - The salt value + * @param {number} spinCount - The spin count + * @param {number} keyBits - The length of the key in bits + * @param {Buffer} blockKey - The block key + * @returns {Buffer} The encryption key + */ + convertPasswordToHash(password, hashAlgorithm, saltValue, spinCount) { + hashAlgorithm = hashAlgorithm.toLowerCase(); + const hashes = crypto5.getHashes(); + if (hashes.indexOf(hashAlgorithm) < 0) { + throw new Error(`Hash algorithm '${hashAlgorithm}' not supported!`); + } + const passwordBuffer = Buffer.from(password, "utf16le"); + let key = this.hash(hashAlgorithm, Buffer.from(saltValue, "base64"), passwordBuffer); + for (let i = 0; i < spinCount; i++) { + const iterator = Buffer.alloc(4); + iterator.writeUInt32LE(i, 0); + key = this.hash(hashAlgorithm, key, iterator); + } + return key.toString("base64"); + }, + /** + * Generates cryptographically strong pseudo-random data. + * @param size The size argument is a number indicating the number of bytes to generate. + */ + randomBytes(size) { + return crypto5.randomBytes(size); + } + }; + module2.exports = Encryptor; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/copy-style.js +var require_copy_style = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/copy-style.js"(exports2) { + var oneDepthCopy = (obj2, nestKeys) => ({ + ...obj2, + ...nestKeys.reduce((memo, key) => { + if (obj2[key]) memo[key] = { ...obj2[key] }; + return memo; + }, {}) + }); + var setIfExists = (src, dst, key, nestKeys = []) => { + if (src[key]) dst[key] = oneDepthCopy(src[key], nestKeys); + }; + var isEmptyObj = (obj2) => Object.keys(obj2).length === 0; + var copyStyle = (style) => { + if (!style) return style; + if (isEmptyObj(style)) return {}; + const copied = { ...style }; + setIfExists(style, copied, "font", ["color"]); + setIfExists(style, copied, "alignment"); + setIfExists(style, copied, "protection"); + if (style.border) { + setIfExists(style, copied, "border"); + setIfExists(style.border, copied.border, "top", ["color"]); + setIfExists(style.border, copied.border, "left", ["color"]); + setIfExists(style.border, copied.border, "bottom", ["color"]); + setIfExists(style.border, copied.border, "right", ["color"]); + setIfExists(style.border, copied.border, "diagonal", ["color"]); + } + if (style.fill) { + setIfExists(style, copied, "fill", ["fgColor", "bgColor", "center"]); + if (style.fill.stops) { + copied.fill.stops = style.fill.stops.map((s) => oneDepthCopy(s, ["color"])); + } + } + return copied; + }; + exports2.copyStyle = copyStyle; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/worksheet.js +var require_worksheet = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/worksheet.js"(exports2, module2) { + var _2 = require_under_dash(); + var colCache = require_col_cache(); + var Range = require_range4(); + var Row = require_row(); + var Column = require_column(); + var Enums = require_enums3(); + var Image = require_image(); + var Table = require_table(); + var DataValidations = require_data_validations(); + var Encryptor = require_encryptor(); + var { copyStyle } = require_copy_style(); + var Worksheet = class { + constructor(options) { + options = options || {}; + this._workbook = options.workbook; + this.id = options.id; + this.orderNo = options.orderNo; + this.name = options.name; + this.state = options.state || "visible"; + this._rows = []; + this._columns = null; + this._keys = {}; + this._merges = {}; + this.rowBreaks = []; + this.properties = Object.assign( + {}, + { + defaultRowHeight: 15, + dyDescent: 55, + outlineLevelCol: 0, + outlineLevelRow: 0 + }, + options.properties + ); + this.pageSetup = Object.assign( + {}, + { + margins: { left: 0.7, right: 0.7, top: 0.75, bottom: 0.75, header: 0.3, footer: 0.3 }, + orientation: "portrait", + horizontalDpi: 4294967295, + verticalDpi: 4294967295, + fitToPage: !!(options.pageSetup && (options.pageSetup.fitToWidth || options.pageSetup.fitToHeight) && !options.pageSetup.scale), + pageOrder: "downThenOver", + blackAndWhite: false, + draft: false, + cellComments: "None", + errors: "displayed", + scale: 100, + fitToWidth: 1, + fitToHeight: 1, + paperSize: void 0, + showRowColHeaders: false, + showGridLines: false, + firstPageNumber: void 0, + horizontalCentered: false, + verticalCentered: false, + rowBreaks: null, + colBreaks: null + }, + options.pageSetup + ); + this.headerFooter = Object.assign( + {}, + { + differentFirst: false, + differentOddEven: false, + oddHeader: null, + oddFooter: null, + evenHeader: null, + evenFooter: null, + firstHeader: null, + firstFooter: null + }, + options.headerFooter + ); + this.dataValidations = new DataValidations(); + this.views = options.views || []; + this.autoFilter = options.autoFilter || null; + this._media = []; + this.sheetProtection = null; + this.tables = {}; + this.conditionalFormattings = []; + } + get name() { + return this._name; + } + set name(name) { + if (name === void 0) { + name = `sheet${this.id}`; + } + if (this._name === name) return; + if (typeof name !== "string") { + throw new Error("The name has to be a string."); + } + if (name === "") { + throw new Error("The name can't be empty."); + } + if (name === "History") { + throw new Error('The name "History" is protected. Please use a different name.'); + } + if (/[*?:/\\[\]]/.test(name)) { + throw new Error(`Worksheet name ${name} cannot include any of the following characters: * ? : \\ / [ ]`); + } + if (/(^')|('$)/.test(name)) { + throw new Error(`The first or last character of worksheet name cannot be a single quotation mark: ${name}`); + } + if (name && name.length > 31) { + console.warn(`Worksheet name ${name} exceeds 31 chars. This will be truncated`); + name = name.substring(0, 31); + } + if (this._workbook._worksheets.find((ws) => ws && ws.name.toLowerCase() === name.toLowerCase())) { + throw new Error(`Worksheet name already exists: ${name}`); + } + this._name = name; + } + get workbook() { + return this._workbook; + } + // when you're done with this worksheet, call this to remove from workbook + destroy() { + this._workbook.removeWorksheetEx(this); + } + // Get the bounding range of the cells in this worksheet + get dimensions() { + const dimensions = new Range(); + this._rows.forEach((row) => { + if (row) { + const rowDims = row.dimensions; + if (rowDims) { + dimensions.expand(row.number, rowDims.min, row.number, rowDims.max); + } + } + }); + return dimensions; + } + // ========================================================================= + // Columns + // get the current columns array. + get columns() { + return this._columns; + } + // set the columns from an array of column definitions. + // Note: any headers defined will overwrite existing values. + set columns(value) { + this._headerRowCount = value.reduce((pv, cv) => { + const headerCount = cv.header && 1 || cv.headers && cv.headers.length || 0; + return Math.max(pv, headerCount); + }, 0); + let count = 1; + const columns = this._columns = []; + value.forEach((defn) => { + const column = new Column(this, count++, false); + columns.push(column); + column.defn = defn; + }); + } + getColumnKey(key) { + return this._keys[key]; + } + setColumnKey(key, value) { + this._keys[key] = value; + } + deleteColumnKey(key) { + delete this._keys[key]; + } + eachColumnKey(f) { + _2.each(this._keys, f); + } + // get a single column by col number. If it doesn't exist, create it and any gaps before it + getColumn(c) { + if (typeof c === "string") { + const col = this._keys[c]; + if (col) return col; + c = colCache.l2n(c); + } + if (!this._columns) { + this._columns = []; + } + if (c > this._columns.length) { + let n = this._columns.length + 1; + while (n <= c) { + this._columns.push(new Column(this, n++)); + } + } + return this._columns[c - 1]; + } + spliceColumns(start, count, ...inserts) { + const rows = this._rows; + const nRows = rows.length; + if (inserts.length > 0) { + for (let i = 0; i < nRows; i++) { + const rowArguments = [start, count]; + inserts.forEach((insert) => { + rowArguments.push(insert[i] || null); + }); + const row = this.getRow(i + 1); + row.splice.apply(row, rowArguments); + } + } else { + this._rows.forEach((r) => { + if (r) { + r.splice(start, count); + } + }); + } + const nExpand = inserts.length - count; + const nKeep = start + count; + const nEnd = this._columns.length; + if (nExpand < 0) { + for (let i = start + inserts.length; i <= nEnd; i++) { + this.getColumn(i).defn = this.getColumn(i - nExpand).defn; + } + } else if (nExpand > 0) { + for (let i = nEnd; i >= nKeep; i--) { + this.getColumn(i + nExpand).defn = this.getColumn(i).defn; + } + } + for (let i = start; i < start + inserts.length; i++) { + this.getColumn(i).defn = null; + } + this.workbook.definedNames.spliceColumns(this.name, start, count, inserts.length); + } + get lastColumn() { + return this.getColumn(this.columnCount); + } + get columnCount() { + let maxCount = 0; + this.eachRow((row) => { + maxCount = Math.max(maxCount, row.cellCount); + }); + return maxCount; + } + get actualColumnCount() { + const counts = []; + let count = 0; + this.eachRow((row) => { + row.eachCell(({ col }) => { + if (!counts[col]) { + counts[col] = true; + count++; + } + }); + }); + return count; + } + // ========================================================================= + // Rows + _commitRow() { + } + get _lastRowNumber() { + const rows = this._rows; + let n = rows.length; + while (n > 0 && rows[n - 1] === void 0) { + n--; + } + return n; + } + get _nextRow() { + return this._lastRowNumber + 1; + } + get lastRow() { + if (this._rows.length) { + return this._rows[this._rows.length - 1]; + } + return void 0; + } + // find a row (if exists) by row number + findRow(r) { + return this._rows[r - 1]; + } + // find multiple rows (if exists) by row number + findRows(start, length) { + return this._rows.slice(start - 1, start - 1 + length); + } + get rowCount() { + return this._lastRowNumber; + } + get actualRowCount() { + let count = 0; + this.eachRow(() => { + count++; + }); + return count; + } + // get a row by row number. + getRow(r) { + let row = this._rows[r - 1]; + if (!row) { + row = this._rows[r - 1] = new Row(this, r); + } + return row; + } + // get multiple rows by row number. + getRows(start, length) { + if (length < 1) return void 0; + const rows = []; + for (let i = start; i < start + length; i++) { + rows.push(this.getRow(i)); + } + return rows; + } + addRow(value, style = "n") { + const rowNo = this._nextRow; + const row = this.getRow(rowNo); + row.values = value; + this._setStyleOption(rowNo, style[0] === "i" ? style : "n"); + return row; + } + addRows(value, style = "n") { + const rows = []; + value.forEach((row) => { + rows.push(this.addRow(row, style)); + }); + return rows; + } + insertRow(pos, value, style = "n") { + this.spliceRows(pos, 0, value); + this._setStyleOption(pos, style); + return this.getRow(pos); + } + insertRows(pos, values, style = "n") { + this.spliceRows(pos, 0, ...values); + if (style !== "n") { + for (let i = 0; i < values.length; i++) { + if (style[0] === "o" && this.findRow(values.length + pos + i) !== void 0) { + this._copyStyle(values.length + pos + i, pos + i, style[1] === "+"); + } else if (style[0] === "i" && this.findRow(pos - 1) !== void 0) { + this._copyStyle(pos - 1, pos + i, style[1] === "+"); + } + } + } + return this.getRows(pos, values.length); + } + // set row at position to same style as of either pervious row (option 'i') or next row (option 'o') + _setStyleOption(pos, style = "n") { + if (style[0] === "o" && this.findRow(pos + 1) !== void 0) { + this._copyStyle(pos + 1, pos, style[1] === "+"); + } else if (style[0] === "i" && this.findRow(pos - 1) !== void 0) { + this._copyStyle(pos - 1, pos, style[1] === "+"); + } + } + _copyStyle(src, dest, styleEmpty = false) { + const rSrc = this.getRow(src); + const rDst = this.getRow(dest); + rDst.style = copyStyle(rSrc.style); + rSrc.eachCell({ includeEmpty: styleEmpty }, (cell, colNumber) => { + rDst.getCell(colNumber).style = copyStyle(cell.style); + }); + rDst.height = rSrc.height; + } + duplicateRow(rowNum, count, insert = false) { + const rSrc = this._rows[rowNum - 1]; + const inserts = new Array(count).fill(rSrc.values); + this.spliceRows(rowNum + 1, insert ? 0 : count, ...inserts); + for (let i = 0; i < count; i++) { + const rDst = this._rows[rowNum + i]; + rDst.style = rSrc.style; + rDst.height = rSrc.height; + rSrc.eachCell({ includeEmpty: true }, (cell, colNumber) => { + rDst.getCell(colNumber).style = cell.style; + }); + } + } + spliceRows(start, count, ...inserts) { + const nKeep = start + count; + const nInserts = inserts.length; + const nExpand = nInserts - count; + const nEnd = this._rows.length; + let i; + let rSrc; + if (nExpand < 0) { + if (start === nEnd) { + this._rows[nEnd - 1] = void 0; + } + for (i = nKeep; i <= nEnd; i++) { + rSrc = this._rows[i - 1]; + if (rSrc) { + const rDst = this.getRow(i + nExpand); + rDst.values = rSrc.values; + rDst.style = rSrc.style; + rDst.height = rSrc.height; + rSrc.eachCell({ includeEmpty: true }, (cell, colNumber) => { + rDst.getCell(colNumber).style = cell.style; + }); + this._rows[i - 1] = void 0; + } else { + this._rows[i + nExpand - 1] = void 0; + } + } + } else if (nExpand > 0) { + for (i = nEnd; i >= nKeep; i--) { + rSrc = this._rows[i - 1]; + if (rSrc) { + const rDst = this.getRow(i + nExpand); + rDst.values = rSrc.values; + rDst.style = rSrc.style; + rDst.height = rSrc.height; + rSrc.eachCell({ includeEmpty: true }, (cell, colNumber) => { + rDst.getCell(colNumber).style = cell.style; + if (cell._value.constructor.name === "MergeValue") { + const cellToBeMerged = this.getRow(cell._row._number + nInserts).getCell(colNumber); + const prevMaster = cell._value._master; + const newMaster = this.getRow(prevMaster._row._number + nInserts).getCell(prevMaster._column._number); + cellToBeMerged.merge(newMaster); + } + }); + } else { + this._rows[i + nExpand - 1] = void 0; + } + } + } + for (i = 0; i < nInserts; i++) { + const rDst = this.getRow(start + i); + rDst.style = {}; + rDst.values = inserts[i]; + } + this.workbook.definedNames.spliceRows(this.name, start, count, nInserts); + } + // iterate over every row in the worksheet, including maybe empty rows + eachRow(options, iteratee) { + if (!iteratee) { + iteratee = options; + options = void 0; + } + if (options && options.includeEmpty) { + const n = this._rows.length; + for (let i = 1; i <= n; i++) { + iteratee(this.getRow(i), i); + } + } else { + this._rows.forEach((row) => { + if (row && row.hasValues) { + iteratee(row, row.number); + } + }); + } + } + // return all rows as sparse array + getSheetValues() { + const rows = []; + this._rows.forEach((row) => { + if (row) { + rows[row.number] = row.values; + } + }); + return rows; + } + // ========================================================================= + // Cells + // returns the cell at [r,c] or address given by r. If not found, return undefined + findCell(r, c) { + const address = colCache.getAddress(r, c); + const row = this._rows[address.row - 1]; + return row ? row.findCell(address.col) : void 0; + } + // return the cell at [r,c] or address given by r. If not found, create a new one. + getCell(r, c) { + const address = colCache.getAddress(r, c); + const row = this.getRow(address.row); + return row.getCellEx(address); + } + // ========================================================================= + // Merge + // convert the range defined by ['tl:br'], [tl,br] or [t,l,b,r] into a single 'merged' cell + mergeCells(...cells) { + const dimensions = new Range(cells); + this._mergeCellsInternal(dimensions); + } + mergeCellsWithoutStyle(...cells) { + const dimensions = new Range(cells); + this._mergeCellsInternal(dimensions, true); + } + _mergeCellsInternal(dimensions, ignoreStyle) { + _2.each(this._merges, (merge) => { + if (merge.intersects(dimensions)) { + throw new Error("Cannot merge already merged cells"); + } + }); + const master = this.getCell(dimensions.top, dimensions.left); + for (let i = dimensions.top; i <= dimensions.bottom; i++) { + for (let j = dimensions.left; j <= dimensions.right; j++) { + if (i > dimensions.top || j > dimensions.left) { + this.getCell(i, j).merge(master, ignoreStyle); + } + } + } + this._merges[master.address] = dimensions; + } + _unMergeMaster(master) { + const merge = this._merges[master.address]; + if (merge) { + for (let i = merge.top; i <= merge.bottom; i++) { + for (let j = merge.left; j <= merge.right; j++) { + this.getCell(i, j).unmerge(); + } + } + delete this._merges[master.address]; + } + } + get hasMerges() { + return _2.some(this._merges, Boolean); + } + // scan the range defined by ['tl:br'], [tl,br] or [t,l,b,r] and if any cell is part of a merge, + // un-merge the group. Note this function can affect multiple merges and merge-blocks are + // atomic - either they're all merged or all un-merged. + unMergeCells(...cells) { + const dimensions = new Range(cells); + for (let i = dimensions.top; i <= dimensions.bottom; i++) { + for (let j = dimensions.left; j <= dimensions.right; j++) { + const cell = this.findCell(i, j); + if (cell) { + if (cell.type === Enums.ValueType.Merge) { + this._unMergeMaster(cell.master); + } else if (this._merges[cell.address]) { + this._unMergeMaster(cell); + } + } + } + } + } + // =========================================================================== + // Shared/Array Formula + fillFormula(range, formula, results, shareType = "shared") { + const decoded = colCache.decode(range); + const { top, left, bottom, right } = decoded; + const width = right - left + 1; + const masterAddress = colCache.encodeAddress(top, left); + const isShared = shareType === "shared"; + let getResult; + if (typeof results === "function") { + getResult = results; + } else if (Array.isArray(results)) { + if (Array.isArray(results[0])) { + getResult = (row, col) => results[row - top][col - left]; + } else { + getResult = (row, col) => results[(row - top) * width + (col - left)]; + } + } else { + getResult = () => void 0; + } + let first = true; + for (let r = top; r <= bottom; r++) { + for (let c = left; c <= right; c++) { + if (first) { + this.getCell(r, c).value = { + shareType, + formula, + ref: range, + result: getResult(r, c) + }; + first = false; + } else { + this.getCell(r, c).value = isShared ? { + sharedFormula: masterAddress, + result: getResult(r, c) + } : getResult(r, c); + } + } + } + } + // ========================================================================= + // Images + addImage(imageId, range) { + const model = { + type: "image", + imageId, + range + }; + this._media.push(new Image(this, model)); + } + getImages() { + return this._media.filter((m) => m.type === "image"); + } + addBackgroundImage(imageId) { + const model = { + type: "background", + imageId + }; + this._media.push(new Image(this, model)); + } + getBackgroundImageId() { + const image = this._media.find((m) => m.type === "background"); + return image && image.imageId; + } + // ========================================================================= + // Worksheet Protection + protect(password, options) { + return new Promise((resolve) => { + this.sheetProtection = { + sheet: true + }; + if (options && "spinCount" in options) { + options.spinCount = Number.isFinite(options.spinCount) ? Math.round(Math.max(0, options.spinCount)) : 1e5; + } + if (password) { + this.sheetProtection.algorithmName = "SHA-512"; + this.sheetProtection.saltValue = Encryptor.randomBytes(16).toString("base64"); + this.sheetProtection.spinCount = options && "spinCount" in options ? options.spinCount : 1e5; + this.sheetProtection.hashValue = Encryptor.convertPasswordToHash( + password, + "SHA512", + this.sheetProtection.saltValue, + this.sheetProtection.spinCount + ); + } + if (options) { + this.sheetProtection = Object.assign(this.sheetProtection, options); + if (!password && "spinCount" in options) { + delete this.sheetProtection.spinCount; + } + } + resolve(); + }); + } + unprotect() { + this.sheetProtection = null; + } + // ========================================================================= + // Tables + addTable(model) { + const table = new Table(this, model); + this.tables[model.name] = table; + return table; + } + getTable(name) { + return this.tables[name]; + } + removeTable(name) { + delete this.tables[name]; + } + getTables() { + return Object.values(this.tables); + } + // =========================================================================== + // Conditional Formatting + addConditionalFormatting(cf) { + this.conditionalFormattings.push(cf); + } + removeConditionalFormatting(filter) { + if (typeof filter === "number") { + this.conditionalFormattings.splice(filter, 1); + } else if (filter instanceof Function) { + this.conditionalFormattings = this.conditionalFormattings.filter(filter); + } else { + this.conditionalFormattings = []; + } + } + // =========================================================================== + // Deprecated + get tabColor() { + console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"); + return this.properties.tabColor; + } + set tabColor(value) { + console.trace("worksheet.tabColor property is now deprecated. Please use worksheet.properties.tabColor"); + this.properties.tabColor = value; + } + // =========================================================================== + // Model + get model() { + const model = { + id: this.id, + name: this.name, + dataValidations: this.dataValidations.model, + properties: this.properties, + state: this.state, + pageSetup: this.pageSetup, + headerFooter: this.headerFooter, + rowBreaks: this.rowBreaks, + views: this.views, + autoFilter: this.autoFilter, + media: this._media.map((medium) => medium.model), + sheetProtection: this.sheetProtection, + tables: Object.values(this.tables).map((table) => table.model), + conditionalFormattings: this.conditionalFormattings + }; + model.cols = Column.toModel(this.columns); + const rows = model.rows = []; + const dimensions = model.dimensions = new Range(); + this._rows.forEach((row) => { + const rowModel = row && row.model; + if (rowModel) { + dimensions.expand(rowModel.number, rowModel.min, rowModel.number, rowModel.max); + rows.push(rowModel); + } + }); + model.merges = []; + _2.each(this._merges, (merge) => { + model.merges.push(merge.range); + }); + return model; + } + _parseRows(model) { + this._rows = []; + model.rows.forEach((rowModel) => { + const row = new Row(this, rowModel.number); + this._rows[row.number - 1] = row; + row.model = rowModel; + }); + } + _parseMergeCells(model) { + _2.each(model.mergeCells, (merge) => { + this.mergeCellsWithoutStyle(merge); + }); + } + set model(value) { + this.name = value.name; + this._columns = Column.fromModel(this, value.cols); + this._parseRows(value); + this._parseMergeCells(value); + this.dataValidations = new DataValidations(value.dataValidations); + this.properties = value.properties; + this.pageSetup = value.pageSetup; + this.headerFooter = value.headerFooter; + this.views = value.views; + this.autoFilter = value.autoFilter; + this._media = value.media.map((medium) => new Image(this, medium)); + this.sheetProtection = value.sheetProtection; + this.tables = value.tables.reduce((tables, table) => { + const t = new Table(); + t.model = table; + tables[table.name] = t; + return tables; + }, {}); + this.conditionalFormattings = value.conditionalFormattings; + } + }; + module2.exports = Worksheet; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/cell-matrix.js +var require_cell_matrix = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/cell-matrix.js"(exports2, module2) { + var _2 = require_under_dash(); + var colCache = require_col_cache(); + var CellMatrix = class { + constructor(template) { + this.template = template; + this.sheets = {}; + } + addCell(addressStr) { + this.addCellEx(colCache.decodeEx(addressStr)); + } + getCell(addressStr) { + return this.findCellEx(colCache.decodeEx(addressStr), true); + } + findCell(addressStr) { + return this.findCellEx(colCache.decodeEx(addressStr), false); + } + findCellAt(sheetName, rowNumber, colNumber) { + const sheet = this.sheets[sheetName]; + const row = sheet && sheet[rowNumber]; + return row && row[colNumber]; + } + addCellEx(address) { + if (address.top) { + for (let row = address.top; row <= address.bottom; row++) { + for (let col = address.left; col <= address.right; col++) { + this.getCellAt(address.sheetName, row, col); + } + } + } else { + this.findCellEx(address, true); + } + } + getCellEx(address) { + return this.findCellEx(address, true); + } + findCellEx(address, create) { + const sheet = this.findSheet(address, create); + const row = this.findSheetRow(sheet, address, create); + return this.findRowCell(row, address, create); + } + getCellAt(sheetName, rowNumber, colNumber) { + const sheet = this.sheets[sheetName] || (this.sheets[sheetName] = []); + const row = sheet[rowNumber] || (sheet[rowNumber] = []); + const cell = row[colNumber] || (row[colNumber] = { + sheetName, + address: colCache.n2l(colNumber) + rowNumber, + row: rowNumber, + col: colNumber + }); + return cell; + } + removeCellEx(address) { + const sheet = this.findSheet(address); + if (!sheet) { + return; + } + const row = this.findSheetRow(sheet, address); + if (!row) { + return; + } + delete row[address.col]; + } + forEachInSheet(sheetName, callback) { + const sheet = this.sheets[sheetName]; + if (sheet) { + sheet.forEach((row, rowNumber) => { + if (row) { + row.forEach((cell, colNumber) => { + if (cell) { + callback(cell, rowNumber, colNumber); + } + }); + } + }); + } + } + forEach(callback) { + _2.each(this.sheets, (sheet, sheetName) => { + this.forEachInSheet(sheetName, callback); + }); + } + map(callback) { + const results = []; + this.forEach((cell) => { + results.push(callback(cell)); + }); + return results; + } + findSheet(address, create) { + const name = address.sheetName; + if (this.sheets[name]) { + return this.sheets[name]; + } + if (create) { + return this.sheets[name] = []; + } + return void 0; + } + findSheetRow(sheet, address, create) { + const { row } = address; + if (sheet && sheet[row]) { + return sheet[row]; + } + if (create) { + return sheet[row] = []; + } + return void 0; + } + findRowCell(row, address, create) { + const { col } = address; + if (row && row[col]) { + return row[col]; + } + if (create) { + return row[col] = this.template ? Object.assign(address, JSON.parse(JSON.stringify(this.template))) : address; + } + return void 0; + } + spliceRows(sheetName, start, numDelete, numInsert) { + const sheet = this.sheets[sheetName]; + if (sheet) { + const inserts = []; + for (let i = 0; i < numInsert; i++) { + inserts.push([]); + } + sheet.splice(start, numDelete, ...inserts); + } + } + spliceColumns(sheetName, start, numDelete, numInsert) { + const sheet = this.sheets[sheetName]; + if (sheet) { + const inserts = []; + for (let i = 0; i < numInsert; i++) { + inserts.push(null); + } + _2.each(sheet, (row) => { + row.splice(start, numDelete, ...inserts); + }); + } + } + }; + module2.exports = CellMatrix; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/defined-names.js +var require_defined_names = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/defined-names.js"(exports2, module2) { + "use strict"; + var _2 = require_under_dash(); + var colCache = require_col_cache(); + var CellMatrix = require_cell_matrix(); + var Range = require_range4(); + var rangeRegexp = /[$](\w+)[$](\d+)(:[$](\w+)[$](\d+))?/; + var DefinedNames = class { + constructor() { + this.matrixMap = {}; + } + getMatrix(name) { + const matrix = this.matrixMap[name] || (this.matrixMap[name] = new CellMatrix()); + return matrix; + } + // add a name to a cell. locStr in the form SheetName!$col$row or SheetName!$c1$r1:$c2:$r2 + add(locStr, name) { + const location = colCache.decodeEx(locStr); + this.addEx(location, name); + } + addEx(location, name) { + const matrix = this.getMatrix(name); + if (location.top) { + for (let col = location.left; col <= location.right; col++) { + for (let row = location.top; row <= location.bottom; row++) { + const address = { + sheetName: location.sheetName, + address: colCache.n2l(col) + row, + row, + col + }; + matrix.addCellEx(address); + } + } + } else { + matrix.addCellEx(location); + } + } + remove(locStr, name) { + const location = colCache.decodeEx(locStr); + this.removeEx(location, name); + } + removeEx(location, name) { + const matrix = this.getMatrix(name); + matrix.removeCellEx(location); + } + removeAllNames(location) { + _2.each(this.matrixMap, (matrix) => { + matrix.removeCellEx(location); + }); + } + forEach(callback) { + _2.each(this.matrixMap, (matrix, name) => { + matrix.forEach((cell) => { + callback(name, cell); + }); + }); + } + // get all the names of a cell + getNames(addressStr) { + return this.getNamesEx(colCache.decodeEx(addressStr)); + } + getNamesEx(address) { + return _2.map(this.matrixMap, (matrix, name) => matrix.findCellEx(address) && name).filter( + Boolean + ); + } + _explore(matrix, cell) { + cell.mark = false; + const { sheetName } = cell; + const range = new Range(cell.row, cell.col, cell.row, cell.col, sheetName); + let x; + let y; + function vGrow(yy, edge) { + const c = matrix.findCellAt(sheetName, yy, cell.col); + if (!c || !c.mark) { + return false; + } + range[edge] = yy; + c.mark = false; + return true; + } + for (y = cell.row - 1; vGrow(y, "top"); y--) ; + for (y = cell.row + 1; vGrow(y, "bottom"); y++) ; + function hGrow(xx, edge) { + const cells = []; + for (y = range.top; y <= range.bottom; y++) { + const c = matrix.findCellAt(sheetName, y, xx); + if (c && c.mark) { + cells.push(c); + } else { + return false; + } + } + range[edge] = xx; + for (let i = 0; i < cells.length; i++) { + cells[i].mark = false; + } + return true; + } + for (x = cell.col - 1; hGrow(x, "left"); x--) ; + for (x = cell.col + 1; hGrow(x, "right"); x++) ; + return range; + } + getRanges(name, matrix) { + matrix = matrix || this.matrixMap[name]; + if (!matrix) { + return { name, ranges: [] }; + } + matrix.forEach((cell) => { + cell.mark = true; + }); + const ranges = matrix.map((cell) => cell.mark && this._explore(matrix, cell)).filter(Boolean).map((range) => range.$shortRange); + return { + name, + ranges + }; + } + normaliseMatrix(matrix, sheetName) { + matrix.forEachInSheet(sheetName, (cell, row, col) => { + if (cell) { + if (cell.row !== row || cell.col !== col) { + cell.row = row; + cell.col = col; + cell.address = colCache.n2l(col) + row; + } + } + }); + } + spliceRows(sheetName, start, numDelete, numInsert) { + _2.each(this.matrixMap, (matrix) => { + matrix.spliceRows(sheetName, start, numDelete, numInsert); + this.normaliseMatrix(matrix, sheetName); + }); + } + spliceColumns(sheetName, start, numDelete, numInsert) { + _2.each(this.matrixMap, (matrix) => { + matrix.spliceColumns(sheetName, start, numDelete, numInsert); + this.normaliseMatrix(matrix, sheetName); + }); + } + get model() { + return _2.map(this.matrixMap, (matrix, name) => this.getRanges(name, matrix)).filter( + (definedName) => definedName.ranges.length + ); + } + set model(value) { + const matrixMap = this.matrixMap = {}; + value.forEach((definedName) => { + const matrix = matrixMap[definedName.name] = new CellMatrix(); + definedName.ranges.forEach((rangeStr) => { + if (rangeRegexp.test(rangeStr.split("!").pop() || "")) { + matrix.addCell(rangeStr); + } + }); + }); + } + }; + module2.exports = DefinedNames; + } +}); + +// ../../node_modules/.pnpm/process-nextick-args@2.0.1/node_modules/process-nextick-args/index.js +var require_process_nextick_args = __commonJS({ + "../../node_modules/.pnpm/process-nextick-args@2.0.1/node_modules/process-nextick-args/index.js"(exports2, module2) { + "use strict"; + if (typeof process === "undefined" || !process.version || process.version.indexOf("v0.") === 0 || process.version.indexOf("v1.") === 0 && process.version.indexOf("v1.8.") !== 0) { + module2.exports = { nextTick }; + } else { + module2.exports = process; + } + function nextTick(fn, arg1, arg2, arg3) { + if (typeof fn !== "function") { + throw new TypeError('"callback" argument must be a function'); + } + var len = arguments.length; + var args, i; + switch (len) { + case 0: + case 1: + return process.nextTick(fn); + case 2: + return process.nextTick(function afterTickOne() { + fn.call(null, arg1); + }); + case 3: + return process.nextTick(function afterTickTwo() { + fn.call(null, arg1, arg2); + }); + case 4: + return process.nextTick(function afterTickThree() { + fn.call(null, arg1, arg2, arg3); + }); + default: + args = new Array(len - 1); + i = 0; + while (i < args.length) { + args[i++] = arguments[i]; + } + return process.nextTick(function afterTick() { + fn.apply(null, args); + }); + } + } + } +}); + +// ../../node_modules/.pnpm/isarray@1.0.0/node_modules/isarray/index.js +var require_isarray = __commonJS({ + "../../node_modules/.pnpm/isarray@1.0.0/node_modules/isarray/index.js"(exports2, module2) { + var toString2 = {}.toString; + module2.exports = Array.isArray || function(arr) { + return toString2.call(arr) == "[object Array]"; + }; + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/internal/streams/stream.js +var require_stream2 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/internal/streams/stream.js"(exports2, module2) { + module2.exports = require("stream"); + } +}); + +// ../../node_modules/.pnpm/safe-buffer@5.1.2/node_modules/safe-buffer/index.js +var require_safe_buffer2 = __commonJS({ + "../../node_modules/.pnpm/safe-buffer@5.1.2/node_modules/safe-buffer/index.js"(exports2, module2) { + var buffer = require("buffer"); + var Buffer2 = buffer.Buffer; + function copyProps(src, dst) { + for (var key in src) { + dst[key] = src[key]; + } + } + if (Buffer2.from && Buffer2.alloc && Buffer2.allocUnsafe && Buffer2.allocUnsafeSlow) { + module2.exports = buffer; + } else { + copyProps(buffer, exports2); + exports2.Buffer = SafeBuffer; + } + function SafeBuffer(arg, encodingOrOffset, length) { + return Buffer2(arg, encodingOrOffset, length); + } + copyProps(Buffer2, SafeBuffer); + SafeBuffer.from = function(arg, encodingOrOffset, length) { + if (typeof arg === "number") { + throw new TypeError("Argument must not be a number"); + } + return Buffer2(arg, encodingOrOffset, length); + }; + SafeBuffer.alloc = function(size, fill, encoding) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + var buf = Buffer2(size); + if (fill !== void 0) { + if (typeof encoding === "string") { + buf.fill(fill, encoding); + } else { + buf.fill(fill); + } + } else { + buf.fill(0); + } + return buf; + }; + SafeBuffer.allocUnsafe = function(size) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + return Buffer2(size); + }; + SafeBuffer.allocUnsafeSlow = function(size) { + if (typeof size !== "number") { + throw new TypeError("Argument must be a number"); + } + return buffer.SlowBuffer(size); + }; + } +}); + +// ../../node_modules/.pnpm/core-util-is@1.0.3/node_modules/core-util-is/lib/util.js +var require_util2 = __commonJS({ + "../../node_modules/.pnpm/core-util-is@1.0.3/node_modules/core-util-is/lib/util.js"(exports2) { + function isArray(arg) { + if (Array.isArray) { + return Array.isArray(arg); + } + return objectToString(arg) === "[object Array]"; + } + exports2.isArray = isArray; + function isBoolean(arg) { + return typeof arg === "boolean"; + } + exports2.isBoolean = isBoolean; + function isNull(arg) { + return arg === null; + } + exports2.isNull = isNull; + function isNullOrUndefined(arg) { + return arg == null; + } + exports2.isNullOrUndefined = isNullOrUndefined; + function isNumber(arg) { + return typeof arg === "number"; + } + exports2.isNumber = isNumber; + function isString(arg) { + return typeof arg === "string"; + } + exports2.isString = isString; + function isSymbol(arg) { + return typeof arg === "symbol"; + } + exports2.isSymbol = isSymbol; + function isUndefined(arg) { + return arg === void 0; + } + exports2.isUndefined = isUndefined; + function isRegExp(re) { + return objectToString(re) === "[object RegExp]"; + } + exports2.isRegExp = isRegExp; + function isObject2(arg) { + return typeof arg === "object" && arg !== null; + } + exports2.isObject = isObject2; + function isDate(d) { + return objectToString(d) === "[object Date]"; + } + exports2.isDate = isDate; + function isError2(e) { + return objectToString(e) === "[object Error]" || e instanceof Error; + } + exports2.isError = isError2; + function isFunction(arg) { + return typeof arg === "function"; + } + exports2.isFunction = isFunction; + function isPrimitive2(arg) { + return arg === null || typeof arg === "boolean" || typeof arg === "number" || typeof arg === "string" || typeof arg === "symbol" || // ES6 symbol + typeof arg === "undefined"; + } + exports2.isPrimitive = isPrimitive2; + exports2.isBuffer = require("buffer").Buffer.isBuffer; + function objectToString(o) { + return Object.prototype.toString.call(o); + } + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/internal/streams/BufferList.js +var require_BufferList = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/internal/streams/BufferList.js"(exports2, module2) { + "use strict"; + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + var Buffer2 = require_safe_buffer2().Buffer; + var util2 = require("util"); + function copyBuffer(src, target, offset) { + src.copy(target, offset); + } + module2.exports = (function() { + function BufferList() { + _classCallCheck(this, BufferList); + this.head = null; + this.tail = null; + this.length = 0; + } + BufferList.prototype.push = function push(v) { + var entry = { data: v, next: null }; + if (this.length > 0) this.tail.next = entry; + else this.head = entry; + this.tail = entry; + ++this.length; + }; + BufferList.prototype.unshift = function unshift(v) { + var entry = { data: v, next: this.head }; + if (this.length === 0) this.tail = entry; + this.head = entry; + ++this.length; + }; + BufferList.prototype.shift = function shift() { + if (this.length === 0) return; + var ret2 = this.head.data; + if (this.length === 1) this.head = this.tail = null; + else this.head = this.head.next; + --this.length; + return ret2; + }; + BufferList.prototype.clear = function clear() { + this.head = this.tail = null; + this.length = 0; + }; + BufferList.prototype.join = function join(s) { + if (this.length === 0) return ""; + var p = this.head; + var ret2 = "" + p.data; + while (p = p.next) { + ret2 += s + p.data; + } + return ret2; + }; + BufferList.prototype.concat = function concat(n) { + if (this.length === 0) return Buffer2.alloc(0); + var ret2 = Buffer2.allocUnsafe(n >>> 0); + var p = this.head; + var i = 0; + while (p) { + copyBuffer(p.data, ret2, i); + i += p.data.length; + p = p.next; + } + return ret2; + }; + return BufferList; + })(); + if (util2 && util2.inspect && util2.inspect.custom) { + module2.exports.prototype[util2.inspect.custom] = function() { + var obj2 = util2.inspect({ length: this.length }); + return this.constructor.name + " " + obj2; + }; + } + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/internal/streams/destroy.js +var require_destroy3 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/internal/streams/destroy.js"(exports2, module2) { + "use strict"; + var pna = require_process_nextick_args(); + function destroy(err, cb) { + var _this = this; + var readableDestroyed = this._readableState && this._readableState.destroyed; + var writableDestroyed = this._writableState && this._writableState.destroyed; + if (readableDestroyed || writableDestroyed) { + if (cb) { + cb(err); + } else if (err) { + if (!this._writableState) { + pna.nextTick(emitErrorNT, this, err); + } else if (!this._writableState.errorEmitted) { + this._writableState.errorEmitted = true; + pna.nextTick(emitErrorNT, this, err); + } + } + return this; + } + if (this._readableState) { + this._readableState.destroyed = true; + } + if (this._writableState) { + this._writableState.destroyed = true; + } + this._destroy(err || null, function(err2) { + if (!cb && err2) { + if (!_this._writableState) { + pna.nextTick(emitErrorNT, _this, err2); + } else if (!_this._writableState.errorEmitted) { + _this._writableState.errorEmitted = true; + pna.nextTick(emitErrorNT, _this, err2); + } + } else if (cb) { + cb(err2); + } + }); + return this; + } + function undestroy() { + if (this._readableState) { + this._readableState.destroyed = false; + this._readableState.reading = false; + this._readableState.ended = false; + this._readableState.endEmitted = false; + } + if (this._writableState) { + this._writableState.destroyed = false; + this._writableState.ended = false; + this._writableState.ending = false; + this._writableState.finalCalled = false; + this._writableState.prefinished = false; + this._writableState.finished = false; + this._writableState.errorEmitted = false; + } + } + function emitErrorNT(self2, err) { + self2.emit("error", err); + } + module2.exports = { + destroy, + undestroy + }; + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/_stream_writable.js +var require_stream_writable2 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/_stream_writable.js"(exports2, module2) { + "use strict"; + var pna = require_process_nextick_args(); + module2.exports = Writable; + function CorkedRequest(state) { + var _this = this; + this.next = null; + this.entry = null; + this.finish = function() { + onCorkedFinish(_this, state); + }; + } + var asyncWrite = !process.browser && ["v0.10", "v0.9."].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : pna.nextTick; + var Duplex; + Writable.WritableState = WritableState; + var util2 = Object.create(require_util2()); + util2.inherits = require_inherits(); + var internalUtil = { + deprecate: require_node2() + }; + var Stream = require_stream2(); + var Buffer2 = require_safe_buffer2().Buffer; + var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() { + }; + function _uint8ArrayToBuffer(chunk) { + return Buffer2.from(chunk); + } + function _isUint8Array(obj2) { + return Buffer2.isBuffer(obj2) || obj2 instanceof OurUint8Array; + } + var destroyImpl = require_destroy3(); + util2.inherits(Writable, Stream); + function nop() { + } + function WritableState(options, stream) { + Duplex = Duplex || require_stream_duplex2(); + options = options || {}; + var isDuplex = stream instanceof Duplex; + this.objectMode = !!options.objectMode; + if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; + var hwm = options.highWaterMark; + var writableHwm = options.writableHighWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + if (hwm || hwm === 0) this.highWaterMark = hwm; + else if (isDuplex && (writableHwm || writableHwm === 0)) this.highWaterMark = writableHwm; + else this.highWaterMark = defaultHwm; + this.highWaterMark = Math.floor(this.highWaterMark); + this.finalCalled = false; + this.needDrain = false; + this.ending = false; + this.ended = false; + this.finished = false; + this.destroyed = false; + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + this.defaultEncoding = options.defaultEncoding || "utf8"; + this.length = 0; + this.writing = false; + this.corked = 0; + this.sync = true; + this.bufferProcessing = false; + this.onwrite = function(er) { + onwrite(stream, er); + }; + this.writecb = null; + this.writelen = 0; + this.bufferedRequest = null; + this.lastBufferedRequest = null; + this.pendingcb = 0; + this.prefinished = false; + this.errorEmitted = false; + this.bufferedRequestCount = 0; + this.corkedRequestsFree = new CorkedRequest(this); + } + WritableState.prototype.getBuffer = function getBuffer() { + var current = this.bufferedRequest; + var out = []; + while (current) { + out.push(current); + current = current.next; + } + return out; + }; + (function() { + try { + Object.defineProperty(WritableState.prototype, "buffer", { + get: internalUtil.deprecate(function() { + return this.getBuffer(); + }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003") + }); + } catch (_2) { + } + })(); + var realHasInstance; + if (typeof Symbol === "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === "function") { + realHasInstance = Function.prototype[Symbol.hasInstance]; + Object.defineProperty(Writable, Symbol.hasInstance, { + value: function(object) { + if (realHasInstance.call(this, object)) return true; + if (this !== Writable) return false; + return object && object._writableState instanceof WritableState; + } + }); + } else { + realHasInstance = function(object) { + return object instanceof this; + }; + } + function Writable(options) { + Duplex = Duplex || require_stream_duplex2(); + if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { + return new Writable(options); + } + this._writableState = new WritableState(options, this); + this.writable = true; + if (options) { + if (typeof options.write === "function") this._write = options.write; + if (typeof options.writev === "function") this._writev = options.writev; + if (typeof options.destroy === "function") this._destroy = options.destroy; + if (typeof options.final === "function") this._final = options.final; + } + Stream.call(this); + } + Writable.prototype.pipe = function() { + this.emit("error", new Error("Cannot pipe, not readable")); + }; + function writeAfterEnd(stream, cb) { + var er = new Error("write after end"); + stream.emit("error", er); + pna.nextTick(cb, er); + } + function validChunk(stream, state, chunk, cb) { + var valid = true; + var er = false; + if (chunk === null) { + er = new TypeError("May not write null values to stream"); + } else if (typeof chunk !== "string" && chunk !== void 0 && !state.objectMode) { + er = new TypeError("Invalid non-string/buffer chunk"); + } + if (er) { + stream.emit("error", er); + pna.nextTick(cb, er); + valid = false; + } + return valid; + } + Writable.prototype.write = function(chunk, encoding, cb) { + var state = this._writableState; + var ret2 = false; + var isBuf = !state.objectMode && _isUint8Array(chunk); + if (isBuf && !Buffer2.isBuffer(chunk)) { + chunk = _uint8ArrayToBuffer(chunk); + } + if (typeof encoding === "function") { + cb = encoding; + encoding = null; + } + if (isBuf) encoding = "buffer"; + else if (!encoding) encoding = state.defaultEncoding; + if (typeof cb !== "function") cb = nop; + if (state.ended) writeAfterEnd(this, cb); + else if (isBuf || validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret2 = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); + } + return ret2; + }; + Writable.prototype.cork = function() { + var state = this._writableState; + state.corked++; + }; + Writable.prototype.uncork = function() { + var state = this._writableState; + if (state.corked) { + state.corked--; + if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); + } + }; + Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { + if (typeof encoding === "string") encoding = encoding.toLowerCase(); + if (!(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((encoding + "").toLowerCase()) > -1)) throw new TypeError("Unknown encoding: " + encoding); + this._writableState.defaultEncoding = encoding; + return this; + }; + function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && state.decodeStrings !== false && typeof chunk === "string") { + chunk = Buffer2.from(chunk, encoding); + } + return chunk; + } + Object.defineProperty(Writable.prototype, "writableHighWaterMark", { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function() { + return this._writableState.highWaterMark; + } + }); + function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { + if (!isBuf) { + var newChunk = decodeChunk(state, chunk, encoding); + if (chunk !== newChunk) { + isBuf = true; + encoding = "buffer"; + chunk = newChunk; + } + } + var len = state.objectMode ? 1 : chunk.length; + state.length += len; + var ret2 = state.length < state.highWaterMark; + if (!ret2) state.needDrain = true; + if (state.writing || state.corked) { + var last = state.lastBufferedRequest; + state.lastBufferedRequest = { + chunk, + encoding, + isBuf, + callback: cb, + next: null + }; + if (last) { + last.next = state.lastBufferedRequest; + } else { + state.bufferedRequest = state.lastBufferedRequest; + } + state.bufferedRequestCount += 1; + } else { + doWrite(stream, state, false, len, chunk, encoding, cb); + } + return ret2; + } + function doWrite(stream, state, writev, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + if (writev) stream._writev(chunk, state.onwrite); + else stream._write(chunk, encoding, state.onwrite); + state.sync = false; + } + function onwriteError(stream, state, sync, er, cb) { + --state.pendingcb; + if (sync) { + pna.nextTick(cb, er); + pna.nextTick(finishMaybe, stream, state); + stream._writableState.errorEmitted = true; + stream.emit("error", er); + } else { + cb(er); + stream._writableState.errorEmitted = true; + stream.emit("error", er); + finishMaybe(stream, state); + } + } + function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; + } + function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + onwriteStateUpdate(state); + if (er) onwriteError(stream, state, sync, er, cb); + else { + var finished = needFinish(state); + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { + clearBuffer(stream, state); + } + if (sync) { + asyncWrite(afterWrite, stream, state, finished, cb); + } else { + afterWrite(stream, state, finished, cb); + } + } + } + function afterWrite(stream, state, finished, cb) { + if (!finished) onwriteDrain(stream, state); + state.pendingcb--; + cb(); + finishMaybe(stream, state); + } + function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit("drain"); + } + } + function clearBuffer(stream, state) { + state.bufferProcessing = true; + var entry = state.bufferedRequest; + if (stream._writev && entry && entry.next) { + var l2 = state.bufferedRequestCount; + var buffer = new Array(l2); + var holder = state.corkedRequestsFree; + holder.entry = entry; + var count = 0; + var allBuffers = true; + while (entry) { + buffer[count] = entry; + if (!entry.isBuf) allBuffers = false; + entry = entry.next; + count += 1; + } + buffer.allBuffers = allBuffers; + doWrite(stream, state, true, state.length, buffer, "", holder.finish); + state.pendingcb++; + state.lastBufferedRequest = null; + if (holder.next) { + state.corkedRequestsFree = holder.next; + holder.next = null; + } else { + state.corkedRequestsFree = new CorkedRequest(state); + } + state.bufferedRequestCount = 0; + } else { + while (entry) { + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + doWrite(stream, state, false, len, chunk, encoding, cb); + entry = entry.next; + state.bufferedRequestCount--; + if (state.writing) { + break; + } + } + if (entry === null) state.lastBufferedRequest = null; + } + state.bufferedRequest = entry; + state.bufferProcessing = false; + } + Writable.prototype._write = function(chunk, encoding, cb) { + cb(new Error("_write() is not implemented")); + }; + Writable.prototype._writev = null; + Writable.prototype.end = function(chunk, encoding, cb) { + var state = this._writableState; + if (typeof chunk === "function") { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === "function") { + cb = encoding; + encoding = null; + } + if (chunk !== null && chunk !== void 0) this.write(chunk, encoding); + if (state.corked) { + state.corked = 1; + this.uncork(); + } + if (!state.ending) endWritable(this, state, cb); + }; + function needFinish(state) { + return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; + } + function callFinal(stream, state) { + stream._final(function(err) { + state.pendingcb--; + if (err) { + stream.emit("error", err); + } + state.prefinished = true; + stream.emit("prefinish"); + finishMaybe(stream, state); + }); + } + function prefinish(stream, state) { + if (!state.prefinished && !state.finalCalled) { + if (typeof stream._final === "function") { + state.pendingcb++; + state.finalCalled = true; + pna.nextTick(callFinal, stream, state); + } else { + state.prefinished = true; + stream.emit("prefinish"); + } + } + } + function finishMaybe(stream, state) { + var need = needFinish(state); + if (need) { + prefinish(stream, state); + if (state.pendingcb === 0) { + state.finished = true; + stream.emit("finish"); + } + } + return need; + } + function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) pna.nextTick(cb); + else stream.once("finish", cb); + } + state.ended = true; + stream.writable = false; + } + function onCorkedFinish(corkReq, state, err) { + var entry = corkReq.entry; + corkReq.entry = null; + while (entry) { + var cb = entry.callback; + state.pendingcb--; + cb(err); + entry = entry.next; + } + state.corkedRequestsFree.next = corkReq; + } + Object.defineProperty(Writable.prototype, "destroyed", { + get: function() { + if (this._writableState === void 0) { + return false; + } + return this._writableState.destroyed; + }, + set: function(value) { + if (!this._writableState) { + return; + } + this._writableState.destroyed = value; + } + }); + Writable.prototype.destroy = destroyImpl.destroy; + Writable.prototype._undestroy = destroyImpl.undestroy; + Writable.prototype._destroy = function(err, cb) { + this.end(); + cb(err); + }; + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/_stream_duplex.js +var require_stream_duplex2 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/_stream_duplex.js"(exports2, module2) { + "use strict"; + var pna = require_process_nextick_args(); + var objectKeys = Object.keys || function(obj2) { + var keys2 = []; + for (var key in obj2) { + keys2.push(key); + } + return keys2; + }; + module2.exports = Duplex; + var util2 = Object.create(require_util2()); + util2.inherits = require_inherits(); + var Readable = require_stream_readable2(); + var Writable = require_stream_writable2(); + util2.inherits(Duplex, Readable); + { + keys = objectKeys(Writable.prototype); + for (v = 0; v < keys.length; v++) { + method = keys[v]; + if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; + } + } + var keys; + var method; + var v; + function Duplex(options) { + if (!(this instanceof Duplex)) return new Duplex(options); + Readable.call(this, options); + Writable.call(this, options); + if (options && options.readable === false) this.readable = false; + if (options && options.writable === false) this.writable = false; + this.allowHalfOpen = true; + if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; + this.once("end", onend); + } + Object.defineProperty(Duplex.prototype, "writableHighWaterMark", { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function() { + return this._writableState.highWaterMark; + } + }); + function onend() { + if (this.allowHalfOpen || this._writableState.ended) return; + pna.nextTick(onEndNT, this); + } + function onEndNT(self2) { + self2.end(); + } + Object.defineProperty(Duplex.prototype, "destroyed", { + get: function() { + if (this._readableState === void 0 || this._writableState === void 0) { + return false; + } + return this._readableState.destroyed && this._writableState.destroyed; + }, + set: function(value) { + if (this._readableState === void 0 || this._writableState === void 0) { + return; + } + this._readableState.destroyed = value; + this._writableState.destroyed = value; + } + }); + Duplex.prototype._destroy = function(err, cb) { + this.push(null); + this.end(); + pna.nextTick(cb, err); + }; + } +}); + +// ../../node_modules/.pnpm/string_decoder@1.1.1/node_modules/string_decoder/lib/string_decoder.js +var require_string_decoder2 = __commonJS({ + "../../node_modules/.pnpm/string_decoder@1.1.1/node_modules/string_decoder/lib/string_decoder.js"(exports2) { + "use strict"; + var Buffer2 = require_safe_buffer2().Buffer; + var isEncoding = Buffer2.isEncoding || function(encoding) { + encoding = "" + encoding; + switch (encoding && encoding.toLowerCase()) { + case "hex": + case "utf8": + case "utf-8": + case "ascii": + case "binary": + case "base64": + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + case "raw": + return true; + default: + return false; + } + }; + function _normalizeEncoding(enc) { + if (!enc) return "utf8"; + var retried; + while (true) { + switch (enc) { + case "utf8": + case "utf-8": + return "utf8"; + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return "utf16le"; + case "latin1": + case "binary": + return "latin1"; + case "base64": + case "ascii": + case "hex": + return enc; + default: + if (retried) return; + enc = ("" + enc).toLowerCase(); + retried = true; + } + } + } + function normalizeEncoding(enc) { + var nenc = _normalizeEncoding(enc); + if (typeof nenc !== "string" && (Buffer2.isEncoding === isEncoding || !isEncoding(enc))) throw new Error("Unknown encoding: " + enc); + return nenc || enc; + } + exports2.StringDecoder = StringDecoder; + function StringDecoder(encoding) { + this.encoding = normalizeEncoding(encoding); + var nb; + switch (this.encoding) { + case "utf16le": + this.text = utf16Text; + this.end = utf16End; + nb = 4; + break; + case "utf8": + this.fillLast = utf8FillLast; + nb = 4; + break; + case "base64": + this.text = base64Text; + this.end = base64End; + nb = 3; + break; + default: + this.write = simpleWrite; + this.end = simpleEnd; + return; + } + this.lastNeed = 0; + this.lastTotal = 0; + this.lastChar = Buffer2.allocUnsafe(nb); + } + StringDecoder.prototype.write = function(buf) { + if (buf.length === 0) return ""; + var r; + var i; + if (this.lastNeed) { + r = this.fillLast(buf); + if (r === void 0) return ""; + i = this.lastNeed; + this.lastNeed = 0; + } else { + i = 0; + } + if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); + return r || ""; + }; + StringDecoder.prototype.end = utf8End; + StringDecoder.prototype.text = utf8Text; + StringDecoder.prototype.fillLast = function(buf) { + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); + this.lastNeed -= buf.length; + }; + function utf8CheckByte(byte) { + if (byte <= 127) return 0; + else if (byte >> 5 === 6) return 2; + else if (byte >> 4 === 14) return 3; + else if (byte >> 3 === 30) return 4; + return byte >> 6 === 2 ? -1 : -2; + } + function utf8CheckIncomplete(self2, buf, i) { + var j = buf.length - 1; + if (j < i) return 0; + var nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self2.lastNeed = nb - 1; + return nb; + } + if (--j < i || nb === -2) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self2.lastNeed = nb - 2; + return nb; + } + if (--j < i || nb === -2) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) { + if (nb === 2) nb = 0; + else self2.lastNeed = nb - 3; + } + return nb; + } + return 0; + } + function utf8CheckExtraBytes(self2, buf, p) { + if ((buf[0] & 192) !== 128) { + self2.lastNeed = 0; + return "\uFFFD"; + } + if (self2.lastNeed > 1 && buf.length > 1) { + if ((buf[1] & 192) !== 128) { + self2.lastNeed = 1; + return "\uFFFD"; + } + if (self2.lastNeed > 2 && buf.length > 2) { + if ((buf[2] & 192) !== 128) { + self2.lastNeed = 2; + return "\uFFFD"; + } + } + } + } + function utf8FillLast(buf) { + var p = this.lastTotal - this.lastNeed; + var r = utf8CheckExtraBytes(this, buf, p); + if (r !== void 0) return r; + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, p, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, p, 0, buf.length); + this.lastNeed -= buf.length; + } + function utf8Text(buf, i) { + var total = utf8CheckIncomplete(this, buf, i); + if (!this.lastNeed) return buf.toString("utf8", i); + this.lastTotal = total; + var end = buf.length - (total - this.lastNeed); + buf.copy(this.lastChar, 0, end); + return buf.toString("utf8", i, end); + } + function utf8End(buf) { + var r = buf && buf.length ? this.write(buf) : ""; + if (this.lastNeed) return r + "\uFFFD"; + return r; + } + function utf16Text(buf, i) { + if ((buf.length - i) % 2 === 0) { + var r = buf.toString("utf16le", i); + if (r) { + var c = r.charCodeAt(r.length - 1); + if (c >= 55296 && c <= 56319) { + this.lastNeed = 2; + this.lastTotal = 4; + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + return r.slice(0, -1); + } + } + return r; + } + this.lastNeed = 1; + this.lastTotal = 2; + this.lastChar[0] = buf[buf.length - 1]; + return buf.toString("utf16le", i, buf.length - 1); + } + function utf16End(buf) { + var r = buf && buf.length ? this.write(buf) : ""; + if (this.lastNeed) { + var end = this.lastTotal - this.lastNeed; + return r + this.lastChar.toString("utf16le", 0, end); + } + return r; + } + function base64Text(buf, i) { + var n = (buf.length - i) % 3; + if (n === 0) return buf.toString("base64", i); + this.lastNeed = 3 - n; + this.lastTotal = 3; + if (n === 1) { + this.lastChar[0] = buf[buf.length - 1]; + } else { + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + } + return buf.toString("base64", i, buf.length - n); + } + function base64End(buf) { + var r = buf && buf.length ? this.write(buf) : ""; + if (this.lastNeed) return r + this.lastChar.toString("base64", 0, 3 - this.lastNeed); + return r; + } + function simpleWrite(buf) { + return buf.toString(this.encoding); + } + function simpleEnd(buf) { + return buf && buf.length ? this.write(buf) : ""; + } + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/_stream_readable.js +var require_stream_readable2 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/_stream_readable.js"(exports2, module2) { + "use strict"; + var pna = require_process_nextick_args(); + module2.exports = Readable; + var isArray = require_isarray(); + var Duplex; + Readable.ReadableState = ReadableState; + var EE = require("events").EventEmitter; + var EElistenerCount = function(emitter, type) { + return emitter.listeners(type).length; + }; + var Stream = require_stream2(); + var Buffer2 = require_safe_buffer2().Buffer; + var OurUint8Array = (typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : typeof self !== "undefined" ? self : {}).Uint8Array || function() { + }; + function _uint8ArrayToBuffer(chunk) { + return Buffer2.from(chunk); + } + function _isUint8Array(obj2) { + return Buffer2.isBuffer(obj2) || obj2 instanceof OurUint8Array; + } + var util2 = Object.create(require_util2()); + util2.inherits = require_inherits(); + var debugUtil = require("util"); + var debug = void 0; + if (debugUtil && debugUtil.debuglog) { + debug = debugUtil.debuglog("stream"); + } else { + debug = function() { + }; + } + var BufferList = require_BufferList(); + var destroyImpl = require_destroy3(); + var StringDecoder; + util2.inherits(Readable, Stream); + var kProxyEvents = ["error", "close", "destroy", "pause", "resume"]; + function prependListener(emitter, event, fn) { + if (typeof emitter.prependListener === "function") return emitter.prependListener(event, fn); + if (!emitter._events || !emitter._events[event]) emitter.on(event, fn); + else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn); + else emitter._events[event] = [fn, emitter._events[event]]; + } + function ReadableState(options, stream) { + Duplex = Duplex || require_stream_duplex2(); + options = options || {}; + var isDuplex = stream instanceof Duplex; + this.objectMode = !!options.objectMode; + if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; + var hwm = options.highWaterMark; + var readableHwm = options.readableHighWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + if (hwm || hwm === 0) this.highWaterMark = hwm; + else if (isDuplex && (readableHwm || readableHwm === 0)) this.highWaterMark = readableHwm; + else this.highWaterMark = defaultHwm; + this.highWaterMark = Math.floor(this.highWaterMark); + this.buffer = new BufferList(); + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = null; + this.ended = false; + this.endEmitted = false; + this.reading = false; + this.sync = true; + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + this.resumeScheduled = false; + this.destroyed = false; + this.defaultEncoding = options.defaultEncoding || "utf8"; + this.awaitDrain = 0; + this.readingMore = false; + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) StringDecoder = require_string_decoder2().StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } + } + function Readable(options) { + Duplex = Duplex || require_stream_duplex2(); + if (!(this instanceof Readable)) return new Readable(options); + this._readableState = new ReadableState(options, this); + this.readable = true; + if (options) { + if (typeof options.read === "function") this._read = options.read; + if (typeof options.destroy === "function") this._destroy = options.destroy; + } + Stream.call(this); + } + Object.defineProperty(Readable.prototype, "destroyed", { + get: function() { + if (this._readableState === void 0) { + return false; + } + return this._readableState.destroyed; + }, + set: function(value) { + if (!this._readableState) { + return; + } + this._readableState.destroyed = value; + } + }); + Readable.prototype.destroy = destroyImpl.destroy; + Readable.prototype._undestroy = destroyImpl.undestroy; + Readable.prototype._destroy = function(err, cb) { + this.push(null); + cb(err); + }; + Readable.prototype.push = function(chunk, encoding) { + var state = this._readableState; + var skipChunkCheck; + if (!state.objectMode) { + if (typeof chunk === "string") { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = Buffer2.from(chunk, encoding); + encoding = ""; + } + skipChunkCheck = true; + } + } else { + skipChunkCheck = true; + } + return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); + }; + Readable.prototype.unshift = function(chunk) { + return readableAddChunk(this, chunk, null, true, false); + }; + function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { + var state = stream._readableState; + if (chunk === null) { + state.reading = false; + onEofChunk(stream, state); + } else { + var er; + if (!skipChunkCheck) er = chunkInvalid(state, chunk); + if (er) { + stream.emit("error", er); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (typeof chunk !== "string" && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer2.prototype) { + chunk = _uint8ArrayToBuffer(chunk); + } + if (addToFront) { + if (state.endEmitted) stream.emit("error", new Error("stream.unshift() after end event")); + else addChunk(stream, state, chunk, true); + } else if (state.ended) { + stream.emit("error", new Error("stream.push() after EOF")); + } else { + state.reading = false; + if (state.decoder && !encoding) { + chunk = state.decoder.write(chunk); + if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false); + else maybeReadMore(stream, state); + } else { + addChunk(stream, state, chunk, false); + } + } + } else if (!addToFront) { + state.reading = false; + } + } + return needMoreData(state); + } + function addChunk(stream, state, chunk, addToFront) { + if (state.flowing && state.length === 0 && !state.sync) { + stream.emit("data", chunk); + stream.read(0); + } else { + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) state.buffer.unshift(chunk); + else state.buffer.push(chunk); + if (state.needReadable) emitReadable(stream); + } + maybeReadMore(stream, state); + } + function chunkInvalid(state, chunk) { + var er; + if (!_isUint8Array(chunk) && typeof chunk !== "string" && chunk !== void 0 && !state.objectMode) { + er = new TypeError("Invalid non-string/buffer chunk"); + } + return er; + } + function needMoreData(state) { + return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); + } + Readable.prototype.isPaused = function() { + return this._readableState.flowing === false; + }; + Readable.prototype.setEncoding = function(enc) { + if (!StringDecoder) StringDecoder = require_string_decoder2().StringDecoder; + this._readableState.decoder = new StringDecoder(enc); + this._readableState.encoding = enc; + return this; + }; + var MAX_HWM = 8388608; + function computeNewHighWaterMark(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + n--; + n |= n >>> 1; + n |= n >>> 2; + n |= n >>> 4; + n |= n >>> 8; + n |= n >>> 16; + n++; + } + return n; + } + function howMuchToRead(n, state) { + if (n <= 0 || state.length === 0 && state.ended) return 0; + if (state.objectMode) return 1; + if (n !== n) { + if (state.flowing && state.length) return state.buffer.head.data.length; + else return state.length; + } + if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); + if (n <= state.length) return n; + if (!state.ended) { + state.needReadable = true; + return 0; + } + return state.length; + } + Readable.prototype.read = function(n) { + debug("read", n); + n = parseInt(n, 10); + var state = this._readableState; + var nOrig = n; + if (n !== 0) state.emittedReadable = false; + if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { + debug("read: emitReadable", state.length, state.ended); + if (state.length === 0 && state.ended) endReadable(this); + else emitReadable(this); + return null; + } + n = howMuchToRead(n, state); + if (n === 0 && state.ended) { + if (state.length === 0) endReadable(this); + return null; + } + var doRead = state.needReadable; + debug("need readable", doRead); + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true; + debug("length less than watermark", doRead); + } + if (state.ended || state.reading) { + doRead = false; + debug("reading or ended", doRead); + } else if (doRead) { + debug("do read"); + state.reading = true; + state.sync = true; + if (state.length === 0) state.needReadable = true; + this._read(state.highWaterMark); + state.sync = false; + if (!state.reading) n = howMuchToRead(nOrig, state); + } + var ret2; + if (n > 0) ret2 = fromList(n, state); + else ret2 = null; + if (ret2 === null) { + state.needReadable = true; + n = 0; + } else { + state.length -= n; + } + if (state.length === 0) { + if (!state.ended) state.needReadable = true; + if (nOrig !== n && state.ended) endReadable(this); + } + if (ret2 !== null) this.emit("data", ret2); + return ret2; + }; + function onEofChunk(stream, state) { + if (state.ended) return; + if (state.decoder) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + emitReadable(stream); + } + function emitReadable(stream) { + var state = stream._readableState; + state.needReadable = false; + if (!state.emittedReadable) { + debug("emitReadable", state.flowing); + state.emittedReadable = true; + if (state.sync) pna.nextTick(emitReadable_, stream); + else emitReadable_(stream); + } + } + function emitReadable_(stream) { + debug("emit readable"); + stream.emit("readable"); + flow(stream); + } + function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + pna.nextTick(maybeReadMore_, stream, state); + } + } + function maybeReadMore_(stream, state) { + var len = state.length; + while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { + debug("maybeReadMore read 0"); + stream.read(0); + if (len === state.length) + break; + else len = state.length; + } + state.readingMore = false; + } + Readable.prototype._read = function(n) { + this.emit("error", new Error("_read() is not implemented")); + }; + Readable.prototype.pipe = function(dest, pipeOpts) { + var src = this; + var state = this._readableState; + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + debug("pipe count=%d opts=%j", state.pipesCount, pipeOpts); + var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; + var endFn = doEnd ? onend : unpipe; + if (state.endEmitted) pna.nextTick(endFn); + else src.once("end", endFn); + dest.on("unpipe", onunpipe); + function onunpipe(readable, unpipeInfo) { + debug("onunpipe"); + if (readable === src) { + if (unpipeInfo && unpipeInfo.hasUnpiped === false) { + unpipeInfo.hasUnpiped = true; + cleanup(); + } + } + } + function onend() { + debug("onend"); + dest.end(); + } + var ondrain = pipeOnDrain(src); + dest.on("drain", ondrain); + var cleanedUp = false; + function cleanup() { + debug("cleanup"); + dest.removeListener("close", onclose); + dest.removeListener("finish", onfinish); + dest.removeListener("drain", ondrain); + dest.removeListener("error", onerror); + dest.removeListener("unpipe", onunpipe); + src.removeListener("end", onend); + src.removeListener("end", unpipe); + src.removeListener("data", ondata); + cleanedUp = true; + if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); + } + var increasedAwaitDrain = false; + src.on("data", ondata); + function ondata(chunk) { + debug("ondata"); + increasedAwaitDrain = false; + var ret2 = dest.write(chunk); + if (false === ret2 && !increasedAwaitDrain) { + if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { + debug("false write response, pause", state.awaitDrain); + state.awaitDrain++; + increasedAwaitDrain = true; + } + src.pause(); + } + } + function onerror(er) { + debug("onerror", er); + unpipe(); + dest.removeListener("error", onerror); + if (EElistenerCount(dest, "error") === 0) dest.emit("error", er); + } + prependListener(dest, "error", onerror); + function onclose() { + dest.removeListener("finish", onfinish); + unpipe(); + } + dest.once("close", onclose); + function onfinish() { + debug("onfinish"); + dest.removeListener("close", onclose); + unpipe(); + } + dest.once("finish", onfinish); + function unpipe() { + debug("unpipe"); + src.unpipe(dest); + } + dest.emit("pipe", src); + if (!state.flowing) { + debug("pipe resume"); + src.resume(); + } + return dest; + }; + function pipeOnDrain(src) { + return function() { + var state = src._readableState; + debug("pipeOnDrain", state.awaitDrain); + if (state.awaitDrain) state.awaitDrain--; + if (state.awaitDrain === 0 && EElistenerCount(src, "data")) { + state.flowing = true; + flow(src); + } + }; + } + Readable.prototype.unpipe = function(dest) { + var state = this._readableState; + var unpipeInfo = { hasUnpiped: false }; + if (state.pipesCount === 0) return this; + if (state.pipesCount === 1) { + if (dest && dest !== state.pipes) return this; + if (!dest) dest = state.pipes; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) dest.emit("unpipe", this, unpipeInfo); + return this; + } + if (!dest) { + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + for (var i = 0; i < len; i++) { + dests[i].emit("unpipe", this, { hasUnpiped: false }); + } + return this; + } + var index = indexOf(state.pipes, dest); + if (index === -1) return this; + state.pipes.splice(index, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) state.pipes = state.pipes[0]; + dest.emit("unpipe", this, unpipeInfo); + return this; + }; + Readable.prototype.on = function(ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + if (ev === "data") { + if (this._readableState.flowing !== false) this.resume(); + } else if (ev === "readable") { + var state = this._readableState; + if (!state.endEmitted && !state.readableListening) { + state.readableListening = state.needReadable = true; + state.emittedReadable = false; + if (!state.reading) { + pna.nextTick(nReadingNextTick, this); + } else if (state.length) { + emitReadable(this); + } + } + } + return res; + }; + Readable.prototype.addListener = Readable.prototype.on; + function nReadingNextTick(self2) { + debug("readable nexttick read 0"); + self2.read(0); + } + Readable.prototype.resume = function() { + var state = this._readableState; + if (!state.flowing) { + debug("resume"); + state.flowing = true; + resume(this, state); + } + return this; + }; + function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + pna.nextTick(resume_, stream, state); + } + } + function resume_(stream, state) { + if (!state.reading) { + debug("resume read 0"); + stream.read(0); + } + state.resumeScheduled = false; + state.awaitDrain = 0; + stream.emit("resume"); + flow(stream); + if (state.flowing && !state.reading) stream.read(0); + } + Readable.prototype.pause = function() { + debug("call pause flowing=%j", this._readableState.flowing); + if (false !== this._readableState.flowing) { + debug("pause"); + this._readableState.flowing = false; + this.emit("pause"); + } + return this; + }; + function flow(stream) { + var state = stream._readableState; + debug("flow", state.flowing); + while (state.flowing && stream.read() !== null) { + } + } + Readable.prototype.wrap = function(stream) { + var _this = this; + var state = this._readableState; + var paused = false; + stream.on("end", function() { + debug("wrapped end"); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) _this.push(chunk); + } + _this.push(null); + }); + stream.on("data", function(chunk) { + debug("wrapped data"); + if (state.decoder) chunk = state.decoder.write(chunk); + if (state.objectMode && (chunk === null || chunk === void 0)) return; + else if (!state.objectMode && (!chunk || !chunk.length)) return; + var ret2 = _this.push(chunk); + if (!ret2) { + paused = true; + stream.pause(); + } + }); + for (var i in stream) { + if (this[i] === void 0 && typeof stream[i] === "function") { + this[i] = /* @__PURE__ */ (function(method) { + return function() { + return stream[method].apply(stream, arguments); + }; + })(i); + } + } + for (var n = 0; n < kProxyEvents.length; n++) { + stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); + } + this._read = function(n2) { + debug("wrapped _read", n2); + if (paused) { + paused = false; + stream.resume(); + } + }; + return this; + }; + Object.defineProperty(Readable.prototype, "readableHighWaterMark", { + // making it explicit this property is not enumerable + // because otherwise some prototype manipulation in + // userland will fail + enumerable: false, + get: function() { + return this._readableState.highWaterMark; + } + }); + Readable._fromList = fromList; + function fromList(n, state) { + if (state.length === 0) return null; + var ret2; + if (state.objectMode) ret2 = state.buffer.shift(); + else if (!n || n >= state.length) { + if (state.decoder) ret2 = state.buffer.join(""); + else if (state.buffer.length === 1) ret2 = state.buffer.head.data; + else ret2 = state.buffer.concat(state.length); + state.buffer.clear(); + } else { + ret2 = fromListPartial(n, state.buffer, state.decoder); + } + return ret2; + } + function fromListPartial(n, list, hasStrings) { + var ret2; + if (n < list.head.data.length) { + ret2 = list.head.data.slice(0, n); + list.head.data = list.head.data.slice(n); + } else if (n === list.head.data.length) { + ret2 = list.shift(); + } else { + ret2 = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); + } + return ret2; + } + function copyFromBufferString(n, list) { + var p = list.head; + var c = 1; + var ret2 = p.data; + n -= ret2.length; + while (p = p.next) { + var str = p.data; + var nb = n > str.length ? str.length : n; + if (nb === str.length) ret2 += str; + else ret2 += str.slice(0, n); + n -= nb; + if (n === 0) { + if (nb === str.length) { + ++c; + if (p.next) list.head = p.next; + else list.head = list.tail = null; + } else { + list.head = p; + p.data = str.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret2; + } + function copyFromBuffer(n, list) { + var ret2 = Buffer2.allocUnsafe(n); + var p = list.head; + var c = 1; + p.data.copy(ret2); + n -= p.data.length; + while (p = p.next) { + var buf = p.data; + var nb = n > buf.length ? buf.length : n; + buf.copy(ret2, ret2.length - n, 0, nb); + n -= nb; + if (n === 0) { + if (nb === buf.length) { + ++c; + if (p.next) list.head = p.next; + else list.head = list.tail = null; + } else { + list.head = p; + p.data = buf.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret2; + } + function endReadable(stream) { + var state = stream._readableState; + if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); + if (!state.endEmitted) { + state.ended = true; + pna.nextTick(endReadableNT, state, stream); + } + } + function endReadableNT(state, stream) { + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit("end"); + } + } + function indexOf(xs, x) { + for (var i = 0, l2 = xs.length; i < l2; i++) { + if (xs[i] === x) return i; + } + return -1; + } + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/_stream_transform.js +var require_stream_transform2 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/_stream_transform.js"(exports2, module2) { + "use strict"; + module2.exports = Transform; + var Duplex = require_stream_duplex2(); + var util2 = Object.create(require_util2()); + util2.inherits = require_inherits(); + util2.inherits(Transform, Duplex); + function afterTransform(er, data) { + var ts = this._transformState; + ts.transforming = false; + var cb = ts.writecb; + if (!cb) { + return this.emit("error", new Error("write callback called multiple times")); + } + ts.writechunk = null; + ts.writecb = null; + if (data != null) + this.push(data); + cb(er); + var rs = this._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + this._read(rs.highWaterMark); + } + } + function Transform(options) { + if (!(this instanceof Transform)) return new Transform(options); + Duplex.call(this, options); + this._transformState = { + afterTransform: afterTransform.bind(this), + needTransform: false, + transforming: false, + writecb: null, + writechunk: null, + writeencoding: null + }; + this._readableState.needReadable = true; + this._readableState.sync = false; + if (options) { + if (typeof options.transform === "function") this._transform = options.transform; + if (typeof options.flush === "function") this._flush = options.flush; + } + this.on("prefinish", prefinish); + } + function prefinish() { + var _this = this; + if (typeof this._flush === "function") { + this._flush(function(er, data) { + done(_this, er, data); + }); + } else { + done(this, null, null); + } + } + Transform.prototype.push = function(chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); + }; + Transform.prototype._transform = function(chunk, encoding, cb) { + throw new Error("_transform() is not implemented"); + }; + Transform.prototype._write = function(chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); + } + }; + Transform.prototype._read = function(n) { + var ts = this._transformState; + if (ts.writechunk !== null && ts.writecb && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + ts.needTransform = true; + } + }; + Transform.prototype._destroy = function(err, cb) { + var _this2 = this; + Duplex.prototype._destroy.call(this, err, function(err2) { + cb(err2); + _this2.emit("close"); + }); + }; + function done(stream, er, data) { + if (er) return stream.emit("error", er); + if (data != null) + stream.push(data); + if (stream._writableState.length) throw new Error("Calling transform done when ws.length != 0"); + if (stream._transformState.transforming) throw new Error("Calling transform done when still transforming"); + return stream.push(null); + } + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/_stream_passthrough.js +var require_stream_passthrough2 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/lib/_stream_passthrough.js"(exports2, module2) { + "use strict"; + module2.exports = PassThrough; + var Transform = require_stream_transform2(); + var util2 = Object.create(require_util2()); + util2.inherits = require_inherits(); + util2.inherits(PassThrough, Transform); + function PassThrough(options) { + if (!(this instanceof PassThrough)) return new PassThrough(options); + Transform.call(this, options); + } + PassThrough.prototype._transform = function(chunk, encoding, cb) { + cb(null, chunk); + }; + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/readable.js +var require_readable2 = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/readable.js"(exports2, module2) { + var Stream = require("stream"); + if (process.env.READABLE_STREAM === "disable" && Stream) { + module2.exports = Stream; + exports2 = module2.exports = Stream.Readable; + exports2.Readable = Stream.Readable; + exports2.Writable = Stream.Writable; + exports2.Duplex = Stream.Duplex; + exports2.Transform = Stream.Transform; + exports2.PassThrough = Stream.PassThrough; + exports2.Stream = Stream; + } else { + exports2 = module2.exports = require_stream_readable2(); + exports2.Stream = Stream || exports2; + exports2.Readable = exports2; + exports2.Writable = require_stream_writable2(); + exports2.Duplex = require_stream_duplex2(); + exports2.Transform = require_stream_transform2(); + exports2.PassThrough = require_stream_passthrough2(); + } + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/support.js +var require_support = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/support.js"(exports2) { + "use strict"; + exports2.base64 = true; + exports2.array = true; + exports2.string = true; + exports2.arraybuffer = typeof ArrayBuffer !== "undefined" && typeof Uint8Array !== "undefined"; + exports2.nodebuffer = typeof Buffer !== "undefined"; + exports2.uint8array = typeof Uint8Array !== "undefined"; + if (typeof ArrayBuffer === "undefined") { + exports2.blob = false; + } else { + buffer = new ArrayBuffer(0); + try { + exports2.blob = new Blob([buffer], { + type: "application/zip" + }).size === 0; + } catch (e) { + try { + Builder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder; + builder = new Builder(); + builder.append(buffer); + exports2.blob = builder.getBlob("application/zip").size === 0; + } catch (e2) { + exports2.blob = false; + } + } + } + var buffer; + var Builder; + var builder; + try { + exports2.nodestream = !!require_readable2().Readable; + } catch (e) { + exports2.nodestream = false; + } + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/base64.js +var require_base64 = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/base64.js"(exports2) { + "use strict"; + var utils = require_utils12(); + var support = require_support(); + var _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; + exports2.encode = function(input) { + var output = []; + var chr1, chr2, chr3, enc1, enc2, enc3, enc4; + var i = 0, len = input.length, remainingBytes = len; + var isArray = utils.getTypeOf(input) !== "string"; + while (i < input.length) { + remainingBytes = len - i; + if (!isArray) { + chr1 = input.charCodeAt(i++); + chr2 = i < len ? input.charCodeAt(i++) : 0; + chr3 = i < len ? input.charCodeAt(i++) : 0; + } else { + chr1 = input[i++]; + chr2 = i < len ? input[i++] : 0; + chr3 = i < len ? input[i++] : 0; + } + enc1 = chr1 >> 2; + enc2 = (chr1 & 3) << 4 | chr2 >> 4; + enc3 = remainingBytes > 1 ? (chr2 & 15) << 2 | chr3 >> 6 : 64; + enc4 = remainingBytes > 2 ? chr3 & 63 : 64; + output.push(_keyStr.charAt(enc1) + _keyStr.charAt(enc2) + _keyStr.charAt(enc3) + _keyStr.charAt(enc4)); + } + return output.join(""); + }; + exports2.decode = function(input) { + var chr1, chr2, chr3; + var enc1, enc2, enc3, enc4; + var i = 0, resultIndex = 0; + var dataUrlPrefix = "data:"; + if (input.substr(0, dataUrlPrefix.length) === dataUrlPrefix) { + throw new Error("Invalid base64 input, it looks like a data url."); + } + input = input.replace(/[^A-Za-z0-9+/=]/g, ""); + var totalLength = input.length * 3 / 4; + if (input.charAt(input.length - 1) === _keyStr.charAt(64)) { + totalLength--; + } + if (input.charAt(input.length - 2) === _keyStr.charAt(64)) { + totalLength--; + } + if (totalLength % 1 !== 0) { + throw new Error("Invalid base64 input, bad content length."); + } + var output; + if (support.uint8array) { + output = new Uint8Array(totalLength | 0); + } else { + output = new Array(totalLength | 0); + } + while (i < input.length) { + enc1 = _keyStr.indexOf(input.charAt(i++)); + enc2 = _keyStr.indexOf(input.charAt(i++)); + enc3 = _keyStr.indexOf(input.charAt(i++)); + enc4 = _keyStr.indexOf(input.charAt(i++)); + chr1 = enc1 << 2 | enc2 >> 4; + chr2 = (enc2 & 15) << 4 | enc3 >> 2; + chr3 = (enc3 & 3) << 6 | enc4; + output[resultIndex++] = chr1; + if (enc3 !== 64) { + output[resultIndex++] = chr2; + } + if (enc4 !== 64) { + output[resultIndex++] = chr3; + } + } + return output; + }; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/nodejsUtils.js +var require_nodejsUtils = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/nodejsUtils.js"(exports2, module2) { + "use strict"; + module2.exports = { + /** + * True if this is running in Nodejs, will be undefined in a browser. + * In a browser, browserify won't include this file and the whole module + * will be resolved an empty object. + */ + isNode: typeof Buffer !== "undefined", + /** + * Create a new nodejs Buffer from an existing content. + * @param {Object} data the data to pass to the constructor. + * @param {String} encoding the encoding to use. + * @return {Buffer} a new Buffer. + */ + newBufferFrom: function(data, encoding) { + if (Buffer.from && Buffer.from !== Uint8Array.from) { + return Buffer.from(data, encoding); + } else { + if (typeof data === "number") { + throw new Error('The "data" argument must not be a number'); + } + return new Buffer(data, encoding); + } + }, + /** + * Create a new nodejs Buffer with the specified size. + * @param {Integer} size the size of the buffer. + * @return {Buffer} a new Buffer. + */ + allocBuffer: function(size) { + if (Buffer.alloc) { + return Buffer.alloc(size); + } else { + var buf = new Buffer(size); + buf.fill(0); + return buf; + } + }, + /** + * Find out if an object is a Buffer. + * @param {Object} b the object to test. + * @return {Boolean} true if the object is a Buffer, false otherwise. + */ + isBuffer: function(b) { + return Buffer.isBuffer(b); + }, + isStream: function(obj2) { + return obj2 && typeof obj2.on === "function" && typeof obj2.pause === "function" && typeof obj2.resume === "function"; + } + }; + } +}); + +// ../../node_modules/.pnpm/immediate@3.0.6/node_modules/immediate/lib/index.js +var require_lib9 = __commonJS({ + "../../node_modules/.pnpm/immediate@3.0.6/node_modules/immediate/lib/index.js"(exports2, module2) { + "use strict"; + var Mutation = global.MutationObserver || global.WebKitMutationObserver; + var scheduleDrain; + if (process.browser) { + if (Mutation) { + called = 0; + observer = new Mutation(nextTick); + element = global.document.createTextNode(""); + observer.observe(element, { + characterData: true + }); + scheduleDrain = function() { + element.data = called = ++called % 2; + }; + } else if (!global.setImmediate && typeof global.MessageChannel !== "undefined") { + channel = new global.MessageChannel(); + channel.port1.onmessage = nextTick; + scheduleDrain = function() { + channel.port2.postMessage(0); + }; + } else if ("document" in global && "onreadystatechange" in global.document.createElement("script")) { + scheduleDrain = function() { + var scriptEl = global.document.createElement("script"); + scriptEl.onreadystatechange = function() { + nextTick(); + scriptEl.onreadystatechange = null; + scriptEl.parentNode.removeChild(scriptEl); + scriptEl = null; + }; + global.document.documentElement.appendChild(scriptEl); + }; + } else { + scheduleDrain = function() { + setTimeout(nextTick, 0); + }; + } + } else { + scheduleDrain = function() { + process.nextTick(nextTick); + }; + } + var called; + var observer; + var element; + var channel; + var draining; + var queue = []; + function nextTick() { + draining = true; + var i, oldQueue; + var len = queue.length; + while (len) { + oldQueue = queue; + queue = []; + i = -1; + while (++i < len) { + oldQueue[i](); + } + len = queue.length; + } + draining = false; + } + module2.exports = immediate; + function immediate(task) { + if (queue.push(task) === 1 && !draining) { + scheduleDrain(); + } + } + } +}); + +// ../../node_modules/.pnpm/lie@3.3.0/node_modules/lie/lib/index.js +var require_lib10 = __commonJS({ + "../../node_modules/.pnpm/lie@3.3.0/node_modules/lie/lib/index.js"(exports2, module2) { + "use strict"; + var immediate = require_lib9(); + function INTERNAL() { + } + var handlers = {}; + var REJECTED = ["REJECTED"]; + var FULFILLED = ["FULFILLED"]; + var PENDING = ["PENDING"]; + if (!process.browser) { + UNHANDLED = ["UNHANDLED"]; + } + var UNHANDLED; + module2.exports = Promise2; + function Promise2(resolver) { + if (typeof resolver !== "function") { + throw new TypeError("resolver must be a function"); + } + this.state = PENDING; + this.queue = []; + this.outcome = void 0; + if (!process.browser) { + this.handled = UNHANDLED; + } + if (resolver !== INTERNAL) { + safelyResolveThenable(this, resolver); + } + } + Promise2.prototype.finally = function(callback) { + if (typeof callback !== "function") { + return this; + } + var p = this.constructor; + return this.then(resolve2, reject2); + function resolve2(value) { + function yes() { + return value; + } + return p.resolve(callback()).then(yes); + } + function reject2(reason) { + function no() { + throw reason; + } + return p.resolve(callback()).then(no); + } + }; + Promise2.prototype.catch = function(onRejected) { + return this.then(null, onRejected); + }; + Promise2.prototype.then = function(onFulfilled, onRejected) { + if (typeof onFulfilled !== "function" && this.state === FULFILLED || typeof onRejected !== "function" && this.state === REJECTED) { + return this; + } + var promise = new this.constructor(INTERNAL); + if (!process.browser) { + if (this.handled === UNHANDLED) { + this.handled = null; + } + } + if (this.state !== PENDING) { + var resolver = this.state === FULFILLED ? onFulfilled : onRejected; + unwrap(promise, resolver, this.outcome); + } else { + this.queue.push(new QueueItem(promise, onFulfilled, onRejected)); + } + return promise; + }; + function QueueItem(promise, onFulfilled, onRejected) { + this.promise = promise; + if (typeof onFulfilled === "function") { + this.onFulfilled = onFulfilled; + this.callFulfilled = this.otherCallFulfilled; + } + if (typeof onRejected === "function") { + this.onRejected = onRejected; + this.callRejected = this.otherCallRejected; + } + } + QueueItem.prototype.callFulfilled = function(value) { + handlers.resolve(this.promise, value); + }; + QueueItem.prototype.otherCallFulfilled = function(value) { + unwrap(this.promise, this.onFulfilled, value); + }; + QueueItem.prototype.callRejected = function(value) { + handlers.reject(this.promise, value); + }; + QueueItem.prototype.otherCallRejected = function(value) { + unwrap(this.promise, this.onRejected, value); + }; + function unwrap(promise, func, value) { + immediate(function() { + var returnValue; + try { + returnValue = func(value); + } catch (e) { + return handlers.reject(promise, e); + } + if (returnValue === promise) { + handlers.reject(promise, new TypeError("Cannot resolve promise with itself")); + } else { + handlers.resolve(promise, returnValue); + } + }); + } + handlers.resolve = function(self2, value) { + var result = tryCatch2(getThen, value); + if (result.status === "error") { + return handlers.reject(self2, result.value); + } + var thenable = result.value; + if (thenable) { + safelyResolveThenable(self2, thenable); + } else { + self2.state = FULFILLED; + self2.outcome = value; + var i = -1; + var len = self2.queue.length; + while (++i < len) { + self2.queue[i].callFulfilled(value); + } + } + return self2; + }; + handlers.reject = function(self2, error) { + self2.state = REJECTED; + self2.outcome = error; + if (!process.browser) { + if (self2.handled === UNHANDLED) { + immediate(function() { + if (self2.handled === UNHANDLED) { + process.emit("unhandledRejection", error, self2); + } + }); + } + } + var i = -1; + var len = self2.queue.length; + while (++i < len) { + self2.queue[i].callRejected(error); + } + return self2; + }; + function getThen(obj2) { + var then = obj2 && obj2.then; + if (obj2 && (typeof obj2 === "object" || typeof obj2 === "function") && typeof then === "function") { + return function appyThen() { + then.apply(obj2, arguments); + }; + } + } + function safelyResolveThenable(self2, thenable) { + var called = false; + function onError(value) { + if (called) { + return; + } + called = true; + handlers.reject(self2, value); + } + function onSuccess(value) { + if (called) { + return; + } + called = true; + handlers.resolve(self2, value); + } + function tryToUnwrap() { + thenable(onSuccess, onError); + } + var result = tryCatch2(tryToUnwrap); + if (result.status === "error") { + onError(result.value); + } + } + function tryCatch2(func, value) { + var out = {}; + try { + out.value = func(value); + out.status = "success"; + } catch (e) { + out.status = "error"; + out.value = e; + } + return out; + } + Promise2.resolve = resolve; + function resolve(value) { + if (value instanceof this) { + return value; + } + return handlers.resolve(new this(INTERNAL), value); + } + Promise2.reject = reject; + function reject(reason) { + var promise = new this(INTERNAL); + return handlers.reject(promise, reason); + } + Promise2.all = all; + function all(iterable) { + var self2 = this; + if (Object.prototype.toString.call(iterable) !== "[object Array]") { + return this.reject(new TypeError("must be an array")); + } + var len = iterable.length; + var called = false; + if (!len) { + return this.resolve([]); + } + var values = new Array(len); + var resolved = 0; + var i = -1; + var promise = new this(INTERNAL); + while (++i < len) { + allResolver(iterable[i], i); + } + return promise; + function allResolver(value, i2) { + self2.resolve(value).then(resolveFromAll, function(error) { + if (!called) { + called = true; + handlers.reject(promise, error); + } + }); + function resolveFromAll(outValue) { + values[i2] = outValue; + if (++resolved === len && !called) { + called = true; + handlers.resolve(promise, values); + } + } + } + } + Promise2.race = race; + function race(iterable) { + var self2 = this; + if (Object.prototype.toString.call(iterable) !== "[object Array]") { + return this.reject(new TypeError("must be an array")); + } + var len = iterable.length; + var called = false; + if (!len) { + return this.resolve([]); + } + var i = -1; + var promise = new this(INTERNAL); + while (++i < len) { + resolver(iterable[i]); + } + return promise; + function resolver(value) { + self2.resolve(value).then(function(response) { + if (!called) { + called = true; + handlers.resolve(promise, response); + } + }, function(error) { + if (!called) { + called = true; + handlers.reject(promise, error); + } + }); + } + } + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/external.js +var require_external = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/external.js"(exports2, module2) { + "use strict"; + var ES6Promise = null; + if (typeof Promise !== "undefined") { + ES6Promise = Promise; + } else { + ES6Promise = require_lib10(); + } + module2.exports = { + Promise: ES6Promise + }; + } +}); + +// ../../node_modules/.pnpm/setimmediate@1.0.5/node_modules/setimmediate/setImmediate.js +var require_setImmediate = __commonJS({ + "../../node_modules/.pnpm/setimmediate@1.0.5/node_modules/setimmediate/setImmediate.js"(exports2) { + (function(global2, undefined2) { + "use strict"; + if (global2.setImmediate) { + return; + } + var nextHandle = 1; + var tasksByHandle = {}; + var currentlyRunningATask = false; + var doc = global2.document; + var registerImmediate; + function setImmediate2(callback) { + if (typeof callback !== "function") { + callback = new Function("" + callback); + } + var args = new Array(arguments.length - 1); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i + 1]; + } + var task = { callback, args }; + tasksByHandle[nextHandle] = task; + registerImmediate(nextHandle); + return nextHandle++; + } + function clearImmediate(handle) { + delete tasksByHandle[handle]; + } + function run(task) { + var callback = task.callback; + var args = task.args; + switch (args.length) { + case 0: + callback(); + break; + case 1: + callback(args[0]); + break; + case 2: + callback(args[0], args[1]); + break; + case 3: + callback(args[0], args[1], args[2]); + break; + default: + callback.apply(undefined2, args); + break; + } + } + function runIfPresent(handle) { + if (currentlyRunningATask) { + setTimeout(runIfPresent, 0, handle); + } else { + var task = tasksByHandle[handle]; + if (task) { + currentlyRunningATask = true; + try { + run(task); + } finally { + clearImmediate(handle); + currentlyRunningATask = false; + } + } + } + } + function installNextTickImplementation() { + registerImmediate = function(handle) { + process.nextTick(function() { + runIfPresent(handle); + }); + }; + } + function canUsePostMessage() { + if (global2.postMessage && !global2.importScripts) { + var postMessageIsAsynchronous = true; + var oldOnMessage = global2.onmessage; + global2.onmessage = function() { + postMessageIsAsynchronous = false; + }; + global2.postMessage("", "*"); + global2.onmessage = oldOnMessage; + return postMessageIsAsynchronous; + } + } + function installPostMessageImplementation() { + var messagePrefix = "setImmediate$" + Math.random() + "$"; + var onGlobalMessage = function(event) { + if (event.source === global2 && typeof event.data === "string" && event.data.indexOf(messagePrefix) === 0) { + runIfPresent(+event.data.slice(messagePrefix.length)); + } + }; + if (global2.addEventListener) { + global2.addEventListener("message", onGlobalMessage, false); + } else { + global2.attachEvent("onmessage", onGlobalMessage); + } + registerImmediate = function(handle) { + global2.postMessage(messagePrefix + handle, "*"); + }; + } + function installMessageChannelImplementation() { + var channel = new MessageChannel(); + channel.port1.onmessage = function(event) { + var handle = event.data; + runIfPresent(handle); + }; + registerImmediate = function(handle) { + channel.port2.postMessage(handle); + }; + } + function installReadyStateChangeImplementation() { + var html = doc.documentElement; + registerImmediate = function(handle) { + var script = doc.createElement("script"); + script.onreadystatechange = function() { + runIfPresent(handle); + script.onreadystatechange = null; + html.removeChild(script); + script = null; + }; + html.appendChild(script); + }; + } + function installSetTimeoutImplementation() { + registerImmediate = function(handle) { + setTimeout(runIfPresent, 0, handle); + }; + } + var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global2); + attachTo = attachTo && attachTo.setTimeout ? attachTo : global2; + if ({}.toString.call(global2.process) === "[object process]") { + installNextTickImplementation(); + } else if (canUsePostMessage()) { + installPostMessageImplementation(); + } else if (global2.MessageChannel) { + installMessageChannelImplementation(); + } else if (doc && "onreadystatechange" in doc.createElement("script")) { + installReadyStateChangeImplementation(); + } else { + installSetTimeoutImplementation(); + } + attachTo.setImmediate = setImmediate2; + attachTo.clearImmediate = clearImmediate; + })(typeof self === "undefined" ? typeof global === "undefined" ? exports2 : global : self); + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/utils.js +var require_utils12 = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/utils.js"(exports2) { + "use strict"; + var support = require_support(); + var base64 = require_base64(); + var nodejsUtils = require_nodejsUtils(); + var external = require_external(); + require_setImmediate(); + function string2binary(str) { + var result = null; + if (support.uint8array) { + result = new Uint8Array(str.length); + } else { + result = new Array(str.length); + } + return stringToArrayLike(str, result); + } + exports2.newBlob = function(part, type) { + exports2.checkSupport("blob"); + try { + return new Blob([part], { + type + }); + } catch (e) { + try { + var Builder = self.BlobBuilder || self.WebKitBlobBuilder || self.MozBlobBuilder || self.MSBlobBuilder; + var builder = new Builder(); + builder.append(part); + return builder.getBlob(type); + } catch (e2) { + throw new Error("Bug : can't construct the Blob."); + } + } + }; + function identity(input) { + return input; + } + function stringToArrayLike(str, array) { + for (var i = 0; i < str.length; ++i) { + array[i] = str.charCodeAt(i) & 255; + } + return array; + } + var arrayToStringHelper = { + /** + * Transform an array of int into a string, chunk by chunk. + * See the performances notes on arrayLikeToString. + * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform. + * @param {String} type the type of the array. + * @param {Integer} chunk the chunk size. + * @return {String} the resulting string. + * @throws Error if the chunk is too big for the stack. + */ + stringifyByChunk: function(array, type, chunk) { + var result = [], k = 0, len = array.length; + if (len <= chunk) { + return String.fromCharCode.apply(null, array); + } + while (k < len) { + if (type === "array" || type === "nodebuffer") { + result.push(String.fromCharCode.apply(null, array.slice(k, Math.min(k + chunk, len)))); + } else { + result.push(String.fromCharCode.apply(null, array.subarray(k, Math.min(k + chunk, len)))); + } + k += chunk; + } + return result.join(""); + }, + /** + * Call String.fromCharCode on every item in the array. + * This is the naive implementation, which generate A LOT of intermediate string. + * This should be used when everything else fail. + * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform. + * @return {String} the result. + */ + stringifyByChar: function(array) { + var resultStr = ""; + for (var i = 0; i < array.length; i++) { + resultStr += String.fromCharCode(array[i]); + } + return resultStr; + }, + applyCanBeUsed: { + /** + * true if the browser accepts to use String.fromCharCode on Uint8Array + */ + uint8array: (function() { + try { + return support.uint8array && String.fromCharCode.apply(null, new Uint8Array(1)).length === 1; + } catch (e) { + return false; + } + })(), + /** + * true if the browser accepts to use String.fromCharCode on nodejs Buffer. + */ + nodebuffer: (function() { + try { + return support.nodebuffer && String.fromCharCode.apply(null, nodejsUtils.allocBuffer(1)).length === 1; + } catch (e) { + return false; + } + })() + } + }; + function arrayLikeToString(array) { + var chunk = 65536, type = exports2.getTypeOf(array), canUseApply = true; + if (type === "uint8array") { + canUseApply = arrayToStringHelper.applyCanBeUsed.uint8array; + } else if (type === "nodebuffer") { + canUseApply = arrayToStringHelper.applyCanBeUsed.nodebuffer; + } + if (canUseApply) { + while (chunk > 1) { + try { + return arrayToStringHelper.stringifyByChunk(array, type, chunk); + } catch (e) { + chunk = Math.floor(chunk / 2); + } + } + } + return arrayToStringHelper.stringifyByChar(array); + } + exports2.applyFromCharCode = arrayLikeToString; + function arrayLikeToArrayLike(arrayFrom, arrayTo) { + for (var i = 0; i < arrayFrom.length; i++) { + arrayTo[i] = arrayFrom[i]; + } + return arrayTo; + } + var transform = {}; + transform["string"] = { + "string": identity, + "array": function(input) { + return stringToArrayLike(input, new Array(input.length)); + }, + "arraybuffer": function(input) { + return transform["string"]["uint8array"](input).buffer; + }, + "uint8array": function(input) { + return stringToArrayLike(input, new Uint8Array(input.length)); + }, + "nodebuffer": function(input) { + return stringToArrayLike(input, nodejsUtils.allocBuffer(input.length)); + } + }; + transform["array"] = { + "string": arrayLikeToString, + "array": identity, + "arraybuffer": function(input) { + return new Uint8Array(input).buffer; + }, + "uint8array": function(input) { + return new Uint8Array(input); + }, + "nodebuffer": function(input) { + return nodejsUtils.newBufferFrom(input); + } + }; + transform["arraybuffer"] = { + "string": function(input) { + return arrayLikeToString(new Uint8Array(input)); + }, + "array": function(input) { + return arrayLikeToArrayLike(new Uint8Array(input), new Array(input.byteLength)); + }, + "arraybuffer": identity, + "uint8array": function(input) { + return new Uint8Array(input); + }, + "nodebuffer": function(input) { + return nodejsUtils.newBufferFrom(new Uint8Array(input)); + } + }; + transform["uint8array"] = { + "string": arrayLikeToString, + "array": function(input) { + return arrayLikeToArrayLike(input, new Array(input.length)); + }, + "arraybuffer": function(input) { + return input.buffer; + }, + "uint8array": identity, + "nodebuffer": function(input) { + return nodejsUtils.newBufferFrom(input); + } + }; + transform["nodebuffer"] = { + "string": arrayLikeToString, + "array": function(input) { + return arrayLikeToArrayLike(input, new Array(input.length)); + }, + "arraybuffer": function(input) { + return transform["nodebuffer"]["uint8array"](input).buffer; + }, + "uint8array": function(input) { + return arrayLikeToArrayLike(input, new Uint8Array(input.length)); + }, + "nodebuffer": identity + }; + exports2.transformTo = function(outputType, input) { + if (!input) { + input = ""; + } + if (!outputType) { + return input; + } + exports2.checkSupport(outputType); + var inputType = exports2.getTypeOf(input); + var result = transform[inputType][outputType](input); + return result; + }; + exports2.resolve = function(path) { + var parts = path.split("/"); + var result = []; + for (var index = 0; index < parts.length; index++) { + var part = parts[index]; + if (part === "." || part === "" && index !== 0 && index !== parts.length - 1) { + continue; + } else if (part === "..") { + result.pop(); + } else { + result.push(part); + } + } + return result.join("/"); + }; + exports2.getTypeOf = function(input) { + if (typeof input === "string") { + return "string"; + } + var proto = Object.prototype.toString.call(input); + if (proto === "[object Array]") { + return "array"; + } + if (support.nodebuffer && nodejsUtils.isBuffer(input)) { + return "nodebuffer"; + } + if (support.uint8array && proto === "[object Uint8Array]") { + return "uint8array"; + } + if (support.arraybuffer && proto === "[object ArrayBuffer]") { + return "arraybuffer"; + } + }; + exports2.checkSupport = function(type) { + var supported = support[type.toLowerCase()]; + if (!supported) { + throw new Error(type + " is not supported by this platform"); + } + }; + exports2.MAX_VALUE_16BITS = 65535; + exports2.MAX_VALUE_32BITS = -1; + exports2.pretty = function(str) { + var res = "", code, i; + for (i = 0; i < (str || "").length; i++) { + code = str.charCodeAt(i); + res += "\\x" + (code < 16 ? "0" : "") + code.toString(16).toUpperCase(); + } + return res; + }; + exports2.delay = function(callback, args, self2) { + setImmediate(function() { + callback.apply(self2 || null, args || []); + }); + }; + exports2.inherits = function(ctor, superCtor) { + var Obj = function() { + }; + Obj.prototype = superCtor.prototype; + ctor.prototype = new Obj(); + }; + exports2.extend = function() { + var result = {}, i, attr; + for (i = 0; i < arguments.length; i++) { + for (attr in arguments[i]) { + if (Object.prototype.hasOwnProperty.call(arguments[i], attr) && typeof result[attr] === "undefined") { + result[attr] = arguments[i][attr]; + } + } + } + return result; + }; + exports2.prepareContent = function(name, inputData, isBinary, isOptimizedBinaryString, isBase64) { + var promise = external.Promise.resolve(inputData).then(function(data) { + var isBlob = support.blob && (data instanceof Blob || ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(data)) !== -1); + if (isBlob) { + if (typeof Blob.prototype.arrayBuffer !== "undefined") { + return data.arrayBuffer(); + } else if (typeof FileReader !== "undefined") { + return new external.Promise(function(resolve, reject) { + var reader = new FileReader(); + reader.onload = function(e) { + resolve(e.target.result); + }; + reader.onerror = function(e) { + reject(e.target.error); + }; + reader.readAsArrayBuffer(data); + }); + } else { + return external.Promise.reject( + new Error(name + " is a Blob, but we have no way of reading it.") + ); + } + } + return data; + }); + return promise.then(function(data) { + var dataType = exports2.getTypeOf(data); + if (!dataType) { + return external.Promise.reject( + new Error("Can't read the data of '" + name + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?") + ); + } + if (dataType === "arraybuffer") { + data = exports2.transformTo("uint8array", data); + } else if (dataType === "string") { + if (isBase64) { + data = base64.decode(data); + } else if (isBinary) { + if (isOptimizedBinaryString !== true) { + data = string2binary(data); + } + } + } + return data; + }); + }; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/stream/GenericWorker.js +var require_GenericWorker = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/stream/GenericWorker.js"(exports2, module2) { + "use strict"; + function GenericWorker(name) { + this.name = name || "default"; + this.streamInfo = {}; + this.generatedError = null; + this.extraStreamInfo = {}; + this.isPaused = true; + this.isFinished = false; + this.isLocked = false; + this._listeners = { + "data": [], + "end": [], + "error": [] + }; + this.previous = null; + } + GenericWorker.prototype = { + /** + * Push a chunk to the next workers. + * @param {Object} chunk the chunk to push + */ + push: function(chunk) { + this.emit("data", chunk); + }, + /** + * End the stream. + * @return {Boolean} true if this call ended the worker, false otherwise. + */ + end: function() { + if (this.isFinished) { + return false; + } + this.flush(); + try { + this.emit("end"); + this.cleanUp(); + this.isFinished = true; + } catch (e) { + this.emit("error", e); + } + return true; + }, + /** + * End the stream with an error. + * @param {Error} e the error which caused the premature end. + * @return {Boolean} true if this call ended the worker with an error, false otherwise. + */ + error: function(e) { + if (this.isFinished) { + return false; + } + if (this.isPaused) { + this.generatedError = e; + } else { + this.isFinished = true; + this.emit("error", e); + if (this.previous) { + this.previous.error(e); + } + this.cleanUp(); + } + return true; + }, + /** + * Add a callback on an event. + * @param {String} name the name of the event (data, end, error) + * @param {Function} listener the function to call when the event is triggered + * @return {GenericWorker} the current object for chainability + */ + on: function(name, listener) { + this._listeners[name].push(listener); + return this; + }, + /** + * Clean any references when a worker is ending. + */ + cleanUp: function() { + this.streamInfo = this.generatedError = this.extraStreamInfo = null; + this._listeners = []; + }, + /** + * Trigger an event. This will call registered callback with the provided arg. + * @param {String} name the name of the event (data, end, error) + * @param {Object} arg the argument to call the callback with. + */ + emit: function(name, arg) { + if (this._listeners[name]) { + for (var i = 0; i < this._listeners[name].length; i++) { + this._listeners[name][i].call(this, arg); + } + } + }, + /** + * Chain a worker with an other. + * @param {Worker} next the worker receiving events from the current one. + * @return {worker} the next worker for chainability + */ + pipe: function(next) { + return next.registerPrevious(this); + }, + /** + * Same as `pipe` in the other direction. + * Using an API with `pipe(next)` is very easy. + * Implementing the API with the point of view of the next one registering + * a source is easier, see the ZipFileWorker. + * @param {Worker} previous the previous worker, sending events to this one + * @return {Worker} the current worker for chainability + */ + registerPrevious: function(previous) { + if (this.isLocked) { + throw new Error("The stream '" + this + "' has already been used."); + } + this.streamInfo = previous.streamInfo; + this.mergeStreamInfo(); + this.previous = previous; + var self2 = this; + previous.on("data", function(chunk) { + self2.processChunk(chunk); + }); + previous.on("end", function() { + self2.end(); + }); + previous.on("error", function(e) { + self2.error(e); + }); + return this; + }, + /** + * Pause the stream so it doesn't send events anymore. + * @return {Boolean} true if this call paused the worker, false otherwise. + */ + pause: function() { + if (this.isPaused || this.isFinished) { + return false; + } + this.isPaused = true; + if (this.previous) { + this.previous.pause(); + } + return true; + }, + /** + * Resume a paused stream. + * @return {Boolean} true if this call resumed the worker, false otherwise. + */ + resume: function() { + if (!this.isPaused || this.isFinished) { + return false; + } + this.isPaused = false; + var withError = false; + if (this.generatedError) { + this.error(this.generatedError); + withError = true; + } + if (this.previous) { + this.previous.resume(); + } + return !withError; + }, + /** + * Flush any remaining bytes as the stream is ending. + */ + flush: function() { + }, + /** + * Process a chunk. This is usually the method overridden. + * @param {Object} chunk the chunk to process. + */ + processChunk: function(chunk) { + this.push(chunk); + }, + /** + * Add a key/value to be added in the workers chain streamInfo once activated. + * @param {String} key the key to use + * @param {Object} value the associated value + * @return {Worker} the current worker for chainability + */ + withStreamInfo: function(key, value) { + this.extraStreamInfo[key] = value; + this.mergeStreamInfo(); + return this; + }, + /** + * Merge this worker's streamInfo into the chain's streamInfo. + */ + mergeStreamInfo: function() { + for (var key in this.extraStreamInfo) { + if (!Object.prototype.hasOwnProperty.call(this.extraStreamInfo, key)) { + continue; + } + this.streamInfo[key] = this.extraStreamInfo[key]; + } + }, + /** + * Lock the stream to prevent further updates on the workers chain. + * After calling this method, all calls to pipe will fail. + */ + lock: function() { + if (this.isLocked) { + throw new Error("The stream '" + this + "' has already been used."); + } + this.isLocked = true; + if (this.previous) { + this.previous.lock(); + } + }, + /** + * + * Pretty print the workers chain. + */ + toString: function() { + var me = "Worker " + this.name; + if (this.previous) { + return this.previous + " -> " + me; + } else { + return me; + } + } + }; + module2.exports = GenericWorker; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/utf8.js +var require_utf8 = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/utf8.js"(exports2) { + "use strict"; + var utils = require_utils12(); + var support = require_support(); + var nodejsUtils = require_nodejsUtils(); + var GenericWorker = require_GenericWorker(); + var _utf8len = new Array(256); + for (i = 0; i < 256; i++) { + _utf8len[i] = i >= 252 ? 6 : i >= 248 ? 5 : i >= 240 ? 4 : i >= 224 ? 3 : i >= 192 ? 2 : 1; + } + var i; + _utf8len[254] = _utf8len[254] = 1; + var string2buf = function(str) { + var buf, c, c2, m_pos, i2, str_len = str.length, buf_len = 0; + for (m_pos = 0; m_pos < str_len; m_pos++) { + c = str.charCodeAt(m_pos); + if ((c & 64512) === 55296 && m_pos + 1 < str_len) { + c2 = str.charCodeAt(m_pos + 1); + if ((c2 & 64512) === 56320) { + c = 65536 + (c - 55296 << 10) + (c2 - 56320); + m_pos++; + } + } + buf_len += c < 128 ? 1 : c < 2048 ? 2 : c < 65536 ? 3 : 4; + } + if (support.uint8array) { + buf = new Uint8Array(buf_len); + } else { + buf = new Array(buf_len); + } + for (i2 = 0, m_pos = 0; i2 < buf_len; m_pos++) { + c = str.charCodeAt(m_pos); + if ((c & 64512) === 55296 && m_pos + 1 < str_len) { + c2 = str.charCodeAt(m_pos + 1); + if ((c2 & 64512) === 56320) { + c = 65536 + (c - 55296 << 10) + (c2 - 56320); + m_pos++; + } + } + if (c < 128) { + buf[i2++] = c; + } else if (c < 2048) { + buf[i2++] = 192 | c >>> 6; + buf[i2++] = 128 | c & 63; + } else if (c < 65536) { + buf[i2++] = 224 | c >>> 12; + buf[i2++] = 128 | c >>> 6 & 63; + buf[i2++] = 128 | c & 63; + } else { + buf[i2++] = 240 | c >>> 18; + buf[i2++] = 128 | c >>> 12 & 63; + buf[i2++] = 128 | c >>> 6 & 63; + buf[i2++] = 128 | c & 63; + } + } + return buf; + }; + var utf8border = function(buf, max) { + var pos; + max = max || buf.length; + if (max > buf.length) { + max = buf.length; + } + pos = max - 1; + while (pos >= 0 && (buf[pos] & 192) === 128) { + pos--; + } + if (pos < 0) { + return max; + } + if (pos === 0) { + return max; + } + return pos + _utf8len[buf[pos]] > max ? pos : max; + }; + var buf2string = function(buf) { + var i2, out, c, c_len; + var len = buf.length; + var utf16buf = new Array(len * 2); + for (out = 0, i2 = 0; i2 < len; ) { + c = buf[i2++]; + if (c < 128) { + utf16buf[out++] = c; + continue; + } + c_len = _utf8len[c]; + if (c_len > 4) { + utf16buf[out++] = 65533; + i2 += c_len - 1; + continue; + } + c &= c_len === 2 ? 31 : c_len === 3 ? 15 : 7; + while (c_len > 1 && i2 < len) { + c = c << 6 | buf[i2++] & 63; + c_len--; + } + if (c_len > 1) { + utf16buf[out++] = 65533; + continue; + } + if (c < 65536) { + utf16buf[out++] = c; + } else { + c -= 65536; + utf16buf[out++] = 55296 | c >> 10 & 1023; + utf16buf[out++] = 56320 | c & 1023; + } + } + if (utf16buf.length !== out) { + if (utf16buf.subarray) { + utf16buf = utf16buf.subarray(0, out); + } else { + utf16buf.length = out; + } + } + return utils.applyFromCharCode(utf16buf); + }; + exports2.utf8encode = function utf8encode(str) { + if (support.nodebuffer) { + return nodejsUtils.newBufferFrom(str, "utf-8"); + } + return string2buf(str); + }; + exports2.utf8decode = function utf8decode(buf) { + if (support.nodebuffer) { + return utils.transformTo("nodebuffer", buf).toString("utf-8"); + } + buf = utils.transformTo(support.uint8array ? "uint8array" : "array", buf); + return buf2string(buf); + }; + function Utf8DecodeWorker() { + GenericWorker.call(this, "utf-8 decode"); + this.leftOver = null; + } + utils.inherits(Utf8DecodeWorker, GenericWorker); + Utf8DecodeWorker.prototype.processChunk = function(chunk) { + var data = utils.transformTo(support.uint8array ? "uint8array" : "array", chunk.data); + if (this.leftOver && this.leftOver.length) { + if (support.uint8array) { + var previousData = data; + data = new Uint8Array(previousData.length + this.leftOver.length); + data.set(this.leftOver, 0); + data.set(previousData, this.leftOver.length); + } else { + data = this.leftOver.concat(data); + } + this.leftOver = null; + } + var nextBoundary = utf8border(data); + var usableData = data; + if (nextBoundary !== data.length) { + if (support.uint8array) { + usableData = data.subarray(0, nextBoundary); + this.leftOver = data.subarray(nextBoundary, data.length); + } else { + usableData = data.slice(0, nextBoundary); + this.leftOver = data.slice(nextBoundary, data.length); + } + } + this.push({ + data: exports2.utf8decode(usableData), + meta: chunk.meta + }); + }; + Utf8DecodeWorker.prototype.flush = function() { + if (this.leftOver && this.leftOver.length) { + this.push({ + data: exports2.utf8decode(this.leftOver), + meta: {} + }); + this.leftOver = null; + } + }; + exports2.Utf8DecodeWorker = Utf8DecodeWorker; + function Utf8EncodeWorker() { + GenericWorker.call(this, "utf-8 encode"); + } + utils.inherits(Utf8EncodeWorker, GenericWorker); + Utf8EncodeWorker.prototype.processChunk = function(chunk) { + this.push({ + data: exports2.utf8encode(chunk.data), + meta: chunk.meta + }); + }; + exports2.Utf8EncodeWorker = Utf8EncodeWorker; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/stream/ConvertWorker.js +var require_ConvertWorker = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/stream/ConvertWorker.js"(exports2, module2) { + "use strict"; + var GenericWorker = require_GenericWorker(); + var utils = require_utils12(); + function ConvertWorker(destType) { + GenericWorker.call(this, "ConvertWorker to " + destType); + this.destType = destType; + } + utils.inherits(ConvertWorker, GenericWorker); + ConvertWorker.prototype.processChunk = function(chunk) { + this.push({ + data: utils.transformTo(this.destType, chunk.data), + meta: chunk.meta + }); + }; + module2.exports = ConvertWorker; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/nodejs/NodejsStreamOutputAdapter.js +var require_NodejsStreamOutputAdapter = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/nodejs/NodejsStreamOutputAdapter.js"(exports2, module2) { + "use strict"; + var Readable = require_readable2().Readable; + var utils = require_utils12(); + utils.inherits(NodejsStreamOutputAdapter, Readable); + function NodejsStreamOutputAdapter(helper, options, updateCb) { + Readable.call(this, options); + this._helper = helper; + var self2 = this; + helper.on("data", function(data, meta) { + if (!self2.push(data)) { + self2._helper.pause(); + } + if (updateCb) { + updateCb(meta); + } + }).on("error", function(e) { + self2.emit("error", e); + }).on("end", function() { + self2.push(null); + }); + } + NodejsStreamOutputAdapter.prototype._read = function() { + this._helper.resume(); + }; + module2.exports = NodejsStreamOutputAdapter; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/stream/StreamHelper.js +var require_StreamHelper = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/stream/StreamHelper.js"(exports2, module2) { + "use strict"; + var utils = require_utils12(); + var ConvertWorker = require_ConvertWorker(); + var GenericWorker = require_GenericWorker(); + var base64 = require_base64(); + var support = require_support(); + var external = require_external(); + var NodejsStreamOutputAdapter = null; + if (support.nodestream) { + try { + NodejsStreamOutputAdapter = require_NodejsStreamOutputAdapter(); + } catch (e) { + } + } + function transformZipOutput(type, content, mimeType) { + switch (type) { + case "blob": + return utils.newBlob(utils.transformTo("arraybuffer", content), mimeType); + case "base64": + return base64.encode(content); + default: + return utils.transformTo(type, content); + } + } + function concat(type, dataArray) { + var i, index = 0, res = null, totalLength = 0; + for (i = 0; i < dataArray.length; i++) { + totalLength += dataArray[i].length; + } + switch (type) { + case "string": + return dataArray.join(""); + case "array": + return Array.prototype.concat.apply([], dataArray); + case "uint8array": + res = new Uint8Array(totalLength); + for (i = 0; i < dataArray.length; i++) { + res.set(dataArray[i], index); + index += dataArray[i].length; + } + return res; + case "nodebuffer": + return Buffer.concat(dataArray); + default: + throw new Error("concat : unsupported type '" + type + "'"); + } + } + function accumulate(helper, updateCallback) { + return new external.Promise(function(resolve, reject) { + var dataArray = []; + var chunkType = helper._internalType, resultType = helper._outputType, mimeType = helper._mimeType; + helper.on("data", function(data, meta) { + dataArray.push(data); + if (updateCallback) { + updateCallback(meta); + } + }).on("error", function(err) { + dataArray = []; + reject(err); + }).on("end", function() { + try { + var result = transformZipOutput(resultType, concat(chunkType, dataArray), mimeType); + resolve(result); + } catch (e) { + reject(e); + } + dataArray = []; + }).resume(); + }); + } + function StreamHelper(worker, outputType, mimeType) { + var internalType = outputType; + switch (outputType) { + case "blob": + case "arraybuffer": + internalType = "uint8array"; + break; + case "base64": + internalType = "string"; + break; + } + try { + this._internalType = internalType; + this._outputType = outputType; + this._mimeType = mimeType; + utils.checkSupport(internalType); + this._worker = worker.pipe(new ConvertWorker(internalType)); + worker.lock(); + } catch (e) { + this._worker = new GenericWorker("error"); + this._worker.error(e); + } + } + StreamHelper.prototype = { + /** + * Listen a StreamHelper, accumulate its content and concatenate it into a + * complete block. + * @param {Function} updateCb the update callback. + * @return Promise the promise for the accumulation. + */ + accumulate: function(updateCb) { + return accumulate(this, updateCb); + }, + /** + * Add a listener on an event triggered on a stream. + * @param {String} evt the name of the event + * @param {Function} fn the listener + * @return {StreamHelper} the current helper. + */ + on: function(evt, fn) { + var self2 = this; + if (evt === "data") { + this._worker.on(evt, function(chunk) { + fn.call(self2, chunk.data, chunk.meta); + }); + } else { + this._worker.on(evt, function() { + utils.delay(fn, arguments, self2); + }); + } + return this; + }, + /** + * Resume the flow of chunks. + * @return {StreamHelper} the current helper. + */ + resume: function() { + utils.delay(this._worker.resume, [], this._worker); + return this; + }, + /** + * Pause the flow of chunks. + * @return {StreamHelper} the current helper. + */ + pause: function() { + this._worker.pause(); + return this; + }, + /** + * Return a nodejs stream for this helper. + * @param {Function} updateCb the update callback. + * @return {NodejsStreamOutputAdapter} the nodejs stream. + */ + toNodejsStream: function(updateCb) { + utils.checkSupport("nodestream"); + if (this._outputType !== "nodebuffer") { + throw new Error(this._outputType + " is not supported by this method"); + } + return new NodejsStreamOutputAdapter(this, { + objectMode: this._outputType !== "nodebuffer" + }, updateCb); + } + }; + module2.exports = StreamHelper; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/defaults.js +var require_defaults = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/defaults.js"(exports2) { + "use strict"; + exports2.base64 = false; + exports2.binary = false; + exports2.dir = false; + exports2.createFolders = true; + exports2.date = null; + exports2.compression = null; + exports2.compressionOptions = null; + exports2.comment = null; + exports2.unixPermissions = null; + exports2.dosPermissions = null; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/stream/DataWorker.js +var require_DataWorker = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/stream/DataWorker.js"(exports2, module2) { + "use strict"; + var utils = require_utils12(); + var GenericWorker = require_GenericWorker(); + var DEFAULT_BLOCK_SIZE = 16 * 1024; + function DataWorker(dataP) { + GenericWorker.call(this, "DataWorker"); + var self2 = this; + this.dataIsReady = false; + this.index = 0; + this.max = 0; + this.data = null; + this.type = ""; + this._tickScheduled = false; + dataP.then(function(data) { + self2.dataIsReady = true; + self2.data = data; + self2.max = data && data.length || 0; + self2.type = utils.getTypeOf(data); + if (!self2.isPaused) { + self2._tickAndRepeat(); + } + }, function(e) { + self2.error(e); + }); + } + utils.inherits(DataWorker, GenericWorker); + DataWorker.prototype.cleanUp = function() { + GenericWorker.prototype.cleanUp.call(this); + this.data = null; + }; + DataWorker.prototype.resume = function() { + if (!GenericWorker.prototype.resume.call(this)) { + return false; + } + if (!this._tickScheduled && this.dataIsReady) { + this._tickScheduled = true; + utils.delay(this._tickAndRepeat, [], this); + } + return true; + }; + DataWorker.prototype._tickAndRepeat = function() { + this._tickScheduled = false; + if (this.isPaused || this.isFinished) { + return; + } + this._tick(); + if (!this.isFinished) { + utils.delay(this._tickAndRepeat, [], this); + this._tickScheduled = true; + } + }; + DataWorker.prototype._tick = function() { + if (this.isPaused || this.isFinished) { + return false; + } + var size = DEFAULT_BLOCK_SIZE; + var data = null, nextIndex = Math.min(this.max, this.index + size); + if (this.index >= this.max) { + return this.end(); + } else { + switch (this.type) { + case "string": + data = this.data.substring(this.index, nextIndex); + break; + case "uint8array": + data = this.data.subarray(this.index, nextIndex); + break; + case "array": + case "nodebuffer": + data = this.data.slice(this.index, nextIndex); + break; + } + this.index = nextIndex; + return this.push({ + data, + meta: { + percent: this.max ? this.index / this.max * 100 : 0 + } + }); + } + }; + module2.exports = DataWorker; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/crc32.js +var require_crc32 = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/crc32.js"(exports2, module2) { + "use strict"; + var utils = require_utils12(); + function makeTable() { + var c, table = []; + for (var n = 0; n < 256; n++) { + c = n; + for (var k = 0; k < 8; k++) { + c = c & 1 ? 3988292384 ^ c >>> 1 : c >>> 1; + } + table[n] = c; + } + return table; + } + var crcTable = makeTable(); + function crc32(crc, buf, len, pos) { + var t = crcTable, end = pos + len; + crc = crc ^ -1; + for (var i = pos; i < end; i++) { + crc = crc >>> 8 ^ t[(crc ^ buf[i]) & 255]; + } + return crc ^ -1; + } + function crc32str(crc, str, len, pos) { + var t = crcTable, end = pos + len; + crc = crc ^ -1; + for (var i = pos; i < end; i++) { + crc = crc >>> 8 ^ t[(crc ^ str.charCodeAt(i)) & 255]; + } + return crc ^ -1; + } + module2.exports = function crc32wrapper(input, crc) { + if (typeof input === "undefined" || !input.length) { + return 0; + } + var isArray = utils.getTypeOf(input) !== "string"; + if (isArray) { + return crc32(crc | 0, input, input.length, 0); + } else { + return crc32str(crc | 0, input, input.length, 0); + } + }; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/stream/Crc32Probe.js +var require_Crc32Probe = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/stream/Crc32Probe.js"(exports2, module2) { + "use strict"; + var GenericWorker = require_GenericWorker(); + var crc32 = require_crc32(); + var utils = require_utils12(); + function Crc32Probe() { + GenericWorker.call(this, "Crc32Probe"); + this.withStreamInfo("crc32", 0); + } + utils.inherits(Crc32Probe, GenericWorker); + Crc32Probe.prototype.processChunk = function(chunk) { + this.streamInfo.crc32 = crc32(chunk.data, this.streamInfo.crc32 || 0); + this.push(chunk); + }; + module2.exports = Crc32Probe; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/stream/DataLengthProbe.js +var require_DataLengthProbe = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/stream/DataLengthProbe.js"(exports2, module2) { + "use strict"; + var utils = require_utils12(); + var GenericWorker = require_GenericWorker(); + function DataLengthProbe(propName) { + GenericWorker.call(this, "DataLengthProbe for " + propName); + this.propName = propName; + this.withStreamInfo(propName, 0); + } + utils.inherits(DataLengthProbe, GenericWorker); + DataLengthProbe.prototype.processChunk = function(chunk) { + if (chunk) { + var length = this.streamInfo[this.propName] || 0; + this.streamInfo[this.propName] = length + chunk.data.length; + } + GenericWorker.prototype.processChunk.call(this, chunk); + }; + module2.exports = DataLengthProbe; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/compressedObject.js +var require_compressedObject = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/compressedObject.js"(exports2, module2) { + "use strict"; + var external = require_external(); + var DataWorker = require_DataWorker(); + var Crc32Probe = require_Crc32Probe(); + var DataLengthProbe = require_DataLengthProbe(); + function CompressedObject(compressedSize, uncompressedSize, crc32, compression, data) { + this.compressedSize = compressedSize; + this.uncompressedSize = uncompressedSize; + this.crc32 = crc32; + this.compression = compression; + this.compressedContent = data; + } + CompressedObject.prototype = { + /** + * Create a worker to get the uncompressed content. + * @return {GenericWorker} the worker. + */ + getContentWorker: function() { + var worker = new DataWorker(external.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new DataLengthProbe("data_length")); + var that = this; + worker.on("end", function() { + if (this.streamInfo["data_length"] !== that.uncompressedSize) { + throw new Error("Bug : uncompressed data size mismatch"); + } + }); + return worker; + }, + /** + * Create a worker to get the compressed content. + * @return {GenericWorker} the worker. + */ + getCompressedWorker: function() { + return new DataWorker(external.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize", this.compressedSize).withStreamInfo("uncompressedSize", this.uncompressedSize).withStreamInfo("crc32", this.crc32).withStreamInfo("compression", this.compression); + } + }; + CompressedObject.createWorkerFrom = function(uncompressedWorker, compression, compressionOptions) { + return uncompressedWorker.pipe(new Crc32Probe()).pipe(new DataLengthProbe("uncompressedSize")).pipe(compression.compressWorker(compressionOptions)).pipe(new DataLengthProbe("compressedSize")).withStreamInfo("compression", compression); + }; + module2.exports = CompressedObject; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/zipObject.js +var require_zipObject = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/zipObject.js"(exports2, module2) { + "use strict"; + var StreamHelper = require_StreamHelper(); + var DataWorker = require_DataWorker(); + var utf8 = require_utf8(); + var CompressedObject = require_compressedObject(); + var GenericWorker = require_GenericWorker(); + var ZipObject = function(name, data, options) { + this.name = name; + this.dir = options.dir; + this.date = options.date; + this.comment = options.comment; + this.unixPermissions = options.unixPermissions; + this.dosPermissions = options.dosPermissions; + this._data = data; + this._dataBinary = options.binary; + this.options = { + compression: options.compression, + compressionOptions: options.compressionOptions + }; + }; + ZipObject.prototype = { + /** + * Create an internal stream for the content of this object. + * @param {String} type the type of each chunk. + * @return StreamHelper the stream. + */ + internalStream: function(type) { + var result = null, outputType = "string"; + try { + if (!type) { + throw new Error("No output type specified."); + } + outputType = type.toLowerCase(); + var askUnicodeString = outputType === "string" || outputType === "text"; + if (outputType === "binarystring" || outputType === "text") { + outputType = "string"; + } + result = this._decompressWorker(); + var isUnicodeString = !this._dataBinary; + if (isUnicodeString && !askUnicodeString) { + result = result.pipe(new utf8.Utf8EncodeWorker()); + } + if (!isUnicodeString && askUnicodeString) { + result = result.pipe(new utf8.Utf8DecodeWorker()); + } + } catch (e) { + result = new GenericWorker("error"); + result.error(e); + } + return new StreamHelper(result, outputType, ""); + }, + /** + * Prepare the content in the asked type. + * @param {String} type the type of the result. + * @param {Function} onUpdate a function to call on each internal update. + * @return Promise the promise of the result. + */ + async: function(type, onUpdate) { + return this.internalStream(type).accumulate(onUpdate); + }, + /** + * Prepare the content as a nodejs stream. + * @param {String} type the type of each chunk. + * @param {Function} onUpdate a function to call on each internal update. + * @return Stream the stream. + */ + nodeStream: function(type, onUpdate) { + return this.internalStream(type || "nodebuffer").toNodejsStream(onUpdate); + }, + /** + * Return a worker for the compressed content. + * @private + * @param {Object} compression the compression object to use. + * @param {Object} compressionOptions the options to use when compressing. + * @return Worker the worker. + */ + _compressWorker: function(compression, compressionOptions) { + if (this._data instanceof CompressedObject && this._data.compression.magic === compression.magic) { + return this._data.getCompressedWorker(); + } else { + var result = this._decompressWorker(); + if (!this._dataBinary) { + result = result.pipe(new utf8.Utf8EncodeWorker()); + } + return CompressedObject.createWorkerFrom(result, compression, compressionOptions); + } + }, + /** + * Return a worker for the decompressed content. + * @private + * @return Worker the worker. + */ + _decompressWorker: function() { + if (this._data instanceof CompressedObject) { + return this._data.getContentWorker(); + } else if (this._data instanceof GenericWorker) { + return this._data; + } else { + return new DataWorker(this._data); + } + } + }; + var removedMethods = ["asText", "asBinary", "asNodeBuffer", "asUint8Array", "asArrayBuffer"]; + var removedFn = function() { + throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide."); + }; + for (i = 0; i < removedMethods.length; i++) { + ZipObject.prototype[removedMethods[i]] = removedFn; + } + var i; + module2.exports = ZipObject; + } +}); + +// ../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/utils/common.js +var require_common2 = __commonJS({ + "../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/utils/common.js"(exports2) { + "use strict"; + var TYPED_OK = typeof Uint8Array !== "undefined" && typeof Uint16Array !== "undefined" && typeof Int32Array !== "undefined"; + function _has(obj2, key) { + return Object.prototype.hasOwnProperty.call(obj2, key); + } + exports2.assign = function(obj2) { + var sources = Array.prototype.slice.call(arguments, 1); + while (sources.length) { + var source = sources.shift(); + if (!source) { + continue; + } + if (typeof source !== "object") { + throw new TypeError(source + "must be non-object"); + } + for (var p in source) { + if (_has(source, p)) { + obj2[p] = source[p]; + } + } + } + return obj2; + }; + exports2.shrinkBuf = function(buf, size) { + if (buf.length === size) { + return buf; + } + if (buf.subarray) { + return buf.subarray(0, size); + } + buf.length = size; + return buf; + }; + var fnTyped = { + arraySet: function(dest, src, src_offs, len, dest_offs) { + if (src.subarray && dest.subarray) { + dest.set(src.subarray(src_offs, src_offs + len), dest_offs); + return; + } + for (var i = 0; i < len; i++) { + dest[dest_offs + i] = src[src_offs + i]; + } + }, + // Join array of chunks to single array. + flattenChunks: function(chunks) { + var i, l2, len, pos, chunk, result; + len = 0; + for (i = 0, l2 = chunks.length; i < l2; i++) { + len += chunks[i].length; + } + result = new Uint8Array(len); + pos = 0; + for (i = 0, l2 = chunks.length; i < l2; i++) { + chunk = chunks[i]; + result.set(chunk, pos); + pos += chunk.length; + } + return result; + } + }; + var fnUntyped = { + arraySet: function(dest, src, src_offs, len, dest_offs) { + for (var i = 0; i < len; i++) { + dest[dest_offs + i] = src[src_offs + i]; + } + }, + // Join array of chunks to single array. + flattenChunks: function(chunks) { + return [].concat.apply([], chunks); + } + }; + exports2.setTyped = function(on) { + if (on) { + exports2.Buf8 = Uint8Array; + exports2.Buf16 = Uint16Array; + exports2.Buf32 = Int32Array; + exports2.assign(exports2, fnTyped); + } else { + exports2.Buf8 = Array; + exports2.Buf16 = Array; + exports2.Buf32 = Array; + exports2.assign(exports2, fnUntyped); + } + }; + exports2.setTyped(TYPED_OK); + } +}); + +// ../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/trees.js +var require_trees = __commonJS({ + "../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/trees.js"(exports2) { + "use strict"; + var utils = require_common2(); + var Z_FIXED = 4; + var Z_BINARY = 0; + var Z_TEXT = 1; + var Z_UNKNOWN = 2; + function zero(buf) { + var len = buf.length; + while (--len >= 0) { + buf[len] = 0; + } + } + var STORED_BLOCK = 0; + var STATIC_TREES = 1; + var DYN_TREES = 2; + var MIN_MATCH = 3; + var MAX_MATCH = 258; + var LENGTH_CODES = 29; + var LITERALS = 256; + var L_CODES = LITERALS + 1 + LENGTH_CODES; + var D_CODES = 30; + var BL_CODES = 19; + var HEAP_SIZE = 2 * L_CODES + 1; + var MAX_BITS = 15; + var Buf_size = 16; + var MAX_BL_BITS = 7; + var END_BLOCK = 256; + var REP_3_6 = 16; + var REPZ_3_10 = 17; + var REPZ_11_138 = 18; + var extra_lbits = ( + /* extra bits for each length code */ + [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0] + ); + var extra_dbits = ( + /* extra bits for each distance code */ + [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13] + ); + var extra_blbits = ( + /* extra bits for each bit length code */ + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7] + ); + var bl_order = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]; + var DIST_CODE_LEN = 512; + var static_ltree = new Array((L_CODES + 2) * 2); + zero(static_ltree); + var static_dtree = new Array(D_CODES * 2); + zero(static_dtree); + var _dist_code = new Array(DIST_CODE_LEN); + zero(_dist_code); + var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1); + zero(_length_code); + var base_length = new Array(LENGTH_CODES); + zero(base_length); + var base_dist = new Array(D_CODES); + zero(base_dist); + function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) { + this.static_tree = static_tree; + this.extra_bits = extra_bits; + this.extra_base = extra_base; + this.elems = elems; + this.max_length = max_length; + this.has_stree = static_tree && static_tree.length; + } + var static_l_desc; + var static_d_desc; + var static_bl_desc; + function TreeDesc(dyn_tree, stat_desc) { + this.dyn_tree = dyn_tree; + this.max_code = 0; + this.stat_desc = stat_desc; + } + function d_code(dist) { + return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)]; + } + function put_short(s, w) { + s.pending_buf[s.pending++] = w & 255; + s.pending_buf[s.pending++] = w >>> 8 & 255; + } + function send_bits(s, value, length) { + if (s.bi_valid > Buf_size - length) { + s.bi_buf |= value << s.bi_valid & 65535; + put_short(s, s.bi_buf); + s.bi_buf = value >> Buf_size - s.bi_valid; + s.bi_valid += length - Buf_size; + } else { + s.bi_buf |= value << s.bi_valid & 65535; + s.bi_valid += length; + } + } + function send_code(s, c, tree) { + send_bits( + s, + tree[c * 2], + tree[c * 2 + 1] + /*.Len*/ + ); + } + function bi_reverse(code, len) { + var res = 0; + do { + res |= code & 1; + code >>>= 1; + res <<= 1; + } while (--len > 0); + return res >>> 1; + } + function bi_flush(s) { + if (s.bi_valid === 16) { + put_short(s, s.bi_buf); + s.bi_buf = 0; + s.bi_valid = 0; + } else if (s.bi_valid >= 8) { + s.pending_buf[s.pending++] = s.bi_buf & 255; + s.bi_buf >>= 8; + s.bi_valid -= 8; + } + } + function gen_bitlen(s, desc) { + var tree = desc.dyn_tree; + var max_code = desc.max_code; + var stree = desc.stat_desc.static_tree; + var has_stree = desc.stat_desc.has_stree; + var extra = desc.stat_desc.extra_bits; + var base = desc.stat_desc.extra_base; + var max_length = desc.stat_desc.max_length; + var h; + var n, m; + var bits; + var xbits; + var f; + var overflow = 0; + for (bits = 0; bits <= MAX_BITS; bits++) { + s.bl_count[bits] = 0; + } + tree[s.heap[s.heap_max] * 2 + 1] = 0; + for (h = s.heap_max + 1; h < HEAP_SIZE; h++) { + n = s.heap[h]; + bits = tree[tree[n * 2 + 1] * 2 + 1] + 1; + if (bits > max_length) { + bits = max_length; + overflow++; + } + tree[n * 2 + 1] = bits; + if (n > max_code) { + continue; + } + s.bl_count[bits]++; + xbits = 0; + if (n >= base) { + xbits = extra[n - base]; + } + f = tree[n * 2]; + s.opt_len += f * (bits + xbits); + if (has_stree) { + s.static_len += f * (stree[n * 2 + 1] + xbits); + } + } + if (overflow === 0) { + return; + } + do { + bits = max_length - 1; + while (s.bl_count[bits] === 0) { + bits--; + } + s.bl_count[bits]--; + s.bl_count[bits + 1] += 2; + s.bl_count[max_length]--; + overflow -= 2; + } while (overflow > 0); + for (bits = max_length; bits !== 0; bits--) { + n = s.bl_count[bits]; + while (n !== 0) { + m = s.heap[--h]; + if (m > max_code) { + continue; + } + if (tree[m * 2 + 1] !== bits) { + s.opt_len += (bits - tree[m * 2 + 1]) * tree[m * 2]; + tree[m * 2 + 1] = bits; + } + n--; + } + } + } + function gen_codes(tree, max_code, bl_count) { + var next_code = new Array(MAX_BITS + 1); + var code = 0; + var bits; + var n; + for (bits = 1; bits <= MAX_BITS; bits++) { + next_code[bits] = code = code + bl_count[bits - 1] << 1; + } + for (n = 0; n <= max_code; n++) { + var len = tree[n * 2 + 1]; + if (len === 0) { + continue; + } + tree[n * 2] = bi_reverse(next_code[len]++, len); + } + } + function tr_static_init() { + var n; + var bits; + var length; + var code; + var dist; + var bl_count = new Array(MAX_BITS + 1); + length = 0; + for (code = 0; code < LENGTH_CODES - 1; code++) { + base_length[code] = length; + for (n = 0; n < 1 << extra_lbits[code]; n++) { + _length_code[length++] = code; + } + } + _length_code[length - 1] = code; + dist = 0; + for (code = 0; code < 16; code++) { + base_dist[code] = dist; + for (n = 0; n < 1 << extra_dbits[code]; n++) { + _dist_code[dist++] = code; + } + } + dist >>= 7; + for (; code < D_CODES; code++) { + base_dist[code] = dist << 7; + for (n = 0; n < 1 << extra_dbits[code] - 7; n++) { + _dist_code[256 + dist++] = code; + } + } + for (bits = 0; bits <= MAX_BITS; bits++) { + bl_count[bits] = 0; + } + n = 0; + while (n <= 143) { + static_ltree[n * 2 + 1] = 8; + n++; + bl_count[8]++; + } + while (n <= 255) { + static_ltree[n * 2 + 1] = 9; + n++; + bl_count[9]++; + } + while (n <= 279) { + static_ltree[n * 2 + 1] = 7; + n++; + bl_count[7]++; + } + while (n <= 287) { + static_ltree[n * 2 + 1] = 8; + n++; + bl_count[8]++; + } + gen_codes(static_ltree, L_CODES + 1, bl_count); + for (n = 0; n < D_CODES; n++) { + static_dtree[n * 2 + 1] = 5; + static_dtree[n * 2] = bi_reverse(n, 5); + } + static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS); + static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS); + static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS); + } + function init_block(s) { + var n; + for (n = 0; n < L_CODES; n++) { + s.dyn_ltree[n * 2] = 0; + } + for (n = 0; n < D_CODES; n++) { + s.dyn_dtree[n * 2] = 0; + } + for (n = 0; n < BL_CODES; n++) { + s.bl_tree[n * 2] = 0; + } + s.dyn_ltree[END_BLOCK * 2] = 1; + s.opt_len = s.static_len = 0; + s.last_lit = s.matches = 0; + } + function bi_windup(s) { + if (s.bi_valid > 8) { + put_short(s, s.bi_buf); + } else if (s.bi_valid > 0) { + s.pending_buf[s.pending++] = s.bi_buf; + } + s.bi_buf = 0; + s.bi_valid = 0; + } + function copy_block(s, buf, len, header) { + bi_windup(s); + if (header) { + put_short(s, len); + put_short(s, ~len); + } + utils.arraySet(s.pending_buf, s.window, buf, len, s.pending); + s.pending += len; + } + function smaller(tree, n, m, depth) { + var _n2 = n * 2; + var _m2 = m * 2; + return tree[_n2] < tree[_m2] || tree[_n2] === tree[_m2] && depth[n] <= depth[m]; + } + function pqdownheap(s, tree, k) { + var v = s.heap[k]; + var j = k << 1; + while (j <= s.heap_len) { + if (j < s.heap_len && smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) { + j++; + } + if (smaller(tree, v, s.heap[j], s.depth)) { + break; + } + s.heap[k] = s.heap[j]; + k = j; + j <<= 1; + } + s.heap[k] = v; + } + function compress_block(s, ltree, dtree) { + var dist; + var lc; + var lx = 0; + var code; + var extra; + if (s.last_lit !== 0) { + do { + dist = s.pending_buf[s.d_buf + lx * 2] << 8 | s.pending_buf[s.d_buf + lx * 2 + 1]; + lc = s.pending_buf[s.l_buf + lx]; + lx++; + if (dist === 0) { + send_code(s, lc, ltree); + } else { + code = _length_code[lc]; + send_code(s, code + LITERALS + 1, ltree); + extra = extra_lbits[code]; + if (extra !== 0) { + lc -= base_length[code]; + send_bits(s, lc, extra); + } + dist--; + code = d_code(dist); + send_code(s, code, dtree); + extra = extra_dbits[code]; + if (extra !== 0) { + dist -= base_dist[code]; + send_bits(s, dist, extra); + } + } + } while (lx < s.last_lit); + } + send_code(s, END_BLOCK, ltree); + } + function build_tree(s, desc) { + var tree = desc.dyn_tree; + var stree = desc.stat_desc.static_tree; + var has_stree = desc.stat_desc.has_stree; + var elems = desc.stat_desc.elems; + var n, m; + var max_code = -1; + var node; + s.heap_len = 0; + s.heap_max = HEAP_SIZE; + for (n = 0; n < elems; n++) { + if (tree[n * 2] !== 0) { + s.heap[++s.heap_len] = max_code = n; + s.depth[n] = 0; + } else { + tree[n * 2 + 1] = 0; + } + } + while (s.heap_len < 2) { + node = s.heap[++s.heap_len] = max_code < 2 ? ++max_code : 0; + tree[node * 2] = 1; + s.depth[node] = 0; + s.opt_len--; + if (has_stree) { + s.static_len -= stree[node * 2 + 1]; + } + } + desc.max_code = max_code; + for (n = s.heap_len >> 1; n >= 1; n--) { + pqdownheap(s, tree, n); + } + node = elems; + do { + n = s.heap[ + 1 + /*SMALLEST*/ + ]; + s.heap[ + 1 + /*SMALLEST*/ + ] = s.heap[s.heap_len--]; + pqdownheap( + s, + tree, + 1 + /*SMALLEST*/ + ); + m = s.heap[ + 1 + /*SMALLEST*/ + ]; + s.heap[--s.heap_max] = n; + s.heap[--s.heap_max] = m; + tree[node * 2] = tree[n * 2] + tree[m * 2]; + s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1; + tree[n * 2 + 1] = tree[m * 2 + 1] = node; + s.heap[ + 1 + /*SMALLEST*/ + ] = node++; + pqdownheap( + s, + tree, + 1 + /*SMALLEST*/ + ); + } while (s.heap_len >= 2); + s.heap[--s.heap_max] = s.heap[ + 1 + /*SMALLEST*/ + ]; + gen_bitlen(s, desc); + gen_codes(tree, max_code, s.bl_count); + } + function scan_tree(s, tree, max_code) { + var n; + var prevlen = -1; + var curlen; + var nextlen = tree[0 * 2 + 1]; + var count = 0; + var max_count = 7; + var min_count = 4; + if (nextlen === 0) { + max_count = 138; + min_count = 3; + } + tree[(max_code + 1) * 2 + 1] = 65535; + for (n = 0; n <= max_code; n++) { + curlen = nextlen; + nextlen = tree[(n + 1) * 2 + 1]; + if (++count < max_count && curlen === nextlen) { + continue; + } else if (count < min_count) { + s.bl_tree[curlen * 2] += count; + } else if (curlen !== 0) { + if (curlen !== prevlen) { + s.bl_tree[curlen * 2]++; + } + s.bl_tree[REP_3_6 * 2]++; + } else if (count <= 10) { + s.bl_tree[REPZ_3_10 * 2]++; + } else { + s.bl_tree[REPZ_11_138 * 2]++; + } + count = 0; + prevlen = curlen; + if (nextlen === 0) { + max_count = 138; + min_count = 3; + } else if (curlen === nextlen) { + max_count = 6; + min_count = 3; + } else { + max_count = 7; + min_count = 4; + } + } + } + function send_tree(s, tree, max_code) { + var n; + var prevlen = -1; + var curlen; + var nextlen = tree[0 * 2 + 1]; + var count = 0; + var max_count = 7; + var min_count = 4; + if (nextlen === 0) { + max_count = 138; + min_count = 3; + } + for (n = 0; n <= max_code; n++) { + curlen = nextlen; + nextlen = tree[(n + 1) * 2 + 1]; + if (++count < max_count && curlen === nextlen) { + continue; + } else if (count < min_count) { + do { + send_code(s, curlen, s.bl_tree); + } while (--count !== 0); + } else if (curlen !== 0) { + if (curlen !== prevlen) { + send_code(s, curlen, s.bl_tree); + count--; + } + send_code(s, REP_3_6, s.bl_tree); + send_bits(s, count - 3, 2); + } else if (count <= 10) { + send_code(s, REPZ_3_10, s.bl_tree); + send_bits(s, count - 3, 3); + } else { + send_code(s, REPZ_11_138, s.bl_tree); + send_bits(s, count - 11, 7); + } + count = 0; + prevlen = curlen; + if (nextlen === 0) { + max_count = 138; + min_count = 3; + } else if (curlen === nextlen) { + max_count = 6; + min_count = 3; + } else { + max_count = 7; + min_count = 4; + } + } + } + function build_bl_tree(s) { + var max_blindex; + scan_tree(s, s.dyn_ltree, s.l_desc.max_code); + scan_tree(s, s.dyn_dtree, s.d_desc.max_code); + build_tree(s, s.bl_desc); + for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) { + if (s.bl_tree[bl_order[max_blindex] * 2 + 1] !== 0) { + break; + } + } + s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; + return max_blindex; + } + function send_all_trees(s, lcodes, dcodes, blcodes) { + var rank; + send_bits(s, lcodes - 257, 5); + send_bits(s, dcodes - 1, 5); + send_bits(s, blcodes - 4, 4); + for (rank = 0; rank < blcodes; rank++) { + send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1], 3); + } + send_tree(s, s.dyn_ltree, lcodes - 1); + send_tree(s, s.dyn_dtree, dcodes - 1); + } + function detect_data_type(s) { + var black_mask = 4093624447; + var n; + for (n = 0; n <= 31; n++, black_mask >>>= 1) { + if (black_mask & 1 && s.dyn_ltree[n * 2] !== 0) { + return Z_BINARY; + } + } + if (s.dyn_ltree[9 * 2] !== 0 || s.dyn_ltree[10 * 2] !== 0 || s.dyn_ltree[13 * 2] !== 0) { + return Z_TEXT; + } + for (n = 32; n < LITERALS; n++) { + if (s.dyn_ltree[n * 2] !== 0) { + return Z_TEXT; + } + } + return Z_BINARY; + } + var static_init_done = false; + function _tr_init(s) { + if (!static_init_done) { + tr_static_init(); + static_init_done = true; + } + s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc); + s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc); + s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc); + s.bi_buf = 0; + s.bi_valid = 0; + init_block(s); + } + function _tr_stored_block(s, buf, stored_len, last) { + send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); + copy_block(s, buf, stored_len, true); + } + function _tr_align(s) { + send_bits(s, STATIC_TREES << 1, 3); + send_code(s, END_BLOCK, static_ltree); + bi_flush(s); + } + function _tr_flush_block(s, buf, stored_len, last) { + var opt_lenb, static_lenb; + var max_blindex = 0; + if (s.level > 0) { + if (s.strm.data_type === Z_UNKNOWN) { + s.strm.data_type = detect_data_type(s); + } + build_tree(s, s.l_desc); + build_tree(s, s.d_desc); + max_blindex = build_bl_tree(s); + opt_lenb = s.opt_len + 3 + 7 >>> 3; + static_lenb = s.static_len + 3 + 7 >>> 3; + if (static_lenb <= opt_lenb) { + opt_lenb = static_lenb; + } + } else { + opt_lenb = static_lenb = stored_len + 5; + } + if (stored_len + 4 <= opt_lenb && buf !== -1) { + _tr_stored_block(s, buf, stored_len, last); + } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) { + send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3); + compress_block(s, static_ltree, static_dtree); + } else { + send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3); + send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1); + compress_block(s, s.dyn_ltree, s.dyn_dtree); + } + init_block(s); + if (last) { + bi_windup(s); + } + } + function _tr_tally(s, dist, lc) { + s.pending_buf[s.d_buf + s.last_lit * 2] = dist >>> 8 & 255; + s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 255; + s.pending_buf[s.l_buf + s.last_lit] = lc & 255; + s.last_lit++; + if (dist === 0) { + s.dyn_ltree[lc * 2]++; + } else { + s.matches++; + dist--; + s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]++; + s.dyn_dtree[d_code(dist) * 2]++; + } + return s.last_lit === s.lit_bufsize - 1; + } + exports2._tr_init = _tr_init; + exports2._tr_stored_block = _tr_stored_block; + exports2._tr_flush_block = _tr_flush_block; + exports2._tr_tally = _tr_tally; + exports2._tr_align = _tr_align; + } +}); + +// ../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/adler32.js +var require_adler32 = __commonJS({ + "../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/adler32.js"(exports2, module2) { + "use strict"; + function adler32(adler, buf, len, pos) { + var s1 = adler & 65535 | 0, s2 = adler >>> 16 & 65535 | 0, n = 0; + while (len !== 0) { + n = len > 2e3 ? 2e3 : len; + len -= n; + do { + s1 = s1 + buf[pos++] | 0; + s2 = s2 + s1 | 0; + } while (--n); + s1 %= 65521; + s2 %= 65521; + } + return s1 | s2 << 16 | 0; + } + module2.exports = adler32; + } +}); + +// ../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/crc32.js +var require_crc322 = __commonJS({ + "../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/crc32.js"(exports2, module2) { + "use strict"; + function makeTable() { + var c, table = []; + for (var n = 0; n < 256; n++) { + c = n; + for (var k = 0; k < 8; k++) { + c = c & 1 ? 3988292384 ^ c >>> 1 : c >>> 1; + } + table[n] = c; + } + return table; + } + var crcTable = makeTable(); + function crc32(crc, buf, len, pos) { + var t = crcTable, end = pos + len; + crc ^= -1; + for (var i = pos; i < end; i++) { + crc = crc >>> 8 ^ t[(crc ^ buf[i]) & 255]; + } + return crc ^ -1; + } + module2.exports = crc32; + } +}); + +// ../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/messages.js +var require_messages3 = __commonJS({ + "../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/messages.js"(exports2, module2) { + "use strict"; + module2.exports = { + 2: "need dictionary", + /* Z_NEED_DICT 2 */ + 1: "stream end", + /* Z_STREAM_END 1 */ + 0: "", + /* Z_OK 0 */ + "-1": "file error", + /* Z_ERRNO (-1) */ + "-2": "stream error", + /* Z_STREAM_ERROR (-2) */ + "-3": "data error", + /* Z_DATA_ERROR (-3) */ + "-4": "insufficient memory", + /* Z_MEM_ERROR (-4) */ + "-5": "buffer error", + /* Z_BUF_ERROR (-5) */ + "-6": "incompatible version" + /* Z_VERSION_ERROR (-6) */ + }; + } +}); + +// ../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/deflate.js +var require_deflate = __commonJS({ + "../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/deflate.js"(exports2) { + "use strict"; + var utils = require_common2(); + var trees = require_trees(); + var adler32 = require_adler32(); + var crc32 = require_crc322(); + var msg = require_messages3(); + var Z_NO_FLUSH = 0; + var Z_PARTIAL_FLUSH = 1; + var Z_FULL_FLUSH = 3; + var Z_FINISH = 4; + var Z_BLOCK = 5; + var Z_OK = 0; + var Z_STREAM_END = 1; + var Z_STREAM_ERROR = -2; + var Z_DATA_ERROR = -3; + var Z_BUF_ERROR = -5; + var Z_DEFAULT_COMPRESSION = -1; + var Z_FILTERED = 1; + var Z_HUFFMAN_ONLY = 2; + var Z_RLE = 3; + var Z_FIXED = 4; + var Z_DEFAULT_STRATEGY = 0; + var Z_UNKNOWN = 2; + var Z_DEFLATED = 8; + var MAX_MEM_LEVEL = 9; + var MAX_WBITS = 15; + var DEF_MEM_LEVEL = 8; + var LENGTH_CODES = 29; + var LITERALS = 256; + var L_CODES = LITERALS + 1 + LENGTH_CODES; + var D_CODES = 30; + var BL_CODES = 19; + var HEAP_SIZE = 2 * L_CODES + 1; + var MAX_BITS = 15; + var MIN_MATCH = 3; + var MAX_MATCH = 258; + var MIN_LOOKAHEAD = MAX_MATCH + MIN_MATCH + 1; + var PRESET_DICT = 32; + var INIT_STATE = 42; + var EXTRA_STATE = 69; + var NAME_STATE = 73; + var COMMENT_STATE = 91; + var HCRC_STATE = 103; + var BUSY_STATE = 113; + var FINISH_STATE = 666; + var BS_NEED_MORE = 1; + var BS_BLOCK_DONE = 2; + var BS_FINISH_STARTED = 3; + var BS_FINISH_DONE = 4; + var OS_CODE = 3; + function err(strm, errorCode) { + strm.msg = msg[errorCode]; + return errorCode; + } + function rank(f) { + return (f << 1) - (f > 4 ? 9 : 0); + } + function zero(buf) { + var len = buf.length; + while (--len >= 0) { + buf[len] = 0; + } + } + function flush_pending(strm) { + var s = strm.state; + var len = s.pending; + if (len > strm.avail_out) { + len = strm.avail_out; + } + if (len === 0) { + return; + } + utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out); + strm.next_out += len; + s.pending_out += len; + strm.total_out += len; + strm.avail_out -= len; + s.pending -= len; + if (s.pending === 0) { + s.pending_out = 0; + } + } + function flush_block_only(s, last) { + trees._tr_flush_block(s, s.block_start >= 0 ? s.block_start : -1, s.strstart - s.block_start, last); + s.block_start = s.strstart; + flush_pending(s.strm); + } + function put_byte(s, b) { + s.pending_buf[s.pending++] = b; + } + function putShortMSB(s, b) { + s.pending_buf[s.pending++] = b >>> 8 & 255; + s.pending_buf[s.pending++] = b & 255; + } + function read_buf(strm, buf, start, size) { + var len = strm.avail_in; + if (len > size) { + len = size; + } + if (len === 0) { + return 0; + } + strm.avail_in -= len; + utils.arraySet(buf, strm.input, strm.next_in, len, start); + if (strm.state.wrap === 1) { + strm.adler = adler32(strm.adler, buf, len, start); + } else if (strm.state.wrap === 2) { + strm.adler = crc32(strm.adler, buf, len, start); + } + strm.next_in += len; + strm.total_in += len; + return len; + } + function longest_match(s, cur_match) { + var chain_length = s.max_chain_length; + var scan = s.strstart; + var match; + var len; + var best_len = s.prev_length; + var nice_match = s.nice_match; + var limit = s.strstart > s.w_size - MIN_LOOKAHEAD ? s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0; + var _win = s.window; + var wmask = s.w_mask; + var prev = s.prev; + var strend = s.strstart + MAX_MATCH; + var scan_end1 = _win[scan + best_len - 1]; + var scan_end = _win[scan + best_len]; + if (s.prev_length >= s.good_match) { + chain_length >>= 2; + } + if (nice_match > s.lookahead) { + nice_match = s.lookahead; + } + do { + match = cur_match; + if (_win[match + best_len] !== scan_end || _win[match + best_len - 1] !== scan_end1 || _win[match] !== _win[scan] || _win[++match] !== _win[scan + 1]) { + continue; + } + scan += 2; + match++; + do { + } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && scan < strend); + len = MAX_MATCH - (strend - scan); + scan = strend - MAX_MATCH; + if (len > best_len) { + s.match_start = cur_match; + best_len = len; + if (len >= nice_match) { + break; + } + scan_end1 = _win[scan + best_len - 1]; + scan_end = _win[scan + best_len]; + } + } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0); + if (best_len <= s.lookahead) { + return best_len; + } + return s.lookahead; + } + function fill_window(s) { + var _w_size = s.w_size; + var p, n, m, more, str; + do { + more = s.window_size - s.lookahead - s.strstart; + if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) { + utils.arraySet(s.window, s.window, _w_size, _w_size, 0); + s.match_start -= _w_size; + s.strstart -= _w_size; + s.block_start -= _w_size; + n = s.hash_size; + p = n; + do { + m = s.head[--p]; + s.head[p] = m >= _w_size ? m - _w_size : 0; + } while (--n); + n = _w_size; + p = n; + do { + m = s.prev[--p]; + s.prev[p] = m >= _w_size ? m - _w_size : 0; + } while (--n); + more += _w_size; + } + if (s.strm.avail_in === 0) { + break; + } + n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more); + s.lookahead += n; + if (s.lookahead + s.insert >= MIN_MATCH) { + str = s.strstart - s.insert; + s.ins_h = s.window[str]; + s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str + 1]) & s.hash_mask; + while (s.insert) { + s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; + s.prev[str & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = str; + str++; + s.insert--; + if (s.lookahead + s.insert < MIN_MATCH) { + break; + } + } + } + } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0); + } + function deflate_stored(s, flush) { + var max_block_size = 65535; + if (max_block_size > s.pending_buf_size - 5) { + max_block_size = s.pending_buf_size - 5; + } + for (; ; ) { + if (s.lookahead <= 1) { + fill_window(s); + if (s.lookahead === 0 && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { + break; + } + } + s.strstart += s.lookahead; + s.lookahead = 0; + var max_start = s.block_start + max_block_size; + if (s.strstart === 0 || s.strstart >= max_start) { + s.lookahead = s.strstart - max_start; + s.strstart = max_start; + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + if (s.strstart - s.block_start >= s.w_size - MIN_LOOKAHEAD) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + } + s.insert = 0; + if (flush === Z_FINISH) { + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + return BS_FINISH_DONE; + } + if (s.strstart > s.block_start) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + return BS_NEED_MORE; + } + function deflate_fast(s, flush) { + var hash_head; + var bflush; + for (; ; ) { + if (s.lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { + break; + } + } + hash_head = 0; + if (s.lookahead >= MIN_MATCH) { + s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + } + if (hash_head !== 0 && s.strstart - hash_head <= s.w_size - MIN_LOOKAHEAD) { + s.match_length = longest_match(s, hash_head); + } + if (s.match_length >= MIN_MATCH) { + bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH); + s.lookahead -= s.match_length; + if (s.match_length <= s.max_lazy_match && s.lookahead >= MIN_MATCH) { + s.match_length--; + do { + s.strstart++; + s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + } while (--s.match_length !== 0); + s.strstart++; + } else { + s.strstart += s.match_length; + s.match_length = 0; + s.ins_h = s.window[s.strstart]; + s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + 1]) & s.hash_mask; + } + } else { + bflush = trees._tr_tally(s, 0, s.window[s.strstart]); + s.lookahead--; + s.strstart++; + } + if (bflush) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + } + s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1; + if (flush === Z_FINISH) { + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + return BS_FINISH_DONE; + } + if (s.last_lit) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + return BS_BLOCK_DONE; + } + function deflate_slow(s, flush) { + var hash_head; + var bflush; + var max_insert; + for (; ; ) { + if (s.lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { + break; + } + } + hash_head = 0; + if (s.lookahead >= MIN_MATCH) { + s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + } + s.prev_length = s.match_length; + s.prev_match = s.match_start; + s.match_length = MIN_MATCH - 1; + if (hash_head !== 0 && s.prev_length < s.max_lazy_match && s.strstart - hash_head <= s.w_size - MIN_LOOKAHEAD) { + s.match_length = longest_match(s, hash_head); + if (s.match_length <= 5 && (s.strategy === Z_FILTERED || s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096)) { + s.match_length = MIN_MATCH - 1; + } + } + if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) { + max_insert = s.strstart + s.lookahead - MIN_MATCH; + bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH); + s.lookahead -= s.prev_length - 1; + s.prev_length -= 2; + do { + if (++s.strstart <= max_insert) { + s.ins_h = (s.ins_h << s.hash_shift ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + } + } while (--s.prev_length !== 0); + s.match_available = 0; + s.match_length = MIN_MATCH - 1; + s.strstart++; + if (bflush) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + } else if (s.match_available) { + bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); + if (bflush) { + flush_block_only(s, false); + } + s.strstart++; + s.lookahead--; + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } else { + s.match_available = 1; + s.strstart++; + s.lookahead--; + } + } + if (s.match_available) { + bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); + s.match_available = 0; + } + s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1; + if (flush === Z_FINISH) { + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + return BS_FINISH_DONE; + } + if (s.last_lit) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + return BS_BLOCK_DONE; + } + function deflate_rle(s, flush) { + var bflush; + var prev; + var scan, strend; + var _win = s.window; + for (; ; ) { + if (s.lookahead <= MAX_MATCH) { + fill_window(s); + if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { + break; + } + } + s.match_length = 0; + if (s.lookahead >= MIN_MATCH && s.strstart > 0) { + scan = s.strstart - 1; + prev = _win[scan]; + if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) { + strend = s.strstart + MAX_MATCH; + do { + } while (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && scan < strend); + s.match_length = MAX_MATCH - (strend - scan); + if (s.match_length > s.lookahead) { + s.match_length = s.lookahead; + } + } + } + if (s.match_length >= MIN_MATCH) { + bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH); + s.lookahead -= s.match_length; + s.strstart += s.match_length; + s.match_length = 0; + } else { + bflush = trees._tr_tally(s, 0, s.window[s.strstart]); + s.lookahead--; + s.strstart++; + } + if (bflush) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + } + s.insert = 0; + if (flush === Z_FINISH) { + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + return BS_FINISH_DONE; + } + if (s.last_lit) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + return BS_BLOCK_DONE; + } + function deflate_huff(s, flush) { + var bflush; + for (; ; ) { + if (s.lookahead === 0) { + fill_window(s); + if (s.lookahead === 0) { + if (flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + break; + } + } + s.match_length = 0; + bflush = trees._tr_tally(s, 0, s.window[s.strstart]); + s.lookahead--; + s.strstart++; + if (bflush) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + } + s.insert = 0; + if (flush === Z_FINISH) { + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + return BS_FINISH_DONE; + } + if (s.last_lit) { + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } + return BS_BLOCK_DONE; + } + function Config(good_length, max_lazy, nice_length, max_chain, func) { + this.good_length = good_length; + this.max_lazy = max_lazy; + this.nice_length = nice_length; + this.max_chain = max_chain; + this.func = func; + } + var configuration_table; + configuration_table = [ + /* good lazy nice chain */ + new Config(0, 0, 0, 0, deflate_stored), + /* 0 store only */ + new Config(4, 4, 8, 4, deflate_fast), + /* 1 max speed, no lazy matches */ + new Config(4, 5, 16, 8, deflate_fast), + /* 2 */ + new Config(4, 6, 32, 32, deflate_fast), + /* 3 */ + new Config(4, 4, 16, 16, deflate_slow), + /* 4 lazy matches */ + new Config(8, 16, 32, 32, deflate_slow), + /* 5 */ + new Config(8, 16, 128, 128, deflate_slow), + /* 6 */ + new Config(8, 32, 128, 256, deflate_slow), + /* 7 */ + new Config(32, 128, 258, 1024, deflate_slow), + /* 8 */ + new Config(32, 258, 258, 4096, deflate_slow) + /* 9 max compression */ + ]; + function lm_init(s) { + s.window_size = 2 * s.w_size; + zero(s.head); + s.max_lazy_match = configuration_table[s.level].max_lazy; + s.good_match = configuration_table[s.level].good_length; + s.nice_match = configuration_table[s.level].nice_length; + s.max_chain_length = configuration_table[s.level].max_chain; + s.strstart = 0; + s.block_start = 0; + s.lookahead = 0; + s.insert = 0; + s.match_length = s.prev_length = MIN_MATCH - 1; + s.match_available = 0; + s.ins_h = 0; + } + function DeflateState() { + this.strm = null; + this.status = 0; + this.pending_buf = null; + this.pending_buf_size = 0; + this.pending_out = 0; + this.pending = 0; + this.wrap = 0; + this.gzhead = null; + this.gzindex = 0; + this.method = Z_DEFLATED; + this.last_flush = -1; + this.w_size = 0; + this.w_bits = 0; + this.w_mask = 0; + this.window = null; + this.window_size = 0; + this.prev = null; + this.head = null; + this.ins_h = 0; + this.hash_size = 0; + this.hash_bits = 0; + this.hash_mask = 0; + this.hash_shift = 0; + this.block_start = 0; + this.match_length = 0; + this.prev_match = 0; + this.match_available = 0; + this.strstart = 0; + this.match_start = 0; + this.lookahead = 0; + this.prev_length = 0; + this.max_chain_length = 0; + this.max_lazy_match = 0; + this.level = 0; + this.strategy = 0; + this.good_match = 0; + this.nice_match = 0; + this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2); + this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2); + this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2); + zero(this.dyn_ltree); + zero(this.dyn_dtree); + zero(this.bl_tree); + this.l_desc = null; + this.d_desc = null; + this.bl_desc = null; + this.bl_count = new utils.Buf16(MAX_BITS + 1); + this.heap = new utils.Buf16(2 * L_CODES + 1); + zero(this.heap); + this.heap_len = 0; + this.heap_max = 0; + this.depth = new utils.Buf16(2 * L_CODES + 1); + zero(this.depth); + this.l_buf = 0; + this.lit_bufsize = 0; + this.last_lit = 0; + this.d_buf = 0; + this.opt_len = 0; + this.static_len = 0; + this.matches = 0; + this.insert = 0; + this.bi_buf = 0; + this.bi_valid = 0; + } + function deflateResetKeep(strm) { + var s; + if (!strm || !strm.state) { + return err(strm, Z_STREAM_ERROR); + } + strm.total_in = strm.total_out = 0; + strm.data_type = Z_UNKNOWN; + s = strm.state; + s.pending = 0; + s.pending_out = 0; + if (s.wrap < 0) { + s.wrap = -s.wrap; + } + s.status = s.wrap ? INIT_STATE : BUSY_STATE; + strm.adler = s.wrap === 2 ? 0 : 1; + s.last_flush = Z_NO_FLUSH; + trees._tr_init(s); + return Z_OK; + } + function deflateReset(strm) { + var ret2 = deflateResetKeep(strm); + if (ret2 === Z_OK) { + lm_init(strm.state); + } + return ret2; + } + function deflateSetHeader(strm, head) { + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + if (strm.state.wrap !== 2) { + return Z_STREAM_ERROR; + } + strm.state.gzhead = head; + return Z_OK; + } + function deflateInit2(strm, level, method, windowBits, memLevel, strategy) { + if (!strm) { + return Z_STREAM_ERROR; + } + var wrap = 1; + if (level === Z_DEFAULT_COMPRESSION) { + level = 6; + } + if (windowBits < 0) { + wrap = 0; + windowBits = -windowBits; + } else if (windowBits > 15) { + wrap = 2; + windowBits -= 16; + } + if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED) { + return err(strm, Z_STREAM_ERROR); + } + if (windowBits === 8) { + windowBits = 9; + } + var s = new DeflateState(); + strm.state = s; + s.strm = strm; + s.wrap = wrap; + s.gzhead = null; + s.w_bits = windowBits; + s.w_size = 1 << s.w_bits; + s.w_mask = s.w_size - 1; + s.hash_bits = memLevel + 7; + s.hash_size = 1 << s.hash_bits; + s.hash_mask = s.hash_size - 1; + s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH); + s.window = new utils.Buf8(s.w_size * 2); + s.head = new utils.Buf16(s.hash_size); + s.prev = new utils.Buf16(s.w_size); + s.lit_bufsize = 1 << memLevel + 6; + s.pending_buf_size = s.lit_bufsize * 4; + s.pending_buf = new utils.Buf8(s.pending_buf_size); + s.d_buf = 1 * s.lit_bufsize; + s.l_buf = (1 + 2) * s.lit_bufsize; + s.level = level; + s.strategy = strategy; + s.method = method; + return deflateReset(strm); + } + function deflateInit(strm, level) { + return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY); + } + function deflate(strm, flush) { + var old_flush, s; + var beg, val; + if (!strm || !strm.state || flush > Z_BLOCK || flush < 0) { + return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR; + } + s = strm.state; + if (!strm.output || !strm.input && strm.avail_in !== 0 || s.status === FINISH_STATE && flush !== Z_FINISH) { + return err(strm, strm.avail_out === 0 ? Z_BUF_ERROR : Z_STREAM_ERROR); + } + s.strm = strm; + old_flush = s.last_flush; + s.last_flush = flush; + if (s.status === INIT_STATE) { + if (s.wrap === 2) { + strm.adler = 0; + put_byte(s, 31); + put_byte(s, 139); + put_byte(s, 8); + if (!s.gzhead) { + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, s.level === 9 ? 2 : s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? 4 : 0); + put_byte(s, OS_CODE); + s.status = BUSY_STATE; + } else { + put_byte( + s, + (s.gzhead.text ? 1 : 0) + (s.gzhead.hcrc ? 2 : 0) + (!s.gzhead.extra ? 0 : 4) + (!s.gzhead.name ? 0 : 8) + (!s.gzhead.comment ? 0 : 16) + ); + put_byte(s, s.gzhead.time & 255); + put_byte(s, s.gzhead.time >> 8 & 255); + put_byte(s, s.gzhead.time >> 16 & 255); + put_byte(s, s.gzhead.time >> 24 & 255); + put_byte(s, s.level === 9 ? 2 : s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? 4 : 0); + put_byte(s, s.gzhead.os & 255); + if (s.gzhead.extra && s.gzhead.extra.length) { + put_byte(s, s.gzhead.extra.length & 255); + put_byte(s, s.gzhead.extra.length >> 8 & 255); + } + if (s.gzhead.hcrc) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0); + } + s.gzindex = 0; + s.status = EXTRA_STATE; + } + } else { + var header = Z_DEFLATED + (s.w_bits - 8 << 4) << 8; + var level_flags = -1; + if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) { + level_flags = 0; + } else if (s.level < 6) { + level_flags = 1; + } else if (s.level === 6) { + level_flags = 2; + } else { + level_flags = 3; + } + header |= level_flags << 6; + if (s.strstart !== 0) { + header |= PRESET_DICT; + } + header += 31 - header % 31; + s.status = BUSY_STATE; + putShortMSB(s, header); + if (s.strstart !== 0) { + putShortMSB(s, strm.adler >>> 16); + putShortMSB(s, strm.adler & 65535); + } + strm.adler = 1; + } + } + if (s.status === EXTRA_STATE) { + if (s.gzhead.extra) { + beg = s.pending; + while (s.gzindex < (s.gzhead.extra.length & 65535)) { + if (s.pending === s.pending_buf_size) { + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + flush_pending(strm); + beg = s.pending; + if (s.pending === s.pending_buf_size) { + break; + } + } + put_byte(s, s.gzhead.extra[s.gzindex] & 255); + s.gzindex++; + } + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + if (s.gzindex === s.gzhead.extra.length) { + s.gzindex = 0; + s.status = NAME_STATE; + } + } else { + s.status = NAME_STATE; + } + } + if (s.status === NAME_STATE) { + if (s.gzhead.name) { + beg = s.pending; + do { + if (s.pending === s.pending_buf_size) { + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + flush_pending(strm); + beg = s.pending; + if (s.pending === s.pending_buf_size) { + val = 1; + break; + } + } + if (s.gzindex < s.gzhead.name.length) { + val = s.gzhead.name.charCodeAt(s.gzindex++) & 255; + } else { + val = 0; + } + put_byte(s, val); + } while (val !== 0); + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + if (val === 0) { + s.gzindex = 0; + s.status = COMMENT_STATE; + } + } else { + s.status = COMMENT_STATE; + } + } + if (s.status === COMMENT_STATE) { + if (s.gzhead.comment) { + beg = s.pending; + do { + if (s.pending === s.pending_buf_size) { + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + flush_pending(strm); + beg = s.pending; + if (s.pending === s.pending_buf_size) { + val = 1; + break; + } + } + if (s.gzindex < s.gzhead.comment.length) { + val = s.gzhead.comment.charCodeAt(s.gzindex++) & 255; + } else { + val = 0; + } + put_byte(s, val); + } while (val !== 0); + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + if (val === 0) { + s.status = HCRC_STATE; + } + } else { + s.status = HCRC_STATE; + } + } + if (s.status === HCRC_STATE) { + if (s.gzhead.hcrc) { + if (s.pending + 2 > s.pending_buf_size) { + flush_pending(strm); + } + if (s.pending + 2 <= s.pending_buf_size) { + put_byte(s, strm.adler & 255); + put_byte(s, strm.adler >> 8 & 255); + strm.adler = 0; + s.status = BUSY_STATE; + } + } else { + s.status = BUSY_STATE; + } + } + if (s.pending !== 0) { + flush_pending(strm); + if (strm.avail_out === 0) { + s.last_flush = -1; + return Z_OK; + } + } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && flush !== Z_FINISH) { + return err(strm, Z_BUF_ERROR); + } + if (s.status === FINISH_STATE && strm.avail_in !== 0) { + return err(strm, Z_BUF_ERROR); + } + if (strm.avail_in !== 0 || s.lookahead !== 0 || flush !== Z_NO_FLUSH && s.status !== FINISH_STATE) { + var bstate = s.strategy === Z_HUFFMAN_ONLY ? deflate_huff(s, flush) : s.strategy === Z_RLE ? deflate_rle(s, flush) : configuration_table[s.level].func(s, flush); + if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) { + s.status = FINISH_STATE; + } + if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) { + if (strm.avail_out === 0) { + s.last_flush = -1; + } + return Z_OK; + } + if (bstate === BS_BLOCK_DONE) { + if (flush === Z_PARTIAL_FLUSH) { + trees._tr_align(s); + } else if (flush !== Z_BLOCK) { + trees._tr_stored_block(s, 0, 0, false); + if (flush === Z_FULL_FLUSH) { + zero(s.head); + if (s.lookahead === 0) { + s.strstart = 0; + s.block_start = 0; + s.insert = 0; + } + } + } + flush_pending(strm); + if (strm.avail_out === 0) { + s.last_flush = -1; + return Z_OK; + } + } + } + if (flush !== Z_FINISH) { + return Z_OK; + } + if (s.wrap <= 0) { + return Z_STREAM_END; + } + if (s.wrap === 2) { + put_byte(s, strm.adler & 255); + put_byte(s, strm.adler >> 8 & 255); + put_byte(s, strm.adler >> 16 & 255); + put_byte(s, strm.adler >> 24 & 255); + put_byte(s, strm.total_in & 255); + put_byte(s, strm.total_in >> 8 & 255); + put_byte(s, strm.total_in >> 16 & 255); + put_byte(s, strm.total_in >> 24 & 255); + } else { + putShortMSB(s, strm.adler >>> 16); + putShortMSB(s, strm.adler & 65535); + } + flush_pending(strm); + if (s.wrap > 0) { + s.wrap = -s.wrap; + } + return s.pending !== 0 ? Z_OK : Z_STREAM_END; + } + function deflateEnd(strm) { + var status; + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + status = strm.state.status; + if (status !== INIT_STATE && status !== EXTRA_STATE && status !== NAME_STATE && status !== COMMENT_STATE && status !== HCRC_STATE && status !== BUSY_STATE && status !== FINISH_STATE) { + return err(strm, Z_STREAM_ERROR); + } + strm.state = null; + return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK; + } + function deflateSetDictionary(strm, dictionary) { + var dictLength = dictionary.length; + var s; + var str, n; + var wrap; + var avail; + var next; + var input; + var tmpDict; + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + s = strm.state; + wrap = s.wrap; + if (wrap === 2 || wrap === 1 && s.status !== INIT_STATE || s.lookahead) { + return Z_STREAM_ERROR; + } + if (wrap === 1) { + strm.adler = adler32(strm.adler, dictionary, dictLength, 0); + } + s.wrap = 0; + if (dictLength >= s.w_size) { + if (wrap === 0) { + zero(s.head); + s.strstart = 0; + s.block_start = 0; + s.insert = 0; + } + tmpDict = new utils.Buf8(s.w_size); + utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0); + dictionary = tmpDict; + dictLength = s.w_size; + } + avail = strm.avail_in; + next = strm.next_in; + input = strm.input; + strm.avail_in = dictLength; + strm.next_in = 0; + strm.input = dictionary; + fill_window(s); + while (s.lookahead >= MIN_MATCH) { + str = s.strstart; + n = s.lookahead - (MIN_MATCH - 1); + do { + s.ins_h = (s.ins_h << s.hash_shift ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; + s.prev[str & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = str; + str++; + } while (--n); + s.strstart = str; + s.lookahead = MIN_MATCH - 1; + fill_window(s); + } + s.strstart += s.lookahead; + s.block_start = s.strstart; + s.insert = s.lookahead; + s.lookahead = 0; + s.match_length = s.prev_length = MIN_MATCH - 1; + s.match_available = 0; + strm.next_in = next; + strm.input = input; + strm.avail_in = avail; + s.wrap = wrap; + return Z_OK; + } + exports2.deflateInit = deflateInit; + exports2.deflateInit2 = deflateInit2; + exports2.deflateReset = deflateReset; + exports2.deflateResetKeep = deflateResetKeep; + exports2.deflateSetHeader = deflateSetHeader; + exports2.deflate = deflate; + exports2.deflateEnd = deflateEnd; + exports2.deflateSetDictionary = deflateSetDictionary; + exports2.deflateInfo = "pako deflate (from Nodeca project)"; + } +}); + +// ../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/utils/strings.js +var require_strings = __commonJS({ + "../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/utils/strings.js"(exports2) { + "use strict"; + var utils = require_common2(); + var STR_APPLY_OK = true; + var STR_APPLY_UIA_OK = true; + try { + String.fromCharCode.apply(null, [0]); + } catch (__) { + STR_APPLY_OK = false; + } + try { + String.fromCharCode.apply(null, new Uint8Array(1)); + } catch (__) { + STR_APPLY_UIA_OK = false; + } + var _utf8len = new utils.Buf8(256); + for (q = 0; q < 256; q++) { + _utf8len[q] = q >= 252 ? 6 : q >= 248 ? 5 : q >= 240 ? 4 : q >= 224 ? 3 : q >= 192 ? 2 : 1; + } + var q; + _utf8len[254] = _utf8len[254] = 1; + exports2.string2buf = function(str) { + var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0; + for (m_pos = 0; m_pos < str_len; m_pos++) { + c = str.charCodeAt(m_pos); + if ((c & 64512) === 55296 && m_pos + 1 < str_len) { + c2 = str.charCodeAt(m_pos + 1); + if ((c2 & 64512) === 56320) { + c = 65536 + (c - 55296 << 10) + (c2 - 56320); + m_pos++; + } + } + buf_len += c < 128 ? 1 : c < 2048 ? 2 : c < 65536 ? 3 : 4; + } + buf = new utils.Buf8(buf_len); + for (i = 0, m_pos = 0; i < buf_len; m_pos++) { + c = str.charCodeAt(m_pos); + if ((c & 64512) === 55296 && m_pos + 1 < str_len) { + c2 = str.charCodeAt(m_pos + 1); + if ((c2 & 64512) === 56320) { + c = 65536 + (c - 55296 << 10) + (c2 - 56320); + m_pos++; + } + } + if (c < 128) { + buf[i++] = c; + } else if (c < 2048) { + buf[i++] = 192 | c >>> 6; + buf[i++] = 128 | c & 63; + } else if (c < 65536) { + buf[i++] = 224 | c >>> 12; + buf[i++] = 128 | c >>> 6 & 63; + buf[i++] = 128 | c & 63; + } else { + buf[i++] = 240 | c >>> 18; + buf[i++] = 128 | c >>> 12 & 63; + buf[i++] = 128 | c >>> 6 & 63; + buf[i++] = 128 | c & 63; + } + } + return buf; + }; + function buf2binstring(buf, len) { + if (len < 65534) { + if (buf.subarray && STR_APPLY_UIA_OK || !buf.subarray && STR_APPLY_OK) { + return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len)); + } + } + var result = ""; + for (var i = 0; i < len; i++) { + result += String.fromCharCode(buf[i]); + } + return result; + } + exports2.buf2binstring = function(buf) { + return buf2binstring(buf, buf.length); + }; + exports2.binstring2buf = function(str) { + var buf = new utils.Buf8(str.length); + for (var i = 0, len = buf.length; i < len; i++) { + buf[i] = str.charCodeAt(i); + } + return buf; + }; + exports2.buf2string = function(buf, max) { + var i, out, c, c_len; + var len = max || buf.length; + var utf16buf = new Array(len * 2); + for (out = 0, i = 0; i < len; ) { + c = buf[i++]; + if (c < 128) { + utf16buf[out++] = c; + continue; + } + c_len = _utf8len[c]; + if (c_len > 4) { + utf16buf[out++] = 65533; + i += c_len - 1; + continue; + } + c &= c_len === 2 ? 31 : c_len === 3 ? 15 : 7; + while (c_len > 1 && i < len) { + c = c << 6 | buf[i++] & 63; + c_len--; + } + if (c_len > 1) { + utf16buf[out++] = 65533; + continue; + } + if (c < 65536) { + utf16buf[out++] = c; + } else { + c -= 65536; + utf16buf[out++] = 55296 | c >> 10 & 1023; + utf16buf[out++] = 56320 | c & 1023; + } + } + return buf2binstring(utf16buf, out); + }; + exports2.utf8border = function(buf, max) { + var pos; + max = max || buf.length; + if (max > buf.length) { + max = buf.length; + } + pos = max - 1; + while (pos >= 0 && (buf[pos] & 192) === 128) { + pos--; + } + if (pos < 0) { + return max; + } + if (pos === 0) { + return max; + } + return pos + _utf8len[buf[pos]] > max ? pos : max; + }; + } +}); + +// ../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/zstream.js +var require_zstream = __commonJS({ + "../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/zstream.js"(exports2, module2) { + "use strict"; + function ZStream() { + this.input = null; + this.next_in = 0; + this.avail_in = 0; + this.total_in = 0; + this.output = null; + this.next_out = 0; + this.avail_out = 0; + this.total_out = 0; + this.msg = ""; + this.state = null; + this.data_type = 2; + this.adler = 0; + } + module2.exports = ZStream; + } +}); + +// ../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/deflate.js +var require_deflate2 = __commonJS({ + "../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/deflate.js"(exports2) { + "use strict"; + var zlib_deflate = require_deflate(); + var utils = require_common2(); + var strings = require_strings(); + var msg = require_messages3(); + var ZStream = require_zstream(); + var toString2 = Object.prototype.toString; + var Z_NO_FLUSH = 0; + var Z_FINISH = 4; + var Z_OK = 0; + var Z_STREAM_END = 1; + var Z_SYNC_FLUSH = 2; + var Z_DEFAULT_COMPRESSION = -1; + var Z_DEFAULT_STRATEGY = 0; + var Z_DEFLATED = 8; + function Deflate(options) { + if (!(this instanceof Deflate)) return new Deflate(options); + this.options = utils.assign({ + level: Z_DEFAULT_COMPRESSION, + method: Z_DEFLATED, + chunkSize: 16384, + windowBits: 15, + memLevel: 8, + strategy: Z_DEFAULT_STRATEGY, + to: "" + }, options || {}); + var opt = this.options; + if (opt.raw && opt.windowBits > 0) { + opt.windowBits = -opt.windowBits; + } else if (opt.gzip && opt.windowBits > 0 && opt.windowBits < 16) { + opt.windowBits += 16; + } + this.err = 0; + this.msg = ""; + this.ended = false; + this.chunks = []; + this.strm = new ZStream(); + this.strm.avail_out = 0; + var status = zlib_deflate.deflateInit2( + this.strm, + opt.level, + opt.method, + opt.windowBits, + opt.memLevel, + opt.strategy + ); + if (status !== Z_OK) { + throw new Error(msg[status]); + } + if (opt.header) { + zlib_deflate.deflateSetHeader(this.strm, opt.header); + } + if (opt.dictionary) { + var dict; + if (typeof opt.dictionary === "string") { + dict = strings.string2buf(opt.dictionary); + } else if (toString2.call(opt.dictionary) === "[object ArrayBuffer]") { + dict = new Uint8Array(opt.dictionary); + } else { + dict = opt.dictionary; + } + status = zlib_deflate.deflateSetDictionary(this.strm, dict); + if (status !== Z_OK) { + throw new Error(msg[status]); + } + this._dict_set = true; + } + } + Deflate.prototype.push = function(data, mode) { + var strm = this.strm; + var chunkSize = this.options.chunkSize; + var status, _mode; + if (this.ended) { + return false; + } + _mode = mode === ~~mode ? mode : mode === true ? Z_FINISH : Z_NO_FLUSH; + if (typeof data === "string") { + strm.input = strings.string2buf(data); + } else if (toString2.call(data) === "[object ArrayBuffer]") { + strm.input = new Uint8Array(data); + } else { + strm.input = data; + } + strm.next_in = 0; + strm.avail_in = strm.input.length; + do { + if (strm.avail_out === 0) { + strm.output = new utils.Buf8(chunkSize); + strm.next_out = 0; + strm.avail_out = chunkSize; + } + status = zlib_deflate.deflate(strm, _mode); + if (status !== Z_STREAM_END && status !== Z_OK) { + this.onEnd(status); + this.ended = true; + return false; + } + if (strm.avail_out === 0 || strm.avail_in === 0 && (_mode === Z_FINISH || _mode === Z_SYNC_FLUSH)) { + if (this.options.to === "string") { + this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out))); + } else { + this.onData(utils.shrinkBuf(strm.output, strm.next_out)); + } + } + } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END); + if (_mode === Z_FINISH) { + status = zlib_deflate.deflateEnd(this.strm); + this.onEnd(status); + this.ended = true; + return status === Z_OK; + } + if (_mode === Z_SYNC_FLUSH) { + this.onEnd(Z_OK); + strm.avail_out = 0; + return true; + } + return true; + }; + Deflate.prototype.onData = function(chunk) { + this.chunks.push(chunk); + }; + Deflate.prototype.onEnd = function(status) { + if (status === Z_OK) { + if (this.options.to === "string") { + this.result = this.chunks.join(""); + } else { + this.result = utils.flattenChunks(this.chunks); + } + } + this.chunks = []; + this.err = status; + this.msg = this.strm.msg; + }; + function deflate(input, options) { + var deflator = new Deflate(options); + deflator.push(input, true); + if (deflator.err) { + throw deflator.msg || msg[deflator.err]; + } + return deflator.result; + } + function deflateRaw(input, options) { + options = options || {}; + options.raw = true; + return deflate(input, options); + } + function gzip(input, options) { + options = options || {}; + options.gzip = true; + return deflate(input, options); + } + exports2.Deflate = Deflate; + exports2.deflate = deflate; + exports2.deflateRaw = deflateRaw; + exports2.gzip = gzip; + } +}); + +// ../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/inffast.js +var require_inffast = __commonJS({ + "../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/inffast.js"(exports2, module2) { + "use strict"; + var BAD = 30; + var TYPE = 12; + module2.exports = function inflate_fast(strm, start) { + var state; + var _in; + var last; + var _out; + var beg; + var end; + var dmax; + var wsize; + var whave; + var wnext; + var s_window; + var hold; + var bits; + var lcode; + var dcode; + var lmask; + var dmask; + var here; + var op; + var len; + var dist; + var from; + var from_source; + var input, output; + state = strm.state; + _in = strm.next_in; + input = strm.input; + last = _in + (strm.avail_in - 5); + _out = strm.next_out; + output = strm.output; + beg = _out - (start - strm.avail_out); + end = _out + (strm.avail_out - 257); + dmax = state.dmax; + wsize = state.wsize; + whave = state.whave; + wnext = state.wnext; + s_window = state.window; + hold = state.hold; + bits = state.bits; + lcode = state.lencode; + dcode = state.distcode; + lmask = (1 << state.lenbits) - 1; + dmask = (1 << state.distbits) - 1; + top: + do { + if (bits < 15) { + hold += input[_in++] << bits; + bits += 8; + hold += input[_in++] << bits; + bits += 8; + } + here = lcode[hold & lmask]; + dolen: + for (; ; ) { + op = here >>> 24; + hold >>>= op; + bits -= op; + op = here >>> 16 & 255; + if (op === 0) { + output[_out++] = here & 65535; + } else if (op & 16) { + len = here & 65535; + op &= 15; + if (op) { + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + } + len += hold & (1 << op) - 1; + hold >>>= op; + bits -= op; + } + if (bits < 15) { + hold += input[_in++] << bits; + bits += 8; + hold += input[_in++] << bits; + bits += 8; + } + here = dcode[hold & dmask]; + dodist: + for (; ; ) { + op = here >>> 24; + hold >>>= op; + bits -= op; + op = here >>> 16 & 255; + if (op & 16) { + dist = here & 65535; + op &= 15; + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + } + } + dist += hold & (1 << op) - 1; + if (dist > dmax) { + strm.msg = "invalid distance too far back"; + state.mode = BAD; + break top; + } + hold >>>= op; + bits -= op; + op = _out - beg; + if (dist > op) { + op = dist - op; + if (op > whave) { + if (state.sane) { + strm.msg = "invalid distance too far back"; + state.mode = BAD; + break top; + } + } + from = 0; + from_source = s_window; + if (wnext === 0) { + from += wsize - op; + if (op < len) { + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; + from_source = output; + } + } else if (wnext < op) { + from += wsize + wnext - op; + op -= wnext; + if (op < len) { + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = 0; + if (wnext < len) { + op = wnext; + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; + from_source = output; + } + } + } else { + from += wnext - op; + if (op < len) { + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; + from_source = output; + } + } + while (len > 2) { + output[_out++] = from_source[from++]; + output[_out++] = from_source[from++]; + output[_out++] = from_source[from++]; + len -= 3; + } + if (len) { + output[_out++] = from_source[from++]; + if (len > 1) { + output[_out++] = from_source[from++]; + } + } + } else { + from = _out - dist; + do { + output[_out++] = output[from++]; + output[_out++] = output[from++]; + output[_out++] = output[from++]; + len -= 3; + } while (len > 2); + if (len) { + output[_out++] = output[from++]; + if (len > 1) { + output[_out++] = output[from++]; + } + } + } + } else if ((op & 64) === 0) { + here = dcode[(here & 65535) + (hold & (1 << op) - 1)]; + continue dodist; + } else { + strm.msg = "invalid distance code"; + state.mode = BAD; + break top; + } + break; + } + } else if ((op & 64) === 0) { + here = lcode[(here & 65535) + (hold & (1 << op) - 1)]; + continue dolen; + } else if (op & 32) { + state.mode = TYPE; + break top; + } else { + strm.msg = "invalid literal/length code"; + state.mode = BAD; + break top; + } + break; + } + } while (_in < last && _out < end); + len = bits >> 3; + _in -= len; + bits -= len << 3; + hold &= (1 << bits) - 1; + strm.next_in = _in; + strm.next_out = _out; + strm.avail_in = _in < last ? 5 + (last - _in) : 5 - (_in - last); + strm.avail_out = _out < end ? 257 + (end - _out) : 257 - (_out - end); + state.hold = hold; + state.bits = bits; + return; + }; + } +}); + +// ../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/inftrees.js +var require_inftrees = __commonJS({ + "../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/inftrees.js"(exports2, module2) { + "use strict"; + var utils = require_common2(); + var MAXBITS = 15; + var ENOUGH_LENS = 852; + var ENOUGH_DISTS = 592; + var CODES = 0; + var LENS = 1; + var DISTS = 2; + var lbase = [ + /* Length codes 257..285 base */ + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 13, + 15, + 17, + 19, + 23, + 27, + 31, + 35, + 43, + 51, + 59, + 67, + 83, + 99, + 115, + 131, + 163, + 195, + 227, + 258, + 0, + 0 + ]; + var lext = [ + /* Length codes 257..285 extra */ + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 16, + 17, + 17, + 17, + 17, + 18, + 18, + 18, + 18, + 19, + 19, + 19, + 19, + 20, + 20, + 20, + 20, + 21, + 21, + 21, + 21, + 16, + 72, + 78 + ]; + var dbase = [ + /* Distance codes 0..29 base */ + 1, + 2, + 3, + 4, + 5, + 7, + 9, + 13, + 17, + 25, + 33, + 49, + 65, + 97, + 129, + 193, + 257, + 385, + 513, + 769, + 1025, + 1537, + 2049, + 3073, + 4097, + 6145, + 8193, + 12289, + 16385, + 24577, + 0, + 0 + ]; + var dext = [ + /* Distance codes 0..29 extra */ + 16, + 16, + 16, + 16, + 17, + 17, + 18, + 18, + 19, + 19, + 20, + 20, + 21, + 21, + 22, + 22, + 23, + 23, + 24, + 24, + 25, + 25, + 26, + 26, + 27, + 27, + 28, + 28, + 29, + 29, + 64, + 64 + ]; + module2.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) { + var bits = opts.bits; + var len = 0; + var sym = 0; + var min = 0, max = 0; + var root = 0; + var curr = 0; + var drop = 0; + var left = 0; + var used = 0; + var huff = 0; + var incr; + var fill; + var low; + var mask; + var next; + var base = null; + var base_index = 0; + var end; + var count = new utils.Buf16(MAXBITS + 1); + var offs = new utils.Buf16(MAXBITS + 1); + var extra = null; + var extra_index = 0; + var here_bits, here_op, here_val; + for (len = 0; len <= MAXBITS; len++) { + count[len] = 0; + } + for (sym = 0; sym < codes; sym++) { + count[lens[lens_index + sym]]++; + } + root = bits; + for (max = MAXBITS; max >= 1; max--) { + if (count[max] !== 0) { + break; + } + } + if (root > max) { + root = max; + } + if (max === 0) { + table[table_index++] = 1 << 24 | 64 << 16 | 0; + table[table_index++] = 1 << 24 | 64 << 16 | 0; + opts.bits = 1; + return 0; + } + for (min = 1; min < max; min++) { + if (count[min] !== 0) { + break; + } + } + if (root < min) { + root = min; + } + left = 1; + for (len = 1; len <= MAXBITS; len++) { + left <<= 1; + left -= count[len]; + if (left < 0) { + return -1; + } + } + if (left > 0 && (type === CODES || max !== 1)) { + return -1; + } + offs[1] = 0; + for (len = 1; len < MAXBITS; len++) { + offs[len + 1] = offs[len] + count[len]; + } + for (sym = 0; sym < codes; sym++) { + if (lens[lens_index + sym] !== 0) { + work[offs[lens[lens_index + sym]]++] = sym; + } + } + if (type === CODES) { + base = extra = work; + end = 19; + } else if (type === LENS) { + base = lbase; + base_index -= 257; + extra = lext; + extra_index -= 257; + end = 256; + } else { + base = dbase; + extra = dext; + end = -1; + } + huff = 0; + sym = 0; + len = min; + next = table_index; + curr = root; + drop = 0; + low = -1; + used = 1 << root; + mask = used - 1; + if (type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS) { + return 1; + } + for (; ; ) { + here_bits = len - drop; + if (work[sym] < end) { + here_op = 0; + here_val = work[sym]; + } else if (work[sym] > end) { + here_op = extra[extra_index + work[sym]]; + here_val = base[base_index + work[sym]]; + } else { + here_op = 32 + 64; + here_val = 0; + } + incr = 1 << len - drop; + fill = 1 << curr; + min = fill; + do { + fill -= incr; + table[next + (huff >> drop) + fill] = here_bits << 24 | here_op << 16 | here_val | 0; + } while (fill !== 0); + incr = 1 << len - 1; + while (huff & incr) { + incr >>= 1; + } + if (incr !== 0) { + huff &= incr - 1; + huff += incr; + } else { + huff = 0; + } + sym++; + if (--count[len] === 0) { + if (len === max) { + break; + } + len = lens[lens_index + work[sym]]; + } + if (len > root && (huff & mask) !== low) { + if (drop === 0) { + drop = root; + } + next += min; + curr = len - drop; + left = 1 << curr; + while (curr + drop < max) { + left -= count[curr + drop]; + if (left <= 0) { + break; + } + curr++; + left <<= 1; + } + used += 1 << curr; + if (type === LENS && used > ENOUGH_LENS || type === DISTS && used > ENOUGH_DISTS) { + return 1; + } + low = huff & mask; + table[low] = root << 24 | curr << 16 | next - table_index | 0; + } + } + if (huff !== 0) { + table[next + huff] = len - drop << 24 | 64 << 16 | 0; + } + opts.bits = root; + return 0; + }; + } +}); + +// ../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/inflate.js +var require_inflate = __commonJS({ + "../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/inflate.js"(exports2) { + "use strict"; + var utils = require_common2(); + var adler32 = require_adler32(); + var crc32 = require_crc322(); + var inflate_fast = require_inffast(); + var inflate_table = require_inftrees(); + var CODES = 0; + var LENS = 1; + var DISTS = 2; + var Z_FINISH = 4; + var Z_BLOCK = 5; + var Z_TREES = 6; + var Z_OK = 0; + var Z_STREAM_END = 1; + var Z_NEED_DICT = 2; + var Z_STREAM_ERROR = -2; + var Z_DATA_ERROR = -3; + var Z_MEM_ERROR = -4; + var Z_BUF_ERROR = -5; + var Z_DEFLATED = 8; + var HEAD = 1; + var FLAGS = 2; + var TIME = 3; + var OS = 4; + var EXLEN = 5; + var EXTRA = 6; + var NAME = 7; + var COMMENT = 8; + var HCRC = 9; + var DICTID = 10; + var DICT = 11; + var TYPE = 12; + var TYPEDO = 13; + var STORED = 14; + var COPY_ = 15; + var COPY = 16; + var TABLE = 17; + var LENLENS = 18; + var CODELENS = 19; + var LEN_ = 20; + var LEN = 21; + var LENEXT = 22; + var DIST = 23; + var DISTEXT = 24; + var MATCH = 25; + var LIT = 26; + var CHECK = 27; + var LENGTH = 28; + var DONE = 29; + var BAD = 30; + var MEM = 31; + var SYNC = 32; + var ENOUGH_LENS = 852; + var ENOUGH_DISTS = 592; + var MAX_WBITS = 15; + var DEF_WBITS = MAX_WBITS; + function zswap32(q) { + return (q >>> 24 & 255) + (q >>> 8 & 65280) + ((q & 65280) << 8) + ((q & 255) << 24); + } + function InflateState() { + this.mode = 0; + this.last = false; + this.wrap = 0; + this.havedict = false; + this.flags = 0; + this.dmax = 0; + this.check = 0; + this.total = 0; + this.head = null; + this.wbits = 0; + this.wsize = 0; + this.whave = 0; + this.wnext = 0; + this.window = null; + this.hold = 0; + this.bits = 0; + this.length = 0; + this.offset = 0; + this.extra = 0; + this.lencode = null; + this.distcode = null; + this.lenbits = 0; + this.distbits = 0; + this.ncode = 0; + this.nlen = 0; + this.ndist = 0; + this.have = 0; + this.next = null; + this.lens = new utils.Buf16(320); + this.work = new utils.Buf16(288); + this.lendyn = null; + this.distdyn = null; + this.sane = 0; + this.back = 0; + this.was = 0; + } + function inflateResetKeep(strm) { + var state; + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + state = strm.state; + strm.total_in = strm.total_out = state.total = 0; + strm.msg = ""; + if (state.wrap) { + strm.adler = state.wrap & 1; + } + state.mode = HEAD; + state.last = 0; + state.havedict = 0; + state.dmax = 32768; + state.head = null; + state.hold = 0; + state.bits = 0; + state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS); + state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS); + state.sane = 1; + state.back = -1; + return Z_OK; + } + function inflateReset(strm) { + var state; + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + state = strm.state; + state.wsize = 0; + state.whave = 0; + state.wnext = 0; + return inflateResetKeep(strm); + } + function inflateReset2(strm, windowBits) { + var wrap; + var state; + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + state = strm.state; + if (windowBits < 0) { + wrap = 0; + windowBits = -windowBits; + } else { + wrap = (windowBits >> 4) + 1; + if (windowBits < 48) { + windowBits &= 15; + } + } + if (windowBits && (windowBits < 8 || windowBits > 15)) { + return Z_STREAM_ERROR; + } + if (state.window !== null && state.wbits !== windowBits) { + state.window = null; + } + state.wrap = wrap; + state.wbits = windowBits; + return inflateReset(strm); + } + function inflateInit2(strm, windowBits) { + var ret2; + var state; + if (!strm) { + return Z_STREAM_ERROR; + } + state = new InflateState(); + strm.state = state; + state.window = null; + ret2 = inflateReset2(strm, windowBits); + if (ret2 !== Z_OK) { + strm.state = null; + } + return ret2; + } + function inflateInit(strm) { + return inflateInit2(strm, DEF_WBITS); + } + var virgin = true; + var lenfix; + var distfix; + function fixedtables(state) { + if (virgin) { + var sym; + lenfix = new utils.Buf32(512); + distfix = new utils.Buf32(32); + sym = 0; + while (sym < 144) { + state.lens[sym++] = 8; + } + while (sym < 256) { + state.lens[sym++] = 9; + } + while (sym < 280) { + state.lens[sym++] = 7; + } + while (sym < 288) { + state.lens[sym++] = 8; + } + inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 }); + sym = 0; + while (sym < 32) { + state.lens[sym++] = 5; + } + inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 }); + virgin = false; + } + state.lencode = lenfix; + state.lenbits = 9; + state.distcode = distfix; + state.distbits = 5; + } + function updatewindow(strm, src, end, copy) { + var dist; + var state = strm.state; + if (state.window === null) { + state.wsize = 1 << state.wbits; + state.wnext = 0; + state.whave = 0; + state.window = new utils.Buf8(state.wsize); + } + if (copy >= state.wsize) { + utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0); + state.wnext = 0; + state.whave = state.wsize; + } else { + dist = state.wsize - state.wnext; + if (dist > copy) { + dist = copy; + } + utils.arraySet(state.window, src, end - copy, dist, state.wnext); + copy -= dist; + if (copy) { + utils.arraySet(state.window, src, end - copy, copy, 0); + state.wnext = copy; + state.whave = state.wsize; + } else { + state.wnext += dist; + if (state.wnext === state.wsize) { + state.wnext = 0; + } + if (state.whave < state.wsize) { + state.whave += dist; + } + } + } + return 0; + } + function inflate(strm, flush) { + var state; + var input, output; + var next; + var put; + var have, left; + var hold; + var bits; + var _in, _out; + var copy; + var from; + var from_source; + var here = 0; + var here_bits, here_op, here_val; + var last_bits, last_op, last_val; + var len; + var ret2; + var hbuf = new utils.Buf8(4); + var opts; + var n; + var order = ( + /* permutation of code lengths */ + [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15] + ); + if (!strm || !strm.state || !strm.output || !strm.input && strm.avail_in !== 0) { + return Z_STREAM_ERROR; + } + state = strm.state; + if (state.mode === TYPE) { + state.mode = TYPEDO; + } + put = strm.next_out; + output = strm.output; + left = strm.avail_out; + next = strm.next_in; + input = strm.input; + have = strm.avail_in; + hold = state.hold; + bits = state.bits; + _in = have; + _out = left; + ret2 = Z_OK; + inf_leave: + for (; ; ) { + switch (state.mode) { + case HEAD: + if (state.wrap === 0) { + state.mode = TYPEDO; + break; + } + while (bits < 16) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (state.wrap & 2 && hold === 35615) { + state.check = 0; + hbuf[0] = hold & 255; + hbuf[1] = hold >>> 8 & 255; + state.check = crc32(state.check, hbuf, 2, 0); + hold = 0; + bits = 0; + state.mode = FLAGS; + break; + } + state.flags = 0; + if (state.head) { + state.head.done = false; + } + if (!(state.wrap & 1) || /* check if zlib header allowed */ + (((hold & 255) << 8) + (hold >> 8)) % 31) { + strm.msg = "incorrect header check"; + state.mode = BAD; + break; + } + if ((hold & 15) !== Z_DEFLATED) { + strm.msg = "unknown compression method"; + state.mode = BAD; + break; + } + hold >>>= 4; + bits -= 4; + len = (hold & 15) + 8; + if (state.wbits === 0) { + state.wbits = len; + } else if (len > state.wbits) { + strm.msg = "invalid window size"; + state.mode = BAD; + break; + } + state.dmax = 1 << len; + strm.adler = state.check = 1; + state.mode = hold & 512 ? DICTID : TYPE; + hold = 0; + bits = 0; + break; + case FLAGS: + while (bits < 16) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.flags = hold; + if ((state.flags & 255) !== Z_DEFLATED) { + strm.msg = "unknown compression method"; + state.mode = BAD; + break; + } + if (state.flags & 57344) { + strm.msg = "unknown header flags set"; + state.mode = BAD; + break; + } + if (state.head) { + state.head.text = hold >> 8 & 1; + } + if (state.flags & 512) { + hbuf[0] = hold & 255; + hbuf[1] = hold >>> 8 & 255; + state.check = crc32(state.check, hbuf, 2, 0); + } + hold = 0; + bits = 0; + state.mode = TIME; + /* falls through */ + case TIME: + while (bits < 32) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (state.head) { + state.head.time = hold; + } + if (state.flags & 512) { + hbuf[0] = hold & 255; + hbuf[1] = hold >>> 8 & 255; + hbuf[2] = hold >>> 16 & 255; + hbuf[3] = hold >>> 24 & 255; + state.check = crc32(state.check, hbuf, 4, 0); + } + hold = 0; + bits = 0; + state.mode = OS; + /* falls through */ + case OS: + while (bits < 16) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (state.head) { + state.head.xflags = hold & 255; + state.head.os = hold >> 8; + } + if (state.flags & 512) { + hbuf[0] = hold & 255; + hbuf[1] = hold >>> 8 & 255; + state.check = crc32(state.check, hbuf, 2, 0); + } + hold = 0; + bits = 0; + state.mode = EXLEN; + /* falls through */ + case EXLEN: + if (state.flags & 1024) { + while (bits < 16) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.length = hold; + if (state.head) { + state.head.extra_len = hold; + } + if (state.flags & 512) { + hbuf[0] = hold & 255; + hbuf[1] = hold >>> 8 & 255; + state.check = crc32(state.check, hbuf, 2, 0); + } + hold = 0; + bits = 0; + } else if (state.head) { + state.head.extra = null; + } + state.mode = EXTRA; + /* falls through */ + case EXTRA: + if (state.flags & 1024) { + copy = state.length; + if (copy > have) { + copy = have; + } + if (copy) { + if (state.head) { + len = state.head.extra_len - state.length; + if (!state.head.extra) { + state.head.extra = new Array(state.head.extra_len); + } + utils.arraySet( + state.head.extra, + input, + next, + // extra field is limited to 65536 bytes + // - no need for additional size check + copy, + /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/ + len + ); + } + if (state.flags & 512) { + state.check = crc32(state.check, input, copy, next); + } + have -= copy; + next += copy; + state.length -= copy; + } + if (state.length) { + break inf_leave; + } + } + state.length = 0; + state.mode = NAME; + /* falls through */ + case NAME: + if (state.flags & 2048) { + if (have === 0) { + break inf_leave; + } + copy = 0; + do { + len = input[next + copy++]; + if (state.head && len && state.length < 65536) { + state.head.name += String.fromCharCode(len); + } + } while (len && copy < have); + if (state.flags & 512) { + state.check = crc32(state.check, input, copy, next); + } + have -= copy; + next += copy; + if (len) { + break inf_leave; + } + } else if (state.head) { + state.head.name = null; + } + state.length = 0; + state.mode = COMMENT; + /* falls through */ + case COMMENT: + if (state.flags & 4096) { + if (have === 0) { + break inf_leave; + } + copy = 0; + do { + len = input[next + copy++]; + if (state.head && len && state.length < 65536) { + state.head.comment += String.fromCharCode(len); + } + } while (len && copy < have); + if (state.flags & 512) { + state.check = crc32(state.check, input, copy, next); + } + have -= copy; + next += copy; + if (len) { + break inf_leave; + } + } else if (state.head) { + state.head.comment = null; + } + state.mode = HCRC; + /* falls through */ + case HCRC: + if (state.flags & 512) { + while (bits < 16) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (hold !== (state.check & 65535)) { + strm.msg = "header crc mismatch"; + state.mode = BAD; + break; + } + hold = 0; + bits = 0; + } + if (state.head) { + state.head.hcrc = state.flags >> 9 & 1; + state.head.done = true; + } + strm.adler = state.check = 0; + state.mode = TYPE; + break; + case DICTID: + while (bits < 32) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + strm.adler = state.check = zswap32(hold); + hold = 0; + bits = 0; + state.mode = DICT; + /* falls through */ + case DICT: + if (state.havedict === 0) { + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + return Z_NEED_DICT; + } + strm.adler = state.check = 1; + state.mode = TYPE; + /* falls through */ + case TYPE: + if (flush === Z_BLOCK || flush === Z_TREES) { + break inf_leave; + } + /* falls through */ + case TYPEDO: + if (state.last) { + hold >>>= bits & 7; + bits -= bits & 7; + state.mode = CHECK; + break; + } + while (bits < 3) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.last = hold & 1; + hold >>>= 1; + bits -= 1; + switch (hold & 3) { + case 0: + state.mode = STORED; + break; + case 1: + fixedtables(state); + state.mode = LEN_; + if (flush === Z_TREES) { + hold >>>= 2; + bits -= 2; + break inf_leave; + } + break; + case 2: + state.mode = TABLE; + break; + case 3: + strm.msg = "invalid block type"; + state.mode = BAD; + } + hold >>>= 2; + bits -= 2; + break; + case STORED: + hold >>>= bits & 7; + bits -= bits & 7; + while (bits < 32) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if ((hold & 65535) !== (hold >>> 16 ^ 65535)) { + strm.msg = "invalid stored block lengths"; + state.mode = BAD; + break; + } + state.length = hold & 65535; + hold = 0; + bits = 0; + state.mode = COPY_; + if (flush === Z_TREES) { + break inf_leave; + } + /* falls through */ + case COPY_: + state.mode = COPY; + /* falls through */ + case COPY: + copy = state.length; + if (copy) { + if (copy > have) { + copy = have; + } + if (copy > left) { + copy = left; + } + if (copy === 0) { + break inf_leave; + } + utils.arraySet(output, input, next, copy, put); + have -= copy; + next += copy; + left -= copy; + put += copy; + state.length -= copy; + break; + } + state.mode = TYPE; + break; + case TABLE: + while (bits < 14) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.nlen = (hold & 31) + 257; + hold >>>= 5; + bits -= 5; + state.ndist = (hold & 31) + 1; + hold >>>= 5; + bits -= 5; + state.ncode = (hold & 15) + 4; + hold >>>= 4; + bits -= 4; + if (state.nlen > 286 || state.ndist > 30) { + strm.msg = "too many length or distance symbols"; + state.mode = BAD; + break; + } + state.have = 0; + state.mode = LENLENS; + /* falls through */ + case LENLENS: + while (state.have < state.ncode) { + while (bits < 3) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.lens[order[state.have++]] = hold & 7; + hold >>>= 3; + bits -= 3; + } + while (state.have < 19) { + state.lens[order[state.have++]] = 0; + } + state.lencode = state.lendyn; + state.lenbits = 7; + opts = { bits: state.lenbits }; + ret2 = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts); + state.lenbits = opts.bits; + if (ret2) { + strm.msg = "invalid code lengths set"; + state.mode = BAD; + break; + } + state.have = 0; + state.mode = CODELENS; + /* falls through */ + case CODELENS: + while (state.have < state.nlen + state.ndist) { + for (; ; ) { + here = state.lencode[hold & (1 << state.lenbits) - 1]; + here_bits = here >>> 24; + here_op = here >>> 16 & 255; + here_val = here & 65535; + if (here_bits <= bits) { + break; + } + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (here_val < 16) { + hold >>>= here_bits; + bits -= here_bits; + state.lens[state.have++] = here_val; + } else { + if (here_val === 16) { + n = here_bits + 2; + while (bits < n) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + hold >>>= here_bits; + bits -= here_bits; + if (state.have === 0) { + strm.msg = "invalid bit length repeat"; + state.mode = BAD; + break; + } + len = state.lens[state.have - 1]; + copy = 3 + (hold & 3); + hold >>>= 2; + bits -= 2; + } else if (here_val === 17) { + n = here_bits + 3; + while (bits < n) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + hold >>>= here_bits; + bits -= here_bits; + len = 0; + copy = 3 + (hold & 7); + hold >>>= 3; + bits -= 3; + } else { + n = here_bits + 7; + while (bits < n) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + hold >>>= here_bits; + bits -= here_bits; + len = 0; + copy = 11 + (hold & 127); + hold >>>= 7; + bits -= 7; + } + if (state.have + copy > state.nlen + state.ndist) { + strm.msg = "invalid bit length repeat"; + state.mode = BAD; + break; + } + while (copy--) { + state.lens[state.have++] = len; + } + } + } + if (state.mode === BAD) { + break; + } + if (state.lens[256] === 0) { + strm.msg = "invalid code -- missing end-of-block"; + state.mode = BAD; + break; + } + state.lenbits = 9; + opts = { bits: state.lenbits }; + ret2 = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts); + state.lenbits = opts.bits; + if (ret2) { + strm.msg = "invalid literal/lengths set"; + state.mode = BAD; + break; + } + state.distbits = 6; + state.distcode = state.distdyn; + opts = { bits: state.distbits }; + ret2 = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts); + state.distbits = opts.bits; + if (ret2) { + strm.msg = "invalid distances set"; + state.mode = BAD; + break; + } + state.mode = LEN_; + if (flush === Z_TREES) { + break inf_leave; + } + /* falls through */ + case LEN_: + state.mode = LEN; + /* falls through */ + case LEN: + if (have >= 6 && left >= 258) { + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + inflate_fast(strm, _out); + put = strm.next_out; + output = strm.output; + left = strm.avail_out; + next = strm.next_in; + input = strm.input; + have = strm.avail_in; + hold = state.hold; + bits = state.bits; + if (state.mode === TYPE) { + state.back = -1; + } + break; + } + state.back = 0; + for (; ; ) { + here = state.lencode[hold & (1 << state.lenbits) - 1]; + here_bits = here >>> 24; + here_op = here >>> 16 & 255; + here_val = here & 65535; + if (here_bits <= bits) { + break; + } + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (here_op && (here_op & 240) === 0) { + last_bits = here_bits; + last_op = here_op; + last_val = here_val; + for (; ; ) { + here = state.lencode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)]; + here_bits = here >>> 24; + here_op = here >>> 16 & 255; + here_val = here & 65535; + if (last_bits + here_bits <= bits) { + break; + } + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + hold >>>= last_bits; + bits -= last_bits; + state.back += last_bits; + } + hold >>>= here_bits; + bits -= here_bits; + state.back += here_bits; + state.length = here_val; + if (here_op === 0) { + state.mode = LIT; + break; + } + if (here_op & 32) { + state.back = -1; + state.mode = TYPE; + break; + } + if (here_op & 64) { + strm.msg = "invalid literal/length code"; + state.mode = BAD; + break; + } + state.extra = here_op & 15; + state.mode = LENEXT; + /* falls through */ + case LENEXT: + if (state.extra) { + n = state.extra; + while (bits < n) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.length += hold & (1 << state.extra) - 1; + hold >>>= state.extra; + bits -= state.extra; + state.back += state.extra; + } + state.was = state.length; + state.mode = DIST; + /* falls through */ + case DIST: + for (; ; ) { + here = state.distcode[hold & (1 << state.distbits) - 1]; + here_bits = here >>> 24; + here_op = here >>> 16 & 255; + here_val = here & 65535; + if (here_bits <= bits) { + break; + } + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if ((here_op & 240) === 0) { + last_bits = here_bits; + last_op = here_op; + last_val = here_val; + for (; ; ) { + here = state.distcode[last_val + ((hold & (1 << last_bits + last_op) - 1) >> last_bits)]; + here_bits = here >>> 24; + here_op = here >>> 16 & 255; + here_val = here & 65535; + if (last_bits + here_bits <= bits) { + break; + } + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + hold >>>= last_bits; + bits -= last_bits; + state.back += last_bits; + } + hold >>>= here_bits; + bits -= here_bits; + state.back += here_bits; + if (here_op & 64) { + strm.msg = "invalid distance code"; + state.mode = BAD; + break; + } + state.offset = here_val; + state.extra = here_op & 15; + state.mode = DISTEXT; + /* falls through */ + case DISTEXT: + if (state.extra) { + n = state.extra; + while (bits < n) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + state.offset += hold & (1 << state.extra) - 1; + hold >>>= state.extra; + bits -= state.extra; + state.back += state.extra; + } + if (state.offset > state.dmax) { + strm.msg = "invalid distance too far back"; + state.mode = BAD; + break; + } + state.mode = MATCH; + /* falls through */ + case MATCH: + if (left === 0) { + break inf_leave; + } + copy = _out - left; + if (state.offset > copy) { + copy = state.offset - copy; + if (copy > state.whave) { + if (state.sane) { + strm.msg = "invalid distance too far back"; + state.mode = BAD; + break; + } + } + if (copy > state.wnext) { + copy -= state.wnext; + from = state.wsize - copy; + } else { + from = state.wnext - copy; + } + if (copy > state.length) { + copy = state.length; + } + from_source = state.window; + } else { + from_source = output; + from = put - state.offset; + copy = state.length; + } + if (copy > left) { + copy = left; + } + left -= copy; + state.length -= copy; + do { + output[put++] = from_source[from++]; + } while (--copy); + if (state.length === 0) { + state.mode = LEN; + } + break; + case LIT: + if (left === 0) { + break inf_leave; + } + output[put++] = state.length; + left--; + state.mode = LEN; + break; + case CHECK: + if (state.wrap) { + while (bits < 32) { + if (have === 0) { + break inf_leave; + } + have--; + hold |= input[next++] << bits; + bits += 8; + } + _out -= left; + strm.total_out += _out; + state.total += _out; + if (_out) { + strm.adler = state.check = /*UPDATE(state.check, put - _out, _out);*/ + state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out); + } + _out = left; + if ((state.flags ? hold : zswap32(hold)) !== state.check) { + strm.msg = "incorrect data check"; + state.mode = BAD; + break; + } + hold = 0; + bits = 0; + } + state.mode = LENGTH; + /* falls through */ + case LENGTH: + if (state.wrap && state.flags) { + while (bits < 32) { + if (have === 0) { + break inf_leave; + } + have--; + hold += input[next++] << bits; + bits += 8; + } + if (hold !== (state.total & 4294967295)) { + strm.msg = "incorrect length check"; + state.mode = BAD; + break; + } + hold = 0; + bits = 0; + } + state.mode = DONE; + /* falls through */ + case DONE: + ret2 = Z_STREAM_END; + break inf_leave; + case BAD: + ret2 = Z_DATA_ERROR; + break inf_leave; + case MEM: + return Z_MEM_ERROR; + case SYNC: + /* falls through */ + default: + return Z_STREAM_ERROR; + } + } + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + if (state.wsize || _out !== strm.avail_out && state.mode < BAD && (state.mode < CHECK || flush !== Z_FINISH)) { + if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) { + state.mode = MEM; + return Z_MEM_ERROR; + } + } + _in -= strm.avail_in; + _out -= strm.avail_out; + strm.total_in += _in; + strm.total_out += _out; + state.total += _out; + if (state.wrap && _out) { + strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/ + state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out); + } + strm.data_type = state.bits + (state.last ? 64 : 0) + (state.mode === TYPE ? 128 : 0) + (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0); + if ((_in === 0 && _out === 0 || flush === Z_FINISH) && ret2 === Z_OK) { + ret2 = Z_BUF_ERROR; + } + return ret2; + } + function inflateEnd(strm) { + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + var state = strm.state; + if (state.window) { + state.window = null; + } + strm.state = null; + return Z_OK; + } + function inflateGetHeader(strm, head) { + var state; + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + state = strm.state; + if ((state.wrap & 2) === 0) { + return Z_STREAM_ERROR; + } + state.head = head; + head.done = false; + return Z_OK; + } + function inflateSetDictionary(strm, dictionary) { + var dictLength = dictionary.length; + var state; + var dictid; + var ret2; + if (!strm || !strm.state) { + return Z_STREAM_ERROR; + } + state = strm.state; + if (state.wrap !== 0 && state.mode !== DICT) { + return Z_STREAM_ERROR; + } + if (state.mode === DICT) { + dictid = 1; + dictid = adler32(dictid, dictionary, dictLength, 0); + if (dictid !== state.check) { + return Z_DATA_ERROR; + } + } + ret2 = updatewindow(strm, dictionary, dictLength, dictLength); + if (ret2) { + state.mode = MEM; + return Z_MEM_ERROR; + } + state.havedict = 1; + return Z_OK; + } + exports2.inflateReset = inflateReset; + exports2.inflateReset2 = inflateReset2; + exports2.inflateResetKeep = inflateResetKeep; + exports2.inflateInit = inflateInit; + exports2.inflateInit2 = inflateInit2; + exports2.inflate = inflate; + exports2.inflateEnd = inflateEnd; + exports2.inflateGetHeader = inflateGetHeader; + exports2.inflateSetDictionary = inflateSetDictionary; + exports2.inflateInfo = "pako inflate (from Nodeca project)"; + } +}); + +// ../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/constants.js +var require_constants9 = __commonJS({ + "../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/constants.js"(exports2, module2) { + "use strict"; + module2.exports = { + /* Allowed flush values; see deflate() and inflate() below for details */ + Z_NO_FLUSH: 0, + Z_PARTIAL_FLUSH: 1, + Z_SYNC_FLUSH: 2, + Z_FULL_FLUSH: 3, + Z_FINISH: 4, + Z_BLOCK: 5, + Z_TREES: 6, + /* Return codes for the compression/decompression functions. Negative values + * are errors, positive values are used for special but normal events. + */ + Z_OK: 0, + Z_STREAM_END: 1, + Z_NEED_DICT: 2, + Z_ERRNO: -1, + Z_STREAM_ERROR: -2, + Z_DATA_ERROR: -3, + //Z_MEM_ERROR: -4, + Z_BUF_ERROR: -5, + //Z_VERSION_ERROR: -6, + /* compression levels */ + Z_NO_COMPRESSION: 0, + Z_BEST_SPEED: 1, + Z_BEST_COMPRESSION: 9, + Z_DEFAULT_COMPRESSION: -1, + Z_FILTERED: 1, + Z_HUFFMAN_ONLY: 2, + Z_RLE: 3, + Z_FIXED: 4, + Z_DEFAULT_STRATEGY: 0, + /* Possible values of the data_type field (though see inflate()) */ + Z_BINARY: 0, + Z_TEXT: 1, + //Z_ASCII: 1, // = Z_TEXT (deprecated) + Z_UNKNOWN: 2, + /* The deflate compression method */ + Z_DEFLATED: 8 + //Z_NULL: null // Use -1 or null inline, depending on var type + }; + } +}); + +// ../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/gzheader.js +var require_gzheader = __commonJS({ + "../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/zlib/gzheader.js"(exports2, module2) { + "use strict"; + function GZheader() { + this.text = 0; + this.time = 0; + this.xflags = 0; + this.os = 0; + this.extra = null; + this.extra_len = 0; + this.name = ""; + this.comment = ""; + this.hcrc = 0; + this.done = false; + } + module2.exports = GZheader; + } +}); + +// ../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/inflate.js +var require_inflate2 = __commonJS({ + "../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/lib/inflate.js"(exports2) { + "use strict"; + var zlib_inflate = require_inflate(); + var utils = require_common2(); + var strings = require_strings(); + var c = require_constants9(); + var msg = require_messages3(); + var ZStream = require_zstream(); + var GZheader = require_gzheader(); + var toString2 = Object.prototype.toString; + function Inflate(options) { + if (!(this instanceof Inflate)) return new Inflate(options); + this.options = utils.assign({ + chunkSize: 16384, + windowBits: 0, + to: "" + }, options || {}); + var opt = this.options; + if (opt.raw && opt.windowBits >= 0 && opt.windowBits < 16) { + opt.windowBits = -opt.windowBits; + if (opt.windowBits === 0) { + opt.windowBits = -15; + } + } + if (opt.windowBits >= 0 && opt.windowBits < 16 && !(options && options.windowBits)) { + opt.windowBits += 32; + } + if (opt.windowBits > 15 && opt.windowBits < 48) { + if ((opt.windowBits & 15) === 0) { + opt.windowBits |= 15; + } + } + this.err = 0; + this.msg = ""; + this.ended = false; + this.chunks = []; + this.strm = new ZStream(); + this.strm.avail_out = 0; + var status = zlib_inflate.inflateInit2( + this.strm, + opt.windowBits + ); + if (status !== c.Z_OK) { + throw new Error(msg[status]); + } + this.header = new GZheader(); + zlib_inflate.inflateGetHeader(this.strm, this.header); + if (opt.dictionary) { + if (typeof opt.dictionary === "string") { + opt.dictionary = strings.string2buf(opt.dictionary); + } else if (toString2.call(opt.dictionary) === "[object ArrayBuffer]") { + opt.dictionary = new Uint8Array(opt.dictionary); + } + if (opt.raw) { + status = zlib_inflate.inflateSetDictionary(this.strm, opt.dictionary); + if (status !== c.Z_OK) { + throw new Error(msg[status]); + } + } + } + } + Inflate.prototype.push = function(data, mode) { + var strm = this.strm; + var chunkSize = this.options.chunkSize; + var dictionary = this.options.dictionary; + var status, _mode; + var next_out_utf8, tail, utf8str; + var allowBufError = false; + if (this.ended) { + return false; + } + _mode = mode === ~~mode ? mode : mode === true ? c.Z_FINISH : c.Z_NO_FLUSH; + if (typeof data === "string") { + strm.input = strings.binstring2buf(data); + } else if (toString2.call(data) === "[object ArrayBuffer]") { + strm.input = new Uint8Array(data); + } else { + strm.input = data; + } + strm.next_in = 0; + strm.avail_in = strm.input.length; + do { + if (strm.avail_out === 0) { + strm.output = new utils.Buf8(chunkSize); + strm.next_out = 0; + strm.avail_out = chunkSize; + } + status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH); + if (status === c.Z_NEED_DICT && dictionary) { + status = zlib_inflate.inflateSetDictionary(this.strm, dictionary); + } + if (status === c.Z_BUF_ERROR && allowBufError === true) { + status = c.Z_OK; + allowBufError = false; + } + if (status !== c.Z_STREAM_END && status !== c.Z_OK) { + this.onEnd(status); + this.ended = true; + return false; + } + if (strm.next_out) { + if (strm.avail_out === 0 || status === c.Z_STREAM_END || strm.avail_in === 0 && (_mode === c.Z_FINISH || _mode === c.Z_SYNC_FLUSH)) { + if (this.options.to === "string") { + next_out_utf8 = strings.utf8border(strm.output, strm.next_out); + tail = strm.next_out - next_out_utf8; + utf8str = strings.buf2string(strm.output, next_out_utf8); + strm.next_out = tail; + strm.avail_out = chunkSize - tail; + if (tail) { + utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); + } + this.onData(utf8str); + } else { + this.onData(utils.shrinkBuf(strm.output, strm.next_out)); + } + } + } + if (strm.avail_in === 0 && strm.avail_out === 0) { + allowBufError = true; + } + } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== c.Z_STREAM_END); + if (status === c.Z_STREAM_END) { + _mode = c.Z_FINISH; + } + if (_mode === c.Z_FINISH) { + status = zlib_inflate.inflateEnd(this.strm); + this.onEnd(status); + this.ended = true; + return status === c.Z_OK; + } + if (_mode === c.Z_SYNC_FLUSH) { + this.onEnd(c.Z_OK); + strm.avail_out = 0; + return true; + } + return true; + }; + Inflate.prototype.onData = function(chunk) { + this.chunks.push(chunk); + }; + Inflate.prototype.onEnd = function(status) { + if (status === c.Z_OK) { + if (this.options.to === "string") { + this.result = this.chunks.join(""); + } else { + this.result = utils.flattenChunks(this.chunks); + } + } + this.chunks = []; + this.err = status; + this.msg = this.strm.msg; + }; + function inflate(input, options) { + var inflator = new Inflate(options); + inflator.push(input, true); + if (inflator.err) { + throw inflator.msg || msg[inflator.err]; + } + return inflator.result; + } + function inflateRaw(input, options) { + options = options || {}; + options.raw = true; + return inflate(input, options); + } + exports2.Inflate = Inflate; + exports2.inflate = inflate; + exports2.inflateRaw = inflateRaw; + exports2.ungzip = inflate; + } +}); + +// ../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/index.js +var require_pako = __commonJS({ + "../../node_modules/.pnpm/pako@1.0.11/node_modules/pako/index.js"(exports2, module2) { + "use strict"; + var assign = require_common2().assign; + var deflate = require_deflate2(); + var inflate = require_inflate2(); + var constants = require_constants9(); + var pako = {}; + assign(pako, deflate, inflate, constants); + module2.exports = pako; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/flate.js +var require_flate = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/flate.js"(exports2) { + "use strict"; + var USE_TYPEDARRAY = typeof Uint8Array !== "undefined" && typeof Uint16Array !== "undefined" && typeof Uint32Array !== "undefined"; + var pako = require_pako(); + var utils = require_utils12(); + var GenericWorker = require_GenericWorker(); + var ARRAY_TYPE = USE_TYPEDARRAY ? "uint8array" : "array"; + exports2.magic = "\b\0"; + function FlateWorker(action, options) { + GenericWorker.call(this, "FlateWorker/" + action); + this._pako = null; + this._pakoAction = action; + this._pakoOptions = options; + this.meta = {}; + } + utils.inherits(FlateWorker, GenericWorker); + FlateWorker.prototype.processChunk = function(chunk) { + this.meta = chunk.meta; + if (this._pako === null) { + this._createPako(); + } + this._pako.push(utils.transformTo(ARRAY_TYPE, chunk.data), false); + }; + FlateWorker.prototype.flush = function() { + GenericWorker.prototype.flush.call(this); + if (this._pako === null) { + this._createPako(); + } + this._pako.push([], true); + }; + FlateWorker.prototype.cleanUp = function() { + GenericWorker.prototype.cleanUp.call(this); + this._pako = null; + }; + FlateWorker.prototype._createPako = function() { + this._pako = new pako[this._pakoAction]({ + raw: true, + level: this._pakoOptions.level || -1 + // default compression + }); + var self2 = this; + this._pako.onData = function(data) { + self2.push({ + data, + meta: self2.meta + }); + }; + }; + exports2.compressWorker = function(compressionOptions) { + return new FlateWorker("Deflate", compressionOptions); + }; + exports2.uncompressWorker = function() { + return new FlateWorker("Inflate", {}); + }; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/compressions.js +var require_compressions = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/compressions.js"(exports2) { + "use strict"; + var GenericWorker = require_GenericWorker(); + exports2.STORE = { + magic: "\0\0", + compressWorker: function() { + return new GenericWorker("STORE compression"); + }, + uncompressWorker: function() { + return new GenericWorker("STORE decompression"); + } + }; + exports2.DEFLATE = require_flate(); + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/signature.js +var require_signature = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/signature.js"(exports2) { + "use strict"; + exports2.LOCAL_FILE_HEADER = "PK"; + exports2.CENTRAL_FILE_HEADER = "PK"; + exports2.CENTRAL_DIRECTORY_END = "PK"; + exports2.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x07"; + exports2.ZIP64_CENTRAL_DIRECTORY_END = "PK"; + exports2.DATA_DESCRIPTOR = "PK\x07\b"; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/generate/ZipFileWorker.js +var require_ZipFileWorker = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/generate/ZipFileWorker.js"(exports2, module2) { + "use strict"; + var utils = require_utils12(); + var GenericWorker = require_GenericWorker(); + var utf8 = require_utf8(); + var crc32 = require_crc32(); + var signature = require_signature(); + var decToHex = function(dec, bytes) { + var hex = "", i; + for (i = 0; i < bytes; i++) { + hex += String.fromCharCode(dec & 255); + dec = dec >>> 8; + } + return hex; + }; + var generateUnixExternalFileAttr = function(unixPermissions, isDir) { + var result = unixPermissions; + if (!unixPermissions) { + result = isDir ? 16893 : 33204; + } + return (result & 65535) << 16; + }; + var generateDosExternalFileAttr = function(dosPermissions) { + return (dosPermissions || 0) & 63; + }; + var generateZipParts = function(streamInfo, streamedContent, streamingEnded, offset, platform, encodeFileName) { + var file2 = streamInfo["file"], compression = streamInfo["compression"], useCustomEncoding = encodeFileName !== utf8.utf8encode, encodedFileName = utils.transformTo("string", encodeFileName(file2.name)), utfEncodedFileName = utils.transformTo("string", utf8.utf8encode(file2.name)), comment = file2.comment, encodedComment = utils.transformTo("string", encodeFileName(comment)), utfEncodedComment = utils.transformTo("string", utf8.utf8encode(comment)), useUTF8ForFileName = utfEncodedFileName.length !== file2.name.length, useUTF8ForComment = utfEncodedComment.length !== comment.length, dosTime, dosDate, extraFields = "", unicodePathExtraField = "", unicodeCommentExtraField = "", dir = file2.dir, date = file2.date; + var dataInfo = { + crc32: 0, + compressedSize: 0, + uncompressedSize: 0 + }; + if (!streamedContent || streamingEnded) { + dataInfo.crc32 = streamInfo["crc32"]; + dataInfo.compressedSize = streamInfo["compressedSize"]; + dataInfo.uncompressedSize = streamInfo["uncompressedSize"]; + } + var bitflag = 0; + if (streamedContent) { + bitflag |= 8; + } + if (!useCustomEncoding && (useUTF8ForFileName || useUTF8ForComment)) { + bitflag |= 2048; + } + var extFileAttr = 0; + var versionMadeBy = 0; + if (dir) { + extFileAttr |= 16; + } + if (platform === "UNIX") { + versionMadeBy = 798; + extFileAttr |= generateUnixExternalFileAttr(file2.unixPermissions, dir); + } else { + versionMadeBy = 20; + extFileAttr |= generateDosExternalFileAttr(file2.dosPermissions, dir); + } + dosTime = date.getUTCHours(); + dosTime = dosTime << 6; + dosTime = dosTime | date.getUTCMinutes(); + dosTime = dosTime << 5; + dosTime = dosTime | date.getUTCSeconds() / 2; + dosDate = date.getUTCFullYear() - 1980; + dosDate = dosDate << 4; + dosDate = dosDate | date.getUTCMonth() + 1; + dosDate = dosDate << 5; + dosDate = dosDate | date.getUTCDate(); + if (useUTF8ForFileName) { + unicodePathExtraField = // Version + decToHex(1, 1) + // NameCRC32 + decToHex(crc32(encodedFileName), 4) + // UnicodeName + utfEncodedFileName; + extraFields += // Info-ZIP Unicode Path Extra Field + "up" + // size + decToHex(unicodePathExtraField.length, 2) + // content + unicodePathExtraField; + } + if (useUTF8ForComment) { + unicodeCommentExtraField = // Version + decToHex(1, 1) + // CommentCRC32 + decToHex(crc32(encodedComment), 4) + // UnicodeName + utfEncodedComment; + extraFields += // Info-ZIP Unicode Path Extra Field + "uc" + // size + decToHex(unicodeCommentExtraField.length, 2) + // content + unicodeCommentExtraField; + } + var header = ""; + header += "\n\0"; + header += decToHex(bitflag, 2); + header += compression.magic; + header += decToHex(dosTime, 2); + header += decToHex(dosDate, 2); + header += decToHex(dataInfo.crc32, 4); + header += decToHex(dataInfo.compressedSize, 4); + header += decToHex(dataInfo.uncompressedSize, 4); + header += decToHex(encodedFileName.length, 2); + header += decToHex(extraFields.length, 2); + var fileRecord = signature.LOCAL_FILE_HEADER + header + encodedFileName + extraFields; + var dirRecord = signature.CENTRAL_FILE_HEADER + // version made by (00: DOS) + decToHex(versionMadeBy, 2) + // file header (common to file and central directory) + header + // file comment length + decToHex(encodedComment.length, 2) + // disk number start + "\0\0\0\0" + // external file attributes + decToHex(extFileAttr, 4) + // relative offset of local header + decToHex(offset, 4) + // file name + encodedFileName + // extra field + extraFields + // file comment + encodedComment; + return { + fileRecord, + dirRecord + }; + }; + var generateCentralDirectoryEnd = function(entriesCount, centralDirLength, localDirLength, comment, encodeFileName) { + var dirEnd = ""; + var encodedComment = utils.transformTo("string", encodeFileName(comment)); + dirEnd = signature.CENTRAL_DIRECTORY_END + // number of this disk + "\0\0\0\0" + // total number of entries in the central directory on this disk + decToHex(entriesCount, 2) + // total number of entries in the central directory + decToHex(entriesCount, 2) + // size of the central directory 4 bytes + decToHex(centralDirLength, 4) + // offset of start of central directory with respect to the starting disk number + decToHex(localDirLength, 4) + // .ZIP file comment length + decToHex(encodedComment.length, 2) + // .ZIP file comment + encodedComment; + return dirEnd; + }; + var generateDataDescriptors = function(streamInfo) { + var descriptor = ""; + descriptor = signature.DATA_DESCRIPTOR + // crc-32 4 bytes + decToHex(streamInfo["crc32"], 4) + // compressed size 4 bytes + decToHex(streamInfo["compressedSize"], 4) + // uncompressed size 4 bytes + decToHex(streamInfo["uncompressedSize"], 4); + return descriptor; + }; + function ZipFileWorker(streamFiles, comment, platform, encodeFileName) { + GenericWorker.call(this, "ZipFileWorker"); + this.bytesWritten = 0; + this.zipComment = comment; + this.zipPlatform = platform; + this.encodeFileName = encodeFileName; + this.streamFiles = streamFiles; + this.accumulate = false; + this.contentBuffer = []; + this.dirRecords = []; + this.currentSourceOffset = 0; + this.entriesCount = 0; + this.currentFile = null; + this._sources = []; + } + utils.inherits(ZipFileWorker, GenericWorker); + ZipFileWorker.prototype.push = function(chunk) { + var currentFilePercent = chunk.meta.percent || 0; + var entriesCount = this.entriesCount; + var remainingFiles = this._sources.length; + if (this.accumulate) { + this.contentBuffer.push(chunk); + } else { + this.bytesWritten += chunk.data.length; + GenericWorker.prototype.push.call(this, { + data: chunk.data, + meta: { + currentFile: this.currentFile, + percent: entriesCount ? (currentFilePercent + 100 * (entriesCount - remainingFiles - 1)) / entriesCount : 100 + } + }); + } + }; + ZipFileWorker.prototype.openedSource = function(streamInfo) { + this.currentSourceOffset = this.bytesWritten; + this.currentFile = streamInfo["file"].name; + var streamedContent = this.streamFiles && !streamInfo["file"].dir; + if (streamedContent) { + var record = generateZipParts(streamInfo, streamedContent, false, this.currentSourceOffset, this.zipPlatform, this.encodeFileName); + this.push({ + data: record.fileRecord, + meta: { percent: 0 } + }); + } else { + this.accumulate = true; + } + }; + ZipFileWorker.prototype.closedSource = function(streamInfo) { + this.accumulate = false; + var streamedContent = this.streamFiles && !streamInfo["file"].dir; + var record = generateZipParts(streamInfo, streamedContent, true, this.currentSourceOffset, this.zipPlatform, this.encodeFileName); + this.dirRecords.push(record.dirRecord); + if (streamedContent) { + this.push({ + data: generateDataDescriptors(streamInfo), + meta: { percent: 100 } + }); + } else { + this.push({ + data: record.fileRecord, + meta: { percent: 0 } + }); + while (this.contentBuffer.length) { + this.push(this.contentBuffer.shift()); + } + } + this.currentFile = null; + }; + ZipFileWorker.prototype.flush = function() { + var localDirLength = this.bytesWritten; + for (var i = 0; i < this.dirRecords.length; i++) { + this.push({ + data: this.dirRecords[i], + meta: { percent: 100 } + }); + } + var centralDirLength = this.bytesWritten - localDirLength; + var dirEnd = generateCentralDirectoryEnd(this.dirRecords.length, centralDirLength, localDirLength, this.zipComment, this.encodeFileName); + this.push({ + data: dirEnd, + meta: { percent: 100 } + }); + }; + ZipFileWorker.prototype.prepareNextSource = function() { + this.previous = this._sources.shift(); + this.openedSource(this.previous.streamInfo); + if (this.isPaused) { + this.previous.pause(); + } else { + this.previous.resume(); + } + }; + ZipFileWorker.prototype.registerPrevious = function(previous) { + this._sources.push(previous); + var self2 = this; + previous.on("data", function(chunk) { + self2.processChunk(chunk); + }); + previous.on("end", function() { + self2.closedSource(self2.previous.streamInfo); + if (self2._sources.length) { + self2.prepareNextSource(); + } else { + self2.end(); + } + }); + previous.on("error", function(e) { + self2.error(e); + }); + return this; + }; + ZipFileWorker.prototype.resume = function() { + if (!GenericWorker.prototype.resume.call(this)) { + return false; + } + if (!this.previous && this._sources.length) { + this.prepareNextSource(); + return true; + } + if (!this.previous && !this._sources.length && !this.generatedError) { + this.end(); + return true; + } + }; + ZipFileWorker.prototype.error = function(e) { + var sources = this._sources; + if (!GenericWorker.prototype.error.call(this, e)) { + return false; + } + for (var i = 0; i < sources.length; i++) { + try { + sources[i].error(e); + } catch (e2) { + } + } + return true; + }; + ZipFileWorker.prototype.lock = function() { + GenericWorker.prototype.lock.call(this); + var sources = this._sources; + for (var i = 0; i < sources.length; i++) { + sources[i].lock(); + } + }; + module2.exports = ZipFileWorker; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/generate/index.js +var require_generate2 = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/generate/index.js"(exports2) { + "use strict"; + var compressions = require_compressions(); + var ZipFileWorker = require_ZipFileWorker(); + var getCompression = function(fileCompression, zipCompression) { + var compressionName = fileCompression || zipCompression; + var compression = compressions[compressionName]; + if (!compression) { + throw new Error(compressionName + " is not a valid compression method !"); + } + return compression; + }; + exports2.generateWorker = function(zip, options, comment) { + var zipFileWorker = new ZipFileWorker(options.streamFiles, comment, options.platform, options.encodeFileName); + var entriesCount = 0; + try { + zip.forEach(function(relativePath, file2) { + entriesCount++; + var compression = getCompression(file2.options.compression, options.compression); + var compressionOptions = file2.options.compressionOptions || options.compressionOptions || {}; + var dir = file2.dir, date = file2.date; + file2._compressWorker(compression, compressionOptions).withStreamInfo("file", { + name: relativePath, + dir, + date, + comment: file2.comment || "", + unixPermissions: file2.unixPermissions, + dosPermissions: file2.dosPermissions + }).pipe(zipFileWorker); + }); + zipFileWorker.entriesCount = entriesCount; + } catch (e) { + zipFileWorker.error(e); + } + return zipFileWorker; + }; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/nodejs/NodejsStreamInputAdapter.js +var require_NodejsStreamInputAdapter = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/nodejs/NodejsStreamInputAdapter.js"(exports2, module2) { + "use strict"; + var utils = require_utils12(); + var GenericWorker = require_GenericWorker(); + function NodejsStreamInputAdapter(filename, stream) { + GenericWorker.call(this, "Nodejs stream input adapter for " + filename); + this._upstreamEnded = false; + this._bindStream(stream); + } + utils.inherits(NodejsStreamInputAdapter, GenericWorker); + NodejsStreamInputAdapter.prototype._bindStream = function(stream) { + var self2 = this; + this._stream = stream; + stream.pause(); + stream.on("data", function(chunk) { + self2.push({ + data: chunk, + meta: { + percent: 0 + } + }); + }).on("error", function(e) { + if (self2.isPaused) { + this.generatedError = e; + } else { + self2.error(e); + } + }).on("end", function() { + if (self2.isPaused) { + self2._upstreamEnded = true; + } else { + self2.end(); + } + }); + }; + NodejsStreamInputAdapter.prototype.pause = function() { + if (!GenericWorker.prototype.pause.call(this)) { + return false; + } + this._stream.pause(); + return true; + }; + NodejsStreamInputAdapter.prototype.resume = function() { + if (!GenericWorker.prototype.resume.call(this)) { + return false; + } + if (this._upstreamEnded) { + this.end(); + } else { + this._stream.resume(); + } + return true; + }; + module2.exports = NodejsStreamInputAdapter; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/object.js +var require_object = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/object.js"(exports2, module2) { + "use strict"; + var utf8 = require_utf8(); + var utils = require_utils12(); + var GenericWorker = require_GenericWorker(); + var StreamHelper = require_StreamHelper(); + var defaults = require_defaults(); + var CompressedObject = require_compressedObject(); + var ZipObject = require_zipObject(); + var generate = require_generate2(); + var nodejsUtils = require_nodejsUtils(); + var NodejsStreamInputAdapter = require_NodejsStreamInputAdapter(); + var fileAdd = function(name, data, originalOptions) { + var dataType = utils.getTypeOf(data), parent; + var o = utils.extend(originalOptions || {}, defaults); + o.date = o.date || /* @__PURE__ */ new Date(); + if (o.compression !== null) { + o.compression = o.compression.toUpperCase(); + } + if (typeof o.unixPermissions === "string") { + o.unixPermissions = parseInt(o.unixPermissions, 8); + } + if (o.unixPermissions && o.unixPermissions & 16384) { + o.dir = true; + } + if (o.dosPermissions && o.dosPermissions & 16) { + o.dir = true; + } + if (o.dir) { + name = forceTrailingSlash(name); + } + if (o.createFolders && (parent = parentFolder(name))) { + folderAdd.call(this, parent, true); + } + var isUnicodeString = dataType === "string" && o.binary === false && o.base64 === false; + if (!originalOptions || typeof originalOptions.binary === "undefined") { + o.binary = !isUnicodeString; + } + var isCompressedEmpty = data instanceof CompressedObject && data.uncompressedSize === 0; + if (isCompressedEmpty || o.dir || !data || data.length === 0) { + o.base64 = false; + o.binary = true; + data = ""; + o.compression = "STORE"; + dataType = "string"; + } + var zipObjectContent = null; + if (data instanceof CompressedObject || data instanceof GenericWorker) { + zipObjectContent = data; + } else if (nodejsUtils.isNode && nodejsUtils.isStream(data)) { + zipObjectContent = new NodejsStreamInputAdapter(name, data); + } else { + zipObjectContent = utils.prepareContent(name, data, o.binary, o.optimizedBinaryString, o.base64); + } + var object = new ZipObject(name, zipObjectContent, o); + this.files[name] = object; + }; + var parentFolder = function(path) { + if (path.slice(-1) === "/") { + path = path.substring(0, path.length - 1); + } + var lastSlash = path.lastIndexOf("/"); + return lastSlash > 0 ? path.substring(0, lastSlash) : ""; + }; + var forceTrailingSlash = function(path) { + if (path.slice(-1) !== "/") { + path += "/"; + } + return path; + }; + var folderAdd = function(name, createFolders) { + createFolders = typeof createFolders !== "undefined" ? createFolders : defaults.createFolders; + name = forceTrailingSlash(name); + if (!this.files[name]) { + fileAdd.call(this, name, null, { + dir: true, + createFolders + }); + } + return this.files[name]; + }; + function isRegExp(object) { + return Object.prototype.toString.call(object) === "[object RegExp]"; + } + var out = { + /** + * @see loadAsync + */ + load: function() { + throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide."); + }, + /** + * Call a callback function for each entry at this folder level. + * @param {Function} cb the callback function: + * function (relativePath, file) {...} + * It takes 2 arguments : the relative path and the file. + */ + forEach: function(cb) { + var filename, relativePath, file2; + for (filename in this.files) { + file2 = this.files[filename]; + relativePath = filename.slice(this.root.length, filename.length); + if (relativePath && filename.slice(0, this.root.length) === this.root) { + cb(relativePath, file2); + } + } + }, + /** + * Filter nested files/folders with the specified function. + * @param {Function} search the predicate to use : + * function (relativePath, file) {...} + * It takes 2 arguments : the relative path and the file. + * @return {Array} An array of matching elements. + */ + filter: function(search) { + var result = []; + this.forEach(function(relativePath, entry) { + if (search(relativePath, entry)) { + result.push(entry); + } + }); + return result; + }, + /** + * Add a file to the zip file, or search a file. + * @param {string|RegExp} name The name of the file to add (if data is defined), + * the name of the file to find (if no data) or a regex to match files. + * @param {String|ArrayBuffer|Uint8Array|Buffer} data The file data, either raw or base64 encoded + * @param {Object} o File options + * @return {JSZip|Object|Array} this JSZip object (when adding a file), + * a file (when searching by string) or an array of files (when searching by regex). + */ + file: function(name, data, o) { + if (arguments.length === 1) { + if (isRegExp(name)) { + var regexp = name; + return this.filter(function(relativePath, file2) { + return !file2.dir && regexp.test(relativePath); + }); + } else { + var obj2 = this.files[this.root + name]; + if (obj2 && !obj2.dir) { + return obj2; + } else { + return null; + } + } + } else { + name = this.root + name; + fileAdd.call(this, name, data, o); + } + return this; + }, + /** + * Add a directory to the zip file, or search. + * @param {String|RegExp} arg The name of the directory to add, or a regex to search folders. + * @return {JSZip} an object with the new directory as the root, or an array containing matching folders. + */ + folder: function(arg) { + if (!arg) { + return this; + } + if (isRegExp(arg)) { + return this.filter(function(relativePath, file2) { + return file2.dir && arg.test(relativePath); + }); + } + var name = this.root + arg; + var newFolder = folderAdd.call(this, name); + var ret2 = this.clone(); + ret2.root = newFolder.name; + return ret2; + }, + /** + * Delete a file, or a directory and all sub-files, from the zip + * @param {string} name the name of the file to delete + * @return {JSZip} this JSZip object + */ + remove: function(name) { + name = this.root + name; + var file2 = this.files[name]; + if (!file2) { + if (name.slice(-1) !== "/") { + name += "/"; + } + file2 = this.files[name]; + } + if (file2 && !file2.dir) { + delete this.files[name]; + } else { + var kids = this.filter(function(relativePath, file3) { + return file3.name.slice(0, name.length) === name; + }); + for (var i = 0; i < kids.length; i++) { + delete this.files[kids[i].name]; + } + } + return this; + }, + /** + * @deprecated This method has been removed in JSZip 3.0, please check the upgrade guide. + */ + generate: function() { + throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide."); + }, + /** + * Generate the complete zip file as an internal stream. + * @param {Object} options the options to generate the zip file : + * - compression, "STORE" by default. + * - type, "base64" by default. Values are : string, base64, uint8array, arraybuffer, blob. + * @return {StreamHelper} the streamed zip file. + */ + generateInternalStream: function(options) { + var worker, opts = {}; + try { + opts = utils.extend(options || {}, { + streamFiles: false, + compression: "STORE", + compressionOptions: null, + type: "", + platform: "DOS", + comment: null, + mimeType: "application/zip", + encodeFileName: utf8.utf8encode + }); + opts.type = opts.type.toLowerCase(); + opts.compression = opts.compression.toUpperCase(); + if (opts.type === "binarystring") { + opts.type = "string"; + } + if (!opts.type) { + throw new Error("No output type specified."); + } + utils.checkSupport(opts.type); + if (opts.platform === "darwin" || opts.platform === "freebsd" || opts.platform === "linux" || opts.platform === "sunos") { + opts.platform = "UNIX"; + } + if (opts.platform === "win32") { + opts.platform = "DOS"; + } + var comment = opts.comment || this.comment || ""; + worker = generate.generateWorker(this, opts, comment); + } catch (e) { + worker = new GenericWorker("error"); + worker.error(e); + } + return new StreamHelper(worker, opts.type || "string", opts.mimeType); + }, + /** + * Generate the complete zip file asynchronously. + * @see generateInternalStream + */ + generateAsync: function(options, onUpdate) { + return this.generateInternalStream(options).accumulate(onUpdate); + }, + /** + * Generate the complete zip file asynchronously. + * @see generateInternalStream + */ + generateNodeStream: function(options, onUpdate) { + options = options || {}; + if (!options.type) { + options.type = "nodebuffer"; + } + return this.generateInternalStream(options).toNodejsStream(onUpdate); + } + }; + module2.exports = out; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/reader/DataReader.js +var require_DataReader = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/reader/DataReader.js"(exports2, module2) { + "use strict"; + var utils = require_utils12(); + function DataReader(data) { + this.data = data; + this.length = data.length; + this.index = 0; + this.zero = 0; + } + DataReader.prototype = { + /** + * Check that the offset will not go too far. + * @param {string} offset the additional offset to check. + * @throws {Error} an Error if the offset is out of bounds. + */ + checkOffset: function(offset) { + this.checkIndex(this.index + offset); + }, + /** + * Check that the specified index will not be too far. + * @param {string} newIndex the index to check. + * @throws {Error} an Error if the index is out of bounds. + */ + checkIndex: function(newIndex) { + if (this.length < this.zero + newIndex || newIndex < 0) { + throw new Error("End of data reached (data length = " + this.length + ", asked index = " + newIndex + "). Corrupted zip ?"); + } + }, + /** + * Change the index. + * @param {number} newIndex The new index. + * @throws {Error} if the new index is out of the data. + */ + setIndex: function(newIndex) { + this.checkIndex(newIndex); + this.index = newIndex; + }, + /** + * Skip the next n bytes. + * @param {number} n the number of bytes to skip. + * @throws {Error} if the new index is out of the data. + */ + skip: function(n) { + this.setIndex(this.index + n); + }, + /** + * Get the byte at the specified index. + * @param {number} i the index to use. + * @return {number} a byte. + */ + byteAt: function() { + }, + /** + * Get the next number with a given byte size. + * @param {number} size the number of bytes to read. + * @return {number} the corresponding number. + */ + readInt: function(size) { + var result = 0, i; + this.checkOffset(size); + for (i = this.index + size - 1; i >= this.index; i--) { + result = (result << 8) + this.byteAt(i); + } + this.index += size; + return result; + }, + /** + * Get the next string with a given byte size. + * @param {number} size the number of bytes to read. + * @return {string} the corresponding string. + */ + readString: function(size) { + return utils.transformTo("string", this.readData(size)); + }, + /** + * Get raw data without conversion, bytes. + * @param {number} size the number of bytes to read. + * @return {Object} the raw data, implementation specific. + */ + readData: function() { + }, + /** + * Find the last occurrence of a zip signature (4 bytes). + * @param {string} sig the signature to find. + * @return {number} the index of the last occurrence, -1 if not found. + */ + lastIndexOfSignature: function() { + }, + /** + * Read the signature (4 bytes) at the current position and compare it with sig. + * @param {string} sig the expected signature + * @return {boolean} true if the signature matches, false otherwise. + */ + readAndCheckSignature: function() { + }, + /** + * Get the next date. + * @return {Date} the date. + */ + readDate: function() { + var dostime = this.readInt(4); + return new Date(Date.UTC( + (dostime >> 25 & 127) + 1980, + // year + (dostime >> 21 & 15) - 1, + // month + dostime >> 16 & 31, + // day + dostime >> 11 & 31, + // hour + dostime >> 5 & 63, + // minute + (dostime & 31) << 1 + )); + } + }; + module2.exports = DataReader; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/reader/ArrayReader.js +var require_ArrayReader = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/reader/ArrayReader.js"(exports2, module2) { + "use strict"; + var DataReader = require_DataReader(); + var utils = require_utils12(); + function ArrayReader(data) { + DataReader.call(this, data); + for (var i = 0; i < this.data.length; i++) { + data[i] = data[i] & 255; + } + } + utils.inherits(ArrayReader, DataReader); + ArrayReader.prototype.byteAt = function(i) { + return this.data[this.zero + i]; + }; + ArrayReader.prototype.lastIndexOfSignature = function(sig) { + var sig0 = sig.charCodeAt(0), sig1 = sig.charCodeAt(1), sig2 = sig.charCodeAt(2), sig3 = sig.charCodeAt(3); + for (var i = this.length - 4; i >= 0; --i) { + if (this.data[i] === sig0 && this.data[i + 1] === sig1 && this.data[i + 2] === sig2 && this.data[i + 3] === sig3) { + return i - this.zero; + } + } + return -1; + }; + ArrayReader.prototype.readAndCheckSignature = function(sig) { + var sig0 = sig.charCodeAt(0), sig1 = sig.charCodeAt(1), sig2 = sig.charCodeAt(2), sig3 = sig.charCodeAt(3), data = this.readData(4); + return sig0 === data[0] && sig1 === data[1] && sig2 === data[2] && sig3 === data[3]; + }; + ArrayReader.prototype.readData = function(size) { + this.checkOffset(size); + if (size === 0) { + return []; + } + var result = this.data.slice(this.zero + this.index, this.zero + this.index + size); + this.index += size; + return result; + }; + module2.exports = ArrayReader; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/reader/StringReader.js +var require_StringReader = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/reader/StringReader.js"(exports2, module2) { + "use strict"; + var DataReader = require_DataReader(); + var utils = require_utils12(); + function StringReader(data) { + DataReader.call(this, data); + } + utils.inherits(StringReader, DataReader); + StringReader.prototype.byteAt = function(i) { + return this.data.charCodeAt(this.zero + i); + }; + StringReader.prototype.lastIndexOfSignature = function(sig) { + return this.data.lastIndexOf(sig) - this.zero; + }; + StringReader.prototype.readAndCheckSignature = function(sig) { + var data = this.readData(4); + return sig === data; + }; + StringReader.prototype.readData = function(size) { + this.checkOffset(size); + var result = this.data.slice(this.zero + this.index, this.zero + this.index + size); + this.index += size; + return result; + }; + module2.exports = StringReader; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/reader/Uint8ArrayReader.js +var require_Uint8ArrayReader = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/reader/Uint8ArrayReader.js"(exports2, module2) { + "use strict"; + var ArrayReader = require_ArrayReader(); + var utils = require_utils12(); + function Uint8ArrayReader(data) { + ArrayReader.call(this, data); + } + utils.inherits(Uint8ArrayReader, ArrayReader); + Uint8ArrayReader.prototype.readData = function(size) { + this.checkOffset(size); + if (size === 0) { + return new Uint8Array(0); + } + var result = this.data.subarray(this.zero + this.index, this.zero + this.index + size); + this.index += size; + return result; + }; + module2.exports = Uint8ArrayReader; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/reader/NodeBufferReader.js +var require_NodeBufferReader = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/reader/NodeBufferReader.js"(exports2, module2) { + "use strict"; + var Uint8ArrayReader = require_Uint8ArrayReader(); + var utils = require_utils12(); + function NodeBufferReader(data) { + Uint8ArrayReader.call(this, data); + } + utils.inherits(NodeBufferReader, Uint8ArrayReader); + NodeBufferReader.prototype.readData = function(size) { + this.checkOffset(size); + var result = this.data.slice(this.zero + this.index, this.zero + this.index + size); + this.index += size; + return result; + }; + module2.exports = NodeBufferReader; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/reader/readerFor.js +var require_readerFor = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/reader/readerFor.js"(exports2, module2) { + "use strict"; + var utils = require_utils12(); + var support = require_support(); + var ArrayReader = require_ArrayReader(); + var StringReader = require_StringReader(); + var NodeBufferReader = require_NodeBufferReader(); + var Uint8ArrayReader = require_Uint8ArrayReader(); + module2.exports = function(data) { + var type = utils.getTypeOf(data); + utils.checkSupport(type); + if (type === "string" && !support.uint8array) { + return new StringReader(data); + } + if (type === "nodebuffer") { + return new NodeBufferReader(data); + } + if (support.uint8array) { + return new Uint8ArrayReader(utils.transformTo("uint8array", data)); + } + return new ArrayReader(utils.transformTo("array", data)); + }; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/zipEntry.js +var require_zipEntry = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/zipEntry.js"(exports2, module2) { + "use strict"; + var readerFor = require_readerFor(); + var utils = require_utils12(); + var CompressedObject = require_compressedObject(); + var crc32fn = require_crc32(); + var utf8 = require_utf8(); + var compressions = require_compressions(); + var support = require_support(); + var MADE_BY_DOS = 0; + var MADE_BY_UNIX = 3; + var findCompression = function(compressionMethod) { + for (var method in compressions) { + if (!Object.prototype.hasOwnProperty.call(compressions, method)) { + continue; + } + if (compressions[method].magic === compressionMethod) { + return compressions[method]; + } + } + return null; + }; + function ZipEntry(options, loadOptions) { + this.options = options; + this.loadOptions = loadOptions; + } + ZipEntry.prototype = { + /** + * say if the file is encrypted. + * @return {boolean} true if the file is encrypted, false otherwise. + */ + isEncrypted: function() { + return (this.bitFlag & 1) === 1; + }, + /** + * say if the file has utf-8 filename/comment. + * @return {boolean} true if the filename/comment is in utf-8, false otherwise. + */ + useUTF8: function() { + return (this.bitFlag & 2048) === 2048; + }, + /** + * Read the local part of a zip file and add the info in this object. + * @param {DataReader} reader the reader to use. + */ + readLocalPart: function(reader) { + var compression, localExtraFieldsLength; + reader.skip(22); + this.fileNameLength = reader.readInt(2); + localExtraFieldsLength = reader.readInt(2); + this.fileName = reader.readData(this.fileNameLength); + reader.skip(localExtraFieldsLength); + if (this.compressedSize === -1 || this.uncompressedSize === -1) { + throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)"); + } + compression = findCompression(this.compressionMethod); + if (compression === null) { + throw new Error("Corrupted zip : compression " + utils.pretty(this.compressionMethod) + " unknown (inner file : " + utils.transformTo("string", this.fileName) + ")"); + } + this.decompressed = new CompressedObject(this.compressedSize, this.uncompressedSize, this.crc32, compression, reader.readData(this.compressedSize)); + }, + /** + * Read the central part of a zip file and add the info in this object. + * @param {DataReader} reader the reader to use. + */ + readCentralPart: function(reader) { + this.versionMadeBy = reader.readInt(2); + reader.skip(2); + this.bitFlag = reader.readInt(2); + this.compressionMethod = reader.readString(2); + this.date = reader.readDate(); + this.crc32 = reader.readInt(4); + this.compressedSize = reader.readInt(4); + this.uncompressedSize = reader.readInt(4); + var fileNameLength = reader.readInt(2); + this.extraFieldsLength = reader.readInt(2); + this.fileCommentLength = reader.readInt(2); + this.diskNumberStart = reader.readInt(2); + this.internalFileAttributes = reader.readInt(2); + this.externalFileAttributes = reader.readInt(4); + this.localHeaderOffset = reader.readInt(4); + if (this.isEncrypted()) { + throw new Error("Encrypted zip are not supported"); + } + reader.skip(fileNameLength); + this.readExtraFields(reader); + this.parseZIP64ExtraField(reader); + this.fileComment = reader.readData(this.fileCommentLength); + }, + /** + * Parse the external file attributes and get the unix/dos permissions. + */ + processAttributes: function() { + this.unixPermissions = null; + this.dosPermissions = null; + var madeBy = this.versionMadeBy >> 8; + this.dir = this.externalFileAttributes & 16 ? true : false; + if (madeBy === MADE_BY_DOS) { + this.dosPermissions = this.externalFileAttributes & 63; + } + if (madeBy === MADE_BY_UNIX) { + this.unixPermissions = this.externalFileAttributes >> 16 & 65535; + } + if (!this.dir && this.fileNameStr.slice(-1) === "/") { + this.dir = true; + } + }, + /** + * Parse the ZIP64 extra field and merge the info in the current ZipEntry. + * @param {DataReader} reader the reader to use. + */ + parseZIP64ExtraField: function() { + if (!this.extraFields[1]) { + return; + } + var extraReader = readerFor(this.extraFields[1].value); + if (this.uncompressedSize === utils.MAX_VALUE_32BITS) { + this.uncompressedSize = extraReader.readInt(8); + } + if (this.compressedSize === utils.MAX_VALUE_32BITS) { + this.compressedSize = extraReader.readInt(8); + } + if (this.localHeaderOffset === utils.MAX_VALUE_32BITS) { + this.localHeaderOffset = extraReader.readInt(8); + } + if (this.diskNumberStart === utils.MAX_VALUE_32BITS) { + this.diskNumberStart = extraReader.readInt(4); + } + }, + /** + * Read the central part of a zip file and add the info in this object. + * @param {DataReader} reader the reader to use. + */ + readExtraFields: function(reader) { + var end = reader.index + this.extraFieldsLength, extraFieldId, extraFieldLength, extraFieldValue; + if (!this.extraFields) { + this.extraFields = {}; + } + while (reader.index + 4 < end) { + extraFieldId = reader.readInt(2); + extraFieldLength = reader.readInt(2); + extraFieldValue = reader.readData(extraFieldLength); + this.extraFields[extraFieldId] = { + id: extraFieldId, + length: extraFieldLength, + value: extraFieldValue + }; + } + reader.setIndex(end); + }, + /** + * Apply an UTF8 transformation if needed. + */ + handleUTF8: function() { + var decodeParamType = support.uint8array ? "uint8array" : "array"; + if (this.useUTF8()) { + this.fileNameStr = utf8.utf8decode(this.fileName); + this.fileCommentStr = utf8.utf8decode(this.fileComment); + } else { + var upath = this.findExtraFieldUnicodePath(); + if (upath !== null) { + this.fileNameStr = upath; + } else { + var fileNameByteArray = utils.transformTo(decodeParamType, this.fileName); + this.fileNameStr = this.loadOptions.decodeFileName(fileNameByteArray); + } + var ucomment = this.findExtraFieldUnicodeComment(); + if (ucomment !== null) { + this.fileCommentStr = ucomment; + } else { + var commentByteArray = utils.transformTo(decodeParamType, this.fileComment); + this.fileCommentStr = this.loadOptions.decodeFileName(commentByteArray); + } + } + }, + /** + * Find the unicode path declared in the extra field, if any. + * @return {String} the unicode path, null otherwise. + */ + findExtraFieldUnicodePath: function() { + var upathField = this.extraFields[28789]; + if (upathField) { + var extraReader = readerFor(upathField.value); + if (extraReader.readInt(1) !== 1) { + return null; + } + if (crc32fn(this.fileName) !== extraReader.readInt(4)) { + return null; + } + return utf8.utf8decode(extraReader.readData(upathField.length - 5)); + } + return null; + }, + /** + * Find the unicode comment declared in the extra field, if any. + * @return {String} the unicode comment, null otherwise. + */ + findExtraFieldUnicodeComment: function() { + var ucommentField = this.extraFields[25461]; + if (ucommentField) { + var extraReader = readerFor(ucommentField.value); + if (extraReader.readInt(1) !== 1) { + return null; + } + if (crc32fn(this.fileComment) !== extraReader.readInt(4)) { + return null; + } + return utf8.utf8decode(extraReader.readData(ucommentField.length - 5)); + } + return null; + } + }; + module2.exports = ZipEntry; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/zipEntries.js +var require_zipEntries = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/zipEntries.js"(exports2, module2) { + "use strict"; + var readerFor = require_readerFor(); + var utils = require_utils12(); + var sig = require_signature(); + var ZipEntry = require_zipEntry(); + var support = require_support(); + function ZipEntries(loadOptions) { + this.files = []; + this.loadOptions = loadOptions; + } + ZipEntries.prototype = { + /** + * Check that the reader is on the specified signature. + * @param {string} expectedSignature the expected signature. + * @throws {Error} if it is an other signature. + */ + checkSignature: function(expectedSignature) { + if (!this.reader.readAndCheckSignature(expectedSignature)) { + this.reader.index -= 4; + var signature = this.reader.readString(4); + throw new Error("Corrupted zip or bug: unexpected signature (" + utils.pretty(signature) + ", expected " + utils.pretty(expectedSignature) + ")"); + } + }, + /** + * Check if the given signature is at the given index. + * @param {number} askedIndex the index to check. + * @param {string} expectedSignature the signature to expect. + * @return {boolean} true if the signature is here, false otherwise. + */ + isSignature: function(askedIndex, expectedSignature) { + var currentIndex = this.reader.index; + this.reader.setIndex(askedIndex); + var signature = this.reader.readString(4); + var result = signature === expectedSignature; + this.reader.setIndex(currentIndex); + return result; + }, + /** + * Read the end of the central directory. + */ + readBlockEndOfCentral: function() { + this.diskNumber = this.reader.readInt(2); + this.diskWithCentralDirStart = this.reader.readInt(2); + this.centralDirRecordsOnThisDisk = this.reader.readInt(2); + this.centralDirRecords = this.reader.readInt(2); + this.centralDirSize = this.reader.readInt(4); + this.centralDirOffset = this.reader.readInt(4); + this.zipCommentLength = this.reader.readInt(2); + var zipComment = this.reader.readData(this.zipCommentLength); + var decodeParamType = support.uint8array ? "uint8array" : "array"; + var decodeContent = utils.transformTo(decodeParamType, zipComment); + this.zipComment = this.loadOptions.decodeFileName(decodeContent); + }, + /** + * Read the end of the Zip 64 central directory. + * Not merged with the method readEndOfCentral : + * The end of central can coexist with its Zip64 brother, + * I don't want to read the wrong number of bytes ! + */ + readBlockZip64EndOfCentral: function() { + this.zip64EndOfCentralSize = this.reader.readInt(8); + this.reader.skip(4); + this.diskNumber = this.reader.readInt(4); + this.diskWithCentralDirStart = this.reader.readInt(4); + this.centralDirRecordsOnThisDisk = this.reader.readInt(8); + this.centralDirRecords = this.reader.readInt(8); + this.centralDirSize = this.reader.readInt(8); + this.centralDirOffset = this.reader.readInt(8); + this.zip64ExtensibleData = {}; + var extraDataSize = this.zip64EndOfCentralSize - 44, index = 0, extraFieldId, extraFieldLength, extraFieldValue; + while (index < extraDataSize) { + extraFieldId = this.reader.readInt(2); + extraFieldLength = this.reader.readInt(4); + extraFieldValue = this.reader.readData(extraFieldLength); + this.zip64ExtensibleData[extraFieldId] = { + id: extraFieldId, + length: extraFieldLength, + value: extraFieldValue + }; + } + }, + /** + * Read the end of the Zip 64 central directory locator. + */ + readBlockZip64EndOfCentralLocator: function() { + this.diskWithZip64CentralDirStart = this.reader.readInt(4); + this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8); + this.disksCount = this.reader.readInt(4); + if (this.disksCount > 1) { + throw new Error("Multi-volumes zip are not supported"); + } + }, + /** + * Read the local files, based on the offset read in the central part. + */ + readLocalFiles: function() { + var i, file2; + for (i = 0; i < this.files.length; i++) { + file2 = this.files[i]; + this.reader.setIndex(file2.localHeaderOffset); + this.checkSignature(sig.LOCAL_FILE_HEADER); + file2.readLocalPart(this.reader); + file2.handleUTF8(); + file2.processAttributes(); + } + }, + /** + * Read the central directory. + */ + readCentralDir: function() { + var file2; + this.reader.setIndex(this.centralDirOffset); + while (this.reader.readAndCheckSignature(sig.CENTRAL_FILE_HEADER)) { + file2 = new ZipEntry({ + zip64: this.zip64 + }, this.loadOptions); + file2.readCentralPart(this.reader); + this.files.push(file2); + } + if (this.centralDirRecords !== this.files.length) { + if (this.centralDirRecords !== 0 && this.files.length === 0) { + throw new Error("Corrupted zip or bug: expected " + this.centralDirRecords + " records in central dir, got " + this.files.length); + } else { + } + } + }, + /** + * Read the end of central directory. + */ + readEndOfCentral: function() { + var offset = this.reader.lastIndexOfSignature(sig.CENTRAL_DIRECTORY_END); + if (offset < 0) { + var isGarbage = !this.isSignature(0, sig.LOCAL_FILE_HEADER); + if (isGarbage) { + throw new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html"); + } else { + throw new Error("Corrupted zip: can't find end of central directory"); + } + } + this.reader.setIndex(offset); + var endOfCentralDirOffset = offset; + this.checkSignature(sig.CENTRAL_DIRECTORY_END); + this.readBlockEndOfCentral(); + if (this.diskNumber === utils.MAX_VALUE_16BITS || this.diskWithCentralDirStart === utils.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === utils.MAX_VALUE_16BITS || this.centralDirRecords === utils.MAX_VALUE_16BITS || this.centralDirSize === utils.MAX_VALUE_32BITS || this.centralDirOffset === utils.MAX_VALUE_32BITS) { + this.zip64 = true; + offset = this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR); + if (offset < 0) { + throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator"); + } + this.reader.setIndex(offset); + this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR); + this.readBlockZip64EndOfCentralLocator(); + if (!this.isSignature(this.relativeOffsetEndOfZip64CentralDir, sig.ZIP64_CENTRAL_DIRECTORY_END)) { + this.relativeOffsetEndOfZip64CentralDir = this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_END); + if (this.relativeOffsetEndOfZip64CentralDir < 0) { + throw new Error("Corrupted zip: can't find the ZIP64 end of central directory"); + } + } + this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir); + this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_END); + this.readBlockZip64EndOfCentral(); + } + var expectedEndOfCentralDirOffset = this.centralDirOffset + this.centralDirSize; + if (this.zip64) { + expectedEndOfCentralDirOffset += 20; + expectedEndOfCentralDirOffset += 12 + this.zip64EndOfCentralSize; + } + var extraBytes = endOfCentralDirOffset - expectedEndOfCentralDirOffset; + if (extraBytes > 0) { + if (this.isSignature(endOfCentralDirOffset, sig.CENTRAL_FILE_HEADER)) { + } else { + this.reader.zero = extraBytes; + } + } else if (extraBytes < 0) { + throw new Error("Corrupted zip: missing " + Math.abs(extraBytes) + " bytes."); + } + }, + prepareReader: function(data) { + this.reader = readerFor(data); + }, + /** + * Read a zip file and create ZipEntries. + * @param {String|ArrayBuffer|Uint8Array|Buffer} data the binary string representing a zip file. + */ + load: function(data) { + this.prepareReader(data); + this.readEndOfCentral(); + this.readCentralDir(); + this.readLocalFiles(); + } + }; + module2.exports = ZipEntries; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/load.js +var require_load = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/load.js"(exports2, module2) { + "use strict"; + var utils = require_utils12(); + var external = require_external(); + var utf8 = require_utf8(); + var ZipEntries = require_zipEntries(); + var Crc32Probe = require_Crc32Probe(); + var nodejsUtils = require_nodejsUtils(); + function checkEntryCRC32(zipEntry) { + return new external.Promise(function(resolve, reject) { + var worker = zipEntry.decompressed.getContentWorker().pipe(new Crc32Probe()); + worker.on("error", function(e) { + reject(e); + }).on("end", function() { + if (worker.streamInfo.crc32 !== zipEntry.decompressed.crc32) { + reject(new Error("Corrupted zip : CRC32 mismatch")); + } else { + resolve(); + } + }).resume(); + }); + } + module2.exports = function(data, options) { + var zip = this; + options = utils.extend(options || {}, { + base64: false, + checkCRC32: false, + optimizedBinaryString: false, + createFolders: false, + decodeFileName: utf8.utf8decode + }); + if (nodejsUtils.isNode && nodejsUtils.isStream(data)) { + return external.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")); + } + return utils.prepareContent("the loaded zip file", data, true, options.optimizedBinaryString, options.base64).then(function(data2) { + var zipEntries = new ZipEntries(options); + zipEntries.load(data2); + return zipEntries; + }).then(function checkCRC32(zipEntries) { + var promises = [external.Promise.resolve(zipEntries)]; + var files = zipEntries.files; + if (options.checkCRC32) { + for (var i = 0; i < files.length; i++) { + promises.push(checkEntryCRC32(files[i])); + } + } + return external.Promise.all(promises); + }).then(function addFiles(results) { + var zipEntries = results.shift(); + var files = zipEntries.files; + for (var i = 0; i < files.length; i++) { + var input = files[i]; + var unsafeName = input.fileNameStr; + var safeName = utils.resolve(input.fileNameStr); + zip.file(safeName, input.decompressed, { + binary: true, + optimizedBinaryString: true, + date: input.date, + dir: input.dir, + comment: input.fileCommentStr.length ? input.fileCommentStr : null, + unixPermissions: input.unixPermissions, + dosPermissions: input.dosPermissions, + createFolders: options.createFolders + }); + if (!input.dir) { + zip.file(safeName).unsafeOriginalName = unsafeName; + } + } + if (zipEntries.zipComment.length) { + zip.comment = zipEntries.zipComment; + } + return zip; + }); + }; + } +}); + +// ../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/index.js +var require_lib11 = __commonJS({ + "../../node_modules/.pnpm/jszip@3.10.2/node_modules/jszip/lib/index.js"(exports2, module2) { + "use strict"; + function JSZip() { + if (!(this instanceof JSZip)) { + return new JSZip(); + } + if (arguments.length) { + throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide."); + } + this.files = /* @__PURE__ */ Object.create(null); + this.comment = null; + this.root = ""; + this.clone = function() { + var newObj = new JSZip(); + for (var i in this) { + if (typeof this[i] !== "function") { + newObj[i] = this[i]; + } + } + return newObj; + }; + } + JSZip.prototype = require_object(); + JSZip.prototype.loadAsync = require_load(); + JSZip.support = require_support(); + JSZip.defaults = require_defaults(); + JSZip.version = "3.10.2"; + JSZip.loadAsync = function(content, options) { + return new JSZip().loadAsync(content, options); + }; + JSZip.external = require_external(); + module2.exports = JSZip; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/utils.js +var require_utils13 = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/utils.js"(exports2, module2) { + var fs = require("fs"); + var inherits2 = function(cls, superCtor, statics, prototype) { + cls.super_ = superCtor; + if (!prototype) { + prototype = statics; + statics = null; + } + if (statics) { + Object.keys(statics).forEach((i) => { + Object.defineProperty(cls, i, Object.getOwnPropertyDescriptor(statics, i)); + }); + } + const properties = { + constructor: { + value: cls, + enumerable: false, + writable: false, + configurable: true + } + }; + if (prototype) { + Object.keys(prototype).forEach((i) => { + properties[i] = Object.getOwnPropertyDescriptor(prototype, i); + }); + } + cls.prototype = Object.create(superCtor.prototype, properties); + }; + var xmlDecodeRegex = /[<>&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/; + var utils = { + nop() { + }, + promiseImmediate(value) { + return new Promise((resolve) => { + if (global.setImmediate) { + setImmediate(() => { + resolve(value); + }); + } else { + setTimeout(() => { + resolve(value); + }, 1); + } + }); + }, + inherits: inherits2, + dateToExcel(d, date1904) { + return 25569 + d.getTime() / (24 * 3600 * 1e3) - (date1904 ? 1462 : 0); + }, + excelToDate(v, date1904) { + const millisecondSinceEpoch = Math.round((v - 25569 + (date1904 ? 1462 : 0)) * 24 * 3600 * 1e3); + return new Date(millisecondSinceEpoch); + }, + parsePath(filepath) { + const last = filepath.lastIndexOf("/"); + return { + path: filepath.substring(0, last), + name: filepath.substring(last + 1) + }; + }, + getRelsPath(filepath) { + const path = utils.parsePath(filepath); + return `${path.path}/_rels/${path.name}.rels`; + }, + xmlEncode(text) { + const regexResult = xmlDecodeRegex.exec(text); + if (!regexResult) return text; + let result = ""; + let escape2 = ""; + let lastIndex = 0; + let i = regexResult.index; + for (; i < text.length; i++) { + const charCode = text.charCodeAt(i); + switch (charCode) { + case 34: + escape2 = """; + break; + case 38: + escape2 = "&"; + break; + case 39: + escape2 = "'"; + break; + case 60: + escape2 = "<"; + break; + case 62: + escape2 = ">"; + break; + case 127: + escape2 = ""; + break; + default: { + if (charCode <= 31 && (charCode <= 8 || charCode >= 11 && charCode !== 13)) { + escape2 = ""; + break; + } + continue; + } + } + if (lastIndex !== i) result += text.substring(lastIndex, i); + lastIndex = i + 1; + if (escape2) result += escape2; + } + if (lastIndex !== i) return result + text.substring(lastIndex, i); + return result; + }, + xmlDecode(text) { + return text.replace(/&([a-z]*);/g, (c) => { + switch (c) { + case "<": + return "<"; + case ">": + return ">"; + case "&": + return "&"; + case "'": + return "'"; + case """: + return '"'; + default: + return c; + } + }); + }, + validInt(value) { + const i = parseInt(value, 10); + return !Number.isNaN(i) ? i : 0; + }, + isDateFmt(fmt) { + if (!fmt) { + return false; + } + fmt = fmt.replace(/\[[^\]]*]/g, ""); + fmt = fmt.replace(/"[^"]*"/g, ""); + const result = fmt.match(/[ymdhMsb]+/) !== null; + return result; + }, + fs: { + exists(path) { + return new Promise((resolve) => { + fs.access(path, fs.constants.F_OK, (err) => { + resolve(!err); + }); + }); + } + }, + toIsoDateString(dt) { + return dt.toIsoString().subsstr(0, 10); + }, + parseBoolean(value) { + return value === true || value === "true" || value === 1 || value === "1"; + } + }; + module2.exports = utils; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/string-buf.js +var require_string_buf = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/string-buf.js"(exports2, module2) { + var StringBuf = class { + constructor(options) { + this._buf = Buffer.alloc(options && options.size || 16384); + this._encoding = options && options.encoding || "utf8"; + this._inPos = 0; + this._buffer = void 0; + } + get length() { + return this._inPos; + } + get capacity() { + return this._buf.length; + } + get buffer() { + return this._buf; + } + toBuffer() { + if (!this._buffer) { + this._buffer = Buffer.alloc(this.length); + this._buf.copy(this._buffer, 0, 0, this.length); + } + return this._buffer; + } + reset(position) { + position = position || 0; + this._buffer = void 0; + this._inPos = position; + } + _grow(min) { + let size = this._buf.length * 2; + while (size < min) { + size *= 2; + } + const buf = Buffer.alloc(size); + this._buf.copy(buf, 0); + this._buf = buf; + } + addText(text) { + this._buffer = void 0; + let inPos = this._inPos + this._buf.write(text, this._inPos, this._encoding); + while (inPos >= this._buf.length - 4) { + this._grow(this._inPos + text.length); + inPos = this._inPos + this._buf.write(text, this._inPos, this._encoding); + } + this._inPos = inPos; + } + addStringBuf(inBuf) { + if (inBuf.length) { + this._buffer = void 0; + if (this.length + inBuf.length > this.capacity) { + this._grow(this.length + inBuf.length); + } + inBuf._buf.copy(this._buf, this._inPos, 0, inBuf.length); + this._inPos += inBuf.length; + } + } + }; + module2.exports = StringBuf; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/stream-buf.js +var require_stream_buf = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/stream-buf.js"(exports2, module2) { + var Stream = require_readable(); + var utils = require_utils13(); + var StringBuf = require_string_buf(); + var StringChunk = class { + constructor(data, encoding) { + this._data = data; + this._encoding = encoding; + } + get length() { + return this.toBuffer().length; + } + // copy to target buffer + copy(target, targetOffset, offset, length) { + return this.toBuffer().copy(target, targetOffset, offset, length); + } + toBuffer() { + if (!this._buffer) { + this._buffer = Buffer.from(this._data, this._encoding); + } + return this._buffer; + } + }; + var StringBufChunk = class { + constructor(data) { + this._data = data; + } + get length() { + return this._data.length; + } + // copy to target buffer + copy(target, targetOffset, offset, length) { + return this._data._buf.copy(target, targetOffset, offset, length); + } + toBuffer() { + return this._data.toBuffer(); + } + }; + var BufferChunk = class { + constructor(data) { + this._data = data; + } + get length() { + return this._data.length; + } + // copy to target buffer + copy(target, targetOffset, offset, length) { + this._data.copy(target, targetOffset, offset, length); + } + toBuffer() { + return this._data; + } + }; + var ReadWriteBuf = class { + constructor(size) { + this.size = size; + this.buffer = Buffer.alloc(size); + this.iRead = 0; + this.iWrite = 0; + } + toBuffer() { + if (this.iRead === 0 && this.iWrite === this.size) { + return this.buffer; + } + const buf = Buffer.alloc(this.iWrite - this.iRead); + this.buffer.copy(buf, 0, this.iRead, this.iWrite); + return buf; + } + get length() { + return this.iWrite - this.iRead; + } + get eod() { + return this.iRead === this.iWrite; + } + get full() { + return this.iWrite === this.size; + } + read(size) { + let buf; + if (size === 0) { + return null; + } + if (size === void 0 || size >= this.length) { + buf = this.toBuffer(); + this.iRead = this.iWrite; + return buf; + } + buf = Buffer.alloc(size); + this.buffer.copy(buf, 0, this.iRead, size); + this.iRead += size; + return buf; + } + write(chunk, offset, length) { + const size = Math.min(length, this.size - this.iWrite); + chunk.copy(this.buffer, this.iWrite, offset, offset + size); + this.iWrite += size; + return size; + } + }; + var StreamBuf = function(options) { + options = options || {}; + this.bufSize = options.bufSize || 1024 * 1024; + this.buffers = []; + this.batch = options.batch || false; + this.corked = false; + this.inPos = 0; + this.outPos = 0; + this.pipes = []; + this.paused = false; + this.encoding = null; + }; + utils.inherits(StreamBuf, Stream.Duplex, { + toBuffer() { + switch (this.buffers.length) { + case 0: + return null; + case 1: + return this.buffers[0].toBuffer(); + default: + return Buffer.concat(this.buffers.map((rwBuf) => rwBuf.toBuffer())); + } + }, + // writable + // event drain - if write returns false (which it won't), indicates when safe to write again. + // finish - end() has been called + // pipe(src) - pipe() has been called on readable + // unpipe(src) - unpipe() has been called on readable + // error - duh + _getWritableBuffer() { + if (this.buffers.length) { + const last = this.buffers[this.buffers.length - 1]; + if (!last.full) { + return last; + } + } + const buf = new ReadWriteBuf(this.bufSize); + this.buffers.push(buf); + return buf; + }, + async _pipe(chunk) { + const write = function(pipe) { + return new Promise((resolve) => { + pipe.write(chunk.toBuffer(), () => { + resolve(); + }); + }); + }; + await Promise.all(this.pipes.map(write)); + }, + _writeToBuffers(chunk) { + let inPos = 0; + const inLen = chunk.length; + while (inPos < inLen) { + const buffer = this._getWritableBuffer(); + inPos += buffer.write(chunk, inPos, inLen - inPos); + } + }, + async write(data, encoding, callback) { + if (encoding instanceof Function) { + callback = encoding; + encoding = "utf8"; + } + callback = callback || utils.nop; + let chunk; + if (data instanceof StringBuf) { + chunk = new StringBufChunk(data); + } else if (data instanceof Buffer) { + chunk = new BufferChunk(data); + } else if (typeof data === "string" || data instanceof String || data instanceof ArrayBuffer) { + chunk = new StringChunk(data, encoding); + } else { + throw new Error("Chunk must be one of type String, Buffer or StringBuf."); + } + if (this.pipes.length) { + if (this.batch) { + this._writeToBuffers(chunk); + while (!this.corked && this.buffers.length > 1) { + this._pipe(this.buffers.shift()); + } + } else if (!this.corked) { + await this._pipe(chunk); + callback(); + } else { + this._writeToBuffers(chunk); + process.nextTick(callback); + } + } else { + if (!this.paused) { + this.emit("data", chunk.toBuffer()); + } + this._writeToBuffers(chunk); + this.emit("readable"); + } + return true; + }, + cork() { + this.corked = true; + }, + _flush() { + if (this.pipes.length) { + while (this.buffers.length) { + this._pipe(this.buffers.shift()); + } + } + }, + uncork() { + this.corked = false; + this._flush(); + }, + end(chunk, encoding, callback) { + const writeComplete = (error) => { + if (error) { + callback(error); + } else { + this._flush(); + this.pipes.forEach((pipe) => { + pipe.end(); + }); + this.emit("finish"); + } + }; + if (chunk) { + this.write(chunk, encoding, writeComplete); + } else { + writeComplete(); + } + }, + // readable + // event readable - some data is now available + // event data - switch to flowing mode - feeds chunks to handler + // event end - no more data + // event close - optional, indicates upstream close + // event error - duh + read(size) { + let buffers; + if (size) { + buffers = []; + while (size && this.buffers.length && !this.buffers[0].eod) { + const first = this.buffers[0]; + const buffer = first.read(size); + size -= buffer.length; + buffers.push(buffer); + if (first.eod && first.full) { + this.buffers.shift(); + } + } + return Buffer.concat(buffers); + } + buffers = this.buffers.map((buf) => buf.toBuffer()).filter(Boolean); + this.buffers = []; + return Buffer.concat(buffers); + }, + setEncoding(encoding) { + this.encoding = encoding; + }, + pause() { + this.paused = true; + }, + resume() { + this.paused = false; + }, + isPaused() { + return !!this.paused; + }, + pipe(destination) { + this.pipes.push(destination); + if (!this.paused && this.buffers.length) { + this.end(); + } + }, + unpipe(destination) { + this.pipes = this.pipes.filter((pipe) => pipe !== destination); + }, + unshift() { + throw new Error("Not Implemented"); + }, + wrap() { + throw new Error("Not Implemented"); + } + }); + module2.exports = StreamBuf; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/browser-buffer-encode.js +var require_browser_buffer_encode = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/browser-buffer-encode.js"(exports2) { + var textEncoder = typeof TextEncoder === "undefined" ? null : new TextEncoder("utf-8"); + var { Buffer: Buffer2 } = require("buffer"); + function stringToBuffer(str) { + if (typeof str !== "string") { + return str; + } + if (textEncoder) { + return Buffer2.from(textEncoder.encode(str).buffer); + } + return Buffer2.from(str); + } + exports2.stringToBuffer = stringToBuffer; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/zip-stream.js +var require_zip_stream = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/zip-stream.js"(exports2, module2) { + var events = require("events"); + var JSZip = require_lib11(); + var StreamBuf = require_stream_buf(); + var { stringToBuffer } = require_browser_buffer_encode(); + var ZipWriter = class extends events.EventEmitter { + constructor(options) { + super(); + this.options = Object.assign( + { + type: "nodebuffer", + compression: "DEFLATE" + }, + options + ); + this.zip = new JSZip(); + this.stream = new StreamBuf(); + } + append(data, options) { + if (options.hasOwnProperty("base64") && options.base64) { + this.zip.file(options.name, data, { base64: true }); + } else { + if (process.browser && typeof data === "string") { + data = stringToBuffer(data); + } + this.zip.file(options.name, data); + } + } + async finalize() { + const content = await this.zip.generateAsync(this.options); + this.stream.end(content); + this.emit("finish"); + } + // ========================================================================== + // Stream.Readable interface + read(size) { + return this.stream.read(size); + } + setEncoding(encoding) { + return this.stream.setEncoding(encoding); + } + pause() { + return this.stream.pause(); + } + resume() { + return this.stream.resume(); + } + isPaused() { + return this.stream.isPaused(); + } + pipe(destination, options) { + return this.stream.pipe(destination, options); + } + unpipe(destination) { + return this.stream.unpipe(destination); + } + unshift(chunk) { + return this.stream.unshift(chunk); + } + wrap(stream) { + return this.stream.wrap(stream); + } + }; + module2.exports = { + ZipWriter + }; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/xml-stream.js +var require_xml_stream = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/xml-stream.js"(exports2, module2) { + var _2 = require_under_dash(); + var utils = require_utils13(); + var OPEN_ANGLE = "<"; + var CLOSE_ANGLE = ">"; + var OPEN_ANGLE_SLASH = ""; + function pushAttribute(xml, name, value) { + xml.push(` ${name}="${utils.xmlEncode(value.toString())}"`); + } + function pushAttributes(xml, attributes) { + if (attributes) { + const tmp = []; + _2.each(attributes, (value, name) => { + if (value !== void 0) { + pushAttribute(tmp, name, value); + } + }); + xml.push(tmp.join("")); + } + } + var XmlStream = class { + constructor() { + this._xml = []; + this._stack = []; + this._rollbacks = []; + } + get tos() { + return this._stack.length ? this._stack[this._stack.length - 1] : void 0; + } + get cursor() { + return this._xml.length; + } + openXml(docAttributes) { + const xml = this._xml; + xml.push("\n"); + } + openNode(name, attributes) { + const parent = this.tos; + const xml = this._xml; + if (parent && this.open) { + xml.push(CLOSE_ANGLE); + } + this._stack.push(name); + xml.push(OPEN_ANGLE); + xml.push(name); + pushAttributes(xml, attributes); + this.leaf = true; + this.open = true; + } + addAttribute(name, value) { + if (!this.open) { + throw new Error("Cannot write attributes to node if it is not open"); + } + if (value !== void 0) { + pushAttribute(this._xml, name, value); + } + } + addAttributes(attrs) { + if (!this.open) { + throw new Error("Cannot write attributes to node if it is not open"); + } + pushAttributes(this._xml, attrs); + } + writeText(text) { + const xml = this._xml; + if (this.open) { + xml.push(CLOSE_ANGLE); + this.open = false; + } + this.leaf = false; + xml.push(utils.xmlEncode(text.toString())); + } + writeXml(xml) { + if (this.open) { + this._xml.push(CLOSE_ANGLE); + this.open = false; + } + this.leaf = false; + this._xml.push(xml); + } + closeNode() { + const node = this._stack.pop(); + const xml = this._xml; + if (this.leaf) { + xml.push(CLOSE_SLASH_ANGLE); + } else { + xml.push(OPEN_ANGLE_SLASH); + xml.push(node); + xml.push(CLOSE_ANGLE); + } + this.open = false; + this.leaf = false; + } + leafNode(name, attributes, text) { + this.openNode(name, attributes); + if (text !== void 0) { + this.writeText(text); + } + this.closeNode(); + } + closeAll() { + while (this._stack.length) { + this.closeNode(); + } + } + addRollback() { + this._rollbacks.push({ + xml: this._xml.length, + stack: this._stack.length, + leaf: this.leaf, + open: this.open + }); + return this.cursor; + } + commit() { + this._rollbacks.pop(); + } + rollback() { + const r = this._rollbacks.pop(); + if (this._xml.length > r.xml) { + this._xml.splice(r.xml, this._xml.length - r.xml); + } + if (this._stack.length > r.stack) { + this._stack.splice(r.stack, this._stack.length - r.stack); + } + this.leaf = r.leaf; + this.open = r.open; + } + get xml() { + this.closeAll(); + return this._xml.join(""); + } + }; + XmlStream.StdDocAttributes = { + version: "1.0", + encoding: "UTF-8", + standalone: "yes" + }; + module2.exports = XmlStream; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/browser-buffer-decode.js +var require_browser_buffer_decode = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/browser-buffer-decode.js"(exports2) { + var textDecoder = typeof TextDecoder === "undefined" ? null : new TextDecoder("utf-8"); + function bufferToString(chunk) { + if (typeof chunk === "string") { + return chunk; + } + if (textDecoder) { + return textDecoder.decode(chunk); + } + return chunk.toString(); + } + exports2.bufferToString = bufferToString; + } +}); + +// ../../node_modules/.pnpm/xmlchars@2.2.0/node_modules/xmlchars/xml/1.0/ed5.js +var require_ed5 = __commonJS({ + "../../node_modules/.pnpm/xmlchars@2.2.0/node_modules/xmlchars/xml/1.0/ed5.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CHAR = " \n\r -\uD7FF\uE000-\uFFFD\u{10000}-\u{10FFFF}"; + exports2.S = " \r\n"; + exports2.NAME_START_CHAR = ":A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}"; + exports2.NAME_CHAR = "-" + exports2.NAME_START_CHAR + ".0-9\xB7\u0300-\u036F\u203F-\u2040"; + exports2.CHAR_RE = new RegExp("^[" + exports2.CHAR + "]$", "u"); + exports2.S_RE = new RegExp("^[" + exports2.S + "]+$", "u"); + exports2.NAME_START_CHAR_RE = new RegExp("^[" + exports2.NAME_START_CHAR + "]$", "u"); + exports2.NAME_CHAR_RE = new RegExp("^[" + exports2.NAME_CHAR + "]$", "u"); + exports2.NAME_RE = new RegExp("^[" + exports2.NAME_START_CHAR + "][" + exports2.NAME_CHAR + "]*$", "u"); + exports2.NMTOKEN_RE = new RegExp("^[" + exports2.NAME_CHAR + "]+$", "u"); + var TAB = 9; + var NL = 10; + var CR = 13; + var SPACE = 32; + exports2.S_LIST = [SPACE, NL, CR, TAB]; + function isChar(c) { + return c >= SPACE && c <= 55295 || c === NL || c === CR || c === TAB || c >= 57344 && c <= 65533 || c >= 65536 && c <= 1114111; + } + exports2.isChar = isChar; + function isS(c) { + return c === SPACE || c === NL || c === CR || c === TAB; + } + exports2.isS = isS; + function isNameStartChar(c) { + return c >= 65 && c <= 90 || c >= 97 && c <= 122 || c === 58 || c === 95 || c === 8204 || c === 8205 || c >= 192 && c <= 214 || c >= 216 && c <= 246 || c >= 248 && c <= 767 || c >= 880 && c <= 893 || c >= 895 && c <= 8191 || c >= 8304 && c <= 8591 || c >= 11264 && c <= 12271 || c >= 12289 && c <= 55295 || c >= 63744 && c <= 64975 || c >= 65008 && c <= 65533 || c >= 65536 && c <= 983039; + } + exports2.isNameStartChar = isNameStartChar; + function isNameChar(c) { + return isNameStartChar(c) || c >= 48 && c <= 57 || c === 45 || c === 46 || c === 183 || c >= 768 && c <= 879 || c >= 8255 && c <= 8256; + } + exports2.isNameChar = isNameChar; + } +}); + +// ../../node_modules/.pnpm/xmlchars@2.2.0/node_modules/xmlchars/xml/1.1/ed2.js +var require_ed2 = __commonJS({ + "../../node_modules/.pnpm/xmlchars@2.2.0/node_modules/xmlchars/xml/1.1/ed2.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CHAR = "-\uD7FF\uE000-\uFFFD\u{10000}-\u{10FFFF}"; + exports2.RESTRICTED_CHAR = "-\b\v\f-\x7F-\x84\x86-\x9F"; + exports2.S = " \r\n"; + exports2.NAME_START_CHAR = ":A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}"; + exports2.NAME_CHAR = "-" + exports2.NAME_START_CHAR + ".0-9\xB7\u0300-\u036F\u203F-\u2040"; + exports2.CHAR_RE = new RegExp("^[" + exports2.CHAR + "]$", "u"); + exports2.RESTRICTED_CHAR_RE = new RegExp("^[" + exports2.RESTRICTED_CHAR + "]$", "u"); + exports2.S_RE = new RegExp("^[" + exports2.S + "]+$", "u"); + exports2.NAME_START_CHAR_RE = new RegExp("^[" + exports2.NAME_START_CHAR + "]$", "u"); + exports2.NAME_CHAR_RE = new RegExp("^[" + exports2.NAME_CHAR + "]$", "u"); + exports2.NAME_RE = new RegExp("^[" + exports2.NAME_START_CHAR + "][" + exports2.NAME_CHAR + "]*$", "u"); + exports2.NMTOKEN_RE = new RegExp("^[" + exports2.NAME_CHAR + "]+$", "u"); + var TAB = 9; + var NL = 10; + var CR = 13; + var SPACE = 32; + exports2.S_LIST = [SPACE, NL, CR, TAB]; + function isChar(c) { + return c >= 1 && c <= 55295 || c >= 57344 && c <= 65533 || c >= 65536 && c <= 1114111; + } + exports2.isChar = isChar; + function isRestrictedChar(c) { + return c >= 1 && c <= 8 || c === 11 || c === 12 || c >= 14 && c <= 31 || c >= 127 && c <= 132 || c >= 134 && c <= 159; + } + exports2.isRestrictedChar = isRestrictedChar; + function isCharAndNotRestricted(c) { + return c === 9 || c === 10 || c === 13 || c > 31 && c < 127 || c === 133 || c > 159 && c <= 55295 || c >= 57344 && c <= 65533 || c >= 65536 && c <= 1114111; + } + exports2.isCharAndNotRestricted = isCharAndNotRestricted; + function isS(c) { + return c === SPACE || c === NL || c === CR || c === TAB; + } + exports2.isS = isS; + function isNameStartChar(c) { + return c >= 65 && c <= 90 || c >= 97 && c <= 122 || c === 58 || c === 95 || c === 8204 || c === 8205 || c >= 192 && c <= 214 || c >= 216 && c <= 246 || c >= 248 && c <= 767 || c >= 880 && c <= 893 || c >= 895 && c <= 8191 || c >= 8304 && c <= 8591 || c >= 11264 && c <= 12271 || c >= 12289 && c <= 55295 || c >= 63744 && c <= 64975 || c >= 65008 && c <= 65533 || c >= 65536 && c <= 983039; + } + exports2.isNameStartChar = isNameStartChar; + function isNameChar(c) { + return isNameStartChar(c) || c >= 48 && c <= 57 || c === 45 || c === 46 || c === 183 || c >= 768 && c <= 879 || c >= 8255 && c <= 8256; + } + exports2.isNameChar = isNameChar; + } +}); + +// ../../node_modules/.pnpm/xmlchars@2.2.0/node_modules/xmlchars/xmlns/1.0/ed3.js +var require_ed3 = __commonJS({ + "../../node_modules/.pnpm/xmlchars@2.2.0/node_modules/xmlchars/xmlns/1.0/ed3.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.NC_NAME_START_CHAR = "A-Z_a-z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}"; + exports2.NC_NAME_CHAR = "-" + exports2.NC_NAME_START_CHAR + ".0-9\xB7\u0300-\u036F\u203F-\u2040"; + exports2.NC_NAME_START_CHAR_RE = new RegExp("^[" + exports2.NC_NAME_START_CHAR + "]$", "u"); + exports2.NC_NAME_CHAR_RE = new RegExp("^[" + exports2.NC_NAME_CHAR + "]$", "u"); + exports2.NC_NAME_RE = new RegExp("^[" + exports2.NC_NAME_START_CHAR + "][" + exports2.NC_NAME_CHAR + "]*$", "u"); + function isNCNameStartChar(c) { + return c >= 65 && c <= 90 || c === 95 || c >= 97 && c <= 122 || c >= 192 && c <= 214 || c >= 216 && c <= 246 || c >= 248 && c <= 767 || c >= 880 && c <= 893 || c >= 895 && c <= 8191 || c >= 8204 && c <= 8205 || c >= 8304 && c <= 8591 || c >= 11264 && c <= 12271 || c >= 12289 && c <= 55295 || c >= 63744 && c <= 64975 || c >= 65008 && c <= 65533 || c >= 65536 && c <= 983039; + } + exports2.isNCNameStartChar = isNCNameStartChar; + function isNCNameChar(c) { + return isNCNameStartChar(c) || (c === 45 || c === 46 || c >= 48 && c <= 57 || c === 183 || c >= 768 && c <= 879 || c >= 8255 && c <= 8256); + } + exports2.isNCNameChar = isNCNameChar; + } +}); + +// ../../node_modules/.pnpm/saxes@5.0.1/node_modules/saxes/saxes.js +var require_saxes = __commonJS({ + "../../node_modules/.pnpm/saxes@5.0.1/node_modules/saxes/saxes.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + var ed5 = require_ed5(); + var ed2 = require_ed2(); + var NSed3 = require_ed3(); + var isS = ed5.isS; + var isChar10 = ed5.isChar; + var isNameStartChar = ed5.isNameStartChar; + var isNameChar = ed5.isNameChar; + var S_LIST = ed5.S_LIST; + var NAME_RE = ed5.NAME_RE; + var isChar11 = ed2.isChar; + var isNCNameStartChar = NSed3.isNCNameStartChar; + var isNCNameChar = NSed3.isNCNameChar; + var NC_NAME_RE = NSed3.NC_NAME_RE; + var XML_NAMESPACE = "http://www.w3.org/XML/1998/namespace"; + var XMLNS_NAMESPACE = "http://www.w3.org/2000/xmlns/"; + var rootNS = { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + __proto__: null, + xml: XML_NAMESPACE, + xmlns: XMLNS_NAMESPACE + }; + var XML_ENTITIES = { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + __proto__: null, + amp: "&", + gt: ">", + lt: "<", + quot: '"', + apos: "'" + }; + var EOC = -1; + var NL_LIKE = -2; + var S_BEGIN = 0; + var S_BEGIN_WHITESPACE = 1; + var S_DOCTYPE = 2; + var S_DOCTYPE_QUOTE = 3; + var S_DTD = 4; + var S_DTD_QUOTED = 5; + var S_DTD_OPEN_WAKA = 6; + var S_DTD_OPEN_WAKA_BANG = 7; + var S_DTD_COMMENT = 8; + var S_DTD_COMMENT_ENDING = 9; + var S_DTD_COMMENT_ENDED = 10; + var S_DTD_PI = 11; + var S_DTD_PI_ENDING = 12; + var S_TEXT = 13; + var S_ENTITY = 14; + var S_OPEN_WAKA = 15; + var S_OPEN_WAKA_BANG = 16; + var S_COMMENT = 17; + var S_COMMENT_ENDING = 18; + var S_COMMENT_ENDED = 19; + var S_CDATA = 20; + var S_CDATA_ENDING = 21; + var S_CDATA_ENDING_2 = 22; + var S_PI_FIRST_CHAR = 23; + var S_PI_REST = 24; + var S_PI_BODY = 25; + var S_PI_ENDING = 26; + var S_XML_DECL_NAME_START = 27; + var S_XML_DECL_NAME = 28; + var S_XML_DECL_EQ = 29; + var S_XML_DECL_VALUE_START = 30; + var S_XML_DECL_VALUE = 31; + var S_XML_DECL_SEPARATOR = 32; + var S_XML_DECL_ENDING = 33; + var S_OPEN_TAG = 34; + var S_OPEN_TAG_SLASH = 35; + var S_ATTRIB = 36; + var S_ATTRIB_NAME = 37; + var S_ATTRIB_NAME_SAW_WHITE = 38; + var S_ATTRIB_VALUE = 39; + var S_ATTRIB_VALUE_QUOTED = 40; + var S_ATTRIB_VALUE_CLOSED = 41; + var S_ATTRIB_VALUE_UNQUOTED = 42; + var S_CLOSE_TAG = 43; + var S_CLOSE_TAG_SAW_WHITE = 44; + var TAB = 9; + var NL = 10; + var CR = 13; + var SPACE = 32; + var BANG = 33; + var DQUOTE = 34; + var AMP = 38; + var SQUOTE = 39; + var MINUS = 45; + var FORWARD_SLASH = 47; + var SEMICOLON = 59; + var LESS = 60; + var EQUAL = 61; + var GREATER = 62; + var QUESTION = 63; + var OPEN_BRACKET = 91; + var CLOSE_BRACKET = 93; + var NEL = 133; + var LS = 8232; + var isQuote = (c) => c === DQUOTE || c === SQUOTE; + var QUOTES = [DQUOTE, SQUOTE]; + var DOCTYPE_TERMINATOR = [...QUOTES, OPEN_BRACKET, GREATER]; + var DTD_TERMINATOR = [...QUOTES, LESS, CLOSE_BRACKET]; + var XML_DECL_NAME_TERMINATOR = [EQUAL, QUESTION, ...S_LIST]; + var ATTRIB_VALUE_UNQUOTED_TERMINATOR = [...S_LIST, GREATER, AMP, LESS]; + function nsPairCheck(parser, prefix, uri) { + switch (prefix) { + case "xml": + if (uri !== XML_NAMESPACE) { + parser.fail(`xml prefix must be bound to ${XML_NAMESPACE}.`); + } + break; + case "xmlns": + if (uri !== XMLNS_NAMESPACE) { + parser.fail(`xmlns prefix must be bound to ${XMLNS_NAMESPACE}.`); + } + break; + default: + } + switch (uri) { + case XMLNS_NAMESPACE: + parser.fail(prefix === "" ? `the default namespace may not be set to ${uri}.` : `may not assign a prefix (even "xmlns") to the URI ${XMLNS_NAMESPACE}.`); + break; + case XML_NAMESPACE: + switch (prefix) { + case "xml": + break; + case "": + parser.fail(`the default namespace may not be set to ${uri}.`); + break; + default: + parser.fail("may not assign the xml namespace to another prefix."); + } + break; + default: + } + } + function nsMappingCheck(parser, mapping) { + for (const local of Object.keys(mapping)) { + nsPairCheck(parser, local, mapping[local]); + } + } + var isNCName = (name) => NC_NAME_RE.test(name); + var isName = (name) => NAME_RE.test(name); + var FORBIDDEN_START = 0; + var FORBIDDEN_BRACKET = 1; + var FORBIDDEN_BRACKET_BRACKET = 2; + exports2.EVENTS = [ + "xmldecl", + "text", + "processinginstruction", + "doctype", + "comment", + "opentagstart", + "attribute", + "opentag", + "closetag", + "cdata", + "error", + "end", + "ready" + ]; + var EVENT_NAME_TO_HANDLER_NAME = { + xmldecl: "xmldeclHandler", + text: "textHandler", + processinginstruction: "piHandler", + doctype: "doctypeHandler", + comment: "commentHandler", + opentagstart: "openTagStartHandler", + attribute: "attributeHandler", + opentag: "openTagHandler", + closetag: "closeTagHandler", + cdata: "cdataHandler", + error: "errorHandler", + end: "endHandler", + ready: "readyHandler" + }; + var SaxesParser = class { + /** + * @param opt The parser options. + */ + constructor(opt) { + this.opt = opt !== null && opt !== void 0 ? opt : {}; + this.fragmentOpt = !!this.opt.fragment; + const xmlnsOpt = this.xmlnsOpt = !!this.opt.xmlns; + this.trackPosition = this.opt.position !== false; + this.fileName = this.opt.fileName; + if (xmlnsOpt) { + this.nameStartCheck = isNCNameStartChar; + this.nameCheck = isNCNameChar; + this.isName = isNCName; + this.processAttribs = this.processAttribsNS; + this.pushAttrib = this.pushAttribNS; + this.ns = Object.assign({ __proto__: null }, rootNS); + const additional = this.opt.additionalNamespaces; + if (additional != null) { + nsMappingCheck(this, additional); + Object.assign(this.ns, additional); + } + } else { + this.nameStartCheck = isNameStartChar; + this.nameCheck = isNameChar; + this.isName = isName; + this.processAttribs = this.processAttribsPlain; + this.pushAttrib = this.pushAttribPlain; + } + this.stateTable = [ + /* eslint-disable @typescript-eslint/unbound-method */ + this.sBegin, + this.sBeginWhitespace, + this.sDoctype, + this.sDoctypeQuote, + this.sDTD, + this.sDTDQuoted, + this.sDTDOpenWaka, + this.sDTDOpenWakaBang, + this.sDTDComment, + this.sDTDCommentEnding, + this.sDTDCommentEnded, + this.sDTDPI, + this.sDTDPIEnding, + this.sText, + this.sEntity, + this.sOpenWaka, + this.sOpenWakaBang, + this.sComment, + this.sCommentEnding, + this.sCommentEnded, + this.sCData, + this.sCDataEnding, + this.sCDataEnding2, + this.sPIFirstChar, + this.sPIRest, + this.sPIBody, + this.sPIEnding, + this.sXMLDeclNameStart, + this.sXMLDeclName, + this.sXMLDeclEq, + this.sXMLDeclValueStart, + this.sXMLDeclValue, + this.sXMLDeclSeparator, + this.sXMLDeclEnding, + this.sOpenTag, + this.sOpenTagSlash, + this.sAttrib, + this.sAttribName, + this.sAttribNameSawWhite, + this.sAttribValue, + this.sAttribValueQuoted, + this.sAttribValueClosed, + this.sAttribValueUnquoted, + this.sCloseTag, + this.sCloseTagSawWhite + ]; + this._init(); + } + /** + * Indicates whether or not the parser is closed. If ``true``, wait for + * the ``ready`` event to write again. + */ + get closed() { + return this._closed; + } + _init() { + var _a; + this.openWakaBang = ""; + this.text = ""; + this.name = ""; + this.piTarget = ""; + this.entity = ""; + this.q = null; + this.tags = []; + this.tag = null; + this.topNS = null; + this.chunk = ""; + this.chunkPosition = 0; + this.i = 0; + this.prevI = 0; + this.carriedFromPrevious = void 0; + this.forbiddenState = FORBIDDEN_START; + this.attribList = []; + const { fragmentOpt } = this; + this.state = fragmentOpt ? S_TEXT : S_BEGIN; + this.reportedTextBeforeRoot = this.reportedTextAfterRoot = this.closedRoot = this.sawRoot = fragmentOpt; + this.xmlDeclPossible = !fragmentOpt; + this.xmlDeclExpects = ["version"]; + this.entityReturnState = void 0; + let { defaultXMLVersion } = this.opt; + if (defaultXMLVersion === void 0) { + if (this.opt.forceXMLVersion === true) { + throw new Error("forceXMLVersion set but defaultXMLVersion is not set"); + } + defaultXMLVersion = "1.0"; + } + this.setXMLVersion(defaultXMLVersion); + this.positionAtNewLine = 0; + this.doctype = false; + this._closed = false; + this.xmlDecl = { + version: void 0, + encoding: void 0, + standalone: void 0 + }; + this.line = 1; + this.column = 0; + this.ENTITIES = Object.create(XML_ENTITIES); + (_a = this.readyHandler) === null || _a === void 0 ? void 0 : _a.call(this); + } + /** + * The stream position the parser is currently looking at. This field is + * zero-based. + * + * This field is not based on counting Unicode characters but is to be + * interpreted as a plain index into a JavaScript string. + */ + get position() { + return this.chunkPosition + this.i; + } + /** + * The column number of the next character to be read by the parser. * + * This field is zero-based. (The first column in a line is 0.) + * + * This field reports the index at which the next character would be in the + * line if the line were represented as a JavaScript string. Note that this + * *can* be different to a count based on the number of *Unicode characters* + * due to how JavaScript handles astral plane characters. + * + * See [[column]] for a number that corresponds to a count of Unicode + * characters. + */ + get columnIndex() { + return this.position - this.positionAtNewLine; + } + /** + * Set an event listener on an event. The parser supports one handler per + * event type. If you try to set an event handler over an existing handler, + * the old handler is silently overwritten. + * + * @param name The event to listen to. + * + * @param handler The handler to set. + */ + on(name, handler) { + this[EVENT_NAME_TO_HANDLER_NAME[name]] = handler; + } + /** + * Unset an event handler. + * + * @parma name The event to stop listening to. + */ + off(name) { + this[EVENT_NAME_TO_HANDLER_NAME[name]] = void 0; + } + /** + * Make an error object. The error object will have a message that contains + * the ``fileName`` option passed at the creation of the parser. If position + * tracking was turned on, it will also have line and column number + * information. + * + * @param message The message describing the error to report. + * + * @returns An error object with a properly formatted message. + */ + makeError(message) { + var _a; + let msg = (_a = this.fileName) !== null && _a !== void 0 ? _a : ""; + if (this.trackPosition) { + if (msg.length > 0) { + msg += ":"; + } + msg += `${this.line}:${this.column}`; + } + if (msg.length > 0) { + msg += ": "; + } + return new Error(msg + message); + } + /** + * Report a parsing error. This method is made public so that client code may + * check for issues that are outside the scope of this project and can report + * errors. + * + * @param message The error to report. + * + * @returns this + */ + fail(message) { + const err = this.makeError(message); + const handler = this.errorHandler; + if (handler === void 0) { + throw err; + } else { + handler(err); + } + return this; + } + /** + * Write a XML data to the parser. + * + * @param chunk The XML data to write. + * + * @returns this + */ + write(chunk) { + if (this.closed) { + return this.fail("cannot write after close; assign an onready handler."); + } + let end = false; + if (chunk === null) { + end = true; + chunk = ""; + } else if (typeof chunk === "object") { + chunk = chunk.toString(); + } + if (this.carriedFromPrevious !== void 0) { + chunk = `${this.carriedFromPrevious}${chunk}`; + this.carriedFromPrevious = void 0; + } + let limit = chunk.length; + const lastCode = chunk.charCodeAt(limit - 1); + if (!end && // A trailing CR or surrogate must be carried over to the next + // chunk. + (lastCode === CR || lastCode >= 55296 && lastCode <= 56319)) { + this.carriedFromPrevious = chunk[limit - 1]; + limit--; + chunk = chunk.slice(0, limit); + } + const { stateTable } = this; + this.chunk = chunk; + this.i = 0; + while (this.i < limit) { + stateTable[this.state].call(this); + } + this.chunkPosition += limit; + return end ? this.end() : this; + } + /** + * Close the current stream. Perform final well-formedness checks and reset + * the parser tstate. + * + * @returns this + */ + close() { + return this.write(null); + } + /** + * Get a single code point out of the current chunk. This updates the current + * position if we do position tracking. + * + * This is the algorithm to use for XML 1.0. + * + * @returns The character read. + */ + getCode10() { + const { chunk, i } = this; + this.prevI = i; + this.i = i + 1; + if (i >= chunk.length) { + return EOC; + } + const code = chunk.charCodeAt(i); + this.column++; + if (code < 55296) { + if (code >= SPACE || code === TAB) { + return code; + } + switch (code) { + case NL: + this.line++; + this.column = 0; + this.positionAtNewLine = this.position; + return NL; + case CR: + if (chunk.charCodeAt(i + 1) === NL) { + this.i = i + 2; + } + this.line++; + this.column = 0; + this.positionAtNewLine = this.position; + return NL_LIKE; + default: + this.fail("disallowed character."); + return code; + } + } + if (code > 56319) { + if (!(code >= 57344 && code <= 65533)) { + this.fail("disallowed character."); + } + return code; + } + const final = 65536 + (code - 55296) * 1024 + (chunk.charCodeAt(i + 1) - 56320); + this.i = i + 2; + if (final > 1114111) { + this.fail("disallowed character."); + } + return final; + } + /** + * Get a single code point out of the current chunk. This updates the current + * position if we do position tracking. + * + * This is the algorithm to use for XML 1.1. + * + * @returns {number} The character read. + */ + getCode11() { + const { chunk, i } = this; + this.prevI = i; + this.i = i + 1; + if (i >= chunk.length) { + return EOC; + } + const code = chunk.charCodeAt(i); + this.column++; + if (code < 55296) { + if (code > 31 && code < 127 || code > 159 && code !== LS || code === TAB) { + return code; + } + switch (code) { + case NL: + this.line++; + this.column = 0; + this.positionAtNewLine = this.position; + return NL; + case CR: { + const next = chunk.charCodeAt(i + 1); + if (next === NL || next === NEL) { + this.i = i + 2; + } + } + /* yes, fall through */ + case NEL: + // 0x85 + case LS: + this.line++; + this.column = 0; + this.positionAtNewLine = this.position; + return NL_LIKE; + default: + this.fail("disallowed character."); + return code; + } + } + if (code > 56319) { + if (!(code >= 57344 && code <= 65533)) { + this.fail("disallowed character."); + } + return code; + } + const final = 65536 + (code - 55296) * 1024 + (chunk.charCodeAt(i + 1) - 56320); + this.i = i + 2; + if (final > 1114111) { + this.fail("disallowed character."); + } + return final; + } + /** + * Like ``getCode`` but with the return value normalized so that ``NL`` is + * returned for ``NL_LIKE``. + */ + getCodeNorm() { + const c = this.getCode(); + return c === NL_LIKE ? NL : c; + } + unget() { + this.i = this.prevI; + this.column--; + } + /** + * Capture characters into a buffer until encountering one of a set of + * characters. + * + * @param chars An array of codepoints. Encountering a character in the array + * ends the capture. (``chars`` may safely contain ``NL``.) + * + * @return The character code that made the capture end, or ``EOC`` if we hit + * the end of the chunk. The return value cannot be NL_LIKE: NL is returned + * instead. + */ + captureTo(chars) { + let { i: start } = this; + const { chunk } = this; + while (true) { + const c = this.getCode(); + const isNLLike = c === NL_LIKE; + const final = isNLLike ? NL : c; + if (final === EOC || chars.includes(final)) { + this.text += chunk.slice(start, this.prevI); + return final; + } + if (isNLLike) { + this.text += `${chunk.slice(start, this.prevI)} +`; + start = this.i; + } + } + } + /** + * Capture characters into a buffer until encountering a character. + * + * @param char The codepoint that ends the capture. **NOTE ``char`` MAY NOT + * CONTAIN ``NL``.** Passing ``NL`` will result in buggy behavior. + * + * @return ``true`` if we ran into the character. Otherwise, we ran into the + * end of the current chunk. + */ + captureToChar(char) { + let { i: start } = this; + const { chunk } = this; + while (true) { + let c = this.getCode(); + switch (c) { + case NL_LIKE: + this.text += `${chunk.slice(start, this.prevI)} +`; + start = this.i; + c = NL; + break; + case EOC: + this.text += chunk.slice(start); + return false; + default: + } + if (c === char) { + this.text += chunk.slice(start, this.prevI); + return true; + } + } + } + /** + * Capture characters that satisfy ``isNameChar`` into the ``name`` field of + * this parser. + * + * @return The character code that made the test fail, or ``EOC`` if we hit + * the end of the chunk. The return value cannot be NL_LIKE: NL is returned + * instead. + */ + captureNameChars() { + const { chunk, i: start } = this; + while (true) { + const c = this.getCode(); + if (c === EOC) { + this.name += chunk.slice(start); + return EOC; + } + if (!isNameChar(c)) { + this.name += chunk.slice(start, this.prevI); + return c === NL_LIKE ? NL : c; + } + } + } + /** + * Skip white spaces. + * + * @return The character that ended the skip, or ``EOC`` if we hit + * the end of the chunk. The return value cannot be NL_LIKE: NL is returned + * instead. + */ + skipSpaces() { + while (true) { + const c = this.getCodeNorm(); + if (c === EOC || !isS(c)) { + return c; + } + } + } + setXMLVersion(version2) { + this.currentXMLVersion = version2; + if (version2 === "1.0") { + this.isChar = isChar10; + this.getCode = this.getCode10; + } else { + this.isChar = isChar11; + this.getCode = this.getCode11; + } + } + // STATE ENGINE METHODS + // This needs to be a state separate from S_BEGIN_WHITESPACE because we want + // to be sure never to come back to this state later. + sBegin() { + if (this.chunk.charCodeAt(0) === 65279) { + this.i++; + this.column++; + } + this.state = S_BEGIN_WHITESPACE; + } + sBeginWhitespace() { + const iBefore = this.i; + const c = this.skipSpaces(); + if (this.prevI !== iBefore) { + this.xmlDeclPossible = false; + } + switch (c) { + case LESS: + this.state = S_OPEN_WAKA; + if (this.text.length !== 0) { + throw new Error("no-empty text at start"); + } + break; + case EOC: + break; + default: + this.unget(); + this.state = S_TEXT; + this.xmlDeclPossible = false; + } + } + sDoctype() { + var _a; + const c = this.captureTo(DOCTYPE_TERMINATOR); + switch (c) { + case GREATER: { + (_a = this.doctypeHandler) === null || _a === void 0 ? void 0 : _a.call(this, this.text); + this.text = ""; + this.state = S_TEXT; + this.doctype = true; + break; + } + case EOC: + break; + default: + this.text += String.fromCodePoint(c); + if (c === OPEN_BRACKET) { + this.state = S_DTD; + } else if (isQuote(c)) { + this.state = S_DOCTYPE_QUOTE; + this.q = c; + } + } + } + sDoctypeQuote() { + const q = this.q; + if (this.captureToChar(q)) { + this.text += String.fromCodePoint(q); + this.q = null; + this.state = S_DOCTYPE; + } + } + sDTD() { + const c = this.captureTo(DTD_TERMINATOR); + if (c === EOC) { + return; + } + this.text += String.fromCodePoint(c); + if (c === CLOSE_BRACKET) { + this.state = S_DOCTYPE; + } else if (c === LESS) { + this.state = S_DTD_OPEN_WAKA; + } else if (isQuote(c)) { + this.state = S_DTD_QUOTED; + this.q = c; + } + } + sDTDQuoted() { + const q = this.q; + if (this.captureToChar(q)) { + this.text += String.fromCodePoint(q); + this.state = S_DTD; + this.q = null; + } + } + sDTDOpenWaka() { + const c = this.getCodeNorm(); + this.text += String.fromCodePoint(c); + switch (c) { + case BANG: + this.state = S_DTD_OPEN_WAKA_BANG; + this.openWakaBang = ""; + break; + case QUESTION: + this.state = S_DTD_PI; + break; + default: + this.state = S_DTD; + } + } + sDTDOpenWakaBang() { + const char = String.fromCodePoint(this.getCodeNorm()); + const owb = this.openWakaBang += char; + this.text += char; + if (owb !== "-") { + this.state = owb === "--" ? S_DTD_COMMENT : S_DTD; + this.openWakaBang = ""; + } + } + sDTDComment() { + if (this.captureToChar(MINUS)) { + this.text += "-"; + this.state = S_DTD_COMMENT_ENDING; + } + } + sDTDCommentEnding() { + const c = this.getCodeNorm(); + this.text += String.fromCodePoint(c); + this.state = c === MINUS ? S_DTD_COMMENT_ENDED : S_DTD_COMMENT; + } + sDTDCommentEnded() { + const c = this.getCodeNorm(); + this.text += String.fromCodePoint(c); + if (c === GREATER) { + this.state = S_DTD; + } else { + this.fail("malformed comment."); + this.state = S_DTD_COMMENT; + } + } + sDTDPI() { + if (this.captureToChar(QUESTION)) { + this.text += "?"; + this.state = S_DTD_PI_ENDING; + } + } + sDTDPIEnding() { + const c = this.getCodeNorm(); + this.text += String.fromCodePoint(c); + if (c === GREATER) { + this.state = S_DTD; + } + } + sText() { + if (this.tags.length !== 0) { + this.handleTextInRoot(); + } else { + this.handleTextOutsideRoot(); + } + } + sEntity() { + let { i: start } = this; + const { chunk } = this; + loop: + while (true) { + switch (this.getCode()) { + case NL_LIKE: + this.entity += `${chunk.slice(start, this.prevI)} +`; + start = this.i; + break; + case SEMICOLON: { + const { entityReturnState } = this; + const entity = this.entity + chunk.slice(start, this.prevI); + this.state = entityReturnState; + let parsed; + if (entity === "") { + this.fail("empty entity name."); + parsed = "&;"; + } else { + parsed = this.parseEntity(entity); + this.entity = ""; + } + if (entityReturnState !== S_TEXT || this.textHandler !== void 0) { + this.text += parsed; + } + break loop; + } + case EOC: + this.entity += chunk.slice(start); + break loop; + default: + } + } + } + sOpenWaka() { + const c = this.getCode(); + if (isNameStartChar(c)) { + this.state = S_OPEN_TAG; + this.unget(); + this.xmlDeclPossible = false; + } else { + switch (c) { + case FORWARD_SLASH: + this.state = S_CLOSE_TAG; + this.xmlDeclPossible = false; + break; + case BANG: + this.state = S_OPEN_WAKA_BANG; + this.openWakaBang = ""; + this.xmlDeclPossible = false; + break; + case QUESTION: + this.state = S_PI_FIRST_CHAR; + break; + default: + this.fail("disallowed character in tag name"); + this.state = S_TEXT; + this.xmlDeclPossible = false; + } + } + } + sOpenWakaBang() { + this.openWakaBang += String.fromCodePoint(this.getCodeNorm()); + switch (this.openWakaBang) { + case "[CDATA[": + if (!this.sawRoot && !this.reportedTextBeforeRoot) { + this.fail("text data outside of root node."); + this.reportedTextBeforeRoot = true; + } + if (this.closedRoot && !this.reportedTextAfterRoot) { + this.fail("text data outside of root node."); + this.reportedTextAfterRoot = true; + } + this.state = S_CDATA; + this.openWakaBang = ""; + break; + case "--": + this.state = S_COMMENT; + this.openWakaBang = ""; + break; + case "DOCTYPE": + this.state = S_DOCTYPE; + if (this.doctype || this.sawRoot) { + this.fail("inappropriately located doctype declaration."); + } + this.openWakaBang = ""; + break; + default: + if (this.openWakaBang.length >= 7) { + this.fail("incorrect syntax."); + } + } + } + sComment() { + if (this.captureToChar(MINUS)) { + this.state = S_COMMENT_ENDING; + } + } + sCommentEnding() { + var _a; + const c = this.getCodeNorm(); + if (c === MINUS) { + this.state = S_COMMENT_ENDED; + (_a = this.commentHandler) === null || _a === void 0 ? void 0 : _a.call(this, this.text); + this.text = ""; + } else { + this.text += `-${String.fromCodePoint(c)}`; + this.state = S_COMMENT; + } + } + sCommentEnded() { + const c = this.getCodeNorm(); + if (c !== GREATER) { + this.fail("malformed comment."); + this.text += `--${String.fromCodePoint(c)}`; + this.state = S_COMMENT; + } else { + this.state = S_TEXT; + } + } + sCData() { + if (this.captureToChar(CLOSE_BRACKET)) { + this.state = S_CDATA_ENDING; + } + } + sCDataEnding() { + const c = this.getCodeNorm(); + if (c === CLOSE_BRACKET) { + this.state = S_CDATA_ENDING_2; + } else { + this.text += `]${String.fromCodePoint(c)}`; + this.state = S_CDATA; + } + } + sCDataEnding2() { + var _a; + const c = this.getCodeNorm(); + switch (c) { + case GREATER: { + (_a = this.cdataHandler) === null || _a === void 0 ? void 0 : _a.call(this, this.text); + this.text = ""; + this.state = S_TEXT; + break; + } + case CLOSE_BRACKET: + this.text += "]"; + break; + default: + this.text += `]]${String.fromCodePoint(c)}`; + this.state = S_CDATA; + } + } + // We need this separate state to check the first character fo the pi target + // with this.nameStartCheck which allows less characters than this.nameCheck. + sPIFirstChar() { + const c = this.getCodeNorm(); + if (this.nameStartCheck(c)) { + this.piTarget += String.fromCodePoint(c); + this.state = S_PI_REST; + } else if (c === QUESTION || isS(c)) { + this.fail("processing instruction without a target."); + this.state = c === QUESTION ? S_PI_ENDING : S_PI_BODY; + } else { + this.fail("disallowed character in processing instruction name."); + this.piTarget += String.fromCodePoint(c); + this.state = S_PI_REST; + } + } + sPIRest() { + const { chunk, i: start } = this; + while (true) { + const c = this.getCodeNorm(); + if (c === EOC) { + this.piTarget += chunk.slice(start); + return; + } + if (!this.nameCheck(c)) { + this.piTarget += chunk.slice(start, this.prevI); + const isQuestion = c === QUESTION; + if (isQuestion || isS(c)) { + if (this.piTarget === "xml") { + if (!this.xmlDeclPossible) { + this.fail("an XML declaration must be at the start of the document."); + } + this.state = isQuestion ? S_XML_DECL_ENDING : S_XML_DECL_NAME_START; + } else { + this.state = isQuestion ? S_PI_ENDING : S_PI_BODY; + } + } else { + this.fail("disallowed character in processing instruction name."); + this.piTarget += String.fromCodePoint(c); + } + break; + } + } + } + sPIBody() { + if (this.text.length === 0) { + const c = this.getCodeNorm(); + if (c === QUESTION) { + this.state = S_PI_ENDING; + } else if (!isS(c)) { + this.text = String.fromCodePoint(c); + } + } else if (this.captureToChar(QUESTION)) { + this.state = S_PI_ENDING; + } + } + sPIEnding() { + var _a; + const c = this.getCodeNorm(); + if (c === GREATER) { + const { piTarget } = this; + if (piTarget.toLowerCase() === "xml") { + this.fail("the XML declaration must appear at the start of the document."); + } + (_a = this.piHandler) === null || _a === void 0 ? void 0 : _a.call(this, { + target: piTarget, + body: this.text + }); + this.piTarget = this.text = ""; + this.state = S_TEXT; + } else if (c === QUESTION) { + this.text += "?"; + } else { + this.text += `?${String.fromCodePoint(c)}`; + this.state = S_PI_BODY; + } + this.xmlDeclPossible = false; + } + sXMLDeclNameStart() { + const c = this.skipSpaces(); + if (c === QUESTION) { + this.state = S_XML_DECL_ENDING; + return; + } + if (c !== EOC) { + this.state = S_XML_DECL_NAME; + this.name = String.fromCodePoint(c); + } + } + sXMLDeclName() { + const c = this.captureTo(XML_DECL_NAME_TERMINATOR); + if (c === QUESTION) { + this.state = S_XML_DECL_ENDING; + this.name += this.text; + this.text = ""; + this.fail("XML declaration is incomplete."); + return; + } + if (!(isS(c) || c === EQUAL)) { + return; + } + this.name += this.text; + this.text = ""; + if (!this.xmlDeclExpects.includes(this.name)) { + switch (this.name.length) { + case 0: + this.fail("did not expect any more name/value pairs."); + break; + case 1: + this.fail(`expected the name ${this.xmlDeclExpects[0]}.`); + break; + default: + this.fail(`expected one of ${this.xmlDeclExpects.join(", ")}`); + } + } + this.state = c === EQUAL ? S_XML_DECL_VALUE_START : S_XML_DECL_EQ; + } + sXMLDeclEq() { + const c = this.getCodeNorm(); + if (c === QUESTION) { + this.state = S_XML_DECL_ENDING; + this.fail("XML declaration is incomplete."); + return; + } + if (isS(c)) { + return; + } + if (c !== EQUAL) { + this.fail("value required."); + } + this.state = S_XML_DECL_VALUE_START; + } + sXMLDeclValueStart() { + const c = this.getCodeNorm(); + if (c === QUESTION) { + this.state = S_XML_DECL_ENDING; + this.fail("XML declaration is incomplete."); + return; + } + if (isS(c)) { + return; + } + if (!isQuote(c)) { + this.fail("value must be quoted."); + this.q = SPACE; + } else { + this.q = c; + } + this.state = S_XML_DECL_VALUE; + } + sXMLDeclValue() { + const c = this.captureTo([this.q, QUESTION]); + if (c === QUESTION) { + this.state = S_XML_DECL_ENDING; + this.text = ""; + this.fail("XML declaration is incomplete."); + return; + } + if (c === EOC) { + return; + } + const value = this.text; + this.text = ""; + switch (this.name) { + case "version": { + this.xmlDeclExpects = ["encoding", "standalone"]; + const version2 = value; + this.xmlDecl.version = version2; + if (!/^1\.[0-9]+$/.test(version2)) { + this.fail("version number must match /^1\\.[0-9]+$/."); + } else if (!this.opt.forceXMLVersion) { + this.setXMLVersion(version2); + } + break; + } + case "encoding": + if (!/^[A-Za-z][A-Za-z0-9._-]*$/.test(value)) { + this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."); + } + this.xmlDeclExpects = ["standalone"]; + this.xmlDecl.encoding = value; + break; + case "standalone": + if (value !== "yes" && value !== "no") { + this.fail('standalone value must match "yes" or "no".'); + } + this.xmlDeclExpects = []; + this.xmlDecl.standalone = value; + break; + default: + } + this.name = ""; + this.state = S_XML_DECL_SEPARATOR; + } + sXMLDeclSeparator() { + const c = this.getCodeNorm(); + if (c === QUESTION) { + this.state = S_XML_DECL_ENDING; + return; + } + if (!isS(c)) { + this.fail("whitespace required."); + this.unget(); + } + this.state = S_XML_DECL_NAME_START; + } + sXMLDeclEnding() { + var _a; + const c = this.getCodeNorm(); + if (c === GREATER) { + if (this.piTarget !== "xml") { + this.fail("processing instructions are not allowed before root."); + } else if (this.name !== "version" && this.xmlDeclExpects.includes("version")) { + this.fail("XML declaration must contain a version."); + } + (_a = this.xmldeclHandler) === null || _a === void 0 ? void 0 : _a.call(this, this.xmlDecl); + this.name = ""; + this.piTarget = this.text = ""; + this.state = S_TEXT; + } else { + this.fail("The character ? is disallowed anywhere in XML declarations."); + } + this.xmlDeclPossible = false; + } + sOpenTag() { + var _a; + const c = this.captureNameChars(); + if (c === EOC) { + return; + } + const tag = this.tag = { + name: this.name, + attributes: /* @__PURE__ */ Object.create(null) + }; + this.name = ""; + if (this.xmlnsOpt) { + this.topNS = tag.ns = /* @__PURE__ */ Object.create(null); + } + (_a = this.openTagStartHandler) === null || _a === void 0 ? void 0 : _a.call(this, tag); + this.sawRoot = true; + if (!this.fragmentOpt && this.closedRoot) { + this.fail("documents may contain only one root."); + } + switch (c) { + case GREATER: + this.openTag(); + break; + case FORWARD_SLASH: + this.state = S_OPEN_TAG_SLASH; + break; + default: + if (!isS(c)) { + this.fail("disallowed character in tag name."); + } + this.state = S_ATTRIB; + } + } + sOpenTagSlash() { + if (this.getCode() === GREATER) { + this.openSelfClosingTag(); + } else { + this.fail("forward-slash in opening tag not followed by >."); + this.state = S_ATTRIB; + } + } + sAttrib() { + const c = this.skipSpaces(); + if (c === EOC) { + return; + } + if (isNameStartChar(c)) { + this.unget(); + this.state = S_ATTRIB_NAME; + } else if (c === GREATER) { + this.openTag(); + } else if (c === FORWARD_SLASH) { + this.state = S_OPEN_TAG_SLASH; + } else { + this.fail("disallowed character in attribute name."); + } + } + sAttribName() { + const c = this.captureNameChars(); + if (c === EQUAL) { + this.state = S_ATTRIB_VALUE; + } else if (isS(c)) { + this.state = S_ATTRIB_NAME_SAW_WHITE; + } else if (c === GREATER) { + this.fail("attribute without value."); + this.pushAttrib(this.name, this.name); + this.name = this.text = ""; + this.openTag(); + } else if (c !== EOC) { + this.fail("disallowed character in attribute name."); + } + } + sAttribNameSawWhite() { + const c = this.skipSpaces(); + switch (c) { + case EOC: + return; + case EQUAL: + this.state = S_ATTRIB_VALUE; + break; + default: + this.fail("attribute without value."); + this.text = ""; + this.name = ""; + if (c === GREATER) { + this.openTag(); + } else if (isNameStartChar(c)) { + this.unget(); + this.state = S_ATTRIB_NAME; + } else { + this.fail("disallowed character in attribute name."); + this.state = S_ATTRIB; + } + } + } + sAttribValue() { + const c = this.getCodeNorm(); + if (isQuote(c)) { + this.q = c; + this.state = S_ATTRIB_VALUE_QUOTED; + } else if (!isS(c)) { + this.fail("unquoted attribute value."); + this.state = S_ATTRIB_VALUE_UNQUOTED; + this.unget(); + } + } + sAttribValueQuoted() { + const { q, chunk } = this; + let { i: start } = this; + while (true) { + switch (this.getCode()) { + case q: + this.pushAttrib(this.name, this.text + chunk.slice(start, this.prevI)); + this.name = this.text = ""; + this.q = null; + this.state = S_ATTRIB_VALUE_CLOSED; + return; + case AMP: + this.text += chunk.slice(start, this.prevI); + this.state = S_ENTITY; + this.entityReturnState = S_ATTRIB_VALUE_QUOTED; + return; + case NL: + case NL_LIKE: + case TAB: + this.text += `${chunk.slice(start, this.prevI)} `; + start = this.i; + break; + case LESS: + this.text += chunk.slice(start, this.prevI); + this.fail("disallowed character."); + return; + case EOC: + this.text += chunk.slice(start); + return; + default: + } + } + } + sAttribValueClosed() { + const c = this.getCodeNorm(); + if (isS(c)) { + this.state = S_ATTRIB; + } else if (c === GREATER) { + this.openTag(); + } else if (c === FORWARD_SLASH) { + this.state = S_OPEN_TAG_SLASH; + } else if (isNameStartChar(c)) { + this.fail("no whitespace between attributes."); + this.unget(); + this.state = S_ATTRIB_NAME; + } else { + this.fail("disallowed character in attribute name."); + } + } + sAttribValueUnquoted() { + const c = this.captureTo(ATTRIB_VALUE_UNQUOTED_TERMINATOR); + switch (c) { + case AMP: + this.state = S_ENTITY; + this.entityReturnState = S_ATTRIB_VALUE_UNQUOTED; + break; + case LESS: + this.fail("disallowed character."); + break; + case EOC: + break; + default: + if (this.text.includes("]]>")) { + this.fail('the string "]]>" is disallowed in char data.'); + } + this.pushAttrib(this.name, this.text); + this.name = this.text = ""; + if (c === GREATER) { + this.openTag(); + } else { + this.state = S_ATTRIB; + } + } + } + sCloseTag() { + const c = this.captureNameChars(); + if (c === GREATER) { + this.closeTag(); + } else if (isS(c)) { + this.state = S_CLOSE_TAG_SAW_WHITE; + } else if (c !== EOC) { + this.fail("disallowed character in closing tag."); + } + } + sCloseTagSawWhite() { + switch (this.skipSpaces()) { + case GREATER: + this.closeTag(); + break; + case EOC: + break; + default: + this.fail("disallowed character in closing tag."); + } + } + // END OF STATE ENGINE METHODS + handleTextInRoot() { + let { i: start, forbiddenState } = this; + const { chunk, textHandler: handler } = this; + scanLoop: + while (true) { + switch (this.getCode()) { + case LESS: { + this.state = S_OPEN_WAKA; + if (handler !== void 0) { + const { text } = this; + const slice = chunk.slice(start, this.prevI); + if (text.length !== 0) { + handler(text + slice); + this.text = ""; + } else if (slice.length !== 0) { + handler(slice); + } + } + forbiddenState = FORBIDDEN_START; + break scanLoop; + } + case AMP: + this.state = S_ENTITY; + this.entityReturnState = S_TEXT; + if (handler !== void 0) { + this.text += chunk.slice(start, this.prevI); + } + forbiddenState = FORBIDDEN_START; + break scanLoop; + case CLOSE_BRACKET: + switch (forbiddenState) { + case FORBIDDEN_START: + forbiddenState = FORBIDDEN_BRACKET; + break; + case FORBIDDEN_BRACKET: + forbiddenState = FORBIDDEN_BRACKET_BRACKET; + break; + case FORBIDDEN_BRACKET_BRACKET: + break; + default: + throw new Error("impossible state"); + } + break; + case GREATER: + if (forbiddenState === FORBIDDEN_BRACKET_BRACKET) { + this.fail('the string "]]>" is disallowed in char data.'); + } + forbiddenState = FORBIDDEN_START; + break; + case NL_LIKE: + if (handler !== void 0) { + this.text += `${chunk.slice(start, this.prevI)} +`; + } + start = this.i; + forbiddenState = FORBIDDEN_START; + break; + case EOC: + if (handler !== void 0) { + this.text += chunk.slice(start); + } + break scanLoop; + default: + forbiddenState = FORBIDDEN_START; + } + } + this.forbiddenState = forbiddenState; + } + handleTextOutsideRoot() { + let { i: start } = this; + const { chunk, textHandler: handler } = this; + let nonSpace = false; + outRootLoop: + while (true) { + const code = this.getCode(); + switch (code) { + case LESS: { + this.state = S_OPEN_WAKA; + if (handler !== void 0) { + const { text } = this; + const slice = chunk.slice(start, this.prevI); + if (text.length !== 0) { + handler(text + slice); + this.text = ""; + } else if (slice.length !== 0) { + handler(slice); + } + } + break outRootLoop; + } + case AMP: + this.state = S_ENTITY; + this.entityReturnState = S_TEXT; + if (handler !== void 0) { + this.text += chunk.slice(start, this.prevI); + } + nonSpace = true; + break outRootLoop; + case NL_LIKE: + if (handler !== void 0) { + this.text += `${chunk.slice(start, this.prevI)} +`; + } + start = this.i; + break; + case EOC: + if (handler !== void 0) { + this.text += chunk.slice(start); + } + break outRootLoop; + default: + if (!isS(code)) { + nonSpace = true; + } + } + } + if (!nonSpace) { + return; + } + if (!this.sawRoot && !this.reportedTextBeforeRoot) { + this.fail("text data outside of root node."); + this.reportedTextBeforeRoot = true; + } + if (this.closedRoot && !this.reportedTextAfterRoot) { + this.fail("text data outside of root node."); + this.reportedTextAfterRoot = true; + } + } + pushAttribNS(name, value) { + var _a; + const { prefix, local } = this.qname(name); + const attr = { name, prefix, local, value }; + this.attribList.push(attr); + (_a = this.attributeHandler) === null || _a === void 0 ? void 0 : _a.call(this, attr); + if (prefix === "xmlns") { + const trimmed = value.trim(); + if (this.currentXMLVersion === "1.0" && trimmed === "") { + this.fail("invalid attempt to undefine prefix in XML 1.0"); + } + this.topNS[local] = trimmed; + nsPairCheck(this, local, trimmed); + } else if (name === "xmlns") { + const trimmed = value.trim(); + this.topNS[""] = trimmed; + nsPairCheck(this, "", trimmed); + } + } + pushAttribPlain(name, value) { + var _a; + const attr = { name, value }; + this.attribList.push(attr); + (_a = this.attributeHandler) === null || _a === void 0 ? void 0 : _a.call(this, attr); + } + /** + * End parsing. This performs final well-formedness checks and resets the + * parser to a clean state. + * + * @returns this + */ + end() { + var _a, _b; + if (!this.sawRoot) { + this.fail("document must contain a root element."); + } + const { tags } = this; + while (tags.length > 0) { + const tag = tags.pop(); + this.fail(`unclosed tag: ${tag.name}`); + } + if (this.state !== S_BEGIN && this.state !== S_TEXT) { + this.fail("unexpected end."); + } + const { text } = this; + if (text.length !== 0) { + (_a = this.textHandler) === null || _a === void 0 ? void 0 : _a.call(this, text); + this.text = ""; + } + this._closed = true; + (_b = this.endHandler) === null || _b === void 0 ? void 0 : _b.call(this); + this._init(); + return this; + } + /** + * Resolve a namespace prefix. + * + * @param prefix The prefix to resolve. + * + * @returns The namespace URI or ``undefined`` if the prefix is not defined. + */ + resolve(prefix) { + var _a, _b; + let uri = this.topNS[prefix]; + if (uri !== void 0) { + return uri; + } + const { tags } = this; + for (let index = tags.length - 1; index >= 0; index--) { + uri = tags[index].ns[prefix]; + if (uri !== void 0) { + return uri; + } + } + uri = this.ns[prefix]; + if (uri !== void 0) { + return uri; + } + return (_b = (_a = this.opt).resolvePrefix) === null || _b === void 0 ? void 0 : _b.call(_a, prefix); + } + /** + * Parse a qname into its prefix and local name parts. + * + * @param name The name to parse + * + * @returns + */ + qname(name) { + const colon = name.indexOf(":"); + if (colon === -1) { + return { prefix: "", local: name }; + } + const local = name.slice(colon + 1); + const prefix = name.slice(0, colon); + if (prefix === "" || local === "" || local.includes(":")) { + this.fail(`malformed name: ${name}.`); + } + return { prefix, local }; + } + processAttribsNS() { + var _a; + const { attribList } = this; + const tag = this.tag; + { + const { prefix, local } = this.qname(tag.name); + tag.prefix = prefix; + tag.local = local; + const uri = tag.uri = (_a = this.resolve(prefix)) !== null && _a !== void 0 ? _a : ""; + if (prefix !== "") { + if (prefix === "xmlns") { + this.fail('tags may not have "xmlns" as prefix.'); + } + if (uri === "") { + this.fail(`unbound namespace prefix: ${JSON.stringify(prefix)}.`); + tag.uri = prefix; + } + } + } + if (attribList.length === 0) { + return; + } + const { attributes } = tag; + const seen = /* @__PURE__ */ new Set(); + for (const attr of attribList) { + const { name, prefix, local } = attr; + let uri; + let eqname; + if (prefix === "") { + uri = name === "xmlns" ? XMLNS_NAMESPACE : ""; + eqname = name; + } else { + uri = this.resolve(prefix); + if (uri === void 0) { + this.fail(`unbound namespace prefix: ${JSON.stringify(prefix)}.`); + uri = prefix; + } + eqname = `{${uri}}${local}`; + } + if (seen.has(eqname)) { + this.fail(`duplicate attribute: ${eqname}.`); + } + seen.add(eqname); + attr.uri = uri; + attributes[name] = attr; + } + this.attribList = []; + } + processAttribsPlain() { + const { attribList } = this; + const attributes = this.tag.attributes; + for (const { name, value } of attribList) { + if (attributes[name] !== void 0) { + this.fail(`duplicate attribute: ${name}.`); + } + attributes[name] = value; + } + this.attribList = []; + } + /** + * Handle a complete open tag. This parser code calls this once it has seen + * the whole tag. This method checks for well-formeness and then emits + * ``onopentag``. + */ + openTag() { + var _a; + this.processAttribs(); + const { tags } = this; + const tag = this.tag; + tag.isSelfClosing = false; + (_a = this.openTagHandler) === null || _a === void 0 ? void 0 : _a.call(this, tag); + tags.push(tag); + this.state = S_TEXT; + this.name = ""; + } + /** + * Handle a complete self-closing tag. This parser code calls this once it has + * seen the whole tag. This method checks for well-formeness and then emits + * ``onopentag`` and ``onclosetag``. + */ + openSelfClosingTag() { + var _a, _b, _c; + this.processAttribs(); + const { tags } = this; + const tag = this.tag; + tag.isSelfClosing = true; + (_a = this.openTagHandler) === null || _a === void 0 ? void 0 : _a.call(this, tag); + (_b = this.closeTagHandler) === null || _b === void 0 ? void 0 : _b.call(this, tag); + const top = this.tag = (_c = tags[tags.length - 1]) !== null && _c !== void 0 ? _c : null; + if (top === null) { + this.closedRoot = true; + } + this.state = S_TEXT; + this.name = ""; + } + /** + * Handle a complete close tag. This parser code calls this once it has seen + * the whole tag. This method checks for well-formeness and then emits + * ``onclosetag``. + */ + closeTag() { + const { tags, name } = this; + this.state = S_TEXT; + this.name = ""; + if (name === "") { + this.fail("weird empty close tag."); + this.text += ""; + return; + } + const handler = this.closeTagHandler; + let l2 = tags.length; + while (l2-- > 0) { + const tag = this.tag = tags.pop(); + this.topNS = tag.ns; + handler === null || handler === void 0 ? void 0 : handler(tag); + if (tag.name === name) { + break; + } + this.fail("unexpected close tag."); + } + if (l2 === 0) { + this.closedRoot = true; + } else if (l2 < 0) { + this.fail(`unmatched closing tag: ${name}.`); + this.text += ``; + } + } + /** + * Resolves an entity. Makes any necessary well-formedness checks. + * + * @param entity The entity to resolve. + * + * @returns The parsed entity. + */ + parseEntity(entity) { + if (entity[0] !== "#") { + const defined = this.ENTITIES[entity]; + if (defined !== void 0) { + return defined; + } + this.fail(this.isName(entity) ? "undefined entity." : "disallowed character in entity name."); + return `&${entity};`; + } + let num = NaN; + if (entity[1] === "x" && /^#x[0-9a-f]+$/i.test(entity)) { + num = parseInt(entity.slice(2), 16); + } else if (/^#[0-9]+$/.test(entity)) { + num = parseInt(entity.slice(1), 10); + } + if (!this.isChar(num)) { + this.fail("malformed character entity."); + return `&${entity};`; + } + return String.fromCodePoint(num); + } + }; + exports2.SaxesParser = SaxesParser; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/parse-sax.js +var require_parse_sax = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/parse-sax.js"(exports2, module2) { + var { SaxesParser } = require_saxes(); + var { PassThrough } = require_readable(); + var { bufferToString } = require_browser_buffer_decode(); + module2.exports = async function* (iterable) { + if (iterable.pipe && !iterable[Symbol.asyncIterator]) { + iterable = iterable.pipe(new PassThrough()); + } + const saxesParser = new SaxesParser(); + let error; + saxesParser.on("error", (err) => { + error = err; + }); + let events = []; + saxesParser.on("opentag", (value) => events.push({ eventType: "opentag", value })); + saxesParser.on("text", (value) => events.push({ eventType: "text", value })); + saxesParser.on("closetag", (value) => events.push({ eventType: "closetag", value })); + for await (const chunk of iterable) { + saxesParser.write(bufferToString(chunk)); + if (error) throw error; + yield events; + events = []; + } + }; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/base-xform.js +var require_base_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/base-xform.js"(exports2, module2) { + var parseSax = require_parse_sax(); + var XmlStream = require_xml_stream(); + var BaseXform = class _BaseXform { + // constructor(/* model, name */) {} + // ============================================================ + // Virtual Interface + prepare() { + } + render() { + } + parseOpen(node) { + } + parseText(text) { + } + parseClose(name) { + } + reconcile(model, options) { + } + // ============================================================ + reset() { + this.model = null; + if (this.map) { + Object.values(this.map).forEach((xform) => { + if (xform instanceof _BaseXform) { + xform.reset(); + } else if (xform.xform) { + xform.xform.reset(); + } + }); + } + } + mergeModel(obj2) { + this.model = Object.assign(this.model || {}, obj2); + } + async parse(saxParser) { + for await (const events of saxParser) { + for (const { eventType, value } of events) { + if (eventType === "opentag") { + this.parseOpen(value); + } else if (eventType === "text") { + this.parseText(value); + } else if (eventType === "closetag") { + if (!this.parseClose(value.name)) { + return this.model; + } + } + } + } + return this.model; + } + async parseStream(stream) { + return this.parse(parseSax(stream)); + } + get xml() { + return this.toXml(this.model); + } + toXml(model) { + const xmlStream = new XmlStream(); + this.render(xmlStream, model); + return xmlStream.xml; + } + // ============================================================ + // Useful Utilities + static toAttribute(value, dflt, always = false) { + if (value === void 0) { + if (always) { + return dflt; + } + } else if (always || value !== dflt) { + return value.toString(); + } + return void 0; + } + static toStringAttribute(value, dflt, always = false) { + return _BaseXform.toAttribute(value, dflt, always); + } + static toStringValue(attr, dflt) { + return attr === void 0 ? dflt : attr; + } + static toBoolAttribute(value, dflt, always = false) { + if (value === void 0) { + if (always) { + return dflt; + } + } else if (always || value !== dflt) { + return value ? "1" : "0"; + } + return void 0; + } + static toBoolValue(attr, dflt) { + return attr === void 0 ? dflt : attr === "1"; + } + static toIntAttribute(value, dflt, always = false) { + return _BaseXform.toAttribute(value, dflt, always); + } + static toIntValue(attr, dflt) { + return attr === void 0 ? dflt : parseInt(attr, 10); + } + static toFloatAttribute(value, dflt, always = false) { + return _BaseXform.toAttribute(value, dflt, always); + } + static toFloatValue(attr, dflt) { + return attr === void 0 ? dflt : parseFloat(attr); + } + }; + module2.exports = BaseXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/static-xform.js +var require_static_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/static-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var XmlStream = require_xml_stream(); + function build(xmlStream, model) { + xmlStream.openNode(model.tag, model.$); + if (model.c) { + model.c.forEach((child) => { + build(xmlStream, child); + }); + } + if (model.t) { + xmlStream.writeText(model.t); + } + xmlStream.closeNode(); + } + var StaticXform = class extends BaseXform { + constructor(model) { + super(); + this._model = model; + } + render(xmlStream) { + if (!this._xml) { + const stream = new XmlStream(); + build(stream, this._model); + this._xml = stream.xml; + } + xmlStream.writeXml(this._xml); + } + parseOpen() { + return true; + } + parseText() { + } + parseClose(name) { + switch (name) { + case this._model.tag: + return false; + default: + return true; + } + } + }; + module2.exports = StaticXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/list-xform.js +var require_list_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/list-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var ListXform = class extends BaseXform { + constructor(options) { + super(); + this.tag = options.tag; + this.always = !!options.always; + this.count = options.count; + this.empty = options.empty; + this.$count = options.$count || "count"; + this.$ = options.$; + this.childXform = options.childXform; + this.maxItems = options.maxItems; + } + prepare(model, options) { + const { childXform } = this; + if (model) { + model.forEach((childModel, index) => { + options.index = index; + childXform.prepare(childModel, options); + }); + } + } + render(xmlStream, model) { + if (this.always || model && model.length) { + xmlStream.openNode(this.tag, this.$); + if (this.count) { + xmlStream.addAttribute(this.$count, model && model.length || 0); + } + const { childXform } = this; + (model || []).forEach((childModel, index) => { + childXform.render(xmlStream, childModel, index); + }); + xmlStream.closeNode(); + } else if (this.empty) { + xmlStream.leafNode(this.tag); + } + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case this.tag: + this.model = []; + return true; + default: + if (this.childXform.parseOpen(node)) { + this.parser = this.childXform; + return true; + } + return false; + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.model.push(this.parser.model); + this.parser = void 0; + if (this.maxItems && this.model.length > this.maxItems) { + throw new Error(`Max ${this.childXform.tag} count (${this.maxItems}) exceeded`); + } + } + return true; + } + return false; + } + reconcile(model, options) { + if (model) { + const { childXform } = this; + model.forEach((childModel) => { + childXform.reconcile(childModel, options); + }); + } + } + }; + module2.exports = ListXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/color-xform.js +var require_color_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/color-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var ColorXform = class extends BaseXform { + constructor(name) { + super(); + this.name = name || "color"; + } + get tag() { + return this.name; + } + render(xmlStream, model) { + if (model) { + xmlStream.openNode(this.name); + if (model.argb) { + xmlStream.addAttribute("rgb", model.argb); + } else if (model.theme !== void 0) { + xmlStream.addAttribute("theme", model.theme); + if (model.tint !== void 0) { + xmlStream.addAttribute("tint", model.tint); + } + } else if (model.indexed !== void 0) { + xmlStream.addAttribute("indexed", model.indexed); + } else { + xmlStream.addAttribute("auto", "1"); + } + xmlStream.closeNode(); + return true; + } + return false; + } + parseOpen(node) { + if (node.name === this.name) { + if (node.attributes.rgb) { + this.model = { argb: node.attributes.rgb }; + } else if (node.attributes.theme) { + this.model = { theme: parseInt(node.attributes.theme, 10) }; + if (node.attributes.tint) { + this.model.tint = parseFloat(node.attributes.tint); + } + } else if (node.attributes.indexed) { + this.model = { indexed: parseInt(node.attributes.indexed, 10) }; + } else { + this.model = void 0; + } + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = ColorXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/simple/boolean-xform.js +var require_boolean_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/simple/boolean-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var BooleanXform = class extends BaseXform { + constructor(options) { + super(); + this.tag = options.tag; + this.attr = options.attr; + } + render(xmlStream, model) { + if (model) { + xmlStream.openNode(this.tag); + xmlStream.closeNode(); + } + } + parseOpen(node) { + if (node.name === this.tag) { + this.model = true; + } + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = BooleanXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/simple/integer-xform.js +var require_integer_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/simple/integer-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var IntegerXform = class extends BaseXform { + constructor(options) { + super(); + this.tag = options.tag; + this.attr = options.attr; + this.attrs = options.attrs; + this.zero = options.zero; + } + render(xmlStream, model) { + if (model || this.zero) { + xmlStream.openNode(this.tag); + if (this.attrs) { + xmlStream.addAttributes(this.attrs); + } + if (this.attr) { + xmlStream.addAttribute(this.attr, model); + } else { + xmlStream.writeText(model); + } + xmlStream.closeNode(); + } + } + parseOpen(node) { + if (node.name === this.tag) { + if (this.attr) { + this.model = parseInt(node.attributes[this.attr], 10); + } else { + this.text = []; + } + return true; + } + return false; + } + parseText(text) { + if (!this.attr) { + this.text.push(text); + } + } + parseClose() { + if (!this.attr) { + this.model = parseInt(this.text.join("") || 0, 10); + } + return false; + } + }; + module2.exports = IntegerXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/simple/string-xform.js +var require_string_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/simple/string-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var StringXform = class extends BaseXform { + constructor(options) { + super(); + this.tag = options.tag; + this.attr = options.attr; + this.attrs = options.attrs; + } + render(xmlStream, model) { + if (model !== void 0) { + xmlStream.openNode(this.tag); + if (this.attrs) { + xmlStream.addAttributes(this.attrs); + } + if (this.attr) { + xmlStream.addAttribute(this.attr, model); + } else { + xmlStream.writeText(model); + } + xmlStream.closeNode(); + } + } + parseOpen(node) { + if (node.name === this.tag) { + if (this.attr) { + this.model = node.attributes[this.attr]; + } else { + this.text = []; + } + } + } + parseText(text) { + if (!this.attr) { + this.text.push(text); + } + } + parseClose() { + if (!this.attr) { + this.model = this.text.join(""); + } + return false; + } + }; + module2.exports = StringXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/underline-xform.js +var require_underline_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/underline-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var UnderlineXform = class _UnderlineXform extends BaseXform { + constructor(model) { + super(); + this.model = model; + } + get tag() { + return "u"; + } + render(xmlStream, model) { + model = model || this.model; + if (model === true) { + xmlStream.leafNode("u"); + } else { + const attr = _UnderlineXform.Attributes[model]; + if (attr) { + xmlStream.leafNode("u", attr); + } + } + } + parseOpen(node) { + if (node.name === "u") { + this.model = node.attributes.val || true; + } + } + parseText() { + } + parseClose() { + return false; + } + }; + UnderlineXform.Attributes = { + single: {}, + double: { val: "double" }, + singleAccounting: { val: "singleAccounting" }, + doubleAccounting: { val: "doubleAccounting" } + }; + module2.exports = UnderlineXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/font-xform.js +var require_font_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/font-xform.js"(exports2, module2) { + "use strict"; + var ColorXform = require_color_xform(); + var BooleanXform = require_boolean_xform(); + var IntegerXform = require_integer_xform(); + var StringXform = require_string_xform(); + var UnderlineXform = require_underline_xform(); + var _2 = require_under_dash(); + var BaseXform = require_base_xform(); + var FontXform = class _FontXform extends BaseXform { + constructor(options) { + super(); + this.options = options || _FontXform.OPTIONS; + this.map = { + b: { prop: "bold", xform: new BooleanXform({ tag: "b", attr: "val" }) }, + i: { prop: "italic", xform: new BooleanXform({ tag: "i", attr: "val" }) }, + u: { prop: "underline", xform: new UnderlineXform() }, + charset: { prop: "charset", xform: new IntegerXform({ tag: "charset", attr: "val" }) }, + color: { prop: "color", xform: new ColorXform() }, + condense: { prop: "condense", xform: new BooleanXform({ tag: "condense", attr: "val" }) }, + extend: { prop: "extend", xform: new BooleanXform({ tag: "extend", attr: "val" }) }, + family: { prop: "family", xform: new IntegerXform({ tag: "family", attr: "val" }) }, + outline: { prop: "outline", xform: new BooleanXform({ tag: "outline", attr: "val" }) }, + vertAlign: { prop: "vertAlign", xform: new StringXform({ tag: "vertAlign", attr: "val" }) }, + scheme: { prop: "scheme", xform: new StringXform({ tag: "scheme", attr: "val" }) }, + shadow: { prop: "shadow", xform: new BooleanXform({ tag: "shadow", attr: "val" }) }, + strike: { prop: "strike", xform: new BooleanXform({ tag: "strike", attr: "val" }) }, + sz: { prop: "size", xform: new IntegerXform({ tag: "sz", attr: "val" }) } + }; + this.map[this.options.fontNameTag] = { + prop: "name", + xform: new StringXform({ tag: this.options.fontNameTag, attr: "val" }) + }; + } + get tag() { + return this.options.tagName; + } + render(xmlStream, model) { + const { map } = this; + xmlStream.openNode(this.options.tagName); + _2.each(this.map, (defn, tag) => { + map[tag].xform.render(xmlStream, model[defn.prop]); + }); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + if (this.map[node.name]) { + this.parser = this.map[node.name].xform; + return this.parser.parseOpen(node); + } + switch (node.name) { + case this.options.tagName: + this.model = {}; + return true; + default: + return false; + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser && !this.parser.parseClose(name)) { + const item = this.map[name]; + if (this.parser.model) { + this.model[item.prop] = this.parser.model; + } + this.parser = void 0; + return true; + } + switch (name) { + case this.options.tagName: + return false; + default: + return true; + } + } + }; + FontXform.OPTIONS = { + tagName: "font", + fontNameTag: "name" + }; + module2.exports = FontXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/fill-xform.js +var require_fill_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/fill-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var ColorXform = require_color_xform(); + var StopXform = class extends BaseXform { + constructor() { + super(); + this.map = { + color: new ColorXform() + }; + } + get tag() { + return "stop"; + } + render(xmlStream, model) { + xmlStream.openNode("stop"); + xmlStream.addAttribute("position", model.position); + this.map.color.render(xmlStream, model.color); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "stop": + this.model = { + position: parseFloat(node.attributes.position) + }; + return true; + case "color": + this.parser = this.map.color; + this.parser.parseOpen(node); + return true; + default: + return false; + } + } + parseText() { + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.model.color = this.parser.model; + this.parser = void 0; + } + return true; + } + return false; + } + }; + var PatternFillXform = class extends BaseXform { + constructor() { + super(); + this.map = { + fgColor: new ColorXform("fgColor"), + bgColor: new ColorXform("bgColor") + }; + } + get name() { + return "pattern"; + } + get tag() { + return "patternFill"; + } + render(xmlStream, model) { + xmlStream.openNode("patternFill"); + xmlStream.addAttribute("patternType", model.pattern); + if (model.fgColor) { + this.map.fgColor.render(xmlStream, model.fgColor); + } + if (model.bgColor) { + this.map.bgColor.render(xmlStream, model.bgColor); + } + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "patternFill": + this.model = { + type: "pattern", + pattern: node.attributes.patternType + }; + return true; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + return false; + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + if (this.parser.model) { + this.model[name] = this.parser.model; + } + this.parser = void 0; + } + return true; + } + return false; + } + }; + var GradientFillXform = class extends BaseXform { + constructor() { + super(); + this.map = { + stop: new StopXform() + }; + } + get name() { + return "gradient"; + } + get tag() { + return "gradientFill"; + } + render(xmlStream, model) { + xmlStream.openNode("gradientFill"); + switch (model.gradient) { + case "angle": + xmlStream.addAttribute("degree", model.degree); + break; + case "path": + xmlStream.addAttribute("type", "path"); + if (model.center.left) { + xmlStream.addAttribute("left", model.center.left); + if (model.center.right === void 0) { + xmlStream.addAttribute("right", model.center.left); + } + } + if (model.center.right) { + xmlStream.addAttribute("right", model.center.right); + } + if (model.center.top) { + xmlStream.addAttribute("top", model.center.top); + if (model.center.bottom === void 0) { + xmlStream.addAttribute("bottom", model.center.top); + } + } + if (model.center.bottom) { + xmlStream.addAttribute("bottom", model.center.bottom); + } + break; + default: + break; + } + const stopXform = this.map.stop; + model.stops.forEach((stopModel) => { + stopXform.render(xmlStream, stopModel); + }); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "gradientFill": { + const model = this.model = { + stops: [] + }; + if (node.attributes.degree) { + model.gradient = "angle"; + model.degree = parseInt(node.attributes.degree, 10); + } else if (node.attributes.type === "path") { + model.gradient = "path"; + model.center = { + left: node.attributes.left ? parseFloat(node.attributes.left) : 0, + top: node.attributes.top ? parseFloat(node.attributes.top) : 0 + }; + if (node.attributes.right !== node.attributes.left) { + model.center.right = node.attributes.right ? parseFloat(node.attributes.right) : 0; + } + if (node.attributes.bottom !== node.attributes.top) { + model.center.bottom = node.attributes.bottom ? parseFloat(node.attributes.bottom) : 0; + } + } + return true; + } + case "stop": + this.parser = this.map.stop; + this.parser.parseOpen(node); + return true; + default: + return false; + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.model.stops.push(this.parser.model); + this.parser = void 0; + } + return true; + } + return false; + } + }; + var FillXform = class _FillXform extends BaseXform { + constructor() { + super(); + this.map = { + patternFill: new PatternFillXform(), + gradientFill: new GradientFillXform() + }; + } + get tag() { + return "fill"; + } + render(xmlStream, model) { + xmlStream.addRollback(); + xmlStream.openNode("fill"); + switch (model.type) { + case "pattern": + this.map.patternFill.render(xmlStream, model); + break; + case "gradient": + this.map.gradientFill.render(xmlStream, model); + break; + default: + xmlStream.rollback(); + return; + } + xmlStream.closeNode(); + xmlStream.commit(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "fill": + this.model = {}; + return true; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + return false; + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.model = this.parser.model; + this.model.type = this.parser.name; + this.parser = void 0; + } + return true; + } + return false; + } + validStyle(value) { + return _FillXform.validPatternValues[value]; + } + }; + FillXform.validPatternValues = [ + "none", + "solid", + "darkVertical", + "darkGray", + "mediumGray", + "lightGray", + "gray125", + "gray0625", + "darkHorizontal", + "darkVertical", + "darkDown", + "darkUp", + "darkGrid", + "darkTrellis", + "lightHorizontal", + "lightVertical", + "lightDown", + "lightUp", + "lightGrid", + "lightTrellis", + "lightGrid" + ].reduce((p, v) => { + p[v] = true; + return p; + }, {}); + FillXform.StopXform = StopXform; + FillXform.PatternFillXform = PatternFillXform; + FillXform.GradientFillXform = GradientFillXform; + module2.exports = FillXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/border-xform.js +var require_border_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/border-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var utils = require_utils13(); + var ColorXform = require_color_xform(); + var EdgeXform = class _EdgeXform extends BaseXform { + constructor(name) { + super(); + this.name = name; + this.map = { + color: new ColorXform() + }; + } + get tag() { + return this.name; + } + render(xmlStream, model, defaultColor) { + const color = model && model.color || defaultColor || this.defaultColor; + xmlStream.openNode(this.name); + if (model && model.style) { + xmlStream.addAttribute("style", model.style); + if (color) { + this.map.color.render(xmlStream, color); + } + } + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case this.name: { + const { style } = node.attributes; + if (style) { + this.model = { + style + }; + } else { + this.model = void 0; + } + return true; + } + case "color": + this.parser = this.map.color; + this.parser.parseOpen(node); + return true; + default: + return false; + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + if (name === this.name) { + if (this.map.color.model) { + if (!this.model) { + this.model = {}; + } + this.model.color = this.map.color.model; + } + } + return false; + } + validStyle(value) { + return _EdgeXform.validStyleValues[value]; + } + }; + EdgeXform.validStyleValues = [ + "thin", + "dashed", + "dotted", + "dashDot", + "hair", + "dashDotDot", + "slantDashDot", + "mediumDashed", + "mediumDashDotDot", + "mediumDashDot", + "medium", + "double", + "thick" + ].reduce((p, v) => { + p[v] = true; + return p; + }, {}); + var BorderXform = class extends BaseXform { + constructor() { + super(); + this.map = { + top: new EdgeXform("top"), + left: new EdgeXform("left"), + bottom: new EdgeXform("bottom"), + right: new EdgeXform("right"), + diagonal: new EdgeXform("diagonal") + }; + } + render(xmlStream, model) { + const { color } = model; + xmlStream.openNode("border"); + if (model.diagonal && model.diagonal.style) { + if (model.diagonal.up) { + xmlStream.addAttribute("diagonalUp", "1"); + } + if (model.diagonal.down) { + xmlStream.addAttribute("diagonalDown", "1"); + } + } + function add(edgeModel, edgeXform) { + if (edgeModel && !edgeModel.color && model.color) { + edgeModel = { + ...edgeModel, + color: model.color + }; + } + edgeXform.render(xmlStream, edgeModel, color); + } + add(model.left, this.map.left); + add(model.right, this.map.right); + add(model.top, this.map.top); + add(model.bottom, this.map.bottom); + add(model.diagonal, this.map.diagonal); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "border": + this.reset(); + this.diagonalUp = utils.parseBoolean(node.attributes.diagonalUp); + this.diagonalDown = utils.parseBoolean(node.attributes.diagonalDown); + return true; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + return false; + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + if (name === "border") { + const model = this.model = {}; + const add = function(key, edgeModel, extensions) { + if (edgeModel) { + if (extensions) { + Object.assign(edgeModel, extensions); + } + model[key] = edgeModel; + } + }; + add("left", this.map.left.model); + add("right", this.map.right.model); + add("top", this.map.top.model); + add("bottom", this.map.bottom.model); + add("diagonal", this.map.diagonal.model, { up: this.diagonalUp, down: this.diagonalDown }); + } + return false; + } + }; + module2.exports = BorderXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/defaultnumformats.js +var require_defaultnumformats = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/defaultnumformats.js"(exports2, module2) { + module2.exports = { + 0: { f: "General" }, + 1: { f: "0" }, + 2: { f: "0.00" }, + 3: { f: "#,##0" }, + 4: { f: "#,##0.00" }, + 9: { f: "0%" }, + 10: { f: "0.00%" }, + 11: { f: "0.00E+00" }, + 12: { f: "# ?/?" }, + 13: { f: "# ??/??" }, + 14: { f: "mm-dd-yy" }, + 15: { f: "d-mmm-yy" }, + 16: { f: "d-mmm" }, + 17: { f: "mmm-yy" }, + 18: { f: "h:mm AM/PM" }, + 19: { f: "h:mm:ss AM/PM" }, + 20: { f: "h:mm" }, + 21: { f: "h:mm:ss" }, + 22: { f: 'm/d/yy "h":mm' }, + 27: { + "zh-tw": "[$-404]e/m/d", + "zh-cn": 'yyyy"\u5E74"m"\u6708"', + "ja-jp": "[$-411]ge.m.d", + "ko-kr": 'yyyy"\u5E74" mm"\u6708" dd"\u65E5"' + }, + 28: { + "zh-tw": '[$-404]e"\u5E74"m"\u6708"d"\u65E5"', + "zh-cn": 'm"\u6708"d"\u65E5"', + "ja-jp": '[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"', + "ko-kr": "mm-dd" + }, + 29: { + "zh-tw": '[$-404]e"\u5E74"m"\u6708"d"\u65E5"', + "zh-cn": 'm"\u6708"d"\u65E5"', + "ja-jp": '[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"', + "ko-kr": "mm-dd" + }, + 30: { "zh-tw": "m/d/yy ", "zh-cn": "m-d-yy", "ja-jp": "m/d/yy", "ko-kr": "mm-dd-yy" }, + 31: { + "zh-tw": 'yyyy"\u5E74"m"\u6708"d"\u65E5"', + "zh-cn": 'yyyy"\u5E74"m"\u6708"d"\u65E5"', + "ja-jp": 'yyyy"\u5E74"m"\u6708"d"\u65E5"', + "ko-kr": 'yyyy"\uB144" mm"\uC6D4" dd"\uC77C"' + }, + 32: { + "zh-tw": 'hh"\u6642"mm"\u5206"', + "zh-cn": 'h"\u65F6"mm"\u5206"', + "ja-jp": 'h"\u6642"mm"\u5206"', + "ko-kr": 'h"\uC2DC" mm"\uBD84"' + }, + 33: { + "zh-tw": 'hh"\u6642"mm"\u5206"ss"\u79D2"', + "zh-cn": 'h"\u65F6"mm"\u5206"ss"\u79D2"', + "ja-jp": 'h"\u6642"mm"\u5206"ss"\u79D2"', + "ko-kr": 'h"\uC2DC" mm"\uBD84" ss"\uCD08"' + }, + 34: { + "zh-tw": '\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"', + "zh-cn": '\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"', + "ja-jp": 'yyyy"\u5E74"m"\u6708"', + "ko-kr": "yyyy-mm-dd" + }, + 35: { + "zh-tw": '\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"ss"\u79D2"', + "zh-cn": '\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"ss"\u79D2"', + "ja-jp": 'm"\u6708"d"\u65E5"', + "ko-kr": "yyyy-mm-dd" + }, + 36: { + "zh-tw": "[$-404]e/m/d", + "zh-cn": 'yyyy"\u5E74"m"\u6708"', + "ja-jp": "[$-411]ge.m.d", + "ko-kr": 'yyyy"\u5E74" mm"\u6708" dd"\u65E5"' + }, + 37: { f: "#,##0 ;(#,##0)" }, + 38: { f: "#,##0 ;[Red](#,##0)" }, + 39: { f: "#,##0.00 ;(#,##0.00)" }, + 40: { f: "#,##0.00 ;[Red](#,##0.00)" }, + 45: { f: "mm:ss" }, + 46: { f: "[h]:mm:ss" }, + 47: { f: "mmss.0" }, + 48: { f: "##0.0E+0" }, + 49: { f: "@" }, + 50: { + "zh-tw": "[$-404]e/m/d", + "zh-cn": 'yyyy"\u5E74"m"\u6708"', + "ja-jp": "[$-411]ge.m.d", + "ko-kr": 'yyyy"\u5E74" mm"\u6708" dd"\u65E5"' + }, + 51: { + "zh-tw": '[$-404]e"\u5E74"m"\u6708"d"\u65E5"', + "zh-cn": 'm"\u6708"d"\u65E5"', + "ja-jp": '[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"', + "ko-kr": "mm-dd" + }, + 52: { + "zh-tw": '\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"', + "zh-cn": 'yyyy"\u5E74"m"\u6708"', + "ja-jp": 'yyyy"\u5E74"m"\u6708"', + "ko-kr": "yyyy-mm-dd" + }, + 53: { + "zh-tw": '\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"ss"\u79D2"', + "zh-cn": 'm"\u6708"d"\u65E5"', + "ja-jp": 'm"\u6708"d"\u65E5"', + "ko-kr": "yyyy-mm-dd" + }, + 54: { + "zh-tw": '[$-404]e"\u5E74"m"\u6708"d"\u65E5"', + "zh-cn": 'm"\u6708"d"\u65E5"', + "ja-jp": '[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"', + "ko-kr": "mm-dd" + }, + 55: { + "zh-tw": '\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"', + "zh-cn": '\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"', + "ja-jp": 'yyyy"\u5E74"m"\u6708"', + "ko-kr": "yyyy-mm-dd" + }, + 56: { + "zh-tw": '\u4E0A\u5348/\u4E0B\u5348 hh"\u6642"mm"\u5206"ss"\u79D2"', + "zh-cn": '\u4E0A\u5348/\u4E0B\u5348 h"\u65F6"mm"\u5206"ss"\u79D2"', + "ja-jp": 'm"\u6708"d"\u65E5"', + "ko-kr": "yyyy-mm-dd" + }, + 57: { + "zh-tw": "[$-404]e/m/d", + "zh-cn": 'yyyy"\u5E74"m"\u6708"', + "ja-jp": "[$-411]ge.m.d", + "ko-kr": 'yyyy"\u5E74" mm"\u6708" dd"\u65E5"' + }, + 58: { + "zh-tw": '[$-404]e"\u5E74"m"\u6708"d"\u65E5"', + "zh-cn": 'm"\u6708"d"\u65E5"', + "ja-jp": '[$-411]ggge"\u5E74"m"\u6708"d"\u65E5"', + "ko-kr": "mm-dd" + }, + 59: { "th-th": "t0" }, + 60: { "th-th": "t0.00" }, + 61: { "th-th": "t#,##0" }, + 62: { "th-th": "t#,##0.00" }, + 67: { "th-th": "t0%" }, + 68: { "th-th": "t0.00%" }, + 69: { "th-th": "t# ?/?" }, + 70: { "th-th": "t# ??/??" }, + 81: { "th-th": "d/m/bb" } + }; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/numfmt-xform.js +var require_numfmt_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/numfmt-xform.js"(exports2, module2) { + var _2 = require_under_dash(); + var defaultNumFormats = require_defaultnumformats(); + var BaseXform = require_base_xform(); + function hashDefaultFormats() { + const hash = {}; + _2.each(defaultNumFormats, (dnf, id) => { + if (dnf.f) { + hash[dnf.f] = parseInt(id, 10); + } + }); + return hash; + } + var defaultFmtHash = hashDefaultFormats(); + var NumFmtXform = class extends BaseXform { + constructor(id, formatCode) { + super(); + this.id = id; + this.formatCode = formatCode; + } + get tag() { + return "numFmt"; + } + render(xmlStream, model) { + xmlStream.leafNode("numFmt", { numFmtId: model.id, formatCode: model.formatCode }); + } + parseOpen(node) { + switch (node.name) { + case "numFmt": + this.model = { + id: parseInt(node.attributes.numFmtId, 10), + formatCode: node.attributes.formatCode.replace(/[\\](.)/g, "$1") + }; + return true; + default: + return false; + } + } + parseText() { + } + parseClose() { + return false; + } + }; + NumFmtXform.getDefaultFmtId = function getDefaultFmtId(formatCode) { + return defaultFmtHash[formatCode]; + }; + NumFmtXform.getDefaultFmtCode = function getDefaultFmtCode(numFmtId) { + return defaultNumFormats[numFmtId] && defaultNumFormats[numFmtId].f; + }; + module2.exports = NumFmtXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/alignment-xform.js +var require_alignment_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/alignment-xform.js"(exports2, module2) { + var Enums = require_enums3(); + var utils = require_utils13(); + var BaseXform = require_base_xform(); + var validation = { + horizontalValues: [ + "left", + "center", + "right", + "fill", + "centerContinuous", + "distributed", + "justify" + ].reduce((p, v) => { + p[v] = true; + return p; + }, {}), + horizontal(value) { + return this.horizontalValues[value] ? value : void 0; + }, + verticalValues: ["top", "middle", "bottom", "distributed", "justify"].reduce((p, v) => { + p[v] = true; + return p; + }, {}), + vertical(value) { + if (value === "middle") return "center"; + return this.verticalValues[value] ? value : void 0; + }, + wrapText(value) { + return value ? true : void 0; + }, + shrinkToFit(value) { + return value ? true : void 0; + }, + textRotation(value) { + switch (value) { + case "vertical": + return value; + default: + value = utils.validInt(value); + return value >= -90 && value <= 90 ? value : void 0; + } + }, + indent(value) { + value = utils.validInt(value); + return Math.max(0, value); + }, + readingOrder(value) { + switch (value) { + case "ltr": + return Enums.ReadingOrder.LeftToRight; + case "rtl": + return Enums.ReadingOrder.RightToLeft; + default: + return void 0; + } + } + }; + var textRotationXform = { + toXml(textRotation) { + textRotation = validation.textRotation(textRotation); + if (textRotation) { + if (textRotation === "vertical") { + return 255; + } + const tr = Math.round(textRotation); + if (tr >= 0 && tr <= 90) { + return tr; + } + if (tr < 0 && tr >= -90) { + return 90 - tr; + } + } + return void 0; + }, + toModel(textRotation) { + const tr = utils.validInt(textRotation); + if (tr !== void 0) { + if (tr === 255) { + return "vertical"; + } + if (tr >= 0 && tr <= 90) { + return tr; + } + if (tr > 90 && tr <= 180) { + return 90 - tr; + } + } + return void 0; + } + }; + var AlignmentXform = class extends BaseXform { + get tag() { + return "alignment"; + } + render(xmlStream, model) { + xmlStream.addRollback(); + xmlStream.openNode("alignment"); + let isValid = false; + function add(name, value) { + if (value) { + xmlStream.addAttribute(name, value); + isValid = true; + } + } + add("horizontal", validation.horizontal(model.horizontal)); + add("vertical", validation.vertical(model.vertical)); + add("wrapText", validation.wrapText(model.wrapText) ? "1" : false); + add("shrinkToFit", validation.shrinkToFit(model.shrinkToFit) ? "1" : false); + add("indent", validation.indent(model.indent)); + add("textRotation", textRotationXform.toXml(model.textRotation)); + add("readingOrder", validation.readingOrder(model.readingOrder)); + xmlStream.closeNode(); + if (isValid) { + xmlStream.commit(); + } else { + xmlStream.rollback(); + } + } + parseOpen(node) { + const model = {}; + let valid = false; + function add(truthy, name, value) { + if (truthy) { + model[name] = value; + valid = true; + } + } + add(node.attributes.horizontal, "horizontal", node.attributes.horizontal); + add( + node.attributes.vertical, + "vertical", + node.attributes.vertical === "center" ? "middle" : node.attributes.vertical + ); + add(node.attributes.wrapText, "wrapText", utils.parseBoolean(node.attributes.wrapText)); + add(node.attributes.shrinkToFit, "shrinkToFit", utils.parseBoolean(node.attributes.shrinkToFit)); + add(node.attributes.indent, "indent", parseInt(node.attributes.indent, 10)); + add( + node.attributes.textRotation, + "textRotation", + textRotationXform.toModel(node.attributes.textRotation) + ); + add( + node.attributes.readingOrder, + "readingOrder", + node.attributes.readingOrder === "2" ? "rtl" : "ltr" + ); + this.model = valid ? model : null; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = AlignmentXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/protection-xform.js +var require_protection_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/protection-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var validation = { + boolean(value, dflt) { + if (value === void 0) { + return dflt; + } + return value; + } + }; + var ProtectionXform = class extends BaseXform { + get tag() { + return "protection"; + } + render(xmlStream, model) { + xmlStream.addRollback(); + xmlStream.openNode("protection"); + let isValid = false; + function add(name, value) { + if (value !== void 0) { + xmlStream.addAttribute(name, value); + isValid = true; + } + } + add("locked", validation.boolean(model.locked, true) ? void 0 : "0"); + add("hidden", validation.boolean(model.hidden, false) ? "1" : void 0); + xmlStream.closeNode(); + if (isValid) { + xmlStream.commit(); + } else { + xmlStream.rollback(); + } + } + parseOpen(node) { + const model = { + locked: !(node.attributes.locked === "0"), + hidden: node.attributes.hidden === "1" + }; + const isSignificant = !model.locked || model.hidden; + this.model = isSignificant ? model : null; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = ProtectionXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/style-xform.js +var require_style_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/style-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var AlignmentXform = require_alignment_xform(); + var ProtectionXform = require_protection_xform(); + var StyleXform = class extends BaseXform { + constructor(options) { + super(); + this.xfId = !!(options && options.xfId); + this.map = { + alignment: new AlignmentXform(), + protection: new ProtectionXform() + }; + } + get tag() { + return "xf"; + } + render(xmlStream, model) { + xmlStream.openNode("xf", { + numFmtId: model.numFmtId || 0, + fontId: model.fontId || 0, + fillId: model.fillId || 0, + borderId: model.borderId || 0 + }); + if (this.xfId) { + xmlStream.addAttribute("xfId", model.xfId || 0); + } + if (model.numFmtId) { + xmlStream.addAttribute("applyNumberFormat", "1"); + } + if (model.fontId) { + xmlStream.addAttribute("applyFont", "1"); + } + if (model.fillId) { + xmlStream.addAttribute("applyFill", "1"); + } + if (model.borderId) { + xmlStream.addAttribute("applyBorder", "1"); + } + if (model.alignment) { + xmlStream.addAttribute("applyAlignment", "1"); + } + if (model.protection) { + xmlStream.addAttribute("applyProtection", "1"); + } + if (model.alignment) { + this.map.alignment.render(xmlStream, model.alignment); + } + if (model.protection) { + this.map.protection.render(xmlStream, model.protection); + } + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "xf": + this.model = { + numFmtId: parseInt(node.attributes.numFmtId, 10), + fontId: parseInt(node.attributes.fontId, 10), + fillId: parseInt(node.attributes.fillId, 10), + borderId: parseInt(node.attributes.borderId, 10) + }; + if (this.xfId) { + this.model.xfId = parseInt(node.attributes.xfId, 10); + } + return true; + case "alignment": + this.parser = this.map.alignment; + this.parser.parseOpen(node); + return true; + case "protection": + this.parser = this.map.protection; + this.parser.parseOpen(node); + return true; + default: + return false; + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + if (this.map.protection === this.parser) { + this.model.protection = this.parser.model; + } else { + this.model.alignment = this.parser.model; + } + this.parser = void 0; + } + return true; + } + return name !== "xf"; + } + }; + module2.exports = StyleXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/dxf-xform.js +var require_dxf_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/dxf-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var AlignmentXform = require_alignment_xform(); + var BorderXform = require_border_xform(); + var FillXform = require_fill_xform(); + var FontXform = require_font_xform(); + var NumFmtXform = require_numfmt_xform(); + var ProtectionXform = require_protection_xform(); + var DxfXform = class extends BaseXform { + constructor() { + super(); + this.map = { + alignment: new AlignmentXform(), + border: new BorderXform(), + fill: new FillXform(), + font: new FontXform(), + numFmt: new NumFmtXform(), + protection: new ProtectionXform() + }; + } + get tag() { + return "dxf"; + } + // how do we generate dxfid? + render(xmlStream, model) { + xmlStream.openNode(this.tag); + if (model.font) { + this.map.font.render(xmlStream, model.font); + } + if (model.numFmt && model.numFmtId) { + const numFmtModel = { id: model.numFmtId, formatCode: model.numFmt }; + this.map.numFmt.render(xmlStream, numFmtModel); + } + if (model.fill) { + this.map.fill.render(xmlStream, model.fill); + } + if (model.alignment) { + this.map.alignment.render(xmlStream, model.alignment); + } + if (model.border) { + this.map.border.render(xmlStream, model.border); + } + if (model.protection) { + this.map.protection.render(xmlStream, model.protection); + } + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case this.tag: + this.reset(); + return true; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + } + return true; + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + if (name === this.tag) { + this.model = { + alignment: this.map.alignment.model, + border: this.map.border.model, + fill: this.map.fill.model, + font: this.map.font.model, + numFmt: this.map.numFmt.model, + protection: this.map.protection.model + }; + return false; + } + return true; + } + }; + module2.exports = DxfXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/styles-xform.js +var require_styles_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/style/styles-xform.js"(exports2, module2) { + var Enums = require_enums3(); + var XmlStream = require_xml_stream(); + var BaseXform = require_base_xform(); + var StaticXform = require_static_xform(); + var ListXform = require_list_xform(); + var FontXform = require_font_xform(); + var FillXform = require_fill_xform(); + var BorderXform = require_border_xform(); + var NumFmtXform = require_numfmt_xform(); + var StyleXform = require_style_xform(); + var DxfXform = require_dxf_xform(); + var NUMFMT_BASE = 164; + var StylesXform = class _StylesXform extends BaseXform { + constructor(initialise) { + super(); + this.map = { + numFmts: new ListXform({ tag: "numFmts", count: true, childXform: new NumFmtXform() }), + fonts: new ListXform({ + tag: "fonts", + count: true, + childXform: new FontXform(), + $: { "x14ac:knownFonts": 1 } + }), + fills: new ListXform({ tag: "fills", count: true, childXform: new FillXform() }), + borders: new ListXform({ tag: "borders", count: true, childXform: new BorderXform() }), + cellStyleXfs: new ListXform({ tag: "cellStyleXfs", count: true, childXform: new StyleXform() }), + cellXfs: new ListXform({ + tag: "cellXfs", + count: true, + childXform: new StyleXform({ xfId: true }) + }), + dxfs: new ListXform({ tag: "dxfs", always: true, count: true, childXform: new DxfXform() }), + // for style manager + numFmt: new NumFmtXform(), + font: new FontXform(), + fill: new FillXform(), + border: new BorderXform(), + style: new StyleXform({ xfId: true }), + cellStyles: _StylesXform.STATIC_XFORMS.cellStyles, + tableStyles: _StylesXform.STATIC_XFORMS.tableStyles, + extLst: _StylesXform.STATIC_XFORMS.extLst + }; + if (initialise) { + this.init(); + } + } + initIndex() { + this.index = { + style: {}, + numFmt: {}, + numFmtNextId: 164, + // start custom format ids here + font: {}, + border: {}, + fill: {} + }; + } + init() { + this.model = { + styles: [], + numFmts: [], + fonts: [], + borders: [], + fills: [], + dxfs: [] + }; + this.initIndex(); + this._addBorder({}); + this._addStyle({ numFmtId: 0, fontId: 0, fillId: 0, borderId: 0, xfId: 0 }); + this._addFill({ type: "pattern", pattern: "none" }); + this._addFill({ type: "pattern", pattern: "gray125" }); + this.weakMap = /* @__PURE__ */ new WeakMap(); + } + render(xmlStream, model) { + model = model || this.model; + xmlStream.openXml(XmlStream.StdDocAttributes); + xmlStream.openNode("styleSheet", _StylesXform.STYLESHEET_ATTRIBUTES); + if (this.index) { + if (model.numFmts && model.numFmts.length) { + xmlStream.openNode("numFmts", { count: model.numFmts.length }); + model.numFmts.forEach((numFmtXml) => { + xmlStream.writeXml(numFmtXml); + }); + xmlStream.closeNode(); + } + if (!model.fonts.length) { + this._addFont({ size: 11, color: { theme: 1 }, name: "Calibri", family: 2, scheme: "minor" }); + } + xmlStream.openNode("fonts", { count: model.fonts.length, "x14ac:knownFonts": 1 }); + model.fonts.forEach((fontXml) => { + xmlStream.writeXml(fontXml); + }); + xmlStream.closeNode(); + xmlStream.openNode("fills", { count: model.fills.length }); + model.fills.forEach((fillXml) => { + xmlStream.writeXml(fillXml); + }); + xmlStream.closeNode(); + xmlStream.openNode("borders", { count: model.borders.length }); + model.borders.forEach((borderXml) => { + xmlStream.writeXml(borderXml); + }); + xmlStream.closeNode(); + this.map.cellStyleXfs.render(xmlStream, [{ numFmtId: 0, fontId: 0, fillId: 0, borderId: 0, xfId: 0 }]); + xmlStream.openNode("cellXfs", { count: model.styles.length }); + model.styles.forEach((styleXml) => { + xmlStream.writeXml(styleXml); + }); + xmlStream.closeNode(); + } else { + this.map.numFmts.render(xmlStream, model.numFmts); + this.map.fonts.render(xmlStream, model.fonts); + this.map.fills.render(xmlStream, model.fills); + this.map.borders.render(xmlStream, model.borders); + this.map.cellStyleXfs.render(xmlStream, [{ numFmtId: 0, fontId: 0, fillId: 0, borderId: 0, xfId: 0 }]); + this.map.cellXfs.render(xmlStream, model.styles); + } + _StylesXform.STATIC_XFORMS.cellStyles.render(xmlStream); + this.map.dxfs.render(xmlStream, model.dxfs); + _StylesXform.STATIC_XFORMS.tableStyles.render(xmlStream); + _StylesXform.STATIC_XFORMS.extLst.render(xmlStream); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "styleSheet": + this.initIndex(); + return true; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + } + return true; + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + switch (name) { + case "styleSheet": { + this.model = {}; + const add = (propName, xform) => { + if (xform.model && xform.model.length) { + this.model[propName] = xform.model; + } + }; + add("numFmts", this.map.numFmts); + add("fonts", this.map.fonts); + add("fills", this.map.fills); + add("borders", this.map.borders); + add("styles", this.map.cellXfs); + add("dxfs", this.map.dxfs); + this.index = { + model: [], + numFmt: [] + }; + if (this.model.numFmts) { + const numFmtIndex = this.index.numFmt; + this.model.numFmts.forEach((numFmt) => { + numFmtIndex[numFmt.id] = numFmt.formatCode; + }); + } + return false; + } + default: + return true; + } + } + // add a cell's style model to the collection + // each style property is processed and cross-referenced, etc. + // the styleId is returned. Note: cellType is used when numFmt not defined + addStyleModel(model, cellType) { + if (!model) { + return 0; + } + if (!this.model.fonts.length) { + this._addFont({ size: 11, color: { theme: 1 }, name: "Calibri", family: 2, scheme: "minor" }); + } + if (this.weakMap && this.weakMap.has(model)) { + return this.weakMap.get(model); + } + const style = {}; + cellType = cellType || Enums.ValueType.Number; + if (model.numFmt) { + style.numFmtId = this._addNumFmtStr(model.numFmt); + } else { + switch (cellType) { + case Enums.ValueType.Number: + style.numFmtId = this._addNumFmtStr("General"); + break; + case Enums.ValueType.Date: + style.numFmtId = this._addNumFmtStr("mm-dd-yy"); + break; + default: + break; + } + } + if (model.font) { + style.fontId = this._addFont(model.font); + } + if (model.border) { + style.borderId = this._addBorder(model.border); + } + if (model.fill) { + style.fillId = this._addFill(model.fill); + } + if (model.alignment) { + style.alignment = model.alignment; + } + if (model.protection) { + style.protection = model.protection; + } + const styleId = this._addStyle(style); + if (this.weakMap) { + this.weakMap.set(model, styleId); + } + return styleId; + } + // given a styleId (i.e. s="n"), get the cell's style model + // objects are shared where possible. + getStyleModel(id) { + const style = this.model.styles[id]; + if (!style) return null; + let model = this.index.model[id]; + if (model) return model; + model = this.index.model[id] = {}; + if (style.numFmtId) { + const numFmt = this.index.numFmt[style.numFmtId] || NumFmtXform.getDefaultFmtCode(style.numFmtId); + if (numFmt) { + model.numFmt = numFmt; + } + } + function addStyle(name, group, styleId) { + if (styleId || styleId === 0) { + const part = group[styleId]; + if (part) { + model[name] = part; + } + } + } + addStyle("font", this.model.fonts, style.fontId); + addStyle("border", this.model.borders, style.borderId); + addStyle("fill", this.model.fills, style.fillId); + if (style.alignment) { + model.alignment = style.alignment; + } + if (style.protection) { + model.protection = style.protection; + } + return model; + } + addDxfStyle(style) { + if (style.numFmt) { + style.numFmtId = this._addNumFmtStr(style.numFmt); + } + this.model.dxfs.push(style); + return this.model.dxfs.length - 1; + } + getDxfStyle(id) { + return this.model.dxfs[id]; + } + // ========================================================================= + // Private Interface + _addStyle(style) { + const xml = this.map.style.toXml(style); + let index = this.index.style[xml]; + if (index === void 0) { + index = this.index.style[xml] = this.model.styles.length; + this.model.styles.push(xml); + } + return index; + } + // ========================================================================= + // Number Formats + _addNumFmtStr(formatCode) { + let index = NumFmtXform.getDefaultFmtId(formatCode); + if (index !== void 0) return index; + index = this.index.numFmt[formatCode]; + if (index !== void 0) return index; + index = this.index.numFmt[formatCode] = NUMFMT_BASE + this.model.numFmts.length; + const xml = this.map.numFmt.toXml({ id: index, formatCode }); + this.model.numFmts.push(xml); + return index; + } + // ========================================================================= + // Fonts + _addFont(font) { + const xml = this.map.font.toXml(font); + let index = this.index.font[xml]; + if (index === void 0) { + index = this.index.font[xml] = this.model.fonts.length; + this.model.fonts.push(xml); + } + return index; + } + // ========================================================================= + // Borders + _addBorder(border) { + const xml = this.map.border.toXml(border); + let index = this.index.border[xml]; + if (index === void 0) { + index = this.index.border[xml] = this.model.borders.length; + this.model.borders.push(xml); + } + return index; + } + // ========================================================================= + // Fills + _addFill(fill) { + const xml = this.map.fill.toXml(fill); + let index = this.index.fill[xml]; + if (index === void 0) { + index = this.index.fill[xml] = this.model.fills.length; + this.model.fills.push(xml); + } + return index; + } + // ========================================================================= + }; + StylesXform.STYLESHEET_ATTRIBUTES = { + xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main", + "xmlns:mc": "http://schemas.openxmlformats.org/markup-compatibility/2006", + "mc:Ignorable": "x14ac x16r2", + "xmlns:x14ac": "http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac", + "xmlns:x16r2": "http://schemas.microsoft.com/office/spreadsheetml/2015/02/main" + }; + StylesXform.STATIC_XFORMS = { + cellStyles: new StaticXform({ + tag: "cellStyles", + $: { count: 1 }, + c: [{ tag: "cellStyle", $: { name: "Normal", xfId: 0, builtinId: 0 } }] + }), + dxfs: new StaticXform({ tag: "dxfs", $: { count: 0 } }), + tableStyles: new StaticXform({ + tag: "tableStyles", + $: { count: 0, defaultTableStyle: "TableStyleMedium2", defaultPivotStyle: "PivotStyleLight16" } + }), + extLst: new StaticXform({ + tag: "extLst", + c: [ + { + tag: "ext", + $: { + uri: "{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}", + "xmlns:x14": "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main" + }, + c: [{ tag: "x14:slicerStyles", $: { defaultSlicerStyle: "SlicerStyleLight1" } }] + }, + { + tag: "ext", + $: { + uri: "{9260A510-F301-46a8-8635-F512D64BE5F5}", + "xmlns:x15": "http://schemas.microsoft.com/office/spreadsheetml/2010/11/main" + }, + c: [{ tag: "x15:timelineStyles", $: { defaultTimelineStyle: "TimeSlicerStyleLight1" } }] + } + ] + }) + }; + var StylesXformMock = class extends StylesXform { + constructor() { + super(); + this.model = { + styles: [{ numFmtId: 0, fontId: 0, fillId: 0, borderId: 0, xfId: 0 }], + numFmts: [], + fonts: [{ size: 11, color: { theme: 1 }, name: "Calibri", family: 2, scheme: "minor" }], + borders: [{}], + fills: [ + { type: "pattern", pattern: "none" }, + { type: "pattern", pattern: "gray125" } + ] + }; + } + // ========================================================================= + // Style Manager Interface + // override normal behaviour - consume and dispose + parseStream(stream) { + stream.autodrain(); + return Promise.resolve(); + } + // add a cell's style model to the collection + // each style property is processed and cross-referenced, etc. + // the styleId is returned. Note: cellType is used when numFmt not defined + addStyleModel(model, cellType) { + switch (cellType) { + case Enums.ValueType.Date: + return this.dateStyleId; + default: + return 0; + } + } + get dateStyleId() { + if (!this._dateStyleId) { + const dateStyle = { + numFmtId: NumFmtXform.getDefaultFmtId("mm-dd-yy") + }; + this._dateStyleId = this.model.styles.length; + this.model.styles.push(dateStyle); + } + return this._dateStyleId; + } + // given a styleId (i.e. s="n"), get the cell's style model + // objects are shared where possible. + getStyleModel() { + return {}; + } + }; + StylesXform.Mock = StylesXformMock; + module2.exports = StylesXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/simple/date-xform.js +var require_date_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/simple/date-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var DateXform = class extends BaseXform { + constructor(options) { + super(); + this.tag = options.tag; + this.attr = options.attr; + this.attrs = options.attrs; + this._format = options.format || function(dt) { + try { + if (Number.isNaN(dt.getTime())) return ""; + return dt.toISOString(); + } catch (e) { + return ""; + } + }; + this._parse = options.parse || function(str) { + return new Date(str); + }; + } + render(xmlStream, model) { + if (model) { + xmlStream.openNode(this.tag); + if (this.attrs) { + xmlStream.addAttributes(this.attrs); + } + if (this.attr) { + xmlStream.addAttribute(this.attr, this._format(model)); + } else { + xmlStream.writeText(this._format(model)); + } + xmlStream.closeNode(); + } + } + parseOpen(node) { + if (node.name === this.tag) { + if (this.attr) { + this.model = this._parse(node.attributes[this.attr]); + } else { + this.text = []; + } + } + } + parseText(text) { + if (!this.attr) { + this.text.push(text); + } + } + parseClose() { + if (!this.attr) { + this.model = this._parse(this.text.join("")); + } + return false; + } + }; + module2.exports = DateXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/core/core-xform.js +var require_core_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/core/core-xform.js"(exports2, module2) { + var XmlStream = require_xml_stream(); + var BaseXform = require_base_xform(); + var DateXform = require_date_xform(); + var StringXform = require_string_xform(); + var IntegerXform = require_integer_xform(); + var CoreXform = class _CoreXform extends BaseXform { + constructor() { + super(); + this.map = { + "dc:creator": new StringXform({ tag: "dc:creator" }), + "dc:title": new StringXform({ tag: "dc:title" }), + "dc:subject": new StringXform({ tag: "dc:subject" }), + "dc:description": new StringXform({ tag: "dc:description" }), + "dc:identifier": new StringXform({ tag: "dc:identifier" }), + "dc:language": new StringXform({ tag: "dc:language" }), + "cp:keywords": new StringXform({ tag: "cp:keywords" }), + "cp:category": new StringXform({ tag: "cp:category" }), + "cp:lastModifiedBy": new StringXform({ tag: "cp:lastModifiedBy" }), + "cp:lastPrinted": new DateXform({ tag: "cp:lastPrinted", format: _CoreXform.DateFormat }), + "cp:revision": new IntegerXform({ tag: "cp:revision" }), + "cp:version": new StringXform({ tag: "cp:version" }), + "cp:contentStatus": new StringXform({ tag: "cp:contentStatus" }), + "cp:contentType": new StringXform({ tag: "cp:contentType" }), + "dcterms:created": new DateXform({ + tag: "dcterms:created", + attrs: _CoreXform.DateAttrs, + format: _CoreXform.DateFormat + }), + "dcterms:modified": new DateXform({ + tag: "dcterms:modified", + attrs: _CoreXform.DateAttrs, + format: _CoreXform.DateFormat + }) + }; + } + render(xmlStream, model) { + xmlStream.openXml(XmlStream.StdDocAttributes); + xmlStream.openNode("cp:coreProperties", _CoreXform.CORE_PROPERTY_ATTRIBUTES); + this.map["dc:creator"].render(xmlStream, model.creator); + this.map["dc:title"].render(xmlStream, model.title); + this.map["dc:subject"].render(xmlStream, model.subject); + this.map["dc:description"].render(xmlStream, model.description); + this.map["dc:identifier"].render(xmlStream, model.identifier); + this.map["dc:language"].render(xmlStream, model.language); + this.map["cp:keywords"].render(xmlStream, model.keywords); + this.map["cp:category"].render(xmlStream, model.category); + this.map["cp:lastModifiedBy"].render(xmlStream, model.lastModifiedBy); + this.map["cp:lastPrinted"].render(xmlStream, model.lastPrinted); + this.map["cp:revision"].render(xmlStream, model.revision); + this.map["cp:version"].render(xmlStream, model.version); + this.map["cp:contentStatus"].render(xmlStream, model.contentStatus); + this.map["cp:contentType"].render(xmlStream, model.contentType); + this.map["dcterms:created"].render(xmlStream, model.created); + this.map["dcterms:modified"].render(xmlStream, model.modified); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "cp:coreProperties": + case "coreProperties": + return true; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + throw new Error(`Unexpected xml node in parseOpen: ${JSON.stringify(node)}`); + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + switch (name) { + case "cp:coreProperties": + case "coreProperties": + this.model = { + creator: this.map["dc:creator"].model, + title: this.map["dc:title"].model, + subject: this.map["dc:subject"].model, + description: this.map["dc:description"].model, + identifier: this.map["dc:identifier"].model, + language: this.map["dc:language"].model, + keywords: this.map["cp:keywords"].model, + category: this.map["cp:category"].model, + lastModifiedBy: this.map["cp:lastModifiedBy"].model, + lastPrinted: this.map["cp:lastPrinted"].model, + revision: this.map["cp:revision"].model, + contentStatus: this.map["cp:contentStatus"].model, + contentType: this.map["cp:contentType"].model, + created: this.map["dcterms:created"].model, + modified: this.map["dcterms:modified"].model + }; + return false; + default: + throw new Error(`Unexpected xml node in parseClose: ${name}`); + } + } + }; + CoreXform.DateFormat = function(dt) { + return dt.toISOString().replace(/[.]\d{3}/, ""); + }; + CoreXform.DateAttrs = { "xsi:type": "dcterms:W3CDTF" }; + CoreXform.CORE_PROPERTY_ATTRIBUTES = { + "xmlns:cp": "http://schemas.openxmlformats.org/package/2006/metadata/core-properties", + "xmlns:dc": "http://purl.org/dc/elements/1.1/", + "xmlns:dcterms": "http://purl.org/dc/terms/", + "xmlns:dcmitype": "http://purl.org/dc/dcmitype/", + "xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance" + }; + module2.exports = CoreXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/strings/text-xform.js +var require_text_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/strings/text-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var TextXform = class extends BaseXform { + get tag() { + return "t"; + } + render(xmlStream, model) { + xmlStream.openNode("t"); + if (/^\s|\n|\s$/.test(model)) { + xmlStream.addAttribute("xml:space", "preserve"); + } + xmlStream.writeText(model); + xmlStream.closeNode(); + } + get model() { + return this._text.join("").replace(/_x([0-9A-F]{4})_/g, ($0, $1) => String.fromCharCode(parseInt($1, 16))); + } + parseOpen(node) { + switch (node.name) { + case "t": + this._text = []; + return true; + default: + return false; + } + } + parseText(text) { + this._text.push(text); + } + parseClose() { + return false; + } + }; + module2.exports = TextXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/strings/rich-text-xform.js +var require_rich_text_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/strings/rich-text-xform.js"(exports2, module2) { + var TextXform = require_text_xform(); + var FontXform = require_font_xform(); + var BaseXform = require_base_xform(); + var RichTextXform = class _RichTextXform extends BaseXform { + constructor(model) { + super(); + this.model = model; + } + get tag() { + return "r"; + } + get textXform() { + return this._textXform || (this._textXform = new TextXform()); + } + get fontXform() { + return this._fontXform || (this._fontXform = new FontXform(_RichTextXform.FONT_OPTIONS)); + } + render(xmlStream, model) { + model = model || this.model; + xmlStream.openNode("r"); + if (model.font) { + this.fontXform.render(xmlStream, model.font); + } + this.textXform.render(xmlStream, model.text); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "r": + this.model = {}; + return true; + case "t": + this.parser = this.textXform; + this.parser.parseOpen(node); + return true; + case "rPr": + this.parser = this.fontXform; + this.parser.parseOpen(node); + return true; + default: + return false; + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + switch (name) { + case "r": + return false; + case "t": + this.model.text = this.parser.model; + this.parser = void 0; + return true; + case "rPr": + this.model.font = this.parser.model; + this.parser = void 0; + return true; + default: + if (this.parser) { + this.parser.parseClose(name); + } + return true; + } + } + }; + RichTextXform.FONT_OPTIONS = { + tagName: "rPr", + fontNameTag: "rFont" + }; + module2.exports = RichTextXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/strings/phonetic-text-xform.js +var require_phonetic_text_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/strings/phonetic-text-xform.js"(exports2, module2) { + var TextXform = require_text_xform(); + var RichTextXform = require_rich_text_xform(); + var BaseXform = require_base_xform(); + var PhoneticTextXform = class extends BaseXform { + constructor() { + super(); + this.map = { + r: new RichTextXform(), + t: new TextXform() + }; + } + get tag() { + return "rPh"; + } + render(xmlStream, model) { + xmlStream.openNode(this.tag, { + sb: model.sb || 0, + eb: model.eb || 0 + }); + if (model && model.hasOwnProperty("richText") && model.richText) { + const { r } = this.map; + model.richText.forEach((text) => { + r.render(xmlStream, text); + }); + } else if (model) { + this.map.t.render(xmlStream, model.text); + } + xmlStream.closeNode(); + } + parseOpen(node) { + const { name } = node; + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + if (name === this.tag) { + this.model = { + sb: parseInt(node.attributes.sb, 10), + eb: parseInt(node.attributes.eb, 10) + }; + return true; + } + this.parser = this.map[name]; + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + return false; + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + switch (name) { + case "r": { + let rt = this.model.richText; + if (!rt) { + rt = this.model.richText = []; + } + rt.push(this.parser.model); + break; + } + case "t": + this.model.text = this.parser.model; + break; + default: + break; + } + this.parser = void 0; + } + return true; + } + switch (name) { + case this.tag: + return false; + default: + return true; + } + } + }; + module2.exports = PhoneticTextXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/strings/shared-string-xform.js +var require_shared_string_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/strings/shared-string-xform.js"(exports2, module2) { + var TextXform = require_text_xform(); + var RichTextXform = require_rich_text_xform(); + var PhoneticTextXform = require_phonetic_text_xform(); + var BaseXform = require_base_xform(); + var SharedStringXform = class extends BaseXform { + constructor(model) { + super(); + this.model = model; + this.map = { + r: new RichTextXform(), + t: new TextXform(), + rPh: new PhoneticTextXform() + }; + } + get tag() { + return "si"; + } + render(xmlStream, model) { + xmlStream.openNode(this.tag); + if (model && model.hasOwnProperty("richText") && model.richText) { + if (model.richText.length) { + model.richText.forEach((text) => { + this.map.r.render(xmlStream, text); + }); + } else { + this.map.t.render(xmlStream, ""); + } + } else if (model !== void 0 && model !== null) { + this.map.t.render(xmlStream, model); + } + xmlStream.closeNode(); + } + parseOpen(node) { + const { name } = node; + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + if (name === this.tag) { + this.model = {}; + return true; + } + this.parser = this.map[name]; + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + return false; + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + switch (name) { + case "r": { + let rt = this.model.richText; + if (!rt) { + rt = this.model.richText = []; + } + rt.push(this.parser.model); + break; + } + case "t": + this.model = this.parser.model; + break; + default: + break; + } + this.parser = void 0; + } + return true; + } + switch (name) { + case this.tag: + return false; + default: + return true; + } + } + }; + module2.exports = SharedStringXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/strings/shared-strings-xform.js +var require_shared_strings_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/strings/shared-strings-xform.js"(exports2, module2) { + var XmlStream = require_xml_stream(); + var BaseXform = require_base_xform(); + var SharedStringXform = require_shared_string_xform(); + var SharedStringsXform = class extends BaseXform { + constructor(model) { + super(); + this.model = model || { + values: [], + count: 0 + }; + this.hash = /* @__PURE__ */ Object.create(null); + this.rich = /* @__PURE__ */ Object.create(null); + } + get sharedStringXform() { + return this._sharedStringXform || (this._sharedStringXform = new SharedStringXform()); + } + get values() { + return this.model.values; + } + get uniqueCount() { + return this.model.values.length; + } + get count() { + return this.model.count; + } + getString(index) { + return this.model.values[index]; + } + add(value) { + return value.richText ? this.addRichText(value) : this.addText(value); + } + addText(value) { + let index = this.hash[value]; + if (index === void 0) { + index = this.hash[value] = this.model.values.length; + this.model.values.push(value); + } + this.model.count++; + return index; + } + addRichText(value) { + const xml = this.sharedStringXform.toXml(value); + let index = this.rich[xml]; + if (index === void 0) { + index = this.rich[xml] = this.model.values.length; + this.model.values.push(value); + } + this.model.count++; + return index; + } + // + // + // <%=text%> + // + // + render(xmlStream, model) { + model = model || this._values; + xmlStream.openXml(XmlStream.StdDocAttributes); + xmlStream.openNode("sst", { + xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main", + count: model.count, + uniqueCount: model.values.length + }); + const sx = this.sharedStringXform; + model.values.forEach((sharedString) => { + sx.render(xmlStream, sharedString); + }); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "sst": + return true; + case "si": + this.parser = this.sharedStringXform; + this.parser.parseOpen(node); + return true; + default: + throw new Error(`Unexpected xml node in parseOpen: ${JSON.stringify(node)}`); + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.model.values.push(this.parser.model); + this.model.count++; + this.parser = void 0; + } + return true; + } + switch (name) { + case "sst": + return false; + default: + throw new Error(`Unexpected xml node in parseClose: ${name}`); + } + } + }; + module2.exports = SharedStringsXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/core/relationship-xform.js +var require_relationship_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/core/relationship-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var RelationshipXform = class extends BaseXform { + render(xmlStream, model) { + xmlStream.leafNode("Relationship", model); + } + parseOpen(node) { + switch (node.name) { + case "Relationship": + this.model = node.attributes; + return true; + default: + return false; + } + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = RelationshipXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/core/relationships-xform.js +var require_relationships_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/core/relationships-xform.js"(exports2, module2) { + var XmlStream = require_xml_stream(); + var BaseXform = require_base_xform(); + var RelationshipXform = require_relationship_xform(); + var RelationshipsXform = class _RelationshipsXform extends BaseXform { + constructor() { + super(); + this.map = { + Relationship: new RelationshipXform() + }; + } + render(xmlStream, model) { + model = model || this._values; + xmlStream.openXml(XmlStream.StdDocAttributes); + xmlStream.openNode("Relationships", _RelationshipsXform.RELATIONSHIPS_ATTRIBUTES); + model.forEach((relationship) => { + this.map.Relationship.render(xmlStream, relationship); + }); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "Relationships": + this.model = []; + return true; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + throw new Error(`Unexpected xml node in parseOpen: ${JSON.stringify(node)}`); + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.model.push(this.parser.model); + this.parser = void 0; + } + return true; + } + switch (name) { + case "Relationships": + return false; + default: + throw new Error(`Unexpected xml node in parseClose: ${name}`); + } + } + }; + RelationshipsXform.RELATIONSHIPS_ATTRIBUTES = { + xmlns: "http://schemas.openxmlformats.org/package/2006/relationships" + }; + module2.exports = RelationshipsXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/core/content-types-xform.js +var require_content_types_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/core/content-types-xform.js"(exports2, module2) { + var XmlStream = require_xml_stream(); + var BaseXform = require_base_xform(); + var ContentTypesXform = class _ContentTypesXform extends BaseXform { + render(xmlStream, model) { + xmlStream.openXml(XmlStream.StdDocAttributes); + xmlStream.openNode("Types", _ContentTypesXform.PROPERTY_ATTRIBUTES); + const mediaHash = {}; + (model.media || []).forEach((medium) => { + if (medium.type === "image") { + const imageType = medium.extension; + if (!mediaHash[imageType]) { + mediaHash[imageType] = true; + xmlStream.leafNode("Default", { Extension: imageType, ContentType: `image/${imageType}` }); + } + } + }); + xmlStream.leafNode("Default", { + Extension: "rels", + ContentType: "application/vnd.openxmlformats-package.relationships+xml" + }); + xmlStream.leafNode("Default", { Extension: "xml", ContentType: "application/xml" }); + xmlStream.leafNode("Override", { + PartName: "/xl/workbook.xml", + ContentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" + }); + model.worksheets.forEach((worksheet) => { + const name = `/xl/worksheets/sheet${worksheet.id}.xml`; + xmlStream.leafNode("Override", { + PartName: name, + ContentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" + }); + }); + xmlStream.leafNode("Override", { + PartName: "/xl/theme/theme1.xml", + ContentType: "application/vnd.openxmlformats-officedocument.theme+xml" + }); + xmlStream.leafNode("Override", { + PartName: "/xl/styles.xml", + ContentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml" + }); + const hasSharedStrings = model.sharedStrings && model.sharedStrings.count; + if (hasSharedStrings) { + xmlStream.leafNode("Override", { + PartName: "/xl/sharedStrings.xml", + ContentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml" + }); + } + if (model.tables) { + model.tables.forEach((table) => { + xmlStream.leafNode("Override", { + PartName: `/xl/tables/${table.target}`, + ContentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml" + }); + }); + } + if (model.drawings) { + model.drawings.forEach((drawing) => { + xmlStream.leafNode("Override", { + PartName: `/xl/drawings/${drawing.name}.xml`, + ContentType: "application/vnd.openxmlformats-officedocument.drawing+xml" + }); + }); + } + if (model.commentRefs) { + xmlStream.leafNode("Default", { + Extension: "vml", + ContentType: "application/vnd.openxmlformats-officedocument.vmlDrawing" + }); + model.commentRefs.forEach(({ commentName }) => { + xmlStream.leafNode("Override", { + PartName: `/xl/${commentName}.xml`, + ContentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml" + }); + }); + } + xmlStream.leafNode("Override", { + PartName: "/docProps/core.xml", + ContentType: "application/vnd.openxmlformats-package.core-properties+xml" + }); + xmlStream.leafNode("Override", { + PartName: "/docProps/app.xml", + ContentType: "application/vnd.openxmlformats-officedocument.extended-properties+xml" + }); + xmlStream.closeNode(); + } + parseOpen() { + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + ContentTypesXform.PROPERTY_ATTRIBUTES = { + xmlns: "http://schemas.openxmlformats.org/package/2006/content-types" + }; + module2.exports = ContentTypesXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/core/app-heading-pairs-xform.js +var require_app_heading_pairs_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/core/app-heading-pairs-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var AppHeadingPairsXform = class extends BaseXform { + render(xmlStream, model) { + xmlStream.openNode("HeadingPairs"); + xmlStream.openNode("vt:vector", { size: 2, baseType: "variant" }); + xmlStream.openNode("vt:variant"); + xmlStream.leafNode("vt:lpstr", void 0, "Worksheets"); + xmlStream.closeNode(); + xmlStream.openNode("vt:variant"); + xmlStream.leafNode("vt:i4", void 0, model.length); + xmlStream.closeNode(); + xmlStream.closeNode(); + xmlStream.closeNode(); + } + parseOpen(node) { + return node.name === "HeadingPairs"; + } + parseText() { + } + parseClose(name) { + return name !== "HeadingPairs"; + } + }; + module2.exports = AppHeadingPairsXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/core/app-titles-of-parts-xform.js +var require_app_titles_of_parts_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/core/app-titles-of-parts-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var AppTitlesOfPartsXform = class extends BaseXform { + render(xmlStream, model) { + xmlStream.openNode("TitlesOfParts"); + xmlStream.openNode("vt:vector", { size: model.length, baseType: "lpstr" }); + model.forEach((sheet) => { + xmlStream.leafNode("vt:lpstr", void 0, sheet.name); + }); + xmlStream.closeNode(); + xmlStream.closeNode(); + } + parseOpen(node) { + return node.name === "TitlesOfParts"; + } + parseText() { + } + parseClose(name) { + return name !== "TitlesOfParts"; + } + }; + module2.exports = AppTitlesOfPartsXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/core/app-xform.js +var require_app_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/core/app-xform.js"(exports2, module2) { + var XmlStream = require_xml_stream(); + var BaseXform = require_base_xform(); + var StringXform = require_string_xform(); + var AppHeadingPairsXform = require_app_heading_pairs_xform(); + var AppTitleOfPartsXform = require_app_titles_of_parts_xform(); + var AppXform = class _AppXform extends BaseXform { + constructor() { + super(); + this.map = { + Company: new StringXform({ tag: "Company" }), + Manager: new StringXform({ tag: "Manager" }), + HeadingPairs: new AppHeadingPairsXform(), + TitleOfParts: new AppTitleOfPartsXform() + }; + } + render(xmlStream, model) { + xmlStream.openXml(XmlStream.StdDocAttributes); + xmlStream.openNode("Properties", _AppXform.PROPERTY_ATTRIBUTES); + xmlStream.leafNode("Application", void 0, "Microsoft Excel"); + xmlStream.leafNode("DocSecurity", void 0, "0"); + xmlStream.leafNode("ScaleCrop", void 0, "false"); + this.map.HeadingPairs.render(xmlStream, model.worksheets); + this.map.TitleOfParts.render(xmlStream, model.worksheets); + this.map.Company.render(xmlStream, model.company || ""); + this.map.Manager.render(xmlStream, model.manager); + xmlStream.leafNode("LinksUpToDate", void 0, "false"); + xmlStream.leafNode("SharedDoc", void 0, "false"); + xmlStream.leafNode("HyperlinksChanged", void 0, "false"); + xmlStream.leafNode("AppVersion", void 0, "16.0300"); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "Properties": + return true; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + return false; + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + switch (name) { + case "Properties": + this.model = { + worksheets: this.map.TitleOfParts.model, + company: this.map.Company.model, + manager: this.map.Manager.model + }; + return false; + default: + return true; + } + } + }; + AppXform.DateFormat = function(dt) { + return dt.toISOString().replace(/[.]\d{3,6}/, ""); + }; + AppXform.DateAttrs = { "xsi:type": "dcterms:W3CDTF" }; + AppXform.PROPERTY_ATTRIBUTES = { + xmlns: "http://schemas.openxmlformats.org/officeDocument/2006/extended-properties", + "xmlns:vt": "http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes" + }; + module2.exports = AppXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/book/defined-name-xform.js +var require_defined_name_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/book/defined-name-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var colCache = require_col_cache(); + var DefinedNamesXform = class extends BaseXform { + render(xmlStream, model) { + xmlStream.openNode("definedName", { + name: model.name, + localSheetId: model.localSheetId + }); + xmlStream.writeText(model.ranges.join(",")); + xmlStream.closeNode(); + } + parseOpen(node) { + switch (node.name) { + case "definedName": + this._parsedName = node.attributes.name; + this._parsedLocalSheetId = node.attributes.localSheetId; + this._parsedText = []; + return true; + default: + return false; + } + } + parseText(text) { + this._parsedText.push(text); + } + parseClose() { + this.model = { + name: this._parsedName, + ranges: extractRanges(this._parsedText.join("")) + }; + if (this._parsedLocalSheetId !== void 0) { + this.model.localSheetId = parseInt(this._parsedLocalSheetId, 10); + } + return false; + } + }; + function isValidRange(range) { + try { + colCache.decodeEx(range); + return true; + } catch (err) { + return false; + } + } + function extractRanges(parsedText) { + const ranges = []; + let quotesOpened = false; + let last = ""; + parsedText.split(",").forEach((item) => { + if (!item) { + return; + } + const quotes = (item.match(/'/g) || []).length; + if (!quotes) { + if (quotesOpened) { + last += `${item},`; + } else if (isValidRange(item)) { + ranges.push(item); + } + return; + } + const quotesEven = quotes % 2 === 0; + if (!quotesOpened && quotesEven && isValidRange(item)) { + ranges.push(item); + } else if (quotesOpened && !quotesEven) { + quotesOpened = false; + if (isValidRange(last + item)) { + ranges.push(last + item); + } + last = ""; + } else { + quotesOpened = true; + last += `${item},`; + } + }); + return ranges; + } + module2.exports = DefinedNamesXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/book/sheet-xform.js +var require_sheet_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/book/sheet-xform.js"(exports2, module2) { + var utils = require_utils13(); + var BaseXform = require_base_xform(); + var WorksheetXform = class extends BaseXform { + render(xmlStream, model) { + xmlStream.leafNode("sheet", { + sheetId: model.id, + name: model.name, + state: model.state, + "r:id": model.rId + }); + } + parseOpen(node) { + if (node.name === "sheet") { + this.model = { + name: utils.xmlDecode(node.attributes.name), + id: parseInt(node.attributes.sheetId, 10), + state: node.attributes.state, + rId: node.attributes["r:id"] + }; + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = WorksheetXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/book/workbook-view-xform.js +var require_workbook_view_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/book/workbook-view-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var WorkbookViewXform = class extends BaseXform { + render(xmlStream, model) { + const attributes = { + xWindow: model.x || 0, + yWindow: model.y || 0, + windowWidth: model.width || 12e3, + windowHeight: model.height || 24e3, + firstSheet: model.firstSheet, + activeTab: model.activeTab + }; + if (model.visibility && model.visibility !== "visible") { + attributes.visibility = model.visibility; + } + xmlStream.leafNode("workbookView", attributes); + } + parseOpen(node) { + if (node.name === "workbookView") { + const model = this.model = {}; + const addS = function(name, value, dflt) { + const s = value !== void 0 ? model[name] = value : dflt; + if (s !== void 0) { + model[name] = s; + } + }; + const addN = function(name, value, dflt) { + const n = value !== void 0 ? model[name] = parseInt(value, 10) : dflt; + if (n !== void 0) { + model[name] = n; + } + }; + addN("x", node.attributes.xWindow, 0); + addN("y", node.attributes.yWindow, 0); + addN("width", node.attributes.windowWidth, 25e3); + addN("height", node.attributes.windowHeight, 1e4); + addS("visibility", node.attributes.visibility, "visible"); + addN("activeTab", node.attributes.activeTab, void 0); + addN("firstSheet", node.attributes.firstSheet, void 0); + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = WorkbookViewXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/book/workbook-properties-xform.js +var require_workbook_properties_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/book/workbook-properties-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var WorksheetPropertiesXform = class extends BaseXform { + render(xmlStream, model) { + xmlStream.leafNode("workbookPr", { + date1904: model.date1904 ? 1 : void 0, + defaultThemeVersion: 164011, + filterPrivacy: 1 + }); + } + parseOpen(node) { + if (node.name === "workbookPr") { + this.model = { + date1904: node.attributes.date1904 === "1" + }; + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = WorksheetPropertiesXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/book/workbook-calc-properties-xform.js +var require_workbook_calc_properties_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/book/workbook-calc-properties-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var WorkbookCalcPropertiesXform = class extends BaseXform { + render(xmlStream, model) { + xmlStream.leafNode("calcPr", { + calcId: 171027, + fullCalcOnLoad: model.fullCalcOnLoad ? 1 : void 0 + }); + } + parseOpen(node) { + if (node.name === "calcPr") { + this.model = {}; + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = WorkbookCalcPropertiesXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/book/workbook-xform.js +var require_workbook_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/book/workbook-xform.js"(exports2, module2) { + var _2 = require_under_dash(); + var colCache = require_col_cache(); + var XmlStream = require_xml_stream(); + var BaseXform = require_base_xform(); + var StaticXform = require_static_xform(); + var ListXform = require_list_xform(); + var DefinedNameXform = require_defined_name_xform(); + var SheetXform = require_sheet_xform(); + var WorkbookViewXform = require_workbook_view_xform(); + var WorkbookPropertiesXform = require_workbook_properties_xform(); + var WorkbookCalcPropertiesXform = require_workbook_calc_properties_xform(); + var WorkbookXform = class _WorkbookXform extends BaseXform { + constructor() { + super(); + this.map = { + fileVersion: _WorkbookXform.STATIC_XFORMS.fileVersion, + workbookPr: new WorkbookPropertiesXform(), + bookViews: new ListXform({ + tag: "bookViews", + count: false, + childXform: new WorkbookViewXform() + }), + sheets: new ListXform({ tag: "sheets", count: false, childXform: new SheetXform() }), + definedNames: new ListXform({ + tag: "definedNames", + count: false, + childXform: new DefinedNameXform() + }), + calcPr: new WorkbookCalcPropertiesXform() + }; + } + prepare(model) { + model.sheets = model.worksheets; + const printAreas = []; + let index = 0; + model.sheets.forEach((sheet) => { + if (sheet.pageSetup && sheet.pageSetup.printArea) { + sheet.pageSetup.printArea.split("&&").forEach((printArea) => { + const printAreaComponents = printArea.split(":"); + const definedName = { + name: "_xlnm.Print_Area", + ranges: [`'${sheet.name}'!$${printAreaComponents[0]}:$${printAreaComponents[1]}`], + localSheetId: index + }; + printAreas.push(definedName); + }); + } + if (sheet.pageSetup && (sheet.pageSetup.printTitlesRow || sheet.pageSetup.printTitlesColumn)) { + const ranges = []; + if (sheet.pageSetup.printTitlesColumn) { + const titlesColumns = sheet.pageSetup.printTitlesColumn.split(":"); + ranges.push(`'${sheet.name}'!$${titlesColumns[0]}:$${titlesColumns[1]}`); + } + if (sheet.pageSetup.printTitlesRow) { + const titlesRows = sheet.pageSetup.printTitlesRow.split(":"); + ranges.push(`'${sheet.name}'!$${titlesRows[0]}:$${titlesRows[1]}`); + } + const definedName = { + name: "_xlnm.Print_Titles", + ranges, + localSheetId: index + }; + printAreas.push(definedName); + } + index++; + }); + if (printAreas.length) { + model.definedNames = model.definedNames.concat(printAreas); + } + (model.media || []).forEach((medium, i) => { + medium.name = medium.type + (i + 1); + }); + } + render(xmlStream, model) { + xmlStream.openXml(XmlStream.StdDocAttributes); + xmlStream.openNode("workbook", _WorkbookXform.WORKBOOK_ATTRIBUTES); + this.map.fileVersion.render(xmlStream); + this.map.workbookPr.render(xmlStream, model.properties); + this.map.bookViews.render(xmlStream, model.views); + this.map.sheets.render(xmlStream, model.sheets); + this.map.definedNames.render(xmlStream, model.definedNames); + this.map.calcPr.render(xmlStream, model.calcProperties); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "workbook": + return true; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + } + return true; + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + switch (name) { + case "workbook": + this.model = { + sheets: this.map.sheets.model, + properties: this.map.workbookPr.model || {}, + views: this.map.bookViews.model, + calcProperties: {} + }; + if (this.map.definedNames.model) { + this.model.definedNames = this.map.definedNames.model; + } + return false; + default: + return true; + } + } + reconcile(model) { + const rels = (model.workbookRels || []).reduce((map, rel) => { + map[rel.Id] = rel; + return map; + }, {}); + const worksheets = []; + let worksheet; + let index = 0; + (model.sheets || []).forEach((sheet) => { + const rel = rels[sheet.rId]; + if (!rel) { + return; + } + worksheet = model.worksheetHash[`xl/${rel.Target.replace(/^(\s|\/xl\/)+/, "")}`]; + if (worksheet) { + worksheet.name = sheet.name; + worksheet.id = sheet.id; + worksheet.state = sheet.state; + worksheets[index++] = worksheet; + } + }); + const definedNames = []; + _2.each(model.definedNames, (definedName) => { + if (definedName.name === "_xlnm.Print_Area") { + worksheet = worksheets[definedName.localSheetId]; + if (worksheet) { + if (!worksheet.pageSetup) { + worksheet.pageSetup = {}; + } + const range = colCache.decodeEx(definedName.ranges[0]); + worksheet.pageSetup.printArea = worksheet.pageSetup.printArea ? `${worksheet.pageSetup.printArea}&&${range.dimensions}` : range.dimensions; + } + } else if (definedName.name === "_xlnm.Print_Titles") { + worksheet = worksheets[definedName.localSheetId]; + if (worksheet) { + if (!worksheet.pageSetup) { + worksheet.pageSetup = {}; + } + const rangeString = definedName.ranges.join(","); + const dollarRegex = /\$/g; + const rowRangeRegex = /\$\d+:\$\d+/; + const rowRangeMatches = rangeString.match(rowRangeRegex); + if (rowRangeMatches && rowRangeMatches.length) { + const range = rowRangeMatches[0]; + worksheet.pageSetup.printTitlesRow = range.replace(dollarRegex, ""); + } + const columnRangeRegex = /\$[A-Z]+:\$[A-Z]+/; + const columnRangeMatches = rangeString.match(columnRangeRegex); + if (columnRangeMatches && columnRangeMatches.length) { + const range = columnRangeMatches[0]; + worksheet.pageSetup.printTitlesColumn = range.replace(dollarRegex, ""); + } + } + } else { + definedNames.push(definedName); + } + }); + model.definedNames = definedNames; + model.media.forEach((media, i) => { + media.index = i; + }); + } + }; + WorkbookXform.WORKBOOK_ATTRIBUTES = { + xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main", + "xmlns:r": "http://schemas.openxmlformats.org/officeDocument/2006/relationships", + "xmlns:mc": "http://schemas.openxmlformats.org/markup-compatibility/2006", + "mc:Ignorable": "x15", + "xmlns:x15": "http://schemas.microsoft.com/office/spreadsheetml/2010/11/main" + }; + WorkbookXform.STATIC_XFORMS = { + fileVersion: new StaticXform({ + tag: "fileVersion", + $: { appName: "xl", lastEdited: 5, lowestEdited: 5, rupBuild: 9303 } + }) + }; + module2.exports = WorkbookXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/rel-type.js +var require_rel_type = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/rel-type.js"(exports2, module2) { + "use strict"; + module2.exports = { + OfficeDocument: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument", + Worksheet: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet", + CalcChain: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain", + SharedStrings: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings", + Styles: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles", + Theme: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme", + Hyperlink: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink", + Image: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", + CoreProperties: "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties", + ExtenderProperties: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties", + Comments: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments", + VmlDrawing: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing", + Table: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/table" + }; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/merges.js +var require_merges = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/merges.js"(exports2, module2) { + var _2 = require_under_dash(); + var Range = require_range4(); + var colCache = require_col_cache(); + var Enums = require_enums3(); + var Merges = class { + constructor() { + this.merges = {}; + } + add(merge) { + if (this.merges[merge.master]) { + this.merges[merge.master].expandToAddress(merge.address); + } else { + const range = `${merge.master}:${merge.address}`; + this.merges[merge.master] = new Range(range); + } + } + get mergeCells() { + return _2.map(this.merges, (merge) => merge.range); + } + reconcile(mergeCells, rows) { + _2.each(mergeCells, (merge) => { + const dimensions = colCache.decode(merge); + for (let i = dimensions.top; i <= dimensions.bottom; i++) { + const row = rows[i - 1]; + for (let j = dimensions.left; j <= dimensions.right; j++) { + const cell = row.cells[j - 1]; + if (!cell) { + row.cells[j] = { + type: Enums.ValueType.Null, + address: colCache.encodeAddress(i, j) + }; + } else if (cell.type === Enums.ValueType.Merge) { + cell.master = dimensions.tl; + } + } + } + }); + } + getMasterAddress(address) { + const range = this.hash[address]; + return range && range.tl; + } + }; + module2.exports = Merges; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cell-xform.js +var require_cell_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cell-xform.js"(exports2, module2) { + var utils = require_utils13(); + var BaseXform = require_base_xform(); + var Range = require_range4(); + var Enums = require_enums3(); + var RichTextXform = require_rich_text_xform(); + function getValueType(v) { + if (v === null || v === void 0) { + return Enums.ValueType.Null; + } + if (v instanceof String || typeof v === "string") { + return Enums.ValueType.String; + } + if (typeof v === "number") { + return Enums.ValueType.Number; + } + if (typeof v === "boolean") { + return Enums.ValueType.Boolean; + } + if (v instanceof Date) { + return Enums.ValueType.Date; + } + if (v.text && v.hyperlink) { + return Enums.ValueType.Hyperlink; + } + if (v.formula) { + return Enums.ValueType.Formula; + } + if (v.error) { + return Enums.ValueType.Error; + } + throw new Error("I could not understand type of value"); + } + function getEffectiveCellType(cell) { + switch (cell.type) { + case Enums.ValueType.Formula: + return getValueType(cell.result); + default: + return cell.type; + } + } + var CellXform = class extends BaseXform { + constructor() { + super(); + this.richTextXForm = new RichTextXform(); + } + get tag() { + return "c"; + } + prepare(model, options) { + const styleId = options.styles.addStyleModel(model.style || {}, getEffectiveCellType(model)); + if (styleId) { + model.styleId = styleId; + } + if (model.comment) { + options.comments.push({ ...model.comment, ref: model.address }); + } + switch (model.type) { + case Enums.ValueType.String: + case Enums.ValueType.RichText: + if (options.sharedStrings) { + model.ssId = options.sharedStrings.add(model.value); + } + break; + case Enums.ValueType.Date: + if (options.date1904) { + model.date1904 = true; + } + break; + case Enums.ValueType.Hyperlink: + if (options.sharedStrings && model.text !== void 0 && model.text !== null) { + model.ssId = options.sharedStrings.add(model.text); + } + options.hyperlinks.push({ + address: model.address, + target: model.hyperlink, + tooltip: model.tooltip + }); + break; + case Enums.ValueType.Merge: + options.merges.add(model); + break; + case Enums.ValueType.Formula: + if (options.date1904) { + model.date1904 = true; + } + if (model.shareType === "shared") { + model.si = options.siFormulae++; + } + if (model.formula) { + options.formulae[model.address] = model; + } else if (model.sharedFormula) { + const master = options.formulae[model.sharedFormula]; + if (!master) { + throw new Error( + `Shared Formula master must exist above and or left of clone for cell ${model.address}` + ); + } + if (master.si === void 0) { + master.shareType = "shared"; + master.si = options.siFormulae++; + master.range = new Range(master.address, model.address); + } else if (master.range) { + master.range.expandToAddress(model.address); + } + model.si = master.si; + } + break; + default: + break; + } + } + renderFormula(xmlStream, model) { + let attrs = null; + switch (model.shareType) { + case "shared": + attrs = { + t: "shared", + ref: model.ref || model.range.range, + si: model.si + }; + break; + case "array": + attrs = { + t: "array", + ref: model.ref + }; + break; + default: + if (model.si !== void 0) { + attrs = { + t: "shared", + si: model.si + }; + } + break; + } + switch (getValueType(model.result)) { + case Enums.ValueType.Null: + xmlStream.leafNode("f", attrs, model.formula); + break; + case Enums.ValueType.String: + xmlStream.addAttribute("t", "str"); + xmlStream.leafNode("f", attrs, model.formula); + xmlStream.leafNode("v", null, model.result); + break; + case Enums.ValueType.Number: + xmlStream.leafNode("f", attrs, model.formula); + xmlStream.leafNode("v", null, model.result); + break; + case Enums.ValueType.Boolean: + xmlStream.addAttribute("t", "b"); + xmlStream.leafNode("f", attrs, model.formula); + xmlStream.leafNode("v", null, model.result ? 1 : 0); + break; + case Enums.ValueType.Error: + xmlStream.addAttribute("t", "e"); + xmlStream.leafNode("f", attrs, model.formula); + xmlStream.leafNode("v", null, model.result.error); + break; + case Enums.ValueType.Date: + xmlStream.leafNode("f", attrs, model.formula); + xmlStream.leafNode("v", null, utils.dateToExcel(model.result, model.date1904)); + break; + // case Enums.ValueType.Hyperlink: // ?? + // case Enums.ValueType.Formula: + default: + throw new Error("I could not understand type of value"); + } + } + render(xmlStream, model) { + if (model.type === Enums.ValueType.Null && !model.styleId) { + return; + } + xmlStream.openNode("c"); + xmlStream.addAttribute("r", model.address); + if (model.styleId) { + xmlStream.addAttribute("s", model.styleId); + } + switch (model.type) { + case Enums.ValueType.Null: + break; + case Enums.ValueType.Number: + xmlStream.leafNode("v", null, model.value); + break; + case Enums.ValueType.Boolean: + xmlStream.addAttribute("t", "b"); + xmlStream.leafNode("v", null, model.value ? "1" : "0"); + break; + case Enums.ValueType.Error: + xmlStream.addAttribute("t", "e"); + xmlStream.leafNode("v", null, model.value.error); + break; + case Enums.ValueType.String: + case Enums.ValueType.RichText: + if (model.ssId !== void 0) { + xmlStream.addAttribute("t", "s"); + xmlStream.leafNode("v", null, model.ssId); + } else if (model.value && model.value.richText) { + xmlStream.addAttribute("t", "inlineStr"); + xmlStream.openNode("is"); + model.value.richText.forEach((text) => { + this.richTextXForm.render(xmlStream, text); + }); + xmlStream.closeNode("is"); + } else { + xmlStream.addAttribute("t", "str"); + xmlStream.leafNode("v", null, model.value); + } + break; + case Enums.ValueType.Date: + xmlStream.leafNode("v", null, utils.dateToExcel(model.value, model.date1904)); + break; + case Enums.ValueType.Hyperlink: + if (model.ssId !== void 0) { + xmlStream.addAttribute("t", "s"); + xmlStream.leafNode("v", null, model.ssId); + } else { + xmlStream.addAttribute("t", "str"); + xmlStream.leafNode("v", null, model.text); + } + break; + case Enums.ValueType.Formula: + this.renderFormula(xmlStream, model); + break; + case Enums.ValueType.Merge: + break; + default: + break; + } + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "c": + this.model = { + address: node.attributes.r + }; + this.t = node.attributes.t; + if (node.attributes.s) { + this.model.styleId = parseInt(node.attributes.s, 10); + } + return true; + case "f": + this.currentNode = "f"; + this.model.si = node.attributes.si; + this.model.shareType = node.attributes.t; + this.model.ref = node.attributes.ref; + return true; + case "v": + this.currentNode = "v"; + return true; + case "t": + this.currentNode = "t"; + return true; + case "r": + this.parser = this.richTextXForm; + this.parser.parseOpen(node); + return true; + default: + return false; + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + return; + } + switch (this.currentNode) { + case "f": + this.model.formula = this.model.formula ? this.model.formula + text : text; + break; + case "v": + case "t": + if (this.model.value && this.model.value.richText) { + this.model.value.richText.text = this.model.value.richText.text ? this.model.value.richText.text + text : text; + } else { + this.model.value = this.model.value ? this.model.value + text : text; + } + break; + default: + break; + } + } + parseClose(name) { + switch (name) { + case "c": { + const { model } = this; + if (model.formula || model.shareType) { + model.type = Enums.ValueType.Formula; + if (model.value) { + if (this.t === "str") { + model.result = utils.xmlDecode(model.value); + } else if (this.t === "b") { + model.result = parseInt(model.value, 10) !== 0; + } else if (this.t === "e") { + model.result = { error: model.value }; + } else { + model.result = parseFloat(model.value); + } + model.value = void 0; + } + } else if (model.value !== void 0) { + switch (this.t) { + case "s": + model.type = Enums.ValueType.String; + model.value = parseInt(model.value, 10); + break; + case "str": + model.type = Enums.ValueType.String; + model.value = utils.xmlDecode(model.value); + break; + case "inlineStr": + model.type = Enums.ValueType.String; + break; + case "b": + model.type = Enums.ValueType.Boolean; + model.value = parseInt(model.value, 10) !== 0; + break; + case "e": + model.type = Enums.ValueType.Error; + model.value = { error: model.value }; + break; + default: + model.type = Enums.ValueType.Number; + model.value = parseFloat(model.value); + break; + } + } else if (model.styleId) { + model.type = Enums.ValueType.Null; + } else { + model.type = Enums.ValueType.Merge; + } + return false; + } + case "f": + case "v": + case "is": + this.currentNode = void 0; + return true; + case "t": + if (this.parser) { + this.parser.parseClose(name); + return true; + } + this.currentNode = void 0; + return true; + case "r": + this.model.value = this.model.value || {}; + this.model.value.richText = this.model.value.richText || []; + this.model.value.richText.push(this.parser.model); + this.parser = void 0; + this.currentNode = void 0; + return true; + default: + if (this.parser) { + this.parser.parseClose(name); + return true; + } + return false; + } + } + reconcile(model, options) { + const style = model.styleId && options.styles && options.styles.getStyleModel(model.styleId); + if (style) { + model.style = style; + } + if (model.styleId !== void 0) { + model.styleId = void 0; + } + switch (model.type) { + case Enums.ValueType.String: + if (typeof model.value === "number") { + if (options.sharedStrings) { + model.value = options.sharedStrings.getString(model.value); + } + } + if (model.value.richText) { + model.type = Enums.ValueType.RichText; + } + break; + case Enums.ValueType.Number: + if (style && utils.isDateFmt(style.numFmt)) { + model.type = Enums.ValueType.Date; + model.value = utils.excelToDate(model.value, options.date1904); + } + break; + case Enums.ValueType.Formula: + if (model.result !== void 0 && style && utils.isDateFmt(style.numFmt)) { + model.result = utils.excelToDate(model.result, options.date1904); + } + if (model.shareType === "shared") { + if (model.ref) { + options.formulae[model.si] = model.address; + } else { + model.sharedFormula = options.formulae[model.si]; + delete model.shareType; + } + delete model.si; + } + break; + default: + break; + } + const hyperlink = options.hyperlinkMap[model.address]; + if (hyperlink) { + if (model.type === Enums.ValueType.Formula) { + model.text = model.result; + model.result = void 0; + } else { + model.text = model.value; + model.value = void 0; + } + model.type = Enums.ValueType.Hyperlink; + model.hyperlink = hyperlink; + } + const comment = options.commentsMap && options.commentsMap[model.address]; + if (comment) { + model.comment = comment; + } + } + }; + module2.exports = CellXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/row-xform.js +var require_row_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/row-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var utils = require_utils13(); + var CellXform = require_cell_xform(); + var RowXform = class extends BaseXform { + constructor(options) { + super(); + this.maxItems = options && options.maxItems; + this.map = { + c: new CellXform() + }; + } + get tag() { + return "row"; + } + prepare(model, options) { + const styleId = options.styles.addStyleModel(model.style); + if (styleId) { + model.styleId = styleId; + } + const cellXform = this.map.c; + model.cells.forEach((cellModel) => { + cellXform.prepare(cellModel, options); + }); + } + render(xmlStream, model, options) { + xmlStream.openNode("row"); + xmlStream.addAttribute("r", model.number); + if (model.height) { + xmlStream.addAttribute("ht", model.height); + xmlStream.addAttribute("customHeight", "1"); + } + if (model.hidden) { + xmlStream.addAttribute("hidden", "1"); + } + if (model.min > 0 && model.max > 0 && model.min <= model.max) { + xmlStream.addAttribute("spans", `${model.min}:${model.max}`); + } + if (model.styleId) { + xmlStream.addAttribute("s", model.styleId); + xmlStream.addAttribute("customFormat", "1"); + } + xmlStream.addAttribute("x14ac:dyDescent", "0.25"); + if (model.outlineLevel) { + xmlStream.addAttribute("outlineLevel", model.outlineLevel); + } + if (model.collapsed) { + xmlStream.addAttribute("collapsed", "1"); + } + const cellXform = this.map.c; + model.cells.forEach((cellModel) => { + cellXform.render(xmlStream, cellModel, options); + }); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + if (node.name === "row") { + this.numRowsSeen += 1; + const spans = node.attributes.spans ? node.attributes.spans.split(":").map((span) => parseInt(span, 10)) : [void 0, void 0]; + const model = this.model = { + number: parseInt(node.attributes.r, 10), + min: spans[0], + max: spans[1], + cells: [] + }; + if (node.attributes.s) { + model.styleId = parseInt(node.attributes.s, 10); + } + if (utils.parseBoolean(node.attributes.hidden)) { + model.hidden = true; + } + if (utils.parseBoolean(node.attributes.bestFit)) { + model.bestFit = true; + } + if (node.attributes.ht) { + model.height = parseFloat(node.attributes.ht); + } + if (node.attributes.outlineLevel) { + model.outlineLevel = parseInt(node.attributes.outlineLevel, 10); + } + if (utils.parseBoolean(node.attributes.collapsed)) { + model.collapsed = true; + } + return true; + } + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + return false; + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.model.cells.push(this.parser.model); + if (this.maxItems && this.model.cells.length > this.maxItems) { + throw new Error(`Max column count (${this.maxItems}) exceeded`); + } + this.parser = void 0; + } + return true; + } + return false; + } + reconcile(model, options) { + model.style = model.styleId ? options.styles.getStyleModel(model.styleId) : {}; + if (model.styleId !== void 0) { + model.styleId = void 0; + } + const cellXform = this.map.c; + model.cells.forEach((cellModel) => { + cellXform.reconcile(cellModel, options); + }); + } + }; + module2.exports = RowXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/col-xform.js +var require_col_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/col-xform.js"(exports2, module2) { + var utils = require_utils13(); + var BaseXform = require_base_xform(); + var ColXform = class extends BaseXform { + get tag() { + return "col"; + } + prepare(model, options) { + const styleId = options.styles.addStyleModel(model.style || {}); + if (styleId) { + model.styleId = styleId; + } + } + render(xmlStream, model) { + xmlStream.openNode("col"); + xmlStream.addAttribute("min", model.min); + xmlStream.addAttribute("max", model.max); + if (model.width) { + xmlStream.addAttribute("width", model.width); + } + if (model.styleId) { + xmlStream.addAttribute("style", model.styleId); + } + if (model.hidden) { + xmlStream.addAttribute("hidden", "1"); + } + if (model.bestFit) { + xmlStream.addAttribute("bestFit", "1"); + } + if (model.outlineLevel) { + xmlStream.addAttribute("outlineLevel", model.outlineLevel); + } + if (model.collapsed) { + xmlStream.addAttribute("collapsed", "1"); + } + xmlStream.addAttribute("customWidth", "1"); + xmlStream.closeNode(); + } + parseOpen(node) { + if (node.name === "col") { + const model = this.model = { + min: parseInt(node.attributes.min || "0", 10), + max: parseInt(node.attributes.max || "0", 10), + width: node.attributes.width === void 0 ? void 0 : parseFloat(node.attributes.width || "0") + }; + if (node.attributes.style) { + model.styleId = parseInt(node.attributes.style, 10); + } + if (utils.parseBoolean(node.attributes.hidden)) { + model.hidden = true; + } + if (utils.parseBoolean(node.attributes.bestFit)) { + model.bestFit = true; + } + if (node.attributes.outlineLevel) { + model.outlineLevel = parseInt(node.attributes.outlineLevel, 10); + } + if (utils.parseBoolean(node.attributes.collapsed)) { + model.collapsed = true; + } + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + reconcile(model, options) { + if (model.styleId) { + model.style = options.styles.getStyleModel(model.styleId); + } + } + }; + module2.exports = ColXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/dimension-xform.js +var require_dimension_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/dimension-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var DimensionXform = class extends BaseXform { + get tag() { + return "dimension"; + } + render(xmlStream, model) { + if (model) { + xmlStream.leafNode("dimension", { ref: model }); + } + } + parseOpen(node) { + if (node.name === "dimension") { + this.model = node.attributes.ref; + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = DimensionXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/hyperlink-xform.js +var require_hyperlink_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/hyperlink-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var HyperlinkXform = class extends BaseXform { + get tag() { + return "hyperlink"; + } + render(xmlStream, model) { + if (this.isInternalLink(model)) { + xmlStream.leafNode("hyperlink", { + ref: model.address, + "r:id": model.rId, + tooltip: model.tooltip, + location: model.target + }); + } else { + xmlStream.leafNode("hyperlink", { + ref: model.address, + "r:id": model.rId, + tooltip: model.tooltip + }); + } + } + parseOpen(node) { + if (node.name === "hyperlink") { + this.model = { + address: node.attributes.ref, + rId: node.attributes["r:id"], + tooltip: node.attributes.tooltip + }; + if (node.attributes.location) { + this.model.target = node.attributes.location; + } + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + isInternalLink(model) { + return model.target && /^[^!]+![a-zA-Z]+[\d]+$/.test(model.target); + } + }; + module2.exports = HyperlinkXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/merge-cell-xform.js +var require_merge_cell_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/merge-cell-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var MergeCellXform = class extends BaseXform { + get tag() { + return "mergeCell"; + } + render(xmlStream, model) { + xmlStream.leafNode("mergeCell", { ref: model }); + } + parseOpen(node) { + if (node.name === "mergeCell") { + this.model = node.attributes.ref; + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = MergeCellXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/data-validations-xform.js +var require_data_validations_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/data-validations-xform.js"(exports2, module2) { + var _2 = require_under_dash(); + var utils = require_utils13(); + var colCache = require_col_cache(); + var BaseXform = require_base_xform(); + var Range = require_range4(); + function assign(definedName, attributes, name, defaultValue) { + const value = attributes[name]; + if (value !== void 0) { + definedName[name] = value; + } else if (defaultValue !== void 0) { + definedName[name] = defaultValue; + } + } + function assignBool(definedName, attributes, name, defaultValue) { + const value = attributes[name]; + if (value !== void 0) { + definedName[name] = utils.parseBoolean(value); + } else if (defaultValue !== void 0) { + definedName[name] = defaultValue; + } + } + function optimiseDataValidations(model) { + const dvList = _2.map(model, (dataValidation, address) => ({ + address, + dataValidation, + marked: false + })).sort((a, b) => _2.strcmp(a.address, b.address)); + const dvMap = _2.keyBy(dvList, "address"); + const matchCol = (addr, height, col) => { + for (let i = 0; i < height; i++) { + const otherAddress = colCache.encodeAddress(addr.row + i, col); + if (!model[otherAddress] || !_2.isEqual(model[addr.address], model[otherAddress])) { + return false; + } + } + return true; + }; + return dvList.map((dv) => { + if (!dv.marked) { + const addr = colCache.decodeEx(dv.address); + if (addr.dimensions) { + dvMap[addr.dimensions].marked = true; + return { + ...dv.dataValidation, + sqref: dv.address + }; + } + let height = 1; + let otherAddress = colCache.encodeAddress(addr.row + height, addr.col); + while (model[otherAddress] && _2.isEqual(dv.dataValidation, model[otherAddress])) { + height++; + otherAddress = colCache.encodeAddress(addr.row + height, addr.col); + } + let width = 1; + while (matchCol(addr, height, addr.col + width)) { + width++; + } + for (let i = 0; i < height; i++) { + for (let j = 0; j < width; j++) { + otherAddress = colCache.encodeAddress(addr.row + i, addr.col + j); + dvMap[otherAddress].marked = true; + } + } + if (height > 1 || width > 1) { + const bottom = addr.row + (height - 1); + const right = addr.col + (width - 1); + return { + ...dv.dataValidation, + sqref: `${dv.address}:${colCache.encodeAddress(bottom, right)}` + }; + } + return { + ...dv.dataValidation, + sqref: dv.address + }; + } + return null; + }).filter(Boolean); + } + var DataValidationsXform = class extends BaseXform { + get tag() { + return "dataValidations"; + } + render(xmlStream, model) { + const optimizedModel = optimiseDataValidations(model); + if (optimizedModel.length) { + xmlStream.openNode("dataValidations", { count: optimizedModel.length }); + optimizedModel.forEach((value) => { + xmlStream.openNode("dataValidation"); + if (value.type !== "any") { + xmlStream.addAttribute("type", value.type); + if (value.operator && value.type !== "list" && value.operator !== "between") { + xmlStream.addAttribute("operator", value.operator); + } + if (value.allowBlank) { + xmlStream.addAttribute("allowBlank", "1"); + } + } + if (value.showInputMessage) { + xmlStream.addAttribute("showInputMessage", "1"); + } + if (value.promptTitle) { + xmlStream.addAttribute("promptTitle", value.promptTitle); + } + if (value.prompt) { + xmlStream.addAttribute("prompt", value.prompt); + } + if (value.showErrorMessage) { + xmlStream.addAttribute("showErrorMessage", "1"); + } + if (value.errorStyle) { + xmlStream.addAttribute("errorStyle", value.errorStyle); + } + if (value.errorTitle) { + xmlStream.addAttribute("errorTitle", value.errorTitle); + } + if (value.error) { + xmlStream.addAttribute("error", value.error); + } + xmlStream.addAttribute("sqref", value.sqref); + (value.formulae || []).forEach((formula, index) => { + xmlStream.openNode(`formula${index + 1}`); + if (value.type === "date") { + xmlStream.writeText(utils.dateToExcel(new Date(formula))); + } else { + xmlStream.writeText(formula); + } + xmlStream.closeNode(); + }); + xmlStream.closeNode(); + }); + xmlStream.closeNode(); + } + } + parseOpen(node) { + switch (node.name) { + case "dataValidations": + this.model = {}; + return true; + case "dataValidation": { + this._address = node.attributes.sqref; + const dataValidation = { type: node.attributes.type || "any", formulae: [] }; + if (node.attributes.type) { + assignBool(dataValidation, node.attributes, "allowBlank"); + } + assignBool(dataValidation, node.attributes, "showInputMessage"); + assignBool(dataValidation, node.attributes, "showErrorMessage"); + switch (dataValidation.type) { + case "any": + case "list": + case "custom": + break; + default: + assign(dataValidation, node.attributes, "operator", "between"); + break; + } + assign(dataValidation, node.attributes, "promptTitle"); + assign(dataValidation, node.attributes, "prompt"); + assign(dataValidation, node.attributes, "errorStyle"); + assign(dataValidation, node.attributes, "errorTitle"); + assign(dataValidation, node.attributes, "error"); + this._dataValidation = dataValidation; + return true; + } + case "formula1": + case "formula2": + this._formula = []; + return true; + default: + return false; + } + } + parseText(text) { + if (this._formula) { + this._formula.push(text); + } + } + parseClose(name) { + switch (name) { + case "dataValidations": + return false; + case "dataValidation": { + if (!this._dataValidation.formulae || !this._dataValidation.formulae.length) { + delete this._dataValidation.formulae; + delete this._dataValidation.operator; + } + const list = this._address.split(/\s+/g) || []; + list.forEach((addr) => { + if (addr.includes(":")) { + const range = new Range(addr); + range.forEachAddress((address) => { + this.model[address] = this._dataValidation; + }); + } else { + this.model[addr] = this._dataValidation; + } + }); + return true; + } + case "formula1": + case "formula2": { + let formula = this._formula.join(""); + switch (this._dataValidation.type) { + case "whole": + case "textLength": + formula = parseInt(formula, 10); + break; + case "decimal": + formula = parseFloat(formula); + break; + case "date": + formula = utils.excelToDate(parseFloat(formula)); + break; + default: + break; + } + this._dataValidation.formulae.push(formula); + this._formula = void 0; + return true; + } + default: + return true; + } + } + }; + module2.exports = DataValidationsXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/page-setup-properties-xform.js +var require_page_setup_properties_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/page-setup-properties-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var PageSetupPropertiesXform = class extends BaseXform { + get tag() { + return "pageSetUpPr"; + } + render(xmlStream, model) { + if (model && model.fitToPage) { + xmlStream.leafNode(this.tag, { + fitToPage: model.fitToPage ? "1" : void 0 + }); + return true; + } + return false; + } + parseOpen(node) { + if (node.name === this.tag) { + this.model = { + fitToPage: node.attributes.fitToPage === "1" + }; + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = PageSetupPropertiesXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/outline-properties-xform.js +var require_outline_properties_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/outline-properties-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var isDefined = (attr) => typeof attr !== "undefined"; + var OutlinePropertiesXform = class extends BaseXform { + get tag() { + return "outlinePr"; + } + render(xmlStream, model) { + if (model && (isDefined(model.summaryBelow) || isDefined(model.summaryRight))) { + xmlStream.leafNode(this.tag, { + summaryBelow: isDefined(model.summaryBelow) ? Number(model.summaryBelow) : void 0, + summaryRight: isDefined(model.summaryRight) ? Number(model.summaryRight) : void 0 + }); + return true; + } + return false; + } + parseOpen(node) { + if (node.name === this.tag) { + this.model = { + summaryBelow: isDefined(node.attributes.summaryBelow) ? Boolean(Number(node.attributes.summaryBelow)) : void 0, + summaryRight: isDefined(node.attributes.summaryRight) ? Boolean(Number(node.attributes.summaryRight)) : void 0 + }; + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = OutlinePropertiesXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/sheet-properties-xform.js +var require_sheet_properties_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/sheet-properties-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var ColorXform = require_color_xform(); + var PageSetupPropertiesXform = require_page_setup_properties_xform(); + var OutlinePropertiesXform = require_outline_properties_xform(); + var SheetPropertiesXform = class extends BaseXform { + constructor() { + super(); + this.map = { + tabColor: new ColorXform("tabColor"), + pageSetUpPr: new PageSetupPropertiesXform(), + outlinePr: new OutlinePropertiesXform() + }; + } + get tag() { + return "sheetPr"; + } + render(xmlStream, model) { + if (model) { + xmlStream.addRollback(); + xmlStream.openNode("sheetPr"); + let inner = false; + inner = this.map.tabColor.render(xmlStream, model.tabColor) || inner; + inner = this.map.pageSetUpPr.render(xmlStream, model.pageSetup) || inner; + inner = this.map.outlinePr.render(xmlStream, model.outlineProperties) || inner; + if (inner) { + xmlStream.closeNode(); + xmlStream.commit(); + } else { + xmlStream.rollback(); + } + } + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + if (node.name === this.tag) { + this.reset(); + return true; + } + if (this.map[node.name]) { + this.parser = this.map[node.name]; + this.parser.parseOpen(node); + return true; + } + return false; + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + return true; + } + return false; + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + if (this.map.tabColor.model || this.map.pageSetUpPr.model || this.map.outlinePr.model) { + this.model = {}; + if (this.map.tabColor.model) { + this.model.tabColor = this.map.tabColor.model; + } + if (this.map.pageSetUpPr.model) { + this.model.pageSetup = this.map.pageSetUpPr.model; + } + if (this.map.outlinePr.model) { + this.model.outlineProperties = this.map.outlinePr.model; + } + } else { + this.model = null; + } + return false; + } + }; + module2.exports = SheetPropertiesXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/sheet-format-properties-xform.js +var require_sheet_format_properties_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/sheet-format-properties-xform.js"(exports2, module2) { + var _2 = require_under_dash(); + var BaseXform = require_base_xform(); + var SheetFormatPropertiesXform = class extends BaseXform { + get tag() { + return "sheetFormatPr"; + } + render(xmlStream, model) { + if (model) { + const attributes = { + defaultRowHeight: model.defaultRowHeight, + outlineLevelRow: model.outlineLevelRow, + outlineLevelCol: model.outlineLevelCol, + "x14ac:dyDescent": model.dyDescent + }; + if (model.defaultColWidth) { + attributes.defaultColWidth = model.defaultColWidth; + } + if (!model.defaultRowHeight || model.defaultRowHeight !== 15) { + attributes.customHeight = "1"; + } + if (_2.some(attributes, (value) => value !== void 0)) { + xmlStream.leafNode("sheetFormatPr", attributes); + } + } + } + parseOpen(node) { + if (node.name === "sheetFormatPr") { + this.model = { + defaultRowHeight: parseFloat(node.attributes.defaultRowHeight || "0"), + dyDescent: parseFloat(node.attributes["x14ac:dyDescent"] || "0"), + outlineLevelRow: parseInt(node.attributes.outlineLevelRow || "0", 10), + outlineLevelCol: parseInt(node.attributes.outlineLevelCol || "0", 10) + }; + if (node.attributes.defaultColWidth) { + this.model.defaultColWidth = parseFloat(node.attributes.defaultColWidth); + } + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = SheetFormatPropertiesXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/sheet-view-xform.js +var require_sheet_view_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/sheet-view-xform.js"(exports2, module2) { + var colCache = require_col_cache(); + var BaseXform = require_base_xform(); + var VIEW_STATES = { + frozen: "frozen", + frozenSplit: "frozen", + split: "split" + }; + var SheetViewXform = class extends BaseXform { + get tag() { + return "sheetView"; + } + prepare(model) { + switch (model.state) { + case "frozen": + case "split": + break; + default: + model.state = "normal"; + break; + } + } + render(xmlStream, model) { + xmlStream.openNode("sheetView", { + workbookViewId: model.workbookViewId || 0 + }); + const add = function(name, value, included) { + if (included) { + xmlStream.addAttribute(name, value); + } + }; + add("rightToLeft", "1", model.rightToLeft === true); + add("tabSelected", "1", model.tabSelected); + add("showRuler", "0", model.showRuler === false); + add("showRowColHeaders", "0", model.showRowColHeaders === false); + add("showGridLines", "0", model.showGridLines === false); + add("zoomScale", model.zoomScale, model.zoomScale); + add("zoomScaleNormal", model.zoomScaleNormal, model.zoomScaleNormal); + add("view", model.style, model.style); + let topLeftCell; + let xSplit; + let ySplit; + let activePane; + switch (model.state) { + case "frozen": + xSplit = model.xSplit || 0; + ySplit = model.ySplit || 0; + topLeftCell = model.topLeftCell || colCache.getAddress(ySplit + 1, xSplit + 1).address; + activePane = model.xSplit && model.ySplit && "bottomRight" || model.xSplit && "topRight" || "bottomLeft"; + xmlStream.leafNode("pane", { + xSplit: model.xSplit || void 0, + ySplit: model.ySplit || void 0, + topLeftCell, + activePane, + state: "frozen" + }); + xmlStream.leafNode("selection", { + pane: activePane, + activeCell: model.activeCell, + sqref: model.activeCell + }); + break; + case "split": + if (model.activePane === "topLeft") { + model.activePane = void 0; + } + xmlStream.leafNode("pane", { + xSplit: model.xSplit || void 0, + ySplit: model.ySplit || void 0, + topLeftCell: model.topLeftCell, + activePane: model.activePane + }); + xmlStream.leafNode("selection", { + pane: model.activePane, + activeCell: model.activeCell, + sqref: model.activeCell + }); + break; + case "normal": + if (model.activeCell) { + xmlStream.leafNode("selection", { + activeCell: model.activeCell, + sqref: model.activeCell + }); + } + break; + default: + break; + } + xmlStream.closeNode(); + } + parseOpen(node) { + switch (node.name) { + case "sheetView": + this.sheetView = { + workbookViewId: parseInt(node.attributes.workbookViewId, 10), + rightToLeft: node.attributes.rightToLeft === "1", + tabSelected: node.attributes.tabSelected === "1", + showRuler: !(node.attributes.showRuler === "0"), + showRowColHeaders: !(node.attributes.showRowColHeaders === "0"), + showGridLines: !(node.attributes.showGridLines === "0"), + zoomScale: parseInt(node.attributes.zoomScale || "100", 10), + zoomScaleNormal: parseInt(node.attributes.zoomScaleNormal || "100", 10), + style: node.attributes.view + }; + this.pane = void 0; + this.selections = {}; + return true; + case "pane": + this.pane = { + xSplit: parseInt(node.attributes.xSplit || "0", 10), + ySplit: parseInt(node.attributes.ySplit || "0", 10), + topLeftCell: node.attributes.topLeftCell, + activePane: node.attributes.activePane || "topLeft", + state: node.attributes.state + }; + return true; + case "selection": { + const name = node.attributes.pane || "topLeft"; + this.selections[name] = { + pane: name, + activeCell: node.attributes.activeCell + }; + return true; + } + default: + return false; + } + } + parseText() { + } + parseClose(name) { + let model; + let selection; + switch (name) { + case "sheetView": + if (this.sheetView && this.pane) { + model = this.model = { + workbookViewId: this.sheetView.workbookViewId, + rightToLeft: this.sheetView.rightToLeft, + state: VIEW_STATES[this.pane.state] || "split", + // split is default + xSplit: this.pane.xSplit, + ySplit: this.pane.ySplit, + topLeftCell: this.pane.topLeftCell, + showRuler: this.sheetView.showRuler, + showRowColHeaders: this.sheetView.showRowColHeaders, + showGridLines: this.sheetView.showGridLines, + zoomScale: this.sheetView.zoomScale, + zoomScaleNormal: this.sheetView.zoomScaleNormal + }; + if (this.model.state === "split") { + model.activePane = this.pane.activePane; + } + selection = this.selections[this.pane.activePane]; + if (selection && selection.activeCell) { + model.activeCell = selection.activeCell; + } + if (this.sheetView.style) { + model.style = this.sheetView.style; + } + } else { + model = this.model = { + workbookViewId: this.sheetView.workbookViewId, + rightToLeft: this.sheetView.rightToLeft, + state: "normal", + showRuler: this.sheetView.showRuler, + showRowColHeaders: this.sheetView.showRowColHeaders, + showGridLines: this.sheetView.showGridLines, + zoomScale: this.sheetView.zoomScale, + zoomScaleNormal: this.sheetView.zoomScaleNormal + }; + selection = this.selections.topLeft; + if (selection && selection.activeCell) { + model.activeCell = selection.activeCell; + } + if (this.sheetView.style) { + model.style = this.sheetView.style; + } + } + return false; + default: + return true; + } + } + reconcile() { + } + }; + module2.exports = SheetViewXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/sheet-protection-xform.js +var require_sheet_protection_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/sheet-protection-xform.js"(exports2, module2) { + var _2 = require_under_dash(); + var BaseXform = require_base_xform(); + function booleanToXml(model, value) { + return model ? value : void 0; + } + function xmlToBoolean(value, equals) { + return value === equals ? true : void 0; + } + var SheetProtectionXform = class extends BaseXform { + get tag() { + return "sheetProtection"; + } + render(xmlStream, model) { + if (model) { + const attributes = { + sheet: booleanToXml(model.sheet, "1"), + selectLockedCells: model.selectLockedCells === false ? "1" : void 0, + selectUnlockedCells: model.selectUnlockedCells === false ? "1" : void 0, + formatCells: booleanToXml(model.formatCells, "0"), + formatColumns: booleanToXml(model.formatColumns, "0"), + formatRows: booleanToXml(model.formatRows, "0"), + insertColumns: booleanToXml(model.insertColumns, "0"), + insertRows: booleanToXml(model.insertRows, "0"), + insertHyperlinks: booleanToXml(model.insertHyperlinks, "0"), + deleteColumns: booleanToXml(model.deleteColumns, "0"), + deleteRows: booleanToXml(model.deleteRows, "0"), + sort: booleanToXml(model.sort, "0"), + autoFilter: booleanToXml(model.autoFilter, "0"), + pivotTables: booleanToXml(model.pivotTables, "0") + }; + if (model.sheet) { + attributes.algorithmName = model.algorithmName; + attributes.hashValue = model.hashValue; + attributes.saltValue = model.saltValue; + attributes.spinCount = model.spinCount; + attributes.objects = booleanToXml(model.objects === false, "1"); + attributes.scenarios = booleanToXml(model.scenarios === false, "1"); + } + if (_2.some(attributes, (value) => value !== void 0)) { + xmlStream.leafNode(this.tag, attributes); + } + } + } + parseOpen(node) { + switch (node.name) { + case this.tag: + this.model = { + sheet: xmlToBoolean(node.attributes.sheet, "1"), + objects: node.attributes.objects === "1" ? false : void 0, + scenarios: node.attributes.scenarios === "1" ? false : void 0, + selectLockedCells: node.attributes.selectLockedCells === "1" ? false : void 0, + selectUnlockedCells: node.attributes.selectUnlockedCells === "1" ? false : void 0, + formatCells: xmlToBoolean(node.attributes.formatCells, "0"), + formatColumns: xmlToBoolean(node.attributes.formatColumns, "0"), + formatRows: xmlToBoolean(node.attributes.formatRows, "0"), + insertColumns: xmlToBoolean(node.attributes.insertColumns, "0"), + insertRows: xmlToBoolean(node.attributes.insertRows, "0"), + insertHyperlinks: xmlToBoolean(node.attributes.insertHyperlinks, "0"), + deleteColumns: xmlToBoolean(node.attributes.deleteColumns, "0"), + deleteRows: xmlToBoolean(node.attributes.deleteRows, "0"), + sort: xmlToBoolean(node.attributes.sort, "0"), + autoFilter: xmlToBoolean(node.attributes.autoFilter, "0"), + pivotTables: xmlToBoolean(node.attributes.pivotTables, "0") + }; + if (node.attributes.algorithmName) { + this.model.algorithmName = node.attributes.algorithmName; + this.model.hashValue = node.attributes.hashValue; + this.model.saltValue = node.attributes.saltValue; + this.model.spinCount = parseInt(node.attributes.spinCount, 10); + } + return true; + default: + return false; + } + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = SheetProtectionXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/page-margins-xform.js +var require_page_margins_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/page-margins-xform.js"(exports2, module2) { + var _2 = require_under_dash(); + var BaseXform = require_base_xform(); + var PageMarginsXform = class extends BaseXform { + get tag() { + return "pageMargins"; + } + render(xmlStream, model) { + if (model) { + const attributes = { + left: model.left, + right: model.right, + top: model.top, + bottom: model.bottom, + header: model.header, + footer: model.footer + }; + if (_2.some(attributes, (value) => value !== void 0)) { + xmlStream.leafNode(this.tag, attributes); + } + } + } + parseOpen(node) { + switch (node.name) { + case this.tag: + this.model = { + left: parseFloat(node.attributes.left || 0.7), + right: parseFloat(node.attributes.right || 0.7), + top: parseFloat(node.attributes.top || 0.75), + bottom: parseFloat(node.attributes.bottom || 0.75), + header: parseFloat(node.attributes.header || 0.3), + footer: parseFloat(node.attributes.footer || 0.3) + }; + return true; + default: + return false; + } + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = PageMarginsXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/page-setup-xform.js +var require_page_setup_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/page-setup-xform.js"(exports2, module2) { + var _2 = require_under_dash(); + var BaseXform = require_base_xform(); + function booleanToXml(model) { + return model ? "1" : void 0; + } + function pageOrderToXml(model) { + switch (model) { + case "overThenDown": + return model; + default: + return void 0; + } + } + function cellCommentsToXml(model) { + switch (model) { + case "atEnd": + case "asDisplyed": + return model; + default: + return void 0; + } + } + function errorsToXml(model) { + switch (model) { + case "dash": + case "blank": + case "NA": + return model; + default: + return void 0; + } + } + function pageSizeToModel(value) { + return value !== void 0 ? parseInt(value, 10) : void 0; + } + var PageSetupXform = class extends BaseXform { + get tag() { + return "pageSetup"; + } + render(xmlStream, model) { + if (model) { + const attributes = { + paperSize: model.paperSize, + orientation: model.orientation, + horizontalDpi: model.horizontalDpi, + verticalDpi: model.verticalDpi, + pageOrder: pageOrderToXml(model.pageOrder), + blackAndWhite: booleanToXml(model.blackAndWhite), + draft: booleanToXml(model.draft), + cellComments: cellCommentsToXml(model.cellComments), + errors: errorsToXml(model.errors), + scale: model.scale, + fitToWidth: model.fitToWidth, + fitToHeight: model.fitToHeight, + firstPageNumber: model.firstPageNumber, + useFirstPageNumber: booleanToXml(model.firstPageNumber), + usePrinterDefaults: booleanToXml(model.usePrinterDefaults), + copies: model.copies + }; + if (_2.some(attributes, (value) => value !== void 0)) { + xmlStream.leafNode(this.tag, attributes); + } + } + } + parseOpen(node) { + switch (node.name) { + case this.tag: + this.model = { + paperSize: pageSizeToModel(node.attributes.paperSize), + orientation: node.attributes.orientation || "portrait", + horizontalDpi: parseInt(node.attributes.horizontalDpi || "4294967295", 10), + verticalDpi: parseInt(node.attributes.verticalDpi || "4294967295", 10), + pageOrder: node.attributes.pageOrder || "downThenOver", + blackAndWhite: node.attributes.blackAndWhite === "1", + draft: node.attributes.draft === "1", + cellComments: node.attributes.cellComments || "None", + errors: node.attributes.errors || "displayed", + scale: parseInt(node.attributes.scale || "100", 10), + fitToWidth: parseInt(node.attributes.fitToWidth || "1", 10), + fitToHeight: parseInt(node.attributes.fitToHeight || "1", 10), + firstPageNumber: parseInt(node.attributes.firstPageNumber || "1", 10), + useFirstPageNumber: node.attributes.useFirstPageNumber === "1", + usePrinterDefaults: node.attributes.usePrinterDefaults === "1", + copies: parseInt(node.attributes.copies || "1", 10) + }; + return true; + default: + return false; + } + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = PageSetupXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/print-options-xform.js +var require_print_options_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/print-options-xform.js"(exports2, module2) { + var _2 = require_under_dash(); + var BaseXform = require_base_xform(); + function booleanToXml(model) { + return model ? "1" : void 0; + } + var PrintOptionsXform = class extends BaseXform { + get tag() { + return "printOptions"; + } + render(xmlStream, model) { + if (model) { + const attributes = { + headings: booleanToXml(model.showRowColHeaders), + gridLines: booleanToXml(model.showGridLines), + horizontalCentered: booleanToXml(model.horizontalCentered), + verticalCentered: booleanToXml(model.verticalCentered) + }; + if (_2.some(attributes, (value) => value !== void 0)) { + xmlStream.leafNode(this.tag, attributes); + } + } + } + parseOpen(node) { + switch (node.name) { + case this.tag: + this.model = { + showRowColHeaders: node.attributes.headings === "1", + showGridLines: node.attributes.gridLines === "1", + horizontalCentered: node.attributes.horizontalCentered === "1", + verticalCentered: node.attributes.verticalCentered === "1" + }; + return true; + default: + return false; + } + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = PrintOptionsXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/auto-filter-xform.js +var require_auto_filter_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/auto-filter-xform.js"(exports2, module2) { + var colCache = require_col_cache(); + var BaseXform = require_base_xform(); + var AutoFilterXform = class extends BaseXform { + get tag() { + return "autoFilter"; + } + render(xmlStream, model) { + if (model) { + if (typeof model === "string") { + xmlStream.leafNode("autoFilter", { ref: model }); + } else { + const getAddress = function(addr) { + if (typeof addr === "string") { + return addr; + } + return colCache.getAddress(addr.row, addr.column).address; + }; + const firstAddress = getAddress(model.from); + const secondAddress = getAddress(model.to); + if (firstAddress && secondAddress) { + xmlStream.leafNode("autoFilter", { ref: `${firstAddress}:${secondAddress}` }); + } + } + } + } + parseOpen(node) { + if (node.name === "autoFilter") { + this.model = node.attributes.ref; + } + } + }; + module2.exports = AutoFilterXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/picture-xform.js +var require_picture_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/picture-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var PictureXform = class extends BaseXform { + get tag() { + return "picture"; + } + render(xmlStream, model) { + if (model) { + xmlStream.leafNode(this.tag, { "r:id": model.rId }); + } + } + parseOpen(node) { + switch (node.name) { + case this.tag: + this.model = { + rId: node.attributes["r:id"] + }; + return true; + default: + return false; + } + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = PictureXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/drawing-xform.js +var require_drawing_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/drawing-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var DrawingXform = class extends BaseXform { + get tag() { + return "drawing"; + } + render(xmlStream, model) { + if (model) { + xmlStream.leafNode(this.tag, { "r:id": model.rId }); + } + } + parseOpen(node) { + switch (node.name) { + case this.tag: + this.model = { + rId: node.attributes["r:id"] + }; + return true; + default: + return false; + } + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = DrawingXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/table-part-xform.js +var require_table_part_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/table-part-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var TablePartXform = class extends BaseXform { + get tag() { + return "tablePart"; + } + render(xmlStream, model) { + if (model) { + xmlStream.leafNode(this.tag, { "r:id": model.rId }); + } + } + parseOpen(node) { + switch (node.name) { + case this.tag: + this.model = { + rId: node.attributes["r:id"] + }; + return true; + default: + return false; + } + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = TablePartXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/page-breaks-xform.js +var require_page_breaks_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/page-breaks-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var PageBreaksXform = class extends BaseXform { + get tag() { + return "brk"; + } + render(xmlStream, model) { + xmlStream.leafNode("brk", model); + } + parseOpen(node) { + if (node.name === "brk") { + this.model = node.attributes.ref; + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = PageBreaksXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/row-breaks-xform.js +var require_row_breaks_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/row-breaks-xform.js"(exports2, module2) { + "use strict"; + var PageBreaksXform = require_page_breaks_xform(); + var ListXform = require_list_xform(); + var RowBreaksXform = class extends ListXform { + constructor() { + const options = { + tag: "rowBreaks", + count: true, + childXform: new PageBreaksXform() + }; + super(options); + } + // get tag() { return 'rowBreaks'; } + render(xmlStream, model) { + if (model && model.length) { + xmlStream.openNode(this.tag, this.$); + if (this.count) { + xmlStream.addAttribute(this.$count, model.length); + xmlStream.addAttribute("manualBreakCount", model.length); + } + const { childXform } = this; + model.forEach((childModel) => { + childXform.render(xmlStream, childModel); + }); + xmlStream.closeNode(); + } else if (this.empty) { + xmlStream.leafNode(this.tag); + } + } + }; + module2.exports = RowBreaksXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/header-footer-xform.js +var require_header_footer_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/header-footer-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var HeaderFooterXform = class extends BaseXform { + get tag() { + return "headerFooter"; + } + render(xmlStream, model) { + if (model) { + xmlStream.addRollback(); + let createTag = false; + xmlStream.openNode("headerFooter"); + if (model.differentFirst) { + xmlStream.addAttribute("differentFirst", "1"); + createTag = true; + } + if (model.differentOddEven) { + xmlStream.addAttribute("differentOddEven", "1"); + createTag = true; + } + if (model.oddHeader && typeof model.oddHeader === "string") { + xmlStream.leafNode("oddHeader", null, model.oddHeader); + createTag = true; + } + if (model.oddFooter && typeof model.oddFooter === "string") { + xmlStream.leafNode("oddFooter", null, model.oddFooter); + createTag = true; + } + if (model.evenHeader && typeof model.evenHeader === "string") { + xmlStream.leafNode("evenHeader", null, model.evenHeader); + createTag = true; + } + if (model.evenFooter && typeof model.evenFooter === "string") { + xmlStream.leafNode("evenFooter", null, model.evenFooter); + createTag = true; + } + if (model.firstHeader && typeof model.firstHeader === "string") { + xmlStream.leafNode("firstHeader", null, model.firstHeader); + createTag = true; + } + if (model.firstFooter && typeof model.firstFooter === "string") { + xmlStream.leafNode("firstFooter", null, model.firstFooter); + createTag = true; + } + if (createTag) { + xmlStream.closeNode(); + xmlStream.commit(); + } else { + xmlStream.rollback(); + } + } + } + parseOpen(node) { + switch (node.name) { + case "headerFooter": + this.model = {}; + if (node.attributes.differentFirst) { + this.model.differentFirst = parseInt(node.attributes.differentFirst, 0) === 1; + } + if (node.attributes.differentOddEven) { + this.model.differentOddEven = parseInt(node.attributes.differentOddEven, 0) === 1; + } + return true; + case "oddHeader": + this.currentNode = "oddHeader"; + return true; + case "oddFooter": + this.currentNode = "oddFooter"; + return true; + case "evenHeader": + this.currentNode = "evenHeader"; + return true; + case "evenFooter": + this.currentNode = "evenFooter"; + return true; + case "firstHeader": + this.currentNode = "firstHeader"; + return true; + case "firstFooter": + this.currentNode = "firstFooter"; + return true; + default: + return false; + } + } + parseText(text) { + switch (this.currentNode) { + case "oddHeader": + this.model.oddHeader = text; + break; + case "oddFooter": + this.model.oddFooter = text; + break; + case "evenHeader": + this.model.evenHeader = text; + break; + case "evenFooter": + this.model.evenFooter = text; + break; + case "firstHeader": + this.model.firstHeader = text; + break; + case "firstFooter": + this.model.firstFooter = text; + break; + default: + break; + } + } + parseClose() { + switch (this.currentNode) { + case "oddHeader": + case "oddFooter": + case "evenHeader": + case "evenFooter": + case "firstHeader": + case "firstFooter": + this.currentNode = void 0; + return true; + default: + return false; + } + } + }; + module2.exports = HeaderFooterXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/composite-xform.js +var require_composite_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/composite-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var CompositeXform = class extends BaseXform { + createNewModel(node) { + return {}; + } + parseOpen(node) { + this.parser = this.parser || this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + if (node.name === this.tag) { + this.model = this.createNewModel(node); + return true; + } + return false; + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + onParserClose(name, parser) { + this.model[name] = parser.model; + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.onParserClose(name, this.parser); + this.parser = void 0; + } + return true; + } + return name !== this.tag; + } + }; + module2.exports = CompositeXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/cfvo-xform.js +var require_cfvo_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/cfvo-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var CfvoXform = class extends BaseXform { + get tag() { + return "cfvo"; + } + render(xmlStream, model) { + xmlStream.leafNode(this.tag, { + type: model.type, + val: model.value + }); + } + parseOpen(node) { + this.model = { + type: node.attributes.type, + value: BaseXform.toFloatValue(node.attributes.val) + }; + } + parseClose(name) { + return name !== this.tag; + } + }; + module2.exports = CfvoXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/databar-xform.js +var require_databar_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/databar-xform.js"(exports2, module2) { + var CompositeXform = require_composite_xform(); + var ColorXform = require_color_xform(); + var CfvoXform = require_cfvo_xform(); + var DatabarXform = class extends CompositeXform { + constructor() { + super(); + this.map = { + cfvo: this.cfvoXform = new CfvoXform(), + color: this.colorXform = new ColorXform() + }; + } + get tag() { + return "dataBar"; + } + render(xmlStream, model) { + xmlStream.openNode(this.tag); + model.cfvo.forEach((cfvo) => { + this.cfvoXform.render(xmlStream, cfvo); + }); + this.colorXform.render(xmlStream, model.color); + xmlStream.closeNode(); + } + createNewModel() { + return { + cfvo: [] + }; + } + onParserClose(name, parser) { + switch (name) { + case "cfvo": + this.model.cfvo.push(parser.model); + break; + case "color": + this.model.color = parser.model; + break; + } + } + }; + module2.exports = DatabarXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/ext-lst-ref-xform.js +var require_ext_lst_ref_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/ext-lst-ref-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var CompositeXform = require_composite_xform(); + var X14IdXform = class extends BaseXform { + get tag() { + return "x14:id"; + } + render(xmlStream, model) { + xmlStream.leafNode(this.tag, null, model); + } + parseOpen() { + this.model = ""; + } + parseText(text) { + this.model += text; + } + parseClose(name) { + return name !== this.tag; + } + }; + var ExtXform = class extends CompositeXform { + constructor() { + super(); + this.map = { + "x14:id": this.idXform = new X14IdXform() + }; + } + get tag() { + return "ext"; + } + render(xmlStream, model) { + xmlStream.openNode(this.tag, { + uri: "{B025F937-C7B1-47D3-B67F-A62EFF666E3E}", + "xmlns:x14": "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main" + }); + this.idXform.render(xmlStream, model.x14Id); + xmlStream.closeNode(); + } + createNewModel() { + return {}; + } + onParserClose(name, parser) { + this.model.x14Id = parser.model; + } + }; + var ExtLstRefXform = class extends CompositeXform { + constructor() { + super(); + this.map = { + ext: new ExtXform() + }; + } + get tag() { + return "extLst"; + } + render(xmlStream, model) { + xmlStream.openNode(this.tag); + this.map.ext.render(xmlStream, model); + xmlStream.closeNode(); + } + createNewModel() { + return {}; + } + onParserClose(name, parser) { + Object.assign(this.model, parser.model); + } + }; + module2.exports = ExtLstRefXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/formula-xform.js +var require_formula_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/formula-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var FormulaXform = class extends BaseXform { + get tag() { + return "formula"; + } + render(xmlStream, model) { + xmlStream.leafNode(this.tag, null, model); + } + parseOpen() { + this.model = ""; + } + parseText(text) { + this.model += text; + } + parseClose(name) { + return name !== this.tag; + } + }; + module2.exports = FormulaXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/color-scale-xform.js +var require_color_scale_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/color-scale-xform.js"(exports2, module2) { + var CompositeXform = require_composite_xform(); + var ColorXform = require_color_xform(); + var CfvoXform = require_cfvo_xform(); + var ColorScaleXform = class extends CompositeXform { + constructor() { + super(); + this.map = { + cfvo: this.cfvoXform = new CfvoXform(), + color: this.colorXform = new ColorXform() + }; + } + get tag() { + return "colorScale"; + } + render(xmlStream, model) { + xmlStream.openNode(this.tag); + model.cfvo.forEach((cfvo) => { + this.cfvoXform.render(xmlStream, cfvo); + }); + model.color.forEach((color) => { + this.colorXform.render(xmlStream, color); + }); + xmlStream.closeNode(); + } + createNewModel(node) { + return { + cfvo: [], + color: [] + }; + } + onParserClose(name, parser) { + this.model[name].push(parser.model); + } + }; + module2.exports = ColorScaleXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/icon-set-xform.js +var require_icon_set_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/icon-set-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var CompositeXform = require_composite_xform(); + var CfvoXform = require_cfvo_xform(); + var IconSetXform = class extends CompositeXform { + constructor() { + super(); + this.map = { + cfvo: this.cfvoXform = new CfvoXform() + }; + } + get tag() { + return "iconSet"; + } + render(xmlStream, model) { + xmlStream.openNode(this.tag, { + iconSet: BaseXform.toStringAttribute(model.iconSet, "3TrafficLights"), + reverse: BaseXform.toBoolAttribute(model.reverse, false), + showValue: BaseXform.toBoolAttribute(model.showValue, true) + }); + model.cfvo.forEach((cfvo) => { + this.cfvoXform.render(xmlStream, cfvo); + }); + xmlStream.closeNode(); + } + createNewModel({ attributes }) { + return { + iconSet: BaseXform.toStringValue(attributes.iconSet, "3TrafficLights"), + reverse: BaseXform.toBoolValue(attributes.reverse), + showValue: BaseXform.toBoolValue(attributes.showValue), + cfvo: [] + }; + } + onParserClose(name, parser) { + this.model[name].push(parser.model); + } + }; + module2.exports = IconSetXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/cf-rule-xform.js +var require_cf_rule_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/cf-rule-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var CompositeXform = require_composite_xform(); + var Range = require_range4(); + var DatabarXform = require_databar_xform(); + var ExtLstRefXform = require_ext_lst_ref_xform(); + var FormulaXform = require_formula_xform(); + var ColorScaleXform = require_color_scale_xform(); + var IconSetXform = require_icon_set_xform(); + var extIcons = { + "3Triangles": true, + "3Stars": true, + "5Boxes": true + }; + var getTextFormula = (model) => { + if (model.formulae && model.formulae[0]) { + return model.formulae[0]; + } + const range = new Range(model.ref); + const { tl } = range; + switch (model.operator) { + case "containsText": + return `NOT(ISERROR(SEARCH("${model.text}",${tl})))`; + case "containsBlanks": + return `LEN(TRIM(${tl}))=0`; + case "notContainsBlanks": + return `LEN(TRIM(${tl}))>0`; + case "containsErrors": + return `ISERROR(${tl})`; + case "notContainsErrors": + return `NOT(ISERROR(${tl}))`; + default: + return void 0; + } + }; + var getTimePeriodFormula = (model) => { + if (model.formulae && model.formulae[0]) { + return model.formulae[0]; + } + const range = new Range(model.ref); + const { tl } = range; + switch (model.timePeriod) { + case "thisWeek": + return `AND(TODAY()-ROUNDDOWN(${tl},0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(${tl},0)-TODAY()<=7-WEEKDAY(TODAY()))`; + case "lastWeek": + return `AND(TODAY()-ROUNDDOWN(${tl},0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(${tl},0)<(WEEKDAY(TODAY())+7))`; + case "nextWeek": + return `AND(ROUNDDOWN(${tl},0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(${tl},0)-TODAY()<(15-WEEKDAY(TODAY())))`; + case "yesterday": + return `FLOOR(${tl},1)=TODAY()-1`; + case "today": + return `FLOOR(${tl},1)=TODAY()`; + case "tomorrow": + return `FLOOR(${tl},1)=TODAY()+1`; + case "last7Days": + return `AND(TODAY()-FLOOR(${tl},1)<=6,FLOOR(${tl},1)<=TODAY())`; + case "lastMonth": + return `AND(MONTH(${tl})=MONTH(EDATE(TODAY(),0-1)),YEAR(${tl})=YEAR(EDATE(TODAY(),0-1)))`; + case "thisMonth": + return `AND(MONTH(${tl})=MONTH(TODAY()),YEAR(${tl})=YEAR(TODAY()))`; + case "nextMonth": + return `AND(MONTH(${tl})=MONTH(EDATE(TODAY(),0+1)),YEAR(${tl})=YEAR(EDATE(TODAY(),0+1)))`; + default: + return void 0; + } + }; + var opType = (attributes) => { + const { type, operator } = attributes; + switch (type) { + case "containsText": + case "containsBlanks": + case "notContainsBlanks": + case "containsErrors": + case "notContainsErrors": + return { + type: "containsText", + operator: type + }; + default: + return { type, operator }; + } + }; + var CfRuleXform = class _CfRuleXform extends CompositeXform { + constructor() { + super(); + this.map = { + dataBar: this.databarXform = new DatabarXform(), + extLst: this.extLstRefXform = new ExtLstRefXform(), + formula: this.formulaXform = new FormulaXform(), + colorScale: this.colorScaleXform = new ColorScaleXform(), + iconSet: this.iconSetXform = new IconSetXform() + }; + } + get tag() { + return "cfRule"; + } + static isPrimitive(rule) { + if (rule.type === "iconSet") { + if (rule.custom || extIcons[rule.iconSet]) { + return false; + } + } + return true; + } + render(xmlStream, model) { + switch (model.type) { + case "expression": + this.renderExpression(xmlStream, model); + break; + case "cellIs": + this.renderCellIs(xmlStream, model); + break; + case "top10": + this.renderTop10(xmlStream, model); + break; + case "aboveAverage": + this.renderAboveAverage(xmlStream, model); + break; + case "dataBar": + this.renderDataBar(xmlStream, model); + break; + case "colorScale": + this.renderColorScale(xmlStream, model); + break; + case "iconSet": + this.renderIconSet(xmlStream, model); + break; + case "containsText": + this.renderText(xmlStream, model); + break; + case "timePeriod": + this.renderTimePeriod(xmlStream, model); + break; + } + } + renderExpression(xmlStream, model) { + xmlStream.openNode(this.tag, { + type: "expression", + dxfId: model.dxfId, + priority: model.priority + }); + this.formulaXform.render(xmlStream, model.formulae[0]); + xmlStream.closeNode(); + } + renderCellIs(xmlStream, model) { + xmlStream.openNode(this.tag, { + type: "cellIs", + dxfId: model.dxfId, + priority: model.priority, + operator: model.operator + }); + model.formulae.forEach((formula) => { + this.formulaXform.render(xmlStream, formula); + }); + xmlStream.closeNode(); + } + renderTop10(xmlStream, model) { + xmlStream.leafNode(this.tag, { + type: "top10", + dxfId: model.dxfId, + priority: model.priority, + percent: BaseXform.toBoolAttribute(model.percent, false), + bottom: BaseXform.toBoolAttribute(model.bottom, false), + rank: BaseXform.toIntValue(model.rank, 10, true) + }); + } + renderAboveAverage(xmlStream, model) { + xmlStream.leafNode(this.tag, { + type: "aboveAverage", + dxfId: model.dxfId, + priority: model.priority, + aboveAverage: BaseXform.toBoolAttribute(model.aboveAverage, true) + }); + } + renderDataBar(xmlStream, model) { + xmlStream.openNode(this.tag, { + type: "dataBar", + priority: model.priority + }); + this.databarXform.render(xmlStream, model); + this.extLstRefXform.render(xmlStream, model); + xmlStream.closeNode(); + } + renderColorScale(xmlStream, model) { + xmlStream.openNode(this.tag, { + type: "colorScale", + priority: model.priority + }); + this.colorScaleXform.render(xmlStream, model); + xmlStream.closeNode(); + } + renderIconSet(xmlStream, model) { + if (!_CfRuleXform.isPrimitive(model)) { + return; + } + xmlStream.openNode(this.tag, { + type: "iconSet", + priority: model.priority + }); + this.iconSetXform.render(xmlStream, model); + xmlStream.closeNode(); + } + renderText(xmlStream, model) { + xmlStream.openNode(this.tag, { + type: model.operator, + dxfId: model.dxfId, + priority: model.priority, + operator: BaseXform.toStringAttribute(model.operator, "containsText") + }); + const formula = getTextFormula(model); + if (formula) { + this.formulaXform.render(xmlStream, formula); + } + xmlStream.closeNode(); + } + renderTimePeriod(xmlStream, model) { + xmlStream.openNode(this.tag, { + type: "timePeriod", + dxfId: model.dxfId, + priority: model.priority, + timePeriod: model.timePeriod + }); + const formula = getTimePeriodFormula(model); + if (formula) { + this.formulaXform.render(xmlStream, formula); + } + xmlStream.closeNode(); + } + createNewModel({ attributes }) { + return { + ...opType(attributes), + dxfId: BaseXform.toIntValue(attributes.dxfId), + priority: BaseXform.toIntValue(attributes.priority), + timePeriod: attributes.timePeriod, + percent: BaseXform.toBoolValue(attributes.percent), + bottom: BaseXform.toBoolValue(attributes.bottom), + rank: BaseXform.toIntValue(attributes.rank), + aboveAverage: BaseXform.toBoolValue(attributes.aboveAverage) + }; + } + onParserClose(name, parser) { + switch (name) { + case "dataBar": + case "extLst": + case "colorScale": + case "iconSet": + Object.assign(this.model, parser.model); + break; + case "formula": + this.model.formulae = this.model.formulae || []; + this.model.formulae.push(parser.model); + break; + } + } + }; + module2.exports = CfRuleXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/conditional-formatting-xform.js +var require_conditional_formatting_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/conditional-formatting-xform.js"(exports2, module2) { + var CompositeXform = require_composite_xform(); + var CfRuleXform = require_cf_rule_xform(); + var ConditionalFormattingXform = class extends CompositeXform { + constructor() { + super(); + this.map = { + cfRule: new CfRuleXform() + }; + } + get tag() { + return "conditionalFormatting"; + } + render(xmlStream, model) { + if (!model.rules.some(CfRuleXform.isPrimitive)) { + return; + } + xmlStream.openNode(this.tag, { sqref: model.ref }); + model.rules.forEach((rule) => { + if (CfRuleXform.isPrimitive(rule)) { + rule.ref = model.ref; + this.map.cfRule.render(xmlStream, rule); + } + }); + xmlStream.closeNode(); + } + createNewModel({ attributes }) { + return { + ref: attributes.sqref, + rules: [] + }; + } + onParserClose(name, parser) { + this.model.rules.push(parser.model); + } + }; + module2.exports = ConditionalFormattingXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/conditional-formattings-xform.js +var require_conditional_formattings_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf/conditional-formattings-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var ConditionalFormattingXform = require_conditional_formatting_xform(); + var ConditionalFormattingsXform = class extends BaseXform { + constructor() { + super(); + this.cfXform = new ConditionalFormattingXform(); + } + get tag() { + return "conditionalFormatting"; + } + reset() { + this.model = []; + } + prepare(model, options) { + let nextPriority = model.reduce( + (p, cf) => Math.max(p, ...cf.rules.map((rule) => rule.priority || 0)), + 1 + ); + model.forEach((cf) => { + cf.rules.forEach((rule) => { + if (!rule.priority) { + rule.priority = nextPriority++; + } + if (rule.style) { + rule.dxfId = options.styles.addDxfStyle(rule.style); + } + }); + }); + } + render(xmlStream, model) { + model.forEach((cf) => { + this.cfXform.render(xmlStream, cf); + }); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "conditionalFormatting": + this.parser = this.cfXform; + this.parser.parseOpen(node); + return true; + default: + return false; + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.model.push(this.parser.model); + this.parser = void 0; + return false; + } + return true; + } + return false; + } + reconcile(model, options) { + model.forEach((cf) => { + cf.rules.forEach((rule) => { + if (rule.dxfId !== void 0) { + rule.style = options.styles.getDxfStyle(rule.dxfId); + delete rule.dxfId; + } + }); + }); + } + }; + module2.exports = ConditionalFormattingsXform; + } +}); + +// ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/rng.js +function rng() { + if (poolPtr > rnds8Pool.length - 16) { + import_crypto.default.randomFillSync(rnds8Pool); + poolPtr = 0; + } + return rnds8Pool.slice(poolPtr, poolPtr += 16); +} +var import_crypto, rnds8Pool, poolPtr; +var init_rng = __esm({ + "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/rng.js"() { + import_crypto = __toESM(require("crypto")); + rnds8Pool = new Uint8Array(256); + poolPtr = rnds8Pool.length; + } +}); + +// ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/regex.js +var regex_default; +var init_regex = __esm({ + "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/regex.js"() { + regex_default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i; + } +}); + +// ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/validate.js +function validate(uuid) { + return typeof uuid === "string" && regex_default.test(uuid); +} +var validate_default; +var init_validate = __esm({ + "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/validate.js"() { + init_regex(); + validate_default = validate; + } +}); + +// ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/stringify.js +function stringify(arr, offset = 0) { + const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + "-" + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + "-" + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + "-" + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + "-" + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); + if (!validate_default(uuid)) { + throw TypeError("Stringified UUID is invalid"); + } + return uuid; +} +var byteToHex, stringify_default; +var init_stringify = __esm({ + "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/stringify.js"() { + init_validate(); + byteToHex = []; + for (let i = 0; i < 256; ++i) { + byteToHex.push((i + 256).toString(16).substr(1)); + } + stringify_default = stringify; + } +}); + +// ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v1.js +function v1(options, buf, offset) { + let i = buf && offset || 0; + const b = buf || new Array(16); + options = options || {}; + let node = options.node || _nodeId; + let clockseq = options.clockseq !== void 0 ? options.clockseq : _clockseq; + if (node == null || clockseq == null) { + const seedBytes = options.random || (options.rng || rng)(); + if (node == null) { + node = _nodeId = [seedBytes[0] | 1, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]]; + } + if (clockseq == null) { + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 16383; + } + } + let msecs = options.msecs !== void 0 ? options.msecs : Date.now(); + let nsecs = options.nsecs !== void 0 ? options.nsecs : _lastNSecs + 1; + const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 1e4; + if (dt < 0 && options.clockseq === void 0) { + clockseq = clockseq + 1 & 16383; + } + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === void 0) { + nsecs = 0; + } + if (nsecs >= 1e4) { + throw new Error("uuid.v1(): Can't create more than 10M uuids/sec"); + } + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; + msecs += 122192928e5; + const tl = ((msecs & 268435455) * 1e4 + nsecs) % 4294967296; + b[i++] = tl >>> 24 & 255; + b[i++] = tl >>> 16 & 255; + b[i++] = tl >>> 8 & 255; + b[i++] = tl & 255; + const tmh = msecs / 4294967296 * 1e4 & 268435455; + b[i++] = tmh >>> 8 & 255; + b[i++] = tmh & 255; + b[i++] = tmh >>> 24 & 15 | 16; + b[i++] = tmh >>> 16 & 255; + b[i++] = clockseq >>> 8 | 128; + b[i++] = clockseq & 255; + for (let n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + return buf || stringify_default(b); +} +var _nodeId, _clockseq, _lastMSecs, _lastNSecs, v1_default; +var init_v1 = __esm({ + "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v1.js"() { + init_rng(); + init_stringify(); + _lastMSecs = 0; + _lastNSecs = 0; + v1_default = v1; + } +}); + +// ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/parse.js +function parse(uuid) { + if (!validate_default(uuid)) { + throw TypeError("Invalid UUID"); + } + let v; + const arr = new Uint8Array(16); + arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24; + arr[1] = v >>> 16 & 255; + arr[2] = v >>> 8 & 255; + arr[3] = v & 255; + arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8; + arr[5] = v & 255; + arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8; + arr[7] = v & 255; + arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8; + arr[9] = v & 255; + arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 1099511627776 & 255; + arr[11] = v / 4294967296 & 255; + arr[12] = v >>> 24 & 255; + arr[13] = v >>> 16 & 255; + arr[14] = v >>> 8 & 255; + arr[15] = v & 255; + return arr; +} +var parse_default; +var init_parse = __esm({ + "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/parse.js"() { + init_validate(); + parse_default = parse; + } +}); + +// ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v35.js +function stringToBytes(str) { + str = unescape(encodeURIComponent(str)); + const bytes = []; + for (let i = 0; i < str.length; ++i) { + bytes.push(str.charCodeAt(i)); + } + return bytes; +} +function v35_default(name, version2, hashfunc) { + function generateUUID(value, namespace, buf, offset) { + if (typeof value === "string") { + value = stringToBytes(value); + } + if (typeof namespace === "string") { + namespace = parse_default(namespace); + } + if (namespace.length !== 16) { + throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)"); + } + let bytes = new Uint8Array(16 + value.length); + bytes.set(namespace); + bytes.set(value, namespace.length); + bytes = hashfunc(bytes); + bytes[6] = bytes[6] & 15 | version2; + bytes[8] = bytes[8] & 63 | 128; + if (buf) { + offset = offset || 0; + for (let i = 0; i < 16; ++i) { + buf[offset + i] = bytes[i]; + } + return buf; + } + return stringify_default(bytes); + } + try { + generateUUID.name = name; + } catch (err) { + } + generateUUID.DNS = DNS; + generateUUID.URL = URL2; + return generateUUID; +} +var DNS, URL2; +var init_v35 = __esm({ + "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v35.js"() { + init_stringify(); + init_parse(); + DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8"; + URL2 = "6ba7b811-9dad-11d1-80b4-00c04fd430c8"; + } +}); + +// ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/md5.js +function md5(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === "string") { + bytes = Buffer.from(bytes, "utf8"); + } + return import_crypto2.default.createHash("md5").update(bytes).digest(); +} +var import_crypto2, md5_default; +var init_md5 = __esm({ + "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/md5.js"() { + import_crypto2 = __toESM(require("crypto")); + md5_default = md5; + } +}); + +// ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v3.js +var v3, v3_default; +var init_v3 = __esm({ + "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v3.js"() { + init_v35(); + init_md5(); + v3 = v35_default("v3", 48, md5_default); + v3_default = v3; + } +}); + +// ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v4.js +function v4(options, buf, offset) { + options = options || {}; + const rnds = options.random || (options.rng || rng)(); + rnds[6] = rnds[6] & 15 | 64; + rnds[8] = rnds[8] & 63 | 128; + if (buf) { + offset = offset || 0; + for (let i = 0; i < 16; ++i) { + buf[offset + i] = rnds[i]; + } + return buf; + } + return stringify_default(rnds); +} +var v4_default; +var init_v4 = __esm({ + "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v4.js"() { + init_rng(); + init_stringify(); + v4_default = v4; + } +}); + +// ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/sha1.js +function sha1(bytes) { + if (Array.isArray(bytes)) { + bytes = Buffer.from(bytes); + } else if (typeof bytes === "string") { + bytes = Buffer.from(bytes, "utf8"); + } + return import_crypto3.default.createHash("sha1").update(bytes).digest(); +} +var import_crypto3, sha1_default; +var init_sha1 = __esm({ + "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/sha1.js"() { + import_crypto3 = __toESM(require("crypto")); + sha1_default = sha1; + } +}); + +// ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v5.js +var v5, v5_default; +var init_v5 = __esm({ + "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/v5.js"() { + init_v35(); + init_sha1(); + v5 = v35_default("v5", 80, sha1_default); + v5_default = v5; + } +}); + +// ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/nil.js +var nil_default; +var init_nil = __esm({ + "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/nil.js"() { + nil_default = "00000000-0000-0000-0000-000000000000"; + } +}); + +// ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/version.js +function version(uuid) { + if (!validate_default(uuid)) { + throw TypeError("Invalid UUID"); + } + return parseInt(uuid.substr(14, 1), 16); +} +var version_default; +var init_version = __esm({ + "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/version.js"() { + init_validate(); + version_default = version; + } +}); + +// ../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/index.js +var esm_node_exports = {}; +__export(esm_node_exports, { + NIL: () => nil_default, + parse: () => parse_default, + stringify: () => stringify_default, + v1: () => v1_default, + v3: () => v3_default, + v4: () => v4_default, + v5: () => v5_default, + validate: () => validate_default, + version: () => version_default +}); +var init_esm_node = __esm({ + "../../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-node/index.js"() { + init_v1(); + init_v3(); + init_v4(); + init_v5(); + init_nil(); + init_version(); + init_validate(); + init_stringify(); + init_parse(); + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/f-ext-xform.js +var require_f_ext_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/f-ext-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var FExtXform = class extends BaseXform { + get tag() { + return "xm:f"; + } + render(xmlStream, model) { + xmlStream.leafNode(this.tag, null, model); + } + parseOpen() { + this.model = ""; + } + parseText(text) { + this.model += text; + } + parseClose(name) { + return name !== this.tag; + } + }; + module2.exports = FExtXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/cfvo-ext-xform.js +var require_cfvo_ext_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/cfvo-ext-xform.js"(exports2, module2) { + var CompositeXform = require_composite_xform(); + var FExtXform = require_f_ext_xform(); + var CfvoExtXform = class extends CompositeXform { + constructor() { + super(); + this.map = { + "xm:f": this.fExtXform = new FExtXform() + }; + } + get tag() { + return "x14:cfvo"; + } + render(xmlStream, model) { + xmlStream.openNode(this.tag, { + type: model.type + }); + if (model.value !== void 0) { + this.fExtXform.render(xmlStream, model.value); + } + xmlStream.closeNode(); + } + createNewModel(node) { + return { + type: node.attributes.type + }; + } + onParserClose(name, parser) { + switch (name) { + case "xm:f": + this.model.value = parser.model ? parseFloat(parser.model) : 0; + break; + } + } + }; + module2.exports = CfvoExtXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/databar-ext-xform.js +var require_databar_ext_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/databar-ext-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var CompositeXform = require_composite_xform(); + var ColorXform = require_color_xform(); + var CfvoExtXform = require_cfvo_ext_xform(); + var DatabarExtXform = class extends CompositeXform { + constructor() { + super(); + this.map = { + "x14:cfvo": this.cfvoXform = new CfvoExtXform(), + "x14:borderColor": this.borderColorXform = new ColorXform("x14:borderColor"), + "x14:negativeBorderColor": this.negativeBorderColorXform = new ColorXform( + "x14:negativeBorderColor" + ), + "x14:negativeFillColor": this.negativeFillColorXform = new ColorXform( + "x14:negativeFillColor" + ), + "x14:axisColor": this.axisColorXform = new ColorXform("x14:axisColor") + }; + } + static isExt(rule) { + return !rule.gradient; + } + get tag() { + return "x14:dataBar"; + } + render(xmlStream, model) { + xmlStream.openNode(this.tag, { + minLength: BaseXform.toIntAttribute(model.minLength, 0, true), + maxLength: BaseXform.toIntAttribute(model.maxLength, 100, true), + border: BaseXform.toBoolAttribute(model.border, false), + gradient: BaseXform.toBoolAttribute(model.gradient, true), + negativeBarColorSameAsPositive: BaseXform.toBoolAttribute( + model.negativeBarColorSameAsPositive, + true + ), + negativeBarBorderColorSameAsPositive: BaseXform.toBoolAttribute( + model.negativeBarBorderColorSameAsPositive, + true + ), + axisPosition: BaseXform.toAttribute(model.axisPosition, "auto"), + direction: BaseXform.toAttribute(model.direction, "leftToRight") + }); + model.cfvo.forEach((cfvo) => { + this.cfvoXform.render(xmlStream, cfvo); + }); + this.borderColorXform.render(xmlStream, model.borderColor); + this.negativeBorderColorXform.render(xmlStream, model.negativeBorderColor); + this.negativeFillColorXform.render(xmlStream, model.negativeFillColor); + this.axisColorXform.render(xmlStream, model.axisColor); + xmlStream.closeNode(); + } + createNewModel({ attributes }) { + return { + cfvo: [], + minLength: BaseXform.toIntValue(attributes.minLength, 0), + maxLength: BaseXform.toIntValue(attributes.maxLength, 100), + border: BaseXform.toBoolValue(attributes.border, false), + gradient: BaseXform.toBoolValue(attributes.gradient, true), + negativeBarColorSameAsPositive: BaseXform.toBoolValue( + attributes.negativeBarColorSameAsPositive, + true + ), + negativeBarBorderColorSameAsPositive: BaseXform.toBoolValue( + attributes.negativeBarBorderColorSameAsPositive, + true + ), + axisPosition: BaseXform.toStringValue(attributes.axisPosition, "auto"), + direction: BaseXform.toStringValue(attributes.direction, "leftToRight") + }; + } + onParserClose(name, parser) { + const [, prop] = name.split(":"); + switch (prop) { + case "cfvo": + this.model.cfvo.push(parser.model); + break; + default: + this.model[prop] = parser.model; + break; + } + } + }; + module2.exports = DatabarExtXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/cf-icon-ext-xform.js +var require_cf_icon_ext_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/cf-icon-ext-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var CfIconExtXform = class extends BaseXform { + get tag() { + return "x14:cfIcon"; + } + render(xmlStream, model) { + xmlStream.leafNode(this.tag, { + iconSet: model.iconSet, + iconId: model.iconId + }); + } + parseOpen({ attributes }) { + this.model = { + iconSet: attributes.iconSet, + iconId: BaseXform.toIntValue(attributes.iconId) + }; + } + parseClose(name) { + return name !== this.tag; + } + }; + module2.exports = CfIconExtXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/icon-set-ext-xform.js +var require_icon_set_ext_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/icon-set-ext-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var CompositeXform = require_composite_xform(); + var CfvoExtXform = require_cfvo_ext_xform(); + var CfIconExtXform = require_cf_icon_ext_xform(); + var IconSetExtXform = class extends CompositeXform { + constructor() { + super(); + this.map = { + "x14:cfvo": this.cfvoXform = new CfvoExtXform(), + "x14:cfIcon": this.cfIconXform = new CfIconExtXform() + }; + } + get tag() { + return "x14:iconSet"; + } + render(xmlStream, model) { + xmlStream.openNode(this.tag, { + iconSet: BaseXform.toStringAttribute(model.iconSet), + reverse: BaseXform.toBoolAttribute(model.reverse, false), + showValue: BaseXform.toBoolAttribute(model.showValue, true), + custom: BaseXform.toBoolAttribute(model.icons, false) + }); + model.cfvo.forEach((cfvo) => { + this.cfvoXform.render(xmlStream, cfvo); + }); + if (model.icons) { + model.icons.forEach((icon, i) => { + icon.iconId = i; + this.cfIconXform.render(xmlStream, icon); + }); + } + xmlStream.closeNode(); + } + createNewModel({ attributes }) { + return { + cfvo: [], + iconSet: BaseXform.toStringValue(attributes.iconSet, "3TrafficLights"), + reverse: BaseXform.toBoolValue(attributes.reverse, false), + showValue: BaseXform.toBoolValue(attributes.showValue, true) + }; + } + onParserClose(name, parser) { + const [, prop] = name.split(":"); + switch (prop) { + case "cfvo": + this.model.cfvo.push(parser.model); + break; + case "cfIcon": + if (!this.model.icons) { + this.model.icons = []; + } + this.model.icons.push(parser.model); + break; + default: + this.model[prop] = parser.model; + break; + } + } + }; + module2.exports = IconSetExtXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/cf-rule-ext-xform.js +var require_cf_rule_ext_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/cf-rule-ext-xform.js"(exports2, module2) { + var { v4: uuidv4 } = (init_esm_node(), __toCommonJS(esm_node_exports)); + var BaseXform = require_base_xform(); + var CompositeXform = require_composite_xform(); + var DatabarExtXform = require_databar_ext_xform(); + var IconSetExtXform = require_icon_set_ext_xform(); + var extIcons = { + "3Triangles": true, + "3Stars": true, + "5Boxes": true + }; + var CfRuleExtXform = class _CfRuleExtXform extends CompositeXform { + constructor() { + super(); + this.map = { + "x14:dataBar": this.databarXform = new DatabarExtXform(), + "x14:iconSet": this.iconSetXform = new IconSetExtXform() + }; + } + get tag() { + return "x14:cfRule"; + } + static isExt(rule) { + if (rule.type === "dataBar") { + return DatabarExtXform.isExt(rule); + } + if (rule.type === "iconSet") { + if (rule.custom || extIcons[rule.iconSet]) { + return true; + } + } + return false; + } + prepare(model) { + if (_CfRuleExtXform.isExt(model)) { + model.x14Id = `{${uuidv4()}}`.toUpperCase(); + } + } + render(xmlStream, model) { + if (!_CfRuleExtXform.isExt(model)) { + return; + } + switch (model.type) { + case "dataBar": + this.renderDataBar(xmlStream, model); + break; + case "iconSet": + this.renderIconSet(xmlStream, model); + break; + } + } + renderDataBar(xmlStream, model) { + xmlStream.openNode(this.tag, { + type: "dataBar", + id: model.x14Id + }); + this.databarXform.render(xmlStream, model); + xmlStream.closeNode(); + } + renderIconSet(xmlStream, model) { + xmlStream.openNode(this.tag, { + type: "iconSet", + priority: model.priority, + id: model.x14Id || `{${uuidv4()}}` + }); + this.iconSetXform.render(xmlStream, model); + xmlStream.closeNode(); + } + createNewModel({ attributes }) { + return { + type: attributes.type, + x14Id: attributes.id, + priority: BaseXform.toIntValue(attributes.priority) + }; + } + onParserClose(name, parser) { + Object.assign(this.model, parser.model); + } + }; + module2.exports = CfRuleExtXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/sqref-ext-xform.js +var require_sqref_ext_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/sqref-ext-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var SqrefExtXform = class extends BaseXform { + get tag() { + return "xm:sqref"; + } + render(xmlStream, model) { + xmlStream.leafNode(this.tag, null, model); + } + parseOpen() { + this.model = ""; + } + parseText(text) { + this.model += text; + } + parseClose(name) { + return name !== this.tag; + } + }; + module2.exports = SqrefExtXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/conditional-formatting-ext-xform.js +var require_conditional_formatting_ext_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/conditional-formatting-ext-xform.js"(exports2, module2) { + var CompositeXform = require_composite_xform(); + var SqRefExtXform = require_sqref_ext_xform(); + var CfRuleExtXform = require_cf_rule_ext_xform(); + var ConditionalFormattingExtXform = class extends CompositeXform { + constructor() { + super(); + this.map = { + "xm:sqref": this.sqRef = new SqRefExtXform(), + "x14:cfRule": this.cfRule = new CfRuleExtXform() + }; + } + get tag() { + return "x14:conditionalFormatting"; + } + prepare(model, options) { + model.rules.forEach((rule) => { + this.cfRule.prepare(rule, options); + }); + } + render(xmlStream, model) { + if (!model.rules.some(CfRuleExtXform.isExt)) { + return; + } + xmlStream.openNode(this.tag, { + "xmlns:xm": "http://schemas.microsoft.com/office/excel/2006/main" + }); + model.rules.filter(CfRuleExtXform.isExt).forEach((rule) => this.cfRule.render(xmlStream, rule)); + this.sqRef.render(xmlStream, model.ref); + xmlStream.closeNode(); + } + createNewModel() { + return { + rules: [] + }; + } + onParserClose(name, parser) { + switch (name) { + case "xm:sqref": + this.model.ref = parser.model; + break; + case "x14:cfRule": + this.model.rules.push(parser.model); + break; + } + } + }; + module2.exports = ConditionalFormattingExtXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/conditional-formattings-ext-xform.js +var require_conditional_formattings_ext_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/conditional-formattings-ext-xform.js"(exports2, module2) { + var CompositeXform = require_composite_xform(); + var CfRuleExtXform = require_cf_rule_ext_xform(); + var ConditionalFormattingExtXform = require_conditional_formatting_ext_xform(); + var ConditionalFormattingsExtXform = class extends CompositeXform { + constructor() { + super(); + this.map = { + "x14:conditionalFormatting": this.cfXform = new ConditionalFormattingExtXform() + }; + } + get tag() { + return "x14:conditionalFormattings"; + } + hasContent(model) { + if (model.hasExtContent === void 0) { + model.hasExtContent = model.some((cf) => cf.rules.some(CfRuleExtXform.isExt)); + } + return model.hasExtContent; + } + prepare(model, options) { + model.forEach((cf) => { + this.cfXform.prepare(cf, options); + }); + } + render(xmlStream, model) { + if (this.hasContent(model)) { + xmlStream.openNode(this.tag); + model.forEach((cf) => this.cfXform.render(xmlStream, cf)); + xmlStream.closeNode(); + } + } + createNewModel() { + return []; + } + onParserClose(name, parser) { + this.model.push(parser.model); + } + }; + module2.exports = ConditionalFormattingsExtXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/ext-lst-xform.js +var require_ext_lst_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/ext-lst-xform.js"(exports2, module2) { + var CompositeXform = require_composite_xform(); + var ConditionalFormattingsExt = require_conditional_formattings_ext_xform(); + var ExtXform = class extends CompositeXform { + constructor() { + super(); + this.map = { + "x14:conditionalFormattings": this.conditionalFormattings = new ConditionalFormattingsExt() + }; + } + get tag() { + return "ext"; + } + hasContent(model) { + return this.conditionalFormattings.hasContent(model.conditionalFormattings); + } + prepare(model, options) { + this.conditionalFormattings.prepare(model.conditionalFormattings, options); + } + render(xmlStream, model) { + xmlStream.openNode("ext", { + uri: "{78C0D931-6437-407d-A8EE-F0AAD7539E65}", + "xmlns:x14": "http://schemas.microsoft.com/office/spreadsheetml/2009/9/main" + }); + this.conditionalFormattings.render(xmlStream, model.conditionalFormattings); + xmlStream.closeNode(); + } + createNewModel() { + return {}; + } + onParserClose(name, parser) { + this.model[name] = parser.model; + } + }; + var ExtLstXform = class extends CompositeXform { + constructor() { + super(); + this.map = { + ext: this.ext = new ExtXform() + }; + } + get tag() { + return "extLst"; + } + prepare(model, options) { + this.ext.prepare(model, options); + } + hasContent(model) { + return this.ext.hasContent(model); + } + render(xmlStream, model) { + if (!this.hasContent(model)) { + return; + } + xmlStream.openNode("extLst"); + this.ext.render(xmlStream, model); + xmlStream.closeNode(); + } + createNewModel() { + return {}; + } + onParserClose(name, parser) { + Object.assign(this.model, parser.model); + } + }; + module2.exports = ExtLstXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/worksheet-xform.js +var require_worksheet_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/sheet/worksheet-xform.js"(exports2, module2) { + var _2 = require_under_dash(); + var colCache = require_col_cache(); + var XmlStream = require_xml_stream(); + var RelType = require_rel_type(); + var Merges = require_merges(); + var BaseXform = require_base_xform(); + var ListXform = require_list_xform(); + var RowXform = require_row_xform(); + var ColXform = require_col_xform(); + var DimensionXform = require_dimension_xform(); + var HyperlinkXform = require_hyperlink_xform(); + var MergeCellXform = require_merge_cell_xform(); + var DataValidationsXform = require_data_validations_xform(); + var SheetPropertiesXform = require_sheet_properties_xform(); + var SheetFormatPropertiesXform = require_sheet_format_properties_xform(); + var SheetViewXform = require_sheet_view_xform(); + var SheetProtectionXform = require_sheet_protection_xform(); + var PageMarginsXform = require_page_margins_xform(); + var PageSetupXform = require_page_setup_xform(); + var PrintOptionsXform = require_print_options_xform(); + var AutoFilterXform = require_auto_filter_xform(); + var PictureXform = require_picture_xform(); + var DrawingXform = require_drawing_xform(); + var TablePartXform = require_table_part_xform(); + var RowBreaksXform = require_row_breaks_xform(); + var HeaderFooterXform = require_header_footer_xform(); + var ConditionalFormattingsXform = require_conditional_formattings_xform(); + var ExtListXform = require_ext_lst_xform(); + var mergeRule = (rule, extRule) => { + Object.keys(extRule).forEach((key) => { + const value = rule[key]; + const extValue = extRule[key]; + if (value === void 0 && extValue !== void 0) { + rule[key] = extValue; + } + }); + }; + var mergeConditionalFormattings = (model, extModel) => { + if (!extModel || !extModel.length) { + return model; + } + if (!model || !model.length) { + return extModel; + } + const cfMap = {}; + const ruleMap = {}; + model.forEach((cf) => { + cfMap[cf.ref] = cf; + cf.rules.forEach((rule) => { + const { x14Id } = rule; + if (x14Id) { + ruleMap[x14Id] = rule; + } + }); + }); + extModel.forEach((extCf) => { + extCf.rules.forEach((extRule) => { + const rule = ruleMap[extRule.x14Id]; + if (rule) { + mergeRule(rule, extRule); + } else if (cfMap[extCf.ref]) { + cfMap[extCf.ref].rules.push(extRule); + } else { + model.push({ + ref: extCf.ref, + rules: [extRule] + }); + } + }); + }); + return model; + }; + var WorkSheetXform = class _WorkSheetXform extends BaseXform { + constructor(options) { + super(); + const { maxRows, maxCols, ignoreNodes } = options || {}; + this.ignoreNodes = ignoreNodes || []; + this.map = { + sheetPr: new SheetPropertiesXform(), + dimension: new DimensionXform(), + sheetViews: new ListXform({ + tag: "sheetViews", + count: false, + childXform: new SheetViewXform() + }), + sheetFormatPr: new SheetFormatPropertiesXform(), + cols: new ListXform({ tag: "cols", count: false, childXform: new ColXform() }), + sheetData: new ListXform({ + tag: "sheetData", + count: false, + empty: true, + childXform: new RowXform({ maxItems: maxCols }), + maxItems: maxRows + }), + autoFilter: new AutoFilterXform(), + mergeCells: new ListXform({ tag: "mergeCells", count: true, childXform: new MergeCellXform() }), + rowBreaks: new RowBreaksXform(), + hyperlinks: new ListXform({ + tag: "hyperlinks", + count: false, + childXform: new HyperlinkXform() + }), + pageMargins: new PageMarginsXform(), + dataValidations: new DataValidationsXform(), + pageSetup: new PageSetupXform(), + headerFooter: new HeaderFooterXform(), + printOptions: new PrintOptionsXform(), + picture: new PictureXform(), + drawing: new DrawingXform(), + sheetProtection: new SheetProtectionXform(), + tableParts: new ListXform({ tag: "tableParts", count: true, childXform: new TablePartXform() }), + conditionalFormatting: new ConditionalFormattingsXform(), + extLst: new ExtListXform() + }; + } + prepare(model, options) { + options.merges = new Merges(); + model.hyperlinks = options.hyperlinks = []; + model.comments = options.comments = []; + options.formulae = {}; + options.siFormulae = 0; + this.map.cols.prepare(model.cols, options); + this.map.sheetData.prepare(model.rows, options); + this.map.conditionalFormatting.prepare(model.conditionalFormattings, options); + model.mergeCells = options.merges.mergeCells; + const rels = model.rels = []; + function nextRid(r) { + return `rId${r.length + 1}`; + } + model.hyperlinks.forEach((hyperlink) => { + const rId = nextRid(rels); + hyperlink.rId = rId; + rels.push({ + Id: rId, + Type: RelType.Hyperlink, + Target: hyperlink.target, + TargetMode: "External" + }); + }); + if (model.comments.length > 0) { + const comment = { + Id: nextRid(rels), + Type: RelType.Comments, + Target: `../comments${model.id}.xml` + }; + rels.push(comment); + const vmlDrawing = { + Id: nextRid(rels), + Type: RelType.VmlDrawing, + Target: `../drawings/vmlDrawing${model.id}.vml` + }; + rels.push(vmlDrawing); + model.comments.forEach((item) => { + item.refAddress = colCache.decodeAddress(item.ref); + }); + options.commentRefs.push({ + commentName: `comments${model.id}`, + vmlDrawing: `vmlDrawing${model.id}` + }); + } + const drawingRelsHash = []; + let bookImage; + model.media.forEach((medium) => { + if (medium.type === "background") { + const rId = nextRid(rels); + bookImage = options.media[medium.imageId]; + rels.push({ + Id: rId, + Type: RelType.Image, + Target: `../media/${bookImage.name}.${bookImage.extension}` + }); + model.background = { + rId + }; + model.image = options.media[medium.imageId]; + } else if (medium.type === "image") { + let { drawing } = model; + bookImage = options.media[medium.imageId]; + if (!drawing) { + drawing = model.drawing = { + rId: nextRid(rels), + name: `drawing${++options.drawingsCount}`, + anchors: [], + rels: [] + }; + options.drawings.push(drawing); + rels.push({ + Id: drawing.rId, + Type: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing", + Target: `../drawings/${drawing.name}.xml` + }); + } + let rIdImage = this.preImageId === medium.imageId ? drawingRelsHash[medium.imageId] : drawingRelsHash[drawing.rels.length]; + if (!rIdImage) { + rIdImage = nextRid(drawing.rels); + drawingRelsHash[drawing.rels.length] = rIdImage; + drawing.rels.push({ + Id: rIdImage, + Type: "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image", + Target: `../media/${bookImage.name}.${bookImage.extension}` + }); + } + const anchor = { + picture: { + rId: rIdImage + }, + range: medium.range + }; + if (medium.hyperlinks && medium.hyperlinks.hyperlink) { + const rIdHyperLink = nextRid(drawing.rels); + drawingRelsHash[drawing.rels.length] = rIdHyperLink; + anchor.picture.hyperlinks = { + tooltip: medium.hyperlinks.tooltip, + rId: rIdHyperLink + }; + drawing.rels.push({ + Id: rIdHyperLink, + Type: RelType.Hyperlink, + Target: medium.hyperlinks.hyperlink, + TargetMode: "External" + }); + } + this.preImageId = medium.imageId; + drawing.anchors.push(anchor); + } + }); + model.tables.forEach((table) => { + const rId = nextRid(rels); + table.rId = rId; + rels.push({ + Id: rId, + Type: RelType.Table, + Target: `../tables/${table.target}` + }); + table.columns.forEach((column) => { + const { style } = column; + if (style) { + column.dxfId = options.styles.addDxfStyle(style); + } + }); + }); + this.map.extLst.prepare(model, options); + } + render(xmlStream, model) { + xmlStream.openXml(XmlStream.StdDocAttributes); + xmlStream.openNode("worksheet", _WorkSheetXform.WORKSHEET_ATTRIBUTES); + const sheetFormatPropertiesModel = model.properties ? { + defaultRowHeight: model.properties.defaultRowHeight, + dyDescent: model.properties.dyDescent, + outlineLevelCol: model.properties.outlineLevelCol, + outlineLevelRow: model.properties.outlineLevelRow + } : void 0; + if (model.properties && model.properties.defaultColWidth) { + sheetFormatPropertiesModel.defaultColWidth = model.properties.defaultColWidth; + } + const sheetPropertiesModel = { + outlineProperties: model.properties && model.properties.outlineProperties, + tabColor: model.properties && model.properties.tabColor, + pageSetup: model.pageSetup && model.pageSetup.fitToPage ? { + fitToPage: model.pageSetup.fitToPage + } : void 0 + }; + const pageMarginsModel = model.pageSetup && model.pageSetup.margins; + const printOptionsModel = { + showRowColHeaders: model.pageSetup && model.pageSetup.showRowColHeaders, + showGridLines: model.pageSetup && model.pageSetup.showGridLines, + horizontalCentered: model.pageSetup && model.pageSetup.horizontalCentered, + verticalCentered: model.pageSetup && model.pageSetup.verticalCentered + }; + const sheetProtectionModel = model.sheetProtection; + this.map.sheetPr.render(xmlStream, sheetPropertiesModel); + this.map.dimension.render(xmlStream, model.dimensions); + this.map.sheetViews.render(xmlStream, model.views); + this.map.sheetFormatPr.render(xmlStream, sheetFormatPropertiesModel); + this.map.cols.render(xmlStream, model.cols); + this.map.sheetData.render(xmlStream, model.rows); + this.map.sheetProtection.render(xmlStream, sheetProtectionModel); + this.map.autoFilter.render(xmlStream, model.autoFilter); + this.map.mergeCells.render(xmlStream, model.mergeCells); + this.map.conditionalFormatting.render(xmlStream, model.conditionalFormattings); + this.map.dataValidations.render(xmlStream, model.dataValidations); + this.map.hyperlinks.render(xmlStream, model.hyperlinks); + this.map.printOptions.render(xmlStream, printOptionsModel); + this.map.pageMargins.render(xmlStream, pageMarginsModel); + this.map.pageSetup.render(xmlStream, model.pageSetup); + this.map.headerFooter.render(xmlStream, model.headerFooter); + this.map.rowBreaks.render(xmlStream, model.rowBreaks); + this.map.drawing.render(xmlStream, model.drawing); + this.map.picture.render(xmlStream, model.background); + this.map.tableParts.render(xmlStream, model.tables); + this.map.extLst.render(xmlStream, model); + if (model.rels) { + model.rels.forEach((rel) => { + if (rel.Type === RelType.VmlDrawing) { + xmlStream.leafNode("legacyDrawing", { "r:id": rel.Id }); + } + }); + } + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + if (node.name === "worksheet") { + _2.each(this.map, (xform) => { + xform.reset(); + }); + return true; + } + if (this.map[node.name] && !this.ignoreNodes.includes(node.name)) { + this.parser = this.map[node.name]; + this.parser.parseOpen(node); + } + return true; + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + switch (name) { + case "worksheet": { + const properties = this.map.sheetFormatPr.model || {}; + if (this.map.sheetPr.model && this.map.sheetPr.model.tabColor) { + properties.tabColor = this.map.sheetPr.model.tabColor; + } + if (this.map.sheetPr.model && this.map.sheetPr.model.outlineProperties) { + properties.outlineProperties = this.map.sheetPr.model.outlineProperties; + } + const sheetProperties = { + fitToPage: this.map.sheetPr.model && this.map.sheetPr.model.pageSetup && this.map.sheetPr.model.pageSetup.fitToPage || false, + margins: this.map.pageMargins.model + }; + const pageSetup = Object.assign(sheetProperties, this.map.pageSetup.model, this.map.printOptions.model); + const conditionalFormattings = mergeConditionalFormattings( + this.map.conditionalFormatting.model, + this.map.extLst.model && this.map.extLst.model["x14:conditionalFormattings"] + ); + this.model = { + dimensions: this.map.dimension.model, + cols: this.map.cols.model, + rows: this.map.sheetData.model, + mergeCells: this.map.mergeCells.model, + hyperlinks: this.map.hyperlinks.model, + dataValidations: this.map.dataValidations.model, + properties, + views: this.map.sheetViews.model, + pageSetup, + headerFooter: this.map.headerFooter.model, + background: this.map.picture.model, + drawing: this.map.drawing.model, + tables: this.map.tableParts.model, + conditionalFormattings + }; + if (this.map.autoFilter.model) { + this.model.autoFilter = this.map.autoFilter.model; + } + if (this.map.sheetProtection.model) { + this.model.sheetProtection = this.map.sheetProtection.model; + } + return false; + } + default: + return true; + } + } + reconcile(model, options) { + const rels = (model.relationships || []).reduce((h, rel) => { + h[rel.Id] = rel; + if (rel.Type === RelType.Comments) { + model.comments = options.comments[rel.Target].comments; + } + if (rel.Type === RelType.VmlDrawing && model.comments && model.comments.length) { + const vmlComment = options.vmlDrawings[rel.Target].comments; + model.comments.forEach((comment, index) => { + comment.note = Object.assign({}, comment.note, vmlComment[index]); + }); + } + return h; + }, {}); + options.commentsMap = (model.comments || []).reduce((h, comment) => { + if (comment.ref) { + h[comment.ref] = comment; + } + return h; + }, {}); + options.hyperlinkMap = (model.hyperlinks || []).reduce((h, hyperlink) => { + if (hyperlink.rId) { + h[hyperlink.address] = rels[hyperlink.rId].Target; + } + return h; + }, {}); + options.formulae = {}; + model.rows = model.rows && model.rows.filter(Boolean) || []; + model.rows.forEach((row) => { + row.cells = row.cells && row.cells.filter(Boolean) || []; + }); + this.map.cols.reconcile(model.cols, options); + this.map.sheetData.reconcile(model.rows, options); + this.map.conditionalFormatting.reconcile(model.conditionalFormattings, options); + model.media = []; + if (model.drawing) { + const drawingRel = rels[model.drawing.rId]; + const match = drawingRel.Target.match(/\/drawings\/([a-zA-Z0-9]+)[.][a-zA-Z]{3,4}$/); + if (match) { + const drawingName = match[1]; + const drawing = options.drawings[drawingName]; + drawing.anchors.forEach((anchor) => { + if (anchor.medium) { + const image = { + type: "image", + imageId: anchor.medium.index, + range: anchor.range, + hyperlinks: anchor.picture.hyperlinks + }; + model.media.push(image); + } + }); + } + } + const backgroundRel = model.background && rels[model.background.rId]; + if (backgroundRel) { + const target = backgroundRel.Target.split("/media/")[1]; + const imageId = options.mediaIndex && options.mediaIndex[target]; + if (imageId !== void 0) { + model.media.push({ + type: "background", + imageId + }); + } + } + model.tables = (model.tables || []).map((tablePart) => { + const rel = rels[tablePart.rId]; + return options.tables[rel.Target]; + }); + delete model.relationships; + delete model.hyperlinks; + delete model.comments; + } + }; + WorkSheetXform.WORKSHEET_ATTRIBUTES = { + xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main", + "xmlns:r": "http://schemas.openxmlformats.org/officeDocument/2006/relationships", + "xmlns:mc": "http://schemas.openxmlformats.org/markup-compatibility/2006", + "mc:Ignorable": "x14ac", + "xmlns:x14ac": "http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" + }; + module2.exports = WorkSheetXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/base-cell-anchor-xform.js +var require_base_cell_anchor_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/base-cell-anchor-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var BaseCellAnchorXform = class extends BaseXform { + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case this.tag: + this.reset(); + this.model = { + range: { + editAs: node.attributes.editAs || "oneCell" + } + }; + break; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + } + break; + } + return true; + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + reconcilePicture(model, options) { + if (model && model.rId) { + const rel = options.rels[model.rId]; + const match = rel.Target.match(/.*\/media\/(.+[.][a-zA-Z]{3,4})/); + if (match) { + const name = match[1]; + const mediaId = options.mediaIndex[name]; + return options.media[mediaId]; + } + } + return void 0; + } + }; + module2.exports = BaseCellAnchorXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/cell-position-xform.js +var require_cell_position_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/cell-position-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var IntegerXform = require_integer_xform(); + var CellPositionXform = class extends BaseXform { + constructor(options) { + super(); + this.tag = options.tag; + this.map = { + "xdr:col": new IntegerXform({ tag: "xdr:col", zero: true }), + "xdr:colOff": new IntegerXform({ tag: "xdr:colOff", zero: true }), + "xdr:row": new IntegerXform({ tag: "xdr:row", zero: true }), + "xdr:rowOff": new IntegerXform({ tag: "xdr:rowOff", zero: true }) + }; + } + render(xmlStream, model) { + xmlStream.openNode(this.tag); + this.map["xdr:col"].render(xmlStream, model.nativeCol); + this.map["xdr:colOff"].render(xmlStream, model.nativeColOff); + this.map["xdr:row"].render(xmlStream, model.nativeRow); + this.map["xdr:rowOff"].render(xmlStream, model.nativeRowOff); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case this.tag: + this.reset(); + break; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + } + break; + } + return true; + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + switch (name) { + case this.tag: + this.model = { + nativeCol: this.map["xdr:col"].model, + nativeColOff: this.map["xdr:colOff"].model, + nativeRow: this.map["xdr:row"].model, + nativeRowOff: this.map["xdr:rowOff"].model + }; + return false; + default: + return true; + } + } + }; + module2.exports = CellPositionXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/blip-xform.js +var require_blip_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/blip-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var BlipXform = class extends BaseXform { + get tag() { + return "a:blip"; + } + render(xmlStream, model) { + xmlStream.leafNode(this.tag, { + "xmlns:r": "http://schemas.openxmlformats.org/officeDocument/2006/relationships", + "r:embed": model.rId, + cstate: "print" + }); + } + parseOpen(node) { + switch (node.name) { + case this.tag: + this.model = { + rId: node.attributes["r:embed"] + }; + return true; + default: + return true; + } + } + parseText() { + } + parseClose(name) { + switch (name) { + case this.tag: + return false; + default: + return true; + } + } + }; + module2.exports = BlipXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/blip-fill-xform.js +var require_blip_fill_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/blip-fill-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var BlipXform = require_blip_xform(); + var BlipFillXform = class extends BaseXform { + constructor() { + super(); + this.map = { + "a:blip": new BlipXform() + }; + } + get tag() { + return "xdr:blipFill"; + } + render(xmlStream, model) { + xmlStream.openNode(this.tag); + this.map["a:blip"].render(xmlStream, model); + xmlStream.openNode("a:stretch"); + xmlStream.leafNode("a:fillRect"); + xmlStream.closeNode(); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case this.tag: + this.reset(); + break; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + } + break; + } + return true; + } + parseText() { + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + switch (name) { + case this.tag: + this.model = this.map["a:blip"].model; + return false; + default: + return true; + } + } + }; + module2.exports = BlipFillXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/hlink-click-xform.js +var require_hlink_click_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/hlink-click-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var HLinkClickXform = class extends BaseXform { + get tag() { + return "a:hlinkClick"; + } + render(xmlStream, model) { + if (!(model.hyperlinks && model.hyperlinks.rId)) { + return; + } + xmlStream.leafNode(this.tag, { + "xmlns:r": "http://schemas.openxmlformats.org/officeDocument/2006/relationships", + "r:id": model.hyperlinks.rId, + tooltip: model.hyperlinks.tooltip + }); + } + parseOpen(node) { + switch (node.name) { + case this.tag: + this.model = { + hyperlinks: { + rId: node.attributes["r:id"], + tooltip: node.attributes.tooltip + } + }; + return true; + default: + return true; + } + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = HLinkClickXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/ext-lst-xform.js +var require_ext_lst_xform2 = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/ext-lst-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var ExtLstXform = class extends BaseXform { + get tag() { + return "a:extLst"; + } + render(xmlStream) { + xmlStream.openNode(this.tag); + xmlStream.openNode("a:ext", { + uri: "{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}" + }); + xmlStream.leafNode("a16:creationId", { + "xmlns:a16": "http://schemas.microsoft.com/office/drawing/2014/main", + id: "{00000000-0008-0000-0000-000002000000}" + }); + xmlStream.closeNode(); + xmlStream.closeNode(); + } + parseOpen(node) { + switch (node.name) { + case this.tag: + return true; + default: + return true; + } + } + parseText() { + } + parseClose(name) { + switch (name) { + case this.tag: + return false; + default: + return true; + } + } + }; + module2.exports = ExtLstXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/c-nv-pr-xform.js +var require_c_nv_pr_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/c-nv-pr-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var HlickClickXform = require_hlink_click_xform(); + var ExtLstXform = require_ext_lst_xform2(); + var CNvPrXform = class extends BaseXform { + constructor() { + super(); + this.map = { + "a:hlinkClick": new HlickClickXform(), + "a:extLst": new ExtLstXform() + }; + } + get tag() { + return "xdr:cNvPr"; + } + render(xmlStream, model) { + xmlStream.openNode(this.tag, { + id: model.index, + name: `Picture ${model.index}` + }); + this.map["a:hlinkClick"].render(xmlStream, model); + this.map["a:extLst"].render(xmlStream, model); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case this.tag: + this.reset(); + break; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + } + break; + } + return true; + } + parseText() { + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + switch (name) { + case this.tag: + this.model = this.map["a:hlinkClick"].model; + return false; + default: + return true; + } + } + }; + module2.exports = CNvPrXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/c-nv-pic-pr-xform.js +var require_c_nv_pic_pr_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/c-nv-pic-pr-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var CNvPicPrXform = class extends BaseXform { + get tag() { + return "xdr:cNvPicPr"; + } + render(xmlStream) { + xmlStream.openNode(this.tag); + xmlStream.leafNode("a:picLocks", { + noChangeAspect: "1" + }); + xmlStream.closeNode(); + } + parseOpen(node) { + switch (node.name) { + case this.tag: + return true; + default: + return true; + } + } + parseText() { + } + parseClose(name) { + switch (name) { + case this.tag: + return false; + default: + return true; + } + } + }; + module2.exports = CNvPicPrXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/nv-pic-pr-xform.js +var require_nv_pic_pr_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/nv-pic-pr-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var CNvPrXform = require_c_nv_pr_xform(); + var CNvPicPrXform = require_c_nv_pic_pr_xform(); + var NvPicPrXform = class extends BaseXform { + constructor() { + super(); + this.map = { + "xdr:cNvPr": new CNvPrXform(), + "xdr:cNvPicPr": new CNvPicPrXform() + }; + } + get tag() { + return "xdr:nvPicPr"; + } + render(xmlStream, model) { + xmlStream.openNode(this.tag); + this.map["xdr:cNvPr"].render(xmlStream, model); + this.map["xdr:cNvPicPr"].render(xmlStream, model); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case this.tag: + this.reset(); + break; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + } + break; + } + return true; + } + parseText() { + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + switch (name) { + case this.tag: + this.model = this.map["xdr:cNvPr"].model; + return false; + default: + return true; + } + } + }; + module2.exports = NvPicPrXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/sp-pr.js +var require_sp_pr = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/sp-pr.js"(exports2, module2) { + module2.exports = { + tag: "xdr:spPr", + c: [ + { + tag: "a:xfrm", + c: [ + { tag: "a:off", $: { x: "0", y: "0" } }, + { tag: "a:ext", $: { cx: "0", cy: "0" } } + ] + }, + { + tag: "a:prstGeom", + $: { prst: "rect" }, + c: [{ tag: "a:avLst" }] + } + ] + }; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/pic-xform.js +var require_pic_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/pic-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var StaticXform = require_static_xform(); + var BlipFillXform = require_blip_fill_xform(); + var NvPicPrXform = require_nv_pic_pr_xform(); + var spPrJSON = require_sp_pr(); + var PicXform = class extends BaseXform { + constructor() { + super(); + this.map = { + "xdr:nvPicPr": new NvPicPrXform(), + "xdr:blipFill": new BlipFillXform(), + "xdr:spPr": new StaticXform(spPrJSON) + }; + } + get tag() { + return "xdr:pic"; + } + prepare(model, options) { + model.index = options.index + 1; + } + render(xmlStream, model) { + xmlStream.openNode(this.tag); + this.map["xdr:nvPicPr"].render(xmlStream, model); + this.map["xdr:blipFill"].render(xmlStream, model); + this.map["xdr:spPr"].render(xmlStream, model); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case this.tag: + this.reset(); + break; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + } + break; + } + return true; + } + parseText() { + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.mergeModel(this.parser.model); + this.parser = void 0; + } + return true; + } + switch (name) { + case this.tag: + return false; + default: + return true; + } + } + }; + module2.exports = PicXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/two-cell-anchor-xform.js +var require_two_cell_anchor_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/two-cell-anchor-xform.js"(exports2, module2) { + var BaseCellAnchorXform = require_base_cell_anchor_xform(); + var StaticXform = require_static_xform(); + var CellPositionXform = require_cell_position_xform(); + var PicXform = require_pic_xform(); + var TwoCellAnchorXform = class extends BaseCellAnchorXform { + constructor() { + super(); + this.map = { + "xdr:from": new CellPositionXform({ tag: "xdr:from" }), + "xdr:to": new CellPositionXform({ tag: "xdr:to" }), + "xdr:pic": new PicXform(), + "xdr:clientData": new StaticXform({ tag: "xdr:clientData" }) + }; + } + get tag() { + return "xdr:twoCellAnchor"; + } + prepare(model, options) { + this.map["xdr:pic"].prepare(model.picture, options); + } + render(xmlStream, model) { + xmlStream.openNode(this.tag, { editAs: model.range.editAs || "oneCell" }); + this.map["xdr:from"].render(xmlStream, model.range.tl); + this.map["xdr:to"].render(xmlStream, model.range.br); + this.map["xdr:pic"].render(xmlStream, model.picture); + this.map["xdr:clientData"].render(xmlStream, {}); + xmlStream.closeNode(); + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + switch (name) { + case this.tag: + this.model.range.tl = this.map["xdr:from"].model; + this.model.range.br = this.map["xdr:to"].model; + this.model.picture = this.map["xdr:pic"].model; + return false; + default: + return true; + } + } + reconcile(model, options) { + model.medium = this.reconcilePicture(model.picture, options); + } + }; + module2.exports = TwoCellAnchorXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/ext-xform.js +var require_ext_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/ext-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var EMU_PER_PIXEL_AT_96_DPI = 9525; + var ExtXform = class extends BaseXform { + constructor(options) { + super(); + this.tag = options.tag; + this.map = {}; + } + render(xmlStream, model) { + xmlStream.openNode(this.tag); + const width = Math.floor(model.width * EMU_PER_PIXEL_AT_96_DPI); + const height = Math.floor(model.height * EMU_PER_PIXEL_AT_96_DPI); + xmlStream.addAttribute("cx", width); + xmlStream.addAttribute("cy", height); + xmlStream.closeNode(); + } + parseOpen(node) { + if (node.name === this.tag) { + this.model = { + width: parseInt(node.attributes.cx || "0", 10) / EMU_PER_PIXEL_AT_96_DPI, + height: parseInt(node.attributes.cy || "0", 10) / EMU_PER_PIXEL_AT_96_DPI + }; + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = ExtXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/one-cell-anchor-xform.js +var require_one_cell_anchor_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/one-cell-anchor-xform.js"(exports2, module2) { + var BaseCellAnchorXform = require_base_cell_anchor_xform(); + var StaticXform = require_static_xform(); + var CellPositionXform = require_cell_position_xform(); + var ExtXform = require_ext_xform(); + var PicXform = require_pic_xform(); + var OneCellAnchorXform = class extends BaseCellAnchorXform { + constructor() { + super(); + this.map = { + "xdr:from": new CellPositionXform({ tag: "xdr:from" }), + "xdr:ext": new ExtXform({ tag: "xdr:ext" }), + "xdr:pic": new PicXform(), + "xdr:clientData": new StaticXform({ tag: "xdr:clientData" }) + }; + } + get tag() { + return "xdr:oneCellAnchor"; + } + prepare(model, options) { + this.map["xdr:pic"].prepare(model.picture, options); + } + render(xmlStream, model) { + xmlStream.openNode(this.tag, { editAs: model.range.editAs || "oneCell" }); + this.map["xdr:from"].render(xmlStream, model.range.tl); + this.map["xdr:ext"].render(xmlStream, model.range.ext); + this.map["xdr:pic"].render(xmlStream, model.picture); + this.map["xdr:clientData"].render(xmlStream, {}); + xmlStream.closeNode(); + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + switch (name) { + case this.tag: + this.model.range.tl = this.map["xdr:from"].model; + this.model.range.ext = this.map["xdr:ext"].model; + this.model.picture = this.map["xdr:pic"].model; + return false; + default: + return true; + } + } + reconcile(model, options) { + model.medium = this.reconcilePicture(model.picture, options); + } + }; + module2.exports = OneCellAnchorXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/drawing-xform.js +var require_drawing_xform2 = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/drawing/drawing-xform.js"(exports2, module2) { + var colCache = require_col_cache(); + var XmlStream = require_xml_stream(); + var BaseXform = require_base_xform(); + var TwoCellAnchorXform = require_two_cell_anchor_xform(); + var OneCellAnchorXform = require_one_cell_anchor_xform(); + function getAnchorType(model) { + const range = typeof model.range === "string" ? colCache.decode(model.range) : model.range; + return range.br ? "xdr:twoCellAnchor" : "xdr:oneCellAnchor"; + } + var DrawingXform = class _DrawingXform extends BaseXform { + constructor() { + super(); + this.map = { + "xdr:twoCellAnchor": new TwoCellAnchorXform(), + "xdr:oneCellAnchor": new OneCellAnchorXform() + }; + } + prepare(model) { + model.anchors.forEach((item, index) => { + item.anchorType = getAnchorType(item); + const anchor = this.map[item.anchorType]; + anchor.prepare(item, { index }); + }); + } + get tag() { + return "xdr:wsDr"; + } + render(xmlStream, model) { + xmlStream.openXml(XmlStream.StdDocAttributes); + xmlStream.openNode(this.tag, _DrawingXform.DRAWING_ATTRIBUTES); + model.anchors.forEach((item) => { + const anchor = this.map[item.anchorType]; + anchor.render(xmlStream, item); + }); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case this.tag: + this.reset(); + this.model = { + anchors: [] + }; + break; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + } + break; + } + return true; + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.model.anchors.push(this.parser.model); + this.parser = void 0; + } + return true; + } + switch (name) { + case this.tag: + return false; + default: + return true; + } + } + reconcile(model, options) { + model.anchors.forEach((anchor) => { + if (anchor.br) { + this.map["xdr:twoCellAnchor"].reconcile(anchor, options); + } else { + this.map["xdr:oneCellAnchor"].reconcile(anchor, options); + } + }); + } + }; + DrawingXform.DRAWING_ATTRIBUTES = { + "xmlns:xdr": "http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing", + "xmlns:a": "http://schemas.openxmlformats.org/drawingml/2006/main" + }; + module2.exports = DrawingXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/table/custom-filter-xform.js +var require_custom_filter_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/table/custom-filter-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var CustomFilterXform = class extends BaseXform { + get tag() { + return "customFilter"; + } + render(xmlStream, model) { + xmlStream.leafNode(this.tag, { + val: model.val, + operator: model.operator + }); + } + parseOpen(node) { + if (node.name === this.tag) { + this.model = { + val: node.attributes.val, + operator: node.attributes.operator + }; + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = CustomFilterXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/table/filter-xform.js +var require_filter_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/table/filter-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var FilterXform = class extends BaseXform { + get tag() { + return "filter"; + } + render(xmlStream, model) { + xmlStream.leafNode(this.tag, { + val: model.val + }); + } + parseOpen(node) { + if (node.name === this.tag) { + this.model = { + val: node.attributes.val + }; + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = FilterXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/table/filter-column-xform.js +var require_filter_column_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/table/filter-column-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var ListXform = require_list_xform(); + var CustomFilterXform = require_custom_filter_xform(); + var FilterXform = require_filter_xform(); + var FilterColumnXform = class extends BaseXform { + constructor() { + super(); + this.map = { + customFilters: new ListXform({ + tag: "customFilters", + count: false, + empty: true, + childXform: new CustomFilterXform() + }), + filters: new ListXform({ + tag: "filters", + count: false, + empty: true, + childXform: new FilterXform() + }) + }; + } + get tag() { + return "filterColumn"; + } + prepare(model, options) { + model.colId = options.index.toString(); + } + render(xmlStream, model) { + if (model.customFilters) { + xmlStream.openNode(this.tag, { + colId: model.colId, + hiddenButton: model.filterButton ? "0" : "1" + }); + this.map.customFilters.render(xmlStream, model.customFilters); + xmlStream.closeNode(); + return true; + } + xmlStream.leafNode(this.tag, { + colId: model.colId, + hiddenButton: model.filterButton ? "0" : "1" + }); + return true; + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + const { attributes } = node; + switch (node.name) { + case this.tag: + this.model = { + filterButton: attributes.hiddenButton === "0" + }; + return true; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parseOpen(node); + return true; + } + throw new Error(`Unexpected xml node in parseOpen: ${JSON.stringify(node)}`); + } + } + parseText() { + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + switch (name) { + case this.tag: + this.model.customFilters = this.map.customFilters.model; + return false; + default: + return true; + } + } + }; + module2.exports = FilterColumnXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/table/auto-filter-xform.js +var require_auto_filter_xform2 = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/table/auto-filter-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var FilterColumnXform = require_filter_column_xform(); + var AutoFilterXform = class extends BaseXform { + constructor() { + super(); + this.map = { + filterColumn: new FilterColumnXform() + }; + } + get tag() { + return "autoFilter"; + } + prepare(model) { + model.columns.forEach((column, index) => { + this.map.filterColumn.prepare(column, { index }); + }); + } + render(xmlStream, model) { + xmlStream.openNode(this.tag, { ref: model.autoFilterRef }); + model.columns.forEach((column) => { + this.map.filterColumn.render(xmlStream, column); + }); + xmlStream.closeNode(); + return true; + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case this.tag: + this.model = { + autoFilterRef: node.attributes.ref, + columns: [] + }; + return true; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parseOpen(node); + return true; + } + throw new Error(`Unexpected xml node in parseOpen: ${JSON.stringify(node)}`); + } + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.model.columns.push(this.parser.model); + this.parser = void 0; + } + return true; + } + switch (name) { + case this.tag: + return false; + default: + throw new Error(`Unexpected xml node in parseClose: ${name}`); + } + } + }; + module2.exports = AutoFilterXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/table/table-column-xform.js +var require_table_column_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/table/table-column-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var TableColumnXform = class extends BaseXform { + get tag() { + return "tableColumn"; + } + prepare(model, options) { + model.id = options.index + 1; + } + render(xmlStream, model) { + xmlStream.leafNode(this.tag, { + id: model.id.toString(), + name: model.name, + totalsRowLabel: model.totalsRowLabel, + totalsRowFunction: model.totalsRowFunction, + dxfId: model.dxfId + }); + return true; + } + parseOpen(node) { + if (node.name === this.tag) { + const { attributes } = node; + this.model = { + name: attributes.name, + totalsRowLabel: attributes.totalsRowLabel, + totalsRowFunction: attributes.totalsRowFunction, + dxfId: attributes.dxfId + }; + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = TableColumnXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/table/table-style-info-xform.js +var require_table_style_info_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/table/table-style-info-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var TableStyleInfoXform = class extends BaseXform { + get tag() { + return "tableStyleInfo"; + } + render(xmlStream, model) { + xmlStream.leafNode(this.tag, { + name: model.theme ? model.theme : void 0, + showFirstColumn: model.showFirstColumn ? "1" : "0", + showLastColumn: model.showLastColumn ? "1" : "0", + showRowStripes: model.showRowStripes ? "1" : "0", + showColumnStripes: model.showColumnStripes ? "1" : "0" + }); + return true; + } + parseOpen(node) { + if (node.name === this.tag) { + const { attributes } = node; + this.model = { + theme: attributes.name ? attributes.name : null, + showFirstColumn: attributes.showFirstColumn === "1", + showLastColumn: attributes.showLastColumn === "1", + showRowStripes: attributes.showRowStripes === "1", + showColumnStripes: attributes.showColumnStripes === "1" + }; + return true; + } + return false; + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = TableStyleInfoXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/table/table-xform.js +var require_table_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/table/table-xform.js"(exports2, module2) { + var XmlStream = require_xml_stream(); + var BaseXform = require_base_xform(); + var ListXform = require_list_xform(); + var AutoFilterXform = require_auto_filter_xform2(); + var TableColumnXform = require_table_column_xform(); + var TableStyleInfoXform = require_table_style_info_xform(); + var TableXform = class _TableXform extends BaseXform { + constructor() { + super(); + this.map = { + autoFilter: new AutoFilterXform(), + tableColumns: new ListXform({ + tag: "tableColumns", + count: true, + empty: true, + childXform: new TableColumnXform() + }), + tableStyleInfo: new TableStyleInfoXform() + }; + } + prepare(model, options) { + this.map.autoFilter.prepare(model); + this.map.tableColumns.prepare(model.columns, options); + } + get tag() { + return "table"; + } + render(xmlStream, model) { + xmlStream.openXml(XmlStream.StdDocAttributes); + xmlStream.openNode(this.tag, { + ..._TableXform.TABLE_ATTRIBUTES, + id: model.id, + name: model.name, + displayName: model.displayName || model.name, + ref: model.tableRef, + totalsRowCount: model.totalsRow ? "1" : void 0, + totalsRowShown: model.totalsRow ? void 0 : "1", + headerRowCount: model.headerRow ? "1" : "0" + }); + this.map.autoFilter.render(xmlStream, model); + this.map.tableColumns.render(xmlStream, model.columns); + this.map.tableStyleInfo.render(xmlStream, model.style); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + const { name, attributes } = node; + switch (name) { + case this.tag: + this.reset(); + this.model = { + name: attributes.name, + displayName: attributes.displayName || attributes.name, + tableRef: attributes.ref, + totalsRow: attributes.totalsRowCount === "1", + headerRow: attributes.headerRowCount === "1" + }; + break; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + } + break; + } + return true; + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + switch (name) { + case this.tag: + this.model.columns = this.map.tableColumns.model; + if (this.map.autoFilter.model) { + this.model.autoFilterRef = this.map.autoFilter.model.autoFilterRef; + this.map.autoFilter.model.columns.forEach((column, index) => { + this.model.columns[index].filterButton = column.filterButton; + }); + } + this.model.style = this.map.tableStyleInfo.model; + return false; + default: + return true; + } + } + reconcile(model, options) { + model.columns.forEach((column) => { + if (column.dxfId !== void 0) { + column.style = options.styles.getDxfStyle(column.dxfId); + } + }); + } + }; + TableXform.TABLE_ATTRIBUTES = { + xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main", + "xmlns:mc": "http://schemas.openxmlformats.org/markup-compatibility/2006", + "mc:Ignorable": "xr xr3", + "xmlns:xr": "http://schemas.microsoft.com/office/spreadsheetml/2014/revision", + "xmlns:xr3": "http://schemas.microsoft.com/office/spreadsheetml/2016/revision3" + // 'xr:uid': '{00000000-000C-0000-FFFF-FFFF00000000}', + }; + module2.exports = TableXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/comment-xform.js +var require_comment_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/comment-xform.js"(exports2, module2) { + var RichTextXform = require_rich_text_xform(); + var utils = require_utils13(); + var BaseXform = require_base_xform(); + var CommentXform = module2.exports = function(model) { + this.model = model; + }; + utils.inherits(CommentXform, BaseXform, { + get tag() { + return "r"; + }, + get richTextXform() { + if (!this._richTextXform) { + this._richTextXform = new RichTextXform(); + } + return this._richTextXform; + }, + render(xmlStream, model) { + model = model || this.model; + xmlStream.openNode("comment", { + ref: model.ref, + authorId: 0 + }); + xmlStream.openNode("text"); + if (model && model.note && model.note.texts) { + model.note.texts.forEach((text) => { + this.richTextXform.render(xmlStream, text); + }); + } + xmlStream.closeNode(); + xmlStream.closeNode(); + }, + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "comment": + this.model = { + type: "note", + note: { + texts: [] + }, + ...node.attributes + }; + return true; + case "r": + this.parser = this.richTextXform; + this.parser.parseOpen(node); + return true; + default: + return false; + } + }, + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + }, + parseClose(name) { + switch (name) { + case "comment": + return false; + case "r": + this.model.note.texts.push(this.parser.model); + this.parser = void 0; + return true; + default: + if (this.parser) { + this.parser.parseClose(name); + } + return true; + } + } + }); + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/comments-xform.js +var require_comments_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/comments-xform.js"(exports2, module2) { + var XmlStream = require_xml_stream(); + var utils = require_utils13(); + var BaseXform = require_base_xform(); + var CommentXform = require_comment_xform(); + var CommentsXform = module2.exports = function() { + this.map = { + comment: new CommentXform() + }; + }; + utils.inherits( + CommentsXform, + BaseXform, + { + COMMENTS_ATTRIBUTES: { + xmlns: "http://schemas.openxmlformats.org/spreadsheetml/2006/main" + } + }, + { + render(xmlStream, model) { + model = model || this.model; + xmlStream.openXml(XmlStream.StdDocAttributes); + xmlStream.openNode("comments", CommentsXform.COMMENTS_ATTRIBUTES); + xmlStream.openNode("authors"); + xmlStream.leafNode("author", null, "Author"); + xmlStream.closeNode(); + xmlStream.openNode("commentList"); + model.comments.forEach((comment) => { + this.map.comment.render(xmlStream, comment); + }); + xmlStream.closeNode(); + xmlStream.closeNode(); + }, + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case "commentList": + this.model = { + comments: [] + }; + return true; + case "comment": + this.parser = this.map.comment; + this.parser.parseOpen(node); + return true; + default: + return false; + } + }, + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + }, + parseClose(name) { + switch (name) { + case "commentList": + return false; + case "comment": + this.model.comments.push(this.parser.model); + this.parser = void 0; + return true; + default: + if (this.parser) { + this.parser.parseClose(name); + } + return true; + } + } + } + ); + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/vml-textbox-xform.js +var require_vml_textbox_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/vml-textbox-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var VmlTextboxXform = class extends BaseXform { + get tag() { + return "v:textbox"; + } + conversionUnit(value, multiple, unit) { + return `${parseFloat(value) * multiple.toFixed(2)}${unit}`; + } + reverseConversionUnit(inset) { + return (inset || "").split(",").map((margin) => { + return Number(parseFloat(this.conversionUnit(parseFloat(margin), 0.1, "")).toFixed(2)); + }); + } + render(xmlStream, model) { + const attributes = { + style: "mso-direction-alt:auto" + }; + if (model && model.note) { + let { inset } = model.note && model.note.margins; + if (Array.isArray(inset)) { + inset = inset.map((margin) => { + return this.conversionUnit(margin, 10, "mm"); + }).join(","); + } + if (inset) { + attributes.inset = inset; + } + } + xmlStream.openNode("v:textbox", attributes); + xmlStream.leafNode("div", { style: "text-align:left" }); + xmlStream.closeNode(); + } + parseOpen(node) { + switch (node.name) { + case this.tag: + this.model = { + inset: this.reverseConversionUnit(node.attributes.inset) + }; + return true; + default: + return true; + } + } + parseText() { + } + parseClose(name) { + switch (name) { + case this.tag: + return false; + default: + return true; + } + } + }; + module2.exports = VmlTextboxXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/vml-anchor-xform.js +var require_vml_anchor_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/vml-anchor-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var VmlAnchorXform = class extends BaseXform { + get tag() { + return "x:Anchor"; + } + getAnchorRect(anchor) { + const l2 = Math.floor(anchor.left); + const lf = Math.floor((anchor.left - l2) * 68); + const t = Math.floor(anchor.top); + const tf = Math.floor((anchor.top - t) * 18); + const r = Math.floor(anchor.right); + const rf = Math.floor((anchor.right - r) * 68); + const b = Math.floor(anchor.bottom); + const bf = Math.floor((anchor.bottom - b) * 18); + return [l2, lf, t, tf, r, rf, b, bf]; + } + getDefaultRect(ref) { + const l2 = ref.col; + const lf = 6; + const t = Math.max(ref.row - 2, 0); + const tf = 14; + const r = l2 + 2; + const rf = 2; + const b = t + 4; + const bf = 16; + return [l2, lf, t, tf, r, rf, b, bf]; + } + render(xmlStream, model) { + const rect = model.anchor ? this.getAnchorRect(model.anchor) : this.getDefaultRect(model.refAddress); + xmlStream.leafNode("x:Anchor", null, rect.join(", ")); + } + parseOpen(node) { + switch (node.name) { + case this.tag: + this.text = ""; + return true; + default: + return false; + } + } + parseText(text) { + this.text = text; + } + parseClose() { + return false; + } + }; + module2.exports = VmlAnchorXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/style/vml-protection-xform.js +var require_vml_protection_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/style/vml-protection-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var VmlProtectionXform = class extends BaseXform { + constructor(model) { + super(); + this._model = model; + } + get tag() { + return this._model && this._model.tag; + } + render(xmlStream, model) { + xmlStream.leafNode(this.tag, null, model); + } + parseOpen(node) { + switch (node.name) { + case this.tag: + this.text = ""; + return true; + default: + return false; + } + } + parseText(text) { + this.text = text; + } + parseClose() { + return false; + } + }; + module2.exports = VmlProtectionXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/style/vml-position-xform.js +var require_vml_position_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/style/vml-position-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var VmlPositionXform = class extends BaseXform { + constructor(model) { + super(); + this._model = model; + } + get tag() { + return this._model && this._model.tag; + } + render(xmlStream, model, type) { + if (model === type[2]) { + xmlStream.leafNode(this.tag); + } else if (this.tag === "x:SizeWithCells" && model === type[1]) { + xmlStream.leafNode(this.tag); + } + } + parseOpen(node) { + switch (node.name) { + case this.tag: + this.model = {}; + this.model[this.tag] = true; + return true; + default: + return false; + } + } + parseText() { + } + parseClose() { + return false; + } + }; + module2.exports = VmlPositionXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/vml-client-data-xform.js +var require_vml_client_data_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/vml-client-data-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var VmlAnchorXform = require_vml_anchor_xform(); + var VmlProtectionXform = require_vml_protection_xform(); + var VmlPositionXform = require_vml_position_xform(); + var POSITION_TYPE = ["twoCells", "oneCells", "absolute"]; + var VmlClientDataXform = class extends BaseXform { + constructor() { + super(); + this.map = { + "x:Anchor": new VmlAnchorXform(), + "x:Locked": new VmlProtectionXform({ tag: "x:Locked" }), + "x:LockText": new VmlProtectionXform({ tag: "x:LockText" }), + "x:SizeWithCells": new VmlPositionXform({ tag: "x:SizeWithCells" }), + "x:MoveWithCells": new VmlPositionXform({ tag: "x:MoveWithCells" }) + }; + } + get tag() { + return "x:ClientData"; + } + render(xmlStream, model) { + const { protection, editAs } = model.note; + xmlStream.openNode(this.tag, { ObjectType: "Note" }); + this.map["x:MoveWithCells"].render(xmlStream, editAs, POSITION_TYPE); + this.map["x:SizeWithCells"].render(xmlStream, editAs, POSITION_TYPE); + this.map["x:Anchor"].render(xmlStream, model); + this.map["x:Locked"].render(xmlStream, protection.locked); + xmlStream.leafNode("x:AutoFill", null, "False"); + this.map["x:LockText"].render(xmlStream, protection.lockText); + xmlStream.leafNode("x:Row", null, model.refAddress.row - 1); + xmlStream.leafNode("x:Column", null, model.refAddress.col - 1); + xmlStream.closeNode(); + } + parseOpen(node) { + switch (node.name) { + case this.tag: + this.reset(); + this.model = { + anchor: [], + protection: {}, + editAs: "" + }; + break; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + } + break; + } + return true; + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + switch (name) { + case this.tag: + this.normalizeModel(); + return false; + default: + return true; + } + } + normalizeModel() { + const position = Object.assign( + {}, + this.map["x:MoveWithCells"].model, + this.map["x:SizeWithCells"].model + ); + const len = Object.keys(position).length; + this.model.editAs = POSITION_TYPE[len]; + this.model.anchor = this.map["x:Anchor"].text; + this.model.protection.locked = this.map["x:Locked"].text; + this.model.protection.lockText = this.map["x:LockText"].text; + } + }; + module2.exports = VmlClientDataXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/vml-shape-xform.js +var require_vml_shape_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/vml-shape-xform.js"(exports2, module2) { + var BaseXform = require_base_xform(); + var VmlTextboxXform = require_vml_textbox_xform(); + var VmlClientDataXform = require_vml_client_data_xform(); + var VmlShapeXform = class _VmlShapeXform extends BaseXform { + constructor() { + super(); + this.map = { + "v:textbox": new VmlTextboxXform(), + "x:ClientData": new VmlClientDataXform() + }; + } + get tag() { + return "v:shape"; + } + render(xmlStream, model, index) { + xmlStream.openNode("v:shape", _VmlShapeXform.V_SHAPE_ATTRIBUTES(model, index)); + xmlStream.leafNode("v:fill", { color2: "infoBackground [80]" }); + xmlStream.leafNode("v:shadow", { color: "none [81]", obscured: "t" }); + xmlStream.leafNode("v:path", { "o:connecttype": "none" }); + this.map["v:textbox"].render(xmlStream, model); + this.map["x:ClientData"].render(xmlStream, model); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case this.tag: + this.reset(); + this.model = { + margins: { + insetmode: node.attributes["o:insetmode"] + }, + anchor: "", + editAs: "", + protection: {} + }; + break; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + } + break; + } + return true; + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.parser = void 0; + } + return true; + } + switch (name) { + case this.tag: + this.model.margins.inset = this.map["v:textbox"].model && this.map["v:textbox"].model.inset; + this.model.protection = this.map["x:ClientData"].model && this.map["x:ClientData"].model.protection; + this.model.anchor = this.map["x:ClientData"].model && this.map["x:ClientData"].model.anchor; + this.model.editAs = this.map["x:ClientData"].model && this.map["x:ClientData"].model.editAs; + return false; + default: + return true; + } + } + }; + VmlShapeXform.V_SHAPE_ATTRIBUTES = (model, index) => ({ + id: `_x0000_s${1025 + index}`, + type: "#_x0000_t202", + style: "position:absolute; margin-left:105.3pt;margin-top:10.5pt;width:97.8pt;height:59.1pt;z-index:1;visibility:hidden", + fillcolor: "infoBackground [80]", + strokecolor: "none [81]", + "o:insetmode": model.note.margins && model.note.margins.insetmode + }); + module2.exports = VmlShapeXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/vml-notes-xform.js +var require_vml_notes_xform = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xform/comment/vml-notes-xform.js"(exports2, module2) { + var XmlStream = require_xml_stream(); + var BaseXform = require_base_xform(); + var VmlShapeXform = require_vml_shape_xform(); + var VmlNotesXform = class _VmlNotesXform extends BaseXform { + constructor() { + super(); + this.map = { + "v:shape": new VmlShapeXform() + }; + } + get tag() { + return "xml"; + } + render(xmlStream, model) { + xmlStream.openXml(XmlStream.StdDocAttributes); + xmlStream.openNode(this.tag, _VmlNotesXform.DRAWING_ATTRIBUTES); + xmlStream.openNode("o:shapelayout", { "v:ext": "edit" }); + xmlStream.leafNode("o:idmap", { "v:ext": "edit", data: 1 }); + xmlStream.closeNode(); + xmlStream.openNode("v:shapetype", { + id: "_x0000_t202", + coordsize: "21600,21600", + "o:spt": 202, + path: "m,l,21600r21600,l21600,xe" + }); + xmlStream.leafNode("v:stroke", { joinstyle: "miter" }); + xmlStream.leafNode("v:path", { gradientshapeok: "t", "o:connecttype": "rect" }); + xmlStream.closeNode(); + model.comments.forEach((item, index) => { + this.map["v:shape"].render(xmlStream, item, index); + }); + xmlStream.closeNode(); + } + parseOpen(node) { + if (this.parser) { + this.parser.parseOpen(node); + return true; + } + switch (node.name) { + case this.tag: + this.reset(); + this.model = { + comments: [] + }; + break; + default: + this.parser = this.map[node.name]; + if (this.parser) { + this.parser.parseOpen(node); + } + break; + } + return true; + } + parseText(text) { + if (this.parser) { + this.parser.parseText(text); + } + } + parseClose(name) { + if (this.parser) { + if (!this.parser.parseClose(name)) { + this.model.comments.push(this.parser.model); + this.parser = void 0; + } + return true; + } + switch (name) { + case this.tag: + return false; + default: + return true; + } + } + reconcile(model, options) { + model.anchors.forEach((anchor) => { + if (anchor.br) { + this.map["xdr:twoCellAnchor"].reconcile(anchor, options); + } else { + this.map["xdr:oneCellAnchor"].reconcile(anchor, options); + } + }); + } + }; + VmlNotesXform.DRAWING_ATTRIBUTES = { + "xmlns:v": "urn:schemas-microsoft-com:vml", + "xmlns:o": "urn:schemas-microsoft-com:office:office", + "xmlns:x": "urn:schemas-microsoft-com:office:excel" + }; + module2.exports = VmlNotesXform; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xml/theme1.js +var require_theme1 = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xml/theme1.js"(exports2, module2) { + module2.exports = '\n '; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xlsx.js +var require_xlsx = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/xlsx/xlsx.js"(exports2, module2) { + var fs = require("fs"); + var JSZip = require_lib11(); + var { PassThrough } = require_readable(); + var ZipStream = require_zip_stream(); + var StreamBuf = require_stream_buf(); + var utils = require_utils13(); + var XmlStream = require_xml_stream(); + var { bufferToString } = require_browser_buffer_decode(); + var StylesXform = require_styles_xform(); + var CoreXform = require_core_xform(); + var SharedStringsXform = require_shared_strings_xform(); + var RelationshipsXform = require_relationships_xform(); + var ContentTypesXform = require_content_types_xform(); + var AppXform = require_app_xform(); + var WorkbookXform = require_workbook_xform(); + var WorksheetXform = require_worksheet_xform(); + var DrawingXform = require_drawing_xform2(); + var TableXform = require_table_xform(); + var CommentsXform = require_comments_xform(); + var VmlNotesXform = require_vml_notes_xform(); + var theme1Xml = require_theme1(); + function fsReadFileAsync(filename, options) { + return new Promise((resolve, reject) => { + fs.readFile(filename, options, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + var XLSX = class _XLSX { + constructor(workbook) { + this.workbook = workbook; + } + // =============================================================================== + // Workbook + // ========================================================================= + // Read + async readFile(filename, options) { + if (!await utils.fs.exists(filename)) { + throw new Error(`File not found: ${filename}`); + } + const stream = fs.createReadStream(filename); + try { + const workbook = await this.read(stream, options); + stream.close(); + return workbook; + } catch (error) { + stream.close(); + throw error; + } + } + parseRels(stream) { + const xform = new RelationshipsXform(); + return xform.parseStream(stream); + } + parseWorkbook(stream) { + const xform = new WorkbookXform(); + return xform.parseStream(stream); + } + parseSharedStrings(stream) { + const xform = new SharedStringsXform(); + return xform.parseStream(stream); + } + reconcile(model, options) { + const workbookXform = new WorkbookXform(); + const worksheetXform = new WorksheetXform(options); + const drawingXform = new DrawingXform(); + const tableXform = new TableXform(); + workbookXform.reconcile(model); + const drawingOptions = { + media: model.media, + mediaIndex: model.mediaIndex + }; + Object.keys(model.drawings).forEach((name) => { + const drawing = model.drawings[name]; + const drawingRel = model.drawingRels[name]; + if (drawingRel) { + drawingOptions.rels = drawingRel.reduce((o, rel) => { + o[rel.Id] = rel; + return o; + }, {}); + (drawing.anchors || []).forEach((anchor) => { + const hyperlinks = anchor.picture && anchor.picture.hyperlinks; + if (hyperlinks && drawingOptions.rels[hyperlinks.rId]) { + hyperlinks.hyperlink = drawingOptions.rels[hyperlinks.rId].Target; + delete hyperlinks.rId; + } + }); + drawingXform.reconcile(drawing, drawingOptions); + } + }); + const tableOptions = { + styles: model.styles + }; + Object.values(model.tables).forEach((table) => { + tableXform.reconcile(table, tableOptions); + }); + const sheetOptions = { + styles: model.styles, + sharedStrings: model.sharedStrings, + media: model.media, + mediaIndex: model.mediaIndex, + date1904: model.properties && model.properties.date1904, + drawings: model.drawings, + comments: model.comments, + tables: model.tables, + vmlDrawings: model.vmlDrawings + }; + model.worksheets.forEach((worksheet) => { + worksheet.relationships = model.worksheetRels[worksheet.sheetNo]; + worksheetXform.reconcile(worksheet, sheetOptions); + }); + delete model.worksheetHash; + delete model.worksheetRels; + delete model.globalRels; + delete model.sharedStrings; + delete model.workbookRels; + delete model.sheetDefs; + delete model.styles; + delete model.mediaIndex; + delete model.drawings; + delete model.drawingRels; + delete model.vmlDrawings; + } + async _processWorksheetEntry(stream, model, sheetNo, options, path) { + const xform = new WorksheetXform(options); + const worksheet = await xform.parseStream(stream); + worksheet.sheetNo = sheetNo; + model.worksheetHash[path] = worksheet; + model.worksheets.push(worksheet); + } + async _processCommentEntry(stream, model, name) { + const xform = new CommentsXform(); + const comments = await xform.parseStream(stream); + model.comments[`../${name}.xml`] = comments; + } + async _processTableEntry(stream, model, name) { + const xform = new TableXform(); + const table = await xform.parseStream(stream); + model.tables[`../tables/${name}.xml`] = table; + } + async _processWorksheetRelsEntry(stream, model, sheetNo) { + const xform = new RelationshipsXform(); + const relationships = await xform.parseStream(stream); + model.worksheetRels[sheetNo] = relationships; + } + async _processMediaEntry(entry, model, filename) { + const lastDot = filename.lastIndexOf("."); + if (lastDot >= 1) { + const extension = filename.substr(lastDot + 1); + const name = filename.substr(0, lastDot); + await new Promise((resolve, reject) => { + const streamBuf = new StreamBuf(); + streamBuf.on("finish", () => { + model.mediaIndex[filename] = model.media.length; + model.mediaIndex[name] = model.media.length; + const medium = { + type: "image", + name, + extension, + buffer: streamBuf.toBuffer() + }; + model.media.push(medium); + resolve(); + }); + entry.on("error", (error) => { + reject(error); + }); + entry.pipe(streamBuf); + }); + } + } + async _processDrawingEntry(entry, model, name) { + const xform = new DrawingXform(); + const drawing = await xform.parseStream(entry); + model.drawings[name] = drawing; + } + async _processDrawingRelsEntry(entry, model, name) { + const xform = new RelationshipsXform(); + const relationships = await xform.parseStream(entry); + model.drawingRels[name] = relationships; + } + async _processVmlDrawingEntry(entry, model, name) { + const xform = new VmlNotesXform(); + const vmlDrawing = await xform.parseStream(entry); + model.vmlDrawings[`../drawings/${name}.vml`] = vmlDrawing; + } + async _processThemeEntry(entry, model, name) { + await new Promise((resolve, reject) => { + const stream = new StreamBuf(); + entry.on("error", reject); + stream.on("error", reject); + stream.on("finish", () => { + model.themes[name] = stream.read().toString(); + resolve(); + }); + entry.pipe(stream); + }); + } + /** + * @deprecated since version 4.0. You should use `#read` instead. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md + */ + createInputStream() { + throw new Error( + "`XLSX#createInputStream` is deprecated. You should use `XLSX#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md" + ); + } + async read(stream, options) { + if (!stream[Symbol.asyncIterator] && stream.pipe) { + stream = stream.pipe(new PassThrough()); + } + const chunks = []; + for await (const chunk of stream) { + chunks.push(chunk); + } + return this.load(Buffer.concat(chunks), options); + } + async load(data, options) { + let buffer; + if (options && options.base64) { + buffer = Buffer.from(data.toString(), "base64"); + } else { + buffer = data; + } + const model = { + worksheets: [], + worksheetHash: {}, + worksheetRels: [], + themes: {}, + media: [], + mediaIndex: {}, + drawings: {}, + drawingRels: {}, + comments: {}, + tables: {}, + vmlDrawings: {} + }; + const zip = await JSZip.loadAsync(buffer); + for (const entry of Object.values(zip.files)) { + if (!entry.dir) { + let entryName = entry.name; + if (entryName[0] === "/") { + entryName = entryName.substr(1); + } + let stream; + if (entryName.match(/xl\/media\//) || // themes are not parsed as stream + entryName.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/)) { + stream = new PassThrough(); + stream.write(await entry.async("nodebuffer")); + } else { + stream = new PassThrough({ + writableObjectMode: true, + readableObjectMode: true + }); + let content; + if (process.browser) { + content = bufferToString(await entry.async("nodebuffer")); + } else { + content = await entry.async("string"); + } + const chunkSize = 16 * 1024; + for (let i = 0; i < content.length; i += chunkSize) { + stream.write(content.substring(i, i + chunkSize)); + } + } + stream.end(); + switch (entryName) { + case "_rels/.rels": + model.globalRels = await this.parseRels(stream); + break; + case "xl/workbook.xml": { + const workbook = await this.parseWorkbook(stream); + model.sheets = workbook.sheets; + model.definedNames = workbook.definedNames; + model.views = workbook.views; + model.properties = workbook.properties; + model.calcProperties = workbook.calcProperties; + break; + } + case "xl/_rels/workbook.xml.rels": + model.workbookRels = await this.parseRels(stream); + break; + case "xl/sharedStrings.xml": + model.sharedStrings = new SharedStringsXform(); + await model.sharedStrings.parseStream(stream); + break; + case "xl/styles.xml": + model.styles = new StylesXform(); + await model.styles.parseStream(stream); + break; + case "docProps/app.xml": { + const appXform = new AppXform(); + const appProperties = await appXform.parseStream(stream); + model.company = appProperties.company; + model.manager = appProperties.manager; + break; + } + case "docProps/core.xml": { + const coreXform = new CoreXform(); + const coreProperties = await coreXform.parseStream(stream); + Object.assign(model, coreProperties); + break; + } + default: { + let match = entryName.match(/xl\/worksheets\/sheet(\d+)[.]xml/); + if (match) { + await this._processWorksheetEntry(stream, model, match[1], options, entryName); + break; + } + match = entryName.match(/xl\/worksheets\/_rels\/sheet(\d+)[.]xml.rels/); + if (match) { + await this._processWorksheetRelsEntry(stream, model, match[1]); + break; + } + match = entryName.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/); + if (match) { + await this._processThemeEntry(stream, model, match[1]); + break; + } + match = entryName.match(/xl\/media\/([a-zA-Z0-9]+[.][a-zA-Z0-9]{3,4})$/); + if (match) { + await this._processMediaEntry(stream, model, match[1]); + break; + } + match = entryName.match(/xl\/drawings\/([a-zA-Z0-9]+)[.]xml/); + if (match) { + await this._processDrawingEntry(stream, model, match[1]); + break; + } + match = entryName.match(/xl\/(comments\d+)[.]xml/); + if (match) { + await this._processCommentEntry(stream, model, match[1]); + break; + } + match = entryName.match(/xl\/tables\/(table\d+)[.]xml/); + if (match) { + await this._processTableEntry(stream, model, match[1]); + break; + } + match = entryName.match(/xl\/drawings\/_rels\/([a-zA-Z0-9]+)[.]xml[.]rels/); + if (match) { + await this._processDrawingRelsEntry(stream, model, match[1]); + break; + } + match = entryName.match(/xl\/drawings\/(vmlDrawing\d+)[.]vml/); + if (match) { + await this._processVmlDrawingEntry(stream, model, match[1]); + break; + } + } + } + } + } + this.reconcile(model, options); + this.workbook.model = model; + return this.workbook; + } + // ========================================================================= + // Write + async addMedia(zip, model) { + await Promise.all( + model.media.map(async (medium) => { + if (medium.type === "image") { + const filename = `xl/media/${medium.name}.${medium.extension}`; + if (medium.filename) { + const data = await fsReadFileAsync(medium.filename); + return zip.append(data, { name: filename }); + } + if (medium.buffer) { + return zip.append(medium.buffer, { name: filename }); + } + if (medium.base64) { + const dataimg64 = medium.base64; + const content = dataimg64.substring(dataimg64.indexOf(",") + 1); + return zip.append(content, { name: filename, base64: true }); + } + } + throw new Error("Unsupported media"); + }) + ); + } + addDrawings(zip, model) { + const drawingXform = new DrawingXform(); + const relsXform = new RelationshipsXform(); + model.worksheets.forEach((worksheet) => { + const { drawing } = worksheet; + if (drawing) { + drawingXform.prepare(drawing, {}); + let xml = drawingXform.toXml(drawing); + zip.append(xml, { name: `xl/drawings/${drawing.name}.xml` }); + xml = relsXform.toXml(drawing.rels); + zip.append(xml, { name: `xl/drawings/_rels/${drawing.name}.xml.rels` }); + } + }); + } + addTables(zip, model) { + const tableXform = new TableXform(); + model.worksheets.forEach((worksheet) => { + const { tables } = worksheet; + tables.forEach((table) => { + tableXform.prepare(table, {}); + const tableXml = tableXform.toXml(table); + zip.append(tableXml, { name: `xl/tables/${table.target}` }); + }); + }); + } + async addContentTypes(zip, model) { + const xform = new ContentTypesXform(); + const xml = xform.toXml(model); + zip.append(xml, { name: "[Content_Types].xml" }); + } + async addApp(zip, model) { + const xform = new AppXform(); + const xml = xform.toXml(model); + zip.append(xml, { name: "docProps/app.xml" }); + } + async addCore(zip, model) { + const coreXform = new CoreXform(); + zip.append(coreXform.toXml(model), { name: "docProps/core.xml" }); + } + async addThemes(zip, model) { + const themes = model.themes || { theme1: theme1Xml }; + Object.keys(themes).forEach((name) => { + const xml = themes[name]; + const path = `xl/theme/${name}.xml`; + zip.append(xml, { name: path }); + }); + } + async addOfficeRels(zip) { + const xform = new RelationshipsXform(); + const xml = xform.toXml([ + { Id: "rId1", Type: _XLSX.RelType.OfficeDocument, Target: "xl/workbook.xml" }, + { Id: "rId2", Type: _XLSX.RelType.CoreProperties, Target: "docProps/core.xml" }, + { Id: "rId3", Type: _XLSX.RelType.ExtenderProperties, Target: "docProps/app.xml" } + ]); + zip.append(xml, { name: "_rels/.rels" }); + } + async addWorkbookRels(zip, model) { + let count = 1; + const relationships = [ + { Id: `rId${count++}`, Type: _XLSX.RelType.Styles, Target: "styles.xml" }, + { Id: `rId${count++}`, Type: _XLSX.RelType.Theme, Target: "theme/theme1.xml" } + ]; + if (model.sharedStrings.count) { + relationships.push({ + Id: `rId${count++}`, + Type: _XLSX.RelType.SharedStrings, + Target: "sharedStrings.xml" + }); + } + model.worksheets.forEach((worksheet) => { + worksheet.rId = `rId${count++}`; + relationships.push({ + Id: worksheet.rId, + Type: _XLSX.RelType.Worksheet, + Target: `worksheets/sheet${worksheet.id}.xml` + }); + }); + const xform = new RelationshipsXform(); + const xml = xform.toXml(relationships); + zip.append(xml, { name: "xl/_rels/workbook.xml.rels" }); + } + async addSharedStrings(zip, model) { + if (model.sharedStrings && model.sharedStrings.count) { + zip.append(model.sharedStrings.xml, { name: "xl/sharedStrings.xml" }); + } + } + async addStyles(zip, model) { + const { xml } = model.styles; + if (xml) { + zip.append(xml, { name: "xl/styles.xml" }); + } + } + async addWorkbook(zip, model) { + const xform = new WorkbookXform(); + zip.append(xform.toXml(model), { name: "xl/workbook.xml" }); + } + async addWorksheets(zip, model) { + const worksheetXform = new WorksheetXform(); + const relationshipsXform = new RelationshipsXform(); + const commentsXform = new CommentsXform(); + const vmlNotesXform = new VmlNotesXform(); + model.worksheets.forEach((worksheet) => { + let xmlStream = new XmlStream(); + worksheetXform.render(xmlStream, worksheet); + zip.append(xmlStream.xml, { name: `xl/worksheets/sheet${worksheet.id}.xml` }); + if (worksheet.rels && worksheet.rels.length) { + xmlStream = new XmlStream(); + relationshipsXform.render(xmlStream, worksheet.rels); + zip.append(xmlStream.xml, { name: `xl/worksheets/_rels/sheet${worksheet.id}.xml.rels` }); + } + if (worksheet.comments.length > 0) { + xmlStream = new XmlStream(); + commentsXform.render(xmlStream, worksheet); + zip.append(xmlStream.xml, { name: `xl/comments${worksheet.id}.xml` }); + xmlStream = new XmlStream(); + vmlNotesXform.render(xmlStream, worksheet); + zip.append(xmlStream.xml, { name: `xl/drawings/vmlDrawing${worksheet.id}.vml` }); + } + }); + } + _finalize(zip) { + return new Promise((resolve, reject) => { + zip.on("finish", () => { + resolve(this); + }); + zip.on("error", reject); + zip.finalize(); + }); + } + prepareModel(model, options) { + model.creator = model.creator || "ExcelJS"; + model.lastModifiedBy = model.lastModifiedBy || "ExcelJS"; + model.created = model.created || /* @__PURE__ */ new Date(); + model.modified = model.modified || /* @__PURE__ */ new Date(); + model.useSharedStrings = options.useSharedStrings !== void 0 ? options.useSharedStrings : true; + model.useStyles = options.useStyles !== void 0 ? options.useStyles : true; + model.sharedStrings = new SharedStringsXform(); + model.styles = model.useStyles ? new StylesXform(true) : new StylesXform.Mock(); + const workbookXform = new WorkbookXform(); + const worksheetXform = new WorksheetXform(); + workbookXform.prepare(model); + const worksheetOptions = { + sharedStrings: model.sharedStrings, + styles: model.styles, + date1904: model.properties.date1904, + drawingsCount: 0, + media: model.media + }; + worksheetOptions.drawings = model.drawings = []; + worksheetOptions.commentRefs = model.commentRefs = []; + let tableCount = 0; + model.tables = []; + model.worksheets.forEach((worksheet) => { + worksheet.tables.forEach((table) => { + tableCount++; + table.target = `table${tableCount}.xml`; + table.id = tableCount; + model.tables.push(table); + }); + worksheetXform.prepare(worksheet, worksheetOptions); + }); + } + async write(stream, options) { + options = options || {}; + const { model } = this.workbook; + const zip = new ZipStream.ZipWriter(options.zip); + zip.pipe(stream); + this.prepareModel(model, options); + await this.addContentTypes(zip, model); + await this.addOfficeRels(zip, model); + await this.addWorkbookRels(zip, model); + await this.addWorksheets(zip, model); + await this.addSharedStrings(zip, model); + await this.addDrawings(zip, model); + await this.addTables(zip, model); + await Promise.all([this.addThemes(zip, model), this.addStyles(zip, model)]); + await this.addMedia(zip, model); + await Promise.all([this.addApp(zip, model), this.addCore(zip, model)]); + await this.addWorkbook(zip, model); + return this._finalize(zip); + } + writeFile(filename, options) { + const stream = fs.createWriteStream(filename); + return new Promise((resolve, reject) => { + stream.on("finish", () => { + resolve(); + }); + stream.on("error", (error) => { + reject(error); + }); + this.write(stream, options).then(() => { + stream.end(); + }).catch((err) => { + reject(err); + }); + }); + } + async writeBuffer(options) { + const stream = new StreamBuf(); + await this.write(stream, options); + return stream.read(); + } + }; + XLSX.RelType = require_rel_type(); + module2.exports = XLSX; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+format@4.3.5/node_modules/@fast-csv/format/build/src/FormatterOptions.js +var require_FormatterOptions = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+format@4.3.5/node_modules/@fast-csv/format/build/src/FormatterOptions.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.FormatterOptions = void 0; + var FormatterOptions = class { + constructor(opts = {}) { + var _a; + this.objectMode = true; + this.delimiter = ","; + this.rowDelimiter = "\n"; + this.quote = '"'; + this.escape = this.quote; + this.quoteColumns = false; + this.quoteHeaders = this.quoteColumns; + this.headers = null; + this.includeEndRowDelimiter = false; + this.writeBOM = false; + this.BOM = "\uFEFF"; + this.alwaysWriteHeaders = false; + Object.assign(this, opts || {}); + if (typeof (opts === null || opts === void 0 ? void 0 : opts.quoteHeaders) === "undefined") { + this.quoteHeaders = this.quoteColumns; + } + if ((opts === null || opts === void 0 ? void 0 : opts.quote) === true) { + this.quote = '"'; + } else if ((opts === null || opts === void 0 ? void 0 : opts.quote) === false) { + this.quote = ""; + } + if (typeof (opts === null || opts === void 0 ? void 0 : opts.escape) !== "string") { + this.escape = this.quote; + } + this.shouldWriteHeaders = !!this.headers && ((_a = opts.writeHeaders) !== null && _a !== void 0 ? _a : true); + this.headers = Array.isArray(this.headers) ? this.headers : null; + this.escapedQuote = `${this.escape}${this.quote}`; + } + }; + exports2.FormatterOptions = FormatterOptions; + } +}); + +// ../../node_modules/.pnpm/lodash.isfunction@3.0.9/node_modules/lodash.isfunction/index.js +var require_lodash8 = __commonJS({ + "../../node_modules/.pnpm/lodash.isfunction@3.0.9/node_modules/lodash.isfunction/index.js"(exports2, module2) { + var asyncTag = "[object AsyncFunction]"; + var funcTag = "[object Function]"; + var genTag = "[object GeneratorFunction]"; + var nullTag = "[object Null]"; + var proxyTag = "[object Proxy]"; + var undefinedTag = "[object Undefined]"; + var freeGlobal = typeof global == "object" && global && global.Object === Object && global; + var freeSelf = typeof self == "object" && self && self.Object === Object && self; + var root = freeGlobal || freeSelf || Function("return this")(); + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + var nativeObjectToString = objectProto.toString; + var Symbol2 = root.Symbol; + var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0; + function baseGetTag(value) { + if (value == null) { + return value === void 0 ? undefinedTag : nullTag; + } + return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value); + } + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; + try { + value[symToStringTag] = void 0; + var unmasked = true; + } catch (e) { + } + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + function objectToString(value) { + return nativeObjectToString.call(value); + } + function isFunction(value) { + if (!isObject2(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + function isObject2(value) { + var type = typeof value; + return value != null && (type == "object" || type == "function"); + } + module2.exports = isFunction; + } +}); + +// ../../node_modules/.pnpm/lodash.isequal@4.5.0/node_modules/lodash.isequal/index.js +var require_lodash9 = __commonJS({ + "../../node_modules/.pnpm/lodash.isequal@4.5.0/node_modules/lodash.isequal/index.js"(exports2, module2) { + var LARGE_ARRAY_SIZE = 200; + var HASH_UNDEFINED = "__lodash_hash_undefined__"; + var COMPARE_PARTIAL_FLAG = 1; + var COMPARE_UNORDERED_FLAG = 2; + var MAX_SAFE_INTEGER = 9007199254740991; + var argsTag = "[object Arguments]"; + var arrayTag = "[object Array]"; + var asyncTag = "[object AsyncFunction]"; + var boolTag = "[object Boolean]"; + var dateTag = "[object Date]"; + var errorTag = "[object Error]"; + var funcTag = "[object Function]"; + var genTag = "[object GeneratorFunction]"; + var mapTag = "[object Map]"; + var numberTag = "[object Number]"; + var nullTag = "[object Null]"; + var objectTag = "[object Object]"; + var promiseTag = "[object Promise]"; + var proxyTag = "[object Proxy]"; + var regexpTag = "[object RegExp]"; + var setTag = "[object Set]"; + var stringTag = "[object String]"; + var symbolTag = "[object Symbol]"; + var undefinedTag = "[object Undefined]"; + var weakMapTag = "[object WeakMap]"; + var arrayBufferTag = "[object ArrayBuffer]"; + var dataViewTag = "[object DataView]"; + var float32Tag = "[object Float32Array]"; + var float64Tag = "[object Float64Array]"; + var int8Tag = "[object Int8Array]"; + var int16Tag = "[object Int16Array]"; + var int32Tag = "[object Int32Array]"; + var uint8Tag = "[object Uint8Array]"; + var uint8ClampedTag = "[object Uint8ClampedArray]"; + var uint16Tag = "[object Uint16Array]"; + var uint32Tag = "[object Uint32Array]"; + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + var reIsHostCtor = /^\[object .+?Constructor\]$/; + var reIsUint = /^(?:0|[1-9]\d*)$/; + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + var freeGlobal = typeof global == "object" && global && global.Object === Object && global; + var freeSelf = typeof self == "object" && self && self.Object === Object && self; + var root = freeGlobal || freeSelf || Function("return this")(); + var freeExports = typeof exports2 == "object" && exports2 && !exports2.nodeType && exports2; + var freeModule = freeExports && typeof module2 == "object" && module2 && !module2.nodeType && module2; + var moduleExports = freeModule && freeModule.exports === freeExports; + var freeProcess = moduleExports && freeGlobal.process; + var nodeUtil = (function() { + try { + return freeProcess && freeProcess.binding && freeProcess.binding("util"); + } catch (e) { + } + })(); + var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + function arrayFilter(array, predicate) { + var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; + } + function arrayPush(array, values) { + var index = -1, length = values.length, offset = array.length; + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + function arraySome(array, predicate) { + var index = -1, length = array == null ? 0 : array.length; + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + function baseTimes(n, iteratee) { + var index = -1, result = Array(n); + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + function baseUnary(func) { + return function(value) { + return func(value); + }; + } + function cacheHas(cache, key) { + return cache.has(key); + } + function getValue(object, key) { + return object == null ? void 0 : object[key]; + } + function mapToArray(map) { + var index = -1, result = Array(map.size); + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; + } + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + function setToArray(set) { + var index = -1, result = Array(set.size); + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + var arrayProto = Array.prototype; + var funcProto = Function.prototype; + var objectProto = Object.prototype; + var coreJsData = root["__core-js_shared__"]; + var funcToString = funcProto.toString; + var hasOwnProperty = objectProto.hasOwnProperty; + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ""); + return uid ? "Symbol(src)_1." + uid : ""; + })(); + var nativeObjectToString = objectProto.toString; + var reIsNative = RegExp( + "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" + ); + var Buffer2 = moduleExports ? root.Buffer : void 0; + var Symbol2 = root.Symbol; + var Uint8Array2 = root.Uint8Array; + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + var splice = arrayProto.splice; + var symToStringTag = Symbol2 ? Symbol2.toStringTag : void 0; + var nativeGetSymbols = Object.getOwnPropertySymbols; + var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0; + var nativeKeys = overArg(Object.keys, Object); + var DataView2 = getNative(root, "DataView"); + var Map2 = getNative(root, "Map"); + var Promise2 = getNative(root, "Promise"); + var Set2 = getNative(root, "Set"); + var WeakMap2 = getNative(root, "WeakMap"); + var nativeCreate = getNative(Object, "create"); + var dataViewCtorString = toSource(DataView2); + var mapCtorString = toSource(Map2); + var promiseCtorString = toSource(Promise2); + var setCtorString = toSource(Set2); + var weakMapCtorString = toSource(WeakMap2); + var symbolProto = Symbol2 ? Symbol2.prototype : void 0; + var symbolValueOf = symbolProto ? symbolProto.valueOf : void 0; + function Hash(entries) { + var index = -1, length = entries == null ? 0 : entries.length; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; + } + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; + } + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? void 0 : result; + } + return hasOwnProperty.call(data, key) ? data[key] : void 0; + } + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key); + } + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value; + return this; + } + Hash.prototype.clear = hashClear; + Hash.prototype["delete"] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + function ListCache(entries) { + var index = -1, length = entries == null ? 0 : entries.length; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } + function listCacheDelete(key) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; + } + function listCacheGet(key) { + var data = this.__data__, index = assocIndexOf(data, key); + return index < 0 ? void 0 : data[index][1]; + } + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + function listCacheSet(key, value) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + ListCache.prototype.clear = listCacheClear; + ListCache.prototype["delete"] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + function MapCache(entries) { + var index = -1, length = entries == null ? 0 : entries.length; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function mapCacheClear() { + this.size = 0; + this.__data__ = { + "hash": new Hash(), + "map": new (Map2 || ListCache)(), + "string": new Hash() + }; + } + function mapCacheDelete(key) { + var result = getMapData(this, key)["delete"](key); + this.size -= result ? 1 : 0; + return result; + } + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + function mapCacheSet(key, value) { + var data = getMapData(this, key), size = data.size; + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype["delete"] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + function SetCache(values) { + var index = -1, length = values == null ? 0 : values.length; + this.__data__ = new MapCache(); + while (++index < length) { + this.add(values[index]); + } + } + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + function setCacheHas(value) { + return this.__data__.has(value); + } + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; + } + function stackClear() { + this.__data__ = new ListCache(); + this.size = 0; + } + function stackDelete(key) { + var data = this.__data__, result = data["delete"](key); + this.size = data.size; + return result; + } + function stackGet(key) { + return this.__data__.get(key); + } + function stackHas(key) { + return this.__data__.has(key); + } + function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; + } + Stack.prototype.clear = stackClear; + Stack.prototype["delete"] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length; + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode. + (key == "length" || // Node.js 0.10 has enumerable non-index properties on buffers. + isBuff && (key == "offset" || key == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays. + isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || // Skip index properties. + isIndex(key, length)))) { + result.push(key); + } + } + return result; + } + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } + function baseGetTag(value) { + if (value == null) { + return value === void 0 ? undefinedTag : nullTag; + } + return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value); + } + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; + } + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + } + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other); + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; + var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag; + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; + } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack()); + return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__"); + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other; + stack || (stack = new Stack()); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack()); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); + } + function baseIsNative(value) { + if (!isObject2(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + function baseIsTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + } + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != "constructor") { + result.push(key); + } + } + return result; + } + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length; + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : void 0; + stack.set(array, other); + stack.set(other, array); + while (++index < arrLength) { + var arrValue = array[index], othValue = other[index]; + if (customizer) { + var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== void 0) { + if (compared) { + continue; + } + result = false; + break; + } + if (seen) { + if (!arraySome(other, function(othValue2, othIndex) { + if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; + } + } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + result = false; + break; + } + } + stack["delete"](array); + stack["delete"](other); + return result; + } + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) { + return false; + } + object = object.buffer; + other = other.buffer; + case arrayBufferTag: + if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) { + return false; + } + return true; + case boolTag: + case dateTag: + case numberTag: + return eq(+object, +other); + case errorTag: + return object.name == other.name && object.message == other.message; + case regexpTag: + case stringTag: + return object == other + ""; + case mapTag: + var convert = mapToArray; + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + if (object.size != other.size && !isPartial) { + return false; + } + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack["delete"](object); + return result; + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; + } + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length; + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + var stacked = stack.get(object); + if (stacked && stack.get(other)) { + return stacked == other; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], othValue = other[key]; + if (customizer) { + var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); + } + if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) { + result = false; + break; + } + skipCtor || (skipCtor = key == "constructor"); + } + if (result && !skipCtor) { + var objCtor = object.constructor, othCtor = other.constructor; + if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) { + result = false; + } + } + stack["delete"](object); + stack["delete"](other); + return result; + } + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); + } + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map; + } + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : void 0; + } + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; + try { + value[symToStringTag] = void 0; + var unmasked = true; + } catch (e) { + } + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } + return result; + } + var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; + } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; + var getTag = baseGetTag; + if (DataView2 && getTag(new DataView2(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap2 && getTag(new WeakMap2()) != weakMapTag) { + getTag = function(value) { + var result = baseGetTag(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : ""; + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: + return dataViewTag; + case mapCtorString: + return mapTag; + case promiseCtorString: + return promiseTag; + case setCtorString: + return setTag; + case weakMapCtorString: + return weakMapTag; + } + } + return result; + }; + } + function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && (typeof value == "number" || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); + } + function isKeyable(value) { + var type = typeof value; + return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null; + } + function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; + } + function isPrototype(value) { + var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto; + return value === proto; + } + function objectToString(value) { + return nativeObjectToString.call(value); + } + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) { + } + try { + return func + ""; + } catch (e) { + } + } + return ""; + } + function eq(value, other) { + return value === other || value !== value && other !== other; + } + var isArguments = baseIsArguments(/* @__PURE__ */ (function() { + return arguments; + })()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee"); + }; + var isArray = Array.isArray; + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + var isBuffer = nativeIsBuffer || stubFalse; + function isEqual(value, other) { + return baseIsEqual(value, other); + } + function isFunction(value) { + if (!isObject2(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + } + function isLength(value) { + return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + function isObject2(value) { + var type = typeof value; + return value != null && (type == "object" || type == "function"); + } + function isObjectLike(value) { + return value != null && typeof value == "object"; + } + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + function stubArray() { + return []; + } + function stubFalse() { + return false; + } + module2.exports = isEqual; + } +}); + +// ../../node_modules/.pnpm/lodash.isnil@4.0.0/node_modules/lodash.isnil/index.js +var require_lodash10 = __commonJS({ + "../../node_modules/.pnpm/lodash.isnil@4.0.0/node_modules/lodash.isnil/index.js"(exports2, module2) { + function isNil(value) { + return value == null; + } + module2.exports = isNil; + } +}); + +// ../../node_modules/.pnpm/lodash.escaperegexp@4.1.2/node_modules/lodash.escaperegexp/index.js +var require_lodash11 = __commonJS({ + "../../node_modules/.pnpm/lodash.escaperegexp@4.1.2/node_modules/lodash.escaperegexp/index.js"(exports2, module2) { + var INFINITY = 1 / 0; + var symbolTag = "[object Symbol]"; + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + var reHasRegExpChar = RegExp(reRegExpChar.source); + var freeGlobal = typeof global == "object" && global && global.Object === Object && global; + var freeSelf = typeof self == "object" && self && self.Object === Object && self; + var root = freeGlobal || freeSelf || Function("return this")(); + var objectProto = Object.prototype; + var objectToString = objectProto.toString; + var Symbol2 = root.Symbol; + var symbolProto = Symbol2 ? Symbol2.prototype : void 0; + var symbolToString = symbolProto ? symbolProto.toString : void 0; + function baseToString(value) { + if (typeof value == "string") { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ""; + } + var result = value + ""; + return result == "0" && 1 / value == -INFINITY ? "-0" : result; + } + function isObjectLike(value) { + return !!value && typeof value == "object"; + } + function isSymbol(value) { + return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag; + } + function toString2(value) { + return value == null ? "" : baseToString(value); + } + function escapeRegExp(string) { + string = toString2(string); + return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, "\\$&") : string; + } + module2.exports = escapeRegExp; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+format@4.3.5/node_modules/@fast-csv/format/build/src/formatter/FieldFormatter.js +var require_FieldFormatter = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+format@4.3.5/node_modules/@fast-csv/format/build/src/formatter/FieldFormatter.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.FieldFormatter = void 0; + var lodash_isboolean_1 = __importDefault2(require_lodash2()); + var lodash_isnil_1 = __importDefault2(require_lodash10()); + var lodash_escaperegexp_1 = __importDefault2(require_lodash11()); + var FieldFormatter = class { + constructor(formatterOptions) { + this._headers = null; + this.formatterOptions = formatterOptions; + if (formatterOptions.headers !== null) { + this.headers = formatterOptions.headers; + } + this.REPLACE_REGEXP = new RegExp(formatterOptions.quote, "g"); + const escapePattern = `[${formatterOptions.delimiter}${lodash_escaperegexp_1.default(formatterOptions.rowDelimiter)}|\r| +]`; + this.ESCAPE_REGEXP = new RegExp(escapePattern); + } + set headers(headers) { + this._headers = headers; + } + shouldQuote(fieldIndex, isHeader) { + const quoteConfig = isHeader ? this.formatterOptions.quoteHeaders : this.formatterOptions.quoteColumns; + if (lodash_isboolean_1.default(quoteConfig)) { + return quoteConfig; + } + if (Array.isArray(quoteConfig)) { + return quoteConfig[fieldIndex]; + } + if (this._headers !== null) { + return quoteConfig[this._headers[fieldIndex]]; + } + return false; + } + format(field, fieldIndex, isHeader) { + const preparedField = `${lodash_isnil_1.default(field) ? "" : field}`.replace(/\0/g, ""); + const { formatterOptions } = this; + if (formatterOptions.quote !== "") { + const shouldEscape = preparedField.indexOf(formatterOptions.quote) !== -1; + if (shouldEscape) { + return this.quoteField(preparedField.replace(this.REPLACE_REGEXP, formatterOptions.escapedQuote)); + } + } + const hasEscapeCharacters = preparedField.search(this.ESCAPE_REGEXP) !== -1; + if (hasEscapeCharacters || this.shouldQuote(fieldIndex, isHeader)) { + return this.quoteField(preparedField); + } + return preparedField; + } + quoteField(field) { + const { quote } = this.formatterOptions; + return `${quote}${field}${quote}`; + } + }; + exports2.FieldFormatter = FieldFormatter; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+format@4.3.5/node_modules/@fast-csv/format/build/src/types.js +var require_types3 = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+format@4.3.5/node_modules/@fast-csv/format/build/src/types.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isSyncTransform = void 0; + exports2.isSyncTransform = (transform) => transform.length === 1; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+format@4.3.5/node_modules/@fast-csv/format/build/src/formatter/RowFormatter.js +var require_RowFormatter = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+format@4.3.5/node_modules/@fast-csv/format/build/src/formatter/RowFormatter.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RowFormatter = void 0; + var lodash_isfunction_1 = __importDefault2(require_lodash8()); + var lodash_isequal_1 = __importDefault2(require_lodash9()); + var FieldFormatter_1 = require_FieldFormatter(); + var types_1 = require_types3(); + var RowFormatter = class _RowFormatter { + constructor(formatterOptions) { + this.rowCount = 0; + this.formatterOptions = formatterOptions; + this.fieldFormatter = new FieldFormatter_1.FieldFormatter(formatterOptions); + this.headers = formatterOptions.headers; + this.shouldWriteHeaders = formatterOptions.shouldWriteHeaders; + this.hasWrittenHeaders = false; + if (this.headers !== null) { + this.fieldFormatter.headers = this.headers; + } + if (formatterOptions.transform) { + this.rowTransform = formatterOptions.transform; + } + } + static isRowHashArray(row) { + if (Array.isArray(row)) { + return Array.isArray(row[0]) && row[0].length === 2; + } + return false; + } + static isRowArray(row) { + return Array.isArray(row) && !this.isRowHashArray(row); + } + // get headers from a row item + static gatherHeaders(row) { + if (_RowFormatter.isRowHashArray(row)) { + return row.map((it) => it[0]); + } + if (Array.isArray(row)) { + return row; + } + return Object.keys(row); + } + // eslint-disable-next-line @typescript-eslint/no-shadow + static createTransform(transformFunction) { + if (types_1.isSyncTransform(transformFunction)) { + return (row, cb) => { + let transformedRow = null; + try { + transformedRow = transformFunction(row); + } catch (e) { + return cb(e); + } + return cb(null, transformedRow); + }; + } + return (row, cb) => { + transformFunction(row, cb); + }; + } + set rowTransform(transformFunction) { + if (!lodash_isfunction_1.default(transformFunction)) { + throw new TypeError("The transform should be a function"); + } + this._rowTransform = _RowFormatter.createTransform(transformFunction); + } + format(row, cb) { + this.callTransformer(row, (err, transformedRow) => { + if (err) { + return cb(err); + } + if (!row) { + return cb(null); + } + const rows = []; + if (transformedRow) { + const { shouldFormatColumns, headers } = this.checkHeaders(transformedRow); + if (this.shouldWriteHeaders && headers && !this.hasWrittenHeaders) { + rows.push(this.formatColumns(headers, true)); + this.hasWrittenHeaders = true; + } + if (shouldFormatColumns) { + const columns = this.gatherColumns(transformedRow); + rows.push(this.formatColumns(columns, false)); + } + } + return cb(null, rows); + }); + } + finish(cb) { + const rows = []; + if (this.formatterOptions.alwaysWriteHeaders && this.rowCount === 0) { + if (!this.headers) { + return cb(new Error("`alwaysWriteHeaders` option is set to true but `headers` option not provided.")); + } + rows.push(this.formatColumns(this.headers, true)); + } + if (this.formatterOptions.includeEndRowDelimiter) { + rows.push(this.formatterOptions.rowDelimiter); + } + return cb(null, rows); + } + // check if we need to write header return true if we should also write a row + // could be false if headers is true and the header row(first item) is passed in + checkHeaders(row) { + if (this.headers) { + return { shouldFormatColumns: true, headers: this.headers }; + } + const headers = _RowFormatter.gatherHeaders(row); + this.headers = headers; + this.fieldFormatter.headers = headers; + if (!this.shouldWriteHeaders) { + return { shouldFormatColumns: true, headers: null }; + } + return { shouldFormatColumns: !lodash_isequal_1.default(headers, row), headers }; + } + // todo change this method to unknown[] + gatherColumns(row) { + if (this.headers === null) { + throw new Error("Headers is currently null"); + } + if (!Array.isArray(row)) { + return this.headers.map((header) => row[header]); + } + if (_RowFormatter.isRowHashArray(row)) { + return this.headers.map((header, i) => { + const col = row[i]; + if (col) { + return col[1]; + } + return ""; + }); + } + if (_RowFormatter.isRowArray(row) && !this.shouldWriteHeaders) { + return row; + } + return this.headers.map((header, i) => row[i]); + } + callTransformer(row, cb) { + if (!this._rowTransform) { + return cb(null, row); + } + return this._rowTransform(row, cb); + } + formatColumns(columns, isHeadersRow) { + const formattedCols = columns.map((field, i) => this.fieldFormatter.format(field, i, isHeadersRow)).join(this.formatterOptions.delimiter); + const { rowCount } = this; + this.rowCount += 1; + if (rowCount) { + return [this.formatterOptions.rowDelimiter, formattedCols].join(""); + } + return formattedCols; + } + }; + exports2.RowFormatter = RowFormatter; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+format@4.3.5/node_modules/@fast-csv/format/build/src/formatter/index.js +var require_formatter = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+format@4.3.5/node_modules/@fast-csv/format/build/src/formatter/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.FieldFormatter = exports2.RowFormatter = void 0; + var RowFormatter_1 = require_RowFormatter(); + Object.defineProperty(exports2, "RowFormatter", { enumerable: true, get: function() { + return RowFormatter_1.RowFormatter; + } }); + var FieldFormatter_1 = require_FieldFormatter(); + Object.defineProperty(exports2, "FieldFormatter", { enumerable: true, get: function() { + return FieldFormatter_1.FieldFormatter; + } }); + } +}); + +// ../../node_modules/.pnpm/@fast-csv+format@4.3.5/node_modules/@fast-csv/format/build/src/CsvFormatterStream.js +var require_CsvFormatterStream = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+format@4.3.5/node_modules/@fast-csv/format/build/src/CsvFormatterStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CsvFormatterStream = void 0; + var stream_1 = require("stream"); + var formatter_1 = require_formatter(); + var CsvFormatterStream = class extends stream_1.Transform { + constructor(formatterOptions) { + super({ writableObjectMode: formatterOptions.objectMode }); + this.hasWrittenBOM = false; + this.formatterOptions = formatterOptions; + this.rowFormatter = new formatter_1.RowFormatter(formatterOptions); + this.hasWrittenBOM = !formatterOptions.writeBOM; + } + transform(transformFunction) { + this.rowFormatter.rowTransform = transformFunction; + return this; + } + _transform(row, encoding, cb) { + let cbCalled = false; + try { + if (!this.hasWrittenBOM) { + this.push(this.formatterOptions.BOM); + this.hasWrittenBOM = true; + } + this.rowFormatter.format(row, (err, rows) => { + if (err) { + cbCalled = true; + return cb(err); + } + if (rows) { + rows.forEach((r) => { + this.push(Buffer.from(r, "utf8")); + }); + } + cbCalled = true; + return cb(); + }); + } catch (e) { + if (cbCalled) { + throw e; + } + cb(e); + } + } + _flush(cb) { + this.rowFormatter.finish((err, rows) => { + if (err) { + return cb(err); + } + if (rows) { + rows.forEach((r) => { + this.push(Buffer.from(r, "utf8")); + }); + } + return cb(); + }); + } + }; + exports2.CsvFormatterStream = CsvFormatterStream; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+format@4.3.5/node_modules/@fast-csv/format/build/src/index.js +var require_src2 = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+format@4.3.5/node_modules/@fast-csv/format/build/src/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.writeToPath = exports2.writeToString = exports2.writeToBuffer = exports2.writeToStream = exports2.write = exports2.format = exports2.FormatterOptions = exports2.CsvFormatterStream = void 0; + var util_1 = require("util"); + var stream_1 = require("stream"); + var fs = __importStar2(require("fs")); + var FormatterOptions_1 = require_FormatterOptions(); + var CsvFormatterStream_1 = require_CsvFormatterStream(); + __exportStar2(require_types3(), exports2); + var CsvFormatterStream_2 = require_CsvFormatterStream(); + Object.defineProperty(exports2, "CsvFormatterStream", { enumerable: true, get: function() { + return CsvFormatterStream_2.CsvFormatterStream; + } }); + var FormatterOptions_2 = require_FormatterOptions(); + Object.defineProperty(exports2, "FormatterOptions", { enumerable: true, get: function() { + return FormatterOptions_2.FormatterOptions; + } }); + exports2.format = (options) => new CsvFormatterStream_1.CsvFormatterStream(new FormatterOptions_1.FormatterOptions(options)); + exports2.write = (rows, options) => { + const csvStream = exports2.format(options); + const promiseWrite = util_1.promisify((row, cb) => { + csvStream.write(row, void 0, cb); + }); + rows.reduce((prev, row) => prev.then(() => promiseWrite(row)), Promise.resolve()).then(() => csvStream.end()).catch((err) => { + csvStream.emit("error", err); + }); + return csvStream; + }; + exports2.writeToStream = (ws, rows, options) => exports2.write(rows, options).pipe(ws); + exports2.writeToBuffer = (rows, opts = {}) => { + const buffers = []; + const ws = new stream_1.Writable({ + write(data, enc, writeCb) { + buffers.push(data); + writeCb(); + } + }); + return new Promise((res, rej) => { + ws.on("error", rej).on("finish", () => res(Buffer.concat(buffers))); + exports2.write(rows, opts).pipe(ws); + }); + }; + exports2.writeToString = (rows, options) => exports2.writeToBuffer(rows, options).then((buffer) => buffer.toString()); + exports2.writeToPath = (path, rows, options) => { + const stream = fs.createWriteStream(path, { encoding: "utf8" }); + return exports2.write(rows, options).pipe(stream); + }; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/ParserOptions.js +var require_ParserOptions = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/ParserOptions.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ParserOptions = void 0; + var lodash_escaperegexp_1 = __importDefault2(require_lodash11()); + var lodash_isnil_1 = __importDefault2(require_lodash10()); + var ParserOptions = class { + constructor(opts) { + var _a; + this.objectMode = true; + this.delimiter = ","; + this.ignoreEmpty = false; + this.quote = '"'; + this.escape = null; + this.escapeChar = this.quote; + this.comment = null; + this.supportsComments = false; + this.ltrim = false; + this.rtrim = false; + this.trim = false; + this.headers = null; + this.renameHeaders = false; + this.strictColumnHandling = false; + this.discardUnmappedColumns = false; + this.carriageReturn = "\r"; + this.encoding = "utf8"; + this.limitRows = false; + this.maxRows = 0; + this.skipLines = 0; + this.skipRows = 0; + Object.assign(this, opts || {}); + if (this.delimiter.length > 1) { + throw new Error("delimiter option must be one character long"); + } + this.escapedDelimiter = lodash_escaperegexp_1.default(this.delimiter); + this.escapeChar = (_a = this.escape) !== null && _a !== void 0 ? _a : this.quote; + this.supportsComments = !lodash_isnil_1.default(this.comment); + this.NEXT_TOKEN_REGEXP = new RegExp(`([^\\s]|\\r\\n|\\n|\\r|${this.escapedDelimiter})`); + if (this.maxRows > 0) { + this.limitRows = true; + } + } + }; + exports2.ParserOptions = ParserOptions; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/types.js +var require_types4 = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/types.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.isSyncValidate = exports2.isSyncTransform = void 0; + exports2.isSyncTransform = (transform) => transform.length === 1; + exports2.isSyncValidate = (validate2) => validate2.length === 1; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/transforms/RowTransformerValidator.js +var require_RowTransformerValidator = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/transforms/RowTransformerValidator.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RowTransformerValidator = void 0; + var lodash_isfunction_1 = __importDefault2(require_lodash8()); + var types_1 = require_types4(); + var RowTransformerValidator = class _RowTransformerValidator { + constructor() { + this._rowTransform = null; + this._rowValidator = null; + } + // eslint-disable-next-line @typescript-eslint/no-shadow + static createTransform(transformFunction) { + if (types_1.isSyncTransform(transformFunction)) { + return (row, cb) => { + let transformed = null; + try { + transformed = transformFunction(row); + } catch (e) { + return cb(e); + } + return cb(null, transformed); + }; + } + return transformFunction; + } + static createValidator(validateFunction) { + if (types_1.isSyncValidate(validateFunction)) { + return (row, cb) => { + cb(null, { row, isValid: validateFunction(row) }); + }; + } + return (row, cb) => { + validateFunction(row, (err, isValid, reason) => { + if (err) { + return cb(err); + } + if (isValid) { + return cb(null, { row, isValid, reason }); + } + return cb(null, { row, isValid: false, reason }); + }); + }; + } + set rowTransform(transformFunction) { + if (!lodash_isfunction_1.default(transformFunction)) { + throw new TypeError("The transform should be a function"); + } + this._rowTransform = _RowTransformerValidator.createTransform(transformFunction); + } + set rowValidator(validateFunction) { + if (!lodash_isfunction_1.default(validateFunction)) { + throw new TypeError("The validate should be a function"); + } + this._rowValidator = _RowTransformerValidator.createValidator(validateFunction); + } + transformAndValidate(row, cb) { + return this.callTransformer(row, (transformErr, transformedRow) => { + if (transformErr) { + return cb(transformErr); + } + if (!transformedRow) { + return cb(null, { row: null, isValid: true }); + } + return this.callValidator(transformedRow, (validateErr, validationResult) => { + if (validateErr) { + return cb(validateErr); + } + if (validationResult && !validationResult.isValid) { + return cb(null, { row: transformedRow, isValid: false, reason: validationResult.reason }); + } + return cb(null, { row: transformedRow, isValid: true }); + }); + }); + } + callTransformer(row, cb) { + if (!this._rowTransform) { + return cb(null, row); + } + return this._rowTransform(row, cb); + } + callValidator(row, cb) { + if (!this._rowValidator) { + return cb(null, { row, isValid: true }); + } + return this._rowValidator(row, cb); + } + }; + exports2.RowTransformerValidator = RowTransformerValidator; + } +}); + +// ../../node_modules/.pnpm/lodash.isundefined@3.0.1/node_modules/lodash.isundefined/index.js +var require_lodash12 = __commonJS({ + "../../node_modules/.pnpm/lodash.isundefined@3.0.1/node_modules/lodash.isundefined/index.js"(exports2, module2) { + function isUndefined(value) { + return value === void 0; + } + module2.exports = isUndefined; + } +}); + +// ../../node_modules/.pnpm/lodash.uniq@4.5.0/node_modules/lodash.uniq/index.js +var require_lodash13 = __commonJS({ + "../../node_modules/.pnpm/lodash.uniq@4.5.0/node_modules/lodash.uniq/index.js"(exports2, module2) { + var LARGE_ARRAY_SIZE = 200; + var HASH_UNDEFINED = "__lodash_hash_undefined__"; + var INFINITY = 1 / 0; + var funcTag = "[object Function]"; + var genTag = "[object GeneratorFunction]"; + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + var reIsHostCtor = /^\[object .+?Constructor\]$/; + var freeGlobal = typeof global == "object" && global && global.Object === Object && global; + var freeSelf = typeof self == "object" && self && self.Object === Object && self; + var root = freeGlobal || freeSelf || Function("return this")(); + function arrayIncludes(array, value) { + var length = array ? array.length : 0; + return !!length && baseIndexOf(array, value, 0) > -1; + } + function arrayIncludesWith(array, value, comparator) { + var index = -1, length = array ? array.length : 0; + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; + } + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, index = fromIndex + (fromRight ? 1 : -1); + while (fromRight ? index-- : ++index < length) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + function baseIndexOf(array, value, fromIndex) { + if (value !== value) { + return baseFindIndex(array, baseIsNaN, fromIndex); + } + var index = fromIndex - 1, length = array.length; + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + function baseIsNaN(value) { + return value !== value; + } + function cacheHas(cache, key) { + return cache.has(key); + } + function getValue(object, key) { + return object == null ? void 0 : object[key]; + } + function isHostObject(value) { + var result = false; + if (value != null && typeof value.toString != "function") { + try { + result = !!(value + ""); + } catch (e) { + } + } + return result; + } + function setToArray(set) { + var index = -1, result = Array(set.size); + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + var arrayProto = Array.prototype; + var funcProto = Function.prototype; + var objectProto = Object.prototype; + var coreJsData = root["__core-js_shared__"]; + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ""); + return uid ? "Symbol(src)_1." + uid : ""; + })(); + var funcToString = funcProto.toString; + var hasOwnProperty = objectProto.hasOwnProperty; + var objectToString = objectProto.toString; + var reIsNative = RegExp( + "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" + ); + var splice = arrayProto.splice; + var Map2 = getNative(root, "Map"); + var Set2 = getNative(root, "Set"); + var nativeCreate = getNative(Object, "create"); + function Hash(entries) { + var index = -1, length = entries ? entries.length : 0; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + } + function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; + } + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? void 0 : result; + } + return hasOwnProperty.call(data, key) ? data[key] : void 0; + } + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key); + } + function hashSet(key, value) { + var data = this.__data__; + data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value; + return this; + } + Hash.prototype.clear = hashClear; + Hash.prototype["delete"] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + function ListCache(entries) { + var index = -1, length = entries ? entries.length : 0; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function listCacheClear() { + this.__data__ = []; + } + function listCacheDelete(key) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; + } + function listCacheGet(key) { + var data = this.__data__, index = assocIndexOf(data, key); + return index < 0 ? void 0 : data[index][1]; + } + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + function listCacheSet(key, value) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + ListCache.prototype.clear = listCacheClear; + ListCache.prototype["delete"] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + function MapCache(entries) { + var index = -1, length = entries ? entries.length : 0; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function mapCacheClear() { + this.__data__ = { + "hash": new Hash(), + "map": new (Map2 || ListCache)(), + "string": new Hash() + }; + } + function mapCacheDelete(key) { + return getMapData(this, key)["delete"](key); + } + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; + } + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype["delete"] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + function SetCache(values) { + var index = -1, length = values ? values.length : 0; + this.__data__ = new MapCache(); + while (++index < length) { + this.add(values[index]); + } + } + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + function setCacheHas(value) { + return this.__data__.has(value); + } + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + function baseIsNative(value) { + if (!isObject2(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + function baseUniq(array, iteratee, comparator) { + var index = -1, includes = arrayIncludes, length = array.length, isCommon = true, result = [], seen = result; + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache(); + } else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], computed = iteratee ? iteratee(value) : value; + value = comparator || value !== 0 ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop : function(values) { + return new Set2(values); + }; + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map; + } + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : void 0; + } + function isKeyable(value) { + var type = typeof value; + return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null; + } + function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; + } + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) { + } + try { + return func + ""; + } catch (e) { + } + } + return ""; + } + function uniq(array) { + return array && array.length ? baseUniq(array) : []; + } + function eq(value, other) { + return value === other || value !== value && other !== other; + } + function isFunction(value) { + var tag = isObject2(value) ? objectToString.call(value) : ""; + return tag == funcTag || tag == genTag; + } + function isObject2(value) { + var type = typeof value; + return !!value && (type == "object" || type == "function"); + } + function noop() { + } + module2.exports = uniq; + } +}); + +// ../../node_modules/.pnpm/lodash.groupby@4.6.0/node_modules/lodash.groupby/index.js +var require_lodash14 = __commonJS({ + "../../node_modules/.pnpm/lodash.groupby@4.6.0/node_modules/lodash.groupby/index.js"(exports2, module2) { + var LARGE_ARRAY_SIZE = 200; + var FUNC_ERROR_TEXT = "Expected a function"; + var HASH_UNDEFINED = "__lodash_hash_undefined__"; + var UNORDERED_COMPARE_FLAG = 1; + var PARTIAL_COMPARE_FLAG = 2; + var INFINITY = 1 / 0; + var MAX_SAFE_INTEGER = 9007199254740991; + var argsTag = "[object Arguments]"; + var arrayTag = "[object Array]"; + var boolTag = "[object Boolean]"; + var dateTag = "[object Date]"; + var errorTag = "[object Error]"; + var funcTag = "[object Function]"; + var genTag = "[object GeneratorFunction]"; + var mapTag = "[object Map]"; + var numberTag = "[object Number]"; + var objectTag = "[object Object]"; + var promiseTag = "[object Promise]"; + var regexpTag = "[object RegExp]"; + var setTag = "[object Set]"; + var stringTag = "[object String]"; + var symbolTag = "[object Symbol]"; + var weakMapTag = "[object WeakMap]"; + var arrayBufferTag = "[object ArrayBuffer]"; + var dataViewTag = "[object DataView]"; + var float32Tag = "[object Float32Array]"; + var float64Tag = "[object Float64Array]"; + var int8Tag = "[object Int8Array]"; + var int16Tag = "[object Int16Array]"; + var int32Tag = "[object Int32Array]"; + var uint8Tag = "[object Uint8Array]"; + var uint8ClampedTag = "[object Uint8ClampedArray]"; + var uint16Tag = "[object Uint16Array]"; + var uint32Tag = "[object Uint32Array]"; + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/; + var reIsPlainProp = /^\w*$/; + var reLeadingDot = /^\./; + var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + var reEscapeChar = /\\(\\)?/g; + var reIsHostCtor = /^\[object .+?Constructor\]$/; + var reIsUint = /^(?:0|[1-9]\d*)$/; + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; + var freeGlobal = typeof global == "object" && global && global.Object === Object && global; + var freeSelf = typeof self == "object" && self && self.Object === Object && self; + var root = freeGlobal || freeSelf || Function("return this")(); + var freeExports = typeof exports2 == "object" && exports2 && !exports2.nodeType && exports2; + var freeModule = freeExports && typeof module2 == "object" && module2 && !module2.nodeType && module2; + var moduleExports = freeModule && freeModule.exports === freeExports; + var freeProcess = moduleExports && freeGlobal.process; + var nodeUtil = (function() { + try { + return freeProcess && freeProcess.binding("util"); + } catch (e) { + } + })(); + var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, length = array ? array.length : 0; + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); + } + return accumulator; + } + function arraySome(array, predicate) { + var index = -1, length = array ? array.length : 0; + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + function baseProperty(key) { + return function(object) { + return object == null ? void 0 : object[key]; + }; + } + function baseTimes(n, iteratee) { + var index = -1, result = Array(n); + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + function baseUnary(func) { + return function(value) { + return func(value); + }; + } + function getValue(object, key) { + return object == null ? void 0 : object[key]; + } + function isHostObject(value) { + var result = false; + if (value != null && typeof value.toString != "function") { + try { + result = !!(value + ""); + } catch (e) { + } + } + return result; + } + function mapToArray(map) { + var index = -1, result = Array(map.size); + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; + } + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } + function setToArray(set) { + var index = -1, result = Array(set.size); + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + var arrayProto = Array.prototype; + var funcProto = Function.prototype; + var objectProto = Object.prototype; + var coreJsData = root["__core-js_shared__"]; + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ""); + return uid ? "Symbol(src)_1." + uid : ""; + })(); + var funcToString = funcProto.toString; + var hasOwnProperty = objectProto.hasOwnProperty; + var objectToString = objectProto.toString; + var reIsNative = RegExp( + "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" + ); + var Symbol2 = root.Symbol; + var Uint8Array2 = root.Uint8Array; + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + var splice = arrayProto.splice; + var nativeKeys = overArg(Object.keys, Object); + var DataView2 = getNative(root, "DataView"); + var Map2 = getNative(root, "Map"); + var Promise2 = getNative(root, "Promise"); + var Set2 = getNative(root, "Set"); + var WeakMap2 = getNative(root, "WeakMap"); + var nativeCreate = getNative(Object, "create"); + var dataViewCtorString = toSource(DataView2); + var mapCtorString = toSource(Map2); + var promiseCtorString = toSource(Promise2); + var setCtorString = toSource(Set2); + var weakMapCtorString = toSource(WeakMap2); + var symbolProto = Symbol2 ? Symbol2.prototype : void 0; + var symbolValueOf = symbolProto ? symbolProto.valueOf : void 0; + var symbolToString = symbolProto ? symbolProto.toString : void 0; + function Hash(entries) { + var index = -1, length = entries ? entries.length : 0; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + } + function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; + } + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? void 0 : result; + } + return hasOwnProperty.call(data, key) ? data[key] : void 0; + } + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key); + } + function hashSet(key, value) { + var data = this.__data__; + data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value; + return this; + } + Hash.prototype.clear = hashClear; + Hash.prototype["delete"] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + function ListCache(entries) { + var index = -1, length = entries ? entries.length : 0; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function listCacheClear() { + this.__data__ = []; + } + function listCacheDelete(key) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; + } + function listCacheGet(key) { + var data = this.__data__, index = assocIndexOf(data, key); + return index < 0 ? void 0 : data[index][1]; + } + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + function listCacheSet(key, value) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + ListCache.prototype.clear = listCacheClear; + ListCache.prototype["delete"] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + function MapCache(entries) { + var index = -1, length = entries ? entries.length : 0; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function mapCacheClear() { + this.__data__ = { + "hash": new Hash(), + "map": new (Map2 || ListCache)(), + "string": new Hash() + }; + } + function mapCacheDelete(key) { + return getMapData(this, key)["delete"](key); + } + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; + } + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype["delete"] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + function SetCache(values) { + var index = -1, length = values ? values.length : 0; + this.__data__ = new MapCache(); + while (++index < length) { + this.add(values[index]); + } + } + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + function setCacheHas(value) { + return this.__data__.has(value); + } + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + function Stack(entries) { + this.__data__ = new ListCache(entries); + } + function stackClear() { + this.__data__ = new ListCache(); + } + function stackDelete(key) { + return this.__data__["delete"](key); + } + function stackGet(key) { + return this.__data__.get(key); + } + function stackHas(key) { + return this.__data__.has(key); + } + function stackSet(key, value) { + var cache = this.__data__; + if (cache instanceof ListCache) { + var pairs = cache.__data__; + if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) { + pairs.push([key, value]); + return this; + } + cache = this.__data__ = new MapCache(pairs); + } + cache.set(key, value); + return this; + } + Stack.prototype.clear = stackClear; + Stack.prototype["delete"] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; + function arrayLikeKeys(value, inherited) { + var result = isArray(value) || isArguments(value) ? baseTimes(value.length, String) : []; + var length = result.length, skipIndexes = !!length; + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isIndex(key, length)))) { + result.push(key); + } + } + return result; + } + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + function baseAggregator(collection, setter, iteratee, accumulator) { + baseEach(collection, function(value, key, collection2) { + setter(accumulator, value, iteratee(value), collection2); + }); + return accumulator; + } + var baseEach = createBaseEach(baseForOwn); + var baseFor = createBaseFor(); + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); + } + function baseGet(object, path) { + path = isKey(path, object) ? [path] : castPath(path); + var index = 0, length = path.length; + while (object != null && index < length) { + object = object[toKey(path[index++])]; + } + return index && index == length ? object : void 0; + } + function baseGetTag(value) { + return objectToString.call(value); + } + function baseHasIn(object, key) { + return object != null && key in Object(object); + } + function baseIsEqual(value, other, customizer, bitmask, stack) { + if (value === other) { + return true; + } + if (value == null || other == null || !isObject2(value) && !isObjectLike(other)) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, baseIsEqual, customizer, bitmask, stack); + } + function baseIsEqualDeep(object, other, equalFunc, customizer, bitmask, stack) { + var objIsArr = isArray(object), othIsArr = isArray(other), objTag = arrayTag, othTag = arrayTag; + if (!objIsArr) { + objTag = getTag(object); + objTag = objTag == argsTag ? objectTag : objTag; + } + if (!othIsArr) { + othTag = getTag(other); + othTag = othTag == argsTag ? objectTag : othTag; + } + var objIsObj = objTag == objectTag && !isHostObject(object), othIsObj = othTag == objectTag && !isHostObject(other), isSameTag = objTag == othTag; + if (isSameTag && !objIsObj) { + stack || (stack = new Stack()); + return objIsArr || isTypedArray(object) ? equalArrays(object, other, equalFunc, customizer, bitmask, stack) : equalByTag(object, other, objTag, equalFunc, customizer, bitmask, stack); + } + if (!(bitmask & PARTIAL_COMPARE_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__"); + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other; + stack || (stack = new Stack()); + return equalFunc(objUnwrapped, othUnwrapped, customizer, bitmask, stack); + } + } + if (!isSameTag) { + return false; + } + stack || (stack = new Stack()); + return equalObjects(object, other, equalFunc, customizer, bitmask, stack); + } + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, length = index, noCustomizer = !customizer; + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], objValue = object[key], srcValue = data[1]; + if (noCustomizer && data[2]) { + if (objValue === void 0 && !(key in object)) { + return false; + } + } else { + var stack = new Stack(); + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === void 0 ? baseIsEqual(srcValue, objValue, customizer, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG, stack) : result)) { + return false; + } + } + } + return true; + } + function baseIsNative(value) { + if (!isObject2(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + function baseIsTypedArray(value) { + return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objectToString.call(value)]; + } + function baseIteratee(value) { + if (typeof value == "function") { + return value; + } + if (value == null) { + return identity; + } + if (typeof value == "object") { + return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value); + } + return property(value); + } + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != "constructor") { + result.push(key); + } + } + return result; + } + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; + } + function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function(object) { + var objValue = get(object, path); + return objValue === void 0 && objValue === srcValue ? hasIn(object, path) : baseIsEqual(srcValue, objValue, void 0, UNORDERED_COMPARE_FLAG | PARTIAL_COMPARE_FLAG); + }; + } + function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; + } + function baseToString(value) { + if (typeof value == "string") { + return value; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ""; + } + var result = value + ""; + return result == "0" && 1 / value == -INFINITY ? "-0" : result; + } + function castPath(value) { + return isArray(value) ? value : stringToPath(value); + } + function createAggregator(setter, initializer) { + return function(collection, iteratee) { + var func = isArray(collection) ? arrayAggregator : baseAggregator, accumulator = initializer ? initializer() : {}; + return func(collection, setter, baseIteratee(iteratee, 2), accumulator); + }; + } + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection); + while (fromRight ? index-- : ++index < length) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; + } + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length; + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } + } + return object; + }; + } + function equalArrays(array, other, equalFunc, customizer, bitmask, stack) { + var isPartial = bitmask & PARTIAL_COMPARE_FLAG, arrLength = array.length, othLength = other.length; + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + var stacked = stack.get(array); + if (stacked && stack.get(other)) { + return stacked == other; + } + var index = -1, result = true, seen = bitmask & UNORDERED_COMPARE_FLAG ? new SetCache() : void 0; + stack.set(array, other); + stack.set(other, array); + while (++index < arrLength) { + var arrValue = array[index], othValue = other[index]; + if (customizer) { + var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== void 0) { + if (compared) { + continue; + } + result = false; + break; + } + if (seen) { + if (!arraySome(other, function(othValue2, othIndex) { + if (!seen.has(othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, customizer, bitmask, stack))) { + return seen.add(othIndex); + } + })) { + result = false; + break; + } + } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, bitmask, stack))) { + result = false; + break; + } + } + stack["delete"](array); + stack["delete"](other); + return result; + } + function equalByTag(object, other, tag, equalFunc, customizer, bitmask, stack) { + switch (tag) { + case dataViewTag: + if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) { + return false; + } + object = object.buffer; + other = other.buffer; + case arrayBufferTag: + if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) { + return false; + } + return true; + case boolTag: + case dateTag: + case numberTag: + return eq(+object, +other); + case errorTag: + return object.name == other.name && object.message == other.message; + case regexpTag: + case stringTag: + return object == other + ""; + case mapTag: + var convert = mapToArray; + case setTag: + var isPartial = bitmask & PARTIAL_COMPARE_FLAG; + convert || (convert = setToArray); + if (object.size != other.size && !isPartial) { + return false; + } + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= UNORDERED_COMPARE_FLAG; + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), equalFunc, customizer, bitmask, stack); + stack["delete"](object); + return result; + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } + } + return false; + } + function equalObjects(object, other, equalFunc, customizer, bitmask, stack) { + var isPartial = bitmask & PARTIAL_COMPARE_FLAG, objProps = keys(object), objLength = objProps.length, othProps = keys(other), othLength = othProps.length; + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { + return false; + } + } + var stacked = stack.get(object); + if (stacked && stack.get(other)) { + return stacked == other; + } + var result = true; + stack.set(object, other); + stack.set(other, object); + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], othValue = other[key]; + if (customizer) { + var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); + } + if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, customizer, bitmask, stack) : compared)) { + result = false; + break; + } + skipCtor || (skipCtor = key == "constructor"); + } + if (result && !skipCtor) { + var objCtor = object.constructor, othCtor = other.constructor; + if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) { + result = false; + } + } + stack["delete"](object); + stack["delete"](other); + return result; + } + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map; + } + function getMatchData(object) { + var result = keys(object), length = result.length; + while (length--) { + var key = result[length], value = object[key]; + result[length] = [key, value, isStrictComparable(value)]; + } + return result; + } + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : void 0; + } + var getTag = baseGetTag; + if (DataView2 && getTag(new DataView2(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap2 && getTag(new WeakMap2()) != weakMapTag) { + getTag = function(value) { + var result = objectToString.call(value), Ctor = result == objectTag ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : void 0; + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: + return dataViewTag; + case mapCtorString: + return mapTag; + case promiseCtorString: + return promiseTag; + case setCtorString: + return setTag; + case weakMapCtorString: + return weakMapTag; + } + } + return result; + }; + } + function hasPath(object, path, hasFunc) { + path = isKey(path, object) ? [path] : castPath(path); + var result, index = -1, length = path.length; + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result) { + return result; + } + var length = object ? object.length : 0; + return !!length && isLength(length) && isIndex(key, length) && (isArray(object) || isArguments(object)); + } + function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && (typeof value == "number" || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); + } + function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object); + } + function isKeyable(value) { + var type = typeof value; + return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null; + } + function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; + } + function isPrototype(value) { + var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto; + return value === proto; + } + function isStrictComparable(value) { + return value === value && !isObject2(value); + } + function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && (srcValue !== void 0 || key in Object(object)); + }; + } + var stringToPath = memoize(function(string) { + string = toString2(string); + var result = []; + if (reLeadingDot.test(string)) { + result.push(""); + } + string.replace(rePropName, function(match, number, quote, string2) { + result.push(quote ? string2.replace(reEscapeChar, "$1") : number || match); + }); + return result; + }); + function toKey(value) { + if (typeof value == "string" || isSymbol(value)) { + return value; + } + var result = value + ""; + return result == "0" && 1 / value == -INFINITY ? "-0" : result; + } + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) { + } + try { + return func + ""; + } catch (e) { + } + } + return ""; + } + var groupBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + result[key] = [value]; + } + }); + function memoize(func, resolver) { + if (typeof func != "function" || resolver && typeof resolver != "function") { + throw new TypeError(FUNC_ERROR_TEXT); + } + var memoized = function() { + var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache; + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result); + return result; + }; + memoized.cache = new (memoize.Cache || MapCache)(); + return memoized; + } + memoize.Cache = MapCache; + function eq(value, other) { + return value === other || value !== value && other !== other; + } + function isArguments(value) { + return isArrayLikeObject(value) && hasOwnProperty.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString.call(value) == argsTag); + } + var isArray = Array.isArray; + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + function isFunction(value) { + var tag = isObject2(value) ? objectToString.call(value) : ""; + return tag == funcTag || tag == genTag; + } + function isLength(value) { + return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + function isObject2(value) { + var type = typeof value; + return !!value && (type == "object" || type == "function"); + } + function isObjectLike(value) { + return !!value && typeof value == "object"; + } + function isSymbol(value) { + return typeof value == "symbol" || isObjectLike(value) && objectToString.call(value) == symbolTag; + } + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + function toString2(value) { + return value == null ? "" : baseToString(value); + } + function get(object, path, defaultValue) { + var result = object == null ? void 0 : baseGet(object, path); + return result === void 0 ? defaultValue : result; + } + function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); + } + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); + } + function identity(value) { + return value; + } + function property(path) { + return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); + } + module2.exports = groupBy; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/transforms/HeaderTransformer.js +var require_HeaderTransformer = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/transforms/HeaderTransformer.js"(exports2) { + "use strict"; + var __importDefault2 = exports2 && exports2.__importDefault || function(mod) { + return mod && mod.__esModule ? mod : { "default": mod }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HeaderTransformer = void 0; + var lodash_isundefined_1 = __importDefault2(require_lodash12()); + var lodash_isfunction_1 = __importDefault2(require_lodash8()); + var lodash_uniq_1 = __importDefault2(require_lodash13()); + var lodash_groupby_1 = __importDefault2(require_lodash14()); + var HeaderTransformer = class { + constructor(parserOptions) { + this.headers = null; + this.receivedHeaders = false; + this.shouldUseFirstRow = false; + this.processedFirstRow = false; + this.headersLength = 0; + this.parserOptions = parserOptions; + if (parserOptions.headers === true) { + this.shouldUseFirstRow = true; + } else if (Array.isArray(parserOptions.headers)) { + this.setHeaders(parserOptions.headers); + } else if (lodash_isfunction_1.default(parserOptions.headers)) { + this.headersTransform = parserOptions.headers; + } + } + transform(row, cb) { + if (!this.shouldMapRow(row)) { + return cb(null, { row: null, isValid: true }); + } + return cb(null, this.processRow(row)); + } + shouldMapRow(row) { + const { parserOptions } = this; + if (!this.headersTransform && parserOptions.renameHeaders && !this.processedFirstRow) { + if (!this.receivedHeaders) { + throw new Error("Error renaming headers: new headers must be provided in an array"); + } + this.processedFirstRow = true; + return false; + } + if (!this.receivedHeaders && Array.isArray(row)) { + if (this.headersTransform) { + this.setHeaders(this.headersTransform(row)); + } else if (this.shouldUseFirstRow) { + this.setHeaders(row); + } else { + return true; + } + return false; + } + return true; + } + processRow(row) { + if (!this.headers) { + return { row, isValid: true }; + } + const { parserOptions } = this; + if (!parserOptions.discardUnmappedColumns && row.length > this.headersLength) { + if (!parserOptions.strictColumnHandling) { + throw new Error(`Unexpected Error: column header mismatch expected: ${this.headersLength} columns got: ${row.length}`); + } + return { + row, + isValid: false, + reason: `Column header mismatch expected: ${this.headersLength} columns got: ${row.length}` + }; + } + if (parserOptions.strictColumnHandling && row.length < this.headersLength) { + return { + row, + isValid: false, + reason: `Column header mismatch expected: ${this.headersLength} columns got: ${row.length}` + }; + } + return { row: this.mapHeaders(row), isValid: true }; + } + mapHeaders(row) { + const rowMap = {}; + const { headers, headersLength } = this; + for (let i = 0; i < headersLength; i += 1) { + const header = headers[i]; + if (!lodash_isundefined_1.default(header)) { + const val = row[i]; + if (lodash_isundefined_1.default(val)) { + rowMap[header] = ""; + } else { + rowMap[header] = val; + } + } + } + return rowMap; + } + setHeaders(headers) { + var _a; + const filteredHeaders = headers.filter((h) => !!h); + if (lodash_uniq_1.default(filteredHeaders).length !== filteredHeaders.length) { + const grouped = lodash_groupby_1.default(filteredHeaders); + const duplicates = Object.keys(grouped).filter((dup) => grouped[dup].length > 1); + throw new Error(`Duplicate headers found ${JSON.stringify(duplicates)}`); + } + this.headers = headers; + this.receivedHeaders = true; + this.headersLength = ((_a = this.headers) === null || _a === void 0 ? void 0 : _a.length) || 0; + } + }; + exports2.HeaderTransformer = HeaderTransformer; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/transforms/index.js +var require_transforms = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/transforms/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.HeaderTransformer = exports2.RowTransformerValidator = void 0; + var RowTransformerValidator_1 = require_RowTransformerValidator(); + Object.defineProperty(exports2, "RowTransformerValidator", { enumerable: true, get: function() { + return RowTransformerValidator_1.RowTransformerValidator; + } }); + var HeaderTransformer_1 = require_HeaderTransformer(); + Object.defineProperty(exports2, "HeaderTransformer", { enumerable: true, get: function() { + return HeaderTransformer_1.HeaderTransformer; + } }); + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/Token.js +var require_Token = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/Token.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Token = void 0; + var Token = class { + constructor(tokenArgs) { + this.token = tokenArgs.token; + this.startCursor = tokenArgs.startCursor; + this.endCursor = tokenArgs.endCursor; + } + static isTokenRowDelimiter(token) { + const content = token.token; + return content === "\r" || content === "\n" || content === "\r\n"; + } + static isTokenCarriageReturn(token, parserOptions) { + return token.token === parserOptions.carriageReturn; + } + static isTokenComment(token, parserOptions) { + return parserOptions.supportsComments && !!token && token.token === parserOptions.comment; + } + static isTokenEscapeCharacter(token, parserOptions) { + return token.token === parserOptions.escapeChar; + } + static isTokenQuote(token, parserOptions) { + return token.token === parserOptions.quote; + } + static isTokenDelimiter(token, parserOptions) { + return token.token === parserOptions.delimiter; + } + }; + exports2.Token = Token; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/Scanner.js +var require_Scanner = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/Scanner.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Scanner = void 0; + var Token_1 = require_Token(); + var ROW_DELIMITER = /((?:\r\n)|\n|\r)/; + var Scanner = class { + constructor(args) { + this.cursor = 0; + this.line = args.line; + this.lineLength = this.line.length; + this.parserOptions = args.parserOptions; + this.hasMoreData = args.hasMoreData; + this.cursor = args.cursor || 0; + } + get hasMoreCharacters() { + return this.lineLength > this.cursor; + } + get nextNonSpaceToken() { + const { lineFromCursor } = this; + const regex = this.parserOptions.NEXT_TOKEN_REGEXP; + if (lineFromCursor.search(regex) === -1) { + return null; + } + const match = regex.exec(lineFromCursor); + if (match == null) { + return null; + } + const token = match[1]; + const startCursor = this.cursor + (match.index || 0); + return new Token_1.Token({ + token, + startCursor, + endCursor: startCursor + token.length - 1 + }); + } + get nextCharacterToken() { + const { cursor, lineLength } = this; + if (lineLength <= cursor) { + return null; + } + return new Token_1.Token({ + token: this.line[cursor], + startCursor: cursor, + endCursor: cursor + }); + } + get lineFromCursor() { + return this.line.substr(this.cursor); + } + advancePastLine() { + const match = ROW_DELIMITER.exec(this.lineFromCursor); + if (!match) { + if (this.hasMoreData) { + return null; + } + this.cursor = this.lineLength; + return this; + } + this.cursor += (match.index || 0) + match[0].length; + return this; + } + advanceTo(cursor) { + this.cursor = cursor; + return this; + } + advanceToToken(token) { + this.cursor = token.startCursor; + return this; + } + advancePastToken(token) { + this.cursor = token.endCursor + 1; + return this; + } + truncateToCursor() { + this.line = this.lineFromCursor; + this.lineLength = this.line.length; + this.cursor = 0; + return this; + } + }; + exports2.Scanner = Scanner; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/column/ColumnFormatter.js +var require_ColumnFormatter = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/column/ColumnFormatter.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ColumnFormatter = void 0; + var ColumnFormatter = class { + constructor(parserOptions) { + if (parserOptions.trim) { + this.format = (col) => col.trim(); + } else if (parserOptions.ltrim) { + this.format = (col) => col.trimLeft(); + } else if (parserOptions.rtrim) { + this.format = (col) => col.trimRight(); + } else { + this.format = (col) => col; + } + } + }; + exports2.ColumnFormatter = ColumnFormatter; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/column/NonQuotedColumnParser.js +var require_NonQuotedColumnParser = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/column/NonQuotedColumnParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.NonQuotedColumnParser = void 0; + var ColumnFormatter_1 = require_ColumnFormatter(); + var Token_1 = require_Token(); + var NonQuotedColumnParser = class { + constructor(parserOptions) { + this.parserOptions = parserOptions; + this.columnFormatter = new ColumnFormatter_1.ColumnFormatter(parserOptions); + } + parse(scanner) { + if (!scanner.hasMoreCharacters) { + return null; + } + const { parserOptions } = this; + const characters = []; + let nextToken = scanner.nextCharacterToken; + for (; nextToken; nextToken = scanner.nextCharacterToken) { + if (Token_1.Token.isTokenDelimiter(nextToken, parserOptions) || Token_1.Token.isTokenRowDelimiter(nextToken)) { + break; + } + characters.push(nextToken.token); + scanner.advancePastToken(nextToken); + } + return this.columnFormatter.format(characters.join("")); + } + }; + exports2.NonQuotedColumnParser = NonQuotedColumnParser; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/column/QuotedColumnParser.js +var require_QuotedColumnParser = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/column/QuotedColumnParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.QuotedColumnParser = void 0; + var ColumnFormatter_1 = require_ColumnFormatter(); + var Token_1 = require_Token(); + var QuotedColumnParser = class { + constructor(parserOptions) { + this.parserOptions = parserOptions; + this.columnFormatter = new ColumnFormatter_1.ColumnFormatter(parserOptions); + } + parse(scanner) { + if (!scanner.hasMoreCharacters) { + return null; + } + const originalCursor = scanner.cursor; + const { foundClosingQuote, col } = this.gatherDataBetweenQuotes(scanner); + if (!foundClosingQuote) { + scanner.advanceTo(originalCursor); + if (!scanner.hasMoreData) { + throw new Error(`Parse Error: missing closing: '${this.parserOptions.quote || ""}' in line: at '${scanner.lineFromCursor.replace(/[\r\n]/g, "\\n'")}'`); + } + return null; + } + this.checkForMalformedColumn(scanner); + return col; + } + gatherDataBetweenQuotes(scanner) { + const { parserOptions } = this; + let foundStartingQuote = false; + let foundClosingQuote = false; + const characters = []; + let nextToken = scanner.nextCharacterToken; + for (; !foundClosingQuote && nextToken !== null; nextToken = scanner.nextCharacterToken) { + const isQuote = Token_1.Token.isTokenQuote(nextToken, parserOptions); + if (!foundStartingQuote && isQuote) { + foundStartingQuote = true; + } else if (foundStartingQuote) { + if (Token_1.Token.isTokenEscapeCharacter(nextToken, parserOptions)) { + scanner.advancePastToken(nextToken); + const tokenFollowingEscape = scanner.nextCharacterToken; + if (tokenFollowingEscape !== null && (Token_1.Token.isTokenQuote(tokenFollowingEscape, parserOptions) || Token_1.Token.isTokenEscapeCharacter(tokenFollowingEscape, parserOptions))) { + characters.push(tokenFollowingEscape.token); + nextToken = tokenFollowingEscape; + } else if (isQuote) { + foundClosingQuote = true; + } else { + characters.push(nextToken.token); + } + } else if (isQuote) { + foundClosingQuote = true; + } else { + characters.push(nextToken.token); + } + } + scanner.advancePastToken(nextToken); + } + return { col: this.columnFormatter.format(characters.join("")), foundClosingQuote }; + } + checkForMalformedColumn(scanner) { + const { parserOptions } = this; + const { nextNonSpaceToken } = scanner; + if (nextNonSpaceToken) { + const isNextTokenADelimiter = Token_1.Token.isTokenDelimiter(nextNonSpaceToken, parserOptions); + const isNextTokenARowDelimiter = Token_1.Token.isTokenRowDelimiter(nextNonSpaceToken); + if (!(isNextTokenADelimiter || isNextTokenARowDelimiter)) { + const linePreview = scanner.lineFromCursor.substr(0, 10).replace(/[\r\n]/g, "\\n'"); + throw new Error(`Parse Error: expected: '${parserOptions.escapedDelimiter}' OR new line got: '${nextNonSpaceToken.token}'. at '${linePreview}`); + } + scanner.advanceToToken(nextNonSpaceToken); + } else if (!scanner.hasMoreData) { + scanner.advancePastLine(); + } + } + }; + exports2.QuotedColumnParser = QuotedColumnParser; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/column/ColumnParser.js +var require_ColumnParser = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/column/ColumnParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ColumnParser = void 0; + var NonQuotedColumnParser_1 = require_NonQuotedColumnParser(); + var QuotedColumnParser_1 = require_QuotedColumnParser(); + var Token_1 = require_Token(); + var ColumnParser = class { + constructor(parserOptions) { + this.parserOptions = parserOptions; + this.quotedColumnParser = new QuotedColumnParser_1.QuotedColumnParser(parserOptions); + this.nonQuotedColumnParser = new NonQuotedColumnParser_1.NonQuotedColumnParser(parserOptions); + } + parse(scanner) { + const { nextNonSpaceToken } = scanner; + if (nextNonSpaceToken !== null && Token_1.Token.isTokenQuote(nextNonSpaceToken, this.parserOptions)) { + scanner.advanceToToken(nextNonSpaceToken); + return this.quotedColumnParser.parse(scanner); + } + return this.nonQuotedColumnParser.parse(scanner); + } + }; + exports2.ColumnParser = ColumnParser; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/column/index.js +var require_column2 = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/column/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ColumnFormatter = exports2.QuotedColumnParser = exports2.NonQuotedColumnParser = exports2.ColumnParser = void 0; + var ColumnParser_1 = require_ColumnParser(); + Object.defineProperty(exports2, "ColumnParser", { enumerable: true, get: function() { + return ColumnParser_1.ColumnParser; + } }); + var NonQuotedColumnParser_1 = require_NonQuotedColumnParser(); + Object.defineProperty(exports2, "NonQuotedColumnParser", { enumerable: true, get: function() { + return NonQuotedColumnParser_1.NonQuotedColumnParser; + } }); + var QuotedColumnParser_1 = require_QuotedColumnParser(); + Object.defineProperty(exports2, "QuotedColumnParser", { enumerable: true, get: function() { + return QuotedColumnParser_1.QuotedColumnParser; + } }); + var ColumnFormatter_1 = require_ColumnFormatter(); + Object.defineProperty(exports2, "ColumnFormatter", { enumerable: true, get: function() { + return ColumnFormatter_1.ColumnFormatter; + } }); + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/RowParser.js +var require_RowParser = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/RowParser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.RowParser = void 0; + var column_1 = require_column2(); + var Token_1 = require_Token(); + var EMPTY_STRING = ""; + var RowParser = class { + constructor(parserOptions) { + this.parserOptions = parserOptions; + this.columnParser = new column_1.ColumnParser(parserOptions); + } + static isEmptyRow(row) { + return row.join(EMPTY_STRING).replace(/\s+/g, EMPTY_STRING) === EMPTY_STRING; + } + parse(scanner) { + const { parserOptions } = this; + const { hasMoreData } = scanner; + const currentScanner = scanner; + const columns = []; + let currentToken = this.getStartToken(currentScanner, columns); + while (currentToken) { + if (Token_1.Token.isTokenRowDelimiter(currentToken)) { + currentScanner.advancePastToken(currentToken); + if (!currentScanner.hasMoreCharacters && Token_1.Token.isTokenCarriageReturn(currentToken, parserOptions) && hasMoreData) { + return null; + } + currentScanner.truncateToCursor(); + return columns; + } + if (!this.shouldSkipColumnParse(currentScanner, currentToken, columns)) { + const item = this.columnParser.parse(currentScanner); + if (item === null) { + return null; + } + columns.push(item); + } + currentToken = currentScanner.nextNonSpaceToken; + } + if (!hasMoreData) { + currentScanner.truncateToCursor(); + return columns; + } + return null; + } + getStartToken(scanner, columns) { + const currentToken = scanner.nextNonSpaceToken; + if (currentToken !== null && Token_1.Token.isTokenDelimiter(currentToken, this.parserOptions)) { + columns.push(""); + return scanner.nextNonSpaceToken; + } + return currentToken; + } + shouldSkipColumnParse(scanner, currentToken, columns) { + const { parserOptions } = this; + if (Token_1.Token.isTokenDelimiter(currentToken, parserOptions)) { + scanner.advancePastToken(currentToken); + const nextToken = scanner.nextCharacterToken; + if (!scanner.hasMoreCharacters || nextToken !== null && Token_1.Token.isTokenRowDelimiter(nextToken)) { + columns.push(""); + return true; + } + if (nextToken !== null && Token_1.Token.isTokenDelimiter(nextToken, parserOptions)) { + columns.push(""); + return true; + } + } + return false; + } + }; + exports2.RowParser = RowParser; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/Parser.js +var require_Parser = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/Parser.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.Parser = void 0; + var Scanner_1 = require_Scanner(); + var RowParser_1 = require_RowParser(); + var Token_1 = require_Token(); + var Parser = class _Parser { + constructor(parserOptions) { + this.parserOptions = parserOptions; + this.rowParser = new RowParser_1.RowParser(this.parserOptions); + } + static removeBOM(line) { + if (line && line.charCodeAt(0) === 65279) { + return line.slice(1); + } + return line; + } + parse(line, hasMoreData) { + const scanner = new Scanner_1.Scanner({ + line: _Parser.removeBOM(line), + parserOptions: this.parserOptions, + hasMoreData + }); + if (this.parserOptions.supportsComments) { + return this.parseWithComments(scanner); + } + return this.parseWithoutComments(scanner); + } + parseWithoutComments(scanner) { + const rows = []; + let shouldContinue = true; + while (shouldContinue) { + shouldContinue = this.parseRow(scanner, rows); + } + return { line: scanner.line, rows }; + } + parseWithComments(scanner) { + const { parserOptions } = this; + const rows = []; + for (let nextToken = scanner.nextCharacterToken; nextToken !== null; nextToken = scanner.nextCharacterToken) { + if (Token_1.Token.isTokenComment(nextToken, parserOptions)) { + const cursor = scanner.advancePastLine(); + if (cursor === null) { + return { line: scanner.lineFromCursor, rows }; + } + if (!scanner.hasMoreCharacters) { + return { line: scanner.lineFromCursor, rows }; + } + scanner.truncateToCursor(); + } else if (!this.parseRow(scanner, rows)) { + break; + } + } + return { line: scanner.line, rows }; + } + parseRow(scanner, rows) { + const nextToken = scanner.nextNonSpaceToken; + if (!nextToken) { + return false; + } + const row = this.rowParser.parse(scanner); + if (row === null) { + return false; + } + if (this.parserOptions.ignoreEmpty && RowParser_1.RowParser.isEmptyRow(row)) { + return true; + } + rows.push(row); + return true; + } + }; + exports2.Parser = Parser; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/index.js +var require_parser = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/parser/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.QuotedColumnParser = exports2.NonQuotedColumnParser = exports2.ColumnParser = exports2.Token = exports2.Scanner = exports2.RowParser = exports2.Parser = void 0; + var Parser_1 = require_Parser(); + Object.defineProperty(exports2, "Parser", { enumerable: true, get: function() { + return Parser_1.Parser; + } }); + var RowParser_1 = require_RowParser(); + Object.defineProperty(exports2, "RowParser", { enumerable: true, get: function() { + return RowParser_1.RowParser; + } }); + var Scanner_1 = require_Scanner(); + Object.defineProperty(exports2, "Scanner", { enumerable: true, get: function() { + return Scanner_1.Scanner; + } }); + var Token_1 = require_Token(); + Object.defineProperty(exports2, "Token", { enumerable: true, get: function() { + return Token_1.Token; + } }); + var column_1 = require_column2(); + Object.defineProperty(exports2, "ColumnParser", { enumerable: true, get: function() { + return column_1.ColumnParser; + } }); + Object.defineProperty(exports2, "NonQuotedColumnParser", { enumerable: true, get: function() { + return column_1.NonQuotedColumnParser; + } }); + Object.defineProperty(exports2, "QuotedColumnParser", { enumerable: true, get: function() { + return column_1.QuotedColumnParser; + } }); + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/CsvParserStream.js +var require_CsvParserStream = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/CsvParserStream.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CsvParserStream = void 0; + var string_decoder_1 = require("string_decoder"); + var stream_1 = require("stream"); + var transforms_1 = require_transforms(); + var parser_1 = require_parser(); + var CsvParserStream = class _CsvParserStream extends stream_1.Transform { + constructor(parserOptions) { + super({ objectMode: parserOptions.objectMode }); + this.lines = ""; + this.rowCount = 0; + this.parsedRowCount = 0; + this.parsedLineCount = 0; + this.endEmitted = false; + this.headersEmitted = false; + this.parserOptions = parserOptions; + this.parser = new parser_1.Parser(parserOptions); + this.headerTransformer = new transforms_1.HeaderTransformer(parserOptions); + this.decoder = new string_decoder_1.StringDecoder(parserOptions.encoding); + this.rowTransformerValidator = new transforms_1.RowTransformerValidator(); + } + get hasHitRowLimit() { + return this.parserOptions.limitRows && this.rowCount >= this.parserOptions.maxRows; + } + get shouldEmitRows() { + return this.parsedRowCount > this.parserOptions.skipRows; + } + get shouldSkipLine() { + return this.parsedLineCount <= this.parserOptions.skipLines; + } + transform(transformFunction) { + this.rowTransformerValidator.rowTransform = transformFunction; + return this; + } + validate(validateFunction) { + this.rowTransformerValidator.rowValidator = validateFunction; + return this; + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any + emit(event, ...rest) { + if (event === "end") { + if (!this.endEmitted) { + this.endEmitted = true; + super.emit("end", this.rowCount); + } + return false; + } + return super.emit(event, ...rest); + } + _transform(data, encoding, done) { + if (this.hasHitRowLimit) { + return done(); + } + const wrappedCallback = _CsvParserStream.wrapDoneCallback(done); + try { + const { lines } = this; + const newLine = lines + this.decoder.write(data); + const rows = this.parse(newLine, true); + return this.processRows(rows, wrappedCallback); + } catch (e) { + return wrappedCallback(e); + } + } + _flush(done) { + const wrappedCallback = _CsvParserStream.wrapDoneCallback(done); + if (this.hasHitRowLimit) { + return wrappedCallback(); + } + try { + const newLine = this.lines + this.decoder.end(); + const rows = this.parse(newLine, false); + return this.processRows(rows, wrappedCallback); + } catch (e) { + return wrappedCallback(e); + } + } + parse(data, hasMoreData) { + if (!data) { + return []; + } + const { line, rows } = this.parser.parse(data, hasMoreData); + this.lines = line; + return rows; + } + processRows(rows, cb) { + const rowsLength = rows.length; + const iterate = (i) => { + const callNext = (err) => { + if (err) { + return cb(err); + } + if (i % 100 === 0) { + setImmediate(() => iterate(i + 1)); + return void 0; + } + return iterate(i + 1); + }; + this.checkAndEmitHeaders(); + if (i >= rowsLength || this.hasHitRowLimit) { + return cb(); + } + this.parsedLineCount += 1; + if (this.shouldSkipLine) { + return callNext(); + } + const row = rows[i]; + this.rowCount += 1; + this.parsedRowCount += 1; + const nextRowCount = this.rowCount; + return this.transformRow(row, (err, transformResult) => { + if (err) { + this.rowCount -= 1; + return callNext(err); + } + if (!transformResult) { + return callNext(new Error("expected transform result")); + } + if (!transformResult.isValid) { + this.emit("data-invalid", transformResult.row, nextRowCount, transformResult.reason); + } else if (transformResult.row) { + return this.pushRow(transformResult.row, callNext); + } + return callNext(); + }); + }; + iterate(0); + } + transformRow(parsedRow, cb) { + try { + this.headerTransformer.transform(parsedRow, (err, withHeaders) => { + if (err) { + return cb(err); + } + if (!withHeaders) { + return cb(new Error("Expected result from header transform")); + } + if (!withHeaders.isValid) { + if (this.shouldEmitRows) { + return cb(null, { isValid: false, row: parsedRow }); + } + return this.skipRow(cb); + } + if (withHeaders.row) { + if (this.shouldEmitRows) { + return this.rowTransformerValidator.transformAndValidate(withHeaders.row, cb); + } + return this.skipRow(cb); + } + this.rowCount -= 1; + this.parsedRowCount -= 1; + return cb(null, { row: null, isValid: true }); + }); + } catch (e) { + cb(e); + } + } + checkAndEmitHeaders() { + if (!this.headersEmitted && this.headerTransformer.headers) { + this.headersEmitted = true; + this.emit("headers", this.headerTransformer.headers); + } + } + skipRow(cb) { + this.rowCount -= 1; + return cb(null, { row: null, isValid: true }); + } + pushRow(row, cb) { + try { + if (!this.parserOptions.objectMode) { + this.push(JSON.stringify(row)); + } else { + this.push(row); + } + cb(); + } catch (e) { + cb(e); + } + } + static wrapDoneCallback(done) { + let errorCalled = false; + return (err, ...args) => { + if (err) { + if (errorCalled) { + throw err; + } + errorCalled = true; + done(err); + return; + } + done(...args); + }; + } + }; + exports2.CsvParserStream = CsvParserStream; + } +}); + +// ../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/index.js +var require_src3 = __commonJS({ + "../../node_modules/.pnpm/@fast-csv+parse@4.3.6/node_modules/@fast-csv/parse/build/src/index.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { + return m[k]; + } }); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __importStar2 = exports2 && exports2.__importStar || function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding2(result, mod, k); + } + __setModuleDefault2(result, mod); + return result; + }; + var __exportStar2 = exports2 && exports2.__exportStar || function(m, exports3) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports3, p)) __createBinding2(exports3, m, p); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.parseString = exports2.parseFile = exports2.parseStream = exports2.parse = exports2.ParserOptions = exports2.CsvParserStream = void 0; + var fs = __importStar2(require("fs")); + var stream_1 = require("stream"); + var ParserOptions_1 = require_ParserOptions(); + var CsvParserStream_1 = require_CsvParserStream(); + __exportStar2(require_types4(), exports2); + var CsvParserStream_2 = require_CsvParserStream(); + Object.defineProperty(exports2, "CsvParserStream", { enumerable: true, get: function() { + return CsvParserStream_2.CsvParserStream; + } }); + var ParserOptions_2 = require_ParserOptions(); + Object.defineProperty(exports2, "ParserOptions", { enumerable: true, get: function() { + return ParserOptions_2.ParserOptions; + } }); + exports2.parse = (args) => new CsvParserStream_1.CsvParserStream(new ParserOptions_1.ParserOptions(args)); + exports2.parseStream = (stream, options) => stream.pipe(new CsvParserStream_1.CsvParserStream(new ParserOptions_1.ParserOptions(options))); + exports2.parseFile = (location, options = {}) => fs.createReadStream(location).pipe(new CsvParserStream_1.CsvParserStream(new ParserOptions_1.ParserOptions(options))); + exports2.parseString = (string, options) => { + const rs = new stream_1.Readable(); + rs.push(string); + rs.push(null); + return rs.pipe(new CsvParserStream_1.CsvParserStream(new ParserOptions_1.ParserOptions(options))); + }; + } +}); + +// ../../node_modules/.pnpm/fast-csv@4.3.6/node_modules/fast-csv/build/src/index.js +var require_src4 = __commonJS({ + "../../node_modules/.pnpm/fast-csv@4.3.6/node_modules/fast-csv/build/src/index.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.CsvParserStream = exports2.ParserOptions = exports2.parseFile = exports2.parseStream = exports2.parseString = exports2.parse = exports2.FormatterOptions = exports2.CsvFormatterStream = exports2.writeToPath = exports2.writeToString = exports2.writeToBuffer = exports2.writeToStream = exports2.write = exports2.format = void 0; + var format_1 = require_src2(); + Object.defineProperty(exports2, "format", { enumerable: true, get: function() { + return format_1.format; + } }); + Object.defineProperty(exports2, "write", { enumerable: true, get: function() { + return format_1.write; + } }); + Object.defineProperty(exports2, "writeToStream", { enumerable: true, get: function() { + return format_1.writeToStream; + } }); + Object.defineProperty(exports2, "writeToBuffer", { enumerable: true, get: function() { + return format_1.writeToBuffer; + } }); + Object.defineProperty(exports2, "writeToString", { enumerable: true, get: function() { + return format_1.writeToString; + } }); + Object.defineProperty(exports2, "writeToPath", { enumerable: true, get: function() { + return format_1.writeToPath; + } }); + Object.defineProperty(exports2, "CsvFormatterStream", { enumerable: true, get: function() { + return format_1.CsvFormatterStream; + } }); + Object.defineProperty(exports2, "FormatterOptions", { enumerable: true, get: function() { + return format_1.FormatterOptions; + } }); + var parse_1 = require_src3(); + Object.defineProperty(exports2, "parse", { enumerable: true, get: function() { + return parse_1.parse; + } }); + Object.defineProperty(exports2, "parseString", { enumerable: true, get: function() { + return parse_1.parseString; + } }); + Object.defineProperty(exports2, "parseStream", { enumerable: true, get: function() { + return parse_1.parseStream; + } }); + Object.defineProperty(exports2, "parseFile", { enumerable: true, get: function() { + return parse_1.parseFile; + } }); + Object.defineProperty(exports2, "ParserOptions", { enumerable: true, get: function() { + return parse_1.ParserOptions; + } }); + Object.defineProperty(exports2, "CsvParserStream", { enumerable: true, get: function() { + return parse_1.CsvParserStream; + } }); + } +}); + +// ../../node_modules/.pnpm/dayjs@1.11.23/node_modules/dayjs/plugin/customParseFormat.js +var require_customParseFormat = __commonJS({ + "../../node_modules/.pnpm/dayjs@1.11.23/node_modules/dayjs/plugin/customParseFormat.js"(exports2, module2) { + !(function(e, t) { + "object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_customParseFormat = t(); + })(exports2, (function() { + "use strict"; + var e = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, t = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, n = /\d/, r = /\d\d/, i = /\d\d?/, o = /\d*[^-_:/,()\s\d]+/, s = {}, a = function(e2) { + return (e2 = +e2) + (e2 > 68 ? 1900 : 2e3); + }; + var f = function(e2) { + return function(t2) { + this[e2] = +t2; + }; + }, h = [/[+-]\d\d:?(\d\d)?|Z/, function(e2) { + (this.zone || (this.zone = {})).offset = (function(e3) { + if (!e3) return 0; + if ("Z" === e3) return 0; + var t2 = e3.match(/([+-]|\d\d)/g), n2 = 60 * t2[1] + (+t2[2] || 0); + return 0 === n2 ? 0 : "+" === t2[0] ? -n2 : n2; + })(e2); + }], u = function(e2) { + var t2 = s[e2]; + return t2 && (t2.indexOf ? t2 : t2.s.concat(t2.f)); + }, d = function(e2, t2) { + var n2, r2 = s.meridiem; + if (r2) { + for (var i2 = 1; i2 <= 24; i2 += 1) if (e2.indexOf(r2(i2, 0, t2)) > -1) { + n2 = i2 > 12; + break; + } + } else n2 = e2 === (t2 ? "pm" : "PM"); + return n2; + }, c = { A: [o, function(e2) { + this.afternoon = d(e2, false); + }], a: [o, function(e2) { + this.afternoon = d(e2, true); + }], Q: [n, function(e2) { + this.month = 3 * (e2 - 1) + 1; + }], S: [n, function(e2) { + this.milliseconds = 100 * +e2; + }], SS: [r, function(e2) { + this.milliseconds = 10 * +e2; + }], SSS: [/\d{3}/, function(e2) { + this.milliseconds = +e2; + }], s: [i, f("seconds")], ss: [i, f("seconds")], m: [i, f("minutes")], mm: [i, f("minutes")], H: [i, f("hours")], h: [i, f("hours")], HH: [i, f("hours")], hh: [i, f("hours")], D: [i, f("day")], DD: [r, f("day")], Do: [o, function(e2) { + var t2 = s.ordinal, n2 = e2.match(/\d+/); + if (this.day = n2[0], t2) for (var r2 = 1; r2 <= 31; r2 += 1) t2(r2).replace(/\[|\]/g, "") === e2 && (this.day = r2); + }], w: [i, f("week")], ww: [r, f("week")], M: [i, f("month")], MM: [r, f("month")], MMM: [o, function(e2) { + var t2 = u("months"), n2 = (u("monthsShort") || t2.map((function(e3) { + return e3.slice(0, 3); + }))).indexOf(e2) + 1; + if (n2 < 1) throw new Error(); + this.month = n2 % 12 || n2; + }], MMMM: [o, function(e2) { + var t2 = u("months").indexOf(e2) + 1; + if (t2 < 1) throw new Error(); + this.month = t2 % 12 || t2; + }], Y: [/[+-]?\d+/, f("year")], YY: [r, function(e2) { + this.year = a(e2); + }], YYYY: [/\d{4}/, f("year")], Z: h, ZZ: h }; + function l2(n2) { + var r2, i2; + r2 = n2, i2 = s && s.formats; + for (var o2 = (n2 = r2.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(t2, n3, r3) { + var o3 = r3 && r3.toUpperCase(); + return n3 || i2[r3] || e[r3] || i2[o3].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(e2, t3, n4) { + return t3 || n4.slice(1); + })); + }))).match(t), a2 = o2.length, f2 = 0; f2 < a2; f2 += 1) { + var h2 = o2[f2], u2 = c[h2], d2 = u2 && u2[0], l3 = u2 && u2[1]; + o2[f2] = l3 ? { regex: d2, parser: l3 } : h2.replace(/^\[|\]$/g, ""); + } + return function(e2) { + for (var t2 = {}, n3 = 0, r3 = 0; n3 < a2; n3 += 1) { + var i3 = o2[n3]; + if ("string" == typeof i3) r3 += i3.length; + else { + var s2 = i3.regex, f3 = i3.parser, h3 = e2.slice(r3), u3 = s2.exec(h3)[0]; + f3.call(t2, u3), e2 = e2.replace(u3, ""); + } + } + return (function(e3) { + var t3 = e3.afternoon; + if (void 0 !== t3) { + var n4 = e3.hours; + t3 ? n4 < 12 && (e3.hours += 12) : 12 === n4 && (e3.hours = 0), delete e3.afternoon; + } + })(t2), t2; + }; + } + return function(e2, t2, n2) { + n2.p.customParseFormat = true, e2 && e2.parseTwoDigitYear && (a = e2.parseTwoDigitYear); + var r2 = t2.prototype, i2 = r2.parse; + r2.parse = function(e3) { + var t3 = e3.date, r3 = e3.utc, o2 = e3.args; + this.$u = r3; + var a2 = o2[1]; + if ("string" == typeof a2) { + var f2 = true === o2[2], h2 = true === o2[3], u2 = f2 || h2, d2 = o2[2]; + h2 && (d2 = o2[2]), s = this.$locale(), !f2 && d2 && (s = n2.Ls[d2]), this.$d = (function(e4, t4, n3, r4) { + try { + if (["x", "X"].indexOf(t4) > -1) return new Date(("X" === t4 ? 1e3 : 1) * e4); + var i3 = l2(t4)(e4), o3 = i3.year, s2 = i3.month, a3 = i3.day, f3 = i3.hours, h3 = i3.minutes, u3 = i3.seconds, d3 = i3.milliseconds, c3 = i3.zone, m2 = i3.week, M2 = /* @__PURE__ */ new Date(), Y = a3 || (o3 || s2 ? 1 : M2.getDate()), p = o3 || M2.getFullYear(), v = 0; + o3 && !s2 || (v = s2 > 0 ? s2 - 1 : M2.getMonth()); + var D, w = f3 || 0, g = h3 || 0, y = u3 || 0, L = d3 || 0; + return c3 ? new Date(Date.UTC(p, v, Y, w, g, y, L + 60 * c3.offset * 1e3)) : n3 ? new Date(Date.UTC(p, v, Y, w, g, y, L)) : (D = new Date(p, v, Y, w, g, y, L), m2 && (D = r4(D).week(m2).toDate()), D); + } catch (e5) { + return /* @__PURE__ */ new Date(""); + } + })(t3, a2, r3, n2), this.init(), d2 && true !== d2 && (this.$L = this.locale(d2).$L), u2 && t3 != this.format(a2) && (this.$d = /* @__PURE__ */ new Date("")), s = {}; + } else if (a2 instanceof Array) for (var c2 = a2.length, m = 1; m <= c2; m += 1) { + o2[1] = a2[m - 1]; + var M = n2.apply(this, o2); + if (M.isValid()) { + this.$d = M.$d, this.$L = M.$L, this.init(); + break; + } + m === c2 && (this.$d = /* @__PURE__ */ new Date("")); + } + else i2.call(this, e3); + }; + }; + })); + } +}); + +// ../../node_modules/.pnpm/dayjs@1.11.23/node_modules/dayjs/plugin/utc.js +var require_utc = __commonJS({ + "../../node_modules/.pnpm/dayjs@1.11.23/node_modules/dayjs/plugin/utc.js"(exports2, module2) { + !(function(t, i) { + "object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = i() : "function" == typeof define && define.amd ? define(i) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs_plugin_utc = i(); + })(exports2, (function() { + "use strict"; + var t = "minute", i = /[+-]\d\d(?::?\d\d)?/g, e = /([+-]|\d\d)/g; + return function(s, f, n) { + var u = f.prototype; + n.utc = function(t2) { + var i2 = { date: t2, utc: true, args: arguments }; + return new f(i2); + }, u.utc = function(i2) { + var e2 = n(this.toDate(), { locale: this.$L, utc: true }); + return i2 ? e2.add(this.utcOffset(), t) : e2; + }, u.local = function() { + return n(this.toDate(), { locale: this.$L, utc: false }); + }; + var r = u.parse; + u.parse = function(t2) { + t2.utc && (this.$u = true), this.$utils().u(t2.$offset) || (this.$offset = t2.$offset), r.call(this, t2); + }; + var o = u.init; + u.init = function() { + if (this.$u) { + var t2 = this.$d; + this.$y = t2.getUTCFullYear(), this.$M = t2.getUTCMonth(), this.$D = t2.getUTCDate(), this.$W = t2.getUTCDay(), this.$H = t2.getUTCHours(), this.$m = t2.getUTCMinutes(), this.$s = t2.getUTCSeconds(), this.$ms = t2.getUTCMilliseconds(); + } else o.call(this); + }; + var a = u.utcOffset; + u.utcOffset = function(s2, f2) { + var n2 = this.$utils().u; + if (n2(s2)) return this.$u ? 0 : n2(this.$offset) ? a.call(this) : this.$offset; + if ("string" == typeof s2 && (s2 = (function(t2) { + void 0 === t2 && (t2 = ""); + var s3 = t2.match(i); + if (!s3) return null; + var f3 = ("" + s3[0]).match(e) || ["-", 0, 0], n3 = f3[0], u3 = 60 * +f3[1] + +f3[2]; + return 0 === u3 ? 0 : "+" === n3 ? u3 : -u3; + })(s2), null === s2)) return this; + var u2 = Math.abs(s2) <= 16 ? 60 * s2 : s2; + if (0 === u2) return this.utc(f2); + var r2 = this.clone(); + if (f2) return r2.$offset = u2, r2.$u = false, r2; + var o2 = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset(); + return (r2 = this.local().add(u2 + o2, t)).$offset = u2, r2.$x.$localOffset = o2, r2; + }; + var h = u.format; + u.format = function(t2) { + var i2 = t2 || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : ""); + return h.call(this, i2); + }, u.valueOf = function() { + var t2 = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset()); + return this.$d.valueOf() - 6e4 * t2; + }, u.isUTC = function() { + return !!this.$u; + }, u.toISOString = function() { + return this.toDate().toISOString(); + }, u.toString = function() { + return this.toDate().toUTCString(); + }; + var l2 = u.toDate; + u.toDate = function(t2) { + return "s" === t2 && this.$offset ? n(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : l2.call(this); + }; + var c = u.diff; + u.diff = function(t2, i2, e2) { + if (t2 && this.$u === t2.$u) return c.call(this, t2, i2, e2); + var s2 = this.local(), f2 = n(t2).local(); + return c.call(s2, f2, i2, e2); + }; + }; + })); + } +}); + +// ../../node_modules/.pnpm/dayjs@1.11.23/node_modules/dayjs/dayjs.min.js +var require_dayjs_min = __commonJS({ + "../../node_modules/.pnpm/dayjs@1.11.23/node_modules/dayjs/dayjs.min.js"(exports2, module2) { + !(function(t, e) { + "object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = e() : "function" == typeof define && define.amd ? define(e) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs = e(); + })(exports2, (function() { + "use strict"; + var t = 1e3, e = 6e4, n = 36e5, r = "millisecond", i = "second", s = "minute", u = "hour", a = "day", o = "week", c = "month", f = "quarter", h = "year", d = "date", l2 = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t2) { + var e2 = ["th", "st", "nd", "rd"], n2 = t2 % 100; + return "[" + t2 + (e2[(n2 - 20) % 10] || e2[n2] || e2[0]) + "]"; + } }, m = function(t2, e2, n2) { + var r2 = String(t2); + return !r2 || r2.length >= e2 ? t2 : "" + Array(e2 + 1 - r2.length).join(n2) + t2; + }, v = { s: m, z: function(t2) { + var e2 = -t2.utcOffset(), n2 = Math.abs(e2), r2 = Math.floor(n2 / 60), i2 = n2 % 60; + return (e2 <= 0 ? "+" : "-") + m(r2, 2, "0") + ":" + m(i2, 2, "0"); + }, m: function t2(e2, n2) { + if (e2.date() < n2.date()) return -t2(n2, e2); + var r2 = 12 * (n2.year() - e2.year()) + (n2.month() - e2.month()), i2 = e2.clone().add(r2, c), s2 = n2 - i2 < 0, u2 = e2.clone().add(r2 + (s2 ? -1 : 1), c); + return +(-(r2 + (n2 - i2) / (s2 ? i2 - u2 : u2 - i2)) || 0); + }, a: function(t2) { + return t2 < 0 ? Math.ceil(t2) || 0 : Math.floor(t2); + }, p: function(t2) { + return { M: c, y: h, w: o, d: a, D: d, h: u, m: s, s: i, ms: r, Q: f }[t2] || String(t2 || "").toLowerCase().replace(/s$/, ""); + }, u: function(t2) { + return void 0 === t2; + } }, g = "en", D = {}; + D[g] = M; + var p = "$isDayjsObject", S = function(t2) { + return t2 instanceof _2 || !(!t2 || !t2[p]); + }, w = function t2(e2, n2, r2) { + var i2; + if (!e2) return g; + if ("string" == typeof e2) { + var s2 = e2.toLowerCase(); + D[s2] && (i2 = s2), n2 && (D[s2] = n2, i2 = s2); + var u2 = e2.split("-"); + if (!i2 && u2.length > 1) return t2(u2[0]); + } else { + var a2 = e2.name; + D[a2] = e2, i2 = a2; + } + return !r2 && i2 && (g = i2), i2 || !r2 && g; + }, O = function(t2, e2) { + if (S(t2)) return t2.clone(); + var n2 = "object" == typeof e2 ? e2 : {}; + return n2.date = t2, n2.args = arguments, new _2(n2); + }, b = v; + b.l = w, b.i = S, b.w = function(t2, e2) { + return O(t2, { locale: e2.$L, utc: e2.$u, x: e2.$x, $offset: e2.$offset }); + }; + var _2 = (function() { + function M2(t2) { + this.$L = w(t2.locale, null, true), this.parse(t2), this.$x = this.$x || t2.x || {}, this[p] = true; + } + var m2 = M2.prototype; + return m2.parse = function(t2) { + this.$d = (function(t3) { + var e2 = t3.date, n2 = t3.utc; + if (null === e2) return /* @__PURE__ */ new Date(NaN); + if (b.u(e2)) return /* @__PURE__ */ new Date(); + if (e2 instanceof Date) return new Date(e2); + if ("string" == typeof e2 && !/Z$/i.test(e2)) { + var r2 = e2.match($); + if (r2) { + var i2 = r2[2] - 1 || 0, s2 = (r2[7] || "0").substring(0, 3); + return n2 ? new Date(Date.UTC(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2)) : new Date(r2[1], i2, r2[3] || 1, r2[4] || 0, r2[5] || 0, r2[6] || 0, s2); + } + } + return new Date(e2); + })(t2), this.init(); + }, m2.init = function() { + var t2 = this.$d; + this.$y = t2.getFullYear(), this.$M = t2.getMonth(), this.$D = t2.getDate(), this.$W = t2.getDay(), this.$H = t2.getHours(), this.$m = t2.getMinutes(), this.$s = t2.getSeconds(), this.$ms = t2.getMilliseconds(); + }, m2.$utils = function() { + return b; + }, m2.isValid = function() { + return !(this.$d.toString() === l2); + }, m2.isSame = function(t2, e2) { + var n2 = O(t2); + return this.startOf(e2) <= n2 && n2 <= this.endOf(e2); + }, m2.isAfter = function(t2, e2) { + return O(t2) < this.startOf(e2); + }, m2.isBefore = function(t2, e2) { + return this.endOf(e2) < O(t2); + }, m2.$g = function(t2, e2, n2) { + return b.u(t2) ? this[e2] : this.set(n2, t2); + }, m2.unix = function() { + return Math.floor(this.valueOf() / 1e3); + }, m2.valueOf = function() { + return this.$d.getTime(); + }, m2.startOf = function(t2, e2) { + var n2 = this, r2 = !!b.u(e2) || e2, f2 = b.p(t2), l3 = function(t3, e3) { + var i2 = b.w(n2.$u ? Date.UTC(n2.$y, e3, t3) : new Date(n2.$y, e3, t3), n2); + return r2 ? i2 : i2.endOf(a); + }, $2 = function(t3, e3) { + return b.w(n2.toDate()[t3].apply(n2.toDate("s"), (r2 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e3)), n2); + }, y2 = this.$W, M3 = this.$M, m3 = this.$D, v2 = "set" + (this.$u ? "UTC" : ""); + switch (f2) { + case h: + return r2 ? l3(1, 0) : l3(31, 11); + case c: + return r2 ? l3(1, M3) : l3(0, M3 + 1); + case o: + var g2 = this.$locale().weekStart || 0, D2 = (y2 < g2 ? y2 + 7 : y2) - g2; + return l3(r2 ? m3 - D2 : m3 + (6 - D2), M3); + case a: + case d: + return $2(v2 + "Hours", 0); + case u: + return $2(v2 + "Minutes", 1); + case s: + return $2(v2 + "Seconds", 2); + case i: + return $2(v2 + "Milliseconds", 3); + default: + return this.clone(); + } + }, m2.endOf = function(t2) { + return this.startOf(t2, false); + }, m2.$set = function(t2, e2) { + var n2, o2 = b.p(t2), f2 = "set" + (this.$u ? "UTC" : ""), l3 = (n2 = {}, n2[a] = f2 + "Date", n2[d] = f2 + "Date", n2[c] = f2 + "Month", n2[h] = f2 + "FullYear", n2[u] = f2 + "Hours", n2[s] = f2 + "Minutes", n2[i] = f2 + "Seconds", n2[r] = f2 + "Milliseconds", n2)[o2], $2 = o2 === a ? this.$D + (e2 - this.$W) : e2; + if (o2 === c || o2 === h) { + var y2 = this.clone().set(d, 1); + y2.$d[l3]($2), y2.init(), this.$d = y2.set(d, Math.min(this.$D, y2.daysInMonth())).$d; + } else l3 && this.$d[l3]($2); + return this.init(), this; + }, m2.set = function(t2, e2) { + return this.clone().$set(t2, e2); + }, m2.get = function(t2) { + return this[b.p(t2)](); + }, m2.add = function(r2, f2) { + var d2, l3 = this; + r2 = Number(r2); + var $2 = b.p(f2), y2 = function(t2) { + var e2 = O(l3); + return b.w(e2.date(e2.date() + Math.round(t2 * r2)), l3); + }; + if ($2 === c) return this.set(c, this.$M + r2); + if ($2 === h) return this.set(h, this.$y + r2); + if ($2 === a) return y2(1); + if ($2 === o) return y2(7); + var M3 = (d2 = {}, d2[s] = e, d2[u] = n, d2[i] = t, d2)[$2] || 1, m3 = this.$d.getTime() + r2 * M3; + return b.w(m3, this); + }, m2.subtract = function(t2, e2) { + return this.add(-1 * t2, e2); + }, m2.format = function(t2) { + var e2 = this, n2 = this.$locale(); + if (!this.isValid()) return n2.invalidDate || l2; + var r2 = t2 || "YYYY-MM-DDTHH:mm:ssZ", i2 = b.z(this), s2 = this.$H, u2 = this.$m, a2 = this.$M, o2 = n2.weekdays, c2 = n2.months, f2 = n2.meridiem, h2 = function(t3, n3, i3, s3) { + return t3 && (t3[n3] || t3(e2, r2)) || i3[n3].slice(0, s3); + }, d2 = function(t3) { + return b.s(s2 % 12 || 12, t3, "0"); + }, $2 = f2 || function(t3, e3, n3) { + var r3 = t3 < 12 ? "AM" : "PM"; + return n3 ? r3.toLowerCase() : r3; + }; + return r2.replace(y, (function(t3, r3) { + return r3 || (function(t4) { + switch (t4) { + case "YY": + return String(e2.$y).slice(-2); + case "YYYY": + return b.s(e2.$y, 4, "0"); + case "M": + return a2 + 1; + case "MM": + return b.s(a2 + 1, 2, "0"); + case "MMM": + return h2(n2.monthsShort, a2, c2, 3); + case "MMMM": + return h2(c2, a2); + case "D": + return e2.$D; + case "DD": + return b.s(e2.$D, 2, "0"); + case "d": + return String(e2.$W); + case "dd": + return h2(n2.weekdaysMin, e2.$W, o2, 2); + case "ddd": + return h2(n2.weekdaysShort, e2.$W, o2, 3); + case "dddd": + return o2[e2.$W]; + case "H": + return String(s2); + case "HH": + return b.s(s2, 2, "0"); + case "h": + return d2(1); + case "hh": + return d2(2); + case "a": + return $2(s2, u2, true); + case "A": + return $2(s2, u2, false); + case "m": + return String(u2); + case "mm": + return b.s(u2, 2, "0"); + case "s": + return String(e2.$s); + case "ss": + return b.s(e2.$s, 2, "0"); + case "SSS": + return b.s(e2.$ms, 3, "0"); + case "Z": + return i2; + } + return null; + })(t3) || i2.replace(":", ""); + })); + }, m2.utcOffset = function() { + return 15 * -Math.round(this.$d.getTimezoneOffset() / 15); + }, m2.diff = function(r2, d2, l3) { + var $2, y2 = this, M3 = b.p(d2), m3 = O(r2), v2 = (m3.utcOffset() - this.utcOffset()) * e, g2 = this - m3, D2 = function() { + return b.m(y2, m3); + }; + switch (M3) { + case h: + $2 = D2() / 12; + break; + case c: + $2 = D2(); + break; + case f: + $2 = D2() / 3; + break; + case o: + $2 = (g2 - v2) / 6048e5; + break; + case a: + $2 = (g2 - v2) / 864e5; + break; + case u: + $2 = g2 / n; + break; + case s: + $2 = g2 / e; + break; + case i: + $2 = g2 / t; + break; + default: + $2 = g2; + } + return l3 ? $2 : b.a($2); + }, m2.daysInMonth = function() { + return this.endOf(c).$D; + }, m2.$locale = function() { + return D[this.$L]; + }, m2.locale = function(t2, e2) { + if (!t2) return this.$L; + var n2 = this.clone(), r2 = w(t2, e2, true); + return r2 && (n2.$L = r2), n2; + }, m2.clone = function() { + return b.w(this.$d, this); + }, m2.toDate = function() { + return new Date(this.valueOf()); + }, m2.toJSON = function() { + return this.isValid() ? this.toISOString() : null; + }, m2.toISOString = function() { + return this.$d.toISOString(); + }, m2.toString = function() { + return this.$d.toUTCString(); + }, M2; + })(), Y = _2.prototype; + return O.prototype = Y, [["$ms", r], ["$s", i], ["$m", s], ["$H", u], ["$W", a], ["$M", c], ["$y", h], ["$D", d]].forEach((function(t2) { + Y[t2[1]] = function(e2) { + return this.$g(e2, t2[0], t2[1]); + }; + })), O.extend = function(t2, e2) { + return t2.$i || (t2(e2, _2, O), t2.$i = true), O; + }, O.locale = w, O.isDayjs = S, O.unix = function(t2) { + return O(1e3 * t2); + }, O.en = D[g], O.Ls = D, O.p = {}, O; + })); + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/csv/csv.js +var require_csv = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/csv/csv.js"(exports2, module2) { + var fs = require("fs"); + var fastCsv = require_src4(); + var customParseFormat = require_customParseFormat(); + var utc = require_utc(); + var dayjs = require_dayjs_min().extend(customParseFormat).extend(utc); + var StreamBuf = require_stream_buf(); + var { + fs: { exists } + } = require_utils13(); + var SpecialValues = { + true: true, + false: false, + "#N/A": { error: "#N/A" }, + "#REF!": { error: "#REF!" }, + "#NAME?": { error: "#NAME?" }, + "#DIV/0!": { error: "#DIV/0!" }, + "#NULL!": { error: "#NULL!" }, + "#VALUE!": { error: "#VALUE!" }, + "#NUM!": { error: "#NUM!" } + }; + var CSV = class { + constructor(workbook) { + this.workbook = workbook; + this.worksheet = null; + } + async readFile(filename, options) { + options = options || {}; + if (!await exists(filename)) { + throw new Error(`File not found: ${filename}`); + } + const stream = fs.createReadStream(filename); + const worksheet = await this.read(stream, options); + stream.close(); + return worksheet; + } + read(stream, options) { + options = options || {}; + return new Promise((resolve, reject) => { + const worksheet = this.workbook.addWorksheet(options.sheetName); + const dateFormats = options.dateFormats || [ + "YYYY-MM-DD[T]HH:mm:ssZ", + "YYYY-MM-DD[T]HH:mm:ss", + "MM-DD-YYYY", + "YYYY-MM-DD" + ]; + const map = options.map || function(datum) { + if (datum === "") { + return null; + } + const datumNumber = Number(datum); + if (!Number.isNaN(datumNumber) && datumNumber !== Infinity) { + return datumNumber; + } + const dt = dateFormats.reduce((matchingDate, currentDateFormat) => { + if (matchingDate) { + return matchingDate; + } + const dayjsObj = dayjs(datum, currentDateFormat, true); + if (dayjsObj.isValid()) { + return dayjsObj; + } + return null; + }, null); + if (dt) { + return new Date(dt.valueOf()); + } + const special = SpecialValues[datum]; + if (special !== void 0) { + return special; + } + return datum; + }; + const csvStream = fastCsv.parse(options.parserOptions).on("data", (data) => { + worksheet.addRow(data.map(map)); + }).on("end", () => { + csvStream.emit("worksheet", worksheet); + }); + csvStream.on("worksheet", resolve).on("error", reject); + stream.pipe(csvStream); + }); + } + /** + * @deprecated since version 4.0. You should use `CSV#read` instead. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md + */ + createInputStream() { + throw new Error( + "`CSV#createInputStream` is deprecated. You should use `CSV#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md" + ); + } + write(stream, options) { + return new Promise((resolve, reject) => { + options = options || {}; + const worksheet = this.workbook.getWorksheet(options.sheetName || options.sheetId); + const csvStream = fastCsv.format(options.formatterOptions); + stream.on("finish", () => { + resolve(); + }); + csvStream.on("error", reject); + csvStream.pipe(stream); + const { dateFormat, dateUTC } = options; + const map = options.map || ((value) => { + if (value) { + if (value.text || value.hyperlink) { + return value.hyperlink || value.text || ""; + } + if (value.formula || value.result) { + return value.result || ""; + } + if (value instanceof Date) { + if (dateFormat) { + return dateUTC ? dayjs.utc(value).format(dateFormat) : dayjs(value).format(dateFormat); + } + return dateUTC ? dayjs.utc(value).format() : dayjs(value).format(); + } + if (value.error) { + return value.error; + } + if (typeof value === "object") { + return JSON.stringify(value); + } + } + return value; + }); + const includeEmptyRows = options.includeEmptyRows === void 0 || options.includeEmptyRows; + let lastRow = 1; + if (worksheet) { + worksheet.eachRow((row, rowNumber) => { + if (includeEmptyRows) { + while (lastRow++ < rowNumber - 1) { + csvStream.write([]); + } + } + const { values } = row; + values.shift(); + csvStream.write(values.map(map)); + lastRow = rowNumber; + }); + } + csvStream.end(); + }); + } + writeFile(filename, options) { + options = options || {}; + const streamOptions = { + encoding: options.encoding || "utf8" + }; + const stream = fs.createWriteStream(filename, streamOptions); + return this.write(stream, options); + } + async writeBuffer(options) { + const stream = new StreamBuf(); + await this.write(stream, options); + return stream.read(); + } + }; + module2.exports = CSV; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/workbook.js +var require_workbook = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/workbook.js"(exports2, module2) { + "use strict"; + var Worksheet = require_worksheet(); + var DefinedNames = require_defined_names(); + var XLSX = require_xlsx(); + var CSV = require_csv(); + var Workbook = class { + constructor() { + this.category = ""; + this.company = ""; + this.created = /* @__PURE__ */ new Date(); + this.description = ""; + this.keywords = ""; + this.manager = ""; + this.modified = this.created; + this.properties = {}; + this.calcProperties = {}; + this._worksheets = []; + this.subject = ""; + this.title = ""; + this.views = []; + this.media = []; + this._definedNames = new DefinedNames(); + } + get xlsx() { + if (!this._xlsx) this._xlsx = new XLSX(this); + return this._xlsx; + } + get csv() { + if (!this._csv) this._csv = new CSV(this); + return this._csv; + } + get nextId() { + for (let i = 1; i < this._worksheets.length; i++) { + if (!this._worksheets[i]) { + return i; + } + } + return this._worksheets.length || 1; + } + addWorksheet(name, options) { + const id = this.nextId; + if (options) { + if (typeof options === "string") { + console.trace( + 'tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { argb: "rbg value" } }' + ); + options = { + properties: { + tabColor: { argb: options } + } + }; + } else if (options.argb || options.theme || options.indexed) { + console.trace( + "tabColor argument is now deprecated. Please use workbook.addWorksheet(name, {properties: { tabColor: { ... } }" + ); + options = { + properties: { + tabColor: options + } + }; + } + } + const lastOrderNo = this._worksheets.reduce((acc, ws) => (ws && ws.orderNo) > acc ? ws.orderNo : acc, 0); + const worksheetOptions = Object.assign({}, options, { + id, + name, + orderNo: lastOrderNo + 1, + workbook: this + }); + const worksheet = new Worksheet(worksheetOptions); + this._worksheets[id] = worksheet; + return worksheet; + } + removeWorksheetEx(worksheet) { + delete this._worksheets[worksheet.id]; + } + removeWorksheet(id) { + const worksheet = this.getWorksheet(id); + if (worksheet) { + worksheet.destroy(); + } + } + getWorksheet(id) { + if (id === void 0) { + return this._worksheets.find(Boolean); + } + if (typeof id === "number") { + return this._worksheets[id]; + } + if (typeof id === "string") { + return this._worksheets.find((worksheet) => worksheet && worksheet.name === id); + } + return void 0; + } + get worksheets() { + return this._worksheets.slice(1).sort((a, b) => a.orderNo - b.orderNo).filter(Boolean); + } + eachSheet(iteratee) { + this.worksheets.forEach((sheet) => { + iteratee(sheet, sheet.id); + }); + } + get definedNames() { + return this._definedNames; + } + clearThemes() { + this._themes = void 0; + } + addImage(image) { + const id = this.media.length; + this.media.push(Object.assign({}, image, { type: "image" })); + return id; + } + getImage(id) { + return this.media[id]; + } + get model() { + return { + creator: this.creator || "Unknown", + lastModifiedBy: this.lastModifiedBy || "Unknown", + lastPrinted: this.lastPrinted, + created: this.created, + modified: this.modified, + properties: this.properties, + worksheets: this.worksheets.map((worksheet) => worksheet.model), + sheets: this.worksheets.map((ws) => ws.model).filter(Boolean), + definedNames: this._definedNames.model, + views: this.views, + company: this.company, + manager: this.manager, + title: this.title, + subject: this.subject, + keywords: this.keywords, + category: this.category, + description: this.description, + language: this.language, + revision: this.revision, + contentStatus: this.contentStatus, + themes: this._themes, + media: this.media, + calcProperties: this.calcProperties + }; + } + set model(value) { + this.creator = value.creator; + this.lastModifiedBy = value.lastModifiedBy; + this.lastPrinted = value.lastPrinted; + this.created = value.created; + this.modified = value.modified; + this.company = value.company; + this.manager = value.manager; + this.title = value.title; + this.subject = value.subject; + this.keywords = value.keywords; + this.category = value.category; + this.description = value.description; + this.language = value.language; + this.revision = value.revision; + this.contentStatus = value.contentStatus; + this.properties = value.properties; + this.calcProperties = value.calcProperties; + this._worksheets = []; + value.worksheets.forEach((worksheetModel) => { + const { id, name, state } = worksheetModel; + const orderNo = value.sheets && value.sheets.findIndex((ws) => ws.id === id); + const worksheet = this._worksheets[id] = new Worksheet({ + id, + name, + orderNo, + state, + workbook: this + }); + worksheet.model = worksheetModel; + }); + this._definedNames.model = value.definedNames; + this.views = value.views; + this._themes = value.themes; + this.media = value.media || []; + } + }; + module2.exports = Workbook; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/modelcontainer.js +var require_modelcontainer = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/doc/modelcontainer.js"(exports2, module2) { + "use strict"; + var XLSX = require_xlsx(); + var ModelContainer = class { + constructor(model) { + this.model = model; + } + get xlsx() { + if (!this._xlsx) { + this._xlsx = new XLSX(this); + } + return this._xlsx; + } + }; + module2.exports = ModelContainer; + } +}); + +// ../../node_modules/.pnpm/minimatch@5.1.9/node_modules/minimatch/lib/path.js +var require_path = __commonJS({ + "../../node_modules/.pnpm/minimatch@5.1.9/node_modules/minimatch/lib/path.js"(exports2, module2) { + var isWindows = typeof process === "object" && process && process.platform === "win32"; + module2.exports = isWindows ? { sep: "\\" } : { sep: "/" }; + } +}); + +// ../../node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js +var require_balanced_match = __commonJS({ + "../../node_modules/.pnpm/balanced-match@1.0.2/node_modules/balanced-match/index.js"(exports2, module2) { + "use strict"; + module2.exports = balanced; + function balanced(a, b, str) { + if (a instanceof RegExp) a = maybeMatch(a, str); + if (b instanceof RegExp) b = maybeMatch(b, str); + var r = range(a, b, str); + return r && { + start: r[0], + end: r[1], + pre: str.slice(0, r[0]), + body: str.slice(r[0] + a.length, r[1]), + post: str.slice(r[1] + b.length) + }; + } + function maybeMatch(reg, str) { + var m = str.match(reg); + return m ? m[0] : null; + } + balanced.range = range; + function range(a, b, str) { + var begs, beg, left, right, result; + var ai = str.indexOf(a); + var bi = str.indexOf(b, ai + 1); + var i = ai; + if (ai >= 0 && bi > 0) { + if (a === b) { + return [ai, bi]; + } + begs = []; + left = str.length; + while (i >= 0 && !result) { + if (i == ai) { + begs.push(i); + ai = str.indexOf(a, i + 1); + } else if (begs.length == 1) { + result = [begs.pop(), bi]; + } else { + beg = begs.pop(); + if (beg < left) { + left = beg; + right = bi; + } + bi = str.indexOf(b, i + 1); + } + i = ai < bi && ai >= 0 ? ai : bi; + } + if (begs.length) { + result = [left, right]; + } + } + return result; + } + } +}); + +// ../../node_modules/.pnpm/brace-expansion@2.1.4/node_modules/brace-expansion/index.js +var require_brace_expansion = __commonJS({ + "../../node_modules/.pnpm/brace-expansion@2.1.4/node_modules/brace-expansion/index.js"(exports2, module2) { + var balanced = require_balanced_match(); + module2.exports = expandTop; + var escSlash = "\0SLASH" + Math.random() + "\0"; + var escOpen = "\0OPEN" + Math.random() + "\0"; + var escClose = "\0CLOSE" + Math.random() + "\0"; + var escComma = "\0COMMA" + Math.random() + "\0"; + var escPeriod = "\0PERIOD" + Math.random() + "\0"; + var EXPANSION_MAX = 1e5; + var EXPANSION_MAX_LENGTH = 4e6; + function numeric(str) { + return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0); + } + function escapeBraces(str) { + return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); + } + function unescapeBraces(str) { + return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); + } + function parseCommaParts(str) { + if (!str) + return [""]; + var parts = []; + var m = balanced("{", "}", str); + if (!m) + return str.split(","); + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(","); + p[p.length - 1] += "{" + body + "}"; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length - 1] += postParts.shift(); + p.push.apply(p, postParts); + } + parts.push.apply(parts, p); + return parts; + } + function expandTop(str, options) { + if (!str) + return []; + options = options || {}; + var max = options.max == null ? EXPANSION_MAX : options.max; + var maxLength = options.maxLength == null ? EXPANSION_MAX_LENGTH : options.maxLength; + if (str.substr(0, 2) === "{}") { + str = "\\{\\}" + str.substr(2); + } + return expand(escapeBraces(str), max, maxLength, true).map(unescapeBraces); + } + function embrace(str) { + return "{" + str + "}"; + } + function isPadded(el) { + return /^-?0\d/.test(el); + } + function lte(i, y) { + return i <= y; + } + function gte(i, y) { + return i >= y; + } + function combine(acc, pre, values, max, maxLength, dropEmpties) { + var out = []; + var length = 0; + for (var a = 0; a < acc.length; a++) { + for (var v = 0; v < values.length; v++) { + if (out.length >= max) return out; + var expansion = acc[a] + pre + values[v]; + if (dropEmpties && !expansion) continue; + if (length + expansion.length > maxLength) return out; + out.push(expansion); + length += expansion.length; + } + } + return out; + } + function expandSequence(body, isAlphaSequence, max, maxLength) { + var n = body.split(/\.\./); + var N = []; + if (n[0] === void 0 || n[1] === void 0) { + return N; + } + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length); + var incr = n.length === 3 && n[2] !== void 0 ? Math.max(Math.abs(numeric(n[2])), 1) : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + var length = 0; + for (var i = x; test(i, y) && N.length < max; i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === "\\") { + c = ""; + } + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join("0"); + if (i < 0) { + c = "-" + z + c.slice(1); + } else { + c = z + c; + } + } + } + } + if (length + c.length > maxLength) break; + N.push(c); + length += c.length; + } + return N; + } + function expand(str, max, maxLength, isTop) { + var acc = [""]; + var dropEmpties = false; + var firstGroup = true; + for (; ; ) { + const m = balanced("{", "}", str); + if (!m) { + return combine(acc, str, [""], max, maxLength, dropEmpties); + } + const pre = m.pre; + if (/\$$/.test(pre)) { + acc = combine( + acc, + pre + "{" + m.body + "}", + [""], + max, + maxLength, + dropEmpties && !m.post.length + ); + firstGroup = false; + if (!m.post.length) break; + str = m.post; + continue; + } + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(",") >= 0; + if (!isSequence && !isOptions) { + if (m.post.match(/,(?!,).*\}/)) { + str = m.pre + "{" + m.body + escClose + m.post; + isTop = true; + continue; + } + return combine( + acc, + pre + "{" + m.body + "}" + m.post, + [""], + max, + maxLength, + dropEmpties + ); + } + if (firstGroup) { + dropEmpties = isTop && !isSequence; + firstGroup = false; + } + var values; + if (isSequence) { + values = expandSequence(m.body, isAlphaSequence, max, maxLength); + } else { + var n = parseCommaParts(m.body); + if (n.length === 1 && n[0] !== void 0) { + n = expand(n[0], max, maxLength, false).map(embrace); + if (n.length === 1) { + acc = combine( + acc, + pre + n[0], + [""], + max, + maxLength, + dropEmpties && !m.post.length + ); + if (!m.post.length) break; + str = m.post; + continue; + } + } + var dropsEmpties = dropEmpties && !m.post.length && !pre; + for (var d = 0; dropsEmpties && d < acc.length; d++) { + if (acc[d]) { + dropsEmpties = false; + } + } + values = []; + var valuesLength = 0; + outer: for (var j = 0; j < n.length; j++) { + var expanded = expand(n[j], max, maxLength, false); + for (var k = 0; k < expanded.length; k++) { + var v = expanded[k]; + if (dropsEmpties && !v) continue; + if (values.length >= max || valuesLength + v.length > maxLength) { + break outer; + } + values.push(v); + valuesLength += v.length; + } + } + } + acc = combine(acc, pre, values, max, maxLength, dropEmpties && !m.post.length); + if (!m.post.length) break; + str = m.post; + } + return acc; + } + } +}); + +// ../../node_modules/.pnpm/minimatch@5.1.9/node_modules/minimatch/minimatch.js +var require_minimatch = __commonJS({ + "../../node_modules/.pnpm/minimatch@5.1.9/node_modules/minimatch/minimatch.js"(exports2, module2) { + var minimatch = module2.exports = (p, pattern, options = {}) => { + assertValidPattern(pattern); + if (!options.nocomment && pattern.charAt(0) === "#") { + return false; + } + return new Minimatch(pattern, options).match(p); + }; + module2.exports = minimatch; + var path = require_path(); + minimatch.sep = path.sep; + var GLOBSTAR = Symbol("globstar **"); + minimatch.GLOBSTAR = GLOBSTAR; + var expand = require_brace_expansion(); + var plTypes = { + "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, + "?": { open: "(?:", close: ")?" }, + "+": { open: "(?:", close: ")+" }, + "*": { open: "(?:", close: ")*" }, + "@": { open: "(?:", close: ")" } + }; + var qmark = "[^/]"; + var star = qmark + "*?"; + var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; + var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; + var charSet = (s) => s.split("").reduce((set, c) => { + set[c] = true; + return set; + }, {}); + var reSpecials = charSet("().*{}+?[]^$\\!"); + var addPatternStartSet = charSet("[.("); + var slashSplit = /\/+/; + minimatch.filter = (pattern, options = {}) => (p, i, list) => minimatch(p, pattern, options); + var ext = (a, b = {}) => { + const t = {}; + Object.keys(a).forEach((k) => t[k] = a[k]); + Object.keys(b).forEach((k) => t[k] = b[k]); + return t; + }; + minimatch.defaults = (def) => { + if (!def || typeof def !== "object" || !Object.keys(def).length) { + return minimatch; + } + const orig = minimatch; + const m = (p, pattern, options) => orig(p, pattern, ext(def, options)); + m.Minimatch = class Minimatch extends orig.Minimatch { + constructor(pattern, options) { + super(pattern, ext(def, options)); + } + }; + m.Minimatch.defaults = (options) => orig.defaults(ext(def, options)).Minimatch; + m.filter = (pattern, options) => orig.filter(pattern, ext(def, options)); + m.defaults = (options) => orig.defaults(ext(def, options)); + m.makeRe = (pattern, options) => orig.makeRe(pattern, ext(def, options)); + m.braceExpand = (pattern, options) => orig.braceExpand(pattern, ext(def, options)); + m.match = (list, pattern, options) => orig.match(list, pattern, ext(def, options)); + return m; + }; + minimatch.braceExpand = (pattern, options) => braceExpand(pattern, options); + var braceExpand = (pattern, options = {}) => { + assertValidPattern(pattern); + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + return [pattern]; + } + return expand(pattern); + }; + var MAX_PATTERN_LENGTH = 1024 * 64; + var assertValidPattern = (pattern) => { + if (typeof pattern !== "string") { + throw new TypeError("invalid pattern"); + } + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError("pattern is too long"); + } + }; + var SUBPARSE = Symbol("subparse"); + minimatch.makeRe = (pattern, options) => new Minimatch(pattern, options || {}).makeRe(); + minimatch.match = (list, pattern, options = {}) => { + const mm = new Minimatch(pattern, options); + list = list.filter((f) => mm.match(f)); + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + return list; + }; + var globUnescape = (s) => s.replace(/\\(.)/g, "$1"); + var charUnescape = (s) => s.replace(/\\([^-\]])/g, "$1"); + var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + var braExpEscape = (s) => s.replace(/[[\]\\]/g, "\\$&"); + var Minimatch = class { + constructor(pattern, options) { + assertValidPattern(pattern); + if (!options) options = {}; + this.options = options; + this.maxGlobstarRecursion = options.maxGlobstarRecursion !== void 0 ? options.maxGlobstarRecursion : 200; + this.set = []; + this.pattern = pattern; + this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options.allowWindowsEscape === false; + if (this.windowsPathsNoEscape) { + this.pattern = this.pattern.replace(/\\/g, "/"); + } + this.regexp = null; + this.negate = false; + this.comment = false; + this.empty = false; + this.partial = !!options.partial; + this.make(); + } + debug() { + } + make() { + const pattern = this.pattern; + const options = this.options; + if (!options.nocomment && pattern.charAt(0) === "#") { + this.comment = true; + return; + } + if (!pattern) { + this.empty = true; + return; + } + this.parseNegate(); + let set = this.globSet = this.braceExpand(); + if (options.debug) this.debug = (...args) => console.error(...args); + this.debug(this.pattern, set); + set = this.globParts = set.map((s) => s.split(slashSplit)); + this.debug(this.pattern, set); + set = set.map((s, si, set2) => s.map(this.parse, this)); + this.debug(this.pattern, set); + set = set.filter((s) => s.indexOf(false) === -1); + this.debug(this.pattern, set); + this.set = set; + } + parseNegate() { + if (this.options.nonegate) return; + const pattern = this.pattern; + let negate = false; + let negateOffset = 0; + for (let i = 0; i < pattern.length && pattern.charAt(i) === "!"; i++) { + negate = !negate; + negateOffset++; + } + if (negateOffset) this.pattern = pattern.slice(negateOffset); + this.negate = negate; + } + // set partial to true to test if, for example, + // "/a/b" matches the start of "/*/b/*/d" + // Partial means, if you run out of file before you run + // out of pattern, then that's fine, as long as all + // the parts match. + matchOne(file2, pattern, partial) { + if (pattern.indexOf(GLOBSTAR) !== -1) { + return this._matchGlobstar(file2, pattern, partial, 0, 0); + } + return this._matchOne(file2, pattern, partial, 0, 0); + } + _matchGlobstar(file2, pattern, partial, fileIndex, patternIndex) { + let firstgs = -1; + for (let i = patternIndex; i < pattern.length; i++) { + if (pattern[i] === GLOBSTAR) { + firstgs = i; + break; + } + } + let lastgs = -1; + for (let i = pattern.length - 1; i >= 0; i--) { + if (pattern[i] === GLOBSTAR) { + lastgs = i; + break; + } + } + const head = pattern.slice(patternIndex, firstgs); + const body = partial ? pattern.slice(firstgs + 1) : pattern.slice(firstgs + 1, lastgs); + const tail = partial ? [] : pattern.slice(lastgs + 1); + if (head.length) { + const fileHead = file2.slice(fileIndex, fileIndex + head.length); + if (!this._matchOne(fileHead, head, partial, 0, 0)) { + return false; + } + fileIndex += head.length; + } + let fileTailMatch = 0; + if (tail.length) { + if (tail.length + fileIndex > file2.length) return false; + const tailStart = file2.length - tail.length; + if (this._matchOne(file2, tail, partial, tailStart, 0)) { + fileTailMatch = tail.length; + } else { + if (file2[file2.length - 1] !== "" || fileIndex + tail.length === file2.length) { + return false; + } + if (!this._matchOne(file2, tail, partial, tailStart - 1, 0)) { + return false; + } + fileTailMatch = tail.length + 1; + } + } + if (!body.length) { + let sawSome = !!fileTailMatch; + for (let i = fileIndex; i < file2.length - fileTailMatch; i++) { + const f = String(file2[i]); + sawSome = true; + if (f === "." || f === ".." || !this.options.dot && f.charAt(0) === ".") { + return false; + } + } + return partial || sawSome; + } + const bodySegments = [[[], 0]]; + let currentBody = bodySegments[0]; + let nonGsParts = 0; + const nonGsPartsSums = [0]; + for (const b of body) { + if (b === GLOBSTAR) { + nonGsPartsSums.push(nonGsParts); + currentBody = [[], 0]; + bodySegments.push(currentBody); + } else { + currentBody[0].push(b); + nonGsParts++; + } + } + let idx = bodySegments.length - 1; + const fileLength = file2.length - fileTailMatch; + for (const b of bodySegments) { + b[1] = fileLength - (nonGsPartsSums[idx--] + b[0].length); + } + return !!this._matchGlobStarBodySections( + file2, + bodySegments, + fileIndex, + 0, + partial, + 0, + !!fileTailMatch + ); + } + // return false for "nope, not matching" + // return null for "not matching, cannot keep trying" + _matchGlobStarBodySections(file2, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) { + const bs = bodySegments[bodyIndex]; + if (!bs) { + for (let i = fileIndex; i < file2.length; i++) { + sawTail = true; + const f = file2[i]; + if (f === "." || f === ".." || !this.options.dot && f.charAt(0) === ".") { + return false; + } + } + return sawTail; + } + const [body, after] = bs; + while (fileIndex <= after) { + const m = this._matchOne( + file2.slice(0, fileIndex + body.length), + body, + partial, + fileIndex, + 0 + ); + if (m && globStarDepth < this.maxGlobstarRecursion) { + const sub = this._matchGlobStarBodySections( + file2, + bodySegments, + fileIndex + body.length, + bodyIndex + 1, + partial, + globStarDepth + 1, + sawTail + ); + if (sub !== false) { + return sub; + } + } + const f = file2[fileIndex]; + if (f === "." || f === ".." || !this.options.dot && f.charAt(0) === ".") { + return false; + } + fileIndex++; + } + return partial || null; + } + _matchOne(file2, pattern, partial, fileIndex, patternIndex) { + let fi, pi, fl, pl; + for (fi = fileIndex, pi = patternIndex, fl = file2.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { + this.debug("matchOne loop"); + const p = pattern[pi]; + const f = file2[fi]; + this.debug(pattern, p, f); + if (p === false || p === GLOBSTAR) return false; + let hit; + if (typeof p === "string") { + hit = f === p; + this.debug("string match", p, f, hit); + } else { + hit = f.match(p); + this.debug("pattern match", p, f, hit); + } + if (!hit) return false; + } + if (fi === fl && pi === pl) { + return true; + } else if (fi === fl) { + return partial; + } else if (pi === pl) { + return fi === fl - 1 && file2[fi] === ""; + } + throw new Error("wtf?"); + } + braceExpand() { + return braceExpand(this.pattern, this.options); + } + parse(pattern, isSub) { + assertValidPattern(pattern); + const options = this.options; + if (pattern === "**") { + if (!options.noglobstar) + return GLOBSTAR; + else + pattern = "*"; + } + if (pattern === "") return ""; + let re = ""; + let hasMagic = false; + let escaping = false; + const patternListStack = []; + const negativeLists = []; + let stateChar; + let inClass = false; + let reClassStart = -1; + let classStart = -1; + let cs; + let pl; + let sp; + let dotTravAllowed = pattern.charAt(0) === "."; + let dotFileAllowed = options.dot || dotTravAllowed; + const patternStart = () => dotTravAllowed ? "" : dotFileAllowed ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; + const subPatternStart = (p) => p.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; + const clearStateChar = () => { + if (stateChar) { + switch (stateChar) { + case "*": + re += star; + hasMagic = true; + break; + case "?": + re += qmark; + hasMagic = true; + break; + default: + re += "\\" + stateChar; + break; + } + this.debug("clearStateChar %j %j", stateChar, re); + stateChar = false; + } + }; + for (let i = 0, c; i < pattern.length && (c = pattern.charAt(i)); i++) { + this.debug("%s %s %s %j", pattern, i, re, c); + if (escaping) { + if (c === "/") { + return false; + } + if (reSpecials[c]) { + re += "\\"; + } + re += c; + escaping = false; + continue; + } + switch (c) { + /* istanbul ignore next */ + case "/": { + return false; + } + case "\\": + if (inClass && pattern.charAt(i + 1) === "-") { + re += c; + continue; + } + clearStateChar(); + escaping = true; + continue; + // the various stateChar values + // for the "extglob" stuff. + case "?": + case "*": + case "+": + case "@": + case "!": + this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); + if (inClass) { + this.debug(" in class"); + if (c === "!" && i === classStart + 1) c = "^"; + re += c; + continue; + } + if (c === "*" && stateChar === "*") continue; + this.debug("call clearStateChar %j", stateChar); + clearStateChar(); + stateChar = c; + if (options.noext) clearStateChar(); + continue; + case "(": { + if (inClass) { + re += "("; + continue; + } + if (!stateChar) { + re += "\\("; + continue; + } + const plEntry = { + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }; + this.debug(this.pattern, " ", plEntry); + patternListStack.push(plEntry); + re += plEntry.open; + if (plEntry.start === 0 && plEntry.type !== "!") { + dotTravAllowed = true; + re += subPatternStart(pattern.slice(i + 1)); + } + this.debug("plType %j %j", stateChar, re); + stateChar = false; + continue; + } + case ")": { + const plEntry = patternListStack[patternListStack.length - 1]; + if (inClass || !plEntry) { + re += "\\)"; + continue; + } + patternListStack.pop(); + clearStateChar(); + hasMagic = true; + pl = plEntry; + re += pl.close; + if (pl.type === "!") { + negativeLists.push(Object.assign(pl, { reEnd: re.length })); + } + continue; + } + case "|": { + const plEntry = patternListStack[patternListStack.length - 1]; + if (inClass || !plEntry) { + re += "\\|"; + continue; + } + clearStateChar(); + re += "|"; + if (plEntry.start === 0 && plEntry.type !== "!") { + dotTravAllowed = true; + re += subPatternStart(pattern.slice(i + 1)); + } + continue; + } + // these are mostly the same in regexp and glob + case "[": + clearStateChar(); + if (inClass) { + re += "\\" + c; + continue; + } + inClass = true; + classStart = i; + reClassStart = re.length; + re += c; + continue; + case "]": + if (i === classStart + 1 || !inClass) { + re += "\\" + c; + continue; + } + cs = pattern.substring(classStart + 1, i); + try { + RegExp("[" + braExpEscape(charUnescape(cs)) + "]"); + re += c; + } catch (er) { + re = re.substring(0, reClassStart) + "(?:$.)"; + } + hasMagic = true; + inClass = false; + continue; + default: + clearStateChar(); + if (reSpecials[c] && !(c === "^" && inClass)) { + re += "\\"; + } + re += c; + break; + } + } + if (inClass) { + cs = pattern.slice(classStart + 1); + sp = this.parse(cs, SUBPARSE); + re = re.substring(0, reClassStart) + "\\[" + sp[0]; + hasMagic = hasMagic || sp[1]; + } + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + let tail; + tail = re.slice(pl.reStart + pl.open.length); + this.debug("setting tail", re, pl); + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, (_2, $1, $2) => { + if (!$2) { + $2 = "\\"; + } + return $1 + $1 + $2 + "|"; + }); + this.debug("tail=%j\n %s", tail, tail, pl, re); + const t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; + hasMagic = true; + re = re.slice(0, pl.reStart) + t + "\\(" + tail; + } + clearStateChar(); + if (escaping) { + re += "\\\\"; + } + const addPatternStart = addPatternStartSet[re.charAt(0)]; + for (let n = negativeLists.length - 1; n > -1; n--) { + const nl = negativeLists[n]; + const nlBefore = re.slice(0, nl.reStart); + const nlFirst = re.slice(nl.reStart, nl.reEnd - 8); + let nlAfter = re.slice(nl.reEnd); + const nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + nlAfter; + const closeParensBefore = nlBefore.split(")").length; + const openParensBefore = nlBefore.split("(").length - closeParensBefore; + let cleanAfter = nlAfter; + for (let i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); + } + nlAfter = cleanAfter; + const dollar = nlAfter === "" && isSub !== SUBPARSE ? "(?:$|\\/)" : ""; + re = nlBefore + nlFirst + nlAfter + dollar + nlLast; + } + if (re !== "" && hasMagic) { + re = "(?=.)" + re; + } + if (addPatternStart) { + re = patternStart() + re; + } + if (isSub === SUBPARSE) { + return [re, hasMagic]; + } + if (options.nocase && !hasMagic) { + hasMagic = pattern.toUpperCase() !== pattern.toLowerCase(); + } + if (!hasMagic) { + return globUnescape(pattern); + } + const flags = options.nocase ? "i" : ""; + try { + return Object.assign(new RegExp("^" + re + "$", flags), { + _glob: pattern, + _src: re + }); + } catch (er) { + return new RegExp("$."); + } + } + makeRe() { + if (this.regexp || this.regexp === false) return this.regexp; + const set = this.set; + if (!set.length) { + this.regexp = false; + return this.regexp; + } + const options = this.options; + const twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; + const flags = options.nocase ? "i" : ""; + let re = set.map((pattern) => { + pattern = pattern.map( + (p) => typeof p === "string" ? regExpEscape(p) : p === GLOBSTAR ? GLOBSTAR : p._src + ).reduce((set2, p) => { + if (!(set2[set2.length - 1] === GLOBSTAR && p === GLOBSTAR)) { + set2.push(p); + } + return set2; + }, []); + pattern.forEach((p, i) => { + if (p !== GLOBSTAR || pattern[i - 1] === GLOBSTAR) { + return; + } + if (i === 0) { + if (pattern.length > 1) { + pattern[i + 1] = "(?:\\/|" + twoStar + "\\/)?" + pattern[i + 1]; + } else { + pattern[i] = twoStar; + } + } else if (i === pattern.length - 1) { + pattern[i - 1] += "(?:\\/|" + twoStar + ")?"; + } else { + pattern[i - 1] += "(?:\\/|\\/" + twoStar + "\\/)" + pattern[i + 1]; + pattern[i + 1] = GLOBSTAR; + } + }); + return pattern.filter((p) => p !== GLOBSTAR).join("/"); + }).join("|"); + re = "^(?:" + re + ")$"; + if (this.negate) re = "^(?!" + re + ").*$"; + try { + this.regexp = new RegExp(re, flags); + } catch (ex) { + this.regexp = false; + } + return this.regexp; + } + match(f, partial = this.partial) { + this.debug("match", f, this.pattern); + if (this.comment) return false; + if (this.empty) return f === ""; + if (f === "/" && partial) return true; + const options = this.options; + if (path.sep !== "/") { + f = f.split(path.sep).join("/"); + } + f = f.split(slashSplit); + this.debug(this.pattern, "split", f); + const set = this.set; + this.debug(this.pattern, "set", set); + let filename; + for (let i = f.length - 1; i >= 0; i--) { + filename = f[i]; + if (filename) break; + } + for (let i = 0; i < set.length; i++) { + const pattern = set[i]; + let file2 = f; + if (options.matchBase && pattern.length === 1) { + file2 = [filename]; + } + const hit = this.matchOne(file2, pattern, partial); + if (hit) { + if (options.flipNegate) return true; + return !this.negate; + } + } + if (options.flipNegate) return false; + return this.negate; + } + static defaults(def) { + return minimatch.defaults(def).Minimatch; + } + }; + minimatch.Minimatch = Minimatch; + } +}); + +// ../../node_modules/.pnpm/readdir-glob@1.1.3/node_modules/readdir-glob/index.js +var require_readdir_glob = __commonJS({ + "../../node_modules/.pnpm/readdir-glob@1.1.3/node_modules/readdir-glob/index.js"(exports2, module2) { + module2.exports = readdirGlob; + var fs = require("fs"); + var { EventEmitter } = require("events"); + var { Minimatch } = require_minimatch(); + var { resolve } = require("path"); + function readdir(dir, strict) { + return new Promise((resolve2, reject) => { + fs.readdir(dir, { withFileTypes: true }, (err, files) => { + if (err) { + switch (err.code) { + case "ENOTDIR": + if (strict) { + reject(err); + } else { + resolve2([]); + } + break; + case "ENOTSUP": + // Operation not supported + case "ENOENT": + // No such file or directory + case "ENAMETOOLONG": + // Filename too long + case "UNKNOWN": + resolve2([]); + break; + case "ELOOP": + // Too many levels of symbolic links + default: + reject(err); + break; + } + } else { + resolve2(files); + } + }); + }); + } + function stat(file2, followSymlinks) { + return new Promise((resolve2, reject) => { + const statFunc = followSymlinks ? fs.stat : fs.lstat; + statFunc(file2, (err, stats) => { + if (err) { + switch (err.code) { + case "ENOENT": + if (followSymlinks) { + resolve2(stat(file2, false)); + } else { + resolve2(null); + } + break; + default: + resolve2(null); + break; + } + } else { + resolve2(stats); + } + }); + }); + } + async function* exploreWalkAsync(dir, path, followSymlinks, useStat, shouldSkip, strict) { + let files = await readdir(path + dir, strict); + for (const file2 of files) { + let name = file2.name; + if (name === void 0) { + name = file2; + useStat = true; + } + const filename = dir + "/" + name; + const relative = filename.slice(1); + const absolute = path + "/" + relative; + let stats = null; + if (useStat || followSymlinks) { + stats = await stat(absolute, followSymlinks); + } + if (!stats && file2.name !== void 0) { + stats = file2; + } + if (stats === null) { + stats = { isDirectory: () => false }; + } + if (stats.isDirectory()) { + if (!shouldSkip(relative)) { + yield { relative, absolute, stats }; + yield* exploreWalkAsync(filename, path, followSymlinks, useStat, shouldSkip, false); + } + } else { + yield { relative, absolute, stats }; + } + } + } + async function* explore(path, followSymlinks, useStat, shouldSkip) { + yield* exploreWalkAsync("", path, followSymlinks, useStat, shouldSkip, true); + } + function readOptions(options) { + return { + pattern: options.pattern, + dot: !!options.dot, + noglobstar: !!options.noglobstar, + matchBase: !!options.matchBase, + nocase: !!options.nocase, + ignore: options.ignore, + skip: options.skip, + follow: !!options.follow, + stat: !!options.stat, + nodir: !!options.nodir, + mark: !!options.mark, + silent: !!options.silent, + absolute: !!options.absolute + }; + } + var ReaddirGlob = class extends EventEmitter { + constructor(cwd, options, cb) { + super(); + if (typeof options === "function") { + cb = options; + options = null; + } + this.options = readOptions(options || {}); + this.matchers = []; + if (this.options.pattern) { + const matchers = Array.isArray(this.options.pattern) ? this.options.pattern : [this.options.pattern]; + this.matchers = matchers.map( + (m) => new Minimatch(m, { + dot: this.options.dot, + noglobstar: this.options.noglobstar, + matchBase: this.options.matchBase, + nocase: this.options.nocase + }) + ); + } + this.ignoreMatchers = []; + if (this.options.ignore) { + const ignorePatterns = Array.isArray(this.options.ignore) ? this.options.ignore : [this.options.ignore]; + this.ignoreMatchers = ignorePatterns.map( + (ignore) => new Minimatch(ignore, { dot: true }) + ); + } + this.skipMatchers = []; + if (this.options.skip) { + const skipPatterns = Array.isArray(this.options.skip) ? this.options.skip : [this.options.skip]; + this.skipMatchers = skipPatterns.map( + (skip) => new Minimatch(skip, { dot: true }) + ); + } + this.iterator = explore(resolve(cwd || "."), this.options.follow, this.options.stat, this._shouldSkipDirectory.bind(this)); + this.paused = false; + this.inactive = false; + this.aborted = false; + if (cb) { + this._matches = []; + this.on("match", (match) => this._matches.push(this.options.absolute ? match.absolute : match.relative)); + this.on("error", (err) => cb(err)); + this.on("end", () => cb(null, this._matches)); + } + setTimeout(() => this._next(), 0); + } + _shouldSkipDirectory(relative) { + return this.skipMatchers.some((m) => m.match(relative)); + } + _fileMatches(relative, isDirectory) { + const file2 = relative + (isDirectory ? "/" : ""); + return (this.matchers.length === 0 || this.matchers.some((m) => m.match(file2))) && !this.ignoreMatchers.some((m) => m.match(file2)) && (!this.options.nodir || !isDirectory); + } + _next() { + if (!this.paused && !this.aborted) { + this.iterator.next().then((obj2) => { + if (!obj2.done) { + const isDirectory = obj2.value.stats.isDirectory(); + if (this._fileMatches(obj2.value.relative, isDirectory)) { + let relative = obj2.value.relative; + let absolute = obj2.value.absolute; + if (this.options.mark && isDirectory) { + relative += "/"; + absolute += "/"; + } + if (this.options.stat) { + this.emit("match", { relative, absolute, stat: obj2.value.stats }); + } else { + this.emit("match", { relative, absolute }); + } + } + this._next(this.iterator); + } else { + this.emit("end"); + } + }).catch((err) => { + this.abort(); + this.emit("error", err); + if (!err.code && !this.options.silent) { + console.error(err); + } + }); + } else { + this.inactive = true; + } + } + abort() { + this.aborted = true; + } + pause() { + this.paused = true; + } + resume() { + this.paused = false; + if (this.inactive) { + this.inactive = false; + this._next(); + } + } + }; + function readdirGlob(pattern, options, cb) { + return new ReaddirGlob(pattern, options, cb); + } + readdirGlob.ReaddirGlob = ReaddirGlob; + } +}); + +// ../../node_modules/.pnpm/async@3.2.6/node_modules/async/dist/async.js +var require_async2 = __commonJS({ + "../../node_modules/.pnpm/async@3.2.6/node_modules/async/dist/async.js"(exports2, module2) { + (function(global2, factory) { + typeof exports2 === "object" && typeof module2 !== "undefined" ? factory(exports2) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.async = {})); + })(exports2, (function(exports3) { + "use strict"; + function apply(fn, ...args) { + return (...callArgs) => fn(...args, ...callArgs); + } + function initialParams(fn) { + return function(...args) { + var callback = args.pop(); + return fn.call(this, args, callback); + }; + } + var hasQueueMicrotask = typeof queueMicrotask === "function" && queueMicrotask; + var hasSetImmediate = typeof setImmediate === "function" && setImmediate; + var hasNextTick = typeof process === "object" && typeof process.nextTick === "function"; + function fallback(fn) { + setTimeout(fn, 0); + } + function wrap(defer) { + return (fn, ...args) => defer(() => fn(...args)); + } + var _defer$1; + if (hasQueueMicrotask) { + _defer$1 = queueMicrotask; + } else if (hasSetImmediate) { + _defer$1 = setImmediate; + } else if (hasNextTick) { + _defer$1 = process.nextTick; + } else { + _defer$1 = fallback; + } + var setImmediate$1 = wrap(_defer$1); + function asyncify(func) { + if (isAsync(func)) { + return function(...args) { + const callback = args.pop(); + const promise = func.apply(this, args); + return handlePromise(promise, callback); + }; + } + return initialParams(function(args, callback) { + var result; + try { + result = func.apply(this, args); + } catch (e) { + return callback(e); + } + if (result && typeof result.then === "function") { + return handlePromise(result, callback); + } else { + callback(null, result); + } + }); + } + function handlePromise(promise, callback) { + return promise.then((value) => { + invokeCallback(callback, null, value); + }, (err) => { + invokeCallback(callback, err && (err instanceof Error || err.message) ? err : new Error(err)); + }); + } + function invokeCallback(callback, error, value) { + try { + callback(error, value); + } catch (err) { + setImmediate$1((e) => { + throw e; + }, err); + } + } + function isAsync(fn) { + return fn[Symbol.toStringTag] === "AsyncFunction"; + } + function isAsyncGenerator(fn) { + return fn[Symbol.toStringTag] === "AsyncGenerator"; + } + function isAsyncIterable(obj2) { + return typeof obj2[Symbol.asyncIterator] === "function"; + } + function wrapAsync(asyncFn) { + if (typeof asyncFn !== "function") throw new Error("expected a function"); + return isAsync(asyncFn) ? asyncify(asyncFn) : asyncFn; + } + function awaitify(asyncFn, arity) { + if (!arity) arity = asyncFn.length; + if (!arity) throw new Error("arity is undefined"); + function awaitable(...args) { + if (typeof args[arity - 1] === "function") { + return asyncFn.apply(this, args); + } + return new Promise((resolve, reject2) => { + args[arity - 1] = (err, ...cbArgs) => { + if (err) return reject2(err); + resolve(cbArgs.length > 1 ? cbArgs : cbArgs[0]); + }; + asyncFn.apply(this, args); + }); + } + return awaitable; + } + function applyEach$1(eachfn) { + return function applyEach2(fns, ...callArgs) { + const go = awaitify(function(callback) { + var that = this; + return eachfn(fns, (fn, cb) => { + wrapAsync(fn).apply(that, callArgs.concat(cb)); + }, callback); + }); + return go; + }; + } + function _asyncMap(eachfn, arr, iteratee, callback) { + arr = arr || []; + var results = []; + var counter = 0; + var _iteratee = wrapAsync(iteratee); + return eachfn(arr, (value, _2, iterCb) => { + var index2 = counter++; + _iteratee(value, (err, v) => { + results[index2] = v; + iterCb(err); + }); + }, (err) => { + callback(err, results); + }); + } + function isArrayLike(value) { + return value && typeof value.length === "number" && value.length >= 0 && value.length % 1 === 0; + } + const breakLoop = {}; + function once(fn) { + function wrapper(...args) { + if (fn === null) return; + var callFn = fn; + fn = null; + callFn.apply(this, args); + } + Object.assign(wrapper, fn); + return wrapper; + } + function getIterator(coll) { + return coll[Symbol.iterator] && coll[Symbol.iterator](); + } + function createArrayIterator(coll) { + var i = -1; + var len = coll.length; + return function next() { + return ++i < len ? { value: coll[i], key: i } : null; + }; + } + function createES2015Iterator(iterator) { + var i = -1; + return function next() { + var item = iterator.next(); + if (item.done) + return null; + i++; + return { value: item.value, key: i }; + }; + } + function createObjectIterator(obj2) { + var okeys = obj2 ? Object.keys(obj2) : []; + var i = -1; + var len = okeys.length; + return function next() { + var key = okeys[++i]; + if (key === "__proto__") { + return next(); + } + return i < len ? { value: obj2[key], key } : null; + }; + } + function createIterator(coll) { + if (isArrayLike(coll)) { + return createArrayIterator(coll); + } + var iterator = getIterator(coll); + return iterator ? createES2015Iterator(iterator) : createObjectIterator(coll); + } + function onlyOnce(fn) { + return function(...args) { + if (fn === null) throw new Error("Callback was already called."); + var callFn = fn; + fn = null; + callFn.apply(this, args); + }; + } + function asyncEachOfLimit(generator, limit, iteratee, callback) { + let done = false; + let canceled = false; + let awaiting = false; + let running = 0; + let idx = 0; + function replenish() { + if (running >= limit || awaiting || done) return; + awaiting = true; + generator.next().then(({ value, done: iterDone }) => { + if (canceled || done) return; + awaiting = false; + if (iterDone) { + done = true; + if (running <= 0) { + callback(null); + } + return; + } + running++; + iteratee(value, idx, iterateeCallback); + idx++; + replenish(); + }).catch(handleError); + } + function iterateeCallback(err, result) { + running -= 1; + if (canceled) return; + if (err) return handleError(err); + if (err === false) { + done = true; + canceled = true; + return; + } + if (result === breakLoop || done && running <= 0) { + done = true; + return callback(null); + } + replenish(); + } + function handleError(err) { + if (canceled) return; + awaiting = false; + done = true; + callback(err); + } + replenish(); + } + var eachOfLimit$2 = (limit) => { + return (obj2, iteratee, callback) => { + callback = once(callback); + if (limit <= 0) { + throw new RangeError("concurrency limit cannot be less than 1"); + } + if (!obj2) { + return callback(null); + } + if (isAsyncGenerator(obj2)) { + return asyncEachOfLimit(obj2, limit, iteratee, callback); + } + if (isAsyncIterable(obj2)) { + return asyncEachOfLimit(obj2[Symbol.asyncIterator](), limit, iteratee, callback); + } + var nextElem = createIterator(obj2); + var done = false; + var canceled = false; + var running = 0; + var looping = false; + function iterateeCallback(err, value) { + if (canceled) return; + running -= 1; + if (err) { + done = true; + callback(err); + } else if (err === false) { + done = true; + canceled = true; + } else if (value === breakLoop || done && running <= 0) { + done = true; + return callback(null); + } else if (!looping) { + replenish(); + } + } + function replenish() { + looping = true; + while (running < limit && !done) { + var elem = nextElem(); + if (elem === null) { + done = true; + if (running <= 0) { + callback(null); + } + return; + } + running += 1; + iteratee(elem.value, elem.key, onlyOnce(iterateeCallback)); + } + looping = false; + } + replenish(); + }; + }; + function eachOfLimit(coll, limit, iteratee, callback) { + return eachOfLimit$2(limit)(coll, wrapAsync(iteratee), callback); + } + var eachOfLimit$1 = awaitify(eachOfLimit, 4); + function eachOfArrayLike(coll, iteratee, callback) { + callback = once(callback); + var index2 = 0, completed = 0, { length } = coll, canceled = false; + if (length === 0) { + callback(null); + } + function iteratorCallback(err, value) { + if (err === false) { + canceled = true; + } + if (canceled === true) return; + if (err) { + callback(err); + } else if (++completed === length || value === breakLoop) { + callback(null); + } + } + for (; index2 < length; index2++) { + iteratee(coll[index2], index2, onlyOnce(iteratorCallback)); + } + } + function eachOfGeneric(coll, iteratee, callback) { + return eachOfLimit$1(coll, Infinity, iteratee, callback); + } + function eachOf(coll, iteratee, callback) { + var eachOfImplementation = isArrayLike(coll) ? eachOfArrayLike : eachOfGeneric; + return eachOfImplementation(coll, wrapAsync(iteratee), callback); + } + var eachOf$1 = awaitify(eachOf, 3); + function map(coll, iteratee, callback) { + return _asyncMap(eachOf$1, coll, iteratee, callback); + } + var map$1 = awaitify(map, 3); + var applyEach = applyEach$1(map$1); + function eachOfSeries(coll, iteratee, callback) { + return eachOfLimit$1(coll, 1, iteratee, callback); + } + var eachOfSeries$1 = awaitify(eachOfSeries, 3); + function mapSeries(coll, iteratee, callback) { + return _asyncMap(eachOfSeries$1, coll, iteratee, callback); + } + var mapSeries$1 = awaitify(mapSeries, 3); + var applyEachSeries = applyEach$1(mapSeries$1); + const PROMISE_SYMBOL = Symbol("promiseCallback"); + function promiseCallback() { + let resolve, reject2; + function callback(err, ...args) { + if (err) return reject2(err); + resolve(args.length > 1 ? args : args[0]); + } + callback[PROMISE_SYMBOL] = new Promise((res, rej) => { + resolve = res, reject2 = rej; + }); + return callback; + } + function auto(tasks, concurrency, callback) { + if (typeof concurrency !== "number") { + callback = concurrency; + concurrency = null; + } + callback = once(callback || promiseCallback()); + var numTasks = Object.keys(tasks).length; + if (!numTasks) { + return callback(null); + } + if (!concurrency) { + concurrency = numTasks; + } + var results = {}; + var runningTasks = 0; + var canceled = false; + var hasError = false; + var listeners = /* @__PURE__ */ Object.create(null); + var readyTasks = []; + var readyToCheck = []; + var uncheckedDependencies = {}; + Object.keys(tasks).forEach((key) => { + var task = tasks[key]; + if (!Array.isArray(task)) { + enqueueTask(key, [task]); + readyToCheck.push(key); + return; + } + var dependencies = task.slice(0, task.length - 1); + var remainingDependencies = dependencies.length; + if (remainingDependencies === 0) { + enqueueTask(key, task); + readyToCheck.push(key); + return; + } + uncheckedDependencies[key] = remainingDependencies; + dependencies.forEach((dependencyName) => { + if (!tasks[dependencyName]) { + throw new Error("async.auto task `" + key + "` has a non-existent dependency `" + dependencyName + "` in " + dependencies.join(", ")); + } + addListener(dependencyName, () => { + remainingDependencies--; + if (remainingDependencies === 0) { + enqueueTask(key, task); + } + }); + }); + }); + checkForDeadlocks(); + processQueue(); + function enqueueTask(key, task) { + readyTasks.push(() => runTask(key, task)); + } + function processQueue() { + if (canceled) return; + if (readyTasks.length === 0 && runningTasks === 0) { + return callback(null, results); + } + while (readyTasks.length && runningTasks < concurrency) { + var run = readyTasks.shift(); + run(); + } + } + function addListener(taskName, fn) { + var taskListeners = listeners[taskName]; + if (!taskListeners) { + taskListeners = listeners[taskName] = []; + } + taskListeners.push(fn); + } + function taskComplete(taskName) { + var taskListeners = listeners[taskName] || []; + taskListeners.forEach((fn) => fn()); + processQueue(); + } + function runTask(key, task) { + if (hasError) return; + var taskCallback = onlyOnce((err, ...result) => { + runningTasks--; + if (err === false) { + canceled = true; + return; + } + if (result.length < 2) { + [result] = result; + } + if (err) { + var safeResults = {}; + Object.keys(results).forEach((rkey) => { + safeResults[rkey] = results[rkey]; + }); + safeResults[key] = result; + hasError = true; + listeners = /* @__PURE__ */ Object.create(null); + if (canceled) return; + callback(err, safeResults); + } else { + results[key] = result; + taskComplete(key); + } + }); + runningTasks++; + var taskFn = wrapAsync(task[task.length - 1]); + if (task.length > 1) { + taskFn(results, taskCallback); + } else { + taskFn(taskCallback); + } + } + function checkForDeadlocks() { + var currentTask; + var counter = 0; + while (readyToCheck.length) { + currentTask = readyToCheck.pop(); + counter++; + getDependents(currentTask).forEach((dependent) => { + if (--uncheckedDependencies[dependent] === 0) { + readyToCheck.push(dependent); + } + }); + } + if (counter !== numTasks) { + throw new Error( + "async.auto cannot execute tasks due to a recursive dependency" + ); + } + } + function getDependents(taskName) { + var result = []; + Object.keys(tasks).forEach((key) => { + const task = tasks[key]; + if (Array.isArray(task) && task.indexOf(taskName) >= 0) { + result.push(key); + } + }); + return result; + } + return callback[PROMISE_SYMBOL]; + } + var FN_ARGS = /^(?:async\s)?(?:function)?\s*(?:\w+\s*)?\(([^)]+)\)(?:\s*{)/; + var ARROW_FN_ARGS = /^(?:async\s)?\s*(?:\(\s*)?((?:[^)=\s]\s*)*)(?:\)\s*)?=>/; + var FN_ARG_SPLIT = /,/; + var FN_ARG = /(=.+)?(\s*)$/; + function stripComments(string) { + let stripped = ""; + let index2 = 0; + let endBlockComment = string.indexOf("*/"); + while (index2 < string.length) { + if (string[index2] === "/" && string[index2 + 1] === "/") { + let endIndex = string.indexOf("\n", index2); + index2 = endIndex === -1 ? string.length : endIndex; + } else if (endBlockComment !== -1 && string[index2] === "/" && string[index2 + 1] === "*") { + let endIndex = string.indexOf("*/", index2); + if (endIndex !== -1) { + index2 = endIndex + 2; + endBlockComment = string.indexOf("*/", index2); + } else { + stripped += string[index2]; + index2++; + } + } else { + stripped += string[index2]; + index2++; + } + } + return stripped; + } + function parseParams(func) { + const src = stripComments(func.toString()); + let match = src.match(FN_ARGS); + if (!match) { + match = src.match(ARROW_FN_ARGS); + } + if (!match) throw new Error("could not parse args in autoInject\nSource:\n" + src); + let [, args] = match; + return args.replace(/\s/g, "").split(FN_ARG_SPLIT).map((arg) => arg.replace(FN_ARG, "").trim()); + } + function autoInject(tasks, callback) { + var newTasks = {}; + Object.keys(tasks).forEach((key) => { + var taskFn = tasks[key]; + var params; + var fnIsAsync = isAsync(taskFn); + var hasNoDeps = !fnIsAsync && taskFn.length === 1 || fnIsAsync && taskFn.length === 0; + if (Array.isArray(taskFn)) { + params = [...taskFn]; + taskFn = params.pop(); + newTasks[key] = params.concat(params.length > 0 ? newTask : taskFn); + } else if (hasNoDeps) { + newTasks[key] = taskFn; + } else { + params = parseParams(taskFn); + if (taskFn.length === 0 && !fnIsAsync && params.length === 0) { + throw new Error("autoInject task functions require explicit parameters."); + } + if (!fnIsAsync) params.pop(); + newTasks[key] = params.concat(newTask); + } + function newTask(results, taskCb) { + var newArgs = params.map((name) => results[name]); + newArgs.push(taskCb); + wrapAsync(taskFn)(...newArgs); + } + }); + return auto(newTasks, callback); + } + class DLL { + constructor() { + this.head = this.tail = null; + this.length = 0; + } + removeLink(node) { + if (node.prev) node.prev.next = node.next; + else this.head = node.next; + if (node.next) node.next.prev = node.prev; + else this.tail = node.prev; + node.prev = node.next = null; + this.length -= 1; + return node; + } + empty() { + while (this.head) this.shift(); + return this; + } + insertAfter(node, newNode) { + newNode.prev = node; + newNode.next = node.next; + if (node.next) node.next.prev = newNode; + else this.tail = newNode; + node.next = newNode; + this.length += 1; + } + insertBefore(node, newNode) { + newNode.prev = node.prev; + newNode.next = node; + if (node.prev) node.prev.next = newNode; + else this.head = newNode; + node.prev = newNode; + this.length += 1; + } + unshift(node) { + if (this.head) this.insertBefore(this.head, node); + else setInitial(this, node); + } + push(node) { + if (this.tail) this.insertAfter(this.tail, node); + else setInitial(this, node); + } + shift() { + return this.head && this.removeLink(this.head); + } + pop() { + return this.tail && this.removeLink(this.tail); + } + toArray() { + return [...this]; + } + *[Symbol.iterator]() { + var cur = this.head; + while (cur) { + yield cur.data; + cur = cur.next; + } + } + remove(testFn) { + var curr = this.head; + while (curr) { + var { next } = curr; + if (testFn(curr)) { + this.removeLink(curr); + } + curr = next; + } + return this; + } + } + function setInitial(dll, node) { + dll.length = 1; + dll.head = dll.tail = node; + } + function queue$1(worker, concurrency, payload) { + if (concurrency == null) { + concurrency = 1; + } else if (concurrency === 0) { + throw new RangeError("Concurrency must not be zero"); + } + var _worker = wrapAsync(worker); + var numRunning = 0; + var workersList = []; + const events = { + error: [], + drain: [], + saturated: [], + unsaturated: [], + empty: [] + }; + function on(event, handler) { + events[event].push(handler); + } + function once2(event, handler) { + const handleAndRemove = (...args) => { + off(event, handleAndRemove); + handler(...args); + }; + events[event].push(handleAndRemove); + } + function off(event, handler) { + if (!event) return Object.keys(events).forEach((ev) => events[ev] = []); + if (!handler) return events[event] = []; + events[event] = events[event].filter((ev) => ev !== handler); + } + function trigger(event, ...args) { + events[event].forEach((handler) => handler(...args)); + } + var processingScheduled = false; + function _insert(data, insertAtFront, rejectOnError, callback) { + if (callback != null && typeof callback !== "function") { + throw new Error("task callback must be a function"); + } + q.started = true; + var res, rej; + function promiseCallback2(err, ...args) { + if (err) return rejectOnError ? rej(err) : res(); + if (args.length <= 1) return res(args[0]); + res(args); + } + var item = q._createTaskItem( + data, + rejectOnError ? promiseCallback2 : callback || promiseCallback2 + ); + if (insertAtFront) { + q._tasks.unshift(item); + } else { + q._tasks.push(item); + } + if (!processingScheduled) { + processingScheduled = true; + setImmediate$1(() => { + processingScheduled = false; + q.process(); + }); + } + if (rejectOnError || !callback) { + return new Promise((resolve, reject2) => { + res = resolve; + rej = reject2; + }); + } + } + function _createCB(tasks) { + return function(err, ...args) { + numRunning -= 1; + for (var i = 0, l2 = tasks.length; i < l2; i++) { + var task = tasks[i]; + var index2 = workersList.indexOf(task); + if (index2 === 0) { + workersList.shift(); + } else if (index2 > 0) { + workersList.splice(index2, 1); + } + task.callback(err, ...args); + if (err != null) { + trigger("error", err, task.data); + } + } + if (numRunning <= q.concurrency - q.buffer) { + trigger("unsaturated"); + } + if (q.idle()) { + trigger("drain"); + } + q.process(); + }; + } + function _maybeDrain(data) { + if (data.length === 0 && q.idle()) { + setImmediate$1(() => trigger("drain")); + return true; + } + return false; + } + const eventMethod = (name) => (handler) => { + if (!handler) { + return new Promise((resolve, reject2) => { + once2(name, (err, data) => { + if (err) return reject2(err); + resolve(data); + }); + }); + } + off(name); + on(name, handler); + }; + var isProcessing = false; + var q = { + _tasks: new DLL(), + _createTaskItem(data, callback) { + return { + data, + callback + }; + }, + *[Symbol.iterator]() { + yield* q._tasks[Symbol.iterator](); + }, + concurrency, + payload, + buffer: concurrency / 4, + started: false, + paused: false, + push(data, callback) { + if (Array.isArray(data)) { + if (_maybeDrain(data)) return; + return data.map((datum) => _insert(datum, false, false, callback)); + } + return _insert(data, false, false, callback); + }, + pushAsync(data, callback) { + if (Array.isArray(data)) { + if (_maybeDrain(data)) return; + return data.map((datum) => _insert(datum, false, true, callback)); + } + return _insert(data, false, true, callback); + }, + kill() { + off(); + q._tasks.empty(); + }, + unshift(data, callback) { + if (Array.isArray(data)) { + if (_maybeDrain(data)) return; + return data.map((datum) => _insert(datum, true, false, callback)); + } + return _insert(data, true, false, callback); + }, + unshiftAsync(data, callback) { + if (Array.isArray(data)) { + if (_maybeDrain(data)) return; + return data.map((datum) => _insert(datum, true, true, callback)); + } + return _insert(data, true, true, callback); + }, + remove(testFn) { + q._tasks.remove(testFn); + }, + process() { + if (isProcessing) { + return; + } + isProcessing = true; + while (!q.paused && numRunning < q.concurrency && q._tasks.length) { + var tasks = [], data = []; + var l2 = q._tasks.length; + if (q.payload) l2 = Math.min(l2, q.payload); + for (var i = 0; i < l2; i++) { + var node = q._tasks.shift(); + tasks.push(node); + workersList.push(node); + data.push(node.data); + } + numRunning += 1; + if (q._tasks.length === 0) { + trigger("empty"); + } + if (numRunning === q.concurrency) { + trigger("saturated"); + } + var cb = onlyOnce(_createCB(tasks)); + _worker(data, cb); + } + isProcessing = false; + }, + length() { + return q._tasks.length; + }, + running() { + return numRunning; + }, + workersList() { + return workersList; + }, + idle() { + return q._tasks.length + numRunning === 0; + }, + pause() { + q.paused = true; + }, + resume() { + if (q.paused === false) { + return; + } + q.paused = false; + setImmediate$1(q.process); + } + }; + Object.defineProperties(q, { + saturated: { + writable: false, + value: eventMethod("saturated") + }, + unsaturated: { + writable: false, + value: eventMethod("unsaturated") + }, + empty: { + writable: false, + value: eventMethod("empty") + }, + drain: { + writable: false, + value: eventMethod("drain") + }, + error: { + writable: false, + value: eventMethod("error") + } + }); + return q; + } + function cargo$1(worker, payload) { + return queue$1(worker, 1, payload); + } + function cargo(worker, concurrency, payload) { + return queue$1(worker, concurrency, payload); + } + function reduce(coll, memo, iteratee, callback) { + callback = once(callback); + var _iteratee = wrapAsync(iteratee); + return eachOfSeries$1(coll, (x, i, iterCb) => { + _iteratee(memo, x, (err, v) => { + memo = v; + iterCb(err); + }); + }, (err) => callback(err, memo)); + } + var reduce$1 = awaitify(reduce, 4); + function seq(...functions) { + var _functions = functions.map(wrapAsync); + return function(...args) { + var that = this; + var cb = args[args.length - 1]; + if (typeof cb == "function") { + args.pop(); + } else { + cb = promiseCallback(); + } + reduce$1( + _functions, + args, + (newargs, fn, iterCb) => { + fn.apply(that, newargs.concat((err, ...nextargs) => { + iterCb(err, nextargs); + })); + }, + (err, results) => cb(err, ...results) + ); + return cb[PROMISE_SYMBOL]; + }; + } + function compose(...args) { + return seq(...args.reverse()); + } + function mapLimit(coll, limit, iteratee, callback) { + return _asyncMap(eachOfLimit$2(limit), coll, iteratee, callback); + } + var mapLimit$1 = awaitify(mapLimit, 4); + function concatLimit(coll, limit, iteratee, callback) { + var _iteratee = wrapAsync(iteratee); + return mapLimit$1(coll, limit, (val, iterCb) => { + _iteratee(val, (err, ...args) => { + if (err) return iterCb(err); + return iterCb(err, args); + }); + }, (err, mapResults) => { + var result = []; + for (var i = 0; i < mapResults.length; i++) { + if (mapResults[i]) { + result = result.concat(...mapResults[i]); + } + } + return callback(err, result); + }); + } + var concatLimit$1 = awaitify(concatLimit, 4); + function concat(coll, iteratee, callback) { + return concatLimit$1(coll, Infinity, iteratee, callback); + } + var concat$1 = awaitify(concat, 3); + function concatSeries(coll, iteratee, callback) { + return concatLimit$1(coll, 1, iteratee, callback); + } + var concatSeries$1 = awaitify(concatSeries, 3); + function constant$1(...args) { + return function(...ignoredArgs) { + var callback = ignoredArgs.pop(); + return callback(null, ...args); + }; + } + function _createTester(check, getResult) { + return (eachfn, arr, _iteratee, cb) => { + var testPassed = false; + var testResult; + const iteratee = wrapAsync(_iteratee); + eachfn(arr, (value, _2, callback) => { + iteratee(value, (err, result) => { + if (err || err === false) return callback(err); + if (check(result) && !testResult) { + testPassed = true; + testResult = getResult(true, value); + return callback(null, breakLoop); + } + callback(); + }); + }, (err) => { + if (err) return cb(err); + cb(null, testPassed ? testResult : getResult(false)); + }); + }; + } + function detect(coll, iteratee, callback) { + return _createTester((bool) => bool, (res, item) => item)(eachOf$1, coll, iteratee, callback); + } + var detect$1 = awaitify(detect, 3); + function detectLimit(coll, limit, iteratee, callback) { + return _createTester((bool) => bool, (res, item) => item)(eachOfLimit$2(limit), coll, iteratee, callback); + } + var detectLimit$1 = awaitify(detectLimit, 4); + function detectSeries(coll, iteratee, callback) { + return _createTester((bool) => bool, (res, item) => item)(eachOfLimit$2(1), coll, iteratee, callback); + } + var detectSeries$1 = awaitify(detectSeries, 3); + function consoleFunc(name) { + return (fn, ...args) => wrapAsync(fn)(...args, (err, ...resultArgs) => { + if (typeof console === "object") { + if (err) { + if (console.error) { + console.error(err); + } + } else if (console[name]) { + resultArgs.forEach((x) => console[name](x)); + } + } + }); + } + var dir = consoleFunc("dir"); + function doWhilst(iteratee, test, callback) { + callback = onlyOnce(callback); + var _fn = wrapAsync(iteratee); + var _test = wrapAsync(test); + var results; + function next(err, ...args) { + if (err) return callback(err); + if (err === false) return; + results = args; + _test(...args, check); + } + function check(err, truth) { + if (err) return callback(err); + if (err === false) return; + if (!truth) return callback(null, ...results); + _fn(next); + } + return check(null, true); + } + var doWhilst$1 = awaitify(doWhilst, 3); + function doUntil(iteratee, test, callback) { + const _test = wrapAsync(test); + return doWhilst$1(iteratee, (...args) => { + const cb = args.pop(); + _test(...args, (err, truth) => cb(err, !truth)); + }, callback); + } + function _withoutIndex(iteratee) { + return (value, index2, callback) => iteratee(value, callback); + } + function eachLimit$2(coll, iteratee, callback) { + return eachOf$1(coll, _withoutIndex(wrapAsync(iteratee)), callback); + } + var each = awaitify(eachLimit$2, 3); + function eachLimit(coll, limit, iteratee, callback) { + return eachOfLimit$2(limit)(coll, _withoutIndex(wrapAsync(iteratee)), callback); + } + var eachLimit$1 = awaitify(eachLimit, 4); + function eachSeries(coll, iteratee, callback) { + return eachLimit$1(coll, 1, iteratee, callback); + } + var eachSeries$1 = awaitify(eachSeries, 3); + function ensureAsync(fn) { + if (isAsync(fn)) return fn; + return function(...args) { + var callback = args.pop(); + var sync = true; + args.push((...innerArgs) => { + if (sync) { + setImmediate$1(() => callback(...innerArgs)); + } else { + callback(...innerArgs); + } + }); + fn.apply(this, args); + sync = false; + }; + } + function every(coll, iteratee, callback) { + return _createTester((bool) => !bool, (res) => !res)(eachOf$1, coll, iteratee, callback); + } + var every$1 = awaitify(every, 3); + function everyLimit(coll, limit, iteratee, callback) { + return _createTester((bool) => !bool, (res) => !res)(eachOfLimit$2(limit), coll, iteratee, callback); + } + var everyLimit$1 = awaitify(everyLimit, 4); + function everySeries(coll, iteratee, callback) { + return _createTester((bool) => !bool, (res) => !res)(eachOfSeries$1, coll, iteratee, callback); + } + var everySeries$1 = awaitify(everySeries, 3); + function filterArray(eachfn, arr, iteratee, callback) { + var truthValues = new Array(arr.length); + eachfn(arr, (x, index2, iterCb) => { + iteratee(x, (err, v) => { + truthValues[index2] = !!v; + iterCb(err); + }); + }, (err) => { + if (err) return callback(err); + var results = []; + for (var i = 0; i < arr.length; i++) { + if (truthValues[i]) results.push(arr[i]); + } + callback(null, results); + }); + } + function filterGeneric(eachfn, coll, iteratee, callback) { + var results = []; + eachfn(coll, (x, index2, iterCb) => { + iteratee(x, (err, v) => { + if (err) return iterCb(err); + if (v) { + results.push({ index: index2, value: x }); + } + iterCb(err); + }); + }, (err) => { + if (err) return callback(err); + callback(null, results.sort((a, b) => a.index - b.index).map((v) => v.value)); + }); + } + function _filter(eachfn, coll, iteratee, callback) { + var filter2 = isArrayLike(coll) ? filterArray : filterGeneric; + return filter2(eachfn, coll, wrapAsync(iteratee), callback); + } + function filter(coll, iteratee, callback) { + return _filter(eachOf$1, coll, iteratee, callback); + } + var filter$1 = awaitify(filter, 3); + function filterLimit(coll, limit, iteratee, callback) { + return _filter(eachOfLimit$2(limit), coll, iteratee, callback); + } + var filterLimit$1 = awaitify(filterLimit, 4); + function filterSeries(coll, iteratee, callback) { + return _filter(eachOfSeries$1, coll, iteratee, callback); + } + var filterSeries$1 = awaitify(filterSeries, 3); + function forever(fn, errback) { + var done = onlyOnce(errback); + var task = wrapAsync(ensureAsync(fn)); + function next(err) { + if (err) return done(err); + if (err === false) return; + task(next); + } + return next(); + } + var forever$1 = awaitify(forever, 2); + function groupByLimit(coll, limit, iteratee, callback) { + var _iteratee = wrapAsync(iteratee); + return mapLimit$1(coll, limit, (val, iterCb) => { + _iteratee(val, (err, key) => { + if (err) return iterCb(err); + return iterCb(err, { key, val }); + }); + }, (err, mapResults) => { + var result = {}; + var { hasOwnProperty } = Object.prototype; + for (var i = 0; i < mapResults.length; i++) { + if (mapResults[i]) { + var { key } = mapResults[i]; + var { val } = mapResults[i]; + if (hasOwnProperty.call(result, key)) { + result[key].push(val); + } else { + result[key] = [val]; + } + } + } + return callback(err, result); + }); + } + var groupByLimit$1 = awaitify(groupByLimit, 4); + function groupBy(coll, iteratee, callback) { + return groupByLimit$1(coll, Infinity, iteratee, callback); + } + function groupBySeries(coll, iteratee, callback) { + return groupByLimit$1(coll, 1, iteratee, callback); + } + var log = consoleFunc("log"); + function mapValuesLimit(obj2, limit, iteratee, callback) { + callback = once(callback); + var newObj = {}; + var _iteratee = wrapAsync(iteratee); + return eachOfLimit$2(limit)(obj2, (val, key, next) => { + _iteratee(val, key, (err, result) => { + if (err) return next(err); + newObj[key] = result; + next(err); + }); + }, (err) => callback(err, newObj)); + } + var mapValuesLimit$1 = awaitify(mapValuesLimit, 4); + function mapValues(obj2, iteratee, callback) { + return mapValuesLimit$1(obj2, Infinity, iteratee, callback); + } + function mapValuesSeries(obj2, iteratee, callback) { + return mapValuesLimit$1(obj2, 1, iteratee, callback); + } + function memoize(fn, hasher = (v) => v) { + var memo = /* @__PURE__ */ Object.create(null); + var queues = /* @__PURE__ */ Object.create(null); + var _fn = wrapAsync(fn); + var memoized = initialParams((args, callback) => { + var key = hasher(...args); + if (key in memo) { + setImmediate$1(() => callback(null, ...memo[key])); + } else if (key in queues) { + queues[key].push(callback); + } else { + queues[key] = [callback]; + _fn(...args, (err, ...resultArgs) => { + if (!err) { + memo[key] = resultArgs; + } + var q = queues[key]; + delete queues[key]; + for (var i = 0, l2 = q.length; i < l2; i++) { + q[i](err, ...resultArgs); + } + }); + } + }); + memoized.memo = memo; + memoized.unmemoized = fn; + return memoized; + } + var _defer; + if (hasNextTick) { + _defer = process.nextTick; + } else if (hasSetImmediate) { + _defer = setImmediate; + } else { + _defer = fallback; + } + var nextTick = wrap(_defer); + var _parallel = awaitify((eachfn, tasks, callback) => { + var results = isArrayLike(tasks) ? [] : {}; + eachfn(tasks, (task, key, taskCb) => { + wrapAsync(task)((err, ...result) => { + if (result.length < 2) { + [result] = result; + } + results[key] = result; + taskCb(err); + }); + }, (err) => callback(err, results)); + }, 3); + function parallel(tasks, callback) { + return _parallel(eachOf$1, tasks, callback); + } + function parallelLimit(tasks, limit, callback) { + return _parallel(eachOfLimit$2(limit), tasks, callback); + } + function queue(worker, concurrency) { + var _worker = wrapAsync(worker); + return queue$1((items, cb) => { + _worker(items[0], cb); + }, concurrency, 1); + } + class Heap { + constructor() { + this.heap = []; + this.pushCount = Number.MIN_SAFE_INTEGER; + } + get length() { + return this.heap.length; + } + empty() { + this.heap = []; + return this; + } + percUp(index2) { + let p; + while (index2 > 0 && smaller(this.heap[index2], this.heap[p = parent(index2)])) { + let t = this.heap[index2]; + this.heap[index2] = this.heap[p]; + this.heap[p] = t; + index2 = p; + } + } + percDown(index2) { + let l2; + while ((l2 = leftChi(index2)) < this.heap.length) { + if (l2 + 1 < this.heap.length && smaller(this.heap[l2 + 1], this.heap[l2])) { + l2 = l2 + 1; + } + if (smaller(this.heap[index2], this.heap[l2])) { + break; + } + let t = this.heap[index2]; + this.heap[index2] = this.heap[l2]; + this.heap[l2] = t; + index2 = l2; + } + } + push(node) { + node.pushCount = ++this.pushCount; + this.heap.push(node); + this.percUp(this.heap.length - 1); + } + unshift(node) { + return this.heap.push(node); + } + shift() { + let [top] = this.heap; + this.heap[0] = this.heap[this.heap.length - 1]; + this.heap.pop(); + this.percDown(0); + return top; + } + toArray() { + return [...this]; + } + *[Symbol.iterator]() { + for (let i = 0; i < this.heap.length; i++) { + yield this.heap[i].data; + } + } + remove(testFn) { + let j = 0; + for (let i = 0; i < this.heap.length; i++) { + if (!testFn(this.heap[i])) { + this.heap[j] = this.heap[i]; + j++; + } + } + this.heap.splice(j); + for (let i = parent(this.heap.length - 1); i >= 0; i--) { + this.percDown(i); + } + return this; + } + } + function leftChi(i) { + return (i << 1) + 1; + } + function parent(i) { + return (i + 1 >> 1) - 1; + } + function smaller(x, y) { + if (x.priority !== y.priority) { + return x.priority < y.priority; + } else { + return x.pushCount < y.pushCount; + } + } + function priorityQueue(worker, concurrency) { + var q = queue(worker, concurrency); + var { + push, + pushAsync + } = q; + q._tasks = new Heap(); + q._createTaskItem = ({ data, priority }, callback) => { + return { + data, + priority, + callback + }; + }; + function createDataItems(tasks, priority) { + if (!Array.isArray(tasks)) { + return { data: tasks, priority }; + } + return tasks.map((data) => { + return { data, priority }; + }); + } + q.push = function(data, priority = 0, callback) { + return push(createDataItems(data, priority), callback); + }; + q.pushAsync = function(data, priority = 0, callback) { + return pushAsync(createDataItems(data, priority), callback); + }; + delete q.unshift; + delete q.unshiftAsync; + return q; + } + function race(tasks, callback) { + callback = once(callback); + if (!Array.isArray(tasks)) return callback(new TypeError("First argument to race must be an array of functions")); + if (!tasks.length) return callback(); + for (var i = 0, l2 = tasks.length; i < l2; i++) { + wrapAsync(tasks[i])(callback); + } + } + var race$1 = awaitify(race, 2); + function reduceRight(array, memo, iteratee, callback) { + var reversed = [...array].reverse(); + return reduce$1(reversed, memo, iteratee, callback); + } + function reflect(fn) { + var _fn = wrapAsync(fn); + return initialParams(function reflectOn(args, reflectCallback) { + args.push((error, ...cbArgs) => { + let retVal = {}; + if (error) { + retVal.error = error; + } + if (cbArgs.length > 0) { + var value = cbArgs; + if (cbArgs.length <= 1) { + [value] = cbArgs; + } + retVal.value = value; + } + reflectCallback(null, retVal); + }); + return _fn.apply(this, args); + }); + } + function reflectAll(tasks) { + var results; + if (Array.isArray(tasks)) { + results = tasks.map(reflect); + } else { + results = {}; + Object.keys(tasks).forEach((key) => { + results[key] = reflect.call(this, tasks[key]); + }); + } + return results; + } + function reject$2(eachfn, arr, _iteratee, callback) { + const iteratee = wrapAsync(_iteratee); + return _filter(eachfn, arr, (value, cb) => { + iteratee(value, (err, v) => { + cb(err, !v); + }); + }, callback); + } + function reject(coll, iteratee, callback) { + return reject$2(eachOf$1, coll, iteratee, callback); + } + var reject$1 = awaitify(reject, 3); + function rejectLimit(coll, limit, iteratee, callback) { + return reject$2(eachOfLimit$2(limit), coll, iteratee, callback); + } + var rejectLimit$1 = awaitify(rejectLimit, 4); + function rejectSeries(coll, iteratee, callback) { + return reject$2(eachOfSeries$1, coll, iteratee, callback); + } + var rejectSeries$1 = awaitify(rejectSeries, 3); + function constant(value) { + return function() { + return value; + }; + } + const DEFAULT_TIMES = 5; + const DEFAULT_INTERVAL = 0; + function retry(opts, task, callback) { + var options = { + times: DEFAULT_TIMES, + intervalFunc: constant(DEFAULT_INTERVAL) + }; + if (arguments.length < 3 && typeof opts === "function") { + callback = task || promiseCallback(); + task = opts; + } else { + parseTimes(options, opts); + callback = callback || promiseCallback(); + } + if (typeof task !== "function") { + throw new Error("Invalid arguments for async.retry"); + } + var _task = wrapAsync(task); + var attempt = 1; + function retryAttempt() { + _task((err, ...args) => { + if (err === false) return; + if (err && attempt++ < options.times && (typeof options.errorFilter != "function" || options.errorFilter(err))) { + setTimeout(retryAttempt, options.intervalFunc(attempt - 1)); + } else { + callback(err, ...args); + } + }); + } + retryAttempt(); + return callback[PROMISE_SYMBOL]; + } + function parseTimes(acc, t) { + if (typeof t === "object") { + acc.times = +t.times || DEFAULT_TIMES; + acc.intervalFunc = typeof t.interval === "function" ? t.interval : constant(+t.interval || DEFAULT_INTERVAL); + acc.errorFilter = t.errorFilter; + } else if (typeof t === "number" || typeof t === "string") { + acc.times = +t || DEFAULT_TIMES; + } else { + throw new Error("Invalid arguments for async.retry"); + } + } + function retryable(opts, task) { + if (!task) { + task = opts; + opts = null; + } + let arity = opts && opts.arity || task.length; + if (isAsync(task)) { + arity += 1; + } + var _task = wrapAsync(task); + return initialParams((args, callback) => { + if (args.length < arity - 1 || callback == null) { + args.push(callback); + callback = promiseCallback(); + } + function taskFn(cb) { + _task(...args, cb); + } + if (opts) retry(opts, taskFn, callback); + else retry(taskFn, callback); + return callback[PROMISE_SYMBOL]; + }); + } + function series(tasks, callback) { + return _parallel(eachOfSeries$1, tasks, callback); + } + function some(coll, iteratee, callback) { + return _createTester(Boolean, (res) => res)(eachOf$1, coll, iteratee, callback); + } + var some$1 = awaitify(some, 3); + function someLimit(coll, limit, iteratee, callback) { + return _createTester(Boolean, (res) => res)(eachOfLimit$2(limit), coll, iteratee, callback); + } + var someLimit$1 = awaitify(someLimit, 4); + function someSeries(coll, iteratee, callback) { + return _createTester(Boolean, (res) => res)(eachOfSeries$1, coll, iteratee, callback); + } + var someSeries$1 = awaitify(someSeries, 3); + function sortBy(coll, iteratee, callback) { + var _iteratee = wrapAsync(iteratee); + return map$1(coll, (x, iterCb) => { + _iteratee(x, (err, criteria) => { + if (err) return iterCb(err); + iterCb(err, { value: x, criteria }); + }); + }, (err, results) => { + if (err) return callback(err); + callback(null, results.sort(comparator).map((v) => v.value)); + }); + function comparator(left, right) { + var a = left.criteria, b = right.criteria; + return a < b ? -1 : a > b ? 1 : 0; + } + } + var sortBy$1 = awaitify(sortBy, 3); + function timeout(asyncFn, milliseconds, info) { + var fn = wrapAsync(asyncFn); + return initialParams((args, callback) => { + var timedOut = false; + var timer; + function timeoutCallback() { + var name = asyncFn.name || "anonymous"; + var error = new Error('Callback function "' + name + '" timed out.'); + error.code = "ETIMEDOUT"; + if (info) { + error.info = info; + } + timedOut = true; + callback(error); + } + args.push((...cbArgs) => { + if (!timedOut) { + callback(...cbArgs); + clearTimeout(timer); + } + }); + timer = setTimeout(timeoutCallback, milliseconds); + fn(...args); + }); + } + function range(size) { + var result = Array(size); + while (size--) { + result[size] = size; + } + return result; + } + function timesLimit(count, limit, iteratee, callback) { + var _iteratee = wrapAsync(iteratee); + return mapLimit$1(range(count), limit, _iteratee, callback); + } + function times(n, iteratee, callback) { + return timesLimit(n, Infinity, iteratee, callback); + } + function timesSeries(n, iteratee, callback) { + return timesLimit(n, 1, iteratee, callback); + } + function transform(coll, accumulator, iteratee, callback) { + if (arguments.length <= 3 && typeof accumulator === "function") { + callback = iteratee; + iteratee = accumulator; + accumulator = Array.isArray(coll) ? [] : {}; + } + callback = once(callback || promiseCallback()); + var _iteratee = wrapAsync(iteratee); + eachOf$1(coll, (v, k, cb) => { + _iteratee(accumulator, v, k, cb); + }, (err) => callback(err, accumulator)); + return callback[PROMISE_SYMBOL]; + } + function tryEach(tasks, callback) { + var error = null; + var result; + return eachSeries$1(tasks, (task, taskCb) => { + wrapAsync(task)((err, ...args) => { + if (err === false) return taskCb(err); + if (args.length < 2) { + [result] = args; + } else { + result = args; + } + error = err; + taskCb(err ? null : {}); + }); + }, () => callback(error, result)); + } + var tryEach$1 = awaitify(tryEach); + function unmemoize(fn) { + return (...args) => { + return (fn.unmemoized || fn)(...args); + }; + } + function whilst(test, iteratee, callback) { + callback = onlyOnce(callback); + var _fn = wrapAsync(iteratee); + var _test = wrapAsync(test); + var results = []; + function next(err, ...rest) { + if (err) return callback(err); + results = rest; + if (err === false) return; + _test(check); + } + function check(err, truth) { + if (err) return callback(err); + if (err === false) return; + if (!truth) return callback(null, ...results); + _fn(next); + } + return _test(check); + } + var whilst$1 = awaitify(whilst, 3); + function until(test, iteratee, callback) { + const _test = wrapAsync(test); + return whilst$1((cb) => _test((err, truth) => cb(err, !truth)), iteratee, callback); + } + function waterfall(tasks, callback) { + callback = once(callback); + if (!Array.isArray(tasks)) return callback(new Error("First argument to waterfall must be an array of functions")); + if (!tasks.length) return callback(); + var taskIndex = 0; + function nextTask(args) { + var task = wrapAsync(tasks[taskIndex++]); + task(...args, onlyOnce(next)); + } + function next(err, ...args) { + if (err === false) return; + if (err || taskIndex === tasks.length) { + return callback(err, ...args); + } + nextTask(args); + } + nextTask([]); + } + var waterfall$1 = awaitify(waterfall); + var index = { + apply, + applyEach, + applyEachSeries, + asyncify, + auto, + autoInject, + cargo: cargo$1, + cargoQueue: cargo, + compose, + concat: concat$1, + concatLimit: concatLimit$1, + concatSeries: concatSeries$1, + constant: constant$1, + detect: detect$1, + detectLimit: detectLimit$1, + detectSeries: detectSeries$1, + dir, + doUntil, + doWhilst: doWhilst$1, + each, + eachLimit: eachLimit$1, + eachOf: eachOf$1, + eachOfLimit: eachOfLimit$1, + eachOfSeries: eachOfSeries$1, + eachSeries: eachSeries$1, + ensureAsync, + every: every$1, + everyLimit: everyLimit$1, + everySeries: everySeries$1, + filter: filter$1, + filterLimit: filterLimit$1, + filterSeries: filterSeries$1, + forever: forever$1, + groupBy, + groupByLimit: groupByLimit$1, + groupBySeries, + log, + map: map$1, + mapLimit: mapLimit$1, + mapSeries: mapSeries$1, + mapValues, + mapValuesLimit: mapValuesLimit$1, + mapValuesSeries, + memoize, + nextTick, + parallel, + parallelLimit, + priorityQueue, + queue, + race: race$1, + reduce: reduce$1, + reduceRight, + reflect, + reflectAll, + reject: reject$1, + rejectLimit: rejectLimit$1, + rejectSeries: rejectSeries$1, + retry, + retryable, + seq, + series, + setImmediate: setImmediate$1, + some: some$1, + someLimit: someLimit$1, + someSeries: someSeries$1, + sortBy: sortBy$1, + timeout, + times, + timesLimit, + timesSeries, + transform, + tryEach: tryEach$1, + unmemoize, + until, + waterfall: waterfall$1, + whilst: whilst$1, + // aliases + all: every$1, + allLimit: everyLimit$1, + allSeries: everySeries$1, + any: some$1, + anyLimit: someLimit$1, + anySeries: someSeries$1, + find: detect$1, + findLimit: detectLimit$1, + findSeries: detectSeries$1, + flatMap: concat$1, + flatMapLimit: concatLimit$1, + flatMapSeries: concatSeries$1, + forEach: each, + forEachSeries: eachSeries$1, + forEachLimit: eachLimit$1, + forEachOf: eachOf$1, + forEachOfSeries: eachOfSeries$1, + forEachOfLimit: eachOfLimit$1, + inject: reduce$1, + foldl: reduce$1, + foldr: reduceRight, + select: filter$1, + selectLimit: filterLimit$1, + selectSeries: filterSeries$1, + wrapSync: asyncify, + during: whilst$1, + doDuring: doWhilst$1 + }; + exports3.all = every$1; + exports3.allLimit = everyLimit$1; + exports3.allSeries = everySeries$1; + exports3.any = some$1; + exports3.anyLimit = someLimit$1; + exports3.anySeries = someSeries$1; + exports3.apply = apply; + exports3.applyEach = applyEach; + exports3.applyEachSeries = applyEachSeries; + exports3.asyncify = asyncify; + exports3.auto = auto; + exports3.autoInject = autoInject; + exports3.cargo = cargo$1; + exports3.cargoQueue = cargo; + exports3.compose = compose; + exports3.concat = concat$1; + exports3.concatLimit = concatLimit$1; + exports3.concatSeries = concatSeries$1; + exports3.constant = constant$1; + exports3.default = index; + exports3.detect = detect$1; + exports3.detectLimit = detectLimit$1; + exports3.detectSeries = detectSeries$1; + exports3.dir = dir; + exports3.doDuring = doWhilst$1; + exports3.doUntil = doUntil; + exports3.doWhilst = doWhilst$1; + exports3.during = whilst$1; + exports3.each = each; + exports3.eachLimit = eachLimit$1; + exports3.eachOf = eachOf$1; + exports3.eachOfLimit = eachOfLimit$1; + exports3.eachOfSeries = eachOfSeries$1; + exports3.eachSeries = eachSeries$1; + exports3.ensureAsync = ensureAsync; + exports3.every = every$1; + exports3.everyLimit = everyLimit$1; + exports3.everySeries = everySeries$1; + exports3.filter = filter$1; + exports3.filterLimit = filterLimit$1; + exports3.filterSeries = filterSeries$1; + exports3.find = detect$1; + exports3.findLimit = detectLimit$1; + exports3.findSeries = detectSeries$1; + exports3.flatMap = concat$1; + exports3.flatMapLimit = concatLimit$1; + exports3.flatMapSeries = concatSeries$1; + exports3.foldl = reduce$1; + exports3.foldr = reduceRight; + exports3.forEach = each; + exports3.forEachLimit = eachLimit$1; + exports3.forEachOf = eachOf$1; + exports3.forEachOfLimit = eachOfLimit$1; + exports3.forEachOfSeries = eachOfSeries$1; + exports3.forEachSeries = eachSeries$1; + exports3.forever = forever$1; + exports3.groupBy = groupBy; + exports3.groupByLimit = groupByLimit$1; + exports3.groupBySeries = groupBySeries; + exports3.inject = reduce$1; + exports3.log = log; + exports3.map = map$1; + exports3.mapLimit = mapLimit$1; + exports3.mapSeries = mapSeries$1; + exports3.mapValues = mapValues; + exports3.mapValuesLimit = mapValuesLimit$1; + exports3.mapValuesSeries = mapValuesSeries; + exports3.memoize = memoize; + exports3.nextTick = nextTick; + exports3.parallel = parallel; + exports3.parallelLimit = parallelLimit; + exports3.priorityQueue = priorityQueue; + exports3.queue = queue; + exports3.race = race$1; + exports3.reduce = reduce$1; + exports3.reduceRight = reduceRight; + exports3.reflect = reflect; + exports3.reflectAll = reflectAll; + exports3.reject = reject$1; + exports3.rejectLimit = rejectLimit$1; + exports3.rejectSeries = rejectSeries$1; + exports3.retry = retry; + exports3.retryable = retryable; + exports3.select = filter$1; + exports3.selectLimit = filterLimit$1; + exports3.selectSeries = filterSeries$1; + exports3.seq = seq; + exports3.series = series; + exports3.setImmediate = setImmediate$1; + exports3.some = some$1; + exports3.someLimit = someLimit$1; + exports3.someSeries = someSeries$1; + exports3.sortBy = sortBy$1; + exports3.timeout = timeout; + exports3.times = times; + exports3.timesLimit = timesLimit; + exports3.timesSeries = timesSeries; + exports3.transform = transform; + exports3.tryEach = tryEach$1; + exports3.unmemoize = unmemoize; + exports3.until = until; + exports3.waterfall = waterfall$1; + exports3.whilst = whilst$1; + exports3.wrapSync = asyncify; + Object.defineProperty(exports3, "__esModule", { value: true }); + })); + } +}); + +// ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js +var require_polyfills = __commonJS({ + "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js"(exports2, module2) { + var constants = require("constants"); + var origCwd = process.cwd; + var cwd = null; + var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform; + process.cwd = function() { + if (!cwd) + cwd = origCwd.call(process); + return cwd; + }; + try { + process.cwd(); + } catch (er) { + } + if (typeof process.chdir === "function") { + chdir = process.chdir; + process.chdir = function(d) { + cwd = null; + chdir.call(process, d); + }; + if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir); + } + var chdir; + module2.exports = patch; + function patch(fs) { + if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { + patchLchmod(fs); + } + if (!fs.lutimes) { + patchLutimes(fs); + } + fs.chown = chownFix(fs.chown); + fs.fchown = chownFix(fs.fchown); + fs.lchown = chownFix(fs.lchown); + fs.chmod = chmodFix(fs.chmod); + fs.fchmod = chmodFix(fs.fchmod); + fs.lchmod = chmodFix(fs.lchmod); + fs.chownSync = chownFixSync(fs.chownSync); + fs.fchownSync = chownFixSync(fs.fchownSync); + fs.lchownSync = chownFixSync(fs.lchownSync); + fs.chmodSync = chmodFixSync(fs.chmodSync); + fs.fchmodSync = chmodFixSync(fs.fchmodSync); + fs.lchmodSync = chmodFixSync(fs.lchmodSync); + fs.stat = statFix(fs.stat); + fs.fstat = statFix(fs.fstat); + fs.lstat = statFix(fs.lstat); + fs.statSync = statFixSync(fs.statSync); + fs.fstatSync = statFixSync(fs.fstatSync); + fs.lstatSync = statFixSync(fs.lstatSync); + if (fs.chmod && !fs.lchmod) { + fs.lchmod = function(path, mode, cb) { + if (cb) process.nextTick(cb); + }; + fs.lchmodSync = function() { + }; + } + if (fs.chown && !fs.lchown) { + fs.lchown = function(path, uid, gid, cb) { + if (cb) process.nextTick(cb); + }; + fs.lchownSync = function() { + }; + } + if (platform === "win32") { + fs.rename = typeof fs.rename !== "function" ? fs.rename : (function(fs$rename) { + function rename(from, to, cb) { + var start = Date.now(); + var backoff = 0; + fs$rename(from, to, function CB(er) { + if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) { + setTimeout(function() { + fs.stat(to, function(stater, st) { + if (stater && stater.code === "ENOENT") + fs$rename(from, to, CB); + else + cb(er); + }); + }, backoff); + if (backoff < 100) + backoff += 10; + return; + } + if (cb) cb(er); + }); + } + if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename); + return rename; + })(fs.rename); + } + fs.read = typeof fs.read !== "function" ? fs.read : (function(fs$read) { + function read(fd, buffer, offset, length, position, callback_) { + var callback; + if (callback_ && typeof callback_ === "function") { + var eagCounter = 0; + callback = function(er, _2, __) { + if (er && er.code === "EAGAIN" && eagCounter < 10) { + eagCounter++; + return fs$read.call(fs, fd, buffer, offset, length, position, callback); + } + callback_.apply(this, arguments); + }; + } + return fs$read.call(fs, fd, buffer, offset, length, position, callback); + } + if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read); + return read; + })(fs.read); + fs.readSync = typeof fs.readSync !== "function" ? fs.readSync : /* @__PURE__ */ (function(fs$readSync) { + return function(fd, buffer, offset, length, position) { + var eagCounter = 0; + while (true) { + try { + return fs$readSync.call(fs, fd, buffer, offset, length, position); + } catch (er) { + if (er.code === "EAGAIN" && eagCounter < 10) { + eagCounter++; + continue; + } + throw er; + } + } + }; + })(fs.readSync); + function patchLchmod(fs2) { + fs2.lchmod = function(path, mode, callback) { + fs2.open( + path, + constants.O_WRONLY | constants.O_SYMLINK, + mode, + function(err, fd) { + if (err) { + if (callback) callback(err); + return; + } + fs2.fchmod(fd, mode, function(err2) { + fs2.close(fd, function(err22) { + if (callback) callback(err2 || err22); + }); + }); + } + ); + }; + fs2.lchmodSync = function(path, mode) { + var fd = fs2.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode); + var threw = true; + var ret2; + try { + ret2 = fs2.fchmodSync(fd, mode); + threw = false; + } finally { + if (threw) { + try { + fs2.closeSync(fd); + } catch (er) { + } + } else { + fs2.closeSync(fd); + } + } + return ret2; + }; + } + function patchLutimes(fs2) { + if (constants.hasOwnProperty("O_SYMLINK") && fs2.futimes) { + fs2.lutimes = function(path, at, mt, cb) { + fs2.open(path, constants.O_SYMLINK, function(er, fd) { + if (er) { + if (cb) cb(er); + return; + } + fs2.futimes(fd, at, mt, function(er2) { + fs2.close(fd, function(er22) { + if (cb) cb(er2 || er22); + }); + }); + }); + }; + fs2.lutimesSync = function(path, at, mt) { + var fd = fs2.openSync(path, constants.O_SYMLINK); + var ret2; + var threw = true; + try { + ret2 = fs2.futimesSync(fd, at, mt); + threw = false; + } finally { + if (threw) { + try { + fs2.closeSync(fd); + } catch (er) { + } + } else { + fs2.closeSync(fd); + } + } + return ret2; + }; + } else if (fs2.futimes) { + fs2.lutimes = function(_a, _b, _c, cb) { + if (cb) process.nextTick(cb); + }; + fs2.lutimesSync = function() { + }; + } + } + function chmodFix(orig) { + if (!orig) return orig; + return function(target, mode, cb) { + return orig.call(fs, target, mode, function(er) { + if (chownErOk(er)) er = null; + if (cb) cb.apply(this, arguments); + }); + }; + } + function chmodFixSync(orig) { + if (!orig) return orig; + return function(target, mode) { + try { + return orig.call(fs, target, mode); + } catch (er) { + if (!chownErOk(er)) throw er; + } + }; + } + function chownFix(orig) { + if (!orig) return orig; + return function(target, uid, gid, cb) { + return orig.call(fs, target, uid, gid, function(er) { + if (chownErOk(er)) er = null; + if (cb) cb.apply(this, arguments); + }); + }; + } + function chownFixSync(orig) { + if (!orig) return orig; + return function(target, uid, gid) { + try { + return orig.call(fs, target, uid, gid); + } catch (er) { + if (!chownErOk(er)) throw er; + } + }; + } + function statFix(orig) { + if (!orig) return orig; + return function(target, options, cb) { + if (typeof options === "function") { + cb = options; + options = null; + } + function callback(er, stats) { + if (stats) { + if (stats.uid < 0) stats.uid += 4294967296; + if (stats.gid < 0) stats.gid += 4294967296; + } + if (cb) cb.apply(this, arguments); + } + return options ? orig.call(fs, target, options, callback) : orig.call(fs, target, callback); + }; + } + function statFixSync(orig) { + if (!orig) return orig; + return function(target, options) { + var stats = options ? orig.call(fs, target, options) : orig.call(fs, target); + if (stats) { + if (stats.uid < 0) stats.uid += 4294967296; + if (stats.gid < 0) stats.gid += 4294967296; + } + return stats; + }; + } + function chownErOk(er) { + if (!er) + return true; + if (er.code === "ENOSYS") + return true; + var nonroot = !process.getuid || process.getuid() !== 0; + if (nonroot) { + if (er.code === "EINVAL" || er.code === "EPERM") + return true; + } + return false; + } + } + } +}); + +// ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js +var require_legacy_streams = __commonJS({ + "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports2, module2) { + var Stream = require("stream").Stream; + module2.exports = legacy; + function legacy(fs) { + return { + ReadStream, + WriteStream + }; + function ReadStream(path, options) { + if (!(this instanceof ReadStream)) return new ReadStream(path, options); + Stream.call(this); + var self2 = this; + this.path = path; + this.fd = null; + this.readable = true; + this.paused = false; + this.flags = "r"; + this.mode = 438; + this.bufferSize = 64 * 1024; + options = options || {}; + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + if (this.encoding) this.setEncoding(this.encoding); + if (this.start !== void 0) { + if ("number" !== typeof this.start) { + throw TypeError("start must be a Number"); + } + if (this.end === void 0) { + this.end = Infinity; + } else if ("number" !== typeof this.end) { + throw TypeError("end must be a Number"); + } + if (this.start > this.end) { + throw new Error("start must be <= end"); + } + this.pos = this.start; + } + if (this.fd !== null) { + process.nextTick(function() { + self2._read(); + }); + return; + } + fs.open(this.path, this.flags, this.mode, function(err, fd) { + if (err) { + self2.emit("error", err); + self2.readable = false; + return; + } + self2.fd = fd; + self2.emit("open", fd); + self2._read(); + }); + } + function WriteStream(path, options) { + if (!(this instanceof WriteStream)) return new WriteStream(path, options); + Stream.call(this); + this.path = path; + this.fd = null; + this.writable = true; + this.flags = "w"; + this.encoding = "binary"; + this.mode = 438; + this.bytesWritten = 0; + options = options || {}; + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } + if (this.start !== void 0) { + if ("number" !== typeof this.start) { + throw TypeError("start must be a Number"); + } + if (this.start < 0) { + throw new Error("start must be >= zero"); + } + this.pos = this.start; + } + this.busy = false; + this._queue = []; + if (this.fd === null) { + this._open = fs.open; + this._queue.push([this._open, this.path, this.flags, this.mode, void 0]); + this.flush(); + } + } + } + } +}); + +// ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js +var require_clone = __commonJS({ + "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js"(exports2, module2) { + "use strict"; + module2.exports = clone; + var getPrototypeOf = Object.getPrototypeOf || function(obj2) { + return obj2.__proto__; + }; + function clone(obj2) { + if (obj2 === null || typeof obj2 !== "object") + return obj2; + if (obj2 instanceof Object) + var copy = { __proto__: getPrototypeOf(obj2) }; + else + var copy = /* @__PURE__ */ Object.create(null); + Object.getOwnPropertyNames(obj2).forEach(function(key) { + Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj2, key)); + }); + return copy; + } + } +}); + +// ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js +var require_graceful_fs = __commonJS({ + "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports2, module2) { + var fs = require("fs"); + var polyfills = require_polyfills(); + var legacy = require_legacy_streams(); + var clone = require_clone(); + var util2 = require("util"); + var gracefulQueue; + var previousSymbol; + if (typeof Symbol === "function" && typeof Symbol.for === "function") { + gracefulQueue = Symbol.for("graceful-fs.queue"); + previousSymbol = Symbol.for("graceful-fs.previous"); + } else { + gracefulQueue = "___graceful-fs.queue"; + previousSymbol = "___graceful-fs.previous"; + } + function noop() { + } + function publishQueue(context, queue2) { + Object.defineProperty(context, gracefulQueue, { + get: function() { + return queue2; + } + }); + } + var debug = noop; + if (util2.debuglog) + debug = util2.debuglog("gfs4"); + else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) + debug = function() { + var m = util2.format.apply(util2, arguments); + m = "GFS4: " + m.split(/\n/).join("\nGFS4: "); + console.error(m); + }; + if (!fs[gracefulQueue]) { + queue = global[gracefulQueue] || []; + publishQueue(fs, queue); + fs.close = (function(fs$close) { + function close(fd, cb) { + return fs$close.call(fs, fd, function(err) { + if (!err) { + resetQueue(); + } + if (typeof cb === "function") + cb.apply(this, arguments); + }); + } + Object.defineProperty(close, previousSymbol, { + value: fs$close + }); + return close; + })(fs.close); + fs.closeSync = (function(fs$closeSync) { + function closeSync(fd) { + fs$closeSync.apply(fs, arguments); + resetQueue(); + } + Object.defineProperty(closeSync, previousSymbol, { + value: fs$closeSync + }); + return closeSync; + })(fs.closeSync); + if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) { + process.on("exit", function() { + debug(fs[gracefulQueue]); + require("assert").equal(fs[gracefulQueue].length, 0); + }); + } + } + var queue; + if (!global[gracefulQueue]) { + publishQueue(global, fs[gracefulQueue]); + } + module2.exports = patch(clone(fs)); + if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) { + module2.exports = patch(fs); + fs.__patched = true; + } + function patch(fs2) { + polyfills(fs2); + fs2.gracefulify = patch; + fs2.createReadStream = createReadStream; + fs2.createWriteStream = createWriteStream; + var fs$readFile = fs2.readFile; + fs2.readFile = readFile; + function readFile(path, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$readFile(path, options, cb); + function go$readFile(path2, options2, cb2, startTime) { + return fs$readFile(path2, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$readFile, [path2, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$writeFile = fs2.writeFile; + fs2.writeFile = writeFile; + function writeFile(path, data, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$writeFile(path, data, options, cb); + function go$writeFile(path2, data2, options2, cb2, startTime) { + return fs$writeFile(path2, data2, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$writeFile, [path2, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$appendFile = fs2.appendFile; + if (fs$appendFile) + fs2.appendFile = appendFile; + function appendFile(path, data, options, cb) { + if (typeof options === "function") + cb = options, options = null; + return go$appendFile(path, data, options, cb); + function go$appendFile(path2, data2, options2, cb2, startTime) { + return fs$appendFile(path2, data2, options2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$appendFile, [path2, data2, options2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$copyFile = fs2.copyFile; + if (fs$copyFile) + fs2.copyFile = copyFile; + function copyFile(src, dest, flags, cb) { + if (typeof flags === "function") { + cb = flags; + flags = 0; + } + return go$copyFile(src, dest, flags, cb); + function go$copyFile(src2, dest2, flags2, cb2, startTime) { + return fs$copyFile(src2, dest2, flags2, function(err) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + var fs$readdir = fs2.readdir; + fs2.readdir = readdir; + var noReaddirOptionVersions = /^v[0-5]\./; + function readdir(path, options, cb) { + if (typeof options === "function") + cb = options, options = null; + var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path2, options2, cb2, startTime) { + return fs$readdir(path2, fs$readdirCallback( + path2, + options2, + cb2, + startTime + )); + } : function go$readdir2(path2, options2, cb2, startTime) { + return fs$readdir(path2, options2, fs$readdirCallback( + path2, + options2, + cb2, + startTime + )); + }; + return go$readdir(path, options, cb); + function fs$readdirCallback(path2, options2, cb2, startTime) { + return function(err, files) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([ + go$readdir, + [path2, options2, cb2], + err, + startTime || Date.now(), + Date.now() + ]); + else { + if (files && files.sort) + files.sort(); + if (typeof cb2 === "function") + cb2.call(this, err, files); + } + }; + } + } + if (process.version.substr(0, 4) === "v0.8") { + var legStreams = legacy(fs2); + ReadStream = legStreams.ReadStream; + WriteStream = legStreams.WriteStream; + } + var fs$ReadStream = fs2.ReadStream; + if (fs$ReadStream) { + ReadStream.prototype = Object.create(fs$ReadStream.prototype); + ReadStream.prototype.open = ReadStream$open; + } + var fs$WriteStream = fs2.WriteStream; + if (fs$WriteStream) { + WriteStream.prototype = Object.create(fs$WriteStream.prototype); + WriteStream.prototype.open = WriteStream$open; + } + Object.defineProperty(fs2, "ReadStream", { + get: function() { + return ReadStream; + }, + set: function(val) { + ReadStream = val; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(fs2, "WriteStream", { + get: function() { + return WriteStream; + }, + set: function(val) { + WriteStream = val; + }, + enumerable: true, + configurable: true + }); + var FileReadStream = ReadStream; + Object.defineProperty(fs2, "FileReadStream", { + get: function() { + return FileReadStream; + }, + set: function(val) { + FileReadStream = val; + }, + enumerable: true, + configurable: true + }); + var FileWriteStream = WriteStream; + Object.defineProperty(fs2, "FileWriteStream", { + get: function() { + return FileWriteStream; + }, + set: function(val) { + FileWriteStream = val; + }, + enumerable: true, + configurable: true + }); + function ReadStream(path, options) { + if (this instanceof ReadStream) + return fs$ReadStream.apply(this, arguments), this; + else + return ReadStream.apply(Object.create(ReadStream.prototype), arguments); + } + function ReadStream$open() { + var that = this; + open(that.path, that.flags, that.mode, function(err, fd) { + if (err) { + if (that.autoClose) + that.destroy(); + that.emit("error", err); + } else { + that.fd = fd; + that.emit("open", fd); + that.read(); + } + }); + } + function WriteStream(path, options) { + if (this instanceof WriteStream) + return fs$WriteStream.apply(this, arguments), this; + else + return WriteStream.apply(Object.create(WriteStream.prototype), arguments); + } + function WriteStream$open() { + var that = this; + open(that.path, that.flags, that.mode, function(err, fd) { + if (err) { + that.destroy(); + that.emit("error", err); + } else { + that.fd = fd; + that.emit("open", fd); + } + }); + } + function createReadStream(path, options) { + return new fs2.ReadStream(path, options); + } + function createWriteStream(path, options) { + return new fs2.WriteStream(path, options); + } + var fs$open = fs2.open; + fs2.open = open; + function open(path, flags, mode, cb) { + if (typeof mode === "function") + cb = mode, mode = null; + return go$open(path, flags, mode, cb); + function go$open(path2, flags2, mode2, cb2, startTime) { + return fs$open(path2, flags2, mode2, function(err, fd) { + if (err && (err.code === "EMFILE" || err.code === "ENFILE")) + enqueue([go$open, [path2, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]); + else { + if (typeof cb2 === "function") + cb2.apply(this, arguments); + } + }); + } + } + return fs2; + } + function enqueue(elem) { + debug("ENQUEUE", elem[0].name, elem[1]); + fs[gracefulQueue].push(elem); + retry(); + } + var retryTimer; + function resetQueue() { + var now = Date.now(); + for (var i = 0; i < fs[gracefulQueue].length; ++i) { + if (fs[gracefulQueue][i].length > 2) { + fs[gracefulQueue][i][3] = now; + fs[gracefulQueue][i][4] = now; + } + } + retry(); + } + function retry() { + clearTimeout(retryTimer); + retryTimer = void 0; + if (fs[gracefulQueue].length === 0) + return; + var elem = fs[gracefulQueue].shift(); + var fn = elem[0]; + var args = elem[1]; + var err = elem[2]; + var startTime = elem[3]; + var lastTime = elem[4]; + if (startTime === void 0) { + debug("RETRY", fn.name, args); + fn.apply(null, args); + } else if (Date.now() - startTime >= 6e4) { + debug("TIMEOUT", fn.name, args); + var cb = args.pop(); + if (typeof cb === "function") + cb.call(null, err); + } else { + var sinceAttempt = Date.now() - lastTime; + var sinceStart = Math.max(lastTime - startTime, 1); + var desiredDelay = Math.min(sinceStart * 1.2, 100); + if (sinceAttempt >= desiredDelay) { + debug("RETRY", fn.name, args); + fn.apply(null, args.concat([startTime])); + } else { + fs[gracefulQueue].push(elem); + } + } + if (retryTimer === void 0) { + retryTimer = setTimeout(retry, 0); + } + } + } +}); + +// ../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/passthrough.js +var require_passthrough = __commonJS({ + "../../node_modules/.pnpm/readable-stream@2.3.8/node_modules/readable-stream/passthrough.js"(exports2, module2) { + module2.exports = require_readable2().PassThrough; + } +}); + +// ../../node_modules/.pnpm/lazystream@1.0.1/node_modules/lazystream/lib/lazystream.js +var require_lazystream = __commonJS({ + "../../node_modules/.pnpm/lazystream@1.0.1/node_modules/lazystream/lib/lazystream.js"(exports2, module2) { + var util2 = require("util"); + var PassThrough = require_passthrough(); + module2.exports = { + Readable, + Writable + }; + util2.inherits(Readable, PassThrough); + util2.inherits(Writable, PassThrough); + function beforeFirstCall(instance, method, callback) { + instance[method] = function() { + delete instance[method]; + callback.apply(this, arguments); + return this[method].apply(this, arguments); + }; + } + function Readable(fn, options) { + if (!(this instanceof Readable)) + return new Readable(fn, options); + PassThrough.call(this, options); + beforeFirstCall(this, "_read", function() { + var source = fn.call(this, options); + var emit = this.emit.bind(this, "error"); + source.on("error", emit); + source.pipe(this); + }); + this.emit("readable"); + } + function Writable(fn, options) { + if (!(this instanceof Writable)) + return new Writable(fn, options); + PassThrough.call(this, options); + beforeFirstCall(this, "_write", function() { + var destination = fn.call(this, options); + var emit = this.emit.bind(this, "error"); + destination.on("error", emit); + this.pipe(destination); + }); + this.emit("writable"); + } + } +}); + +// ../../node_modules/.pnpm/normalize-path@3.0.0/node_modules/normalize-path/index.js +var require_normalize_path = __commonJS({ + "../../node_modules/.pnpm/normalize-path@3.0.0/node_modules/normalize-path/index.js"(exports2, module2) { + module2.exports = function(path, stripTrailing) { + if (typeof path !== "string") { + throw new TypeError("expected path to be a string"); + } + if (path === "\\" || path === "/") return "/"; + var len = path.length; + if (len <= 1) return path; + var prefix = ""; + if (len > 4 && path[3] === "\\") { + var ch = path[2]; + if ((ch === "?" || ch === ".") && path.slice(0, 2) === "\\\\") { + path = path.slice(2); + prefix = "//"; + } + } + var segs = path.split(/[/\\]+/); + if (stripTrailing !== false && segs[segs.length - 1] === "") { + segs.pop(); + } + return prefix + segs.join("/"); + }; + } +}); + +// ../../node_modules/.pnpm/lodash.defaults@4.2.0/node_modules/lodash.defaults/index.js +var require_lodash15 = __commonJS({ + "../../node_modules/.pnpm/lodash.defaults@4.2.0/node_modules/lodash.defaults/index.js"(exports2, module2) { + var MAX_SAFE_INTEGER = 9007199254740991; + var argsTag = "[object Arguments]"; + var funcTag = "[object Function]"; + var genTag = "[object GeneratorFunction]"; + var reIsUint = /^(?:0|[1-9]\d*)$/; + function apply(func, thisArg, args) { + switch (args.length) { + case 0: + return func.call(thisArg); + case 1: + return func.call(thisArg, args[0]); + case 2: + return func.call(thisArg, args[0], args[1]); + case 3: + return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + function baseTimes(n, iteratee) { + var index = -1, result = Array(n); + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + var objectToString = objectProto.toString; + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + var nativeMax = Math.max; + function arrayLikeKeys(value, inherited) { + var result = isArray(value) || isArguments(value) ? baseTimes(value.length, String) : []; + var length = result.length, skipIndexes = !!length; + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && !(skipIndexes && (key == "length" || isIndex(key, length)))) { + result.push(key); + } + } + return result; + } + function assignInDefaults(objValue, srcValue, key, object) { + if (objValue === void 0 || eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key)) { + return srcValue; + } + return objValue; + } + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || value === void 0 && !(key in object)) { + object[key] = value; + } + } + function baseKeysIn(object) { + if (!isObject2(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), result = []; + for (var key in object) { + if (!(key == "constructor" && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } + function baseRest(func, start) { + start = nativeMax(start === void 0 ? func.length - 1 : start, 0); + return function() { + var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length); + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = array; + return apply(func, this, otherArgs); + }; + } + function copyObject(source, props, object, customizer) { + object || (object = {}); + var index = -1, length = props.length; + while (++index < length) { + var key = props[index]; + var newValue = customizer ? customizer(object[key], source[key], key, object, source) : void 0; + assignValue(object, key, newValue === void 0 ? source[key] : newValue); + } + return object; + } + function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : void 0, guard = length > 2 ? sources[2] : void 0; + customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : void 0; + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? void 0 : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); + } + function isIndex(value, length) { + length = length == null ? MAX_SAFE_INTEGER : length; + return !!length && (typeof value == "number" || reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); + } + function isIterateeCall(value, index, object) { + if (!isObject2(object)) { + return false; + } + var type = typeof index; + if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) { + return eq(object[index], value); + } + return false; + } + function isPrototype(value) { + var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto; + return value === proto; + } + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); + } + } + return result; + } + function eq(value, other) { + return value === other || value !== value && other !== other; + } + function isArguments(value) { + return isArrayLikeObject(value) && hasOwnProperty.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString.call(value) == argsTag); + } + var isArray = Array.isArray; + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + function isFunction(value) { + var tag = isObject2(value) ? objectToString.call(value) : ""; + return tag == funcTag || tag == genTag; + } + function isLength(value) { + return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + function isObject2(value) { + var type = typeof value; + return !!value && (type == "object" || type == "function"); + } + function isObjectLike(value) { + return !!value && typeof value == "object"; + } + var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); + }); + var defaults = baseRest(function(args) { + args.push(void 0, assignInDefaults); + return apply(assignInWith, void 0, args); + }); + function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); + } + module2.exports = defaults; + } +}); + +// ../../node_modules/.pnpm/lodash.flatten@4.4.0/node_modules/lodash.flatten/index.js +var require_lodash16 = __commonJS({ + "../../node_modules/.pnpm/lodash.flatten@4.4.0/node_modules/lodash.flatten/index.js"(exports2, module2) { + var MAX_SAFE_INTEGER = 9007199254740991; + var argsTag = "[object Arguments]"; + var funcTag = "[object Function]"; + var genTag = "[object GeneratorFunction]"; + var freeGlobal = typeof global == "object" && global && global.Object === Object && global; + var freeSelf = typeof self == "object" && self && self.Object === Object && self; + var root = freeGlobal || freeSelf || Function("return this")(); + function arrayPush(array, values) { + var index = -1, length = values.length, offset = array.length; + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + var objectProto = Object.prototype; + var hasOwnProperty = objectProto.hasOwnProperty; + var objectToString = objectProto.toString; + var Symbol2 = root.Symbol; + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + var spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : void 0; + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, length = array.length; + predicate || (predicate = isFlattenable); + result || (result = []); + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + function isFlattenable(value) { + return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]); + } + function flatten(array) { + var length = array ? array.length : 0; + return length ? baseFlatten(array, 1) : []; + } + function isArguments(value) { + return isArrayLikeObject(value) && hasOwnProperty.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString.call(value) == argsTag); + } + var isArray = Array.isArray; + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + function isFunction(value) { + var tag = isObject2(value) ? objectToString.call(value) : ""; + return tag == funcTag || tag == genTag; + } + function isLength(value) { + return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + function isObject2(value) { + var type = typeof value; + return !!value && (type == "object" || type == "function"); + } + function isObjectLike(value) { + return !!value && typeof value == "object"; + } + module2.exports = flatten; + } +}); + +// ../../node_modules/.pnpm/lodash.difference@4.5.0/node_modules/lodash.difference/index.js +var require_lodash17 = __commonJS({ + "../../node_modules/.pnpm/lodash.difference@4.5.0/node_modules/lodash.difference/index.js"(exports2, module2) { + var LARGE_ARRAY_SIZE = 200; + var HASH_UNDEFINED = "__lodash_hash_undefined__"; + var MAX_SAFE_INTEGER = 9007199254740991; + var argsTag = "[object Arguments]"; + var funcTag = "[object Function]"; + var genTag = "[object GeneratorFunction]"; + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + var reIsHostCtor = /^\[object .+?Constructor\]$/; + var freeGlobal = typeof global == "object" && global && global.Object === Object && global; + var freeSelf = typeof self == "object" && self && self.Object === Object && self; + var root = freeGlobal || freeSelf || Function("return this")(); + function apply(func, thisArg, args) { + switch (args.length) { + case 0: + return func.call(thisArg); + case 1: + return func.call(thisArg, args[0]); + case 2: + return func.call(thisArg, args[0], args[1]); + case 3: + return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + function arrayIncludes(array, value) { + var length = array ? array.length : 0; + return !!length && baseIndexOf(array, value, 0) > -1; + } + function arrayIncludesWith(array, value, comparator) { + var index = -1, length = array ? array.length : 0; + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; + } + function arrayMap(array, iteratee) { + var index = -1, length = array ? array.length : 0, result = Array(length); + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; + } + function arrayPush(array, values) { + var index = -1, length = values.length, offset = array.length; + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, index = fromIndex + (fromRight ? 1 : -1); + while (fromRight ? index-- : ++index < length) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + function baseIndexOf(array, value, fromIndex) { + if (value !== value) { + return baseFindIndex(array, baseIsNaN, fromIndex); + } + var index = fromIndex - 1, length = array.length; + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + function baseIsNaN(value) { + return value !== value; + } + function baseUnary(func) { + return function(value) { + return func(value); + }; + } + function cacheHas(cache, key) { + return cache.has(key); + } + function getValue(object, key) { + return object == null ? void 0 : object[key]; + } + function isHostObject(value) { + var result = false; + if (value != null && typeof value.toString != "function") { + try { + result = !!(value + ""); + } catch (e) { + } + } + return result; + } + var arrayProto = Array.prototype; + var funcProto = Function.prototype; + var objectProto = Object.prototype; + var coreJsData = root["__core-js_shared__"]; + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ""); + return uid ? "Symbol(src)_1." + uid : ""; + })(); + var funcToString = funcProto.toString; + var hasOwnProperty = objectProto.hasOwnProperty; + var objectToString = objectProto.toString; + var reIsNative = RegExp( + "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" + ); + var Symbol2 = root.Symbol; + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + var splice = arrayProto.splice; + var spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : void 0; + var nativeMax = Math.max; + var Map2 = getNative(root, "Map"); + var nativeCreate = getNative(Object, "create"); + function Hash(entries) { + var index = -1, length = entries ? entries.length : 0; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + } + function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; + } + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? void 0 : result; + } + return hasOwnProperty.call(data, key) ? data[key] : void 0; + } + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key); + } + function hashSet(key, value) { + var data = this.__data__; + data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value; + return this; + } + Hash.prototype.clear = hashClear; + Hash.prototype["delete"] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + function ListCache(entries) { + var index = -1, length = entries ? entries.length : 0; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function listCacheClear() { + this.__data__ = []; + } + function listCacheDelete(key) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; + } + function listCacheGet(key) { + var data = this.__data__, index = assocIndexOf(data, key); + return index < 0 ? void 0 : data[index][1]; + } + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + function listCacheSet(key, value) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + ListCache.prototype.clear = listCacheClear; + ListCache.prototype["delete"] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + function MapCache(entries) { + var index = -1, length = entries ? entries.length : 0; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function mapCacheClear() { + this.__data__ = { + "hash": new Hash(), + "map": new (Map2 || ListCache)(), + "string": new Hash() + }; + } + function mapCacheDelete(key) { + return getMapData(this, key)["delete"](key); + } + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; + } + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype["delete"] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + function SetCache(values) { + var index = -1, length = values ? values.length : 0; + this.__data__ = new MapCache(); + while (++index < length) { + this.add(values[index]); + } + } + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + function setCacheHas(value) { + return this.__data__.has(value); + } + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + function baseDifference(array, values, iteratee, comparator) { + var index = -1, includes = arrayIncludes, isCommon = true, length = array.length, result = [], valuesLength = values.length; + if (!length) { + return result; + } + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)); + } + if (comparator) { + includes = arrayIncludesWith; + isCommon = false; + } else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas; + isCommon = false; + values = new SetCache(values); + } + outer: + while (++index < length) { + var value = array[index], computed = iteratee ? iteratee(value) : value; + value = comparator || value !== 0 ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } + } + result.push(value); + } else if (!includes(values, computed, comparator)) { + result.push(value); + } + } + return result; + } + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, length = array.length; + predicate || (predicate = isFlattenable); + result || (result = []); + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + function baseIsNative(value) { + if (!isObject2(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + function baseRest(func, start) { + start = nativeMax(start === void 0 ? func.length - 1 : start, 0); + return function() { + var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length); + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = array; + return apply(func, this, otherArgs); + }; + } + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map; + } + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : void 0; + } + function isFlattenable(value) { + return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]); + } + function isKeyable(value) { + var type = typeof value; + return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null; + } + function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; + } + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) { + } + try { + return func + ""; + } catch (e) { + } + } + return ""; + } + var difference = baseRest(function(array, values) { + return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) : []; + }); + function eq(value, other) { + return value === other || value !== value && other !== other; + } + function isArguments(value) { + return isArrayLikeObject(value) && hasOwnProperty.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString.call(value) == argsTag); + } + var isArray = Array.isArray; + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + function isFunction(value) { + var tag = isObject2(value) ? objectToString.call(value) : ""; + return tag == funcTag || tag == genTag; + } + function isLength(value) { + return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + function isObject2(value) { + var type = typeof value; + return !!value && (type == "object" || type == "function"); + } + function isObjectLike(value) { + return !!value && typeof value == "object"; + } + module2.exports = difference; + } +}); + +// ../../node_modules/.pnpm/lodash.union@4.6.0/node_modules/lodash.union/index.js +var require_lodash18 = __commonJS({ + "../../node_modules/.pnpm/lodash.union@4.6.0/node_modules/lodash.union/index.js"(exports2, module2) { + var LARGE_ARRAY_SIZE = 200; + var HASH_UNDEFINED = "__lodash_hash_undefined__"; + var INFINITY = 1 / 0; + var MAX_SAFE_INTEGER = 9007199254740991; + var argsTag = "[object Arguments]"; + var funcTag = "[object Function]"; + var genTag = "[object GeneratorFunction]"; + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; + var reIsHostCtor = /^\[object .+?Constructor\]$/; + var freeGlobal = typeof global == "object" && global && global.Object === Object && global; + var freeSelf = typeof self == "object" && self && self.Object === Object && self; + var root = freeGlobal || freeSelf || Function("return this")(); + function apply(func, thisArg, args) { + switch (args.length) { + case 0: + return func.call(thisArg); + case 1: + return func.call(thisArg, args[0]); + case 2: + return func.call(thisArg, args[0], args[1]); + case 3: + return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } + function arrayIncludes(array, value) { + var length = array ? array.length : 0; + return !!length && baseIndexOf(array, value, 0) > -1; + } + function arrayIncludesWith(array, value, comparator) { + var index = -1, length = array ? array.length : 0; + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; + } + function arrayPush(array, values) { + var index = -1, length = values.length, offset = array.length; + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, index = fromIndex + (fromRight ? 1 : -1); + while (fromRight ? index-- : ++index < length) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } + function baseIndexOf(array, value, fromIndex) { + if (value !== value) { + return baseFindIndex(array, baseIsNaN, fromIndex); + } + var index = fromIndex - 1, length = array.length; + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } + function baseIsNaN(value) { + return value !== value; + } + function cacheHas(cache, key) { + return cache.has(key); + } + function getValue(object, key) { + return object == null ? void 0 : object[key]; + } + function isHostObject(value) { + var result = false; + if (value != null && typeof value.toString != "function") { + try { + result = !!(value + ""); + } catch (e) { + } + } + return result; + } + function setToArray(set) { + var index = -1, result = Array(set.size); + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + var arrayProto = Array.prototype; + var funcProto = Function.prototype; + var objectProto = Object.prototype; + var coreJsData = root["__core-js_shared__"]; + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ""); + return uid ? "Symbol(src)_1." + uid : ""; + })(); + var funcToString = funcProto.toString; + var hasOwnProperty = objectProto.hasOwnProperty; + var objectToString = objectProto.toString; + var reIsNative = RegExp( + "^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$" + ); + var Symbol2 = root.Symbol; + var propertyIsEnumerable = objectProto.propertyIsEnumerable; + var splice = arrayProto.splice; + var spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : void 0; + var nativeMax = Math.max; + var Map2 = getNative(root, "Map"); + var Set2 = getNative(root, "Set"); + var nativeCreate = getNative(Object, "create"); + function Hash(entries) { + var index = -1, length = entries ? entries.length : 0; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + } + function hashDelete(key) { + return this.has(key) && delete this.__data__[key]; + } + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? void 0 : result; + } + return hasOwnProperty.call(data, key) ? data[key] : void 0; + } + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? data[key] !== void 0 : hasOwnProperty.call(data, key); + } + function hashSet(key, value) { + var data = this.__data__; + data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED : value; + return this; + } + Hash.prototype.clear = hashClear; + Hash.prototype["delete"] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + function ListCache(entries) { + var index = -1, length = entries ? entries.length : 0; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function listCacheClear() { + this.__data__ = []; + } + function listCacheDelete(key) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + return true; + } + function listCacheGet(key) { + var data = this.__data__, index = assocIndexOf(data, key); + return index < 0 ? void 0 : data[index][1]; + } + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + function listCacheSet(key, value) { + var data = this.__data__, index = assocIndexOf(data, key); + if (index < 0) { + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } + ListCache.prototype.clear = listCacheClear; + ListCache.prototype["delete"] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; + function MapCache(entries) { + var index = -1, length = entries ? entries.length : 0; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } + function mapCacheClear() { + this.__data__ = { + "hash": new Hash(), + "map": new (Map2 || ListCache)(), + "string": new Hash() + }; + } + function mapCacheDelete(key) { + return getMapData(this, key)["delete"](key); + } + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } + function mapCacheSet(key, value) { + getMapData(this, key).set(key, value); + return this; + } + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype["delete"] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; + function SetCache(values) { + var index = -1, length = values ? values.length : 0; + this.__data__ = new MapCache(); + while (++index < length) { + this.add(values[index]); + } + } + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } + function setCacheHas(value) { + return this.__data__.has(value); + } + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, length = array.length; + predicate || (predicate = isFlattenable); + result || (result = []); + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } + } + return result; + } + function baseIsNative(value) { + if (!isObject2(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } + function baseRest(func, start) { + start = nativeMax(start === void 0 ? func.length - 1 : start, 0); + return function() { + var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length); + while (++index < length) { + array[index] = args[start + index]; + } + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = array; + return apply(func, this, otherArgs); + }; + } + function baseUniq(array, iteratee, comparator) { + var index = -1, includes = arrayIncludes, length = array.length, isCommon = true, result = [], seen = result; + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache(); + } else { + seen = iteratee ? [] : result; + } + outer: + while (++index < length) { + var value = array[index], computed = iteratee ? iteratee(value) : value; + value = comparator || value !== 0 ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { + continue outer; + } + } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); + } + } + return result; + } + var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop : function(values) { + return new Set2(values); + }; + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map; + } + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : void 0; + } + function isFlattenable(value) { + return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]); + } + function isKeyable(value) { + var type = typeof value; + return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null; + } + function isMasked(func) { + return !!maskSrcKey && maskSrcKey in func; + } + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) { + } + try { + return func + ""; + } catch (e) { + } + } + return ""; + } + var union = baseRest(function(arrays) { + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); + }); + function eq(value, other) { + return value === other || value !== value && other !== other; + } + function isArguments(value) { + return isArrayLikeObject(value) && hasOwnProperty.call(value, "callee") && (!propertyIsEnumerable.call(value, "callee") || objectToString.call(value) == argsTag); + } + var isArray = Array.isArray; + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); + } + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); + } + function isFunction(value) { + var tag = isObject2(value) ? objectToString.call(value) : ""; + return tag == funcTag || tag == genTag; + } + function isLength(value) { + return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } + function isObject2(value) { + var type = typeof value; + return !!value && (type == "object" || type == "function"); + } + function isObjectLike(value) { + return !!value && typeof value == "object"; + } + function noop() { + } + module2.exports = union; + } +}); + +// ../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/old.js +var require_old = __commonJS({ + "../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/old.js"(exports2) { + var pathModule = require("path"); + var isWindows = process.platform === "win32"; + var fs = require("fs"); + var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); + function rethrow() { + var callback; + if (DEBUG) { + var backtrace = new Error(); + callback = debugCallback; + } else + callback = missingCallback; + return callback; + function debugCallback(err) { + if (err) { + backtrace.message = err.message; + err = backtrace; + missingCallback(err); + } + } + function missingCallback(err) { + if (err) { + if (process.throwDeprecation) + throw err; + else if (!process.noDeprecation) { + var msg = "fs: missing callback " + (err.stack || err.message); + if (process.traceDeprecation) + console.trace(msg); + else + console.error(msg); + } + } + } + } + function maybeCallback(cb) { + return typeof cb === "function" ? cb : rethrow(); + } + var normalize = pathModule.normalize; + if (isWindows) { + nextPartRe = /(.*?)(?:[\/\\]+|$)/g; + } else { + nextPartRe = /(.*?)(?:[\/]+|$)/g; + } + var nextPartRe; + if (isWindows) { + splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; + } else { + splitRootRe = /^[\/]*/; + } + var splitRootRe; + exports2.realpathSync = function realpathSync(p, cache) { + p = pathModule.resolve(p); + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return cache[p]; + } + var original = p, seenLinks = {}, knownHard = {}; + var pos; + var current; + var base; + var previous; + start(); + function start() { + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ""; + if (isWindows && !knownHard[base]) { + fs.lstatSync(base); + knownHard[base] = true; + } + } + while (pos < p.length) { + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + if (knownHard[base] || cache && cache[base] === base) { + continue; + } + var resolvedLink; + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + resolvedLink = cache[base]; + } else { + var stat = fs.lstatSync(base); + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) cache[base] = base; + continue; + } + var linkTarget = null; + if (!isWindows) { + var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + linkTarget = seenLinks[id]; + } + } + if (linkTarget === null) { + fs.statSync(base); + linkTarget = fs.readlinkSync(base); + } + resolvedLink = pathModule.resolve(previous, linkTarget); + if (cache) cache[base] = resolvedLink; + if (!isWindows) seenLinks[id] = linkTarget; + } + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); + } + if (cache) cache[original] = p; + return p; + }; + exports2.realpath = function realpath(p, cache, cb) { + if (typeof cb !== "function") { + cb = maybeCallback(cache); + cache = null; + } + p = pathModule.resolve(p); + if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { + return process.nextTick(cb.bind(null, null, cache[p])); + } + var original = p, seenLinks = {}, knownHard = {}; + var pos; + var current; + var base; + var previous; + start(); + function start() { + var m = splitRootRe.exec(p); + pos = m[0].length; + current = m[0]; + base = m[0]; + previous = ""; + if (isWindows && !knownHard[base]) { + fs.lstat(base, function(err) { + if (err) return cb(err); + knownHard[base] = true; + LOOP(); + }); + } else { + process.nextTick(LOOP); + } + } + function LOOP() { + if (pos >= p.length) { + if (cache) cache[original] = p; + return cb(null, p); + } + nextPartRe.lastIndex = pos; + var result = nextPartRe.exec(p); + previous = current; + current += result[0]; + base = previous + result[1]; + pos = nextPartRe.lastIndex; + if (knownHard[base] || cache && cache[base] === base) { + return process.nextTick(LOOP); + } + if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { + return gotResolvedLink(cache[base]); + } + return fs.lstat(base, gotStat); + } + function gotStat(err, stat) { + if (err) return cb(err); + if (!stat.isSymbolicLink()) { + knownHard[base] = true; + if (cache) cache[base] = base; + return process.nextTick(LOOP); + } + if (!isWindows) { + var id = stat.dev.toString(32) + ":" + stat.ino.toString(32); + if (seenLinks.hasOwnProperty(id)) { + return gotTarget(null, seenLinks[id], base); + } + } + fs.stat(base, function(err2) { + if (err2) return cb(err2); + fs.readlink(base, function(err3, target) { + if (!isWindows) seenLinks[id] = target; + gotTarget(err3, target); + }); + }); + } + function gotTarget(err, target, base2) { + if (err) return cb(err); + var resolvedLink = pathModule.resolve(previous, target); + if (cache) cache[base2] = resolvedLink; + gotResolvedLink(resolvedLink); + } + function gotResolvedLink(resolvedLink) { + p = pathModule.resolve(resolvedLink, p.slice(pos)); + start(); + } + }; + } +}); + +// ../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/index.js +var require_fs = __commonJS({ + "../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/index.js"(exports2, module2) { + module2.exports = realpath; + realpath.realpath = realpath; + realpath.sync = realpathSync; + realpath.realpathSync = realpathSync; + realpath.monkeypatch = monkeypatch; + realpath.unmonkeypatch = unmonkeypatch; + var fs = require("fs"); + var origRealpath = fs.realpath; + var origRealpathSync = fs.realpathSync; + var version2 = process.version; + var ok = /^v[0-5]\./.test(version2); + var old = require_old(); + function newError(er) { + return er && er.syscall === "realpath" && (er.code === "ELOOP" || er.code === "ENOMEM" || er.code === "ENAMETOOLONG"); + } + function realpath(p, cache, cb) { + if (ok) { + return origRealpath(p, cache, cb); + } + if (typeof cache === "function") { + cb = cache; + cache = null; + } + origRealpath(p, cache, function(er, result) { + if (newError(er)) { + old.realpath(p, cache, cb); + } else { + cb(er, result); + } + }); + } + function realpathSync(p, cache) { + if (ok) { + return origRealpathSync(p, cache); + } + try { + return origRealpathSync(p, cache); + } catch (er) { + if (newError(er)) { + return old.realpathSync(p, cache); + } else { + throw er; + } + } + } + function monkeypatch() { + fs.realpath = realpath; + fs.realpathSync = realpathSync; + } + function unmonkeypatch() { + fs.realpath = origRealpath; + fs.realpathSync = origRealpathSync; + } + } +}); + +// ../../node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/index.js +var require_concat_map = __commonJS({ + "../../node_modules/.pnpm/concat-map@0.0.1/node_modules/concat-map/index.js"(exports2, module2) { + module2.exports = function(xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + var x = fn(xs[i], i); + if (isArray(x)) res.push.apply(res, x); + else res.push(x); + } + return res; + }; + var isArray = Array.isArray || function(xs) { + return Object.prototype.toString.call(xs) === "[object Array]"; + }; + } +}); + +// ../../node_modules/.pnpm/brace-expansion@1.1.18/node_modules/brace-expansion/index.js +var require_brace_expansion2 = __commonJS({ + "../../node_modules/.pnpm/brace-expansion@1.1.18/node_modules/brace-expansion/index.js"(exports2, module2) { + var concatMap = require_concat_map(); + var balanced = require_balanced_match(); + module2.exports = expandTop; + var escSlash = "\0SLASH" + Math.random() + "\0"; + var escOpen = "\0OPEN" + Math.random() + "\0"; + var escClose = "\0CLOSE" + Math.random() + "\0"; + var escComma = "\0COMMA" + Math.random() + "\0"; + var escPeriod = "\0PERIOD" + Math.random() + "\0"; + var EXPANSION_MAX = 1e5; + var EXPANSION_MAX_LENGTH = 4e6; + function numeric(str) { + return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0); + } + function escapeBraces(str) { + return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod); + } + function unescapeBraces(str) { + return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join("."); + } + function parseCommaParts(str) { + if (!str) + return [""]; + var parts = []; + var m = balanced("{", "}", str); + if (!m) + return str.split(","); + var pre = m.pre; + var body = m.body; + var post = m.post; + var p = pre.split(","); + p[p.length - 1] += "{" + body + "}"; + var postParts = parseCommaParts(post); + if (post.length) { + p[p.length - 1] += postParts.shift(); + p.push.apply(p, postParts); + } + parts.push.apply(parts, p); + return parts; + } + function expandTop(str, options) { + if (!str) + return []; + options = options || {}; + var max = options.max == null ? EXPANSION_MAX : options.max; + var maxLength = options.maxLength == null ? EXPANSION_MAX_LENGTH : options.maxLength; + if (str.substr(0, 2) === "{}") { + str = "\\{\\}" + str.substr(2); + } + return expand(escapeBraces(str), max, maxLength, true).map(unescapeBraces); + } + function embrace(str) { + return "{" + str + "}"; + } + function isPadded(el) { + return /^-?0\d/.test(el); + } + function lte(i, y) { + return i <= y; + } + function gte(i, y) { + return i >= y; + } + function combine(acc, base, pre, values, max, maxLength, dropEmpties, outBase) { + var out = []; + var length = 0; + for (var a = 0; a < acc.length; a++) { + for (var v = 0; v < values.length; v++) { + if (out.length >= max) return out; + var expansion = acc[a] + pre + values[v]; + if (dropEmpties && expansion.length === base[a]) continue; + if (length + expansion.length > maxLength) return out; + out.push(expansion); + outBase.push(base[a]); + length += expansion.length; + } + } + return out; + } + function expandSequence(body, isAlphaSequence, max, maxLength) { + var n = body.split(/\.\./); + var N = []; + if (n[0] === void 0 || n[1] === void 0) { + return N; + } + var x = numeric(n[0]); + var y = numeric(n[1]); + var width = Math.max(n[0].length, n[1].length); + var incr = n.length === 3 && n[2] !== void 0 ? Math.max(Math.abs(numeric(n[2])), 1) : 1; + var test = lte; + var reverse = y < x; + if (reverse) { + incr *= -1; + test = gte; + } + var pad = n.some(isPadded); + var length = 0; + for (var i = x; test(i, y) && N.length < max; i += incr) { + var c; + if (isAlphaSequence) { + c = String.fromCharCode(i); + if (c === "\\") { + c = ""; + } + } else { + c = String(i); + if (pad) { + var need = width - c.length; + if (need > 0) { + var z = new Array(need + 1).join("0"); + if (i < 0) { + c = "-" + z + c.slice(1); + } else { + c = z + c; + } + } + } + } + if (length + c.length > maxLength) break; + N.push(c); + length += c.length; + } + return N; + } + function expand(str, max, maxLength, isTop) { + var acc = [""]; + var accBase = [0]; + var dropEmpties = false; + var firstGroup = true; + var nextBase; + for (; ; ) { + var m = balanced("{", "}", str); + if (!m) { + return combine(acc, accBase, str, [""], max, maxLength, dropEmpties, []); + } + var pre = m.pre; + if (/\$$/.test(pre)) { + return combine(acc, accBase, str, [""], max, maxLength, dropEmpties, []); + } + var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); + var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); + var isSequence = isNumericSequence || isAlphaSequence; + var isOptions = m.body.indexOf(",") >= 0; + if (!isSequence && !isOptions) { + if (m.post.match(/,(?!,).*\}/)) { + str = m.pre + "{" + m.body + escClose + m.post; + isTop = true; + firstGroup = true; + dropEmpties = false; + accBase = []; + for (var b = 0; b < acc.length; b++) { + accBase.push(acc[b].length); + } + continue; + } + return combine( + acc, + accBase, + pre + "{" + m.body + "}" + m.post, + [""], + max, + maxLength, + dropEmpties, + [] + ); + } + if (firstGroup) { + dropEmpties = isTop && !isSequence; + firstGroup = false; + } + var values; + if (isSequence) { + values = expandSequence(m.body, isAlphaSequence, max, maxLength); + } else { + var n = parseCommaParts(m.body); + if (n.length === 1 && n[0] !== void 0) { + n = expand(n[0], max, maxLength, false).map(embrace); + if (n.length === 1) { + nextBase = []; + acc = combine( + acc, + accBase, + pre + n[0], + [""], + max, + maxLength, + dropEmpties && !m.post.length, + nextBase + ); + accBase = nextBase; + if (!m.post.length) break; + str = m.post; + continue; + } + } + var dropsEmpties = dropEmpties && !m.post.length && !pre; + for (var d = 0; dropsEmpties && d < acc.length; d++) { + if (acc[d].length !== accBase[d]) { + dropsEmpties = false; + } + } + values = []; + var valuesLength = 0; + outer: for (var j = 0; j < n.length; j++) { + var expanded = expand(n[j], max, maxLength, false); + for (var k = 0; k < expanded.length; k++) { + var v = expanded[k]; + if (dropsEmpties && !v) continue; + if (values.length >= max || valuesLength + v.length > maxLength) { + break outer; + } + values.push(v); + valuesLength += v.length; + } + } + } + nextBase = []; + acc = combine( + acc, + accBase, + pre, + values, + max, + maxLength, + dropEmpties && !m.post.length, + nextBase + ); + accBase = nextBase; + if (!m.post.length) break; + str = m.post; + } + return acc; + } + } +}); + +// ../../node_modules/.pnpm/minimatch@3.1.5/node_modules/minimatch/minimatch.js +var require_minimatch2 = __commonJS({ + "../../node_modules/.pnpm/minimatch@3.1.5/node_modules/minimatch/minimatch.js"(exports2, module2) { + module2.exports = minimatch; + minimatch.Minimatch = Minimatch; + var path = (function() { + try { + return require("path"); + } catch (e) { + } + })() || { + sep: "/" + }; + minimatch.sep = path.sep; + var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {}; + var expand = require_brace_expansion2(); + var plTypes = { + "!": { open: "(?:(?!(?:", close: "))[^/]*?)" }, + "?": { open: "(?:", close: ")?" }, + "+": { open: "(?:", close: ")+" }, + "*": { open: "(?:", close: ")*" }, + "@": { open: "(?:", close: ")" } + }; + var qmark = "[^/]"; + var star = qmark + "*?"; + var twoStarDot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?"; + var twoStarNoDot = "(?:(?!(?:\\/|^)\\.).)*?"; + var reSpecials = charSet("().*{}+?[]^$\\!"); + function charSet(s) { + return s.split("").reduce(function(set, c) { + set[c] = true; + return set; + }, {}); + } + var slashSplit = /\/+/; + minimatch.filter = filter; + function filter(pattern, options) { + options = options || {}; + return function(p, i, list) { + return minimatch(p, pattern, options); + }; + } + function ext(a, b) { + b = b || {}; + var t = {}; + Object.keys(a).forEach(function(k) { + t[k] = a[k]; + }); + Object.keys(b).forEach(function(k) { + t[k] = b[k]; + }); + return t; + } + minimatch.defaults = function(def) { + if (!def || typeof def !== "object" || !Object.keys(def).length) { + return minimatch; + } + var orig = minimatch; + var m = function minimatch2(p, pattern, options) { + return orig(p, pattern, ext(def, options)); + }; + m.Minimatch = function Minimatch2(pattern, options) { + return new orig.Minimatch(pattern, ext(def, options)); + }; + m.Minimatch.defaults = function defaults(options) { + return orig.defaults(ext(def, options)).Minimatch; + }; + m.filter = function filter2(pattern, options) { + return orig.filter(pattern, ext(def, options)); + }; + m.defaults = function defaults(options) { + return orig.defaults(ext(def, options)); + }; + m.makeRe = function makeRe2(pattern, options) { + return orig.makeRe(pattern, ext(def, options)); + }; + m.braceExpand = function braceExpand2(pattern, options) { + return orig.braceExpand(pattern, ext(def, options)); + }; + m.match = function(list, pattern, options) { + return orig.match(list, pattern, ext(def, options)); + }; + return m; + }; + Minimatch.defaults = function(def) { + return minimatch.defaults(def).Minimatch; + }; + function minimatch(p, pattern, options) { + assertValidPattern(pattern); + if (!options) options = {}; + if (!options.nocomment && pattern.charAt(0) === "#") { + return false; + } + return new Minimatch(pattern, options).match(p); + } + function Minimatch(pattern, options) { + if (!(this instanceof Minimatch)) { + return new Minimatch(pattern, options); + } + assertValidPattern(pattern); + if (!options) options = {}; + pattern = pattern.trim(); + if (!options.allowWindowsEscape && path.sep !== "/") { + pattern = pattern.split(path.sep).join("/"); + } + this.options = options; + this.maxGlobstarRecursion = options.maxGlobstarRecursion !== void 0 ? options.maxGlobstarRecursion : 200; + this.set = []; + this.pattern = pattern; + this.regexp = null; + this.negate = false; + this.comment = false; + this.empty = false; + this.partial = !!options.partial; + this.make(); + } + Minimatch.prototype.debug = function() { + }; + Minimatch.prototype.make = make; + function make() { + var pattern = this.pattern; + var options = this.options; + if (!options.nocomment && pattern.charAt(0) === "#") { + this.comment = true; + return; + } + if (!pattern) { + this.empty = true; + return; + } + this.parseNegate(); + var set = this.globSet = this.braceExpand(); + if (options.debug) this.debug = function debug() { + console.error.apply(console, arguments); + }; + this.debug(this.pattern, set); + set = this.globParts = set.map(function(s) { + return s.split(slashSplit); + }); + this.debug(this.pattern, set); + set = set.map(function(s, si, set2) { + return s.map(this.parse, this); + }, this); + this.debug(this.pattern, set); + set = set.filter(function(s) { + return s.indexOf(false) === -1; + }); + this.debug(this.pattern, set); + this.set = set; + } + Minimatch.prototype.parseNegate = parseNegate; + function parseNegate() { + var pattern = this.pattern; + var negate = false; + var options = this.options; + var negateOffset = 0; + if (options.nonegate) return; + for (var i = 0, l2 = pattern.length; i < l2 && pattern.charAt(i) === "!"; i++) { + negate = !negate; + negateOffset++; + } + if (negateOffset) this.pattern = pattern.substr(negateOffset); + this.negate = negate; + } + minimatch.braceExpand = function(pattern, options) { + return braceExpand(pattern, options); + }; + Minimatch.prototype.braceExpand = braceExpand; + function braceExpand(pattern, options) { + if (!options) { + if (this instanceof Minimatch) { + options = this.options; + } else { + options = {}; + } + } + pattern = typeof pattern === "undefined" ? this.pattern : pattern; + assertValidPattern(pattern); + if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) { + return [pattern]; + } + return expand(pattern); + } + var MAX_PATTERN_LENGTH = 1024 * 64; + var assertValidPattern = function(pattern) { + if (typeof pattern !== "string") { + throw new TypeError("invalid pattern"); + } + if (pattern.length > MAX_PATTERN_LENGTH) { + throw new TypeError("pattern is too long"); + } + }; + Minimatch.prototype.parse = parse2; + var SUBPARSE = {}; + function parse2(pattern, isSub) { + assertValidPattern(pattern); + var options = this.options; + if (pattern === "**") { + if (!options.noglobstar) + return GLOBSTAR; + else + pattern = "*"; + } + if (pattern === "") return ""; + var re = ""; + var hasMagic = !!options.nocase; + var escaping = false; + var patternListStack = []; + var negativeLists = []; + var stateChar; + var inClass = false; + var reClassStart = -1; + var classStart = -1; + var patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)"; + var self2 = this; + function clearStateChar() { + if (stateChar) { + switch (stateChar) { + case "*": + re += star; + hasMagic = true; + break; + case "?": + re += qmark; + hasMagic = true; + break; + default: + re += "\\" + stateChar; + break; + } + self2.debug("clearStateChar %j %j", stateChar, re); + stateChar = false; + } + } + for (var i = 0, len = pattern.length, c; i < len && (c = pattern.charAt(i)); i++) { + this.debug("%s %s %s %j", pattern, i, re, c); + if (escaping && reSpecials[c]) { + re += "\\" + c; + escaping = false; + continue; + } + switch (c) { + /* istanbul ignore next */ + case "/": { + return false; + } + case "\\": + clearStateChar(); + escaping = true; + continue; + // the various stateChar values + // for the "extglob" stuff. + case "?": + case "*": + case "+": + case "@": + case "!": + this.debug("%s %s %s %j <-- stateChar", pattern, i, re, c); + if (inClass) { + this.debug(" in class"); + if (c === "!" && i === classStart + 1) c = "^"; + re += c; + continue; + } + if (c === "*" && stateChar === "*") continue; + self2.debug("call clearStateChar %j", stateChar); + clearStateChar(); + stateChar = c; + if (options.noext) clearStateChar(); + continue; + case "(": + if (inClass) { + re += "("; + continue; + } + if (!stateChar) { + re += "\\("; + continue; + } + patternListStack.push({ + type: stateChar, + start: i - 1, + reStart: re.length, + open: plTypes[stateChar].open, + close: plTypes[stateChar].close + }); + re += stateChar === "!" ? "(?:(?!(?:" : "(?:"; + this.debug("plType %j %j", stateChar, re); + stateChar = false; + continue; + case ")": + if (inClass || !patternListStack.length) { + re += "\\)"; + continue; + } + clearStateChar(); + hasMagic = true; + var pl = patternListStack.pop(); + re += pl.close; + if (pl.type === "!") { + negativeLists.push(pl); + } + pl.reEnd = re.length; + continue; + case "|": + if (inClass || !patternListStack.length || escaping) { + re += "\\|"; + escaping = false; + continue; + } + clearStateChar(); + re += "|"; + continue; + // these are mostly the same in regexp and glob + case "[": + clearStateChar(); + if (inClass) { + re += "\\" + c; + continue; + } + inClass = true; + classStart = i; + reClassStart = re.length; + re += c; + continue; + case "]": + if (i === classStart + 1 || !inClass) { + re += "\\" + c; + escaping = false; + continue; + } + var cs = pattern.substring(classStart + 1, i); + try { + RegExp("[" + cs + "]"); + } catch (er) { + var sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]"; + hasMagic = hasMagic || sp[1]; + inClass = false; + continue; + } + hasMagic = true; + inClass = false; + re += c; + continue; + default: + clearStateChar(); + if (escaping) { + escaping = false; + } else if (reSpecials[c] && !(c === "^" && inClass)) { + re += "\\"; + } + re += c; + } + } + if (inClass) { + cs = pattern.substr(classStart + 1); + sp = this.parse(cs, SUBPARSE); + re = re.substr(0, reClassStart) + "\\[" + sp[0]; + hasMagic = hasMagic || sp[1]; + } + for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) { + var tail = re.slice(pl.reStart + pl.open.length); + this.debug("setting tail", re, pl); + tail = tail.replace(/((?:\\{2}){0,64})(\\?)\|/g, function(_2, $1, $2) { + if (!$2) { + $2 = "\\"; + } + return $1 + $1 + $2 + "|"; + }); + this.debug("tail=%j\n %s", tail, tail, pl, re); + var t = pl.type === "*" ? star : pl.type === "?" ? qmark : "\\" + pl.type; + hasMagic = true; + re = re.slice(0, pl.reStart) + t + "\\(" + tail; + } + clearStateChar(); + if (escaping) { + re += "\\\\"; + } + var addPatternStart = false; + switch (re.charAt(0)) { + case "[": + case ".": + case "(": + addPatternStart = true; + } + for (var n = negativeLists.length - 1; n > -1; n--) { + var nl = negativeLists[n]; + var nlBefore = re.slice(0, nl.reStart); + var nlFirst = re.slice(nl.reStart, nl.reEnd - 8); + var nlLast = re.slice(nl.reEnd - 8, nl.reEnd); + var nlAfter = re.slice(nl.reEnd); + nlLast += nlAfter; + var openParensBefore = nlBefore.split("(").length - 1; + var cleanAfter = nlAfter; + for (i = 0; i < openParensBefore; i++) { + cleanAfter = cleanAfter.replace(/\)[+*?]?/, ""); + } + nlAfter = cleanAfter; + var dollar = ""; + if (nlAfter === "" && isSub !== SUBPARSE) { + dollar = "$"; + } + var newRe = nlBefore + nlFirst + nlAfter + dollar + nlLast; + re = newRe; + } + if (re !== "" && hasMagic) { + re = "(?=.)" + re; + } + if (addPatternStart) { + re = patternStart + re; + } + if (isSub === SUBPARSE) { + return [re, hasMagic]; + } + if (!hasMagic) { + return globUnescape(pattern); + } + var flags = options.nocase ? "i" : ""; + try { + var regExp = new RegExp("^" + re + "$", flags); + } catch (er) { + return new RegExp("$."); + } + regExp._glob = pattern; + regExp._src = re; + return regExp; + } + minimatch.makeRe = function(pattern, options) { + return new Minimatch(pattern, options || {}).makeRe(); + }; + Minimatch.prototype.makeRe = makeRe; + function makeRe() { + if (this.regexp || this.regexp === false) return this.regexp; + var set = this.set; + if (!set.length) { + this.regexp = false; + return this.regexp; + } + var options = this.options; + var twoStar = options.noglobstar ? star : options.dot ? twoStarDot : twoStarNoDot; + var flags = options.nocase ? "i" : ""; + var re = set.map(function(pattern) { + return pattern.map(function(p) { + return p === GLOBSTAR ? twoStar : typeof p === "string" ? regExpEscape(p) : p._src; + }).join("\\/"); + }).join("|"); + re = "^(?:" + re + ")$"; + if (this.negate) re = "^(?!" + re + ").*$"; + try { + this.regexp = new RegExp(re, flags); + } catch (ex) { + this.regexp = false; + } + return this.regexp; + } + minimatch.match = function(list, pattern, options) { + options = options || {}; + var mm = new Minimatch(pattern, options); + list = list.filter(function(f) { + return mm.match(f); + }); + if (mm.options.nonull && !list.length) { + list.push(pattern); + } + return list; + }; + Minimatch.prototype.match = function match(f, partial) { + if (typeof partial === "undefined") partial = this.partial; + this.debug("match", f, this.pattern); + if (this.comment) return false; + if (this.empty) return f === ""; + if (f === "/" && partial) return true; + var options = this.options; + if (path.sep !== "/") { + f = f.split(path.sep).join("/"); + } + f = f.split(slashSplit); + this.debug(this.pattern, "split", f); + var set = this.set; + this.debug(this.pattern, "set", set); + var filename; + var i; + for (i = f.length - 1; i >= 0; i--) { + filename = f[i]; + if (filename) break; + } + for (i = 0; i < set.length; i++) { + var pattern = set[i]; + var file2 = f; + if (options.matchBase && pattern.length === 1) { + file2 = [filename]; + } + var hit = this.matchOne(file2, pattern, partial); + if (hit) { + if (options.flipNegate) return true; + return !this.negate; + } + } + if (options.flipNegate) return false; + return this.negate; + }; + Minimatch.prototype.matchOne = function(file2, pattern, partial) { + if (pattern.indexOf(GLOBSTAR) !== -1) { + return this._matchGlobstar(file2, pattern, partial, 0, 0); + } + return this._matchOne(file2, pattern, partial, 0, 0); + }; + Minimatch.prototype._matchGlobstar = function(file2, pattern, partial, fileIndex, patternIndex) { + var i; + var firstgs = -1; + for (i = patternIndex; i < pattern.length; i++) { + if (pattern[i] === GLOBSTAR) { + firstgs = i; + break; + } + } + var lastgs = -1; + for (i = pattern.length - 1; i >= 0; i--) { + if (pattern[i] === GLOBSTAR) { + lastgs = i; + break; + } + } + var head = pattern.slice(patternIndex, firstgs); + var body = partial ? pattern.slice(firstgs + 1) : pattern.slice(firstgs + 1, lastgs); + var tail = partial ? [] : pattern.slice(lastgs + 1); + if (head.length) { + var fileHead = file2.slice(fileIndex, fileIndex + head.length); + if (!this._matchOne(fileHead, head, partial, 0, 0)) { + return false; + } + fileIndex += head.length; + } + var fileTailMatch = 0; + if (tail.length) { + if (tail.length + fileIndex > file2.length) return false; + var tailStart = file2.length - tail.length; + if (this._matchOne(file2, tail, partial, tailStart, 0)) { + fileTailMatch = tail.length; + } else { + if (file2[file2.length - 1] !== "" || fileIndex + tail.length === file2.length) { + return false; + } + tailStart--; + if (!this._matchOne(file2, tail, partial, tailStart, 0)) { + return false; + } + fileTailMatch = tail.length + 1; + } + } + if (!body.length) { + var sawSome = !!fileTailMatch; + for (i = fileIndex; i < file2.length - fileTailMatch; i++) { + var f = String(file2[i]); + sawSome = true; + if (f === "." || f === ".." || !this.options.dot && f.charAt(0) === ".") { + return false; + } + } + return partial || sawSome; + } + var bodySegments = [[[], 0]]; + var currentBody = bodySegments[0]; + var nonGsParts = 0; + var nonGsPartsSums = [0]; + for (var bi = 0; bi < body.length; bi++) { + var b = body[bi]; + if (b === GLOBSTAR) { + nonGsPartsSums.push(nonGsParts); + currentBody = [[], 0]; + bodySegments.push(currentBody); + } else { + currentBody[0].push(b); + nonGsParts++; + } + } + var idx = bodySegments.length - 1; + var fileLength = file2.length - fileTailMatch; + for (var si = 0; si < bodySegments.length; si++) { + bodySegments[si][1] = fileLength - (nonGsPartsSums[idx--] + bodySegments[si][0].length); + } + return !!this._matchGlobStarBodySections( + file2, + bodySegments, + fileIndex, + 0, + partial, + 0, + !!fileTailMatch + ); + }; + Minimatch.prototype._matchGlobStarBodySections = function(file2, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) { + var bs = bodySegments[bodyIndex]; + if (!bs) { + for (var i = fileIndex; i < file2.length; i++) { + sawTail = true; + var f = file2[i]; + if (f === "." || f === ".." || !this.options.dot && f.charAt(0) === ".") { + return false; + } + } + return sawTail; + } + var body = bs[0]; + var after = bs[1]; + while (fileIndex <= after) { + var m = this._matchOne( + file2.slice(0, fileIndex + body.length), + body, + partial, + fileIndex, + 0 + ); + if (m && globStarDepth < this.maxGlobstarRecursion) { + var sub = this._matchGlobStarBodySections( + file2, + bodySegments, + fileIndex + body.length, + bodyIndex + 1, + partial, + globStarDepth + 1, + sawTail + ); + if (sub !== false) { + return sub; + } + } + var f = file2[fileIndex]; + if (f === "." || f === ".." || !this.options.dot && f.charAt(0) === ".") { + return false; + } + fileIndex++; + } + return partial || null; + }; + Minimatch.prototype._matchOne = function(file2, pattern, partial, fileIndex, patternIndex) { + var fi, pi, fl, pl; + for (fi = fileIndex, pi = patternIndex, fl = file2.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) { + this.debug("matchOne loop"); + var p = pattern[pi]; + var f = file2[fi]; + this.debug(pattern, p, f); + if (p === false || p === GLOBSTAR) return false; + var hit; + if (typeof p === "string") { + hit = f === p; + this.debug("string match", p, f, hit); + } else { + hit = f.match(p); + this.debug("pattern match", p, f, hit); + } + if (!hit) return false; + } + if (fi === fl && pi === pl) { + return true; + } else if (fi === fl) { + return partial; + } else if (pi === pl) { + return fi === fl - 1 && file2[fi] === ""; + } + throw new Error("wtf?"); + }; + function globUnescape(s) { + return s.replace(/\\(.)/g, "$1"); + } + function regExpEscape(s) { + return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"); + } + } +}); + +// ../../node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/index.js +var require_path_is_absolute = __commonJS({ + "../../node_modules/.pnpm/path-is-absolute@1.0.1/node_modules/path-is-absolute/index.js"(exports2, module2) { + "use strict"; + function posix(path) { + return path.charAt(0) === "/"; + } + function win32(path) { + var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; + var result = splitDeviceRe.exec(path); + var device = result[1] || ""; + var isUnc = Boolean(device && device.charAt(1) !== ":"); + return Boolean(result[2] || isUnc); + } + module2.exports = process.platform === "win32" ? win32 : posix; + module2.exports.posix = posix; + module2.exports.win32 = win32; + } +}); + +// ../../node_modules/.pnpm/glob@7.2.3/node_modules/glob/common.js +var require_common3 = __commonJS({ + "../../node_modules/.pnpm/glob@7.2.3/node_modules/glob/common.js"(exports2) { + exports2.setopts = setopts; + exports2.ownProp = ownProp; + exports2.makeAbs = makeAbs; + exports2.finish = finish; + exports2.mark = mark; + exports2.isIgnored = isIgnored; + exports2.childrenIgnored = childrenIgnored; + function ownProp(obj2, field) { + return Object.prototype.hasOwnProperty.call(obj2, field); + } + var fs = require("fs"); + var path = require("path"); + var minimatch = require_minimatch2(); + var isAbsolute = require_path_is_absolute(); + var Minimatch = minimatch.Minimatch; + function alphasort(a, b) { + return a.localeCompare(b, "en"); + } + function setupIgnores(self2, options) { + self2.ignore = options.ignore || []; + if (!Array.isArray(self2.ignore)) + self2.ignore = [self2.ignore]; + if (self2.ignore.length) { + self2.ignore = self2.ignore.map(ignoreMap); + } + } + function ignoreMap(pattern) { + var gmatcher = null; + if (pattern.slice(-3) === "/**") { + var gpattern = pattern.replace(/(\/\*\*)+$/, ""); + gmatcher = new Minimatch(gpattern, { dot: true }); + } + return { + matcher: new Minimatch(pattern, { dot: true }), + gmatcher + }; + } + function setopts(self2, pattern, options) { + if (!options) + options = {}; + if (options.matchBase && -1 === pattern.indexOf("/")) { + if (options.noglobstar) { + throw new Error("base matching requires globstar"); + } + pattern = "**/" + pattern; + } + self2.silent = !!options.silent; + self2.pattern = pattern; + self2.strict = options.strict !== false; + self2.realpath = !!options.realpath; + self2.realpathCache = options.realpathCache || /* @__PURE__ */ Object.create(null); + self2.follow = !!options.follow; + self2.dot = !!options.dot; + self2.mark = !!options.mark; + self2.nodir = !!options.nodir; + if (self2.nodir) + self2.mark = true; + self2.sync = !!options.sync; + self2.nounique = !!options.nounique; + self2.nonull = !!options.nonull; + self2.nosort = !!options.nosort; + self2.nocase = !!options.nocase; + self2.stat = !!options.stat; + self2.noprocess = !!options.noprocess; + self2.absolute = !!options.absolute; + self2.fs = options.fs || fs; + self2.maxLength = options.maxLength || Infinity; + self2.cache = options.cache || /* @__PURE__ */ Object.create(null); + self2.statCache = options.statCache || /* @__PURE__ */ Object.create(null); + self2.symlinks = options.symlinks || /* @__PURE__ */ Object.create(null); + setupIgnores(self2, options); + self2.changedCwd = false; + var cwd = process.cwd(); + if (!ownProp(options, "cwd")) + self2.cwd = cwd; + else { + self2.cwd = path.resolve(options.cwd); + self2.changedCwd = self2.cwd !== cwd; + } + self2.root = options.root || path.resolve(self2.cwd, "/"); + self2.root = path.resolve(self2.root); + if (process.platform === "win32") + self2.root = self2.root.replace(/\\/g, "/"); + self2.cwdAbs = isAbsolute(self2.cwd) ? self2.cwd : makeAbs(self2, self2.cwd); + if (process.platform === "win32") + self2.cwdAbs = self2.cwdAbs.replace(/\\/g, "/"); + self2.nomount = !!options.nomount; + options.nonegate = true; + options.nocomment = true; + options.allowWindowsEscape = false; + self2.minimatch = new Minimatch(pattern, options); + self2.options = self2.minimatch.options; + } + function finish(self2) { + var nou = self2.nounique; + var all = nou ? [] : /* @__PURE__ */ Object.create(null); + for (var i = 0, l2 = self2.matches.length; i < l2; i++) { + var matches = self2.matches[i]; + if (!matches || Object.keys(matches).length === 0) { + if (self2.nonull) { + var literal = self2.minimatch.globSet[i]; + if (nou) + all.push(literal); + else + all[literal] = true; + } + } else { + var m = Object.keys(matches); + if (nou) + all.push.apply(all, m); + else + m.forEach(function(m2) { + all[m2] = true; + }); + } + } + if (!nou) + all = Object.keys(all); + if (!self2.nosort) + all = all.sort(alphasort); + if (self2.mark) { + for (var i = 0; i < all.length; i++) { + all[i] = self2._mark(all[i]); + } + if (self2.nodir) { + all = all.filter(function(e) { + var notDir = !/\/$/.test(e); + var c = self2.cache[e] || self2.cache[makeAbs(self2, e)]; + if (notDir && c) + notDir = c !== "DIR" && !Array.isArray(c); + return notDir; + }); + } + } + if (self2.ignore.length) + all = all.filter(function(m2) { + return !isIgnored(self2, m2); + }); + self2.found = all; + } + function mark(self2, p) { + var abs = makeAbs(self2, p); + var c = self2.cache[abs]; + var m = p; + if (c) { + var isDir = c === "DIR" || Array.isArray(c); + var slash = p.slice(-1) === "/"; + if (isDir && !slash) + m += "/"; + else if (!isDir && slash) + m = m.slice(0, -1); + if (m !== p) { + var mabs = makeAbs(self2, m); + self2.statCache[mabs] = self2.statCache[abs]; + self2.cache[mabs] = self2.cache[abs]; + } + } + return m; + } + function makeAbs(self2, f) { + var abs = f; + if (f.charAt(0) === "/") { + abs = path.join(self2.root, f); + } else if (isAbsolute(f) || f === "") { + abs = f; + } else if (self2.changedCwd) { + abs = path.resolve(self2.cwd, f); + } else { + abs = path.resolve(f); + } + if (process.platform === "win32") + abs = abs.replace(/\\/g, "/"); + return abs; + } + function isIgnored(self2, path2) { + if (!self2.ignore.length) + return false; + return self2.ignore.some(function(item) { + return item.matcher.match(path2) || !!(item.gmatcher && item.gmatcher.match(path2)); + }); + } + function childrenIgnored(self2, path2) { + if (!self2.ignore.length) + return false; + return self2.ignore.some(function(item) { + return !!(item.gmatcher && item.gmatcher.match(path2)); + }); + } + } +}); + +// ../../node_modules/.pnpm/glob@7.2.3/node_modules/glob/sync.js +var require_sync = __commonJS({ + "../../node_modules/.pnpm/glob@7.2.3/node_modules/glob/sync.js"(exports2, module2) { + module2.exports = globSync; + globSync.GlobSync = GlobSync; + var rp = require_fs(); + var minimatch = require_minimatch2(); + var Minimatch = minimatch.Minimatch; + var Glob = require_glob().Glob; + var util2 = require("util"); + var path = require("path"); + var assert = require("assert"); + var isAbsolute = require_path_is_absolute(); + var common = require_common3(); + var setopts = common.setopts; + var ownProp = common.ownProp; + var childrenIgnored = common.childrenIgnored; + var isIgnored = common.isIgnored; + function globSync(pattern, options) { + if (typeof options === "function" || arguments.length === 3) + throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); + return new GlobSync(pattern, options).found; + } + function GlobSync(pattern, options) { + if (!pattern) + throw new Error("must provide pattern"); + if (typeof options === "function" || arguments.length === 3) + throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167"); + if (!(this instanceof GlobSync)) + return new GlobSync(pattern, options); + setopts(this, pattern, options); + if (this.noprocess) + return this; + var n = this.minimatch.set.length; + this.matches = new Array(n); + for (var i = 0; i < n; i++) { + this._process(this.minimatch.set[i], i, false); + } + this._finish(); + } + GlobSync.prototype._finish = function() { + assert.ok(this instanceof GlobSync); + if (this.realpath) { + var self2 = this; + this.matches.forEach(function(matchset, index) { + var set = self2.matches[index] = /* @__PURE__ */ Object.create(null); + for (var p in matchset) { + try { + p = self2._makeAbs(p); + var real = rp.realpathSync(p, self2.realpathCache); + set[real] = true; + } catch (er) { + if (er.syscall === "stat") + set[self2._makeAbs(p)] = true; + else + throw er; + } + } + }); + } + common.finish(this); + }; + GlobSync.prototype._process = function(pattern, index, inGlobStar) { + assert.ok(this instanceof GlobSync); + var n = 0; + while (typeof pattern[n] === "string") { + n++; + } + var prefix; + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join("/"), index); + return; + case 0: + prefix = null; + break; + default: + prefix = pattern.slice(0, n).join("/"); + break; + } + var remain = pattern.slice(n); + var read; + if (prefix === null) + read = "."; + else if (isAbsolute(prefix) || isAbsolute(pattern.map(function(p) { + return typeof p === "string" ? p : "[*]"; + }).join("/"))) { + if (!prefix || !isAbsolute(prefix)) + prefix = "/" + prefix; + read = prefix; + } else + read = prefix; + var abs = this._makeAbs(read); + if (childrenIgnored(this, read)) + return; + var isGlobStar = remain[0] === minimatch.GLOBSTAR; + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar); + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar); + }; + GlobSync.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar) { + var entries = this._readdir(abs, inGlobStar); + if (!entries) + return; + var pn = remain[0]; + var negate = !!this.minimatch.negate; + var rawGlob = pn._glob; + var dotOk = this.dot || rawGlob.charAt(0) === "."; + var matchedEntries = []; + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + if (e.charAt(0) !== "." || dotOk) { + var m; + if (negate && !prefix) { + m = !e.match(pn); + } else { + m = e.match(pn); + } + if (m) + matchedEntries.push(e); + } + } + var len = matchedEntries.length; + if (len === 0) + return; + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = /* @__PURE__ */ Object.create(null); + for (var i = 0; i < len; i++) { + var e = matchedEntries[i]; + if (prefix) { + if (prefix.slice(-1) !== "/") + e = prefix + "/" + e; + else + e = prefix + e; + } + if (e.charAt(0) === "/" && !this.nomount) { + e = path.join(this.root, e); + } + this._emitMatch(index, e); + } + return; + } + remain.shift(); + for (var i = 0; i < len; i++) { + var e = matchedEntries[i]; + var newPattern; + if (prefix) + newPattern = [prefix, e]; + else + newPattern = [e]; + this._process(newPattern.concat(remain), index, inGlobStar); + } + }; + GlobSync.prototype._emitMatch = function(index, e) { + if (isIgnored(this, e)) + return; + var abs = this._makeAbs(e); + if (this.mark) + e = this._mark(e); + if (this.absolute) { + e = abs; + } + if (this.matches[index][e]) + return; + if (this.nodir) { + var c = this.cache[abs]; + if (c === "DIR" || Array.isArray(c)) + return; + } + this.matches[index][e] = true; + if (this.stat) + this._stat(e); + }; + GlobSync.prototype._readdirInGlobStar = function(abs) { + if (this.follow) + return this._readdir(abs, false); + var entries; + var lstat; + var stat; + try { + lstat = this.fs.lstatSync(abs); + } catch (er) { + if (er.code === "ENOENT") { + return null; + } + } + var isSym = lstat && lstat.isSymbolicLink(); + this.symlinks[abs] = isSym; + if (!isSym && lstat && !lstat.isDirectory()) + this.cache[abs] = "FILE"; + else + entries = this._readdir(abs, false); + return entries; + }; + GlobSync.prototype._readdir = function(abs, inGlobStar) { + var entries; + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs); + if (ownProp(this.cache, abs)) { + var c = this.cache[abs]; + if (!c || c === "FILE") + return null; + if (Array.isArray(c)) + return c; + } + try { + return this._readdirEntries(abs, this.fs.readdirSync(abs)); + } catch (er) { + this._readdirError(abs, er); + return null; + } + }; + GlobSync.prototype._readdirEntries = function(abs, entries) { + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + if (abs === "/") + e = abs + e; + else + e = abs + "/" + e; + this.cache[e] = true; + } + } + this.cache[abs] = entries; + return entries; + }; + GlobSync.prototype._readdirError = function(f, er) { + switch (er.code) { + case "ENOTSUP": + // https://github.com/isaacs/node-glob/issues/205 + case "ENOTDIR": + var abs = this._makeAbs(f); + this.cache[abs] = "FILE"; + if (abs === this.cwdAbs) { + var error = new Error(er.code + " invalid cwd " + this.cwd); + error.path = this.cwd; + error.code = er.code; + throw error; + } + break; + case "ENOENT": + // not terribly unusual + case "ELOOP": + case "ENAMETOOLONG": + case "UNKNOWN": + this.cache[this._makeAbs(f)] = false; + break; + default: + this.cache[this._makeAbs(f)] = false; + if (this.strict) + throw er; + if (!this.silent) + console.error("glob error", er); + break; + } + }; + GlobSync.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar) { + var entries = this._readdir(abs, inGlobStar); + if (!entries) + return; + var remainWithoutGlobStar = remain.slice(1); + var gspref = prefix ? [prefix] : []; + var noGlobStar = gspref.concat(remainWithoutGlobStar); + this._process(noGlobStar, index, false); + var len = entries.length; + var isSym = this.symlinks[abs]; + if (isSym && inGlobStar) + return; + for (var i = 0; i < len; i++) { + var e = entries[i]; + if (e.charAt(0) === "." && !this.dot) + continue; + var instead = gspref.concat(entries[i], remainWithoutGlobStar); + this._process(instead, index, true); + var below = gspref.concat(entries[i], remain); + this._process(below, index, true); + } + }; + GlobSync.prototype._processSimple = function(prefix, index) { + var exists = this._stat(prefix); + if (!this.matches[index]) + this.matches[index] = /* @__PURE__ */ Object.create(null); + if (!exists) + return; + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix); + if (prefix.charAt(0) === "/") { + prefix = path.join(this.root, prefix); + } else { + prefix = path.resolve(this.root, prefix); + if (trail) + prefix += "/"; + } + } + if (process.platform === "win32") + prefix = prefix.replace(/\\/g, "/"); + this._emitMatch(index, prefix); + }; + GlobSync.prototype._stat = function(f) { + var abs = this._makeAbs(f); + var needDir = f.slice(-1) === "/"; + if (f.length > this.maxLength) + return false; + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs]; + if (Array.isArray(c)) + c = "DIR"; + if (!needDir || c === "DIR") + return c; + if (needDir && c === "FILE") + return false; + } + var exists; + var stat = this.statCache[abs]; + if (!stat) { + var lstat; + try { + lstat = this.fs.lstatSync(abs); + } catch (er) { + if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { + this.statCache[abs] = false; + return false; + } + } + if (lstat && lstat.isSymbolicLink()) { + try { + stat = this.fs.statSync(abs); + } catch (er) { + stat = lstat; + } + } else { + stat = lstat; + } + } + this.statCache[abs] = stat; + var c = true; + if (stat) + c = stat.isDirectory() ? "DIR" : "FILE"; + this.cache[abs] = this.cache[abs] || c; + if (needDir && c === "FILE") + return false; + return c; + }; + GlobSync.prototype._mark = function(p) { + return common.mark(this, p); + }; + GlobSync.prototype._makeAbs = function(f) { + return common.makeAbs(this, f); + }; + } +}); + +// ../../node_modules/.pnpm/wrappy@1.0.2/node_modules/wrappy/wrappy.js +var require_wrappy = __commonJS({ + "../../node_modules/.pnpm/wrappy@1.0.2/node_modules/wrappy/wrappy.js"(exports2, module2) { + module2.exports = wrappy; + function wrappy(fn, cb) { + if (fn && cb) return wrappy(fn)(cb); + if (typeof fn !== "function") + throw new TypeError("need wrapper function"); + Object.keys(fn).forEach(function(k) { + wrapper[k] = fn[k]; + }); + return wrapper; + function wrapper() { + var args = new Array(arguments.length); + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i]; + } + var ret2 = fn.apply(this, args); + var cb2 = args[args.length - 1]; + if (typeof ret2 === "function" && ret2 !== cb2) { + Object.keys(cb2).forEach(function(k) { + ret2[k] = cb2[k]; + }); + } + return ret2; + } + } + } +}); + +// ../../node_modules/.pnpm/once@1.4.0/node_modules/once/once.js +var require_once = __commonJS({ + "../../node_modules/.pnpm/once@1.4.0/node_modules/once/once.js"(exports2, module2) { + var wrappy = require_wrappy(); + module2.exports = wrappy(once); + module2.exports.strict = wrappy(onceStrict); + once.proto = once(function() { + Object.defineProperty(Function.prototype, "once", { + value: function() { + return once(this); + }, + configurable: true + }); + Object.defineProperty(Function.prototype, "onceStrict", { + value: function() { + return onceStrict(this); + }, + configurable: true + }); + }); + function once(fn) { + var f = function() { + if (f.called) return f.value; + f.called = true; + return f.value = fn.apply(this, arguments); + }; + f.called = false; + return f; + } + function onceStrict(fn) { + var f = function() { + if (f.called) + throw new Error(f.onceError); + f.called = true; + return f.value = fn.apply(this, arguments); + }; + var name = fn.name || "Function wrapped with `once`"; + f.onceError = name + " shouldn't be called more than once"; + f.called = false; + return f; + } + } +}); + +// ../../node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/inflight.js +var require_inflight = __commonJS({ + "../../node_modules/.pnpm/inflight@1.0.6/node_modules/inflight/inflight.js"(exports2, module2) { + var wrappy = require_wrappy(); + var reqs = /* @__PURE__ */ Object.create(null); + var once = require_once(); + module2.exports = wrappy(inflight); + function inflight(key, cb) { + if (reqs[key]) { + reqs[key].push(cb); + return null; + } else { + reqs[key] = [cb]; + return makeres(key); + } + } + function makeres(key) { + return once(function RES() { + var cbs = reqs[key]; + var len = cbs.length; + var args = slice(arguments); + try { + for (var i = 0; i < len; i++) { + cbs[i].apply(null, args); + } + } finally { + if (cbs.length > len) { + cbs.splice(0, len); + process.nextTick(function() { + RES.apply(null, args); + }); + } else { + delete reqs[key]; + } + } + }); + } + function slice(args) { + var length = args.length; + var array = []; + for (var i = 0; i < length; i++) array[i] = args[i]; + return array; + } + } +}); + +// ../../node_modules/.pnpm/glob@7.2.3/node_modules/glob/glob.js +var require_glob = __commonJS({ + "../../node_modules/.pnpm/glob@7.2.3/node_modules/glob/glob.js"(exports2, module2) { + module2.exports = glob; + var rp = require_fs(); + var minimatch = require_minimatch2(); + var Minimatch = minimatch.Minimatch; + var inherits2 = require_inherits(); + var EE = require("events").EventEmitter; + var path = require("path"); + var assert = require("assert"); + var isAbsolute = require_path_is_absolute(); + var globSync = require_sync(); + var common = require_common3(); + var setopts = common.setopts; + var ownProp = common.ownProp; + var inflight = require_inflight(); + var util2 = require("util"); + var childrenIgnored = common.childrenIgnored; + var isIgnored = common.isIgnored; + var once = require_once(); + function glob(pattern, options, cb) { + if (typeof options === "function") cb = options, options = {}; + if (!options) options = {}; + if (options.sync) { + if (cb) + throw new TypeError("callback provided to sync glob"); + return globSync(pattern, options); + } + return new Glob(pattern, options, cb); + } + glob.sync = globSync; + var GlobSync = glob.GlobSync = globSync.GlobSync; + glob.glob = glob; + function extend(origin, add) { + if (add === null || typeof add !== "object") { + return origin; + } + var keys = Object.keys(add); + var i = keys.length; + while (i--) { + origin[keys[i]] = add[keys[i]]; + } + return origin; + } + glob.hasMagic = function(pattern, options_) { + var options = extend({}, options_); + options.noprocess = true; + var g = new Glob(pattern, options); + var set = g.minimatch.set; + if (!pattern) + return false; + if (set.length > 1) + return true; + for (var j = 0; j < set[0].length; j++) { + if (typeof set[0][j] !== "string") + return true; + } + return false; + }; + glob.Glob = Glob; + inherits2(Glob, EE); + function Glob(pattern, options, cb) { + if (typeof options === "function") { + cb = options; + options = null; + } + if (options && options.sync) { + if (cb) + throw new TypeError("callback provided to sync glob"); + return new GlobSync(pattern, options); + } + if (!(this instanceof Glob)) + return new Glob(pattern, options, cb); + setopts(this, pattern, options); + this._didRealPath = false; + var n = this.minimatch.set.length; + this.matches = new Array(n); + if (typeof cb === "function") { + cb = once(cb); + this.on("error", cb); + this.on("end", function(matches) { + cb(null, matches); + }); + } + var self2 = this; + this._processing = 0; + this._emitQueue = []; + this._processQueue = []; + this.paused = false; + if (this.noprocess) + return this; + if (n === 0) + return done(); + var sync = true; + for (var i = 0; i < n; i++) { + this._process(this.minimatch.set[i], i, false, done); + } + sync = false; + function done() { + --self2._processing; + if (self2._processing <= 0) { + if (sync) { + process.nextTick(function() { + self2._finish(); + }); + } else { + self2._finish(); + } + } + } + } + Glob.prototype._finish = function() { + assert(this instanceof Glob); + if (this.aborted) + return; + if (this.realpath && !this._didRealpath) + return this._realpath(); + common.finish(this); + this.emit("end", this.found); + }; + Glob.prototype._realpath = function() { + if (this._didRealpath) + return; + this._didRealpath = true; + var n = this.matches.length; + if (n === 0) + return this._finish(); + var self2 = this; + for (var i = 0; i < this.matches.length; i++) + this._realpathSet(i, next); + function next() { + if (--n === 0) + self2._finish(); + } + }; + Glob.prototype._realpathSet = function(index, cb) { + var matchset = this.matches[index]; + if (!matchset) + return cb(); + var found = Object.keys(matchset); + var self2 = this; + var n = found.length; + if (n === 0) + return cb(); + var set = this.matches[index] = /* @__PURE__ */ Object.create(null); + found.forEach(function(p, i) { + p = self2._makeAbs(p); + rp.realpath(p, self2.realpathCache, function(er, real) { + if (!er) + set[real] = true; + else if (er.syscall === "stat") + set[p] = true; + else + self2.emit("error", er); + if (--n === 0) { + self2.matches[index] = set; + cb(); + } + }); + }); + }; + Glob.prototype._mark = function(p) { + return common.mark(this, p); + }; + Glob.prototype._makeAbs = function(f) { + return common.makeAbs(this, f); + }; + Glob.prototype.abort = function() { + this.aborted = true; + this.emit("abort"); + }; + Glob.prototype.pause = function() { + if (!this.paused) { + this.paused = true; + this.emit("pause"); + } + }; + Glob.prototype.resume = function() { + if (this.paused) { + this.emit("resume"); + this.paused = false; + if (this._emitQueue.length) { + var eq = this._emitQueue.slice(0); + this._emitQueue.length = 0; + for (var i = 0; i < eq.length; i++) { + var e = eq[i]; + this._emitMatch(e[0], e[1]); + } + } + if (this._processQueue.length) { + var pq = this._processQueue.slice(0); + this._processQueue.length = 0; + for (var i = 0; i < pq.length; i++) { + var p = pq[i]; + this._processing--; + this._process(p[0], p[1], p[2], p[3]); + } + } + } + }; + Glob.prototype._process = function(pattern, index, inGlobStar, cb) { + assert(this instanceof Glob); + assert(typeof cb === "function"); + if (this.aborted) + return; + this._processing++; + if (this.paused) { + this._processQueue.push([pattern, index, inGlobStar, cb]); + return; + } + var n = 0; + while (typeof pattern[n] === "string") { + n++; + } + var prefix; + switch (n) { + // if not, then this is rather simple + case pattern.length: + this._processSimple(pattern.join("/"), index, cb); + return; + case 0: + prefix = null; + break; + default: + prefix = pattern.slice(0, n).join("/"); + break; + } + var remain = pattern.slice(n); + var read; + if (prefix === null) + read = "."; + else if (isAbsolute(prefix) || isAbsolute(pattern.map(function(p) { + return typeof p === "string" ? p : "[*]"; + }).join("/"))) { + if (!prefix || !isAbsolute(prefix)) + prefix = "/" + prefix; + read = prefix; + } else + read = prefix; + var abs = this._makeAbs(read); + if (childrenIgnored(this, read)) + return cb(); + var isGlobStar = remain[0] === minimatch.GLOBSTAR; + if (isGlobStar) + this._processGlobStar(prefix, read, abs, remain, index, inGlobStar, cb); + else + this._processReaddir(prefix, read, abs, remain, index, inGlobStar, cb); + }; + Glob.prototype._processReaddir = function(prefix, read, abs, remain, index, inGlobStar, cb) { + var self2 = this; + this._readdir(abs, inGlobStar, function(er, entries) { + return self2._processReaddir2(prefix, read, abs, remain, index, inGlobStar, entries, cb); + }); + }; + Glob.prototype._processReaddir2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { + if (!entries) + return cb(); + var pn = remain[0]; + var negate = !!this.minimatch.negate; + var rawGlob = pn._glob; + var dotOk = this.dot || rawGlob.charAt(0) === "."; + var matchedEntries = []; + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + if (e.charAt(0) !== "." || dotOk) { + var m; + if (negate && !prefix) { + m = !e.match(pn); + } else { + m = e.match(pn); + } + if (m) + matchedEntries.push(e); + } + } + var len = matchedEntries.length; + if (len === 0) + return cb(); + if (remain.length === 1 && !this.mark && !this.stat) { + if (!this.matches[index]) + this.matches[index] = /* @__PURE__ */ Object.create(null); + for (var i = 0; i < len; i++) { + var e = matchedEntries[i]; + if (prefix) { + if (prefix !== "/") + e = prefix + "/" + e; + else + e = prefix + e; + } + if (e.charAt(0) === "/" && !this.nomount) { + e = path.join(this.root, e); + } + this._emitMatch(index, e); + } + return cb(); + } + remain.shift(); + for (var i = 0; i < len; i++) { + var e = matchedEntries[i]; + var newPattern; + if (prefix) { + if (prefix !== "/") + e = prefix + "/" + e; + else + e = prefix + e; + } + this._process([e].concat(remain), index, inGlobStar, cb); + } + cb(); + }; + Glob.prototype._emitMatch = function(index, e) { + if (this.aborted) + return; + if (isIgnored(this, e)) + return; + if (this.paused) { + this._emitQueue.push([index, e]); + return; + } + var abs = isAbsolute(e) ? e : this._makeAbs(e); + if (this.mark) + e = this._mark(e); + if (this.absolute) + e = abs; + if (this.matches[index][e]) + return; + if (this.nodir) { + var c = this.cache[abs]; + if (c === "DIR" || Array.isArray(c)) + return; + } + this.matches[index][e] = true; + var st = this.statCache[abs]; + if (st) + this.emit("stat", e, st); + this.emit("match", e); + }; + Glob.prototype._readdirInGlobStar = function(abs, cb) { + if (this.aborted) + return; + if (this.follow) + return this._readdir(abs, false, cb); + var lstatkey = "lstat\0" + abs; + var self2 = this; + var lstatcb = inflight(lstatkey, lstatcb_); + if (lstatcb) + self2.fs.lstat(abs, lstatcb); + function lstatcb_(er, lstat) { + if (er && er.code === "ENOENT") + return cb(); + var isSym = lstat && lstat.isSymbolicLink(); + self2.symlinks[abs] = isSym; + if (!isSym && lstat && !lstat.isDirectory()) { + self2.cache[abs] = "FILE"; + cb(); + } else + self2._readdir(abs, false, cb); + } + }; + Glob.prototype._readdir = function(abs, inGlobStar, cb) { + if (this.aborted) + return; + cb = inflight("readdir\0" + abs + "\0" + inGlobStar, cb); + if (!cb) + return; + if (inGlobStar && !ownProp(this.symlinks, abs)) + return this._readdirInGlobStar(abs, cb); + if (ownProp(this.cache, abs)) { + var c = this.cache[abs]; + if (!c || c === "FILE") + return cb(); + if (Array.isArray(c)) + return cb(null, c); + } + var self2 = this; + self2.fs.readdir(abs, readdirCb(this, abs, cb)); + }; + function readdirCb(self2, abs, cb) { + return function(er, entries) { + if (er) + self2._readdirError(abs, er, cb); + else + self2._readdirEntries(abs, entries, cb); + }; + } + Glob.prototype._readdirEntries = function(abs, entries, cb) { + if (this.aborted) + return; + if (!this.mark && !this.stat) { + for (var i = 0; i < entries.length; i++) { + var e = entries[i]; + if (abs === "/") + e = abs + e; + else + e = abs + "/" + e; + this.cache[e] = true; + } + } + this.cache[abs] = entries; + return cb(null, entries); + }; + Glob.prototype._readdirError = function(f, er, cb) { + if (this.aborted) + return; + switch (er.code) { + case "ENOTSUP": + // https://github.com/isaacs/node-glob/issues/205 + case "ENOTDIR": + var abs = this._makeAbs(f); + this.cache[abs] = "FILE"; + if (abs === this.cwdAbs) { + var error = new Error(er.code + " invalid cwd " + this.cwd); + error.path = this.cwd; + error.code = er.code; + this.emit("error", error); + this.abort(); + } + break; + case "ENOENT": + // not terribly unusual + case "ELOOP": + case "ENAMETOOLONG": + case "UNKNOWN": + this.cache[this._makeAbs(f)] = false; + break; + default: + this.cache[this._makeAbs(f)] = false; + if (this.strict) { + this.emit("error", er); + this.abort(); + } + if (!this.silent) + console.error("glob error", er); + break; + } + return cb(); + }; + Glob.prototype._processGlobStar = function(prefix, read, abs, remain, index, inGlobStar, cb) { + var self2 = this; + this._readdir(abs, inGlobStar, function(er, entries) { + self2._processGlobStar2(prefix, read, abs, remain, index, inGlobStar, entries, cb); + }); + }; + Glob.prototype._processGlobStar2 = function(prefix, read, abs, remain, index, inGlobStar, entries, cb) { + if (!entries) + return cb(); + var remainWithoutGlobStar = remain.slice(1); + var gspref = prefix ? [prefix] : []; + var noGlobStar = gspref.concat(remainWithoutGlobStar); + this._process(noGlobStar, index, false, cb); + var isSym = this.symlinks[abs]; + var len = entries.length; + if (isSym && inGlobStar) + return cb(); + for (var i = 0; i < len; i++) { + var e = entries[i]; + if (e.charAt(0) === "." && !this.dot) + continue; + var instead = gspref.concat(entries[i], remainWithoutGlobStar); + this._process(instead, index, true, cb); + var below = gspref.concat(entries[i], remain); + this._process(below, index, true, cb); + } + cb(); + }; + Glob.prototype._processSimple = function(prefix, index, cb) { + var self2 = this; + this._stat(prefix, function(er, exists) { + self2._processSimple2(prefix, index, er, exists, cb); + }); + }; + Glob.prototype._processSimple2 = function(prefix, index, er, exists, cb) { + if (!this.matches[index]) + this.matches[index] = /* @__PURE__ */ Object.create(null); + if (!exists) + return cb(); + if (prefix && isAbsolute(prefix) && !this.nomount) { + var trail = /[\/\\]$/.test(prefix); + if (prefix.charAt(0) === "/") { + prefix = path.join(this.root, prefix); + } else { + prefix = path.resolve(this.root, prefix); + if (trail) + prefix += "/"; + } + } + if (process.platform === "win32") + prefix = prefix.replace(/\\/g, "/"); + this._emitMatch(index, prefix); + cb(); + }; + Glob.prototype._stat = function(f, cb) { + var abs = this._makeAbs(f); + var needDir = f.slice(-1) === "/"; + if (f.length > this.maxLength) + return cb(); + if (!this.stat && ownProp(this.cache, abs)) { + var c = this.cache[abs]; + if (Array.isArray(c)) + c = "DIR"; + if (!needDir || c === "DIR") + return cb(null, c); + if (needDir && c === "FILE") + return cb(); + } + var exists; + var stat = this.statCache[abs]; + if (stat !== void 0) { + if (stat === false) + return cb(null, stat); + else { + var type = stat.isDirectory() ? "DIR" : "FILE"; + if (needDir && type === "FILE") + return cb(); + else + return cb(null, type, stat); + } + } + var self2 = this; + var statcb = inflight("stat\0" + abs, lstatcb_); + if (statcb) + self2.fs.lstat(abs, statcb); + function lstatcb_(er, lstat) { + if (lstat && lstat.isSymbolicLink()) { + return self2.fs.stat(abs, function(er2, stat2) { + if (er2) + self2._stat2(f, abs, null, lstat, cb); + else + self2._stat2(f, abs, er2, stat2, cb); + }); + } else { + self2._stat2(f, abs, er, lstat, cb); + } + } + }; + Glob.prototype._stat2 = function(f, abs, er, stat, cb) { + if (er && (er.code === "ENOENT" || er.code === "ENOTDIR")) { + this.statCache[abs] = false; + return cb(); + } + var needDir = f.slice(-1) === "/"; + this.statCache[abs] = stat; + if (abs.slice(-1) === "/" && stat && !stat.isDirectory()) + return cb(null, false, stat); + var c = true; + if (stat) + c = stat.isDirectory() ? "DIR" : "FILE"; + this.cache[abs] = this.cache[abs] || c; + if (needDir && c === "FILE") + return cb(); + return cb(null, c, stat); + }; + } +}); + +// ../../node_modules/.pnpm/archiver-utils@2.1.0/node_modules/archiver-utils/file.js +var require_file2 = __commonJS({ + "../../node_modules/.pnpm/archiver-utils@2.1.0/node_modules/archiver-utils/file.js"(exports2, module2) { + var fs = require_graceful_fs(); + var path = require("path"); + var flatten = require_lodash16(); + var difference = require_lodash17(); + var union = require_lodash18(); + var isPlainObject = require_lodash5(); + var glob = require_glob(); + var file2 = module2.exports = {}; + var pathSeparatorRe = /[\/\\]/g; + var processPatterns = function(patterns, fn) { + var result = []; + flatten(patterns).forEach(function(pattern) { + var exclusion = pattern.indexOf("!") === 0; + if (exclusion) { + pattern = pattern.slice(1); + } + var matches = fn(pattern); + if (exclusion) { + result = difference(result, matches); + } else { + result = union(result, matches); + } + }); + return result; + }; + file2.exists = function() { + var filepath = path.join.apply(path, arguments); + return fs.existsSync(filepath); + }; + file2.expand = function(...args) { + var options = isPlainObject(args[0]) ? args.shift() : {}; + var patterns = Array.isArray(args[0]) ? args[0] : args; + if (patterns.length === 0) { + return []; + } + var matches = processPatterns(patterns, function(pattern) { + return glob.sync(pattern, options); + }); + if (options.filter) { + matches = matches.filter(function(filepath) { + filepath = path.join(options.cwd || "", filepath); + try { + if (typeof options.filter === "function") { + return options.filter(filepath); + } else { + return fs.statSync(filepath)[options.filter](); + } + } catch (e) { + return false; + } + }); + } + return matches; + }; + file2.expandMapping = function(patterns, destBase, options) { + options = Object.assign({ + rename: function(destBase2, destPath) { + return path.join(destBase2 || "", destPath); + } + }, options); + var files = []; + var fileByDest = {}; + file2.expand(options, patterns).forEach(function(src) { + var destPath = src; + if (options.flatten) { + destPath = path.basename(destPath); + } + if (options.ext) { + destPath = destPath.replace(/(\.[^\/]*)?$/, options.ext); + } + var dest = options.rename(destBase, destPath, options); + if (options.cwd) { + src = path.join(options.cwd, src); + } + dest = dest.replace(pathSeparatorRe, "/"); + src = src.replace(pathSeparatorRe, "/"); + if (fileByDest[dest]) { + fileByDest[dest].src.push(src); + } else { + files.push({ + src: [src], + dest + }); + fileByDest[dest] = files[files.length - 1]; + } + }); + return files; + }; + file2.normalizeFilesArray = function(data) { + var files = []; + data.forEach(function(obj2) { + var prop; + if ("src" in obj2 || "dest" in obj2) { + files.push(obj2); + } + }); + if (files.length === 0) { + return []; + } + files = _(files).chain().forEach(function(obj2) { + if (!("src" in obj2) || !obj2.src) { + return; + } + if (Array.isArray(obj2.src)) { + obj2.src = flatten(obj2.src); + } else { + obj2.src = [obj2.src]; + } + }).map(function(obj2) { + var expandOptions = Object.assign({}, obj2); + delete expandOptions.src; + delete expandOptions.dest; + if (obj2.expand) { + return file2.expandMapping(obj2.src, obj2.dest, expandOptions).map(function(mapObj) { + var result2 = Object.assign({}, obj2); + result2.orig = Object.assign({}, obj2); + result2.src = mapObj.src; + result2.dest = mapObj.dest; + ["expand", "cwd", "flatten", "rename", "ext"].forEach(function(prop) { + delete result2[prop]; + }); + return result2; + }); + } + var result = Object.assign({}, obj2); + result.orig = Object.assign({}, obj2); + if ("src" in result) { + Object.defineProperty(result, "src", { + enumerable: true, + get: function fn() { + var src; + if (!("result" in fn)) { + src = obj2.src; + src = Array.isArray(src) ? flatten(src) : [src]; + fn.result = file2.expand(expandOptions, src); + } + return fn.result; + } + }); + } + if ("dest" in result) { + result.dest = obj2.dest; + } + return result; + }).flatten().value(); + return files; + }; + } +}); + +// ../../node_modules/.pnpm/archiver-utils@2.1.0/node_modules/archiver-utils/index.js +var require_archiver_utils = __commonJS({ + "../../node_modules/.pnpm/archiver-utils@2.1.0/node_modules/archiver-utils/index.js"(exports2, module2) { + var fs = require_graceful_fs(); + var path = require("path"); + var nutil = require("util"); + var lazystream = require_lazystream(); + var normalizePath = require_normalize_path(); + var defaults = require_lodash15(); + var Stream = require("stream").Stream; + var PassThrough = require_readable2().PassThrough; + var utils = module2.exports = {}; + utils.file = require_file2(); + utils.collectStream = function(source, callback) { + var collection = []; + var size = 0; + source.on("error", callback); + source.on("data", function(chunk) { + collection.push(chunk); + size += chunk.length; + }); + source.on("end", function() { + var buf = new Buffer(size); + var offset = 0; + collection.forEach(function(data) { + data.copy(buf, offset); + offset += data.length; + }); + callback(null, buf); + }); + }; + utils.dateify = function(dateish) { + dateish = dateish || /* @__PURE__ */ new Date(); + if (dateish instanceof Date) { + dateish = dateish; + } else if (typeof dateish === "string") { + dateish = new Date(dateish); + } else { + dateish = /* @__PURE__ */ new Date(); + } + return dateish; + }; + utils.defaults = function(object, source, guard) { + var args = arguments; + args[0] = args[0] || {}; + return defaults(...args); + }; + utils.isStream = function(source) { + return source instanceof Stream; + }; + utils.lazyReadStream = function(filepath) { + return new lazystream.Readable(function() { + return fs.createReadStream(filepath); + }); + }; + utils.normalizeInputSource = function(source) { + if (source === null) { + return new Buffer(0); + } else if (typeof source === "string") { + return new Buffer(source); + } else if (utils.isStream(source) && !source._readableState) { + var normalized = new PassThrough(); + source.pipe(normalized); + return normalized; + } + return source; + }; + utils.sanitizePath = function(filepath) { + return normalizePath(filepath, false).replace(/^\w+:/, "").replace(/^(\.\.\/|\/)+/, ""); + }; + utils.trailingSlashIt = function(str) { + return str.slice(-1) !== "/" ? str + "/" : str; + }; + utils.unixifyPath = function(filepath) { + return normalizePath(filepath, false).replace(/^\w+:/, ""); + }; + utils.walkdir = function(dirpath, base, callback) { + var results = []; + if (typeof base === "function") { + callback = base; + base = dirpath; + } + fs.readdir(dirpath, function(err, list) { + var i = 0; + var file2; + var filepath; + if (err) { + return callback(err); + } + (function next() { + file2 = list[i++]; + if (!file2) { + return callback(null, results); + } + filepath = path.join(dirpath, file2); + fs.stat(filepath, function(err2, stats) { + results.push({ + path: filepath, + relative: path.relative(base, filepath).replace(/\\/g, "/"), + stats + }); + if (stats && stats.isDirectory()) { + utils.walkdir(filepath, base, function(err3, res) { + res.forEach(function(dirEntry) { + results.push(dirEntry); + }); + next(); + }); + } else { + next(); + } + }); + })(); + }); + }; + } +}); + +// ../../node_modules/.pnpm/archiver@5.3.2/node_modules/archiver/lib/error.js +var require_error = __commonJS({ + "../../node_modules/.pnpm/archiver@5.3.2/node_modules/archiver/lib/error.js"(exports2, module2) { + var util2 = require("util"); + var ERROR_CODES = { + "ABORTED": "archive was aborted", + "DIRECTORYDIRPATHREQUIRED": "diretory dirpath argument must be a non-empty string value", + "DIRECTORYFUNCTIONINVALIDDATA": "invalid data returned by directory custom data function", + "ENTRYNAMEREQUIRED": "entry name must be a non-empty string value", + "FILEFILEPATHREQUIRED": "file filepath argument must be a non-empty string value", + "FINALIZING": "archive already finalizing", + "QUEUECLOSED": "queue closed", + "NOENDMETHOD": "no suitable finalize/end method defined by module", + "DIRECTORYNOTSUPPORTED": "support for directory entries not defined by module", + "FORMATSET": "archive format already set", + "INPUTSTEAMBUFFERREQUIRED": "input source must be valid Stream or Buffer instance", + "MODULESET": "module already set", + "SYMLINKNOTSUPPORTED": "support for symlink entries not defined by module", + "SYMLINKFILEPATHREQUIRED": "symlink filepath argument must be a non-empty string value", + "SYMLINKTARGETREQUIRED": "symlink target argument must be a non-empty string value", + "ENTRYNOTSUPPORTED": "entry not supported" + }; + function ArchiverError(code, data) { + Error.captureStackTrace(this, this.constructor); + this.message = ERROR_CODES[code] || code; + this.code = code; + this.data = data; + } + util2.inherits(ArchiverError, Error); + exports2 = module2.exports = ArchiverError; + } +}); + +// ../../node_modules/.pnpm/archiver@5.3.2/node_modules/archiver/lib/core.js +var require_core4 = __commonJS({ + "../../node_modules/.pnpm/archiver@5.3.2/node_modules/archiver/lib/core.js"(exports2, module2) { + var fs = require("fs"); + var glob = require_readdir_glob(); + var async = require_async2(); + var path = require("path"); + var util2 = require_archiver_utils(); + var inherits2 = require("util").inherits; + var ArchiverError = require_error(); + var Transform = require_readable().Transform; + var win32 = process.platform === "win32"; + var Archiver = function(format, options) { + if (!(this instanceof Archiver)) { + return new Archiver(format, options); + } + if (typeof format !== "string") { + options = format; + format = "zip"; + } + options = this.options = util2.defaults(options, { + highWaterMark: 1024 * 1024, + statConcurrency: 4 + }); + Transform.call(this, options); + this._format = false; + this._module = false; + this._pending = 0; + this._pointer = 0; + this._entriesCount = 0; + this._entriesProcessedCount = 0; + this._fsEntriesTotalBytes = 0; + this._fsEntriesProcessedBytes = 0; + this._queue = async.queue(this._onQueueTask.bind(this), 1); + this._queue.drain(this._onQueueDrain.bind(this)); + this._statQueue = async.queue(this._onStatQueueTask.bind(this), options.statConcurrency); + this._statQueue.drain(this._onQueueDrain.bind(this)); + this._state = { + aborted: false, + finalize: false, + finalizing: false, + finalized: false, + modulePiped: false + }; + this._streams = []; + }; + inherits2(Archiver, Transform); + Archiver.prototype._abort = function() { + this._state.aborted = true; + this._queue.kill(); + this._statQueue.kill(); + if (this._queue.idle()) { + this._shutdown(); + } + }; + Archiver.prototype._append = function(filepath, data) { + data = data || {}; + var task = { + source: null, + filepath + }; + if (!data.name) { + data.name = filepath; + } + data.sourcePath = filepath; + task.data = data; + this._entriesCount++; + if (data.stats && data.stats instanceof fs.Stats) { + task = this._updateQueueTaskWithStats(task, data.stats); + if (task) { + if (data.stats.size) { + this._fsEntriesTotalBytes += data.stats.size; + } + this._queue.push(task); + } + } else { + this._statQueue.push(task); + } + }; + Archiver.prototype._finalize = function() { + if (this._state.finalizing || this._state.finalized || this._state.aborted) { + return; + } + this._state.finalizing = true; + this._moduleFinalize(); + this._state.finalizing = false; + this._state.finalized = true; + }; + Archiver.prototype._maybeFinalize = function() { + if (this._state.finalizing || this._state.finalized || this._state.aborted) { + return false; + } + if (this._state.finalize && this._pending === 0 && this._queue.idle() && this._statQueue.idle()) { + this._finalize(); + return true; + } + return false; + }; + Archiver.prototype._moduleAppend = function(source, data, callback) { + if (this._state.aborted) { + callback(); + return; + } + this._module.append(source, data, function(err) { + this._task = null; + if (this._state.aborted) { + this._shutdown(); + return; + } + if (err) { + this.emit("error", err); + setImmediate(callback); + return; + } + this.emit("entry", data); + this._entriesProcessedCount++; + if (data.stats && data.stats.size) { + this._fsEntriesProcessedBytes += data.stats.size; + } + this.emit("progress", { + entries: { + total: this._entriesCount, + processed: this._entriesProcessedCount + }, + fs: { + totalBytes: this._fsEntriesTotalBytes, + processedBytes: this._fsEntriesProcessedBytes + } + }); + setImmediate(callback); + }.bind(this)); + }; + Archiver.prototype._moduleFinalize = function() { + if (typeof this._module.finalize === "function") { + this._module.finalize(); + } else if (typeof this._module.end === "function") { + this._module.end(); + } else { + this.emit("error", new ArchiverError("NOENDMETHOD")); + } + }; + Archiver.prototype._modulePipe = function() { + this._module.on("error", this._onModuleError.bind(this)); + this._module.pipe(this); + this._state.modulePiped = true; + }; + Archiver.prototype._moduleSupports = function(key) { + if (!this._module.supports || !this._module.supports[key]) { + return false; + } + return this._module.supports[key]; + }; + Archiver.prototype._moduleUnpipe = function() { + this._module.unpipe(this); + this._state.modulePiped = false; + }; + Archiver.prototype._normalizeEntryData = function(data, stats) { + data = util2.defaults(data, { + type: "file", + name: null, + date: null, + mode: null, + prefix: null, + sourcePath: null, + stats: false + }); + if (stats && data.stats === false) { + data.stats = stats; + } + var isDir = data.type === "directory"; + if (data.name) { + if (typeof data.prefix === "string" && "" !== data.prefix) { + data.name = data.prefix + "/" + data.name; + data.prefix = null; + } + data.name = util2.sanitizePath(data.name); + if (data.type !== "symlink" && data.name.slice(-1) === "/") { + isDir = true; + data.type = "directory"; + } else if (isDir) { + data.name += "/"; + } + } + if (typeof data.mode === "number") { + if (win32) { + data.mode &= 511; + } else { + data.mode &= 4095; + } + } else if (data.stats && data.mode === null) { + if (win32) { + data.mode = data.stats.mode & 511; + } else { + data.mode = data.stats.mode & 4095; + } + if (win32 && isDir) { + data.mode = 493; + } + } else if (data.mode === null) { + data.mode = isDir ? 493 : 420; + } + if (data.stats && data.date === null) { + data.date = data.stats.mtime; + } else { + data.date = util2.dateify(data.date); + } + return data; + }; + Archiver.prototype._onModuleError = function(err) { + this.emit("error", err); + }; + Archiver.prototype._onQueueDrain = function() { + if (this._state.finalizing || this._state.finalized || this._state.aborted) { + return; + } + if (this._state.finalize && this._pending === 0 && this._queue.idle() && this._statQueue.idle()) { + this._finalize(); + } + }; + Archiver.prototype._onQueueTask = function(task, callback) { + var fullCallback = () => { + if (task.data.callback) { + task.data.callback(); + } + callback(); + }; + if (this._state.finalizing || this._state.finalized || this._state.aborted) { + fullCallback(); + return; + } + this._task = task; + this._moduleAppend(task.source, task.data, fullCallback); + }; + Archiver.prototype._onStatQueueTask = function(task, callback) { + if (this._state.finalizing || this._state.finalized || this._state.aborted) { + callback(); + return; + } + fs.lstat(task.filepath, function(err, stats) { + if (this._state.aborted) { + setImmediate(callback); + return; + } + if (err) { + this._entriesCount--; + this.emit("warning", err); + setImmediate(callback); + return; + } + task = this._updateQueueTaskWithStats(task, stats); + if (task) { + if (stats.size) { + this._fsEntriesTotalBytes += stats.size; + } + this._queue.push(task); + } + setImmediate(callback); + }.bind(this)); + }; + Archiver.prototype._shutdown = function() { + this._moduleUnpipe(); + this.end(); + }; + Archiver.prototype._transform = function(chunk, encoding, callback) { + if (chunk) { + this._pointer += chunk.length; + } + callback(null, chunk); + }; + Archiver.prototype._updateQueueTaskWithStats = function(task, stats) { + if (stats.isFile()) { + task.data.type = "file"; + task.data.sourceType = "stream"; + task.source = util2.lazyReadStream(task.filepath); + } else if (stats.isDirectory() && this._moduleSupports("directory")) { + task.data.name = util2.trailingSlashIt(task.data.name); + task.data.type = "directory"; + task.data.sourcePath = util2.trailingSlashIt(task.filepath); + task.data.sourceType = "buffer"; + task.source = Buffer.concat([]); + } else if (stats.isSymbolicLink() && this._moduleSupports("symlink")) { + var linkPath = fs.readlinkSync(task.filepath); + var dirName = path.dirname(task.filepath); + task.data.type = "symlink"; + task.data.linkname = path.relative(dirName, path.resolve(dirName, linkPath)); + task.data.sourceType = "buffer"; + task.source = Buffer.concat([]); + } else { + if (stats.isDirectory()) { + this.emit("warning", new ArchiverError("DIRECTORYNOTSUPPORTED", task.data)); + } else if (stats.isSymbolicLink()) { + this.emit("warning", new ArchiverError("SYMLINKNOTSUPPORTED", task.data)); + } else { + this.emit("warning", new ArchiverError("ENTRYNOTSUPPORTED", task.data)); + } + return null; + } + task.data = this._normalizeEntryData(task.data, stats); + return task; + }; + Archiver.prototype.abort = function() { + if (this._state.aborted || this._state.finalized) { + return this; + } + this._abort(); + return this; + }; + Archiver.prototype.append = function(source, data) { + if (this._state.finalize || this._state.aborted) { + this.emit("error", new ArchiverError("QUEUECLOSED")); + return this; + } + data = this._normalizeEntryData(data); + if (typeof data.name !== "string" || data.name.length === 0) { + this.emit("error", new ArchiverError("ENTRYNAMEREQUIRED")); + return this; + } + if (data.type === "directory" && !this._moduleSupports("directory")) { + this.emit("error", new ArchiverError("DIRECTORYNOTSUPPORTED", { name: data.name })); + return this; + } + source = util2.normalizeInputSource(source); + if (Buffer.isBuffer(source)) { + data.sourceType = "buffer"; + } else if (util2.isStream(source)) { + data.sourceType = "stream"; + } else { + this.emit("error", new ArchiverError("INPUTSTEAMBUFFERREQUIRED", { name: data.name })); + return this; + } + this._entriesCount++; + this._queue.push({ + data, + source + }); + return this; + }; + Archiver.prototype.directory = function(dirpath, destpath, data) { + if (this._state.finalize || this._state.aborted) { + this.emit("error", new ArchiverError("QUEUECLOSED")); + return this; + } + if (typeof dirpath !== "string" || dirpath.length === 0) { + this.emit("error", new ArchiverError("DIRECTORYDIRPATHREQUIRED")); + return this; + } + this._pending++; + if (destpath === false) { + destpath = ""; + } else if (typeof destpath !== "string") { + destpath = dirpath; + } + var dataFunction = false; + if (typeof data === "function") { + dataFunction = data; + data = {}; + } else if (typeof data !== "object") { + data = {}; + } + var globOptions = { + stat: true, + dot: true + }; + function onGlobEnd() { + this._pending--; + this._maybeFinalize(); + } + function onGlobError(err) { + this.emit("error", err); + } + function onGlobMatch(match) { + globber.pause(); + var ignoreMatch = false; + var entryData = Object.assign({}, data); + entryData.name = match.relative; + entryData.prefix = destpath; + entryData.stats = match.stat; + entryData.callback = globber.resume.bind(globber); + try { + if (dataFunction) { + entryData = dataFunction(entryData); + if (entryData === false) { + ignoreMatch = true; + } else if (typeof entryData !== "object") { + throw new ArchiverError("DIRECTORYFUNCTIONINVALIDDATA", { dirpath }); + } + } + } catch (e) { + this.emit("error", e); + return; + } + if (ignoreMatch) { + globber.resume(); + return; + } + this._append(match.absolute, entryData); + } + var globber = glob(dirpath, globOptions); + globber.on("error", onGlobError.bind(this)); + globber.on("match", onGlobMatch.bind(this)); + globber.on("end", onGlobEnd.bind(this)); + return this; + }; + Archiver.prototype.file = function(filepath, data) { + if (this._state.finalize || this._state.aborted) { + this.emit("error", new ArchiverError("QUEUECLOSED")); + return this; + } + if (typeof filepath !== "string" || filepath.length === 0) { + this.emit("error", new ArchiverError("FILEFILEPATHREQUIRED")); + return this; + } + this._append(filepath, data); + return this; + }; + Archiver.prototype.glob = function(pattern, options, data) { + this._pending++; + options = util2.defaults(options, { + stat: true, + pattern + }); + function onGlobEnd() { + this._pending--; + this._maybeFinalize(); + } + function onGlobError(err) { + this.emit("error", err); + } + function onGlobMatch(match) { + globber.pause(); + var entryData = Object.assign({}, data); + entryData.callback = globber.resume.bind(globber); + entryData.stats = match.stat; + entryData.name = match.relative; + this._append(match.absolute, entryData); + } + var globber = glob(options.cwd || ".", options); + globber.on("error", onGlobError.bind(this)); + globber.on("match", onGlobMatch.bind(this)); + globber.on("end", onGlobEnd.bind(this)); + return this; + }; + Archiver.prototype.finalize = function() { + if (this._state.aborted) { + var abortedError = new ArchiverError("ABORTED"); + this.emit("error", abortedError); + return Promise.reject(abortedError); + } + if (this._state.finalize) { + var finalizingError = new ArchiverError("FINALIZING"); + this.emit("error", finalizingError); + return Promise.reject(finalizingError); + } + this._state.finalize = true; + if (this._pending === 0 && this._queue.idle() && this._statQueue.idle()) { + this._finalize(); + } + var self2 = this; + return new Promise(function(resolve, reject) { + var errored; + self2._module.on("end", function() { + if (!errored) { + resolve(); + } + }); + self2._module.on("error", function(err) { + errored = true; + reject(err); + }); + }); + }; + Archiver.prototype.setFormat = function(format) { + if (this._format) { + this.emit("error", new ArchiverError("FORMATSET")); + return this; + } + this._format = format; + return this; + }; + Archiver.prototype.setModule = function(module3) { + if (this._state.aborted) { + this.emit("error", new ArchiverError("ABORTED")); + return this; + } + if (this._state.module) { + this.emit("error", new ArchiverError("MODULESET")); + return this; + } + this._module = module3; + this._modulePipe(); + return this; + }; + Archiver.prototype.symlink = function(filepath, target, mode) { + if (this._state.finalize || this._state.aborted) { + this.emit("error", new ArchiverError("QUEUECLOSED")); + return this; + } + if (typeof filepath !== "string" || filepath.length === 0) { + this.emit("error", new ArchiverError("SYMLINKFILEPATHREQUIRED")); + return this; + } + if (typeof target !== "string" || target.length === 0) { + this.emit("error", new ArchiverError("SYMLINKTARGETREQUIRED", { filepath })); + return this; + } + if (!this._moduleSupports("symlink")) { + this.emit("error", new ArchiverError("SYMLINKNOTSUPPORTED", { filepath })); + return this; + } + var data = {}; + data.type = "symlink"; + data.name = filepath.replace(/\\/g, "/"); + data.linkname = target.replace(/\\/g, "/"); + data.sourceType = "buffer"; + if (typeof mode === "number") { + data.mode = mode; + } + this._entriesCount++; + this._queue.push({ + data, + source: Buffer.concat([]) + }); + return this; + }; + Archiver.prototype.pointer = function() { + return this._pointer; + }; + Archiver.prototype.use = function(plugin) { + this._streams.push(plugin); + return this; + }; + module2.exports = Archiver; + } +}); + +// ../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/archivers/archive-entry.js +var require_archive_entry = __commonJS({ + "../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/archivers/archive-entry.js"(exports2, module2) { + var ArchiveEntry = module2.exports = function() { + }; + ArchiveEntry.prototype.getName = function() { + }; + ArchiveEntry.prototype.getSize = function() { + }; + ArchiveEntry.prototype.getLastModifiedDate = function() { + }; + ArchiveEntry.prototype.isDirectory = function() { + }; + } +}); + +// ../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/archivers/zip/util.js +var require_util3 = __commonJS({ + "../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/archivers/zip/util.js"(exports2, module2) { + var util2 = module2.exports = {}; + util2.dateToDos = function(d, forceLocalTime) { + forceLocalTime = forceLocalTime || false; + var year = forceLocalTime ? d.getFullYear() : d.getUTCFullYear(); + if (year < 1980) { + return 2162688; + } else if (year >= 2044) { + return 2141175677; + } + var val = { + year, + month: forceLocalTime ? d.getMonth() : d.getUTCMonth(), + date: forceLocalTime ? d.getDate() : d.getUTCDate(), + hours: forceLocalTime ? d.getHours() : d.getUTCHours(), + minutes: forceLocalTime ? d.getMinutes() : d.getUTCMinutes(), + seconds: forceLocalTime ? d.getSeconds() : d.getUTCSeconds() + }; + return val.year - 1980 << 25 | val.month + 1 << 21 | val.date << 16 | val.hours << 11 | val.minutes << 5 | val.seconds / 2; + }; + util2.dosToDate = function(dos) { + return new Date((dos >> 25 & 127) + 1980, (dos >> 21 & 15) - 1, dos >> 16 & 31, dos >> 11 & 31, dos >> 5 & 63, (dos & 31) << 1); + }; + util2.fromDosTime = function(buf) { + return util2.dosToDate(buf.readUInt32LE(0)); + }; + util2.getEightBytes = function(v) { + var buf = Buffer.alloc(8); + buf.writeUInt32LE(v % 4294967296, 0); + buf.writeUInt32LE(v / 4294967296 | 0, 4); + return buf; + }; + util2.getShortBytes = function(v) { + var buf = Buffer.alloc(2); + buf.writeUInt16LE((v & 65535) >>> 0, 0); + return buf; + }; + util2.getShortBytesValue = function(buf, offset) { + return buf.readUInt16LE(offset); + }; + util2.getLongBytes = function(v) { + var buf = Buffer.alloc(4); + buf.writeUInt32LE((v & 4294967295) >>> 0, 0); + return buf; + }; + util2.getLongBytesValue = function(buf, offset) { + return buf.readUInt32LE(offset); + }; + util2.toDosTime = function(d) { + return util2.getLongBytes(util2.dateToDos(d)); + }; + } +}); + +// ../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/archivers/zip/general-purpose-bit.js +var require_general_purpose_bit = __commonJS({ + "../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/archivers/zip/general-purpose-bit.js"(exports2, module2) { + var zipUtil = require_util3(); + var DATA_DESCRIPTOR_FLAG = 1 << 3; + var ENCRYPTION_FLAG = 1 << 0; + var NUMBER_OF_SHANNON_FANO_TREES_FLAG = 1 << 2; + var SLIDING_DICTIONARY_SIZE_FLAG = 1 << 1; + var STRONG_ENCRYPTION_FLAG = 1 << 6; + var UFT8_NAMES_FLAG = 1 << 11; + var GeneralPurposeBit = module2.exports = function() { + if (!(this instanceof GeneralPurposeBit)) { + return new GeneralPurposeBit(); + } + this.descriptor = false; + this.encryption = false; + this.utf8 = false; + this.numberOfShannonFanoTrees = 0; + this.strongEncryption = false; + this.slidingDictionarySize = 0; + return this; + }; + GeneralPurposeBit.prototype.encode = function() { + return zipUtil.getShortBytes( + (this.descriptor ? DATA_DESCRIPTOR_FLAG : 0) | (this.utf8 ? UFT8_NAMES_FLAG : 0) | (this.encryption ? ENCRYPTION_FLAG : 0) | (this.strongEncryption ? STRONG_ENCRYPTION_FLAG : 0) + ); + }; + GeneralPurposeBit.prototype.parse = function(buf, offset) { + var flag = zipUtil.getShortBytesValue(buf, offset); + var gbp = new GeneralPurposeBit(); + gbp.useDataDescriptor((flag & DATA_DESCRIPTOR_FLAG) !== 0); + gbp.useUTF8ForNames((flag & UFT8_NAMES_FLAG) !== 0); + gbp.useStrongEncryption((flag & STRONG_ENCRYPTION_FLAG) !== 0); + gbp.useEncryption((flag & ENCRYPTION_FLAG) !== 0); + gbp.setSlidingDictionarySize((flag & SLIDING_DICTIONARY_SIZE_FLAG) !== 0 ? 8192 : 4096); + gbp.setNumberOfShannonFanoTrees((flag & NUMBER_OF_SHANNON_FANO_TREES_FLAG) !== 0 ? 3 : 2); + return gbp; + }; + GeneralPurposeBit.prototype.setNumberOfShannonFanoTrees = function(n) { + this.numberOfShannonFanoTrees = n; + }; + GeneralPurposeBit.prototype.getNumberOfShannonFanoTrees = function() { + return this.numberOfShannonFanoTrees; + }; + GeneralPurposeBit.prototype.setSlidingDictionarySize = function(n) { + this.slidingDictionarySize = n; + }; + GeneralPurposeBit.prototype.getSlidingDictionarySize = function() { + return this.slidingDictionarySize; + }; + GeneralPurposeBit.prototype.useDataDescriptor = function(b) { + this.descriptor = b; + }; + GeneralPurposeBit.prototype.usesDataDescriptor = function() { + return this.descriptor; + }; + GeneralPurposeBit.prototype.useEncryption = function(b) { + this.encryption = b; + }; + GeneralPurposeBit.prototype.usesEncryption = function() { + return this.encryption; + }; + GeneralPurposeBit.prototype.useStrongEncryption = function(b) { + this.strongEncryption = b; + }; + GeneralPurposeBit.prototype.usesStrongEncryption = function() { + return this.strongEncryption; + }; + GeneralPurposeBit.prototype.useUTF8ForNames = function(b) { + this.utf8 = b; + }; + GeneralPurposeBit.prototype.usesUTF8ForNames = function() { + return this.utf8; + }; + } +}); + +// ../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/archivers/zip/unix-stat.js +var require_unix_stat = __commonJS({ + "../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/archivers/zip/unix-stat.js"(exports2, module2) { + module2.exports = { + /** + * Bits used for permissions (and sticky bit) + */ + PERM_MASK: 4095, + // 07777 + /** + * Bits used to indicate the filesystem object type. + */ + FILE_TYPE_FLAG: 61440, + // 0170000 + /** + * Indicates symbolic links. + */ + LINK_FLAG: 40960, + // 0120000 + /** + * Indicates plain files. + */ + FILE_FLAG: 32768, + // 0100000 + /** + * Indicates directories. + */ + DIR_FLAG: 16384, + // 040000 + // ---------------------------------------------------------- + // somewhat arbitrary choices that are quite common for shared + // installations + // ----------------------------------------------------------- + /** + * Default permissions for symbolic links. + */ + DEFAULT_LINK_PERM: 511, + // 0777 + /** + * Default permissions for directories. + */ + DEFAULT_DIR_PERM: 493, + // 0755 + /** + * Default permissions for plain files. + */ + DEFAULT_FILE_PERM: 420 + // 0644 + }; + } +}); + +// ../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/archivers/zip/constants.js +var require_constants10 = __commonJS({ + "../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/archivers/zip/constants.js"(exports2, module2) { + module2.exports = { + WORD: 4, + DWORD: 8, + EMPTY: Buffer.alloc(0), + SHORT: 2, + SHORT_MASK: 65535, + SHORT_SHIFT: 16, + SHORT_ZERO: Buffer.from(Array(2)), + LONG: 4, + LONG_ZERO: Buffer.from(Array(4)), + MIN_VERSION_INITIAL: 10, + MIN_VERSION_DATA_DESCRIPTOR: 20, + MIN_VERSION_ZIP64: 45, + VERSION_MADEBY: 45, + METHOD_STORED: 0, + METHOD_DEFLATED: 8, + PLATFORM_UNIX: 3, + PLATFORM_FAT: 0, + SIG_LFH: 67324752, + SIG_DD: 134695760, + SIG_CFH: 33639248, + SIG_EOCD: 101010256, + SIG_ZIP64_EOCD: 101075792, + SIG_ZIP64_EOCD_LOC: 117853008, + ZIP64_MAGIC_SHORT: 65535, + ZIP64_MAGIC: 4294967295, + ZIP64_EXTRA_ID: 1, + ZLIB_NO_COMPRESSION: 0, + ZLIB_BEST_SPEED: 1, + ZLIB_BEST_COMPRESSION: 9, + ZLIB_DEFAULT_COMPRESSION: -1, + MODE_MASK: 4095, + DEFAULT_FILE_MODE: 33188, + // 010644 = -rw-r--r-- = S_IFREG | S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH + DEFAULT_DIR_MODE: 16877, + // 040755 = drwxr-xr-x = S_IFDIR | S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH + EXT_FILE_ATTR_DIR: 1106051088, + // 010173200020 = drwxr-xr-x = (((S_IFDIR | 0755) << 16) | S_DOS_D) + EXT_FILE_ATTR_FILE: 2175008800, + // 020151000040 = -rw-r--r-- = (((S_IFREG | 0644) << 16) | S_DOS_A) >>> 0 + // Unix file types + S_IFMT: 61440, + // 0170000 type of file mask + S_IFIFO: 4096, + // 010000 named pipe (fifo) + S_IFCHR: 8192, + // 020000 character special + S_IFDIR: 16384, + // 040000 directory + S_IFBLK: 24576, + // 060000 block special + S_IFREG: 32768, + // 0100000 regular + S_IFLNK: 40960, + // 0120000 symbolic link + S_IFSOCK: 49152, + // 0140000 socket + // DOS file type flags + S_DOS_A: 32, + // 040 Archive + S_DOS_D: 16, + // 020 Directory + S_DOS_V: 8, + // 010 Volume + S_DOS_S: 4, + // 04 System + S_DOS_H: 2, + // 02 Hidden + S_DOS_R: 1 + // 01 Read Only + }; + } +}); + +// ../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/archivers/zip/zip-archive-entry.js +var require_zip_archive_entry = __commonJS({ + "../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/archivers/zip/zip-archive-entry.js"(exports2, module2) { + var inherits2 = require("util").inherits; + var normalizePath = require_normalize_path(); + var ArchiveEntry = require_archive_entry(); + var GeneralPurposeBit = require_general_purpose_bit(); + var UnixStat = require_unix_stat(); + var constants = require_constants10(); + var zipUtil = require_util3(); + var ZipArchiveEntry = module2.exports = function(name) { + if (!(this instanceof ZipArchiveEntry)) { + return new ZipArchiveEntry(name); + } + ArchiveEntry.call(this); + this.platform = constants.PLATFORM_FAT; + this.method = -1; + this.name = null; + this.size = 0; + this.csize = 0; + this.gpb = new GeneralPurposeBit(); + this.crc = 0; + this.time = -1; + this.minver = constants.MIN_VERSION_INITIAL; + this.mode = -1; + this.extra = null; + this.exattr = 0; + this.inattr = 0; + this.comment = null; + if (name) { + this.setName(name); + } + }; + inherits2(ZipArchiveEntry, ArchiveEntry); + ZipArchiveEntry.prototype.getCentralDirectoryExtra = function() { + return this.getExtra(); + }; + ZipArchiveEntry.prototype.getComment = function() { + return this.comment !== null ? this.comment : ""; + }; + ZipArchiveEntry.prototype.getCompressedSize = function() { + return this.csize; + }; + ZipArchiveEntry.prototype.getCrc = function() { + return this.crc; + }; + ZipArchiveEntry.prototype.getExternalAttributes = function() { + return this.exattr; + }; + ZipArchiveEntry.prototype.getExtra = function() { + return this.extra !== null ? this.extra : constants.EMPTY; + }; + ZipArchiveEntry.prototype.getGeneralPurposeBit = function() { + return this.gpb; + }; + ZipArchiveEntry.prototype.getInternalAttributes = function() { + return this.inattr; + }; + ZipArchiveEntry.prototype.getLastModifiedDate = function() { + return this.getTime(); + }; + ZipArchiveEntry.prototype.getLocalFileDataExtra = function() { + return this.getExtra(); + }; + ZipArchiveEntry.prototype.getMethod = function() { + return this.method; + }; + ZipArchiveEntry.prototype.getName = function() { + return this.name; + }; + ZipArchiveEntry.prototype.getPlatform = function() { + return this.platform; + }; + ZipArchiveEntry.prototype.getSize = function() { + return this.size; + }; + ZipArchiveEntry.prototype.getTime = function() { + return this.time !== -1 ? zipUtil.dosToDate(this.time) : -1; + }; + ZipArchiveEntry.prototype.getTimeDos = function() { + return this.time !== -1 ? this.time : 0; + }; + ZipArchiveEntry.prototype.getUnixMode = function() { + return this.platform !== constants.PLATFORM_UNIX ? 0 : this.getExternalAttributes() >> constants.SHORT_SHIFT & constants.SHORT_MASK; + }; + ZipArchiveEntry.prototype.getVersionNeededToExtract = function() { + return this.minver; + }; + ZipArchiveEntry.prototype.setComment = function(comment) { + if (Buffer.byteLength(comment) !== comment.length) { + this.getGeneralPurposeBit().useUTF8ForNames(true); + } + this.comment = comment; + }; + ZipArchiveEntry.prototype.setCompressedSize = function(size) { + if (size < 0) { + throw new Error("invalid entry compressed size"); + } + this.csize = size; + }; + ZipArchiveEntry.prototype.setCrc = function(crc) { + if (crc < 0) { + throw new Error("invalid entry crc32"); + } + this.crc = crc; + }; + ZipArchiveEntry.prototype.setExternalAttributes = function(attr) { + this.exattr = attr >>> 0; + }; + ZipArchiveEntry.prototype.setExtra = function(extra) { + this.extra = extra; + }; + ZipArchiveEntry.prototype.setGeneralPurposeBit = function(gpb) { + if (!(gpb instanceof GeneralPurposeBit)) { + throw new Error("invalid entry GeneralPurposeBit"); + } + this.gpb = gpb; + }; + ZipArchiveEntry.prototype.setInternalAttributes = function(attr) { + this.inattr = attr; + }; + ZipArchiveEntry.prototype.setMethod = function(method) { + if (method < 0) { + throw new Error("invalid entry compression method"); + } + this.method = method; + }; + ZipArchiveEntry.prototype.setName = function(name, prependSlash = false) { + name = normalizePath(name, false).replace(/^\w+:/, "").replace(/^(\.\.\/|\/)+/, ""); + if (prependSlash) { + name = `/${name}`; + } + if (Buffer.byteLength(name) !== name.length) { + this.getGeneralPurposeBit().useUTF8ForNames(true); + } + this.name = name; + }; + ZipArchiveEntry.prototype.setPlatform = function(platform) { + this.platform = platform; + }; + ZipArchiveEntry.prototype.setSize = function(size) { + if (size < 0) { + throw new Error("invalid entry size"); + } + this.size = size; + }; + ZipArchiveEntry.prototype.setTime = function(time, forceLocalTime) { + if (!(time instanceof Date)) { + throw new Error("invalid entry time"); + } + this.time = zipUtil.dateToDos(time, forceLocalTime); + }; + ZipArchiveEntry.prototype.setUnixMode = function(mode) { + mode |= this.isDirectory() ? constants.S_IFDIR : constants.S_IFREG; + var extattr = 0; + extattr |= mode << constants.SHORT_SHIFT | (this.isDirectory() ? constants.S_DOS_D : constants.S_DOS_A); + this.setExternalAttributes(extattr); + this.mode = mode & constants.MODE_MASK; + this.platform = constants.PLATFORM_UNIX; + }; + ZipArchiveEntry.prototype.setVersionNeededToExtract = function(minver) { + this.minver = minver; + }; + ZipArchiveEntry.prototype.isDirectory = function() { + return this.getName().slice(-1) === "/"; + }; + ZipArchiveEntry.prototype.isUnixSymlink = function() { + return (this.getUnixMode() & UnixStat.FILE_TYPE_FLAG) === UnixStat.LINK_FLAG; + }; + ZipArchiveEntry.prototype.isZip64 = function() { + return this.csize > constants.ZIP64_MAGIC || this.size > constants.ZIP64_MAGIC; + }; + } +}); + +// ../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/util/index.js +var require_util4 = __commonJS({ + "../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/util/index.js"(exports2, module2) { + var Stream = require("stream").Stream; + var PassThrough = require_readable().PassThrough; + var util2 = module2.exports = {}; + util2.isStream = function(source) { + return source instanceof Stream; + }; + util2.normalizeInputSource = function(source) { + if (source === null) { + return Buffer.alloc(0); + } else if (typeof source === "string") { + return Buffer.from(source); + } else if (util2.isStream(source) && !source._readableState) { + var normalized = new PassThrough(); + source.pipe(normalized); + return normalized; + } + return source; + }; + } +}); + +// ../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/archivers/archive-output-stream.js +var require_archive_output_stream = __commonJS({ + "../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/archivers/archive-output-stream.js"(exports2, module2) { + var inherits2 = require("util").inherits; + var Transform = require_readable().Transform; + var ArchiveEntry = require_archive_entry(); + var util2 = require_util4(); + var ArchiveOutputStream = module2.exports = function(options) { + if (!(this instanceof ArchiveOutputStream)) { + return new ArchiveOutputStream(options); + } + Transform.call(this, options); + this.offset = 0; + this._archive = { + finish: false, + finished: false, + processing: false + }; + }; + inherits2(ArchiveOutputStream, Transform); + ArchiveOutputStream.prototype._appendBuffer = function(zae, source, callback) { + }; + ArchiveOutputStream.prototype._appendStream = function(zae, source, callback) { + }; + ArchiveOutputStream.prototype._emitErrorCallback = function(err) { + if (err) { + this.emit("error", err); + } + }; + ArchiveOutputStream.prototype._finish = function(ae) { + }; + ArchiveOutputStream.prototype._normalizeEntry = function(ae) { + }; + ArchiveOutputStream.prototype._transform = function(chunk, encoding, callback) { + callback(null, chunk); + }; + ArchiveOutputStream.prototype.entry = function(ae, source, callback) { + source = source || null; + if (typeof callback !== "function") { + callback = this._emitErrorCallback.bind(this); + } + if (!(ae instanceof ArchiveEntry)) { + callback(new Error("not a valid instance of ArchiveEntry")); + return; + } + if (this._archive.finish || this._archive.finished) { + callback(new Error("unacceptable entry after finish")); + return; + } + if (this._archive.processing) { + callback(new Error("already processing an entry")); + return; + } + this._archive.processing = true; + this._normalizeEntry(ae); + this._entry = ae; + source = util2.normalizeInputSource(source); + if (Buffer.isBuffer(source)) { + this._appendBuffer(ae, source, callback); + } else if (util2.isStream(source)) { + this._appendStream(ae, source, callback); + } else { + this._archive.processing = false; + callback(new Error("input source must be valid Stream or Buffer instance")); + return; + } + return this; + }; + ArchiveOutputStream.prototype.finish = function() { + if (this._archive.processing) { + this._archive.finish = true; + return; + } + this._finish(); + }; + ArchiveOutputStream.prototype.getBytesWritten = function() { + return this.offset; + }; + ArchiveOutputStream.prototype.write = function(chunk, cb) { + if (chunk) { + this.offset += chunk.length; + } + return Transform.prototype.write.call(this, chunk, cb); + }; + } +}); + +// ../../node_modules/.pnpm/buffer-crc32@0.2.13/node_modules/buffer-crc32/index.js +var require_buffer_crc32 = __commonJS({ + "../../node_modules/.pnpm/buffer-crc32@0.2.13/node_modules/buffer-crc32/index.js"(exports2, module2) { + var Buffer2 = require("buffer").Buffer; + var CRC_TABLE = [ + 0, + 1996959894, + 3993919788, + 2567524794, + 124634137, + 1886057615, + 3915621685, + 2657392035, + 249268274, + 2044508324, + 3772115230, + 2547177864, + 162941995, + 2125561021, + 3887607047, + 2428444049, + 498536548, + 1789927666, + 4089016648, + 2227061214, + 450548861, + 1843258603, + 4107580753, + 2211677639, + 325883990, + 1684777152, + 4251122042, + 2321926636, + 335633487, + 1661365465, + 4195302755, + 2366115317, + 997073096, + 1281953886, + 3579855332, + 2724688242, + 1006888145, + 1258607687, + 3524101629, + 2768942443, + 901097722, + 1119000684, + 3686517206, + 2898065728, + 853044451, + 1172266101, + 3705015759, + 2882616665, + 651767980, + 1373503546, + 3369554304, + 3218104598, + 565507253, + 1454621731, + 3485111705, + 3099436303, + 671266974, + 1594198024, + 3322730930, + 2970347812, + 795835527, + 1483230225, + 3244367275, + 3060149565, + 1994146192, + 31158534, + 2563907772, + 4023717930, + 1907459465, + 112637215, + 2680153253, + 3904427059, + 2013776290, + 251722036, + 2517215374, + 3775830040, + 2137656763, + 141376813, + 2439277719, + 3865271297, + 1802195444, + 476864866, + 2238001368, + 4066508878, + 1812370925, + 453092731, + 2181625025, + 4111451223, + 1706088902, + 314042704, + 2344532202, + 4240017532, + 1658658271, + 366619977, + 2362670323, + 4224994405, + 1303535960, + 984961486, + 2747007092, + 3569037538, + 1256170817, + 1037604311, + 2765210733, + 3554079995, + 1131014506, + 879679996, + 2909243462, + 3663771856, + 1141124467, + 855842277, + 2852801631, + 3708648649, + 1342533948, + 654459306, + 3188396048, + 3373015174, + 1466479909, + 544179635, + 3110523913, + 3462522015, + 1591671054, + 702138776, + 2966460450, + 3352799412, + 1504918807, + 783551873, + 3082640443, + 3233442989, + 3988292384, + 2596254646, + 62317068, + 1957810842, + 3939845945, + 2647816111, + 81470997, + 1943803523, + 3814918930, + 2489596804, + 225274430, + 2053790376, + 3826175755, + 2466906013, + 167816743, + 2097651377, + 4027552580, + 2265490386, + 503444072, + 1762050814, + 4150417245, + 2154129355, + 426522225, + 1852507879, + 4275313526, + 2312317920, + 282753626, + 1742555852, + 4189708143, + 2394877945, + 397917763, + 1622183637, + 3604390888, + 2714866558, + 953729732, + 1340076626, + 3518719985, + 2797360999, + 1068828381, + 1219638859, + 3624741850, + 2936675148, + 906185462, + 1090812512, + 3747672003, + 2825379669, + 829329135, + 1181335161, + 3412177804, + 3160834842, + 628085408, + 1382605366, + 3423369109, + 3138078467, + 570562233, + 1426400815, + 3317316542, + 2998733608, + 733239954, + 1555261956, + 3268935591, + 3050360625, + 752459403, + 1541320221, + 2607071920, + 3965973030, + 1969922972, + 40735498, + 2617837225, + 3943577151, + 1913087877, + 83908371, + 2512341634, + 3803740692, + 2075208622, + 213261112, + 2463272603, + 3855990285, + 2094854071, + 198958881, + 2262029012, + 4057260610, + 1759359992, + 534414190, + 2176718541, + 4139329115, + 1873836001, + 414664567, + 2282248934, + 4279200368, + 1711684554, + 285281116, + 2405801727, + 4167216745, + 1634467795, + 376229701, + 2685067896, + 3608007406, + 1308918612, + 956543938, + 2808555105, + 3495958263, + 1231636301, + 1047427035, + 2932959818, + 3654703836, + 1088359270, + 936918e3, + 2847714899, + 3736837829, + 1202900863, + 817233897, + 3183342108, + 3401237130, + 1404277552, + 615818150, + 3134207493, + 3453421203, + 1423857449, + 601450431, + 3009837614, + 3294710456, + 1567103746, + 711928724, + 3020668471, + 3272380065, + 1510334235, + 755167117 + ]; + if (typeof Int32Array !== "undefined") { + CRC_TABLE = new Int32Array(CRC_TABLE); + } + function ensureBuffer(input) { + if (Buffer2.isBuffer(input)) { + return input; + } + var hasNewBufferAPI = typeof Buffer2.alloc === "function" && typeof Buffer2.from === "function"; + if (typeof input === "number") { + return hasNewBufferAPI ? Buffer2.alloc(input) : new Buffer2(input); + } else if (typeof input === "string") { + return hasNewBufferAPI ? Buffer2.from(input) : new Buffer2(input); + } else { + throw new Error("input must be buffer, number, or string, received " + typeof input); + } + } + function bufferizeInt(num) { + var tmp = ensureBuffer(4); + tmp.writeInt32BE(num, 0); + return tmp; + } + function _crc32(buf, previous) { + buf = ensureBuffer(buf); + if (Buffer2.isBuffer(previous)) { + previous = previous.readUInt32BE(0); + } + var crc = ~~previous ^ -1; + for (var n = 0; n < buf.length; n++) { + crc = CRC_TABLE[(crc ^ buf[n]) & 255] ^ crc >>> 8; + } + return crc ^ -1; + } + function crc32() { + return bufferizeInt(_crc32.apply(null, arguments)); + } + crc32.signed = function() { + return _crc32.apply(null, arguments); + }; + crc32.unsigned = function() { + return _crc32.apply(null, arguments) >>> 0; + }; + module2.exports = crc32; + } +}); + +// ../../node_modules/.pnpm/crc-32@1.2.2/node_modules/crc-32/crc32.js +var require_crc323 = __commonJS({ + "../../node_modules/.pnpm/crc-32@1.2.2/node_modules/crc-32/crc32.js"(exports2) { + var CRC32; + (function(factory) { + if (typeof DO_NOT_EXPORT_CRC === "undefined") { + if ("object" === typeof exports2) { + factory(exports2); + } else if ("function" === typeof define && define.amd) { + define(function() { + var module3 = {}; + factory(module3); + return module3; + }); + } else { + factory(CRC32 = {}); + } + } else { + factory(CRC32 = {}); + } + })(function(CRC322) { + CRC322.version = "1.2.2"; + function signed_crc_table() { + var c = 0, table = new Array(256); + for (var n = 0; n != 256; ++n) { + c = n; + c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1; + c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1; + c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1; + c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1; + c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1; + c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1; + c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1; + c = c & 1 ? -306674912 ^ c >>> 1 : c >>> 1; + table[n] = c; + } + return typeof Int32Array !== "undefined" ? new Int32Array(table) : table; + } + var T0 = signed_crc_table(); + function slice_by_16_tables(T) { + var c = 0, v = 0, n = 0, table = typeof Int32Array !== "undefined" ? new Int32Array(4096) : new Array(4096); + for (n = 0; n != 256; ++n) table[n] = T[n]; + for (n = 0; n != 256; ++n) { + v = T[n]; + for (c = 256 + n; c < 4096; c += 256) v = table[c] = v >>> 8 ^ T[v & 255]; + } + var out = []; + for (n = 1; n != 16; ++n) out[n - 1] = typeof Int32Array !== "undefined" ? table.subarray(n * 256, n * 256 + 256) : table.slice(n * 256, n * 256 + 256); + return out; + } + var TT = slice_by_16_tables(T0); + var T1 = TT[0], T2 = TT[1], T3 = TT[2], T4 = TT[3], T5 = TT[4]; + var T6 = TT[5], T7 = TT[6], T8 = TT[7], T9 = TT[8], Ta = TT[9]; + var Tb = TT[10], Tc = TT[11], Td = TT[12], Te = TT[13], Tf = TT[14]; + function crc32_bstr(bstr, seed) { + var C = seed ^ -1; + for (var i = 0, L = bstr.length; i < L; ) C = C >>> 8 ^ T0[(C ^ bstr.charCodeAt(i++)) & 255]; + return ~C; + } + function crc32_buf(B, seed) { + var C = seed ^ -1, L = B.length - 15, i = 0; + for (; i < L; ) C = Tf[B[i++] ^ C & 255] ^ Te[B[i++] ^ C >> 8 & 255] ^ Td[B[i++] ^ C >> 16 & 255] ^ Tc[B[i++] ^ C >>> 24] ^ Tb[B[i++]] ^ Ta[B[i++]] ^ T9[B[i++]] ^ T8[B[i++]] ^ T7[B[i++]] ^ T6[B[i++]] ^ T5[B[i++]] ^ T4[B[i++]] ^ T3[B[i++]] ^ T2[B[i++]] ^ T1[B[i++]] ^ T0[B[i++]]; + L += 15; + while (i < L) C = C >>> 8 ^ T0[(C ^ B[i++]) & 255]; + return ~C; + } + function crc32_str(str, seed) { + var C = seed ^ -1; + for (var i = 0, L = str.length, c = 0, d = 0; i < L; ) { + c = str.charCodeAt(i++); + if (c < 128) { + C = C >>> 8 ^ T0[(C ^ c) & 255]; + } else if (c < 2048) { + C = C >>> 8 ^ T0[(C ^ (192 | c >> 6 & 31)) & 255]; + C = C >>> 8 ^ T0[(C ^ (128 | c & 63)) & 255]; + } else if (c >= 55296 && c < 57344) { + c = (c & 1023) + 64; + d = str.charCodeAt(i++) & 1023; + C = C >>> 8 ^ T0[(C ^ (240 | c >> 8 & 7)) & 255]; + C = C >>> 8 ^ T0[(C ^ (128 | c >> 2 & 63)) & 255]; + C = C >>> 8 ^ T0[(C ^ (128 | d >> 6 & 15 | (c & 3) << 4)) & 255]; + C = C >>> 8 ^ T0[(C ^ (128 | d & 63)) & 255]; + } else { + C = C >>> 8 ^ T0[(C ^ (224 | c >> 12 & 15)) & 255]; + C = C >>> 8 ^ T0[(C ^ (128 | c >> 6 & 63)) & 255]; + C = C >>> 8 ^ T0[(C ^ (128 | c & 63)) & 255]; + } + } + return ~C; + } + CRC322.table = T0; + CRC322.bstr = crc32_bstr; + CRC322.buf = crc32_buf; + CRC322.str = crc32_str; + }); + } +}); + +// ../../node_modules/.pnpm/crc32-stream@4.0.3/node_modules/crc32-stream/lib/crc32-stream.js +var require_crc32_stream = __commonJS({ + "../../node_modules/.pnpm/crc32-stream@4.0.3/node_modules/crc32-stream/lib/crc32-stream.js"(exports2, module2) { + "use strict"; + var { Transform } = require_readable(); + var crc32 = require_crc323(); + var CRC32Stream = class extends Transform { + constructor(options) { + super(options); + this.checksum = Buffer.allocUnsafe(4); + this.checksum.writeInt32BE(0, 0); + this.rawSize = 0; + } + _transform(chunk, encoding, callback) { + if (chunk) { + this.checksum = crc32.buf(chunk, this.checksum) >>> 0; + this.rawSize += chunk.length; + } + callback(null, chunk); + } + digest(encoding) { + const checksum = Buffer.allocUnsafe(4); + checksum.writeUInt32BE(this.checksum >>> 0, 0); + return encoding ? checksum.toString(encoding) : checksum; + } + hex() { + return this.digest("hex").toUpperCase(); + } + size() { + return this.rawSize; + } + }; + module2.exports = CRC32Stream; + } +}); + +// ../../node_modules/.pnpm/crc32-stream@4.0.3/node_modules/crc32-stream/lib/deflate-crc32-stream.js +var require_deflate_crc32_stream = __commonJS({ + "../../node_modules/.pnpm/crc32-stream@4.0.3/node_modules/crc32-stream/lib/deflate-crc32-stream.js"(exports2, module2) { + "use strict"; + var { DeflateRaw } = require("zlib"); + var crc32 = require_crc323(); + var DeflateCRC32Stream = class extends DeflateRaw { + constructor(options) { + super(options); + this.checksum = Buffer.allocUnsafe(4); + this.checksum.writeInt32BE(0, 0); + this.rawSize = 0; + this.compressedSize = 0; + } + push(chunk, encoding) { + if (chunk) { + this.compressedSize += chunk.length; + } + return super.push(chunk, encoding); + } + _transform(chunk, encoding, callback) { + if (chunk) { + this.checksum = crc32.buf(chunk, this.checksum) >>> 0; + this.rawSize += chunk.length; + } + super._transform(chunk, encoding, callback); + } + digest(encoding) { + const checksum = Buffer.allocUnsafe(4); + checksum.writeUInt32BE(this.checksum >>> 0, 0); + return encoding ? checksum.toString(encoding) : checksum; + } + hex() { + return this.digest("hex").toUpperCase(); + } + size(compressed = false) { + if (compressed) { + return this.compressedSize; + } else { + return this.rawSize; + } + } + }; + module2.exports = DeflateCRC32Stream; + } +}); + +// ../../node_modules/.pnpm/crc32-stream@4.0.3/node_modules/crc32-stream/lib/index.js +var require_lib12 = __commonJS({ + "../../node_modules/.pnpm/crc32-stream@4.0.3/node_modules/crc32-stream/lib/index.js"(exports2, module2) { + "use strict"; + module2.exports = { + CRC32Stream: require_crc32_stream(), + DeflateCRC32Stream: require_deflate_crc32_stream() + }; + } +}); + +// ../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js +var require_zip_archive_output_stream = __commonJS({ + "../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/archivers/zip/zip-archive-output-stream.js"(exports2, module2) { + var inherits2 = require("util").inherits; + var crc32 = require_buffer_crc32(); + var { CRC32Stream } = require_lib12(); + var { DeflateCRC32Stream } = require_lib12(); + var ArchiveOutputStream = require_archive_output_stream(); + var ZipArchiveEntry = require_zip_archive_entry(); + var GeneralPurposeBit = require_general_purpose_bit(); + var constants = require_constants10(); + var util2 = require_util4(); + var zipUtil = require_util3(); + var ZipArchiveOutputStream = module2.exports = function(options) { + if (!(this instanceof ZipArchiveOutputStream)) { + return new ZipArchiveOutputStream(options); + } + options = this.options = this._defaults(options); + ArchiveOutputStream.call(this, options); + this._entry = null; + this._entries = []; + this._archive = { + centralLength: 0, + centralOffset: 0, + comment: "", + finish: false, + finished: false, + processing: false, + forceZip64: options.forceZip64, + forceLocalTime: options.forceLocalTime + }; + }; + inherits2(ZipArchiveOutputStream, ArchiveOutputStream); + ZipArchiveOutputStream.prototype._afterAppend = function(ae) { + this._entries.push(ae); + if (ae.getGeneralPurposeBit().usesDataDescriptor()) { + this._writeDataDescriptor(ae); + } + this._archive.processing = false; + this._entry = null; + if (this._archive.finish && !this._archive.finished) { + this._finish(); + } + }; + ZipArchiveOutputStream.prototype._appendBuffer = function(ae, source, callback) { + if (source.length === 0) { + ae.setMethod(constants.METHOD_STORED); + } + var method = ae.getMethod(); + if (method === constants.METHOD_STORED) { + ae.setSize(source.length); + ae.setCompressedSize(source.length); + ae.setCrc(crc32.unsigned(source)); + } + this._writeLocalFileHeader(ae); + if (method === constants.METHOD_STORED) { + this.write(source); + this._afterAppend(ae); + callback(null, ae); + return; + } else if (method === constants.METHOD_DEFLATED) { + this._smartStream(ae, callback).end(source); + return; + } else { + callback(new Error("compression method " + method + " not implemented")); + return; + } + }; + ZipArchiveOutputStream.prototype._appendStream = function(ae, source, callback) { + ae.getGeneralPurposeBit().useDataDescriptor(true); + ae.setVersionNeededToExtract(constants.MIN_VERSION_DATA_DESCRIPTOR); + this._writeLocalFileHeader(ae); + var smart = this._smartStream(ae, callback); + source.once("error", function(err) { + smart.emit("error", err); + smart.end(); + }); + source.pipe(smart); + }; + ZipArchiveOutputStream.prototype._defaults = function(o) { + if (typeof o !== "object") { + o = {}; + } + if (typeof o.zlib !== "object") { + o.zlib = {}; + } + if (typeof o.zlib.level !== "number") { + o.zlib.level = constants.ZLIB_BEST_SPEED; + } + o.forceZip64 = !!o.forceZip64; + o.forceLocalTime = !!o.forceLocalTime; + return o; + }; + ZipArchiveOutputStream.prototype._finish = function() { + this._archive.centralOffset = this.offset; + this._entries.forEach(function(ae) { + this._writeCentralFileHeader(ae); + }.bind(this)); + this._archive.centralLength = this.offset - this._archive.centralOffset; + if (this.isZip64()) { + this._writeCentralDirectoryZip64(); + } + this._writeCentralDirectoryEnd(); + this._archive.processing = false; + this._archive.finish = true; + this._archive.finished = true; + this.end(); + }; + ZipArchiveOutputStream.prototype._normalizeEntry = function(ae) { + if (ae.getMethod() === -1) { + ae.setMethod(constants.METHOD_DEFLATED); + } + if (ae.getMethod() === constants.METHOD_DEFLATED) { + ae.getGeneralPurposeBit().useDataDescriptor(true); + ae.setVersionNeededToExtract(constants.MIN_VERSION_DATA_DESCRIPTOR); + } + if (ae.getTime() === -1) { + ae.setTime(/* @__PURE__ */ new Date(), this._archive.forceLocalTime); + } + ae._offsets = { + file: 0, + data: 0, + contents: 0 + }; + }; + ZipArchiveOutputStream.prototype._smartStream = function(ae, callback) { + var deflate = ae.getMethod() === constants.METHOD_DEFLATED; + var process2 = deflate ? new DeflateCRC32Stream(this.options.zlib) : new CRC32Stream(); + var error = null; + function handleStuff() { + var digest = process2.digest().readUInt32BE(0); + ae.setCrc(digest); + ae.setSize(process2.size()); + ae.setCompressedSize(process2.size(true)); + this._afterAppend(ae); + callback(error, ae); + } + process2.once("end", handleStuff.bind(this)); + process2.once("error", function(err) { + error = err; + }); + process2.pipe(this, { end: false }); + return process2; + }; + ZipArchiveOutputStream.prototype._writeCentralDirectoryEnd = function() { + var records = this._entries.length; + var size = this._archive.centralLength; + var offset = this._archive.centralOffset; + if (this.isZip64()) { + records = constants.ZIP64_MAGIC_SHORT; + size = constants.ZIP64_MAGIC; + offset = constants.ZIP64_MAGIC; + } + this.write(zipUtil.getLongBytes(constants.SIG_EOCD)); + this.write(constants.SHORT_ZERO); + this.write(constants.SHORT_ZERO); + this.write(zipUtil.getShortBytes(records)); + this.write(zipUtil.getShortBytes(records)); + this.write(zipUtil.getLongBytes(size)); + this.write(zipUtil.getLongBytes(offset)); + var comment = this.getComment(); + var commentLength = Buffer.byteLength(comment); + this.write(zipUtil.getShortBytes(commentLength)); + this.write(comment); + }; + ZipArchiveOutputStream.prototype._writeCentralDirectoryZip64 = function() { + this.write(zipUtil.getLongBytes(constants.SIG_ZIP64_EOCD)); + this.write(zipUtil.getEightBytes(44)); + this.write(zipUtil.getShortBytes(constants.MIN_VERSION_ZIP64)); + this.write(zipUtil.getShortBytes(constants.MIN_VERSION_ZIP64)); + this.write(constants.LONG_ZERO); + this.write(constants.LONG_ZERO); + this.write(zipUtil.getEightBytes(this._entries.length)); + this.write(zipUtil.getEightBytes(this._entries.length)); + this.write(zipUtil.getEightBytes(this._archive.centralLength)); + this.write(zipUtil.getEightBytes(this._archive.centralOffset)); + this.write(zipUtil.getLongBytes(constants.SIG_ZIP64_EOCD_LOC)); + this.write(constants.LONG_ZERO); + this.write(zipUtil.getEightBytes(this._archive.centralOffset + this._archive.centralLength)); + this.write(zipUtil.getLongBytes(1)); + }; + ZipArchiveOutputStream.prototype._writeCentralFileHeader = function(ae) { + var gpb = ae.getGeneralPurposeBit(); + var method = ae.getMethod(); + var offsets = ae._offsets; + var size = ae.getSize(); + var compressedSize = ae.getCompressedSize(); + if (ae.isZip64() || offsets.file > constants.ZIP64_MAGIC) { + size = constants.ZIP64_MAGIC; + compressedSize = constants.ZIP64_MAGIC; + ae.setVersionNeededToExtract(constants.MIN_VERSION_ZIP64); + var extraBuf = Buffer.concat([ + zipUtil.getShortBytes(constants.ZIP64_EXTRA_ID), + zipUtil.getShortBytes(24), + zipUtil.getEightBytes(ae.getSize()), + zipUtil.getEightBytes(ae.getCompressedSize()), + zipUtil.getEightBytes(offsets.file) + ], 28); + ae.setExtra(extraBuf); + } + this.write(zipUtil.getLongBytes(constants.SIG_CFH)); + this.write(zipUtil.getShortBytes(ae.getPlatform() << 8 | constants.VERSION_MADEBY)); + this.write(zipUtil.getShortBytes(ae.getVersionNeededToExtract())); + this.write(gpb.encode()); + this.write(zipUtil.getShortBytes(method)); + this.write(zipUtil.getLongBytes(ae.getTimeDos())); + this.write(zipUtil.getLongBytes(ae.getCrc())); + this.write(zipUtil.getLongBytes(compressedSize)); + this.write(zipUtil.getLongBytes(size)); + var name = ae.getName(); + var comment = ae.getComment(); + var extra = ae.getCentralDirectoryExtra(); + if (gpb.usesUTF8ForNames()) { + name = Buffer.from(name); + comment = Buffer.from(comment); + } + this.write(zipUtil.getShortBytes(name.length)); + this.write(zipUtil.getShortBytes(extra.length)); + this.write(zipUtil.getShortBytes(comment.length)); + this.write(constants.SHORT_ZERO); + this.write(zipUtil.getShortBytes(ae.getInternalAttributes())); + this.write(zipUtil.getLongBytes(ae.getExternalAttributes())); + if (offsets.file > constants.ZIP64_MAGIC) { + this.write(zipUtil.getLongBytes(constants.ZIP64_MAGIC)); + } else { + this.write(zipUtil.getLongBytes(offsets.file)); + } + this.write(name); + this.write(extra); + this.write(comment); + }; + ZipArchiveOutputStream.prototype._writeDataDescriptor = function(ae) { + this.write(zipUtil.getLongBytes(constants.SIG_DD)); + this.write(zipUtil.getLongBytes(ae.getCrc())); + if (ae.isZip64()) { + this.write(zipUtil.getEightBytes(ae.getCompressedSize())); + this.write(zipUtil.getEightBytes(ae.getSize())); + } else { + this.write(zipUtil.getLongBytes(ae.getCompressedSize())); + this.write(zipUtil.getLongBytes(ae.getSize())); + } + }; + ZipArchiveOutputStream.prototype._writeLocalFileHeader = function(ae) { + var gpb = ae.getGeneralPurposeBit(); + var method = ae.getMethod(); + var name = ae.getName(); + var extra = ae.getLocalFileDataExtra(); + if (ae.isZip64()) { + gpb.useDataDescriptor(true); + ae.setVersionNeededToExtract(constants.MIN_VERSION_ZIP64); + } + if (gpb.usesUTF8ForNames()) { + name = Buffer.from(name); + } + ae._offsets.file = this.offset; + this.write(zipUtil.getLongBytes(constants.SIG_LFH)); + this.write(zipUtil.getShortBytes(ae.getVersionNeededToExtract())); + this.write(gpb.encode()); + this.write(zipUtil.getShortBytes(method)); + this.write(zipUtil.getLongBytes(ae.getTimeDos())); + ae._offsets.data = this.offset; + if (gpb.usesDataDescriptor()) { + this.write(constants.LONG_ZERO); + this.write(constants.LONG_ZERO); + this.write(constants.LONG_ZERO); + } else { + this.write(zipUtil.getLongBytes(ae.getCrc())); + this.write(zipUtil.getLongBytes(ae.getCompressedSize())); + this.write(zipUtil.getLongBytes(ae.getSize())); + } + this.write(zipUtil.getShortBytes(name.length)); + this.write(zipUtil.getShortBytes(extra.length)); + this.write(name); + this.write(extra); + ae._offsets.contents = this.offset; + }; + ZipArchiveOutputStream.prototype.getComment = function(comment) { + return this._archive.comment !== null ? this._archive.comment : ""; + }; + ZipArchiveOutputStream.prototype.isZip64 = function() { + return this._archive.forceZip64 || this._entries.length > constants.ZIP64_MAGIC_SHORT || this._archive.centralLength > constants.ZIP64_MAGIC || this._archive.centralOffset > constants.ZIP64_MAGIC; + }; + ZipArchiveOutputStream.prototype.setComment = function(comment) { + this._archive.comment = comment; + }; + } +}); + +// ../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/compress-commons.js +var require_compress_commons = __commonJS({ + "../../node_modules/.pnpm/compress-commons@4.1.2/node_modules/compress-commons/lib/compress-commons.js"(exports2, module2) { + module2.exports = { + ArchiveEntry: require_archive_entry(), + ZipArchiveEntry: require_zip_archive_entry(), + ArchiveOutputStream: require_archive_output_stream(), + ZipArchiveOutputStream: require_zip_archive_output_stream() + }; + } +}); + +// ../../node_modules/.pnpm/archiver-utils@3.0.4/node_modules/archiver-utils/file.js +var require_file3 = __commonJS({ + "../../node_modules/.pnpm/archiver-utils@3.0.4/node_modules/archiver-utils/file.js"(exports2, module2) { + var fs = require_graceful_fs(); + var path = require("path"); + var flatten = require_lodash16(); + var difference = require_lodash17(); + var union = require_lodash18(); + var isPlainObject = require_lodash5(); + var glob = require_glob(); + var file2 = module2.exports = {}; + var pathSeparatorRe = /[\/\\]/g; + var processPatterns = function(patterns, fn) { + var result = []; + flatten(patterns).forEach(function(pattern) { + var exclusion = pattern.indexOf("!") === 0; + if (exclusion) { + pattern = pattern.slice(1); + } + var matches = fn(pattern); + if (exclusion) { + result = difference(result, matches); + } else { + result = union(result, matches); + } + }); + return result; + }; + file2.exists = function() { + var filepath = path.join.apply(path, arguments); + return fs.existsSync(filepath); + }; + file2.expand = function(...args) { + var options = isPlainObject(args[0]) ? args.shift() : {}; + var patterns = Array.isArray(args[0]) ? args[0] : args; + if (patterns.length === 0) { + return []; + } + var matches = processPatterns(patterns, function(pattern) { + return glob.sync(pattern, options); + }); + if (options.filter) { + matches = matches.filter(function(filepath) { + filepath = path.join(options.cwd || "", filepath); + try { + if (typeof options.filter === "function") { + return options.filter(filepath); + } else { + return fs.statSync(filepath)[options.filter](); + } + } catch (e) { + return false; + } + }); + } + return matches; + }; + file2.expandMapping = function(patterns, destBase, options) { + options = Object.assign({ + rename: function(destBase2, destPath) { + return path.join(destBase2 || "", destPath); + } + }, options); + var files = []; + var fileByDest = {}; + file2.expand(options, patterns).forEach(function(src) { + var destPath = src; + if (options.flatten) { + destPath = path.basename(destPath); + } + if (options.ext) { + destPath = destPath.replace(/(\.[^\/]*)?$/, options.ext); + } + var dest = options.rename(destBase, destPath, options); + if (options.cwd) { + src = path.join(options.cwd, src); + } + dest = dest.replace(pathSeparatorRe, "/"); + src = src.replace(pathSeparatorRe, "/"); + if (fileByDest[dest]) { + fileByDest[dest].src.push(src); + } else { + files.push({ + src: [src], + dest + }); + fileByDest[dest] = files[files.length - 1]; + } + }); + return files; + }; + file2.normalizeFilesArray = function(data) { + var files = []; + data.forEach(function(obj2) { + var prop; + if ("src" in obj2 || "dest" in obj2) { + files.push(obj2); + } + }); + if (files.length === 0) { + return []; + } + files = _(files).chain().forEach(function(obj2) { + if (!("src" in obj2) || !obj2.src) { + return; + } + if (Array.isArray(obj2.src)) { + obj2.src = flatten(obj2.src); + } else { + obj2.src = [obj2.src]; + } + }).map(function(obj2) { + var expandOptions = Object.assign({}, obj2); + delete expandOptions.src; + delete expandOptions.dest; + if (obj2.expand) { + return file2.expandMapping(obj2.src, obj2.dest, expandOptions).map(function(mapObj) { + var result2 = Object.assign({}, obj2); + result2.orig = Object.assign({}, obj2); + result2.src = mapObj.src; + result2.dest = mapObj.dest; + ["expand", "cwd", "flatten", "rename", "ext"].forEach(function(prop) { + delete result2[prop]; + }); + return result2; + }); + } + var result = Object.assign({}, obj2); + result.orig = Object.assign({}, obj2); + if ("src" in result) { + Object.defineProperty(result, "src", { + enumerable: true, + get: function fn() { + var src; + if (!("result" in fn)) { + src = obj2.src; + src = Array.isArray(src) ? flatten(src) : [src]; + fn.result = file2.expand(expandOptions, src); + } + return fn.result; + } + }); + } + if ("dest" in result) { + result.dest = obj2.dest; + } + return result; + }).flatten().value(); + return files; + }; + } +}); + +// ../../node_modules/.pnpm/archiver-utils@3.0.4/node_modules/archiver-utils/index.js +var require_archiver_utils2 = __commonJS({ + "../../node_modules/.pnpm/archiver-utils@3.0.4/node_modules/archiver-utils/index.js"(exports2, module2) { + var fs = require_graceful_fs(); + var path = require("path"); + var lazystream = require_lazystream(); + var normalizePath = require_normalize_path(); + var defaults = require_lodash15(); + var Stream = require("stream").Stream; + var PassThrough = require_readable().PassThrough; + var utils = module2.exports = {}; + utils.file = require_file3(); + utils.collectStream = function(source, callback) { + var collection = []; + var size = 0; + source.on("error", callback); + source.on("data", function(chunk) { + collection.push(chunk); + size += chunk.length; + }); + source.on("end", function() { + var buf = Buffer.alloc(size); + var offset = 0; + collection.forEach(function(data) { + data.copy(buf, offset); + offset += data.length; + }); + callback(null, buf); + }); + }; + utils.dateify = function(dateish) { + dateish = dateish || /* @__PURE__ */ new Date(); + if (dateish instanceof Date) { + dateish = dateish; + } else if (typeof dateish === "string") { + dateish = new Date(dateish); + } else { + dateish = /* @__PURE__ */ new Date(); + } + return dateish; + }; + utils.defaults = function(object, source, guard) { + var args = arguments; + args[0] = args[0] || {}; + return defaults(...args); + }; + utils.isStream = function(source) { + return source instanceof Stream; + }; + utils.lazyReadStream = function(filepath) { + return new lazystream.Readable(function() { + return fs.createReadStream(filepath); + }); + }; + utils.normalizeInputSource = function(source) { + if (source === null) { + return Buffer.alloc(0); + } else if (typeof source === "string") { + return Buffer.from(source); + } else if (utils.isStream(source)) { + return source.pipe(new PassThrough()); + } + return source; + }; + utils.sanitizePath = function(filepath) { + return normalizePath(filepath, false).replace(/^\w+:/, "").replace(/^(\.\.\/|\/)+/, ""); + }; + utils.trailingSlashIt = function(str) { + return str.slice(-1) !== "/" ? str + "/" : str; + }; + utils.unixifyPath = function(filepath) { + return normalizePath(filepath, false).replace(/^\w+:/, ""); + }; + utils.walkdir = function(dirpath, base, callback) { + var results = []; + if (typeof base === "function") { + callback = base; + base = dirpath; + } + fs.readdir(dirpath, function(err, list) { + var i = 0; + var file2; + var filepath; + if (err) { + return callback(err); + } + (function next() { + file2 = list[i++]; + if (!file2) { + return callback(null, results); + } + filepath = path.join(dirpath, file2); + fs.stat(filepath, function(err2, stats) { + results.push({ + path: filepath, + relative: path.relative(base, filepath).replace(/\\/g, "/"), + stats + }); + if (stats && stats.isDirectory()) { + utils.walkdir(filepath, base, function(err3, res) { + res.forEach(function(dirEntry) { + results.push(dirEntry); + }); + next(); + }); + } else { + next(); + } + }); + })(); + }); + }; + } +}); + +// ../../node_modules/.pnpm/zip-stream@4.1.1/node_modules/zip-stream/index.js +var require_zip_stream2 = __commonJS({ + "../../node_modules/.pnpm/zip-stream@4.1.1/node_modules/zip-stream/index.js"(exports2, module2) { + var inherits2 = require("util").inherits; + var ZipArchiveOutputStream = require_compress_commons().ZipArchiveOutputStream; + var ZipArchiveEntry = require_compress_commons().ZipArchiveEntry; + var util2 = require_archiver_utils2(); + var ZipStream = module2.exports = function(options) { + if (!(this instanceof ZipStream)) { + return new ZipStream(options); + } + options = this.options = options || {}; + options.zlib = options.zlib || {}; + ZipArchiveOutputStream.call(this, options); + if (typeof options.level === "number" && options.level >= 0) { + options.zlib.level = options.level; + delete options.level; + } + if (!options.forceZip64 && typeof options.zlib.level === "number" && options.zlib.level === 0) { + options.store = true; + } + options.namePrependSlash = options.namePrependSlash || false; + if (options.comment && options.comment.length > 0) { + this.setComment(options.comment); + } + }; + inherits2(ZipStream, ZipArchiveOutputStream); + ZipStream.prototype._normalizeFileData = function(data) { + data = util2.defaults(data, { + type: "file", + name: null, + namePrependSlash: this.options.namePrependSlash, + linkname: null, + date: null, + mode: null, + store: this.options.store, + comment: "" + }); + var isDir = data.type === "directory"; + var isSymlink = data.type === "symlink"; + if (data.name) { + data.name = util2.sanitizePath(data.name); + if (!isSymlink && data.name.slice(-1) === "/") { + isDir = true; + data.type = "directory"; + } else if (isDir) { + data.name += "/"; + } + } + if (isDir || isSymlink) { + data.store = true; + } + data.date = util2.dateify(data.date); + return data; + }; + ZipStream.prototype.entry = function(source, data, callback) { + if (typeof callback !== "function") { + callback = this._emitErrorCallback.bind(this); + } + data = this._normalizeFileData(data); + if (data.type !== "file" && data.type !== "directory" && data.type !== "symlink") { + callback(new Error(data.type + " entries not currently supported")); + return; + } + if (typeof data.name !== "string" || data.name.length === 0) { + callback(new Error("entry name must be a non-empty string value")); + return; + } + if (data.type === "symlink" && typeof data.linkname !== "string") { + callback(new Error("entry linkname must be a non-empty string value when type equals symlink")); + return; + } + var entry = new ZipArchiveEntry(data.name); + entry.setTime(data.date, this.options.forceLocalTime); + if (data.namePrependSlash) { + entry.setName(data.name, true); + } + if (data.store) { + entry.setMethod(0); + } + if (data.comment.length > 0) { + entry.setComment(data.comment); + } + if (data.type === "symlink" && typeof data.mode !== "number") { + data.mode = 40960; + } + if (typeof data.mode === "number") { + if (data.type === "symlink") { + data.mode |= 40960; + } + entry.setUnixMode(data.mode); + } + if (data.type === "symlink" && typeof data.linkname === "string") { + source = Buffer.from(data.linkname); + } + return ZipArchiveOutputStream.prototype.entry.call(this, entry, source, callback); + }; + ZipStream.prototype.finalize = function() { + this.finish(); + }; + } +}); + +// ../../node_modules/.pnpm/archiver@5.3.2/node_modules/archiver/lib/plugins/zip.js +var require_zip4 = __commonJS({ + "../../node_modules/.pnpm/archiver@5.3.2/node_modules/archiver/lib/plugins/zip.js"(exports2, module2) { + var engine = require_zip_stream2(); + var util2 = require_archiver_utils(); + var Zip = function(options) { + if (!(this instanceof Zip)) { + return new Zip(options); + } + options = this.options = util2.defaults(options, { + comment: "", + forceUTC: false, + namePrependSlash: false, + store: false + }); + this.supports = { + directory: true, + symlink: true + }; + this.engine = new engine(options); + }; + Zip.prototype.append = function(source, data, callback) { + this.engine.entry(source, data, callback); + }; + Zip.prototype.finalize = function() { + this.engine.finalize(); + }; + Zip.prototype.on = function() { + return this.engine.on.apply(this.engine, arguments); + }; + Zip.prototype.pipe = function() { + return this.engine.pipe.apply(this.engine, arguments); + }; + Zip.prototype.unpipe = function() { + return this.engine.unpipe.apply(this.engine, arguments); + }; + module2.exports = Zip; + } +}); + +// ../../node_modules/.pnpm/bl@4.1.0/node_modules/bl/BufferList.js +var require_BufferList2 = __commonJS({ + "../../node_modules/.pnpm/bl@4.1.0/node_modules/bl/BufferList.js"(exports2, module2) { + "use strict"; + var { Buffer: Buffer2 } = require("buffer"); + var symbol = Symbol.for("BufferList"); + function BufferList(buf) { + if (!(this instanceof BufferList)) { + return new BufferList(buf); + } + BufferList._init.call(this, buf); + } + BufferList._init = function _init(buf) { + Object.defineProperty(this, symbol, { value: true }); + this._bufs = []; + this.length = 0; + if (buf) { + this.append(buf); + } + }; + BufferList.prototype._new = function _new(buf) { + return new BufferList(buf); + }; + BufferList.prototype._offset = function _offset(offset) { + if (offset === 0) { + return [0, 0]; + } + let tot = 0; + for (let i = 0; i < this._bufs.length; i++) { + const _t = tot + this._bufs[i].length; + if (offset < _t || i === this._bufs.length - 1) { + return [i, offset - tot]; + } + tot = _t; + } + }; + BufferList.prototype._reverseOffset = function(blOffset) { + const bufferId = blOffset[0]; + let offset = blOffset[1]; + for (let i = 0; i < bufferId; i++) { + offset += this._bufs[i].length; + } + return offset; + }; + BufferList.prototype.get = function get(index) { + if (index > this.length || index < 0) { + return void 0; + } + const offset = this._offset(index); + return this._bufs[offset[0]][offset[1]]; + }; + BufferList.prototype.slice = function slice(start, end) { + if (typeof start === "number" && start < 0) { + start += this.length; + } + if (typeof end === "number" && end < 0) { + end += this.length; + } + return this.copy(null, 0, start, end); + }; + BufferList.prototype.copy = function copy(dst, dstStart, srcStart, srcEnd) { + if (typeof srcStart !== "number" || srcStart < 0) { + srcStart = 0; + } + if (typeof srcEnd !== "number" || srcEnd > this.length) { + srcEnd = this.length; + } + if (srcStart >= this.length) { + return dst || Buffer2.alloc(0); + } + if (srcEnd <= 0) { + return dst || Buffer2.alloc(0); + } + const copy2 = !!dst; + const off = this._offset(srcStart); + const len = srcEnd - srcStart; + let bytes = len; + let bufoff = copy2 && dstStart || 0; + let start = off[1]; + if (srcStart === 0 && srcEnd === this.length) { + if (!copy2) { + return this._bufs.length === 1 ? this._bufs[0] : Buffer2.concat(this._bufs, this.length); + } + for (let i = 0; i < this._bufs.length; i++) { + this._bufs[i].copy(dst, bufoff); + bufoff += this._bufs[i].length; + } + return dst; + } + if (bytes <= this._bufs[off[0]].length - start) { + return copy2 ? this._bufs[off[0]].copy(dst, dstStart, start, start + bytes) : this._bufs[off[0]].slice(start, start + bytes); + } + if (!copy2) { + dst = Buffer2.allocUnsafe(len); + } + for (let i = off[0]; i < this._bufs.length; i++) { + const l2 = this._bufs[i].length - start; + if (bytes > l2) { + this._bufs[i].copy(dst, bufoff, start); + bufoff += l2; + } else { + this._bufs[i].copy(dst, bufoff, start, start + bytes); + bufoff += l2; + break; + } + bytes -= l2; + if (start) { + start = 0; + } + } + if (dst.length > bufoff) return dst.slice(0, bufoff); + return dst; + }; + BufferList.prototype.shallowSlice = function shallowSlice(start, end) { + start = start || 0; + end = typeof end !== "number" ? this.length : end; + if (start < 0) { + start += this.length; + } + if (end < 0) { + end += this.length; + } + if (start === end) { + return this._new(); + } + const startOffset = this._offset(start); + const endOffset = this._offset(end); + const buffers = this._bufs.slice(startOffset[0], endOffset[0] + 1); + if (endOffset[1] === 0) { + buffers.pop(); + } else { + buffers[buffers.length - 1] = buffers[buffers.length - 1].slice(0, endOffset[1]); + } + if (startOffset[1] !== 0) { + buffers[0] = buffers[0].slice(startOffset[1]); + } + return this._new(buffers); + }; + BufferList.prototype.toString = function toString2(encoding, start, end) { + return this.slice(start, end).toString(encoding); + }; + BufferList.prototype.consume = function consume(bytes) { + bytes = Math.trunc(bytes); + if (Number.isNaN(bytes) || bytes <= 0) return this; + while (this._bufs.length) { + if (bytes >= this._bufs[0].length) { + bytes -= this._bufs[0].length; + this.length -= this._bufs[0].length; + this._bufs.shift(); + } else { + this._bufs[0] = this._bufs[0].slice(bytes); + this.length -= bytes; + break; + } + } + return this; + }; + BufferList.prototype.duplicate = function duplicate() { + const copy = this._new(); + for (let i = 0; i < this._bufs.length; i++) { + copy.append(this._bufs[i]); + } + return copy; + }; + BufferList.prototype.append = function append(buf) { + if (buf == null) { + return this; + } + if (buf.buffer) { + this._appendBuffer(Buffer2.from(buf.buffer, buf.byteOffset, buf.byteLength)); + } else if (Array.isArray(buf)) { + for (let i = 0; i < buf.length; i++) { + this.append(buf[i]); + } + } else if (this._isBufferList(buf)) { + for (let i = 0; i < buf._bufs.length; i++) { + this.append(buf._bufs[i]); + } + } else { + if (typeof buf === "number") { + buf = buf.toString(); + } + this._appendBuffer(Buffer2.from(buf)); + } + return this; + }; + BufferList.prototype._appendBuffer = function appendBuffer(buf) { + this._bufs.push(buf); + this.length += buf.length; + }; + BufferList.prototype.indexOf = function(search, offset, encoding) { + if (encoding === void 0 && typeof offset === "string") { + encoding = offset; + offset = void 0; + } + if (typeof search === "function" || Array.isArray(search)) { + throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.'); + } else if (typeof search === "number") { + search = Buffer2.from([search]); + } else if (typeof search === "string") { + search = Buffer2.from(search, encoding); + } else if (this._isBufferList(search)) { + search = search.slice(); + } else if (Array.isArray(search.buffer)) { + search = Buffer2.from(search.buffer, search.byteOffset, search.byteLength); + } else if (!Buffer2.isBuffer(search)) { + search = Buffer2.from(search); + } + offset = Number(offset || 0); + if (isNaN(offset)) { + offset = 0; + } + if (offset < 0) { + offset = this.length + offset; + } + if (offset < 0) { + offset = 0; + } + if (search.length === 0) { + return offset > this.length ? this.length : offset; + } + const blOffset = this._offset(offset); + let blIndex = blOffset[0]; + let buffOffset = blOffset[1]; + for (; blIndex < this._bufs.length; blIndex++) { + const buff = this._bufs[blIndex]; + while (buffOffset < buff.length) { + const availableWindow = buff.length - buffOffset; + if (availableWindow >= search.length) { + const nativeSearchResult = buff.indexOf(search, buffOffset); + if (nativeSearchResult !== -1) { + return this._reverseOffset([blIndex, nativeSearchResult]); + } + buffOffset = buff.length - search.length + 1; + } else { + const revOffset = this._reverseOffset([blIndex, buffOffset]); + if (this._match(revOffset, search)) { + return revOffset; + } + buffOffset++; + } + } + buffOffset = 0; + } + return -1; + }; + BufferList.prototype._match = function(offset, search) { + if (this.length - offset < search.length) { + return false; + } + for (let searchOffset = 0; searchOffset < search.length; searchOffset++) { + if (this.get(offset + searchOffset) !== search[searchOffset]) { + return false; + } + } + return true; + }; + (function() { + const methods = { + readDoubleBE: 8, + readDoubleLE: 8, + readFloatBE: 4, + readFloatLE: 4, + readInt32BE: 4, + readInt32LE: 4, + readUInt32BE: 4, + readUInt32LE: 4, + readInt16BE: 2, + readInt16LE: 2, + readUInt16BE: 2, + readUInt16LE: 2, + readInt8: 1, + readUInt8: 1, + readIntBE: null, + readIntLE: null, + readUIntBE: null, + readUIntLE: null + }; + for (const m in methods) { + (function(m2) { + if (methods[m2] === null) { + BufferList.prototype[m2] = function(offset, byteLength) { + return this.slice(offset, offset + byteLength)[m2](0, byteLength); + }; + } else { + BufferList.prototype[m2] = function(offset = 0) { + return this.slice(offset, offset + methods[m2])[m2](0); + }; + } + })(m); + } + })(); + BufferList.prototype._isBufferList = function _isBufferList(b) { + return b instanceof BufferList || BufferList.isBufferList(b); + }; + BufferList.isBufferList = function isBufferList(b) { + return b != null && b[symbol]; + }; + module2.exports = BufferList; + } +}); + +// ../../node_modules/.pnpm/bl@4.1.0/node_modules/bl/bl.js +var require_bl = __commonJS({ + "../../node_modules/.pnpm/bl@4.1.0/node_modules/bl/bl.js"(exports2, module2) { + "use strict"; + var DuplexStream = require_readable().Duplex; + var inherits2 = require_inherits(); + var BufferList = require_BufferList2(); + function BufferListStream(callback) { + if (!(this instanceof BufferListStream)) { + return new BufferListStream(callback); + } + if (typeof callback === "function") { + this._callback = callback; + const piper = function piper2(err) { + if (this._callback) { + this._callback(err); + this._callback = null; + } + }.bind(this); + this.on("pipe", function onPipe(src) { + src.on("error", piper); + }); + this.on("unpipe", function onUnpipe(src) { + src.removeListener("error", piper); + }); + callback = null; + } + BufferList._init.call(this, callback); + DuplexStream.call(this); + } + inherits2(BufferListStream, DuplexStream); + Object.assign(BufferListStream.prototype, BufferList.prototype); + BufferListStream.prototype._new = function _new(callback) { + return new BufferListStream(callback); + }; + BufferListStream.prototype._write = function _write(buf, encoding, callback) { + this._appendBuffer(buf); + if (typeof callback === "function") { + callback(); + } + }; + BufferListStream.prototype._read = function _read(size) { + if (!this.length) { + return this.push(null); + } + size = Math.min(size, this.length); + this.push(this.slice(0, size)); + this.consume(size); + }; + BufferListStream.prototype.end = function end(chunk) { + DuplexStream.prototype.end.call(this, chunk); + if (this._callback) { + this._callback(null, this.slice()); + this._callback = null; + } + }; + BufferListStream.prototype._destroy = function _destroy(err, cb) { + this._bufs.length = 0; + this.length = 0; + cb(err); + }; + BufferListStream.prototype._isBufferList = function _isBufferList(b) { + return b instanceof BufferListStream || b instanceof BufferList || BufferListStream.isBufferList(b); + }; + BufferListStream.isBufferList = BufferList.isBufferList; + module2.exports = BufferListStream; + module2.exports.BufferListStream = BufferListStream; + module2.exports.BufferList = BufferList; + } +}); + +// ../../node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/headers.js +var require_headers = __commonJS({ + "../../node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/headers.js"(exports2) { + var alloc = Buffer.alloc; + var ZEROS = "0000000000000000000"; + var SEVENS = "7777777777777777777"; + var ZERO_OFFSET = "0".charCodeAt(0); + var USTAR_MAGIC = Buffer.from("ustar\0", "binary"); + var USTAR_VER = Buffer.from("00", "binary"); + var GNU_MAGIC = Buffer.from("ustar ", "binary"); + var GNU_VER = Buffer.from(" \0", "binary"); + var MASK = parseInt("7777", 8); + var MAGIC_OFFSET = 257; + var VERSION_OFFSET = 263; + var clamp = function(index, len, defaultValue) { + if (typeof index !== "number") return defaultValue; + index = ~~index; + if (index >= len) return len; + if (index >= 0) return index; + index += len; + if (index >= 0) return index; + return 0; + }; + var toType = function(flag) { + switch (flag) { + case 0: + return "file"; + case 1: + return "link"; + case 2: + return "symlink"; + case 3: + return "character-device"; + case 4: + return "block-device"; + case 5: + return "directory"; + case 6: + return "fifo"; + case 7: + return "contiguous-file"; + case 72: + return "pax-header"; + case 55: + return "pax-global-header"; + case 27: + return "gnu-long-link-path"; + case 28: + case 30: + return "gnu-long-path"; + } + return null; + }; + var toTypeflag = function(flag) { + switch (flag) { + case "file": + return 0; + case "link": + return 1; + case "symlink": + return 2; + case "character-device": + return 3; + case "block-device": + return 4; + case "directory": + return 5; + case "fifo": + return 6; + case "contiguous-file": + return 7; + case "pax-header": + return 72; + } + return 0; + }; + var indexOf = function(block, num, offset, end) { + for (; offset < end; offset++) { + if (block[offset] === num) return offset; + } + return end; + }; + var cksum = function(block) { + var sum = 8 * 32; + for (var i = 0; i < 148; i++) sum += block[i]; + for (var j = 156; j < 512; j++) sum += block[j]; + return sum; + }; + var encodeOct = function(val, n) { + val = val.toString(8); + if (val.length > n) return SEVENS.slice(0, n) + " "; + else return ZEROS.slice(0, n - val.length) + val + " "; + }; + function parse256(buf) { + var positive; + if (buf[0] === 128) positive = true; + else if (buf[0] === 255) positive = false; + else return null; + var tuple = []; + for (var i = buf.length - 1; i > 0; i--) { + var byte = buf[i]; + if (positive) tuple.push(byte); + else tuple.push(255 - byte); + } + var sum = 0; + var l2 = tuple.length; + for (i = 0; i < l2; i++) { + sum += tuple[i] * Math.pow(256, i); + } + return positive ? sum : -1 * sum; + } + var decodeOct = function(val, offset, length) { + val = val.slice(offset, offset + length); + offset = 0; + if (val[offset] & 128) { + return parse256(val); + } else { + while (offset < val.length && val[offset] === 32) offset++; + var end = clamp(indexOf(val, 32, offset, val.length), val.length, val.length); + while (offset < end && val[offset] === 0) offset++; + if (end === offset) return 0; + return parseInt(val.slice(offset, end).toString(), 8); + } + }; + var decodeStr = function(val, offset, length, encoding) { + return val.slice(offset, indexOf(val, 0, offset, offset + length)).toString(encoding); + }; + var addLength = function(str) { + var len = Buffer.byteLength(str); + var digits = Math.floor(Math.log(len) / Math.log(10)) + 1; + if (len + digits >= Math.pow(10, digits)) digits++; + return len + digits + str; + }; + exports2.decodeLongPath = function(buf, encoding) { + return decodeStr(buf, 0, buf.length, encoding); + }; + exports2.encodePax = function(opts) { + var result = ""; + if (opts.name) result += addLength(" path=" + opts.name + "\n"); + if (opts.linkname) result += addLength(" linkpath=" + opts.linkname + "\n"); + var pax = opts.pax; + if (pax) { + for (var key in pax) { + result += addLength(" " + key + "=" + pax[key] + "\n"); + } + } + return Buffer.from(result); + }; + exports2.decodePax = function(buf) { + var result = {}; + while (buf.length) { + var i = 0; + while (i < buf.length && buf[i] !== 32) i++; + var len = parseInt(buf.slice(0, i).toString(), 10); + if (!len) return result; + var b = buf.slice(i + 1, len - 1).toString(); + var keyIndex = b.indexOf("="); + if (keyIndex === -1) return result; + result[b.slice(0, keyIndex)] = b.slice(keyIndex + 1); + buf = buf.slice(len); + } + return result; + }; + exports2.encode = function(opts) { + var buf = alloc(512); + var name = opts.name; + var prefix = ""; + if (opts.typeflag === 5 && name[name.length - 1] !== "/") name += "/"; + if (Buffer.byteLength(name) !== name.length) return null; + while (Buffer.byteLength(name) > 100) { + var i = name.indexOf("/"); + if (i === -1) return null; + prefix += prefix ? "/" + name.slice(0, i) : name.slice(0, i); + name = name.slice(i + 1); + } + if (Buffer.byteLength(name) > 100 || Buffer.byteLength(prefix) > 155) return null; + if (opts.linkname && Buffer.byteLength(opts.linkname) > 100) return null; + buf.write(name); + buf.write(encodeOct(opts.mode & MASK, 6), 100); + buf.write(encodeOct(opts.uid, 6), 108); + buf.write(encodeOct(opts.gid, 6), 116); + buf.write(encodeOct(opts.size, 11), 124); + buf.write(encodeOct(opts.mtime.getTime() / 1e3 | 0, 11), 136); + buf[156] = ZERO_OFFSET + toTypeflag(opts.type); + if (opts.linkname) buf.write(opts.linkname, 157); + USTAR_MAGIC.copy(buf, MAGIC_OFFSET); + USTAR_VER.copy(buf, VERSION_OFFSET); + if (opts.uname) buf.write(opts.uname, 265); + if (opts.gname) buf.write(opts.gname, 297); + buf.write(encodeOct(opts.devmajor || 0, 6), 329); + buf.write(encodeOct(opts.devminor || 0, 6), 337); + if (prefix) buf.write(prefix, 345); + buf.write(encodeOct(cksum(buf), 6), 148); + return buf; + }; + exports2.decode = function(buf, filenameEncoding, allowUnknownFormat) { + var typeflag = buf[156] === 0 ? 0 : buf[156] - ZERO_OFFSET; + var name = decodeStr(buf, 0, 100, filenameEncoding); + var mode = decodeOct(buf, 100, 8); + var uid = decodeOct(buf, 108, 8); + var gid = decodeOct(buf, 116, 8); + var size = decodeOct(buf, 124, 12); + var mtime = decodeOct(buf, 136, 12); + var type = toType(typeflag); + var linkname = buf[157] === 0 ? null : decodeStr(buf, 157, 100, filenameEncoding); + var uname = decodeStr(buf, 265, 32); + var gname = decodeStr(buf, 297, 32); + var devmajor = decodeOct(buf, 329, 8); + var devminor = decodeOct(buf, 337, 8); + var c = cksum(buf); + if (c === 8 * 32) return null; + if (c !== decodeOct(buf, 148, 8)) throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?"); + if (USTAR_MAGIC.compare(buf, MAGIC_OFFSET, MAGIC_OFFSET + 6) === 0) { + if (buf[345]) name = decodeStr(buf, 345, 155, filenameEncoding) + "/" + name; + } else if (GNU_MAGIC.compare(buf, MAGIC_OFFSET, MAGIC_OFFSET + 6) === 0 && GNU_VER.compare(buf, VERSION_OFFSET, VERSION_OFFSET + 2) === 0) { + } else { + if (!allowUnknownFormat) { + throw new Error("Invalid tar header: unknown format."); + } + } + if (typeflag === 0 && name && name[name.length - 1] === "/") typeflag = 5; + return { + name, + mode, + uid, + gid, + size, + mtime: new Date(1e3 * mtime), + type, + linkname, + uname, + gname, + devmajor, + devminor + }; + }; + } +}); + +// ../../node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/extract.js +var require_extract = __commonJS({ + "../../node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/extract.js"(exports2, module2) { + var util2 = require("util"); + var bl = require_bl(); + var headers = require_headers(); + var Writable = require_readable().Writable; + var PassThrough = require_readable().PassThrough; + var noop = function() { + }; + var overflow = function(size) { + size &= 511; + return size && 512 - size; + }; + var emptyStream = function(self2, offset) { + var s = new Source(self2, offset); + s.end(); + return s; + }; + var mixinPax = function(header, pax) { + if (pax.path) header.name = pax.path; + if (pax.linkpath) header.linkname = pax.linkpath; + if (pax.size) header.size = parseInt(pax.size, 10); + header.pax = pax; + return header; + }; + var Source = function(self2, offset) { + this._parent = self2; + this.offset = offset; + PassThrough.call(this, { autoDestroy: false }); + }; + util2.inherits(Source, PassThrough); + Source.prototype.destroy = function(err) { + this._parent.destroy(err); + }; + var Extract = function(opts) { + if (!(this instanceof Extract)) return new Extract(opts); + Writable.call(this, opts); + opts = opts || {}; + this._offset = 0; + this._buffer = bl(); + this._missing = 0; + this._partial = false; + this._onparse = noop; + this._header = null; + this._stream = null; + this._overflow = null; + this._cb = null; + this._locked = false; + this._destroyed = false; + this._pax = null; + this._paxGlobal = null; + this._gnuLongPath = null; + this._gnuLongLinkPath = null; + var self2 = this; + var b = self2._buffer; + var oncontinue = function() { + self2._continue(); + }; + var onunlock = function(err) { + self2._locked = false; + if (err) return self2.destroy(err); + if (!self2._stream) oncontinue(); + }; + var onstreamend = function() { + self2._stream = null; + var drain = overflow(self2._header.size); + if (drain) self2._parse(drain, ondrain); + else self2._parse(512, onheader); + if (!self2._locked) oncontinue(); + }; + var ondrain = function() { + self2._buffer.consume(overflow(self2._header.size)); + self2._parse(512, onheader); + oncontinue(); + }; + var onpaxglobalheader = function() { + var size = self2._header.size; + self2._paxGlobal = headers.decodePax(b.slice(0, size)); + b.consume(size); + onstreamend(); + }; + var onpaxheader = function() { + var size = self2._header.size; + self2._pax = headers.decodePax(b.slice(0, size)); + if (self2._paxGlobal) self2._pax = Object.assign({}, self2._paxGlobal, self2._pax); + b.consume(size); + onstreamend(); + }; + var ongnulongpath = function() { + var size = self2._header.size; + this._gnuLongPath = headers.decodeLongPath(b.slice(0, size), opts.filenameEncoding); + b.consume(size); + onstreamend(); + }; + var ongnulonglinkpath = function() { + var size = self2._header.size; + this._gnuLongLinkPath = headers.decodeLongPath(b.slice(0, size), opts.filenameEncoding); + b.consume(size); + onstreamend(); + }; + var onheader = function() { + var offset = self2._offset; + var header; + try { + header = self2._header = headers.decode(b.slice(0, 512), opts.filenameEncoding, opts.allowUnknownFormat); + } catch (err) { + self2.emit("error", err); + } + b.consume(512); + if (!header) { + self2._parse(512, onheader); + oncontinue(); + return; + } + if (header.type === "gnu-long-path") { + self2._parse(header.size, ongnulongpath); + oncontinue(); + return; + } + if (header.type === "gnu-long-link-path") { + self2._parse(header.size, ongnulonglinkpath); + oncontinue(); + return; + } + if (header.type === "pax-global-header") { + self2._parse(header.size, onpaxglobalheader); + oncontinue(); + return; + } + if (header.type === "pax-header") { + self2._parse(header.size, onpaxheader); + oncontinue(); + return; + } + if (self2._gnuLongPath) { + header.name = self2._gnuLongPath; + self2._gnuLongPath = null; + } + if (self2._gnuLongLinkPath) { + header.linkname = self2._gnuLongLinkPath; + self2._gnuLongLinkPath = null; + } + if (self2._pax) { + self2._header = header = mixinPax(header, self2._pax); + self2._pax = null; + } + self2._locked = true; + if (!header.size || header.type === "directory") { + self2._parse(512, onheader); + self2.emit("entry", header, emptyStream(self2, offset), onunlock); + return; + } + self2._stream = new Source(self2, offset); + self2.emit("entry", header, self2._stream, onunlock); + self2._parse(header.size, onstreamend); + oncontinue(); + }; + this._onheader = onheader; + this._parse(512, onheader); + }; + util2.inherits(Extract, Writable); + Extract.prototype.destroy = function(err) { + if (this._destroyed) return; + this._destroyed = true; + if (err) this.emit("error", err); + this.emit("close"); + if (this._stream) this._stream.emit("close"); + }; + Extract.prototype._parse = function(size, onparse) { + if (this._destroyed) return; + this._offset += size; + this._missing = size; + if (onparse === this._onheader) this._partial = false; + this._onparse = onparse; + }; + Extract.prototype._continue = function() { + if (this._destroyed) return; + var cb = this._cb; + this._cb = noop; + if (this._overflow) this._write(this._overflow, void 0, cb); + else cb(); + }; + Extract.prototype._write = function(data, enc, cb) { + if (this._destroyed) return; + var s = this._stream; + var b = this._buffer; + var missing = this._missing; + if (data.length) this._partial = true; + if (data.length < missing) { + this._missing -= data.length; + this._overflow = null; + if (s) return s.write(data, cb); + b.append(data); + return cb(); + } + this._cb = cb; + this._missing = 0; + var overflow2 = null; + if (data.length > missing) { + overflow2 = data.slice(missing); + data = data.slice(0, missing); + } + if (s) s.end(data); + else b.append(data); + this._overflow = overflow2; + this._onparse(); + }; + Extract.prototype._final = function(cb) { + if (this._partial) return this.destroy(new Error("Unexpected end of data")); + cb(); + }; + module2.exports = Extract; + } +}); + +// ../../node_modules/.pnpm/fs-constants@1.0.0/node_modules/fs-constants/index.js +var require_fs_constants = __commonJS({ + "../../node_modules/.pnpm/fs-constants@1.0.0/node_modules/fs-constants/index.js"(exports2, module2) { + module2.exports = require("fs").constants || require("constants"); + } +}); + +// ../../node_modules/.pnpm/end-of-stream@1.4.5/node_modules/end-of-stream/index.js +var require_end_of_stream2 = __commonJS({ + "../../node_modules/.pnpm/end-of-stream@1.4.5/node_modules/end-of-stream/index.js"(exports2, module2) { + var once = require_once(); + var noop = function() { + }; + var qnt = global.Bare ? queueMicrotask : process.nextTick.bind(process); + var isRequest = function(stream) { + return stream.setHeader && typeof stream.abort === "function"; + }; + var isChildProcess = function(stream) { + return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3; + }; + var eos = function(stream, opts, callback) { + if (typeof opts === "function") return eos(stream, null, opts); + if (!opts) opts = {}; + callback = once(callback || noop); + var ws = stream._writableState; + var rs = stream._readableState; + var readable = opts.readable || opts.readable !== false && stream.readable; + var writable = opts.writable || opts.writable !== false && stream.writable; + var cancelled = false; + var onlegacyfinish = function() { + if (!stream.writable) onfinish(); + }; + var onfinish = function() { + writable = false; + if (!readable) callback.call(stream); + }; + var onend = function() { + readable = false; + if (!writable) callback.call(stream); + }; + var onexit = function(exitCode) { + callback.call(stream, exitCode ? new Error("exited with error code: " + exitCode) : null); + }; + var onerror = function(err) { + callback.call(stream, err); + }; + var onclose = function() { + qnt(onclosenexttick); + }; + var onclosenexttick = function() { + if (cancelled) return; + if (readable && !(rs && (rs.ended && !rs.destroyed))) return callback.call(stream, new Error("premature close")); + if (writable && !(ws && (ws.ended && !ws.destroyed))) return callback.call(stream, new Error("premature close")); + }; + var onrequest = function() { + stream.req.on("finish", onfinish); + }; + if (isRequest(stream)) { + stream.on("complete", onfinish); + stream.on("abort", onclose); + if (stream.req) onrequest(); + else stream.on("request", onrequest); + } else if (writable && !ws) { + stream.on("end", onlegacyfinish); + stream.on("close", onlegacyfinish); + } + if (isChildProcess(stream)) stream.on("exit", onexit); + stream.on("end", onend); + stream.on("finish", onfinish); + if (opts.error !== false) stream.on("error", onerror); + stream.on("close", onclose); + return function() { + cancelled = true; + stream.removeListener("complete", onfinish); + stream.removeListener("abort", onclose); + stream.removeListener("request", onrequest); + if (stream.req) stream.req.removeListener("finish", onfinish); + stream.removeListener("end", onlegacyfinish); + stream.removeListener("close", onlegacyfinish); + stream.removeListener("finish", onfinish); + stream.removeListener("exit", onexit); + stream.removeListener("end", onend); + stream.removeListener("error", onerror); + stream.removeListener("close", onclose); + }; + }; + module2.exports = eos; + } +}); + +// ../../node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/pack.js +var require_pack = __commonJS({ + "../../node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/pack.js"(exports2, module2) { + var constants = require_fs_constants(); + var eos = require_end_of_stream2(); + var inherits2 = require_inherits(); + var alloc = Buffer.alloc; + var Readable = require_readable().Readable; + var Writable = require_readable().Writable; + var StringDecoder = require("string_decoder").StringDecoder; + var headers = require_headers(); + var DMODE = parseInt("755", 8); + var FMODE = parseInt("644", 8); + var END_OF_TAR = alloc(1024); + var noop = function() { + }; + var overflow = function(self2, size) { + size &= 511; + if (size) self2.push(END_OF_TAR.slice(0, 512 - size)); + }; + function modeToType(mode) { + switch (mode & constants.S_IFMT) { + case constants.S_IFBLK: + return "block-device"; + case constants.S_IFCHR: + return "character-device"; + case constants.S_IFDIR: + return "directory"; + case constants.S_IFIFO: + return "fifo"; + case constants.S_IFLNK: + return "symlink"; + } + return "file"; + } + var Sink = function(to) { + Writable.call(this); + this.written = 0; + this._to = to; + this._destroyed = false; + }; + inherits2(Sink, Writable); + Sink.prototype._write = function(data, enc, cb) { + this.written += data.length; + if (this._to.push(data)) return cb(); + this._to._drain = cb; + }; + Sink.prototype.destroy = function() { + if (this._destroyed) return; + this._destroyed = true; + this.emit("close"); + }; + var LinkSink = function() { + Writable.call(this); + this.linkname = ""; + this._decoder = new StringDecoder("utf-8"); + this._destroyed = false; + }; + inherits2(LinkSink, Writable); + LinkSink.prototype._write = function(data, enc, cb) { + this.linkname += this._decoder.write(data); + cb(); + }; + LinkSink.prototype.destroy = function() { + if (this._destroyed) return; + this._destroyed = true; + this.emit("close"); + }; + var Void = function() { + Writable.call(this); + this._destroyed = false; + }; + inherits2(Void, Writable); + Void.prototype._write = function(data, enc, cb) { + cb(new Error("No body allowed for this entry")); + }; + Void.prototype.destroy = function() { + if (this._destroyed) return; + this._destroyed = true; + this.emit("close"); + }; + var Pack = function(opts) { + if (!(this instanceof Pack)) return new Pack(opts); + Readable.call(this, opts); + this._drain = noop; + this._finalized = false; + this._finalizing = false; + this._destroyed = false; + this._stream = null; + }; + inherits2(Pack, Readable); + Pack.prototype.entry = function(header, buffer, callback) { + if (this._stream) throw new Error("already piping an entry"); + if (this._finalized || this._destroyed) return; + if (typeof buffer === "function") { + callback = buffer; + buffer = null; + } + if (!callback) callback = noop; + var self2 = this; + if (!header.size || header.type === "symlink") header.size = 0; + if (!header.type) header.type = modeToType(header.mode); + if (!header.mode) header.mode = header.type === "directory" ? DMODE : FMODE; + if (!header.uid) header.uid = 0; + if (!header.gid) header.gid = 0; + if (!header.mtime) header.mtime = /* @__PURE__ */ new Date(); + if (typeof buffer === "string") buffer = Buffer.from(buffer); + if (Buffer.isBuffer(buffer)) { + header.size = buffer.length; + this._encode(header); + var ok = this.push(buffer); + overflow(self2, header.size); + if (ok) process.nextTick(callback); + else this._drain = callback; + return new Void(); + } + if (header.type === "symlink" && !header.linkname) { + var linkSink = new LinkSink(); + eos(linkSink, function(err) { + if (err) { + self2.destroy(); + return callback(err); + } + header.linkname = linkSink.linkname; + self2._encode(header); + callback(); + }); + return linkSink; + } + this._encode(header); + if (header.type !== "file" && header.type !== "contiguous-file") { + process.nextTick(callback); + return new Void(); + } + var sink = new Sink(this); + this._stream = sink; + eos(sink, function(err) { + self2._stream = null; + if (err) { + self2.destroy(); + return callback(err); + } + if (sink.written !== header.size) { + self2.destroy(); + return callback(new Error("size mismatch")); + } + overflow(self2, header.size); + if (self2._finalizing) self2.finalize(); + callback(); + }); + return sink; + }; + Pack.prototype.finalize = function() { + if (this._stream) { + this._finalizing = true; + return; + } + if (this._finalized) return; + this._finalized = true; + this.push(END_OF_TAR); + this.push(null); + }; + Pack.prototype.destroy = function(err) { + if (this._destroyed) return; + this._destroyed = true; + if (err) this.emit("error", err); + this.emit("close"); + if (this._stream && this._stream.destroy) this._stream.destroy(); + }; + Pack.prototype._encode = function(header) { + if (!header.pax) { + var buf = headers.encode(header); + if (buf) { + this.push(buf); + return; + } + } + this._encodePax(header); + }; + Pack.prototype._encodePax = function(header) { + var paxHeader = headers.encodePax({ + name: header.name, + linkname: header.linkname, + pax: header.pax + }); + var newHeader = { + name: "PaxHeader", + mode: header.mode, + uid: header.uid, + gid: header.gid, + size: paxHeader.length, + mtime: header.mtime, + type: "pax-header", + linkname: header.linkname && "PaxHeader", + uname: header.uname, + gname: header.gname, + devmajor: header.devmajor, + devminor: header.devminor + }; + this.push(headers.encode(newHeader)); + this.push(paxHeader); + overflow(this, paxHeader.length); + newHeader.size = header.size; + newHeader.type = header.type; + this.push(headers.encode(newHeader)); + }; + Pack.prototype._read = function(n) { + var drain = this._drain; + this._drain = noop; + drain(); + }; + module2.exports = Pack; + } +}); + +// ../../node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/index.js +var require_tar_stream = __commonJS({ + "../../node_modules/.pnpm/tar-stream@2.2.0/node_modules/tar-stream/index.js"(exports2) { + exports2.extract = require_extract(); + exports2.pack = require_pack(); + } +}); + +// ../../node_modules/.pnpm/archiver@5.3.2/node_modules/archiver/lib/plugins/tar.js +var require_tar = __commonJS({ + "../../node_modules/.pnpm/archiver@5.3.2/node_modules/archiver/lib/plugins/tar.js"(exports2, module2) { + var zlib = require("zlib"); + var engine = require_tar_stream(); + var util2 = require_archiver_utils(); + var Tar = function(options) { + if (!(this instanceof Tar)) { + return new Tar(options); + } + options = this.options = util2.defaults(options, { + gzip: false + }); + if (typeof options.gzipOptions !== "object") { + options.gzipOptions = {}; + } + this.supports = { + directory: true, + symlink: true + }; + this.engine = engine.pack(options); + this.compressor = false; + if (options.gzip) { + this.compressor = zlib.createGzip(options.gzipOptions); + this.compressor.on("error", this._onCompressorError.bind(this)); + } + }; + Tar.prototype._onCompressorError = function(err) { + this.engine.emit("error", err); + }; + Tar.prototype.append = function(source, data, callback) { + var self2 = this; + data.mtime = data.date; + function append(err, sourceBuffer) { + if (err) { + callback(err); + return; + } + self2.engine.entry(data, sourceBuffer, function(err2) { + callback(err2, data); + }); + } + if (data.sourceType === "buffer") { + append(null, source); + } else if (data.sourceType === "stream" && data.stats) { + data.size = data.stats.size; + var entry = self2.engine.entry(data, function(err) { + callback(err, data); + }); + source.pipe(entry); + } else if (data.sourceType === "stream") { + util2.collectStream(source, append); + } + }; + Tar.prototype.finalize = function() { + this.engine.finalize(); + }; + Tar.prototype.on = function() { + return this.engine.on.apply(this.engine, arguments); + }; + Tar.prototype.pipe = function(destination, options) { + if (this.compressor) { + return this.engine.pipe.apply(this.engine, [this.compressor]).pipe(destination, options); + } else { + return this.engine.pipe.apply(this.engine, arguments); + } + }; + Tar.prototype.unpipe = function() { + if (this.compressor) { + return this.compressor.unpipe.apply(this.compressor, arguments); + } else { + return this.engine.unpipe.apply(this.engine, arguments); + } + }; + module2.exports = Tar; + } +}); + +// ../../node_modules/.pnpm/archiver@5.3.2/node_modules/archiver/lib/plugins/json.js +var require_json2 = __commonJS({ + "../../node_modules/.pnpm/archiver@5.3.2/node_modules/archiver/lib/plugins/json.js"(exports2, module2) { + var inherits2 = require("util").inherits; + var Transform = require_readable().Transform; + var crc32 = require_buffer_crc32(); + var util2 = require_archiver_utils(); + var Json = function(options) { + if (!(this instanceof Json)) { + return new Json(options); + } + options = this.options = util2.defaults(options, {}); + Transform.call(this, options); + this.supports = { + directory: true, + symlink: true + }; + this.files = []; + }; + inherits2(Json, Transform); + Json.prototype._transform = function(chunk, encoding, callback) { + callback(null, chunk); + }; + Json.prototype._writeStringified = function() { + var fileString = JSON.stringify(this.files); + this.write(fileString); + }; + Json.prototype.append = function(source, data, callback) { + var self2 = this; + data.crc32 = 0; + function onend(err, sourceBuffer) { + if (err) { + callback(err); + return; + } + data.size = sourceBuffer.length || 0; + data.crc32 = crc32.unsigned(sourceBuffer); + self2.files.push(data); + callback(null, data); + } + if (data.sourceType === "buffer") { + onend(null, source); + } else if (data.sourceType === "stream") { + util2.collectStream(source, onend); + } + }; + Json.prototype.finalize = function() { + this._writeStringified(); + this.end(); + }; + module2.exports = Json; + } +}); + +// ../../node_modules/.pnpm/archiver@5.3.2/node_modules/archiver/index.js +var require_archiver = __commonJS({ + "../../node_modules/.pnpm/archiver@5.3.2/node_modules/archiver/index.js"(exports2, module2) { + var Archiver = require_core4(); + var formats = {}; + var vending = function(format, options) { + return vending.create(format, options); + }; + vending.create = function(format, options) { + if (formats[format]) { + var instance = new Archiver(format, options); + instance.setFormat(format); + instance.setModule(new formats[format](options)); + return instance; + } else { + throw new Error("create(" + format + "): format not registered"); + } + }; + vending.registerFormat = function(format, module3) { + if (formats[format]) { + throw new Error("register(" + format + "): format already registered"); + } + if (typeof module3 !== "function") { + throw new Error("register(" + format + "): format module invalid"); + } + if (typeof module3.prototype.append !== "function" || typeof module3.prototype.finalize !== "function") { + throw new Error("register(" + format + "): format module missing methods"); + } + formats[format] = module3; + }; + vending.isRegisteredFormat = function(format) { + if (formats[format]) { + return true; + } + return false; + }; + vending.registerFormat("zip", require_zip4()); + vending.registerFormat("tar", require_tar()); + vending.registerFormat("json", require_json2()); + module2.exports = vending; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/shared-strings.js +var require_shared_strings = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/shared-strings.js"(exports2, module2) { + var SharedStrings = class { + constructor() { + this._values = []; + this._totalRefs = 0; + this._hash = /* @__PURE__ */ Object.create(null); + } + get count() { + return this._values.length; + } + get values() { + return this._values; + } + get totalRefs() { + return this._totalRefs; + } + getString(index) { + return this._values[index]; + } + add(value) { + let index = this._hash[value]; + if (index === void 0) { + index = this._hash[value] = this._values.length; + this._values.push(value); + } + this._totalRefs++; + return index; + } + }; + module2.exports = SharedStrings; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/stream/xlsx/sheet-rels-writer.js +var require_sheet_rels_writer = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/stream/xlsx/sheet-rels-writer.js"(exports2, module2) { + var utils = require_utils13(); + var RelType = require_rel_type(); + var HyperlinksProxy = class { + constructor(sheetRelsWriter) { + this.writer = sheetRelsWriter; + } + push(hyperlink) { + this.writer.addHyperlink(hyperlink); + } + }; + var SheetRelsWriter = class { + constructor(options) { + this.id = options.id; + this.count = 0; + this._hyperlinks = []; + this._workbook = options.workbook; + } + get stream() { + if (!this._stream) { + this._stream = this._workbook._openStream(`/xl/worksheets/_rels/sheet${this.id}.xml.rels`); + } + return this._stream; + } + get length() { + return this._hyperlinks.length; + } + each(fn) { + return this._hyperlinks.forEach(fn); + } + get hyperlinksProxy() { + return this._hyperlinksProxy || (this._hyperlinksProxy = new HyperlinksProxy(this)); + } + addHyperlink(hyperlink) { + const relationship = { + Target: hyperlink.target, + Type: RelType.Hyperlink, + TargetMode: "External" + }; + const rId = this._writeRelationship(relationship); + this._hyperlinks.push({ + rId, + address: hyperlink.address + }); + } + addMedia(media) { + return this._writeRelationship(media); + } + addRelationship(rel) { + return this._writeRelationship(rel); + } + commit() { + if (this.count) { + this._writeClose(); + this.stream.end(); + } + } + // ================================================================================ + _writeOpen() { + this.stream.write( + ` + ` + ); + } + _writeRelationship(relationship) { + if (!this.count) { + this._writeOpen(); + } + const rId = `rId${++this.count}`; + if (relationship.TargetMode) { + this.stream.write( + `` + ); + } else { + this.stream.write( + `` + ); + } + return rId; + } + _writeClose() { + this.stream.write(""); + } + }; + module2.exports = SheetRelsWriter; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/stream/xlsx/sheet-comments-writer.js +var require_sheet_comments_writer = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/stream/xlsx/sheet-comments-writer.js"(exports2, module2) { + var XmlStream = require_xml_stream(); + var RelType = require_rel_type(); + var colCache = require_col_cache(); + var CommentXform = require_comment_xform(); + var VmlShapeXform = require_vml_shape_xform(); + var SheetCommentsWriter = class { + constructor(worksheet, sheetRelsWriter, options) { + this.id = options.id; + this.count = 0; + this._worksheet = worksheet; + this._workbook = options.workbook; + this._sheetRelsWriter = sheetRelsWriter; + } + get commentsStream() { + if (!this._commentsStream) { + this._commentsStream = this._workbook._openStream(`/xl/comments${this.id}.xml`); + } + return this._commentsStream; + } + get vmlStream() { + if (!this._vmlStream) { + this._vmlStream = this._workbook._openStream(`xl/drawings/vmlDrawing${this.id}.vml`); + } + return this._vmlStream; + } + _addRelationships() { + const commentRel = { + Type: RelType.Comments, + Target: `../comments${this.id}.xml` + }; + this._sheetRelsWriter.addRelationship(commentRel); + const vmlDrawingRel = { + Type: RelType.VmlDrawing, + Target: `../drawings/vmlDrawing${this.id}.vml` + }; + this.vmlRelId = this._sheetRelsWriter.addRelationship(vmlDrawingRel); + } + _addCommentRefs() { + this._workbook.commentRefs.push({ + commentName: `comments${this.id}`, + vmlDrawing: `vmlDrawing${this.id}` + }); + } + _writeOpen() { + this.commentsStream.write( + 'Author' + ); + this.vmlStream.write( + '' + ); + } + _writeComment(comment, index) { + const commentXform = new CommentXform(); + const commentsXmlStream = new XmlStream(); + commentXform.render(commentsXmlStream, comment); + this.commentsStream.write(commentsXmlStream.xml); + const vmlShapeXform = new VmlShapeXform(); + const vmlXmlStream = new XmlStream(); + vmlShapeXform.render(vmlXmlStream, comment, index); + this.vmlStream.write(vmlXmlStream.xml); + } + _writeClose() { + this.commentsStream.write(""); + this.vmlStream.write(""); + } + addComments(comments) { + if (comments && comments.length) { + if (!this.startedData) { + this._worksheet.comments = []; + this._writeOpen(); + this._addRelationships(); + this._addCommentRefs(); + this.startedData = true; + } + comments.forEach((item) => { + item.refAddress = colCache.decodeAddress(item.ref); + }); + comments.forEach((comment) => { + this._writeComment(comment, this.count); + this.count += 1; + }); + } + } + commit() { + if (this.count) { + this._writeClose(); + this.commentsStream.end(); + this.vmlStream.end(); + } + } + }; + module2.exports = SheetCommentsWriter; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/stream/xlsx/worksheet-writer.js +var require_worksheet_writer = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/stream/xlsx/worksheet-writer.js"(exports2, module2) { + var _2 = require_under_dash(); + var RelType = require_rel_type(); + var colCache = require_col_cache(); + var Encryptor = require_encryptor(); + var Dimensions = require_range4(); + var StringBuf = require_string_buf(); + var Row = require_row(); + var Column = require_column(); + var SheetRelsWriter = require_sheet_rels_writer(); + var SheetCommentsWriter = require_sheet_comments_writer(); + var DataValidations = require_data_validations(); + var xmlBuffer = new StringBuf(); + var ListXform = require_list_xform(); + var DataValidationsXform = require_data_validations_xform(); + var SheetPropertiesXform = require_sheet_properties_xform(); + var SheetFormatPropertiesXform = require_sheet_format_properties_xform(); + var ColXform = require_col_xform(); + var RowXform = require_row_xform(); + var HyperlinkXform = require_hyperlink_xform(); + var SheetViewXform = require_sheet_view_xform(); + var SheetProtectionXform = require_sheet_protection_xform(); + var PageMarginsXform = require_page_margins_xform(); + var PageSetupXform = require_page_setup_xform(); + var AutoFilterXform = require_auto_filter_xform(); + var PictureXform = require_picture_xform(); + var ConditionalFormattingsXform = require_conditional_formattings_xform(); + var HeaderFooterXform = require_header_footer_xform(); + var RowBreaksXform = require_row_breaks_xform(); + var xform = { + dataValidations: new DataValidationsXform(), + sheetProperties: new SheetPropertiesXform(), + sheetFormatProperties: new SheetFormatPropertiesXform(), + columns: new ListXform({ tag: "cols", length: false, childXform: new ColXform() }), + row: new RowXform(), + hyperlinks: new ListXform({ tag: "hyperlinks", length: false, childXform: new HyperlinkXform() }), + sheetViews: new ListXform({ tag: "sheetViews", length: false, childXform: new SheetViewXform() }), + sheetProtection: new SheetProtectionXform(), + pageMargins: new PageMarginsXform(), + pageSeteup: new PageSetupXform(), + autoFilter: new AutoFilterXform(), + picture: new PictureXform(), + conditionalFormattings: new ConditionalFormattingsXform(), + headerFooter: new HeaderFooterXform(), + rowBreaks: new RowBreaksXform() + }; + var WorksheetWriter = class { + constructor(options) { + this.id = options.id; + this.name = options.name || `Sheet${this.id}`; + this.state = options.state || "visible"; + this._rows = []; + this._columns = null; + this._keys = {}; + this._merges = []; + this._merges.add = function() { + }; + this._sheetRelsWriter = new SheetRelsWriter(options); + this._sheetCommentsWriter = new SheetCommentsWriter(this, this._sheetRelsWriter, options); + this._dimensions = new Dimensions(); + this._rowZero = 1; + this.committed = false; + this.dataValidations = new DataValidations(); + this._formulae = {}; + this._siFormulae = 0; + this.conditionalFormatting = []; + this.rowBreaks = []; + this.properties = Object.assign( + {}, + { + defaultRowHeight: 15, + dyDescent: 55, + outlineLevelCol: 0, + outlineLevelRow: 0 + }, + options.properties + ); + this.headerFooter = Object.assign( + {}, + { + differentFirst: false, + differentOddEven: false, + oddHeader: null, + oddFooter: null, + evenHeader: null, + evenFooter: null, + firstHeader: null, + firstFooter: null + }, + options.headerFooter + ); + this.pageSetup = Object.assign( + {}, + { + margins: { left: 0.7, right: 0.7, top: 0.75, bottom: 0.75, header: 0.3, footer: 0.3 }, + orientation: "portrait", + horizontalDpi: 4294967295, + verticalDpi: 4294967295, + fitToPage: !!(options.pageSetup && (options.pageSetup.fitToWidth || options.pageSetup.fitToHeight) && !options.pageSetup.scale), + pageOrder: "downThenOver", + blackAndWhite: false, + draft: false, + cellComments: "None", + errors: "displayed", + scale: 100, + fitToWidth: 1, + fitToHeight: 1, + paperSize: void 0, + showRowColHeaders: false, + showGridLines: false, + horizontalCentered: false, + verticalCentered: false, + rowBreaks: null, + colBreaks: null + }, + options.pageSetup + ); + this.useSharedStrings = options.useSharedStrings || false; + this._workbook = options.workbook; + this.hasComments = false; + this._views = options.views || []; + this.autoFilter = options.autoFilter || null; + this._media = []; + this.sheetProtection = null; + this._writeOpenWorksheet(); + this.startedData = false; + } + get workbook() { + return this._workbook; + } + get stream() { + if (!this._stream) { + this._stream = this._workbook._openStream(`/xl/worksheets/sheet${this.id}.xml`); + this._stream.pause(); + } + return this._stream; + } + // destroy - not a valid operation for a streaming writer + // even though some streamers might be able to, it's a bad idea. + destroy() { + throw new Error("Invalid Operation: destroy"); + } + commit() { + if (this.committed) { + return; + } + this._rows.forEach((cRow) => { + if (cRow) { + this._writeRow(cRow); + } + }); + this._rows = null; + if (!this.startedData) { + this._writeOpenSheetData(); + } + this._writeCloseSheetData(); + this._writeAutoFilter(); + this._writeMergeCells(); + this._writeHyperlinks(); + this._writeConditionalFormatting(); + this._writeDataValidations(); + this._writeSheetProtection(); + this._writePageMargins(); + this._writePageSetup(); + this._writeBackground(); + this._writeHeaderFooter(); + this._writeRowBreaks(); + this._writeLegacyData(); + this._writeCloseWorksheet(); + this.stream.end(); + this._sheetCommentsWriter.commit(); + this._sheetRelsWriter.commit(); + this.committed = true; + } + // return the current dimensions of the writer + get dimensions() { + return this._dimensions; + } + get views() { + return this._views; + } + // ========================================================================= + // Columns + // get the current columns array. + get columns() { + return this._columns; + } + // set the columns from an array of column definitions. + // Note: any headers defined will overwrite existing values. + set columns(value) { + this._headerRowCount = value.reduce((pv, cv) => { + const headerCount = cv.header && 1 || cv.headers && cv.headers.length || 0; + return Math.max(pv, headerCount); + }, 0); + let count = 1; + const columns = this._columns = []; + value.forEach((defn) => { + const column = new Column(this, count++, false); + columns.push(column); + column.defn = defn; + }); + } + getColumnKey(key) { + return this._keys[key]; + } + setColumnKey(key, value) { + this._keys[key] = value; + } + deleteColumnKey(key) { + delete this._keys[key]; + } + eachColumnKey(f) { + _2.each(this._keys, f); + } + // get a single column by col number. If it doesn't exist, it and any gaps before it + // are created. + getColumn(c) { + if (typeof c === "string") { + const col = this._keys[c]; + if (col) return col; + c = colCache.l2n(c); + } + if (!this._columns) { + this._columns = []; + } + if (c > this._columns.length) { + let n = this._columns.length + 1; + while (n <= c) { + this._columns.push(new Column(this, n++)); + } + } + return this._columns[c - 1]; + } + // ========================================================================= + // Rows + get _nextRow() { + return this._rowZero + this._rows.length; + } + // iterate over every uncommitted row in the worksheet, including maybe empty rows + eachRow(options, iteratee) { + if (!iteratee) { + iteratee = options; + options = void 0; + } + if (options && options.includeEmpty) { + const n = this._nextRow; + for (let i = this._rowZero; i < n; i++) { + iteratee(this.getRow(i), i); + } + } else { + this._rows.forEach((row) => { + if (row.hasValues) { + iteratee(row, row.number); + } + }); + } + } + _commitRow(cRow) { + let found = false; + while (this._rows.length && !found) { + const row = this._rows.shift(); + this._rowZero++; + if (row) { + this._writeRow(row); + found = row.number === cRow.number; + this._rowZero = row.number + 1; + } + } + } + get lastRow() { + if (this._rows.length) { + return this._rows[this._rows.length - 1]; + } + return void 0; + } + // find a row (if exists) by row number + findRow(rowNumber) { + const index = rowNumber - this._rowZero; + return this._rows[index]; + } + getRow(rowNumber) { + const index = rowNumber - this._rowZero; + if (index < 0) { + throw new Error("Out of bounds: this row has been committed"); + } + let row = this._rows[index]; + if (!row) { + this._rows[index] = row = new Row(this, rowNumber); + } + return row; + } + addRow(value) { + const row = new Row(this, this._nextRow); + this._rows[row.number - this._rowZero] = row; + row.values = value; + return row; + } + // ================================================================================ + // Cells + // returns the cell at [r,c] or address given by r. If not found, return undefined + findCell(r, c) { + const address = colCache.getAddress(r, c); + const row = this.findRow(address.row); + return row ? row.findCell(address.column) : void 0; + } + // return the cell at [r,c] or address given by r. If not found, create a new one. + getCell(r, c) { + const address = colCache.getAddress(r, c); + const row = this.getRow(address.row); + return row.getCellEx(address); + } + mergeCells(...cells) { + const dimensions = new Dimensions(cells); + this._merges.forEach((merge) => { + if (merge.intersects(dimensions)) { + throw new Error("Cannot merge already merged cells"); + } + }); + const master = this.getCell(dimensions.top, dimensions.left); + for (let i = dimensions.top; i <= dimensions.bottom; i++) { + for (let j = dimensions.left; j <= dimensions.right; j++) { + if (i > dimensions.top || j > dimensions.left) { + this.getCell(i, j).merge(master); + } + } + } + this._merges.push(dimensions); + } + // =========================================================================== + // Conditional Formatting + addConditionalFormatting(cf) { + this.conditionalFormatting.push(cf); + } + removeConditionalFormatting(filter) { + if (typeof filter === "number") { + this.conditionalFormatting.splice(filter, 1); + } else if (filter instanceof Function) { + this.conditionalFormatting = this.conditionalFormatting.filter(filter); + } else { + this.conditionalFormatting = []; + } + } + // ========================================================================= + addBackgroundImage(imageId) { + this._background = { + imageId + }; + } + getBackgroundImageId() { + return this._background && this._background.imageId; + } + // ========================================================================= + // Worksheet Protection + protect(password, options) { + return new Promise((resolve) => { + this.sheetProtection = { + sheet: true + }; + if (options && "spinCount" in options) { + options.spinCount = Number.isFinite(options.spinCount) ? Math.round(Math.max(0, options.spinCount)) : 1e5; + } + if (password) { + this.sheetProtection.algorithmName = "SHA-512"; + this.sheetProtection.saltValue = Encryptor.randomBytes(16).toString("base64"); + this.sheetProtection.spinCount = options && "spinCount" in options ? options.spinCount : 1e5; + this.sheetProtection.hashValue = Encryptor.convertPasswordToHash( + password, + "SHA512", + this.sheetProtection.saltValue, + this.sheetProtection.spinCount + ); + } + if (options) { + this.sheetProtection = Object.assign(this.sheetProtection, options); + if (!password && "spinCount" in options) { + delete this.sheetProtection.spinCount; + } + } + resolve(); + }); + } + unprotect() { + this.sheetProtection = null; + } + // ================================================================================ + _write(text) { + xmlBuffer.reset(); + xmlBuffer.addText(text); + this.stream.write(xmlBuffer); + } + _writeSheetProperties(xmlBuf, properties, pageSetup) { + const sheetPropertiesModel = { + outlineProperties: properties && properties.outlineProperties, + tabColor: properties && properties.tabColor, + pageSetup: pageSetup && pageSetup.fitToPage ? { + fitToPage: pageSetup.fitToPage + } : void 0 + }; + xmlBuf.addText(xform.sheetProperties.toXml(sheetPropertiesModel)); + } + _writeSheetFormatProperties(xmlBuf, properties) { + const sheetFormatPropertiesModel = properties ? { + defaultRowHeight: properties.defaultRowHeight, + dyDescent: properties.dyDescent, + outlineLevelCol: properties.outlineLevelCol, + outlineLevelRow: properties.outlineLevelRow + } : void 0; + if (properties.defaultColWidth) { + sheetFormatPropertiesModel.defaultColWidth = properties.defaultColWidth; + } + xmlBuf.addText(xform.sheetFormatProperties.toXml(sheetFormatPropertiesModel)); + } + _writeOpenWorksheet() { + xmlBuffer.reset(); + xmlBuffer.addText(''); + xmlBuffer.addText( + '' + ); + this._writeSheetProperties(xmlBuffer, this.properties, this.pageSetup); + xmlBuffer.addText(xform.sheetViews.toXml(this.views)); + this._writeSheetFormatProperties(xmlBuffer, this.properties); + this.stream.write(xmlBuffer); + } + _writeColumns() { + const cols = Column.toModel(this.columns); + if (cols) { + xform.columns.prepare(cols, { styles: this._workbook.styles }); + this.stream.write(xform.columns.toXml(cols)); + } + } + _writeOpenSheetData() { + this._write(""); + } + _writeRow(row) { + if (!this.startedData) { + this._writeColumns(); + this._writeOpenSheetData(); + this.startedData = true; + } + if (row.hasValues || row.height) { + const { model } = row; + const options = { + styles: this._workbook.styles, + sharedStrings: this.useSharedStrings ? this._workbook.sharedStrings : void 0, + hyperlinks: this._sheetRelsWriter.hyperlinksProxy, + merges: this._merges, + formulae: this._formulae, + siFormulae: this._siFormulae, + comments: [] + }; + xform.row.prepare(model, options); + this.stream.write(xform.row.toXml(model)); + if (options.comments.length) { + this.hasComments = true; + this._sheetCommentsWriter.addComments(options.comments); + } + } + } + _writeCloseSheetData() { + this._write(""); + } + _writeMergeCells() { + if (this._merges.length) { + xmlBuffer.reset(); + xmlBuffer.addText(``); + this._merges.forEach((merge) => { + xmlBuffer.addText(``); + }); + xmlBuffer.addText(""); + this.stream.write(xmlBuffer); + } + } + _writeHyperlinks() { + this.stream.write(xform.hyperlinks.toXml(this._sheetRelsWriter._hyperlinks)); + } + _writeConditionalFormatting() { + const options = { + styles: this._workbook.styles + }; + xform.conditionalFormattings.prepare(this.conditionalFormatting, options); + this.stream.write(xform.conditionalFormattings.toXml(this.conditionalFormatting)); + } + _writeRowBreaks() { + this.stream.write(xform.rowBreaks.toXml(this.rowBreaks)); + } + _writeDataValidations() { + this.stream.write(xform.dataValidations.toXml(this.dataValidations.model)); + } + _writeSheetProtection() { + this.stream.write(xform.sheetProtection.toXml(this.sheetProtection)); + } + _writePageMargins() { + this.stream.write(xform.pageMargins.toXml(this.pageSetup.margins)); + } + _writePageSetup() { + this.stream.write(xform.pageSeteup.toXml(this.pageSetup)); + } + _writeHeaderFooter() { + this.stream.write(xform.headerFooter.toXml(this.headerFooter)); + } + _writeAutoFilter() { + this.stream.write(xform.autoFilter.toXml(this.autoFilter)); + } + _writeBackground() { + if (this._background) { + if (this._background.imageId !== void 0) { + const image = this._workbook.getImage(this._background.imageId); + const pictureId = this._sheetRelsWriter.addMedia({ + Target: `../media/${image.name}`, + Type: RelType.Image + }); + this._background = { + ...this._background, + rId: pictureId + }; + } + this.stream.write(xform.picture.toXml({ rId: this._background.rId })); + } + } + _writeLegacyData() { + if (this.hasComments) { + xmlBuffer.reset(); + xmlBuffer.addText(``); + this.stream.write(xmlBuffer); + } + } + _writeDimensions() { + } + _writeCloseWorksheet() { + this._write(""); + } + }; + module2.exports = WorksheetWriter; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/stream/xlsx/workbook-writer.js +var require_workbook_writer = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/stream/xlsx/workbook-writer.js"(exports2, module2) { + var fs = require("fs"); + var Archiver = require_archiver(); + var StreamBuf = require_stream_buf(); + var RelType = require_rel_type(); + var StylesXform = require_styles_xform(); + var SharedStrings = require_shared_strings(); + var DefinedNames = require_defined_names(); + var CoreXform = require_core_xform(); + var RelationshipsXform = require_relationships_xform(); + var ContentTypesXform = require_content_types_xform(); + var AppXform = require_app_xform(); + var WorkbookXform = require_workbook_xform(); + var SharedStringsXform = require_shared_strings_xform(); + var WorksheetWriter = require_worksheet_writer(); + var theme1Xml = require_theme1(); + var WorkbookWriter = class { + constructor(options) { + options = options || {}; + this.created = options.created || /* @__PURE__ */ new Date(); + this.modified = options.modified || this.created; + this.creator = options.creator || "ExcelJS"; + this.lastModifiedBy = options.lastModifiedBy || "ExcelJS"; + this.lastPrinted = options.lastPrinted; + this.useSharedStrings = options.useSharedStrings || false; + this.sharedStrings = new SharedStrings(); + this.styles = options.useStyles ? new StylesXform(true) : new StylesXform.Mock(true); + this._definedNames = new DefinedNames(); + this._worksheets = []; + this.views = []; + this.zipOptions = options.zip; + this.media = []; + this.commentRefs = []; + this.zip = Archiver("zip", this.zipOptions); + if (options.stream) { + this.stream = options.stream; + } else if (options.filename) { + this.stream = fs.createWriteStream(options.filename); + } else { + this.stream = new StreamBuf(); + } + this.zip.pipe(this.stream); + this.promise = Promise.all([this.addThemes(), this.addOfficeRels()]); + } + get definedNames() { + return this._definedNames; + } + _openStream(path) { + const stream = new StreamBuf({ bufSize: 65536, batch: true }); + this.zip.append(stream, { name: path }); + stream.on("finish", () => { + stream.emit("zipped"); + }); + return stream; + } + _commitWorksheets() { + const commitWorksheet = function(worksheet) { + if (!worksheet.committed) { + return new Promise((resolve) => { + worksheet.stream.on("zipped", () => { + resolve(); + }); + worksheet.commit(); + }); + } + return Promise.resolve(); + }; + const promises = this._worksheets.map(commitWorksheet); + if (promises.length) { + return Promise.all(promises); + } + return Promise.resolve(); + } + async commit() { + await this.promise; + await this.addMedia(); + await this._commitWorksheets(); + await Promise.all([ + this.addContentTypes(), + this.addApp(), + this.addCore(), + this.addSharedStrings(), + this.addStyles(), + this.addWorkbookRels() + ]); + await this.addWorkbook(); + return this._finalize(); + } + get nextId() { + let i; + for (i = 1; i < this._worksheets.length; i++) { + if (!this._worksheets[i]) { + return i; + } + } + return this._worksheets.length || 1; + } + addImage(image) { + const id = this.media.length; + const medium = Object.assign({}, image, { type: "image", name: `image${id}.${image.extension}` }); + this.media.push(medium); + return id; + } + getImage(id) { + return this.media[id]; + } + addWorksheet(name, options) { + options = options || {}; + const useSharedStrings = options.useSharedStrings !== void 0 ? options.useSharedStrings : this.useSharedStrings; + if (options.tabColor) { + console.trace("tabColor option has moved to { properties: tabColor: {...} }"); + options.properties = Object.assign( + { + tabColor: options.tabColor + }, + options.properties + ); + } + const id = this.nextId; + name = name || `sheet${id}`; + const worksheet = new WorksheetWriter({ + id, + name, + workbook: this, + useSharedStrings, + properties: options.properties, + state: options.state, + pageSetup: options.pageSetup, + views: options.views, + autoFilter: options.autoFilter, + headerFooter: options.headerFooter + }); + this._worksheets[id] = worksheet; + return worksheet; + } + getWorksheet(id) { + if (id === void 0) { + return this._worksheets.find(() => true); + } + if (typeof id === "number") { + return this._worksheets[id]; + } + if (typeof id === "string") { + return this._worksheets.find((worksheet) => worksheet && worksheet.name === id); + } + return void 0; + } + addStyles() { + return new Promise((resolve) => { + this.zip.append(this.styles.xml, { name: "xl/styles.xml" }); + resolve(); + }); + } + addThemes() { + return new Promise((resolve) => { + this.zip.append(theme1Xml, { name: "xl/theme/theme1.xml" }); + resolve(); + }); + } + addOfficeRels() { + return new Promise((resolve) => { + const xform = new RelationshipsXform(); + const xml = xform.toXml([ + { Id: "rId1", Type: RelType.OfficeDocument, Target: "xl/workbook.xml" }, + { Id: "rId2", Type: RelType.CoreProperties, Target: "docProps/core.xml" }, + { Id: "rId3", Type: RelType.ExtenderProperties, Target: "docProps/app.xml" } + ]); + this.zip.append(xml, { name: "/_rels/.rels" }); + resolve(); + }); + } + addContentTypes() { + return new Promise((resolve) => { + const model = { + worksheets: this._worksheets.filter(Boolean), + sharedStrings: this.sharedStrings, + commentRefs: this.commentRefs, + media: this.media + }; + const xform = new ContentTypesXform(); + const xml = xform.toXml(model); + this.zip.append(xml, { name: "[Content_Types].xml" }); + resolve(); + }); + } + addMedia() { + return Promise.all( + this.media.map((medium) => { + if (medium.type === "image") { + const filename = `xl/media/${medium.name}`; + if (medium.filename) { + return this.zip.file(medium.filename, { name: filename }); + } + if (medium.buffer) { + return this.zip.append(medium.buffer, { name: filename }); + } + if (medium.base64) { + const dataimg64 = medium.base64; + const content = dataimg64.substring(dataimg64.indexOf(",") + 1); + return this.zip.append(content, { name: filename, base64: true }); + } + } + throw new Error("Unsupported media"); + }) + ); + } + addApp() { + return new Promise((resolve) => { + const model = { + worksheets: this._worksheets.filter(Boolean) + }; + const xform = new AppXform(); + const xml = xform.toXml(model); + this.zip.append(xml, { name: "docProps/app.xml" }); + resolve(); + }); + } + addCore() { + return new Promise((resolve) => { + const coreXform = new CoreXform(); + const xml = coreXform.toXml(this); + this.zip.append(xml, { name: "docProps/core.xml" }); + resolve(); + }); + } + addSharedStrings() { + if (this.sharedStrings.count) { + return new Promise((resolve) => { + const sharedStringsXform = new SharedStringsXform(); + const xml = sharedStringsXform.toXml(this.sharedStrings); + this.zip.append(xml, { name: "/xl/sharedStrings.xml" }); + resolve(); + }); + } + return Promise.resolve(); + } + addWorkbookRels() { + let count = 1; + const relationships = [ + { Id: `rId${count++}`, Type: RelType.Styles, Target: "styles.xml" }, + { Id: `rId${count++}`, Type: RelType.Theme, Target: "theme/theme1.xml" } + ]; + if (this.sharedStrings.count) { + relationships.push({ + Id: `rId${count++}`, + Type: RelType.SharedStrings, + Target: "sharedStrings.xml" + }); + } + this._worksheets.forEach((worksheet) => { + if (worksheet) { + worksheet.rId = `rId${count++}`; + relationships.push({ + Id: worksheet.rId, + Type: RelType.Worksheet, + Target: `worksheets/sheet${worksheet.id}.xml` + }); + } + }); + return new Promise((resolve) => { + const xform = new RelationshipsXform(); + const xml = xform.toXml(relationships); + this.zip.append(xml, { name: "/xl/_rels/workbook.xml.rels" }); + resolve(); + }); + } + addWorkbook() { + const { zip } = this; + const model = { + worksheets: this._worksheets.filter(Boolean), + definedNames: this._definedNames.model, + views: this.views, + properties: {}, + calcProperties: {} + }; + return new Promise((resolve) => { + const xform = new WorkbookXform(); + xform.prepare(model); + zip.append(xform.toXml(model), { name: "/xl/workbook.xml" }); + resolve(); + }); + } + _finalize() { + return new Promise((resolve, reject) => { + this.stream.on("error", reject); + this.stream.on("finish", () => { + resolve(this); + }); + this.zip.on("error", reject); + this.zip.finalize(); + }); + } + }; + module2.exports = WorkbookWriter; + } +}); + +// ../../node_modules/.pnpm/listenercount@1.0.1/node_modules/listenercount/index.js +var require_listenercount = __commonJS({ + "../../node_modules/.pnpm/listenercount@1.0.1/node_modules/listenercount/index.js"(exports2, module2) { + "use strict"; + var listenerCount = require("events").listenerCount; + listenerCount = listenerCount || function(ee, event) { + var listeners = ee && ee._events && ee._events[event]; + if (Array.isArray(listeners)) { + return listeners.length; + } else if (typeof listeners === "function") { + return 1; + } else { + return 0; + } + }; + module2.exports = listenerCount; + } +}); + +// ../../node_modules/.pnpm/buffer-indexof-polyfill@1.0.2/node_modules/buffer-indexof-polyfill/init-buffer.js +var require_init_buffer = __commonJS({ + "../../node_modules/.pnpm/buffer-indexof-polyfill@1.0.2/node_modules/buffer-indexof-polyfill/init-buffer.js"(exports2, module2) { + module2.exports = function initBuffer(val) { + var nodeVersion = process && process.version ? process.version : "v5.0.0"; + var major = nodeVersion.split(".")[0].replace("v", ""); + return major < 6 ? new Buffer(val) : Buffer.from(val); + }; + } +}); + +// ../../node_modules/.pnpm/buffer-indexof-polyfill@1.0.2/node_modules/buffer-indexof-polyfill/index.js +var require_buffer_indexof_polyfill = __commonJS({ + "../../node_modules/.pnpm/buffer-indexof-polyfill@1.0.2/node_modules/buffer-indexof-polyfill/index.js"() { + "use strict"; + var initBuffer = require_init_buffer(); + if (!Buffer.prototype.indexOf) { + Buffer.prototype.indexOf = function(value, offset) { + offset = offset || 0; + if (typeof value === "string" || value instanceof String) { + value = initBuffer(value); + } else if (typeof value === "number" || value instanceof Number) { + value = initBuffer([value]); + } + var len = value.length; + for (var i = offset; i <= this.length - len; i++) { + var mismatch = false; + for (var j = 0; j < len; j++) { + if (this[i + j] != value[j]) { + mismatch = true; + break; + } + } + if (!mismatch) { + return i; + } + } + return -1; + }; + } + function bufferLastIndexOf(value, offset) { + if (typeof value === "string" || value instanceof String) { + value = initBuffer(value); + } else if (typeof value === "number" || value instanceof Number) { + value = initBuffer([value]); + } + var len = value.length; + offset = offset || this.length - len; + for (var i = offset; i >= 0; i--) { + var mismatch = false; + for (var j = 0; j < len; j++) { + if (this[i + j] != value[j]) { + mismatch = true; + break; + } + } + if (!mismatch) { + return i; + } + } + return -1; + } + if (Buffer.prototype.lastIndexOf) { + if (initBuffer("ABC").lastIndexOf("ABC") === -1) + Buffer.prototype.lastIndexOf = bufferLastIndexOf; + } else { + Buffer.prototype.lastIndexOf = bufferLastIndexOf; + } + } +}); + +// ../../node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js +var require_is_callable = __commonJS({ + "../../node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js"(exports2, module2) { + "use strict"; + var fnToStr = Function.prototype.toString; + var reflectApply = typeof Reflect === "object" && Reflect !== null && Reflect.apply; + var badArrayLike; + var isCallableMarker; + if (typeof reflectApply === "function" && typeof Object.defineProperty === "function") { + try { + badArrayLike = Object.defineProperty({}, "length", { + get: function() { + throw isCallableMarker; + } + }); + isCallableMarker = {}; + reflectApply(function() { + throw 42; + }, null, badArrayLike); + } catch (_2) { + if (_2 !== isCallableMarker) { + reflectApply = null; + } + } + } else { + reflectApply = null; + } + var constructorRegex = /^\s*class\b/; + var isES6ClassFn = function isES6ClassFunction(value) { + try { + var fnStr = fnToStr.call(value); + return constructorRegex.test(fnStr); + } catch (e) { + return false; + } + }; + var tryFunctionObject = function tryFunctionToStr(value) { + try { + if (isES6ClassFn(value)) { + return false; + } + fnToStr.call(value); + return true; + } catch (e) { + return false; + } + }; + var toStr = Object.prototype.toString; + var objectClass = "[object Object]"; + var fnClass = "[object Function]"; + var genClass = "[object GeneratorFunction]"; + var ddaClass = "[object HTMLAllCollection]"; + var ddaClass2 = "[object HTML document.all class]"; + var ddaClass3 = "[object HTMLCollection]"; + var hasToStringTag = typeof Symbol === "function" && !!Symbol.toStringTag; + var isIE68 = !(0 in [,]); + var isDDA = function isDocumentDotAll() { + return false; + }; + if (typeof document === "object") { + all = document.all; + if (toStr.call(all) === toStr.call(document.all)) { + isDDA = function isDocumentDotAll(value) { + if ((isIE68 || !value) && (typeof value === "undefined" || typeof value === "object")) { + try { + var str = toStr.call(value); + return (str === ddaClass || str === ddaClass2 || str === ddaClass3 || str === objectClass) && value("") == null; + } catch (e) { + } + } + return false; + }; + } + } + var all; + module2.exports = reflectApply ? function isCallable(value) { + if (isDDA(value)) { + return true; + } + if (!value) { + return false; + } + if (typeof value !== "function" && typeof value !== "object") { + return false; + } + try { + reflectApply(value, null, badArrayLike); + } catch (e) { + if (e !== isCallableMarker) { + return false; + } + } + return !isES6ClassFn(value) && tryFunctionObject(value); + } : function isCallable(value) { + if (isDDA(value)) { + return true; + } + if (!value) { + return false; + } + if (typeof value !== "function" && typeof value !== "object") { + return false; + } + if (hasToStringTag) { + return tryFunctionObject(value); + } + if (isES6ClassFn(value)) { + return false; + } + var strClass = toStr.call(value); + if (strClass !== fnClass && strClass !== genClass && !/^\[object HTML/.test(strClass)) { + return false; + } + return tryFunctionObject(value); + }; + } +}); + +// ../../node_modules/.pnpm/for-each@0.3.5/node_modules/for-each/index.js +var require_for_each = __commonJS({ + "../../node_modules/.pnpm/for-each@0.3.5/node_modules/for-each/index.js"(exports2, module2) { + "use strict"; + var isCallable = require_is_callable(); + var toStr = Object.prototype.toString; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var forEachArray = function forEachArray2(array, iterator, receiver) { + for (var i = 0, len = array.length; i < len; i++) { + if (hasOwnProperty.call(array, i)) { + if (receiver == null) { + iterator(array[i], i, array); + } else { + iterator.call(receiver, array[i], i, array); + } + } + } + }; + var forEachString = function forEachString2(string, iterator, receiver) { + for (var i = 0, len = string.length; i < len; i++) { + if (receiver == null) { + iterator(string.charAt(i), i, string); + } else { + iterator.call(receiver, string.charAt(i), i, string); + } + } + }; + var forEachObject = function forEachObject2(object, iterator, receiver) { + for (var k in object) { + if (hasOwnProperty.call(object, k)) { + if (receiver == null) { + iterator(object[k], k, object); + } else { + iterator.call(receiver, object[k], k, object); + } + } + } + }; + function isArray(x) { + return toStr.call(x) === "[object Array]"; + } + module2.exports = function forEach(list, iterator, thisArg) { + if (!isCallable(iterator)) { + throw new TypeError("iterator must be a function"); + } + var receiver; + if (arguments.length >= 3) { + receiver = thisArg; + } + if (isArray(list)) { + forEachArray(list, iterator, receiver); + } else if (typeof list === "string") { + forEachString(list, iterator, receiver); + } else { + forEachObject(list, iterator, receiver); + } + }; + } +}); + +// ../../node_modules/.pnpm/possible-typed-array-names@1.1.0/node_modules/possible-typed-array-names/index.js +var require_possible_typed_array_names = __commonJS({ + "../../node_modules/.pnpm/possible-typed-array-names@1.1.0/node_modules/possible-typed-array-names/index.js"(exports2, module2) { + "use strict"; + module2.exports = [ + "Float16Array", + "Float32Array", + "Float64Array", + "Int8Array", + "Int16Array", + "Int32Array", + "Uint8Array", + "Uint8ClampedArray", + "Uint16Array", + "Uint32Array", + "BigInt64Array", + "BigUint64Array" + ]; + } +}); + +// ../../node_modules/.pnpm/available-typed-arrays@1.0.7/node_modules/available-typed-arrays/index.js +var require_available_typed_arrays = __commonJS({ + "../../node_modules/.pnpm/available-typed-arrays@1.0.7/node_modules/available-typed-arrays/index.js"(exports2, module2) { + "use strict"; + var possibleNames = require_possible_typed_array_names(); + var g = typeof globalThis === "undefined" ? global : globalThis; + module2.exports = function availableTypedArrays() { + var out = []; + for (var i = 0; i < possibleNames.length; i++) { + if (typeof g[possibleNames[i]] === "function") { + out[out.length] = possibleNames[i]; + } + } + return out; + }; + } +}); + +// ../../node_modules/.pnpm/define-data-property@1.1.4/node_modules/define-data-property/index.js +var require_define_data_property = __commonJS({ + "../../node_modules/.pnpm/define-data-property@1.1.4/node_modules/define-data-property/index.js"(exports2, module2) { + "use strict"; + var $defineProperty = require_es_define_property(); + var $SyntaxError = require_syntax(); + var $TypeError = require_type(); + var gopd = require_gopd(); + module2.exports = function defineDataProperty(obj2, property, value) { + if (!obj2 || typeof obj2 !== "object" && typeof obj2 !== "function") { + throw new $TypeError("`obj` must be an object or a function`"); + } + if (typeof property !== "string" && typeof property !== "symbol") { + throw new $TypeError("`property` must be a string or a symbol`"); + } + if (arguments.length > 3 && typeof arguments[3] !== "boolean" && arguments[3] !== null) { + throw new $TypeError("`nonEnumerable`, if provided, must be a boolean or null"); + } + if (arguments.length > 4 && typeof arguments[4] !== "boolean" && arguments[4] !== null) { + throw new $TypeError("`nonWritable`, if provided, must be a boolean or null"); + } + if (arguments.length > 5 && typeof arguments[5] !== "boolean" && arguments[5] !== null) { + throw new $TypeError("`nonConfigurable`, if provided, must be a boolean or null"); + } + if (arguments.length > 6 && typeof arguments[6] !== "boolean") { + throw new $TypeError("`loose`, if provided, must be a boolean"); + } + var nonEnumerable = arguments.length > 3 ? arguments[3] : null; + var nonWritable = arguments.length > 4 ? arguments[4] : null; + var nonConfigurable = arguments.length > 5 ? arguments[5] : null; + var loose = arguments.length > 6 ? arguments[6] : false; + var desc = !!gopd && gopd(obj2, property); + if ($defineProperty) { + $defineProperty(obj2, property, { + configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable, + enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable, + value, + writable: nonWritable === null && desc ? desc.writable : !nonWritable + }); + } else if (loose || !nonEnumerable && !nonWritable && !nonConfigurable) { + obj2[property] = value; + } else { + throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable."); + } + }; + } +}); + +// ../../node_modules/.pnpm/has-property-descriptors@1.0.2/node_modules/has-property-descriptors/index.js +var require_has_property_descriptors = __commonJS({ + "../../node_modules/.pnpm/has-property-descriptors@1.0.2/node_modules/has-property-descriptors/index.js"(exports2, module2) { + "use strict"; + var $defineProperty = require_es_define_property(); + var hasPropertyDescriptors = function hasPropertyDescriptors2() { + return !!$defineProperty; + }; + hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() { + if (!$defineProperty) { + return null; + } + try { + return $defineProperty([], "length", { value: 1 }).length !== 1; + } catch (e) { + return true; + } + }; + module2.exports = hasPropertyDescriptors; + } +}); + +// ../../node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.js +var require_set_function_length = __commonJS({ + "../../node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var define2 = require_define_data_property(); + var hasDescriptors = require_has_property_descriptors()(); + var gOPD = require_gopd(); + var $TypeError = require_type(); + var $floor = GetIntrinsic("%Math.floor%"); + module2.exports = function setFunctionLength(fn, length) { + if (typeof fn !== "function") { + throw new $TypeError("`fn` is not a function"); + } + if (typeof length !== "number" || length < 0 || length > 4294967295 || $floor(length) !== length) { + throw new $TypeError("`length` must be a positive 32-bit integer"); + } + var loose = arguments.length > 2 && !!arguments[2]; + var functionLengthIsConfigurable = true; + var functionLengthIsWritable = true; + if ("length" in fn && gOPD) { + var desc = gOPD(fn, "length"); + if (desc && !desc.configurable) { + functionLengthIsConfigurable = false; + } + if (desc && !desc.writable) { + functionLengthIsWritable = false; + } + } + if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) { + if (hasDescriptors) { + define2( + /** @type {Parameters[0]} */ + fn, + "length", + length, + true, + true + ); + } else { + define2( + /** @type {Parameters[0]} */ + fn, + "length", + length + ); + } + } + return fn; + }; + } +}); + +// ../../node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/applyBind.js +var require_applyBind = __commonJS({ + "../../node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/applyBind.js"(exports2, module2) { + "use strict"; + var bind = require_function_bind(); + var $apply = require_functionApply(); + var actualApply = require_actualApply(); + module2.exports = function applyBind() { + return actualApply(bind, $apply, arguments); + }; + } +}); + +// ../../node_modules/.pnpm/call-bind@1.0.9/node_modules/call-bind/index.js +var require_call_bind = __commonJS({ + "../../node_modules/.pnpm/call-bind@1.0.9/node_modules/call-bind/index.js"(exports2, module2) { + "use strict"; + var setFunctionLength = require_set_function_length(); + var $defineProperty = require_es_define_property(); + var callBindBasic = require_call_bind_apply_helpers(); + var applyBind = require_applyBind(); + module2.exports = function callBind(originalFunction) { + var func = callBindBasic(arguments); + var adjustedLength = 1 + originalFunction.length - (arguments.length - 1); + return setFunctionLength( + func, + adjustedLength > 0 ? adjustedLength : 0, + true + ); + }; + if ($defineProperty) { + $defineProperty(module2.exports, "apply", { value: applyBind }); + } else { + module2.exports.apply = applyBind; + } + } +}); + +// ../../node_modules/.pnpm/has-tostringtag@1.0.2/node_modules/has-tostringtag/shams.js +var require_shams2 = __commonJS({ + "../../node_modules/.pnpm/has-tostringtag@1.0.2/node_modules/has-tostringtag/shams.js"(exports2, module2) { + "use strict"; + var hasSymbols = require_shams(); + module2.exports = function hasToStringTagShams() { + return hasSymbols() && !!Symbol.toStringTag; + }; + } +}); + +// ../../node_modules/.pnpm/which-typed-array@1.1.24/node_modules/which-typed-array/index.js +var require_which_typed_array = __commonJS({ + "../../node_modules/.pnpm/which-typed-array@1.1.24/node_modules/which-typed-array/index.js"(exports2, module2) { + "use strict"; + var forEach = require_for_each(); + var availableTypedArrays = require_available_typed_arrays(); + var callBind = require_call_bind(); + var callBound = require_call_bound(); + var gOPD = require_gopd(); + var getProto = require_get_proto(); + var $toString = callBound("Object.prototype.toString"); + var hasToStringTag = require_shams2()(); + var g = typeof globalThis === "undefined" ? global : globalThis; + var typedArrays = availableTypedArrays(); + var $slice = callBound("String.prototype.slice"); + var $indexOf = callBound("Array.prototype.indexOf", true) || function indexOf(array, value) { + for (var i = 0; i < array.length; i += 1) { + if (array[i] === value) { + return i; + } + } + return -1; + }; + var cache = { __proto__: null }; + if (hasToStringTag && gOPD && getProto) { + forEach(typedArrays, function(typedArray) { + var arr = new g[typedArray](); + if (Symbol.toStringTag in arr && getProto) { + var proto = getProto(arr); + var descriptor = gOPD(proto, Symbol.toStringTag); + if (!descriptor && proto) { + var superProto = getProto(proto); + descriptor = gOPD(superProto, Symbol.toStringTag); + } + if (descriptor && descriptor.get) { + var bound = callBind(descriptor.get); + cache[ + /** @type {`$${TypedArrayName}`} */ + "$" + typedArray + ] = bound; + } + } + }); + } else { + forEach(typedArrays, function(typedArray) { + var arr = new g[typedArray](); + var fn = arr.slice || arr.set; + if (fn) { + var bound = ( + /** @type {typeof BoundSlice | typeof BoundSet} */ + // @ts-expect-error TODO FIXME + callBind(fn) + ); + cache[ + /** @type {`$${TypedArrayName}`} */ + "$" + typedArray + ] = bound; + } + }); + } + function tryTypedArrays(value) { + var found = false; + forEach( + /** @type {Record<`$${TypedArrayName}`, Getter>} */ + cache, + /** @param {Getter} getter @param {`$${TypedArrayName}`} typedArray */ + function(getter, typedArray) { + if (!found) { + try { + if ("$" + getter(value) === typedArray) { + found = /** @type {TypedArrayName} */ + $slice(typedArray, 1); + } + } catch (e) { + } + } + } + ); + return found; + } + function trySlices(value) { + var found = false; + forEach( + /** @type {Record<`$${TypedArrayName}`, Getter>} */ + cache, + /** @param {Getter} getter @param {`$${TypedArrayName}`} name */ + function(getter, name) { + if (!found) { + try { + getter(value); + found = /** @type {TypedArrayName} */ + $slice(name, 1); + } catch (e) { + } + } + } + ); + return found; + } + function isTATag(tag) { + return $indexOf(typedArrays, tag) > -1; + } + function whichTypedArray(value) { + if (!value || typeof value !== "object") { + return false; + } + if (!hasToStringTag) { + var tag = $slice($toString(value), 8, -1); + if (isTATag(tag)) { + return tag; + } + if (tag !== "Object") { + return false; + } + return trySlices(value); + } + if (!gOPD) { + return null; + } + return tryTypedArrays(value); + } + module2.exports = whichTypedArray; + } +}); + +// ../../node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js +var require_isArguments = __commonJS({ + "../../node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/isArguments.js"(exports2, module2) { + "use strict"; + var toStr = Object.prototype.toString; + module2.exports = function isArguments(value) { + var str = toStr.call(value); + var isArgs = str === "[object Arguments]"; + if (!isArgs) { + isArgs = str !== "[object Array]" && value !== null && typeof value === "object" && typeof value.length === "number" && value.length >= 0 && toStr.call(value.callee) === "[object Function]"; + } + return isArgs; + }; + } +}); + +// ../../node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js +var require_implementation2 = __commonJS({ + "../../node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/implementation.js"(exports2, module2) { + "use strict"; + var keysShim; + if (!Object.keys) { + has = Object.prototype.hasOwnProperty; + toStr = Object.prototype.toString; + isArgs = require_isArguments(); + isEnumerable = Object.prototype.propertyIsEnumerable; + hasDontEnumBug = !isEnumerable.call({ toString: null }, "toString"); + hasProtoEnumBug = isEnumerable.call(function() { + }, "prototype"); + dontEnums = [ + "toString", + "toLocaleString", + "valueOf", + "hasOwnProperty", + "isPrototypeOf", + "propertyIsEnumerable", + "constructor" + ]; + equalsConstructorPrototype = function(o) { + var ctor = o.constructor; + return ctor && ctor.prototype === o; + }; + excludedKeys = { + $applicationCache: true, + $console: true, + $external: true, + $frame: true, + $frameElement: true, + $frames: true, + $innerHeight: true, + $innerWidth: true, + $onmozfullscreenchange: true, + $onmozfullscreenerror: true, + $outerHeight: true, + $outerWidth: true, + $pageXOffset: true, + $pageYOffset: true, + $parent: true, + $scrollLeft: true, + $scrollTop: true, + $scrollX: true, + $scrollY: true, + $self: true, + $webkitIndexedDB: true, + $webkitStorageInfo: true, + $window: true + }; + hasAutomationEqualityBug = (function() { + if (typeof window === "undefined") { + return false; + } + for (var k in window) { + try { + if (!excludedKeys["$" + k] && has.call(window, k) && window[k] !== null && typeof window[k] === "object") { + try { + equalsConstructorPrototype(window[k]); + } catch (e) { + return true; + } + } + } catch (e) { + return true; + } + } + return false; + })(); + equalsConstructorPrototypeIfNotBuggy = function(o) { + if (typeof window === "undefined" || !hasAutomationEqualityBug) { + return equalsConstructorPrototype(o); + } + try { + return equalsConstructorPrototype(o); + } catch (e) { + return false; + } + }; + keysShim = function keys(object) { + var isObject2 = object !== null && typeof object === "object"; + var isFunction = toStr.call(object) === "[object Function]"; + var isArguments = isArgs(object); + var isString = isObject2 && toStr.call(object) === "[object String]"; + var theKeys = []; + if (!isObject2 && !isFunction && !isArguments) { + throw new TypeError("Object.keys called on a non-object"); + } + var skipProto = hasProtoEnumBug && isFunction; + if (isString && object.length > 0 && !has.call(object, 0)) { + for (var i = 0; i < object.length; ++i) { + theKeys.push(String(i)); + } + } + if (isArguments && object.length > 0) { + for (var j = 0; j < object.length; ++j) { + theKeys.push(String(j)); + } + } else { + for (var name in object) { + if (!(skipProto && name === "prototype") && has.call(object, name)) { + theKeys.push(String(name)); + } + } + } + if (hasDontEnumBug) { + var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); + for (var k = 0; k < dontEnums.length; ++k) { + if (!(skipConstructor && dontEnums[k] === "constructor") && has.call(object, dontEnums[k])) { + theKeys.push(dontEnums[k]); + } + } + } + return theKeys; + }; + } + var has; + var toStr; + var isArgs; + var isEnumerable; + var hasDontEnumBug; + var hasProtoEnumBug; + var dontEnums; + var equalsConstructorPrototype; + var excludedKeys; + var hasAutomationEqualityBug; + var equalsConstructorPrototypeIfNotBuggy; + module2.exports = keysShim; + } +}); + +// ../../node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js +var require_object_keys = __commonJS({ + "../../node_modules/.pnpm/object-keys@1.1.1/node_modules/object-keys/index.js"(exports2, module2) { + "use strict"; + var slice = Array.prototype.slice; + var isArgs = require_isArguments(); + var origKeys = Object.keys; + var keysShim = origKeys ? function keys(o) { + return origKeys(o); + } : require_implementation2(); + var originalKeys = Object.keys; + keysShim.shim = function shimObjectKeys() { + if (Object.keys) { + var keysWorksWithArguments = (function() { + var args = Object.keys(arguments); + return args && args.length === arguments.length; + })(1, 2); + if (!keysWorksWithArguments) { + Object.keys = function keys(object) { + if (isArgs(object)) { + return originalKeys(slice.call(object)); + } + return originalKeys(object); + }; + } + } else { + Object.keys = keysShim; + } + return Object.keys || keysShim; + }; + module2.exports = keysShim; + } +}); + +// ../../node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js +var require_define_properties = __commonJS({ + "../../node_modules/.pnpm/define-properties@1.2.1/node_modules/define-properties/index.js"(exports2, module2) { + "use strict"; + var keys = require_object_keys(); + var hasSymbols = typeof Symbol === "function" && typeof Symbol("foo") === "symbol"; + var toStr = Object.prototype.toString; + var concat = Array.prototype.concat; + var defineDataProperty = require_define_data_property(); + var isFunction = function(fn) { + return typeof fn === "function" && toStr.call(fn) === "[object Function]"; + }; + var supportsDescriptors = require_has_property_descriptors()(); + var defineProperty = function(object, name, value, predicate) { + if (name in object) { + if (predicate === true) { + if (object[name] === value) { + return; + } + } else if (!isFunction(predicate) || !predicate()) { + return; + } + } + if (supportsDescriptors) { + defineDataProperty(object, name, value, true); + } else { + defineDataProperty(object, name, value); + } + }; + var defineProperties = function(object, map) { + var predicates = arguments.length > 2 ? arguments[2] : {}; + var props = keys(map); + if (hasSymbols) { + props = concat.call(props, Object.getOwnPropertySymbols(map)); + } + for (var i = 0; i < props.length; i += 1) { + defineProperty(object, props[i], map[props[i]], predicates[props[i]]); + } + }; + defineProperties.supportsDescriptors = !!supportsDescriptors; + module2.exports = defineProperties; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/isPropertyKey.js +var require_isPropertyKey = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/isPropertyKey.js"(exports2, module2) { + "use strict"; + module2.exports = function isPropertyKey(argument) { + return typeof argument === "string" || typeof argument === "symbol"; + }; + } +}); + +// ../../node_modules/.pnpm/es-object-atoms@1.1.2/node_modules/es-object-atoms/isObject.js +var require_isObject2 = __commonJS({ + "../../node_modules/.pnpm/es-object-atoms@1.1.2/node_modules/es-object-atoms/isObject.js"(exports2, module2) { + "use strict"; + module2.exports = function isObject2(x) { + return !!x && (typeof x === "function" || typeof x === "object"); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/Get.js +var require_Get = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/Get.js"(exports2, module2) { + "use strict"; + var $TypeError = require_type(); + var inspect = require_object_inspect(); + var isPropertyKey = require_isPropertyKey(); + var isObject2 = require_isObject2(); + module2.exports = function Get(O, P) { + if (!isObject2(O)) { + throw new $TypeError("Assertion failed: Type(O) is not Object"); + } + if (!isPropertyKey(P)) { + throw new $TypeError("Assertion failed: P is not a Property Key, got " + inspect(P)); + } + return O[P]; + }; + } +}); + +// ../../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/isFinite.js +var require_isFinite = __commonJS({ + "../../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/isFinite.js"(exports2, module2) { + "use strict"; + var $isNaN = require_isNaN(); + module2.exports = function isFinite2(x) { + return (typeof x === "number" || typeof x === "bigint") && !$isNaN(x) && x !== Infinity && x !== -Infinity; + }; + } +}); + +// ../../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/isInteger.js +var require_isInteger = __commonJS({ + "../../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/isInteger.js"(exports2, module2) { + "use strict"; + var $abs = require_abs(); + var $floor = require_floor(); + var $isNaN = require_isNaN(); + var $isFinite = require_isFinite(); + module2.exports = function isInteger(argument) { + if (typeof argument !== "number" || $isNaN(argument) || !$isFinite(argument)) { + return false; + } + var absValue = $abs(argument); + return $floor(absValue) === absValue; + }; + } +}); + +// ../../node_modules/.pnpm/is-array-buffer@3.0.5/node_modules/is-array-buffer/index.js +var require_is_array_buffer = __commonJS({ + "../../node_modules/.pnpm/is-array-buffer@3.0.5/node_modules/is-array-buffer/index.js"(exports2, module2) { + "use strict"; + var callBind = require_call_bind(); + var callBound = require_call_bound(); + var GetIntrinsic = require_get_intrinsic(); + var $ArrayBuffer = GetIntrinsic("%ArrayBuffer%", true); + var $byteLength = callBound("ArrayBuffer.prototype.byteLength", true); + var $toString = callBound("Object.prototype.toString"); + var abSlice = !!$ArrayBuffer && !$byteLength && new $ArrayBuffer(0).slice; + var $abSlice = !!abSlice && callBind(abSlice); + module2.exports = $byteLength || $abSlice ? function isArrayBuffer(obj2) { + if (!obj2 || typeof obj2 !== "object") { + return false; + } + try { + if ($byteLength) { + $byteLength(obj2); + } else { + $abSlice(obj2, 0); + } + return true; + } catch (e) { + return false; + } + } : $ArrayBuffer ? function isArrayBuffer(obj2) { + return $toString(obj2) === "[object ArrayBuffer]"; + } : function isArrayBuffer(obj2) { + return false; + }; + } +}); + +// ../../node_modules/.pnpm/array-buffer-byte-length@1.0.2/node_modules/array-buffer-byte-length/index.js +var require_array_buffer_byte_length = __commonJS({ + "../../node_modules/.pnpm/array-buffer-byte-length@1.0.2/node_modules/array-buffer-byte-length/index.js"(exports2, module2) { + "use strict"; + var callBound = require_call_bound(); + var $byteLength = callBound("ArrayBuffer.prototype.byteLength", true); + var isArrayBuffer = require_is_array_buffer(); + module2.exports = function byteLength(ab) { + if (!isArrayBuffer(ab)) { + return NaN; + } + return $byteLength ? $byteLength(ab) : ab.byteLength; + }; + } +}); + +// ../../node_modules/.pnpm/is-shared-array-buffer@1.0.4/node_modules/is-shared-array-buffer/index.js +var require_is_shared_array_buffer = __commonJS({ + "../../node_modules/.pnpm/is-shared-array-buffer@1.0.4/node_modules/is-shared-array-buffer/index.js"(exports2, module2) { + "use strict"; + var callBound = require_call_bound(); + var $byteLength = callBound("SharedArrayBuffer.prototype.byteLength", true); + module2.exports = $byteLength ? function isSharedArrayBuffer(obj2) { + if (!obj2 || typeof obj2 !== "object") { + return false; + } + try { + $byteLength(obj2); + return true; + } catch (e) { + return false; + } + } : function isSharedArrayBuffer(_obj) { + return false; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/IsDetachedBuffer.js +var require_IsDetachedBuffer = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/IsDetachedBuffer.js"(exports2, module2) { + "use strict"; + var $TypeError = require_type(); + var $byteLength = require_array_buffer_byte_length(); + var availableTypedArrays = require_available_typed_arrays()(); + var callBound = require_call_bound(); + var isArrayBuffer = require_is_array_buffer(); + var isSharedArrayBuffer = require_is_shared_array_buffer(); + var $sabByteLength = callBound("SharedArrayBuffer.prototype.byteLength", true); + module2.exports = function IsDetachedBuffer(arrayBuffer) { + var isSAB = isSharedArrayBuffer(arrayBuffer); + if (!isArrayBuffer(arrayBuffer) && !isSAB) { + throw new $TypeError("Assertion failed: `arrayBuffer` must be an Object with an [[ArrayBufferData]] internal slot"); + } + if ((isSAB ? $sabByteLength : $byteLength)(arrayBuffer) === 0) { + try { + new global[availableTypedArrays[0]](arrayBuffer); + } catch (error) { + return !!error && error.name === "TypeError"; + } + } + return false; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/HasOwnProperty.js +var require_HasOwnProperty = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/HasOwnProperty.js"(exports2, module2) { + "use strict"; + var $TypeError = require_type(); + var hasOwn = require_hasown(); + var isObject2 = require_isObject2(); + var isPropertyKey = require_isPropertyKey(); + module2.exports = function HasOwnProperty(O, P) { + if (!isObject2(O)) { + throw new $TypeError("Assertion failed: `O` must be an Object"); + } + if (!isPropertyKey(P)) { + throw new $TypeError("Assertion failed: `P` must be a Property Key"); + } + return hasOwn(O, P); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/IsArray.js +var require_IsArray2 = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/IsArray.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $Array = GetIntrinsic("%Array%"); + var toStr = !$Array.isArray && require_call_bound()("Object.prototype.toString"); + module2.exports = $Array.isArray || function IsArray(argument) { + return toStr(argument) === "[object Array]"; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/IsArray.js +var require_IsArray3 = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/IsArray.js"(exports2, module2) { + "use strict"; + module2.exports = require_IsArray2(); + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/IsBigIntElementType.js +var require_IsBigIntElementType = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/IsBigIntElementType.js"(exports2, module2) { + "use strict"; + module2.exports = function IsBigIntElementType(type) { + return type === "BIGUINT64" || type === "BIGINT64"; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/IsUnsignedElementType.js +var require_IsUnsignedElementType = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/IsUnsignedElementType.js"(exports2, module2) { + "use strict"; + module2.exports = function IsUnsignedElementType(type) { + return type === "UINT8" || type === "UINT8C" || type === "UINT16" || type === "UINT32" || type === "BIGUINT64"; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/bytesAsFloat16.js +var require_bytesAsFloat16 = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/bytesAsFloat16.js"(exports2, module2) { + "use strict"; + var $pow = require_pow(); + module2.exports = function bytesAsFloat32(rawBytes) { + var bits = rawBytes[1] << 8 | rawBytes[0]; + var sign = bits & 32768 ? -1 : 1; + var exponent = (bits & 31744) >> 10; + var mantissa = bits & 1023; + if (exponent === 0 && mantissa === 0) { + return sign === 1 ? 0 : -0; + } + if (exponent === 31 && mantissa === 0) { + return sign === 1 ? Infinity : -Infinity; + } + if (exponent === 31 && mantissa !== 0) { + return NaN; + } + exponent -= 15; + if (exponent === -15) { + return sign * mantissa * $pow(2, -24); + } + return sign * (1 + mantissa * $pow(2, -10)) * $pow(2, exponent); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/bytesAsFloat32.js +var require_bytesAsFloat32 = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/bytesAsFloat32.js"(exports2, module2) { + "use strict"; + var $pow = require_pow(); + module2.exports = function bytesAsFloat32(rawBytes) { + var sign = rawBytes[3] & 128 ? -1 : 1; + var exponent = (rawBytes[3] & 127) << 1 | rawBytes[2] >> 7; + var mantissa = (rawBytes[2] & 127) << 16 | rawBytes[1] << 8 | rawBytes[0]; + if (exponent === 0 && mantissa === 0) { + return sign === 1 ? 0 : -0; + } + if (exponent === 255 && mantissa === 0) { + return sign === 1 ? Infinity : -Infinity; + } + if (exponent === 255 && mantissa !== 0) { + return NaN; + } + exponent -= 127; + if (exponent === -127) { + return sign * mantissa * $pow(2, -126 - 23); + } + return sign * (1 + mantissa * $pow(2, -23)) * $pow(2, exponent); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/bytesAsFloat64.js +var require_bytesAsFloat64 = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/bytesAsFloat64.js"(exports2, module2) { + "use strict"; + var $pow = require_pow(); + module2.exports = function bytesAsFloat64(rawBytes) { + var sign = rawBytes[7] & 128 ? -1 : 1; + var exponent = (rawBytes[7] & 127) << 4 | (rawBytes[6] & 240) >> 4; + var mantissa = (rawBytes[6] & 15) * 281474976710656 + rawBytes[5] * 1099511627776 + rawBytes[4] * 4294967296 + rawBytes[3] * 16777216 + rawBytes[2] * 65536 + rawBytes[1] * 256 + rawBytes[0]; + if (exponent === 0 && mantissa === 0) { + return sign * 0; + } + if (exponent === 2047 && mantissa !== 0) { + return NaN; + } + if (exponent === 2047 && mantissa === 0) { + return sign * Infinity; + } + exponent -= 1023; + if (exponent === -1023) { + return sign * mantissa * 5e-324; + } + return sign * (1 + mantissa / 4503599627370496) * $pow(2, exponent); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/bytesAsInteger.js +var require_bytesAsInteger = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/bytesAsInteger.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $pow = require_pow(); + var $Number = GetIntrinsic("%Number%"); + var $BigInt = GetIntrinsic("%BigInt%", true); + module2.exports = function bytesAsInteger(rawBytes, elementSize, isUnsigned, isBigInt) { + var Z = isBigInt ? $BigInt : $Number; + var intValue = Z(0); + for (var i = 0; i < rawBytes.length; i++) { + intValue += Z(rawBytes[i] * $pow(2, 8 * i)); + } + if (!isUnsigned) { + var bitLength = elementSize * 8; + if (rawBytes[elementSize - 1] & 128) { + intValue -= Z($pow(2, bitLength)); + } + } + return intValue; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/every.js +var require_every2 = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/every.js"(exports2, module2) { + "use strict"; + module2.exports = function every(array, predicate) { + for (var i = 0; i < array.length; i += 1) { + if (!predicate(array[i], i, array)) { + return false; + } + } + return true; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/isByteValue.js +var require_isByteValue = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/isByteValue.js"(exports2, module2) { + "use strict"; + module2.exports = function isByteValue(value) { + return typeof value === "number" && value >= 0 && value <= 255 && (value | 0) === value; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/tables/typed-array-objects.js +var require_typed_array_objects = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/tables/typed-array-objects.js"(exports2, module2) { + "use strict"; + module2.exports = { + __proto__: null, + name: { + __proto__: null, + $Int8Array: "INT8", + $Uint8Array: "UINT8", + $Uint8ClampedArray: "UINT8C", + $Int16Array: "INT16", + $Uint16Array: "UINT16", + $Int32Array: "INT32", + $Uint32Array: "UINT32", + $BigInt64Array: "BIGINT64", + $BigUint64Array: "BIGUINT64", + $Float16Array: "FLOAT16", + $Float32Array: "FLOAT32", + $Float64Array: "FLOAT64" + }, + size: { + __proto__: null, + $INT8: 1, + $UINT8: 1, + $UINT8C: 1, + $INT16: 2, + $UINT16: 2, + $INT32: 4, + $UINT32: 4, + $BIGINT64: 8, + $BIGUINT64: 8, + $FLOAT16: 2, + $FLOAT32: 4, + $FLOAT64: 8 + }, + choices: '"INT8", "UINT8", "UINT8C", "INT16", "UINT16", "INT32", "UINT32", "BIGINT64", "BIGUINT64", "FLOAT16", "FLOAT32", or "FLOAT64"' + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/RawBytesToNumeric.js +var require_RawBytesToNumeric = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/RawBytesToNumeric.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var callBound = require_call_bound(); + var $RangeError = require_range2(); + var $SyntaxError = require_syntax(); + var $TypeError = require_type(); + var $BigInt = GetIntrinsic("%BigInt%", true); + var hasOwnProperty = require_HasOwnProperty(); + var IsArray = require_IsArray3(); + var IsBigIntElementType = require_IsBigIntElementType(); + var IsUnsignedElementType = require_IsUnsignedElementType(); + var bytesAsFloat16 = require_bytesAsFloat16(); + var bytesAsFloat32 = require_bytesAsFloat32(); + var bytesAsFloat64 = require_bytesAsFloat64(); + var bytesAsInteger = require_bytesAsInteger(); + var every = require_every2(); + var isByteValue = require_isByteValue(); + var $reverse = callBound("Array.prototype.reverse"); + var $slice = callBound("Array.prototype.slice"); + var tableTAO = require_typed_array_objects(); + module2.exports = function RawBytesToNumeric(type, rawBytes, isLittleEndian) { + if (!hasOwnProperty(tableTAO.size, "$" + type)) { + throw new $TypeError("Assertion failed: `type` must be a TypedArray element type"); + } + if (!IsArray(rawBytes) || !every(rawBytes, isByteValue)) { + throw new $TypeError("Assertion failed: `rawBytes` must be an Array of bytes"); + } + if (typeof isLittleEndian !== "boolean") { + throw new $TypeError("Assertion failed: `isLittleEndian` must be a Boolean"); + } + var elementSize = tableTAO.size["$" + type]; + if (rawBytes.length !== elementSize) { + throw new $RangeError("Assertion failed: `rawBytes` must have a length of " + elementSize + " for type " + type); + } + var isBigInt = IsBigIntElementType(type); + if (isBigInt && !$BigInt) { + throw new $SyntaxError("this environment does not support BigInts"); + } + rawBytes = $slice(rawBytes, 0, elementSize); + if (!isLittleEndian) { + $reverse(rawBytes); + } + if (type === "FLOAT16") { + return bytesAsFloat16(rawBytes); + } + if (type === "FLOAT32") { + return bytesAsFloat32(rawBytes); + } + if (type === "FLOAT64") { + return bytesAsFloat64(rawBytes); + } + return bytesAsInteger(rawBytes, elementSize, IsUnsignedElementType(type), isBigInt); + }; + } +}); + +// ../../node_modules/.pnpm/isarray@2.0.5/node_modules/isarray/index.js +var require_isarray2 = __commonJS({ + "../../node_modules/.pnpm/isarray@2.0.5/node_modules/isarray/index.js"(exports2, module2) { + var toString2 = {}.toString; + module2.exports = Array.isArray || function(arr) { + return toString2.call(arr) == "[object Array]"; + }; + } +}); + +// ../../node_modules/.pnpm/safe-array-concat@1.1.4/node_modules/safe-array-concat/index.js +var require_safe_array_concat = __commonJS({ + "../../node_modules/.pnpm/safe-array-concat@1.1.4/node_modules/safe-array-concat/index.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $concat = GetIntrinsic("%Array.prototype.concat%"); + var callBind = require_call_bind(); + var callBound = require_call_bound(); + var $slice = callBound("Array.prototype.slice"); + var hasSymbols = require_shams()(); + var isConcatSpreadable = hasSymbols && Symbol.isConcatSpreadable; + var empty = []; + var $concatApply = isConcatSpreadable ? callBind.apply($concat, empty) : null; + var isArray = isConcatSpreadable ? ( + /** @type {(value: unknown) => value is unknown[]} */ + require_isarray2() + ) : null; + module2.exports = isConcatSpreadable ? function safeArrayConcat(item) { + for (var i = 0; i < arguments.length; i += 1) { + var arg = arguments[i]; + if (arg && typeof arg === "object" && typeof arg[isConcatSpreadable] === "boolean") { + if (!empty[isConcatSpreadable]) { + empty[isConcatSpreadable] = true; + } + var arr = isArray(arg) ? $slice(arg) : [arg]; + arr[isConcatSpreadable] = true; + arguments[i] = arr; + } + } + return $concatApply(arguments); + } : callBind($concat, empty); + } +}); + +// ../../node_modules/.pnpm/is-typed-array@1.1.15/node_modules/is-typed-array/index.js +var require_is_typed_array = __commonJS({ + "../../node_modules/.pnpm/is-typed-array@1.1.15/node_modules/is-typed-array/index.js"(exports2, module2) { + "use strict"; + var whichTypedArray = require_which_typed_array(); + module2.exports = function isTypedArray(value) { + return !!whichTypedArray(value); + }; + } +}); + +// ../../node_modules/.pnpm/typed-array-buffer@1.0.3/node_modules/typed-array-buffer/index.js +var require_typed_array_buffer = __commonJS({ + "../../node_modules/.pnpm/typed-array-buffer@1.0.3/node_modules/typed-array-buffer/index.js"(exports2, module2) { + "use strict"; + var $TypeError = require_type(); + var callBound = require_call_bound(); + var $typedArrayBuffer = callBound("TypedArray.prototype.buffer", true); + var isTypedArray = require_is_typed_array(); + module2.exports = $typedArrayBuffer || function typedArrayBuffer(x) { + if (!isTypedArray(x)) { + throw new $TypeError("Not a Typed Array"); + } + return x.buffer; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/defaultEndianness.js +var require_defaultEndianness = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/defaultEndianness.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $Uint8Array = GetIntrinsic("%Uint8Array%", true); + var $Uint32Array = GetIntrinsic("%Uint32Array%", true); + var typedArrayBuffer = require_typed_array_buffer(); + var uInt32 = $Uint32Array && new $Uint32Array([305419896]); + var uInt8 = uInt32 && new $Uint8Array(typedArrayBuffer(uInt32)); + module2.exports = uInt8 ? uInt8[0] === 120 ? "little" : uInt8[0] === 18 ? "big" : uInt8[0] === 52 ? "mixed" : "unknown" : "indeterminate"; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/GetValueFromBuffer.js +var require_GetValueFromBuffer = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/GetValueFromBuffer.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $SyntaxError = require_syntax(); + var $TypeError = require_type(); + var callBound = require_call_bound(); + var isInteger = require_isInteger(); + var $Uint8Array = GetIntrinsic("%Uint8Array%", true); + var $slice = callBound("Array.prototype.slice"); + var IsDetachedBuffer = require_IsDetachedBuffer(); + var RawBytesToNumeric = require_RawBytesToNumeric(); + var isArrayBuffer = require_is_array_buffer(); + var isSharedArrayBuffer = require_is_shared_array_buffer(); + var safeConcat = require_safe_array_concat(); + var tableTAO = require_typed_array_objects(); + var defaultEndianness = require_defaultEndianness(); + module2.exports = function GetValueFromBuffer(arrayBuffer, byteIndex, type, isTypedArray, order) { + var isSAB = isSharedArrayBuffer(arrayBuffer); + if (!isArrayBuffer(arrayBuffer) && !isSAB) { + throw new $TypeError("Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer"); + } + if (!isInteger(byteIndex)) { + throw new $TypeError("Assertion failed: `byteIndex` must be an integer"); + } + if (typeof type !== "string" || typeof tableTAO.size["$" + type] !== "number") { + throw new $TypeError("Assertion failed: `type` must be one of " + tableTAO.choices); + } + if (typeof isTypedArray !== "boolean") { + throw new $TypeError("Assertion failed: `isTypedArray` must be a boolean"); + } + if (order !== "SEQ-CST" && order !== "UNORDERED") { + throw new $TypeError("Assertion failed: `order` must be either `SEQ-CST` or `UNORDERED`"); + } + if (arguments.length > 5 && typeof arguments[5] !== "boolean") { + throw new $TypeError("Assertion failed: `isLittleEndian` must be a boolean, if present"); + } + if (IsDetachedBuffer(arrayBuffer)) { + throw new $TypeError("Assertion failed: `arrayBuffer` is detached"); + } + if (byteIndex < 0) { + throw new $TypeError("Assertion failed: `byteIndex` must be non-negative"); + } + var elementSize = tableTAO.size["$" + type]; + if (!elementSize) { + throw new $TypeError("Assertion failed: `type` must be one of " + tableTAO.choices); + } + var rawValue; + if (isSAB) { + throw new $SyntaxError("SharedArrayBuffer is not supported by this implementation"); + } else { + rawValue = $slice(new $Uint8Array(arrayBuffer, byteIndex), 0, elementSize); + } + var isLittleEndian = arguments.length > 5 ? arguments[5] : defaultEndianness === "little"; + var bytes = isLittleEndian ? $slice(safeConcat([0, 0, 0, 0, 0, 0, 0, 0], rawValue), -elementSize) : $slice(safeConcat(rawValue, [0, 0, 0, 0, 0, 0, 0, 0]), 0, elementSize); + return RawBytesToNumeric(type, bytes, isLittleEndian); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/SameValue.js +var require_SameValue = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/SameValue.js"(exports2, module2) { + "use strict"; + var $isNaN = require_isNaN(); + module2.exports = function SameValue(x, y) { + if (x === y) { + if (x === 0) { + return 1 / x === 1 / y; + } + return true; + } + return $isNaN(x) && $isNaN(y); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/Set.js +var require_Set = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/Set.js"(exports2, module2) { + "use strict"; + var $TypeError = require_type(); + var isObject2 = require_isObject2(); + var isPropertyKey = require_isPropertyKey(); + var SameValue = require_SameValue(); + var noThrowOnStrictViolation = (function() { + try { + delete [].length; + return true; + } catch (e) { + return false; + } + })(); + module2.exports = function Set2(O, P, V, Throw) { + if (!isObject2(O)) { + throw new $TypeError("Assertion failed: `O` must be an Object"); + } + if (!isPropertyKey(P)) { + throw new $TypeError("Assertion failed: `P` must be a Property Key"); + } + if (typeof Throw !== "boolean") { + throw new $TypeError("Assertion failed: `Throw` must be a Boolean"); + } + if (Throw) { + O[P] = V; + if (noThrowOnStrictViolation && !SameValue(O[P], V)) { + throw new $TypeError("Attempted to assign to readonly property."); + } + return true; + } + try { + O[P] = V; + return noThrowOnStrictViolation ? SameValue(O[P], V) : true; + } catch (e) { + return false; + } + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/StringToBigInt.js +var require_StringToBigInt = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/StringToBigInt.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $BigInt = GetIntrinsic("%BigInt%", true); + var $TypeError = require_type(); + var $SyntaxError = require_syntax(); + module2.exports = function StringToBigInt(argument) { + if (typeof argument !== "string") { + throw new $TypeError("`argument` must be a string"); + } + if (!$BigInt) { + throw new $SyntaxError("BigInts are not supported in this environment"); + } + try { + return $BigInt(argument); + } catch (e) { + return void 0; + } + }; + } +}); + +// ../../node_modules/.pnpm/is-date-object@1.1.0/node_modules/is-date-object/index.js +var require_is_date_object = __commonJS({ + "../../node_modules/.pnpm/is-date-object@1.1.0/node_modules/is-date-object/index.js"(exports2, module2) { + "use strict"; + var callBound = require_call_bound(); + var getDay = callBound("Date.prototype.getDay"); + var tryDateObject = function tryDateGetDayCall(value) { + try { + getDay(value); + return true; + } catch (e) { + return false; + } + }; + var toStr = callBound("Object.prototype.toString"); + var dateClass = "[object Date]"; + var hasToStringTag = require_shams2()(); + module2.exports = function isDateObject(value) { + if (typeof value !== "object" || value === null) { + return false; + } + return hasToStringTag ? tryDateObject(value) : toStr(value) === dateClass; + }; + } +}); + +// ../../node_modules/.pnpm/is-regex@1.2.1/node_modules/is-regex/index.js +var require_is_regex = __commonJS({ + "../../node_modules/.pnpm/is-regex@1.2.1/node_modules/is-regex/index.js"(exports2, module2) { + "use strict"; + var callBound = require_call_bound(); + var hasToStringTag = require_shams2()(); + var hasOwn = require_hasown(); + var gOPD = require_gopd(); + var fn; + if (hasToStringTag) { + $exec = callBound("RegExp.prototype.exec"); + isRegexMarker = {}; + throwRegexMarker = function() { + throw isRegexMarker; + }; + badStringifier = { + toString: throwRegexMarker, + valueOf: throwRegexMarker + }; + if (typeof Symbol.toPrimitive === "symbol") { + badStringifier[Symbol.toPrimitive] = throwRegexMarker; + } + fn = function isRegex(value) { + if (!value || typeof value !== "object") { + return false; + } + var descriptor = ( + /** @type {NonNullable} */ + gOPD( + /** @type {{ lastIndex?: unknown }} */ + value, + "lastIndex" + ) + ); + var hasLastIndexDataProperty = descriptor && hasOwn(descriptor, "value"); + if (!hasLastIndexDataProperty) { + return false; + } + try { + $exec( + value, + /** @type {string} */ + /** @type {unknown} */ + badStringifier + ); + } catch (e) { + return e === isRegexMarker; + } + }; + } else { + $toString = callBound("Object.prototype.toString"); + regexClass = "[object RegExp]"; + fn = function isRegex(value) { + if (!value || typeof value !== "object" && typeof value !== "function") { + return false; + } + return $toString(value) === regexClass; + }; + } + var $exec; + var isRegexMarker; + var throwRegexMarker; + var badStringifier; + var $toString; + var regexClass; + module2.exports = fn; + } +}); + +// ../../node_modules/.pnpm/safe-regex-test@1.1.0/node_modules/safe-regex-test/index.js +var require_safe_regex_test = __commonJS({ + "../../node_modules/.pnpm/safe-regex-test@1.1.0/node_modules/safe-regex-test/index.js"(exports2, module2) { + "use strict"; + var callBound = require_call_bound(); + var isRegex = require_is_regex(); + var $exec = callBound("RegExp.prototype.exec"); + var $TypeError = require_type(); + module2.exports = function regexTester(regex) { + if (!isRegex(regex)) { + throw new $TypeError("`regex` must be a RegExp"); + } + return function test(s) { + return $exec(regex, s) !== null; + }; + }; + } +}); + +// ../../node_modules/.pnpm/is-symbol@1.1.1/node_modules/is-symbol/index.js +var require_is_symbol = __commonJS({ + "../../node_modules/.pnpm/is-symbol@1.1.1/node_modules/is-symbol/index.js"(exports2, module2) { + "use strict"; + var callBound = require_call_bound(); + var $toString = callBound("Object.prototype.toString"); + var hasSymbols = require_has_symbols()(); + var safeRegexTest = require_safe_regex_test(); + if (hasSymbols) { + $symToStr = callBound("Symbol.prototype.toString"); + isSymString = safeRegexTest(/^Symbol\(.*\)$/); + isSymbolObject = function isRealSymbolObject(value) { + if (typeof value.valueOf() !== "symbol") { + return false; + } + return isSymString($symToStr(value)); + }; + module2.exports = function isSymbol(value) { + if (typeof value === "symbol") { + return true; + } + if (!value || typeof value !== "object" || $toString(value) !== "[object Symbol]") { + return false; + } + try { + return isSymbolObject(value); + } catch (e) { + return false; + } + }; + } else { + module2.exports = function isSymbol(value) { + return false; + }; + } + var $symToStr; + var isSymString; + var isSymbolObject; + } +}); + +// ../../node_modules/.pnpm/es-to-primitive@1.3.4/node_modules/es-to-primitive/helpers/isPrimitive.js +var require_isPrimitive = __commonJS({ + "../../node_modules/.pnpm/es-to-primitive@1.3.4/node_modules/es-to-primitive/helpers/isPrimitive.js"(exports2, module2) { + "use strict"; + module2.exports = function isPrimitive2(value) { + return value === null || typeof value !== "function" && typeof value !== "object"; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract-get@1.0.0/node_modules/es-abstract-get/isPropertyKey.js +var require_isPropertyKey2 = __commonJS({ + "../../node_modules/.pnpm/es-abstract-get@1.0.0/node_modules/es-abstract-get/isPropertyKey.js"(exports2, module2) { + "use strict"; + module2.exports = function isPropertyKey(argument) { + return typeof argument === "string" || typeof argument === "symbol"; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract-get@1.0.0/node_modules/es-abstract-get/GetV.js +var require_GetV = __commonJS({ + "../../node_modules/.pnpm/es-abstract-get@1.0.0/node_modules/es-abstract-get/GetV.js"(exports2, module2) { + "use strict"; + var $TypeError = require_type(); + var inspect = require_object_inspect(); + var isPropertyKey = require_isPropertyKey2(); + module2.exports = function GetV(V, P) { + if (!isPropertyKey(P)) { + throw new $TypeError("Assertion failed: P is not a Property Key, got " + inspect(P)); + } + return ( + /** @type {Record} */ + V[P] + ); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract-get@1.0.0/node_modules/es-abstract-get/GetMethod.js +var require_GetMethod = __commonJS({ + "../../node_modules/.pnpm/es-abstract-get@1.0.0/node_modules/es-abstract-get/GetMethod.js"(exports2, module2) { + "use strict"; + var $TypeError = require_type(); + var isCallable = require_is_callable(); + var inspect = require_object_inspect(); + var GetV = require_GetV(); + var isPropertyKey = require_isPropertyKey2(); + module2.exports = function GetMethod(O, P) { + if (!isPropertyKey(P)) { + throw new $TypeError("Assertion failed: P is not a Property Key"); + } + var func = GetV(O, P); + if (func == null) { + return void 0; + } + if (!isCallable(func)) { + throw new $TypeError(inspect(P) + " is not a function: " + inspect(func)); + } + return func; + }; + } +}); + +// ../../node_modules/.pnpm/es-to-primitive@1.3.4/node_modules/es-to-primitive/es2015.js +var require_es2015 = __commonJS({ + "../../node_modules/.pnpm/es-to-primitive@1.3.4/node_modules/es-to-primitive/es2015.js"(exports2, module2) { + "use strict"; + var hasSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "symbol"; + var isCallable = require_is_callable(); + var isDate = require_is_date_object(); + var isSymbol = require_is_symbol(); + var $TypeError = require_type(); + var isPrimitive2 = require_isPrimitive(); + function OrdinaryToPrimitive(O, hint) { + if (typeof O === "undefined" || O === null) { + throw new $TypeError("Cannot call method on " + O); + } + if (typeof hint !== "string" || hint !== "number" && hint !== "string") { + throw new $TypeError('hint must be "string" or "number"'); + } + var methodNames = hint === "string" ? ["toString", "valueOf"] : ["valueOf", "toString"]; + var method, result, i; + for (i = 0; i < methodNames.length; ++i) { + method = O[methodNames[i]]; + if (isCallable(method)) { + result = method.call(O); + if (isPrimitive2(result)) { + return ( + /** @type {primitiveES6} */ + result + ); + } + } + } + throw new $TypeError("No default value"); + } + var GetMethod = require_GetMethod(); + module2.exports = function ToPrimitive(input) { + if (isPrimitive2(input)) { + return ( + /** @type {primitiveES6} */ + input + ); + } + var hint = "default"; + if (arguments.length > 1) { + if (arguments[1] === String) { + hint = "string"; + } else if (arguments[1] === Number) { + hint = "number"; + } + } + var exoticToPrim; + if (hasSymbols) { + if (Symbol.toPrimitive) { + exoticToPrim = GetMethod( + /** @type {{ [k in SymbolConstructor['toPrimitive']]?: Function }} */ + input, + Symbol.toPrimitive + ); + } else if (isSymbol(input)) { + exoticToPrim = Symbol.prototype.valueOf; + } + } + if (typeof exoticToPrim !== "undefined") { + var result = exoticToPrim.call(input, hint); + if (isPrimitive2(result)) { + return ( + /** @type {primitiveES6} */ + result + ); + } + throw new $TypeError("unable to convert exotic object to primitive"); + } + if (hint === "default" && (isDate(input) || isSymbol(input))) { + hint = /** @type {const} */ + "string"; + } + return OrdinaryToPrimitive(input, hint === "default" ? "number" : hint); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ToPrimitive.js +var require_ToPrimitive = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ToPrimitive.js"(exports2, module2) { + "use strict"; + var toPrimitive = require_es2015(); + module2.exports = function ToPrimitive(input) { + if (arguments.length > 1) { + return toPrimitive(input, arguments[1]); + } + return toPrimitive(input); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ToBigInt.js +var require_ToBigInt = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ToBigInt.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $BigInt = GetIntrinsic("%BigInt%", true); + var $Number = GetIntrinsic("%Number%"); + var $TypeError = require_type(); + var $SyntaxError = require_syntax(); + var StringToBigInt = require_StringToBigInt(); + var ToPrimitive = require_ToPrimitive(); + module2.exports = function ToBigInt(argument) { + if (!$BigInt) { + throw new $SyntaxError("BigInts are not supported in this environment"); + } + var prim = ToPrimitive(argument, $Number); + if (prim == null) { + throw new $TypeError("Cannot convert null or undefined to a BigInt"); + } + if (typeof prim === "boolean") { + return prim ? $BigInt(1) : $BigInt(0); + } + if (typeof prim === "number") { + throw new $TypeError("Cannot convert a Number value to a BigInt"); + } + if (typeof prim === "string") { + var n = StringToBigInt(prim); + if (typeof n === "undefined") { + throw new $TypeError("Failed to parse String to BigInt"); + } + return n; + } + if (typeof prim === "symbol") { + throw new $TypeError("Cannot convert a Symbol value to a BigInt"); + } + if (typeof prim !== "bigint") { + throw new $SyntaxError("Assertion failed: unknown primitive type"); + } + return prim; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/BigInt/remainder.js +var require_remainder = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/BigInt/remainder.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $BigInt = GetIntrinsic("%BigInt%", true); + var $RangeError = require_range2(); + var $TypeError = require_type(); + var zero = $BigInt && $BigInt(0); + module2.exports = function BigIntRemainder(n, d) { + if (typeof n !== "bigint" || typeof d !== "bigint") { + throw new $TypeError("Assertion failed: `n` and `d` arguments must be BigInts"); + } + if (d === zero) { + throw new $RangeError("Division by zero"); + } + if (n === zero) { + return zero; + } + return n % d; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/modBigInt.js +var require_modBigInt = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/modBigInt.js"(exports2, module2) { + "use strict"; + module2.exports = function bigIntMod(BigIntRemainder, bigint, modulo) { + var remain = BigIntRemainder(bigint, modulo); + return remain >= 0 ? remain : remain + modulo; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ToBigInt64.js +var require_ToBigInt64 = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ToBigInt64.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $BigInt = GetIntrinsic("%BigInt%", true); + var $pow = require_pow(); + var ToBigInt = require_ToBigInt(); + var BigIntRemainder = require_remainder(); + var modBigInt = require_modBigInt(); + var twoSixtyThree = $BigInt && BigInt($pow(2, 32)) * BigInt($pow(2, 31)); + var twoSixtyFour = $BigInt && BigInt($pow(2, 32)) * BigInt($pow(2, 32)); + module2.exports = function ToBigInt64(argument) { + var n = ToBigInt(argument); + var int64bit = modBigInt(BigIntRemainder, n, twoSixtyFour); + return int64bit >= twoSixtyThree ? int64bit - twoSixtyFour : int64bit; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ToBigUint64.js +var require_ToBigUint64 = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ToBigUint64.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $BigInt = GetIntrinsic("%BigInt%", true); + var $pow = require_pow(); + var ToBigInt = require_ToBigInt(); + var BigIntRemainder = require_remainder(); + var modBigInt = require_modBigInt(); + var twoSixtyFour = $BigInt && BigInt($pow(2, 32)) * BigInt($pow(2, 32)); + module2.exports = function ToBigUint64(argument) { + var n = ToBigInt(argument); + var int64bit = modBigInt(BigIntRemainder, n, twoSixtyFour); + return int64bit; + }; + } +}); + +// ../../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/mod.js +var require_mod = __commonJS({ + "../../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/mod.js"(exports2, module2) { + "use strict"; + var $floor = require_floor(); + module2.exports = function mod(number, modulo) { + var remain = number % modulo; + return $floor(remain >= 0 ? remain : remain + modulo); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/mod.js +var require_mod2 = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/mod.js"(exports2, module2) { + "use strict"; + module2.exports = require_mod(); + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/modulo.js +var require_modulo = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/modulo.js"(exports2, module2) { + "use strict"; + var mod = require_mod2(); + module2.exports = function modulo(x, y) { + return mod(x, y); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/isPrimitive.js +var require_isPrimitive2 = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/isPrimitive.js"(exports2, module2) { + "use strict"; + module2.exports = function isPrimitive2(value) { + return value === null || typeof value !== "function" && typeof value !== "object"; + }; + } +}); + +// ../../node_modules/.pnpm/es-object-atoms@1.1.2/node_modules/es-object-atoms/RequireObjectCoercible.js +var require_RequireObjectCoercible = __commonJS({ + "../../node_modules/.pnpm/es-object-atoms@1.1.2/node_modules/es-object-atoms/RequireObjectCoercible.js"(exports2, module2) { + "use strict"; + var $TypeError = require_type(); + module2.exports = function RequireObjectCoercible(value) { + if (value == null) { + throw new $TypeError(arguments.length > 0 && arguments[1] || "Cannot call method on " + value); + } + return value; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ToString.js +var require_ToString = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ToString.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $String = GetIntrinsic("%String%"); + var $TypeError = require_type(); + module2.exports = function ToString(argument) { + if (typeof argument === "symbol") { + throw new $TypeError("Cannot convert a Symbol value to a string"); + } + return $String(argument); + }; + } +}); + +// ../../node_modules/.pnpm/string.prototype.trim@1.2.11/node_modules/string.prototype.trim/implementation.js +var require_implementation3 = __commonJS({ + "../../node_modules/.pnpm/string.prototype.trim@1.2.11/node_modules/string.prototype.trim/implementation.js"(exports2, module2) { + "use strict"; + var RequireObjectCoercible = require_RequireObjectCoercible(); + var ToString = require_ToString(); + var callBound = require_call_bound(); + var safeRegexTester = require_safe_regex_test(); + var $replace = callBound("String.prototype.replace"); + var $charAt = callBound("String.prototype.charAt"); + var $slice = callBound("String.prototype.slice"); + var mvsIsWS = /^\s$/.test("\u180E"); + var leftWhitespace = mvsIsWS ? /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/ : /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/; + var isWhitespace = safeRegexTester(mvsIsWS ? /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]$/ : /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]$/); + module2.exports = function trim() { + var S = $replace(ToString(RequireObjectCoercible(this)), leftWhitespace, ""); + var end = S.length; + while (end > 0 && isWhitespace($charAt(S, end - 1))) { + end -= 1; + } + return $slice(S, 0, end); + }; + } +}); + +// ../../node_modules/.pnpm/string.prototype.trim@1.2.11/node_modules/string.prototype.trim/polyfill.js +var require_polyfill = __commonJS({ + "../../node_modules/.pnpm/string.prototype.trim@1.2.11/node_modules/string.prototype.trim/polyfill.js"(exports2, module2) { + "use strict"; + var implementation = require_implementation3(); + var zeroWidthSpace = "\u200B"; + var mongolianVowelSeparator = "\u180E"; + module2.exports = function getPolyfill() { + if (String.prototype.trim && zeroWidthSpace.trim() === zeroWidthSpace && mongolianVowelSeparator.trim() === mongolianVowelSeparator && ("_" + mongolianVowelSeparator).trim() === "_" + mongolianVowelSeparator && (mongolianVowelSeparator + "_").trim() === mongolianVowelSeparator + "_") { + return String.prototype.trim; + } + return implementation; + }; + } +}); + +// ../../node_modules/.pnpm/string.prototype.trim@1.2.11/node_modules/string.prototype.trim/shim.js +var require_shim = __commonJS({ + "../../node_modules/.pnpm/string.prototype.trim@1.2.11/node_modules/string.prototype.trim/shim.js"(exports2, module2) { + "use strict"; + var supportsDescriptors = require_has_property_descriptors()(); + var defineDataProperty = require_define_data_property(); + var getPolyfill = require_polyfill(); + module2.exports = function shimStringTrim() { + var polyfill = getPolyfill(); + if (String.prototype.trim !== polyfill) { + if (supportsDescriptors) { + defineDataProperty(String.prototype, "trim", polyfill, true); + } else { + defineDataProperty(String.prototype, "trim", polyfill); + } + } + return polyfill; + }; + } +}); + +// ../../node_modules/.pnpm/string.prototype.trim@1.2.11/node_modules/string.prototype.trim/index.js +var require_string_prototype = __commonJS({ + "../../node_modules/.pnpm/string.prototype.trim@1.2.11/node_modules/string.prototype.trim/index.js"(exports2, module2) { + "use strict"; + var callBind = require_call_bind(); + var define2 = require_define_properties(); + var RequireObjectCoercible = require_RequireObjectCoercible(); + var implementation = require_implementation3(); + var getPolyfill = require_polyfill(); + var shim = require_shim(); + var bound = callBind(getPolyfill()); + var boundMethod = function trim(receiver) { + RequireObjectCoercible(receiver); + return bound(receiver); + }; + define2(boundMethod, { + getPolyfill, + implementation, + shim + }); + module2.exports = boundMethod; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/StringToNumber.js +var require_StringToNumber = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/StringToNumber.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $RegExp = GetIntrinsic("%RegExp%"); + var $TypeError = require_type(); + var $parseInteger = GetIntrinsic("%parseInt%"); + var callBound = require_call_bound(); + var regexTester = require_safe_regex_test(); + var $strSlice = callBound("String.prototype.slice"); + var isBinary = regexTester(/^0b[01]+$/i); + var isOctal = regexTester(/^0o[0-7]+$/i); + var isInvalidHexLiteral = regexTester(/^[-+]0x[0-9a-f]+$/i); + var nonWS = ["\x85", "\u200B", "\uFFFE"].join(""); + var nonWSregex = new $RegExp("[" + nonWS + "]", "g"); + var hasNonWS = regexTester(nonWSregex); + var $trim = require_string_prototype(); + module2.exports = function StringToNumber(argument) { + if (typeof argument !== "string") { + throw new $TypeError("Assertion failed: `argument` is not a String"); + } + if (isBinary(argument)) { + return +$parseInteger($strSlice(argument, 2), 2); + } + if (isOctal(argument)) { + return +$parseInteger($strSlice(argument, 2), 8); + } + if (hasNonWS(argument) || isInvalidHexLiteral(argument)) { + return NaN; + } + var trimmed = $trim(argument); + if (trimmed !== argument) { + return StringToNumber(trimmed); + } + return +argument; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ToNumber.js +var require_ToNumber = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ToNumber.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $TypeError = require_type(); + var $Number = GetIntrinsic("%Number%"); + var isPrimitive2 = require_isPrimitive2(); + var ToPrimitive = require_ToPrimitive(); + var StringToNumber = require_StringToNumber(); + module2.exports = function ToNumber(argument) { + var value = isPrimitive2(argument) ? argument : ToPrimitive(argument, $Number); + if (typeof value === "symbol") { + throw new $TypeError("Cannot convert a Symbol value to a number"); + } + if (typeof value === "bigint") { + throw new $TypeError("Conversion from 'BigInt' to 'number' is not allowed."); + } + if (typeof value === "string") { + return StringToNumber(value); + } + return +value; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/floor.js +var require_floor2 = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/floor.js"(exports2, module2) { + "use strict"; + var $floor = require_floor(); + module2.exports = function floor(x) { + if (typeof x === "bigint") { + return x; + } + return $floor(x); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/truncate.js +var require_truncate2 = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/truncate.js"(exports2, module2) { + "use strict"; + var floor = require_floor2(); + var $TypeError = require_type(); + module2.exports = function truncate(x) { + if (typeof x !== "number" && typeof x !== "bigint") { + throw new $TypeError("argument must be a Number or a BigInt"); + } + var result = x < 0 ? -floor(-x) : floor(x); + return result === 0 ? 0 : result; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ToInt16.js +var require_ToInt16 = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ToInt16.js"(exports2, module2) { + "use strict"; + var modulo = require_modulo(); + var ToNumber = require_ToNumber(); + var truncate = require_truncate2(); + var isFinite2 = require_isFinite(); + var two16 = 65536; + module2.exports = function ToInt16(argument) { + var number = ToNumber(argument); + if (!isFinite2(number) || number === 0) { + return 0; + } + var int = truncate(number); + var int16bit = modulo(int, two16); + return int16bit >= 32768 ? int16bit - two16 : int16bit; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ToInt32.js +var require_ToInt32 = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ToInt32.js"(exports2, module2) { + "use strict"; + var modulo = require_modulo(); + var ToNumber = require_ToNumber(); + var truncate = require_truncate2(); + var isFinite2 = require_isFinite(); + var two31 = 2147483648; + var two32 = 4294967296; + module2.exports = function ToInt32(argument) { + var number = ToNumber(argument); + if (!isFinite2(number) || number === 0) { + return 0; + } + var int = truncate(number); + var int32bit = modulo(int, two32); + var result = int32bit >= two31 ? int32bit - two32 : int32bit; + return result === 0 ? 0 : result; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ToInt8.js +var require_ToInt8 = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ToInt8.js"(exports2, module2) { + "use strict"; + var modulo = require_modulo(); + var ToNumber = require_ToNumber(); + var truncate = require_truncate2(); + var isFinite2 = require_isFinite(); + module2.exports = function ToInt8(argument) { + var number = ToNumber(argument); + if (!isFinite2(number) || number === 0) { + return 0; + } + var int = truncate(number); + var int8bit = modulo(int, 256); + return int8bit >= 128 ? int8bit - 256 : int8bit; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ToUint16.js +var require_ToUint16 = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ToUint16.js"(exports2, module2) { + "use strict"; + var modulo = require_modulo(); + var ToNumber = require_ToNumber(); + var truncate = require_truncate2(); + var isFinite2 = require_isFinite(); + var two16 = 65536; + module2.exports = function ToUint16(argument) { + var number = ToNumber(argument); + if (!isFinite2(number) || number === 0) { + return 0; + } + var int = truncate(number); + var int16bit = modulo(int, two16); + return int16bit === 0 ? 0 : int16bit; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ToUint32.js +var require_ToUint32 = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ToUint32.js"(exports2, module2) { + "use strict"; + var modulo = require_modulo(); + var ToNumber = require_ToNumber(); + var truncate = require_truncate2(); + var isFinite2 = require_isFinite(); + var two32 = 4294967296; + module2.exports = function ToUint32(argument) { + var number = ToNumber(argument); + if (!isFinite2(number) || number === 0) { + return 0; + } + var int = truncate(number); + var int32bit = modulo(int, two32); + return int32bit === 0 ? 0 : int32bit; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ToUint8.js +var require_ToUint8 = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ToUint8.js"(exports2, module2) { + "use strict"; + var isFinite2 = require_isFinite(); + var modulo = require_modulo(); + var ToNumber = require_ToNumber(); + var truncate = require_truncate2(); + module2.exports = function ToUint8(argument) { + var number = ToNumber(argument); + if (!isFinite2(number) || number === 0) { + return 0; + } + var int = truncate(number); + var int8bit = modulo(int, 256); + return int8bit; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/clamp.js +var require_clamp = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/clamp.js"(exports2, module2) { + "use strict"; + var $TypeError = require_type(); + var max = require_max3(); + var min = require_min2(); + module2.exports = function clamp(x, lower, upper) { + if (typeof x !== "number" || typeof lower !== "number" || typeof upper !== "number" || !(lower <= upper)) { + throw new $TypeError("Assertion failed: all three arguments must be MVs, and `lower` must be `<= upper`"); + } + return min(max(lower, x), upper); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ToUint8Clamp.js +var require_ToUint8Clamp = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ToUint8Clamp.js"(exports2, module2) { + "use strict"; + var clamp = require_clamp(); + var ToNumber = require_ToNumber(); + var floor = require_floor2(); + var $isNaN = require_isNaN(); + module2.exports = function ToUint8Clamp(argument) { + var number = ToNumber(argument); + if ($isNaN(number)) { + return 0; + } + var clamped = clamp(number, 0, 255); + var f = floor(clamped); + if (clamped < f + 0.5) { + return f; + } + if (clamped > f + 0.5) { + return f + 1; + } + return f % 2 === 0 ? f : f + 1; + }; + } +}); + +// ../../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/isNegativeZero.js +var require_isNegativeZero = __commonJS({ + "../../node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/isNegativeZero.js"(exports2, module2) { + "use strict"; + module2.exports = function isNegativeZero(x) { + return x === 0 && 1 / x === 1 / -0; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/valueToFloat16Bytes.js +var require_valueToFloat16Bytes = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/valueToFloat16Bytes.js"(exports2, module2) { + "use strict"; + var $abs = require_abs(); + var $floor = require_floor(); + var $pow = require_pow(); + var isFinite2 = require_isFinite(); + var isNaN2 = require_isNaN(); + var isNegativeZero = require_isNegativeZero(); + var maxFiniteFloat16 = 65504; + module2.exports = function valueToFloat16Bytes(value, isLittleEndian) { + if (isNaN2(value)) { + return isLittleEndian ? [0, 126] : [126, 0]; + } + var leastSig; + if (value === 0) { + leastSig = isNegativeZero(value) ? 128 : 0; + return isLittleEndian ? [0, leastSig] : [leastSig, 0]; + } + if ($abs(value) > maxFiniteFloat16 || !isFinite2(value)) { + leastSig = value < 0 ? 252 : 124; + return isLittleEndian ? [0, leastSig] : [leastSig, 0]; + } + var sign = value < 0 ? 1 : 0; + value = $abs(value); + var exponent = 0; + while (value >= 2) { + exponent += 1; + value /= 2; + } + while (value < 1) { + exponent -= 1; + value *= 2; + } + var mantissa = value - 1; + mantissa *= $pow(2, 10) + 0.5; + mantissa = $floor(mantissa); + exponent += 15; + exponent <<= 10; + var result = sign << 15 | exponent | mantissa; + var byte0 = result & 255; + result >>= 8; + var byte1 = result & 255; + return isLittleEndian ? [byte0, byte1] : [byte1, byte0]; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/valueToFloat32Bytes.js +var require_valueToFloat32Bytes = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/valueToFloat32Bytes.js"(exports2, module2) { + "use strict"; + var $abs = require_abs(); + var $floor = require_floor(); + var $pow = require_pow(); + var isFinite2 = require_isFinite(); + var isNaN2 = require_isNaN(); + var isNegativeZero = require_isNegativeZero(); + var maxFiniteFloat32 = 34028234663852886e22; + module2.exports = function valueToFloat32Bytes(value, isLittleEndian) { + if (isNaN2(value)) { + return isLittleEndian ? [0, 0, 192, 127] : [127, 192, 0, 0]; + } + var leastSig; + if (value === 0) { + leastSig = isNegativeZero(value) ? 128 : 0; + return isLittleEndian ? [0, 0, 0, leastSig] : [leastSig, 0, 0, 0]; + } + if ($abs(value) > maxFiniteFloat32 || !isFinite2(value)) { + leastSig = value < 0 ? 255 : 127; + return isLittleEndian ? [0, 0, 128, leastSig] : [leastSig, 128, 0, 0]; + } + var sign = value < 0 ? 1 : 0; + value = $abs(value); + var exponent = 0; + while (value >= 2) { + exponent += 1; + value /= 2; + } + while (value < 1) { + exponent -= 1; + value *= 2; + } + var mantissa = value - 1; + mantissa *= $pow(2, 23) + 0.5; + mantissa = $floor(mantissa); + exponent += 127; + exponent <<= 23; + var result = sign << 31 | exponent | mantissa; + var byte0 = result & 255; + result >>= 8; + var byte1 = result & 255; + result >>= 8; + var byte2 = result & 255; + result >>= 8; + var byte3 = result & 255; + if (isLittleEndian) { + return [byte0, byte1, byte2, byte3]; + } + return [byte3, byte2, byte1, byte0]; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/fractionToBinaryString.js +var require_fractionToBinaryString = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/fractionToBinaryString.js"(exports2, module2) { + "use strict"; + var MAX_ITER = 1075; + var maxBits = 54; + module2.exports = function fractionToBitString(x) { + var str = ""; + if (x === 0) { + return str; + } + var j = MAX_ITER; + var y; + for (var i = 0; i < MAX_ITER; i += 1) { + y = x * 2; + if (y >= 1) { + x = y - 1; + str += "1"; + if (j === MAX_ITER) { + j = i; + } + } else { + x = y; + str += "0"; + } + if (y === 1 || i - j > maxBits) { + return str; + } + } + return str; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/intToBinaryString.js +var require_intToBinaryString = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/intToBinaryString.js"(exports2, module2) { + "use strict"; + var $floor = require_floor(); + module2.exports = function intToBinaryString(x) { + var str = ""; + var y; + while (x > 0) { + y = x / 2; + x = $floor(y); + if (y === x) { + str = "0" + str; + } else { + str = "1" + str; + } + } + return str; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/isNaN.js +var require_isNaN2 = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/isNaN.js"(exports2, module2) { + "use strict"; + module2.exports = Number.isNaN || function isNaN2(a) { + return a !== a; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/valueToFloat64Bytes.js +var require_valueToFloat64Bytes = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/valueToFloat64Bytes.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $parseInt = GetIntrinsic("%parseInt%"); + var $abs = require_abs(); + var $floor = require_floor(); + var isFinite2 = require_isFinite(); + var isNegativeZero = require_isNegativeZero(); + var callBound = require_call_bound(); + var $strIndexOf = callBound("String.prototype.indexOf"); + var $strSlice = callBound("String.prototype.slice"); + var fractionToBitString = require_fractionToBinaryString(); + var intToBinString = require_intToBinaryString(); + var isNaN2 = require_isNaN2(); + var float64bias = 1023; + var elevenOnes = "11111111111"; + var elevenZeroes = "00000000000"; + var fiftyOneZeroes = elevenZeroes + elevenZeroes + elevenZeroes + elevenZeroes + "0000000"; + module2.exports = function valueToFloat64Bytes(value, isLittleEndian) { + var signBit = value < 0 || isNegativeZero(value) ? "1" : "0"; + var exponentBits; + var significandBits; + if (isNaN2(value)) { + exponentBits = elevenOnes; + significandBits = "1" + fiftyOneZeroes; + } else if (!isFinite2(value)) { + exponentBits = elevenOnes; + significandBits = "0" + fiftyOneZeroes; + } else if (value === 0) { + exponentBits = elevenZeroes; + significandBits = "0" + fiftyOneZeroes; + } else { + value = $abs(value); + var integerPart = $floor(value); + var intBinString = intToBinString(integerPart); + var fracBinString = fractionToBitString(value - integerPart); + var numberOfBits; + if (intBinString) { + exponentBits = intBinString.length - 1; + } else { + var first1 = $strIndexOf(fracBinString, "1"); + if (first1 > -1) { + numberOfBits = first1 + 1; + } + exponentBits = -numberOfBits; + } + significandBits = intBinString + fracBinString; + if (exponentBits < 0) { + if (exponentBits <= -float64bias) { + numberOfBits = float64bias - 1; + } + significandBits = $strSlice(significandBits, numberOfBits); + } else { + significandBits = $strSlice(significandBits, 1); + } + exponentBits = $strSlice(elevenZeroes + intToBinString(exponentBits + float64bias), -11); + significandBits = $strSlice(significandBits + fiftyOneZeroes + "0", 0, 52); + } + var bits = signBit + exponentBits + significandBits; + var rawBytes = []; + for (var i = 0; i < 8; i++) { + var targetIndex = isLittleEndian ? 8 - i - 1 : i; + rawBytes[targetIndex] = $parseInt($strSlice(bits, i * 8, (i + 1) * 8), 2); + } + return rawBytes; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/integerToNBytes.js +var require_integerToNBytes = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/integerToNBytes.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $Number = GetIntrinsic("%Number%"); + var $BigInt = GetIntrinsic("%BigInt%", true); + module2.exports = function integerToNBytes(intValue, n, isLittleEndian) { + var Z = typeof intValue === "bigint" ? $BigInt : $Number; + if (intValue < 0) { + intValue >>>= 0; + } + var rawBytes = []; + for (var i = 0; i < n; i++) { + rawBytes[isLittleEndian ? i : n - 1 - i] = $Number(intValue & Z(255)); + intValue >>= Z(8); + } + return rawBytes; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/NumericToRawBytes.js +var require_NumericToRawBytes = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/NumericToRawBytes.js"(exports2, module2) { + "use strict"; + var $TypeError = require_type(); + var hasOwnProperty = require_HasOwnProperty(); + var ToBigInt64 = require_ToBigInt64(); + var ToBigUint64 = require_ToBigUint64(); + var ToInt16 = require_ToInt16(); + var ToInt32 = require_ToInt32(); + var ToInt8 = require_ToInt8(); + var ToUint16 = require_ToUint16(); + var ToUint32 = require_ToUint32(); + var ToUint8 = require_ToUint8(); + var ToUint8Clamp = require_ToUint8Clamp(); + var valueToFloat16Bytes = require_valueToFloat16Bytes(); + var valueToFloat32Bytes = require_valueToFloat32Bytes(); + var valueToFloat64Bytes = require_valueToFloat64Bytes(); + var integerToNBytes = require_integerToNBytes(); + var tableTAO = require_typed_array_objects(); + var TypeToAO = { + __proto__: null, + $INT8: ToInt8, + $UINT8: ToUint8, + $UINT8C: ToUint8Clamp, + $INT16: ToInt16, + $UINT16: ToUint16, + $INT32: ToInt32, + $UINT32: ToUint32, + $BIGINT64: ToBigInt64, + $BIGUINT64: ToBigUint64 + }; + module2.exports = function NumericToRawBytes(type, value, isLittleEndian) { + if (typeof type !== "string" || !hasOwnProperty(tableTAO.size, "$" + type)) { + throw new $TypeError("Assertion failed: `type` must be a TypedArray element type"); + } + if (typeof value !== "number" && typeof value !== "bigint") { + throw new $TypeError("Assertion failed: `value` must be a Number or a BigInt"); + } + if (typeof isLittleEndian !== "boolean") { + throw new $TypeError("Assertion failed: `isLittleEndian` must be a Boolean"); + } + if (type === "FLOAT16") { + return valueToFloat16Bytes(value, isLittleEndian); + } else if (type === "FLOAT32") { + return valueToFloat32Bytes(value, isLittleEndian); + } else if (type === "FLOAT64") { + return valueToFloat64Bytes(value, isLittleEndian); + } + var n = tableTAO.size["$" + type]; + var convOp = TypeToAO["$" + type]; + var intValue = convOp(value); + return integerToNBytes(intValue, n, isLittleEndian); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/forEach.js +var require_forEach = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/forEach.js"(exports2, module2) { + "use strict"; + module2.exports = function forEach(array, callback) { + for (var i = 0; i < array.length; i += 1) { + callback(array[i], i, array); + } + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/SetValueInBuffer.js +var require_SetValueInBuffer = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/SetValueInBuffer.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $SyntaxError = require_syntax(); + var $TypeError = require_type(); + var isInteger = require_isInteger(); + var $Uint8Array = GetIntrinsic("%Uint8Array%", true); + var IsBigIntElementType = require_IsBigIntElementType(); + var IsDetachedBuffer = require_IsDetachedBuffer(); + var NumericToRawBytes = require_NumericToRawBytes(); + var isArrayBuffer = require_is_array_buffer(); + var isSharedArrayBuffer = require_is_shared_array_buffer(); + var hasOwn = require_hasown(); + var tableTAO = require_typed_array_objects(); + var defaultEndianness = require_defaultEndianness(); + var forEach = require_forEach(); + module2.exports = function SetValueInBuffer(arrayBuffer, byteIndex, type, value, isTypedArray, order) { + var isSAB = isSharedArrayBuffer(arrayBuffer); + if (!isArrayBuffer(arrayBuffer) && !isSAB) { + throw new $TypeError("Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer"); + } + if (!isInteger(byteIndex) || byteIndex < 0) { + throw new $TypeError("Assertion failed: `byteIndex` must be a non-negative integer"); + } + if (typeof type !== "string" || !hasOwn(tableTAO.size, "$" + type)) { + throw new $TypeError("Assertion failed: `type` must be one of " + tableTAO.choices); + } + if (typeof value !== "number" && typeof value !== "bigint") { + throw new $TypeError("Assertion failed: `value` must be a Number or a BigInt"); + } + if (typeof isTypedArray !== "boolean") { + throw new $TypeError("Assertion failed: `isTypedArray` must be a boolean"); + } + if (order !== "SEQ-CST" && order !== "UNORDERED" && order !== "INIT") { + throw new $TypeError('Assertion failed: `order` must be `"SEQ-CST"`, `"UNORDERED"`, or `"INIT"`'); + } + if (arguments.length > 6 && typeof arguments[6] !== "boolean") { + throw new $TypeError("Assertion failed: `isLittleEndian` must be a boolean, if present"); + } + if (IsDetachedBuffer(arrayBuffer)) { + throw new $TypeError("Assertion failed: ArrayBuffer is detached"); + } + if (IsBigIntElementType(type) ? typeof value !== "bigint" : typeof value !== "number") { + throw new $TypeError("Assertion failed: `value` must be a BigInt if type is ~BIGINT64~ or ~BIGUINT64~, otherwise a Number"); + } + var elementSize = tableTAO.size["$" + type]; + var isLittleEndian = arguments.length > 6 ? arguments[6] : defaultEndianness === "little"; + var rawBytes = NumericToRawBytes(type, value, isLittleEndian); + if (isSAB) { + throw new $SyntaxError("SharedArrayBuffer is not supported by this implementation"); + } else { + var arr = new $Uint8Array(arrayBuffer, byteIndex, elementSize); + forEach(rawBytes, function(rawByte, i) { + arr[i] = rawByte; + }); + } + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ToIntegerOrInfinity.js +var require_ToIntegerOrInfinity = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ToIntegerOrInfinity.js"(exports2, module2) { + "use strict"; + var ToNumber = require_ToNumber(); + var truncate = require_truncate2(); + var $isNaN = require_isNaN(); + var $isFinite = require_isFinite(); + module2.exports = function ToIntegerOrInfinity(value) { + var number = ToNumber(value); + if ($isNaN(number) || number === 0) { + return 0; + } + if (!$isFinite(number)) { + return number; + } + return truncate(number); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/TypedArrayElementSize.js +var require_TypedArrayElementSize = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/TypedArrayElementSize.js"(exports2, module2) { + "use strict"; + var $SyntaxError = require_syntax(); + var $TypeError = require_type(); + var isInteger = require_isInteger(); + var whichTypedArray = require_which_typed_array(); + var tableTAO = require_typed_array_objects(); + module2.exports = function TypedArrayElementSize(O) { + var type = whichTypedArray(O); + if (!type) { + throw new $TypeError("Assertion failed: `O` must be a TypedArray"); + } + var size = tableTAO.size["$" + tableTAO.name["$" + type]]; + if (!isInteger(size) || size < 0) { + throw new $SyntaxError("Assertion failed: Unknown TypedArray type `" + type + "`"); + } + return size; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/TypedArrayElementType.js +var require_TypedArrayElementType = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/TypedArrayElementType.js"(exports2, module2) { + "use strict"; + var $SyntaxError = require_syntax(); + var $TypeError = require_type(); + var whichTypedArray = require_which_typed_array(); + var tableTAO = require_typed_array_objects(); + module2.exports = function TypedArrayElementType(O) { + var type = whichTypedArray(O); + if (!type) { + throw new $TypeError("Assertion failed: `O` must be a TypedArray"); + } + var result = tableTAO.name["$" + type]; + if (typeof result !== "string") { + throw new $SyntaxError("Assertion failed: Unknown TypedArray type `" + type + "`"); + } + return result; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/GetIntrinsic.js +var require_GetIntrinsic = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/GetIntrinsic.js"(exports2, module2) { + "use strict"; + module2.exports = require_get_intrinsic(); + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/records/property-descriptor.js +var require_property_descriptor = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/records/property-descriptor.js"(exports2, module2) { + "use strict"; + var $TypeError = require_type(); + var hasOwn = require_hasown(); + var allowed = { + __proto__: null, + "[[Configurable]]": true, + "[[Enumerable]]": true, + "[[Get]]": true, + "[[Set]]": true, + "[[Value]]": true, + "[[Writable]]": true + }; + module2.exports = function isPropertyDescriptor(Desc) { + if (!Desc || typeof Desc !== "object") { + return false; + } + for (var key in Desc) { + if (hasOwn(Desc, key) && !allowed[key]) { + return false; + } + } + var isData = hasOwn(Desc, "[[Value]]") || hasOwn(Desc, "[[Writable]]"); + var IsAccessor = hasOwn(Desc, "[[Get]]") || hasOwn(Desc, "[[Set]]"); + if (isData && IsAccessor) { + throw new $TypeError("Property Descriptors may not be both accessor and data descriptors"); + } + return true; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/DefineOwnProperty.js +var require_DefineOwnProperty = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/DefineOwnProperty.js"(exports2, module2) { + "use strict"; + var hasPropertyDescriptors = require_has_property_descriptors(); + var $defineProperty = require_es_define_property(); + var hasArrayLengthDefineBug = hasPropertyDescriptors.hasArrayLengthDefineBug(); + var isArray = hasArrayLengthDefineBug && require_IsArray2(); + var callBound = require_call_bound(); + var $isEnumerable = callBound("Object.prototype.propertyIsEnumerable"); + module2.exports = function DefineOwnProperty(IsDataDescriptor, SameValue, FromPropertyDescriptor, O, P, desc) { + if (!$defineProperty) { + if (!IsDataDescriptor(desc)) { + return false; + } + if (!desc["[[Configurable]]"] || !desc["[[Writable]]"]) { + return false; + } + if (P in O && $isEnumerable(O, P) !== !!desc["[[Enumerable]]"]) { + return false; + } + var V = desc["[[Value]]"]; + O[P] = V; + return SameValue(O[P], V); + } + if (hasArrayLengthDefineBug && P === "length" && "[[Value]]" in desc && isArray(O) && O.length !== desc["[[Value]]"]) { + O.length = desc["[[Value]]"]; + return O.length === desc["[[Value]]"]; + } + $defineProperty(O, P, FromPropertyDescriptor(desc)); + return true; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js +var require_fromPropertyDescriptor = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/fromPropertyDescriptor.js"(exports2, module2) { + "use strict"; + module2.exports = function fromPropertyDescriptor(Desc) { + if (typeof Desc === "undefined") { + return Desc; + } + var obj2 = {}; + if ("[[Value]]" in Desc) { + obj2.value = Desc["[[Value]]"]; + } + if ("[[Writable]]" in Desc) { + obj2.writable = !!Desc["[[Writable]]"]; + } + if ("[[Get]]" in Desc) { + obj2.get = Desc["[[Get]]"]; + } + if ("[[Set]]" in Desc) { + obj2.set = Desc["[[Set]]"]; + } + if ("[[Enumerable]]" in Desc) { + obj2.enumerable = !!Desc["[[Enumerable]]"]; + } + if ("[[Configurable]]" in Desc) { + obj2.configurable = !!Desc["[[Configurable]]"]; + } + return obj2; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/FromPropertyDescriptor.js +var require_FromPropertyDescriptor = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/FromPropertyDescriptor.js"(exports2, module2) { + "use strict"; + var $TypeError = require_type(); + var isPropertyDescriptor = require_property_descriptor(); + var fromPropertyDescriptor = require_fromPropertyDescriptor(); + module2.exports = function FromPropertyDescriptor(Desc) { + if (typeof Desc !== "undefined" && !isPropertyDescriptor(Desc)) { + throw new $TypeError("Assertion failed: `Desc` must be a Property Descriptor"); + } + return fromPropertyDescriptor(Desc); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/IsDataDescriptor.js +var require_IsDataDescriptor = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/IsDataDescriptor.js"(exports2, module2) { + "use strict"; + var $TypeError = require_type(); + var hasOwn = require_hasown(); + var isPropertyDescriptor = require_property_descriptor(); + module2.exports = function IsDataDescriptor(Desc) { + if (typeof Desc === "undefined") { + return false; + } + if (!isPropertyDescriptor(Desc)) { + throw new $TypeError("Assertion failed: `Desc` must be a Property Descriptor"); + } + if (!hasOwn(Desc, "[[Value]]") && !hasOwn(Desc, "[[Writable]]")) { + return false; + } + return true; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/IsCallable.js +var require_IsCallable = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/IsCallable.js"(exports2, module2) { + "use strict"; + module2.exports = require_is_callable(); + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ToBoolean.js +var require_ToBoolean = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ToBoolean.js"(exports2, module2) { + "use strict"; + module2.exports = function ToBoolean(value) { + return !!value; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ToPropertyDescriptor.js +var require_ToPropertyDescriptor = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ToPropertyDescriptor.js"(exports2, module2) { + "use strict"; + var hasOwn = require_hasown(); + var $TypeError = require_type(); + var isObject2 = require_isObject2(); + var IsCallable = require_IsCallable(); + var ToBoolean = require_ToBoolean(); + module2.exports = function ToPropertyDescriptor(Obj) { + if (!isObject2(Obj)) { + throw new $TypeError("ToPropertyDescriptor requires an object"); + } + var desc = {}; + if (hasOwn(Obj, "enumerable")) { + desc["[[Enumerable]]"] = ToBoolean(Obj.enumerable); + } + if (hasOwn(Obj, "configurable")) { + desc["[[Configurable]]"] = ToBoolean(Obj.configurable); + } + if (hasOwn(Obj, "value")) { + desc["[[Value]]"] = Obj.value; + } + if (hasOwn(Obj, "writable")) { + desc["[[Writable]]"] = ToBoolean(Obj.writable); + } + if (hasOwn(Obj, "get")) { + var getter = Obj.get; + if (typeof getter !== "undefined" && !IsCallable(getter)) { + throw new $TypeError("getter must be a function"); + } + desc["[[Get]]"] = getter; + } + if (hasOwn(Obj, "set")) { + var setter = Obj.set; + if (typeof setter !== "undefined" && !IsCallable(setter)) { + throw new $TypeError("setter must be a function"); + } + desc["[[Set]]"] = setter; + } + if ((hasOwn(desc, "[[Get]]") || hasOwn(desc, "[[Set]]")) && (hasOwn(desc, "[[Value]]") || hasOwn(desc, "[[Writable]]"))) { + throw new $TypeError("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute"); + } + return desc; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/DefinePropertyOrThrow.js +var require_DefinePropertyOrThrow = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/DefinePropertyOrThrow.js"(exports2, module2) { + "use strict"; + var $TypeError = require_type(); + var isObject2 = require_isObject2(); + var isPropertyDescriptor = require_property_descriptor(); + var DefineOwnProperty = require_DefineOwnProperty(); + var FromPropertyDescriptor = require_FromPropertyDescriptor(); + var IsDataDescriptor = require_IsDataDescriptor(); + var isPropertyKey = require_isPropertyKey(); + var SameValue = require_SameValue(); + var ToPropertyDescriptor = require_ToPropertyDescriptor(); + module2.exports = function DefinePropertyOrThrow(O, P, desc) { + if (!isObject2(O)) { + throw new $TypeError("Assertion failed: Type(O) is not Object"); + } + if (!isPropertyKey(P)) { + throw new $TypeError("Assertion failed: P is not a Property Key"); + } + var Desc = isPropertyDescriptor(desc) ? desc : ToPropertyDescriptor(desc); + if (!isPropertyDescriptor(Desc)) { + throw new $TypeError("Assertion failed: Desc is not a valid Property Descriptor"); + } + return DefineOwnProperty( + IsDataDescriptor, + SameValue, + FromPropertyDescriptor, + O, + P, + Desc + ); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/IsConstructor.js +var require_IsConstructor = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/IsConstructor.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_GetIntrinsic(); + var $construct = GetIntrinsic("%Reflect.construct%", true); + var DefinePropertyOrThrow = require_DefinePropertyOrThrow(); + try { + DefinePropertyOrThrow({}, "", { "[[Get]]": function() { + } }); + } catch (e) { + DefinePropertyOrThrow = null; + } + if (DefinePropertyOrThrow && $construct) { + isConstructorMarker = {}; + badArrayLike = {}; + DefinePropertyOrThrow(badArrayLike, "length", { + "[[Get]]": function() { + throw isConstructorMarker; + }, + "[[Enumerable]]": true + }); + module2.exports = function IsConstructor(argument) { + try { + $construct(argument, badArrayLike); + } catch (err) { + return err === isConstructorMarker; + } + }; + } else { + module2.exports = function IsConstructor(argument) { + return typeof argument === "function" && !!argument.prototype; + }; + } + var isConstructorMarker; + var badArrayLike; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/SpeciesConstructor.js +var require_SpeciesConstructor = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/SpeciesConstructor.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var $species = GetIntrinsic("%Symbol.species%", true); + var $TypeError = require_type(); + var isObject2 = require_isObject2(); + var IsConstructor = require_IsConstructor(); + module2.exports = function SpeciesConstructor(O, defaultConstructor) { + if (!isObject2(O)) { + throw new $TypeError("Assertion failed: Type(O) is not Object"); + } + var C = O.constructor; + if (typeof C === "undefined") { + return defaultConstructor; + } + if (!isObject2(C)) { + throw new $TypeError("O.constructor is not an Object"); + } + var S = $species ? C[$species] : void 0; + if (S == null) { + return defaultConstructor; + } + if (IsConstructor(S)) { + return S; + } + throw new $TypeError("no constructor found"); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/IsFixedLengthArrayBuffer.js +var require_IsFixedLengthArrayBuffer = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/IsFixedLengthArrayBuffer.js"(exports2, module2) { + "use strict"; + var $TypeError = require_type(); + var callBound = require_call_bound(); + var $arrayBufferResizable = callBound("%ArrayBuffer.prototype.resizable%", true); + var $sharedArrayGrowable = callBound("%SharedArrayBuffer.prototype.growable%", true); + var isArrayBuffer = require_is_array_buffer(); + var isSharedArrayBuffer = require_is_shared_array_buffer(); + module2.exports = function IsFixedLengthArrayBuffer(arrayBuffer) { + var isAB = isArrayBuffer(arrayBuffer); + var isSAB = isSharedArrayBuffer(arrayBuffer); + if (!isAB && !isSAB) { + throw new $TypeError("Assertion failed: `arrayBuffer` must be an ArrayBuffer or SharedArrayBuffer"); + } + if (isAB && $arrayBufferResizable) { + return !$arrayBufferResizable(arrayBuffer); + } + if (isSAB && $sharedArrayGrowable) { + return !$sharedArrayGrowable(arrayBuffer); + } + return true; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/isInteger.js +var require_isInteger2 = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/isInteger.js"(exports2, module2) { + "use strict"; + module2.exports = require_isInteger(); + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/records/typed-array-with-buffer-witness-record.js +var require_typed_array_with_buffer_witness_record = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/records/typed-array-with-buffer-witness-record.js"(exports2, module2) { + "use strict"; + var hasOwn = require_hasown(); + var isTypedArray = require_is_typed_array(); + var isInteger = require_isInteger2(); + module2.exports = function isTypedArrayWithBufferWitnessRecord(value) { + return !!value && typeof value === "object" && hasOwn(value, "[[Object]]") && hasOwn(value, "[[CachedBufferByteLength]]") && (isInteger(value["[[CachedBufferByteLength]]"]) && value["[[CachedBufferByteLength]]"] >= 0 || value["[[CachedBufferByteLength]]"] === "DETACHED") && isTypedArray(value["[[Object]]"]); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2024/IsCallable.js +var require_IsCallable2 = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2024/IsCallable.js"(exports2, module2) { + "use strict"; + module2.exports = require_is_callable(); + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/isObject.js +var require_isObject3 = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/isObject.js"(exports2, module2) { + "use strict"; + module2.exports = require_isObject2(); + } +}); + +// ../../node_modules/.pnpm/is-string@1.1.1/node_modules/is-string/index.js +var require_is_string = __commonJS({ + "../../node_modules/.pnpm/is-string@1.1.1/node_modules/is-string/index.js"(exports2, module2) { + "use strict"; + var callBound = require_call_bound(); + var $strValueOf = callBound("String.prototype.valueOf"); + var tryStringObject = function tryStringObject2(value) { + try { + $strValueOf(value); + return true; + } catch (e) { + return false; + } + }; + var $toString = callBound("Object.prototype.toString"); + var strClass = "[object String]"; + var hasToStringTag = require_shams2()(); + module2.exports = function isString(value) { + if (typeof value === "string") { + return true; + } + if (!value || typeof value !== "object") { + return false; + } + return hasToStringTag ? tryStringObject(value) : $toString(value) === strClass; + }; + } +}); + +// ../../node_modules/.pnpm/is-number-object@1.1.1/node_modules/is-number-object/index.js +var require_is_number_object = __commonJS({ + "../../node_modules/.pnpm/is-number-object@1.1.1/node_modules/is-number-object/index.js"(exports2, module2) { + "use strict"; + var callBound = require_call_bound(); + var $numToStr = callBound("Number.prototype.toString"); + var tryNumberObject = function tryNumberObject2(value) { + try { + $numToStr(value); + return true; + } catch (e) { + return false; + } + }; + var $toString = callBound("Object.prototype.toString"); + var numClass = "[object Number]"; + var hasToStringTag = require_shams2()(); + module2.exports = function isNumberObject(value) { + if (typeof value === "number") { + return true; + } + if (!value || typeof value !== "object") { + return false; + } + return hasToStringTag ? tryNumberObject(value) : $toString(value) === numClass; + }; + } +}); + +// ../../node_modules/.pnpm/is-boolean-object@1.2.2/node_modules/is-boolean-object/index.js +var require_is_boolean_object = __commonJS({ + "../../node_modules/.pnpm/is-boolean-object@1.2.2/node_modules/is-boolean-object/index.js"(exports2, module2) { + "use strict"; + var callBound = require_call_bound(); + var $boolToStr = callBound("Boolean.prototype.toString"); + var $toString = callBound("Object.prototype.toString"); + var tryBooleanObject = function booleanBrandCheck(value) { + try { + $boolToStr(value); + return true; + } catch (e) { + return false; + } + }; + var boolClass = "[object Boolean]"; + var hasToStringTag = require_shams2()(); + module2.exports = function isBoolean(value) { + if (typeof value === "boolean") { + return true; + } + if (value === null || typeof value !== "object") { + return false; + } + return hasToStringTag ? tryBooleanObject(value) : $toString(value) === boolClass; + }; + } +}); + +// ../../node_modules/.pnpm/has-bigints@1.1.0/node_modules/has-bigints/index.js +var require_has_bigints = __commonJS({ + "../../node_modules/.pnpm/has-bigints@1.1.0/node_modules/has-bigints/index.js"(exports2, module2) { + "use strict"; + var $BigInt = typeof BigInt !== "undefined" && BigInt; + module2.exports = function hasNativeBigInts() { + return typeof $BigInt === "function" && typeof BigInt === "function" && typeof $BigInt(42) === "bigint" && typeof BigInt(42) === "bigint"; + }; + } +}); + +// ../../node_modules/.pnpm/is-bigint@1.1.0/node_modules/is-bigint/index.js +var require_is_bigint = __commonJS({ + "../../node_modules/.pnpm/is-bigint@1.1.0/node_modules/is-bigint/index.js"(exports2, module2) { + "use strict"; + var hasBigInts = require_has_bigints()(); + if (hasBigInts) { + bigIntValueOf = BigInt.prototype.valueOf; + tryBigInt = function tryBigIntObject(value) { + try { + bigIntValueOf.call(value); + return true; + } catch (e) { + } + return false; + }; + module2.exports = function isBigInt(value) { + if (value === null || typeof value === "undefined" || typeof value === "boolean" || typeof value === "string" || typeof value === "number" || typeof value === "symbol" || typeof value === "function") { + return false; + } + if (typeof value === "bigint") { + return true; + } + return tryBigInt(value); + }; + } else { + module2.exports = function isBigInt(value) { + return false; + }; + } + var bigIntValueOf; + var tryBigInt; + } +}); + +// ../../node_modules/.pnpm/which-boxed-primitive@1.1.1/node_modules/which-boxed-primitive/index.js +var require_which_boxed_primitive = __commonJS({ + "../../node_modules/.pnpm/which-boxed-primitive@1.1.1/node_modules/which-boxed-primitive/index.js"(exports2, module2) { + "use strict"; + var isString = require_is_string(); + var isNumber = require_is_number_object(); + var isBoolean = require_is_boolean_object(); + var isSymbol = require_is_symbol(); + var isBigInt = require_is_bigint(); + module2.exports = function whichBoxedPrimitive(value) { + if (value == null || typeof value !== "object" && typeof value !== "function") { + return null; + } + if (isString(value)) { + return "String"; + } + if (isNumber(value)) { + return "Number"; + } + if (isBoolean(value)) { + return "Boolean"; + } + if (isSymbol(value)) { + return "Symbol"; + } + if (isBigInt(value)) { + return "BigInt"; + } + }; + } +}); + +// ../../node_modules/.pnpm/is-map@2.0.3/node_modules/is-map/index.js +var require_is_map = __commonJS({ + "../../node_modules/.pnpm/is-map@2.0.3/node_modules/is-map/index.js"(exports2, module2) { + "use strict"; + var $Map = typeof Map === "function" && Map.prototype ? Map : null; + var $Set = typeof Set === "function" && Set.prototype ? Set : null; + var exported; + if (!$Map) { + exported = function isMap(x) { + return false; + }; + } + var $mapHas = $Map ? Map.prototype.has : null; + var $setHas = $Set ? Set.prototype.has : null; + if (!exported && !$mapHas) { + exported = function isMap(x) { + return false; + }; + } + module2.exports = exported || function isMap(x) { + if (!x || typeof x !== "object") { + return false; + } + try { + $mapHas.call(x); + if ($setHas) { + try { + $setHas.call(x); + } catch (e) { + return true; + } + } + return x instanceof $Map; + } catch (e) { + } + return false; + }; + } +}); + +// ../../node_modules/.pnpm/is-set@2.0.3/node_modules/is-set/index.js +var require_is_set = __commonJS({ + "../../node_modules/.pnpm/is-set@2.0.3/node_modules/is-set/index.js"(exports2, module2) { + "use strict"; + var $Map = typeof Map === "function" && Map.prototype ? Map : null; + var $Set = typeof Set === "function" && Set.prototype ? Set : null; + var exported; + if (!$Set) { + exported = function isSet(x) { + return false; + }; + } + var $mapHas = $Map ? Map.prototype.has : null; + var $setHas = $Set ? Set.prototype.has : null; + if (!exported && !$setHas) { + exported = function isSet(x) { + return false; + }; + } + module2.exports = exported || function isSet(x) { + if (!x || typeof x !== "object") { + return false; + } + try { + $setHas.call(x); + if ($mapHas) { + try { + $mapHas.call(x); + } catch (e) { + return true; + } + } + return x instanceof $Set; + } catch (e) { + } + return false; + }; + } +}); + +// ../../node_modules/.pnpm/is-weakmap@2.0.2/node_modules/is-weakmap/index.js +var require_is_weakmap = __commonJS({ + "../../node_modules/.pnpm/is-weakmap@2.0.2/node_modules/is-weakmap/index.js"(exports2, module2) { + "use strict"; + var $WeakMap = typeof WeakMap === "function" && WeakMap.prototype ? WeakMap : null; + var $WeakSet = typeof WeakSet === "function" && WeakSet.prototype ? WeakSet : null; + var exported; + if (!$WeakMap) { + exported = function isWeakMap(x) { + return false; + }; + } + var $mapHas = $WeakMap ? $WeakMap.prototype.has : null; + var $setHas = $WeakSet ? $WeakSet.prototype.has : null; + if (!exported && !$mapHas) { + exported = function isWeakMap(x) { + return false; + }; + } + module2.exports = exported || function isWeakMap(x) { + if (!x || typeof x !== "object") { + return false; + } + try { + $mapHas.call(x, $mapHas); + if ($setHas) { + try { + $setHas.call(x, $setHas); + } catch (e) { + return true; + } + } + return x instanceof $WeakMap; + } catch (e) { + } + return false; + }; + } +}); + +// ../../node_modules/.pnpm/is-weakset@2.0.4/node_modules/is-weakset/index.js +var require_is_weakset = __commonJS({ + "../../node_modules/.pnpm/is-weakset@2.0.4/node_modules/is-weakset/index.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var callBound = require_call_bound(); + var $WeakSet = GetIntrinsic("%WeakSet%", true); + var $setHas = callBound("WeakSet.prototype.has", true); + if ($setHas) { + $mapHas = callBound("WeakMap.prototype.has", true); + module2.exports = function isWeakSet(x) { + if (!x || typeof x !== "object") { + return false; + } + try { + $setHas(x, $setHas); + if ($mapHas) { + try { + $mapHas(x, $mapHas); + } catch (e) { + return true; + } + } + return x instanceof $WeakSet; + } catch (e) { + } + return false; + }; + } else { + module2.exports = function isWeakSet(x) { + return false; + }; + } + var $mapHas; + } +}); + +// ../../node_modules/.pnpm/which-collection@1.0.2/node_modules/which-collection/index.js +var require_which_collection = __commonJS({ + "../../node_modules/.pnpm/which-collection@1.0.2/node_modules/which-collection/index.js"(exports2, module2) { + "use strict"; + var isMap = require_is_map(); + var isSet = require_is_set(); + var isWeakMap = require_is_weakmap(); + var isWeakSet = require_is_weakset(); + module2.exports = function whichCollection(value) { + if (value && typeof value === "object") { + if (isMap(value)) { + return "Map"; + } + if (isSet(value)) { + return "Set"; + } + if (isWeakMap(value)) { + return "WeakMap"; + } + if (isWeakSet(value)) { + return "WeakSet"; + } + } + return false; + }; + } +}); + +// ../../node_modules/.pnpm/is-weakref@1.1.1/node_modules/is-weakref/index.js +var require_is_weakref = __commonJS({ + "../../node_modules/.pnpm/is-weakref@1.1.1/node_modules/is-weakref/index.js"(exports2, module2) { + "use strict"; + var callBound = require_call_bound(); + var $deref = ( + /** @type {(thisArg: WeakRef) => T | undefined} */ + callBound("WeakRef.prototype.deref", true) + ); + module2.exports = typeof WeakRef === "undefined" ? function isWeakRef(_value) { + return false; + } : function isWeakRef(value) { + if (!value || typeof value !== "object") { + return false; + } + try { + $deref(value); + return true; + } catch (e) { + return false; + } + }; + } +}); + +// ../../node_modules/.pnpm/is-finalizationregistry@1.1.1/node_modules/is-finalizationregistry/index.js +var require_is_finalizationregistry = __commonJS({ + "../../node_modules/.pnpm/is-finalizationregistry@1.1.1/node_modules/is-finalizationregistry/index.js"(exports2, module2) { + "use strict"; + var callBound = require_call_bound(); + var $register = callBound("FinalizationRegistry.prototype.register", true); + module2.exports = $register ? function isFinalizationRegistry(value) { + if (!value || typeof value !== "object") { + return false; + } + try { + $register(value, {}, null); + return true; + } catch (e) { + return false; + } + } : function isFinalizationRegistry(value) { + return false; + }; + } +}); + +// ../../node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js +var require_functions_have_names = __commonJS({ + "../../node_modules/.pnpm/functions-have-names@1.2.3/node_modules/functions-have-names/index.js"(exports2, module2) { + "use strict"; + var functionsHaveNames = function functionsHaveNames2() { + return typeof function f() { + }.name === "string"; + }; + var gOPD = Object.getOwnPropertyDescriptor; + if (gOPD) { + try { + gOPD([], "length"); + } catch (e) { + gOPD = null; + } + } + functionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() { + if (!functionsHaveNames() || !gOPD) { + return false; + } + var desc = gOPD(function() { + }, "name"); + return !!desc && !!desc.configurable; + }; + var $bind = Function.prototype.bind; + functionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() { + return functionsHaveNames() && typeof $bind === "function" && function f() { + }.bind().name !== ""; + }; + module2.exports = functionsHaveNames; + } +}); + +// ../../node_modules/.pnpm/is-document.all@1.0.0/node_modules/is-document.all/index.js +var require_is_document = __commonJS({ + "../../node_modules/.pnpm/is-document.all@1.0.0/node_modules/is-document.all/index.js"(exports2, module2) { + "use strict"; + var callBound = require_call_bound(); + var toStr = callBound("Object.prototype.toString"); + var isIE68 = !(0 in [,]); + var objectClass = "[object Object]"; + var ddaClass = "[object HTMLAllCollection]"; + var isDDA = function isDocumentDotAll() { + return ( + /** @type {const} */ + false + ); + }; + if (typeof document === "object") { + all = document.all; + if (toStr(all) === toStr(document.all)) { + isDDA = /** @type {import('.')} */ + (function isDocumentDotAll(value) { + if ((isIE68 || !value) && (typeof value === "undefined" || typeof value === "object")) { + try { + var str = toStr(value); + return (str === ddaClass || str === objectClass) && /** @type {Function} */ + value("") == null; + } catch (e) { + } + } + return false; + }); + } + } + var all; + module2.exports = isDDA; + } +}); + +// ../../node_modules/.pnpm/function.prototype.name@1.2.0/node_modules/function.prototype.name/implementation.js +var require_implementation4 = __commonJS({ + "../../node_modules/.pnpm/function.prototype.name@1.2.0/node_modules/function.prototype.name/implementation.js"(exports2, module2) { + "use strict"; + var IsCallable = require_is_callable(); + var hasOwn = require_hasown(); + var functionsHaveNames = require_functions_have_names()(); + var $TypeError = require_type(); + var callBound = require_call_bound(); + var isDDA = require_is_document(); + var $functionToString = callBound("Function.prototype.toString"); + var $stringMatch = callBound("String.prototype.match"); + var classRegex = /^class /; + var isClass2 = function isClassConstructor(fn) { + if (IsCallable(fn)) { + return false; + } + if (typeof fn !== "function") { + return false; + } + try { + var match = $stringMatch($functionToString(fn), classRegex); + return !!match; + } catch (e) { + } + return false; + }; + var regex = /\s*function\s+([^(\s]*)\s*/; + var functionProto = Function.prototype; + module2.exports = function getName() { + if (isDDA(this) || !isClass2(this) && !IsCallable(this)) { + throw new $TypeError("Function.prototype.name sham getter called on non-function"); + } + if (functionsHaveNames && hasOwn(this, "name")) { + return this.name; + } + if (this === functionProto) { + return ""; + } + var str = $functionToString(this); + var match = $stringMatch(str, regex); + var name = match && match[1]; + return ( + /** @type {string} */ + name + ); + }; + } +}); + +// ../../node_modules/.pnpm/function.prototype.name@1.2.0/node_modules/function.prototype.name/polyfill.js +var require_polyfill2 = __commonJS({ + "../../node_modules/.pnpm/function.prototype.name@1.2.0/node_modules/function.prototype.name/polyfill.js"(exports2, module2) { + "use strict"; + var implementation = require_implementation4(); + module2.exports = function getPolyfill() { + return implementation; + }; + } +}); + +// ../../node_modules/.pnpm/function.prototype.name@1.2.0/node_modules/function.prototype.name/shim.js +var require_shim2 = __commonJS({ + "../../node_modules/.pnpm/function.prototype.name@1.2.0/node_modules/function.prototype.name/shim.js"(exports2, module2) { + "use strict"; + var supportsDescriptors = require_has_property_descriptors()(); + var functionsHaveNames = require_functions_have_names()(); + var $TypeError = require_type(); + var getPolyfill = require_polyfill2(); + var defineProperty = require_es_define_property(); + module2.exports = function shimName() { + var polyfill = getPolyfill(); + if (functionsHaveNames) { + return polyfill; + } + if (!supportsDescriptors || !defineProperty) { + throw new $TypeError("Shimming Function.prototype.name support requires ES5 property descriptor support."); + } + var functionProto = Function.prototype; + defineProperty(functionProto, "name", { + configurable: true, + enumerable: false, + get: function() { + var name = polyfill.call(this); + if (this !== functionProto) { + defineProperty(this, "name", { + configurable: true, + enumerable: false, + value: name, + writable: false + }); + } + return name; + } + }); + return polyfill; + }; + } +}); + +// ../../node_modules/.pnpm/function.prototype.name@1.2.0/node_modules/function.prototype.name/index.js +var require_function_prototype = __commonJS({ + "../../node_modules/.pnpm/function.prototype.name@1.2.0/node_modules/function.prototype.name/index.js"(exports2, module2) { + "use strict"; + var callBind = require_call_bind(); + var implementation = require_implementation4(); + var getPolyfill = require_polyfill2(); + var shim = require_shim2(); + var bound = callBind(implementation); + module2.exports = bound; + module2.exports.getPolyfill = getPolyfill; + module2.exports.implementation = implementation; + module2.exports.shim = shim; + } +}); + +// ../../node_modules/.pnpm/generator-function@2.0.1/node_modules/generator-function/index.js +var require_generator_function = __commonJS({ + "../../node_modules/.pnpm/generator-function@2.0.1/node_modules/generator-function/index.js"(exports2, module2) { + "use strict"; + var cached = ( + /** @type {GeneratorFunctionConstructor} */ + function* () { + }.constructor + ); + module2.exports = () => cached; + } +}); + +// ../../node_modules/.pnpm/is-generator-function@1.1.2/node_modules/is-generator-function/index.js +var require_is_generator_function = __commonJS({ + "../../node_modules/.pnpm/is-generator-function@1.1.2/node_modules/is-generator-function/index.js"(exports2, module2) { + "use strict"; + var callBound = require_call_bound(); + var safeRegexTest = require_safe_regex_test(); + var isFnRegex = safeRegexTest(/^\s*(?:function)?\*/); + var hasToStringTag = require_shams2()(); + var getProto = require_get_proto(); + var toStr = callBound("Object.prototype.toString"); + var fnToStr = callBound("Function.prototype.toString"); + var getGeneratorFunction = require_generator_function(); + module2.exports = function isGeneratorFunction(fn) { + if (typeof fn !== "function") { + return false; + } + if (isFnRegex(fnToStr(fn))) { + return true; + } + if (!hasToStringTag) { + var str = toStr(fn); + return str === "[object GeneratorFunction]"; + } + if (!getProto) { + return false; + } + var GeneratorFunction = getGeneratorFunction(); + return GeneratorFunction && getProto(fn) === GeneratorFunction.prototype; + }; + } +}); + +// ../../node_modules/.pnpm/async-function@1.0.0/node_modules/async-function/index.js +var require_async_function = __commonJS({ + "../../node_modules/.pnpm/async-function@1.0.0/node_modules/async-function/index.js"(exports2, module2) { + "use strict"; + var cached = ( + /** @type {import('.').AsyncFunctionConstructor} */ + async function() { + }.constructor + ); + module2.exports = () => cached; + } +}); + +// ../../node_modules/.pnpm/is-async-function@2.1.1/node_modules/is-async-function/index.js +var require_is_async_function = __commonJS({ + "../../node_modules/.pnpm/is-async-function@2.1.1/node_modules/is-async-function/index.js"(exports2, module2) { + "use strict"; + var callBound = require_call_bound(); + var safeRegexTest = require_safe_regex_test(); + var toStr = callBound("Object.prototype.toString"); + var fnToStr = callBound("Function.prototype.toString"); + var isFnRegex = safeRegexTest(/^\s*async(?:\s+function(?:\s+|\()|\s*\()/); + var hasToStringTag = require_shams2()(); + var getProto = require_get_proto(); + var getAsyncFunc = require_async_function(); + module2.exports = function isAsyncFunction(fn) { + if (typeof fn !== "function") { + return false; + } + if (isFnRegex(fnToStr(fn))) { + return true; + } + if (!hasToStringTag) { + var str = toStr(fn); + return str === "[object AsyncFunction]"; + } + if (!getProto) { + return false; + } + var asyncFunc = getAsyncFunc(); + return asyncFunc && asyncFunc.prototype === getProto(fn); + }; + } +}); + +// ../../node_modules/.pnpm/which-builtin-type@1.2.1/node_modules/which-builtin-type/index.js +var require_which_builtin_type = __commonJS({ + "../../node_modules/.pnpm/which-builtin-type@1.2.1/node_modules/which-builtin-type/index.js"(exports2, module2) { + "use strict"; + var whichBoxedPrimitive = require_which_boxed_primitive(); + var whichCollection = require_which_collection(); + var whichTypedArray = require_which_typed_array(); + var isArray = require_isarray2(); + var isDate = require_is_date_object(); + var isRegex = require_is_regex(); + var isWeakRef = require_is_weakref(); + var isFinalizationRegistry = require_is_finalizationregistry(); + var name = require_function_prototype(); + var isGeneratorFunction = require_is_generator_function(); + var isAsyncFunction = require_is_async_function(); + var callBound = require_call_bound(); + var hasToStringTag = require_shams2()(); + var toStringTag = hasToStringTag && Symbol.toStringTag; + var $Object = Object; + var promiseThen = callBound("Promise.prototype.then", true); + var isPromise = function isPromise2(value) { + if (!value || typeof value !== "object" || !promiseThen) { + return false; + } + try { + promiseThen(value, null, function() { + }); + return true; + } catch (e) { + } + return false; + }; + var isKnownBuiltin = function isKnownBuiltin2(builtinName) { + return !!builtinName && builtinName !== "BigInt" && builtinName !== "Boolean" && builtinName !== "Null" && builtinName !== "Number" && builtinName !== "String" && builtinName !== "Symbol" && builtinName !== "Undefined" && builtinName !== "Math" && builtinName !== "JSON" && builtinName !== "Reflect" && builtinName !== "Atomics" && builtinName !== "Map" && builtinName !== "Set" && builtinName !== "WeakMap" && builtinName !== "WeakSet" && builtinName !== "BigInt64Array" && builtinName !== "BigUint64Array" && builtinName !== "Float32Array" && builtinName !== "Float64Array" && builtinName !== "Int16Array" && builtinName !== "Int32Array" && builtinName !== "Int8Array" && builtinName !== "Uint16Array" && builtinName !== "Uint32Array" && builtinName !== "Uint8Array" && builtinName !== "Uint8ClampedArray" && builtinName !== "Array" && builtinName !== "Date" && builtinName !== "FinalizationRegistry" && builtinName !== "Promise" && builtinName !== "RegExp" && builtinName !== "WeakRef" && builtinName !== "Function" && builtinName !== "GeneratorFunction" && builtinName !== "AsyncFunction"; + }; + module2.exports = function whichBuiltinType(value) { + if (value == null) { + return value; + } + var which = whichBoxedPrimitive($Object(value)) || whichCollection(value) || whichTypedArray(value); + if (which) { + return which; + } + if (isArray(value)) { + return "Array"; + } + if (isDate(value)) { + return "Date"; + } + if (isRegex(value)) { + return "RegExp"; + } + if (isWeakRef(value)) { + return "WeakRef"; + } + if (isFinalizationRegistry(value)) { + return "FinalizationRegistry"; + } + if (typeof value === "function") { + if (isGeneratorFunction(value)) { + return "GeneratorFunction"; + } + if (isAsyncFunction(value)) { + return "AsyncFunction"; + } + return "Function"; + } + if (isPromise(value)) { + return "Promise"; + } + if (toStringTag && toStringTag in value) { + var tag = value[toStringTag]; + if (isKnownBuiltin(tag)) { + return tag; + } + } + if (typeof value.constructor === "function") { + var constructorName = name( + /** @type {Parameters[0]} */ + value.constructor + ); + if (isKnownBuiltin(constructorName)) { + return constructorName; + } + } + return "Object"; + }; + } +}); + +// ../../node_modules/.pnpm/reflect.getprototypeof@1.0.10/node_modules/reflect.getprototypeof/implementation.js +var require_implementation5 = __commonJS({ + "../../node_modules/.pnpm/reflect.getprototypeof@1.0.10/node_modules/reflect.getprototypeof/implementation.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var IsCallable = require_IsCallable2(); + var isObject2 = require_isObject3(); + var whichBuiltinType = require_which_builtin_type(); + var $TypeError = require_type(); + var gPO = require_get_proto(); + var $Object = require_es_object_atoms(); + module2.exports = function getPrototypeOf(O) { + if (!isObject2(O)) { + throw new $TypeError("Reflect.getPrototypeOf called on non-object"); + } + if (gPO) { + return gPO(O); + } + var type = whichBuiltinType(O); + if (type) { + var intrinsic = GetIntrinsic("%" + type + ".prototype%", true); + if (intrinsic) { + return intrinsic; + } + } + if (IsCallable(O.constructor)) { + return O.constructor.prototype; + } + if (O instanceof Object) { + return $Object.prototype; + } + return null; + }; + } +}); + +// ../../node_modules/.pnpm/reflect.getprototypeof@1.0.10/node_modules/reflect.getprototypeof/polyfill.js +var require_polyfill3 = __commonJS({ + "../../node_modules/.pnpm/reflect.getprototypeof@1.0.10/node_modules/reflect.getprototypeof/polyfill.js"(exports2, module2) { + "use strict"; + var implementation = require_implementation5(); + var getProto = require_get_proto(); + module2.exports = function getPolyfill() { + if (typeof Reflect === "object" && Reflect && Reflect.getPrototypeOf) { + return Reflect.getPrototypeOf; + } + return getProto ? function getPrototypeOf(O) { + return getProto(O); + } : implementation; + }; + } +}); + +// ../../node_modules/.pnpm/typed-array-byte-offset@1.0.5/node_modules/typed-array-byte-offset/index.js +var require_typed_array_byte_offset = __commonJS({ + "../../node_modules/.pnpm/typed-array-byte-offset@1.0.5/node_modules/typed-array-byte-offset/index.js"(exports2, module2) { + "use strict"; + var forEach = require_for_each(); + var callBind = require_call_bind(); + var gPO = require_polyfill3()(); + var typedArrays = require_available_typed_arrays()(); + var getters = { + // @ts-expect-error TS can't handle __proto__ or `satisfies` in jsdoc + __proto__: null + }; + var gOPD = require_gopd(); + var oDP = Object.defineProperty; + if (gOPD) { + getByteOffset = function(x) { + return x.byteOffset; + }; + forEach(typedArrays, function(typedArray) { + if (typeof global[typedArray] === "function" || typeof global[typedArray] === "object") { + var Proto = global[typedArray].prototype; + var descriptor = gOPD(Proto, "byteOffset"); + if (!descriptor) { + var superProto = gPO(Proto); + descriptor = gOPD(superProto, "byteOffset"); + } + if (descriptor && descriptor.get) { + getters[typedArray] = callBind(descriptor.get); + } else if (oDP) { + var arr = new global[typedArray](2); + descriptor = gOPD(arr, "byteOffset"); + if (descriptor && descriptor.configurable) { + oDP(arr, "length", { value: 3 }); + } + if (arr.length === 2) { + getters[typedArray] = getByteOffset; + } + } + } + }); + } + var getByteOffset; + var tryTypedArrays = function tryAllTypedArrays(value) { + var foundOffset; + forEach(getters, function(getter) { + if (typeof foundOffset !== "number") { + try { + var offset = getter(value); + if (typeof offset === "number") { + foundOffset = offset; + } + } catch (e) { + } + } + }); + return foundOffset; + }; + var isTypedArray = require_is_typed_array(); + module2.exports = function typedArrayByteOffset(value) { + if (!isTypedArray(value)) { + return false; + } + return tryTypedArrays(value); + }; + } +}); + +// ../../node_modules/.pnpm/typed-array-length@1.0.8/node_modules/typed-array-length/index.js +var require_typed_array_length = __commonJS({ + "../../node_modules/.pnpm/typed-array-length@1.0.8/node_modules/typed-array-length/index.js"(exports2, module2) { + "use strict"; + var callBind = require_call_bind(); + var forEach = require_for_each(); + var gOPD = require_gopd(); + var isTypedArray = require_is_typed_array(); + var typedArrays = require_possible_typed_array_names(); + var gPO = require_polyfill3()(); + var getters = { __proto__: null }; + var oDP = Object.defineProperty; + if (gOPD) { + getLength = /** @type {TypedArrayLengthGetter} */ + function(x) { + return x.length; + }; + forEach( + typedArrays, + /** @type {(typedArray: import('.').TypedArrayName) => void} */ + function(typedArray) { + var TA = global[typedArray]; + if (typeof TA === "function" || typeof TA === "object") { + var Proto = TA.prototype; + var descriptor = gOPD(Proto, "length"); + if (!descriptor) { + var superProto = gPO(Proto); + descriptor = gOPD(superProto, "length"); + } + if (descriptor && descriptor.get) { + getters[ + /** @type {`$${import('.').TypedArrayName}`} */ + "$" + typedArray + ] = callBind(descriptor.get); + } else if (oDP) { + var arr = new global[typedArray](2); + descriptor = gOPD(arr, "length"); + if (descriptor && descriptor.configurable) { + oDP(arr, "length", { value: 3 }); + } + if (arr.length === 2) { + getters[ + /** @type {`$${import('.').TypedArrayName}`} */ + "$" + typedArray + ] = getLength; + } + } + } + } + ); + } + var getLength; + var tryTypedArrays = function tryAllTypedArrays(value) { + var foundLength; + forEach( + getters, + /** @type {(getter: TypedArrayLengthGetter) => void} */ + function(getter) { + if (typeof foundLength !== "number") { + try { + var length = getter(value); + if (typeof length === "number") { + foundLength = length; + } + } catch (e) { + } + } + } + ); + return foundLength; + }; + module2.exports = function typedArrayLength(value) { + if (!isTypedArray(value)) { + return false; + } + return tryTypedArrays(value); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/IsTypedArrayOutOfBounds.js +var require_IsTypedArrayOutOfBounds = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/IsTypedArrayOutOfBounds.js"(exports2, module2) { + "use strict"; + var $TypeError = require_type(); + var IsDetachedBuffer = require_IsDetachedBuffer(); + var IsFixedLengthArrayBuffer = require_IsFixedLengthArrayBuffer(); + var TypedArrayElementSize = require_TypedArrayElementSize(); + var isTypedArrayWithBufferWitnessRecord = require_typed_array_with_buffer_witness_record(); + var typedArrayBuffer = require_typed_array_buffer(); + var typedArrayByteOffset = require_typed_array_byte_offset(); + var typedArrayLength = require_typed_array_length(); + module2.exports = function IsTypedArrayOutOfBounds(taRecord) { + if (!isTypedArrayWithBufferWitnessRecord(taRecord)) { + throw new $TypeError("Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record"); + } + var O = taRecord["[[Object]]"]; + var bufferByteLength = taRecord["[[CachedBufferByteLength]]"]; + if (IsDetachedBuffer(typedArrayBuffer(O)) && bufferByteLength !== "DETACHED") { + throw new $TypeError("Assertion failed: typed array is detached only if the byte length is ~DETACHED~"); + } + if (bufferByteLength === "DETACHED") { + return true; + } + var byteOffsetStart = typedArrayByteOffset(O); + var isFixed = IsFixedLengthArrayBuffer(typedArrayBuffer(O)); + var byteOffsetEnd; + var length = isFixed ? typedArrayLength(O) : "AUTO"; + if (length === "AUTO") { + byteOffsetEnd = bufferByteLength; + } else { + var elementSize = TypedArrayElementSize(O); + byteOffsetEnd = byteOffsetStart + length * elementSize; + } + if (byteOffsetStart > bufferByteLength || byteOffsetEnd > bufferByteLength) { + return true; + } + return false; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/TypedArrayLength.js +var require_TypedArrayLength = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/TypedArrayLength.js"(exports2, module2) { + "use strict"; + var $TypeError = require_type(); + var floor = require_floor2(); + var IsFixedLengthArrayBuffer = require_IsFixedLengthArrayBuffer(); + var IsTypedArrayOutOfBounds = require_IsTypedArrayOutOfBounds(); + var TypedArrayElementSize = require_TypedArrayElementSize(); + var isTypedArrayWithBufferWitnessRecord = require_typed_array_with_buffer_witness_record(); + var typedArrayBuffer = require_typed_array_buffer(); + var typedArrayByteOffset = require_typed_array_byte_offset(); + var typedArrayLength = require_typed_array_length(); + module2.exports = function TypedArrayLength(taRecord) { + if (!isTypedArrayWithBufferWitnessRecord(taRecord)) { + throw new $TypeError("Assertion failed: `taRecord` must be a TypedArray With Buffer Witness Record"); + } + if (IsTypedArrayOutOfBounds(taRecord)) { + throw new $TypeError("Assertion failed: `taRecord` is out of bounds"); + } + var O = taRecord["[[Object]]"]; + var isFixed = IsFixedLengthArrayBuffer(typedArrayBuffer(O)); + var length = isFixed ? typedArrayLength(O) : "AUTO"; + if (length !== "AUTO") { + return length; + } + if (isFixed) { + throw new $TypeError("Assertion failed: array buffer is not fixed length"); + } + var byteOffset = typedArrayByteOffset(O); + var elementSize = TypedArrayElementSize(O); + var byteLength = taRecord["[[CachedBufferByteLength]]"]; + if (byteLength === "DETACHED") { + throw new $TypeError("Assertion failed: typed array is detached"); + } + return floor((byteLength - byteOffset) / elementSize); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ArrayBufferByteLength.js +var require_ArrayBufferByteLength = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ArrayBufferByteLength.js"(exports2, module2) { + "use strict"; + var $TypeError = require_type(); + var IsDetachedBuffer = require_IsDetachedBuffer(); + var isArrayBuffer = require_is_array_buffer(); + var isSharedArrayBuffer = require_is_shared_array_buffer(); + var arrayBufferByteLength = require_array_buffer_byte_length(); + var callBound = require_call_bound(); + var $sabByteLength = callBound("SharedArrayBuffer.prototype.byteLength", true); + var isGrowable = false; + module2.exports = function ArrayBufferByteLength(arrayBuffer, order) { + var isSAB = isSharedArrayBuffer(arrayBuffer); + if (!isArrayBuffer(arrayBuffer) && !isSAB) { + throw new $TypeError("Assertion failed: `arrayBuffer` must be an ArrayBuffer or a SharedArrayBuffer"); + } + if (order !== "SEQ-CST" && order !== "UNORDERED") { + throw new $TypeError("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~"); + } + if (isSAB && isGrowable) { + } + if (IsDetachedBuffer(arrayBuffer)) { + throw new $TypeError("Assertion failed: `arrayBuffer` must not be detached"); + } + return isSAB ? $sabByteLength(arrayBuffer) : arrayBufferByteLength(arrayBuffer); + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/MakeTypedArrayWithBufferWitnessRecord.js +var require_MakeTypedArrayWithBufferWitnessRecord = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/MakeTypedArrayWithBufferWitnessRecord.js"(exports2, module2) { + "use strict"; + var $TypeError = require_type(); + var ArrayBufferByteLength = require_ArrayBufferByteLength(); + var IsDetachedBuffer = require_IsDetachedBuffer(); + var isTypedArray = require_is_typed_array(); + var typedArrayBuffer = require_typed_array_buffer(); + module2.exports = function MakeTypedArrayWithBufferWitnessRecord(obj2, order) { + if (!isTypedArray(obj2)) { + throw new $TypeError("Assertion failed: `obj` must be a Typed Array"); + } + if (order !== "SEQ-CST" && order !== "UNORDERED") { + throw new $TypeError("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~"); + } + var buffer = typedArrayBuffer(obj2); + var byteLength = IsDetachedBuffer(buffer) ? "DETACHED" : ArrayBufferByteLength(buffer, order); + return { "[[Object]]": obj2, "[[CachedBufferByteLength]]": byteLength }; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ValidateTypedArray.js +var require_ValidateTypedArray = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/ValidateTypedArray.js"(exports2, module2) { + "use strict"; + var $TypeError = require_type(); + var isObject2 = require_isObject2(); + var IsTypedArrayOutOfBounds = require_IsTypedArrayOutOfBounds(); + var MakeTypedArrayWithBufferWitnessRecord = require_MakeTypedArrayWithBufferWitnessRecord(); + var isTypedArray = require_is_typed_array(); + module2.exports = function ValidateTypedArray(O, order) { + if (order !== "SEQ-CST" && order !== "UNORDERED") { + throw new $TypeError("Assertion failed: `order` must be ~SEQ-CST~ or ~UNORDERED~"); + } + if (!isObject2(O)) { + throw new $TypeError("Assertion failed: `O` must be an Object"); + } + if (!isTypedArray(O)) { + throw new $TypeError("Assertion failed: `O` must be a Typed Array"); + } + var taRecord = MakeTypedArrayWithBufferWitnessRecord(O, order); + if (IsTypedArrayOutOfBounds(taRecord)) { + throw new $TypeError("`O` must be in-bounds and backed by a non-detached buffer"); + } + return taRecord; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/TypedArrayCreateFromConstructor.js +var require_TypedArrayCreateFromConstructor = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/TypedArrayCreateFromConstructor.js"(exports2, module2) { + "use strict"; + var $SyntaxError = require_syntax(); + var $TypeError = require_type(); + var IsArray = require_IsArray3(); + var IsConstructor = require_IsConstructor(); + var IsTypedArrayOutOfBounds = require_IsTypedArrayOutOfBounds(); + var TypedArrayLength = require_TypedArrayLength(); + var ValidateTypedArray = require_ValidateTypedArray(); + var availableTypedArrays = require_available_typed_arrays()(); + module2.exports = function TypedArrayCreateFromConstructor(constructor, argumentList) { + if (!IsConstructor(constructor)) { + throw new $TypeError("Assertion failed: `constructor` must be a constructor"); + } + if (!IsArray(argumentList)) { + throw new $TypeError("Assertion failed: `argumentList` must be a List"); + } + if (availableTypedArrays.length === 0) { + throw new $SyntaxError("Assertion failed: Typed Arrays are not supported in this environment"); + } + var newTypedArray; + if (argumentList.length === 0) { + newTypedArray = new constructor(); + } else if (argumentList.length === 1) { + newTypedArray = new constructor(argumentList[0]); + } else if (argumentList.length === 2) { + newTypedArray = new constructor(argumentList[0], argumentList[1]); + } else { + newTypedArray = new constructor(argumentList[0], argumentList[1], argumentList[2]); + } + var taRecord = ValidateTypedArray(newTypedArray, "SEQ-CST"); + if (argumentList.length === 1 && typeof argumentList[0] === "number") { + if (IsTypedArrayOutOfBounds(taRecord)) { + throw new $TypeError("new Typed Array is out of bounds"); + } + var length = TypedArrayLength(taRecord); + if (length < argumentList[0]) { + throw new $TypeError("`argumentList[0]` must be <= `newTypedArray.length`"); + } + } + return newTypedArray; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/typedArrayConstructors.js +var require_typedArrayConstructors = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/helpers/typedArrayConstructors.js"(exports2, module2) { + "use strict"; + var GetIntrinsic = require_get_intrinsic(); + var constructors = { + __proto__: null, + $Int8Array: GetIntrinsic("%Int8Array%", true), + $Uint8Array: GetIntrinsic("%Uint8Array%", true), + $Uint8ClampedArray: GetIntrinsic("%Uint8ClampedArray%", true), + $Int16Array: GetIntrinsic("%Int16Array%", true), + $Uint16Array: GetIntrinsic("%Uint16Array%", true), + $Int32Array: GetIntrinsic("%Int32Array%", true), + $Uint32Array: GetIntrinsic("%Uint32Array%", true), + $BigInt64Array: GetIntrinsic("%BigInt64Array%", true), + $BigUint64Array: GetIntrinsic("%BigUint64Array%", true), + $Float16Array: GetIntrinsic("%Float16Array%", true), + $Float32Array: GetIntrinsic("%Float32Array%", true), + $Float64Array: GetIntrinsic("%Float64Array%", true) + }; + module2.exports = function getConstructor(kind) { + return constructors["$" + kind]; + }; + } +}); + +// ../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/TypedArraySpeciesCreate.js +var require_TypedArraySpeciesCreate = __commonJS({ + "../../node_modules/.pnpm/es-abstract@1.24.2/node_modules/es-abstract/2025/TypedArraySpeciesCreate.js"(exports2, module2) { + "use strict"; + var $SyntaxError = require_syntax(); + var $TypeError = require_type(); + var whichTypedArray = require_which_typed_array(); + var availableTypedArrays = require_available_typed_arrays()(); + var IsArray = require_IsArray3(); + var SpeciesConstructor = require_SpeciesConstructor(); + var TypedArrayCreateFromConstructor = require_TypedArrayCreateFromConstructor(); + var getConstructor = require_typedArrayConstructors(); + module2.exports = function TypedArraySpeciesCreate(exemplar, argumentList) { + if (availableTypedArrays.length === 0) { + throw new $SyntaxError("Assertion failed: Typed Arrays are not supported in this environment"); + } + var kind = whichTypedArray(exemplar); + if (!kind) { + throw new $TypeError("Assertion failed: exemplar must be a TypedArray"); + } + if (!IsArray(argumentList)) { + throw new $TypeError("Assertion failed: `argumentList` must be a List"); + } + var defaultConstructor = getConstructor(kind); + if (typeof defaultConstructor !== "function") { + throw new $SyntaxError("Assertion failed: `constructor` of `exemplar` (" + kind + ") must exist. Please report this!"); + } + var constructor = SpeciesConstructor(exemplar, defaultConstructor); + return TypedArrayCreateFromConstructor(constructor, argumentList); + }; + } +}); + +// ../../node_modules/.pnpm/typedarray.prototype.slice@1.0.6/node_modules/typedarray.prototype.slice/implementation.js +var require_implementation6 = __commonJS({ + "../../node_modules/.pnpm/typedarray.prototype.slice@1.0.6/node_modules/typedarray.prototype.slice/implementation.js"(exports2, module2) { + "use strict"; + var $TypeError = require_type(); + var Get = require_Get(); + var GetValueFromBuffer = require_GetValueFromBuffer(); + var IsDetachedBuffer = require_IsDetachedBuffer(); + var max = require_max3(); + var min = require_min2(); + var Set2 = require_Set(); + var SetValueInBuffer = require_SetValueInBuffer(); + var ToIntegerOrInfinity = require_ToIntegerOrInfinity(); + var ToString = require_ToString(); + var TypedArrayElementSize = require_TypedArrayElementSize(); + var TypedArrayElementType = require_TypedArrayElementType(); + var TypedArraySpeciesCreate = require_TypedArraySpeciesCreate(); + var ValidateTypedArray = require_ValidateTypedArray(); + var typedArrayBuffer = require_typed_array_buffer(); + var typedArrayByteOffset = require_typed_array_byte_offset(); + module2.exports = function slice(start, end) { + var O = this; + ValidateTypedArray(O, "SEQ-CST"); + var len = O.length; + var relativeStart = ToIntegerOrInfinity(start); + var k; + if (relativeStart === -Infinity) { + k = 0; + } else if (relativeStart < 0) { + k = max(len + relativeStart, 0); + } else { + k = min(relativeStart, len); + } + var relativeEnd = typeof end === "undefined" ? len : ToIntegerOrInfinity(end); + var final; + if (relativeEnd === -Infinity) { + final = 0; + } else if (relativeEnd < 0) { + final = max(len + relativeEnd, 0); + } else { + final = min(relativeEnd, len); + } + var count = max(final - k, 0); + var A = TypedArraySpeciesCreate(O, [count]); + if (count > 0) { + if (IsDetachedBuffer(typedArrayBuffer(O))) { + throw new $TypeError("Cannot use a Typed Array with an underlying ArrayBuffer that is detached"); + } + var srcType = TypedArrayElementType(O); + var targetType = TypedArrayElementType(A); + if (srcType === targetType) { + var srcBuffer = typedArrayBuffer(O); + var targetBuffer = typedArrayBuffer(A); + var elementSize = TypedArrayElementSize(O); + var srcByteOffset = typedArrayByteOffset(O); + var srcByteIndex = k * elementSize + srcByteOffset; + var targetByteIndex = typedArrayByteOffset(A); + var limit = targetByteIndex + count * elementSize; + while (targetByteIndex < limit) { + var value = GetValueFromBuffer(srcBuffer, srcByteIndex, "UINT8", true, "UNORDERED"); + SetValueInBuffer(targetBuffer, targetByteIndex, "UINT8", value, true, "UNORDERED"); + srcByteIndex += 1; + targetByteIndex += 1; + } + } else { + var n = 0; + while (k < final) { + var Pk = ToString(k); + var kValue = Get(O, Pk); + Set2(A, ToString(n), kValue, true); + k += 1; + n += 1; + } + } + } + return A; + }; + } +}); + +// ../../node_modules/.pnpm/typedarray.prototype.slice@1.0.6/node_modules/typedarray.prototype.slice/polyfill.js +var require_polyfill4 = __commonJS({ + "../../node_modules/.pnpm/typedarray.prototype.slice@1.0.6/node_modules/typedarray.prototype.slice/polyfill.js"(exports2, module2) { + "use strict"; + var implementation = require_implementation6(); + module2.exports = function getPolyfill() { + if (typeof Uint8Array === "function" && Uint8Array.prototype.slice) { + var ta = new Uint8Array(1); + ta.constructor = function(length) { + return new Uint8Array(length); + }; + try { + ta.slice(); + } catch (e) { + return implementation; + } + return Uint8Array.prototype.slice; + } + return implementation; + }; + } +}); + +// ../../node_modules/.pnpm/typedarray.prototype.slice@1.0.6/node_modules/typedarray.prototype.slice/shim.js +var require_shim3 = __commonJS({ + "../../node_modules/.pnpm/typedarray.prototype.slice@1.0.6/node_modules/typedarray.prototype.slice/shim.js"(exports2, module2) { + "use strict"; + var define2 = require_define_properties(); + var getProto = require_get_proto(); + var getPolyfill = require_polyfill4(); + module2.exports = function shimTypedArraySlice() { + if (typeof Uint8Array === "function") { + var polyfill = getPolyfill(); + var proto = getProto(Uint8Array.prototype); + define2( + proto, + { slice: polyfill }, + { slice: function() { + return proto.slice !== polyfill; + } } + ); + } + return polyfill; + }; + } +}); + +// ../../node_modules/.pnpm/typedarray.prototype.slice@1.0.6/node_modules/typedarray.prototype.slice/index.js +var require_typedarray_prototype = __commonJS({ + "../../node_modules/.pnpm/typedarray.prototype.slice@1.0.6/node_modules/typedarray.prototype.slice/index.js"(exports2, module2) { + "use strict"; + var define2 = require_define_properties(); + var callBind = require_call_bind(); + var implementation = require_implementation6(); + var getPolyfill = require_polyfill4(); + var shim = require_shim3(); + var bound = callBind(getPolyfill()); + define2(bound, { + getPolyfill, + implementation, + shim + }); + module2.exports = bound; + } +}); + +// ../../node_modules/.pnpm/traverse@0.3.10/node_modules/traverse/index.js +var require_traverse = __commonJS({ + "../../node_modules/.pnpm/traverse@0.3.10/node_modules/traverse/index.js"(exports2, module2) { + var whichTypedArray = require_which_typed_array(); + var taSlice = require_typedarray_prototype(); + var gopd = require_gopd(); + var defineDataProperty = require_define_data_property(); + var ToPrimitive = require_es2015(); + function toS(obj2) { + return Object.prototype.toString.call(obj2); + } + function isDate(obj2) { + return toS(obj2) === "[object Date]"; + } + function isRegExp(obj2) { + return toS(obj2) === "[object RegExp]"; + } + function isError2(obj2) { + return toS(obj2) === "[object Error]"; + } + function isBoolean(obj2) { + return toS(obj2) === "[object Boolean]"; + } + function isNumber(obj2) { + return toS(obj2) === "[object Number]"; + } + function isString(obj2) { + return toS(obj2) === "[object String]"; + } + var isArray = Array.isArray || function isArray2(xs) { + return Object.prototype.toString.call(xs) === "[object Array]"; + }; + function forEach(xs, fn) { + if (xs.forEach) { + return xs.forEach(fn); + } + for (var i = 0; i < xs.length; i++) { + fn(xs[i], i, xs); + } + return void 0; + } + var objectKeys = Object.keys || function keys(obj2) { + var res = []; + for (var key in obj2) { + res[res.length] = key; + } + return res; + }; + var propertyIsEnumerable = Object.prototype.propertyIsEnumerable; + var getOwnPropertySymbols = Object.getOwnPropertySymbols; + function ownEnumerableKeys(obj2) { + var res = objectKeys(obj2); + if (getOwnPropertySymbols) { + var symbols = getOwnPropertySymbols(obj2); + for (var i = 0; i < symbols.length; i++) { + if (propertyIsEnumerable.call(obj2, symbols[i])) { + res[res.length] = symbols[i]; + } + } + } + return res; + } + var hasOwnProperty = Object.prototype.hasOwnProperty || function(obj2, key) { + return key in obj2; + }; + function isWritable(object, key) { + if (typeof gopd !== "function") { + return true; + } + var desc = gopd(object, key); + return !desc || !desc.writable; + } + var maxArrayLength = 4294967295; + function isIndex(key) { + if (typeof key === "symbol") { + return false; + } + var index = Number(key); + return index >= 0 && index < maxArrayLength && index % 1 === 0 && String(index) === String(key); + } + function countBelow(ascending, index) { + var low = 0; + var high = ascending.length; + while (low < high) { + var middle = Math.floor((low + high) / 2); + if (ascending[middle] < index) { + low = middle + 1; + } else { + high = middle; + } + } + return low; + } + function wasSpliced(key, spliced) { + return spliced.length > 0 && isIndex(key) && spliced[countBelow(spliced, Number(key))] === Number(key); + } + function shiftedKey(key, spliced) { + if (spliced.length === 0 || !isIndex(key)) { + return key; + } + var shifted = Number(key) - countBelow(spliced, Number(key)); + return typeof key === "number" ? shifted : String(shifted); + } + var hasProtoAccessor = typeof gopd === "function" && !!gopd(Object.prototype, "__proto__"); + function setProperty(object, key, value) { + if (hasProtoAccessor && key === "__proto__" && !hasOwnProperty.call(object, key)) { + defineDataProperty(object, key, value); + } else { + object[key] = value; + } + } + var hasMagicProto = !hasProtoAccessor && {}.__proto__ === Object.prototype; + function toSettableKey(segment) { + var primitive = ToPrimitive(segment, String); + var key = typeof primitive === "symbol" ? primitive : String(primitive); + if (hasMagicProto && key === "__proto__") { + throw new TypeError("`__proto__` can not be set as a property in this engine"); + } + return key; + } + function setOwnProperty(object, key, value) { + "use strict"; + if (hasProtoAccessor && key === "__proto__" && !hasOwnProperty.call(object, key)) { + defineDataProperty(object, key, value); + } else { + object[key] = value; + } + if (Object(object) !== object) { + throw new TypeError("Cannot create property `" + String(key) + "` on a " + typeof object); + } + } + var gPO = Object.getPrototypeOf; + function getProto(obj2) { + return gPO ? gPO(obj2) : obj2.__proto__; + } + var sPO = Object.setPrototypeOf; + function setProto(obj2, proto) { + if (sPO) { + sPO(obj2, proto); + } else { + obj2.__proto__ = proto; + } + } + function copyBoxed(src, valueOf) { + var primitive; + try { + primitive = valueOf.call(src); + } catch (e) { + return Object(src); + } + var dst = Object(primitive); + var proto = getProto(src); + if (proto && proto !== getProto(dst)) { + setProto(dst, proto); + } + return dst; + } + function isStringCharacter(obj2, key) { + return isString(obj2) && isIndex(key) && Number(key) < obj2.length; + } + function copy(src, options) { + if (typeof src === "object" && src !== null) { + var dst; + if (isArray(src)) { + dst = []; + } else if (isDate(src)) { + dst = new Date(src.getTime ? src.getTime() : src); + } else if (isRegExp(src)) { + dst = new RegExp(src); + } else if (isBoolean(src)) { + dst = copyBoxed(src, Boolean.prototype.valueOf); + } else if (isNumber(src)) { + dst = copyBoxed(src, Number.prototype.valueOf); + } else if (isString(src)) { + dst = copyBoxed(src, String.prototype.valueOf); + } else { + var ta = whichTypedArray(src); + if (ta) { + return taSlice(src); + } else if (Object.create && Object.getPrototypeOf) { + dst = Object.create(Object.getPrototypeOf(src)); + } else if (src.constructor === Object) { + dst = {}; + } else { + var proto = src.constructor && src.constructor.prototype || src.__proto__ || {}; + var T = function T2() { + }; + T.prototype = proto; + dst = new T(); + } + } + if (isError2(src)) { + defineDataProperty(dst, "message", src.message); + } + var iteratorFunction = options.includeSymbols ? ownEnumerableKeys : objectKeys; + forEach(iteratorFunction(src), function(key) { + if (!isStringCharacter(dst, key)) { + setProperty(dst, key, src[key]); + } + }); + return dst; + } + return src; + } + var emptyNull = { __proto__: null }; + function getOptions(options) { + return options == null ? emptyNull : options; + } + function walk(root, cb) { + var path = []; + var parents = []; + var alive = true; + var options = arguments.length > 2 ? arguments[2] : emptyNull; + var iteratorFunction = options.includeSymbols ? ownEnumerableKeys : objectKeys; + var immutable = !!options.immutable; + return (function walker(node_, splicedSiblings, originalKey) { + var node = immutable ? copy(node_, options) : node_; + var modifiers = { __proto__: null }; + var keepGoing = true; + var state = { + node, + node_, + path: [].concat(path), + parent: parents[parents.length - 1], + parents, + key: path[path.length - 1], + removedKeys: { __proto__: null }, + isRoot: path.length === 0, + level: path.length, + circular: null, + update: function(x, stopHere) { + if (!state.isRoot && !wasSpliced(originalKey, splicedSiblings)) { + setProperty(state.parent.node, state.key, x); + } + state.node = x; + if (stopHere) { + keepGoing = false; + } + }, + delete: function(stopHere) { + if (!wasSpliced(originalKey, splicedSiblings)) { + delete state.parent.node[state.key]; + state.parent.removedKeys[state.key] = true; + } + if (stopHere) { + keepGoing = false; + } + }, + remove: function(stopHere) { + if (isArray(state.parent.node) && isIndex(originalKey)) { + var index = Number(originalKey); + var at = countBelow(splicedSiblings, index); + while (splicedSiblings[at] === index) { + index += 1; + at += 1; + } + if (index - at < state.parent.node.length) { + state.parent.node.splice(index - at, 1); + splicedSiblings.splice(at, 0, index); + state.parent.removedKeys[state.key] = true; + } + if (stopHere) { + keepGoing = false; + } + } else { + state.delete(stopHere); + } + }, + keys: null, + before: function(f) { + modifiers.before = f; + }, + after: function(f) { + modifiers.after = f; + }, + pre: function(f) { + modifiers.pre = f; + }, + post: function(f) { + modifiers.post = f; + }, + stop: function() { + alive = false; + }, + block: function() { + keepGoing = false; + } + }; + if (!alive) { + return state; + } + function updateState() { + if (typeof state.node === "object" && state.node !== null) { + var nodeKeys = iteratorFunction(state.node); + if (!state.keys || state.node !== node && state.node !== node_) { + state.keys = nodeKeys; + } + state.isLeaf = nodeKeys.length === 0; + for (var i = 0; i < parents.length; i++) { + if (parents[i].node_ === node_) { + state.circular = parents[i]; + break; + } + } + } else { + state.isLeaf = true; + state.keys = null; + } + state.notLeaf = !state.isLeaf; + state.notRoot = !state.isRoot; + } + updateState(); + var ret2 = cb.call(state, state.node); + if (ret2 !== void 0 && state.update) { + state.update(ret2); + } + if (modifiers.before) { + modifiers.before.call(state, state.node); + } + if (!keepGoing) { + return state; + } + if (typeof state.node === "object" && state.node !== null && !state.circular) { + updateState(); + parents[parents.length] = state; + var splicedChildren = []; + forEach(state.keys, function(listedKey, i) { + if (wasSpliced(listedKey, splicedChildren)) { + return; + } + var key = shiftedKey(listedKey, splicedChildren); + path[path.length] = key; + if (modifiers.pre) { + modifiers.pre.call(state, state.node[key], key); + } + var child = walker(state.node[key], splicedChildren, listedKey); + if (immutable && !wasSpliced(listedKey, splicedChildren)) { + var writeKey = shiftedKey(listedKey, splicedChildren); + if (hasOwnProperty.call(state.node, writeKey) && !isWritable(state.node, writeKey)) { + state.node[writeKey] = child.node; + } + } + child.isLast = i === state.keys.length - 1; + child.isFirst = i === 0; + if (modifiers.post) { + modifiers.post.call(state, child); + } + path.pop(); + }); + parents.pop(); + } + if (modifiers.after) { + modifiers.after.call(state, state.node); + } + return state; + })(root, []).node; + } + function Traverse(obj2) { + if (!(this instanceof Traverse)) { + return new Traverse(obj2, getOptions(arguments.length > 1 ? arguments[1] : null)); + } + this.options = getOptions(arguments.length > 1 ? arguments[1] : null); + this.value = obj2; + } + Traverse.prototype.get = function(ps) { + var node = this.value; + for (var i = 0; i < ps.length; i++) { + var key = ps[i]; + if (node == null || !hasOwnProperty.call(node, key)) { + return void 0; + } + node = node[key]; + } + return node; + }; + Traverse.prototype.has = function(ps) { + var node = this.value; + if (!node && ps.length > 0) { + return false; + } + for (var i = 0; i < ps.length; i++) { + var key = ps[i]; + if (node == null || !hasOwnProperty.call(node, key)) { + return false; + } + node = node[key]; + } + return true; + }; + Traverse.prototype.set = function(ps, value) { + var node = this.value; + for (var i = 0; i < ps.length - 1; i++) { + var key = toSettableKey(ps[i]); + if (!hasOwnProperty.call(node, key)) { + setOwnProperty(node, key, {}); + if (!hasOwnProperty.call(node, key)) { + throw new TypeError("Cannot create property `" + String(key) + "` as an own property"); + } + } + node = node[key]; + } + setOwnProperty(node, toSettableKey(ps[i]), value); + return value; + }; + Traverse.prototype.map = function(cb) { + return walk(this.value, cb, { __proto__: null, immutable: true, includeSymbols: !!this.options.includeSymbols }); + }; + Traverse.prototype.forEach = function(cb) { + this.value = walk(this.value, cb, this.options); + return this.value; + }; + Traverse.prototype.reduce = function(cb, init) { + var skip = arguments.length === 1; + var acc = skip ? this.value : init; + this.forEach(function(x) { + if (!this.isRoot || !skip) { + acc = cb.call(this, acc, x); + } + }); + return acc; + }; + Traverse.prototype.deepEqual = function(obj2) { + if (arguments.length !== 1) { + throw new Error("deepEqual requires exactly one object to compare against"); + } + var equal = true; + function notEqual() { + equal = false; + return void 0; + } + var node = obj2; + this.forEach(function(y) { + if (!this.isRoot) { + if (typeof node !== "object") { + return notEqual(); + } + node = node[this.key]; + } + var x = node; + this.post(function() { + node = x; + }); + if (this.circular) { + if (new Traverse(obj2).get(this.circular.path) !== x) { + notEqual(); + } + } else if (typeof x !== typeof y) { + notEqual(); + } else if (x === null || y === null || x === void 0 || y === void 0) { + if (x !== y) { + notEqual(); + } + } else if (x.__proto__ !== y.__proto__) { + notEqual(); + } else if (x === y) { + } else if (typeof x === "function") { + if (x instanceof RegExp) { + if (String(x) !== String(y)) { + notEqual(); + } + } else if (x !== y) { + notEqual(); + } + } else if (typeof x === "object") { + if (toS(y) === "[object Arguments]" || toS(x) === "[object Arguments]") { + if (toS(x) !== toS(y)) { + notEqual(); + } + } else if (toS(y) === "[object RegExp]" || toS(x) === "[object RegExp]") { + if (!x || !y || x.toString() !== y.toString()) { + notEqual(); + } + } else if (x instanceof Date || y instanceof Date) { + if (!(x instanceof Date) || !(y instanceof Date) || x.getTime() !== y.getTime()) { + notEqual(); + } + } else { + var kx = Object.keys(x); + var ky = Object.keys(y); + if (kx.length !== ky.length) { + return notEqual(); + } + for (var i = 0; i < kx.length; i++) { + var k = kx[i]; + if (!Object.hasOwnProperty.call(y, k)) { + notEqual(); + } + } + } + } + }); + return equal; + }; + Traverse.prototype.paths = function() { + var acc = []; + this.forEach(function() { + acc[acc.length] = this.path; + }); + return acc; + }; + Traverse.prototype.nodes = function() { + var acc = []; + this.forEach(function() { + acc[acc.length] = this.node; + }); + return acc; + }; + Traverse.prototype.clone = function() { + var parents = []; + var nodes = []; + var options = this.options; + if (whichTypedArray(this.value)) { + return taSlice(this.value); + } + return (function clone(src) { + for (var i = 0; i < parents.length; i++) { + if (parents[i] === src) { + return nodes[i]; + } + } + if (typeof src === "object" && src !== null) { + var dst = copy(src, options); + parents[parents.length] = src; + nodes[nodes.length] = dst; + var iteratorFunction = options.includeSymbols ? ownEnumerableKeys : objectKeys; + forEach(iteratorFunction(src), function(key) { + if (!isStringCharacter(dst, key)) { + setProperty(dst, key, clone(src[key])); + } + }); + parents.pop(); + nodes.pop(); + return dst; + } + return src; + })(this.value); + }; + forEach(ownEnumerableKeys(Traverse.prototype), function(key) { + Traverse[key] = function(obj2) { + var args = [].slice.call(arguments, 1); + var t = new Traverse(obj2); + return t[key].apply(t, args); + }; + }); + module2.exports = Traverse; + } +}); + +// ../../node_modules/.pnpm/chainsaw@0.1.0/node_modules/chainsaw/index.js +var require_chainsaw = __commonJS({ + "../../node_modules/.pnpm/chainsaw@0.1.0/node_modules/chainsaw/index.js"(exports2, module2) { + var Traverse = require_traverse(); + var EventEmitter = require("events").EventEmitter; + module2.exports = Chainsaw; + function Chainsaw(builder) { + var saw = Chainsaw.saw(builder, {}); + var r = builder.call(saw.handlers, saw); + if (r !== void 0) saw.handlers = r; + saw.record(); + return saw.chain(); + } + Chainsaw.light = function ChainsawLight(builder) { + var saw = Chainsaw.saw(builder, {}); + var r = builder.call(saw.handlers, saw); + if (r !== void 0) saw.handlers = r; + return saw.chain(); + }; + Chainsaw.saw = function(builder, handlers) { + var saw = new EventEmitter(); + saw.handlers = handlers; + saw.actions = []; + saw.chain = function() { + var ch = Traverse(saw.handlers).map(function(node) { + if (this.isRoot) return node; + var ps = this.path; + if (typeof node === "function") { + this.update(function() { + saw.actions.push({ + path: ps, + args: [].slice.call(arguments) + }); + return ch; + }); + } + }); + process.nextTick(function() { + saw.emit("begin"); + saw.next(); + }); + return ch; + }; + saw.pop = function() { + return saw.actions.shift(); + }; + saw.next = function() { + var action = saw.pop(); + if (!action) { + saw.emit("end"); + } else if (!action.trap) { + var node = saw.handlers; + action.path.forEach(function(key) { + node = node[key]; + }); + node.apply(saw.handlers, action.args); + } + }; + saw.nest = function(cb) { + var args = [].slice.call(arguments, 1); + var autonext = true; + if (typeof cb === "boolean") { + var autonext = cb; + cb = args.shift(); + } + var s = Chainsaw.saw(builder, {}); + var r = builder.call(s.handlers, s); + if (r !== void 0) s.handlers = r; + if ("undefined" !== typeof saw.step) { + s.record(); + } + cb.apply(s.chain(), args); + if (autonext !== false) s.on("end", saw.next); + }; + saw.record = function() { + upgradeChainsaw(saw); + }; + ["trap", "down", "jump"].forEach(function(method) { + saw[method] = function() { + throw new Error("To use the trap, down and jump features, please call record() first to start recording actions."); + }; + }); + return saw; + }; + function upgradeChainsaw(saw) { + saw.step = 0; + saw.pop = function() { + return saw.actions[saw.step++]; + }; + saw.trap = function(name, cb) { + var ps = Array.isArray(name) ? name : [name]; + saw.actions.push({ + path: ps, + step: saw.step, + cb, + trap: true + }); + }; + saw.down = function(name) { + var ps = (Array.isArray(name) ? name : [name]).join("/"); + var i = saw.actions.slice(saw.step).map(function(x) { + if (x.trap && x.step <= saw.step) return false; + return x.path.join("/") == ps; + }).indexOf(true); + if (i >= 0) saw.step += i; + else saw.step = saw.actions.length; + var act = saw.actions[saw.step - 1]; + if (act && act.trap) { + saw.step = act.step; + act.cb(); + } else saw.next(); + }; + saw.jump = function(step) { + saw.step = step; + saw.next(); + }; + } + } +}); + +// ../../node_modules/.pnpm/buffers@0.1.1/node_modules/buffers/index.js +var require_buffers = __commonJS({ + "../../node_modules/.pnpm/buffers@0.1.1/node_modules/buffers/index.js"(exports2, module2) { + module2.exports = Buffers; + function Buffers(bufs) { + if (!(this instanceof Buffers)) return new Buffers(bufs); + this.buffers = bufs || []; + this.length = this.buffers.reduce(function(size, buf) { + return size + buf.length; + }, 0); + } + Buffers.prototype.push = function() { + for (var i = 0; i < arguments.length; i++) { + if (!Buffer.isBuffer(arguments[i])) { + throw new TypeError("Tried to push a non-buffer"); + } + } + for (var i = 0; i < arguments.length; i++) { + var buf = arguments[i]; + this.buffers.push(buf); + this.length += buf.length; + } + return this.length; + }; + Buffers.prototype.unshift = function() { + for (var i = 0; i < arguments.length; i++) { + if (!Buffer.isBuffer(arguments[i])) { + throw new TypeError("Tried to unshift a non-buffer"); + } + } + for (var i = 0; i < arguments.length; i++) { + var buf = arguments[i]; + this.buffers.unshift(buf); + this.length += buf.length; + } + return this.length; + }; + Buffers.prototype.copy = function(dst, dStart, start, end) { + return this.slice(start, end).copy(dst, dStart, 0, end - start); + }; + Buffers.prototype.splice = function(i, howMany) { + var buffers = this.buffers; + var index = i >= 0 ? i : this.length - i; + var reps = [].slice.call(arguments, 2); + if (howMany === void 0) { + howMany = this.length - index; + } else if (howMany > this.length - index) { + howMany = this.length - index; + } + for (var i = 0; i < reps.length; i++) { + this.length += reps[i].length; + } + var removed = new Buffers(); + var bytes = 0; + var startBytes = 0; + for (var ii = 0; ii < buffers.length && startBytes + buffers[ii].length < index; ii++) { + startBytes += buffers[ii].length; + } + if (index - startBytes > 0) { + var start = index - startBytes; + if (start + howMany < buffers[ii].length) { + removed.push(buffers[ii].slice(start, start + howMany)); + var orig = buffers[ii]; + var buf0 = new Buffer(start); + for (var i = 0; i < start; i++) { + buf0[i] = orig[i]; + } + var buf1 = new Buffer(orig.length - start - howMany); + for (var i = start + howMany; i < orig.length; i++) { + buf1[i - howMany - start] = orig[i]; + } + if (reps.length > 0) { + var reps_ = reps.slice(); + reps_.unshift(buf0); + reps_.push(buf1); + buffers.splice.apply(buffers, [ii, 1].concat(reps_)); + ii += reps_.length; + reps = []; + } else { + buffers.splice(ii, 1, buf0, buf1); + ii += 2; + } + } else { + removed.push(buffers[ii].slice(start)); + buffers[ii] = buffers[ii].slice(0, start); + ii++; + } + } + if (reps.length > 0) { + buffers.splice.apply(buffers, [ii, 0].concat(reps)); + ii += reps.length; + } + while (removed.length < howMany) { + var buf = buffers[ii]; + var len = buf.length; + var take = Math.min(len, howMany - removed.length); + if (take === len) { + removed.push(buf); + buffers.splice(ii, 1); + } else { + removed.push(buf.slice(0, take)); + buffers[ii] = buffers[ii].slice(take); + } + } + this.length -= removed.length; + return removed; + }; + Buffers.prototype.slice = function(i, j) { + var buffers = this.buffers; + if (j === void 0) j = this.length; + if (i === void 0) i = 0; + if (j > this.length) j = this.length; + var startBytes = 0; + for (var si = 0; si < buffers.length && startBytes + buffers[si].length <= i; si++) { + startBytes += buffers[si].length; + } + var target = new Buffer(j - i); + var ti = 0; + for (var ii = si; ti < j - i && ii < buffers.length; ii++) { + var len = buffers[ii].length; + var start = ti === 0 ? i - startBytes : 0; + var end = ti + len >= j - i ? Math.min(start + (j - i) - ti, len) : len; + buffers[ii].copy(target, ti, start, end); + ti += end - start; + } + return target; + }; + Buffers.prototype.pos = function(i) { + if (i < 0 || i >= this.length) throw new Error("oob"); + var l2 = i, bi = 0, bu = null; + for (; ; ) { + bu = this.buffers[bi]; + if (l2 < bu.length) { + return { buf: bi, offset: l2 }; + } else { + l2 -= bu.length; + } + bi++; + } + }; + Buffers.prototype.get = function get(i) { + var pos = this.pos(i); + return this.buffers[pos.buf].get(pos.offset); + }; + Buffers.prototype.set = function set(i, b) { + var pos = this.pos(i); + return this.buffers[pos.buf].set(pos.offset, b); + }; + Buffers.prototype.indexOf = function(needle, offset) { + if ("string" === typeof needle) { + needle = new Buffer(needle); + } else if (needle instanceof Buffer) { + } else { + throw new Error("Invalid type for a search string"); + } + if (!needle.length) { + return 0; + } + if (!this.length) { + return -1; + } + var i = 0, j = 0, match = 0, mstart, pos = 0; + if (offset) { + var p = this.pos(offset); + i = p.buf; + j = p.offset; + pos = offset; + } + for (; ; ) { + while (j >= this.buffers[i].length) { + j = 0; + i++; + if (i >= this.buffers.length) { + return -1; + } + } + var char = this.buffers[i][j]; + if (char == needle[match]) { + if (match == 0) { + mstart = { + i, + j, + pos + }; + } + match++; + if (match == needle.length) { + return mstart.pos; + } + } else if (match != 0) { + i = mstart.i; + j = mstart.j; + pos = mstart.pos; + match = 0; + } + j++; + pos++; + } + }; + Buffers.prototype.toBuffer = function() { + return this.slice(); + }; + Buffers.prototype.toString = function(encoding, start, end) { + return this.slice(start, end).toString(encoding); + }; + } +}); + +// ../../node_modules/.pnpm/binary@0.3.0/node_modules/binary/lib/vars.js +var require_vars = __commonJS({ + "../../node_modules/.pnpm/binary@0.3.0/node_modules/binary/lib/vars.js"(exports2, module2) { + module2.exports = function(store) { + function getset(name, value) { + var node = vars.store; + var keys = name.split("."); + keys.slice(0, -1).forEach(function(k) { + if (node[k] === void 0) node[k] = {}; + node = node[k]; + }); + var key = keys[keys.length - 1]; + if (arguments.length == 1) { + return node[key]; + } else { + return node[key] = value; + } + } + var vars = { + get: function(name) { + return getset(name); + }, + set: function(name, value) { + return getset(name, value); + }, + store: store || {} + }; + return vars; + }; + } +}); + +// ../../node_modules/.pnpm/binary@0.3.0/node_modules/binary/index.js +var require_binary = __commonJS({ + "../../node_modules/.pnpm/binary@0.3.0/node_modules/binary/index.js"(exports2, module2) { + var Chainsaw = require_chainsaw(); + var EventEmitter = require("events").EventEmitter; + var Buffers = require_buffers(); + var Vars = require_vars(); + var Stream = require("stream").Stream; + exports2 = module2.exports = function(bufOrEm, eventName) { + if (Buffer.isBuffer(bufOrEm)) { + return exports2.parse(bufOrEm); + } + var s = exports2.stream(); + if (bufOrEm && bufOrEm.pipe) { + bufOrEm.pipe(s); + } else if (bufOrEm) { + bufOrEm.on(eventName || "data", function(buf) { + s.write(buf); + }); + bufOrEm.on("end", function() { + s.end(); + }); + } + return s; + }; + exports2.stream = function(input) { + if (input) return exports2.apply(null, arguments); + var pending = null; + function getBytes(bytes, cb, skip) { + pending = { + bytes, + skip, + cb: function(buf) { + pending = null; + cb(buf); + } + }; + dispatch(); + } + var offset = null; + function dispatch() { + if (!pending) { + if (caughtEnd) done = true; + return; + } + if (typeof pending === "function") { + pending(); + } else { + var bytes = offset + pending.bytes; + if (buffers.length >= bytes) { + var buf; + if (offset == null) { + buf = buffers.splice(0, bytes); + if (!pending.skip) { + buf = buf.slice(); + } + } else { + if (!pending.skip) { + buf = buffers.slice(offset, bytes); + } + offset = bytes; + } + if (pending.skip) { + pending.cb(); + } else { + pending.cb(buf); + } + } + } + } + function builder(saw) { + function next() { + if (!done) saw.next(); + } + var self2 = words(function(bytes, cb) { + return function(name) { + getBytes(bytes, function(buf) { + vars.set(name, cb(buf)); + next(); + }); + }; + }); + self2.tap = function(cb) { + saw.nest(cb, vars.store); + }; + self2.into = function(key, cb) { + if (!vars.get(key)) vars.set(key, {}); + var parent = vars; + vars = Vars(parent.get(key)); + saw.nest(function() { + cb.apply(this, arguments); + this.tap(function() { + vars = parent; + }); + }, vars.store); + }; + self2.flush = function() { + vars.store = {}; + next(); + }; + self2.loop = function(cb) { + var end = false; + saw.nest(false, function loop() { + this.vars = vars.store; + cb.call(this, function() { + end = true; + next(); + }, vars.store); + this.tap(function() { + if (end) saw.next(); + else loop.call(this); + }.bind(this)); + }, vars.store); + }; + self2.buffer = function(name, bytes) { + if (typeof bytes === "string") { + bytes = vars.get(bytes); + } + getBytes(bytes, function(buf) { + vars.set(name, buf); + next(); + }); + }; + self2.skip = function(bytes) { + if (typeof bytes === "string") { + bytes = vars.get(bytes); + } + getBytes(bytes, function() { + next(); + }); + }; + self2.scan = function find(name, search) { + if (typeof search === "string") { + search = new Buffer(search); + } else if (!Buffer.isBuffer(search)) { + throw new Error("search must be a Buffer or a string"); + } + var taken = 0; + pending = function() { + var pos = buffers.indexOf(search, offset + taken); + var i = pos - offset - taken; + if (pos !== -1) { + pending = null; + if (offset != null) { + vars.set( + name, + buffers.slice(offset, offset + taken + i) + ); + offset += taken + i + search.length; + } else { + vars.set( + name, + buffers.slice(0, taken + i) + ); + buffers.splice(0, taken + i + search.length); + } + next(); + dispatch(); + } else { + i = Math.max(buffers.length - search.length - offset - taken, 0); + } + taken += i; + }; + dispatch(); + }; + self2.peek = function(cb) { + offset = 0; + saw.nest(function() { + cb.call(this, vars.store); + this.tap(function() { + offset = null; + }); + }); + }; + return self2; + } + ; + var stream = Chainsaw.light(builder); + stream.writable = true; + var buffers = Buffers(); + stream.write = function(buf) { + buffers.push(buf); + dispatch(); + }; + var vars = Vars(); + var done = false, caughtEnd = false; + stream.end = function() { + caughtEnd = true; + }; + stream.pipe = Stream.prototype.pipe; + Object.getOwnPropertyNames(EventEmitter.prototype).forEach(function(name) { + stream[name] = EventEmitter.prototype[name]; + }); + return stream; + }; + exports2.parse = function parse2(buffer) { + var self2 = words(function(bytes, cb) { + return function(name) { + if (offset + bytes <= buffer.length) { + var buf = buffer.slice(offset, offset + bytes); + offset += bytes; + vars.set(name, cb(buf)); + } else { + vars.set(name, null); + } + return self2; + }; + }); + var offset = 0; + var vars = Vars(); + self2.vars = vars.store; + self2.tap = function(cb) { + cb.call(self2, vars.store); + return self2; + }; + self2.into = function(key, cb) { + if (!vars.get(key)) { + vars.set(key, {}); + } + var parent = vars; + vars = Vars(parent.get(key)); + cb.call(self2, vars.store); + vars = parent; + return self2; + }; + self2.loop = function(cb) { + var end = false; + var ender = function() { + end = true; + }; + while (end === false) { + cb.call(self2, ender, vars.store); + } + return self2; + }; + self2.buffer = function(name, size) { + if (typeof size === "string") { + size = vars.get(size); + } + var buf = buffer.slice(offset, Math.min(buffer.length, offset + size)); + offset += size; + vars.set(name, buf); + return self2; + }; + self2.skip = function(bytes) { + if (typeof bytes === "string") { + bytes = vars.get(bytes); + } + offset += bytes; + return self2; + }; + self2.scan = function(name, search) { + if (typeof search === "string") { + search = new Buffer(search); + } else if (!Buffer.isBuffer(search)) { + throw new Error("search must be a Buffer or a string"); + } + vars.set(name, null); + for (var i = 0; i + offset <= buffer.length - search.length + 1; i++) { + for (var j = 0; j < search.length && buffer[offset + i + j] === search[j]; j++) ; + if (j === search.length) break; + } + vars.set(name, buffer.slice(offset, offset + i)); + offset += i + search.length; + return self2; + }; + self2.peek = function(cb) { + var was = offset; + cb.call(self2, vars.store); + offset = was; + return self2; + }; + self2.flush = function() { + vars.store = {}; + return self2; + }; + self2.eof = function() { + return offset >= buffer.length; + }; + return self2; + }; + function decodeLEu(bytes) { + var acc = 0; + for (var i = 0; i < bytes.length; i++) { + acc += Math.pow(256, i) * bytes[i]; + } + return acc; + } + function decodeBEu(bytes) { + var acc = 0; + for (var i = 0; i < bytes.length; i++) { + acc += Math.pow(256, bytes.length - i - 1) * bytes[i]; + } + return acc; + } + function decodeBEs(bytes) { + var val = decodeBEu(bytes); + if ((bytes[0] & 128) == 128) { + val -= Math.pow(256, bytes.length); + } + return val; + } + function decodeLEs(bytes) { + var val = decodeLEu(bytes); + if ((bytes[bytes.length - 1] & 128) == 128) { + val -= Math.pow(256, bytes.length); + } + return val; + } + function words(decode) { + var self2 = {}; + [1, 2, 4, 8].forEach(function(bytes) { + var bits = bytes * 8; + self2["word" + bits + "le"] = self2["word" + bits + "lu"] = decode(bytes, decodeLEu); + self2["word" + bits + "ls"] = decode(bytes, decodeLEs); + self2["word" + bits + "be"] = self2["word" + bits + "bu"] = decode(bytes, decodeBEu); + self2["word" + bits + "bs"] = decode(bytes, decodeBEs); + }); + self2.word8 = self2.word8u = self2.word8be; + self2.word8s = self2.word8bs; + return self2; + } + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/es5.js +var require_es5 = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/es5.js"(exports2, module2) { + var isES5 = (function() { + "use strict"; + return this === void 0; + })(); + if (isES5) { + module2.exports = { + freeze: Object.freeze, + defineProperty: Object.defineProperty, + getDescriptor: Object.getOwnPropertyDescriptor, + keys: Object.keys, + names: Object.getOwnPropertyNames, + getPrototypeOf: Object.getPrototypeOf, + isArray: Array.isArray, + isES5, + propertyIsWritable: function(obj2, prop) { + var descriptor = Object.getOwnPropertyDescriptor(obj2, prop); + return !!(!descriptor || descriptor.writable || descriptor.set); + } + }; + } else { + has = {}.hasOwnProperty; + str = {}.toString; + proto = {}.constructor.prototype; + ObjectKeys = function(o) { + var ret2 = []; + for (var key in o) { + if (has.call(o, key)) { + ret2.push(key); + } + } + return ret2; + }; + ObjectGetDescriptor = function(o, key) { + return { value: o[key] }; + }; + ObjectDefineProperty = function(o, key, desc) { + o[key] = desc.value; + return o; + }; + ObjectFreeze = function(obj2) { + return obj2; + }; + ObjectGetPrototypeOf = function(obj2) { + try { + return Object(obj2).constructor.prototype; + } catch (e) { + return proto; + } + }; + ArrayIsArray = function(obj2) { + try { + return str.call(obj2) === "[object Array]"; + } catch (e) { + return false; + } + }; + module2.exports = { + isArray: ArrayIsArray, + keys: ObjectKeys, + names: ObjectKeys, + defineProperty: ObjectDefineProperty, + getDescriptor: ObjectGetDescriptor, + freeze: ObjectFreeze, + getPrototypeOf: ObjectGetPrototypeOf, + isES5, + propertyIsWritable: function() { + return true; + } + }; + } + var has; + var str; + var proto; + var ObjectKeys; + var ObjectGetDescriptor; + var ObjectDefineProperty; + var ObjectFreeze; + var ObjectGetPrototypeOf; + var ArrayIsArray; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/util.js +var require_util5 = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/util.js"(exports, module) { + "use strict"; + var es5 = require_es5(); + var canEvaluate = typeof navigator == "undefined"; + var errorObj = { e: {} }; + var tryCatchTarget; + var globalObject = typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : exports !== void 0 ? exports : null; + function tryCatcher() { + try { + var target = tryCatchTarget; + tryCatchTarget = null; + return target.apply(this, arguments); + } catch (e) { + errorObj.e = e; + return errorObj; + } + } + function tryCatch(fn) { + tryCatchTarget = fn; + return tryCatcher; + } + var inherits = function(Child, Parent) { + var hasProp = {}.hasOwnProperty; + function T() { + this.constructor = Child; + this.constructor$ = Parent; + for (var propertyName in Parent.prototype) { + if (hasProp.call(Parent.prototype, propertyName) && propertyName.charAt(propertyName.length - 1) !== "$") { + this[propertyName + "$"] = Parent.prototype[propertyName]; + } + } + } + T.prototype = Parent.prototype; + Child.prototype = new T(); + return Child.prototype; + }; + function isPrimitive(val) { + return val == null || val === true || val === false || typeof val === "string" || typeof val === "number"; + } + function isObject(value) { + return typeof value === "function" || typeof value === "object" && value !== null; + } + function maybeWrapAsError(maybeError) { + if (!isPrimitive(maybeError)) return maybeError; + return new Error(safeToString(maybeError)); + } + function withAppended(target, appendee) { + var len = target.length; + var ret2 = new Array(len + 1); + var i; + for (i = 0; i < len; ++i) { + ret2[i] = target[i]; + } + ret2[i] = appendee; + return ret2; + } + function getDataPropertyOrDefault(obj2, key, defaultValue) { + if (es5.isES5) { + var desc = Object.getOwnPropertyDescriptor(obj2, key); + if (desc != null) { + return desc.get == null && desc.set == null ? desc.value : defaultValue; + } + } else { + return {}.hasOwnProperty.call(obj2, key) ? obj2[key] : void 0; + } + } + function notEnumerableProp(obj2, name, value) { + if (isPrimitive(obj2)) return obj2; + var descriptor = { + value, + configurable: true, + enumerable: false, + writable: true + }; + es5.defineProperty(obj2, name, descriptor); + return obj2; + } + function thrower(r) { + throw r; + } + var inheritedDataKeys = (function() { + var excludedPrototypes = [ + Array.prototype, + Object.prototype, + Function.prototype + ]; + var isExcludedProto = function(val) { + for (var i = 0; i < excludedPrototypes.length; ++i) { + if (excludedPrototypes[i] === val) { + return true; + } + } + return false; + }; + if (es5.isES5) { + var getKeys = Object.getOwnPropertyNames; + return function(obj2) { + var ret2 = []; + var visitedKeys = /* @__PURE__ */ Object.create(null); + while (obj2 != null && !isExcludedProto(obj2)) { + var keys; + try { + keys = getKeys(obj2); + } catch (e) { + return ret2; + } + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + if (visitedKeys[key]) continue; + visitedKeys[key] = true; + var desc = Object.getOwnPropertyDescriptor(obj2, key); + if (desc != null && desc.get == null && desc.set == null) { + ret2.push(key); + } + } + obj2 = es5.getPrototypeOf(obj2); + } + return ret2; + }; + } else { + var hasProp = {}.hasOwnProperty; + return function(obj2) { + if (isExcludedProto(obj2)) return []; + var ret2 = []; + enumeration: for (var key in obj2) { + if (hasProp.call(obj2, key)) { + ret2.push(key); + } else { + for (var i = 0; i < excludedPrototypes.length; ++i) { + if (hasProp.call(excludedPrototypes[i], key)) { + continue enumeration; + } + } + ret2.push(key); + } + } + return ret2; + }; + } + })(); + var thisAssignmentPattern = /this\s*\.\s*\S+\s*=/; + function isClass(fn) { + try { + if (typeof fn === "function") { + var keys = es5.names(fn.prototype); + var hasMethods = es5.isES5 && keys.length > 1; + var hasMethodsOtherThanConstructor = keys.length > 0 && !(keys.length === 1 && keys[0] === "constructor"); + var hasThisAssignmentAndStaticMethods = thisAssignmentPattern.test(fn + "") && es5.names(fn).length > 0; + if (hasMethods || hasMethodsOtherThanConstructor || hasThisAssignmentAndStaticMethods) { + return true; + } + } + return false; + } catch (e) { + return false; + } + } + function toFastProperties(obj) { + function FakeConstructor() { + } + FakeConstructor.prototype = obj; + var l = 8; + while (l--) new FakeConstructor(); + return obj; + eval(obj); + } + var rident = /^[a-z$_][a-z$_0-9]*$/i; + function isIdentifier(str) { + return rident.test(str); + } + function filledRange(count, prefix, suffix) { + var ret2 = new Array(count); + for (var i = 0; i < count; ++i) { + ret2[i] = prefix + i + suffix; + } + return ret2; + } + function safeToString(obj2) { + try { + return obj2 + ""; + } catch (e) { + return "[no string representation]"; + } + } + function isError(obj2) { + return obj2 !== null && typeof obj2 === "object" && typeof obj2.message === "string" && typeof obj2.name === "string"; + } + function markAsOriginatingFromRejection(e) { + try { + notEnumerableProp(e, "isOperational", true); + } catch (ignore) { + } + } + function originatesFromRejection(e) { + if (e == null) return false; + return e instanceof Error["__BluebirdErrorTypes__"].OperationalError || e["isOperational"] === true; + } + function canAttachTrace(obj2) { + return isError(obj2) && es5.propertyIsWritable(obj2, "stack"); + } + var ensureErrorObject = (function() { + if (!("stack" in new Error())) { + return function(value) { + if (canAttachTrace(value)) return value; + try { + throw new Error(safeToString(value)); + } catch (err) { + return err; + } + }; + } else { + return function(value) { + if (canAttachTrace(value)) return value; + return new Error(safeToString(value)); + }; + } + })(); + function classString(obj2) { + return {}.toString.call(obj2); + } + function copyDescriptors(from, to, filter) { + var keys = es5.names(from); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + if (filter(key)) { + try { + es5.defineProperty(to, key, es5.getDescriptor(from, key)); + } catch (ignore) { + } + } + } + } + var asArray = function(v) { + if (es5.isArray(v)) { + return v; + } + return null; + }; + if (typeof Symbol !== "undefined" && Symbol.iterator) { + ArrayFrom = typeof Array.from === "function" ? function(v) { + return Array.from(v); + } : function(v) { + var ret2 = []; + var it = v[Symbol.iterator](); + var itResult; + while (!(itResult = it.next()).done) { + ret2.push(itResult.value); + } + return ret2; + }; + asArray = function(v) { + if (es5.isArray(v)) { + return v; + } else if (v != null && typeof v[Symbol.iterator] === "function") { + return ArrayFrom(v); + } + return null; + }; + } + var ArrayFrom; + var isNode = typeof process !== "undefined" && classString(process).toLowerCase() === "[object process]"; + var hasEnvVariables = typeof process !== "undefined" && typeof process.env !== "undefined"; + function env(key) { + return hasEnvVariables ? process.env[key] : void 0; + } + function getNativePromise() { + if (typeof Promise === "function") { + try { + var promise = new Promise(function() { + }); + if ({}.toString.call(promise) === "[object Promise]") { + return Promise; + } + } catch (e) { + } + } + } + function domainBind(self2, cb) { + return self2.bind(cb); + } + var ret = { + isClass, + isIdentifier, + inheritedDataKeys, + getDataPropertyOrDefault, + thrower, + isArray: es5.isArray, + asArray, + notEnumerableProp, + isPrimitive, + isObject, + isError, + canEvaluate, + errorObj, + tryCatch, + inherits, + withAppended, + maybeWrapAsError, + toFastProperties, + filledRange, + toString: safeToString, + canAttachTrace, + ensureErrorObject, + originatesFromRejection, + markAsOriginatingFromRejection, + classString, + copyDescriptors, + hasDevTools: typeof chrome !== "undefined" && chrome && typeof chrome.loadTimes === "function", + isNode, + hasEnvVariables, + env, + global: globalObject, + getNativePromise, + domainBind + }; + ret.isRecentNode = ret.isNode && (function() { + var version2 = process.versions.node.split(".").map(Number); + return version2[0] === 0 && version2[1] > 10 || version2[0] > 0; + })(); + if (ret.isNode) ret.toFastProperties(process); + try { + throw new Error(); + } catch (e) { + ret.lastLineError = e; + } + module.exports = ret; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/schedule.js +var require_schedule = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/schedule.js"(exports2, module2) { + "use strict"; + var util2 = require_util5(); + var schedule; + var noAsyncScheduler = function() { + throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n"); + }; + var NativePromise = util2.getNativePromise(); + if (util2.isNode && typeof MutationObserver === "undefined") { + GlobalSetImmediate = global.setImmediate; + ProcessNextTick = process.nextTick; + schedule = util2.isRecentNode ? function(fn) { + GlobalSetImmediate.call(global, fn); + } : function(fn) { + ProcessNextTick.call(process, fn); + }; + } else if (typeof NativePromise === "function" && typeof NativePromise.resolve === "function") { + nativePromise = NativePromise.resolve(); + schedule = function(fn) { + nativePromise.then(fn); + }; + } else if (typeof MutationObserver !== "undefined" && !(typeof window !== "undefined" && window.navigator && (window.navigator.standalone || window.cordova))) { + schedule = (function() { + var div = document.createElement("div"); + var opts = { attributes: true }; + var toggleScheduled = false; + var div2 = document.createElement("div"); + var o2 = new MutationObserver(function() { + div.classList.toggle("foo"); + toggleScheduled = false; + }); + o2.observe(div2, opts); + var scheduleToggle = function() { + if (toggleScheduled) return; + toggleScheduled = true; + div2.classList.toggle("foo"); + }; + return function schedule2(fn) { + var o = new MutationObserver(function() { + o.disconnect(); + fn(); + }); + o.observe(div, opts); + scheduleToggle(); + }; + })(); + } else if (typeof setImmediate !== "undefined") { + schedule = function(fn) { + setImmediate(fn); + }; + } else if (typeof setTimeout !== "undefined") { + schedule = function(fn) { + setTimeout(fn, 0); + }; + } else { + schedule = noAsyncScheduler; + } + var GlobalSetImmediate; + var ProcessNextTick; + var nativePromise; + module2.exports = schedule; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/queue.js +var require_queue2 = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/queue.js"(exports2, module2) { + "use strict"; + function arrayMove(src, srcIndex, dst, dstIndex, len) { + for (var j = 0; j < len; ++j) { + dst[j + dstIndex] = src[j + srcIndex]; + src[j + srcIndex] = void 0; + } + } + function Queue(capacity) { + this._capacity = capacity; + this._length = 0; + this._front = 0; + } + Queue.prototype._willBeOverCapacity = function(size) { + return this._capacity < size; + }; + Queue.prototype._pushOne = function(arg) { + var length = this.length(); + this._checkCapacity(length + 1); + var i = this._front + length & this._capacity - 1; + this[i] = arg; + this._length = length + 1; + }; + Queue.prototype.push = function(fn, receiver, arg) { + var length = this.length() + 3; + if (this._willBeOverCapacity(length)) { + this._pushOne(fn); + this._pushOne(receiver); + this._pushOne(arg); + return; + } + var j = this._front + length - 3; + this._checkCapacity(length); + var wrapMask = this._capacity - 1; + this[j + 0 & wrapMask] = fn; + this[j + 1 & wrapMask] = receiver; + this[j + 2 & wrapMask] = arg; + this._length = length; + }; + Queue.prototype.shift = function() { + var front = this._front, ret2 = this[front]; + this[front] = void 0; + this._front = front + 1 & this._capacity - 1; + this._length--; + return ret2; + }; + Queue.prototype.length = function() { + return this._length; + }; + Queue.prototype._checkCapacity = function(size) { + if (this._capacity < size) { + this._resizeTo(this._capacity << 1); + } + }; + Queue.prototype._resizeTo = function(capacity) { + var oldCapacity = this._capacity; + this._capacity = capacity; + var front = this._front; + var length = this._length; + var moveItemsCount = front + length & oldCapacity - 1; + arrayMove(this, 0, this, oldCapacity, moveItemsCount); + }; + module2.exports = Queue; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/async.js +var require_async3 = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/async.js"(exports2, module2) { + "use strict"; + var firstLineError; + try { + throw new Error(); + } catch (e) { + firstLineError = e; + } + var schedule = require_schedule(); + var Queue = require_queue2(); + var util2 = require_util5(); + function Async() { + this._customScheduler = false; + this._isTickUsed = false; + this._lateQueue = new Queue(16); + this._normalQueue = new Queue(16); + this._haveDrainedQueues = false; + this._trampolineEnabled = true; + var self2 = this; + this.drainQueues = function() { + self2._drainQueues(); + }; + this._schedule = schedule; + } + Async.prototype.setScheduler = function(fn) { + var prev = this._schedule; + this._schedule = fn; + this._customScheduler = true; + return prev; + }; + Async.prototype.hasCustomScheduler = function() { + return this._customScheduler; + }; + Async.prototype.enableTrampoline = function() { + this._trampolineEnabled = true; + }; + Async.prototype.disableTrampolineIfNecessary = function() { + if (util2.hasDevTools) { + this._trampolineEnabled = false; + } + }; + Async.prototype.haveItemsQueued = function() { + return this._isTickUsed || this._haveDrainedQueues; + }; + Async.prototype.fatalError = function(e, isNode2) { + if (isNode2) { + process.stderr.write("Fatal " + (e instanceof Error ? e.stack : e) + "\n"); + process.exit(2); + } else { + this.throwLater(e); + } + }; + Async.prototype.throwLater = function(fn, arg) { + if (arguments.length === 1) { + arg = fn; + fn = function() { + throw arg; + }; + } + if (typeof setTimeout !== "undefined") { + setTimeout(function() { + fn(arg); + }, 0); + } else try { + this._schedule(function() { + fn(arg); + }); + } catch (e) { + throw new Error("No async scheduler available\n\n See http://goo.gl/MqrFmX\n"); + } + }; + function AsyncInvokeLater(fn, receiver, arg) { + this._lateQueue.push(fn, receiver, arg); + this._queueTick(); + } + function AsyncInvoke(fn, receiver, arg) { + this._normalQueue.push(fn, receiver, arg); + this._queueTick(); + } + function AsyncSettlePromises(promise) { + this._normalQueue._pushOne(promise); + this._queueTick(); + } + if (!util2.hasDevTools) { + Async.prototype.invokeLater = AsyncInvokeLater; + Async.prototype.invoke = AsyncInvoke; + Async.prototype.settlePromises = AsyncSettlePromises; + } else { + Async.prototype.invokeLater = function(fn, receiver, arg) { + if (this._trampolineEnabled) { + AsyncInvokeLater.call(this, fn, receiver, arg); + } else { + this._schedule(function() { + setTimeout(function() { + fn.call(receiver, arg); + }, 100); + }); + } + }; + Async.prototype.invoke = function(fn, receiver, arg) { + if (this._trampolineEnabled) { + AsyncInvoke.call(this, fn, receiver, arg); + } else { + this._schedule(function() { + fn.call(receiver, arg); + }); + } + }; + Async.prototype.settlePromises = function(promise) { + if (this._trampolineEnabled) { + AsyncSettlePromises.call(this, promise); + } else { + this._schedule(function() { + promise._settlePromises(); + }); + } + }; + } + Async.prototype._drainQueue = function(queue) { + while (queue.length() > 0) { + var fn = queue.shift(); + if (typeof fn !== "function") { + fn._settlePromises(); + continue; + } + var receiver = queue.shift(); + var arg = queue.shift(); + fn.call(receiver, arg); + } + }; + Async.prototype._drainQueues = function() { + this._drainQueue(this._normalQueue); + this._reset(); + this._haveDrainedQueues = true; + this._drainQueue(this._lateQueue); + }; + Async.prototype._queueTick = function() { + if (!this._isTickUsed) { + this._isTickUsed = true; + this._schedule(this.drainQueues); + } + }; + Async.prototype._reset = function() { + this._isTickUsed = false; + }; + module2.exports = Async; + module2.exports.firstLineError = firstLineError; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/errors.js +var require_errors2 = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/errors.js"(exports2, module2) { + "use strict"; + var es52 = require_es5(); + var Objectfreeze = es52.freeze; + var util2 = require_util5(); + var inherits2 = util2.inherits; + var notEnumerableProp2 = util2.notEnumerableProp; + function subError(nameProperty, defaultMessage) { + function SubError(message) { + if (!(this instanceof SubError)) return new SubError(message); + notEnumerableProp2( + this, + "message", + typeof message === "string" ? message : defaultMessage + ); + notEnumerableProp2(this, "name", nameProperty); + if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } else { + Error.call(this); + } + } + inherits2(SubError, Error); + return SubError; + } + var _TypeError; + var _RangeError; + var Warning = subError("Warning", "warning"); + var CancellationError = subError("CancellationError", "cancellation error"); + var TimeoutError = subError("TimeoutError", "timeout error"); + var AggregateError2 = subError("AggregateError", "aggregate error"); + try { + _TypeError = TypeError; + _RangeError = RangeError; + } catch (e) { + _TypeError = subError("TypeError", "type error"); + _RangeError = subError("RangeError", "range error"); + } + var methods = "join pop push shift unshift slice filter forEach some every map indexOf lastIndexOf reduce reduceRight sort reverse".split(" "); + for (i = 0; i < methods.length; ++i) { + if (typeof Array.prototype[methods[i]] === "function") { + AggregateError2.prototype[methods[i]] = Array.prototype[methods[i]]; + } + } + var i; + es52.defineProperty(AggregateError2.prototype, "length", { + value: 0, + configurable: false, + writable: true, + enumerable: true + }); + AggregateError2.prototype["isOperational"] = true; + var level = 0; + AggregateError2.prototype.toString = function() { + var indent = Array(level * 4 + 1).join(" "); + var ret2 = "\n" + indent + "AggregateError of:\n"; + level++; + indent = Array(level * 4 + 1).join(" "); + for (var i2 = 0; i2 < this.length; ++i2) { + var str = this[i2] === this ? "[Circular AggregateError]" : this[i2] + ""; + var lines = str.split("\n"); + for (var j = 0; j < lines.length; ++j) { + lines[j] = indent + lines[j]; + } + str = lines.join("\n"); + ret2 += str + "\n"; + } + level--; + return ret2; + }; + function OperationalError(message) { + if (!(this instanceof OperationalError)) + return new OperationalError(message); + notEnumerableProp2(this, "name", "OperationalError"); + notEnumerableProp2(this, "message", message); + this.cause = message; + this["isOperational"] = true; + if (message instanceof Error) { + notEnumerableProp2(this, "message", message.message); + notEnumerableProp2(this, "stack", message.stack); + } else if (Error.captureStackTrace) { + Error.captureStackTrace(this, this.constructor); + } + } + inherits2(OperationalError, Error); + var errorTypes = Error["__BluebirdErrorTypes__"]; + if (!errorTypes) { + errorTypes = Objectfreeze({ + CancellationError, + TimeoutError, + OperationalError, + RejectionError: OperationalError, + AggregateError: AggregateError2 + }); + es52.defineProperty(Error, "__BluebirdErrorTypes__", { + value: errorTypes, + writable: false, + enumerable: false, + configurable: false + }); + } + module2.exports = { + Error, + TypeError: _TypeError, + RangeError: _RangeError, + CancellationError: errorTypes.CancellationError, + OperationalError: errorTypes.OperationalError, + TimeoutError: errorTypes.TimeoutError, + AggregateError: errorTypes.AggregateError, + Warning + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/thenables.js +var require_thenables = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/thenables.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, INTERNAL) { + var util2 = require_util5(); + var errorObj2 = util2.errorObj; + var isObject2 = util2.isObject; + function tryConvertToPromise(obj2, context) { + if (isObject2(obj2)) { + if (obj2 instanceof Promise2) return obj2; + var then = getThen(obj2); + if (then === errorObj2) { + if (context) context._pushContext(); + var ret2 = Promise2.reject(then.e); + if (context) context._popContext(); + return ret2; + } else if (typeof then === "function") { + if (isAnyBluebirdPromise(obj2)) { + var ret2 = new Promise2(INTERNAL); + obj2._then( + ret2._fulfill, + ret2._reject, + void 0, + ret2, + null + ); + return ret2; + } + return doThenable(obj2, then, context); + } + } + return obj2; + } + function doGetThen(obj2) { + return obj2.then; + } + function getThen(obj2) { + try { + return doGetThen(obj2); + } catch (e) { + errorObj2.e = e; + return errorObj2; + } + } + var hasProp = {}.hasOwnProperty; + function isAnyBluebirdPromise(obj2) { + try { + return hasProp.call(obj2, "_promise0"); + } catch (e) { + return false; + } + } + function doThenable(x, then, context) { + var promise = new Promise2(INTERNAL); + var ret2 = promise; + if (context) context._pushContext(); + promise._captureStackTrace(); + if (context) context._popContext(); + var synchronous = true; + var result = util2.tryCatch(then).call(x, resolve, reject); + synchronous = false; + if (promise && result === errorObj2) { + promise._rejectCallback(result.e, true, true); + promise = null; + } + function resolve(value) { + if (!promise) return; + promise._resolveCallback(value); + promise = null; + } + function reject(reason) { + if (!promise) return; + promise._rejectCallback(reason, synchronous, true); + promise = null; + } + return ret2; + } + return tryConvertToPromise; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/promise_array.js +var require_promise_array = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/promise_array.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, INTERNAL, tryConvertToPromise, apiRejection, Proxyable) { + var util2 = require_util5(); + var isArray = util2.isArray; + function toResolutionValue(val) { + switch (val) { + case -2: + return []; + case -3: + return {}; + } + } + function PromiseArray(values) { + var promise = this._promise = new Promise2(INTERNAL); + if (values instanceof Promise2) { + promise._propagateFrom(values, 3); + } + promise._setOnCancel(this); + this._values = values; + this._length = 0; + this._totalResolved = 0; + this._init(void 0, -2); + } + util2.inherits(PromiseArray, Proxyable); + PromiseArray.prototype.length = function() { + return this._length; + }; + PromiseArray.prototype.promise = function() { + return this._promise; + }; + PromiseArray.prototype._init = function init(_2, resolveValueIfEmpty) { + var values = tryConvertToPromise(this._values, this._promise); + if (values instanceof Promise2) { + values = values._target(); + var bitField = values._bitField; + ; + this._values = values; + if ((bitField & 50397184) === 0) { + this._promise._setAsyncGuaranteed(); + return values._then( + init, + this._reject, + void 0, + this, + resolveValueIfEmpty + ); + } else if ((bitField & 33554432) !== 0) { + values = values._value(); + } else if ((bitField & 16777216) !== 0) { + return this._reject(values._reason()); + } else { + return this._cancel(); + } + } + values = util2.asArray(values); + if (values === null) { + var err = apiRejection( + "expecting an array or an iterable object but got " + util2.classString(values) + ).reason(); + this._promise._rejectCallback(err, false); + return; + } + if (values.length === 0) { + if (resolveValueIfEmpty === -5) { + this._resolveEmptyArray(); + } else { + this._resolve(toResolutionValue(resolveValueIfEmpty)); + } + return; + } + this._iterate(values); + }; + PromiseArray.prototype._iterate = function(values) { + var len = this.getActualLength(values.length); + this._length = len; + this._values = this.shouldCopyValues() ? new Array(len) : this._values; + var result = this._promise; + var isResolved = false; + var bitField = null; + for (var i = 0; i < len; ++i) { + var maybePromise = tryConvertToPromise(values[i], result); + if (maybePromise instanceof Promise2) { + maybePromise = maybePromise._target(); + bitField = maybePromise._bitField; + } else { + bitField = null; + } + if (isResolved) { + if (bitField !== null) { + maybePromise.suppressUnhandledRejections(); + } + } else if (bitField !== null) { + if ((bitField & 50397184) === 0) { + maybePromise._proxy(this, i); + this._values[i] = maybePromise; + } else if ((bitField & 33554432) !== 0) { + isResolved = this._promiseFulfilled(maybePromise._value(), i); + } else if ((bitField & 16777216) !== 0) { + isResolved = this._promiseRejected(maybePromise._reason(), i); + } else { + isResolved = this._promiseCancelled(i); + } + } else { + isResolved = this._promiseFulfilled(maybePromise, i); + } + } + if (!isResolved) result._setAsyncGuaranteed(); + }; + PromiseArray.prototype._isResolved = function() { + return this._values === null; + }; + PromiseArray.prototype._resolve = function(value) { + this._values = null; + this._promise._fulfill(value); + }; + PromiseArray.prototype._cancel = function() { + if (this._isResolved() || !this._promise._isCancellable()) return; + this._values = null; + this._promise._cancel(); + }; + PromiseArray.prototype._reject = function(reason) { + this._values = null; + this._promise._rejectCallback(reason, false); + }; + PromiseArray.prototype._promiseFulfilled = function(value, index) { + this._values[index] = value; + var totalResolved = ++this._totalResolved; + if (totalResolved >= this._length) { + this._resolve(this._values); + return true; + } + return false; + }; + PromiseArray.prototype._promiseCancelled = function() { + this._cancel(); + return true; + }; + PromiseArray.prototype._promiseRejected = function(reason) { + this._totalResolved++; + this._reject(reason); + return true; + }; + PromiseArray.prototype._resultCancelled = function() { + if (this._isResolved()) return; + var values = this._values; + this._cancel(); + if (values instanceof Promise2) { + values.cancel(); + } else { + for (var i = 0; i < values.length; ++i) { + if (values[i] instanceof Promise2) { + values[i].cancel(); + } + } + } + }; + PromiseArray.prototype.shouldCopyValues = function() { + return true; + }; + PromiseArray.prototype.getActualLength = function(len) { + return len; + }; + return PromiseArray; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/context.js +var require_context = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/context.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2) { + var longStackTraces = false; + var contextStack = []; + Promise2.prototype._promiseCreated = function() { + }; + Promise2.prototype._pushContext = function() { + }; + Promise2.prototype._popContext = function() { + return null; + }; + Promise2._peekContext = Promise2.prototype._peekContext = function() { + }; + function Context() { + this._trace = new Context.CapturedTrace(peekContext()); + } + Context.prototype._pushContext = function() { + if (this._trace !== void 0) { + this._trace._promiseCreated = null; + contextStack.push(this._trace); + } + }; + Context.prototype._popContext = function() { + if (this._trace !== void 0) { + var trace = contextStack.pop(); + var ret2 = trace._promiseCreated; + trace._promiseCreated = null; + return ret2; + } + return null; + }; + function createContext() { + if (longStackTraces) return new Context(); + } + function peekContext() { + var lastIndex = contextStack.length - 1; + if (lastIndex >= 0) { + return contextStack[lastIndex]; + } + return void 0; + } + Context.CapturedTrace = null; + Context.create = createContext; + Context.deactivateLongStackTraces = function() { + }; + Context.activateLongStackTraces = function() { + var Promise_pushContext = Promise2.prototype._pushContext; + var Promise_popContext = Promise2.prototype._popContext; + var Promise_PeekContext = Promise2._peekContext; + var Promise_peekContext = Promise2.prototype._peekContext; + var Promise_promiseCreated = Promise2.prototype._promiseCreated; + Context.deactivateLongStackTraces = function() { + Promise2.prototype._pushContext = Promise_pushContext; + Promise2.prototype._popContext = Promise_popContext; + Promise2._peekContext = Promise_PeekContext; + Promise2.prototype._peekContext = Promise_peekContext; + Promise2.prototype._promiseCreated = Promise_promiseCreated; + longStackTraces = false; + }; + longStackTraces = true; + Promise2.prototype._pushContext = Context.prototype._pushContext; + Promise2.prototype._popContext = Context.prototype._popContext; + Promise2._peekContext = Promise2.prototype._peekContext = peekContext; + Promise2.prototype._promiseCreated = function() { + var ctx = this._peekContext(); + if (ctx && ctx._promiseCreated == null) ctx._promiseCreated = this; + }; + }; + return Context; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/debuggability.js +var require_debuggability = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/debuggability.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, Context) { + var getDomain = Promise2._getDomain; + var async = Promise2._async; + var Warning = require_errors2().Warning; + var util2 = require_util5(); + var canAttachTrace2 = util2.canAttachTrace; + var unhandledRejectionHandled; + var possiblyUnhandledRejection; + var bluebirdFramePattern = /[\\\/]bluebird[\\\/]js[\\\/](release|debug|instrumented)/; + var nodeFramePattern = /\((?:timers\.js):\d+:\d+\)/; + var parseLinePattern = /[\/<\(](.+?):(\d+):(\d+)\)?\s*$/; + var stackFramePattern = null; + var formatStack = null; + var indentStackFrames = false; + var printWarning; + var debugging = !!(util2.env("BLUEBIRD_DEBUG") != 0 && (util2.env("BLUEBIRD_DEBUG") || util2.env("NODE_ENV") === "development")); + var warnings = !!(util2.env("BLUEBIRD_WARNINGS") != 0 && (debugging || util2.env("BLUEBIRD_WARNINGS"))); + var longStackTraces = !!(util2.env("BLUEBIRD_LONG_STACK_TRACES") != 0 && (debugging || util2.env("BLUEBIRD_LONG_STACK_TRACES"))); + var wForgottenReturn = util2.env("BLUEBIRD_W_FORGOTTEN_RETURN") != 0 && (warnings || !!util2.env("BLUEBIRD_W_FORGOTTEN_RETURN")); + Promise2.prototype.suppressUnhandledRejections = function() { + var target = this._target(); + target._bitField = target._bitField & ~1048576 | 524288; + }; + Promise2.prototype._ensurePossibleRejectionHandled = function() { + if ((this._bitField & 524288) !== 0) return; + this._setRejectionIsUnhandled(); + async.invokeLater(this._notifyUnhandledRejection, this, void 0); + }; + Promise2.prototype._notifyUnhandledRejectionIsHandled = function() { + fireRejectionEvent( + "rejectionHandled", + unhandledRejectionHandled, + void 0, + this + ); + }; + Promise2.prototype._setReturnedNonUndefined = function() { + this._bitField = this._bitField | 268435456; + }; + Promise2.prototype._returnedNonUndefined = function() { + return (this._bitField & 268435456) !== 0; + }; + Promise2.prototype._notifyUnhandledRejection = function() { + if (this._isRejectionUnhandled()) { + var reason = this._settledValue(); + this._setUnhandledRejectionIsNotified(); + fireRejectionEvent( + "unhandledRejection", + possiblyUnhandledRejection, + reason, + this + ); + } + }; + Promise2.prototype._setUnhandledRejectionIsNotified = function() { + this._bitField = this._bitField | 262144; + }; + Promise2.prototype._unsetUnhandledRejectionIsNotified = function() { + this._bitField = this._bitField & ~262144; + }; + Promise2.prototype._isUnhandledRejectionNotified = function() { + return (this._bitField & 262144) > 0; + }; + Promise2.prototype._setRejectionIsUnhandled = function() { + this._bitField = this._bitField | 1048576; + }; + Promise2.prototype._unsetRejectionIsUnhandled = function() { + this._bitField = this._bitField & ~1048576; + if (this._isUnhandledRejectionNotified()) { + this._unsetUnhandledRejectionIsNotified(); + this._notifyUnhandledRejectionIsHandled(); + } + }; + Promise2.prototype._isRejectionUnhandled = function() { + return (this._bitField & 1048576) > 0; + }; + Promise2.prototype._warn = function(message, shouldUseOwnTrace, promise) { + return warn(message, shouldUseOwnTrace, promise || this); + }; + Promise2.onPossiblyUnhandledRejection = function(fn) { + var domain = getDomain(); + possiblyUnhandledRejection = typeof fn === "function" ? domain === null ? fn : util2.domainBind(domain, fn) : void 0; + }; + Promise2.onUnhandledRejectionHandled = function(fn) { + var domain = getDomain(); + unhandledRejectionHandled = typeof fn === "function" ? domain === null ? fn : util2.domainBind(domain, fn) : void 0; + }; + var disableLongStackTraces = function() { + }; + Promise2.longStackTraces = function() { + if (async.haveItemsQueued() && !config.longStackTraces) { + throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n"); + } + if (!config.longStackTraces && longStackTracesIsSupported()) { + var Promise_captureStackTrace = Promise2.prototype._captureStackTrace; + var Promise_attachExtraTrace = Promise2.prototype._attachExtraTrace; + config.longStackTraces = true; + disableLongStackTraces = function() { + if (async.haveItemsQueued() && !config.longStackTraces) { + throw new Error("cannot enable long stack traces after promises have been created\n\n See http://goo.gl/MqrFmX\n"); + } + Promise2.prototype._captureStackTrace = Promise_captureStackTrace; + Promise2.prototype._attachExtraTrace = Promise_attachExtraTrace; + Context.deactivateLongStackTraces(); + async.enableTrampoline(); + config.longStackTraces = false; + }; + Promise2.prototype._captureStackTrace = longStackTracesCaptureStackTrace; + Promise2.prototype._attachExtraTrace = longStackTracesAttachExtraTrace; + Context.activateLongStackTraces(); + async.disableTrampolineIfNecessary(); + } + }; + Promise2.hasLongStackTraces = function() { + return config.longStackTraces && longStackTracesIsSupported(); + }; + var fireDomEvent = (function() { + try { + if (typeof CustomEvent === "function") { + var event = new CustomEvent("CustomEvent"); + util2.global.dispatchEvent(event); + return function(name, event2) { + var domEvent = new CustomEvent(name.toLowerCase(), { + detail: event2, + cancelable: true + }); + return !util2.global.dispatchEvent(domEvent); + }; + } else if (typeof Event === "function") { + var event = new Event("CustomEvent"); + util2.global.dispatchEvent(event); + return function(name, event2) { + var domEvent = new Event(name.toLowerCase(), { + cancelable: true + }); + domEvent.detail = event2; + return !util2.global.dispatchEvent(domEvent); + }; + } else { + var event = document.createEvent("CustomEvent"); + event.initCustomEvent("testingtheevent", false, true, {}); + util2.global.dispatchEvent(event); + return function(name, event2) { + var domEvent = document.createEvent("CustomEvent"); + domEvent.initCustomEvent( + name.toLowerCase(), + false, + true, + event2 + ); + return !util2.global.dispatchEvent(domEvent); + }; + } + } catch (e) { + } + return function() { + return false; + }; + })(); + var fireGlobalEvent = (function() { + if (util2.isNode) { + return function() { + return process.emit.apply(process, arguments); + }; + } else { + if (!util2.global) { + return function() { + return false; + }; + } + return function(name) { + var methodName = "on" + name.toLowerCase(); + var method = util2.global[methodName]; + if (!method) return false; + method.apply(util2.global, [].slice.call(arguments, 1)); + return true; + }; + } + })(); + function generatePromiseLifecycleEventObject(name, promise) { + return { promise }; + } + var eventToObjectGenerator = { + promiseCreated: generatePromiseLifecycleEventObject, + promiseFulfilled: generatePromiseLifecycleEventObject, + promiseRejected: generatePromiseLifecycleEventObject, + promiseResolved: generatePromiseLifecycleEventObject, + promiseCancelled: generatePromiseLifecycleEventObject, + promiseChained: function(name, promise, child) { + return { promise, child }; + }, + warning: function(name, warning) { + return { warning }; + }, + unhandledRejection: function(name, reason, promise) { + return { reason, promise }; + }, + rejectionHandled: generatePromiseLifecycleEventObject + }; + var activeFireEvent = function(name) { + var globalEventFired = false; + try { + globalEventFired = fireGlobalEvent.apply(null, arguments); + } catch (e) { + async.throwLater(e); + globalEventFired = true; + } + var domEventFired = false; + try { + domEventFired = fireDomEvent( + name, + eventToObjectGenerator[name].apply(null, arguments) + ); + } catch (e) { + async.throwLater(e); + domEventFired = true; + } + return domEventFired || globalEventFired; + }; + Promise2.config = function(opts) { + opts = Object(opts); + if ("longStackTraces" in opts) { + if (opts.longStackTraces) { + Promise2.longStackTraces(); + } else if (!opts.longStackTraces && Promise2.hasLongStackTraces()) { + disableLongStackTraces(); + } + } + if ("warnings" in opts) { + var warningsOption = opts.warnings; + config.warnings = !!warningsOption; + wForgottenReturn = config.warnings; + if (util2.isObject(warningsOption)) { + if ("wForgottenReturn" in warningsOption) { + wForgottenReturn = !!warningsOption.wForgottenReturn; + } + } + } + if ("cancellation" in opts && opts.cancellation && !config.cancellation) { + if (async.haveItemsQueued()) { + throw new Error( + "cannot enable cancellation after promises are in use" + ); + } + Promise2.prototype._clearCancellationData = cancellationClearCancellationData; + Promise2.prototype._propagateFrom = cancellationPropagateFrom; + Promise2.prototype._onCancel = cancellationOnCancel; + Promise2.prototype._setOnCancel = cancellationSetOnCancel; + Promise2.prototype._attachCancellationCallback = cancellationAttachCancellationCallback; + Promise2.prototype._execute = cancellationExecute; + propagateFromFunction = cancellationPropagateFrom; + config.cancellation = true; + } + if ("monitoring" in opts) { + if (opts.monitoring && !config.monitoring) { + config.monitoring = true; + Promise2.prototype._fireEvent = activeFireEvent; + } else if (!opts.monitoring && config.monitoring) { + config.monitoring = false; + Promise2.prototype._fireEvent = defaultFireEvent; + } + } + return Promise2; + }; + function defaultFireEvent() { + return false; + } + Promise2.prototype._fireEvent = defaultFireEvent; + Promise2.prototype._execute = function(executor, resolve, reject) { + try { + executor(resolve, reject); + } catch (e) { + return e; + } + }; + Promise2.prototype._onCancel = function() { + }; + Promise2.prototype._setOnCancel = function(handler) { + ; + }; + Promise2.prototype._attachCancellationCallback = function(onCancel) { + ; + }; + Promise2.prototype._captureStackTrace = function() { + }; + Promise2.prototype._attachExtraTrace = function() { + }; + Promise2.prototype._clearCancellationData = function() { + }; + Promise2.prototype._propagateFrom = function(parent, flags) { + ; + ; + }; + function cancellationExecute(executor, resolve, reject) { + var promise = this; + try { + executor(resolve, reject, function(onCancel) { + if (typeof onCancel !== "function") { + throw new TypeError("onCancel must be a function, got: " + util2.toString(onCancel)); + } + promise._attachCancellationCallback(onCancel); + }); + } catch (e) { + return e; + } + } + function cancellationAttachCancellationCallback(onCancel) { + if (!this._isCancellable()) return this; + var previousOnCancel = this._onCancel(); + if (previousOnCancel !== void 0) { + if (util2.isArray(previousOnCancel)) { + previousOnCancel.push(onCancel); + } else { + this._setOnCancel([previousOnCancel, onCancel]); + } + } else { + this._setOnCancel(onCancel); + } + } + function cancellationOnCancel() { + return this._onCancelField; + } + function cancellationSetOnCancel(onCancel) { + this._onCancelField = onCancel; + } + function cancellationClearCancellationData() { + this._cancellationParent = void 0; + this._onCancelField = void 0; + } + function cancellationPropagateFrom(parent, flags) { + if ((flags & 1) !== 0) { + this._cancellationParent = parent; + var branchesRemainingToCancel = parent._branchesRemainingToCancel; + if (branchesRemainingToCancel === void 0) { + branchesRemainingToCancel = 0; + } + parent._branchesRemainingToCancel = branchesRemainingToCancel + 1; + } + if ((flags & 2) !== 0 && parent._isBound()) { + this._setBoundTo(parent._boundTo); + } + } + function bindingPropagateFrom(parent, flags) { + if ((flags & 2) !== 0 && parent._isBound()) { + this._setBoundTo(parent._boundTo); + } + } + var propagateFromFunction = bindingPropagateFrom; + function boundValueFunction() { + var ret2 = this._boundTo; + if (ret2 !== void 0) { + if (ret2 instanceof Promise2) { + if (ret2.isFulfilled()) { + return ret2.value(); + } else { + return void 0; + } + } + } + return ret2; + } + function longStackTracesCaptureStackTrace() { + this._trace = new CapturedTrace(this._peekContext()); + } + function longStackTracesAttachExtraTrace(error, ignoreSelf) { + if (canAttachTrace2(error)) { + var trace = this._trace; + if (trace !== void 0) { + if (ignoreSelf) trace = trace._parent; + } + if (trace !== void 0) { + trace.attachExtraTrace(error); + } else if (!error.__stackCleaned__) { + var parsed = parseStackAndMessage(error); + util2.notEnumerableProp( + error, + "stack", + parsed.message + "\n" + parsed.stack.join("\n") + ); + util2.notEnumerableProp(error, "__stackCleaned__", true); + } + } + } + function checkForgottenReturns(returnValue, promiseCreated, name, promise, parent) { + if (returnValue === void 0 && promiseCreated !== null && wForgottenReturn) { + if (parent !== void 0 && parent._returnedNonUndefined()) return; + if ((promise._bitField & 65535) === 0) return; + if (name) name = name + " "; + var handlerLine = ""; + var creatorLine = ""; + if (promiseCreated._trace) { + var traceLines = promiseCreated._trace.stack.split("\n"); + var stack = cleanStack(traceLines); + for (var i = stack.length - 1; i >= 0; --i) { + var line = stack[i]; + if (!nodeFramePattern.test(line)) { + var lineMatches = line.match(parseLinePattern); + if (lineMatches) { + handlerLine = "at " + lineMatches[1] + ":" + lineMatches[2] + ":" + lineMatches[3] + " "; + } + break; + } + } + if (stack.length > 0) { + var firstUserLine = stack[0]; + for (var i = 0; i < traceLines.length; ++i) { + if (traceLines[i] === firstUserLine) { + if (i > 0) { + creatorLine = "\n" + traceLines[i - 1]; + } + break; + } + } + } + } + var msg = "a promise was created in a " + name + "handler " + handlerLine + "but was not returned from it, see http://goo.gl/rRqMUw" + creatorLine; + promise._warn(msg, true, promiseCreated); + } + } + function deprecated(name, replacement) { + var message = name + " is deprecated and will be removed in a future version."; + if (replacement) message += " Use " + replacement + " instead."; + return warn(message); + } + function warn(message, shouldUseOwnTrace, promise) { + if (!config.warnings) return; + var warning = new Warning(message); + var ctx; + if (shouldUseOwnTrace) { + promise._attachExtraTrace(warning); + } else if (config.longStackTraces && (ctx = Promise2._peekContext())) { + ctx.attachExtraTrace(warning); + } else { + var parsed = parseStackAndMessage(warning); + warning.stack = parsed.message + "\n" + parsed.stack.join("\n"); + } + if (!activeFireEvent("warning", warning)) { + formatAndLogError(warning, "", true); + } + } + function reconstructStack(message, stacks) { + for (var i = 0; i < stacks.length - 1; ++i) { + stacks[i].push("From previous event:"); + stacks[i] = stacks[i].join("\n"); + } + if (i < stacks.length) { + stacks[i] = stacks[i].join("\n"); + } + return message + "\n" + stacks.join("\n"); + } + function removeDuplicateOrEmptyJumps(stacks) { + for (var i = 0; i < stacks.length; ++i) { + if (stacks[i].length === 0 || i + 1 < stacks.length && stacks[i][0] === stacks[i + 1][0]) { + stacks.splice(i, 1); + i--; + } + } + } + function removeCommonRoots(stacks) { + var current = stacks[0]; + for (var i = 1; i < stacks.length; ++i) { + var prev = stacks[i]; + var currentLastIndex = current.length - 1; + var currentLastLine = current[currentLastIndex]; + var commonRootMeetPoint = -1; + for (var j = prev.length - 1; j >= 0; --j) { + if (prev[j] === currentLastLine) { + commonRootMeetPoint = j; + break; + } + } + for (var j = commonRootMeetPoint; j >= 0; --j) { + var line = prev[j]; + if (current[currentLastIndex] === line) { + current.pop(); + currentLastIndex--; + } else { + break; + } + } + current = prev; + } + } + function cleanStack(stack) { + var ret2 = []; + for (var i = 0; i < stack.length; ++i) { + var line = stack[i]; + var isTraceLine = " (No stack trace)" === line || stackFramePattern.test(line); + var isInternalFrame = isTraceLine && shouldIgnore(line); + if (isTraceLine && !isInternalFrame) { + if (indentStackFrames && line.charAt(0) !== " ") { + line = " " + line; + } + ret2.push(line); + } + } + return ret2; + } + function stackFramesAsArray(error) { + var stack = error.stack.replace(/\s+$/g, "").split("\n"); + for (var i = 0; i < stack.length; ++i) { + var line = stack[i]; + if (" (No stack trace)" === line || stackFramePattern.test(line)) { + break; + } + } + if (i > 0 && error.name != "SyntaxError") { + stack = stack.slice(i); + } + return stack; + } + function parseStackAndMessage(error) { + var stack = error.stack; + var message = error.toString(); + stack = typeof stack === "string" && stack.length > 0 ? stackFramesAsArray(error) : [" (No stack trace)"]; + return { + message, + stack: error.name == "SyntaxError" ? stack : cleanStack(stack) + }; + } + function formatAndLogError(error, title, isSoft) { + if (typeof console !== "undefined") { + var message; + if (util2.isObject(error)) { + var stack = error.stack; + message = title + formatStack(stack, error); + } else { + message = title + String(error); + } + if (typeof printWarning === "function") { + printWarning(message, isSoft); + } else if (typeof console.log === "function" || typeof console.log === "object") { + console.log(message); + } + } + } + function fireRejectionEvent(name, localHandler, reason, promise) { + var localEventFired = false; + try { + if (typeof localHandler === "function") { + localEventFired = true; + if (name === "rejectionHandled") { + localHandler(promise); + } else { + localHandler(reason, promise); + } + } + } catch (e) { + async.throwLater(e); + } + if (name === "unhandledRejection") { + if (!activeFireEvent(name, reason, promise) && !localEventFired) { + formatAndLogError(reason, "Unhandled rejection "); + } + } else { + activeFireEvent(name, promise); + } + } + function formatNonError(obj2) { + var str; + if (typeof obj2 === "function") { + str = "[function " + (obj2.name || "anonymous") + "]"; + } else { + str = obj2 && typeof obj2.toString === "function" ? obj2.toString() : util2.toString(obj2); + var ruselessToString = /\[object [a-zA-Z0-9$_]+\]/; + if (ruselessToString.test(str)) { + try { + var newStr = JSON.stringify(obj2); + str = newStr; + } catch (e) { + } + } + if (str.length === 0) { + str = "(empty array)"; + } + } + return "(<" + snip(str) + ">, no stack trace)"; + } + function snip(str) { + var maxChars = 41; + if (str.length < maxChars) { + return str; + } + return str.substr(0, maxChars - 3) + "..."; + } + function longStackTracesIsSupported() { + return typeof captureStackTrace === "function"; + } + var shouldIgnore = function() { + return false; + }; + var parseLineInfoRegex = /[\/<\(]([^:\/]+):(\d+):(?:\d+)\)?\s*$/; + function parseLineInfo(line) { + var matches = line.match(parseLineInfoRegex); + if (matches) { + return { + fileName: matches[1], + line: parseInt(matches[2], 10) + }; + } + } + function setBounds(firstLineError, lastLineError) { + if (!longStackTracesIsSupported()) return; + var firstStackLines = firstLineError.stack.split("\n"); + var lastStackLines = lastLineError.stack.split("\n"); + var firstIndex = -1; + var lastIndex = -1; + var firstFileName; + var lastFileName; + for (var i = 0; i < firstStackLines.length; ++i) { + var result = parseLineInfo(firstStackLines[i]); + if (result) { + firstFileName = result.fileName; + firstIndex = result.line; + break; + } + } + for (var i = 0; i < lastStackLines.length; ++i) { + var result = parseLineInfo(lastStackLines[i]); + if (result) { + lastFileName = result.fileName; + lastIndex = result.line; + break; + } + } + if (firstIndex < 0 || lastIndex < 0 || !firstFileName || !lastFileName || firstFileName !== lastFileName || firstIndex >= lastIndex) { + return; + } + shouldIgnore = function(line) { + if (bluebirdFramePattern.test(line)) return true; + var info = parseLineInfo(line); + if (info) { + if (info.fileName === firstFileName && (firstIndex <= info.line && info.line <= lastIndex)) { + return true; + } + } + return false; + }; + } + function CapturedTrace(parent) { + this._parent = parent; + this._promisesCreated = 0; + var length = this._length = 1 + (parent === void 0 ? 0 : parent._length); + captureStackTrace(this, CapturedTrace); + if (length > 32) this.uncycle(); + } + util2.inherits(CapturedTrace, Error); + Context.CapturedTrace = CapturedTrace; + CapturedTrace.prototype.uncycle = function() { + var length = this._length; + if (length < 2) return; + var nodes = []; + var stackToIndex = {}; + for (var i = 0, node = this; node !== void 0; ++i) { + nodes.push(node); + node = node._parent; + } + length = this._length = i; + for (var i = length - 1; i >= 0; --i) { + var stack = nodes[i].stack; + if (stackToIndex[stack] === void 0) { + stackToIndex[stack] = i; + } + } + for (var i = 0; i < length; ++i) { + var currentStack = nodes[i].stack; + var index = stackToIndex[currentStack]; + if (index !== void 0 && index !== i) { + if (index > 0) { + nodes[index - 1]._parent = void 0; + nodes[index - 1]._length = 1; + } + nodes[i]._parent = void 0; + nodes[i]._length = 1; + var cycleEdgeNode = i > 0 ? nodes[i - 1] : this; + if (index < length - 1) { + cycleEdgeNode._parent = nodes[index + 1]; + cycleEdgeNode._parent.uncycle(); + cycleEdgeNode._length = cycleEdgeNode._parent._length + 1; + } else { + cycleEdgeNode._parent = void 0; + cycleEdgeNode._length = 1; + } + var currentChildLength = cycleEdgeNode._length + 1; + for (var j = i - 2; j >= 0; --j) { + nodes[j]._length = currentChildLength; + currentChildLength++; + } + return; + } + } + }; + CapturedTrace.prototype.attachExtraTrace = function(error) { + if (error.__stackCleaned__) return; + this.uncycle(); + var parsed = parseStackAndMessage(error); + var message = parsed.message; + var stacks = [parsed.stack]; + var trace = this; + while (trace !== void 0) { + stacks.push(cleanStack(trace.stack.split("\n"))); + trace = trace._parent; + } + removeCommonRoots(stacks); + removeDuplicateOrEmptyJumps(stacks); + util2.notEnumerableProp(error, "stack", reconstructStack(message, stacks)); + util2.notEnumerableProp(error, "__stackCleaned__", true); + }; + var captureStackTrace = (function stackDetection() { + var v8stackFramePattern = /^\s*at\s*/; + var v8stackFormatter = function(stack, error) { + if (typeof stack === "string") return stack; + if (error.name !== void 0 && error.message !== void 0) { + return error.toString(); + } + return formatNonError(error); + }; + if (typeof Error.stackTraceLimit === "number" && typeof Error.captureStackTrace === "function") { + Error.stackTraceLimit += 6; + stackFramePattern = v8stackFramePattern; + formatStack = v8stackFormatter; + var captureStackTrace2 = Error.captureStackTrace; + shouldIgnore = function(line) { + return bluebirdFramePattern.test(line); + }; + return function(receiver, ignoreUntil) { + Error.stackTraceLimit += 6; + captureStackTrace2(receiver, ignoreUntil); + Error.stackTraceLimit -= 6; + }; + } + var err = new Error(); + if (typeof err.stack === "string" && err.stack.split("\n")[0].indexOf("stackDetection@") >= 0) { + stackFramePattern = /@/; + formatStack = v8stackFormatter; + indentStackFrames = true; + return function captureStackTrace3(o) { + o.stack = new Error().stack; + }; + } + var hasStackAfterThrow; + try { + throw new Error(); + } catch (e) { + hasStackAfterThrow = "stack" in e; + } + if (!("stack" in err) && hasStackAfterThrow && typeof Error.stackTraceLimit === "number") { + stackFramePattern = v8stackFramePattern; + formatStack = v8stackFormatter; + return function captureStackTrace3(o) { + Error.stackTraceLimit += 6; + try { + throw new Error(); + } catch (e) { + o.stack = e.stack; + } + Error.stackTraceLimit -= 6; + }; + } + formatStack = function(stack, error) { + if (typeof stack === "string") return stack; + if ((typeof error === "object" || typeof error === "function") && error.name !== void 0 && error.message !== void 0) { + return error.toString(); + } + return formatNonError(error); + }; + return null; + })([]); + if (typeof console !== "undefined" && typeof console.warn !== "undefined") { + printWarning = function(message) { + console.warn(message); + }; + if (util2.isNode && process.stderr.isTTY) { + printWarning = function(message, isSoft) { + var color = isSoft ? "\x1B[33m" : "\x1B[31m"; + console.warn(color + message + "\x1B[0m\n"); + }; + } else if (!util2.isNode && typeof new Error().stack === "string") { + printWarning = function(message, isSoft) { + console.warn( + "%c" + message, + isSoft ? "color: darkorange" : "color: red" + ); + }; + } + } + var config = { + warnings, + longStackTraces: false, + cancellation: false, + monitoring: false + }; + if (longStackTraces) Promise2.longStackTraces(); + return { + longStackTraces: function() { + return config.longStackTraces; + }, + warnings: function() { + return config.warnings; + }, + cancellation: function() { + return config.cancellation; + }, + monitoring: function() { + return config.monitoring; + }, + propagateFromFunction: function() { + return propagateFromFunction; + }, + boundValueFunction: function() { + return boundValueFunction; + }, + checkForgottenReturns, + setBounds, + warn, + deprecated, + CapturedTrace, + fireDomEvent, + fireGlobalEvent + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/finally.js +var require_finally = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/finally.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, tryConvertToPromise) { + var util2 = require_util5(); + var CancellationError = Promise2.CancellationError; + var errorObj2 = util2.errorObj; + function PassThroughHandlerContext(promise, type, handler) { + this.promise = promise; + this.type = type; + this.handler = handler; + this.called = false; + this.cancelPromise = null; + } + PassThroughHandlerContext.prototype.isFinallyHandler = function() { + return this.type === 0; + }; + function FinallyHandlerCancelReaction(finallyHandler2) { + this.finallyHandler = finallyHandler2; + } + FinallyHandlerCancelReaction.prototype._resultCancelled = function() { + checkCancel(this.finallyHandler); + }; + function checkCancel(ctx, reason) { + if (ctx.cancelPromise != null) { + if (arguments.length > 1) { + ctx.cancelPromise._reject(reason); + } else { + ctx.cancelPromise._cancel(); + } + ctx.cancelPromise = null; + return true; + } + return false; + } + function succeed() { + return finallyHandler.call(this, this.promise._target()._settledValue()); + } + function fail(reason) { + if (checkCancel(this, reason)) return; + errorObj2.e = reason; + return errorObj2; + } + function finallyHandler(reasonOrValue) { + var promise = this.promise; + var handler = this.handler; + if (!this.called) { + this.called = true; + var ret2 = this.isFinallyHandler() ? handler.call(promise._boundValue()) : handler.call(promise._boundValue(), reasonOrValue); + if (ret2 !== void 0) { + promise._setReturnedNonUndefined(); + var maybePromise = tryConvertToPromise(ret2, promise); + if (maybePromise instanceof Promise2) { + if (this.cancelPromise != null) { + if (maybePromise._isCancelled()) { + var reason = new CancellationError("late cancellation observer"); + promise._attachExtraTrace(reason); + errorObj2.e = reason; + return errorObj2; + } else if (maybePromise.isPending()) { + maybePromise._attachCancellationCallback( + new FinallyHandlerCancelReaction(this) + ); + } + } + return maybePromise._then( + succeed, + fail, + void 0, + this, + void 0 + ); + } + } + } + if (promise.isRejected()) { + checkCancel(this); + errorObj2.e = reasonOrValue; + return errorObj2; + } else { + checkCancel(this); + return reasonOrValue; + } + } + Promise2.prototype._passThrough = function(handler, type, success, fail2) { + if (typeof handler !== "function") return this.then(); + return this._then( + success, + fail2, + void 0, + new PassThroughHandlerContext(this, type, handler), + void 0 + ); + }; + Promise2.prototype.lastly = Promise2.prototype["finally"] = function(handler) { + return this._passThrough( + handler, + 0, + finallyHandler, + finallyHandler + ); + }; + Promise2.prototype.tap = function(handler) { + return this._passThrough(handler, 1, finallyHandler); + }; + return PassThroughHandlerContext; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/catch_filter.js +var require_catch_filter = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/catch_filter.js"(exports2, module2) { + "use strict"; + module2.exports = function(NEXT_FILTER) { + var util2 = require_util5(); + var getKeys = require_es5().keys; + var tryCatch2 = util2.tryCatch; + var errorObj2 = util2.errorObj; + function catchFilter(instances, cb, promise) { + return function(e) { + var boundTo = promise._boundValue(); + predicateLoop: for (var i = 0; i < instances.length; ++i) { + var item = instances[i]; + if (item === Error || item != null && item.prototype instanceof Error) { + if (e instanceof item) { + return tryCatch2(cb).call(boundTo, e); + } + } else if (typeof item === "function") { + var matchesPredicate = tryCatch2(item).call(boundTo, e); + if (matchesPredicate === errorObj2) { + return matchesPredicate; + } else if (matchesPredicate) { + return tryCatch2(cb).call(boundTo, e); + } + } else if (util2.isObject(e)) { + var keys = getKeys(item); + for (var j = 0; j < keys.length; ++j) { + var key = keys[j]; + if (item[key] != e[key]) { + continue predicateLoop; + } + } + return tryCatch2(cb).call(boundTo, e); + } + } + return NEXT_FILTER; + }; + } + return catchFilter; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/nodeback.js +var require_nodeback = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/nodeback.js"(exports2, module2) { + "use strict"; + var util2 = require_util5(); + var maybeWrapAsError2 = util2.maybeWrapAsError; + var errors = require_errors2(); + var OperationalError = errors.OperationalError; + var es52 = require_es5(); + function isUntypedError(obj2) { + return obj2 instanceof Error && es52.getPrototypeOf(obj2) === Error.prototype; + } + var rErrorKey = /^(?:name|message|stack|cause)$/; + function wrapAsOperationalError(obj2) { + var ret2; + if (isUntypedError(obj2)) { + ret2 = new OperationalError(obj2); + ret2.name = obj2.name; + ret2.message = obj2.message; + ret2.stack = obj2.stack; + var keys = es52.keys(obj2); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + if (!rErrorKey.test(key)) { + ret2[key] = obj2[key]; + } + } + return ret2; + } + util2.markAsOriginatingFromRejection(obj2); + return obj2; + } + function nodebackForPromise(promise, multiArgs) { + return function(err, value) { + if (promise === null) return; + if (err) { + var wrapped = wrapAsOperationalError(maybeWrapAsError2(err)); + promise._attachExtraTrace(wrapped); + promise._reject(wrapped); + } else if (!multiArgs) { + promise._fulfill(value); + } else { + var $_len = arguments.length; + var args = new Array(Math.max($_len - 1, 0)); + for (var $_i = 1; $_i < $_len; ++$_i) { + args[$_i - 1] = arguments[$_i]; + } + ; + promise._fulfill(args); + } + promise = null; + }; + } + module2.exports = nodebackForPromise; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/method.js +var require_method = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/method.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, INTERNAL, tryConvertToPromise, apiRejection, debug) { + var util2 = require_util5(); + var tryCatch2 = util2.tryCatch; + Promise2.method = function(fn) { + if (typeof fn !== "function") { + throw new Promise2.TypeError("expecting a function but got " + util2.classString(fn)); + } + return function() { + var ret2 = new Promise2(INTERNAL); + ret2._captureStackTrace(); + ret2._pushContext(); + var value = tryCatch2(fn).apply(this, arguments); + var promiseCreated = ret2._popContext(); + debug.checkForgottenReturns( + value, + promiseCreated, + "Promise.method", + ret2 + ); + ret2._resolveFromSyncValue(value); + return ret2; + }; + }; + Promise2.attempt = Promise2["try"] = function(fn) { + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util2.classString(fn)); + } + var ret2 = new Promise2(INTERNAL); + ret2._captureStackTrace(); + ret2._pushContext(); + var value; + if (arguments.length > 1) { + debug.deprecated("calling Promise.try with more than 1 argument"); + var arg = arguments[1]; + var ctx = arguments[2]; + value = util2.isArray(arg) ? tryCatch2(fn).apply(ctx, arg) : tryCatch2(fn).call(ctx, arg); + } else { + value = tryCatch2(fn)(); + } + var promiseCreated = ret2._popContext(); + debug.checkForgottenReturns( + value, + promiseCreated, + "Promise.try", + ret2 + ); + ret2._resolveFromSyncValue(value); + return ret2; + }; + Promise2.prototype._resolveFromSyncValue = function(value) { + if (value === util2.errorObj) { + this._rejectCallback(value.e, false); + } else { + this._resolveCallback(value, true); + } + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/bind.js +var require_bind = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/bind.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, INTERNAL, tryConvertToPromise, debug) { + var calledBind = false; + var rejectThis = function(_2, e) { + this._reject(e); + }; + var targetRejected = function(e, context) { + context.promiseRejectionQueued = true; + context.bindingPromise._then(rejectThis, rejectThis, null, this, e); + }; + var bindingResolved = function(thisArg, context) { + if ((this._bitField & 50397184) === 0) { + this._resolveCallback(context.target); + } + }; + var bindingRejected = function(e, context) { + if (!context.promiseRejectionQueued) this._reject(e); + }; + Promise2.prototype.bind = function(thisArg) { + if (!calledBind) { + calledBind = true; + Promise2.prototype._propagateFrom = debug.propagateFromFunction(); + Promise2.prototype._boundValue = debug.boundValueFunction(); + } + var maybePromise = tryConvertToPromise(thisArg); + var ret2 = new Promise2(INTERNAL); + ret2._propagateFrom(this, 1); + var target = this._target(); + ret2._setBoundTo(maybePromise); + if (maybePromise instanceof Promise2) { + var context = { + promiseRejectionQueued: false, + promise: ret2, + target, + bindingPromise: maybePromise + }; + target._then(INTERNAL, targetRejected, void 0, ret2, context); + maybePromise._then( + bindingResolved, + bindingRejected, + void 0, + ret2, + context + ); + ret2._setOnCancel(maybePromise); + } else { + ret2._resolveCallback(target); + } + return ret2; + }; + Promise2.prototype._setBoundTo = function(obj2) { + if (obj2 !== void 0) { + this._bitField = this._bitField | 2097152; + this._boundTo = obj2; + } else { + this._bitField = this._bitField & ~2097152; + } + }; + Promise2.prototype._isBound = function() { + return (this._bitField & 2097152) === 2097152; + }; + Promise2.bind = function(thisArg, value) { + return Promise2.resolve(value).bind(thisArg); + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/cancel.js +var require_cancel = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/cancel.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, PromiseArray, apiRejection, debug) { + var util2 = require_util5(); + var tryCatch2 = util2.tryCatch; + var errorObj2 = util2.errorObj; + var async = Promise2._async; + Promise2.prototype["break"] = Promise2.prototype.cancel = function() { + if (!debug.cancellation()) return this._warn("cancellation is disabled"); + var promise = this; + var child = promise; + while (promise._isCancellable()) { + if (!promise._cancelBy(child)) { + if (child._isFollowing()) { + child._followee().cancel(); + } else { + child._cancelBranched(); + } + break; + } + var parent = promise._cancellationParent; + if (parent == null || !parent._isCancellable()) { + if (promise._isFollowing()) { + promise._followee().cancel(); + } else { + promise._cancelBranched(); + } + break; + } else { + if (promise._isFollowing()) promise._followee().cancel(); + promise._setWillBeCancelled(); + child = promise; + promise = parent; + } + } + }; + Promise2.prototype._branchHasCancelled = function() { + this._branchesRemainingToCancel--; + }; + Promise2.prototype._enoughBranchesHaveCancelled = function() { + return this._branchesRemainingToCancel === void 0 || this._branchesRemainingToCancel <= 0; + }; + Promise2.prototype._cancelBy = function(canceller) { + if (canceller === this) { + this._branchesRemainingToCancel = 0; + this._invokeOnCancel(); + return true; + } else { + this._branchHasCancelled(); + if (this._enoughBranchesHaveCancelled()) { + this._invokeOnCancel(); + return true; + } + } + return false; + }; + Promise2.prototype._cancelBranched = function() { + if (this._enoughBranchesHaveCancelled()) { + this._cancel(); + } + }; + Promise2.prototype._cancel = function() { + if (!this._isCancellable()) return; + this._setCancelled(); + async.invoke(this._cancelPromises, this, void 0); + }; + Promise2.prototype._cancelPromises = function() { + if (this._length() > 0) this._settlePromises(); + }; + Promise2.prototype._unsetOnCancel = function() { + this._onCancelField = void 0; + }; + Promise2.prototype._isCancellable = function() { + return this.isPending() && !this._isCancelled(); + }; + Promise2.prototype.isCancellable = function() { + return this.isPending() && !this.isCancelled(); + }; + Promise2.prototype._doInvokeOnCancel = function(onCancelCallback, internalOnly) { + if (util2.isArray(onCancelCallback)) { + for (var i = 0; i < onCancelCallback.length; ++i) { + this._doInvokeOnCancel(onCancelCallback[i], internalOnly); + } + } else if (onCancelCallback !== void 0) { + if (typeof onCancelCallback === "function") { + if (!internalOnly) { + var e = tryCatch2(onCancelCallback).call(this._boundValue()); + if (e === errorObj2) { + this._attachExtraTrace(e.e); + async.throwLater(e.e); + } + } + } else { + onCancelCallback._resultCancelled(this); + } + } + }; + Promise2.prototype._invokeOnCancel = function() { + var onCancelCallback = this._onCancel(); + this._unsetOnCancel(); + async.invoke(this._doInvokeOnCancel, this, onCancelCallback); + }; + Promise2.prototype._invokeInternalOnCancel = function() { + if (this._isCancellable()) { + this._doInvokeOnCancel(this._onCancel(), true); + this._unsetOnCancel(); + } + }; + Promise2.prototype._resultCancelled = function() { + this.cancel(); + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/direct_resolve.js +var require_direct_resolve = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/direct_resolve.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2) { + function returner() { + return this.value; + } + function thrower2() { + throw this.reason; + } + Promise2.prototype["return"] = Promise2.prototype.thenReturn = function(value) { + if (value instanceof Promise2) value.suppressUnhandledRejections(); + return this._then( + returner, + void 0, + void 0, + { value }, + void 0 + ); + }; + Promise2.prototype["throw"] = Promise2.prototype.thenThrow = function(reason) { + return this._then( + thrower2, + void 0, + void 0, + { reason }, + void 0 + ); + }; + Promise2.prototype.catchThrow = function(reason) { + if (arguments.length <= 1) { + return this._then( + void 0, + thrower2, + void 0, + { reason }, + void 0 + ); + } else { + var _reason = arguments[1]; + var handler = function() { + throw _reason; + }; + return this.caught(reason, handler); + } + }; + Promise2.prototype.catchReturn = function(value) { + if (arguments.length <= 1) { + if (value instanceof Promise2) value.suppressUnhandledRejections(); + return this._then( + void 0, + returner, + void 0, + { value }, + void 0 + ); + } else { + var _value = arguments[1]; + if (_value instanceof Promise2) _value.suppressUnhandledRejections(); + var handler = function() { + return _value; + }; + return this.caught(value, handler); + } + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/synchronous_inspection.js +var require_synchronous_inspection = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/synchronous_inspection.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2) { + function PromiseInspection(promise) { + if (promise !== void 0) { + promise = promise._target(); + this._bitField = promise._bitField; + this._settledValueField = promise._isFateSealed() ? promise._settledValue() : void 0; + } else { + this._bitField = 0; + this._settledValueField = void 0; + } + } + PromiseInspection.prototype._settledValue = function() { + return this._settledValueField; + }; + var value = PromiseInspection.prototype.value = function() { + if (!this.isFulfilled()) { + throw new TypeError("cannot get fulfillment value of a non-fulfilled promise\n\n See http://goo.gl/MqrFmX\n"); + } + return this._settledValue(); + }; + var reason = PromiseInspection.prototype.error = PromiseInspection.prototype.reason = function() { + if (!this.isRejected()) { + throw new TypeError("cannot get rejection reason of a non-rejected promise\n\n See http://goo.gl/MqrFmX\n"); + } + return this._settledValue(); + }; + var isFulfilled = PromiseInspection.prototype.isFulfilled = function() { + return (this._bitField & 33554432) !== 0; + }; + var isRejected = PromiseInspection.prototype.isRejected = function() { + return (this._bitField & 16777216) !== 0; + }; + var isPending = PromiseInspection.prototype.isPending = function() { + return (this._bitField & 50397184) === 0; + }; + var isResolved = PromiseInspection.prototype.isResolved = function() { + return (this._bitField & 50331648) !== 0; + }; + PromiseInspection.prototype.isCancelled = function() { + return (this._bitField & 8454144) !== 0; + }; + Promise2.prototype.__isCancelled = function() { + return (this._bitField & 65536) === 65536; + }; + Promise2.prototype._isCancelled = function() { + return this._target().__isCancelled(); + }; + Promise2.prototype.isCancelled = function() { + return (this._target()._bitField & 8454144) !== 0; + }; + Promise2.prototype.isPending = function() { + return isPending.call(this._target()); + }; + Promise2.prototype.isRejected = function() { + return isRejected.call(this._target()); + }; + Promise2.prototype.isFulfilled = function() { + return isFulfilled.call(this._target()); + }; + Promise2.prototype.isResolved = function() { + return isResolved.call(this._target()); + }; + Promise2.prototype.value = function() { + return value.call(this._target()); + }; + Promise2.prototype.reason = function() { + var target = this._target(); + target._unsetRejectionIsUnhandled(); + return reason.call(target); + }; + Promise2.prototype._value = function() { + return this._settledValue(); + }; + Promise2.prototype._reason = function() { + this._unsetRejectionIsUnhandled(); + return this._settledValue(); + }; + Promise2.PromiseInspection = PromiseInspection; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/join.js +var require_join = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/join.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, PromiseArray, tryConvertToPromise, INTERNAL, async, getDomain) { + var util2 = require_util5(); + var canEvaluate2 = util2.canEvaluate; + var tryCatch2 = util2.tryCatch; + var errorObj2 = util2.errorObj; + var reject; + if (true) { + if (canEvaluate2) { + var thenCallback = function(i2) { + return new Function("value", "holder", " \n 'use strict'; \n holder.pIndex = value; \n holder.checkFulfillment(this); \n ".replace(/Index/g, i2)); + }; + var promiseSetter = function(i2) { + return new Function("promise", "holder", " \n 'use strict'; \n holder.pIndex = promise; \n ".replace(/Index/g, i2)); + }; + var generateHolderClass = function(total) { + var props = new Array(total); + for (var i2 = 0; i2 < props.length; ++i2) { + props[i2] = "this.p" + (i2 + 1); + } + var assignment = props.join(" = ") + " = null;"; + var cancellationCode = "var promise;\n" + props.map(function(prop) { + return " \n promise = " + prop + "; \n if (promise instanceof Promise) { \n promise.cancel(); \n } \n "; + }).join("\n"); + var passedArguments = props.join(", "); + var name = "Holder$" + total; + var code = "return function(tryCatch, errorObj, Promise, async) { \n 'use strict'; \n function [TheName](fn) { \n [TheProperties] \n this.fn = fn; \n this.asyncNeeded = true; \n this.now = 0; \n } \n \n [TheName].prototype._callFunction = function(promise) { \n promise._pushContext(); \n var ret = tryCatch(this.fn)([ThePassedArguments]); \n promise._popContext(); \n if (ret === errorObj) { \n promise._rejectCallback(ret.e, false); \n } else { \n promise._resolveCallback(ret); \n } \n }; \n \n [TheName].prototype.checkFulfillment = function(promise) { \n var now = ++this.now; \n if (now === [TheTotal]) { \n if (this.asyncNeeded) { \n async.invoke(this._callFunction, this, promise); \n } else { \n this._callFunction(promise); \n } \n \n } \n }; \n \n [TheName].prototype._resultCancelled = function() { \n [CancellationCode] \n }; \n \n return [TheName]; \n }(tryCatch, errorObj, Promise, async); \n "; + code = code.replace(/\[TheName\]/g, name).replace(/\[TheTotal\]/g, total).replace(/\[ThePassedArguments\]/g, passedArguments).replace(/\[TheProperties\]/g, assignment).replace(/\[CancellationCode\]/g, cancellationCode); + return new Function("tryCatch", "errorObj", "Promise", "async", code)(tryCatch2, errorObj2, Promise2, async); + }; + var holderClasses = []; + var thenCallbacks = []; + var promiseSetters = []; + for (var i = 0; i < 8; ++i) { + holderClasses.push(generateHolderClass(i + 1)); + thenCallbacks.push(thenCallback(i + 1)); + promiseSetters.push(promiseSetter(i + 1)); + } + reject = function(reason) { + this._reject(reason); + }; + } + } + Promise2.join = function() { + var last = arguments.length - 1; + var fn; + if (last > 0 && typeof arguments[last] === "function") { + fn = arguments[last]; + if (true) { + if (last <= 8 && canEvaluate2) { + var ret2 = new Promise2(INTERNAL); + ret2._captureStackTrace(); + var HolderClass = holderClasses[last - 1]; + var holder = new HolderClass(fn); + var callbacks = thenCallbacks; + for (var i2 = 0; i2 < last; ++i2) { + var maybePromise = tryConvertToPromise(arguments[i2], ret2); + if (maybePromise instanceof Promise2) { + maybePromise = maybePromise._target(); + var bitField = maybePromise._bitField; + ; + if ((bitField & 50397184) === 0) { + maybePromise._then( + callbacks[i2], + reject, + void 0, + ret2, + holder + ); + promiseSetters[i2](maybePromise, holder); + holder.asyncNeeded = false; + } else if ((bitField & 33554432) !== 0) { + callbacks[i2].call( + ret2, + maybePromise._value(), + holder + ); + } else if ((bitField & 16777216) !== 0) { + ret2._reject(maybePromise._reason()); + } else { + ret2._cancel(); + } + } else { + callbacks[i2].call(ret2, maybePromise, holder); + } + } + if (!ret2._isFateSealed()) { + if (holder.asyncNeeded) { + var domain = getDomain(); + if (domain !== null) { + holder.fn = util2.domainBind(domain, holder.fn); + } + } + ret2._setAsyncGuaranteed(); + ret2._setOnCancel(holder); + } + return ret2; + } + } + } + var $_len = arguments.length; + var args = new Array($_len); + for (var $_i = 0; $_i < $_len; ++$_i) { + args[$_i] = arguments[$_i]; + } + ; + if (fn) args.pop(); + var ret2 = new PromiseArray(args).promise(); + return fn !== void 0 ? ret2.spread(fn) : ret2; + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/map.js +var require_map3 = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/map.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug) { + var getDomain = Promise2._getDomain; + var util2 = require_util5(); + var tryCatch2 = util2.tryCatch; + var errorObj2 = util2.errorObj; + var async = Promise2._async; + function MappingPromiseArray(promises, fn, limit, _filter) { + this.constructor$(promises); + this._promise._captureStackTrace(); + var domain = getDomain(); + this._callback = domain === null ? fn : util2.domainBind(domain, fn); + this._preservedValues = _filter === INTERNAL ? new Array(this.length()) : null; + this._limit = limit; + this._inFlight = 0; + this._queue = []; + async.invoke(this._asyncInit, this, void 0); + } + util2.inherits(MappingPromiseArray, PromiseArray); + MappingPromiseArray.prototype._asyncInit = function() { + this._init$(void 0, -2); + }; + MappingPromiseArray.prototype._init = function() { + }; + MappingPromiseArray.prototype._promiseFulfilled = function(value, index) { + var values = this._values; + var length = this.length(); + var preservedValues = this._preservedValues; + var limit = this._limit; + if (index < 0) { + index = index * -1 - 1; + values[index] = value; + if (limit >= 1) { + this._inFlight--; + this._drainQueue(); + if (this._isResolved()) return true; + } + } else { + if (limit >= 1 && this._inFlight >= limit) { + values[index] = value; + this._queue.push(index); + return false; + } + if (preservedValues !== null) preservedValues[index] = value; + var promise = this._promise; + var callback = this._callback; + var receiver = promise._boundValue(); + promise._pushContext(); + var ret2 = tryCatch2(callback).call(receiver, value, index, length); + var promiseCreated = promise._popContext(); + debug.checkForgottenReturns( + ret2, + promiseCreated, + preservedValues !== null ? "Promise.filter" : "Promise.map", + promise + ); + if (ret2 === errorObj2) { + this._reject(ret2.e); + return true; + } + var maybePromise = tryConvertToPromise(ret2, this._promise); + if (maybePromise instanceof Promise2) { + maybePromise = maybePromise._target(); + var bitField = maybePromise._bitField; + ; + if ((bitField & 50397184) === 0) { + if (limit >= 1) this._inFlight++; + values[index] = maybePromise; + maybePromise._proxy(this, (index + 1) * -1); + return false; + } else if ((bitField & 33554432) !== 0) { + ret2 = maybePromise._value(); + } else if ((bitField & 16777216) !== 0) { + this._reject(maybePromise._reason()); + return true; + } else { + this._cancel(); + return true; + } + } + values[index] = ret2; + } + var totalResolved = ++this._totalResolved; + if (totalResolved >= length) { + if (preservedValues !== null) { + this._filter(values, preservedValues); + } else { + this._resolve(values); + } + return true; + } + return false; + }; + MappingPromiseArray.prototype._drainQueue = function() { + var queue = this._queue; + var limit = this._limit; + var values = this._values; + while (queue.length > 0 && this._inFlight < limit) { + if (this._isResolved()) return; + var index = queue.pop(); + this._promiseFulfilled(values[index], index); + } + }; + MappingPromiseArray.prototype._filter = function(booleans, values) { + var len = values.length; + var ret2 = new Array(len); + var j = 0; + for (var i = 0; i < len; ++i) { + if (booleans[i]) ret2[j++] = values[i]; + } + ret2.length = j; + this._resolve(ret2); + }; + MappingPromiseArray.prototype.preservedValues = function() { + return this._preservedValues; + }; + function map(promises, fn, options, _filter) { + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util2.classString(fn)); + } + var limit = 0; + if (options !== void 0) { + if (typeof options === "object" && options !== null) { + if (typeof options.concurrency !== "number") { + return Promise2.reject( + new TypeError("'concurrency' must be a number but it is " + util2.classString(options.concurrency)) + ); + } + limit = options.concurrency; + } else { + return Promise2.reject(new TypeError( + "options argument must be an object but it is " + util2.classString(options) + )); + } + } + limit = typeof limit === "number" && isFinite(limit) && limit >= 1 ? limit : 0; + return new MappingPromiseArray(promises, fn, limit, _filter).promise(); + } + Promise2.prototype.map = function(fn, options) { + return map(this, fn, options, null); + }; + Promise2.map = function(promises, fn, options, _filter) { + return map(promises, fn, options, _filter); + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/call_get.js +var require_call_get = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/call_get.js"(exports2, module2) { + "use strict"; + var cr = Object.create; + if (cr) { + callerCache = cr(null); + getterCache = cr(null); + callerCache[" size"] = getterCache[" size"] = 0; + } + var callerCache; + var getterCache; + module2.exports = function(Promise2) { + var util2 = require_util5(); + var canEvaluate2 = util2.canEvaluate; + var isIdentifier2 = util2.isIdentifier; + var getMethodCaller; + var getGetter; + if (true) { + var makeMethodCaller = function(methodName) { + return new Function("ensureMethod", " \n return function(obj) { \n 'use strict' \n var len = this.length; \n ensureMethod(obj, 'methodName'); \n switch(len) { \n case 1: return obj.methodName(this[0]); \n case 2: return obj.methodName(this[0], this[1]); \n case 3: return obj.methodName(this[0], this[1], this[2]); \n case 0: return obj.methodName(); \n default: \n return obj.methodName.apply(obj, this); \n } \n }; \n ".replace(/methodName/g, methodName))(ensureMethod); + }; + var makeGetter = function(propertyName) { + return new Function("obj", " \n 'use strict'; \n return obj.propertyName; \n ".replace("propertyName", propertyName)); + }; + var getCompiled = function(name, compiler, cache) { + var ret2 = cache[name]; + if (typeof ret2 !== "function") { + if (!isIdentifier2(name)) { + return null; + } + ret2 = compiler(name); + cache[name] = ret2; + cache[" size"]++; + if (cache[" size"] > 512) { + var keys = Object.keys(cache); + for (var i = 0; i < 256; ++i) delete cache[keys[i]]; + cache[" size"] = keys.length - 256; + } + } + return ret2; + }; + getMethodCaller = function(name) { + return getCompiled(name, makeMethodCaller, callerCache); + }; + getGetter = function(name) { + return getCompiled(name, makeGetter, getterCache); + }; + } + function ensureMethod(obj2, methodName) { + var fn; + if (obj2 != null) fn = obj2[methodName]; + if (typeof fn !== "function") { + var message = "Object " + util2.classString(obj2) + " has no method '" + util2.toString(methodName) + "'"; + throw new Promise2.TypeError(message); + } + return fn; + } + function caller(obj2) { + var methodName = this.pop(); + var fn = ensureMethod(obj2, methodName); + return fn.apply(obj2, this); + } + Promise2.prototype.call = function(methodName) { + var $_len = arguments.length; + var args = new Array(Math.max($_len - 1, 0)); + for (var $_i = 1; $_i < $_len; ++$_i) { + args[$_i - 1] = arguments[$_i]; + } + ; + if (true) { + if (canEvaluate2) { + var maybeCaller = getMethodCaller(methodName); + if (maybeCaller !== null) { + return this._then( + maybeCaller, + void 0, + void 0, + args, + void 0 + ); + } + } + } + args.push(methodName); + return this._then(caller, void 0, void 0, args, void 0); + }; + function namedGetter(obj2) { + return obj2[this]; + } + function indexedGetter(obj2) { + var index = +this; + if (index < 0) index = Math.max(0, index + obj2.length); + return obj2[index]; + } + Promise2.prototype.get = function(propertyName) { + var isIndex = typeof propertyName === "number"; + var getter; + if (!isIndex) { + if (canEvaluate2) { + var maybeGetter = getGetter(propertyName); + getter = maybeGetter !== null ? maybeGetter : namedGetter; + } else { + getter = namedGetter; + } + } else { + getter = indexedGetter; + } + return this._then(getter, void 0, void 0, propertyName, void 0); + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/using.js +var require_using2 = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/using.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug) { + var util2 = require_util5(); + var TypeError2 = require_errors2().TypeError; + var inherits2 = require_util5().inherits; + var errorObj2 = util2.errorObj; + var tryCatch2 = util2.tryCatch; + var NULL = {}; + function thrower2(e) { + setTimeout(function() { + throw e; + }, 0); + } + function castPreservingDisposable(thenable) { + var maybePromise = tryConvertToPromise(thenable); + if (maybePromise !== thenable && typeof thenable._isDisposable === "function" && typeof thenable._getDisposer === "function" && thenable._isDisposable()) { + maybePromise._setDisposable(thenable._getDisposer()); + } + return maybePromise; + } + function dispose(resources, inspection) { + var i = 0; + var len = resources.length; + var ret2 = new Promise2(INTERNAL); + function iterator() { + if (i >= len) return ret2._fulfill(); + var maybePromise = castPreservingDisposable(resources[i++]); + if (maybePromise instanceof Promise2 && maybePromise._isDisposable()) { + try { + maybePromise = tryConvertToPromise( + maybePromise._getDisposer().tryDispose(inspection), + resources.promise + ); + } catch (e) { + return thrower2(e); + } + if (maybePromise instanceof Promise2) { + return maybePromise._then( + iterator, + thrower2, + null, + null, + null + ); + } + } + iterator(); + } + iterator(); + return ret2; + } + function Disposer(data, promise, context) { + this._data = data; + this._promise = promise; + this._context = context; + } + Disposer.prototype.data = function() { + return this._data; + }; + Disposer.prototype.promise = function() { + return this._promise; + }; + Disposer.prototype.resource = function() { + if (this.promise().isFulfilled()) { + return this.promise().value(); + } + return NULL; + }; + Disposer.prototype.tryDispose = function(inspection) { + var resource = this.resource(); + var context = this._context; + if (context !== void 0) context._pushContext(); + var ret2 = resource !== NULL ? this.doDispose(resource, inspection) : null; + if (context !== void 0) context._popContext(); + this._promise._unsetDisposable(); + this._data = null; + return ret2; + }; + Disposer.isDisposer = function(d) { + return d != null && typeof d.resource === "function" && typeof d.tryDispose === "function"; + }; + function FunctionDisposer(fn, promise, context) { + this.constructor$(fn, promise, context); + } + inherits2(FunctionDisposer, Disposer); + FunctionDisposer.prototype.doDispose = function(resource, inspection) { + var fn = this.data(); + return fn.call(resource, resource, inspection); + }; + function maybeUnwrapDisposer(value) { + if (Disposer.isDisposer(value)) { + this.resources[this.index]._setDisposable(value); + return value.promise(); + } + return value; + } + function ResourceList(length) { + this.length = length; + this.promise = null; + this[length - 1] = null; + } + ResourceList.prototype._resultCancelled = function() { + var len = this.length; + for (var i = 0; i < len; ++i) { + var item = this[i]; + if (item instanceof Promise2) { + item.cancel(); + } + } + }; + Promise2.using = function() { + var len = arguments.length; + if (len < 2) return apiRejection( + "you must pass at least 2 arguments to Promise.using" + ); + var fn = arguments[len - 1]; + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util2.classString(fn)); + } + var input; + var spreadArgs = true; + if (len === 2 && Array.isArray(arguments[0])) { + input = arguments[0]; + len = input.length; + spreadArgs = false; + } else { + input = arguments; + len--; + } + var resources = new ResourceList(len); + for (var i = 0; i < len; ++i) { + var resource = input[i]; + if (Disposer.isDisposer(resource)) { + var disposer = resource; + resource = resource.promise(); + resource._setDisposable(disposer); + } else { + var maybePromise = tryConvertToPromise(resource); + if (maybePromise instanceof Promise2) { + resource = maybePromise._then(maybeUnwrapDisposer, null, null, { + resources, + index: i + }, void 0); + } + } + resources[i] = resource; + } + var reflectedResources = new Array(resources.length); + for (var i = 0; i < reflectedResources.length; ++i) { + reflectedResources[i] = Promise2.resolve(resources[i]).reflect(); + } + var resultPromise = Promise2.all(reflectedResources).then(function(inspections) { + for (var i2 = 0; i2 < inspections.length; ++i2) { + var inspection = inspections[i2]; + if (inspection.isRejected()) { + errorObj2.e = inspection.error(); + return errorObj2; + } else if (!inspection.isFulfilled()) { + resultPromise.cancel(); + return; + } + inspections[i2] = inspection.value(); + } + promise._pushContext(); + fn = tryCatch2(fn); + var ret2 = spreadArgs ? fn.apply(void 0, inspections) : fn(inspections); + var promiseCreated = promise._popContext(); + debug.checkForgottenReturns( + ret2, + promiseCreated, + "Promise.using", + promise + ); + return ret2; + }); + var promise = resultPromise.lastly(function() { + var inspection = new Promise2.PromiseInspection(resultPromise); + return dispose(resources, inspection); + }); + resources.promise = promise; + promise._setOnCancel(resources); + return promise; + }; + Promise2.prototype._setDisposable = function(disposer) { + this._bitField = this._bitField | 131072; + this._disposer = disposer; + }; + Promise2.prototype._isDisposable = function() { + return (this._bitField & 131072) > 0; + }; + Promise2.prototype._getDisposer = function() { + return this._disposer; + }; + Promise2.prototype._unsetDisposable = function() { + this._bitField = this._bitField & ~131072; + this._disposer = void 0; + }; + Promise2.prototype.disposer = function(fn) { + if (typeof fn === "function") { + return new FunctionDisposer(fn, this, createContext()); + } + throw new TypeError2(); + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/timers.js +var require_timers = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/timers.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, INTERNAL, debug) { + var util2 = require_util5(); + var TimeoutError = Promise2.TimeoutError; + function HandleWrapper(handle) { + this.handle = handle; + } + HandleWrapper.prototype._resultCancelled = function() { + clearTimeout(this.handle); + }; + var afterValue = function(value) { + return delay(+this).thenReturn(value); + }; + var delay = Promise2.delay = function(ms, value) { + var ret2; + var handle; + if (value !== void 0) { + ret2 = Promise2.resolve(value)._then(afterValue, null, null, ms, void 0); + if (debug.cancellation() && value instanceof Promise2) { + ret2._setOnCancel(value); + } + } else { + ret2 = new Promise2(INTERNAL); + handle = setTimeout(function() { + ret2._fulfill(); + }, +ms); + if (debug.cancellation()) { + ret2._setOnCancel(new HandleWrapper(handle)); + } + ret2._captureStackTrace(); + } + ret2._setAsyncGuaranteed(); + return ret2; + }; + Promise2.prototype.delay = function(ms) { + return delay(ms, this); + }; + var afterTimeout = function(promise, message, parent) { + var err; + if (typeof message !== "string") { + if (message instanceof Error) { + err = message; + } else { + err = new TimeoutError("operation timed out"); + } + } else { + err = new TimeoutError(message); + } + util2.markAsOriginatingFromRejection(err); + promise._attachExtraTrace(err); + promise._reject(err); + if (parent != null) { + parent.cancel(); + } + }; + function successClear(value) { + clearTimeout(this.handle); + return value; + } + function failureClear(reason) { + clearTimeout(this.handle); + throw reason; + } + Promise2.prototype.timeout = function(ms, message) { + ms = +ms; + var ret2, parent; + var handleWrapper = new HandleWrapper(setTimeout(function timeoutTimeout() { + if (ret2.isPending()) { + afterTimeout(ret2, message, parent); + } + }, ms)); + if (debug.cancellation()) { + parent = this.then(); + ret2 = parent._then( + successClear, + failureClear, + void 0, + handleWrapper, + void 0 + ); + ret2._setOnCancel(handleWrapper); + } else { + ret2 = this._then( + successClear, + failureClear, + void 0, + handleWrapper, + void 0 + ); + } + return ret2; + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/generators.js +var require_generators = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/generators.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, apiRejection, INTERNAL, tryConvertToPromise, Proxyable, debug) { + var errors = require_errors2(); + var TypeError2 = errors.TypeError; + var util2 = require_util5(); + var errorObj2 = util2.errorObj; + var tryCatch2 = util2.tryCatch; + var yieldHandlers = []; + function promiseFromYieldHandler(value, yieldHandlers2, traceParent) { + for (var i = 0; i < yieldHandlers2.length; ++i) { + traceParent._pushContext(); + var result = tryCatch2(yieldHandlers2[i])(value); + traceParent._popContext(); + if (result === errorObj2) { + traceParent._pushContext(); + var ret2 = Promise2.reject(errorObj2.e); + traceParent._popContext(); + return ret2; + } + var maybePromise = tryConvertToPromise(result, traceParent); + if (maybePromise instanceof Promise2) return maybePromise; + } + return null; + } + function PromiseSpawn(generatorFunction, receiver, yieldHandler, stack) { + if (debug.cancellation()) { + var internal = new Promise2(INTERNAL); + var _finallyPromise = this._finallyPromise = new Promise2(INTERNAL); + this._promise = internal.lastly(function() { + return _finallyPromise; + }); + internal._captureStackTrace(); + internal._setOnCancel(this); + } else { + var promise = this._promise = new Promise2(INTERNAL); + promise._captureStackTrace(); + } + this._stack = stack; + this._generatorFunction = generatorFunction; + this._receiver = receiver; + this._generator = void 0; + this._yieldHandlers = typeof yieldHandler === "function" ? [yieldHandler].concat(yieldHandlers) : yieldHandlers; + this._yieldedPromise = null; + this._cancellationPhase = false; + } + util2.inherits(PromiseSpawn, Proxyable); + PromiseSpawn.prototype._isResolved = function() { + return this._promise === null; + }; + PromiseSpawn.prototype._cleanup = function() { + this._promise = this._generator = null; + if (debug.cancellation() && this._finallyPromise !== null) { + this._finallyPromise._fulfill(); + this._finallyPromise = null; + } + }; + PromiseSpawn.prototype._promiseCancelled = function() { + if (this._isResolved()) return; + var implementsReturn = typeof this._generator["return"] !== "undefined"; + var result; + if (!implementsReturn) { + var reason = new Promise2.CancellationError( + "generator .return() sentinel" + ); + Promise2.coroutine.returnSentinel = reason; + this._promise._attachExtraTrace(reason); + this._promise._pushContext(); + result = tryCatch2(this._generator["throw"]).call( + this._generator, + reason + ); + this._promise._popContext(); + } else { + this._promise._pushContext(); + result = tryCatch2(this._generator["return"]).call( + this._generator, + void 0 + ); + this._promise._popContext(); + } + this._cancellationPhase = true; + this._yieldedPromise = null; + this._continue(result); + }; + PromiseSpawn.prototype._promiseFulfilled = function(value) { + this._yieldedPromise = null; + this._promise._pushContext(); + var result = tryCatch2(this._generator.next).call(this._generator, value); + this._promise._popContext(); + this._continue(result); + }; + PromiseSpawn.prototype._promiseRejected = function(reason) { + this._yieldedPromise = null; + this._promise._attachExtraTrace(reason); + this._promise._pushContext(); + var result = tryCatch2(this._generator["throw"]).call(this._generator, reason); + this._promise._popContext(); + this._continue(result); + }; + PromiseSpawn.prototype._resultCancelled = function() { + if (this._yieldedPromise instanceof Promise2) { + var promise = this._yieldedPromise; + this._yieldedPromise = null; + promise.cancel(); + } + }; + PromiseSpawn.prototype.promise = function() { + return this._promise; + }; + PromiseSpawn.prototype._run = function() { + this._generator = this._generatorFunction.call(this._receiver); + this._receiver = this._generatorFunction = void 0; + this._promiseFulfilled(void 0); + }; + PromiseSpawn.prototype._continue = function(result) { + var promise = this._promise; + if (result === errorObj2) { + this._cleanup(); + if (this._cancellationPhase) { + return promise.cancel(); + } else { + return promise._rejectCallback(result.e, false); + } + } + var value = result.value; + if (result.done === true) { + this._cleanup(); + if (this._cancellationPhase) { + return promise.cancel(); + } else { + return promise._resolveCallback(value); + } + } else { + var maybePromise = tryConvertToPromise(value, this._promise); + if (!(maybePromise instanceof Promise2)) { + maybePromise = promiseFromYieldHandler( + maybePromise, + this._yieldHandlers, + this._promise + ); + if (maybePromise === null) { + this._promiseRejected( + new TypeError2( + "A value %s was yielded that could not be treated as a promise\n\n See http://goo.gl/MqrFmX\n\n".replace("%s", value) + "From coroutine:\n" + this._stack.split("\n").slice(1, -7).join("\n") + ) + ); + return; + } + } + maybePromise = maybePromise._target(); + var bitField = maybePromise._bitField; + ; + if ((bitField & 50397184) === 0) { + this._yieldedPromise = maybePromise; + maybePromise._proxy(this, null); + } else if ((bitField & 33554432) !== 0) { + Promise2._async.invoke( + this._promiseFulfilled, + this, + maybePromise._value() + ); + } else if ((bitField & 16777216) !== 0) { + Promise2._async.invoke( + this._promiseRejected, + this, + maybePromise._reason() + ); + } else { + this._promiseCancelled(); + } + } + }; + Promise2.coroutine = function(generatorFunction, options) { + if (typeof generatorFunction !== "function") { + throw new TypeError2("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n"); + } + var yieldHandler = Object(options).yieldHandler; + var PromiseSpawn$ = PromiseSpawn; + var stack = new Error().stack; + return function() { + var generator = generatorFunction.apply(this, arguments); + var spawn = new PromiseSpawn$( + void 0, + void 0, + yieldHandler, + stack + ); + var ret2 = spawn.promise(); + spawn._generator = generator; + spawn._promiseFulfilled(void 0); + return ret2; + }; + }; + Promise2.coroutine.addYieldHandler = function(fn) { + if (typeof fn !== "function") { + throw new TypeError2("expecting a function but got " + util2.classString(fn)); + } + yieldHandlers.push(fn); + }; + Promise2.spawn = function(generatorFunction) { + debug.deprecated("Promise.spawn()", "Promise.coroutine()"); + if (typeof generatorFunction !== "function") { + return apiRejection("generatorFunction must be a function\n\n See http://goo.gl/MqrFmX\n"); + } + var spawn = new PromiseSpawn(generatorFunction, this); + var ret2 = spawn.promise(); + spawn._run(Promise2.spawn); + return ret2; + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/nodeify.js +var require_nodeify = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/nodeify.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2) { + var util2 = require_util5(); + var async = Promise2._async; + var tryCatch2 = util2.tryCatch; + var errorObj2 = util2.errorObj; + function spreadAdapter(val, nodeback) { + var promise = this; + if (!util2.isArray(val)) return successAdapter.call(promise, val, nodeback); + var ret2 = tryCatch2(nodeback).apply(promise._boundValue(), [null].concat(val)); + if (ret2 === errorObj2) { + async.throwLater(ret2.e); + } + } + function successAdapter(val, nodeback) { + var promise = this; + var receiver = promise._boundValue(); + var ret2 = val === void 0 ? tryCatch2(nodeback).call(receiver, null) : tryCatch2(nodeback).call(receiver, null, val); + if (ret2 === errorObj2) { + async.throwLater(ret2.e); + } + } + function errorAdapter(reason, nodeback) { + var promise = this; + if (!reason) { + var newReason = new Error(reason + ""); + newReason.cause = reason; + reason = newReason; + } + var ret2 = tryCatch2(nodeback).call(promise._boundValue(), reason); + if (ret2 === errorObj2) { + async.throwLater(ret2.e); + } + } + Promise2.prototype.asCallback = Promise2.prototype.nodeify = function(nodeback, options) { + if (typeof nodeback == "function") { + var adapter = successAdapter; + if (options !== void 0 && Object(options).spread) { + adapter = spreadAdapter; + } + this._then( + adapter, + errorAdapter, + void 0, + this, + nodeback + ); + } + return this; + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/promisify.js +var require_promisify = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/promisify.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, INTERNAL) { + var THIS = {}; + var util2 = require_util5(); + var nodebackForPromise = require_nodeback(); + var withAppended2 = util2.withAppended; + var maybeWrapAsError2 = util2.maybeWrapAsError; + var canEvaluate2 = util2.canEvaluate; + var TypeError2 = require_errors2().TypeError; + var defaultSuffix = "Async"; + var defaultPromisified = { __isPromisified__: true }; + var noCopyProps = [ + "arity", + "length", + "name", + "arguments", + "caller", + "callee", + "prototype", + "__isPromisified__" + ]; + var noCopyPropsPattern = new RegExp("^(?:" + noCopyProps.join("|") + ")$"); + var defaultFilter = function(name) { + return util2.isIdentifier(name) && name.charAt(0) !== "_" && name !== "constructor"; + }; + function propsFilter(key) { + return !noCopyPropsPattern.test(key); + } + function isPromisified(fn) { + try { + return fn.__isPromisified__ === true; + } catch (e) { + return false; + } + } + function hasPromisified(obj2, key, suffix) { + var val = util2.getDataPropertyOrDefault( + obj2, + key + suffix, + defaultPromisified + ); + return val ? isPromisified(val) : false; + } + function checkValid(ret2, suffix, suffixRegexp) { + for (var i = 0; i < ret2.length; i += 2) { + var key = ret2[i]; + if (suffixRegexp.test(key)) { + var keyWithoutAsyncSuffix = key.replace(suffixRegexp, ""); + for (var j = 0; j < ret2.length; j += 2) { + if (ret2[j] === keyWithoutAsyncSuffix) { + throw new TypeError2("Cannot promisify an API that has normal methods with '%s'-suffix\n\n See http://goo.gl/MqrFmX\n".replace("%s", suffix)); + } + } + } + } + } + function promisifiableMethods(obj2, suffix, suffixRegexp, filter) { + var keys = util2.inheritedDataKeys(obj2); + var ret2 = []; + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + var value = obj2[key]; + var passesDefaultFilter = filter === defaultFilter ? true : defaultFilter(key, value, obj2); + if (typeof value === "function" && !isPromisified(value) && !hasPromisified(obj2, key, suffix) && filter(key, value, obj2, passesDefaultFilter)) { + ret2.push(key, value); + } + } + checkValid(ret2, suffix, suffixRegexp); + return ret2; + } + var escapeIdentRegex = function(str) { + return str.replace(/([$])/, "\\$"); + }; + var makeNodePromisifiedEval; + if (true) { + var switchCaseArgumentOrder = function(likelyArgumentCount) { + var ret2 = [likelyArgumentCount]; + var min = Math.max(0, likelyArgumentCount - 1 - 3); + for (var i = likelyArgumentCount - 1; i >= min; --i) { + ret2.push(i); + } + for (var i = likelyArgumentCount + 1; i <= 3; ++i) { + ret2.push(i); + } + return ret2; + }; + var argumentSequence = function(argumentCount) { + return util2.filledRange(argumentCount, "_arg", ""); + }; + var parameterDeclaration = function(parameterCount2) { + return util2.filledRange( + Math.max(parameterCount2, 3), + "_arg", + "" + ); + }; + var parameterCount = function(fn) { + if (typeof fn.length === "number") { + return Math.max(Math.min(fn.length, 1023 + 1), 0); + } + return 0; + }; + makeNodePromisifiedEval = function(callback, receiver, originalName, fn, _2, multiArgs) { + var newParameterCount = Math.max(0, parameterCount(fn) - 1); + var argumentOrder = switchCaseArgumentOrder(newParameterCount); + var shouldProxyThis = typeof callback === "string" || receiver === THIS; + function generateCallForArgumentCount(count) { + var args = argumentSequence(count).join(", "); + var comma = count > 0 ? ", " : ""; + var ret2; + if (shouldProxyThis) { + ret2 = "ret = callback.call(this, {{args}}, nodeback); break;\n"; + } else { + ret2 = receiver === void 0 ? "ret = callback({{args}}, nodeback); break;\n" : "ret = callback.call(receiver, {{args}}, nodeback); break;\n"; + } + return ret2.replace("{{args}}", args).replace(", ", comma); + } + function generateArgumentSwitchCase() { + var ret2 = ""; + for (var i = 0; i < argumentOrder.length; ++i) { + ret2 += "case " + argumentOrder[i] + ":" + generateCallForArgumentCount(argumentOrder[i]); + } + ret2 += " \n default: \n var args = new Array(len + 1); \n var i = 0; \n for (var i = 0; i < len; ++i) { \n args[i] = arguments[i]; \n } \n args[i] = nodeback; \n [CodeForCall] \n break; \n ".replace("[CodeForCall]", shouldProxyThis ? "ret = callback.apply(this, args);\n" : "ret = callback.apply(receiver, args);\n"); + return ret2; + } + var getFunctionCode = typeof callback === "string" ? "this != null ? this['" + callback + "'] : fn" : "fn"; + var body = "'use strict'; \n var ret = function (Parameters) { \n 'use strict'; \n var len = arguments.length; \n var promise = new Promise(INTERNAL); \n promise._captureStackTrace(); \n var nodeback = nodebackForPromise(promise, " + multiArgs + "); \n var ret; \n var callback = tryCatch([GetFunctionCode]); \n switch(len) { \n [CodeForSwitchCase] \n } \n if (ret === errorObj) { \n promise._rejectCallback(maybeWrapAsError(ret.e), true, true);\n } \n if (!promise._isFateSealed()) promise._setAsyncGuaranteed(); \n return promise; \n }; \n notEnumerableProp(ret, '__isPromisified__', true); \n return ret; \n ".replace("[CodeForSwitchCase]", generateArgumentSwitchCase()).replace("[GetFunctionCode]", getFunctionCode); + body = body.replace("Parameters", parameterDeclaration(newParameterCount)); + return new Function( + "Promise", + "fn", + "receiver", + "withAppended", + "maybeWrapAsError", + "nodebackForPromise", + "tryCatch", + "errorObj", + "notEnumerableProp", + "INTERNAL", + body + )( + Promise2, + fn, + receiver, + withAppended2, + maybeWrapAsError2, + nodebackForPromise, + util2.tryCatch, + util2.errorObj, + util2.notEnumerableProp, + INTERNAL + ); + }; + } + function makeNodePromisifiedClosure(callback, receiver, _2, fn, __, multiArgs) { + var defaultThis = /* @__PURE__ */ (function() { + return this; + })(); + var method = callback; + if (typeof method === "string") { + callback = fn; + } + function promisified() { + var _receiver = receiver; + if (receiver === THIS) _receiver = this; + var promise = new Promise2(INTERNAL); + promise._captureStackTrace(); + var cb = typeof method === "string" && this !== defaultThis ? this[method] : callback; + var fn2 = nodebackForPromise(promise, multiArgs); + try { + cb.apply(_receiver, withAppended2(arguments, fn2)); + } catch (e) { + promise._rejectCallback(maybeWrapAsError2(e), true, true); + } + if (!promise._isFateSealed()) promise._setAsyncGuaranteed(); + return promise; + } + util2.notEnumerableProp(promisified, "__isPromisified__", true); + return promisified; + } + var makeNodePromisified = canEvaluate2 ? makeNodePromisifiedEval : makeNodePromisifiedClosure; + function promisifyAll(obj2, suffix, filter, promisifier, multiArgs) { + var suffixRegexp = new RegExp(escapeIdentRegex(suffix) + "$"); + var methods = promisifiableMethods(obj2, suffix, suffixRegexp, filter); + for (var i = 0, len = methods.length; i < len; i += 2) { + var key = methods[i]; + var fn = methods[i + 1]; + var promisifiedKey = key + suffix; + if (promisifier === makeNodePromisified) { + obj2[promisifiedKey] = makeNodePromisified(key, THIS, key, fn, suffix, multiArgs); + } else { + var promisified = promisifier(fn, function() { + return makeNodePromisified( + key, + THIS, + key, + fn, + suffix, + multiArgs + ); + }); + util2.notEnumerableProp(promisified, "__isPromisified__", true); + obj2[promisifiedKey] = promisified; + } + } + util2.toFastProperties(obj2); + return obj2; + } + function promisify(callback, receiver, multiArgs) { + return makeNodePromisified( + callback, + receiver, + void 0, + callback, + null, + multiArgs + ); + } + Promise2.promisify = function(fn, options) { + if (typeof fn !== "function") { + throw new TypeError2("expecting a function but got " + util2.classString(fn)); + } + if (isPromisified(fn)) { + return fn; + } + options = Object(options); + var receiver = options.context === void 0 ? THIS : options.context; + var multiArgs = !!options.multiArgs; + var ret2 = promisify(fn, receiver, multiArgs); + util2.copyDescriptors(fn, ret2, propsFilter); + return ret2; + }; + Promise2.promisifyAll = function(target, options) { + if (typeof target !== "function" && typeof target !== "object") { + throw new TypeError2("the target of promisifyAll must be an object or a function\n\n See http://goo.gl/MqrFmX\n"); + } + options = Object(options); + var multiArgs = !!options.multiArgs; + var suffix = options.suffix; + if (typeof suffix !== "string") suffix = defaultSuffix; + var filter = options.filter; + if (typeof filter !== "function") filter = defaultFilter; + var promisifier = options.promisifier; + if (typeof promisifier !== "function") promisifier = makeNodePromisified; + if (!util2.isIdentifier(suffix)) { + throw new RangeError("suffix must be a valid identifier\n\n See http://goo.gl/MqrFmX\n"); + } + var keys = util2.inheritedDataKeys(target); + for (var i = 0; i < keys.length; ++i) { + var value = target[keys[i]]; + if (keys[i] !== "constructor" && util2.isClass(value)) { + promisifyAll( + value.prototype, + suffix, + filter, + promisifier, + multiArgs + ); + promisifyAll(value, suffix, filter, promisifier, multiArgs); + } + } + return promisifyAll(target, suffix, filter, promisifier, multiArgs); + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/props.js +var require_props = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/props.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, PromiseArray, tryConvertToPromise, apiRejection) { + var util2 = require_util5(); + var isObject2 = util2.isObject; + var es52 = require_es5(); + var Es6Map; + if (typeof Map === "function") Es6Map = Map; + var mapToEntries = /* @__PURE__ */ (function() { + var index = 0; + var size = 0; + function extractEntry(value, key) { + this[index] = value; + this[index + size] = key; + index++; + } + return function mapToEntries2(map) { + size = map.size; + index = 0; + var ret2 = new Array(map.size * 2); + map.forEach(extractEntry, ret2); + return ret2; + }; + })(); + var entriesToMap = function(entries) { + var ret2 = new Es6Map(); + var length = entries.length / 2 | 0; + for (var i = 0; i < length; ++i) { + var key = entries[length + i]; + var value = entries[i]; + ret2.set(key, value); + } + return ret2; + }; + function PropertiesPromiseArray(obj2) { + var isMap = false; + var entries; + if (Es6Map !== void 0 && obj2 instanceof Es6Map) { + entries = mapToEntries(obj2); + isMap = true; + } else { + var keys = es52.keys(obj2); + var len = keys.length; + entries = new Array(len * 2); + for (var i = 0; i < len; ++i) { + var key = keys[i]; + entries[i] = obj2[key]; + entries[i + len] = key; + } + } + this.constructor$(entries); + this._isMap = isMap; + this._init$(void 0, -3); + } + util2.inherits(PropertiesPromiseArray, PromiseArray); + PropertiesPromiseArray.prototype._init = function() { + }; + PropertiesPromiseArray.prototype._promiseFulfilled = function(value, index) { + this._values[index] = value; + var totalResolved = ++this._totalResolved; + if (totalResolved >= this._length) { + var val; + if (this._isMap) { + val = entriesToMap(this._values); + } else { + val = {}; + var keyOffset = this.length(); + for (var i = 0, len = this.length(); i < len; ++i) { + val[this._values[i + keyOffset]] = this._values[i]; + } + } + this._resolve(val); + return true; + } + return false; + }; + PropertiesPromiseArray.prototype.shouldCopyValues = function() { + return false; + }; + PropertiesPromiseArray.prototype.getActualLength = function(len) { + return len >> 1; + }; + function props(promises) { + var ret2; + var castValue = tryConvertToPromise(promises); + if (!isObject2(castValue)) { + return apiRejection("cannot await properties of a non-object\n\n See http://goo.gl/MqrFmX\n"); + } else if (castValue instanceof Promise2) { + ret2 = castValue._then( + Promise2.props, + void 0, + void 0, + void 0, + void 0 + ); + } else { + ret2 = new PropertiesPromiseArray(castValue).promise(); + } + if (castValue instanceof Promise2) { + ret2._propagateFrom(castValue, 2); + } + return ret2; + } + Promise2.prototype.props = function() { + return props(this); + }; + Promise2.props = function(promises) { + return props(promises); + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/race.js +var require_race3 = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/race.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, INTERNAL, tryConvertToPromise, apiRejection) { + var util2 = require_util5(); + var raceLater = function(promise) { + return promise.then(function(array) { + return race(array, promise); + }); + }; + function race(promises, parent) { + var maybePromise = tryConvertToPromise(promises); + if (maybePromise instanceof Promise2) { + return raceLater(maybePromise); + } else { + promises = util2.asArray(promises); + if (promises === null) + return apiRejection("expecting an array or an iterable object but got " + util2.classString(promises)); + } + var ret2 = new Promise2(INTERNAL); + if (parent !== void 0) { + ret2._propagateFrom(parent, 3); + } + var fulfill = ret2._fulfill; + var reject = ret2._reject; + for (var i = 0, len = promises.length; i < len; ++i) { + var val = promises[i]; + if (val === void 0 && !(i in promises)) { + continue; + } + Promise2.cast(val)._then(fulfill, reject, void 0, ret2, null); + } + return ret2; + } + Promise2.race = function(promises) { + return race(promises, void 0); + }; + Promise2.prototype.race = function() { + return race(this, void 0); + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/reduce.js +var require_reduce2 = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/reduce.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug) { + var getDomain = Promise2._getDomain; + var util2 = require_util5(); + var tryCatch2 = util2.tryCatch; + function ReductionPromiseArray(promises, fn, initialValue, _each) { + this.constructor$(promises); + var domain = getDomain(); + this._fn = domain === null ? fn : util2.domainBind(domain, fn); + if (initialValue !== void 0) { + initialValue = Promise2.resolve(initialValue); + initialValue._attachCancellationCallback(this); + } + this._initialValue = initialValue; + this._currentCancellable = null; + if (_each === INTERNAL) { + this._eachValues = Array(this._length); + } else if (_each === 0) { + this._eachValues = null; + } else { + this._eachValues = void 0; + } + this._promise._captureStackTrace(); + this._init$(void 0, -5); + } + util2.inherits(ReductionPromiseArray, PromiseArray); + ReductionPromiseArray.prototype._gotAccum = function(accum) { + if (this._eachValues !== void 0 && this._eachValues !== null && accum !== INTERNAL) { + this._eachValues.push(accum); + } + }; + ReductionPromiseArray.prototype._eachComplete = function(value) { + if (this._eachValues !== null) { + this._eachValues.push(value); + } + return this._eachValues; + }; + ReductionPromiseArray.prototype._init = function() { + }; + ReductionPromiseArray.prototype._resolveEmptyArray = function() { + this._resolve(this._eachValues !== void 0 ? this._eachValues : this._initialValue); + }; + ReductionPromiseArray.prototype.shouldCopyValues = function() { + return false; + }; + ReductionPromiseArray.prototype._resolve = function(value) { + this._promise._resolveCallback(value); + this._values = null; + }; + ReductionPromiseArray.prototype._resultCancelled = function(sender) { + if (sender === this._initialValue) return this._cancel(); + if (this._isResolved()) return; + this._resultCancelled$(); + if (this._currentCancellable instanceof Promise2) { + this._currentCancellable.cancel(); + } + if (this._initialValue instanceof Promise2) { + this._initialValue.cancel(); + } + }; + ReductionPromiseArray.prototype._iterate = function(values) { + this._values = values; + var value; + var i; + var length = values.length; + if (this._initialValue !== void 0) { + value = this._initialValue; + i = 0; + } else { + value = Promise2.resolve(values[0]); + i = 1; + } + this._currentCancellable = value; + if (!value.isRejected()) { + for (; i < length; ++i) { + var ctx = { + accum: null, + value: values[i], + index: i, + length, + array: this + }; + value = value._then(gotAccum, void 0, void 0, ctx, void 0); + } + } + if (this._eachValues !== void 0) { + value = value._then(this._eachComplete, void 0, void 0, this, void 0); + } + value._then(completed, completed, void 0, value, this); + }; + Promise2.prototype.reduce = function(fn, initialValue) { + return reduce(this, fn, initialValue, null); + }; + Promise2.reduce = function(promises, fn, initialValue, _each) { + return reduce(promises, fn, initialValue, _each); + }; + function completed(valueOrReason, array) { + if (this.isFulfilled()) { + array._resolve(valueOrReason); + } else { + array._reject(valueOrReason); + } + } + function reduce(promises, fn, initialValue, _each) { + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util2.classString(fn)); + } + var array = new ReductionPromiseArray(promises, fn, initialValue, _each); + return array.promise(); + } + function gotAccum(accum) { + this.accum = accum; + this.array._gotAccum(accum); + var value = tryConvertToPromise(this.value, this.array._promise); + if (value instanceof Promise2) { + this.array._currentCancellable = value; + return value._then(gotValue, void 0, void 0, this, void 0); + } else { + return gotValue.call(this, value); + } + } + function gotValue(value) { + var array = this.array; + var promise = array._promise; + var fn = tryCatch2(array._fn); + promise._pushContext(); + var ret2; + if (array._eachValues !== void 0) { + ret2 = fn.call(promise._boundValue(), value, this.index, this.length); + } else { + ret2 = fn.call( + promise._boundValue(), + this.accum, + value, + this.index, + this.length + ); + } + if (ret2 instanceof Promise2) { + array._currentCancellable = ret2; + } + var promiseCreated = promise._popContext(); + debug.checkForgottenReturns( + ret2, + promiseCreated, + array._eachValues !== void 0 ? "Promise.each" : "Promise.reduce", + promise + ); + return ret2; + } + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/settle.js +var require_settle = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/settle.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, PromiseArray, debug) { + var PromiseInspection = Promise2.PromiseInspection; + var util2 = require_util5(); + function SettledPromiseArray(values) { + this.constructor$(values); + } + util2.inherits(SettledPromiseArray, PromiseArray); + SettledPromiseArray.prototype._promiseResolved = function(index, inspection) { + this._values[index] = inspection; + var totalResolved = ++this._totalResolved; + if (totalResolved >= this._length) { + this._resolve(this._values); + return true; + } + return false; + }; + SettledPromiseArray.prototype._promiseFulfilled = function(value, index) { + var ret2 = new PromiseInspection(); + ret2._bitField = 33554432; + ret2._settledValueField = value; + return this._promiseResolved(index, ret2); + }; + SettledPromiseArray.prototype._promiseRejected = function(reason, index) { + var ret2 = new PromiseInspection(); + ret2._bitField = 16777216; + ret2._settledValueField = reason; + return this._promiseResolved(index, ret2); + }; + Promise2.settle = function(promises) { + debug.deprecated(".settle()", ".reflect()"); + return new SettledPromiseArray(promises).promise(); + }; + Promise2.prototype.settle = function() { + return Promise2.settle(this); + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/some.js +var require_some = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/some.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, PromiseArray, apiRejection) { + var util2 = require_util5(); + var RangeError2 = require_errors2().RangeError; + var AggregateError2 = require_errors2().AggregateError; + var isArray = util2.isArray; + var CANCELLATION = {}; + function SomePromiseArray(values) { + this.constructor$(values); + this._howMany = 0; + this._unwrap = false; + this._initialized = false; + } + util2.inherits(SomePromiseArray, PromiseArray); + SomePromiseArray.prototype._init = function() { + if (!this._initialized) { + return; + } + if (this._howMany === 0) { + this._resolve([]); + return; + } + this._init$(void 0, -5); + var isArrayResolved = isArray(this._values); + if (!this._isResolved() && isArrayResolved && this._howMany > this._canPossiblyFulfill()) { + this._reject(this._getRangeError(this.length())); + } + }; + SomePromiseArray.prototype.init = function() { + this._initialized = true; + this._init(); + }; + SomePromiseArray.prototype.setUnwrap = function() { + this._unwrap = true; + }; + SomePromiseArray.prototype.howMany = function() { + return this._howMany; + }; + SomePromiseArray.prototype.setHowMany = function(count) { + this._howMany = count; + }; + SomePromiseArray.prototype._promiseFulfilled = function(value) { + this._addFulfilled(value); + if (this._fulfilled() === this.howMany()) { + this._values.length = this.howMany(); + if (this.howMany() === 1 && this._unwrap) { + this._resolve(this._values[0]); + } else { + this._resolve(this._values); + } + return true; + } + return false; + }; + SomePromiseArray.prototype._promiseRejected = function(reason) { + this._addRejected(reason); + return this._checkOutcome(); + }; + SomePromiseArray.prototype._promiseCancelled = function() { + if (this._values instanceof Promise2 || this._values == null) { + return this._cancel(); + } + this._addRejected(CANCELLATION); + return this._checkOutcome(); + }; + SomePromiseArray.prototype._checkOutcome = function() { + if (this.howMany() > this._canPossiblyFulfill()) { + var e = new AggregateError2(); + for (var i = this.length(); i < this._values.length; ++i) { + if (this._values[i] !== CANCELLATION) { + e.push(this._values[i]); + } + } + if (e.length > 0) { + this._reject(e); + } else { + this._cancel(); + } + return true; + } + return false; + }; + SomePromiseArray.prototype._fulfilled = function() { + return this._totalResolved; + }; + SomePromiseArray.prototype._rejected = function() { + return this._values.length - this.length(); + }; + SomePromiseArray.prototype._addRejected = function(reason) { + this._values.push(reason); + }; + SomePromiseArray.prototype._addFulfilled = function(value) { + this._values[this._totalResolved++] = value; + }; + SomePromiseArray.prototype._canPossiblyFulfill = function() { + return this.length() - this._rejected(); + }; + SomePromiseArray.prototype._getRangeError = function(count) { + var message = "Input array must contain at least " + this._howMany + " items but contains only " + count + " items"; + return new RangeError2(message); + }; + SomePromiseArray.prototype._resolveEmptyArray = function() { + this._reject(this._getRangeError(0)); + }; + function some(promises, howMany) { + if ((howMany | 0) !== howMany || howMany < 0) { + return apiRejection("expecting a positive integer\n\n See http://goo.gl/MqrFmX\n"); + } + var ret2 = new SomePromiseArray(promises); + var promise = ret2.promise(); + ret2.setHowMany(howMany); + ret2.init(); + return promise; + } + Promise2.some = function(promises, howMany) { + return some(promises, howMany); + }; + Promise2.prototype.some = function(howMany) { + return some(this, howMany); + }; + Promise2._SomePromiseArray = SomePromiseArray; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/filter.js +var require_filter3 = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/filter.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, INTERNAL) { + var PromiseMap = Promise2.map; + Promise2.prototype.filter = function(fn, options) { + return PromiseMap(this, fn, options, INTERNAL); + }; + Promise2.filter = function(promises, fn, options) { + return PromiseMap(promises, fn, options, INTERNAL); + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/each.js +var require_each = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/each.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2, INTERNAL) { + var PromiseReduce = Promise2.reduce; + var PromiseAll = Promise2.all; + function promiseAllThis() { + return PromiseAll(this); + } + function PromiseMapSeries(promises, fn) { + return PromiseReduce(promises, fn, INTERNAL, INTERNAL); + } + Promise2.prototype.each = function(fn) { + return PromiseReduce(this, fn, INTERNAL, 0)._then(promiseAllThis, void 0, void 0, this, void 0); + }; + Promise2.prototype.mapSeries = function(fn) { + return PromiseReduce(this, fn, INTERNAL, INTERNAL); + }; + Promise2.each = function(promises, fn) { + return PromiseReduce(promises, fn, INTERNAL, 0)._then(promiseAllThis, void 0, void 0, promises, void 0); + }; + Promise2.mapSeries = PromiseMapSeries; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/any.js +var require_any = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/any.js"(exports2, module2) { + "use strict"; + module2.exports = function(Promise2) { + var SomePromiseArray = Promise2._SomePromiseArray; + function any(promises) { + var ret2 = new SomePromiseArray(promises); + var promise = ret2.promise(); + ret2.setHowMany(1); + ret2.setUnwrap(); + ret2.init(); + return promise; + } + Promise2.any = function(promises) { + return any(promises); + }; + Promise2.prototype.any = function() { + return any(this); + }; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/promise.js +var require_promise = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/promise.js"(exports2, module2) { + "use strict"; + module2.exports = function() { + var makeSelfResolutionError = function() { + return new TypeError2("circular promise resolution chain\n\n See http://goo.gl/MqrFmX\n"); + }; + var reflectHandler = function() { + return new Promise2.PromiseInspection(this._target()); + }; + var apiRejection = function(msg) { + return Promise2.reject(new TypeError2(msg)); + }; + function Proxyable() { + } + var UNDEFINED_BINDING = {}; + var util2 = require_util5(); + var getDomain; + if (util2.isNode) { + getDomain = function() { + var ret2 = process.domain; + if (ret2 === void 0) ret2 = null; + return ret2; + }; + } else { + getDomain = function() { + return null; + }; + } + util2.notEnumerableProp(Promise2, "_getDomain", getDomain); + var es52 = require_es5(); + var Async = require_async3(); + var async = new Async(); + es52.defineProperty(Promise2, "_async", { value: async }); + var errors = require_errors2(); + var TypeError2 = Promise2.TypeError = errors.TypeError; + Promise2.RangeError = errors.RangeError; + var CancellationError = Promise2.CancellationError = errors.CancellationError; + Promise2.TimeoutError = errors.TimeoutError; + Promise2.OperationalError = errors.OperationalError; + Promise2.RejectionError = errors.OperationalError; + Promise2.AggregateError = errors.AggregateError; + var INTERNAL = function() { + }; + var APPLY = {}; + var NEXT_FILTER = {}; + var tryConvertToPromise = require_thenables()(Promise2, INTERNAL); + var PromiseArray = require_promise_array()( + Promise2, + INTERNAL, + tryConvertToPromise, + apiRejection, + Proxyable + ); + var Context = require_context()(Promise2); + var createContext = Context.create; + var debug = require_debuggability()(Promise2, Context); + var CapturedTrace = debug.CapturedTrace; + var PassThroughHandlerContext = require_finally()(Promise2, tryConvertToPromise); + var catchFilter = require_catch_filter()(NEXT_FILTER); + var nodebackForPromise = require_nodeback(); + var errorObj2 = util2.errorObj; + var tryCatch2 = util2.tryCatch; + function check(self2, executor) { + if (typeof executor !== "function") { + throw new TypeError2("expecting a function but got " + util2.classString(executor)); + } + if (self2.constructor !== Promise2) { + throw new TypeError2("the promise constructor cannot be invoked directly\n\n See http://goo.gl/MqrFmX\n"); + } + } + function Promise2(executor) { + this._bitField = 0; + this._fulfillmentHandler0 = void 0; + this._rejectionHandler0 = void 0; + this._promise0 = void 0; + this._receiver0 = void 0; + if (executor !== INTERNAL) { + check(this, executor); + this._resolveFromExecutor(executor); + } + this._promiseCreated(); + this._fireEvent("promiseCreated", this); + } + Promise2.prototype.toString = function() { + return "[object Promise]"; + }; + Promise2.prototype.caught = Promise2.prototype["catch"] = function(fn) { + var len = arguments.length; + if (len > 1) { + var catchInstances = new Array(len - 1), j = 0, i; + for (i = 0; i < len - 1; ++i) { + var item = arguments[i]; + if (util2.isObject(item)) { + catchInstances[j++] = item; + } else { + return apiRejection("expecting an object but got A catch statement predicate " + util2.classString(item)); + } + } + catchInstances.length = j; + fn = arguments[i]; + return this.then(void 0, catchFilter(catchInstances, fn, this)); + } + return this.then(void 0, fn); + }; + Promise2.prototype.reflect = function() { + return this._then( + reflectHandler, + reflectHandler, + void 0, + this, + void 0 + ); + }; + Promise2.prototype.then = function(didFulfill, didReject) { + if (debug.warnings() && arguments.length > 0 && typeof didFulfill !== "function" && typeof didReject !== "function") { + var msg = ".then() only accepts functions but was passed: " + util2.classString(didFulfill); + if (arguments.length > 1) { + msg += ", " + util2.classString(didReject); + } + this._warn(msg); + } + return this._then(didFulfill, didReject, void 0, void 0, void 0); + }; + Promise2.prototype.done = function(didFulfill, didReject) { + var promise = this._then(didFulfill, didReject, void 0, void 0, void 0); + promise._setIsFinal(); + }; + Promise2.prototype.spread = function(fn) { + if (typeof fn !== "function") { + return apiRejection("expecting a function but got " + util2.classString(fn)); + } + return this.all()._then(fn, void 0, void 0, APPLY, void 0); + }; + Promise2.prototype.toJSON = function() { + var ret2 = { + isFulfilled: false, + isRejected: false, + fulfillmentValue: void 0, + rejectionReason: void 0 + }; + if (this.isFulfilled()) { + ret2.fulfillmentValue = this.value(); + ret2.isFulfilled = true; + } else if (this.isRejected()) { + ret2.rejectionReason = this.reason(); + ret2.isRejected = true; + } + return ret2; + }; + Promise2.prototype.all = function() { + if (arguments.length > 0) { + this._warn(".all() was passed arguments but it does not take any"); + } + return new PromiseArray(this).promise(); + }; + Promise2.prototype.error = function(fn) { + return this.caught(util2.originatesFromRejection, fn); + }; + Promise2.getNewLibraryCopy = module2.exports; + Promise2.is = function(val) { + return val instanceof Promise2; + }; + Promise2.fromNode = Promise2.fromCallback = function(fn) { + var ret2 = new Promise2(INTERNAL); + ret2._captureStackTrace(); + var multiArgs = arguments.length > 1 ? !!Object(arguments[1]).multiArgs : false; + var result = tryCatch2(fn)(nodebackForPromise(ret2, multiArgs)); + if (result === errorObj2) { + ret2._rejectCallback(result.e, true); + } + if (!ret2._isFateSealed()) ret2._setAsyncGuaranteed(); + return ret2; + }; + Promise2.all = function(promises) { + return new PromiseArray(promises).promise(); + }; + Promise2.cast = function(obj2) { + var ret2 = tryConvertToPromise(obj2); + if (!(ret2 instanceof Promise2)) { + ret2 = new Promise2(INTERNAL); + ret2._captureStackTrace(); + ret2._setFulfilled(); + ret2._rejectionHandler0 = obj2; + } + return ret2; + }; + Promise2.resolve = Promise2.fulfilled = Promise2.cast; + Promise2.reject = Promise2.rejected = function(reason) { + var ret2 = new Promise2(INTERNAL); + ret2._captureStackTrace(); + ret2._rejectCallback(reason, true); + return ret2; + }; + Promise2.setScheduler = function(fn) { + if (typeof fn !== "function") { + throw new TypeError2("expecting a function but got " + util2.classString(fn)); + } + return async.setScheduler(fn); + }; + Promise2.prototype._then = function(didFulfill, didReject, _2, receiver, internalData) { + var haveInternalData = internalData !== void 0; + var promise = haveInternalData ? internalData : new Promise2(INTERNAL); + var target = this._target(); + var bitField = target._bitField; + if (!haveInternalData) { + promise._propagateFrom(this, 3); + promise._captureStackTrace(); + if (receiver === void 0 && (this._bitField & 2097152) !== 0) { + if (!((bitField & 50397184) === 0)) { + receiver = this._boundValue(); + } else { + receiver = target === this ? void 0 : this._boundTo; + } + } + this._fireEvent("promiseChained", this, promise); + } + var domain = getDomain(); + if (!((bitField & 50397184) === 0)) { + var handler, value, settler = target._settlePromiseCtx; + if ((bitField & 33554432) !== 0) { + value = target._rejectionHandler0; + handler = didFulfill; + } else if ((bitField & 16777216) !== 0) { + value = target._fulfillmentHandler0; + handler = didReject; + target._unsetRejectionIsUnhandled(); + } else { + settler = target._settlePromiseLateCancellationObserver; + value = new CancellationError("late cancellation observer"); + target._attachExtraTrace(value); + handler = didReject; + } + async.invoke(settler, target, { + handler: domain === null ? handler : typeof handler === "function" && util2.domainBind(domain, handler), + promise, + receiver, + value + }); + } else { + target._addCallbacks(didFulfill, didReject, promise, receiver, domain); + } + return promise; + }; + Promise2.prototype._length = function() { + return this._bitField & 65535; + }; + Promise2.prototype._isFateSealed = function() { + return (this._bitField & 117506048) !== 0; + }; + Promise2.prototype._isFollowing = function() { + return (this._bitField & 67108864) === 67108864; + }; + Promise2.prototype._setLength = function(len) { + this._bitField = this._bitField & -65536 | len & 65535; + }; + Promise2.prototype._setFulfilled = function() { + this._bitField = this._bitField | 33554432; + this._fireEvent("promiseFulfilled", this); + }; + Promise2.prototype._setRejected = function() { + this._bitField = this._bitField | 16777216; + this._fireEvent("promiseRejected", this); + }; + Promise2.prototype._setFollowing = function() { + this._bitField = this._bitField | 67108864; + this._fireEvent("promiseResolved", this); + }; + Promise2.prototype._setIsFinal = function() { + this._bitField = this._bitField | 4194304; + }; + Promise2.prototype._isFinal = function() { + return (this._bitField & 4194304) > 0; + }; + Promise2.prototype._unsetCancelled = function() { + this._bitField = this._bitField & ~65536; + }; + Promise2.prototype._setCancelled = function() { + this._bitField = this._bitField | 65536; + this._fireEvent("promiseCancelled", this); + }; + Promise2.prototype._setWillBeCancelled = function() { + this._bitField = this._bitField | 8388608; + }; + Promise2.prototype._setAsyncGuaranteed = function() { + if (async.hasCustomScheduler()) return; + this._bitField = this._bitField | 134217728; + }; + Promise2.prototype._receiverAt = function(index) { + var ret2 = index === 0 ? this._receiver0 : this[index * 4 - 4 + 3]; + if (ret2 === UNDEFINED_BINDING) { + return void 0; + } else if (ret2 === void 0 && this._isBound()) { + return this._boundValue(); + } + return ret2; + }; + Promise2.prototype._promiseAt = function(index) { + return this[index * 4 - 4 + 2]; + }; + Promise2.prototype._fulfillmentHandlerAt = function(index) { + return this[index * 4 - 4 + 0]; + }; + Promise2.prototype._rejectionHandlerAt = function(index) { + return this[index * 4 - 4 + 1]; + }; + Promise2.prototype._boundValue = function() { + }; + Promise2.prototype._migrateCallback0 = function(follower) { + var bitField = follower._bitField; + var fulfill = follower._fulfillmentHandler0; + var reject = follower._rejectionHandler0; + var promise = follower._promise0; + var receiver = follower._receiverAt(0); + if (receiver === void 0) receiver = UNDEFINED_BINDING; + this._addCallbacks(fulfill, reject, promise, receiver, null); + }; + Promise2.prototype._migrateCallbackAt = function(follower, index) { + var fulfill = follower._fulfillmentHandlerAt(index); + var reject = follower._rejectionHandlerAt(index); + var promise = follower._promiseAt(index); + var receiver = follower._receiverAt(index); + if (receiver === void 0) receiver = UNDEFINED_BINDING; + this._addCallbacks(fulfill, reject, promise, receiver, null); + }; + Promise2.prototype._addCallbacks = function(fulfill, reject, promise, receiver, domain) { + var index = this._length(); + if (index >= 65535 - 4) { + index = 0; + this._setLength(0); + } + if (index === 0) { + this._promise0 = promise; + this._receiver0 = receiver; + if (typeof fulfill === "function") { + this._fulfillmentHandler0 = domain === null ? fulfill : util2.domainBind(domain, fulfill); + } + if (typeof reject === "function") { + this._rejectionHandler0 = domain === null ? reject : util2.domainBind(domain, reject); + } + } else { + var base = index * 4 - 4; + this[base + 2] = promise; + this[base + 3] = receiver; + if (typeof fulfill === "function") { + this[base + 0] = domain === null ? fulfill : util2.domainBind(domain, fulfill); + } + if (typeof reject === "function") { + this[base + 1] = domain === null ? reject : util2.domainBind(domain, reject); + } + } + this._setLength(index + 1); + return index; + }; + Promise2.prototype._proxy = function(proxyable, arg) { + this._addCallbacks(void 0, void 0, arg, proxyable, null); + }; + Promise2.prototype._resolveCallback = function(value, shouldBind) { + if ((this._bitField & 117506048) !== 0) return; + if (value === this) + return this._rejectCallback(makeSelfResolutionError(), false); + var maybePromise = tryConvertToPromise(value, this); + if (!(maybePromise instanceof Promise2)) return this._fulfill(value); + if (shouldBind) this._propagateFrom(maybePromise, 2); + var promise = maybePromise._target(); + if (promise === this) { + this._reject(makeSelfResolutionError()); + return; + } + var bitField = promise._bitField; + if ((bitField & 50397184) === 0) { + var len = this._length(); + if (len > 0) promise._migrateCallback0(this); + for (var i = 1; i < len; ++i) { + promise._migrateCallbackAt(this, i); + } + this._setFollowing(); + this._setLength(0); + this._setFollowee(promise); + } else if ((bitField & 33554432) !== 0) { + this._fulfill(promise._value()); + } else if ((bitField & 16777216) !== 0) { + this._reject(promise._reason()); + } else { + var reason = new CancellationError("late cancellation observer"); + promise._attachExtraTrace(reason); + this._reject(reason); + } + }; + Promise2.prototype._rejectCallback = function(reason, synchronous, ignoreNonErrorWarnings) { + var trace = util2.ensureErrorObject(reason); + var hasStack = trace === reason; + if (!hasStack && !ignoreNonErrorWarnings && debug.warnings()) { + var message = "a promise was rejected with a non-error: " + util2.classString(reason); + this._warn(message, true); + } + this._attachExtraTrace(trace, synchronous ? hasStack : false); + this._reject(reason); + }; + Promise2.prototype._resolveFromExecutor = function(executor) { + var promise = this; + this._captureStackTrace(); + this._pushContext(); + var synchronous = true; + var r = this._execute(executor, function(value) { + promise._resolveCallback(value); + }, function(reason) { + promise._rejectCallback(reason, synchronous); + }); + synchronous = false; + this._popContext(); + if (r !== void 0) { + promise._rejectCallback(r, true); + } + }; + Promise2.prototype._settlePromiseFromHandler = function(handler, receiver, value, promise) { + var bitField = promise._bitField; + if ((bitField & 65536) !== 0) return; + promise._pushContext(); + var x; + if (receiver === APPLY) { + if (!value || typeof value.length !== "number") { + x = errorObj2; + x.e = new TypeError2("cannot .spread() a non-array: " + util2.classString(value)); + } else { + x = tryCatch2(handler).apply(this._boundValue(), value); + } + } else { + x = tryCatch2(handler).call(receiver, value); + } + var promiseCreated = promise._popContext(); + bitField = promise._bitField; + if ((bitField & 65536) !== 0) return; + if (x === NEXT_FILTER) { + promise._reject(value); + } else if (x === errorObj2) { + promise._rejectCallback(x.e, false); + } else { + debug.checkForgottenReturns(x, promiseCreated, "", promise, this); + promise._resolveCallback(x); + } + }; + Promise2.prototype._target = function() { + var ret2 = this; + while (ret2._isFollowing()) ret2 = ret2._followee(); + return ret2; + }; + Promise2.prototype._followee = function() { + return this._rejectionHandler0; + }; + Promise2.prototype._setFollowee = function(promise) { + this._rejectionHandler0 = promise; + }; + Promise2.prototype._settlePromise = function(promise, handler, receiver, value) { + var isPromise = promise instanceof Promise2; + var bitField = this._bitField; + var asyncGuaranteed = (bitField & 134217728) !== 0; + if ((bitField & 65536) !== 0) { + if (isPromise) promise._invokeInternalOnCancel(); + if (receiver instanceof PassThroughHandlerContext && receiver.isFinallyHandler()) { + receiver.cancelPromise = promise; + if (tryCatch2(handler).call(receiver, value) === errorObj2) { + promise._reject(errorObj2.e); + } + } else if (handler === reflectHandler) { + promise._fulfill(reflectHandler.call(receiver)); + } else if (receiver instanceof Proxyable) { + receiver._promiseCancelled(promise); + } else if (isPromise || promise instanceof PromiseArray) { + promise._cancel(); + } else { + receiver.cancel(); + } + } else if (typeof handler === "function") { + if (!isPromise) { + handler.call(receiver, value, promise); + } else { + if (asyncGuaranteed) promise._setAsyncGuaranteed(); + this._settlePromiseFromHandler(handler, receiver, value, promise); + } + } else if (receiver instanceof Proxyable) { + if (!receiver._isResolved()) { + if ((bitField & 33554432) !== 0) { + receiver._promiseFulfilled(value, promise); + } else { + receiver._promiseRejected(value, promise); + } + } + } else if (isPromise) { + if (asyncGuaranteed) promise._setAsyncGuaranteed(); + if ((bitField & 33554432) !== 0) { + promise._fulfill(value); + } else { + promise._reject(value); + } + } + }; + Promise2.prototype._settlePromiseLateCancellationObserver = function(ctx) { + var handler = ctx.handler; + var promise = ctx.promise; + var receiver = ctx.receiver; + var value = ctx.value; + if (typeof handler === "function") { + if (!(promise instanceof Promise2)) { + handler.call(receiver, value, promise); + } else { + this._settlePromiseFromHandler(handler, receiver, value, promise); + } + } else if (promise instanceof Promise2) { + promise._reject(value); + } + }; + Promise2.prototype._settlePromiseCtx = function(ctx) { + this._settlePromise(ctx.promise, ctx.handler, ctx.receiver, ctx.value); + }; + Promise2.prototype._settlePromise0 = function(handler, value, bitField) { + var promise = this._promise0; + var receiver = this._receiverAt(0); + this._promise0 = void 0; + this._receiver0 = void 0; + this._settlePromise(promise, handler, receiver, value); + }; + Promise2.prototype._clearCallbackDataAtIndex = function(index) { + var base = index * 4 - 4; + this[base + 2] = this[base + 3] = this[base + 0] = this[base + 1] = void 0; + }; + Promise2.prototype._fulfill = function(value) { + var bitField = this._bitField; + if ((bitField & 117506048) >>> 16) return; + if (value === this) { + var err = makeSelfResolutionError(); + this._attachExtraTrace(err); + return this._reject(err); + } + this._setFulfilled(); + this._rejectionHandler0 = value; + if ((bitField & 65535) > 0) { + if ((bitField & 134217728) !== 0) { + this._settlePromises(); + } else { + async.settlePromises(this); + } + } + }; + Promise2.prototype._reject = function(reason) { + var bitField = this._bitField; + if ((bitField & 117506048) >>> 16) return; + this._setRejected(); + this._fulfillmentHandler0 = reason; + if (this._isFinal()) { + return async.fatalError(reason, util2.isNode); + } + if ((bitField & 65535) > 0) { + async.settlePromises(this); + } else { + this._ensurePossibleRejectionHandled(); + } + }; + Promise2.prototype._fulfillPromises = function(len, value) { + for (var i = 1; i < len; i++) { + var handler = this._fulfillmentHandlerAt(i); + var promise = this._promiseAt(i); + var receiver = this._receiverAt(i); + this._clearCallbackDataAtIndex(i); + this._settlePromise(promise, handler, receiver, value); + } + }; + Promise2.prototype._rejectPromises = function(len, reason) { + for (var i = 1; i < len; i++) { + var handler = this._rejectionHandlerAt(i); + var promise = this._promiseAt(i); + var receiver = this._receiverAt(i); + this._clearCallbackDataAtIndex(i); + this._settlePromise(promise, handler, receiver, reason); + } + }; + Promise2.prototype._settlePromises = function() { + var bitField = this._bitField; + var len = bitField & 65535; + if (len > 0) { + if ((bitField & 16842752) !== 0) { + var reason = this._fulfillmentHandler0; + this._settlePromise0(this._rejectionHandler0, reason, bitField); + this._rejectPromises(len, reason); + } else { + var value = this._rejectionHandler0; + this._settlePromise0(this._fulfillmentHandler0, value, bitField); + this._fulfillPromises(len, value); + } + this._setLength(0); + } + this._clearCancellationData(); + }; + Promise2.prototype._settledValue = function() { + var bitField = this._bitField; + if ((bitField & 33554432) !== 0) { + return this._rejectionHandler0; + } else if ((bitField & 16777216) !== 0) { + return this._fulfillmentHandler0; + } + }; + function deferResolve(v) { + this.promise._resolveCallback(v); + } + function deferReject(v) { + this.promise._rejectCallback(v, false); + } + Promise2.defer = Promise2.pending = function() { + debug.deprecated("Promise.defer", "new Promise"); + var promise = new Promise2(INTERNAL); + return { + promise, + resolve: deferResolve, + reject: deferReject + }; + }; + util2.notEnumerableProp( + Promise2, + "_makeSelfResolutionError", + makeSelfResolutionError + ); + require_method()( + Promise2, + INTERNAL, + tryConvertToPromise, + apiRejection, + debug + ); + require_bind()(Promise2, INTERNAL, tryConvertToPromise, debug); + require_cancel()(Promise2, PromiseArray, apiRejection, debug); + require_direct_resolve()(Promise2); + require_synchronous_inspection()(Promise2); + require_join()( + Promise2, + PromiseArray, + tryConvertToPromise, + INTERNAL, + async, + getDomain + ); + Promise2.Promise = Promise2; + Promise2.version = "3.4.7"; + require_map3()(Promise2, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug); + require_call_get()(Promise2); + require_using2()(Promise2, apiRejection, tryConvertToPromise, createContext, INTERNAL, debug); + require_timers()(Promise2, INTERNAL, debug); + require_generators()(Promise2, apiRejection, INTERNAL, tryConvertToPromise, Proxyable, debug); + require_nodeify()(Promise2); + require_promisify()(Promise2, INTERNAL); + require_props()(Promise2, PromiseArray, tryConvertToPromise, apiRejection); + require_race3()(Promise2, INTERNAL, tryConvertToPromise, apiRejection); + require_reduce2()(Promise2, PromiseArray, apiRejection, tryConvertToPromise, INTERNAL, debug); + require_settle()(Promise2, PromiseArray, debug); + require_some()(Promise2, PromiseArray, apiRejection); + require_filter3()(Promise2, INTERNAL); + require_each()(Promise2, INTERNAL); + require_any()(Promise2); + util2.toFastProperties(Promise2); + util2.toFastProperties(Promise2.prototype); + function fillTypes(value) { + var p = new Promise2(INTERNAL); + p._fulfillmentHandler0 = value; + p._rejectionHandler0 = value; + p._promise0 = value; + p._receiver0 = value; + } + fillTypes({ a: 1 }); + fillTypes({ b: 2 }); + fillTypes({ c: 3 }); + fillTypes(1); + fillTypes(function() { + }); + fillTypes(void 0); + fillTypes(false); + fillTypes(new Promise2(INTERNAL)); + debug.setBounds(Async.firstLineError, util2.lastLineError); + return Promise2; + }; + } +}); + +// ../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/bluebird.js +var require_bluebird = __commonJS({ + "../../node_modules/.pnpm/bluebird@3.4.7/node_modules/bluebird/js/release/bluebird.js"(exports2, module2) { + "use strict"; + var old; + if (typeof Promise !== "undefined") old = Promise; + function noConflict() { + try { + if (Promise === bluebird) Promise = old; + } catch (e) { + } + return bluebird; + } + var bluebird = require_promise()(); + bluebird.noConflict = noConflict; + module2.exports = bluebird; + } +}); + +// ../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/Buffer.js +var require_Buffer = __commonJS({ + "../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/Buffer.js"(exports2, module2) { + var Buffer2 = require("buffer").Buffer; + if (Buffer2.from === void 0) { + Buffer2.from = function(a, b, c) { + return new Buffer2(a, b, c); + }; + Buffer2.alloc = Buffer2.from; + } + module2.exports = Buffer2; + } +}); + +// ../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/PullStream.js +var require_PullStream = __commonJS({ + "../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/PullStream.js"(exports2, module2) { + var Stream = require("stream"); + var Promise2 = require_bluebird(); + var util2 = require("util"); + var Buffer2 = require_Buffer(); + var strFunction = "function"; + if (!Stream.Writable || !Stream.Writable.prototype.destroy) + Stream = require_readable2(); + function PullStream() { + if (!(this instanceof PullStream)) + return new PullStream(); + Stream.Duplex.call(this, { decodeStrings: false, objectMode: true }); + this.buffer = Buffer2.from(""); + var self2 = this; + self2.on("finish", function() { + self2.finished = true; + self2.emit("chunk", false); + }); + } + util2.inherits(PullStream, Stream.Duplex); + PullStream.prototype._write = function(chunk, e, cb) { + this.buffer = Buffer2.concat([this.buffer, chunk]); + this.cb = cb; + this.emit("chunk"); + }; + PullStream.prototype.stream = function(eof, includeEof) { + var p = Stream.PassThrough(); + var done, self2 = this; + function cb() { + if (typeof self2.cb === strFunction) { + var callback = self2.cb; + self2.cb = void 0; + return callback(); + } + } + function pull() { + var packet; + if (self2.buffer && self2.buffer.length) { + if (typeof eof === "number") { + packet = self2.buffer.slice(0, eof); + self2.buffer = self2.buffer.slice(eof); + eof -= packet.length; + done = !eof; + } else { + var match = self2.buffer.indexOf(eof); + if (match !== -1) { + self2.match = match; + if (includeEof) match = match + eof.length; + packet = self2.buffer.slice(0, match); + self2.buffer = self2.buffer.slice(match); + done = true; + } else { + var len = self2.buffer.length - eof.length; + if (len <= 0) { + cb(); + } else { + packet = self2.buffer.slice(0, len); + self2.buffer = self2.buffer.slice(len); + } + } + } + if (packet) p.write(packet, function() { + if (self2.buffer.length === 0 || eof.length && self2.buffer.length <= eof.length) cb(); + }); + } + if (!done) { + if (self2.finished) { + self2.removeListener("chunk", pull); + self2.emit("error", new Error("FILE_ENDED")); + return; + } + } else { + self2.removeListener("chunk", pull); + p.end(); + } + } + self2.on("chunk", pull); + pull(); + return p; + }; + PullStream.prototype.pull = function(eof, includeEof) { + if (eof === 0) return Promise2.resolve(""); + if (!isNaN(eof) && this.buffer.length > eof) { + var data = this.buffer.slice(0, eof); + this.buffer = this.buffer.slice(eof); + return Promise2.resolve(data); + } + var buffer = Buffer2.from(""), self2 = this; + var concatStream = Stream.Transform(); + concatStream._transform = function(d, e, cb) { + buffer = Buffer2.concat([buffer, d]); + cb(); + }; + var rejectHandler; + var pullStreamRejectHandler; + return new Promise2(function(resolve, reject) { + rejectHandler = reject; + pullStreamRejectHandler = function(e) { + self2.__emittedError = e; + reject(e); + }; + if (self2.finished) + return reject(new Error("FILE_ENDED")); + self2.once("error", pullStreamRejectHandler); + self2.stream(eof, includeEof).on("error", reject).pipe(concatStream).on("finish", function() { + resolve(buffer); + }).on("error", reject); + }).finally(function() { + self2.removeListener("error", rejectHandler); + self2.removeListener("error", pullStreamRejectHandler); + }); + }; + PullStream.prototype._read = function() { + }; + module2.exports = PullStream; + } +}); + +// ../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/NoopStream.js +var require_NoopStream = __commonJS({ + "../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/NoopStream.js"(exports2, module2) { + var Stream = require("stream"); + var util2 = require("util"); + if (!Stream.Writable || !Stream.Writable.prototype.destroy) + Stream = require_readable2(); + function NoopStream() { + if (!(this instanceof NoopStream)) { + return new NoopStream(); + } + Stream.Transform.call(this); + } + util2.inherits(NoopStream, Stream.Transform); + NoopStream.prototype._transform = function(d, e, cb) { + cb(); + }; + module2.exports = NoopStream; + } +}); + +// ../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/BufferStream.js +var require_BufferStream = __commonJS({ + "../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/BufferStream.js"(exports2, module2) { + var Promise2 = require_bluebird(); + var Stream = require("stream"); + var Buffer2 = require_Buffer(); + if (!Stream.Writable || !Stream.Writable.prototype.destroy) + Stream = require_readable2(); + module2.exports = function(entry) { + return new Promise2(function(resolve, reject) { + var chunks = []; + var bufferStream = Stream.Transform().on("finish", function() { + resolve(Buffer2.concat(chunks)); + }).on("error", reject); + bufferStream._transform = function(d, e, cb) { + chunks.push(d); + cb(); + }; + entry.on("error", reject).pipe(bufferStream); + }); + }; + } +}); + +// ../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/parseExtraField.js +var require_parseExtraField = __commonJS({ + "../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/parseExtraField.js"(exports2, module2) { + var binary = require_binary(); + module2.exports = function(extraField, vars) { + var extra; + while (!extra && extraField && extraField.length) { + var candidateExtra = binary.parse(extraField).word16lu("signature").word16lu("partsize").word64lu("uncompressedSize").word64lu("compressedSize").word64lu("offset").word64lu("disknum").vars; + if (candidateExtra.signature === 1) { + extra = candidateExtra; + } else { + extraField = extraField.slice(candidateExtra.partsize + 4); + } + } + extra = extra || {}; + if (vars.compressedSize === 4294967295) + vars.compressedSize = extra.compressedSize; + if (vars.uncompressedSize === 4294967295) + vars.uncompressedSize = extra.uncompressedSize; + if (vars.offsetToLocalFileHeader === 4294967295) + vars.offsetToLocalFileHeader = extra.offset; + return extra; + }; + } +}); + +// ../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/parseDateTime.js +var require_parseDateTime = __commonJS({ + "../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/parseDateTime.js"(exports2, module2) { + module2.exports = function parseDateTime(date, time) { + const day = date & 31; + const month = date >> 5 & 15; + const year = (date >> 9 & 127) + 1980; + const seconds = time ? (time & 31) * 2 : 0; + const minutes = time ? time >> 5 & 63 : 0; + const hours = time ? time >> 11 : 0; + return new Date(Date.UTC(year, month - 1, day, hours, minutes, seconds)); + }; + } +}); + +// ../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/parse.js +var require_parse4 = __commonJS({ + "../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/parse.js"(exports2, module2) { + var util2 = require("util"); + var zlib = require("zlib"); + var Stream = require("stream"); + var binary = require_binary(); + var Promise2 = require_bluebird(); + var PullStream = require_PullStream(); + var NoopStream = require_NoopStream(); + var BufferStream = require_BufferStream(); + var parseExtraField = require_parseExtraField(); + var Buffer2 = require_Buffer(); + var parseDateTime = require_parseDateTime(); + if (!Stream.Writable || !Stream.Writable.prototype.destroy) + Stream = require_readable2(); + var endDirectorySignature = Buffer2.alloc(4); + endDirectorySignature.writeUInt32LE(101010256, 0); + function Parse(opts) { + if (!(this instanceof Parse)) { + return new Parse(opts); + } + var self2 = this; + self2._opts = opts || { verbose: false }; + PullStream.call(self2, self2._opts); + self2.on("finish", function() { + self2.emit("end"); + self2.emit("close"); + }); + self2._readRecord().catch(function(e) { + if (!self2.__emittedError || self2.__emittedError !== e) + self2.emit("error", e); + }); + } + util2.inherits(Parse, PullStream); + Parse.prototype._readRecord = function() { + var self2 = this; + return self2.pull(4).then(function(data) { + if (data.length === 0) + return; + var signature = data.readUInt32LE(0); + if (signature === 875721283) { + return self2._readCrxHeader(); + } + if (signature === 67324752) { + return self2._readFile(); + } else if (signature === 33639248) { + self2.reachedCD = true; + return self2._readCentralDirectoryFileHeader(); + } else if (signature === 101010256) { + return self2._readEndOfCentralDirectoryRecord(); + } else if (self2.reachedCD) { + var includeEof = true; + return self2.pull(endDirectorySignature, includeEof).then(function() { + return self2._readEndOfCentralDirectoryRecord(); + }); + } else + self2.emit("error", new Error("invalid signature: 0x" + signature.toString(16))); + }); + }; + Parse.prototype._readCrxHeader = function() { + var self2 = this; + return self2.pull(12).then(function(data) { + self2.crxHeader = binary.parse(data).word32lu("version").word32lu("pubKeyLength").word32lu("signatureLength").vars; + return self2.pull(self2.crxHeader.pubKeyLength + self2.crxHeader.signatureLength); + }).then(function(data) { + self2.crxHeader.publicKey = data.slice(0, self2.crxHeader.pubKeyLength); + self2.crxHeader.signature = data.slice(self2.crxHeader.pubKeyLength); + self2.emit("crx-header", self2.crxHeader); + return self2._readRecord(); + }); + }; + Parse.prototype._readFile = function() { + var self2 = this; + return self2.pull(26).then(function(data) { + var vars = binary.parse(data).word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").vars; + vars.lastModifiedDateTime = parseDateTime(vars.lastModifiedDate, vars.lastModifiedTime); + if (self2.crxHeader) vars.crxHeader = self2.crxHeader; + return self2.pull(vars.fileNameLength).then(function(fileNameBuffer) { + var fileName = fileNameBuffer.toString("utf8"); + var entry = Stream.PassThrough(); + var __autodraining = false; + entry.autodrain = function() { + __autodraining = true; + var draining = entry.pipe(NoopStream()); + draining.promise = function() { + return new Promise2(function(resolve, reject) { + draining.on("finish", resolve); + draining.on("error", reject); + }); + }; + return draining; + }; + entry.buffer = function() { + return BufferStream(entry); + }; + entry.path = fileName; + entry.props = {}; + entry.props.path = fileName; + entry.props.pathBuffer = fileNameBuffer; + entry.props.flags = { + "isUnicode": (vars.flags & 2048) != 0 + }; + entry.type = vars.uncompressedSize === 0 && /[\/\\]$/.test(fileName) ? "Directory" : "File"; + if (self2._opts.verbose) { + if (entry.type === "Directory") { + console.log(" creating:", fileName); + } else if (entry.type === "File") { + if (vars.compressionMethod === 0) { + console.log(" extracting:", fileName); + } else { + console.log(" inflating:", fileName); + } + } + } + return self2.pull(vars.extraFieldLength).then(function(extraField) { + var extra = parseExtraField(extraField, vars); + entry.vars = vars; + entry.extra = extra; + if (self2._opts.forceStream) { + self2.push(entry); + } else { + self2.emit("entry", entry); + if (self2._readableState.pipesCount || self2._readableState.pipes && self2._readableState.pipes.length) + self2.push(entry); + } + if (self2._opts.verbose) + console.log({ + filename: fileName, + vars, + extra + }); + var fileSizeKnown = !(vars.flags & 8) || vars.compressedSize > 0, eof; + entry.__autodraining = __autodraining; + var inflater = vars.compressionMethod && !__autodraining ? zlib.createInflateRaw() : Stream.PassThrough(); + if (fileSizeKnown) { + entry.size = vars.uncompressedSize; + eof = vars.compressedSize; + } else { + eof = Buffer2.alloc(4); + eof.writeUInt32LE(134695760, 0); + } + return new Promise2(function(resolve, reject) { + self2.stream(eof).pipe(inflater).on("error", function(err) { + self2.emit("error", err); + }).pipe(entry).on("finish", function() { + return fileSizeKnown ? self2._readRecord().then(resolve).catch(reject) : self2._processDataDescriptor(entry).then(resolve).catch(reject); + }); + }); + }); + }); + }); + }; + Parse.prototype._processDataDescriptor = function(entry) { + var self2 = this; + return self2.pull(16).then(function(data) { + var vars = binary.parse(data).word32lu("dataDescriptorSignature").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").vars; + entry.size = vars.uncompressedSize; + return self2._readRecord(); + }); + }; + Parse.prototype._readCentralDirectoryFileHeader = function() { + var self2 = this; + return self2.pull(42).then(function(data) { + var vars = binary.parse(data).word16lu("versionMadeBy").word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").word16lu("fileCommentLength").word16lu("diskNumber").word16lu("internalFileAttributes").word32lu("externalFileAttributes").word32lu("offsetToLocalFileHeader").vars; + return self2.pull(vars.fileNameLength).then(function(fileName) { + vars.fileName = fileName.toString("utf8"); + return self2.pull(vars.extraFieldLength); + }).then(function(extraField) { + return self2.pull(vars.fileCommentLength); + }).then(function(fileComment) { + return self2._readRecord(); + }); + }); + }; + Parse.prototype._readEndOfCentralDirectoryRecord = function() { + var self2 = this; + return self2.pull(18).then(function(data) { + var vars = binary.parse(data).word16lu("diskNumber").word16lu("diskStart").word16lu("numberOfRecordsOnDisk").word16lu("numberOfRecords").word32lu("sizeOfCentralDirectory").word32lu("offsetToStartOfCentralDirectory").word16lu("commentLength").vars; + return self2.pull(vars.commentLength).then(function(comment) { + comment = comment.toString("utf8"); + self2.end(); + self2.push(null); + }); + }); + }; + Parse.prototype.promise = function() { + var self2 = this; + return new Promise2(function(resolve, reject) { + self2.on("finish", resolve); + self2.on("error", reject); + }); + }; + module2.exports = Parse; + } +}); + +// ../../node_modules/.pnpm/duplexer2@0.1.4/node_modules/duplexer2/index.js +var require_duplexer2 = __commonJS({ + "../../node_modules/.pnpm/duplexer2@0.1.4/node_modules/duplexer2/index.js"(exports2, module2) { + "use strict"; + var stream = require_readable2(); + function DuplexWrapper(options, writable, readable) { + if (typeof readable === "undefined") { + readable = writable; + writable = options; + options = null; + } + stream.Duplex.call(this, options); + if (typeof readable.read !== "function") { + readable = new stream.Readable(options).wrap(readable); + } + this._writable = writable; + this._readable = readable; + this._waiting = false; + var self2 = this; + writable.once("finish", function() { + self2.end(); + }); + this.once("finish", function() { + writable.end(); + }); + readable.on("readable", function() { + if (self2._waiting) { + self2._waiting = false; + self2._read(); + } + }); + readable.once("end", function() { + self2.push(null); + }); + if (!options || typeof options.bubbleErrors === "undefined" || options.bubbleErrors) { + writable.on("error", function(err) { + self2.emit("error", err); + }); + readable.on("error", function(err) { + self2.emit("error", err); + }); + } + } + DuplexWrapper.prototype = Object.create(stream.Duplex.prototype, { constructor: { value: DuplexWrapper } }); + DuplexWrapper.prototype._write = function _write(input, encoding, done) { + this._writable.write(input, encoding, done); + }; + DuplexWrapper.prototype._read = function _read() { + var buf; + var reads = 0; + while ((buf = this._readable.read()) !== null) { + this.push(buf); + reads++; + } + if (reads === 0) { + this._waiting = true; + } + }; + module2.exports = function duplex2(options, writable, readable) { + return new DuplexWrapper(options, writable, readable); + }; + module2.exports.DuplexWrapper = DuplexWrapper; + } +}); + +// ../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/parseOne.js +var require_parseOne = __commonJS({ + "../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/parseOne.js"(exports2, module2) { + var Stream = require("stream"); + var Parse = require_parse4(); + var duplexer2 = require_duplexer2(); + var BufferStream = require_BufferStream(); + if (!Stream.Writable || !Stream.Writable.prototype.destroy) + Stream = require_readable2(); + function parseOne(match, opts) { + var inStream = Stream.PassThrough({ objectMode: true }); + var outStream = Stream.PassThrough(); + var transform = Stream.Transform({ objectMode: true }); + var re = match instanceof RegExp ? match : match && new RegExp(match); + var found; + transform._transform = function(entry, e, cb) { + if (found || re && !re.exec(entry.path)) { + entry.autodrain(); + return cb(); + } else { + found = true; + out.emit("entry", entry); + entry.on("error", function(e2) { + outStream.emit("error", e2); + }); + entry.pipe(outStream).on("error", function(err) { + cb(err); + }).on("finish", function(d) { + cb(null, d); + }); + } + }; + inStream.pipe(Parse(opts)).on("error", function(err) { + outStream.emit("error", err); + }).pipe(transform).on("error", Object).on("finish", function() { + if (!found) + outStream.emit("error", new Error("PATTERN_NOT_FOUND")); + else + outStream.end(); + }); + var out = duplexer2(inStream, outStream); + out.buffer = function() { + return BufferStream(outStream); + }; + return out; + } + module2.exports = parseOne; + } +}); + +// ../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/abstract.js +var require_abstract = __commonJS({ + "../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/abstract.js"(exports2, module2) { + module2.exports = Abstract; + var Stream = require("stream").Stream; + var inherits2 = require_inherits(); + function Abstract() { + Stream.call(this); + } + inherits2(Abstract, Stream); + Abstract.prototype.on = function(ev, fn) { + if (ev === "ready" && this.ready) { + process.nextTick(fn.bind(this)); + } else { + Stream.prototype.on.call(this, ev, fn); + } + return this; + }; + Abstract.prototype.abort = function() { + this._aborted = true; + this.emit("abort"); + }; + Abstract.prototype.destroy = function() { + }; + Abstract.prototype.warn = function(msg, code) { + var self2 = this; + var er = decorate(msg, code, self2); + if (!self2.listeners("warn")) { + console.error( + "%s %s\npath = %s\nsyscall = %s\nfstream_type = %s\nfstream_path = %s\nfstream_unc_path = %s\nfstream_class = %s\nfstream_stack =\n%s\n", + code || "UNKNOWN", + er.stack, + er.path, + er.syscall, + er.fstream_type, + er.fstream_path, + er.fstream_unc_path, + er.fstream_class, + er.fstream_stack.join("\n") + ); + } else { + self2.emit("warn", er); + } + }; + Abstract.prototype.info = function(msg, code) { + this.emit("info", msg, code); + }; + Abstract.prototype.error = function(msg, code, th) { + var er = decorate(msg, code, this); + if (th) throw er; + else this.emit("error", er); + }; + function decorate(er, code, self2) { + if (!(er instanceof Error)) er = new Error(er); + er.code = er.code || code; + er.path = er.path || self2.path; + er.fstream_type = er.fstream_type || self2.type; + er.fstream_path = er.fstream_path || self2.path; + if (self2._path !== self2.path) { + er.fstream_unc_path = er.fstream_unc_path || self2._path; + } + if (self2.linkpath) { + er.fstream_linkpath = er.fstream_linkpath || self2.linkpath; + } + er.fstream_class = er.fstream_class || self2.constructor.name; + er.fstream_stack = er.fstream_stack || new Error().stack.split(/\n/).slice(3).map(function(s) { + return s.replace(/^ {4}at /, ""); + }); + return er; + } + } +}); + +// ../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/get-type.js +var require_get_type = __commonJS({ + "../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/get-type.js"(exports2, module2) { + module2.exports = getType; + function getType(st) { + var types = [ + "Directory", + "File", + "SymbolicLink", + "Link", + // special for hardlinks from tarballs + "BlockDevice", + "CharacterDevice", + "FIFO", + "Socket" + ]; + var type; + if (st.type && types.indexOf(st.type) !== -1) { + st[st.type] = true; + return st.type; + } + for (var i = 0, l2 = types.length; i < l2; i++) { + type = types[i]; + var is = st[type] || st["is" + type]; + if (typeof is === "function") is = is.call(st); + if (is) { + st[type] = true; + st.type = type; + return type; + } + } + return null; + } + } +}); + +// ../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/link-reader.js +var require_link_reader = __commonJS({ + "../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/link-reader.js"(exports2, module2) { + module2.exports = LinkReader; + var fs = require_graceful_fs(); + var inherits2 = require_inherits(); + var Reader = require_reader(); + inherits2(LinkReader, Reader); + function LinkReader(props) { + var self2 = this; + if (!(self2 instanceof LinkReader)) { + throw new Error("LinkReader must be called as constructor."); + } + if (!(props.type === "Link" && props.Link || props.type === "SymbolicLink" && props.SymbolicLink)) { + throw new Error("Non-link type " + props.type); + } + Reader.call(self2, props); + } + LinkReader.prototype._stat = function(currentStat) { + var self2 = this; + fs.readlink(self2._path, function(er, linkpath) { + if (er) return self2.error(er); + self2.linkpath = self2.props.linkpath = linkpath; + self2.emit("linkpath", linkpath); + Reader.prototype._stat.call(self2, currentStat); + }); + }; + LinkReader.prototype._read = function() { + var self2 = this; + if (self2._paused) return; + if (!self2._ended) { + self2.emit("end"); + self2.emit("close"); + self2._ended = true; + } + }; + } +}); + +// ../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/dir-reader.js +var require_dir_reader = __commonJS({ + "../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/dir-reader.js"(exports2, module2) { + module2.exports = DirReader; + var fs = require_graceful_fs(); + var inherits2 = require_inherits(); + var path = require("path"); + var Reader = require_reader(); + var assert = require("assert").ok; + inherits2(DirReader, Reader); + function DirReader(props) { + var self2 = this; + if (!(self2 instanceof DirReader)) { + throw new Error("DirReader must be called as constructor."); + } + if (props.type !== "Directory" || !props.Directory) { + throw new Error("Non-directory type " + props.type); + } + self2.entries = null; + self2._index = -1; + self2._paused = false; + self2._length = -1; + if (props.sort) { + this.sort = props.sort; + } + Reader.call(this, props); + } + DirReader.prototype._getEntries = function() { + var self2 = this; + if (self2._gotEntries) return; + self2._gotEntries = true; + fs.readdir(self2._path, function(er, entries) { + if (er) return self2.error(er); + self2.entries = entries; + self2.emit("entries", entries); + if (self2._paused) self2.once("resume", processEntries); + else processEntries(); + function processEntries() { + self2._length = self2.entries.length; + if (typeof self2.sort === "function") { + self2.entries = self2.entries.sort(self2.sort.bind(self2)); + } + self2._read(); + } + }); + }; + DirReader.prototype._read = function() { + var self2 = this; + if (!self2.entries) return self2._getEntries(); + if (self2._paused || self2._currentEntry || self2._aborted) { + return; + } + self2._index++; + if (self2._index >= self2.entries.length) { + if (!self2._ended) { + self2._ended = true; + self2.emit("end"); + self2.emit("close"); + } + return; + } + var p = path.resolve(self2._path, self2.entries[self2._index]); + assert(p !== self2._path); + assert(self2.entries[self2._index]); + self2._currentEntry = p; + fs[self2.props.follow ? "stat" : "lstat"](p, function(er, stat) { + if (er) return self2.error(er); + var who = self2._proxy || self2; + stat.path = p; + stat.basename = path.basename(p); + stat.dirname = path.dirname(p); + var childProps = self2.getChildProps.call(who, stat); + childProps.path = p; + childProps.basename = path.basename(p); + childProps.dirname = path.dirname(p); + var entry = Reader(childProps, stat); + self2._currentEntry = entry; + entry.on("pause", function(who2) { + if (!self2._paused && !entry._disowned) { + self2.pause(who2); + } + }); + entry.on("resume", function(who2) { + if (self2._paused && !entry._disowned) { + self2.resume(who2); + } + }); + entry.on("stat", function(props) { + self2.emit("_entryStat", entry, props); + if (entry._aborted) return; + if (entry._paused) { + entry.once("resume", function() { + self2.emit("entryStat", entry, props); + }); + } else self2.emit("entryStat", entry, props); + }); + entry.on("ready", function EMITCHILD() { + if (self2._paused) { + entry.pause(self2); + return self2.once("resume", EMITCHILD); + } + if (entry.type === "Socket") { + self2.emit("socket", entry); + } else { + self2.emitEntry(entry); + } + }); + var ended = false; + entry.on("close", onend); + entry.on("disown", onend); + function onend() { + if (ended) return; + ended = true; + self2.emit("childEnd", entry); + self2.emit("entryEnd", entry); + self2._currentEntry = null; + if (!self2._paused) { + self2._read(); + } + } + entry.on("error", function(er2) { + if (entry._swallowErrors) { + self2.warn(er2); + entry.emit("end"); + entry.emit("close"); + } else { + self2.emit("error", er2); + } + }); + [ + "child", + "childEnd", + "warn" + ].forEach(function(ev) { + entry.on(ev, self2.emit.bind(self2, ev)); + }); + }); + }; + DirReader.prototype.disown = function(entry) { + entry.emit("beforeDisown"); + entry._disowned = true; + entry.parent = entry.root = null; + if (entry === this._currentEntry) { + this._currentEntry = null; + } + entry.emit("disown"); + }; + DirReader.prototype.getChildProps = function() { + return { + depth: this.depth + 1, + root: this.root || this, + parent: this, + follow: this.follow, + filter: this.filter, + sort: this.props.sort, + hardlinks: this.props.hardlinks + }; + }; + DirReader.prototype.pause = function(who) { + var self2 = this; + if (self2._paused) return; + who = who || self2; + self2._paused = true; + if (self2._currentEntry && self2._currentEntry.pause) { + self2._currentEntry.pause(who); + } + self2.emit("pause", who); + }; + DirReader.prototype.resume = function(who) { + var self2 = this; + if (!self2._paused) return; + who = who || self2; + self2._paused = false; + self2.emit("resume", who); + if (self2._paused) { + return; + } + if (self2._currentEntry) { + if (self2._currentEntry.resume) self2._currentEntry.resume(who); + } else self2._read(); + }; + DirReader.prototype.emitEntry = function(entry) { + this.emit("entry", entry); + this.emit("child", entry); + }; + } +}); + +// ../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/file-reader.js +var require_file_reader = __commonJS({ + "../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/file-reader.js"(exports2, module2) { + module2.exports = FileReader2; + var fs = require_graceful_fs(); + var inherits2 = require_inherits(); + var Reader = require_reader(); + var EOF = { EOF: true }; + var CLOSE = { CLOSE: true }; + inherits2(FileReader2, Reader); + function FileReader2(props) { + var self2 = this; + if (!(self2 instanceof FileReader2)) { + throw new Error("FileReader must be called as constructor."); + } + if (!(props.type === "Link" && props.Link || props.type === "File" && props.File)) { + throw new Error("Non-file type " + props.type); + } + self2._buffer = []; + self2._bytesEmitted = 0; + Reader.call(self2, props); + } + FileReader2.prototype._getStream = function() { + var self2 = this; + var stream = self2._stream = fs.createReadStream(self2._path, self2.props); + if (self2.props.blksize) { + stream.bufferSize = self2.props.blksize; + } + stream.on("open", self2.emit.bind(self2, "open")); + stream.on("data", function(c) { + self2._bytesEmitted += c.length; + if (!c.length) { + return; + } else if (self2._paused || self2._buffer.length) { + self2._buffer.push(c); + self2._read(); + } else self2.emit("data", c); + }); + stream.on("end", function() { + if (self2._paused || self2._buffer.length) { + self2._buffer.push(EOF); + self2._read(); + } else { + self2.emit("end"); + } + if (self2._bytesEmitted !== self2.props.size) { + self2.error("Didn't get expected byte count\nexpect: " + self2.props.size + "\nactual: " + self2._bytesEmitted); + } + }); + stream.on("close", function() { + if (self2._paused || self2._buffer.length) { + self2._buffer.push(CLOSE); + self2._read(); + } else { + self2.emit("close"); + } + }); + stream.on("error", function(e) { + self2.emit("error", e); + }); + self2._read(); + }; + FileReader2.prototype._read = function() { + var self2 = this; + if (self2._paused) { + return; + } + if (!self2._stream) { + return self2._getStream(); + } + if (self2._buffer.length) { + var buf = self2._buffer; + for (var i = 0, l2 = buf.length; i < l2; i++) { + var c = buf[i]; + if (c === EOF) { + self2.emit("end"); + } else if (c === CLOSE) { + self2.emit("close"); + } else { + self2.emit("data", c); + } + if (self2._paused) { + self2._buffer = buf.slice(i); + return; + } + } + self2._buffer.length = 0; + } + }; + FileReader2.prototype.pause = function(who) { + var self2 = this; + if (self2._paused) return; + who = who || self2; + self2._paused = true; + if (self2._stream) self2._stream.pause(); + self2.emit("pause", who); + }; + FileReader2.prototype.resume = function(who) { + var self2 = this; + if (!self2._paused) return; + who = who || self2; + self2.emit("resume", who); + self2._paused = false; + if (self2._stream) self2._stream.resume(); + self2._read(); + }; + } +}); + +// ../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/socket-reader.js +var require_socket_reader = __commonJS({ + "../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/socket-reader.js"(exports2, module2) { + module2.exports = SocketReader; + var inherits2 = require_inherits(); + var Reader = require_reader(); + inherits2(SocketReader, Reader); + function SocketReader(props) { + var self2 = this; + if (!(self2 instanceof SocketReader)) { + throw new Error("SocketReader must be called as constructor."); + } + if (!(props.type === "Socket" && props.Socket)) { + throw new Error("Non-socket type " + props.type); + } + Reader.call(self2, props); + } + SocketReader.prototype._read = function() { + var self2 = this; + if (self2._paused) return; + if (!self2._ended) { + self2.emit("end"); + self2.emit("close"); + self2._ended = true; + } + }; + } +}); + +// ../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/proxy-reader.js +var require_proxy_reader = __commonJS({ + "../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/proxy-reader.js"(exports2, module2) { + module2.exports = ProxyReader; + var Reader = require_reader(); + var getType = require_get_type(); + var inherits2 = require_inherits(); + var fs = require_graceful_fs(); + inherits2(ProxyReader, Reader); + function ProxyReader(props) { + var self2 = this; + if (!(self2 instanceof ProxyReader)) { + throw new Error("ProxyReader must be called as constructor."); + } + self2.props = props; + self2._buffer = []; + self2.ready = false; + Reader.call(self2, props); + } + ProxyReader.prototype._stat = function() { + var self2 = this; + var props = self2.props; + var stat = props.follow ? "stat" : "lstat"; + fs[stat](props.path, function(er, current) { + var type; + if (er || !current) { + type = "File"; + } else { + type = getType(current); + } + props[type] = true; + props.type = self2.type = type; + self2._old = current; + self2._addProxy(Reader(props, current)); + }); + }; + ProxyReader.prototype._addProxy = function(proxy) { + var self2 = this; + if (self2._proxyTarget) { + return self2.error("proxy already set"); + } + self2._proxyTarget = proxy; + proxy._proxy = self2; + [ + "error", + "data", + "end", + "close", + "linkpath", + "entry", + "entryEnd", + "child", + "childEnd", + "warn", + "stat" + ].forEach(function(ev) { + proxy.on(ev, self2.emit.bind(self2, ev)); + }); + self2.emit("proxy", proxy); + proxy.on("ready", function() { + self2.ready = true; + self2.emit("ready"); + }); + var calls = self2._buffer; + self2._buffer.length = 0; + calls.forEach(function(c) { + proxy[c[0]].apply(proxy, c[1]); + }); + }; + ProxyReader.prototype.pause = function() { + return this._proxyTarget ? this._proxyTarget.pause() : false; + }; + ProxyReader.prototype.resume = function() { + return this._proxyTarget ? this._proxyTarget.resume() : false; + }; + } +}); + +// ../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/reader.js +var require_reader = __commonJS({ + "../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/reader.js"(exports2, module2) { + module2.exports = Reader; + var fs = require_graceful_fs(); + var Stream = require("stream").Stream; + var inherits2 = require_inherits(); + var path = require("path"); + var getType = require_get_type(); + var hardLinks = Reader.hardLinks = {}; + var Abstract = require_abstract(); + inherits2(Reader, Abstract); + var LinkReader = require_link_reader(); + function Reader(props, currentStat) { + var self2 = this; + if (!(self2 instanceof Reader)) return new Reader(props, currentStat); + if (typeof props === "string") { + props = { path: props }; + } + var type; + var ClassType; + if (props.type && typeof props.type === "function") { + type = props.type; + ClassType = type; + } else { + type = getType(props); + ClassType = Reader; + } + if (currentStat && !type) { + type = getType(currentStat); + props[type] = true; + props.type = type; + } + switch (type) { + case "Directory": + ClassType = require_dir_reader(); + break; + case "Link": + // XXX hard links are just files. + // However, it would be good to keep track of files' dev+inode + // and nlink values, and create a HardLinkReader that emits + // a linkpath value of the original copy, so that the tar + // writer can preserve them. + // ClassType = HardLinkReader + // break + case "File": + ClassType = require_file_reader(); + break; + case "SymbolicLink": + ClassType = LinkReader; + break; + case "Socket": + ClassType = require_socket_reader(); + break; + case null: + ClassType = require_proxy_reader(); + break; + } + if (!(self2 instanceof ClassType)) { + return new ClassType(props); + } + Abstract.call(self2); + if (!props.path) { + self2.error("Must provide a path", null, true); + } + self2.readable = true; + self2.writable = false; + self2.type = type; + self2.props = props; + self2.depth = props.depth = props.depth || 0; + self2.parent = props.parent || null; + self2.root = props.root || props.parent && props.parent.root || self2; + self2._path = self2.path = path.resolve(props.path); + if (process.platform === "win32") { + self2.path = self2._path = self2.path.replace(/\?/g, "_"); + if (self2._path.length >= 260) { + self2._swallowErrors = true; + self2._path = "\\\\?\\" + self2.path.replace(/\//g, "\\"); + } + } + self2.basename = props.basename = path.basename(self2.path); + self2.dirname = props.dirname = path.dirname(self2.path); + props.parent = props.root = null; + self2.size = props.size; + self2.filter = typeof props.filter === "function" ? props.filter : null; + if (props.sort === "alpha") props.sort = alphasort; + self2._stat(currentStat); + } + function alphasort(a, b) { + return a === b ? 0 : a.toLowerCase() > b.toLowerCase() ? 1 : a.toLowerCase() < b.toLowerCase() ? -1 : a > b ? 1 : -1; + } + Reader.prototype._stat = function(currentStat) { + var self2 = this; + var props = self2.props; + var stat = props.follow ? "stat" : "lstat"; + if (currentStat) process.nextTick(statCb.bind(null, null, currentStat)); + else fs[stat](self2._path, statCb); + function statCb(er, props_) { + if (er) return self2.error(er); + Object.keys(props_).forEach(function(k2) { + props[k2] = props_[k2]; + }); + if (void 0 !== self2.size && props.size !== self2.size) { + return self2.error("incorrect size"); + } + self2.size = props.size; + var type = getType(props); + var handleHardlinks = props.hardlinks !== false; + if (handleHardlinks && type !== "Directory" && props.nlink && props.nlink > 1) { + var k = props.dev + ":" + props.ino; + if (hardLinks[k] === self2._path || !hardLinks[k]) { + hardLinks[k] = self2._path; + } else { + type = self2.type = self2.props.type = "Link"; + self2.Link = self2.props.Link = true; + self2.linkpath = self2.props.linkpath = hardLinks[k]; + self2._stat = self2._read = LinkReader.prototype._read; + } + } + if (self2.type && self2.type !== type) { + self2.error("Unexpected type: " + type); + } + if (self2.filter) { + var who = self2._proxy || self2; + if (!self2.filter.call(who, who, props)) { + if (!self2._disowned) { + self2.abort(); + self2.emit("end"); + self2.emit("close"); + } + return; + } + } + var events = ["_stat", "stat", "ready"]; + var e = 0; + (function go() { + if (self2._aborted) { + self2.emit("end"); + self2.emit("close"); + return; + } + if (self2._paused && self2.type !== "Directory") { + self2.once("resume", go); + return; + } + var ev = events[e++]; + if (!ev) { + return self2._read(); + } + self2.emit(ev, props); + go(); + })(); + } + }; + Reader.prototype.pipe = function(dest) { + var self2 = this; + if (typeof dest.add === "function") { + self2.on("entry", function(entry) { + var ret2 = dest.add(entry); + if (ret2 === false) { + self2.pause(); + } + }); + } + return Stream.prototype.pipe.apply(this, arguments); + }; + Reader.prototype.pause = function(who) { + this._paused = true; + who = who || this; + this.emit("pause", who); + if (this._stream) this._stream.pause(who); + }; + Reader.prototype.resume = function(who) { + this._paused = false; + who = who || this; + this.emit("resume", who); + if (this._stream) this._stream.resume(who); + this._read(); + }; + Reader.prototype._read = function() { + this.error("Cannot read unknown type: " + this.type); + }; + } +}); + +// ../../node_modules/.pnpm/rimraf@2.7.1/node_modules/rimraf/rimraf.js +var require_rimraf = __commonJS({ + "../../node_modules/.pnpm/rimraf@2.7.1/node_modules/rimraf/rimraf.js"(exports2, module2) { + module2.exports = rimraf; + rimraf.sync = rimrafSync; + var assert = require("assert"); + var path = require("path"); + var fs = require("fs"); + var glob = void 0; + try { + glob = require_glob(); + } catch (_err) { + } + var _0666 = parseInt("666", 8); + var defaultGlobOpts = { + nosort: true, + silent: true + }; + var timeout = 0; + var isWindows = process.platform === "win32"; + function defaults(options) { + var methods = [ + "unlink", + "chmod", + "stat", + "lstat", + "rmdir", + "readdir" + ]; + methods.forEach(function(m) { + options[m] = options[m] || fs[m]; + m = m + "Sync"; + options[m] = options[m] || fs[m]; + }); + options.maxBusyTries = options.maxBusyTries || 3; + options.emfileWait = options.emfileWait || 1e3; + if (options.glob === false) { + options.disableGlob = true; + } + if (options.disableGlob !== true && glob === void 0) { + throw Error("glob dependency not found, set `options.disableGlob = true` if intentional"); + } + options.disableGlob = options.disableGlob || false; + options.glob = options.glob || defaultGlobOpts; + } + function rimraf(p, options, cb) { + if (typeof options === "function") { + cb = options; + options = {}; + } + assert(p, "rimraf: missing path"); + assert.equal(typeof p, "string", "rimraf: path should be a string"); + assert.equal(typeof cb, "function", "rimraf: callback function required"); + assert(options, "rimraf: invalid options argument provided"); + assert.equal(typeof options, "object", "rimraf: options should be object"); + defaults(options); + var busyTries = 0; + var errState = null; + var n = 0; + if (options.disableGlob || !glob.hasMagic(p)) + return afterGlob(null, [p]); + options.lstat(p, function(er, stat) { + if (!er) + return afterGlob(null, [p]); + glob(p, options.glob, afterGlob); + }); + function next(er) { + errState = errState || er; + if (--n === 0) + cb(errState); + } + function afterGlob(er, results) { + if (er) + return cb(er); + n = results.length; + if (n === 0) + return cb(); + results.forEach(function(p2) { + rimraf_(p2, options, function CB(er2) { + if (er2) { + if ((er2.code === "EBUSY" || er2.code === "ENOTEMPTY" || er2.code === "EPERM") && busyTries < options.maxBusyTries) { + busyTries++; + var time = busyTries * 100; + return setTimeout(function() { + rimraf_(p2, options, CB); + }, time); + } + if (er2.code === "EMFILE" && timeout < options.emfileWait) { + return setTimeout(function() { + rimraf_(p2, options, CB); + }, timeout++); + } + if (er2.code === "ENOENT") er2 = null; + } + timeout = 0; + next(er2); + }); + }); + } + } + function rimraf_(p, options, cb) { + assert(p); + assert(options); + assert(typeof cb === "function"); + options.lstat(p, function(er, st) { + if (er && er.code === "ENOENT") + return cb(null); + if (er && er.code === "EPERM" && isWindows) + fixWinEPERM(p, options, er, cb); + if (st && st.isDirectory()) + return rmdir(p, options, er, cb); + options.unlink(p, function(er2) { + if (er2) { + if (er2.code === "ENOENT") + return cb(null); + if (er2.code === "EPERM") + return isWindows ? fixWinEPERM(p, options, er2, cb) : rmdir(p, options, er2, cb); + if (er2.code === "EISDIR") + return rmdir(p, options, er2, cb); + } + return cb(er2); + }); + }); + } + function fixWinEPERM(p, options, er, cb) { + assert(p); + assert(options); + assert(typeof cb === "function"); + if (er) + assert(er instanceof Error); + options.chmod(p, _0666, function(er2) { + if (er2) + cb(er2.code === "ENOENT" ? null : er); + else + options.stat(p, function(er3, stats) { + if (er3) + cb(er3.code === "ENOENT" ? null : er); + else if (stats.isDirectory()) + rmdir(p, options, er, cb); + else + options.unlink(p, cb); + }); + }); + } + function fixWinEPERMSync(p, options, er) { + assert(p); + assert(options); + if (er) + assert(er instanceof Error); + try { + options.chmodSync(p, _0666); + } catch (er2) { + if (er2.code === "ENOENT") + return; + else + throw er; + } + try { + var stats = options.statSync(p); + } catch (er3) { + if (er3.code === "ENOENT") + return; + else + throw er; + } + if (stats.isDirectory()) + rmdirSync(p, options, er); + else + options.unlinkSync(p); + } + function rmdir(p, options, originalEr, cb) { + assert(p); + assert(options); + if (originalEr) + assert(originalEr instanceof Error); + assert(typeof cb === "function"); + options.rmdir(p, function(er) { + if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM")) + rmkids(p, options, cb); + else if (er && er.code === "ENOTDIR") + cb(originalEr); + else + cb(er); + }); + } + function rmkids(p, options, cb) { + assert(p); + assert(options); + assert(typeof cb === "function"); + options.readdir(p, function(er, files) { + if (er) + return cb(er); + var n = files.length; + if (n === 0) + return options.rmdir(p, cb); + var errState; + files.forEach(function(f) { + rimraf(path.join(p, f), options, function(er2) { + if (errState) + return; + if (er2) + return cb(errState = er2); + if (--n === 0) + options.rmdir(p, cb); + }); + }); + }); + } + function rimrafSync(p, options) { + options = options || {}; + defaults(options); + assert(p, "rimraf: missing path"); + assert.equal(typeof p, "string", "rimraf: path should be a string"); + assert(options, "rimraf: missing options"); + assert.equal(typeof options, "object", "rimraf: options should be object"); + var results; + if (options.disableGlob || !glob.hasMagic(p)) { + results = [p]; + } else { + try { + options.lstatSync(p); + results = [p]; + } catch (er) { + results = glob.sync(p, options.glob); + } + } + if (!results.length) + return; + for (var i = 0; i < results.length; i++) { + var p = results[i]; + try { + var st = options.lstatSync(p); + } catch (er) { + if (er.code === "ENOENT") + return; + if (er.code === "EPERM" && isWindows) + fixWinEPERMSync(p, options, er); + } + try { + if (st && st.isDirectory()) + rmdirSync(p, options, null); + else + options.unlinkSync(p); + } catch (er) { + if (er.code === "ENOENT") + return; + if (er.code === "EPERM") + return isWindows ? fixWinEPERMSync(p, options, er) : rmdirSync(p, options, er); + if (er.code !== "EISDIR") + throw er; + rmdirSync(p, options, er); + } + } + } + function rmdirSync(p, options, originalEr) { + assert(p); + assert(options); + if (originalEr) + assert(originalEr instanceof Error); + try { + options.rmdirSync(p); + } catch (er) { + if (er.code === "ENOENT") + return; + if (er.code === "ENOTDIR") + throw originalEr; + if (er.code === "ENOTEMPTY" || er.code === "EEXIST" || er.code === "EPERM") + rmkidsSync(p, options); + } + } + function rmkidsSync(p, options) { + assert(p); + assert(options); + options.readdirSync(p).forEach(function(f) { + rimrafSync(path.join(p, f), options); + }); + var retries = isWindows ? 100 : 1; + var i = 0; + do { + var threw = true; + try { + var ret2 = options.rmdirSync(p, options); + threw = false; + return ret2; + } finally { + if (++i < retries && threw) + continue; + } + } while (true); + } + } +}); + +// ../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/collect.js +var require_collect = __commonJS({ + "../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/collect.js"(exports2, module2) { + module2.exports = collect; + function collect(stream) { + if (stream._collected) return; + if (stream._paused) return stream.on("resume", collect.bind(null, stream)); + stream._collected = true; + stream.pause(); + stream.on("data", save); + stream.on("end", save); + var buf = []; + function save(b) { + if (typeof b === "string") b = new Buffer(b); + if (Buffer.isBuffer(b) && !b.length) return; + buf.push(b); + } + stream.on("entry", saveEntry); + var entryBuffer = []; + function saveEntry(e) { + collect(e); + entryBuffer.push(e); + } + stream.on("proxy", proxyPause); + function proxyPause(p) { + p.pause(); + } + stream.pipe = /* @__PURE__ */ (function(orig) { + return function(dest) { + var e = 0; + (function unblockEntry() { + var entry = entryBuffer[e++]; + if (!entry) return resume(); + entry.on("end", unblockEntry); + if (dest) dest.add(entry); + else stream.emit("entry", entry); + })(); + function resume() { + stream.removeListener("entry", saveEntry); + stream.removeListener("data", save); + stream.removeListener("end", save); + stream.pipe = orig; + if (dest) stream.pipe(dest); + buf.forEach(function(b) { + if (b) stream.emit("data", b); + else stream.emit("end"); + }); + stream.resume(); + } + return dest; + }; + })(stream.pipe); + } + } +}); + +// ../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/dir-writer.js +var require_dir_writer = __commonJS({ + "../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/dir-writer.js"(exports2, module2) { + module2.exports = DirWriter; + var Writer = require_writer(); + var inherits2 = require_inherits(); + var mkdir = require_mkdirp(); + var path = require("path"); + var collect = require_collect(); + inherits2(DirWriter, Writer); + function DirWriter(props) { + var self2 = this; + if (!(self2 instanceof DirWriter)) { + self2.error("DirWriter must be called as constructor.", null, true); + } + if (props.type !== "Directory" || !props.Directory) { + self2.error("Non-directory type " + props.type + " " + JSON.stringify(props), null, true); + } + Writer.call(this, props); + } + DirWriter.prototype._create = function() { + var self2 = this; + mkdir(self2._path, Writer.dirmode, function(er) { + if (er) return self2.error(er); + self2.ready = true; + self2.emit("ready"); + self2._process(); + }); + }; + DirWriter.prototype.write = function() { + return true; + }; + DirWriter.prototype.end = function() { + this._ended = true; + this._process(); + }; + DirWriter.prototype.add = function(entry) { + var self2 = this; + collect(entry); + if (!self2.ready || self2._currentEntry) { + self2._buffer.push(entry); + return false; + } + if (self2._ended) { + return self2.error("add after end"); + } + self2._buffer.push(entry); + self2._process(); + return this._buffer.length === 0; + }; + DirWriter.prototype._process = function() { + var self2 = this; + if (self2._processing) return; + var entry = self2._buffer.shift(); + if (!entry) { + self2.emit("drain"); + if (self2._ended) self2._finish(); + return; + } + self2._processing = true; + self2.emit("entry", entry); + var p = entry; + var pp; + do { + pp = p._path || p.path; + if (pp === self2.root._path || pp === self2._path || pp && pp.indexOf(self2._path) === 0) { + self2._processing = false; + if (entry._collected) entry.pipe(); + return self2._process(); + } + p = p.parent; + } while (p); + var props = { + parent: self2, + root: self2.root || self2, + type: entry.type, + depth: self2.depth + 1 + }; + pp = entry._path || entry.path || entry.props.path; + if (entry.parent) { + pp = pp.substr(entry.parent._path.length + 1); + } + props.path = path.join(self2.path, path.join("/", pp)); + props.filter = self2.filter; + Object.keys(entry.props).forEach(function(k) { + if (!props.hasOwnProperty(k)) { + props[k] = entry.props[k]; + } + }); + var child = self2._currentChild = new Writer(props); + child.on("ready", function() { + entry.pipe(child); + entry.resume(); + }); + child.on("error", function(er) { + if (child._swallowErrors) { + self2.warn(er); + child.emit("end"); + child.emit("close"); + } else { + self2.emit("error", er); + } + }); + child.on("close", onend); + var ended = false; + function onend() { + if (ended) return; + ended = true; + self2._currentChild = null; + self2._processing = false; + self2._process(); + } + }; + } +}); + +// ../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/link-writer.js +var require_link_writer = __commonJS({ + "../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/link-writer.js"(exports2, module2) { + module2.exports = LinkWriter; + var fs = require_graceful_fs(); + var Writer = require_writer(); + var inherits2 = require_inherits(); + var path = require("path"); + var rimraf = require_rimraf(); + inherits2(LinkWriter, Writer); + function LinkWriter(props) { + var self2 = this; + if (!(self2 instanceof LinkWriter)) { + throw new Error("LinkWriter must be called as constructor."); + } + if (!(props.type === "Link" && props.Link || props.type === "SymbolicLink" && props.SymbolicLink)) { + throw new Error("Non-link type " + props.type); + } + if (props.linkpath === "") props.linkpath = "."; + if (!props.linkpath) { + self2.error("Need linkpath property to create " + props.type); + } + Writer.call(this, props); + } + LinkWriter.prototype._create = function() { + var self2 = this; + var hard = self2.type === "Link" || process.platform === "win32"; + var link = hard ? "link" : "symlink"; + var lp = hard ? path.resolve(self2.dirname, self2.linkpath) : self2.linkpath; + if (hard) return clobber(self2, lp, link); + fs.readlink(self2._path, function(er, p) { + if (p && p === lp) return finish(self2); + clobber(self2, lp, link); + }); + }; + function clobber(self2, lp, link) { + rimraf(self2._path, function(er) { + if (er) return self2.error(er); + create(self2, lp, link); + }); + } + function create(self2, lp, link) { + fs[link](lp, self2._path, function(er) { + if (er) { + if ((er.code === "ENOENT" || er.code === "EACCES" || er.code === "EPERM") && process.platform === "win32") { + self2.ready = true; + self2.emit("ready"); + self2.emit("end"); + self2.emit("close"); + self2.end = self2._finish = function() { + }; + } else return self2.error(er); + } + finish(self2); + }); + } + function finish(self2) { + self2.ready = true; + self2.emit("ready"); + if (self2._ended && !self2._finished) self2._finish(); + } + LinkWriter.prototype.end = function() { + this._ended = true; + if (this.ready) { + this._finished = true; + this._finish(); + } + }; + } +}); + +// ../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/file-writer.js +var require_file_writer = __commonJS({ + "../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/file-writer.js"(exports2, module2) { + module2.exports = FileWriter; + var fs = require_graceful_fs(); + var Writer = require_writer(); + var inherits2 = require_inherits(); + var EOF = {}; + inherits2(FileWriter, Writer); + function FileWriter(props) { + var self2 = this; + if (!(self2 instanceof FileWriter)) { + throw new Error("FileWriter must be called as constructor."); + } + if (props.type !== "File" || !props.File) { + throw new Error("Non-file type " + props.type); + } + self2._buffer = []; + self2._bytesWritten = 0; + Writer.call(this, props); + } + FileWriter.prototype._create = function() { + var self2 = this; + if (self2._stream) return; + var so = {}; + if (self2.props.flags) so.flags = self2.props.flags; + so.mode = Writer.filemode; + if (self2._old && self2._old.blksize) so.bufferSize = self2._old.blksize; + self2._stream = fs.createWriteStream(self2._path, so); + self2._stream.on("open", function() { + self2.ready = true; + self2._buffer.forEach(function(c) { + if (c === EOF) self2._stream.end(); + else self2._stream.write(c); + }); + self2.emit("ready"); + self2.emit("drain"); + }); + self2._stream.on("error", function(er) { + self2.emit("error", er); + }); + self2._stream.on("drain", function() { + self2.emit("drain"); + }); + self2._stream.on("close", function() { + self2._finish(); + }); + }; + FileWriter.prototype.write = function(c) { + var self2 = this; + self2._bytesWritten += c.length; + if (!self2.ready) { + if (!Buffer.isBuffer(c) && typeof c !== "string") { + throw new Error("invalid write data"); + } + self2._buffer.push(c); + return false; + } + var ret2 = self2._stream.write(c); + if (ret2 === false && self2._stream._queue) { + return self2._stream._queue.length <= 2; + } else { + return ret2; + } + }; + FileWriter.prototype.end = function(c) { + var self2 = this; + if (c) self2.write(c); + if (!self2.ready) { + self2._buffer.push(EOF); + return false; + } + return self2._stream.end(); + }; + FileWriter.prototype._finish = function() { + var self2 = this; + if (typeof self2.size === "number" && self2._bytesWritten !== self2.size) { + self2.error( + "Did not get expected byte count.\nexpect: " + self2.size + "\nactual: " + self2._bytesWritten + ); + } + Writer.prototype._finish.call(self2); + }; + } +}); + +// ../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/proxy-writer.js +var require_proxy_writer = __commonJS({ + "../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/proxy-writer.js"(exports2, module2) { + module2.exports = ProxyWriter; + var Writer = require_writer(); + var getType = require_get_type(); + var inherits2 = require_inherits(); + var collect = require_collect(); + var fs = require("fs"); + inherits2(ProxyWriter, Writer); + function ProxyWriter(props) { + var self2 = this; + if (!(self2 instanceof ProxyWriter)) { + throw new Error("ProxyWriter must be called as constructor."); + } + self2.props = props; + self2._needDrain = false; + Writer.call(self2, props); + } + ProxyWriter.prototype._stat = function() { + var self2 = this; + var props = self2.props; + var stat = props.follow ? "stat" : "lstat"; + fs[stat](props.path, function(er, current) { + var type; + if (er || !current) { + type = "File"; + } else { + type = getType(current); + } + props[type] = true; + props.type = self2.type = type; + self2._old = current; + self2._addProxy(Writer(props, current)); + }); + }; + ProxyWriter.prototype._addProxy = function(proxy) { + var self2 = this; + if (self2._proxy) { + return self2.error("proxy already set"); + } + self2._proxy = proxy; + [ + "ready", + "error", + "close", + "pipe", + "drain", + "warn" + ].forEach(function(ev) { + proxy.on(ev, self2.emit.bind(self2, ev)); + }); + self2.emit("proxy", proxy); + var calls = self2._buffer; + calls.forEach(function(c) { + proxy[c[0]].apply(proxy, c[1]); + }); + self2._buffer.length = 0; + if (self2._needsDrain) self2.emit("drain"); + }; + ProxyWriter.prototype.add = function(entry) { + collect(entry); + if (!this._proxy) { + this._buffer.push(["add", [entry]]); + this._needDrain = true; + return false; + } + return this._proxy.add(entry); + }; + ProxyWriter.prototype.write = function(c) { + if (!this._proxy) { + this._buffer.push(["write", [c]]); + this._needDrain = true; + return false; + } + return this._proxy.write(c); + }; + ProxyWriter.prototype.end = function(c) { + if (!this._proxy) { + this._buffer.push(["end", [c]]); + return false; + } + return this._proxy.end(c); + }; + } +}); + +// ../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/writer.js +var require_writer = __commonJS({ + "../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/lib/writer.js"(exports2, module2) { + module2.exports = Writer; + var fs = require_graceful_fs(); + var inherits2 = require_inherits(); + var rimraf = require_rimraf(); + var mkdir = require_mkdirp(); + var path = require("path"); + var umask = process.platform === "win32" ? 0 : process.umask(); + var getType = require_get_type(); + var Abstract = require_abstract(); + inherits2(Writer, Abstract); + Writer.dirmode = parseInt("0777", 8) & ~umask; + Writer.filemode = parseInt("0666", 8) & ~umask; + var DirWriter = require_dir_writer(); + var LinkWriter = require_link_writer(); + var FileWriter = require_file_writer(); + var ProxyWriter = require_proxy_writer(); + function Writer(props, current) { + var self2 = this; + if (typeof props === "string") { + props = { path: props }; + } + var type = getType(props); + var ClassType = Writer; + switch (type) { + case "Directory": + ClassType = DirWriter; + break; + case "File": + ClassType = FileWriter; + break; + case "Link": + case "SymbolicLink": + ClassType = LinkWriter; + break; + case null: + default: + ClassType = ProxyWriter; + break; + } + if (!(self2 instanceof ClassType)) return new ClassType(props); + Abstract.call(self2); + if (!props.path) self2.error("Must provide a path", null, true); + self2.type = props.type; + self2.props = props; + self2.depth = props.depth || 0; + self2.clobber = props.clobber === false ? props.clobber : true; + self2.parent = props.parent || null; + self2.root = props.root || props.parent && props.parent.root || self2; + self2._path = self2.path = path.resolve(props.path); + if (process.platform === "win32") { + self2.path = self2._path = self2.path.replace(/\?/g, "_"); + if (self2._path.length >= 260) { + self2._swallowErrors = true; + self2._path = "\\\\?\\" + self2.path.replace(/\//g, "\\"); + } + } + self2.basename = path.basename(props.path); + self2.dirname = path.dirname(props.path); + self2.linkpath = props.linkpath || null; + props.parent = props.root = null; + self2.size = props.size; + if (typeof props.mode === "string") { + props.mode = parseInt(props.mode, 8); + } + self2.readable = false; + self2.writable = true; + self2._buffer = []; + self2.ready = false; + self2.filter = typeof props.filter === "function" ? props.filter : null; + self2._stat(current); + } + Writer.prototype._create = function() { + var self2 = this; + fs[self2.props.follow ? "stat" : "lstat"](self2._path, function(er) { + if (er) { + return self2.warn("Cannot create " + self2._path + "\nUnsupported type: " + self2.type, "ENOTSUP"); + } + self2._finish(); + }); + }; + Writer.prototype._stat = function(current) { + var self2 = this; + var props = self2.props; + var stat = props.follow ? "stat" : "lstat"; + var who = self2._proxy || self2; + if (current) statCb(null, current); + else fs[stat](self2._path, statCb); + function statCb(er, current2) { + if (self2.filter && !self2.filter.call(who, who, current2)) { + self2._aborted = true; + self2.emit("end"); + self2.emit("close"); + return; + } + if (er || !current2) { + return create(self2); + } + self2._old = current2; + var currentType = getType(current2); + if (currentType !== self2.type || self2.type === "File" && current2.nlink > 1) { + return rimraf(self2._path, function(er2) { + if (er2) return self2.error(er2); + self2._old = null; + create(self2); + }); + } + create(self2); + } + }; + function create(self2) { + mkdir(path.dirname(self2._path), Writer.dirmode, function(er, made) { + if (er) return self2.error(er); + self2._madeDir = made; + return self2._create(); + }); + } + function endChmod(self2, want, current, path2, cb) { + var wantMode = want.mode; + var chmod = want.follow || self2.type !== "SymbolicLink" ? "chmod" : "lchmod"; + if (!fs[chmod]) return cb(); + if (typeof wantMode !== "number") return cb(); + var curMode = current.mode & parseInt("0777", 8); + wantMode = wantMode & parseInt("0777", 8); + if (wantMode === curMode) return cb(); + fs[chmod](path2, wantMode, cb); + } + function endChown(self2, want, current, path2, cb) { + if (process.platform === "win32") return cb(); + if (!process.getuid || process.getuid() !== 0) return cb(); + if (typeof want.uid !== "number" && typeof want.gid !== "number") return cb(); + if (current.uid === want.uid && current.gid === want.gid) return cb(); + var chown = self2.props.follow || self2.type !== "SymbolicLink" ? "chown" : "lchown"; + if (!fs[chown]) return cb(); + if (typeof want.uid !== "number") want.uid = current.uid; + if (typeof want.gid !== "number") want.gid = current.gid; + fs[chown](path2, want.uid, want.gid, cb); + } + function endUtimes(self2, want, current, path2, cb) { + if (!fs.utimes || process.platform === "win32") return cb(); + var utimes = want.follow || self2.type !== "SymbolicLink" ? "utimes" : "lutimes"; + if (utimes === "lutimes" && !fs[utimes]) { + utimes = "utimes"; + } + if (!fs[utimes]) return cb(); + var curA = current.atime; + var curM = current.mtime; + var meA = want.atime; + var meM = want.mtime; + if (meA === void 0) meA = curA; + if (meM === void 0) meM = curM; + if (!isDate(meA)) meA = new Date(meA); + if (!isDate(meM)) meA = new Date(meM); + if (meA.getTime() === curA.getTime() && meM.getTime() === curM.getTime()) return cb(); + fs[utimes](path2, meA, meM, cb); + } + Writer.prototype._finish = function() { + var self2 = this; + if (self2._finishing) return; + self2._finishing = true; + var todo = 0; + var errState = null; + var done = false; + if (self2._old) { + self2._old.atime = /* @__PURE__ */ new Date(0); + self2._old.mtime = /* @__PURE__ */ new Date(0); + setProps(self2._old); + } else { + var stat = self2.props.follow ? "stat" : "lstat"; + fs[stat](self2._path, function(er, current) { + if (er) { + if (er.code === "ENOENT" && (self2.type === "Link" || self2.type === "SymbolicLink") && process.platform === "win32") { + self2.ready = true; + self2.emit("ready"); + self2.emit("end"); + self2.emit("close"); + self2.end = self2._finish = function() { + }; + return; + } else return self2.error(er); + } + setProps(self2._old = current); + }); + } + return; + function setProps(current) { + todo += 3; + endChmod(self2, self2.props, current, self2._path, next("chmod")); + endChown(self2, self2.props, current, self2._path, next("chown")); + endUtimes(self2, self2.props, current, self2._path, next("utimes")); + } + function next(what) { + return function(er) { + if (errState) return; + if (er) { + er.fstream_finish_call = what; + return self2.error(errState = er); + } + if (--todo > 0) return; + if (done) return; + done = true; + if (!self2._madeDir) return end(); + else endMadeDir(self2, self2._path, end); + function end(er2) { + if (er2) { + er2.fstream_finish_call = "setupMadeDir"; + return self2.error(er2); + } + self2.emit("end"); + self2.emit("close"); + } + }; + } + }; + function endMadeDir(self2, p, cb) { + var made = self2._madeDir; + var d = path.dirname(p); + endMadeDir_(self2, d, function(er) { + if (er) return cb(er); + if (d === made) { + return cb(); + } + endMadeDir(self2, d, cb); + }); + } + function endMadeDir_(self2, p, cb) { + var dirProps = {}; + Object.keys(self2.props).forEach(function(k) { + dirProps[k] = self2.props[k]; + if (k === "mode" && self2.type !== "Directory") { + dirProps[k] = dirProps[k] | parseInt("0111", 8); + } + }); + var todo = 3; + var errState = null; + fs.stat(p, function(er, current) { + if (er) return cb(errState = er); + endChmod(self2, dirProps, current, p, next); + endChown(self2, dirProps, current, p, next); + endUtimes(self2, dirProps, current, p, next); + }); + function next(er) { + if (errState) return; + if (er) return cb(errState = er); + if (--todo === 0) return cb(); + } + } + Writer.prototype.pipe = function() { + this.error("Can't pipe from writable stream"); + }; + Writer.prototype.add = function() { + this.error("Can't add to non-Directory type"); + }; + Writer.prototype.write = function() { + return true; + }; + function objectToString(d) { + return Object.prototype.toString.call(d); + } + function isDate(d) { + return typeof d === "object" && objectToString(d) === "[object Date]"; + } + } +}); + +// ../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/fstream.js +var require_fstream = __commonJS({ + "../../node_modules/.pnpm/fstream@1.0.12/node_modules/fstream/fstream.js"(exports2) { + exports2.Abstract = require_abstract(); + exports2.Reader = require_reader(); + exports2.Writer = require_writer(); + exports2.File = { + Reader: require_file_reader(), + Writer: require_file_writer() + }; + exports2.Dir = { + Reader: require_dir_reader(), + Writer: require_dir_writer() + }; + exports2.Link = { + Reader: require_link_reader(), + Writer: require_link_writer() + }; + exports2.Proxy = { + Reader: require_proxy_reader(), + Writer: require_proxy_writer() + }; + exports2.Reader.Dir = exports2.DirReader = exports2.Dir.Reader; + exports2.Reader.File = exports2.FileReader = exports2.File.Reader; + exports2.Reader.Link = exports2.LinkReader = exports2.Link.Reader; + exports2.Reader.Proxy = exports2.ProxyReader = exports2.Proxy.Reader; + exports2.Writer.Dir = exports2.DirWriter = exports2.Dir.Writer; + exports2.Writer.File = exports2.FileWriter = exports2.File.Writer; + exports2.Writer.Link = exports2.LinkWriter = exports2.Link.Writer; + exports2.Writer.Proxy = exports2.ProxyWriter = exports2.Proxy.Writer; + exports2.collect = require_collect(); + } +}); + +// ../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/extract.js +var require_extract2 = __commonJS({ + "../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/extract.js"(exports2, module2) { + module2.exports = Extract; + var Parse = require_parse4(); + var Writer = require_fstream().Writer; + var path = require("path"); + var stream = require("stream"); + var duplexer2 = require_duplexer2(); + var Promise2 = require_bluebird(); + function Extract(opts) { + opts.path = path.resolve(path.normalize(opts.path)); + var parser = new Parse(opts); + var outStream = new stream.Writable({ objectMode: true }); + outStream._write = function(entry, encoding, cb) { + if (entry.type == "Directory") return cb(); + var extractPath = path.join(opts.path, entry.path); + if (extractPath.indexOf(opts.path) != 0) { + return cb(); + } + const writer = opts.getWriter ? opts.getWriter({ path: extractPath }) : Writer({ path: extractPath }); + entry.pipe(writer).on("error", cb).on("close", cb); + }; + var extract = duplexer2(parser, outStream); + parser.once("crx-header", function(crxHeader) { + extract.crxHeader = crxHeader; + }); + parser.pipe(outStream).on("finish", function() { + extract.emit("close"); + }); + extract.promise = function() { + return new Promise2(function(resolve, reject) { + extract.on("close", resolve); + extract.on("error", reject); + }); + }; + return extract; + } + } +}); + +// ../../node_modules/.pnpm/big-integer@1.6.52/node_modules/big-integer/BigInteger.js +var require_BigInteger = __commonJS({ + "../../node_modules/.pnpm/big-integer@1.6.52/node_modules/big-integer/BigInteger.js"(exports2, module2) { + var bigInt = (function(undefined2) { + "use strict"; + var BASE = 1e7, LOG_BASE = 7, MAX_INT = 9007199254740992, MAX_INT_ARR = smallToArray(MAX_INT), DEFAULT_ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyz"; + var supportsNativeBigInt = typeof BigInt === "function"; + function Integer(v, radix, alphabet, caseSensitive) { + if (typeof v === "undefined") return Integer[0]; + if (typeof radix !== "undefined") return +radix === 10 && !alphabet ? parseValue(v) : parseBase(v, radix, alphabet, caseSensitive); + return parseValue(v); + } + function BigInteger(value, sign) { + this.value = value; + this.sign = sign; + this.isSmall = false; + } + BigInteger.prototype = Object.create(Integer.prototype); + function SmallInteger(value) { + this.value = value; + this.sign = value < 0; + this.isSmall = true; + } + SmallInteger.prototype = Object.create(Integer.prototype); + function NativeBigInt(value) { + this.value = value; + } + NativeBigInt.prototype = Object.create(Integer.prototype); + function isPrecise(n) { + return -MAX_INT < n && n < MAX_INT; + } + function smallToArray(n) { + if (n < 1e7) + return [n]; + if (n < 1e14) + return [n % 1e7, Math.floor(n / 1e7)]; + return [n % 1e7, Math.floor(n / 1e7) % 1e7, Math.floor(n / 1e14)]; + } + function arrayToSmall(arr) { + trim(arr); + var length = arr.length; + if (length < 4 && compareAbs(arr, MAX_INT_ARR) < 0) { + switch (length) { + case 0: + return 0; + case 1: + return arr[0]; + case 2: + return arr[0] + arr[1] * BASE; + default: + return arr[0] + (arr[1] + arr[2] * BASE) * BASE; + } + } + return arr; + } + function trim(v) { + var i2 = v.length; + while (v[--i2] === 0) ; + v.length = i2 + 1; + } + function createArray(length) { + var x = new Array(length); + var i2 = -1; + while (++i2 < length) { + x[i2] = 0; + } + return x; + } + function truncate(n) { + if (n > 0) return Math.floor(n); + return Math.ceil(n); + } + function add(a, b) { + var l_a = a.length, l_b = b.length, r = new Array(l_a), carry = 0, base = BASE, sum, i2; + for (i2 = 0; i2 < l_b; i2++) { + sum = a[i2] + b[i2] + carry; + carry = sum >= base ? 1 : 0; + r[i2] = sum - carry * base; + } + while (i2 < l_a) { + sum = a[i2] + carry; + carry = sum === base ? 1 : 0; + r[i2++] = sum - carry * base; + } + if (carry > 0) r.push(carry); + return r; + } + function addAny(a, b) { + if (a.length >= b.length) return add(a, b); + return add(b, a); + } + function addSmall(a, carry) { + var l2 = a.length, r = new Array(l2), base = BASE, sum, i2; + for (i2 = 0; i2 < l2; i2++) { + sum = a[i2] - base + carry; + carry = Math.floor(sum / base); + r[i2] = sum - carry * base; + carry += 1; + } + while (carry > 0) { + r[i2++] = carry % base; + carry = Math.floor(carry / base); + } + return r; + } + BigInteger.prototype.add = function(v) { + var n = parseValue(v); + if (this.sign !== n.sign) { + return this.subtract(n.negate()); + } + var a = this.value, b = n.value; + if (n.isSmall) { + return new BigInteger(addSmall(a, Math.abs(b)), this.sign); + } + return new BigInteger(addAny(a, b), this.sign); + }; + BigInteger.prototype.plus = BigInteger.prototype.add; + SmallInteger.prototype.add = function(v) { + var n = parseValue(v); + var a = this.value; + if (a < 0 !== n.sign) { + return this.subtract(n.negate()); + } + var b = n.value; + if (n.isSmall) { + if (isPrecise(a + b)) return new SmallInteger(a + b); + b = smallToArray(Math.abs(b)); + } + return new BigInteger(addSmall(b, Math.abs(a)), a < 0); + }; + SmallInteger.prototype.plus = SmallInteger.prototype.add; + NativeBigInt.prototype.add = function(v) { + return new NativeBigInt(this.value + parseValue(v).value); + }; + NativeBigInt.prototype.plus = NativeBigInt.prototype.add; + function subtract(a, b) { + var a_l = a.length, b_l = b.length, r = new Array(a_l), borrow = 0, base = BASE, i2, difference; + for (i2 = 0; i2 < b_l; i2++) { + difference = a[i2] - borrow - b[i2]; + if (difference < 0) { + difference += base; + borrow = 1; + } else borrow = 0; + r[i2] = difference; + } + for (i2 = b_l; i2 < a_l; i2++) { + difference = a[i2] - borrow; + if (difference < 0) difference += base; + else { + r[i2++] = difference; + break; + } + r[i2] = difference; + } + for (; i2 < a_l; i2++) { + r[i2] = a[i2]; + } + trim(r); + return r; + } + function subtractAny(a, b, sign) { + var value; + if (compareAbs(a, b) >= 0) { + value = subtract(a, b); + } else { + value = subtract(b, a); + sign = !sign; + } + value = arrayToSmall(value); + if (typeof value === "number") { + if (sign) value = -value; + return new SmallInteger(value); + } + return new BigInteger(value, sign); + } + function subtractSmall(a, b, sign) { + var l2 = a.length, r = new Array(l2), carry = -b, base = BASE, i2, difference; + for (i2 = 0; i2 < l2; i2++) { + difference = a[i2] + carry; + carry = Math.floor(difference / base); + difference %= base; + r[i2] = difference < 0 ? difference + base : difference; + } + r = arrayToSmall(r); + if (typeof r === "number") { + if (sign) r = -r; + return new SmallInteger(r); + } + return new BigInteger(r, sign); + } + BigInteger.prototype.subtract = function(v) { + var n = parseValue(v); + if (this.sign !== n.sign) { + return this.add(n.negate()); + } + var a = this.value, b = n.value; + if (n.isSmall) + return subtractSmall(a, Math.abs(b), this.sign); + return subtractAny(a, b, this.sign); + }; + BigInteger.prototype.minus = BigInteger.prototype.subtract; + SmallInteger.prototype.subtract = function(v) { + var n = parseValue(v); + var a = this.value; + if (a < 0 !== n.sign) { + return this.add(n.negate()); + } + var b = n.value; + if (n.isSmall) { + return new SmallInteger(a - b); + } + return subtractSmall(b, Math.abs(a), a >= 0); + }; + SmallInteger.prototype.minus = SmallInteger.prototype.subtract; + NativeBigInt.prototype.subtract = function(v) { + return new NativeBigInt(this.value - parseValue(v).value); + }; + NativeBigInt.prototype.minus = NativeBigInt.prototype.subtract; + BigInteger.prototype.negate = function() { + return new BigInteger(this.value, !this.sign); + }; + SmallInteger.prototype.negate = function() { + var sign = this.sign; + var small = new SmallInteger(-this.value); + small.sign = !sign; + return small; + }; + NativeBigInt.prototype.negate = function() { + return new NativeBigInt(-this.value); + }; + BigInteger.prototype.abs = function() { + return new BigInteger(this.value, false); + }; + SmallInteger.prototype.abs = function() { + return new SmallInteger(Math.abs(this.value)); + }; + NativeBigInt.prototype.abs = function() { + return new NativeBigInt(this.value >= 0 ? this.value : -this.value); + }; + function multiplyLong(a, b) { + var a_l = a.length, b_l = b.length, l2 = a_l + b_l, r = createArray(l2), base = BASE, product, carry, i2, a_i, b_j; + for (i2 = 0; i2 < a_l; ++i2) { + a_i = a[i2]; + for (var j = 0; j < b_l; ++j) { + b_j = b[j]; + product = a_i * b_j + r[i2 + j]; + carry = Math.floor(product / base); + r[i2 + j] = product - carry * base; + r[i2 + j + 1] += carry; + } + } + trim(r); + return r; + } + function multiplySmall(a, b) { + var l2 = a.length, r = new Array(l2), base = BASE, carry = 0, product, i2; + for (i2 = 0; i2 < l2; i2++) { + product = a[i2] * b + carry; + carry = Math.floor(product / base); + r[i2] = product - carry * base; + } + while (carry > 0) { + r[i2++] = carry % base; + carry = Math.floor(carry / base); + } + return r; + } + function shiftLeft(x, n) { + var r = []; + while (n-- > 0) r.push(0); + return r.concat(x); + } + function multiplyKaratsuba(x, y) { + var n = Math.max(x.length, y.length); + if (n <= 30) return multiplyLong(x, y); + n = Math.ceil(n / 2); + var b = x.slice(n), a = x.slice(0, n), d = y.slice(n), c = y.slice(0, n); + var ac = multiplyKaratsuba(a, c), bd = multiplyKaratsuba(b, d), abcd = multiplyKaratsuba(addAny(a, b), addAny(c, d)); + var product = addAny(addAny(ac, shiftLeft(subtract(subtract(abcd, ac), bd), n)), shiftLeft(bd, 2 * n)); + trim(product); + return product; + } + function useKaratsuba(l1, l2) { + return -0.012 * l1 - 0.012 * l2 + 15e-6 * l1 * l2 > 0; + } + BigInteger.prototype.multiply = function(v) { + var n = parseValue(v), a = this.value, b = n.value, sign = this.sign !== n.sign, abs; + if (n.isSmall) { + if (b === 0) return Integer[0]; + if (b === 1) return this; + if (b === -1) return this.negate(); + abs = Math.abs(b); + if (abs < BASE) { + return new BigInteger(multiplySmall(a, abs), sign); + } + b = smallToArray(abs); + } + if (useKaratsuba(a.length, b.length)) + return new BigInteger(multiplyKaratsuba(a, b), sign); + return new BigInteger(multiplyLong(a, b), sign); + }; + BigInteger.prototype.times = BigInteger.prototype.multiply; + function multiplySmallAndArray(a, b, sign) { + if (a < BASE) { + return new BigInteger(multiplySmall(b, a), sign); + } + return new BigInteger(multiplyLong(b, smallToArray(a)), sign); + } + SmallInteger.prototype._multiplyBySmall = function(a) { + if (isPrecise(a.value * this.value)) { + return new SmallInteger(a.value * this.value); + } + return multiplySmallAndArray(Math.abs(a.value), smallToArray(Math.abs(this.value)), this.sign !== a.sign); + }; + BigInteger.prototype._multiplyBySmall = function(a) { + if (a.value === 0) return Integer[0]; + if (a.value === 1) return this; + if (a.value === -1) return this.negate(); + return multiplySmallAndArray(Math.abs(a.value), this.value, this.sign !== a.sign); + }; + SmallInteger.prototype.multiply = function(v) { + return parseValue(v)._multiplyBySmall(this); + }; + SmallInteger.prototype.times = SmallInteger.prototype.multiply; + NativeBigInt.prototype.multiply = function(v) { + return new NativeBigInt(this.value * parseValue(v).value); + }; + NativeBigInt.prototype.times = NativeBigInt.prototype.multiply; + function square(a) { + var l2 = a.length, r = createArray(l2 + l2), base = BASE, product, carry, i2, a_i, a_j; + for (i2 = 0; i2 < l2; i2++) { + a_i = a[i2]; + carry = 0 - a_i * a_i; + for (var j = i2; j < l2; j++) { + a_j = a[j]; + product = 2 * (a_i * a_j) + r[i2 + j] + carry; + carry = Math.floor(product / base); + r[i2 + j] = product - carry * base; + } + r[i2 + l2] = carry; + } + trim(r); + return r; + } + BigInteger.prototype.square = function() { + return new BigInteger(square(this.value), false); + }; + SmallInteger.prototype.square = function() { + var value = this.value * this.value; + if (isPrecise(value)) return new SmallInteger(value); + return new BigInteger(square(smallToArray(Math.abs(this.value))), false); + }; + NativeBigInt.prototype.square = function(v) { + return new NativeBigInt(this.value * this.value); + }; + function divMod1(a, b) { + var a_l = a.length, b_l = b.length, base = BASE, result = createArray(b.length), divisorMostSignificantDigit = b[b_l - 1], lambda = Math.ceil(base / (2 * divisorMostSignificantDigit)), remainder = multiplySmall(a, lambda), divisor = multiplySmall(b, lambda), quotientDigit, shift, carry, borrow, i2, l2, q; + if (remainder.length <= a_l) remainder.push(0); + divisor.push(0); + divisorMostSignificantDigit = divisor[b_l - 1]; + for (shift = a_l - b_l; shift >= 0; shift--) { + quotientDigit = base - 1; + if (remainder[shift + b_l] !== divisorMostSignificantDigit) { + quotientDigit = Math.floor((remainder[shift + b_l] * base + remainder[shift + b_l - 1]) / divisorMostSignificantDigit); + } + carry = 0; + borrow = 0; + l2 = divisor.length; + for (i2 = 0; i2 < l2; i2++) { + carry += quotientDigit * divisor[i2]; + q = Math.floor(carry / base); + borrow += remainder[shift + i2] - (carry - q * base); + carry = q; + if (borrow < 0) { + remainder[shift + i2] = borrow + base; + borrow = -1; + } else { + remainder[shift + i2] = borrow; + borrow = 0; + } + } + while (borrow !== 0) { + quotientDigit -= 1; + carry = 0; + for (i2 = 0; i2 < l2; i2++) { + carry += remainder[shift + i2] - base + divisor[i2]; + if (carry < 0) { + remainder[shift + i2] = carry + base; + carry = 0; + } else { + remainder[shift + i2] = carry; + carry = 1; + } + } + borrow += carry; + } + result[shift] = quotientDigit; + } + remainder = divModSmall(remainder, lambda)[0]; + return [arrayToSmall(result), arrayToSmall(remainder)]; + } + function divMod2(a, b) { + var a_l = a.length, b_l = b.length, result = [], part = [], base = BASE, guess, xlen, highx, highy, check; + while (a_l) { + part.unshift(a[--a_l]); + trim(part); + if (compareAbs(part, b) < 0) { + result.push(0); + continue; + } + xlen = part.length; + highx = part[xlen - 1] * base + part[xlen - 2]; + highy = b[b_l - 1] * base + b[b_l - 2]; + if (xlen > b_l) { + highx = (highx + 1) * base; + } + guess = Math.ceil(highx / highy); + do { + check = multiplySmall(b, guess); + if (compareAbs(check, part) <= 0) break; + guess--; + } while (guess); + result.push(guess); + part = subtract(part, check); + } + result.reverse(); + return [arrayToSmall(result), arrayToSmall(part)]; + } + function divModSmall(value, lambda) { + var length = value.length, quotient = createArray(length), base = BASE, i2, q, remainder, divisor; + remainder = 0; + for (i2 = length - 1; i2 >= 0; --i2) { + divisor = remainder * base + value[i2]; + q = truncate(divisor / lambda); + remainder = divisor - q * lambda; + quotient[i2] = q | 0; + } + return [quotient, remainder | 0]; + } + function divModAny(self2, v) { + var value, n = parseValue(v); + if (supportsNativeBigInt) { + return [new NativeBigInt(self2.value / n.value), new NativeBigInt(self2.value % n.value)]; + } + var a = self2.value, b = n.value; + var quotient; + if (b === 0) throw new Error("Cannot divide by zero"); + if (self2.isSmall) { + if (n.isSmall) { + return [new SmallInteger(truncate(a / b)), new SmallInteger(a % b)]; + } + return [Integer[0], self2]; + } + if (n.isSmall) { + if (b === 1) return [self2, Integer[0]]; + if (b == -1) return [self2.negate(), Integer[0]]; + var abs = Math.abs(b); + if (abs < BASE) { + value = divModSmall(a, abs); + quotient = arrayToSmall(value[0]); + var remainder = value[1]; + if (self2.sign) remainder = -remainder; + if (typeof quotient === "number") { + if (self2.sign !== n.sign) quotient = -quotient; + return [new SmallInteger(quotient), new SmallInteger(remainder)]; + } + return [new BigInteger(quotient, self2.sign !== n.sign), new SmallInteger(remainder)]; + } + b = smallToArray(abs); + } + var comparison = compareAbs(a, b); + if (comparison === -1) return [Integer[0], self2]; + if (comparison === 0) return [Integer[self2.sign === n.sign ? 1 : -1], Integer[0]]; + if (a.length + b.length <= 200) + value = divMod1(a, b); + else value = divMod2(a, b); + quotient = value[0]; + var qSign = self2.sign !== n.sign, mod = value[1], mSign = self2.sign; + if (typeof quotient === "number") { + if (qSign) quotient = -quotient; + quotient = new SmallInteger(quotient); + } else quotient = new BigInteger(quotient, qSign); + if (typeof mod === "number") { + if (mSign) mod = -mod; + mod = new SmallInteger(mod); + } else mod = new BigInteger(mod, mSign); + return [quotient, mod]; + } + BigInteger.prototype.divmod = function(v) { + var result = divModAny(this, v); + return { + quotient: result[0], + remainder: result[1] + }; + }; + NativeBigInt.prototype.divmod = SmallInteger.prototype.divmod = BigInteger.prototype.divmod; + BigInteger.prototype.divide = function(v) { + return divModAny(this, v)[0]; + }; + NativeBigInt.prototype.over = NativeBigInt.prototype.divide = function(v) { + return new NativeBigInt(this.value / parseValue(v).value); + }; + SmallInteger.prototype.over = SmallInteger.prototype.divide = BigInteger.prototype.over = BigInteger.prototype.divide; + BigInteger.prototype.mod = function(v) { + return divModAny(this, v)[1]; + }; + NativeBigInt.prototype.mod = NativeBigInt.prototype.remainder = function(v) { + return new NativeBigInt(this.value % parseValue(v).value); + }; + SmallInteger.prototype.remainder = SmallInteger.prototype.mod = BigInteger.prototype.remainder = BigInteger.prototype.mod; + BigInteger.prototype.pow = function(v) { + var n = parseValue(v), a = this.value, b = n.value, value, x, y; + if (b === 0) return Integer[1]; + if (a === 0) return Integer[0]; + if (a === 1) return Integer[1]; + if (a === -1) return n.isEven() ? Integer[1] : Integer[-1]; + if (n.sign) { + return Integer[0]; + } + if (!n.isSmall) throw new Error("The exponent " + n.toString() + " is too large."); + if (this.isSmall) { + if (isPrecise(value = Math.pow(a, b))) + return new SmallInteger(truncate(value)); + } + x = this; + y = Integer[1]; + while (true) { + if (b & true) { + y = y.times(x); + --b; + } + if (b === 0) break; + b /= 2; + x = x.square(); + } + return y; + }; + SmallInteger.prototype.pow = BigInteger.prototype.pow; + NativeBigInt.prototype.pow = function(v) { + var n = parseValue(v); + var a = this.value, b = n.value; + var _0 = BigInt(0), _1 = BigInt(1), _2 = BigInt(2); + if (b === _0) return Integer[1]; + if (a === _0) return Integer[0]; + if (a === _1) return Integer[1]; + if (a === BigInt(-1)) return n.isEven() ? Integer[1] : Integer[-1]; + if (n.isNegative()) return new NativeBigInt(_0); + var x = this; + var y = Integer[1]; + while (true) { + if ((b & _1) === _1) { + y = y.times(x); + --b; + } + if (b === _0) break; + b /= _2; + x = x.square(); + } + return y; + }; + BigInteger.prototype.modPow = function(exp, mod) { + exp = parseValue(exp); + mod = parseValue(mod); + if (mod.isZero()) throw new Error("Cannot take modPow with modulus 0"); + var r = Integer[1], base = this.mod(mod); + if (exp.isNegative()) { + exp = exp.multiply(Integer[-1]); + base = base.modInv(mod); + } + while (exp.isPositive()) { + if (base.isZero()) return Integer[0]; + if (exp.isOdd()) r = r.multiply(base).mod(mod); + exp = exp.divide(2); + base = base.square().mod(mod); + } + return r; + }; + NativeBigInt.prototype.modPow = SmallInteger.prototype.modPow = BigInteger.prototype.modPow; + function compareAbs(a, b) { + if (a.length !== b.length) { + return a.length > b.length ? 1 : -1; + } + for (var i2 = a.length - 1; i2 >= 0; i2--) { + if (a[i2] !== b[i2]) return a[i2] > b[i2] ? 1 : -1; + } + return 0; + } + BigInteger.prototype.compareAbs = function(v) { + var n = parseValue(v), a = this.value, b = n.value; + if (n.isSmall) return 1; + return compareAbs(a, b); + }; + SmallInteger.prototype.compareAbs = function(v) { + var n = parseValue(v), a = Math.abs(this.value), b = n.value; + if (n.isSmall) { + b = Math.abs(b); + return a === b ? 0 : a > b ? 1 : -1; + } + return -1; + }; + NativeBigInt.prototype.compareAbs = function(v) { + var a = this.value; + var b = parseValue(v).value; + a = a >= 0 ? a : -a; + b = b >= 0 ? b : -b; + return a === b ? 0 : a > b ? 1 : -1; + }; + BigInteger.prototype.compare = function(v) { + if (v === Infinity) { + return -1; + } + if (v === -Infinity) { + return 1; + } + var n = parseValue(v), a = this.value, b = n.value; + if (this.sign !== n.sign) { + return n.sign ? 1 : -1; + } + if (n.isSmall) { + return this.sign ? -1 : 1; + } + return compareAbs(a, b) * (this.sign ? -1 : 1); + }; + BigInteger.prototype.compareTo = BigInteger.prototype.compare; + SmallInteger.prototype.compare = function(v) { + if (v === Infinity) { + return -1; + } + if (v === -Infinity) { + return 1; + } + var n = parseValue(v), a = this.value, b = n.value; + if (n.isSmall) { + return a == b ? 0 : a > b ? 1 : -1; + } + if (a < 0 !== n.sign) { + return a < 0 ? -1 : 1; + } + return a < 0 ? 1 : -1; + }; + SmallInteger.prototype.compareTo = SmallInteger.prototype.compare; + NativeBigInt.prototype.compare = function(v) { + if (v === Infinity) { + return -1; + } + if (v === -Infinity) { + return 1; + } + var a = this.value; + var b = parseValue(v).value; + return a === b ? 0 : a > b ? 1 : -1; + }; + NativeBigInt.prototype.compareTo = NativeBigInt.prototype.compare; + BigInteger.prototype.equals = function(v) { + return this.compare(v) === 0; + }; + NativeBigInt.prototype.eq = NativeBigInt.prototype.equals = SmallInteger.prototype.eq = SmallInteger.prototype.equals = BigInteger.prototype.eq = BigInteger.prototype.equals; + BigInteger.prototype.notEquals = function(v) { + return this.compare(v) !== 0; + }; + NativeBigInt.prototype.neq = NativeBigInt.prototype.notEquals = SmallInteger.prototype.neq = SmallInteger.prototype.notEquals = BigInteger.prototype.neq = BigInteger.prototype.notEquals; + BigInteger.prototype.greater = function(v) { + return this.compare(v) > 0; + }; + NativeBigInt.prototype.gt = NativeBigInt.prototype.greater = SmallInteger.prototype.gt = SmallInteger.prototype.greater = BigInteger.prototype.gt = BigInteger.prototype.greater; + BigInteger.prototype.lesser = function(v) { + return this.compare(v) < 0; + }; + NativeBigInt.prototype.lt = NativeBigInt.prototype.lesser = SmallInteger.prototype.lt = SmallInteger.prototype.lesser = BigInteger.prototype.lt = BigInteger.prototype.lesser; + BigInteger.prototype.greaterOrEquals = function(v) { + return this.compare(v) >= 0; + }; + NativeBigInt.prototype.geq = NativeBigInt.prototype.greaterOrEquals = SmallInteger.prototype.geq = SmallInteger.prototype.greaterOrEquals = BigInteger.prototype.geq = BigInteger.prototype.greaterOrEquals; + BigInteger.prototype.lesserOrEquals = function(v) { + return this.compare(v) <= 0; + }; + NativeBigInt.prototype.leq = NativeBigInt.prototype.lesserOrEquals = SmallInteger.prototype.leq = SmallInteger.prototype.lesserOrEquals = BigInteger.prototype.leq = BigInteger.prototype.lesserOrEquals; + BigInteger.prototype.isEven = function() { + return (this.value[0] & 1) === 0; + }; + SmallInteger.prototype.isEven = function() { + return (this.value & 1) === 0; + }; + NativeBigInt.prototype.isEven = function() { + return (this.value & BigInt(1)) === BigInt(0); + }; + BigInteger.prototype.isOdd = function() { + return (this.value[0] & 1) === 1; + }; + SmallInteger.prototype.isOdd = function() { + return (this.value & 1) === 1; + }; + NativeBigInt.prototype.isOdd = function() { + return (this.value & BigInt(1)) === BigInt(1); + }; + BigInteger.prototype.isPositive = function() { + return !this.sign; + }; + SmallInteger.prototype.isPositive = function() { + return this.value > 0; + }; + NativeBigInt.prototype.isPositive = SmallInteger.prototype.isPositive; + BigInteger.prototype.isNegative = function() { + return this.sign; + }; + SmallInteger.prototype.isNegative = function() { + return this.value < 0; + }; + NativeBigInt.prototype.isNegative = SmallInteger.prototype.isNegative; + BigInteger.prototype.isUnit = function() { + return false; + }; + SmallInteger.prototype.isUnit = function() { + return Math.abs(this.value) === 1; + }; + NativeBigInt.prototype.isUnit = function() { + return this.abs().value === BigInt(1); + }; + BigInteger.prototype.isZero = function() { + return false; + }; + SmallInteger.prototype.isZero = function() { + return this.value === 0; + }; + NativeBigInt.prototype.isZero = function() { + return this.value === BigInt(0); + }; + BigInteger.prototype.isDivisibleBy = function(v) { + var n = parseValue(v); + if (n.isZero()) return false; + if (n.isUnit()) return true; + if (n.compareAbs(2) === 0) return this.isEven(); + return this.mod(n).isZero(); + }; + NativeBigInt.prototype.isDivisibleBy = SmallInteger.prototype.isDivisibleBy = BigInteger.prototype.isDivisibleBy; + function isBasicPrime(v) { + var n = v.abs(); + if (n.isUnit()) return false; + if (n.equals(2) || n.equals(3) || n.equals(5)) return true; + if (n.isEven() || n.isDivisibleBy(3) || n.isDivisibleBy(5)) return false; + if (n.lesser(49)) return true; + } + function millerRabinTest(n, a) { + var nPrev = n.prev(), b = nPrev, r = 0, d, t, i2, x; + while (b.isEven()) b = b.divide(2), r++; + next: for (i2 = 0; i2 < a.length; i2++) { + if (n.lesser(a[i2])) continue; + x = bigInt(a[i2]).modPow(b, n); + if (x.isUnit() || x.equals(nPrev)) continue; + for (d = r - 1; d != 0; d--) { + x = x.square().mod(n); + if (x.isUnit()) return false; + if (x.equals(nPrev)) continue next; + } + return false; + } + return true; + } + BigInteger.prototype.isPrime = function(strict) { + var isPrime = isBasicPrime(this); + if (isPrime !== undefined2) return isPrime; + var n = this.abs(); + var bits = n.bitLength(); + if (bits <= 64) + return millerRabinTest(n, [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37]); + var logN = Math.log(2) * bits.toJSNumber(); + var t = Math.ceil(strict === true ? 2 * Math.pow(logN, 2) : logN); + for (var a = [], i2 = 0; i2 < t; i2++) { + a.push(bigInt(i2 + 2)); + } + return millerRabinTest(n, a); + }; + NativeBigInt.prototype.isPrime = SmallInteger.prototype.isPrime = BigInteger.prototype.isPrime; + BigInteger.prototype.isProbablePrime = function(iterations, rng2) { + var isPrime = isBasicPrime(this); + if (isPrime !== undefined2) return isPrime; + var n = this.abs(); + var t = iterations === undefined2 ? 5 : iterations; + for (var a = [], i2 = 0; i2 < t; i2++) { + a.push(bigInt.randBetween(2, n.minus(2), rng2)); + } + return millerRabinTest(n, a); + }; + NativeBigInt.prototype.isProbablePrime = SmallInteger.prototype.isProbablePrime = BigInteger.prototype.isProbablePrime; + BigInteger.prototype.modInv = function(n) { + var t = bigInt.zero, newT = bigInt.one, r = parseValue(n), newR = this.abs(), q, lastT, lastR; + while (!newR.isZero()) { + q = r.divide(newR); + lastT = t; + lastR = r; + t = newT; + r = newR; + newT = lastT.subtract(q.multiply(newT)); + newR = lastR.subtract(q.multiply(newR)); + } + if (!r.isUnit()) throw new Error(this.toString() + " and " + n.toString() + " are not co-prime"); + if (t.compare(0) === -1) { + t = t.add(n); + } + if (this.isNegative()) { + return t.negate(); + } + return t; + }; + NativeBigInt.prototype.modInv = SmallInteger.prototype.modInv = BigInteger.prototype.modInv; + BigInteger.prototype.next = function() { + var value = this.value; + if (this.sign) { + return subtractSmall(value, 1, this.sign); + } + return new BigInteger(addSmall(value, 1), this.sign); + }; + SmallInteger.prototype.next = function() { + var value = this.value; + if (value + 1 < MAX_INT) return new SmallInteger(value + 1); + return new BigInteger(MAX_INT_ARR, false); + }; + NativeBigInt.prototype.next = function() { + return new NativeBigInt(this.value + BigInt(1)); + }; + BigInteger.prototype.prev = function() { + var value = this.value; + if (this.sign) { + return new BigInteger(addSmall(value, 1), true); + } + return subtractSmall(value, 1, this.sign); + }; + SmallInteger.prototype.prev = function() { + var value = this.value; + if (value - 1 > -MAX_INT) return new SmallInteger(value - 1); + return new BigInteger(MAX_INT_ARR, true); + }; + NativeBigInt.prototype.prev = function() { + return new NativeBigInt(this.value - BigInt(1)); + }; + var powersOfTwo = [1]; + while (2 * powersOfTwo[powersOfTwo.length - 1] <= BASE) powersOfTwo.push(2 * powersOfTwo[powersOfTwo.length - 1]); + var powers2Length = powersOfTwo.length, highestPower2 = powersOfTwo[powers2Length - 1]; + function shift_isSmall(n) { + return Math.abs(n) <= BASE; + } + BigInteger.prototype.shiftLeft = function(v) { + var n = parseValue(v).toJSNumber(); + if (!shift_isSmall(n)) { + throw new Error(String(n) + " is too large for shifting."); + } + if (n < 0) return this.shiftRight(-n); + var result = this; + if (result.isZero()) return result; + while (n >= powers2Length) { + result = result.multiply(highestPower2); + n -= powers2Length - 1; + } + return result.multiply(powersOfTwo[n]); + }; + NativeBigInt.prototype.shiftLeft = SmallInteger.prototype.shiftLeft = BigInteger.prototype.shiftLeft; + BigInteger.prototype.shiftRight = function(v) { + var remQuo; + var n = parseValue(v).toJSNumber(); + if (!shift_isSmall(n)) { + throw new Error(String(n) + " is too large for shifting."); + } + if (n < 0) return this.shiftLeft(-n); + var result = this; + while (n >= powers2Length) { + if (result.isZero() || result.isNegative() && result.isUnit()) return result; + remQuo = divModAny(result, highestPower2); + result = remQuo[1].isNegative() ? remQuo[0].prev() : remQuo[0]; + n -= powers2Length - 1; + } + remQuo = divModAny(result, powersOfTwo[n]); + return remQuo[1].isNegative() ? remQuo[0].prev() : remQuo[0]; + }; + NativeBigInt.prototype.shiftRight = SmallInteger.prototype.shiftRight = BigInteger.prototype.shiftRight; + function bitwise(x, y, fn) { + y = parseValue(y); + var xSign = x.isNegative(), ySign = y.isNegative(); + var xRem = xSign ? x.not() : x, yRem = ySign ? y.not() : y; + var xDigit = 0, yDigit = 0; + var xDivMod = null, yDivMod = null; + var result = []; + while (!xRem.isZero() || !yRem.isZero()) { + xDivMod = divModAny(xRem, highestPower2); + xDigit = xDivMod[1].toJSNumber(); + if (xSign) { + xDigit = highestPower2 - 1 - xDigit; + } + yDivMod = divModAny(yRem, highestPower2); + yDigit = yDivMod[1].toJSNumber(); + if (ySign) { + yDigit = highestPower2 - 1 - yDigit; + } + xRem = xDivMod[0]; + yRem = yDivMod[0]; + result.push(fn(xDigit, yDigit)); + } + var sum = fn(xSign ? 1 : 0, ySign ? 1 : 0) !== 0 ? bigInt(-1) : bigInt(0); + for (var i2 = result.length - 1; i2 >= 0; i2 -= 1) { + sum = sum.multiply(highestPower2).add(bigInt(result[i2])); + } + return sum; + } + BigInteger.prototype.not = function() { + return this.negate().prev(); + }; + NativeBigInt.prototype.not = SmallInteger.prototype.not = BigInteger.prototype.not; + BigInteger.prototype.and = function(n) { + return bitwise(this, n, function(a, b) { + return a & b; + }); + }; + NativeBigInt.prototype.and = SmallInteger.prototype.and = BigInteger.prototype.and; + BigInteger.prototype.or = function(n) { + return bitwise(this, n, function(a, b) { + return a | b; + }); + }; + NativeBigInt.prototype.or = SmallInteger.prototype.or = BigInteger.prototype.or; + BigInteger.prototype.xor = function(n) { + return bitwise(this, n, function(a, b) { + return a ^ b; + }); + }; + NativeBigInt.prototype.xor = SmallInteger.prototype.xor = BigInteger.prototype.xor; + var LOBMASK_I = 1 << 30, LOBMASK_BI = (BASE & -BASE) * (BASE & -BASE) | LOBMASK_I; + function roughLOB(n) { + var v = n.value, x = typeof v === "number" ? v | LOBMASK_I : typeof v === "bigint" ? v | BigInt(LOBMASK_I) : v[0] + v[1] * BASE | LOBMASK_BI; + return x & -x; + } + function integerLogarithm(value, base) { + if (base.compareTo(value) <= 0) { + var tmp = integerLogarithm(value, base.square(base)); + var p = tmp.p; + var e = tmp.e; + var t = p.multiply(base); + return t.compareTo(value) <= 0 ? { p: t, e: e * 2 + 1 } : { p, e: e * 2 }; + } + return { p: bigInt(1), e: 0 }; + } + BigInteger.prototype.bitLength = function() { + var n = this; + if (n.compareTo(bigInt(0)) < 0) { + n = n.negate().subtract(bigInt(1)); + } + if (n.compareTo(bigInt(0)) === 0) { + return bigInt(0); + } + return bigInt(integerLogarithm(n, bigInt(2)).e).add(bigInt(1)); + }; + NativeBigInt.prototype.bitLength = SmallInteger.prototype.bitLength = BigInteger.prototype.bitLength; + function max(a, b) { + a = parseValue(a); + b = parseValue(b); + return a.greater(b) ? a : b; + } + function min(a, b) { + a = parseValue(a); + b = parseValue(b); + return a.lesser(b) ? a : b; + } + function gcd(a, b) { + a = parseValue(a).abs(); + b = parseValue(b).abs(); + if (a.equals(b)) return a; + if (a.isZero()) return b; + if (b.isZero()) return a; + var c = Integer[1], d, t; + while (a.isEven() && b.isEven()) { + d = min(roughLOB(a), roughLOB(b)); + a = a.divide(d); + b = b.divide(d); + c = c.multiply(d); + } + while (a.isEven()) { + a = a.divide(roughLOB(a)); + } + do { + while (b.isEven()) { + b = b.divide(roughLOB(b)); + } + if (a.greater(b)) { + t = b; + b = a; + a = t; + } + b = b.subtract(a); + } while (!b.isZero()); + return c.isUnit() ? a : a.multiply(c); + } + function lcm(a, b) { + a = parseValue(a).abs(); + b = parseValue(b).abs(); + return a.divide(gcd(a, b)).multiply(b); + } + function randBetween(a, b, rng2) { + a = parseValue(a); + b = parseValue(b); + var usedRNG = rng2 || Math.random; + var low = min(a, b), high = max(a, b); + var range = high.subtract(low).add(1); + if (range.isSmall) return low.add(Math.floor(usedRNG() * range)); + var digits = toBase(range, BASE).value; + var result = [], restricted = true; + for (var i2 = 0; i2 < digits.length; i2++) { + var top = restricted ? digits[i2] + (i2 + 1 < digits.length ? digits[i2 + 1] / BASE : 0) : BASE; + var digit = truncate(usedRNG() * top); + result.push(digit); + if (digit < digits[i2]) restricted = false; + } + return low.add(Integer.fromArray(result, BASE, false)); + } + var parseBase = function(text, base, alphabet, caseSensitive) { + alphabet = alphabet || DEFAULT_ALPHABET; + text = String(text); + if (!caseSensitive) { + text = text.toLowerCase(); + alphabet = alphabet.toLowerCase(); + } + var length = text.length; + var i2; + var absBase = Math.abs(base); + var alphabetValues = {}; + for (i2 = 0; i2 < alphabet.length; i2++) { + alphabetValues[alphabet[i2]] = i2; + } + for (i2 = 0; i2 < length; i2++) { + var c = text[i2]; + if (c === "-") continue; + if (c in alphabetValues) { + if (alphabetValues[c] >= absBase) { + if (c === "1" && absBase === 1) continue; + throw new Error(c + " is not a valid digit in base " + base + "."); + } + } + } + base = parseValue(base); + var digits = []; + var isNegative = text[0] === "-"; + for (i2 = isNegative ? 1 : 0; i2 < text.length; i2++) { + var c = text[i2]; + if (c in alphabetValues) digits.push(parseValue(alphabetValues[c])); + else if (c === "<") { + var start = i2; + do { + i2++; + } while (text[i2] !== ">" && i2 < text.length); + digits.push(parseValue(text.slice(start + 1, i2))); + } else throw new Error(c + " is not a valid character"); + } + return parseBaseFromArray(digits, base, isNegative); + }; + function parseBaseFromArray(digits, base, isNegative) { + var val = Integer[0], pow = Integer[1], i2; + for (i2 = digits.length - 1; i2 >= 0; i2--) { + val = val.add(digits[i2].times(pow)); + pow = pow.times(base); + } + return isNegative ? val.negate() : val; + } + function stringify2(digit, alphabet) { + alphabet = alphabet || DEFAULT_ALPHABET; + if (digit < alphabet.length) { + return alphabet[digit]; + } + return "<" + digit + ">"; + } + function toBase(n, base) { + base = bigInt(base); + if (base.isZero()) { + if (n.isZero()) return { value: [0], isNegative: false }; + throw new Error("Cannot convert nonzero numbers to base 0."); + } + if (base.equals(-1)) { + if (n.isZero()) return { value: [0], isNegative: false }; + if (n.isNegative()) + return { + value: [].concat.apply( + [], + Array.apply(null, Array(-n.toJSNumber())).map(Array.prototype.valueOf, [1, 0]) + ), + isNegative: false + }; + var arr = Array.apply(null, Array(n.toJSNumber() - 1)).map(Array.prototype.valueOf, [0, 1]); + arr.unshift([1]); + return { + value: [].concat.apply([], arr), + isNegative: false + }; + } + var neg = false; + if (n.isNegative() && base.isPositive()) { + neg = true; + n = n.abs(); + } + if (base.isUnit()) { + if (n.isZero()) return { value: [0], isNegative: false }; + return { + value: Array.apply(null, Array(n.toJSNumber())).map(Number.prototype.valueOf, 1), + isNegative: neg + }; + } + var out = []; + var left = n, divmod; + while (left.isNegative() || left.compareAbs(base) >= 0) { + divmod = left.divmod(base); + left = divmod.quotient; + var digit = divmod.remainder; + if (digit.isNegative()) { + digit = base.minus(digit).abs(); + left = left.next(); + } + out.push(digit.toJSNumber()); + } + out.push(left.toJSNumber()); + return { value: out.reverse(), isNegative: neg }; + } + function toBaseString(n, base, alphabet) { + var arr = toBase(n, base); + return (arr.isNegative ? "-" : "") + arr.value.map(function(x) { + return stringify2(x, alphabet); + }).join(""); + } + BigInteger.prototype.toArray = function(radix) { + return toBase(this, radix); + }; + SmallInteger.prototype.toArray = function(radix) { + return toBase(this, radix); + }; + NativeBigInt.prototype.toArray = function(radix) { + return toBase(this, radix); + }; + BigInteger.prototype.toString = function(radix, alphabet) { + if (radix === undefined2) radix = 10; + if (radix !== 10 || alphabet) return toBaseString(this, radix, alphabet); + var v = this.value, l2 = v.length, str = String(v[--l2]), zeros = "0000000", digit; + while (--l2 >= 0) { + digit = String(v[l2]); + str += zeros.slice(digit.length) + digit; + } + var sign = this.sign ? "-" : ""; + return sign + str; + }; + SmallInteger.prototype.toString = function(radix, alphabet) { + if (radix === undefined2) radix = 10; + if (radix != 10 || alphabet) return toBaseString(this, radix, alphabet); + return String(this.value); + }; + NativeBigInt.prototype.toString = SmallInteger.prototype.toString; + NativeBigInt.prototype.toJSON = BigInteger.prototype.toJSON = SmallInteger.prototype.toJSON = function() { + return this.toString(); + }; + BigInteger.prototype.valueOf = function() { + return parseInt(this.toString(), 10); + }; + BigInteger.prototype.toJSNumber = BigInteger.prototype.valueOf; + SmallInteger.prototype.valueOf = function() { + return this.value; + }; + SmallInteger.prototype.toJSNumber = SmallInteger.prototype.valueOf; + NativeBigInt.prototype.valueOf = NativeBigInt.prototype.toJSNumber = function() { + return parseInt(this.toString(), 10); + }; + function parseStringValue(v) { + if (isPrecise(+v)) { + var x = +v; + if (x === truncate(x)) + return supportsNativeBigInt ? new NativeBigInt(BigInt(x)) : new SmallInteger(x); + throw new Error("Invalid integer: " + v); + } + var sign = v[0] === "-"; + if (sign) v = v.slice(1); + var split = v.split(/e/i); + if (split.length > 2) throw new Error("Invalid integer: " + split.join("e")); + if (split.length === 2) { + var exp = split[1]; + if (exp[0] === "+") exp = exp.slice(1); + exp = +exp; + if (exp !== truncate(exp) || !isPrecise(exp)) throw new Error("Invalid integer: " + exp + " is not a valid exponent."); + var text = split[0]; + var decimalPlace = text.indexOf("."); + if (decimalPlace >= 0) { + exp -= text.length - decimalPlace - 1; + text = text.slice(0, decimalPlace) + text.slice(decimalPlace + 1); + } + if (exp < 0) throw new Error("Cannot include negative exponent part for integers"); + text += new Array(exp + 1).join("0"); + v = text; + } + var isValid = /^([0-9][0-9]*)$/.test(v); + if (!isValid) throw new Error("Invalid integer: " + v); + if (supportsNativeBigInt) { + return new NativeBigInt(BigInt(sign ? "-" + v : v)); + } + var r = [], max2 = v.length, l2 = LOG_BASE, min2 = max2 - l2; + while (max2 > 0) { + r.push(+v.slice(min2, max2)); + min2 -= l2; + if (min2 < 0) min2 = 0; + max2 -= l2; + } + trim(r); + return new BigInteger(r, sign); + } + function parseNumberValue(v) { + if (supportsNativeBigInt) { + return new NativeBigInt(BigInt(v)); + } + if (isPrecise(v)) { + if (v !== truncate(v)) throw new Error(v + " is not an integer."); + return new SmallInteger(v); + } + return parseStringValue(v.toString()); + } + function parseValue(v) { + if (typeof v === "number") { + return parseNumberValue(v); + } + if (typeof v === "string") { + return parseStringValue(v); + } + if (typeof v === "bigint") { + return new NativeBigInt(v); + } + return v; + } + for (var i = 0; i < 1e3; i++) { + Integer[i] = parseValue(i); + if (i > 0) Integer[-i] = parseValue(-i); + } + Integer.one = Integer[1]; + Integer.zero = Integer[0]; + Integer.minusOne = Integer[-1]; + Integer.max = max; + Integer.min = min; + Integer.gcd = gcd; + Integer.lcm = lcm; + Integer.isInstance = function(x) { + return x instanceof BigInteger || x instanceof SmallInteger || x instanceof NativeBigInt; + }; + Integer.randBetween = randBetween; + Integer.fromArray = function(digits, base, isNegative) { + return parseBaseFromArray(digits.map(parseValue), parseValue(base || 10), isNegative); + }; + return Integer; + })(); + if (typeof module2 !== "undefined" && module2.hasOwnProperty("exports")) { + module2.exports = bigInt; + } + if (typeof define === "function" && define.amd) { + define(function() { + return bigInt; + }); + } + } +}); + +// ../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/Decrypt.js +var require_Decrypt = __commonJS({ + "../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/Decrypt.js"(exports2, module2) { + var bigInt = require_BigInteger(); + var Stream = require("stream"); + if (!Stream.Writable || !Stream.Writable.prototype.destroy) + Stream = require_readable2(); + var table; + function generateTable() { + var poly = 3988292384, c, n, k; + table = []; + for (n = 0; n < 256; n++) { + c = n; + for (k = 0; k < 8; k++) + c = c & 1 ? poly ^ c >>> 1 : c = c >>> 1; + table[n] = c >>> 0; + } + } + function crc(ch, crc2) { + if (!table) + generateTable(); + if (ch.charCodeAt) + ch = ch.charCodeAt(0); + return bigInt(crc2).shiftRight(8).and(16777215).xor(table[bigInt(crc2).xor(ch).and(255)]).value; + } + function Decrypt() { + if (!(this instanceof Decrypt)) + return new Decrypt(); + this.key0 = 305419896; + this.key1 = 591751049; + this.key2 = 878082192; + } + Decrypt.prototype.update = function(h) { + this.key0 = crc(h, this.key0); + this.key1 = bigInt(this.key0).and(255).and(4294967295).add(this.key1); + this.key1 = bigInt(this.key1).multiply(134775813).add(1).and(4294967295).value; + this.key2 = crc(bigInt(this.key1).shiftRight(24).and(255), this.key2); + }; + Decrypt.prototype.decryptByte = function(c) { + var k = bigInt(this.key2).or(2); + c = c ^ bigInt(k).multiply(bigInt(k ^ 1)).shiftRight(8).and(255); + this.update(c); + return c; + }; + Decrypt.prototype.stream = function() { + var stream = Stream.Transform(), self2 = this; + stream._transform = function(d, e, cb) { + for (var i = 0; i < d.length; i++) { + d[i] = self2.decryptByte(d[i]); + } + this.push(d); + cb(); + }; + return stream; + }; + module2.exports = Decrypt; + } +}); + +// ../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/Open/unzip.js +var require_unzip = __commonJS({ + "../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/Open/unzip.js"(exports2, module2) { + var Promise2 = require_bluebird(); + var Decrypt = require_Decrypt(); + var PullStream = require_PullStream(); + var Stream = require("stream"); + var binary = require_binary(); + var zlib = require("zlib"); + var parseExtraField = require_parseExtraField(); + var Buffer2 = require_Buffer(); + var parseDateTime = require_parseDateTime(); + if (!Stream.Writable || !Stream.Writable.prototype.destroy) + Stream = require_readable2(); + module2.exports = function unzip(source, offset, _password, directoryVars) { + var file2 = PullStream(), entry = Stream.PassThrough(); + var req = source.stream(offset); + req.pipe(file2).on("error", function(e) { + entry.emit("error", e); + }); + entry.vars = file2.pull(30).then(function(data) { + var vars = binary.parse(data).word32lu("signature").word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").vars; + vars.lastModifiedDateTime = parseDateTime(vars.lastModifiedDate, vars.lastModifiedTime); + return file2.pull(vars.fileNameLength).then(function(fileName) { + vars.fileName = fileName.toString("utf8"); + return file2.pull(vars.extraFieldLength); + }).then(function(extraField) { + var checkEncryption; + vars.extra = parseExtraField(extraField, vars); + if (directoryVars && directoryVars.compressedSize) vars = directoryVars; + if (vars.flags & 1) checkEncryption = file2.pull(12).then(function(header) { + if (!_password) + throw new Error("MISSING_PASSWORD"); + var decrypt = Decrypt(); + String(_password).split("").forEach(function(d) { + decrypt.update(d); + }); + for (var i = 0; i < header.length; i++) + header[i] = decrypt.decryptByte(header[i]); + vars.decrypt = decrypt; + vars.compressedSize -= 12; + var check = vars.flags & 8 ? vars.lastModifiedTime >> 8 & 255 : vars.crc32 >> 24 & 255; + if (header[11] !== check) + throw new Error("BAD_PASSWORD"); + return vars; + }); + return Promise2.resolve(checkEncryption).then(function() { + entry.emit("vars", vars); + return vars; + }); + }); + }); + entry.vars.then(function(vars) { + var fileSizeKnown = !(vars.flags & 8) || vars.compressedSize > 0, eof; + var inflater = vars.compressionMethod ? zlib.createInflateRaw() : Stream.PassThrough(); + if (fileSizeKnown) { + entry.size = vars.uncompressedSize; + eof = vars.compressedSize; + } else { + eof = Buffer2.alloc(4); + eof.writeUInt32LE(134695760, 0); + } + var stream = file2.stream(eof); + if (vars.decrypt) + stream = stream.pipe(vars.decrypt.stream()); + stream.pipe(inflater).on("error", function(err) { + entry.emit("error", err); + }).pipe(entry).on("finish", function() { + if (req.destroy) + req.destroy(); + else if (req.abort) + req.abort(); + else if (req.close) + req.close(); + else if (req.push) + req.push(); + else + console.log("warning - unable to close stream"); + }); + }).catch(function(e) { + entry.emit("error", e); + }); + return entry; + }; + } +}); + +// ../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/Open/directory.js +var require_directory = __commonJS({ + "../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/Open/directory.js"(exports2, module2) { + var binary = require_binary(); + var PullStream = require_PullStream(); + var unzip = require_unzip(); + var Promise2 = require_bluebird(); + var BufferStream = require_BufferStream(); + var parseExtraField = require_parseExtraField(); + var Buffer2 = require_Buffer(); + var path = require("path"); + var Writer = require_fstream().Writer; + var parseDateTime = require_parseDateTime(); + var signature = Buffer2.alloc(4); + signature.writeUInt32LE(101010256, 0); + function getCrxHeader(source) { + var sourceStream = source.stream(0).pipe(PullStream()); + return sourceStream.pull(4).then(function(data) { + var signature2 = data.readUInt32LE(0); + if (signature2 === 875721283) { + var crxHeader; + return sourceStream.pull(12).then(function(data2) { + crxHeader = binary.parse(data2).word32lu("version").word32lu("pubKeyLength").word32lu("signatureLength").vars; + }).then(function() { + return sourceStream.pull(crxHeader.pubKeyLength + crxHeader.signatureLength); + }).then(function(data2) { + crxHeader.publicKey = data2.slice(0, crxHeader.pubKeyLength); + crxHeader.signature = data2.slice(crxHeader.pubKeyLength); + crxHeader.size = 16 + crxHeader.pubKeyLength + crxHeader.signatureLength; + return crxHeader; + }); + } + }); + } + function getZip64CentralDirectory(source, zip64CDL) { + var d64loc = binary.parse(zip64CDL).word32lu("signature").word32lu("diskNumber").word64lu("offsetToStartOfCentralDirectory").word32lu("numberOfDisks").vars; + if (d64loc.signature != 117853008) { + throw new Error("invalid zip64 end of central dir locator signature (0x07064b50): 0x" + d64loc.signature.toString(16)); + } + var dir64 = PullStream(); + source.stream(d64loc.offsetToStartOfCentralDirectory).pipe(dir64); + return dir64.pull(56); + } + function parseZip64DirRecord(dir64record) { + var vars = binary.parse(dir64record).word32lu("signature").word64lu("sizeOfCentralDirectory").word16lu("version").word16lu("versionsNeededToExtract").word32lu("diskNumber").word32lu("diskStart").word64lu("numberOfRecordsOnDisk").word64lu("numberOfRecords").word64lu("sizeOfCentralDirectory").word64lu("offsetToStartOfCentralDirectory").vars; + if (vars.signature != 101075792) { + throw new Error("invalid zip64 end of central dir locator signature (0x06064b50): 0x0" + vars.signature.toString(16)); + } + return vars; + } + module2.exports = function centralDirectory(source, options) { + var endDir = PullStream(), records = PullStream(), tailSize = options && options.tailSize || 80, sourceSize, crxHeader, startOffset, vars; + if (options && options.crx) + crxHeader = getCrxHeader(source); + return source.size().then(function(size) { + sourceSize = size; + source.stream(Math.max(0, size - tailSize)).on("error", function(error) { + endDir.emit("error", error); + }).pipe(endDir); + return endDir.pull(signature); + }).then(function() { + return Promise2.props({ directory: endDir.pull(22), crxHeader }); + }).then(function(d) { + var data = d.directory; + startOffset = d.crxHeader && d.crxHeader.size || 0; + vars = binary.parse(data).word32lu("signature").word16lu("diskNumber").word16lu("diskStart").word16lu("numberOfRecordsOnDisk").word16lu("numberOfRecords").word32lu("sizeOfCentralDirectory").word32lu("offsetToStartOfCentralDirectory").word16lu("commentLength").vars; + if (vars.numberOfRecords == 65535 || vars.numberOfRecords == 65535 || vars.offsetToStartOfCentralDirectory == 4294967295) { + const zip64CDLSize = 20; + const zip64CDLOffset = sourceSize - (tailSize - endDir.match + zip64CDLSize); + const zip64CDLStream = PullStream(); + source.stream(zip64CDLOffset).pipe(zip64CDLStream); + return zip64CDLStream.pull(zip64CDLSize).then(function(d2) { + return getZip64CentralDirectory(source, d2); + }).then(function(dir64record) { + vars = parseZip64DirRecord(dir64record); + }); + } else { + vars.offsetToStartOfCentralDirectory += startOffset; + } + }).then(function() { + if (vars.commentLength) return endDir.pull(vars.commentLength).then(function(comment) { + vars.comment = comment.toString("utf8"); + }); + }).then(function() { + source.stream(vars.offsetToStartOfCentralDirectory).pipe(records); + vars.extract = function(opts) { + if (!opts || !opts.path) throw new Error("PATH_MISSING"); + opts.path = path.resolve(path.normalize(opts.path)); + return vars.files.then(function(files) { + return Promise2.map(files, function(entry) { + if (entry.type == "Directory") return; + var extractPath = path.join(opts.path, entry.path); + if (extractPath.indexOf(opts.path) != 0) { + return; + } + var writer = opts.getWriter ? opts.getWriter({ path: extractPath }) : Writer({ path: extractPath }); + return new Promise2(function(resolve, reject) { + entry.stream(opts.password).on("error", reject).pipe(writer).on("close", resolve).on("error", reject); + }); + }, { concurrency: opts.concurrency > 1 ? opts.concurrency : 1 }); + }); + }; + vars.files = Promise2.mapSeries(Array(vars.numberOfRecords), function() { + return records.pull(46).then(function(data) { + var vars2 = binary.parse(data).word32lu("signature").word16lu("versionMadeBy").word16lu("versionsNeededToExtract").word16lu("flags").word16lu("compressionMethod").word16lu("lastModifiedTime").word16lu("lastModifiedDate").word32lu("crc32").word32lu("compressedSize").word32lu("uncompressedSize").word16lu("fileNameLength").word16lu("extraFieldLength").word16lu("fileCommentLength").word16lu("diskNumber").word16lu("internalFileAttributes").word32lu("externalFileAttributes").word32lu("offsetToLocalFileHeader").vars; + vars2.offsetToLocalFileHeader += startOffset; + vars2.lastModifiedDateTime = parseDateTime(vars2.lastModifiedDate, vars2.lastModifiedTime); + return records.pull(vars2.fileNameLength).then(function(fileNameBuffer) { + vars2.pathBuffer = fileNameBuffer; + vars2.path = fileNameBuffer.toString("utf8"); + vars2.isUnicode = (vars2.flags & 2048) != 0; + return records.pull(vars2.extraFieldLength); + }).then(function(extraField) { + vars2.extra = parseExtraField(extraField, vars2); + return records.pull(vars2.fileCommentLength); + }).then(function(comment) { + vars2.comment = comment; + vars2.type = vars2.uncompressedSize === 0 && /[\/\\]$/.test(vars2.path) ? "Directory" : "File"; + vars2.stream = function(_password) { + return unzip(source, vars2.offsetToLocalFileHeader, _password, vars2); + }; + vars2.buffer = function(_password) { + return BufferStream(vars2.stream(_password)); + }; + return vars2; + }); + }); + }); + return Promise2.props(vars); + }); + }; + } +}); + +// ../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/Open/index.js +var require_Open = __commonJS({ + "../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/lib/Open/index.js"(exports2, module2) { + var fs = require_graceful_fs(); + var Promise2 = require_bluebird(); + var directory = require_directory(); + var Stream = require("stream"); + if (!Stream.Writable || !Stream.Writable.prototype.destroy) + Stream = require_readable2(); + module2.exports = { + buffer: function(buffer, options) { + var source = { + stream: function(offset, length) { + var stream = Stream.PassThrough(); + stream.end(buffer.slice(offset, length)); + return stream; + }, + size: function() { + return Promise2.resolve(buffer.length); + } + }; + return directory(source, options); + }, + file: function(filename, options) { + var source = { + stream: function(offset, length) { + return fs.createReadStream(filename, { start: offset, end: length && offset + length }); + }, + size: function() { + return new Promise2(function(resolve, reject) { + fs.stat(filename, function(err, d) { + if (err) + reject(err); + else + resolve(d.size); + }); + }); + } + }; + return directory(source, options); + }, + url: function(request, params, options) { + if (typeof params === "string") + params = { url: params }; + if (!params.url) + throw "URL missing"; + params.headers = params.headers || {}; + var source = { + stream: function(offset, length) { + var options2 = Object.create(params); + options2.headers = Object.create(params.headers); + options2.headers.range = "bytes=" + offset + "-" + (length ? length : ""); + return request(options2); + }, + size: function() { + return new Promise2(function(resolve, reject) { + var req = request(params); + req.on("response", function(d) { + req.abort(); + if (!d.headers["content-length"]) + reject(new Error("Missing content length header")); + else + resolve(d.headers["content-length"]); + }).on("error", reject); + }); + } + }; + return directory(source, options); + }, + s3: function(client, params, options) { + var source = { + size: function() { + return new Promise2(function(resolve, reject) { + client.headObject(params, function(err, d) { + if (err) + reject(err); + else + resolve(d.ContentLength); + }); + }); + }, + stream: function(offset, length) { + var d = {}; + for (var key in params) + d[key] = params[key]; + d.Range = "bytes=" + offset + "-" + (length ? length : ""); + return client.getObject(d).createReadStream(); + } + }; + return directory(source, options); + }, + custom: function(source, options) { + return directory(source, options); + } + }; + } +}); + +// ../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/unzip.js +var require_unzip2 = __commonJS({ + "../../node_modules/.pnpm/unzipper@0.10.14/node_modules/unzipper/unzip.js"(exports2) { + "use strict"; + require_listenercount(); + require_buffer_indexof_polyfill(); + require_setImmediate(); + exports2.Parse = require_parse4(); + exports2.ParseOne = require_parseOne(); + exports2.Extract = require_extract2(); + exports2.Open = require_Open(); + } +}); + +// ../../node_modules/.pnpm/tmp@0.2.7/node_modules/tmp/lib/tmp.js +var require_tmp = __commonJS({ + "../../node_modules/.pnpm/tmp@0.2.7/node_modules/tmp/lib/tmp.js"(exports2, module2) { + var fs = require("fs"); + var os = require("os"); + var path = require("path"); + var crypto5 = require("crypto"); + var _c = { fs: fs.constants, os: os.constants }; + var RANDOM_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; + var TEMPLATE_PATTERN = /XXXXXX/; + var DEFAULT_TRIES = 3; + var CREATE_FLAGS = (_c.O_CREAT || _c.fs.O_CREAT) | (_c.O_EXCL || _c.fs.O_EXCL) | (_c.O_RDWR || _c.fs.O_RDWR); + var IS_WIN32 = os.platform() === "win32"; + var EBADF = _c.EBADF || _c.os.errno.EBADF; + var ENOENT = _c.ENOENT || _c.os.errno.ENOENT; + var DIR_MODE = 448; + var FILE_MODE = 384; + var EXIT = "exit"; + var _removeObjects = []; + var FN_RMDIR_SYNC = fs.rmdirSync.bind(fs); + var _gracefulCleanup = false; + function rimraf(dirPath, callback) { + return fs.rm(dirPath, { recursive: true }, callback); + } + function FN_RIMRAF_SYNC(dirPath) { + return fs.rmSync(dirPath, { recursive: true }); + } + function tmpName(options, callback) { + const args = _parseArguments(options, callback), opts = args[0], cb = args[1]; + _assertAndSanitizeOptions(opts, function(err, sanitizedOptions) { + if (err) return cb(err); + let tries = sanitizedOptions.tries; + (function _getUniqueName() { + try { + const name = _generateTmpName(sanitizedOptions); + fs.stat(name, function(err2) { + if (!err2) { + if (tries-- > 0) return _getUniqueName(); + return cb(new Error("Could not get a unique tmp filename, max tries reached " + name)); + } + cb(null, name); + }); + } catch (err2) { + cb(err2); + } + })(); + }); + } + function tmpNameSync(options) { + const args = _parseArguments(options), opts = args[0]; + const sanitizedOptions = _assertAndSanitizeOptionsSync(opts); + let tries = sanitizedOptions.tries; + do { + const name = _generateTmpName(sanitizedOptions); + try { + fs.statSync(name); + } catch (e) { + return name; + } + } while (tries-- > 0); + throw new Error("Could not get a unique tmp filename, max tries reached"); + } + function file2(options, callback) { + const args = _parseArguments(options, callback), opts = args[0], cb = args[1]; + tmpName(opts, function _tmpNameCreated(err, name) { + if (err) return cb(err); + fs.open(name, CREATE_FLAGS, opts.mode || FILE_MODE, function _fileCreated(err2, fd) { + if (err2) return cb(err2); + if (opts.discardDescriptor) { + return fs.close(fd, function _discardCallback(possibleErr) { + return cb(possibleErr, name, void 0, _prepareTmpFileRemoveCallback(name, -1, opts, false)); + }); + } else { + const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor; + cb(null, name, fd, _prepareTmpFileRemoveCallback(name, discardOrDetachDescriptor ? -1 : fd, opts, false)); + } + }); + }); + } + function fileSync(options) { + const args = _parseArguments(options), opts = args[0]; + const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor; + const name = tmpNameSync(opts); + let fd = fs.openSync(name, CREATE_FLAGS, opts.mode || FILE_MODE); + if (opts.discardDescriptor) { + fs.closeSync(fd); + fd = void 0; + } + return { + name, + fd, + removeCallback: _prepareTmpFileRemoveCallback(name, discardOrDetachDescriptor ? -1 : fd, opts, true) + }; + } + function dir(options, callback) { + const args = _parseArguments(options, callback), opts = args[0], cb = args[1]; + tmpName(opts, function _tmpNameCreated(err, name) { + if (err) return cb(err); + fs.mkdir(name, opts.mode || DIR_MODE, function _dirCreated(err2) { + if (err2) return cb(err2); + cb(null, name, _prepareTmpDirRemoveCallback(name, opts, false)); + }); + }); + } + function dirSync(options) { + const args = _parseArguments(options), opts = args[0]; + const name = tmpNameSync(opts); + fs.mkdirSync(name, opts.mode || DIR_MODE); + return { + name, + removeCallback: _prepareTmpDirRemoveCallback(name, opts, true) + }; + } + function _removeFileAsync(fdPath, next) { + const _handler = function(err) { + if (err && !_isENOENT(err)) { + return next(err); + } + next(); + }; + if (0 <= fdPath[0]) + fs.close(fdPath[0], function() { + fs.unlink(fdPath[1], _handler); + }); + else fs.unlink(fdPath[1], _handler); + } + function _removeFileSync(fdPath) { + let rethrownException = null; + try { + if (0 <= fdPath[0]) fs.closeSync(fdPath[0]); + } catch (e) { + if (!_isEBADF(e) && !_isENOENT(e)) throw e; + } finally { + try { + fs.unlinkSync(fdPath[1]); + } catch (e) { + if (!_isENOENT(e)) rethrownException = e; + } + } + if (rethrownException !== null) { + throw rethrownException; + } + } + function _prepareTmpFileRemoveCallback(name, fd, opts, sync) { + const removeCallbackSync = _prepareRemoveCallback(_removeFileSync, [fd, name], sync); + const removeCallback = _prepareRemoveCallback(_removeFileAsync, [fd, name], sync, removeCallbackSync); + if (!opts.keep) _removeObjects.unshift(removeCallbackSync); + return sync ? removeCallbackSync : removeCallback; + } + function _prepareTmpDirRemoveCallback(name, opts, sync) { + const removeFunction = opts.unsafeCleanup ? rimraf : fs.rmdir.bind(fs); + const removeFunctionSync = opts.unsafeCleanup ? FN_RIMRAF_SYNC : FN_RMDIR_SYNC; + const removeCallbackSync = _prepareRemoveCallback(removeFunctionSync, name, sync); + const removeCallback = _prepareRemoveCallback(removeFunction, name, sync, removeCallbackSync); + if (!opts.keep) _removeObjects.unshift(removeCallbackSync); + return sync ? removeCallbackSync : removeCallback; + } + function _prepareRemoveCallback(removeFunction, fileOrDirName, sync, cleanupCallbackSync) { + let called = false; + return function _cleanupCallback(next) { + if (!called) { + const toRemove = cleanupCallbackSync || _cleanupCallback; + const index = _removeObjects.indexOf(toRemove); + if (index >= 0) _removeObjects.splice(index, 1); + called = true; + if (sync || removeFunction === FN_RMDIR_SYNC || removeFunction === FN_RIMRAF_SYNC) { + return removeFunction(fileOrDirName); + } else { + return removeFunction(fileOrDirName, next || function() { + }); + } + } + }; + } + function _garbageCollector() { + if (!_gracefulCleanup) return; + while (_removeObjects.length) { + try { + _removeObjects[0](); + } catch (e) { + } + } + } + function _randomChars(howMany) { + let value = [], rnd = null; + try { + rnd = crypto5.randomBytes(howMany); + } catch (e) { + rnd = crypto5.pseudoRandomBytes(howMany); + } + for (let i = 0; i < howMany; i++) { + value.push(RANDOM_CHARS[rnd[i] % RANDOM_CHARS.length]); + } + return value.join(""); + } + function _isUndefined(obj2) { + return typeof obj2 === "undefined"; + } + function _parseArguments(options, callback) { + if (typeof options === "function") { + return [{}, options]; + } + if (_isUndefined(options)) { + return [{}, callback]; + } + const actualOptions = {}; + for (const key of Object.getOwnPropertyNames(options)) { + actualOptions[key] = options[key]; + } + return [actualOptions, callback]; + } + function _resolvePath(name, tmpDir, cb) { + const pathToResolve = path.isAbsolute(name) ? name : path.join(tmpDir, name); + fs.stat(pathToResolve, function(err) { + if (err) { + fs.realpath(path.dirname(pathToResolve), function(err2, parentDir) { + if (err2) return cb(err2); + cb(null, path.join(parentDir, path.basename(pathToResolve))); + }); + } else { + fs.realpath(pathToResolve, cb); + } + }); + } + function _resolvePathSync(name, tmpDir) { + const pathToResolve = path.isAbsolute(name) ? name : path.join(tmpDir, name); + try { + fs.statSync(pathToResolve); + return fs.realpathSync(pathToResolve); + } catch (_err) { + const parentDir = fs.realpathSync(path.dirname(pathToResolve)); + return path.join(parentDir, path.basename(pathToResolve)); + } + } + function _generateTmpName(opts) { + const tmpDir = opts.tmpdir; + if (!_isUndefined(opts.name)) { + return path.join(tmpDir, opts.dir, opts.name); + } + if (!_isUndefined(opts.template)) { + return path.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6)); + } + const name = [ + opts.prefix ? opts.prefix : "tmp", + "-", + process.pid, + "-", + _randomChars(12), + opts.postfix ? "-" + opts.postfix : "" + ].join(""); + return path.join(tmpDir, opts.dir, name); + } + function _assertPath(option, value) { + if (typeof value !== "string") { + throw new Error(`${option} option must be a string, got "${typeof value}".`); + } + if (value.includes("..")) { + throw new Error("Relative value not allowed"); + } + return value; + } + function _assertOptionsBase(options) { + if (!_isUndefined(options.name)) { + const name = options.name; + if (path.isAbsolute(name)) throw new Error(`name option must not contain an absolute path, found "${name}".`); + const basename = path.basename(name); + if (basename === ".." || basename === "." || basename !== name) { + throw new Error(`name option must not contain a path, found "${name}".`); + } + } + if (!_isUndefined(options.template)) { + if (typeof options.template !== "string") { + throw new Error(`template option must be a string, got "${typeof options.template}".`); + } + if (!options.template.match(TEMPLATE_PATTERN)) { + throw new Error(`Invalid template, found "${options.template}".`); + } + } + if (!_isUndefined(options.tries) && isNaN(options.tries) || options.tries < 0) { + throw new Error(`Invalid tries, found "${options.tries}".`); + } + options.tries = _isUndefined(options.name) ? options.tries || DEFAULT_TRIES : 1; + options.keep = !!options.keep; + options.detachDescriptor = !!options.detachDescriptor; + options.discardDescriptor = !!options.discardDescriptor; + options.unsafeCleanup = !!options.unsafeCleanup; + options.prefix = _isUndefined(options.prefix) ? "" : _assertPath("prefix", options.prefix); + options.postfix = _isUndefined(options.postfix) ? "" : _assertPath("postfix", options.postfix); + options.template = _isUndefined(options.template) ? void 0 : _assertPath("template", options.template); + } + function _getRelativePath(option, name, tmpDir, cb) { + if (_isUndefined(name)) return cb(null); + _resolvePath(name, tmpDir, function(err, resolvedPath) { + if (err) return cb(err); + const relativePath = path.relative(tmpDir, resolvedPath); + if (relativePath.startsWith("..") || path.isAbsolute(relativePath)) { + return cb(new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`)); + } + cb(null, relativePath); + }); + } + function _getRelativePathSync(option, name, tmpDir) { + if (_isUndefined(name)) return; + const resolvedPath = _resolvePathSync(name, tmpDir); + const relativePath = path.relative(tmpDir, resolvedPath); + if (relativePath.startsWith("..") || path.isAbsolute(relativePath)) { + throw new Error(`${option} option must be relative to "${tmpDir}", found "${relativePath}".`); + } + return relativePath; + } + function _assertAndSanitizeOptions(options, cb) { + _getTmpDir(options, function(err, tmpDir) { + if (err) return cb(err); + options.tmpdir = tmpDir; + try { + _assertOptionsBase(options, tmpDir); + } catch (err2) { + return cb(err2); + } + _getRelativePath("dir", options.dir, tmpDir, function(err2, dir2) { + if (err2) return cb(err2); + options.dir = _isUndefined(dir2) ? "" : dir2; + _getRelativePath("template", options.template, tmpDir, function(err3, template) { + if (err3) return cb(err3); + options.template = template; + cb(null, options); + }); + }); + }); + } + function _assertAndSanitizeOptionsSync(options) { + const tmpDir = options.tmpdir = _getTmpDirSync(options); + _assertOptionsBase(options, tmpDir); + const dir2 = _getRelativePathSync("dir", options.dir, tmpDir); + options.dir = _isUndefined(dir2) ? "" : dir2; + options.template = _getRelativePathSync("template", options.template, tmpDir); + return options; + } + function _isEBADF(error) { + return _isExpectedError(error, -EBADF, "EBADF"); + } + function _isENOENT(error) { + return _isExpectedError(error, -ENOENT, "ENOENT"); + } + function _isExpectedError(error, errno, code) { + return IS_WIN32 ? error.code === code : error.code === code && error.errno === errno; + } + function setGracefulCleanup() { + _gracefulCleanup = true; + } + function _getTmpDir(options, cb) { + return fs.realpath(options && options.tmpdir || os.tmpdir(), cb); + } + function _getTmpDirSync(options) { + return fs.realpathSync(options && options.tmpdir || os.tmpdir()); + } + process.addListener(EXIT, _garbageCollector); + Object.defineProperty(module2.exports, "tmpdir", { + enumerable: true, + configurable: false, + get: function() { + return _getTmpDirSync(); + } + }); + module2.exports.dir = dir; + module2.exports.dirSync = dirSync; + module2.exports.file = file2; + module2.exports.fileSync = fileSync; + module2.exports.tmpName = tmpName; + module2.exports.tmpNameSync = tmpNameSync; + module2.exports.setGracefulCleanup = setGracefulCleanup; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/iterate-stream.js +var require_iterate_stream = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/utils/iterate-stream.js"(exports2, module2) { + module2.exports = async function* iterateStream(stream) { + const contents = []; + stream.on("data", (data) => contents.push(data)); + let resolveStreamEndedPromise; + const streamEndedPromise = new Promise((resolve) => resolveStreamEndedPromise = resolve); + let ended = false; + stream.on("end", () => { + ended = true; + resolveStreamEndedPromise(); + }); + let error = false; + stream.on("error", (err) => { + error = err; + resolveStreamEndedPromise(); + }); + while (!ended || contents.length > 0) { + if (contents.length === 0) { + stream.resume(); + await Promise.race([once(stream, "data"), streamEndedPromise]); + } else { + stream.pause(); + const data = contents.shift(); + yield data; + } + if (error) throw error; + } + resolveStreamEndedPromise(); + }; + function once(eventEmitter, type) { + return new Promise((resolve) => { + let fired = false; + const handler = () => { + if (!fired) { + fired = true; + eventEmitter.removeListener(type, handler); + resolve(); + } + }; + eventEmitter.addListener(type, handler); + }); + } + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/stream/xlsx/worksheet-reader.js +var require_worksheet_reader = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/stream/xlsx/worksheet-reader.js"(exports2, module2) { + var { EventEmitter } = require("events"); + var parseSax = require_parse_sax(); + var _2 = require_under_dash(); + var utils = require_utils13(); + var colCache = require_col_cache(); + var Dimensions = require_range4(); + var Row = require_row(); + var Column = require_column(); + var WorksheetReader = class extends EventEmitter { + constructor({ workbook, id, iterator, options }) { + super(); + this.workbook = workbook; + this.id = id; + this.iterator = iterator; + this.options = options || {}; + this.name = `Sheet${this.id}`; + this._columns = null; + this._keys = {}; + this._dimensions = new Dimensions(); + } + // destroy - not a valid operation for a streaming writer + // even though some streamers might be able to, it's a bad idea. + destroy() { + throw new Error("Invalid Operation: destroy"); + } + // return the current dimensions of the writer + get dimensions() { + return this._dimensions; + } + // ========================================================================= + // Columns + // get the current columns array. + get columns() { + return this._columns; + } + // get a single column by col number. If it doesn't exist, it and any gaps before it + // are created. + getColumn(c) { + if (typeof c === "string") { + const col = this._keys[c]; + if (col) { + return col; + } + c = colCache.l2n(c); + } + if (!this._columns) { + this._columns = []; + } + if (c > this._columns.length) { + let n = this._columns.length + 1; + while (n <= c) { + this._columns.push(new Column(this, n++)); + } + } + return this._columns[c - 1]; + } + getColumnKey(key) { + return this._keys[key]; + } + setColumnKey(key, value) { + this._keys[key] = value; + } + deleteColumnKey(key) { + delete this._keys[key]; + } + eachColumnKey(f) { + _2.each(this._keys, f); + } + async read() { + try { + for await (const events of this.parse()) { + for (const { eventType, value } of events) { + this.emit(eventType, value); + } + } + this.emit("finished"); + } catch (error) { + this.emit("error", error); + } + } + async *[Symbol.asyncIterator]() { + for await (const events of this.parse()) { + for (const { eventType, value } of events) { + if (eventType === "row") { + yield value; + } + } + } + } + async *parse() { + const { iterator, options } = this; + let emitSheet = false; + let emitHyperlinks = false; + let hyperlinks = null; + switch (options.worksheets) { + case "emit": + emitSheet = true; + break; + case "prep": + break; + default: + break; + } + switch (options.hyperlinks) { + case "emit": + emitHyperlinks = true; + break; + case "cache": + this.hyperlinks = hyperlinks = {}; + break; + default: + break; + } + if (!emitSheet && !emitHyperlinks && !hyperlinks) { + return; + } + const { sharedStrings, styles, properties } = this.workbook; + let inCols = false; + let inRows = false; + let inHyperlinks = false; + let cols = null; + let row = null; + let c = null; + let current = null; + for await (const events of parseSax(iterator)) { + const worksheetEvents = []; + for (const { eventType, value } of events) { + if (eventType === "opentag") { + const node = value; + if (emitSheet) { + switch (node.name) { + case "cols": + inCols = true; + cols = []; + break; + case "sheetData": + inRows = true; + break; + case "col": + if (inCols) { + cols.push({ + min: parseInt(node.attributes.min, 10), + max: parseInt(node.attributes.max, 10), + width: parseFloat(node.attributes.width), + styleId: parseInt(node.attributes.style || "0", 10) + }); + } + break; + case "row": + if (inRows) { + const r = parseInt(node.attributes.r, 10); + row = new Row(this, r); + if (node.attributes.ht) { + row.height = parseFloat(node.attributes.ht); + } + if (node.attributes.s) { + const styleId = parseInt(node.attributes.s, 10); + const style = styles.getStyleModel(styleId); + if (style) { + row.style = style; + } + } + } + break; + case "c": + if (row) { + c = { + ref: node.attributes.r, + s: parseInt(node.attributes.s, 10), + t: node.attributes.t + }; + } + break; + case "f": + if (c) { + current = c.f = { text: "" }; + } + break; + case "v": + if (c) { + current = c.v = { text: "" }; + } + break; + case "is": + case "t": + if (c) { + current = c.v = { text: "" }; + } + break; + case "mergeCell": + break; + default: + break; + } + } + if (emitHyperlinks || hyperlinks) { + switch (node.name) { + case "hyperlinks": + inHyperlinks = true; + break; + case "hyperlink": + if (inHyperlinks) { + const hyperlink = { + ref: node.attributes.ref, + rId: node.attributes["r:id"] + }; + if (emitHyperlinks) { + worksheetEvents.push({ eventType: "hyperlink", value: hyperlink }); + } else { + hyperlinks[hyperlink.ref] = hyperlink; + } + } + break; + default: + break; + } + } + } else if (eventType === "text") { + if (emitSheet) { + if (current) { + current.text += value; + } + } + } else if (eventType === "closetag") { + const node = value; + if (emitSheet) { + switch (node.name) { + case "cols": + inCols = false; + this._columns = Column.fromModel(cols); + break; + case "sheetData": + inRows = false; + break; + case "row": + this._dimensions.expandRow(row); + worksheetEvents.push({ eventType: "row", value: row }); + row = null; + break; + case "c": + if (row && c) { + const address = colCache.decodeAddress(c.ref); + const cell = row.getCell(address.col); + if (c.s) { + const style = styles.getStyleModel(c.s); + if (style) { + cell.style = style; + } + } + if (c.f) { + const cellValue = { + formula: c.f.text + }; + if (c.v) { + if (c.t === "str") { + cellValue.result = utils.xmlDecode(c.v.text); + } else { + cellValue.result = parseFloat(c.v.text); + } + } + cell.value = cellValue; + } else if (c.v) { + switch (c.t) { + case "s": { + const index = parseInt(c.v.text, 10); + if (sharedStrings) { + cell.value = sharedStrings[index]; + } else { + cell.value = { + sharedString: index + }; + } + break; + } + case "inlineStr": + case "str": + cell.value = utils.xmlDecode(c.v.text); + break; + case "e": + cell.value = { error: c.v.text }; + break; + case "b": + cell.value = parseInt(c.v.text, 10) !== 0; + break; + default: + if (utils.isDateFmt(cell.numFmt)) { + cell.value = utils.excelToDate( + parseFloat(c.v.text), + properties.model && properties.model.date1904 + ); + } else { + cell.value = parseFloat(c.v.text); + } + break; + } + } + if (hyperlinks) { + const hyperlink = hyperlinks[c.ref]; + if (hyperlink) { + cell.text = cell.value; + cell.value = void 0; + cell.hyperlink = hyperlink; + } + } + c = null; + } + break; + default: + break; + } + } + if (emitHyperlinks || hyperlinks) { + switch (node.name) { + case "hyperlinks": + inHyperlinks = false; + break; + default: + break; + } + } + } + } + if (worksheetEvents.length > 0) { + yield worksheetEvents; + } + } + } + }; + module2.exports = WorksheetReader; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/stream/xlsx/hyperlink-reader.js +var require_hyperlink_reader = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/stream/xlsx/hyperlink-reader.js"(exports2, module2) { + var { EventEmitter } = require("events"); + var parseSax = require_parse_sax(); + var Enums = require_enums3(); + var RelType = require_rel_type(); + var HyperlinkReader = class extends EventEmitter { + constructor({ workbook, id, iterator, options }) { + super(); + this.workbook = workbook; + this.id = id; + this.iterator = iterator; + this.options = options; + } + get count() { + return this.hyperlinks && this.hyperlinks.length || 0; + } + each(fn) { + return this.hyperlinks.forEach(fn); + } + async read() { + const { iterator, options } = this; + let emitHyperlinks = false; + let hyperlinks = null; + switch (options.hyperlinks) { + case "emit": + emitHyperlinks = true; + break; + case "cache": + this.hyperlinks = hyperlinks = {}; + break; + default: + break; + } + if (!emitHyperlinks && !hyperlinks) { + this.emit("finished"); + return; + } + try { + for await (const events of parseSax(iterator)) { + for (const { eventType, value } of events) { + if (eventType === "opentag") { + const node = value; + if (node.name === "Relationship") { + const rId = node.attributes.Id; + switch (node.attributes.Type) { + case RelType.Hyperlink: + { + const relationship = { + type: Enums.RelationshipType.Styles, + rId, + target: node.attributes.Target, + targetMode: node.attributes.TargetMode + }; + if (emitHyperlinks) { + this.emit("hyperlink", relationship); + } else { + hyperlinks[relationship.rId] = relationship; + } + } + break; + default: + break; + } + } + } + } + } + this.emit("finished"); + } catch (error) { + this.emit("error", error); + } + } + }; + module2.exports = HyperlinkReader; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/stream/xlsx/workbook-reader.js +var require_workbook_reader = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/stream/xlsx/workbook-reader.js"(exports2, module2) { + var fs = require("fs"); + var { EventEmitter } = require("events"); + var { PassThrough, Readable } = require_readable(); + var nodeStream = require("stream"); + var unzip = require_unzip2(); + var tmp = require_tmp(); + var iterateStream = require_iterate_stream(); + var parseSax = require_parse_sax(); + var StyleManager = require_styles_xform(); + var WorkbookXform = require_workbook_xform(); + var RelationshipsXform = require_relationships_xform(); + var WorksheetReader = require_worksheet_reader(); + var HyperlinkReader = require_hyperlink_reader(); + tmp.setGracefulCleanup(); + var WorkbookReader = class extends EventEmitter { + constructor(input, options = {}) { + super(); + this.input = input; + this.options = { + worksheets: "emit", + sharedStrings: "cache", + hyperlinks: "ignore", + styles: "ignore", + entries: "ignore", + ...options + }; + this.styles = new StyleManager(); + this.styles.init(); + } + _getStream(input) { + if (input instanceof nodeStream.Readable || input instanceof Readable) { + return input; + } + if (typeof input === "string") { + return fs.createReadStream(input); + } + throw new Error(`Could not recognise input: ${input}`); + } + async read(input, options) { + try { + for await (const { eventType, value } of this.parse(input, options)) { + switch (eventType) { + case "shared-strings": + this.emit(eventType, value); + break; + case "worksheet": + this.emit(eventType, value); + await value.read(); + break; + case "hyperlinks": + this.emit(eventType, value); + break; + } + } + this.emit("end"); + this.emit("finished"); + } catch (error) { + this.emit("error", error); + } + } + async *[Symbol.asyncIterator]() { + for await (const { eventType, value } of this.parse()) { + if (eventType === "worksheet") { + yield value; + } + } + } + async *parse(input, options) { + if (options) this.options = options; + const stream = this.stream = this._getStream(input || this.input); + const zip = unzip.Parse({ forceStream: true }); + stream.pipe(zip); + const waitingWorkSheets = []; + for await (const entry of iterateStream(zip)) { + let match; + let sheetNo; + switch (entry.path) { + case "_rels/.rels": + break; + case "xl/_rels/workbook.xml.rels": + await this._parseRels(entry); + break; + case "xl/workbook.xml": + await this._parseWorkbook(entry); + break; + case "xl/sharedStrings.xml": + yield* this._parseSharedStrings(entry); + break; + case "xl/styles.xml": + await this._parseStyles(entry); + break; + default: + if (entry.path.match(/xl\/worksheets\/sheet\d+[.]xml/)) { + match = entry.path.match(/xl\/worksheets\/sheet(\d+)[.]xml/); + sheetNo = match[1]; + if (this.sharedStrings && this.workbookRels) { + yield* this._parseWorksheet(iterateStream(entry), sheetNo); + } else { + await new Promise((resolve, reject) => { + tmp.file((err, path, fd, tempFileCleanupCallback) => { + if (err) { + return reject(err); + } + waitingWorkSheets.push({ sheetNo, path, tempFileCleanupCallback }); + const tempStream = fs.createWriteStream(path); + tempStream.on("error", reject); + entry.pipe(tempStream); + return tempStream.on("finish", () => { + return resolve(); + }); + }); + }); + } + } else if (entry.path.match(/xl\/worksheets\/_rels\/sheet\d+[.]xml.rels/)) { + match = entry.path.match(/xl\/worksheets\/_rels\/sheet(\d+)[.]xml.rels/); + sheetNo = match[1]; + yield* this._parseHyperlinks(iterateStream(entry), sheetNo); + } + break; + } + entry.autodrain(); + } + for (const { sheetNo, path, tempFileCleanupCallback } of waitingWorkSheets) { + let fileStream = fs.createReadStream(path); + if (!fileStream[Symbol.asyncIterator]) { + fileStream = fileStream.pipe(new PassThrough()); + } + yield* this._parseWorksheet(fileStream, sheetNo); + tempFileCleanupCallback(); + } + } + _emitEntry(payload) { + if (this.options.entries === "emit") { + this.emit("entry", payload); + } + } + async _parseRels(entry) { + const xform = new RelationshipsXform(); + this.workbookRels = await xform.parseStream(iterateStream(entry)); + } + async _parseWorkbook(entry) { + this._emitEntry({ type: "workbook" }); + const workbook = new WorkbookXform(); + await workbook.parseStream(iterateStream(entry)); + this.properties = workbook.map.workbookPr; + this.model = workbook.model; + } + async *_parseSharedStrings(entry) { + this._emitEntry({ type: "shared-strings" }); + switch (this.options.sharedStrings) { + case "cache": + this.sharedStrings = []; + break; + case "emit": + break; + default: + return; + } + let text = null; + let richText = []; + let index = 0; + let font = null; + for await (const events of parseSax(iterateStream(entry))) { + for (const { eventType, value } of events) { + if (eventType === "opentag") { + const node = value; + switch (node.name) { + case "b": + font = font || {}; + font.bold = true; + break; + case "charset": + font = font || {}; + font.charset = parseInt(node.attributes.charset, 10); + break; + case "color": + font = font || {}; + font.color = {}; + if (node.attributes.rgb) { + font.color.argb = node.attributes.argb; + } + if (node.attributes.val) { + font.color.argb = node.attributes.val; + } + if (node.attributes.theme) { + font.color.theme = node.attributes.theme; + } + break; + case "family": + font = font || {}; + font.family = parseInt(node.attributes.val, 10); + break; + case "i": + font = font || {}; + font.italic = true; + break; + case "outline": + font = font || {}; + font.outline = true; + break; + case "rFont": + font = font || {}; + font.name = node.value; + break; + case "si": + font = null; + richText = []; + text = null; + break; + case "sz": + font = font || {}; + font.size = parseInt(node.attributes.val, 10); + break; + case "strike": + break; + case "t": + text = null; + break; + case "u": + font = font || {}; + font.underline = true; + break; + case "vertAlign": + font = font || {}; + font.vertAlign = node.attributes.val; + break; + } + } else if (eventType === "text") { + text = text ? text + value : value; + } else if (eventType === "closetag") { + const node = value; + switch (node.name) { + case "r": + richText.push({ + font, + text + }); + font = null; + text = null; + break; + case "si": + if (this.options.sharedStrings === "cache") { + this.sharedStrings.push(richText.length ? { richText } : text); + } else if (this.options.sharedStrings === "emit") { + yield { index: index++, text: richText.length ? { richText } : text }; + } + richText = []; + font = null; + text = null; + break; + } + } + } + } + } + async _parseStyles(entry) { + this._emitEntry({ type: "styles" }); + if (this.options.styles === "cache") { + this.styles = new StyleManager(); + await this.styles.parseStream(iterateStream(entry)); + } + } + *_parseWorksheet(iterator, sheetNo) { + this._emitEntry({ type: "worksheet", id: sheetNo }); + const worksheetReader = new WorksheetReader({ + workbook: this, + id: sheetNo, + iterator, + options: this.options + }); + const matchingRel = (this.workbookRels || []).find((rel) => rel.Target === `worksheets/sheet${sheetNo}.xml`); + const matchingSheet = matchingRel && (this.model.sheets || []).find((sheet) => sheet.rId === matchingRel.Id); + if (matchingSheet) { + worksheetReader.id = matchingSheet.id; + worksheetReader.name = matchingSheet.name; + worksheetReader.state = matchingSheet.state; + } + if (this.options.worksheets === "emit") { + yield { eventType: "worksheet", value: worksheetReader }; + } + } + *_parseHyperlinks(iterator, sheetNo) { + this._emitEntry({ type: "hyperlinks", id: sheetNo }); + const hyperlinksReader = new HyperlinkReader({ + workbook: this, + id: sheetNo, + iterator, + options: this.options + }); + if (this.options.hyperlinks === "emit") { + yield { eventType: "hyperlinks", value: hyperlinksReader }; + } + } + }; + WorkbookReader.Options = { + worksheets: ["emit", "ignore"], + sharedStrings: ["cache", "emit", "ignore"], + hyperlinks: ["cache", "emit", "ignore"], + styles: ["cache", "ignore"], + entries: ["emit", "ignore"] + }; + module2.exports = WorkbookReader; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/exceljs.nodejs.js +var require_exceljs_nodejs = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/lib/exceljs.nodejs.js"(exports2, module2) { + var ExcelJS = { + Workbook: require_workbook(), + ModelContainer: require_modelcontainer(), + stream: { + xlsx: { + WorkbookWriter: require_workbook_writer(), + WorkbookReader: require_workbook_reader() + } + } + }; + Object.assign(ExcelJS, require_enums3()); + module2.exports = ExcelJS; + } +}); + +// ../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/excel.js +var require_excel = __commonJS({ + "../../node_modules/.pnpm/exceljs@4.4.0/node_modules/exceljs/excel.js"(exports2, module2) { + if (parseInt(process.versions.node.split(".")[0], 10) < 10) { + throw new Error( + "For node versions older than 10, please use the ES5 Import: https://github.com/exceljs/exceljs#es5-imports" + ); + } + module2.exports = require_exceljs_nodejs(); + } +}); + +// dist/modules/admin-report/admin-report.service.js +var require_admin_report_service = __commonJS({ + "dist/modules/admin-report/admin-report.service.js"(exports2) { + "use strict"; + var __createBinding2 = exports2 && exports2.__createBinding || (Object.create ? (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { + return m[k]; + } }; + } + Object.defineProperty(o, k2, desc); + }) : (function(o, m, k, k2) { + if (k2 === void 0) k2 = k; + o[k2] = m[k]; + })); + var __setModuleDefault2 = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o, v) { + Object.defineProperty(o, "default", { enumerable: true, value: v }); + }) : function(o, v) { + o["default"] = v; + }); + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __importStar2 = exports2 && exports2.__importStar || /* @__PURE__ */ (function() { + var ownKeys2 = function(o) { + ownKeys2 = Object.getOwnPropertyNames || function(o2) { + var ar = []; + for (var k in o2) if (Object.prototype.hasOwnProperty.call(o2, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys2(o); + }; + return function(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) { + for (var k = ownKeys2(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding2(result, mod, k[i]); + } + __setModuleDefault2(result, mod); + return result; + }; + })(); + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AdminReportService = void 0; + var common_12 = require_common(); + var client_1 = require("@prisma/client"); + var prisma_service_1 = require_prisma_service(); + var jalali_1 = require_jalali(); + var ExcelJS = __importStar2(require_excel()); + var TYPE_LABELS = { + REPAYMENT_MELTED_GOLD: "\u0622\u0628 \u0634\u062F\u0647", + REPAYMENT_TRANSFER: "\u062D\u0648\u0627\u0644\u0647", + REPAYMENT_CHEQUE: "\u0686\u06A9", + REPAYMENT_CASH: "\u067E\u0648\u0644\u06CC" + }; + var REPAYMENT_TYPES = [ + client_1.LedgerSourceType.REPAYMENT_MELTED_GOLD, + client_1.LedgerSourceType.REPAYMENT_TRANSFER, + client_1.LedgerSourceType.REPAYMENT_CHEQUE, + client_1.LedgerSourceType.REPAYMENT_CASH + ]; + var HEADERS = [ + "\u06A9\u062F \u0622\u06CC\u062A\u0645", + "\u0646\u0627\u0645 \u0645\u062D\u0635\u0648\u0644", + "\u06A9\u062F \u0645\u062D\u0635\u0648\u0644", + "\u0639\u0646\u0648\u0627\u0646 \u062A\u0646\u0648\u0639", + "\u0648\u0632\u0646 \u062E\u0627\u0645 \u062A\u062D\u0648\u06CC\u0644 \u0645\u0634\u062A\u0631\u06CC", + "\u0648\u0632\u0646 \u0646\u0647\u0627\u06CC\u06CC \u0628\u0627 \u062F\u0631\u0635\u062F", + "\u062A\u0639\u062F\u0627\u062F", + "\u062F\u0631\u0635\u062F", + "\u0627\u062C\u0631\u062A \u0631\u06CC\u0627\u0644\u06CC", + "\u062A\u0648\u0636\u06CC\u062D\u0627\u062A", + "\u0634\u0645\u0627\u0631\u0647 \u0633\u0641\u0627\u0631\u0634", + "\u062A\u0627\u0631\u06CC\u062E \u062B\u0628\u062A", + "\u062A\u0627\u0631\u06CC\u062E", + "\u0633\u0627\u0644", + "\u0645\u0627\u0647", + "\u0631\u0648\u0632", + "\u0633\u0627\u0639\u062A", + "\u0634\u0645\u0627\u0631\u0647 \u0633\u0646\u062F", + "\u0646\u0648\u0639 \u0633\u0646\u062F", + "\u0645\u06CC\u0632\u0627\u0646 \u067E\u0648\u0644", + "\u0645\u06CC\u0632\u0627\u0646 \u06AF\u0631\u0645", + "\u0648\u0636\u0639\u06CC\u062A \u0633\u0646\u062F", + "\u0646\u0627\u0645 \u0645\u0634\u062A\u0631\u06CC", + "\u0646\u0627\u0645 \u062E\u0627\u0646\u0648\u0627\u062F\u06AF\u06CC \u0645\u0634\u062A\u0631\u06CC", + "\u0646\u0627\u0645 \u0648 \u0646\u0627\u0645 \u062E\u0627\u0646\u0648\u0627\u062F\u06AF\u06CC \u0645\u0634\u062A\u0631\u06CC", + "\u06A9\u0627\u0631\u0634\u0646\u0627\u0633 \u0641\u0631\u0648\u0634", + "\u0634\u0645\u0627\u0631\u0647 \u0645\u0648\u0628\u0627\u06CC\u0644 \u0645\u0634\u062A\u0631\u06CC", + "\u0622\u062F\u0631\u0633", + "\u062A\u0644\u0641\u0646 \u0645\u063A\u0627\u0632\u0647", + "\u0628\u062F\u0647\u06A9\u0627\u0631", + "\u0628\u0633\u062A\u0627\u0646\u06A9\u0627\u0631", + "\u0628\u062F\u0647\u06CC \u0631\u06CC\u0627\u0644\u06CC" + ]; + var AdminReportService = class AdminReportService { + prisma; + constructor(prisma) { + this.prisma = prisma; + } + async getOrderItemReport(startDate, endDate) { + const dateFilter = {}; + if (startDate) + dateFilter.gte = parseDate(startDate, "\u0627\u0632 \u062A\u0627\u0631\u06CC\u062E"); + if (endDate) { + const end = parseDate(endDate, "\u062A\u0627 \u062A\u0627\u0631\u06CC\u062E"); + end.setHours(23, 59, 59, 999); + dateFilter.lte = end; + } + const hasDateFilter = startDate || endDate; + const orderItems = await this.prisma.orderItem.findMany({ + where: hasDateFilter ? { order: { createdAt: dateFilter } } : void 0, + orderBy: { id: "desc" }, + include: { + order: { + include: { + customer: true, + salesAgent: true + } + }, + productVariant: { include: { product: true } } + } + }); + const ledgerEntries = await this.prisma.ledgerEntry.findMany({ + where: { + sourceType: { in: REPAYMENT_TYPES }, + ...hasDateFilter ? { createdAt: dateFilter } : {} + }, + include: { customer: true } + }); + const wb = new ExcelJS.Workbook(); + const ws = wb.addWorksheet("\u06AF\u0632\u0627\u0631\u0634", { + views: [{ rightToLeft: true }] + }); + ws.columns = HEADERS.map((h) => ({ header: h, width: 18 })); + for (const item of orderItems) { + const order = item.order; + const customer = order.customer; + const jalali = (0, jalali_1.toJalali)(order.createdAt); + const jalaliStr = (0, jalali_1.formatJalali)(jalali, "/"); + const hour = new Date(order.createdAt.getTime() + 3.5 * 60 * 60 * 1e3).toISOString().slice(11, 16); + const perUnitWeight = Number(item.computedWeightGrams); + const finalPercent = Number(item.wagePercentSnapshot.sub(item.discountPercentSnapshot)); + for (let i = 0; i < item.quantity; i++) { + ws.addRow([ + item.id, + item.productVariant?.product?.title ?? "", + item.productVariant?.product?.productCode ?? "", + item.productVariant?.title ?? "", + Number(item.rashWeightGramsSnapshot), + round4(perUnitWeight), + 1, + finalPercent, + Number(item.flatRialCharge), + "", + order.orderNumber, + jalaliStr, + jalaliStr, + jalali.jy, + jalali.jm, + jalali.jd, + hour, + null, + null, + null, + null, + null, + customer.firstName ?? "", + customer.lastName ?? "", + customer.fullName, + order.salesAgent?.fullName ?? "", + customer.mobile, + customer.address ?? "", + customer.phone ?? "", + round4(perUnitWeight), + 0, + Number(item.flatRialCharge) + ]); + } + } + for (const entry of ledgerEntries) { + const customer = entry.customer; + const jalali = (0, jalali_1.toJalali)(entry.createdAt); + const jalaliStr = (0, jalali_1.formatJalali)(jalali, "/"); + const hour = new Date(entry.createdAt.getTime() + 3.5 * 60 * 60 * 1e3).toISOString().slice(11, 16); + const isCashOrCheque = entry.sourceType === client_1.LedgerSourceType.REPAYMENT_CASH || entry.sourceType === client_1.LedgerSourceType.REPAYMENT_CHEQUE; + const rialAmount = isCashOrCheque ? Number(entry.priceRial ?? 0) : 0; + const gramAmount = !isCashOrCheque ? Number(entry.amount) : 0; + ws.addRow([ + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + entry.orderId ?? "", + jalaliStr, + jalaliStr, + jalali.jy, + jalali.jm, + jalali.jd, + hour, + entry.id, + TYPE_LABELS[entry.sourceType] ?? "", + rialAmount, + gramAmount, + entry.confirmed ? "\u062A\u0627\u06CC\u06CC\u062F \u0634\u062F\u0647" : "\u062A\u0627\u06CC\u06CC\u062F \u0646\u0634\u062F\u0647", + customer.firstName ?? "", + customer.lastName ?? "", + customer.fullName, + null, + customer.mobile, + customer.address ?? "", + customer.phone ?? "", + 0, + gramAmount, + 0 + ]); + } + const buffer = await wb.xlsx.writeBuffer(); + return new common_12.StreamableFile(Buffer.from(buffer), { + type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", + disposition: 'attachment; filename="report.xlsx"' + }); + } + }; + exports2.AdminReportService = AdminReportService; + exports2.AdminReportService = AdminReportService = __decorate4([ + (0, common_12.Injectable)(), + __metadata3("design:paramtypes", [prisma_service_1.PrismaService]) + ], AdminReportService); + function parseDate(v, field) { + const d = new Date(v); + if (Number.isNaN(d.getTime())) + throw new common_12.BadRequestException(`${field}: \u062A\u0627\u0631\u06CC\u062E \u0645\u0639\u062A\u0628\u0631 \u0646\u06CC\u0633\u062A`); + return d; + } + function round4(n) { + return Math.round(n * 1e4) / 1e4; + } + } +}); + +// dist/modules/admin-report/admin-report.controller.js +var require_admin_report_controller = __commonJS({ + "dist/modules/admin-report/admin-report.controller.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param3 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AdminReportController = void 0; + var common_12 = require_common(); + var admin_report_service_1 = require_admin_report_service(); + var guards_1 = require_guards2(); + var AdminReportController = class AdminReportController { + report; + constructor(report) { + this.report = report; + } + getOrderItemReport(startDate, endDate) { + return this.report.getOrderItemReport(startDate, endDate); + } + }; + exports2.AdminReportController = AdminReportController; + __decorate4([ + (0, common_12.Get)("order-items"), + (0, guards_1.RequirePermission)("report.order.item"), + __param3(0, (0, common_12.Query)("start_date")), + __param3(1, (0, common_12.Query)("end_date")), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [String, String]), + __metadata3("design:returntype", void 0) + ], AdminReportController.prototype, "getOrderItemReport", null); + exports2.AdminReportController = AdminReportController = __decorate4([ + (0, common_12.Controller)("admin/report"), + __metadata3("design:paramtypes", [admin_report_service_1.AdminReportService]) + ], AdminReportController); + } +}); + +// dist/modules/admin-report/admin-report.module.js +var require_admin_report_module = __commonJS({ + "dist/modules/admin-report/admin-report.module.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.AdminReportModule = void 0; + var common_12 = require_common(); + var prisma_module_1 = require_prisma_module(); + var admin_report_controller_1 = require_admin_report_controller(); + var admin_report_service_1 = require_admin_report_service(); + var AdminReportModule = class AdminReportModule { + }; + exports2.AdminReportModule = AdminReportModule; + exports2.AdminReportModule = AdminReportModule = __decorate4([ + (0, common_12.Module)({ + imports: [prisma_module_1.PrismaModule], + controllers: [admin_report_controller_1.AdminReportController], + providers: [admin_report_service_1.AdminReportService] + }) + ], AdminReportModule); + } +}); + +// dist/modules/sales-agent/sales-agent.service.js +var require_sales_agent_service = __commonJS({ + "dist/modules/sales-agent/sales-agent.service.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SalesAgentService = void 0; + var common_12 = require_common(); + var client_1 = require("@prisma/client"); + var prisma_service_1 = require_prisma_service(); + var agent_orders_1 = require_agent_orders(); + var SalesAgentService = class SalesAgentService { + prisma; + constructor(prisma) { + this.prisma = prisma; + } + /** + * Only a SALES_EXPERT may use these routes. Every other admin role — an + * accountant, a super admin — gets a clean 403 rather than a half-working + * dashboard, because none of the reads below mean anything for them. + */ + assertIsSalesExpert(admin) { + if (admin.role !== "SALES_EXPERT") { + throw new common_12.ForbiddenException("\u0627\u06CC\u0646 \u0628\u062E\u0634 \u062A\u0646\u0647\u0627 \u0628\u0631\u0627\u06CC \u06A9\u0627\u0631\u0634\u0646\u0627\u0633 \u0641\u0631\u0648\u0634 \u0627\u0633\u062A."); + } + } + /** + * Total gold sold, credited to this agent. + * + * Legacy kept this denormalised in `customers.grams_sell`, recomputed by + * `CustomerController::updateGramSell` as + * SUM(orders.input) WHERE customer_id = X OR reagent_id = X + * with NO order-status filter. Computed live here instead of denormalised; + * both arms are kept — see agent-orders.ts. + * + * Two deliberate fidelity notes: + * - The `OR customer_id = X` arm is the expert's trading account (D21): an + * AdminUser cannot own an Order, so their own orders sit on that Customer. + * - No status filter, matching legacy. The admin panel disagrees with itself + * here — `AdminCustomersService.listReagents` aggregates unfiltered while + * `reagentDetail` filters on the SOLD statuses — so this matches + * listReagents (the grid figure) and legacy. If those three are ever + * reconciled, this is the fourth call site. + */ + async gramsSoldFor(agentId) { + const agg = await this.prisma.order.aggregate({ + where: (0, agent_orders_1.agentSalesWhere)(agentId), + _sum: { totalGoldWeightGrams: true } + }); + return agg._sum.totalGoldWeightGrams ?? new client_1.Prisma.Decimal(0); + } + /** + * The agent's own profile card. Replaces the balance card the customer apps + * show for a real customer, which an agent has no data for. + */ + async me(admin) { + this.assertIsSalesExpert(admin); + const agent = await this.prisma.adminUser.findUnique({ + where: { id: admin.id }, + select: { + id: true, + fullName: true, + mobile: true, + wagePercent: true, + branch: { select: { id: true, name: true } }, + _count: { select: { referredCustomers: true } } + } + }); + if (!agent) + throw new common_12.NotFoundException("\u06A9\u0627\u0631\u0634\u0646\u0627\u0633 \u0641\u0631\u0648\u0634 \u06CC\u0627\u0641\u062A \u0646\u0634\u062F"); + return { + id: agent.id, + fullName: agent.fullName, + mobile: agent.mobile, + wagePercent: agent.wagePercent, + branch: agent.branch, + referredCustomerCount: agent._count.referredCustomers, + gramsSoldGrams: await this.gramsSoldFor(agent.id) + }; + } + /** + * The agent's referred customers — legacy `POST /my-child`. + * + * Search covers the same columns legacy's myChild did (name, mobile, phone, + * store_name, pasazh_name). + * + * NO isActive filter, deliberately: legacy had `Customer::active()` commented + * out on the line directly above the live query + * (ApiMobileController.php:187-188), and its picker renders a per-row + * activate/deactivate control, which only makes sense when inactive rows are + * listed. Archived customers are excluded though — legacy's own login path + * (WebApp\AuthController::userAuth) treats is_archive as disqualifying. + * + * The select is deliberately narrow. This is customer PII reached through an + * agent's token, so it carries only what the picker renders — no + * nationalCode, no passwordHash. + */ + async myCustomers(admin, search) { + this.assertIsSalesExpert(admin); + const term = search?.trim(); + const where = { + referredByAgentId: admin.id, + isArchived: false, + ...term ? { + OR: [ + { fullName: { contains: term, mode: "insensitive" } }, + { mobile: { contains: term } }, + { phone: { contains: term } }, + { storeName: { contains: term, mode: "insensitive" } }, + { pasazhName: { contains: term, mode: "insensitive" } } + ] + } : {} + }; + return this.prisma.customer.findMany({ + where, + orderBy: { createdAt: "desc" }, + select: { + id: true, + fullName: true, + mobile: true, + phone: true, + storeName: true, + address: true, + isActive: true, + goldDebtGrams: true, + fiatDebtRial: true + } + }); + } + /** + * Authorises entering "acting as this customer" mode and records it. + * + * The customer-facing endpoints are @Public() (a pre-existing condition — see + * customers.controller.ts), so this is not a hard security boundary: a + * determined caller could talk to those endpoints directly. What it does buy: + * + * 1. The SERVER decides who may be impersonated, for the legitimate flow — + * the client cannot widen its own book of business. + * 2. An audit row. Without it, staff could place gold-debt-incurring orders + * in a customer's name leaving no trace, which is not an acceptable + * property for a feature that writes to a ledger. Legacy had no such + * record; this is a deliberate improvement on the reference. + */ + async verifyActingAs(admin, customerId) { + this.assertIsSalesExpert(admin); + const customer = await this.prisma.customer.findUnique({ + where: { id: customerId }, + select: { id: true, fullName: true, referredByAgentId: true, isArchived: true } + }); + if (!customer || customer.isArchived || customer.referredByAgentId !== admin.id) { + throw new common_12.ForbiddenException("\u0627\u06CC\u0646 \u0645\u0634\u062A\u0631\u06CC \u062F\u0631 \u0641\u0647\u0631\u0633\u062A \u0634\u0645\u0627 \u0646\u06CC\u0633\u062A."); + } + await this.prisma.customerActivityLog.create({ + data: { + customerId: customer.id, + action: "agent.acting_as", + detail: `\u06A9\u0627\u0631\u0634\u0646\u0627\u0633 \u0641\u0631\u0648\u0634 ${admin.fullName} (${admin.id}) \u0628\u0647\u200C\u062C\u0627\u06CC \u0627\u06CC\u0646 \u0645\u0634\u062A\u0631\u06CC \u0648\u0627\u0631\u062F \u0634\u062F` + } + }); + return { id: customer.id, fullName: customer.fullName }; + } + }; + exports2.SalesAgentService = SalesAgentService; + exports2.SalesAgentService = SalesAgentService = __decorate4([ + (0, common_12.Injectable)(), + __metadata3("design:paramtypes", [prisma_service_1.PrismaService]) + ], SalesAgentService); + } +}); + +// dist/modules/sales-agent/sales-agent.controller.js +var require_sales_agent_controller = __commonJS({ + "dist/modules/sales-agent/sales-agent.controller.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + var __metadata3 = exports2 && exports2.__metadata || function(k, v) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); + }; + var __param3 = exports2 && exports2.__param || function(paramIndex, decorator) { + return function(target, key) { + decorator(target, key, paramIndex); + }; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SalesAgentController = void 0; + var common_12 = require_common(); + var sales_agent_service_1 = require_sales_agent_service(); + var guards_1 = require_guards2(); + var SalesAgentController = class SalesAgentController { + salesAgent; + constructor(salesAgent) { + this.salesAgent = salesAgent; + } + me(admin) { + return this.salesAgent.me(admin); + } + myCustomers(admin, search) { + return this.salesAgent.myCustomers(admin, search); + } + verifyActingAs(admin, body) { + return this.salesAgent.verifyActingAs(admin, body.customerId); + } + }; + exports2.SalesAgentController = SalesAgentController; + __decorate4([ + (0, common_12.Get)("me"), + __param3(0, (0, guards_1.CurrentAdmin)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object]), + __metadata3("design:returntype", void 0) + ], SalesAgentController.prototype, "me", null); + __decorate4([ + (0, common_12.Get)("my-customers"), + __param3(0, (0, guards_1.CurrentAdmin)()), + __param3(1, (0, common_12.Query)("search")), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object, String]), + __metadata3("design:returntype", void 0) + ], SalesAgentController.prototype, "myCustomers", null); + __decorate4([ + (0, common_12.Post)("verify-acting-as"), + (0, common_12.HttpCode)(200), + __param3(0, (0, guards_1.CurrentAdmin)()), + __param3(1, (0, common_12.Body)()), + __metadata3("design:type", Function), + __metadata3("design:paramtypes", [Object, Object]), + __metadata3("design:returntype", void 0) + ], SalesAgentController.prototype, "verifyActingAs", null); + exports2.SalesAgentController = SalesAgentController = __decorate4([ + (0, common_12.Controller)("sales-agent"), + __metadata3("design:paramtypes", [sales_agent_service_1.SalesAgentService]) + ], SalesAgentController); + } +}); + +// dist/modules/sales-agent/sales-agent.module.js +var require_sales_agent_module = __commonJS({ + "dist/modules/sales-agent/sales-agent.module.js"(exports2) { + "use strict"; + var __decorate4 = exports2 && exports2.__decorate || function(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; + }; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.SalesAgentModule = void 0; + var common_12 = require_common(); + var sales_agent_service_1 = require_sales_agent_service(); + var sales_agent_controller_1 = require_sales_agent_controller(); + var SalesAgentModule = class SalesAgentModule { + }; + exports2.SalesAgentModule = SalesAgentModule; + exports2.SalesAgentModule = SalesAgentModule = __decorate4([ + (0, common_12.Module)({ + controllers: [sales_agent_controller_1.SalesAgentController], + providers: [sales_agent_service_1.SalesAgentService], + exports: [sales_agent_service_1.SalesAgentService] + }) + ], SalesAgentModule); + } +}); + // dist/app.module.js var require_app_module = __commonJS({ "dist/app.module.js"(exports2) { @@ -93154,10 +162115,19 @@ var require_app_module = __commonJS({ var prisma_module_1 = require_prisma_module(); var catalog_module_1 = require_catalog_module(); var customers_module_1 = require_customers_module(); + var customer_auth_module_1 = require_customer_auth_module(); + var sales_expert_app_module_1 = require_sales_expert_app_module(); + var customer_profile_module_1 = require_customer_profile_module(); + var customer_favorites_module_1 = require_customer_favorites_module(); + var customer_report_module_1 = require_customer_report_module(); + var sms_module_1 = require_sms_module(); var orders_module_1 = require_orders_module(); var accounting_module_1 = require_accounting_module(); + var accounting_sync_module_1 = require_accounting_sync_module(); var pricing_module_1 = require_pricing_module(); var auth_module_1 = require_auth_module(); + var iam_module_1 = require_iam_module(); + var admin_session_module_1 = require_admin_session_module(); var admin_table_module_1 = require_admin_table_module(); var admin_orders_module_1 = require_admin_orders_module(); var admin_cities_module_1 = require_admin_cities_module(); @@ -93175,12 +162145,17 @@ var require_app_module = __commonJS({ var admin_misc_module_1 = require_admin_misc_module(); var admin_uploads_module_1 = require_admin_uploads_module(); var admin_dashboard_module_1 = require_admin_dashboard_module(); + var admin_report_module_1 = require_admin_report_module(); + var sales_agent_module_1 = require_sales_agent_module(); var AppModule = class AppModule { }; exports2.AppModule = AppModule; exports2.AppModule = AppModule = __decorate4([ (0, common_12.Module)({ imports: [ + // Inert unless IAM_ENABLED=true — see modules/iam/README.md + iam_module_1.IamModule, + admin_session_module_1.AdminSessionModule, prisma_module_1.PrismaModule, auth_module_1.AuthModule, admin_table_module_1.AdminTableModule, @@ -93200,10 +162175,20 @@ var require_app_module = __commonJS({ admin_misc_module_1.AdminMiscModule, admin_uploads_module_1.AdminUploadsModule, admin_dashboard_module_1.AdminDashboardModule, + admin_report_module_1.AdminReportModule, catalog_module_1.CatalogModule, customers_module_1.CustomersModule, + sms_module_1.SmsModule, + customer_auth_module_1.CustomerAuthModule, + sales_expert_app_module_1.SalesExpertAppModule, + customer_profile_module_1.CustomerProfileModule, + customer_favorites_module_1.CustomerFavoritesModule, + customer_report_module_1.CustomerReportModule, + sales_agent_module_1.SalesAgentModule, orders_module_1.OrdersModule, accounting_module_1.AccountingModule, + // Tahesab / Zarrin integration (D27) — inert until switched on in the admin panel + accounting_sync_module_1.AccountingSyncModule, pricing_module_1.PricingModule ] }) @@ -93489,6 +162474,59 @@ var require_prisma_exception_filter = __commonJS({ } }); +// dist/common/production-checks.js +var require_production_checks = __commonJS({ + "dist/common/production-checks.js"(exports2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.ALLOW_MASTER_CODE_FLAG = exports2.DEV_JWT_SECRET = void 0; + exports2.parseCorsOrigins = parseCorsOrigins; + exports2.productionConfigProblems = productionConfigProblems; + exports2.DEV_JWT_SECRET = "dev-only-insecure-secret"; + exports2.ALLOW_MASTER_CODE_FLAG = "TEST_SERVER_ALLOW_MASTER_CODE"; + var MIN_SECRET_LENGTH = 32; + var val = (env2, k) => { + const v = env2[k]?.trim(); + return v ? v : null; + }; + function parseCorsOrigins(raw) { + return (raw ?? "").split(",").map((o) => o.trim().replace(/\/+$/, "")).filter(Boolean); + } + function productionConfigProblems(env2) { + if (env2.NODE_ENV !== "production") + return []; + const problems = []; + const admin = val(env2, "JWT_SECRET"); + if (!admin) { + problems.push("JWT_SECRET \u062A\u0646\u0638\u06CC\u0645 \u0646\u0634\u062F\u0647 \u0627\u0633\u062A. / JWT_SECRET is not set."); + } else if (admin === exports2.DEV_JWT_SECRET || admin.length < MIN_SECRET_LENGTH) { + problems.push(`JWT_SECRET \u0628\u0627\u06CC\u062F \u06CC\u06A9 \u0645\u0642\u062F\u0627\u0631 \u062A\u0635\u0627\u062F\u0641\u06CC \u062F\u0633\u062A\u200C\u06A9\u0645 ${MIN_SECRET_LENGTH} \u0646\u0648\u06CC\u0633\u0647 \u0628\u0627\u0634\u062F. / JWT_SECRET must be a random value of at least ${MIN_SECRET_LENGTH} characters.`); + } + const customer = val(env2, "JWT_CUSTOMER_SECRET"); + if (!customer) { + problems.push("JWT_CUSTOMER_SECRET \u062A\u0646\u0638\u06CC\u0645 \u0646\u0634\u062F\u0647 \u0627\u0633\u062A\u061B \u062A\u0648\u06A9\u0646 \u0645\u0634\u062A\u0631\u06CC\u200C\u0647\u0627 \u0628\u0627 \u06A9\u0644\u06CC\u062F \u0645\u062F\u06CC\u0631\u0647\u0627 \u0627\u0645\u0636\u0627 \u0645\u06CC\u200C\u0634\u0648\u062F. / JWT_CUSTOMER_SECRET is not set: app tokens would be signed with the admin key."); + } else if (customer === admin) { + problems.push("JWT_CUSTOMER_SECRET \u0646\u0628\u0627\u06CC\u062F \u0628\u0627 JWT_SECRET \u06CC\u06A9\u06CC \u0628\u0627\u0634\u062F. / JWT_CUSTOMER_SECRET must differ from JWT_SECRET."); + } else if (customer === exports2.DEV_JWT_SECRET || customer.length < MIN_SECRET_LENGTH) { + problems.push(`JWT_CUSTOMER_SECRET \u0628\u0627\u06CC\u062F \u06CC\u06A9 \u0645\u0642\u062F\u0627\u0631 \u062A\u0635\u0627\u062F\u0641\u06CC \u062F\u0633\u062A\u200C\u06A9\u0645 ${MIN_SECRET_LENGTH} \u0646\u0648\u06CC\u0633\u0647 \u0628\u0627\u0634\u062F. / JWT_CUSTOMER_SECRET must be a random value of at least ${MIN_SECRET_LENGTH} characters.`); + } + const origins = parseCorsOrigins(env2.CORS_ORIGINS); + if (!origins.length) { + problems.push("CORS_ORIGINS \u062A\u0646\u0638\u06CC\u0645 \u0646\u0634\u062F\u0647 \u0627\u0633\u062A\u061B \u0646\u0634\u0627\u0646\u06CC \u067E\u0646\u0644 \u0648 \u0627\u067E\u200C\u0647\u0627 \u0631\u0627 \u0628\u0627 \u0648\u06CC\u0631\u06AF\u0648\u0644 \u062C\u062F\u0627 \u0628\u0646\u0648\u06CC\u0633\u06CC\u062F. / CORS_ORIGINS is not set: list the panel and app origins, comma-separated."); + } else { + const bad = origins.filter((o) => o === "*" || !/^https?:\/\/[^/\s]+$/i.test(o)); + if (bad.length) { + problems.push(`CORS_ORIGINS \u0641\u0642\u0637 \u0646\u0634\u0627\u0646\u06CC \u06A9\u0627\u0645\u0644 \u0645\u06CC\u200C\u067E\u0630\u06CC\u0631\u062F\u060C \u0645\u062B\u0644 https://adm.example.ir \u2014 \u0646\u0627\u062F\u0631\u0633\u062A: ${bad.join(", ")} / CORS_ORIGINS takes full origins only; invalid: ${bad.join(", ")}`); + } + } + if (val(env2, "OTP_MASTER_CODE") && val(env2, exports2.ALLOW_MASTER_CODE_FLAG) !== "yes") { + problems.push(`OTP_MASTER_CODE (\u06A9\u062F \u062B\u0627\u0628\u062A \u0648\u0631\u0648\u062F \u0622\u0632\u0645\u0627\u06CC\u0634\u06CC) \u0631\u0648\u06CC \u0633\u0631\u0648\u0631 \u0627\u0635\u0644\u06CC \u0645\u062C\u0627\u0632 \u0646\u06CC\u0633\u062A\u061B \u0622\u0646 \u0631\u0627 \u062D\u0630\u0641 \u06A9\u0646\u06CC\u062F. \u0641\u0642\u0637 \u0633\u0631\u0648\u0631 \u0622\u0632\u0645\u0627\u06CC\u0634\u06CC \u0628\u0627 ${exports2.ALLOW_MASTER_CODE_FLAG}=yes. / OTP_MASTER_CODE is not allowed in production; remove it (test servers only: ${exports2.ALLOW_MASTER_CODE_FLAG}=yes).`); + } + return problems; + } + } +}); + // dist/main.js Object.defineProperty(exports, "__esModule", { value: true }); require_Reflect(); @@ -93498,17 +162536,42 @@ var node_path_1 = require("node:path"); var app_module_1 = require_app_module(); var bootstrap_1 = require_bootstrap(); var prisma_exception_filter_1 = require_prisma_exception_filter(); +var sms_service_1 = require_sms_service(); +var env_1 = require_env(); +var production_checks_1 = require_production_checks(); +var customer_auth_service_1 = require_customer_auth_service(); var EXTRA_MIME_TYPES = { ".avif": "image/avif" }; +function assertProductionConfig() { + const problems = (0, production_checks_1.productionConfigProblems)(process.env); + if (!problems.length) + return; + throw new Error("\n\u0633\u0631\u0648\u0631 \u062F\u0631 \u062D\u0627\u0644\u062A production \u0627\u062C\u0631\u0627 \u0646\u0645\u06CC\u200C\u0634\u0648\u062F \u062A\u0627 \u0627\u06CC\u0646 \u0645\u0648\u0627\u0631\u062F \u062F\u0631\u0633\u062A \u0634\u0648\u0646\u062F:\nRefusing to start in production until these are fixed:\n" + problems.map((p) => " \u2022 " + p).join("\n") + "\n(see docs/SERVER-SETUP-CHECKLIST.md)\n"); +} +function corsOrigins() { + const list = (0, production_checks_1.parseCorsOrigins)((0, env_1.envOrNull)("CORS_ORIGINS") ?? ""); + return list.length ? list : true; +} async function bootstrap() { + assertProductionConfig(); + (0, sms_service_1.assertSmsConfigured)(); + if (!(0, env_1.envOrNull)("JWT_CUSTOMER_SECRET")) { + const sharedWithAdmin = Boolean((0, env_1.envOrNull)("JWT_SECRET")); + console.warn("\n" + "=".repeat(72) + "\n \u26A0 JWT_CUSTOMER_SECRET \u062A\u0646\u0638\u06CC\u0645 \u0646\u0634\u062F\u0647 \u0627\u0633\u062A\n \u26A0 JWT_CUSTOMER_SECRET IS NOT SET.\n" + (sharedWithAdmin ? " \u26A0 Customer/expert app tokens are being signed with JWT_SECRET,\n \u26A0 the SAME key as admin tokens. The two token realms are no\n \u26A0 longer cryptographically separated.\n" : " \u26A0 Neither JWT_SECRET nor JWT_CUSTOMER_SECRET is set, so app\n \u26A0 tokens are signed with a well-known development string.\n") + " \u26A0 Set JWT_CUSTOMER_SECRET to a distinct random value before release.\n" + "=".repeat(72) + "\n"); + } + if ((0, customer_auth_service_1.masterOtpEnabled)()) { + const code = (0, customer_auth_service_1.masterOtpCode)() ?? ""; + const typable = /^\d{4}$/.test(code); + console.warn("\n" + "=".repeat(72) + "\n \u26A0 OTP_MASTER_CODE \u0641\u0639\u0627\u0644 \u0627\u0633\u062A \u2014 \u0642\u0628\u0644 \u0627\u0632 \u0627\u0646\u062A\u0634\u0627\u0631 \u0627\u0635\u0644\u06CC \u062D\u0630\u0641 \u0634\u0648\u062F\n \u26A0 OTP_MASTER_CODE IS ACTIVE: any active customer can sign in with\n \u26A0 this fixed code. Remove it from the environment before release.\n" + (typable ? "" : " \u26A0\n \u26A0 NOTE: this code is not 4 digits, so it CANNOT be entered in the\n \u26A0 customer apps \u2014 their OTP box has exactly 4 boxes. Use a\n \u26A0 4-digit code for the apps; this one works over the API only.\n") + "=".repeat(72) + "\n"); + } await (0, bootstrap_1.prepareDatabase)(); const app = await core_1.NestFactory.create(app_module_1.AppModule); app.setGlobalPrefix("api"); app.useGlobalPipes(new common_1.ValidationPipe({ whitelist: true, transform: true })); app.useGlobalFilters(new prisma_exception_filter_1.PrismaExceptionFilter()); - app.enableCors(); - app.useStaticAssets(process.env.UPLOAD_DIR ?? (0, node_path_1.join)(process.cwd(), "storage", "uploads"), { + app.enableCors({ origin: corsOrigins() }); + app.useStaticAssets((0, env_1.envOr)("UPLOAD_DIR", (0, node_path_1.join)(process.cwd(), "storage", "uploads")), { prefix: "/uploads/", index: false, dotfiles: "deny", @@ -93518,7 +162581,7 @@ async function bootstrap() { res.setHeader("Content-Type", mime); } }); - const port = Number(process.env.PORT ?? 3e3); + const port = Number((0, env_1.envOr)("PORT", "3000")); try { await app.listen(port, "0.0.0.0"); } catch (err) { @@ -93859,4 +162922,106 @@ serve-static/index.js: * Copyright(c) 2014-2016 Douglas Christopher Wilson * MIT Licensed *) + +xmlchars/xml/1.0/ed5.js: + (** + * Character classes and associated utilities for the 5th edition of XML 1.0. + * + * @author Louis-Dominique Dubeau + * @license MIT + * @copyright Louis-Dominique Dubeau + *) + +xmlchars/xml/1.1/ed2.js: + (** + * Character classes and associated utilities for the 2nd edition of XML 1.1. + * + * @author Louis-Dominique Dubeau + * @license MIT + * @copyright Louis-Dominique Dubeau + *) + +xmlchars/xmlns/1.0/ed3.js: + (** + * Character class utilities for XML NS 1.0 edition 3. + * + * @author Louis-Dominique Dubeau + * @license MIT + * @copyright Louis-Dominique Dubeau + *) + +normalize-path/index.js: + (*! + * normalize-path + * + * Copyright (c) 2014-2018, Jon Schlinkert. + * Released under the MIT License. + *) + +archiver/lib/error.js: +archiver/lib/core.js: + (** + * Archiver Core + * + * @ignore + * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE} + * @copyright (c) 2012-2014 Chris Talkington, contributors. + *) + +crc-32/crc32.js: + (*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com *) + +zip-stream/index.js: + (** + * ZipStream + * + * @ignore + * @license [MIT]{@link https://github.com/archiverjs/node-zip-stream/blob/master/LICENSE} + * @copyright (c) 2014 Chris Talkington, contributors. + *) + +archiver/lib/plugins/zip.js: + (** + * ZIP Format Plugin + * + * @module plugins/zip + * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE} + * @copyright (c) 2012-2014 Chris Talkington, contributors. + *) + +archiver/lib/plugins/tar.js: + (** + * TAR Format Plugin + * + * @module plugins/tar + * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE} + * @copyright (c) 2012-2014 Chris Talkington, contributors. + *) + +archiver/lib/plugins/json.js: + (** + * JSON Format Plugin + * + * @module plugins/json + * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE} + * @copyright (c) 2012-2014 Chris Talkington, contributors. + *) + +archiver/index.js: + (** + * Archiver Vending + * + * @ignore + * @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE} + * @copyright (c) 2012-2014 Chris Talkington, contributors. + *) + +tmp/lib/tmp.js: + (*! + * Tmp + * + * Copyright (c) 2011-2017 KARASZI Istvan + * + * MIT Licensed + *) */ diff --git a/apps/api/release/migrations/20260921090000_add_variant_image/migration.sql b/apps/api/release/migrations/20260921090000_add_variant_image/migration.sql new file mode 100644 index 0000000..ae407e7 --- /dev/null +++ b/apps/api/release/migrations/20260921090000_add_variant_image/migration.sql @@ -0,0 +1,11 @@ +-- AlterTable +ALTER TABLE "ProductVariant" ADD COLUMN "imageId" TEXT; + +-- CreateIndex +CREATE INDEX "ProductVariant_imageId_idx" ON "ProductVariant"("imageId"); + +-- AddForeignKey +-- ON DELETE SET NULL: removing a gallery image must never cascade into the +-- variant, because OrderItem rows reference variants and losing one would +-- break order history. The variant simply loses its picture. +ALTER TABLE "ProductVariant" ADD CONSTRAINT "ProductVariant_imageId_fkey" FOREIGN KEY ("imageId") REFERENCES "ProductImage"("id") ON DELETE SET NULL ON UPDATE CASCADE; diff --git a/apps/api/release/migrations/20260921120000_agent_is_admin_user/migration.sql b/apps/api/release/migrations/20260921120000_agent_is_admin_user/migration.sql new file mode 100644 index 0000000..d52ab9a --- /dev/null +++ b/apps/api/release/migrations/20260921120000_agent_is_admin_user/migration.sql @@ -0,0 +1,36 @@ +-- Sales agents ("کارشناس فروش") are modelled as AdminUser rows +-- (role=SALES_EXPERT), not Customer rows — see admin-users.service.ts and +-- admin-customers.service.ts's listReagents(). ReagentCustomer.vue used to +-- post agent data at the Customer endpoints instead, so agents ended up as +-- Customer rows (kind SALES_AGENT), which then leaked into every +-- Customer-backed list, including "لیست مشتریان تک" (listSingle had no kind +-- filter at all). Fixed at the application layer alongside this migration; +-- this migration only adds what that fix needs: +-- +-- 1. CustomerKind.RETAIL — legacy kept retail ("تک") customers in an +-- entirely separate table (SingleCustomer/`login`) that could never +-- contain a wholesale/agent/shopkeeper/banker row. The redesigned +-- schema folded everything into one Customer model, so listSingle() +-- needs an explicit kind to filter on to reproduce that separation. +-- 2. AdminUser gets the handful of Customer-only columns +-- (ReagentCustomer.vue) that a sales agent's form actually collects: +-- avatar, address, store/pasazh name, member code. Only ever set when +-- role=SALES_EXPERT; every other AdminUser leaves them null. + +-- AlterEnum +ALTER TYPE "CustomerKind" ADD VALUE IF NOT EXISTS 'RETAIL'; + +-- AlterTable +ALTER TABLE "AdminUser" + ADD COLUMN "avatarFileId" TEXT, + ADD COLUMN "address" TEXT, + ADD COLUMN "storeName" TEXT, + ADD COLUMN "pasazhName" TEXT, + ADD COLUMN "memberCode" TEXT; + +-- CreateIndex +CREATE INDEX "AdminUser_avatarFileId_idx" ON "AdminUser"("avatarFileId"); + +-- AddForeignKey +ALTER TABLE "AdminUser" ADD CONSTRAINT "AdminUser_avatarFileId_fkey" + FOREIGN KEY ("avatarFileId") REFERENCES "UploadedFile"("id") ON DELETE SET NULL ON UPDATE CASCADE; diff --git a/apps/api/release/migrations/20260922000000_customer_otp/migration.sql b/apps/api/release/migrations/20260922000000_customer_otp/migration.sql new file mode 100644 index 0000000..3db98fe --- /dev/null +++ b/apps/api/release/migrations/20260922000000_customer_otp/migration.sql @@ -0,0 +1,40 @@ +-- Customer OTP login challenges. +-- +-- Additive only: creates one new table and its indexes. No existing table, +-- column or row is touched. +-- +-- Ports henza_server's SMS login (ApiMobileController.php:39-78). The reference +-- kept the code in plain text on the customer row with no expiry and no attempt +-- limit; this stores a bcrypt hash and adds both, per docs/parity/DECISIONS.md +-- D6 / T1. + +CREATE TABLE IF NOT EXISTS "CustomerOtp" ( + "id" TEXT NOT NULL, + "mobile" TEXT NOT NULL, + "customerId" TEXT NOT NULL, + "codeHash" TEXT NOT NULL, + "expiresAt" TIMESTAMP(3) NOT NULL, + "attempts" INTEGER NOT NULL DEFAULT 0, + "consumedAt" TIMESTAMP(3), + "requestIp" TEXT, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "CustomerOtp_pkey" PRIMARY KEY ("id") +); + +CREATE INDEX IF NOT EXISTS "CustomerOtp_mobile_createdAt_idx" + ON "CustomerOtp"("mobile", "createdAt"); +CREATE INDEX IF NOT EXISTS "CustomerOtp_customerId_idx" + ON "CustomerOtp"("customerId"); +CREATE INDEX IF NOT EXISTS "CustomerOtp_expiresAt_idx" + ON "CustomerOtp"("expiresAt"); + +DO $$ +BEGIN + ALTER TABLE "CustomerOtp" + ADD CONSTRAINT "CustomerOtp_customerId_fkey" + FOREIGN KEY ("customerId") REFERENCES "Customer"("id") + ON DELETE CASCADE ON UPDATE CASCADE; +EXCEPTION + WHEN duplicate_object THEN NULL; +END $$; diff --git a/apps/api/release/migrations/20260922120000_customer_name_parts/migration.sql b/apps/api/release/migrations/20260922120000_customer_name_parts/migration.sql new file mode 100644 index 0000000..60ecd93 --- /dev/null +++ b/apps/api/release/migrations/20260922120000_customer_name_parts/migration.sql @@ -0,0 +1,97 @@ +-- D0 — split Customer.fullName into firstName / lastName (ADDITIVE). +-- +-- Reference: henza_server has two separate columns from the start +-- database/migrations/2020_10_01_120430_customers_table.php:18-19 +-- $table->string('fname')->nullable(); +-- $table->string('lname')->nullable(); +-- The target collapsed them into one `fullName`, so the admin edit form shows +-- the whole name in the "first name" box and saves an empty last name +-- (admin-customers.service.ts:231-233 returns `fname: c.fullName, lname: ''`). +-- +-- NOTHING IS DROPPED. `fullName` stays and is kept in sync as +-- `firstName || ' ' || lastName`, so every existing reader keeps working +-- (D0 requirement 4). +-- +-- D13 / storefront impact: `Customer` is a SHARED table — both the B2B app and +-- the retail storefront read it. This migration only ADDS two nullable columns +-- and leaves `fullName` populated and authoritative, so no storefront query, +-- view or report changes behaviour. No storefront column is touched. + +-- 1. The two new columns. Nullable: a customer may legitimately have no +-- surname, and the reference's own columns are nullable. +ALTER TABLE "Customer" ADD COLUMN IF NOT EXISTS "firstName" TEXT; +ALTER TABLE "Customer" ADD COLUMN IF NOT EXISTS "lastName" TEXT; + +-- 2. Backfill: first whitespace-separated token -> firstName, the REST -> +-- lastName (D0 requirement 2). Multi-space and leading/trailing whitespace +-- are normalised first so " علی محمدی " splits correctly. +-- +-- Rows with a single token get firstName = that token and lastName = NULL. +-- Rows with more than two tokens put every remaining token in lastName; +-- they are ALSO listed in the review report (see the companion script) so a +-- human can correct them — the split cannot be guessed safely +-- (D0 requirement 3). +UPDATE "Customer" +SET + "firstName" = split_part(btrim(regexp_replace("fullName", '\s+', ' ', 'g')), ' ', 1), + "lastName" = NULLIF( + substr( + btrim(regexp_replace("fullName", '\s+', ' ', 'g')), + length(split_part(btrim(regexp_replace("fullName", '\s+', ' ', 'g')), ' ', 1)) + 2 + ), + '' + ) +WHERE "firstName" IS NULL + AND "fullName" IS NOT NULL + AND btrim("fullName") <> ''; + +-- 3. Keep `fullName` in sync from now on. +-- +-- Writers may update either the parts or the whole; this trigger makes the +-- parts authoritative whenever they are the thing that changed, and +-- otherwise leaves an explicit `fullName` write alone. That way old code +-- that still writes only `fullName` is not broken (D0 requirement 4). +-- Precedence when BOTH the parts and fullName change in the SAME statement: +-- THE PARTS WIN. fullName is rebuilt from them and the submitted fullName is +-- discarded. Rationale: after D0 the parts are the field the forms edit, so +-- they carry the operator's intent; fullName is the derived, legacy-facing +-- value. Choosing the opposite would silently undo an edit made in the two +-- boxes the operator actually typed into. +-- The first branch below tests the parts, so it wins by construction. +CREATE OR REPLACE FUNCTION customer_sync_full_name() RETURNS trigger AS $$ +BEGIN + -- The name parts changed (or are being set on insert): rebuild fullName. + -- This is checked FIRST, so when both change in one statement the parts win. + IF (TG_OP = 'INSERT' AND (NEW."firstName" IS NOT NULL OR NEW."lastName" IS NOT NULL)) + OR (TG_OP = 'UPDATE' + AND (NEW."firstName" IS DISTINCT FROM OLD."firstName" + OR NEW."lastName" IS DISTINCT FROM OLD."lastName")) THEN + NEW."fullName" := btrim( + coalesce(NEW."firstName", '') || ' ' || coalesce(NEW."lastName", '') + ); + + -- Only fullName changed: derive the parts from it, so the two never drift. + ELSIF TG_OP = 'UPDATE' AND NEW."fullName" IS DISTINCT FROM OLD."fullName" + AND NEW."fullName" IS NOT NULL AND btrim(NEW."fullName") <> '' THEN + NEW."firstName" := split_part(btrim(regexp_replace(NEW."fullName", '\s+', ' ', 'g')), ' ', 1); + NEW."lastName" := NULLIF( + substr( + btrim(regexp_replace(NEW."fullName", '\s+', ' ', 'g')), + length(split_part(btrim(regexp_replace(NEW."fullName", '\s+', ' ', 'g')), ' ', 1)) + 2 + ), + '' + ); + END IF; + + RETURN NEW; +END; +$$ LANGUAGE plpgsql; + +DROP TRIGGER IF EXISTS customer_sync_full_name_trg ON "Customer"; +CREATE TRIGGER customer_sync_full_name_trg + BEFORE INSERT OR UPDATE ON "Customer" + FOR EACH ROW EXECUTE FUNCTION customer_sync_full_name(); + +-- 4. Name search hits both parts in the admin grid. +CREATE INDEX IF NOT EXISTS "Customer_firstName_idx" ON "Customer" ("firstName"); +CREATE INDEX IF NOT EXISTS "Customer_lastName_idx" ON "Customer" ("lastName"); diff --git a/apps/api/release/migrations/20260922120100_customer_making_charge_offset/migration.sql b/apps/api/release/migrations/20260922120100_customer_making_charge_offset/migration.sql new file mode 100644 index 0000000..5d35556 --- /dev/null +++ b/apps/api/release/migrations/20260922120100_customer_making_charge_offset/migration.sql @@ -0,0 +1,49 @@ +-- D9 — add Customer.makingChargeOffsetPercent (ADDITIVE, behaviour-neutral). +-- +-- Reference: `customers.percent`, a real per-customer column. +-- database/migrations/2020_10_19_153228_customer_add.php:32 +-- $table->double('percent')->default(0); +-- +-- What it does in the reference: +-- * it is ADDED to the variant's making charge when the app builds an order +-- line: henza_pwa/src/Mixins/product/index.ts:69-75 +-- getWage(v) = myStore.state.percent + v.percentage_pay +-- and `state.percent` is this column, delivered by POST /me-data +-- (henza_pwa/src/store/myDataStore.ts:29,59,122-127). +-- * it shifts the catalogue making-charge filter bounds: +-- ApiMobileController.php:391-396 and :76-77. +-- * it is NOT part of the price formula itself — the extra percent there +-- comes from ConfigStatic['product_price_extra_percent'] +-- (ProductVariant.php:50,183). +-- +-- Why this name and not `productPercent`: the reference has three unrelated +-- things called `percent` (see docs/parity/MIGRATION-STATE.md). This is the +-- per-customer making-charge offset. It is mapped back to the legacy key +-- `percent` in toRow(), so the admin panel's field name does not change. +-- No duplicate field is created. +-- +-- The target currently reads `referredByAgent.wagePercent` instead, which is +-- the wrong field entirely (CUST-02) — that is corrected in the service layer, +-- not here. +-- +-- D13 / storefront impact: NONE. `customers.percent` is a B2B wholesale field; +-- it is consumed only by the B2B app's cart and catalogue filter. The +-- storefront's own percent is ConfigStatic['percent'] (the wallet cashback +-- rate), a different key in a different table, which this migration does not +-- touch. `Customer` is a shared table, but adding a column with a default that +-- reproduces today's behaviour changes no storefront read. + +-- DEFAULT 0 is deliberate and behaviour-neutral: +-- * it matches the reference's own column default (customer_add.php:32); +-- * with 0 the computed wage is `0 + variant.percentage_pay`, i.e. exactly +-- the making charge alone — which is what the target does today, since it +-- has no such column. So no existing customer's price moves. +-- NOTE: the reference's createCustomer() writes 3, not 0, for NEW customers +-- (AdminController.php:338) and makes the field required on create (:354). +-- That is an application-layer default for new rows, NOT a backfill value, +-- and it is handled in the service, not in this migration. +ALTER TABLE "Customer" + ADD COLUMN IF NOT EXISTS "makingChargeOffsetPercent" DECIMAL(6,3) NOT NULL DEFAULT 0; + +COMMENT ON COLUMN "Customer"."makingChargeOffsetPercent" IS + 'Legacy customers.percent — per-customer making-charge offset, ADDED to ProductVariant.defaultWagePercent when pricing an order line, and used to shift the catalogue making-charge filter bounds. Not the wallet cashback rate (that is the storefront ConfigStatic[percent]) and not the wholesale per-line charge (that is OrderItem.wagePercentSnapshot).'; diff --git a/apps/api/release/migrations/20260922180000_sales_expert_profile_and_admin_name_parts/migration.sql b/apps/api/release/migrations/20260922180000_sales_expert_profile_and_admin_name_parts/migration.sql new file mode 100644 index 0000000..fe6a087 --- /dev/null +++ b/apps/api/release/migrations/20260922180000_sales_expert_profile_and_admin_name_parts/migration.sql @@ -0,0 +1,180 @@ +-- D17 — SalesExpertProfile, and firstName/lastName on AdminUser. +-- +-- Two additive changes in one migration: +-- +-- 1. SalesExpertProfile — the sales-expert fields that legacy kept on the +-- `customers` row (type=1) and that were lost when a sales expert became +-- an AdminUser. A separate table, not columns on AdminUser, because these +-- are meaningful only for role = SALES_EXPERT and would be permanently +-- null for every other admin. +-- +-- 2. AdminUser.firstName / lastName — closes D0 requirement 7, applying the +-- same split the Customer table already got. For ALL admins, not only +-- sales experts. +-- +-- NOTHING IS DROPPED. `fullName` stays and is kept in sync by a trigger. +-- +-- IDEMPOTENT (D14/D15): this must run cleanly under BOTH paths — the Prisma CLI +-- in development, and the app's own runner (src/prisma/migrate.ts) at container +-- boot, which may replay it. Hence IF NOT EXISTS everywhere, CREATE OR REPLACE +-- for the function, DROP ... IF EXISTS before CREATE TRIGGER, and a guarded +-- backfill that only touches rows not already filled. +-- +-- D13 / storefront impact: NONE. AdminUser is an admin-side table the retail +-- storefront never reads, and SalesExpertProfile is new. `customers` is not +-- touched. + +-- ─────────────────────────────────────────────────────────────────────────── +-- 1. SalesExpertProfile +-- ─────────────────────────────────────────────────────────────────────────── + +CREATE TABLE IF NOT EXISTS "SalesExpertProfile" ( + "id" TEXT NOT NULL, + "adminUserId" TEXT NOT NULL, + -- legacy customers.city_id — a filterable column on the sales-expert grid + -- (ReagentListModel.js:14) AND the source of the commission autofill + -- (ReagentCustomer.vue:215-228). + "cityId" TEXT, + -- legacy customers.gram_level — the «سطح اعتبار» column, filterable + -- (ReagentListModel.js:17). + -- + -- DECIMAL(14,4) deliberately matches Customer.goldCreditLimitGrams exactly + -- (schema.prisma:221, verified numeric_precision=14 numeric_scale=4), so the + -- same credit limit has identical precision and rendering on both tables. + "gramLevel" DECIMAL(14,4) NOT NULL DEFAULT 0, + -- legacy customers.phone / ncode — collected by the reference form + -- (ReagentCustomer.vue:95,31) and stored, though nothing reads them back. + -- Added on the owner's instruction so the form matches the reference. + -- + -- Types and constraints copied from the reference, which is deliberately lax: + -- ncode : string(20), NULLABLE, **NOT UNIQUE** + -- (2020_10_01_120430_customers_table.php:22) + -- phone : string(15), NULLABLE, not unique + -- (2020_10_25_155247_customers_cols.php:17) + -- Neither has a server-side validation rule: createCustomer validates only + -- `mobile` (required|unique) and `percent` (required) — AdminController.php:354. + -- Client-side both are `required: false` (ReagentCustomer.vue:31,95). + -- No uniqueness is invented here; that would reject data the reference accepts. + "phone" VARCHAR(15), + "nationalCode" VARCHAR(20), + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT "SalesExpertProfile_pkey" PRIMARY KEY ("id") +); + +-- One profile per admin user. +CREATE UNIQUE INDEX IF NOT EXISTS "SalesExpertProfile_adminUserId_key" + ON "SalesExpertProfile" ("adminUserId"); + +-- The grid filters on city. +CREATE INDEX IF NOT EXISTS "SalesExpertProfile_cityId_idx" + ON "SalesExpertProfile" ("cityId"); + +DO $$ +BEGIN + ALTER TABLE "SalesExpertProfile" + ADD CONSTRAINT "SalesExpertProfile_adminUserId_fkey" + FOREIGN KEY ("adminUserId") REFERENCES "AdminUser"("id") + ON DELETE CASCADE ON UPDATE CASCADE; +EXCEPTION + WHEN duplicate_object THEN NULL; +END $$; + +DO $$ +BEGIN + ALTER TABLE "SalesExpertProfile" + ADD CONSTRAINT "SalesExpertProfile_cityId_fkey" + FOREIGN KEY ("cityId") REFERENCES "City"("id") + ON DELETE SET NULL ON UPDATE CASCADE; +EXCEPTION + WHEN duplicate_object THEN NULL; +END $$; + +-- Give every EXISTING sales expert a profile row, so the grid's city and +-- credit-limit columns have something to left-join to from day one. +-- +-- Idempotent by construction: `WHERE NOT EXISTS` means a replay inserts +-- nothing, and it never touches a profile an operator has already filled in. +-- +-- The id is derived from the AdminUser id rather than random, so a replay on a +-- database where the row was deleted recreates the same key instead of +-- accumulating duplicates. Values are the column defaults: gramLevel 0 and +-- nulls elsewhere — deliberately neutral, since the reference has no data to +-- migrate here and inventing a credit limit would change behaviour. +INSERT INTO "SalesExpertProfile" ("id", "adminUserId", "gramLevel", "createdAt", "updatedAt") +SELECT 'sep_' || a."id", a."id", 0, CURRENT_TIMESTAMP, CURRENT_TIMESTAMP +FROM "AdminUser" a +WHERE a."role" = 'SALES_EXPERT' + AND NOT EXISTS ( + SELECT 1 FROM "SalesExpertProfile" s WHERE s."adminUserId" = a."id" + ); + +-- ─────────────────────────────────────────────────────────────────────────── +-- 2. AdminUser.firstName / lastName (D0 requirement 7) +-- ─────────────────────────────────────────────────────────────────────────── + +ALTER TABLE "AdminUser" ADD COLUMN IF NOT EXISTS "firstName" TEXT; +ALTER TABLE "AdminUser" ADD COLUMN IF NOT EXISTS "lastName" TEXT; + +-- Backfill: first whitespace-separated token -> firstName, the REST -> +-- lastName. Identical rule to the Customer migration, so both tables split the +-- same way. Rows with more than two tokens are a guess and are listed by +-- scripts/report-name-split.cjs for a human to correct. +-- +-- `WHERE "firstName" IS NULL` makes the replay a no-op and, just as important, +-- prevents a re-run from overwriting a name a human has since corrected. +UPDATE "AdminUser" +SET + "firstName" = split_part(btrim(regexp_replace("fullName", '\s+', ' ', 'g')), ' ', 1), + "lastName" = NULLIF( + substr( + btrim(regexp_replace("fullName", '\s+', ' ', 'g')), + length(split_part(btrim(regexp_replace("fullName", '\s+', ' ', 'g')), ' ', 1)) + 2 + ), + '' + ) +WHERE "firstName" IS NULL + AND "fullName" IS NOT NULL + AND btrim("fullName") <> ''; + +-- Same two-way sync as Customer. +-- +-- Precedence when BOTH the parts and fullName change in ONE statement: +-- THE PARTS WIN — fullName is rebuilt from them and the submitted fullName is +-- discarded. The parts are what the forms edit, so they carry the operator's +-- intent; fullName is the derived, legacy-facing value. The first branch tests +-- the parts, so it wins by construction. +CREATE OR REPLACE FUNCTION admin_user_sync_full_name() RETURNS trigger AS $$ +BEGIN + IF (TG_OP = 'INSERT' AND (NEW."firstName" IS NOT NULL OR NEW."lastName" IS NOT NULL)) + OR (TG_OP = 'UPDATE' + AND (NEW."firstName" IS DISTINCT FROM OLD."firstName" + OR NEW."lastName" IS DISTINCT FROM OLD."lastName")) THEN + NEW."fullName" := btrim( + coalesce(NEW."firstName", '') || ' ' || coalesce(NEW."lastName", '') + ); + + ELSIF TG_OP = 'UPDATE' AND NEW."fullName" IS DISTINCT FROM OLD."fullName" + AND NEW."fullName" IS NOT NULL AND btrim(NEW."fullName") <> '' THEN + NEW."firstName" := split_part(btrim(regexp_replace(NEW."fullName", '\s+', ' ', 'g')), ' ', 1); + NEW."lastName" := NULLIF( + substr( + btrim(regexp_replace(NEW."fullName", '\s+', ' ', 'g')), + length(split_part(btrim(regexp_replace(NEW."fullName", '\s+', ' ', 'g')), ' ', 1)) + 2 + ), + '' + ); + END IF; + + RETURN NEW; +END; +$$ LANGUAGE plpgsql; + +DROP TRIGGER IF EXISTS admin_user_sync_full_name_trg ON "AdminUser"; +CREATE TRIGGER admin_user_sync_full_name_trg + BEFORE INSERT OR UPDATE ON "AdminUser" + FOR EACH ROW EXECUTE FUNCTION admin_user_sync_full_name(); + +-- Name search and sort hit both parts. +CREATE INDEX IF NOT EXISTS "AdminUser_firstName_idx" ON "AdminUser" ("firstName"); +CREATE INDEX IF NOT EXISTS "AdminUser_lastName_idx" ON "AdminUser" ("lastName"); diff --git a/apps/api/release/migrations/20260923120000_sales_expert_trading_customer/migration.sql b/apps/api/release/migrations/20260923120000_sales_expert_trading_customer/migration.sql new file mode 100644 index 0000000..b1745ee --- /dev/null +++ b/apps/api/release/migrations/20260923120000_sales_expert_trading_customer/migration.sql @@ -0,0 +1,52 @@ +-- Sales-expert app login: the expert's own trading account. +-- +-- WHY THIS COLUMN EXISTS +-- ---------------------- +-- In the reference a sales agent WAS a Customer row (customers.type = 1), so +-- when the agent placed an order from the app, setOrder did +-- $customer = Customer::findOrFail(auth()->id()); +-- $gramLevel = $customer->gram_level; +-- (ApiMobileController.php:534-535) — the order was simply that agent's own +-- order, against that agent's own credit limit and ledger. +-- +-- This system models a sales expert as an AdminUser (role SALES_EXPERT, D17), +-- which has no ledger, no gold debt and no credit limit. An AdminUser therefore +-- cannot be the subject of an Order: Order.customerId is a required FK to +-- Customer, and every ledger entry hangs off a Customer. +-- +-- Rather than reverse D17 (the owner ruled the expert stays an AdminUser), each +-- expert gets ONE linked Customer row that represents only their own trading +-- position. Orders the expert places for themselves land on that row, exactly +-- as the reference's single row did. The expert's REFERRED customers remain +-- separate rows pointing at the AdminUser via Customer.referredByAgentId — +-- that relationship is unchanged. +-- +-- PURELY ADDITIVE +-- --------------- +-- One nullable column plus a unique index. No existing row is modified, no +-- data is backfilled and nothing is deleted. A profile with a NULL +-- tradingCustomerId simply has no trading account yet; the API creates it +-- lazily on first login, so existing experts keep working untouched. + +ALTER TABLE "SalesExpertProfile" + ADD COLUMN IF NOT EXISTS "tradingCustomerId" TEXT; + +COMMENT ON COLUMN "SalesExpertProfile"."tradingCustomerId" IS + 'The Customer row that carries this expert''s OWN orders, debt and credit limit. Their referred customers are separate rows linked by Customer.referredByAgentId. Null until the expert first signs into the app, when it is created from the profile (gramLevel -> goldCreditLimitGrams, wagePercent -> makingChargeOffsetPercent).'; + +-- One trading account per expert, and no two experts may share one. +CREATE UNIQUE INDEX IF NOT EXISTS "SalesExpertProfile_tradingCustomerId_key" + ON "SalesExpertProfile" ("tradingCustomerId"); + +-- SET NULL, not CASCADE: if the trading Customer is ever removed, the expert +-- and their profile must survive — deleting a customer must never delete an +-- admin account. +DO $$ +BEGIN + ALTER TABLE "SalesExpertProfile" + ADD CONSTRAINT "SalesExpertProfile_tradingCustomerId_fkey" + FOREIGN KEY ("tradingCustomerId") REFERENCES "Customer"("id") + ON DELETE SET NULL ON UPDATE CASCADE; +EXCEPTION + WHEN duplicate_object THEN NULL; +END $$; diff --git a/apps/api/release/migrations/20260925120000_admin_session/migration.sql b/apps/api/release/migrations/20260925120000_admin_session/migration.sql new file mode 100644 index 0000000..fa6ff7e --- /dev/null +++ b/apps/api/release/migrations/20260925120000_admin_session/migration.sql @@ -0,0 +1,38 @@ +-- Revocable admin sessions. +-- +-- Until now an admin-panel token was purely self-contained: once signed it was +-- valid for its full 12h and nothing could cut it short — not deactivating the +-- account, not a central "sign out everywhere". Connecting the central IAM made +-- that gap concrete, because an IAM session revocation had no effect on a token +-- this API had already issued. +-- +-- Each issued token now carries a `jti` recorded here, and JwtStrategy rejects a +-- token whose row is revoked. Rows are only written (and only enforced) while +-- session tracking is enabled, so a deployment that leaves it off keeps exactly +-- the previous behaviour and the previous query count. +CREATE TABLE "AdminSession" ( + "id" TEXT NOT NULL, + "jti" TEXT NOT NULL, + "adminUserId" TEXT NOT NULL, + "iamSessionId" TEXT, + "iamSub" TEXT, + "ipAddress" TEXT, + "userAgent" TEXT, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "expiresAt" TIMESTAMP(3), + "lastSeenAt" TIMESTAMP(3), + "revokedAt" TIMESTAMP(3), + "revokedReason" TEXT, + + CONSTRAINT "AdminSession_pkey" PRIMARY KEY ("id") +); + +CREATE UNIQUE INDEX "AdminSession_jti_key" ON "AdminSession"("jti"); +CREATE INDEX "AdminSession_adminUserId_idx" ON "AdminSession"("adminUserId"); +CREATE INDEX "AdminSession_iamSessionId_idx" ON "AdminSession"("iamSessionId"); +CREATE INDEX "AdminSession_iamSub_idx" ON "AdminSession"("iamSub"); +CREATE INDEX "AdminSession_expiresAt_idx" ON "AdminSession"("expiresAt"); + +ALTER TABLE "AdminSession" + ADD CONSTRAINT "AdminSession_adminUserId_fkey" + FOREIGN KEY ("adminUserId") REFERENCES "AdminUser"("id") ON DELETE CASCADE ON UPDATE CASCADE; diff --git a/apps/api/release/migrations/20260925150000_app_session/migration.sql b/apps/api/release/migrations/20260925150000_app_session/migration.sql new file mode 100644 index 0000000..3e61501 --- /dev/null +++ b/apps/api/release/migrations/20260925150000_app_session/migration.sql @@ -0,0 +1,33 @@ +-- Revocable app sessions (customer app and sales-expert app). +-- +-- The admin panel got this in 20260925120000_admin_session; the app token family +-- had the same gap: a 30-day self-contained token that nothing could end early. +-- That matters more here, because the app's login is OTP-only — there is no +-- password an operator could change to cut access. +-- +-- No foreign key on purpose: an app token's subject is a Customer for a customer +-- and an AdminUser for a sales expert (D21), which one FK cannot express. +CREATE TABLE "AppSession" ( + "id" TEXT NOT NULL, + "jti" TEXT NOT NULL, + "subjectId" TEXT NOT NULL, + "subjectType" TEXT NOT NULL, + "mobile" TEXT, + "iamSessionId" TEXT, + "iamSub" TEXT, + "ipAddress" TEXT, + "userAgent" TEXT, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "expiresAt" TIMESTAMP(3), + "lastSeenAt" TIMESTAMP(3), + "revokedAt" TIMESTAMP(3), + "revokedReason" TEXT, + + CONSTRAINT "AppSession_pkey" PRIMARY KEY ("id") +); + +CREATE UNIQUE INDEX "AppSession_jti_key" ON "AppSession"("jti"); +CREATE INDEX "AppSession_subjectId_idx" ON "AppSession"("subjectId"); +CREATE INDEX "AppSession_iamSessionId_idx" ON "AppSession"("iamSessionId"); +CREATE INDEX "AppSession_iamSub_idx" ON "AppSession"("iamSub"); +CREATE INDEX "AppSession_expiresAt_idx" ON "AppSession"("expiresAt"); diff --git a/apps/api/release/migrations/20261005120000_accounting_integration/migration.sql b/apps/api/release/migrations/20261005120000_accounting_integration/migration.sql new file mode 100644 index 0000000..d3e9193 --- /dev/null +++ b/apps/api/release/migrations/20261005120000_accounting_integration/migration.sql @@ -0,0 +1,110 @@ +-- Accounting integration (D27): Tahesab / Zarrin, chosen in the admin panel. +-- Plan: docs/ACCOUNTING-INTEGRATION-PLAN.md. +-- +-- Adds the link table (app row <-> accounting record), the outbox the push +-- jobs run from, the issue list pulls report into, and the cached balance and +-- stock columns read back from the accounting software. Nothing existing +-- changes meaning: goldDebtGrams/fiatDebtRial stay the internal ledger caches. + +-- CreateEnum +CREATE TYPE "AccountingEntityType" AS ENUM ('CUSTOMER', 'PRODUCT'); + +-- CreateEnum +CREATE TYPE "AccountingOutboxKind" AS ENUM ('CUSTOMER_PUSH', 'PRODUCT_PUSH', 'ORDER_DOCUMENT', 'ORDER_DOCUMENT_DELETE'); + +-- CreateEnum +CREATE TYPE "AccountingOutboxStatus" AS ENUM ('PENDING', 'SENDING', 'SENT', 'FAILED', 'NEEDS_REVIEW', 'RESOLVED'); + +-- AlterTable +ALTER TABLE "Customer" ADD COLUMN "accountingBalanceAt" TIMESTAMP(3), +ADD COLUMN "accountingGoldBalance" DECIMAL(14,4), +ADD COLUMN "accountingRialBalance" DECIMAL(20,2); + +-- AlterTable +ALTER TABLE "Product" ADD COLUMN "accountingStockAt" TIMESTAMP(3), +ADD COLUMN "accountingStockCount" DECIMAL(14,4), +ADD COLUMN "accountingStockWeight" DECIMAL(14,4); + +-- CreateTable +CREATE TABLE "AccountingLink" ( + "id" TEXT NOT NULL, + "provider" TEXT NOT NULL, + "entityType" "AccountingEntityType" NOT NULL, + "entityId" TEXT NOT NULL, + "externalCode" TEXT NOT NULL, + "externalName" TEXT, + "origin" TEXT NOT NULL, + "snapshot" JSONB, + "syncedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "AccountingLink_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "AccountingOutbox" ( + "id" TEXT NOT NULL, + "provider" TEXT NOT NULL, + "kind" "AccountingOutboxKind" NOT NULL, + "entityId" TEXT NOT NULL, + "status" "AccountingOutboxStatus" NOT NULL DEFAULT 'PENDING', + "attempts" INTEGER NOT NULL DEFAULT 0, + "nextAttemptAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "lastError" TEXT, + "externalRef" TEXT, + "progress" JSONB, + "lastRequest" JSONB, + "lastResponse" JSONB, + "sentAt" TIMESTAMP(3), + "resolvedById" TEXT, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "AccountingOutbox_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "AccountingIssue" ( + "id" TEXT NOT NULL, + "provider" TEXT NOT NULL, + "kind" TEXT NOT NULL, + "externalCode" TEXT NOT NULL, + "entityId" TEXT, + "message" TEXT NOT NULL, + "data" JSONB, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "resolvedAt" TIMESTAMP(3), + + CONSTRAINT "AccountingIssue_pkey" PRIMARY KEY ("id") +); + +-- CreateIndex +CREATE INDEX "AccountingLink_entityType_entityId_idx" ON "AccountingLink"("entityType", "entityId"); + +-- CreateIndex +CREATE UNIQUE INDEX "AccountingLink_provider_entityType_entityId_key" ON "AccountingLink"("provider", "entityType", "entityId"); + +-- CreateIndex +CREATE UNIQUE INDEX "AccountingLink_provider_entityType_externalCode_key" ON "AccountingLink"("provider", "entityType", "externalCode"); + +-- CreateIndex +CREATE INDEX "AccountingOutbox_status_nextAttemptAt_idx" ON "AccountingOutbox"("status", "nextAttemptAt"); + +-- CreateIndex +CREATE INDEX "AccountingOutbox_kind_entityId_idx" ON "AccountingOutbox"("kind", "entityId"); + +-- CreateIndex +CREATE INDEX "AccountingIssue_resolvedAt_idx" ON "AccountingIssue"("resolvedAt"); + +-- CreateIndex +CREATE UNIQUE INDEX "AccountingIssue_provider_kind_externalCode_key" ON "AccountingIssue"("provider", "kind", "externalCode"); + + +-- The new admin screen's permission. The seeded super-admin user type (85, +-- prisma/seed.ts) gets every rid in ALL_RIDS on a fresh seed; an existing +-- database has to be granted the new one here. +INSERT INTO "permission" ("rid", "userTypeId") +SELECT 'config.accounting', 85 +WHERE EXISTS (SELECT 1 FROM "user_type" WHERE "id" = 85) +ON CONFLICT DO NOTHING; diff --git a/apps/api/release/migrations/20261007120000_migration_prep_additive/migration.sql b/apps/api/release/migrations/20261007120000_migration_prep_additive/migration.sql new file mode 100644 index 0000000..ff39dc5 --- /dev/null +++ b/apps/api/release/migrations/20261007120000_migration_prep_additive/migration.sql @@ -0,0 +1,210 @@ +-- ============================================================================ +-- Preparation for the legacy data migration — PURELY ADDITIVE. +-- +-- Owner decisions of 2026-10-06 and 2026-10-07, recorded in +-- docs/DATA-MIGRATION-MAP.md §5.2, §5.5, §10, §10.4, §10.5.5. +-- +-- Nothing here drops, renames or retypes an existing column. Every statement +-- either removes a constraint or adds a new column/table, so code that works +-- today keeps working. Verified NOT touched: +-- * Customer.accounting{Gold,Rial}Balance / accountingBalanceAt (D27) +-- * Product.accountingStock{Weight,Count} / accountingStockAt (D27) +-- * ProductVariant.imageId (PROTECTED.md §B) +-- * AccountingLink / AccountingOutbox / AccountingIssue +-- * SmsMessage and the SMS module +-- These are target-only capabilities under PROTECTED.md §G ("a keep-out +-- list"), and the owner confirmed on 2026-10-06 that their data is real. +-- +-- D15: idempotent (IF NOT EXISTS / duplicate_object guards) because this runs +-- under BOTH ledgers — the Prisma CLI in development and the app's own runner +-- (src/prisma/migrate.ts) in the deploy container, which wraps each file in a +-- transaction. The runner's splitSqlStatements() handles $$-quoted blocks +-- (migrate.ts:83-91), so the DO blocks below are split correctly. +-- ============================================================================ + + +-- ---------------------------------------------------------------------------- +-- 1. Customer.nationalCode becomes OPTIONAL +-- +-- Source reality (docs/migration-precheck.sql, run 2026-10-06 on the live +-- `oapi` MySQL schema): empty_ncode = 1595 of n_customers = 1595. NOT ONE of +-- the 1,616 legacy customers has a national code. dup_ncode_groups = 0. +-- +-- Owner ruling 2026-10-07: "ساختن کد ملی فیک تخلف دیتایی است و مانع از +-- احراز هویت‌های قانونی بعدی می‌شود" — fabricating one is a data violation, so +-- the column must be nullable. Without this the customer migration cannot +-- insert a single row. +-- +-- This also RETIRES three existing workarounds that only exist because the +-- column is required. They write the MOBILE NUMBER into the national-code +-- field, i.e. they store wrong data today: +-- * admin-customers.service.ts:625 nationalCode: mobile +-- comment: "schema requires it and it is unique; singleCustomer.vue +-- collects no ncode" +-- * admin-customers.service.ts:685 nationalCode: nationalCode || mobile +-- * customer-auth.service.ts:258 ... || admin.mobile +-- Removing those fallbacks is a SERVICE-LAYER change, deliberately NOT done +-- here: this migration only makes it possible. Until they are removed the +-- behaviour is exactly as it is today. +-- +-- The UNIQUE index "Customer_nationalCode_key" (first/migration.sql:304) is +-- left in place. In PostgreSQL NULLs are not equal to each other, so any +-- number of rows may hold NULL under a unique index — which is precisely why +-- the migration tool must write NULL and never the empty string: '' would +-- collide on the second row (see §10.4). +-- +-- DROP NOT NULL takes only a brief ACCESS EXCLUSIVE lock on the catalog; it +-- does not rewrite the table and does not scan the data. +ALTER TABLE "Customer" ALTER COLUMN "nationalCode" DROP NOT NULL; + +COMMENT ON COLUMN "Customer"."nationalCode" IS + 'Legacy customers.ncode. OPTIONAL: no legacy customer has one (1595/1595 empty as of 2026-10-06), and fabricating a value is a data violation (owner, 2026-10-07). Still UNIQUE — write NULL, never '''', because NULLs do not collide under a unique index but empty strings do.'; + + +-- ---------------------------------------------------------------------------- +-- 2. Customer.birthDate — new, nullable, unread until backfilled +-- +-- Legacy `customers.birth_date timestamp NULL` (oapi dump line 484), populated +-- on 917 of 1,595 live rows (~57%). Owner ruling 2026-10-07: migrate it — +-- "نرخ پرشدگی بالای ۵۵٪ است و داده برای کمپین‌های وفاداری و پیامکی کاربرد +-- مستقیم دارد". +-- +-- Two sibling columns were deliberately NOT ported, same ruling: +-- * marriage_date (5 rows) — "۵ ردیف توجیه معماری ندارد" +-- * token_mobile (99 rows) — "توکن‌ها اغلب منقضی شده‌اند · زباله دیتایی" +-- +-- ⚠ THE COLUMN IS CREATED EMPTY ON PURPOSE. Do not backfill it until the +-- calendar question is settled (§5.9): legacy stores some dates as JALALI +-- STRINGS elsewhere (cashes.recive_date is varchar(255), 88 of 89 values +-- starting "14…"), so birth_date may hold Jalali years mis-entered into a +-- timestamp. Copying those unchanged would silently produce 917 WRONG +-- birthdays, which for an SMS campaign is worse than having none. +-- docs/migration-precheck-3.sql answers this. +ALTER TABLE "Customer" ADD COLUMN IF NOT EXISTS "birthDate" TIMESTAMP(3); + +COMMENT ON COLUMN "Customer"."birthDate" IS + 'Legacy customers.birth_date (917 of 1595 rows populated). Created empty: verify Jalali-vs-Gregorian with docs/migration-precheck-3.sql BEFORE backfilling — legacy stores dates as Jalali strings in other tables.'; + + +-- ---------------------------------------------------------------------------- +-- 3. Rejection trail for document verification +-- +-- Legacy has THREE states per verification step, not two +-- (MajorCustomerController.php:106-135): 1 = awaiting review, 2 = approved, +-- 3 = REJECTED. The target's VerificationStep enum has no rejected state, so +-- 14 already-rejected customers had nowhere to go. +-- +-- Owner ruling 2026-10-07: mapping them to "awaiting" is "کاملاً مردود" — +-- it would put closed cases back in the review queue and create duplicate +-- work. REJECTED is added to the enum (statement 4 below) and these two +-- columns carry the reason. +-- +-- Legacy records NO reason: all 49 `customers` columns were checked and none +-- is a reason/note/description field, and on rejection the server sends only +-- a FIXED SMS ("اطلاعات شما تایید نشده است. لطفا با پیشتیبانی تماس حاصل +-- فرمایید") with no cause stored anywhere. So for those 14 rows the reason is +-- unrecoverable; the owner asked the tool to write an explicit sentinel rather +-- than NULL, so support knows WHY it is blank: +-- رد شده در سیستم قدیم — فاقد شرح علت ثبت‌شده +-- That text is written by the migration tool, not by this migration, and only +-- WHERE verificationRejectionReason IS NULL so a re-run can never overwrite a +-- real reason entered in the new system (§5.5). +-- +-- verificationRejectedAt stays NULL for the 14 legacy rows: legacy did not +-- record a rejection timestamp either. +ALTER TABLE "Customer" ADD COLUMN IF NOT EXISTS "verificationRejectionReason" TEXT; +ALTER TABLE "Customer" ADD COLUMN IF NOT EXISTS "verificationRejectedAt" TIMESTAMP(3); + +COMMENT ON COLUMN "Customer"."verificationRejectionReason" IS + 'Why document verification was rejected. Legacy stored no reason (only a fixed SMS), so rows migrated from henza carry the sentinel «رد شده در سیستم قدیم — فاقد شرح علت ثبت‌شده». Write only WHERE this IS NULL so a re-run never overwrites a real reason.'; + +COMMENT ON COLUMN "Customer"."verificationRejectedAt" IS + 'When verification was rejected. NULL for rows migrated from henza — legacy did not record a rejection timestamp.'; + + +-- ---------------------------------------------------------------------------- +-- 4. VerificationStep gains REJECTED +-- +-- ADD VALUE is additive: existing rows and existing queries are unaffected. +-- IF NOT EXISTS makes a re-run a no-op. +-- +-- ⚠ CONSUMER AUDIT STILL OWED. Every read of VerificationStep must be checked +-- for a Persian label / switch that does not yet know this value, or the admin +-- panel will render a blank cell. Flagged in §10.5.5 as a separate task; it is +-- a display gap, not a data risk, and nothing writes REJECTED until the +-- migration tool runs. +-- +-- Postgres note: before v12 ADD VALUE could not run inside a transaction, and +-- the app's own runner wraps each file in one (migrate.ts:198). This project +-- targets a modern Postgres where that restriction is lifted. If the deploy +-- container ever errors with "ALTER TYPE ... ADD VALUE cannot be executed +-- inside a transaction block", this statement must move to its own file. +DO $$ +BEGIN + ALTER TYPE "VerificationStep" ADD VALUE IF NOT EXISTS 'REJECTED'; +EXCEPTION + WHEN duplicate_object THEN NULL; +END $$; + + +-- ---------------------------------------------------------------------------- +-- 5. CustomerFavorite — the legacy `fav` table finally gets a home +-- +-- Legacy `fav` holds 251 rows (customer_id, product_id) and the target had NO +-- model for it, so every customer's saved products would have been lost. +-- Owner ruling 2026-10-06: they matter. docs/PWA-PORT-PLAN.md reached the same +-- conclusion independently. +-- +-- Legacy `fav` has only two columns and NO primary key, so duplicate pairs are +-- possible in principle. The composite primary key here closes that, and the +-- precheck confirmed fav_duplicate_pairs = 0, so no de-duplication is needed — +-- but the tool should still SELECT DISTINCT, since the source cannot enforce it. +-- +-- 14 of the 251 rows point at a customer that no longer exists +-- (fav.customer_id orphans). Those must be SKIPPED by the tool; the foreign +-- keys below would reject them anyway. +-- +-- ON DELETE CASCADE on both sides: a favourite is a pure join row with no +-- meaning once either end is gone. This differs from ProductVariant.imageId, +-- which uses SetNull precisely so a deleted image never cascades into order +-- history — the distinction is deliberate. +-- +-- Legacy also keeps a denormalised `product.count_fav` counter. It is NOT +-- recreated as a column; derive it from this table (§5.2 group B) rather than +-- showing a stale or zero value. +CREATE TABLE IF NOT EXISTS "CustomerFavorite" ( + "customerId" TEXT NOT NULL, + "productId" TEXT NOT NULL, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT "CustomerFavorite_pkey" PRIMARY KEY ("customerId", "productId") +); + +-- The PK already indexes (customerId, productId) left-to-right, so "my +-- favourites" needs no extra index. This one serves the reverse lookup — +-- "how many customers favourited this product" — which is how count_fav is +-- derived. +CREATE INDEX IF NOT EXISTS "CustomerFavorite_productId_idx" + ON "CustomerFavorite"("productId"); + +DO $$ +BEGIN + ALTER TABLE "CustomerFavorite" + ADD CONSTRAINT "CustomerFavorite_customerId_fkey" + FOREIGN KEY ("customerId") REFERENCES "Customer"("id") + ON DELETE CASCADE ON UPDATE CASCADE; +EXCEPTION + WHEN duplicate_object THEN NULL; +END $$; + +DO $$ +BEGIN + ALTER TABLE "CustomerFavorite" + ADD CONSTRAINT "CustomerFavorite_productId_fkey" + FOREIGN KEY ("productId") REFERENCES "Product"("id") + ON DELETE CASCADE ON UPDATE CASCADE; +EXCEPTION + WHEN duplicate_object THEN NULL; +END $$; + +COMMENT ON TABLE "CustomerFavorite" IS + 'Legacy `fav` (251 rows). Composite PK replaces the source table''s missing primary key. Derive product.count_fav from here rather than storing a counter.'; diff --git a/apps/api/release/migrations/20261007190000_customer_city_name_raw/migration.sql b/apps/api/release/migrations/20261007190000_customer_city_name_raw/migration.sql new file mode 100644 index 0000000..9ed73ec --- /dev/null +++ b/apps/api/release/migrations/20261007190000_customer_city_name_raw/migration.sql @@ -0,0 +1,22 @@ +-- ============================================================================ +-- Customer.cityNameRaw — PURELY ADDITIVE. +-- +-- Owner ruling 2026-10-07 (docs/DATA-MIGRATION-MAP.md §5.9): keep the city a +-- customer typed at sign-up verbatim, and set cityId only on an exact match. +-- +-- Legacy `customers.new_city` is free text (all 172 live values are names, 0 +-- are ids). The legacy city table has only 15 rows, so 43 of those names match +-- no known city at all, and only ~72 match one of the 15 after ي/ك +-- normalisation. Dropping the text would lose where those customers are. +-- +-- Legacy sign-up also forced city_id = 5 (تهران) on every new customer +-- (Major/CustomerController.php:21); 91 of the 92 customers with both values +-- carry that forced Tehran. For them the typed name is the truth. +-- +-- D15: idempotent, runs under both migration ledgers. +-- ============================================================================ + +ALTER TABLE "Customer" ADD COLUMN IF NOT EXISTS "cityNameRaw" TEXT; + +COMMENT ON COLUMN "Customer"."cityNameRaw" IS + 'Legacy customers.new_city — city name as typed at sign-up, kept verbatim. cityId is set too only on an exact (ي/ك-normalised) match; legacy forced city_id=5 (Tehran) on sign-up, so prefer this text over that cityId.'; diff --git a/apps/api/release/migrations/20261008090000_customer_identity_cleanup/migration.sql b/apps/api/release/migrations/20261008090000_customer_identity_cleanup/migration.sql new file mode 100644 index 0000000..2a86031 --- /dev/null +++ b/apps/api/release/migrations/20261008090000_customer_identity_cleanup/migration.sql @@ -0,0 +1,31 @@ +-- ============================================================================ +-- Customer identity cleanup — data only, no schema change. Idempotent. +-- +-- Owner ruling 2026-10-07: «هر دیتایی باید سر جای خودش بشینه». +-- +-- 1. nationalCode held the MOBILE (or "--") on every +-- customer created without a national code, because the column used to be +-- NOT NULL. It is optional since 20261007120000, and the code paths that +-- wrote those stand-ins are fixed in the same change as this file. The +-- stand-ins are cleared to NULL; a real national code is never touched. +-- Accounting is unaffected: it only ever received validNationalCode(), +-- which already mapped a mobile to null. +-- +-- 2. passwordHash '' becomes the explicit "no password login" marker +-- (auth/password-hash.ts). Both are refused before bcrypt by +-- compareLocalHash, so nobody's ability to sign in changes. +-- ============================================================================ + +UPDATE "Customer" + SET "nationalCode" = NULL + WHERE "nationalCode" = '' + OR "nationalCode" = "mobile" + OR "nationalCode" LIKE "mobile" || '-%'; + +UPDATE "Customer" SET "passwordHash" = '!OTP_ONLY_NO_PASSWORD_LOGIN' WHERE "passwordHash" = ''; +UPDATE "AdminUser" SET "passwordHash" = '!NO_PASSWORD_SET_YET' WHERE "passwordHash" = ''; + +-- The earlier comment named the wrong source table: `fav` belongs to the retail +-- shop; wholesale favourites come from `major_favorites` (DATA-MIGRATION-MAP §10.7). +COMMENT ON TABLE "CustomerFavorite" IS + 'Legacy `major_favorites` (wholesale; deduplicated on import). Composite PK replaces the source table''s missing primary key. Derive a favourite count from here rather than storing a counter.'; diff --git a/apps/api/release/migrations/20261008120000_order_sales_agent/migration.sql b/apps/api/release/migrations/20261008120000_order_sales_agent/migration.sql new file mode 100644 index 0000000..ee34bbc --- /dev/null +++ b/apps/api/release/migrations/20261008120000_order_sales_agent/migration.sql @@ -0,0 +1,47 @@ +-- ============================================================================ +-- Order.salesAgentId / Order.referrerCustomerId — additive, idempotent. +-- +-- Owner ruling 2026-10-08: keep legacy's rule exactly. An order is credited to +-- the expert who was the customer's referrer WHEN IT WAS PLACED (legacy +-- `orders.reagent_id`, set once at creation), so a customer moving to another +-- expert later never changes past sales or commission. The app used to credit +-- an order to the customer's CURRENT referrer, which disagreed with legacy for +-- 8 of 49 experts on the imported data. +-- +-- No row is deleted and no existing column changes. +-- ============================================================================ + +ALTER TABLE "Order" ADD COLUMN IF NOT EXISTS "salesAgentId" TEXT; +ALTER TABLE "Order" ADD COLUMN IF NOT EXISTS "referrerCustomerId" TEXT; + +DO $$ BEGIN + ALTER TABLE "Order" ADD CONSTRAINT "Order_salesAgentId_fkey" + FOREIGN KEY ("salesAgentId") REFERENCES "AdminUser"("id") ON DELETE SET NULL ON UPDATE CASCADE; +EXCEPTION WHEN duplicate_object THEN NULL; +END $$; + +DO $$ BEGIN + ALTER TABLE "Order" ADD CONSTRAINT "Order_referrerCustomerId_fkey" + FOREIGN KEY ("referrerCustomerId") REFERENCES "Customer"("id") ON DELETE SET NULL ON UPDATE CASCADE; +EXCEPTION WHEN duplicate_object THEN NULL; +END $$; + +CREATE INDEX IF NOT EXISTS "Order_salesAgentId_idx" ON "Order"("salesAgentId"); +CREATE INDEX IF NOT EXISTS "Order_referrerCustomerId_idx" ON "Order"("referrerCustomerId"); + +-- Orders placed in the new app before this column existed: the customer's +-- referrer today is the best record there is (these are recent). Orders +-- brought over from legacy (orderNumber 'H-') are NOT guessed here — the +-- import writes their real `orders.reagent_id`. +UPDATE "Order" o + SET "salesAgentId" = c."referredByAgentId" + FROM "Customer" c + WHERE c."id" = o."customerId" + AND o."salesAgentId" IS NULL + AND c."referredByAgentId" IS NOT NULL + AND o."orderNumber" NOT LIKE 'H-%'; + +COMMENT ON COLUMN "Order"."salesAgentId" IS + 'Sales expert credited with this order, fixed when it is placed (legacy orders.reagent_id). Never follows a later change of the customer''s referrer.'; +COMMENT ON COLUMN "Order"."referrerCustomerId" IS + 'History only: legacy orders.reagent_id when it named a customer who is not a sales expert. Never set for new orders.'; diff --git a/apps/api/release/migrations/20261008150000_wage_formula_permission/migration.sql b/apps/api/release/migrations/20261008150000_wage_formula_permission/migration.sql new file mode 100644 index 0000000..a9e4b00 --- /dev/null +++ b/apps/api/release/migrations/20261008150000_wage_formula_permission/migration.sql @@ -0,0 +1,9 @@ +-- «اجرت» admin screen (owner ruling 2026-10-08): its permission for the +-- seeded super-admin user type. A fresh seed grants every rid in ALL_RIDS; +-- an existing database gets the new one here. Data only, idempotent. +-- The formula itself needs no row: until an admin approves one, the server +-- uses legacy's formula (pricing/wage-formula.ts LEGACY_WAGE_FORMULA). +INSERT INTO "permission" ("rid", "userTypeId") +SELECT 'config.wage', 85 +WHERE EXISTS (SELECT 1 FROM "user_type" WHERE "id" = 85) +ON CONFLICT DO NOTHING; diff --git a/apps/api/release/migrations/20261008160000_dashboard_permission_merge/migration.sql b/apps/api/release/migrations/20261008160000_dashboard_permission_merge/migration.sql new file mode 100644 index 0000000..644ba04 --- /dev/null +++ b/apps/api/release/migrations/20261008160000_dashboard_permission_merge/migration.sql @@ -0,0 +1,14 @@ +-- PERM-01 (owner approval 2026-10-08): legacy's two dashboard permissions +-- «آمار عمده فروشی» (dashboard.omde) and «آمار تک فروشی» (dashboard.tak), and +-- their tree parent "dashboard", became the single "dashboard.view" when the two +-- dashboards became one. A database seeded before that change still holds the +-- old rows: nothing reads them and the permission screen cannot show or revoke +-- them. Whoever held one keeps the dashboard through "dashboard.view", then the +-- old rows go. Data only, idempotent. +INSERT INTO "permission" ("rid", "userTypeId") +SELECT DISTINCT 'dashboard.view', "userTypeId" +FROM "permission" +WHERE "rid" IN ('dashboard', 'dashboard.omde', 'dashboard.tak') +ON CONFLICT DO NOTHING; + +DELETE FROM "permission" WHERE "rid" IN ('dashboard', 'dashboard.omde', 'dashboard.tak'); diff --git a/apps/api/release/migrations/20261008170000_city_tree/migration.sql b/apps/api/release/migrations/20261008170000_city_tree/migration.sql new file mode 100644 index 0000000..17eeb16 --- /dev/null +++ b/apps/api/release/migrations/20261008170000_city_tree/migration.sql @@ -0,0 +1,33 @@ +-- PERS-02 (owner approval 2026-10-08): cities become a tree again, as in legacy +-- (country > province > city > district, henza `cities.parent`). The flat +-- `province` label is turned into parent rows, nothing is lost, then dropped. + +ALTER TABLE "City" ADD COLUMN "parentId" TEXT; + +-- One province row per distinct label, named as legacy names them +-- («استان تهران»), unless a city row already carries that name. +INSERT INTO "City" ("id", "name") +SELECT 'cprov' || substr(md5(p.pname), 1, 20), p.pname +FROM ( + SELECT DISTINCT + CASE WHEN btrim("province") LIKE 'استان%' THEN btrim("province") ELSE 'استان ' || btrim("province") END AS pname + FROM "City" + WHERE "province" IS NOT NULL AND btrim("province") <> '' +) p +WHERE NOT EXISTS (SELECT 1 FROM "City" c WHERE c."name" = p.pname); + +UPDATE "City" c +SET "parentId" = ( + SELECT p."id" FROM "City" p + WHERE p."id" <> c."id" + AND p."name" = CASE WHEN btrim(c."province") LIKE 'استان%' THEN btrim(c."province") ELSE 'استان ' || btrim(c."province") END + ORDER BY p."id" + LIMIT 1 +) +WHERE c."province" IS NOT NULL AND btrim(c."province") <> ''; + +ALTER TABLE "City" DROP COLUMN "province"; + +CREATE INDEX "City_parentId_idx" ON "City"("parentId"); + +ALTER TABLE "City" ADD CONSTRAINT "City_parentId_fkey" FOREIGN KEY ("parentId") REFERENCES "City"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/apps/api/release/seed.js b/apps/api/release/seed.js index 3278e26..5c133b7 100644 --- a/apps/api/release/seed.js +++ b/apps/api/release/seed.js @@ -1607,6 +1607,9 @@ var ALL_RIDS = [ "comment.state", "comment.view", "comment.view.edit", + // D27 — «اتصال حسابداری» (Tahesab / Zarrin). Not a legacy rid. + "config.accounting", + "config.wage", "config.report", "config.statics", "config.statics.brand", @@ -1742,28 +1745,7 @@ var PLACEHOLDER_PASSWORD_HASH = hashSync(DEV_PASSWORD, 10); var DEV_TEST_PHONE = "09128081392"; var DEV_TEST_PHONE_PASSWORD_HASH = hashSync(DEV_TEST_PHONE, 10); var PLACEHOLDER_PRODUCT_IMAGE = "/img/no-items.png"; -async function main() { - const [tehran, mashhad, isfahan, tabriz] = await Promise.all([ - prisma.city.upsert({ where: { id: "city-tehran" }, update: {}, create: { id: "city-tehran", name: "\u062A\u0647\u0631\u0627\u0646", province: "\u062A\u0647\u0631\u0627\u0646" } }), - prisma.city.upsert({ where: { id: "city-mashhad" }, update: {}, create: { id: "city-mashhad", name: "\u0645\u0634\u0647\u062F", province: "\u062E\u0631\u0627\u0633\u0627\u0646 \u0631\u0636\u0648\u06CC" } }), - prisma.city.upsert({ where: { id: "city-isfahan" }, update: {}, create: { id: "city-isfahan", name: "\u0627\u0635\u0641\u0647\u0627\u0646", province: "\u0627\u0635\u0641\u0647\u0627\u0646" } }), - prisma.city.upsert({ where: { id: "city-tabriz" }, update: {}, create: { id: "city-tabriz", name: "\u062A\u0628\u0631\u06CC\u0632", province: "\u0622\u0630\u0631\u0628\u0627\u06CC\u062C\u0627\u0646 \u0634\u0631\u0642\u06CC" } }) - ]); - const branchTehran = await prisma.branch.upsert({ - where: { id: "branch-tehran-bazaar" }, - update: {}, - create: { id: "branch-tehran-bazaar", name: "\u0634\u0639\u0628\u0647 \u0628\u0627\u0632\u0627\u0631 \u0628\u0632\u0631\u06AF \u062A\u0647\u0631\u0627\u0646", cityId: tehran.id } - }); - const branchMashhad = await prisma.branch.upsert({ - where: { id: "branch-mashhad-main" }, - update: {}, - create: { id: "branch-mashhad-main", name: "\u0634\u0639\u0628\u0647 \u0645\u0631\u06A9\u0632\u06CC \u0645\u0634\u0647\u062F", cityId: mashhad.id } - }); - await prisma.workshop.upsert({ - where: { id: "workshop-central" }, - update: {}, - create: { id: "workshop-central", name: "\u06A9\u0627\u0631\u06AF\u0627\u0647 \u0645\u0631\u06A9\u0632\u06CC \u0633\u0627\u062E\u062A \u0637\u0644\u0627" } - }); +async function seedAccessControl() { const userTypes = [ // Full access — every rid the routers gate. { id: 85, title: "\u0645\u062F\u06CC\u0631 \u0627\u0631\u0634\u062F", rids: ALL_RIDS }, @@ -1824,6 +1806,46 @@ async function main() { skipDuplicates: true }); } +} +function demoDataAllowed() { + if (process.env.SEED_DEMO_DATA?.trim() === "true") return true; + return process.env.NODE_ENV !== "production"; +} +async function main() { + await seedAccessControl(); + if (!demoDataAllowed()) { + console.log("seed: production \u2014 roles and permissions only; demo data skipped (set SEED_DEMO_DATA=true to force)"); + return; + } + const city = (id, name, parentId) => prisma.city.upsert({ where: { id }, update: {}, create: { id, name, parentId } }); + await city("city-iran", "\u0627\u06CC\u0631\u0627\u0646", null); + await Promise.all([ + city("city-prov-tehran", "\u0627\u0633\u062A\u0627\u0646 \u062A\u0647\u0631\u0627\u0646", "city-iran"), + city("city-prov-khorasan-razavi", "\u0627\u0633\u062A\u0627\u0646 \u062E\u0631\u0627\u0633\u0627\u0646 \u0631\u0636\u0648\u06CC", "city-iran"), + city("city-prov-isfahan", "\u0627\u0633\u062A\u0627\u0646 \u0627\u0635\u0641\u0647\u0627\u0646", "city-iran"), + city("city-prov-east-azarbaijan", "\u0627\u0633\u062A\u0627\u0646 \u0622\u0630\u0631\u0628\u0627\u06CC\u062C\u0627\u0646 \u0634\u0631\u0642\u06CC", "city-iran") + ]); + const [tehran, mashhad, isfahan, tabriz] = await Promise.all([ + city("city-tehran", "\u062A\u0647\u0631\u0627\u0646", "city-prov-tehran"), + city("city-mashhad", "\u0645\u0634\u0647\u062F", "city-prov-khorasan-razavi"), + city("city-isfahan", "\u0627\u0635\u0641\u0647\u0627\u0646", "city-prov-isfahan"), + city("city-tabriz", "\u062A\u0628\u0631\u06CC\u0632", "city-prov-east-azarbaijan") + ]); + const branchTehran = await prisma.branch.upsert({ + where: { id: "branch-tehran-bazaar" }, + update: {}, + create: { id: "branch-tehran-bazaar", name: "\u0634\u0639\u0628\u0647 \u0628\u0627\u0632\u0627\u0631 \u0628\u0632\u0631\u06AF \u062A\u0647\u0631\u0627\u0646", cityId: tehran.id } + }); + const branchMashhad = await prisma.branch.upsert({ + where: { id: "branch-mashhad-main" }, + update: {}, + create: { id: "branch-mashhad-main", name: "\u0634\u0639\u0628\u0647 \u0645\u0631\u06A9\u0632\u06CC \u0645\u0634\u0647\u062F", cityId: mashhad.id } + }); + await prisma.workshop.upsert({ + where: { id: "workshop-central" }, + update: {}, + create: { id: "workshop-central", name: "\u06A9\u0627\u0631\u06AF\u0627\u0647 \u0645\u0631\u06A9\u0632\u06CC \u0633\u0627\u062E\u062A \u0637\u0644\u0627" } + }); await prisma.adminUser.upsert({ where: { mobile: DEV_TEST_PHONE }, update: { passwordHash: DEV_TEST_PHONE_PASSWORD_HASH, userTypeId: 85, branchId: null }, diff --git a/apps/api/release/vendor/.prisma/client/edge.js b/apps/api/release/vendor/.prisma/client/edge.js index 7b1c9bb..f4649f8 100644 --- a/apps/api/release/vendor/.prisma/client/edge.js +++ b/apps/api/release/vendor/.prisma/client/edge.js @@ -93,7 +93,7 @@ exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ exports.Prisma.CityScalarFieldEnum = { id: 'id', name: 'name', - province: 'province', + parentId: 'parentId', percent: 'percent', percentAux: 'percentAux' }; @@ -101,6 +101,8 @@ exports.Prisma.CityScalarFieldEnum = { exports.Prisma.AdminUserScalarFieldEnum = { id: 'id', fullName: 'fullName', + firstName: 'firstName', + lastName: 'lastName', mobile: 'mobile', passwordHash: 'passwordHash', role: 'role', @@ -108,16 +110,68 @@ exports.Prisma.AdminUserScalarFieldEnum = { branchId: 'branchId', wagePercent: 'wagePercent', isActive: 'isActive', - createdAt: 'createdAt' + createdAt: 'createdAt', + avatarFileId: 'avatarFileId', + address: 'address', + storeName: 'storeName', + pasazhName: 'pasazhName', + memberCode: 'memberCode' +}; + +exports.Prisma.AppSessionScalarFieldEnum = { + id: 'id', + jti: 'jti', + subjectId: 'subjectId', + subjectType: 'subjectType', + mobile: 'mobile', + iamSessionId: 'iamSessionId', + iamSub: 'iamSub', + ipAddress: 'ipAddress', + userAgent: 'userAgent', + createdAt: 'createdAt', + expiresAt: 'expiresAt', + lastSeenAt: 'lastSeenAt', + revokedAt: 'revokedAt', + revokedReason: 'revokedReason' +}; + +exports.Prisma.AdminSessionScalarFieldEnum = { + id: 'id', + jti: 'jti', + adminUserId: 'adminUserId', + iamSessionId: 'iamSessionId', + iamSub: 'iamSub', + ipAddress: 'ipAddress', + userAgent: 'userAgent', + createdAt: 'createdAt', + expiresAt: 'expiresAt', + lastSeenAt: 'lastSeenAt', + revokedAt: 'revokedAt', + revokedReason: 'revokedReason' +}; + +exports.Prisma.SalesExpertProfileScalarFieldEnum = { + id: 'id', + adminUserId: 'adminUserId', + cityId: 'cityId', + gramLevel: 'gramLevel', + phone: 'phone', + nationalCode: 'nationalCode', + tradingCustomerId: 'tradingCustomerId', + createdAt: 'createdAt', + updatedAt: 'updatedAt' }; exports.Prisma.CustomerScalarFieldEnum = { id: 'id', fullName: 'fullName', + firstName: 'firstName', + lastName: 'lastName', mobile: 'mobile', nationalCode: 'nationalCode', passwordHash: 'passwordHash', cityId: 'cityId', + cityNameRaw: 'cityNameRaw', kind: 'kind', phone: 'phone', address: 'address', @@ -129,10 +183,17 @@ exports.Prisma.CustomerScalarFieldEnum = { goldCreditLimitGrams: 'goldCreditLimitGrams', goldDebtGrams: 'goldDebtGrams', fiatDebtRial: 'fiatDebtRial', + accountingGoldBalance: 'accountingGoldBalance', + accountingRialBalance: 'accountingRialBalance', + accountingBalanceAt: 'accountingBalanceAt', + makingChargeOffsetPercent: 'makingChargeOffsetPercent', verificationStep: 'verificationStep', nationalIdImageUrl: 'nationalIdImageUrl', businessLicenseUrl: 'businessLicenseUrl', shopImageUrl: 'shopImageUrl', + verificationRejectionReason: 'verificationRejectionReason', + verificationRejectedAt: 'verificationRejectedAt', + birthDate: 'birthDate', avatarFileId: 'avatarFileId', canPlaceOrders: 'canPlaceOrders', isActive: 'isActive', @@ -141,6 +202,12 @@ exports.Prisma.CustomerScalarFieldEnum = { updatedAt: 'updatedAt' }; +exports.Prisma.CustomerFavoriteScalarFieldEnum = { + customerId: 'customerId', + productId: 'productId', + createdAt: 'createdAt' +}; + exports.Prisma.CustomerAddressScalarFieldEnum = { id: 'id', customerId: 'customerId', @@ -204,7 +271,10 @@ exports.Prisma.ProductScalarFieldEnum = { productCode: 'productCode', showType: 'showType', isActive: 'isActive', - createdAt: 'createdAt' + createdAt: 'createdAt', + accountingStockWeight: 'accountingStockWeight', + accountingStockCount: 'accountingStockCount', + accountingStockAt: 'accountingStockAt' }; exports.Prisma.ProductImageScalarFieldEnum = { @@ -224,7 +294,8 @@ exports.Prisma.ProductVariantScalarFieldEnum = { defaultWagePercent: 'defaultWagePercent', qty: 'qty', isPreOrder: 'isPreOrder', - isActive: 'isActive' + isActive: 'isActive', + imageId: 'imageId' }; exports.Prisma.OrderScalarFieldEnum = { @@ -239,6 +310,8 @@ exports.Prisma.OrderScalarFieldEnum = { flatRialCharge: 'flatRialCharge', isSuspendedOverCreditLimit: 'isSuspendedOverCreditLimit', deliveredAt: 'deliveredAt', + salesAgentId: 'salesAgentId', + referrerCustomerId: 'referrerCustomerId', createdAt: 'createdAt', updatedAt: 'updatedAt' }; @@ -366,6 +439,51 @@ exports.Prisma.SettingScalarFieldEnum = { updatedAt: 'updatedAt' }; +exports.Prisma.AccountingLinkScalarFieldEnum = { + id: 'id', + provider: 'provider', + entityType: 'entityType', + entityId: 'entityId', + externalCode: 'externalCode', + externalName: 'externalName', + origin: 'origin', + snapshot: 'snapshot', + syncedAt: 'syncedAt', + createdAt: 'createdAt' +}; + +exports.Prisma.AccountingOutboxScalarFieldEnum = { + id: 'id', + provider: 'provider', + kind: 'kind', + entityId: 'entityId', + status: 'status', + attempts: 'attempts', + nextAttemptAt: 'nextAttemptAt', + lastError: 'lastError', + externalRef: 'externalRef', + progress: 'progress', + lastRequest: 'lastRequest', + lastResponse: 'lastResponse', + sentAt: 'sentAt', + resolvedById: 'resolvedById', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.AccountingIssueScalarFieldEnum = { + id: 'id', + provider: 'provider', + kind: 'kind', + externalCode: 'externalCode', + entityId: 'entityId', + message: 'message', + data: 'data', + createdAt: 'createdAt', + updatedAt: 'updatedAt', + resolvedAt: 'resolvedAt' +}; + exports.Prisma.PromotionScalarFieldEnum = { id: 'id', title: 'title', @@ -459,6 +577,18 @@ exports.Prisma.UploadedFileScalarFieldEnum = { createdAt: 'createdAt' }; +exports.Prisma.CustomerOtpScalarFieldEnum = { + id: 'id', + mobile: 'mobile', + customerId: 'customerId', + codeHash: 'codeHash', + expiresAt: 'expiresAt', + attempts: 'attempts', + consumedAt: 'consumedAt', + requestIp: 'requestIp', + createdAt: 'createdAt' +}; + exports.Prisma.SortOrder = { asc: 'asc', desc: 'desc' @@ -468,6 +598,11 @@ exports.Prisma.JsonNullValueInput = { JsonNull: Prisma.JsonNull }; +exports.Prisma.NullableJsonNullValueInput = { + DbNull: Prisma.DbNull, + JsonNull: Prisma.JsonNull +}; + exports.Prisma.QueryMode = { default: 'default', insensitive: 'insensitive' @@ -496,14 +631,16 @@ exports.CustomerKind = exports.$Enums.CustomerKind = { APP_SHOPKEEPER: 'APP_SHOPKEEPER', WALK_IN_SHOPKEEPER: 'WALK_IN_SHOPKEEPER', BANKER: 'BANKER', - WORKSHOP_SUPERVISOR: 'WORKSHOP_SUPERVISOR' + WORKSHOP_SUPERVISOR: 'WORKSHOP_SUPERVISOR', + RETAIL: 'RETAIL' }; exports.VerificationStep = exports.$Enums.VerificationStep = { UNVERIFIED: 'UNVERIFIED', STEP_ONE_SUBMITTED: 'STEP_ONE_SUBMITTED', STEP_TWO_SUBMITTED: 'STEP_TWO_SUBMITTED', - VERIFIED: 'VERIFIED' + VERIFIED: 'VERIFIED', + REJECTED: 'REJECTED' }; exports.ProductImageRole = exports.$Enums.ProductImageRole = { @@ -565,6 +702,27 @@ exports.CommentStatus = exports.$Enums.CommentStatus = { REJECTED: 'REJECTED' }; +exports.AccountingEntityType = exports.$Enums.AccountingEntityType = { + CUSTOMER: 'CUSTOMER', + PRODUCT: 'PRODUCT' +}; + +exports.AccountingOutboxKind = exports.$Enums.AccountingOutboxKind = { + CUSTOMER_PUSH: 'CUSTOMER_PUSH', + PRODUCT_PUSH: 'PRODUCT_PUSH', + ORDER_DOCUMENT: 'ORDER_DOCUMENT', + ORDER_DOCUMENT_DELETE: 'ORDER_DOCUMENT_DELETE' +}; + +exports.AccountingOutboxStatus = exports.$Enums.AccountingOutboxStatus = { + PENDING: 'PENDING', + SENDING: 'SENDING', + SENT: 'SENT', + FAILED: 'FAILED', + NEEDS_REVIEW: 'NEEDS_REVIEW', + RESOLVED: 'RESOLVED' +}; + exports.PromotionScope = exports.$Enums.PromotionScope = { PRODUCT: 'PRODUCT', CATEGORY: 'CATEGORY', @@ -589,7 +747,11 @@ exports.MessageAudience = exports.$Enums.MessageAudience = { exports.Prisma.ModelName = { City: 'City', AdminUser: 'AdminUser', + AppSession: 'AppSession', + AdminSession: 'AdminSession', + SalesExpertProfile: 'SalesExpertProfile', Customer: 'Customer', + CustomerFavorite: 'CustomerFavorite', CustomerAddress: 'CustomerAddress', Branch: 'Branch', Workshop: 'Workshop', @@ -612,6 +774,9 @@ exports.Prisma.ModelName = { Permission: 'Permission', Comment: 'Comment', Setting: 'Setting', + AccountingLink: 'AccountingLink', + AccountingOutbox: 'AccountingOutbox', + AccountingIssue: 'AccountingIssue', Promotion: 'Promotion', PromotionExclusion: 'PromotionExclusion', BranchAllocation: 'BranchAllocation', @@ -621,7 +786,8 @@ exports.Prisma.ModelName = { NotificationRecipient: 'NotificationRecipient', NewsletterSubscriber: 'NewsletterSubscriber', CustomerActivityLog: 'CustomerActivityLog', - UploadedFile: 'UploadedFile' + UploadedFile: 'UploadedFile', + CustomerOtp: 'CustomerOtp' }; /** * Create the Client @@ -634,7 +800,7 @@ const config = { "value": "prisma-client-js" }, "output": { - "value": "D:\\APP\\gold-bank\\node_modules\\.pnpm\\@prisma+client@5.22.0_prisma@5.22.0\\node_modules\\@prisma\\client", + "value": "E:\\gold-bank\\node_modules\\.pnpm\\@prisma+client@5.22.0_prisma@5.22.0\\node_modules\\@prisma\\client", "fromEnvVar": null }, "config": { @@ -652,10 +818,11 @@ const config = { } ], "previewFeatures": [], - "sourceFilePath": "D:\\APP\\gold-bank\\apps\\api\\prisma\\schema.prisma" + "sourceFilePath": "E:\\gold-bank\\apps\\api\\prisma\\schema.prisma" }, "relativeEnvPaths": { - "rootEnvPath": null + "rootEnvPath": null, + "schemaEnvPath": "../../../../../../apps/api/.env" }, "relativePath": "../../../../../../apps/api/prisma", "clientVersion": "5.22.0", @@ -673,13 +840,13 @@ const config = { } } }, - "inlineSchema": "// Gold Banking System — core schema\n// Canonical accounting model: legacy \"System A\" gram ledger (see migration notes).\n// The external \"Tahesab\" service is retired — LedgerEntry is the sole source of truth.\n// All money/weight fields use Decimal, never Float, to avoid rounding drift in debt math.\n\ngenerator client {\n provider = \"prisma-client-js\"\n // native = local Windows/macOS; debian-openssl-3.0.x = node:20-bookworm-slim (Arvan)\n binaryTargets = [\"native\", \"debian-openssl-3.0.x\"]\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Enums\n// ─────────────────────────────────────────────────────────────────────────\n\nenum AdminRole {\n SUPER_ADMIN\n SYSTEM_APPROVER // legacy: تایید مدیر سیستم\n SALES_EXPERT // legacy Customer.type=1, also acts as a referral \"reagent\"\n WORKSHOP_SUPERVISOR\n ACCOUNTANT\n}\n\n/// Legacy Customer.type — what kind of wholesale customer this is. Values and\n/// labels taken verbatim from bulkCustomer.vue's userTypes list.\nenum CustomerKind {\n SALES_AGENT // 1 کارشناس فروش\n APP_SHOPKEEPER // 2 مغازه دار اپلیکیشن\n WALK_IN_SHOPKEEPER // 3 مغازه دار حضوری\n BANKER // 4 بنکدار\n WORKSHOP_SUPERVISOR // 5 سرپرست کارگاه\n}\n\nenum VerificationStep {\n UNVERIFIED\n STEP_ONE_SUBMITTED\n STEP_TWO_SUBMITTED\n VERIFIED\n}\n\n/// Legacy kept retail and wholesale orders in two SEPARATE tables\n/// (orders_orders vs orders). The redesigned schema has one Order model, so the\n/// distinction lives here instead.\nenum OrderChannel {\n RETAIL // تک فروشی\n WHOLESALE // عمده فروشی\n}\n\nenum OrderStatus {\n SUSPENDED // credit limit (goldCreditLimitGrams) exceeded at placement\n PLACED\n ADMIN_APPROVED\n SOURCING\n PREPARING\n DELIVERED_TO_AGENT\n DELIVERED_TO_CUSTOMER // debt recognition point — mirrors legacy sts>4\n CANCELLED\n}\n\nenum PreOrderStatus {\n PLACED\n ADMIN_APPROVED\n WORKSHOP_APPROVED\n READY_TO_SHIP\n DELIVERED\n CANCELLED\n}\n\nenum LedgerCurrency {\n GOLD_GRAM\n RIAL\n}\n\nenum LedgerDirection {\n DEBIT // increases what the customer owes\n CREDIT // decreases what the customer owes\n}\n\nenum LedgerSourceType {\n ORDER_STOCK\n ORDER_PRE_ORDER\n REPAYMENT_MELTED_GOLD // karat-normalized: amount * karatPerMille / 750\n REPAYMENT_TRANSFER\n REPAYMENT_CHEQUE\n REPAYMENT_CASH // price-per-gram-normalized via pricePerGramRialAtEntry\n WALLET_BONUS\n ADJUSTMENT\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Identity\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel City {\n id String @id @default(cuid())\n name String\n province String?\n /// Legacy cities.percent / percent_aux — per-city wage surcharges the city\n /// screen edits through GET cities/get-percent/{id} and get-percent-aux/{id}.\n percent Decimal? @db.Decimal(6, 3)\n percentAux Decimal? @db.Decimal(6, 3)\n customers Customer[]\n addresses CustomerAddress[]\n branches Branch[]\n preOrders PreOrder[]\n}\n\nmodel AdminUser {\n id String @id @default(cuid())\n fullName String\n mobile String @unique\n passwordHash String\n role AdminRole\n /// Legacy `users.ut`. Granular ACL lives here (Permission rows hang off UserType);\n /// the coarse `role` enum above is retained for the business rules that already\n /// switch on it. Nullable so existing seeded admins remain valid.\n userTypeId Int?\n userType UserType? @relation(fields: [userTypeId], references: [id])\n branchId String?\n branch Branch? @relation(fields: [branchId], references: [id])\n wagePercent Decimal? @db.Decimal(6, 3) // legacy Customer.percent, commission on referred orders\n isActive Boolean @default(true)\n createdAt DateTime @default(now())\n\n referredCustomers Customer[] @relation(\"ReferralAgent\")\n supervisedWorkshops Workshop[] @relation(\"WorkshopSupervisor\")\n branchAllocations BranchAllocation[] @relation(\"AllocationAuthor\")\n postedLedgerEntries LedgerEntry[]\n orderStatusEvents OrderStatusEvent[]\n preOrderStatusEvents PreOrderStatusEvent[]\n sentSmsMessages SmsMessage[] @relation(\"SmsAuthor\")\n sentNotifications Notification[] @relation(\"NotificationAuthor\")\n uploadedFiles UploadedFile[] @relation(\"FileUploader\")\n\n @@index([role])\n @@index([userTypeId])\n}\n\nmodel Customer {\n id String @id @default(cuid())\n fullName String\n mobile String @unique\n nationalCode String @unique\n passwordHash String\n cityId String?\n city City? @relation(fields: [cityId], references: [id])\n\n /// Legacy Customer.type — distinguishes بنکدار from مغازه دار, which the\n /// BankerList / ShopkeeperList screens filter on.\n kind CustomerKind @default(APP_SHOPKEEPER)\n\n /// Legacy contact + shop columns, shown on the wholesale customer form and as\n /// (hidden-by-default) columns in its grid.\n phone String?\n address String?\n storeName String?\n pasazhName String?\n zone String?\n /// Legacy mcode — the operator-assigned customer code.\n memberCode String?\n\n referredByAgentId String?\n referredByAgent AdminUser? @relation(\"ReferralAgent\", fields: [referredByAgentId], references: [id])\n\n // Credit limit + cached ledger balances (source of truth is LedgerEntry; these\n // are denormalized for fast reads and reconciled by a scheduled job).\n goldCreditLimitGrams Decimal @default(0) @db.Decimal(14, 4) // legacy gram_level\n goldDebtGrams Decimal @default(0) @db.Decimal(14, 4) // legacy remain\n fiatDebtRial Decimal @default(0) @db.Decimal(20, 2) // legacy rial_remain\n\n verificationStep VerificationStep @default(UNVERIFIED)\n nationalIdImageUrl String?\n businessLicenseUrl String?\n shopImageUrl String?\n\n /// Legacy `image_id` — the profile photo (عکس پروفایل) on the sales-agent\n /// form. Legacy stored an FK to its Image table and read it back as a nested\n /// `image: { id, image }`, so this is a relation, not a bare URL string.\n avatarFileId String?\n avatarFile UploadedFile? @relation(\"CustomerAvatar\", fields: [avatarFileId], references: [id])\n\n /// Legacy had TWO independent switches on a customer:\n /// sts -> may they place orders (this field)\n /// active -> is the account enabled (isActive, below)\n /// The port previously drove both from isActive; they are separate again.\n canPlaceOrders Boolean @default(true)\n\n isActive Boolean @default(true)\n /// Legacy archive flag — the archived list filtered on this, not on isActive.\n isArchived Boolean @default(false)\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n addresses CustomerAddress[]\n orders Order[]\n preOrders PreOrder[]\n ledgerEntries LedgerEntry[]\n walletBonuses WalletBonus[]\n comments Comment[]\n promotions Promotion[]\n notifications NotificationRecipient[]\n activityLogs CustomerActivityLog[]\n\n @@index([referredByAgentId])\n}\n\nmodel CustomerAddress {\n id String @id @default(cuid())\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n cityId String?\n city City? @relation(fields: [cityId], references: [id])\n addressLine String\n isDefault Boolean @default(false)\n}\n\nmodel Branch {\n id String @id @default(cuid())\n name String\n /// Legacy Branch.address / phone — both are columns in the branch grid.\n address String?\n phone String?\n /// Legacy GET branch/active/{id} toggles this.\n isActive Boolean @default(true)\n cityId String?\n city City? @relation(fields: [cityId], references: [id])\n adminUsers AdminUser[]\n orders Order[]\n allocations BranchAllocation[]\n}\n\nmodel Workshop {\n id String @id @default(cuid())\n name String\n /// Legacy Workshop.address / phone — both are columns in the workshop grid.\n address String?\n phone String?\n /// The supervisor created alongside the workshop by the legacy Add form.\n supervisorId String?\n supervisor AdminUser? @relation(\"WorkshopSupervisor\", fields: [supervisorId], references: [id])\n isActive Boolean @default(true)\n preOrders PreOrder[]\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Catalog — item reference catalog\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel Category {\n id String @id @default(cuid())\n title String\n /// Legacy Category.type — which storefront the category belongs to:\n /// 1 سایت | 2 اپلیکشن موبایل. Drives the \"type_str\" grid column.\n type Int @default(1)\n /// Legacy Category.image / icon — the grid renders the image, the storefront the icon.\n imageUrl String?\n iconUrl String?\n /// Legacy meta tag + description, used for SEO on the site categories.\n metaTag String?\n description String?\n parentId String?\n parent Category? @relation(\"CategoryTree\", fields: [parentId], references: [id])\n children Category[] @relation(\"CategoryTree\")\n products Product[]\n promotions Promotion[]\n}\n\nmodel Brand {\n id String @id @default(cuid())\n title String\n products Product[]\n promotions Promotion[]\n}\n\n/// Curated product groupings — replaces legacy \"Ciny/CinyProduct\" (a tagging\n/// feature, NOT a gold-price snapshot mechanism, despite the misleading legacy name).\nmodel Collection {\n id String @id @default(cuid())\n title String\n description String?\n isActive Boolean @default(true)\n products CollectionProduct[]\n}\n\nmodel CollectionProduct {\n collectionId String\n collection Collection @relation(fields: [collectionId], references: [id])\n productId String\n product Product @relation(fields: [productId], references: [id])\n\n @@id([collectionId, productId])\n}\n\nmodel Product {\n id String @id @default(cuid())\n title String\n description String?\n categoryId String?\n category Category? @relation(fields: [categoryId], references: [id])\n brandId String?\n brand Brand? @relation(fields: [brandId], references: [id])\n /// Legacy Product.product_code — the human-facing SKU shown in the grid.\n productCode String? @unique\n /// Legacy Product.show_type: 1 site, 2 mobile, 3 both.\n showType Int @default(3)\n isActive Boolean @default(true)\n createdAt DateTime @default(now())\n\n variants ProductVariant[]\n images ProductImage[]\n collections CollectionProduct[]\n comments Comment[]\n promotions Promotion[]\n allocationItems BranchAllocationItem[]\n}\n\nmodel ProductImage {\n id String @id @default(cuid())\n productId String\n product Product @relation(fields: [productId], references: [id])\n url String\n sortOrder Int @default(0)\n /// Legacy had 4 distinct upload slots (تصویر شاخص / تصویر شاخص موبایل /\n /// گالری تصاویر سایت / گالری تصاویر موبایل) — GALLERY is the default so\n /// existing rows and any generic \"just attach an image\" caller keep working.\n role ProductImageRole @default(GALLERY)\n}\n\nenum ProductImageRole {\n FEATURED\n FEATURED_MOBILE\n GALLERY\n GALLERY_MOBILE\n}\n\nmodel ProductVariant {\n id String @id @default(cuid())\n productId String\n product Product @relation(fields: [productId], references: [id])\n title String\n sku String? @unique\n /// Base/raw weight before making charge (\"rash weight\").\n rashWeightGrams Decimal @db.Decimal(14, 4)\n /// Default making-charge percentage applied on top of rash weight.\n defaultWagePercent Decimal @db.Decimal(6, 3)\n /// Legacy ProductVariant.qty — on-hand stock. The cart refuses a variant with\n /// qty 0 unless it is flagged pre-order, so both fields are required for that\n /// guard to work (see apps/admin-panel/src/stores/cart.ts).\n qty Int @default(0)\n /// Legacy is_pre_order: orderable even at zero stock.\n isPreOrder Boolean @default(false)\n isActive Boolean @default(true)\n\n orderItems OrderItem[]\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Orders — stock orders (debt-bearing)\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel Order {\n id String @id @default(cuid())\n orderNumber String @unique\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n branchId String?\n branch Branch? @relation(fields: [branchId], references: [id])\n /// Which sales channel placed this order — see OrderChannel.\n channel OrderChannel @default(RETAIL)\n status OrderStatus @default(PLACED)\n\n /// Total gold weight incl. wage across all items (\"allGram\" / order.w).\n totalGoldWeightGrams Decimal @db.Decimal(14, 4)\n /// Pure making-charge weight component (totalGoldWeightGrams minus raw weight sum).\n wageWeightGrams Decimal @db.Decimal(14, 4)\n /// Flat Rial charge independent of gold price (e.g. stones) — legacy rial_input.\n flatRialCharge Decimal @default(0) @db.Decimal(20, 2)\n\n isSuspendedOverCreditLimit Boolean @default(false)\n deliveredAt DateTime? // setting this is what triggers debt recognition\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n items OrderItem[]\n statusEvents OrderStatusEvent[]\n ledgerEntries LedgerEntry[]\n convertedFromPreOrder PreOrder?\n\n @@index([customerId])\n @@index([status])\n}\n\nmodel OrderItem {\n id String @id @default(cuid())\n orderId String\n order Order @relation(fields: [orderId], references: [id])\n productVariantId String\n productVariant ProductVariant @relation(fields: [productVariantId], references: [id])\n quantity Int\n\n // Snapshots at order time — never re-read from ProductVariant after placement.\n rashWeightGramsSnapshot Decimal @db.Decimal(14, 4)\n wagePercentSnapshot Decimal @db.Decimal(6, 3)\n discountPercentSnapshot Decimal @default(0) @db.Decimal(6, 3)\n /// computed: rash*(1 + (wagePercent-discount)/100)\n computedWeightGrams Decimal @db.Decimal(14, 4)\n flatRialCharge Decimal @default(0) @db.Decimal(20, 2)\n}\n\nmodel OrderStatusEvent {\n id String @id @default(cuid())\n orderId String\n order Order @relation(fields: [orderId], references: [id])\n fromStatus OrderStatus?\n toStatus OrderStatus\n note String?\n actorAdminUserId String?\n actorAdminUser AdminUser? @relation(fields: [actorAdminUserId], references: [id])\n createdAt DateTime @default(now())\n\n @@index([orderId])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Pre-orders — custom manufacturing requests (not debt-bearing until converted)\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel PreOrder {\n id String @id @default(cuid())\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n cityId String?\n city City? @relation(fields: [cityId], references: [id])\n workshopId String?\n workshop Workshop? @relation(fields: [workshopId], references: [id])\n status PreOrderStatus @default(PLACED)\n\n designImageUrl String?\n colorName String?\n sizeSpec String?\n stoneColor String?\n minaColor String?\n estimatedWeightGrams Decimal? @db.Decimal(14, 4)\n estimatedPriceRial Decimal? @db.Decimal(20, 2)\n description String?\n\n /// Once priced, an admin converts this into a real (debt-bearing) Order.\n convertedOrderId String? @unique\n convertedOrder Order? @relation(fields: [convertedOrderId], references: [id])\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n statusEvents PreOrderStatusEvent[]\n\n @@index([customerId])\n}\n\nmodel PreOrderStatusEvent {\n id String @id @default(cuid())\n preOrderId String\n preOrder PreOrder @relation(fields: [preOrderId], references: [id])\n /// Field-level diff, e.g. {\"status\": {\"old\": \"PLACED\", \"new\": \"ADMIN_APPROVED\"}}\n changes Json\n actorAdminUserId String?\n actorAdminUser AdminUser? @relation(fields: [actorAdminUserId], references: [id])\n ipAddress String?\n createdAt DateTime @default(now())\n\n @@index([preOrderId])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Accounting — the dual-currency ledger (core of the system)\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel LedgerEntry {\n id String @id @default(cuid())\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n\n currency LedgerCurrency\n direction LedgerDirection\n sourceType LedgerSourceType\n /// Always positive; direction determines the sign applied to the customer balance.\n amount Decimal @db.Decimal(20, 4)\n\n /// Purity of the physical instrument, for REPAYMENT_MELTED_GOLD (e.g. 750, 916).\n karatPerMille Int?\n /// Gold price/gram at conversion time, for REPAYMENT_CASH.\n pricePerGramRialAtEntry Decimal? @db.Decimal(20, 2)\n\n orderId String?\n order Order? @relation(fields: [orderId], references: [id])\n\n /// Pending entries don't count toward the cached customer balance until confirmed.\n confirmed Boolean @default(false)\n confirmedAt DateTime?\n postedByAdminUserId String?\n postedByAdminUser AdminUser? @relation(fields: [postedByAdminUserId], references: [id])\n\n /// Instrument metadata from the legacy \"cash\" document form. Which fields are\n /// filled depends on sourceType: a melted-gold receipt carries lab/hallmark and\n /// the pre-normalization weight, a cheque carries the account and bank, and a\n /// transfer carries its destination.\n /// Legacy columns: lab, ang, account_name, bank_name, to, original_value, recive_date.\n labName String?\n hallmark String?\n accountName String?\n bankName String?\n transferTo String?\n /// Weight as handed over, BEFORE karat normalization (legacy original_value).\n originalValue Decimal? @db.Decimal(14, 4)\n /// Rial amount for cash/cheque documents (legacy price).\n priceRial Decimal? @db.Decimal(20, 2)\n receivedAt DateTime?\n\n note String?\n createdAt DateTime @default(now())\n\n @@index([customerId, currency])\n @@index([orderId])\n}\n\n/// Replaces legacy WebServiceGold / ConfigStatic.gold_price — timestamped price feed.\nmodel GoldPriceQuote {\n id String @id @default(cuid())\n karatPerMille Int\n pricePerGramRial Decimal @db.Decimal(20, 2)\n source String\n quotedAt DateTime @default(now())\n\n @@index([karatPerMille, quotedAt])\n}\n\n/// Time-limited gold cashback bonus — replaces the legacy Rooyesh\\Wallet gold credit.\nmodel WalletBonus {\n id String @id @default(cuid())\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n orderId String?\n goldGrams Decimal @db.Decimal(14, 4)\n grantedAt DateTime @default(now())\n expiresAt DateTime\n consumedAt DateTime?\n isActive Boolean @default(true)\n\n @@index([customerId, isActive])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Admin ACL — faithful port of the legacy granular permission model.\n//\n// Legacy (henza_server):\n// Schema::create('permission', function (Blueprint $table) {\n// $table->string('rid');\n// $table->integer('ut');\n// $table->primary(['rid' , 'ut']);\n// });\n//\n// Permissions attach to the USER TYPE (`ut`), never to an individual user, so\n// every admin of a given type shares one permission set. `ut` pointed at a row\n// in the legacy `config_static` lookup table; UserType is that table, narrowed\n// to the admin-user-type rows it was actually used for.\n//\n// A `rid` is a dotted permission id such as \"persons.list.client.omde\". The\n// frontend expands each stored rid into its ancestors at runtime via\n// checkParent() — see apps/admin-panel/src/stores/users.ts. Only the 58 leaf\n// rids the routers actually gate are seeded; ancestors are derived, not stored.\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel UserType {\n /// Legacy `permission.ut` / `users.ut` — an integer, kept as the PK so seeded\n /// rows keep their legacy identity rather than getting new cuids.\n id Int @id\n title String\n isActive Boolean @default(true)\n createdAt DateTime @default(now())\n\n permissions Permission[]\n adminUsers AdminUser[]\n\n @@map(\"user_type\")\n}\n\nmodel Permission {\n /// Dotted permission id, e.g. \"order.list\", \"persons.list.client.omde\".\n rid String\n userTypeId Int\n userType UserType @relation(fields: [userTypeId], references: [id], onDelete: Cascade)\n\n /// Legacy's composite primary key (rid, ut), preserved exactly.\n @@id([rid, userTypeId])\n @@index([userTypeId])\n @@map(\"permission\")\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Product comments / reviews — legacy `comment` table (App\\Models\\Comment),\n// moderated from views/customer/Comments/Comments.vue.\n//\n// Legacy fillable: product_id, comment, reply_to, sts, customer_id\n// Legacy Comment::$STS = [1 => 'در انتظار تایید', 2 => 'تایید شده', 3 => 'رد شده']\n// which is represented here as an enum rather than a magic integer.\n// ─────────────────────────────────────────────────────────────────────────\n\nenum CommentStatus {\n PENDING // 1 — در انتظار تایید\n APPROVED // 2 — تایید شده\n REJECTED // 3 — رد شده\n}\n\nmodel Comment {\n id String @id @default(cuid())\n productId String\n product Product @relation(fields: [productId], references: [id])\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n body String\n status CommentStatus @default(PENDING)\n\n /// Legacy `reply_to`: a staff reply threads under the comment it answers.\n replyToId String?\n replyTo Comment? @relation(\"CommentReplies\", fields: [replyToId], references: [id])\n replies Comment[] @relation(\"CommentReplies\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@index([productId])\n @@index([customerId])\n @@index([status])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Settings — replaces legacy `config_static`, a key/value table the admin\n// panel read and wrote through endpoints like /wallet/config and\n// /const/__list__ut. Values are stored as JSON so a setting can hold a scalar,\n// an object, or the dynamic option lists legacy kept under `__list__*` keys.\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel Setting {\n key String @id\n value Json\n updatedAt DateTime @updatedAt\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Promotions / discounts — legacy views/promotion/*, served by\n// PromotionController (`product/variant/promotion`). The redesigned schema had\n// no promotion concept at all; this models what the legacy forms actually\n// collect.\n// ─────────────────────────────────────────────────────────────────────────\n\n/// Legacy Promotion.type — what the discount is scoped to.\nenum PromotionScope {\n PRODUCT // 1 محصولات\n CATEGORY // 2 دسته بندی\n CUSTOMER // 3 مشتری\n BRAND // 4 برند\n}\n\n/// Legacy Promotion.use_only — how often a customer may redeem it.\nenum PromotionUsage {\n ONCE // 1 فقط یکبار\n UNTIL_END_DATE // 2 تا تاریخ پایان\n}\n\nmodel Promotion {\n id String @id @default(cuid())\n title String\n description String?\n scope PromotionScope @default(PRODUCT)\n usage PromotionUsage @default(ONCE)\n /// Percentage off, 0-100 (legacy discount_percent).\n discountPercent Decimal @db.Decimal(6, 3)\n isActive Boolean @default(true)\n /// Which storefront it shows on, mirroring Product.showType (legacy platform).\n platform Int @default(3)\n\n startsAt DateTime?\n endsAt DateTime?\n\n /// Exactly one of these is populated, per `scope`.\n productId String?\n product Product? @relation(fields: [productId], references: [id])\n categoryId String?\n category Category? @relation(fields: [categoryId], references: [id])\n customerId String?\n customer Customer? @relation(fields: [customerId], references: [id])\n brandId String?\n brand Brand? @relation(fields: [brandId], references: [id])\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@index([scope, isActive])\n}\n\n/// Legacy \"ignore\" table (views/offersIgnore) — specific products, categories,\n/// customers or brands excluded from the automatic discount engine.\n/// Legacy posts { type, item_id[] }: \"type\" reuses the promotion scope codes\n/// (1 محصولات | 2 دسته بندی | 3 مشتری | 4 برند) and \"itemId\" is the excluded row.\nmodel PromotionExclusion {\n id String @id @default(cuid())\n type Int\n itemId String\n createdAt DateTime @default(now())\n\n @@unique([type, itemId])\n @@index([type])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Branch stock allocation — legacy views/invoice/* (\"فاکتور انتقال\"), served by\n// BranchController as `branch/product`. Despite the screen being called an\n// invoice, it is not a sales document: it records which products head office\n// allocated to a branch, and who allocated them.\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel BranchAllocation {\n id String @id @default(cuid())\n branchId String\n branch Branch @relation(fields: [branchId], references: [id])\n\n /// Legacy `allocator_user` — the admin who filed the allocation.\n allocatorAdminUserId String?\n allocatorAdminUser AdminUser? @relation(\"AllocationAuthor\", fields: [allocatorAdminUserId], references: [id])\n\n note String?\n createdAt DateTime @default(now())\n\n items BranchAllocationItem[]\n\n @@index([branchId])\n}\n\nmodel BranchAllocationItem {\n id String @id @default(cuid())\n allocationId String\n allocation BranchAllocation @relation(fields: [allocationId], references: [id], onDelete: Cascade)\n productId String\n product Product @relation(fields: [productId], references: [id])\n /// Weight snapshot at allocation time, so later catalog edits do not rewrite history.\n weightGrams Decimal? @db.Decimal(14, 4)\n\n @@unique([allocationId, productId])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Messaging + audit — legacy views/sms, views/notify, views/newsletters and\n// views/statics. None of these had a model in the redesigned schema.\n// ─────────────────────────────────────────────────────────────────────────\n\n/// Who an SMS or notification was aimed at. Legacy's sms/create offered these\n/// audiences, each gated by its own rid (sms.create.all, .omde, .single, ...).\nenum MessageAudience {\n SINGLE_NUMBER // یک شماره\n MULTIPLE_NUMBERS // چند شماره\n ALL_CUSTOMERS // همه\n WHOLESALE_CUSTOMERS // عمده\n RETAIL_CUSTOMERS // تک\n SALES_AGENTS // کارشناسان فروش\n}\n\nmodel SmsMessage {\n id String @id @default(cuid())\n audience MessageAudience\n /// Comma-separated recipients for the SINGLE/MULTIPLE audiences.\n recipients String?\n body String\n /// How many numbers the send actually resolved to.\n sentCount Int @default(0)\n\n sentByAdminUserId String?\n sentByAdminUser AdminUser? @relation(\"SmsAuthor\", fields: [sentByAdminUserId], references: [id])\n\n createdAt DateTime @default(now())\n\n @@index([createdAt])\n}\n\nmodel Notification {\n id String @id @default(cuid())\n title String\n body String\n audience MessageAudience @default(ALL_CUSTOMERS)\n\n sentByAdminUserId String?\n sentByAdminUser AdminUser? @relation(\"NotificationAuthor\", fields: [sentByAdminUserId], references: [id])\n\n createdAt DateTime @default(now())\n\n recipients NotificationRecipient[]\n\n @@index([createdAt])\n}\n\n/// Per-customer delivery + read state — legacy `GET notify/read/{id}`.\nmodel NotificationRecipient {\n id String @id @default(cuid())\n notificationId String\n notification Notification @relation(fields: [notificationId], references: [id], onDelete: Cascade)\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n readAt DateTime?\n\n @@unique([notificationId, customerId])\n @@index([customerId, readAt])\n}\n\n/// Legacy views/newsletters — the mailing-list signups collected by the site.\nmodel NewsletterSubscriber {\n id String @id @default(cuid())\n email String?\n mobile String?\n createdAt DateTime @default(now())\n\n @@unique([email])\n @@unique([mobile])\n}\n\n/// Legacy views/statics — the customer activity log the \"آمار\" screen reads\n/// (`log/list/customer`, `log/ago/{customerId}`).\nmodel CustomerActivityLog {\n id String @id @default(cuid())\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n /// Free-form action key, e.g. 'login', 'order.placed', 'profile.updated'.\n action String\n detail String?\n createdAt DateTime @default(now())\n\n @@index([customerId, createdAt])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Uploads — replaces the legacy MyUpload / SingleUploadInput widgets, which\n// POSTed to a file endpoint and stored the returned URL on the owning record.\n// Ports of those forms currently take a URL by hand; this gives them a real\n// destination to upload to.\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel UploadedFile {\n id String @id @default(cuid())\n /// Public URL the stored file is served from.\n url String\n originalName String\n mimeType String\n sizeBytes Int\n /// Free-form tag for what the file belongs to, e.g. 'product', 'category',\n /// 'customer.nationalId'. Kept loose so a new form needs no schema change.\n purpose String?\n\n uploadedByAdminUserId String?\n uploadedByAdminUser AdminUser? @relation(\"FileUploader\", fields: [uploadedByAdminUserId], references: [id])\n\n createdAt DateTime @default(now())\n customerAvatars Customer[] @relation(\"CustomerAvatar\")\n\n @@index([purpose])\n}\n", - "inlineSchemaHash": "2a0cac26ecbad0f3dec2805682be8f2a8b95feeb6b57cd369f94c84ce9997c84", + "inlineSchema": "// Gold Banking System — core schema\n// Canonical accounting model: legacy \"System A\" gram ledger (see migration notes).\n// The external \"Tahesab\" service is retired — LedgerEntry is the sole source of truth.\n// All money/weight fields use Decimal, never Float, to avoid rounding drift in debt math.\n\ngenerator client {\n provider = \"prisma-client-js\"\n // native = local Windows/macOS; debian-openssl-3.0.x = node:20-bookworm-slim (Arvan)\n binaryTargets = [\"native\", \"debian-openssl-3.0.x\"]\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Enums\n// ─────────────────────────────────────────────────────────────────────────\n\nenum AdminRole {\n SUPER_ADMIN\n SYSTEM_APPROVER // legacy: تایید مدیر سیستم\n SALES_EXPERT // legacy Customer.type=1, also acts as a referral \"reagent\"\n WORKSHOP_SUPERVISOR\n ACCOUNTANT\n}\n\n/// Legacy Customer.type — what kind of wholesale customer this is. Values and\n/// labels taken verbatim from bulkCustomer.vue's userTypes list.\n///\n/// SALES_AGENT is a LEGACY value only: legacy stored a sales agent as a\n/// Customer row with type=1, but the redesigned system models a sales agent\n/// as an AdminUser (role SALES_EXPERT) instead — see admin-users.service.ts\n/// and admin-customers.service.ts's listReagents()/create(). No Customer row\n/// should be created with kind SALES_AGENT going forward; the value is kept\n/// only so legacyTypeToKind()/kindToLegacyType() stay total functions and any\n/// already-migrated data keeps a readable label.\n///\n/// RETAIL marks a \"تک\" (single/retail) customer — legacy kept these in an\n/// entirely separate table (SingleCustomer/`login`) that could never contain\n/// a wholesale/agent/shopkeeper/banker row. The redesigned schema folded both\n/// into one Customer model, so this value is what listSingle() now filters on\n/// to reproduce that same separation.\nenum CustomerKind {\n SALES_AGENT // legacy 1 کارشناس فروش — superseded by AdminRole.SALES_EXPERT, do not use for new rows\n APP_SHOPKEEPER // 2 مغازه دار اپلیکیشن\n WALK_IN_SHOPKEEPER // 3 مغازه دار حضوری\n BANKER // 4 بنکدار\n WORKSHOP_SUPERVISOR // 5 سرپرست کارگاه\n RETAIL // مشتری تک — legacy SingleCustomer\n}\n\nenum VerificationStep {\n UNVERIFIED\n STEP_ONE_SUBMITTED\n STEP_TWO_SUBMITTED\n VERIFIED\n\n /// Legacy had THREE states per step, not two\n /// (MajorCustomerController.php:106-135): 1 = awaiting, 2 = approved,\n /// 3 = REJECTED. Mapping rejected customers to UNVERIFIED would put closed\n /// cases back in the review queue, so the owner ruled it out (2026-10-07).\n /// 14 legacy rows land here; see Customer.verificationRejectionReason.\n REJECTED\n}\n\n/// Legacy kept retail and wholesale orders in two SEPARATE tables\n/// (orders_orders vs orders). The redesigned schema has one Order model, so the\n/// distinction lives here instead.\nenum OrderChannel {\n RETAIL // تک فروشی\n WHOLESALE // عمده فروشی\n}\n\nenum OrderStatus {\n SUSPENDED // credit limit (goldCreditLimitGrams) exceeded at placement\n PLACED\n ADMIN_APPROVED\n SOURCING\n PREPARING\n DELIVERED_TO_AGENT\n DELIVERED_TO_CUSTOMER // debt recognition point — mirrors legacy sts>4\n CANCELLED\n}\n\nenum PreOrderStatus {\n PLACED\n ADMIN_APPROVED\n WORKSHOP_APPROVED\n READY_TO_SHIP\n DELIVERED\n CANCELLED\n}\n\nenum LedgerCurrency {\n GOLD_GRAM\n RIAL\n}\n\nenum LedgerDirection {\n DEBIT // increases what the customer owes\n CREDIT // decreases what the customer owes\n}\n\nenum LedgerSourceType {\n ORDER_STOCK\n ORDER_PRE_ORDER\n REPAYMENT_MELTED_GOLD // karat-normalized: amount * karatPerMille / 750\n REPAYMENT_TRANSFER\n REPAYMENT_CHEQUE\n REPAYMENT_CASH // price-per-gram-normalized via pricePerGramRialAtEntry\n WALLET_BONUS\n ADJUSTMENT\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Identity\n// ─────────────────────────────────────────────────────────────────────────\n\n/// Legacy `cities` is a tree (country > province > city > district) and so is\n/// this: a city hangs under its `parent`. In the admin pickers a top-level row\n/// (the country) is a heading, not selectable (henza_admin citiesModel.js:38).\nmodel City {\n id String @id @default(cuid())\n name String\n parentId String?\n parent City? @relation(\"CityTree\", fields: [parentId], references: [id], onDelete: Restrict)\n children City[] @relation(\"CityTree\")\n /// Legacy cities.percent / percent_aux — per-city wage surcharges the city\n /// screen edits through GET cities/get-percent/{id} and get-percent-aux/{id}.\n percent Decimal? @db.Decimal(6, 3)\n percentAux Decimal? @db.Decimal(6, 3)\n customers Customer[]\n addresses CustomerAddress[]\n branches Branch[]\n preOrders PreOrder[]\n salesExpertProfiles SalesExpertProfile[]\n\n @@index([parentId])\n}\n\nmodel AdminUser {\n id String @id @default(cuid())\n\n /// ⚠️ Kept in sync BY A DATABASE TRIGGER — `admin_user_sync_full_name`, from\n /// migration 20260922180000. Prisma cannot see it, so a write here may store\n /// something other than what you passed:\n ///\n /// * write the parts -> fullName is rebuilt as \"first last\"\n /// * write fullName only -> the parts are re-derived from it\n /// * write BOTH in one update -> THE PARTS WIN; the submitted fullName is\n /// discarded\n ///\n /// Re-read after writing if you need the stored value. Same arrangement as\n /// Customer (D0 requirement 7 — the split applies to ALL admins, not only\n /// sales experts).\n fullName String\n firstName String?\n lastName String?\n\n mobile String @unique\n passwordHash String\n role AdminRole\n /// Legacy `users.ut`. Granular ACL lives here (Permission rows hang off UserType);\n /// the coarse `role` enum above is retained for the business rules that already\n /// switch on it. Nullable so existing seeded admins remain valid.\n userTypeId Int?\n userType UserType? @relation(fields: [userTypeId], references: [id])\n branchId String?\n branch Branch? @relation(fields: [branchId], references: [id])\n wagePercent Decimal? @db.Decimal(6, 3) // legacy Customer.percent, commission on referred orders\n isActive Boolean @default(true)\n createdAt DateTime @default(now())\n\n /// Legacy stored a sales agent as a `customers` row with type=1, so\n /// ReagentCustomer.vue's shared form collected these alongside the\n /// wholesale-customer fields. A sales agent is now an AdminUser\n /// (role=SALES_EXPERT), so these live here instead — only ever set for that\n /// role; every other AdminUser leaves them null.\n avatarFileId String?\n avatarFile UploadedFile? @relation(\"AdminUserAvatar\", fields: [avatarFileId], references: [id])\n address String?\n storeName String? // legacy store_name\n pasazhName String? // legacy pasazh_name\n memberCode String? // legacy mcode\n\n referredCustomers Customer[] @relation(\"ReferralAgent\")\n /// Orders credited to this sales expert — see Order.salesAgentId.\n creditedOrders Order[] @relation(\"OrderSalesAgent\")\n supervisedWorkshops Workshop[] @relation(\"WorkshopSupervisor\")\n branchAllocations BranchAllocation[] @relation(\"AllocationAuthor\")\n postedLedgerEntries LedgerEntry[]\n orderStatusEvents OrderStatusEvent[]\n preOrderStatusEvents PreOrderStatusEvent[]\n sentSmsMessages SmsMessage[] @relation(\"SmsAuthor\")\n sentNotifications Notification[] @relation(\"NotificationAuthor\")\n uploadedFiles UploadedFile[] @relation(\"FileUploader\")\n\n /// Only ever set for role = SALES_EXPERT (D17).\n salesExpertProfile SalesExpertProfile?\n\n /// Issued admin-panel tokens, recorded only while session tracking is on\n /// (AUTH_SESSION_TRACKING, or implicitly whenever the IAM is enabled) so a\n /// token can be revoked before it expires. See AdminSession.\n sessions AdminSession[]\n\n @@index([role])\n @@index([userTypeId])\n @@index([avatarFileId])\n @@index([firstName])\n @@index([lastName])\n}\n\n/// An issued APP token (customer app / sales-expert app), so it can be revoked\n/// before it expires — the counterpart of AdminSession for the other token family.\n///\n/// WHY A SEPARATE TABLE AND NO FOREIGN KEY\n/// ---------------------------------------\n/// An app token's `sub` is a Customer id for a customer and an **AdminUser id**\n/// for a sales expert (D21). One FK cannot point at two tables, so the subject is\n/// stored as a plain id plus its type. The rows are short-lived operational data,\n/// not part of the accounting model, so the missing FK costs nothing here.\nmodel AppSession {\n id String @id @default(cuid())\n\n /// The token's `jti` claim. Unique: one row per issued token.\n jti String @unique\n\n /// Customer.id, or AdminUser.id when subjectType is \"sales-expert\".\n subjectId String\n subjectType String\n\n mobile String?\n\n /// Set when the login was confirmed by the central IAM: its session id (`sid`)\n /// and stable user id (`sub`), which is what a back-channel logout arrives with.\n iamSessionId String?\n iamSub String?\n\n ipAddress String?\n userAgent String?\n\n createdAt DateTime @default(now())\n expiresAt DateTime?\n lastSeenAt DateTime?\n\n revokedAt DateTime?\n revokedReason String?\n\n @@index([subjectId])\n @@index([iamSessionId])\n @@index([iamSub])\n @@index([expiresAt])\n}\n\n/// An issued admin-panel JWT, so it can be revoked before it expires.\n///\n/// WHY THIS EXISTS\n/// ---------------\n/// The admin token is self-contained and valid for 12h, which means nothing —\n/// not disabling the account, not a central \"sign out everywhere\" — could cut a\n/// session short: the token kept working until it expired. With the central IAM\n/// in the loop that gap became visible (an IAM session revocation had no effect\n/// here), so every issued token now carries a `jti` recorded on this table and\n/// JwtStrategy refuses a token whose row is revoked.\n///\n/// Rows are written ONLY while tracking is enabled, and JwtStrategy only\n/// enforces them while it is enabled, so a deployment that does not want the\n/// extra lookup behaves exactly as before.\nmodel AdminSession {\n id String @id @default(cuid())\n\n /// The token's `jti` claim. Unique: one row per issued token.\n jti String @unique\n\n adminUserId String\n adminUser AdminUser @relation(fields: [adminUserId], references: [id], onDelete: Cascade)\n\n /// Set when the login was verified by the IAM: its session id (`sid`) and the\n /// stable user id (`sub`) there. Back-channel logout arrives keyed by these —\n /// deliberately here rather than as columns on AdminUser, so enabling the\n /// feature needs no change to an existing table.\n iamSessionId String?\n iamSub String?\n\n ipAddress String?\n userAgent String?\n\n createdAt DateTime @default(now())\n expiresAt DateTime?\n lastSeenAt DateTime?\n\n revokedAt DateTime?\n revokedReason String?\n\n @@index([adminUserId])\n @@index([iamSessionId])\n @@index([iamSub])\n @@index([expiresAt])\n}\n\n/// The sales-expert fields legacy kept on the `customers` row (type=1) and that\n/// were lost when a sales expert became an AdminUser (D17).\n///\n/// A separate table rather than columns on AdminUser: these are meaningful only\n/// for role = SALES_EXPERT and would be permanently null for every other admin.\n/// A row is created for every SALES_EXPERT by the migration, and upserted by the\n/// service whenever one is created or a user's role becomes SALES_EXPERT — but\n/// readers still left-join, so a missing profile degrades to nulls rather than\n/// dropping the agent from the grid.\n///\n/// `reagent_id` is deliberately NOT here — see D17: in the reference it was a\n/// side effect of the shared customers form, and filling it removed that expert\n/// from the selectable-agent list (queryReagent, AdminController.php:420).\nmodel SalesExpertProfile {\n id String @id @default(cuid())\n adminUserId String @unique\n adminUser AdminUser @relation(fields: [adminUserId], references: [id], onDelete: Cascade)\n\n /// Legacy customers.city_id — a filterable grid column\n /// (ReagentListModel.js:14) and the source of the commission autofill\n /// (ReagentCustomer.vue:215-228).\n cityId String?\n city City? @relation(fields: [cityId], references: [id])\n\n /// Legacy customers.gram_level — the «سطح اعتبار» column, filterable.\n /// Decimal(14,4) matches Customer.goldCreditLimitGrams exactly so the same\n /// credit limit has identical precision on both tables.\n gramLevel Decimal @default(0) @db.Decimal(14, 4)\n\n /// Legacy customers.phone (varchar 15) and ncode (varchar 20). The reference\n /// stores both and reads neither back; kept so the form matches it. Neither\n /// is unique and neither has a validation rule in the reference — inventing\n /// one would reject data the reference accepts.\n phone String? @db.VarChar(15)\n nationalCode String? @db.VarChar(20)\n\n /// The Customer row carrying this expert's OWN orders, debt and credit limit.\n ///\n /// The reference stored a sales agent AS a Customer (type=1), so an order the\n /// agent placed from the app was simply their own, against their own\n /// gram_level (ApiMobileController.php:534-535). Here the expert is an\n /// AdminUser (D17), which has no ledger and cannot be an Order's subject, so\n /// this one linked Customer plays that part.\n ///\n /// Distinct from the expert's REFERRED customers, which are ordinary Customer\n /// rows pointing at the AdminUser through Customer.referredByAgentId.\n ///\n /// Null until the expert first signs into the app, when it is created from\n /// this profile. See D21.\n tradingCustomerId String? @unique\n tradingCustomer Customer? @relation(\"SalesExpertTradingAccount\", fields: [tradingCustomerId], references: [id], onDelete: SetNull)\n\n createdAt DateTime @default(now())\n updatedAt DateTime @default(now()) @updatedAt\n\n @@index([cityId])\n}\n\nmodel Customer {\n id String @id @default(cuid())\n\n /// ⚠️ `fullName`, `firstName` and `lastName` are kept in sync BY A DATABASE\n /// TRIGGER — `customer_sync_full_name`, created in migration\n /// 20260922120000_customer_name_parts. Prisma does not know about it, so a\n /// write here is NOT the whole story:\n ///\n /// * write the parts -> fullName is rebuilt as \"first last\"\n /// * write fullName only -> the parts are re-derived from it\n /// * write BOTH in one update -> THE PARTS WIN; fullName is overwritten\n /// with \"first last\" and whatever you passed for fullName is discarded\n ///\n /// So a value you wrote can differ from the value that lands in the row.\n /// Re-read after writing if you need the stored value. Prefer writing the\n /// parts; `fullName` exists for the legacy readers that predate D0.\n ///\n /// Reference has these as two columns from the start\n /// (henza_server 2020_10_01_120430_customers_table.php:18-19 fname/lname);\n /// the port collapsed them, which is the D0 defect.\n fullName String\n firstName String?\n lastName String?\n\n mobile String @unique\n /// Legacy customers.ncode. OPTIONAL since 2026-10-07: not one of the 1,616\n /// legacy customers has a national code (1595/1595 empty), and fabricating\n /// one is a data violation that would block later legal identity checks\n /// (owner ruling). Still @unique — in PostgreSQL NULLs do not collide, so\n /// the migration tool must write NULL and never '', which would collide on\n /// the second row.\n ///\n /// Three service-layer workarounds exist ONLY because this used to be\n /// required, and they store the MOBILE NUMBER here:\n /// admin-customers.service.ts:625,685 and customer-auth.service.ts:258.\n /// Retiring them is a separate change; see docs/DATA-MIGRATION-MAP.md §10.4.\n nationalCode String? @unique\n passwordHash String\n cityId String?\n city City? @relation(fields: [cityId], references: [id])\n\n /// Legacy customers.new_city — the city name exactly as the customer typed it\n /// at app sign-up (Major/CustomerController.php:36). Kept verbatim because\n /// the legacy city table has only 15 rows, so the typed name is often the only\n /// record of where the customer is (172 customers; 43 match no known city).\n /// cityId is set alongside it only on an exact, ي/ك-normalised name match.\n /// Legacy sign-up also forced city_id = 5 (Tehran) on everyone\n /// (Major/CustomerController.php:21), so for those rows the typed name, not\n /// cityId, is the truth. Owner ruling 2026-10-07: keep both.\n cityNameRaw String?\n\n /// Legacy Customer.type — distinguishes بنکدار from مغازه دار, which the\n /// BankerList / ShopkeeperList screens filter on.\n kind CustomerKind @default(APP_SHOPKEEPER)\n\n /// Legacy contact + shop columns, shown on the wholesale customer form and as\n /// (hidden-by-default) columns in its grid.\n phone String?\n address String?\n storeName String?\n pasazhName String?\n zone String?\n /// Legacy mcode — the operator-assigned customer code.\n memberCode String?\n\n referredByAgentId String?\n referredByAgent AdminUser? @relation(\"ReferralAgent\", fields: [referredByAgentId], references: [id])\n\n /// Set only on the one Customer row that acts as a sales expert's own trading\n /// account (see SalesExpertProfile.tradingCustomerId). Empty for every\n /// ordinary customer.\n salesExpertTradingFor SalesExpertProfile? @relation(\"SalesExpertTradingAccount\")\n /// Legacy orders that named THIS customer as their referrer — see\n /// Order.referrerCustomerId. History only.\n referredOrders Order[] @relation(\"OrderReferrerCustomer\")\n\n // Credit limit + cached ledger balances (source of truth is LedgerEntry; these\n // are denormalized for fast reads and reconciled by a scheduled job).\n goldCreditLimitGrams Decimal @default(0) @db.Decimal(14, 4) // legacy gram_level\n goldDebtGrams Decimal @default(0) @db.Decimal(14, 4) // legacy remain\n fiatDebtRial Decimal @default(0) @db.Decimal(20, 2) // legacy rial_remain\n\n /// Balance as last read from the accounting software (D27), in the app's own\n /// sign convention (positive = owes). Shown to the customer when the\n /// integration is on; the credit-limit check still uses goldDebtGrams above.\n /// Null until the first successful sync.\n accountingGoldBalance Decimal? @db.Decimal(14, 4)\n accountingRialBalance Decimal? @db.Decimal(20, 2)\n accountingBalanceAt DateTime?\n\n /// Legacy `customers.percent` — the per-customer making-charge offset. It is\n /// ADDED to the variant's making charge when pricing an order line\n /// (henza_pwa src/Mixins/product/index.ts:69-75:\n /// getWage(v) = state.percent + v.percentage_pay)\n /// and it shifts the catalogue making-charge filter bounds\n /// (ApiMobileController.php:391-396,76-77). It is NOT part of the price\n /// formula itself — that extra percent is ConfigStatic['product_price_extra_percent'].\n ///\n /// NOT the wallet cashback rate (storefront ConfigStatic['percent'], D13) and\n /// NOT the wholesale per-line charge (OrderItem.wagePercentSnapshot).\n ///\n /// DB default 0 keeps every existing customer's price unchanged. The\n /// reference's application-layer default for NEW customers is 3\n /// (AdminController.php:338) and the field is required on create (:354).\n makingChargeOffsetPercent Decimal @default(0) @db.Decimal(6, 3)\n\n verificationStep VerificationStep @default(UNVERIFIED)\n nationalIdImageUrl String?\n businessLicenseUrl String?\n shopImageUrl String?\n\n /// Why verification was rejected (VerificationStep.REJECTED).\n ///\n /// Legacy recorded NO reason: none of its 49 `customers` columns is a\n /// reason/note field, and on rejection it only sent a fixed SMS. So the 14\n /// rows migrated from henza carry the sentinel\n /// «رد شده در سیستم قدیم — فاقد شرح علت ثبت‌شده» instead of NULL, so support\n /// knows why it is blank (owner ruling 2026-10-07). The migration tool\n /// writes it only WHERE this IS NULL, so a re-run cannot overwrite a real\n /// reason entered in the new system.\n verificationRejectionReason String?\n\n /// NULL for rows migrated from henza — legacy recorded no rejection time.\n verificationRejectedAt DateTime?\n\n /// Legacy customers.birth_date, populated on 917 of 1,595 rows. Kept for the\n /// birthday SMS / loyalty campaigns (owner ruling 2026-10-07).\n ///\n /// ⚠ Legacy stores dates as JALALI STRINGS in other tables\n /// (cashes.recive_date is varchar, 88/89 values starting \"14…\"), so this\n /// timestamp may hold mis-entered Jalali years. Confirm the calendar with\n /// docs/migration-precheck-3.sql BEFORE backfilling: copying them unchanged\n /// would produce 917 wrong birthdays, worse for an SMS campaign than none.\n birthDate DateTime?\n\n /// Legacy `image_id` — the profile photo (عکس پروفایل) on the sales-agent\n /// form. Legacy stored an FK to its Image table and read it back as a nested\n /// `image: { id, image }`, so this is a relation, not a bare URL string.\n avatarFileId String?\n avatarFile UploadedFile? @relation(\"CustomerAvatar\", fields: [avatarFileId], references: [id])\n\n /// Legacy had TWO independent switches on a customer:\n /// sts -> may they place orders (this field)\n /// active -> is the account enabled (isActive, below)\n /// The port previously drove both from isActive; they are separate again.\n canPlaceOrders Boolean @default(true)\n\n isActive Boolean @default(true)\n /// Legacy archive flag — the archived list filtered on this, not on isActive.\n isArchived Boolean @default(false)\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n addresses CustomerAddress[]\n orders Order[]\n preOrders PreOrder[]\n ledgerEntries LedgerEntry[]\n walletBonuses WalletBonus[]\n comments Comment[]\n promotions Promotion[]\n notifications NotificationRecipient[]\n activityLogs CustomerActivityLog[]\n otpChallenges CustomerOtp[]\n favorites CustomerFavorite[]\n\n @@index([referredByAgentId])\n @@index([firstName])\n @@index([lastName])\n}\n\n/// Legacy `fav` (251 rows) — saved products. The target had no model for this,\n/// so every customer's favourites would have been lost in the migration; the\n/// owner confirmed on 2026-10-06 that they matter.\n///\n/// Legacy `fav` has two columns and NO primary key. The composite key here\n/// supplies the constraint the source lacks (the precheck found 0 duplicate\n/// pairs, but the tool should still SELECT DISTINCT). 14 of the 251 rows point\n/// at a deleted customer and must be skipped.\n///\n/// Legacy's denormalised `product.count_fav` counter is deliberately NOT\n/// recreated as a column — derive it from this table.\nmodel CustomerFavorite {\n customerId String\n customer Customer @relation(fields: [customerId], references: [id], onDelete: Cascade)\n productId String\n product Product @relation(fields: [productId], references: [id], onDelete: Cascade)\n createdAt DateTime @default(now())\n\n @@id([customerId, productId])\n @@index([productId])\n}\n\nmodel CustomerAddress {\n id String @id @default(cuid())\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n cityId String?\n city City? @relation(fields: [cityId], references: [id])\n addressLine String\n isDefault Boolean @default(false)\n}\n\nmodel Branch {\n id String @id @default(cuid())\n name String\n /// Legacy Branch.address / phone — both are columns in the branch grid.\n address String?\n phone String?\n /// Legacy GET branch/active/{id} toggles this.\n isActive Boolean @default(true)\n cityId String?\n city City? @relation(fields: [cityId], references: [id])\n adminUsers AdminUser[]\n orders Order[]\n allocations BranchAllocation[]\n}\n\nmodel Workshop {\n id String @id @default(cuid())\n name String\n /// Legacy Workshop.address / phone — both are columns in the workshop grid.\n address String?\n phone String?\n /// The supervisor created alongside the workshop by the legacy Add form.\n supervisorId String?\n supervisor AdminUser? @relation(\"WorkshopSupervisor\", fields: [supervisorId], references: [id])\n isActive Boolean @default(true)\n preOrders PreOrder[]\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Catalog — item reference catalog\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel Category {\n id String @id @default(cuid())\n title String\n /// Legacy Category.type — which storefront the category belongs to:\n /// 1 سایت | 2 اپلیکشن موبایل. Drives the \"type_str\" grid column.\n type Int @default(1)\n /// Legacy Category.image / icon — the grid renders the image, the storefront the icon.\n imageUrl String?\n iconUrl String?\n /// Legacy meta tag + description, used for SEO on the site categories.\n metaTag String?\n description String?\n parentId String?\n parent Category? @relation(\"CategoryTree\", fields: [parentId], references: [id])\n children Category[] @relation(\"CategoryTree\")\n products Product[]\n promotions Promotion[]\n}\n\nmodel Brand {\n id String @id @default(cuid())\n title String\n products Product[]\n promotions Promotion[]\n}\n\n/// Curated product groupings — replaces legacy \"Ciny/CinyProduct\" (a tagging\n/// feature, NOT a gold-price snapshot mechanism, despite the misleading legacy name).\nmodel Collection {\n id String @id @default(cuid())\n title String\n description String?\n isActive Boolean @default(true)\n products CollectionProduct[]\n}\n\nmodel CollectionProduct {\n collectionId String\n collection Collection @relation(fields: [collectionId], references: [id])\n productId String\n product Product @relation(fields: [productId], references: [id])\n\n @@id([collectionId, productId])\n}\n\nmodel Product {\n id String @id @default(cuid())\n title String\n description String?\n categoryId String?\n category Category? @relation(fields: [categoryId], references: [id])\n brandId String?\n brand Brand? @relation(fields: [brandId], references: [id])\n /// Legacy Product.product_code — the human-facing SKU shown in the grid.\n productCode String? @unique\n /// Legacy Product.show_type: 1 site, 2 mobile, 3 both.\n showType Int @default(3)\n isActive Boolean @default(true)\n createdAt DateTime @default(now())\n\n /// Stock of the linked کارساخته as last read from the accounting software\n /// (D27). Weight for gram-type items, count for count-type ones — whichever\n /// the software reports. At zero or below the product is unavailable in the\n /// app (pre-order variants excepted). Null = not linked or never synced.\n accountingStockWeight Decimal? @db.Decimal(14, 4)\n accountingStockCount Decimal? @db.Decimal(14, 4)\n accountingStockAt DateTime?\n\n variants ProductVariant[]\n images ProductImage[]\n collections CollectionProduct[]\n comments Comment[]\n promotions Promotion[]\n allocationItems BranchAllocationItem[]\n favoritedBy CustomerFavorite[]\n}\n\nmodel ProductImage {\n id String @id @default(cuid())\n productId String\n product Product @relation(fields: [productId], references: [id])\n url String\n sortOrder Int @default(0)\n /// Legacy had 4 distinct upload slots (تصویر شاخص / تصویر شاخص موبایل /\n /// گالری تصاویر سایت / گالری تصاویر موبایل) — GALLERY is the default so\n /// existing rows and any generic \"just attach an image\" caller keep working.\n role ProductImageRole @default(GALLERY)\n\n /// Variants that display this image. A gallery image may back several\n /// variants (one photo, several weights), which is why this is a plain\n /// one-to-many and not a join table.\n variants ProductVariant[]\n}\n\nenum ProductImageRole {\n FEATURED\n FEATURED_MOBILE\n GALLERY\n GALLERY_MOBILE\n}\n\nmodel ProductVariant {\n id String @id @default(cuid())\n productId String\n product Product @relation(fields: [productId], references: [id])\n title String\n sku String? @unique\n /// Base/raw weight before making charge (\"rash weight\").\n rashWeightGrams Decimal @db.Decimal(14, 4)\n /// Default making-charge percentage applied on top of rash weight.\n defaultWagePercent Decimal @db.Decimal(6, 3)\n /// Legacy ProductVariant.qty — on-hand stock. The cart refuses a variant with\n /// qty 0 unless it is flagged pre-order, so both fields are required for that\n /// guard to work (see apps/admin-panel/src/stores/cart.ts).\n qty Int @default(0)\n /// Legacy is_pre_order: orderable even at zero stock.\n isPreOrder Boolean @default(false)\n isActive Boolean @default(true)\n\n /// The gallery image shown for this variant, picked from its own product's\n /// images — never a re-uploaded copy. onDelete: SetNull because dropping an\n /// image must never cascade into the variant: OrderItem rows reference\n /// variants, so losing one would break order history.\n imageId String?\n image ProductImage? @relation(fields: [imageId], references: [id], onDelete: SetNull)\n\n orderItems OrderItem[]\n\n @@index([imageId])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Orders — stock orders (debt-bearing)\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel Order {\n id String @id @default(cuid())\n orderNumber String @unique\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n branchId String?\n branch Branch? @relation(fields: [branchId], references: [id])\n /// Which sales channel placed this order — see OrderChannel.\n channel OrderChannel @default(RETAIL)\n status OrderStatus @default(PLACED)\n\n /// Total gold weight incl. wage across all items (\"allGram\" / order.w).\n totalGoldWeightGrams Decimal @db.Decimal(14, 4)\n /// Pure making-charge weight component (totalGoldWeightGrams minus raw weight sum).\n wageWeightGrams Decimal @db.Decimal(14, 4)\n /// Flat Rial charge independent of gold price (e.g. stones) — legacy rial_input.\n flatRialCharge Decimal @default(0) @db.Decimal(20, 2)\n\n isSuspendedOverCreditLimit Boolean @default(false)\n deliveredAt DateTime? // setting this is what triggers debt recognition\n\n /// The sales expert this order is credited to, fixed when it is placed:\n /// the customer's referring expert AT THAT MOMENT. Legacy `orders.reagent_id`,\n /// set once at creation (ApiMobileController.php:601) and never moved, so a\n /// customer changing expert later does not move past sales or commission\n /// (owner ruling 2026-10-08). «میزان فروش» counts from here, never from the\n /// customer's current referrer.\n salesAgentId String?\n salesAgent AdminUser? @relation(\"OrderSalesAgent\", fields: [salesAgentId], references: [id], onDelete: SetNull)\n\n /// History only: a legacy order whose `reagent_id` named a customer who is\n /// not a sales expert (one such customer, 17 orders in 2022). Legacy counted\n /// those orders in that customer's own «میزان فروش»; this keeps that figure\n /// exact. Never set for a new order.\n referrerCustomerId String?\n referrerCustomer Customer? @relation(\"OrderReferrerCustomer\", fields: [referrerCustomerId], references: [id], onDelete: SetNull)\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n items OrderItem[]\n statusEvents OrderStatusEvent[]\n ledgerEntries LedgerEntry[]\n convertedFromPreOrder PreOrder?\n\n @@index([customerId])\n @@index([status])\n @@index([salesAgentId])\n @@index([referrerCustomerId])\n}\n\nmodel OrderItem {\n id String @id @default(cuid())\n orderId String\n order Order @relation(fields: [orderId], references: [id])\n productVariantId String\n productVariant ProductVariant @relation(fields: [productVariantId], references: [id])\n quantity Int\n\n // Snapshots at order time — never re-read from ProductVariant after placement.\n rashWeightGramsSnapshot Decimal @db.Decimal(14, 4)\n wagePercentSnapshot Decimal @db.Decimal(6, 3)\n discountPercentSnapshot Decimal @default(0) @db.Decimal(6, 3)\n /// computed: rash*(1 + (wagePercent-discount)/100)\n computedWeightGrams Decimal @db.Decimal(14, 4)\n flatRialCharge Decimal @default(0) @db.Decimal(20, 2)\n}\n\nmodel OrderStatusEvent {\n id String @id @default(cuid())\n orderId String\n order Order @relation(fields: [orderId], references: [id])\n fromStatus OrderStatus?\n toStatus OrderStatus\n note String?\n actorAdminUserId String?\n actorAdminUser AdminUser? @relation(fields: [actorAdminUserId], references: [id])\n createdAt DateTime @default(now())\n\n @@index([orderId])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Pre-orders — custom manufacturing requests (not debt-bearing until converted)\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel PreOrder {\n id String @id @default(cuid())\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n cityId String?\n city City? @relation(fields: [cityId], references: [id])\n workshopId String?\n workshop Workshop? @relation(fields: [workshopId], references: [id])\n status PreOrderStatus @default(PLACED)\n\n designImageUrl String?\n colorName String?\n sizeSpec String?\n stoneColor String?\n minaColor String?\n estimatedWeightGrams Decimal? @db.Decimal(14, 4)\n estimatedPriceRial Decimal? @db.Decimal(20, 2)\n description String?\n\n /// Once priced, an admin converts this into a real (debt-bearing) Order.\n convertedOrderId String? @unique\n convertedOrder Order? @relation(fields: [convertedOrderId], references: [id])\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n statusEvents PreOrderStatusEvent[]\n\n @@index([customerId])\n}\n\nmodel PreOrderStatusEvent {\n id String @id @default(cuid())\n preOrderId String\n preOrder PreOrder @relation(fields: [preOrderId], references: [id])\n /// Field-level diff, e.g. {\"status\": {\"old\": \"PLACED\", \"new\": \"ADMIN_APPROVED\"}}\n changes Json\n actorAdminUserId String?\n actorAdminUser AdminUser? @relation(fields: [actorAdminUserId], references: [id])\n ipAddress String?\n createdAt DateTime @default(now())\n\n @@index([preOrderId])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Accounting — the dual-currency ledger (core of the system)\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel LedgerEntry {\n id String @id @default(cuid())\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n\n currency LedgerCurrency\n direction LedgerDirection\n sourceType LedgerSourceType\n /// Always positive; direction determines the sign applied to the customer balance.\n amount Decimal @db.Decimal(20, 4)\n\n /// Purity of the physical instrument, for REPAYMENT_MELTED_GOLD (e.g. 750, 916).\n karatPerMille Int?\n /// Gold price/gram at conversion time, for REPAYMENT_CASH.\n pricePerGramRialAtEntry Decimal? @db.Decimal(20, 2)\n\n orderId String?\n order Order? @relation(fields: [orderId], references: [id])\n\n /// Pending entries don't count toward the cached customer balance until confirmed.\n confirmed Boolean @default(false)\n confirmedAt DateTime?\n postedByAdminUserId String?\n postedByAdminUser AdminUser? @relation(fields: [postedByAdminUserId], references: [id])\n\n /// Instrument metadata from the legacy \"cash\" document form. Which fields are\n /// filled depends on sourceType: a melted-gold receipt carries lab/hallmark and\n /// the pre-normalization weight, a cheque carries the account and bank, and a\n /// transfer carries its destination.\n /// Legacy columns: lab, ang, account_name, bank_name, to, original_value, recive_date.\n labName String?\n hallmark String?\n accountName String?\n bankName String?\n transferTo String?\n /// Weight as handed over, BEFORE karat normalization (legacy original_value).\n originalValue Decimal? @db.Decimal(14, 4)\n /// Rial amount for cash/cheque documents (legacy price).\n priceRial Decimal? @db.Decimal(20, 2)\n receivedAt DateTime?\n\n note String?\n createdAt DateTime @default(now())\n\n @@index([customerId, currency])\n @@index([orderId])\n}\n\n/// Replaces legacy WebServiceGold / ConfigStatic.gold_price — timestamped price feed.\nmodel GoldPriceQuote {\n id String @id @default(cuid())\n karatPerMille Int\n pricePerGramRial Decimal @db.Decimal(20, 2)\n source String\n quotedAt DateTime @default(now())\n\n @@index([karatPerMille, quotedAt])\n}\n\n/// Time-limited gold cashback bonus — replaces the legacy Rooyesh\\Wallet gold credit.\nmodel WalletBonus {\n id String @id @default(cuid())\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n orderId String?\n goldGrams Decimal @db.Decimal(14, 4)\n grantedAt DateTime @default(now())\n expiresAt DateTime\n consumedAt DateTime?\n isActive Boolean @default(true)\n\n @@index([customerId, isActive])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Admin ACL — faithful port of the legacy granular permission model.\n//\n// Legacy (henza_server):\n// Schema::create('permission', function (Blueprint $table) {\n// $table->string('rid');\n// $table->integer('ut');\n// $table->primary(['rid' , 'ut']);\n// });\n//\n// Permissions attach to the USER TYPE (`ut`), never to an individual user, so\n// every admin of a given type shares one permission set. `ut` pointed at a row\n// in the legacy `config_static` lookup table; UserType is that table, narrowed\n// to the admin-user-type rows it was actually used for.\n//\n// A `rid` is a dotted permission id such as \"persons.list.client.omde\". The\n// frontend expands each stored rid into its ancestors at runtime via\n// checkParent() — see apps/admin-panel/src/stores/users.ts. Only the 58 leaf\n// rids the routers actually gate are seeded; ancestors are derived, not stored.\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel UserType {\n /// Legacy `permission.ut` / `users.ut` — an integer, kept as the PK so seeded\n /// rows keep their legacy identity rather than getting new cuids.\n id Int @id\n title String\n isActive Boolean @default(true)\n createdAt DateTime @default(now())\n\n permissions Permission[]\n adminUsers AdminUser[]\n\n @@map(\"user_type\")\n}\n\nmodel Permission {\n /// Dotted permission id, e.g. \"order.list\", \"persons.list.client.omde\".\n rid String\n userTypeId Int\n userType UserType @relation(fields: [userTypeId], references: [id], onDelete: Cascade)\n\n /// Legacy's composite primary key (rid, ut), preserved exactly.\n @@id([rid, userTypeId])\n @@index([userTypeId])\n @@map(\"permission\")\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Product comments / reviews — legacy `comment` table (App\\Models\\Comment),\n// moderated from views/customer/Comments/Comments.vue.\n//\n// Legacy fillable: product_id, comment, reply_to, sts, customer_id\n// Legacy Comment::$STS = [1 => 'در انتظار تایید', 2 => 'تایید شده', 3 => 'رد شده']\n// which is represented here as an enum rather than a magic integer.\n// ─────────────────────────────────────────────────────────────────────────\n\nenum CommentStatus {\n PENDING // 1 — در انتظار تایید\n APPROVED // 2 — تایید شده\n REJECTED // 3 — رد شده\n}\n\nmodel Comment {\n id String @id @default(cuid())\n productId String\n product Product @relation(fields: [productId], references: [id])\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n body String\n status CommentStatus @default(PENDING)\n\n /// Legacy `reply_to`: a staff reply threads under the comment it answers.\n replyToId String?\n replyTo Comment? @relation(\"CommentReplies\", fields: [replyToId], references: [id])\n replies Comment[] @relation(\"CommentReplies\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@index([productId])\n @@index([customerId])\n @@index([status])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Settings — replaces legacy `config_static`, a key/value table the admin\n// panel read and wrote through endpoints like /wallet/config and\n// /const/__list__ut. Values are stored as JSON so a setting can hold a scalar,\n// an object, or the dynamic option lists legacy kept under `__list__*` keys.\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel Setting {\n key String @id\n value Json\n updatedAt DateTime @updatedAt\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Accounting integration (D27) — the shop's accounting software, Tahesab or\n// Zarrin, chosen in the admin panel. Configuration lives in the Setting row\n// `accounting.config` (never served by the generic `const` routes). Plan:\n// docs/ACCOUNTING-INTEGRATION-PLAN.md.\n//\n// `provider` is the driver name ('tahesab' | 'zarrin'), a plain string like\n// SMS_PROVIDER so a new driver needs no migration. Links are per provider, so\n// switching provider and back loses nothing.\n// ─────────────────────────────────────────────────────────────────────────\n\nenum AccountingEntityType {\n CUSTOMER\n PRODUCT\n}\n\n/// One app row ↔ one record in the accounting software (customer account or\n/// کارساخته).\nmodel AccountingLink {\n id String @id @default(cuid())\n provider String\n entityType AccountingEntityType\n entityId String\n /// The record's code in the accounting software (Tahesab Moshtari_Code /\n /// Zarrin idHesab; for products the Zarrin idKar or the Tahesab Name_Kar).\n externalCode String\n externalName String?\n /// How the link came to be: LINKED (matched by mobile/name), IMPORTED (app\n /// row created from the accounting record), PUSHED (accounting record created\n /// from the app row) or MANUAL (an admin typed the code).\n origin String\n /// The record as last read, for display only.\n snapshot Json?\n syncedAt DateTime @default(now())\n createdAt DateTime @default(now())\n\n @@unique([provider, entityType, entityId])\n @@unique([provider, entityType, externalCode])\n @@index([entityType, entityId])\n}\n\nenum AccountingOutboxKind {\n CUSTOMER_PUSH\n PRODUCT_PUSH\n ORDER_DOCUMENT\n ORDER_DOCUMENT_DELETE\n}\n\nenum AccountingOutboxStatus {\n PENDING\n /// A call was in flight. Found at startup, it means the process died mid-call\n /// and the outcome is unknown — see AccountingOutboxWorker.\n SENDING\n SENT\n FAILED\n /// Unsafe to retry automatically (e.g. a Zarrin call timed out: Zarrin has no\n /// idempotency key, so a blind retry could post the document twice).\n NEEDS_REVIEW\n /// Closed by an admin from the log screen.\n RESOLVED\n}\n\n/// Work to push to the accounting software. Written in the SAME transaction as\n/// the change that causes it, so an outage of the accounting software never\n/// loses an event and never blocks the app.\nmodel AccountingOutbox {\n id String @id @default(cuid())\n provider String\n kind AccountingOutboxKind\n entityId String\n status AccountingOutboxStatus @default(PENDING)\n attempts Int @default(0)\n nextAttemptAt DateTime @default(now())\n lastError String?\n /// What the accounting software returned as the document/record id.\n externalRef String?\n /// Per-step progress of multi-call jobs (a Zarrin document is one call per\n /// line), so a failure resumes where it stopped.\n progress Json?\n /// Last request/response, for the log screen. Never contains the token.\n lastRequest Json?\n lastResponse Json?\n sentAt DateTime?\n resolvedById String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@index([status, nextAttemptAt])\n @@index([kind, entityId])\n}\n\n/// Something a pull found that needs a human: an account with no mobile, two\n/// accounts sharing one mobile, a کارساخته group with no category mapping.\nmodel AccountingIssue {\n id String @id @default(cuid())\n provider String\n kind String\n externalCode String\n entityId String?\n message String\n data Json?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n resolvedAt DateTime?\n\n @@unique([provider, kind, externalCode])\n @@index([resolvedAt])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Promotions / discounts — legacy views/promotion/*, served by\n// PromotionController (`product/variant/promotion`). The redesigned schema had\n// no promotion concept at all; this models what the legacy forms actually\n// collect.\n// ─────────────────────────────────────────────────────────────────────────\n\n/// Legacy Promotion.type — what the discount is scoped to.\nenum PromotionScope {\n PRODUCT // 1 محصولات\n CATEGORY // 2 دسته بندی\n CUSTOMER // 3 مشتری\n BRAND // 4 برند\n}\n\n/// Legacy Promotion.use_only — how often a customer may redeem it.\nenum PromotionUsage {\n ONCE // 1 فقط یکبار\n UNTIL_END_DATE // 2 تا تاریخ پایان\n}\n\nmodel Promotion {\n id String @id @default(cuid())\n title String\n description String?\n scope PromotionScope @default(PRODUCT)\n usage PromotionUsage @default(ONCE)\n /// Percentage off, 0-100 (legacy discount_percent).\n discountPercent Decimal @db.Decimal(6, 3)\n isActive Boolean @default(true)\n /// Which storefront it shows on, mirroring Product.showType (legacy platform).\n platform Int @default(3)\n\n startsAt DateTime?\n endsAt DateTime?\n\n /// Exactly one of these is populated, per `scope`.\n productId String?\n product Product? @relation(fields: [productId], references: [id])\n categoryId String?\n category Category? @relation(fields: [categoryId], references: [id])\n customerId String?\n customer Customer? @relation(fields: [customerId], references: [id])\n brandId String?\n brand Brand? @relation(fields: [brandId], references: [id])\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@index([scope, isActive])\n}\n\n/// Legacy \"ignore\" table (views/offersIgnore) — specific products, categories,\n/// customers or brands excluded from the automatic discount engine.\n/// Legacy posts { type, item_id[] }: \"type\" reuses the promotion scope codes\n/// (1 محصولات | 2 دسته بندی | 3 مشتری | 4 برند) and \"itemId\" is the excluded row.\nmodel PromotionExclusion {\n id String @id @default(cuid())\n type Int\n itemId String\n createdAt DateTime @default(now())\n\n @@unique([type, itemId])\n @@index([type])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Branch stock allocation — legacy views/invoice/* (\"فاکتور انتقال\"), served by\n// BranchController as `branch/product`. Despite the screen being called an\n// invoice, it is not a sales document: it records which products head office\n// allocated to a branch, and who allocated them.\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel BranchAllocation {\n id String @id @default(cuid())\n branchId String\n branch Branch @relation(fields: [branchId], references: [id])\n\n /// Legacy `allocator_user` — the admin who filed the allocation.\n allocatorAdminUserId String?\n allocatorAdminUser AdminUser? @relation(\"AllocationAuthor\", fields: [allocatorAdminUserId], references: [id])\n\n note String?\n createdAt DateTime @default(now())\n\n items BranchAllocationItem[]\n\n @@index([branchId])\n}\n\nmodel BranchAllocationItem {\n id String @id @default(cuid())\n allocationId String\n allocation BranchAllocation @relation(fields: [allocationId], references: [id], onDelete: Cascade)\n productId String\n product Product @relation(fields: [productId], references: [id])\n /// Weight snapshot at allocation time, so later catalog edits do not rewrite history.\n weightGrams Decimal? @db.Decimal(14, 4)\n\n @@unique([allocationId, productId])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Messaging + audit — legacy views/sms, views/notify, views/newsletters and\n// views/statics. None of these had a model in the redesigned schema.\n// ─────────────────────────────────────────────────────────────────────────\n\n/// Who an SMS or notification was aimed at. Legacy's sms/create offered these\n/// audiences, each gated by its own rid (sms.create.all, .omde, .single, ...).\nenum MessageAudience {\n SINGLE_NUMBER // یک شماره\n MULTIPLE_NUMBERS // چند شماره\n ALL_CUSTOMERS // همه\n WHOLESALE_CUSTOMERS // عمده\n RETAIL_CUSTOMERS // تک\n SALES_AGENTS // کارشناسان فروش\n}\n\nmodel SmsMessage {\n id String @id @default(cuid())\n audience MessageAudience\n /// Comma-separated recipients for the SINGLE/MULTIPLE audiences.\n recipients String?\n body String\n /// How many numbers the send actually resolved to.\n sentCount Int @default(0)\n\n sentByAdminUserId String?\n sentByAdminUser AdminUser? @relation(\"SmsAuthor\", fields: [sentByAdminUserId], references: [id])\n\n createdAt DateTime @default(now())\n\n @@index([createdAt])\n}\n\nmodel Notification {\n id String @id @default(cuid())\n title String\n body String\n audience MessageAudience @default(ALL_CUSTOMERS)\n\n sentByAdminUserId String?\n sentByAdminUser AdminUser? @relation(\"NotificationAuthor\", fields: [sentByAdminUserId], references: [id])\n\n createdAt DateTime @default(now())\n\n recipients NotificationRecipient[]\n\n @@index([createdAt])\n}\n\n/// Per-customer delivery + read state — legacy `GET notify/read/{id}`.\nmodel NotificationRecipient {\n id String @id @default(cuid())\n notificationId String\n notification Notification @relation(fields: [notificationId], references: [id], onDelete: Cascade)\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n readAt DateTime?\n\n @@unique([notificationId, customerId])\n @@index([customerId, readAt])\n}\n\n/// Legacy views/newsletters — the mailing-list signups collected by the site.\nmodel NewsletterSubscriber {\n id String @id @default(cuid())\n email String?\n mobile String?\n createdAt DateTime @default(now())\n\n @@unique([email])\n @@unique([mobile])\n}\n\n/// Legacy views/statics — the customer activity log the \"آمار\" screen reads\n/// (`log/list/customer`, `log/ago/{customerId}`).\nmodel CustomerActivityLog {\n id String @id @default(cuid())\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n /// Free-form action key, e.g. 'login', 'order.placed', 'profile.updated'.\n action String\n detail String?\n createdAt DateTime @default(now())\n\n @@index([customerId, createdAt])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Uploads — replaces the legacy MyUpload / SingleUploadInput widgets, which\n// POSTed to a file endpoint and stored the returned URL on the owning record.\n// Ports of those forms currently take a URL by hand; this gives them a real\n// destination to upload to.\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel UploadedFile {\n id String @id @default(cuid())\n /// Public URL the stored file is served from.\n url String\n originalName String\n mimeType String\n sizeBytes Int\n /// Free-form tag for what the file belongs to, e.g. 'product', 'category',\n /// 'customer.nationalId'. Kept loose so a new form needs no schema change.\n purpose String?\n\n uploadedByAdminUserId String?\n uploadedByAdminUser AdminUser? @relation(\"FileUploader\", fields: [uploadedByAdminUserId], references: [id])\n\n createdAt DateTime @default(now())\n customerAvatars Customer[] @relation(\"CustomerAvatar\")\n adminUserAvatars AdminUser[] @relation(\"AdminUserAvatar\")\n\n @@index([purpose])\n}\n\n/// One OTP login challenge for a customer.\n///\n/// Ports henza_server's flow (ApiMobileController.php:39-78), where userAuth\n/// generated rand(1000,9999), stored it on the customer row as `send_password`\n/// and sent it by SMS, and userVerfiy compared the submitted code against it\n/// (mismatch -> HTTP 422).\n///\n/// Three deliberate improvements over the reference, approved by the user\n/// (docs/parity/DECISIONS.md D6 and T1):\n/// 1. the code is stored as a bcrypt hash, never in plain text — the\n/// reference kept it readable in a customer column;\n/// 2. it expires (`expiresAt`) — the reference's code stayed valid forever;\n/// 3. attempts are counted and the challenge locks out — the reference had\n/// no limit at all.\n/// The parity behaviour itself is the code comparison and the rejection.\nmodel CustomerOtp {\n id String @id @default(cuid())\n /// Normalised to English digits before storing, as the reference does with\n /// Utility::faTOen() on both send and verify.\n mobile String\n customerId String\n customer Customer @relation(fields: [customerId], references: [id], onDelete: Cascade)\n\n /// bcrypt hash of the 4-digit code. Never the code itself.\n codeHash String\n expiresAt DateTime\n /// Failed verify attempts against THIS challenge.\n attempts Int @default(0)\n /// Set when the code is accepted, so one challenge cannot be reused.\n consumedAt DateTime?\n\n /// Kept for the per-IP send throttle.\n requestIp String?\n createdAt DateTime @default(now())\n\n @@index([mobile, createdAt])\n @@index([customerId])\n @@index([expiresAt])\n}\n\n/// Bespoke migration ledger left by the EARLIER, pre-Prisma port.\n///\n/// It predates Prisma Migrate in this repo and holds 12 historical rows\n/// (`0001_init.sql`, `0002_admin_schema.sql`, `seed:initial`, and the early\n/// `2026091…` migrations). It is the only record of how that port was applied,\n/// so it is **kept and never written to or deleted from** (DEAD-07).\n///\n/// It is declared here purely so `prisma migrate diff` stops proposing\n/// `DROP TABLE \"_goldbank_migrations\"` — an undeclared table reads as drift.\n/// `@@ignore` keeps it out of Prisma Client: nothing in the application should\n/// ever read or write it, and Prisma Migrate will not manage its shape either.\n///\n/// Prisma's own ledger is `_prisma_migrations`, which is separate and is never\n/// edited by hand (D14).\nmodel goldbank_migrations {\n name String @id\n appliedAt DateTime @default(now()) @map(\"applied_at\") @db.Timestamptz(6)\n\n @@map(\"_goldbank_migrations\")\n @@ignore\n}\n", + "inlineSchemaHash": "92e2cff33376f2e839b0a17e3a4d04d885200afe9951b002f1abfcbabf7f7932", "copyEngine": true } config.dirname = '/' -config.runtimeDataModel = JSON.parse("{\"models\":{\"City\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"province\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"percent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy cities.percent / percent_aux — per-city wage surcharges the city\\\\nscreen edits through GET cities/get-percent/{id} and get-percent-aux/{id}.\"},{\"name\":\"percentAux\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CityToCustomer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"addresses\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CustomerAddress\",\"relationName\":\"CityToCustomerAddress\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branches\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Branch\",\"relationName\":\"BranchToCity\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrder\",\"relationName\":\"CityToPreOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"AdminUser\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fullName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mobile\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"passwordHash\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"role\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminRole\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userTypeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy `users.ut`. Granular ACL lives here (Permission rows hang off UserType);\\\\nthe coarse `role` enum above is retained for the business rules that already\\\\nswitch on it. Nullable so existing seeded admins remain valid.\"},{\"name\":\"userType\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UserType\",\"relationName\":\"AdminUserToUserType\",\"relationFromFields\":[\"userTypeId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branch\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Branch\",\"relationName\":\"AdminUserToBranch\",\"relationFromFields\":[\"branchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"wagePercent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"referredCustomers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"ReferralAgent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"supervisedWorkshops\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Workshop\",\"relationName\":\"WorkshopSupervisor\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branchAllocations\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BranchAllocation\",\"relationName\":\"AllocationAuthor\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"postedLedgerEntries\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerEntry\",\"relationName\":\"AdminUserToLedgerEntry\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderStatusEvents\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderStatusEvent\",\"relationName\":\"AdminUserToOrderStatusEvent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrderStatusEvents\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrderStatusEvent\",\"relationName\":\"AdminUserToPreOrderStatusEvent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sentSmsMessages\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SmsMessage\",\"relationName\":\"SmsAuthor\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sentNotifications\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Notification\",\"relationName\":\"NotificationAuthor\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"uploadedFiles\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UploadedFile\",\"relationName\":\"FileUploader\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Customer\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fullName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mobile\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"nationalCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"passwordHash\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"cityId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"city\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"City\",\"relationName\":\"CityToCustomer\",\"relationFromFields\":[\"cityId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"kind\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"CustomerKind\",\"default\":\"APP_SHOPKEEPER\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy Customer.type — distinguishes بنکدار from مغازه دار, which the\\\\nBankerList / ShopkeeperList screens filter on.\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy contact + shop columns, shown on the wholesale customer form and as\\\\n(hidden-by-default) columns in its grid.\"},{\"name\":\"address\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"storeName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"pasazhName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"zone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memberCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy mcode — the operator-assigned customer code.\"},{\"name\":\"referredByAgentId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"referredByAgent\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"ReferralAgent\",\"relationFromFields\":[\"referredByAgentId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"goldCreditLimitGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"goldDebtGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fiatDebtRial\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"verificationStep\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"VerificationStep\",\"default\":\"UNVERIFIED\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"nationalIdImageUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"businessLicenseUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"shopImageUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"avatarFileId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy `image_id` — the profile photo (عکس پروفایل) on the sales-agent\\\\nform. Legacy stored an FK to its Image table and read it back as a nested\\\\n`image: { id, image }`, so this is a relation, not a bare URL string.\"},{\"name\":\"avatarFile\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UploadedFile\",\"relationName\":\"CustomerAvatar\",\"relationFromFields\":[\"avatarFileId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"canPlaceOrders\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy had TWO independent switches on a customer:\\\\nsts -> may they place orders (this field)\\\\nactive -> is the account enabled (isActive, below)\\\\nThe port previously drove both from isActive; they are separate again.\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isArchived\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy archive flag — the archived list filtered on this, not on isActive.\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"addresses\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CustomerAddress\",\"relationName\":\"CustomerToCustomerAddress\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"CustomerToOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrder\",\"relationName\":\"CustomerToPreOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ledgerEntries\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerEntry\",\"relationName\":\"CustomerToLedgerEntry\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"walletBonuses\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"WalletBonus\",\"relationName\":\"CustomerToWalletBonus\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"comments\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Comment\",\"relationName\":\"CommentToCustomer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"promotions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Promotion\",\"relationName\":\"CustomerToPromotion\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notifications\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"NotificationRecipient\",\"relationName\":\"CustomerToNotificationRecipient\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"activityLogs\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CustomerActivityLog\",\"relationName\":\"CustomerToCustomerActivityLog\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"CustomerAddress\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToCustomerAddress\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"cityId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"city\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"City\",\"relationName\":\"CityToCustomerAddress\",\"relationFromFields\":[\"cityId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"addressLine\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isDefault\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Branch\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"address\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy Branch.address / phone — both are columns in the branch grid.\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy GET branch/active/{id} toggles this.\"},{\"name\":\"cityId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"city\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"City\",\"relationName\":\"BranchToCity\",\"relationFromFields\":[\"cityId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminUsers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminUserToBranch\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"BranchToOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"allocations\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BranchAllocation\",\"relationName\":\"BranchToBranchAllocation\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Workshop\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"address\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy Workshop.address / phone — both are columns in the workshop grid.\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"supervisorId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"The supervisor created alongside the workshop by the legacy Add form.\"},{\"name\":\"supervisor\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"WorkshopSupervisor\",\"relationFromFields\":[\"supervisorId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrder\",\"relationName\":\"PreOrderToWorkshop\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Category\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":1,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy Category.type — which storefront the category belongs to:\\\\n1 سایت | 2 اپلیکشن موبایل. Drives the \\\"type_str\\\" grid column.\"},{\"name\":\"imageUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy Category.image / icon — the grid renders the image, the storefront the icon.\"},{\"name\":\"iconUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"metaTag\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy meta tag + description, used for SEO on the site categories.\"},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"parentId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"parent\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Category\",\"relationName\":\"CategoryTree\",\"relationFromFields\":[\"parentId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"children\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Category\",\"relationName\":\"CategoryTree\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"products\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"CategoryToProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"promotions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Promotion\",\"relationName\":\"CategoryToPromotion\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Brand\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"products\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"BrandToProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"promotions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Promotion\",\"relationName\":\"BrandToPromotion\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Collection\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"products\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CollectionProduct\",\"relationName\":\"CollectionToCollectionProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"Curated product groupings — replaces legacy \\\"Ciny/CinyProduct\\\" (a tagging\\\\nfeature, NOT a gold-price snapshot mechanism, despite the misleading legacy name).\"},\"CollectionProduct\":{\"dbName\":null,\"fields\":[{\"name\":\"collectionId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"collection\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Collection\",\"relationName\":\"CollectionToCollectionProduct\",\"relationFromFields\":[\"collectionId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"product\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"CollectionProductToProduct\",\"relationFromFields\":[\"productId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"collectionId\",\"productId\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Product\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"categoryId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"category\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Category\",\"relationName\":\"CategoryToProduct\",\"relationFromFields\":[\"categoryId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"brandId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"brand\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Brand\",\"relationName\":\"BrandToProduct\",\"relationFromFields\":[\"brandId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy Product.product_code — the human-facing SKU shown in the grid.\"},{\"name\":\"showType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":3,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy Product.show_type: 1 site, 2 mobile, 3 both.\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"variants\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ProductVariant\",\"relationName\":\"ProductToProductVariant\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"images\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ProductImage\",\"relationName\":\"ProductToProductImage\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"collections\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CollectionProduct\",\"relationName\":\"CollectionProductToProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"comments\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Comment\",\"relationName\":\"CommentToProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"promotions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Promotion\",\"relationName\":\"ProductToPromotion\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"allocationItems\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BranchAllocationItem\",\"relationName\":\"BranchAllocationItemToProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ProductImage\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"product\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"ProductToProductImage\",\"relationFromFields\":[\"productId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"url\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sortOrder\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"role\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"ProductImageRole\",\"default\":\"GALLERY\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy had 4 distinct upload slots (تصویر شاخص / تصویر شاخص موبایل /\\\\nگالری تصاویر سایت / گالری تصاویر موبایل) — GALLERY is the default so\\\\nexisting rows and any generic \\\"just attach an image\\\" caller keep working.\"}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ProductVariant\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"product\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"ProductToProductVariant\",\"relationFromFields\":[\"productId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sku\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rashWeightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Base/raw weight before making charge (\\\"rash weight\\\").\"},{\"name\":\"defaultWagePercent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Default making-charge percentage applied on top of rash weight.\"},{\"name\":\"qty\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy ProductVariant.qty — on-hand stock. The cart refuses a variant with\\\\nqty 0 unless it is flagged pre-order, so both fields are required for that\\\\nguard to work (see apps/admin-panel/src/stores/cart.ts).\"},{\"name\":\"isPreOrder\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy is_pre_order: orderable even at zero stock.\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderItems\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderItem\",\"relationName\":\"OrderItemToProductVariant\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Order\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderNumber\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToOrder\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branch\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Branch\",\"relationName\":\"BranchToOrder\",\"relationFromFields\":[\"branchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"channel\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"OrderChannel\",\"default\":\"RETAIL\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Which sales channel placed this order — see OrderChannel.\"},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"OrderStatus\",\"default\":\"PLACED\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"totalGoldWeightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Total gold weight incl. wage across all items (\\\"allGram\\\" / order.w).\"},{\"name\":\"wageWeightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Pure making-charge weight component (totalGoldWeightGrams minus raw weight sum).\"},{\"name\":\"flatRialCharge\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Flat Rial charge independent of gold price (e.g. stones) — legacy rial_input.\"},{\"name\":\"isSuspendedOverCreditLimit\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"deliveredAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"items\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderItem\",\"relationName\":\"OrderToOrderItem\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"statusEvents\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderStatusEvent\",\"relationName\":\"OrderToOrderStatusEvent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ledgerEntries\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerEntry\",\"relationName\":\"LedgerEntryToOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"convertedFromPreOrder\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrder\",\"relationName\":\"OrderToPreOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"OrderItem\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"OrderToOrderItem\",\"relationFromFields\":[\"orderId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productVariantId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productVariant\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ProductVariant\",\"relationName\":\"OrderItemToProductVariant\",\"relationFromFields\":[\"productVariantId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"quantity\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rashWeightGramsSnapshot\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"wagePercentSnapshot\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"discountPercentSnapshot\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"computedWeightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"computed: rash*(1 + (wagePercent-discount)/100)\"},{\"name\":\"flatRialCharge\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"OrderStatusEvent\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"OrderToOrderStatusEvent\",\"relationFromFields\":[\"orderId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fromStatus\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderStatus\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"toStatus\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderStatus\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actorAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actorAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminUserToOrderStatusEvent\",\"relationFromFields\":[\"actorAdminUserId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"PreOrder\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToPreOrder\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"cityId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"city\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"City\",\"relationName\":\"CityToPreOrder\",\"relationFromFields\":[\"cityId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"workshopId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"workshop\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Workshop\",\"relationName\":\"PreOrderToWorkshop\",\"relationFromFields\":[\"workshopId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"PreOrderStatus\",\"default\":\"PLACED\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"designImageUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"colorName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sizeSpec\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"stoneColor\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"minaColor\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"estimatedWeightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"estimatedPriceRial\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"convertedOrderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Once priced, an admin converts this into a real (debt-bearing) Order.\"},{\"name\":\"convertedOrder\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"OrderToPreOrder\",\"relationFromFields\":[\"convertedOrderId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"statusEvents\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrderStatusEvent\",\"relationName\":\"PreOrderToPreOrderStatusEvent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"PreOrderStatusEvent\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrder\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrder\",\"relationName\":\"PreOrderToPreOrderStatusEvent\",\"relationFromFields\":[\"preOrderId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"changes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Field-level diff, e.g. {\\\"status\\\": {\\\"old\\\": \\\"PLACED\\\", \\\"new\\\": \\\"ADMIN_APPROVED\\\"}}\"},{\"name\":\"actorAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actorAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminUserToPreOrderStatusEvent\",\"relationFromFields\":[\"actorAdminUserId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ipAddress\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"LedgerEntry\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToLedgerEntry\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"currency\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerCurrency\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"direction\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerDirection\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sourceType\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerSourceType\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"amount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Always positive; direction determines the sign applied to the customer balance.\"},{\"name\":\"karatPerMille\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Purity of the physical instrument, for REPAYMENT_MELTED_GOLD (e.g. 750, 916).\"},{\"name\":\"pricePerGramRialAtEntry\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Gold price/gram at conversion time, for REPAYMENT_CASH.\"},{\"name\":\"orderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"LedgerEntryToOrder\",\"relationFromFields\":[\"orderId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"confirmed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Pending entries don't count toward the cached customer balance until confirmed.\"},{\"name\":\"confirmedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"postedByAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"postedByAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminUserToLedgerEntry\",\"relationFromFields\":[\"postedByAdminUserId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"labName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Instrument metadata from the legacy \\\"cash\\\" document form. Which fields are\\\\nfilled depends on sourceType: a melted-gold receipt carries lab/hallmark and\\\\nthe pre-normalization weight, a cheque carries the account and bank, and a\\\\ntransfer carries its destination.\\\\nLegacy columns: lab, ang, account_name, bank_name, to, original_value, recive_date.\"},{\"name\":\"hallmark\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"accountName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"bankName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"transferTo\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"originalValue\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Weight as handed over, BEFORE karat normalization (legacy original_value).\"},{\"name\":\"priceRial\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Rial amount for cash/cheque documents (legacy price).\"},{\"name\":\"receivedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"GoldPriceQuote\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"karatPerMille\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"pricePerGramRial\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"source\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"quotedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"Replaces legacy WebServiceGold / ConfigStatic.gold_price — timestamped price feed.\"},\"WalletBonus\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToWalletBonus\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"goldGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"grantedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expiresAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"consumedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"Time-limited gold cashback bonus — replaces the legacy Rooyesh\\\\Wallet gold credit.\"},\"UserType\":{\"dbName\":\"user_type\",\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy `permission.ut` / `users.ut` — an integer, kept as the PK so seeded\\\\nrows keep their legacy identity rather than getting new cuids.\"},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"permissions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Permission\",\"relationName\":\"PermissionToUserType\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminUsers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminUserToUserType\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Permission\":{\"dbName\":\"permission\",\"fields\":[{\"name\":\"rid\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Dotted permission id, e.g. \\\"order.list\\\", \\\"persons.list.client.omde\\\".\"},{\"name\":\"userTypeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userType\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UserType\",\"relationName\":\"PermissionToUserType\",\"relationFromFields\":[\"userTypeId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"rid\",\"userTypeId\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Comment\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"product\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"CommentToProduct\",\"relationFromFields\":[\"productId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CommentToCustomer\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"body\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"CommentStatus\",\"default\":\"PENDING\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"replyToId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy `reply_to`: a staff reply threads under the comment it answers.\"},{\"name\":\"replyTo\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Comment\",\"relationName\":\"CommentReplies\",\"relationFromFields\":[\"replyToId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"replies\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Comment\",\"relationName\":\"CommentReplies\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Setting\":{\"dbName\":null,\"fields\":[{\"name\":\"key\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"value\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Promotion\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scope\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"PromotionScope\",\"default\":\"PRODUCT\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"usage\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"PromotionUsage\",\"default\":\"ONCE\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"discountPercent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Percentage off, 0-100 (legacy discount_percent).\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"platform\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":3,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Which storefront it shows on, mirroring Product.showType (legacy platform).\"},{\"name\":\"startsAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"endsAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Exactly one of these is populated, per `scope`.\"},{\"name\":\"product\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"ProductToPromotion\",\"relationFromFields\":[\"productId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"categoryId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"category\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Category\",\"relationName\":\"CategoryToPromotion\",\"relationFromFields\":[\"categoryId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToPromotion\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"brandId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"brand\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Brand\",\"relationName\":\"BrandToPromotion\",\"relationFromFields\":[\"brandId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"PromotionExclusion\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"itemId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"type\",\"itemId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"type\",\"itemId\"]}],\"isGenerated\":false,\"documentation\":\"Legacy \\\"ignore\\\" table (views/offersIgnore) — specific products, categories,\\\\ncustomers or brands excluded from the automatic discount engine.\\\\nLegacy posts { type, item_id[] }: \\\"type\\\" reuses the promotion scope codes\\\\n(1 محصولات | 2 دسته بندی | 3 مشتری | 4 برند) and \\\"itemId\\\" is the excluded row.\"},\"BranchAllocation\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branch\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Branch\",\"relationName\":\"BranchToBranchAllocation\",\"relationFromFields\":[\"branchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"allocatorAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy `allocator_user` — the admin who filed the allocation.\"},{\"name\":\"allocatorAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AllocationAuthor\",\"relationFromFields\":[\"allocatorAdminUserId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"items\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BranchAllocationItem\",\"relationName\":\"BranchAllocationToBranchAllocationItem\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"BranchAllocationItem\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"allocationId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"allocation\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BranchAllocation\",\"relationName\":\"BranchAllocationToBranchAllocationItem\",\"relationFromFields\":[\"allocationId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"product\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"BranchAllocationItemToProduct\",\"relationFromFields\":[\"productId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"weightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Weight snapshot at allocation time, so later catalog edits do not rewrite history.\"}],\"primaryKey\":null,\"uniqueFields\":[[\"allocationId\",\"productId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"allocationId\",\"productId\"]}],\"isGenerated\":false},\"SmsMessage\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"audience\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MessageAudience\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"recipients\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Comma-separated recipients for the SINGLE/MULTIPLE audiences.\"},{\"name\":\"body\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sentCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"How many numbers the send actually resolved to.\"},{\"name\":\"sentByAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sentByAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"SmsAuthor\",\"relationFromFields\":[\"sentByAdminUserId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Notification\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"body\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"audience\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"MessageAudience\",\"default\":\"ALL_CUSTOMERS\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sentByAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sentByAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"NotificationAuthor\",\"relationFromFields\":[\"sentByAdminUserId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"recipients\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"NotificationRecipient\",\"relationName\":\"NotificationToNotificationRecipient\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"NotificationRecipient\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notificationId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notification\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Notification\",\"relationName\":\"NotificationToNotificationRecipient\",\"relationFromFields\":[\"notificationId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToNotificationRecipient\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"readAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"notificationId\",\"customerId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"notificationId\",\"customerId\"]}],\"isGenerated\":false,\"documentation\":\"Per-customer delivery + read state — legacy `GET notify/read/{id}`.\"},\"NewsletterSubscriber\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mobile\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"email\"],[\"mobile\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"email\"]},{\"name\":null,\"fields\":[\"mobile\"]}],\"isGenerated\":false,\"documentation\":\"Legacy views/newsletters — the mailing-list signups collected by the site.\"},\"CustomerActivityLog\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToCustomerActivityLog\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"action\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Free-form action key, e.g. 'login', 'order.placed', 'profile.updated'.\"},{\"name\":\"detail\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"Legacy views/statics — the customer activity log the \\\"آمار\\\" screen reads\\\\n(`log/list/customer`, `log/ago/{customerId}`).\"},\"UploadedFile\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"url\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Public URL the stored file is served from.\"},{\"name\":\"originalName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mimeType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sizeBytes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"purpose\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Free-form tag for what the file belongs to, e.g. 'product', 'category',\\\\n'customer.nationalId'. Kept loose so a new form needs no schema change.\"},{\"name\":\"uploadedByAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"uploadedByAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"FileUploader\",\"relationFromFields\":[\"uploadedByAdminUserId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerAvatars\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerAvatar\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{\"AdminRole\":{\"values\":[{\"name\":\"SUPER_ADMIN\",\"dbName\":null},{\"name\":\"SYSTEM_APPROVER\",\"dbName\":null},{\"name\":\"SALES_EXPERT\",\"dbName\":null},{\"name\":\"WORKSHOP_SUPERVISOR\",\"dbName\":null},{\"name\":\"ACCOUNTANT\",\"dbName\":null}],\"dbName\":null},\"CustomerKind\":{\"values\":[{\"name\":\"SALES_AGENT\",\"dbName\":null},{\"name\":\"APP_SHOPKEEPER\",\"dbName\":null},{\"name\":\"WALK_IN_SHOPKEEPER\",\"dbName\":null},{\"name\":\"BANKER\",\"dbName\":null},{\"name\":\"WORKSHOP_SUPERVISOR\",\"dbName\":null}],\"dbName\":null,\"documentation\":\"Legacy Customer.type — what kind of wholesale customer this is. Values and\\\\nlabels taken verbatim from bulkCustomer.vue's userTypes list.\"},\"VerificationStep\":{\"values\":[{\"name\":\"UNVERIFIED\",\"dbName\":null},{\"name\":\"STEP_ONE_SUBMITTED\",\"dbName\":null},{\"name\":\"STEP_TWO_SUBMITTED\",\"dbName\":null},{\"name\":\"VERIFIED\",\"dbName\":null}],\"dbName\":null},\"OrderChannel\":{\"values\":[{\"name\":\"RETAIL\",\"dbName\":null},{\"name\":\"WHOLESALE\",\"dbName\":null}],\"dbName\":null,\"documentation\":\"Legacy kept retail and wholesale orders in two SEPARATE tables\\\\n(orders_orders vs orders). The redesigned schema has one Order model, so the\\\\ndistinction lives here instead.\"},\"OrderStatus\":{\"values\":[{\"name\":\"SUSPENDED\",\"dbName\":null},{\"name\":\"PLACED\",\"dbName\":null},{\"name\":\"ADMIN_APPROVED\",\"dbName\":null},{\"name\":\"SOURCING\",\"dbName\":null},{\"name\":\"PREPARING\",\"dbName\":null},{\"name\":\"DELIVERED_TO_AGENT\",\"dbName\":null},{\"name\":\"DELIVERED_TO_CUSTOMER\",\"dbName\":null},{\"name\":\"CANCELLED\",\"dbName\":null}],\"dbName\":null},\"PreOrderStatus\":{\"values\":[{\"name\":\"PLACED\",\"dbName\":null},{\"name\":\"ADMIN_APPROVED\",\"dbName\":null},{\"name\":\"WORKSHOP_APPROVED\",\"dbName\":null},{\"name\":\"READY_TO_SHIP\",\"dbName\":null},{\"name\":\"DELIVERED\",\"dbName\":null},{\"name\":\"CANCELLED\",\"dbName\":null}],\"dbName\":null},\"LedgerCurrency\":{\"values\":[{\"name\":\"GOLD_GRAM\",\"dbName\":null},{\"name\":\"RIAL\",\"dbName\":null}],\"dbName\":null},\"LedgerDirection\":{\"values\":[{\"name\":\"DEBIT\",\"dbName\":null},{\"name\":\"CREDIT\",\"dbName\":null}],\"dbName\":null},\"LedgerSourceType\":{\"values\":[{\"name\":\"ORDER_STOCK\",\"dbName\":null},{\"name\":\"ORDER_PRE_ORDER\",\"dbName\":null},{\"name\":\"REPAYMENT_MELTED_GOLD\",\"dbName\":null},{\"name\":\"REPAYMENT_TRANSFER\",\"dbName\":null},{\"name\":\"REPAYMENT_CHEQUE\",\"dbName\":null},{\"name\":\"REPAYMENT_CASH\",\"dbName\":null},{\"name\":\"WALLET_BONUS\",\"dbName\":null},{\"name\":\"ADJUSTMENT\",\"dbName\":null}],\"dbName\":null},\"ProductImageRole\":{\"values\":[{\"name\":\"FEATURED\",\"dbName\":null},{\"name\":\"FEATURED_MOBILE\",\"dbName\":null},{\"name\":\"GALLERY\",\"dbName\":null},{\"name\":\"GALLERY_MOBILE\",\"dbName\":null}],\"dbName\":null},\"CommentStatus\":{\"values\":[{\"name\":\"PENDING\",\"dbName\":null},{\"name\":\"APPROVED\",\"dbName\":null},{\"name\":\"REJECTED\",\"dbName\":null}],\"dbName\":null},\"PromotionScope\":{\"values\":[{\"name\":\"PRODUCT\",\"dbName\":null},{\"name\":\"CATEGORY\",\"dbName\":null},{\"name\":\"CUSTOMER\",\"dbName\":null},{\"name\":\"BRAND\",\"dbName\":null}],\"dbName\":null,\"documentation\":\"Legacy Promotion.type — what the discount is scoped to.\"},\"PromotionUsage\":{\"values\":[{\"name\":\"ONCE\",\"dbName\":null},{\"name\":\"UNTIL_END_DATE\",\"dbName\":null}],\"dbName\":null,\"documentation\":\"Legacy Promotion.use_only — how often a customer may redeem it.\"},\"MessageAudience\":{\"values\":[{\"name\":\"SINGLE_NUMBER\",\"dbName\":null},{\"name\":\"MULTIPLE_NUMBERS\",\"dbName\":null},{\"name\":\"ALL_CUSTOMERS\",\"dbName\":null},{\"name\":\"WHOLESALE_CUSTOMERS\",\"dbName\":null},{\"name\":\"RETAIL_CUSTOMERS\",\"dbName\":null},{\"name\":\"SALES_AGENTS\",\"dbName\":null}],\"dbName\":null,\"documentation\":\"Who an SMS or notification was aimed at. Legacy's sms/create offered these\\\\naudiences, each gated by its own rid (sms.create.all, .omde, .single, ...).\"}},\"types\":{}}") +config.runtimeDataModel = JSON.parse("{\"models\":{\"City\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"parentId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"parent\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"City\",\"relationName\":\"CityTree\",\"relationFromFields\":[\"parentId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Restrict\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"children\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"City\",\"relationName\":\"CityTree\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"percent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy cities.percent / percent_aux — per-city wage surcharges the city\\\\nscreen edits through GET cities/get-percent/{id} and get-percent-aux/{id}.\"},{\"name\":\"percentAux\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CityToCustomer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"addresses\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CustomerAddress\",\"relationName\":\"CityToCustomerAddress\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branches\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Branch\",\"relationName\":\"BranchToCity\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrder\",\"relationName\":\"CityToPreOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"salesExpertProfiles\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SalesExpertProfile\",\"relationName\":\"CityToSalesExpertProfile\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"Legacy `cities` is a tree (country > province > city > district) and so is\\\\nthis: a city hangs under its `parent`. In the admin pickers a top-level row\\\\n(the country) is a heading, not selectable (henza_admin citiesModel.js:38).\"},\"AdminUser\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fullName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"⚠️ Kept in sync BY A DATABASE TRIGGER — `admin_user_sync_full_name`, from\\\\nmigration 20260922180000. Prisma cannot see it, so a write here may store\\\\nsomething other than what you passed:\\\\n\\\\n* write the parts -> fullName is rebuilt as \\\"first last\\\"\\\\n* write fullName only -> the parts are re-derived from it\\\\n* write BOTH in one update -> THE PARTS WIN; the submitted fullName is\\\\ndiscarded\\\\n\\\\nRe-read after writing if you need the stored value. Same arrangement as\\\\nCustomer (D0 requirement 7 — the split applies to ALL admins, not only\\\\nsales experts).\"},{\"name\":\"firstName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mobile\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"passwordHash\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"role\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminRole\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userTypeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy `users.ut`. Granular ACL lives here (Permission rows hang off UserType);\\\\nthe coarse `role` enum above is retained for the business rules that already\\\\nswitch on it. Nullable so existing seeded admins remain valid.\"},{\"name\":\"userType\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UserType\",\"relationName\":\"AdminUserToUserType\",\"relationFromFields\":[\"userTypeId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branch\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Branch\",\"relationName\":\"AdminUserToBranch\",\"relationFromFields\":[\"branchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"wagePercent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"avatarFileId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy stored a sales agent as a `customers` row with type=1, so\\\\nReagentCustomer.vue's shared form collected these alongside the\\\\nwholesale-customer fields. A sales agent is now an AdminUser\\\\n(role=SALES_EXPERT), so these live here instead — only ever set for that\\\\nrole; every other AdminUser leaves them null.\"},{\"name\":\"avatarFile\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UploadedFile\",\"relationName\":\"AdminUserAvatar\",\"relationFromFields\":[\"avatarFileId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"address\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"storeName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"pasazhName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memberCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"referredCustomers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"ReferralAgent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"creditedOrders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"OrderSalesAgent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Orders credited to this sales expert — see Order.salesAgentId.\"},{\"name\":\"supervisedWorkshops\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Workshop\",\"relationName\":\"WorkshopSupervisor\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branchAllocations\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BranchAllocation\",\"relationName\":\"AllocationAuthor\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"postedLedgerEntries\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerEntry\",\"relationName\":\"AdminUserToLedgerEntry\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderStatusEvents\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderStatusEvent\",\"relationName\":\"AdminUserToOrderStatusEvent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrderStatusEvents\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrderStatusEvent\",\"relationName\":\"AdminUserToPreOrderStatusEvent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sentSmsMessages\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SmsMessage\",\"relationName\":\"SmsAuthor\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sentNotifications\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Notification\",\"relationName\":\"NotificationAuthor\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"uploadedFiles\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UploadedFile\",\"relationName\":\"FileUploader\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"salesExpertProfile\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SalesExpertProfile\",\"relationName\":\"AdminUserToSalesExpertProfile\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Only ever set for role = SALES_EXPERT (D17).\"},{\"name\":\"sessions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminSession\",\"relationName\":\"AdminSessionToAdminUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Issued admin-panel tokens, recorded only while session tracking is on\\\\n(AUTH_SESSION_TRACKING, or implicitly whenever the IAM is enabled) so a\\\\ntoken can be revoked before it expires. See AdminSession.\"}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"AppSession\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"jti\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"The token's `jti` claim. Unique: one row per issued token.\"},{\"name\":\"subjectId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Customer.id, or AdminUser.id when subjectType is \\\"sales-expert\\\".\"},{\"name\":\"subjectType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mobile\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"iamSessionId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Set when the login was confirmed by the central IAM: its session id (`sid`)\\\\nand stable user id (`sub`), which is what a back-channel logout arrives with.\"},{\"name\":\"iamSub\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ipAddress\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userAgent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expiresAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastSeenAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"revokedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"revokedReason\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"An issued APP token (customer app / sales-expert app), so it can be revoked\\\\nbefore it expires — the counterpart of AdminSession for the other token family.\\\\n\\\\nWHY A SEPARATE TABLE AND NO FOREIGN KEY\\\\n---------------------------------------\\\\nAn app token's `sub` is a Customer id for a customer and an **AdminUser id**\\\\nfor a sales expert (D21). One FK cannot point at two tables, so the subject is\\\\nstored as a plain id plus its type. The rows are short-lived operational data,\\\\nnot part of the accounting model, so the missing FK costs nothing here.\"},\"AdminSession\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"jti\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"The token's `jti` claim. Unique: one row per issued token.\"},{\"name\":\"adminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminSessionToAdminUser\",\"relationFromFields\":[\"adminUserId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"iamSessionId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Set when the login was verified by the IAM: its session id (`sid`) and the\\\\nstable user id (`sub`) there. Back-channel logout arrives keyed by these —\\\\ndeliberately here rather than as columns on AdminUser, so enabling the\\\\nfeature needs no change to an existing table.\"},{\"name\":\"iamSub\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ipAddress\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userAgent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expiresAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastSeenAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"revokedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"revokedReason\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"An issued admin-panel JWT, so it can be revoked before it expires.\\\\n\\\\nWHY THIS EXISTS\\\\n---------------\\\\nThe admin token is self-contained and valid for 12h, which means nothing —\\\\nnot disabling the account, not a central \\\"sign out everywhere\\\" — could cut a\\\\nsession short: the token kept working until it expired. With the central IAM\\\\nin the loop that gap became visible (an IAM session revocation had no effect\\\\nhere), so every issued token now carries a `jti` recorded on this table and\\\\nJwtStrategy refuses a token whose row is revoked.\\\\n\\\\nRows are written ONLY while tracking is enabled, and JwtStrategy only\\\\nenforces them while it is enabled, so a deployment that does not want the\\\\nextra lookup behaves exactly as before.\"},\"SalesExpertProfile\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminUserToSalesExpertProfile\",\"relationFromFields\":[\"adminUserId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"cityId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy customers.city_id — a filterable grid column\\\\n(ReagentListModel.js:14) and the source of the commission autofill\\\\n(ReagentCustomer.vue:215-228).\"},{\"name\":\"city\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"City\",\"relationName\":\"CityToSalesExpertProfile\",\"relationFromFields\":[\"cityId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"gramLevel\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy customers.gram_level — the «سطح اعتبار» column, filterable.\\\\nDecimal(14,4) matches Customer.goldCreditLimitGrams exactly so the same\\\\ncredit limit has identical precision on both tables.\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy customers.phone (varchar 15) and ncode (varchar 20). The reference\\\\nstores both and reads neither back; kept so the form matches it. Neither\\\\nis unique and neither has a validation rule in the reference — inventing\\\\none would reject data the reference accepts.\"},{\"name\":\"nationalCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"tradingCustomerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"The Customer row carrying this expert's OWN orders, debt and credit limit.\\\\n\\\\nThe reference stored a sales agent AS a Customer (type=1), so an order the\\\\nagent placed from the app was simply their own, against their own\\\\ngram_level (ApiMobileController.php:534-535). Here the expert is an\\\\nAdminUser (D17), which has no ledger and cannot be an Order's subject, so\\\\nthis one linked Customer plays that part.\\\\n\\\\nDistinct from the expert's REFERRED customers, which are ordinary Customer\\\\nrows pointing at the AdminUser through Customer.referredByAgentId.\\\\n\\\\nNull until the expert first signs into the app, when it is created from\\\\nthis profile. See D21.\"},{\"name\":\"tradingCustomer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"SalesExpertTradingAccount\",\"relationFromFields\":[\"tradingCustomerId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"SetNull\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"The sales-expert fields legacy kept on the `customers` row (type=1) and that\\\\nwere lost when a sales expert became an AdminUser (D17).\\\\n\\\\nA separate table rather than columns on AdminUser: these are meaningful only\\\\nfor role = SALES_EXPERT and would be permanently null for every other admin.\\\\nA row is created for every SALES_EXPERT by the migration, and upserted by the\\\\nservice whenever one is created or a user's role becomes SALES_EXPERT — but\\\\nreaders still left-join, so a missing profile degrades to nulls rather than\\\\ndropping the agent from the grid.\\\\n\\\\n`reagent_id` is deliberately NOT here — see D17: in the reference it was a\\\\nside effect of the shared customers form, and filling it removed that expert\\\\nfrom the selectable-agent list (queryReagent, AdminController.php:420).\"},\"Customer\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fullName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"⚠️ `fullName`, `firstName` and `lastName` are kept in sync BY A DATABASE\\\\nTRIGGER — `customer_sync_full_name`, created in migration\\\\n20260922120000_customer_name_parts. Prisma does not know about it, so a\\\\nwrite here is NOT the whole story:\\\\n\\\\n* write the parts -> fullName is rebuilt as \\\"first last\\\"\\\\n* write fullName only -> the parts are re-derived from it\\\\n* write BOTH in one update -> THE PARTS WIN; fullName is overwritten\\\\nwith \\\"first last\\\" and whatever you passed for fullName is discarded\\\\n\\\\nSo a value you wrote can differ from the value that lands in the row.\\\\nRe-read after writing if you need the stored value. Prefer writing the\\\\nparts; `fullName` exists for the legacy readers that predate D0.\\\\n\\\\nReference has these as two columns from the start\\\\n(henza_server 2020_10_01_120430_customers_table.php:18-19 fname/lname);\\\\nthe port collapsed them, which is the D0 defect.\"},{\"name\":\"firstName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mobile\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"nationalCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy customers.ncode. OPTIONAL since 2026-10-07: not one of the 1,616\\\\nlegacy customers has a national code (1595/1595 empty), and fabricating\\\\none is a data violation that would block later legal identity checks\\\\n(owner ruling). Still @unique — in PostgreSQL NULLs do not collide, so\\\\nthe migration tool must write NULL and never '', which would collide on\\\\nthe second row.\\\\n\\\\nThree service-layer workarounds exist ONLY because this used to be\\\\nrequired, and they store the MOBILE NUMBER here:\\\\nadmin-customers.service.ts:625,685 and customer-auth.service.ts:258.\\\\nRetiring them is a separate change; see docs/DATA-MIGRATION-MAP.md §10.4.\"},{\"name\":\"passwordHash\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"cityId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"city\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"City\",\"relationName\":\"CityToCustomer\",\"relationFromFields\":[\"cityId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"cityNameRaw\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy customers.new_city — the city name exactly as the customer typed it\\\\nat app sign-up (Major/CustomerController.php:36). Kept verbatim because\\\\nthe legacy city table has only 15 rows, so the typed name is often the only\\\\nrecord of where the customer is (172 customers; 43 match no known city).\\\\ncityId is set alongside it only on an exact, ي/ك-normalised name match.\\\\nLegacy sign-up also forced city_id = 5 (Tehran) on everyone\\\\n(Major/CustomerController.php:21), so for those rows the typed name, not\\\\ncityId, is the truth. Owner ruling 2026-10-07: keep both.\"},{\"name\":\"kind\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"CustomerKind\",\"default\":\"APP_SHOPKEEPER\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy Customer.type — distinguishes بنکدار from مغازه دار, which the\\\\nBankerList / ShopkeeperList screens filter on.\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy contact + shop columns, shown on the wholesale customer form and as\\\\n(hidden-by-default) columns in its grid.\"},{\"name\":\"address\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"storeName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"pasazhName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"zone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memberCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy mcode — the operator-assigned customer code.\"},{\"name\":\"referredByAgentId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"referredByAgent\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"ReferralAgent\",\"relationFromFields\":[\"referredByAgentId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"salesExpertTradingFor\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SalesExpertProfile\",\"relationName\":\"SalesExpertTradingAccount\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Set only on the one Customer row that acts as a sales expert's own trading\\\\naccount (see SalesExpertProfile.tradingCustomerId). Empty for every\\\\nordinary customer.\"},{\"name\":\"referredOrders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"OrderReferrerCustomer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy orders that named THIS customer as their referrer — see\\\\nOrder.referrerCustomerId. History only.\"},{\"name\":\"goldCreditLimitGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"goldDebtGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fiatDebtRial\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"accountingGoldBalance\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Balance as last read from the accounting software (D27), in the app's own\\\\nsign convention (positive = owes). Shown to the customer when the\\\\nintegration is on; the credit-limit check still uses goldDebtGrams above.\\\\nNull until the first successful sync.\"},{\"name\":\"accountingRialBalance\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"accountingBalanceAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"makingChargeOffsetPercent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy `customers.percent` — the per-customer making-charge offset. It is\\\\nADDED to the variant's making charge when pricing an order line\\\\n(henza_pwa src/Mixins/product/index.ts:69-75:\\\\ngetWage(v) = state.percent + v.percentage_pay)\\\\nand it shifts the catalogue making-charge filter bounds\\\\n(ApiMobileController.php:391-396,76-77). It is NOT part of the price\\\\nformula itself — that extra percent is ConfigStatic['product_price_extra_percent'].\\\\n\\\\nNOT the wallet cashback rate (storefront ConfigStatic['percent'], D13) and\\\\nNOT the wholesale per-line charge (OrderItem.wagePercentSnapshot).\\\\n\\\\nDB default 0 keeps every existing customer's price unchanged. The\\\\nreference's application-layer default for NEW customers is 3\\\\n(AdminController.php:338) and the field is required on create (:354).\"},{\"name\":\"verificationStep\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"VerificationStep\",\"default\":\"UNVERIFIED\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"nationalIdImageUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"businessLicenseUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"shopImageUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"verificationRejectionReason\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Why verification was rejected (VerificationStep.REJECTED).\\\\n\\\\nLegacy recorded NO reason: none of its 49 `customers` columns is a\\\\nreason/note field, and on rejection it only sent a fixed SMS. So the 14\\\\nrows migrated from henza carry the sentinel\\\\n«رد شده در سیستم قدیم — فاقد شرح علت ثبت‌شده» instead of NULL, so support\\\\nknows why it is blank (owner ruling 2026-10-07). The migration tool\\\\nwrites it only WHERE this IS NULL, so a re-run cannot overwrite a real\\\\nreason entered in the new system.\"},{\"name\":\"verificationRejectedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"NULL for rows migrated from henza — legacy recorded no rejection time.\"},{\"name\":\"birthDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy customers.birth_date, populated on 917 of 1,595 rows. Kept for the\\\\nbirthday SMS / loyalty campaigns (owner ruling 2026-10-07).\\\\n\\\\n⚠ Legacy stores dates as JALALI STRINGS in other tables\\\\n(cashes.recive_date is varchar, 88/89 values starting \\\"14…\\\"), so this\\\\ntimestamp may hold mis-entered Jalali years. Confirm the calendar with\\\\ndocs/migration-precheck-3.sql BEFORE backfilling: copying them unchanged\\\\nwould produce 917 wrong birthdays, worse for an SMS campaign than none.\"},{\"name\":\"avatarFileId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy `image_id` — the profile photo (عکس پروفایل) on the sales-agent\\\\nform. Legacy stored an FK to its Image table and read it back as a nested\\\\n`image: { id, image }`, so this is a relation, not a bare URL string.\"},{\"name\":\"avatarFile\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UploadedFile\",\"relationName\":\"CustomerAvatar\",\"relationFromFields\":[\"avatarFileId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"canPlaceOrders\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy had TWO independent switches on a customer:\\\\nsts -> may they place orders (this field)\\\\nactive -> is the account enabled (isActive, below)\\\\nThe port previously drove both from isActive; they are separate again.\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isArchived\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy archive flag — the archived list filtered on this, not on isActive.\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"addresses\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CustomerAddress\",\"relationName\":\"CustomerToCustomerAddress\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"CustomerToOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrder\",\"relationName\":\"CustomerToPreOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ledgerEntries\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerEntry\",\"relationName\":\"CustomerToLedgerEntry\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"walletBonuses\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"WalletBonus\",\"relationName\":\"CustomerToWalletBonus\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"comments\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Comment\",\"relationName\":\"CommentToCustomer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"promotions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Promotion\",\"relationName\":\"CustomerToPromotion\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notifications\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"NotificationRecipient\",\"relationName\":\"CustomerToNotificationRecipient\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"activityLogs\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CustomerActivityLog\",\"relationName\":\"CustomerToCustomerActivityLog\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"otpChallenges\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CustomerOtp\",\"relationName\":\"CustomerToCustomerOtp\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"favorites\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CustomerFavorite\",\"relationName\":\"CustomerToCustomerFavorite\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"CustomerFavorite\":{\"dbName\":null,\"fields\":[{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToCustomerFavorite\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"product\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"CustomerFavoriteToProduct\",\"relationFromFields\":[\"productId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"customerId\",\"productId\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"Legacy `fav` (251 rows) — saved products. The target had no model for this,\\\\nso every customer's favourites would have been lost in the migration; the\\\\nowner confirmed on 2026-10-06 that they matter.\\\\n\\\\nLegacy `fav` has two columns and NO primary key. The composite key here\\\\nsupplies the constraint the source lacks (the precheck found 0 duplicate\\\\npairs, but the tool should still SELECT DISTINCT). 14 of the 251 rows point\\\\nat a deleted customer and must be skipped.\\\\n\\\\nLegacy's denormalised `product.count_fav` counter is deliberately NOT\\\\nrecreated as a column — derive it from this table.\"},\"CustomerAddress\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToCustomerAddress\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"cityId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"city\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"City\",\"relationName\":\"CityToCustomerAddress\",\"relationFromFields\":[\"cityId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"addressLine\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isDefault\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Branch\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"address\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy Branch.address / phone — both are columns in the branch grid.\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy GET branch/active/{id} toggles this.\"},{\"name\":\"cityId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"city\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"City\",\"relationName\":\"BranchToCity\",\"relationFromFields\":[\"cityId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminUsers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminUserToBranch\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"BranchToOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"allocations\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BranchAllocation\",\"relationName\":\"BranchToBranchAllocation\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Workshop\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"address\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy Workshop.address / phone — both are columns in the workshop grid.\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"supervisorId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"The supervisor created alongside the workshop by the legacy Add form.\"},{\"name\":\"supervisor\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"WorkshopSupervisor\",\"relationFromFields\":[\"supervisorId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrder\",\"relationName\":\"PreOrderToWorkshop\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Category\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":1,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy Category.type — which storefront the category belongs to:\\\\n1 سایت | 2 اپلیکشن موبایل. Drives the \\\"type_str\\\" grid column.\"},{\"name\":\"imageUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy Category.image / icon — the grid renders the image, the storefront the icon.\"},{\"name\":\"iconUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"metaTag\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy meta tag + description, used for SEO on the site categories.\"},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"parentId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"parent\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Category\",\"relationName\":\"CategoryTree\",\"relationFromFields\":[\"parentId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"children\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Category\",\"relationName\":\"CategoryTree\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"products\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"CategoryToProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"promotions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Promotion\",\"relationName\":\"CategoryToPromotion\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Brand\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"products\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"BrandToProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"promotions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Promotion\",\"relationName\":\"BrandToPromotion\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Collection\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"products\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CollectionProduct\",\"relationName\":\"CollectionToCollectionProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"Curated product groupings — replaces legacy \\\"Ciny/CinyProduct\\\" (a tagging\\\\nfeature, NOT a gold-price snapshot mechanism, despite the misleading legacy name).\"},\"CollectionProduct\":{\"dbName\":null,\"fields\":[{\"name\":\"collectionId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"collection\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Collection\",\"relationName\":\"CollectionToCollectionProduct\",\"relationFromFields\":[\"collectionId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"product\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"CollectionProductToProduct\",\"relationFromFields\":[\"productId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"collectionId\",\"productId\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Product\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"categoryId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"category\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Category\",\"relationName\":\"CategoryToProduct\",\"relationFromFields\":[\"categoryId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"brandId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"brand\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Brand\",\"relationName\":\"BrandToProduct\",\"relationFromFields\":[\"brandId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy Product.product_code — the human-facing SKU shown in the grid.\"},{\"name\":\"showType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":3,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy Product.show_type: 1 site, 2 mobile, 3 both.\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"accountingStockWeight\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Stock of the linked کارساخته as last read from the accounting software\\\\n(D27). Weight for gram-type items, count for count-type ones — whichever\\\\nthe software reports. At zero or below the product is unavailable in the\\\\napp (pre-order variants excepted). Null = not linked or never synced.\"},{\"name\":\"accountingStockCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"accountingStockAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"variants\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ProductVariant\",\"relationName\":\"ProductToProductVariant\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"images\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ProductImage\",\"relationName\":\"ProductToProductImage\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"collections\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CollectionProduct\",\"relationName\":\"CollectionProductToProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"comments\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Comment\",\"relationName\":\"CommentToProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"promotions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Promotion\",\"relationName\":\"ProductToPromotion\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"allocationItems\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BranchAllocationItem\",\"relationName\":\"BranchAllocationItemToProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"favoritedBy\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CustomerFavorite\",\"relationName\":\"CustomerFavoriteToProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ProductImage\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"product\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"ProductToProductImage\",\"relationFromFields\":[\"productId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"url\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sortOrder\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"role\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"ProductImageRole\",\"default\":\"GALLERY\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy had 4 distinct upload slots (تصویر شاخص / تصویر شاخص موبایل /\\\\nگالری تصاویر سایت / گالری تصاویر موبایل) — GALLERY is the default so\\\\nexisting rows and any generic \\\"just attach an image\\\" caller keep working.\"},{\"name\":\"variants\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ProductVariant\",\"relationName\":\"ProductImageToProductVariant\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Variants that display this image. A gallery image may back several\\\\nvariants (one photo, several weights), which is why this is a plain\\\\none-to-many and not a join table.\"}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ProductVariant\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"product\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"ProductToProductVariant\",\"relationFromFields\":[\"productId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sku\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rashWeightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Base/raw weight before making charge (\\\"rash weight\\\").\"},{\"name\":\"defaultWagePercent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Default making-charge percentage applied on top of rash weight.\"},{\"name\":\"qty\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy ProductVariant.qty — on-hand stock. The cart refuses a variant with\\\\nqty 0 unless it is flagged pre-order, so both fields are required for that\\\\nguard to work (see apps/admin-panel/src/stores/cart.ts).\"},{\"name\":\"isPreOrder\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy is_pre_order: orderable even at zero stock.\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"imageId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"The gallery image shown for this variant, picked from its own product's\\\\nimages — never a re-uploaded copy. onDelete: SetNull because dropping an\\\\nimage must never cascade into the variant: OrderItem rows reference\\\\nvariants, so losing one would break order history.\"},{\"name\":\"image\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ProductImage\",\"relationName\":\"ProductImageToProductVariant\",\"relationFromFields\":[\"imageId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"SetNull\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderItems\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderItem\",\"relationName\":\"OrderItemToProductVariant\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Order\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderNumber\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToOrder\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branch\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Branch\",\"relationName\":\"BranchToOrder\",\"relationFromFields\":[\"branchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"channel\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"OrderChannel\",\"default\":\"RETAIL\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Which sales channel placed this order — see OrderChannel.\"},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"OrderStatus\",\"default\":\"PLACED\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"totalGoldWeightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Total gold weight incl. wage across all items (\\\"allGram\\\" / order.w).\"},{\"name\":\"wageWeightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Pure making-charge weight component (totalGoldWeightGrams minus raw weight sum).\"},{\"name\":\"flatRialCharge\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Flat Rial charge independent of gold price (e.g. stones) — legacy rial_input.\"},{\"name\":\"isSuspendedOverCreditLimit\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"deliveredAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"salesAgentId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"The sales expert this order is credited to, fixed when it is placed:\\\\nthe customer's referring expert AT THAT MOMENT. Legacy `orders.reagent_id`,\\\\nset once at creation (ApiMobileController.php:601) and never moved, so a\\\\ncustomer changing expert later does not move past sales or commission\\\\n(owner ruling 2026-10-08). «میزان فروش» counts from here, never from the\\\\ncustomer's current referrer.\"},{\"name\":\"salesAgent\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"OrderSalesAgent\",\"relationFromFields\":[\"salesAgentId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"SetNull\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"referrerCustomerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"History only: a legacy order whose `reagent_id` named a customer who is\\\\nnot a sales expert (one such customer, 17 orders in 2022). Legacy counted\\\\nthose orders in that customer's own «میزان فروش»; this keeps that figure\\\\nexact. Never set for a new order.\"},{\"name\":\"referrerCustomer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"OrderReferrerCustomer\",\"relationFromFields\":[\"referrerCustomerId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"SetNull\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"items\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderItem\",\"relationName\":\"OrderToOrderItem\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"statusEvents\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderStatusEvent\",\"relationName\":\"OrderToOrderStatusEvent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ledgerEntries\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerEntry\",\"relationName\":\"LedgerEntryToOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"convertedFromPreOrder\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrder\",\"relationName\":\"OrderToPreOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"OrderItem\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"OrderToOrderItem\",\"relationFromFields\":[\"orderId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productVariantId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productVariant\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ProductVariant\",\"relationName\":\"OrderItemToProductVariant\",\"relationFromFields\":[\"productVariantId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"quantity\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rashWeightGramsSnapshot\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"wagePercentSnapshot\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"discountPercentSnapshot\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"computedWeightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"computed: rash*(1 + (wagePercent-discount)/100)\"},{\"name\":\"flatRialCharge\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"OrderStatusEvent\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"OrderToOrderStatusEvent\",\"relationFromFields\":[\"orderId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fromStatus\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderStatus\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"toStatus\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderStatus\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actorAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actorAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminUserToOrderStatusEvent\",\"relationFromFields\":[\"actorAdminUserId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"PreOrder\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToPreOrder\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"cityId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"city\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"City\",\"relationName\":\"CityToPreOrder\",\"relationFromFields\":[\"cityId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"workshopId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"workshop\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Workshop\",\"relationName\":\"PreOrderToWorkshop\",\"relationFromFields\":[\"workshopId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"PreOrderStatus\",\"default\":\"PLACED\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"designImageUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"colorName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sizeSpec\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"stoneColor\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"minaColor\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"estimatedWeightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"estimatedPriceRial\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"convertedOrderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Once priced, an admin converts this into a real (debt-bearing) Order.\"},{\"name\":\"convertedOrder\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"OrderToPreOrder\",\"relationFromFields\":[\"convertedOrderId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"statusEvents\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrderStatusEvent\",\"relationName\":\"PreOrderToPreOrderStatusEvent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"PreOrderStatusEvent\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrder\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrder\",\"relationName\":\"PreOrderToPreOrderStatusEvent\",\"relationFromFields\":[\"preOrderId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"changes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Field-level diff, e.g. {\\\"status\\\": {\\\"old\\\": \\\"PLACED\\\", \\\"new\\\": \\\"ADMIN_APPROVED\\\"}}\"},{\"name\":\"actorAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actorAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminUserToPreOrderStatusEvent\",\"relationFromFields\":[\"actorAdminUserId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ipAddress\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"LedgerEntry\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToLedgerEntry\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"currency\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerCurrency\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"direction\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerDirection\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sourceType\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerSourceType\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"amount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Always positive; direction determines the sign applied to the customer balance.\"},{\"name\":\"karatPerMille\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Purity of the physical instrument, for REPAYMENT_MELTED_GOLD (e.g. 750, 916).\"},{\"name\":\"pricePerGramRialAtEntry\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Gold price/gram at conversion time, for REPAYMENT_CASH.\"},{\"name\":\"orderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"LedgerEntryToOrder\",\"relationFromFields\":[\"orderId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"confirmed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Pending entries don't count toward the cached customer balance until confirmed.\"},{\"name\":\"confirmedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"postedByAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"postedByAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminUserToLedgerEntry\",\"relationFromFields\":[\"postedByAdminUserId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"labName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Instrument metadata from the legacy \\\"cash\\\" document form. Which fields are\\\\nfilled depends on sourceType: a melted-gold receipt carries lab/hallmark and\\\\nthe pre-normalization weight, a cheque carries the account and bank, and a\\\\ntransfer carries its destination.\\\\nLegacy columns: lab, ang, account_name, bank_name, to, original_value, recive_date.\"},{\"name\":\"hallmark\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"accountName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"bankName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"transferTo\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"originalValue\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Weight as handed over, BEFORE karat normalization (legacy original_value).\"},{\"name\":\"priceRial\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Rial amount for cash/cheque documents (legacy price).\"},{\"name\":\"receivedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"GoldPriceQuote\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"karatPerMille\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"pricePerGramRial\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"source\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"quotedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"Replaces legacy WebServiceGold / ConfigStatic.gold_price — timestamped price feed.\"},\"WalletBonus\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToWalletBonus\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"goldGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"grantedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expiresAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"consumedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"Time-limited gold cashback bonus — replaces the legacy Rooyesh\\\\Wallet gold credit.\"},\"UserType\":{\"dbName\":\"user_type\",\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy `permission.ut` / `users.ut` — an integer, kept as the PK so seeded\\\\nrows keep their legacy identity rather than getting new cuids.\"},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"permissions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Permission\",\"relationName\":\"PermissionToUserType\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminUsers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminUserToUserType\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Permission\":{\"dbName\":\"permission\",\"fields\":[{\"name\":\"rid\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Dotted permission id, e.g. \\\"order.list\\\", \\\"persons.list.client.omde\\\".\"},{\"name\":\"userTypeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userType\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UserType\",\"relationName\":\"PermissionToUserType\",\"relationFromFields\":[\"userTypeId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"rid\",\"userTypeId\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Comment\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"product\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"CommentToProduct\",\"relationFromFields\":[\"productId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CommentToCustomer\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"body\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"CommentStatus\",\"default\":\"PENDING\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"replyToId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy `reply_to`: a staff reply threads under the comment it answers.\"},{\"name\":\"replyTo\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Comment\",\"relationName\":\"CommentReplies\",\"relationFromFields\":[\"replyToId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"replies\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Comment\",\"relationName\":\"CommentReplies\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Setting\":{\"dbName\":null,\"fields\":[{\"name\":\"key\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"value\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"AccountingLink\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"provider\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"entityType\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AccountingEntityType\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"entityId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"externalCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"The record's code in the accounting software (Tahesab Moshtari_Code /\\\\nZarrin idHesab; for products the Zarrin idKar or the Tahesab Name_Kar).\"},{\"name\":\"externalName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"origin\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"How the link came to be: LINKED (matched by mobile/name), IMPORTED (app\\\\nrow created from the accounting record), PUSHED (accounting record created\\\\nfrom the app row) or MANUAL (an admin typed the code).\"},{\"name\":\"snapshot\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"The record as last read, for display only.\"},{\"name\":\"syncedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"provider\",\"entityType\",\"entityId\"],[\"provider\",\"entityType\",\"externalCode\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"provider\",\"entityType\",\"entityId\"]},{\"name\":null,\"fields\":[\"provider\",\"entityType\",\"externalCode\"]}],\"isGenerated\":false,\"documentation\":\"One app row ↔ one record in the accounting software (customer account or\\\\nکارساخته).\"},\"AccountingOutbox\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"provider\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"kind\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AccountingOutboxKind\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"entityId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"AccountingOutboxStatus\",\"default\":\"PENDING\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"attempts\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"nextAttemptAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastError\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"externalRef\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"What the accounting software returned as the document/record id.\"},{\"name\":\"progress\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Per-step progress of multi-call jobs (a Zarrin document is one call per\\\\nline), so a failure resumes where it stopped.\"},{\"name\":\"lastRequest\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Last request/response, for the log screen. Never contains the token.\"},{\"name\":\"lastResponse\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sentAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"resolvedById\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"Work to push to the accounting software. Written in the SAME transaction as\\\\nthe change that causes it, so an outage of the accounting software never\\\\nloses an event and never blocks the app.\"},\"AccountingIssue\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"provider\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"kind\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"externalCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"entityId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"message\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"data\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"resolvedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"provider\",\"kind\",\"externalCode\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"provider\",\"kind\",\"externalCode\"]}],\"isGenerated\":false,\"documentation\":\"Something a pull found that needs a human: an account with no mobile, two\\\\naccounts sharing one mobile, a کارساخته group with no category mapping.\"},\"Promotion\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scope\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"PromotionScope\",\"default\":\"PRODUCT\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"usage\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"PromotionUsage\",\"default\":\"ONCE\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"discountPercent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Percentage off, 0-100 (legacy discount_percent).\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"platform\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":3,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Which storefront it shows on, mirroring Product.showType (legacy platform).\"},{\"name\":\"startsAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"endsAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Exactly one of these is populated, per `scope`.\"},{\"name\":\"product\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"ProductToPromotion\",\"relationFromFields\":[\"productId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"categoryId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"category\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Category\",\"relationName\":\"CategoryToPromotion\",\"relationFromFields\":[\"categoryId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToPromotion\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"brandId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"brand\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Brand\",\"relationName\":\"BrandToPromotion\",\"relationFromFields\":[\"brandId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"PromotionExclusion\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"itemId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"type\",\"itemId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"type\",\"itemId\"]}],\"isGenerated\":false,\"documentation\":\"Legacy \\\"ignore\\\" table (views/offersIgnore) — specific products, categories,\\\\ncustomers or brands excluded from the automatic discount engine.\\\\nLegacy posts { type, item_id[] }: \\\"type\\\" reuses the promotion scope codes\\\\n(1 محصولات | 2 دسته بندی | 3 مشتری | 4 برند) and \\\"itemId\\\" is the excluded row.\"},\"BranchAllocation\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branch\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Branch\",\"relationName\":\"BranchToBranchAllocation\",\"relationFromFields\":[\"branchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"allocatorAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy `allocator_user` — the admin who filed the allocation.\"},{\"name\":\"allocatorAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AllocationAuthor\",\"relationFromFields\":[\"allocatorAdminUserId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"items\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BranchAllocationItem\",\"relationName\":\"BranchAllocationToBranchAllocationItem\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"BranchAllocationItem\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"allocationId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"allocation\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BranchAllocation\",\"relationName\":\"BranchAllocationToBranchAllocationItem\",\"relationFromFields\":[\"allocationId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"product\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"BranchAllocationItemToProduct\",\"relationFromFields\":[\"productId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"weightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Weight snapshot at allocation time, so later catalog edits do not rewrite history.\"}],\"primaryKey\":null,\"uniqueFields\":[[\"allocationId\",\"productId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"allocationId\",\"productId\"]}],\"isGenerated\":false},\"SmsMessage\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"audience\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MessageAudience\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"recipients\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Comma-separated recipients for the SINGLE/MULTIPLE audiences.\"},{\"name\":\"body\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sentCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"How many numbers the send actually resolved to.\"},{\"name\":\"sentByAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sentByAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"SmsAuthor\",\"relationFromFields\":[\"sentByAdminUserId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Notification\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"body\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"audience\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"MessageAudience\",\"default\":\"ALL_CUSTOMERS\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sentByAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sentByAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"NotificationAuthor\",\"relationFromFields\":[\"sentByAdminUserId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"recipients\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"NotificationRecipient\",\"relationName\":\"NotificationToNotificationRecipient\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"NotificationRecipient\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notificationId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notification\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Notification\",\"relationName\":\"NotificationToNotificationRecipient\",\"relationFromFields\":[\"notificationId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToNotificationRecipient\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"readAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"notificationId\",\"customerId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"notificationId\",\"customerId\"]}],\"isGenerated\":false,\"documentation\":\"Per-customer delivery + read state — legacy `GET notify/read/{id}`.\"},\"NewsletterSubscriber\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mobile\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"email\"],[\"mobile\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"email\"]},{\"name\":null,\"fields\":[\"mobile\"]}],\"isGenerated\":false,\"documentation\":\"Legacy views/newsletters — the mailing-list signups collected by the site.\"},\"CustomerActivityLog\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToCustomerActivityLog\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"action\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Free-form action key, e.g. 'login', 'order.placed', 'profile.updated'.\"},{\"name\":\"detail\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"Legacy views/statics — the customer activity log the \\\"آمار\\\" screen reads\\\\n(`log/list/customer`, `log/ago/{customerId}`).\"},\"UploadedFile\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"url\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Public URL the stored file is served from.\"},{\"name\":\"originalName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mimeType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sizeBytes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"purpose\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Free-form tag for what the file belongs to, e.g. 'product', 'category',\\\\n'customer.nationalId'. Kept loose so a new form needs no schema change.\"},{\"name\":\"uploadedByAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"uploadedByAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"FileUploader\",\"relationFromFields\":[\"uploadedByAdminUserId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerAvatars\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerAvatar\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminUserAvatars\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminUserAvatar\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"CustomerOtp\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mobile\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Normalised to English digits before storing, as the reference does with\\\\nUtility::faTOen() on both send and verify.\"},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToCustomerOtp\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"codeHash\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"bcrypt hash of the 4-digit code. Never the code itself.\"},{\"name\":\"expiresAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"attempts\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Failed verify attempts against THIS challenge.\"},{\"name\":\"consumedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Set when the code is accepted, so one challenge cannot be reused.\"},{\"name\":\"requestIp\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Kept for the per-IP send throttle.\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"One OTP login challenge for a customer.\\\\n\\\\nPorts henza_server's flow (ApiMobileController.php:39-78), where userAuth\\\\ngenerated rand(1000,9999), stored it on the customer row as `send_password`\\\\nand sent it by SMS, and userVerfiy compared the submitted code against it\\\\n(mismatch -> HTTP 422).\\\\n\\\\nThree deliberate improvements over the reference, approved by the user\\\\n(docs/parity/DECISIONS.md D6 and T1):\\\\n1. the code is stored as a bcrypt hash, never in plain text — the\\\\nreference kept it readable in a customer column;\\\\n2. it expires (`expiresAt`) — the reference's code stayed valid forever;\\\\n3. attempts are counted and the challenge locks out — the reference had\\\\nno limit at all.\\\\nThe parity behaviour itself is the code comparison and the rejection.\"}},\"enums\":{\"AdminRole\":{\"values\":[{\"name\":\"SUPER_ADMIN\",\"dbName\":null},{\"name\":\"SYSTEM_APPROVER\",\"dbName\":null},{\"name\":\"SALES_EXPERT\",\"dbName\":null},{\"name\":\"WORKSHOP_SUPERVISOR\",\"dbName\":null},{\"name\":\"ACCOUNTANT\",\"dbName\":null}],\"dbName\":null},\"CustomerKind\":{\"values\":[{\"name\":\"SALES_AGENT\",\"dbName\":null},{\"name\":\"APP_SHOPKEEPER\",\"dbName\":null},{\"name\":\"WALK_IN_SHOPKEEPER\",\"dbName\":null},{\"name\":\"BANKER\",\"dbName\":null},{\"name\":\"WORKSHOP_SUPERVISOR\",\"dbName\":null},{\"name\":\"RETAIL\",\"dbName\":null}],\"dbName\":null,\"documentation\":\"Legacy Customer.type — what kind of wholesale customer this is. Values and\\\\nlabels taken verbatim from bulkCustomer.vue's userTypes list.\\\\n\\\\nSALES_AGENT is a LEGACY value only: legacy stored a sales agent as a\\\\nCustomer row with type=1, but the redesigned system models a sales agent\\\\nas an AdminUser (role SALES_EXPERT) instead — see admin-users.service.ts\\\\nand admin-customers.service.ts's listReagents()/create(). No Customer row\\\\nshould be created with kind SALES_AGENT going forward; the value is kept\\\\nonly so legacyTypeToKind()/kindToLegacyType() stay total functions and any\\\\nalready-migrated data keeps a readable label.\\\\n\\\\nRETAIL marks a \\\"تک\\\" (single/retail) customer — legacy kept these in an\\\\nentirely separate table (SingleCustomer/`login`) that could never contain\\\\na wholesale/agent/shopkeeper/banker row. The redesigned schema folded both\\\\ninto one Customer model, so this value is what listSingle() now filters on\\\\nto reproduce that same separation.\"},\"VerificationStep\":{\"values\":[{\"name\":\"UNVERIFIED\",\"dbName\":null},{\"name\":\"STEP_ONE_SUBMITTED\",\"dbName\":null},{\"name\":\"STEP_TWO_SUBMITTED\",\"dbName\":null},{\"name\":\"VERIFIED\",\"dbName\":null},{\"name\":\"REJECTED\",\"dbName\":null,\"documentation\":\"Legacy had THREE states per step, not two\\\\n(MajorCustomerController.php:106-135): 1 = awaiting, 2 = approved,\\\\n3 = REJECTED. Mapping rejected customers to UNVERIFIED would put closed\\\\ncases back in the review queue, so the owner ruled it out (2026-10-07).\\\\n14 legacy rows land here; see Customer.verificationRejectionReason.\"}],\"dbName\":null},\"OrderChannel\":{\"values\":[{\"name\":\"RETAIL\",\"dbName\":null},{\"name\":\"WHOLESALE\",\"dbName\":null}],\"dbName\":null,\"documentation\":\"Legacy kept retail and wholesale orders in two SEPARATE tables\\\\n(orders_orders vs orders). The redesigned schema has one Order model, so the\\\\ndistinction lives here instead.\"},\"OrderStatus\":{\"values\":[{\"name\":\"SUSPENDED\",\"dbName\":null},{\"name\":\"PLACED\",\"dbName\":null},{\"name\":\"ADMIN_APPROVED\",\"dbName\":null},{\"name\":\"SOURCING\",\"dbName\":null},{\"name\":\"PREPARING\",\"dbName\":null},{\"name\":\"DELIVERED_TO_AGENT\",\"dbName\":null},{\"name\":\"DELIVERED_TO_CUSTOMER\",\"dbName\":null},{\"name\":\"CANCELLED\",\"dbName\":null}],\"dbName\":null},\"PreOrderStatus\":{\"values\":[{\"name\":\"PLACED\",\"dbName\":null},{\"name\":\"ADMIN_APPROVED\",\"dbName\":null},{\"name\":\"WORKSHOP_APPROVED\",\"dbName\":null},{\"name\":\"READY_TO_SHIP\",\"dbName\":null},{\"name\":\"DELIVERED\",\"dbName\":null},{\"name\":\"CANCELLED\",\"dbName\":null}],\"dbName\":null},\"LedgerCurrency\":{\"values\":[{\"name\":\"GOLD_GRAM\",\"dbName\":null},{\"name\":\"RIAL\",\"dbName\":null}],\"dbName\":null},\"LedgerDirection\":{\"values\":[{\"name\":\"DEBIT\",\"dbName\":null},{\"name\":\"CREDIT\",\"dbName\":null}],\"dbName\":null},\"LedgerSourceType\":{\"values\":[{\"name\":\"ORDER_STOCK\",\"dbName\":null},{\"name\":\"ORDER_PRE_ORDER\",\"dbName\":null},{\"name\":\"REPAYMENT_MELTED_GOLD\",\"dbName\":null},{\"name\":\"REPAYMENT_TRANSFER\",\"dbName\":null},{\"name\":\"REPAYMENT_CHEQUE\",\"dbName\":null},{\"name\":\"REPAYMENT_CASH\",\"dbName\":null},{\"name\":\"WALLET_BONUS\",\"dbName\":null},{\"name\":\"ADJUSTMENT\",\"dbName\":null}],\"dbName\":null},\"ProductImageRole\":{\"values\":[{\"name\":\"FEATURED\",\"dbName\":null},{\"name\":\"FEATURED_MOBILE\",\"dbName\":null},{\"name\":\"GALLERY\",\"dbName\":null},{\"name\":\"GALLERY_MOBILE\",\"dbName\":null}],\"dbName\":null},\"CommentStatus\":{\"values\":[{\"name\":\"PENDING\",\"dbName\":null},{\"name\":\"APPROVED\",\"dbName\":null},{\"name\":\"REJECTED\",\"dbName\":null}],\"dbName\":null},\"AccountingEntityType\":{\"values\":[{\"name\":\"CUSTOMER\",\"dbName\":null},{\"name\":\"PRODUCT\",\"dbName\":null}],\"dbName\":null},\"AccountingOutboxKind\":{\"values\":[{\"name\":\"CUSTOMER_PUSH\",\"dbName\":null},{\"name\":\"PRODUCT_PUSH\",\"dbName\":null},{\"name\":\"ORDER_DOCUMENT\",\"dbName\":null},{\"name\":\"ORDER_DOCUMENT_DELETE\",\"dbName\":null}],\"dbName\":null},\"AccountingOutboxStatus\":{\"values\":[{\"name\":\"PENDING\",\"dbName\":null},{\"name\":\"SENDING\",\"dbName\":null,\"documentation\":\"A call was in flight. Found at startup, it means the process died mid-call\\\\nand the outcome is unknown — see AccountingOutboxWorker.\"},{\"name\":\"SENT\",\"dbName\":null},{\"name\":\"FAILED\",\"dbName\":null},{\"name\":\"NEEDS_REVIEW\",\"dbName\":null,\"documentation\":\"Unsafe to retry automatically (e.g. a Zarrin call timed out: Zarrin has no\\\\nidempotency key, so a blind retry could post the document twice).\"},{\"name\":\"RESOLVED\",\"dbName\":null,\"documentation\":\"Closed by an admin from the log screen.\"}],\"dbName\":null},\"PromotionScope\":{\"values\":[{\"name\":\"PRODUCT\",\"dbName\":null},{\"name\":\"CATEGORY\",\"dbName\":null},{\"name\":\"CUSTOMER\",\"dbName\":null},{\"name\":\"BRAND\",\"dbName\":null}],\"dbName\":null,\"documentation\":\"Legacy Promotion.type — what the discount is scoped to.\"},\"PromotionUsage\":{\"values\":[{\"name\":\"ONCE\",\"dbName\":null},{\"name\":\"UNTIL_END_DATE\",\"dbName\":null}],\"dbName\":null,\"documentation\":\"Legacy Promotion.use_only — how often a customer may redeem it.\"},\"MessageAudience\":{\"values\":[{\"name\":\"SINGLE_NUMBER\",\"dbName\":null},{\"name\":\"MULTIPLE_NUMBERS\",\"dbName\":null},{\"name\":\"ALL_CUSTOMERS\",\"dbName\":null},{\"name\":\"WHOLESALE_CUSTOMERS\",\"dbName\":null},{\"name\":\"RETAIL_CUSTOMERS\",\"dbName\":null},{\"name\":\"SALES_AGENTS\",\"dbName\":null}],\"dbName\":null,\"documentation\":\"Who an SMS or notification was aimed at. Legacy's sms/create offered these\\\\naudiences, each gated by its own rid (sms.create.all, .omde, .single, ...).\"}},\"types\":{}}") defineDmmfProperty(exports.Prisma, config.runtimeDataModel) config.engineWasm = undefined diff --git a/apps/api/release/vendor/.prisma/client/index-browser.js b/apps/api/release/vendor/.prisma/client/index-browser.js index b5f4160..0315182 100644 --- a/apps/api/release/vendor/.prisma/client/index-browser.js +++ b/apps/api/release/vendor/.prisma/client/index-browser.js @@ -125,7 +125,7 @@ exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ exports.Prisma.CityScalarFieldEnum = { id: 'id', name: 'name', - province: 'province', + parentId: 'parentId', percent: 'percent', percentAux: 'percentAux' }; @@ -133,6 +133,8 @@ exports.Prisma.CityScalarFieldEnum = { exports.Prisma.AdminUserScalarFieldEnum = { id: 'id', fullName: 'fullName', + firstName: 'firstName', + lastName: 'lastName', mobile: 'mobile', passwordHash: 'passwordHash', role: 'role', @@ -140,16 +142,68 @@ exports.Prisma.AdminUserScalarFieldEnum = { branchId: 'branchId', wagePercent: 'wagePercent', isActive: 'isActive', - createdAt: 'createdAt' + createdAt: 'createdAt', + avatarFileId: 'avatarFileId', + address: 'address', + storeName: 'storeName', + pasazhName: 'pasazhName', + memberCode: 'memberCode' +}; + +exports.Prisma.AppSessionScalarFieldEnum = { + id: 'id', + jti: 'jti', + subjectId: 'subjectId', + subjectType: 'subjectType', + mobile: 'mobile', + iamSessionId: 'iamSessionId', + iamSub: 'iamSub', + ipAddress: 'ipAddress', + userAgent: 'userAgent', + createdAt: 'createdAt', + expiresAt: 'expiresAt', + lastSeenAt: 'lastSeenAt', + revokedAt: 'revokedAt', + revokedReason: 'revokedReason' +}; + +exports.Prisma.AdminSessionScalarFieldEnum = { + id: 'id', + jti: 'jti', + adminUserId: 'adminUserId', + iamSessionId: 'iamSessionId', + iamSub: 'iamSub', + ipAddress: 'ipAddress', + userAgent: 'userAgent', + createdAt: 'createdAt', + expiresAt: 'expiresAt', + lastSeenAt: 'lastSeenAt', + revokedAt: 'revokedAt', + revokedReason: 'revokedReason' +}; + +exports.Prisma.SalesExpertProfileScalarFieldEnum = { + id: 'id', + adminUserId: 'adminUserId', + cityId: 'cityId', + gramLevel: 'gramLevel', + phone: 'phone', + nationalCode: 'nationalCode', + tradingCustomerId: 'tradingCustomerId', + createdAt: 'createdAt', + updatedAt: 'updatedAt' }; exports.Prisma.CustomerScalarFieldEnum = { id: 'id', fullName: 'fullName', + firstName: 'firstName', + lastName: 'lastName', mobile: 'mobile', nationalCode: 'nationalCode', passwordHash: 'passwordHash', cityId: 'cityId', + cityNameRaw: 'cityNameRaw', kind: 'kind', phone: 'phone', address: 'address', @@ -161,10 +215,17 @@ exports.Prisma.CustomerScalarFieldEnum = { goldCreditLimitGrams: 'goldCreditLimitGrams', goldDebtGrams: 'goldDebtGrams', fiatDebtRial: 'fiatDebtRial', + accountingGoldBalance: 'accountingGoldBalance', + accountingRialBalance: 'accountingRialBalance', + accountingBalanceAt: 'accountingBalanceAt', + makingChargeOffsetPercent: 'makingChargeOffsetPercent', verificationStep: 'verificationStep', nationalIdImageUrl: 'nationalIdImageUrl', businessLicenseUrl: 'businessLicenseUrl', shopImageUrl: 'shopImageUrl', + verificationRejectionReason: 'verificationRejectionReason', + verificationRejectedAt: 'verificationRejectedAt', + birthDate: 'birthDate', avatarFileId: 'avatarFileId', canPlaceOrders: 'canPlaceOrders', isActive: 'isActive', @@ -173,6 +234,12 @@ exports.Prisma.CustomerScalarFieldEnum = { updatedAt: 'updatedAt' }; +exports.Prisma.CustomerFavoriteScalarFieldEnum = { + customerId: 'customerId', + productId: 'productId', + createdAt: 'createdAt' +}; + exports.Prisma.CustomerAddressScalarFieldEnum = { id: 'id', customerId: 'customerId', @@ -236,7 +303,10 @@ exports.Prisma.ProductScalarFieldEnum = { productCode: 'productCode', showType: 'showType', isActive: 'isActive', - createdAt: 'createdAt' + createdAt: 'createdAt', + accountingStockWeight: 'accountingStockWeight', + accountingStockCount: 'accountingStockCount', + accountingStockAt: 'accountingStockAt' }; exports.Prisma.ProductImageScalarFieldEnum = { @@ -256,7 +326,8 @@ exports.Prisma.ProductVariantScalarFieldEnum = { defaultWagePercent: 'defaultWagePercent', qty: 'qty', isPreOrder: 'isPreOrder', - isActive: 'isActive' + isActive: 'isActive', + imageId: 'imageId' }; exports.Prisma.OrderScalarFieldEnum = { @@ -271,6 +342,8 @@ exports.Prisma.OrderScalarFieldEnum = { flatRialCharge: 'flatRialCharge', isSuspendedOverCreditLimit: 'isSuspendedOverCreditLimit', deliveredAt: 'deliveredAt', + salesAgentId: 'salesAgentId', + referrerCustomerId: 'referrerCustomerId', createdAt: 'createdAt', updatedAt: 'updatedAt' }; @@ -398,6 +471,51 @@ exports.Prisma.SettingScalarFieldEnum = { updatedAt: 'updatedAt' }; +exports.Prisma.AccountingLinkScalarFieldEnum = { + id: 'id', + provider: 'provider', + entityType: 'entityType', + entityId: 'entityId', + externalCode: 'externalCode', + externalName: 'externalName', + origin: 'origin', + snapshot: 'snapshot', + syncedAt: 'syncedAt', + createdAt: 'createdAt' +}; + +exports.Prisma.AccountingOutboxScalarFieldEnum = { + id: 'id', + provider: 'provider', + kind: 'kind', + entityId: 'entityId', + status: 'status', + attempts: 'attempts', + nextAttemptAt: 'nextAttemptAt', + lastError: 'lastError', + externalRef: 'externalRef', + progress: 'progress', + lastRequest: 'lastRequest', + lastResponse: 'lastResponse', + sentAt: 'sentAt', + resolvedById: 'resolvedById', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.AccountingIssueScalarFieldEnum = { + id: 'id', + provider: 'provider', + kind: 'kind', + externalCode: 'externalCode', + entityId: 'entityId', + message: 'message', + data: 'data', + createdAt: 'createdAt', + updatedAt: 'updatedAt', + resolvedAt: 'resolvedAt' +}; + exports.Prisma.PromotionScalarFieldEnum = { id: 'id', title: 'title', @@ -491,6 +609,18 @@ exports.Prisma.UploadedFileScalarFieldEnum = { createdAt: 'createdAt' }; +exports.Prisma.CustomerOtpScalarFieldEnum = { + id: 'id', + mobile: 'mobile', + customerId: 'customerId', + codeHash: 'codeHash', + expiresAt: 'expiresAt', + attempts: 'attempts', + consumedAt: 'consumedAt', + requestIp: 'requestIp', + createdAt: 'createdAt' +}; + exports.Prisma.SortOrder = { asc: 'asc', desc: 'desc' @@ -500,6 +630,11 @@ exports.Prisma.JsonNullValueInput = { JsonNull: Prisma.JsonNull }; +exports.Prisma.NullableJsonNullValueInput = { + DbNull: Prisma.DbNull, + JsonNull: Prisma.JsonNull +}; + exports.Prisma.QueryMode = { default: 'default', insensitive: 'insensitive' @@ -528,14 +663,16 @@ exports.CustomerKind = exports.$Enums.CustomerKind = { APP_SHOPKEEPER: 'APP_SHOPKEEPER', WALK_IN_SHOPKEEPER: 'WALK_IN_SHOPKEEPER', BANKER: 'BANKER', - WORKSHOP_SUPERVISOR: 'WORKSHOP_SUPERVISOR' + WORKSHOP_SUPERVISOR: 'WORKSHOP_SUPERVISOR', + RETAIL: 'RETAIL' }; exports.VerificationStep = exports.$Enums.VerificationStep = { UNVERIFIED: 'UNVERIFIED', STEP_ONE_SUBMITTED: 'STEP_ONE_SUBMITTED', STEP_TWO_SUBMITTED: 'STEP_TWO_SUBMITTED', - VERIFIED: 'VERIFIED' + VERIFIED: 'VERIFIED', + REJECTED: 'REJECTED' }; exports.ProductImageRole = exports.$Enums.ProductImageRole = { @@ -597,6 +734,27 @@ exports.CommentStatus = exports.$Enums.CommentStatus = { REJECTED: 'REJECTED' }; +exports.AccountingEntityType = exports.$Enums.AccountingEntityType = { + CUSTOMER: 'CUSTOMER', + PRODUCT: 'PRODUCT' +}; + +exports.AccountingOutboxKind = exports.$Enums.AccountingOutboxKind = { + CUSTOMER_PUSH: 'CUSTOMER_PUSH', + PRODUCT_PUSH: 'PRODUCT_PUSH', + ORDER_DOCUMENT: 'ORDER_DOCUMENT', + ORDER_DOCUMENT_DELETE: 'ORDER_DOCUMENT_DELETE' +}; + +exports.AccountingOutboxStatus = exports.$Enums.AccountingOutboxStatus = { + PENDING: 'PENDING', + SENDING: 'SENDING', + SENT: 'SENT', + FAILED: 'FAILED', + NEEDS_REVIEW: 'NEEDS_REVIEW', + RESOLVED: 'RESOLVED' +}; + exports.PromotionScope = exports.$Enums.PromotionScope = { PRODUCT: 'PRODUCT', CATEGORY: 'CATEGORY', @@ -621,7 +779,11 @@ exports.MessageAudience = exports.$Enums.MessageAudience = { exports.Prisma.ModelName = { City: 'City', AdminUser: 'AdminUser', + AppSession: 'AppSession', + AdminSession: 'AdminSession', + SalesExpertProfile: 'SalesExpertProfile', Customer: 'Customer', + CustomerFavorite: 'CustomerFavorite', CustomerAddress: 'CustomerAddress', Branch: 'Branch', Workshop: 'Workshop', @@ -644,6 +806,9 @@ exports.Prisma.ModelName = { Permission: 'Permission', Comment: 'Comment', Setting: 'Setting', + AccountingLink: 'AccountingLink', + AccountingOutbox: 'AccountingOutbox', + AccountingIssue: 'AccountingIssue', Promotion: 'Promotion', PromotionExclusion: 'PromotionExclusion', BranchAllocation: 'BranchAllocation', @@ -653,7 +818,8 @@ exports.Prisma.ModelName = { NotificationRecipient: 'NotificationRecipient', NewsletterSubscriber: 'NewsletterSubscriber', CustomerActivityLog: 'CustomerActivityLog', - UploadedFile: 'UploadedFile' + UploadedFile: 'UploadedFile', + CustomerOtp: 'CustomerOtp' }; /** diff --git a/apps/api/release/vendor/.prisma/client/index.d.ts b/apps/api/release/vendor/.prisma/client/index.d.ts index b0c7710..ea54f7f 100644 --- a/apps/api/release/vendor/.prisma/client/index.d.ts +++ b/apps/api/release/vendor/.prisma/client/index.d.ts @@ -15,7 +15,9 @@ export type PrismaPromise = $Public.PrismaPromise /** * Model City - * + * Legacy `cities` is a tree (country > province > city > district) and so is + * this: a city hangs under its `parent`. In the admin pickers a top-level row + * (the country) is a heading, not selectable (henza_admin citiesModel.js:38). */ export type City = $Result.DefaultSelection /** @@ -23,11 +25,74 @@ export type City = $Result.DefaultSelection * */ export type AdminUser = $Result.DefaultSelection +/** + * Model AppSession + * An issued APP token (customer app / sales-expert app), so it can be revoked + * before it expires — the counterpart of AdminSession for the other token family. + * + * WHY A SEPARATE TABLE AND NO FOREIGN KEY + * --------------------------------------- + * An app token's `sub` is a Customer id for a customer and an **AdminUser id** + * for a sales expert (D21). One FK cannot point at two tables, so the subject is + * stored as a plain id plus its type. The rows are short-lived operational data, + * not part of the accounting model, so the missing FK costs nothing here. + */ +export type AppSession = $Result.DefaultSelection +/** + * Model AdminSession + * An issued admin-panel JWT, so it can be revoked before it expires. + * + * WHY THIS EXISTS + * --------------- + * The admin token is self-contained and valid for 12h, which means nothing — + * not disabling the account, not a central "sign out everywhere" — could cut a + * session short: the token kept working until it expired. With the central IAM + * in the loop that gap became visible (an IAM session revocation had no effect + * here), so every issued token now carries a `jti` recorded on this table and + * JwtStrategy refuses a token whose row is revoked. + * + * Rows are written ONLY while tracking is enabled, and JwtStrategy only + * enforces them while it is enabled, so a deployment that does not want the + * extra lookup behaves exactly as before. + */ +export type AdminSession = $Result.DefaultSelection +/** + * Model SalesExpertProfile + * The sales-expert fields legacy kept on the `customers` row (type=1) and that + * were lost when a sales expert became an AdminUser (D17). + * + * A separate table rather than columns on AdminUser: these are meaningful only + * for role = SALES_EXPERT and would be permanently null for every other admin. + * A row is created for every SALES_EXPERT by the migration, and upserted by the + * service whenever one is created or a user's role becomes SALES_EXPERT — but + * readers still left-join, so a missing profile degrades to nulls rather than + * dropping the agent from the grid. + * + * `reagent_id` is deliberately NOT here — see D17: in the reference it was a + * side effect of the shared customers form, and filling it removed that expert + * from the selectable-agent list (queryReagent, AdminController.php:420). + */ +export type SalesExpertProfile = $Result.DefaultSelection /** * Model Customer * */ export type Customer = $Result.DefaultSelection +/** + * Model CustomerFavorite + * Legacy `fav` (251 rows) — saved products. The target had no model for this, + * so every customer's favourites would have been lost in the migration; the + * owner confirmed on 2026-10-06 that they matter. + * + * Legacy `fav` has two columns and NO primary key. The composite key here + * supplies the constraint the source lacks (the precheck found 0 duplicate + * pairs, but the tool should still SELECT DISTINCT). 14 of the 251 rows point + * at a deleted customer and must be skipped. + * + * Legacy's denormalised `product.count_fav` counter is deliberately NOT + * recreated as a column — derive it from this table. + */ +export type CustomerFavorite = $Result.DefaultSelection /** * Model CustomerAddress * @@ -139,6 +204,25 @@ export type Comment = $Result.DefaultSelection * */ export type Setting = $Result.DefaultSelection +/** + * Model AccountingLink + * One app row ↔ one record in the accounting software (customer account or + * کارساخته). + */ +export type AccountingLink = $Result.DefaultSelection +/** + * Model AccountingOutbox + * Work to push to the accounting software. Written in the SAME transaction as + * the change that causes it, so an outage of the accounting software never + * loses an event and never blocks the app. + */ +export type AccountingOutbox = $Result.DefaultSelection +/** + * Model AccountingIssue + * Something a pull found that needs a human: an account with no mobile, two + * accounts sharing one mobile, a کارساخته group with no category mapping. + */ +export type AccountingIssue = $Result.DefaultSelection /** * Model Promotion * @@ -193,6 +277,25 @@ export type CustomerActivityLog = $Result.DefaultSelection +/** + * Model CustomerOtp + * One OTP login challenge for a customer. + * + * Ports henza_server's flow (ApiMobileController.php:39-78), where userAuth + * generated rand(1000,9999), stored it on the customer row as `send_password` + * and sent it by SMS, and userVerfiy compared the submitted code against it + * (mismatch -> HTTP 422). + * + * Three deliberate improvements over the reference, approved by the user + * (docs/parity/DECISIONS.md D6 and T1): + * 1. the code is stored as a bcrypt hash, never in plain text — the + * reference kept it readable in a customer column; + * 2. it expires (`expiresAt`) — the reference's code stayed valid forever; + * 3. attempts are counted and the challenge locks out — the reference had + * no limit at all. + * The parity behaviour itself is the code comparison and the rejection. + */ +export type CustomerOtp = $Result.DefaultSelection /** * Enums @@ -214,7 +317,8 @@ export const CustomerKind: { APP_SHOPKEEPER: 'APP_SHOPKEEPER', WALK_IN_SHOPKEEPER: 'WALK_IN_SHOPKEEPER', BANKER: 'BANKER', - WORKSHOP_SUPERVISOR: 'WORKSHOP_SUPERVISOR' + WORKSHOP_SUPERVISOR: 'WORKSHOP_SUPERVISOR', + RETAIL: 'RETAIL' }; export type CustomerKind = (typeof CustomerKind)[keyof typeof CustomerKind] @@ -224,7 +328,8 @@ export const VerificationStep: { UNVERIFIED: 'UNVERIFIED', STEP_ONE_SUBMITTED: 'STEP_ONE_SUBMITTED', STEP_TWO_SUBMITTED: 'STEP_TWO_SUBMITTED', - VERIFIED: 'VERIFIED' + VERIFIED: 'VERIFIED', + REJECTED: 'REJECTED' }; export type VerificationStep = (typeof VerificationStep)[keyof typeof VerificationStep] @@ -313,6 +418,36 @@ export const CommentStatus: { export type CommentStatus = (typeof CommentStatus)[keyof typeof CommentStatus] +export const AccountingEntityType: { + CUSTOMER: 'CUSTOMER', + PRODUCT: 'PRODUCT' +}; + +export type AccountingEntityType = (typeof AccountingEntityType)[keyof typeof AccountingEntityType] + + +export const AccountingOutboxKind: { + CUSTOMER_PUSH: 'CUSTOMER_PUSH', + PRODUCT_PUSH: 'PRODUCT_PUSH', + ORDER_DOCUMENT: 'ORDER_DOCUMENT', + ORDER_DOCUMENT_DELETE: 'ORDER_DOCUMENT_DELETE' +}; + +export type AccountingOutboxKind = (typeof AccountingOutboxKind)[keyof typeof AccountingOutboxKind] + + +export const AccountingOutboxStatus: { + PENDING: 'PENDING', + SENDING: 'SENDING', + SENT: 'SENT', + FAILED: 'FAILED', + NEEDS_REVIEW: 'NEEDS_REVIEW', + RESOLVED: 'RESOLVED' +}; + +export type AccountingOutboxStatus = (typeof AccountingOutboxStatus)[keyof typeof AccountingOutboxStatus] + + export const PromotionScope: { PRODUCT: 'PRODUCT', CATEGORY: 'CATEGORY', @@ -388,6 +523,18 @@ export type CommentStatus = $Enums.CommentStatus export const CommentStatus: typeof $Enums.CommentStatus +export type AccountingEntityType = $Enums.AccountingEntityType + +export const AccountingEntityType: typeof $Enums.AccountingEntityType + +export type AccountingOutboxKind = $Enums.AccountingOutboxKind + +export const AccountingOutboxKind: typeof $Enums.AccountingOutboxKind + +export type AccountingOutboxStatus = $Enums.AccountingOutboxStatus + +export const AccountingOutboxStatus: typeof $Enums.AccountingOutboxStatus + export type PromotionScope = $Enums.PromotionScope export const PromotionScope: typeof $Enums.PromotionScope @@ -543,6 +690,36 @@ export class PrismaClient< */ get adminUser(): Prisma.AdminUserDelegate; + /** + * `prisma.appSession`: Exposes CRUD operations for the **AppSession** model. + * Example usage: + * ```ts + * // Fetch zero or more AppSessions + * const appSessions = await prisma.appSession.findMany() + * ``` + */ + get appSession(): Prisma.AppSessionDelegate; + + /** + * `prisma.adminSession`: Exposes CRUD operations for the **AdminSession** model. + * Example usage: + * ```ts + * // Fetch zero or more AdminSessions + * const adminSessions = await prisma.adminSession.findMany() + * ``` + */ + get adminSession(): Prisma.AdminSessionDelegate; + + /** + * `prisma.salesExpertProfile`: Exposes CRUD operations for the **SalesExpertProfile** model. + * Example usage: + * ```ts + * // Fetch zero or more SalesExpertProfiles + * const salesExpertProfiles = await prisma.salesExpertProfile.findMany() + * ``` + */ + get salesExpertProfile(): Prisma.SalesExpertProfileDelegate; + /** * `prisma.customer`: Exposes CRUD operations for the **Customer** model. * Example usage: @@ -553,6 +730,16 @@ export class PrismaClient< */ get customer(): Prisma.CustomerDelegate; + /** + * `prisma.customerFavorite`: Exposes CRUD operations for the **CustomerFavorite** model. + * Example usage: + * ```ts + * // Fetch zero or more CustomerFavorites + * const customerFavorites = await prisma.customerFavorite.findMany() + * ``` + */ + get customerFavorite(): Prisma.CustomerFavoriteDelegate; + /** * `prisma.customerAddress`: Exposes CRUD operations for the **CustomerAddress** model. * Example usage: @@ -773,6 +960,36 @@ export class PrismaClient< */ get setting(): Prisma.SettingDelegate; + /** + * `prisma.accountingLink`: Exposes CRUD operations for the **AccountingLink** model. + * Example usage: + * ```ts + * // Fetch zero or more AccountingLinks + * const accountingLinks = await prisma.accountingLink.findMany() + * ``` + */ + get accountingLink(): Prisma.AccountingLinkDelegate; + + /** + * `prisma.accountingOutbox`: Exposes CRUD operations for the **AccountingOutbox** model. + * Example usage: + * ```ts + * // Fetch zero or more AccountingOutboxes + * const accountingOutboxes = await prisma.accountingOutbox.findMany() + * ``` + */ + get accountingOutbox(): Prisma.AccountingOutboxDelegate; + + /** + * `prisma.accountingIssue`: Exposes CRUD operations for the **AccountingIssue** model. + * Example usage: + * ```ts + * // Fetch zero or more AccountingIssues + * const accountingIssues = await prisma.accountingIssue.findMany() + * ``` + */ + get accountingIssue(): Prisma.AccountingIssueDelegate; + /** * `prisma.promotion`: Exposes CRUD operations for the **Promotion** model. * Example usage: @@ -872,6 +1089,16 @@ export class PrismaClient< * ``` */ get uploadedFile(): Prisma.UploadedFileDelegate; + + /** + * `prisma.customerOtp`: Exposes CRUD operations for the **CustomerOtp** model. + * Example usage: + * ```ts + * // Fetch zero or more CustomerOtps + * const customerOtps = await prisma.customerOtp.findMany() + * ``` + */ + get customerOtp(): Prisma.CustomerOtpDelegate; } export namespace Prisma { @@ -1315,7 +1542,11 @@ export namespace Prisma { export const ModelName: { City: 'City', AdminUser: 'AdminUser', + AppSession: 'AppSession', + AdminSession: 'AdminSession', + SalesExpertProfile: 'SalesExpertProfile', Customer: 'Customer', + CustomerFavorite: 'CustomerFavorite', CustomerAddress: 'CustomerAddress', Branch: 'Branch', Workshop: 'Workshop', @@ -1338,6 +1569,9 @@ export namespace Prisma { Permission: 'Permission', Comment: 'Comment', Setting: 'Setting', + AccountingLink: 'AccountingLink', + AccountingOutbox: 'AccountingOutbox', + AccountingIssue: 'AccountingIssue', Promotion: 'Promotion', PromotionExclusion: 'PromotionExclusion', BranchAllocation: 'BranchAllocation', @@ -1347,7 +1581,8 @@ export namespace Prisma { NotificationRecipient: 'NotificationRecipient', NewsletterSubscriber: 'NewsletterSubscriber', CustomerActivityLog: 'CustomerActivityLog', - UploadedFile: 'UploadedFile' + UploadedFile: 'UploadedFile', + CustomerOtp: 'CustomerOtp' }; export type ModelName = (typeof ModelName)[keyof typeof ModelName] @@ -1363,7 +1598,7 @@ export namespace Prisma { export type TypeMap = { meta: { - modelProps: "city" | "adminUser" | "customer" | "customerAddress" | "branch" | "workshop" | "category" | "brand" | "collection" | "collectionProduct" | "product" | "productImage" | "productVariant" | "order" | "orderItem" | "orderStatusEvent" | "preOrder" | "preOrderStatusEvent" | "ledgerEntry" | "goldPriceQuote" | "walletBonus" | "userType" | "permission" | "comment" | "setting" | "promotion" | "promotionExclusion" | "branchAllocation" | "branchAllocationItem" | "smsMessage" | "notification" | "notificationRecipient" | "newsletterSubscriber" | "customerActivityLog" | "uploadedFile" + modelProps: "city" | "adminUser" | "appSession" | "adminSession" | "salesExpertProfile" | "customer" | "customerFavorite" | "customerAddress" | "branch" | "workshop" | "category" | "brand" | "collection" | "collectionProduct" | "product" | "productImage" | "productVariant" | "order" | "orderItem" | "orderStatusEvent" | "preOrder" | "preOrderStatusEvent" | "ledgerEntry" | "goldPriceQuote" | "walletBonus" | "userType" | "permission" | "comment" | "setting" | "accountingLink" | "accountingOutbox" | "accountingIssue" | "promotion" | "promotionExclusion" | "branchAllocation" | "branchAllocationItem" | "smsMessage" | "notification" | "notificationRecipient" | "newsletterSubscriber" | "customerActivityLog" | "uploadedFile" | "customerOtp" txIsolationLevel: Prisma.TransactionIsolationLevel } model: { @@ -1507,6 +1742,216 @@ export namespace Prisma { } } } + AppSession: { + payload: Prisma.$AppSessionPayload + fields: Prisma.AppSessionFieldRefs + operations: { + findUnique: { + args: Prisma.AppSessionFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.AppSessionFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.AppSessionFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.AppSessionFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.AppSessionFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.AppSessionCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.AppSessionCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.AppSessionCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.AppSessionDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.AppSessionUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.AppSessionDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.AppSessionUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.AppSessionUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.AppSessionAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.AppSessionGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.AppSessionCountArgs + result: $Utils.Optional | number + } + } + } + AdminSession: { + payload: Prisma.$AdminSessionPayload + fields: Prisma.AdminSessionFieldRefs + operations: { + findUnique: { + args: Prisma.AdminSessionFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.AdminSessionFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.AdminSessionFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.AdminSessionFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.AdminSessionFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.AdminSessionCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.AdminSessionCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.AdminSessionCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.AdminSessionDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.AdminSessionUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.AdminSessionDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.AdminSessionUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.AdminSessionUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.AdminSessionAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.AdminSessionGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.AdminSessionCountArgs + result: $Utils.Optional | number + } + } + } + SalesExpertProfile: { + payload: Prisma.$SalesExpertProfilePayload + fields: Prisma.SalesExpertProfileFieldRefs + operations: { + findUnique: { + args: Prisma.SalesExpertProfileFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.SalesExpertProfileFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.SalesExpertProfileFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.SalesExpertProfileFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.SalesExpertProfileFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.SalesExpertProfileCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.SalesExpertProfileCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.SalesExpertProfileCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.SalesExpertProfileDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.SalesExpertProfileUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.SalesExpertProfileDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.SalesExpertProfileUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.SalesExpertProfileUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.SalesExpertProfileAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.SalesExpertProfileGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.SalesExpertProfileCountArgs + result: $Utils.Optional | number + } + } + } Customer: { payload: Prisma.$CustomerPayload fields: Prisma.CustomerFieldRefs @@ -1577,6 +2022,76 @@ export namespace Prisma { } } } + CustomerFavorite: { + payload: Prisma.$CustomerFavoritePayload + fields: Prisma.CustomerFavoriteFieldRefs + operations: { + findUnique: { + args: Prisma.CustomerFavoriteFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.CustomerFavoriteFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.CustomerFavoriteFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.CustomerFavoriteFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.CustomerFavoriteFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.CustomerFavoriteCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.CustomerFavoriteCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.CustomerFavoriteCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.CustomerFavoriteDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.CustomerFavoriteUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.CustomerFavoriteDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.CustomerFavoriteUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.CustomerFavoriteUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.CustomerFavoriteAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.CustomerFavoriteGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.CustomerFavoriteCountArgs + result: $Utils.Optional | number + } + } + } CustomerAddress: { payload: Prisma.$CustomerAddressPayload fields: Prisma.CustomerAddressFieldRefs @@ -3117,6 +3632,216 @@ export namespace Prisma { } } } + AccountingLink: { + payload: Prisma.$AccountingLinkPayload + fields: Prisma.AccountingLinkFieldRefs + operations: { + findUnique: { + args: Prisma.AccountingLinkFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.AccountingLinkFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.AccountingLinkFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.AccountingLinkFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.AccountingLinkFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.AccountingLinkCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.AccountingLinkCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.AccountingLinkCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.AccountingLinkDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.AccountingLinkUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.AccountingLinkDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.AccountingLinkUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.AccountingLinkUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.AccountingLinkAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.AccountingLinkGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.AccountingLinkCountArgs + result: $Utils.Optional | number + } + } + } + AccountingOutbox: { + payload: Prisma.$AccountingOutboxPayload + fields: Prisma.AccountingOutboxFieldRefs + operations: { + findUnique: { + args: Prisma.AccountingOutboxFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.AccountingOutboxFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.AccountingOutboxFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.AccountingOutboxFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.AccountingOutboxFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.AccountingOutboxCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.AccountingOutboxCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.AccountingOutboxCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.AccountingOutboxDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.AccountingOutboxUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.AccountingOutboxDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.AccountingOutboxUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.AccountingOutboxUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.AccountingOutboxAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.AccountingOutboxGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.AccountingOutboxCountArgs + result: $Utils.Optional | number + } + } + } + AccountingIssue: { + payload: Prisma.$AccountingIssuePayload + fields: Prisma.AccountingIssueFieldRefs + operations: { + findUnique: { + args: Prisma.AccountingIssueFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.AccountingIssueFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.AccountingIssueFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.AccountingIssueFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.AccountingIssueFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.AccountingIssueCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.AccountingIssueCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.AccountingIssueCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.AccountingIssueDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.AccountingIssueUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.AccountingIssueDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.AccountingIssueUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.AccountingIssueUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.AccountingIssueAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.AccountingIssueGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.AccountingIssueCountArgs + result: $Utils.Optional | number + } + } + } Promotion: { payload: Prisma.$PromotionPayload fields: Prisma.PromotionFieldRefs @@ -3817,6 +4542,76 @@ export namespace Prisma { } } } + CustomerOtp: { + payload: Prisma.$CustomerOtpPayload + fields: Prisma.CustomerOtpFieldRefs + operations: { + findUnique: { + args: Prisma.CustomerOtpFindUniqueArgs + result: $Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.CustomerOtpFindUniqueOrThrowArgs + result: $Utils.PayloadToResult + } + findFirst: { + args: Prisma.CustomerOtpFindFirstArgs + result: $Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.CustomerOtpFindFirstOrThrowArgs + result: $Utils.PayloadToResult + } + findMany: { + args: Prisma.CustomerOtpFindManyArgs + result: $Utils.PayloadToResult[] + } + create: { + args: Prisma.CustomerOtpCreateArgs + result: $Utils.PayloadToResult + } + createMany: { + args: Prisma.CustomerOtpCreateManyArgs + result: BatchPayload + } + createManyAndReturn: { + args: Prisma.CustomerOtpCreateManyAndReturnArgs + result: $Utils.PayloadToResult[] + } + delete: { + args: Prisma.CustomerOtpDeleteArgs + result: $Utils.PayloadToResult + } + update: { + args: Prisma.CustomerOtpUpdateArgs + result: $Utils.PayloadToResult + } + deleteMany: { + args: Prisma.CustomerOtpDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.CustomerOtpUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.CustomerOtpUpsertArgs + result: $Utils.PayloadToResult + } + aggregate: { + args: Prisma.CustomerOtpAggregateArgs + result: $Utils.Optional + } + groupBy: { + args: Prisma.CustomerOtpGroupByArgs + result: $Utils.Optional[] + } + count: { + args: Prisma.CustomerOtpCountArgs + result: $Utils.Optional | number + } + } + } } } & { other: { @@ -3978,17 +4773,21 @@ export namespace Prisma { */ export type CityCountOutputType = { + children: number customers: number addresses: number branches: number preOrders: number + salesExpertProfiles: number } export type CityCountOutputTypeSelect = { + children?: boolean | CityCountOutputTypeCountChildrenArgs customers?: boolean | CityCountOutputTypeCountCustomersArgs addresses?: boolean | CityCountOutputTypeCountAddressesArgs branches?: boolean | CityCountOutputTypeCountBranchesArgs preOrders?: boolean | CityCountOutputTypeCountPreOrdersArgs + salesExpertProfiles?: boolean | CityCountOutputTypeCountSalesExpertProfilesArgs } // Custom InputTypes @@ -4002,6 +4801,13 @@ export namespace Prisma { select?: CityCountOutputTypeSelect | null } + /** + * CityCountOutputType without action + */ + export type CityCountOutputTypeCountChildrenArgs = { + where?: CityWhereInput + } + /** * CityCountOutputType without action */ @@ -4030,6 +4836,13 @@ export namespace Prisma { where?: PreOrderWhereInput } + /** + * CityCountOutputType without action + */ + export type CityCountOutputTypeCountSalesExpertProfilesArgs = { + where?: SalesExpertProfileWhereInput + } + /** * Count Type AdminUserCountOutputType @@ -4037,6 +4850,7 @@ export namespace Prisma { export type AdminUserCountOutputType = { referredCustomers: number + creditedOrders: number supervisedWorkshops: number branchAllocations: number postedLedgerEntries: number @@ -4045,10 +4859,12 @@ export namespace Prisma { sentSmsMessages: number sentNotifications: number uploadedFiles: number + sessions: number } export type AdminUserCountOutputTypeSelect = { referredCustomers?: boolean | AdminUserCountOutputTypeCountReferredCustomersArgs + creditedOrders?: boolean | AdminUserCountOutputTypeCountCreditedOrdersArgs supervisedWorkshops?: boolean | AdminUserCountOutputTypeCountSupervisedWorkshopsArgs branchAllocations?: boolean | AdminUserCountOutputTypeCountBranchAllocationsArgs postedLedgerEntries?: boolean | AdminUserCountOutputTypeCountPostedLedgerEntriesArgs @@ -4057,6 +4873,7 @@ export namespace Prisma { sentSmsMessages?: boolean | AdminUserCountOutputTypeCountSentSmsMessagesArgs sentNotifications?: boolean | AdminUserCountOutputTypeCountSentNotificationsArgs uploadedFiles?: boolean | AdminUserCountOutputTypeCountUploadedFilesArgs + sessions?: boolean | AdminUserCountOutputTypeCountSessionsArgs } // Custom InputTypes @@ -4077,6 +4894,13 @@ export namespace Prisma { where?: CustomerWhereInput } + /** + * AdminUserCountOutputType without action + */ + export type AdminUserCountOutputTypeCountCreditedOrdersArgs = { + where?: OrderWhereInput + } + /** * AdminUserCountOutputType without action */ @@ -4133,12 +4957,20 @@ export namespace Prisma { where?: UploadedFileWhereInput } + /** + * AdminUserCountOutputType without action + */ + export type AdminUserCountOutputTypeCountSessionsArgs = { + where?: AdminSessionWhereInput + } + /** * Count Type CustomerCountOutputType */ export type CustomerCountOutputType = { + referredOrders: number addresses: number orders: number preOrders: number @@ -4148,9 +4980,12 @@ export namespace Prisma { promotions: number notifications: number activityLogs: number + otpChallenges: number + favorites: number } export type CustomerCountOutputTypeSelect = { + referredOrders?: boolean | CustomerCountOutputTypeCountReferredOrdersArgs addresses?: boolean | CustomerCountOutputTypeCountAddressesArgs orders?: boolean | CustomerCountOutputTypeCountOrdersArgs preOrders?: boolean | CustomerCountOutputTypeCountPreOrdersArgs @@ -4160,6 +4995,8 @@ export namespace Prisma { promotions?: boolean | CustomerCountOutputTypeCountPromotionsArgs notifications?: boolean | CustomerCountOutputTypeCountNotificationsArgs activityLogs?: boolean | CustomerCountOutputTypeCountActivityLogsArgs + otpChallenges?: boolean | CustomerCountOutputTypeCountOtpChallengesArgs + favorites?: boolean | CustomerCountOutputTypeCountFavoritesArgs } // Custom InputTypes @@ -4173,6 +5010,13 @@ export namespace Prisma { select?: CustomerCountOutputTypeSelect | null } + /** + * CustomerCountOutputType without action + */ + export type CustomerCountOutputTypeCountReferredOrdersArgs = { + where?: OrderWhereInput + } + /** * CustomerCountOutputType without action */ @@ -4236,6 +5080,20 @@ export namespace Prisma { where?: CustomerActivityLogWhereInput } + /** + * CustomerCountOutputType without action + */ + export type CustomerCountOutputTypeCountOtpChallengesArgs = { + where?: CustomerOtpWhereInput + } + + /** + * CustomerCountOutputType without action + */ + export type CustomerCountOutputTypeCountFavoritesArgs = { + where?: CustomerFavoriteWhereInput + } + /** * Count Type BranchCountOutputType @@ -4448,6 +5306,7 @@ export namespace Prisma { comments: number promotions: number allocationItems: number + favoritedBy: number } export type ProductCountOutputTypeSelect = { @@ -4457,6 +5316,7 @@ export namespace Prisma { comments?: boolean | ProductCountOutputTypeCountCommentsArgs promotions?: boolean | ProductCountOutputTypeCountPromotionsArgs allocationItems?: boolean | ProductCountOutputTypeCountAllocationItemsArgs + favoritedBy?: boolean | ProductCountOutputTypeCountFavoritedByArgs } // Custom InputTypes @@ -4512,6 +5372,44 @@ export namespace Prisma { where?: BranchAllocationItemWhereInput } + /** + * ProductCountOutputType without action + */ + export type ProductCountOutputTypeCountFavoritedByArgs = { + where?: CustomerFavoriteWhereInput + } + + + /** + * Count Type ProductImageCountOutputType + */ + + export type ProductImageCountOutputType = { + variants: number + } + + export type ProductImageCountOutputTypeSelect = { + variants?: boolean | ProductImageCountOutputTypeCountVariantsArgs + } + + // Custom InputTypes + /** + * ProductImageCountOutputType without action + */ + export type ProductImageCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the ProductImageCountOutputType + */ + select?: ProductImageCountOutputTypeSelect | null + } + + /** + * ProductImageCountOutputType without action + */ + export type ProductImageCountOutputTypeCountVariantsArgs = { + where?: ProductVariantWhereInput + } + /** * Count Type ProductVariantCountOutputType @@ -4763,10 +5661,12 @@ export namespace Prisma { export type UploadedFileCountOutputType = { customerAvatars: number + adminUserAvatars: number } export type UploadedFileCountOutputTypeSelect = { customerAvatars?: boolean | UploadedFileCountOutputTypeCountCustomerAvatarsArgs + adminUserAvatars?: boolean | UploadedFileCountOutputTypeCountAdminUserAvatarsArgs } // Custom InputTypes @@ -4787,6 +5687,13 @@ export namespace Prisma { where?: CustomerWhereInput } + /** + * UploadedFileCountOutputType without action + */ + export type UploadedFileCountOutputTypeCountAdminUserAvatarsArgs = { + where?: AdminUserWhereInput + } + /** * Models @@ -4817,7 +5724,7 @@ export namespace Prisma { export type CityMinAggregateOutputType = { id: string | null name: string | null - province: string | null + parentId: string | null percent: Decimal | null percentAux: Decimal | null } @@ -4825,7 +5732,7 @@ export namespace Prisma { export type CityMaxAggregateOutputType = { id: string | null name: string | null - province: string | null + parentId: string | null percent: Decimal | null percentAux: Decimal | null } @@ -4833,7 +5740,7 @@ export namespace Prisma { export type CityCountAggregateOutputType = { id: number name: number - province: number + parentId: number percent: number percentAux: number _all: number @@ -4853,7 +5760,7 @@ export namespace Prisma { export type CityMinAggregateInputType = { id?: true name?: true - province?: true + parentId?: true percent?: true percentAux?: true } @@ -4861,7 +5768,7 @@ export namespace Prisma { export type CityMaxAggregateInputType = { id?: true name?: true - province?: true + parentId?: true percent?: true percentAux?: true } @@ -4869,7 +5776,7 @@ export namespace Prisma { export type CityCountAggregateInputType = { id?: true name?: true - province?: true + parentId?: true percent?: true percentAux?: true _all?: true @@ -4964,7 +5871,7 @@ export namespace Prisma { export type CityGroupByOutputType = { id: string name: string - province: string | null + parentId: string | null percent: Decimal | null percentAux: Decimal | null _count: CityCountAggregateOutputType | null @@ -4991,53 +5898,65 @@ export namespace Prisma { export type CitySelect = $Extensions.GetSelect<{ id?: boolean name?: boolean - province?: boolean + parentId?: boolean percent?: boolean percentAux?: boolean + parent?: boolean | City$parentArgs + children?: boolean | City$childrenArgs customers?: boolean | City$customersArgs addresses?: boolean | City$addressesArgs branches?: boolean | City$branchesArgs preOrders?: boolean | City$preOrdersArgs + salesExpertProfiles?: boolean | City$salesExpertProfilesArgs _count?: boolean | CityCountOutputTypeDefaultArgs }, ExtArgs["result"]["city"]> export type CitySelectCreateManyAndReturn = $Extensions.GetSelect<{ id?: boolean name?: boolean - province?: boolean + parentId?: boolean percent?: boolean percentAux?: boolean + parent?: boolean | City$parentArgs }, ExtArgs["result"]["city"]> export type CitySelectScalar = { id?: boolean name?: boolean - province?: boolean + parentId?: boolean percent?: boolean percentAux?: boolean } export type CityInclude = { + parent?: boolean | City$parentArgs + children?: boolean | City$childrenArgs customers?: boolean | City$customersArgs addresses?: boolean | City$addressesArgs branches?: boolean | City$branchesArgs preOrders?: boolean | City$preOrdersArgs + salesExpertProfiles?: boolean | City$salesExpertProfilesArgs _count?: boolean | CityCountOutputTypeDefaultArgs } - export type CityIncludeCreateManyAndReturn = {} + export type CityIncludeCreateManyAndReturn = { + parent?: boolean | City$parentArgs + } export type $CityPayload = { name: "City" objects: { + parent: Prisma.$CityPayload | null + children: Prisma.$CityPayload[] customers: Prisma.$CustomerPayload[] addresses: Prisma.$CustomerAddressPayload[] branches: Prisma.$BranchPayload[] preOrders: Prisma.$PreOrderPayload[] + salesExpertProfiles: Prisma.$SalesExpertProfilePayload[] } scalars: $Extensions.GetPayloadResult<{ id: string name: string - province: string | null + parentId: string | null /** * Legacy cities.percent / percent_aux — per-city wage surcharges the city * screen edits through GET cities/get-percent/{id} and get-percent-aux/{id}. @@ -5408,10 +6327,13 @@ export namespace Prisma { */ export interface Prisma__CityClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" + parent = {}>(args?: Subset>): Prisma__CityClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> + children = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> customers = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> addresses = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> branches = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> preOrders = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + salesExpertProfiles = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. @@ -5443,7 +6365,7 @@ export namespace Prisma { interface CityFieldRefs { readonly id: FieldRef<"City", 'String'> readonly name: FieldRef<"City", 'String'> - readonly province: FieldRef<"City", 'String'> + readonly parentId: FieldRef<"City", 'String'> readonly percent: FieldRef<"City", 'Decimal'> readonly percentAux: FieldRef<"City", 'Decimal'> } @@ -5667,6 +6589,10 @@ export namespace Prisma { */ data: CityCreateManyInput | CityCreateManyInput[] skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: CityIncludeCreateManyAndReturn | null } /** @@ -5759,6 +6685,41 @@ export namespace Prisma { where?: CityWhereInput } + /** + * City.parent + */ + export type City$parentArgs = { + /** + * Select specific fields to fetch from the City + */ + select?: CitySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CityInclude | null + where?: CityWhereInput + } + + /** + * City.children + */ + export type City$childrenArgs = { + /** + * Select specific fields to fetch from the City + */ + select?: CitySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CityInclude | null + where?: CityWhereInput + orderBy?: CityOrderByWithRelationInput | CityOrderByWithRelationInput[] + cursor?: CityWhereUniqueInput + take?: number + skip?: number + distinct?: CityScalarFieldEnum | CityScalarFieldEnum[] + } + /** * City.customers */ @@ -5839,6 +6800,26 @@ export namespace Prisma { distinct?: PreOrderScalarFieldEnum | PreOrderScalarFieldEnum[] } + /** + * City.salesExpertProfiles + */ + export type City$salesExpertProfilesArgs = { + /** + * Select specific fields to fetch from the SalesExpertProfile + */ + select?: SalesExpertProfileSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SalesExpertProfileInclude | null + where?: SalesExpertProfileWhereInput + orderBy?: SalesExpertProfileOrderByWithRelationInput | SalesExpertProfileOrderByWithRelationInput[] + cursor?: SalesExpertProfileWhereUniqueInput + take?: number + skip?: number + distinct?: SalesExpertProfileScalarFieldEnum | SalesExpertProfileScalarFieldEnum[] + } + /** * City without action */ @@ -5879,6 +6860,8 @@ export namespace Prisma { export type AdminUserMinAggregateOutputType = { id: string | null fullName: string | null + firstName: string | null + lastName: string | null mobile: string | null passwordHash: string | null role: $Enums.AdminRole | null @@ -5887,11 +6870,18 @@ export namespace Prisma { wagePercent: Decimal | null isActive: boolean | null createdAt: Date | null + avatarFileId: string | null + address: string | null + storeName: string | null + pasazhName: string | null + memberCode: string | null } export type AdminUserMaxAggregateOutputType = { id: string | null fullName: string | null + firstName: string | null + lastName: string | null mobile: string | null passwordHash: string | null role: $Enums.AdminRole | null @@ -5900,11 +6890,18 @@ export namespace Prisma { wagePercent: Decimal | null isActive: boolean | null createdAt: Date | null + avatarFileId: string | null + address: string | null + storeName: string | null + pasazhName: string | null + memberCode: string | null } export type AdminUserCountAggregateOutputType = { id: number fullName: number + firstName: number + lastName: number mobile: number passwordHash: number role: number @@ -5913,6 +6910,11 @@ export namespace Prisma { wagePercent: number isActive: number createdAt: number + avatarFileId: number + address: number + storeName: number + pasazhName: number + memberCode: number _all: number } @@ -5930,6 +6932,8 @@ export namespace Prisma { export type AdminUserMinAggregateInputType = { id?: true fullName?: true + firstName?: true + lastName?: true mobile?: true passwordHash?: true role?: true @@ -5938,11 +6942,18 @@ export namespace Prisma { wagePercent?: true isActive?: true createdAt?: true + avatarFileId?: true + address?: true + storeName?: true + pasazhName?: true + memberCode?: true } export type AdminUserMaxAggregateInputType = { id?: true fullName?: true + firstName?: true + lastName?: true mobile?: true passwordHash?: true role?: true @@ -5951,11 +6962,18 @@ export namespace Prisma { wagePercent?: true isActive?: true createdAt?: true + avatarFileId?: true + address?: true + storeName?: true + pasazhName?: true + memberCode?: true } export type AdminUserCountAggregateInputType = { id?: true fullName?: true + firstName?: true + lastName?: true mobile?: true passwordHash?: true role?: true @@ -5964,6 +6982,11 @@ export namespace Prisma { wagePercent?: true isActive?: true createdAt?: true + avatarFileId?: true + address?: true + storeName?: true + pasazhName?: true + memberCode?: true _all?: true } @@ -6056,6 +7079,8 @@ export namespace Prisma { export type AdminUserGroupByOutputType = { id: string fullName: string + firstName: string | null + lastName: string | null mobile: string passwordHash: string role: $Enums.AdminRole @@ -6064,6 +7089,11 @@ export namespace Prisma { wagePercent: Decimal | null isActive: boolean createdAt: Date + avatarFileId: string | null + address: string | null + storeName: string | null + pasazhName: string | null + memberCode: string | null _count: AdminUserCountAggregateOutputType | null _avg: AdminUserAvgAggregateOutputType | null _sum: AdminUserSumAggregateOutputType | null @@ -6088,6 +7118,8 @@ export namespace Prisma { export type AdminUserSelect = $Extensions.GetSelect<{ id?: boolean fullName?: boolean + firstName?: boolean + lastName?: boolean mobile?: boolean passwordHash?: boolean role?: boolean @@ -6096,9 +7128,16 @@ export namespace Prisma { wagePercent?: boolean isActive?: boolean createdAt?: boolean + avatarFileId?: boolean + address?: boolean + storeName?: boolean + pasazhName?: boolean + memberCode?: boolean userType?: boolean | AdminUser$userTypeArgs branch?: boolean | AdminUser$branchArgs + avatarFile?: boolean | AdminUser$avatarFileArgs referredCustomers?: boolean | AdminUser$referredCustomersArgs + creditedOrders?: boolean | AdminUser$creditedOrdersArgs supervisedWorkshops?: boolean | AdminUser$supervisedWorkshopsArgs branchAllocations?: boolean | AdminUser$branchAllocationsArgs postedLedgerEntries?: boolean | AdminUser$postedLedgerEntriesArgs @@ -6107,12 +7146,16 @@ export namespace Prisma { sentSmsMessages?: boolean | AdminUser$sentSmsMessagesArgs sentNotifications?: boolean | AdminUser$sentNotificationsArgs uploadedFiles?: boolean | AdminUser$uploadedFilesArgs + salesExpertProfile?: boolean | AdminUser$salesExpertProfileArgs + sessions?: boolean | AdminUser$sessionsArgs _count?: boolean | AdminUserCountOutputTypeDefaultArgs }, ExtArgs["result"]["adminUser"]> export type AdminUserSelectCreateManyAndReturn = $Extensions.GetSelect<{ id?: boolean fullName?: boolean + firstName?: boolean + lastName?: boolean mobile?: boolean passwordHash?: boolean role?: boolean @@ -6121,13 +7164,21 @@ export namespace Prisma { wagePercent?: boolean isActive?: boolean createdAt?: boolean + avatarFileId?: boolean + address?: boolean + storeName?: boolean + pasazhName?: boolean + memberCode?: boolean userType?: boolean | AdminUser$userTypeArgs branch?: boolean | AdminUser$branchArgs + avatarFile?: boolean | AdminUser$avatarFileArgs }, ExtArgs["result"]["adminUser"]> export type AdminUserSelectScalar = { id?: boolean fullName?: boolean + firstName?: boolean + lastName?: boolean mobile?: boolean passwordHash?: boolean role?: boolean @@ -6136,12 +7187,19 @@ export namespace Prisma { wagePercent?: boolean isActive?: boolean createdAt?: boolean + avatarFileId?: boolean + address?: boolean + storeName?: boolean + pasazhName?: boolean + memberCode?: boolean } export type AdminUserInclude = { userType?: boolean | AdminUser$userTypeArgs branch?: boolean | AdminUser$branchArgs + avatarFile?: boolean | AdminUser$avatarFileArgs referredCustomers?: boolean | AdminUser$referredCustomersArgs + creditedOrders?: boolean | AdminUser$creditedOrdersArgs supervisedWorkshops?: boolean | AdminUser$supervisedWorkshopsArgs branchAllocations?: boolean | AdminUser$branchAllocationsArgs postedLedgerEntries?: boolean | AdminUser$postedLedgerEntriesArgs @@ -6150,11 +7208,14 @@ export namespace Prisma { sentSmsMessages?: boolean | AdminUser$sentSmsMessagesArgs sentNotifications?: boolean | AdminUser$sentNotificationsArgs uploadedFiles?: boolean | AdminUser$uploadedFilesArgs + salesExpertProfile?: boolean | AdminUser$salesExpertProfileArgs + sessions?: boolean | AdminUser$sessionsArgs _count?: boolean | AdminUserCountOutputTypeDefaultArgs } export type AdminUserIncludeCreateManyAndReturn = { userType?: boolean | AdminUser$userTypeArgs branch?: boolean | AdminUser$branchArgs + avatarFile?: boolean | AdminUser$avatarFileArgs } export type $AdminUserPayload = { @@ -6162,7 +7223,12 @@ export namespace Prisma { objects: { userType: Prisma.$UserTypePayload | null branch: Prisma.$BranchPayload | null + avatarFile: Prisma.$UploadedFilePayload | null referredCustomers: Prisma.$CustomerPayload[] + /** + * Orders credited to this sales expert — see Order.salesAgentId. + */ + creditedOrders: Prisma.$OrderPayload[] supervisedWorkshops: Prisma.$WorkshopPayload[] branchAllocations: Prisma.$BranchAllocationPayload[] postedLedgerEntries: Prisma.$LedgerEntryPayload[] @@ -6171,10 +7237,36 @@ export namespace Prisma { sentSmsMessages: Prisma.$SmsMessagePayload[] sentNotifications: Prisma.$NotificationPayload[] uploadedFiles: Prisma.$UploadedFilePayload[] + /** + * Only ever set for role = SALES_EXPERT (D17). + */ + salesExpertProfile: Prisma.$SalesExpertProfilePayload | null + /** + * Issued admin-panel tokens, recorded only while session tracking is on + * (AUTH_SESSION_TRACKING, or implicitly whenever the IAM is enabled) so a + * token can be revoked before it expires. See AdminSession. + */ + sessions: Prisma.$AdminSessionPayload[] } scalars: $Extensions.GetPayloadResult<{ id: string + /** + * ⚠️ Kept in sync BY A DATABASE TRIGGER — `admin_user_sync_full_name`, from + * migration 20260922180000. Prisma cannot see it, so a write here may store + * something other than what you passed: + * + * * write the parts -> fullName is rebuilt as "first last" + * * write fullName only -> the parts are re-derived from it + * * write BOTH in one update -> THE PARTS WIN; the submitted fullName is + * discarded + * + * Re-read after writing if you need the stored value. Same arrangement as + * Customer (D0 requirement 7 — the split applies to ALL admins, not only + * sales experts). + */ fullName: string + firstName: string | null + lastName: string | null mobile: string passwordHash: string role: $Enums.AdminRole @@ -6188,6 +7280,18 @@ export namespace Prisma { wagePercent: Prisma.Decimal | null isActive: boolean createdAt: Date + /** + * Legacy stored a sales agent as a `customers` row with type=1, so + * ReagentCustomer.vue's shared form collected these alongside the + * wholesale-customer fields. A sales agent is now an AdminUser + * (role=SALES_EXPERT), so these live here instead — only ever set for that + * role; every other AdminUser leaves them null. + */ + avatarFileId: string | null + address: string | null + storeName: string | null + pasazhName: string | null + memberCode: string | null }, ExtArgs["result"]["adminUser"]> composites: {} } @@ -6554,7 +7658,9 @@ export namespace Prisma { readonly [Symbol.toStringTag]: "PrismaPromise" userType = {}>(args?: Subset>): Prisma__UserTypeClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> branch = {}>(args?: Subset>): Prisma__BranchClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> + avatarFile = {}>(args?: Subset>): Prisma__UploadedFileClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> referredCustomers = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + creditedOrders = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> supervisedWorkshops = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> branchAllocations = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> postedLedgerEntries = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> @@ -6563,6 +7669,8 @@ export namespace Prisma { sentSmsMessages = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> sentNotifications = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> uploadedFiles = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + salesExpertProfile = {}>(args?: Subset>): Prisma__SalesExpertProfileClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> + sessions = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. @@ -6594,6 +7702,8 @@ export namespace Prisma { interface AdminUserFieldRefs { readonly id: FieldRef<"AdminUser", 'String'> readonly fullName: FieldRef<"AdminUser", 'String'> + readonly firstName: FieldRef<"AdminUser", 'String'> + readonly lastName: FieldRef<"AdminUser", 'String'> readonly mobile: FieldRef<"AdminUser", 'String'> readonly passwordHash: FieldRef<"AdminUser", 'String'> readonly role: FieldRef<"AdminUser", 'AdminRole'> @@ -6602,6 +7712,11 @@ export namespace Prisma { readonly wagePercent: FieldRef<"AdminUser", 'Decimal'> readonly isActive: FieldRef<"AdminUser", 'Boolean'> readonly createdAt: FieldRef<"AdminUser", 'DateTime'> + readonly avatarFileId: FieldRef<"AdminUser", 'String'> + readonly address: FieldRef<"AdminUser", 'String'> + readonly storeName: FieldRef<"AdminUser", 'String'> + readonly pasazhName: FieldRef<"AdminUser", 'String'> + readonly memberCode: FieldRef<"AdminUser", 'String'> } @@ -6949,6 +8064,21 @@ export namespace Prisma { where?: BranchWhereInput } + /** + * AdminUser.avatarFile + */ + export type AdminUser$avatarFileArgs = { + /** + * Select specific fields to fetch from the UploadedFile + */ + select?: UploadedFileSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: UploadedFileInclude | null + where?: UploadedFileWhereInput + } + /** * AdminUser.referredCustomers */ @@ -6969,6 +8099,26 @@ export namespace Prisma { distinct?: CustomerScalarFieldEnum | CustomerScalarFieldEnum[] } + /** + * AdminUser.creditedOrders + */ + export type AdminUser$creditedOrdersArgs = { + /** + * Select specific fields to fetch from the Order + */ + select?: OrderSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderInclude | null + where?: OrderWhereInput + orderBy?: OrderOrderByWithRelationInput | OrderOrderByWithRelationInput[] + cursor?: OrderWhereUniqueInput + take?: number + skip?: number + distinct?: OrderScalarFieldEnum | OrderScalarFieldEnum[] + } + /** * AdminUser.supervisedWorkshops */ @@ -7129,6 +8279,41 @@ export namespace Prisma { distinct?: UploadedFileScalarFieldEnum | UploadedFileScalarFieldEnum[] } + /** + * AdminUser.salesExpertProfile + */ + export type AdminUser$salesExpertProfileArgs = { + /** + * Select specific fields to fetch from the SalesExpertProfile + */ + select?: SalesExpertProfileSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SalesExpertProfileInclude | null + where?: SalesExpertProfileWhereInput + } + + /** + * AdminUser.sessions + */ + export type AdminUser$sessionsArgs = { + /** + * Select specific fields to fetch from the AdminSession + */ + select?: AdminSessionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminSessionInclude | null + where?: AdminSessionWhereInput + orderBy?: AdminSessionOrderByWithRelationInput | AdminSessionOrderByWithRelationInput[] + cursor?: AdminSessionWhereUniqueInput + take?: number + skip?: number + distinct?: AdminSessionScalarFieldEnum | AdminSessionScalarFieldEnum[] + } + /** * AdminUser without action */ @@ -7144,6 +8329,3116 @@ export namespace Prisma { } + /** + * Model AppSession + */ + + export type AggregateAppSession = { + _count: AppSessionCountAggregateOutputType | null + _min: AppSessionMinAggregateOutputType | null + _max: AppSessionMaxAggregateOutputType | null + } + + export type AppSessionMinAggregateOutputType = { + id: string | null + jti: string | null + subjectId: string | null + subjectType: string | null + mobile: string | null + iamSessionId: string | null + iamSub: string | null + ipAddress: string | null + userAgent: string | null + createdAt: Date | null + expiresAt: Date | null + lastSeenAt: Date | null + revokedAt: Date | null + revokedReason: string | null + } + + export type AppSessionMaxAggregateOutputType = { + id: string | null + jti: string | null + subjectId: string | null + subjectType: string | null + mobile: string | null + iamSessionId: string | null + iamSub: string | null + ipAddress: string | null + userAgent: string | null + createdAt: Date | null + expiresAt: Date | null + lastSeenAt: Date | null + revokedAt: Date | null + revokedReason: string | null + } + + export type AppSessionCountAggregateOutputType = { + id: number + jti: number + subjectId: number + subjectType: number + mobile: number + iamSessionId: number + iamSub: number + ipAddress: number + userAgent: number + createdAt: number + expiresAt: number + lastSeenAt: number + revokedAt: number + revokedReason: number + _all: number + } + + + export type AppSessionMinAggregateInputType = { + id?: true + jti?: true + subjectId?: true + subjectType?: true + mobile?: true + iamSessionId?: true + iamSub?: true + ipAddress?: true + userAgent?: true + createdAt?: true + expiresAt?: true + lastSeenAt?: true + revokedAt?: true + revokedReason?: true + } + + export type AppSessionMaxAggregateInputType = { + id?: true + jti?: true + subjectId?: true + subjectType?: true + mobile?: true + iamSessionId?: true + iamSub?: true + ipAddress?: true + userAgent?: true + createdAt?: true + expiresAt?: true + lastSeenAt?: true + revokedAt?: true + revokedReason?: true + } + + export type AppSessionCountAggregateInputType = { + id?: true + jti?: true + subjectId?: true + subjectType?: true + mobile?: true + iamSessionId?: true + iamSub?: true + ipAddress?: true + userAgent?: true + createdAt?: true + expiresAt?: true + lastSeenAt?: true + revokedAt?: true + revokedReason?: true + _all?: true + } + + export type AppSessionAggregateArgs = { + /** + * Filter which AppSession to aggregate. + */ + where?: AppSessionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AppSessions to fetch. + */ + orderBy?: AppSessionOrderByWithRelationInput | AppSessionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: AppSessionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AppSessions from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` AppSessions. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned AppSessions + **/ + _count?: true | AppSessionCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: AppSessionMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: AppSessionMaxAggregateInputType + } + + export type GetAppSessionAggregateType = { + [P in keyof T & keyof AggregateAppSession]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type AppSessionGroupByArgs = { + where?: AppSessionWhereInput + orderBy?: AppSessionOrderByWithAggregationInput | AppSessionOrderByWithAggregationInput[] + by: AppSessionScalarFieldEnum[] | AppSessionScalarFieldEnum + having?: AppSessionScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: AppSessionCountAggregateInputType | true + _min?: AppSessionMinAggregateInputType + _max?: AppSessionMaxAggregateInputType + } + + export type AppSessionGroupByOutputType = { + id: string + jti: string + subjectId: string + subjectType: string + mobile: string | null + iamSessionId: string | null + iamSub: string | null + ipAddress: string | null + userAgent: string | null + createdAt: Date + expiresAt: Date | null + lastSeenAt: Date | null + revokedAt: Date | null + revokedReason: string | null + _count: AppSessionCountAggregateOutputType | null + _min: AppSessionMinAggregateOutputType | null + _max: AppSessionMaxAggregateOutputType | null + } + + type GetAppSessionGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof AppSessionGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type AppSessionSelect = $Extensions.GetSelect<{ + id?: boolean + jti?: boolean + subjectId?: boolean + subjectType?: boolean + mobile?: boolean + iamSessionId?: boolean + iamSub?: boolean + ipAddress?: boolean + userAgent?: boolean + createdAt?: boolean + expiresAt?: boolean + lastSeenAt?: boolean + revokedAt?: boolean + revokedReason?: boolean + }, ExtArgs["result"]["appSession"]> + + export type AppSessionSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + jti?: boolean + subjectId?: boolean + subjectType?: boolean + mobile?: boolean + iamSessionId?: boolean + iamSub?: boolean + ipAddress?: boolean + userAgent?: boolean + createdAt?: boolean + expiresAt?: boolean + lastSeenAt?: boolean + revokedAt?: boolean + revokedReason?: boolean + }, ExtArgs["result"]["appSession"]> + + export type AppSessionSelectScalar = { + id?: boolean + jti?: boolean + subjectId?: boolean + subjectType?: boolean + mobile?: boolean + iamSessionId?: boolean + iamSub?: boolean + ipAddress?: boolean + userAgent?: boolean + createdAt?: boolean + expiresAt?: boolean + lastSeenAt?: boolean + revokedAt?: boolean + revokedReason?: boolean + } + + + export type $AppSessionPayload = { + name: "AppSession" + objects: {} + scalars: $Extensions.GetPayloadResult<{ + id: string + /** + * The token's `jti` claim. Unique: one row per issued token. + */ + jti: string + /** + * Customer.id, or AdminUser.id when subjectType is "sales-expert". + */ + subjectId: string + subjectType: string + mobile: string | null + /** + * Set when the login was confirmed by the central IAM: its session id (`sid`) + * and stable user id (`sub`), which is what a back-channel logout arrives with. + */ + iamSessionId: string | null + iamSub: string | null + ipAddress: string | null + userAgent: string | null + createdAt: Date + expiresAt: Date | null + lastSeenAt: Date | null + revokedAt: Date | null + revokedReason: string | null + }, ExtArgs["result"]["appSession"]> + composites: {} + } + + type AppSessionGetPayload = $Result.GetResult + + type AppSessionCountArgs = + Omit & { + select?: AppSessionCountAggregateInputType | true + } + + export interface AppSessionDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['AppSession'], meta: { name: 'AppSession' } } + /** + * Find zero or one AppSession that matches the filter. + * @param {AppSessionFindUniqueArgs} args - Arguments to find a AppSession + * @example + * // Get one AppSession + * const appSession = await prisma.appSession.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__AppSessionClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one AppSession that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {AppSessionFindUniqueOrThrowArgs} args - Arguments to find a AppSession + * @example + * // Get one AppSession + * const appSession = await prisma.appSession.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__AppSessionClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first AppSession that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AppSessionFindFirstArgs} args - Arguments to find a AppSession + * @example + * // Get one AppSession + * const appSession = await prisma.appSession.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__AppSessionClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first AppSession that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AppSessionFindFirstOrThrowArgs} args - Arguments to find a AppSession + * @example + * // Get one AppSession + * const appSession = await prisma.appSession.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__AppSessionClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more AppSessions that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AppSessionFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all AppSessions + * const appSessions = await prisma.appSession.findMany() + * + * // Get first 10 AppSessions + * const appSessions = await prisma.appSession.findMany({ take: 10 }) + * + * // Only select the `id` + * const appSessionWithIdOnly = await prisma.appSession.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a AppSession. + * @param {AppSessionCreateArgs} args - Arguments to create a AppSession. + * @example + * // Create one AppSession + * const AppSession = await prisma.appSession.create({ + * data: { + * // ... data to create a AppSession + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__AppSessionClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many AppSessions. + * @param {AppSessionCreateManyArgs} args - Arguments to create many AppSessions. + * @example + * // Create many AppSessions + * const appSession = await prisma.appSession.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many AppSessions and returns the data saved in the database. + * @param {AppSessionCreateManyAndReturnArgs} args - Arguments to create many AppSessions. + * @example + * // Create many AppSessions + * const appSession = await prisma.appSession.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many AppSessions and only return the `id` + * const appSessionWithIdOnly = await prisma.appSession.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> + + /** + * Delete a AppSession. + * @param {AppSessionDeleteArgs} args - Arguments to delete one AppSession. + * @example + * // Delete one AppSession + * const AppSession = await prisma.appSession.delete({ + * where: { + * // ... filter to delete one AppSession + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__AppSessionClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one AppSession. + * @param {AppSessionUpdateArgs} args - Arguments to update one AppSession. + * @example + * // Update one AppSession + * const appSession = await prisma.appSession.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__AppSessionClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more AppSessions. + * @param {AppSessionDeleteManyArgs} args - Arguments to filter AppSessions to delete. + * @example + * // Delete a few AppSessions + * const { count } = await prisma.appSession.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more AppSessions. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AppSessionUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many AppSessions + * const appSession = await prisma.appSession.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one AppSession. + * @param {AppSessionUpsertArgs} args - Arguments to update or create a AppSession. + * @example + * // Update or create a AppSession + * const appSession = await prisma.appSession.upsert({ + * create: { + * // ... data to create a AppSession + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the AppSession we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__AppSessionClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of AppSessions. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AppSessionCountArgs} args - Arguments to filter AppSessions to count. + * @example + * // Count the number of AppSessions + * const count = await prisma.appSession.count({ + * where: { + * // ... the filter for the AppSessions we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a AppSession. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AppSessionAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by AppSession. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AppSessionGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends AppSessionGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: AppSessionGroupByArgs['orderBy'] } + : { orderBy?: AppSessionGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetAppSessionGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the AppSession model + */ + readonly fields: AppSessionFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for AppSession. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__AppSessionClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the AppSession model + */ + interface AppSessionFieldRefs { + readonly id: FieldRef<"AppSession", 'String'> + readonly jti: FieldRef<"AppSession", 'String'> + readonly subjectId: FieldRef<"AppSession", 'String'> + readonly subjectType: FieldRef<"AppSession", 'String'> + readonly mobile: FieldRef<"AppSession", 'String'> + readonly iamSessionId: FieldRef<"AppSession", 'String'> + readonly iamSub: FieldRef<"AppSession", 'String'> + readonly ipAddress: FieldRef<"AppSession", 'String'> + readonly userAgent: FieldRef<"AppSession", 'String'> + readonly createdAt: FieldRef<"AppSession", 'DateTime'> + readonly expiresAt: FieldRef<"AppSession", 'DateTime'> + readonly lastSeenAt: FieldRef<"AppSession", 'DateTime'> + readonly revokedAt: FieldRef<"AppSession", 'DateTime'> + readonly revokedReason: FieldRef<"AppSession", 'String'> + } + + + // Custom InputTypes + /** + * AppSession findUnique + */ + export type AppSessionFindUniqueArgs = { + /** + * Select specific fields to fetch from the AppSession + */ + select?: AppSessionSelect | null + /** + * Filter, which AppSession to fetch. + */ + where: AppSessionWhereUniqueInput + } + + /** + * AppSession findUniqueOrThrow + */ + export type AppSessionFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the AppSession + */ + select?: AppSessionSelect | null + /** + * Filter, which AppSession to fetch. + */ + where: AppSessionWhereUniqueInput + } + + /** + * AppSession findFirst + */ + export type AppSessionFindFirstArgs = { + /** + * Select specific fields to fetch from the AppSession + */ + select?: AppSessionSelect | null + /** + * Filter, which AppSession to fetch. + */ + where?: AppSessionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AppSessions to fetch. + */ + orderBy?: AppSessionOrderByWithRelationInput | AppSessionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for AppSessions. + */ + cursor?: AppSessionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AppSessions from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` AppSessions. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of AppSessions. + */ + distinct?: AppSessionScalarFieldEnum | AppSessionScalarFieldEnum[] + } + + /** + * AppSession findFirstOrThrow + */ + export type AppSessionFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the AppSession + */ + select?: AppSessionSelect | null + /** + * Filter, which AppSession to fetch. + */ + where?: AppSessionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AppSessions to fetch. + */ + orderBy?: AppSessionOrderByWithRelationInput | AppSessionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for AppSessions. + */ + cursor?: AppSessionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AppSessions from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` AppSessions. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of AppSessions. + */ + distinct?: AppSessionScalarFieldEnum | AppSessionScalarFieldEnum[] + } + + /** + * AppSession findMany + */ + export type AppSessionFindManyArgs = { + /** + * Select specific fields to fetch from the AppSession + */ + select?: AppSessionSelect | null + /** + * Filter, which AppSessions to fetch. + */ + where?: AppSessionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AppSessions to fetch. + */ + orderBy?: AppSessionOrderByWithRelationInput | AppSessionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing AppSessions. + */ + cursor?: AppSessionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AppSessions from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` AppSessions. + */ + skip?: number + distinct?: AppSessionScalarFieldEnum | AppSessionScalarFieldEnum[] + } + + /** + * AppSession create + */ + export type AppSessionCreateArgs = { + /** + * Select specific fields to fetch from the AppSession + */ + select?: AppSessionSelect | null + /** + * The data needed to create a AppSession. + */ + data: XOR + } + + /** + * AppSession createMany + */ + export type AppSessionCreateManyArgs = { + /** + * The data used to create many AppSessions. + */ + data: AppSessionCreateManyInput | AppSessionCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * AppSession createManyAndReturn + */ + export type AppSessionCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the AppSession + */ + select?: AppSessionSelectCreateManyAndReturn | null + /** + * The data used to create many AppSessions. + */ + data: AppSessionCreateManyInput | AppSessionCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * AppSession update + */ + export type AppSessionUpdateArgs = { + /** + * Select specific fields to fetch from the AppSession + */ + select?: AppSessionSelect | null + /** + * The data needed to update a AppSession. + */ + data: XOR + /** + * Choose, which AppSession to update. + */ + where: AppSessionWhereUniqueInput + } + + /** + * AppSession updateMany + */ + export type AppSessionUpdateManyArgs = { + /** + * The data used to update AppSessions. + */ + data: XOR + /** + * Filter which AppSessions to update + */ + where?: AppSessionWhereInput + } + + /** + * AppSession upsert + */ + export type AppSessionUpsertArgs = { + /** + * Select specific fields to fetch from the AppSession + */ + select?: AppSessionSelect | null + /** + * The filter to search for the AppSession to update in case it exists. + */ + where: AppSessionWhereUniqueInput + /** + * In case the AppSession found by the `where` argument doesn't exist, create a new AppSession with this data. + */ + create: XOR + /** + * In case the AppSession was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * AppSession delete + */ + export type AppSessionDeleteArgs = { + /** + * Select specific fields to fetch from the AppSession + */ + select?: AppSessionSelect | null + /** + * Filter which AppSession to delete. + */ + where: AppSessionWhereUniqueInput + } + + /** + * AppSession deleteMany + */ + export type AppSessionDeleteManyArgs = { + /** + * Filter which AppSessions to delete + */ + where?: AppSessionWhereInput + } + + /** + * AppSession without action + */ + export type AppSessionDefaultArgs = { + /** + * Select specific fields to fetch from the AppSession + */ + select?: AppSessionSelect | null + } + + + /** + * Model AdminSession + */ + + export type AggregateAdminSession = { + _count: AdminSessionCountAggregateOutputType | null + _min: AdminSessionMinAggregateOutputType | null + _max: AdminSessionMaxAggregateOutputType | null + } + + export type AdminSessionMinAggregateOutputType = { + id: string | null + jti: string | null + adminUserId: string | null + iamSessionId: string | null + iamSub: string | null + ipAddress: string | null + userAgent: string | null + createdAt: Date | null + expiresAt: Date | null + lastSeenAt: Date | null + revokedAt: Date | null + revokedReason: string | null + } + + export type AdminSessionMaxAggregateOutputType = { + id: string | null + jti: string | null + adminUserId: string | null + iamSessionId: string | null + iamSub: string | null + ipAddress: string | null + userAgent: string | null + createdAt: Date | null + expiresAt: Date | null + lastSeenAt: Date | null + revokedAt: Date | null + revokedReason: string | null + } + + export type AdminSessionCountAggregateOutputType = { + id: number + jti: number + adminUserId: number + iamSessionId: number + iamSub: number + ipAddress: number + userAgent: number + createdAt: number + expiresAt: number + lastSeenAt: number + revokedAt: number + revokedReason: number + _all: number + } + + + export type AdminSessionMinAggregateInputType = { + id?: true + jti?: true + adminUserId?: true + iamSessionId?: true + iamSub?: true + ipAddress?: true + userAgent?: true + createdAt?: true + expiresAt?: true + lastSeenAt?: true + revokedAt?: true + revokedReason?: true + } + + export type AdminSessionMaxAggregateInputType = { + id?: true + jti?: true + adminUserId?: true + iamSessionId?: true + iamSub?: true + ipAddress?: true + userAgent?: true + createdAt?: true + expiresAt?: true + lastSeenAt?: true + revokedAt?: true + revokedReason?: true + } + + export type AdminSessionCountAggregateInputType = { + id?: true + jti?: true + adminUserId?: true + iamSessionId?: true + iamSub?: true + ipAddress?: true + userAgent?: true + createdAt?: true + expiresAt?: true + lastSeenAt?: true + revokedAt?: true + revokedReason?: true + _all?: true + } + + export type AdminSessionAggregateArgs = { + /** + * Filter which AdminSession to aggregate. + */ + where?: AdminSessionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AdminSessions to fetch. + */ + orderBy?: AdminSessionOrderByWithRelationInput | AdminSessionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: AdminSessionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AdminSessions from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` AdminSessions. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned AdminSessions + **/ + _count?: true | AdminSessionCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: AdminSessionMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: AdminSessionMaxAggregateInputType + } + + export type GetAdminSessionAggregateType = { + [P in keyof T & keyof AggregateAdminSession]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type AdminSessionGroupByArgs = { + where?: AdminSessionWhereInput + orderBy?: AdminSessionOrderByWithAggregationInput | AdminSessionOrderByWithAggregationInput[] + by: AdminSessionScalarFieldEnum[] | AdminSessionScalarFieldEnum + having?: AdminSessionScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: AdminSessionCountAggregateInputType | true + _min?: AdminSessionMinAggregateInputType + _max?: AdminSessionMaxAggregateInputType + } + + export type AdminSessionGroupByOutputType = { + id: string + jti: string + adminUserId: string + iamSessionId: string | null + iamSub: string | null + ipAddress: string | null + userAgent: string | null + createdAt: Date + expiresAt: Date | null + lastSeenAt: Date | null + revokedAt: Date | null + revokedReason: string | null + _count: AdminSessionCountAggregateOutputType | null + _min: AdminSessionMinAggregateOutputType | null + _max: AdminSessionMaxAggregateOutputType | null + } + + type GetAdminSessionGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof AdminSessionGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type AdminSessionSelect = $Extensions.GetSelect<{ + id?: boolean + jti?: boolean + adminUserId?: boolean + iamSessionId?: boolean + iamSub?: boolean + ipAddress?: boolean + userAgent?: boolean + createdAt?: boolean + expiresAt?: boolean + lastSeenAt?: boolean + revokedAt?: boolean + revokedReason?: boolean + adminUser?: boolean | AdminUserDefaultArgs + }, ExtArgs["result"]["adminSession"]> + + export type AdminSessionSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + jti?: boolean + adminUserId?: boolean + iamSessionId?: boolean + iamSub?: boolean + ipAddress?: boolean + userAgent?: boolean + createdAt?: boolean + expiresAt?: boolean + lastSeenAt?: boolean + revokedAt?: boolean + revokedReason?: boolean + adminUser?: boolean | AdminUserDefaultArgs + }, ExtArgs["result"]["adminSession"]> + + export type AdminSessionSelectScalar = { + id?: boolean + jti?: boolean + adminUserId?: boolean + iamSessionId?: boolean + iamSub?: boolean + ipAddress?: boolean + userAgent?: boolean + createdAt?: boolean + expiresAt?: boolean + lastSeenAt?: boolean + revokedAt?: boolean + revokedReason?: boolean + } + + export type AdminSessionInclude = { + adminUser?: boolean | AdminUserDefaultArgs + } + export type AdminSessionIncludeCreateManyAndReturn = { + adminUser?: boolean | AdminUserDefaultArgs + } + + export type $AdminSessionPayload = { + name: "AdminSession" + objects: { + adminUser: Prisma.$AdminUserPayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + /** + * The token's `jti` claim. Unique: one row per issued token. + */ + jti: string + adminUserId: string + /** + * Set when the login was verified by the IAM: its session id (`sid`) and the + * stable user id (`sub`) there. Back-channel logout arrives keyed by these — + * deliberately here rather than as columns on AdminUser, so enabling the + * feature needs no change to an existing table. + */ + iamSessionId: string | null + iamSub: string | null + ipAddress: string | null + userAgent: string | null + createdAt: Date + expiresAt: Date | null + lastSeenAt: Date | null + revokedAt: Date | null + revokedReason: string | null + }, ExtArgs["result"]["adminSession"]> + composites: {} + } + + type AdminSessionGetPayload = $Result.GetResult + + type AdminSessionCountArgs = + Omit & { + select?: AdminSessionCountAggregateInputType | true + } + + export interface AdminSessionDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['AdminSession'], meta: { name: 'AdminSession' } } + /** + * Find zero or one AdminSession that matches the filter. + * @param {AdminSessionFindUniqueArgs} args - Arguments to find a AdminSession + * @example + * // Get one AdminSession + * const adminSession = await prisma.adminSession.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__AdminSessionClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one AdminSession that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {AdminSessionFindUniqueOrThrowArgs} args - Arguments to find a AdminSession + * @example + * // Get one AdminSession + * const adminSession = await prisma.adminSession.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__AdminSessionClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first AdminSession that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AdminSessionFindFirstArgs} args - Arguments to find a AdminSession + * @example + * // Get one AdminSession + * const adminSession = await prisma.adminSession.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__AdminSessionClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first AdminSession that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AdminSessionFindFirstOrThrowArgs} args - Arguments to find a AdminSession + * @example + * // Get one AdminSession + * const adminSession = await prisma.adminSession.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__AdminSessionClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more AdminSessions that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AdminSessionFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all AdminSessions + * const adminSessions = await prisma.adminSession.findMany() + * + * // Get first 10 AdminSessions + * const adminSessions = await prisma.adminSession.findMany({ take: 10 }) + * + * // Only select the `id` + * const adminSessionWithIdOnly = await prisma.adminSession.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a AdminSession. + * @param {AdminSessionCreateArgs} args - Arguments to create a AdminSession. + * @example + * // Create one AdminSession + * const AdminSession = await prisma.adminSession.create({ + * data: { + * // ... data to create a AdminSession + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__AdminSessionClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many AdminSessions. + * @param {AdminSessionCreateManyArgs} args - Arguments to create many AdminSessions. + * @example + * // Create many AdminSessions + * const adminSession = await prisma.adminSession.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many AdminSessions and returns the data saved in the database. + * @param {AdminSessionCreateManyAndReturnArgs} args - Arguments to create many AdminSessions. + * @example + * // Create many AdminSessions + * const adminSession = await prisma.adminSession.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many AdminSessions and only return the `id` + * const adminSessionWithIdOnly = await prisma.adminSession.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> + + /** + * Delete a AdminSession. + * @param {AdminSessionDeleteArgs} args - Arguments to delete one AdminSession. + * @example + * // Delete one AdminSession + * const AdminSession = await prisma.adminSession.delete({ + * where: { + * // ... filter to delete one AdminSession + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__AdminSessionClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one AdminSession. + * @param {AdminSessionUpdateArgs} args - Arguments to update one AdminSession. + * @example + * // Update one AdminSession + * const adminSession = await prisma.adminSession.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__AdminSessionClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more AdminSessions. + * @param {AdminSessionDeleteManyArgs} args - Arguments to filter AdminSessions to delete. + * @example + * // Delete a few AdminSessions + * const { count } = await prisma.adminSession.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more AdminSessions. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AdminSessionUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many AdminSessions + * const adminSession = await prisma.adminSession.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one AdminSession. + * @param {AdminSessionUpsertArgs} args - Arguments to update or create a AdminSession. + * @example + * // Update or create a AdminSession + * const adminSession = await prisma.adminSession.upsert({ + * create: { + * // ... data to create a AdminSession + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the AdminSession we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__AdminSessionClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of AdminSessions. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AdminSessionCountArgs} args - Arguments to filter AdminSessions to count. + * @example + * // Count the number of AdminSessions + * const count = await prisma.adminSession.count({ + * where: { + * // ... the filter for the AdminSessions we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a AdminSession. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AdminSessionAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by AdminSession. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AdminSessionGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends AdminSessionGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: AdminSessionGroupByArgs['orderBy'] } + : { orderBy?: AdminSessionGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetAdminSessionGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the AdminSession model + */ + readonly fields: AdminSessionFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for AdminSession. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__AdminSessionClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + adminUser = {}>(args?: Subset>): Prisma__AdminUserClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the AdminSession model + */ + interface AdminSessionFieldRefs { + readonly id: FieldRef<"AdminSession", 'String'> + readonly jti: FieldRef<"AdminSession", 'String'> + readonly adminUserId: FieldRef<"AdminSession", 'String'> + readonly iamSessionId: FieldRef<"AdminSession", 'String'> + readonly iamSub: FieldRef<"AdminSession", 'String'> + readonly ipAddress: FieldRef<"AdminSession", 'String'> + readonly userAgent: FieldRef<"AdminSession", 'String'> + readonly createdAt: FieldRef<"AdminSession", 'DateTime'> + readonly expiresAt: FieldRef<"AdminSession", 'DateTime'> + readonly lastSeenAt: FieldRef<"AdminSession", 'DateTime'> + readonly revokedAt: FieldRef<"AdminSession", 'DateTime'> + readonly revokedReason: FieldRef<"AdminSession", 'String'> + } + + + // Custom InputTypes + /** + * AdminSession findUnique + */ + export type AdminSessionFindUniqueArgs = { + /** + * Select specific fields to fetch from the AdminSession + */ + select?: AdminSessionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminSessionInclude | null + /** + * Filter, which AdminSession to fetch. + */ + where: AdminSessionWhereUniqueInput + } + + /** + * AdminSession findUniqueOrThrow + */ + export type AdminSessionFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the AdminSession + */ + select?: AdminSessionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminSessionInclude | null + /** + * Filter, which AdminSession to fetch. + */ + where: AdminSessionWhereUniqueInput + } + + /** + * AdminSession findFirst + */ + export type AdminSessionFindFirstArgs = { + /** + * Select specific fields to fetch from the AdminSession + */ + select?: AdminSessionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminSessionInclude | null + /** + * Filter, which AdminSession to fetch. + */ + where?: AdminSessionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AdminSessions to fetch. + */ + orderBy?: AdminSessionOrderByWithRelationInput | AdminSessionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for AdminSessions. + */ + cursor?: AdminSessionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AdminSessions from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` AdminSessions. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of AdminSessions. + */ + distinct?: AdminSessionScalarFieldEnum | AdminSessionScalarFieldEnum[] + } + + /** + * AdminSession findFirstOrThrow + */ + export type AdminSessionFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the AdminSession + */ + select?: AdminSessionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminSessionInclude | null + /** + * Filter, which AdminSession to fetch. + */ + where?: AdminSessionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AdminSessions to fetch. + */ + orderBy?: AdminSessionOrderByWithRelationInput | AdminSessionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for AdminSessions. + */ + cursor?: AdminSessionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AdminSessions from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` AdminSessions. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of AdminSessions. + */ + distinct?: AdminSessionScalarFieldEnum | AdminSessionScalarFieldEnum[] + } + + /** + * AdminSession findMany + */ + export type AdminSessionFindManyArgs = { + /** + * Select specific fields to fetch from the AdminSession + */ + select?: AdminSessionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminSessionInclude | null + /** + * Filter, which AdminSessions to fetch. + */ + where?: AdminSessionWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AdminSessions to fetch. + */ + orderBy?: AdminSessionOrderByWithRelationInput | AdminSessionOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing AdminSessions. + */ + cursor?: AdminSessionWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AdminSessions from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` AdminSessions. + */ + skip?: number + distinct?: AdminSessionScalarFieldEnum | AdminSessionScalarFieldEnum[] + } + + /** + * AdminSession create + */ + export type AdminSessionCreateArgs = { + /** + * Select specific fields to fetch from the AdminSession + */ + select?: AdminSessionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminSessionInclude | null + /** + * The data needed to create a AdminSession. + */ + data: XOR + } + + /** + * AdminSession createMany + */ + export type AdminSessionCreateManyArgs = { + /** + * The data used to create many AdminSessions. + */ + data: AdminSessionCreateManyInput | AdminSessionCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * AdminSession createManyAndReturn + */ + export type AdminSessionCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the AdminSession + */ + select?: AdminSessionSelectCreateManyAndReturn | null + /** + * The data used to create many AdminSessions. + */ + data: AdminSessionCreateManyInput | AdminSessionCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminSessionIncludeCreateManyAndReturn | null + } + + /** + * AdminSession update + */ + export type AdminSessionUpdateArgs = { + /** + * Select specific fields to fetch from the AdminSession + */ + select?: AdminSessionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminSessionInclude | null + /** + * The data needed to update a AdminSession. + */ + data: XOR + /** + * Choose, which AdminSession to update. + */ + where: AdminSessionWhereUniqueInput + } + + /** + * AdminSession updateMany + */ + export type AdminSessionUpdateManyArgs = { + /** + * The data used to update AdminSessions. + */ + data: XOR + /** + * Filter which AdminSessions to update + */ + where?: AdminSessionWhereInput + } + + /** + * AdminSession upsert + */ + export type AdminSessionUpsertArgs = { + /** + * Select specific fields to fetch from the AdminSession + */ + select?: AdminSessionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminSessionInclude | null + /** + * The filter to search for the AdminSession to update in case it exists. + */ + where: AdminSessionWhereUniqueInput + /** + * In case the AdminSession found by the `where` argument doesn't exist, create a new AdminSession with this data. + */ + create: XOR + /** + * In case the AdminSession was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * AdminSession delete + */ + export type AdminSessionDeleteArgs = { + /** + * Select specific fields to fetch from the AdminSession + */ + select?: AdminSessionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminSessionInclude | null + /** + * Filter which AdminSession to delete. + */ + where: AdminSessionWhereUniqueInput + } + + /** + * AdminSession deleteMany + */ + export type AdminSessionDeleteManyArgs = { + /** + * Filter which AdminSessions to delete + */ + where?: AdminSessionWhereInput + } + + /** + * AdminSession without action + */ + export type AdminSessionDefaultArgs = { + /** + * Select specific fields to fetch from the AdminSession + */ + select?: AdminSessionSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminSessionInclude | null + } + + + /** + * Model SalesExpertProfile + */ + + export type AggregateSalesExpertProfile = { + _count: SalesExpertProfileCountAggregateOutputType | null + _avg: SalesExpertProfileAvgAggregateOutputType | null + _sum: SalesExpertProfileSumAggregateOutputType | null + _min: SalesExpertProfileMinAggregateOutputType | null + _max: SalesExpertProfileMaxAggregateOutputType | null + } + + export type SalesExpertProfileAvgAggregateOutputType = { + gramLevel: Decimal | null + } + + export type SalesExpertProfileSumAggregateOutputType = { + gramLevel: Decimal | null + } + + export type SalesExpertProfileMinAggregateOutputType = { + id: string | null + adminUserId: string | null + cityId: string | null + gramLevel: Decimal | null + phone: string | null + nationalCode: string | null + tradingCustomerId: string | null + createdAt: Date | null + updatedAt: Date | null + } + + export type SalesExpertProfileMaxAggregateOutputType = { + id: string | null + adminUserId: string | null + cityId: string | null + gramLevel: Decimal | null + phone: string | null + nationalCode: string | null + tradingCustomerId: string | null + createdAt: Date | null + updatedAt: Date | null + } + + export type SalesExpertProfileCountAggregateOutputType = { + id: number + adminUserId: number + cityId: number + gramLevel: number + phone: number + nationalCode: number + tradingCustomerId: number + createdAt: number + updatedAt: number + _all: number + } + + + export type SalesExpertProfileAvgAggregateInputType = { + gramLevel?: true + } + + export type SalesExpertProfileSumAggregateInputType = { + gramLevel?: true + } + + export type SalesExpertProfileMinAggregateInputType = { + id?: true + adminUserId?: true + cityId?: true + gramLevel?: true + phone?: true + nationalCode?: true + tradingCustomerId?: true + createdAt?: true + updatedAt?: true + } + + export type SalesExpertProfileMaxAggregateInputType = { + id?: true + adminUserId?: true + cityId?: true + gramLevel?: true + phone?: true + nationalCode?: true + tradingCustomerId?: true + createdAt?: true + updatedAt?: true + } + + export type SalesExpertProfileCountAggregateInputType = { + id?: true + adminUserId?: true + cityId?: true + gramLevel?: true + phone?: true + nationalCode?: true + tradingCustomerId?: true + createdAt?: true + updatedAt?: true + _all?: true + } + + export type SalesExpertProfileAggregateArgs = { + /** + * Filter which SalesExpertProfile to aggregate. + */ + where?: SalesExpertProfileWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of SalesExpertProfiles to fetch. + */ + orderBy?: SalesExpertProfileOrderByWithRelationInput | SalesExpertProfileOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: SalesExpertProfileWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` SalesExpertProfiles from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` SalesExpertProfiles. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned SalesExpertProfiles + **/ + _count?: true | SalesExpertProfileCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: SalesExpertProfileAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: SalesExpertProfileSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: SalesExpertProfileMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: SalesExpertProfileMaxAggregateInputType + } + + export type GetSalesExpertProfileAggregateType = { + [P in keyof T & keyof AggregateSalesExpertProfile]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type SalesExpertProfileGroupByArgs = { + where?: SalesExpertProfileWhereInput + orderBy?: SalesExpertProfileOrderByWithAggregationInput | SalesExpertProfileOrderByWithAggregationInput[] + by: SalesExpertProfileScalarFieldEnum[] | SalesExpertProfileScalarFieldEnum + having?: SalesExpertProfileScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: SalesExpertProfileCountAggregateInputType | true + _avg?: SalesExpertProfileAvgAggregateInputType + _sum?: SalesExpertProfileSumAggregateInputType + _min?: SalesExpertProfileMinAggregateInputType + _max?: SalesExpertProfileMaxAggregateInputType + } + + export type SalesExpertProfileGroupByOutputType = { + id: string + adminUserId: string + cityId: string | null + gramLevel: Decimal + phone: string | null + nationalCode: string | null + tradingCustomerId: string | null + createdAt: Date + updatedAt: Date + _count: SalesExpertProfileCountAggregateOutputType | null + _avg: SalesExpertProfileAvgAggregateOutputType | null + _sum: SalesExpertProfileSumAggregateOutputType | null + _min: SalesExpertProfileMinAggregateOutputType | null + _max: SalesExpertProfileMaxAggregateOutputType | null + } + + type GetSalesExpertProfileGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof SalesExpertProfileGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type SalesExpertProfileSelect = $Extensions.GetSelect<{ + id?: boolean + adminUserId?: boolean + cityId?: boolean + gramLevel?: boolean + phone?: boolean + nationalCode?: boolean + tradingCustomerId?: boolean + createdAt?: boolean + updatedAt?: boolean + adminUser?: boolean | AdminUserDefaultArgs + city?: boolean | SalesExpertProfile$cityArgs + tradingCustomer?: boolean | SalesExpertProfile$tradingCustomerArgs + }, ExtArgs["result"]["salesExpertProfile"]> + + export type SalesExpertProfileSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + adminUserId?: boolean + cityId?: boolean + gramLevel?: boolean + phone?: boolean + nationalCode?: boolean + tradingCustomerId?: boolean + createdAt?: boolean + updatedAt?: boolean + adminUser?: boolean | AdminUserDefaultArgs + city?: boolean | SalesExpertProfile$cityArgs + tradingCustomer?: boolean | SalesExpertProfile$tradingCustomerArgs + }, ExtArgs["result"]["salesExpertProfile"]> + + export type SalesExpertProfileSelectScalar = { + id?: boolean + adminUserId?: boolean + cityId?: boolean + gramLevel?: boolean + phone?: boolean + nationalCode?: boolean + tradingCustomerId?: boolean + createdAt?: boolean + updatedAt?: boolean + } + + export type SalesExpertProfileInclude = { + adminUser?: boolean | AdminUserDefaultArgs + city?: boolean | SalesExpertProfile$cityArgs + tradingCustomer?: boolean | SalesExpertProfile$tradingCustomerArgs + } + export type SalesExpertProfileIncludeCreateManyAndReturn = { + adminUser?: boolean | AdminUserDefaultArgs + city?: boolean | SalesExpertProfile$cityArgs + tradingCustomer?: boolean | SalesExpertProfile$tradingCustomerArgs + } + + export type $SalesExpertProfilePayload = { + name: "SalesExpertProfile" + objects: { + adminUser: Prisma.$AdminUserPayload + city: Prisma.$CityPayload | null + tradingCustomer: Prisma.$CustomerPayload | null + } + scalars: $Extensions.GetPayloadResult<{ + id: string + adminUserId: string + /** + * Legacy customers.city_id — a filterable grid column + * (ReagentListModel.js:14) and the source of the commission autofill + * (ReagentCustomer.vue:215-228). + */ + cityId: string | null + /** + * Legacy customers.gram_level — the «سطح اعتبار» column, filterable. + * Decimal(14,4) matches Customer.goldCreditLimitGrams exactly so the same + * credit limit has identical precision on both tables. + */ + gramLevel: Prisma.Decimal + /** + * Legacy customers.phone (varchar 15) and ncode (varchar 20). The reference + * stores both and reads neither back; kept so the form matches it. Neither + * is unique and neither has a validation rule in the reference — inventing + * one would reject data the reference accepts. + */ + phone: string | null + nationalCode: string | null + /** + * The Customer row carrying this expert's OWN orders, debt and credit limit. + * + * The reference stored a sales agent AS a Customer (type=1), so an order the + * agent placed from the app was simply their own, against their own + * gram_level (ApiMobileController.php:534-535). Here the expert is an + * AdminUser (D17), which has no ledger and cannot be an Order's subject, so + * this one linked Customer plays that part. + * + * Distinct from the expert's REFERRED customers, which are ordinary Customer + * rows pointing at the AdminUser through Customer.referredByAgentId. + * + * Null until the expert first signs into the app, when it is created from + * this profile. See D21. + */ + tradingCustomerId: string | null + createdAt: Date + updatedAt: Date + }, ExtArgs["result"]["salesExpertProfile"]> + composites: {} + } + + type SalesExpertProfileGetPayload = $Result.GetResult + + type SalesExpertProfileCountArgs = + Omit & { + select?: SalesExpertProfileCountAggregateInputType | true + } + + export interface SalesExpertProfileDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['SalesExpertProfile'], meta: { name: 'SalesExpertProfile' } } + /** + * Find zero or one SalesExpertProfile that matches the filter. + * @param {SalesExpertProfileFindUniqueArgs} args - Arguments to find a SalesExpertProfile + * @example + * // Get one SalesExpertProfile + * const salesExpertProfile = await prisma.salesExpertProfile.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__SalesExpertProfileClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one SalesExpertProfile that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {SalesExpertProfileFindUniqueOrThrowArgs} args - Arguments to find a SalesExpertProfile + * @example + * // Get one SalesExpertProfile + * const salesExpertProfile = await prisma.salesExpertProfile.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__SalesExpertProfileClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first SalesExpertProfile that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {SalesExpertProfileFindFirstArgs} args - Arguments to find a SalesExpertProfile + * @example + * // Get one SalesExpertProfile + * const salesExpertProfile = await prisma.salesExpertProfile.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__SalesExpertProfileClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first SalesExpertProfile that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {SalesExpertProfileFindFirstOrThrowArgs} args - Arguments to find a SalesExpertProfile + * @example + * // Get one SalesExpertProfile + * const salesExpertProfile = await prisma.salesExpertProfile.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__SalesExpertProfileClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more SalesExpertProfiles that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {SalesExpertProfileFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all SalesExpertProfiles + * const salesExpertProfiles = await prisma.salesExpertProfile.findMany() + * + * // Get first 10 SalesExpertProfiles + * const salesExpertProfiles = await prisma.salesExpertProfile.findMany({ take: 10 }) + * + * // Only select the `id` + * const salesExpertProfileWithIdOnly = await prisma.salesExpertProfile.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a SalesExpertProfile. + * @param {SalesExpertProfileCreateArgs} args - Arguments to create a SalesExpertProfile. + * @example + * // Create one SalesExpertProfile + * const SalesExpertProfile = await prisma.salesExpertProfile.create({ + * data: { + * // ... data to create a SalesExpertProfile + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__SalesExpertProfileClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many SalesExpertProfiles. + * @param {SalesExpertProfileCreateManyArgs} args - Arguments to create many SalesExpertProfiles. + * @example + * // Create many SalesExpertProfiles + * const salesExpertProfile = await prisma.salesExpertProfile.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many SalesExpertProfiles and returns the data saved in the database. + * @param {SalesExpertProfileCreateManyAndReturnArgs} args - Arguments to create many SalesExpertProfiles. + * @example + * // Create many SalesExpertProfiles + * const salesExpertProfile = await prisma.salesExpertProfile.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many SalesExpertProfiles and only return the `id` + * const salesExpertProfileWithIdOnly = await prisma.salesExpertProfile.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> + + /** + * Delete a SalesExpertProfile. + * @param {SalesExpertProfileDeleteArgs} args - Arguments to delete one SalesExpertProfile. + * @example + * // Delete one SalesExpertProfile + * const SalesExpertProfile = await prisma.salesExpertProfile.delete({ + * where: { + * // ... filter to delete one SalesExpertProfile + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__SalesExpertProfileClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one SalesExpertProfile. + * @param {SalesExpertProfileUpdateArgs} args - Arguments to update one SalesExpertProfile. + * @example + * // Update one SalesExpertProfile + * const salesExpertProfile = await prisma.salesExpertProfile.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__SalesExpertProfileClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more SalesExpertProfiles. + * @param {SalesExpertProfileDeleteManyArgs} args - Arguments to filter SalesExpertProfiles to delete. + * @example + * // Delete a few SalesExpertProfiles + * const { count } = await prisma.salesExpertProfile.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more SalesExpertProfiles. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {SalesExpertProfileUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many SalesExpertProfiles + * const salesExpertProfile = await prisma.salesExpertProfile.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one SalesExpertProfile. + * @param {SalesExpertProfileUpsertArgs} args - Arguments to update or create a SalesExpertProfile. + * @example + * // Update or create a SalesExpertProfile + * const salesExpertProfile = await prisma.salesExpertProfile.upsert({ + * create: { + * // ... data to create a SalesExpertProfile + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the SalesExpertProfile we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__SalesExpertProfileClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of SalesExpertProfiles. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {SalesExpertProfileCountArgs} args - Arguments to filter SalesExpertProfiles to count. + * @example + * // Count the number of SalesExpertProfiles + * const count = await prisma.salesExpertProfile.count({ + * where: { + * // ... the filter for the SalesExpertProfiles we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a SalesExpertProfile. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {SalesExpertProfileAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by SalesExpertProfile. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {SalesExpertProfileGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends SalesExpertProfileGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: SalesExpertProfileGroupByArgs['orderBy'] } + : { orderBy?: SalesExpertProfileGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetSalesExpertProfileGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the SalesExpertProfile model + */ + readonly fields: SalesExpertProfileFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for SalesExpertProfile. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__SalesExpertProfileClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + adminUser = {}>(args?: Subset>): Prisma__AdminUserClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + city = {}>(args?: Subset>): Prisma__CityClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> + tradingCustomer = {}>(args?: Subset>): Prisma__CustomerClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the SalesExpertProfile model + */ + interface SalesExpertProfileFieldRefs { + readonly id: FieldRef<"SalesExpertProfile", 'String'> + readonly adminUserId: FieldRef<"SalesExpertProfile", 'String'> + readonly cityId: FieldRef<"SalesExpertProfile", 'String'> + readonly gramLevel: FieldRef<"SalesExpertProfile", 'Decimal'> + readonly phone: FieldRef<"SalesExpertProfile", 'String'> + readonly nationalCode: FieldRef<"SalesExpertProfile", 'String'> + readonly tradingCustomerId: FieldRef<"SalesExpertProfile", 'String'> + readonly createdAt: FieldRef<"SalesExpertProfile", 'DateTime'> + readonly updatedAt: FieldRef<"SalesExpertProfile", 'DateTime'> + } + + + // Custom InputTypes + /** + * SalesExpertProfile findUnique + */ + export type SalesExpertProfileFindUniqueArgs = { + /** + * Select specific fields to fetch from the SalesExpertProfile + */ + select?: SalesExpertProfileSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SalesExpertProfileInclude | null + /** + * Filter, which SalesExpertProfile to fetch. + */ + where: SalesExpertProfileWhereUniqueInput + } + + /** + * SalesExpertProfile findUniqueOrThrow + */ + export type SalesExpertProfileFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the SalesExpertProfile + */ + select?: SalesExpertProfileSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SalesExpertProfileInclude | null + /** + * Filter, which SalesExpertProfile to fetch. + */ + where: SalesExpertProfileWhereUniqueInput + } + + /** + * SalesExpertProfile findFirst + */ + export type SalesExpertProfileFindFirstArgs = { + /** + * Select specific fields to fetch from the SalesExpertProfile + */ + select?: SalesExpertProfileSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SalesExpertProfileInclude | null + /** + * Filter, which SalesExpertProfile to fetch. + */ + where?: SalesExpertProfileWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of SalesExpertProfiles to fetch. + */ + orderBy?: SalesExpertProfileOrderByWithRelationInput | SalesExpertProfileOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for SalesExpertProfiles. + */ + cursor?: SalesExpertProfileWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` SalesExpertProfiles from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` SalesExpertProfiles. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of SalesExpertProfiles. + */ + distinct?: SalesExpertProfileScalarFieldEnum | SalesExpertProfileScalarFieldEnum[] + } + + /** + * SalesExpertProfile findFirstOrThrow + */ + export type SalesExpertProfileFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the SalesExpertProfile + */ + select?: SalesExpertProfileSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SalesExpertProfileInclude | null + /** + * Filter, which SalesExpertProfile to fetch. + */ + where?: SalesExpertProfileWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of SalesExpertProfiles to fetch. + */ + orderBy?: SalesExpertProfileOrderByWithRelationInput | SalesExpertProfileOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for SalesExpertProfiles. + */ + cursor?: SalesExpertProfileWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` SalesExpertProfiles from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` SalesExpertProfiles. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of SalesExpertProfiles. + */ + distinct?: SalesExpertProfileScalarFieldEnum | SalesExpertProfileScalarFieldEnum[] + } + + /** + * SalesExpertProfile findMany + */ + export type SalesExpertProfileFindManyArgs = { + /** + * Select specific fields to fetch from the SalesExpertProfile + */ + select?: SalesExpertProfileSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SalesExpertProfileInclude | null + /** + * Filter, which SalesExpertProfiles to fetch. + */ + where?: SalesExpertProfileWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of SalesExpertProfiles to fetch. + */ + orderBy?: SalesExpertProfileOrderByWithRelationInput | SalesExpertProfileOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing SalesExpertProfiles. + */ + cursor?: SalesExpertProfileWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` SalesExpertProfiles from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` SalesExpertProfiles. + */ + skip?: number + distinct?: SalesExpertProfileScalarFieldEnum | SalesExpertProfileScalarFieldEnum[] + } + + /** + * SalesExpertProfile create + */ + export type SalesExpertProfileCreateArgs = { + /** + * Select specific fields to fetch from the SalesExpertProfile + */ + select?: SalesExpertProfileSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SalesExpertProfileInclude | null + /** + * The data needed to create a SalesExpertProfile. + */ + data: XOR + } + + /** + * SalesExpertProfile createMany + */ + export type SalesExpertProfileCreateManyArgs = { + /** + * The data used to create many SalesExpertProfiles. + */ + data: SalesExpertProfileCreateManyInput | SalesExpertProfileCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * SalesExpertProfile createManyAndReturn + */ + export type SalesExpertProfileCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the SalesExpertProfile + */ + select?: SalesExpertProfileSelectCreateManyAndReturn | null + /** + * The data used to create many SalesExpertProfiles. + */ + data: SalesExpertProfileCreateManyInput | SalesExpertProfileCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: SalesExpertProfileIncludeCreateManyAndReturn | null + } + + /** + * SalesExpertProfile update + */ + export type SalesExpertProfileUpdateArgs = { + /** + * Select specific fields to fetch from the SalesExpertProfile + */ + select?: SalesExpertProfileSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SalesExpertProfileInclude | null + /** + * The data needed to update a SalesExpertProfile. + */ + data: XOR + /** + * Choose, which SalesExpertProfile to update. + */ + where: SalesExpertProfileWhereUniqueInput + } + + /** + * SalesExpertProfile updateMany + */ + export type SalesExpertProfileUpdateManyArgs = { + /** + * The data used to update SalesExpertProfiles. + */ + data: XOR + /** + * Filter which SalesExpertProfiles to update + */ + where?: SalesExpertProfileWhereInput + } + + /** + * SalesExpertProfile upsert + */ + export type SalesExpertProfileUpsertArgs = { + /** + * Select specific fields to fetch from the SalesExpertProfile + */ + select?: SalesExpertProfileSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SalesExpertProfileInclude | null + /** + * The filter to search for the SalesExpertProfile to update in case it exists. + */ + where: SalesExpertProfileWhereUniqueInput + /** + * In case the SalesExpertProfile found by the `where` argument doesn't exist, create a new SalesExpertProfile with this data. + */ + create: XOR + /** + * In case the SalesExpertProfile was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * SalesExpertProfile delete + */ + export type SalesExpertProfileDeleteArgs = { + /** + * Select specific fields to fetch from the SalesExpertProfile + */ + select?: SalesExpertProfileSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SalesExpertProfileInclude | null + /** + * Filter which SalesExpertProfile to delete. + */ + where: SalesExpertProfileWhereUniqueInput + } + + /** + * SalesExpertProfile deleteMany + */ + export type SalesExpertProfileDeleteManyArgs = { + /** + * Filter which SalesExpertProfiles to delete + */ + where?: SalesExpertProfileWhereInput + } + + /** + * SalesExpertProfile.city + */ + export type SalesExpertProfile$cityArgs = { + /** + * Select specific fields to fetch from the City + */ + select?: CitySelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CityInclude | null + where?: CityWhereInput + } + + /** + * SalesExpertProfile.tradingCustomer + */ + export type SalesExpertProfile$tradingCustomerArgs = { + /** + * Select specific fields to fetch from the Customer + */ + select?: CustomerSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerInclude | null + where?: CustomerWhereInput + } + + /** + * SalesExpertProfile without action + */ + export type SalesExpertProfileDefaultArgs = { + /** + * Select specific fields to fetch from the SalesExpertProfile + */ + select?: SalesExpertProfileSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SalesExpertProfileInclude | null + } + + /** * Model Customer */ @@ -7160,21 +11455,30 @@ export namespace Prisma { goldCreditLimitGrams: Decimal | null goldDebtGrams: Decimal | null fiatDebtRial: Decimal | null + accountingGoldBalance: Decimal | null + accountingRialBalance: Decimal | null + makingChargeOffsetPercent: Decimal | null } export type CustomerSumAggregateOutputType = { goldCreditLimitGrams: Decimal | null goldDebtGrams: Decimal | null fiatDebtRial: Decimal | null + accountingGoldBalance: Decimal | null + accountingRialBalance: Decimal | null + makingChargeOffsetPercent: Decimal | null } export type CustomerMinAggregateOutputType = { id: string | null fullName: string | null + firstName: string | null + lastName: string | null mobile: string | null nationalCode: string | null passwordHash: string | null cityId: string | null + cityNameRaw: string | null kind: $Enums.CustomerKind | null phone: string | null address: string | null @@ -7186,10 +11490,17 @@ export namespace Prisma { goldCreditLimitGrams: Decimal | null goldDebtGrams: Decimal | null fiatDebtRial: Decimal | null + accountingGoldBalance: Decimal | null + accountingRialBalance: Decimal | null + accountingBalanceAt: Date | null + makingChargeOffsetPercent: Decimal | null verificationStep: $Enums.VerificationStep | null nationalIdImageUrl: string | null businessLicenseUrl: string | null shopImageUrl: string | null + verificationRejectionReason: string | null + verificationRejectedAt: Date | null + birthDate: Date | null avatarFileId: string | null canPlaceOrders: boolean | null isActive: boolean | null @@ -7201,10 +11512,13 @@ export namespace Prisma { export type CustomerMaxAggregateOutputType = { id: string | null fullName: string | null + firstName: string | null + lastName: string | null mobile: string | null nationalCode: string | null passwordHash: string | null cityId: string | null + cityNameRaw: string | null kind: $Enums.CustomerKind | null phone: string | null address: string | null @@ -7216,10 +11530,17 @@ export namespace Prisma { goldCreditLimitGrams: Decimal | null goldDebtGrams: Decimal | null fiatDebtRial: Decimal | null + accountingGoldBalance: Decimal | null + accountingRialBalance: Decimal | null + accountingBalanceAt: Date | null + makingChargeOffsetPercent: Decimal | null verificationStep: $Enums.VerificationStep | null nationalIdImageUrl: string | null businessLicenseUrl: string | null shopImageUrl: string | null + verificationRejectionReason: string | null + verificationRejectedAt: Date | null + birthDate: Date | null avatarFileId: string | null canPlaceOrders: boolean | null isActive: boolean | null @@ -7231,10 +11552,13 @@ export namespace Prisma { export type CustomerCountAggregateOutputType = { id: number fullName: number + firstName: number + lastName: number mobile: number nationalCode: number passwordHash: number cityId: number + cityNameRaw: number kind: number phone: number address: number @@ -7246,10 +11570,17 @@ export namespace Prisma { goldCreditLimitGrams: number goldDebtGrams: number fiatDebtRial: number + accountingGoldBalance: number + accountingRialBalance: number + accountingBalanceAt: number + makingChargeOffsetPercent: number verificationStep: number nationalIdImageUrl: number businessLicenseUrl: number shopImageUrl: number + verificationRejectionReason: number + verificationRejectedAt: number + birthDate: number avatarFileId: number canPlaceOrders: number isActive: number @@ -7264,21 +11595,30 @@ export namespace Prisma { goldCreditLimitGrams?: true goldDebtGrams?: true fiatDebtRial?: true + accountingGoldBalance?: true + accountingRialBalance?: true + makingChargeOffsetPercent?: true } export type CustomerSumAggregateInputType = { goldCreditLimitGrams?: true goldDebtGrams?: true fiatDebtRial?: true + accountingGoldBalance?: true + accountingRialBalance?: true + makingChargeOffsetPercent?: true } export type CustomerMinAggregateInputType = { id?: true fullName?: true + firstName?: true + lastName?: true mobile?: true nationalCode?: true passwordHash?: true cityId?: true + cityNameRaw?: true kind?: true phone?: true address?: true @@ -7290,10 +11630,17 @@ export namespace Prisma { goldCreditLimitGrams?: true goldDebtGrams?: true fiatDebtRial?: true + accountingGoldBalance?: true + accountingRialBalance?: true + accountingBalanceAt?: true + makingChargeOffsetPercent?: true verificationStep?: true nationalIdImageUrl?: true businessLicenseUrl?: true shopImageUrl?: true + verificationRejectionReason?: true + verificationRejectedAt?: true + birthDate?: true avatarFileId?: true canPlaceOrders?: true isActive?: true @@ -7305,10 +11652,13 @@ export namespace Prisma { export type CustomerMaxAggregateInputType = { id?: true fullName?: true + firstName?: true + lastName?: true mobile?: true nationalCode?: true passwordHash?: true cityId?: true + cityNameRaw?: true kind?: true phone?: true address?: true @@ -7320,10 +11670,17 @@ export namespace Prisma { goldCreditLimitGrams?: true goldDebtGrams?: true fiatDebtRial?: true + accountingGoldBalance?: true + accountingRialBalance?: true + accountingBalanceAt?: true + makingChargeOffsetPercent?: true verificationStep?: true nationalIdImageUrl?: true businessLicenseUrl?: true shopImageUrl?: true + verificationRejectionReason?: true + verificationRejectedAt?: true + birthDate?: true avatarFileId?: true canPlaceOrders?: true isActive?: true @@ -7335,10 +11692,13 @@ export namespace Prisma { export type CustomerCountAggregateInputType = { id?: true fullName?: true + firstName?: true + lastName?: true mobile?: true nationalCode?: true passwordHash?: true cityId?: true + cityNameRaw?: true kind?: true phone?: true address?: true @@ -7350,10 +11710,17 @@ export namespace Prisma { goldCreditLimitGrams?: true goldDebtGrams?: true fiatDebtRial?: true + accountingGoldBalance?: true + accountingRialBalance?: true + accountingBalanceAt?: true + makingChargeOffsetPercent?: true verificationStep?: true nationalIdImageUrl?: true businessLicenseUrl?: true shopImageUrl?: true + verificationRejectionReason?: true + verificationRejectedAt?: true + birthDate?: true avatarFileId?: true canPlaceOrders?: true isActive?: true @@ -7452,10 +11819,13 @@ export namespace Prisma { export type CustomerGroupByOutputType = { id: string fullName: string + firstName: string | null + lastName: string | null mobile: string - nationalCode: string + nationalCode: string | null passwordHash: string cityId: string | null + cityNameRaw: string | null kind: $Enums.CustomerKind phone: string | null address: string | null @@ -7467,10 +11837,17 @@ export namespace Prisma { goldCreditLimitGrams: Decimal goldDebtGrams: Decimal fiatDebtRial: Decimal + accountingGoldBalance: Decimal | null + accountingRialBalance: Decimal | null + accountingBalanceAt: Date | null + makingChargeOffsetPercent: Decimal verificationStep: $Enums.VerificationStep nationalIdImageUrl: string | null businessLicenseUrl: string | null shopImageUrl: string | null + verificationRejectionReason: string | null + verificationRejectedAt: Date | null + birthDate: Date | null avatarFileId: string | null canPlaceOrders: boolean isActive: boolean @@ -7501,10 +11878,13 @@ export namespace Prisma { export type CustomerSelect = $Extensions.GetSelect<{ id?: boolean fullName?: boolean + firstName?: boolean + lastName?: boolean mobile?: boolean nationalCode?: boolean passwordHash?: boolean cityId?: boolean + cityNameRaw?: boolean kind?: boolean phone?: boolean address?: boolean @@ -7516,10 +11896,17 @@ export namespace Prisma { goldCreditLimitGrams?: boolean goldDebtGrams?: boolean fiatDebtRial?: boolean + accountingGoldBalance?: boolean + accountingRialBalance?: boolean + accountingBalanceAt?: boolean + makingChargeOffsetPercent?: boolean verificationStep?: boolean nationalIdImageUrl?: boolean businessLicenseUrl?: boolean shopImageUrl?: boolean + verificationRejectionReason?: boolean + verificationRejectedAt?: boolean + birthDate?: boolean avatarFileId?: boolean canPlaceOrders?: boolean isActive?: boolean @@ -7528,6 +11915,8 @@ export namespace Prisma { updatedAt?: boolean city?: boolean | Customer$cityArgs referredByAgent?: boolean | Customer$referredByAgentArgs + salesExpertTradingFor?: boolean | Customer$salesExpertTradingForArgs + referredOrders?: boolean | Customer$referredOrdersArgs avatarFile?: boolean | Customer$avatarFileArgs addresses?: boolean | Customer$addressesArgs orders?: boolean | Customer$ordersArgs @@ -7538,16 +11927,21 @@ export namespace Prisma { promotions?: boolean | Customer$promotionsArgs notifications?: boolean | Customer$notificationsArgs activityLogs?: boolean | Customer$activityLogsArgs + otpChallenges?: boolean | Customer$otpChallengesArgs + favorites?: boolean | Customer$favoritesArgs _count?: boolean | CustomerCountOutputTypeDefaultArgs }, ExtArgs["result"]["customer"]> export type CustomerSelectCreateManyAndReturn = $Extensions.GetSelect<{ id?: boolean fullName?: boolean + firstName?: boolean + lastName?: boolean mobile?: boolean nationalCode?: boolean passwordHash?: boolean cityId?: boolean + cityNameRaw?: boolean kind?: boolean phone?: boolean address?: boolean @@ -7559,10 +11953,17 @@ export namespace Prisma { goldCreditLimitGrams?: boolean goldDebtGrams?: boolean fiatDebtRial?: boolean + accountingGoldBalance?: boolean + accountingRialBalance?: boolean + accountingBalanceAt?: boolean + makingChargeOffsetPercent?: boolean verificationStep?: boolean nationalIdImageUrl?: boolean businessLicenseUrl?: boolean shopImageUrl?: boolean + verificationRejectionReason?: boolean + verificationRejectedAt?: boolean + birthDate?: boolean avatarFileId?: boolean canPlaceOrders?: boolean isActive?: boolean @@ -7577,10 +11978,13 @@ export namespace Prisma { export type CustomerSelectScalar = { id?: boolean fullName?: boolean + firstName?: boolean + lastName?: boolean mobile?: boolean nationalCode?: boolean passwordHash?: boolean cityId?: boolean + cityNameRaw?: boolean kind?: boolean phone?: boolean address?: boolean @@ -7592,10 +11996,17 @@ export namespace Prisma { goldCreditLimitGrams?: boolean goldDebtGrams?: boolean fiatDebtRial?: boolean + accountingGoldBalance?: boolean + accountingRialBalance?: boolean + accountingBalanceAt?: boolean + makingChargeOffsetPercent?: boolean verificationStep?: boolean nationalIdImageUrl?: boolean businessLicenseUrl?: boolean shopImageUrl?: boolean + verificationRejectionReason?: boolean + verificationRejectedAt?: boolean + birthDate?: boolean avatarFileId?: boolean canPlaceOrders?: boolean isActive?: boolean @@ -7607,6 +12018,8 @@ export namespace Prisma { export type CustomerInclude = { city?: boolean | Customer$cityArgs referredByAgent?: boolean | Customer$referredByAgentArgs + salesExpertTradingFor?: boolean | Customer$salesExpertTradingForArgs + referredOrders?: boolean | Customer$referredOrdersArgs avatarFile?: boolean | Customer$avatarFileArgs addresses?: boolean | Customer$addressesArgs orders?: boolean | Customer$ordersArgs @@ -7617,6 +12030,8 @@ export namespace Prisma { promotions?: boolean | Customer$promotionsArgs notifications?: boolean | Customer$notificationsArgs activityLogs?: boolean | Customer$activityLogsArgs + otpChallenges?: boolean | Customer$otpChallengesArgs + favorites?: boolean | Customer$favoritesArgs _count?: boolean | CustomerCountOutputTypeDefaultArgs } export type CustomerIncludeCreateManyAndReturn = { @@ -7630,6 +12045,17 @@ export namespace Prisma { objects: { city: Prisma.$CityPayload | null referredByAgent: Prisma.$AdminUserPayload | null + /** + * Set only on the one Customer row that acts as a sales expert's own trading + * account (see SalesExpertProfile.tradingCustomerId). Empty for every + * ordinary customer. + */ + salesExpertTradingFor: Prisma.$SalesExpertProfilePayload | null + /** + * Legacy orders that named THIS customer as their referrer — see + * Order.referrerCustomerId. History only. + */ + referredOrders: Prisma.$OrderPayload[] avatarFile: Prisma.$UploadedFilePayload | null addresses: Prisma.$CustomerAddressPayload[] orders: Prisma.$OrderPayload[] @@ -7640,14 +12066,61 @@ export namespace Prisma { promotions: Prisma.$PromotionPayload[] notifications: Prisma.$NotificationRecipientPayload[] activityLogs: Prisma.$CustomerActivityLogPayload[] + otpChallenges: Prisma.$CustomerOtpPayload[] + favorites: Prisma.$CustomerFavoritePayload[] } scalars: $Extensions.GetPayloadResult<{ id: string + /** + * ⚠️ `fullName`, `firstName` and `lastName` are kept in sync BY A DATABASE + * TRIGGER — `customer_sync_full_name`, created in migration + * 20260922120000_customer_name_parts. Prisma does not know about it, so a + * write here is NOT the whole story: + * + * * write the parts -> fullName is rebuilt as "first last" + * * write fullName only -> the parts are re-derived from it + * * write BOTH in one update -> THE PARTS WIN; fullName is overwritten + * with "first last" and whatever you passed for fullName is discarded + * + * So a value you wrote can differ from the value that lands in the row. + * Re-read after writing if you need the stored value. Prefer writing the + * parts; `fullName` exists for the legacy readers that predate D0. + * + * Reference has these as two columns from the start + * (henza_server 2020_10_01_120430_customers_table.php:18-19 fname/lname); + * the port collapsed them, which is the D0 defect. + */ fullName: string + firstName: string | null + lastName: string | null mobile: string - nationalCode: string + /** + * Legacy customers.ncode. OPTIONAL since 2026-10-07: not one of the 1,616 + * legacy customers has a national code (1595/1595 empty), and fabricating + * one is a data violation that would block later legal identity checks + * (owner ruling). Still @unique — in PostgreSQL NULLs do not collide, so + * the migration tool must write NULL and never '', which would collide on + * the second row. + * + * Three service-layer workarounds exist ONLY because this used to be + * required, and they store the MOBILE NUMBER here: + * admin-customers.service.ts:625,685 and customer-auth.service.ts:258. + * Retiring them is a separate change; see docs/DATA-MIGRATION-MAP.md §10.4. + */ + nationalCode: string | null passwordHash: string cityId: string | null + /** + * Legacy customers.new_city — the city name exactly as the customer typed it + * at app sign-up (Major/CustomerController.php:36). Kept verbatim because + * the legacy city table has only 15 rows, so the typed name is often the only + * record of where the customer is (172 customers; 43 match no known city). + * cityId is set alongside it only on an exact, ي/ك-normalised name match. + * Legacy sign-up also forced city_id = 5 (Tehran) on everyone + * (Major/CustomerController.php:21), so for those rows the typed name, not + * cityId, is the truth. Owner ruling 2026-10-07: keep both. + */ + cityNameRaw: string | null /** * Legacy Customer.type — distinguishes بنکدار from مغازه دار, which the * BankerList / ShopkeeperList screens filter on. @@ -7670,10 +12143,63 @@ export namespace Prisma { goldCreditLimitGrams: Prisma.Decimal goldDebtGrams: Prisma.Decimal fiatDebtRial: Prisma.Decimal + /** + * Balance as last read from the accounting software (D27), in the app's own + * sign convention (positive = owes). Shown to the customer when the + * integration is on; the credit-limit check still uses goldDebtGrams above. + * Null until the first successful sync. + */ + accountingGoldBalance: Prisma.Decimal | null + accountingRialBalance: Prisma.Decimal | null + accountingBalanceAt: Date | null + /** + * Legacy `customers.percent` — the per-customer making-charge offset. It is + * ADDED to the variant's making charge when pricing an order line + * (henza_pwa src/Mixins/product/index.ts:69-75: + * getWage(v) = state.percent + v.percentage_pay) + * and it shifts the catalogue making-charge filter bounds + * (ApiMobileController.php:391-396,76-77). It is NOT part of the price + * formula itself — that extra percent is ConfigStatic['product_price_extra_percent']. + * + * NOT the wallet cashback rate (storefront ConfigStatic['percent'], D13) and + * NOT the wholesale per-line charge (OrderItem.wagePercentSnapshot). + * + * DB default 0 keeps every existing customer's price unchanged. The + * reference's application-layer default for NEW customers is 3 + * (AdminController.php:338) and the field is required on create (:354). + */ + makingChargeOffsetPercent: Prisma.Decimal verificationStep: $Enums.VerificationStep nationalIdImageUrl: string | null businessLicenseUrl: string | null shopImageUrl: string | null + /** + * Why verification was rejected (VerificationStep.REJECTED). + * + * Legacy recorded NO reason: none of its 49 `customers` columns is a + * reason/note field, and on rejection it only sent a fixed SMS. So the 14 + * rows migrated from henza carry the sentinel + * «رد شده در سیستم قدیم — فاقد شرح علت ثبت‌شده» instead of NULL, so support + * knows why it is blank (owner ruling 2026-10-07). The migration tool + * writes it only WHERE this IS NULL, so a re-run cannot overwrite a real + * reason entered in the new system. + */ + verificationRejectionReason: string | null + /** + * NULL for rows migrated from henza — legacy recorded no rejection time. + */ + verificationRejectedAt: Date | null + /** + * Legacy customers.birth_date, populated on 917 of 1,595 rows. Kept for the + * birthday SMS / loyalty campaigns (owner ruling 2026-10-07). + * + * ⚠ Legacy stores dates as JALALI STRINGS in other tables + * (cashes.recive_date is varchar, 88/89 values starting "14…"), so this + * timestamp may hold mis-entered Jalali years. Confirm the calendar with + * docs/migration-precheck-3.sql BEFORE backfilling: copying them unchanged + * would produce 917 wrong birthdays, worse for an SMS campaign than none. + */ + birthDate: Date | null /** * Legacy `image_id` — the profile photo (عکس پروفایل) on the sales-agent * form. Legacy stored an FK to its Image table and read it back as a nested @@ -8060,6 +12586,8 @@ export namespace Prisma { readonly [Symbol.toStringTag]: "PrismaPromise" city = {}>(args?: Subset>): Prisma__CityClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> referredByAgent = {}>(args?: Subset>): Prisma__AdminUserClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> + salesExpertTradingFor = {}>(args?: Subset>): Prisma__SalesExpertProfileClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> + referredOrders = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> avatarFile = {}>(args?: Subset>): Prisma__UploadedFileClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> addresses = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> orders = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> @@ -8070,6 +12598,8 @@ export namespace Prisma { promotions = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> notifications = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> activityLogs = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + otpChallenges = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + favorites = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. @@ -8101,10 +12631,13 @@ export namespace Prisma { interface CustomerFieldRefs { readonly id: FieldRef<"Customer", 'String'> readonly fullName: FieldRef<"Customer", 'String'> + readonly firstName: FieldRef<"Customer", 'String'> + readonly lastName: FieldRef<"Customer", 'String'> readonly mobile: FieldRef<"Customer", 'String'> readonly nationalCode: FieldRef<"Customer", 'String'> readonly passwordHash: FieldRef<"Customer", 'String'> readonly cityId: FieldRef<"Customer", 'String'> + readonly cityNameRaw: FieldRef<"Customer", 'String'> readonly kind: FieldRef<"Customer", 'CustomerKind'> readonly phone: FieldRef<"Customer", 'String'> readonly address: FieldRef<"Customer", 'String'> @@ -8116,10 +12649,17 @@ export namespace Prisma { readonly goldCreditLimitGrams: FieldRef<"Customer", 'Decimal'> readonly goldDebtGrams: FieldRef<"Customer", 'Decimal'> readonly fiatDebtRial: FieldRef<"Customer", 'Decimal'> + readonly accountingGoldBalance: FieldRef<"Customer", 'Decimal'> + readonly accountingRialBalance: FieldRef<"Customer", 'Decimal'> + readonly accountingBalanceAt: FieldRef<"Customer", 'DateTime'> + readonly makingChargeOffsetPercent: FieldRef<"Customer", 'Decimal'> readonly verificationStep: FieldRef<"Customer", 'VerificationStep'> readonly nationalIdImageUrl: FieldRef<"Customer", 'String'> readonly businessLicenseUrl: FieldRef<"Customer", 'String'> readonly shopImageUrl: FieldRef<"Customer", 'String'> + readonly verificationRejectionReason: FieldRef<"Customer", 'String'> + readonly verificationRejectedAt: FieldRef<"Customer", 'DateTime'> + readonly birthDate: FieldRef<"Customer", 'DateTime'> readonly avatarFileId: FieldRef<"Customer", 'String'> readonly canPlaceOrders: FieldRef<"Customer", 'Boolean'> readonly isActive: FieldRef<"Customer", 'Boolean'> @@ -8473,6 +13013,41 @@ export namespace Prisma { where?: AdminUserWhereInput } + /** + * Customer.salesExpertTradingFor + */ + export type Customer$salesExpertTradingForArgs = { + /** + * Select specific fields to fetch from the SalesExpertProfile + */ + select?: SalesExpertProfileSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: SalesExpertProfileInclude | null + where?: SalesExpertProfileWhereInput + } + + /** + * Customer.referredOrders + */ + export type Customer$referredOrdersArgs = { + /** + * Select specific fields to fetch from the Order + */ + select?: OrderSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: OrderInclude | null + where?: OrderWhereInput + orderBy?: OrderOrderByWithRelationInput | OrderOrderByWithRelationInput[] + cursor?: OrderWhereUniqueInput + take?: number + skip?: number + distinct?: OrderScalarFieldEnum | OrderScalarFieldEnum[] + } + /** * Customer.avatarFile */ @@ -8668,6 +13243,46 @@ export namespace Prisma { distinct?: CustomerActivityLogScalarFieldEnum | CustomerActivityLogScalarFieldEnum[] } + /** + * Customer.otpChallenges + */ + export type Customer$otpChallengesArgs = { + /** + * Select specific fields to fetch from the CustomerOtp + */ + select?: CustomerOtpSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerOtpInclude | null + where?: CustomerOtpWhereInput + orderBy?: CustomerOtpOrderByWithRelationInput | CustomerOtpOrderByWithRelationInput[] + cursor?: CustomerOtpWhereUniqueInput + take?: number + skip?: number + distinct?: CustomerOtpScalarFieldEnum | CustomerOtpScalarFieldEnum[] + } + + /** + * Customer.favorites + */ + export type Customer$favoritesArgs = { + /** + * Select specific fields to fetch from the CustomerFavorite + */ + select?: CustomerFavoriteSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerFavoriteInclude | null + where?: CustomerFavoriteWhereInput + orderBy?: CustomerFavoriteOrderByWithRelationInput | CustomerFavoriteOrderByWithRelationInput[] + cursor?: CustomerFavoriteWhereUniqueInput + take?: number + skip?: number + distinct?: CustomerFavoriteScalarFieldEnum | CustomerFavoriteScalarFieldEnum[] + } + /** * Customer without action */ @@ -8683,6 +13298,921 @@ export namespace Prisma { } + /** + * Model CustomerFavorite + */ + + export type AggregateCustomerFavorite = { + _count: CustomerFavoriteCountAggregateOutputType | null + _min: CustomerFavoriteMinAggregateOutputType | null + _max: CustomerFavoriteMaxAggregateOutputType | null + } + + export type CustomerFavoriteMinAggregateOutputType = { + customerId: string | null + productId: string | null + createdAt: Date | null + } + + export type CustomerFavoriteMaxAggregateOutputType = { + customerId: string | null + productId: string | null + createdAt: Date | null + } + + export type CustomerFavoriteCountAggregateOutputType = { + customerId: number + productId: number + createdAt: number + _all: number + } + + + export type CustomerFavoriteMinAggregateInputType = { + customerId?: true + productId?: true + createdAt?: true + } + + export type CustomerFavoriteMaxAggregateInputType = { + customerId?: true + productId?: true + createdAt?: true + } + + export type CustomerFavoriteCountAggregateInputType = { + customerId?: true + productId?: true + createdAt?: true + _all?: true + } + + export type CustomerFavoriteAggregateArgs = { + /** + * Filter which CustomerFavorite to aggregate. + */ + where?: CustomerFavoriteWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of CustomerFavorites to fetch. + */ + orderBy?: CustomerFavoriteOrderByWithRelationInput | CustomerFavoriteOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: CustomerFavoriteWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` CustomerFavorites from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` CustomerFavorites. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned CustomerFavorites + **/ + _count?: true | CustomerFavoriteCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: CustomerFavoriteMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: CustomerFavoriteMaxAggregateInputType + } + + export type GetCustomerFavoriteAggregateType = { + [P in keyof T & keyof AggregateCustomerFavorite]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type CustomerFavoriteGroupByArgs = { + where?: CustomerFavoriteWhereInput + orderBy?: CustomerFavoriteOrderByWithAggregationInput | CustomerFavoriteOrderByWithAggregationInput[] + by: CustomerFavoriteScalarFieldEnum[] | CustomerFavoriteScalarFieldEnum + having?: CustomerFavoriteScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: CustomerFavoriteCountAggregateInputType | true + _min?: CustomerFavoriteMinAggregateInputType + _max?: CustomerFavoriteMaxAggregateInputType + } + + export type CustomerFavoriteGroupByOutputType = { + customerId: string + productId: string + createdAt: Date + _count: CustomerFavoriteCountAggregateOutputType | null + _min: CustomerFavoriteMinAggregateOutputType | null + _max: CustomerFavoriteMaxAggregateOutputType | null + } + + type GetCustomerFavoriteGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof CustomerFavoriteGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type CustomerFavoriteSelect = $Extensions.GetSelect<{ + customerId?: boolean + productId?: boolean + createdAt?: boolean + customer?: boolean | CustomerDefaultArgs + product?: boolean | ProductDefaultArgs + }, ExtArgs["result"]["customerFavorite"]> + + export type CustomerFavoriteSelectCreateManyAndReturn = $Extensions.GetSelect<{ + customerId?: boolean + productId?: boolean + createdAt?: boolean + customer?: boolean | CustomerDefaultArgs + product?: boolean | ProductDefaultArgs + }, ExtArgs["result"]["customerFavorite"]> + + export type CustomerFavoriteSelectScalar = { + customerId?: boolean + productId?: boolean + createdAt?: boolean + } + + export type CustomerFavoriteInclude = { + customer?: boolean | CustomerDefaultArgs + product?: boolean | ProductDefaultArgs + } + export type CustomerFavoriteIncludeCreateManyAndReturn = { + customer?: boolean | CustomerDefaultArgs + product?: boolean | ProductDefaultArgs + } + + export type $CustomerFavoritePayload = { + name: "CustomerFavorite" + objects: { + customer: Prisma.$CustomerPayload + product: Prisma.$ProductPayload + } + scalars: $Extensions.GetPayloadResult<{ + customerId: string + productId: string + createdAt: Date + }, ExtArgs["result"]["customerFavorite"]> + composites: {} + } + + type CustomerFavoriteGetPayload = $Result.GetResult + + type CustomerFavoriteCountArgs = + Omit & { + select?: CustomerFavoriteCountAggregateInputType | true + } + + export interface CustomerFavoriteDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['CustomerFavorite'], meta: { name: 'CustomerFavorite' } } + /** + * Find zero or one CustomerFavorite that matches the filter. + * @param {CustomerFavoriteFindUniqueArgs} args - Arguments to find a CustomerFavorite + * @example + * // Get one CustomerFavorite + * const customerFavorite = await prisma.customerFavorite.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__CustomerFavoriteClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one CustomerFavorite that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {CustomerFavoriteFindUniqueOrThrowArgs} args - Arguments to find a CustomerFavorite + * @example + * // Get one CustomerFavorite + * const customerFavorite = await prisma.customerFavorite.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__CustomerFavoriteClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first CustomerFavorite that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CustomerFavoriteFindFirstArgs} args - Arguments to find a CustomerFavorite + * @example + * // Get one CustomerFavorite + * const customerFavorite = await prisma.customerFavorite.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__CustomerFavoriteClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first CustomerFavorite that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CustomerFavoriteFindFirstOrThrowArgs} args - Arguments to find a CustomerFavorite + * @example + * // Get one CustomerFavorite + * const customerFavorite = await prisma.customerFavorite.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__CustomerFavoriteClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more CustomerFavorites that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CustomerFavoriteFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all CustomerFavorites + * const customerFavorites = await prisma.customerFavorite.findMany() + * + * // Get first 10 CustomerFavorites + * const customerFavorites = await prisma.customerFavorite.findMany({ take: 10 }) + * + * // Only select the `customerId` + * const customerFavoriteWithCustomerIdOnly = await prisma.customerFavorite.findMany({ select: { customerId: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a CustomerFavorite. + * @param {CustomerFavoriteCreateArgs} args - Arguments to create a CustomerFavorite. + * @example + * // Create one CustomerFavorite + * const CustomerFavorite = await prisma.customerFavorite.create({ + * data: { + * // ... data to create a CustomerFavorite + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__CustomerFavoriteClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many CustomerFavorites. + * @param {CustomerFavoriteCreateManyArgs} args - Arguments to create many CustomerFavorites. + * @example + * // Create many CustomerFavorites + * const customerFavorite = await prisma.customerFavorite.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many CustomerFavorites and returns the data saved in the database. + * @param {CustomerFavoriteCreateManyAndReturnArgs} args - Arguments to create many CustomerFavorites. + * @example + * // Create many CustomerFavorites + * const customerFavorite = await prisma.customerFavorite.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many CustomerFavorites and only return the `customerId` + * const customerFavoriteWithCustomerIdOnly = await prisma.customerFavorite.createManyAndReturn({ + * select: { customerId: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> + + /** + * Delete a CustomerFavorite. + * @param {CustomerFavoriteDeleteArgs} args - Arguments to delete one CustomerFavorite. + * @example + * // Delete one CustomerFavorite + * const CustomerFavorite = await prisma.customerFavorite.delete({ + * where: { + * // ... filter to delete one CustomerFavorite + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__CustomerFavoriteClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one CustomerFavorite. + * @param {CustomerFavoriteUpdateArgs} args - Arguments to update one CustomerFavorite. + * @example + * // Update one CustomerFavorite + * const customerFavorite = await prisma.customerFavorite.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__CustomerFavoriteClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more CustomerFavorites. + * @param {CustomerFavoriteDeleteManyArgs} args - Arguments to filter CustomerFavorites to delete. + * @example + * // Delete a few CustomerFavorites + * const { count } = await prisma.customerFavorite.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more CustomerFavorites. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CustomerFavoriteUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many CustomerFavorites + * const customerFavorite = await prisma.customerFavorite.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one CustomerFavorite. + * @param {CustomerFavoriteUpsertArgs} args - Arguments to update or create a CustomerFavorite. + * @example + * // Update or create a CustomerFavorite + * const customerFavorite = await prisma.customerFavorite.upsert({ + * create: { + * // ... data to create a CustomerFavorite + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the CustomerFavorite we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__CustomerFavoriteClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of CustomerFavorites. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CustomerFavoriteCountArgs} args - Arguments to filter CustomerFavorites to count. + * @example + * // Count the number of CustomerFavorites + * const count = await prisma.customerFavorite.count({ + * where: { + * // ... the filter for the CustomerFavorites we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a CustomerFavorite. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CustomerFavoriteAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by CustomerFavorite. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CustomerFavoriteGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends CustomerFavoriteGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: CustomerFavoriteGroupByArgs['orderBy'] } + : { orderBy?: CustomerFavoriteGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetCustomerFavoriteGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the CustomerFavorite model + */ + readonly fields: CustomerFavoriteFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for CustomerFavorite. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__CustomerFavoriteClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + customer = {}>(args?: Subset>): Prisma__CustomerClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + product = {}>(args?: Subset>): Prisma__ProductClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the CustomerFavorite model + */ + interface CustomerFavoriteFieldRefs { + readonly customerId: FieldRef<"CustomerFavorite", 'String'> + readonly productId: FieldRef<"CustomerFavorite", 'String'> + readonly createdAt: FieldRef<"CustomerFavorite", 'DateTime'> + } + + + // Custom InputTypes + /** + * CustomerFavorite findUnique + */ + export type CustomerFavoriteFindUniqueArgs = { + /** + * Select specific fields to fetch from the CustomerFavorite + */ + select?: CustomerFavoriteSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerFavoriteInclude | null + /** + * Filter, which CustomerFavorite to fetch. + */ + where: CustomerFavoriteWhereUniqueInput + } + + /** + * CustomerFavorite findUniqueOrThrow + */ + export type CustomerFavoriteFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the CustomerFavorite + */ + select?: CustomerFavoriteSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerFavoriteInclude | null + /** + * Filter, which CustomerFavorite to fetch. + */ + where: CustomerFavoriteWhereUniqueInput + } + + /** + * CustomerFavorite findFirst + */ + export type CustomerFavoriteFindFirstArgs = { + /** + * Select specific fields to fetch from the CustomerFavorite + */ + select?: CustomerFavoriteSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerFavoriteInclude | null + /** + * Filter, which CustomerFavorite to fetch. + */ + where?: CustomerFavoriteWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of CustomerFavorites to fetch. + */ + orderBy?: CustomerFavoriteOrderByWithRelationInput | CustomerFavoriteOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for CustomerFavorites. + */ + cursor?: CustomerFavoriteWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` CustomerFavorites from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` CustomerFavorites. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of CustomerFavorites. + */ + distinct?: CustomerFavoriteScalarFieldEnum | CustomerFavoriteScalarFieldEnum[] + } + + /** + * CustomerFavorite findFirstOrThrow + */ + export type CustomerFavoriteFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the CustomerFavorite + */ + select?: CustomerFavoriteSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerFavoriteInclude | null + /** + * Filter, which CustomerFavorite to fetch. + */ + where?: CustomerFavoriteWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of CustomerFavorites to fetch. + */ + orderBy?: CustomerFavoriteOrderByWithRelationInput | CustomerFavoriteOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for CustomerFavorites. + */ + cursor?: CustomerFavoriteWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` CustomerFavorites from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` CustomerFavorites. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of CustomerFavorites. + */ + distinct?: CustomerFavoriteScalarFieldEnum | CustomerFavoriteScalarFieldEnum[] + } + + /** + * CustomerFavorite findMany + */ + export type CustomerFavoriteFindManyArgs = { + /** + * Select specific fields to fetch from the CustomerFavorite + */ + select?: CustomerFavoriteSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerFavoriteInclude | null + /** + * Filter, which CustomerFavorites to fetch. + */ + where?: CustomerFavoriteWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of CustomerFavorites to fetch. + */ + orderBy?: CustomerFavoriteOrderByWithRelationInput | CustomerFavoriteOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing CustomerFavorites. + */ + cursor?: CustomerFavoriteWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` CustomerFavorites from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` CustomerFavorites. + */ + skip?: number + distinct?: CustomerFavoriteScalarFieldEnum | CustomerFavoriteScalarFieldEnum[] + } + + /** + * CustomerFavorite create + */ + export type CustomerFavoriteCreateArgs = { + /** + * Select specific fields to fetch from the CustomerFavorite + */ + select?: CustomerFavoriteSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerFavoriteInclude | null + /** + * The data needed to create a CustomerFavorite. + */ + data: XOR + } + + /** + * CustomerFavorite createMany + */ + export type CustomerFavoriteCreateManyArgs = { + /** + * The data used to create many CustomerFavorites. + */ + data: CustomerFavoriteCreateManyInput | CustomerFavoriteCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * CustomerFavorite createManyAndReturn + */ + export type CustomerFavoriteCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the CustomerFavorite + */ + select?: CustomerFavoriteSelectCreateManyAndReturn | null + /** + * The data used to create many CustomerFavorites. + */ + data: CustomerFavoriteCreateManyInput | CustomerFavoriteCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerFavoriteIncludeCreateManyAndReturn | null + } + + /** + * CustomerFavorite update + */ + export type CustomerFavoriteUpdateArgs = { + /** + * Select specific fields to fetch from the CustomerFavorite + */ + select?: CustomerFavoriteSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerFavoriteInclude | null + /** + * The data needed to update a CustomerFavorite. + */ + data: XOR + /** + * Choose, which CustomerFavorite to update. + */ + where: CustomerFavoriteWhereUniqueInput + } + + /** + * CustomerFavorite updateMany + */ + export type CustomerFavoriteUpdateManyArgs = { + /** + * The data used to update CustomerFavorites. + */ + data: XOR + /** + * Filter which CustomerFavorites to update + */ + where?: CustomerFavoriteWhereInput + } + + /** + * CustomerFavorite upsert + */ + export type CustomerFavoriteUpsertArgs = { + /** + * Select specific fields to fetch from the CustomerFavorite + */ + select?: CustomerFavoriteSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerFavoriteInclude | null + /** + * The filter to search for the CustomerFavorite to update in case it exists. + */ + where: CustomerFavoriteWhereUniqueInput + /** + * In case the CustomerFavorite found by the `where` argument doesn't exist, create a new CustomerFavorite with this data. + */ + create: XOR + /** + * In case the CustomerFavorite was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * CustomerFavorite delete + */ + export type CustomerFavoriteDeleteArgs = { + /** + * Select specific fields to fetch from the CustomerFavorite + */ + select?: CustomerFavoriteSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerFavoriteInclude | null + /** + * Filter which CustomerFavorite to delete. + */ + where: CustomerFavoriteWhereUniqueInput + } + + /** + * CustomerFavorite deleteMany + */ + export type CustomerFavoriteDeleteManyArgs = { + /** + * Filter which CustomerFavorites to delete + */ + where?: CustomerFavoriteWhereInput + } + + /** + * CustomerFavorite without action + */ + export type CustomerFavoriteDefaultArgs = { + /** + * Select specific fields to fetch from the CustomerFavorite + */ + select?: CustomerFavoriteSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerFavoriteInclude | null + } + + /** * Model CustomerAddress */ @@ -15560,10 +21090,14 @@ export namespace Prisma { export type ProductAvgAggregateOutputType = { showType: number | null + accountingStockWeight: Decimal | null + accountingStockCount: Decimal | null } export type ProductSumAggregateOutputType = { showType: number | null + accountingStockWeight: Decimal | null + accountingStockCount: Decimal | null } export type ProductMinAggregateOutputType = { @@ -15576,6 +21110,9 @@ export namespace Prisma { showType: number | null isActive: boolean | null createdAt: Date | null + accountingStockWeight: Decimal | null + accountingStockCount: Decimal | null + accountingStockAt: Date | null } export type ProductMaxAggregateOutputType = { @@ -15588,6 +21125,9 @@ export namespace Prisma { showType: number | null isActive: boolean | null createdAt: Date | null + accountingStockWeight: Decimal | null + accountingStockCount: Decimal | null + accountingStockAt: Date | null } export type ProductCountAggregateOutputType = { @@ -15600,16 +21140,23 @@ export namespace Prisma { showType: number isActive: number createdAt: number + accountingStockWeight: number + accountingStockCount: number + accountingStockAt: number _all: number } export type ProductAvgAggregateInputType = { showType?: true + accountingStockWeight?: true + accountingStockCount?: true } export type ProductSumAggregateInputType = { showType?: true + accountingStockWeight?: true + accountingStockCount?: true } export type ProductMinAggregateInputType = { @@ -15622,6 +21169,9 @@ export namespace Prisma { showType?: true isActive?: true createdAt?: true + accountingStockWeight?: true + accountingStockCount?: true + accountingStockAt?: true } export type ProductMaxAggregateInputType = { @@ -15634,6 +21184,9 @@ export namespace Prisma { showType?: true isActive?: true createdAt?: true + accountingStockWeight?: true + accountingStockCount?: true + accountingStockAt?: true } export type ProductCountAggregateInputType = { @@ -15646,6 +21199,9 @@ export namespace Prisma { showType?: true isActive?: true createdAt?: true + accountingStockWeight?: true + accountingStockCount?: true + accountingStockAt?: true _all?: true } @@ -15745,6 +21301,9 @@ export namespace Prisma { showType: number isActive: boolean createdAt: Date + accountingStockWeight: Decimal | null + accountingStockCount: Decimal | null + accountingStockAt: Date | null _count: ProductCountAggregateOutputType | null _avg: ProductAvgAggregateOutputType | null _sum: ProductSumAggregateOutputType | null @@ -15776,6 +21335,9 @@ export namespace Prisma { showType?: boolean isActive?: boolean createdAt?: boolean + accountingStockWeight?: boolean + accountingStockCount?: boolean + accountingStockAt?: boolean category?: boolean | Product$categoryArgs brand?: boolean | Product$brandArgs variants?: boolean | Product$variantsArgs @@ -15784,6 +21346,7 @@ export namespace Prisma { comments?: boolean | Product$commentsArgs promotions?: boolean | Product$promotionsArgs allocationItems?: boolean | Product$allocationItemsArgs + favoritedBy?: boolean | Product$favoritedByArgs _count?: boolean | ProductCountOutputTypeDefaultArgs }, ExtArgs["result"]["product"]> @@ -15797,6 +21360,9 @@ export namespace Prisma { showType?: boolean isActive?: boolean createdAt?: boolean + accountingStockWeight?: boolean + accountingStockCount?: boolean + accountingStockAt?: boolean category?: boolean | Product$categoryArgs brand?: boolean | Product$brandArgs }, ExtArgs["result"]["product"]> @@ -15811,6 +21377,9 @@ export namespace Prisma { showType?: boolean isActive?: boolean createdAt?: boolean + accountingStockWeight?: boolean + accountingStockCount?: boolean + accountingStockAt?: boolean } export type ProductInclude = { @@ -15822,6 +21391,7 @@ export namespace Prisma { comments?: boolean | Product$commentsArgs promotions?: boolean | Product$promotionsArgs allocationItems?: boolean | Product$allocationItemsArgs + favoritedBy?: boolean | Product$favoritedByArgs _count?: boolean | ProductCountOutputTypeDefaultArgs } export type ProductIncludeCreateManyAndReturn = { @@ -15840,6 +21410,7 @@ export namespace Prisma { comments: Prisma.$CommentPayload[] promotions: Prisma.$PromotionPayload[] allocationItems: Prisma.$BranchAllocationItemPayload[] + favoritedBy: Prisma.$CustomerFavoritePayload[] } scalars: $Extensions.GetPayloadResult<{ id: string @@ -15857,6 +21428,15 @@ export namespace Prisma { showType: number isActive: boolean createdAt: Date + /** + * Stock of the linked کارساخته as last read from the accounting software + * (D27). Weight for gram-type items, count for count-type ones — whichever + * the software reports. At zero or below the product is unavailable in the + * app (pre-order variants excepted). Null = not linked or never synced. + */ + accountingStockWeight: Prisma.Decimal | null + accountingStockCount: Prisma.Decimal | null + accountingStockAt: Date | null }, ExtArgs["result"]["product"]> composites: {} } @@ -16229,6 +21809,7 @@ export namespace Prisma { comments = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> promotions = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> allocationItems = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + favoritedBy = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. @@ -16267,6 +21848,9 @@ export namespace Prisma { readonly showType: FieldRef<"Product", 'Int'> readonly isActive: FieldRef<"Product", 'Boolean'> readonly createdAt: FieldRef<"Product", 'DateTime'> + readonly accountingStockWeight: FieldRef<"Product", 'Decimal'> + readonly accountingStockCount: FieldRef<"Product", 'Decimal'> + readonly accountingStockAt: FieldRef<"Product", 'DateTime'> } @@ -16734,6 +22318,26 @@ export namespace Prisma { distinct?: BranchAllocationItemScalarFieldEnum | BranchAllocationItemScalarFieldEnum[] } + /** + * Product.favoritedBy + */ + export type Product$favoritedByArgs = { + /** + * Select specific fields to fetch from the CustomerFavorite + */ + select?: CustomerFavoriteSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerFavoriteInclude | null + where?: CustomerFavoriteWhereInput + orderBy?: CustomerFavoriteOrderByWithRelationInput | CustomerFavoriteOrderByWithRelationInput[] + cursor?: CustomerFavoriteWhereUniqueInput + take?: number + skip?: number + distinct?: CustomerFavoriteScalarFieldEnum | CustomerFavoriteScalarFieldEnum[] + } + /** * Product without action */ @@ -16948,6 +22552,8 @@ export namespace Prisma { sortOrder?: boolean role?: boolean product?: boolean | ProductDefaultArgs + variants?: boolean | ProductImage$variantsArgs + _count?: boolean | ProductImageCountOutputTypeDefaultArgs }, ExtArgs["result"]["productImage"]> export type ProductImageSelectCreateManyAndReturn = $Extensions.GetSelect<{ @@ -16969,6 +22575,8 @@ export namespace Prisma { export type ProductImageInclude = { product?: boolean | ProductDefaultArgs + variants?: boolean | ProductImage$variantsArgs + _count?: boolean | ProductImageCountOutputTypeDefaultArgs } export type ProductImageIncludeCreateManyAndReturn = { product?: boolean | ProductDefaultArgs @@ -16978,6 +22586,12 @@ export namespace Prisma { name: "ProductImage" objects: { product: Prisma.$ProductPayload + /** + * Variants that display this image. A gallery image may back several + * variants (one photo, several weights), which is why this is a plain + * one-to-many and not a join table. + */ + variants: Prisma.$ProductVariantPayload[] } scalars: $Extensions.GetPayloadResult<{ id: string @@ -17355,6 +22969,7 @@ export namespace Prisma { export interface Prisma__ProductImageClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" product = {}>(args?: Subset>): Prisma__ProductClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + variants = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. @@ -17706,6 +23321,26 @@ export namespace Prisma { where?: ProductImageWhereInput } + /** + * ProductImage.variants + */ + export type ProductImage$variantsArgs = { + /** + * Select specific fields to fetch from the ProductVariant + */ + select?: ProductVariantSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductVariantInclude | null + where?: ProductVariantWhereInput + orderBy?: ProductVariantOrderByWithRelationInput | ProductVariantOrderByWithRelationInput[] + cursor?: ProductVariantWhereUniqueInput + take?: number + skip?: number + distinct?: ProductVariantScalarFieldEnum | ProductVariantScalarFieldEnum[] + } + /** * ProductImage without action */ @@ -17755,6 +23390,7 @@ export namespace Prisma { qty: number | null isPreOrder: boolean | null isActive: boolean | null + imageId: string | null } export type ProductVariantMaxAggregateOutputType = { @@ -17767,6 +23403,7 @@ export namespace Prisma { qty: number | null isPreOrder: boolean | null isActive: boolean | null + imageId: string | null } export type ProductVariantCountAggregateOutputType = { @@ -17779,6 +23416,7 @@ export namespace Prisma { qty: number isPreOrder: number isActive: number + imageId: number _all: number } @@ -17805,6 +23443,7 @@ export namespace Prisma { qty?: true isPreOrder?: true isActive?: true + imageId?: true } export type ProductVariantMaxAggregateInputType = { @@ -17817,6 +23456,7 @@ export namespace Prisma { qty?: true isPreOrder?: true isActive?: true + imageId?: true } export type ProductVariantCountAggregateInputType = { @@ -17829,6 +23469,7 @@ export namespace Prisma { qty?: true isPreOrder?: true isActive?: true + imageId?: true _all?: true } @@ -17928,6 +23569,7 @@ export namespace Prisma { qty: number isPreOrder: boolean isActive: boolean + imageId: string | null _count: ProductVariantCountAggregateOutputType | null _avg: ProductVariantAvgAggregateOutputType | null _sum: ProductVariantSumAggregateOutputType | null @@ -17959,7 +23601,9 @@ export namespace Prisma { qty?: boolean isPreOrder?: boolean isActive?: boolean + imageId?: boolean product?: boolean | ProductDefaultArgs + image?: boolean | ProductVariant$imageArgs orderItems?: boolean | ProductVariant$orderItemsArgs _count?: boolean | ProductVariantCountOutputTypeDefaultArgs }, ExtArgs["result"]["productVariant"]> @@ -17974,7 +23618,9 @@ export namespace Prisma { qty?: boolean isPreOrder?: boolean isActive?: boolean + imageId?: boolean product?: boolean | ProductDefaultArgs + image?: boolean | ProductVariant$imageArgs }, ExtArgs["result"]["productVariant"]> export type ProductVariantSelectScalar = { @@ -17987,21 +23633,25 @@ export namespace Prisma { qty?: boolean isPreOrder?: boolean isActive?: boolean + imageId?: boolean } export type ProductVariantInclude = { product?: boolean | ProductDefaultArgs + image?: boolean | ProductVariant$imageArgs orderItems?: boolean | ProductVariant$orderItemsArgs _count?: boolean | ProductVariantCountOutputTypeDefaultArgs } export type ProductVariantIncludeCreateManyAndReturn = { product?: boolean | ProductDefaultArgs + image?: boolean | ProductVariant$imageArgs } export type $ProductVariantPayload = { name: "ProductVariant" objects: { product: Prisma.$ProductPayload + image: Prisma.$ProductImagePayload | null orderItems: Prisma.$OrderItemPayload[] } scalars: $Extensions.GetPayloadResult<{ @@ -18028,6 +23678,13 @@ export namespace Prisma { */ isPreOrder: boolean isActive: boolean + /** + * The gallery image shown for this variant, picked from its own product's + * images — never a re-uploaded copy. onDelete: SetNull because dropping an + * image must never cascade into the variant: OrderItem rows reference + * variants, so losing one would break order history. + */ + imageId: string | null }, ExtArgs["result"]["productVariant"]> composites: {} } @@ -18393,6 +24050,7 @@ export namespace Prisma { export interface Prisma__ProductVariantClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" product = {}>(args?: Subset>): Prisma__ProductClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + image = {}>(args?: Subset>): Prisma__ProductImageClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> orderItems = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> /** * Attaches callbacks for the resolution and/or rejection of the Promise. @@ -18432,6 +24090,7 @@ export namespace Prisma { readonly qty: FieldRef<"ProductVariant", 'Int'> readonly isPreOrder: FieldRef<"ProductVariant", 'Boolean'> readonly isActive: FieldRef<"ProductVariant", 'Boolean'> + readonly imageId: FieldRef<"ProductVariant", 'String'> } @@ -18749,6 +24408,21 @@ export namespace Prisma { where?: ProductVariantWhereInput } + /** + * ProductVariant.image + */ + export type ProductVariant$imageArgs = { + /** + * Select specific fields to fetch from the ProductImage + */ + select?: ProductImageSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: ProductImageInclude | null + where?: ProductImageWhereInput + } + /** * ProductVariant.orderItems */ @@ -18820,6 +24494,8 @@ export namespace Prisma { flatRialCharge: Decimal | null isSuspendedOverCreditLimit: boolean | null deliveredAt: Date | null + salesAgentId: string | null + referrerCustomerId: string | null createdAt: Date | null updatedAt: Date | null } @@ -18836,6 +24512,8 @@ export namespace Prisma { flatRialCharge: Decimal | null isSuspendedOverCreditLimit: boolean | null deliveredAt: Date | null + salesAgentId: string | null + referrerCustomerId: string | null createdAt: Date | null updatedAt: Date | null } @@ -18852,6 +24530,8 @@ export namespace Prisma { flatRialCharge: number isSuspendedOverCreditLimit: number deliveredAt: number + salesAgentId: number + referrerCustomerId: number createdAt: number updatedAt: number _all: number @@ -18882,6 +24562,8 @@ export namespace Prisma { flatRialCharge?: true isSuspendedOverCreditLimit?: true deliveredAt?: true + salesAgentId?: true + referrerCustomerId?: true createdAt?: true updatedAt?: true } @@ -18898,6 +24580,8 @@ export namespace Prisma { flatRialCharge?: true isSuspendedOverCreditLimit?: true deliveredAt?: true + salesAgentId?: true + referrerCustomerId?: true createdAt?: true updatedAt?: true } @@ -18914,6 +24598,8 @@ export namespace Prisma { flatRialCharge?: true isSuspendedOverCreditLimit?: true deliveredAt?: true + salesAgentId?: true + referrerCustomerId?: true createdAt?: true updatedAt?: true _all?: true @@ -19017,6 +24703,8 @@ export namespace Prisma { flatRialCharge: Decimal isSuspendedOverCreditLimit: boolean deliveredAt: Date | null + salesAgentId: string | null + referrerCustomerId: string | null createdAt: Date updatedAt: Date _count: OrderCountAggregateOutputType | null @@ -19052,10 +24740,14 @@ export namespace Prisma { flatRialCharge?: boolean isSuspendedOverCreditLimit?: boolean deliveredAt?: boolean + salesAgentId?: boolean + referrerCustomerId?: boolean createdAt?: boolean updatedAt?: boolean customer?: boolean | CustomerDefaultArgs branch?: boolean | Order$branchArgs + salesAgent?: boolean | Order$salesAgentArgs + referrerCustomer?: boolean | Order$referrerCustomerArgs items?: boolean | Order$itemsArgs statusEvents?: boolean | Order$statusEventsArgs ledgerEntries?: boolean | Order$ledgerEntriesArgs @@ -19075,10 +24767,14 @@ export namespace Prisma { flatRialCharge?: boolean isSuspendedOverCreditLimit?: boolean deliveredAt?: boolean + salesAgentId?: boolean + referrerCustomerId?: boolean createdAt?: boolean updatedAt?: boolean customer?: boolean | CustomerDefaultArgs branch?: boolean | Order$branchArgs + salesAgent?: boolean | Order$salesAgentArgs + referrerCustomer?: boolean | Order$referrerCustomerArgs }, ExtArgs["result"]["order"]> export type OrderSelectScalar = { @@ -19093,6 +24789,8 @@ export namespace Prisma { flatRialCharge?: boolean isSuspendedOverCreditLimit?: boolean deliveredAt?: boolean + salesAgentId?: boolean + referrerCustomerId?: boolean createdAt?: boolean updatedAt?: boolean } @@ -19100,6 +24798,8 @@ export namespace Prisma { export type OrderInclude = { customer?: boolean | CustomerDefaultArgs branch?: boolean | Order$branchArgs + salesAgent?: boolean | Order$salesAgentArgs + referrerCustomer?: boolean | Order$referrerCustomerArgs items?: boolean | Order$itemsArgs statusEvents?: boolean | Order$statusEventsArgs ledgerEntries?: boolean | Order$ledgerEntriesArgs @@ -19109,6 +24809,8 @@ export namespace Prisma { export type OrderIncludeCreateManyAndReturn = { customer?: boolean | CustomerDefaultArgs branch?: boolean | Order$branchArgs + salesAgent?: boolean | Order$salesAgentArgs + referrerCustomer?: boolean | Order$referrerCustomerArgs } export type $OrderPayload = { @@ -19116,6 +24818,8 @@ export namespace Prisma { objects: { customer: Prisma.$CustomerPayload branch: Prisma.$BranchPayload | null + salesAgent: Prisma.$AdminUserPayload | null + referrerCustomer: Prisma.$CustomerPayload | null items: Prisma.$OrderItemPayload[] statusEvents: Prisma.$OrderStatusEventPayload[] ledgerEntries: Prisma.$LedgerEntryPayload[] @@ -19145,6 +24849,22 @@ export namespace Prisma { flatRialCharge: Prisma.Decimal isSuspendedOverCreditLimit: boolean deliveredAt: Date | null + /** + * The sales expert this order is credited to, fixed when it is placed: + * the customer's referring expert AT THAT MOMENT. Legacy `orders.reagent_id`, + * set once at creation (ApiMobileController.php:601) and never moved, so a + * customer changing expert later does not move past sales or commission + * (owner ruling 2026-10-08). «میزان فروش» counts from here, never from the + * customer's current referrer. + */ + salesAgentId: string | null + /** + * History only: a legacy order whose `reagent_id` named a customer who is + * not a sales expert (one such customer, 17 orders in 2022). Legacy counted + * those orders in that customer's own «میزان فروش»; this keeps that figure + * exact. Never set for a new order. + */ + referrerCustomerId: string | null createdAt: Date updatedAt: Date }, ExtArgs["result"]["order"]> @@ -19513,6 +25233,8 @@ export namespace Prisma { readonly [Symbol.toStringTag]: "PrismaPromise" customer = {}>(args?: Subset>): Prisma__CustomerClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> branch = {}>(args?: Subset>): Prisma__BranchClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> + salesAgent = {}>(args?: Subset>): Prisma__AdminUserClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> + referrerCustomer = {}>(args?: Subset>): Prisma__CustomerClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> items = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> statusEvents = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> ledgerEntries = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> @@ -19557,6 +25279,8 @@ export namespace Prisma { readonly flatRialCharge: FieldRef<"Order", 'Decimal'> readonly isSuspendedOverCreditLimit: FieldRef<"Order", 'Boolean'> readonly deliveredAt: FieldRef<"Order", 'DateTime'> + readonly salesAgentId: FieldRef<"Order", 'String'> + readonly referrerCustomerId: FieldRef<"Order", 'String'> readonly createdAt: FieldRef<"Order", 'DateTime'> readonly updatedAt: FieldRef<"Order", 'DateTime'> } @@ -19891,6 +25615,36 @@ export namespace Prisma { where?: BranchWhereInput } + /** + * Order.salesAgent + */ + export type Order$salesAgentArgs = { + /** + * Select specific fields to fetch from the AdminUser + */ + select?: AdminUserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminUserInclude | null + where?: AdminUserWhereInput + } + + /** + * Order.referrerCustomer + */ + export type Order$referrerCustomerArgs = { + /** + * Select specific fields to fetch from the Customer + */ + select?: CustomerSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerInclude | null + where?: CustomerWhereInput + } + /** * Order.items */ @@ -31143,6 +36897,2928 @@ export namespace Prisma { } + /** + * Model AccountingLink + */ + + export type AggregateAccountingLink = { + _count: AccountingLinkCountAggregateOutputType | null + _min: AccountingLinkMinAggregateOutputType | null + _max: AccountingLinkMaxAggregateOutputType | null + } + + export type AccountingLinkMinAggregateOutputType = { + id: string | null + provider: string | null + entityType: $Enums.AccountingEntityType | null + entityId: string | null + externalCode: string | null + externalName: string | null + origin: string | null + syncedAt: Date | null + createdAt: Date | null + } + + export type AccountingLinkMaxAggregateOutputType = { + id: string | null + provider: string | null + entityType: $Enums.AccountingEntityType | null + entityId: string | null + externalCode: string | null + externalName: string | null + origin: string | null + syncedAt: Date | null + createdAt: Date | null + } + + export type AccountingLinkCountAggregateOutputType = { + id: number + provider: number + entityType: number + entityId: number + externalCode: number + externalName: number + origin: number + snapshot: number + syncedAt: number + createdAt: number + _all: number + } + + + export type AccountingLinkMinAggregateInputType = { + id?: true + provider?: true + entityType?: true + entityId?: true + externalCode?: true + externalName?: true + origin?: true + syncedAt?: true + createdAt?: true + } + + export type AccountingLinkMaxAggregateInputType = { + id?: true + provider?: true + entityType?: true + entityId?: true + externalCode?: true + externalName?: true + origin?: true + syncedAt?: true + createdAt?: true + } + + export type AccountingLinkCountAggregateInputType = { + id?: true + provider?: true + entityType?: true + entityId?: true + externalCode?: true + externalName?: true + origin?: true + snapshot?: true + syncedAt?: true + createdAt?: true + _all?: true + } + + export type AccountingLinkAggregateArgs = { + /** + * Filter which AccountingLink to aggregate. + */ + where?: AccountingLinkWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AccountingLinks to fetch. + */ + orderBy?: AccountingLinkOrderByWithRelationInput | AccountingLinkOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: AccountingLinkWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AccountingLinks from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` AccountingLinks. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned AccountingLinks + **/ + _count?: true | AccountingLinkCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: AccountingLinkMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: AccountingLinkMaxAggregateInputType + } + + export type GetAccountingLinkAggregateType = { + [P in keyof T & keyof AggregateAccountingLink]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type AccountingLinkGroupByArgs = { + where?: AccountingLinkWhereInput + orderBy?: AccountingLinkOrderByWithAggregationInput | AccountingLinkOrderByWithAggregationInput[] + by: AccountingLinkScalarFieldEnum[] | AccountingLinkScalarFieldEnum + having?: AccountingLinkScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: AccountingLinkCountAggregateInputType | true + _min?: AccountingLinkMinAggregateInputType + _max?: AccountingLinkMaxAggregateInputType + } + + export type AccountingLinkGroupByOutputType = { + id: string + provider: string + entityType: $Enums.AccountingEntityType + entityId: string + externalCode: string + externalName: string | null + origin: string + snapshot: JsonValue | null + syncedAt: Date + createdAt: Date + _count: AccountingLinkCountAggregateOutputType | null + _min: AccountingLinkMinAggregateOutputType | null + _max: AccountingLinkMaxAggregateOutputType | null + } + + type GetAccountingLinkGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof AccountingLinkGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type AccountingLinkSelect = $Extensions.GetSelect<{ + id?: boolean + provider?: boolean + entityType?: boolean + entityId?: boolean + externalCode?: boolean + externalName?: boolean + origin?: boolean + snapshot?: boolean + syncedAt?: boolean + createdAt?: boolean + }, ExtArgs["result"]["accountingLink"]> + + export type AccountingLinkSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + provider?: boolean + entityType?: boolean + entityId?: boolean + externalCode?: boolean + externalName?: boolean + origin?: boolean + snapshot?: boolean + syncedAt?: boolean + createdAt?: boolean + }, ExtArgs["result"]["accountingLink"]> + + export type AccountingLinkSelectScalar = { + id?: boolean + provider?: boolean + entityType?: boolean + entityId?: boolean + externalCode?: boolean + externalName?: boolean + origin?: boolean + snapshot?: boolean + syncedAt?: boolean + createdAt?: boolean + } + + + export type $AccountingLinkPayload = { + name: "AccountingLink" + objects: {} + scalars: $Extensions.GetPayloadResult<{ + id: string + provider: string + entityType: $Enums.AccountingEntityType + entityId: string + /** + * The record's code in the accounting software (Tahesab Moshtari_Code / + * Zarrin idHesab; for products the Zarrin idKar or the Tahesab Name_Kar). + */ + externalCode: string + externalName: string | null + /** + * How the link came to be: LINKED (matched by mobile/name), IMPORTED (app + * row created from the accounting record), PUSHED (accounting record created + * from the app row) or MANUAL (an admin typed the code). + */ + origin: string + /** + * The record as last read, for display only. + */ + snapshot: Prisma.JsonValue | null + syncedAt: Date + createdAt: Date + }, ExtArgs["result"]["accountingLink"]> + composites: {} + } + + type AccountingLinkGetPayload = $Result.GetResult + + type AccountingLinkCountArgs = + Omit & { + select?: AccountingLinkCountAggregateInputType | true + } + + export interface AccountingLinkDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['AccountingLink'], meta: { name: 'AccountingLink' } } + /** + * Find zero or one AccountingLink that matches the filter. + * @param {AccountingLinkFindUniqueArgs} args - Arguments to find a AccountingLink + * @example + * // Get one AccountingLink + * const accountingLink = await prisma.accountingLink.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__AccountingLinkClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one AccountingLink that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {AccountingLinkFindUniqueOrThrowArgs} args - Arguments to find a AccountingLink + * @example + * // Get one AccountingLink + * const accountingLink = await prisma.accountingLink.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__AccountingLinkClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first AccountingLink that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AccountingLinkFindFirstArgs} args - Arguments to find a AccountingLink + * @example + * // Get one AccountingLink + * const accountingLink = await prisma.accountingLink.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__AccountingLinkClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first AccountingLink that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AccountingLinkFindFirstOrThrowArgs} args - Arguments to find a AccountingLink + * @example + * // Get one AccountingLink + * const accountingLink = await prisma.accountingLink.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__AccountingLinkClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more AccountingLinks that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AccountingLinkFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all AccountingLinks + * const accountingLinks = await prisma.accountingLink.findMany() + * + * // Get first 10 AccountingLinks + * const accountingLinks = await prisma.accountingLink.findMany({ take: 10 }) + * + * // Only select the `id` + * const accountingLinkWithIdOnly = await prisma.accountingLink.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a AccountingLink. + * @param {AccountingLinkCreateArgs} args - Arguments to create a AccountingLink. + * @example + * // Create one AccountingLink + * const AccountingLink = await prisma.accountingLink.create({ + * data: { + * // ... data to create a AccountingLink + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__AccountingLinkClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many AccountingLinks. + * @param {AccountingLinkCreateManyArgs} args - Arguments to create many AccountingLinks. + * @example + * // Create many AccountingLinks + * const accountingLink = await prisma.accountingLink.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many AccountingLinks and returns the data saved in the database. + * @param {AccountingLinkCreateManyAndReturnArgs} args - Arguments to create many AccountingLinks. + * @example + * // Create many AccountingLinks + * const accountingLink = await prisma.accountingLink.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many AccountingLinks and only return the `id` + * const accountingLinkWithIdOnly = await prisma.accountingLink.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> + + /** + * Delete a AccountingLink. + * @param {AccountingLinkDeleteArgs} args - Arguments to delete one AccountingLink. + * @example + * // Delete one AccountingLink + * const AccountingLink = await prisma.accountingLink.delete({ + * where: { + * // ... filter to delete one AccountingLink + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__AccountingLinkClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one AccountingLink. + * @param {AccountingLinkUpdateArgs} args - Arguments to update one AccountingLink. + * @example + * // Update one AccountingLink + * const accountingLink = await prisma.accountingLink.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__AccountingLinkClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more AccountingLinks. + * @param {AccountingLinkDeleteManyArgs} args - Arguments to filter AccountingLinks to delete. + * @example + * // Delete a few AccountingLinks + * const { count } = await prisma.accountingLink.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more AccountingLinks. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AccountingLinkUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many AccountingLinks + * const accountingLink = await prisma.accountingLink.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one AccountingLink. + * @param {AccountingLinkUpsertArgs} args - Arguments to update or create a AccountingLink. + * @example + * // Update or create a AccountingLink + * const accountingLink = await prisma.accountingLink.upsert({ + * create: { + * // ... data to create a AccountingLink + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the AccountingLink we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__AccountingLinkClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of AccountingLinks. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AccountingLinkCountArgs} args - Arguments to filter AccountingLinks to count. + * @example + * // Count the number of AccountingLinks + * const count = await prisma.accountingLink.count({ + * where: { + * // ... the filter for the AccountingLinks we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a AccountingLink. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AccountingLinkAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by AccountingLink. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AccountingLinkGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends AccountingLinkGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: AccountingLinkGroupByArgs['orderBy'] } + : { orderBy?: AccountingLinkGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetAccountingLinkGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the AccountingLink model + */ + readonly fields: AccountingLinkFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for AccountingLink. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__AccountingLinkClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the AccountingLink model + */ + interface AccountingLinkFieldRefs { + readonly id: FieldRef<"AccountingLink", 'String'> + readonly provider: FieldRef<"AccountingLink", 'String'> + readonly entityType: FieldRef<"AccountingLink", 'AccountingEntityType'> + readonly entityId: FieldRef<"AccountingLink", 'String'> + readonly externalCode: FieldRef<"AccountingLink", 'String'> + readonly externalName: FieldRef<"AccountingLink", 'String'> + readonly origin: FieldRef<"AccountingLink", 'String'> + readonly snapshot: FieldRef<"AccountingLink", 'Json'> + readonly syncedAt: FieldRef<"AccountingLink", 'DateTime'> + readonly createdAt: FieldRef<"AccountingLink", 'DateTime'> + } + + + // Custom InputTypes + /** + * AccountingLink findUnique + */ + export type AccountingLinkFindUniqueArgs = { + /** + * Select specific fields to fetch from the AccountingLink + */ + select?: AccountingLinkSelect | null + /** + * Filter, which AccountingLink to fetch. + */ + where: AccountingLinkWhereUniqueInput + } + + /** + * AccountingLink findUniqueOrThrow + */ + export type AccountingLinkFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the AccountingLink + */ + select?: AccountingLinkSelect | null + /** + * Filter, which AccountingLink to fetch. + */ + where: AccountingLinkWhereUniqueInput + } + + /** + * AccountingLink findFirst + */ + export type AccountingLinkFindFirstArgs = { + /** + * Select specific fields to fetch from the AccountingLink + */ + select?: AccountingLinkSelect | null + /** + * Filter, which AccountingLink to fetch. + */ + where?: AccountingLinkWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AccountingLinks to fetch. + */ + orderBy?: AccountingLinkOrderByWithRelationInput | AccountingLinkOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for AccountingLinks. + */ + cursor?: AccountingLinkWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AccountingLinks from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` AccountingLinks. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of AccountingLinks. + */ + distinct?: AccountingLinkScalarFieldEnum | AccountingLinkScalarFieldEnum[] + } + + /** + * AccountingLink findFirstOrThrow + */ + export type AccountingLinkFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the AccountingLink + */ + select?: AccountingLinkSelect | null + /** + * Filter, which AccountingLink to fetch. + */ + where?: AccountingLinkWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AccountingLinks to fetch. + */ + orderBy?: AccountingLinkOrderByWithRelationInput | AccountingLinkOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for AccountingLinks. + */ + cursor?: AccountingLinkWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AccountingLinks from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` AccountingLinks. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of AccountingLinks. + */ + distinct?: AccountingLinkScalarFieldEnum | AccountingLinkScalarFieldEnum[] + } + + /** + * AccountingLink findMany + */ + export type AccountingLinkFindManyArgs = { + /** + * Select specific fields to fetch from the AccountingLink + */ + select?: AccountingLinkSelect | null + /** + * Filter, which AccountingLinks to fetch. + */ + where?: AccountingLinkWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AccountingLinks to fetch. + */ + orderBy?: AccountingLinkOrderByWithRelationInput | AccountingLinkOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing AccountingLinks. + */ + cursor?: AccountingLinkWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AccountingLinks from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` AccountingLinks. + */ + skip?: number + distinct?: AccountingLinkScalarFieldEnum | AccountingLinkScalarFieldEnum[] + } + + /** + * AccountingLink create + */ + export type AccountingLinkCreateArgs = { + /** + * Select specific fields to fetch from the AccountingLink + */ + select?: AccountingLinkSelect | null + /** + * The data needed to create a AccountingLink. + */ + data: XOR + } + + /** + * AccountingLink createMany + */ + export type AccountingLinkCreateManyArgs = { + /** + * The data used to create many AccountingLinks. + */ + data: AccountingLinkCreateManyInput | AccountingLinkCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * AccountingLink createManyAndReturn + */ + export type AccountingLinkCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the AccountingLink + */ + select?: AccountingLinkSelectCreateManyAndReturn | null + /** + * The data used to create many AccountingLinks. + */ + data: AccountingLinkCreateManyInput | AccountingLinkCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * AccountingLink update + */ + export type AccountingLinkUpdateArgs = { + /** + * Select specific fields to fetch from the AccountingLink + */ + select?: AccountingLinkSelect | null + /** + * The data needed to update a AccountingLink. + */ + data: XOR + /** + * Choose, which AccountingLink to update. + */ + where: AccountingLinkWhereUniqueInput + } + + /** + * AccountingLink updateMany + */ + export type AccountingLinkUpdateManyArgs = { + /** + * The data used to update AccountingLinks. + */ + data: XOR + /** + * Filter which AccountingLinks to update + */ + where?: AccountingLinkWhereInput + } + + /** + * AccountingLink upsert + */ + export type AccountingLinkUpsertArgs = { + /** + * Select specific fields to fetch from the AccountingLink + */ + select?: AccountingLinkSelect | null + /** + * The filter to search for the AccountingLink to update in case it exists. + */ + where: AccountingLinkWhereUniqueInput + /** + * In case the AccountingLink found by the `where` argument doesn't exist, create a new AccountingLink with this data. + */ + create: XOR + /** + * In case the AccountingLink was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * AccountingLink delete + */ + export type AccountingLinkDeleteArgs = { + /** + * Select specific fields to fetch from the AccountingLink + */ + select?: AccountingLinkSelect | null + /** + * Filter which AccountingLink to delete. + */ + where: AccountingLinkWhereUniqueInput + } + + /** + * AccountingLink deleteMany + */ + export type AccountingLinkDeleteManyArgs = { + /** + * Filter which AccountingLinks to delete + */ + where?: AccountingLinkWhereInput + } + + /** + * AccountingLink without action + */ + export type AccountingLinkDefaultArgs = { + /** + * Select specific fields to fetch from the AccountingLink + */ + select?: AccountingLinkSelect | null + } + + + /** + * Model AccountingOutbox + */ + + export type AggregateAccountingOutbox = { + _count: AccountingOutboxCountAggregateOutputType | null + _avg: AccountingOutboxAvgAggregateOutputType | null + _sum: AccountingOutboxSumAggregateOutputType | null + _min: AccountingOutboxMinAggregateOutputType | null + _max: AccountingOutboxMaxAggregateOutputType | null + } + + export type AccountingOutboxAvgAggregateOutputType = { + attempts: number | null + } + + export type AccountingOutboxSumAggregateOutputType = { + attempts: number | null + } + + export type AccountingOutboxMinAggregateOutputType = { + id: string | null + provider: string | null + kind: $Enums.AccountingOutboxKind | null + entityId: string | null + status: $Enums.AccountingOutboxStatus | null + attempts: number | null + nextAttemptAt: Date | null + lastError: string | null + externalRef: string | null + sentAt: Date | null + resolvedById: string | null + createdAt: Date | null + updatedAt: Date | null + } + + export type AccountingOutboxMaxAggregateOutputType = { + id: string | null + provider: string | null + kind: $Enums.AccountingOutboxKind | null + entityId: string | null + status: $Enums.AccountingOutboxStatus | null + attempts: number | null + nextAttemptAt: Date | null + lastError: string | null + externalRef: string | null + sentAt: Date | null + resolvedById: string | null + createdAt: Date | null + updatedAt: Date | null + } + + export type AccountingOutboxCountAggregateOutputType = { + id: number + provider: number + kind: number + entityId: number + status: number + attempts: number + nextAttemptAt: number + lastError: number + externalRef: number + progress: number + lastRequest: number + lastResponse: number + sentAt: number + resolvedById: number + createdAt: number + updatedAt: number + _all: number + } + + + export type AccountingOutboxAvgAggregateInputType = { + attempts?: true + } + + export type AccountingOutboxSumAggregateInputType = { + attempts?: true + } + + export type AccountingOutboxMinAggregateInputType = { + id?: true + provider?: true + kind?: true + entityId?: true + status?: true + attempts?: true + nextAttemptAt?: true + lastError?: true + externalRef?: true + sentAt?: true + resolvedById?: true + createdAt?: true + updatedAt?: true + } + + export type AccountingOutboxMaxAggregateInputType = { + id?: true + provider?: true + kind?: true + entityId?: true + status?: true + attempts?: true + nextAttemptAt?: true + lastError?: true + externalRef?: true + sentAt?: true + resolvedById?: true + createdAt?: true + updatedAt?: true + } + + export type AccountingOutboxCountAggregateInputType = { + id?: true + provider?: true + kind?: true + entityId?: true + status?: true + attempts?: true + nextAttemptAt?: true + lastError?: true + externalRef?: true + progress?: true + lastRequest?: true + lastResponse?: true + sentAt?: true + resolvedById?: true + createdAt?: true + updatedAt?: true + _all?: true + } + + export type AccountingOutboxAggregateArgs = { + /** + * Filter which AccountingOutbox to aggregate. + */ + where?: AccountingOutboxWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AccountingOutboxes to fetch. + */ + orderBy?: AccountingOutboxOrderByWithRelationInput | AccountingOutboxOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: AccountingOutboxWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AccountingOutboxes from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` AccountingOutboxes. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned AccountingOutboxes + **/ + _count?: true | AccountingOutboxCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: AccountingOutboxAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: AccountingOutboxSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: AccountingOutboxMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: AccountingOutboxMaxAggregateInputType + } + + export type GetAccountingOutboxAggregateType = { + [P in keyof T & keyof AggregateAccountingOutbox]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type AccountingOutboxGroupByArgs = { + where?: AccountingOutboxWhereInput + orderBy?: AccountingOutboxOrderByWithAggregationInput | AccountingOutboxOrderByWithAggregationInput[] + by: AccountingOutboxScalarFieldEnum[] | AccountingOutboxScalarFieldEnum + having?: AccountingOutboxScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: AccountingOutboxCountAggregateInputType | true + _avg?: AccountingOutboxAvgAggregateInputType + _sum?: AccountingOutboxSumAggregateInputType + _min?: AccountingOutboxMinAggregateInputType + _max?: AccountingOutboxMaxAggregateInputType + } + + export type AccountingOutboxGroupByOutputType = { + id: string + provider: string + kind: $Enums.AccountingOutboxKind + entityId: string + status: $Enums.AccountingOutboxStatus + attempts: number + nextAttemptAt: Date + lastError: string | null + externalRef: string | null + progress: JsonValue | null + lastRequest: JsonValue | null + lastResponse: JsonValue | null + sentAt: Date | null + resolvedById: string | null + createdAt: Date + updatedAt: Date + _count: AccountingOutboxCountAggregateOutputType | null + _avg: AccountingOutboxAvgAggregateOutputType | null + _sum: AccountingOutboxSumAggregateOutputType | null + _min: AccountingOutboxMinAggregateOutputType | null + _max: AccountingOutboxMaxAggregateOutputType | null + } + + type GetAccountingOutboxGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof AccountingOutboxGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type AccountingOutboxSelect = $Extensions.GetSelect<{ + id?: boolean + provider?: boolean + kind?: boolean + entityId?: boolean + status?: boolean + attempts?: boolean + nextAttemptAt?: boolean + lastError?: boolean + externalRef?: boolean + progress?: boolean + lastRequest?: boolean + lastResponse?: boolean + sentAt?: boolean + resolvedById?: boolean + createdAt?: boolean + updatedAt?: boolean + }, ExtArgs["result"]["accountingOutbox"]> + + export type AccountingOutboxSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + provider?: boolean + kind?: boolean + entityId?: boolean + status?: boolean + attempts?: boolean + nextAttemptAt?: boolean + lastError?: boolean + externalRef?: boolean + progress?: boolean + lastRequest?: boolean + lastResponse?: boolean + sentAt?: boolean + resolvedById?: boolean + createdAt?: boolean + updatedAt?: boolean + }, ExtArgs["result"]["accountingOutbox"]> + + export type AccountingOutboxSelectScalar = { + id?: boolean + provider?: boolean + kind?: boolean + entityId?: boolean + status?: boolean + attempts?: boolean + nextAttemptAt?: boolean + lastError?: boolean + externalRef?: boolean + progress?: boolean + lastRequest?: boolean + lastResponse?: boolean + sentAt?: boolean + resolvedById?: boolean + createdAt?: boolean + updatedAt?: boolean + } + + + export type $AccountingOutboxPayload = { + name: "AccountingOutbox" + objects: {} + scalars: $Extensions.GetPayloadResult<{ + id: string + provider: string + kind: $Enums.AccountingOutboxKind + entityId: string + status: $Enums.AccountingOutboxStatus + attempts: number + nextAttemptAt: Date + lastError: string | null + /** + * What the accounting software returned as the document/record id. + */ + externalRef: string | null + /** + * Per-step progress of multi-call jobs (a Zarrin document is one call per + * line), so a failure resumes where it stopped. + */ + progress: Prisma.JsonValue | null + /** + * Last request/response, for the log screen. Never contains the token. + */ + lastRequest: Prisma.JsonValue | null + lastResponse: Prisma.JsonValue | null + sentAt: Date | null + resolvedById: string | null + createdAt: Date + updatedAt: Date + }, ExtArgs["result"]["accountingOutbox"]> + composites: {} + } + + type AccountingOutboxGetPayload = $Result.GetResult + + type AccountingOutboxCountArgs = + Omit & { + select?: AccountingOutboxCountAggregateInputType | true + } + + export interface AccountingOutboxDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['AccountingOutbox'], meta: { name: 'AccountingOutbox' } } + /** + * Find zero or one AccountingOutbox that matches the filter. + * @param {AccountingOutboxFindUniqueArgs} args - Arguments to find a AccountingOutbox + * @example + * // Get one AccountingOutbox + * const accountingOutbox = await prisma.accountingOutbox.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__AccountingOutboxClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one AccountingOutbox that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {AccountingOutboxFindUniqueOrThrowArgs} args - Arguments to find a AccountingOutbox + * @example + * // Get one AccountingOutbox + * const accountingOutbox = await prisma.accountingOutbox.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__AccountingOutboxClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first AccountingOutbox that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AccountingOutboxFindFirstArgs} args - Arguments to find a AccountingOutbox + * @example + * // Get one AccountingOutbox + * const accountingOutbox = await prisma.accountingOutbox.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__AccountingOutboxClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first AccountingOutbox that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AccountingOutboxFindFirstOrThrowArgs} args - Arguments to find a AccountingOutbox + * @example + * // Get one AccountingOutbox + * const accountingOutbox = await prisma.accountingOutbox.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__AccountingOutboxClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more AccountingOutboxes that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AccountingOutboxFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all AccountingOutboxes + * const accountingOutboxes = await prisma.accountingOutbox.findMany() + * + * // Get first 10 AccountingOutboxes + * const accountingOutboxes = await prisma.accountingOutbox.findMany({ take: 10 }) + * + * // Only select the `id` + * const accountingOutboxWithIdOnly = await prisma.accountingOutbox.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a AccountingOutbox. + * @param {AccountingOutboxCreateArgs} args - Arguments to create a AccountingOutbox. + * @example + * // Create one AccountingOutbox + * const AccountingOutbox = await prisma.accountingOutbox.create({ + * data: { + * // ... data to create a AccountingOutbox + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__AccountingOutboxClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many AccountingOutboxes. + * @param {AccountingOutboxCreateManyArgs} args - Arguments to create many AccountingOutboxes. + * @example + * // Create many AccountingOutboxes + * const accountingOutbox = await prisma.accountingOutbox.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many AccountingOutboxes and returns the data saved in the database. + * @param {AccountingOutboxCreateManyAndReturnArgs} args - Arguments to create many AccountingOutboxes. + * @example + * // Create many AccountingOutboxes + * const accountingOutbox = await prisma.accountingOutbox.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many AccountingOutboxes and only return the `id` + * const accountingOutboxWithIdOnly = await prisma.accountingOutbox.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> + + /** + * Delete a AccountingOutbox. + * @param {AccountingOutboxDeleteArgs} args - Arguments to delete one AccountingOutbox. + * @example + * // Delete one AccountingOutbox + * const AccountingOutbox = await prisma.accountingOutbox.delete({ + * where: { + * // ... filter to delete one AccountingOutbox + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__AccountingOutboxClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one AccountingOutbox. + * @param {AccountingOutboxUpdateArgs} args - Arguments to update one AccountingOutbox. + * @example + * // Update one AccountingOutbox + * const accountingOutbox = await prisma.accountingOutbox.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__AccountingOutboxClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more AccountingOutboxes. + * @param {AccountingOutboxDeleteManyArgs} args - Arguments to filter AccountingOutboxes to delete. + * @example + * // Delete a few AccountingOutboxes + * const { count } = await prisma.accountingOutbox.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more AccountingOutboxes. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AccountingOutboxUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many AccountingOutboxes + * const accountingOutbox = await prisma.accountingOutbox.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one AccountingOutbox. + * @param {AccountingOutboxUpsertArgs} args - Arguments to update or create a AccountingOutbox. + * @example + * // Update or create a AccountingOutbox + * const accountingOutbox = await prisma.accountingOutbox.upsert({ + * create: { + * // ... data to create a AccountingOutbox + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the AccountingOutbox we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__AccountingOutboxClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of AccountingOutboxes. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AccountingOutboxCountArgs} args - Arguments to filter AccountingOutboxes to count. + * @example + * // Count the number of AccountingOutboxes + * const count = await prisma.accountingOutbox.count({ + * where: { + * // ... the filter for the AccountingOutboxes we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a AccountingOutbox. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AccountingOutboxAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by AccountingOutbox. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AccountingOutboxGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends AccountingOutboxGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: AccountingOutboxGroupByArgs['orderBy'] } + : { orderBy?: AccountingOutboxGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetAccountingOutboxGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the AccountingOutbox model + */ + readonly fields: AccountingOutboxFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for AccountingOutbox. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__AccountingOutboxClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the AccountingOutbox model + */ + interface AccountingOutboxFieldRefs { + readonly id: FieldRef<"AccountingOutbox", 'String'> + readonly provider: FieldRef<"AccountingOutbox", 'String'> + readonly kind: FieldRef<"AccountingOutbox", 'AccountingOutboxKind'> + readonly entityId: FieldRef<"AccountingOutbox", 'String'> + readonly status: FieldRef<"AccountingOutbox", 'AccountingOutboxStatus'> + readonly attempts: FieldRef<"AccountingOutbox", 'Int'> + readonly nextAttemptAt: FieldRef<"AccountingOutbox", 'DateTime'> + readonly lastError: FieldRef<"AccountingOutbox", 'String'> + readonly externalRef: FieldRef<"AccountingOutbox", 'String'> + readonly progress: FieldRef<"AccountingOutbox", 'Json'> + readonly lastRequest: FieldRef<"AccountingOutbox", 'Json'> + readonly lastResponse: FieldRef<"AccountingOutbox", 'Json'> + readonly sentAt: FieldRef<"AccountingOutbox", 'DateTime'> + readonly resolvedById: FieldRef<"AccountingOutbox", 'String'> + readonly createdAt: FieldRef<"AccountingOutbox", 'DateTime'> + readonly updatedAt: FieldRef<"AccountingOutbox", 'DateTime'> + } + + + // Custom InputTypes + /** + * AccountingOutbox findUnique + */ + export type AccountingOutboxFindUniqueArgs = { + /** + * Select specific fields to fetch from the AccountingOutbox + */ + select?: AccountingOutboxSelect | null + /** + * Filter, which AccountingOutbox to fetch. + */ + where: AccountingOutboxWhereUniqueInput + } + + /** + * AccountingOutbox findUniqueOrThrow + */ + export type AccountingOutboxFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the AccountingOutbox + */ + select?: AccountingOutboxSelect | null + /** + * Filter, which AccountingOutbox to fetch. + */ + where: AccountingOutboxWhereUniqueInput + } + + /** + * AccountingOutbox findFirst + */ + export type AccountingOutboxFindFirstArgs = { + /** + * Select specific fields to fetch from the AccountingOutbox + */ + select?: AccountingOutboxSelect | null + /** + * Filter, which AccountingOutbox to fetch. + */ + where?: AccountingOutboxWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AccountingOutboxes to fetch. + */ + orderBy?: AccountingOutboxOrderByWithRelationInput | AccountingOutboxOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for AccountingOutboxes. + */ + cursor?: AccountingOutboxWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AccountingOutboxes from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` AccountingOutboxes. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of AccountingOutboxes. + */ + distinct?: AccountingOutboxScalarFieldEnum | AccountingOutboxScalarFieldEnum[] + } + + /** + * AccountingOutbox findFirstOrThrow + */ + export type AccountingOutboxFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the AccountingOutbox + */ + select?: AccountingOutboxSelect | null + /** + * Filter, which AccountingOutbox to fetch. + */ + where?: AccountingOutboxWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AccountingOutboxes to fetch. + */ + orderBy?: AccountingOutboxOrderByWithRelationInput | AccountingOutboxOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for AccountingOutboxes. + */ + cursor?: AccountingOutboxWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AccountingOutboxes from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` AccountingOutboxes. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of AccountingOutboxes. + */ + distinct?: AccountingOutboxScalarFieldEnum | AccountingOutboxScalarFieldEnum[] + } + + /** + * AccountingOutbox findMany + */ + export type AccountingOutboxFindManyArgs = { + /** + * Select specific fields to fetch from the AccountingOutbox + */ + select?: AccountingOutboxSelect | null + /** + * Filter, which AccountingOutboxes to fetch. + */ + where?: AccountingOutboxWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AccountingOutboxes to fetch. + */ + orderBy?: AccountingOutboxOrderByWithRelationInput | AccountingOutboxOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing AccountingOutboxes. + */ + cursor?: AccountingOutboxWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AccountingOutboxes from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` AccountingOutboxes. + */ + skip?: number + distinct?: AccountingOutboxScalarFieldEnum | AccountingOutboxScalarFieldEnum[] + } + + /** + * AccountingOutbox create + */ + export type AccountingOutboxCreateArgs = { + /** + * Select specific fields to fetch from the AccountingOutbox + */ + select?: AccountingOutboxSelect | null + /** + * The data needed to create a AccountingOutbox. + */ + data: XOR + } + + /** + * AccountingOutbox createMany + */ + export type AccountingOutboxCreateManyArgs = { + /** + * The data used to create many AccountingOutboxes. + */ + data: AccountingOutboxCreateManyInput | AccountingOutboxCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * AccountingOutbox createManyAndReturn + */ + export type AccountingOutboxCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the AccountingOutbox + */ + select?: AccountingOutboxSelectCreateManyAndReturn | null + /** + * The data used to create many AccountingOutboxes. + */ + data: AccountingOutboxCreateManyInput | AccountingOutboxCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * AccountingOutbox update + */ + export type AccountingOutboxUpdateArgs = { + /** + * Select specific fields to fetch from the AccountingOutbox + */ + select?: AccountingOutboxSelect | null + /** + * The data needed to update a AccountingOutbox. + */ + data: XOR + /** + * Choose, which AccountingOutbox to update. + */ + where: AccountingOutboxWhereUniqueInput + } + + /** + * AccountingOutbox updateMany + */ + export type AccountingOutboxUpdateManyArgs = { + /** + * The data used to update AccountingOutboxes. + */ + data: XOR + /** + * Filter which AccountingOutboxes to update + */ + where?: AccountingOutboxWhereInput + } + + /** + * AccountingOutbox upsert + */ + export type AccountingOutboxUpsertArgs = { + /** + * Select specific fields to fetch from the AccountingOutbox + */ + select?: AccountingOutboxSelect | null + /** + * The filter to search for the AccountingOutbox to update in case it exists. + */ + where: AccountingOutboxWhereUniqueInput + /** + * In case the AccountingOutbox found by the `where` argument doesn't exist, create a new AccountingOutbox with this data. + */ + create: XOR + /** + * In case the AccountingOutbox was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * AccountingOutbox delete + */ + export type AccountingOutboxDeleteArgs = { + /** + * Select specific fields to fetch from the AccountingOutbox + */ + select?: AccountingOutboxSelect | null + /** + * Filter which AccountingOutbox to delete. + */ + where: AccountingOutboxWhereUniqueInput + } + + /** + * AccountingOutbox deleteMany + */ + export type AccountingOutboxDeleteManyArgs = { + /** + * Filter which AccountingOutboxes to delete + */ + where?: AccountingOutboxWhereInput + } + + /** + * AccountingOutbox without action + */ + export type AccountingOutboxDefaultArgs = { + /** + * Select specific fields to fetch from the AccountingOutbox + */ + select?: AccountingOutboxSelect | null + } + + + /** + * Model AccountingIssue + */ + + export type AggregateAccountingIssue = { + _count: AccountingIssueCountAggregateOutputType | null + _min: AccountingIssueMinAggregateOutputType | null + _max: AccountingIssueMaxAggregateOutputType | null + } + + export type AccountingIssueMinAggregateOutputType = { + id: string | null + provider: string | null + kind: string | null + externalCode: string | null + entityId: string | null + message: string | null + createdAt: Date | null + updatedAt: Date | null + resolvedAt: Date | null + } + + export type AccountingIssueMaxAggregateOutputType = { + id: string | null + provider: string | null + kind: string | null + externalCode: string | null + entityId: string | null + message: string | null + createdAt: Date | null + updatedAt: Date | null + resolvedAt: Date | null + } + + export type AccountingIssueCountAggregateOutputType = { + id: number + provider: number + kind: number + externalCode: number + entityId: number + message: number + data: number + createdAt: number + updatedAt: number + resolvedAt: number + _all: number + } + + + export type AccountingIssueMinAggregateInputType = { + id?: true + provider?: true + kind?: true + externalCode?: true + entityId?: true + message?: true + createdAt?: true + updatedAt?: true + resolvedAt?: true + } + + export type AccountingIssueMaxAggregateInputType = { + id?: true + provider?: true + kind?: true + externalCode?: true + entityId?: true + message?: true + createdAt?: true + updatedAt?: true + resolvedAt?: true + } + + export type AccountingIssueCountAggregateInputType = { + id?: true + provider?: true + kind?: true + externalCode?: true + entityId?: true + message?: true + data?: true + createdAt?: true + updatedAt?: true + resolvedAt?: true + _all?: true + } + + export type AccountingIssueAggregateArgs = { + /** + * Filter which AccountingIssue to aggregate. + */ + where?: AccountingIssueWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AccountingIssues to fetch. + */ + orderBy?: AccountingIssueOrderByWithRelationInput | AccountingIssueOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: AccountingIssueWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AccountingIssues from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` AccountingIssues. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned AccountingIssues + **/ + _count?: true | AccountingIssueCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: AccountingIssueMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: AccountingIssueMaxAggregateInputType + } + + export type GetAccountingIssueAggregateType = { + [P in keyof T & keyof AggregateAccountingIssue]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type AccountingIssueGroupByArgs = { + where?: AccountingIssueWhereInput + orderBy?: AccountingIssueOrderByWithAggregationInput | AccountingIssueOrderByWithAggregationInput[] + by: AccountingIssueScalarFieldEnum[] | AccountingIssueScalarFieldEnum + having?: AccountingIssueScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: AccountingIssueCountAggregateInputType | true + _min?: AccountingIssueMinAggregateInputType + _max?: AccountingIssueMaxAggregateInputType + } + + export type AccountingIssueGroupByOutputType = { + id: string + provider: string + kind: string + externalCode: string + entityId: string | null + message: string + data: JsonValue | null + createdAt: Date + updatedAt: Date + resolvedAt: Date | null + _count: AccountingIssueCountAggregateOutputType | null + _min: AccountingIssueMinAggregateOutputType | null + _max: AccountingIssueMaxAggregateOutputType | null + } + + type GetAccountingIssueGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof AccountingIssueGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type AccountingIssueSelect = $Extensions.GetSelect<{ + id?: boolean + provider?: boolean + kind?: boolean + externalCode?: boolean + entityId?: boolean + message?: boolean + data?: boolean + createdAt?: boolean + updatedAt?: boolean + resolvedAt?: boolean + }, ExtArgs["result"]["accountingIssue"]> + + export type AccountingIssueSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + provider?: boolean + kind?: boolean + externalCode?: boolean + entityId?: boolean + message?: boolean + data?: boolean + createdAt?: boolean + updatedAt?: boolean + resolvedAt?: boolean + }, ExtArgs["result"]["accountingIssue"]> + + export type AccountingIssueSelectScalar = { + id?: boolean + provider?: boolean + kind?: boolean + externalCode?: boolean + entityId?: boolean + message?: boolean + data?: boolean + createdAt?: boolean + updatedAt?: boolean + resolvedAt?: boolean + } + + + export type $AccountingIssuePayload = { + name: "AccountingIssue" + objects: {} + scalars: $Extensions.GetPayloadResult<{ + id: string + provider: string + kind: string + externalCode: string + entityId: string | null + message: string + data: Prisma.JsonValue | null + createdAt: Date + updatedAt: Date + resolvedAt: Date | null + }, ExtArgs["result"]["accountingIssue"]> + composites: {} + } + + type AccountingIssueGetPayload = $Result.GetResult + + type AccountingIssueCountArgs = + Omit & { + select?: AccountingIssueCountAggregateInputType | true + } + + export interface AccountingIssueDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['AccountingIssue'], meta: { name: 'AccountingIssue' } } + /** + * Find zero or one AccountingIssue that matches the filter. + * @param {AccountingIssueFindUniqueArgs} args - Arguments to find a AccountingIssue + * @example + * // Get one AccountingIssue + * const accountingIssue = await prisma.accountingIssue.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__AccountingIssueClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one AccountingIssue that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {AccountingIssueFindUniqueOrThrowArgs} args - Arguments to find a AccountingIssue + * @example + * // Get one AccountingIssue + * const accountingIssue = await prisma.accountingIssue.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__AccountingIssueClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first AccountingIssue that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AccountingIssueFindFirstArgs} args - Arguments to find a AccountingIssue + * @example + * // Get one AccountingIssue + * const accountingIssue = await prisma.accountingIssue.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__AccountingIssueClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first AccountingIssue that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AccountingIssueFindFirstOrThrowArgs} args - Arguments to find a AccountingIssue + * @example + * // Get one AccountingIssue + * const accountingIssue = await prisma.accountingIssue.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__AccountingIssueClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more AccountingIssues that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AccountingIssueFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all AccountingIssues + * const accountingIssues = await prisma.accountingIssue.findMany() + * + * // Get first 10 AccountingIssues + * const accountingIssues = await prisma.accountingIssue.findMany({ take: 10 }) + * + * // Only select the `id` + * const accountingIssueWithIdOnly = await prisma.accountingIssue.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a AccountingIssue. + * @param {AccountingIssueCreateArgs} args - Arguments to create a AccountingIssue. + * @example + * // Create one AccountingIssue + * const AccountingIssue = await prisma.accountingIssue.create({ + * data: { + * // ... data to create a AccountingIssue + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__AccountingIssueClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many AccountingIssues. + * @param {AccountingIssueCreateManyArgs} args - Arguments to create many AccountingIssues. + * @example + * // Create many AccountingIssues + * const accountingIssue = await prisma.accountingIssue.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many AccountingIssues and returns the data saved in the database. + * @param {AccountingIssueCreateManyAndReturnArgs} args - Arguments to create many AccountingIssues. + * @example + * // Create many AccountingIssues + * const accountingIssue = await prisma.accountingIssue.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many AccountingIssues and only return the `id` + * const accountingIssueWithIdOnly = await prisma.accountingIssue.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> + + /** + * Delete a AccountingIssue. + * @param {AccountingIssueDeleteArgs} args - Arguments to delete one AccountingIssue. + * @example + * // Delete one AccountingIssue + * const AccountingIssue = await prisma.accountingIssue.delete({ + * where: { + * // ... filter to delete one AccountingIssue + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__AccountingIssueClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one AccountingIssue. + * @param {AccountingIssueUpdateArgs} args - Arguments to update one AccountingIssue. + * @example + * // Update one AccountingIssue + * const accountingIssue = await prisma.accountingIssue.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__AccountingIssueClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more AccountingIssues. + * @param {AccountingIssueDeleteManyArgs} args - Arguments to filter AccountingIssues to delete. + * @example + * // Delete a few AccountingIssues + * const { count } = await prisma.accountingIssue.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more AccountingIssues. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AccountingIssueUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many AccountingIssues + * const accountingIssue = await prisma.accountingIssue.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one AccountingIssue. + * @param {AccountingIssueUpsertArgs} args - Arguments to update or create a AccountingIssue. + * @example + * // Update or create a AccountingIssue + * const accountingIssue = await prisma.accountingIssue.upsert({ + * create: { + * // ... data to create a AccountingIssue + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the AccountingIssue we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__AccountingIssueClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of AccountingIssues. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AccountingIssueCountArgs} args - Arguments to filter AccountingIssues to count. + * @example + * // Count the number of AccountingIssues + * const count = await prisma.accountingIssue.count({ + * where: { + * // ... the filter for the AccountingIssues we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a AccountingIssue. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AccountingIssueAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by AccountingIssue. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {AccountingIssueGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends AccountingIssueGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: AccountingIssueGroupByArgs['orderBy'] } + : { orderBy?: AccountingIssueGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetAccountingIssueGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the AccountingIssue model + */ + readonly fields: AccountingIssueFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for AccountingIssue. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__AccountingIssueClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the AccountingIssue model + */ + interface AccountingIssueFieldRefs { + readonly id: FieldRef<"AccountingIssue", 'String'> + readonly provider: FieldRef<"AccountingIssue", 'String'> + readonly kind: FieldRef<"AccountingIssue", 'String'> + readonly externalCode: FieldRef<"AccountingIssue", 'String'> + readonly entityId: FieldRef<"AccountingIssue", 'String'> + readonly message: FieldRef<"AccountingIssue", 'String'> + readonly data: FieldRef<"AccountingIssue", 'Json'> + readonly createdAt: FieldRef<"AccountingIssue", 'DateTime'> + readonly updatedAt: FieldRef<"AccountingIssue", 'DateTime'> + readonly resolvedAt: FieldRef<"AccountingIssue", 'DateTime'> + } + + + // Custom InputTypes + /** + * AccountingIssue findUnique + */ + export type AccountingIssueFindUniqueArgs = { + /** + * Select specific fields to fetch from the AccountingIssue + */ + select?: AccountingIssueSelect | null + /** + * Filter, which AccountingIssue to fetch. + */ + where: AccountingIssueWhereUniqueInput + } + + /** + * AccountingIssue findUniqueOrThrow + */ + export type AccountingIssueFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the AccountingIssue + */ + select?: AccountingIssueSelect | null + /** + * Filter, which AccountingIssue to fetch. + */ + where: AccountingIssueWhereUniqueInput + } + + /** + * AccountingIssue findFirst + */ + export type AccountingIssueFindFirstArgs = { + /** + * Select specific fields to fetch from the AccountingIssue + */ + select?: AccountingIssueSelect | null + /** + * Filter, which AccountingIssue to fetch. + */ + where?: AccountingIssueWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AccountingIssues to fetch. + */ + orderBy?: AccountingIssueOrderByWithRelationInput | AccountingIssueOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for AccountingIssues. + */ + cursor?: AccountingIssueWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AccountingIssues from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` AccountingIssues. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of AccountingIssues. + */ + distinct?: AccountingIssueScalarFieldEnum | AccountingIssueScalarFieldEnum[] + } + + /** + * AccountingIssue findFirstOrThrow + */ + export type AccountingIssueFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the AccountingIssue + */ + select?: AccountingIssueSelect | null + /** + * Filter, which AccountingIssue to fetch. + */ + where?: AccountingIssueWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AccountingIssues to fetch. + */ + orderBy?: AccountingIssueOrderByWithRelationInput | AccountingIssueOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for AccountingIssues. + */ + cursor?: AccountingIssueWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AccountingIssues from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` AccountingIssues. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of AccountingIssues. + */ + distinct?: AccountingIssueScalarFieldEnum | AccountingIssueScalarFieldEnum[] + } + + /** + * AccountingIssue findMany + */ + export type AccountingIssueFindManyArgs = { + /** + * Select specific fields to fetch from the AccountingIssue + */ + select?: AccountingIssueSelect | null + /** + * Filter, which AccountingIssues to fetch. + */ + where?: AccountingIssueWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of AccountingIssues to fetch. + */ + orderBy?: AccountingIssueOrderByWithRelationInput | AccountingIssueOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing AccountingIssues. + */ + cursor?: AccountingIssueWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` AccountingIssues from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` AccountingIssues. + */ + skip?: number + distinct?: AccountingIssueScalarFieldEnum | AccountingIssueScalarFieldEnum[] + } + + /** + * AccountingIssue create + */ + export type AccountingIssueCreateArgs = { + /** + * Select specific fields to fetch from the AccountingIssue + */ + select?: AccountingIssueSelect | null + /** + * The data needed to create a AccountingIssue. + */ + data: XOR + } + + /** + * AccountingIssue createMany + */ + export type AccountingIssueCreateManyArgs = { + /** + * The data used to create many AccountingIssues. + */ + data: AccountingIssueCreateManyInput | AccountingIssueCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * AccountingIssue createManyAndReturn + */ + export type AccountingIssueCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the AccountingIssue + */ + select?: AccountingIssueSelectCreateManyAndReturn | null + /** + * The data used to create many AccountingIssues. + */ + data: AccountingIssueCreateManyInput | AccountingIssueCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * AccountingIssue update + */ + export type AccountingIssueUpdateArgs = { + /** + * Select specific fields to fetch from the AccountingIssue + */ + select?: AccountingIssueSelect | null + /** + * The data needed to update a AccountingIssue. + */ + data: XOR + /** + * Choose, which AccountingIssue to update. + */ + where: AccountingIssueWhereUniqueInput + } + + /** + * AccountingIssue updateMany + */ + export type AccountingIssueUpdateManyArgs = { + /** + * The data used to update AccountingIssues. + */ + data: XOR + /** + * Filter which AccountingIssues to update + */ + where?: AccountingIssueWhereInput + } + + /** + * AccountingIssue upsert + */ + export type AccountingIssueUpsertArgs = { + /** + * Select specific fields to fetch from the AccountingIssue + */ + select?: AccountingIssueSelect | null + /** + * The filter to search for the AccountingIssue to update in case it exists. + */ + where: AccountingIssueWhereUniqueInput + /** + * In case the AccountingIssue found by the `where` argument doesn't exist, create a new AccountingIssue with this data. + */ + create: XOR + /** + * In case the AccountingIssue was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * AccountingIssue delete + */ + export type AccountingIssueDeleteArgs = { + /** + * Select specific fields to fetch from the AccountingIssue + */ + select?: AccountingIssueSelect | null + /** + * Filter which AccountingIssue to delete. + */ + where: AccountingIssueWhereUniqueInput + } + + /** + * AccountingIssue deleteMany + */ + export type AccountingIssueDeleteManyArgs = { + /** + * Filter which AccountingIssues to delete + */ + where?: AccountingIssueWhereInput + } + + /** + * AccountingIssue without action + */ + export type AccountingIssueDefaultArgs = { + /** + * Select specific fields to fetch from the AccountingIssue + */ + select?: AccountingIssueSelect | null + } + + /** * Model Promotion */ @@ -40131,6 +48807,7 @@ export namespace Prisma { createdAt?: boolean uploadedByAdminUser?: boolean | UploadedFile$uploadedByAdminUserArgs customerAvatars?: boolean | UploadedFile$customerAvatarsArgs + adminUserAvatars?: boolean | UploadedFile$adminUserAvatarsArgs _count?: boolean | UploadedFileCountOutputTypeDefaultArgs }, ExtArgs["result"]["uploadedFile"]> @@ -40160,6 +48837,7 @@ export namespace Prisma { export type UploadedFileInclude = { uploadedByAdminUser?: boolean | UploadedFile$uploadedByAdminUserArgs customerAvatars?: boolean | UploadedFile$customerAvatarsArgs + adminUserAvatars?: boolean | UploadedFile$adminUserAvatarsArgs _count?: boolean | UploadedFileCountOutputTypeDefaultArgs } export type UploadedFileIncludeCreateManyAndReturn = { @@ -40171,6 +48849,7 @@ export namespace Prisma { objects: { uploadedByAdminUser: Prisma.$AdminUserPayload | null customerAvatars: Prisma.$CustomerPayload[] + adminUserAvatars: Prisma.$AdminUserPayload[] } scalars: $Extensions.GetPayloadResult<{ id: string @@ -40554,6 +49233,7 @@ export namespace Prisma { readonly [Symbol.toStringTag]: "PrismaPromise" uploadedByAdminUser = {}>(args?: Subset>): Prisma__AdminUserClient<$Result.GetResult, T, "findUniqueOrThrow"> | null, null, ExtArgs> customerAvatars = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> + adminUserAvatars = {}>(args?: Subset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany"> | Null> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. @@ -40943,6 +49623,26 @@ export namespace Prisma { distinct?: CustomerScalarFieldEnum | CustomerScalarFieldEnum[] } + /** + * UploadedFile.adminUserAvatars + */ + export type UploadedFile$adminUserAvatarsArgs = { + /** + * Select specific fields to fetch from the AdminUser + */ + select?: AdminUserSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: AdminUserInclude | null + where?: AdminUserWhereInput + orderBy?: AdminUserOrderByWithRelationInput | AdminUserOrderByWithRelationInput[] + cursor?: AdminUserWhereUniqueInput + take?: number + skip?: number + distinct?: AdminUserScalarFieldEnum | AdminUserScalarFieldEnum[] + } + /** * UploadedFile without action */ @@ -40958,6 +49658,1037 @@ export namespace Prisma { } + /** + * Model CustomerOtp + */ + + export type AggregateCustomerOtp = { + _count: CustomerOtpCountAggregateOutputType | null + _avg: CustomerOtpAvgAggregateOutputType | null + _sum: CustomerOtpSumAggregateOutputType | null + _min: CustomerOtpMinAggregateOutputType | null + _max: CustomerOtpMaxAggregateOutputType | null + } + + export type CustomerOtpAvgAggregateOutputType = { + attempts: number | null + } + + export type CustomerOtpSumAggregateOutputType = { + attempts: number | null + } + + export type CustomerOtpMinAggregateOutputType = { + id: string | null + mobile: string | null + customerId: string | null + codeHash: string | null + expiresAt: Date | null + attempts: number | null + consumedAt: Date | null + requestIp: string | null + createdAt: Date | null + } + + export type CustomerOtpMaxAggregateOutputType = { + id: string | null + mobile: string | null + customerId: string | null + codeHash: string | null + expiresAt: Date | null + attempts: number | null + consumedAt: Date | null + requestIp: string | null + createdAt: Date | null + } + + export type CustomerOtpCountAggregateOutputType = { + id: number + mobile: number + customerId: number + codeHash: number + expiresAt: number + attempts: number + consumedAt: number + requestIp: number + createdAt: number + _all: number + } + + + export type CustomerOtpAvgAggregateInputType = { + attempts?: true + } + + export type CustomerOtpSumAggregateInputType = { + attempts?: true + } + + export type CustomerOtpMinAggregateInputType = { + id?: true + mobile?: true + customerId?: true + codeHash?: true + expiresAt?: true + attempts?: true + consumedAt?: true + requestIp?: true + createdAt?: true + } + + export type CustomerOtpMaxAggregateInputType = { + id?: true + mobile?: true + customerId?: true + codeHash?: true + expiresAt?: true + attempts?: true + consumedAt?: true + requestIp?: true + createdAt?: true + } + + export type CustomerOtpCountAggregateInputType = { + id?: true + mobile?: true + customerId?: true + codeHash?: true + expiresAt?: true + attempts?: true + consumedAt?: true + requestIp?: true + createdAt?: true + _all?: true + } + + export type CustomerOtpAggregateArgs = { + /** + * Filter which CustomerOtp to aggregate. + */ + where?: CustomerOtpWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of CustomerOtps to fetch. + */ + orderBy?: CustomerOtpOrderByWithRelationInput | CustomerOtpOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: CustomerOtpWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` CustomerOtps from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` CustomerOtps. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned CustomerOtps + **/ + _count?: true | CustomerOtpCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: CustomerOtpAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: CustomerOtpSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: CustomerOtpMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: CustomerOtpMaxAggregateInputType + } + + export type GetCustomerOtpAggregateType = { + [P in keyof T & keyof AggregateCustomerOtp]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : GetScalarType + : GetScalarType + } + + + + + export type CustomerOtpGroupByArgs = { + where?: CustomerOtpWhereInput + orderBy?: CustomerOtpOrderByWithAggregationInput | CustomerOtpOrderByWithAggregationInput[] + by: CustomerOtpScalarFieldEnum[] | CustomerOtpScalarFieldEnum + having?: CustomerOtpScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: CustomerOtpCountAggregateInputType | true + _avg?: CustomerOtpAvgAggregateInputType + _sum?: CustomerOtpSumAggregateInputType + _min?: CustomerOtpMinAggregateInputType + _max?: CustomerOtpMaxAggregateInputType + } + + export type CustomerOtpGroupByOutputType = { + id: string + mobile: string + customerId: string + codeHash: string + expiresAt: Date + attempts: number + consumedAt: Date | null + requestIp: string | null + createdAt: Date + _count: CustomerOtpCountAggregateOutputType | null + _avg: CustomerOtpAvgAggregateOutputType | null + _sum: CustomerOtpSumAggregateOutputType | null + _min: CustomerOtpMinAggregateOutputType | null + _max: CustomerOtpMaxAggregateOutputType | null + } + + type GetCustomerOtpGroupByPayload = Prisma.PrismaPromise< + Array< + PickEnumerable & + { + [P in ((keyof T) & (keyof CustomerOtpGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : GetScalarType + : GetScalarType + } + > + > + + + export type CustomerOtpSelect = $Extensions.GetSelect<{ + id?: boolean + mobile?: boolean + customerId?: boolean + codeHash?: boolean + expiresAt?: boolean + attempts?: boolean + consumedAt?: boolean + requestIp?: boolean + createdAt?: boolean + customer?: boolean | CustomerDefaultArgs + }, ExtArgs["result"]["customerOtp"]> + + export type CustomerOtpSelectCreateManyAndReturn = $Extensions.GetSelect<{ + id?: boolean + mobile?: boolean + customerId?: boolean + codeHash?: boolean + expiresAt?: boolean + attempts?: boolean + consumedAt?: boolean + requestIp?: boolean + createdAt?: boolean + customer?: boolean | CustomerDefaultArgs + }, ExtArgs["result"]["customerOtp"]> + + export type CustomerOtpSelectScalar = { + id?: boolean + mobile?: boolean + customerId?: boolean + codeHash?: boolean + expiresAt?: boolean + attempts?: boolean + consumedAt?: boolean + requestIp?: boolean + createdAt?: boolean + } + + export type CustomerOtpInclude = { + customer?: boolean | CustomerDefaultArgs + } + export type CustomerOtpIncludeCreateManyAndReturn = { + customer?: boolean | CustomerDefaultArgs + } + + export type $CustomerOtpPayload = { + name: "CustomerOtp" + objects: { + customer: Prisma.$CustomerPayload + } + scalars: $Extensions.GetPayloadResult<{ + id: string + /** + * Normalised to English digits before storing, as the reference does with + * Utility::faTOen() on both send and verify. + */ + mobile: string + customerId: string + /** + * bcrypt hash of the 4-digit code. Never the code itself. + */ + codeHash: string + expiresAt: Date + /** + * Failed verify attempts against THIS challenge. + */ + attempts: number + /** + * Set when the code is accepted, so one challenge cannot be reused. + */ + consumedAt: Date | null + /** + * Kept for the per-IP send throttle. + */ + requestIp: string | null + createdAt: Date + }, ExtArgs["result"]["customerOtp"]> + composites: {} + } + + type CustomerOtpGetPayload = $Result.GetResult + + type CustomerOtpCountArgs = + Omit & { + select?: CustomerOtpCountAggregateInputType | true + } + + export interface CustomerOtpDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['CustomerOtp'], meta: { name: 'CustomerOtp' } } + /** + * Find zero or one CustomerOtp that matches the filter. + * @param {CustomerOtpFindUniqueArgs} args - Arguments to find a CustomerOtp + * @example + * // Get one CustomerOtp + * const customerOtp = await prisma.customerOtp.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: SelectSubset>): Prisma__CustomerOtpClient<$Result.GetResult, T, "findUnique"> | null, null, ExtArgs> + + /** + * Find one CustomerOtp that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {CustomerOtpFindUniqueOrThrowArgs} args - Arguments to find a CustomerOtp + * @example + * // Get one CustomerOtp + * const customerOtp = await prisma.customerOtp.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: SelectSubset>): Prisma__CustomerOtpClient<$Result.GetResult, T, "findUniqueOrThrow">, never, ExtArgs> + + /** + * Find the first CustomerOtp that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CustomerOtpFindFirstArgs} args - Arguments to find a CustomerOtp + * @example + * // Get one CustomerOtp + * const customerOtp = await prisma.customerOtp.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: SelectSubset>): Prisma__CustomerOtpClient<$Result.GetResult, T, "findFirst"> | null, null, ExtArgs> + + /** + * Find the first CustomerOtp that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CustomerOtpFindFirstOrThrowArgs} args - Arguments to find a CustomerOtp + * @example + * // Get one CustomerOtp + * const customerOtp = await prisma.customerOtp.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: SelectSubset>): Prisma__CustomerOtpClient<$Result.GetResult, T, "findFirstOrThrow">, never, ExtArgs> + + /** + * Find zero or more CustomerOtps that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CustomerOtpFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all CustomerOtps + * const customerOtps = await prisma.customerOtp.findMany() + * + * // Get first 10 CustomerOtps + * const customerOtps = await prisma.customerOtp.findMany({ take: 10 }) + * + * // Only select the `id` + * const customerOtpWithIdOnly = await prisma.customerOtp.findMany({ select: { id: true } }) + * + */ + findMany(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "findMany">> + + /** + * Create a CustomerOtp. + * @param {CustomerOtpCreateArgs} args - Arguments to create a CustomerOtp. + * @example + * // Create one CustomerOtp + * const CustomerOtp = await prisma.customerOtp.create({ + * data: { + * // ... data to create a CustomerOtp + * } + * }) + * + */ + create(args: SelectSubset>): Prisma__CustomerOtpClient<$Result.GetResult, T, "create">, never, ExtArgs> + + /** + * Create many CustomerOtps. + * @param {CustomerOtpCreateManyArgs} args - Arguments to create many CustomerOtps. + * @example + * // Create many CustomerOtps + * const customerOtp = await prisma.customerOtp.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Create many CustomerOtps and returns the data saved in the database. + * @param {CustomerOtpCreateManyAndReturnArgs} args - Arguments to create many CustomerOtps. + * @example + * // Create many CustomerOtps + * const customerOtp = await prisma.customerOtp.createManyAndReturn({ + * data: [ + * // ... provide data here + * ] + * }) + * + * // Create many CustomerOtps and only return the `id` + * const customerOtpWithIdOnly = await prisma.customerOtp.createManyAndReturn({ + * select: { id: true }, + * data: [ + * // ... provide data here + * ] + * }) + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * + */ + createManyAndReturn(args?: SelectSubset>): Prisma.PrismaPromise<$Result.GetResult, T, "createManyAndReturn">> + + /** + * Delete a CustomerOtp. + * @param {CustomerOtpDeleteArgs} args - Arguments to delete one CustomerOtp. + * @example + * // Delete one CustomerOtp + * const CustomerOtp = await prisma.customerOtp.delete({ + * where: { + * // ... filter to delete one CustomerOtp + * } + * }) + * + */ + delete(args: SelectSubset>): Prisma__CustomerOtpClient<$Result.GetResult, T, "delete">, never, ExtArgs> + + /** + * Update one CustomerOtp. + * @param {CustomerOtpUpdateArgs} args - Arguments to update one CustomerOtp. + * @example + * // Update one CustomerOtp + * const customerOtp = await prisma.customerOtp.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: SelectSubset>): Prisma__CustomerOtpClient<$Result.GetResult, T, "update">, never, ExtArgs> + + /** + * Delete zero or more CustomerOtps. + * @param {CustomerOtpDeleteManyArgs} args - Arguments to filter CustomerOtps to delete. + * @example + * // Delete a few CustomerOtps + * const { count } = await prisma.customerOtp.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more CustomerOtps. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CustomerOtpUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many CustomerOtps + * const customerOtp = await prisma.customerOtp.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one CustomerOtp. + * @param {CustomerOtpUpsertArgs} args - Arguments to update or create a CustomerOtp. + * @example + * // Update or create a CustomerOtp + * const customerOtp = await prisma.customerOtp.upsert({ + * create: { + * // ... data to create a CustomerOtp + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the CustomerOtp we want to update + * } + * }) + */ + upsert(args: SelectSubset>): Prisma__CustomerOtpClient<$Result.GetResult, T, "upsert">, never, ExtArgs> + + + /** + * Count the number of CustomerOtps. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CustomerOtpCountArgs} args - Arguments to filter CustomerOtps to count. + * @example + * // Count the number of CustomerOtps + * const count = await prisma.customerOtp.count({ + * where: { + * // ... the filter for the CustomerOtps we want to count + * } + * }) + **/ + count( + args?: Subset, + ): Prisma.PrismaPromise< + T extends $Utils.Record<'select', any> + ? T['select'] extends true + ? number + : GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a CustomerOtp. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CustomerOtpAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Subset): Prisma.PrismaPromise> + + /** + * Group by CustomerOtp. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {CustomerOtpGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends CustomerOtpGroupByArgs, + HasSelectOrTake extends Or< + Extends<'skip', Keys>, + Extends<'take', Keys> + >, + OrderByArg extends True extends HasSelectOrTake + ? { orderBy: CustomerOtpGroupByArgs['orderBy'] } + : { orderBy?: CustomerOtpGroupByArgs['orderBy'] }, + OrderFields extends ExcludeUnderscoreKeys>>, + ByFields extends MaybeTupleToUnion, + ByValid extends Has, + HavingFields extends GetHavingFields, + HavingValid extends Has, + ByEmpty extends T['by'] extends never[] ? True : False, + InputErrors extends ByEmpty extends True + ? `Error: "by" must not be empty.` + : HavingValid extends False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Keys + ? 'orderBy' extends Keys + ? ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: SubsetIntersection & InputErrors): {} extends InputErrors ? GetCustomerOtpGroupByPayload : Prisma.PrismaPromise + /** + * Fields of the CustomerOtp model + */ + readonly fields: CustomerOtpFieldRefs; + } + + /** + * The delegate class that acts as a "Promise-like" for CustomerOtp. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ + export interface Prisma__CustomerOtpClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + customer = {}>(args?: Subset>): Prisma__CustomerClient<$Result.GetResult, T, "findUniqueOrThrow"> | Null, Null, ExtArgs> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): $Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): $Utils.JsPromise + } + + + + + /** + * Fields of the CustomerOtp model + */ + interface CustomerOtpFieldRefs { + readonly id: FieldRef<"CustomerOtp", 'String'> + readonly mobile: FieldRef<"CustomerOtp", 'String'> + readonly customerId: FieldRef<"CustomerOtp", 'String'> + readonly codeHash: FieldRef<"CustomerOtp", 'String'> + readonly expiresAt: FieldRef<"CustomerOtp", 'DateTime'> + readonly attempts: FieldRef<"CustomerOtp", 'Int'> + readonly consumedAt: FieldRef<"CustomerOtp", 'DateTime'> + readonly requestIp: FieldRef<"CustomerOtp", 'String'> + readonly createdAt: FieldRef<"CustomerOtp", 'DateTime'> + } + + + // Custom InputTypes + /** + * CustomerOtp findUnique + */ + export type CustomerOtpFindUniqueArgs = { + /** + * Select specific fields to fetch from the CustomerOtp + */ + select?: CustomerOtpSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerOtpInclude | null + /** + * Filter, which CustomerOtp to fetch. + */ + where: CustomerOtpWhereUniqueInput + } + + /** + * CustomerOtp findUniqueOrThrow + */ + export type CustomerOtpFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the CustomerOtp + */ + select?: CustomerOtpSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerOtpInclude | null + /** + * Filter, which CustomerOtp to fetch. + */ + where: CustomerOtpWhereUniqueInput + } + + /** + * CustomerOtp findFirst + */ + export type CustomerOtpFindFirstArgs = { + /** + * Select specific fields to fetch from the CustomerOtp + */ + select?: CustomerOtpSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerOtpInclude | null + /** + * Filter, which CustomerOtp to fetch. + */ + where?: CustomerOtpWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of CustomerOtps to fetch. + */ + orderBy?: CustomerOtpOrderByWithRelationInput | CustomerOtpOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for CustomerOtps. + */ + cursor?: CustomerOtpWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` CustomerOtps from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` CustomerOtps. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of CustomerOtps. + */ + distinct?: CustomerOtpScalarFieldEnum | CustomerOtpScalarFieldEnum[] + } + + /** + * CustomerOtp findFirstOrThrow + */ + export type CustomerOtpFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the CustomerOtp + */ + select?: CustomerOtpSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerOtpInclude | null + /** + * Filter, which CustomerOtp to fetch. + */ + where?: CustomerOtpWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of CustomerOtps to fetch. + */ + orderBy?: CustomerOtpOrderByWithRelationInput | CustomerOtpOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for CustomerOtps. + */ + cursor?: CustomerOtpWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` CustomerOtps from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` CustomerOtps. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of CustomerOtps. + */ + distinct?: CustomerOtpScalarFieldEnum | CustomerOtpScalarFieldEnum[] + } + + /** + * CustomerOtp findMany + */ + export type CustomerOtpFindManyArgs = { + /** + * Select specific fields to fetch from the CustomerOtp + */ + select?: CustomerOtpSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerOtpInclude | null + /** + * Filter, which CustomerOtps to fetch. + */ + where?: CustomerOtpWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of CustomerOtps to fetch. + */ + orderBy?: CustomerOtpOrderByWithRelationInput | CustomerOtpOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing CustomerOtps. + */ + cursor?: CustomerOtpWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` CustomerOtps from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` CustomerOtps. + */ + skip?: number + distinct?: CustomerOtpScalarFieldEnum | CustomerOtpScalarFieldEnum[] + } + + /** + * CustomerOtp create + */ + export type CustomerOtpCreateArgs = { + /** + * Select specific fields to fetch from the CustomerOtp + */ + select?: CustomerOtpSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerOtpInclude | null + /** + * The data needed to create a CustomerOtp. + */ + data: XOR + } + + /** + * CustomerOtp createMany + */ + export type CustomerOtpCreateManyArgs = { + /** + * The data used to create many CustomerOtps. + */ + data: CustomerOtpCreateManyInput | CustomerOtpCreateManyInput[] + skipDuplicates?: boolean + } + + /** + * CustomerOtp createManyAndReturn + */ + export type CustomerOtpCreateManyAndReturnArgs = { + /** + * Select specific fields to fetch from the CustomerOtp + */ + select?: CustomerOtpSelectCreateManyAndReturn | null + /** + * The data used to create many CustomerOtps. + */ + data: CustomerOtpCreateManyInput | CustomerOtpCreateManyInput[] + skipDuplicates?: boolean + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerOtpIncludeCreateManyAndReturn | null + } + + /** + * CustomerOtp update + */ + export type CustomerOtpUpdateArgs = { + /** + * Select specific fields to fetch from the CustomerOtp + */ + select?: CustomerOtpSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerOtpInclude | null + /** + * The data needed to update a CustomerOtp. + */ + data: XOR + /** + * Choose, which CustomerOtp to update. + */ + where: CustomerOtpWhereUniqueInput + } + + /** + * CustomerOtp updateMany + */ + export type CustomerOtpUpdateManyArgs = { + /** + * The data used to update CustomerOtps. + */ + data: XOR + /** + * Filter which CustomerOtps to update + */ + where?: CustomerOtpWhereInput + } + + /** + * CustomerOtp upsert + */ + export type CustomerOtpUpsertArgs = { + /** + * Select specific fields to fetch from the CustomerOtp + */ + select?: CustomerOtpSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerOtpInclude | null + /** + * The filter to search for the CustomerOtp to update in case it exists. + */ + where: CustomerOtpWhereUniqueInput + /** + * In case the CustomerOtp found by the `where` argument doesn't exist, create a new CustomerOtp with this data. + */ + create: XOR + /** + * In case the CustomerOtp was found with the provided `where` argument, update it with this data. + */ + update: XOR + } + + /** + * CustomerOtp delete + */ + export type CustomerOtpDeleteArgs = { + /** + * Select specific fields to fetch from the CustomerOtp + */ + select?: CustomerOtpSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerOtpInclude | null + /** + * Filter which CustomerOtp to delete. + */ + where: CustomerOtpWhereUniqueInput + } + + /** + * CustomerOtp deleteMany + */ + export type CustomerOtpDeleteManyArgs = { + /** + * Filter which CustomerOtps to delete + */ + where?: CustomerOtpWhereInput + } + + /** + * CustomerOtp without action + */ + export type CustomerOtpDefaultArgs = { + /** + * Select specific fields to fetch from the CustomerOtp + */ + select?: CustomerOtpSelect | null + /** + * Choose, which related nodes to fetch as well + */ + include?: CustomerOtpInclude | null + } + + /** * Enums */ @@ -40975,7 +50706,7 @@ export namespace Prisma { export const CityScalarFieldEnum: { id: 'id', name: 'name', - province: 'province', + parentId: 'parentId', percent: 'percent', percentAux: 'percentAux' }; @@ -40986,6 +50717,8 @@ export namespace Prisma { export const AdminUserScalarFieldEnum: { id: 'id', fullName: 'fullName', + firstName: 'firstName', + lastName: 'lastName', mobile: 'mobile', passwordHash: 'passwordHash', role: 'role', @@ -40993,19 +50726,80 @@ export namespace Prisma { branchId: 'branchId', wagePercent: 'wagePercent', isActive: 'isActive', - createdAt: 'createdAt' + createdAt: 'createdAt', + avatarFileId: 'avatarFileId', + address: 'address', + storeName: 'storeName', + pasazhName: 'pasazhName', + memberCode: 'memberCode' }; export type AdminUserScalarFieldEnum = (typeof AdminUserScalarFieldEnum)[keyof typeof AdminUserScalarFieldEnum] + export const AppSessionScalarFieldEnum: { + id: 'id', + jti: 'jti', + subjectId: 'subjectId', + subjectType: 'subjectType', + mobile: 'mobile', + iamSessionId: 'iamSessionId', + iamSub: 'iamSub', + ipAddress: 'ipAddress', + userAgent: 'userAgent', + createdAt: 'createdAt', + expiresAt: 'expiresAt', + lastSeenAt: 'lastSeenAt', + revokedAt: 'revokedAt', + revokedReason: 'revokedReason' + }; + + export type AppSessionScalarFieldEnum = (typeof AppSessionScalarFieldEnum)[keyof typeof AppSessionScalarFieldEnum] + + + export const AdminSessionScalarFieldEnum: { + id: 'id', + jti: 'jti', + adminUserId: 'adminUserId', + iamSessionId: 'iamSessionId', + iamSub: 'iamSub', + ipAddress: 'ipAddress', + userAgent: 'userAgent', + createdAt: 'createdAt', + expiresAt: 'expiresAt', + lastSeenAt: 'lastSeenAt', + revokedAt: 'revokedAt', + revokedReason: 'revokedReason' + }; + + export type AdminSessionScalarFieldEnum = (typeof AdminSessionScalarFieldEnum)[keyof typeof AdminSessionScalarFieldEnum] + + + export const SalesExpertProfileScalarFieldEnum: { + id: 'id', + adminUserId: 'adminUserId', + cityId: 'cityId', + gramLevel: 'gramLevel', + phone: 'phone', + nationalCode: 'nationalCode', + tradingCustomerId: 'tradingCustomerId', + createdAt: 'createdAt', + updatedAt: 'updatedAt' + }; + + export type SalesExpertProfileScalarFieldEnum = (typeof SalesExpertProfileScalarFieldEnum)[keyof typeof SalesExpertProfileScalarFieldEnum] + + export const CustomerScalarFieldEnum: { id: 'id', fullName: 'fullName', + firstName: 'firstName', + lastName: 'lastName', mobile: 'mobile', nationalCode: 'nationalCode', passwordHash: 'passwordHash', cityId: 'cityId', + cityNameRaw: 'cityNameRaw', kind: 'kind', phone: 'phone', address: 'address', @@ -41017,10 +50811,17 @@ export namespace Prisma { goldCreditLimitGrams: 'goldCreditLimitGrams', goldDebtGrams: 'goldDebtGrams', fiatDebtRial: 'fiatDebtRial', + accountingGoldBalance: 'accountingGoldBalance', + accountingRialBalance: 'accountingRialBalance', + accountingBalanceAt: 'accountingBalanceAt', + makingChargeOffsetPercent: 'makingChargeOffsetPercent', verificationStep: 'verificationStep', nationalIdImageUrl: 'nationalIdImageUrl', businessLicenseUrl: 'businessLicenseUrl', shopImageUrl: 'shopImageUrl', + verificationRejectionReason: 'verificationRejectionReason', + verificationRejectedAt: 'verificationRejectedAt', + birthDate: 'birthDate', avatarFileId: 'avatarFileId', canPlaceOrders: 'canPlaceOrders', isActive: 'isActive', @@ -41032,6 +50833,15 @@ export namespace Prisma { export type CustomerScalarFieldEnum = (typeof CustomerScalarFieldEnum)[keyof typeof CustomerScalarFieldEnum] + export const CustomerFavoriteScalarFieldEnum: { + customerId: 'customerId', + productId: 'productId', + createdAt: 'createdAt' + }; + + export type CustomerFavoriteScalarFieldEnum = (typeof CustomerFavoriteScalarFieldEnum)[keyof typeof CustomerFavoriteScalarFieldEnum] + + export const CustomerAddressScalarFieldEnum: { id: 'id', customerId: 'customerId', @@ -41116,7 +50926,10 @@ export namespace Prisma { productCode: 'productCode', showType: 'showType', isActive: 'isActive', - createdAt: 'createdAt' + createdAt: 'createdAt', + accountingStockWeight: 'accountingStockWeight', + accountingStockCount: 'accountingStockCount', + accountingStockAt: 'accountingStockAt' }; export type ProductScalarFieldEnum = (typeof ProductScalarFieldEnum)[keyof typeof ProductScalarFieldEnum] @@ -41142,7 +50955,8 @@ export namespace Prisma { defaultWagePercent: 'defaultWagePercent', qty: 'qty', isPreOrder: 'isPreOrder', - isActive: 'isActive' + isActive: 'isActive', + imageId: 'imageId' }; export type ProductVariantScalarFieldEnum = (typeof ProductVariantScalarFieldEnum)[keyof typeof ProductVariantScalarFieldEnum] @@ -41160,6 +50974,8 @@ export namespace Prisma { flatRialCharge: 'flatRialCharge', isSuspendedOverCreditLimit: 'isSuspendedOverCreditLimit', deliveredAt: 'deliveredAt', + salesAgentId: 'salesAgentId', + referrerCustomerId: 'referrerCustomerId', createdAt: 'createdAt', updatedAt: 'updatedAt' }; @@ -41323,6 +51139,60 @@ export namespace Prisma { export type SettingScalarFieldEnum = (typeof SettingScalarFieldEnum)[keyof typeof SettingScalarFieldEnum] + export const AccountingLinkScalarFieldEnum: { + id: 'id', + provider: 'provider', + entityType: 'entityType', + entityId: 'entityId', + externalCode: 'externalCode', + externalName: 'externalName', + origin: 'origin', + snapshot: 'snapshot', + syncedAt: 'syncedAt', + createdAt: 'createdAt' + }; + + export type AccountingLinkScalarFieldEnum = (typeof AccountingLinkScalarFieldEnum)[keyof typeof AccountingLinkScalarFieldEnum] + + + export const AccountingOutboxScalarFieldEnum: { + id: 'id', + provider: 'provider', + kind: 'kind', + entityId: 'entityId', + status: 'status', + attempts: 'attempts', + nextAttemptAt: 'nextAttemptAt', + lastError: 'lastError', + externalRef: 'externalRef', + progress: 'progress', + lastRequest: 'lastRequest', + lastResponse: 'lastResponse', + sentAt: 'sentAt', + resolvedById: 'resolvedById', + createdAt: 'createdAt', + updatedAt: 'updatedAt' + }; + + export type AccountingOutboxScalarFieldEnum = (typeof AccountingOutboxScalarFieldEnum)[keyof typeof AccountingOutboxScalarFieldEnum] + + + export const AccountingIssueScalarFieldEnum: { + id: 'id', + provider: 'provider', + kind: 'kind', + externalCode: 'externalCode', + entityId: 'entityId', + message: 'message', + data: 'data', + createdAt: 'createdAt', + updatedAt: 'updatedAt', + resolvedAt: 'resolvedAt' + }; + + export type AccountingIssueScalarFieldEnum = (typeof AccountingIssueScalarFieldEnum)[keyof typeof AccountingIssueScalarFieldEnum] + + export const PromotionScalarFieldEnum: { id: 'id', title: 'title', @@ -41446,6 +51316,21 @@ export namespace Prisma { export type UploadedFileScalarFieldEnum = (typeof UploadedFileScalarFieldEnum)[keyof typeof UploadedFileScalarFieldEnum] + export const CustomerOtpScalarFieldEnum: { + id: 'id', + mobile: 'mobile', + customerId: 'customerId', + codeHash: 'codeHash', + expiresAt: 'expiresAt', + attempts: 'attempts', + consumedAt: 'consumedAt', + requestIp: 'requestIp', + createdAt: 'createdAt' + }; + + export type CustomerOtpScalarFieldEnum = (typeof CustomerOtpScalarFieldEnum)[keyof typeof CustomerOtpScalarFieldEnum] + + export const SortOrder: { asc: 'asc', desc: 'desc' @@ -41461,6 +51346,14 @@ export namespace Prisma { export type JsonNullValueInput = (typeof JsonNullValueInput)[keyof typeof JsonNullValueInput] + export const NullableJsonNullValueInput: { + DbNull: typeof DbNull, + JsonNull: typeof JsonNull + }; + + export type NullableJsonNullValueInput = (typeof NullableJsonNullValueInput)[keyof typeof NullableJsonNullValueInput] + + export const QueryMode: { default: 'default', insensitive: 'insensitive' @@ -41715,6 +51608,48 @@ export namespace Prisma { + /** + * Reference to a field of type 'AccountingEntityType' + */ + export type EnumAccountingEntityTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'AccountingEntityType'> + + + + /** + * Reference to a field of type 'AccountingEntityType[]' + */ + export type ListEnumAccountingEntityTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'AccountingEntityType[]'> + + + + /** + * Reference to a field of type 'AccountingOutboxKind' + */ + export type EnumAccountingOutboxKindFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'AccountingOutboxKind'> + + + + /** + * Reference to a field of type 'AccountingOutboxKind[]' + */ + export type ListEnumAccountingOutboxKindFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'AccountingOutboxKind[]'> + + + + /** + * Reference to a field of type 'AccountingOutboxStatus' + */ + export type EnumAccountingOutboxStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'AccountingOutboxStatus'> + + + + /** + * Reference to a field of type 'AccountingOutboxStatus[]' + */ + export type ListEnumAccountingOutboxStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'AccountingOutboxStatus[]'> + + + /** * Reference to a field of type 'PromotionScope' */ @@ -41780,25 +51715,31 @@ export namespace Prisma { NOT?: CityWhereInput | CityWhereInput[] id?: StringFilter<"City"> | string name?: StringFilter<"City"> | string - province?: StringNullableFilter<"City"> | string | null + parentId?: StringNullableFilter<"City"> | string | null percent?: DecimalNullableFilter<"City"> | Decimal | DecimalJsLike | number | string | null percentAux?: DecimalNullableFilter<"City"> | Decimal | DecimalJsLike | number | string | null + parent?: XOR | null + children?: CityListRelationFilter customers?: CustomerListRelationFilter addresses?: CustomerAddressListRelationFilter branches?: BranchListRelationFilter preOrders?: PreOrderListRelationFilter + salesExpertProfiles?: SalesExpertProfileListRelationFilter } export type CityOrderByWithRelationInput = { id?: SortOrder name?: SortOrder - province?: SortOrderInput | SortOrder + parentId?: SortOrderInput | SortOrder percent?: SortOrderInput | SortOrder percentAux?: SortOrderInput | SortOrder + parent?: CityOrderByWithRelationInput + children?: CityOrderByRelationAggregateInput customers?: CustomerOrderByRelationAggregateInput addresses?: CustomerAddressOrderByRelationAggregateInput branches?: BranchOrderByRelationAggregateInput preOrders?: PreOrderOrderByRelationAggregateInput + salesExpertProfiles?: SalesExpertProfileOrderByRelationAggregateInput } export type CityWhereUniqueInput = Prisma.AtLeast<{ @@ -41807,19 +51748,22 @@ export namespace Prisma { OR?: CityWhereInput[] NOT?: CityWhereInput | CityWhereInput[] name?: StringFilter<"City"> | string - province?: StringNullableFilter<"City"> | string | null + parentId?: StringNullableFilter<"City"> | string | null percent?: DecimalNullableFilter<"City"> | Decimal | DecimalJsLike | number | string | null percentAux?: DecimalNullableFilter<"City"> | Decimal | DecimalJsLike | number | string | null + parent?: XOR | null + children?: CityListRelationFilter customers?: CustomerListRelationFilter addresses?: CustomerAddressListRelationFilter branches?: BranchListRelationFilter preOrders?: PreOrderListRelationFilter + salesExpertProfiles?: SalesExpertProfileListRelationFilter }, "id"> export type CityOrderByWithAggregationInput = { id?: SortOrder name?: SortOrder - province?: SortOrderInput | SortOrder + parentId?: SortOrderInput | SortOrder percent?: SortOrderInput | SortOrder percentAux?: SortOrderInput | SortOrder _count?: CityCountOrderByAggregateInput @@ -41835,7 +51779,7 @@ export namespace Prisma { NOT?: CityScalarWhereWithAggregatesInput | CityScalarWhereWithAggregatesInput[] id?: StringWithAggregatesFilter<"City"> | string name?: StringWithAggregatesFilter<"City"> | string - province?: StringNullableWithAggregatesFilter<"City"> | string | null + parentId?: StringNullableWithAggregatesFilter<"City"> | string | null percent?: DecimalNullableWithAggregatesFilter<"City"> | Decimal | DecimalJsLike | number | string | null percentAux?: DecimalNullableWithAggregatesFilter<"City"> | Decimal | DecimalJsLike | number | string | null } @@ -41846,6 +51790,8 @@ export namespace Prisma { NOT?: AdminUserWhereInput | AdminUserWhereInput[] id?: StringFilter<"AdminUser"> | string fullName?: StringFilter<"AdminUser"> | string + firstName?: StringNullableFilter<"AdminUser"> | string | null + lastName?: StringNullableFilter<"AdminUser"> | string | null mobile?: StringFilter<"AdminUser"> | string passwordHash?: StringFilter<"AdminUser"> | string role?: EnumAdminRoleFilter<"AdminUser"> | $Enums.AdminRole @@ -41854,9 +51800,16 @@ export namespace Prisma { wagePercent?: DecimalNullableFilter<"AdminUser"> | Decimal | DecimalJsLike | number | string | null isActive?: BoolFilter<"AdminUser"> | boolean createdAt?: DateTimeFilter<"AdminUser"> | Date | string + avatarFileId?: StringNullableFilter<"AdminUser"> | string | null + address?: StringNullableFilter<"AdminUser"> | string | null + storeName?: StringNullableFilter<"AdminUser"> | string | null + pasazhName?: StringNullableFilter<"AdminUser"> | string | null + memberCode?: StringNullableFilter<"AdminUser"> | string | null userType?: XOR | null branch?: XOR | null + avatarFile?: XOR | null referredCustomers?: CustomerListRelationFilter + creditedOrders?: OrderListRelationFilter supervisedWorkshops?: WorkshopListRelationFilter branchAllocations?: BranchAllocationListRelationFilter postedLedgerEntries?: LedgerEntryListRelationFilter @@ -41865,11 +51818,15 @@ export namespace Prisma { sentSmsMessages?: SmsMessageListRelationFilter sentNotifications?: NotificationListRelationFilter uploadedFiles?: UploadedFileListRelationFilter + salesExpertProfile?: XOR | null + sessions?: AdminSessionListRelationFilter } export type AdminUserOrderByWithRelationInput = { id?: SortOrder fullName?: SortOrder + firstName?: SortOrderInput | SortOrder + lastName?: SortOrderInput | SortOrder mobile?: SortOrder passwordHash?: SortOrder role?: SortOrder @@ -41878,9 +51835,16 @@ export namespace Prisma { wagePercent?: SortOrderInput | SortOrder isActive?: SortOrder createdAt?: SortOrder + avatarFileId?: SortOrderInput | SortOrder + address?: SortOrderInput | SortOrder + storeName?: SortOrderInput | SortOrder + pasazhName?: SortOrderInput | SortOrder + memberCode?: SortOrderInput | SortOrder userType?: UserTypeOrderByWithRelationInput branch?: BranchOrderByWithRelationInput + avatarFile?: UploadedFileOrderByWithRelationInput referredCustomers?: CustomerOrderByRelationAggregateInput + creditedOrders?: OrderOrderByRelationAggregateInput supervisedWorkshops?: WorkshopOrderByRelationAggregateInput branchAllocations?: BranchAllocationOrderByRelationAggregateInput postedLedgerEntries?: LedgerEntryOrderByRelationAggregateInput @@ -41889,6 +51853,8 @@ export namespace Prisma { sentSmsMessages?: SmsMessageOrderByRelationAggregateInput sentNotifications?: NotificationOrderByRelationAggregateInput uploadedFiles?: UploadedFileOrderByRelationAggregateInput + salesExpertProfile?: SalesExpertProfileOrderByWithRelationInput + sessions?: AdminSessionOrderByRelationAggregateInput } export type AdminUserWhereUniqueInput = Prisma.AtLeast<{ @@ -41898,6 +51864,8 @@ export namespace Prisma { OR?: AdminUserWhereInput[] NOT?: AdminUserWhereInput | AdminUserWhereInput[] fullName?: StringFilter<"AdminUser"> | string + firstName?: StringNullableFilter<"AdminUser"> | string | null + lastName?: StringNullableFilter<"AdminUser"> | string | null passwordHash?: StringFilter<"AdminUser"> | string role?: EnumAdminRoleFilter<"AdminUser"> | $Enums.AdminRole userTypeId?: IntNullableFilter<"AdminUser"> | number | null @@ -41905,9 +51873,16 @@ export namespace Prisma { wagePercent?: DecimalNullableFilter<"AdminUser"> | Decimal | DecimalJsLike | number | string | null isActive?: BoolFilter<"AdminUser"> | boolean createdAt?: DateTimeFilter<"AdminUser"> | Date | string + avatarFileId?: StringNullableFilter<"AdminUser"> | string | null + address?: StringNullableFilter<"AdminUser"> | string | null + storeName?: StringNullableFilter<"AdminUser"> | string | null + pasazhName?: StringNullableFilter<"AdminUser"> | string | null + memberCode?: StringNullableFilter<"AdminUser"> | string | null userType?: XOR | null branch?: XOR | null + avatarFile?: XOR | null referredCustomers?: CustomerListRelationFilter + creditedOrders?: OrderListRelationFilter supervisedWorkshops?: WorkshopListRelationFilter branchAllocations?: BranchAllocationListRelationFilter postedLedgerEntries?: LedgerEntryListRelationFilter @@ -41916,11 +51891,15 @@ export namespace Prisma { sentSmsMessages?: SmsMessageListRelationFilter sentNotifications?: NotificationListRelationFilter uploadedFiles?: UploadedFileListRelationFilter + salesExpertProfile?: XOR | null + sessions?: AdminSessionListRelationFilter }, "id" | "mobile"> export type AdminUserOrderByWithAggregationInput = { id?: SortOrder fullName?: SortOrder + firstName?: SortOrderInput | SortOrder + lastName?: SortOrderInput | SortOrder mobile?: SortOrder passwordHash?: SortOrder role?: SortOrder @@ -41929,6 +51908,11 @@ export namespace Prisma { wagePercent?: SortOrderInput | SortOrder isActive?: SortOrder createdAt?: SortOrder + avatarFileId?: SortOrderInput | SortOrder + address?: SortOrderInput | SortOrder + storeName?: SortOrderInput | SortOrder + pasazhName?: SortOrderInput | SortOrder + memberCode?: SortOrderInput | SortOrder _count?: AdminUserCountOrderByAggregateInput _avg?: AdminUserAvgOrderByAggregateInput _max?: AdminUserMaxOrderByAggregateInput @@ -41942,6 +51926,8 @@ export namespace Prisma { NOT?: AdminUserScalarWhereWithAggregatesInput | AdminUserScalarWhereWithAggregatesInput[] id?: StringWithAggregatesFilter<"AdminUser"> | string fullName?: StringWithAggregatesFilter<"AdminUser"> | string + firstName?: StringNullableWithAggregatesFilter<"AdminUser"> | string | null + lastName?: StringNullableWithAggregatesFilter<"AdminUser"> | string | null mobile?: StringWithAggregatesFilter<"AdminUser"> | string passwordHash?: StringWithAggregatesFilter<"AdminUser"> | string role?: EnumAdminRoleWithAggregatesFilter<"AdminUser"> | $Enums.AdminRole @@ -41950,6 +51936,281 @@ export namespace Prisma { wagePercent?: DecimalNullableWithAggregatesFilter<"AdminUser"> | Decimal | DecimalJsLike | number | string | null isActive?: BoolWithAggregatesFilter<"AdminUser"> | boolean createdAt?: DateTimeWithAggregatesFilter<"AdminUser"> | Date | string + avatarFileId?: StringNullableWithAggregatesFilter<"AdminUser"> | string | null + address?: StringNullableWithAggregatesFilter<"AdminUser"> | string | null + storeName?: StringNullableWithAggregatesFilter<"AdminUser"> | string | null + pasazhName?: StringNullableWithAggregatesFilter<"AdminUser"> | string | null + memberCode?: StringNullableWithAggregatesFilter<"AdminUser"> | string | null + } + + export type AppSessionWhereInput = { + AND?: AppSessionWhereInput | AppSessionWhereInput[] + OR?: AppSessionWhereInput[] + NOT?: AppSessionWhereInput | AppSessionWhereInput[] + id?: StringFilter<"AppSession"> | string + jti?: StringFilter<"AppSession"> | string + subjectId?: StringFilter<"AppSession"> | string + subjectType?: StringFilter<"AppSession"> | string + mobile?: StringNullableFilter<"AppSession"> | string | null + iamSessionId?: StringNullableFilter<"AppSession"> | string | null + iamSub?: StringNullableFilter<"AppSession"> | string | null + ipAddress?: StringNullableFilter<"AppSession"> | string | null + userAgent?: StringNullableFilter<"AppSession"> | string | null + createdAt?: DateTimeFilter<"AppSession"> | Date | string + expiresAt?: DateTimeNullableFilter<"AppSession"> | Date | string | null + lastSeenAt?: DateTimeNullableFilter<"AppSession"> | Date | string | null + revokedAt?: DateTimeNullableFilter<"AppSession"> | Date | string | null + revokedReason?: StringNullableFilter<"AppSession"> | string | null + } + + export type AppSessionOrderByWithRelationInput = { + id?: SortOrder + jti?: SortOrder + subjectId?: SortOrder + subjectType?: SortOrder + mobile?: SortOrderInput | SortOrder + iamSessionId?: SortOrderInput | SortOrder + iamSub?: SortOrderInput | SortOrder + ipAddress?: SortOrderInput | SortOrder + userAgent?: SortOrderInput | SortOrder + createdAt?: SortOrder + expiresAt?: SortOrderInput | SortOrder + lastSeenAt?: SortOrderInput | SortOrder + revokedAt?: SortOrderInput | SortOrder + revokedReason?: SortOrderInput | SortOrder + } + + export type AppSessionWhereUniqueInput = Prisma.AtLeast<{ + id?: string + jti?: string + AND?: AppSessionWhereInput | AppSessionWhereInput[] + OR?: AppSessionWhereInput[] + NOT?: AppSessionWhereInput | AppSessionWhereInput[] + subjectId?: StringFilter<"AppSession"> | string + subjectType?: StringFilter<"AppSession"> | string + mobile?: StringNullableFilter<"AppSession"> | string | null + iamSessionId?: StringNullableFilter<"AppSession"> | string | null + iamSub?: StringNullableFilter<"AppSession"> | string | null + ipAddress?: StringNullableFilter<"AppSession"> | string | null + userAgent?: StringNullableFilter<"AppSession"> | string | null + createdAt?: DateTimeFilter<"AppSession"> | Date | string + expiresAt?: DateTimeNullableFilter<"AppSession"> | Date | string | null + lastSeenAt?: DateTimeNullableFilter<"AppSession"> | Date | string | null + revokedAt?: DateTimeNullableFilter<"AppSession"> | Date | string | null + revokedReason?: StringNullableFilter<"AppSession"> | string | null + }, "id" | "jti"> + + export type AppSessionOrderByWithAggregationInput = { + id?: SortOrder + jti?: SortOrder + subjectId?: SortOrder + subjectType?: SortOrder + mobile?: SortOrderInput | SortOrder + iamSessionId?: SortOrderInput | SortOrder + iamSub?: SortOrderInput | SortOrder + ipAddress?: SortOrderInput | SortOrder + userAgent?: SortOrderInput | SortOrder + createdAt?: SortOrder + expiresAt?: SortOrderInput | SortOrder + lastSeenAt?: SortOrderInput | SortOrder + revokedAt?: SortOrderInput | SortOrder + revokedReason?: SortOrderInput | SortOrder + _count?: AppSessionCountOrderByAggregateInput + _max?: AppSessionMaxOrderByAggregateInput + _min?: AppSessionMinOrderByAggregateInput + } + + export type AppSessionScalarWhereWithAggregatesInput = { + AND?: AppSessionScalarWhereWithAggregatesInput | AppSessionScalarWhereWithAggregatesInput[] + OR?: AppSessionScalarWhereWithAggregatesInput[] + NOT?: AppSessionScalarWhereWithAggregatesInput | AppSessionScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"AppSession"> | string + jti?: StringWithAggregatesFilter<"AppSession"> | string + subjectId?: StringWithAggregatesFilter<"AppSession"> | string + subjectType?: StringWithAggregatesFilter<"AppSession"> | string + mobile?: StringNullableWithAggregatesFilter<"AppSession"> | string | null + iamSessionId?: StringNullableWithAggregatesFilter<"AppSession"> | string | null + iamSub?: StringNullableWithAggregatesFilter<"AppSession"> | string | null + ipAddress?: StringNullableWithAggregatesFilter<"AppSession"> | string | null + userAgent?: StringNullableWithAggregatesFilter<"AppSession"> | string | null + createdAt?: DateTimeWithAggregatesFilter<"AppSession"> | Date | string + expiresAt?: DateTimeNullableWithAggregatesFilter<"AppSession"> | Date | string | null + lastSeenAt?: DateTimeNullableWithAggregatesFilter<"AppSession"> | Date | string | null + revokedAt?: DateTimeNullableWithAggregatesFilter<"AppSession"> | Date | string | null + revokedReason?: StringNullableWithAggregatesFilter<"AppSession"> | string | null + } + + export type AdminSessionWhereInput = { + AND?: AdminSessionWhereInput | AdminSessionWhereInput[] + OR?: AdminSessionWhereInput[] + NOT?: AdminSessionWhereInput | AdminSessionWhereInput[] + id?: StringFilter<"AdminSession"> | string + jti?: StringFilter<"AdminSession"> | string + adminUserId?: StringFilter<"AdminSession"> | string + iamSessionId?: StringNullableFilter<"AdminSession"> | string | null + iamSub?: StringNullableFilter<"AdminSession"> | string | null + ipAddress?: StringNullableFilter<"AdminSession"> | string | null + userAgent?: StringNullableFilter<"AdminSession"> | string | null + createdAt?: DateTimeFilter<"AdminSession"> | Date | string + expiresAt?: DateTimeNullableFilter<"AdminSession"> | Date | string | null + lastSeenAt?: DateTimeNullableFilter<"AdminSession"> | Date | string | null + revokedAt?: DateTimeNullableFilter<"AdminSession"> | Date | string | null + revokedReason?: StringNullableFilter<"AdminSession"> | string | null + adminUser?: XOR + } + + export type AdminSessionOrderByWithRelationInput = { + id?: SortOrder + jti?: SortOrder + adminUserId?: SortOrder + iamSessionId?: SortOrderInput | SortOrder + iamSub?: SortOrderInput | SortOrder + ipAddress?: SortOrderInput | SortOrder + userAgent?: SortOrderInput | SortOrder + createdAt?: SortOrder + expiresAt?: SortOrderInput | SortOrder + lastSeenAt?: SortOrderInput | SortOrder + revokedAt?: SortOrderInput | SortOrder + revokedReason?: SortOrderInput | SortOrder + adminUser?: AdminUserOrderByWithRelationInput + } + + export type AdminSessionWhereUniqueInput = Prisma.AtLeast<{ + id?: string + jti?: string + AND?: AdminSessionWhereInput | AdminSessionWhereInput[] + OR?: AdminSessionWhereInput[] + NOT?: AdminSessionWhereInput | AdminSessionWhereInput[] + adminUserId?: StringFilter<"AdminSession"> | string + iamSessionId?: StringNullableFilter<"AdminSession"> | string | null + iamSub?: StringNullableFilter<"AdminSession"> | string | null + ipAddress?: StringNullableFilter<"AdminSession"> | string | null + userAgent?: StringNullableFilter<"AdminSession"> | string | null + createdAt?: DateTimeFilter<"AdminSession"> | Date | string + expiresAt?: DateTimeNullableFilter<"AdminSession"> | Date | string | null + lastSeenAt?: DateTimeNullableFilter<"AdminSession"> | Date | string | null + revokedAt?: DateTimeNullableFilter<"AdminSession"> | Date | string | null + revokedReason?: StringNullableFilter<"AdminSession"> | string | null + adminUser?: XOR + }, "id" | "jti"> + + export type AdminSessionOrderByWithAggregationInput = { + id?: SortOrder + jti?: SortOrder + adminUserId?: SortOrder + iamSessionId?: SortOrderInput | SortOrder + iamSub?: SortOrderInput | SortOrder + ipAddress?: SortOrderInput | SortOrder + userAgent?: SortOrderInput | SortOrder + createdAt?: SortOrder + expiresAt?: SortOrderInput | SortOrder + lastSeenAt?: SortOrderInput | SortOrder + revokedAt?: SortOrderInput | SortOrder + revokedReason?: SortOrderInput | SortOrder + _count?: AdminSessionCountOrderByAggregateInput + _max?: AdminSessionMaxOrderByAggregateInput + _min?: AdminSessionMinOrderByAggregateInput + } + + export type AdminSessionScalarWhereWithAggregatesInput = { + AND?: AdminSessionScalarWhereWithAggregatesInput | AdminSessionScalarWhereWithAggregatesInput[] + OR?: AdminSessionScalarWhereWithAggregatesInput[] + NOT?: AdminSessionScalarWhereWithAggregatesInput | AdminSessionScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"AdminSession"> | string + jti?: StringWithAggregatesFilter<"AdminSession"> | string + adminUserId?: StringWithAggregatesFilter<"AdminSession"> | string + iamSessionId?: StringNullableWithAggregatesFilter<"AdminSession"> | string | null + iamSub?: StringNullableWithAggregatesFilter<"AdminSession"> | string | null + ipAddress?: StringNullableWithAggregatesFilter<"AdminSession"> | string | null + userAgent?: StringNullableWithAggregatesFilter<"AdminSession"> | string | null + createdAt?: DateTimeWithAggregatesFilter<"AdminSession"> | Date | string + expiresAt?: DateTimeNullableWithAggregatesFilter<"AdminSession"> | Date | string | null + lastSeenAt?: DateTimeNullableWithAggregatesFilter<"AdminSession"> | Date | string | null + revokedAt?: DateTimeNullableWithAggregatesFilter<"AdminSession"> | Date | string | null + revokedReason?: StringNullableWithAggregatesFilter<"AdminSession"> | string | null + } + + export type SalesExpertProfileWhereInput = { + AND?: SalesExpertProfileWhereInput | SalesExpertProfileWhereInput[] + OR?: SalesExpertProfileWhereInput[] + NOT?: SalesExpertProfileWhereInput | SalesExpertProfileWhereInput[] + id?: StringFilter<"SalesExpertProfile"> | string + adminUserId?: StringFilter<"SalesExpertProfile"> | string + cityId?: StringNullableFilter<"SalesExpertProfile"> | string | null + gramLevel?: DecimalFilter<"SalesExpertProfile"> | Decimal | DecimalJsLike | number | string + phone?: StringNullableFilter<"SalesExpertProfile"> | string | null + nationalCode?: StringNullableFilter<"SalesExpertProfile"> | string | null + tradingCustomerId?: StringNullableFilter<"SalesExpertProfile"> | string | null + createdAt?: DateTimeFilter<"SalesExpertProfile"> | Date | string + updatedAt?: DateTimeFilter<"SalesExpertProfile"> | Date | string + adminUser?: XOR + city?: XOR | null + tradingCustomer?: XOR | null + } + + export type SalesExpertProfileOrderByWithRelationInput = { + id?: SortOrder + adminUserId?: SortOrder + cityId?: SortOrderInput | SortOrder + gramLevel?: SortOrder + phone?: SortOrderInput | SortOrder + nationalCode?: SortOrderInput | SortOrder + tradingCustomerId?: SortOrderInput | SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + adminUser?: AdminUserOrderByWithRelationInput + city?: CityOrderByWithRelationInput + tradingCustomer?: CustomerOrderByWithRelationInput + } + + export type SalesExpertProfileWhereUniqueInput = Prisma.AtLeast<{ + id?: string + adminUserId?: string + tradingCustomerId?: string + AND?: SalesExpertProfileWhereInput | SalesExpertProfileWhereInput[] + OR?: SalesExpertProfileWhereInput[] + NOT?: SalesExpertProfileWhereInput | SalesExpertProfileWhereInput[] + cityId?: StringNullableFilter<"SalesExpertProfile"> | string | null + gramLevel?: DecimalFilter<"SalesExpertProfile"> | Decimal | DecimalJsLike | number | string + phone?: StringNullableFilter<"SalesExpertProfile"> | string | null + nationalCode?: StringNullableFilter<"SalesExpertProfile"> | string | null + createdAt?: DateTimeFilter<"SalesExpertProfile"> | Date | string + updatedAt?: DateTimeFilter<"SalesExpertProfile"> | Date | string + adminUser?: XOR + city?: XOR | null + tradingCustomer?: XOR | null + }, "id" | "adminUserId" | "tradingCustomerId"> + + export type SalesExpertProfileOrderByWithAggregationInput = { + id?: SortOrder + adminUserId?: SortOrder + cityId?: SortOrderInput | SortOrder + gramLevel?: SortOrder + phone?: SortOrderInput | SortOrder + nationalCode?: SortOrderInput | SortOrder + tradingCustomerId?: SortOrderInput | SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + _count?: SalesExpertProfileCountOrderByAggregateInput + _avg?: SalesExpertProfileAvgOrderByAggregateInput + _max?: SalesExpertProfileMaxOrderByAggregateInput + _min?: SalesExpertProfileMinOrderByAggregateInput + _sum?: SalesExpertProfileSumOrderByAggregateInput + } + + export type SalesExpertProfileScalarWhereWithAggregatesInput = { + AND?: SalesExpertProfileScalarWhereWithAggregatesInput | SalesExpertProfileScalarWhereWithAggregatesInput[] + OR?: SalesExpertProfileScalarWhereWithAggregatesInput[] + NOT?: SalesExpertProfileScalarWhereWithAggregatesInput | SalesExpertProfileScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"SalesExpertProfile"> | string + adminUserId?: StringWithAggregatesFilter<"SalesExpertProfile"> | string + cityId?: StringNullableWithAggregatesFilter<"SalesExpertProfile"> | string | null + gramLevel?: DecimalWithAggregatesFilter<"SalesExpertProfile"> | Decimal | DecimalJsLike | number | string + phone?: StringNullableWithAggregatesFilter<"SalesExpertProfile"> | string | null + nationalCode?: StringNullableWithAggregatesFilter<"SalesExpertProfile"> | string | null + tradingCustomerId?: StringNullableWithAggregatesFilter<"SalesExpertProfile"> | string | null + createdAt?: DateTimeWithAggregatesFilter<"SalesExpertProfile"> | Date | string + updatedAt?: DateTimeWithAggregatesFilter<"SalesExpertProfile"> | Date | string } export type CustomerWhereInput = { @@ -41958,10 +52219,13 @@ export namespace Prisma { NOT?: CustomerWhereInput | CustomerWhereInput[] id?: StringFilter<"Customer"> | string fullName?: StringFilter<"Customer"> | string + firstName?: StringNullableFilter<"Customer"> | string | null + lastName?: StringNullableFilter<"Customer"> | string | null mobile?: StringFilter<"Customer"> | string - nationalCode?: StringFilter<"Customer"> | string + nationalCode?: StringNullableFilter<"Customer"> | string | null passwordHash?: StringFilter<"Customer"> | string cityId?: StringNullableFilter<"Customer"> | string | null + cityNameRaw?: StringNullableFilter<"Customer"> | string | null kind?: EnumCustomerKindFilter<"Customer"> | $Enums.CustomerKind phone?: StringNullableFilter<"Customer"> | string | null address?: StringNullableFilter<"Customer"> | string | null @@ -41973,10 +52237,17 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFilter<"Customer"> | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFilter<"Customer"> | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFilter<"Customer"> | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: DecimalNullableFilter<"Customer"> | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: DecimalNullableFilter<"Customer"> | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: DateTimeNullableFilter<"Customer"> | Date | string | null + makingChargeOffsetPercent?: DecimalFilter<"Customer"> | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFilter<"Customer"> | $Enums.VerificationStep nationalIdImageUrl?: StringNullableFilter<"Customer"> | string | null businessLicenseUrl?: StringNullableFilter<"Customer"> | string | null shopImageUrl?: StringNullableFilter<"Customer"> | string | null + verificationRejectionReason?: StringNullableFilter<"Customer"> | string | null + verificationRejectedAt?: DateTimeNullableFilter<"Customer"> | Date | string | null + birthDate?: DateTimeNullableFilter<"Customer"> | Date | string | null avatarFileId?: StringNullableFilter<"Customer"> | string | null canPlaceOrders?: BoolFilter<"Customer"> | boolean isActive?: BoolFilter<"Customer"> | boolean @@ -41985,6 +52256,8 @@ export namespace Prisma { updatedAt?: DateTimeFilter<"Customer"> | Date | string city?: XOR | null referredByAgent?: XOR | null + salesExpertTradingFor?: XOR | null + referredOrders?: OrderListRelationFilter avatarFile?: XOR | null addresses?: CustomerAddressListRelationFilter orders?: OrderListRelationFilter @@ -41995,15 +52268,20 @@ export namespace Prisma { promotions?: PromotionListRelationFilter notifications?: NotificationRecipientListRelationFilter activityLogs?: CustomerActivityLogListRelationFilter + otpChallenges?: CustomerOtpListRelationFilter + favorites?: CustomerFavoriteListRelationFilter } export type CustomerOrderByWithRelationInput = { id?: SortOrder fullName?: SortOrder + firstName?: SortOrderInput | SortOrder + lastName?: SortOrderInput | SortOrder mobile?: SortOrder - nationalCode?: SortOrder + nationalCode?: SortOrderInput | SortOrder passwordHash?: SortOrder cityId?: SortOrderInput | SortOrder + cityNameRaw?: SortOrderInput | SortOrder kind?: SortOrder phone?: SortOrderInput | SortOrder address?: SortOrderInput | SortOrder @@ -42015,10 +52293,17 @@ export namespace Prisma { goldCreditLimitGrams?: SortOrder goldDebtGrams?: SortOrder fiatDebtRial?: SortOrder + accountingGoldBalance?: SortOrderInput | SortOrder + accountingRialBalance?: SortOrderInput | SortOrder + accountingBalanceAt?: SortOrderInput | SortOrder + makingChargeOffsetPercent?: SortOrder verificationStep?: SortOrder nationalIdImageUrl?: SortOrderInput | SortOrder businessLicenseUrl?: SortOrderInput | SortOrder shopImageUrl?: SortOrderInput | SortOrder + verificationRejectionReason?: SortOrderInput | SortOrder + verificationRejectedAt?: SortOrderInput | SortOrder + birthDate?: SortOrderInput | SortOrder avatarFileId?: SortOrderInput | SortOrder canPlaceOrders?: SortOrder isActive?: SortOrder @@ -42027,6 +52312,8 @@ export namespace Prisma { updatedAt?: SortOrder city?: CityOrderByWithRelationInput referredByAgent?: AdminUserOrderByWithRelationInput + salesExpertTradingFor?: SalesExpertProfileOrderByWithRelationInput + referredOrders?: OrderOrderByRelationAggregateInput avatarFile?: UploadedFileOrderByWithRelationInput addresses?: CustomerAddressOrderByRelationAggregateInput orders?: OrderOrderByRelationAggregateInput @@ -42037,6 +52324,8 @@ export namespace Prisma { promotions?: PromotionOrderByRelationAggregateInput notifications?: NotificationRecipientOrderByRelationAggregateInput activityLogs?: CustomerActivityLogOrderByRelationAggregateInput + otpChallenges?: CustomerOtpOrderByRelationAggregateInput + favorites?: CustomerFavoriteOrderByRelationAggregateInput } export type CustomerWhereUniqueInput = Prisma.AtLeast<{ @@ -42047,8 +52336,11 @@ export namespace Prisma { OR?: CustomerWhereInput[] NOT?: CustomerWhereInput | CustomerWhereInput[] fullName?: StringFilter<"Customer"> | string + firstName?: StringNullableFilter<"Customer"> | string | null + lastName?: StringNullableFilter<"Customer"> | string | null passwordHash?: StringFilter<"Customer"> | string cityId?: StringNullableFilter<"Customer"> | string | null + cityNameRaw?: StringNullableFilter<"Customer"> | string | null kind?: EnumCustomerKindFilter<"Customer"> | $Enums.CustomerKind phone?: StringNullableFilter<"Customer"> | string | null address?: StringNullableFilter<"Customer"> | string | null @@ -42060,10 +52352,17 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFilter<"Customer"> | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFilter<"Customer"> | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFilter<"Customer"> | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: DecimalNullableFilter<"Customer"> | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: DecimalNullableFilter<"Customer"> | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: DateTimeNullableFilter<"Customer"> | Date | string | null + makingChargeOffsetPercent?: DecimalFilter<"Customer"> | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFilter<"Customer"> | $Enums.VerificationStep nationalIdImageUrl?: StringNullableFilter<"Customer"> | string | null businessLicenseUrl?: StringNullableFilter<"Customer"> | string | null shopImageUrl?: StringNullableFilter<"Customer"> | string | null + verificationRejectionReason?: StringNullableFilter<"Customer"> | string | null + verificationRejectedAt?: DateTimeNullableFilter<"Customer"> | Date | string | null + birthDate?: DateTimeNullableFilter<"Customer"> | Date | string | null avatarFileId?: StringNullableFilter<"Customer"> | string | null canPlaceOrders?: BoolFilter<"Customer"> | boolean isActive?: BoolFilter<"Customer"> | boolean @@ -42072,6 +52371,8 @@ export namespace Prisma { updatedAt?: DateTimeFilter<"Customer"> | Date | string city?: XOR | null referredByAgent?: XOR | null + salesExpertTradingFor?: XOR | null + referredOrders?: OrderListRelationFilter avatarFile?: XOR | null addresses?: CustomerAddressListRelationFilter orders?: OrderListRelationFilter @@ -42082,15 +52383,20 @@ export namespace Prisma { promotions?: PromotionListRelationFilter notifications?: NotificationRecipientListRelationFilter activityLogs?: CustomerActivityLogListRelationFilter + otpChallenges?: CustomerOtpListRelationFilter + favorites?: CustomerFavoriteListRelationFilter }, "id" | "mobile" | "nationalCode"> export type CustomerOrderByWithAggregationInput = { id?: SortOrder fullName?: SortOrder + firstName?: SortOrderInput | SortOrder + lastName?: SortOrderInput | SortOrder mobile?: SortOrder - nationalCode?: SortOrder + nationalCode?: SortOrderInput | SortOrder passwordHash?: SortOrder cityId?: SortOrderInput | SortOrder + cityNameRaw?: SortOrderInput | SortOrder kind?: SortOrder phone?: SortOrderInput | SortOrder address?: SortOrderInput | SortOrder @@ -42102,10 +52408,17 @@ export namespace Prisma { goldCreditLimitGrams?: SortOrder goldDebtGrams?: SortOrder fiatDebtRial?: SortOrder + accountingGoldBalance?: SortOrderInput | SortOrder + accountingRialBalance?: SortOrderInput | SortOrder + accountingBalanceAt?: SortOrderInput | SortOrder + makingChargeOffsetPercent?: SortOrder verificationStep?: SortOrder nationalIdImageUrl?: SortOrderInput | SortOrder businessLicenseUrl?: SortOrderInput | SortOrder shopImageUrl?: SortOrderInput | SortOrder + verificationRejectionReason?: SortOrderInput | SortOrder + verificationRejectedAt?: SortOrderInput | SortOrder + birthDate?: SortOrderInput | SortOrder avatarFileId?: SortOrderInput | SortOrder canPlaceOrders?: SortOrder isActive?: SortOrder @@ -42125,10 +52438,13 @@ export namespace Prisma { NOT?: CustomerScalarWhereWithAggregatesInput | CustomerScalarWhereWithAggregatesInput[] id?: StringWithAggregatesFilter<"Customer"> | string fullName?: StringWithAggregatesFilter<"Customer"> | string + firstName?: StringNullableWithAggregatesFilter<"Customer"> | string | null + lastName?: StringNullableWithAggregatesFilter<"Customer"> | string | null mobile?: StringWithAggregatesFilter<"Customer"> | string - nationalCode?: StringWithAggregatesFilter<"Customer"> | string + nationalCode?: StringNullableWithAggregatesFilter<"Customer"> | string | null passwordHash?: StringWithAggregatesFilter<"Customer"> | string cityId?: StringNullableWithAggregatesFilter<"Customer"> | string | null + cityNameRaw?: StringNullableWithAggregatesFilter<"Customer"> | string | null kind?: EnumCustomerKindWithAggregatesFilter<"Customer"> | $Enums.CustomerKind phone?: StringNullableWithAggregatesFilter<"Customer"> | string | null address?: StringNullableWithAggregatesFilter<"Customer"> | string | null @@ -42140,10 +52456,17 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalWithAggregatesFilter<"Customer"> | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalWithAggregatesFilter<"Customer"> | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalWithAggregatesFilter<"Customer"> | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: DecimalNullableWithAggregatesFilter<"Customer"> | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: DecimalNullableWithAggregatesFilter<"Customer"> | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: DateTimeNullableWithAggregatesFilter<"Customer"> | Date | string | null + makingChargeOffsetPercent?: DecimalWithAggregatesFilter<"Customer"> | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepWithAggregatesFilter<"Customer"> | $Enums.VerificationStep nationalIdImageUrl?: StringNullableWithAggregatesFilter<"Customer"> | string | null businessLicenseUrl?: StringNullableWithAggregatesFilter<"Customer"> | string | null shopImageUrl?: StringNullableWithAggregatesFilter<"Customer"> | string | null + verificationRejectionReason?: StringNullableWithAggregatesFilter<"Customer"> | string | null + verificationRejectedAt?: DateTimeNullableWithAggregatesFilter<"Customer"> | Date | string | null + birthDate?: DateTimeNullableWithAggregatesFilter<"Customer"> | Date | string | null avatarFileId?: StringNullableWithAggregatesFilter<"Customer"> | string | null canPlaceOrders?: BoolWithAggregatesFilter<"Customer"> | boolean isActive?: BoolWithAggregatesFilter<"Customer"> | boolean @@ -42152,6 +52475,55 @@ export namespace Prisma { updatedAt?: DateTimeWithAggregatesFilter<"Customer"> | Date | string } + export type CustomerFavoriteWhereInput = { + AND?: CustomerFavoriteWhereInput | CustomerFavoriteWhereInput[] + OR?: CustomerFavoriteWhereInput[] + NOT?: CustomerFavoriteWhereInput | CustomerFavoriteWhereInput[] + customerId?: StringFilter<"CustomerFavorite"> | string + productId?: StringFilter<"CustomerFavorite"> | string + createdAt?: DateTimeFilter<"CustomerFavorite"> | Date | string + customer?: XOR + product?: XOR + } + + export type CustomerFavoriteOrderByWithRelationInput = { + customerId?: SortOrder + productId?: SortOrder + createdAt?: SortOrder + customer?: CustomerOrderByWithRelationInput + product?: ProductOrderByWithRelationInput + } + + export type CustomerFavoriteWhereUniqueInput = Prisma.AtLeast<{ + customerId_productId?: CustomerFavoriteCustomerIdProductIdCompoundUniqueInput + AND?: CustomerFavoriteWhereInput | CustomerFavoriteWhereInput[] + OR?: CustomerFavoriteWhereInput[] + NOT?: CustomerFavoriteWhereInput | CustomerFavoriteWhereInput[] + customerId?: StringFilter<"CustomerFavorite"> | string + productId?: StringFilter<"CustomerFavorite"> | string + createdAt?: DateTimeFilter<"CustomerFavorite"> | Date | string + customer?: XOR + product?: XOR + }, "customerId_productId"> + + export type CustomerFavoriteOrderByWithAggregationInput = { + customerId?: SortOrder + productId?: SortOrder + createdAt?: SortOrder + _count?: CustomerFavoriteCountOrderByAggregateInput + _max?: CustomerFavoriteMaxOrderByAggregateInput + _min?: CustomerFavoriteMinOrderByAggregateInput + } + + export type CustomerFavoriteScalarWhereWithAggregatesInput = { + AND?: CustomerFavoriteScalarWhereWithAggregatesInput | CustomerFavoriteScalarWhereWithAggregatesInput[] + OR?: CustomerFavoriteScalarWhereWithAggregatesInput[] + NOT?: CustomerFavoriteScalarWhereWithAggregatesInput | CustomerFavoriteScalarWhereWithAggregatesInput[] + customerId?: StringWithAggregatesFilter<"CustomerFavorite"> | string + productId?: StringWithAggregatesFilter<"CustomerFavorite"> | string + createdAt?: DateTimeWithAggregatesFilter<"CustomerFavorite"> | Date | string + } + export type CustomerAddressWhereInput = { AND?: CustomerAddressWhereInput | CustomerAddressWhereInput[] OR?: CustomerAddressWhereInput[] @@ -42573,6 +52945,9 @@ export namespace Prisma { showType?: IntFilter<"Product"> | number isActive?: BoolFilter<"Product"> | boolean createdAt?: DateTimeFilter<"Product"> | Date | string + accountingStockWeight?: DecimalNullableFilter<"Product"> | Decimal | DecimalJsLike | number | string | null + accountingStockCount?: DecimalNullableFilter<"Product"> | Decimal | DecimalJsLike | number | string | null + accountingStockAt?: DateTimeNullableFilter<"Product"> | Date | string | null category?: XOR | null brand?: XOR | null variants?: ProductVariantListRelationFilter @@ -42581,6 +52956,7 @@ export namespace Prisma { comments?: CommentListRelationFilter promotions?: PromotionListRelationFilter allocationItems?: BranchAllocationItemListRelationFilter + favoritedBy?: CustomerFavoriteListRelationFilter } export type ProductOrderByWithRelationInput = { @@ -42593,6 +52969,9 @@ export namespace Prisma { showType?: SortOrder isActive?: SortOrder createdAt?: SortOrder + accountingStockWeight?: SortOrderInput | SortOrder + accountingStockCount?: SortOrderInput | SortOrder + accountingStockAt?: SortOrderInput | SortOrder category?: CategoryOrderByWithRelationInput brand?: BrandOrderByWithRelationInput variants?: ProductVariantOrderByRelationAggregateInput @@ -42601,6 +52980,7 @@ export namespace Prisma { comments?: CommentOrderByRelationAggregateInput promotions?: PromotionOrderByRelationAggregateInput allocationItems?: BranchAllocationItemOrderByRelationAggregateInput + favoritedBy?: CustomerFavoriteOrderByRelationAggregateInput } export type ProductWhereUniqueInput = Prisma.AtLeast<{ @@ -42616,6 +52996,9 @@ export namespace Prisma { showType?: IntFilter<"Product"> | number isActive?: BoolFilter<"Product"> | boolean createdAt?: DateTimeFilter<"Product"> | Date | string + accountingStockWeight?: DecimalNullableFilter<"Product"> | Decimal | DecimalJsLike | number | string | null + accountingStockCount?: DecimalNullableFilter<"Product"> | Decimal | DecimalJsLike | number | string | null + accountingStockAt?: DateTimeNullableFilter<"Product"> | Date | string | null category?: XOR | null brand?: XOR | null variants?: ProductVariantListRelationFilter @@ -42624,6 +53007,7 @@ export namespace Prisma { comments?: CommentListRelationFilter promotions?: PromotionListRelationFilter allocationItems?: BranchAllocationItemListRelationFilter + favoritedBy?: CustomerFavoriteListRelationFilter }, "id" | "productCode"> export type ProductOrderByWithAggregationInput = { @@ -42636,6 +53020,9 @@ export namespace Prisma { showType?: SortOrder isActive?: SortOrder createdAt?: SortOrder + accountingStockWeight?: SortOrderInput | SortOrder + accountingStockCount?: SortOrderInput | SortOrder + accountingStockAt?: SortOrderInput | SortOrder _count?: ProductCountOrderByAggregateInput _avg?: ProductAvgOrderByAggregateInput _max?: ProductMaxOrderByAggregateInput @@ -42656,6 +53043,9 @@ export namespace Prisma { showType?: IntWithAggregatesFilter<"Product"> | number isActive?: BoolWithAggregatesFilter<"Product"> | boolean createdAt?: DateTimeWithAggregatesFilter<"Product"> | Date | string + accountingStockWeight?: DecimalNullableWithAggregatesFilter<"Product"> | Decimal | DecimalJsLike | number | string | null + accountingStockCount?: DecimalNullableWithAggregatesFilter<"Product"> | Decimal | DecimalJsLike | number | string | null + accountingStockAt?: DateTimeNullableWithAggregatesFilter<"Product"> | Date | string | null } export type ProductImageWhereInput = { @@ -42668,6 +53058,7 @@ export namespace Prisma { sortOrder?: IntFilter<"ProductImage"> | number role?: EnumProductImageRoleFilter<"ProductImage"> | $Enums.ProductImageRole product?: XOR + variants?: ProductVariantListRelationFilter } export type ProductImageOrderByWithRelationInput = { @@ -42677,6 +53068,7 @@ export namespace Prisma { sortOrder?: SortOrder role?: SortOrder product?: ProductOrderByWithRelationInput + variants?: ProductVariantOrderByRelationAggregateInput } export type ProductImageWhereUniqueInput = Prisma.AtLeast<{ @@ -42689,6 +53081,7 @@ export namespace Prisma { sortOrder?: IntFilter<"ProductImage"> | number role?: EnumProductImageRoleFilter<"ProductImage"> | $Enums.ProductImageRole product?: XOR + variants?: ProductVariantListRelationFilter }, "id"> export type ProductImageOrderByWithAggregationInput = { @@ -42728,7 +53121,9 @@ export namespace Prisma { qty?: IntFilter<"ProductVariant"> | number isPreOrder?: BoolFilter<"ProductVariant"> | boolean isActive?: BoolFilter<"ProductVariant"> | boolean + imageId?: StringNullableFilter<"ProductVariant"> | string | null product?: XOR + image?: XOR | null orderItems?: OrderItemListRelationFilter } @@ -42742,7 +53137,9 @@ export namespace Prisma { qty?: SortOrder isPreOrder?: SortOrder isActive?: SortOrder + imageId?: SortOrderInput | SortOrder product?: ProductOrderByWithRelationInput + image?: ProductImageOrderByWithRelationInput orderItems?: OrderItemOrderByRelationAggregateInput } @@ -42759,7 +53156,9 @@ export namespace Prisma { qty?: IntFilter<"ProductVariant"> | number isPreOrder?: BoolFilter<"ProductVariant"> | boolean isActive?: BoolFilter<"ProductVariant"> | boolean + imageId?: StringNullableFilter<"ProductVariant"> | string | null product?: XOR + image?: XOR | null orderItems?: OrderItemListRelationFilter }, "id" | "sku"> @@ -42773,6 +53172,7 @@ export namespace Prisma { qty?: SortOrder isPreOrder?: SortOrder isActive?: SortOrder + imageId?: SortOrderInput | SortOrder _count?: ProductVariantCountOrderByAggregateInput _avg?: ProductVariantAvgOrderByAggregateInput _max?: ProductVariantMaxOrderByAggregateInput @@ -42793,6 +53193,7 @@ export namespace Prisma { qty?: IntWithAggregatesFilter<"ProductVariant"> | number isPreOrder?: BoolWithAggregatesFilter<"ProductVariant"> | boolean isActive?: BoolWithAggregatesFilter<"ProductVariant"> | boolean + imageId?: StringNullableWithAggregatesFilter<"ProductVariant"> | string | null } export type OrderWhereInput = { @@ -42810,10 +53211,14 @@ export namespace Prisma { flatRialCharge?: DecimalFilter<"Order"> | Decimal | DecimalJsLike | number | string isSuspendedOverCreditLimit?: BoolFilter<"Order"> | boolean deliveredAt?: DateTimeNullableFilter<"Order"> | Date | string | null + salesAgentId?: StringNullableFilter<"Order"> | string | null + referrerCustomerId?: StringNullableFilter<"Order"> | string | null createdAt?: DateTimeFilter<"Order"> | Date | string updatedAt?: DateTimeFilter<"Order"> | Date | string customer?: XOR branch?: XOR | null + salesAgent?: XOR | null + referrerCustomer?: XOR | null items?: OrderItemListRelationFilter statusEvents?: OrderStatusEventListRelationFilter ledgerEntries?: LedgerEntryListRelationFilter @@ -42832,10 +53237,14 @@ export namespace Prisma { flatRialCharge?: SortOrder isSuspendedOverCreditLimit?: SortOrder deliveredAt?: SortOrderInput | SortOrder + salesAgentId?: SortOrderInput | SortOrder + referrerCustomerId?: SortOrderInput | SortOrder createdAt?: SortOrder updatedAt?: SortOrder customer?: CustomerOrderByWithRelationInput branch?: BranchOrderByWithRelationInput + salesAgent?: AdminUserOrderByWithRelationInput + referrerCustomer?: CustomerOrderByWithRelationInput items?: OrderItemOrderByRelationAggregateInput statusEvents?: OrderStatusEventOrderByRelationAggregateInput ledgerEntries?: LedgerEntryOrderByRelationAggregateInput @@ -42857,10 +53266,14 @@ export namespace Prisma { flatRialCharge?: DecimalFilter<"Order"> | Decimal | DecimalJsLike | number | string isSuspendedOverCreditLimit?: BoolFilter<"Order"> | boolean deliveredAt?: DateTimeNullableFilter<"Order"> | Date | string | null + salesAgentId?: StringNullableFilter<"Order"> | string | null + referrerCustomerId?: StringNullableFilter<"Order"> | string | null createdAt?: DateTimeFilter<"Order"> | Date | string updatedAt?: DateTimeFilter<"Order"> | Date | string customer?: XOR branch?: XOR | null + salesAgent?: XOR | null + referrerCustomer?: XOR | null items?: OrderItemListRelationFilter statusEvents?: OrderStatusEventListRelationFilter ledgerEntries?: LedgerEntryListRelationFilter @@ -42879,6 +53292,8 @@ export namespace Prisma { flatRialCharge?: SortOrder isSuspendedOverCreditLimit?: SortOrder deliveredAt?: SortOrderInput | SortOrder + salesAgentId?: SortOrderInput | SortOrder + referrerCustomerId?: SortOrderInput | SortOrder createdAt?: SortOrder updatedAt?: SortOrder _count?: OrderCountOrderByAggregateInput @@ -42903,6 +53318,8 @@ export namespace Prisma { flatRialCharge?: DecimalWithAggregatesFilter<"Order"> | Decimal | DecimalJsLike | number | string isSuspendedOverCreditLimit?: BoolWithAggregatesFilter<"Order"> | boolean deliveredAt?: DateTimeNullableWithAggregatesFilter<"Order"> | Date | string | null + salesAgentId?: StringNullableWithAggregatesFilter<"Order"> | string | null + referrerCustomerId?: StringNullableWithAggregatesFilter<"Order"> | string | null createdAt?: DateTimeWithAggregatesFilter<"Order"> | Date | string updatedAt?: DateTimeWithAggregatesFilter<"Order"> | Date | string } @@ -43735,6 +54152,272 @@ export namespace Prisma { updatedAt?: DateTimeWithAggregatesFilter<"Setting"> | Date | string } + export type AccountingLinkWhereInput = { + AND?: AccountingLinkWhereInput | AccountingLinkWhereInput[] + OR?: AccountingLinkWhereInput[] + NOT?: AccountingLinkWhereInput | AccountingLinkWhereInput[] + id?: StringFilter<"AccountingLink"> | string + provider?: StringFilter<"AccountingLink"> | string + entityType?: EnumAccountingEntityTypeFilter<"AccountingLink"> | $Enums.AccountingEntityType + entityId?: StringFilter<"AccountingLink"> | string + externalCode?: StringFilter<"AccountingLink"> | string + externalName?: StringNullableFilter<"AccountingLink"> | string | null + origin?: StringFilter<"AccountingLink"> | string + snapshot?: JsonNullableFilter<"AccountingLink"> + syncedAt?: DateTimeFilter<"AccountingLink"> | Date | string + createdAt?: DateTimeFilter<"AccountingLink"> | Date | string + } + + export type AccountingLinkOrderByWithRelationInput = { + id?: SortOrder + provider?: SortOrder + entityType?: SortOrder + entityId?: SortOrder + externalCode?: SortOrder + externalName?: SortOrderInput | SortOrder + origin?: SortOrder + snapshot?: SortOrderInput | SortOrder + syncedAt?: SortOrder + createdAt?: SortOrder + } + + export type AccountingLinkWhereUniqueInput = Prisma.AtLeast<{ + id?: string + provider_entityType_entityId?: AccountingLinkProviderEntityTypeEntityIdCompoundUniqueInput + provider_entityType_externalCode?: AccountingLinkProviderEntityTypeExternalCodeCompoundUniqueInput + AND?: AccountingLinkWhereInput | AccountingLinkWhereInput[] + OR?: AccountingLinkWhereInput[] + NOT?: AccountingLinkWhereInput | AccountingLinkWhereInput[] + provider?: StringFilter<"AccountingLink"> | string + entityType?: EnumAccountingEntityTypeFilter<"AccountingLink"> | $Enums.AccountingEntityType + entityId?: StringFilter<"AccountingLink"> | string + externalCode?: StringFilter<"AccountingLink"> | string + externalName?: StringNullableFilter<"AccountingLink"> | string | null + origin?: StringFilter<"AccountingLink"> | string + snapshot?: JsonNullableFilter<"AccountingLink"> + syncedAt?: DateTimeFilter<"AccountingLink"> | Date | string + createdAt?: DateTimeFilter<"AccountingLink"> | Date | string + }, "id" | "provider_entityType_entityId" | "provider_entityType_externalCode"> + + export type AccountingLinkOrderByWithAggregationInput = { + id?: SortOrder + provider?: SortOrder + entityType?: SortOrder + entityId?: SortOrder + externalCode?: SortOrder + externalName?: SortOrderInput | SortOrder + origin?: SortOrder + snapshot?: SortOrderInput | SortOrder + syncedAt?: SortOrder + createdAt?: SortOrder + _count?: AccountingLinkCountOrderByAggregateInput + _max?: AccountingLinkMaxOrderByAggregateInput + _min?: AccountingLinkMinOrderByAggregateInput + } + + export type AccountingLinkScalarWhereWithAggregatesInput = { + AND?: AccountingLinkScalarWhereWithAggregatesInput | AccountingLinkScalarWhereWithAggregatesInput[] + OR?: AccountingLinkScalarWhereWithAggregatesInput[] + NOT?: AccountingLinkScalarWhereWithAggregatesInput | AccountingLinkScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"AccountingLink"> | string + provider?: StringWithAggregatesFilter<"AccountingLink"> | string + entityType?: EnumAccountingEntityTypeWithAggregatesFilter<"AccountingLink"> | $Enums.AccountingEntityType + entityId?: StringWithAggregatesFilter<"AccountingLink"> | string + externalCode?: StringWithAggregatesFilter<"AccountingLink"> | string + externalName?: StringNullableWithAggregatesFilter<"AccountingLink"> | string | null + origin?: StringWithAggregatesFilter<"AccountingLink"> | string + snapshot?: JsonNullableWithAggregatesFilter<"AccountingLink"> + syncedAt?: DateTimeWithAggregatesFilter<"AccountingLink"> | Date | string + createdAt?: DateTimeWithAggregatesFilter<"AccountingLink"> | Date | string + } + + export type AccountingOutboxWhereInput = { + AND?: AccountingOutboxWhereInput | AccountingOutboxWhereInput[] + OR?: AccountingOutboxWhereInput[] + NOT?: AccountingOutboxWhereInput | AccountingOutboxWhereInput[] + id?: StringFilter<"AccountingOutbox"> | string + provider?: StringFilter<"AccountingOutbox"> | string + kind?: EnumAccountingOutboxKindFilter<"AccountingOutbox"> | $Enums.AccountingOutboxKind + entityId?: StringFilter<"AccountingOutbox"> | string + status?: EnumAccountingOutboxStatusFilter<"AccountingOutbox"> | $Enums.AccountingOutboxStatus + attempts?: IntFilter<"AccountingOutbox"> | number + nextAttemptAt?: DateTimeFilter<"AccountingOutbox"> | Date | string + lastError?: StringNullableFilter<"AccountingOutbox"> | string | null + externalRef?: StringNullableFilter<"AccountingOutbox"> | string | null + progress?: JsonNullableFilter<"AccountingOutbox"> + lastRequest?: JsonNullableFilter<"AccountingOutbox"> + lastResponse?: JsonNullableFilter<"AccountingOutbox"> + sentAt?: DateTimeNullableFilter<"AccountingOutbox"> | Date | string | null + resolvedById?: StringNullableFilter<"AccountingOutbox"> | string | null + createdAt?: DateTimeFilter<"AccountingOutbox"> | Date | string + updatedAt?: DateTimeFilter<"AccountingOutbox"> | Date | string + } + + export type AccountingOutboxOrderByWithRelationInput = { + id?: SortOrder + provider?: SortOrder + kind?: SortOrder + entityId?: SortOrder + status?: SortOrder + attempts?: SortOrder + nextAttemptAt?: SortOrder + lastError?: SortOrderInput | SortOrder + externalRef?: SortOrderInput | SortOrder + progress?: SortOrderInput | SortOrder + lastRequest?: SortOrderInput | SortOrder + lastResponse?: SortOrderInput | SortOrder + sentAt?: SortOrderInput | SortOrder + resolvedById?: SortOrderInput | SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type AccountingOutboxWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: AccountingOutboxWhereInput | AccountingOutboxWhereInput[] + OR?: AccountingOutboxWhereInput[] + NOT?: AccountingOutboxWhereInput | AccountingOutboxWhereInput[] + provider?: StringFilter<"AccountingOutbox"> | string + kind?: EnumAccountingOutboxKindFilter<"AccountingOutbox"> | $Enums.AccountingOutboxKind + entityId?: StringFilter<"AccountingOutbox"> | string + status?: EnumAccountingOutboxStatusFilter<"AccountingOutbox"> | $Enums.AccountingOutboxStatus + attempts?: IntFilter<"AccountingOutbox"> | number + nextAttemptAt?: DateTimeFilter<"AccountingOutbox"> | Date | string + lastError?: StringNullableFilter<"AccountingOutbox"> | string | null + externalRef?: StringNullableFilter<"AccountingOutbox"> | string | null + progress?: JsonNullableFilter<"AccountingOutbox"> + lastRequest?: JsonNullableFilter<"AccountingOutbox"> + lastResponse?: JsonNullableFilter<"AccountingOutbox"> + sentAt?: DateTimeNullableFilter<"AccountingOutbox"> | Date | string | null + resolvedById?: StringNullableFilter<"AccountingOutbox"> | string | null + createdAt?: DateTimeFilter<"AccountingOutbox"> | Date | string + updatedAt?: DateTimeFilter<"AccountingOutbox"> | Date | string + }, "id"> + + export type AccountingOutboxOrderByWithAggregationInput = { + id?: SortOrder + provider?: SortOrder + kind?: SortOrder + entityId?: SortOrder + status?: SortOrder + attempts?: SortOrder + nextAttemptAt?: SortOrder + lastError?: SortOrderInput | SortOrder + externalRef?: SortOrderInput | SortOrder + progress?: SortOrderInput | SortOrder + lastRequest?: SortOrderInput | SortOrder + lastResponse?: SortOrderInput | SortOrder + sentAt?: SortOrderInput | SortOrder + resolvedById?: SortOrderInput | SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + _count?: AccountingOutboxCountOrderByAggregateInput + _avg?: AccountingOutboxAvgOrderByAggregateInput + _max?: AccountingOutboxMaxOrderByAggregateInput + _min?: AccountingOutboxMinOrderByAggregateInput + _sum?: AccountingOutboxSumOrderByAggregateInput + } + + export type AccountingOutboxScalarWhereWithAggregatesInput = { + AND?: AccountingOutboxScalarWhereWithAggregatesInput | AccountingOutboxScalarWhereWithAggregatesInput[] + OR?: AccountingOutboxScalarWhereWithAggregatesInput[] + NOT?: AccountingOutboxScalarWhereWithAggregatesInput | AccountingOutboxScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"AccountingOutbox"> | string + provider?: StringWithAggregatesFilter<"AccountingOutbox"> | string + kind?: EnumAccountingOutboxKindWithAggregatesFilter<"AccountingOutbox"> | $Enums.AccountingOutboxKind + entityId?: StringWithAggregatesFilter<"AccountingOutbox"> | string + status?: EnumAccountingOutboxStatusWithAggregatesFilter<"AccountingOutbox"> | $Enums.AccountingOutboxStatus + attempts?: IntWithAggregatesFilter<"AccountingOutbox"> | number + nextAttemptAt?: DateTimeWithAggregatesFilter<"AccountingOutbox"> | Date | string + lastError?: StringNullableWithAggregatesFilter<"AccountingOutbox"> | string | null + externalRef?: StringNullableWithAggregatesFilter<"AccountingOutbox"> | string | null + progress?: JsonNullableWithAggregatesFilter<"AccountingOutbox"> + lastRequest?: JsonNullableWithAggregatesFilter<"AccountingOutbox"> + lastResponse?: JsonNullableWithAggregatesFilter<"AccountingOutbox"> + sentAt?: DateTimeNullableWithAggregatesFilter<"AccountingOutbox"> | Date | string | null + resolvedById?: StringNullableWithAggregatesFilter<"AccountingOutbox"> | string | null + createdAt?: DateTimeWithAggregatesFilter<"AccountingOutbox"> | Date | string + updatedAt?: DateTimeWithAggregatesFilter<"AccountingOutbox"> | Date | string + } + + export type AccountingIssueWhereInput = { + AND?: AccountingIssueWhereInput | AccountingIssueWhereInput[] + OR?: AccountingIssueWhereInput[] + NOT?: AccountingIssueWhereInput | AccountingIssueWhereInput[] + id?: StringFilter<"AccountingIssue"> | string + provider?: StringFilter<"AccountingIssue"> | string + kind?: StringFilter<"AccountingIssue"> | string + externalCode?: StringFilter<"AccountingIssue"> | string + entityId?: StringNullableFilter<"AccountingIssue"> | string | null + message?: StringFilter<"AccountingIssue"> | string + data?: JsonNullableFilter<"AccountingIssue"> + createdAt?: DateTimeFilter<"AccountingIssue"> | Date | string + updatedAt?: DateTimeFilter<"AccountingIssue"> | Date | string + resolvedAt?: DateTimeNullableFilter<"AccountingIssue"> | Date | string | null + } + + export type AccountingIssueOrderByWithRelationInput = { + id?: SortOrder + provider?: SortOrder + kind?: SortOrder + externalCode?: SortOrder + entityId?: SortOrderInput | SortOrder + message?: SortOrder + data?: SortOrderInput | SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + resolvedAt?: SortOrderInput | SortOrder + } + + export type AccountingIssueWhereUniqueInput = Prisma.AtLeast<{ + id?: string + provider_kind_externalCode?: AccountingIssueProviderKindExternalCodeCompoundUniqueInput + AND?: AccountingIssueWhereInput | AccountingIssueWhereInput[] + OR?: AccountingIssueWhereInput[] + NOT?: AccountingIssueWhereInput | AccountingIssueWhereInput[] + provider?: StringFilter<"AccountingIssue"> | string + kind?: StringFilter<"AccountingIssue"> | string + externalCode?: StringFilter<"AccountingIssue"> | string + entityId?: StringNullableFilter<"AccountingIssue"> | string | null + message?: StringFilter<"AccountingIssue"> | string + data?: JsonNullableFilter<"AccountingIssue"> + createdAt?: DateTimeFilter<"AccountingIssue"> | Date | string + updatedAt?: DateTimeFilter<"AccountingIssue"> | Date | string + resolvedAt?: DateTimeNullableFilter<"AccountingIssue"> | Date | string | null + }, "id" | "provider_kind_externalCode"> + + export type AccountingIssueOrderByWithAggregationInput = { + id?: SortOrder + provider?: SortOrder + kind?: SortOrder + externalCode?: SortOrder + entityId?: SortOrderInput | SortOrder + message?: SortOrder + data?: SortOrderInput | SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + resolvedAt?: SortOrderInput | SortOrder + _count?: AccountingIssueCountOrderByAggregateInput + _max?: AccountingIssueMaxOrderByAggregateInput + _min?: AccountingIssueMinOrderByAggregateInput + } + + export type AccountingIssueScalarWhereWithAggregatesInput = { + AND?: AccountingIssueScalarWhereWithAggregatesInput | AccountingIssueScalarWhereWithAggregatesInput[] + OR?: AccountingIssueScalarWhereWithAggregatesInput[] + NOT?: AccountingIssueScalarWhereWithAggregatesInput | AccountingIssueScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"AccountingIssue"> | string + provider?: StringWithAggregatesFilter<"AccountingIssue"> | string + kind?: StringWithAggregatesFilter<"AccountingIssue"> | string + externalCode?: StringWithAggregatesFilter<"AccountingIssue"> | string + entityId?: StringNullableWithAggregatesFilter<"AccountingIssue"> | string | null + message?: StringWithAggregatesFilter<"AccountingIssue"> | string + data?: JsonNullableWithAggregatesFilter<"AccountingIssue"> + createdAt?: DateTimeWithAggregatesFilter<"AccountingIssue"> | Date | string + updatedAt?: DateTimeWithAggregatesFilter<"AccountingIssue"> | Date | string + resolvedAt?: DateTimeNullableWithAggregatesFilter<"AccountingIssue"> | Date | string | null + } + export type PromotionWhereInput = { AND?: PromotionWhereInput | PromotionWhereInput[] OR?: PromotionWhereInput[] @@ -44323,6 +55006,7 @@ export namespace Prisma { createdAt?: DateTimeFilter<"UploadedFile"> | Date | string uploadedByAdminUser?: XOR | null customerAvatars?: CustomerListRelationFilter + adminUserAvatars?: AdminUserListRelationFilter } export type UploadedFileOrderByWithRelationInput = { @@ -44336,6 +55020,7 @@ export namespace Prisma { createdAt?: SortOrder uploadedByAdminUser?: AdminUserOrderByWithRelationInput customerAvatars?: CustomerOrderByRelationAggregateInput + adminUserAvatars?: AdminUserOrderByRelationAggregateInput } export type UploadedFileWhereUniqueInput = Prisma.AtLeast<{ @@ -44352,6 +55037,7 @@ export namespace Prisma { createdAt?: DateTimeFilter<"UploadedFile"> | Date | string uploadedByAdminUser?: XOR | null customerAvatars?: CustomerListRelationFilter + adminUserAvatars?: AdminUserListRelationFilter }, "id"> export type UploadedFileOrderByWithAggregationInput = { @@ -44384,58 +55070,143 @@ export namespace Prisma { createdAt?: DateTimeWithAggregatesFilter<"UploadedFile"> | Date | string } + export type CustomerOtpWhereInput = { + AND?: CustomerOtpWhereInput | CustomerOtpWhereInput[] + OR?: CustomerOtpWhereInput[] + NOT?: CustomerOtpWhereInput | CustomerOtpWhereInput[] + id?: StringFilter<"CustomerOtp"> | string + mobile?: StringFilter<"CustomerOtp"> | string + customerId?: StringFilter<"CustomerOtp"> | string + codeHash?: StringFilter<"CustomerOtp"> | string + expiresAt?: DateTimeFilter<"CustomerOtp"> | Date | string + attempts?: IntFilter<"CustomerOtp"> | number + consumedAt?: DateTimeNullableFilter<"CustomerOtp"> | Date | string | null + requestIp?: StringNullableFilter<"CustomerOtp"> | string | null + createdAt?: DateTimeFilter<"CustomerOtp"> | Date | string + customer?: XOR + } + + export type CustomerOtpOrderByWithRelationInput = { + id?: SortOrder + mobile?: SortOrder + customerId?: SortOrder + codeHash?: SortOrder + expiresAt?: SortOrder + attempts?: SortOrder + consumedAt?: SortOrderInput | SortOrder + requestIp?: SortOrderInput | SortOrder + createdAt?: SortOrder + customer?: CustomerOrderByWithRelationInput + } + + export type CustomerOtpWhereUniqueInput = Prisma.AtLeast<{ + id?: string + AND?: CustomerOtpWhereInput | CustomerOtpWhereInput[] + OR?: CustomerOtpWhereInput[] + NOT?: CustomerOtpWhereInput | CustomerOtpWhereInput[] + mobile?: StringFilter<"CustomerOtp"> | string + customerId?: StringFilter<"CustomerOtp"> | string + codeHash?: StringFilter<"CustomerOtp"> | string + expiresAt?: DateTimeFilter<"CustomerOtp"> | Date | string + attempts?: IntFilter<"CustomerOtp"> | number + consumedAt?: DateTimeNullableFilter<"CustomerOtp"> | Date | string | null + requestIp?: StringNullableFilter<"CustomerOtp"> | string | null + createdAt?: DateTimeFilter<"CustomerOtp"> | Date | string + customer?: XOR + }, "id"> + + export type CustomerOtpOrderByWithAggregationInput = { + id?: SortOrder + mobile?: SortOrder + customerId?: SortOrder + codeHash?: SortOrder + expiresAt?: SortOrder + attempts?: SortOrder + consumedAt?: SortOrderInput | SortOrder + requestIp?: SortOrderInput | SortOrder + createdAt?: SortOrder + _count?: CustomerOtpCountOrderByAggregateInput + _avg?: CustomerOtpAvgOrderByAggregateInput + _max?: CustomerOtpMaxOrderByAggregateInput + _min?: CustomerOtpMinOrderByAggregateInput + _sum?: CustomerOtpSumOrderByAggregateInput + } + + export type CustomerOtpScalarWhereWithAggregatesInput = { + AND?: CustomerOtpScalarWhereWithAggregatesInput | CustomerOtpScalarWhereWithAggregatesInput[] + OR?: CustomerOtpScalarWhereWithAggregatesInput[] + NOT?: CustomerOtpScalarWhereWithAggregatesInput | CustomerOtpScalarWhereWithAggregatesInput[] + id?: StringWithAggregatesFilter<"CustomerOtp"> | string + mobile?: StringWithAggregatesFilter<"CustomerOtp"> | string + customerId?: StringWithAggregatesFilter<"CustomerOtp"> | string + codeHash?: StringWithAggregatesFilter<"CustomerOtp"> | string + expiresAt?: DateTimeWithAggregatesFilter<"CustomerOtp"> | Date | string + attempts?: IntWithAggregatesFilter<"CustomerOtp"> | number + consumedAt?: DateTimeNullableWithAggregatesFilter<"CustomerOtp"> | Date | string | null + requestIp?: StringNullableWithAggregatesFilter<"CustomerOtp"> | string | null + createdAt?: DateTimeWithAggregatesFilter<"CustomerOtp"> | Date | string + } + export type CityCreateInput = { id?: string name: string - province?: string | null percent?: Decimal | DecimalJsLike | number | string | null percentAux?: Decimal | DecimalJsLike | number | string | null + parent?: CityCreateNestedOneWithoutChildrenInput + children?: CityCreateNestedManyWithoutParentInput customers?: CustomerCreateNestedManyWithoutCityInput addresses?: CustomerAddressCreateNestedManyWithoutCityInput branches?: BranchCreateNestedManyWithoutCityInput preOrders?: PreOrderCreateNestedManyWithoutCityInput + salesExpertProfiles?: SalesExpertProfileCreateNestedManyWithoutCityInput } export type CityUncheckedCreateInput = { id?: string name: string - province?: string | null + parentId?: string | null percent?: Decimal | DecimalJsLike | number | string | null percentAux?: Decimal | DecimalJsLike | number | string | null + children?: CityUncheckedCreateNestedManyWithoutParentInput customers?: CustomerUncheckedCreateNestedManyWithoutCityInput addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCityInput branches?: BranchUncheckedCreateNestedManyWithoutCityInput preOrders?: PreOrderUncheckedCreateNestedManyWithoutCityInput + salesExpertProfiles?: SalesExpertProfileUncheckedCreateNestedManyWithoutCityInput } export type CityUpdateInput = { id?: StringFieldUpdateOperationsInput | string name?: StringFieldUpdateOperationsInput | string - province?: NullableStringFieldUpdateOperationsInput | string | null percent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null percentAux?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + parent?: CityUpdateOneWithoutChildrenNestedInput + children?: CityUpdateManyWithoutParentNestedInput customers?: CustomerUpdateManyWithoutCityNestedInput addresses?: CustomerAddressUpdateManyWithoutCityNestedInput branches?: BranchUpdateManyWithoutCityNestedInput preOrders?: PreOrderUpdateManyWithoutCityNestedInput + salesExpertProfiles?: SalesExpertProfileUpdateManyWithoutCityNestedInput } export type CityUncheckedUpdateInput = { id?: StringFieldUpdateOperationsInput | string name?: StringFieldUpdateOperationsInput | string - province?: NullableStringFieldUpdateOperationsInput | string | null + parentId?: NullableStringFieldUpdateOperationsInput | string | null percent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null percentAux?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + children?: CityUncheckedUpdateManyWithoutParentNestedInput customers?: CustomerUncheckedUpdateManyWithoutCityNestedInput addresses?: CustomerAddressUncheckedUpdateManyWithoutCityNestedInput branches?: BranchUncheckedUpdateManyWithoutCityNestedInput preOrders?: PreOrderUncheckedUpdateManyWithoutCityNestedInput + salesExpertProfiles?: SalesExpertProfileUncheckedUpdateManyWithoutCityNestedInput } export type CityCreateManyInput = { id?: string name: string - province?: string | null + parentId?: string | null percent?: Decimal | DecimalJsLike | number | string | null percentAux?: Decimal | DecimalJsLike | number | string | null } @@ -44443,7 +55214,6 @@ export namespace Prisma { export type CityUpdateManyMutationInput = { id?: StringFieldUpdateOperationsInput | string name?: StringFieldUpdateOperationsInput | string - province?: NullableStringFieldUpdateOperationsInput | string | null percent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null percentAux?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null } @@ -44451,7 +55221,7 @@ export namespace Prisma { export type CityUncheckedUpdateManyInput = { id?: StringFieldUpdateOperationsInput | string name?: StringFieldUpdateOperationsInput | string - province?: NullableStringFieldUpdateOperationsInput | string | null + parentId?: NullableStringFieldUpdateOperationsInput | string | null percent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null percentAux?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null } @@ -44459,15 +55229,23 @@ export namespace Prisma { export type AdminUserCreateInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string passwordHash: string role: $Enums.AdminRole wagePercent?: Decimal | DecimalJsLike | number | string | null isActive?: boolean createdAt?: Date | string + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null userType?: UserTypeCreateNestedOneWithoutAdminUsersInput branch?: BranchCreateNestedOneWithoutAdminUsersInput + avatarFile?: UploadedFileCreateNestedOneWithoutAdminUserAvatarsInput referredCustomers?: CustomerCreateNestedManyWithoutReferredByAgentInput + creditedOrders?: OrderCreateNestedManyWithoutSalesAgentInput supervisedWorkshops?: WorkshopCreateNestedManyWithoutSupervisorInput branchAllocations?: BranchAllocationCreateNestedManyWithoutAllocatorAdminUserInput postedLedgerEntries?: LedgerEntryCreateNestedManyWithoutPostedByAdminUserInput @@ -44476,11 +55254,15 @@ export namespace Prisma { sentSmsMessages?: SmsMessageCreateNestedManyWithoutSentByAdminUserInput sentNotifications?: NotificationCreateNestedManyWithoutSentByAdminUserInput uploadedFiles?: UploadedFileCreateNestedManyWithoutUploadedByAdminUserInput + salesExpertProfile?: SalesExpertProfileCreateNestedOneWithoutAdminUserInput + sessions?: AdminSessionCreateNestedManyWithoutAdminUserInput } export type AdminUserUncheckedCreateInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string passwordHash: string role: $Enums.AdminRole @@ -44489,7 +55271,13 @@ export namespace Prisma { wagePercent?: Decimal | DecimalJsLike | number | string | null isActive?: boolean createdAt?: Date | string + avatarFileId?: string | null + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null referredCustomers?: CustomerUncheckedCreateNestedManyWithoutReferredByAgentInput + creditedOrders?: OrderUncheckedCreateNestedManyWithoutSalesAgentInput supervisedWorkshops?: WorkshopUncheckedCreateNestedManyWithoutSupervisorInput branchAllocations?: BranchAllocationUncheckedCreateNestedManyWithoutAllocatorAdminUserInput postedLedgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutPostedByAdminUserInput @@ -44498,20 +55286,30 @@ export namespace Prisma { sentSmsMessages?: SmsMessageUncheckedCreateNestedManyWithoutSentByAdminUserInput sentNotifications?: NotificationUncheckedCreateNestedManyWithoutSentByAdminUserInput uploadedFiles?: UploadedFileUncheckedCreateNestedManyWithoutUploadedByAdminUserInput + salesExpertProfile?: SalesExpertProfileUncheckedCreateNestedOneWithoutAdminUserInput + sessions?: AdminSessionUncheckedCreateNestedManyWithoutAdminUserInput } export type AdminUserUpdateInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string passwordHash?: StringFieldUpdateOperationsInput | string role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null userType?: UserTypeUpdateOneWithoutAdminUsersNestedInput branch?: BranchUpdateOneWithoutAdminUsersNestedInput + avatarFile?: UploadedFileUpdateOneWithoutAdminUserAvatarsNestedInput referredCustomers?: CustomerUpdateManyWithoutReferredByAgentNestedInput + creditedOrders?: OrderUpdateManyWithoutSalesAgentNestedInput supervisedWorkshops?: WorkshopUpdateManyWithoutSupervisorNestedInput branchAllocations?: BranchAllocationUpdateManyWithoutAllocatorAdminUserNestedInput postedLedgerEntries?: LedgerEntryUpdateManyWithoutPostedByAdminUserNestedInput @@ -44520,11 +55318,15 @@ export namespace Prisma { sentSmsMessages?: SmsMessageUpdateManyWithoutSentByAdminUserNestedInput sentNotifications?: NotificationUpdateManyWithoutSentByAdminUserNestedInput uploadedFiles?: UploadedFileUpdateManyWithoutUploadedByAdminUserNestedInput + salesExpertProfile?: SalesExpertProfileUpdateOneWithoutAdminUserNestedInput + sessions?: AdminSessionUpdateManyWithoutAdminUserNestedInput } export type AdminUserUncheckedUpdateInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string passwordHash?: StringFieldUpdateOperationsInput | string role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole @@ -44533,7 +55335,13 @@ export namespace Prisma { wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null referredCustomers?: CustomerUncheckedUpdateManyWithoutReferredByAgentNestedInput + creditedOrders?: OrderUncheckedUpdateManyWithoutSalesAgentNestedInput supervisedWorkshops?: WorkshopUncheckedUpdateManyWithoutSupervisorNestedInput branchAllocations?: BranchAllocationUncheckedUpdateManyWithoutAllocatorAdminUserNestedInput postedLedgerEntries?: LedgerEntryUncheckedUpdateManyWithoutPostedByAdminUserNestedInput @@ -44542,11 +55350,15 @@ export namespace Prisma { sentSmsMessages?: SmsMessageUncheckedUpdateManyWithoutSentByAdminUserNestedInput sentNotifications?: NotificationUncheckedUpdateManyWithoutSentByAdminUserNestedInput uploadedFiles?: UploadedFileUncheckedUpdateManyWithoutUploadedByAdminUserNestedInput + salesExpertProfile?: SalesExpertProfileUncheckedUpdateOneWithoutAdminUserNestedInput + sessions?: AdminSessionUncheckedUpdateManyWithoutAdminUserNestedInput } export type AdminUserCreateManyInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string passwordHash: string role: $Enums.AdminRole @@ -44555,22 +55367,35 @@ export namespace Prisma { wagePercent?: Decimal | DecimalJsLike | number | string | null isActive?: boolean createdAt?: Date | string + avatarFileId?: string | null + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null } export type AdminUserUpdateManyMutationInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string passwordHash?: StringFieldUpdateOperationsInput | string role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null } export type AdminUserUncheckedUpdateManyInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string passwordHash?: StringFieldUpdateOperationsInput | string role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole @@ -44579,14 +55404,326 @@ export namespace Prisma { wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null + } + + export type AppSessionCreateInput = { + id?: string + jti: string + subjectId: string + subjectType: string + mobile?: string | null + iamSessionId?: string | null + iamSub?: string | null + ipAddress?: string | null + userAgent?: string | null + createdAt?: Date | string + expiresAt?: Date | string | null + lastSeenAt?: Date | string | null + revokedAt?: Date | string | null + revokedReason?: string | null + } + + export type AppSessionUncheckedCreateInput = { + id?: string + jti: string + subjectId: string + subjectType: string + mobile?: string | null + iamSessionId?: string | null + iamSub?: string | null + ipAddress?: string | null + userAgent?: string | null + createdAt?: Date | string + expiresAt?: Date | string | null + lastSeenAt?: Date | string | null + revokedAt?: Date | string | null + revokedReason?: string | null + } + + export type AppSessionUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + jti?: StringFieldUpdateOperationsInput | string + subjectId?: StringFieldUpdateOperationsInput | string + subjectType?: StringFieldUpdateOperationsInput | string + mobile?: NullableStringFieldUpdateOperationsInput | string | null + iamSessionId?: NullableStringFieldUpdateOperationsInput | string | null + iamSub?: NullableStringFieldUpdateOperationsInput | string | null + ipAddress?: NullableStringFieldUpdateOperationsInput | string | null + userAgent?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + expiresAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + lastSeenAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + revokedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + revokedReason?: NullableStringFieldUpdateOperationsInput | string | null + } + + export type AppSessionUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + jti?: StringFieldUpdateOperationsInput | string + subjectId?: StringFieldUpdateOperationsInput | string + subjectType?: StringFieldUpdateOperationsInput | string + mobile?: NullableStringFieldUpdateOperationsInput | string | null + iamSessionId?: NullableStringFieldUpdateOperationsInput | string | null + iamSub?: NullableStringFieldUpdateOperationsInput | string | null + ipAddress?: NullableStringFieldUpdateOperationsInput | string | null + userAgent?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + expiresAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + lastSeenAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + revokedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + revokedReason?: NullableStringFieldUpdateOperationsInput | string | null + } + + export type AppSessionCreateManyInput = { + id?: string + jti: string + subjectId: string + subjectType: string + mobile?: string | null + iamSessionId?: string | null + iamSub?: string | null + ipAddress?: string | null + userAgent?: string | null + createdAt?: Date | string + expiresAt?: Date | string | null + lastSeenAt?: Date | string | null + revokedAt?: Date | string | null + revokedReason?: string | null + } + + export type AppSessionUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + jti?: StringFieldUpdateOperationsInput | string + subjectId?: StringFieldUpdateOperationsInput | string + subjectType?: StringFieldUpdateOperationsInput | string + mobile?: NullableStringFieldUpdateOperationsInput | string | null + iamSessionId?: NullableStringFieldUpdateOperationsInput | string | null + iamSub?: NullableStringFieldUpdateOperationsInput | string | null + ipAddress?: NullableStringFieldUpdateOperationsInput | string | null + userAgent?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + expiresAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + lastSeenAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + revokedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + revokedReason?: NullableStringFieldUpdateOperationsInput | string | null + } + + export type AppSessionUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + jti?: StringFieldUpdateOperationsInput | string + subjectId?: StringFieldUpdateOperationsInput | string + subjectType?: StringFieldUpdateOperationsInput | string + mobile?: NullableStringFieldUpdateOperationsInput | string | null + iamSessionId?: NullableStringFieldUpdateOperationsInput | string | null + iamSub?: NullableStringFieldUpdateOperationsInput | string | null + ipAddress?: NullableStringFieldUpdateOperationsInput | string | null + userAgent?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + expiresAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + lastSeenAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + revokedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + revokedReason?: NullableStringFieldUpdateOperationsInput | string | null + } + + export type AdminSessionCreateInput = { + id?: string + jti: string + iamSessionId?: string | null + iamSub?: string | null + ipAddress?: string | null + userAgent?: string | null + createdAt?: Date | string + expiresAt?: Date | string | null + lastSeenAt?: Date | string | null + revokedAt?: Date | string | null + revokedReason?: string | null + adminUser: AdminUserCreateNestedOneWithoutSessionsInput + } + + export type AdminSessionUncheckedCreateInput = { + id?: string + jti: string + adminUserId: string + iamSessionId?: string | null + iamSub?: string | null + ipAddress?: string | null + userAgent?: string | null + createdAt?: Date | string + expiresAt?: Date | string | null + lastSeenAt?: Date | string | null + revokedAt?: Date | string | null + revokedReason?: string | null + } + + export type AdminSessionUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + jti?: StringFieldUpdateOperationsInput | string + iamSessionId?: NullableStringFieldUpdateOperationsInput | string | null + iamSub?: NullableStringFieldUpdateOperationsInput | string | null + ipAddress?: NullableStringFieldUpdateOperationsInput | string | null + userAgent?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + expiresAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + lastSeenAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + revokedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + revokedReason?: NullableStringFieldUpdateOperationsInput | string | null + adminUser?: AdminUserUpdateOneRequiredWithoutSessionsNestedInput + } + + export type AdminSessionUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + jti?: StringFieldUpdateOperationsInput | string + adminUserId?: StringFieldUpdateOperationsInput | string + iamSessionId?: NullableStringFieldUpdateOperationsInput | string | null + iamSub?: NullableStringFieldUpdateOperationsInput | string | null + ipAddress?: NullableStringFieldUpdateOperationsInput | string | null + userAgent?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + expiresAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + lastSeenAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + revokedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + revokedReason?: NullableStringFieldUpdateOperationsInput | string | null + } + + export type AdminSessionCreateManyInput = { + id?: string + jti: string + adminUserId: string + iamSessionId?: string | null + iamSub?: string | null + ipAddress?: string | null + userAgent?: string | null + createdAt?: Date | string + expiresAt?: Date | string | null + lastSeenAt?: Date | string | null + revokedAt?: Date | string | null + revokedReason?: string | null + } + + export type AdminSessionUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + jti?: StringFieldUpdateOperationsInput | string + iamSessionId?: NullableStringFieldUpdateOperationsInput | string | null + iamSub?: NullableStringFieldUpdateOperationsInput | string | null + ipAddress?: NullableStringFieldUpdateOperationsInput | string | null + userAgent?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + expiresAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + lastSeenAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + revokedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + revokedReason?: NullableStringFieldUpdateOperationsInput | string | null + } + + export type AdminSessionUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + jti?: StringFieldUpdateOperationsInput | string + adminUserId?: StringFieldUpdateOperationsInput | string + iamSessionId?: NullableStringFieldUpdateOperationsInput | string | null + iamSub?: NullableStringFieldUpdateOperationsInput | string | null + ipAddress?: NullableStringFieldUpdateOperationsInput | string | null + userAgent?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + expiresAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + lastSeenAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + revokedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + revokedReason?: NullableStringFieldUpdateOperationsInput | string | null + } + + export type SalesExpertProfileCreateInput = { + id?: string + gramLevel?: Decimal | DecimalJsLike | number | string + phone?: string | null + nationalCode?: string | null + createdAt?: Date | string + updatedAt?: Date | string + adminUser: AdminUserCreateNestedOneWithoutSalesExpertProfileInput + city?: CityCreateNestedOneWithoutSalesExpertProfilesInput + tradingCustomer?: CustomerCreateNestedOneWithoutSalesExpertTradingForInput + } + + export type SalesExpertProfileUncheckedCreateInput = { + id?: string + adminUserId: string + cityId?: string | null + gramLevel?: Decimal | DecimalJsLike | number | string + phone?: string | null + nationalCode?: string | null + tradingCustomerId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + } + + export type SalesExpertProfileUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + gramLevel?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + phone?: NullableStringFieldUpdateOperationsInput | string | null + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + adminUser?: AdminUserUpdateOneRequiredWithoutSalesExpertProfileNestedInput + city?: CityUpdateOneWithoutSalesExpertProfilesNestedInput + tradingCustomer?: CustomerUpdateOneWithoutSalesExpertTradingForNestedInput + } + + export type SalesExpertProfileUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + adminUserId?: StringFieldUpdateOperationsInput | string + cityId?: NullableStringFieldUpdateOperationsInput | string | null + gramLevel?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + phone?: NullableStringFieldUpdateOperationsInput | string | null + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null + tradingCustomerId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type SalesExpertProfileCreateManyInput = { + id?: string + adminUserId: string + cityId?: string | null + gramLevel?: Decimal | DecimalJsLike | number | string + phone?: string | null + nationalCode?: string | null + tradingCustomerId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + } + + export type SalesExpertProfileUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + gramLevel?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + phone?: NullableStringFieldUpdateOperationsInput | string | null + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type SalesExpertProfileUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + adminUserId?: StringFieldUpdateOperationsInput | string + cityId?: NullableStringFieldUpdateOperationsInput | string | null + gramLevel?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + phone?: NullableStringFieldUpdateOperationsInput | string | null + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null + tradingCustomerId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } export type CustomerCreateInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string - nationalCode: string + nationalCode?: string | null passwordHash: string + cityNameRaw?: string | null kind?: $Enums.CustomerKind phone?: string | null address?: string | null @@ -44597,10 +55734,17 @@ export namespace Prisma { goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string goldDebtGrams?: Decimal | DecimalJsLike | number | string fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string verificationStep?: $Enums.VerificationStep nationalIdImageUrl?: string | null businessLicenseUrl?: string | null shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null canPlaceOrders?: boolean isActive?: boolean isArchived?: boolean @@ -44608,6 +55752,8 @@ export namespace Prisma { updatedAt?: Date | string city?: CityCreateNestedOneWithoutCustomersInput referredByAgent?: AdminUserCreateNestedOneWithoutReferredCustomersInput + salesExpertTradingFor?: SalesExpertProfileCreateNestedOneWithoutTradingCustomerInput + referredOrders?: OrderCreateNestedManyWithoutReferrerCustomerInput avatarFile?: UploadedFileCreateNestedOneWithoutCustomerAvatarsInput addresses?: CustomerAddressCreateNestedManyWithoutCustomerInput orders?: OrderCreateNestedManyWithoutCustomerInput @@ -44618,15 +55764,20 @@ export namespace Prisma { promotions?: PromotionCreateNestedManyWithoutCustomerInput notifications?: NotificationRecipientCreateNestedManyWithoutCustomerInput activityLogs?: CustomerActivityLogCreateNestedManyWithoutCustomerInput + otpChallenges?: CustomerOtpCreateNestedManyWithoutCustomerInput + favorites?: CustomerFavoriteCreateNestedManyWithoutCustomerInput } export type CustomerUncheckedCreateInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string - nationalCode: string + nationalCode?: string | null passwordHash: string cityId?: string | null + cityNameRaw?: string | null kind?: $Enums.CustomerKind phone?: string | null address?: string | null @@ -44638,16 +55789,25 @@ export namespace Prisma { goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string goldDebtGrams?: Decimal | DecimalJsLike | number | string fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string verificationStep?: $Enums.VerificationStep nationalIdImageUrl?: string | null businessLicenseUrl?: string | null shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null avatarFileId?: string | null canPlaceOrders?: boolean isActive?: boolean isArchived?: boolean createdAt?: Date | string updatedAt?: Date | string + salesExpertTradingFor?: SalesExpertProfileUncheckedCreateNestedOneWithoutTradingCustomerInput + referredOrders?: OrderUncheckedCreateNestedManyWithoutReferrerCustomerInput addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCustomerInput orders?: OrderUncheckedCreateNestedManyWithoutCustomerInput preOrders?: PreOrderUncheckedCreateNestedManyWithoutCustomerInput @@ -44657,14 +55817,19 @@ export namespace Prisma { promotions?: PromotionUncheckedCreateNestedManyWithoutCustomerInput notifications?: NotificationRecipientUncheckedCreateNestedManyWithoutCustomerInput activityLogs?: CustomerActivityLogUncheckedCreateNestedManyWithoutCustomerInput + otpChallenges?: CustomerOtpUncheckedCreateNestedManyWithoutCustomerInput + favorites?: CustomerFavoriteUncheckedCreateNestedManyWithoutCustomerInput } export type CustomerUpdateInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string - nationalCode?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null passwordHash?: StringFieldUpdateOperationsInput | string + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind phone?: NullableStringFieldUpdateOperationsInput | string | null address?: NullableStringFieldUpdateOperationsInput | string | null @@ -44675,10 +55840,17 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean isArchived?: BoolFieldUpdateOperationsInput | boolean @@ -44686,6 +55858,8 @@ export namespace Prisma { updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string city?: CityUpdateOneWithoutCustomersNestedInput referredByAgent?: AdminUserUpdateOneWithoutReferredCustomersNestedInput + salesExpertTradingFor?: SalesExpertProfileUpdateOneWithoutTradingCustomerNestedInput + referredOrders?: OrderUpdateManyWithoutReferrerCustomerNestedInput avatarFile?: UploadedFileUpdateOneWithoutCustomerAvatarsNestedInput addresses?: CustomerAddressUpdateManyWithoutCustomerNestedInput orders?: OrderUpdateManyWithoutCustomerNestedInput @@ -44696,15 +55870,20 @@ export namespace Prisma { promotions?: PromotionUpdateManyWithoutCustomerNestedInput notifications?: NotificationRecipientUpdateManyWithoutCustomerNestedInput activityLogs?: CustomerActivityLogUpdateManyWithoutCustomerNestedInput + otpChallenges?: CustomerOtpUpdateManyWithoutCustomerNestedInput + favorites?: CustomerFavoriteUpdateManyWithoutCustomerNestedInput } export type CustomerUncheckedUpdateInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string - nationalCode?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null passwordHash?: StringFieldUpdateOperationsInput | string cityId?: NullableStringFieldUpdateOperationsInput | string | null + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind phone?: NullableStringFieldUpdateOperationsInput | string | null address?: NullableStringFieldUpdateOperationsInput | string | null @@ -44716,16 +55895,25 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean isArchived?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + salesExpertTradingFor?: SalesExpertProfileUncheckedUpdateOneWithoutTradingCustomerNestedInput + referredOrders?: OrderUncheckedUpdateManyWithoutReferrerCustomerNestedInput addresses?: CustomerAddressUncheckedUpdateManyWithoutCustomerNestedInput orders?: OrderUncheckedUpdateManyWithoutCustomerNestedInput preOrders?: PreOrderUncheckedUpdateManyWithoutCustomerNestedInput @@ -44735,15 +55923,20 @@ export namespace Prisma { promotions?: PromotionUncheckedUpdateManyWithoutCustomerNestedInput notifications?: NotificationRecipientUncheckedUpdateManyWithoutCustomerNestedInput activityLogs?: CustomerActivityLogUncheckedUpdateManyWithoutCustomerNestedInput + otpChallenges?: CustomerOtpUncheckedUpdateManyWithoutCustomerNestedInput + favorites?: CustomerFavoriteUncheckedUpdateManyWithoutCustomerNestedInput } export type CustomerCreateManyInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string - nationalCode: string + nationalCode?: string | null passwordHash: string cityId?: string | null + cityNameRaw?: string | null kind?: $Enums.CustomerKind phone?: string | null address?: string | null @@ -44755,10 +55948,17 @@ export namespace Prisma { goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string goldDebtGrams?: Decimal | DecimalJsLike | number | string fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string verificationStep?: $Enums.VerificationStep nationalIdImageUrl?: string | null businessLicenseUrl?: string | null shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null avatarFileId?: string | null canPlaceOrders?: boolean isActive?: boolean @@ -44770,9 +55970,12 @@ export namespace Prisma { export type CustomerUpdateManyMutationInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string - nationalCode?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null passwordHash?: StringFieldUpdateOperationsInput | string + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind phone?: NullableStringFieldUpdateOperationsInput | string | null address?: NullableStringFieldUpdateOperationsInput | string | null @@ -44783,10 +55986,17 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean isArchived?: BoolFieldUpdateOperationsInput | boolean @@ -44797,10 +56007,13 @@ export namespace Prisma { export type CustomerUncheckedUpdateManyInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string - nationalCode?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null passwordHash?: StringFieldUpdateOperationsInput | string cityId?: NullableStringFieldUpdateOperationsInput | string | null + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind phone?: NullableStringFieldUpdateOperationsInput | string | null address?: NullableStringFieldUpdateOperationsInput | string | null @@ -44812,10 +56025,17 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean @@ -44824,6 +56044,46 @@ export namespace Prisma { updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } + export type CustomerFavoriteCreateInput = { + createdAt?: Date | string + customer: CustomerCreateNestedOneWithoutFavoritesInput + product: ProductCreateNestedOneWithoutFavoritedByInput + } + + export type CustomerFavoriteUncheckedCreateInput = { + customerId: string + productId: string + createdAt?: Date | string + } + + export type CustomerFavoriteUpdateInput = { + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + customer?: CustomerUpdateOneRequiredWithoutFavoritesNestedInput + product?: ProductUpdateOneRequiredWithoutFavoritedByNestedInput + } + + export type CustomerFavoriteUncheckedUpdateInput = { + customerId?: StringFieldUpdateOperationsInput | string + productId?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type CustomerFavoriteCreateManyInput = { + customerId: string + productId: string + createdAt?: Date | string + } + + export type CustomerFavoriteUpdateManyMutationInput = { + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type CustomerFavoriteUncheckedUpdateManyInput = { + customerId?: StringFieldUpdateOperationsInput | string + productId?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + export type CustomerAddressCreateInput = { id?: string addressLine: string @@ -45244,6 +56504,9 @@ export namespace Prisma { showType?: number isActive?: boolean createdAt?: Date | string + accountingStockWeight?: Decimal | DecimalJsLike | number | string | null + accountingStockCount?: Decimal | DecimalJsLike | number | string | null + accountingStockAt?: Date | string | null category?: CategoryCreateNestedOneWithoutProductsInput brand?: BrandCreateNestedOneWithoutProductsInput variants?: ProductVariantCreateNestedManyWithoutProductInput @@ -45252,6 +56515,7 @@ export namespace Prisma { comments?: CommentCreateNestedManyWithoutProductInput promotions?: PromotionCreateNestedManyWithoutProductInput allocationItems?: BranchAllocationItemCreateNestedManyWithoutProductInput + favoritedBy?: CustomerFavoriteCreateNestedManyWithoutProductInput } export type ProductUncheckedCreateInput = { @@ -45264,12 +56528,16 @@ export namespace Prisma { showType?: number isActive?: boolean createdAt?: Date | string + accountingStockWeight?: Decimal | DecimalJsLike | number | string | null + accountingStockCount?: Decimal | DecimalJsLike | number | string | null + accountingStockAt?: Date | string | null variants?: ProductVariantUncheckedCreateNestedManyWithoutProductInput images?: ProductImageUncheckedCreateNestedManyWithoutProductInput collections?: CollectionProductUncheckedCreateNestedManyWithoutProductInput comments?: CommentUncheckedCreateNestedManyWithoutProductInput promotions?: PromotionUncheckedCreateNestedManyWithoutProductInput allocationItems?: BranchAllocationItemUncheckedCreateNestedManyWithoutProductInput + favoritedBy?: CustomerFavoriteUncheckedCreateNestedManyWithoutProductInput } export type ProductUpdateInput = { @@ -45280,6 +56548,9 @@ export namespace Prisma { showType?: IntFieldUpdateOperationsInput | number isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + accountingStockWeight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockCount?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null category?: CategoryUpdateOneWithoutProductsNestedInput brand?: BrandUpdateOneWithoutProductsNestedInput variants?: ProductVariantUpdateManyWithoutProductNestedInput @@ -45288,6 +56559,7 @@ export namespace Prisma { comments?: CommentUpdateManyWithoutProductNestedInput promotions?: PromotionUpdateManyWithoutProductNestedInput allocationItems?: BranchAllocationItemUpdateManyWithoutProductNestedInput + favoritedBy?: CustomerFavoriteUpdateManyWithoutProductNestedInput } export type ProductUncheckedUpdateInput = { @@ -45300,12 +56572,16 @@ export namespace Prisma { showType?: IntFieldUpdateOperationsInput | number isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + accountingStockWeight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockCount?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null variants?: ProductVariantUncheckedUpdateManyWithoutProductNestedInput images?: ProductImageUncheckedUpdateManyWithoutProductNestedInput collections?: CollectionProductUncheckedUpdateManyWithoutProductNestedInput comments?: CommentUncheckedUpdateManyWithoutProductNestedInput promotions?: PromotionUncheckedUpdateManyWithoutProductNestedInput allocationItems?: BranchAllocationItemUncheckedUpdateManyWithoutProductNestedInput + favoritedBy?: CustomerFavoriteUncheckedUpdateManyWithoutProductNestedInput } export type ProductCreateManyInput = { @@ -45318,6 +56594,9 @@ export namespace Prisma { showType?: number isActive?: boolean createdAt?: Date | string + accountingStockWeight?: Decimal | DecimalJsLike | number | string | null + accountingStockCount?: Decimal | DecimalJsLike | number | string | null + accountingStockAt?: Date | string | null } export type ProductUpdateManyMutationInput = { @@ -45328,6 +56607,9 @@ export namespace Prisma { showType?: IntFieldUpdateOperationsInput | number isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + accountingStockWeight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockCount?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null } export type ProductUncheckedUpdateManyInput = { @@ -45340,6 +56622,9 @@ export namespace Prisma { showType?: IntFieldUpdateOperationsInput | number isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + accountingStockWeight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockCount?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null } export type ProductImageCreateInput = { @@ -45348,6 +56633,7 @@ export namespace Prisma { sortOrder?: number role?: $Enums.ProductImageRole product: ProductCreateNestedOneWithoutImagesInput + variants?: ProductVariantCreateNestedManyWithoutImageInput } export type ProductImageUncheckedCreateInput = { @@ -45356,6 +56642,7 @@ export namespace Prisma { url: string sortOrder?: number role?: $Enums.ProductImageRole + variants?: ProductVariantUncheckedCreateNestedManyWithoutImageInput } export type ProductImageUpdateInput = { @@ -45364,6 +56651,7 @@ export namespace Prisma { sortOrder?: IntFieldUpdateOperationsInput | number role?: EnumProductImageRoleFieldUpdateOperationsInput | $Enums.ProductImageRole product?: ProductUpdateOneRequiredWithoutImagesNestedInput + variants?: ProductVariantUpdateManyWithoutImageNestedInput } export type ProductImageUncheckedUpdateInput = { @@ -45372,6 +56660,7 @@ export namespace Prisma { url?: StringFieldUpdateOperationsInput | string sortOrder?: IntFieldUpdateOperationsInput | number role?: EnumProductImageRoleFieldUpdateOperationsInput | $Enums.ProductImageRole + variants?: ProductVariantUncheckedUpdateManyWithoutImageNestedInput } export type ProductImageCreateManyInput = { @@ -45407,6 +56696,7 @@ export namespace Prisma { isPreOrder?: boolean isActive?: boolean product: ProductCreateNestedOneWithoutVariantsInput + image?: ProductImageCreateNestedOneWithoutVariantsInput orderItems?: OrderItemCreateNestedManyWithoutProductVariantInput } @@ -45420,6 +56710,7 @@ export namespace Prisma { qty?: number isPreOrder?: boolean isActive?: boolean + imageId?: string | null orderItems?: OrderItemUncheckedCreateNestedManyWithoutProductVariantInput } @@ -45433,6 +56724,7 @@ export namespace Prisma { isPreOrder?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean product?: ProductUpdateOneRequiredWithoutVariantsNestedInput + image?: ProductImageUpdateOneWithoutVariantsNestedInput orderItems?: OrderItemUpdateManyWithoutProductVariantNestedInput } @@ -45446,6 +56738,7 @@ export namespace Prisma { qty?: IntFieldUpdateOperationsInput | number isPreOrder?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean + imageId?: NullableStringFieldUpdateOperationsInput | string | null orderItems?: OrderItemUncheckedUpdateManyWithoutProductVariantNestedInput } @@ -45459,6 +56752,7 @@ export namespace Prisma { qty?: number isPreOrder?: boolean isActive?: boolean + imageId?: string | null } export type ProductVariantUpdateManyMutationInput = { @@ -45482,6 +56776,7 @@ export namespace Prisma { qty?: IntFieldUpdateOperationsInput | number isPreOrder?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean + imageId?: NullableStringFieldUpdateOperationsInput | string | null } export type OrderCreateInput = { @@ -45498,6 +56793,8 @@ export namespace Prisma { updatedAt?: Date | string customer: CustomerCreateNestedOneWithoutOrdersInput branch?: BranchCreateNestedOneWithoutOrdersInput + salesAgent?: AdminUserCreateNestedOneWithoutCreditedOrdersInput + referrerCustomer?: CustomerCreateNestedOneWithoutReferredOrdersInput items?: OrderItemCreateNestedManyWithoutOrderInput statusEvents?: OrderStatusEventCreateNestedManyWithoutOrderInput ledgerEntries?: LedgerEntryCreateNestedManyWithoutOrderInput @@ -45516,6 +56813,8 @@ export namespace Prisma { flatRialCharge?: Decimal | DecimalJsLike | number | string isSuspendedOverCreditLimit?: boolean deliveredAt?: Date | string | null + salesAgentId?: string | null + referrerCustomerId?: string | null createdAt?: Date | string updatedAt?: Date | string items?: OrderItemUncheckedCreateNestedManyWithoutOrderInput @@ -45538,6 +56837,8 @@ export namespace Prisma { updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string customer?: CustomerUpdateOneRequiredWithoutOrdersNestedInput branch?: BranchUpdateOneWithoutOrdersNestedInput + salesAgent?: AdminUserUpdateOneWithoutCreditedOrdersNestedInput + referrerCustomer?: CustomerUpdateOneWithoutReferredOrdersNestedInput items?: OrderItemUpdateManyWithoutOrderNestedInput statusEvents?: OrderStatusEventUpdateManyWithoutOrderNestedInput ledgerEntries?: LedgerEntryUpdateManyWithoutOrderNestedInput @@ -45556,6 +56857,8 @@ export namespace Prisma { flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + salesAgentId?: NullableStringFieldUpdateOperationsInput | string | null + referrerCustomerId?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string items?: OrderItemUncheckedUpdateManyWithoutOrderNestedInput @@ -45576,6 +56879,8 @@ export namespace Prisma { flatRialCharge?: Decimal | DecimalJsLike | number | string isSuspendedOverCreditLimit?: boolean deliveredAt?: Date | string | null + salesAgentId?: string | null + referrerCustomerId?: string | null createdAt?: Date | string updatedAt?: Date | string } @@ -45606,6 +56911,8 @@ export namespace Prisma { flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + salesAgentId?: NullableStringFieldUpdateOperationsInput | string | null + referrerCustomerId?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } @@ -46469,6 +57776,321 @@ export namespace Prisma { updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } + export type AccountingLinkCreateInput = { + id?: string + provider: string + entityType: $Enums.AccountingEntityType + entityId: string + externalCode: string + externalName?: string | null + origin: string + snapshot?: NullableJsonNullValueInput | InputJsonValue + syncedAt?: Date | string + createdAt?: Date | string + } + + export type AccountingLinkUncheckedCreateInput = { + id?: string + provider: string + entityType: $Enums.AccountingEntityType + entityId: string + externalCode: string + externalName?: string | null + origin: string + snapshot?: NullableJsonNullValueInput | InputJsonValue + syncedAt?: Date | string + createdAt?: Date | string + } + + export type AccountingLinkUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + provider?: StringFieldUpdateOperationsInput | string + entityType?: EnumAccountingEntityTypeFieldUpdateOperationsInput | $Enums.AccountingEntityType + entityId?: StringFieldUpdateOperationsInput | string + externalCode?: StringFieldUpdateOperationsInput | string + externalName?: NullableStringFieldUpdateOperationsInput | string | null + origin?: StringFieldUpdateOperationsInput | string + snapshot?: NullableJsonNullValueInput | InputJsonValue + syncedAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AccountingLinkUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + provider?: StringFieldUpdateOperationsInput | string + entityType?: EnumAccountingEntityTypeFieldUpdateOperationsInput | $Enums.AccountingEntityType + entityId?: StringFieldUpdateOperationsInput | string + externalCode?: StringFieldUpdateOperationsInput | string + externalName?: NullableStringFieldUpdateOperationsInput | string | null + origin?: StringFieldUpdateOperationsInput | string + snapshot?: NullableJsonNullValueInput | InputJsonValue + syncedAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AccountingLinkCreateManyInput = { + id?: string + provider: string + entityType: $Enums.AccountingEntityType + entityId: string + externalCode: string + externalName?: string | null + origin: string + snapshot?: NullableJsonNullValueInput | InputJsonValue + syncedAt?: Date | string + createdAt?: Date | string + } + + export type AccountingLinkUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + provider?: StringFieldUpdateOperationsInput | string + entityType?: EnumAccountingEntityTypeFieldUpdateOperationsInput | $Enums.AccountingEntityType + entityId?: StringFieldUpdateOperationsInput | string + externalCode?: StringFieldUpdateOperationsInput | string + externalName?: NullableStringFieldUpdateOperationsInput | string | null + origin?: StringFieldUpdateOperationsInput | string + snapshot?: NullableJsonNullValueInput | InputJsonValue + syncedAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AccountingLinkUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + provider?: StringFieldUpdateOperationsInput | string + entityType?: EnumAccountingEntityTypeFieldUpdateOperationsInput | $Enums.AccountingEntityType + entityId?: StringFieldUpdateOperationsInput | string + externalCode?: StringFieldUpdateOperationsInput | string + externalName?: NullableStringFieldUpdateOperationsInput | string | null + origin?: StringFieldUpdateOperationsInput | string + snapshot?: NullableJsonNullValueInput | InputJsonValue + syncedAt?: DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AccountingOutboxCreateInput = { + id?: string + provider: string + kind: $Enums.AccountingOutboxKind + entityId: string + status?: $Enums.AccountingOutboxStatus + attempts?: number + nextAttemptAt?: Date | string + lastError?: string | null + externalRef?: string | null + progress?: NullableJsonNullValueInput | InputJsonValue + lastRequest?: NullableJsonNullValueInput | InputJsonValue + lastResponse?: NullableJsonNullValueInput | InputJsonValue + sentAt?: Date | string | null + resolvedById?: string | null + createdAt?: Date | string + updatedAt?: Date | string + } + + export type AccountingOutboxUncheckedCreateInput = { + id?: string + provider: string + kind: $Enums.AccountingOutboxKind + entityId: string + status?: $Enums.AccountingOutboxStatus + attempts?: number + nextAttemptAt?: Date | string + lastError?: string | null + externalRef?: string | null + progress?: NullableJsonNullValueInput | InputJsonValue + lastRequest?: NullableJsonNullValueInput | InputJsonValue + lastResponse?: NullableJsonNullValueInput | InputJsonValue + sentAt?: Date | string | null + resolvedById?: string | null + createdAt?: Date | string + updatedAt?: Date | string + } + + export type AccountingOutboxUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + provider?: StringFieldUpdateOperationsInput | string + kind?: EnumAccountingOutboxKindFieldUpdateOperationsInput | $Enums.AccountingOutboxKind + entityId?: StringFieldUpdateOperationsInput | string + status?: EnumAccountingOutboxStatusFieldUpdateOperationsInput | $Enums.AccountingOutboxStatus + attempts?: IntFieldUpdateOperationsInput | number + nextAttemptAt?: DateTimeFieldUpdateOperationsInput | Date | string + lastError?: NullableStringFieldUpdateOperationsInput | string | null + externalRef?: NullableStringFieldUpdateOperationsInput | string | null + progress?: NullableJsonNullValueInput | InputJsonValue + lastRequest?: NullableJsonNullValueInput | InputJsonValue + lastResponse?: NullableJsonNullValueInput | InputJsonValue + sentAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + resolvedById?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AccountingOutboxUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + provider?: StringFieldUpdateOperationsInput | string + kind?: EnumAccountingOutboxKindFieldUpdateOperationsInput | $Enums.AccountingOutboxKind + entityId?: StringFieldUpdateOperationsInput | string + status?: EnumAccountingOutboxStatusFieldUpdateOperationsInput | $Enums.AccountingOutboxStatus + attempts?: IntFieldUpdateOperationsInput | number + nextAttemptAt?: DateTimeFieldUpdateOperationsInput | Date | string + lastError?: NullableStringFieldUpdateOperationsInput | string | null + externalRef?: NullableStringFieldUpdateOperationsInput | string | null + progress?: NullableJsonNullValueInput | InputJsonValue + lastRequest?: NullableJsonNullValueInput | InputJsonValue + lastResponse?: NullableJsonNullValueInput | InputJsonValue + sentAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + resolvedById?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AccountingOutboxCreateManyInput = { + id?: string + provider: string + kind: $Enums.AccountingOutboxKind + entityId: string + status?: $Enums.AccountingOutboxStatus + attempts?: number + nextAttemptAt?: Date | string + lastError?: string | null + externalRef?: string | null + progress?: NullableJsonNullValueInput | InputJsonValue + lastRequest?: NullableJsonNullValueInput | InputJsonValue + lastResponse?: NullableJsonNullValueInput | InputJsonValue + sentAt?: Date | string | null + resolvedById?: string | null + createdAt?: Date | string + updatedAt?: Date | string + } + + export type AccountingOutboxUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + provider?: StringFieldUpdateOperationsInput | string + kind?: EnumAccountingOutboxKindFieldUpdateOperationsInput | $Enums.AccountingOutboxKind + entityId?: StringFieldUpdateOperationsInput | string + status?: EnumAccountingOutboxStatusFieldUpdateOperationsInput | $Enums.AccountingOutboxStatus + attempts?: IntFieldUpdateOperationsInput | number + nextAttemptAt?: DateTimeFieldUpdateOperationsInput | Date | string + lastError?: NullableStringFieldUpdateOperationsInput | string | null + externalRef?: NullableStringFieldUpdateOperationsInput | string | null + progress?: NullableJsonNullValueInput | InputJsonValue + lastRequest?: NullableJsonNullValueInput | InputJsonValue + lastResponse?: NullableJsonNullValueInput | InputJsonValue + sentAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + resolvedById?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AccountingOutboxUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + provider?: StringFieldUpdateOperationsInput | string + kind?: EnumAccountingOutboxKindFieldUpdateOperationsInput | $Enums.AccountingOutboxKind + entityId?: StringFieldUpdateOperationsInput | string + status?: EnumAccountingOutboxStatusFieldUpdateOperationsInput | $Enums.AccountingOutboxStatus + attempts?: IntFieldUpdateOperationsInput | number + nextAttemptAt?: DateTimeFieldUpdateOperationsInput | Date | string + lastError?: NullableStringFieldUpdateOperationsInput | string | null + externalRef?: NullableStringFieldUpdateOperationsInput | string | null + progress?: NullableJsonNullValueInput | InputJsonValue + lastRequest?: NullableJsonNullValueInput | InputJsonValue + lastResponse?: NullableJsonNullValueInput | InputJsonValue + sentAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + resolvedById?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AccountingIssueCreateInput = { + id?: string + provider: string + kind: string + externalCode: string + entityId?: string | null + message: string + data?: NullableJsonNullValueInput | InputJsonValue + createdAt?: Date | string + updatedAt?: Date | string + resolvedAt?: Date | string | null + } + + export type AccountingIssueUncheckedCreateInput = { + id?: string + provider: string + kind: string + externalCode: string + entityId?: string | null + message: string + data?: NullableJsonNullValueInput | InputJsonValue + createdAt?: Date | string + updatedAt?: Date | string + resolvedAt?: Date | string | null + } + + export type AccountingIssueUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + provider?: StringFieldUpdateOperationsInput | string + kind?: StringFieldUpdateOperationsInput | string + externalCode?: StringFieldUpdateOperationsInput | string + entityId?: NullableStringFieldUpdateOperationsInput | string | null + message?: StringFieldUpdateOperationsInput | string + data?: NullableJsonNullValueInput | InputJsonValue + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + resolvedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type AccountingIssueUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + provider?: StringFieldUpdateOperationsInput | string + kind?: StringFieldUpdateOperationsInput | string + externalCode?: StringFieldUpdateOperationsInput | string + entityId?: NullableStringFieldUpdateOperationsInput | string | null + message?: StringFieldUpdateOperationsInput | string + data?: NullableJsonNullValueInput | InputJsonValue + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + resolvedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type AccountingIssueCreateManyInput = { + id?: string + provider: string + kind: string + externalCode: string + entityId?: string | null + message: string + data?: NullableJsonNullValueInput | InputJsonValue + createdAt?: Date | string + updatedAt?: Date | string + resolvedAt?: Date | string | null + } + + export type AccountingIssueUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + provider?: StringFieldUpdateOperationsInput | string + kind?: StringFieldUpdateOperationsInput | string + externalCode?: StringFieldUpdateOperationsInput | string + entityId?: NullableStringFieldUpdateOperationsInput | string | null + message?: StringFieldUpdateOperationsInput | string + data?: NullableJsonNullValueInput | InputJsonValue + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + resolvedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + + export type AccountingIssueUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + provider?: StringFieldUpdateOperationsInput | string + kind?: StringFieldUpdateOperationsInput | string + externalCode?: StringFieldUpdateOperationsInput | string + entityId?: NullableStringFieldUpdateOperationsInput | string | null + message?: StringFieldUpdateOperationsInput | string + data?: NullableJsonNullValueInput | InputJsonValue + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + resolvedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + } + export type PromotionCreateInput = { id?: string title: string @@ -47048,6 +58670,7 @@ export namespace Prisma { createdAt?: Date | string uploadedByAdminUser?: AdminUserCreateNestedOneWithoutUploadedFilesInput customerAvatars?: CustomerCreateNestedManyWithoutAvatarFileInput + adminUserAvatars?: AdminUserCreateNestedManyWithoutAvatarFileInput } export type UploadedFileUncheckedCreateInput = { @@ -47060,6 +58683,7 @@ export namespace Prisma { uploadedByAdminUserId?: string | null createdAt?: Date | string customerAvatars?: CustomerUncheckedCreateNestedManyWithoutAvatarFileInput + adminUserAvatars?: AdminUserUncheckedCreateNestedManyWithoutAvatarFileInput } export type UploadedFileUpdateInput = { @@ -47072,6 +58696,7 @@ export namespace Prisma { createdAt?: DateTimeFieldUpdateOperationsInput | Date | string uploadedByAdminUser?: AdminUserUpdateOneWithoutUploadedFilesNestedInput customerAvatars?: CustomerUpdateManyWithoutAvatarFileNestedInput + adminUserAvatars?: AdminUserUpdateManyWithoutAvatarFileNestedInput } export type UploadedFileUncheckedUpdateInput = { @@ -47084,6 +58709,7 @@ export namespace Prisma { uploadedByAdminUserId?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string customerAvatars?: CustomerUncheckedUpdateManyWithoutAvatarFileNestedInput + adminUserAvatars?: AdminUserUncheckedUpdateManyWithoutAvatarFileNestedInput } export type UploadedFileCreateManyInput = { @@ -47118,6 +58744,89 @@ export namespace Prisma { createdAt?: DateTimeFieldUpdateOperationsInput | Date | string } + export type CustomerOtpCreateInput = { + id?: string + mobile: string + codeHash: string + expiresAt: Date | string + attempts?: number + consumedAt?: Date | string | null + requestIp?: string | null + createdAt?: Date | string + customer: CustomerCreateNestedOneWithoutOtpChallengesInput + } + + export type CustomerOtpUncheckedCreateInput = { + id?: string + mobile: string + customerId: string + codeHash: string + expiresAt: Date | string + attempts?: number + consumedAt?: Date | string | null + requestIp?: string | null + createdAt?: Date | string + } + + export type CustomerOtpUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + codeHash?: StringFieldUpdateOperationsInput | string + expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string + attempts?: IntFieldUpdateOperationsInput | number + consumedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + requestIp?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + customer?: CustomerUpdateOneRequiredWithoutOtpChallengesNestedInput + } + + export type CustomerOtpUncheckedUpdateInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + codeHash?: StringFieldUpdateOperationsInput | string + expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string + attempts?: IntFieldUpdateOperationsInput | number + consumedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + requestIp?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type CustomerOtpCreateManyInput = { + id?: string + mobile: string + customerId: string + codeHash: string + expiresAt: Date | string + attempts?: number + consumedAt?: Date | string | null + requestIp?: string | null + createdAt?: Date | string + } + + export type CustomerOtpUpdateManyMutationInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + codeHash?: StringFieldUpdateOperationsInput | string + expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string + attempts?: IntFieldUpdateOperationsInput | number + consumedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + requestIp?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type CustomerOtpUncheckedUpdateManyInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + codeHash?: StringFieldUpdateOperationsInput | string + expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string + attempts?: IntFieldUpdateOperationsInput | number + consumedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + requestIp?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + export type StringFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> in?: string[] | ListStringFieldRefInput<$PrismaModel> @@ -47159,6 +58868,17 @@ export namespace Prisma { not?: NestedDecimalNullableFilter<$PrismaModel> | Decimal | DecimalJsLike | number | string | null } + export type CityNullableRelationFilter = { + is?: CityWhereInput | null + isNot?: CityWhereInput | null + } + + export type CityListRelationFilter = { + every?: CityWhereInput + some?: CityWhereInput + none?: CityWhereInput + } + export type CustomerListRelationFilter = { every?: CustomerWhereInput some?: CustomerWhereInput @@ -47183,11 +58903,21 @@ export namespace Prisma { none?: PreOrderWhereInput } + export type SalesExpertProfileListRelationFilter = { + every?: SalesExpertProfileWhereInput + some?: SalesExpertProfileWhereInput + none?: SalesExpertProfileWhereInput + } + export type SortOrderInput = { sort: SortOrder nulls?: NullsOrder } + export type CityOrderByRelationAggregateInput = { + _count?: SortOrder + } + export type CustomerOrderByRelationAggregateInput = { _count?: SortOrder } @@ -47204,10 +58934,14 @@ export namespace Prisma { _count?: SortOrder } + export type SalesExpertProfileOrderByRelationAggregateInput = { + _count?: SortOrder + } + export type CityCountOrderByAggregateInput = { id?: SortOrder name?: SortOrder - province?: SortOrder + parentId?: SortOrder percent?: SortOrder percentAux?: SortOrder } @@ -47220,7 +58954,7 @@ export namespace Prisma { export type CityMaxOrderByAggregateInput = { id?: SortOrder name?: SortOrder - province?: SortOrder + parentId?: SortOrder percent?: SortOrder percentAux?: SortOrder } @@ -47228,7 +58962,7 @@ export namespace Prisma { export type CityMinOrderByAggregateInput = { id?: SortOrder name?: SortOrder - province?: SortOrder + parentId?: SortOrder percent?: SortOrder percentAux?: SortOrder } @@ -47334,6 +59068,17 @@ export namespace Prisma { isNot?: BranchWhereInput | null } + export type UploadedFileNullableRelationFilter = { + is?: UploadedFileWhereInput | null + isNot?: UploadedFileWhereInput | null + } + + export type OrderListRelationFilter = { + every?: OrderWhereInput + some?: OrderWhereInput + none?: OrderWhereInput + } + export type WorkshopListRelationFilter = { every?: WorkshopWhereInput some?: WorkshopWhereInput @@ -47382,6 +59127,21 @@ export namespace Prisma { none?: UploadedFileWhereInput } + export type SalesExpertProfileNullableRelationFilter = { + is?: SalesExpertProfileWhereInput | null + isNot?: SalesExpertProfileWhereInput | null + } + + export type AdminSessionListRelationFilter = { + every?: AdminSessionWhereInput + some?: AdminSessionWhereInput + none?: AdminSessionWhereInput + } + + export type OrderOrderByRelationAggregateInput = { + _count?: SortOrder + } + export type WorkshopOrderByRelationAggregateInput = { _count?: SortOrder } @@ -47414,9 +59174,15 @@ export namespace Prisma { _count?: SortOrder } + export type AdminSessionOrderByRelationAggregateInput = { + _count?: SortOrder + } + export type AdminUserCountOrderByAggregateInput = { id?: SortOrder fullName?: SortOrder + firstName?: SortOrder + lastName?: SortOrder mobile?: SortOrder passwordHash?: SortOrder role?: SortOrder @@ -47425,6 +59191,11 @@ export namespace Prisma { wagePercent?: SortOrder isActive?: SortOrder createdAt?: SortOrder + avatarFileId?: SortOrder + address?: SortOrder + storeName?: SortOrder + pasazhName?: SortOrder + memberCode?: SortOrder } export type AdminUserAvgOrderByAggregateInput = { @@ -47435,6 +59206,8 @@ export namespace Prisma { export type AdminUserMaxOrderByAggregateInput = { id?: SortOrder fullName?: SortOrder + firstName?: SortOrder + lastName?: SortOrder mobile?: SortOrder passwordHash?: SortOrder role?: SortOrder @@ -47443,11 +59216,18 @@ export namespace Prisma { wagePercent?: SortOrder isActive?: SortOrder createdAt?: SortOrder + avatarFileId?: SortOrder + address?: SortOrder + storeName?: SortOrder + pasazhName?: SortOrder + memberCode?: SortOrder } export type AdminUserMinOrderByAggregateInput = { id?: SortOrder fullName?: SortOrder + firstName?: SortOrder + lastName?: SortOrder mobile?: SortOrder passwordHash?: SortOrder role?: SortOrder @@ -47456,6 +59236,11 @@ export namespace Prisma { wagePercent?: SortOrder isActive?: SortOrder createdAt?: SortOrder + avatarFileId?: SortOrder + address?: SortOrder + storeName?: SortOrder + pasazhName?: SortOrder + memberCode?: SortOrder } export type AdminUserSumOrderByAggregateInput = { @@ -47511,11 +59296,130 @@ export namespace Prisma { _max?: NestedDateTimeFilter<$PrismaModel> } - export type EnumCustomerKindFilter<$PrismaModel = never> = { - equals?: $Enums.CustomerKind | EnumCustomerKindFieldRefInput<$PrismaModel> - in?: $Enums.CustomerKind[] | ListEnumCustomerKindFieldRefInput<$PrismaModel> - notIn?: $Enums.CustomerKind[] | ListEnumCustomerKindFieldRefInput<$PrismaModel> - not?: NestedEnumCustomerKindFilter<$PrismaModel> | $Enums.CustomerKind + export type DateTimeNullableFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null + } + + export type AppSessionCountOrderByAggregateInput = { + id?: SortOrder + jti?: SortOrder + subjectId?: SortOrder + subjectType?: SortOrder + mobile?: SortOrder + iamSessionId?: SortOrder + iamSub?: SortOrder + ipAddress?: SortOrder + userAgent?: SortOrder + createdAt?: SortOrder + expiresAt?: SortOrder + lastSeenAt?: SortOrder + revokedAt?: SortOrder + revokedReason?: SortOrder + } + + export type AppSessionMaxOrderByAggregateInput = { + id?: SortOrder + jti?: SortOrder + subjectId?: SortOrder + subjectType?: SortOrder + mobile?: SortOrder + iamSessionId?: SortOrder + iamSub?: SortOrder + ipAddress?: SortOrder + userAgent?: SortOrder + createdAt?: SortOrder + expiresAt?: SortOrder + lastSeenAt?: SortOrder + revokedAt?: SortOrder + revokedReason?: SortOrder + } + + export type AppSessionMinOrderByAggregateInput = { + id?: SortOrder + jti?: SortOrder + subjectId?: SortOrder + subjectType?: SortOrder + mobile?: SortOrder + iamSessionId?: SortOrder + iamSub?: SortOrder + ipAddress?: SortOrder + userAgent?: SortOrder + createdAt?: SortOrder + expiresAt?: SortOrder + lastSeenAt?: SortOrder + revokedAt?: SortOrder + revokedReason?: SortOrder + } + + export type DateTimeNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedDateTimeNullableFilter<$PrismaModel> + _max?: NestedDateTimeNullableFilter<$PrismaModel> + } + + export type AdminUserRelationFilter = { + is?: AdminUserWhereInput + isNot?: AdminUserWhereInput + } + + export type AdminSessionCountOrderByAggregateInput = { + id?: SortOrder + jti?: SortOrder + adminUserId?: SortOrder + iamSessionId?: SortOrder + iamSub?: SortOrder + ipAddress?: SortOrder + userAgent?: SortOrder + createdAt?: SortOrder + expiresAt?: SortOrder + lastSeenAt?: SortOrder + revokedAt?: SortOrder + revokedReason?: SortOrder + } + + export type AdminSessionMaxOrderByAggregateInput = { + id?: SortOrder + jti?: SortOrder + adminUserId?: SortOrder + iamSessionId?: SortOrder + iamSub?: SortOrder + ipAddress?: SortOrder + userAgent?: SortOrder + createdAt?: SortOrder + expiresAt?: SortOrder + lastSeenAt?: SortOrder + revokedAt?: SortOrder + revokedReason?: SortOrder + } + + export type AdminSessionMinOrderByAggregateInput = { + id?: SortOrder + jti?: SortOrder + adminUserId?: SortOrder + iamSessionId?: SortOrder + iamSub?: SortOrder + ipAddress?: SortOrder + userAgent?: SortOrder + createdAt?: SortOrder + expiresAt?: SortOrder + lastSeenAt?: SortOrder + revokedAt?: SortOrder + revokedReason?: SortOrder } export type DecimalFilter<$PrismaModel = never> = { @@ -47529,6 +59433,78 @@ export namespace Prisma { not?: NestedDecimalFilter<$PrismaModel> | Decimal | DecimalJsLike | number | string } + export type CustomerNullableRelationFilter = { + is?: CustomerWhereInput | null + isNot?: CustomerWhereInput | null + } + + export type SalesExpertProfileCountOrderByAggregateInput = { + id?: SortOrder + adminUserId?: SortOrder + cityId?: SortOrder + gramLevel?: SortOrder + phone?: SortOrder + nationalCode?: SortOrder + tradingCustomerId?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type SalesExpertProfileAvgOrderByAggregateInput = { + gramLevel?: SortOrder + } + + export type SalesExpertProfileMaxOrderByAggregateInput = { + id?: SortOrder + adminUserId?: SortOrder + cityId?: SortOrder + gramLevel?: SortOrder + phone?: SortOrder + nationalCode?: SortOrder + tradingCustomerId?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type SalesExpertProfileMinOrderByAggregateInput = { + id?: SortOrder + adminUserId?: SortOrder + cityId?: SortOrder + gramLevel?: SortOrder + phone?: SortOrder + nationalCode?: SortOrder + tradingCustomerId?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type SalesExpertProfileSumOrderByAggregateInput = { + gramLevel?: SortOrder + } + + export type DecimalWithAggregatesFilter<$PrismaModel = never> = { + equals?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + in?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel> + notIn?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel> + lt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + lte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + gt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + gte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + not?: NestedDecimalWithAggregatesFilter<$PrismaModel> | Decimal | DecimalJsLike | number | string + _count?: NestedIntFilter<$PrismaModel> + _avg?: NestedDecimalFilter<$PrismaModel> + _sum?: NestedDecimalFilter<$PrismaModel> + _min?: NestedDecimalFilter<$PrismaModel> + _max?: NestedDecimalFilter<$PrismaModel> + } + + export type EnumCustomerKindFilter<$PrismaModel = never> = { + equals?: $Enums.CustomerKind | EnumCustomerKindFieldRefInput<$PrismaModel> + in?: $Enums.CustomerKind[] | ListEnumCustomerKindFieldRefInput<$PrismaModel> + notIn?: $Enums.CustomerKind[] | ListEnumCustomerKindFieldRefInput<$PrismaModel> + not?: NestedEnumCustomerKindFilter<$PrismaModel> | $Enums.CustomerKind + } + export type EnumVerificationStepFilter<$PrismaModel = never> = { equals?: $Enums.VerificationStep | EnumVerificationStepFieldRefInput<$PrismaModel> in?: $Enums.VerificationStep[] | ListEnumVerificationStepFieldRefInput<$PrismaModel> @@ -47536,27 +59512,11 @@ export namespace Prisma { not?: NestedEnumVerificationStepFilter<$PrismaModel> | $Enums.VerificationStep } - export type CityNullableRelationFilter = { - is?: CityWhereInput | null - isNot?: CityWhereInput | null - } - export type AdminUserNullableRelationFilter = { is?: AdminUserWhereInput | null isNot?: AdminUserWhereInput | null } - export type UploadedFileNullableRelationFilter = { - is?: UploadedFileWhereInput | null - isNot?: UploadedFileWhereInput | null - } - - export type OrderListRelationFilter = { - every?: OrderWhereInput - some?: OrderWhereInput - none?: OrderWhereInput - } - export type WalletBonusListRelationFilter = { every?: WalletBonusWhereInput some?: WalletBonusWhereInput @@ -47587,8 +59547,16 @@ export namespace Prisma { none?: CustomerActivityLogWhereInput } - export type OrderOrderByRelationAggregateInput = { - _count?: SortOrder + export type CustomerOtpListRelationFilter = { + every?: CustomerOtpWhereInput + some?: CustomerOtpWhereInput + none?: CustomerOtpWhereInput + } + + export type CustomerFavoriteListRelationFilter = { + every?: CustomerFavoriteWhereInput + some?: CustomerFavoriteWhereInput + none?: CustomerFavoriteWhereInput } export type WalletBonusOrderByRelationAggregateInput = { @@ -47611,13 +59579,24 @@ export namespace Prisma { _count?: SortOrder } + export type CustomerOtpOrderByRelationAggregateInput = { + _count?: SortOrder + } + + export type CustomerFavoriteOrderByRelationAggregateInput = { + _count?: SortOrder + } + export type CustomerCountOrderByAggregateInput = { id?: SortOrder fullName?: SortOrder + firstName?: SortOrder + lastName?: SortOrder mobile?: SortOrder nationalCode?: SortOrder passwordHash?: SortOrder cityId?: SortOrder + cityNameRaw?: SortOrder kind?: SortOrder phone?: SortOrder address?: SortOrder @@ -47629,10 +59608,17 @@ export namespace Prisma { goldCreditLimitGrams?: SortOrder goldDebtGrams?: SortOrder fiatDebtRial?: SortOrder + accountingGoldBalance?: SortOrder + accountingRialBalance?: SortOrder + accountingBalanceAt?: SortOrder + makingChargeOffsetPercent?: SortOrder verificationStep?: SortOrder nationalIdImageUrl?: SortOrder businessLicenseUrl?: SortOrder shopImageUrl?: SortOrder + verificationRejectionReason?: SortOrder + verificationRejectedAt?: SortOrder + birthDate?: SortOrder avatarFileId?: SortOrder canPlaceOrders?: SortOrder isActive?: SortOrder @@ -47645,15 +59631,21 @@ export namespace Prisma { goldCreditLimitGrams?: SortOrder goldDebtGrams?: SortOrder fiatDebtRial?: SortOrder + accountingGoldBalance?: SortOrder + accountingRialBalance?: SortOrder + makingChargeOffsetPercent?: SortOrder } export type CustomerMaxOrderByAggregateInput = { id?: SortOrder fullName?: SortOrder + firstName?: SortOrder + lastName?: SortOrder mobile?: SortOrder nationalCode?: SortOrder passwordHash?: SortOrder cityId?: SortOrder + cityNameRaw?: SortOrder kind?: SortOrder phone?: SortOrder address?: SortOrder @@ -47665,10 +59657,17 @@ export namespace Prisma { goldCreditLimitGrams?: SortOrder goldDebtGrams?: SortOrder fiatDebtRial?: SortOrder + accountingGoldBalance?: SortOrder + accountingRialBalance?: SortOrder + accountingBalanceAt?: SortOrder + makingChargeOffsetPercent?: SortOrder verificationStep?: SortOrder nationalIdImageUrl?: SortOrder businessLicenseUrl?: SortOrder shopImageUrl?: SortOrder + verificationRejectionReason?: SortOrder + verificationRejectedAt?: SortOrder + birthDate?: SortOrder avatarFileId?: SortOrder canPlaceOrders?: SortOrder isActive?: SortOrder @@ -47680,10 +59679,13 @@ export namespace Prisma { export type CustomerMinOrderByAggregateInput = { id?: SortOrder fullName?: SortOrder + firstName?: SortOrder + lastName?: SortOrder mobile?: SortOrder nationalCode?: SortOrder passwordHash?: SortOrder cityId?: SortOrder + cityNameRaw?: SortOrder kind?: SortOrder phone?: SortOrder address?: SortOrder @@ -47695,10 +59697,17 @@ export namespace Prisma { goldCreditLimitGrams?: SortOrder goldDebtGrams?: SortOrder fiatDebtRial?: SortOrder + accountingGoldBalance?: SortOrder + accountingRialBalance?: SortOrder + accountingBalanceAt?: SortOrder + makingChargeOffsetPercent?: SortOrder verificationStep?: SortOrder nationalIdImageUrl?: SortOrder businessLicenseUrl?: SortOrder shopImageUrl?: SortOrder + verificationRejectionReason?: SortOrder + verificationRejectedAt?: SortOrder + birthDate?: SortOrder avatarFileId?: SortOrder canPlaceOrders?: SortOrder isActive?: SortOrder @@ -47711,6 +59720,9 @@ export namespace Prisma { goldCreditLimitGrams?: SortOrder goldDebtGrams?: SortOrder fiatDebtRial?: SortOrder + accountingGoldBalance?: SortOrder + accountingRialBalance?: SortOrder + makingChargeOffsetPercent?: SortOrder } export type EnumCustomerKindWithAggregatesFilter<$PrismaModel = never> = { @@ -47723,22 +59735,6 @@ export namespace Prisma { _max?: NestedEnumCustomerKindFilter<$PrismaModel> } - export type DecimalWithAggregatesFilter<$PrismaModel = never> = { - equals?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> - in?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel> - notIn?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel> - lt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> - lte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> - gt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> - gte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> - not?: NestedDecimalWithAggregatesFilter<$PrismaModel> | Decimal | DecimalJsLike | number | string - _count?: NestedIntFilter<$PrismaModel> - _avg?: NestedDecimalFilter<$PrismaModel> - _sum?: NestedDecimalFilter<$PrismaModel> - _min?: NestedDecimalFilter<$PrismaModel> - _max?: NestedDecimalFilter<$PrismaModel> - } - export type EnumVerificationStepWithAggregatesFilter<$PrismaModel = never> = { equals?: $Enums.VerificationStep | EnumVerificationStepFieldRefInput<$PrismaModel> in?: $Enums.VerificationStep[] | ListEnumVerificationStepFieldRefInput<$PrismaModel> @@ -47754,6 +59750,34 @@ export namespace Prisma { isNot?: CustomerWhereInput } + export type ProductRelationFilter = { + is?: ProductWhereInput + isNot?: ProductWhereInput + } + + export type CustomerFavoriteCustomerIdProductIdCompoundUniqueInput = { + customerId: string + productId: string + } + + export type CustomerFavoriteCountOrderByAggregateInput = { + customerId?: SortOrder + productId?: SortOrder + createdAt?: SortOrder + } + + export type CustomerFavoriteMaxOrderByAggregateInput = { + customerId?: SortOrder + productId?: SortOrder + createdAt?: SortOrder + } + + export type CustomerFavoriteMinOrderByAggregateInput = { + customerId?: SortOrder + productId?: SortOrder + createdAt?: SortOrder + } + export type CustomerAddressCountOrderByAggregateInput = { id?: SortOrder customerId?: SortOrder @@ -47986,11 +60010,6 @@ export namespace Prisma { isNot?: CollectionWhereInput } - export type ProductRelationFilter = { - is?: ProductWhereInput - isNot?: ProductWhereInput - } - export type CollectionProductCollectionIdProductIdCompoundUniqueInput = { collectionId: string productId: string @@ -48056,10 +60075,15 @@ export namespace Prisma { showType?: SortOrder isActive?: SortOrder createdAt?: SortOrder + accountingStockWeight?: SortOrder + accountingStockCount?: SortOrder + accountingStockAt?: SortOrder } export type ProductAvgOrderByAggregateInput = { showType?: SortOrder + accountingStockWeight?: SortOrder + accountingStockCount?: SortOrder } export type ProductMaxOrderByAggregateInput = { @@ -48072,6 +60096,9 @@ export namespace Prisma { showType?: SortOrder isActive?: SortOrder createdAt?: SortOrder + accountingStockWeight?: SortOrder + accountingStockCount?: SortOrder + accountingStockAt?: SortOrder } export type ProductMinOrderByAggregateInput = { @@ -48084,10 +60111,15 @@ export namespace Prisma { showType?: SortOrder isActive?: SortOrder createdAt?: SortOrder + accountingStockWeight?: SortOrder + accountingStockCount?: SortOrder + accountingStockAt?: SortOrder } export type ProductSumOrderByAggregateInput = { showType?: SortOrder + accountingStockWeight?: SortOrder + accountingStockCount?: SortOrder } export type EnumProductImageRoleFilter<$PrismaModel = never> = { @@ -48139,6 +60171,11 @@ export namespace Prisma { _max?: NestedEnumProductImageRoleFilter<$PrismaModel> } + export type ProductImageNullableRelationFilter = { + is?: ProductImageWhereInput | null + isNot?: ProductImageWhereInput | null + } + export type OrderItemListRelationFilter = { every?: OrderItemWhereInput some?: OrderItemWhereInput @@ -48159,6 +60196,7 @@ export namespace Prisma { qty?: SortOrder isPreOrder?: SortOrder isActive?: SortOrder + imageId?: SortOrder } export type ProductVariantAvgOrderByAggregateInput = { @@ -48177,6 +60215,7 @@ export namespace Prisma { qty?: SortOrder isPreOrder?: SortOrder isActive?: SortOrder + imageId?: SortOrder } export type ProductVariantMinOrderByAggregateInput = { @@ -48189,6 +60228,7 @@ export namespace Prisma { qty?: SortOrder isPreOrder?: SortOrder isActive?: SortOrder + imageId?: SortOrder } export type ProductVariantSumOrderByAggregateInput = { @@ -48211,17 +60251,6 @@ export namespace Prisma { not?: NestedEnumOrderStatusFilter<$PrismaModel> | $Enums.OrderStatus } - export type DateTimeNullableFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null - in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null - notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - not?: NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null - } - export type PreOrderNullableRelationFilter = { is?: PreOrderWhereInput | null isNot?: PreOrderWhereInput | null @@ -48239,6 +60268,8 @@ export namespace Prisma { flatRialCharge?: SortOrder isSuspendedOverCreditLimit?: SortOrder deliveredAt?: SortOrder + salesAgentId?: SortOrder + referrerCustomerId?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder } @@ -48261,6 +60292,8 @@ export namespace Prisma { flatRialCharge?: SortOrder isSuspendedOverCreditLimit?: SortOrder deliveredAt?: SortOrder + salesAgentId?: SortOrder + referrerCustomerId?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder } @@ -48277,6 +60310,8 @@ export namespace Prisma { flatRialCharge?: SortOrder isSuspendedOverCreditLimit?: SortOrder deliveredAt?: SortOrder + salesAgentId?: SortOrder + referrerCustomerId?: SortOrder createdAt?: SortOrder updatedAt?: SortOrder } @@ -48307,20 +60342,6 @@ export namespace Prisma { _max?: NestedEnumOrderStatusFilter<$PrismaModel> } - export type DateTimeNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null - in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null - notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - not?: NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null - _count?: NestedIntNullableFilter<$PrismaModel> - _min?: NestedDateTimeNullableFilter<$PrismaModel> - _max?: NestedDateTimeNullableFilter<$PrismaModel> - } - export type OrderRelationFilter = { is?: OrderWhereInput isNot?: OrderWhereInput @@ -48963,6 +60984,255 @@ export namespace Prisma { updatedAt?: SortOrder } + export type EnumAccountingEntityTypeFilter<$PrismaModel = never> = { + equals?: $Enums.AccountingEntityType | EnumAccountingEntityTypeFieldRefInput<$PrismaModel> + in?: $Enums.AccountingEntityType[] | ListEnumAccountingEntityTypeFieldRefInput<$PrismaModel> + notIn?: $Enums.AccountingEntityType[] | ListEnumAccountingEntityTypeFieldRefInput<$PrismaModel> + not?: NestedEnumAccountingEntityTypeFilter<$PrismaModel> | $Enums.AccountingEntityType + } + export type JsonNullableFilter<$PrismaModel = never> = + | PatchUndefined< + Either>, Exclude>, 'path'>>, + Required> + > + | OptionalFlat>, 'path'>> + + export type JsonNullableFilterBase<$PrismaModel = never> = { + equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter + path?: string[] + string_contains?: string | StringFieldRefInput<$PrismaModel> + string_starts_with?: string | StringFieldRefInput<$PrismaModel> + string_ends_with?: string | StringFieldRefInput<$PrismaModel> + array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null + array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null + array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null + lt?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + lte?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + gt?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + gte?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter + } + + export type AccountingLinkProviderEntityTypeEntityIdCompoundUniqueInput = { + provider: string + entityType: $Enums.AccountingEntityType + entityId: string + } + + export type AccountingLinkProviderEntityTypeExternalCodeCompoundUniqueInput = { + provider: string + entityType: $Enums.AccountingEntityType + externalCode: string + } + + export type AccountingLinkCountOrderByAggregateInput = { + id?: SortOrder + provider?: SortOrder + entityType?: SortOrder + entityId?: SortOrder + externalCode?: SortOrder + externalName?: SortOrder + origin?: SortOrder + snapshot?: SortOrder + syncedAt?: SortOrder + createdAt?: SortOrder + } + + export type AccountingLinkMaxOrderByAggregateInput = { + id?: SortOrder + provider?: SortOrder + entityType?: SortOrder + entityId?: SortOrder + externalCode?: SortOrder + externalName?: SortOrder + origin?: SortOrder + syncedAt?: SortOrder + createdAt?: SortOrder + } + + export type AccountingLinkMinOrderByAggregateInput = { + id?: SortOrder + provider?: SortOrder + entityType?: SortOrder + entityId?: SortOrder + externalCode?: SortOrder + externalName?: SortOrder + origin?: SortOrder + syncedAt?: SortOrder + createdAt?: SortOrder + } + + export type EnumAccountingEntityTypeWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.AccountingEntityType | EnumAccountingEntityTypeFieldRefInput<$PrismaModel> + in?: $Enums.AccountingEntityType[] | ListEnumAccountingEntityTypeFieldRefInput<$PrismaModel> + notIn?: $Enums.AccountingEntityType[] | ListEnumAccountingEntityTypeFieldRefInput<$PrismaModel> + not?: NestedEnumAccountingEntityTypeWithAggregatesFilter<$PrismaModel> | $Enums.AccountingEntityType + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumAccountingEntityTypeFilter<$PrismaModel> + _max?: NestedEnumAccountingEntityTypeFilter<$PrismaModel> + } + export type JsonNullableWithAggregatesFilter<$PrismaModel = never> = + | PatchUndefined< + Either>, Exclude>, 'path'>>, + Required> + > + | OptionalFlat>, 'path'>> + + export type JsonNullableWithAggregatesFilterBase<$PrismaModel = never> = { + equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter + path?: string[] + string_contains?: string | StringFieldRefInput<$PrismaModel> + string_starts_with?: string | StringFieldRefInput<$PrismaModel> + string_ends_with?: string | StringFieldRefInput<$PrismaModel> + array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null + array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null + array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null + lt?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + lte?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + gt?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + gte?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedJsonNullableFilter<$PrismaModel> + _max?: NestedJsonNullableFilter<$PrismaModel> + } + + export type EnumAccountingOutboxKindFilter<$PrismaModel = never> = { + equals?: $Enums.AccountingOutboxKind | EnumAccountingOutboxKindFieldRefInput<$PrismaModel> + in?: $Enums.AccountingOutboxKind[] | ListEnumAccountingOutboxKindFieldRefInput<$PrismaModel> + notIn?: $Enums.AccountingOutboxKind[] | ListEnumAccountingOutboxKindFieldRefInput<$PrismaModel> + not?: NestedEnumAccountingOutboxKindFilter<$PrismaModel> | $Enums.AccountingOutboxKind + } + + export type EnumAccountingOutboxStatusFilter<$PrismaModel = never> = { + equals?: $Enums.AccountingOutboxStatus | EnumAccountingOutboxStatusFieldRefInput<$PrismaModel> + in?: $Enums.AccountingOutboxStatus[] | ListEnumAccountingOutboxStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.AccountingOutboxStatus[] | ListEnumAccountingOutboxStatusFieldRefInput<$PrismaModel> + not?: NestedEnumAccountingOutboxStatusFilter<$PrismaModel> | $Enums.AccountingOutboxStatus + } + + export type AccountingOutboxCountOrderByAggregateInput = { + id?: SortOrder + provider?: SortOrder + kind?: SortOrder + entityId?: SortOrder + status?: SortOrder + attempts?: SortOrder + nextAttemptAt?: SortOrder + lastError?: SortOrder + externalRef?: SortOrder + progress?: SortOrder + lastRequest?: SortOrder + lastResponse?: SortOrder + sentAt?: SortOrder + resolvedById?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type AccountingOutboxAvgOrderByAggregateInput = { + attempts?: SortOrder + } + + export type AccountingOutboxMaxOrderByAggregateInput = { + id?: SortOrder + provider?: SortOrder + kind?: SortOrder + entityId?: SortOrder + status?: SortOrder + attempts?: SortOrder + nextAttemptAt?: SortOrder + lastError?: SortOrder + externalRef?: SortOrder + sentAt?: SortOrder + resolvedById?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type AccountingOutboxMinOrderByAggregateInput = { + id?: SortOrder + provider?: SortOrder + kind?: SortOrder + entityId?: SortOrder + status?: SortOrder + attempts?: SortOrder + nextAttemptAt?: SortOrder + lastError?: SortOrder + externalRef?: SortOrder + sentAt?: SortOrder + resolvedById?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + } + + export type AccountingOutboxSumOrderByAggregateInput = { + attempts?: SortOrder + } + + export type EnumAccountingOutboxKindWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.AccountingOutboxKind | EnumAccountingOutboxKindFieldRefInput<$PrismaModel> + in?: $Enums.AccountingOutboxKind[] | ListEnumAccountingOutboxKindFieldRefInput<$PrismaModel> + notIn?: $Enums.AccountingOutboxKind[] | ListEnumAccountingOutboxKindFieldRefInput<$PrismaModel> + not?: NestedEnumAccountingOutboxKindWithAggregatesFilter<$PrismaModel> | $Enums.AccountingOutboxKind + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumAccountingOutboxKindFilter<$PrismaModel> + _max?: NestedEnumAccountingOutboxKindFilter<$PrismaModel> + } + + export type EnumAccountingOutboxStatusWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.AccountingOutboxStatus | EnumAccountingOutboxStatusFieldRefInput<$PrismaModel> + in?: $Enums.AccountingOutboxStatus[] | ListEnumAccountingOutboxStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.AccountingOutboxStatus[] | ListEnumAccountingOutboxStatusFieldRefInput<$PrismaModel> + not?: NestedEnumAccountingOutboxStatusWithAggregatesFilter<$PrismaModel> | $Enums.AccountingOutboxStatus + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumAccountingOutboxStatusFilter<$PrismaModel> + _max?: NestedEnumAccountingOutboxStatusFilter<$PrismaModel> + } + + export type AccountingIssueProviderKindExternalCodeCompoundUniqueInput = { + provider: string + kind: string + externalCode: string + } + + export type AccountingIssueCountOrderByAggregateInput = { + id?: SortOrder + provider?: SortOrder + kind?: SortOrder + externalCode?: SortOrder + entityId?: SortOrder + message?: SortOrder + data?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + resolvedAt?: SortOrder + } + + export type AccountingIssueMaxOrderByAggregateInput = { + id?: SortOrder + provider?: SortOrder + kind?: SortOrder + externalCode?: SortOrder + entityId?: SortOrder + message?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + resolvedAt?: SortOrder + } + + export type AccountingIssueMinOrderByAggregateInput = { + id?: SortOrder + provider?: SortOrder + kind?: SortOrder + externalCode?: SortOrder + entityId?: SortOrder + message?: SortOrder + createdAt?: SortOrder + updatedAt?: SortOrder + resolvedAt?: SortOrder + } + export type EnumPromotionScopeFilter<$PrismaModel = never> = { equals?: $Enums.PromotionScope | EnumPromotionScopeFieldRefInput<$PrismaModel> in?: $Enums.PromotionScope[] | ListEnumPromotionScopeFieldRefInput<$PrismaModel> @@ -48982,11 +61252,6 @@ export namespace Prisma { isNot?: ProductWhereInput | null } - export type CustomerNullableRelationFilter = { - is?: CustomerWhereInput | null - isNot?: CustomerWhereInput | null - } - export type PromotionCountOrderByAggregateInput = { id?: SortOrder title?: SortOrder @@ -49375,6 +61640,63 @@ export namespace Prisma { sizeBytes?: SortOrder } + export type CustomerOtpCountOrderByAggregateInput = { + id?: SortOrder + mobile?: SortOrder + customerId?: SortOrder + codeHash?: SortOrder + expiresAt?: SortOrder + attempts?: SortOrder + consumedAt?: SortOrder + requestIp?: SortOrder + createdAt?: SortOrder + } + + export type CustomerOtpAvgOrderByAggregateInput = { + attempts?: SortOrder + } + + export type CustomerOtpMaxOrderByAggregateInput = { + id?: SortOrder + mobile?: SortOrder + customerId?: SortOrder + codeHash?: SortOrder + expiresAt?: SortOrder + attempts?: SortOrder + consumedAt?: SortOrder + requestIp?: SortOrder + createdAt?: SortOrder + } + + export type CustomerOtpMinOrderByAggregateInput = { + id?: SortOrder + mobile?: SortOrder + customerId?: SortOrder + codeHash?: SortOrder + expiresAt?: SortOrder + attempts?: SortOrder + consumedAt?: SortOrder + requestIp?: SortOrder + createdAt?: SortOrder + } + + export type CustomerOtpSumOrderByAggregateInput = { + attempts?: SortOrder + } + + export type CityCreateNestedOneWithoutChildrenInput = { + create?: XOR + connectOrCreate?: CityCreateOrConnectWithoutChildrenInput + connect?: CityWhereUniqueInput + } + + export type CityCreateNestedManyWithoutParentInput = { + create?: XOR | CityCreateWithoutParentInput[] | CityUncheckedCreateWithoutParentInput[] + connectOrCreate?: CityCreateOrConnectWithoutParentInput | CityCreateOrConnectWithoutParentInput[] + createMany?: CityCreateManyParentInputEnvelope + connect?: CityWhereUniqueInput | CityWhereUniqueInput[] + } + export type CustomerCreateNestedManyWithoutCityInput = { create?: XOR | CustomerCreateWithoutCityInput[] | CustomerUncheckedCreateWithoutCityInput[] connectOrCreate?: CustomerCreateOrConnectWithoutCityInput | CustomerCreateOrConnectWithoutCityInput[] @@ -49403,6 +61725,20 @@ export namespace Prisma { connect?: PreOrderWhereUniqueInput | PreOrderWhereUniqueInput[] } + export type SalesExpertProfileCreateNestedManyWithoutCityInput = { + create?: XOR | SalesExpertProfileCreateWithoutCityInput[] | SalesExpertProfileUncheckedCreateWithoutCityInput[] + connectOrCreate?: SalesExpertProfileCreateOrConnectWithoutCityInput | SalesExpertProfileCreateOrConnectWithoutCityInput[] + createMany?: SalesExpertProfileCreateManyCityInputEnvelope + connect?: SalesExpertProfileWhereUniqueInput | SalesExpertProfileWhereUniqueInput[] + } + + export type CityUncheckedCreateNestedManyWithoutParentInput = { + create?: XOR | CityCreateWithoutParentInput[] | CityUncheckedCreateWithoutParentInput[] + connectOrCreate?: CityCreateOrConnectWithoutParentInput | CityCreateOrConnectWithoutParentInput[] + createMany?: CityCreateManyParentInputEnvelope + connect?: CityWhereUniqueInput | CityWhereUniqueInput[] + } + export type CustomerUncheckedCreateNestedManyWithoutCityInput = { create?: XOR | CustomerCreateWithoutCityInput[] | CustomerUncheckedCreateWithoutCityInput[] connectOrCreate?: CustomerCreateOrConnectWithoutCityInput | CustomerCreateOrConnectWithoutCityInput[] @@ -49431,12 +61767,15 @@ export namespace Prisma { connect?: PreOrderWhereUniqueInput | PreOrderWhereUniqueInput[] } - export type StringFieldUpdateOperationsInput = { - set?: string + export type SalesExpertProfileUncheckedCreateNestedManyWithoutCityInput = { + create?: XOR | SalesExpertProfileCreateWithoutCityInput[] | SalesExpertProfileUncheckedCreateWithoutCityInput[] + connectOrCreate?: SalesExpertProfileCreateOrConnectWithoutCityInput | SalesExpertProfileCreateOrConnectWithoutCityInput[] + createMany?: SalesExpertProfileCreateManyCityInputEnvelope + connect?: SalesExpertProfileWhereUniqueInput | SalesExpertProfileWhereUniqueInput[] } - export type NullableStringFieldUpdateOperationsInput = { - set?: string | null + export type StringFieldUpdateOperationsInput = { + set?: string } export type NullableDecimalFieldUpdateOperationsInput = { @@ -49447,6 +61786,30 @@ export namespace Prisma { divide?: Decimal | DecimalJsLike | number | string } + export type CityUpdateOneWithoutChildrenNestedInput = { + create?: XOR + connectOrCreate?: CityCreateOrConnectWithoutChildrenInput + upsert?: CityUpsertWithoutChildrenInput + disconnect?: CityWhereInput | boolean + delete?: CityWhereInput | boolean + connect?: CityWhereUniqueInput + update?: XOR, CityUncheckedUpdateWithoutChildrenInput> + } + + export type CityUpdateManyWithoutParentNestedInput = { + create?: XOR | CityCreateWithoutParentInput[] | CityUncheckedCreateWithoutParentInput[] + connectOrCreate?: CityCreateOrConnectWithoutParentInput | CityCreateOrConnectWithoutParentInput[] + upsert?: CityUpsertWithWhereUniqueWithoutParentInput | CityUpsertWithWhereUniqueWithoutParentInput[] + createMany?: CityCreateManyParentInputEnvelope + set?: CityWhereUniqueInput | CityWhereUniqueInput[] + disconnect?: CityWhereUniqueInput | CityWhereUniqueInput[] + delete?: CityWhereUniqueInput | CityWhereUniqueInput[] + connect?: CityWhereUniqueInput | CityWhereUniqueInput[] + update?: CityUpdateWithWhereUniqueWithoutParentInput | CityUpdateWithWhereUniqueWithoutParentInput[] + updateMany?: CityUpdateManyWithWhereWithoutParentInput | CityUpdateManyWithWhereWithoutParentInput[] + deleteMany?: CityScalarWhereInput | CityScalarWhereInput[] + } + export type CustomerUpdateManyWithoutCityNestedInput = { create?: XOR | CustomerCreateWithoutCityInput[] | CustomerUncheckedCreateWithoutCityInput[] connectOrCreate?: CustomerCreateOrConnectWithoutCityInput | CustomerCreateOrConnectWithoutCityInput[] @@ -49503,6 +61866,38 @@ export namespace Prisma { deleteMany?: PreOrderScalarWhereInput | PreOrderScalarWhereInput[] } + export type SalesExpertProfileUpdateManyWithoutCityNestedInput = { + create?: XOR | SalesExpertProfileCreateWithoutCityInput[] | SalesExpertProfileUncheckedCreateWithoutCityInput[] + connectOrCreate?: SalesExpertProfileCreateOrConnectWithoutCityInput | SalesExpertProfileCreateOrConnectWithoutCityInput[] + upsert?: SalesExpertProfileUpsertWithWhereUniqueWithoutCityInput | SalesExpertProfileUpsertWithWhereUniqueWithoutCityInput[] + createMany?: SalesExpertProfileCreateManyCityInputEnvelope + set?: SalesExpertProfileWhereUniqueInput | SalesExpertProfileWhereUniqueInput[] + disconnect?: SalesExpertProfileWhereUniqueInput | SalesExpertProfileWhereUniqueInput[] + delete?: SalesExpertProfileWhereUniqueInput | SalesExpertProfileWhereUniqueInput[] + connect?: SalesExpertProfileWhereUniqueInput | SalesExpertProfileWhereUniqueInput[] + update?: SalesExpertProfileUpdateWithWhereUniqueWithoutCityInput | SalesExpertProfileUpdateWithWhereUniqueWithoutCityInput[] + updateMany?: SalesExpertProfileUpdateManyWithWhereWithoutCityInput | SalesExpertProfileUpdateManyWithWhereWithoutCityInput[] + deleteMany?: SalesExpertProfileScalarWhereInput | SalesExpertProfileScalarWhereInput[] + } + + export type NullableStringFieldUpdateOperationsInput = { + set?: string | null + } + + export type CityUncheckedUpdateManyWithoutParentNestedInput = { + create?: XOR | CityCreateWithoutParentInput[] | CityUncheckedCreateWithoutParentInput[] + connectOrCreate?: CityCreateOrConnectWithoutParentInput | CityCreateOrConnectWithoutParentInput[] + upsert?: CityUpsertWithWhereUniqueWithoutParentInput | CityUpsertWithWhereUniqueWithoutParentInput[] + createMany?: CityCreateManyParentInputEnvelope + set?: CityWhereUniqueInput | CityWhereUniqueInput[] + disconnect?: CityWhereUniqueInput | CityWhereUniqueInput[] + delete?: CityWhereUniqueInput | CityWhereUniqueInput[] + connect?: CityWhereUniqueInput | CityWhereUniqueInput[] + update?: CityUpdateWithWhereUniqueWithoutParentInput | CityUpdateWithWhereUniqueWithoutParentInput[] + updateMany?: CityUpdateManyWithWhereWithoutParentInput | CityUpdateManyWithWhereWithoutParentInput[] + deleteMany?: CityScalarWhereInput | CityScalarWhereInput[] + } + export type CustomerUncheckedUpdateManyWithoutCityNestedInput = { create?: XOR | CustomerCreateWithoutCityInput[] | CustomerUncheckedCreateWithoutCityInput[] connectOrCreate?: CustomerCreateOrConnectWithoutCityInput | CustomerCreateOrConnectWithoutCityInput[] @@ -49559,6 +61954,20 @@ export namespace Prisma { deleteMany?: PreOrderScalarWhereInput | PreOrderScalarWhereInput[] } + export type SalesExpertProfileUncheckedUpdateManyWithoutCityNestedInput = { + create?: XOR | SalesExpertProfileCreateWithoutCityInput[] | SalesExpertProfileUncheckedCreateWithoutCityInput[] + connectOrCreate?: SalesExpertProfileCreateOrConnectWithoutCityInput | SalesExpertProfileCreateOrConnectWithoutCityInput[] + upsert?: SalesExpertProfileUpsertWithWhereUniqueWithoutCityInput | SalesExpertProfileUpsertWithWhereUniqueWithoutCityInput[] + createMany?: SalesExpertProfileCreateManyCityInputEnvelope + set?: SalesExpertProfileWhereUniqueInput | SalesExpertProfileWhereUniqueInput[] + disconnect?: SalesExpertProfileWhereUniqueInput | SalesExpertProfileWhereUniqueInput[] + delete?: SalesExpertProfileWhereUniqueInput | SalesExpertProfileWhereUniqueInput[] + connect?: SalesExpertProfileWhereUniqueInput | SalesExpertProfileWhereUniqueInput[] + update?: SalesExpertProfileUpdateWithWhereUniqueWithoutCityInput | SalesExpertProfileUpdateWithWhereUniqueWithoutCityInput[] + updateMany?: SalesExpertProfileUpdateManyWithWhereWithoutCityInput | SalesExpertProfileUpdateManyWithWhereWithoutCityInput[] + deleteMany?: SalesExpertProfileScalarWhereInput | SalesExpertProfileScalarWhereInput[] + } + export type UserTypeCreateNestedOneWithoutAdminUsersInput = { create?: XOR connectOrCreate?: UserTypeCreateOrConnectWithoutAdminUsersInput @@ -49571,6 +61980,12 @@ export namespace Prisma { connect?: BranchWhereUniqueInput } + export type UploadedFileCreateNestedOneWithoutAdminUserAvatarsInput = { + create?: XOR + connectOrCreate?: UploadedFileCreateOrConnectWithoutAdminUserAvatarsInput + connect?: UploadedFileWhereUniqueInput + } + export type CustomerCreateNestedManyWithoutReferredByAgentInput = { create?: XOR | CustomerCreateWithoutReferredByAgentInput[] | CustomerUncheckedCreateWithoutReferredByAgentInput[] connectOrCreate?: CustomerCreateOrConnectWithoutReferredByAgentInput | CustomerCreateOrConnectWithoutReferredByAgentInput[] @@ -49578,6 +61993,13 @@ export namespace Prisma { connect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[] } + export type OrderCreateNestedManyWithoutSalesAgentInput = { + create?: XOR | OrderCreateWithoutSalesAgentInput[] | OrderUncheckedCreateWithoutSalesAgentInput[] + connectOrCreate?: OrderCreateOrConnectWithoutSalesAgentInput | OrderCreateOrConnectWithoutSalesAgentInput[] + createMany?: OrderCreateManySalesAgentInputEnvelope + connect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + } + export type WorkshopCreateNestedManyWithoutSupervisorInput = { create?: XOR | WorkshopCreateWithoutSupervisorInput[] | WorkshopUncheckedCreateWithoutSupervisorInput[] connectOrCreate?: WorkshopCreateOrConnectWithoutSupervisorInput | WorkshopCreateOrConnectWithoutSupervisorInput[] @@ -49634,6 +62056,19 @@ export namespace Prisma { connect?: UploadedFileWhereUniqueInput | UploadedFileWhereUniqueInput[] } + export type SalesExpertProfileCreateNestedOneWithoutAdminUserInput = { + create?: XOR + connectOrCreate?: SalesExpertProfileCreateOrConnectWithoutAdminUserInput + connect?: SalesExpertProfileWhereUniqueInput + } + + export type AdminSessionCreateNestedManyWithoutAdminUserInput = { + create?: XOR | AdminSessionCreateWithoutAdminUserInput[] | AdminSessionUncheckedCreateWithoutAdminUserInput[] + connectOrCreate?: AdminSessionCreateOrConnectWithoutAdminUserInput | AdminSessionCreateOrConnectWithoutAdminUserInput[] + createMany?: AdminSessionCreateManyAdminUserInputEnvelope + connect?: AdminSessionWhereUniqueInput | AdminSessionWhereUniqueInput[] + } + export type CustomerUncheckedCreateNestedManyWithoutReferredByAgentInput = { create?: XOR | CustomerCreateWithoutReferredByAgentInput[] | CustomerUncheckedCreateWithoutReferredByAgentInput[] connectOrCreate?: CustomerCreateOrConnectWithoutReferredByAgentInput | CustomerCreateOrConnectWithoutReferredByAgentInput[] @@ -49641,6 +62076,13 @@ export namespace Prisma { connect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[] } + export type OrderUncheckedCreateNestedManyWithoutSalesAgentInput = { + create?: XOR | OrderCreateWithoutSalesAgentInput[] | OrderUncheckedCreateWithoutSalesAgentInput[] + connectOrCreate?: OrderCreateOrConnectWithoutSalesAgentInput | OrderCreateOrConnectWithoutSalesAgentInput[] + createMany?: OrderCreateManySalesAgentInputEnvelope + connect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + } + export type WorkshopUncheckedCreateNestedManyWithoutSupervisorInput = { create?: XOR | WorkshopCreateWithoutSupervisorInput[] | WorkshopUncheckedCreateWithoutSupervisorInput[] connectOrCreate?: WorkshopCreateOrConnectWithoutSupervisorInput | WorkshopCreateOrConnectWithoutSupervisorInput[] @@ -49697,6 +62139,19 @@ export namespace Prisma { connect?: UploadedFileWhereUniqueInput | UploadedFileWhereUniqueInput[] } + export type SalesExpertProfileUncheckedCreateNestedOneWithoutAdminUserInput = { + create?: XOR + connectOrCreate?: SalesExpertProfileCreateOrConnectWithoutAdminUserInput + connect?: SalesExpertProfileWhereUniqueInput + } + + export type AdminSessionUncheckedCreateNestedManyWithoutAdminUserInput = { + create?: XOR | AdminSessionCreateWithoutAdminUserInput[] | AdminSessionUncheckedCreateWithoutAdminUserInput[] + connectOrCreate?: AdminSessionCreateOrConnectWithoutAdminUserInput | AdminSessionCreateOrConnectWithoutAdminUserInput[] + createMany?: AdminSessionCreateManyAdminUserInputEnvelope + connect?: AdminSessionWhereUniqueInput | AdminSessionWhereUniqueInput[] + } + export type EnumAdminRoleFieldUpdateOperationsInput = { set?: $Enums.AdminRole } @@ -49729,6 +62184,16 @@ export namespace Prisma { update?: XOR, BranchUncheckedUpdateWithoutAdminUsersInput> } + export type UploadedFileUpdateOneWithoutAdminUserAvatarsNestedInput = { + create?: XOR + connectOrCreate?: UploadedFileCreateOrConnectWithoutAdminUserAvatarsInput + upsert?: UploadedFileUpsertWithoutAdminUserAvatarsInput + disconnect?: UploadedFileWhereInput | boolean + delete?: UploadedFileWhereInput | boolean + connect?: UploadedFileWhereUniqueInput + update?: XOR, UploadedFileUncheckedUpdateWithoutAdminUserAvatarsInput> + } + export type CustomerUpdateManyWithoutReferredByAgentNestedInput = { create?: XOR | CustomerCreateWithoutReferredByAgentInput[] | CustomerUncheckedCreateWithoutReferredByAgentInput[] connectOrCreate?: CustomerCreateOrConnectWithoutReferredByAgentInput | CustomerCreateOrConnectWithoutReferredByAgentInput[] @@ -49743,6 +62208,20 @@ export namespace Prisma { deleteMany?: CustomerScalarWhereInput | CustomerScalarWhereInput[] } + export type OrderUpdateManyWithoutSalesAgentNestedInput = { + create?: XOR | OrderCreateWithoutSalesAgentInput[] | OrderUncheckedCreateWithoutSalesAgentInput[] + connectOrCreate?: OrderCreateOrConnectWithoutSalesAgentInput | OrderCreateOrConnectWithoutSalesAgentInput[] + upsert?: OrderUpsertWithWhereUniqueWithoutSalesAgentInput | OrderUpsertWithWhereUniqueWithoutSalesAgentInput[] + createMany?: OrderCreateManySalesAgentInputEnvelope + set?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + disconnect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + delete?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + connect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + update?: OrderUpdateWithWhereUniqueWithoutSalesAgentInput | OrderUpdateWithWhereUniqueWithoutSalesAgentInput[] + updateMany?: OrderUpdateManyWithWhereWithoutSalesAgentInput | OrderUpdateManyWithWhereWithoutSalesAgentInput[] + deleteMany?: OrderScalarWhereInput | OrderScalarWhereInput[] + } + export type WorkshopUpdateManyWithoutSupervisorNestedInput = { create?: XOR | WorkshopCreateWithoutSupervisorInput[] | WorkshopUncheckedCreateWithoutSupervisorInput[] connectOrCreate?: WorkshopCreateOrConnectWithoutSupervisorInput | WorkshopCreateOrConnectWithoutSupervisorInput[] @@ -49855,6 +62334,30 @@ export namespace Prisma { deleteMany?: UploadedFileScalarWhereInput | UploadedFileScalarWhereInput[] } + export type SalesExpertProfileUpdateOneWithoutAdminUserNestedInput = { + create?: XOR + connectOrCreate?: SalesExpertProfileCreateOrConnectWithoutAdminUserInput + upsert?: SalesExpertProfileUpsertWithoutAdminUserInput + disconnect?: SalesExpertProfileWhereInput | boolean + delete?: SalesExpertProfileWhereInput | boolean + connect?: SalesExpertProfileWhereUniqueInput + update?: XOR, SalesExpertProfileUncheckedUpdateWithoutAdminUserInput> + } + + export type AdminSessionUpdateManyWithoutAdminUserNestedInput = { + create?: XOR | AdminSessionCreateWithoutAdminUserInput[] | AdminSessionUncheckedCreateWithoutAdminUserInput[] + connectOrCreate?: AdminSessionCreateOrConnectWithoutAdminUserInput | AdminSessionCreateOrConnectWithoutAdminUserInput[] + upsert?: AdminSessionUpsertWithWhereUniqueWithoutAdminUserInput | AdminSessionUpsertWithWhereUniqueWithoutAdminUserInput[] + createMany?: AdminSessionCreateManyAdminUserInputEnvelope + set?: AdminSessionWhereUniqueInput | AdminSessionWhereUniqueInput[] + disconnect?: AdminSessionWhereUniqueInput | AdminSessionWhereUniqueInput[] + delete?: AdminSessionWhereUniqueInput | AdminSessionWhereUniqueInput[] + connect?: AdminSessionWhereUniqueInput | AdminSessionWhereUniqueInput[] + update?: AdminSessionUpdateWithWhereUniqueWithoutAdminUserInput | AdminSessionUpdateWithWhereUniqueWithoutAdminUserInput[] + updateMany?: AdminSessionUpdateManyWithWhereWithoutAdminUserInput | AdminSessionUpdateManyWithWhereWithoutAdminUserInput[] + deleteMany?: AdminSessionScalarWhereInput | AdminSessionScalarWhereInput[] + } + export type NullableIntFieldUpdateOperationsInput = { set?: number | null increment?: number @@ -49877,6 +62380,20 @@ export namespace Prisma { deleteMany?: CustomerScalarWhereInput | CustomerScalarWhereInput[] } + export type OrderUncheckedUpdateManyWithoutSalesAgentNestedInput = { + create?: XOR | OrderCreateWithoutSalesAgentInput[] | OrderUncheckedCreateWithoutSalesAgentInput[] + connectOrCreate?: OrderCreateOrConnectWithoutSalesAgentInput | OrderCreateOrConnectWithoutSalesAgentInput[] + upsert?: OrderUpsertWithWhereUniqueWithoutSalesAgentInput | OrderUpsertWithWhereUniqueWithoutSalesAgentInput[] + createMany?: OrderCreateManySalesAgentInputEnvelope + set?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + disconnect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + delete?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + connect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + update?: OrderUpdateWithWhereUniqueWithoutSalesAgentInput | OrderUpdateWithWhereUniqueWithoutSalesAgentInput[] + updateMany?: OrderUpdateManyWithWhereWithoutSalesAgentInput | OrderUpdateManyWithWhereWithoutSalesAgentInput[] + deleteMany?: OrderScalarWhereInput | OrderScalarWhereInput[] + } + export type WorkshopUncheckedUpdateManyWithoutSupervisorNestedInput = { create?: XOR | WorkshopCreateWithoutSupervisorInput[] | WorkshopUncheckedCreateWithoutSupervisorInput[] connectOrCreate?: WorkshopCreateOrConnectWithoutSupervisorInput | WorkshopCreateOrConnectWithoutSupervisorInput[] @@ -49989,6 +62506,102 @@ export namespace Prisma { deleteMany?: UploadedFileScalarWhereInput | UploadedFileScalarWhereInput[] } + export type SalesExpertProfileUncheckedUpdateOneWithoutAdminUserNestedInput = { + create?: XOR + connectOrCreate?: SalesExpertProfileCreateOrConnectWithoutAdminUserInput + upsert?: SalesExpertProfileUpsertWithoutAdminUserInput + disconnect?: SalesExpertProfileWhereInput | boolean + delete?: SalesExpertProfileWhereInput | boolean + connect?: SalesExpertProfileWhereUniqueInput + update?: XOR, SalesExpertProfileUncheckedUpdateWithoutAdminUserInput> + } + + export type AdminSessionUncheckedUpdateManyWithoutAdminUserNestedInput = { + create?: XOR | AdminSessionCreateWithoutAdminUserInput[] | AdminSessionUncheckedCreateWithoutAdminUserInput[] + connectOrCreate?: AdminSessionCreateOrConnectWithoutAdminUserInput | AdminSessionCreateOrConnectWithoutAdminUserInput[] + upsert?: AdminSessionUpsertWithWhereUniqueWithoutAdminUserInput | AdminSessionUpsertWithWhereUniqueWithoutAdminUserInput[] + createMany?: AdminSessionCreateManyAdminUserInputEnvelope + set?: AdminSessionWhereUniqueInput | AdminSessionWhereUniqueInput[] + disconnect?: AdminSessionWhereUniqueInput | AdminSessionWhereUniqueInput[] + delete?: AdminSessionWhereUniqueInput | AdminSessionWhereUniqueInput[] + connect?: AdminSessionWhereUniqueInput | AdminSessionWhereUniqueInput[] + update?: AdminSessionUpdateWithWhereUniqueWithoutAdminUserInput | AdminSessionUpdateWithWhereUniqueWithoutAdminUserInput[] + updateMany?: AdminSessionUpdateManyWithWhereWithoutAdminUserInput | AdminSessionUpdateManyWithWhereWithoutAdminUserInput[] + deleteMany?: AdminSessionScalarWhereInput | AdminSessionScalarWhereInput[] + } + + export type NullableDateTimeFieldUpdateOperationsInput = { + set?: Date | string | null + } + + export type AdminUserCreateNestedOneWithoutSessionsInput = { + create?: XOR + connectOrCreate?: AdminUserCreateOrConnectWithoutSessionsInput + connect?: AdminUserWhereUniqueInput + } + + export type AdminUserUpdateOneRequiredWithoutSessionsNestedInput = { + create?: XOR + connectOrCreate?: AdminUserCreateOrConnectWithoutSessionsInput + upsert?: AdminUserUpsertWithoutSessionsInput + connect?: AdminUserWhereUniqueInput + update?: XOR, AdminUserUncheckedUpdateWithoutSessionsInput> + } + + export type AdminUserCreateNestedOneWithoutSalesExpertProfileInput = { + create?: XOR + connectOrCreate?: AdminUserCreateOrConnectWithoutSalesExpertProfileInput + connect?: AdminUserWhereUniqueInput + } + + export type CityCreateNestedOneWithoutSalesExpertProfilesInput = { + create?: XOR + connectOrCreate?: CityCreateOrConnectWithoutSalesExpertProfilesInput + connect?: CityWhereUniqueInput + } + + export type CustomerCreateNestedOneWithoutSalesExpertTradingForInput = { + create?: XOR + connectOrCreate?: CustomerCreateOrConnectWithoutSalesExpertTradingForInput + connect?: CustomerWhereUniqueInput + } + + export type DecimalFieldUpdateOperationsInput = { + set?: Decimal | DecimalJsLike | number | string + increment?: Decimal | DecimalJsLike | number | string + decrement?: Decimal | DecimalJsLike | number | string + multiply?: Decimal | DecimalJsLike | number | string + divide?: Decimal | DecimalJsLike | number | string + } + + export type AdminUserUpdateOneRequiredWithoutSalesExpertProfileNestedInput = { + create?: XOR + connectOrCreate?: AdminUserCreateOrConnectWithoutSalesExpertProfileInput + upsert?: AdminUserUpsertWithoutSalesExpertProfileInput + connect?: AdminUserWhereUniqueInput + update?: XOR, AdminUserUncheckedUpdateWithoutSalesExpertProfileInput> + } + + export type CityUpdateOneWithoutSalesExpertProfilesNestedInput = { + create?: XOR + connectOrCreate?: CityCreateOrConnectWithoutSalesExpertProfilesInput + upsert?: CityUpsertWithoutSalesExpertProfilesInput + disconnect?: CityWhereInput | boolean + delete?: CityWhereInput | boolean + connect?: CityWhereUniqueInput + update?: XOR, CityUncheckedUpdateWithoutSalesExpertProfilesInput> + } + + export type CustomerUpdateOneWithoutSalesExpertTradingForNestedInput = { + create?: XOR + connectOrCreate?: CustomerCreateOrConnectWithoutSalesExpertTradingForInput + upsert?: CustomerUpsertWithoutSalesExpertTradingForInput + disconnect?: CustomerWhereInput | boolean + delete?: CustomerWhereInput | boolean + connect?: CustomerWhereUniqueInput + update?: XOR, CustomerUncheckedUpdateWithoutSalesExpertTradingForInput> + } + export type CityCreateNestedOneWithoutCustomersInput = { create?: XOR connectOrCreate?: CityCreateOrConnectWithoutCustomersInput @@ -50001,6 +62614,19 @@ export namespace Prisma { connect?: AdminUserWhereUniqueInput } + export type SalesExpertProfileCreateNestedOneWithoutTradingCustomerInput = { + create?: XOR + connectOrCreate?: SalesExpertProfileCreateOrConnectWithoutTradingCustomerInput + connect?: SalesExpertProfileWhereUniqueInput + } + + export type OrderCreateNestedManyWithoutReferrerCustomerInput = { + create?: XOR | OrderCreateWithoutReferrerCustomerInput[] | OrderUncheckedCreateWithoutReferrerCustomerInput[] + connectOrCreate?: OrderCreateOrConnectWithoutReferrerCustomerInput | OrderCreateOrConnectWithoutReferrerCustomerInput[] + createMany?: OrderCreateManyReferrerCustomerInputEnvelope + connect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + } + export type UploadedFileCreateNestedOneWithoutCustomerAvatarsInput = { create?: XOR connectOrCreate?: UploadedFileCreateOrConnectWithoutCustomerAvatarsInput @@ -50070,6 +62696,33 @@ export namespace Prisma { connect?: CustomerActivityLogWhereUniqueInput | CustomerActivityLogWhereUniqueInput[] } + export type CustomerOtpCreateNestedManyWithoutCustomerInput = { + create?: XOR | CustomerOtpCreateWithoutCustomerInput[] | CustomerOtpUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: CustomerOtpCreateOrConnectWithoutCustomerInput | CustomerOtpCreateOrConnectWithoutCustomerInput[] + createMany?: CustomerOtpCreateManyCustomerInputEnvelope + connect?: CustomerOtpWhereUniqueInput | CustomerOtpWhereUniqueInput[] + } + + export type CustomerFavoriteCreateNestedManyWithoutCustomerInput = { + create?: XOR | CustomerFavoriteCreateWithoutCustomerInput[] | CustomerFavoriteUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: CustomerFavoriteCreateOrConnectWithoutCustomerInput | CustomerFavoriteCreateOrConnectWithoutCustomerInput[] + createMany?: CustomerFavoriteCreateManyCustomerInputEnvelope + connect?: CustomerFavoriteWhereUniqueInput | CustomerFavoriteWhereUniqueInput[] + } + + export type SalesExpertProfileUncheckedCreateNestedOneWithoutTradingCustomerInput = { + create?: XOR + connectOrCreate?: SalesExpertProfileCreateOrConnectWithoutTradingCustomerInput + connect?: SalesExpertProfileWhereUniqueInput + } + + export type OrderUncheckedCreateNestedManyWithoutReferrerCustomerInput = { + create?: XOR | OrderCreateWithoutReferrerCustomerInput[] | OrderUncheckedCreateWithoutReferrerCustomerInput[] + connectOrCreate?: OrderCreateOrConnectWithoutReferrerCustomerInput | OrderCreateOrConnectWithoutReferrerCustomerInput[] + createMany?: OrderCreateManyReferrerCustomerInputEnvelope + connect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + } + export type CustomerAddressUncheckedCreateNestedManyWithoutCustomerInput = { create?: XOR | CustomerAddressCreateWithoutCustomerInput[] | CustomerAddressUncheckedCreateWithoutCustomerInput[] connectOrCreate?: CustomerAddressCreateOrConnectWithoutCustomerInput | CustomerAddressCreateOrConnectWithoutCustomerInput[] @@ -50133,16 +62786,22 @@ export namespace Prisma { connect?: CustomerActivityLogWhereUniqueInput | CustomerActivityLogWhereUniqueInput[] } - export type EnumCustomerKindFieldUpdateOperationsInput = { - set?: $Enums.CustomerKind + export type CustomerOtpUncheckedCreateNestedManyWithoutCustomerInput = { + create?: XOR | CustomerOtpCreateWithoutCustomerInput[] | CustomerOtpUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: CustomerOtpCreateOrConnectWithoutCustomerInput | CustomerOtpCreateOrConnectWithoutCustomerInput[] + createMany?: CustomerOtpCreateManyCustomerInputEnvelope + connect?: CustomerOtpWhereUniqueInput | CustomerOtpWhereUniqueInput[] } - export type DecimalFieldUpdateOperationsInput = { - set?: Decimal | DecimalJsLike | number | string - increment?: Decimal | DecimalJsLike | number | string - decrement?: Decimal | DecimalJsLike | number | string - multiply?: Decimal | DecimalJsLike | number | string - divide?: Decimal | DecimalJsLike | number | string + export type CustomerFavoriteUncheckedCreateNestedManyWithoutCustomerInput = { + create?: XOR | CustomerFavoriteCreateWithoutCustomerInput[] | CustomerFavoriteUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: CustomerFavoriteCreateOrConnectWithoutCustomerInput | CustomerFavoriteCreateOrConnectWithoutCustomerInput[] + createMany?: CustomerFavoriteCreateManyCustomerInputEnvelope + connect?: CustomerFavoriteWhereUniqueInput | CustomerFavoriteWhereUniqueInput[] + } + + export type EnumCustomerKindFieldUpdateOperationsInput = { + set?: $Enums.CustomerKind } export type EnumVerificationStepFieldUpdateOperationsInput = { @@ -50169,6 +62828,30 @@ export namespace Prisma { update?: XOR, AdminUserUncheckedUpdateWithoutReferredCustomersInput> } + export type SalesExpertProfileUpdateOneWithoutTradingCustomerNestedInput = { + create?: XOR + connectOrCreate?: SalesExpertProfileCreateOrConnectWithoutTradingCustomerInput + upsert?: SalesExpertProfileUpsertWithoutTradingCustomerInput + disconnect?: SalesExpertProfileWhereInput | boolean + delete?: SalesExpertProfileWhereInput | boolean + connect?: SalesExpertProfileWhereUniqueInput + update?: XOR, SalesExpertProfileUncheckedUpdateWithoutTradingCustomerInput> + } + + export type OrderUpdateManyWithoutReferrerCustomerNestedInput = { + create?: XOR | OrderCreateWithoutReferrerCustomerInput[] | OrderUncheckedCreateWithoutReferrerCustomerInput[] + connectOrCreate?: OrderCreateOrConnectWithoutReferrerCustomerInput | OrderCreateOrConnectWithoutReferrerCustomerInput[] + upsert?: OrderUpsertWithWhereUniqueWithoutReferrerCustomerInput | OrderUpsertWithWhereUniqueWithoutReferrerCustomerInput[] + createMany?: OrderCreateManyReferrerCustomerInputEnvelope + set?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + disconnect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + delete?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + connect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + update?: OrderUpdateWithWhereUniqueWithoutReferrerCustomerInput | OrderUpdateWithWhereUniqueWithoutReferrerCustomerInput[] + updateMany?: OrderUpdateManyWithWhereWithoutReferrerCustomerInput | OrderUpdateManyWithWhereWithoutReferrerCustomerInput[] + deleteMany?: OrderScalarWhereInput | OrderScalarWhereInput[] + } + export type UploadedFileUpdateOneWithoutCustomerAvatarsNestedInput = { create?: XOR connectOrCreate?: UploadedFileCreateOrConnectWithoutCustomerAvatarsInput @@ -50305,6 +62988,58 @@ export namespace Prisma { deleteMany?: CustomerActivityLogScalarWhereInput | CustomerActivityLogScalarWhereInput[] } + export type CustomerOtpUpdateManyWithoutCustomerNestedInput = { + create?: XOR | CustomerOtpCreateWithoutCustomerInput[] | CustomerOtpUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: CustomerOtpCreateOrConnectWithoutCustomerInput | CustomerOtpCreateOrConnectWithoutCustomerInput[] + upsert?: CustomerOtpUpsertWithWhereUniqueWithoutCustomerInput | CustomerOtpUpsertWithWhereUniqueWithoutCustomerInput[] + createMany?: CustomerOtpCreateManyCustomerInputEnvelope + set?: CustomerOtpWhereUniqueInput | CustomerOtpWhereUniqueInput[] + disconnect?: CustomerOtpWhereUniqueInput | CustomerOtpWhereUniqueInput[] + delete?: CustomerOtpWhereUniqueInput | CustomerOtpWhereUniqueInput[] + connect?: CustomerOtpWhereUniqueInput | CustomerOtpWhereUniqueInput[] + update?: CustomerOtpUpdateWithWhereUniqueWithoutCustomerInput | CustomerOtpUpdateWithWhereUniqueWithoutCustomerInput[] + updateMany?: CustomerOtpUpdateManyWithWhereWithoutCustomerInput | CustomerOtpUpdateManyWithWhereWithoutCustomerInput[] + deleteMany?: CustomerOtpScalarWhereInput | CustomerOtpScalarWhereInput[] + } + + export type CustomerFavoriteUpdateManyWithoutCustomerNestedInput = { + create?: XOR | CustomerFavoriteCreateWithoutCustomerInput[] | CustomerFavoriteUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: CustomerFavoriteCreateOrConnectWithoutCustomerInput | CustomerFavoriteCreateOrConnectWithoutCustomerInput[] + upsert?: CustomerFavoriteUpsertWithWhereUniqueWithoutCustomerInput | CustomerFavoriteUpsertWithWhereUniqueWithoutCustomerInput[] + createMany?: CustomerFavoriteCreateManyCustomerInputEnvelope + set?: CustomerFavoriteWhereUniqueInput | CustomerFavoriteWhereUniqueInput[] + disconnect?: CustomerFavoriteWhereUniqueInput | CustomerFavoriteWhereUniqueInput[] + delete?: CustomerFavoriteWhereUniqueInput | CustomerFavoriteWhereUniqueInput[] + connect?: CustomerFavoriteWhereUniqueInput | CustomerFavoriteWhereUniqueInput[] + update?: CustomerFavoriteUpdateWithWhereUniqueWithoutCustomerInput | CustomerFavoriteUpdateWithWhereUniqueWithoutCustomerInput[] + updateMany?: CustomerFavoriteUpdateManyWithWhereWithoutCustomerInput | CustomerFavoriteUpdateManyWithWhereWithoutCustomerInput[] + deleteMany?: CustomerFavoriteScalarWhereInput | CustomerFavoriteScalarWhereInput[] + } + + export type SalesExpertProfileUncheckedUpdateOneWithoutTradingCustomerNestedInput = { + create?: XOR + connectOrCreate?: SalesExpertProfileCreateOrConnectWithoutTradingCustomerInput + upsert?: SalesExpertProfileUpsertWithoutTradingCustomerInput + disconnect?: SalesExpertProfileWhereInput | boolean + delete?: SalesExpertProfileWhereInput | boolean + connect?: SalesExpertProfileWhereUniqueInput + update?: XOR, SalesExpertProfileUncheckedUpdateWithoutTradingCustomerInput> + } + + export type OrderUncheckedUpdateManyWithoutReferrerCustomerNestedInput = { + create?: XOR | OrderCreateWithoutReferrerCustomerInput[] | OrderUncheckedCreateWithoutReferrerCustomerInput[] + connectOrCreate?: OrderCreateOrConnectWithoutReferrerCustomerInput | OrderCreateOrConnectWithoutReferrerCustomerInput[] + upsert?: OrderUpsertWithWhereUniqueWithoutReferrerCustomerInput | OrderUpsertWithWhereUniqueWithoutReferrerCustomerInput[] + createMany?: OrderCreateManyReferrerCustomerInputEnvelope + set?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + disconnect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + delete?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + connect?: OrderWhereUniqueInput | OrderWhereUniqueInput[] + update?: OrderUpdateWithWhereUniqueWithoutReferrerCustomerInput | OrderUpdateWithWhereUniqueWithoutReferrerCustomerInput[] + updateMany?: OrderUpdateManyWithWhereWithoutReferrerCustomerInput | OrderUpdateManyWithWhereWithoutReferrerCustomerInput[] + deleteMany?: OrderScalarWhereInput | OrderScalarWhereInput[] + } + export type CustomerAddressUncheckedUpdateManyWithoutCustomerNestedInput = { create?: XOR | CustomerAddressCreateWithoutCustomerInput[] | CustomerAddressUncheckedCreateWithoutCustomerInput[] connectOrCreate?: CustomerAddressCreateOrConnectWithoutCustomerInput | CustomerAddressCreateOrConnectWithoutCustomerInput[] @@ -50431,6 +63166,62 @@ export namespace Prisma { deleteMany?: CustomerActivityLogScalarWhereInput | CustomerActivityLogScalarWhereInput[] } + export type CustomerOtpUncheckedUpdateManyWithoutCustomerNestedInput = { + create?: XOR | CustomerOtpCreateWithoutCustomerInput[] | CustomerOtpUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: CustomerOtpCreateOrConnectWithoutCustomerInput | CustomerOtpCreateOrConnectWithoutCustomerInput[] + upsert?: CustomerOtpUpsertWithWhereUniqueWithoutCustomerInput | CustomerOtpUpsertWithWhereUniqueWithoutCustomerInput[] + createMany?: CustomerOtpCreateManyCustomerInputEnvelope + set?: CustomerOtpWhereUniqueInput | CustomerOtpWhereUniqueInput[] + disconnect?: CustomerOtpWhereUniqueInput | CustomerOtpWhereUniqueInput[] + delete?: CustomerOtpWhereUniqueInput | CustomerOtpWhereUniqueInput[] + connect?: CustomerOtpWhereUniqueInput | CustomerOtpWhereUniqueInput[] + update?: CustomerOtpUpdateWithWhereUniqueWithoutCustomerInput | CustomerOtpUpdateWithWhereUniqueWithoutCustomerInput[] + updateMany?: CustomerOtpUpdateManyWithWhereWithoutCustomerInput | CustomerOtpUpdateManyWithWhereWithoutCustomerInput[] + deleteMany?: CustomerOtpScalarWhereInput | CustomerOtpScalarWhereInput[] + } + + export type CustomerFavoriteUncheckedUpdateManyWithoutCustomerNestedInput = { + create?: XOR | CustomerFavoriteCreateWithoutCustomerInput[] | CustomerFavoriteUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: CustomerFavoriteCreateOrConnectWithoutCustomerInput | CustomerFavoriteCreateOrConnectWithoutCustomerInput[] + upsert?: CustomerFavoriteUpsertWithWhereUniqueWithoutCustomerInput | CustomerFavoriteUpsertWithWhereUniqueWithoutCustomerInput[] + createMany?: CustomerFavoriteCreateManyCustomerInputEnvelope + set?: CustomerFavoriteWhereUniqueInput | CustomerFavoriteWhereUniqueInput[] + disconnect?: CustomerFavoriteWhereUniqueInput | CustomerFavoriteWhereUniqueInput[] + delete?: CustomerFavoriteWhereUniqueInput | CustomerFavoriteWhereUniqueInput[] + connect?: CustomerFavoriteWhereUniqueInput | CustomerFavoriteWhereUniqueInput[] + update?: CustomerFavoriteUpdateWithWhereUniqueWithoutCustomerInput | CustomerFavoriteUpdateWithWhereUniqueWithoutCustomerInput[] + updateMany?: CustomerFavoriteUpdateManyWithWhereWithoutCustomerInput | CustomerFavoriteUpdateManyWithWhereWithoutCustomerInput[] + deleteMany?: CustomerFavoriteScalarWhereInput | CustomerFavoriteScalarWhereInput[] + } + + export type CustomerCreateNestedOneWithoutFavoritesInput = { + create?: XOR + connectOrCreate?: CustomerCreateOrConnectWithoutFavoritesInput + connect?: CustomerWhereUniqueInput + } + + export type ProductCreateNestedOneWithoutFavoritedByInput = { + create?: XOR + connectOrCreate?: ProductCreateOrConnectWithoutFavoritedByInput + connect?: ProductWhereUniqueInput + } + + export type CustomerUpdateOneRequiredWithoutFavoritesNestedInput = { + create?: XOR + connectOrCreate?: CustomerCreateOrConnectWithoutFavoritesInput + upsert?: CustomerUpsertWithoutFavoritesInput + connect?: CustomerWhereUniqueInput + update?: XOR, CustomerUncheckedUpdateWithoutFavoritesInput> + } + + export type ProductUpdateOneRequiredWithoutFavoritedByNestedInput = { + create?: XOR + connectOrCreate?: ProductCreateOrConnectWithoutFavoritedByInput + upsert?: ProductUpsertWithoutFavoritedByInput + connect?: ProductWhereUniqueInput + update?: XOR, ProductUncheckedUpdateWithoutFavoritedByInput> + } + export type CustomerCreateNestedOneWithoutAddressesInput = { create?: XOR connectOrCreate?: CustomerCreateOrConnectWithoutAddressesInput @@ -51019,6 +63810,13 @@ export namespace Prisma { connect?: BranchAllocationItemWhereUniqueInput | BranchAllocationItemWhereUniqueInput[] } + export type CustomerFavoriteCreateNestedManyWithoutProductInput = { + create?: XOR | CustomerFavoriteCreateWithoutProductInput[] | CustomerFavoriteUncheckedCreateWithoutProductInput[] + connectOrCreate?: CustomerFavoriteCreateOrConnectWithoutProductInput | CustomerFavoriteCreateOrConnectWithoutProductInput[] + createMany?: CustomerFavoriteCreateManyProductInputEnvelope + connect?: CustomerFavoriteWhereUniqueInput | CustomerFavoriteWhereUniqueInput[] + } + export type ProductVariantUncheckedCreateNestedManyWithoutProductInput = { create?: XOR | ProductVariantCreateWithoutProductInput[] | ProductVariantUncheckedCreateWithoutProductInput[] connectOrCreate?: ProductVariantCreateOrConnectWithoutProductInput | ProductVariantCreateOrConnectWithoutProductInput[] @@ -51061,6 +63859,13 @@ export namespace Prisma { connect?: BranchAllocationItemWhereUniqueInput | BranchAllocationItemWhereUniqueInput[] } + export type CustomerFavoriteUncheckedCreateNestedManyWithoutProductInput = { + create?: XOR | CustomerFavoriteCreateWithoutProductInput[] | CustomerFavoriteUncheckedCreateWithoutProductInput[] + connectOrCreate?: CustomerFavoriteCreateOrConnectWithoutProductInput | CustomerFavoriteCreateOrConnectWithoutProductInput[] + createMany?: CustomerFavoriteCreateManyProductInputEnvelope + connect?: CustomerFavoriteWhereUniqueInput | CustomerFavoriteWhereUniqueInput[] + } + export type CategoryUpdateOneWithoutProductsNestedInput = { create?: XOR connectOrCreate?: CategoryCreateOrConnectWithoutProductsInput @@ -51165,6 +63970,20 @@ export namespace Prisma { deleteMany?: BranchAllocationItemScalarWhereInput | BranchAllocationItemScalarWhereInput[] } + export type CustomerFavoriteUpdateManyWithoutProductNestedInput = { + create?: XOR | CustomerFavoriteCreateWithoutProductInput[] | CustomerFavoriteUncheckedCreateWithoutProductInput[] + connectOrCreate?: CustomerFavoriteCreateOrConnectWithoutProductInput | CustomerFavoriteCreateOrConnectWithoutProductInput[] + upsert?: CustomerFavoriteUpsertWithWhereUniqueWithoutProductInput | CustomerFavoriteUpsertWithWhereUniqueWithoutProductInput[] + createMany?: CustomerFavoriteCreateManyProductInputEnvelope + set?: CustomerFavoriteWhereUniqueInput | CustomerFavoriteWhereUniqueInput[] + disconnect?: CustomerFavoriteWhereUniqueInput | CustomerFavoriteWhereUniqueInput[] + delete?: CustomerFavoriteWhereUniqueInput | CustomerFavoriteWhereUniqueInput[] + connect?: CustomerFavoriteWhereUniqueInput | CustomerFavoriteWhereUniqueInput[] + update?: CustomerFavoriteUpdateWithWhereUniqueWithoutProductInput | CustomerFavoriteUpdateWithWhereUniqueWithoutProductInput[] + updateMany?: CustomerFavoriteUpdateManyWithWhereWithoutProductInput | CustomerFavoriteUpdateManyWithWhereWithoutProductInput[] + deleteMany?: CustomerFavoriteScalarWhereInput | CustomerFavoriteScalarWhereInput[] + } + export type ProductVariantUncheckedUpdateManyWithoutProductNestedInput = { create?: XOR | ProductVariantCreateWithoutProductInput[] | ProductVariantUncheckedCreateWithoutProductInput[] connectOrCreate?: ProductVariantCreateOrConnectWithoutProductInput | ProductVariantCreateOrConnectWithoutProductInput[] @@ -51249,12 +64068,40 @@ export namespace Prisma { deleteMany?: BranchAllocationItemScalarWhereInput | BranchAllocationItemScalarWhereInput[] } + export type CustomerFavoriteUncheckedUpdateManyWithoutProductNestedInput = { + create?: XOR | CustomerFavoriteCreateWithoutProductInput[] | CustomerFavoriteUncheckedCreateWithoutProductInput[] + connectOrCreate?: CustomerFavoriteCreateOrConnectWithoutProductInput | CustomerFavoriteCreateOrConnectWithoutProductInput[] + upsert?: CustomerFavoriteUpsertWithWhereUniqueWithoutProductInput | CustomerFavoriteUpsertWithWhereUniqueWithoutProductInput[] + createMany?: CustomerFavoriteCreateManyProductInputEnvelope + set?: CustomerFavoriteWhereUniqueInput | CustomerFavoriteWhereUniqueInput[] + disconnect?: CustomerFavoriteWhereUniqueInput | CustomerFavoriteWhereUniqueInput[] + delete?: CustomerFavoriteWhereUniqueInput | CustomerFavoriteWhereUniqueInput[] + connect?: CustomerFavoriteWhereUniqueInput | CustomerFavoriteWhereUniqueInput[] + update?: CustomerFavoriteUpdateWithWhereUniqueWithoutProductInput | CustomerFavoriteUpdateWithWhereUniqueWithoutProductInput[] + updateMany?: CustomerFavoriteUpdateManyWithWhereWithoutProductInput | CustomerFavoriteUpdateManyWithWhereWithoutProductInput[] + deleteMany?: CustomerFavoriteScalarWhereInput | CustomerFavoriteScalarWhereInput[] + } + export type ProductCreateNestedOneWithoutImagesInput = { create?: XOR connectOrCreate?: ProductCreateOrConnectWithoutImagesInput connect?: ProductWhereUniqueInput } + export type ProductVariantCreateNestedManyWithoutImageInput = { + create?: XOR | ProductVariantCreateWithoutImageInput[] | ProductVariantUncheckedCreateWithoutImageInput[] + connectOrCreate?: ProductVariantCreateOrConnectWithoutImageInput | ProductVariantCreateOrConnectWithoutImageInput[] + createMany?: ProductVariantCreateManyImageInputEnvelope + connect?: ProductVariantWhereUniqueInput | ProductVariantWhereUniqueInput[] + } + + export type ProductVariantUncheckedCreateNestedManyWithoutImageInput = { + create?: XOR | ProductVariantCreateWithoutImageInput[] | ProductVariantUncheckedCreateWithoutImageInput[] + connectOrCreate?: ProductVariantCreateOrConnectWithoutImageInput | ProductVariantCreateOrConnectWithoutImageInput[] + createMany?: ProductVariantCreateManyImageInputEnvelope + connect?: ProductVariantWhereUniqueInput | ProductVariantWhereUniqueInput[] + } + export type EnumProductImageRoleFieldUpdateOperationsInput = { set?: $Enums.ProductImageRole } @@ -51267,12 +64114,46 @@ export namespace Prisma { update?: XOR, ProductUncheckedUpdateWithoutImagesInput> } + export type ProductVariantUpdateManyWithoutImageNestedInput = { + create?: XOR | ProductVariantCreateWithoutImageInput[] | ProductVariantUncheckedCreateWithoutImageInput[] + connectOrCreate?: ProductVariantCreateOrConnectWithoutImageInput | ProductVariantCreateOrConnectWithoutImageInput[] + upsert?: ProductVariantUpsertWithWhereUniqueWithoutImageInput | ProductVariantUpsertWithWhereUniqueWithoutImageInput[] + createMany?: ProductVariantCreateManyImageInputEnvelope + set?: ProductVariantWhereUniqueInput | ProductVariantWhereUniqueInput[] + disconnect?: ProductVariantWhereUniqueInput | ProductVariantWhereUniqueInput[] + delete?: ProductVariantWhereUniqueInput | ProductVariantWhereUniqueInput[] + connect?: ProductVariantWhereUniqueInput | ProductVariantWhereUniqueInput[] + update?: ProductVariantUpdateWithWhereUniqueWithoutImageInput | ProductVariantUpdateWithWhereUniqueWithoutImageInput[] + updateMany?: ProductVariantUpdateManyWithWhereWithoutImageInput | ProductVariantUpdateManyWithWhereWithoutImageInput[] + deleteMany?: ProductVariantScalarWhereInput | ProductVariantScalarWhereInput[] + } + + export type ProductVariantUncheckedUpdateManyWithoutImageNestedInput = { + create?: XOR | ProductVariantCreateWithoutImageInput[] | ProductVariantUncheckedCreateWithoutImageInput[] + connectOrCreate?: ProductVariantCreateOrConnectWithoutImageInput | ProductVariantCreateOrConnectWithoutImageInput[] + upsert?: ProductVariantUpsertWithWhereUniqueWithoutImageInput | ProductVariantUpsertWithWhereUniqueWithoutImageInput[] + createMany?: ProductVariantCreateManyImageInputEnvelope + set?: ProductVariantWhereUniqueInput | ProductVariantWhereUniqueInput[] + disconnect?: ProductVariantWhereUniqueInput | ProductVariantWhereUniqueInput[] + delete?: ProductVariantWhereUniqueInput | ProductVariantWhereUniqueInput[] + connect?: ProductVariantWhereUniqueInput | ProductVariantWhereUniqueInput[] + update?: ProductVariantUpdateWithWhereUniqueWithoutImageInput | ProductVariantUpdateWithWhereUniqueWithoutImageInput[] + updateMany?: ProductVariantUpdateManyWithWhereWithoutImageInput | ProductVariantUpdateManyWithWhereWithoutImageInput[] + deleteMany?: ProductVariantScalarWhereInput | ProductVariantScalarWhereInput[] + } + export type ProductCreateNestedOneWithoutVariantsInput = { create?: XOR connectOrCreate?: ProductCreateOrConnectWithoutVariantsInput connect?: ProductWhereUniqueInput } + export type ProductImageCreateNestedOneWithoutVariantsInput = { + create?: XOR + connectOrCreate?: ProductImageCreateOrConnectWithoutVariantsInput + connect?: ProductImageWhereUniqueInput + } + export type OrderItemCreateNestedManyWithoutProductVariantInput = { create?: XOR | OrderItemCreateWithoutProductVariantInput[] | OrderItemUncheckedCreateWithoutProductVariantInput[] connectOrCreate?: OrderItemCreateOrConnectWithoutProductVariantInput | OrderItemCreateOrConnectWithoutProductVariantInput[] @@ -51295,6 +64176,16 @@ export namespace Prisma { update?: XOR, ProductUncheckedUpdateWithoutVariantsInput> } + export type ProductImageUpdateOneWithoutVariantsNestedInput = { + create?: XOR + connectOrCreate?: ProductImageCreateOrConnectWithoutVariantsInput + upsert?: ProductImageUpsertWithoutVariantsInput + disconnect?: ProductImageWhereInput | boolean + delete?: ProductImageWhereInput | boolean + connect?: ProductImageWhereUniqueInput + update?: XOR, ProductImageUncheckedUpdateWithoutVariantsInput> + } + export type OrderItemUpdateManyWithoutProductVariantNestedInput = { create?: XOR | OrderItemCreateWithoutProductVariantInput[] | OrderItemUncheckedCreateWithoutProductVariantInput[] connectOrCreate?: OrderItemCreateOrConnectWithoutProductVariantInput | OrderItemCreateOrConnectWithoutProductVariantInput[] @@ -51335,6 +64226,18 @@ export namespace Prisma { connect?: BranchWhereUniqueInput } + export type AdminUserCreateNestedOneWithoutCreditedOrdersInput = { + create?: XOR + connectOrCreate?: AdminUserCreateOrConnectWithoutCreditedOrdersInput + connect?: AdminUserWhereUniqueInput + } + + export type CustomerCreateNestedOneWithoutReferredOrdersInput = { + create?: XOR + connectOrCreate?: CustomerCreateOrConnectWithoutReferredOrdersInput + connect?: CustomerWhereUniqueInput + } + export type OrderItemCreateNestedManyWithoutOrderInput = { create?: XOR | OrderItemCreateWithoutOrderInput[] | OrderItemUncheckedCreateWithoutOrderInput[] connectOrCreate?: OrderItemCreateOrConnectWithoutOrderInput | OrderItemCreateOrConnectWithoutOrderInput[] @@ -51397,10 +64300,6 @@ export namespace Prisma { set?: $Enums.OrderStatus } - export type NullableDateTimeFieldUpdateOperationsInput = { - set?: Date | string | null - } - export type CustomerUpdateOneRequiredWithoutOrdersNestedInput = { create?: XOR connectOrCreate?: CustomerCreateOrConnectWithoutOrdersInput @@ -51419,6 +64318,26 @@ export namespace Prisma { update?: XOR, BranchUncheckedUpdateWithoutOrdersInput> } + export type AdminUserUpdateOneWithoutCreditedOrdersNestedInput = { + create?: XOR + connectOrCreate?: AdminUserCreateOrConnectWithoutCreditedOrdersInput + upsert?: AdminUserUpsertWithoutCreditedOrdersInput + disconnect?: AdminUserWhereInput | boolean + delete?: AdminUserWhereInput | boolean + connect?: AdminUserWhereUniqueInput + update?: XOR, AdminUserUncheckedUpdateWithoutCreditedOrdersInput> + } + + export type CustomerUpdateOneWithoutReferredOrdersNestedInput = { + create?: XOR + connectOrCreate?: CustomerCreateOrConnectWithoutReferredOrdersInput + upsert?: CustomerUpsertWithoutReferredOrdersInput + disconnect?: CustomerWhereInput | boolean + delete?: CustomerWhereInput | boolean + connect?: CustomerWhereUniqueInput + update?: XOR, CustomerUncheckedUpdateWithoutReferredOrdersInput> + } + export type OrderItemUpdateManyWithoutOrderNestedInput = { create?: XOR | OrderItemCreateWithoutOrderInput[] | OrderItemUncheckedCreateWithoutOrderInput[] connectOrCreate?: OrderItemCreateOrConnectWithoutOrderInput | OrderItemCreateOrConnectWithoutOrderInput[] @@ -51983,6 +64902,18 @@ export namespace Prisma { deleteMany?: CommentScalarWhereInput | CommentScalarWhereInput[] } + export type EnumAccountingEntityTypeFieldUpdateOperationsInput = { + set?: $Enums.AccountingEntityType + } + + export type EnumAccountingOutboxKindFieldUpdateOperationsInput = { + set?: $Enums.AccountingOutboxKind + } + + export type EnumAccountingOutboxStatusFieldUpdateOperationsInput = { + set?: $Enums.AccountingOutboxStatus + } + export type ProductCreateNestedOneWithoutPromotionsInput = { create?: XOR connectOrCreate?: ProductCreateOrConnectWithoutPromotionsInput @@ -52288,6 +65219,13 @@ export namespace Prisma { connect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[] } + export type AdminUserCreateNestedManyWithoutAvatarFileInput = { + create?: XOR | AdminUserCreateWithoutAvatarFileInput[] | AdminUserUncheckedCreateWithoutAvatarFileInput[] + connectOrCreate?: AdminUserCreateOrConnectWithoutAvatarFileInput | AdminUserCreateOrConnectWithoutAvatarFileInput[] + createMany?: AdminUserCreateManyAvatarFileInputEnvelope + connect?: AdminUserWhereUniqueInput | AdminUserWhereUniqueInput[] + } + export type CustomerUncheckedCreateNestedManyWithoutAvatarFileInput = { create?: XOR | CustomerCreateWithoutAvatarFileInput[] | CustomerUncheckedCreateWithoutAvatarFileInput[] connectOrCreate?: CustomerCreateOrConnectWithoutAvatarFileInput | CustomerCreateOrConnectWithoutAvatarFileInput[] @@ -52295,6 +65233,13 @@ export namespace Prisma { connect?: CustomerWhereUniqueInput | CustomerWhereUniqueInput[] } + export type AdminUserUncheckedCreateNestedManyWithoutAvatarFileInput = { + create?: XOR | AdminUserCreateWithoutAvatarFileInput[] | AdminUserUncheckedCreateWithoutAvatarFileInput[] + connectOrCreate?: AdminUserCreateOrConnectWithoutAvatarFileInput | AdminUserCreateOrConnectWithoutAvatarFileInput[] + createMany?: AdminUserCreateManyAvatarFileInputEnvelope + connect?: AdminUserWhereUniqueInput | AdminUserWhereUniqueInput[] + } + export type AdminUserUpdateOneWithoutUploadedFilesNestedInput = { create?: XOR connectOrCreate?: AdminUserCreateOrConnectWithoutUploadedFilesInput @@ -52319,6 +65264,20 @@ export namespace Prisma { deleteMany?: CustomerScalarWhereInput | CustomerScalarWhereInput[] } + export type AdminUserUpdateManyWithoutAvatarFileNestedInput = { + create?: XOR | AdminUserCreateWithoutAvatarFileInput[] | AdminUserUncheckedCreateWithoutAvatarFileInput[] + connectOrCreate?: AdminUserCreateOrConnectWithoutAvatarFileInput | AdminUserCreateOrConnectWithoutAvatarFileInput[] + upsert?: AdminUserUpsertWithWhereUniqueWithoutAvatarFileInput | AdminUserUpsertWithWhereUniqueWithoutAvatarFileInput[] + createMany?: AdminUserCreateManyAvatarFileInputEnvelope + set?: AdminUserWhereUniqueInput | AdminUserWhereUniqueInput[] + disconnect?: AdminUserWhereUniqueInput | AdminUserWhereUniqueInput[] + delete?: AdminUserWhereUniqueInput | AdminUserWhereUniqueInput[] + connect?: AdminUserWhereUniqueInput | AdminUserWhereUniqueInput[] + update?: AdminUserUpdateWithWhereUniqueWithoutAvatarFileInput | AdminUserUpdateWithWhereUniqueWithoutAvatarFileInput[] + updateMany?: AdminUserUpdateManyWithWhereWithoutAvatarFileInput | AdminUserUpdateManyWithWhereWithoutAvatarFileInput[] + deleteMany?: AdminUserScalarWhereInput | AdminUserScalarWhereInput[] + } + export type CustomerUncheckedUpdateManyWithoutAvatarFileNestedInput = { create?: XOR | CustomerCreateWithoutAvatarFileInput[] | CustomerUncheckedCreateWithoutAvatarFileInput[] connectOrCreate?: CustomerCreateOrConnectWithoutAvatarFileInput | CustomerCreateOrConnectWithoutAvatarFileInput[] @@ -52333,6 +65292,34 @@ export namespace Prisma { deleteMany?: CustomerScalarWhereInput | CustomerScalarWhereInput[] } + export type AdminUserUncheckedUpdateManyWithoutAvatarFileNestedInput = { + create?: XOR | AdminUserCreateWithoutAvatarFileInput[] | AdminUserUncheckedCreateWithoutAvatarFileInput[] + connectOrCreate?: AdminUserCreateOrConnectWithoutAvatarFileInput | AdminUserCreateOrConnectWithoutAvatarFileInput[] + upsert?: AdminUserUpsertWithWhereUniqueWithoutAvatarFileInput | AdminUserUpsertWithWhereUniqueWithoutAvatarFileInput[] + createMany?: AdminUserCreateManyAvatarFileInputEnvelope + set?: AdminUserWhereUniqueInput | AdminUserWhereUniqueInput[] + disconnect?: AdminUserWhereUniqueInput | AdminUserWhereUniqueInput[] + delete?: AdminUserWhereUniqueInput | AdminUserWhereUniqueInput[] + connect?: AdminUserWhereUniqueInput | AdminUserWhereUniqueInput[] + update?: AdminUserUpdateWithWhereUniqueWithoutAvatarFileInput | AdminUserUpdateWithWhereUniqueWithoutAvatarFileInput[] + updateMany?: AdminUserUpdateManyWithWhereWithoutAvatarFileInput | AdminUserUpdateManyWithWhereWithoutAvatarFileInput[] + deleteMany?: AdminUserScalarWhereInput | AdminUserScalarWhereInput[] + } + + export type CustomerCreateNestedOneWithoutOtpChallengesInput = { + create?: XOR + connectOrCreate?: CustomerCreateOrConnectWithoutOtpChallengesInput + connect?: CustomerWhereUniqueInput + } + + export type CustomerUpdateOneRequiredWithoutOtpChallengesNestedInput = { + create?: XOR + connectOrCreate?: CustomerCreateOrConnectWithoutOtpChallengesInput + upsert?: CustomerUpsertWithoutOtpChallengesInput + connect?: CustomerWhereUniqueInput + update?: XOR, CustomerUncheckedUpdateWithoutOtpChallengesInput> + } + export type NestedStringFilter<$PrismaModel = never> = { equals?: string | StringFieldRefInput<$PrismaModel> in?: string[] | ListStringFieldRefInput<$PrismaModel> @@ -52526,11 +65513,29 @@ export namespace Prisma { _max?: NestedDateTimeFilter<$PrismaModel> } - export type NestedEnumCustomerKindFilter<$PrismaModel = never> = { - equals?: $Enums.CustomerKind | EnumCustomerKindFieldRefInput<$PrismaModel> - in?: $Enums.CustomerKind[] | ListEnumCustomerKindFieldRefInput<$PrismaModel> - notIn?: $Enums.CustomerKind[] | ListEnumCustomerKindFieldRefInput<$PrismaModel> - not?: NestedEnumCustomerKindFilter<$PrismaModel> | $Enums.CustomerKind + export type NestedDateTimeNullableFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null + } + + export type NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null + in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null + lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> + gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> + not?: NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null + _count?: NestedIntNullableFilter<$PrismaModel> + _min?: NestedDateTimeNullableFilter<$PrismaModel> + _max?: NestedDateTimeNullableFilter<$PrismaModel> } export type NestedDecimalFilter<$PrismaModel = never> = { @@ -52544,6 +65549,29 @@ export namespace Prisma { not?: NestedDecimalFilter<$PrismaModel> | Decimal | DecimalJsLike | number | string } + export type NestedDecimalWithAggregatesFilter<$PrismaModel = never> = { + equals?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + in?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel> + notIn?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel> + lt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + lte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + gt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + gte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> + not?: NestedDecimalWithAggregatesFilter<$PrismaModel> | Decimal | DecimalJsLike | number | string + _count?: NestedIntFilter<$PrismaModel> + _avg?: NestedDecimalFilter<$PrismaModel> + _sum?: NestedDecimalFilter<$PrismaModel> + _min?: NestedDecimalFilter<$PrismaModel> + _max?: NestedDecimalFilter<$PrismaModel> + } + + export type NestedEnumCustomerKindFilter<$PrismaModel = never> = { + equals?: $Enums.CustomerKind | EnumCustomerKindFieldRefInput<$PrismaModel> + in?: $Enums.CustomerKind[] | ListEnumCustomerKindFieldRefInput<$PrismaModel> + notIn?: $Enums.CustomerKind[] | ListEnumCustomerKindFieldRefInput<$PrismaModel> + not?: NestedEnumCustomerKindFilter<$PrismaModel> | $Enums.CustomerKind + } + export type NestedEnumVerificationStepFilter<$PrismaModel = never> = { equals?: $Enums.VerificationStep | EnumVerificationStepFieldRefInput<$PrismaModel> in?: $Enums.VerificationStep[] | ListEnumVerificationStepFieldRefInput<$PrismaModel> @@ -52561,22 +65589,6 @@ export namespace Prisma { _max?: NestedEnumCustomerKindFilter<$PrismaModel> } - export type NestedDecimalWithAggregatesFilter<$PrismaModel = never> = { - equals?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> - in?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel> - notIn?: Decimal[] | DecimalJsLike[] | number[] | string[] | ListDecimalFieldRefInput<$PrismaModel> - lt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> - lte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> - gt?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> - gte?: Decimal | DecimalJsLike | number | string | DecimalFieldRefInput<$PrismaModel> - not?: NestedDecimalWithAggregatesFilter<$PrismaModel> | Decimal | DecimalJsLike | number | string - _count?: NestedIntFilter<$PrismaModel> - _avg?: NestedDecimalFilter<$PrismaModel> - _sum?: NestedDecimalFilter<$PrismaModel> - _min?: NestedDecimalFilter<$PrismaModel> - _max?: NestedDecimalFilter<$PrismaModel> - } - export type NestedEnumVerificationStepWithAggregatesFilter<$PrismaModel = never> = { equals?: $Enums.VerificationStep | EnumVerificationStepFieldRefInput<$PrismaModel> in?: $Enums.VerificationStep[] | ListEnumVerificationStepFieldRefInput<$PrismaModel> @@ -52645,17 +65657,6 @@ export namespace Prisma { not?: NestedEnumOrderStatusFilter<$PrismaModel> | $Enums.OrderStatus } - export type NestedDateTimeNullableFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null - in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null - notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - not?: NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null - } - export type NestedEnumOrderChannelWithAggregatesFilter<$PrismaModel = never> = { equals?: $Enums.OrderChannel | EnumOrderChannelFieldRefInput<$PrismaModel> in?: $Enums.OrderChannel[] | ListEnumOrderChannelFieldRefInput<$PrismaModel> @@ -52676,20 +65677,6 @@ export namespace Prisma { _max?: NestedEnumOrderStatusFilter<$PrismaModel> } - export type NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: Date | string | DateTimeFieldRefInput<$PrismaModel> | null - in?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null - notIn?: Date[] | string[] | ListDateTimeFieldRefInput<$PrismaModel> | null - lt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - lte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gt?: Date | string | DateTimeFieldRefInput<$PrismaModel> - gte?: Date | string | DateTimeFieldRefInput<$PrismaModel> - not?: NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null - _count?: NestedIntNullableFilter<$PrismaModel> - _min?: NestedDateTimeNullableFilter<$PrismaModel> - _max?: NestedDateTimeNullableFilter<$PrismaModel> - } - export type NestedEnumOrderStatusNullableFilter<$PrismaModel = never> = { equals?: $Enums.OrderStatus | EnumOrderStatusFieldRefInput<$PrismaModel> | null in?: $Enums.OrderStatus[] | ListEnumOrderStatusFieldRefInput<$PrismaModel> | null @@ -52814,6 +65801,79 @@ export namespace Prisma { _max?: NestedEnumCommentStatusFilter<$PrismaModel> } + export type NestedEnumAccountingEntityTypeFilter<$PrismaModel = never> = { + equals?: $Enums.AccountingEntityType | EnumAccountingEntityTypeFieldRefInput<$PrismaModel> + in?: $Enums.AccountingEntityType[] | ListEnumAccountingEntityTypeFieldRefInput<$PrismaModel> + notIn?: $Enums.AccountingEntityType[] | ListEnumAccountingEntityTypeFieldRefInput<$PrismaModel> + not?: NestedEnumAccountingEntityTypeFilter<$PrismaModel> | $Enums.AccountingEntityType + } + + export type NestedEnumAccountingEntityTypeWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.AccountingEntityType | EnumAccountingEntityTypeFieldRefInput<$PrismaModel> + in?: $Enums.AccountingEntityType[] | ListEnumAccountingEntityTypeFieldRefInput<$PrismaModel> + notIn?: $Enums.AccountingEntityType[] | ListEnumAccountingEntityTypeFieldRefInput<$PrismaModel> + not?: NestedEnumAccountingEntityTypeWithAggregatesFilter<$PrismaModel> | $Enums.AccountingEntityType + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumAccountingEntityTypeFilter<$PrismaModel> + _max?: NestedEnumAccountingEntityTypeFilter<$PrismaModel> + } + export type NestedJsonNullableFilter<$PrismaModel = never> = + | PatchUndefined< + Either>, Exclude>, 'path'>>, + Required> + > + | OptionalFlat>, 'path'>> + + export type NestedJsonNullableFilterBase<$PrismaModel = never> = { + equals?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter + path?: string[] + string_contains?: string | StringFieldRefInput<$PrismaModel> + string_starts_with?: string | StringFieldRefInput<$PrismaModel> + string_ends_with?: string | StringFieldRefInput<$PrismaModel> + array_contains?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null + array_starts_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null + array_ends_with?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | null + lt?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + lte?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + gt?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + gte?: InputJsonValue | JsonFieldRefInput<$PrismaModel> + not?: InputJsonValue | JsonFieldRefInput<$PrismaModel> | JsonNullValueFilter + } + + export type NestedEnumAccountingOutboxKindFilter<$PrismaModel = never> = { + equals?: $Enums.AccountingOutboxKind | EnumAccountingOutboxKindFieldRefInput<$PrismaModel> + in?: $Enums.AccountingOutboxKind[] | ListEnumAccountingOutboxKindFieldRefInput<$PrismaModel> + notIn?: $Enums.AccountingOutboxKind[] | ListEnumAccountingOutboxKindFieldRefInput<$PrismaModel> + not?: NestedEnumAccountingOutboxKindFilter<$PrismaModel> | $Enums.AccountingOutboxKind + } + + export type NestedEnumAccountingOutboxStatusFilter<$PrismaModel = never> = { + equals?: $Enums.AccountingOutboxStatus | EnumAccountingOutboxStatusFieldRefInput<$PrismaModel> + in?: $Enums.AccountingOutboxStatus[] | ListEnumAccountingOutboxStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.AccountingOutboxStatus[] | ListEnumAccountingOutboxStatusFieldRefInput<$PrismaModel> + not?: NestedEnumAccountingOutboxStatusFilter<$PrismaModel> | $Enums.AccountingOutboxStatus + } + + export type NestedEnumAccountingOutboxKindWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.AccountingOutboxKind | EnumAccountingOutboxKindFieldRefInput<$PrismaModel> + in?: $Enums.AccountingOutboxKind[] | ListEnumAccountingOutboxKindFieldRefInput<$PrismaModel> + notIn?: $Enums.AccountingOutboxKind[] | ListEnumAccountingOutboxKindFieldRefInput<$PrismaModel> + not?: NestedEnumAccountingOutboxKindWithAggregatesFilter<$PrismaModel> | $Enums.AccountingOutboxKind + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumAccountingOutboxKindFilter<$PrismaModel> + _max?: NestedEnumAccountingOutboxKindFilter<$PrismaModel> + } + + export type NestedEnumAccountingOutboxStatusWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.AccountingOutboxStatus | EnumAccountingOutboxStatusFieldRefInput<$PrismaModel> + in?: $Enums.AccountingOutboxStatus[] | ListEnumAccountingOutboxStatusFieldRefInput<$PrismaModel> + notIn?: $Enums.AccountingOutboxStatus[] | ListEnumAccountingOutboxStatusFieldRefInput<$PrismaModel> + not?: NestedEnumAccountingOutboxStatusWithAggregatesFilter<$PrismaModel> | $Enums.AccountingOutboxStatus + _count?: NestedIntFilter<$PrismaModel> + _min?: NestedEnumAccountingOutboxStatusFilter<$PrismaModel> + _max?: NestedEnumAccountingOutboxStatusFilter<$PrismaModel> + } + export type NestedEnumPromotionScopeFilter<$PrismaModel = never> = { equals?: $Enums.PromotionScope | EnumPromotionScopeFieldRefInput<$PrismaModel> in?: $Enums.PromotionScope[] | ListEnumPromotionScopeFieldRefInput<$PrismaModel> @@ -52865,12 +65925,82 @@ export namespace Prisma { _max?: NestedEnumMessageAudienceFilter<$PrismaModel> } + export type CityCreateWithoutChildrenInput = { + id?: string + name: string + percent?: Decimal | DecimalJsLike | number | string | null + percentAux?: Decimal | DecimalJsLike | number | string | null + parent?: CityCreateNestedOneWithoutChildrenInput + customers?: CustomerCreateNestedManyWithoutCityInput + addresses?: CustomerAddressCreateNestedManyWithoutCityInput + branches?: BranchCreateNestedManyWithoutCityInput + preOrders?: PreOrderCreateNestedManyWithoutCityInput + salesExpertProfiles?: SalesExpertProfileCreateNestedManyWithoutCityInput + } + + export type CityUncheckedCreateWithoutChildrenInput = { + id?: string + name: string + parentId?: string | null + percent?: Decimal | DecimalJsLike | number | string | null + percentAux?: Decimal | DecimalJsLike | number | string | null + customers?: CustomerUncheckedCreateNestedManyWithoutCityInput + addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCityInput + branches?: BranchUncheckedCreateNestedManyWithoutCityInput + preOrders?: PreOrderUncheckedCreateNestedManyWithoutCityInput + salesExpertProfiles?: SalesExpertProfileUncheckedCreateNestedManyWithoutCityInput + } + + export type CityCreateOrConnectWithoutChildrenInput = { + where: CityWhereUniqueInput + create: XOR + } + + export type CityCreateWithoutParentInput = { + id?: string + name: string + percent?: Decimal | DecimalJsLike | number | string | null + percentAux?: Decimal | DecimalJsLike | number | string | null + children?: CityCreateNestedManyWithoutParentInput + customers?: CustomerCreateNestedManyWithoutCityInput + addresses?: CustomerAddressCreateNestedManyWithoutCityInput + branches?: BranchCreateNestedManyWithoutCityInput + preOrders?: PreOrderCreateNestedManyWithoutCityInput + salesExpertProfiles?: SalesExpertProfileCreateNestedManyWithoutCityInput + } + + export type CityUncheckedCreateWithoutParentInput = { + id?: string + name: string + percent?: Decimal | DecimalJsLike | number | string | null + percentAux?: Decimal | DecimalJsLike | number | string | null + children?: CityUncheckedCreateNestedManyWithoutParentInput + customers?: CustomerUncheckedCreateNestedManyWithoutCityInput + addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCityInput + branches?: BranchUncheckedCreateNestedManyWithoutCityInput + preOrders?: PreOrderUncheckedCreateNestedManyWithoutCityInput + salesExpertProfiles?: SalesExpertProfileUncheckedCreateNestedManyWithoutCityInput + } + + export type CityCreateOrConnectWithoutParentInput = { + where: CityWhereUniqueInput + create: XOR + } + + export type CityCreateManyParentInputEnvelope = { + data: CityCreateManyParentInput | CityCreateManyParentInput[] + skipDuplicates?: boolean + } + export type CustomerCreateWithoutCityInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string - nationalCode: string + nationalCode?: string | null passwordHash: string + cityNameRaw?: string | null kind?: $Enums.CustomerKind phone?: string | null address?: string | null @@ -52881,16 +66011,25 @@ export namespace Prisma { goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string goldDebtGrams?: Decimal | DecimalJsLike | number | string fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string verificationStep?: $Enums.VerificationStep nationalIdImageUrl?: string | null businessLicenseUrl?: string | null shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null canPlaceOrders?: boolean isActive?: boolean isArchived?: boolean createdAt?: Date | string updatedAt?: Date | string referredByAgent?: AdminUserCreateNestedOneWithoutReferredCustomersInput + salesExpertTradingFor?: SalesExpertProfileCreateNestedOneWithoutTradingCustomerInput + referredOrders?: OrderCreateNestedManyWithoutReferrerCustomerInput avatarFile?: UploadedFileCreateNestedOneWithoutCustomerAvatarsInput addresses?: CustomerAddressCreateNestedManyWithoutCustomerInput orders?: OrderCreateNestedManyWithoutCustomerInput @@ -52901,14 +66040,19 @@ export namespace Prisma { promotions?: PromotionCreateNestedManyWithoutCustomerInput notifications?: NotificationRecipientCreateNestedManyWithoutCustomerInput activityLogs?: CustomerActivityLogCreateNestedManyWithoutCustomerInput + otpChallenges?: CustomerOtpCreateNestedManyWithoutCustomerInput + favorites?: CustomerFavoriteCreateNestedManyWithoutCustomerInput } export type CustomerUncheckedCreateWithoutCityInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string - nationalCode: string + nationalCode?: string | null passwordHash: string + cityNameRaw?: string | null kind?: $Enums.CustomerKind phone?: string | null address?: string | null @@ -52920,16 +66064,25 @@ export namespace Prisma { goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string goldDebtGrams?: Decimal | DecimalJsLike | number | string fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string verificationStep?: $Enums.VerificationStep nationalIdImageUrl?: string | null businessLicenseUrl?: string | null shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null avatarFileId?: string | null canPlaceOrders?: boolean isActive?: boolean isArchived?: boolean createdAt?: Date | string updatedAt?: Date | string + salesExpertTradingFor?: SalesExpertProfileUncheckedCreateNestedOneWithoutTradingCustomerInput + referredOrders?: OrderUncheckedCreateNestedManyWithoutReferrerCustomerInput addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCustomerInput orders?: OrderUncheckedCreateNestedManyWithoutCustomerInput preOrders?: PreOrderUncheckedCreateNestedManyWithoutCustomerInput @@ -52939,6 +66092,8 @@ export namespace Prisma { promotions?: PromotionUncheckedCreateNestedManyWithoutCustomerInput notifications?: NotificationRecipientUncheckedCreateNestedManyWithoutCustomerInput activityLogs?: CustomerActivityLogUncheckedCreateNestedManyWithoutCustomerInput + otpChallenges?: CustomerOtpUncheckedCreateNestedManyWithoutCustomerInput + favorites?: CustomerFavoriteUncheckedCreateNestedManyWithoutCustomerInput } export type CustomerCreateOrConnectWithoutCityInput = { @@ -53055,6 +66210,102 @@ export namespace Prisma { skipDuplicates?: boolean } + export type SalesExpertProfileCreateWithoutCityInput = { + id?: string + gramLevel?: Decimal | DecimalJsLike | number | string + phone?: string | null + nationalCode?: string | null + createdAt?: Date | string + updatedAt?: Date | string + adminUser: AdminUserCreateNestedOneWithoutSalesExpertProfileInput + tradingCustomer?: CustomerCreateNestedOneWithoutSalesExpertTradingForInput + } + + export type SalesExpertProfileUncheckedCreateWithoutCityInput = { + id?: string + adminUserId: string + gramLevel?: Decimal | DecimalJsLike | number | string + phone?: string | null + nationalCode?: string | null + tradingCustomerId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + } + + export type SalesExpertProfileCreateOrConnectWithoutCityInput = { + where: SalesExpertProfileWhereUniqueInput + create: XOR + } + + export type SalesExpertProfileCreateManyCityInputEnvelope = { + data: SalesExpertProfileCreateManyCityInput | SalesExpertProfileCreateManyCityInput[] + skipDuplicates?: boolean + } + + export type CityUpsertWithoutChildrenInput = { + update: XOR + create: XOR + where?: CityWhereInput + } + + export type CityUpdateToOneWithWhereWithoutChildrenInput = { + where?: CityWhereInput + data: XOR + } + + export type CityUpdateWithoutChildrenInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + percent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + percentAux?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + parent?: CityUpdateOneWithoutChildrenNestedInput + customers?: CustomerUpdateManyWithoutCityNestedInput + addresses?: CustomerAddressUpdateManyWithoutCityNestedInput + branches?: BranchUpdateManyWithoutCityNestedInput + preOrders?: PreOrderUpdateManyWithoutCityNestedInput + salesExpertProfiles?: SalesExpertProfileUpdateManyWithoutCityNestedInput + } + + export type CityUncheckedUpdateWithoutChildrenInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + parentId?: NullableStringFieldUpdateOperationsInput | string | null + percent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + percentAux?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + customers?: CustomerUncheckedUpdateManyWithoutCityNestedInput + addresses?: CustomerAddressUncheckedUpdateManyWithoutCityNestedInput + branches?: BranchUncheckedUpdateManyWithoutCityNestedInput + preOrders?: PreOrderUncheckedUpdateManyWithoutCityNestedInput + salesExpertProfiles?: SalesExpertProfileUncheckedUpdateManyWithoutCityNestedInput + } + + export type CityUpsertWithWhereUniqueWithoutParentInput = { + where: CityWhereUniqueInput + update: XOR + create: XOR + } + + export type CityUpdateWithWhereUniqueWithoutParentInput = { + where: CityWhereUniqueInput + data: XOR + } + + export type CityUpdateManyWithWhereWithoutParentInput = { + where: CityScalarWhereInput + data: XOR + } + + export type CityScalarWhereInput = { + AND?: CityScalarWhereInput | CityScalarWhereInput[] + OR?: CityScalarWhereInput[] + NOT?: CityScalarWhereInput | CityScalarWhereInput[] + id?: StringFilter<"City"> | string + name?: StringFilter<"City"> | string + parentId?: StringNullableFilter<"City"> | string | null + percent?: DecimalNullableFilter<"City"> | Decimal | DecimalJsLike | number | string | null + percentAux?: DecimalNullableFilter<"City"> | Decimal | DecimalJsLike | number | string | null + } + export type CustomerUpsertWithWhereUniqueWithoutCityInput = { where: CustomerWhereUniqueInput update: XOR @@ -53077,10 +66328,13 @@ export namespace Prisma { NOT?: CustomerScalarWhereInput | CustomerScalarWhereInput[] id?: StringFilter<"Customer"> | string fullName?: StringFilter<"Customer"> | string + firstName?: StringNullableFilter<"Customer"> | string | null + lastName?: StringNullableFilter<"Customer"> | string | null mobile?: StringFilter<"Customer"> | string - nationalCode?: StringFilter<"Customer"> | string + nationalCode?: StringNullableFilter<"Customer"> | string | null passwordHash?: StringFilter<"Customer"> | string cityId?: StringNullableFilter<"Customer"> | string | null + cityNameRaw?: StringNullableFilter<"Customer"> | string | null kind?: EnumCustomerKindFilter<"Customer"> | $Enums.CustomerKind phone?: StringNullableFilter<"Customer"> | string | null address?: StringNullableFilter<"Customer"> | string | null @@ -53092,10 +66346,17 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFilter<"Customer"> | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFilter<"Customer"> | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFilter<"Customer"> | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: DecimalNullableFilter<"Customer"> | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: DecimalNullableFilter<"Customer"> | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: DateTimeNullableFilter<"Customer"> | Date | string | null + makingChargeOffsetPercent?: DecimalFilter<"Customer"> | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFilter<"Customer"> | $Enums.VerificationStep nationalIdImageUrl?: StringNullableFilter<"Customer"> | string | null businessLicenseUrl?: StringNullableFilter<"Customer"> | string | null shopImageUrl?: StringNullableFilter<"Customer"> | string | null + verificationRejectionReason?: StringNullableFilter<"Customer"> | string | null + verificationRejectedAt?: DateTimeNullableFilter<"Customer"> | Date | string | null + birthDate?: DateTimeNullableFilter<"Customer"> | Date | string | null avatarFileId?: StringNullableFilter<"Customer"> | string | null canPlaceOrders?: BoolFilter<"Customer"> | boolean isActive?: BoolFilter<"Customer"> | boolean @@ -53197,6 +66458,37 @@ export namespace Prisma { updatedAt?: DateTimeFilter<"PreOrder"> | Date | string } + export type SalesExpertProfileUpsertWithWhereUniqueWithoutCityInput = { + where: SalesExpertProfileWhereUniqueInput + update: XOR + create: XOR + } + + export type SalesExpertProfileUpdateWithWhereUniqueWithoutCityInput = { + where: SalesExpertProfileWhereUniqueInput + data: XOR + } + + export type SalesExpertProfileUpdateManyWithWhereWithoutCityInput = { + where: SalesExpertProfileScalarWhereInput + data: XOR + } + + export type SalesExpertProfileScalarWhereInput = { + AND?: SalesExpertProfileScalarWhereInput | SalesExpertProfileScalarWhereInput[] + OR?: SalesExpertProfileScalarWhereInput[] + NOT?: SalesExpertProfileScalarWhereInput | SalesExpertProfileScalarWhereInput[] + id?: StringFilter<"SalesExpertProfile"> | string + adminUserId?: StringFilter<"SalesExpertProfile"> | string + cityId?: StringNullableFilter<"SalesExpertProfile"> | string | null + gramLevel?: DecimalFilter<"SalesExpertProfile"> | Decimal | DecimalJsLike | number | string + phone?: StringNullableFilter<"SalesExpertProfile"> | string | null + nationalCode?: StringNullableFilter<"SalesExpertProfile"> | string | null + tradingCustomerId?: StringNullableFilter<"SalesExpertProfile"> | string | null + createdAt?: DateTimeFilter<"SalesExpertProfile"> | Date | string + updatedAt?: DateTimeFilter<"SalesExpertProfile"> | Date | string + } + export type UserTypeCreateWithoutAdminUsersInput = { id: number title: string @@ -53245,12 +66537,44 @@ export namespace Prisma { create: XOR } + export type UploadedFileCreateWithoutAdminUserAvatarsInput = { + id?: string + url: string + originalName: string + mimeType: string + sizeBytes: number + purpose?: string | null + createdAt?: Date | string + uploadedByAdminUser?: AdminUserCreateNestedOneWithoutUploadedFilesInput + customerAvatars?: CustomerCreateNestedManyWithoutAvatarFileInput + } + + export type UploadedFileUncheckedCreateWithoutAdminUserAvatarsInput = { + id?: string + url: string + originalName: string + mimeType: string + sizeBytes: number + purpose?: string | null + uploadedByAdminUserId?: string | null + createdAt?: Date | string + customerAvatars?: CustomerUncheckedCreateNestedManyWithoutAvatarFileInput + } + + export type UploadedFileCreateOrConnectWithoutAdminUserAvatarsInput = { + where: UploadedFileWhereUniqueInput + create: XOR + } + export type CustomerCreateWithoutReferredByAgentInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string - nationalCode: string + nationalCode?: string | null passwordHash: string + cityNameRaw?: string | null kind?: $Enums.CustomerKind phone?: string | null address?: string | null @@ -53261,16 +66585,25 @@ export namespace Prisma { goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string goldDebtGrams?: Decimal | DecimalJsLike | number | string fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string verificationStep?: $Enums.VerificationStep nationalIdImageUrl?: string | null businessLicenseUrl?: string | null shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null canPlaceOrders?: boolean isActive?: boolean isArchived?: boolean createdAt?: Date | string updatedAt?: Date | string city?: CityCreateNestedOneWithoutCustomersInput + salesExpertTradingFor?: SalesExpertProfileCreateNestedOneWithoutTradingCustomerInput + referredOrders?: OrderCreateNestedManyWithoutReferrerCustomerInput avatarFile?: UploadedFileCreateNestedOneWithoutCustomerAvatarsInput addresses?: CustomerAddressCreateNestedManyWithoutCustomerInput orders?: OrderCreateNestedManyWithoutCustomerInput @@ -53281,15 +66614,20 @@ export namespace Prisma { promotions?: PromotionCreateNestedManyWithoutCustomerInput notifications?: NotificationRecipientCreateNestedManyWithoutCustomerInput activityLogs?: CustomerActivityLogCreateNestedManyWithoutCustomerInput + otpChallenges?: CustomerOtpCreateNestedManyWithoutCustomerInput + favorites?: CustomerFavoriteCreateNestedManyWithoutCustomerInput } export type CustomerUncheckedCreateWithoutReferredByAgentInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string - nationalCode: string + nationalCode?: string | null passwordHash: string cityId?: string | null + cityNameRaw?: string | null kind?: $Enums.CustomerKind phone?: string | null address?: string | null @@ -53300,16 +66638,25 @@ export namespace Prisma { goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string goldDebtGrams?: Decimal | DecimalJsLike | number | string fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string verificationStep?: $Enums.VerificationStep nationalIdImageUrl?: string | null businessLicenseUrl?: string | null shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null avatarFileId?: string | null canPlaceOrders?: boolean isActive?: boolean isArchived?: boolean createdAt?: Date | string updatedAt?: Date | string + salesExpertTradingFor?: SalesExpertProfileUncheckedCreateNestedOneWithoutTradingCustomerInput + referredOrders?: OrderUncheckedCreateNestedManyWithoutReferrerCustomerInput addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCustomerInput orders?: OrderUncheckedCreateNestedManyWithoutCustomerInput preOrders?: PreOrderUncheckedCreateNestedManyWithoutCustomerInput @@ -53319,6 +66666,8 @@ export namespace Prisma { promotions?: PromotionUncheckedCreateNestedManyWithoutCustomerInput notifications?: NotificationRecipientUncheckedCreateNestedManyWithoutCustomerInput activityLogs?: CustomerActivityLogUncheckedCreateNestedManyWithoutCustomerInput + otpChallenges?: CustomerOtpUncheckedCreateNestedManyWithoutCustomerInput + favorites?: CustomerFavoriteUncheckedCreateNestedManyWithoutCustomerInput } export type CustomerCreateOrConnectWithoutReferredByAgentInput = { @@ -53331,6 +66680,58 @@ export namespace Prisma { skipDuplicates?: boolean } + export type OrderCreateWithoutSalesAgentInput = { + id?: string + orderNumber: string + channel?: $Enums.OrderChannel + status?: $Enums.OrderStatus + totalGoldWeightGrams: Decimal | DecimalJsLike | number | string + wageWeightGrams: Decimal | DecimalJsLike | number | string + flatRialCharge?: Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: boolean + deliveredAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + customer: CustomerCreateNestedOneWithoutOrdersInput + branch?: BranchCreateNestedOneWithoutOrdersInput + referrerCustomer?: CustomerCreateNestedOneWithoutReferredOrdersInput + items?: OrderItemCreateNestedManyWithoutOrderInput + statusEvents?: OrderStatusEventCreateNestedManyWithoutOrderInput + ledgerEntries?: LedgerEntryCreateNestedManyWithoutOrderInput + convertedFromPreOrder?: PreOrderCreateNestedOneWithoutConvertedOrderInput + } + + export type OrderUncheckedCreateWithoutSalesAgentInput = { + id?: string + orderNumber: string + customerId: string + branchId?: string | null + channel?: $Enums.OrderChannel + status?: $Enums.OrderStatus + totalGoldWeightGrams: Decimal | DecimalJsLike | number | string + wageWeightGrams: Decimal | DecimalJsLike | number | string + flatRialCharge?: Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: boolean + deliveredAt?: Date | string | null + referrerCustomerId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + items?: OrderItemUncheckedCreateNestedManyWithoutOrderInput + statusEvents?: OrderStatusEventUncheckedCreateNestedManyWithoutOrderInput + ledgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutOrderInput + convertedFromPreOrder?: PreOrderUncheckedCreateNestedOneWithoutConvertedOrderInput + } + + export type OrderCreateOrConnectWithoutSalesAgentInput = { + where: OrderWhereUniqueInput + create: XOR + } + + export type OrderCreateManySalesAgentInputEnvelope = { + data: OrderCreateManySalesAgentInput | OrderCreateManySalesAgentInput[] + skipDuplicates?: boolean + } + export type WorkshopCreateWithoutSupervisorInput = { id?: string name: string @@ -53562,6 +66963,7 @@ export namespace Prisma { purpose?: string | null createdAt?: Date | string customerAvatars?: CustomerCreateNestedManyWithoutAvatarFileInput + adminUserAvatars?: AdminUserCreateNestedManyWithoutAvatarFileInput } export type UploadedFileUncheckedCreateWithoutUploadedByAdminUserInput = { @@ -53573,6 +66975,7 @@ export namespace Prisma { purpose?: string | null createdAt?: Date | string customerAvatars?: CustomerUncheckedCreateNestedManyWithoutAvatarFileInput + adminUserAvatars?: AdminUserUncheckedCreateNestedManyWithoutAvatarFileInput } export type UploadedFileCreateOrConnectWithoutUploadedByAdminUserInput = { @@ -53585,6 +66988,71 @@ export namespace Prisma { skipDuplicates?: boolean } + export type SalesExpertProfileCreateWithoutAdminUserInput = { + id?: string + gramLevel?: Decimal | DecimalJsLike | number | string + phone?: string | null + nationalCode?: string | null + createdAt?: Date | string + updatedAt?: Date | string + city?: CityCreateNestedOneWithoutSalesExpertProfilesInput + tradingCustomer?: CustomerCreateNestedOneWithoutSalesExpertTradingForInput + } + + export type SalesExpertProfileUncheckedCreateWithoutAdminUserInput = { + id?: string + cityId?: string | null + gramLevel?: Decimal | DecimalJsLike | number | string + phone?: string | null + nationalCode?: string | null + tradingCustomerId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + } + + export type SalesExpertProfileCreateOrConnectWithoutAdminUserInput = { + where: SalesExpertProfileWhereUniqueInput + create: XOR + } + + export type AdminSessionCreateWithoutAdminUserInput = { + id?: string + jti: string + iamSessionId?: string | null + iamSub?: string | null + ipAddress?: string | null + userAgent?: string | null + createdAt?: Date | string + expiresAt?: Date | string | null + lastSeenAt?: Date | string | null + revokedAt?: Date | string | null + revokedReason?: string | null + } + + export type AdminSessionUncheckedCreateWithoutAdminUserInput = { + id?: string + jti: string + iamSessionId?: string | null + iamSub?: string | null + ipAddress?: string | null + userAgent?: string | null + createdAt?: Date | string + expiresAt?: Date | string | null + lastSeenAt?: Date | string | null + revokedAt?: Date | string | null + revokedReason?: string | null + } + + export type AdminSessionCreateOrConnectWithoutAdminUserInput = { + where: AdminSessionWhereUniqueInput + create: XOR + } + + export type AdminSessionCreateManyAdminUserInputEnvelope = { + data: AdminSessionCreateManyAdminUserInput | AdminSessionCreateManyAdminUserInput[] + skipDuplicates?: boolean + } + export type UserTypeUpsertWithoutAdminUsersInput = { update: XOR create: XOR @@ -53645,6 +67113,41 @@ export namespace Prisma { allocations?: BranchAllocationUncheckedUpdateManyWithoutBranchNestedInput } + export type UploadedFileUpsertWithoutAdminUserAvatarsInput = { + update: XOR + create: XOR + where?: UploadedFileWhereInput + } + + export type UploadedFileUpdateToOneWithWhereWithoutAdminUserAvatarsInput = { + where?: UploadedFileWhereInput + data: XOR + } + + export type UploadedFileUpdateWithoutAdminUserAvatarsInput = { + id?: StringFieldUpdateOperationsInput | string + url?: StringFieldUpdateOperationsInput | string + originalName?: StringFieldUpdateOperationsInput | string + mimeType?: StringFieldUpdateOperationsInput | string + sizeBytes?: IntFieldUpdateOperationsInput | number + purpose?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + uploadedByAdminUser?: AdminUserUpdateOneWithoutUploadedFilesNestedInput + customerAvatars?: CustomerUpdateManyWithoutAvatarFileNestedInput + } + + export type UploadedFileUncheckedUpdateWithoutAdminUserAvatarsInput = { + id?: StringFieldUpdateOperationsInput | string + url?: StringFieldUpdateOperationsInput | string + originalName?: StringFieldUpdateOperationsInput | string + mimeType?: StringFieldUpdateOperationsInput | string + sizeBytes?: IntFieldUpdateOperationsInput | number + purpose?: NullableStringFieldUpdateOperationsInput | string | null + uploadedByAdminUserId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + customerAvatars?: CustomerUncheckedUpdateManyWithoutAvatarFileNestedInput + } + export type CustomerUpsertWithWhereUniqueWithoutReferredByAgentInput = { where: CustomerWhereUniqueInput update: XOR @@ -53661,6 +67164,43 @@ export namespace Prisma { data: XOR } + export type OrderUpsertWithWhereUniqueWithoutSalesAgentInput = { + where: OrderWhereUniqueInput + update: XOR + create: XOR + } + + export type OrderUpdateWithWhereUniqueWithoutSalesAgentInput = { + where: OrderWhereUniqueInput + data: XOR + } + + export type OrderUpdateManyWithWhereWithoutSalesAgentInput = { + where: OrderScalarWhereInput + data: XOR + } + + export type OrderScalarWhereInput = { + AND?: OrderScalarWhereInput | OrderScalarWhereInput[] + OR?: OrderScalarWhereInput[] + NOT?: OrderScalarWhereInput | OrderScalarWhereInput[] + id?: StringFilter<"Order"> | string + orderNumber?: StringFilter<"Order"> | string + customerId?: StringFilter<"Order"> | string + branchId?: StringNullableFilter<"Order"> | string | null + channel?: EnumOrderChannelFilter<"Order"> | $Enums.OrderChannel + status?: EnumOrderStatusFilter<"Order"> | $Enums.OrderStatus + totalGoldWeightGrams?: DecimalFilter<"Order"> | Decimal | DecimalJsLike | number | string + wageWeightGrams?: DecimalFilter<"Order"> | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFilter<"Order"> | Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: BoolFilter<"Order"> | boolean + deliveredAt?: DateTimeNullableFilter<"Order"> | Date | string | null + salesAgentId?: StringNullableFilter<"Order"> | string | null + referrerCustomerId?: StringNullableFilter<"Order"> | string | null + createdAt?: DateTimeFilter<"Order"> | Date | string + updatedAt?: DateTimeFilter<"Order"> | Date | string + } + export type WorkshopUpsertWithWhereUniqueWithoutSupervisorInput = { where: WorkshopWhereUniqueInput update: XOR @@ -53904,28 +67444,671 @@ export namespace Prisma { createdAt?: DateTimeFilter<"UploadedFile"> | Date | string } - export type CityCreateWithoutCustomersInput = { + export type SalesExpertProfileUpsertWithoutAdminUserInput = { + update: XOR + create: XOR + where?: SalesExpertProfileWhereInput + } + + export type SalesExpertProfileUpdateToOneWithWhereWithoutAdminUserInput = { + where?: SalesExpertProfileWhereInput + data: XOR + } + + export type SalesExpertProfileUpdateWithoutAdminUserInput = { + id?: StringFieldUpdateOperationsInput | string + gramLevel?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + phone?: NullableStringFieldUpdateOperationsInput | string | null + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + city?: CityUpdateOneWithoutSalesExpertProfilesNestedInput + tradingCustomer?: CustomerUpdateOneWithoutSalesExpertTradingForNestedInput + } + + export type SalesExpertProfileUncheckedUpdateWithoutAdminUserInput = { + id?: StringFieldUpdateOperationsInput | string + cityId?: NullableStringFieldUpdateOperationsInput | string | null + gramLevel?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + phone?: NullableStringFieldUpdateOperationsInput | string | null + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null + tradingCustomerId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type AdminSessionUpsertWithWhereUniqueWithoutAdminUserInput = { + where: AdminSessionWhereUniqueInput + update: XOR + create: XOR + } + + export type AdminSessionUpdateWithWhereUniqueWithoutAdminUserInput = { + where: AdminSessionWhereUniqueInput + data: XOR + } + + export type AdminSessionUpdateManyWithWhereWithoutAdminUserInput = { + where: AdminSessionScalarWhereInput + data: XOR + } + + export type AdminSessionScalarWhereInput = { + AND?: AdminSessionScalarWhereInput | AdminSessionScalarWhereInput[] + OR?: AdminSessionScalarWhereInput[] + NOT?: AdminSessionScalarWhereInput | AdminSessionScalarWhereInput[] + id?: StringFilter<"AdminSession"> | string + jti?: StringFilter<"AdminSession"> | string + adminUserId?: StringFilter<"AdminSession"> | string + iamSessionId?: StringNullableFilter<"AdminSession"> | string | null + iamSub?: StringNullableFilter<"AdminSession"> | string | null + ipAddress?: StringNullableFilter<"AdminSession"> | string | null + userAgent?: StringNullableFilter<"AdminSession"> | string | null + createdAt?: DateTimeFilter<"AdminSession"> | Date | string + expiresAt?: DateTimeNullableFilter<"AdminSession"> | Date | string | null + lastSeenAt?: DateTimeNullableFilter<"AdminSession"> | Date | string | null + revokedAt?: DateTimeNullableFilter<"AdminSession"> | Date | string | null + revokedReason?: StringNullableFilter<"AdminSession"> | string | null + } + + export type AdminUserCreateWithoutSessionsInput = { + id?: string + fullName: string + firstName?: string | null + lastName?: string | null + mobile: string + passwordHash: string + role: $Enums.AdminRole + wagePercent?: Decimal | DecimalJsLike | number | string | null + isActive?: boolean + createdAt?: Date | string + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null + userType?: UserTypeCreateNestedOneWithoutAdminUsersInput + branch?: BranchCreateNestedOneWithoutAdminUsersInput + avatarFile?: UploadedFileCreateNestedOneWithoutAdminUserAvatarsInput + referredCustomers?: CustomerCreateNestedManyWithoutReferredByAgentInput + creditedOrders?: OrderCreateNestedManyWithoutSalesAgentInput + supervisedWorkshops?: WorkshopCreateNestedManyWithoutSupervisorInput + branchAllocations?: BranchAllocationCreateNestedManyWithoutAllocatorAdminUserInput + postedLedgerEntries?: LedgerEntryCreateNestedManyWithoutPostedByAdminUserInput + orderStatusEvents?: OrderStatusEventCreateNestedManyWithoutActorAdminUserInput + preOrderStatusEvents?: PreOrderStatusEventCreateNestedManyWithoutActorAdminUserInput + sentSmsMessages?: SmsMessageCreateNestedManyWithoutSentByAdminUserInput + sentNotifications?: NotificationCreateNestedManyWithoutSentByAdminUserInput + uploadedFiles?: UploadedFileCreateNestedManyWithoutUploadedByAdminUserInput + salesExpertProfile?: SalesExpertProfileCreateNestedOneWithoutAdminUserInput + } + + export type AdminUserUncheckedCreateWithoutSessionsInput = { + id?: string + fullName: string + firstName?: string | null + lastName?: string | null + mobile: string + passwordHash: string + role: $Enums.AdminRole + userTypeId?: number | null + branchId?: string | null + wagePercent?: Decimal | DecimalJsLike | number | string | null + isActive?: boolean + createdAt?: Date | string + avatarFileId?: string | null + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null + referredCustomers?: CustomerUncheckedCreateNestedManyWithoutReferredByAgentInput + creditedOrders?: OrderUncheckedCreateNestedManyWithoutSalesAgentInput + supervisedWorkshops?: WorkshopUncheckedCreateNestedManyWithoutSupervisorInput + branchAllocations?: BranchAllocationUncheckedCreateNestedManyWithoutAllocatorAdminUserInput + postedLedgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutPostedByAdminUserInput + orderStatusEvents?: OrderStatusEventUncheckedCreateNestedManyWithoutActorAdminUserInput + preOrderStatusEvents?: PreOrderStatusEventUncheckedCreateNestedManyWithoutActorAdminUserInput + sentSmsMessages?: SmsMessageUncheckedCreateNestedManyWithoutSentByAdminUserInput + sentNotifications?: NotificationUncheckedCreateNestedManyWithoutSentByAdminUserInput + uploadedFiles?: UploadedFileUncheckedCreateNestedManyWithoutUploadedByAdminUserInput + salesExpertProfile?: SalesExpertProfileUncheckedCreateNestedOneWithoutAdminUserInput + } + + export type AdminUserCreateOrConnectWithoutSessionsInput = { + where: AdminUserWhereUniqueInput + create: XOR + } + + export type AdminUserUpsertWithoutSessionsInput = { + update: XOR + create: XOR + where?: AdminUserWhereInput + } + + export type AdminUserUpdateToOneWithWhereWithoutSessionsInput = { + where?: AdminUserWhereInput + data: XOR + } + + export type AdminUserUpdateWithoutSessionsInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null + mobile?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole + wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null + userType?: UserTypeUpdateOneWithoutAdminUsersNestedInput + branch?: BranchUpdateOneWithoutAdminUsersNestedInput + avatarFile?: UploadedFileUpdateOneWithoutAdminUserAvatarsNestedInput + referredCustomers?: CustomerUpdateManyWithoutReferredByAgentNestedInput + creditedOrders?: OrderUpdateManyWithoutSalesAgentNestedInput + supervisedWorkshops?: WorkshopUpdateManyWithoutSupervisorNestedInput + branchAllocations?: BranchAllocationUpdateManyWithoutAllocatorAdminUserNestedInput + postedLedgerEntries?: LedgerEntryUpdateManyWithoutPostedByAdminUserNestedInput + orderStatusEvents?: OrderStatusEventUpdateManyWithoutActorAdminUserNestedInput + preOrderStatusEvents?: PreOrderStatusEventUpdateManyWithoutActorAdminUserNestedInput + sentSmsMessages?: SmsMessageUpdateManyWithoutSentByAdminUserNestedInput + sentNotifications?: NotificationUpdateManyWithoutSentByAdminUserNestedInput + uploadedFiles?: UploadedFileUpdateManyWithoutUploadedByAdminUserNestedInput + salesExpertProfile?: SalesExpertProfileUpdateOneWithoutAdminUserNestedInput + } + + export type AdminUserUncheckedUpdateWithoutSessionsInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null + mobile?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole + userTypeId?: NullableIntFieldUpdateOperationsInput | number | null + branchId?: NullableStringFieldUpdateOperationsInput | string | null + wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null + referredCustomers?: CustomerUncheckedUpdateManyWithoutReferredByAgentNestedInput + creditedOrders?: OrderUncheckedUpdateManyWithoutSalesAgentNestedInput + supervisedWorkshops?: WorkshopUncheckedUpdateManyWithoutSupervisorNestedInput + branchAllocations?: BranchAllocationUncheckedUpdateManyWithoutAllocatorAdminUserNestedInput + postedLedgerEntries?: LedgerEntryUncheckedUpdateManyWithoutPostedByAdminUserNestedInput + orderStatusEvents?: OrderStatusEventUncheckedUpdateManyWithoutActorAdminUserNestedInput + preOrderStatusEvents?: PreOrderStatusEventUncheckedUpdateManyWithoutActorAdminUserNestedInput + sentSmsMessages?: SmsMessageUncheckedUpdateManyWithoutSentByAdminUserNestedInput + sentNotifications?: NotificationUncheckedUpdateManyWithoutSentByAdminUserNestedInput + uploadedFiles?: UploadedFileUncheckedUpdateManyWithoutUploadedByAdminUserNestedInput + salesExpertProfile?: SalesExpertProfileUncheckedUpdateOneWithoutAdminUserNestedInput + } + + export type AdminUserCreateWithoutSalesExpertProfileInput = { + id?: string + fullName: string + firstName?: string | null + lastName?: string | null + mobile: string + passwordHash: string + role: $Enums.AdminRole + wagePercent?: Decimal | DecimalJsLike | number | string | null + isActive?: boolean + createdAt?: Date | string + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null + userType?: UserTypeCreateNestedOneWithoutAdminUsersInput + branch?: BranchCreateNestedOneWithoutAdminUsersInput + avatarFile?: UploadedFileCreateNestedOneWithoutAdminUserAvatarsInput + referredCustomers?: CustomerCreateNestedManyWithoutReferredByAgentInput + creditedOrders?: OrderCreateNestedManyWithoutSalesAgentInput + supervisedWorkshops?: WorkshopCreateNestedManyWithoutSupervisorInput + branchAllocations?: BranchAllocationCreateNestedManyWithoutAllocatorAdminUserInput + postedLedgerEntries?: LedgerEntryCreateNestedManyWithoutPostedByAdminUserInput + orderStatusEvents?: OrderStatusEventCreateNestedManyWithoutActorAdminUserInput + preOrderStatusEvents?: PreOrderStatusEventCreateNestedManyWithoutActorAdminUserInput + sentSmsMessages?: SmsMessageCreateNestedManyWithoutSentByAdminUserInput + sentNotifications?: NotificationCreateNestedManyWithoutSentByAdminUserInput + uploadedFiles?: UploadedFileCreateNestedManyWithoutUploadedByAdminUserInput + sessions?: AdminSessionCreateNestedManyWithoutAdminUserInput + } + + export type AdminUserUncheckedCreateWithoutSalesExpertProfileInput = { + id?: string + fullName: string + firstName?: string | null + lastName?: string | null + mobile: string + passwordHash: string + role: $Enums.AdminRole + userTypeId?: number | null + branchId?: string | null + wagePercent?: Decimal | DecimalJsLike | number | string | null + isActive?: boolean + createdAt?: Date | string + avatarFileId?: string | null + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null + referredCustomers?: CustomerUncheckedCreateNestedManyWithoutReferredByAgentInput + creditedOrders?: OrderUncheckedCreateNestedManyWithoutSalesAgentInput + supervisedWorkshops?: WorkshopUncheckedCreateNestedManyWithoutSupervisorInput + branchAllocations?: BranchAllocationUncheckedCreateNestedManyWithoutAllocatorAdminUserInput + postedLedgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutPostedByAdminUserInput + orderStatusEvents?: OrderStatusEventUncheckedCreateNestedManyWithoutActorAdminUserInput + preOrderStatusEvents?: PreOrderStatusEventUncheckedCreateNestedManyWithoutActorAdminUserInput + sentSmsMessages?: SmsMessageUncheckedCreateNestedManyWithoutSentByAdminUserInput + sentNotifications?: NotificationUncheckedCreateNestedManyWithoutSentByAdminUserInput + uploadedFiles?: UploadedFileUncheckedCreateNestedManyWithoutUploadedByAdminUserInput + sessions?: AdminSessionUncheckedCreateNestedManyWithoutAdminUserInput + } + + export type AdminUserCreateOrConnectWithoutSalesExpertProfileInput = { + where: AdminUserWhereUniqueInput + create: XOR + } + + export type CityCreateWithoutSalesExpertProfilesInput = { id?: string name: string - province?: string | null percent?: Decimal | DecimalJsLike | number | string | null percentAux?: Decimal | DecimalJsLike | number | string | null + parent?: CityCreateNestedOneWithoutChildrenInput + children?: CityCreateNestedManyWithoutParentInput + customers?: CustomerCreateNestedManyWithoutCityInput addresses?: CustomerAddressCreateNestedManyWithoutCityInput branches?: BranchCreateNestedManyWithoutCityInput preOrders?: PreOrderCreateNestedManyWithoutCityInput } - export type CityUncheckedCreateWithoutCustomersInput = { + export type CityUncheckedCreateWithoutSalesExpertProfilesInput = { id?: string name: string - province?: string | null + parentId?: string | null percent?: Decimal | DecimalJsLike | number | string | null percentAux?: Decimal | DecimalJsLike | number | string | null + children?: CityUncheckedCreateNestedManyWithoutParentInput + customers?: CustomerUncheckedCreateNestedManyWithoutCityInput addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCityInput branches?: BranchUncheckedCreateNestedManyWithoutCityInput preOrders?: PreOrderUncheckedCreateNestedManyWithoutCityInput } + export type CityCreateOrConnectWithoutSalesExpertProfilesInput = { + where: CityWhereUniqueInput + create: XOR + } + + export type CustomerCreateWithoutSalesExpertTradingForInput = { + id?: string + fullName: string + firstName?: string | null + lastName?: string | null + mobile: string + nationalCode?: string | null + passwordHash: string + cityNameRaw?: string | null + kind?: $Enums.CustomerKind + phone?: string | null + address?: string | null + storeName?: string | null + pasazhName?: string | null + zone?: string | null + memberCode?: string | null + goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string + goldDebtGrams?: Decimal | DecimalJsLike | number | string + fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string + verificationStep?: $Enums.VerificationStep + nationalIdImageUrl?: string | null + businessLicenseUrl?: string | null + shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null + canPlaceOrders?: boolean + isActive?: boolean + isArchived?: boolean + createdAt?: Date | string + updatedAt?: Date | string + city?: CityCreateNestedOneWithoutCustomersInput + referredByAgent?: AdminUserCreateNestedOneWithoutReferredCustomersInput + referredOrders?: OrderCreateNestedManyWithoutReferrerCustomerInput + avatarFile?: UploadedFileCreateNestedOneWithoutCustomerAvatarsInput + addresses?: CustomerAddressCreateNestedManyWithoutCustomerInput + orders?: OrderCreateNestedManyWithoutCustomerInput + preOrders?: PreOrderCreateNestedManyWithoutCustomerInput + ledgerEntries?: LedgerEntryCreateNestedManyWithoutCustomerInput + walletBonuses?: WalletBonusCreateNestedManyWithoutCustomerInput + comments?: CommentCreateNestedManyWithoutCustomerInput + promotions?: PromotionCreateNestedManyWithoutCustomerInput + notifications?: NotificationRecipientCreateNestedManyWithoutCustomerInput + activityLogs?: CustomerActivityLogCreateNestedManyWithoutCustomerInput + otpChallenges?: CustomerOtpCreateNestedManyWithoutCustomerInput + favorites?: CustomerFavoriteCreateNestedManyWithoutCustomerInput + } + + export type CustomerUncheckedCreateWithoutSalesExpertTradingForInput = { + id?: string + fullName: string + firstName?: string | null + lastName?: string | null + mobile: string + nationalCode?: string | null + passwordHash: string + cityId?: string | null + cityNameRaw?: string | null + kind?: $Enums.CustomerKind + phone?: string | null + address?: string | null + storeName?: string | null + pasazhName?: string | null + zone?: string | null + memberCode?: string | null + referredByAgentId?: string | null + goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string + goldDebtGrams?: Decimal | DecimalJsLike | number | string + fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string + verificationStep?: $Enums.VerificationStep + nationalIdImageUrl?: string | null + businessLicenseUrl?: string | null + shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null + avatarFileId?: string | null + canPlaceOrders?: boolean + isActive?: boolean + isArchived?: boolean + createdAt?: Date | string + updatedAt?: Date | string + referredOrders?: OrderUncheckedCreateNestedManyWithoutReferrerCustomerInput + addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCustomerInput + orders?: OrderUncheckedCreateNestedManyWithoutCustomerInput + preOrders?: PreOrderUncheckedCreateNestedManyWithoutCustomerInput + ledgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutCustomerInput + walletBonuses?: WalletBonusUncheckedCreateNestedManyWithoutCustomerInput + comments?: CommentUncheckedCreateNestedManyWithoutCustomerInput + promotions?: PromotionUncheckedCreateNestedManyWithoutCustomerInput + notifications?: NotificationRecipientUncheckedCreateNestedManyWithoutCustomerInput + activityLogs?: CustomerActivityLogUncheckedCreateNestedManyWithoutCustomerInput + otpChallenges?: CustomerOtpUncheckedCreateNestedManyWithoutCustomerInput + favorites?: CustomerFavoriteUncheckedCreateNestedManyWithoutCustomerInput + } + + export type CustomerCreateOrConnectWithoutSalesExpertTradingForInput = { + where: CustomerWhereUniqueInput + create: XOR + } + + export type AdminUserUpsertWithoutSalesExpertProfileInput = { + update: XOR + create: XOR + where?: AdminUserWhereInput + } + + export type AdminUserUpdateToOneWithWhereWithoutSalesExpertProfileInput = { + where?: AdminUserWhereInput + data: XOR + } + + export type AdminUserUpdateWithoutSalesExpertProfileInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null + mobile?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole + wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null + userType?: UserTypeUpdateOneWithoutAdminUsersNestedInput + branch?: BranchUpdateOneWithoutAdminUsersNestedInput + avatarFile?: UploadedFileUpdateOneWithoutAdminUserAvatarsNestedInput + referredCustomers?: CustomerUpdateManyWithoutReferredByAgentNestedInput + creditedOrders?: OrderUpdateManyWithoutSalesAgentNestedInput + supervisedWorkshops?: WorkshopUpdateManyWithoutSupervisorNestedInput + branchAllocations?: BranchAllocationUpdateManyWithoutAllocatorAdminUserNestedInput + postedLedgerEntries?: LedgerEntryUpdateManyWithoutPostedByAdminUserNestedInput + orderStatusEvents?: OrderStatusEventUpdateManyWithoutActorAdminUserNestedInput + preOrderStatusEvents?: PreOrderStatusEventUpdateManyWithoutActorAdminUserNestedInput + sentSmsMessages?: SmsMessageUpdateManyWithoutSentByAdminUserNestedInput + sentNotifications?: NotificationUpdateManyWithoutSentByAdminUserNestedInput + uploadedFiles?: UploadedFileUpdateManyWithoutUploadedByAdminUserNestedInput + sessions?: AdminSessionUpdateManyWithoutAdminUserNestedInput + } + + export type AdminUserUncheckedUpdateWithoutSalesExpertProfileInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null + mobile?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole + userTypeId?: NullableIntFieldUpdateOperationsInput | number | null + branchId?: NullableStringFieldUpdateOperationsInput | string | null + wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null + referredCustomers?: CustomerUncheckedUpdateManyWithoutReferredByAgentNestedInput + creditedOrders?: OrderUncheckedUpdateManyWithoutSalesAgentNestedInput + supervisedWorkshops?: WorkshopUncheckedUpdateManyWithoutSupervisorNestedInput + branchAllocations?: BranchAllocationUncheckedUpdateManyWithoutAllocatorAdminUserNestedInput + postedLedgerEntries?: LedgerEntryUncheckedUpdateManyWithoutPostedByAdminUserNestedInput + orderStatusEvents?: OrderStatusEventUncheckedUpdateManyWithoutActorAdminUserNestedInput + preOrderStatusEvents?: PreOrderStatusEventUncheckedUpdateManyWithoutActorAdminUserNestedInput + sentSmsMessages?: SmsMessageUncheckedUpdateManyWithoutSentByAdminUserNestedInput + sentNotifications?: NotificationUncheckedUpdateManyWithoutSentByAdminUserNestedInput + uploadedFiles?: UploadedFileUncheckedUpdateManyWithoutUploadedByAdminUserNestedInput + sessions?: AdminSessionUncheckedUpdateManyWithoutAdminUserNestedInput + } + + export type CityUpsertWithoutSalesExpertProfilesInput = { + update: XOR + create: XOR + where?: CityWhereInput + } + + export type CityUpdateToOneWithWhereWithoutSalesExpertProfilesInput = { + where?: CityWhereInput + data: XOR + } + + export type CityUpdateWithoutSalesExpertProfilesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + percent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + percentAux?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + parent?: CityUpdateOneWithoutChildrenNestedInput + children?: CityUpdateManyWithoutParentNestedInput + customers?: CustomerUpdateManyWithoutCityNestedInput + addresses?: CustomerAddressUpdateManyWithoutCityNestedInput + branches?: BranchUpdateManyWithoutCityNestedInput + preOrders?: PreOrderUpdateManyWithoutCityNestedInput + } + + export type CityUncheckedUpdateWithoutSalesExpertProfilesInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + parentId?: NullableStringFieldUpdateOperationsInput | string | null + percent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + percentAux?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + children?: CityUncheckedUpdateManyWithoutParentNestedInput + customers?: CustomerUncheckedUpdateManyWithoutCityNestedInput + addresses?: CustomerAddressUncheckedUpdateManyWithoutCityNestedInput + branches?: BranchUncheckedUpdateManyWithoutCityNestedInput + preOrders?: PreOrderUncheckedUpdateManyWithoutCityNestedInput + } + + export type CustomerUpsertWithoutSalesExpertTradingForInput = { + update: XOR + create: XOR + where?: CustomerWhereInput + } + + export type CustomerUpdateToOneWithWhereWithoutSalesExpertTradingForInput = { + where?: CustomerWhereInput + data: XOR + } + + export type CustomerUpdateWithoutSalesExpertTradingForInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null + mobile?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null + passwordHash?: StringFieldUpdateOperationsInput | string + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null + kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind + phone?: NullableStringFieldUpdateOperationsInput | string | null + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + zone?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null + goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep + nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null + shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean + isActive?: BoolFieldUpdateOperationsInput | boolean + isArchived?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + city?: CityUpdateOneWithoutCustomersNestedInput + referredByAgent?: AdminUserUpdateOneWithoutReferredCustomersNestedInput + referredOrders?: OrderUpdateManyWithoutReferrerCustomerNestedInput + avatarFile?: UploadedFileUpdateOneWithoutCustomerAvatarsNestedInput + addresses?: CustomerAddressUpdateManyWithoutCustomerNestedInput + orders?: OrderUpdateManyWithoutCustomerNestedInput + preOrders?: PreOrderUpdateManyWithoutCustomerNestedInput + ledgerEntries?: LedgerEntryUpdateManyWithoutCustomerNestedInput + walletBonuses?: WalletBonusUpdateManyWithoutCustomerNestedInput + comments?: CommentUpdateManyWithoutCustomerNestedInput + promotions?: PromotionUpdateManyWithoutCustomerNestedInput + notifications?: NotificationRecipientUpdateManyWithoutCustomerNestedInput + activityLogs?: CustomerActivityLogUpdateManyWithoutCustomerNestedInput + otpChallenges?: CustomerOtpUpdateManyWithoutCustomerNestedInput + favorites?: CustomerFavoriteUpdateManyWithoutCustomerNestedInput + } + + export type CustomerUncheckedUpdateWithoutSalesExpertTradingForInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null + mobile?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null + passwordHash?: StringFieldUpdateOperationsInput | string + cityId?: NullableStringFieldUpdateOperationsInput | string | null + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null + kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind + phone?: NullableStringFieldUpdateOperationsInput | string | null + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + zone?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null + referredByAgentId?: NullableStringFieldUpdateOperationsInput | string | null + goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep + nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null + shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null + canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean + isActive?: BoolFieldUpdateOperationsInput | boolean + isArchived?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + referredOrders?: OrderUncheckedUpdateManyWithoutReferrerCustomerNestedInput + addresses?: CustomerAddressUncheckedUpdateManyWithoutCustomerNestedInput + orders?: OrderUncheckedUpdateManyWithoutCustomerNestedInput + preOrders?: PreOrderUncheckedUpdateManyWithoutCustomerNestedInput + ledgerEntries?: LedgerEntryUncheckedUpdateManyWithoutCustomerNestedInput + walletBonuses?: WalletBonusUncheckedUpdateManyWithoutCustomerNestedInput + comments?: CommentUncheckedUpdateManyWithoutCustomerNestedInput + promotions?: PromotionUncheckedUpdateManyWithoutCustomerNestedInput + notifications?: NotificationRecipientUncheckedUpdateManyWithoutCustomerNestedInput + activityLogs?: CustomerActivityLogUncheckedUpdateManyWithoutCustomerNestedInput + otpChallenges?: CustomerOtpUncheckedUpdateManyWithoutCustomerNestedInput + favorites?: CustomerFavoriteUncheckedUpdateManyWithoutCustomerNestedInput + } + + export type CityCreateWithoutCustomersInput = { + id?: string + name: string + percent?: Decimal | DecimalJsLike | number | string | null + percentAux?: Decimal | DecimalJsLike | number | string | null + parent?: CityCreateNestedOneWithoutChildrenInput + children?: CityCreateNestedManyWithoutParentInput + addresses?: CustomerAddressCreateNestedManyWithoutCityInput + branches?: BranchCreateNestedManyWithoutCityInput + preOrders?: PreOrderCreateNestedManyWithoutCityInput + salesExpertProfiles?: SalesExpertProfileCreateNestedManyWithoutCityInput + } + + export type CityUncheckedCreateWithoutCustomersInput = { + id?: string + name: string + parentId?: string | null + percent?: Decimal | DecimalJsLike | number | string | null + percentAux?: Decimal | DecimalJsLike | number | string | null + children?: CityUncheckedCreateNestedManyWithoutParentInput + addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCityInput + branches?: BranchUncheckedCreateNestedManyWithoutCityInput + preOrders?: PreOrderUncheckedCreateNestedManyWithoutCityInput + salesExpertProfiles?: SalesExpertProfileUncheckedCreateNestedManyWithoutCityInput + } + export type CityCreateOrConnectWithoutCustomersInput = { where: CityWhereUniqueInput create: XOR @@ -53934,14 +68117,22 @@ export namespace Prisma { export type AdminUserCreateWithoutReferredCustomersInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string passwordHash: string role: $Enums.AdminRole wagePercent?: Decimal | DecimalJsLike | number | string | null isActive?: boolean createdAt?: Date | string + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null userType?: UserTypeCreateNestedOneWithoutAdminUsersInput branch?: BranchCreateNestedOneWithoutAdminUsersInput + avatarFile?: UploadedFileCreateNestedOneWithoutAdminUserAvatarsInput + creditedOrders?: OrderCreateNestedManyWithoutSalesAgentInput supervisedWorkshops?: WorkshopCreateNestedManyWithoutSupervisorInput branchAllocations?: BranchAllocationCreateNestedManyWithoutAllocatorAdminUserInput postedLedgerEntries?: LedgerEntryCreateNestedManyWithoutPostedByAdminUserInput @@ -53950,11 +68141,15 @@ export namespace Prisma { sentSmsMessages?: SmsMessageCreateNestedManyWithoutSentByAdminUserInput sentNotifications?: NotificationCreateNestedManyWithoutSentByAdminUserInput uploadedFiles?: UploadedFileCreateNestedManyWithoutUploadedByAdminUserInput + salesExpertProfile?: SalesExpertProfileCreateNestedOneWithoutAdminUserInput + sessions?: AdminSessionCreateNestedManyWithoutAdminUserInput } export type AdminUserUncheckedCreateWithoutReferredCustomersInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string passwordHash: string role: $Enums.AdminRole @@ -53963,6 +68158,12 @@ export namespace Prisma { wagePercent?: Decimal | DecimalJsLike | number | string | null isActive?: boolean createdAt?: Date | string + avatarFileId?: string | null + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null + creditedOrders?: OrderUncheckedCreateNestedManyWithoutSalesAgentInput supervisedWorkshops?: WorkshopUncheckedCreateNestedManyWithoutSupervisorInput branchAllocations?: BranchAllocationUncheckedCreateNestedManyWithoutAllocatorAdminUserInput postedLedgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutPostedByAdminUserInput @@ -53971,6 +68172,8 @@ export namespace Prisma { sentSmsMessages?: SmsMessageUncheckedCreateNestedManyWithoutSentByAdminUserInput sentNotifications?: NotificationUncheckedCreateNestedManyWithoutSentByAdminUserInput uploadedFiles?: UploadedFileUncheckedCreateNestedManyWithoutUploadedByAdminUserInput + salesExpertProfile?: SalesExpertProfileUncheckedCreateNestedOneWithoutAdminUserInput + sessions?: AdminSessionUncheckedCreateNestedManyWithoutAdminUserInput } export type AdminUserCreateOrConnectWithoutReferredCustomersInput = { @@ -53978,6 +68181,85 @@ export namespace Prisma { create: XOR } + export type SalesExpertProfileCreateWithoutTradingCustomerInput = { + id?: string + gramLevel?: Decimal | DecimalJsLike | number | string + phone?: string | null + nationalCode?: string | null + createdAt?: Date | string + updatedAt?: Date | string + adminUser: AdminUserCreateNestedOneWithoutSalesExpertProfileInput + city?: CityCreateNestedOneWithoutSalesExpertProfilesInput + } + + export type SalesExpertProfileUncheckedCreateWithoutTradingCustomerInput = { + id?: string + adminUserId: string + cityId?: string | null + gramLevel?: Decimal | DecimalJsLike | number | string + phone?: string | null + nationalCode?: string | null + createdAt?: Date | string + updatedAt?: Date | string + } + + export type SalesExpertProfileCreateOrConnectWithoutTradingCustomerInput = { + where: SalesExpertProfileWhereUniqueInput + create: XOR + } + + export type OrderCreateWithoutReferrerCustomerInput = { + id?: string + orderNumber: string + channel?: $Enums.OrderChannel + status?: $Enums.OrderStatus + totalGoldWeightGrams: Decimal | DecimalJsLike | number | string + wageWeightGrams: Decimal | DecimalJsLike | number | string + flatRialCharge?: Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: boolean + deliveredAt?: Date | string | null + createdAt?: Date | string + updatedAt?: Date | string + customer: CustomerCreateNestedOneWithoutOrdersInput + branch?: BranchCreateNestedOneWithoutOrdersInput + salesAgent?: AdminUserCreateNestedOneWithoutCreditedOrdersInput + items?: OrderItemCreateNestedManyWithoutOrderInput + statusEvents?: OrderStatusEventCreateNestedManyWithoutOrderInput + ledgerEntries?: LedgerEntryCreateNestedManyWithoutOrderInput + convertedFromPreOrder?: PreOrderCreateNestedOneWithoutConvertedOrderInput + } + + export type OrderUncheckedCreateWithoutReferrerCustomerInput = { + id?: string + orderNumber: string + customerId: string + branchId?: string | null + channel?: $Enums.OrderChannel + status?: $Enums.OrderStatus + totalGoldWeightGrams: Decimal | DecimalJsLike | number | string + wageWeightGrams: Decimal | DecimalJsLike | number | string + flatRialCharge?: Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: boolean + deliveredAt?: Date | string | null + salesAgentId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + items?: OrderItemUncheckedCreateNestedManyWithoutOrderInput + statusEvents?: OrderStatusEventUncheckedCreateNestedManyWithoutOrderInput + ledgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutOrderInput + convertedFromPreOrder?: PreOrderUncheckedCreateNestedOneWithoutConvertedOrderInput + } + + export type OrderCreateOrConnectWithoutReferrerCustomerInput = { + where: OrderWhereUniqueInput + create: XOR + } + + export type OrderCreateManyReferrerCustomerInputEnvelope = { + data: OrderCreateManyReferrerCustomerInput | OrderCreateManyReferrerCustomerInput[] + skipDuplicates?: boolean + } + export type UploadedFileCreateWithoutCustomerAvatarsInput = { id?: string url: string @@ -53987,6 +68269,7 @@ export namespace Prisma { purpose?: string | null createdAt?: Date | string uploadedByAdminUser?: AdminUserCreateNestedOneWithoutUploadedFilesInput + adminUserAvatars?: AdminUserCreateNestedManyWithoutAvatarFileInput } export type UploadedFileUncheckedCreateWithoutCustomerAvatarsInput = { @@ -53998,6 +68281,7 @@ export namespace Prisma { purpose?: string | null uploadedByAdminUserId?: string | null createdAt?: Date | string + adminUserAvatars?: AdminUserUncheckedCreateNestedManyWithoutAvatarFileInput } export type UploadedFileCreateOrConnectWithoutCustomerAvatarsInput = { @@ -54042,6 +68326,8 @@ export namespace Prisma { createdAt?: Date | string updatedAt?: Date | string branch?: BranchCreateNestedOneWithoutOrdersInput + salesAgent?: AdminUserCreateNestedOneWithoutCreditedOrdersInput + referrerCustomer?: CustomerCreateNestedOneWithoutReferredOrdersInput items?: OrderItemCreateNestedManyWithoutOrderInput statusEvents?: OrderStatusEventCreateNestedManyWithoutOrderInput ledgerEntries?: LedgerEntryCreateNestedManyWithoutOrderInput @@ -54059,6 +68345,8 @@ export namespace Prisma { flatRialCharge?: Decimal | DecimalJsLike | number | string isSuspendedOverCreditLimit?: boolean deliveredAt?: Date | string | null + salesAgentId?: string | null + referrerCustomerId?: string | null createdAt?: Date | string updatedAt?: Date | string items?: OrderItemUncheckedCreateNestedManyWithoutOrderInput @@ -54337,6 +68625,58 @@ export namespace Prisma { skipDuplicates?: boolean } + export type CustomerOtpCreateWithoutCustomerInput = { + id?: string + mobile: string + codeHash: string + expiresAt: Date | string + attempts?: number + consumedAt?: Date | string | null + requestIp?: string | null + createdAt?: Date | string + } + + export type CustomerOtpUncheckedCreateWithoutCustomerInput = { + id?: string + mobile: string + codeHash: string + expiresAt: Date | string + attempts?: number + consumedAt?: Date | string | null + requestIp?: string | null + createdAt?: Date | string + } + + export type CustomerOtpCreateOrConnectWithoutCustomerInput = { + where: CustomerOtpWhereUniqueInput + create: XOR + } + + export type CustomerOtpCreateManyCustomerInputEnvelope = { + data: CustomerOtpCreateManyCustomerInput | CustomerOtpCreateManyCustomerInput[] + skipDuplicates?: boolean + } + + export type CustomerFavoriteCreateWithoutCustomerInput = { + createdAt?: Date | string + product: ProductCreateNestedOneWithoutFavoritedByInput + } + + export type CustomerFavoriteUncheckedCreateWithoutCustomerInput = { + productId: string + createdAt?: Date | string + } + + export type CustomerFavoriteCreateOrConnectWithoutCustomerInput = { + where: CustomerFavoriteWhereUniqueInput + create: XOR + } + + export type CustomerFavoriteCreateManyCustomerInputEnvelope = { + data: CustomerFavoriteCreateManyCustomerInput | CustomerFavoriteCreateManyCustomerInput[] + skipDuplicates?: boolean + } + export type CityUpsertWithoutCustomersInput = { update: XOR create: XOR @@ -54351,23 +68691,27 @@ export namespace Prisma { export type CityUpdateWithoutCustomersInput = { id?: StringFieldUpdateOperationsInput | string name?: StringFieldUpdateOperationsInput | string - province?: NullableStringFieldUpdateOperationsInput | string | null percent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null percentAux?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + parent?: CityUpdateOneWithoutChildrenNestedInput + children?: CityUpdateManyWithoutParentNestedInput addresses?: CustomerAddressUpdateManyWithoutCityNestedInput branches?: BranchUpdateManyWithoutCityNestedInput preOrders?: PreOrderUpdateManyWithoutCityNestedInput + salesExpertProfiles?: SalesExpertProfileUpdateManyWithoutCityNestedInput } export type CityUncheckedUpdateWithoutCustomersInput = { id?: StringFieldUpdateOperationsInput | string name?: StringFieldUpdateOperationsInput | string - province?: NullableStringFieldUpdateOperationsInput | string | null + parentId?: NullableStringFieldUpdateOperationsInput | string | null percent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null percentAux?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + children?: CityUncheckedUpdateManyWithoutParentNestedInput addresses?: CustomerAddressUncheckedUpdateManyWithoutCityNestedInput branches?: BranchUncheckedUpdateManyWithoutCityNestedInput preOrders?: PreOrderUncheckedUpdateManyWithoutCityNestedInput + salesExpertProfiles?: SalesExpertProfileUncheckedUpdateManyWithoutCityNestedInput } export type AdminUserUpsertWithoutReferredCustomersInput = { @@ -54384,14 +68728,22 @@ export namespace Prisma { export type AdminUserUpdateWithoutReferredCustomersInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string passwordHash?: StringFieldUpdateOperationsInput | string role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null userType?: UserTypeUpdateOneWithoutAdminUsersNestedInput branch?: BranchUpdateOneWithoutAdminUsersNestedInput + avatarFile?: UploadedFileUpdateOneWithoutAdminUserAvatarsNestedInput + creditedOrders?: OrderUpdateManyWithoutSalesAgentNestedInput supervisedWorkshops?: WorkshopUpdateManyWithoutSupervisorNestedInput branchAllocations?: BranchAllocationUpdateManyWithoutAllocatorAdminUserNestedInput postedLedgerEntries?: LedgerEntryUpdateManyWithoutPostedByAdminUserNestedInput @@ -54400,11 +68752,15 @@ export namespace Prisma { sentSmsMessages?: SmsMessageUpdateManyWithoutSentByAdminUserNestedInput sentNotifications?: NotificationUpdateManyWithoutSentByAdminUserNestedInput uploadedFiles?: UploadedFileUpdateManyWithoutUploadedByAdminUserNestedInput + salesExpertProfile?: SalesExpertProfileUpdateOneWithoutAdminUserNestedInput + sessions?: AdminSessionUpdateManyWithoutAdminUserNestedInput } export type AdminUserUncheckedUpdateWithoutReferredCustomersInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string passwordHash?: StringFieldUpdateOperationsInput | string role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole @@ -54413,6 +68769,12 @@ export namespace Prisma { wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null + creditedOrders?: OrderUncheckedUpdateManyWithoutSalesAgentNestedInput supervisedWorkshops?: WorkshopUncheckedUpdateManyWithoutSupervisorNestedInput branchAllocations?: BranchAllocationUncheckedUpdateManyWithoutAllocatorAdminUserNestedInput postedLedgerEntries?: LedgerEntryUncheckedUpdateManyWithoutPostedByAdminUserNestedInput @@ -54421,6 +68783,57 @@ export namespace Prisma { sentSmsMessages?: SmsMessageUncheckedUpdateManyWithoutSentByAdminUserNestedInput sentNotifications?: NotificationUncheckedUpdateManyWithoutSentByAdminUserNestedInput uploadedFiles?: UploadedFileUncheckedUpdateManyWithoutUploadedByAdminUserNestedInput + salesExpertProfile?: SalesExpertProfileUncheckedUpdateOneWithoutAdminUserNestedInput + sessions?: AdminSessionUncheckedUpdateManyWithoutAdminUserNestedInput + } + + export type SalesExpertProfileUpsertWithoutTradingCustomerInput = { + update: XOR + create: XOR + where?: SalesExpertProfileWhereInput + } + + export type SalesExpertProfileUpdateToOneWithWhereWithoutTradingCustomerInput = { + where?: SalesExpertProfileWhereInput + data: XOR + } + + export type SalesExpertProfileUpdateWithoutTradingCustomerInput = { + id?: StringFieldUpdateOperationsInput | string + gramLevel?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + phone?: NullableStringFieldUpdateOperationsInput | string | null + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + adminUser?: AdminUserUpdateOneRequiredWithoutSalesExpertProfileNestedInput + city?: CityUpdateOneWithoutSalesExpertProfilesNestedInput + } + + export type SalesExpertProfileUncheckedUpdateWithoutTradingCustomerInput = { + id?: StringFieldUpdateOperationsInput | string + adminUserId?: StringFieldUpdateOperationsInput | string + cityId?: NullableStringFieldUpdateOperationsInput | string | null + gramLevel?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + phone?: NullableStringFieldUpdateOperationsInput | string | null + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type OrderUpsertWithWhereUniqueWithoutReferrerCustomerInput = { + where: OrderWhereUniqueInput + update: XOR + create: XOR + } + + export type OrderUpdateWithWhereUniqueWithoutReferrerCustomerInput = { + where: OrderWhereUniqueInput + data: XOR + } + + export type OrderUpdateManyWithWhereWithoutReferrerCustomerInput = { + where: OrderScalarWhereInput + data: XOR } export type UploadedFileUpsertWithoutCustomerAvatarsInput = { @@ -54443,6 +68856,7 @@ export namespace Prisma { purpose?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string uploadedByAdminUser?: AdminUserUpdateOneWithoutUploadedFilesNestedInput + adminUserAvatars?: AdminUserUpdateManyWithoutAvatarFileNestedInput } export type UploadedFileUncheckedUpdateWithoutCustomerAvatarsInput = { @@ -54454,6 +68868,7 @@ export namespace Prisma { purpose?: NullableStringFieldUpdateOperationsInput | string | null uploadedByAdminUserId?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + adminUserAvatars?: AdminUserUncheckedUpdateManyWithoutAvatarFileNestedInput } export type CustomerAddressUpsertWithWhereUniqueWithoutCustomerInput = { @@ -54488,25 +68903,6 @@ export namespace Prisma { data: XOR } - export type OrderScalarWhereInput = { - AND?: OrderScalarWhereInput | OrderScalarWhereInput[] - OR?: OrderScalarWhereInput[] - NOT?: OrderScalarWhereInput | OrderScalarWhereInput[] - id?: StringFilter<"Order"> | string - orderNumber?: StringFilter<"Order"> | string - customerId?: StringFilter<"Order"> | string - branchId?: StringNullableFilter<"Order"> | string | null - channel?: EnumOrderChannelFilter<"Order"> | $Enums.OrderChannel - status?: EnumOrderStatusFilter<"Order"> | $Enums.OrderStatus - totalGoldWeightGrams?: DecimalFilter<"Order"> | Decimal | DecimalJsLike | number | string - wageWeightGrams?: DecimalFilter<"Order"> | Decimal | DecimalJsLike | number | string - flatRialCharge?: DecimalFilter<"Order"> | Decimal | DecimalJsLike | number | string - isSuspendedOverCreditLimit?: BoolFilter<"Order"> | boolean - deliveredAt?: DateTimeNullableFilter<"Order"> | Date | string | null - createdAt?: DateTimeFilter<"Order"> | Date | string - updatedAt?: DateTimeFilter<"Order"> | Date | string - } - export type PreOrderUpsertWithWhereUniqueWithoutCustomerInput = { where: PreOrderWhereUniqueInput update: XOR @@ -54690,12 +69086,71 @@ export namespace Prisma { createdAt?: DateTimeFilter<"CustomerActivityLog"> | Date | string } - export type CustomerCreateWithoutAddressesInput = { + export type CustomerOtpUpsertWithWhereUniqueWithoutCustomerInput = { + where: CustomerOtpWhereUniqueInput + update: XOR + create: XOR + } + + export type CustomerOtpUpdateWithWhereUniqueWithoutCustomerInput = { + where: CustomerOtpWhereUniqueInput + data: XOR + } + + export type CustomerOtpUpdateManyWithWhereWithoutCustomerInput = { + where: CustomerOtpScalarWhereInput + data: XOR + } + + export type CustomerOtpScalarWhereInput = { + AND?: CustomerOtpScalarWhereInput | CustomerOtpScalarWhereInput[] + OR?: CustomerOtpScalarWhereInput[] + NOT?: CustomerOtpScalarWhereInput | CustomerOtpScalarWhereInput[] + id?: StringFilter<"CustomerOtp"> | string + mobile?: StringFilter<"CustomerOtp"> | string + customerId?: StringFilter<"CustomerOtp"> | string + codeHash?: StringFilter<"CustomerOtp"> | string + expiresAt?: DateTimeFilter<"CustomerOtp"> | Date | string + attempts?: IntFilter<"CustomerOtp"> | number + consumedAt?: DateTimeNullableFilter<"CustomerOtp"> | Date | string | null + requestIp?: StringNullableFilter<"CustomerOtp"> | string | null + createdAt?: DateTimeFilter<"CustomerOtp"> | Date | string + } + + export type CustomerFavoriteUpsertWithWhereUniqueWithoutCustomerInput = { + where: CustomerFavoriteWhereUniqueInput + update: XOR + create: XOR + } + + export type CustomerFavoriteUpdateWithWhereUniqueWithoutCustomerInput = { + where: CustomerFavoriteWhereUniqueInput + data: XOR + } + + export type CustomerFavoriteUpdateManyWithWhereWithoutCustomerInput = { + where: CustomerFavoriteScalarWhereInput + data: XOR + } + + export type CustomerFavoriteScalarWhereInput = { + AND?: CustomerFavoriteScalarWhereInput | CustomerFavoriteScalarWhereInput[] + OR?: CustomerFavoriteScalarWhereInput[] + NOT?: CustomerFavoriteScalarWhereInput | CustomerFavoriteScalarWhereInput[] + customerId?: StringFilter<"CustomerFavorite"> | string + productId?: StringFilter<"CustomerFavorite"> | string + createdAt?: DateTimeFilter<"CustomerFavorite"> | Date | string + } + + export type CustomerCreateWithoutFavoritesInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string - nationalCode: string + nationalCode?: string | null passwordHash: string + cityNameRaw?: string | null kind?: $Enums.CustomerKind phone?: string | null address?: string | null @@ -54706,10 +69161,17 @@ export namespace Prisma { goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string goldDebtGrams?: Decimal | DecimalJsLike | number | string fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string verificationStep?: $Enums.VerificationStep nationalIdImageUrl?: string | null businessLicenseUrl?: string | null shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null canPlaceOrders?: boolean isActive?: boolean isArchived?: boolean @@ -54717,7 +69179,10 @@ export namespace Prisma { updatedAt?: Date | string city?: CityCreateNestedOneWithoutCustomersInput referredByAgent?: AdminUserCreateNestedOneWithoutReferredCustomersInput + salesExpertTradingFor?: SalesExpertProfileCreateNestedOneWithoutTradingCustomerInput + referredOrders?: OrderCreateNestedManyWithoutReferrerCustomerInput avatarFile?: UploadedFileCreateNestedOneWithoutCustomerAvatarsInput + addresses?: CustomerAddressCreateNestedManyWithoutCustomerInput orders?: OrderCreateNestedManyWithoutCustomerInput preOrders?: PreOrderCreateNestedManyWithoutCustomerInput ledgerEntries?: LedgerEntryCreateNestedManyWithoutCustomerInput @@ -54726,15 +69191,19 @@ export namespace Prisma { promotions?: PromotionCreateNestedManyWithoutCustomerInput notifications?: NotificationRecipientCreateNestedManyWithoutCustomerInput activityLogs?: CustomerActivityLogCreateNestedManyWithoutCustomerInput + otpChallenges?: CustomerOtpCreateNestedManyWithoutCustomerInput } - export type CustomerUncheckedCreateWithoutAddressesInput = { + export type CustomerUncheckedCreateWithoutFavoritesInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string - nationalCode: string + nationalCode?: string | null passwordHash: string cityId?: string | null + cityNameRaw?: string | null kind?: $Enums.CustomerKind phone?: string | null address?: string | null @@ -54746,16 +69215,26 @@ export namespace Prisma { goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string goldDebtGrams?: Decimal | DecimalJsLike | number | string fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string verificationStep?: $Enums.VerificationStep nationalIdImageUrl?: string | null businessLicenseUrl?: string | null shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null avatarFileId?: string | null canPlaceOrders?: boolean isActive?: boolean isArchived?: boolean createdAt?: Date | string updatedAt?: Date | string + salesExpertTradingFor?: SalesExpertProfileUncheckedCreateNestedOneWithoutTradingCustomerInput + referredOrders?: OrderUncheckedCreateNestedManyWithoutReferrerCustomerInput + addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCustomerInput orders?: OrderUncheckedCreateNestedManyWithoutCustomerInput preOrders?: PreOrderUncheckedCreateNestedManyWithoutCustomerInput ledgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutCustomerInput @@ -54764,6 +69243,331 @@ export namespace Prisma { promotions?: PromotionUncheckedCreateNestedManyWithoutCustomerInput notifications?: NotificationRecipientUncheckedCreateNestedManyWithoutCustomerInput activityLogs?: CustomerActivityLogUncheckedCreateNestedManyWithoutCustomerInput + otpChallenges?: CustomerOtpUncheckedCreateNestedManyWithoutCustomerInput + } + + export type CustomerCreateOrConnectWithoutFavoritesInput = { + where: CustomerWhereUniqueInput + create: XOR + } + + export type ProductCreateWithoutFavoritedByInput = { + id?: string + title: string + description?: string | null + productCode?: string | null + showType?: number + isActive?: boolean + createdAt?: Date | string + accountingStockWeight?: Decimal | DecimalJsLike | number | string | null + accountingStockCount?: Decimal | DecimalJsLike | number | string | null + accountingStockAt?: Date | string | null + category?: CategoryCreateNestedOneWithoutProductsInput + brand?: BrandCreateNestedOneWithoutProductsInput + variants?: ProductVariantCreateNestedManyWithoutProductInput + images?: ProductImageCreateNestedManyWithoutProductInput + collections?: CollectionProductCreateNestedManyWithoutProductInput + comments?: CommentCreateNestedManyWithoutProductInput + promotions?: PromotionCreateNestedManyWithoutProductInput + allocationItems?: BranchAllocationItemCreateNestedManyWithoutProductInput + } + + export type ProductUncheckedCreateWithoutFavoritedByInput = { + id?: string + title: string + description?: string | null + categoryId?: string | null + brandId?: string | null + productCode?: string | null + showType?: number + isActive?: boolean + createdAt?: Date | string + accountingStockWeight?: Decimal | DecimalJsLike | number | string | null + accountingStockCount?: Decimal | DecimalJsLike | number | string | null + accountingStockAt?: Date | string | null + variants?: ProductVariantUncheckedCreateNestedManyWithoutProductInput + images?: ProductImageUncheckedCreateNestedManyWithoutProductInput + collections?: CollectionProductUncheckedCreateNestedManyWithoutProductInput + comments?: CommentUncheckedCreateNestedManyWithoutProductInput + promotions?: PromotionUncheckedCreateNestedManyWithoutProductInput + allocationItems?: BranchAllocationItemUncheckedCreateNestedManyWithoutProductInput + } + + export type ProductCreateOrConnectWithoutFavoritedByInput = { + where: ProductWhereUniqueInput + create: XOR + } + + export type CustomerUpsertWithoutFavoritesInput = { + update: XOR + create: XOR + where?: CustomerWhereInput + } + + export type CustomerUpdateToOneWithWhereWithoutFavoritesInput = { + where?: CustomerWhereInput + data: XOR + } + + export type CustomerUpdateWithoutFavoritesInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null + mobile?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null + passwordHash?: StringFieldUpdateOperationsInput | string + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null + kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind + phone?: NullableStringFieldUpdateOperationsInput | string | null + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + zone?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null + goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep + nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null + shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean + isActive?: BoolFieldUpdateOperationsInput | boolean + isArchived?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + city?: CityUpdateOneWithoutCustomersNestedInput + referredByAgent?: AdminUserUpdateOneWithoutReferredCustomersNestedInput + salesExpertTradingFor?: SalesExpertProfileUpdateOneWithoutTradingCustomerNestedInput + referredOrders?: OrderUpdateManyWithoutReferrerCustomerNestedInput + avatarFile?: UploadedFileUpdateOneWithoutCustomerAvatarsNestedInput + addresses?: CustomerAddressUpdateManyWithoutCustomerNestedInput + orders?: OrderUpdateManyWithoutCustomerNestedInput + preOrders?: PreOrderUpdateManyWithoutCustomerNestedInput + ledgerEntries?: LedgerEntryUpdateManyWithoutCustomerNestedInput + walletBonuses?: WalletBonusUpdateManyWithoutCustomerNestedInput + comments?: CommentUpdateManyWithoutCustomerNestedInput + promotions?: PromotionUpdateManyWithoutCustomerNestedInput + notifications?: NotificationRecipientUpdateManyWithoutCustomerNestedInput + activityLogs?: CustomerActivityLogUpdateManyWithoutCustomerNestedInput + otpChallenges?: CustomerOtpUpdateManyWithoutCustomerNestedInput + } + + export type CustomerUncheckedUpdateWithoutFavoritesInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null + mobile?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null + passwordHash?: StringFieldUpdateOperationsInput | string + cityId?: NullableStringFieldUpdateOperationsInput | string | null + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null + kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind + phone?: NullableStringFieldUpdateOperationsInput | string | null + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + zone?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null + referredByAgentId?: NullableStringFieldUpdateOperationsInput | string | null + goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep + nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null + shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null + canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean + isActive?: BoolFieldUpdateOperationsInput | boolean + isArchived?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + salesExpertTradingFor?: SalesExpertProfileUncheckedUpdateOneWithoutTradingCustomerNestedInput + referredOrders?: OrderUncheckedUpdateManyWithoutReferrerCustomerNestedInput + addresses?: CustomerAddressUncheckedUpdateManyWithoutCustomerNestedInput + orders?: OrderUncheckedUpdateManyWithoutCustomerNestedInput + preOrders?: PreOrderUncheckedUpdateManyWithoutCustomerNestedInput + ledgerEntries?: LedgerEntryUncheckedUpdateManyWithoutCustomerNestedInput + walletBonuses?: WalletBonusUncheckedUpdateManyWithoutCustomerNestedInput + comments?: CommentUncheckedUpdateManyWithoutCustomerNestedInput + promotions?: PromotionUncheckedUpdateManyWithoutCustomerNestedInput + notifications?: NotificationRecipientUncheckedUpdateManyWithoutCustomerNestedInput + activityLogs?: CustomerActivityLogUncheckedUpdateManyWithoutCustomerNestedInput + otpChallenges?: CustomerOtpUncheckedUpdateManyWithoutCustomerNestedInput + } + + export type ProductUpsertWithoutFavoritedByInput = { + update: XOR + create: XOR + where?: ProductWhereInput + } + + export type ProductUpdateToOneWithWhereWithoutFavoritedByInput = { + where?: ProductWhereInput + data: XOR + } + + export type ProductUpdateWithoutFavoritedByInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + productCode?: NullableStringFieldUpdateOperationsInput | string | null + showType?: IntFieldUpdateOperationsInput | number + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + accountingStockWeight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockCount?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + category?: CategoryUpdateOneWithoutProductsNestedInput + brand?: BrandUpdateOneWithoutProductsNestedInput + variants?: ProductVariantUpdateManyWithoutProductNestedInput + images?: ProductImageUpdateManyWithoutProductNestedInput + collections?: CollectionProductUpdateManyWithoutProductNestedInput + comments?: CommentUpdateManyWithoutProductNestedInput + promotions?: PromotionUpdateManyWithoutProductNestedInput + allocationItems?: BranchAllocationItemUpdateManyWithoutProductNestedInput + } + + export type ProductUncheckedUpdateWithoutFavoritedByInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + description?: NullableStringFieldUpdateOperationsInput | string | null + categoryId?: NullableStringFieldUpdateOperationsInput | string | null + brandId?: NullableStringFieldUpdateOperationsInput | string | null + productCode?: NullableStringFieldUpdateOperationsInput | string | null + showType?: IntFieldUpdateOperationsInput | number + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + accountingStockWeight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockCount?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + variants?: ProductVariantUncheckedUpdateManyWithoutProductNestedInput + images?: ProductImageUncheckedUpdateManyWithoutProductNestedInput + collections?: CollectionProductUncheckedUpdateManyWithoutProductNestedInput + comments?: CommentUncheckedUpdateManyWithoutProductNestedInput + promotions?: PromotionUncheckedUpdateManyWithoutProductNestedInput + allocationItems?: BranchAllocationItemUncheckedUpdateManyWithoutProductNestedInput + } + + export type CustomerCreateWithoutAddressesInput = { + id?: string + fullName: string + firstName?: string | null + lastName?: string | null + mobile: string + nationalCode?: string | null + passwordHash: string + cityNameRaw?: string | null + kind?: $Enums.CustomerKind + phone?: string | null + address?: string | null + storeName?: string | null + pasazhName?: string | null + zone?: string | null + memberCode?: string | null + goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string + goldDebtGrams?: Decimal | DecimalJsLike | number | string + fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string + verificationStep?: $Enums.VerificationStep + nationalIdImageUrl?: string | null + businessLicenseUrl?: string | null + shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null + canPlaceOrders?: boolean + isActive?: boolean + isArchived?: boolean + createdAt?: Date | string + updatedAt?: Date | string + city?: CityCreateNestedOneWithoutCustomersInput + referredByAgent?: AdminUserCreateNestedOneWithoutReferredCustomersInput + salesExpertTradingFor?: SalesExpertProfileCreateNestedOneWithoutTradingCustomerInput + referredOrders?: OrderCreateNestedManyWithoutReferrerCustomerInput + avatarFile?: UploadedFileCreateNestedOneWithoutCustomerAvatarsInput + orders?: OrderCreateNestedManyWithoutCustomerInput + preOrders?: PreOrderCreateNestedManyWithoutCustomerInput + ledgerEntries?: LedgerEntryCreateNestedManyWithoutCustomerInput + walletBonuses?: WalletBonusCreateNestedManyWithoutCustomerInput + comments?: CommentCreateNestedManyWithoutCustomerInput + promotions?: PromotionCreateNestedManyWithoutCustomerInput + notifications?: NotificationRecipientCreateNestedManyWithoutCustomerInput + activityLogs?: CustomerActivityLogCreateNestedManyWithoutCustomerInput + otpChallenges?: CustomerOtpCreateNestedManyWithoutCustomerInput + favorites?: CustomerFavoriteCreateNestedManyWithoutCustomerInput + } + + export type CustomerUncheckedCreateWithoutAddressesInput = { + id?: string + fullName: string + firstName?: string | null + lastName?: string | null + mobile: string + nationalCode?: string | null + passwordHash: string + cityId?: string | null + cityNameRaw?: string | null + kind?: $Enums.CustomerKind + phone?: string | null + address?: string | null + storeName?: string | null + pasazhName?: string | null + zone?: string | null + memberCode?: string | null + referredByAgentId?: string | null + goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string + goldDebtGrams?: Decimal | DecimalJsLike | number | string + fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string + verificationStep?: $Enums.VerificationStep + nationalIdImageUrl?: string | null + businessLicenseUrl?: string | null + shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null + avatarFileId?: string | null + canPlaceOrders?: boolean + isActive?: boolean + isArchived?: boolean + createdAt?: Date | string + updatedAt?: Date | string + salesExpertTradingFor?: SalesExpertProfileUncheckedCreateNestedOneWithoutTradingCustomerInput + referredOrders?: OrderUncheckedCreateNestedManyWithoutReferrerCustomerInput + orders?: OrderUncheckedCreateNestedManyWithoutCustomerInput + preOrders?: PreOrderUncheckedCreateNestedManyWithoutCustomerInput + ledgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutCustomerInput + walletBonuses?: WalletBonusUncheckedCreateNestedManyWithoutCustomerInput + comments?: CommentUncheckedCreateNestedManyWithoutCustomerInput + promotions?: PromotionUncheckedCreateNestedManyWithoutCustomerInput + notifications?: NotificationRecipientUncheckedCreateNestedManyWithoutCustomerInput + activityLogs?: CustomerActivityLogUncheckedCreateNestedManyWithoutCustomerInput + otpChallenges?: CustomerOtpUncheckedCreateNestedManyWithoutCustomerInput + favorites?: CustomerFavoriteUncheckedCreateNestedManyWithoutCustomerInput } export type CustomerCreateOrConnectWithoutAddressesInput = { @@ -54774,23 +69578,27 @@ export namespace Prisma { export type CityCreateWithoutAddressesInput = { id?: string name: string - province?: string | null percent?: Decimal | DecimalJsLike | number | string | null percentAux?: Decimal | DecimalJsLike | number | string | null + parent?: CityCreateNestedOneWithoutChildrenInput + children?: CityCreateNestedManyWithoutParentInput customers?: CustomerCreateNestedManyWithoutCityInput branches?: BranchCreateNestedManyWithoutCityInput preOrders?: PreOrderCreateNestedManyWithoutCityInput + salesExpertProfiles?: SalesExpertProfileCreateNestedManyWithoutCityInput } export type CityUncheckedCreateWithoutAddressesInput = { id?: string name: string - province?: string | null + parentId?: string | null percent?: Decimal | DecimalJsLike | number | string | null percentAux?: Decimal | DecimalJsLike | number | string | null + children?: CityUncheckedCreateNestedManyWithoutParentInput customers?: CustomerUncheckedCreateNestedManyWithoutCityInput branches?: BranchUncheckedCreateNestedManyWithoutCityInput preOrders?: PreOrderUncheckedCreateNestedManyWithoutCityInput + salesExpertProfiles?: SalesExpertProfileUncheckedCreateNestedManyWithoutCityInput } export type CityCreateOrConnectWithoutAddressesInput = { @@ -54812,9 +69620,12 @@ export namespace Prisma { export type CustomerUpdateWithoutAddressesInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string - nationalCode?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null passwordHash?: StringFieldUpdateOperationsInput | string + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind phone?: NullableStringFieldUpdateOperationsInput | string | null address?: NullableStringFieldUpdateOperationsInput | string | null @@ -54825,10 +69636,17 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean isArchived?: BoolFieldUpdateOperationsInput | boolean @@ -54836,6 +69654,8 @@ export namespace Prisma { updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string city?: CityUpdateOneWithoutCustomersNestedInput referredByAgent?: AdminUserUpdateOneWithoutReferredCustomersNestedInput + salesExpertTradingFor?: SalesExpertProfileUpdateOneWithoutTradingCustomerNestedInput + referredOrders?: OrderUpdateManyWithoutReferrerCustomerNestedInput avatarFile?: UploadedFileUpdateOneWithoutCustomerAvatarsNestedInput orders?: OrderUpdateManyWithoutCustomerNestedInput preOrders?: PreOrderUpdateManyWithoutCustomerNestedInput @@ -54845,15 +69665,20 @@ export namespace Prisma { promotions?: PromotionUpdateManyWithoutCustomerNestedInput notifications?: NotificationRecipientUpdateManyWithoutCustomerNestedInput activityLogs?: CustomerActivityLogUpdateManyWithoutCustomerNestedInput + otpChallenges?: CustomerOtpUpdateManyWithoutCustomerNestedInput + favorites?: CustomerFavoriteUpdateManyWithoutCustomerNestedInput } export type CustomerUncheckedUpdateWithoutAddressesInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string - nationalCode?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null passwordHash?: StringFieldUpdateOperationsInput | string cityId?: NullableStringFieldUpdateOperationsInput | string | null + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind phone?: NullableStringFieldUpdateOperationsInput | string | null address?: NullableStringFieldUpdateOperationsInput | string | null @@ -54865,16 +69690,25 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean isArchived?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + salesExpertTradingFor?: SalesExpertProfileUncheckedUpdateOneWithoutTradingCustomerNestedInput + referredOrders?: OrderUncheckedUpdateManyWithoutReferrerCustomerNestedInput orders?: OrderUncheckedUpdateManyWithoutCustomerNestedInput preOrders?: PreOrderUncheckedUpdateManyWithoutCustomerNestedInput ledgerEntries?: LedgerEntryUncheckedUpdateManyWithoutCustomerNestedInput @@ -54883,6 +69717,8 @@ export namespace Prisma { promotions?: PromotionUncheckedUpdateManyWithoutCustomerNestedInput notifications?: NotificationRecipientUncheckedUpdateManyWithoutCustomerNestedInput activityLogs?: CustomerActivityLogUncheckedUpdateManyWithoutCustomerNestedInput + otpChallenges?: CustomerOtpUncheckedUpdateManyWithoutCustomerNestedInput + favorites?: CustomerFavoriteUncheckedUpdateManyWithoutCustomerNestedInput } export type CityUpsertWithoutAddressesInput = { @@ -54899,45 +69735,53 @@ export namespace Prisma { export type CityUpdateWithoutAddressesInput = { id?: StringFieldUpdateOperationsInput | string name?: StringFieldUpdateOperationsInput | string - province?: NullableStringFieldUpdateOperationsInput | string | null percent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null percentAux?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + parent?: CityUpdateOneWithoutChildrenNestedInput + children?: CityUpdateManyWithoutParentNestedInput customers?: CustomerUpdateManyWithoutCityNestedInput branches?: BranchUpdateManyWithoutCityNestedInput preOrders?: PreOrderUpdateManyWithoutCityNestedInput + salesExpertProfiles?: SalesExpertProfileUpdateManyWithoutCityNestedInput } export type CityUncheckedUpdateWithoutAddressesInput = { id?: StringFieldUpdateOperationsInput | string name?: StringFieldUpdateOperationsInput | string - province?: NullableStringFieldUpdateOperationsInput | string | null + parentId?: NullableStringFieldUpdateOperationsInput | string | null percent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null percentAux?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + children?: CityUncheckedUpdateManyWithoutParentNestedInput customers?: CustomerUncheckedUpdateManyWithoutCityNestedInput branches?: BranchUncheckedUpdateManyWithoutCityNestedInput preOrders?: PreOrderUncheckedUpdateManyWithoutCityNestedInput + salesExpertProfiles?: SalesExpertProfileUncheckedUpdateManyWithoutCityNestedInput } export type CityCreateWithoutBranchesInput = { id?: string name: string - province?: string | null percent?: Decimal | DecimalJsLike | number | string | null percentAux?: Decimal | DecimalJsLike | number | string | null + parent?: CityCreateNestedOneWithoutChildrenInput + children?: CityCreateNestedManyWithoutParentInput customers?: CustomerCreateNestedManyWithoutCityInput addresses?: CustomerAddressCreateNestedManyWithoutCityInput preOrders?: PreOrderCreateNestedManyWithoutCityInput + salesExpertProfiles?: SalesExpertProfileCreateNestedManyWithoutCityInput } export type CityUncheckedCreateWithoutBranchesInput = { id?: string name: string - province?: string | null + parentId?: string | null percent?: Decimal | DecimalJsLike | number | string | null percentAux?: Decimal | DecimalJsLike | number | string | null + children?: CityUncheckedCreateNestedManyWithoutParentInput customers?: CustomerUncheckedCreateNestedManyWithoutCityInput addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCityInput preOrders?: PreOrderUncheckedCreateNestedManyWithoutCityInput + salesExpertProfiles?: SalesExpertProfileUncheckedCreateNestedManyWithoutCityInput } export type CityCreateOrConnectWithoutBranchesInput = { @@ -54948,14 +69792,22 @@ export namespace Prisma { export type AdminUserCreateWithoutBranchInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string passwordHash: string role: $Enums.AdminRole wagePercent?: Decimal | DecimalJsLike | number | string | null isActive?: boolean createdAt?: Date | string + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null userType?: UserTypeCreateNestedOneWithoutAdminUsersInput + avatarFile?: UploadedFileCreateNestedOneWithoutAdminUserAvatarsInput referredCustomers?: CustomerCreateNestedManyWithoutReferredByAgentInput + creditedOrders?: OrderCreateNestedManyWithoutSalesAgentInput supervisedWorkshops?: WorkshopCreateNestedManyWithoutSupervisorInput branchAllocations?: BranchAllocationCreateNestedManyWithoutAllocatorAdminUserInput postedLedgerEntries?: LedgerEntryCreateNestedManyWithoutPostedByAdminUserInput @@ -54964,11 +69816,15 @@ export namespace Prisma { sentSmsMessages?: SmsMessageCreateNestedManyWithoutSentByAdminUserInput sentNotifications?: NotificationCreateNestedManyWithoutSentByAdminUserInput uploadedFiles?: UploadedFileCreateNestedManyWithoutUploadedByAdminUserInput + salesExpertProfile?: SalesExpertProfileCreateNestedOneWithoutAdminUserInput + sessions?: AdminSessionCreateNestedManyWithoutAdminUserInput } export type AdminUserUncheckedCreateWithoutBranchInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string passwordHash: string role: $Enums.AdminRole @@ -54976,7 +69832,13 @@ export namespace Prisma { wagePercent?: Decimal | DecimalJsLike | number | string | null isActive?: boolean createdAt?: Date | string + avatarFileId?: string | null + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null referredCustomers?: CustomerUncheckedCreateNestedManyWithoutReferredByAgentInput + creditedOrders?: OrderUncheckedCreateNestedManyWithoutSalesAgentInput supervisedWorkshops?: WorkshopUncheckedCreateNestedManyWithoutSupervisorInput branchAllocations?: BranchAllocationUncheckedCreateNestedManyWithoutAllocatorAdminUserInput postedLedgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutPostedByAdminUserInput @@ -54985,6 +69847,8 @@ export namespace Prisma { sentSmsMessages?: SmsMessageUncheckedCreateNestedManyWithoutSentByAdminUserInput sentNotifications?: NotificationUncheckedCreateNestedManyWithoutSentByAdminUserInput uploadedFiles?: UploadedFileUncheckedCreateNestedManyWithoutUploadedByAdminUserInput + salesExpertProfile?: SalesExpertProfileUncheckedCreateNestedOneWithoutAdminUserInput + sessions?: AdminSessionUncheckedCreateNestedManyWithoutAdminUserInput } export type AdminUserCreateOrConnectWithoutBranchInput = { @@ -55010,6 +69874,8 @@ export namespace Prisma { createdAt?: Date | string updatedAt?: Date | string customer: CustomerCreateNestedOneWithoutOrdersInput + salesAgent?: AdminUserCreateNestedOneWithoutCreditedOrdersInput + referrerCustomer?: CustomerCreateNestedOneWithoutReferredOrdersInput items?: OrderItemCreateNestedManyWithoutOrderInput statusEvents?: OrderStatusEventCreateNestedManyWithoutOrderInput ledgerEntries?: LedgerEntryCreateNestedManyWithoutOrderInput @@ -55027,6 +69893,8 @@ export namespace Prisma { flatRialCharge?: Decimal | DecimalJsLike | number | string isSuspendedOverCreditLimit?: boolean deliveredAt?: Date | string | null + salesAgentId?: string | null + referrerCustomerId?: string | null createdAt?: Date | string updatedAt?: Date | string items?: OrderItemUncheckedCreateNestedManyWithoutOrderInput @@ -55085,23 +69953,27 @@ export namespace Prisma { export type CityUpdateWithoutBranchesInput = { id?: StringFieldUpdateOperationsInput | string name?: StringFieldUpdateOperationsInput | string - province?: NullableStringFieldUpdateOperationsInput | string | null percent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null percentAux?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + parent?: CityUpdateOneWithoutChildrenNestedInput + children?: CityUpdateManyWithoutParentNestedInput customers?: CustomerUpdateManyWithoutCityNestedInput addresses?: CustomerAddressUpdateManyWithoutCityNestedInput preOrders?: PreOrderUpdateManyWithoutCityNestedInput + salesExpertProfiles?: SalesExpertProfileUpdateManyWithoutCityNestedInput } export type CityUncheckedUpdateWithoutBranchesInput = { id?: StringFieldUpdateOperationsInput | string name?: StringFieldUpdateOperationsInput | string - province?: NullableStringFieldUpdateOperationsInput | string | null + parentId?: NullableStringFieldUpdateOperationsInput | string | null percent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null percentAux?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + children?: CityUncheckedUpdateManyWithoutParentNestedInput customers?: CustomerUncheckedUpdateManyWithoutCityNestedInput addresses?: CustomerAddressUncheckedUpdateManyWithoutCityNestedInput preOrders?: PreOrderUncheckedUpdateManyWithoutCityNestedInput + salesExpertProfiles?: SalesExpertProfileUncheckedUpdateManyWithoutCityNestedInput } export type AdminUserUpsertWithWhereUniqueWithoutBranchInput = { @@ -55126,6 +69998,8 @@ export namespace Prisma { NOT?: AdminUserScalarWhereInput | AdminUserScalarWhereInput[] id?: StringFilter<"AdminUser"> | string fullName?: StringFilter<"AdminUser"> | string + firstName?: StringNullableFilter<"AdminUser"> | string | null + lastName?: StringNullableFilter<"AdminUser"> | string | null mobile?: StringFilter<"AdminUser"> | string passwordHash?: StringFilter<"AdminUser"> | string role?: EnumAdminRoleFilter<"AdminUser"> | $Enums.AdminRole @@ -55134,6 +70008,11 @@ export namespace Prisma { wagePercent?: DecimalNullableFilter<"AdminUser"> | Decimal | DecimalJsLike | number | string | null isActive?: BoolFilter<"AdminUser"> | boolean createdAt?: DateTimeFilter<"AdminUser"> | Date | string + avatarFileId?: StringNullableFilter<"AdminUser"> | string | null + address?: StringNullableFilter<"AdminUser"> | string | null + storeName?: StringNullableFilter<"AdminUser"> | string | null + pasazhName?: StringNullableFilter<"AdminUser"> | string | null + memberCode?: StringNullableFilter<"AdminUser"> | string | null } export type OrderUpsertWithWhereUniqueWithoutBranchInput = { @@ -55171,15 +70050,23 @@ export namespace Prisma { export type AdminUserCreateWithoutSupervisedWorkshopsInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string passwordHash: string role: $Enums.AdminRole wagePercent?: Decimal | DecimalJsLike | number | string | null isActive?: boolean createdAt?: Date | string + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null userType?: UserTypeCreateNestedOneWithoutAdminUsersInput branch?: BranchCreateNestedOneWithoutAdminUsersInput + avatarFile?: UploadedFileCreateNestedOneWithoutAdminUserAvatarsInput referredCustomers?: CustomerCreateNestedManyWithoutReferredByAgentInput + creditedOrders?: OrderCreateNestedManyWithoutSalesAgentInput branchAllocations?: BranchAllocationCreateNestedManyWithoutAllocatorAdminUserInput postedLedgerEntries?: LedgerEntryCreateNestedManyWithoutPostedByAdminUserInput orderStatusEvents?: OrderStatusEventCreateNestedManyWithoutActorAdminUserInput @@ -55187,11 +70074,15 @@ export namespace Prisma { sentSmsMessages?: SmsMessageCreateNestedManyWithoutSentByAdminUserInput sentNotifications?: NotificationCreateNestedManyWithoutSentByAdminUserInput uploadedFiles?: UploadedFileCreateNestedManyWithoutUploadedByAdminUserInput + salesExpertProfile?: SalesExpertProfileCreateNestedOneWithoutAdminUserInput + sessions?: AdminSessionCreateNestedManyWithoutAdminUserInput } export type AdminUserUncheckedCreateWithoutSupervisedWorkshopsInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string passwordHash: string role: $Enums.AdminRole @@ -55200,7 +70091,13 @@ export namespace Prisma { wagePercent?: Decimal | DecimalJsLike | number | string | null isActive?: boolean createdAt?: Date | string + avatarFileId?: string | null + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null referredCustomers?: CustomerUncheckedCreateNestedManyWithoutReferredByAgentInput + creditedOrders?: OrderUncheckedCreateNestedManyWithoutSalesAgentInput branchAllocations?: BranchAllocationUncheckedCreateNestedManyWithoutAllocatorAdminUserInput postedLedgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutPostedByAdminUserInput orderStatusEvents?: OrderStatusEventUncheckedCreateNestedManyWithoutActorAdminUserInput @@ -55208,6 +70105,8 @@ export namespace Prisma { sentSmsMessages?: SmsMessageUncheckedCreateNestedManyWithoutSentByAdminUserInput sentNotifications?: NotificationUncheckedCreateNestedManyWithoutSentByAdminUserInput uploadedFiles?: UploadedFileUncheckedCreateNestedManyWithoutUploadedByAdminUserInput + salesExpertProfile?: SalesExpertProfileUncheckedCreateNestedOneWithoutAdminUserInput + sessions?: AdminSessionUncheckedCreateNestedManyWithoutAdminUserInput } export type AdminUserCreateOrConnectWithoutSupervisedWorkshopsInput = { @@ -55277,15 +70176,23 @@ export namespace Prisma { export type AdminUserUpdateWithoutSupervisedWorkshopsInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string passwordHash?: StringFieldUpdateOperationsInput | string role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null userType?: UserTypeUpdateOneWithoutAdminUsersNestedInput branch?: BranchUpdateOneWithoutAdminUsersNestedInput + avatarFile?: UploadedFileUpdateOneWithoutAdminUserAvatarsNestedInput referredCustomers?: CustomerUpdateManyWithoutReferredByAgentNestedInput + creditedOrders?: OrderUpdateManyWithoutSalesAgentNestedInput branchAllocations?: BranchAllocationUpdateManyWithoutAllocatorAdminUserNestedInput postedLedgerEntries?: LedgerEntryUpdateManyWithoutPostedByAdminUserNestedInput orderStatusEvents?: OrderStatusEventUpdateManyWithoutActorAdminUserNestedInput @@ -55293,11 +70200,15 @@ export namespace Prisma { sentSmsMessages?: SmsMessageUpdateManyWithoutSentByAdminUserNestedInput sentNotifications?: NotificationUpdateManyWithoutSentByAdminUserNestedInput uploadedFiles?: UploadedFileUpdateManyWithoutUploadedByAdminUserNestedInput + salesExpertProfile?: SalesExpertProfileUpdateOneWithoutAdminUserNestedInput + sessions?: AdminSessionUpdateManyWithoutAdminUserNestedInput } export type AdminUserUncheckedUpdateWithoutSupervisedWorkshopsInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string passwordHash?: StringFieldUpdateOperationsInput | string role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole @@ -55306,7 +70217,13 @@ export namespace Prisma { wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null referredCustomers?: CustomerUncheckedUpdateManyWithoutReferredByAgentNestedInput + creditedOrders?: OrderUncheckedUpdateManyWithoutSalesAgentNestedInput branchAllocations?: BranchAllocationUncheckedUpdateManyWithoutAllocatorAdminUserNestedInput postedLedgerEntries?: LedgerEntryUncheckedUpdateManyWithoutPostedByAdminUserNestedInput orderStatusEvents?: OrderStatusEventUncheckedUpdateManyWithoutActorAdminUserNestedInput @@ -55314,6 +70231,8 @@ export namespace Prisma { sentSmsMessages?: SmsMessageUncheckedUpdateManyWithoutSentByAdminUserNestedInput sentNotifications?: NotificationUncheckedUpdateManyWithoutSentByAdminUserNestedInput uploadedFiles?: UploadedFileUncheckedUpdateManyWithoutUploadedByAdminUserNestedInput + salesExpertProfile?: SalesExpertProfileUncheckedUpdateOneWithoutAdminUserNestedInput + sessions?: AdminSessionUncheckedUpdateManyWithoutAdminUserNestedInput } export type PreOrderUpsertWithWhereUniqueWithoutWorkshopInput = { @@ -55407,6 +70326,9 @@ export namespace Prisma { showType?: number isActive?: boolean createdAt?: Date | string + accountingStockWeight?: Decimal | DecimalJsLike | number | string | null + accountingStockCount?: Decimal | DecimalJsLike | number | string | null + accountingStockAt?: Date | string | null brand?: BrandCreateNestedOneWithoutProductsInput variants?: ProductVariantCreateNestedManyWithoutProductInput images?: ProductImageCreateNestedManyWithoutProductInput @@ -55414,6 +70336,7 @@ export namespace Prisma { comments?: CommentCreateNestedManyWithoutProductInput promotions?: PromotionCreateNestedManyWithoutProductInput allocationItems?: BranchAllocationItemCreateNestedManyWithoutProductInput + favoritedBy?: CustomerFavoriteCreateNestedManyWithoutProductInput } export type ProductUncheckedCreateWithoutCategoryInput = { @@ -55425,12 +70348,16 @@ export namespace Prisma { showType?: number isActive?: boolean createdAt?: Date | string + accountingStockWeight?: Decimal | DecimalJsLike | number | string | null + accountingStockCount?: Decimal | DecimalJsLike | number | string | null + accountingStockAt?: Date | string | null variants?: ProductVariantUncheckedCreateNestedManyWithoutProductInput images?: ProductImageUncheckedCreateNestedManyWithoutProductInput collections?: CollectionProductUncheckedCreateNestedManyWithoutProductInput comments?: CommentUncheckedCreateNestedManyWithoutProductInput promotions?: PromotionUncheckedCreateNestedManyWithoutProductInput allocationItems?: BranchAllocationItemUncheckedCreateNestedManyWithoutProductInput + favoritedBy?: CustomerFavoriteUncheckedCreateNestedManyWithoutProductInput } export type ProductCreateOrConnectWithoutCategoryInput = { @@ -55585,6 +70512,9 @@ export namespace Prisma { showType?: IntFilter<"Product"> | number isActive?: BoolFilter<"Product"> | boolean createdAt?: DateTimeFilter<"Product"> | Date | string + accountingStockWeight?: DecimalNullableFilter<"Product"> | Decimal | DecimalJsLike | number | string | null + accountingStockCount?: DecimalNullableFilter<"Product"> | Decimal | DecimalJsLike | number | string | null + accountingStockAt?: DateTimeNullableFilter<"Product"> | Date | string | null } export type PromotionUpsertWithWhereUniqueWithoutCategoryInput = { @@ -55611,6 +70541,9 @@ export namespace Prisma { showType?: number isActive?: boolean createdAt?: Date | string + accountingStockWeight?: Decimal | DecimalJsLike | number | string | null + accountingStockCount?: Decimal | DecimalJsLike | number | string | null + accountingStockAt?: Date | string | null category?: CategoryCreateNestedOneWithoutProductsInput variants?: ProductVariantCreateNestedManyWithoutProductInput images?: ProductImageCreateNestedManyWithoutProductInput @@ -55618,6 +70551,7 @@ export namespace Prisma { comments?: CommentCreateNestedManyWithoutProductInput promotions?: PromotionCreateNestedManyWithoutProductInput allocationItems?: BranchAllocationItemCreateNestedManyWithoutProductInput + favoritedBy?: CustomerFavoriteCreateNestedManyWithoutProductInput } export type ProductUncheckedCreateWithoutBrandInput = { @@ -55629,12 +70563,16 @@ export namespace Prisma { showType?: number isActive?: boolean createdAt?: Date | string + accountingStockWeight?: Decimal | DecimalJsLike | number | string | null + accountingStockCount?: Decimal | DecimalJsLike | number | string | null + accountingStockAt?: Date | string | null variants?: ProductVariantUncheckedCreateNestedManyWithoutProductInput images?: ProductImageUncheckedCreateNestedManyWithoutProductInput collections?: CollectionProductUncheckedCreateNestedManyWithoutProductInput comments?: CommentUncheckedCreateNestedManyWithoutProductInput promotions?: PromotionUncheckedCreateNestedManyWithoutProductInput allocationItems?: BranchAllocationItemUncheckedCreateNestedManyWithoutProductInput + favoritedBy?: CustomerFavoriteUncheckedCreateNestedManyWithoutProductInput } export type ProductCreateOrConnectWithoutBrandInput = { @@ -55794,6 +70732,9 @@ export namespace Prisma { showType?: number isActive?: boolean createdAt?: Date | string + accountingStockWeight?: Decimal | DecimalJsLike | number | string | null + accountingStockCount?: Decimal | DecimalJsLike | number | string | null + accountingStockAt?: Date | string | null category?: CategoryCreateNestedOneWithoutProductsInput brand?: BrandCreateNestedOneWithoutProductsInput variants?: ProductVariantCreateNestedManyWithoutProductInput @@ -55801,6 +70742,7 @@ export namespace Prisma { comments?: CommentCreateNestedManyWithoutProductInput promotions?: PromotionCreateNestedManyWithoutProductInput allocationItems?: BranchAllocationItemCreateNestedManyWithoutProductInput + favoritedBy?: CustomerFavoriteCreateNestedManyWithoutProductInput } export type ProductUncheckedCreateWithoutCollectionsInput = { @@ -55813,11 +70755,15 @@ export namespace Prisma { showType?: number isActive?: boolean createdAt?: Date | string + accountingStockWeight?: Decimal | DecimalJsLike | number | string | null + accountingStockCount?: Decimal | DecimalJsLike | number | string | null + accountingStockAt?: Date | string | null variants?: ProductVariantUncheckedCreateNestedManyWithoutProductInput images?: ProductImageUncheckedCreateNestedManyWithoutProductInput comments?: CommentUncheckedCreateNestedManyWithoutProductInput promotions?: PromotionUncheckedCreateNestedManyWithoutProductInput allocationItems?: BranchAllocationItemUncheckedCreateNestedManyWithoutProductInput + favoritedBy?: CustomerFavoriteUncheckedCreateNestedManyWithoutProductInput } export type ProductCreateOrConnectWithoutCollectionsInput = { @@ -55869,6 +70815,9 @@ export namespace Prisma { showType?: IntFieldUpdateOperationsInput | number isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + accountingStockWeight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockCount?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null category?: CategoryUpdateOneWithoutProductsNestedInput brand?: BrandUpdateOneWithoutProductsNestedInput variants?: ProductVariantUpdateManyWithoutProductNestedInput @@ -55876,6 +70825,7 @@ export namespace Prisma { comments?: CommentUpdateManyWithoutProductNestedInput promotions?: PromotionUpdateManyWithoutProductNestedInput allocationItems?: BranchAllocationItemUpdateManyWithoutProductNestedInput + favoritedBy?: CustomerFavoriteUpdateManyWithoutProductNestedInput } export type ProductUncheckedUpdateWithoutCollectionsInput = { @@ -55888,11 +70838,15 @@ export namespace Prisma { showType?: IntFieldUpdateOperationsInput | number isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + accountingStockWeight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockCount?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null variants?: ProductVariantUncheckedUpdateManyWithoutProductNestedInput images?: ProductImageUncheckedUpdateManyWithoutProductNestedInput comments?: CommentUncheckedUpdateManyWithoutProductNestedInput promotions?: PromotionUncheckedUpdateManyWithoutProductNestedInput allocationItems?: BranchAllocationItemUncheckedUpdateManyWithoutProductNestedInput + favoritedBy?: CustomerFavoriteUncheckedUpdateManyWithoutProductNestedInput } export type CategoryCreateWithoutProductsInput = { @@ -55952,6 +70906,7 @@ export namespace Prisma { qty?: number isPreOrder?: boolean isActive?: boolean + image?: ProductImageCreateNestedOneWithoutVariantsInput orderItems?: OrderItemCreateNestedManyWithoutProductVariantInput } @@ -55964,6 +70919,7 @@ export namespace Prisma { qty?: number isPreOrder?: boolean isActive?: boolean + imageId?: string | null orderItems?: OrderItemUncheckedCreateNestedManyWithoutProductVariantInput } @@ -55982,6 +70938,7 @@ export namespace Prisma { url: string sortOrder?: number role?: $Enums.ProductImageRole + variants?: ProductVariantCreateNestedManyWithoutImageInput } export type ProductImageUncheckedCreateWithoutProductInput = { @@ -55989,6 +70946,7 @@ export namespace Prisma { url: string sortOrder?: number role?: $Enums.ProductImageRole + variants?: ProductVariantUncheckedCreateNestedManyWithoutImageInput } export type ProductImageCreateOrConnectWithoutProductInput = { @@ -56119,6 +71077,26 @@ export namespace Prisma { skipDuplicates?: boolean } + export type CustomerFavoriteCreateWithoutProductInput = { + createdAt?: Date | string + customer: CustomerCreateNestedOneWithoutFavoritesInput + } + + export type CustomerFavoriteUncheckedCreateWithoutProductInput = { + customerId: string + createdAt?: Date | string + } + + export type CustomerFavoriteCreateOrConnectWithoutProductInput = { + where: CustomerFavoriteWhereUniqueInput + create: XOR + } + + export type CustomerFavoriteCreateManyProductInputEnvelope = { + data: CustomerFavoriteCreateManyProductInput | CustomerFavoriteCreateManyProductInput[] + skipDuplicates?: boolean + } + export type CategoryUpsertWithoutProductsInput = { update: XOR create: XOR @@ -56208,6 +71186,7 @@ export namespace Prisma { qty?: IntFilter<"ProductVariant"> | number isPreOrder?: BoolFilter<"ProductVariant"> | boolean isActive?: BoolFilter<"ProductVariant"> | boolean + imageId?: StringNullableFilter<"ProductVariant"> | string | null } export type ProductImageUpsertWithWhereUniqueWithoutProductInput = { @@ -56311,6 +71290,22 @@ export namespace Prisma { weightGrams?: DecimalNullableFilter<"BranchAllocationItem"> | Decimal | DecimalJsLike | number | string | null } + export type CustomerFavoriteUpsertWithWhereUniqueWithoutProductInput = { + where: CustomerFavoriteWhereUniqueInput + update: XOR + create: XOR + } + + export type CustomerFavoriteUpdateWithWhereUniqueWithoutProductInput = { + where: CustomerFavoriteWhereUniqueInput + data: XOR + } + + export type CustomerFavoriteUpdateManyWithWhereWithoutProductInput = { + where: CustomerFavoriteScalarWhereInput + data: XOR + } + export type ProductCreateWithoutImagesInput = { id?: string title: string @@ -56319,6 +71314,9 @@ export namespace Prisma { showType?: number isActive?: boolean createdAt?: Date | string + accountingStockWeight?: Decimal | DecimalJsLike | number | string | null + accountingStockCount?: Decimal | DecimalJsLike | number | string | null + accountingStockAt?: Date | string | null category?: CategoryCreateNestedOneWithoutProductsInput brand?: BrandCreateNestedOneWithoutProductsInput variants?: ProductVariantCreateNestedManyWithoutProductInput @@ -56326,6 +71324,7 @@ export namespace Prisma { comments?: CommentCreateNestedManyWithoutProductInput promotions?: PromotionCreateNestedManyWithoutProductInput allocationItems?: BranchAllocationItemCreateNestedManyWithoutProductInput + favoritedBy?: CustomerFavoriteCreateNestedManyWithoutProductInput } export type ProductUncheckedCreateWithoutImagesInput = { @@ -56338,11 +71337,15 @@ export namespace Prisma { showType?: number isActive?: boolean createdAt?: Date | string + accountingStockWeight?: Decimal | DecimalJsLike | number | string | null + accountingStockCount?: Decimal | DecimalJsLike | number | string | null + accountingStockAt?: Date | string | null variants?: ProductVariantUncheckedCreateNestedManyWithoutProductInput collections?: CollectionProductUncheckedCreateNestedManyWithoutProductInput comments?: CommentUncheckedCreateNestedManyWithoutProductInput promotions?: PromotionUncheckedCreateNestedManyWithoutProductInput allocationItems?: BranchAllocationItemUncheckedCreateNestedManyWithoutProductInput + favoritedBy?: CustomerFavoriteUncheckedCreateNestedManyWithoutProductInput } export type ProductCreateOrConnectWithoutImagesInput = { @@ -56350,6 +71353,42 @@ export namespace Prisma { create: XOR } + export type ProductVariantCreateWithoutImageInput = { + id?: string + title: string + sku?: string | null + rashWeightGrams: Decimal | DecimalJsLike | number | string + defaultWagePercent: Decimal | DecimalJsLike | number | string + qty?: number + isPreOrder?: boolean + isActive?: boolean + product: ProductCreateNestedOneWithoutVariantsInput + orderItems?: OrderItemCreateNestedManyWithoutProductVariantInput + } + + export type ProductVariantUncheckedCreateWithoutImageInput = { + id?: string + productId: string + title: string + sku?: string | null + rashWeightGrams: Decimal | DecimalJsLike | number | string + defaultWagePercent: Decimal | DecimalJsLike | number | string + qty?: number + isPreOrder?: boolean + isActive?: boolean + orderItems?: OrderItemUncheckedCreateNestedManyWithoutProductVariantInput + } + + export type ProductVariantCreateOrConnectWithoutImageInput = { + where: ProductVariantWhereUniqueInput + create: XOR + } + + export type ProductVariantCreateManyImageInputEnvelope = { + data: ProductVariantCreateManyImageInput | ProductVariantCreateManyImageInput[] + skipDuplicates?: boolean + } + export type ProductUpsertWithoutImagesInput = { update: XOR create: XOR @@ -56369,6 +71408,9 @@ export namespace Prisma { showType?: IntFieldUpdateOperationsInput | number isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + accountingStockWeight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockCount?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null category?: CategoryUpdateOneWithoutProductsNestedInput brand?: BrandUpdateOneWithoutProductsNestedInput variants?: ProductVariantUpdateManyWithoutProductNestedInput @@ -56376,6 +71418,7 @@ export namespace Prisma { comments?: CommentUpdateManyWithoutProductNestedInput promotions?: PromotionUpdateManyWithoutProductNestedInput allocationItems?: BranchAllocationItemUpdateManyWithoutProductNestedInput + favoritedBy?: CustomerFavoriteUpdateManyWithoutProductNestedInput } export type ProductUncheckedUpdateWithoutImagesInput = { @@ -56388,11 +71431,31 @@ export namespace Prisma { showType?: IntFieldUpdateOperationsInput | number isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + accountingStockWeight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockCount?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null variants?: ProductVariantUncheckedUpdateManyWithoutProductNestedInput collections?: CollectionProductUncheckedUpdateManyWithoutProductNestedInput comments?: CommentUncheckedUpdateManyWithoutProductNestedInput promotions?: PromotionUncheckedUpdateManyWithoutProductNestedInput allocationItems?: BranchAllocationItemUncheckedUpdateManyWithoutProductNestedInput + favoritedBy?: CustomerFavoriteUncheckedUpdateManyWithoutProductNestedInput + } + + export type ProductVariantUpsertWithWhereUniqueWithoutImageInput = { + where: ProductVariantWhereUniqueInput + update: XOR + create: XOR + } + + export type ProductVariantUpdateWithWhereUniqueWithoutImageInput = { + where: ProductVariantWhereUniqueInput + data: XOR + } + + export type ProductVariantUpdateManyWithWhereWithoutImageInput = { + where: ProductVariantScalarWhereInput + data: XOR } export type ProductCreateWithoutVariantsInput = { @@ -56403,6 +71466,9 @@ export namespace Prisma { showType?: number isActive?: boolean createdAt?: Date | string + accountingStockWeight?: Decimal | DecimalJsLike | number | string | null + accountingStockCount?: Decimal | DecimalJsLike | number | string | null + accountingStockAt?: Date | string | null category?: CategoryCreateNestedOneWithoutProductsInput brand?: BrandCreateNestedOneWithoutProductsInput images?: ProductImageCreateNestedManyWithoutProductInput @@ -56410,6 +71476,7 @@ export namespace Prisma { comments?: CommentCreateNestedManyWithoutProductInput promotions?: PromotionCreateNestedManyWithoutProductInput allocationItems?: BranchAllocationItemCreateNestedManyWithoutProductInput + favoritedBy?: CustomerFavoriteCreateNestedManyWithoutProductInput } export type ProductUncheckedCreateWithoutVariantsInput = { @@ -56422,11 +71489,15 @@ export namespace Prisma { showType?: number isActive?: boolean createdAt?: Date | string + accountingStockWeight?: Decimal | DecimalJsLike | number | string | null + accountingStockCount?: Decimal | DecimalJsLike | number | string | null + accountingStockAt?: Date | string | null images?: ProductImageUncheckedCreateNestedManyWithoutProductInput collections?: CollectionProductUncheckedCreateNestedManyWithoutProductInput comments?: CommentUncheckedCreateNestedManyWithoutProductInput promotions?: PromotionUncheckedCreateNestedManyWithoutProductInput allocationItems?: BranchAllocationItemUncheckedCreateNestedManyWithoutProductInput + favoritedBy?: CustomerFavoriteUncheckedCreateNestedManyWithoutProductInput } export type ProductCreateOrConnectWithoutVariantsInput = { @@ -56434,6 +71505,27 @@ export namespace Prisma { create: XOR } + export type ProductImageCreateWithoutVariantsInput = { + id?: string + url: string + sortOrder?: number + role?: $Enums.ProductImageRole + product: ProductCreateNestedOneWithoutImagesInput + } + + export type ProductImageUncheckedCreateWithoutVariantsInput = { + id?: string + productId: string + url: string + sortOrder?: number + role?: $Enums.ProductImageRole + } + + export type ProductImageCreateOrConnectWithoutVariantsInput = { + where: ProductImageWhereUniqueInput + create: XOR + } + export type OrderItemCreateWithoutProductVariantInput = { id?: string quantity: number @@ -56485,6 +71577,9 @@ export namespace Prisma { showType?: IntFieldUpdateOperationsInput | number isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + accountingStockWeight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockCount?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null category?: CategoryUpdateOneWithoutProductsNestedInput brand?: BrandUpdateOneWithoutProductsNestedInput images?: ProductImageUpdateManyWithoutProductNestedInput @@ -56492,6 +71587,7 @@ export namespace Prisma { comments?: CommentUpdateManyWithoutProductNestedInput promotions?: PromotionUpdateManyWithoutProductNestedInput allocationItems?: BranchAllocationItemUpdateManyWithoutProductNestedInput + favoritedBy?: CustomerFavoriteUpdateManyWithoutProductNestedInput } export type ProductUncheckedUpdateWithoutVariantsInput = { @@ -56504,11 +71600,42 @@ export namespace Prisma { showType?: IntFieldUpdateOperationsInput | number isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + accountingStockWeight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockCount?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null images?: ProductImageUncheckedUpdateManyWithoutProductNestedInput collections?: CollectionProductUncheckedUpdateManyWithoutProductNestedInput comments?: CommentUncheckedUpdateManyWithoutProductNestedInput promotions?: PromotionUncheckedUpdateManyWithoutProductNestedInput allocationItems?: BranchAllocationItemUncheckedUpdateManyWithoutProductNestedInput + favoritedBy?: CustomerFavoriteUncheckedUpdateManyWithoutProductNestedInput + } + + export type ProductImageUpsertWithoutVariantsInput = { + update: XOR + create: XOR + where?: ProductImageWhereInput + } + + export type ProductImageUpdateToOneWithWhereWithoutVariantsInput = { + where?: ProductImageWhereInput + data: XOR + } + + export type ProductImageUpdateWithoutVariantsInput = { + id?: StringFieldUpdateOperationsInput | string + url?: StringFieldUpdateOperationsInput | string + sortOrder?: IntFieldUpdateOperationsInput | number + role?: EnumProductImageRoleFieldUpdateOperationsInput | $Enums.ProductImageRole + product?: ProductUpdateOneRequiredWithoutImagesNestedInput + } + + export type ProductImageUncheckedUpdateWithoutVariantsInput = { + id?: StringFieldUpdateOperationsInput | string + productId?: StringFieldUpdateOperationsInput | string + url?: StringFieldUpdateOperationsInput | string + sortOrder?: IntFieldUpdateOperationsInput | number + role?: EnumProductImageRoleFieldUpdateOperationsInput | $Enums.ProductImageRole } export type OrderItemUpsertWithWhereUniqueWithoutProductVariantInput = { @@ -56545,9 +71672,12 @@ export namespace Prisma { export type CustomerCreateWithoutOrdersInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string - nationalCode: string + nationalCode?: string | null passwordHash: string + cityNameRaw?: string | null kind?: $Enums.CustomerKind phone?: string | null address?: string | null @@ -56558,10 +71688,17 @@ export namespace Prisma { goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string goldDebtGrams?: Decimal | DecimalJsLike | number | string fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string verificationStep?: $Enums.VerificationStep nationalIdImageUrl?: string | null businessLicenseUrl?: string | null shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null canPlaceOrders?: boolean isActive?: boolean isArchived?: boolean @@ -56569,6 +71706,8 @@ export namespace Prisma { updatedAt?: Date | string city?: CityCreateNestedOneWithoutCustomersInput referredByAgent?: AdminUserCreateNestedOneWithoutReferredCustomersInput + salesExpertTradingFor?: SalesExpertProfileCreateNestedOneWithoutTradingCustomerInput + referredOrders?: OrderCreateNestedManyWithoutReferrerCustomerInput avatarFile?: UploadedFileCreateNestedOneWithoutCustomerAvatarsInput addresses?: CustomerAddressCreateNestedManyWithoutCustomerInput preOrders?: PreOrderCreateNestedManyWithoutCustomerInput @@ -56578,15 +71717,20 @@ export namespace Prisma { promotions?: PromotionCreateNestedManyWithoutCustomerInput notifications?: NotificationRecipientCreateNestedManyWithoutCustomerInput activityLogs?: CustomerActivityLogCreateNestedManyWithoutCustomerInput + otpChallenges?: CustomerOtpCreateNestedManyWithoutCustomerInput + favorites?: CustomerFavoriteCreateNestedManyWithoutCustomerInput } export type CustomerUncheckedCreateWithoutOrdersInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string - nationalCode: string + nationalCode?: string | null passwordHash: string cityId?: string | null + cityNameRaw?: string | null kind?: $Enums.CustomerKind phone?: string | null address?: string | null @@ -56598,16 +71742,25 @@ export namespace Prisma { goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string goldDebtGrams?: Decimal | DecimalJsLike | number | string fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string verificationStep?: $Enums.VerificationStep nationalIdImageUrl?: string | null businessLicenseUrl?: string | null shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null avatarFileId?: string | null canPlaceOrders?: boolean isActive?: boolean isArchived?: boolean createdAt?: Date | string updatedAt?: Date | string + salesExpertTradingFor?: SalesExpertProfileUncheckedCreateNestedOneWithoutTradingCustomerInput + referredOrders?: OrderUncheckedCreateNestedManyWithoutReferrerCustomerInput addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCustomerInput preOrders?: PreOrderUncheckedCreateNestedManyWithoutCustomerInput ledgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutCustomerInput @@ -56616,6 +71769,8 @@ export namespace Prisma { promotions?: PromotionUncheckedCreateNestedManyWithoutCustomerInput notifications?: NotificationRecipientUncheckedCreateNestedManyWithoutCustomerInput activityLogs?: CustomerActivityLogUncheckedCreateNestedManyWithoutCustomerInput + otpChallenges?: CustomerOtpUncheckedCreateNestedManyWithoutCustomerInput + favorites?: CustomerFavoriteUncheckedCreateNestedManyWithoutCustomerInput } export type CustomerCreateOrConnectWithoutOrdersInput = { @@ -56650,6 +71805,182 @@ export namespace Prisma { create: XOR } + export type AdminUserCreateWithoutCreditedOrdersInput = { + id?: string + fullName: string + firstName?: string | null + lastName?: string | null + mobile: string + passwordHash: string + role: $Enums.AdminRole + wagePercent?: Decimal | DecimalJsLike | number | string | null + isActive?: boolean + createdAt?: Date | string + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null + userType?: UserTypeCreateNestedOneWithoutAdminUsersInput + branch?: BranchCreateNestedOneWithoutAdminUsersInput + avatarFile?: UploadedFileCreateNestedOneWithoutAdminUserAvatarsInput + referredCustomers?: CustomerCreateNestedManyWithoutReferredByAgentInput + supervisedWorkshops?: WorkshopCreateNestedManyWithoutSupervisorInput + branchAllocations?: BranchAllocationCreateNestedManyWithoutAllocatorAdminUserInput + postedLedgerEntries?: LedgerEntryCreateNestedManyWithoutPostedByAdminUserInput + orderStatusEvents?: OrderStatusEventCreateNestedManyWithoutActorAdminUserInput + preOrderStatusEvents?: PreOrderStatusEventCreateNestedManyWithoutActorAdminUserInput + sentSmsMessages?: SmsMessageCreateNestedManyWithoutSentByAdminUserInput + sentNotifications?: NotificationCreateNestedManyWithoutSentByAdminUserInput + uploadedFiles?: UploadedFileCreateNestedManyWithoutUploadedByAdminUserInput + salesExpertProfile?: SalesExpertProfileCreateNestedOneWithoutAdminUserInput + sessions?: AdminSessionCreateNestedManyWithoutAdminUserInput + } + + export type AdminUserUncheckedCreateWithoutCreditedOrdersInput = { + id?: string + fullName: string + firstName?: string | null + lastName?: string | null + mobile: string + passwordHash: string + role: $Enums.AdminRole + userTypeId?: number | null + branchId?: string | null + wagePercent?: Decimal | DecimalJsLike | number | string | null + isActive?: boolean + createdAt?: Date | string + avatarFileId?: string | null + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null + referredCustomers?: CustomerUncheckedCreateNestedManyWithoutReferredByAgentInput + supervisedWorkshops?: WorkshopUncheckedCreateNestedManyWithoutSupervisorInput + branchAllocations?: BranchAllocationUncheckedCreateNestedManyWithoutAllocatorAdminUserInput + postedLedgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutPostedByAdminUserInput + orderStatusEvents?: OrderStatusEventUncheckedCreateNestedManyWithoutActorAdminUserInput + preOrderStatusEvents?: PreOrderStatusEventUncheckedCreateNestedManyWithoutActorAdminUserInput + sentSmsMessages?: SmsMessageUncheckedCreateNestedManyWithoutSentByAdminUserInput + sentNotifications?: NotificationUncheckedCreateNestedManyWithoutSentByAdminUserInput + uploadedFiles?: UploadedFileUncheckedCreateNestedManyWithoutUploadedByAdminUserInput + salesExpertProfile?: SalesExpertProfileUncheckedCreateNestedOneWithoutAdminUserInput + sessions?: AdminSessionUncheckedCreateNestedManyWithoutAdminUserInput + } + + export type AdminUserCreateOrConnectWithoutCreditedOrdersInput = { + where: AdminUserWhereUniqueInput + create: XOR + } + + export type CustomerCreateWithoutReferredOrdersInput = { + id?: string + fullName: string + firstName?: string | null + lastName?: string | null + mobile: string + nationalCode?: string | null + passwordHash: string + cityNameRaw?: string | null + kind?: $Enums.CustomerKind + phone?: string | null + address?: string | null + storeName?: string | null + pasazhName?: string | null + zone?: string | null + memberCode?: string | null + goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string + goldDebtGrams?: Decimal | DecimalJsLike | number | string + fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string + verificationStep?: $Enums.VerificationStep + nationalIdImageUrl?: string | null + businessLicenseUrl?: string | null + shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null + canPlaceOrders?: boolean + isActive?: boolean + isArchived?: boolean + createdAt?: Date | string + updatedAt?: Date | string + city?: CityCreateNestedOneWithoutCustomersInput + referredByAgent?: AdminUserCreateNestedOneWithoutReferredCustomersInput + salesExpertTradingFor?: SalesExpertProfileCreateNestedOneWithoutTradingCustomerInput + avatarFile?: UploadedFileCreateNestedOneWithoutCustomerAvatarsInput + addresses?: CustomerAddressCreateNestedManyWithoutCustomerInput + orders?: OrderCreateNestedManyWithoutCustomerInput + preOrders?: PreOrderCreateNestedManyWithoutCustomerInput + ledgerEntries?: LedgerEntryCreateNestedManyWithoutCustomerInput + walletBonuses?: WalletBonusCreateNestedManyWithoutCustomerInput + comments?: CommentCreateNestedManyWithoutCustomerInput + promotions?: PromotionCreateNestedManyWithoutCustomerInput + notifications?: NotificationRecipientCreateNestedManyWithoutCustomerInput + activityLogs?: CustomerActivityLogCreateNestedManyWithoutCustomerInput + otpChallenges?: CustomerOtpCreateNestedManyWithoutCustomerInput + favorites?: CustomerFavoriteCreateNestedManyWithoutCustomerInput + } + + export type CustomerUncheckedCreateWithoutReferredOrdersInput = { + id?: string + fullName: string + firstName?: string | null + lastName?: string | null + mobile: string + nationalCode?: string | null + passwordHash: string + cityId?: string | null + cityNameRaw?: string | null + kind?: $Enums.CustomerKind + phone?: string | null + address?: string | null + storeName?: string | null + pasazhName?: string | null + zone?: string | null + memberCode?: string | null + referredByAgentId?: string | null + goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string + goldDebtGrams?: Decimal | DecimalJsLike | number | string + fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string + verificationStep?: $Enums.VerificationStep + nationalIdImageUrl?: string | null + businessLicenseUrl?: string | null + shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null + avatarFileId?: string | null + canPlaceOrders?: boolean + isActive?: boolean + isArchived?: boolean + createdAt?: Date | string + updatedAt?: Date | string + salesExpertTradingFor?: SalesExpertProfileUncheckedCreateNestedOneWithoutTradingCustomerInput + addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCustomerInput + orders?: OrderUncheckedCreateNestedManyWithoutCustomerInput + preOrders?: PreOrderUncheckedCreateNestedManyWithoutCustomerInput + ledgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutCustomerInput + walletBonuses?: WalletBonusUncheckedCreateNestedManyWithoutCustomerInput + comments?: CommentUncheckedCreateNestedManyWithoutCustomerInput + promotions?: PromotionUncheckedCreateNestedManyWithoutCustomerInput + notifications?: NotificationRecipientUncheckedCreateNestedManyWithoutCustomerInput + activityLogs?: CustomerActivityLogUncheckedCreateNestedManyWithoutCustomerInput + otpChallenges?: CustomerOtpUncheckedCreateNestedManyWithoutCustomerInput + favorites?: CustomerFavoriteUncheckedCreateNestedManyWithoutCustomerInput + } + + export type CustomerCreateOrConnectWithoutReferredOrdersInput = { + where: CustomerWhereUniqueInput + create: XOR + } + export type OrderItemCreateWithoutOrderInput = { id?: string quantity: number @@ -56825,9 +72156,12 @@ export namespace Prisma { export type CustomerUpdateWithoutOrdersInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string - nationalCode?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null passwordHash?: StringFieldUpdateOperationsInput | string + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind phone?: NullableStringFieldUpdateOperationsInput | string | null address?: NullableStringFieldUpdateOperationsInput | string | null @@ -56838,10 +72172,17 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean isArchived?: BoolFieldUpdateOperationsInput | boolean @@ -56849,6 +72190,8 @@ export namespace Prisma { updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string city?: CityUpdateOneWithoutCustomersNestedInput referredByAgent?: AdminUserUpdateOneWithoutReferredCustomersNestedInput + salesExpertTradingFor?: SalesExpertProfileUpdateOneWithoutTradingCustomerNestedInput + referredOrders?: OrderUpdateManyWithoutReferrerCustomerNestedInput avatarFile?: UploadedFileUpdateOneWithoutCustomerAvatarsNestedInput addresses?: CustomerAddressUpdateManyWithoutCustomerNestedInput preOrders?: PreOrderUpdateManyWithoutCustomerNestedInput @@ -56858,15 +72201,20 @@ export namespace Prisma { promotions?: PromotionUpdateManyWithoutCustomerNestedInput notifications?: NotificationRecipientUpdateManyWithoutCustomerNestedInput activityLogs?: CustomerActivityLogUpdateManyWithoutCustomerNestedInput + otpChallenges?: CustomerOtpUpdateManyWithoutCustomerNestedInput + favorites?: CustomerFavoriteUpdateManyWithoutCustomerNestedInput } export type CustomerUncheckedUpdateWithoutOrdersInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string - nationalCode?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null passwordHash?: StringFieldUpdateOperationsInput | string cityId?: NullableStringFieldUpdateOperationsInput | string | null + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind phone?: NullableStringFieldUpdateOperationsInput | string | null address?: NullableStringFieldUpdateOperationsInput | string | null @@ -56878,16 +72226,25 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean isArchived?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + salesExpertTradingFor?: SalesExpertProfileUncheckedUpdateOneWithoutTradingCustomerNestedInput + referredOrders?: OrderUncheckedUpdateManyWithoutReferrerCustomerNestedInput addresses?: CustomerAddressUncheckedUpdateManyWithoutCustomerNestedInput preOrders?: PreOrderUncheckedUpdateManyWithoutCustomerNestedInput ledgerEntries?: LedgerEntryUncheckedUpdateManyWithoutCustomerNestedInput @@ -56896,6 +72253,8 @@ export namespace Prisma { promotions?: PromotionUncheckedUpdateManyWithoutCustomerNestedInput notifications?: NotificationRecipientUncheckedUpdateManyWithoutCustomerNestedInput activityLogs?: CustomerActivityLogUncheckedUpdateManyWithoutCustomerNestedInput + otpChallenges?: CustomerOtpUncheckedUpdateManyWithoutCustomerNestedInput + favorites?: CustomerFavoriteUncheckedUpdateManyWithoutCustomerNestedInput } export type BranchUpsertWithoutOrdersInput = { @@ -56931,6 +72290,194 @@ export namespace Prisma { allocations?: BranchAllocationUncheckedUpdateManyWithoutBranchNestedInput } + export type AdminUserUpsertWithoutCreditedOrdersInput = { + update: XOR + create: XOR + where?: AdminUserWhereInput + } + + export type AdminUserUpdateToOneWithWhereWithoutCreditedOrdersInput = { + where?: AdminUserWhereInput + data: XOR + } + + export type AdminUserUpdateWithoutCreditedOrdersInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null + mobile?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole + wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null + userType?: UserTypeUpdateOneWithoutAdminUsersNestedInput + branch?: BranchUpdateOneWithoutAdminUsersNestedInput + avatarFile?: UploadedFileUpdateOneWithoutAdminUserAvatarsNestedInput + referredCustomers?: CustomerUpdateManyWithoutReferredByAgentNestedInput + supervisedWorkshops?: WorkshopUpdateManyWithoutSupervisorNestedInput + branchAllocations?: BranchAllocationUpdateManyWithoutAllocatorAdminUserNestedInput + postedLedgerEntries?: LedgerEntryUpdateManyWithoutPostedByAdminUserNestedInput + orderStatusEvents?: OrderStatusEventUpdateManyWithoutActorAdminUserNestedInput + preOrderStatusEvents?: PreOrderStatusEventUpdateManyWithoutActorAdminUserNestedInput + sentSmsMessages?: SmsMessageUpdateManyWithoutSentByAdminUserNestedInput + sentNotifications?: NotificationUpdateManyWithoutSentByAdminUserNestedInput + uploadedFiles?: UploadedFileUpdateManyWithoutUploadedByAdminUserNestedInput + salesExpertProfile?: SalesExpertProfileUpdateOneWithoutAdminUserNestedInput + sessions?: AdminSessionUpdateManyWithoutAdminUserNestedInput + } + + export type AdminUserUncheckedUpdateWithoutCreditedOrdersInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null + mobile?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole + userTypeId?: NullableIntFieldUpdateOperationsInput | number | null + branchId?: NullableStringFieldUpdateOperationsInput | string | null + wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null + referredCustomers?: CustomerUncheckedUpdateManyWithoutReferredByAgentNestedInput + supervisedWorkshops?: WorkshopUncheckedUpdateManyWithoutSupervisorNestedInput + branchAllocations?: BranchAllocationUncheckedUpdateManyWithoutAllocatorAdminUserNestedInput + postedLedgerEntries?: LedgerEntryUncheckedUpdateManyWithoutPostedByAdminUserNestedInput + orderStatusEvents?: OrderStatusEventUncheckedUpdateManyWithoutActorAdminUserNestedInput + preOrderStatusEvents?: PreOrderStatusEventUncheckedUpdateManyWithoutActorAdminUserNestedInput + sentSmsMessages?: SmsMessageUncheckedUpdateManyWithoutSentByAdminUserNestedInput + sentNotifications?: NotificationUncheckedUpdateManyWithoutSentByAdminUserNestedInput + uploadedFiles?: UploadedFileUncheckedUpdateManyWithoutUploadedByAdminUserNestedInput + salesExpertProfile?: SalesExpertProfileUncheckedUpdateOneWithoutAdminUserNestedInput + sessions?: AdminSessionUncheckedUpdateManyWithoutAdminUserNestedInput + } + + export type CustomerUpsertWithoutReferredOrdersInput = { + update: XOR + create: XOR + where?: CustomerWhereInput + } + + export type CustomerUpdateToOneWithWhereWithoutReferredOrdersInput = { + where?: CustomerWhereInput + data: XOR + } + + export type CustomerUpdateWithoutReferredOrdersInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null + mobile?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null + passwordHash?: StringFieldUpdateOperationsInput | string + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null + kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind + phone?: NullableStringFieldUpdateOperationsInput | string | null + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + zone?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null + goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep + nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null + shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean + isActive?: BoolFieldUpdateOperationsInput | boolean + isArchived?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + city?: CityUpdateOneWithoutCustomersNestedInput + referredByAgent?: AdminUserUpdateOneWithoutReferredCustomersNestedInput + salesExpertTradingFor?: SalesExpertProfileUpdateOneWithoutTradingCustomerNestedInput + avatarFile?: UploadedFileUpdateOneWithoutCustomerAvatarsNestedInput + addresses?: CustomerAddressUpdateManyWithoutCustomerNestedInput + orders?: OrderUpdateManyWithoutCustomerNestedInput + preOrders?: PreOrderUpdateManyWithoutCustomerNestedInput + ledgerEntries?: LedgerEntryUpdateManyWithoutCustomerNestedInput + walletBonuses?: WalletBonusUpdateManyWithoutCustomerNestedInput + comments?: CommentUpdateManyWithoutCustomerNestedInput + promotions?: PromotionUpdateManyWithoutCustomerNestedInput + notifications?: NotificationRecipientUpdateManyWithoutCustomerNestedInput + activityLogs?: CustomerActivityLogUpdateManyWithoutCustomerNestedInput + otpChallenges?: CustomerOtpUpdateManyWithoutCustomerNestedInput + favorites?: CustomerFavoriteUpdateManyWithoutCustomerNestedInput + } + + export type CustomerUncheckedUpdateWithoutReferredOrdersInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null + mobile?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null + passwordHash?: StringFieldUpdateOperationsInput | string + cityId?: NullableStringFieldUpdateOperationsInput | string | null + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null + kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind + phone?: NullableStringFieldUpdateOperationsInput | string | null + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + zone?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null + referredByAgentId?: NullableStringFieldUpdateOperationsInput | string | null + goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep + nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null + shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null + canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean + isActive?: BoolFieldUpdateOperationsInput | boolean + isArchived?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + salesExpertTradingFor?: SalesExpertProfileUncheckedUpdateOneWithoutTradingCustomerNestedInput + addresses?: CustomerAddressUncheckedUpdateManyWithoutCustomerNestedInput + orders?: OrderUncheckedUpdateManyWithoutCustomerNestedInput + preOrders?: PreOrderUncheckedUpdateManyWithoutCustomerNestedInput + ledgerEntries?: LedgerEntryUncheckedUpdateManyWithoutCustomerNestedInput + walletBonuses?: WalletBonusUncheckedUpdateManyWithoutCustomerNestedInput + comments?: CommentUncheckedUpdateManyWithoutCustomerNestedInput + promotions?: PromotionUncheckedUpdateManyWithoutCustomerNestedInput + notifications?: NotificationRecipientUncheckedUpdateManyWithoutCustomerNestedInput + activityLogs?: CustomerActivityLogUncheckedUpdateManyWithoutCustomerNestedInput + otpChallenges?: CustomerOtpUncheckedUpdateManyWithoutCustomerNestedInput + favorites?: CustomerFavoriteUncheckedUpdateManyWithoutCustomerNestedInput + } + export type OrderItemUpsertWithWhereUniqueWithoutOrderInput = { where: OrderItemWhereUniqueInput update: XOR @@ -57042,6 +72589,8 @@ export namespace Prisma { updatedAt?: Date | string customer: CustomerCreateNestedOneWithoutOrdersInput branch?: BranchCreateNestedOneWithoutOrdersInput + salesAgent?: AdminUserCreateNestedOneWithoutCreditedOrdersInput + referrerCustomer?: CustomerCreateNestedOneWithoutReferredOrdersInput statusEvents?: OrderStatusEventCreateNestedManyWithoutOrderInput ledgerEntries?: LedgerEntryCreateNestedManyWithoutOrderInput convertedFromPreOrder?: PreOrderCreateNestedOneWithoutConvertedOrderInput @@ -57059,6 +72608,8 @@ export namespace Prisma { flatRialCharge?: Decimal | DecimalJsLike | number | string isSuspendedOverCreditLimit?: boolean deliveredAt?: Date | string | null + salesAgentId?: string | null + referrerCustomerId?: string | null createdAt?: Date | string updatedAt?: Date | string statusEvents?: OrderStatusEventUncheckedCreateNestedManyWithoutOrderInput @@ -57081,6 +72632,7 @@ export namespace Prisma { isPreOrder?: boolean isActive?: boolean product: ProductCreateNestedOneWithoutVariantsInput + image?: ProductImageCreateNestedOneWithoutVariantsInput } export type ProductVariantUncheckedCreateWithoutOrderItemsInput = { @@ -57093,6 +72645,7 @@ export namespace Prisma { qty?: number isPreOrder?: boolean isActive?: boolean + imageId?: string | null } export type ProductVariantCreateOrConnectWithoutOrderItemsInput = { @@ -57125,6 +72678,8 @@ export namespace Prisma { updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string customer?: CustomerUpdateOneRequiredWithoutOrdersNestedInput branch?: BranchUpdateOneWithoutOrdersNestedInput + salesAgent?: AdminUserUpdateOneWithoutCreditedOrdersNestedInput + referrerCustomer?: CustomerUpdateOneWithoutReferredOrdersNestedInput statusEvents?: OrderStatusEventUpdateManyWithoutOrderNestedInput ledgerEntries?: LedgerEntryUpdateManyWithoutOrderNestedInput convertedFromPreOrder?: PreOrderUpdateOneWithoutConvertedOrderNestedInput @@ -57142,6 +72697,8 @@ export namespace Prisma { flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + salesAgentId?: NullableStringFieldUpdateOperationsInput | string | null + referrerCustomerId?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string statusEvents?: OrderStatusEventUncheckedUpdateManyWithoutOrderNestedInput @@ -57170,6 +72727,7 @@ export namespace Prisma { isPreOrder?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean product?: ProductUpdateOneRequiredWithoutVariantsNestedInput + image?: ProductImageUpdateOneWithoutVariantsNestedInput } export type ProductVariantUncheckedUpdateWithoutOrderItemsInput = { @@ -57182,6 +72740,7 @@ export namespace Prisma { qty?: IntFieldUpdateOperationsInput | number isPreOrder?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean + imageId?: NullableStringFieldUpdateOperationsInput | string | null } export type OrderCreateWithoutStatusEventsInput = { @@ -57198,6 +72757,8 @@ export namespace Prisma { updatedAt?: Date | string customer: CustomerCreateNestedOneWithoutOrdersInput branch?: BranchCreateNestedOneWithoutOrdersInput + salesAgent?: AdminUserCreateNestedOneWithoutCreditedOrdersInput + referrerCustomer?: CustomerCreateNestedOneWithoutReferredOrdersInput items?: OrderItemCreateNestedManyWithoutOrderInput ledgerEntries?: LedgerEntryCreateNestedManyWithoutOrderInput convertedFromPreOrder?: PreOrderCreateNestedOneWithoutConvertedOrderInput @@ -57215,6 +72776,8 @@ export namespace Prisma { flatRialCharge?: Decimal | DecimalJsLike | number | string isSuspendedOverCreditLimit?: boolean deliveredAt?: Date | string | null + salesAgentId?: string | null + referrerCustomerId?: string | null createdAt?: Date | string updatedAt?: Date | string items?: OrderItemUncheckedCreateNestedManyWithoutOrderInput @@ -57230,15 +72793,23 @@ export namespace Prisma { export type AdminUserCreateWithoutOrderStatusEventsInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string passwordHash: string role: $Enums.AdminRole wagePercent?: Decimal | DecimalJsLike | number | string | null isActive?: boolean createdAt?: Date | string + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null userType?: UserTypeCreateNestedOneWithoutAdminUsersInput branch?: BranchCreateNestedOneWithoutAdminUsersInput + avatarFile?: UploadedFileCreateNestedOneWithoutAdminUserAvatarsInput referredCustomers?: CustomerCreateNestedManyWithoutReferredByAgentInput + creditedOrders?: OrderCreateNestedManyWithoutSalesAgentInput supervisedWorkshops?: WorkshopCreateNestedManyWithoutSupervisorInput branchAllocations?: BranchAllocationCreateNestedManyWithoutAllocatorAdminUserInput postedLedgerEntries?: LedgerEntryCreateNestedManyWithoutPostedByAdminUserInput @@ -57246,11 +72817,15 @@ export namespace Prisma { sentSmsMessages?: SmsMessageCreateNestedManyWithoutSentByAdminUserInput sentNotifications?: NotificationCreateNestedManyWithoutSentByAdminUserInput uploadedFiles?: UploadedFileCreateNestedManyWithoutUploadedByAdminUserInput + salesExpertProfile?: SalesExpertProfileCreateNestedOneWithoutAdminUserInput + sessions?: AdminSessionCreateNestedManyWithoutAdminUserInput } export type AdminUserUncheckedCreateWithoutOrderStatusEventsInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string passwordHash: string role: $Enums.AdminRole @@ -57259,7 +72834,13 @@ export namespace Prisma { wagePercent?: Decimal | DecimalJsLike | number | string | null isActive?: boolean createdAt?: Date | string + avatarFileId?: string | null + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null referredCustomers?: CustomerUncheckedCreateNestedManyWithoutReferredByAgentInput + creditedOrders?: OrderUncheckedCreateNestedManyWithoutSalesAgentInput supervisedWorkshops?: WorkshopUncheckedCreateNestedManyWithoutSupervisorInput branchAllocations?: BranchAllocationUncheckedCreateNestedManyWithoutAllocatorAdminUserInput postedLedgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutPostedByAdminUserInput @@ -57267,6 +72848,8 @@ export namespace Prisma { sentSmsMessages?: SmsMessageUncheckedCreateNestedManyWithoutSentByAdminUserInput sentNotifications?: NotificationUncheckedCreateNestedManyWithoutSentByAdminUserInput uploadedFiles?: UploadedFileUncheckedCreateNestedManyWithoutUploadedByAdminUserInput + salesExpertProfile?: SalesExpertProfileUncheckedCreateNestedOneWithoutAdminUserInput + sessions?: AdminSessionUncheckedCreateNestedManyWithoutAdminUserInput } export type AdminUserCreateOrConnectWithoutOrderStatusEventsInput = { @@ -57299,6 +72882,8 @@ export namespace Prisma { updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string customer?: CustomerUpdateOneRequiredWithoutOrdersNestedInput branch?: BranchUpdateOneWithoutOrdersNestedInput + salesAgent?: AdminUserUpdateOneWithoutCreditedOrdersNestedInput + referrerCustomer?: CustomerUpdateOneWithoutReferredOrdersNestedInput items?: OrderItemUpdateManyWithoutOrderNestedInput ledgerEntries?: LedgerEntryUpdateManyWithoutOrderNestedInput convertedFromPreOrder?: PreOrderUpdateOneWithoutConvertedOrderNestedInput @@ -57316,6 +72901,8 @@ export namespace Prisma { flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + salesAgentId?: NullableStringFieldUpdateOperationsInput | string | null + referrerCustomerId?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string items?: OrderItemUncheckedUpdateManyWithoutOrderNestedInput @@ -57337,15 +72924,23 @@ export namespace Prisma { export type AdminUserUpdateWithoutOrderStatusEventsInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string passwordHash?: StringFieldUpdateOperationsInput | string role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null userType?: UserTypeUpdateOneWithoutAdminUsersNestedInput branch?: BranchUpdateOneWithoutAdminUsersNestedInput + avatarFile?: UploadedFileUpdateOneWithoutAdminUserAvatarsNestedInput referredCustomers?: CustomerUpdateManyWithoutReferredByAgentNestedInput + creditedOrders?: OrderUpdateManyWithoutSalesAgentNestedInput supervisedWorkshops?: WorkshopUpdateManyWithoutSupervisorNestedInput branchAllocations?: BranchAllocationUpdateManyWithoutAllocatorAdminUserNestedInput postedLedgerEntries?: LedgerEntryUpdateManyWithoutPostedByAdminUserNestedInput @@ -57353,11 +72948,15 @@ export namespace Prisma { sentSmsMessages?: SmsMessageUpdateManyWithoutSentByAdminUserNestedInput sentNotifications?: NotificationUpdateManyWithoutSentByAdminUserNestedInput uploadedFiles?: UploadedFileUpdateManyWithoutUploadedByAdminUserNestedInput + salesExpertProfile?: SalesExpertProfileUpdateOneWithoutAdminUserNestedInput + sessions?: AdminSessionUpdateManyWithoutAdminUserNestedInput } export type AdminUserUncheckedUpdateWithoutOrderStatusEventsInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string passwordHash?: StringFieldUpdateOperationsInput | string role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole @@ -57366,7 +72965,13 @@ export namespace Prisma { wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null referredCustomers?: CustomerUncheckedUpdateManyWithoutReferredByAgentNestedInput + creditedOrders?: OrderUncheckedUpdateManyWithoutSalesAgentNestedInput supervisedWorkshops?: WorkshopUncheckedUpdateManyWithoutSupervisorNestedInput branchAllocations?: BranchAllocationUncheckedUpdateManyWithoutAllocatorAdminUserNestedInput postedLedgerEntries?: LedgerEntryUncheckedUpdateManyWithoutPostedByAdminUserNestedInput @@ -57374,14 +72979,19 @@ export namespace Prisma { sentSmsMessages?: SmsMessageUncheckedUpdateManyWithoutSentByAdminUserNestedInput sentNotifications?: NotificationUncheckedUpdateManyWithoutSentByAdminUserNestedInput uploadedFiles?: UploadedFileUncheckedUpdateManyWithoutUploadedByAdminUserNestedInput + salesExpertProfile?: SalesExpertProfileUncheckedUpdateOneWithoutAdminUserNestedInput + sessions?: AdminSessionUncheckedUpdateManyWithoutAdminUserNestedInput } export type CustomerCreateWithoutPreOrdersInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string - nationalCode: string + nationalCode?: string | null passwordHash: string + cityNameRaw?: string | null kind?: $Enums.CustomerKind phone?: string | null address?: string | null @@ -57392,10 +73002,17 @@ export namespace Prisma { goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string goldDebtGrams?: Decimal | DecimalJsLike | number | string fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string verificationStep?: $Enums.VerificationStep nationalIdImageUrl?: string | null businessLicenseUrl?: string | null shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null canPlaceOrders?: boolean isActive?: boolean isArchived?: boolean @@ -57403,6 +73020,8 @@ export namespace Prisma { updatedAt?: Date | string city?: CityCreateNestedOneWithoutCustomersInput referredByAgent?: AdminUserCreateNestedOneWithoutReferredCustomersInput + salesExpertTradingFor?: SalesExpertProfileCreateNestedOneWithoutTradingCustomerInput + referredOrders?: OrderCreateNestedManyWithoutReferrerCustomerInput avatarFile?: UploadedFileCreateNestedOneWithoutCustomerAvatarsInput addresses?: CustomerAddressCreateNestedManyWithoutCustomerInput orders?: OrderCreateNestedManyWithoutCustomerInput @@ -57412,15 +73031,20 @@ export namespace Prisma { promotions?: PromotionCreateNestedManyWithoutCustomerInput notifications?: NotificationRecipientCreateNestedManyWithoutCustomerInput activityLogs?: CustomerActivityLogCreateNestedManyWithoutCustomerInput + otpChallenges?: CustomerOtpCreateNestedManyWithoutCustomerInput + favorites?: CustomerFavoriteCreateNestedManyWithoutCustomerInput } export type CustomerUncheckedCreateWithoutPreOrdersInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string - nationalCode: string + nationalCode?: string | null passwordHash: string cityId?: string | null + cityNameRaw?: string | null kind?: $Enums.CustomerKind phone?: string | null address?: string | null @@ -57432,16 +73056,25 @@ export namespace Prisma { goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string goldDebtGrams?: Decimal | DecimalJsLike | number | string fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string verificationStep?: $Enums.VerificationStep nationalIdImageUrl?: string | null businessLicenseUrl?: string | null shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null avatarFileId?: string | null canPlaceOrders?: boolean isActive?: boolean isArchived?: boolean createdAt?: Date | string updatedAt?: Date | string + salesExpertTradingFor?: SalesExpertProfileUncheckedCreateNestedOneWithoutTradingCustomerInput + referredOrders?: OrderUncheckedCreateNestedManyWithoutReferrerCustomerInput addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCustomerInput orders?: OrderUncheckedCreateNestedManyWithoutCustomerInput ledgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutCustomerInput @@ -57450,6 +73083,8 @@ export namespace Prisma { promotions?: PromotionUncheckedCreateNestedManyWithoutCustomerInput notifications?: NotificationRecipientUncheckedCreateNestedManyWithoutCustomerInput activityLogs?: CustomerActivityLogUncheckedCreateNestedManyWithoutCustomerInput + otpChallenges?: CustomerOtpUncheckedCreateNestedManyWithoutCustomerInput + favorites?: CustomerFavoriteUncheckedCreateNestedManyWithoutCustomerInput } export type CustomerCreateOrConnectWithoutPreOrdersInput = { @@ -57460,23 +73095,27 @@ export namespace Prisma { export type CityCreateWithoutPreOrdersInput = { id?: string name: string - province?: string | null percent?: Decimal | DecimalJsLike | number | string | null percentAux?: Decimal | DecimalJsLike | number | string | null + parent?: CityCreateNestedOneWithoutChildrenInput + children?: CityCreateNestedManyWithoutParentInput customers?: CustomerCreateNestedManyWithoutCityInput addresses?: CustomerAddressCreateNestedManyWithoutCityInput branches?: BranchCreateNestedManyWithoutCityInput + salesExpertProfiles?: SalesExpertProfileCreateNestedManyWithoutCityInput } export type CityUncheckedCreateWithoutPreOrdersInput = { id?: string name: string - province?: string | null + parentId?: string | null percent?: Decimal | DecimalJsLike | number | string | null percentAux?: Decimal | DecimalJsLike | number | string | null + children?: CityUncheckedCreateNestedManyWithoutParentInput customers?: CustomerUncheckedCreateNestedManyWithoutCityInput addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCityInput branches?: BranchUncheckedCreateNestedManyWithoutCityInput + salesExpertProfiles?: SalesExpertProfileUncheckedCreateNestedManyWithoutCityInput } export type CityCreateOrConnectWithoutPreOrdersInput = { @@ -57521,6 +73160,8 @@ export namespace Prisma { updatedAt?: Date | string customer: CustomerCreateNestedOneWithoutOrdersInput branch?: BranchCreateNestedOneWithoutOrdersInput + salesAgent?: AdminUserCreateNestedOneWithoutCreditedOrdersInput + referrerCustomer?: CustomerCreateNestedOneWithoutReferredOrdersInput items?: OrderItemCreateNestedManyWithoutOrderInput statusEvents?: OrderStatusEventCreateNestedManyWithoutOrderInput ledgerEntries?: LedgerEntryCreateNestedManyWithoutOrderInput @@ -57538,6 +73179,8 @@ export namespace Prisma { flatRialCharge?: Decimal | DecimalJsLike | number | string isSuspendedOverCreditLimit?: boolean deliveredAt?: Date | string | null + salesAgentId?: string | null + referrerCustomerId?: string | null createdAt?: Date | string updatedAt?: Date | string items?: OrderItemUncheckedCreateNestedManyWithoutOrderInput @@ -57590,9 +73233,12 @@ export namespace Prisma { export type CustomerUpdateWithoutPreOrdersInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string - nationalCode?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null passwordHash?: StringFieldUpdateOperationsInput | string + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind phone?: NullableStringFieldUpdateOperationsInput | string | null address?: NullableStringFieldUpdateOperationsInput | string | null @@ -57603,10 +73249,17 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean isArchived?: BoolFieldUpdateOperationsInput | boolean @@ -57614,6 +73267,8 @@ export namespace Prisma { updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string city?: CityUpdateOneWithoutCustomersNestedInput referredByAgent?: AdminUserUpdateOneWithoutReferredCustomersNestedInput + salesExpertTradingFor?: SalesExpertProfileUpdateOneWithoutTradingCustomerNestedInput + referredOrders?: OrderUpdateManyWithoutReferrerCustomerNestedInput avatarFile?: UploadedFileUpdateOneWithoutCustomerAvatarsNestedInput addresses?: CustomerAddressUpdateManyWithoutCustomerNestedInput orders?: OrderUpdateManyWithoutCustomerNestedInput @@ -57623,15 +73278,20 @@ export namespace Prisma { promotions?: PromotionUpdateManyWithoutCustomerNestedInput notifications?: NotificationRecipientUpdateManyWithoutCustomerNestedInput activityLogs?: CustomerActivityLogUpdateManyWithoutCustomerNestedInput + otpChallenges?: CustomerOtpUpdateManyWithoutCustomerNestedInput + favorites?: CustomerFavoriteUpdateManyWithoutCustomerNestedInput } export type CustomerUncheckedUpdateWithoutPreOrdersInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string - nationalCode?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null passwordHash?: StringFieldUpdateOperationsInput | string cityId?: NullableStringFieldUpdateOperationsInput | string | null + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind phone?: NullableStringFieldUpdateOperationsInput | string | null address?: NullableStringFieldUpdateOperationsInput | string | null @@ -57643,16 +73303,25 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean isArchived?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + salesExpertTradingFor?: SalesExpertProfileUncheckedUpdateOneWithoutTradingCustomerNestedInput + referredOrders?: OrderUncheckedUpdateManyWithoutReferrerCustomerNestedInput addresses?: CustomerAddressUncheckedUpdateManyWithoutCustomerNestedInput orders?: OrderUncheckedUpdateManyWithoutCustomerNestedInput ledgerEntries?: LedgerEntryUncheckedUpdateManyWithoutCustomerNestedInput @@ -57661,6 +73330,8 @@ export namespace Prisma { promotions?: PromotionUncheckedUpdateManyWithoutCustomerNestedInput notifications?: NotificationRecipientUncheckedUpdateManyWithoutCustomerNestedInput activityLogs?: CustomerActivityLogUncheckedUpdateManyWithoutCustomerNestedInput + otpChallenges?: CustomerOtpUncheckedUpdateManyWithoutCustomerNestedInput + favorites?: CustomerFavoriteUncheckedUpdateManyWithoutCustomerNestedInput } export type CityUpsertWithoutPreOrdersInput = { @@ -57677,23 +73348,27 @@ export namespace Prisma { export type CityUpdateWithoutPreOrdersInput = { id?: StringFieldUpdateOperationsInput | string name?: StringFieldUpdateOperationsInput | string - province?: NullableStringFieldUpdateOperationsInput | string | null percent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null percentAux?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + parent?: CityUpdateOneWithoutChildrenNestedInput + children?: CityUpdateManyWithoutParentNestedInput customers?: CustomerUpdateManyWithoutCityNestedInput addresses?: CustomerAddressUpdateManyWithoutCityNestedInput branches?: BranchUpdateManyWithoutCityNestedInput + salesExpertProfiles?: SalesExpertProfileUpdateManyWithoutCityNestedInput } export type CityUncheckedUpdateWithoutPreOrdersInput = { id?: StringFieldUpdateOperationsInput | string name?: StringFieldUpdateOperationsInput | string - province?: NullableStringFieldUpdateOperationsInput | string | null + parentId?: NullableStringFieldUpdateOperationsInput | string | null percent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null percentAux?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + children?: CityUncheckedUpdateManyWithoutParentNestedInput customers?: CustomerUncheckedUpdateManyWithoutCityNestedInput addresses?: CustomerAddressUncheckedUpdateManyWithoutCityNestedInput branches?: BranchUncheckedUpdateManyWithoutCityNestedInput + salesExpertProfiles?: SalesExpertProfileUncheckedUpdateManyWithoutCityNestedInput } export type WorkshopUpsertWithoutPreOrdersInput = { @@ -57750,6 +73425,8 @@ export namespace Prisma { updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string customer?: CustomerUpdateOneRequiredWithoutOrdersNestedInput branch?: BranchUpdateOneWithoutOrdersNestedInput + salesAgent?: AdminUserUpdateOneWithoutCreditedOrdersNestedInput + referrerCustomer?: CustomerUpdateOneWithoutReferredOrdersNestedInput items?: OrderItemUpdateManyWithoutOrderNestedInput statusEvents?: OrderStatusEventUpdateManyWithoutOrderNestedInput ledgerEntries?: LedgerEntryUpdateManyWithoutOrderNestedInput @@ -57767,6 +73444,8 @@ export namespace Prisma { flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + salesAgentId?: NullableStringFieldUpdateOperationsInput | string | null + referrerCustomerId?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string items?: OrderItemUncheckedUpdateManyWithoutOrderNestedInput @@ -57836,15 +73515,23 @@ export namespace Prisma { export type AdminUserCreateWithoutPreOrderStatusEventsInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string passwordHash: string role: $Enums.AdminRole wagePercent?: Decimal | DecimalJsLike | number | string | null isActive?: boolean createdAt?: Date | string + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null userType?: UserTypeCreateNestedOneWithoutAdminUsersInput branch?: BranchCreateNestedOneWithoutAdminUsersInput + avatarFile?: UploadedFileCreateNestedOneWithoutAdminUserAvatarsInput referredCustomers?: CustomerCreateNestedManyWithoutReferredByAgentInput + creditedOrders?: OrderCreateNestedManyWithoutSalesAgentInput supervisedWorkshops?: WorkshopCreateNestedManyWithoutSupervisorInput branchAllocations?: BranchAllocationCreateNestedManyWithoutAllocatorAdminUserInput postedLedgerEntries?: LedgerEntryCreateNestedManyWithoutPostedByAdminUserInput @@ -57852,11 +73539,15 @@ export namespace Prisma { sentSmsMessages?: SmsMessageCreateNestedManyWithoutSentByAdminUserInput sentNotifications?: NotificationCreateNestedManyWithoutSentByAdminUserInput uploadedFiles?: UploadedFileCreateNestedManyWithoutUploadedByAdminUserInput + salesExpertProfile?: SalesExpertProfileCreateNestedOneWithoutAdminUserInput + sessions?: AdminSessionCreateNestedManyWithoutAdminUserInput } export type AdminUserUncheckedCreateWithoutPreOrderStatusEventsInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string passwordHash: string role: $Enums.AdminRole @@ -57865,7 +73556,13 @@ export namespace Prisma { wagePercent?: Decimal | DecimalJsLike | number | string | null isActive?: boolean createdAt?: Date | string + avatarFileId?: string | null + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null referredCustomers?: CustomerUncheckedCreateNestedManyWithoutReferredByAgentInput + creditedOrders?: OrderUncheckedCreateNestedManyWithoutSalesAgentInput supervisedWorkshops?: WorkshopUncheckedCreateNestedManyWithoutSupervisorInput branchAllocations?: BranchAllocationUncheckedCreateNestedManyWithoutAllocatorAdminUserInput postedLedgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutPostedByAdminUserInput @@ -57873,6 +73570,8 @@ export namespace Prisma { sentSmsMessages?: SmsMessageUncheckedCreateNestedManyWithoutSentByAdminUserInput sentNotifications?: NotificationUncheckedCreateNestedManyWithoutSentByAdminUserInput uploadedFiles?: UploadedFileUncheckedCreateNestedManyWithoutUploadedByAdminUserInput + salesExpertProfile?: SalesExpertProfileUncheckedCreateNestedOneWithoutAdminUserInput + sessions?: AdminSessionUncheckedCreateNestedManyWithoutAdminUserInput } export type AdminUserCreateOrConnectWithoutPreOrderStatusEventsInput = { @@ -57943,15 +73642,23 @@ export namespace Prisma { export type AdminUserUpdateWithoutPreOrderStatusEventsInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string passwordHash?: StringFieldUpdateOperationsInput | string role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null userType?: UserTypeUpdateOneWithoutAdminUsersNestedInput branch?: BranchUpdateOneWithoutAdminUsersNestedInput + avatarFile?: UploadedFileUpdateOneWithoutAdminUserAvatarsNestedInput referredCustomers?: CustomerUpdateManyWithoutReferredByAgentNestedInput + creditedOrders?: OrderUpdateManyWithoutSalesAgentNestedInput supervisedWorkshops?: WorkshopUpdateManyWithoutSupervisorNestedInput branchAllocations?: BranchAllocationUpdateManyWithoutAllocatorAdminUserNestedInput postedLedgerEntries?: LedgerEntryUpdateManyWithoutPostedByAdminUserNestedInput @@ -57959,11 +73666,15 @@ export namespace Prisma { sentSmsMessages?: SmsMessageUpdateManyWithoutSentByAdminUserNestedInput sentNotifications?: NotificationUpdateManyWithoutSentByAdminUserNestedInput uploadedFiles?: UploadedFileUpdateManyWithoutUploadedByAdminUserNestedInput + salesExpertProfile?: SalesExpertProfileUpdateOneWithoutAdminUserNestedInput + sessions?: AdminSessionUpdateManyWithoutAdminUserNestedInput } export type AdminUserUncheckedUpdateWithoutPreOrderStatusEventsInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string passwordHash?: StringFieldUpdateOperationsInput | string role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole @@ -57972,7 +73683,13 @@ export namespace Prisma { wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null referredCustomers?: CustomerUncheckedUpdateManyWithoutReferredByAgentNestedInput + creditedOrders?: OrderUncheckedUpdateManyWithoutSalesAgentNestedInput supervisedWorkshops?: WorkshopUncheckedUpdateManyWithoutSupervisorNestedInput branchAllocations?: BranchAllocationUncheckedUpdateManyWithoutAllocatorAdminUserNestedInput postedLedgerEntries?: LedgerEntryUncheckedUpdateManyWithoutPostedByAdminUserNestedInput @@ -57980,14 +73697,19 @@ export namespace Prisma { sentSmsMessages?: SmsMessageUncheckedUpdateManyWithoutSentByAdminUserNestedInput sentNotifications?: NotificationUncheckedUpdateManyWithoutSentByAdminUserNestedInput uploadedFiles?: UploadedFileUncheckedUpdateManyWithoutUploadedByAdminUserNestedInput + salesExpertProfile?: SalesExpertProfileUncheckedUpdateOneWithoutAdminUserNestedInput + sessions?: AdminSessionUncheckedUpdateManyWithoutAdminUserNestedInput } export type CustomerCreateWithoutLedgerEntriesInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string - nationalCode: string + nationalCode?: string | null passwordHash: string + cityNameRaw?: string | null kind?: $Enums.CustomerKind phone?: string | null address?: string | null @@ -57998,10 +73720,17 @@ export namespace Prisma { goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string goldDebtGrams?: Decimal | DecimalJsLike | number | string fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string verificationStep?: $Enums.VerificationStep nationalIdImageUrl?: string | null businessLicenseUrl?: string | null shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null canPlaceOrders?: boolean isActive?: boolean isArchived?: boolean @@ -58009,6 +73738,8 @@ export namespace Prisma { updatedAt?: Date | string city?: CityCreateNestedOneWithoutCustomersInput referredByAgent?: AdminUserCreateNestedOneWithoutReferredCustomersInput + salesExpertTradingFor?: SalesExpertProfileCreateNestedOneWithoutTradingCustomerInput + referredOrders?: OrderCreateNestedManyWithoutReferrerCustomerInput avatarFile?: UploadedFileCreateNestedOneWithoutCustomerAvatarsInput addresses?: CustomerAddressCreateNestedManyWithoutCustomerInput orders?: OrderCreateNestedManyWithoutCustomerInput @@ -58018,15 +73749,20 @@ export namespace Prisma { promotions?: PromotionCreateNestedManyWithoutCustomerInput notifications?: NotificationRecipientCreateNestedManyWithoutCustomerInput activityLogs?: CustomerActivityLogCreateNestedManyWithoutCustomerInput + otpChallenges?: CustomerOtpCreateNestedManyWithoutCustomerInput + favorites?: CustomerFavoriteCreateNestedManyWithoutCustomerInput } export type CustomerUncheckedCreateWithoutLedgerEntriesInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string - nationalCode: string + nationalCode?: string | null passwordHash: string cityId?: string | null + cityNameRaw?: string | null kind?: $Enums.CustomerKind phone?: string | null address?: string | null @@ -58038,16 +73774,25 @@ export namespace Prisma { goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string goldDebtGrams?: Decimal | DecimalJsLike | number | string fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string verificationStep?: $Enums.VerificationStep nationalIdImageUrl?: string | null businessLicenseUrl?: string | null shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null avatarFileId?: string | null canPlaceOrders?: boolean isActive?: boolean isArchived?: boolean createdAt?: Date | string updatedAt?: Date | string + salesExpertTradingFor?: SalesExpertProfileUncheckedCreateNestedOneWithoutTradingCustomerInput + referredOrders?: OrderUncheckedCreateNestedManyWithoutReferrerCustomerInput addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCustomerInput orders?: OrderUncheckedCreateNestedManyWithoutCustomerInput preOrders?: PreOrderUncheckedCreateNestedManyWithoutCustomerInput @@ -58056,6 +73801,8 @@ export namespace Prisma { promotions?: PromotionUncheckedCreateNestedManyWithoutCustomerInput notifications?: NotificationRecipientUncheckedCreateNestedManyWithoutCustomerInput activityLogs?: CustomerActivityLogUncheckedCreateNestedManyWithoutCustomerInput + otpChallenges?: CustomerOtpUncheckedCreateNestedManyWithoutCustomerInput + favorites?: CustomerFavoriteUncheckedCreateNestedManyWithoutCustomerInput } export type CustomerCreateOrConnectWithoutLedgerEntriesInput = { @@ -58077,6 +73824,8 @@ export namespace Prisma { updatedAt?: Date | string customer: CustomerCreateNestedOneWithoutOrdersInput branch?: BranchCreateNestedOneWithoutOrdersInput + salesAgent?: AdminUserCreateNestedOneWithoutCreditedOrdersInput + referrerCustomer?: CustomerCreateNestedOneWithoutReferredOrdersInput items?: OrderItemCreateNestedManyWithoutOrderInput statusEvents?: OrderStatusEventCreateNestedManyWithoutOrderInput convertedFromPreOrder?: PreOrderCreateNestedOneWithoutConvertedOrderInput @@ -58094,6 +73843,8 @@ export namespace Prisma { flatRialCharge?: Decimal | DecimalJsLike | number | string isSuspendedOverCreditLimit?: boolean deliveredAt?: Date | string | null + salesAgentId?: string | null + referrerCustomerId?: string | null createdAt?: Date | string updatedAt?: Date | string items?: OrderItemUncheckedCreateNestedManyWithoutOrderInput @@ -58109,15 +73860,23 @@ export namespace Prisma { export type AdminUserCreateWithoutPostedLedgerEntriesInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string passwordHash: string role: $Enums.AdminRole wagePercent?: Decimal | DecimalJsLike | number | string | null isActive?: boolean createdAt?: Date | string + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null userType?: UserTypeCreateNestedOneWithoutAdminUsersInput branch?: BranchCreateNestedOneWithoutAdminUsersInput + avatarFile?: UploadedFileCreateNestedOneWithoutAdminUserAvatarsInput referredCustomers?: CustomerCreateNestedManyWithoutReferredByAgentInput + creditedOrders?: OrderCreateNestedManyWithoutSalesAgentInput supervisedWorkshops?: WorkshopCreateNestedManyWithoutSupervisorInput branchAllocations?: BranchAllocationCreateNestedManyWithoutAllocatorAdminUserInput orderStatusEvents?: OrderStatusEventCreateNestedManyWithoutActorAdminUserInput @@ -58125,11 +73884,15 @@ export namespace Prisma { sentSmsMessages?: SmsMessageCreateNestedManyWithoutSentByAdminUserInput sentNotifications?: NotificationCreateNestedManyWithoutSentByAdminUserInput uploadedFiles?: UploadedFileCreateNestedManyWithoutUploadedByAdminUserInput + salesExpertProfile?: SalesExpertProfileCreateNestedOneWithoutAdminUserInput + sessions?: AdminSessionCreateNestedManyWithoutAdminUserInput } export type AdminUserUncheckedCreateWithoutPostedLedgerEntriesInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string passwordHash: string role: $Enums.AdminRole @@ -58138,7 +73901,13 @@ export namespace Prisma { wagePercent?: Decimal | DecimalJsLike | number | string | null isActive?: boolean createdAt?: Date | string + avatarFileId?: string | null + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null referredCustomers?: CustomerUncheckedCreateNestedManyWithoutReferredByAgentInput + creditedOrders?: OrderUncheckedCreateNestedManyWithoutSalesAgentInput supervisedWorkshops?: WorkshopUncheckedCreateNestedManyWithoutSupervisorInput branchAllocations?: BranchAllocationUncheckedCreateNestedManyWithoutAllocatorAdminUserInput orderStatusEvents?: OrderStatusEventUncheckedCreateNestedManyWithoutActorAdminUserInput @@ -58146,6 +73915,8 @@ export namespace Prisma { sentSmsMessages?: SmsMessageUncheckedCreateNestedManyWithoutSentByAdminUserInput sentNotifications?: NotificationUncheckedCreateNestedManyWithoutSentByAdminUserInput uploadedFiles?: UploadedFileUncheckedCreateNestedManyWithoutUploadedByAdminUserInput + salesExpertProfile?: SalesExpertProfileUncheckedCreateNestedOneWithoutAdminUserInput + sessions?: AdminSessionUncheckedCreateNestedManyWithoutAdminUserInput } export type AdminUserCreateOrConnectWithoutPostedLedgerEntriesInput = { @@ -58167,9 +73938,12 @@ export namespace Prisma { export type CustomerUpdateWithoutLedgerEntriesInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string - nationalCode?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null passwordHash?: StringFieldUpdateOperationsInput | string + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind phone?: NullableStringFieldUpdateOperationsInput | string | null address?: NullableStringFieldUpdateOperationsInput | string | null @@ -58180,10 +73954,17 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean isArchived?: BoolFieldUpdateOperationsInput | boolean @@ -58191,6 +73972,8 @@ export namespace Prisma { updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string city?: CityUpdateOneWithoutCustomersNestedInput referredByAgent?: AdminUserUpdateOneWithoutReferredCustomersNestedInput + salesExpertTradingFor?: SalesExpertProfileUpdateOneWithoutTradingCustomerNestedInput + referredOrders?: OrderUpdateManyWithoutReferrerCustomerNestedInput avatarFile?: UploadedFileUpdateOneWithoutCustomerAvatarsNestedInput addresses?: CustomerAddressUpdateManyWithoutCustomerNestedInput orders?: OrderUpdateManyWithoutCustomerNestedInput @@ -58200,15 +73983,20 @@ export namespace Prisma { promotions?: PromotionUpdateManyWithoutCustomerNestedInput notifications?: NotificationRecipientUpdateManyWithoutCustomerNestedInput activityLogs?: CustomerActivityLogUpdateManyWithoutCustomerNestedInput + otpChallenges?: CustomerOtpUpdateManyWithoutCustomerNestedInput + favorites?: CustomerFavoriteUpdateManyWithoutCustomerNestedInput } export type CustomerUncheckedUpdateWithoutLedgerEntriesInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string - nationalCode?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null passwordHash?: StringFieldUpdateOperationsInput | string cityId?: NullableStringFieldUpdateOperationsInput | string | null + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind phone?: NullableStringFieldUpdateOperationsInput | string | null address?: NullableStringFieldUpdateOperationsInput | string | null @@ -58220,16 +74008,25 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean isArchived?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + salesExpertTradingFor?: SalesExpertProfileUncheckedUpdateOneWithoutTradingCustomerNestedInput + referredOrders?: OrderUncheckedUpdateManyWithoutReferrerCustomerNestedInput addresses?: CustomerAddressUncheckedUpdateManyWithoutCustomerNestedInput orders?: OrderUncheckedUpdateManyWithoutCustomerNestedInput preOrders?: PreOrderUncheckedUpdateManyWithoutCustomerNestedInput @@ -58238,6 +74035,8 @@ export namespace Prisma { promotions?: PromotionUncheckedUpdateManyWithoutCustomerNestedInput notifications?: NotificationRecipientUncheckedUpdateManyWithoutCustomerNestedInput activityLogs?: CustomerActivityLogUncheckedUpdateManyWithoutCustomerNestedInput + otpChallenges?: CustomerOtpUncheckedUpdateManyWithoutCustomerNestedInput + favorites?: CustomerFavoriteUncheckedUpdateManyWithoutCustomerNestedInput } export type OrderUpsertWithoutLedgerEntriesInput = { @@ -58265,6 +74064,8 @@ export namespace Prisma { updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string customer?: CustomerUpdateOneRequiredWithoutOrdersNestedInput branch?: BranchUpdateOneWithoutOrdersNestedInput + salesAgent?: AdminUserUpdateOneWithoutCreditedOrdersNestedInput + referrerCustomer?: CustomerUpdateOneWithoutReferredOrdersNestedInput items?: OrderItemUpdateManyWithoutOrderNestedInput statusEvents?: OrderStatusEventUpdateManyWithoutOrderNestedInput convertedFromPreOrder?: PreOrderUpdateOneWithoutConvertedOrderNestedInput @@ -58282,6 +74083,8 @@ export namespace Prisma { flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + salesAgentId?: NullableStringFieldUpdateOperationsInput | string | null + referrerCustomerId?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string items?: OrderItemUncheckedUpdateManyWithoutOrderNestedInput @@ -58303,15 +74106,23 @@ export namespace Prisma { export type AdminUserUpdateWithoutPostedLedgerEntriesInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string passwordHash?: StringFieldUpdateOperationsInput | string role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null userType?: UserTypeUpdateOneWithoutAdminUsersNestedInput branch?: BranchUpdateOneWithoutAdminUsersNestedInput + avatarFile?: UploadedFileUpdateOneWithoutAdminUserAvatarsNestedInput referredCustomers?: CustomerUpdateManyWithoutReferredByAgentNestedInput + creditedOrders?: OrderUpdateManyWithoutSalesAgentNestedInput supervisedWorkshops?: WorkshopUpdateManyWithoutSupervisorNestedInput branchAllocations?: BranchAllocationUpdateManyWithoutAllocatorAdminUserNestedInput orderStatusEvents?: OrderStatusEventUpdateManyWithoutActorAdminUserNestedInput @@ -58319,11 +74130,15 @@ export namespace Prisma { sentSmsMessages?: SmsMessageUpdateManyWithoutSentByAdminUserNestedInput sentNotifications?: NotificationUpdateManyWithoutSentByAdminUserNestedInput uploadedFiles?: UploadedFileUpdateManyWithoutUploadedByAdminUserNestedInput + salesExpertProfile?: SalesExpertProfileUpdateOneWithoutAdminUserNestedInput + sessions?: AdminSessionUpdateManyWithoutAdminUserNestedInput } export type AdminUserUncheckedUpdateWithoutPostedLedgerEntriesInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string passwordHash?: StringFieldUpdateOperationsInput | string role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole @@ -58332,7 +74147,13 @@ export namespace Prisma { wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null referredCustomers?: CustomerUncheckedUpdateManyWithoutReferredByAgentNestedInput + creditedOrders?: OrderUncheckedUpdateManyWithoutSalesAgentNestedInput supervisedWorkshops?: WorkshopUncheckedUpdateManyWithoutSupervisorNestedInput branchAllocations?: BranchAllocationUncheckedUpdateManyWithoutAllocatorAdminUserNestedInput orderStatusEvents?: OrderStatusEventUncheckedUpdateManyWithoutActorAdminUserNestedInput @@ -58340,14 +74161,19 @@ export namespace Prisma { sentSmsMessages?: SmsMessageUncheckedUpdateManyWithoutSentByAdminUserNestedInput sentNotifications?: NotificationUncheckedUpdateManyWithoutSentByAdminUserNestedInput uploadedFiles?: UploadedFileUncheckedUpdateManyWithoutUploadedByAdminUserNestedInput + salesExpertProfile?: SalesExpertProfileUncheckedUpdateOneWithoutAdminUserNestedInput + sessions?: AdminSessionUncheckedUpdateManyWithoutAdminUserNestedInput } export type CustomerCreateWithoutWalletBonusesInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string - nationalCode: string + nationalCode?: string | null passwordHash: string + cityNameRaw?: string | null kind?: $Enums.CustomerKind phone?: string | null address?: string | null @@ -58358,10 +74184,17 @@ export namespace Prisma { goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string goldDebtGrams?: Decimal | DecimalJsLike | number | string fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string verificationStep?: $Enums.VerificationStep nationalIdImageUrl?: string | null businessLicenseUrl?: string | null shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null canPlaceOrders?: boolean isActive?: boolean isArchived?: boolean @@ -58369,6 +74202,8 @@ export namespace Prisma { updatedAt?: Date | string city?: CityCreateNestedOneWithoutCustomersInput referredByAgent?: AdminUserCreateNestedOneWithoutReferredCustomersInput + salesExpertTradingFor?: SalesExpertProfileCreateNestedOneWithoutTradingCustomerInput + referredOrders?: OrderCreateNestedManyWithoutReferrerCustomerInput avatarFile?: UploadedFileCreateNestedOneWithoutCustomerAvatarsInput addresses?: CustomerAddressCreateNestedManyWithoutCustomerInput orders?: OrderCreateNestedManyWithoutCustomerInput @@ -58378,15 +74213,20 @@ export namespace Prisma { promotions?: PromotionCreateNestedManyWithoutCustomerInput notifications?: NotificationRecipientCreateNestedManyWithoutCustomerInput activityLogs?: CustomerActivityLogCreateNestedManyWithoutCustomerInput + otpChallenges?: CustomerOtpCreateNestedManyWithoutCustomerInput + favorites?: CustomerFavoriteCreateNestedManyWithoutCustomerInput } export type CustomerUncheckedCreateWithoutWalletBonusesInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string - nationalCode: string + nationalCode?: string | null passwordHash: string cityId?: string | null + cityNameRaw?: string | null kind?: $Enums.CustomerKind phone?: string | null address?: string | null @@ -58398,16 +74238,25 @@ export namespace Prisma { goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string goldDebtGrams?: Decimal | DecimalJsLike | number | string fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string verificationStep?: $Enums.VerificationStep nationalIdImageUrl?: string | null businessLicenseUrl?: string | null shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null avatarFileId?: string | null canPlaceOrders?: boolean isActive?: boolean isArchived?: boolean createdAt?: Date | string updatedAt?: Date | string + salesExpertTradingFor?: SalesExpertProfileUncheckedCreateNestedOneWithoutTradingCustomerInput + referredOrders?: OrderUncheckedCreateNestedManyWithoutReferrerCustomerInput addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCustomerInput orders?: OrderUncheckedCreateNestedManyWithoutCustomerInput preOrders?: PreOrderUncheckedCreateNestedManyWithoutCustomerInput @@ -58416,6 +74265,8 @@ export namespace Prisma { promotions?: PromotionUncheckedCreateNestedManyWithoutCustomerInput notifications?: NotificationRecipientUncheckedCreateNestedManyWithoutCustomerInput activityLogs?: CustomerActivityLogUncheckedCreateNestedManyWithoutCustomerInput + otpChallenges?: CustomerOtpUncheckedCreateNestedManyWithoutCustomerInput + favorites?: CustomerFavoriteUncheckedCreateNestedManyWithoutCustomerInput } export type CustomerCreateOrConnectWithoutWalletBonusesInput = { @@ -58437,9 +74288,12 @@ export namespace Prisma { export type CustomerUpdateWithoutWalletBonusesInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string - nationalCode?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null passwordHash?: StringFieldUpdateOperationsInput | string + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind phone?: NullableStringFieldUpdateOperationsInput | string | null address?: NullableStringFieldUpdateOperationsInput | string | null @@ -58450,10 +74304,17 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean isArchived?: BoolFieldUpdateOperationsInput | boolean @@ -58461,6 +74322,8 @@ export namespace Prisma { updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string city?: CityUpdateOneWithoutCustomersNestedInput referredByAgent?: AdminUserUpdateOneWithoutReferredCustomersNestedInput + salesExpertTradingFor?: SalesExpertProfileUpdateOneWithoutTradingCustomerNestedInput + referredOrders?: OrderUpdateManyWithoutReferrerCustomerNestedInput avatarFile?: UploadedFileUpdateOneWithoutCustomerAvatarsNestedInput addresses?: CustomerAddressUpdateManyWithoutCustomerNestedInput orders?: OrderUpdateManyWithoutCustomerNestedInput @@ -58470,15 +74333,20 @@ export namespace Prisma { promotions?: PromotionUpdateManyWithoutCustomerNestedInput notifications?: NotificationRecipientUpdateManyWithoutCustomerNestedInput activityLogs?: CustomerActivityLogUpdateManyWithoutCustomerNestedInput + otpChallenges?: CustomerOtpUpdateManyWithoutCustomerNestedInput + favorites?: CustomerFavoriteUpdateManyWithoutCustomerNestedInput } export type CustomerUncheckedUpdateWithoutWalletBonusesInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string - nationalCode?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null passwordHash?: StringFieldUpdateOperationsInput | string cityId?: NullableStringFieldUpdateOperationsInput | string | null + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind phone?: NullableStringFieldUpdateOperationsInput | string | null address?: NullableStringFieldUpdateOperationsInput | string | null @@ -58490,16 +74358,25 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean isArchived?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + salesExpertTradingFor?: SalesExpertProfileUncheckedUpdateOneWithoutTradingCustomerNestedInput + referredOrders?: OrderUncheckedUpdateManyWithoutReferrerCustomerNestedInput addresses?: CustomerAddressUncheckedUpdateManyWithoutCustomerNestedInput orders?: OrderUncheckedUpdateManyWithoutCustomerNestedInput preOrders?: PreOrderUncheckedUpdateManyWithoutCustomerNestedInput @@ -58508,6 +74385,8 @@ export namespace Prisma { promotions?: PromotionUncheckedUpdateManyWithoutCustomerNestedInput notifications?: NotificationRecipientUncheckedUpdateManyWithoutCustomerNestedInput activityLogs?: CustomerActivityLogUncheckedUpdateManyWithoutCustomerNestedInput + otpChallenges?: CustomerOtpUncheckedUpdateManyWithoutCustomerNestedInput + favorites?: CustomerFavoriteUncheckedUpdateManyWithoutCustomerNestedInput } export type PermissionCreateWithoutUserTypeInput = { @@ -58531,14 +74410,22 @@ export namespace Prisma { export type AdminUserCreateWithoutUserTypeInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string passwordHash: string role: $Enums.AdminRole wagePercent?: Decimal | DecimalJsLike | number | string | null isActive?: boolean createdAt?: Date | string + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null branch?: BranchCreateNestedOneWithoutAdminUsersInput + avatarFile?: UploadedFileCreateNestedOneWithoutAdminUserAvatarsInput referredCustomers?: CustomerCreateNestedManyWithoutReferredByAgentInput + creditedOrders?: OrderCreateNestedManyWithoutSalesAgentInput supervisedWorkshops?: WorkshopCreateNestedManyWithoutSupervisorInput branchAllocations?: BranchAllocationCreateNestedManyWithoutAllocatorAdminUserInput postedLedgerEntries?: LedgerEntryCreateNestedManyWithoutPostedByAdminUserInput @@ -58547,11 +74434,15 @@ export namespace Prisma { sentSmsMessages?: SmsMessageCreateNestedManyWithoutSentByAdminUserInput sentNotifications?: NotificationCreateNestedManyWithoutSentByAdminUserInput uploadedFiles?: UploadedFileCreateNestedManyWithoutUploadedByAdminUserInput + salesExpertProfile?: SalesExpertProfileCreateNestedOneWithoutAdminUserInput + sessions?: AdminSessionCreateNestedManyWithoutAdminUserInput } export type AdminUserUncheckedCreateWithoutUserTypeInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string passwordHash: string role: $Enums.AdminRole @@ -58559,7 +74450,13 @@ export namespace Prisma { wagePercent?: Decimal | DecimalJsLike | number | string | null isActive?: boolean createdAt?: Date | string + avatarFileId?: string | null + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null referredCustomers?: CustomerUncheckedCreateNestedManyWithoutReferredByAgentInput + creditedOrders?: OrderUncheckedCreateNestedManyWithoutSalesAgentInput supervisedWorkshops?: WorkshopUncheckedCreateNestedManyWithoutSupervisorInput branchAllocations?: BranchAllocationUncheckedCreateNestedManyWithoutAllocatorAdminUserInput postedLedgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutPostedByAdminUserInput @@ -58568,6 +74465,8 @@ export namespace Prisma { sentSmsMessages?: SmsMessageUncheckedCreateNestedManyWithoutSentByAdminUserInput sentNotifications?: NotificationUncheckedCreateNestedManyWithoutSentByAdminUserInput uploadedFiles?: UploadedFileUncheckedCreateNestedManyWithoutUploadedByAdminUserInput + salesExpertProfile?: SalesExpertProfileUncheckedCreateNestedOneWithoutAdminUserInput + sessions?: AdminSessionUncheckedCreateNestedManyWithoutAdminUserInput } export type AdminUserCreateOrConnectWithoutUserTypeInput = { @@ -58676,6 +74575,9 @@ export namespace Prisma { showType?: number isActive?: boolean createdAt?: Date | string + accountingStockWeight?: Decimal | DecimalJsLike | number | string | null + accountingStockCount?: Decimal | DecimalJsLike | number | string | null + accountingStockAt?: Date | string | null category?: CategoryCreateNestedOneWithoutProductsInput brand?: BrandCreateNestedOneWithoutProductsInput variants?: ProductVariantCreateNestedManyWithoutProductInput @@ -58683,6 +74585,7 @@ export namespace Prisma { collections?: CollectionProductCreateNestedManyWithoutProductInput promotions?: PromotionCreateNestedManyWithoutProductInput allocationItems?: BranchAllocationItemCreateNestedManyWithoutProductInput + favoritedBy?: CustomerFavoriteCreateNestedManyWithoutProductInput } export type ProductUncheckedCreateWithoutCommentsInput = { @@ -58695,11 +74598,15 @@ export namespace Prisma { showType?: number isActive?: boolean createdAt?: Date | string + accountingStockWeight?: Decimal | DecimalJsLike | number | string | null + accountingStockCount?: Decimal | DecimalJsLike | number | string | null + accountingStockAt?: Date | string | null variants?: ProductVariantUncheckedCreateNestedManyWithoutProductInput images?: ProductImageUncheckedCreateNestedManyWithoutProductInput collections?: CollectionProductUncheckedCreateNestedManyWithoutProductInput promotions?: PromotionUncheckedCreateNestedManyWithoutProductInput allocationItems?: BranchAllocationItemUncheckedCreateNestedManyWithoutProductInput + favoritedBy?: CustomerFavoriteUncheckedCreateNestedManyWithoutProductInput } export type ProductCreateOrConnectWithoutCommentsInput = { @@ -58710,9 +74617,12 @@ export namespace Prisma { export type CustomerCreateWithoutCommentsInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string - nationalCode: string + nationalCode?: string | null passwordHash: string + cityNameRaw?: string | null kind?: $Enums.CustomerKind phone?: string | null address?: string | null @@ -58723,10 +74633,17 @@ export namespace Prisma { goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string goldDebtGrams?: Decimal | DecimalJsLike | number | string fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string verificationStep?: $Enums.VerificationStep nationalIdImageUrl?: string | null businessLicenseUrl?: string | null shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null canPlaceOrders?: boolean isActive?: boolean isArchived?: boolean @@ -58734,6 +74651,8 @@ export namespace Prisma { updatedAt?: Date | string city?: CityCreateNestedOneWithoutCustomersInput referredByAgent?: AdminUserCreateNestedOneWithoutReferredCustomersInput + salesExpertTradingFor?: SalesExpertProfileCreateNestedOneWithoutTradingCustomerInput + referredOrders?: OrderCreateNestedManyWithoutReferrerCustomerInput avatarFile?: UploadedFileCreateNestedOneWithoutCustomerAvatarsInput addresses?: CustomerAddressCreateNestedManyWithoutCustomerInput orders?: OrderCreateNestedManyWithoutCustomerInput @@ -58743,15 +74662,20 @@ export namespace Prisma { promotions?: PromotionCreateNestedManyWithoutCustomerInput notifications?: NotificationRecipientCreateNestedManyWithoutCustomerInput activityLogs?: CustomerActivityLogCreateNestedManyWithoutCustomerInput + otpChallenges?: CustomerOtpCreateNestedManyWithoutCustomerInput + favorites?: CustomerFavoriteCreateNestedManyWithoutCustomerInput } export type CustomerUncheckedCreateWithoutCommentsInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string - nationalCode: string + nationalCode?: string | null passwordHash: string cityId?: string | null + cityNameRaw?: string | null kind?: $Enums.CustomerKind phone?: string | null address?: string | null @@ -58763,16 +74687,25 @@ export namespace Prisma { goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string goldDebtGrams?: Decimal | DecimalJsLike | number | string fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string verificationStep?: $Enums.VerificationStep nationalIdImageUrl?: string | null businessLicenseUrl?: string | null shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null avatarFileId?: string | null canPlaceOrders?: boolean isActive?: boolean isArchived?: boolean createdAt?: Date | string updatedAt?: Date | string + salesExpertTradingFor?: SalesExpertProfileUncheckedCreateNestedOneWithoutTradingCustomerInput + referredOrders?: OrderUncheckedCreateNestedManyWithoutReferrerCustomerInput addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCustomerInput orders?: OrderUncheckedCreateNestedManyWithoutCustomerInput preOrders?: PreOrderUncheckedCreateNestedManyWithoutCustomerInput @@ -58781,6 +74714,8 @@ export namespace Prisma { promotions?: PromotionUncheckedCreateNestedManyWithoutCustomerInput notifications?: NotificationRecipientUncheckedCreateNestedManyWithoutCustomerInput activityLogs?: CustomerActivityLogUncheckedCreateNestedManyWithoutCustomerInput + otpChallenges?: CustomerOtpUncheckedCreateNestedManyWithoutCustomerInput + favorites?: CustomerFavoriteUncheckedCreateNestedManyWithoutCustomerInput } export type CustomerCreateOrConnectWithoutCommentsInput = { @@ -58866,6 +74801,9 @@ export namespace Prisma { showType?: IntFieldUpdateOperationsInput | number isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + accountingStockWeight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockCount?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null category?: CategoryUpdateOneWithoutProductsNestedInput brand?: BrandUpdateOneWithoutProductsNestedInput variants?: ProductVariantUpdateManyWithoutProductNestedInput @@ -58873,6 +74811,7 @@ export namespace Prisma { collections?: CollectionProductUpdateManyWithoutProductNestedInput promotions?: PromotionUpdateManyWithoutProductNestedInput allocationItems?: BranchAllocationItemUpdateManyWithoutProductNestedInput + favoritedBy?: CustomerFavoriteUpdateManyWithoutProductNestedInput } export type ProductUncheckedUpdateWithoutCommentsInput = { @@ -58885,11 +74824,15 @@ export namespace Prisma { showType?: IntFieldUpdateOperationsInput | number isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + accountingStockWeight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockCount?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null variants?: ProductVariantUncheckedUpdateManyWithoutProductNestedInput images?: ProductImageUncheckedUpdateManyWithoutProductNestedInput collections?: CollectionProductUncheckedUpdateManyWithoutProductNestedInput promotions?: PromotionUncheckedUpdateManyWithoutProductNestedInput allocationItems?: BranchAllocationItemUncheckedUpdateManyWithoutProductNestedInput + favoritedBy?: CustomerFavoriteUncheckedUpdateManyWithoutProductNestedInput } export type CustomerUpsertWithoutCommentsInput = { @@ -58906,9 +74849,12 @@ export namespace Prisma { export type CustomerUpdateWithoutCommentsInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string - nationalCode?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null passwordHash?: StringFieldUpdateOperationsInput | string + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind phone?: NullableStringFieldUpdateOperationsInput | string | null address?: NullableStringFieldUpdateOperationsInput | string | null @@ -58919,10 +74865,17 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean isArchived?: BoolFieldUpdateOperationsInput | boolean @@ -58930,6 +74883,8 @@ export namespace Prisma { updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string city?: CityUpdateOneWithoutCustomersNestedInput referredByAgent?: AdminUserUpdateOneWithoutReferredCustomersNestedInput + salesExpertTradingFor?: SalesExpertProfileUpdateOneWithoutTradingCustomerNestedInput + referredOrders?: OrderUpdateManyWithoutReferrerCustomerNestedInput avatarFile?: UploadedFileUpdateOneWithoutCustomerAvatarsNestedInput addresses?: CustomerAddressUpdateManyWithoutCustomerNestedInput orders?: OrderUpdateManyWithoutCustomerNestedInput @@ -58939,15 +74894,20 @@ export namespace Prisma { promotions?: PromotionUpdateManyWithoutCustomerNestedInput notifications?: NotificationRecipientUpdateManyWithoutCustomerNestedInput activityLogs?: CustomerActivityLogUpdateManyWithoutCustomerNestedInput + otpChallenges?: CustomerOtpUpdateManyWithoutCustomerNestedInput + favorites?: CustomerFavoriteUpdateManyWithoutCustomerNestedInput } export type CustomerUncheckedUpdateWithoutCommentsInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string - nationalCode?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null passwordHash?: StringFieldUpdateOperationsInput | string cityId?: NullableStringFieldUpdateOperationsInput | string | null + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind phone?: NullableStringFieldUpdateOperationsInput | string | null address?: NullableStringFieldUpdateOperationsInput | string | null @@ -58959,16 +74919,25 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean isArchived?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + salesExpertTradingFor?: SalesExpertProfileUncheckedUpdateOneWithoutTradingCustomerNestedInput + referredOrders?: OrderUncheckedUpdateManyWithoutReferrerCustomerNestedInput addresses?: CustomerAddressUncheckedUpdateManyWithoutCustomerNestedInput orders?: OrderUncheckedUpdateManyWithoutCustomerNestedInput preOrders?: PreOrderUncheckedUpdateManyWithoutCustomerNestedInput @@ -58977,6 +74946,8 @@ export namespace Prisma { promotions?: PromotionUncheckedUpdateManyWithoutCustomerNestedInput notifications?: NotificationRecipientUncheckedUpdateManyWithoutCustomerNestedInput activityLogs?: CustomerActivityLogUncheckedUpdateManyWithoutCustomerNestedInput + otpChallenges?: CustomerOtpUncheckedUpdateManyWithoutCustomerNestedInput + favorites?: CustomerFavoriteUncheckedUpdateManyWithoutCustomerNestedInput } export type CommentUpsertWithoutRepliesInput = { @@ -59036,6 +75007,9 @@ export namespace Prisma { showType?: number isActive?: boolean createdAt?: Date | string + accountingStockWeight?: Decimal | DecimalJsLike | number | string | null + accountingStockCount?: Decimal | DecimalJsLike | number | string | null + accountingStockAt?: Date | string | null category?: CategoryCreateNestedOneWithoutProductsInput brand?: BrandCreateNestedOneWithoutProductsInput variants?: ProductVariantCreateNestedManyWithoutProductInput @@ -59043,6 +75017,7 @@ export namespace Prisma { collections?: CollectionProductCreateNestedManyWithoutProductInput comments?: CommentCreateNestedManyWithoutProductInput allocationItems?: BranchAllocationItemCreateNestedManyWithoutProductInput + favoritedBy?: CustomerFavoriteCreateNestedManyWithoutProductInput } export type ProductUncheckedCreateWithoutPromotionsInput = { @@ -59055,11 +75030,15 @@ export namespace Prisma { showType?: number isActive?: boolean createdAt?: Date | string + accountingStockWeight?: Decimal | DecimalJsLike | number | string | null + accountingStockCount?: Decimal | DecimalJsLike | number | string | null + accountingStockAt?: Date | string | null variants?: ProductVariantUncheckedCreateNestedManyWithoutProductInput images?: ProductImageUncheckedCreateNestedManyWithoutProductInput collections?: CollectionProductUncheckedCreateNestedManyWithoutProductInput comments?: CommentUncheckedCreateNestedManyWithoutProductInput allocationItems?: BranchAllocationItemUncheckedCreateNestedManyWithoutProductInput + favoritedBy?: CustomerFavoriteUncheckedCreateNestedManyWithoutProductInput } export type ProductCreateOrConnectWithoutPromotionsInput = { @@ -59101,9 +75080,12 @@ export namespace Prisma { export type CustomerCreateWithoutPromotionsInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string - nationalCode: string + nationalCode?: string | null passwordHash: string + cityNameRaw?: string | null kind?: $Enums.CustomerKind phone?: string | null address?: string | null @@ -59114,10 +75096,17 @@ export namespace Prisma { goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string goldDebtGrams?: Decimal | DecimalJsLike | number | string fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string verificationStep?: $Enums.VerificationStep nationalIdImageUrl?: string | null businessLicenseUrl?: string | null shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null canPlaceOrders?: boolean isActive?: boolean isArchived?: boolean @@ -59125,6 +75114,8 @@ export namespace Prisma { updatedAt?: Date | string city?: CityCreateNestedOneWithoutCustomersInput referredByAgent?: AdminUserCreateNestedOneWithoutReferredCustomersInput + salesExpertTradingFor?: SalesExpertProfileCreateNestedOneWithoutTradingCustomerInput + referredOrders?: OrderCreateNestedManyWithoutReferrerCustomerInput avatarFile?: UploadedFileCreateNestedOneWithoutCustomerAvatarsInput addresses?: CustomerAddressCreateNestedManyWithoutCustomerInput orders?: OrderCreateNestedManyWithoutCustomerInput @@ -59134,15 +75125,20 @@ export namespace Prisma { comments?: CommentCreateNestedManyWithoutCustomerInput notifications?: NotificationRecipientCreateNestedManyWithoutCustomerInput activityLogs?: CustomerActivityLogCreateNestedManyWithoutCustomerInput + otpChallenges?: CustomerOtpCreateNestedManyWithoutCustomerInput + favorites?: CustomerFavoriteCreateNestedManyWithoutCustomerInput } export type CustomerUncheckedCreateWithoutPromotionsInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string - nationalCode: string + nationalCode?: string | null passwordHash: string cityId?: string | null + cityNameRaw?: string | null kind?: $Enums.CustomerKind phone?: string | null address?: string | null @@ -59154,16 +75150,25 @@ export namespace Prisma { goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string goldDebtGrams?: Decimal | DecimalJsLike | number | string fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string verificationStep?: $Enums.VerificationStep nationalIdImageUrl?: string | null businessLicenseUrl?: string | null shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null avatarFileId?: string | null canPlaceOrders?: boolean isActive?: boolean isArchived?: boolean createdAt?: Date | string updatedAt?: Date | string + salesExpertTradingFor?: SalesExpertProfileUncheckedCreateNestedOneWithoutTradingCustomerInput + referredOrders?: OrderUncheckedCreateNestedManyWithoutReferrerCustomerInput addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCustomerInput orders?: OrderUncheckedCreateNestedManyWithoutCustomerInput preOrders?: PreOrderUncheckedCreateNestedManyWithoutCustomerInput @@ -59172,6 +75177,8 @@ export namespace Prisma { comments?: CommentUncheckedCreateNestedManyWithoutCustomerInput notifications?: NotificationRecipientUncheckedCreateNestedManyWithoutCustomerInput activityLogs?: CustomerActivityLogUncheckedCreateNestedManyWithoutCustomerInput + otpChallenges?: CustomerOtpUncheckedCreateNestedManyWithoutCustomerInput + favorites?: CustomerFavoriteUncheckedCreateNestedManyWithoutCustomerInput } export type CustomerCreateOrConnectWithoutPromotionsInput = { @@ -59215,6 +75222,9 @@ export namespace Prisma { showType?: IntFieldUpdateOperationsInput | number isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + accountingStockWeight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockCount?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null category?: CategoryUpdateOneWithoutProductsNestedInput brand?: BrandUpdateOneWithoutProductsNestedInput variants?: ProductVariantUpdateManyWithoutProductNestedInput @@ -59222,6 +75232,7 @@ export namespace Prisma { collections?: CollectionProductUpdateManyWithoutProductNestedInput comments?: CommentUpdateManyWithoutProductNestedInput allocationItems?: BranchAllocationItemUpdateManyWithoutProductNestedInput + favoritedBy?: CustomerFavoriteUpdateManyWithoutProductNestedInput } export type ProductUncheckedUpdateWithoutPromotionsInput = { @@ -59234,11 +75245,15 @@ export namespace Prisma { showType?: IntFieldUpdateOperationsInput | number isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + accountingStockWeight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockCount?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null variants?: ProductVariantUncheckedUpdateManyWithoutProductNestedInput images?: ProductImageUncheckedUpdateManyWithoutProductNestedInput collections?: CollectionProductUncheckedUpdateManyWithoutProductNestedInput comments?: CommentUncheckedUpdateManyWithoutProductNestedInput allocationItems?: BranchAllocationItemUncheckedUpdateManyWithoutProductNestedInput + favoritedBy?: CustomerFavoriteUncheckedUpdateManyWithoutProductNestedInput } export type CategoryUpsertWithoutPromotionsInput = { @@ -59292,9 +75307,12 @@ export namespace Prisma { export type CustomerUpdateWithoutPromotionsInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string - nationalCode?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null passwordHash?: StringFieldUpdateOperationsInput | string + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind phone?: NullableStringFieldUpdateOperationsInput | string | null address?: NullableStringFieldUpdateOperationsInput | string | null @@ -59305,10 +75323,17 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean isArchived?: BoolFieldUpdateOperationsInput | boolean @@ -59316,6 +75341,8 @@ export namespace Prisma { updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string city?: CityUpdateOneWithoutCustomersNestedInput referredByAgent?: AdminUserUpdateOneWithoutReferredCustomersNestedInput + salesExpertTradingFor?: SalesExpertProfileUpdateOneWithoutTradingCustomerNestedInput + referredOrders?: OrderUpdateManyWithoutReferrerCustomerNestedInput avatarFile?: UploadedFileUpdateOneWithoutCustomerAvatarsNestedInput addresses?: CustomerAddressUpdateManyWithoutCustomerNestedInput orders?: OrderUpdateManyWithoutCustomerNestedInput @@ -59325,15 +75352,20 @@ export namespace Prisma { comments?: CommentUpdateManyWithoutCustomerNestedInput notifications?: NotificationRecipientUpdateManyWithoutCustomerNestedInput activityLogs?: CustomerActivityLogUpdateManyWithoutCustomerNestedInput + otpChallenges?: CustomerOtpUpdateManyWithoutCustomerNestedInput + favorites?: CustomerFavoriteUpdateManyWithoutCustomerNestedInput } export type CustomerUncheckedUpdateWithoutPromotionsInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string - nationalCode?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null passwordHash?: StringFieldUpdateOperationsInput | string cityId?: NullableStringFieldUpdateOperationsInput | string | null + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind phone?: NullableStringFieldUpdateOperationsInput | string | null address?: NullableStringFieldUpdateOperationsInput | string | null @@ -59345,16 +75377,25 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean isArchived?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + salesExpertTradingFor?: SalesExpertProfileUncheckedUpdateOneWithoutTradingCustomerNestedInput + referredOrders?: OrderUncheckedUpdateManyWithoutReferrerCustomerNestedInput addresses?: CustomerAddressUncheckedUpdateManyWithoutCustomerNestedInput orders?: OrderUncheckedUpdateManyWithoutCustomerNestedInput preOrders?: PreOrderUncheckedUpdateManyWithoutCustomerNestedInput @@ -59363,6 +75404,8 @@ export namespace Prisma { comments?: CommentUncheckedUpdateManyWithoutCustomerNestedInput notifications?: NotificationRecipientUncheckedUpdateManyWithoutCustomerNestedInput activityLogs?: CustomerActivityLogUncheckedUpdateManyWithoutCustomerNestedInput + otpChallenges?: CustomerOtpUncheckedUpdateManyWithoutCustomerNestedInput + favorites?: CustomerFavoriteUncheckedUpdateManyWithoutCustomerNestedInput } export type BrandUpsertWithoutPromotionsInput = { @@ -59418,15 +75461,23 @@ export namespace Prisma { export type AdminUserCreateWithoutBranchAllocationsInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string passwordHash: string role: $Enums.AdminRole wagePercent?: Decimal | DecimalJsLike | number | string | null isActive?: boolean createdAt?: Date | string + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null userType?: UserTypeCreateNestedOneWithoutAdminUsersInput branch?: BranchCreateNestedOneWithoutAdminUsersInput + avatarFile?: UploadedFileCreateNestedOneWithoutAdminUserAvatarsInput referredCustomers?: CustomerCreateNestedManyWithoutReferredByAgentInput + creditedOrders?: OrderCreateNestedManyWithoutSalesAgentInput supervisedWorkshops?: WorkshopCreateNestedManyWithoutSupervisorInput postedLedgerEntries?: LedgerEntryCreateNestedManyWithoutPostedByAdminUserInput orderStatusEvents?: OrderStatusEventCreateNestedManyWithoutActorAdminUserInput @@ -59434,11 +75485,15 @@ export namespace Prisma { sentSmsMessages?: SmsMessageCreateNestedManyWithoutSentByAdminUserInput sentNotifications?: NotificationCreateNestedManyWithoutSentByAdminUserInput uploadedFiles?: UploadedFileCreateNestedManyWithoutUploadedByAdminUserInput + salesExpertProfile?: SalesExpertProfileCreateNestedOneWithoutAdminUserInput + sessions?: AdminSessionCreateNestedManyWithoutAdminUserInput } export type AdminUserUncheckedCreateWithoutBranchAllocationsInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string passwordHash: string role: $Enums.AdminRole @@ -59447,7 +75502,13 @@ export namespace Prisma { wagePercent?: Decimal | DecimalJsLike | number | string | null isActive?: boolean createdAt?: Date | string + avatarFileId?: string | null + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null referredCustomers?: CustomerUncheckedCreateNestedManyWithoutReferredByAgentInput + creditedOrders?: OrderUncheckedCreateNestedManyWithoutSalesAgentInput supervisedWorkshops?: WorkshopUncheckedCreateNestedManyWithoutSupervisorInput postedLedgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutPostedByAdminUserInput orderStatusEvents?: OrderStatusEventUncheckedCreateNestedManyWithoutActorAdminUserInput @@ -59455,6 +75516,8 @@ export namespace Prisma { sentSmsMessages?: SmsMessageUncheckedCreateNestedManyWithoutSentByAdminUserInput sentNotifications?: NotificationUncheckedCreateNestedManyWithoutSentByAdminUserInput uploadedFiles?: UploadedFileUncheckedCreateNestedManyWithoutUploadedByAdminUserInput + salesExpertProfile?: SalesExpertProfileUncheckedCreateNestedOneWithoutAdminUserInput + sessions?: AdminSessionUncheckedCreateNestedManyWithoutAdminUserInput } export type AdminUserCreateOrConnectWithoutBranchAllocationsInput = { @@ -59531,15 +75594,23 @@ export namespace Prisma { export type AdminUserUpdateWithoutBranchAllocationsInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string passwordHash?: StringFieldUpdateOperationsInput | string role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null userType?: UserTypeUpdateOneWithoutAdminUsersNestedInput branch?: BranchUpdateOneWithoutAdminUsersNestedInput + avatarFile?: UploadedFileUpdateOneWithoutAdminUserAvatarsNestedInput referredCustomers?: CustomerUpdateManyWithoutReferredByAgentNestedInput + creditedOrders?: OrderUpdateManyWithoutSalesAgentNestedInput supervisedWorkshops?: WorkshopUpdateManyWithoutSupervisorNestedInput postedLedgerEntries?: LedgerEntryUpdateManyWithoutPostedByAdminUserNestedInput orderStatusEvents?: OrderStatusEventUpdateManyWithoutActorAdminUserNestedInput @@ -59547,11 +75618,15 @@ export namespace Prisma { sentSmsMessages?: SmsMessageUpdateManyWithoutSentByAdminUserNestedInput sentNotifications?: NotificationUpdateManyWithoutSentByAdminUserNestedInput uploadedFiles?: UploadedFileUpdateManyWithoutUploadedByAdminUserNestedInput + salesExpertProfile?: SalesExpertProfileUpdateOneWithoutAdminUserNestedInput + sessions?: AdminSessionUpdateManyWithoutAdminUserNestedInput } export type AdminUserUncheckedUpdateWithoutBranchAllocationsInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string passwordHash?: StringFieldUpdateOperationsInput | string role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole @@ -59560,7 +75635,13 @@ export namespace Prisma { wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null referredCustomers?: CustomerUncheckedUpdateManyWithoutReferredByAgentNestedInput + creditedOrders?: OrderUncheckedUpdateManyWithoutSalesAgentNestedInput supervisedWorkshops?: WorkshopUncheckedUpdateManyWithoutSupervisorNestedInput postedLedgerEntries?: LedgerEntryUncheckedUpdateManyWithoutPostedByAdminUserNestedInput orderStatusEvents?: OrderStatusEventUncheckedUpdateManyWithoutActorAdminUserNestedInput @@ -59568,6 +75649,8 @@ export namespace Prisma { sentSmsMessages?: SmsMessageUncheckedUpdateManyWithoutSentByAdminUserNestedInput sentNotifications?: NotificationUncheckedUpdateManyWithoutSentByAdminUserNestedInput uploadedFiles?: UploadedFileUncheckedUpdateManyWithoutUploadedByAdminUserNestedInput + salesExpertProfile?: SalesExpertProfileUncheckedUpdateOneWithoutAdminUserNestedInput + sessions?: AdminSessionUncheckedUpdateManyWithoutAdminUserNestedInput } export type BranchAllocationItemUpsertWithWhereUniqueWithoutAllocationInput = { @@ -59615,6 +75698,9 @@ export namespace Prisma { showType?: number isActive?: boolean createdAt?: Date | string + accountingStockWeight?: Decimal | DecimalJsLike | number | string | null + accountingStockCount?: Decimal | DecimalJsLike | number | string | null + accountingStockAt?: Date | string | null category?: CategoryCreateNestedOneWithoutProductsInput brand?: BrandCreateNestedOneWithoutProductsInput variants?: ProductVariantCreateNestedManyWithoutProductInput @@ -59622,6 +75708,7 @@ export namespace Prisma { collections?: CollectionProductCreateNestedManyWithoutProductInput comments?: CommentCreateNestedManyWithoutProductInput promotions?: PromotionCreateNestedManyWithoutProductInput + favoritedBy?: CustomerFavoriteCreateNestedManyWithoutProductInput } export type ProductUncheckedCreateWithoutAllocationItemsInput = { @@ -59634,11 +75721,15 @@ export namespace Prisma { showType?: number isActive?: boolean createdAt?: Date | string + accountingStockWeight?: Decimal | DecimalJsLike | number | string | null + accountingStockCount?: Decimal | DecimalJsLike | number | string | null + accountingStockAt?: Date | string | null variants?: ProductVariantUncheckedCreateNestedManyWithoutProductInput images?: ProductImageUncheckedCreateNestedManyWithoutProductInput collections?: CollectionProductUncheckedCreateNestedManyWithoutProductInput comments?: CommentUncheckedCreateNestedManyWithoutProductInput promotions?: PromotionUncheckedCreateNestedManyWithoutProductInput + favoritedBy?: CustomerFavoriteUncheckedCreateNestedManyWithoutProductInput } export type ProductCreateOrConnectWithoutAllocationItemsInput = { @@ -59692,6 +75783,9 @@ export namespace Prisma { showType?: IntFieldUpdateOperationsInput | number isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + accountingStockWeight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockCount?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null category?: CategoryUpdateOneWithoutProductsNestedInput brand?: BrandUpdateOneWithoutProductsNestedInput variants?: ProductVariantUpdateManyWithoutProductNestedInput @@ -59699,6 +75793,7 @@ export namespace Prisma { collections?: CollectionProductUpdateManyWithoutProductNestedInput comments?: CommentUpdateManyWithoutProductNestedInput promotions?: PromotionUpdateManyWithoutProductNestedInput + favoritedBy?: CustomerFavoriteUpdateManyWithoutProductNestedInput } export type ProductUncheckedUpdateWithoutAllocationItemsInput = { @@ -59711,25 +75806,37 @@ export namespace Prisma { showType?: IntFieldUpdateOperationsInput | number isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + accountingStockWeight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockCount?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null variants?: ProductVariantUncheckedUpdateManyWithoutProductNestedInput images?: ProductImageUncheckedUpdateManyWithoutProductNestedInput collections?: CollectionProductUncheckedUpdateManyWithoutProductNestedInput comments?: CommentUncheckedUpdateManyWithoutProductNestedInput promotions?: PromotionUncheckedUpdateManyWithoutProductNestedInput + favoritedBy?: CustomerFavoriteUncheckedUpdateManyWithoutProductNestedInput } export type AdminUserCreateWithoutSentSmsMessagesInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string passwordHash: string role: $Enums.AdminRole wagePercent?: Decimal | DecimalJsLike | number | string | null isActive?: boolean createdAt?: Date | string + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null userType?: UserTypeCreateNestedOneWithoutAdminUsersInput branch?: BranchCreateNestedOneWithoutAdminUsersInput + avatarFile?: UploadedFileCreateNestedOneWithoutAdminUserAvatarsInput referredCustomers?: CustomerCreateNestedManyWithoutReferredByAgentInput + creditedOrders?: OrderCreateNestedManyWithoutSalesAgentInput supervisedWorkshops?: WorkshopCreateNestedManyWithoutSupervisorInput branchAllocations?: BranchAllocationCreateNestedManyWithoutAllocatorAdminUserInput postedLedgerEntries?: LedgerEntryCreateNestedManyWithoutPostedByAdminUserInput @@ -59737,11 +75844,15 @@ export namespace Prisma { preOrderStatusEvents?: PreOrderStatusEventCreateNestedManyWithoutActorAdminUserInput sentNotifications?: NotificationCreateNestedManyWithoutSentByAdminUserInput uploadedFiles?: UploadedFileCreateNestedManyWithoutUploadedByAdminUserInput + salesExpertProfile?: SalesExpertProfileCreateNestedOneWithoutAdminUserInput + sessions?: AdminSessionCreateNestedManyWithoutAdminUserInput } export type AdminUserUncheckedCreateWithoutSentSmsMessagesInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string passwordHash: string role: $Enums.AdminRole @@ -59750,7 +75861,13 @@ export namespace Prisma { wagePercent?: Decimal | DecimalJsLike | number | string | null isActive?: boolean createdAt?: Date | string + avatarFileId?: string | null + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null referredCustomers?: CustomerUncheckedCreateNestedManyWithoutReferredByAgentInput + creditedOrders?: OrderUncheckedCreateNestedManyWithoutSalesAgentInput supervisedWorkshops?: WorkshopUncheckedCreateNestedManyWithoutSupervisorInput branchAllocations?: BranchAllocationUncheckedCreateNestedManyWithoutAllocatorAdminUserInput postedLedgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutPostedByAdminUserInput @@ -59758,6 +75875,8 @@ export namespace Prisma { preOrderStatusEvents?: PreOrderStatusEventUncheckedCreateNestedManyWithoutActorAdminUserInput sentNotifications?: NotificationUncheckedCreateNestedManyWithoutSentByAdminUserInput uploadedFiles?: UploadedFileUncheckedCreateNestedManyWithoutUploadedByAdminUserInput + salesExpertProfile?: SalesExpertProfileUncheckedCreateNestedOneWithoutAdminUserInput + sessions?: AdminSessionUncheckedCreateNestedManyWithoutAdminUserInput } export type AdminUserCreateOrConnectWithoutSentSmsMessagesInput = { @@ -59779,15 +75898,23 @@ export namespace Prisma { export type AdminUserUpdateWithoutSentSmsMessagesInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string passwordHash?: StringFieldUpdateOperationsInput | string role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null userType?: UserTypeUpdateOneWithoutAdminUsersNestedInput branch?: BranchUpdateOneWithoutAdminUsersNestedInput + avatarFile?: UploadedFileUpdateOneWithoutAdminUserAvatarsNestedInput referredCustomers?: CustomerUpdateManyWithoutReferredByAgentNestedInput + creditedOrders?: OrderUpdateManyWithoutSalesAgentNestedInput supervisedWorkshops?: WorkshopUpdateManyWithoutSupervisorNestedInput branchAllocations?: BranchAllocationUpdateManyWithoutAllocatorAdminUserNestedInput postedLedgerEntries?: LedgerEntryUpdateManyWithoutPostedByAdminUserNestedInput @@ -59795,11 +75922,15 @@ export namespace Prisma { preOrderStatusEvents?: PreOrderStatusEventUpdateManyWithoutActorAdminUserNestedInput sentNotifications?: NotificationUpdateManyWithoutSentByAdminUserNestedInput uploadedFiles?: UploadedFileUpdateManyWithoutUploadedByAdminUserNestedInput + salesExpertProfile?: SalesExpertProfileUpdateOneWithoutAdminUserNestedInput + sessions?: AdminSessionUpdateManyWithoutAdminUserNestedInput } export type AdminUserUncheckedUpdateWithoutSentSmsMessagesInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string passwordHash?: StringFieldUpdateOperationsInput | string role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole @@ -59808,7 +75939,13 @@ export namespace Prisma { wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null referredCustomers?: CustomerUncheckedUpdateManyWithoutReferredByAgentNestedInput + creditedOrders?: OrderUncheckedUpdateManyWithoutSalesAgentNestedInput supervisedWorkshops?: WorkshopUncheckedUpdateManyWithoutSupervisorNestedInput branchAllocations?: BranchAllocationUncheckedUpdateManyWithoutAllocatorAdminUserNestedInput postedLedgerEntries?: LedgerEntryUncheckedUpdateManyWithoutPostedByAdminUserNestedInput @@ -59816,20 +75953,30 @@ export namespace Prisma { preOrderStatusEvents?: PreOrderStatusEventUncheckedUpdateManyWithoutActorAdminUserNestedInput sentNotifications?: NotificationUncheckedUpdateManyWithoutSentByAdminUserNestedInput uploadedFiles?: UploadedFileUncheckedUpdateManyWithoutUploadedByAdminUserNestedInput + salesExpertProfile?: SalesExpertProfileUncheckedUpdateOneWithoutAdminUserNestedInput + sessions?: AdminSessionUncheckedUpdateManyWithoutAdminUserNestedInput } export type AdminUserCreateWithoutSentNotificationsInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string passwordHash: string role: $Enums.AdminRole wagePercent?: Decimal | DecimalJsLike | number | string | null isActive?: boolean createdAt?: Date | string + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null userType?: UserTypeCreateNestedOneWithoutAdminUsersInput branch?: BranchCreateNestedOneWithoutAdminUsersInput + avatarFile?: UploadedFileCreateNestedOneWithoutAdminUserAvatarsInput referredCustomers?: CustomerCreateNestedManyWithoutReferredByAgentInput + creditedOrders?: OrderCreateNestedManyWithoutSalesAgentInput supervisedWorkshops?: WorkshopCreateNestedManyWithoutSupervisorInput branchAllocations?: BranchAllocationCreateNestedManyWithoutAllocatorAdminUserInput postedLedgerEntries?: LedgerEntryCreateNestedManyWithoutPostedByAdminUserInput @@ -59837,11 +75984,15 @@ export namespace Prisma { preOrderStatusEvents?: PreOrderStatusEventCreateNestedManyWithoutActorAdminUserInput sentSmsMessages?: SmsMessageCreateNestedManyWithoutSentByAdminUserInput uploadedFiles?: UploadedFileCreateNestedManyWithoutUploadedByAdminUserInput + salesExpertProfile?: SalesExpertProfileCreateNestedOneWithoutAdminUserInput + sessions?: AdminSessionCreateNestedManyWithoutAdminUserInput } export type AdminUserUncheckedCreateWithoutSentNotificationsInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string passwordHash: string role: $Enums.AdminRole @@ -59850,7 +76001,13 @@ export namespace Prisma { wagePercent?: Decimal | DecimalJsLike | number | string | null isActive?: boolean createdAt?: Date | string + avatarFileId?: string | null + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null referredCustomers?: CustomerUncheckedCreateNestedManyWithoutReferredByAgentInput + creditedOrders?: OrderUncheckedCreateNestedManyWithoutSalesAgentInput supervisedWorkshops?: WorkshopUncheckedCreateNestedManyWithoutSupervisorInput branchAllocations?: BranchAllocationUncheckedCreateNestedManyWithoutAllocatorAdminUserInput postedLedgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutPostedByAdminUserInput @@ -59858,6 +76015,8 @@ export namespace Prisma { preOrderStatusEvents?: PreOrderStatusEventUncheckedCreateNestedManyWithoutActorAdminUserInput sentSmsMessages?: SmsMessageUncheckedCreateNestedManyWithoutSentByAdminUserInput uploadedFiles?: UploadedFileUncheckedCreateNestedManyWithoutUploadedByAdminUserInput + salesExpertProfile?: SalesExpertProfileUncheckedCreateNestedOneWithoutAdminUserInput + sessions?: AdminSessionUncheckedCreateNestedManyWithoutAdminUserInput } export type AdminUserCreateOrConnectWithoutSentNotificationsInput = { @@ -59901,15 +76060,23 @@ export namespace Prisma { export type AdminUserUpdateWithoutSentNotificationsInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string passwordHash?: StringFieldUpdateOperationsInput | string role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null userType?: UserTypeUpdateOneWithoutAdminUsersNestedInput branch?: BranchUpdateOneWithoutAdminUsersNestedInput + avatarFile?: UploadedFileUpdateOneWithoutAdminUserAvatarsNestedInput referredCustomers?: CustomerUpdateManyWithoutReferredByAgentNestedInput + creditedOrders?: OrderUpdateManyWithoutSalesAgentNestedInput supervisedWorkshops?: WorkshopUpdateManyWithoutSupervisorNestedInput branchAllocations?: BranchAllocationUpdateManyWithoutAllocatorAdminUserNestedInput postedLedgerEntries?: LedgerEntryUpdateManyWithoutPostedByAdminUserNestedInput @@ -59917,11 +76084,15 @@ export namespace Prisma { preOrderStatusEvents?: PreOrderStatusEventUpdateManyWithoutActorAdminUserNestedInput sentSmsMessages?: SmsMessageUpdateManyWithoutSentByAdminUserNestedInput uploadedFiles?: UploadedFileUpdateManyWithoutUploadedByAdminUserNestedInput + salesExpertProfile?: SalesExpertProfileUpdateOneWithoutAdminUserNestedInput + sessions?: AdminSessionUpdateManyWithoutAdminUserNestedInput } export type AdminUserUncheckedUpdateWithoutSentNotificationsInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string passwordHash?: StringFieldUpdateOperationsInput | string role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole @@ -59930,7 +76101,13 @@ export namespace Prisma { wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null referredCustomers?: CustomerUncheckedUpdateManyWithoutReferredByAgentNestedInput + creditedOrders?: OrderUncheckedUpdateManyWithoutSalesAgentNestedInput supervisedWorkshops?: WorkshopUncheckedUpdateManyWithoutSupervisorNestedInput branchAllocations?: BranchAllocationUncheckedUpdateManyWithoutAllocatorAdminUserNestedInput postedLedgerEntries?: LedgerEntryUncheckedUpdateManyWithoutPostedByAdminUserNestedInput @@ -59938,6 +76115,8 @@ export namespace Prisma { preOrderStatusEvents?: PreOrderStatusEventUncheckedUpdateManyWithoutActorAdminUserNestedInput sentSmsMessages?: SmsMessageUncheckedUpdateManyWithoutSentByAdminUserNestedInput uploadedFiles?: UploadedFileUncheckedUpdateManyWithoutUploadedByAdminUserNestedInput + salesExpertProfile?: SalesExpertProfileUncheckedUpdateOneWithoutAdminUserNestedInput + sessions?: AdminSessionUncheckedUpdateManyWithoutAdminUserNestedInput } export type NotificationRecipientUpsertWithWhereUniqueWithoutNotificationInput = { @@ -59982,9 +76161,12 @@ export namespace Prisma { export type CustomerCreateWithoutNotificationsInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string - nationalCode: string + nationalCode?: string | null passwordHash: string + cityNameRaw?: string | null kind?: $Enums.CustomerKind phone?: string | null address?: string | null @@ -59995,10 +76177,17 @@ export namespace Prisma { goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string goldDebtGrams?: Decimal | DecimalJsLike | number | string fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string verificationStep?: $Enums.VerificationStep nationalIdImageUrl?: string | null businessLicenseUrl?: string | null shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null canPlaceOrders?: boolean isActive?: boolean isArchived?: boolean @@ -60006,6 +76195,8 @@ export namespace Prisma { updatedAt?: Date | string city?: CityCreateNestedOneWithoutCustomersInput referredByAgent?: AdminUserCreateNestedOneWithoutReferredCustomersInput + salesExpertTradingFor?: SalesExpertProfileCreateNestedOneWithoutTradingCustomerInput + referredOrders?: OrderCreateNestedManyWithoutReferrerCustomerInput avatarFile?: UploadedFileCreateNestedOneWithoutCustomerAvatarsInput addresses?: CustomerAddressCreateNestedManyWithoutCustomerInput orders?: OrderCreateNestedManyWithoutCustomerInput @@ -60015,15 +76206,20 @@ export namespace Prisma { comments?: CommentCreateNestedManyWithoutCustomerInput promotions?: PromotionCreateNestedManyWithoutCustomerInput activityLogs?: CustomerActivityLogCreateNestedManyWithoutCustomerInput + otpChallenges?: CustomerOtpCreateNestedManyWithoutCustomerInput + favorites?: CustomerFavoriteCreateNestedManyWithoutCustomerInput } export type CustomerUncheckedCreateWithoutNotificationsInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string - nationalCode: string + nationalCode?: string | null passwordHash: string cityId?: string | null + cityNameRaw?: string | null kind?: $Enums.CustomerKind phone?: string | null address?: string | null @@ -60035,16 +76231,25 @@ export namespace Prisma { goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string goldDebtGrams?: Decimal | DecimalJsLike | number | string fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string verificationStep?: $Enums.VerificationStep nationalIdImageUrl?: string | null businessLicenseUrl?: string | null shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null avatarFileId?: string | null canPlaceOrders?: boolean isActive?: boolean isArchived?: boolean createdAt?: Date | string updatedAt?: Date | string + salesExpertTradingFor?: SalesExpertProfileUncheckedCreateNestedOneWithoutTradingCustomerInput + referredOrders?: OrderUncheckedCreateNestedManyWithoutReferrerCustomerInput addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCustomerInput orders?: OrderUncheckedCreateNestedManyWithoutCustomerInput preOrders?: PreOrderUncheckedCreateNestedManyWithoutCustomerInput @@ -60053,6 +76258,8 @@ export namespace Prisma { comments?: CommentUncheckedCreateNestedManyWithoutCustomerInput promotions?: PromotionUncheckedCreateNestedManyWithoutCustomerInput activityLogs?: CustomerActivityLogUncheckedCreateNestedManyWithoutCustomerInput + otpChallenges?: CustomerOtpUncheckedCreateNestedManyWithoutCustomerInput + favorites?: CustomerFavoriteUncheckedCreateNestedManyWithoutCustomerInput } export type CustomerCreateOrConnectWithoutNotificationsInput = { @@ -60103,9 +76310,12 @@ export namespace Prisma { export type CustomerUpdateWithoutNotificationsInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string - nationalCode?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null passwordHash?: StringFieldUpdateOperationsInput | string + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind phone?: NullableStringFieldUpdateOperationsInput | string | null address?: NullableStringFieldUpdateOperationsInput | string | null @@ -60116,10 +76326,17 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean isArchived?: BoolFieldUpdateOperationsInput | boolean @@ -60127,6 +76344,8 @@ export namespace Prisma { updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string city?: CityUpdateOneWithoutCustomersNestedInput referredByAgent?: AdminUserUpdateOneWithoutReferredCustomersNestedInput + salesExpertTradingFor?: SalesExpertProfileUpdateOneWithoutTradingCustomerNestedInput + referredOrders?: OrderUpdateManyWithoutReferrerCustomerNestedInput avatarFile?: UploadedFileUpdateOneWithoutCustomerAvatarsNestedInput addresses?: CustomerAddressUpdateManyWithoutCustomerNestedInput orders?: OrderUpdateManyWithoutCustomerNestedInput @@ -60136,15 +76355,20 @@ export namespace Prisma { comments?: CommentUpdateManyWithoutCustomerNestedInput promotions?: PromotionUpdateManyWithoutCustomerNestedInput activityLogs?: CustomerActivityLogUpdateManyWithoutCustomerNestedInput + otpChallenges?: CustomerOtpUpdateManyWithoutCustomerNestedInput + favorites?: CustomerFavoriteUpdateManyWithoutCustomerNestedInput } export type CustomerUncheckedUpdateWithoutNotificationsInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string - nationalCode?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null passwordHash?: StringFieldUpdateOperationsInput | string cityId?: NullableStringFieldUpdateOperationsInput | string | null + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind phone?: NullableStringFieldUpdateOperationsInput | string | null address?: NullableStringFieldUpdateOperationsInput | string | null @@ -60156,16 +76380,25 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean isArchived?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + salesExpertTradingFor?: SalesExpertProfileUncheckedUpdateOneWithoutTradingCustomerNestedInput + referredOrders?: OrderUncheckedUpdateManyWithoutReferrerCustomerNestedInput addresses?: CustomerAddressUncheckedUpdateManyWithoutCustomerNestedInput orders?: OrderUncheckedUpdateManyWithoutCustomerNestedInput preOrders?: PreOrderUncheckedUpdateManyWithoutCustomerNestedInput @@ -60174,14 +76407,19 @@ export namespace Prisma { comments?: CommentUncheckedUpdateManyWithoutCustomerNestedInput promotions?: PromotionUncheckedUpdateManyWithoutCustomerNestedInput activityLogs?: CustomerActivityLogUncheckedUpdateManyWithoutCustomerNestedInput + otpChallenges?: CustomerOtpUncheckedUpdateManyWithoutCustomerNestedInput + favorites?: CustomerFavoriteUncheckedUpdateManyWithoutCustomerNestedInput } export type CustomerCreateWithoutActivityLogsInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string - nationalCode: string + nationalCode?: string | null passwordHash: string + cityNameRaw?: string | null kind?: $Enums.CustomerKind phone?: string | null address?: string | null @@ -60192,10 +76430,17 @@ export namespace Prisma { goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string goldDebtGrams?: Decimal | DecimalJsLike | number | string fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string verificationStep?: $Enums.VerificationStep nationalIdImageUrl?: string | null businessLicenseUrl?: string | null shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null canPlaceOrders?: boolean isActive?: boolean isArchived?: boolean @@ -60203,6 +76448,8 @@ export namespace Prisma { updatedAt?: Date | string city?: CityCreateNestedOneWithoutCustomersInput referredByAgent?: AdminUserCreateNestedOneWithoutReferredCustomersInput + salesExpertTradingFor?: SalesExpertProfileCreateNestedOneWithoutTradingCustomerInput + referredOrders?: OrderCreateNestedManyWithoutReferrerCustomerInput avatarFile?: UploadedFileCreateNestedOneWithoutCustomerAvatarsInput addresses?: CustomerAddressCreateNestedManyWithoutCustomerInput orders?: OrderCreateNestedManyWithoutCustomerInput @@ -60212,15 +76459,20 @@ export namespace Prisma { comments?: CommentCreateNestedManyWithoutCustomerInput promotions?: PromotionCreateNestedManyWithoutCustomerInput notifications?: NotificationRecipientCreateNestedManyWithoutCustomerInput + otpChallenges?: CustomerOtpCreateNestedManyWithoutCustomerInput + favorites?: CustomerFavoriteCreateNestedManyWithoutCustomerInput } export type CustomerUncheckedCreateWithoutActivityLogsInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string - nationalCode: string + nationalCode?: string | null passwordHash: string cityId?: string | null + cityNameRaw?: string | null kind?: $Enums.CustomerKind phone?: string | null address?: string | null @@ -60232,16 +76484,25 @@ export namespace Prisma { goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string goldDebtGrams?: Decimal | DecimalJsLike | number | string fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string verificationStep?: $Enums.VerificationStep nationalIdImageUrl?: string | null businessLicenseUrl?: string | null shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null avatarFileId?: string | null canPlaceOrders?: boolean isActive?: boolean isArchived?: boolean createdAt?: Date | string updatedAt?: Date | string + salesExpertTradingFor?: SalesExpertProfileUncheckedCreateNestedOneWithoutTradingCustomerInput + referredOrders?: OrderUncheckedCreateNestedManyWithoutReferrerCustomerInput addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCustomerInput orders?: OrderUncheckedCreateNestedManyWithoutCustomerInput preOrders?: PreOrderUncheckedCreateNestedManyWithoutCustomerInput @@ -60250,6 +76511,8 @@ export namespace Prisma { comments?: CommentUncheckedCreateNestedManyWithoutCustomerInput promotions?: PromotionUncheckedCreateNestedManyWithoutCustomerInput notifications?: NotificationRecipientUncheckedCreateNestedManyWithoutCustomerInput + otpChallenges?: CustomerOtpUncheckedCreateNestedManyWithoutCustomerInput + favorites?: CustomerFavoriteUncheckedCreateNestedManyWithoutCustomerInput } export type CustomerCreateOrConnectWithoutActivityLogsInput = { @@ -60271,9 +76534,12 @@ export namespace Prisma { export type CustomerUpdateWithoutActivityLogsInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string - nationalCode?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null passwordHash?: StringFieldUpdateOperationsInput | string + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind phone?: NullableStringFieldUpdateOperationsInput | string | null address?: NullableStringFieldUpdateOperationsInput | string | null @@ -60284,10 +76550,17 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean isArchived?: BoolFieldUpdateOperationsInput | boolean @@ -60295,6 +76568,8 @@ export namespace Prisma { updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string city?: CityUpdateOneWithoutCustomersNestedInput referredByAgent?: AdminUserUpdateOneWithoutReferredCustomersNestedInput + salesExpertTradingFor?: SalesExpertProfileUpdateOneWithoutTradingCustomerNestedInput + referredOrders?: OrderUpdateManyWithoutReferrerCustomerNestedInput avatarFile?: UploadedFileUpdateOneWithoutCustomerAvatarsNestedInput addresses?: CustomerAddressUpdateManyWithoutCustomerNestedInput orders?: OrderUpdateManyWithoutCustomerNestedInput @@ -60304,15 +76579,20 @@ export namespace Prisma { comments?: CommentUpdateManyWithoutCustomerNestedInput promotions?: PromotionUpdateManyWithoutCustomerNestedInput notifications?: NotificationRecipientUpdateManyWithoutCustomerNestedInput + otpChallenges?: CustomerOtpUpdateManyWithoutCustomerNestedInput + favorites?: CustomerFavoriteUpdateManyWithoutCustomerNestedInput } export type CustomerUncheckedUpdateWithoutActivityLogsInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string - nationalCode?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null passwordHash?: StringFieldUpdateOperationsInput | string cityId?: NullableStringFieldUpdateOperationsInput | string | null + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind phone?: NullableStringFieldUpdateOperationsInput | string | null address?: NullableStringFieldUpdateOperationsInput | string | null @@ -60324,16 +76604,25 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean isArchived?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + salesExpertTradingFor?: SalesExpertProfileUncheckedUpdateOneWithoutTradingCustomerNestedInput + referredOrders?: OrderUncheckedUpdateManyWithoutReferrerCustomerNestedInput addresses?: CustomerAddressUncheckedUpdateManyWithoutCustomerNestedInput orders?: OrderUncheckedUpdateManyWithoutCustomerNestedInput preOrders?: PreOrderUncheckedUpdateManyWithoutCustomerNestedInput @@ -60342,20 +76631,30 @@ export namespace Prisma { comments?: CommentUncheckedUpdateManyWithoutCustomerNestedInput promotions?: PromotionUncheckedUpdateManyWithoutCustomerNestedInput notifications?: NotificationRecipientUncheckedUpdateManyWithoutCustomerNestedInput + otpChallenges?: CustomerOtpUncheckedUpdateManyWithoutCustomerNestedInput + favorites?: CustomerFavoriteUncheckedUpdateManyWithoutCustomerNestedInput } export type AdminUserCreateWithoutUploadedFilesInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string passwordHash: string role: $Enums.AdminRole wagePercent?: Decimal | DecimalJsLike | number | string | null isActive?: boolean createdAt?: Date | string + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null userType?: UserTypeCreateNestedOneWithoutAdminUsersInput branch?: BranchCreateNestedOneWithoutAdminUsersInput + avatarFile?: UploadedFileCreateNestedOneWithoutAdminUserAvatarsInput referredCustomers?: CustomerCreateNestedManyWithoutReferredByAgentInput + creditedOrders?: OrderCreateNestedManyWithoutSalesAgentInput supervisedWorkshops?: WorkshopCreateNestedManyWithoutSupervisorInput branchAllocations?: BranchAllocationCreateNestedManyWithoutAllocatorAdminUserInput postedLedgerEntries?: LedgerEntryCreateNestedManyWithoutPostedByAdminUserInput @@ -60363,11 +76662,15 @@ export namespace Prisma { preOrderStatusEvents?: PreOrderStatusEventCreateNestedManyWithoutActorAdminUserInput sentSmsMessages?: SmsMessageCreateNestedManyWithoutSentByAdminUserInput sentNotifications?: NotificationCreateNestedManyWithoutSentByAdminUserInput + salesExpertProfile?: SalesExpertProfileCreateNestedOneWithoutAdminUserInput + sessions?: AdminSessionCreateNestedManyWithoutAdminUserInput } export type AdminUserUncheckedCreateWithoutUploadedFilesInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string passwordHash: string role: $Enums.AdminRole @@ -60376,7 +76679,13 @@ export namespace Prisma { wagePercent?: Decimal | DecimalJsLike | number | string | null isActive?: boolean createdAt?: Date | string + avatarFileId?: string | null + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null referredCustomers?: CustomerUncheckedCreateNestedManyWithoutReferredByAgentInput + creditedOrders?: OrderUncheckedCreateNestedManyWithoutSalesAgentInput supervisedWorkshops?: WorkshopUncheckedCreateNestedManyWithoutSupervisorInput branchAllocations?: BranchAllocationUncheckedCreateNestedManyWithoutAllocatorAdminUserInput postedLedgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutPostedByAdminUserInput @@ -60384,6 +76693,8 @@ export namespace Prisma { preOrderStatusEvents?: PreOrderStatusEventUncheckedCreateNestedManyWithoutActorAdminUserInput sentSmsMessages?: SmsMessageUncheckedCreateNestedManyWithoutSentByAdminUserInput sentNotifications?: NotificationUncheckedCreateNestedManyWithoutSentByAdminUserInput + salesExpertProfile?: SalesExpertProfileUncheckedCreateNestedOneWithoutAdminUserInput + sessions?: AdminSessionUncheckedCreateNestedManyWithoutAdminUserInput } export type AdminUserCreateOrConnectWithoutUploadedFilesInput = { @@ -60394,9 +76705,12 @@ export namespace Prisma { export type CustomerCreateWithoutAvatarFileInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string - nationalCode: string + nationalCode?: string | null passwordHash: string + cityNameRaw?: string | null kind?: $Enums.CustomerKind phone?: string | null address?: string | null @@ -60407,10 +76721,17 @@ export namespace Prisma { goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string goldDebtGrams?: Decimal | DecimalJsLike | number | string fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string verificationStep?: $Enums.VerificationStep nationalIdImageUrl?: string | null businessLicenseUrl?: string | null shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null canPlaceOrders?: boolean isActive?: boolean isArchived?: boolean @@ -60418,6 +76739,8 @@ export namespace Prisma { updatedAt?: Date | string city?: CityCreateNestedOneWithoutCustomersInput referredByAgent?: AdminUserCreateNestedOneWithoutReferredCustomersInput + salesExpertTradingFor?: SalesExpertProfileCreateNestedOneWithoutTradingCustomerInput + referredOrders?: OrderCreateNestedManyWithoutReferrerCustomerInput addresses?: CustomerAddressCreateNestedManyWithoutCustomerInput orders?: OrderCreateNestedManyWithoutCustomerInput preOrders?: PreOrderCreateNestedManyWithoutCustomerInput @@ -60427,15 +76750,20 @@ export namespace Prisma { promotions?: PromotionCreateNestedManyWithoutCustomerInput notifications?: NotificationRecipientCreateNestedManyWithoutCustomerInput activityLogs?: CustomerActivityLogCreateNestedManyWithoutCustomerInput + otpChallenges?: CustomerOtpCreateNestedManyWithoutCustomerInput + favorites?: CustomerFavoriteCreateNestedManyWithoutCustomerInput } export type CustomerUncheckedCreateWithoutAvatarFileInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string - nationalCode: string + nationalCode?: string | null passwordHash: string cityId?: string | null + cityNameRaw?: string | null kind?: $Enums.CustomerKind phone?: string | null address?: string | null @@ -60447,15 +76775,24 @@ export namespace Prisma { goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string goldDebtGrams?: Decimal | DecimalJsLike | number | string fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string verificationStep?: $Enums.VerificationStep nationalIdImageUrl?: string | null businessLicenseUrl?: string | null shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null canPlaceOrders?: boolean isActive?: boolean isArchived?: boolean createdAt?: Date | string updatedAt?: Date | string + salesExpertTradingFor?: SalesExpertProfileUncheckedCreateNestedOneWithoutTradingCustomerInput + referredOrders?: OrderUncheckedCreateNestedManyWithoutReferrerCustomerInput addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCustomerInput orders?: OrderUncheckedCreateNestedManyWithoutCustomerInput preOrders?: PreOrderUncheckedCreateNestedManyWithoutCustomerInput @@ -60465,6 +76802,8 @@ export namespace Prisma { promotions?: PromotionUncheckedCreateNestedManyWithoutCustomerInput notifications?: NotificationRecipientUncheckedCreateNestedManyWithoutCustomerInput activityLogs?: CustomerActivityLogUncheckedCreateNestedManyWithoutCustomerInput + otpChallenges?: CustomerOtpUncheckedCreateNestedManyWithoutCustomerInput + favorites?: CustomerFavoriteUncheckedCreateNestedManyWithoutCustomerInput } export type CustomerCreateOrConnectWithoutAvatarFileInput = { @@ -60477,6 +76816,78 @@ export namespace Prisma { skipDuplicates?: boolean } + export type AdminUserCreateWithoutAvatarFileInput = { + id?: string + fullName: string + firstName?: string | null + lastName?: string | null + mobile: string + passwordHash: string + role: $Enums.AdminRole + wagePercent?: Decimal | DecimalJsLike | number | string | null + isActive?: boolean + createdAt?: Date | string + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null + userType?: UserTypeCreateNestedOneWithoutAdminUsersInput + branch?: BranchCreateNestedOneWithoutAdminUsersInput + referredCustomers?: CustomerCreateNestedManyWithoutReferredByAgentInput + creditedOrders?: OrderCreateNestedManyWithoutSalesAgentInput + supervisedWorkshops?: WorkshopCreateNestedManyWithoutSupervisorInput + branchAllocations?: BranchAllocationCreateNestedManyWithoutAllocatorAdminUserInput + postedLedgerEntries?: LedgerEntryCreateNestedManyWithoutPostedByAdminUserInput + orderStatusEvents?: OrderStatusEventCreateNestedManyWithoutActorAdminUserInput + preOrderStatusEvents?: PreOrderStatusEventCreateNestedManyWithoutActorAdminUserInput + sentSmsMessages?: SmsMessageCreateNestedManyWithoutSentByAdminUserInput + sentNotifications?: NotificationCreateNestedManyWithoutSentByAdminUserInput + uploadedFiles?: UploadedFileCreateNestedManyWithoutUploadedByAdminUserInput + salesExpertProfile?: SalesExpertProfileCreateNestedOneWithoutAdminUserInput + sessions?: AdminSessionCreateNestedManyWithoutAdminUserInput + } + + export type AdminUserUncheckedCreateWithoutAvatarFileInput = { + id?: string + fullName: string + firstName?: string | null + lastName?: string | null + mobile: string + passwordHash: string + role: $Enums.AdminRole + userTypeId?: number | null + branchId?: string | null + wagePercent?: Decimal | DecimalJsLike | number | string | null + isActive?: boolean + createdAt?: Date | string + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null + referredCustomers?: CustomerUncheckedCreateNestedManyWithoutReferredByAgentInput + creditedOrders?: OrderUncheckedCreateNestedManyWithoutSalesAgentInput + supervisedWorkshops?: WorkshopUncheckedCreateNestedManyWithoutSupervisorInput + branchAllocations?: BranchAllocationUncheckedCreateNestedManyWithoutAllocatorAdminUserInput + postedLedgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutPostedByAdminUserInput + orderStatusEvents?: OrderStatusEventUncheckedCreateNestedManyWithoutActorAdminUserInput + preOrderStatusEvents?: PreOrderStatusEventUncheckedCreateNestedManyWithoutActorAdminUserInput + sentSmsMessages?: SmsMessageUncheckedCreateNestedManyWithoutSentByAdminUserInput + sentNotifications?: NotificationUncheckedCreateNestedManyWithoutSentByAdminUserInput + uploadedFiles?: UploadedFileUncheckedCreateNestedManyWithoutUploadedByAdminUserInput + salesExpertProfile?: SalesExpertProfileUncheckedCreateNestedOneWithoutAdminUserInput + sessions?: AdminSessionUncheckedCreateNestedManyWithoutAdminUserInput + } + + export type AdminUserCreateOrConnectWithoutAvatarFileInput = { + where: AdminUserWhereUniqueInput + create: XOR + } + + export type AdminUserCreateManyAvatarFileInputEnvelope = { + data: AdminUserCreateManyAvatarFileInput | AdminUserCreateManyAvatarFileInput[] + skipDuplicates?: boolean + } + export type AdminUserUpsertWithoutUploadedFilesInput = { update: XOR create: XOR @@ -60491,15 +76902,23 @@ export namespace Prisma { export type AdminUserUpdateWithoutUploadedFilesInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string passwordHash?: StringFieldUpdateOperationsInput | string role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null userType?: UserTypeUpdateOneWithoutAdminUsersNestedInput branch?: BranchUpdateOneWithoutAdminUsersNestedInput + avatarFile?: UploadedFileUpdateOneWithoutAdminUserAvatarsNestedInput referredCustomers?: CustomerUpdateManyWithoutReferredByAgentNestedInput + creditedOrders?: OrderUpdateManyWithoutSalesAgentNestedInput supervisedWorkshops?: WorkshopUpdateManyWithoutSupervisorNestedInput branchAllocations?: BranchAllocationUpdateManyWithoutAllocatorAdminUserNestedInput postedLedgerEntries?: LedgerEntryUpdateManyWithoutPostedByAdminUserNestedInput @@ -60507,11 +76926,15 @@ export namespace Prisma { preOrderStatusEvents?: PreOrderStatusEventUpdateManyWithoutActorAdminUserNestedInput sentSmsMessages?: SmsMessageUpdateManyWithoutSentByAdminUserNestedInput sentNotifications?: NotificationUpdateManyWithoutSentByAdminUserNestedInput + salesExpertProfile?: SalesExpertProfileUpdateOneWithoutAdminUserNestedInput + sessions?: AdminSessionUpdateManyWithoutAdminUserNestedInput } export type AdminUserUncheckedUpdateWithoutUploadedFilesInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string passwordHash?: StringFieldUpdateOperationsInput | string role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole @@ -60520,7 +76943,13 @@ export namespace Prisma { wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null referredCustomers?: CustomerUncheckedUpdateManyWithoutReferredByAgentNestedInput + creditedOrders?: OrderUncheckedUpdateManyWithoutSalesAgentNestedInput supervisedWorkshops?: WorkshopUncheckedUpdateManyWithoutSupervisorNestedInput branchAllocations?: BranchAllocationUncheckedUpdateManyWithoutAllocatorAdminUserNestedInput postedLedgerEntries?: LedgerEntryUncheckedUpdateManyWithoutPostedByAdminUserNestedInput @@ -60528,6 +76957,8 @@ export namespace Prisma { preOrderStatusEvents?: PreOrderStatusEventUncheckedUpdateManyWithoutActorAdminUserNestedInput sentSmsMessages?: SmsMessageUncheckedUpdateManyWithoutSentByAdminUserNestedInput sentNotifications?: NotificationUncheckedUpdateManyWithoutSentByAdminUserNestedInput + salesExpertProfile?: SalesExpertProfileUncheckedUpdateOneWithoutAdminUserNestedInput + sessions?: AdminSessionUncheckedUpdateManyWithoutAdminUserNestedInput } export type CustomerUpsertWithWhereUniqueWithoutAvatarFileInput = { @@ -60546,12 +76977,84 @@ export namespace Prisma { data: XOR } - export type CustomerCreateManyCityInput = { + export type AdminUserUpsertWithWhereUniqueWithoutAvatarFileInput = { + where: AdminUserWhereUniqueInput + update: XOR + create: XOR + } + + export type AdminUserUpdateWithWhereUniqueWithoutAvatarFileInput = { + where: AdminUserWhereUniqueInput + data: XOR + } + + export type AdminUserUpdateManyWithWhereWithoutAvatarFileInput = { + where: AdminUserScalarWhereInput + data: XOR + } + + export type CustomerCreateWithoutOtpChallengesInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string - nationalCode: string + nationalCode?: string | null passwordHash: string + cityNameRaw?: string | null + kind?: $Enums.CustomerKind + phone?: string | null + address?: string | null + storeName?: string | null + pasazhName?: string | null + zone?: string | null + memberCode?: string | null + goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string + goldDebtGrams?: Decimal | DecimalJsLike | number | string + fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string + verificationStep?: $Enums.VerificationStep + nationalIdImageUrl?: string | null + businessLicenseUrl?: string | null + shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null + canPlaceOrders?: boolean + isActive?: boolean + isArchived?: boolean + createdAt?: Date | string + updatedAt?: Date | string + city?: CityCreateNestedOneWithoutCustomersInput + referredByAgent?: AdminUserCreateNestedOneWithoutReferredCustomersInput + salesExpertTradingFor?: SalesExpertProfileCreateNestedOneWithoutTradingCustomerInput + referredOrders?: OrderCreateNestedManyWithoutReferrerCustomerInput + avatarFile?: UploadedFileCreateNestedOneWithoutCustomerAvatarsInput + addresses?: CustomerAddressCreateNestedManyWithoutCustomerInput + orders?: OrderCreateNestedManyWithoutCustomerInput + preOrders?: PreOrderCreateNestedManyWithoutCustomerInput + ledgerEntries?: LedgerEntryCreateNestedManyWithoutCustomerInput + walletBonuses?: WalletBonusCreateNestedManyWithoutCustomerInput + comments?: CommentCreateNestedManyWithoutCustomerInput + promotions?: PromotionCreateNestedManyWithoutCustomerInput + notifications?: NotificationRecipientCreateNestedManyWithoutCustomerInput + activityLogs?: CustomerActivityLogCreateNestedManyWithoutCustomerInput + favorites?: CustomerFavoriteCreateNestedManyWithoutCustomerInput + } + + export type CustomerUncheckedCreateWithoutOtpChallengesInput = { + id?: string + fullName: string + firstName?: string | null + lastName?: string | null + mobile: string + nationalCode?: string | null + passwordHash: string + cityId?: string | null + cityNameRaw?: string | null kind?: $Enums.CustomerKind phone?: string | null address?: string | null @@ -60563,10 +77066,195 @@ export namespace Prisma { goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string goldDebtGrams?: Decimal | DecimalJsLike | number | string fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string verificationStep?: $Enums.VerificationStep nationalIdImageUrl?: string | null businessLicenseUrl?: string | null shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null + avatarFileId?: string | null + canPlaceOrders?: boolean + isActive?: boolean + isArchived?: boolean + createdAt?: Date | string + updatedAt?: Date | string + salesExpertTradingFor?: SalesExpertProfileUncheckedCreateNestedOneWithoutTradingCustomerInput + referredOrders?: OrderUncheckedCreateNestedManyWithoutReferrerCustomerInput + addresses?: CustomerAddressUncheckedCreateNestedManyWithoutCustomerInput + orders?: OrderUncheckedCreateNestedManyWithoutCustomerInput + preOrders?: PreOrderUncheckedCreateNestedManyWithoutCustomerInput + ledgerEntries?: LedgerEntryUncheckedCreateNestedManyWithoutCustomerInput + walletBonuses?: WalletBonusUncheckedCreateNestedManyWithoutCustomerInput + comments?: CommentUncheckedCreateNestedManyWithoutCustomerInput + promotions?: PromotionUncheckedCreateNestedManyWithoutCustomerInput + notifications?: NotificationRecipientUncheckedCreateNestedManyWithoutCustomerInput + activityLogs?: CustomerActivityLogUncheckedCreateNestedManyWithoutCustomerInput + favorites?: CustomerFavoriteUncheckedCreateNestedManyWithoutCustomerInput + } + + export type CustomerCreateOrConnectWithoutOtpChallengesInput = { + where: CustomerWhereUniqueInput + create: XOR + } + + export type CustomerUpsertWithoutOtpChallengesInput = { + update: XOR + create: XOR + where?: CustomerWhereInput + } + + export type CustomerUpdateToOneWithWhereWithoutOtpChallengesInput = { + where?: CustomerWhereInput + data: XOR + } + + export type CustomerUpdateWithoutOtpChallengesInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null + mobile?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null + passwordHash?: StringFieldUpdateOperationsInput | string + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null + kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind + phone?: NullableStringFieldUpdateOperationsInput | string | null + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + zone?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null + goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep + nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null + shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean + isActive?: BoolFieldUpdateOperationsInput | boolean + isArchived?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + city?: CityUpdateOneWithoutCustomersNestedInput + referredByAgent?: AdminUserUpdateOneWithoutReferredCustomersNestedInput + salesExpertTradingFor?: SalesExpertProfileUpdateOneWithoutTradingCustomerNestedInput + referredOrders?: OrderUpdateManyWithoutReferrerCustomerNestedInput + avatarFile?: UploadedFileUpdateOneWithoutCustomerAvatarsNestedInput + addresses?: CustomerAddressUpdateManyWithoutCustomerNestedInput + orders?: OrderUpdateManyWithoutCustomerNestedInput + preOrders?: PreOrderUpdateManyWithoutCustomerNestedInput + ledgerEntries?: LedgerEntryUpdateManyWithoutCustomerNestedInput + walletBonuses?: WalletBonusUpdateManyWithoutCustomerNestedInput + comments?: CommentUpdateManyWithoutCustomerNestedInput + promotions?: PromotionUpdateManyWithoutCustomerNestedInput + notifications?: NotificationRecipientUpdateManyWithoutCustomerNestedInput + activityLogs?: CustomerActivityLogUpdateManyWithoutCustomerNestedInput + favorites?: CustomerFavoriteUpdateManyWithoutCustomerNestedInput + } + + export type CustomerUncheckedUpdateWithoutOtpChallengesInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null + mobile?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null + passwordHash?: StringFieldUpdateOperationsInput | string + cityId?: NullableStringFieldUpdateOperationsInput | string | null + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null + kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind + phone?: NullableStringFieldUpdateOperationsInput | string | null + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + zone?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null + referredByAgentId?: NullableStringFieldUpdateOperationsInput | string | null + goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep + nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null + shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null + canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean + isActive?: BoolFieldUpdateOperationsInput | boolean + isArchived?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + salesExpertTradingFor?: SalesExpertProfileUncheckedUpdateOneWithoutTradingCustomerNestedInput + referredOrders?: OrderUncheckedUpdateManyWithoutReferrerCustomerNestedInput + addresses?: CustomerAddressUncheckedUpdateManyWithoutCustomerNestedInput + orders?: OrderUncheckedUpdateManyWithoutCustomerNestedInput + preOrders?: PreOrderUncheckedUpdateManyWithoutCustomerNestedInput + ledgerEntries?: LedgerEntryUncheckedUpdateManyWithoutCustomerNestedInput + walletBonuses?: WalletBonusUncheckedUpdateManyWithoutCustomerNestedInput + comments?: CommentUncheckedUpdateManyWithoutCustomerNestedInput + promotions?: PromotionUncheckedUpdateManyWithoutCustomerNestedInput + notifications?: NotificationRecipientUncheckedUpdateManyWithoutCustomerNestedInput + activityLogs?: CustomerActivityLogUncheckedUpdateManyWithoutCustomerNestedInput + favorites?: CustomerFavoriteUncheckedUpdateManyWithoutCustomerNestedInput + } + + export type CityCreateManyParentInput = { + id?: string + name: string + percent?: Decimal | DecimalJsLike | number | string | null + percentAux?: Decimal | DecimalJsLike | number | string | null + } + + export type CustomerCreateManyCityInput = { + id?: string + fullName: string + firstName?: string | null + lastName?: string | null + mobile: string + nationalCode?: string | null + passwordHash: string + cityNameRaw?: string | null + kind?: $Enums.CustomerKind + phone?: string | null + address?: string | null + storeName?: string | null + pasazhName?: string | null + zone?: string | null + memberCode?: string | null + referredByAgentId?: string | null + goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string + goldDebtGrams?: Decimal | DecimalJsLike | number | string + fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string + verificationStep?: $Enums.VerificationStep + nationalIdImageUrl?: string | null + businessLicenseUrl?: string | null + shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null avatarFileId?: string | null canPlaceOrders?: boolean isActive?: boolean @@ -60608,12 +77296,59 @@ export namespace Prisma { updatedAt?: Date | string } + export type SalesExpertProfileCreateManyCityInput = { + id?: string + adminUserId: string + gramLevel?: Decimal | DecimalJsLike | number | string + phone?: string | null + nationalCode?: string | null + tradingCustomerId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + } + + export type CityUpdateWithoutParentInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + percent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + percentAux?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + children?: CityUpdateManyWithoutParentNestedInput + customers?: CustomerUpdateManyWithoutCityNestedInput + addresses?: CustomerAddressUpdateManyWithoutCityNestedInput + branches?: BranchUpdateManyWithoutCityNestedInput + preOrders?: PreOrderUpdateManyWithoutCityNestedInput + salesExpertProfiles?: SalesExpertProfileUpdateManyWithoutCityNestedInput + } + + export type CityUncheckedUpdateWithoutParentInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + percent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + percentAux?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + children?: CityUncheckedUpdateManyWithoutParentNestedInput + customers?: CustomerUncheckedUpdateManyWithoutCityNestedInput + addresses?: CustomerAddressUncheckedUpdateManyWithoutCityNestedInput + branches?: BranchUncheckedUpdateManyWithoutCityNestedInput + preOrders?: PreOrderUncheckedUpdateManyWithoutCityNestedInput + salesExpertProfiles?: SalesExpertProfileUncheckedUpdateManyWithoutCityNestedInput + } + + export type CityUncheckedUpdateManyWithoutParentInput = { + id?: StringFieldUpdateOperationsInput | string + name?: StringFieldUpdateOperationsInput | string + percent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + percentAux?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + } + export type CustomerUpdateWithoutCityInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string - nationalCode?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null passwordHash?: StringFieldUpdateOperationsInput | string + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind phone?: NullableStringFieldUpdateOperationsInput | string | null address?: NullableStringFieldUpdateOperationsInput | string | null @@ -60624,16 +77359,25 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean isArchived?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string referredByAgent?: AdminUserUpdateOneWithoutReferredCustomersNestedInput + salesExpertTradingFor?: SalesExpertProfileUpdateOneWithoutTradingCustomerNestedInput + referredOrders?: OrderUpdateManyWithoutReferrerCustomerNestedInput avatarFile?: UploadedFileUpdateOneWithoutCustomerAvatarsNestedInput addresses?: CustomerAddressUpdateManyWithoutCustomerNestedInput orders?: OrderUpdateManyWithoutCustomerNestedInput @@ -60644,14 +77388,19 @@ export namespace Prisma { promotions?: PromotionUpdateManyWithoutCustomerNestedInput notifications?: NotificationRecipientUpdateManyWithoutCustomerNestedInput activityLogs?: CustomerActivityLogUpdateManyWithoutCustomerNestedInput + otpChallenges?: CustomerOtpUpdateManyWithoutCustomerNestedInput + favorites?: CustomerFavoriteUpdateManyWithoutCustomerNestedInput } export type CustomerUncheckedUpdateWithoutCityInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string - nationalCode?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null passwordHash?: StringFieldUpdateOperationsInput | string + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind phone?: NullableStringFieldUpdateOperationsInput | string | null address?: NullableStringFieldUpdateOperationsInput | string | null @@ -60663,16 +77412,25 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean isArchived?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + salesExpertTradingFor?: SalesExpertProfileUncheckedUpdateOneWithoutTradingCustomerNestedInput + referredOrders?: OrderUncheckedUpdateManyWithoutReferrerCustomerNestedInput addresses?: CustomerAddressUncheckedUpdateManyWithoutCustomerNestedInput orders?: OrderUncheckedUpdateManyWithoutCustomerNestedInput preOrders?: PreOrderUncheckedUpdateManyWithoutCustomerNestedInput @@ -60682,14 +77440,19 @@ export namespace Prisma { promotions?: PromotionUncheckedUpdateManyWithoutCustomerNestedInput notifications?: NotificationRecipientUncheckedUpdateManyWithoutCustomerNestedInput activityLogs?: CustomerActivityLogUncheckedUpdateManyWithoutCustomerNestedInput + otpChallenges?: CustomerOtpUncheckedUpdateManyWithoutCustomerNestedInput + favorites?: CustomerFavoriteUncheckedUpdateManyWithoutCustomerNestedInput } export type CustomerUncheckedUpdateManyWithoutCityInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string - nationalCode?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null passwordHash?: StringFieldUpdateOperationsInput | string + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind phone?: NullableStringFieldUpdateOperationsInput | string | null address?: NullableStringFieldUpdateOperationsInput | string | null @@ -60701,10 +77464,17 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean @@ -60820,13 +77590,49 @@ export namespace Prisma { updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } + export type SalesExpertProfileUpdateWithoutCityInput = { + id?: StringFieldUpdateOperationsInput | string + gramLevel?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + phone?: NullableStringFieldUpdateOperationsInput | string | null + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + adminUser?: AdminUserUpdateOneRequiredWithoutSalesExpertProfileNestedInput + tradingCustomer?: CustomerUpdateOneWithoutSalesExpertTradingForNestedInput + } + + export type SalesExpertProfileUncheckedUpdateWithoutCityInput = { + id?: StringFieldUpdateOperationsInput | string + adminUserId?: StringFieldUpdateOperationsInput | string + gramLevel?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + phone?: NullableStringFieldUpdateOperationsInput | string | null + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null + tradingCustomerId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type SalesExpertProfileUncheckedUpdateManyWithoutCityInput = { + id?: StringFieldUpdateOperationsInput | string + adminUserId?: StringFieldUpdateOperationsInput | string + gramLevel?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + phone?: NullableStringFieldUpdateOperationsInput | string | null + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null + tradingCustomerId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + export type CustomerCreateManyReferredByAgentInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string - nationalCode: string + nationalCode?: string | null passwordHash: string cityId?: string | null + cityNameRaw?: string | null kind?: $Enums.CustomerKind phone?: string | null address?: string | null @@ -60837,10 +77643,17 @@ export namespace Prisma { goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string goldDebtGrams?: Decimal | DecimalJsLike | number | string fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string verificationStep?: $Enums.VerificationStep nationalIdImageUrl?: string | null businessLicenseUrl?: string | null shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null avatarFileId?: string | null canPlaceOrders?: boolean isActive?: boolean @@ -60849,6 +77662,23 @@ export namespace Prisma { updatedAt?: Date | string } + export type OrderCreateManySalesAgentInput = { + id?: string + orderNumber: string + customerId: string + branchId?: string | null + channel?: $Enums.OrderChannel + status?: $Enums.OrderStatus + totalGoldWeightGrams: Decimal | DecimalJsLike | number | string + wageWeightGrams: Decimal | DecimalJsLike | number | string + flatRialCharge?: Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: boolean + deliveredAt?: Date | string | null + referrerCustomerId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + } + export type WorkshopCreateManySupervisorInput = { id?: string name: string @@ -60932,12 +77762,29 @@ export namespace Prisma { createdAt?: Date | string } + export type AdminSessionCreateManyAdminUserInput = { + id?: string + jti: string + iamSessionId?: string | null + iamSub?: string | null + ipAddress?: string | null + userAgent?: string | null + createdAt?: Date | string + expiresAt?: Date | string | null + lastSeenAt?: Date | string | null + revokedAt?: Date | string | null + revokedReason?: string | null + } + export type CustomerUpdateWithoutReferredByAgentInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string - nationalCode?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null passwordHash?: StringFieldUpdateOperationsInput | string + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind phone?: NullableStringFieldUpdateOperationsInput | string | null address?: NullableStringFieldUpdateOperationsInput | string | null @@ -60948,16 +77795,25 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean isArchived?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string city?: CityUpdateOneWithoutCustomersNestedInput + salesExpertTradingFor?: SalesExpertProfileUpdateOneWithoutTradingCustomerNestedInput + referredOrders?: OrderUpdateManyWithoutReferrerCustomerNestedInput avatarFile?: UploadedFileUpdateOneWithoutCustomerAvatarsNestedInput addresses?: CustomerAddressUpdateManyWithoutCustomerNestedInput orders?: OrderUpdateManyWithoutCustomerNestedInput @@ -60968,15 +77824,20 @@ export namespace Prisma { promotions?: PromotionUpdateManyWithoutCustomerNestedInput notifications?: NotificationRecipientUpdateManyWithoutCustomerNestedInput activityLogs?: CustomerActivityLogUpdateManyWithoutCustomerNestedInput + otpChallenges?: CustomerOtpUpdateManyWithoutCustomerNestedInput + favorites?: CustomerFavoriteUpdateManyWithoutCustomerNestedInput } export type CustomerUncheckedUpdateWithoutReferredByAgentInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string - nationalCode?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null passwordHash?: StringFieldUpdateOperationsInput | string cityId?: NullableStringFieldUpdateOperationsInput | string | null + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind phone?: NullableStringFieldUpdateOperationsInput | string | null address?: NullableStringFieldUpdateOperationsInput | string | null @@ -60987,16 +77848,25 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean isArchived?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + salesExpertTradingFor?: SalesExpertProfileUncheckedUpdateOneWithoutTradingCustomerNestedInput + referredOrders?: OrderUncheckedUpdateManyWithoutReferrerCustomerNestedInput addresses?: CustomerAddressUncheckedUpdateManyWithoutCustomerNestedInput orders?: OrderUncheckedUpdateManyWithoutCustomerNestedInput preOrders?: PreOrderUncheckedUpdateManyWithoutCustomerNestedInput @@ -61006,15 +77876,20 @@ export namespace Prisma { promotions?: PromotionUncheckedUpdateManyWithoutCustomerNestedInput notifications?: NotificationRecipientUncheckedUpdateManyWithoutCustomerNestedInput activityLogs?: CustomerActivityLogUncheckedUpdateManyWithoutCustomerNestedInput + otpChallenges?: CustomerOtpUncheckedUpdateManyWithoutCustomerNestedInput + favorites?: CustomerFavoriteUncheckedUpdateManyWithoutCustomerNestedInput } export type CustomerUncheckedUpdateManyWithoutReferredByAgentInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string - nationalCode?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null passwordHash?: StringFieldUpdateOperationsInput | string cityId?: NullableStringFieldUpdateOperationsInput | string | null + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind phone?: NullableStringFieldUpdateOperationsInput | string | null address?: NullableStringFieldUpdateOperationsInput | string | null @@ -61025,10 +77900,17 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean @@ -61037,6 +77919,65 @@ export namespace Prisma { updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } + export type OrderUpdateWithoutSalesAgentInput = { + id?: StringFieldUpdateOperationsInput | string + orderNumber?: StringFieldUpdateOperationsInput | string + channel?: EnumOrderChannelFieldUpdateOperationsInput | $Enums.OrderChannel + status?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + totalGoldWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wageWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean + deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + customer?: CustomerUpdateOneRequiredWithoutOrdersNestedInput + branch?: BranchUpdateOneWithoutOrdersNestedInput + referrerCustomer?: CustomerUpdateOneWithoutReferredOrdersNestedInput + items?: OrderItemUpdateManyWithoutOrderNestedInput + statusEvents?: OrderStatusEventUpdateManyWithoutOrderNestedInput + ledgerEntries?: LedgerEntryUpdateManyWithoutOrderNestedInput + convertedFromPreOrder?: PreOrderUpdateOneWithoutConvertedOrderNestedInput + } + + export type OrderUncheckedUpdateWithoutSalesAgentInput = { + id?: StringFieldUpdateOperationsInput | string + orderNumber?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + branchId?: NullableStringFieldUpdateOperationsInput | string | null + channel?: EnumOrderChannelFieldUpdateOperationsInput | $Enums.OrderChannel + status?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + totalGoldWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wageWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean + deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + referrerCustomerId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + items?: OrderItemUncheckedUpdateManyWithoutOrderNestedInput + statusEvents?: OrderStatusEventUncheckedUpdateManyWithoutOrderNestedInput + ledgerEntries?: LedgerEntryUncheckedUpdateManyWithoutOrderNestedInput + convertedFromPreOrder?: PreOrderUncheckedUpdateOneWithoutConvertedOrderNestedInput + } + + export type OrderUncheckedUpdateManyWithoutSalesAgentInput = { + id?: StringFieldUpdateOperationsInput | string + orderNumber?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + branchId?: NullableStringFieldUpdateOperationsInput | string | null + channel?: EnumOrderChannelFieldUpdateOperationsInput | $Enums.OrderChannel + status?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + totalGoldWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wageWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean + deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + referrerCustomerId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + export type WorkshopUpdateWithoutSupervisorInput = { id?: StringFieldUpdateOperationsInput | string name?: StringFieldUpdateOperationsInput | string @@ -61271,6 +78212,7 @@ export namespace Prisma { purpose?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string customerAvatars?: CustomerUpdateManyWithoutAvatarFileNestedInput + adminUserAvatars?: AdminUserUpdateManyWithoutAvatarFileNestedInput } export type UploadedFileUncheckedUpdateWithoutUploadedByAdminUserInput = { @@ -61282,6 +78224,7 @@ export namespace Prisma { purpose?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string customerAvatars?: CustomerUncheckedUpdateManyWithoutAvatarFileNestedInput + adminUserAvatars?: AdminUserUncheckedUpdateManyWithoutAvatarFileNestedInput } export type UploadedFileUncheckedUpdateManyWithoutUploadedByAdminUserInput = { @@ -61294,6 +78237,65 @@ export namespace Prisma { createdAt?: DateTimeFieldUpdateOperationsInput | Date | string } + export type AdminSessionUpdateWithoutAdminUserInput = { + id?: StringFieldUpdateOperationsInput | string + jti?: StringFieldUpdateOperationsInput | string + iamSessionId?: NullableStringFieldUpdateOperationsInput | string | null + iamSub?: NullableStringFieldUpdateOperationsInput | string | null + ipAddress?: NullableStringFieldUpdateOperationsInput | string | null + userAgent?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + expiresAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + lastSeenAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + revokedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + revokedReason?: NullableStringFieldUpdateOperationsInput | string | null + } + + export type AdminSessionUncheckedUpdateWithoutAdminUserInput = { + id?: StringFieldUpdateOperationsInput | string + jti?: StringFieldUpdateOperationsInput | string + iamSessionId?: NullableStringFieldUpdateOperationsInput | string | null + iamSub?: NullableStringFieldUpdateOperationsInput | string | null + ipAddress?: NullableStringFieldUpdateOperationsInput | string | null + userAgent?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + expiresAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + lastSeenAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + revokedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + revokedReason?: NullableStringFieldUpdateOperationsInput | string | null + } + + export type AdminSessionUncheckedUpdateManyWithoutAdminUserInput = { + id?: StringFieldUpdateOperationsInput | string + jti?: StringFieldUpdateOperationsInput | string + iamSessionId?: NullableStringFieldUpdateOperationsInput | string | null + iamSub?: NullableStringFieldUpdateOperationsInput | string | null + ipAddress?: NullableStringFieldUpdateOperationsInput | string | null + userAgent?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + expiresAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + lastSeenAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + revokedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + revokedReason?: NullableStringFieldUpdateOperationsInput | string | null + } + + export type OrderCreateManyReferrerCustomerInput = { + id?: string + orderNumber: string + customerId: string + branchId?: string | null + channel?: $Enums.OrderChannel + status?: $Enums.OrderStatus + totalGoldWeightGrams: Decimal | DecimalJsLike | number | string + wageWeightGrams: Decimal | DecimalJsLike | number | string + flatRialCharge?: Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: boolean + deliveredAt?: Date | string | null + salesAgentId?: string | null + createdAt?: Date | string + updatedAt?: Date | string + } + export type CustomerAddressCreateManyCustomerInput = { id?: string cityId?: string | null @@ -61312,6 +78314,8 @@ export namespace Prisma { flatRialCharge?: Decimal | DecimalJsLike | number | string isSuspendedOverCreditLimit?: boolean deliveredAt?: Date | string | null + salesAgentId?: string | null + referrerCustomerId?: string | null createdAt?: Date | string updatedAt?: Date | string } @@ -61409,6 +78413,81 @@ export namespace Prisma { createdAt?: Date | string } + export type CustomerOtpCreateManyCustomerInput = { + id?: string + mobile: string + codeHash: string + expiresAt: Date | string + attempts?: number + consumedAt?: Date | string | null + requestIp?: string | null + createdAt?: Date | string + } + + export type CustomerFavoriteCreateManyCustomerInput = { + productId: string + createdAt?: Date | string + } + + export type OrderUpdateWithoutReferrerCustomerInput = { + id?: StringFieldUpdateOperationsInput | string + orderNumber?: StringFieldUpdateOperationsInput | string + channel?: EnumOrderChannelFieldUpdateOperationsInput | $Enums.OrderChannel + status?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + totalGoldWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wageWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean + deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + customer?: CustomerUpdateOneRequiredWithoutOrdersNestedInput + branch?: BranchUpdateOneWithoutOrdersNestedInput + salesAgent?: AdminUserUpdateOneWithoutCreditedOrdersNestedInput + items?: OrderItemUpdateManyWithoutOrderNestedInput + statusEvents?: OrderStatusEventUpdateManyWithoutOrderNestedInput + ledgerEntries?: LedgerEntryUpdateManyWithoutOrderNestedInput + convertedFromPreOrder?: PreOrderUpdateOneWithoutConvertedOrderNestedInput + } + + export type OrderUncheckedUpdateWithoutReferrerCustomerInput = { + id?: StringFieldUpdateOperationsInput | string + orderNumber?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + branchId?: NullableStringFieldUpdateOperationsInput | string | null + channel?: EnumOrderChannelFieldUpdateOperationsInput | $Enums.OrderChannel + status?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + totalGoldWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wageWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean + deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + salesAgentId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + items?: OrderItemUncheckedUpdateManyWithoutOrderNestedInput + statusEvents?: OrderStatusEventUncheckedUpdateManyWithoutOrderNestedInput + ledgerEntries?: LedgerEntryUncheckedUpdateManyWithoutOrderNestedInput + convertedFromPreOrder?: PreOrderUncheckedUpdateOneWithoutConvertedOrderNestedInput + } + + export type OrderUncheckedUpdateManyWithoutReferrerCustomerInput = { + id?: StringFieldUpdateOperationsInput | string + orderNumber?: StringFieldUpdateOperationsInput | string + customerId?: StringFieldUpdateOperationsInput | string + branchId?: NullableStringFieldUpdateOperationsInput | string | null + channel?: EnumOrderChannelFieldUpdateOperationsInput | $Enums.OrderChannel + status?: EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus + totalGoldWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + wageWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean + deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + salesAgentId?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + export type CustomerAddressUpdateWithoutCustomerInput = { id?: StringFieldUpdateOperationsInput | string addressLine?: StringFieldUpdateOperationsInput | string @@ -61443,6 +78522,8 @@ export namespace Prisma { createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string branch?: BranchUpdateOneWithoutOrdersNestedInput + salesAgent?: AdminUserUpdateOneWithoutCreditedOrdersNestedInput + referrerCustomer?: CustomerUpdateOneWithoutReferredOrdersNestedInput items?: OrderItemUpdateManyWithoutOrderNestedInput statusEvents?: OrderStatusEventUpdateManyWithoutOrderNestedInput ledgerEntries?: LedgerEntryUpdateManyWithoutOrderNestedInput @@ -61460,6 +78541,8 @@ export namespace Prisma { flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + salesAgentId?: NullableStringFieldUpdateOperationsInput | string | null + referrerCustomerId?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string items?: OrderItemUncheckedUpdateManyWithoutOrderNestedInput @@ -61479,6 +78562,8 @@ export namespace Prisma { flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + salesAgentId?: NullableStringFieldUpdateOperationsInput | string | null + referrerCustomerId?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } @@ -61766,9 +78851,59 @@ export namespace Prisma { createdAt?: DateTimeFieldUpdateOperationsInput | Date | string } + export type CustomerOtpUpdateWithoutCustomerInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + codeHash?: StringFieldUpdateOperationsInput | string + expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string + attempts?: IntFieldUpdateOperationsInput | number + consumedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + requestIp?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type CustomerOtpUncheckedUpdateWithoutCustomerInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + codeHash?: StringFieldUpdateOperationsInput | string + expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string + attempts?: IntFieldUpdateOperationsInput | number + consumedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + requestIp?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type CustomerOtpUncheckedUpdateManyWithoutCustomerInput = { + id?: StringFieldUpdateOperationsInput | string + mobile?: StringFieldUpdateOperationsInput | string + codeHash?: StringFieldUpdateOperationsInput | string + expiresAt?: DateTimeFieldUpdateOperationsInput | Date | string + attempts?: IntFieldUpdateOperationsInput | number + consumedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + requestIp?: NullableStringFieldUpdateOperationsInput | string | null + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type CustomerFavoriteUpdateWithoutCustomerInput = { + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + product?: ProductUpdateOneRequiredWithoutFavoritedByNestedInput + } + + export type CustomerFavoriteUncheckedUpdateWithoutCustomerInput = { + productId?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type CustomerFavoriteUncheckedUpdateManyWithoutCustomerInput = { + productId?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + export type AdminUserCreateManyBranchInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string passwordHash: string role: $Enums.AdminRole @@ -61776,6 +78911,11 @@ export namespace Prisma { wagePercent?: Decimal | DecimalJsLike | number | string | null isActive?: boolean createdAt?: Date | string + avatarFileId?: string | null + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null } export type OrderCreateManyBranchInput = { @@ -61789,6 +78929,8 @@ export namespace Prisma { flatRialCharge?: Decimal | DecimalJsLike | number | string isSuspendedOverCreditLimit?: boolean deliveredAt?: Date | string | null + salesAgentId?: string | null + referrerCustomerId?: string | null createdAt?: Date | string updatedAt?: Date | string } @@ -61803,14 +78945,22 @@ export namespace Prisma { export type AdminUserUpdateWithoutBranchInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string passwordHash?: StringFieldUpdateOperationsInput | string role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null userType?: UserTypeUpdateOneWithoutAdminUsersNestedInput + avatarFile?: UploadedFileUpdateOneWithoutAdminUserAvatarsNestedInput referredCustomers?: CustomerUpdateManyWithoutReferredByAgentNestedInput + creditedOrders?: OrderUpdateManyWithoutSalesAgentNestedInput supervisedWorkshops?: WorkshopUpdateManyWithoutSupervisorNestedInput branchAllocations?: BranchAllocationUpdateManyWithoutAllocatorAdminUserNestedInput postedLedgerEntries?: LedgerEntryUpdateManyWithoutPostedByAdminUserNestedInput @@ -61819,11 +78969,15 @@ export namespace Prisma { sentSmsMessages?: SmsMessageUpdateManyWithoutSentByAdminUserNestedInput sentNotifications?: NotificationUpdateManyWithoutSentByAdminUserNestedInput uploadedFiles?: UploadedFileUpdateManyWithoutUploadedByAdminUserNestedInput + salesExpertProfile?: SalesExpertProfileUpdateOneWithoutAdminUserNestedInput + sessions?: AdminSessionUpdateManyWithoutAdminUserNestedInput } export type AdminUserUncheckedUpdateWithoutBranchInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string passwordHash?: StringFieldUpdateOperationsInput | string role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole @@ -61831,7 +78985,13 @@ export namespace Prisma { wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null referredCustomers?: CustomerUncheckedUpdateManyWithoutReferredByAgentNestedInput + creditedOrders?: OrderUncheckedUpdateManyWithoutSalesAgentNestedInput supervisedWorkshops?: WorkshopUncheckedUpdateManyWithoutSupervisorNestedInput branchAllocations?: BranchAllocationUncheckedUpdateManyWithoutAllocatorAdminUserNestedInput postedLedgerEntries?: LedgerEntryUncheckedUpdateManyWithoutPostedByAdminUserNestedInput @@ -61840,11 +79000,15 @@ export namespace Prisma { sentSmsMessages?: SmsMessageUncheckedUpdateManyWithoutSentByAdminUserNestedInput sentNotifications?: NotificationUncheckedUpdateManyWithoutSentByAdminUserNestedInput uploadedFiles?: UploadedFileUncheckedUpdateManyWithoutUploadedByAdminUserNestedInput + salesExpertProfile?: SalesExpertProfileUncheckedUpdateOneWithoutAdminUserNestedInput + sessions?: AdminSessionUncheckedUpdateManyWithoutAdminUserNestedInput } export type AdminUserUncheckedUpdateManyWithoutBranchInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string passwordHash?: StringFieldUpdateOperationsInput | string role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole @@ -61852,6 +79016,11 @@ export namespace Prisma { wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null } export type OrderUpdateWithoutBranchInput = { @@ -61867,6 +79036,8 @@ export namespace Prisma { createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string customer?: CustomerUpdateOneRequiredWithoutOrdersNestedInput + salesAgent?: AdminUserUpdateOneWithoutCreditedOrdersNestedInput + referrerCustomer?: CustomerUpdateOneWithoutReferredOrdersNestedInput items?: OrderItemUpdateManyWithoutOrderNestedInput statusEvents?: OrderStatusEventUpdateManyWithoutOrderNestedInput ledgerEntries?: LedgerEntryUpdateManyWithoutOrderNestedInput @@ -61884,6 +79055,8 @@ export namespace Prisma { flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + salesAgentId?: NullableStringFieldUpdateOperationsInput | string | null + referrerCustomerId?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string items?: OrderItemUncheckedUpdateManyWithoutOrderNestedInput @@ -61903,6 +79076,8 @@ export namespace Prisma { flatRialCharge?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string isSuspendedOverCreditLimit?: BoolFieldUpdateOperationsInput | boolean deliveredAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + salesAgentId?: NullableStringFieldUpdateOperationsInput | string | null + referrerCustomerId?: NullableStringFieldUpdateOperationsInput | string | null createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } @@ -62023,6 +79198,9 @@ export namespace Prisma { showType?: number isActive?: boolean createdAt?: Date | string + accountingStockWeight?: Decimal | DecimalJsLike | number | string | null + accountingStockCount?: Decimal | DecimalJsLike | number | string | null + accountingStockAt?: Date | string | null } export type PromotionCreateManyCategoryInput = { @@ -62087,6 +79265,9 @@ export namespace Prisma { showType?: IntFieldUpdateOperationsInput | number isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + accountingStockWeight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockCount?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null brand?: BrandUpdateOneWithoutProductsNestedInput variants?: ProductVariantUpdateManyWithoutProductNestedInput images?: ProductImageUpdateManyWithoutProductNestedInput @@ -62094,6 +79275,7 @@ export namespace Prisma { comments?: CommentUpdateManyWithoutProductNestedInput promotions?: PromotionUpdateManyWithoutProductNestedInput allocationItems?: BranchAllocationItemUpdateManyWithoutProductNestedInput + favoritedBy?: CustomerFavoriteUpdateManyWithoutProductNestedInput } export type ProductUncheckedUpdateWithoutCategoryInput = { @@ -62105,12 +79287,16 @@ export namespace Prisma { showType?: IntFieldUpdateOperationsInput | number isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + accountingStockWeight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockCount?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null variants?: ProductVariantUncheckedUpdateManyWithoutProductNestedInput images?: ProductImageUncheckedUpdateManyWithoutProductNestedInput collections?: CollectionProductUncheckedUpdateManyWithoutProductNestedInput comments?: CommentUncheckedUpdateManyWithoutProductNestedInput promotions?: PromotionUncheckedUpdateManyWithoutProductNestedInput allocationItems?: BranchAllocationItemUncheckedUpdateManyWithoutProductNestedInput + favoritedBy?: CustomerFavoriteUncheckedUpdateManyWithoutProductNestedInput } export type ProductUncheckedUpdateManyWithoutCategoryInput = { @@ -62122,6 +79308,9 @@ export namespace Prisma { showType?: IntFieldUpdateOperationsInput | number isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + accountingStockWeight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockCount?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null } export type PromotionUpdateWithoutCategoryInput = { @@ -62187,6 +79376,9 @@ export namespace Prisma { showType?: number isActive?: boolean createdAt?: Date | string + accountingStockWeight?: Decimal | DecimalJsLike | number | string | null + accountingStockCount?: Decimal | DecimalJsLike | number | string | null + accountingStockAt?: Date | string | null } export type PromotionCreateManyBrandInput = { @@ -62215,6 +79407,9 @@ export namespace Prisma { showType?: IntFieldUpdateOperationsInput | number isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + accountingStockWeight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockCount?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null category?: CategoryUpdateOneWithoutProductsNestedInput variants?: ProductVariantUpdateManyWithoutProductNestedInput images?: ProductImageUpdateManyWithoutProductNestedInput @@ -62222,6 +79417,7 @@ export namespace Prisma { comments?: CommentUpdateManyWithoutProductNestedInput promotions?: PromotionUpdateManyWithoutProductNestedInput allocationItems?: BranchAllocationItemUpdateManyWithoutProductNestedInput + favoritedBy?: CustomerFavoriteUpdateManyWithoutProductNestedInput } export type ProductUncheckedUpdateWithoutBrandInput = { @@ -62233,12 +79429,16 @@ export namespace Prisma { showType?: IntFieldUpdateOperationsInput | number isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + accountingStockWeight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockCount?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null variants?: ProductVariantUncheckedUpdateManyWithoutProductNestedInput images?: ProductImageUncheckedUpdateManyWithoutProductNestedInput collections?: CollectionProductUncheckedUpdateManyWithoutProductNestedInput comments?: CommentUncheckedUpdateManyWithoutProductNestedInput promotions?: PromotionUncheckedUpdateManyWithoutProductNestedInput allocationItems?: BranchAllocationItemUncheckedUpdateManyWithoutProductNestedInput + favoritedBy?: CustomerFavoriteUncheckedUpdateManyWithoutProductNestedInput } export type ProductUncheckedUpdateManyWithoutBrandInput = { @@ -62250,6 +79450,9 @@ export namespace Prisma { showType?: IntFieldUpdateOperationsInput | number isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + accountingStockWeight?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockCount?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingStockAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null } export type PromotionUpdateWithoutBrandInput = { @@ -62331,6 +79534,7 @@ export namespace Prisma { qty?: number isPreOrder?: boolean isActive?: boolean + imageId?: string | null } export type ProductImageCreateManyProductInput = { @@ -62378,6 +79582,11 @@ export namespace Prisma { weightGrams?: Decimal | DecimalJsLike | number | string | null } + export type CustomerFavoriteCreateManyProductInput = { + customerId: string + createdAt?: Date | string + } + export type ProductVariantUpdateWithoutProductInput = { id?: StringFieldUpdateOperationsInput | string title?: StringFieldUpdateOperationsInput | string @@ -62387,6 +79596,7 @@ export namespace Prisma { qty?: IntFieldUpdateOperationsInput | number isPreOrder?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean + image?: ProductImageUpdateOneWithoutVariantsNestedInput orderItems?: OrderItemUpdateManyWithoutProductVariantNestedInput } @@ -62399,6 +79609,7 @@ export namespace Prisma { qty?: IntFieldUpdateOperationsInput | number isPreOrder?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean + imageId?: NullableStringFieldUpdateOperationsInput | string | null orderItems?: OrderItemUncheckedUpdateManyWithoutProductVariantNestedInput } @@ -62411,6 +79622,7 @@ export namespace Prisma { qty?: IntFieldUpdateOperationsInput | number isPreOrder?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean + imageId?: NullableStringFieldUpdateOperationsInput | string | null } export type ProductImageUpdateWithoutProductInput = { @@ -62418,6 +79630,7 @@ export namespace Prisma { url?: StringFieldUpdateOperationsInput | string sortOrder?: IntFieldUpdateOperationsInput | number role?: EnumProductImageRoleFieldUpdateOperationsInput | $Enums.ProductImageRole + variants?: ProductVariantUpdateManyWithoutImageNestedInput } export type ProductImageUncheckedUpdateWithoutProductInput = { @@ -62425,6 +79638,7 @@ export namespace Prisma { url?: StringFieldUpdateOperationsInput | string sortOrder?: IntFieldUpdateOperationsInput | number role?: EnumProductImageRoleFieldUpdateOperationsInput | $Enums.ProductImageRole + variants?: ProductVariantUncheckedUpdateManyWithoutImageNestedInput } export type ProductImageUncheckedUpdateManyWithoutProductInput = { @@ -62550,6 +79764,71 @@ export namespace Prisma { weightGrams?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null } + export type CustomerFavoriteUpdateWithoutProductInput = { + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + customer?: CustomerUpdateOneRequiredWithoutFavoritesNestedInput + } + + export type CustomerFavoriteUncheckedUpdateWithoutProductInput = { + customerId?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type CustomerFavoriteUncheckedUpdateManyWithoutProductInput = { + customerId?: StringFieldUpdateOperationsInput | string + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + } + + export type ProductVariantCreateManyImageInput = { + id?: string + productId: string + title: string + sku?: string | null + rashWeightGrams: Decimal | DecimalJsLike | number | string + defaultWagePercent: Decimal | DecimalJsLike | number | string + qty?: number + isPreOrder?: boolean + isActive?: boolean + } + + export type ProductVariantUpdateWithoutImageInput = { + id?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + sku?: NullableStringFieldUpdateOperationsInput | string | null + rashWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + defaultWagePercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + qty?: IntFieldUpdateOperationsInput | number + isPreOrder?: BoolFieldUpdateOperationsInput | boolean + isActive?: BoolFieldUpdateOperationsInput | boolean + product?: ProductUpdateOneRequiredWithoutVariantsNestedInput + orderItems?: OrderItemUpdateManyWithoutProductVariantNestedInput + } + + export type ProductVariantUncheckedUpdateWithoutImageInput = { + id?: StringFieldUpdateOperationsInput | string + productId?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + sku?: NullableStringFieldUpdateOperationsInput | string | null + rashWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + defaultWagePercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + qty?: IntFieldUpdateOperationsInput | number + isPreOrder?: BoolFieldUpdateOperationsInput | boolean + isActive?: BoolFieldUpdateOperationsInput | boolean + orderItems?: OrderItemUncheckedUpdateManyWithoutProductVariantNestedInput + } + + export type ProductVariantUncheckedUpdateManyWithoutImageInput = { + id?: StringFieldUpdateOperationsInput | string + productId?: StringFieldUpdateOperationsInput | string + title?: StringFieldUpdateOperationsInput | string + sku?: NullableStringFieldUpdateOperationsInput | string | null + rashWeightGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + defaultWagePercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + qty?: IntFieldUpdateOperationsInput | number + isPreOrder?: BoolFieldUpdateOperationsInput | boolean + isActive?: BoolFieldUpdateOperationsInput | boolean + } + export type OrderItemCreateManyProductVariantInput = { id?: string orderId: string @@ -62809,6 +80088,8 @@ export namespace Prisma { export type AdminUserCreateManyUserTypeInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string passwordHash: string role: $Enums.AdminRole @@ -62816,6 +80097,11 @@ export namespace Prisma { wagePercent?: Decimal | DecimalJsLike | number | string | null isActive?: boolean createdAt?: Date | string + avatarFileId?: string | null + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null } export type PermissionUpdateWithoutUserTypeInput = { @@ -62833,14 +80119,22 @@ export namespace Prisma { export type AdminUserUpdateWithoutUserTypeInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string passwordHash?: StringFieldUpdateOperationsInput | string role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null branch?: BranchUpdateOneWithoutAdminUsersNestedInput + avatarFile?: UploadedFileUpdateOneWithoutAdminUserAvatarsNestedInput referredCustomers?: CustomerUpdateManyWithoutReferredByAgentNestedInput + creditedOrders?: OrderUpdateManyWithoutSalesAgentNestedInput supervisedWorkshops?: WorkshopUpdateManyWithoutSupervisorNestedInput branchAllocations?: BranchAllocationUpdateManyWithoutAllocatorAdminUserNestedInput postedLedgerEntries?: LedgerEntryUpdateManyWithoutPostedByAdminUserNestedInput @@ -62849,11 +80143,15 @@ export namespace Prisma { sentSmsMessages?: SmsMessageUpdateManyWithoutSentByAdminUserNestedInput sentNotifications?: NotificationUpdateManyWithoutSentByAdminUserNestedInput uploadedFiles?: UploadedFileUpdateManyWithoutUploadedByAdminUserNestedInput + salesExpertProfile?: SalesExpertProfileUpdateOneWithoutAdminUserNestedInput + sessions?: AdminSessionUpdateManyWithoutAdminUserNestedInput } export type AdminUserUncheckedUpdateWithoutUserTypeInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string passwordHash?: StringFieldUpdateOperationsInput | string role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole @@ -62861,7 +80159,13 @@ export namespace Prisma { wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null referredCustomers?: CustomerUncheckedUpdateManyWithoutReferredByAgentNestedInput + creditedOrders?: OrderUncheckedUpdateManyWithoutSalesAgentNestedInput supervisedWorkshops?: WorkshopUncheckedUpdateManyWithoutSupervisorNestedInput branchAllocations?: BranchAllocationUncheckedUpdateManyWithoutAllocatorAdminUserNestedInput postedLedgerEntries?: LedgerEntryUncheckedUpdateManyWithoutPostedByAdminUserNestedInput @@ -62870,11 +80174,15 @@ export namespace Prisma { sentSmsMessages?: SmsMessageUncheckedUpdateManyWithoutSentByAdminUserNestedInput sentNotifications?: NotificationUncheckedUpdateManyWithoutSentByAdminUserNestedInput uploadedFiles?: UploadedFileUncheckedUpdateManyWithoutUploadedByAdminUserNestedInput + salesExpertProfile?: SalesExpertProfileUncheckedUpdateOneWithoutAdminUserNestedInput + sessions?: AdminSessionUncheckedUpdateManyWithoutAdminUserNestedInput } export type AdminUserUncheckedUpdateManyWithoutUserTypeInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string passwordHash?: StringFieldUpdateOperationsInput | string role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole @@ -62882,6 +80190,11 @@ export namespace Prisma { wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null isActive?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + avatarFileId?: NullableStringFieldUpdateOperationsInput | string | null + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null } export type CommentCreateManyReplyToInput = { @@ -62977,10 +80290,13 @@ export namespace Prisma { export type CustomerCreateManyAvatarFileInput = { id?: string fullName: string + firstName?: string | null + lastName?: string | null mobile: string - nationalCode: string + nationalCode?: string | null passwordHash: string cityId?: string | null + cityNameRaw?: string | null kind?: $Enums.CustomerKind phone?: string | null address?: string | null @@ -62992,10 +80308,17 @@ export namespace Prisma { goldCreditLimitGrams?: Decimal | DecimalJsLike | number | string goldDebtGrams?: Decimal | DecimalJsLike | number | string fiatDebtRial?: Decimal | DecimalJsLike | number | string + accountingGoldBalance?: Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: Date | string | null + makingChargeOffsetPercent?: Decimal | DecimalJsLike | number | string verificationStep?: $Enums.VerificationStep nationalIdImageUrl?: string | null businessLicenseUrl?: string | null shopImageUrl?: string | null + verificationRejectionReason?: string | null + verificationRejectedAt?: Date | string | null + birthDate?: Date | string | null canPlaceOrders?: boolean isActive?: boolean isArchived?: boolean @@ -63003,12 +80326,34 @@ export namespace Prisma { updatedAt?: Date | string } + export type AdminUserCreateManyAvatarFileInput = { + id?: string + fullName: string + firstName?: string | null + lastName?: string | null + mobile: string + passwordHash: string + role: $Enums.AdminRole + userTypeId?: number | null + branchId?: string | null + wagePercent?: Decimal | DecimalJsLike | number | string | null + isActive?: boolean + createdAt?: Date | string + address?: string | null + storeName?: string | null + pasazhName?: string | null + memberCode?: string | null + } + export type CustomerUpdateWithoutAvatarFileInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string - nationalCode?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null passwordHash?: StringFieldUpdateOperationsInput | string + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind phone?: NullableStringFieldUpdateOperationsInput | string | null address?: NullableStringFieldUpdateOperationsInput | string | null @@ -63019,10 +80364,17 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean isArchived?: BoolFieldUpdateOperationsInput | boolean @@ -63030,6 +80382,8 @@ export namespace Prisma { updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string city?: CityUpdateOneWithoutCustomersNestedInput referredByAgent?: AdminUserUpdateOneWithoutReferredCustomersNestedInput + salesExpertTradingFor?: SalesExpertProfileUpdateOneWithoutTradingCustomerNestedInput + referredOrders?: OrderUpdateManyWithoutReferrerCustomerNestedInput addresses?: CustomerAddressUpdateManyWithoutCustomerNestedInput orders?: OrderUpdateManyWithoutCustomerNestedInput preOrders?: PreOrderUpdateManyWithoutCustomerNestedInput @@ -63039,15 +80393,20 @@ export namespace Prisma { promotions?: PromotionUpdateManyWithoutCustomerNestedInput notifications?: NotificationRecipientUpdateManyWithoutCustomerNestedInput activityLogs?: CustomerActivityLogUpdateManyWithoutCustomerNestedInput + otpChallenges?: CustomerOtpUpdateManyWithoutCustomerNestedInput + favorites?: CustomerFavoriteUpdateManyWithoutCustomerNestedInput } export type CustomerUncheckedUpdateWithoutAvatarFileInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string - nationalCode?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null passwordHash?: StringFieldUpdateOperationsInput | string cityId?: NullableStringFieldUpdateOperationsInput | string | null + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind phone?: NullableStringFieldUpdateOperationsInput | string | null address?: NullableStringFieldUpdateOperationsInput | string | null @@ -63059,15 +80418,24 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean isArchived?: BoolFieldUpdateOperationsInput | boolean createdAt?: DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string + salesExpertTradingFor?: SalesExpertProfileUncheckedUpdateOneWithoutTradingCustomerNestedInput + referredOrders?: OrderUncheckedUpdateManyWithoutReferrerCustomerNestedInput addresses?: CustomerAddressUncheckedUpdateManyWithoutCustomerNestedInput orders?: OrderUncheckedUpdateManyWithoutCustomerNestedInput preOrders?: PreOrderUncheckedUpdateManyWithoutCustomerNestedInput @@ -63077,15 +80445,20 @@ export namespace Prisma { promotions?: PromotionUncheckedUpdateManyWithoutCustomerNestedInput notifications?: NotificationRecipientUncheckedUpdateManyWithoutCustomerNestedInput activityLogs?: CustomerActivityLogUncheckedUpdateManyWithoutCustomerNestedInput + otpChallenges?: CustomerOtpUncheckedUpdateManyWithoutCustomerNestedInput + favorites?: CustomerFavoriteUncheckedUpdateManyWithoutCustomerNestedInput } export type CustomerUncheckedUpdateManyWithoutAvatarFileInput = { id?: StringFieldUpdateOperationsInput | string fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null mobile?: StringFieldUpdateOperationsInput | string - nationalCode?: StringFieldUpdateOperationsInput | string + nationalCode?: NullableStringFieldUpdateOperationsInput | string | null passwordHash?: StringFieldUpdateOperationsInput | string cityId?: NullableStringFieldUpdateOperationsInput | string | null + cityNameRaw?: NullableStringFieldUpdateOperationsInput | string | null kind?: EnumCustomerKindFieldUpdateOperationsInput | $Enums.CustomerKind phone?: NullableStringFieldUpdateOperationsInput | string | null address?: NullableStringFieldUpdateOperationsInput | string | null @@ -63097,10 +80470,17 @@ export namespace Prisma { goldCreditLimitGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string goldDebtGrams?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string fiatDebtRial?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string + accountingGoldBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingRialBalance?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + accountingBalanceAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + makingChargeOffsetPercent?: DecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string verificationStep?: EnumVerificationStepFieldUpdateOperationsInput | $Enums.VerificationStep nationalIdImageUrl?: NullableStringFieldUpdateOperationsInput | string | null businessLicenseUrl?: NullableStringFieldUpdateOperationsInput | string | null shopImageUrl?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectionReason?: NullableStringFieldUpdateOperationsInput | string | null + verificationRejectedAt?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null + birthDate?: NullableDateTimeFieldUpdateOperationsInput | Date | string | null canPlaceOrders?: BoolFieldUpdateOperationsInput | boolean isActive?: BoolFieldUpdateOperationsInput | boolean isArchived?: BoolFieldUpdateOperationsInput | boolean @@ -63108,6 +80488,87 @@ export namespace Prisma { updatedAt?: DateTimeFieldUpdateOperationsInput | Date | string } + export type AdminUserUpdateWithoutAvatarFileInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null + mobile?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole + wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null + userType?: UserTypeUpdateOneWithoutAdminUsersNestedInput + branch?: BranchUpdateOneWithoutAdminUsersNestedInput + referredCustomers?: CustomerUpdateManyWithoutReferredByAgentNestedInput + creditedOrders?: OrderUpdateManyWithoutSalesAgentNestedInput + supervisedWorkshops?: WorkshopUpdateManyWithoutSupervisorNestedInput + branchAllocations?: BranchAllocationUpdateManyWithoutAllocatorAdminUserNestedInput + postedLedgerEntries?: LedgerEntryUpdateManyWithoutPostedByAdminUserNestedInput + orderStatusEvents?: OrderStatusEventUpdateManyWithoutActorAdminUserNestedInput + preOrderStatusEvents?: PreOrderStatusEventUpdateManyWithoutActorAdminUserNestedInput + sentSmsMessages?: SmsMessageUpdateManyWithoutSentByAdminUserNestedInput + sentNotifications?: NotificationUpdateManyWithoutSentByAdminUserNestedInput + uploadedFiles?: UploadedFileUpdateManyWithoutUploadedByAdminUserNestedInput + salesExpertProfile?: SalesExpertProfileUpdateOneWithoutAdminUserNestedInput + sessions?: AdminSessionUpdateManyWithoutAdminUserNestedInput + } + + export type AdminUserUncheckedUpdateWithoutAvatarFileInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null + mobile?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole + userTypeId?: NullableIntFieldUpdateOperationsInput | number | null + branchId?: NullableStringFieldUpdateOperationsInput | string | null + wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null + referredCustomers?: CustomerUncheckedUpdateManyWithoutReferredByAgentNestedInput + creditedOrders?: OrderUncheckedUpdateManyWithoutSalesAgentNestedInput + supervisedWorkshops?: WorkshopUncheckedUpdateManyWithoutSupervisorNestedInput + branchAllocations?: BranchAllocationUncheckedUpdateManyWithoutAllocatorAdminUserNestedInput + postedLedgerEntries?: LedgerEntryUncheckedUpdateManyWithoutPostedByAdminUserNestedInput + orderStatusEvents?: OrderStatusEventUncheckedUpdateManyWithoutActorAdminUserNestedInput + preOrderStatusEvents?: PreOrderStatusEventUncheckedUpdateManyWithoutActorAdminUserNestedInput + sentSmsMessages?: SmsMessageUncheckedUpdateManyWithoutSentByAdminUserNestedInput + sentNotifications?: NotificationUncheckedUpdateManyWithoutSentByAdminUserNestedInput + uploadedFiles?: UploadedFileUncheckedUpdateManyWithoutUploadedByAdminUserNestedInput + salesExpertProfile?: SalesExpertProfileUncheckedUpdateOneWithoutAdminUserNestedInput + sessions?: AdminSessionUncheckedUpdateManyWithoutAdminUserNestedInput + } + + export type AdminUserUncheckedUpdateManyWithoutAvatarFileInput = { + id?: StringFieldUpdateOperationsInput | string + fullName?: StringFieldUpdateOperationsInput | string + firstName?: NullableStringFieldUpdateOperationsInput | string | null + lastName?: NullableStringFieldUpdateOperationsInput | string | null + mobile?: StringFieldUpdateOperationsInput | string + passwordHash?: StringFieldUpdateOperationsInput | string + role?: EnumAdminRoleFieldUpdateOperationsInput | $Enums.AdminRole + userTypeId?: NullableIntFieldUpdateOperationsInput | number | null + branchId?: NullableStringFieldUpdateOperationsInput | string | null + wagePercent?: NullableDecimalFieldUpdateOperationsInput | Decimal | DecimalJsLike | number | string | null + isActive?: BoolFieldUpdateOperationsInput | boolean + createdAt?: DateTimeFieldUpdateOperationsInput | Date | string + address?: NullableStringFieldUpdateOperationsInput | string | null + storeName?: NullableStringFieldUpdateOperationsInput | string | null + pasazhName?: NullableStringFieldUpdateOperationsInput | string | null + memberCode?: NullableStringFieldUpdateOperationsInput | string | null + } + /** @@ -63149,6 +80610,10 @@ export namespace Prisma { * @deprecated Use ProductCountOutputTypeDefaultArgs instead */ export type ProductCountOutputTypeArgs = ProductCountOutputTypeDefaultArgs + /** + * @deprecated Use ProductImageCountOutputTypeDefaultArgs instead + */ + export type ProductImageCountOutputTypeArgs = ProductImageCountOutputTypeDefaultArgs /** * @deprecated Use ProductVariantCountOutputTypeDefaultArgs instead */ @@ -63189,10 +80654,26 @@ export namespace Prisma { * @deprecated Use AdminUserDefaultArgs instead */ export type AdminUserArgs = AdminUserDefaultArgs + /** + * @deprecated Use AppSessionDefaultArgs instead + */ + export type AppSessionArgs = AppSessionDefaultArgs + /** + * @deprecated Use AdminSessionDefaultArgs instead + */ + export type AdminSessionArgs = AdminSessionDefaultArgs + /** + * @deprecated Use SalesExpertProfileDefaultArgs instead + */ + export type SalesExpertProfileArgs = SalesExpertProfileDefaultArgs /** * @deprecated Use CustomerDefaultArgs instead */ export type CustomerArgs = CustomerDefaultArgs + /** + * @deprecated Use CustomerFavoriteDefaultArgs instead + */ + export type CustomerFavoriteArgs = CustomerFavoriteDefaultArgs /** * @deprecated Use CustomerAddressDefaultArgs instead */ @@ -63281,6 +80762,18 @@ export namespace Prisma { * @deprecated Use SettingDefaultArgs instead */ export type SettingArgs = SettingDefaultArgs + /** + * @deprecated Use AccountingLinkDefaultArgs instead + */ + export type AccountingLinkArgs = AccountingLinkDefaultArgs + /** + * @deprecated Use AccountingOutboxDefaultArgs instead + */ + export type AccountingOutboxArgs = AccountingOutboxDefaultArgs + /** + * @deprecated Use AccountingIssueDefaultArgs instead + */ + export type AccountingIssueArgs = AccountingIssueDefaultArgs /** * @deprecated Use PromotionDefaultArgs instead */ @@ -63321,6 +80814,10 @@ export namespace Prisma { * @deprecated Use UploadedFileDefaultArgs instead */ export type UploadedFileArgs = UploadedFileDefaultArgs + /** + * @deprecated Use CustomerOtpDefaultArgs instead + */ + export type CustomerOtpArgs = CustomerOtpDefaultArgs /** * Batch Payload for updateMany & deleteMany & createMany diff --git a/apps/api/release/vendor/.prisma/client/index.js b/apps/api/release/vendor/.prisma/client/index.js index 7d9a854..b9bb45a 100644 --- a/apps/api/release/vendor/.prisma/client/index.js +++ b/apps/api/release/vendor/.prisma/client/index.js @@ -94,7 +94,7 @@ exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ exports.Prisma.CityScalarFieldEnum = { id: 'id', name: 'name', - province: 'province', + parentId: 'parentId', percent: 'percent', percentAux: 'percentAux' }; @@ -102,6 +102,8 @@ exports.Prisma.CityScalarFieldEnum = { exports.Prisma.AdminUserScalarFieldEnum = { id: 'id', fullName: 'fullName', + firstName: 'firstName', + lastName: 'lastName', mobile: 'mobile', passwordHash: 'passwordHash', role: 'role', @@ -109,16 +111,68 @@ exports.Prisma.AdminUserScalarFieldEnum = { branchId: 'branchId', wagePercent: 'wagePercent', isActive: 'isActive', - createdAt: 'createdAt' + createdAt: 'createdAt', + avatarFileId: 'avatarFileId', + address: 'address', + storeName: 'storeName', + pasazhName: 'pasazhName', + memberCode: 'memberCode' +}; + +exports.Prisma.AppSessionScalarFieldEnum = { + id: 'id', + jti: 'jti', + subjectId: 'subjectId', + subjectType: 'subjectType', + mobile: 'mobile', + iamSessionId: 'iamSessionId', + iamSub: 'iamSub', + ipAddress: 'ipAddress', + userAgent: 'userAgent', + createdAt: 'createdAt', + expiresAt: 'expiresAt', + lastSeenAt: 'lastSeenAt', + revokedAt: 'revokedAt', + revokedReason: 'revokedReason' +}; + +exports.Prisma.AdminSessionScalarFieldEnum = { + id: 'id', + jti: 'jti', + adminUserId: 'adminUserId', + iamSessionId: 'iamSessionId', + iamSub: 'iamSub', + ipAddress: 'ipAddress', + userAgent: 'userAgent', + createdAt: 'createdAt', + expiresAt: 'expiresAt', + lastSeenAt: 'lastSeenAt', + revokedAt: 'revokedAt', + revokedReason: 'revokedReason' +}; + +exports.Prisma.SalesExpertProfileScalarFieldEnum = { + id: 'id', + adminUserId: 'adminUserId', + cityId: 'cityId', + gramLevel: 'gramLevel', + phone: 'phone', + nationalCode: 'nationalCode', + tradingCustomerId: 'tradingCustomerId', + createdAt: 'createdAt', + updatedAt: 'updatedAt' }; exports.Prisma.CustomerScalarFieldEnum = { id: 'id', fullName: 'fullName', + firstName: 'firstName', + lastName: 'lastName', mobile: 'mobile', nationalCode: 'nationalCode', passwordHash: 'passwordHash', cityId: 'cityId', + cityNameRaw: 'cityNameRaw', kind: 'kind', phone: 'phone', address: 'address', @@ -130,10 +184,17 @@ exports.Prisma.CustomerScalarFieldEnum = { goldCreditLimitGrams: 'goldCreditLimitGrams', goldDebtGrams: 'goldDebtGrams', fiatDebtRial: 'fiatDebtRial', + accountingGoldBalance: 'accountingGoldBalance', + accountingRialBalance: 'accountingRialBalance', + accountingBalanceAt: 'accountingBalanceAt', + makingChargeOffsetPercent: 'makingChargeOffsetPercent', verificationStep: 'verificationStep', nationalIdImageUrl: 'nationalIdImageUrl', businessLicenseUrl: 'businessLicenseUrl', shopImageUrl: 'shopImageUrl', + verificationRejectionReason: 'verificationRejectionReason', + verificationRejectedAt: 'verificationRejectedAt', + birthDate: 'birthDate', avatarFileId: 'avatarFileId', canPlaceOrders: 'canPlaceOrders', isActive: 'isActive', @@ -142,6 +203,12 @@ exports.Prisma.CustomerScalarFieldEnum = { updatedAt: 'updatedAt' }; +exports.Prisma.CustomerFavoriteScalarFieldEnum = { + customerId: 'customerId', + productId: 'productId', + createdAt: 'createdAt' +}; + exports.Prisma.CustomerAddressScalarFieldEnum = { id: 'id', customerId: 'customerId', @@ -205,7 +272,10 @@ exports.Prisma.ProductScalarFieldEnum = { productCode: 'productCode', showType: 'showType', isActive: 'isActive', - createdAt: 'createdAt' + createdAt: 'createdAt', + accountingStockWeight: 'accountingStockWeight', + accountingStockCount: 'accountingStockCount', + accountingStockAt: 'accountingStockAt' }; exports.Prisma.ProductImageScalarFieldEnum = { @@ -225,7 +295,8 @@ exports.Prisma.ProductVariantScalarFieldEnum = { defaultWagePercent: 'defaultWagePercent', qty: 'qty', isPreOrder: 'isPreOrder', - isActive: 'isActive' + isActive: 'isActive', + imageId: 'imageId' }; exports.Prisma.OrderScalarFieldEnum = { @@ -240,6 +311,8 @@ exports.Prisma.OrderScalarFieldEnum = { flatRialCharge: 'flatRialCharge', isSuspendedOverCreditLimit: 'isSuspendedOverCreditLimit', deliveredAt: 'deliveredAt', + salesAgentId: 'salesAgentId', + referrerCustomerId: 'referrerCustomerId', createdAt: 'createdAt', updatedAt: 'updatedAt' }; @@ -367,6 +440,51 @@ exports.Prisma.SettingScalarFieldEnum = { updatedAt: 'updatedAt' }; +exports.Prisma.AccountingLinkScalarFieldEnum = { + id: 'id', + provider: 'provider', + entityType: 'entityType', + entityId: 'entityId', + externalCode: 'externalCode', + externalName: 'externalName', + origin: 'origin', + snapshot: 'snapshot', + syncedAt: 'syncedAt', + createdAt: 'createdAt' +}; + +exports.Prisma.AccountingOutboxScalarFieldEnum = { + id: 'id', + provider: 'provider', + kind: 'kind', + entityId: 'entityId', + status: 'status', + attempts: 'attempts', + nextAttemptAt: 'nextAttemptAt', + lastError: 'lastError', + externalRef: 'externalRef', + progress: 'progress', + lastRequest: 'lastRequest', + lastResponse: 'lastResponse', + sentAt: 'sentAt', + resolvedById: 'resolvedById', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.AccountingIssueScalarFieldEnum = { + id: 'id', + provider: 'provider', + kind: 'kind', + externalCode: 'externalCode', + entityId: 'entityId', + message: 'message', + data: 'data', + createdAt: 'createdAt', + updatedAt: 'updatedAt', + resolvedAt: 'resolvedAt' +}; + exports.Prisma.PromotionScalarFieldEnum = { id: 'id', title: 'title', @@ -460,6 +578,18 @@ exports.Prisma.UploadedFileScalarFieldEnum = { createdAt: 'createdAt' }; +exports.Prisma.CustomerOtpScalarFieldEnum = { + id: 'id', + mobile: 'mobile', + customerId: 'customerId', + codeHash: 'codeHash', + expiresAt: 'expiresAt', + attempts: 'attempts', + consumedAt: 'consumedAt', + requestIp: 'requestIp', + createdAt: 'createdAt' +}; + exports.Prisma.SortOrder = { asc: 'asc', desc: 'desc' @@ -469,6 +599,11 @@ exports.Prisma.JsonNullValueInput = { JsonNull: Prisma.JsonNull }; +exports.Prisma.NullableJsonNullValueInput = { + DbNull: Prisma.DbNull, + JsonNull: Prisma.JsonNull +}; + exports.Prisma.QueryMode = { default: 'default', insensitive: 'insensitive' @@ -497,14 +632,16 @@ exports.CustomerKind = exports.$Enums.CustomerKind = { APP_SHOPKEEPER: 'APP_SHOPKEEPER', WALK_IN_SHOPKEEPER: 'WALK_IN_SHOPKEEPER', BANKER: 'BANKER', - WORKSHOP_SUPERVISOR: 'WORKSHOP_SUPERVISOR' + WORKSHOP_SUPERVISOR: 'WORKSHOP_SUPERVISOR', + RETAIL: 'RETAIL' }; exports.VerificationStep = exports.$Enums.VerificationStep = { UNVERIFIED: 'UNVERIFIED', STEP_ONE_SUBMITTED: 'STEP_ONE_SUBMITTED', STEP_TWO_SUBMITTED: 'STEP_TWO_SUBMITTED', - VERIFIED: 'VERIFIED' + VERIFIED: 'VERIFIED', + REJECTED: 'REJECTED' }; exports.ProductImageRole = exports.$Enums.ProductImageRole = { @@ -566,6 +703,27 @@ exports.CommentStatus = exports.$Enums.CommentStatus = { REJECTED: 'REJECTED' }; +exports.AccountingEntityType = exports.$Enums.AccountingEntityType = { + CUSTOMER: 'CUSTOMER', + PRODUCT: 'PRODUCT' +}; + +exports.AccountingOutboxKind = exports.$Enums.AccountingOutboxKind = { + CUSTOMER_PUSH: 'CUSTOMER_PUSH', + PRODUCT_PUSH: 'PRODUCT_PUSH', + ORDER_DOCUMENT: 'ORDER_DOCUMENT', + ORDER_DOCUMENT_DELETE: 'ORDER_DOCUMENT_DELETE' +}; + +exports.AccountingOutboxStatus = exports.$Enums.AccountingOutboxStatus = { + PENDING: 'PENDING', + SENDING: 'SENDING', + SENT: 'SENT', + FAILED: 'FAILED', + NEEDS_REVIEW: 'NEEDS_REVIEW', + RESOLVED: 'RESOLVED' +}; + exports.PromotionScope = exports.$Enums.PromotionScope = { PRODUCT: 'PRODUCT', CATEGORY: 'CATEGORY', @@ -590,7 +748,11 @@ exports.MessageAudience = exports.$Enums.MessageAudience = { exports.Prisma.ModelName = { City: 'City', AdminUser: 'AdminUser', + AppSession: 'AppSession', + AdminSession: 'AdminSession', + SalesExpertProfile: 'SalesExpertProfile', Customer: 'Customer', + CustomerFavorite: 'CustomerFavorite', CustomerAddress: 'CustomerAddress', Branch: 'Branch', Workshop: 'Workshop', @@ -613,6 +775,9 @@ exports.Prisma.ModelName = { Permission: 'Permission', Comment: 'Comment', Setting: 'Setting', + AccountingLink: 'AccountingLink', + AccountingOutbox: 'AccountingOutbox', + AccountingIssue: 'AccountingIssue', Promotion: 'Promotion', PromotionExclusion: 'PromotionExclusion', BranchAllocation: 'BranchAllocation', @@ -622,7 +787,8 @@ exports.Prisma.ModelName = { NotificationRecipient: 'NotificationRecipient', NewsletterSubscriber: 'NewsletterSubscriber', CustomerActivityLog: 'CustomerActivityLog', - UploadedFile: 'UploadedFile' + UploadedFile: 'UploadedFile', + CustomerOtp: 'CustomerOtp' }; /** * Create the Client @@ -635,7 +801,7 @@ const config = { "value": "prisma-client-js" }, "output": { - "value": "D:\\APP\\gold-bank\\node_modules\\.pnpm\\@prisma+client@5.22.0_prisma@5.22.0\\node_modules\\@prisma\\client", + "value": "E:\\gold-bank\\node_modules\\.pnpm\\@prisma+client@5.22.0_prisma@5.22.0\\node_modules\\@prisma\\client", "fromEnvVar": null }, "config": { @@ -653,10 +819,11 @@ const config = { } ], "previewFeatures": [], - "sourceFilePath": "D:\\APP\\gold-bank\\apps\\api\\prisma\\schema.prisma" + "sourceFilePath": "E:\\gold-bank\\apps\\api\\prisma\\schema.prisma" }, "relativeEnvPaths": { - "rootEnvPath": null + "rootEnvPath": null, + "schemaEnvPath": "../../../../../../apps/api/.env" }, "relativePath": "../../../../../../apps/api/prisma", "clientVersion": "5.22.0", @@ -674,8 +841,8 @@ const config = { } } }, - "inlineSchema": "// Gold Banking System — core schema\n// Canonical accounting model: legacy \"System A\" gram ledger (see migration notes).\n// The external \"Tahesab\" service is retired — LedgerEntry is the sole source of truth.\n// All money/weight fields use Decimal, never Float, to avoid rounding drift in debt math.\n\ngenerator client {\n provider = \"prisma-client-js\"\n // native = local Windows/macOS; debian-openssl-3.0.x = node:20-bookworm-slim (Arvan)\n binaryTargets = [\"native\", \"debian-openssl-3.0.x\"]\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Enums\n// ─────────────────────────────────────────────────────────────────────────\n\nenum AdminRole {\n SUPER_ADMIN\n SYSTEM_APPROVER // legacy: تایید مدیر سیستم\n SALES_EXPERT // legacy Customer.type=1, also acts as a referral \"reagent\"\n WORKSHOP_SUPERVISOR\n ACCOUNTANT\n}\n\n/// Legacy Customer.type — what kind of wholesale customer this is. Values and\n/// labels taken verbatim from bulkCustomer.vue's userTypes list.\nenum CustomerKind {\n SALES_AGENT // 1 کارشناس فروش\n APP_SHOPKEEPER // 2 مغازه دار اپلیکیشن\n WALK_IN_SHOPKEEPER // 3 مغازه دار حضوری\n BANKER // 4 بنکدار\n WORKSHOP_SUPERVISOR // 5 سرپرست کارگاه\n}\n\nenum VerificationStep {\n UNVERIFIED\n STEP_ONE_SUBMITTED\n STEP_TWO_SUBMITTED\n VERIFIED\n}\n\n/// Legacy kept retail and wholesale orders in two SEPARATE tables\n/// (orders_orders vs orders). The redesigned schema has one Order model, so the\n/// distinction lives here instead.\nenum OrderChannel {\n RETAIL // تک فروشی\n WHOLESALE // عمده فروشی\n}\n\nenum OrderStatus {\n SUSPENDED // credit limit (goldCreditLimitGrams) exceeded at placement\n PLACED\n ADMIN_APPROVED\n SOURCING\n PREPARING\n DELIVERED_TO_AGENT\n DELIVERED_TO_CUSTOMER // debt recognition point — mirrors legacy sts>4\n CANCELLED\n}\n\nenum PreOrderStatus {\n PLACED\n ADMIN_APPROVED\n WORKSHOP_APPROVED\n READY_TO_SHIP\n DELIVERED\n CANCELLED\n}\n\nenum LedgerCurrency {\n GOLD_GRAM\n RIAL\n}\n\nenum LedgerDirection {\n DEBIT // increases what the customer owes\n CREDIT // decreases what the customer owes\n}\n\nenum LedgerSourceType {\n ORDER_STOCK\n ORDER_PRE_ORDER\n REPAYMENT_MELTED_GOLD // karat-normalized: amount * karatPerMille / 750\n REPAYMENT_TRANSFER\n REPAYMENT_CHEQUE\n REPAYMENT_CASH // price-per-gram-normalized via pricePerGramRialAtEntry\n WALLET_BONUS\n ADJUSTMENT\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Identity\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel City {\n id String @id @default(cuid())\n name String\n province String?\n /// Legacy cities.percent / percent_aux — per-city wage surcharges the city\n /// screen edits through GET cities/get-percent/{id} and get-percent-aux/{id}.\n percent Decimal? @db.Decimal(6, 3)\n percentAux Decimal? @db.Decimal(6, 3)\n customers Customer[]\n addresses CustomerAddress[]\n branches Branch[]\n preOrders PreOrder[]\n}\n\nmodel AdminUser {\n id String @id @default(cuid())\n fullName String\n mobile String @unique\n passwordHash String\n role AdminRole\n /// Legacy `users.ut`. Granular ACL lives here (Permission rows hang off UserType);\n /// the coarse `role` enum above is retained for the business rules that already\n /// switch on it. Nullable so existing seeded admins remain valid.\n userTypeId Int?\n userType UserType? @relation(fields: [userTypeId], references: [id])\n branchId String?\n branch Branch? @relation(fields: [branchId], references: [id])\n wagePercent Decimal? @db.Decimal(6, 3) // legacy Customer.percent, commission on referred orders\n isActive Boolean @default(true)\n createdAt DateTime @default(now())\n\n referredCustomers Customer[] @relation(\"ReferralAgent\")\n supervisedWorkshops Workshop[] @relation(\"WorkshopSupervisor\")\n branchAllocations BranchAllocation[] @relation(\"AllocationAuthor\")\n postedLedgerEntries LedgerEntry[]\n orderStatusEvents OrderStatusEvent[]\n preOrderStatusEvents PreOrderStatusEvent[]\n sentSmsMessages SmsMessage[] @relation(\"SmsAuthor\")\n sentNotifications Notification[] @relation(\"NotificationAuthor\")\n uploadedFiles UploadedFile[] @relation(\"FileUploader\")\n\n @@index([role])\n @@index([userTypeId])\n}\n\nmodel Customer {\n id String @id @default(cuid())\n fullName String\n mobile String @unique\n nationalCode String @unique\n passwordHash String\n cityId String?\n city City? @relation(fields: [cityId], references: [id])\n\n /// Legacy Customer.type — distinguishes بنکدار from مغازه دار, which the\n /// BankerList / ShopkeeperList screens filter on.\n kind CustomerKind @default(APP_SHOPKEEPER)\n\n /// Legacy contact + shop columns, shown on the wholesale customer form and as\n /// (hidden-by-default) columns in its grid.\n phone String?\n address String?\n storeName String?\n pasazhName String?\n zone String?\n /// Legacy mcode — the operator-assigned customer code.\n memberCode String?\n\n referredByAgentId String?\n referredByAgent AdminUser? @relation(\"ReferralAgent\", fields: [referredByAgentId], references: [id])\n\n // Credit limit + cached ledger balances (source of truth is LedgerEntry; these\n // are denormalized for fast reads and reconciled by a scheduled job).\n goldCreditLimitGrams Decimal @default(0) @db.Decimal(14, 4) // legacy gram_level\n goldDebtGrams Decimal @default(0) @db.Decimal(14, 4) // legacy remain\n fiatDebtRial Decimal @default(0) @db.Decimal(20, 2) // legacy rial_remain\n\n verificationStep VerificationStep @default(UNVERIFIED)\n nationalIdImageUrl String?\n businessLicenseUrl String?\n shopImageUrl String?\n\n /// Legacy `image_id` — the profile photo (عکس پروفایل) on the sales-agent\n /// form. Legacy stored an FK to its Image table and read it back as a nested\n /// `image: { id, image }`, so this is a relation, not a bare URL string.\n avatarFileId String?\n avatarFile UploadedFile? @relation(\"CustomerAvatar\", fields: [avatarFileId], references: [id])\n\n /// Legacy had TWO independent switches on a customer:\n /// sts -> may they place orders (this field)\n /// active -> is the account enabled (isActive, below)\n /// The port previously drove both from isActive; they are separate again.\n canPlaceOrders Boolean @default(true)\n\n isActive Boolean @default(true)\n /// Legacy archive flag — the archived list filtered on this, not on isActive.\n isArchived Boolean @default(false)\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n addresses CustomerAddress[]\n orders Order[]\n preOrders PreOrder[]\n ledgerEntries LedgerEntry[]\n walletBonuses WalletBonus[]\n comments Comment[]\n promotions Promotion[]\n notifications NotificationRecipient[]\n activityLogs CustomerActivityLog[]\n\n @@index([referredByAgentId])\n}\n\nmodel CustomerAddress {\n id String @id @default(cuid())\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n cityId String?\n city City? @relation(fields: [cityId], references: [id])\n addressLine String\n isDefault Boolean @default(false)\n}\n\nmodel Branch {\n id String @id @default(cuid())\n name String\n /// Legacy Branch.address / phone — both are columns in the branch grid.\n address String?\n phone String?\n /// Legacy GET branch/active/{id} toggles this.\n isActive Boolean @default(true)\n cityId String?\n city City? @relation(fields: [cityId], references: [id])\n adminUsers AdminUser[]\n orders Order[]\n allocations BranchAllocation[]\n}\n\nmodel Workshop {\n id String @id @default(cuid())\n name String\n /// Legacy Workshop.address / phone — both are columns in the workshop grid.\n address String?\n phone String?\n /// The supervisor created alongside the workshop by the legacy Add form.\n supervisorId String?\n supervisor AdminUser? @relation(\"WorkshopSupervisor\", fields: [supervisorId], references: [id])\n isActive Boolean @default(true)\n preOrders PreOrder[]\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Catalog — item reference catalog\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel Category {\n id String @id @default(cuid())\n title String\n /// Legacy Category.type — which storefront the category belongs to:\n /// 1 سایت | 2 اپلیکشن موبایل. Drives the \"type_str\" grid column.\n type Int @default(1)\n /// Legacy Category.image / icon — the grid renders the image, the storefront the icon.\n imageUrl String?\n iconUrl String?\n /// Legacy meta tag + description, used for SEO on the site categories.\n metaTag String?\n description String?\n parentId String?\n parent Category? @relation(\"CategoryTree\", fields: [parentId], references: [id])\n children Category[] @relation(\"CategoryTree\")\n products Product[]\n promotions Promotion[]\n}\n\nmodel Brand {\n id String @id @default(cuid())\n title String\n products Product[]\n promotions Promotion[]\n}\n\n/// Curated product groupings — replaces legacy \"Ciny/CinyProduct\" (a tagging\n/// feature, NOT a gold-price snapshot mechanism, despite the misleading legacy name).\nmodel Collection {\n id String @id @default(cuid())\n title String\n description String?\n isActive Boolean @default(true)\n products CollectionProduct[]\n}\n\nmodel CollectionProduct {\n collectionId String\n collection Collection @relation(fields: [collectionId], references: [id])\n productId String\n product Product @relation(fields: [productId], references: [id])\n\n @@id([collectionId, productId])\n}\n\nmodel Product {\n id String @id @default(cuid())\n title String\n description String?\n categoryId String?\n category Category? @relation(fields: [categoryId], references: [id])\n brandId String?\n brand Brand? @relation(fields: [brandId], references: [id])\n /// Legacy Product.product_code — the human-facing SKU shown in the grid.\n productCode String? @unique\n /// Legacy Product.show_type: 1 site, 2 mobile, 3 both.\n showType Int @default(3)\n isActive Boolean @default(true)\n createdAt DateTime @default(now())\n\n variants ProductVariant[]\n images ProductImage[]\n collections CollectionProduct[]\n comments Comment[]\n promotions Promotion[]\n allocationItems BranchAllocationItem[]\n}\n\nmodel ProductImage {\n id String @id @default(cuid())\n productId String\n product Product @relation(fields: [productId], references: [id])\n url String\n sortOrder Int @default(0)\n /// Legacy had 4 distinct upload slots (تصویر شاخص / تصویر شاخص موبایل /\n /// گالری تصاویر سایت / گالری تصاویر موبایل) — GALLERY is the default so\n /// existing rows and any generic \"just attach an image\" caller keep working.\n role ProductImageRole @default(GALLERY)\n}\n\nenum ProductImageRole {\n FEATURED\n FEATURED_MOBILE\n GALLERY\n GALLERY_MOBILE\n}\n\nmodel ProductVariant {\n id String @id @default(cuid())\n productId String\n product Product @relation(fields: [productId], references: [id])\n title String\n sku String? @unique\n /// Base/raw weight before making charge (\"rash weight\").\n rashWeightGrams Decimal @db.Decimal(14, 4)\n /// Default making-charge percentage applied on top of rash weight.\n defaultWagePercent Decimal @db.Decimal(6, 3)\n /// Legacy ProductVariant.qty — on-hand stock. The cart refuses a variant with\n /// qty 0 unless it is flagged pre-order, so both fields are required for that\n /// guard to work (see apps/admin-panel/src/stores/cart.ts).\n qty Int @default(0)\n /// Legacy is_pre_order: orderable even at zero stock.\n isPreOrder Boolean @default(false)\n isActive Boolean @default(true)\n\n orderItems OrderItem[]\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Orders — stock orders (debt-bearing)\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel Order {\n id String @id @default(cuid())\n orderNumber String @unique\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n branchId String?\n branch Branch? @relation(fields: [branchId], references: [id])\n /// Which sales channel placed this order — see OrderChannel.\n channel OrderChannel @default(RETAIL)\n status OrderStatus @default(PLACED)\n\n /// Total gold weight incl. wage across all items (\"allGram\" / order.w).\n totalGoldWeightGrams Decimal @db.Decimal(14, 4)\n /// Pure making-charge weight component (totalGoldWeightGrams minus raw weight sum).\n wageWeightGrams Decimal @db.Decimal(14, 4)\n /// Flat Rial charge independent of gold price (e.g. stones) — legacy rial_input.\n flatRialCharge Decimal @default(0) @db.Decimal(20, 2)\n\n isSuspendedOverCreditLimit Boolean @default(false)\n deliveredAt DateTime? // setting this is what triggers debt recognition\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n items OrderItem[]\n statusEvents OrderStatusEvent[]\n ledgerEntries LedgerEntry[]\n convertedFromPreOrder PreOrder?\n\n @@index([customerId])\n @@index([status])\n}\n\nmodel OrderItem {\n id String @id @default(cuid())\n orderId String\n order Order @relation(fields: [orderId], references: [id])\n productVariantId String\n productVariant ProductVariant @relation(fields: [productVariantId], references: [id])\n quantity Int\n\n // Snapshots at order time — never re-read from ProductVariant after placement.\n rashWeightGramsSnapshot Decimal @db.Decimal(14, 4)\n wagePercentSnapshot Decimal @db.Decimal(6, 3)\n discountPercentSnapshot Decimal @default(0) @db.Decimal(6, 3)\n /// computed: rash*(1 + (wagePercent-discount)/100)\n computedWeightGrams Decimal @db.Decimal(14, 4)\n flatRialCharge Decimal @default(0) @db.Decimal(20, 2)\n}\n\nmodel OrderStatusEvent {\n id String @id @default(cuid())\n orderId String\n order Order @relation(fields: [orderId], references: [id])\n fromStatus OrderStatus?\n toStatus OrderStatus\n note String?\n actorAdminUserId String?\n actorAdminUser AdminUser? @relation(fields: [actorAdminUserId], references: [id])\n createdAt DateTime @default(now())\n\n @@index([orderId])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Pre-orders — custom manufacturing requests (not debt-bearing until converted)\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel PreOrder {\n id String @id @default(cuid())\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n cityId String?\n city City? @relation(fields: [cityId], references: [id])\n workshopId String?\n workshop Workshop? @relation(fields: [workshopId], references: [id])\n status PreOrderStatus @default(PLACED)\n\n designImageUrl String?\n colorName String?\n sizeSpec String?\n stoneColor String?\n minaColor String?\n estimatedWeightGrams Decimal? @db.Decimal(14, 4)\n estimatedPriceRial Decimal? @db.Decimal(20, 2)\n description String?\n\n /// Once priced, an admin converts this into a real (debt-bearing) Order.\n convertedOrderId String? @unique\n convertedOrder Order? @relation(fields: [convertedOrderId], references: [id])\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n statusEvents PreOrderStatusEvent[]\n\n @@index([customerId])\n}\n\nmodel PreOrderStatusEvent {\n id String @id @default(cuid())\n preOrderId String\n preOrder PreOrder @relation(fields: [preOrderId], references: [id])\n /// Field-level diff, e.g. {\"status\": {\"old\": \"PLACED\", \"new\": \"ADMIN_APPROVED\"}}\n changes Json\n actorAdminUserId String?\n actorAdminUser AdminUser? @relation(fields: [actorAdminUserId], references: [id])\n ipAddress String?\n createdAt DateTime @default(now())\n\n @@index([preOrderId])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Accounting — the dual-currency ledger (core of the system)\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel LedgerEntry {\n id String @id @default(cuid())\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n\n currency LedgerCurrency\n direction LedgerDirection\n sourceType LedgerSourceType\n /// Always positive; direction determines the sign applied to the customer balance.\n amount Decimal @db.Decimal(20, 4)\n\n /// Purity of the physical instrument, for REPAYMENT_MELTED_GOLD (e.g. 750, 916).\n karatPerMille Int?\n /// Gold price/gram at conversion time, for REPAYMENT_CASH.\n pricePerGramRialAtEntry Decimal? @db.Decimal(20, 2)\n\n orderId String?\n order Order? @relation(fields: [orderId], references: [id])\n\n /// Pending entries don't count toward the cached customer balance until confirmed.\n confirmed Boolean @default(false)\n confirmedAt DateTime?\n postedByAdminUserId String?\n postedByAdminUser AdminUser? @relation(fields: [postedByAdminUserId], references: [id])\n\n /// Instrument metadata from the legacy \"cash\" document form. Which fields are\n /// filled depends on sourceType: a melted-gold receipt carries lab/hallmark and\n /// the pre-normalization weight, a cheque carries the account and bank, and a\n /// transfer carries its destination.\n /// Legacy columns: lab, ang, account_name, bank_name, to, original_value, recive_date.\n labName String?\n hallmark String?\n accountName String?\n bankName String?\n transferTo String?\n /// Weight as handed over, BEFORE karat normalization (legacy original_value).\n originalValue Decimal? @db.Decimal(14, 4)\n /// Rial amount for cash/cheque documents (legacy price).\n priceRial Decimal? @db.Decimal(20, 2)\n receivedAt DateTime?\n\n note String?\n createdAt DateTime @default(now())\n\n @@index([customerId, currency])\n @@index([orderId])\n}\n\n/// Replaces legacy WebServiceGold / ConfigStatic.gold_price — timestamped price feed.\nmodel GoldPriceQuote {\n id String @id @default(cuid())\n karatPerMille Int\n pricePerGramRial Decimal @db.Decimal(20, 2)\n source String\n quotedAt DateTime @default(now())\n\n @@index([karatPerMille, quotedAt])\n}\n\n/// Time-limited gold cashback bonus — replaces the legacy Rooyesh\\Wallet gold credit.\nmodel WalletBonus {\n id String @id @default(cuid())\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n orderId String?\n goldGrams Decimal @db.Decimal(14, 4)\n grantedAt DateTime @default(now())\n expiresAt DateTime\n consumedAt DateTime?\n isActive Boolean @default(true)\n\n @@index([customerId, isActive])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Admin ACL — faithful port of the legacy granular permission model.\n//\n// Legacy (henza_server):\n// Schema::create('permission', function (Blueprint $table) {\n// $table->string('rid');\n// $table->integer('ut');\n// $table->primary(['rid' , 'ut']);\n// });\n//\n// Permissions attach to the USER TYPE (`ut`), never to an individual user, so\n// every admin of a given type shares one permission set. `ut` pointed at a row\n// in the legacy `config_static` lookup table; UserType is that table, narrowed\n// to the admin-user-type rows it was actually used for.\n//\n// A `rid` is a dotted permission id such as \"persons.list.client.omde\". The\n// frontend expands each stored rid into its ancestors at runtime via\n// checkParent() — see apps/admin-panel/src/stores/users.ts. Only the 58 leaf\n// rids the routers actually gate are seeded; ancestors are derived, not stored.\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel UserType {\n /// Legacy `permission.ut` / `users.ut` — an integer, kept as the PK so seeded\n /// rows keep their legacy identity rather than getting new cuids.\n id Int @id\n title String\n isActive Boolean @default(true)\n createdAt DateTime @default(now())\n\n permissions Permission[]\n adminUsers AdminUser[]\n\n @@map(\"user_type\")\n}\n\nmodel Permission {\n /// Dotted permission id, e.g. \"order.list\", \"persons.list.client.omde\".\n rid String\n userTypeId Int\n userType UserType @relation(fields: [userTypeId], references: [id], onDelete: Cascade)\n\n /// Legacy's composite primary key (rid, ut), preserved exactly.\n @@id([rid, userTypeId])\n @@index([userTypeId])\n @@map(\"permission\")\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Product comments / reviews — legacy `comment` table (App\\Models\\Comment),\n// moderated from views/customer/Comments/Comments.vue.\n//\n// Legacy fillable: product_id, comment, reply_to, sts, customer_id\n// Legacy Comment::$STS = [1 => 'در انتظار تایید', 2 => 'تایید شده', 3 => 'رد شده']\n// which is represented here as an enum rather than a magic integer.\n// ─────────────────────────────────────────────────────────────────────────\n\nenum CommentStatus {\n PENDING // 1 — در انتظار تایید\n APPROVED // 2 — تایید شده\n REJECTED // 3 — رد شده\n}\n\nmodel Comment {\n id String @id @default(cuid())\n productId String\n product Product @relation(fields: [productId], references: [id])\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n body String\n status CommentStatus @default(PENDING)\n\n /// Legacy `reply_to`: a staff reply threads under the comment it answers.\n replyToId String?\n replyTo Comment? @relation(\"CommentReplies\", fields: [replyToId], references: [id])\n replies Comment[] @relation(\"CommentReplies\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@index([productId])\n @@index([customerId])\n @@index([status])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Settings — replaces legacy `config_static`, a key/value table the admin\n// panel read and wrote through endpoints like /wallet/config and\n// /const/__list__ut. Values are stored as JSON so a setting can hold a scalar,\n// an object, or the dynamic option lists legacy kept under `__list__*` keys.\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel Setting {\n key String @id\n value Json\n updatedAt DateTime @updatedAt\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Promotions / discounts — legacy views/promotion/*, served by\n// PromotionController (`product/variant/promotion`). The redesigned schema had\n// no promotion concept at all; this models what the legacy forms actually\n// collect.\n// ─────────────────────────────────────────────────────────────────────────\n\n/// Legacy Promotion.type — what the discount is scoped to.\nenum PromotionScope {\n PRODUCT // 1 محصولات\n CATEGORY // 2 دسته بندی\n CUSTOMER // 3 مشتری\n BRAND // 4 برند\n}\n\n/// Legacy Promotion.use_only — how often a customer may redeem it.\nenum PromotionUsage {\n ONCE // 1 فقط یکبار\n UNTIL_END_DATE // 2 تا تاریخ پایان\n}\n\nmodel Promotion {\n id String @id @default(cuid())\n title String\n description String?\n scope PromotionScope @default(PRODUCT)\n usage PromotionUsage @default(ONCE)\n /// Percentage off, 0-100 (legacy discount_percent).\n discountPercent Decimal @db.Decimal(6, 3)\n isActive Boolean @default(true)\n /// Which storefront it shows on, mirroring Product.showType (legacy platform).\n platform Int @default(3)\n\n startsAt DateTime?\n endsAt DateTime?\n\n /// Exactly one of these is populated, per `scope`.\n productId String?\n product Product? @relation(fields: [productId], references: [id])\n categoryId String?\n category Category? @relation(fields: [categoryId], references: [id])\n customerId String?\n customer Customer? @relation(fields: [customerId], references: [id])\n brandId String?\n brand Brand? @relation(fields: [brandId], references: [id])\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@index([scope, isActive])\n}\n\n/// Legacy \"ignore\" table (views/offersIgnore) — specific products, categories,\n/// customers or brands excluded from the automatic discount engine.\n/// Legacy posts { type, item_id[] }: \"type\" reuses the promotion scope codes\n/// (1 محصولات | 2 دسته بندی | 3 مشتری | 4 برند) and \"itemId\" is the excluded row.\nmodel PromotionExclusion {\n id String @id @default(cuid())\n type Int\n itemId String\n createdAt DateTime @default(now())\n\n @@unique([type, itemId])\n @@index([type])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Branch stock allocation — legacy views/invoice/* (\"فاکتور انتقال\"), served by\n// BranchController as `branch/product`. Despite the screen being called an\n// invoice, it is not a sales document: it records which products head office\n// allocated to a branch, and who allocated them.\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel BranchAllocation {\n id String @id @default(cuid())\n branchId String\n branch Branch @relation(fields: [branchId], references: [id])\n\n /// Legacy `allocator_user` — the admin who filed the allocation.\n allocatorAdminUserId String?\n allocatorAdminUser AdminUser? @relation(\"AllocationAuthor\", fields: [allocatorAdminUserId], references: [id])\n\n note String?\n createdAt DateTime @default(now())\n\n items BranchAllocationItem[]\n\n @@index([branchId])\n}\n\nmodel BranchAllocationItem {\n id String @id @default(cuid())\n allocationId String\n allocation BranchAllocation @relation(fields: [allocationId], references: [id], onDelete: Cascade)\n productId String\n product Product @relation(fields: [productId], references: [id])\n /// Weight snapshot at allocation time, so later catalog edits do not rewrite history.\n weightGrams Decimal? @db.Decimal(14, 4)\n\n @@unique([allocationId, productId])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Messaging + audit — legacy views/sms, views/notify, views/newsletters and\n// views/statics. None of these had a model in the redesigned schema.\n// ─────────────────────────────────────────────────────────────────────────\n\n/// Who an SMS or notification was aimed at. Legacy's sms/create offered these\n/// audiences, each gated by its own rid (sms.create.all, .omde, .single, ...).\nenum MessageAudience {\n SINGLE_NUMBER // یک شماره\n MULTIPLE_NUMBERS // چند شماره\n ALL_CUSTOMERS // همه\n WHOLESALE_CUSTOMERS // عمده\n RETAIL_CUSTOMERS // تک\n SALES_AGENTS // کارشناسان فروش\n}\n\nmodel SmsMessage {\n id String @id @default(cuid())\n audience MessageAudience\n /// Comma-separated recipients for the SINGLE/MULTIPLE audiences.\n recipients String?\n body String\n /// How many numbers the send actually resolved to.\n sentCount Int @default(0)\n\n sentByAdminUserId String?\n sentByAdminUser AdminUser? @relation(\"SmsAuthor\", fields: [sentByAdminUserId], references: [id])\n\n createdAt DateTime @default(now())\n\n @@index([createdAt])\n}\n\nmodel Notification {\n id String @id @default(cuid())\n title String\n body String\n audience MessageAudience @default(ALL_CUSTOMERS)\n\n sentByAdminUserId String?\n sentByAdminUser AdminUser? @relation(\"NotificationAuthor\", fields: [sentByAdminUserId], references: [id])\n\n createdAt DateTime @default(now())\n\n recipients NotificationRecipient[]\n\n @@index([createdAt])\n}\n\n/// Per-customer delivery + read state — legacy `GET notify/read/{id}`.\nmodel NotificationRecipient {\n id String @id @default(cuid())\n notificationId String\n notification Notification @relation(fields: [notificationId], references: [id], onDelete: Cascade)\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n readAt DateTime?\n\n @@unique([notificationId, customerId])\n @@index([customerId, readAt])\n}\n\n/// Legacy views/newsletters — the mailing-list signups collected by the site.\nmodel NewsletterSubscriber {\n id String @id @default(cuid())\n email String?\n mobile String?\n createdAt DateTime @default(now())\n\n @@unique([email])\n @@unique([mobile])\n}\n\n/// Legacy views/statics — the customer activity log the \"آمار\" screen reads\n/// (`log/list/customer`, `log/ago/{customerId}`).\nmodel CustomerActivityLog {\n id String @id @default(cuid())\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n /// Free-form action key, e.g. 'login', 'order.placed', 'profile.updated'.\n action String\n detail String?\n createdAt DateTime @default(now())\n\n @@index([customerId, createdAt])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Uploads — replaces the legacy MyUpload / SingleUploadInput widgets, which\n// POSTed to a file endpoint and stored the returned URL on the owning record.\n// Ports of those forms currently take a URL by hand; this gives them a real\n// destination to upload to.\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel UploadedFile {\n id String @id @default(cuid())\n /// Public URL the stored file is served from.\n url String\n originalName String\n mimeType String\n sizeBytes Int\n /// Free-form tag for what the file belongs to, e.g. 'product', 'category',\n /// 'customer.nationalId'. Kept loose so a new form needs no schema change.\n purpose String?\n\n uploadedByAdminUserId String?\n uploadedByAdminUser AdminUser? @relation(\"FileUploader\", fields: [uploadedByAdminUserId], references: [id])\n\n createdAt DateTime @default(now())\n customerAvatars Customer[] @relation(\"CustomerAvatar\")\n\n @@index([purpose])\n}\n", - "inlineSchemaHash": "2a0cac26ecbad0f3dec2805682be8f2a8b95feeb6b57cd369f94c84ce9997c84", + "inlineSchema": "// Gold Banking System — core schema\n// Canonical accounting model: legacy \"System A\" gram ledger (see migration notes).\n// The external \"Tahesab\" service is retired — LedgerEntry is the sole source of truth.\n// All money/weight fields use Decimal, never Float, to avoid rounding drift in debt math.\n\ngenerator client {\n provider = \"prisma-client-js\"\n // native = local Windows/macOS; debian-openssl-3.0.x = node:20-bookworm-slim (Arvan)\n binaryTargets = [\"native\", \"debian-openssl-3.0.x\"]\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Enums\n// ─────────────────────────────────────────────────────────────────────────\n\nenum AdminRole {\n SUPER_ADMIN\n SYSTEM_APPROVER // legacy: تایید مدیر سیستم\n SALES_EXPERT // legacy Customer.type=1, also acts as a referral \"reagent\"\n WORKSHOP_SUPERVISOR\n ACCOUNTANT\n}\n\n/// Legacy Customer.type — what kind of wholesale customer this is. Values and\n/// labels taken verbatim from bulkCustomer.vue's userTypes list.\n///\n/// SALES_AGENT is a LEGACY value only: legacy stored a sales agent as a\n/// Customer row with type=1, but the redesigned system models a sales agent\n/// as an AdminUser (role SALES_EXPERT) instead — see admin-users.service.ts\n/// and admin-customers.service.ts's listReagents()/create(). No Customer row\n/// should be created with kind SALES_AGENT going forward; the value is kept\n/// only so legacyTypeToKind()/kindToLegacyType() stay total functions and any\n/// already-migrated data keeps a readable label.\n///\n/// RETAIL marks a \"تک\" (single/retail) customer — legacy kept these in an\n/// entirely separate table (SingleCustomer/`login`) that could never contain\n/// a wholesale/agent/shopkeeper/banker row. The redesigned schema folded both\n/// into one Customer model, so this value is what listSingle() now filters on\n/// to reproduce that same separation.\nenum CustomerKind {\n SALES_AGENT // legacy 1 کارشناس فروش — superseded by AdminRole.SALES_EXPERT, do not use for new rows\n APP_SHOPKEEPER // 2 مغازه دار اپلیکیشن\n WALK_IN_SHOPKEEPER // 3 مغازه دار حضوری\n BANKER // 4 بنکدار\n WORKSHOP_SUPERVISOR // 5 سرپرست کارگاه\n RETAIL // مشتری تک — legacy SingleCustomer\n}\n\nenum VerificationStep {\n UNVERIFIED\n STEP_ONE_SUBMITTED\n STEP_TWO_SUBMITTED\n VERIFIED\n\n /// Legacy had THREE states per step, not two\n /// (MajorCustomerController.php:106-135): 1 = awaiting, 2 = approved,\n /// 3 = REJECTED. Mapping rejected customers to UNVERIFIED would put closed\n /// cases back in the review queue, so the owner ruled it out (2026-10-07).\n /// 14 legacy rows land here; see Customer.verificationRejectionReason.\n REJECTED\n}\n\n/// Legacy kept retail and wholesale orders in two SEPARATE tables\n/// (orders_orders vs orders). The redesigned schema has one Order model, so the\n/// distinction lives here instead.\nenum OrderChannel {\n RETAIL // تک فروشی\n WHOLESALE // عمده فروشی\n}\n\nenum OrderStatus {\n SUSPENDED // credit limit (goldCreditLimitGrams) exceeded at placement\n PLACED\n ADMIN_APPROVED\n SOURCING\n PREPARING\n DELIVERED_TO_AGENT\n DELIVERED_TO_CUSTOMER // debt recognition point — mirrors legacy sts>4\n CANCELLED\n}\n\nenum PreOrderStatus {\n PLACED\n ADMIN_APPROVED\n WORKSHOP_APPROVED\n READY_TO_SHIP\n DELIVERED\n CANCELLED\n}\n\nenum LedgerCurrency {\n GOLD_GRAM\n RIAL\n}\n\nenum LedgerDirection {\n DEBIT // increases what the customer owes\n CREDIT // decreases what the customer owes\n}\n\nenum LedgerSourceType {\n ORDER_STOCK\n ORDER_PRE_ORDER\n REPAYMENT_MELTED_GOLD // karat-normalized: amount * karatPerMille / 750\n REPAYMENT_TRANSFER\n REPAYMENT_CHEQUE\n REPAYMENT_CASH // price-per-gram-normalized via pricePerGramRialAtEntry\n WALLET_BONUS\n ADJUSTMENT\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Identity\n// ─────────────────────────────────────────────────────────────────────────\n\n/// Legacy `cities` is a tree (country > province > city > district) and so is\n/// this: a city hangs under its `parent`. In the admin pickers a top-level row\n/// (the country) is a heading, not selectable (henza_admin citiesModel.js:38).\nmodel City {\n id String @id @default(cuid())\n name String\n parentId String?\n parent City? @relation(\"CityTree\", fields: [parentId], references: [id], onDelete: Restrict)\n children City[] @relation(\"CityTree\")\n /// Legacy cities.percent / percent_aux — per-city wage surcharges the city\n /// screen edits through GET cities/get-percent/{id} and get-percent-aux/{id}.\n percent Decimal? @db.Decimal(6, 3)\n percentAux Decimal? @db.Decimal(6, 3)\n customers Customer[]\n addresses CustomerAddress[]\n branches Branch[]\n preOrders PreOrder[]\n salesExpertProfiles SalesExpertProfile[]\n\n @@index([parentId])\n}\n\nmodel AdminUser {\n id String @id @default(cuid())\n\n /// ⚠️ Kept in sync BY A DATABASE TRIGGER — `admin_user_sync_full_name`, from\n /// migration 20260922180000. Prisma cannot see it, so a write here may store\n /// something other than what you passed:\n ///\n /// * write the parts -> fullName is rebuilt as \"first last\"\n /// * write fullName only -> the parts are re-derived from it\n /// * write BOTH in one update -> THE PARTS WIN; the submitted fullName is\n /// discarded\n ///\n /// Re-read after writing if you need the stored value. Same arrangement as\n /// Customer (D0 requirement 7 — the split applies to ALL admins, not only\n /// sales experts).\n fullName String\n firstName String?\n lastName String?\n\n mobile String @unique\n passwordHash String\n role AdminRole\n /// Legacy `users.ut`. Granular ACL lives here (Permission rows hang off UserType);\n /// the coarse `role` enum above is retained for the business rules that already\n /// switch on it. Nullable so existing seeded admins remain valid.\n userTypeId Int?\n userType UserType? @relation(fields: [userTypeId], references: [id])\n branchId String?\n branch Branch? @relation(fields: [branchId], references: [id])\n wagePercent Decimal? @db.Decimal(6, 3) // legacy Customer.percent, commission on referred orders\n isActive Boolean @default(true)\n createdAt DateTime @default(now())\n\n /// Legacy stored a sales agent as a `customers` row with type=1, so\n /// ReagentCustomer.vue's shared form collected these alongside the\n /// wholesale-customer fields. A sales agent is now an AdminUser\n /// (role=SALES_EXPERT), so these live here instead — only ever set for that\n /// role; every other AdminUser leaves them null.\n avatarFileId String?\n avatarFile UploadedFile? @relation(\"AdminUserAvatar\", fields: [avatarFileId], references: [id])\n address String?\n storeName String? // legacy store_name\n pasazhName String? // legacy pasazh_name\n memberCode String? // legacy mcode\n\n referredCustomers Customer[] @relation(\"ReferralAgent\")\n /// Orders credited to this sales expert — see Order.salesAgentId.\n creditedOrders Order[] @relation(\"OrderSalesAgent\")\n supervisedWorkshops Workshop[] @relation(\"WorkshopSupervisor\")\n branchAllocations BranchAllocation[] @relation(\"AllocationAuthor\")\n postedLedgerEntries LedgerEntry[]\n orderStatusEvents OrderStatusEvent[]\n preOrderStatusEvents PreOrderStatusEvent[]\n sentSmsMessages SmsMessage[] @relation(\"SmsAuthor\")\n sentNotifications Notification[] @relation(\"NotificationAuthor\")\n uploadedFiles UploadedFile[] @relation(\"FileUploader\")\n\n /// Only ever set for role = SALES_EXPERT (D17).\n salesExpertProfile SalesExpertProfile?\n\n /// Issued admin-panel tokens, recorded only while session tracking is on\n /// (AUTH_SESSION_TRACKING, or implicitly whenever the IAM is enabled) so a\n /// token can be revoked before it expires. See AdminSession.\n sessions AdminSession[]\n\n @@index([role])\n @@index([userTypeId])\n @@index([avatarFileId])\n @@index([firstName])\n @@index([lastName])\n}\n\n/// An issued APP token (customer app / sales-expert app), so it can be revoked\n/// before it expires — the counterpart of AdminSession for the other token family.\n///\n/// WHY A SEPARATE TABLE AND NO FOREIGN KEY\n/// ---------------------------------------\n/// An app token's `sub` is a Customer id for a customer and an **AdminUser id**\n/// for a sales expert (D21). One FK cannot point at two tables, so the subject is\n/// stored as a plain id plus its type. The rows are short-lived operational data,\n/// not part of the accounting model, so the missing FK costs nothing here.\nmodel AppSession {\n id String @id @default(cuid())\n\n /// The token's `jti` claim. Unique: one row per issued token.\n jti String @unique\n\n /// Customer.id, or AdminUser.id when subjectType is \"sales-expert\".\n subjectId String\n subjectType String\n\n mobile String?\n\n /// Set when the login was confirmed by the central IAM: its session id (`sid`)\n /// and stable user id (`sub`), which is what a back-channel logout arrives with.\n iamSessionId String?\n iamSub String?\n\n ipAddress String?\n userAgent String?\n\n createdAt DateTime @default(now())\n expiresAt DateTime?\n lastSeenAt DateTime?\n\n revokedAt DateTime?\n revokedReason String?\n\n @@index([subjectId])\n @@index([iamSessionId])\n @@index([iamSub])\n @@index([expiresAt])\n}\n\n/// An issued admin-panel JWT, so it can be revoked before it expires.\n///\n/// WHY THIS EXISTS\n/// ---------------\n/// The admin token is self-contained and valid for 12h, which means nothing —\n/// not disabling the account, not a central \"sign out everywhere\" — could cut a\n/// session short: the token kept working until it expired. With the central IAM\n/// in the loop that gap became visible (an IAM session revocation had no effect\n/// here), so every issued token now carries a `jti` recorded on this table and\n/// JwtStrategy refuses a token whose row is revoked.\n///\n/// Rows are written ONLY while tracking is enabled, and JwtStrategy only\n/// enforces them while it is enabled, so a deployment that does not want the\n/// extra lookup behaves exactly as before.\nmodel AdminSession {\n id String @id @default(cuid())\n\n /// The token's `jti` claim. Unique: one row per issued token.\n jti String @unique\n\n adminUserId String\n adminUser AdminUser @relation(fields: [adminUserId], references: [id], onDelete: Cascade)\n\n /// Set when the login was verified by the IAM: its session id (`sid`) and the\n /// stable user id (`sub`) there. Back-channel logout arrives keyed by these —\n /// deliberately here rather than as columns on AdminUser, so enabling the\n /// feature needs no change to an existing table.\n iamSessionId String?\n iamSub String?\n\n ipAddress String?\n userAgent String?\n\n createdAt DateTime @default(now())\n expiresAt DateTime?\n lastSeenAt DateTime?\n\n revokedAt DateTime?\n revokedReason String?\n\n @@index([adminUserId])\n @@index([iamSessionId])\n @@index([iamSub])\n @@index([expiresAt])\n}\n\n/// The sales-expert fields legacy kept on the `customers` row (type=1) and that\n/// were lost when a sales expert became an AdminUser (D17).\n///\n/// A separate table rather than columns on AdminUser: these are meaningful only\n/// for role = SALES_EXPERT and would be permanently null for every other admin.\n/// A row is created for every SALES_EXPERT by the migration, and upserted by the\n/// service whenever one is created or a user's role becomes SALES_EXPERT — but\n/// readers still left-join, so a missing profile degrades to nulls rather than\n/// dropping the agent from the grid.\n///\n/// `reagent_id` is deliberately NOT here — see D17: in the reference it was a\n/// side effect of the shared customers form, and filling it removed that expert\n/// from the selectable-agent list (queryReagent, AdminController.php:420).\nmodel SalesExpertProfile {\n id String @id @default(cuid())\n adminUserId String @unique\n adminUser AdminUser @relation(fields: [adminUserId], references: [id], onDelete: Cascade)\n\n /// Legacy customers.city_id — a filterable grid column\n /// (ReagentListModel.js:14) and the source of the commission autofill\n /// (ReagentCustomer.vue:215-228).\n cityId String?\n city City? @relation(fields: [cityId], references: [id])\n\n /// Legacy customers.gram_level — the «سطح اعتبار» column, filterable.\n /// Decimal(14,4) matches Customer.goldCreditLimitGrams exactly so the same\n /// credit limit has identical precision on both tables.\n gramLevel Decimal @default(0) @db.Decimal(14, 4)\n\n /// Legacy customers.phone (varchar 15) and ncode (varchar 20). The reference\n /// stores both and reads neither back; kept so the form matches it. Neither\n /// is unique and neither has a validation rule in the reference — inventing\n /// one would reject data the reference accepts.\n phone String? @db.VarChar(15)\n nationalCode String? @db.VarChar(20)\n\n /// The Customer row carrying this expert's OWN orders, debt and credit limit.\n ///\n /// The reference stored a sales agent AS a Customer (type=1), so an order the\n /// agent placed from the app was simply their own, against their own\n /// gram_level (ApiMobileController.php:534-535). Here the expert is an\n /// AdminUser (D17), which has no ledger and cannot be an Order's subject, so\n /// this one linked Customer plays that part.\n ///\n /// Distinct from the expert's REFERRED customers, which are ordinary Customer\n /// rows pointing at the AdminUser through Customer.referredByAgentId.\n ///\n /// Null until the expert first signs into the app, when it is created from\n /// this profile. See D21.\n tradingCustomerId String? @unique\n tradingCustomer Customer? @relation(\"SalesExpertTradingAccount\", fields: [tradingCustomerId], references: [id], onDelete: SetNull)\n\n createdAt DateTime @default(now())\n updatedAt DateTime @default(now()) @updatedAt\n\n @@index([cityId])\n}\n\nmodel Customer {\n id String @id @default(cuid())\n\n /// ⚠️ `fullName`, `firstName` and `lastName` are kept in sync BY A DATABASE\n /// TRIGGER — `customer_sync_full_name`, created in migration\n /// 20260922120000_customer_name_parts. Prisma does not know about it, so a\n /// write here is NOT the whole story:\n ///\n /// * write the parts -> fullName is rebuilt as \"first last\"\n /// * write fullName only -> the parts are re-derived from it\n /// * write BOTH in one update -> THE PARTS WIN; fullName is overwritten\n /// with \"first last\" and whatever you passed for fullName is discarded\n ///\n /// So a value you wrote can differ from the value that lands in the row.\n /// Re-read after writing if you need the stored value. Prefer writing the\n /// parts; `fullName` exists for the legacy readers that predate D0.\n ///\n /// Reference has these as two columns from the start\n /// (henza_server 2020_10_01_120430_customers_table.php:18-19 fname/lname);\n /// the port collapsed them, which is the D0 defect.\n fullName String\n firstName String?\n lastName String?\n\n mobile String @unique\n /// Legacy customers.ncode. OPTIONAL since 2026-10-07: not one of the 1,616\n /// legacy customers has a national code (1595/1595 empty), and fabricating\n /// one is a data violation that would block later legal identity checks\n /// (owner ruling). Still @unique — in PostgreSQL NULLs do not collide, so\n /// the migration tool must write NULL and never '', which would collide on\n /// the second row.\n ///\n /// Three service-layer workarounds exist ONLY because this used to be\n /// required, and they store the MOBILE NUMBER here:\n /// admin-customers.service.ts:625,685 and customer-auth.service.ts:258.\n /// Retiring them is a separate change; see docs/DATA-MIGRATION-MAP.md §10.4.\n nationalCode String? @unique\n passwordHash String\n cityId String?\n city City? @relation(fields: [cityId], references: [id])\n\n /// Legacy customers.new_city — the city name exactly as the customer typed it\n /// at app sign-up (Major/CustomerController.php:36). Kept verbatim because\n /// the legacy city table has only 15 rows, so the typed name is often the only\n /// record of where the customer is (172 customers; 43 match no known city).\n /// cityId is set alongside it only on an exact, ي/ك-normalised name match.\n /// Legacy sign-up also forced city_id = 5 (Tehran) on everyone\n /// (Major/CustomerController.php:21), so for those rows the typed name, not\n /// cityId, is the truth. Owner ruling 2026-10-07: keep both.\n cityNameRaw String?\n\n /// Legacy Customer.type — distinguishes بنکدار from مغازه دار, which the\n /// BankerList / ShopkeeperList screens filter on.\n kind CustomerKind @default(APP_SHOPKEEPER)\n\n /// Legacy contact + shop columns, shown on the wholesale customer form and as\n /// (hidden-by-default) columns in its grid.\n phone String?\n address String?\n storeName String?\n pasazhName String?\n zone String?\n /// Legacy mcode — the operator-assigned customer code.\n memberCode String?\n\n referredByAgentId String?\n referredByAgent AdminUser? @relation(\"ReferralAgent\", fields: [referredByAgentId], references: [id])\n\n /// Set only on the one Customer row that acts as a sales expert's own trading\n /// account (see SalesExpertProfile.tradingCustomerId). Empty for every\n /// ordinary customer.\n salesExpertTradingFor SalesExpertProfile? @relation(\"SalesExpertTradingAccount\")\n /// Legacy orders that named THIS customer as their referrer — see\n /// Order.referrerCustomerId. History only.\n referredOrders Order[] @relation(\"OrderReferrerCustomer\")\n\n // Credit limit + cached ledger balances (source of truth is LedgerEntry; these\n // are denormalized for fast reads and reconciled by a scheduled job).\n goldCreditLimitGrams Decimal @default(0) @db.Decimal(14, 4) // legacy gram_level\n goldDebtGrams Decimal @default(0) @db.Decimal(14, 4) // legacy remain\n fiatDebtRial Decimal @default(0) @db.Decimal(20, 2) // legacy rial_remain\n\n /// Balance as last read from the accounting software (D27), in the app's own\n /// sign convention (positive = owes). Shown to the customer when the\n /// integration is on; the credit-limit check still uses goldDebtGrams above.\n /// Null until the first successful sync.\n accountingGoldBalance Decimal? @db.Decimal(14, 4)\n accountingRialBalance Decimal? @db.Decimal(20, 2)\n accountingBalanceAt DateTime?\n\n /// Legacy `customers.percent` — the per-customer making-charge offset. It is\n /// ADDED to the variant's making charge when pricing an order line\n /// (henza_pwa src/Mixins/product/index.ts:69-75:\n /// getWage(v) = state.percent + v.percentage_pay)\n /// and it shifts the catalogue making-charge filter bounds\n /// (ApiMobileController.php:391-396,76-77). It is NOT part of the price\n /// formula itself — that extra percent is ConfigStatic['product_price_extra_percent'].\n ///\n /// NOT the wallet cashback rate (storefront ConfigStatic['percent'], D13) and\n /// NOT the wholesale per-line charge (OrderItem.wagePercentSnapshot).\n ///\n /// DB default 0 keeps every existing customer's price unchanged. The\n /// reference's application-layer default for NEW customers is 3\n /// (AdminController.php:338) and the field is required on create (:354).\n makingChargeOffsetPercent Decimal @default(0) @db.Decimal(6, 3)\n\n verificationStep VerificationStep @default(UNVERIFIED)\n nationalIdImageUrl String?\n businessLicenseUrl String?\n shopImageUrl String?\n\n /// Why verification was rejected (VerificationStep.REJECTED).\n ///\n /// Legacy recorded NO reason: none of its 49 `customers` columns is a\n /// reason/note field, and on rejection it only sent a fixed SMS. So the 14\n /// rows migrated from henza carry the sentinel\n /// «رد شده در سیستم قدیم — فاقد شرح علت ثبت‌شده» instead of NULL, so support\n /// knows why it is blank (owner ruling 2026-10-07). The migration tool\n /// writes it only WHERE this IS NULL, so a re-run cannot overwrite a real\n /// reason entered in the new system.\n verificationRejectionReason String?\n\n /// NULL for rows migrated from henza — legacy recorded no rejection time.\n verificationRejectedAt DateTime?\n\n /// Legacy customers.birth_date, populated on 917 of 1,595 rows. Kept for the\n /// birthday SMS / loyalty campaigns (owner ruling 2026-10-07).\n ///\n /// ⚠ Legacy stores dates as JALALI STRINGS in other tables\n /// (cashes.recive_date is varchar, 88/89 values starting \"14…\"), so this\n /// timestamp may hold mis-entered Jalali years. Confirm the calendar with\n /// docs/migration-precheck-3.sql BEFORE backfilling: copying them unchanged\n /// would produce 917 wrong birthdays, worse for an SMS campaign than none.\n birthDate DateTime?\n\n /// Legacy `image_id` — the profile photo (عکس پروفایل) on the sales-agent\n /// form. Legacy stored an FK to its Image table and read it back as a nested\n /// `image: { id, image }`, so this is a relation, not a bare URL string.\n avatarFileId String?\n avatarFile UploadedFile? @relation(\"CustomerAvatar\", fields: [avatarFileId], references: [id])\n\n /// Legacy had TWO independent switches on a customer:\n /// sts -> may they place orders (this field)\n /// active -> is the account enabled (isActive, below)\n /// The port previously drove both from isActive; they are separate again.\n canPlaceOrders Boolean @default(true)\n\n isActive Boolean @default(true)\n /// Legacy archive flag — the archived list filtered on this, not on isActive.\n isArchived Boolean @default(false)\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n addresses CustomerAddress[]\n orders Order[]\n preOrders PreOrder[]\n ledgerEntries LedgerEntry[]\n walletBonuses WalletBonus[]\n comments Comment[]\n promotions Promotion[]\n notifications NotificationRecipient[]\n activityLogs CustomerActivityLog[]\n otpChallenges CustomerOtp[]\n favorites CustomerFavorite[]\n\n @@index([referredByAgentId])\n @@index([firstName])\n @@index([lastName])\n}\n\n/// Legacy `fav` (251 rows) — saved products. The target had no model for this,\n/// so every customer's favourites would have been lost in the migration; the\n/// owner confirmed on 2026-10-06 that they matter.\n///\n/// Legacy `fav` has two columns and NO primary key. The composite key here\n/// supplies the constraint the source lacks (the precheck found 0 duplicate\n/// pairs, but the tool should still SELECT DISTINCT). 14 of the 251 rows point\n/// at a deleted customer and must be skipped.\n///\n/// Legacy's denormalised `product.count_fav` counter is deliberately NOT\n/// recreated as a column — derive it from this table.\nmodel CustomerFavorite {\n customerId String\n customer Customer @relation(fields: [customerId], references: [id], onDelete: Cascade)\n productId String\n product Product @relation(fields: [productId], references: [id], onDelete: Cascade)\n createdAt DateTime @default(now())\n\n @@id([customerId, productId])\n @@index([productId])\n}\n\nmodel CustomerAddress {\n id String @id @default(cuid())\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n cityId String?\n city City? @relation(fields: [cityId], references: [id])\n addressLine String\n isDefault Boolean @default(false)\n}\n\nmodel Branch {\n id String @id @default(cuid())\n name String\n /// Legacy Branch.address / phone — both are columns in the branch grid.\n address String?\n phone String?\n /// Legacy GET branch/active/{id} toggles this.\n isActive Boolean @default(true)\n cityId String?\n city City? @relation(fields: [cityId], references: [id])\n adminUsers AdminUser[]\n orders Order[]\n allocations BranchAllocation[]\n}\n\nmodel Workshop {\n id String @id @default(cuid())\n name String\n /// Legacy Workshop.address / phone — both are columns in the workshop grid.\n address String?\n phone String?\n /// The supervisor created alongside the workshop by the legacy Add form.\n supervisorId String?\n supervisor AdminUser? @relation(\"WorkshopSupervisor\", fields: [supervisorId], references: [id])\n isActive Boolean @default(true)\n preOrders PreOrder[]\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Catalog — item reference catalog\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel Category {\n id String @id @default(cuid())\n title String\n /// Legacy Category.type — which storefront the category belongs to:\n /// 1 سایت | 2 اپلیکشن موبایل. Drives the \"type_str\" grid column.\n type Int @default(1)\n /// Legacy Category.image / icon — the grid renders the image, the storefront the icon.\n imageUrl String?\n iconUrl String?\n /// Legacy meta tag + description, used for SEO on the site categories.\n metaTag String?\n description String?\n parentId String?\n parent Category? @relation(\"CategoryTree\", fields: [parentId], references: [id])\n children Category[] @relation(\"CategoryTree\")\n products Product[]\n promotions Promotion[]\n}\n\nmodel Brand {\n id String @id @default(cuid())\n title String\n products Product[]\n promotions Promotion[]\n}\n\n/// Curated product groupings — replaces legacy \"Ciny/CinyProduct\" (a tagging\n/// feature, NOT a gold-price snapshot mechanism, despite the misleading legacy name).\nmodel Collection {\n id String @id @default(cuid())\n title String\n description String?\n isActive Boolean @default(true)\n products CollectionProduct[]\n}\n\nmodel CollectionProduct {\n collectionId String\n collection Collection @relation(fields: [collectionId], references: [id])\n productId String\n product Product @relation(fields: [productId], references: [id])\n\n @@id([collectionId, productId])\n}\n\nmodel Product {\n id String @id @default(cuid())\n title String\n description String?\n categoryId String?\n category Category? @relation(fields: [categoryId], references: [id])\n brandId String?\n brand Brand? @relation(fields: [brandId], references: [id])\n /// Legacy Product.product_code — the human-facing SKU shown in the grid.\n productCode String? @unique\n /// Legacy Product.show_type: 1 site, 2 mobile, 3 both.\n showType Int @default(3)\n isActive Boolean @default(true)\n createdAt DateTime @default(now())\n\n /// Stock of the linked کارساخته as last read from the accounting software\n /// (D27). Weight for gram-type items, count for count-type ones — whichever\n /// the software reports. At zero or below the product is unavailable in the\n /// app (pre-order variants excepted). Null = not linked or never synced.\n accountingStockWeight Decimal? @db.Decimal(14, 4)\n accountingStockCount Decimal? @db.Decimal(14, 4)\n accountingStockAt DateTime?\n\n variants ProductVariant[]\n images ProductImage[]\n collections CollectionProduct[]\n comments Comment[]\n promotions Promotion[]\n allocationItems BranchAllocationItem[]\n favoritedBy CustomerFavorite[]\n}\n\nmodel ProductImage {\n id String @id @default(cuid())\n productId String\n product Product @relation(fields: [productId], references: [id])\n url String\n sortOrder Int @default(0)\n /// Legacy had 4 distinct upload slots (تصویر شاخص / تصویر شاخص موبایل /\n /// گالری تصاویر سایت / گالری تصاویر موبایل) — GALLERY is the default so\n /// existing rows and any generic \"just attach an image\" caller keep working.\n role ProductImageRole @default(GALLERY)\n\n /// Variants that display this image. A gallery image may back several\n /// variants (one photo, several weights), which is why this is a plain\n /// one-to-many and not a join table.\n variants ProductVariant[]\n}\n\nenum ProductImageRole {\n FEATURED\n FEATURED_MOBILE\n GALLERY\n GALLERY_MOBILE\n}\n\nmodel ProductVariant {\n id String @id @default(cuid())\n productId String\n product Product @relation(fields: [productId], references: [id])\n title String\n sku String? @unique\n /// Base/raw weight before making charge (\"rash weight\").\n rashWeightGrams Decimal @db.Decimal(14, 4)\n /// Default making-charge percentage applied on top of rash weight.\n defaultWagePercent Decimal @db.Decimal(6, 3)\n /// Legacy ProductVariant.qty — on-hand stock. The cart refuses a variant with\n /// qty 0 unless it is flagged pre-order, so both fields are required for that\n /// guard to work (see apps/admin-panel/src/stores/cart.ts).\n qty Int @default(0)\n /// Legacy is_pre_order: orderable even at zero stock.\n isPreOrder Boolean @default(false)\n isActive Boolean @default(true)\n\n /// The gallery image shown for this variant, picked from its own product's\n /// images — never a re-uploaded copy. onDelete: SetNull because dropping an\n /// image must never cascade into the variant: OrderItem rows reference\n /// variants, so losing one would break order history.\n imageId String?\n image ProductImage? @relation(fields: [imageId], references: [id], onDelete: SetNull)\n\n orderItems OrderItem[]\n\n @@index([imageId])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Orders — stock orders (debt-bearing)\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel Order {\n id String @id @default(cuid())\n orderNumber String @unique\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n branchId String?\n branch Branch? @relation(fields: [branchId], references: [id])\n /// Which sales channel placed this order — see OrderChannel.\n channel OrderChannel @default(RETAIL)\n status OrderStatus @default(PLACED)\n\n /// Total gold weight incl. wage across all items (\"allGram\" / order.w).\n totalGoldWeightGrams Decimal @db.Decimal(14, 4)\n /// Pure making-charge weight component (totalGoldWeightGrams minus raw weight sum).\n wageWeightGrams Decimal @db.Decimal(14, 4)\n /// Flat Rial charge independent of gold price (e.g. stones) — legacy rial_input.\n flatRialCharge Decimal @default(0) @db.Decimal(20, 2)\n\n isSuspendedOverCreditLimit Boolean @default(false)\n deliveredAt DateTime? // setting this is what triggers debt recognition\n\n /// The sales expert this order is credited to, fixed when it is placed:\n /// the customer's referring expert AT THAT MOMENT. Legacy `orders.reagent_id`,\n /// set once at creation (ApiMobileController.php:601) and never moved, so a\n /// customer changing expert later does not move past sales or commission\n /// (owner ruling 2026-10-08). «میزان فروش» counts from here, never from the\n /// customer's current referrer.\n salesAgentId String?\n salesAgent AdminUser? @relation(\"OrderSalesAgent\", fields: [salesAgentId], references: [id], onDelete: SetNull)\n\n /// History only: a legacy order whose `reagent_id` named a customer who is\n /// not a sales expert (one such customer, 17 orders in 2022). Legacy counted\n /// those orders in that customer's own «میزان فروش»; this keeps that figure\n /// exact. Never set for a new order.\n referrerCustomerId String?\n referrerCustomer Customer? @relation(\"OrderReferrerCustomer\", fields: [referrerCustomerId], references: [id], onDelete: SetNull)\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n items OrderItem[]\n statusEvents OrderStatusEvent[]\n ledgerEntries LedgerEntry[]\n convertedFromPreOrder PreOrder?\n\n @@index([customerId])\n @@index([status])\n @@index([salesAgentId])\n @@index([referrerCustomerId])\n}\n\nmodel OrderItem {\n id String @id @default(cuid())\n orderId String\n order Order @relation(fields: [orderId], references: [id])\n productVariantId String\n productVariant ProductVariant @relation(fields: [productVariantId], references: [id])\n quantity Int\n\n // Snapshots at order time — never re-read from ProductVariant after placement.\n rashWeightGramsSnapshot Decimal @db.Decimal(14, 4)\n wagePercentSnapshot Decimal @db.Decimal(6, 3)\n discountPercentSnapshot Decimal @default(0) @db.Decimal(6, 3)\n /// computed: rash*(1 + (wagePercent-discount)/100)\n computedWeightGrams Decimal @db.Decimal(14, 4)\n flatRialCharge Decimal @default(0) @db.Decimal(20, 2)\n}\n\nmodel OrderStatusEvent {\n id String @id @default(cuid())\n orderId String\n order Order @relation(fields: [orderId], references: [id])\n fromStatus OrderStatus?\n toStatus OrderStatus\n note String?\n actorAdminUserId String?\n actorAdminUser AdminUser? @relation(fields: [actorAdminUserId], references: [id])\n createdAt DateTime @default(now())\n\n @@index([orderId])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Pre-orders — custom manufacturing requests (not debt-bearing until converted)\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel PreOrder {\n id String @id @default(cuid())\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n cityId String?\n city City? @relation(fields: [cityId], references: [id])\n workshopId String?\n workshop Workshop? @relation(fields: [workshopId], references: [id])\n status PreOrderStatus @default(PLACED)\n\n designImageUrl String?\n colorName String?\n sizeSpec String?\n stoneColor String?\n minaColor String?\n estimatedWeightGrams Decimal? @db.Decimal(14, 4)\n estimatedPriceRial Decimal? @db.Decimal(20, 2)\n description String?\n\n /// Once priced, an admin converts this into a real (debt-bearing) Order.\n convertedOrderId String? @unique\n convertedOrder Order? @relation(fields: [convertedOrderId], references: [id])\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n statusEvents PreOrderStatusEvent[]\n\n @@index([customerId])\n}\n\nmodel PreOrderStatusEvent {\n id String @id @default(cuid())\n preOrderId String\n preOrder PreOrder @relation(fields: [preOrderId], references: [id])\n /// Field-level diff, e.g. {\"status\": {\"old\": \"PLACED\", \"new\": \"ADMIN_APPROVED\"}}\n changes Json\n actorAdminUserId String?\n actorAdminUser AdminUser? @relation(fields: [actorAdminUserId], references: [id])\n ipAddress String?\n createdAt DateTime @default(now())\n\n @@index([preOrderId])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Accounting — the dual-currency ledger (core of the system)\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel LedgerEntry {\n id String @id @default(cuid())\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n\n currency LedgerCurrency\n direction LedgerDirection\n sourceType LedgerSourceType\n /// Always positive; direction determines the sign applied to the customer balance.\n amount Decimal @db.Decimal(20, 4)\n\n /// Purity of the physical instrument, for REPAYMENT_MELTED_GOLD (e.g. 750, 916).\n karatPerMille Int?\n /// Gold price/gram at conversion time, for REPAYMENT_CASH.\n pricePerGramRialAtEntry Decimal? @db.Decimal(20, 2)\n\n orderId String?\n order Order? @relation(fields: [orderId], references: [id])\n\n /// Pending entries don't count toward the cached customer balance until confirmed.\n confirmed Boolean @default(false)\n confirmedAt DateTime?\n postedByAdminUserId String?\n postedByAdminUser AdminUser? @relation(fields: [postedByAdminUserId], references: [id])\n\n /// Instrument metadata from the legacy \"cash\" document form. Which fields are\n /// filled depends on sourceType: a melted-gold receipt carries lab/hallmark and\n /// the pre-normalization weight, a cheque carries the account and bank, and a\n /// transfer carries its destination.\n /// Legacy columns: lab, ang, account_name, bank_name, to, original_value, recive_date.\n labName String?\n hallmark String?\n accountName String?\n bankName String?\n transferTo String?\n /// Weight as handed over, BEFORE karat normalization (legacy original_value).\n originalValue Decimal? @db.Decimal(14, 4)\n /// Rial amount for cash/cheque documents (legacy price).\n priceRial Decimal? @db.Decimal(20, 2)\n receivedAt DateTime?\n\n note String?\n createdAt DateTime @default(now())\n\n @@index([customerId, currency])\n @@index([orderId])\n}\n\n/// Replaces legacy WebServiceGold / ConfigStatic.gold_price — timestamped price feed.\nmodel GoldPriceQuote {\n id String @id @default(cuid())\n karatPerMille Int\n pricePerGramRial Decimal @db.Decimal(20, 2)\n source String\n quotedAt DateTime @default(now())\n\n @@index([karatPerMille, quotedAt])\n}\n\n/// Time-limited gold cashback bonus — replaces the legacy Rooyesh\\Wallet gold credit.\nmodel WalletBonus {\n id String @id @default(cuid())\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n orderId String?\n goldGrams Decimal @db.Decimal(14, 4)\n grantedAt DateTime @default(now())\n expiresAt DateTime\n consumedAt DateTime?\n isActive Boolean @default(true)\n\n @@index([customerId, isActive])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Admin ACL — faithful port of the legacy granular permission model.\n//\n// Legacy (henza_server):\n// Schema::create('permission', function (Blueprint $table) {\n// $table->string('rid');\n// $table->integer('ut');\n// $table->primary(['rid' , 'ut']);\n// });\n//\n// Permissions attach to the USER TYPE (`ut`), never to an individual user, so\n// every admin of a given type shares one permission set. `ut` pointed at a row\n// in the legacy `config_static` lookup table; UserType is that table, narrowed\n// to the admin-user-type rows it was actually used for.\n//\n// A `rid` is a dotted permission id such as \"persons.list.client.omde\". The\n// frontend expands each stored rid into its ancestors at runtime via\n// checkParent() — see apps/admin-panel/src/stores/users.ts. Only the 58 leaf\n// rids the routers actually gate are seeded; ancestors are derived, not stored.\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel UserType {\n /// Legacy `permission.ut` / `users.ut` — an integer, kept as the PK so seeded\n /// rows keep their legacy identity rather than getting new cuids.\n id Int @id\n title String\n isActive Boolean @default(true)\n createdAt DateTime @default(now())\n\n permissions Permission[]\n adminUsers AdminUser[]\n\n @@map(\"user_type\")\n}\n\nmodel Permission {\n /// Dotted permission id, e.g. \"order.list\", \"persons.list.client.omde\".\n rid String\n userTypeId Int\n userType UserType @relation(fields: [userTypeId], references: [id], onDelete: Cascade)\n\n /// Legacy's composite primary key (rid, ut), preserved exactly.\n @@id([rid, userTypeId])\n @@index([userTypeId])\n @@map(\"permission\")\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Product comments / reviews — legacy `comment` table (App\\Models\\Comment),\n// moderated from views/customer/Comments/Comments.vue.\n//\n// Legacy fillable: product_id, comment, reply_to, sts, customer_id\n// Legacy Comment::$STS = [1 => 'در انتظار تایید', 2 => 'تایید شده', 3 => 'رد شده']\n// which is represented here as an enum rather than a magic integer.\n// ─────────────────────────────────────────────────────────────────────────\n\nenum CommentStatus {\n PENDING // 1 — در انتظار تایید\n APPROVED // 2 — تایید شده\n REJECTED // 3 — رد شده\n}\n\nmodel Comment {\n id String @id @default(cuid())\n productId String\n product Product @relation(fields: [productId], references: [id])\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n body String\n status CommentStatus @default(PENDING)\n\n /// Legacy `reply_to`: a staff reply threads under the comment it answers.\n replyToId String?\n replyTo Comment? @relation(\"CommentReplies\", fields: [replyToId], references: [id])\n replies Comment[] @relation(\"CommentReplies\")\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@index([productId])\n @@index([customerId])\n @@index([status])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Settings — replaces legacy `config_static`, a key/value table the admin\n// panel read and wrote through endpoints like /wallet/config and\n// /const/__list__ut. Values are stored as JSON so a setting can hold a scalar,\n// an object, or the dynamic option lists legacy kept under `__list__*` keys.\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel Setting {\n key String @id\n value Json\n updatedAt DateTime @updatedAt\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Accounting integration (D27) — the shop's accounting software, Tahesab or\n// Zarrin, chosen in the admin panel. Configuration lives in the Setting row\n// `accounting.config` (never served by the generic `const` routes). Plan:\n// docs/ACCOUNTING-INTEGRATION-PLAN.md.\n//\n// `provider` is the driver name ('tahesab' | 'zarrin'), a plain string like\n// SMS_PROVIDER so a new driver needs no migration. Links are per provider, so\n// switching provider and back loses nothing.\n// ─────────────────────────────────────────────────────────────────────────\n\nenum AccountingEntityType {\n CUSTOMER\n PRODUCT\n}\n\n/// One app row ↔ one record in the accounting software (customer account or\n/// کارساخته).\nmodel AccountingLink {\n id String @id @default(cuid())\n provider String\n entityType AccountingEntityType\n entityId String\n /// The record's code in the accounting software (Tahesab Moshtari_Code /\n /// Zarrin idHesab; for products the Zarrin idKar or the Tahesab Name_Kar).\n externalCode String\n externalName String?\n /// How the link came to be: LINKED (matched by mobile/name), IMPORTED (app\n /// row created from the accounting record), PUSHED (accounting record created\n /// from the app row) or MANUAL (an admin typed the code).\n origin String\n /// The record as last read, for display only.\n snapshot Json?\n syncedAt DateTime @default(now())\n createdAt DateTime @default(now())\n\n @@unique([provider, entityType, entityId])\n @@unique([provider, entityType, externalCode])\n @@index([entityType, entityId])\n}\n\nenum AccountingOutboxKind {\n CUSTOMER_PUSH\n PRODUCT_PUSH\n ORDER_DOCUMENT\n ORDER_DOCUMENT_DELETE\n}\n\nenum AccountingOutboxStatus {\n PENDING\n /// A call was in flight. Found at startup, it means the process died mid-call\n /// and the outcome is unknown — see AccountingOutboxWorker.\n SENDING\n SENT\n FAILED\n /// Unsafe to retry automatically (e.g. a Zarrin call timed out: Zarrin has no\n /// idempotency key, so a blind retry could post the document twice).\n NEEDS_REVIEW\n /// Closed by an admin from the log screen.\n RESOLVED\n}\n\n/// Work to push to the accounting software. Written in the SAME transaction as\n/// the change that causes it, so an outage of the accounting software never\n/// loses an event and never blocks the app.\nmodel AccountingOutbox {\n id String @id @default(cuid())\n provider String\n kind AccountingOutboxKind\n entityId String\n status AccountingOutboxStatus @default(PENDING)\n attempts Int @default(0)\n nextAttemptAt DateTime @default(now())\n lastError String?\n /// What the accounting software returned as the document/record id.\n externalRef String?\n /// Per-step progress of multi-call jobs (a Zarrin document is one call per\n /// line), so a failure resumes where it stopped.\n progress Json?\n /// Last request/response, for the log screen. Never contains the token.\n lastRequest Json?\n lastResponse Json?\n sentAt DateTime?\n resolvedById String?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@index([status, nextAttemptAt])\n @@index([kind, entityId])\n}\n\n/// Something a pull found that needs a human: an account with no mobile, two\n/// accounts sharing one mobile, a کارساخته group with no category mapping.\nmodel AccountingIssue {\n id String @id @default(cuid())\n provider String\n kind String\n externalCode String\n entityId String?\n message String\n data Json?\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n resolvedAt DateTime?\n\n @@unique([provider, kind, externalCode])\n @@index([resolvedAt])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Promotions / discounts — legacy views/promotion/*, served by\n// PromotionController (`product/variant/promotion`). The redesigned schema had\n// no promotion concept at all; this models what the legacy forms actually\n// collect.\n// ─────────────────────────────────────────────────────────────────────────\n\n/// Legacy Promotion.type — what the discount is scoped to.\nenum PromotionScope {\n PRODUCT // 1 محصولات\n CATEGORY // 2 دسته بندی\n CUSTOMER // 3 مشتری\n BRAND // 4 برند\n}\n\n/// Legacy Promotion.use_only — how often a customer may redeem it.\nenum PromotionUsage {\n ONCE // 1 فقط یکبار\n UNTIL_END_DATE // 2 تا تاریخ پایان\n}\n\nmodel Promotion {\n id String @id @default(cuid())\n title String\n description String?\n scope PromotionScope @default(PRODUCT)\n usage PromotionUsage @default(ONCE)\n /// Percentage off, 0-100 (legacy discount_percent).\n discountPercent Decimal @db.Decimal(6, 3)\n isActive Boolean @default(true)\n /// Which storefront it shows on, mirroring Product.showType (legacy platform).\n platform Int @default(3)\n\n startsAt DateTime?\n endsAt DateTime?\n\n /// Exactly one of these is populated, per `scope`.\n productId String?\n product Product? @relation(fields: [productId], references: [id])\n categoryId String?\n category Category? @relation(fields: [categoryId], references: [id])\n customerId String?\n customer Customer? @relation(fields: [customerId], references: [id])\n brandId String?\n brand Brand? @relation(fields: [brandId], references: [id])\n\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n\n @@index([scope, isActive])\n}\n\n/// Legacy \"ignore\" table (views/offersIgnore) — specific products, categories,\n/// customers or brands excluded from the automatic discount engine.\n/// Legacy posts { type, item_id[] }: \"type\" reuses the promotion scope codes\n/// (1 محصولات | 2 دسته بندی | 3 مشتری | 4 برند) and \"itemId\" is the excluded row.\nmodel PromotionExclusion {\n id String @id @default(cuid())\n type Int\n itemId String\n createdAt DateTime @default(now())\n\n @@unique([type, itemId])\n @@index([type])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Branch stock allocation — legacy views/invoice/* (\"فاکتور انتقال\"), served by\n// BranchController as `branch/product`. Despite the screen being called an\n// invoice, it is not a sales document: it records which products head office\n// allocated to a branch, and who allocated them.\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel BranchAllocation {\n id String @id @default(cuid())\n branchId String\n branch Branch @relation(fields: [branchId], references: [id])\n\n /// Legacy `allocator_user` — the admin who filed the allocation.\n allocatorAdminUserId String?\n allocatorAdminUser AdminUser? @relation(\"AllocationAuthor\", fields: [allocatorAdminUserId], references: [id])\n\n note String?\n createdAt DateTime @default(now())\n\n items BranchAllocationItem[]\n\n @@index([branchId])\n}\n\nmodel BranchAllocationItem {\n id String @id @default(cuid())\n allocationId String\n allocation BranchAllocation @relation(fields: [allocationId], references: [id], onDelete: Cascade)\n productId String\n product Product @relation(fields: [productId], references: [id])\n /// Weight snapshot at allocation time, so later catalog edits do not rewrite history.\n weightGrams Decimal? @db.Decimal(14, 4)\n\n @@unique([allocationId, productId])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Messaging + audit — legacy views/sms, views/notify, views/newsletters and\n// views/statics. None of these had a model in the redesigned schema.\n// ─────────────────────────────────────────────────────────────────────────\n\n/// Who an SMS or notification was aimed at. Legacy's sms/create offered these\n/// audiences, each gated by its own rid (sms.create.all, .omde, .single, ...).\nenum MessageAudience {\n SINGLE_NUMBER // یک شماره\n MULTIPLE_NUMBERS // چند شماره\n ALL_CUSTOMERS // همه\n WHOLESALE_CUSTOMERS // عمده\n RETAIL_CUSTOMERS // تک\n SALES_AGENTS // کارشناسان فروش\n}\n\nmodel SmsMessage {\n id String @id @default(cuid())\n audience MessageAudience\n /// Comma-separated recipients for the SINGLE/MULTIPLE audiences.\n recipients String?\n body String\n /// How many numbers the send actually resolved to.\n sentCount Int @default(0)\n\n sentByAdminUserId String?\n sentByAdminUser AdminUser? @relation(\"SmsAuthor\", fields: [sentByAdminUserId], references: [id])\n\n createdAt DateTime @default(now())\n\n @@index([createdAt])\n}\n\nmodel Notification {\n id String @id @default(cuid())\n title String\n body String\n audience MessageAudience @default(ALL_CUSTOMERS)\n\n sentByAdminUserId String?\n sentByAdminUser AdminUser? @relation(\"NotificationAuthor\", fields: [sentByAdminUserId], references: [id])\n\n createdAt DateTime @default(now())\n\n recipients NotificationRecipient[]\n\n @@index([createdAt])\n}\n\n/// Per-customer delivery + read state — legacy `GET notify/read/{id}`.\nmodel NotificationRecipient {\n id String @id @default(cuid())\n notificationId String\n notification Notification @relation(fields: [notificationId], references: [id], onDelete: Cascade)\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n readAt DateTime?\n\n @@unique([notificationId, customerId])\n @@index([customerId, readAt])\n}\n\n/// Legacy views/newsletters — the mailing-list signups collected by the site.\nmodel NewsletterSubscriber {\n id String @id @default(cuid())\n email String?\n mobile String?\n createdAt DateTime @default(now())\n\n @@unique([email])\n @@unique([mobile])\n}\n\n/// Legacy views/statics — the customer activity log the \"آمار\" screen reads\n/// (`log/list/customer`, `log/ago/{customerId}`).\nmodel CustomerActivityLog {\n id String @id @default(cuid())\n customerId String\n customer Customer @relation(fields: [customerId], references: [id])\n /// Free-form action key, e.g. 'login', 'order.placed', 'profile.updated'.\n action String\n detail String?\n createdAt DateTime @default(now())\n\n @@index([customerId, createdAt])\n}\n\n// ─────────────────────────────────────────────────────────────────────────\n// Uploads — replaces the legacy MyUpload / SingleUploadInput widgets, which\n// POSTed to a file endpoint and stored the returned URL on the owning record.\n// Ports of those forms currently take a URL by hand; this gives them a real\n// destination to upload to.\n// ─────────────────────────────────────────────────────────────────────────\n\nmodel UploadedFile {\n id String @id @default(cuid())\n /// Public URL the stored file is served from.\n url String\n originalName String\n mimeType String\n sizeBytes Int\n /// Free-form tag for what the file belongs to, e.g. 'product', 'category',\n /// 'customer.nationalId'. Kept loose so a new form needs no schema change.\n purpose String?\n\n uploadedByAdminUserId String?\n uploadedByAdminUser AdminUser? @relation(\"FileUploader\", fields: [uploadedByAdminUserId], references: [id])\n\n createdAt DateTime @default(now())\n customerAvatars Customer[] @relation(\"CustomerAvatar\")\n adminUserAvatars AdminUser[] @relation(\"AdminUserAvatar\")\n\n @@index([purpose])\n}\n\n/// One OTP login challenge for a customer.\n///\n/// Ports henza_server's flow (ApiMobileController.php:39-78), where userAuth\n/// generated rand(1000,9999), stored it on the customer row as `send_password`\n/// and sent it by SMS, and userVerfiy compared the submitted code against it\n/// (mismatch -> HTTP 422).\n///\n/// Three deliberate improvements over the reference, approved by the user\n/// (docs/parity/DECISIONS.md D6 and T1):\n/// 1. the code is stored as a bcrypt hash, never in plain text — the\n/// reference kept it readable in a customer column;\n/// 2. it expires (`expiresAt`) — the reference's code stayed valid forever;\n/// 3. attempts are counted and the challenge locks out — the reference had\n/// no limit at all.\n/// The parity behaviour itself is the code comparison and the rejection.\nmodel CustomerOtp {\n id String @id @default(cuid())\n /// Normalised to English digits before storing, as the reference does with\n /// Utility::faTOen() on both send and verify.\n mobile String\n customerId String\n customer Customer @relation(fields: [customerId], references: [id], onDelete: Cascade)\n\n /// bcrypt hash of the 4-digit code. Never the code itself.\n codeHash String\n expiresAt DateTime\n /// Failed verify attempts against THIS challenge.\n attempts Int @default(0)\n /// Set when the code is accepted, so one challenge cannot be reused.\n consumedAt DateTime?\n\n /// Kept for the per-IP send throttle.\n requestIp String?\n createdAt DateTime @default(now())\n\n @@index([mobile, createdAt])\n @@index([customerId])\n @@index([expiresAt])\n}\n\n/// Bespoke migration ledger left by the EARLIER, pre-Prisma port.\n///\n/// It predates Prisma Migrate in this repo and holds 12 historical rows\n/// (`0001_init.sql`, `0002_admin_schema.sql`, `seed:initial`, and the early\n/// `2026091…` migrations). It is the only record of how that port was applied,\n/// so it is **kept and never written to or deleted from** (DEAD-07).\n///\n/// It is declared here purely so `prisma migrate diff` stops proposing\n/// `DROP TABLE \"_goldbank_migrations\"` — an undeclared table reads as drift.\n/// `@@ignore` keeps it out of Prisma Client: nothing in the application should\n/// ever read or write it, and Prisma Migrate will not manage its shape either.\n///\n/// Prisma's own ledger is `_prisma_migrations`, which is separate and is never\n/// edited by hand (D14).\nmodel goldbank_migrations {\n name String @id\n appliedAt DateTime @default(now()) @map(\"applied_at\") @db.Timestamptz(6)\n\n @@map(\"_goldbank_migrations\")\n @@ignore\n}\n", + "inlineSchemaHash": "92e2cff33376f2e839b0a17e3a4d04d885200afe9951b002f1abfcbabf7f7932", "copyEngine": true } @@ -696,7 +863,7 @@ if (!fs.existsSync(path.join(__dirname, 'schema.prisma'))) { config.isBundled = true } -config.runtimeDataModel = JSON.parse("{\"models\":{\"City\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"province\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"percent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy cities.percent / percent_aux — per-city wage surcharges the city\\\\nscreen edits through GET cities/get-percent/{id} and get-percent-aux/{id}.\"},{\"name\":\"percentAux\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CityToCustomer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"addresses\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CustomerAddress\",\"relationName\":\"CityToCustomerAddress\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branches\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Branch\",\"relationName\":\"BranchToCity\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrder\",\"relationName\":\"CityToPreOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"AdminUser\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fullName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mobile\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"passwordHash\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"role\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminRole\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userTypeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy `users.ut`. Granular ACL lives here (Permission rows hang off UserType);\\\\nthe coarse `role` enum above is retained for the business rules that already\\\\nswitch on it. Nullable so existing seeded admins remain valid.\"},{\"name\":\"userType\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UserType\",\"relationName\":\"AdminUserToUserType\",\"relationFromFields\":[\"userTypeId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branch\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Branch\",\"relationName\":\"AdminUserToBranch\",\"relationFromFields\":[\"branchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"wagePercent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"referredCustomers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"ReferralAgent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"supervisedWorkshops\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Workshop\",\"relationName\":\"WorkshopSupervisor\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branchAllocations\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BranchAllocation\",\"relationName\":\"AllocationAuthor\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"postedLedgerEntries\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerEntry\",\"relationName\":\"AdminUserToLedgerEntry\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderStatusEvents\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderStatusEvent\",\"relationName\":\"AdminUserToOrderStatusEvent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrderStatusEvents\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrderStatusEvent\",\"relationName\":\"AdminUserToPreOrderStatusEvent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sentSmsMessages\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SmsMessage\",\"relationName\":\"SmsAuthor\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sentNotifications\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Notification\",\"relationName\":\"NotificationAuthor\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"uploadedFiles\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UploadedFile\",\"relationName\":\"FileUploader\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Customer\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fullName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mobile\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"nationalCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"passwordHash\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"cityId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"city\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"City\",\"relationName\":\"CityToCustomer\",\"relationFromFields\":[\"cityId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"kind\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"CustomerKind\",\"default\":\"APP_SHOPKEEPER\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy Customer.type — distinguishes بنکدار from مغازه دار, which the\\\\nBankerList / ShopkeeperList screens filter on.\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy contact + shop columns, shown on the wholesale customer form and as\\\\n(hidden-by-default) columns in its grid.\"},{\"name\":\"address\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"storeName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"pasazhName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"zone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memberCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy mcode — the operator-assigned customer code.\"},{\"name\":\"referredByAgentId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"referredByAgent\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"ReferralAgent\",\"relationFromFields\":[\"referredByAgentId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"goldCreditLimitGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"goldDebtGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fiatDebtRial\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"verificationStep\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"VerificationStep\",\"default\":\"UNVERIFIED\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"nationalIdImageUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"businessLicenseUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"shopImageUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"avatarFileId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy `image_id` — the profile photo (عکس پروفایل) on the sales-agent\\\\nform. Legacy stored an FK to its Image table and read it back as a nested\\\\n`image: { id, image }`, so this is a relation, not a bare URL string.\"},{\"name\":\"avatarFile\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UploadedFile\",\"relationName\":\"CustomerAvatar\",\"relationFromFields\":[\"avatarFileId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"canPlaceOrders\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy had TWO independent switches on a customer:\\\\nsts -> may they place orders (this field)\\\\nactive -> is the account enabled (isActive, below)\\\\nThe port previously drove both from isActive; they are separate again.\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isArchived\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy archive flag — the archived list filtered on this, not on isActive.\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"addresses\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CustomerAddress\",\"relationName\":\"CustomerToCustomerAddress\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"CustomerToOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrder\",\"relationName\":\"CustomerToPreOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ledgerEntries\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerEntry\",\"relationName\":\"CustomerToLedgerEntry\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"walletBonuses\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"WalletBonus\",\"relationName\":\"CustomerToWalletBonus\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"comments\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Comment\",\"relationName\":\"CommentToCustomer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"promotions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Promotion\",\"relationName\":\"CustomerToPromotion\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notifications\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"NotificationRecipient\",\"relationName\":\"CustomerToNotificationRecipient\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"activityLogs\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CustomerActivityLog\",\"relationName\":\"CustomerToCustomerActivityLog\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"CustomerAddress\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToCustomerAddress\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"cityId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"city\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"City\",\"relationName\":\"CityToCustomerAddress\",\"relationFromFields\":[\"cityId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"addressLine\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isDefault\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Branch\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"address\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy Branch.address / phone — both are columns in the branch grid.\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy GET branch/active/{id} toggles this.\"},{\"name\":\"cityId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"city\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"City\",\"relationName\":\"BranchToCity\",\"relationFromFields\":[\"cityId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminUsers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminUserToBranch\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"BranchToOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"allocations\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BranchAllocation\",\"relationName\":\"BranchToBranchAllocation\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Workshop\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"address\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy Workshop.address / phone — both are columns in the workshop grid.\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"supervisorId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"The supervisor created alongside the workshop by the legacy Add form.\"},{\"name\":\"supervisor\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"WorkshopSupervisor\",\"relationFromFields\":[\"supervisorId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrder\",\"relationName\":\"PreOrderToWorkshop\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Category\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":1,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy Category.type — which storefront the category belongs to:\\\\n1 سایت | 2 اپلیکشن موبایل. Drives the \\\"type_str\\\" grid column.\"},{\"name\":\"imageUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy Category.image / icon — the grid renders the image, the storefront the icon.\"},{\"name\":\"iconUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"metaTag\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy meta tag + description, used for SEO on the site categories.\"},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"parentId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"parent\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Category\",\"relationName\":\"CategoryTree\",\"relationFromFields\":[\"parentId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"children\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Category\",\"relationName\":\"CategoryTree\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"products\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"CategoryToProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"promotions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Promotion\",\"relationName\":\"CategoryToPromotion\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Brand\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"products\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"BrandToProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"promotions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Promotion\",\"relationName\":\"BrandToPromotion\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Collection\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"products\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CollectionProduct\",\"relationName\":\"CollectionToCollectionProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"Curated product groupings — replaces legacy \\\"Ciny/CinyProduct\\\" (a tagging\\\\nfeature, NOT a gold-price snapshot mechanism, despite the misleading legacy name).\"},\"CollectionProduct\":{\"dbName\":null,\"fields\":[{\"name\":\"collectionId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"collection\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Collection\",\"relationName\":\"CollectionToCollectionProduct\",\"relationFromFields\":[\"collectionId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"product\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"CollectionProductToProduct\",\"relationFromFields\":[\"productId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"collectionId\",\"productId\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Product\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"categoryId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"category\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Category\",\"relationName\":\"CategoryToProduct\",\"relationFromFields\":[\"categoryId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"brandId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"brand\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Brand\",\"relationName\":\"BrandToProduct\",\"relationFromFields\":[\"brandId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy Product.product_code — the human-facing SKU shown in the grid.\"},{\"name\":\"showType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":3,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy Product.show_type: 1 site, 2 mobile, 3 both.\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"variants\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ProductVariant\",\"relationName\":\"ProductToProductVariant\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"images\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ProductImage\",\"relationName\":\"ProductToProductImage\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"collections\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CollectionProduct\",\"relationName\":\"CollectionProductToProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"comments\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Comment\",\"relationName\":\"CommentToProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"promotions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Promotion\",\"relationName\":\"ProductToPromotion\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"allocationItems\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BranchAllocationItem\",\"relationName\":\"BranchAllocationItemToProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ProductImage\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"product\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"ProductToProductImage\",\"relationFromFields\":[\"productId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"url\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sortOrder\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"role\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"ProductImageRole\",\"default\":\"GALLERY\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy had 4 distinct upload slots (تصویر شاخص / تصویر شاخص موبایل /\\\\nگالری تصاویر سایت / گالری تصاویر موبایل) — GALLERY is the default so\\\\nexisting rows and any generic \\\"just attach an image\\\" caller keep working.\"}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ProductVariant\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"product\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"ProductToProductVariant\",\"relationFromFields\":[\"productId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sku\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rashWeightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Base/raw weight before making charge (\\\"rash weight\\\").\"},{\"name\":\"defaultWagePercent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Default making-charge percentage applied on top of rash weight.\"},{\"name\":\"qty\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy ProductVariant.qty — on-hand stock. The cart refuses a variant with\\\\nqty 0 unless it is flagged pre-order, so both fields are required for that\\\\nguard to work (see apps/admin-panel/src/stores/cart.ts).\"},{\"name\":\"isPreOrder\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy is_pre_order: orderable even at zero stock.\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderItems\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderItem\",\"relationName\":\"OrderItemToProductVariant\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Order\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderNumber\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToOrder\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branch\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Branch\",\"relationName\":\"BranchToOrder\",\"relationFromFields\":[\"branchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"channel\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"OrderChannel\",\"default\":\"RETAIL\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Which sales channel placed this order — see OrderChannel.\"},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"OrderStatus\",\"default\":\"PLACED\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"totalGoldWeightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Total gold weight incl. wage across all items (\\\"allGram\\\" / order.w).\"},{\"name\":\"wageWeightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Pure making-charge weight component (totalGoldWeightGrams minus raw weight sum).\"},{\"name\":\"flatRialCharge\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Flat Rial charge independent of gold price (e.g. stones) — legacy rial_input.\"},{\"name\":\"isSuspendedOverCreditLimit\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"deliveredAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"items\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderItem\",\"relationName\":\"OrderToOrderItem\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"statusEvents\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderStatusEvent\",\"relationName\":\"OrderToOrderStatusEvent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ledgerEntries\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerEntry\",\"relationName\":\"LedgerEntryToOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"convertedFromPreOrder\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrder\",\"relationName\":\"OrderToPreOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"OrderItem\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"OrderToOrderItem\",\"relationFromFields\":[\"orderId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productVariantId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productVariant\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ProductVariant\",\"relationName\":\"OrderItemToProductVariant\",\"relationFromFields\":[\"productVariantId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"quantity\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rashWeightGramsSnapshot\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"wagePercentSnapshot\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"discountPercentSnapshot\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"computedWeightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"computed: rash*(1 + (wagePercent-discount)/100)\"},{\"name\":\"flatRialCharge\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"OrderStatusEvent\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"OrderToOrderStatusEvent\",\"relationFromFields\":[\"orderId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fromStatus\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderStatus\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"toStatus\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderStatus\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actorAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actorAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminUserToOrderStatusEvent\",\"relationFromFields\":[\"actorAdminUserId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"PreOrder\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToPreOrder\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"cityId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"city\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"City\",\"relationName\":\"CityToPreOrder\",\"relationFromFields\":[\"cityId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"workshopId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"workshop\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Workshop\",\"relationName\":\"PreOrderToWorkshop\",\"relationFromFields\":[\"workshopId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"PreOrderStatus\",\"default\":\"PLACED\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"designImageUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"colorName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sizeSpec\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"stoneColor\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"minaColor\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"estimatedWeightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"estimatedPriceRial\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"convertedOrderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Once priced, an admin converts this into a real (debt-bearing) Order.\"},{\"name\":\"convertedOrder\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"OrderToPreOrder\",\"relationFromFields\":[\"convertedOrderId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"statusEvents\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrderStatusEvent\",\"relationName\":\"PreOrderToPreOrderStatusEvent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"PreOrderStatusEvent\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrder\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrder\",\"relationName\":\"PreOrderToPreOrderStatusEvent\",\"relationFromFields\":[\"preOrderId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"changes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Field-level diff, e.g. {\\\"status\\\": {\\\"old\\\": \\\"PLACED\\\", \\\"new\\\": \\\"ADMIN_APPROVED\\\"}}\"},{\"name\":\"actorAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actorAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminUserToPreOrderStatusEvent\",\"relationFromFields\":[\"actorAdminUserId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ipAddress\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"LedgerEntry\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToLedgerEntry\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"currency\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerCurrency\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"direction\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerDirection\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sourceType\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerSourceType\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"amount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Always positive; direction determines the sign applied to the customer balance.\"},{\"name\":\"karatPerMille\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Purity of the physical instrument, for REPAYMENT_MELTED_GOLD (e.g. 750, 916).\"},{\"name\":\"pricePerGramRialAtEntry\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Gold price/gram at conversion time, for REPAYMENT_CASH.\"},{\"name\":\"orderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"LedgerEntryToOrder\",\"relationFromFields\":[\"orderId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"confirmed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Pending entries don't count toward the cached customer balance until confirmed.\"},{\"name\":\"confirmedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"postedByAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"postedByAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminUserToLedgerEntry\",\"relationFromFields\":[\"postedByAdminUserId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"labName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Instrument metadata from the legacy \\\"cash\\\" document form. Which fields are\\\\nfilled depends on sourceType: a melted-gold receipt carries lab/hallmark and\\\\nthe pre-normalization weight, a cheque carries the account and bank, and a\\\\ntransfer carries its destination.\\\\nLegacy columns: lab, ang, account_name, bank_name, to, original_value, recive_date.\"},{\"name\":\"hallmark\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"accountName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"bankName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"transferTo\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"originalValue\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Weight as handed over, BEFORE karat normalization (legacy original_value).\"},{\"name\":\"priceRial\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Rial amount for cash/cheque documents (legacy price).\"},{\"name\":\"receivedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"GoldPriceQuote\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"karatPerMille\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"pricePerGramRial\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"source\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"quotedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"Replaces legacy WebServiceGold / ConfigStatic.gold_price — timestamped price feed.\"},\"WalletBonus\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToWalletBonus\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"goldGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"grantedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expiresAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"consumedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"Time-limited gold cashback bonus — replaces the legacy Rooyesh\\\\Wallet gold credit.\"},\"UserType\":{\"dbName\":\"user_type\",\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy `permission.ut` / `users.ut` — an integer, kept as the PK so seeded\\\\nrows keep their legacy identity rather than getting new cuids.\"},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"permissions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Permission\",\"relationName\":\"PermissionToUserType\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminUsers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminUserToUserType\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Permission\":{\"dbName\":\"permission\",\"fields\":[{\"name\":\"rid\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Dotted permission id, e.g. \\\"order.list\\\", \\\"persons.list.client.omde\\\".\"},{\"name\":\"userTypeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userType\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UserType\",\"relationName\":\"PermissionToUserType\",\"relationFromFields\":[\"userTypeId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"rid\",\"userTypeId\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Comment\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"product\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"CommentToProduct\",\"relationFromFields\":[\"productId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CommentToCustomer\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"body\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"CommentStatus\",\"default\":\"PENDING\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"replyToId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy `reply_to`: a staff reply threads under the comment it answers.\"},{\"name\":\"replyTo\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Comment\",\"relationName\":\"CommentReplies\",\"relationFromFields\":[\"replyToId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"replies\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Comment\",\"relationName\":\"CommentReplies\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Setting\":{\"dbName\":null,\"fields\":[{\"name\":\"key\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"value\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Promotion\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scope\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"PromotionScope\",\"default\":\"PRODUCT\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"usage\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"PromotionUsage\",\"default\":\"ONCE\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"discountPercent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Percentage off, 0-100 (legacy discount_percent).\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"platform\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":3,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Which storefront it shows on, mirroring Product.showType (legacy platform).\"},{\"name\":\"startsAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"endsAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Exactly one of these is populated, per `scope`.\"},{\"name\":\"product\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"ProductToPromotion\",\"relationFromFields\":[\"productId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"categoryId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"category\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Category\",\"relationName\":\"CategoryToPromotion\",\"relationFromFields\":[\"categoryId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToPromotion\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"brandId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"brand\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Brand\",\"relationName\":\"BrandToPromotion\",\"relationFromFields\":[\"brandId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"PromotionExclusion\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"itemId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"type\",\"itemId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"type\",\"itemId\"]}],\"isGenerated\":false,\"documentation\":\"Legacy \\\"ignore\\\" table (views/offersIgnore) — specific products, categories,\\\\ncustomers or brands excluded from the automatic discount engine.\\\\nLegacy posts { type, item_id[] }: \\\"type\\\" reuses the promotion scope codes\\\\n(1 محصولات | 2 دسته بندی | 3 مشتری | 4 برند) and \\\"itemId\\\" is the excluded row.\"},\"BranchAllocation\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branch\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Branch\",\"relationName\":\"BranchToBranchAllocation\",\"relationFromFields\":[\"branchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"allocatorAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy `allocator_user` — the admin who filed the allocation.\"},{\"name\":\"allocatorAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AllocationAuthor\",\"relationFromFields\":[\"allocatorAdminUserId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"items\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BranchAllocationItem\",\"relationName\":\"BranchAllocationToBranchAllocationItem\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"BranchAllocationItem\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"allocationId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"allocation\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BranchAllocation\",\"relationName\":\"BranchAllocationToBranchAllocationItem\",\"relationFromFields\":[\"allocationId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"product\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"BranchAllocationItemToProduct\",\"relationFromFields\":[\"productId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"weightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Weight snapshot at allocation time, so later catalog edits do not rewrite history.\"}],\"primaryKey\":null,\"uniqueFields\":[[\"allocationId\",\"productId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"allocationId\",\"productId\"]}],\"isGenerated\":false},\"SmsMessage\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"audience\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MessageAudience\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"recipients\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Comma-separated recipients for the SINGLE/MULTIPLE audiences.\"},{\"name\":\"body\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sentCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"How many numbers the send actually resolved to.\"},{\"name\":\"sentByAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sentByAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"SmsAuthor\",\"relationFromFields\":[\"sentByAdminUserId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Notification\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"body\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"audience\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"MessageAudience\",\"default\":\"ALL_CUSTOMERS\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sentByAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sentByAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"NotificationAuthor\",\"relationFromFields\":[\"sentByAdminUserId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"recipients\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"NotificationRecipient\",\"relationName\":\"NotificationToNotificationRecipient\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"NotificationRecipient\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notificationId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notification\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Notification\",\"relationName\":\"NotificationToNotificationRecipient\",\"relationFromFields\":[\"notificationId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToNotificationRecipient\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"readAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"notificationId\",\"customerId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"notificationId\",\"customerId\"]}],\"isGenerated\":false,\"documentation\":\"Per-customer delivery + read state — legacy `GET notify/read/{id}`.\"},\"NewsletterSubscriber\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mobile\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"email\"],[\"mobile\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"email\"]},{\"name\":null,\"fields\":[\"mobile\"]}],\"isGenerated\":false,\"documentation\":\"Legacy views/newsletters — the mailing-list signups collected by the site.\"},\"CustomerActivityLog\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToCustomerActivityLog\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"action\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Free-form action key, e.g. 'login', 'order.placed', 'profile.updated'.\"},{\"name\":\"detail\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"Legacy views/statics — the customer activity log the \\\"آمار\\\" screen reads\\\\n(`log/list/customer`, `log/ago/{customerId}`).\"},\"UploadedFile\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"url\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Public URL the stored file is served from.\"},{\"name\":\"originalName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mimeType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sizeBytes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"purpose\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Free-form tag for what the file belongs to, e.g. 'product', 'category',\\\\n'customer.nationalId'. Kept loose so a new form needs no schema change.\"},{\"name\":\"uploadedByAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"uploadedByAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"FileUploader\",\"relationFromFields\":[\"uploadedByAdminUserId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerAvatars\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerAvatar\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{\"AdminRole\":{\"values\":[{\"name\":\"SUPER_ADMIN\",\"dbName\":null},{\"name\":\"SYSTEM_APPROVER\",\"dbName\":null},{\"name\":\"SALES_EXPERT\",\"dbName\":null},{\"name\":\"WORKSHOP_SUPERVISOR\",\"dbName\":null},{\"name\":\"ACCOUNTANT\",\"dbName\":null}],\"dbName\":null},\"CustomerKind\":{\"values\":[{\"name\":\"SALES_AGENT\",\"dbName\":null},{\"name\":\"APP_SHOPKEEPER\",\"dbName\":null},{\"name\":\"WALK_IN_SHOPKEEPER\",\"dbName\":null},{\"name\":\"BANKER\",\"dbName\":null},{\"name\":\"WORKSHOP_SUPERVISOR\",\"dbName\":null}],\"dbName\":null,\"documentation\":\"Legacy Customer.type — what kind of wholesale customer this is. Values and\\\\nlabels taken verbatim from bulkCustomer.vue's userTypes list.\"},\"VerificationStep\":{\"values\":[{\"name\":\"UNVERIFIED\",\"dbName\":null},{\"name\":\"STEP_ONE_SUBMITTED\",\"dbName\":null},{\"name\":\"STEP_TWO_SUBMITTED\",\"dbName\":null},{\"name\":\"VERIFIED\",\"dbName\":null}],\"dbName\":null},\"OrderChannel\":{\"values\":[{\"name\":\"RETAIL\",\"dbName\":null},{\"name\":\"WHOLESALE\",\"dbName\":null}],\"dbName\":null,\"documentation\":\"Legacy kept retail and wholesale orders in two SEPARATE tables\\\\n(orders_orders vs orders). The redesigned schema has one Order model, so the\\\\ndistinction lives here instead.\"},\"OrderStatus\":{\"values\":[{\"name\":\"SUSPENDED\",\"dbName\":null},{\"name\":\"PLACED\",\"dbName\":null},{\"name\":\"ADMIN_APPROVED\",\"dbName\":null},{\"name\":\"SOURCING\",\"dbName\":null},{\"name\":\"PREPARING\",\"dbName\":null},{\"name\":\"DELIVERED_TO_AGENT\",\"dbName\":null},{\"name\":\"DELIVERED_TO_CUSTOMER\",\"dbName\":null},{\"name\":\"CANCELLED\",\"dbName\":null}],\"dbName\":null},\"PreOrderStatus\":{\"values\":[{\"name\":\"PLACED\",\"dbName\":null},{\"name\":\"ADMIN_APPROVED\",\"dbName\":null},{\"name\":\"WORKSHOP_APPROVED\",\"dbName\":null},{\"name\":\"READY_TO_SHIP\",\"dbName\":null},{\"name\":\"DELIVERED\",\"dbName\":null},{\"name\":\"CANCELLED\",\"dbName\":null}],\"dbName\":null},\"LedgerCurrency\":{\"values\":[{\"name\":\"GOLD_GRAM\",\"dbName\":null},{\"name\":\"RIAL\",\"dbName\":null}],\"dbName\":null},\"LedgerDirection\":{\"values\":[{\"name\":\"DEBIT\",\"dbName\":null},{\"name\":\"CREDIT\",\"dbName\":null}],\"dbName\":null},\"LedgerSourceType\":{\"values\":[{\"name\":\"ORDER_STOCK\",\"dbName\":null},{\"name\":\"ORDER_PRE_ORDER\",\"dbName\":null},{\"name\":\"REPAYMENT_MELTED_GOLD\",\"dbName\":null},{\"name\":\"REPAYMENT_TRANSFER\",\"dbName\":null},{\"name\":\"REPAYMENT_CHEQUE\",\"dbName\":null},{\"name\":\"REPAYMENT_CASH\",\"dbName\":null},{\"name\":\"WALLET_BONUS\",\"dbName\":null},{\"name\":\"ADJUSTMENT\",\"dbName\":null}],\"dbName\":null},\"ProductImageRole\":{\"values\":[{\"name\":\"FEATURED\",\"dbName\":null},{\"name\":\"FEATURED_MOBILE\",\"dbName\":null},{\"name\":\"GALLERY\",\"dbName\":null},{\"name\":\"GALLERY_MOBILE\",\"dbName\":null}],\"dbName\":null},\"CommentStatus\":{\"values\":[{\"name\":\"PENDING\",\"dbName\":null},{\"name\":\"APPROVED\",\"dbName\":null},{\"name\":\"REJECTED\",\"dbName\":null}],\"dbName\":null},\"PromotionScope\":{\"values\":[{\"name\":\"PRODUCT\",\"dbName\":null},{\"name\":\"CATEGORY\",\"dbName\":null},{\"name\":\"CUSTOMER\",\"dbName\":null},{\"name\":\"BRAND\",\"dbName\":null}],\"dbName\":null,\"documentation\":\"Legacy Promotion.type — what the discount is scoped to.\"},\"PromotionUsage\":{\"values\":[{\"name\":\"ONCE\",\"dbName\":null},{\"name\":\"UNTIL_END_DATE\",\"dbName\":null}],\"dbName\":null,\"documentation\":\"Legacy Promotion.use_only — how often a customer may redeem it.\"},\"MessageAudience\":{\"values\":[{\"name\":\"SINGLE_NUMBER\",\"dbName\":null},{\"name\":\"MULTIPLE_NUMBERS\",\"dbName\":null},{\"name\":\"ALL_CUSTOMERS\",\"dbName\":null},{\"name\":\"WHOLESALE_CUSTOMERS\",\"dbName\":null},{\"name\":\"RETAIL_CUSTOMERS\",\"dbName\":null},{\"name\":\"SALES_AGENTS\",\"dbName\":null}],\"dbName\":null,\"documentation\":\"Who an SMS or notification was aimed at. Legacy's sms/create offered these\\\\naudiences, each gated by its own rid (sms.create.all, .omde, .single, ...).\"}},\"types\":{}}") +config.runtimeDataModel = JSON.parse("{\"models\":{\"City\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"parentId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"parent\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"City\",\"relationName\":\"CityTree\",\"relationFromFields\":[\"parentId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Restrict\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"children\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"City\",\"relationName\":\"CityTree\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"percent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy cities.percent / percent_aux — per-city wage surcharges the city\\\\nscreen edits through GET cities/get-percent/{id} and get-percent-aux/{id}.\"},{\"name\":\"percentAux\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CityToCustomer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"addresses\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CustomerAddress\",\"relationName\":\"CityToCustomerAddress\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branches\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Branch\",\"relationName\":\"BranchToCity\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrder\",\"relationName\":\"CityToPreOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"salesExpertProfiles\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SalesExpertProfile\",\"relationName\":\"CityToSalesExpertProfile\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"Legacy `cities` is a tree (country > province > city > district) and so is\\\\nthis: a city hangs under its `parent`. In the admin pickers a top-level row\\\\n(the country) is a heading, not selectable (henza_admin citiesModel.js:38).\"},\"AdminUser\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fullName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"⚠️ Kept in sync BY A DATABASE TRIGGER — `admin_user_sync_full_name`, from\\\\nmigration 20260922180000. Prisma cannot see it, so a write here may store\\\\nsomething other than what you passed:\\\\n\\\\n* write the parts -> fullName is rebuilt as \\\"first last\\\"\\\\n* write fullName only -> the parts are re-derived from it\\\\n* write BOTH in one update -> THE PARTS WIN; the submitted fullName is\\\\ndiscarded\\\\n\\\\nRe-read after writing if you need the stored value. Same arrangement as\\\\nCustomer (D0 requirement 7 — the split applies to ALL admins, not only\\\\nsales experts).\"},{\"name\":\"firstName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mobile\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"passwordHash\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"role\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminRole\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userTypeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy `users.ut`. Granular ACL lives here (Permission rows hang off UserType);\\\\nthe coarse `role` enum above is retained for the business rules that already\\\\nswitch on it. Nullable so existing seeded admins remain valid.\"},{\"name\":\"userType\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UserType\",\"relationName\":\"AdminUserToUserType\",\"relationFromFields\":[\"userTypeId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branch\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Branch\",\"relationName\":\"AdminUserToBranch\",\"relationFromFields\":[\"branchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"wagePercent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"avatarFileId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy stored a sales agent as a `customers` row with type=1, so\\\\nReagentCustomer.vue's shared form collected these alongside the\\\\nwholesale-customer fields. A sales agent is now an AdminUser\\\\n(role=SALES_EXPERT), so these live here instead — only ever set for that\\\\nrole; every other AdminUser leaves them null.\"},{\"name\":\"avatarFile\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UploadedFile\",\"relationName\":\"AdminUserAvatar\",\"relationFromFields\":[\"avatarFileId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"address\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"storeName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"pasazhName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memberCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"referredCustomers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"ReferralAgent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"creditedOrders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"OrderSalesAgent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Orders credited to this sales expert — see Order.salesAgentId.\"},{\"name\":\"supervisedWorkshops\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Workshop\",\"relationName\":\"WorkshopSupervisor\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branchAllocations\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BranchAllocation\",\"relationName\":\"AllocationAuthor\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"postedLedgerEntries\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerEntry\",\"relationName\":\"AdminUserToLedgerEntry\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderStatusEvents\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderStatusEvent\",\"relationName\":\"AdminUserToOrderStatusEvent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrderStatusEvents\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrderStatusEvent\",\"relationName\":\"AdminUserToPreOrderStatusEvent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sentSmsMessages\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SmsMessage\",\"relationName\":\"SmsAuthor\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sentNotifications\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Notification\",\"relationName\":\"NotificationAuthor\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"uploadedFiles\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UploadedFile\",\"relationName\":\"FileUploader\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"salesExpertProfile\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SalesExpertProfile\",\"relationName\":\"AdminUserToSalesExpertProfile\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Only ever set for role = SALES_EXPERT (D17).\"},{\"name\":\"sessions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminSession\",\"relationName\":\"AdminSessionToAdminUser\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Issued admin-panel tokens, recorded only while session tracking is on\\\\n(AUTH_SESSION_TRACKING, or implicitly whenever the IAM is enabled) so a\\\\ntoken can be revoked before it expires. See AdminSession.\"}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"AppSession\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"jti\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"The token's `jti` claim. Unique: one row per issued token.\"},{\"name\":\"subjectId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Customer.id, or AdminUser.id when subjectType is \\\"sales-expert\\\".\"},{\"name\":\"subjectType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mobile\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"iamSessionId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Set when the login was confirmed by the central IAM: its session id (`sid`)\\\\nand stable user id (`sub`), which is what a back-channel logout arrives with.\"},{\"name\":\"iamSub\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ipAddress\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userAgent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expiresAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastSeenAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"revokedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"revokedReason\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"An issued APP token (customer app / sales-expert app), so it can be revoked\\\\nbefore it expires — the counterpart of AdminSession for the other token family.\\\\n\\\\nWHY A SEPARATE TABLE AND NO FOREIGN KEY\\\\n---------------------------------------\\\\nAn app token's `sub` is a Customer id for a customer and an **AdminUser id**\\\\nfor a sales expert (D21). One FK cannot point at two tables, so the subject is\\\\nstored as a plain id plus its type. The rows are short-lived operational data,\\\\nnot part of the accounting model, so the missing FK costs nothing here.\"},\"AdminSession\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"jti\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"The token's `jti` claim. Unique: one row per issued token.\"},{\"name\":\"adminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminSessionToAdminUser\",\"relationFromFields\":[\"adminUserId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"iamSessionId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Set when the login was verified by the IAM: its session id (`sid`) and the\\\\nstable user id (`sub`) there. Back-channel logout arrives keyed by these —\\\\ndeliberately here rather than as columns on AdminUser, so enabling the\\\\nfeature needs no change to an existing table.\"},{\"name\":\"iamSub\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ipAddress\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userAgent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expiresAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastSeenAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"revokedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"revokedReason\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"An issued admin-panel JWT, so it can be revoked before it expires.\\\\n\\\\nWHY THIS EXISTS\\\\n---------------\\\\nThe admin token is self-contained and valid for 12h, which means nothing —\\\\nnot disabling the account, not a central \\\"sign out everywhere\\\" — could cut a\\\\nsession short: the token kept working until it expired. With the central IAM\\\\nin the loop that gap became visible (an IAM session revocation had no effect\\\\nhere), so every issued token now carries a `jti` recorded on this table and\\\\nJwtStrategy refuses a token whose row is revoked.\\\\n\\\\nRows are written ONLY while tracking is enabled, and JwtStrategy only\\\\nenforces them while it is enabled, so a deployment that does not want the\\\\nextra lookup behaves exactly as before.\"},\"SalesExpertProfile\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminUserToSalesExpertProfile\",\"relationFromFields\":[\"adminUserId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"cityId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy customers.city_id — a filterable grid column\\\\n(ReagentListModel.js:14) and the source of the commission autofill\\\\n(ReagentCustomer.vue:215-228).\"},{\"name\":\"city\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"City\",\"relationName\":\"CityToSalesExpertProfile\",\"relationFromFields\":[\"cityId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"gramLevel\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy customers.gram_level — the «سطح اعتبار» column, filterable.\\\\nDecimal(14,4) matches Customer.goldCreditLimitGrams exactly so the same\\\\ncredit limit has identical precision on both tables.\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy customers.phone (varchar 15) and ncode (varchar 20). The reference\\\\nstores both and reads neither back; kept so the form matches it. Neither\\\\nis unique and neither has a validation rule in the reference — inventing\\\\none would reject data the reference accepts.\"},{\"name\":\"nationalCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"tradingCustomerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"The Customer row carrying this expert's OWN orders, debt and credit limit.\\\\n\\\\nThe reference stored a sales agent AS a Customer (type=1), so an order the\\\\nagent placed from the app was simply their own, against their own\\\\ngram_level (ApiMobileController.php:534-535). Here the expert is an\\\\nAdminUser (D17), which has no ledger and cannot be an Order's subject, so\\\\nthis one linked Customer plays that part.\\\\n\\\\nDistinct from the expert's REFERRED customers, which are ordinary Customer\\\\nrows pointing at the AdminUser through Customer.referredByAgentId.\\\\n\\\\nNull until the expert first signs into the app, when it is created from\\\\nthis profile. See D21.\"},{\"name\":\"tradingCustomer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"SalesExpertTradingAccount\",\"relationFromFields\":[\"tradingCustomerId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"SetNull\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"The sales-expert fields legacy kept on the `customers` row (type=1) and that\\\\nwere lost when a sales expert became an AdminUser (D17).\\\\n\\\\nA separate table rather than columns on AdminUser: these are meaningful only\\\\nfor role = SALES_EXPERT and would be permanently null for every other admin.\\\\nA row is created for every SALES_EXPERT by the migration, and upserted by the\\\\nservice whenever one is created or a user's role becomes SALES_EXPERT — but\\\\nreaders still left-join, so a missing profile degrades to nulls rather than\\\\ndropping the agent from the grid.\\\\n\\\\n`reagent_id` is deliberately NOT here — see D17: in the reference it was a\\\\nside effect of the shared customers form, and filling it removed that expert\\\\nfrom the selectable-agent list (queryReagent, AdminController.php:420).\"},\"Customer\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fullName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"⚠️ `fullName`, `firstName` and `lastName` are kept in sync BY A DATABASE\\\\nTRIGGER — `customer_sync_full_name`, created in migration\\\\n20260922120000_customer_name_parts. Prisma does not know about it, so a\\\\nwrite here is NOT the whole story:\\\\n\\\\n* write the parts -> fullName is rebuilt as \\\"first last\\\"\\\\n* write fullName only -> the parts are re-derived from it\\\\n* write BOTH in one update -> THE PARTS WIN; fullName is overwritten\\\\nwith \\\"first last\\\" and whatever you passed for fullName is discarded\\\\n\\\\nSo a value you wrote can differ from the value that lands in the row.\\\\nRe-read after writing if you need the stored value. Prefer writing the\\\\nparts; `fullName` exists for the legacy readers that predate D0.\\\\n\\\\nReference has these as two columns from the start\\\\n(henza_server 2020_10_01_120430_customers_table.php:18-19 fname/lname);\\\\nthe port collapsed them, which is the D0 defect.\"},{\"name\":\"firstName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mobile\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"nationalCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy customers.ncode. OPTIONAL since 2026-10-07: not one of the 1,616\\\\nlegacy customers has a national code (1595/1595 empty), and fabricating\\\\none is a data violation that would block later legal identity checks\\\\n(owner ruling). Still @unique — in PostgreSQL NULLs do not collide, so\\\\nthe migration tool must write NULL and never '', which would collide on\\\\nthe second row.\\\\n\\\\nThree service-layer workarounds exist ONLY because this used to be\\\\nrequired, and they store the MOBILE NUMBER here:\\\\nadmin-customers.service.ts:625,685 and customer-auth.service.ts:258.\\\\nRetiring them is a separate change; see docs/DATA-MIGRATION-MAP.md §10.4.\"},{\"name\":\"passwordHash\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"cityId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"city\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"City\",\"relationName\":\"CityToCustomer\",\"relationFromFields\":[\"cityId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"cityNameRaw\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy customers.new_city — the city name exactly as the customer typed it\\\\nat app sign-up (Major/CustomerController.php:36). Kept verbatim because\\\\nthe legacy city table has only 15 rows, so the typed name is often the only\\\\nrecord of where the customer is (172 customers; 43 match no known city).\\\\ncityId is set alongside it only on an exact, ي/ك-normalised name match.\\\\nLegacy sign-up also forced city_id = 5 (Tehran) on everyone\\\\n(Major/CustomerController.php:21), so for those rows the typed name, not\\\\ncityId, is the truth. Owner ruling 2026-10-07: keep both.\"},{\"name\":\"kind\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"CustomerKind\",\"default\":\"APP_SHOPKEEPER\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy Customer.type — distinguishes بنکدار from مغازه دار, which the\\\\nBankerList / ShopkeeperList screens filter on.\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy contact + shop columns, shown on the wholesale customer form and as\\\\n(hidden-by-default) columns in its grid.\"},{\"name\":\"address\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"storeName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"pasazhName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"zone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"memberCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy mcode — the operator-assigned customer code.\"},{\"name\":\"referredByAgentId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"referredByAgent\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"ReferralAgent\",\"relationFromFields\":[\"referredByAgentId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"salesExpertTradingFor\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SalesExpertProfile\",\"relationName\":\"SalesExpertTradingAccount\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Set only on the one Customer row that acts as a sales expert's own trading\\\\naccount (see SalesExpertProfile.tradingCustomerId). Empty for every\\\\nordinary customer.\"},{\"name\":\"referredOrders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"OrderReferrerCustomer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy orders that named THIS customer as their referrer — see\\\\nOrder.referrerCustomerId. History only.\"},{\"name\":\"goldCreditLimitGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"goldDebtGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fiatDebtRial\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"accountingGoldBalance\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Balance as last read from the accounting software (D27), in the app's own\\\\nsign convention (positive = owes). Shown to the customer when the\\\\nintegration is on; the credit-limit check still uses goldDebtGrams above.\\\\nNull until the first successful sync.\"},{\"name\":\"accountingRialBalance\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"accountingBalanceAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"makingChargeOffsetPercent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy `customers.percent` — the per-customer making-charge offset. It is\\\\nADDED to the variant's making charge when pricing an order line\\\\n(henza_pwa src/Mixins/product/index.ts:69-75:\\\\ngetWage(v) = state.percent + v.percentage_pay)\\\\nand it shifts the catalogue making-charge filter bounds\\\\n(ApiMobileController.php:391-396,76-77). It is NOT part of the price\\\\nformula itself — that extra percent is ConfigStatic['product_price_extra_percent'].\\\\n\\\\nNOT the wallet cashback rate (storefront ConfigStatic['percent'], D13) and\\\\nNOT the wholesale per-line charge (OrderItem.wagePercentSnapshot).\\\\n\\\\nDB default 0 keeps every existing customer's price unchanged. The\\\\nreference's application-layer default for NEW customers is 3\\\\n(AdminController.php:338) and the field is required on create (:354).\"},{\"name\":\"verificationStep\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"VerificationStep\",\"default\":\"UNVERIFIED\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"nationalIdImageUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"businessLicenseUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"shopImageUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"verificationRejectionReason\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Why verification was rejected (VerificationStep.REJECTED).\\\\n\\\\nLegacy recorded NO reason: none of its 49 `customers` columns is a\\\\nreason/note field, and on rejection it only sent a fixed SMS. So the 14\\\\nrows migrated from henza carry the sentinel\\\\n«رد شده در سیستم قدیم — فاقد شرح علت ثبت‌شده» instead of NULL, so support\\\\nknows why it is blank (owner ruling 2026-10-07). The migration tool\\\\nwrites it only WHERE this IS NULL, so a re-run cannot overwrite a real\\\\nreason entered in the new system.\"},{\"name\":\"verificationRejectedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"NULL for rows migrated from henza — legacy recorded no rejection time.\"},{\"name\":\"birthDate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy customers.birth_date, populated on 917 of 1,595 rows. Kept for the\\\\nbirthday SMS / loyalty campaigns (owner ruling 2026-10-07).\\\\n\\\\n⚠ Legacy stores dates as JALALI STRINGS in other tables\\\\n(cashes.recive_date is varchar, 88/89 values starting \\\"14…\\\"), so this\\\\ntimestamp may hold mis-entered Jalali years. Confirm the calendar with\\\\ndocs/migration-precheck-3.sql BEFORE backfilling: copying them unchanged\\\\nwould produce 917 wrong birthdays, worse for an SMS campaign than none.\"},{\"name\":\"avatarFileId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy `image_id` — the profile photo (عکس پروفایل) on the sales-agent\\\\nform. Legacy stored an FK to its Image table and read it back as a nested\\\\n`image: { id, image }`, so this is a relation, not a bare URL string.\"},{\"name\":\"avatarFile\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UploadedFile\",\"relationName\":\"CustomerAvatar\",\"relationFromFields\":[\"avatarFileId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"canPlaceOrders\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy had TWO independent switches on a customer:\\\\nsts -> may they place orders (this field)\\\\nactive -> is the account enabled (isActive, below)\\\\nThe port previously drove both from isActive; they are separate again.\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isArchived\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy archive flag — the archived list filtered on this, not on isActive.\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"addresses\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CustomerAddress\",\"relationName\":\"CustomerToCustomerAddress\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"CustomerToOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrder\",\"relationName\":\"CustomerToPreOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ledgerEntries\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerEntry\",\"relationName\":\"CustomerToLedgerEntry\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"walletBonuses\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"WalletBonus\",\"relationName\":\"CustomerToWalletBonus\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"comments\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Comment\",\"relationName\":\"CommentToCustomer\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"promotions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Promotion\",\"relationName\":\"CustomerToPromotion\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notifications\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"NotificationRecipient\",\"relationName\":\"CustomerToNotificationRecipient\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"activityLogs\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CustomerActivityLog\",\"relationName\":\"CustomerToCustomerActivityLog\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"otpChallenges\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CustomerOtp\",\"relationName\":\"CustomerToCustomerOtp\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"favorites\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CustomerFavorite\",\"relationName\":\"CustomerToCustomerFavorite\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"CustomerFavorite\":{\"dbName\":null,\"fields\":[{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToCustomerFavorite\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"product\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"CustomerFavoriteToProduct\",\"relationFromFields\":[\"productId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"customerId\",\"productId\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"Legacy `fav` (251 rows) — saved products. The target had no model for this,\\\\nso every customer's favourites would have been lost in the migration; the\\\\nowner confirmed on 2026-10-06 that they matter.\\\\n\\\\nLegacy `fav` has two columns and NO primary key. The composite key here\\\\nsupplies the constraint the source lacks (the precheck found 0 duplicate\\\\npairs, but the tool should still SELECT DISTINCT). 14 of the 251 rows point\\\\nat a deleted customer and must be skipped.\\\\n\\\\nLegacy's denormalised `product.count_fav` counter is deliberately NOT\\\\nrecreated as a column — derive it from this table.\"},\"CustomerAddress\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToCustomerAddress\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"cityId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"city\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"City\",\"relationName\":\"CityToCustomerAddress\",\"relationFromFields\":[\"cityId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"addressLine\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isDefault\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Branch\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"address\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy Branch.address / phone — both are columns in the branch grid.\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy GET branch/active/{id} toggles this.\"},{\"name\":\"cityId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"city\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"City\",\"relationName\":\"BranchToCity\",\"relationFromFields\":[\"cityId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminUsers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminUserToBranch\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"BranchToOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"allocations\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BranchAllocation\",\"relationName\":\"BranchToBranchAllocation\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Workshop\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"name\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"address\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy Workshop.address / phone — both are columns in the workshop grid.\"},{\"name\":\"phone\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"supervisorId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"The supervisor created alongside the workshop by the legacy Add form.\"},{\"name\":\"supervisor\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"WorkshopSupervisor\",\"relationFromFields\":[\"supervisorId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrders\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrder\",\"relationName\":\"PreOrderToWorkshop\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Category\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":1,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy Category.type — which storefront the category belongs to:\\\\n1 سایت | 2 اپلیکشن موبایل. Drives the \\\"type_str\\\" grid column.\"},{\"name\":\"imageUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy Category.image / icon — the grid renders the image, the storefront the icon.\"},{\"name\":\"iconUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"metaTag\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy meta tag + description, used for SEO on the site categories.\"},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"parentId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"parent\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Category\",\"relationName\":\"CategoryTree\",\"relationFromFields\":[\"parentId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"children\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Category\",\"relationName\":\"CategoryTree\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"products\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"CategoryToProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"promotions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Promotion\",\"relationName\":\"CategoryToPromotion\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Brand\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"products\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"BrandToProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"promotions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Promotion\",\"relationName\":\"BrandToPromotion\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Collection\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"products\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CollectionProduct\",\"relationName\":\"CollectionToCollectionProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"Curated product groupings — replaces legacy \\\"Ciny/CinyProduct\\\" (a tagging\\\\nfeature, NOT a gold-price snapshot mechanism, despite the misleading legacy name).\"},\"CollectionProduct\":{\"dbName\":null,\"fields\":[{\"name\":\"collectionId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"collection\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Collection\",\"relationName\":\"CollectionToCollectionProduct\",\"relationFromFields\":[\"collectionId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"product\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"CollectionProductToProduct\",\"relationFromFields\":[\"productId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"collectionId\",\"productId\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Product\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"categoryId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"category\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Category\",\"relationName\":\"CategoryToProduct\",\"relationFromFields\":[\"categoryId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"brandId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"brand\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Brand\",\"relationName\":\"BrandToProduct\",\"relationFromFields\":[\"brandId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy Product.product_code — the human-facing SKU shown in the grid.\"},{\"name\":\"showType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":3,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy Product.show_type: 1 site, 2 mobile, 3 both.\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"accountingStockWeight\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Stock of the linked کارساخته as last read from the accounting software\\\\n(D27). Weight for gram-type items, count for count-type ones — whichever\\\\nthe software reports. At zero or below the product is unavailable in the\\\\napp (pre-order variants excepted). Null = not linked or never synced.\"},{\"name\":\"accountingStockCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"accountingStockAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"variants\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ProductVariant\",\"relationName\":\"ProductToProductVariant\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"images\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ProductImage\",\"relationName\":\"ProductToProductImage\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"collections\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CollectionProduct\",\"relationName\":\"CollectionProductToProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"comments\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Comment\",\"relationName\":\"CommentToProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"promotions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Promotion\",\"relationName\":\"ProductToPromotion\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"allocationItems\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BranchAllocationItem\",\"relationName\":\"BranchAllocationItemToProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"favoritedBy\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"CustomerFavorite\",\"relationName\":\"CustomerFavoriteToProduct\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ProductImage\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"product\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"ProductToProductImage\",\"relationFromFields\":[\"productId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"url\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sortOrder\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"role\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"ProductImageRole\",\"default\":\"GALLERY\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy had 4 distinct upload slots (تصویر شاخص / تصویر شاخص موبایل /\\\\nگالری تصاویر سایت / گالری تصاویر موبایل) — GALLERY is the default so\\\\nexisting rows and any generic \\\"just attach an image\\\" caller keep working.\"},{\"name\":\"variants\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ProductVariant\",\"relationName\":\"ProductImageToProductVariant\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Variants that display this image. A gallery image may back several\\\\nvariants (one photo, several weights), which is why this is a plain\\\\none-to-many and not a join table.\"}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"ProductVariant\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"product\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"ProductToProductVariant\",\"relationFromFields\":[\"productId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sku\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rashWeightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Base/raw weight before making charge (\\\"rash weight\\\").\"},{\"name\":\"defaultWagePercent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Default making-charge percentage applied on top of rash weight.\"},{\"name\":\"qty\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy ProductVariant.qty — on-hand stock. The cart refuses a variant with\\\\nqty 0 unless it is flagged pre-order, so both fields are required for that\\\\nguard to work (see apps/admin-panel/src/stores/cart.ts).\"},{\"name\":\"isPreOrder\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy is_pre_order: orderable even at zero stock.\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"imageId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"The gallery image shown for this variant, picked from its own product's\\\\nimages — never a re-uploaded copy. onDelete: SetNull because dropping an\\\\nimage must never cascade into the variant: OrderItem rows reference\\\\nvariants, so losing one would break order history.\"},{\"name\":\"image\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ProductImage\",\"relationName\":\"ProductImageToProductVariant\",\"relationFromFields\":[\"imageId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"SetNull\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderItems\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderItem\",\"relationName\":\"OrderItemToProductVariant\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Order\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderNumber\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToOrder\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branch\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Branch\",\"relationName\":\"BranchToOrder\",\"relationFromFields\":[\"branchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"channel\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"OrderChannel\",\"default\":\"RETAIL\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Which sales channel placed this order — see OrderChannel.\"},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"OrderStatus\",\"default\":\"PLACED\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"totalGoldWeightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Total gold weight incl. wage across all items (\\\"allGram\\\" / order.w).\"},{\"name\":\"wageWeightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Pure making-charge weight component (totalGoldWeightGrams minus raw weight sum).\"},{\"name\":\"flatRialCharge\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Flat Rial charge independent of gold price (e.g. stones) — legacy rial_input.\"},{\"name\":\"isSuspendedOverCreditLimit\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"deliveredAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"salesAgentId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"The sales expert this order is credited to, fixed when it is placed:\\\\nthe customer's referring expert AT THAT MOMENT. Legacy `orders.reagent_id`,\\\\nset once at creation (ApiMobileController.php:601) and never moved, so a\\\\ncustomer changing expert later does not move past sales or commission\\\\n(owner ruling 2026-10-08). «میزان فروش» counts from here, never from the\\\\ncustomer's current referrer.\"},{\"name\":\"salesAgent\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"OrderSalesAgent\",\"relationFromFields\":[\"salesAgentId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"SetNull\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"referrerCustomerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"History only: a legacy order whose `reagent_id` named a customer who is\\\\nnot a sales expert (one such customer, 17 orders in 2022). Legacy counted\\\\nthose orders in that customer's own «میزان فروش»; this keeps that figure\\\\nexact. Never set for a new order.\"},{\"name\":\"referrerCustomer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"OrderReferrerCustomer\",\"relationFromFields\":[\"referrerCustomerId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"SetNull\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"items\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderItem\",\"relationName\":\"OrderToOrderItem\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"statusEvents\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderStatusEvent\",\"relationName\":\"OrderToOrderStatusEvent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ledgerEntries\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerEntry\",\"relationName\":\"LedgerEntryToOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"convertedFromPreOrder\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrder\",\"relationName\":\"OrderToPreOrder\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"OrderItem\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"OrderToOrderItem\",\"relationFromFields\":[\"orderId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productVariantId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productVariant\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"ProductVariant\",\"relationName\":\"OrderItemToProductVariant\",\"relationFromFields\":[\"productVariantId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"quantity\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"rashWeightGramsSnapshot\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"wagePercentSnapshot\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"discountPercentSnapshot\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"computedWeightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"computed: rash*(1 + (wagePercent-discount)/100)\"},{\"name\":\"flatRialCharge\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Decimal\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"OrderStatusEvent\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"OrderToOrderStatusEvent\",\"relationFromFields\":[\"orderId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"fromStatus\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderStatus\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"toStatus\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"OrderStatus\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actorAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actorAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminUserToOrderStatusEvent\",\"relationFromFields\":[\"actorAdminUserId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"PreOrder\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToPreOrder\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"cityId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"city\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"City\",\"relationName\":\"CityToPreOrder\",\"relationFromFields\":[\"cityId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"workshopId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"workshop\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Workshop\",\"relationName\":\"PreOrderToWorkshop\",\"relationFromFields\":[\"workshopId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"PreOrderStatus\",\"default\":\"PLACED\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"designImageUrl\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"colorName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sizeSpec\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"stoneColor\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"minaColor\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"estimatedWeightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"estimatedPriceRial\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"convertedOrderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Once priced, an admin converts this into a real (debt-bearing) Order.\"},{\"name\":\"convertedOrder\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"OrderToPreOrder\",\"relationFromFields\":[\"convertedOrderId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"statusEvents\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrderStatusEvent\",\"relationName\":\"PreOrderToPreOrderStatusEvent\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"PreOrderStatusEvent\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"preOrder\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"PreOrder\",\"relationName\":\"PreOrderToPreOrderStatusEvent\",\"relationFromFields\":[\"preOrderId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"changes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Field-level diff, e.g. {\\\"status\\\": {\\\"old\\\": \\\"PLACED\\\", \\\"new\\\": \\\"ADMIN_APPROVED\\\"}}\"},{\"name\":\"actorAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"actorAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminUserToPreOrderStatusEvent\",\"relationFromFields\":[\"actorAdminUserId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"ipAddress\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"LedgerEntry\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToLedgerEntry\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"currency\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerCurrency\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"direction\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerDirection\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sourceType\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"LedgerSourceType\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"amount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Always positive; direction determines the sign applied to the customer balance.\"},{\"name\":\"karatPerMille\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Purity of the physical instrument, for REPAYMENT_MELTED_GOLD (e.g. 750, 916).\"},{\"name\":\"pricePerGramRialAtEntry\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Gold price/gram at conversion time, for REPAYMENT_CASH.\"},{\"name\":\"orderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"order\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Order\",\"relationName\":\"LedgerEntryToOrder\",\"relationFromFields\":[\"orderId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"confirmed\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":false,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Pending entries don't count toward the cached customer balance until confirmed.\"},{\"name\":\"confirmedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"postedByAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"postedByAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminUserToLedgerEntry\",\"relationFromFields\":[\"postedByAdminUserId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"labName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Instrument metadata from the legacy \\\"cash\\\" document form. Which fields are\\\\nfilled depends on sourceType: a melted-gold receipt carries lab/hallmark and\\\\nthe pre-normalization weight, a cheque carries the account and bank, and a\\\\ntransfer carries its destination.\\\\nLegacy columns: lab, ang, account_name, bank_name, to, original_value, recive_date.\"},{\"name\":\"hallmark\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"accountName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"bankName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"transferTo\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"originalValue\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Weight as handed over, BEFORE karat normalization (legacy original_value).\"},{\"name\":\"priceRial\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Rial amount for cash/cheque documents (legacy price).\"},{\"name\":\"receivedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"GoldPriceQuote\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"karatPerMille\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"pricePerGramRial\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"source\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"quotedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"Replaces legacy WebServiceGold / ConfigStatic.gold_price — timestamped price feed.\"},\"WalletBonus\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToWalletBonus\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"orderId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"goldGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"grantedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"expiresAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"consumedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"Time-limited gold cashback bonus — replaces the legacy Rooyesh\\\\Wallet gold credit.\"},\"UserType\":{\"dbName\":\"user_type\",\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy `permission.ut` / `users.ut` — an integer, kept as the PK so seeded\\\\nrows keep their legacy identity rather than getting new cuids.\"},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"permissions\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Permission\",\"relationName\":\"PermissionToUserType\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminUsers\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminUserToUserType\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Permission\":{\"dbName\":\"permission\",\"fields\":[{\"name\":\"rid\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Dotted permission id, e.g. \\\"order.list\\\", \\\"persons.list.client.omde\\\".\"},{\"name\":\"userTypeId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"userType\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"UserType\",\"relationName\":\"PermissionToUserType\",\"relationFromFields\":[\"userTypeId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":{\"name\":null,\"fields\":[\"rid\",\"userTypeId\"]},\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Comment\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"product\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"CommentToProduct\",\"relationFromFields\":[\"productId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CommentToCustomer\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"body\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"CommentStatus\",\"default\":\"PENDING\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"replyToId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy `reply_to`: a staff reply threads under the comment it answers.\"},{\"name\":\"replyTo\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Comment\",\"relationName\":\"CommentReplies\",\"relationFromFields\":[\"replyToId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"replies\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Comment\",\"relationName\":\"CommentReplies\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Setting\":{\"dbName\":null,\"fields\":[{\"name\":\"key\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"value\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"AccountingLink\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"provider\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"entityType\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AccountingEntityType\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"entityId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"externalCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"The record's code in the accounting software (Tahesab Moshtari_Code /\\\\nZarrin idHesab; for products the Zarrin idKar or the Tahesab Name_Kar).\"},{\"name\":\"externalName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"origin\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"How the link came to be: LINKED (matched by mobile/name), IMPORTED (app\\\\nrow created from the accounting record), PUSHED (accounting record created\\\\nfrom the app row) or MANUAL (an admin typed the code).\"},{\"name\":\"snapshot\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"The record as last read, for display only.\"},{\"name\":\"syncedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"provider\",\"entityType\",\"entityId\"],[\"provider\",\"entityType\",\"externalCode\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"provider\",\"entityType\",\"entityId\"]},{\"name\":null,\"fields\":[\"provider\",\"entityType\",\"externalCode\"]}],\"isGenerated\":false,\"documentation\":\"One app row ↔ one record in the accounting software (customer account or\\\\nکارساخته).\"},\"AccountingOutbox\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"provider\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"kind\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AccountingOutboxKind\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"entityId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"status\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"AccountingOutboxStatus\",\"default\":\"PENDING\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"attempts\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"nextAttemptAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"lastError\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"externalRef\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"What the accounting software returned as the document/record id.\"},{\"name\":\"progress\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Per-step progress of multi-call jobs (a Zarrin document is one call per\\\\nline), so a failure resumes where it stopped.\"},{\"name\":\"lastRequest\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Last request/response, for the log screen. Never contains the token.\"},{\"name\":\"lastResponse\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sentAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"resolvedById\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"Work to push to the accounting software. Written in the SAME transaction as\\\\nthe change that causes it, so an outage of the accounting software never\\\\nloses an event and never blocks the app.\"},\"AccountingIssue\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"provider\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"kind\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"externalCode\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"entityId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"message\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"data\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Json\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true},{\"name\":\"resolvedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"provider\",\"kind\",\"externalCode\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"provider\",\"kind\",\"externalCode\"]}],\"isGenerated\":false,\"documentation\":\"Something a pull found that needs a human: an account with no mobile, two\\\\naccounts sharing one mobile, a کارساخته group with no category mapping.\"},\"Promotion\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"description\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"scope\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"PromotionScope\",\"default\":\"PRODUCT\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"usage\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"PromotionUsage\",\"default\":\"ONCE\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"discountPercent\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Percentage off, 0-100 (legacy discount_percent).\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Boolean\",\"default\":true,\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"platform\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":3,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Which storefront it shows on, mirroring Product.showType (legacy platform).\"},{\"name\":\"startsAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"endsAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Exactly one of these is populated, per `scope`.\"},{\"name\":\"product\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"ProductToPromotion\",\"relationFromFields\":[\"productId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"categoryId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"category\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Category\",\"relationName\":\"CategoryToPromotion\",\"relationFromFields\":[\"categoryId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToPromotion\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"brandId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"brand\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Brand\",\"relationName\":\"BrandToPromotion\",\"relationFromFields\":[\"brandId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"PromotionExclusion\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"type\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"itemId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"type\",\"itemId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"type\",\"itemId\"]}],\"isGenerated\":false,\"documentation\":\"Legacy \\\"ignore\\\" table (views/offersIgnore) — specific products, categories,\\\\ncustomers or brands excluded from the automatic discount engine.\\\\nLegacy posts { type, item_id[] }: \\\"type\\\" reuses the promotion scope codes\\\\n(1 محصولات | 2 دسته بندی | 3 مشتری | 4 برند) and \\\"itemId\\\" is the excluded row.\"},\"BranchAllocation\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branchId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"branch\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Branch\",\"relationName\":\"BranchToBranchAllocation\",\"relationFromFields\":[\"branchId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"allocatorAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Legacy `allocator_user` — the admin who filed the allocation.\"},{\"name\":\"allocatorAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AllocationAuthor\",\"relationFromFields\":[\"allocatorAdminUserId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"note\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"items\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BranchAllocationItem\",\"relationName\":\"BranchAllocationToBranchAllocationItem\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"BranchAllocationItem\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"allocationId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"allocation\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"BranchAllocation\",\"relationName\":\"BranchAllocationToBranchAllocationItem\",\"relationFromFields\":[\"allocationId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"productId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"product\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Product\",\"relationName\":\"BranchAllocationItemToProduct\",\"relationFromFields\":[\"productId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"weightGrams\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Decimal\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Weight snapshot at allocation time, so later catalog edits do not rewrite history.\"}],\"primaryKey\":null,\"uniqueFields\":[[\"allocationId\",\"productId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"allocationId\",\"productId\"]}],\"isGenerated\":false},\"SmsMessage\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"audience\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"MessageAudience\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"recipients\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Comma-separated recipients for the SINGLE/MULTIPLE audiences.\"},{\"name\":\"body\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sentCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"How many numbers the send actually resolved to.\"},{\"name\":\"sentByAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sentByAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"SmsAuthor\",\"relationFromFields\":[\"sentByAdminUserId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"Notification\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"title\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"body\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"audience\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"MessageAudience\",\"default\":\"ALL_CUSTOMERS\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sentByAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sentByAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"NotificationAuthor\",\"relationFromFields\":[\"sentByAdminUserId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"recipients\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"NotificationRecipient\",\"relationName\":\"NotificationToNotificationRecipient\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"NotificationRecipient\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notificationId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"notification\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Notification\",\"relationName\":\"NotificationToNotificationRecipient\",\"relationFromFields\":[\"notificationId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToNotificationRecipient\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"readAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"notificationId\",\"customerId\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"notificationId\",\"customerId\"]}],\"isGenerated\":false,\"documentation\":\"Per-customer delivery + read state — legacy `GET notify/read/{id}`.\"},\"NewsletterSubscriber\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"email\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mobile\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[[\"email\"],[\"mobile\"]],\"uniqueIndexes\":[{\"name\":null,\"fields\":[\"email\"]},{\"name\":null,\"fields\":[\"mobile\"]}],\"isGenerated\":false,\"documentation\":\"Legacy views/newsletters — the mailing-list signups collected by the site.\"},\"CustomerActivityLog\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToCustomerActivityLog\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"action\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Free-form action key, e.g. 'login', 'order.placed', 'profile.updated'.\"},{\"name\":\"detail\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"Legacy views/statics — the customer activity log the \\\"آمار\\\" screen reads\\\\n(`log/list/customer`, `log/ago/{customerId}`).\"},\"UploadedFile\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"url\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Public URL the stored file is served from.\"},{\"name\":\"originalName\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mimeType\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"sizeBytes\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"purpose\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Free-form tag for what the file belongs to, e.g. 'product', 'category',\\\\n'customer.nationalId'. Kept loose so a new form needs no schema change.\"},{\"name\":\"uploadedByAdminUserId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"uploadedByAdminUser\",\"kind\":\"object\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"FileUploader\",\"relationFromFields\":[\"uploadedByAdminUserId\"],\"relationToFields\":[\"id\"],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customerAvatars\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerAvatar\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"adminUserAvatars\",\"kind\":\"object\",\"isList\":true,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"AdminUser\",\"relationName\":\"AdminUserAvatar\",\"relationFromFields\":[],\"relationToFields\":[],\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"CustomerOtp\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"cuid\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"mobile\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Normalised to English digits before storing, as the reference does with\\\\nUtility::faTOen() on both send and verify.\"},{\"name\":\"customerId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":true,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"customer\",\"kind\":\"object\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Customer\",\"relationName\":\"CustomerToCustomerOtp\",\"relationFromFields\":[\"customerId\"],\"relationToFields\":[\"id\"],\"relationOnDelete\":\"Cascade\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"codeHash\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"bcrypt hash of the 4-digit code. Never the code itself.\"},{\"name\":\"expiresAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"attempts\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"Int\",\"default\":0,\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Failed verify attempts against THIS challenge.\"},{\"name\":\"consumedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Set when the code is accepted, so one challenge cannot be reused.\"},{\"name\":\"requestIp\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":false,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Kept for the per-IP send throttle.\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false,\"documentation\":\"One OTP login challenge for a customer.\\\\n\\\\nPorts henza_server's flow (ApiMobileController.php:39-78), where userAuth\\\\ngenerated rand(1000,9999), stored it on the customer row as `send_password`\\\\nand sent it by SMS, and userVerfiy compared the submitted code against it\\\\n(mismatch -> HTTP 422).\\\\n\\\\nThree deliberate improvements over the reference, approved by the user\\\\n(docs/parity/DECISIONS.md D6 and T1):\\\\n1. the code is stored as a bcrypt hash, never in plain text — the\\\\nreference kept it readable in a customer column;\\\\n2. it expires (`expiresAt`) — the reference's code stayed valid forever;\\\\n3. attempts are counted and the challenge locks out — the reference had\\\\nno limit at all.\\\\nThe parity behaviour itself is the code comparison and the rejection.\"}},\"enums\":{\"AdminRole\":{\"values\":[{\"name\":\"SUPER_ADMIN\",\"dbName\":null},{\"name\":\"SYSTEM_APPROVER\",\"dbName\":null},{\"name\":\"SALES_EXPERT\",\"dbName\":null},{\"name\":\"WORKSHOP_SUPERVISOR\",\"dbName\":null},{\"name\":\"ACCOUNTANT\",\"dbName\":null}],\"dbName\":null},\"CustomerKind\":{\"values\":[{\"name\":\"SALES_AGENT\",\"dbName\":null},{\"name\":\"APP_SHOPKEEPER\",\"dbName\":null},{\"name\":\"WALK_IN_SHOPKEEPER\",\"dbName\":null},{\"name\":\"BANKER\",\"dbName\":null},{\"name\":\"WORKSHOP_SUPERVISOR\",\"dbName\":null},{\"name\":\"RETAIL\",\"dbName\":null}],\"dbName\":null,\"documentation\":\"Legacy Customer.type — what kind of wholesale customer this is. Values and\\\\nlabels taken verbatim from bulkCustomer.vue's userTypes list.\\\\n\\\\nSALES_AGENT is a LEGACY value only: legacy stored a sales agent as a\\\\nCustomer row with type=1, but the redesigned system models a sales agent\\\\nas an AdminUser (role SALES_EXPERT) instead — see admin-users.service.ts\\\\nand admin-customers.service.ts's listReagents()/create(). No Customer row\\\\nshould be created with kind SALES_AGENT going forward; the value is kept\\\\nonly so legacyTypeToKind()/kindToLegacyType() stay total functions and any\\\\nalready-migrated data keeps a readable label.\\\\n\\\\nRETAIL marks a \\\"تک\\\" (single/retail) customer — legacy kept these in an\\\\nentirely separate table (SingleCustomer/`login`) that could never contain\\\\na wholesale/agent/shopkeeper/banker row. The redesigned schema folded both\\\\ninto one Customer model, so this value is what listSingle() now filters on\\\\nto reproduce that same separation.\"},\"VerificationStep\":{\"values\":[{\"name\":\"UNVERIFIED\",\"dbName\":null},{\"name\":\"STEP_ONE_SUBMITTED\",\"dbName\":null},{\"name\":\"STEP_TWO_SUBMITTED\",\"dbName\":null},{\"name\":\"VERIFIED\",\"dbName\":null},{\"name\":\"REJECTED\",\"dbName\":null,\"documentation\":\"Legacy had THREE states per step, not two\\\\n(MajorCustomerController.php:106-135): 1 = awaiting, 2 = approved,\\\\n3 = REJECTED. Mapping rejected customers to UNVERIFIED would put closed\\\\ncases back in the review queue, so the owner ruled it out (2026-10-07).\\\\n14 legacy rows land here; see Customer.verificationRejectionReason.\"}],\"dbName\":null},\"OrderChannel\":{\"values\":[{\"name\":\"RETAIL\",\"dbName\":null},{\"name\":\"WHOLESALE\",\"dbName\":null}],\"dbName\":null,\"documentation\":\"Legacy kept retail and wholesale orders in two SEPARATE tables\\\\n(orders_orders vs orders). The redesigned schema has one Order model, so the\\\\ndistinction lives here instead.\"},\"OrderStatus\":{\"values\":[{\"name\":\"SUSPENDED\",\"dbName\":null},{\"name\":\"PLACED\",\"dbName\":null},{\"name\":\"ADMIN_APPROVED\",\"dbName\":null},{\"name\":\"SOURCING\",\"dbName\":null},{\"name\":\"PREPARING\",\"dbName\":null},{\"name\":\"DELIVERED_TO_AGENT\",\"dbName\":null},{\"name\":\"DELIVERED_TO_CUSTOMER\",\"dbName\":null},{\"name\":\"CANCELLED\",\"dbName\":null}],\"dbName\":null},\"PreOrderStatus\":{\"values\":[{\"name\":\"PLACED\",\"dbName\":null},{\"name\":\"ADMIN_APPROVED\",\"dbName\":null},{\"name\":\"WORKSHOP_APPROVED\",\"dbName\":null},{\"name\":\"READY_TO_SHIP\",\"dbName\":null},{\"name\":\"DELIVERED\",\"dbName\":null},{\"name\":\"CANCELLED\",\"dbName\":null}],\"dbName\":null},\"LedgerCurrency\":{\"values\":[{\"name\":\"GOLD_GRAM\",\"dbName\":null},{\"name\":\"RIAL\",\"dbName\":null}],\"dbName\":null},\"LedgerDirection\":{\"values\":[{\"name\":\"DEBIT\",\"dbName\":null},{\"name\":\"CREDIT\",\"dbName\":null}],\"dbName\":null},\"LedgerSourceType\":{\"values\":[{\"name\":\"ORDER_STOCK\",\"dbName\":null},{\"name\":\"ORDER_PRE_ORDER\",\"dbName\":null},{\"name\":\"REPAYMENT_MELTED_GOLD\",\"dbName\":null},{\"name\":\"REPAYMENT_TRANSFER\",\"dbName\":null},{\"name\":\"REPAYMENT_CHEQUE\",\"dbName\":null},{\"name\":\"REPAYMENT_CASH\",\"dbName\":null},{\"name\":\"WALLET_BONUS\",\"dbName\":null},{\"name\":\"ADJUSTMENT\",\"dbName\":null}],\"dbName\":null},\"ProductImageRole\":{\"values\":[{\"name\":\"FEATURED\",\"dbName\":null},{\"name\":\"FEATURED_MOBILE\",\"dbName\":null},{\"name\":\"GALLERY\",\"dbName\":null},{\"name\":\"GALLERY_MOBILE\",\"dbName\":null}],\"dbName\":null},\"CommentStatus\":{\"values\":[{\"name\":\"PENDING\",\"dbName\":null},{\"name\":\"APPROVED\",\"dbName\":null},{\"name\":\"REJECTED\",\"dbName\":null}],\"dbName\":null},\"AccountingEntityType\":{\"values\":[{\"name\":\"CUSTOMER\",\"dbName\":null},{\"name\":\"PRODUCT\",\"dbName\":null}],\"dbName\":null},\"AccountingOutboxKind\":{\"values\":[{\"name\":\"CUSTOMER_PUSH\",\"dbName\":null},{\"name\":\"PRODUCT_PUSH\",\"dbName\":null},{\"name\":\"ORDER_DOCUMENT\",\"dbName\":null},{\"name\":\"ORDER_DOCUMENT_DELETE\",\"dbName\":null}],\"dbName\":null},\"AccountingOutboxStatus\":{\"values\":[{\"name\":\"PENDING\",\"dbName\":null},{\"name\":\"SENDING\",\"dbName\":null,\"documentation\":\"A call was in flight. Found at startup, it means the process died mid-call\\\\nand the outcome is unknown — see AccountingOutboxWorker.\"},{\"name\":\"SENT\",\"dbName\":null},{\"name\":\"FAILED\",\"dbName\":null},{\"name\":\"NEEDS_REVIEW\",\"dbName\":null,\"documentation\":\"Unsafe to retry automatically (e.g. a Zarrin call timed out: Zarrin has no\\\\nidempotency key, so a blind retry could post the document twice).\"},{\"name\":\"RESOLVED\",\"dbName\":null,\"documentation\":\"Closed by an admin from the log screen.\"}],\"dbName\":null},\"PromotionScope\":{\"values\":[{\"name\":\"PRODUCT\",\"dbName\":null},{\"name\":\"CATEGORY\",\"dbName\":null},{\"name\":\"CUSTOMER\",\"dbName\":null},{\"name\":\"BRAND\",\"dbName\":null}],\"dbName\":null,\"documentation\":\"Legacy Promotion.type — what the discount is scoped to.\"},\"PromotionUsage\":{\"values\":[{\"name\":\"ONCE\",\"dbName\":null},{\"name\":\"UNTIL_END_DATE\",\"dbName\":null}],\"dbName\":null,\"documentation\":\"Legacy Promotion.use_only — how often a customer may redeem it.\"},\"MessageAudience\":{\"values\":[{\"name\":\"SINGLE_NUMBER\",\"dbName\":null},{\"name\":\"MULTIPLE_NUMBERS\",\"dbName\":null},{\"name\":\"ALL_CUSTOMERS\",\"dbName\":null},{\"name\":\"WHOLESALE_CUSTOMERS\",\"dbName\":null},{\"name\":\"RETAIL_CUSTOMERS\",\"dbName\":null},{\"name\":\"SALES_AGENTS\",\"dbName\":null}],\"dbName\":null,\"documentation\":\"Who an SMS or notification was aimed at. Legacy's sms/create offered these\\\\naudiences, each gated by its own rid (sms.create.all, .omde, .single, ...).\"}},\"types\":{}}") defineDmmfProperty(exports.Prisma, config.runtimeDataModel) config.engineWasm = undefined diff --git a/apps/api/release/vendor/.prisma/client/package.json b/apps/api/release/vendor/.prisma/client/package.json index e2f03a9..fd77fc7 100644 --- a/apps/api/release/vendor/.prisma/client/package.json +++ b/apps/api/release/vendor/.prisma/client/package.json @@ -1,5 +1,5 @@ { - "name": "prisma-client-ed6338840581098d1a6f6e7ebfa38995b890cf67ba58cec8ad302fd997d92a01", + "name": "prisma-client-9161dfb7f2a3ada2b72c27c7a91664048e7f0e5d5d265a0abff1e443711c8388", "main": "index.js", "types": "index.d.ts", "browser": "index-browser.js", diff --git a/apps/api/release/vendor/.prisma/client/schema.prisma b/apps/api/release/vendor/.prisma/client/schema.prisma index c81b913..883f9ef 100644 --- a/apps/api/release/vendor/.prisma/client/schema.prisma +++ b/apps/api/release/vendor/.prisma/client/schema.prisma @@ -28,12 +28,27 @@ enum AdminRole { /// Legacy Customer.type — what kind of wholesale customer this is. Values and /// labels taken verbatim from bulkCustomer.vue's userTypes list. +/// +/// SALES_AGENT is a LEGACY value only: legacy stored a sales agent as a +/// Customer row with type=1, but the redesigned system models a sales agent +/// as an AdminUser (role SALES_EXPERT) instead — see admin-users.service.ts +/// and admin-customers.service.ts's listReagents()/create(). No Customer row +/// should be created with kind SALES_AGENT going forward; the value is kept +/// only so legacyTypeToKind()/kindToLegacyType() stay total functions and any +/// already-migrated data keeps a readable label. +/// +/// RETAIL marks a "تک" (single/retail) customer — legacy kept these in an +/// entirely separate table (SingleCustomer/`login`) that could never contain +/// a wholesale/agent/shopkeeper/banker row. The redesigned schema folded both +/// into one Customer model, so this value is what listSingle() now filters on +/// to reproduce that same separation. enum CustomerKind { - SALES_AGENT // 1 کارشناس فروش + SALES_AGENT // legacy 1 کارشناس فروش — superseded by AdminRole.SALES_EXPERT, do not use for new rows APP_SHOPKEEPER // 2 مغازه دار اپلیکیشن WALK_IN_SHOPKEEPER // 3 مغازه دار حضوری BANKER // 4 بنکدار WORKSHOP_SUPERVISOR // 5 سرپرست کارگاه + RETAIL // مشتری تک — legacy SingleCustomer } enum VerificationStep { @@ -41,6 +56,13 @@ enum VerificationStep { STEP_ONE_SUBMITTED STEP_TWO_SUBMITTED VERIFIED + + /// Legacy had THREE states per step, not two + /// (MajorCustomerController.php:106-135): 1 = awaiting, 2 = approved, + /// 3 = REJECTED. Mapping rejected customers to UNVERIFIED would put closed + /// cases back in the review queue, so the owner ruled it out (2026-10-07). + /// 14 legacy rows land here; see Customer.verificationRejectionReason. + REJECTED } /// Legacy kept retail and wholesale orders in two SEPARATE tables @@ -96,23 +118,47 @@ enum LedgerSourceType { // Identity // ───────────────────────────────────────────────────────────────────────── +/// Legacy `cities` is a tree (country > province > city > district) and so is +/// this: a city hangs under its `parent`. In the admin pickers a top-level row +/// (the country) is a heading, not selectable (henza_admin citiesModel.js:38). model City { - id String @id @default(cuid()) - name String - province String? + id String @id @default(cuid()) + name String + parentId String? + parent City? @relation("CityTree", fields: [parentId], references: [id], onDelete: Restrict) + children City[] @relation("CityTree") /// Legacy cities.percent / percent_aux — per-city wage surcharges the city /// screen edits through GET cities/get-percent/{id} and get-percent-aux/{id}. - percent Decimal? @db.Decimal(6, 3) - percentAux Decimal? @db.Decimal(6, 3) - customers Customer[] - addresses CustomerAddress[] - branches Branch[] - preOrders PreOrder[] + percent Decimal? @db.Decimal(6, 3) + percentAux Decimal? @db.Decimal(6, 3) + customers Customer[] + addresses CustomerAddress[] + branches Branch[] + preOrders PreOrder[] + salesExpertProfiles SalesExpertProfile[] + + @@index([parentId]) } model AdminUser { - id String @id @default(cuid()) - fullName String + id String @id @default(cuid()) + + /// ⚠️ Kept in sync BY A DATABASE TRIGGER — `admin_user_sync_full_name`, from + /// migration 20260922180000. Prisma cannot see it, so a write here may store + /// something other than what you passed: + /// + /// * write the parts -> fullName is rebuilt as "first last" + /// * write fullName only -> the parts are re-derived from it + /// * write BOTH in one update -> THE PARTS WIN; the submitted fullName is + /// discarded + /// + /// Re-read after writing if you need the stored value. Same arrangement as + /// Customer (D0 requirement 7 — the split applies to ALL admins, not only + /// sales experts). + fullName String + firstName String? + lastName String? + mobile String @unique passwordHash String role AdminRole @@ -127,7 +173,21 @@ model AdminUser { isActive Boolean @default(true) createdAt DateTime @default(now()) + /// Legacy stored a sales agent as a `customers` row with type=1, so + /// ReagentCustomer.vue's shared form collected these alongside the + /// wholesale-customer fields. A sales agent is now an AdminUser + /// (role=SALES_EXPERT), so these live here instead — only ever set for that + /// role; every other AdminUser leaves them null. + avatarFileId String? + avatarFile UploadedFile? @relation("AdminUserAvatar", fields: [avatarFileId], references: [id]) + address String? + storeName String? // legacy store_name + pasazhName String? // legacy pasazh_name + memberCode String? // legacy mcode + referredCustomers Customer[] @relation("ReferralAgent") + /// Orders credited to this sales expert — see Order.salesAgentId. + creditedOrders Order[] @relation("OrderSalesAgent") supervisedWorkshops Workshop[] @relation("WorkshopSupervisor") branchAllocations BranchAllocation[] @relation("AllocationAuthor") postedLedgerEntries LedgerEntry[] @@ -137,19 +197,218 @@ model AdminUser { sentNotifications Notification[] @relation("NotificationAuthor") uploadedFiles UploadedFile[] @relation("FileUploader") + /// Only ever set for role = SALES_EXPERT (D17). + salesExpertProfile SalesExpertProfile? + + /// Issued admin-panel tokens, recorded only while session tracking is on + /// (AUTH_SESSION_TRACKING, or implicitly whenever the IAM is enabled) so a + /// token can be revoked before it expires. See AdminSession. + sessions AdminSession[] + @@index([role]) @@index([userTypeId]) + @@index([avatarFileId]) + @@index([firstName]) + @@index([lastName]) +} + +/// An issued APP token (customer app / sales-expert app), so it can be revoked +/// before it expires — the counterpart of AdminSession for the other token family. +/// +/// WHY A SEPARATE TABLE AND NO FOREIGN KEY +/// --------------------------------------- +/// An app token's `sub` is a Customer id for a customer and an **AdminUser id** +/// for a sales expert (D21). One FK cannot point at two tables, so the subject is +/// stored as a plain id plus its type. The rows are short-lived operational data, +/// not part of the accounting model, so the missing FK costs nothing here. +model AppSession { + id String @id @default(cuid()) + + /// The token's `jti` claim. Unique: one row per issued token. + jti String @unique + + /// Customer.id, or AdminUser.id when subjectType is "sales-expert". + subjectId String + subjectType String + + mobile String? + + /// Set when the login was confirmed by the central IAM: its session id (`sid`) + /// and stable user id (`sub`), which is what a back-channel logout arrives with. + iamSessionId String? + iamSub String? + + ipAddress String? + userAgent String? + + createdAt DateTime @default(now()) + expiresAt DateTime? + lastSeenAt DateTime? + + revokedAt DateTime? + revokedReason String? + + @@index([subjectId]) + @@index([iamSessionId]) + @@index([iamSub]) + @@index([expiresAt]) +} + +/// An issued admin-panel JWT, so it can be revoked before it expires. +/// +/// WHY THIS EXISTS +/// --------------- +/// The admin token is self-contained and valid for 12h, which means nothing — +/// not disabling the account, not a central "sign out everywhere" — could cut a +/// session short: the token kept working until it expired. With the central IAM +/// in the loop that gap became visible (an IAM session revocation had no effect +/// here), so every issued token now carries a `jti` recorded on this table and +/// JwtStrategy refuses a token whose row is revoked. +/// +/// Rows are written ONLY while tracking is enabled, and JwtStrategy only +/// enforces them while it is enabled, so a deployment that does not want the +/// extra lookup behaves exactly as before. +model AdminSession { + id String @id @default(cuid()) + + /// The token's `jti` claim. Unique: one row per issued token. + jti String @unique + + adminUserId String + adminUser AdminUser @relation(fields: [adminUserId], references: [id], onDelete: Cascade) + + /// Set when the login was verified by the IAM: its session id (`sid`) and the + /// stable user id (`sub`) there. Back-channel logout arrives keyed by these — + /// deliberately here rather than as columns on AdminUser, so enabling the + /// feature needs no change to an existing table. + iamSessionId String? + iamSub String? + + ipAddress String? + userAgent String? + + createdAt DateTime @default(now()) + expiresAt DateTime? + lastSeenAt DateTime? + + revokedAt DateTime? + revokedReason String? + + @@index([adminUserId]) + @@index([iamSessionId]) + @@index([iamSub]) + @@index([expiresAt]) +} + +/// The sales-expert fields legacy kept on the `customers` row (type=1) and that +/// were lost when a sales expert became an AdminUser (D17). +/// +/// A separate table rather than columns on AdminUser: these are meaningful only +/// for role = SALES_EXPERT and would be permanently null for every other admin. +/// A row is created for every SALES_EXPERT by the migration, and upserted by the +/// service whenever one is created or a user's role becomes SALES_EXPERT — but +/// readers still left-join, so a missing profile degrades to nulls rather than +/// dropping the agent from the grid. +/// +/// `reagent_id` is deliberately NOT here — see D17: in the reference it was a +/// side effect of the shared customers form, and filling it removed that expert +/// from the selectable-agent list (queryReagent, AdminController.php:420). +model SalesExpertProfile { + id String @id @default(cuid()) + adminUserId String @unique + adminUser AdminUser @relation(fields: [adminUserId], references: [id], onDelete: Cascade) + + /// Legacy customers.city_id — a filterable grid column + /// (ReagentListModel.js:14) and the source of the commission autofill + /// (ReagentCustomer.vue:215-228). + cityId String? + city City? @relation(fields: [cityId], references: [id]) + + /// Legacy customers.gram_level — the «سطح اعتبار» column, filterable. + /// Decimal(14,4) matches Customer.goldCreditLimitGrams exactly so the same + /// credit limit has identical precision on both tables. + gramLevel Decimal @default(0) @db.Decimal(14, 4) + + /// Legacy customers.phone (varchar 15) and ncode (varchar 20). The reference + /// stores both and reads neither back; kept so the form matches it. Neither + /// is unique and neither has a validation rule in the reference — inventing + /// one would reject data the reference accepts. + phone String? @db.VarChar(15) + nationalCode String? @db.VarChar(20) + + /// The Customer row carrying this expert's OWN orders, debt and credit limit. + /// + /// The reference stored a sales agent AS a Customer (type=1), so an order the + /// agent placed from the app was simply their own, against their own + /// gram_level (ApiMobileController.php:534-535). Here the expert is an + /// AdminUser (D17), which has no ledger and cannot be an Order's subject, so + /// this one linked Customer plays that part. + /// + /// Distinct from the expert's REFERRED customers, which are ordinary Customer + /// rows pointing at the AdminUser through Customer.referredByAgentId. + /// + /// Null until the expert first signs into the app, when it is created from + /// this profile. See D21. + tradingCustomerId String? @unique + tradingCustomer Customer? @relation("SalesExpertTradingAccount", fields: [tradingCustomerId], references: [id], onDelete: SetNull) + + createdAt DateTime @default(now()) + updatedAt DateTime @default(now()) @updatedAt + + @@index([cityId]) } model Customer { - id String @id @default(cuid()) - fullName String + id String @id @default(cuid()) + + /// ⚠️ `fullName`, `firstName` and `lastName` are kept in sync BY A DATABASE + /// TRIGGER — `customer_sync_full_name`, created in migration + /// 20260922120000_customer_name_parts. Prisma does not know about it, so a + /// write here is NOT the whole story: + /// + /// * write the parts -> fullName is rebuilt as "first last" + /// * write fullName only -> the parts are re-derived from it + /// * write BOTH in one update -> THE PARTS WIN; fullName is overwritten + /// with "first last" and whatever you passed for fullName is discarded + /// + /// So a value you wrote can differ from the value that lands in the row. + /// Re-read after writing if you need the stored value. Prefer writing the + /// parts; `fullName` exists for the legacy readers that predate D0. + /// + /// Reference has these as two columns from the start + /// (henza_server 2020_10_01_120430_customers_table.php:18-19 fname/lname); + /// the port collapsed them, which is the D0 defect. + fullName String + firstName String? + lastName String? + mobile String @unique - nationalCode String @unique + /// Legacy customers.ncode. OPTIONAL since 2026-10-07: not one of the 1,616 + /// legacy customers has a national code (1595/1595 empty), and fabricating + /// one is a data violation that would block later legal identity checks + /// (owner ruling). Still @unique — in PostgreSQL NULLs do not collide, so + /// the migration tool must write NULL and never '', which would collide on + /// the second row. + /// + /// Three service-layer workarounds exist ONLY because this used to be + /// required, and they store the MOBILE NUMBER here: + /// admin-customers.service.ts:625,685 and customer-auth.service.ts:258. + /// Retiring them is a separate change; see docs/DATA-MIGRATION-MAP.md §10.4. + nationalCode String? @unique passwordHash String cityId String? city City? @relation(fields: [cityId], references: [id]) + /// Legacy customers.new_city — the city name exactly as the customer typed it + /// at app sign-up (Major/CustomerController.php:36). Kept verbatim because + /// the legacy city table has only 15 rows, so the typed name is often the only + /// record of where the customer is (172 customers; 43 match no known city). + /// cityId is set alongside it only on an exact, ي/ك-normalised name match. + /// Legacy sign-up also forced city_id = 5 (Tehran) on everyone + /// (Major/CustomerController.php:21), so for those rows the typed name, not + /// cityId, is the truth. Owner ruling 2026-10-07: keep both. + cityNameRaw String? + /// Legacy Customer.type — distinguishes بنکدار from مغازه دار, which the /// BankerList / ShopkeeperList screens filter on. kind CustomerKind @default(APP_SHOPKEEPER) @@ -167,17 +426,73 @@ model Customer { referredByAgentId String? referredByAgent AdminUser? @relation("ReferralAgent", fields: [referredByAgentId], references: [id]) + /// Set only on the one Customer row that acts as a sales expert's own trading + /// account (see SalesExpertProfile.tradingCustomerId). Empty for every + /// ordinary customer. + salesExpertTradingFor SalesExpertProfile? @relation("SalesExpertTradingAccount") + /// Legacy orders that named THIS customer as their referrer — see + /// Order.referrerCustomerId. History only. + referredOrders Order[] @relation("OrderReferrerCustomer") + // Credit limit + cached ledger balances (source of truth is LedgerEntry; these // are denormalized for fast reads and reconciled by a scheduled job). goldCreditLimitGrams Decimal @default(0) @db.Decimal(14, 4) // legacy gram_level goldDebtGrams Decimal @default(0) @db.Decimal(14, 4) // legacy remain fiatDebtRial Decimal @default(0) @db.Decimal(20, 2) // legacy rial_remain + /// Balance as last read from the accounting software (D27), in the app's own + /// sign convention (positive = owes). Shown to the customer when the + /// integration is on; the credit-limit check still uses goldDebtGrams above. + /// Null until the first successful sync. + accountingGoldBalance Decimal? @db.Decimal(14, 4) + accountingRialBalance Decimal? @db.Decimal(20, 2) + accountingBalanceAt DateTime? + + /// Legacy `customers.percent` — the per-customer making-charge offset. It is + /// ADDED to the variant's making charge when pricing an order line + /// (henza_pwa src/Mixins/product/index.ts:69-75: + /// getWage(v) = state.percent + v.percentage_pay) + /// and it shifts the catalogue making-charge filter bounds + /// (ApiMobileController.php:391-396,76-77). It is NOT part of the price + /// formula itself — that extra percent is ConfigStatic['product_price_extra_percent']. + /// + /// NOT the wallet cashback rate (storefront ConfigStatic['percent'], D13) and + /// NOT the wholesale per-line charge (OrderItem.wagePercentSnapshot). + /// + /// DB default 0 keeps every existing customer's price unchanged. The + /// reference's application-layer default for NEW customers is 3 + /// (AdminController.php:338) and the field is required on create (:354). + makingChargeOffsetPercent Decimal @default(0) @db.Decimal(6, 3) + verificationStep VerificationStep @default(UNVERIFIED) nationalIdImageUrl String? businessLicenseUrl String? shopImageUrl String? + /// Why verification was rejected (VerificationStep.REJECTED). + /// + /// Legacy recorded NO reason: none of its 49 `customers` columns is a + /// reason/note field, and on rejection it only sent a fixed SMS. So the 14 + /// rows migrated from henza carry the sentinel + /// «رد شده در سیستم قدیم — فاقد شرح علت ثبت‌شده» instead of NULL, so support + /// knows why it is blank (owner ruling 2026-10-07). The migration tool + /// writes it only WHERE this IS NULL, so a re-run cannot overwrite a real + /// reason entered in the new system. + verificationRejectionReason String? + + /// NULL for rows migrated from henza — legacy recorded no rejection time. + verificationRejectedAt DateTime? + + /// Legacy customers.birth_date, populated on 917 of 1,595 rows. Kept for the + /// birthday SMS / loyalty campaigns (owner ruling 2026-10-07). + /// + /// ⚠ Legacy stores dates as JALALI STRINGS in other tables + /// (cashes.recive_date is varchar, 88/89 values starting "14…"), so this + /// timestamp may hold mis-entered Jalali years. Confirm the calendar with + /// docs/migration-precheck-3.sql BEFORE backfilling: copying them unchanged + /// would produce 917 wrong birthdays, worse for an SMS campaign than none. + birthDate DateTime? + /// Legacy `image_id` — the profile photo (عکس پروفایل) on the sales-agent /// form. Legacy stored an FK to its Image table and read it back as a nested /// `image: { id, image }`, so this is a relation, not a bare URL string. @@ -205,8 +520,34 @@ model Customer { promotions Promotion[] notifications NotificationRecipient[] activityLogs CustomerActivityLog[] + otpChallenges CustomerOtp[] + favorites CustomerFavorite[] @@index([referredByAgentId]) + @@index([firstName]) + @@index([lastName]) +} + +/// Legacy `fav` (251 rows) — saved products. The target had no model for this, +/// so every customer's favourites would have been lost in the migration; the +/// owner confirmed on 2026-10-06 that they matter. +/// +/// Legacy `fav` has two columns and NO primary key. The composite key here +/// supplies the constraint the source lacks (the precheck found 0 duplicate +/// pairs, but the tool should still SELECT DISTINCT). 14 of the 251 rows point +/// at a deleted customer and must be skipped. +/// +/// Legacy's denormalised `product.count_fav` counter is deliberately NOT +/// recreated as a column — derive it from this table. +model CustomerFavorite { + customerId String + customer Customer @relation(fields: [customerId], references: [id], onDelete: Cascade) + productId String + product Product @relation(fields: [productId], references: [id], onDelete: Cascade) + createdAt DateTime @default(now()) + + @@id([customerId, productId]) + @@index([productId]) } model CustomerAddress { @@ -311,12 +652,21 @@ model Product { isActive Boolean @default(true) createdAt DateTime @default(now()) + /// Stock of the linked کارساخته as last read from the accounting software + /// (D27). Weight for gram-type items, count for count-type ones — whichever + /// the software reports. At zero or below the product is unavailable in the + /// app (pre-order variants excepted). Null = not linked or never synced. + accountingStockWeight Decimal? @db.Decimal(14, 4) + accountingStockCount Decimal? @db.Decimal(14, 4) + accountingStockAt DateTime? + variants ProductVariant[] images ProductImage[] collections CollectionProduct[] comments Comment[] promotions Promotion[] allocationItems BranchAllocationItem[] + favoritedBy CustomerFavorite[] } model ProductImage { @@ -329,6 +679,11 @@ model ProductImage { /// گالری تصاویر سایت / گالری تصاویر موبایل) — GALLERY is the default so /// existing rows and any generic "just attach an image" caller keep working. role ProductImageRole @default(GALLERY) + + /// Variants that display this image. A gallery image may back several + /// variants (one photo, several weights), which is why this is a plain + /// one-to-many and not a join table. + variants ProductVariant[] } enum ProductImageRole { @@ -356,7 +711,16 @@ model ProductVariant { isPreOrder Boolean @default(false) isActive Boolean @default(true) + /// The gallery image shown for this variant, picked from its own product's + /// images — never a re-uploaded copy. onDelete: SetNull because dropping an + /// image must never cascade into the variant: OrderItem rows reference + /// variants, so losing one would break order history. + imageId String? + image ProductImage? @relation(fields: [imageId], references: [id], onDelete: SetNull) + orderItems OrderItem[] + + @@index([imageId]) } // ───────────────────────────────────────────────────────────────────────── @@ -384,6 +748,22 @@ model Order { isSuspendedOverCreditLimit Boolean @default(false) deliveredAt DateTime? // setting this is what triggers debt recognition + /// The sales expert this order is credited to, fixed when it is placed: + /// the customer's referring expert AT THAT MOMENT. Legacy `orders.reagent_id`, + /// set once at creation (ApiMobileController.php:601) and never moved, so a + /// customer changing expert later does not move past sales or commission + /// (owner ruling 2026-10-08). «میزان فروش» counts from here, never from the + /// customer's current referrer. + salesAgentId String? + salesAgent AdminUser? @relation("OrderSalesAgent", fields: [salesAgentId], references: [id], onDelete: SetNull) + + /// History only: a legacy order whose `reagent_id` named a customer who is + /// not a sales expert (one such customer, 17 orders in 2022). Legacy counted + /// those orders in that customer's own «میزان فروش»; this keeps that figure + /// exact. Never set for a new order. + referrerCustomerId String? + referrerCustomer Customer? @relation("OrderReferrerCustomer", fields: [referrerCustomerId], references: [id], onDelete: SetNull) + createdAt DateTime @default(now()) updatedAt DateTime @updatedAt @@ -394,6 +774,8 @@ model Order { @@index([customerId]) @@index([status]) + @@index([salesAgentId]) + @@index([referrerCustomerId]) } model OrderItem { @@ -651,6 +1033,115 @@ model Setting { updatedAt DateTime @updatedAt } +// ───────────────────────────────────────────────────────────────────────── +// Accounting integration (D27) — the shop's accounting software, Tahesab or +// Zarrin, chosen in the admin panel. Configuration lives in the Setting row +// `accounting.config` (never served by the generic `const` routes). Plan: +// docs/ACCOUNTING-INTEGRATION-PLAN.md. +// +// `provider` is the driver name ('tahesab' | 'zarrin'), a plain string like +// SMS_PROVIDER so a new driver needs no migration. Links are per provider, so +// switching provider and back loses nothing. +// ───────────────────────────────────────────────────────────────────────── + +enum AccountingEntityType { + CUSTOMER + PRODUCT +} + +/// One app row ↔ one record in the accounting software (customer account or +/// کارساخته). +model AccountingLink { + id String @id @default(cuid()) + provider String + entityType AccountingEntityType + entityId String + /// The record's code in the accounting software (Tahesab Moshtari_Code / + /// Zarrin idHesab; for products the Zarrin idKar or the Tahesab Name_Kar). + externalCode String + externalName String? + /// How the link came to be: LINKED (matched by mobile/name), IMPORTED (app + /// row created from the accounting record), PUSHED (accounting record created + /// from the app row) or MANUAL (an admin typed the code). + origin String + /// The record as last read, for display only. + snapshot Json? + syncedAt DateTime @default(now()) + createdAt DateTime @default(now()) + + @@unique([provider, entityType, entityId]) + @@unique([provider, entityType, externalCode]) + @@index([entityType, entityId]) +} + +enum AccountingOutboxKind { + CUSTOMER_PUSH + PRODUCT_PUSH + ORDER_DOCUMENT + ORDER_DOCUMENT_DELETE +} + +enum AccountingOutboxStatus { + PENDING + /// A call was in flight. Found at startup, it means the process died mid-call + /// and the outcome is unknown — see AccountingOutboxWorker. + SENDING + SENT + FAILED + /// Unsafe to retry automatically (e.g. a Zarrin call timed out: Zarrin has no + /// idempotency key, so a blind retry could post the document twice). + NEEDS_REVIEW + /// Closed by an admin from the log screen. + RESOLVED +} + +/// Work to push to the accounting software. Written in the SAME transaction as +/// the change that causes it, so an outage of the accounting software never +/// loses an event and never blocks the app. +model AccountingOutbox { + id String @id @default(cuid()) + provider String + kind AccountingOutboxKind + entityId String + status AccountingOutboxStatus @default(PENDING) + attempts Int @default(0) + nextAttemptAt DateTime @default(now()) + lastError String? + /// What the accounting software returned as the document/record id. + externalRef String? + /// Per-step progress of multi-call jobs (a Zarrin document is one call per + /// line), so a failure resumes where it stopped. + progress Json? + /// Last request/response, for the log screen. Never contains the token. + lastRequest Json? + lastResponse Json? + sentAt DateTime? + resolvedById String? + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + @@index([status, nextAttemptAt]) + @@index([kind, entityId]) +} + +/// Something a pull found that needs a human: an account with no mobile, two +/// accounts sharing one mobile, a کارساخته group with no category mapping. +model AccountingIssue { + id String @id @default(cuid()) + provider String + kind String + externalCode String + entityId String? + message String + data Json? + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + resolvedAt DateTime? + + @@unique([provider, kind, externalCode]) + @@index([resolvedAt]) +} + // ───────────────────────────────────────────────────────────────────────── // Promotions / discounts — legacy views/promotion/*, served by // PromotionController (`product/variant/promotion`). The redesigned schema had @@ -861,8 +1352,71 @@ model UploadedFile { uploadedByAdminUserId String? uploadedByAdminUser AdminUser? @relation("FileUploader", fields: [uploadedByAdminUserId], references: [id]) - createdAt DateTime @default(now()) - customerAvatars Customer[] @relation("CustomerAvatar") + createdAt DateTime @default(now()) + customerAvatars Customer[] @relation("CustomerAvatar") + adminUserAvatars AdminUser[] @relation("AdminUserAvatar") @@index([purpose]) } + +/// One OTP login challenge for a customer. +/// +/// Ports henza_server's flow (ApiMobileController.php:39-78), where userAuth +/// generated rand(1000,9999), stored it on the customer row as `send_password` +/// and sent it by SMS, and userVerfiy compared the submitted code against it +/// (mismatch -> HTTP 422). +/// +/// Three deliberate improvements over the reference, approved by the user +/// (docs/parity/DECISIONS.md D6 and T1): +/// 1. the code is stored as a bcrypt hash, never in plain text — the +/// reference kept it readable in a customer column; +/// 2. it expires (`expiresAt`) — the reference's code stayed valid forever; +/// 3. attempts are counted and the challenge locks out — the reference had +/// no limit at all. +/// The parity behaviour itself is the code comparison and the rejection. +model CustomerOtp { + id String @id @default(cuid()) + /// Normalised to English digits before storing, as the reference does with + /// Utility::faTOen() on both send and verify. + mobile String + customerId String + customer Customer @relation(fields: [customerId], references: [id], onDelete: Cascade) + + /// bcrypt hash of the 4-digit code. Never the code itself. + codeHash String + expiresAt DateTime + /// Failed verify attempts against THIS challenge. + attempts Int @default(0) + /// Set when the code is accepted, so one challenge cannot be reused. + consumedAt DateTime? + + /// Kept for the per-IP send throttle. + requestIp String? + createdAt DateTime @default(now()) + + @@index([mobile, createdAt]) + @@index([customerId]) + @@index([expiresAt]) +} + +/// Bespoke migration ledger left by the EARLIER, pre-Prisma port. +/// +/// It predates Prisma Migrate in this repo and holds 12 historical rows +/// (`0001_init.sql`, `0002_admin_schema.sql`, `seed:initial`, and the early +/// `2026091…` migrations). It is the only record of how that port was applied, +/// so it is **kept and never written to or deleted from** (DEAD-07). +/// +/// It is declared here purely so `prisma migrate diff` stops proposing +/// `DROP TABLE "_goldbank_migrations"` — an undeclared table reads as drift. +/// `@@ignore` keeps it out of Prisma Client: nothing in the application should +/// ever read or write it, and Prisma Migrate will not manage its shape either. +/// +/// Prisma's own ledger is `_prisma_migrations`, which is separate and is never +/// edited by hand (D14). +model goldbank_migrations { + name String @id + appliedAt DateTime @default(now()) @map("applied_at") @db.Timestamptz(6) + + @@map("_goldbank_migrations") + @@ignore +} diff --git a/apps/api/release/vendor/.prisma/client/wasm.js b/apps/api/release/vendor/.prisma/client/wasm.js index b5f4160..0315182 100644 --- a/apps/api/release/vendor/.prisma/client/wasm.js +++ b/apps/api/release/vendor/.prisma/client/wasm.js @@ -125,7 +125,7 @@ exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ exports.Prisma.CityScalarFieldEnum = { id: 'id', name: 'name', - province: 'province', + parentId: 'parentId', percent: 'percent', percentAux: 'percentAux' }; @@ -133,6 +133,8 @@ exports.Prisma.CityScalarFieldEnum = { exports.Prisma.AdminUserScalarFieldEnum = { id: 'id', fullName: 'fullName', + firstName: 'firstName', + lastName: 'lastName', mobile: 'mobile', passwordHash: 'passwordHash', role: 'role', @@ -140,16 +142,68 @@ exports.Prisma.AdminUserScalarFieldEnum = { branchId: 'branchId', wagePercent: 'wagePercent', isActive: 'isActive', - createdAt: 'createdAt' + createdAt: 'createdAt', + avatarFileId: 'avatarFileId', + address: 'address', + storeName: 'storeName', + pasazhName: 'pasazhName', + memberCode: 'memberCode' +}; + +exports.Prisma.AppSessionScalarFieldEnum = { + id: 'id', + jti: 'jti', + subjectId: 'subjectId', + subjectType: 'subjectType', + mobile: 'mobile', + iamSessionId: 'iamSessionId', + iamSub: 'iamSub', + ipAddress: 'ipAddress', + userAgent: 'userAgent', + createdAt: 'createdAt', + expiresAt: 'expiresAt', + lastSeenAt: 'lastSeenAt', + revokedAt: 'revokedAt', + revokedReason: 'revokedReason' +}; + +exports.Prisma.AdminSessionScalarFieldEnum = { + id: 'id', + jti: 'jti', + adminUserId: 'adminUserId', + iamSessionId: 'iamSessionId', + iamSub: 'iamSub', + ipAddress: 'ipAddress', + userAgent: 'userAgent', + createdAt: 'createdAt', + expiresAt: 'expiresAt', + lastSeenAt: 'lastSeenAt', + revokedAt: 'revokedAt', + revokedReason: 'revokedReason' +}; + +exports.Prisma.SalesExpertProfileScalarFieldEnum = { + id: 'id', + adminUserId: 'adminUserId', + cityId: 'cityId', + gramLevel: 'gramLevel', + phone: 'phone', + nationalCode: 'nationalCode', + tradingCustomerId: 'tradingCustomerId', + createdAt: 'createdAt', + updatedAt: 'updatedAt' }; exports.Prisma.CustomerScalarFieldEnum = { id: 'id', fullName: 'fullName', + firstName: 'firstName', + lastName: 'lastName', mobile: 'mobile', nationalCode: 'nationalCode', passwordHash: 'passwordHash', cityId: 'cityId', + cityNameRaw: 'cityNameRaw', kind: 'kind', phone: 'phone', address: 'address', @@ -161,10 +215,17 @@ exports.Prisma.CustomerScalarFieldEnum = { goldCreditLimitGrams: 'goldCreditLimitGrams', goldDebtGrams: 'goldDebtGrams', fiatDebtRial: 'fiatDebtRial', + accountingGoldBalance: 'accountingGoldBalance', + accountingRialBalance: 'accountingRialBalance', + accountingBalanceAt: 'accountingBalanceAt', + makingChargeOffsetPercent: 'makingChargeOffsetPercent', verificationStep: 'verificationStep', nationalIdImageUrl: 'nationalIdImageUrl', businessLicenseUrl: 'businessLicenseUrl', shopImageUrl: 'shopImageUrl', + verificationRejectionReason: 'verificationRejectionReason', + verificationRejectedAt: 'verificationRejectedAt', + birthDate: 'birthDate', avatarFileId: 'avatarFileId', canPlaceOrders: 'canPlaceOrders', isActive: 'isActive', @@ -173,6 +234,12 @@ exports.Prisma.CustomerScalarFieldEnum = { updatedAt: 'updatedAt' }; +exports.Prisma.CustomerFavoriteScalarFieldEnum = { + customerId: 'customerId', + productId: 'productId', + createdAt: 'createdAt' +}; + exports.Prisma.CustomerAddressScalarFieldEnum = { id: 'id', customerId: 'customerId', @@ -236,7 +303,10 @@ exports.Prisma.ProductScalarFieldEnum = { productCode: 'productCode', showType: 'showType', isActive: 'isActive', - createdAt: 'createdAt' + createdAt: 'createdAt', + accountingStockWeight: 'accountingStockWeight', + accountingStockCount: 'accountingStockCount', + accountingStockAt: 'accountingStockAt' }; exports.Prisma.ProductImageScalarFieldEnum = { @@ -256,7 +326,8 @@ exports.Prisma.ProductVariantScalarFieldEnum = { defaultWagePercent: 'defaultWagePercent', qty: 'qty', isPreOrder: 'isPreOrder', - isActive: 'isActive' + isActive: 'isActive', + imageId: 'imageId' }; exports.Prisma.OrderScalarFieldEnum = { @@ -271,6 +342,8 @@ exports.Prisma.OrderScalarFieldEnum = { flatRialCharge: 'flatRialCharge', isSuspendedOverCreditLimit: 'isSuspendedOverCreditLimit', deliveredAt: 'deliveredAt', + salesAgentId: 'salesAgentId', + referrerCustomerId: 'referrerCustomerId', createdAt: 'createdAt', updatedAt: 'updatedAt' }; @@ -398,6 +471,51 @@ exports.Prisma.SettingScalarFieldEnum = { updatedAt: 'updatedAt' }; +exports.Prisma.AccountingLinkScalarFieldEnum = { + id: 'id', + provider: 'provider', + entityType: 'entityType', + entityId: 'entityId', + externalCode: 'externalCode', + externalName: 'externalName', + origin: 'origin', + snapshot: 'snapshot', + syncedAt: 'syncedAt', + createdAt: 'createdAt' +}; + +exports.Prisma.AccountingOutboxScalarFieldEnum = { + id: 'id', + provider: 'provider', + kind: 'kind', + entityId: 'entityId', + status: 'status', + attempts: 'attempts', + nextAttemptAt: 'nextAttemptAt', + lastError: 'lastError', + externalRef: 'externalRef', + progress: 'progress', + lastRequest: 'lastRequest', + lastResponse: 'lastResponse', + sentAt: 'sentAt', + resolvedById: 'resolvedById', + createdAt: 'createdAt', + updatedAt: 'updatedAt' +}; + +exports.Prisma.AccountingIssueScalarFieldEnum = { + id: 'id', + provider: 'provider', + kind: 'kind', + externalCode: 'externalCode', + entityId: 'entityId', + message: 'message', + data: 'data', + createdAt: 'createdAt', + updatedAt: 'updatedAt', + resolvedAt: 'resolvedAt' +}; + exports.Prisma.PromotionScalarFieldEnum = { id: 'id', title: 'title', @@ -491,6 +609,18 @@ exports.Prisma.UploadedFileScalarFieldEnum = { createdAt: 'createdAt' }; +exports.Prisma.CustomerOtpScalarFieldEnum = { + id: 'id', + mobile: 'mobile', + customerId: 'customerId', + codeHash: 'codeHash', + expiresAt: 'expiresAt', + attempts: 'attempts', + consumedAt: 'consumedAt', + requestIp: 'requestIp', + createdAt: 'createdAt' +}; + exports.Prisma.SortOrder = { asc: 'asc', desc: 'desc' @@ -500,6 +630,11 @@ exports.Prisma.JsonNullValueInput = { JsonNull: Prisma.JsonNull }; +exports.Prisma.NullableJsonNullValueInput = { + DbNull: Prisma.DbNull, + JsonNull: Prisma.JsonNull +}; + exports.Prisma.QueryMode = { default: 'default', insensitive: 'insensitive' @@ -528,14 +663,16 @@ exports.CustomerKind = exports.$Enums.CustomerKind = { APP_SHOPKEEPER: 'APP_SHOPKEEPER', WALK_IN_SHOPKEEPER: 'WALK_IN_SHOPKEEPER', BANKER: 'BANKER', - WORKSHOP_SUPERVISOR: 'WORKSHOP_SUPERVISOR' + WORKSHOP_SUPERVISOR: 'WORKSHOP_SUPERVISOR', + RETAIL: 'RETAIL' }; exports.VerificationStep = exports.$Enums.VerificationStep = { UNVERIFIED: 'UNVERIFIED', STEP_ONE_SUBMITTED: 'STEP_ONE_SUBMITTED', STEP_TWO_SUBMITTED: 'STEP_TWO_SUBMITTED', - VERIFIED: 'VERIFIED' + VERIFIED: 'VERIFIED', + REJECTED: 'REJECTED' }; exports.ProductImageRole = exports.$Enums.ProductImageRole = { @@ -597,6 +734,27 @@ exports.CommentStatus = exports.$Enums.CommentStatus = { REJECTED: 'REJECTED' }; +exports.AccountingEntityType = exports.$Enums.AccountingEntityType = { + CUSTOMER: 'CUSTOMER', + PRODUCT: 'PRODUCT' +}; + +exports.AccountingOutboxKind = exports.$Enums.AccountingOutboxKind = { + CUSTOMER_PUSH: 'CUSTOMER_PUSH', + PRODUCT_PUSH: 'PRODUCT_PUSH', + ORDER_DOCUMENT: 'ORDER_DOCUMENT', + ORDER_DOCUMENT_DELETE: 'ORDER_DOCUMENT_DELETE' +}; + +exports.AccountingOutboxStatus = exports.$Enums.AccountingOutboxStatus = { + PENDING: 'PENDING', + SENDING: 'SENDING', + SENT: 'SENT', + FAILED: 'FAILED', + NEEDS_REVIEW: 'NEEDS_REVIEW', + RESOLVED: 'RESOLVED' +}; + exports.PromotionScope = exports.$Enums.PromotionScope = { PRODUCT: 'PRODUCT', CATEGORY: 'CATEGORY', @@ -621,7 +779,11 @@ exports.MessageAudience = exports.$Enums.MessageAudience = { exports.Prisma.ModelName = { City: 'City', AdminUser: 'AdminUser', + AppSession: 'AppSession', + AdminSession: 'AdminSession', + SalesExpertProfile: 'SalesExpertProfile', Customer: 'Customer', + CustomerFavorite: 'CustomerFavorite', CustomerAddress: 'CustomerAddress', Branch: 'Branch', Workshop: 'Workshop', @@ -644,6 +806,9 @@ exports.Prisma.ModelName = { Permission: 'Permission', Comment: 'Comment', Setting: 'Setting', + AccountingLink: 'AccountingLink', + AccountingOutbox: 'AccountingOutbox', + AccountingIssue: 'AccountingIssue', Promotion: 'Promotion', PromotionExclusion: 'PromotionExclusion', BranchAllocation: 'BranchAllocation', @@ -653,7 +818,8 @@ exports.Prisma.ModelName = { NotificationRecipient: 'NotificationRecipient', NewsletterSubscriber: 'NewsletterSubscriber', CustomerActivityLog: 'CustomerActivityLog', - UploadedFile: 'UploadedFile' + UploadedFile: 'UploadedFile', + CustomerOtp: 'CustomerOtp' }; /** diff --git a/apps/api/scripts/auth-smoke.sh b/apps/api/scripts/auth-smoke.sh new file mode 100644 index 0000000..4fa4e9c --- /dev/null +++ b/apps/api/scripts/auth-smoke.sh @@ -0,0 +1,252 @@ +#!/usr/bin/env bash +# +# Auth smoke test for the routes closed in the security hotfix. +# +# For every route that was made non-public, asserts: +# - no token -> 401 +# - low-privilege token -> 403 +# - super-admin token -> anything but 401/403 (the guard let it through) +# +# And asserts the genuinely-public routes still answer 200, plus that +# GET /customers no longer leaks anything beyond the four login-lookup fields. +# +# Usage: API=http://localhost:3000/api bash scripts/auth-smoke.sh +# Needs the API running and the dev seed applied (npx prisma db seed). + +set -uo pipefail +API="${API:-http://localhost:3000/api}" + +SUPER_PHONE=09128081392; SUPER_PASS=09128081392 # ut 85, all rids +LOW_PHONE=09123334444; LOW_PASS=admin1234 # ut 88, 5 unrelated rids + +pass=0; fail=0 +ok() { printf ' \033[32mPASS\033[0m %s\n' "$1"; pass=$((pass+1)); } +bad() { printf ' \033[31mFAIL\033[0m %s\n' "$1"; fail=$((fail+1)); } + +login() { + curl -s -X POST "$API/admin/auth/login" -H 'Content-Type: application/json' \ + -d "{\"phone\":\"$1\",\"password\":\"$2\"}" | + sed -n 's/.*"api_token":"\([^"]*\)".*/\1/p' +} + +code() { # method path [token] + local m=$1 p=$2 t=${3:-} + if [ -n "$t" ]; then + curl -s -o /dev/null -w '%{http_code}' -X "$m" "$API/$p" \ + -H "Authorization: Bearer $t" -H 'Content-Type: application/json' -d '{}' + else + curl -s -o /dev/null -w '%{http_code}' -X "$m" "$API/$p" \ + -H 'Content-Type: application/json' -d '{}' + fi +} + +SUPER=$(login "$SUPER_PHONE" "$SUPER_PASS") +LOW=$(login "$LOW_PHONE" "$LOW_PASS") +[ -z "$SUPER" ] && { echo "super-admin login failed — is the seed applied?"; exit 1; } +[ -z "$LOW" ] && { echo "low-priv login failed — is the seed applied?"; exit 1; } + +# route | required rid +CLOSED=( + "GET|accounting/customers/x/balance|wallet.list" + "POST|accounting/customers/x/reconcile|wallet.charge" + "POST|accounting/repayments/gold|document.create" + "POST|accounting/repayments/rial|document.create" + "POST|accounting/entries/x/confirm|document.list.confirm" + "PATCH|orders/x/status|order.list.sts.submit" +) + +echo "Closed routes — no token must be 401:" +for row in "${CLOSED[@]}"; do + IFS='|' read -r m p _ <<<"$row" + c=$(code "$m" "$p") + [ "$c" = 401 ] && ok "$m $p -> 401" || bad "$m $p -> $c (want 401)" +done + +echo "Closed routes — low-privilege token must be 403:" +for row in "${CLOSED[@]}"; do + IFS='|' read -r m p rid <<<"$row" + c=$(code "$m" "$p" "$LOW") + [ "$c" = 403 ] && ok "$m $p [$rid] -> 403" || bad "$m $p [$rid] -> $c (want 403)" +done + +echo "Closed routes — super admin must get past the guard:" +for row in "${CLOSED[@]}"; do + IFS='|' read -r m p _ <<<"$row" + c=$(code "$m" "$p" "$SUPER") + case "$c" in + 401|403) bad "$m $p -> $c (guard rejected a super admin)" ;; + *) ok "$m $p -> $c (through the guard)" ;; + esac +done + +echo "Public routes must stay reachable:" +for p in "catalog/products" "pricing/latest?karatPerMille=750" "home/slider"; do + c=$(curl -s -o /dev/null -w '%{http_code}' "$API/$p") + [ "$c" = 200 ] && ok "GET $p -> 200" || bad "GET $p -> $c (want 200)" +done + + + +# ---------------------------------------------------------------- stage 2 --- +# Customer session: real OTP, customer-scoped JWT, no id-bearing routes left. + +echo "Old id-bearing customer routes must be gone entirely:" +for p in "customers" "customers/customer-dev-test" "customers/customer-dev-test/orders" "customers/customer-dev-test/ledger-entries"; do + c=$(curl -s -o /dev/null -w '%{http_code}' "$API/$p") + [ "$c" = 404 ] && ok "GET $p -> 404" || bad "GET $p -> $c (want 404)" +done + +echo "Customer routes without a token must be 401:" +for p in "customer/me" "customer/me/orders" "customer/me/ledger-entries"; do + c=$(curl -s -o /dev/null -w '%{http_code}' "$API/$p") + [ "$c" = 401 ] && ok "GET $p -> 401" || bad "GET $p -> $c (want 401)" +done + +# The dev seed's customer. Needs the API log to read the code back, since no SMS +# gateway is wired up — see CustomerAuthService.deliver. +CUST_PHONE=09128081392 +otp_request() { + curl -s -o /dev/null -w '%{http_code}' -X POST "$API/customer/auth/request-otp" \ + -H 'Content-Type: application/json' -d "{\"username\":\"$1\"}" +} +# Writes the JSON body to $BODY_FILE and prints the status code. The body goes +# to a file because this is called inside $(...), where a plain assignment would +# be lost along with the subshell. +BODY_FILE=$(mktemp) +trap 'rm -f "$BODY_FILE"' EXIT +otp_verify() { # mobile code -> prints http code; body lands in $BODY_FILE + curl -s -o "$BODY_FILE" -w '%{http_code}' -X POST "$API/customer/auth/verify-otp" \ + -H 'Content-Type: application/json' -d "{\"username\":\"$1\",\"password\":\"$2\"}" +} + +echo "OTP request:" +c=$(otp_request "$CUST_PHONE") +[ "$c" = 200 ] && ok "request-otp -> 200" || bad "request-otp -> $c (want 200)" + +c=$(otp_request 09999999999) +[ "$c" = 200 ] && ok "unknown number answers 200 too (no enumeration)" \ + || bad "unknown number -> $c (want 200, identical to a known one)" + +echo "OTP send throttle:" +c=$(otp_request "$CUST_PHONE") +[ "$c" = 429 ] && ok "immediate resend -> 429" || bad "immediate resend -> $c (want 429)" + +echo "OTP verify:" +c=$(otp_verify "$CUST_PHONE" 0000) +[ "$c" = 401 ] && ok "wrong code -> 401" || bad "wrong code -> $c (want 401)" + +# The real code only reachable from the server log; skip the rest when the +# caller did not point CODE_LOG at it. +if [ -n "${CODE_LOG:-}" ] && [ -f "$CODE_LOG" ]; then + CODE=$(grep -o "OTP for $CUST_PHONE: [0-9]*" "$CODE_LOG" | tail -1 | grep -o '[0-9]*$') + if [ -n "$CODE" ]; then + c=$(otp_verify "$CUST_PHONE" "$CODE") + if [ "$c" = 200 ]; then + ok "correct code -> 200" + CTOK=$(sed -n 's/.*"token":"\([^"]*\)".*/\1/p' "$BODY_FILE") + + c=$(otp_verify "$CUST_PHONE" "$CODE") + [ "$c" = 401 ] && ok "same code reused -> 401 (single use)" \ + || bad "same code reused -> $c (want 401)" + + echo "Customer token works on customer routes:" + for p in "customer/me" "customer/me/orders" "customer/me/ledger-entries"; do + c=$(curl -s -o /dev/null -w '%{http_code}' "$API/$p" -H "Authorization: Bearer $CTOK") + [ "$c" = 200 ] && ok "GET $p -> 200" || bad "GET $p -> $c (want 200)" + done + + echo "Customer token must NOT work on admin routes:" + for p in "admin/auth/me" "admin/customers-omde/list" "admin/dashboard/overview"; do + c=$(curl -s -o /dev/null -w '%{http_code}' "$API/$p" -H "Authorization: Bearer $CTOK") + [ "$c" = 401 ] && ok "GET $p -> 401" || bad "GET $p -> $c (want 401)" + done + + echo "Admin token must NOT work on customer routes:" + for p in "customer/me" "customer/me/orders"; do + c=$(curl -s -o /dev/null -w '%{http_code}' "$API/$p" -H "Authorization: Bearer $SUPER") + [ "$c" = 401 ] && ok "GET $p -> 401" || bad "GET $p -> $c (want 401)" + done + + echo "No IDOR surface: /me* takes no id, and guessing one 404s:" + for p in "customer/me/customer-6" "customer/customer-6" "customers/customer-6"; do + c=$(curl -s -o /dev/null -w '%{http_code}' "$API/$p" -H "Authorization: Bearer $CTOK") + [ "$c" = 404 ] && ok "GET $p -> 404" || bad "GET $p -> $c (want 404)" + done + + echo "/customer/me returns the token's own customer:" + who=$(curl -s "$API/customer/me" -H "Authorization: Bearer $CTOK" | + sed -n 's/.*"mobile":"\([^"]*\)".*/\1/p') + [ "$who" = "$CUST_PHONE" ] && ok "mobile = $who" \ + || bad "mobile = $who (want $CUST_PHONE)" + + # ------------------------------------------------ SEC-02: orders --- + # POST /orders was public with customerId in the body, so anyone could + # place an order on anyone's account — and an order lands on that + # customer's gold debt and ledger. + echo "Orders require a customer token:" + c=$(curl -s -o /dev/null -w '%{http_code}' -X POST "$API/orders" \ + -H 'Content-Type: application/json' \ + -d '{"customerId":"x","items":[{"productVariantId":"x","quantity":1,"wagePercent":7}]}') + [ "$c" = 401 ] && ok "POST orders without a token -> 401" \ + || bad "POST orders without a token -> $c (want 401)" + + c=$(curl -s -o /dev/null -w '%{http_code}' "$API/orders/any-id") + [ "$c" = 401 ] && ok "GET orders/:id without a token -> 401" \ + || bad "GET orders/:id without a token -> $c (want 401)" + + # A variant to order, and a customer that is NOT the token's owner. + VARIANT=$(curl -s "$API/catalog/products" | + sed -n 's/.*"variants":\[{"id":"\([^"]*\)".*/\1/p' | head -1) + if [ -n "$VARIANT" ]; then + echo "The body's customerId must be ignored in favour of the token:" + ORD=$(curl -s -X POST "$API/orders" -H "Authorization: Bearer $CTOK" \ + -H 'Content-Type: application/json' \ + -d "{\"customerId\":\"some-other-customer\",\"items\":[{\"productVariantId\":\"$VARIANT\",\"quantity\":1,\"wagePercent\":7}]}") + OWNER=$(printf '%s' "$ORD" | sed -n 's/.*"customerId":"\([^"]*\)".*/\1/p') + MY_ID=$(curl -s "$API/customer/me" -H "Authorization: Bearer $CTOK" | + sed -n 's/^{"id":"\([^"]*\)".*/\1/p') + [ -n "$OWNER" ] && [ "$OWNER" = "$MY_ID" ] \ + && ok "order landed on the token's customer ($OWNER), not the body's" \ + || bad "order landed on '$OWNER', expected '$MY_ID'" + + # orderNumber is unique per order, so it identifies the row we just made + # without having to parse nested item ids out of the response. + ORDNUM=$(printf '%s' "$ORD" | sed -n 's/.*"orderNumber":"\([^"]*\)".*/\1/p') + MYORD=$(curl -s "$API/customer/me/orders" -H "Authorization: Bearer $CTOK" | + tr '{' '\n' | grep -F "\"orderNumber\":\"$ORDNUM\"" | + sed -n 's/^"id":"\([^"]*\)".*/\1/p' | head -1) + if [ -n "$MYORD" ]; then + c=$(curl -s -o /dev/null -w '%{http_code}' "$API/orders/$MYORD" -H "Authorization: Bearer $CTOK") + [ "$c" = 200 ] && ok "own order readable -> 200" || bad "own order -> $c (want 200)" + fi + + # Someone else's order and a nonexistent one must be indistinguishable, + # or the status code itself confirms which ids exist. + c=$(curl -s -o /dev/null -w '%{http_code}' "$API/orders/definitely-not-an-order" \ + -H "Authorization: Bearer $CTOK") + [ "$c" = 404 ] && ok "unknown order id -> 404" || bad "unknown order id -> $c (want 404)" + + echo "Admin order read is admin-only:" + c=$(curl -s -o /dev/null -w '%{http_code}' "$API/orders/admin/any" -H "Authorization: Bearer $CTOK") + [ "$c" = 401 ] && ok "customer token on orders/admin/:id -> 401" \ + || bad "customer token on orders/admin/:id -> $c (want 401)" + c=$(curl -s -o /dev/null -w '%{http_code}' "$API/orders/admin/any" -H "Authorization: Bearer $SUPER") + case "$c" in + 401|403) bad "admin token on orders/admin/:id -> $c (guard rejected an admin)" ;; + *) ok "admin token on orders/admin/:id -> $c (through the guard)" ;; + esac + else + printf ' \033[33mSKIP\033[0m no product variant available to order\n' + fi + else + bad "correct code -> $c (want 200)" + fi + else + printf ' \033[33mSKIP\033[0m no OTP line in %s yet\n' "$CODE_LOG" + fi +else + printf ' \033[33mSKIP\033[0m set CODE_LOG=/path/to/api.log to test the full OTP round trip\n' +fi +echo +echo "passed: $pass failed: $fail" +[ "$fail" -eq 0 ] diff --git a/apps/api/scripts/legacy-import/index.ts b/apps/api/scripts/legacy-import/index.ts new file mode 100644 index 0000000..cd37215 --- /dev/null +++ b/apps/api/scripts/legacy-import/index.ts @@ -0,0 +1,161 @@ +/** + * henza (MySQL `oapi`) → gold-bank (PostgreSQL) data import. + * + * The rules live in docs/DATA-MIGRATION-MAP.md; every step cites its section. + * + * Usage (from apps/api): + * + * npx ts-node --transpile-only scripts/legacy-import/index.ts \ + * --source "mysql://user:pass@127.0.0.1:3307/oapi" \ + * --target "postgresql://user:pass@localhost:5432/goldbank_import_test" \ + * [--images "F:/henza/storage" --upload-dir "./storage/uploads"] \ + * [--only customers,ledger] [--report ./legacy-import-report.md] --yes + * + * Safety: + * - The source is only read. Point it at a COPY of production anyway. + * - --target is required and never taken from .env, so the dev database is + * never written by accident. Without --yes nothing is written; a target + * whose name does not contain "import" or "staging" also needs + * --confirm-db=. + * - Re-runnable: every written row is recorded in legacy_import.id_map, so a + * second run updates instead of duplicating, and a run that stops half way + * is finished by running it again. + * - Never writes Customer/Product accounting* columns, ProductVariant.imageId, + * or the Accounting* tables, and never deletes a ProductImage. + * - Writes go straight through Prisma, not through the API services, so no + * SMS is sent and nothing is queued to the accounting software. + */ +import { writeFileSync } from 'node:fs'; +import { resolve } from 'node:path'; +import { PrismaClient } from '@prisma/client'; +import { IdMap, makeContext, openSource, type Ctx, type Options } from './lib/context'; +import { admins, branches, cities, customers, experts, roles, workshops } from './steps/people'; +import { brands, categories, products, variants } from './steps/catalog'; +import { favorites, ledger, orders, preOrders } from './steps/commerce'; +import { reconcile, reconcileSales } from './steps/reconcile'; + +/** Order matters: each step reads the ids the earlier ones mapped. */ +const STEPS: [string, (ctx: Ctx) => Promise][] = [ + ['cities', cities], + ['roles', roles], + ['branches', branches], + ['admins', admins], + ['experts', experts], + ['workshops', workshops], + ['customers', customers], + ['brands', brands], + ['categories', categories], + ['products', products], + ['variants', variants], + ['orders', orders], + ['ledger', ledger], + ['favorites', favorites], + ['preorders', preOrders], + ['reconcile', reconcile], + ['reconcile-sales', reconcileSales], +]; + +const ENTITIES = [ + 'city', 'ut', 'branch', 'admin', 'expert', 'workshop', 'customer', 'file', 'brand', 'category', + 'product', 'pimage', 'variant', 'order', 'orderitem', 'ledger', 'preorder', +]; + +/** Columns the prep migrations added; the import refuses to run without them. */ +const REQUIRED = [ + ['Customer', 'nationalCode'], ['Customer', 'birthDate'], ['Customer', 'cityNameRaw'], + ['Customer', 'verificationRejectionReason'], ['CustomerFavorite', 'customerId'], +]; + +function parseArgs(argv: string[]) { + const a = new Map(); + for (let i = 0; i < argv.length; i++) { + const k = argv[i]; + if (!k.startsWith('--')) continue; + const eq = k.indexOf('='); + if (eq > 0) a.set(k.slice(2, eq), k.slice(eq + 1)); + else if (argv[i + 1] && !argv[i + 1].startsWith('--')) a.set(k.slice(2), argv[++i]); + else a.set(k.slice(2), 'true'); + } + return a; +} + +const fail = (msg: string): never => { + console.error(`\n✖ ${msg}\n`); + process.exit(1); +}; + +async function main() { + const a = parseArgs(process.argv.slice(2)); + const opt: Options = { + sourceUrl: a.get('source') ?? fail('--source is required'), + targetUrl: a.get('target') ?? fail('--target is required (never read from .env)'), + imagesDir: a.get('images'), + uploadDir: a.get('upload-dir'), + only: a.get('only') ? new Set(a.get('only')!.split(',').map((s) => s.trim())) : undefined, + reportPath: resolve(a.get('report') ?? 'legacy-import-report.md'), + }; + if (opt.imagesDir && !opt.uploadDir) fail('--images needs --upload-dir (the target UPLOAD_DIR)'); + if (opt.only) for (const s of opt.only) if (!STEPS.some(([n]) => n === s)) fail(`unknown step "${s}"`); + + const db = new PrismaClient({ datasources: { db: { url: opt.targetUrl } } }); + const src = openSource(opt.sourceUrl); + + try { + /* preflight — read only */ + const [{ db: dbName }] = await db.$queryRawUnsafe<{ db: string }[]>('SELECT current_database() AS db'); + const [srcInfo] = await (await src.query('SELECT DATABASE() AS db, VERSION() AS v'))[0] as { db: string; v: string }[]; + const missing: string[] = []; + for (const [t, c] of REQUIRED) { + const [{ n }] = await db.$queryRawUnsafe<{ n: bigint }[]>( + `SELECT COUNT(*) AS n FROM information_schema.columns WHERE table_schema = 'public' AND table_name = $1 AND column_name = $2`, t, c, + ); + if (Number(n) === 0) missing.push(`${t}.${c}`); + } + const counts = { + customers: await db.customer.count(), + products: await db.product.count(), + ledger: await db.ledgerEntry.count(), + }; + console.log(`source mysql ${srcInfo.v} · database ${srcInfo.db}`); + console.log(`target postgres · database ${dbName} · ${counts.customers} customers, ${counts.products} products, ${counts.ledger} ledger entries`); + if (missing.length) fail(`target is missing ${missing.join(', ')} — apply the prep migrations first`); + + if (a.get('yes') !== 'true') { + console.log('\nNothing written. Re-run with --yes to import.'); + return; + } + if (!/import|staging/i.test(dbName) && a.get('confirm-db') !== dbName) { + fail(`"${dbName}" does not look like a test or staging copy. To write to it anyway add --confirm-db=${dbName}`); + } + + /* run */ + await IdMap.ensureSchema(db); + const ctx = makeContext(opt, src, db); + for (const e of ENTITIES) await ctx.map.load(e); + + for (const [name, step] of STEPS) { + if (opt.only && !opt.only.has(name)) continue; + const t0 = Date.now(); + process.stdout.write(`▸ ${name} … `); + await step(ctx); + console.log(`${((Date.now() - t0) / 1000).toFixed(1)}s`); + } + + const md = ctx.report.render([ + `- started: ${ctx.report.startedAt.toISOString()} · finished: ${new Date().toISOString()}`, + `- source: \`${srcInfo.db}\` (MySQL ${srcInfo.v}) · target: \`${dbName}\``, + `- steps: ${opt.only ? [...opt.only].join(', ') : 'all'}`, + `- images: ${opt.imagesDir ? `${opt.imagesDir} → ${opt.uploadDir}` : 'not copied (no --images)'}`, + ]); + writeFileSync(opt.reportPath, md); + console.log(`\nreport: ${opt.reportPath}`); + } finally { + await src.end(); + await db.$disconnect(); + } +} + +main().catch((e) => { + console.error(e); + process.exit(1); +}); diff --git a/apps/api/scripts/legacy-import/lib/context.ts b/apps/api/scripts/legacy-import/lib/context.ts new file mode 100644 index 0000000..a9ea22b --- /dev/null +++ b/apps/api/scripts/legacy-import/lib/context.ts @@ -0,0 +1,327 @@ +/** + * Shared state for one import run: both connections, the id map and the report. + */ +import { copyFileSync, existsSync, mkdirSync, statSync } from 'node:fs'; +import { join } from 'node:path'; +import { PrismaClient } from '@prisma/client'; +import { createPool, type Pool, type RowDataPacket } from 'mysql2/promise'; + +export interface Options { + sourceUrl: string; + targetUrl: string; + /** henza `storage/` folder holding the image files (optional). */ + imagesDir?: string; + /** Target UPLOAD_DIR the files are copied into (required with imagesDir). */ + uploadDir?: string; + /** Run only these steps (by name); all when unset. */ + only?: Set; + reportPath: string; +} + +/* ───────────── report ───────────── */ + +interface Section { + counts: Map; + notes: string[]; +} + +/** + * What the run did, step by step. Counts say how many rows went which way; + * notes are the things a person must look at. Rendered to markdown at the end. + */ +export class Report { + readonly startedAt = new Date(); + private readonly sections = new Map(); + + private section(step: string): Section { + let s = this.sections.get(step); + if (!s) { + s = { counts: new Map(), notes: [] }; + this.sections.set(step, s); + } + return s; + } + + count(step: string, key: string, n = 1) { + const s = this.section(step); + s.counts.set(key, (s.counts.get(key) ?? 0) + n); + } + + note(step: string, message: string) { + this.section(step).notes.push(message); + } + + get(step: string, key: string): number { + return this.sections.get(step)?.counts.get(key) ?? 0; + } + + render(header: string[]): string { + const out: string[] = ['# henza → gold-bank import report', '', ...header, '']; + for (const [step, s] of this.sections) { + out.push(`## ${step}`, ''); + if (s.counts.size) { + out.push('| | |', '|---|---:|'); + for (const [k, v] of s.counts) out.push(`| ${k} | ${v} |`); + out.push(''); + } + for (const n of s.notes) out.push(`- ${n}`); + if (s.notes.length) out.push(''); + } + return out.join('\n'); + } +} + +/* ───────────── id map ───────────── */ + +/** + * Legacy id -> target id, per entity, persisted in the TARGET database under + * its own schema `legacy_import` — outside the `public` schema Prisma manages, + * so it is no app-schema change and drops cleanly after cutover + * (`DROP SCHEMA legacy_import CASCADE`). + * + * It is what makes a re-run safe (a mapped row is updated, never re-created) + * and what later redirects old links such as /product/123 (GO-LIVE-PLAN §7). + * `how` records whether the row was created by the import or matched to a row + * that already existed in the target (merge, §10.5). + */ +export type How = 'created' | 'matched' | 'merged'; + +export class IdMap { + private readonly cache = new Map>(); + + constructor(private readonly db: PrismaClient) {} + + static async ensureSchema(db: PrismaClient) { + await db.$executeRawUnsafe(`CREATE SCHEMA IF NOT EXISTS legacy_import`); + await db.$executeRawUnsafe(` + CREATE TABLE IF NOT EXISTS legacy_import.id_map ( + entity text NOT NULL, + legacy_id text NOT NULL, + target_id text NOT NULL, + how text NOT NULL, + mapped_at timestamptz NOT NULL DEFAULT now(), + PRIMARY KEY (entity, legacy_id) + )`); + } + + async load(entity: string) { + const rows = await this.db.$queryRawUnsafe<{ legacy_id: string; target_id: string; how: How }[]>( + `SELECT legacy_id, target_id, how FROM legacy_import.id_map WHERE entity = $1`, + entity, + ); + this.cache.set(entity, new Map(rows.map((r) => [r.legacy_id, { target: r.target_id, how: r.how }]))); + } + + get(entity: string, legacyId: unknown): string | undefined { + if (legacyId === null || legacyId === undefined) return undefined; + return this.cache.get(entity)?.get(String(legacyId))?.target; + } + + how(entity: string, legacyId: unknown): How | undefined { + return this.cache.get(entity)?.get(String(legacyId))?.how; + } + + async set(entity: string, legacyId: unknown, targetId: string, how: How) { + const key = String(legacyId); + await this.db.$executeRawUnsafe( + `INSERT INTO legacy_import.id_map (entity, legacy_id, target_id, how) + VALUES ($1, $2, $3, $4) + ON CONFLICT (entity, legacy_id) DO UPDATE SET target_id = EXCLUDED.target_id, how = EXCLUDED.how`, + entity, key, targetId, how, + ); + let m = this.cache.get(entity); + if (!m) { + m = new Map(); + this.cache.set(entity, m); + } + m.set(key, { target: targetId, how }); + } + + async drop(entity: string, legacyId: unknown) { + await this.db.$executeRawUnsafe( + `DELETE FROM legacy_import.id_map WHERE entity = $1 AND legacy_id = $2`, + entity, String(legacyId), + ); + this.cache.get(entity)?.delete(String(legacyId)); + } +} + +/* ───────────── upsert discipline ───────────── */ + +/** + * The one way a step writes a row (§10.5: this is a MERGE into a live target): + * + * - already mapped -> `update(id, how)`; the step decides what it may touch + * - matches a target row -> mapped as 'matched', then `update(id, 'matched')` + * - otherwise -> `create()`, mapped as 'created' + * + * A mapping whose target row has since been deleted is dropped and redone, so a + * re-run heals instead of failing on a dangling id. + */ +export async function upsert( + ctx: Ctx, + entity: string, + legacyId: unknown, + ops: { + exists: (id: string) => Promise; + find: () => Promise<{ id: string } | null>; + create: () => Promise<{ id: string }>; + update: (id: string, how: How) => Promise; + }, +): Promise<{ id: string; how: How; isNew: boolean }> { + const mapped = ctx.map.get(entity, legacyId); + if (mapped) { + if (await ops.exists(mapped)) { + const how = ctx.map.how(entity, legacyId) ?? 'created'; + await ops.update(mapped, how); + return { id: mapped, how, isNew: false }; + } + await ctx.map.drop(entity, legacyId); + } + const found = await ops.find(); + if (found) { + await ctx.map.set(entity, legacyId, found.id, 'matched'); + await ops.update(found.id, 'matched'); + return { id: found.id, how: 'matched', isNew: false }; + } + const created = await ops.create(); + await ctx.map.set(entity, legacyId, created.id, 'created'); + return { id: created.id, how: 'created', isNew: true }; +} + +/** + * For a row that already existed in the target (`matched`): only the fields + * the target left empty are filled. The target's own values win — the owner + * confirmed its data is real (§10.5). + */ +export function fillEmpty>(current: Record, patch: T): Partial { + const out: Partial = {}; + for (const [k, v] of Object.entries(patch)) { + const cur = current[k]; + if ((cur === null || cur === undefined || cur === '') && v !== null && v !== undefined) { + (out as Record)[k] = v; + } + } + return out; +} + +/* ───────────── context ───────────── */ + +export interface Ctx { + src: Pool; + db: PrismaClient; + map: IdMap; + report: Report; + opt: Options; + /** A read-only query against the legacy MySQL. */ + q>(sql: string, params?: unknown[]): Promise; + /** Public URL for a legacy `image` row, copying its file when a source dir is given. */ + imageUrl(imageId: unknown, step: string): Promise; + /** + * An `UploadedFile` row for a legacy image — what avatars point at + * (Customer/AdminUser.avatarFileId are FKs, not URLs). Mapped as 'file'. + */ + uploadedFile(imageId: unknown, purpose: string, step: string): Promise; +} + +const MIME: Record = { + png: 'image/png', jpg: 'image/jpeg', jpeg: 'image/jpeg', gif: 'image/gif', + webp: 'image/webp', svg: 'image/svg+xml', pdf: 'application/pdf', +}; + +export function openSource(url: string): Pool { + return createPool({ + uri: url, + connectionLimit: 4, + charset: 'utf8mb4', + // Timestamps come back as the wall-clock text legacy stored, and are + // converted from Tehran time explicitly (normalize.tehran). The session + // time zone is left at the server's own, which is what Laravel and the + // Navicat dump both used. + dateStrings: true, + supportBigNumbers: true, + bigNumberStrings: true, + }); +} + +export function makeContext(opt: Options, src: Pool, db: PrismaClient): Ctx { + const map = new IdMap(db); + const report = new Report(); + const imageRows = new Map(); + + const ctx: Ctx = { + src, + db, + map, + report, + opt, + async q(sql: string, params: unknown[] = []) { + const [rows] = await src.query(sql, params); + return rows as unknown as T[]; + }, + async imageUrl(imageId: unknown, step: string) { + if (imageId === null || imageId === undefined || imageId === '') return null; + const key = String(imageId); + if (!imageRows.has(key)) { + const [row] = await ctx.q<{ image: string | null }>('SELECT image FROM image WHERE id = ?', [key]); + imageRows.set(key, row?.image ? String(row.image).trim() : null); + } + const file = imageRows.get(key); + if (!file) { + report.count(step, 'image reference with no `image` row'); + return null; + } + copyImage(ctx, file, step); + // Same shape the admin upload writes (admin-uploads.service.ts:61). + return `/uploads/${file}`; + }, + async uploadedFile(imageId: unknown, purpose: string, step: string) { + if (imageId === null || imageId === undefined || imageId === '') return null; + // Resolve first even when mapped: resolving copies the file (see productImages). + const url = await ctx.imageUrl(imageId, step); + const mapped = map.get('file', imageId); + if (mapped) return mapped; + if (!url) return null; + const [row] = await ctx.q<{ original_name: string | null; ext: string | null }>( + 'SELECT original_name, ext FROM image WHERE id = ?', [String(imageId)], + ); + const file = url.slice('/uploads/'.length); + const ext = (row?.ext ?? file.split('.').pop() ?? '').toLowerCase().trim(); + const src = ctx.opt.imagesDir ? join(ctx.opt.imagesDir, file) : null; + const created = await db.uploadedFile.create({ + data: { + url, + originalName: (row?.original_name ?? '').trim() || file, + mimeType: MIME[ext] ?? 'application/octet-stream', + sizeBytes: src && existsSync(src) ? statSync(src).size : 0, + purpose, + }, + }); + await map.set('file', imageId, created.id, 'created'); + return created.id; + }, + }; + return ctx; +} + +const copied = new Set(); + +function copyImage(ctx: Ctx, file: string, step: string) { + const { imagesDir, uploadDir } = ctx.opt; + if (!imagesDir || !uploadDir || copied.has(file)) return; + copied.add(file); + const from = join(imagesDir, file); + const to = join(uploadDir, file); + if (existsSync(to)) { + ctx.report.count('images', 'already in upload dir'); + return; + } + if (!existsSync(from) || !statSync(from).isFile()) { + ctx.report.count('images', 'missing in henza storage'); + ctx.report.note('images', `missing file ${file} (referenced from ${step})`); + return; + } + mkdirSync(uploadDir, { recursive: true }); + copyFileSync(from, to); + ctx.report.count('images', 'copied'); +} diff --git a/apps/api/scripts/legacy-import/lib/normalize.ts b/apps/api/scripts/legacy-import/lib/normalize.ts new file mode 100644 index 0000000..6c39d65 --- /dev/null +++ b/apps/api/scripts/legacy-import/lib/normalize.ts @@ -0,0 +1,204 @@ +/** + * Value conversion from the henza MySQL schema to the Prisma one. + * + * Every helper here is pure, so the rules can be read and tested in isolation. + * Each rule is the one recorded in docs/DATA-MIGRATION-MAP.md. + */ +import { Prisma } from '@prisma/client'; + +const PERSIAN_DIGITS = '۰۱۲۳۴۵۶۷۸۹'; +const ARABIC_DIGITS = '٠١٢٣٤٥٦٧٨٩'; + +/** Persian/Arabic-Indic digits -> ASCII. Legacy did the same (Utility::faTOen). */ +export function latinDigits(s: string): string { + return s.replace(/[۰-۹٠-٩]/g, (d) => { + const i = PERSIAN_DIGITS.indexOf(d); + return String(i >= 0 ? i : ARABIC_DIGITS.indexOf(d)); + }); +} + +/** + * Persian text as stored: trimmed, single spaces, and Arabic ي/ك folded to + * Persian ی/ک. Empty -> null, so '' never reaches a nullable target column. + */ +export function text(v: unknown): string | null { + if (v === null || v === undefined) return null; + const s = String(v) + .replace(/ي/g, 'ی') + .replace(/ك/g, 'ک') + .replace(/\s+/g, ' ') + .trim(); + return s === '' ? null : s; +} + +/** + * Comparison key for matching names across systems. Also drops the zero-width + * non-joiner, which legacy typed inconsistently ("مدیر اصلی" vs "مدیراصلی"). + * The ي/ك fold alone raised exact city matches from 32 to 72 (§10.4). + */ +export function matchKey(v: unknown): string | null { + const t = text(v); + return t === null ? null : t.replace(/‌/g, '').replace(/\s/g, '').toLowerCase(); +} + +/** Mobile as the login key: ASCII digits only, or null. */ +export function mobile(v: unknown): string | null { + if (v === null || v === undefined) return null; + const d = latinDigits(String(v)).replace(/\D/g, ''); + return d === '' ? null : d; +} + +function num(v: unknown): number { + if (v === null || v === undefined || v === '') return 0; + const n = Number(v); + return Number.isFinite(n) ? n : 0; +} + +/** + * Legacy stores money and weight as `double` (§4). Going through toFixed at the + * target scale drops the binary noise (12.3 is really 12.30000000000000071…) + * exactly as Decimal(14,4) would, so a reconciliation can compare like with like. + */ +export const grams = (v: unknown) => new Prisma.Decimal(num(v).toFixed(4)); +export const rial = (v: unknown) => new Prisma.Decimal(num(v).toFixed(2)); +export const percent = (v: unknown) => new Prisma.Decimal(num(v).toFixed(3)); +export const isZero = (v: unknown) => Math.abs(num(v)) < 0.00005; +export const toNumber = num; + +/** Integer or null — for tinyint flags and ids that may arrive as strings. */ +export function int(v: unknown): number | null { + if (v === null || v === undefined || v === '') return null; + const n = Number(v); + return Number.isInteger(n) ? n : null; +} + +/* ───────────── time ───────────── */ + +/** + * The Laravel app ran with timezone 'Asia/Tehran' (henza_server config/app.php:70), + * so every timestamp is Tehran wall-clock time. Read as a UTC instant it would + * be 3:30 (4:30 under the pre-2022 summer time) off, moving evening documents + * to the next day on a statement. The ICU zone rules know Iran's historical + * DST, so the offset is taken from them per instant rather than hard-coded. + */ +const tehranFormat = new Intl.DateTimeFormat('en-US', { + timeZone: 'Asia/Tehran', + hourCycle: 'h23', + year: 'numeric', + month: '2-digit', + day: '2-digit', + hour: '2-digit', + minute: '2-digit', + second: '2-digit', +}); + +function tehranOffsetMs(utcMs: number): number { + const p: Record = {}; + for (const part of tehranFormat.formatToParts(new Date(utcMs))) p[part.type] = part.value; + const asUtc = Date.UTC(+p.year, +p.month - 1, +p.day, +p.hour, +p.minute, +p.second); + return asUtc - utcMs; +} + +const WALL = /^(\d{4})-(\d{2})-(\d{2})(?:[ T](\d{2}):(\d{2}):(\d{2}))?/; + +/** 'YYYY-MM-DD HH:MM:SS' in Tehran wall-clock time -> the UTC instant. */ +export function tehran(v: unknown): Date | null { + if (v === null || v === undefined || v === '') return null; + const m = WALL.exec(String(v)); + if (!m || m[1] === '0000') return null; + const wall = Date.UTC(+m[1], +m[2] - 1, +m[3], +(m[4] ?? 0), +(m[5] ?? 0), +(m[6] ?? 0)); + // Two passes: the offset at the guessed instant can differ across a DST edge. + let utc = wall - tehranOffsetMs(wall); + utc = wall - tehranOffsetMs(utc); + return new Date(utc); +} + +/** + * Birthdays (owner ruling 2026-10-07, §10.7): of 915 set values only 541 are + * real. Dropped: the sign-up default (birth date == sign-up date, 190 rows) and + * the impossible ones (a time of day, or born after 2008; 184 rows). A + * birthday is a calendar date, so it is kept as UTC midnight of that date. + */ +export function birthday(birth: unknown, signup: unknown): Date | null { + const b = WALL.exec(String(birth ?? '')); + if (!b) return null; + if ((b[4] ?? '00') !== '00' || (b[5] ?? '00') !== '00' || (b[6] ?? '00') !== '00') return null; + if (+b[1] > 2008 || +b[1] < 1900) return null; + const s = WALL.exec(String(signup ?? '')); + if (s && s[1] === b[1] && s[2] === b[2] && s[3] === b[3]) return null; + return new Date(Date.UTC(+b[1], +b[2] - 1, +b[3])); +} + +/* ───────────── Jalali dates ───────────── */ + +/** + * `cashes.recive_date` is a varchar holding a Jalali date ("1403/05/12"; 88 of + * 89 values start with 14). This is the standard jalaali-js arithmetic + * (Borkowski), inlined so the tool needs no extra dependency. + * + * Its integer division TRUNCATES toward zero. Math.floor is not a substitute: + * g2d's (gm - 8) / 6 is negative for March, and flooring it shifted every + * converted date by a year. + */ +const div = (a: number, b: number) => Math.trunc(a / b); +const mod = (a: number, b: number) => a - Math.trunc(a / b) * b; + +function jalCal(jy: number) { + const breaks = [-61, 9, 38, 199, 426, 686, 756, 818, 1111, 1181, 1210, 1635, 2060, 2097, 2192, 2262, 2324, 2394, 2456, 3178]; + const gy = jy + 621; + let leapJ = -14; + let jp = breaks[0]; + let jump = 0; + for (let i = 1; i < breaks.length; i++) { + const jm = breaks[i]; + jump = jm - jp; + if (jy < jm) break; + leapJ += div(jump, 33) * 8 + div(mod(jump, 33), 4); + jp = jm; + } + const n = jy - jp; + leapJ += div(n, 33) * 8 + div(mod(n, 33) + 3, 4); + if (mod(jump, 33) === 4 && jump - n === 4) leapJ += 1; + const leapG = div(gy, 4) - div((div(gy, 100) + 1) * 3, 4) - 150; + return { gy, march: 20 + leapJ - leapG }; +} + +function g2d(gy: number, gm: number, gd: number) { + const d = + div((gy + div(gm - 8, 6) + 100100) * 1461, 4) + + div(153 * mod(gm + 9, 12) + 2, 5) + + gd - 34840408; + return d - div(div(gy + 100100 + div(gm - 8, 6), 100) * 3, 4) + 752; +} + +function d2g(jdn: number) { + let j = 4 * jdn + 139361631; + j = j + div(div(4 * jdn + 183187720, 146097) * 3, 4) * 4 - 3908; + const i = div(mod(j, 1461), 4) * 5 + 308; + const gd = div(mod(i, 153), 5) + 1; + const gm = mod(div(i, 153), 12) + 1; + const gy = div(j, 1461) - 100100 + div(8 - gm, 6); + return { gy, gm, gd }; +} + +/** Jalali y/m/d -> Gregorian y/m/d. */ +export function jalaliToGregorian(jy: number, jm: number, jd: number) { + const r = jalCal(jy); + const jdn = g2d(r.gy, 3, r.march) + (jm - 1) * 31 - div(jm, 7) * (jm - 7) + jd - 1; + return d2g(jdn); +} + +/** + * A free-text Jalali date ("1403/5/12", "۱۴۰۳-۰۵-۱۲") -> UTC midnight of the + * same day, or null when it does not parse. Callers keep the raw text too. + */ +export function jalaliDate(v: unknown): Date | null { + const s = latinDigits(String(v ?? '')).trim(); + const m = /^(1[34]\d{2})\D(\d{1,2})\D(\d{1,2})$/.exec(s); + if (!m) return null; + const jm = +m[2]; + const jd = +m[3]; + if (jm < 1 || jm > 12 || jd < 1 || jd > 31) return null; + const g = jalaliToGregorian(+m[1], jm, jd); + return new Date(Date.UTC(g.gy, g.gm - 1, g.gd)); +} diff --git a/apps/api/scripts/legacy-import/steps/catalog.ts b/apps/api/scripts/legacy-import/steps/catalog.ts new file mode 100644 index 0000000..fa025d2 --- /dev/null +++ b/apps/api/scripts/legacy-import/steps/catalog.ts @@ -0,0 +1,241 @@ +/** + * Catalogue: brands, categories, products, variants and product images. + * Rules: docs/DATA-MIGRATION-MAP.md §9, §10.5. + * + * Which rows: every live product/variant, PLUS every soft-deleted variant (and + * its product) that a live order line still points at. 473 of the 610 live + * order lines reference a deleted variant; OrderItem.productVariantId is + * required, so without those the order history would lose most of its lines. + * They come over with isActive = false, so the shop never shows them. + * + * ProductVariant.imageId is never written (PROTECTED.md §B), and no + * ProductImage is ever deleted: the variant FK is onDelete SetNull, so a + * delete-and-recreate would silently clear every admin-picked variant image. + */ +import { ProductImageRole, Prisma } from '@prisma/client'; +import { fillEmpty, upsert, type Ctx } from '../lib/context'; +import { grams, int, isZero, matchKey, percent, tehran, text } from '../lib/normalize'; + +type Row = Record; + +const LIVE_ORDER_LINES = ` + SELECT oi.variant_id FROM order_items oi + JOIN orders o ON o.id = oi.order_id AND o.deleted_at IS NULL + WHERE oi.deleted_at IS NULL AND oi.variant_id IS NOT NULL`; + +export async function brands(ctx: Ctx) { + const S = 'brands'; + const rows = await ctx.q( + `SELECT * FROM product_brand WHERE deleted_at IS NULL + OR id IN (SELECT brand_id FROM product WHERE brand_id IS NOT NULL)`, + ); + const existing = await ctx.db.brand.findMany(); + for (const r of rows) { + const title = text(r.title); + if (!title) continue; + const res = await upsert(ctx, 'brand', r.id, { + exists: async (id) => !!(await ctx.db.brand.findUnique({ where: { id } })), + find: async () => existing.find((b) => matchKey(b.title) === matchKey(title)) ?? null, + create: () => ctx.db.brand.create({ data: { title } }), + update: async (id, how) => { + if (how === 'created') await ctx.db.brand.update({ where: { id }, data: { title } }); + }, + }); + ctx.report.count(S, res.isNew ? 'created' : 'matched/updated'); + } +} + +export async function categories(ctx: Ctx) { + const S = 'categories'; + const rows = await ctx.q('SELECT * FROM category_collection WHERE deleted_at IS NULL'); + const existing = await ctx.db.category.findMany(); + + for (const r of rows) { + const title = text(r.title); + if (!title) continue; + const type = int(r.type) ?? 1; + // The port's mapping (admin-categories.service.ts:75-80): image, icon, + // meta -> metaTag, body_html -> description. + const data = { + title, + type, + imageUrl: await ctx.imageUrl(r.image_id ?? r.image_id_id, S), + iconUrl: await ctx.imageUrl(r.icon_id, S), + metaTag: text(r.meta), + description: text(r.body_html), + }; + const res = await upsert(ctx, 'category', r.id, { + exists: async (id) => !!(await ctx.db.category.findUnique({ where: { id } })), + // Same title in the same tree (site / app) is the same category. + find: async () => existing.find((c) => matchKey(c.title) === matchKey(title) && c.type === type) ?? null, + create: () => ctx.db.category.create({ data }), + update: async (id, how) => { + if (how === 'created') { + await ctx.db.category.update({ where: { id }, data }); + } else { + const cur = await ctx.db.category.findUniqueOrThrow({ where: { id } }); + const patch = fillEmpty(cur, data); + if (Object.keys(patch).length) await ctx.db.category.update({ where: { id }, data: patch }); + } + }, + }); + ctx.report.count(S, res.isNew ? 'created' : res.how === 'matched' ? 'matched existing' : 'updated'); + } + + // Second pass, once every category has an id: the parent links. + for (const r of rows) { + const id = ctx.map.get('category', r.id); + if (!id || r.parent_id_id === null) continue; + const parentId = ctx.map.get('category', r.parent_id_id); + if (!parentId) { + ctx.report.count(S, 'parent not migrated (deleted in legacy) — left at top level'); + continue; + } + if (ctx.map.how('category', r.id) !== 'matched') { + await ctx.db.category.update({ where: { id }, data: { parentId } }); + } + } +} + +export async function products(ctx: Ctx) { + const S = 'products'; + const rows = await ctx.q( + `SELECT * FROM product + WHERE deleted_at IS NULL + OR id IN (SELECT v.product_id_id FROM products_productvarient v WHERE v.id IN (${LIVE_ORDER_LINES}))`, + ); + + // Legacy links products to categories many-to-many (category_collect) and + // keeps TWO trees: type 1 = site, type 2 = app (admin-categories.service.ts:12). + // Every product with more than one category (1,250) is simply in both trees. + // The target keeps one categoryId, which the app shows and links to + // (user-app-v2 SingleProduct.vue:228), so the APP category is the one kept; + // the site one only when the product has no app category. + const links = await ctx.q( + `SELECT cc.product_id_id AS pid, cc.collection_id_id AS cid, c.type AS ctype FROM category_collect cc + JOIN category_collection c ON c.id = cc.collection_id_id AND c.deleted_at IS NULL + WHERE cc.deleted_at IS NULL ORDER BY cc.position, cc.id`, + ); + const chosenCategory = new Map(); + const categoryCount = new Map(); + for (const l of links) { + const pid = String(l.pid); + const app = int(l.ctype) === 2; + categoryCount.set(pid, (categoryCount.get(pid) ?? 0) + 1); + const cur = chosenCategory.get(pid); + if (!cur || (app && !cur.app)) chosenCategory.set(pid, { cid: String(l.cid), app }); + } + + for (const r of rows) { + const title = text(r.title) ?? `محصول ${String(r.id)}`; + const deleted = r.deleted_at !== null; + const code = text(r.product_code); + const data = { + title, + description: text(r.body_html), + categoryId: ctx.map.get('category', chosenCategory.get(String(r.id))?.cid) ?? null, + brandId: ctx.map.get('brand', r.brand_id) ?? null, + productCode: code, + showType: int(r.show_type) ?? 3, + isActive: !deleted && int(r.is_active) === 1, + }; + const chosen = chosenCategory.get(String(r.id)); + if (!chosen) ctx.report.count(S, 'no live category'); + else if ((categoryCount.get(String(r.id)) ?? 0) > 1) ctx.report.count(S, `in several legacy categories — ${chosen.app ? 'app' : 'site'} category kept`); + if (int(r.disabled) === 1) ctx.report.count(S, 'legacy `disabled` = 1 (not represented; port ignores it too)'); + + const res = await upsert(ctx, 'product', r.id, { + exists: async (id) => !!(await ctx.db.product.findUnique({ where: { id } })), + find: async () => (code ? ctx.db.product.findUnique({ where: { productCode: code }, select: { id: true } }) : null), + create: () => ctx.db.product.create({ data: { ...data, createdAt: tehran(r.created_at) ?? undefined } }), + update: async (id, how) => { + // Never accountingStock* (D27): not in `data`. + if (how === 'created') { + await ctx.db.product.update({ where: { id }, data }); + } else { + const cur = await ctx.db.product.findUniqueOrThrow({ where: { id } }); + const patch = fillEmpty(cur, data); + if (Object.keys(patch).length) await ctx.db.product.update({ where: { id }, data: patch }); + } + }, + }); + ctx.report.count(S, `${res.isNew ? 'created' : res.how === 'matched' ? 'matched existing' : 'updated'}${deleted ? ' (deleted in legacy, kept inactive for order history)' : ''}`); + if (res.how !== 'matched') await productImages(ctx, r, res.id); + } +} + +/** + * The port's image roles (admin-products.service.ts:185-188): + * indicator_id -> FEATURED, mobile_pic -> FEATURED_MOBILE; the gallery is + * products_productimage. Only for products the import created — a product the + * target already had keeps exactly the images it has. + */ +async function productImages(ctx: Ctx, p: Row, productId: string) { + const S = 'product images'; + const add = async (key: string, imageId: unknown, role: ProductImageRole, sortOrder: number) => { + // Resolved even when the row exists, because resolving is what copies the + // file: a first run without --images followed by one with it must still + // bring the files over. + const url = await ctx.imageUrl(imageId, S); + if (!url || ctx.map.get('pimage', key)) return; + const img = await ctx.db.productImage.create({ data: { productId, url, role, sortOrder } }); + await ctx.map.set('pimage', key, img.id, 'created'); + ctx.report.count(S, role); + }; + await add(`featured:${String(p.id)}`, p.indicator_id_id, ProductImageRole.FEATURED, 0); + await add(`mobile:${String(p.id)}`, p.mobile_pic_id, ProductImageRole.FEATURED_MOBILE, 0); + const gallery = await ctx.q( + 'SELECT id, image_id FROM products_productimage WHERE deleted_at IS NULL AND product_id = ? ORDER BY id', + [p.id], + ); + let i = 1; + for (const g of gallery) await add(`gallery:${String(g.id)}`, g.image_id, ProductImageRole.GALLERY, i++); +} + +export async function variants(ctx: Ctx) { + const S = 'variants'; + const rows = await ctx.q( + `SELECT * FROM products_productvarient + WHERE deleted_at IS NULL OR id IN (${LIVE_ORDER_LINES})`, + ); + for (const r of rows) { + const productId = ctx.map.get('product', r.product_id_id); + if (!productId) { + ctx.report.count(S, 'skipped: product not migrated'); + continue; + } + const deleted = r.deleted_at !== null; + let sku = text(r.barcode); + if (sku) { + const clash = await ctx.db.productVariant.findUnique({ where: { sku }, select: { id: true } }); + if (clash && clash.id !== ctx.map.get('variant', r.id)) { + ctx.report.count(S, 'barcode already used by another variant — sku left empty'); + sku = null; + } + } + // `Inventory` (capital I in the source column, §9) is legacy's stock count; + // `qty` is what the port reads, so that is what is carried. + const data: Prisma.ProductVariantUncheckedUpdateInput = { + productId, + title: text(r.title) ?? '-', + sku, + rashWeightGrams: grams(r.grams), + defaultWagePercent: percent(r.percentage_pay), + qty: int(r.qty) ?? 0, + isPreOrder: int(r.is_pre_order) === 1, + isActive: !deleted && int(r.is_active) === 1, + // imageId: deliberately absent — PROTECTED.md §B. + }; + if (!isZero(r.rial_pay)) ctx.report.count(S, 'rial charge (rial_pay) not carried — no target field'); + + const res = await upsert(ctx, 'variant', r.id, { + exists: async (id) => !!(await ctx.db.productVariant.findUnique({ where: { id } })), + find: async () => (sku ? ctx.db.productVariant.findUnique({ where: { sku }, select: { id: true } }) : null), + create: () => ctx.db.productVariant.create({ data: data as Prisma.ProductVariantUncheckedCreateInput }), + update: async (id, how) => { + if (how === 'created') await ctx.db.productVariant.update({ where: { id }, data }); + }, + }); + ctx.report.count(S, `${res.isNew ? 'created' : res.how === 'matched' ? 'matched existing (left as is)' : 'updated'}${deleted ? ' (deleted in legacy, inactive)' : ''}`); + } +} diff --git a/apps/api/scripts/legacy-import/steps/commerce.ts b/apps/api/scripts/legacy-import/steps/commerce.ts new file mode 100644 index 0000000..03e6f28 --- /dev/null +++ b/apps/api/scripts/legacy-import/steps/commerce.ts @@ -0,0 +1,429 @@ +/** + * Orders, the ledger, favourites and custom orders. + * Rules: docs/DATA-MIGRATION-MAP.md §7, §8, §10, §10.7. + */ +import { + LedgerCurrency, + LedgerDirection, + LedgerSourceType, + OrderChannel, + OrderStatus, + PreOrderStatus, + Prisma, +} from '@prisma/client'; +import { upsert, type Ctx } from '../lib/context'; +import { grams, int, jalaliDate, percent, rial, tehran, text, toNumber } from '../lib/normalize'; + +type Row = Record; +const D = Prisma.Decimal; + +/** Order::$STS (Order.php:66-74). 7 «کنسل شده» is commented out in legacy and absent from the data. */ +const ORDER_STATUS: Record = { + 0: OrderStatus.SUSPENDED, + 1: OrderStatus.PLACED, + 2: OrderStatus.ADMIN_APPROVED, + 3: OrderStatus.SOURCING, + 4: OrderStatus.PREPARING, + 5: OrderStatus.DELIVERED_TO_AGENT, + 6: OrderStatus.DELIVERED_TO_CUSTOMER, +}; + +/* ───────────── orders ───────────── */ + +export async function orders(ctx: Ctx) { + const S = 'orders'; + // Wholesale only. Retail `orders_orders` is deferred by the owner (§7.2) and + // must not be mapped with this status table: its 7 means «تحویل مشتری». + const rows = await ctx.q('SELECT * FROM orders WHERE deleted_at IS NULL'); + for (const r of rows) { + const customerId = ctx.map.get('customer', r.customer_id); + if (!customerId) { + ctx.report.count(S, 'skipped: customer not migrated'); + ctx.report.note(S, `legacy order #${String(r.id)} skipped: its customer #${String(r.customer_id)} was not migrated (status ${String(r.sts)})`); + continue; + } + const sts = int(r.sts); + const status = sts !== null ? ORDER_STATUS[sts] : undefined; + if (!status) { + ctx.report.count(S, 'skipped: unknown status'); + ctx.report.note(S, `legacy order #${String(r.id)} has status ${String(r.sts)}, which has no mapping`); + continue; + } + const orderNumber = `H-${String(r.id)}`; + // `orders.reagent_id` is the expert the order was credited to when it was + // placed (never moved afterwards) — carried as is, NOT re-derived from the + // customer's current referrer (owner ruling 2026-10-08). It names a + // Customer row in legacy: an expert maps to their AdminUser; anyone else + // (one customer, 17 orders from 2022) is kept as the referrer customer. + let salesAgentId: string | null = null; + let referrerCustomerId: string | null = null; + if (r.reagent_id !== null) { + salesAgentId = ctx.map.get('expert', r.reagent_id) ?? null; + if (!salesAgentId) referrerCustomerId = ctx.map.get('customer', r.reagent_id) ?? null; + if (!salesAgentId && !referrerCustomerId) { + ctx.report.count(S, 'placing expert not migrated — left empty'); + ctx.report.note(S, `legacy order #${String(r.id)}: its reagent #${String(r.reagent_id)} was not migrated`); + } else { + ctx.report.count(S, salesAgentId ? 'credited to its legacy expert' : 'credited to its legacy referrer customer'); + } + } + const data = { + salesAgentId, + referrerCustomerId, + customerId, + channel: OrderChannel.WHOLESALE, + status, + // `input` is what legacy debits (CustomerController::updateRemain) and + // equals `w` on all 300 live orders; `wage` is the making-charge part of it. + totalGoldWeightGrams: grams(r.input), + wageWeightGrams: grams(r.wage), + flatRialCharge: rial(r.rial_input), + // Legacy 0 «معلق» is the over-credit-limit hold. + isSuspendedOverCreditLimit: sts === 0, + // Legacy records no delivery time; the last change of a delivered order is the best available. + deliveredAt: sts === 6 ? tehran(r.updated_at) : null, + }; + const res = await upsert(ctx, 'order', r.id, { + exists: async (id) => !!(await ctx.db.order.findUnique({ where: { id } })), + find: () => ctx.db.order.findUnique({ where: { orderNumber }, select: { id: true } }), + create: () => ctx.db.order.create({ data: { ...data, orderNumber, createdAt: tehran(r.created_at) ?? undefined } }), + update: async (id, how) => { + if (how === 'created') await ctx.db.order.update({ where: { id }, data }); + }, + }); + ctx.report.count(S, `${res.isNew ? 'created' : 'updated'} — ${status}`); } + await orderItems(ctx); +} + +async function orderItems(ctx: Ctx) { + const S = 'order lines'; + const rows = await ctx.q( + `SELECT oi.* FROM order_items oi JOIN orders o ON o.id = oi.order_id AND o.deleted_at IS NULL + WHERE oi.deleted_at IS NULL`, + ); + for (const r of rows) { + const orderId = ctx.map.get('order', r.order_id); + if (!orderId) continue; + const productVariantId = ctx.map.get('variant', r.variant_id); + if (!productVariantId) { + ctx.report.count(S, 'skipped: variant not migrated'); + ctx.report.note(S, `legacy order line #${String(r.id)} (order #${String(r.order_id)}) lost: variant #${String(r.variant_id)} not found`); + continue; + } + const data = { + orderId, + productVariantId, + quantity: int(r.qty) ?? 1, + rashWeightGramsSnapshot: grams(r.rash_weight), + wagePercentSnapshot: percent(r.percent), + discountPercentSnapshot: percent(r.discount), + computedWeightGrams: grams(r.w), + flatRialCharge: rial(r.rial_pay), + }; + const res = await upsert(ctx, 'orderitem', r.id, { + exists: async (id) => !!(await ctx.db.orderItem.findUnique({ where: { id } })), + find: async () => null, + create: () => ctx.db.orderItem.create({ data }), + update: async (id) => { + await ctx.db.orderItem.update({ where: { id }, data }); + }, + }); + ctx.report.count(S, res.isNew ? 'created' : 'updated'); + // §7.4: the target keeps one snapshot; legacy's audit pair is lost. + if (toNumber(r.original_rash_weight) !== toNumber(r.rash_weight) || toNumber(r.original_percent) !== toNumber(r.percent)) { + ctx.report.count(S, 'weight or wage edited after ordering (original_* not carried)'); + } + } +} + +/* ───────────── ledger ───────────── */ + +/** Cash::$TYPES (Major/Cash.php:56-62). Type 9 «سفارش» is handled from `orders`. */ +const CASH_SOURCE: Record = { + 1: LedgerSourceType.REPAYMENT_MELTED_GOLD, + 2: LedgerSourceType.REPAYMENT_TRANSFER, + 3: LedgerSourceType.REPAYMENT_CHEQUE, + 4: LedgerSourceType.REPAYMENT_CASH, +}; + +/** Grams per mesghal. Legacy's price_per_gram is per mesghal (CashController.php:68). */ +const MESGHAL = 4.331802; + +/** + * Legacy debt is COMPUTED, never posted (CustomerController::updateRemain): + * + * remain = Σ orders.input (sts > 4) − Σ cashes.value (confirmed, type 1–4) + * rial_remain = Σ orders.rial_input (sts > 4) + * + * so the ledger is rebuilt from exactly those rows. Recomputing that formula on + * the 2026-10-04 dump reproduces the stored balance for 1,590 of 1,591 + * customers to 0.0001 g (§10.7). Consequences: + * - `cashes` type 9 («سفارش») is NOT carried: it mirrors an order, and the + * order already posts that debt. Both would count it twice. + * - Rials paid (types 3/4 `price`) never reduce rial debt; a cash payment is + * converted to gold (`value`) and reduces the gold debt. Kept as is. + * - A balance the records cannot explain (customer #125: −9.8951 g, set by + * hand after its only document was deleted) is carried as an explicit + * ADJUSTMENT entry, so the customer sees the same number (owner, 2026-10-07). + */ +export async function ledger(ctx: Ctx) { + const S = 'ledger'; + const entry = async (key: string, data: Prisma.LedgerEntryUncheckedCreateInput) => { + const res = await upsert(ctx, 'ledger', key, { + exists: async (id) => !!(await ctx.db.ledgerEntry.findUnique({ where: { id } })), + find: async () => null, + create: () => ctx.db.ledgerEntry.create({ data }), + update: async (id) => { + await ctx.db.ledgerEntry.update({ where: { id }, data }); + }, + }); + return res.id; + }; + const signed = (amount: number) => ({ + direction: amount >= 0 ? LedgerDirection.DEBIT : LedgerDirection.CREDIT, + amount: grams(Math.abs(amount)), + }); + + // Orders delivered to the agent or the customer carry the debt. + const delivered = await ctx.q('SELECT * FROM orders WHERE deleted_at IS NULL AND sts > 4'); + for (const o of delivered) { + const customerId = ctx.map.get('customer', o.customer_id); + const orderId = ctx.map.get('order', o.id); + if (!customerId || !orderId) continue; + const at = tehran(o.updated_at) ?? undefined; + if (toNumber(o.input) !== 0) { + await entry(`order:${String(o.id)}:gold`, { + customerId, orderId, ...signed(toNumber(o.input)), + currency: LedgerCurrency.GOLD_GRAM, sourceType: LedgerSourceType.ORDER_STOCK, + confirmed: true, confirmedAt: at, createdAt: at, + note: 'بدهی وزنی سفارش — انتقال از سیستم قدیم', + }); + ctx.report.count(S, 'order debt (gold)'); + } + if (toNumber(o.rial_input) !== 0) { + const amt = toNumber(o.rial_input); + await entry(`order:${String(o.id)}:rial`, { + customerId, orderId, + direction: amt >= 0 ? LedgerDirection.DEBIT : LedgerDirection.CREDIT, + amount: rial(Math.abs(amt)), + currency: LedgerCurrency.RIAL, sourceType: LedgerSourceType.ORDER_STOCK, + confirmed: true, confirmedAt: at, createdAt: at, + note: 'بدهی ریالی سفارش — انتقال از سیستم قدیم', + }); + ctx.report.count(S, 'order debt (rial)'); + } + } + + const cashes = await ctx.q('SELECT * FROM cashes WHERE deleted_at IS NULL'); + for (const c of cashes) { + const type = int(c.type); + if (type === 9) { + ctx.report.count(S, 'cash type 9 (order mirror) skipped — debt comes from the order'); + continue; + } + const sourceType = type !== null ? CASH_SOURCE[type] : undefined; + if (!sourceType) { + ctx.report.count(S, 'skipped: unknown document type'); + ctx.report.note(S, `legacy document #${String(c.id)} has type ${String(c.type)}`); + continue; + } + const customerId = ctx.map.get('customer', c.customer_id); + if (!customerId) { + ctx.report.count(S, 'skipped: customer not migrated'); + continue; + } + // A repayment is a CREDIT; a negative `value` (4 transfers) is a debit. + const value = toNumber(c.value); + const received = jalaliDate(c.recive_date); + const confirmed = int(c.confirmed) === 1; + const ppg = toNumber(c.price_per_gram); + await entry(`cash:${String(c.id)}`, { + customerId, + currency: LedgerCurrency.GOLD_GRAM, + direction: value >= 0 ? LedgerDirection.CREDIT : LedgerDirection.DEBIT, + amount: grams(Math.abs(value)), + sourceType, + confirmed, + confirmedAt: confirmed ? tehran(c.updated_at) : null, + postedByAdminUserId: ctx.map.get('admin', c.user_id) ?? null, + karatPerMille: int(c.ayar), + labName: text(c.lab), + hallmark: text(c.ang), + accountName: text(c.account_name), + bankName: text(c.bank_name), + transferTo: text(c.to), + originalValue: c.original_value === null ? null : grams(c.original_value), + priceRial: c.price === null ? null : rial(c.price), + pricePerGramRialAtEntry: ppg ? rial(ppg / MESGHAL) : null, + receivedAt: received, + // The raw Jalali text is kept in the note when it did not parse. + note: [text(c.title), text(c.note), !received && text(c.recive_date) ? `تاریخ دریافت: ${text(c.recive_date)}` : null] + .filter(Boolean).join(' — ') || null, + createdAt: tehran(c.created_at) ?? undefined, + }); + ctx.report.count(S, `document ${sourceType}${confirmed ? '' : ' (unconfirmed — not in the balance)'}`); + } + + await balances(ctx); +} + +/** + * Per migrated customer: compare what the import posted with the balance legacy + * stored, carry any real difference as one ADJUSTMENT entry, then set the + * cached balance to the sum of ALL confirmed entries (the rule every other + * ledger path keeps: confirmed DEBIT adds, confirmed CREDIT subtracts). + */ +async function balances(ctx: Ctx) { + const S = 'balances'; + const legacy = await ctx.q('SELECT id, remain, rial_remain FROM customers WHERE deleted_at IS NULL'); + const stored = new Map(); + for (const r of legacy) { + const target = ctx.map.get('customer', r.id); + if (!target) continue; + const cur = stored.get(target) ?? { gold: 0, rial: 0 }; + cur.gold += toNumber(r.remain); + cur.rial += toNumber(r.rial_remain); + stored.set(target, cur); + } + + const importedIds = new Set(); + for (const row of await ctx.db.$queryRawUnsafe<{ target_id: string }[]>( + `SELECT target_id FROM legacy_import.id_map WHERE entity = 'ledger' AND legacy_id NOT LIKE 'adjust:%'`, + )) importedIds.add(row.target_id); + + // Up to this a difference is the double → Decimal(14,4) rounding of §4, not a + // real gap — inclusive: the first run posted two −0.0001 "adjustments" that + // were nothing but rounding, and would have shown on those statements. + const TOLERANCE = 0.0001; + + for (const [customerId, want] of stored) { + const entries = await ctx.db.ledgerEntry.findMany({ where: { customerId, confirmed: true } }); + const sum = (currency: LedgerCurrency, onlyImported: boolean) => + entries + .filter((e) => e.currency === currency && (!onlyImported || importedIds.has(e.id))) + .reduce((acc, e) => (e.direction === LedgerDirection.DEBIT ? acc.add(e.amount) : acc.sub(e.amount)), new D(0)); + + for (const [currency, wanted, label] of [ + [LedgerCurrency.GOLD_GRAM, want.gold, 'gold'], + [LedgerCurrency.RIAL, want.rial, 'rial'], + ] as const) { + const key = `adjust:${customerId}:${label}`; + const diff = new D(wanted.toFixed(4)).sub(sum(currency, true)); + const existing = ctx.map.get('ledger', key); + if (diff.abs().lte(TOLERANCE)) { + if (!diff.isZero()) ctx.report.count(S, `rounding-only difference (${label}, ≤ ${TOLERANCE}) — no adjustment`); + if (existing) { + await ctx.db.ledgerEntry.deleteMany({ where: { id: existing } }); + await ctx.map.drop('ledger', key); + } + continue; + } + const data: Prisma.LedgerEntryUncheckedCreateInput = { + customerId, + currency, + direction: diff.gt(0) ? LedgerDirection.DEBIT : LedgerDirection.CREDIT, + amount: currency === LedgerCurrency.RIAL ? new D(diff.abs().toFixed(2)) : new D(diff.abs().toFixed(4)), + sourceType: LedgerSourceType.ADJUSTMENT, + confirmed: true, + confirmedAt: new Date(), + note: 'تراز انتقالی از سیستم قدیم — مانده‌ی ذخیره‌شده در سیستم قدیم با اسناد قابل بازسازی نبود', + }; + if (existing) await ctx.db.ledgerEntry.update({ where: { id: existing }, data }); + else { + const created = await ctx.db.ledgerEntry.create({ data }); + await ctx.map.set('ledger', key, created.id, 'created'); + } + ctx.report.count(S, `opening-balance adjustment (${label})`); + ctx.report.note(S, `customer ${customerId}: ${label} adjustment ${diff.toString()} so the balance equals legacy's stored ${wanted.toFixed(4)}`); + } + + // The cached balance = Σ every confirmed entry, the target's own and the imported ones. + const fresh = await ctx.db.ledgerEntry.findMany({ where: { customerId, confirmed: true } }); + const total = (currency: LedgerCurrency) => + fresh + .filter((e) => e.currency === currency) + .reduce((acc, e) => (e.direction === LedgerDirection.DEBIT ? acc.add(e.amount) : acc.sub(e.amount)), new D(0)); + const before = await ctx.db.customer.findUniqueOrThrow({ where: { id: customerId }, select: { goldDebtGrams: true, fiatDebtRial: true } }); + const gold = total(LedgerCurrency.GOLD_GRAM); + const rialSum = total(LedgerCurrency.RIAL); + if (!before.goldDebtGrams.eq(gold) || !before.fiatDebtRial.eq(rialSum)) { + await ctx.db.customer.update({ where: { id: customerId }, data: { goldDebtGrams: gold, fiatDebtRial: rialSum } }); + ctx.report.count(S, 'cached balance set from the ledger'); + } + } +} + +/* ───────────── favourites ───────────── */ + +/** + * The wholesale app's favourites are `major_favorites` (ApiMobileController + * :73-465, model Major\Favorite) — 3,305 rows. `fav` (251) belongs to the + * retail storefront (Customer\FavController, guard api-singleCustomer); its + * customer_id points at retail logins, so it is deliberately NOT read here. + */ +export async function favorites(ctx: Ctx) { + const S = 'favorites'; + const rows = await ctx.q( + 'SELECT customer_id, product_id, MIN(created_at) AS created_at FROM major_favorites WHERE deleted_at IS NULL GROUP BY customer_id, product_id', + ); + const data: Prisma.CustomerFavoriteCreateManyInput[] = []; + const seen = new Set(); + for (const r of rows) { + const customerId = ctx.map.get('customer', r.customer_id); + const productId = ctx.map.get('product', r.product_id); + if (!customerId) { ctx.report.count(S, 'skipped: customer not migrated'); continue; } + if (!productId) { ctx.report.count(S, 'skipped: product deleted in legacy'); continue; } + const k = `${customerId}|${productId}`; + if (seen.has(k)) { ctx.report.count(S, 'duplicate collapsed (merged customers)'); continue; } + seen.add(k); + data.push({ customerId, productId, createdAt: tehran(r.created_at) ?? undefined }); + } + const res = await ctx.db.customerFavorite.createMany({ data, skipDuplicates: true }); + ctx.report.count(S, 'created', res.count); + ctx.report.count(S, 'already present', data.length - res.count); +} + +/* ───────────── custom orders ───────────── */ + +/** CustomOrder::$STS_EN (CustomOrder.php:41-47) maps one-to-one. */ +const PREORDER_STATUS: Record = { + 1: PreOrderStatus.PLACED, + 2: PreOrderStatus.ADMIN_APPROVED, + 3: PreOrderStatus.WORKSHOP_APPROVED, + 4: PreOrderStatus.READY_TO_SHIP, + 5: PreOrderStatus.DELIVERED, + 6: PreOrderStatus.CANCELLED, +}; + +export async function preOrders(ctx: Ctx) { + const S = 'custom orders'; + const rows = await ctx.q('SELECT * FROM custom_orders WHERE deleted_at IS NULL'); + for (const r of rows) { + const customerId = ctx.map.get('customer', r.customer_id); + if (!customerId) { ctx.report.count(S, 'skipped: customer not migrated'); continue; } + const sumText = text(r.sum); + const data = { + customerId, + cityId: ctx.map.get('city', r.city_id) ?? null, + workshopId: ctx.map.get('workshop', r.workshop_id) ?? null, + status: PREORDER_STATUS[int(r.sts) ?? 1] ?? PreOrderStatus.PLACED, + designImageUrl: await ctx.imageUrl(r.file_id, S), + colorName: text(r.color), + sizeSpec: text(r.size), + stoneColor: text(r.color_stone), + minaColor: text(r.color_mina), + estimatedWeightGrams: r.weight === null ? null : grams(r.weight), + estimatedPriceRial: sumText && /^\d+(\.\d+)?$/.test(sumText) ? rial(sumText) : null, + description: text(r.description), + }; + const res = await upsert(ctx, 'preorder', r.id, { + exists: async (id) => !!(await ctx.db.preOrder.findUnique({ where: { id } })), + find: async () => null, + create: () => ctx.db.preOrder.create({ data: { ...data, createdAt: tehran(r.created_at) ?? undefined } }), + update: async (id) => { + await ctx.db.preOrder.update({ where: { id }, data }); + }, + }); + ctx.report.count(S, res.isNew ? 'created' : 'updated'); + } +} diff --git a/apps/api/scripts/legacy-import/steps/people.ts b/apps/api/scripts/legacy-import/steps/people.ts new file mode 100644 index 0000000..f28497f --- /dev/null +++ b/apps/api/scripts/legacy-import/steps/people.ts @@ -0,0 +1,558 @@ +/** + * People and places: cities, roles, branches, admin users, sales experts, + * workshops and customers. Rules: docs/DATA-MIGRATION-MAP.md §2–§6, §10.4–§10.7. + */ +import { AdminRole, CustomerKind, Prisma, VerificationStep } from '@prisma/client'; +import { ALL_RIDS } from '../../../src/modules/auth/acl.constants'; +import { isPasswordHash, OTP_ONLY_PASSWORD_HASH } from '../../../src/modules/auth/password-hash'; +import { fillEmpty, upsert, type Ctx } from '../lib/context'; +import { birthday, grams, int, isZero, matchKey, mobile, percent, tehran, text } from '../lib/normalize'; + +type Row = Record; + +/** Owner ruling 2026-10-07 for the 7 legacy rejections, which recorded no reason. */ +export const LEGACY_REJECTION_REASON = 'رد شده در سیستم قدیم — فاقد شرح علت ثبت‌شده'; + +const fullNameOf = (r: Row) => + text(r.name) ?? text([text(r.fname), text(r.lname)].filter(Boolean).join(' ')) ?? String(r.mobile ?? ''); + +/** A legacy bcrypt hash keeps working; anything else becomes OTP-only (§10.4). */ +const passwordOf = (r: Row) => (isPasswordHash(r.password) ? String(r.password) : OTP_ONLY_PASSWORD_HASH); + +/* ───────────── cities ───────────── */ + +export async function cities(ctx: Ctx) { + const S = 'cities'; + // Live cities plus any deleted one a live customer still points at. + const rows = await ctx.q( + `SELECT id, title, parent, level, percent, percent_aux FROM cities + WHERE deleted_at IS NULL + OR id IN (SELECT city_id FROM customers WHERE deleted_at IS NULL AND city_id IS NOT NULL)`, + ); + + // Legacy is a tree (country > province > city > district) and so is the + // target (PERS-02): rows first, then each one's parent once all are mapped. + const existing = await ctx.db.city.findMany(); + const byKey = new Map(existing.map((c) => [matchKey(c.name), c.id])); + + for (const r of rows) { + const name = text(r.title); + if (!name) { + ctx.report.count(S, 'skipped: no title'); + continue; + } + const data = { + name, + percent: r.percent === null ? null : percent(r.percent), + percentAux: r.percent_aux === null ? null : percent(r.percent_aux), + }; + const res = await upsert(ctx, 'city', r.id, { + exists: async (id) => !!(await ctx.db.city.findUnique({ where: { id } })), + find: async () => { + const id = byKey.get(matchKey(name)); + return id ? { id } : null; + }, + create: () => ctx.db.city.create({ data }), + update: async (id, how) => { + if (how === 'created') { + await ctx.db.city.update({ where: { id }, data }); + } else { + const cur = await ctx.db.city.findUniqueOrThrow({ where: { id } }); + const patch = fillEmpty(cur, data); + if (Object.keys(patch).length) await ctx.db.city.update({ where: { id }, data: patch }); + } + }, + }); + ctx.report.count(S, res.isNew ? 'created' : res.how === 'matched' ? 'matched existing' : 'updated'); + byKey.set(matchKey(name), res.id); + } + + // Parents. A row the import created takes legacy's parent; a matched row + // keeps the parent it already has (fill-empty, as every other field). A + // parent that was not imported (deleted in legacy) leaves the row on top. + const parentOf = new Map((await ctx.db.city.findMany({ select: { id: true, parentId: true } })).map((c) => [c.id, c.parentId])); + for (const r of rows) { + const id = ctx.map.get('city', r.id); + const parentId = r.parent === null ? null : ctx.map.get('city', r.parent); + if (!id || !parentId || parentId === id) continue; + if (ctx.map.how('city', r.id) !== 'created' && parentOf.get(id)) continue; + if (parentOf.get(id) === parentId) continue; + // Never close a loop: `id` must not be an ancestor of its new parent. + let cur: string | null | undefined = parentId; + let loop = false; + for (let guard = 0; cur && guard < 50; guard++) { + if (cur === id) loop = true; + cur = parentOf.get(cur); + } + if (loop) { + ctx.report.note(S, `legacy city ${r.id}: parent ${r.parent} would make a loop — left as is`); + continue; + } + await ctx.db.city.update({ where: { id }, data: { parentId } }); + parentOf.set(id, parentId); + ctx.report.count(S, 'parent set'); + } +} + +/** Target City id for an exact (normalised) name match, or null. */ +async function cityByName(ctx: Ctx, name: string | null): Promise { + if (!name) return null; + const all = await ctx.db.city.findMany({ select: { id: true, name: true } }); + const key = matchKey(name); + return all.find((c) => matchKey(c.name) === key)?.id ?? null; +} + +/* ───────────── roles & permissions ───────────── */ + +/** + * Legacy 85 «مدیر» and target 85 «مدیر ارشد» are the same full-access role: + * legacy 85 holds 173 permissions, more than any other type, and target 85 holds + * every one of the 144 rids. Every other type is matched by TITLE, never by id — + * legacy 86 is «حسابدار» but target 86 is «کارشناس فروش» (seed), so an id copy + * would hand the accountant's 71 permissions to every sales expert. + */ +const SAME_ROLE: ReadonlyMap = new Map([[85, 85]]); + +/** + * Legacy rids the target renamed (PERM-01): the wholesale and retail dashboards + * («آمار عمده فروشی» dashboard.omde, «آمار تک فروشی» dashboard.tak) and their + * tree parent became the one dashboard behind "dashboard.view". Without this a + * role that saw a dashboard in legacy would lose it. + */ +const RENAMED_RIDS: ReadonlyMap = new Map([ + ['dashboard', 'dashboard.view'], + ['dashboard.omde', 'dashboard.view'], + ['dashboard.tak', 'dashboard.view'], +]); + +/** AdminRole is a label only — every permission comes from the user type. */ +function adminRoleFor(legacyUt: number | null): AdminRole { + if (legacyUt === 85 || legacyUt === 104 || legacyUt === 105) return AdminRole.SUPER_ADMIN; // مدیر · مدیر اصلی · مدیران + if (legacyUt === 86) return AdminRole.ACCOUNTANT; // حسابدار + return AdminRole.SYSTEM_APPROVER; +} + +export async function roles(ctx: Ctx) { + const S = 'roles & permissions'; + // Legacy user types are config_statics rows (UserController.php:26: + // `exists:config_statics,id`), titled by `val`. + const types = await ctx.q( + "SELECT id, val FROM config_statics WHERE `key` = '__list__ut' AND deleted_at IS NULL ORDER BY id", + ); + const perms = await ctx.q<{ rid: string; ut: number }>('SELECT DISTINCT rid, ut FROM permission'); + const known = new Set(ALL_RIDS as readonly string[]); + const target = await ctx.db.userType.findMany(); + const byTitle = new Map(target.map((t) => [matchKey(t.title), t.id])); + const takenIds = new Set(target.map((t) => t.id)); + + for (const t of types) { + const legacyId = Number(t.id); + const title = text(t.val) ?? `نقش ${legacyId}`; + const mapped = ctx.map.get('ut', legacyId); + let targetId: number; + let created = false; + + if (mapped) { + targetId = Number(mapped); + } else if (SAME_ROLE.has(legacyId) && takenIds.has(SAME_ROLE.get(legacyId)!)) { + targetId = SAME_ROLE.get(legacyId)!; + await ctx.map.set('ut', legacyId, String(targetId), 'matched'); + } else if (byTitle.has(matchKey(title))) { + targetId = byTitle.get(matchKey(title))!; + await ctx.map.set('ut', legacyId, String(targetId), 'matched'); + if (targetId !== legacyId) ctx.report.note(S, `legacy type ${legacyId} «${title}» → existing target type ${targetId} (same title, different number)`); + } else { + targetId = legacyId; + if (takenIds.has(targetId)) { + targetId = Math.max(...takenIds, ...types.map((x) => Number(x.id))) + 1; + ctx.report.note(S, `legacy type ${legacyId} «${title}»: number taken by a different target role, created as ${targetId}`); + } + await ctx.db.userType.create({ data: { id: targetId, title } }); + takenIds.add(targetId); + await ctx.map.set('ut', legacyId, String(targetId), 'created'); + created = true; + } + + const legacyRids = [ + ...new Set(perms.filter((p) => Number(p.ut) === legacyId).map((p) => RENAMED_RIDS.get(String(p.rid)) ?? String(p.rid))), + ]; + if (created || ctx.map.how('ut', legacyId) === 'created') { + // A role the import created gets legacy's permissions, limited to rids the + // target ACL knows (the storefront's are out of scope, D13). + const usable = legacyRids.filter((r) => known.has(r)); + const res = await ctx.db.permission.createMany({ + data: usable.map((rid) => ({ rid, userTypeId: targetId })), + skipDuplicates: true, + }); + ctx.report.count(S, 'permissions copied', res.count); + ctx.report.count(S, 'permissions dropped (rid unknown to the target ACL)', legacyRids.length - usable.length); + ctx.report.count(S, 'types created'); + } else { + // An existing target role keeps the target's permission set (D1: the + // target's stricter auth stands). Nothing is added to it. + ctx.report.count(S, 'types matched (permissions left as the target has them)'); + ctx.report.count(S, 'legacy permissions not applied to matched types', legacyRids.length); + } + } + + const orphanUt = [...new Set(perms.map((p) => Number(p.ut)))].filter((u) => !types.some((t) => Number(t.id) === u)); + if (orphanUt.length) ctx.report.note(S, `permission rows for types with no config_statics row were skipped: ${orphanUt.join(', ')}`); +} + +/* ───────────── branches & workshops ───────────── */ + +export async function branches(ctx: Ctx) { + const S = 'branches'; + const rows = await ctx.q('SELECT * FROM branches WHERE deleted_at IS NULL'); + const existing = await ctx.db.branch.findMany(); + for (const r of rows) { + const name = text(r.name); + if (!name) continue; + const data = { name, address: text(r.address), phone: text(r.phone), isActive: int(r.is_active) !== 0 }; + const res = await upsert(ctx, 'branch', r.id, { + exists: async (id) => !!(await ctx.db.branch.findUnique({ where: { id } })), + find: async () => existing.find((b) => matchKey(b.name) === matchKey(name)) ?? null, + create: () => ctx.db.branch.create({ data }), + update: async (id, how) => { + if (how === 'created') await ctx.db.branch.update({ where: { id }, data }); + }, + }); + ctx.report.count(S, res.isNew ? 'created' : 'matched/updated'); + } + // branches.user_id names the branch's manager; the target Branch has no such field. + ctx.report.note(S, 'branches.user_id (branch manager) has no target field and was not carried over.'); +} + +export async function workshops(ctx: Ctx) { + const S = 'workshops'; + const rows = await ctx.q('SELECT * FROM workshops WHERE deleted_at IS NULL'); + const existing = await ctx.db.workshop.findMany(); + for (const r of rows) { + const name = text(r.name); + if (!name) continue; + const data = { name, address: text(r.address), phone: text(r.phone), isActive: int(r.is_active) !== 0 }; + const res = await upsert(ctx, 'workshop', r.id, { + exists: async (id) => !!(await ctx.db.workshop.findUnique({ where: { id } })), + find: async () => existing.find((w) => matchKey(w.name) === matchKey(name)) ?? null, + create: () => ctx.db.workshop.create({ data }), + update: async (id, how) => { + if (how === 'created') await ctx.db.workshop.update({ where: { id }, data }); + }, + }); + ctx.report.count(S, res.isNew ? 'created' : 'matched/updated'); + } + // Legacy Workshop::user() is belongsTo(Customer) (a type-5 customer); the + // target supervisor is an AdminUser. No safe link exists, so none is guessed. + ctx.report.note(S, 'supervisor not linked: legacy points at a customer (Workshop::user → Customer), the target expects an admin user.'); +} + +/* ───────────── admin users (legacy `users`) ───────────── */ + +export async function admins(ctx: Ctx) { + const S = 'admin users'; + const rows = await ctx.q('SELECT * FROM users WHERE deleted_at IS NULL'); + for (const r of rows) { + const m = mobile(r.mobile); + if (!m) { + ctx.report.count(S, 'skipped: no mobile'); + continue; + } + const ut = int(r.ut); + const userTypeId = ctx.map.get('ut', ut); + const branchId = ctx.map.get('branch', r.branch_id) ?? null; + const base = { + fullName: fullNameOf(r), + firstName: text(r.fname), + lastName: text(r.lname), + branchId, + userTypeId: userTypeId ? Number(userTypeId) : null, + }; + const res = await upsert(ctx, 'admin', r.id, { + exists: async (id) => !!(await ctx.db.adminUser.findUnique({ where: { id } })), + find: () => ctx.db.adminUser.findUnique({ where: { mobile: m }, select: { id: true } }), + create: () => + ctx.db.adminUser.create({ + data: { + ...base, + mobile: m, + passwordHash: passwordOf(r), + role: adminRoleFor(ut), + createdAt: tehran(r.created_at) ?? undefined, + }, + }), + update: async (id, how) => { + if (how === 'created') { + await ctx.db.adminUser.update({ where: { id }, data: base }); + } else { + // An admin the target already has keeps its role, type, password and + // branch; only empty name parts are filled. + const cur = await ctx.db.adminUser.findUniqueOrThrow({ where: { id } }); + const patch = fillEmpty(cur, { firstName: base.firstName, lastName: base.lastName }); + if (Object.keys(patch).length) await ctx.db.adminUser.update({ where: { id }, data: patch }); + } + }, + }); + ctx.report.count(S, res.isNew ? 'created' : res.how === 'matched' ? 'matched existing (left as is)' : 'updated'); + if (res.isNew && !isPasswordHash(r.password)) ctx.report.count(S, 'created without a usable password'); + } +} + +/* ───────────── sales experts (legacy customers.type = 1) ───────────── */ + +/** + * D17: an expert is an AdminUser (role SALES_EXPERT) with a SalesExpertProfile. + * Their own orders and debt live on a separate trading Customer, created by the + * customers step for the experts who have any (13 with orders, 14 with + * documents in the 2026-10-04 dump). + * + * An expert whose mobile already belongs to an admin with another role (7 in + * the dump, three of them full admins) is NOT demoted: the admin keeps its + * role, and the expert's referrals point at that admin. + */ +export async function experts(ctx: Ctx) { + const S = 'sales experts'; + const rows = await ctx.q('SELECT * FROM customers WHERE deleted_at IS NULL AND type = 1'); + + const existingExpertType = await ctx.db.adminUser.groupBy({ + by: ['userTypeId'], + where: { role: AdminRole.SALES_EXPERT, userTypeId: { not: null } }, + _count: true, + orderBy: { _count: { userTypeId: 'desc' } }, + }); + const expertType = + existingExpertType[0]?.userTypeId ?? + (await ctx.db.userType.findMany()).find((t) => matchKey(t.title) === matchKey('کارشناس فروش'))?.id ?? + null; + if (expertType === null) ctx.report.note(S, 'no target user type for sales experts found; created experts have no user type'); + + for (const r of rows) { + const m = mobile(r.mobile); + if (!m) { + ctx.report.count(S, 'skipped: no mobile'); + continue; + } + const profile = { + cityId: ctx.map.get('city', r.city_id) ?? null, + gramLevel: grams(r.gram_level), + phone: text(r.phone), + nationalCode: text(r.ncode), + }; + const owned = { + fullName: fullNameOf(r), + firstName: text(r.fname), + lastName: text(r.lname), + // AdminUser.wagePercent is "legacy Customer.percent" (schema). + wagePercent: r.percent === null ? null : percent(r.percent), + isActive: int(r.active) !== -1, + avatarFileId: await ctx.uploadedFile(r.image_id, 'legacy-avatar', S), + address: text(r.address), + storeName: text(r.store_name), + pasazhName: text(r.pasazh_name), + memberCode: text(r.mcode), + }; + const res = await upsert(ctx, 'expert', r.id, { + exists: async (id) => !!(await ctx.db.adminUser.findUnique({ where: { id } })), + find: () => ctx.db.adminUser.findUnique({ where: { mobile: m }, select: { id: true } }), + create: () => + ctx.db.adminUser.create({ + data: { + ...owned, + mobile: m, + passwordHash: passwordOf(r), + role: AdminRole.SALES_EXPERT, + userTypeId: expertType, + createdAt: tehran(r.created_at) ?? undefined, + }, + }), + update: async (id, how) => { + // A matched admin (the target's own, or a legacy `users` admin) is not + // rewritten here; the role check below decides what else happens. + if (how === 'created') await ctx.db.adminUser.update({ where: { id }, data: owned }); + }, + }); + + const admin = await ctx.db.adminUser.findUniqueOrThrow({ + where: { id: res.id }, + include: { salesExpertProfile: true }, + }); + if (admin.role !== AdminRole.SALES_EXPERT) { + // Owner 2026-10-07: the admin keeps their role. Their expert profile is + // still kept, because it is what links their OWN legacy orders (their + // trading account) to them — without it their «میزان فروش» lost those + // orders. The profile grants nothing: the expert app checks the role. + ctx.report.count(S, `mobile already an admin with role ${admin.role} — kept, not demoted`); + ctx.report.note(S, `legacy expert #${String(r.id)} shares a mobile with admin role ${admin.role}; the admin was kept and referrals point to it.`); + } + if (!admin.salesExpertProfile) { + await ctx.db.salesExpertProfile.create({ data: { adminUserId: admin.id, ...profile } }); + } else if (res.how === 'created') { + await ctx.db.salesExpertProfile.update({ where: { id: admin.salesExpertProfile.id }, data: profile }); + } else { + const patch = fillEmpty(admin.salesExpertProfile, profile); + if (Object.keys(patch).length) await ctx.db.salesExpertProfile.update({ where: { id: admin.salesExpertProfile.id }, data: patch }); + } + ctx.report.count(S, res.isNew ? 'created' : res.how === 'matched' ? 'matched existing expert' : 'updated'); + } +} + +/* ───────────── customers ───────────── */ + +/** Legacy Customer::$TYPES (Customer.php:85-92); NULL predates sign-up's `type = 2`. */ +function kindFor(type: number | null): CustomerKind { + switch (type) { + case 3: return CustomerKind.WALK_IN_SHOPKEEPER; + case 4: return CustomerKind.BANKER; + case 5: return CustomerKind.WORKSHOP_SUPERVISOR; + default: return CustomerKind.APP_SHOPKEEPER; // 2, 1 (expert's trading account), NULL + } +} + +/** + * Two 3-state legacy columns (1 pending, 2 accepted, 3 rejected; §5.5) to one + * enum. Step one governs: a rejected step one closed the case in legacy + * (`active = -1`), and a pending step one means review never got past it. + */ +function verificationFor(one: number | null, two: number | null): VerificationStep { + if (one === 3 || (one !== 1 && two === 3)) return VerificationStep.REJECTED; + if (one === 1) return VerificationStep.STEP_ONE_SUBMITTED; + if (one === 2) return two === 2 ? VerificationStep.VERIFIED : VerificationStep.STEP_TWO_SUBMITTED; + return VerificationStep.UNVERIFIED; +} + +export async function customers(ctx: Ctx) { + const S = 'customers'; + const rows = await ctx.q('SELECT * FROM customers WHERE deleted_at IS NULL'); + const withOrders = new Set((await ctx.q('SELECT DISTINCT customer_id AS id FROM orders WHERE deleted_at IS NULL')).map((r) => String(r.id))); + const withCash = new Set((await ctx.q('SELECT DISTINCT customer_id AS id FROM cashes WHERE deleted_at IS NULL')).map((r) => String(r.id))); + const hasMoney = (r: Row) => + withOrders.has(String(r.id)) || withCash.has(String(r.id)) || !isZero(r.remain) || !isZero(r.rial_remain); + + // An expert becomes a Customer only as a trading account, i.e. when they + // have money of their own; otherwise they exist only as an AdminUser. + const candidates = rows.filter((r) => int(r.type) !== 1 || hasMoney(r)); + ctx.report.count(S, 'experts without money (admin user only)', rows.length - candidates.length); + + // Duplicate mobiles (27 groups, §10.4). The winner is the row with money + // (never more than one in the dump), else the most recently updated. + const groups = new Map(); + for (const r of candidates) { + const m = mobile(r.mobile); + if (!m) { + // In the 2026-10-04 dump this is one test account whose "mobile" is the + // word «تست»: it cannot log in under any system, so it is not invented a number. + ctx.report.count(S, 'skipped: mobile has no digits'); + const own = withOrders.has(String(r.id)) || withCash.has(String(r.id)); + ctx.report.note(S, `legacy customer #${String(r.id)} skipped: its mobile contains no digits${own ? ' — its orders/documents are skipped with it' : ''}`); + continue; + } + groups.set(m, [...(groups.get(m) ?? []), r]); + } + + for (const [m, group] of groups) { + const ordered = [...group].sort( + (a, b) => + Number(hasMoney(b)) - Number(hasMoney(a)) || + String(b.updated_at ?? '').localeCompare(String(a.updated_at ?? '')) || + Number(b.id) - Number(a.id), + ); + const [r, ...losers] = ordered; + const moneyLosers = losers.filter(hasMoney); + if (moneyLosers.length) { + // Not seen in the 2026-10-04 dump; if a fresh dump has it, the money of + // two legacy rows lands on one customer and must be reviewed by hand. + ctx.report.note(S, `⚠ duplicate mobile with money on several rows: legacy #${[r, ...moneyLosers].map((x) => String(x.id)).join(', #')} merged onto one customer — review`); + } + + const type = int(r.type); + const step = verificationFor(int(r.sts_verify_step_one), int(r.sts_verify_step_two)); + const typedCity = text(r.new_city); + // Sign-up forced city_id = 5 (تهران) on everyone (Major/CustomerController.php:21), + // so when the customer typed a city, that text — not city_id 5 — is the truth. + const cityId = typedCity + ? int(r.city_id) !== 5 && r.city_id !== null + ? ctx.map.get('city', r.city_id) ?? null + : await cityByName(ctx, typedCity) + : ctx.map.get('city', r.city_id) ?? null; + + const owned = { + firstName: text(r.fname), + lastName: text(r.lname), + nationalCode: text(r.ncode), // empty -> NULL; '' would collide under @unique (§10.4) + cityId, + cityNameRaw: typedCity, + kind: kindFor(type), + phone: text(r.phone), + address: text(r.address), + storeName: text(r.store_name), + pasazhName: text(r.pasazh_name), + zone: text(r.zone), + memberCode: text(r.mcode), + referredByAgentId: ctx.map.get('expert', r.reagent_id) ?? null, + goldCreditLimitGrams: grams(r.gram_level), + makingChargeOffsetPercent: percent(r.percent), + verificationStep: step, + verificationRejectionReason: step === VerificationStep.REJECTED ? LEGACY_REJECTION_REASON : null, + nationalIdImageUrl: await ctx.imageUrl(r.ncode_image_id, S), + businessLicenseUrl: await ctx.imageUrl(r.business_license_image_id, S), + shopImageUrl: await ctx.imageUrl(r.shop_image_id, S), + avatarFileId: await ctx.uploadedFile(r.image_id, 'legacy-avatar', S), + birthDate: birthday(r.birth_date, r.created_at), + // Owner ruling 2026-10-08 (MON-05, option 2): everyone may order after the + // move. Legacy customers.sts was never read by any code — most of the 313 + // «عدم سفارش» rows are just the sign-up default (ApiMobileController.php:704) + // — so carrying it over would suddenly block real customers once the new + // system enforces the switch. Only a deliberate suspension after go-live counts. + canPlaceOrders: true, + isActive: int(r.active) !== -1, + isArchived: int(r.is_archive) === 1, + }; + if (r.reagent_id !== null && !owned.referredByAgentId) ctx.report.count(S, 'referrer not mapped (not a migrated expert)'); + if (int(r.sts) === -1) ctx.report.count(S, 'legacy «عدم سفارش» (never enforced) — set to allowed (owner, option 2)'); + if (r.birth_date !== null && !owned.birthDate) ctx.report.count(S, 'birth date dropped (sign-up default or impossible)'); + + const res = await upsert(ctx, 'customer', r.id, { + exists: async (id) => !!(await ctx.db.customer.findUnique({ where: { id } })), + find: () => ctx.db.customer.findUnique({ where: { mobile: m }, select: { id: true } }), + create: () => + ctx.db.customer.create({ + data: { + ...owned, + fullName: fullNameOf(r), + mobile: m, + passwordHash: passwordOf(r), + createdAt: tehran(r.created_at) ?? undefined, + } satisfies Prisma.CustomerUncheckedCreateInput, + }), + update: async (id, how) => { + if (how === 'created') { + // Never the accounting* columns (D27, §10.5): not in `owned`. + await ctx.db.customer.update({ where: { id }, data: owned }); + } else { + const cur = await ctx.db.customer.findUniqueOrThrow({ where: { id } }); + const patch = fillEmpty(cur, owned); + // The target's own verification state wins; a legacy rejection reason + // on a customer the target shows as anything but REJECTED would contradict it. + if (cur.verificationStep !== VerificationStep.REJECTED) delete patch.verificationRejectionReason; + if (Object.keys(patch).length) await ctx.db.customer.update({ where: { id }, data: patch }); + } + }, + }); + ctx.report.count(S, res.isNew ? 'created' : res.how === 'matched' ? 'matched existing (empty fields filled)' : 'updated'); + if (step === VerificationStep.REJECTED) ctx.report.count(S, 'rejected (legacy reason sentinel written)'); + + for (const l of losers) { + await ctx.map.set('customer', l.id, res.id, 'merged'); + ctx.report.count(S, 'duplicate-mobile rows merged into the winner'); + } + + // An expert's trading account (D17): link it from their profile. + if (type === 1) { + const adminId = ctx.map.get('expert', r.id); + const profile = adminId ? await ctx.db.salesExpertProfile.findUnique({ where: { adminUserId: adminId } }) : null; + if (profile && !profile.tradingCustomerId) { + await ctx.db.salesExpertProfile.update({ where: { id: profile.id }, data: { tradingCustomerId: res.id } }); + ctx.report.count(S, 'expert trading accounts linked'); + } + } + } +} diff --git a/apps/api/scripts/legacy-import/steps/reconcile.ts b/apps/api/scripts/legacy-import/steps/reconcile.ts new file mode 100644 index 0000000..54ddaa1 --- /dev/null +++ b/apps/api/scripts/legacy-import/steps/reconcile.ts @@ -0,0 +1,147 @@ +/** + * Reconciliation (GO-LIVE-PLAN §7): what legacy has vs what the target now + * holds, with the tolerance of DATA-MIGRATION-MAP §4 instead of "zero + * difference", which double → Decimal rounding makes impossible. + */ +import { Prisma } from '@prisma/client'; +import type { Ctx } from '../lib/context'; +import { toNumber } from '../lib/normalize'; +import { agentSalesWhere, customerSalesWhere } from '../../../src/modules/sales-agent/agent-orders'; + +type Row = Record; +const TOLERANCE = new Prisma.Decimal('0.0001'); + +export async function reconcile(ctx: Ctx) { + const S = 'reconciliation'; + + /* counts: legacy rows in scope vs ids mapped */ + const scope: [string, string, string][] = [ + ['cities', 'city', `SELECT COUNT(*) n FROM cities WHERE deleted_at IS NULL`], + ['branches', 'branch', `SELECT COUNT(*) n FROM branches WHERE deleted_at IS NULL`], + ['workshops', 'workshop', `SELECT COUNT(*) n FROM workshops WHERE deleted_at IS NULL`], + ['admin users', 'admin', `SELECT COUNT(*) n FROM users WHERE deleted_at IS NULL`], + ['sales experts', 'expert', `SELECT COUNT(*) n FROM customers WHERE deleted_at IS NULL AND type = 1`], + ['live products', 'product', `SELECT COUNT(*) n FROM product WHERE deleted_at IS NULL`], + ['live variants', 'variant', `SELECT COUNT(*) n FROM products_productvarient WHERE deleted_at IS NULL`], + ['live orders', 'order', `SELECT COUNT(*) n FROM orders WHERE deleted_at IS NULL`], + ['custom orders', 'preorder', `SELECT COUNT(*) n FROM custom_orders WHERE deleted_at IS NULL`], + ]; + const rows: string[] = ['| | legacy | mapped |', '|---|---:|---:|']; + for (const [label, entity, sql] of scope) { + const [{ n }] = await ctx.q<{ n: number }>(sql); + const [{ m }] = await ctx.db.$queryRawUnsafe<{ m: bigint }[]>( + `SELECT COUNT(*) AS m FROM legacy_import.id_map WHERE entity = $1`, entity, + ); + rows.push(`| ${label} | ${String(n)} | ${String(m)} |`); + } + ctx.report.note(S, `Counts (mapped may exceed legacy live rows where deleted rows were kept for order history):\n\n${rows.join('\n')}\n`); + + /* balances: every migrated customer, legacy stored vs target cached */ + const legacy = await ctx.q('SELECT id, remain, rial_remain FROM customers WHERE deleted_at IS NULL'); + const want = new Map(); + for (const r of legacy) { + const id = ctx.map.get('customer', r.id); + if (!id) continue; + const w = want.get(id) ?? { gold: 0, rial: 0 }; + w.gold += toNumber(r.remain); + w.rial += toNumber(r.rial_remain); + want.set(id, w); + } + const targets = await ctx.db.customer.findMany({ + where: { id: { in: [...want.keys()] } }, + select: { id: true, goldDebtGrams: true, fiatDebtRial: true }, + }); + // Matched customers may carry target-native entries too, so only the + // customers the import created are held to legacy's number. + const created = new Set( + (await ctx.db.$queryRawUnsafe<{ target_id: string }[]>( + `SELECT DISTINCT target_id FROM legacy_import.id_map WHERE entity = 'customer' AND how = 'created'`, + )).map((r) => r.target_id), + ); + + let goldOk = 0, goldBad = 0, rialOk = 0, rialBad = 0; + let legacyGold = new Prisma.Decimal(0), targetGold = new Prisma.Decimal(0); + let legacyRial = new Prisma.Decimal(0), targetRial = new Prisma.Decimal(0); + for (const t of targets) { + if (!created.has(t.id)) continue; + const w = want.get(t.id)!; + const g = new Prisma.Decimal(w.gold.toFixed(4)); + const r = new Prisma.Decimal(w.rial.toFixed(2)); + legacyGold = legacyGold.add(g); targetGold = targetGold.add(t.goldDebtGrams); + legacyRial = legacyRial.add(r); targetRial = targetRial.add(t.fiatDebtRial); + if (g.sub(t.goldDebtGrams).abs().lte(TOLERANCE)) goldOk++; + else { goldBad++; ctx.report.note(S, `⚠ gold balance differs for customer ${t.id}: legacy ${g.toString()} / target ${t.goldDebtGrams.toString()}`); } + if (r.sub(t.fiatDebtRial).abs().lt(1)) rialOk++; + else { rialBad++; ctx.report.note(S, `⚠ rial balance differs for customer ${t.id}: legacy ${r.toString()} / target ${t.fiatDebtRial.toString()}`); } + } + ctx.report.count(S, 'created customers — gold balance matches legacy (±0.0001 g)', goldOk); + ctx.report.count(S, 'created customers — gold balance DIFFERS', goldBad); + ctx.report.count(S, 'created customers — rial balance matches legacy (±1 rial)', rialOk); + ctx.report.count(S, 'created customers — rial balance DIFFERS', rialBad); + ctx.report.note(S, `Total gold debt (created customers): legacy ${legacyGold.toFixed(4)} g · target ${targetGold.toFixed(4)} g`); + ctx.report.note(S, `Total rial debt (created customers): legacy ${legacyRial.toFixed(2)} · target ${targetRial.toFixed(2)}`); + ctx.report.note(S, `Matched (pre-existing) customers are not held to legacy's number: they may carry target-native ledger entries. ${targets.length - created.size} of them; see the "balances" section for whose cached balance changed.`); + + /* protected columns: the import must never have written them */ + const [{ n: imageIds }] = await ctx.db.$queryRawUnsafe<{ n: bigint }[]>( + `SELECT COUNT(*) AS n FROM "ProductVariant" v + JOIN legacy_import.id_map m ON m.entity = 'variant' AND m.target_id = v.id AND m.how = 'created' + WHERE v."imageId" IS NOT NULL`, + ); + ctx.report.note(S, `Imported variants with an imageId: ${String(imageIds)} (must be 0 — PROTECTED.md §B).`); +} +/** + * «میزان فروش» for every migrated customer and expert, against legacy's own + * formula (CustomerController::updateGramSell, soft-deleted orders excluded): + * SUM(orders.input) WHERE customer_id = X OR reagent_id = X + * computed live from legacy's rows — and, separately, legacy's STORED + * `customers.grams_sell`, which the legacy screens print. The stored value is + * a cache refreshed only on some order events, so where it disagrees with the + * formula the legacy screen itself is out of date; each such row is listed. + * + * Legacy rows the import merged into one target row (duplicate mobiles) are + * compared as one: their legacy figures are summed. + */ +export async function reconcileSales(ctx: Ctx) { + const S = 'reconciliation — sales («میزان فروش»)'; + const rows = await ctx.q( + `SELECT c.id, c.grams_sell AS kept, + (SELECT COALESCE(SUM(o.input), 0) FROM orders o + WHERE o.deleted_at IS NULL AND (o.customer_id = c.id OR o.reagent_id = c.id)) AS live + FROM customers c WHERE c.deleted_at IS NULL`, + ); + const groups = new Map(); + let stale = 0; + for (const r of rows) { + const agentId = ctx.map.get('expert', r.id); + const customerId = ctx.map.get('customer', r.id); + if (!agentId && !customerId) continue; + const key = agentId ? `expert:${agentId}` : `customer:${customerId!}`; + const g = groups.get(key) ?? { + where: agentId ? agentSalesWhere(agentId) : customerSalesWhere(customerId!), + live: 0, + ids: [], + }; + g.live += toNumber(r.live); + g.ids.push(String(r.id)); + groups.set(key, g); + + const live = new Prisma.Decimal(toNumber(r.live).toFixed(4)); + const kept = new Prisma.Decimal(toNumber(r.kept).toFixed(4)); + if (kept.sub(live).abs().gt(TOLERANCE)) { + stale++; + ctx.report.note(S, `legacy's stored figure is out of date for #${String(r.id)}: legacy screen shows ${kept.toString()}, legacy's own formula gives ${live.toString()}`); + } + } + let ok = 0, bad = 0; + for (const [key, g] of groups) { + const agg = await ctx.db.order.aggregate({ where: g.where, _sum: { totalGoldWeightGrams: true } }); + const target = agg._sum.totalGoldWeightGrams ?? new Prisma.Decimal(0); + const live = new Prisma.Decimal(g.live.toFixed(4)); + if (live.sub(target).abs().lte(TOLERANCE)) ok++; + else { bad++; ctx.report.note(S, `⚠ ${key.split(':')[0]} legacy #${g.ids.join(' + #')}: legacy formula ${live.toString()} / target ${target.toString()}`); } + } + ctx.report.count(S, 'matches legacy formula (±0.0001 g)', ok); + ctx.report.count(S, 'DIFFERS from legacy formula', bad); + ctx.report.count(S, "legacy's stored screen value is stale (legacy disagrees with itself)", stale); +} diff --git a/apps/api/scripts/legacy-import/tsconfig.json b/apps/api/scripts/legacy-import/tsconfig.json new file mode 100644 index 0000000..77e788f --- /dev/null +++ b/apps/api/scripts/legacy-import/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "rootDir": "../..", + "noEmit": true + }, + "include": ["./**/*.ts"] +} diff --git a/apps/api/scripts/report-name-split.cjs b/apps/api/scripts/report-name-split.cjs new file mode 100644 index 0000000..d1098be --- /dev/null +++ b/apps/api/scripts/report-name-split.cjs @@ -0,0 +1,86 @@ +/** + * D0 requirement 3 — review report for names that cannot be split safely. + * + * The migration backfills firstName = first token, lastName = the rest. That is + * correct for two-token names and a guess for anything longer: "سید محمد + * حسینی" should almost certainly be firstName="سید محمد", and the migration + * writes firstName="سید" instead. Those rows need a human. + * + * READ-ONLY. It changes nothing; it prints what a person has to check. + * + * node scripts/report-name-split.cjs # print to stdout + * node scripts/report-name-split.cjs --csv out.csv + * + * Run it AFTER the 20260922120000_customer_name_parts migration. + */ +const { PrismaClient } = require('@prisma/client'); +const fs = require('fs'); + +const prisma = new PrismaClient(); + +/** Same normalisation the migration's SQL uses. */ +const tokens = (s) => String(s ?? '').trim().replace(/\s+/g, ' ').split(' ').filter(Boolean); + +(async () => { + const customers = await prisma.$queryRawUnsafe(` + SELECT id, "fullName", "firstName", "lastName", mobile, "memberCode" + FROM "Customer" + ORDER BY "createdAt" + `); + + const multi = []; + const empty = []; + const single = []; + + for (const c of customers) { + const t = tokens(c.fullName); + if (t.length === 0) empty.push(c); + else if (t.length === 1) single.push(c); + else if (t.length > 2) multi.push({ ...c, tokenCount: t.length }); + } + + console.log(`Customers scanned: ${customers.length}`); + console.log(` two tokens (split is reliable): ${customers.length - multi.length - empty.length - single.length}`); + console.log(` one token (lastName is NULL): ${single.length}`); + console.log(` empty name (nothing to split): ${empty.length}`); + console.log(` MORE THAN TWO TOKENS — NEEDS REVIEW: ${multi.length}`); + + if (single.length) { + console.log('\n--- single-token names (no surname recorded) ---'); + for (const c of single) console.log(` ${c.id} ${c.mobile} "${c.fullName}"`); + } + if (empty.length) { + console.log('\n--- empty names ---'); + for (const c of empty) console.log(` ${c.id} ${c.mobile}`); + } + + if (multi.length) { + console.log('\n--- NEEDS REVIEW: more than two tokens ---'); + console.log('The migration guessed first-token / rest. Verify each one.\n'); + for (const c of multi) { + console.log(` ${c.id} ${c.mobile} (${c.tokenCount} tokens)`); + console.log(` fullName : "${c.fullName}"`); + console.log(` guessed : firstName="${c.firstName}" lastName="${c.lastName}"`); + } + } + + const csvArg = process.argv.indexOf('--csv'); + if (csvArg !== -1 && process.argv[csvArg + 1]) { + const esc = (v) => `"${String(v ?? '').replace(/"/g, '""')}"`; + const rows = [ + ['id', 'mobile', 'memberCode', 'fullName', 'guessedFirstName', 'guessedLastName', 'tokenCount'].join(','), + ...multi.map((c) => + [c.id, c.mobile, c.memberCode, c.fullName, c.firstName, c.lastName, c.tokenCount].map(esc).join(','), + ), + ]; + // BOM so Excel opens the Persian text in the right encoding. + fs.writeFileSync(process.argv[csvArg + 1], '' + rows.join('\n'), 'utf8'); + console.log(`\nCSV written: ${process.argv[csvArg + 1]} (${multi.length} rows)`); + } + + await prisma.$disconnect(); +})().catch(async (e) => { + console.error(e); + await prisma.$disconnect(); + process.exit(1); +}); diff --git a/apps/api/scripts/scan-admin-b2b.cjs b/apps/api/scripts/scan-admin-b2b.cjs new file mode 100644 index 0000000..ff7b806 --- /dev/null +++ b/apps/api/scripts/scan-admin-b2b.cjs @@ -0,0 +1,168 @@ +/** + * B2B admin scan (D19 step 2) — hits every read endpoint the wholesale side of + * the admin panel uses on a normal working day, looking for things that are + * OUTRIGHT BROKEN (500s, crashes, empty required shapes). + * + * Scope per the owner: wholesale customers, sales experts, products and + * variants, wholesale orders, documents. Retail/storefront surfaces + * (single*, wallet, comments) are D13 — preserved, not scanned. + * + * This is a breakage scan, not a parity audit: a 200 with plausible data + * passes. Anything non-2xx is reported with its body so it can be triaged. + * + * Usage: node scripts/scan-admin-b2b.cjs [apiBaseUrl] + */ +const { PrismaClient } = require('@prisma/client'); +const prisma = new PrismaClient(); +const API = (process.argv[2] || 'http://localhost:3000/api').replace(/\/$/, ''); + +const broken = []; +const ok = []; +let H = {}; + +async function probe(label, method, path, body) { + let res; + try { + res = await fetch(`${API}/${path}`, { + method, + headers: H, + body: body === undefined ? undefined : JSON.stringify(body), + }); + } catch (e) { + broken.push({ label, method, path, status: 'NETWORK', detail: String(e) }); + console.log(` ERR ${label} (${String(e)})`); + return null; + } + + let payload = null; + const text = await res.text(); + try { + payload = JSON.parse(text); + } catch { + /* non-JSON */ + } + + if (res.ok) { + ok.push(label); + const n = Array.isArray(payload) + ? payload.length + : Array.isArray(payload?.rows) + ? payload.rows.length + : null; + console.log(` ok ${label}${n === null ? '' : ` (${n} rows)`}`); + } else { + const detail = + (payload && (payload.message || payload.error)) || text.slice(0, 200); + broken.push({ label, method, path, status: res.status, detail }); + console.log(` FAIL ${label} -> ${res.status} ${JSON.stringify(detail).slice(0, 160)}`); + } + return payload; +} + +const page = { page: 1, limit: 5 }; + +(async () => { + const login = await fetch(`${API}/admin/auth/login`, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ phone: '09128081392', password: '09128081392' }), + }); + const auth = await login.json(); + if (!auth.api_token) { + console.log('login failed'); + process.exit(1); + } + H = { 'Content-Type': 'application/json', Authorization: 'Bearer ' + auth.api_token }; + + console.log('\n── WHOLESALE CUSTOMERS ──────────────────────────────'); + const omde = await probe('customers: omde list', 'POST', 'admin/customers-omde/list', page); + await probe('customers: banker list', 'POST', 'admin/customers-omde/banker/list', page); + await probe('customers: shopkeeper list', 'POST', 'admin/customers-omde/shopkeeper/list', page); + await probe('customers: non-verified list', 'POST', 'admin/customers-omde/non-verified/list', page); + await probe('customers: archived list', 'POST', 'admin/customers-omde/archived/list', page); + await probe('customers: referrer dropdown', 'GET', 'admin/customers-omde/query/reagent'); + + const aCustomer = omde?.rows?.[0]; + if (aCustomer) { + await probe('customer: detail', 'GET', `admin/customers-omde/${aCustomer.id}`); + await probe('customer: dashboard', 'GET', `admin/customers-omde/dashboard/${aCustomer.id}`); + await probe('customer: orders tab', 'GET', `admin/customers-omde/${aCustomer.id}/orders`); + await probe('customer: documents tab', 'GET', `admin/customers-omde/${aCustomer.id}/documents`); + } + + console.log('\n── SALES EXPERTS ────────────────────────────────────'); + const reagents = await probe('experts: list', 'POST', 'admin/customers-omde/reagent/list', page); + const anExpert = reagents?.rows?.[0]; + if (anExpert) { + await probe('expert: detail', 'GET', `admin/customers-omde/reagent/${anExpert.id}`); + await probe('expert: as admin user', 'GET', `admin/users/${anExpert.id}`); + } + + console.log('\n── PRODUCTS & VARIANTS ──────────────────────────────'); + const prods = await probe('products: list', 'POST', 'admin/products/list', page); + await probe('products: variants list', 'POST', 'admin/products/variants/list', page); + await probe('products: brands', 'GET', 'admin/products/brands'); + await probe('products: brands table', 'POST', 'admin/products/brands-table', page); + await probe('products: collections', 'GET', 'admin/products/collections'); + await probe('products: show-type options', 'GET', 'admin/products/show-type-options'); + const aProduct = prods?.rows?.[0]; + if (aProduct) { + await probe('product: detail (edit form)', 'GET', `admin/products/${aProduct.id}`); + await probe('product: its variants', 'GET', `admin/products/${aProduct.id}/variants`); + // The order builder posts `products_id` (stores/cart.ts:102), not `ids`. + const byIds = await probe('product: by-ids', 'POST', 'admin/products/by-ids', { + products_id: [aProduct.id], + }); + if (byIds && Array.isArray(byIds) && byIds.length === 0) { + broken.push({ + label: 'product: by-ids returned nothing for a known id', + method: 'POST', + path: 'admin/products/by-ids', + status: '200-empty', + detail: `asked for ${aProduct.id}, got []`, + }); + console.log(' FAIL product: by-ids returned [] for a product that exists'); + } + } + + console.log('\n── WHOLESALE ORDERS ─────────────────────────────────'); + const wOrders = await probe('orders: wholesale list', 'POST', 'admin/orders/wholesale/list', page); + await probe('orders: tamin list', 'POST', 'admin/orders/tamin/list', page); + await probe('orders: status options', 'GET', 'admin/orders/status-options'); + await probe('orders: type options', 'GET', 'admin/orders/type-options'); + const anOrder = wOrders?.rows?.[0]; + if (anOrder) { + await probe('order: detail', 'GET', `admin/orders/${anOrder.id}`); + } + + console.log('\n── DOCUMENTS ────────────────────────────────────────'); + const docs = await probe('documents: list', 'POST', 'admin/documents/list', page); + const aDoc = docs?.rows?.[0]; + if (aDoc) await probe('document: detail', 'GET', `admin/documents/${aDoc.id}`); + + console.log('\n── SUPPORTING LOOKUPS THE B2B FORMS NEED ────────────'); + await probe('cities: list', 'POST', 'admin/cities/list', { page: 1, limit: 500 }); + await probe('branches: list', 'POST', 'admin/branches/list', page); + await probe('workshops: list', 'POST', 'admin/workshops/list', page); + await probe('pre-orders: list', 'POST', 'admin/pre-orders/list', page); + await probe('users: list', 'POST', 'admin/users/list', page); + + console.log(`\n${'='.repeat(62)}`); + console.log(`B2B SCAN: ${ok.length} ok, ${broken.length} broken`); + if (broken.length) { + console.log('\nBROKEN:'); + for (const b of broken) { + console.log(` - [${b.status}] ${b.label}`); + console.log(` ${b.method} ${b.path}`); + console.log(` ${JSON.stringify(b.detail).slice(0, 300)}`); + } + } + console.log('='.repeat(62)); + + await prisma.$disconnect(); + process.exit(broken.length ? 1 : 0); +})().catch(async (e) => { + console.error(e); + await prisma.$disconnect(); + process.exit(1); +}); diff --git a/apps/api/scripts/smoke-admin-b2b-writes.cjs b/apps/api/scripts/smoke-admin-b2b-writes.cjs new file mode 100644 index 0000000..956703f --- /dev/null +++ b/apps/api/scripts/smoke-admin-b2b-writes.cjs @@ -0,0 +1,244 @@ +/** + * B2B admin WRITE paths (D19 step 2) — the money-touching operations the + * wholesale desk performs daily, which a read-only scan cannot cover: + * + * place an order for a customer from the admin panel + * record a payment document (cash) and confirm it + * + * Both move a customer's gold/rial debt, so each assertion checks the LEDGER, + * not just the HTTP status. Everything created here is removed again, and the + * customer's balances are compared before and after to prove nothing was left + * behind. + * + * Usage: node scripts/smoke-admin-b2b-writes.cjs [apiBaseUrl] + */ +const { PrismaClient } = require('@prisma/client'); +const prisma = new PrismaClient(); +const API = (process.argv[2] || 'http://localhost:3000/api').replace(/\/$/, ''); + +let pass = 0; +let fail = 0; +const failures = []; +const chk = (c, m) => { + if (c) { + pass++; + console.log(' PASS ' + m); + } else { + fail++; + failures.push(m); + console.log(' FAIL ' + m); + } +}; +const step = (t) => console.log('\n' + t); + +let H = {}; +const call = async (method, p, body) => { + const res = await fetch(`${API}/${p}`, { + method, + headers: H, + body: body === undefined ? undefined : JSON.stringify(body), + }); + const text = await res.text(); + let payload = null; + try { + payload = JSON.parse(text); + } catch { + /* empty */ + } + return { status: res.status, ok: res.ok, body: payload, raw: text }; +}; + +const createdOrders = []; +const createdEntries = []; + +(async () => { + const login = await fetch(`${API}/admin/auth/login`, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ phone: '09128081392', password: '09128081392' }), + }); + const auth = await login.json(); + if (!auth.api_token) { + console.log('login failed'); + process.exit(1); + } + H = { 'Content-Type': 'application/json', Authorization: 'Bearer ' + auth.api_token }; + + // A WHOLESALE customer — retail is out of scope (D13). + const customer = await prisma.customer.findFirst({ + where: { kind: { not: 'RETAIL' }, isActive: true, isArchived: false }, + select: { id: true, fullName: true, goldDebtGrams: true, fiatDebtRial: true }, + }); + if (!customer) { + console.log('no wholesale customer available'); + process.exit(1); + } + console.log(`Customer under test: ${customer.fullName}`); + console.log(` gold debt before: ${customer.goldDebtGrams} rial debt before: ${customer.fiatDebtRial}`); + + const variant = await prisma.productVariant.findFirst({ + where: { OR: [{ qty: { gt: 0 } }, { isPreOrder: true }] }, + select: { id: true, title: true, rashWeightGrams: true, defaultWagePercent: true }, + }); + if (!variant) { + console.log('no orderable variant available'); + process.exit(1); + } + + // ── 1. ADMIN PLACES AN ORDER ──────────────────────────────────────────── + step('1 — PLACE A WHOLESALE ORDER FROM THE ADMIN PANEL'); + const wage = Number(variant.defaultWagePercent); + const order = await call('POST', 'admin/orders/create', { + customer_id: customer.id, + order_items: [{ vid: variant.id, qty: 2, percent: wage }], + note: 'سفارش آزمایشی تحویل', + }); + chk(order.ok, `POST admin/orders/create -> ${order.status}` + (order.ok ? '' : ` ${order.raw.slice(0, 200)}`)); + + const orderId = order.body?.id ?? order.body?.order?.id; + if (orderId) createdOrders.push(orderId); + chk(Boolean(orderId), 'an order id came back'); + + if (orderId) { + const row = await prisma.order.findUnique({ + where: { id: orderId }, + include: { items: true }, + }); + chk(row?.customerId === customer.id, 'the order is attached to the chosen customer'); + chk(row?.items.length === 1, 'the line item was saved'); + chk(row?.items[0]?.quantity === 2, 'the quantity (2) was saved'); + + // The reference formula, per unit: rash * (1 + (wage - discount)/100) + const rash = Number(variant.rashWeightGrams); + const expectedPerUnit = rash * (1 + wage / 100); + const actualPerUnit = Number(row?.items[0]?.computedWeightGrams ?? 0); + chk( + Math.abs(actualPerUnit - expectedPerUnit) < 0.00005, + `making charge per unit: ${rash}g +${wage}% = ${expectedPerUnit.toFixed(4)} (got ${actualPerUnit})`, + ); + chk( + Math.abs(Number(row?.totalGoldWeightGrams ?? 0) - expectedPerUnit * 2) < 0.00005, + `the order total is the per-unit weight x2 (${(expectedPerUnit * 2).toFixed(4)})`, + ); + + step('1b — the order appears in the wholesale grid'); + const grid = await call('POST', 'admin/orders/wholesale/list', { page: 1, limit: 50 }); + chk(grid.ok, `POST admin/orders/wholesale/list -> ${grid.status}`); + chk( + (grid.body?.rows ?? []).some((r) => r.id === orderId), + 'the new order is listed', + ); + + step('1c — its detail opens'); + const detail = await call('GET', `admin/orders/${orderId}`); + chk(detail.ok, `GET admin/orders/:id -> ${detail.status}`); + chk(Array.isArray(detail.body?.activity), 'the status timeline came back'); + } + + // ── 2. RECORD A PAYMENT DOCUMENT ──────────────────────────────────────── + step('2 — RECORD A CASH PAYMENT DOCUMENT'); + const before = await prisma.customer.findUnique({ + where: { id: customer.id }, + select: { goldDebtGrams: true, fiatDebtRial: true }, + }); + + // type 4 = «پولی» (cash), which takes `price` + `price_per_gram` + // (addFinDoc.vue:33,104-115). Type 2 is «حواله» and takes a weight in + // `value` — sending cash fields with type 2 yields a zero amount and a 400. + const doc = await call('POST', 'admin/documents', { + type: 4, + customer_id: customer.id, + price: 10000000, + price_per_gram: 50000000, + note: 'پرداخت آزمایشی تحویل', + }); + chk(doc.ok, `POST admin/documents -> ${doc.status}` + (doc.ok ? '' : ` ${doc.raw.slice(0, 200)}`)); + const docId = doc.body?.id; + if (docId) createdEntries.push(docId); + chk(Boolean(docId), 'a document id came back'); + + if (docId) { + const entry = await prisma.ledgerEntry.findUnique({ where: { id: docId } }); + chk(Boolean(entry), 'a ledger entry was written'); + chk(entry?.customerId === customer.id, 'it is attached to the right customer'); + chk(entry?.confirmed === false, 'it starts UNCONFIRMED, as the reference does'); + + step('2b — it appears in the documents grid'); + const dlist = await call('POST', 'admin/documents/list', { page: 1, limit: 50 }); + chk(dlist.ok, `POST admin/documents/list -> ${dlist.status}`); + chk((dlist.body?.rows ?? []).some((r) => r.id === docId), 'the new document is listed'); + + step('2c — CONFIRM it, and the customer balance moves'); + const conf = await call('POST', `admin/documents/${docId}/confirm`); + chk(conf.ok, `POST admin/documents/:id/confirm -> ${conf.status}`); + const afterConfirm = await prisma.ledgerEntry.findUnique({ where: { id: docId } }); + chk(afterConfirm?.confirmed === true, 'the entry is now confirmed'); + + const balAfter = await prisma.customer.findUnique({ + where: { id: customer.id }, + select: { goldDebtGrams: true, fiatDebtRial: true }, + }); + const moved = + String(balAfter?.goldDebtGrams) !== String(before?.goldDebtGrams) || + String(balAfter?.fiatDebtRial) !== String(before?.fiatDebtRial); + chk(moved, `confirming moved the balance (gold ${before?.goldDebtGrams} -> ${balAfter?.goldDebtGrams})`); + + step('2d — confirm is a TOGGLE, as the reference has it'); + const unconf = await call('POST', `admin/documents/${docId}/confirm`); + chk(unconf.ok, `second confirm -> ${unconf.status}`); + const toggled = await prisma.ledgerEntry.findUnique({ where: { id: docId } }); + chk(toggled?.confirmed === false, 'it toggled back to unconfirmed'); + + const balBack = await prisma.customer.findUnique({ + where: { id: customer.id }, + select: { goldDebtGrams: true, fiatDebtRial: true }, + }); + chk( + String(balBack?.goldDebtGrams) === String(before?.goldDebtGrams) && + String(balBack?.fiatDebtRial) === String(before?.fiatDebtRial), + 'un-confirming restored the balance exactly', + ); + } + + // ── CLEANUP ───────────────────────────────────────────────────────────── + step('CLEANUP'); + if (createdEntries.length) { + await prisma.ledgerEntry.deleteMany({ where: { id: { in: createdEntries } } }); + } + if (createdOrders.length) { + await prisma.orderItem.deleteMany({ where: { orderId: { in: createdOrders } } }); + await prisma.orderStatusEvent.deleteMany({ where: { orderId: { in: createdOrders } } }); + await prisma.ledgerEntry.deleteMany({ where: { orderId: { in: createdOrders } } }); + await prisma.order.deleteMany({ where: { id: { in: createdOrders } } }); + } + + const finalBal = await prisma.customer.findUnique({ + where: { id: customer.id }, + select: { goldDebtGrams: true, fiatDebtRial: true }, + }); + chk( + String(finalBal?.goldDebtGrams) === String(customer.goldDebtGrams) && + String(finalBal?.fiatDebtRial) === String(customer.fiatDebtRial), + `the customer's balances are exactly as they started ` + + `(gold ${finalBal?.goldDebtGrams}, rial ${finalBal?.fiatDebtRial})`, + ); + console.log( + ` deleted ${createdOrders.length} order(s) and ${createdEntries.length} ledger entry/entries ` + + 'created by this run. No pre-existing data was removed.', + ); + + console.log(`\n${'='.repeat(60)}`); + console.log(`B2B WRITE SMOKE: passed ${pass} failed ${fail}`); + if (fail) { + console.log('\nFailures:'); + failures.forEach((f) => console.log(' - ' + f)); + } + console.log('='.repeat(60)); + + await prisma.$disconnect(); + process.exit(fail ? 1 : 0); +})().catch(async (e) => { + console.error('\nABORTED:', e); + await prisma.$disconnect(); + process.exit(1); +}); diff --git a/apps/api/scripts/smoke-admin.cjs b/apps/api/scripts/smoke-admin.cjs new file mode 100644 index 0000000..b785360 --- /dev/null +++ b/apps/api/scripts/smoke-admin.cjs @@ -0,0 +1,308 @@ +/** + * Delivery smoke test — the admin flows the owner listed (D19 step 3): + * + * login → create a customer → create and edit a sales expert + * → create and edit a product with variants + * → view an order and change its status + * + * This is a WORKING check, not a parity audit: each step asserts that the + * operation actually took effect in the database, not merely that the HTTP + * call returned 200. A 200 with a silently-dropped field is exactly the class + * of bug this is meant to catch. + * + * Every Persian string is a literal in this file and travels as UTF-8 JSON — + * never as a shell argument (D15). + * + * Usage: node scripts/smoke-admin.cjs [apiBaseUrl] + */ +const { PrismaClient } = require('@prisma/client'); +const prisma = new PrismaClient(); +const API = (process.argv[2] || 'http://localhost:3000/api').replace(/\/$/, ''); + +let pass = 0; +let fail = 0; +const failures = []; +const chk = (cond, msg) => { + if (cond) { + pass++; + console.log(' PASS ' + msg); + } else { + fail++; + failures.push(msg); + console.log(' FAIL ' + msg); + } +}; +const step = (t) => console.log('\n' + t); + +/** Records created by this run, removed at the end. */ +const created = { customers: [], adminUsers: [], products: [] }; + +let H = {}; + +const call = async (method, path, body) => { + const res = await fetch(`${API}/${path}`, { + method, + headers: H, + body: body === undefined ? undefined : JSON.stringify(body), + }); + let payload = null; + try { + payload = await res.json(); + } catch { + /* empty body */ + } + return { status: res.status, ok: res.ok, body: payload }; +}; + +(async () => { + // ── 1. LOGIN ──────────────────────────────────────────────────────────── + step('1 — ADMIN LOGIN'); + const login = await fetch(`${API}/admin/auth/login`, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ phone: '09128081392', password: '09128081392' }), + }); + const auth = await login.json(); + chk(login.status === 200 || login.status === 201, `POST admin/auth/login -> ${login.status}`); + chk(typeof auth.api_token === 'string', 'a token came back'); + if (!auth.api_token) { + console.log('\nCannot continue without a token.'); + process.exit(1); + } + H = { 'Content-Type': 'application/json', Authorization: 'Bearer ' + auth.api_token }; + + const unique = String(Date.now()).slice(-7); + + // ── 2. CREATE A CUSTOMER ──────────────────────────────────────────────── + step('2 — CREATE A WHOLESALE CUSTOMER'); + const custMobile = '0912' + unique; + const cust = await call('POST', 'admin/customers-omde/create', { + fname: 'سمیرا', + lname: 'کریمی', + name: 'سمیرا کریمی', + mobile: custMobile, + percent: 3, + type: 2, + store_name: 'گالری سمیرا', + gram_level: 150, + }); + chk(cust.ok, `POST customers-omde/create -> ${cust.status}`); + const custId = cust.body?.id; + if (custId) created.customers.push(custId); + chk(Boolean(custId), 'an id came back'); + + if (custId) { + const row = await prisma.customer.findUnique({ where: { id: custId } }); + chk(row?.firstName === 'سمیرا' && row?.lastName === 'کریمی', 'the name parts were stored separately'); + chk(row?.fullName === 'سمیرا کریمی', 'fullName was rebuilt by the trigger'); + chk(String(row?.makingChargeOffsetPercent) === '3', 'percent persisted as 3'); + chk(row?.storeName === 'گالری سمیرا', 'store_name persisted'); + } + + step('2b — Persian digits in the mobile are normalised (D19 gap 2)'); + const faMobile = '۰۹۱۳' + unique; + const faCust = await call('POST', 'admin/customers-omde/create', { + fname: 'نگین', + lname: 'مرادی', + mobile: faMobile, + percent: 3, + type: 2, + }); + chk(faCust.ok, `create with Persian digits -> ${faCust.status}`); + if (faCust.body?.id) { + created.customers.push(faCust.body.id); + const row = await prisma.customer.findUnique({ where: { id: faCust.body.id } }); + chk(row?.mobile === '0913' + unique, `stored as ASCII "${row?.mobile}" (not Persian digits)`); + } + + // ── 3. SALES EXPERT: CREATE, READ BACK, EDIT ──────────────────────────── + step('3 — CREATE A SALES EXPERT'); + const expMobile = '0914' + unique; + const exp = await call('POST', 'admin/users', { + fname: 'محمد علی', + lname: 'احمدی', + name: 'محمد علی احمدی', + mobile: expMobile, + password: 'Test12345', + role: 'SALES_EXPERT', + percent: 4.5, + gram_level: 250, + }); + chk(exp.ok, `POST admin/users -> ${exp.status}`); + const expId = exp.body?.id; + if (expId) created.adminUsers.push(expId); + chk(Boolean(expId), 'an id came back'); + + if (expId) { + const row = await prisma.adminUser.findUnique({ + where: { id: expId }, + include: { salesExpertProfile: true }, + }); + chk(row?.firstName === 'محمد علی', 'a two-token first name was NOT re-split'); + chk(row?.lastName === 'احمدی', 'lastName stored'); + chk(Boolean(row?.salesExpertProfile), 'the SalesExpertProfile was auto-created'); + + step('3b — EDIT the sales expert (one field only)'); + const edit = await call('PUT', `admin/users/${expId}`, { gram_level: 999 }); + chk(edit.ok, `PUT admin/users/:id -> ${edit.status}`); + const after = await prisma.adminUser.findUnique({ + where: { id: expId }, + include: { salesExpertProfile: true }, + }); + chk(String(after?.salesExpertProfile?.gramLevel) === '999', 'gram_level was persisted'); + chk(after?.firstName === 'محمد علی' && after?.lastName === 'احمدی', 'the name was untouched'); + + const grid = await call('POST', 'admin/customers-omde/reagent/list', { page: 1, limit: 200 }); + chk(grid.ok, `POST reagent/list -> ${grid.status}`); + const mine = (grid.body?.rows ?? []).find((r) => r.id === expId); + chk(Boolean(mine), 'the expert appears in the grid'); + chk(mine?.fname === 'محمد علی' && mine?.lname === 'احمدی', 'the grid shows the real name parts'); + } + + // ── 4. PRODUCT + VARIANTS: CREATE, READ BACK, EDIT ────────────────────── + step('4 — CREATE A PRODUCT WITH VARIANTS'); + const prod = await call('POST', 'admin/products/create', { + title: 'انگشتر طلا ' + unique, + body_html: 'توضیح آزمایشی', + product_code: 'SMK-' + unique, + show_type: 3, + is_active: true, + variants: [ + { title: 'سایز ۱', grams: 2.5, percentage_pay: 7, qty: 4 }, + { title: 'سایز ۲', grams: 3.25, percentage_pay: 7, qty: 0, is_pre_order: true }, + ], + }); + chk(prod.ok, `POST admin/products/create -> ${prod.status}`); + const prodId = prod.body?.id; + if (prodId) created.products.push(prodId); + chk(Boolean(prodId), 'an id came back'); + + if (prodId) { + const variants = await prisma.productVariant.findMany({ + where: { productId: prodId }, + orderBy: { title: 'asc' }, + }); + chk(variants.length === 2, `both variants were created (got ${variants.length})`); + chk( + variants.some((v) => String(v.rashWeightGrams) === '2.5'), + 'the 2.5g weight round-tripped exactly (no float drift)', + ); + chk( + variants.some((v) => String(v.defaultWagePercent) === '7'), + 'the making charge (اجرت) persisted as 7', + ); + chk(variants.every((v) => Boolean(v.sku)), 'every variant got a SKU'); + chk( + variants.some((v) => v.isPreOrder === true), + 'the pre-order flag persisted', + ); + + step('4b — OPEN the product for edit'); + const show = await call('GET', `admin/products/${prodId}`); + chk(show.ok, `GET admin/products/:id -> ${show.status}`); + chk(show.body?.title === 'انگشتر طلا ' + unique, 'the title reads back intact'); + // The form reads `variants_all` (AddProduct.vue:488), not `variants`. + const shownVariants = show.body?.variants_all ?? []; + chk(shownVariants.length === 2, `the edit form receives both variants (got ${shownVariants.length})`); + + step('4c — EDIT the product'); + const upd = await call('PUT', `admin/products/${prodId}`, { title: 'انگشتر طلا ویرایش‌شده' }); + chk(upd.ok, `PUT admin/products/:id -> ${upd.status}`); + const afterP = await prisma.product.findUnique({ where: { id: prodId } }); + chk(afterP?.title === 'انگشتر طلا ویرایش‌شده', 'the new title persisted'); + chk(afterP?.productCode === 'SMK-' + unique, 'product_code was NOT wiped by the partial edit'); + + const stillThere = await prisma.productVariant.count({ where: { productId: prodId } }); + chk(stillThere === 2, `the variants survived the edit (${stillThere} of 2)`); + } + + // ── 5. ORDERS: LIST, VIEW, CHANGE STATUS ──────────────────────────────── + step('5 — ORDER LIST / DETAIL / STATUS'); + const orders = await call('POST', 'admin/orders/list', { page: 1, limit: 5 }); + chk(orders.ok, `POST admin/orders/list -> ${orders.status}`); + + const wholesale = await call('POST', 'admin/orders/wholesale/list', { page: 1, limit: 5 }); + chk(wholesale.ok, `POST admin/orders/wholesale/list -> ${wholesale.status}`); + + const statusOpts = await call('GET', 'admin/orders/status-options'); + chk(statusOpts.ok, `GET admin/orders/status-options -> ${statusOpts.status}`); + + const anyOrder = + (orders.body?.rows ?? [])[0] ?? (wholesale.body?.rows ?? [])[0] ?? null; + + if (!anyOrder) { + console.log(' (no order exists in this database — detail/status checks skipped)'); + } else { + const detail = await call('GET', `admin/orders/${anyOrder.id}`); + chk(detail.ok, `GET admin/orders/:id -> ${detail.status}`); + chk(Boolean(detail.body?.id), 'the order detail came back'); + + const before = await prisma.order.findUnique({ where: { id: anyOrder.id } }); + const options = Array.isArray(statusOpts.body) ? statusOpts.body : []; + // Pick a status that is NOT the current one, so the write is observable. + const targetOpt = options.find( + (o) => String(o.id ?? o.value) !== String(before?.status), + ); + + if (!targetOpt || !before) { + console.log(' (no alternative status available — status change skipped)'); + } else { + const target = String(targetOpt.id ?? targetOpt.value); + // UpdateOrderStatusDto requires `orderId` — the exact field the retail + // List.vue screen was failing to send (fixed in this batch). + const res = await call('POST', 'admin/orders/status', { + orderId: anyOrder.id, + status: target, + }); + chk(res.ok, `POST admin/orders/status -> ${res.status}`); + + const after = await prisma.order.findUnique({ where: { id: anyOrder.id } }); + chk(String(after?.status) === target, `the status actually changed to ${target}`); + + // Put it back exactly as it was — this is live data, not a fixture. + await prisma.order.update({ + where: { id: anyOrder.id }, + data: { status: before.status }, + }); + const restored = await prisma.order.findUnique({ where: { id: anyOrder.id } }); + chk(restored?.status === before.status, 'the original status was restored'); + } + } + + // ── CLEANUP ───────────────────────────────────────────────────────────── + step('CLEANUP — removing only the rows this run created'); + if (created.products.length) { + await prisma.productVariant.deleteMany({ where: { productId: { in: created.products } } }); + await prisma.productImage.deleteMany({ where: { productId: { in: created.products } } }); + await prisma.product.deleteMany({ where: { id: { in: created.products } } }); + } + if (created.adminUsers.length) { + await prisma.salesExpertProfile.deleteMany({ + where: { adminUserId: { in: created.adminUsers } }, + }); + await prisma.adminUser.deleteMany({ where: { id: { in: created.adminUsers } } }); + } + if (created.customers.length) { + await prisma.customer.deleteMany({ where: { id: { in: created.customers } } }); + } + console.log( + ` deleted: ${created.products.length} product(s) + their variants/images, ` + + `${created.adminUsers.length} admin user(s) + profiles, ` + + `${created.customers.length} customer(s). No pre-existing data was removed.`, + ); + + console.log(`\n${'='.repeat(60)}`); + console.log(`ADMIN SMOKE: passed ${pass} failed ${fail}`); + if (fail) { + console.log('\nFailures:'); + failures.forEach((f) => console.log(' - ' + f)); + } + console.log('='.repeat(60)); + + await prisma.$disconnect(); + process.exit(fail ? 1 : 0); +})().catch(async (e) => { + console.error('\nSMOKE ABORTED:', e); + await prisma.$disconnect(); + process.exit(1); +}); diff --git a/apps/api/scripts/smoke-apps.cjs b/apps/api/scripts/smoke-apps.cjs new file mode 100644 index 0000000..6b09078 --- /dev/null +++ b/apps/api/scripts/smoke-apps.cjs @@ -0,0 +1,297 @@ +/** + * Delivery smoke test — the customer-app flows the owner listed (D19 step 3): + * + * login with the master OTP → see products → add to cart → place an order + * → see my orders + * + * Both apps talk to ONE API through an identical `api` object + * (apps/*\/src/api/client.ts), so the network flow is exercised once here. + * What differs between the apps is the client-side cart logic, so the cart + * rules are asserted against BOTH stores' real source, loaded from disk — + * otherwise "the apps work" would only ever prove v1 works. + * + * Requires the API to be running WITH OTP_MASTER_CODE set (see below). + * Every Persian string is a literal here, never a shell argument (D15). + * + * Usage: node scripts/smoke-apps.cjs [apiBaseUrl] [masterCode] + */ +const fs = require('fs'); +const path = require('path'); +const { PrismaClient } = require('@prisma/client'); + +const prisma = new PrismaClient(); +const API = (process.argv[2] || 'http://localhost:3000/api').replace(/\/$/, ''); +const MASTER = process.argv[3] || '778899'; + +let pass = 0; +let fail = 0; +const failures = []; +const chk = (cond, msg) => { + if (cond) { + pass++; + console.log(' PASS ' + msg); + } else { + fail++; + failures.push(msg); + console.log(' FAIL ' + msg); + } +}; +const step = (t) => console.log('\n' + t); + +/** Differences found between the two apps, reported at the end. */ +const divergences = []; + +const createdOrders = []; + +let token = null; +const H = () => ({ + 'Content-Type': 'application/json', + ...(token ? { Authorization: 'Bearer ' + token } : {}), +}); + +const call = async (method, p, body) => { + const res = await fetch(`${API}/${p}`, { + method, + headers: H(), + body: body === undefined ? undefined : JSON.stringify(body), + }); + let payload = null; + try { + payload = await res.json(); + } catch { + /* empty */ + } + return { status: res.status, ok: res.ok, body: payload }; +}; + +// ── The cart rules, evaluated against each app's OWN source ──────────────── +// +// The stores are Pinia modules, so rather than boot Pinia we extract the two +// pure functions the stock ceiling depends on and run them directly. If either +// app's source stops defining them, that is itself the failure. +function loadCartRules(app) { + const file = path.join(__dirname, '..', '..', app, 'src', 'stores', 'cartStore.ts'); + const src = fs.readFileSync(file, 'utf8'); + + const capBody = src.match(/capQty\(want: number, variant: \{[^}]*\}\) \{([\s\S]*?)\n \}/); + const guard = /const target = data\.product\?\.variants\?\.find/.test(src); + const clamp = /if \(field === 'qty'\) \{/.test(src); + + return { + src, + hasCapQty: Boolean(capBody), + hasMaxQty: /maxQty\(item: Pick\)/.test(src), + hasAddGuard: guard, + hasQtyClamp: clamp, + // Rebuild capQty from the app's own body so the rule under test is the + // shipped one, not a copy written here. + capQty: capBody + ? new Function('want', 'variant', capBody[1].replace(/this\./g, '')) + : null, + }; +} + +(async () => { + // ── 0. BOTH APPS' CART RULES ──────────────────────────────────────────── + step('0 — CART STOCK RULES, in each app\'s own source'); + const v1 = loadCartRules('user-app'); + const v2 = loadCartRules('user-app-v2'); + + for (const [name, m] of [['user-app', v1], ['user-app-v2', v2]]) { + chk(m.hasCapQty, `${name}: capQty() exists`); + chk(m.hasMaxQty, `${name}: maxQty() exists`); + chk(m.hasAddGuard, `${name}: addToCart refuses an un-orderable variant`); + chk(m.hasQtyClamp, `${name}: updateFeild clamps a qty change`); + } + + if (v1.capQty && v2.capQty) { + const cases = [ + { want: 10, variant: { qty: 3 }, expect: 3, label: 'want 10 of 3 in stock -> 3' }, + { want: 2, variant: { qty: 5 }, expect: 2, label: 'want 2 of 5 in stock -> 2' }, + { want: 99, variant: { qty: 0, isPreOrder: true }, expect: 99, label: 'pre-order is uncapped' }, + { want: 0, variant: { qty: 5 }, expect: 1, label: 'a zero quantity floors at 1' }, + { want: -4, variant: { qty: 5 }, expect: 1, label: 'a negative quantity floors at 1' }, + ]; + for (const c of cases) { + const a = v1.capQty(c.want, c.variant); + const b = v2.capQty(c.want, c.variant); + chk(a === c.expect, `user-app: ${c.label} (got ${a})`); + chk(b === c.expect, `user-app-v2: ${c.label} (got ${b})`); + if (a !== b) divergences.push(`capQty(${c.want}, ${JSON.stringify(c.variant)}): v1=${a} v2=${b}`); + } + } + + const sameStore = v1.src === v2.src; + chk(sameStore, 'the two cart stores are byte-identical'); + if (!sameStore) divergences.push('cartStore.ts differs between the apps'); + + // ── 1. LOGIN WITH THE MASTER CODE ─────────────────────────────────────── + step('1 — LOGIN with the delivery master code'); + const customer = await prisma.customer.findFirst({ + where: { isActive: true, isArchived: false }, + select: { id: true, mobile: true, fullName: true }, + }); + if (!customer) { + console.log(' no active customer in this database — cannot continue'); + process.exit(1); + } + console.log(` (as ${customer.fullName} / ${customer.mobile})`); + + const verify = await call('POST', 'customer/auth/verify-otp', { + username: customer.mobile, + password: MASTER, + }); + chk(verify.ok, `POST customer/auth/verify-otp -> ${verify.status}`); + if (!verify.body?.token) { + console.log('\n The master code was refused. Start the API with OTP_MASTER_CODE set.'); + await prisma.$disconnect(); + process.exit(1); + } + token = verify.body.token; + chk(true, 'a customer token came back'); + + const me = await call('GET', 'customer/me'); + chk(me.ok, `GET customer/me -> ${me.status}`); + chk(me.body?.mobile === customer.mobile, 'it is THIS customer'); + + // ── 2. SEE PRODUCTS ───────────────────────────────────────────────────── + step('2 — SEE PRODUCTS'); + const products = await call('GET', 'catalog/products'); + chk(products.ok, `GET catalog/products -> ${products.status}`); + const list = Array.isArray(products.body) ? products.body : []; + chk(list.length > 0, `the catalogue is not empty (${list.length} products)`); + + const withVariant = list.find((p) => (p.variants ?? []).length > 0); + chk(Boolean(withVariant), 'at least one product has a variant'); + if (withVariant) { + const v = withVariant.variants[0]; + chk(typeof v.rashWeightGrams === 'string', 'weights arrive as strings (no float drift)'); + chk(v.qty !== undefined, 'variants carry qty, so the apps can cap the cart'); + chk(v.isPreOrder !== undefined, 'variants carry isPreOrder'); + } + + const price = await call('GET', 'pricing/latest?karatPerMille=750'); + chk(price.ok, `GET pricing/latest -> ${price.status}`); + + // ── 3. ADD TO CART (the rule both apps apply before ordering) ─────────── + step('3 — ADD TO CART'); + // Pick something actually orderable, exactly as the apps' own guard does. + let chosen = null; + for (const p of list) { + const v = (p.variants ?? []).find((x) => (x.qty ?? 0) > 0 || x.isPreOrder); + if (v) { + chosen = { product: p, variant: v }; + break; + } + } + chk(Boolean(chosen), 'found an orderable variant to order'); + if (!chosen) { + console.log('\n No orderable variant exists — cannot place an order.'); + await prisma.$disconnect(); + process.exit(1); + } + console.log(` (chose "${chosen.product.title}" / "${chosen.variant.title}")`); + + const ceiling = chosen.variant.isPreOrder ? null : chosen.variant.qty; + if (v1.capQty) { + const want = 999; + const capped = v1.capQty(want, chosen.variant); + chk( + ceiling === null ? capped === want : capped === ceiling, + `the cart caps ${want} at ${ceiling === null ? 'uncapped (pre-order)' : ceiling}`, + ); + } + + // ── 4. PLACE AN ORDER ─────────────────────────────────────────────────── + step('4 — PLACE AN ORDER'); + const qty = 1; + const order = await call('POST', 'orders', { + items: [ + { + productVariantId: chosen.variant.id, + quantity: qty, + wagePercent: Number(chosen.variant.defaultWagePercent), + }, + ], + }); + chk(order.ok, `POST orders -> ${order.status}`); + const orderId = order.body?.id; + if (orderId) createdOrders.push(orderId); + chk(Boolean(orderId), 'an order id came back'); + chk(Boolean(order.body?.orderNumber), 'it has an order number'); + + if (orderId) { + const row = await prisma.order.findUnique({ + where: { id: orderId }, + include: { items: true }, + }); + chk(row?.customerId === customer.id, 'the order belongs to the TOKEN customer, not a body id'); + chk(row?.items.length === 1, 'the item was saved'); + + // The reference formula: computed = rash * (1 + (wage - discount)/100) + const rash = Number(chosen.variant.rashWeightGrams); + const wage = Number(chosen.variant.defaultWagePercent); + const expected = rash * (1 + wage / 100); + const actual = Number(row?.items[0]?.computedWeightGrams ?? 0); + chk( + Math.abs(actual - expected) < 0.00005, + `the making charge was applied: ${rash}g +${wage}% = ${expected.toFixed(4)} (got ${actual})`, + ); + } + + step('4b — NEGATIVE: an order with no items is rejected'); + const empty = await call('POST', 'orders', { items: [] }); + chk(empty.status === 400, `POST orders with items:[] -> ${empty.status} (expected 400)`); + + step('4c — NEGATIVE: ordering without a token is rejected'); + const saved = token; + token = null; + const anon = await call('POST', 'orders', { + items: [{ productVariantId: chosen.variant.id, quantity: 1, wagePercent: 7 }], + }); + chk(anon.status === 401, `POST orders unauthenticated -> ${anon.status} (expected 401)`); + token = saved; + + // ── 5. SEE MY ORDERS ──────────────────────────────────────────────────── + step('5 — SEE MY ORDERS'); + const mine = await call('GET', 'customer/me/orders'); + chk(mine.ok, `GET customer/me/orders -> ${mine.status}`); + const rows = Array.isArray(mine.body) ? mine.body : []; + chk(rows.some((o) => o.id === orderId), 'the new order appears in my orders'); + + const ledger = await call('GET', 'customer/me/ledger-entries'); + chk(ledger.ok, `GET customer/me/ledger-entries -> ${ledger.status}`); + + // ── CLEANUP ───────────────────────────────────────────────────────────── + step('CLEANUP'); + if (createdOrders.length) { + await prisma.orderItem.deleteMany({ where: { orderId: { in: createdOrders } } }); + await prisma.orderStatusEvent.deleteMany({ where: { orderId: { in: createdOrders } } }); + await prisma.ledgerEntry.deleteMany({ where: { orderId: { in: createdOrders } } }); + await prisma.order.deleteMany({ where: { id: { in: createdOrders } } }); + } + console.log( + ` deleted ${createdOrders.length} order(s) this run created, with their items, ` + + `status events and ledger entries. No pre-existing data was removed.`, + ); + + console.log(`\n${'='.repeat(60)}`); + console.log(`APPS SMOKE: passed ${pass} failed ${fail}`); + if (fail) { + console.log('\nFailures:'); + failures.forEach((f) => console.log(' - ' + f)); + } + console.log( + divergences.length + ? `\nDIVERGENCES between the apps:\n${divergences.map((d) => ' - ' + d).join('\n')}` + : '\nNo behavioural divergence between user-app and user-app-v2.', + ); + console.log('='.repeat(60)); + + await prisma.$disconnect(); + process.exit(fail ? 1 : 0); +})().catch(async (e) => { + console.error('\nSMOKE ABORTED:', e); + await prisma.$disconnect(); + process.exit(1); +}); diff --git a/apps/api/scripts/test-accounting-tahesab.ts b/apps/api/scripts/test-accounting-tahesab.ts new file mode 100644 index 0000000..ff745e1 --- /dev/null +++ b/apps/api/scripts/test-accounting-tahesab.ts @@ -0,0 +1,254 @@ +/** + * Accounting integration (D27) — end to end against Tahesab's PUBLIC TEST + * server (https://api-test.tahesab.ir), on a THROWAWAY database. + * + * Runs the real services (Nest application context), not mocks: + * 1. config: provider switch, token sealed, generic `const` routes fenced off + * 2. connection test + * 3. F1 verified customer → pushed (searched by mobile first, so re-runs reuse + * the same test account) → linked + * 4. F1 customer pull (one group only) imports accounts into the app + * 5. F2 balance pull + the figure /customer/me now shows + * 6. F5 a product with no image is not in the catalog and cannot be ordered + * 7. F3 an order reaching DELIVERED_TO_AGENT queues a document; the worker + * posts it as TEMPORARY; the rows in Tahesab move exactly the order's + * gold (karat-with-charge rule) + * 8. F6 «گزارش» reads the Tahesab statement + * 9. F3 cancelling the order deletes the (still temporary) document + * 10. F4 item pull: Tahesab items become hidden products + * + * The document is created temporary and deleted again; the only lasting trace + * on the test server is one test account (mobile 09990001111) that later runs + * reuse. + * + * Usage (database name must contain "test" or "e2e" — it is written freely): + * DATABASE_URL=postgresql://…/goldbank_acc_e2e TAHESAB_TEST_TOKEN= \ + * ACCOUNTING_SECRET_KEY=x npx ts-node --transpile-only scripts/test-accounting-tahesab.ts + */ +import { NestFactory } from '@nestjs/core'; +import { Logger } from '@nestjs/common'; +import { OrderStatus, Prisma, PrismaClient, VerificationStep } from '@prisma/client'; + +process.env.ACCOUNTING_WORKER = 'off'; +process.env.IAM_ENABLED = 'false'; + +const DB = process.env.DATABASE_URL ?? ''; +const TOKEN = process.env.TAHESAB_TEST_TOKEN ?? ''; +if (!/test|e2e/i.test(new URL(DB.replace(/^postgresql/, 'http')).pathname)) { + console.error('Refusing: DATABASE_URL must point to a throwaway database (name containing "test" or "e2e").'); + process.exit(2); +} +if (!TOKEN) { + console.error('TAHESAB_TEST_TOKEN is required (the bearer token shown on https://tahesab.ir/APiDoc/).'); + process.exit(2); +} + +let pass = 0; +let fail = 0; +const chk = (c: unknown, m: string) => { + if (c) { + pass += 1; + console.log(` PASS ${m}`); + } else { + fail += 1; + console.log(` FAIL ${m}`); + } +}; +const step = (t: string) => console.log(`\n${t}`); + +async function main() { + const prisma0 = new PrismaClient(); + const { runMigrations } = await import('../src/prisma/migrate'); + await runMigrations(prisma0); + await prisma0.$disconnect(); + + const { AppModule } = await import('../src/app.module'); + const app = await NestFactory.createApplicationContext(AppModule, { logger: ['error'] }); + const { PrismaService } = await import('../src/prisma/prisma.service'); + const { AccountingConfigService } = await import('../src/modules/accounting-sync/accounting-config.service'); + const { AccountingAdminService } = await import('../src/modules/accounting-sync/accounting-admin.service'); + const { AccountingSyncService, factorCodeFor } = await import('../src/modules/accounting-sync/accounting-sync.service'); + const { AccountingWorkerService } = await import('../src/modules/accounting-sync/accounting-worker.service'); + const { AdminCustomersService } = await import('../src/modules/admin-customers/admin-customers.service'); + const { AdminMiscService } = await import('../src/modules/admin-misc/admin-misc.service'); + const { OrdersService } = await import('../src/modules/orders/orders.service'); + const { CatalogService } = await import('../src/modules/catalog/catalog.service'); + const { CustomersService } = await import('../src/modules/customers/customers.service'); + const { CustomerReportService } = await import('../src/modules/customer-report/customer-report.service'); + + const prisma = app.get(PrismaService); + const config = app.get(AccountingConfigService); + const admin = app.get(AccountingAdminService); + const sync = app.get(AccountingSyncService); + const worker = app.get(AccountingWorkerService); + const customersAdmin = app.get(AdminCustomersService); + const misc = app.get(AdminMiscService); + const orders = app.get(OrdersService); + const catalog = app.get(CatalogService); + const customers = app.get(CustomersService); + const report = app.get(CustomerReportService); + + // ── 1 ── + step('1. configuration'); + await config.save({ + provider: 'tahesab', + tahesab: { baseUrl: 'https://api-test.tahesab.ir', dbName: 'TahesabDB', token: TOKEN, timeoutMs: 30000 }, + features: { customers: true, balances: true, report: true, products: true, documents: true }, + mapping: { importCustomerGroups: [{ id: '0', name: 'مشتري' }], newCustomerGroup: { id: '2', name: 'بنکدار' }, karat: 750 }, + }); + const pub = await config.getPublic(); + chk(pub.provider === 'tahesab', 'provider switch saved'); + chk(pub.tahesab.tokenSet && pub.tahesab.tokenReadable, 'token stored and readable by the server'); + chk(!JSON.stringify(pub).includes(TOKEN), 'the admin view never contains the token'); + const row = await prisma.setting.findUnique({ where: { key: 'accounting.config' } }); + chk(!JSON.stringify(row?.value).includes(TOKEN), 'the token is not stored in plain text'); + const consts = await misc.listConsts(); + chk(!consts.some((c: { key: string }) => c.key.startsWith('accounting.')), 'GET const does not list accounting.* rows'); + + // ── 2 ── + step('2. connection test'); + const t = await admin.test('tahesab'); + chk(t.ok, `health: ${JSON.stringify(t).slice(0, 160)}`); + + // ── 3 ── + step('3. F1 push a verified customer'); + const mobile = '09990001111'; + const customer = await prisma.customer.upsert({ + where: { mobile }, + update: {}, + create: { fullName: 'gold-bank smoke', firstName: 'gold-bank', lastName: 'smoke', mobile, nationalCode: null, passwordHash: '!OTP_ONLY_NO_PASSWORD_LOGIN' }, + }); + await prisma.customer.update({ where: { id: customer.id }, data: { verificationStep: VerificationStep.STEP_TWO_SUBMITTED } }); + await customersAdmin.verify({ customer_id: customer.id, sts_verify_step_two: 2 }); + const queued = await prisma.accountingOutbox.findFirst({ where: { kind: 'CUSTOMER_PUSH', entityId: customer.id } }); + chk(queued?.status === 'PENDING', 'VERIFIED queues a CUSTOMER_PUSH in the same transaction'); + await worker.tick('outbox'); + const pushed = await prisma.accountingOutbox.findUnique({ where: { id: queued!.id } }); + chk(pushed?.status === 'SENT', `push sent (${pushed?.status} ${pushed?.lastError ?? ''})`); + const link = await prisma.accountingLink.findFirst({ where: { entityType: 'CUSTOMER', entityId: customer.id } }); + chk(!!link?.externalCode, `customer linked to Tahesab account ${link?.externalCode} (${link?.origin})`); + + // ── 4 ── + step('4. F1 pull (GID 0 «مشتري» only)'); + const before = await prisma.customer.count(); + const pulled = await sync.pullCustomers((await config.active())!); + const after = await prisma.customer.count(); + chk(pulled.scanned > 0, `scanned ${pulled.scanned} accounts, ${pulled.inScope} in scope`); + chk(after - before === pulled.imported, `imported ${pulled.imported}, linked ${pulled.linked}, issues ${pulled.issues}`); + const imported = await prisma.accountingLink.findFirst({ where: { origin: 'IMPORTED' } }); + if (imported) { + const c = await prisma.customer.findUnique({ where: { id: imported.entityId } }); + chk(c?.mobile?.startsWith('09') && c.passwordHash === '!OTP_ONLY_NO_PASSWORD_LOGIN' && c.goldCreditLimitGrams.eq(0), 'imported customer keyed by mobile, OTP-only, credit 0'); + } + + // ── 5 ── + step('5. F2 balances'); + const b = await sync.pullBalances((await config.active())!); + chk(b.updated > 0, `balances updated for ${b.updated}/${b.linked} linked customers`); + const me = await customers.getOrThrow(customer.id); + chk(me.balanceSource === 'accounting', `/customer/me shows the accounting balance (${String(me.goldDebtGrams)} g)`); + + // ── 6 ── + step('6. F5 no image, no app'); + const bare = await prisma.product.create({ + data: { title: 'gb-e2e-noimage', variants: { create: { title: 'v', rashWeightGrams: 1, defaultWagePercent: 10, qty: 5 } } }, + include: { variants: true }, + }); + chk(!(await catalog.listProducts()).some((p) => p.id === bare.id), 'imageless product is not in the catalog'); + let refused = false; + try { + await catalog.getVariantOrThrow(bare.variants[0].id); + } catch { + refused = true; + } + chk(refused, 'imageless product cannot be ordered'); + + // ── 7 ── + step('7. F3 order document'); + const product = await prisma.product.create({ + data: { + title: 'gb-e2e-انگشتر', + images: { create: { url: '/uploads/e2e.jpg' } }, + variants: { + create: [ + { title: '4.2g', rashWeightGrams: '4.2', defaultWagePercent: 10, qty: 10 }, + { title: '10g', rashWeightGrams: '10', defaultWagePercent: 18.5, qty: 10 }, + ], + }, + }, + include: { variants: true }, + }); + chk((await catalog.listProducts()).some((p) => p.id === product.id), 'product with an image is in the catalog'); + const order = await orders.createOrder( + { + items: [ + { productVariantId: product.variants[0].id, quantity: 2, wagePercent: 10 }, + { productVariantId: product.variants[1].id, quantity: 1, wagePercent: 18.5, flatRialCharge: 500000 }, + ], + } as never, + customer.id, + ); + await orders.updateStatus(order.id, OrderStatus.DELIVERED_TO_AGENT); + const docJob = await prisma.accountingOutbox.findFirst({ where: { kind: 'ORDER_DOCUMENT', entityId: order.id } }); + chk(docJob?.status === 'PENDING', 'delivery queued the document with the debt'); + await worker.tick('outbox'); + const docSent = await prisma.accountingOutbox.findUnique({ where: { id: docJob!.id } }); + chk(docSent?.status === 'SENT', `document posted (${docSent?.status} ${docSent?.lastError ?? ''})`); + const a = (await config.active())!; + const factorCode = factorCodeFor(order.id); + // Whatever happens below, the test document must not stay on the shared server. + cleanup = async () => { + await a.provider.deleteDocument(a.settings, { factorCode, ref: null, customerCode: link!.externalCode }).catch(() => undefined); + }; + chk(await a.provider.documentExists(a.settings, { factorCode, ref: null }), `Tahesab finds ${factorCode}`); + const st = await a.provider.getStatement(a.settings, { code: link!.externalCode, from: toJ(), to: toJ() }); + const rows = st.filter((r) => r.documentRef === factorCode); + chk(rows.length === 2 && rows.every((r) => r.temporary), `2 temporary rows in Tahesab (${rows.length})`); + const moved = rows.reduce((s, r) => s.add(r.goldOut), new Prisma.Decimal(0)); + const total = new Prisma.Decimal(order.totalGoldWeightGrams); + chk(moved.sub(total).abs().lte('0.001'), `rows move ${moved.toFixed(3)} g = order total ${total.toFixed(3)} g`); + + // ── 8 ── + step('8. F6 report from Tahesab'); + const sum = (await report.summary(customer.id, 1)) as { source?: string; result: { factor_Code: string }[] }; + chk(sum.source === 'accounting', 'summary comes from the accounting software'); + chk(sum.result.some((r) => r.factor_Code === factorCode), 'the new document is in the statement'); + const other = (await report.detail(customer.id, 'not-mine-000000000000')) as { result: unknown[] }; + chk(other.result.length === 0, 'SEC-16: an id outside the account matches nothing'); + + // ── 9 ── + step('9. F3 cancellation removes the temporary document'); + await orders.updateStatus(order.id, OrderStatus.CANCELLED); + await worker.tick('outbox'); + const del = await prisma.accountingOutbox.findFirst({ where: { kind: 'ORDER_DOCUMENT_DELETE', entityId: order.id } }); + chk(del?.status === 'SENT', `delete job sent (${del?.status} ${del?.lastError ?? ''})`); + chk(!(await a.provider.documentExists(a.settings, { factorCode, ref: null })), 'document gone from Tahesab'); + + // ── 10 ── + step('10. F4 item pull'); + const items = await sync.pullProducts(a); + chk(items.items > 0, `items ${items.items}: imported ${items.imported}, linked ${items.linked}, updated ${items.updated}`); + const itemLink = await prisma.accountingLink.findFirst({ where: { entityType: 'PRODUCT', origin: 'IMPORTED' } }); + if (itemLink) { + chk(!(await catalog.listProducts()).some((p) => p.id === itemLink.entityId), 'an imported item stays hidden until it gets an image'); + } + + await cleanup(); + await app.close(); + console.log(`\n${pass} passed, ${fail} failed`); + process.exit(fail ? 1 : 0); +} + +let cleanup: () => Promise = async () => undefined; + +function toJ() { + // eslint-disable-next-line @typescript-eslint/no-var-requires + const { toJalali } = require('../src/modules/accounting-sync/jalali'); + return toJalali(new Date()); +} + +main().catch(async (err) => { + Logger.error(err); + await cleanup(); + process.exit(1); +}); diff --git a/apps/api/scripts/test-complete-profile.cjs b/apps/api/scripts/test-complete-profile.cjs new file mode 100644 index 0000000..0512f80 --- /dev/null +++ b/apps/api/scripts/test-complete-profile.cjs @@ -0,0 +1,308 @@ +/** + * "تکمیل پروفایل" — POST customer/me/complete-profile and its uploads. + * + * Ports henza_server Major/CustomerController::complete + * (app/Http/Controllers/Major/CustomerController.php:73-108). + * + * Covers what the owner asked for per page — opening, the empty state, the + * error state and the main flow — plus the boundaries that matter here: + * + * 1. the main flow: three uploads, then complete, then VERIFIED + * 2. empty/validation: each id missing in turn is a 400/422 + * 3. error: an id that names no file is refused, and nothing is written + * 4. the customer comes from the TOKEN — no id is accepted from the body + * 5. no token at all is a 401 on both routes + * 6. an expert can complete their own profile too (D21: every customer + * route works for an expert unchanged) + * 7. SEC-14: extra body fields are IGNORED, not mass-assigned. The + * reference did `$customer->update($request->all())`, which let the app + * write gram_level/percent/active onto itself. + * + * Every Persian string is a literal here and travels as UTF-8 JSON (D15). + * + * Requires the API running WITH OTP_MASTER_CODE set. + * Usage: node scripts/test-complete-profile.cjs [apiBaseUrl] [masterCode] + */ +const { PrismaClient } = require('@prisma/client'); +const prisma = new PrismaClient(); +const API = (process.argv[2] || 'http://localhost:3000/api').replace(/\/$/, ''); +const MASTER = process.argv[3] || '1379'; + +let pass = 0, fail = 0; +const failures = []; +const chk = (c, m) => { + if (c) { pass++; console.log(' PASS ' + m); } + else { fail++; failures.push(m); console.log(' FAIL ' + m); } +}; +const step = (t) => console.log('\n' + t); + +const call = async (method, p, body, token) => { + const res = await fetch(`${API}/${p}`, { + method, + headers: { + 'Content-Type': 'application/json', + ...(token ? { Authorization: 'Bearer ' + token } : {}), + }, + body: body === undefined ? undefined : JSON.stringify(body), + }); + const text = await res.text(); + let payload = null; + try { payload = JSON.parse(text); } catch { /* empty */ } + return { status: res.status, ok: res.ok, body: payload, raw: text }; +}; + +/** A one-pixel PNG, so the upload exercises the real MIME whitelist. */ +const PNG = Buffer.from( + 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==', + 'base64', +); + +const upload = async (token, purpose) => { + const form = new FormData(); + form.append('file', new Blob([PNG], { type: 'image/png' }), `${purpose}.png`); + form.append('purpose', purpose); + const res = await fetch(`${API}/customer/me/documents`, { + method: 'POST', + headers: token ? { Authorization: 'Bearer ' + token } : {}, + body: form, + }); + const text = await res.text(); + let payload = null; + try { payload = JSON.parse(text); } catch { /* empty */ } + return { status: res.status, ok: res.ok, body: payload, raw: text }; +}; + +const signIn = (mobile) => + call('POST', 'customer/auth/verify-otp', { username: mobile, password: MASTER }); + +/** Everything this run creates, removed at the end. */ +const made = { admins: [], customers: [], files: [] }; +const uniq = String(Date.now()).slice(-7); + +(async () => { + step('SETUP — an unverified customer, and a sales expert'); + + const mkCustomer = async (suffix, name) => { + const c = await prisma.customer.create({ + data: { + fullName: name, + firstName: name.split(' ')[0], + lastName: name.split(' ').slice(1).join(' '), + mobile: `0917${uniq.slice(0, 3)}${suffix}`, + nationalCode: `nc${uniq}${suffix}`, + passwordHash: '!OTP_ONLY_NO_PASSWORD_LOGIN', kind: 'APP_SHOPKEEPER', isActive: true, + goldCreditLimitGrams: '100', + verificationStep: 'UNVERIFIED', + }, + }); + made.customers.push(c.id); + return c; + }; + + const cust = await mkCustomer('11', 'مشتری مدارک'); + console.log(` customer: ${cust.fullName} (${cust.mobile}) step=${cust.verificationStep}`); + + const expertAdmin = await prisma.adminUser.create({ + data: { + fullName: 'کارشناس مدارک', firstName: 'کارشناس', lastName: 'مدارک', + mobile: `0918${uniq.slice(0, 3)}22`, + passwordHash: '!NO_PASSWORD_SET_YET', role: 'SALES_EXPERT', isActive: true, wagePercent: '3', + }, + }); + await prisma.salesExpertProfile.create({ + data: { adminUserId: expertAdmin.id, gramLevel: '120' }, + }); + made.admins.push(expertAdmin.id); + + // ── 5. NO TOKEN ───────────────────────────────────────────────────────── + step('5 — both routes require a session'); + const anonComplete = await call('POST', 'customer/me/complete-profile', { + business_license_image_id: 'x', shop_image_id: 'x', ncode_image_id: 'x', + }); + chk(anonComplete.status === 401, `complete-profile with no token -> ${anonComplete.status} (expected 401)`); + const anonUpload = await upload(null, 'business-license'); + chk(anonUpload.status === 401, `documents with no token -> ${anonUpload.status} (expected 401)`); + + // ── SIGN IN ───────────────────────────────────────────────────────────── + step('SIGN IN — the customer, through the ordinary app flow'); + await call('POST', 'customer/auth/request-otp', { username: cust.mobile }); + const login = await signIn(cust.mobile); + chk(login.ok, `verify-otp -> ${login.status}`); + const token = login.body?.token; + chk(Boolean(token), 'an app token came back'); + + // The page opens against /customer/me, which is what the router guard reads. + const me = await call('GET', 'customer/me', undefined, token); + chk(me.ok, `GET customer/me -> ${me.status}`); + chk(me.body?.verificationStep === 'UNVERIFIED', + `the page is reachable: verificationStep is ${me.body?.verificationStep}`); + + // ── 2. VALIDATION — the empty state ───────────────────────────────────── + step('2 — EMPTY STATE: each document is required'); + const ids = { business_license_image_id: 'a', shop_image_id: 'b', ncode_image_id: 'c' }; + for (const key of Object.keys(ids)) { + const partial = { ...ids }; + delete partial[key]; + const r = await call('POST', 'customer/me/complete-profile', partial, token); + chk(r.status === 400 || r.status === 422, `missing ${key} -> ${r.status} (expected 400/422)`); + } + const allEmpty = await call('POST', 'customer/me/complete-profile', {}, token); + chk(allEmpty.status === 400 || allEmpty.status === 422, + `an empty body -> ${allEmpty.status} (expected 400/422)`); + + const stillUnverified = await prisma.customer.findUnique({ where: { id: cust.id } }); + chk(stillUnverified.verificationStep === 'UNVERIFIED', + 'a rejected submission left the verification step untouched'); + + // ── 3. ERROR STATE — an id that names no file ─────────────────────────── + step('3 — ERROR STATE: an unknown document id is refused'); + const bogus = await call('POST', 'customer/me/complete-profile', { + business_license_image_id: 'no-such-file-id', + shop_image_id: 'no-such-file-id', + ncode_image_id: 'no-such-file-id', + }, token); + chk(bogus.status === 400, `unknown ids -> ${bogus.status} (expected 400)`); + const afterBogus = await prisma.customer.findUnique({ where: { id: cust.id } }); + chk(afterBogus.verificationStep === 'UNVERIFIED', + 'and nothing was written: still UNVERIFIED'); + chk(afterBogus.businessLicenseUrl === null, + 'and no document URL was stored'); + + // ── 1. MAIN FLOW ──────────────────────────────────────────────────────── + step('1 — MAIN FLOW: upload three documents, then complete'); + const licence = await upload(token, 'business-license'); + chk(licence.ok, `upload the business licence -> ${licence.status}`); + const shop = await upload(token, 'shop-image'); + chk(shop.ok, `upload the shop front -> ${shop.status}`); + const ncode = await upload(token, 'national-card'); + chk(ncode.ok, `upload the national card -> ${ncode.status}`); + + for (const u of [licence, shop, ncode]) if (u.body?.id) made.files.push(u.body.id); + + chk(Boolean(licence.body?.id && licence.body?.url), + 'each upload answers with an id and a stored url'); + chk(licence.body?.uploadedByAdminUserId === null, + 'a customer upload is not attributed to an admin user'); + + const done = await call('POST', 'customer/me/complete-profile', { + business_license_image_id: licence.body.id, + shop_image_id: shop.body.id, + ncode_image_id: ncode.body.id, + }, token); + chk(done.ok, `complete-profile -> ${done.status}`); + + const after = await prisma.customer.findUnique({ where: { id: cust.id } }); + chk(after.verificationStep === 'VERIFIED', + `the step moved to the reference's live value (VERIFIED), got ${after.verificationStep}`); + chk(after.businessLicenseUrl === licence.body.url, 'the business licence url was stored'); + chk(after.shopImageUrl === shop.body.url, 'the shop front url was stored'); + chk(after.nationalIdImageUrl === ncode.body.url, 'the national card url was stored'); + + // The router guard must now keep the page shut. + const meAfter = await call('GET', 'customer/me', undefined, token); + chk(meAfter.body?.verificationStep === 'VERIFIED', + 'the app now reads VERIFIED, so the guard redirects the page home'); + + // ── 7. SEC-14 — extra fields are ignored, not mass-assigned ───────────── + step('7 — SEC-14: extra body fields are IGNORED, not written to the row'); + const before = await prisma.customer.findUnique({ where: { id: cust.id } }); + const inject = await call('POST', 'customer/me/complete-profile', { + business_license_image_id: licence.body.id, + shop_image_id: shop.body.id, + ncode_image_id: ncode.body.id, + // Every one of these was writable through the reference's $request->all(). + goldCreditLimitGrams: '999999', + gram_level: '999999', + goldDebtGrams: '-500', + makingChargeOffsetPercent: '0', + isActive: false, + mobile: '09000000000', + }, token); + chk(inject.status === 400 || inject.ok, + `a body with extra fields -> ${inject.status}`); + + const poked = await prisma.customer.findUnique({ where: { id: cust.id } }); + chk(String(poked.goldCreditLimitGrams) === String(before.goldCreditLimitGrams), + `the credit limit is unchanged (${poked.goldCreditLimitGrams})`); + chk(String(poked.goldDebtGrams) === String(before.goldDebtGrams), + `the gold debt is unchanged (${poked.goldDebtGrams})`); + chk(String(poked.makingChargeOffsetPercent) === String(before.makingChargeOffsetPercent), + `the making charge is unchanged (${poked.makingChargeOffsetPercent})`); + chk(poked.isActive === before.isActive, 'isActive is unchanged'); + chk(poked.mobile === before.mobile, `the mobile is unchanged (${poked.mobile})`); + + // ── 4. THE SUBJECT COMES FROM THE TOKEN ───────────────────────────────── + step('4 — the customer comes from the TOKEN, never from the body'); + const victim = await mkCustomer('44', 'مشتری دیگر'); + const victimBefore = await prisma.customer.findUnique({ where: { id: victim.id } }); + chk(victimBefore.verificationStep === 'UNVERIFIED', 'the second customer starts UNVERIFIED'); + + await call('POST', 'customer/me/complete-profile', { + business_license_image_id: licence.body.id, + shop_image_id: shop.body.id, + ncode_image_id: ncode.body.id, + // Both spellings, in case either were read. + customerId: victim.id, + customer_id: victim.id, + id: victim.id, + }, token); + + const victimAfter = await prisma.customer.findUnique({ where: { id: victim.id } }); + chk(victimAfter.verificationStep === 'UNVERIFIED', + "naming another customer in the body did NOT touch their row"); + chk(victimAfter.businessLicenseUrl === null, + 'and stored no document against them'); + + // ── 6. AN EXPERT CAN COMPLETE THEIR OWN PROFILE ───────────────────────── + step('6 — D21: the same page works for a sales expert'); + await call('POST', 'customer/auth/request-otp', { username: expertAdmin.mobile }); + const expLogin = await signIn(expertAdmin.mobile); + chk(expLogin.ok, `the expert signs in -> ${expLogin.status}`); + const expToken = expLogin.body?.token; + + const prof = await prisma.salesExpertProfile.findUnique({ where: { adminUserId: expertAdmin.id } }); + if (prof?.tradingCustomerId) made.customers.push(prof.tradingCustomerId); + + const expUpload = await upload(expToken, 'business-license'); + chk(expUpload.ok, `the expert uploads a document -> ${expUpload.status}`); + if (expUpload.body?.id) made.files.push(expUpload.body.id); + + const expDone = await call('POST', 'customer/me/complete-profile', { + business_license_image_id: expUpload.body.id, + shop_image_id: expUpload.body.id, + ncode_image_id: expUpload.body.id, + }, expToken); + chk(expDone.ok, `the expert completes their profile -> ${expDone.status}`); + + const expTrading = prof?.tradingCustomerId + ? await prisma.customer.findUnique({ where: { id: prof.tradingCustomerId } }) + : null; + chk(expTrading?.verificationStep === 'VERIFIED', + 'it landed on the expert\'s own trading account, not on anyone else'); + + // ── CLEANUP ───────────────────────────────────────────────────────────── + step('CLEANUP'); + await prisma.uploadedFile.deleteMany({ where: { id: { in: made.files } } }); + await prisma.customerOtp.deleteMany({ where: { customerId: { in: made.customers } } }); + await prisma.salesExpertProfile.deleteMany({ where: { adminUserId: { in: made.admins } } }); + await prisma.customer.deleteMany({ where: { id: { in: made.customers } } }); + await prisma.adminUser.deleteMany({ where: { id: { in: made.admins } } }); + console.log( + ` deleted ${made.files.length} uploaded-file row(s), ${made.customers.length} customer(s) ` + + `(including the expert trading account this run created) and ${made.admins.length} admin user(s). ` + + 'All were created by this run; no pre-existing data was touched. ' + + 'The uploaded blobs themselves are left on disk, as every other test does.', + ); + + console.log(`\n${'='.repeat(60)}`); + console.log(`COMPLETE PROFILE: passed ${pass} failed ${fail}`); + if (fail) { console.log('\nFailures:'); failures.forEach((f) => console.log(' - ' + f)); } + console.log('='.repeat(60)); + + await prisma.$disconnect(); + process.exit(fail ? 1 : 0); +})().catch(async (e) => { + console.error('\nABORTED:', e); + await prisma.$disconnect(); + process.exit(1); +}); diff --git a/apps/api/scripts/test-compose-e2e.cjs b/apps/api/scripts/test-compose-e2e.cjs new file mode 100644 index 0000000..9093062 --- /dev/null +++ b/apps/api/scripts/test-compose-e2e.cjs @@ -0,0 +1,226 @@ +/** + * The whole delivery flow, against the DOCKER COMPOSE stack. + * + * What the owner asked to see proven inside compose: + * 1. a sales expert signs into the app with the master code + * 2. an ordinary customer signs into the app with the master code + * 3. BOTH place an order + * 4. an ADMIN sees both of those orders in the admin panel + * + * Unlike the other scripts this one talks ONLY over HTTP — it never opens a + * Prisma client — because the point is to exercise the deployed container as a + * black box, including its own boot-time migration run. Setup and teardown go + * through the admin API, the same way an operator would. + * + * Usage: node scripts/test-compose-e2e.cjs [apiBaseUrl] [masterCode] + * e.g. node scripts/test-compose-e2e.cjs http://localhost:3100/api 1379 + */ +const API = (process.argv[2] || 'http://localhost:3100/api').replace(/\/$/, ''); +const MASTER = process.argv[3] || '1379'; +const ADMIN_USER = process.argv[4] || '09128081392'; +const ADMIN_PASS = process.argv[5] || '09128081392'; + +let pass = 0, fail = 0; +const failures = []; +const chk = (c, m) => { + if (c) { pass++; console.log(' PASS ' + m); } + else { fail++; failures.push(m); console.log(' FAIL ' + m); } +}; +const step = (t) => console.log('\n' + t); + +const call = async (method, p, body, token) => { + const res = await fetch(`${API}/${p}`, { + method, + headers: { + 'Content-Type': 'application/json', + ...(token ? { Authorization: 'Bearer ' + token } : {}), + }, + body: body === undefined ? undefined : JSON.stringify(body), + }); + const text = await res.text(); + let payload = null; + try { payload = JSON.parse(text); } catch { /* empty */ } + return { status: res.status, ok: res.ok, body: payload, raw: text }; +}; + +const signIn = (mobile) => + call('POST', 'customer/auth/verify-otp', { username: mobile, password: MASTER }); + +const uniq = String(Date.now()).slice(-7); +const made = { customers: [], experts: [], orders: [] }; + +(async () => { + // ── ADMIN ─────────────────────────────────────────────────────────────── + step('0 — ADMIN signs into the panel'); + const adminLogin = await call('POST', 'admin/auth/login', { + phone: ADMIN_USER, + password: ADMIN_PASS, + }); + chk(adminLogin.ok, `POST admin/auth/login -> ${adminLogin.status}`); + const adminToken = adminLogin.body?.api_token; + if (!adminToken) { + console.log('\n Could not sign in as admin; pass the credentials as argv[4]/argv[5].'); + console.log(' Response: ' + adminLogin.raw.slice(0, 300)); + process.exit(1); + } + chk(Boolean(adminToken), 'an admin token came back'); + + // ── SETUP through the ADMIN API, as an operator would ─────────────────── + step('SETUP — create a sales expert and a customer through the admin panel'); + + const expertMobile = `0913${uniq}`; + const expert = await call('POST', 'admin/users', { + fname: 'کارشناس', lname: 'کامپوز', + mobile: expertMobile, password: 'Test12345', + role: 'SALES_EXPERT', percent: 3.5, gram_level: 150, + }, adminToken); + chk(expert.ok, `create the sales expert -> ${expert.status}` + (expert.ok ? '' : ' ' + expert.raw.slice(0, 160))); + if (expert.body?.id) made.experts.push(expert.body.id); + + const custMobile = `0914${uniq}`; + const cust = await call('POST', 'admin/customers-omde/create', { + fname: 'مشتری', lname: 'کامپوز', name: 'مشتری کامپوز', + mobile: custMobile, percent: 3, type: 2, + store_name: 'گالری کامپوز', gram_level: 200, + }, adminToken); + chk(cust.ok, `create the customer -> ${cust.status}` + (cust.ok ? '' : ' ' + cust.raw.slice(0, 160))); + const custId = cust.body?.id; + if (custId) made.customers.push(custId); + + // A product to order. + step('SETUP — find an orderable product variant'); + const products = await call('GET', 'catalog/products'); + chk(products.ok, `GET catalog/products -> ${products.status}`); + const variant = (products.body ?? []) + .flatMap((p) => p.variants ?? []) + .find((v) => v && v.id); + chk(Boolean(variant), `found a variant to order (${variant?.id ?? 'none'})`); + if (!variant) { + console.log(' No product variants in this database — cannot place orders.'); + process.exit(1); + } + + // ── 1. THE EXPERT SIGNS IN ────────────────────────────────────────────── + step('1 — THE SALES EXPERT signs into the app with the master code'); + const expReq = await call('POST', 'customer/auth/request-otp', { username: expertMobile }); + chk(expReq.ok, `request-otp -> ${expReq.status}`); + + const expLogin = await signIn(expertMobile); + chk(expLogin.ok, `verify-otp with the master code -> ${expLogin.status}`); + const expToken = expLogin.body?.token; + chk(Boolean(expToken), 'an app token came back'); + + const whoami = await call('GET', 'expert/whoami', undefined, expToken); + chk(whoami.body?.isSalesExpert === true, + `the app is told this session is an expert (${whoami.body?.isSalesExpert})`); + + // ── 2. THE CUSTOMER SIGNS IN ──────────────────────────────────────────── + step('2 — AN ORDINARY CUSTOMER signs into the app with the master code'); + await call('POST', 'customer/auth/request-otp', { username: custMobile }); + const custLogin = await signIn(custMobile); + chk(custLogin.ok, `verify-otp with the master code -> ${custLogin.status}`); + const custToken = custLogin.body?.token; + chk(Boolean(custToken), 'an app token came back'); + + const custWho = await call('GET', 'expert/whoami', undefined, custToken); + chk(custWho.body?.isSalesExpert === false, + `and is NOT flagged as an expert (${custWho.body?.isSalesExpert})`); + + // ── 3. BOTH PLACE AN ORDER ────────────────────────────────────────────── + step('3 — BOTH place an order from the app'); + + // The exact payload both apps send from the cart (CartView.vue:200-211): + // wagePercent comes from the variant the cart pinned. No customerId — the + // server takes the subject from the token (D21). + const placeOrder = async (token, who) => { + const r = await call('POST', 'orders', { + items: [ + { + productVariantId: variant.id, + quantity: 1, + wagePercent: parseFloat(variant.defaultWagePercent ?? '0'), + }, + ], + }, token); + chk(r.ok, `${who} places an order -> ${r.status}${r.ok ? ' (' + r.body?.orderNumber + ')' : ' ' + r.raw.slice(0, 160)}`); + if (r.body?.id) made.orders.push({ id: r.body.id, number: r.body.orderNumber, who }); + return r.body; + }; + + const expOrder = await placeOrder(expToken, 'the EXPERT'); + const custOrder = await placeOrder(custToken, 'the CUSTOMER'); + + chk(Boolean(expOrder?.orderNumber && custOrder?.orderNumber), + 'both orders came back with an order number'); + chk(expOrder?.orderNumber !== custOrder?.orderNumber, + 'and they are two distinct orders'); + + // Each sees their own order in their own history, and only their own. + const expHistory = await call('GET', 'customer/me/orders', undefined, expToken); + chk(expHistory.body?.some((o) => o.id === expOrder?.id), + "the expert's own order is in the expert's history"); + chk(!expHistory.body?.some((o) => o.id === custOrder?.id), + "and the customer's order is NOT"); + + const custHistory = await call('GET', 'customer/me/orders', undefined, custToken); + chk(custHistory.body?.some((o) => o.id === custOrder?.id), + "the customer's own order is in the customer's history"); + chk(!custHistory.body?.some((o) => o.id === expOrder?.id), + "and the expert's order is NOT"); + + // ── 4. THE ADMIN SEES BOTH ────────────────────────────────────────────── + step('4 — THE ADMIN sees both orders in the panel'); + const list = await call('POST', 'admin/orders/list', { page: 1, limit: 100 }, adminToken); + chk(list.ok, `POST admin/orders/list -> ${list.status}`); + + const rows = list.body?.rows ?? list.body?.data ?? list.body?.result ?? []; + chk(Array.isArray(rows) && rows.length > 0, `the grid returned ${rows.length} row(s)`); + + const findRow = (id, number) => + rows.find((r) => r.id === id || r.orderNumber === number); + + chk(Boolean(findRow(expOrder?.id, expOrder?.orderNumber)), + `the EXPERT's order ${expOrder?.orderNumber} appears in the admin grid`); + chk(Boolean(findRow(custOrder?.id, custOrder?.orderNumber)), + `the CUSTOMER's order ${custOrder?.orderNumber} appears in the admin grid`); + + // And the admin can open each one. + for (const o of made.orders) { + const detail = await call('GET', `orders/admin/${o.id}`, undefined, adminToken); + chk(detail.ok, `the admin can open ${o.who}'s order ${o.number} -> ${detail.status}`); + chk(detail.body?.items?.length > 0, `and it carries its items (${detail.body?.items?.length})`); + } + + // ── 5. TOKEN BOUNDARIES still hold inside compose ─────────────────────── + step('5 — the token boundaries hold in the deployed container too'); + const appOnAdmin = await call('POST', 'admin/orders/list', { page: 1 }, expToken); + chk(appOnAdmin.status === 401 || appOnAdmin.status === 403, + `an expert's APP token on an admin route -> ${appOnAdmin.status}`); + + const custOnExpert = await call('POST', 'expert/my-customers', { search: null }, custToken); + chk(custOnExpert.status === 403 || custOnExpert.status === 401, + `a customer's token on an expert route -> ${custOnExpert.status}`); + + const adminOnApp = await call('GET', 'customer/me', undefined, adminToken); + chk(adminOnApp.status === 401, `an admin token on an app route -> ${adminOnApp.status}`); + + // ── CLEANUP ───────────────────────────────────────────────────────────── + step('CLEANUP'); + console.log(' This run created, through the admin API:'); + for (const o of made.orders) console.log(` order ${o.number} (${o.who})`); + console.log(` customer ${custMobile}, sales expert ${expertMobile}`); + console.log(' They are LEFT IN PLACE deliberately: this is the compose stack, its'); + console.log(' database is separate from development, and the rows are what the'); + console.log(' owner will look at in the panel. Delete them from the admin panel'); + console.log(' after the demo if they are not wanted.'); + + console.log(`\n${'='.repeat(60)}`); + console.log(`COMPOSE END-TO-END: passed ${pass} failed ${fail}`); + if (fail) { console.log('\nFailures:'); failures.forEach((f) => console.log(' - ' + f)); } + console.log('='.repeat(60)); + + process.exit(fail ? 1 : 0); +})().catch((e) => { + console.error('\nABORTED:', e); + process.exit(1); +}); diff --git a/apps/api/scripts/test-master-otp-disabled.cjs b/apps/api/scripts/test-master-otp-disabled.cjs new file mode 100644 index 0000000..f74640a --- /dev/null +++ b/apps/api/scripts/test-master-otp-disabled.cjs @@ -0,0 +1,76 @@ +/** + * The other half of the D20 contract, run against an API started WITHOUT + * OTP_MASTER_CODE: + * * the master code must now be rejected; + * * the real, freshly-issued code must still work. + * + * This is the negative case RULE E1 demands: without it, "the master code + * works" proves nothing about whether it can be switched off. + */ +const { PrismaClient } = require('@prisma/client'); +const prisma = new PrismaClient(); +const API = 'http://localhost:3000/api'; +let pass = 0, fail = 0; +const chk = (c, m) => { c ? pass++ : fail++; console.log((c ? ' PASS ' : ' FAIL ') + m); }; + +const MASTER = '778899'; + +const verify = async (mobile, code) => { + const r = await fetch(API + '/customer/auth/verify-otp', { + method: 'POST', headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ username: mobile, password: code }), + }); + return { status: r.status, body: await r.json().catch(() => ({})) }; +}; + +(async () => { + const c = await prisma.customer.findFirst({ + where: { isActive: true, isArchived: false }, select: { id: true, mobile: true, fullName: true }, + }); + console.log(`Testing against customer ${c.fullName} (${c.mobile})\n`); + + console.log('CASE 3 — NEGATIVE: with the env var absent, the master code is REJECTED'); + const m = await verify(c.mobile, MASTER); + chk(m.status === 401, `HTTP ${m.status} (expected 401)`); + chk(!m.body.token, 'no token issued'); + + console.log('\nCASE 4 — the REAL code still works'); + // Clear the throttle from earlier runs so requestOtp is allowed. + const removed = await prisma.customerOtp.deleteMany({ where: { mobile: c.mobile } }); + console.log(` (cleared ${removed.count} of this test number's own OTP rows to bypass the resend cooldown)`); + + const req = await fetch(API + '/customer/auth/request-otp', { + method: 'POST', headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ username: c.mobile }), + }); + chk(req.status === 200 || req.status === 201, `request-otp -> HTTP ${req.status}`); + + // The code is hashed in the DB, so read it from the server log line that + // dev mode prints instead of trying to reverse the hash. + const fs = require('fs'); + const log = fs.readFileSync(process.argv[2], 'utf8'); + const codeLine = log + .split('\n') + .reverse() + .find((l) => l.includes('OTP for ' + c.mobile)); + const real = codeLine ? (codeLine.match(/:\s*(\d{4})/) || [])[1] : null; + + if (!real) { + console.log(' FAIL could not read the dev OTP from the log; last lines:'); + console.log(log.split('\n').slice(-5).join('\n')); + fail++; + } else { + console.log(` (dev log exposed the code: ${real})`); + const v = await verify(c.mobile, real); + chk(v.status === 200 || v.status === 201, `verify with the REAL code -> HTTP ${v.status}`); + chk(typeof v.body.token === 'string', 'a JWT came back'); + + console.log('\n and it is single-use: replaying the same code fails'); + const again = await verify(c.mobile, real); + chk(again.status === 401, `replay -> HTTP ${again.status} (expected 401)`); + } + + console.log(`\npassed: ${pass} failed: ${fail}`); + await prisma.$disconnect(); + process.exit(fail ? 1 : 0); +})().catch(async (e) => { console.error(e); await prisma.$disconnect(); process.exit(1); }); diff --git a/apps/api/scripts/test-master-otp-live.cjs b/apps/api/scripts/test-master-otp-live.cjs new file mode 100644 index 0000000..7cee77a --- /dev/null +++ b/apps/api/scripts/test-master-otp-live.cjs @@ -0,0 +1,63 @@ +/** + * Live end-to-end check of the D20 master OTP against a running API. + * All Persian text is a literal in this file, never a shell argument (D15). + */ +const { PrismaClient } = require('@prisma/client'); +const prisma = new PrismaClient(); +const API = 'http://localhost:3000/api'; +let pass = 0, fail = 0; +const chk = (c, m) => { c ? pass++ : fail++; console.log((c ? ' PASS ' : ' FAIL ') + m); }; + +const MASTER = '778899'; + +(async () => { + const c = await prisma.customer.findFirst({ + where: { isActive: true, isArchived: false }, select: { id: true, mobile: true, fullName: true }, + }); + if (!c) { console.log('no active customer to test with'); process.exit(1); } + console.log(`Testing against customer ${c.fullName} (${c.mobile})\n`); + + const verify = async (mobile, code) => { + const r = await fetch(API + '/customer/auth/verify-otp', { + method: 'POST', headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ username: mobile, password: code }), + }); + return { status: r.status, body: await r.json().catch(() => ({})) }; + }; + + console.log('CASE 1 — the master code signs an active customer in'); + const a = await verify(c.mobile, MASTER); + chk(a.status === 200 || a.status === 201, `HTTP ${a.status}`); + chk(typeof a.body.token === 'string' && a.body.token.length > 20, 'a JWT came back'); + chk(a.body.customer?.mobile === c.mobile, 'it is THIS customer, not another'); + + console.log('\n the token actually works on a protected customer route'); + const me = await fetch(API + '/customer/me', { headers: { Authorization: 'Bearer ' + a.body.token } }); + chk(me.status === 200, `GET customer/me -> ${me.status}`); + + console.log('\nCASE 1b — Persian digits for the same master code'); + const p = await verify(c.mobile, '۷۷۸۸۹۹'); + chk(p.status === 200 || p.status === 201, `HTTP ${p.status} — faToEn applied to the code`); + + console.log('\nCASE 2 — NEGATIVE: a near-miss code is still rejected'); + const bad = await verify(c.mobile, '778898'); + chk(bad.status === 401, `HTTP ${bad.status} (expected 401)`); + chk(!bad.body.token, 'no token issued'); + + console.log('\nCASE 2b — NEGATIVE: an unknown mobile is rejected even with the master code'); + const unknown = await verify('09999999999', MASTER); + chk(unknown.status === 401, `HTTP ${unknown.status} (expected 401)`); + + console.log('\nCASE 2c — NEGATIVE: an INACTIVE customer is rejected even with the master code'); + const inactive = await prisma.customer.findFirst({ where: { isActive: false }, select: { mobile: true } }); + if (inactive) { + const r = await verify(inactive.mobile, MASTER); + chk(r.status === 401, `HTTP ${r.status} (expected 401)`); + } else { + console.log(' (skipped — no inactive customer in the DB)'); + } + + console.log(`\npassed: ${pass} failed: ${fail}`); + await prisma.$disconnect(); + process.exit(fail ? 1 : 0); +})().catch(async (e) => { console.error(e); await prisma.$disconnect(); process.exit(1); }); diff --git a/apps/api/scripts/test-name-trigger.cjs b/apps/api/scripts/test-name-trigger.cjs new file mode 100644 index 0000000..a22dcdd --- /dev/null +++ b/apps/api/scripts/test-name-trigger.cjs @@ -0,0 +1,109 @@ +/** + * Integration test for the `customer_sync_full_name` database trigger + * (migration 20260922120000_customer_name_parts). + * + * The trigger is SQL, not Prisma, so jest's unit suite cannot cover it — it + * needs a live database. Run it against a development DB: + * + * node scripts/test-name-trigger.cjs + * + * Exits non-zero on any failure. It creates ONE temporary Customer row and + * deletes it again; the deletion is reported on stdout (CHANGELOG rule 2). + * + * The three directions required by the owner's ruling of 2026-09-22: + * parts only -> fullName is rebuilt + * fullName only -> the parts are re-derived + * both at once -> THE PARTS WIN + */ +const { PrismaClient } = require('@prisma/client'); + +const prisma = new PrismaClient(); +let failures = 0; + +function check(condition, message) { + if (!condition) failures++; + console.log(`${condition ? ' PASS' : ' FAIL'} ${message}`); +} + +const read = async (id) => + ( + await prisma.$queryRawUnsafe( + `SELECT "fullName","firstName","lastName","makingChargeOffsetPercent" AS pct + FROM "Customer" WHERE id=$1`, + id, + ) + )[0]; + +(async () => { + const id = 'trigger-test-' + Date.now(); + const unique = Date.now(); + + await prisma.$executeRawUnsafe( + `INSERT INTO "Customer" + (id,"fullName","firstName","lastName",mobile,"nationalCode","passwordHash","updatedAt") + VALUES ($1,'',$2,$3,$4,$5,'x',NOW())`, + id, + 'محمد علی', + 'احمدی', + '09' + String(unique).slice(-9), + 'NC' + unique, + ); + + // The owner's worked example: a two-token FIRST name must survive intact. + console.log('\nCASE 0 — INSERT with parts only («محمد علی» + «احمدی»)'); + let r = await read(id); + console.log(' ', JSON.stringify(r)); + check(r.fullName === 'محمد علی احمدی', 'fullName rebuilt from the parts'); + check(r.firstName === 'محمد علی', 'a two-token first name is NOT re-split'); + check(r.lastName === 'احمدی', 'last name kept separate'); + + console.log('\nCASE 1 — UPDATE the parts only'); + await prisma.$executeRawUnsafe( + `UPDATE "Customer" SET "firstName"='رضا',"lastName"='کریمی' WHERE id=$1`, + id, + ); + r = await read(id); + console.log(' ', JSON.stringify(r)); + check(r.fullName === 'رضا کریمی', 'fullName rebuilt from the parts'); + + console.log('\nCASE 2 — UPDATE fullName only'); + await prisma.$executeRawUnsafe(`UPDATE "Customer" SET "fullName"='سعید موسوی' WHERE id=$1`, id); + r = await read(id); + console.log(' ', JSON.stringify(r)); + check(r.firstName === 'سعید' && r.lastName === 'موسوی', 'parts re-derived from fullName'); + + console.log('\nCASE 3 — UPDATE BOTH in one statement (the parts must win)'); + await prisma.$executeRawUnsafe( + `UPDATE "Customer" SET "fullName"='IGNORED',"firstName"='نرگس',"lastName"='رحیمی' WHERE id=$1`, + id, + ); + r = await read(id); + console.log(' ', JSON.stringify(r)); + check(r.fullName === 'نرگس رحیمی', 'parts win; the submitted fullName is discarded'); + + console.log('\nCASE 4 — a multi-token fullName splits first-token / rest'); + await prisma.$executeRawUnsafe(`UPDATE "Customer" SET "fullName"='سید محمد حسینی' WHERE id=$1`, id); + r = await read(id); + console.log(' ', JSON.stringify(r)); + check(r.firstName === 'سید' && r.lastName === 'محمد حسینی', 'first token / the rest'); + + console.log('\nCASE 5 — an unrelated update leaves the name untouched'); + const before = await read(id); + await prisma.$executeRawUnsafe(`UPDATE "Customer" SET mobile=mobile WHERE id=$1`, id); + const after = await read(id); + check(JSON.stringify(before) === JSON.stringify(after), 'no-op update changes nothing'); + + console.log('\nCASE 6 — makingChargeOffsetPercent'); + check(Number(after.pct) === 0, 'defaults to 0, so no existing price moves'); + + await prisma.$executeRawUnsafe(`DELETE FROM "Customer" WHERE id=$1`, id); + console.log(`\nCleanup: deleted 1 temporary Customer row (${id}).`); + + console.log(failures === 0 ? '\nALL PASSED' : `\n${failures} FAILED`); + await prisma.$disconnect(); + process.exit(failures ? 1 : 0); +})().catch(async (e) => { + console.error(e); + await prisma.$disconnect(); + process.exit(1); +}); diff --git a/apps/api/scripts/test-report.cjs b/apps/api/scripts/test-report.cjs new file mode 100644 index 0000000..53f3904 --- /dev/null +++ b/apps/api/scripts/test-report.cjs @@ -0,0 +1,275 @@ +/** + * "گزارش" — the account statement (D24). + * + * The reference proxied an external accounting system + * (henza_server Customer/TahesabController). The owner chose option الف: build + * the same UI and flow over the target's OWN ledger, with no external call. + * + * Covers what the owner asked for per page — opening, the empty state, the + * error state and the main flow — plus what makes a statement trustworthy: + * + * 1. empty state: a customer with no entries gets an empty result, not a 500 + * 2. main flow: entries appear with the right in/out columns + * 3. the RUNNING BALANCE is correct, and its last value agrees with the + * cached Customer.goldDebtGrams / fiatDebtRial the rest of the app shows + * 4. UNCONFIRMED entries are excluded, exactly as they are from the cached + * balance + * 5. the detail list and the single-document read + * 6. SEC-16: another customer's document id returns NOTHING. The reference's + * detail() took the factor code from the URL with no ownership check at + * all, so any signed-in customer could read anyone's document. + * 7. no token is a 401 on every route + * 8. balances endpoint agrees with the customer row + * + * Every Persian string is a literal here and travels as UTF-8 JSON (D15). + * + * Requires the API running WITH OTP_MASTER_CODE set. + * Usage: node scripts/test-report.cjs [apiBaseUrl] [masterCode] + */ +const { PrismaClient } = require('@prisma/client'); +const prisma = new PrismaClient(); +const API = (process.argv[2] || 'http://localhost:3000/api').replace(/\/$/, ''); +const MASTER = process.argv[3] || '1379'; + +let pass = 0, fail = 0; +const failures = []; +const chk = (c, m) => { + if (c) { pass++; console.log(' PASS ' + m); } + else { fail++; failures.push(m); console.log(' FAIL ' + m); } +}; +const step = (t) => console.log('\n' + t); + +const call = async (method, p, body, token) => { + const res = await fetch(`${API}/${p}`, { + method, + headers: { + 'Content-Type': 'application/json', + ...(token ? { Authorization: 'Bearer ' + token } : {}), + }, + body: body === undefined ? undefined : JSON.stringify(body), + }); + const text = await res.text(); + let payload = null; + try { payload = JSON.parse(text); } catch { /* empty */ } + return { status: res.status, ok: res.ok, body: payload, raw: text }; +}; + +const signIn = (mobile) => + call('POST', 'customer/auth/verify-otp', { username: mobile, password: MASTER }); + +const made = { customers: [], entries: [] }; +const uniq = String(Date.now()).slice(-7); + +(async () => { + step('SETUP — two customers; one with a ledger, one with none'); + + const mkCustomer = async (suffix, name) => { + const c = await prisma.customer.create({ + data: { + fullName: name, + firstName: name.split(' ')[0], + lastName: name.split(' ').slice(1).join(' '), + mobile: `0919${uniq.slice(0, 3)}${suffix}`, + nationalCode: `nc${uniq}${suffix}`, + passwordHash: '!OTP_ONLY_NO_PASSWORD_LOGIN', kind: 'APP_SHOPKEEPER', isActive: true, + goldCreditLimitGrams: '500', + }, + }); + made.customers.push(c.id); + return c; + }; + + const owner = await mkCustomer('11', 'مشتری گزارش'); + const other = await mkCustomer('22', 'مشتری دیگر'); + const empty = await mkCustomer('33', 'مشتری بدون سند'); + console.log(` owner: ${owner.fullName} · other: ${other.fullName} · empty: ${empty.fullName}`); + + // ── 7. NO TOKEN ───────────────────────────────────────────────────────── + step('7 — every route requires a session'); + for (const path of ['customer/me/report', 'customer/me/report/detail', 'customer/me/report/balances']) { + const r = await call('GET', path); + chk(r.status === 401, `GET ${path} with no token -> ${r.status} (expected 401)`); + } + + // ── 1. EMPTY STATE ────────────────────────────────────────────────────── + step('1 — EMPTY STATE: a customer with no ledger entries'); + await call('POST', 'customer/auth/request-otp', { username: empty.mobile }); + const emptyLogin = await signIn(empty.mobile); + chk(emptyLogin.ok, `the empty customer signs in -> ${emptyLogin.status}`); + const emptyToken = emptyLogin.body?.token; + + const emptyReport = await call('GET', 'customer/me/report', undefined, emptyToken); + chk(emptyReport.ok, `GET report -> ${emptyReport.status}`); + chk(Array.isArray(emptyReport.body?.result) && emptyReport.body.result.length === 0, + 'the statement is an empty list, not an error'); + chk(emptyReport.body?.count === 0, `count is 0 (got ${emptyReport.body?.count})`); + + const emptyDetail = await call('GET', 'customer/me/report/detail', undefined, emptyToken); + chk(emptyDetail.ok && emptyDetail.body?.result?.length === 0, + `the detail tab is empty too -> ${emptyDetail.status}`); + + // ── BUILD A LEDGER ────────────────────────────────────────────────────── + step('SETUP — a ledger for the owner: gold out, gold in, rial in, plus one UNCONFIRMED'); + + const mkEntry = async (data) => { + const e = await prisma.ledgerEntry.create({ data: { customerId: owner.id, ...data } }); + made.entries.push(e.id); + return e; + }; + + // +12.5 gold owed + await mkEntry({ + currency: 'GOLD_GRAM', direction: 'DEBIT', sourceType: 'ORDER_STOCK', + amount: '12.5', confirmed: true, confirmedAt: new Date(), + note: 'سفارش اول', + }); + // -4.25 gold (a melted-gold repayment, with the document metadata) + await mkEntry({ + currency: 'GOLD_GRAM', direction: 'CREDIT', sourceType: 'REPAYMENT_MELTED_GOLD', + amount: '4.25', confirmed: true, confirmedAt: new Date(), + karatPerMille: 750, originalValue: '4.3', labName: 'آزمایشگاه مرکزی', hallmark: 'A-1001', + note: 'طلای آبشده', + }); + // +1,000,000 rial owed + await mkEntry({ + currency: 'RIAL', direction: 'DEBIT', sourceType: 'ADJUSTMENT', + amount: '1000000', confirmed: true, confirmedAt: new Date(), + note: 'اصلاحیه ریالی', + }); + // An UNCONFIRMED entry that must NOT appear anywhere. + const pending = await mkEntry({ + currency: 'GOLD_GRAM', direction: 'DEBIT', sourceType: 'ORDER_STOCK', + amount: '99.999', confirmed: false, + note: 'سند تاییدنشده', + }); + + // The cached balances the rest of the app shows. + await prisma.customer.update({ + where: { id: owner.id }, + data: { goldDebtGrams: '8.25', fiatDebtRial: '1000000' }, + }); + + // One document for the OTHER customer, for the cross-read test. + const foreign = await prisma.ledgerEntry.create({ + data: { + customerId: other.id, currency: 'GOLD_GRAM', direction: 'DEBIT', + sourceType: 'ORDER_STOCK', amount: '7', confirmed: true, confirmedAt: new Date(), + note: 'سند مشتری دیگر', + }, + }); + made.entries.push(foreign.id); + + // ── 2/3/4. MAIN FLOW ──────────────────────────────────────────────────── + step('2 — MAIN FLOW: the statement'); + await call('POST', 'customer/auth/request-otp', { username: owner.mobile }); + const login = await signIn(owner.mobile); + chk(login.ok, `the owner signs in -> ${login.status}`); + const token = login.body?.token; + + const rep = await call('GET', 'customer/me/report', undefined, token); + chk(rep.ok, `GET report -> ${rep.status}`); + const rows = rep.body?.result ?? []; + chk(rows.length === 3, `three CONFIRMED entries came back (got ${rows.length})`); + + // Newest first, as the reference displayed it. + chk(rows[0]?.note === 'اصلاحیه ریالی', `newest first: top row is "${rows[0]?.note}"`); + + const gold = rows.find((r) => r.note === 'سفارش اول'); + chk(gold?.geram_kh === '12.500', `a gold DEBIT lands in geram_kh (${gold?.geram_kh})`); + chk(gold?.geram_v === '0.000', 'and not in geram_v'); + + const back = rows.find((r) => r.note === 'طلای آبشده'); + chk(back?.geram_v === '4.250', `a gold CREDIT lands in geram_v (${back?.geram_v})`); + + const rialRow = rows.find((r) => r.note === 'اصلاحیه ریالی'); + chk(rialRow?.rial_kh === '1000000.00', `a rial DEBIT lands in rial_kh (${rialRow?.rial_kh})`); + + step('4 — UNCONFIRMED entries are excluded'); + chk(!rows.some((r) => r.note === 'سند تاییدنشده'), + 'the unconfirmed 99.999g entry does NOT appear in the statement'); + + step('3 — the RUNNING BALANCE'); + // Oldest first: +12.5, then -4.25 => 8.25. Rows come back newest-first. + chk(gold?.tahesab_T === '12.500', `after the first entry the gold balance is 12.500 (got ${gold?.tahesab_T})`); + chk(back?.tahesab_T === '8.250', `after the repayment it is 8.250 (got ${back?.tahesab_T})`); + + const cached = await prisma.customer.findUnique({ where: { id: owner.id } }); + chk(String(Number(back.tahesab_T)) === String(Number(cached.goldDebtGrams)), + `and it agrees with the cached Customer.goldDebtGrams (${cached.goldDebtGrams})`); + chk(rialRow?.tahesab_P === '1000000.00', + `the rial balance is 1000000.00 (got ${rialRow?.tahesab_P})`); + chk(String(Number(rialRow.tahesab_P)) === String(Number(cached.fiatDebtRial)), + `and it agrees with the cached Customer.fiatDebtRial (${cached.fiatDebtRial})`); + + step('8 — the balances endpoint agrees with the customer row'); + const bal = await call('GET', 'customer/me/report/balances', undefined, token); + chk(bal.ok, `GET balances -> ${bal.status}`); + const goldBal = bal.body?.result?.find((r) => r.arz === 'gold'); + const rialBal = bal.body?.result?.find((r) => r.arz === 'IRR'); + chk(goldBal?.mandeh === '8.250', `gold balance ${goldBal?.mandeh}`); + chk(rialBal?.mandeh === '1000000.00', `rial balance ${rialBal?.mandeh}`); + + // ── 5. DETAIL ─────────────────────────────────────────────────────────── + step('5 — the detail tab and one document'); + const det = await call('GET', 'customer/me/report/detail', undefined, token); + chk(det.ok, `GET detail -> ${det.status}`); + chk(det.body?.result?.length === 3, `three documents (got ${det.body?.result?.length})`); + chk(!det.body?.result?.some((d) => d.note === 'سند تاییدنشده'), + 'the unconfirmed entry is excluded here too'); + + const melted = det.body?.result?.find((d) => d.note === 'طلای آبشده'); + chk(melted?.ayar === 750, `the melted-gold document carries its عیار (${melted?.ayar})`); + chk(melted?.name_az === 'آزمایشگاه مرکزی', `and its lab name (${melted?.name_az})`); + chk(melted?.sh_sharti === 'A-1001', `and its hallmark (${melted?.sh_sharti})`); + chk(melted?.vazn === '4.300', + `وزن خالص is the PRE-normalization weight, as a paper document states (${melted?.vazn})`); + chk(melted?.nO_kar === null && melted?.jens_felez === null, + 'fields the target cannot know are null, never invented (REP-01)'); + + const one = await call('GET', `customer/me/report/${back.factor_Code}`, undefined, token); + chk(one.ok, `GET one document -> ${one.status}`); + chk(one.body?.result?.length === 1, `exactly one row came back (got ${one.body?.result?.length})`); + chk(one.body?.result?.[0]?.factor_Code === back.factor_Code, 'and it is the one asked for'); + + // ── 6. SEC-16 ─────────────────────────────────────────────────────────── + step("6 — SEC-16: another customer's document is NOT readable"); + const stolen = await call('GET', `customer/me/report/${foreign.id}`, undefined, token); + chk(stolen.ok, `the request itself succeeds -> ${stolen.status}`); + chk(stolen.body?.result?.length === 0, + "but it returns NOTHING — the id is only a filter on top of the token's scope"); + + // And the reverse direction, so the scope is not accidentally one-way. + await call('POST', 'customer/auth/request-otp', { username: other.mobile }); + const otherLogin = await signIn(other.mobile); + const otherToken = otherLogin.body?.token; + const reverse = await call('GET', `customer/me/report/${back.factor_Code}`, undefined, otherToken); + chk(reverse.body?.result?.length === 0, + "and the other customer cannot read the owner's document either"); + + const otherRep = await call('GET', 'customer/me/report', undefined, otherToken); + chk(otherRep.body?.result?.length === 1, + `the other customer sees only their OWN one entry (got ${otherRep.body?.result?.length})`); + + // ── CLEANUP ───────────────────────────────────────────────────────────── + step('CLEANUP'); + await prisma.ledgerEntry.deleteMany({ where: { id: { in: made.entries } } }); + await prisma.customerOtp.deleteMany({ where: { customerId: { in: made.customers } } }); + await prisma.customer.deleteMany({ where: { id: { in: made.customers } } }); + console.log( + ` deleted ${made.entries.length} ledger entr(ies) and ${made.customers.length} customer(s). ` + + 'All were created by this run; no pre-existing data was touched.', + ); + void pending; + + console.log(`\n${'='.repeat(60)}`); + console.log(`REPORT: passed ${pass} failed ${fail}`); + if (fail) { console.log('\nFailures:'); failures.forEach((f) => console.log(' - ' + f)); } + console.log('='.repeat(60)); + + await prisma.$disconnect(); + process.exit(fail ? 1 : 0); +})().catch(async (e) => { + console.error('\nABORTED:', e); + await prisma.$disconnect(); + process.exit(1); +}); diff --git a/apps/api/scripts/test-sales-expert-app-login.cjs b/apps/api/scripts/test-sales-expert-app-login.cjs new file mode 100644 index 0000000..c259e2b --- /dev/null +++ b/apps/api/scripts/test-sales-expert-app-login.cjs @@ -0,0 +1,285 @@ +/** + * D21 — sales-expert login to the customer apps. + * + * Covers exactly what the owner asked for: + * * an expert signs in with their AdminUser mobile, via the normal app flow + * * the master OTP works for an expert too + * * the expert sees THEIR OWN referred customers, and not another expert's + * * the expert can place an order themselves + * * an ordinary customer is refused both expert screens + * * ordinary customer login and ordering still work exactly as before + * * an expert's app token is refused on admin routes, and an admin token is + * refused on expert routes + * + * Every Persian string is a literal here and travels as UTF-8 JSON (D15). + * + * Requires the API running WITH OTP_MASTER_CODE set. + * Usage: node scripts/test-sales-expert-app-login.cjs [apiBaseUrl] [masterCode] + */ +const { PrismaClient } = require('@prisma/client'); +const prisma = new PrismaClient(); +const API = (process.argv[2] || 'http://localhost:3000/api').replace(/\/$/, ''); +const MASTER = process.argv[3] || '1379'; + +let pass = 0, fail = 0; +const failures = []; +const chk = (c, m) => { + if (c) { pass++; console.log(' PASS ' + m); } + else { fail++; failures.push(m); console.log(' FAIL ' + m); } +}; +const step = (t) => console.log('\n' + t); + +const call = async (method, p, body, token) => { + const res = await fetch(`${API}/${p}`, { + method, + headers: { + 'Content-Type': 'application/json', + ...(token ? { Authorization: 'Bearer ' + token } : {}), + }, + body: body === undefined ? undefined : JSON.stringify(body), + }); + const text = await res.text(); + let payload = null; + try { payload = JSON.parse(text); } catch { /* empty */ } + return { status: res.status, ok: res.ok, body: payload, raw: text }; +}; + +const signIn = (mobile, code = MASTER) => + call('POST', 'customer/auth/verify-otp', { username: mobile, password: code }); + +/** Everything this run creates, removed at the end. */ +const made = { admins: [], customers: [], orders: [] }; +const uniq = String(Date.now()).slice(-7); + +(async () => { + // ── SETUP: two experts, each with their own referred customer ─────────── + step('SETUP — two sales experts, each with one referred customer'); + + const mkExpert = async (suffix, first, last) => { + const admin = await prisma.adminUser.create({ + data: { + fullName: `${first} ${last}`, firstName: first, lastName: last, + mobile: `0915${uniq.slice(0, 3)}${suffix}`, + passwordHash: '!NO_PASSWORD_SET_YET', role: 'SALES_EXPERT', isActive: true, + wagePercent: '4.5', + }, + }); + await prisma.salesExpertProfile.create({ + data: { adminUserId: admin.id, gramLevel: '250.5' }, + }); + made.admins.push(admin.id); + return admin; + }; + + const expertA = await mkExpert('001', 'کارشناس', 'الف'); + const expertB = await mkExpert('002', 'کارشناس', 'ب'); + console.log(` expert A: ${expertA.fullName} (${expertA.mobile})`); + console.log(` expert B: ${expertB.fullName} (${expertB.mobile})`); + + const mkCustomer = async (suffix, name, agentId) => { + const c = await prisma.customer.create({ + data: { + fullName: name, firstName: name.split(' ')[0], lastName: name.split(' ').slice(1).join(' '), + mobile: `0916${uniq.slice(0, 3)}${suffix}`, + nationalCode: `nc${uniq}${suffix}`, + passwordHash: '!OTP_ONLY_NO_PASSWORD_LOGIN', kind: 'APP_SHOPKEEPER', isActive: true, + referredByAgentId: agentId, goldCreditLimitGrams: '100', + }, + }); + made.customers.push(c.id); + return c; + }; + + const custOfA = await mkCustomer('11', 'مشتری الف', expertA.id); + const custOfB = await mkCustomer('22', 'مشتری ب', expertB.id); + const plainCust = await mkCustomer('33', 'مشتری ساده', null); + console.log(` A's customer: ${custOfA.fullName} · B's: ${custOfB.fullName} · unreferred: ${plainCust.fullName}`); + + // ── 1. EXPERT SIGNS IN ────────────────────────────────────────────────── + step('1 — THE EXPERT SIGNS INTO THE APP with their AdminUser mobile'); + // requestOtp is what creates the trading account, exactly as a real login would. + const req = await call('POST', 'customer/auth/request-otp', { username: expertA.mobile }); + chk(req.ok, `POST customer/auth/request-otp -> ${req.status}`); + + const loginA = await signIn(expertA.mobile); + chk(loginA.ok, `verify-otp with the master code -> ${loginA.status}`); + const tokenA = loginA.body?.token; + chk(Boolean(tokenA), 'an app token came back'); + + const profA = await prisma.salesExpertProfile.findUnique({ where: { adminUserId: expertA.id } }); + chk(Boolean(profA?.tradingCustomerId), 'a trading Customer account was created for the expert'); + if (profA?.tradingCustomerId) made.customers.push(profA.tradingCustomerId); + + const trading = profA?.tradingCustomerId + ? await prisma.customer.findUnique({ where: { id: profA.tradingCustomerId } }) + : null; + chk(String(trading?.goldCreditLimitGrams) === '250.5', + `the credit limit came from the profile's gramLevel (${trading?.goldCreditLimitGrams})`); + chk(String(trading?.makingChargeOffsetPercent) === '4.5', + `the making charge came from the expert's wagePercent (${trading?.makingChargeOffsetPercent})`); + chk(trading?.referredByAgentId === null, + 'the trading account is NOT one of the expert\'s own referred customers'); + + step('1b — whoami reports an expert'); + const who = await call('GET', 'expert/whoami', undefined, tokenA); + chk(who.body?.isSalesExpert === true, `isSalesExpert=${who.body?.isSalesExpert}, type=${who.body?.type}`); + + // ── 2. THE EXPERT SEES ONLY THEIR OWN CUSTOMERS ───────────────────────── + step('2 — "انتخاب مشتری": the expert sees THEIR customers only'); + const mine = await call('POST', 'expert/my-customers', {}, tokenA); + chk(mine.ok, `POST expert/my-customers -> ${mine.status}`); + const ids = (mine.body ?? []).map((c) => c.id); + chk(ids.includes(custOfA.id), "A's own customer is listed"); + chk(!ids.includes(custOfB.id), "NEGATIVE: B's customer is NOT visible to A"); + chk(!ids.includes(plainCust.id), 'NEGATIVE: an unreferred customer is not listed'); + + step('2b — the search filter still scopes to the expert'); + const searched = await call('POST', 'expert/my-customers', { search: 'مشتری' }, tokenA); + const sIds = (searched.body ?? []).map((c) => c.id); + chk(sIds.includes(custOfA.id), 'search finds A\'s customer'); + chk(!sIds.includes(custOfB.id), "NEGATIVE: search cannot reach B's customer"); + + // ── 3. CHILD ORDERS ───────────────────────────────────────────────────── + step('3 — "سفارش مشتریان": only this expert\'s customers\' orders, at DELIVERED_TO_AGENT'); + const variant = await prisma.productVariant.findFirst({ + where: { OR: [{ qty: { gt: 0 } }, { isPreOrder: true }] }, + select: { id: true, rashWeightGrams: true, defaultWagePercent: true }, + }); + + const mkOrder = async (customerId, status) => { + const o = await prisma.order.create({ + data: { + orderNumber: `T-${uniq}-${Math.floor(Math.random() * 100000)}`, + customerId, status, + totalGoldWeightGrams: '5.5', wageWeightGrams: '0.5', + flatRialCharge: '0', channel: 'WHOLESALE', + }, + }); + made.orders.push(o.id); + return o; + }; + + const orderA = await mkOrder(custOfA.id, 'DELIVERED_TO_AGENT'); + const orderB = await mkOrder(custOfB.id, 'DELIVERED_TO_AGENT'); + const orderAEarly = await mkOrder(custOfA.id, 'PLACED'); + + const childA = await call('POST', 'expert/child-orders', { page: 1, limit: 50 }, tokenA); + chk(childA.ok, `POST expert/child-orders -> ${childA.status}`); + const cIds = (childA.body?.rows ?? []).map((o) => o.id); + chk(cIds.includes(orderA.id), "A's customer's order is listed"); + chk(!cIds.includes(orderB.id), "NEGATIVE: B's customer's order is NOT visible to A"); + chk(!cIds.includes(orderAEarly.id), + 'NEGATIVE: an order not yet at «تحویل مسئول فروش» is excluded (reference sts=5)'); + const row = (childA.body?.rows ?? []).find((o) => o.id === orderA.id); + chk(row?.customer?.name === custOfA.fullName, 'the card carries the customer name'); + chk(row?.w !== undefined, 'the card carries the total weight as `w`, as the reference does'); + + // ── 4. THE EXPERT ORDERS FOR THEMSELVES ───────────────────────────────── + step('4 — the expert places an order of their OWN'); + if (variant) { + const ord = await call('POST', 'orders', { + items: [{ + productVariantId: variant.id, quantity: 1, + wagePercent: Number(variant.defaultWagePercent), + }], + }, tokenA); + chk(ord.ok, `POST orders as the expert -> ${ord.status}` + (ord.ok ? '' : ` ${ord.raw.slice(0, 160)}`)); + const oid = ord.body?.id; + if (oid) made.orders.push(oid); + if (oid) { + const saved = await prisma.order.findUnique({ where: { id: oid } }); + chk(saved?.customerId === profA?.tradingCustomerId, + "the order landed on the expert's OWN trading account, not a customer's"); + } + step('4b — the expert has the ordinary app too'); + const me = await call('GET', 'customer/me', undefined, tokenA); + chk(me.ok, `GET customer/me as the expert -> ${me.status}`); + const myOrders = await call('GET', 'customer/me/orders', undefined, tokenA); + chk(myOrders.ok, `GET customer/me/orders as the expert -> ${myOrders.status}`); + chk((myOrders.body ?? []).some((o) => o.id === oid), "the expert's own order is in their order history"); + } + + // ── 5. AN ORDINARY CUSTOMER IS REFUSED ────────────────────────────────── + step('5 — an ORDINARY customer cannot reach either expert screen'); + const loginC = await signIn(plainCust.mobile); + chk(loginC.ok, `the ordinary customer still signs in -> ${loginC.status}`); + const tokenC = loginC.body?.token; + + const whoC = await call('GET', 'expert/whoami', undefined, tokenC); + chk(whoC.body?.isSalesExpert === false, 'whoami says NOT an expert, so the app hides the menu entries'); + + const cChild = await call('POST', 'expert/child-orders', {}, tokenC); + chk(cChild.status === 403, `NEGATIVE: child-orders as a customer -> ${cChild.status} (expected 403)`); + const cMine = await call('POST', 'expert/my-customers', {}, tokenC); + chk(cMine.status === 403, `NEGATIVE: my-customers as a customer -> ${cMine.status} (expected 403)`); + + step('5b — and their ordinary app still works exactly as before'); + const cMe = await call('GET', 'customer/me', undefined, tokenC); + chk(cMe.ok && cMe.body?.id === plainCust.id, `GET customer/me -> ${cMe.status}, own record`); + if (variant) { + const cOrd = await call('POST', 'orders', { + items: [{ productVariantId: variant.id, quantity: 1, wagePercent: Number(variant.defaultWagePercent) }], + }, tokenC); + chk(cOrd.ok, `an ordinary customer can still place an order -> ${cOrd.status}`); + if (cOrd.body?.id) { + made.orders.push(cOrd.body.id); + const saved = await prisma.order.findUnique({ where: { id: cOrd.body.id } }); + chk(saved?.customerId === plainCust.id, 'it landed on their own account'); + } + } + + // ── 6. TOKEN BOUNDARIES ───────────────────────────────────────────────── + step('6 — token boundaries'); + const adminLogin = await fetch(`${API}/admin/auth/login`, { + method: 'POST', headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ phone: '09128081392', password: '09128081392' }), + }); + const adminToken = (await adminLogin.json()).api_token; + + const expertOnAdmin = await call('POST', 'admin/customers-omde/list', { page: 1, limit: 1 }, tokenA); + chk(expertOnAdmin.status === 401 || expertOnAdmin.status === 403, + `NEGATIVE: the expert's APP token on an admin route -> ${expertOnAdmin.status}`); + + const customerOnAdmin = await call('POST', 'admin/customers-omde/list', { page: 1, limit: 1 }, tokenC); + chk(customerOnAdmin.status === 401 || customerOnAdmin.status === 403, + `NEGATIVE: a customer token on an admin route -> ${customerOnAdmin.status}`); + + const adminOnExpert = await call('POST', 'expert/my-customers', {}, adminToken); + chk(adminOnExpert.status === 401, + `NEGATIVE: an ADMIN token on an expert route -> ${adminOnExpert.status} (expected 401)`); + + step('6b — a deactivated expert loses app access immediately'); + await prisma.adminUser.update({ where: { id: expertA.id }, data: { isActive: false } }); + const afterDeactivate = await call('GET', 'expert/me', undefined, tokenA); + chk(afterDeactivate.status === 401, + `NEGATIVE: the same token after deactivation -> ${afterDeactivate.status} (expected 401)`); + await prisma.adminUser.update({ where: { id: expertA.id }, data: { isActive: true } }); + + // ── CLEANUP ───────────────────────────────────────────────────────────── + step('CLEANUP'); + await prisma.orderItem.deleteMany({ where: { orderId: { in: made.orders } } }); + await prisma.orderStatusEvent.deleteMany({ where: { orderId: { in: made.orders } } }); + await prisma.ledgerEntry.deleteMany({ where: { orderId: { in: made.orders } } }); + await prisma.order.deleteMany({ where: { id: { in: made.orders } } }); + await prisma.customerOtp.deleteMany({ where: { customerId: { in: made.customers } } }); + await prisma.salesExpertProfile.deleteMany({ where: { adminUserId: { in: made.admins } } }); + await prisma.customer.deleteMany({ where: { id: { in: made.customers } } }); + await prisma.adminUser.deleteMany({ where: { id: { in: made.admins } } }); + console.log( + ` deleted ${made.orders.length} order(s), ${made.customers.length} customer(s) ` + + `(including the expert trading account this run created) and ${made.admins.length} admin user(s). ` + + 'All were created by this run; no pre-existing data was touched.', + ); + + console.log(`\n${'='.repeat(60)}`); + console.log(`SALES-EXPERT APP LOGIN: passed ${pass} failed ${fail}`); + if (fail) { console.log('\nFailures:'); failures.forEach((f) => console.log(' - ' + f)); } + console.log('='.repeat(60)); + + await prisma.$disconnect(); + process.exit(fail ? 1 : 0); +})().catch(async (e) => { + console.error('\nABORTED:', e); + await prisma.$disconnect(); + process.exit(1); +}); diff --git a/apps/api/scripts/test-sales-expert-roundtrip.cjs b/apps/api/scripts/test-sales-expert-roundtrip.cjs new file mode 100644 index 0000000..cbb2fe0 --- /dev/null +++ b/apps/api/scripts/test-sales-expert-roundtrip.cjs @@ -0,0 +1,172 @@ +/** + * D12 rule E0 round-trip test for the SALES EXPERT entity, plus the two grid + * filters D17 required. + * + * All Persian input is written here as literals and sent as UTF-8 JSON, never + * through a shell argument (D15). + */ +const { PrismaClient } = require('@prisma/client'); +const prisma = new PrismaClient(); +// Port 3000 is API_PORT in the repo-root .env; overridable for another setup. +// (Was hardcoded to 3077, a port from an earlier dev session, so the script +// could only ever connect by accident.) +const API = (process.argv[2] || 'http://localhost:3000/api').replace(/\/$/, ''); + +let pass = 0, fail = 0; +const chk = (c, m) => { c ? pass++ : fail++; console.log((c ? ' PASS ' : ' FAIL ') + m); }; + +const FIRST = 'محمد علی'; +const LAST = 'احمدی'; + +async function login() { + const r = await fetch(API + '/admin/auth/login', { + method: 'POST', headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ phone: '09128081392', password: '09128081392' }), + }); + return (await r.json()).api_token; +} + +const snap = async (id) => { + const u = await prisma.adminUser.findUnique({ + where: { id }, include: { salesExpertProfile: true }, + }); + const { updatedAt, ...profile } = u.salesExpertProfile ?? {}; + return JSON.stringify({ + fullName: u.fullName, firstName: u.firstName, lastName: u.lastName, + mobile: u.mobile, role: u.role, wagePercent: String(u.wagePercent), + address: u.address, storeName: u.storeName, + profile: { ...profile, gramLevel: String(profile.gramLevel) }, + }); +}; + +(async () => { + const token = await login(); + const H = { 'Content-Type': 'application/json', Authorization: 'Bearer ' + token }; + const city = await prisma.city.findFirst({ select: { id: true, name: true } }); + const city2 = await prisma.city.findFirst({ where: { id: { not: city.id } }, select: { id: true, name: true } }); + const mobile = '0912' + String(Date.now()).slice(-7); + + console.log('STEP 1 — create a sales expert with EVERY field populated'); + const createBody = { + fname: FIRST, lname: LAST, mobile, password: 'Test12345', + role: 'SALES_EXPERT', percent: 4.5, + city_id: city.id, gram_level: 250.5, phone: '02188887777', ncode: '1234567890', + address: 'تهران، خیابان ولیعصر', store_name: 'طلای محمد', pasazh_name: 'پاساژ بزرگ', mcode: 'SE-001', + }; + const cr = await fetch(API + '/admin/users', { method: 'POST', headers: H, body: JSON.stringify(createBody) }); + const created = await cr.json(); + if (!created.id) { console.log(' create failed:', JSON.stringify(created).slice(0, 300)); process.exit(1); } + const id = created.id; + console.log(' id:', id); + + const row = await prisma.adminUser.findUnique({ where: { id }, include: { salesExpertProfile: true } }); + chk(row.firstName === FIRST, `firstName stored as «${FIRST}» — a two-token first name is NOT re-split`); + chk(row.lastName === LAST, `lastName stored as «${LAST}»`); + chk(row.fullName === `${FIRST} ${LAST}`, 'fullName rebuilt by the trigger'); + chk(!!row.salesExpertProfile, 'SalesExpertProfile auto-created on create'); + chk(row.salesExpertProfile?.cityId === city.id, 'profile.cityId stored'); + chk(String(row.salesExpertProfile?.gramLevel) === '250.5', 'profile.gramLevel stored (250.5)'); + chk(row.salesExpertProfile?.phone === '02188887777', 'profile.phone stored'); + chk(row.salesExpertProfile?.nationalCode === '1234567890', 'profile.nationalCode stored'); + + console.log('\nSTEP 2 — open the edit form: every field populated, separately'); + const g = await (await fetch(API + `/admin/users/${id}`, { headers: H })).json(); + chk(g.fname === FIRST, `fname === «${FIRST}» (NOT the whole name)`); + chk(g.lname === LAST, `lname === «${LAST}» (NOT empty)`); + chk(Number(g.percent) === 4.5, 'percent === 4.5'); + + const listed = await (await fetch(API + '/admin/customers-omde/reagent/list', { + method: 'POST', headers: H, body: JSON.stringify({ page: 1, limit: 200 }), + })).json(); + const mine = (listed.rows ?? []).find((x) => x.id === id); + chk(!!mine, 'the new expert appears in the reagent grid'); + chk(mine?.fname === FIRST && mine?.lname === LAST, 'grid shows the real name parts'); + chk(mine?.city_id === city.id, 'grid returns a REAL city_id (was hardcoded null)'); + chk(mine?.city?.title === city.name, 'grid returns the city object for the column'); + chk(String(mine?.gram_level) === '250.5', 'grid returns a REAL gram_level (was hardcoded null)'); + chk(mine?.phone === '02188887777', 'grid returns phone'); + chk(mine?.ncode === '1234567890', 'grid returns ncode'); + + console.log('\nSTEP 3 — save with NO changes: the row must be byte-identical'); + const before = await snap(id); + await fetch(API + `/admin/users/${id}`, { + method: 'PUT', headers: H, + body: JSON.stringify({ + fname: g.fname, lname: g.lname, mobile: g.mobile, role: 'SALES_EXPERT', + percent: Number(g.percent), city_id: mine.city_id, gram_level: Number(mine.gram_level), + phone: mine.phone, ncode: mine.ncode, address: g.address, + store_name: g.store_name, pasazh_name: g.pasazh_name, mcode: g.mcode, + }), + }); + const after = await snap(id); + chk(before === after, 'no-op save changed nothing'); + if (before !== after) console.log(' before: ' + before + '\n after : ' + after); + + console.log('\nSTEP 4a — change ONLY lastName'); + await fetch(API + `/admin/users/${id}`, { + method: 'PUT', headers: H, body: JSON.stringify({ lname: 'محمدی' }), + }); + const s4 = JSON.parse(await snap(id)); + const b4 = JSON.parse(after); + chk(s4.lastName === 'محمدی' && s4.firstName === FIRST, `only lastName changed; firstName still «${FIRST}»`); + chk(s4.fullName === `${FIRST} محمدی`, 'fullName rebuilt by the trigger'); + chk(JSON.stringify(s4.profile) === JSON.stringify(b4.profile), 'the profile was untouched'); + + console.log('\nSTEP 4b — change ONLY gramLevel'); + const b5 = JSON.parse(await snap(id)); + await fetch(API + `/admin/users/${id}`, { + method: 'PUT', headers: H, body: JSON.stringify({ gram_level: 999.25 }), + }); + const s5 = JSON.parse(await snap(id)); + const diff = Object.keys(s5.profile).filter((k) => String(s5.profile[k]) !== String(b5.profile[k])); + chk(diff.length === 1 && diff[0] === 'gramLevel', 'only gramLevel changed: ' + diff.join(',')); + chk(s5.firstName === b5.firstName && s5.lastName === b5.lastName, 'the name was untouched'); + + console.log('\nSTEP 5 — the two grid FILTERS'); + const byCity = await (await fetch(API + '/admin/customers-omde/reagent/list', { + method: 'POST', headers: H, + body: JSON.stringify({ page: 1, limit: 200, filters: [{ field: 'city_id', op: '=', value: city.id }] }), + })).json(); + chk((byCity.rows ?? []).some((x) => x.id === id), `city filter (${city.name}) returns the expert`); + chk((byCity.rows ?? []).every((x) => x.city_id === city.id), 'city filter returns ONLY that city'); + + if (city2) { + const otherCity = await (await fetch(API + '/admin/customers-omde/reagent/list', { + method: 'POST', headers: H, + body: JSON.stringify({ page: 1, limit: 200, filters: [{ field: 'city_id', op: '=', value: city2.id }] }), + })).json(); + chk(!(otherCity.rows ?? []).some((x) => x.id === id), `filtering by a DIFFERENT city (${city2.name}) excludes it`); + } + + const byGram = await (await fetch(API + '/admin/customers-omde/reagent/list', { + method: 'POST', headers: H, + body: JSON.stringify({ page: 1, limit: 200, filters: [{ field: 'gram_level', op: '=', value: 999.25 }] }), + })).json(); + chk((byGram.rows ?? []).some((x) => x.id === id), 'gram_level filter returns the expert'); + chk((byGram.rows ?? []).every((x) => String(x.gram_level) === '999.25'), 'gram_level filter returns ONLY matches'); + + console.log('\nSTEP 6 — an expert with NO profile still lists (left join)'); + const orphan = await prisma.adminUser.create({ + data: { fullName: 'بدون پروفایل', firstName: 'بدون', lastName: 'پروفایل', + mobile: '0913' + String(Date.now()).slice(-7), passwordHash: 'x', role: 'SALES_EXPERT' }, + }); + const l2 = await (await fetch(API + '/admin/customers-omde/reagent/list', { + method: 'POST', headers: H, body: JSON.stringify({ page: 1, limit: 200 }), + })).json(); + const o = (l2.rows ?? []).find((x) => x.id === orphan.id); + chk(!!o, 'an expert without a profile still appears in the grid'); + chk(o?.city_id === null && o?.gram_level === null, 'its city/gram cells are null, not an error'); + + console.log('\nSTEP 7 — the referrer dropdown lists every active expert'); + const opts = await (await fetch(API + '/admin/customers-omde/query/reagent', { headers: H })).json(); + chk(opts.some((x) => x.id === id), 'the new expert is selectable as a referrer'); + chk(opts.some((x) => x.id === orphan.id), 'the profile-less expert is selectable too'); + + await prisma.salesExpertProfile.deleteMany({ where: { adminUserId: { in: [id, orphan.id] } } }); + await prisma.adminUser.deleteMany({ where: { id: { in: [id, orphan.id] } } }); + console.log(`\nCleanup: deleted 2 test AdminUser rows (${id}, ${orphan.id}) and their profiles.`); + + console.log(`\npassed: ${pass} failed: ${fail}`); + await prisma.$disconnect(); + process.exit(fail ? 1 : 0); +})().catch(async (e) => { console.error(e); await prisma.$disconnect(); process.exit(1); }); diff --git a/apps/api/src/app.module.ts b/apps/api/src/app.module.ts index 87cddaa..712ee87 100644 --- a/apps/api/src/app.module.ts +++ b/apps/api/src/app.module.ts @@ -2,10 +2,19 @@ import { Module } from '@nestjs/common'; import { PrismaModule } from './prisma/prisma.module'; import { CatalogModule } from './modules/catalog/catalog.module'; import { CustomersModule } from './modules/customers/customers.module'; +import { CustomerAuthModule } from './modules/customer-auth/customer-auth.module'; +import { SalesExpertAppModule } from './modules/sales-expert-app/sales-expert-app.module'; +import { CustomerProfileModule } from './modules/customer-profile/customer-profile.module'; +import { CustomerFavoritesModule } from './modules/customer-favorites/customer-favorites.module'; +import { CustomerReportModule } from './modules/customer-report/customer-report.module'; +import { SmsModule } from './modules/sms/sms.module'; import { OrdersModule } from './modules/orders/orders.module'; import { AccountingModule } from './modules/accounting/accounting.module'; +import { AccountingSyncModule } from './modules/accounting-sync/accounting-sync.module'; import { PricingModule } from './modules/pricing/pricing.module'; import { AuthModule } from './modules/auth/auth.module'; +import { IamModule } from './modules/iam/iam.module'; +import { AdminSessionModule } from './modules/sessions/admin-session.module'; import { AdminTableModule } from './modules/admin-table/admin-table.module'; import { AdminOrdersModule } from './modules/admin-orders/admin-orders.module'; import { AdminCitiesModule } from './modules/admin-cities/admin-cities.module'; @@ -23,10 +32,14 @@ import { AdminInvoicesModule } from './modules/admin-invoices/admin-invoices.mod import { AdminMiscModule } from './modules/admin-misc/admin-misc.module'; import { AdminUploadsModule } from './modules/admin-uploads/admin-uploads.module'; import { AdminDashboardModule } from './modules/admin-dashboard/admin-dashboard.module'; +import { AdminReportModule } from './modules/admin-report/admin-report.module'; import { SalesAgentModule } from './modules/sales-agent/sales-agent.module'; @Module({ imports: [ + // Inert unless IAM_ENABLED=true — see modules/iam/README.md + IamModule, + AdminSessionModule, PrismaModule, AuthModule, AdminTableModule, @@ -46,11 +59,20 @@ import { SalesAgentModule } from './modules/sales-agent/sales-agent.module'; AdminMiscModule, AdminUploadsModule, AdminDashboardModule, + AdminReportModule, CatalogModule, CustomersModule, + SmsModule, + CustomerAuthModule, + SalesExpertAppModule, + CustomerProfileModule, + CustomerFavoritesModule, + CustomerReportModule, SalesAgentModule, OrdersModule, AccountingModule, + // Tahesab / Zarrin integration (D27) — inert until switched on in the admin panel + AccountingSyncModule, PricingModule, ], }) diff --git a/apps/api/src/common/env.spec.ts b/apps/api/src/common/env.spec.ts new file mode 100644 index 0000000..b1abd2d --- /dev/null +++ b/apps/api/src/common/env.spec.ts @@ -0,0 +1,104 @@ +import { envOr, envOrNull } from './env'; + +/** + * DEPLOY-02 — a blank environment variable must be treated as unset. + * + * `docker-compose.yml` passes every optional variable as `${X:-}`, so an + * unconfigured one arrives as `""`, not `undefined`. The codebase originally + * read these with `process.env.X ?? 'default'`, which only falls back on + * `undefined` — so the empty string won, and + * + * new JwtService().sign(payload, { expiresIn: '' }) + * + * threw `"expiresIn" should be a number of seconds or string representing a + * timespan` on EVERY login. In Docker only, which is why it survived every + * suite that ran against a local dev process. These tests pin the behaviour. + */ +describe('envOr / envOrNull (DEPLOY-02)', () => { + const saved = { ...process.env }; + const KEY = 'GOLDBANK_ENV_SPEC_KEY'; + + beforeEach(() => { + delete process.env[KEY]; + }); + + afterAll(() => { + process.env = { ...saved }; + }); + + describe('envOr', () => { + it('falls back when the variable is absent', () => { + expect(envOr(KEY, '12h')).toBe('12h'); + }); + + it('falls back when the variable is the EMPTY STRING — the compose case', () => { + process.env[KEY] = ''; + expect(envOr(KEY, '12h')).toBe('12h'); + }); + + it('falls back when the variable is only whitespace', () => { + process.env[KEY] = ' '; + expect(envOr(KEY, '12h')).toBe('12h'); + }); + + it('returns the value when one is set', () => { + process.env[KEY] = '30d'; + expect(envOr(KEY, '12h')).toBe('30d'); + }); + + it('trims a padded value rather than passing the padding through', () => { + process.env[KEY] = ' 30d '; + expect(envOr(KEY, '12h')).toBe('30d'); + }); + + it('never returns an empty string, whatever is set', () => { + for (const v of ['', ' ', '\t', '\n', ' \t\n ']) { + process.env[KEY] = v; + expect(envOr(KEY, 'fallback')).not.toBe(''); + } + }); + }); + + describe('envOrNull', () => { + it('is null when absent, empty or blank', () => { + expect(envOrNull(KEY)).toBeNull(); + process.env[KEY] = ''; + expect(envOrNull(KEY)).toBeNull(); + process.env[KEY] = ' '; + expect(envOrNull(KEY)).toBeNull(); + }); + + it('is the trimmed value when set', () => { + process.env[KEY] = ' secret '; + expect(envOrNull(KEY)).toBe('secret'); + }); + }); + + /** + * The specific failure: an empty expiresIn must never reach jsonwebtoken. + * Asserted against the real library so the test fails if the reader regresses. + */ + describe('the original failure', () => { + it('jsonwebtoken rejects an empty expiresIn, and envOr never produces one', () => { + // Required rather than imported: jsonwebtoken is a transitive dependency + // of @nestjs/jwt and ships no types here. Typed loosely on purpose — this + // test is about the VALUE reaching it, not about its signature. + // eslint-disable-next-line @typescript-eslint/no-var-requires + const jwt = require('jsonwebtoken') as { + sign: (payload: object, secret: string, opts: { expiresIn: string }) => string; + }; + + // The bug: this is exactly what `process.env.JWT_EXPIRES_IN ?? '12h'` + // produced under compose, and it threw on every login. + expect(() => jwt.sign({ sub: 'x' }, 'secret', { expiresIn: '' })).toThrow( + /expiresIn/, + ); + + // The fix: envOr turns that same blank into the default, which signs. + process.env[KEY] = ''; + const token = jwt.sign({ sub: 'x' }, 'secret', { expiresIn: envOr(KEY, '12h') }); + expect(typeof token).toBe('string'); + expect(token.split('.')).toHaveLength(3); + }); + }); +}); diff --git a/apps/api/src/common/env.ts b/apps/api/src/common/env.ts new file mode 100644 index 0000000..9af7b70 --- /dev/null +++ b/apps/api/src/common/env.ts @@ -0,0 +1,46 @@ +/** + * Environment readers that treat a BLANK value as unset. + * + * `process.env.X ?? 'default'` only falls back when the variable is absent, so + * an empty string sails straight through. That matters here because + * `docker-compose.yml` passes every optional variable as `${X:-}`, which sets + * it to `""` when the operator has not configured it. jsonwebtoken then throws + * + * "expiresIn" should be a number of seconds or string representing a timespan + * + * and EVERY login 500s — in Docker only, which is why it survived every test + * that ran against a local dev process. Found by the pre-delivery compose run; + * recorded as DEPLOY-02. + */ + +/** The variable's trimmed value, or `fallback` when it is unset, empty or blank. */ +export function envOr(name: string, fallback: string): string { + const raw = process.env[name]; + const trimmed = typeof raw === 'string' ? raw.trim() : ''; + return trimmed === '' ? fallback : trimmed; +} + +/** The variable's trimmed value, or null when it is unset, empty or blank. */ +export function envOrNull(name: string): string | null { + const raw = process.env[name]; + const trimmed = typeof raw === 'string' ? raw.trim() : ''; + return trimmed === '' ? null : trimmed; +} + +/** Comma-separated env list. Blank entries are dropped. */ +export function envList(name: string): string[] { + const raw = envOrNull(name); + if (!raw) return []; + return raw.split(',').map((item) => item.trim()).filter(Boolean); +} + +/** + * Exact string match. A requested URI that is not in the list is refused + * (null) instead of being replaced by another app's address. + * With no request, the first configured value is used. + */ +export function pickExactUri(requested: string | undefined, allowed: Array): string | null { + const unique = [...new Set(allowed.filter((item): item is string => Boolean(item)))]; + if (requested) return unique.includes(requested) ? requested : null; + return unique[0] ?? null; +} diff --git a/apps/api/src/common/production-checks.spec.ts b/apps/api/src/common/production-checks.spec.ts new file mode 100644 index 0000000..3ec49a4 --- /dev/null +++ b/apps/api/src/common/production-checks.spec.ts @@ -0,0 +1,49 @@ +import { productionConfigProblems } from './production-checks'; + +describe('productionConfigProblems', () => { + const A = 'a'.repeat(40); + const C = 'c'.repeat(40); + const good = { + NODE_ENV: 'production', + JWT_SECRET: A, + JWT_CUSTOMER_SECRET: C, + CORS_ORIGINS: 'https://adm.example.ir, https://app.example.ir/', + }; + + it('a complete production config passes', () => { + expect(productionConfigProblems(good)).toEqual([]); + }); + + it('checks nothing outside production', () => { + expect(productionConfigProblems({ NODE_ENV: 'development' })).toEqual([]); + }); + + it('refuses the fixed test login code (REL-01)', () => { + expect(productionConfigProblems({ ...good, OTP_MASTER_CODE: '1234' })).toHaveLength(1); + // explicit opt-in for a test server built from the production image + expect( + productionConfigProblems({ ...good, OTP_MASTER_CODE: '1234', TEST_SERVER_ALLOW_MASTER_CODE: 'yes' }), + ).toEqual([]); + }); + + it('requires a separate customer token key (REL-03)', () => { + expect(productionConfigProblems({ ...good, JWT_CUSTOMER_SECRET: '' })).toHaveLength(1); + expect(productionConfigProblems({ ...good, JWT_CUSTOMER_SECRET: A })).toHaveLength(1); + expect(productionConfigProblems({ ...good, JWT_CUSTOMER_SECRET: 'short' })).toHaveLength(1); + }); + + it('requires a strong admin key (SEC-04)', () => { + expect(productionConfigProblems({ ...good, JWT_SECRET: undefined })).toHaveLength(1); + expect(productionConfigProblems({ ...good, JWT_SECRET: 'dev-only-insecure-secret' })).toHaveLength(1); + }); + + it('requires an explicit list of allowed origins (SEC-04)', () => { + expect(productionConfigProblems({ ...good, CORS_ORIGINS: '' })).toHaveLength(1); + expect(productionConfigProblems({ ...good, CORS_ORIGINS: '*' })).toHaveLength(1); + expect(productionConfigProblems({ ...good, CORS_ORIGINS: 'adm.example.ir' })).toHaveLength(1); + }); + + it('lists every problem at once', () => { + expect(productionConfigProblems({ NODE_ENV: 'production', OTP_MASTER_CODE: '1234' })).toHaveLength(4); + }); +}); diff --git a/apps/api/src/common/production-checks.ts b/apps/api/src/common/production-checks.ts new file mode 100644 index 0000000..226519d --- /dev/null +++ b/apps/api/src/common/production-checks.ts @@ -0,0 +1,80 @@ +/** + * What a production server must have before it may start (REL-01, REL-03, + * SEC-04). Each problem is one line, in Persian then English; main.ts refuses + * to boot while the list is non-empty. Pure (takes the env), so it is tested + * without starting the app. + */ +export const DEV_JWT_SECRET = 'dev-only-insecure-secret'; + +/** Lets a TEST server built from the production image keep the fixed OTP. */ +export const ALLOW_MASTER_CODE_FLAG = 'TEST_SERVER_ALLOW_MASTER_CODE'; + +const MIN_SECRET_LENGTH = 32; + +type Env = Record; + +const val = (env: Env, k: string) => { + const v = env[k]?.trim(); + return v ? v : null; +}; + +/** CORS_ORIGINS as a clean list of origins (no trailing slash). */ +export function parseCorsOrigins(raw: string | undefined): string[] { + return (raw ?? '') + .split(',') + .map((o) => o.trim().replace(/\/+$/, '')) + .filter(Boolean); +} + +export function productionConfigProblems(env: Env): string[] { + if (env.NODE_ENV !== 'production') return []; + const problems: string[] = []; + + // SEC-04 — the admin token key. + const admin = val(env, 'JWT_SECRET'); + if (!admin) { + problems.push('JWT_SECRET تنظیم نشده است. / JWT_SECRET is not set.'); + } else if (admin === DEV_JWT_SECRET || admin.length < MIN_SECRET_LENGTH) { + problems.push( + `JWT_SECRET باید یک مقدار تصادفی دست‌کم ${MIN_SECRET_LENGTH} نویسه باشد. / JWT_SECRET must be a random value of at least ${MIN_SECRET_LENGTH} characters.`, + ); + } + + // REL-03 — the customer / sales-expert app token key, separate from the admin one. + const customer = val(env, 'JWT_CUSTOMER_SECRET'); + if (!customer) { + problems.push( + 'JWT_CUSTOMER_SECRET تنظیم نشده است؛ توکن مشتری‌ها با کلید مدیرها امضا می‌شود. / JWT_CUSTOMER_SECRET is not set: app tokens would be signed with the admin key.', + ); + } else if (customer === admin) { + problems.push('JWT_CUSTOMER_SECRET نباید با JWT_SECRET یکی باشد. / JWT_CUSTOMER_SECRET must differ from JWT_SECRET.'); + } else if (customer === DEV_JWT_SECRET || customer.length < MIN_SECRET_LENGTH) { + problems.push( + `JWT_CUSTOMER_SECRET باید یک مقدار تصادفی دست‌کم ${MIN_SECRET_LENGTH} نویسه باشد. / JWT_CUSTOMER_SECRET must be a random value of at least ${MIN_SECRET_LENGTH} characters.`, + ); + } + + // SEC-04 — only the panel and the apps may call the API from a browser. + const origins = parseCorsOrigins(env.CORS_ORIGINS); + if (!origins.length) { + problems.push( + 'CORS_ORIGINS تنظیم نشده است؛ نشانی پنل و اپ‌ها را با ویرگول جدا بنویسید. / CORS_ORIGINS is not set: list the panel and app origins, comma-separated.', + ); + } else { + const bad = origins.filter((o) => o === '*' || !/^https?:\/\/[^/\s]+$/i.test(o)); + if (bad.length) { + problems.push( + `CORS_ORIGINS فقط نشانی کامل می‌پذیرد، مثل https://adm.example.ir — نادرست: ${bad.join(', ')} / CORS_ORIGINS takes full origins only; invalid: ${bad.join(', ')}`, + ); + } + } + + // REL-01 — the fixed test OTP signs in ANY customer. + if (val(env, 'OTP_MASTER_CODE') && val(env, ALLOW_MASTER_CODE_FLAG) !== 'yes') { + problems.push( + `OTP_MASTER_CODE (کد ثابت ورود آزمایشی) روی سرور اصلی مجاز نیست؛ آن را حذف کنید. فقط سرور آزمایشی با ${ALLOW_MASTER_CODE_FLAG}=yes. / OTP_MASTER_CODE is not allowed in production; remove it (test servers only: ${ALLOW_MASTER_CODE_FLAG}=yes).`, + ); + } + + return problems; +} diff --git a/apps/api/src/main.ts b/apps/api/src/main.ts index 37b943e..3cb1767 100644 --- a/apps/api/src/main.ts +++ b/apps/api/src/main.ts @@ -7,6 +7,10 @@ import type { Response } from 'express'; import { AppModule } from './app.module'; import { prepareDatabase } from './prisma/bootstrap'; import { PrismaExceptionFilter } from './prisma/prisma-exception.filter'; +import { assertSmsConfigured } from './modules/sms/sms.service'; +import { envOr, envOrNull } from './common/env'; +import { parseCorsOrigins, productionConfigProblems } from './common/production-checks'; +import { masterOtpCode, masterOtpEnabled } from './modules/customer-auth/customer-auth.service'; // serve-static's bundled `mime` version predates .avif, so it falls back to // application/octet-stream — browsers still render the image (they sniff @@ -15,17 +19,107 @@ const EXTRA_MIME_TYPES: Record = { '.avif': 'image/avif', }; +/** + * REL-01, REL-03, SEC-04 — a production server does not start until its keys, + * allowed origins and the fixed test login are right. Every problem is listed + * at once, so one restart fixes them all. Outside production nothing is + * checked and the development fallbacks keep a fresh checkout running. + * The rules live in common/production-checks.ts. + */ +function assertProductionConfig() { + const problems = productionConfigProblems(process.env); + if (!problems.length) return; + throw new Error( + '\nسرور در حالت production اجرا نمی‌شود تا این موارد درست شوند:\n' + + 'Refusing to start in production until these are fixed:\n' + + problems.map((p) => ' • ' + p).join('\n') + + '\n(see docs/SERVER-SETUP-CHECKLIST.md)\n', + ); +} + +/** + * SEC-04 — which sites may call the API from a browser. CORS_ORIGINS is a + * comma-separated list of exact origins (e.g. https://adm.example.ir,https://app.example.ir). + * Required in production (assertProductionConfig); unset elsewhere = allow-all. + */ +function corsOrigins(): string[] | true { + const list = parseCorsOrigins(envOrNull('CORS_ORIGINS') ?? ''); + return list.length ? list : true; +} + async function bootstrap() { + assertProductionConfig(); + + // D20 — reports the SMS configuration and never throws. A missing credential + // no longer stops the boot; messages are logged instead of sent. + assertSmsConfigured(); + + // A missing JWT_CUSTOMER_SECRET is not a cosmetic default: customerJwtSecret() + // falls back to JWT_SECRET, so admin and app tokens end up signed with the + // SAME key. The `typ` check in JwtStrategy is then the only thing keeping an + // app token off the admin routes — one guard instead of two independent ones, + // and a sales expert's app token carries their AdminUser id in `sub`. Warn as + // loudly as the master-code banner rather than fail the boot, so a running + // deployment that has not set it yet still starts. + if (!envOrNull('JWT_CUSTOMER_SECRET')) { + const sharedWithAdmin = Boolean(envOrNull('JWT_SECRET')); + // eslint-disable-next-line no-console + console.warn( + '\n' + + '='.repeat(72) + + '\n ⚠ JWT_CUSTOMER_SECRET تنظیم نشده است\n' + + ' ⚠ JWT_CUSTOMER_SECRET IS NOT SET.\n' + + (sharedWithAdmin + ? ' ⚠ Customer/expert app tokens are being signed with JWT_SECRET,\n' + + ' ⚠ the SAME key as admin tokens. The two token realms are no\n' + + ' ⚠ longer cryptographically separated.\n' + : ' ⚠ Neither JWT_SECRET nor JWT_CUSTOMER_SECRET is set, so app\n' + + ' ⚠ tokens are signed with a well-known development string.\n') + + ' ⚠ Set JWT_CUSTOMER_SECRET to a distinct random value before release.\n' + + '='.repeat(72) + + '\n', + ); + } + + // D20 — a loud, unmissable banner whenever the delivery bypass is armed, so + // it cannot reach the real release unnoticed. + if (masterOtpEnabled()) { + const code = masterOtpCode() ?? ''; + // Both apps render the login OTP as FOUR single-character boxes and only + // submit on @on-complete, i.e. at exactly 4 digits + // (LoginView.vue:43 in each app, OtpInput.vue:43). The API itself accepts + // any length, so a longer master code works over HTTP but can never be + // typed into the apps. Warn rather than reject: an operator may be using it + // for API testing only. + const typable = /^\d{4}$/.test(code); + // eslint-disable-next-line no-console + console.warn( + '\n' + + '='.repeat(72) + + '\n ⚠ OTP_MASTER_CODE فعال است — قبل از انتشار اصلی حذف شود\n' + + ' ⚠ OTP_MASTER_CODE IS ACTIVE: any active customer can sign in with\n' + + ' ⚠ this fixed code. Remove it from the environment before release.\n' + + (typable + ? '' + : ' ⚠\n' + + ' ⚠ NOTE: this code is not 4 digits, so it CANNOT be entered in the\n' + + ' ⚠ customer apps — their OTP box has exactly 4 boxes. Use a\n' + + ' ⚠ 4-digit code for the apps; this one works over the API only.\n') + + '='.repeat(72) + + '\n', + ); + } + await prepareDatabase(); const app = await NestFactory.create(AppModule); app.setGlobalPrefix('api'); app.useGlobalPipes(new ValidationPipe({ whitelist: true, transform: true })); app.useGlobalFilters(new PrismaExceptionFilter()); - app.enableCors(); + app.enableCors({ origin: corsOrigins() }); // Uploaded files, mounted OUTSIDE the /api prefix so the URLs stored on // UploadedFile.url ("/uploads/") resolve directly. - app.useStaticAssets(process.env.UPLOAD_DIR ?? join(process.cwd(), 'storage', 'uploads'), { + app.useStaticAssets(envOr('UPLOAD_DIR', join(process.cwd(), 'storage', 'uploads')), { prefix: '/uploads/', index: false, dotfiles: 'deny', @@ -34,7 +128,9 @@ async function bootstrap() { if (mime) res.setHeader('Content-Type', mime); }, }); - const port = Number(process.env.PORT ?? 3000); + // envOr, not `??`: Number('') is 0, which would bind a random ephemeral port + // and make the container unreachable at the port compose maps. See DEPLOY-02. + const port = Number(envOr('PORT', '3000')); try { // Bind all interfaces explicitly so the container is reachable from nginx. diff --git a/apps/api/src/modules/accounting-sync/accounting-admin.controller.ts b/apps/api/src/modules/accounting-sync/accounting-admin.controller.ts new file mode 100644 index 0000000..403dbb4 --- /dev/null +++ b/apps/api/src/modules/accounting-sync/accounting-admin.controller.ts @@ -0,0 +1,107 @@ +import { Body, Controller, Delete, Get, HttpCode, Param, Post, Put, Query } from '@nestjs/common'; +import { CurrentAdmin, RequirePermission } from '../auth/guards'; +import type { AuthenticatedAdmin } from '../auth/jwt.strategy'; +import { AccountingAdminService } from './accounting-admin.service'; + +/** + * «اتصال حسابداری» (D27) — every route behind `config.accounting`. Nothing + * here ever returns a token: the configuration comes back with tokens reduced + * to `tokenSet` / `tokenReadable` flags. + */ +@Controller('admin/accounting') +@RequirePermission('config.accounting') +export class AccountingAdminController { + constructor(private readonly admin: AccountingAdminService) {} + + @Get() + overview() { + return this.admin.overview(); + } + + @Put('config') + save(@Body() body: Record) { + return this.admin.save(body); + } + + @Post('test') + @HttpCode(200) + test(@Body() body: { provider?: string; connection?: Record }) { + return this.admin.test(body?.provider, body?.connection); + } + + @Post('certificate') + @HttpCode(200) + certificate(@Body() body: { baseUrl?: string }) { + return this.admin.certificate(body?.baseUrl); + } + + @Get('options') + options(@Query('provider') provider?: string) { + return this.admin.options(provider); + } + + @Post('run/:job') + @HttpCode(200) + run(@Param('job') job: string) { + return this.admin.run(job); + } + + @Get('outbox') + outbox(@Query() q: Record) { + return this.admin.outbox(q); + } + + @Post('outbox/:id/retry') + @HttpCode(200) + retry(@Param('id') id: string) { + return this.admin.retry(id); + } + + @Post('outbox/:id/resolve') + @HttpCode(200) + resolve(@Param('id') id: string, @CurrentAdmin() me: AuthenticatedAdmin, @Body() body: { note?: string }) { + return this.admin.resolve(id, me.id, body?.note); + } + + @Get('issues') + issues(@Query() q: Record) { + return this.admin.issues(q); + } + + @Post('issues/:id/resolve') + @HttpCode(200) + resolveIssue(@Param('id') id: string) { + return this.admin.resolveIssue(id); + } + + @Get('links') + links(@Query() q: Record) { + return this.admin.links(q); + } + + @Post('links') + @HttpCode(200) + link(@Body() body: Record) { + return this.admin.manualLink(body); + } + + @Delete('links/:id') + unlink(@Param('id') id: string) { + return this.admin.unlink(id); + } + + @Get('customers/:id') + customer(@Param('id') id: string) { + return this.admin.customer(id); + } + + @Get('products/status') + productsStatus(@Query('ids') ids: string) { + return this.admin.productsStatus(ids); + } + + @Get('movement') + movement(@Query() q: Record) { + return this.admin.movement(q); + } +} diff --git a/apps/api/src/modules/accounting-sync/accounting-admin.service.ts b/apps/api/src/modules/accounting-sync/accounting-admin.service.ts new file mode 100644 index 0000000..bbea9e1 --- /dev/null +++ b/apps/api/src/modules/accounting-sync/accounting-admin.service.ts @@ -0,0 +1,366 @@ +import { BadRequestException, Injectable, NotFoundException } from '@nestjs/common'; +import { AccountingEntityType, AccountingOutboxStatus, Prisma } from '@prisma/client'; +import { PrismaService } from '../../prisma/prisma.service'; +import { cleanUrl } from './accounting-config'; +import { AccountingConfigService, JobName } from './accounting-config.service'; +import { fetchServerCertificate } from './accounting-http'; +import { AccountingSyncService } from './accounting-sync.service'; +import { AccountingWorkerService, PULL_FEATURE } from './accounting-worker.service'; +import { parseJalali, toJalali } from './jalali'; +import { ACCOUNTING_PROVIDERS, ProviderName, isProviderName } from './providers'; + +const JOBS: JobName[] = ['customers', 'balances', 'products', 'outbox']; +const STATUSES: AccountingOutboxStatus[] = ['PENDING', 'SENDING', 'SENT', 'FAILED', 'NEEDS_REVIEW', 'RESOLVED']; + +function page(v: unknown) { + const n = Number(v); + return Number.isInteger(n) && n > 0 ? n : 1; +} + +function limit(v: unknown, max = 100) { + const n = Number(v); + return Number.isInteger(n) && n > 0 ? Math.min(n, max) : 25; +} + +/** Backs the «اتصال حسابداری» admin screen (plan §5). */ +@Injectable() +export class AccountingAdminService { + constructor( + private readonly prisma: PrismaService, + private readonly config: AccountingConfigService, + private readonly sync: AccountingSyncService, + private readonly worker: AccountingWorkerService, + ) {} + + async overview() { + const [config, state, counts, openIssues, raw] = await Promise.all([ + this.config.getPublic(), + this.config.getState(), + this.prisma.accountingOutbox.groupBy({ by: ['status'], _count: { _all: true } }), + this.prisma.accountingIssue.count({ where: { resolvedAt: null } }), + this.config.get(), + ]); + return { + config, + inactiveReason: this.config.inactiveReason(raw), + state, + busy: this.worker.busy, + realtime: this.worker.realtime, + outbox: Object.fromEntries(counts.map((c) => [c.status, c._count._all])), + openIssues, + }; + } + + async save(body: Record) { + const { providerChanged } = await this.config.save(body); + return { ...(await this.overview()), providerChanged }; + } + + private async settingsOf(name: unknown) { + const config = await this.config.get(); + const provider = isProviderName(name) ? name : config.provider; + if (provider === 'none') throw new BadRequestException('نرم‌افزار حسابداری انتخاب نشده است'); + const settings = this.config.settingsFor(config, provider); + if (!settings) throw new BadRequestException('آدرس یا توکن این نرم‌افزار تنظیم نشده (یا توکن قابل‌خواندن نیست)'); + return { provider: ACCOUNTING_PROVIDERS[provider], settings, config }; + } + + /** For the sync buttons on the lists: connected or not, nothing more. */ + async connectionStatus() { + const config = await this.config.get(); + const reason = this.config.inactiveReason(config); + return { + connected: !reason, + provider: reason || config.provider === 'none' ? null : ACCOUNTING_PROVIDERS[config.provider].label, + }; + } + + /** The list-page sync buttons (plan §12): run now, wait, report. */ + async syncNow(jobs: ('customers' | 'balances' | 'products')[]) { + const reason = this.config.inactiveReason(await this.config.get()); + if (reason) throw new BadRequestException(`سینک با حسابداری انجام نمی‌شود: ${reason}`); + const results = await this.worker.runPullsNow(jobs); + if (!results) throw new BadRequestException('یک همگام‌سازی دیگر در حال اجراست؛ کمی بعد دوباره امتحان کنید'); + return { ok: Object.values(results).every((r) => r.ok), results }; + } + + /** Tests the connection as typed in the form (`connection`), falling back to what is saved. */ + async test(name: unknown, connection?: Record) { + if (!isProviderName(name)) throw new BadRequestException('نرم‌افزار حسابداری نامعتبر است'); + const provider = ACCOUNTING_PROVIDERS[name]; + const settings = this.config.draftSettings(await this.config.get(), name, connection); + if (!settings) throw new BadRequestException('آدرس و توکن را وارد کنید'); + const started = Date.now(); + try { + const info = await provider.health(settings); + return { ok: true, provider: provider.label, ms: Date.now() - started, info }; + } catch (err) { + return { ok: false, provider: provider.label, ms: Date.now() - started, error: this.sync.describeError(err) }; + } + } + + /** + * The certificate the server at `baseUrl` presents, for the admin to compare + * and pin (a self-signed Tahesab install cannot be verified otherwise). + */ + async certificate(baseUrl: unknown) { + const url = cleanUrl(baseUrl, 'آدرس'); + if (!url) throw new BadRequestException('آدرس را وارد کنید'); + try { + return await fetchServerCertificate(url, 10_000); + } catch (err) { + throw new BadRequestException(`گواهی دریافت نشد: ${this.sync.describeError(err)}`); + } + } + + /** Dropdown options for the mapping tab; each list fails on its own. */ + async options(name: unknown) { + const { provider, settings } = await this.settingsOf(name); + const safe = async (fn: () => Promise) => { + try { + return { ok: true as const, items: await fn() }; + } catch (err) { + return { ok: false as const, items: [] as never[], error: this.sync.describeError(err) }; + } + }; + const [customerGroups, karSakhteGroups, karSakhteTypes] = await Promise.all([ + safe(() => provider.listCustomerGroups(settings)), + safe(() => provider.listKarSakhteGroups(settings)), + safe(() => provider.listKarSakhteTypes(settings)), + ]); + const categories = await this.prisma.category.findMany({ select: { id: true, title: true }, orderBy: { title: 'asc' } }); + return { provider: provider.name, customerGroups, karSakhteGroups, karSakhteTypes, categories }; + } + + async run(job: string) { + if (!JOBS.includes(job as JobName)) throw new BadRequestException('کار نامعتبر است'); + const config = await this.config.get(); + const reason = this.config.inactiveReason(config); + if (reason) throw new BadRequestException(`همگام‌سازی انجام نمی‌شود: ${reason}`); + if (job !== 'outbox' && !config.features[PULL_FEATURE[job as Exclude]]) { + throw new BadRequestException('این قابلیت در تب «قابلیت‌ها و زمان‌بندی» خاموش است؛ اول روشن و ذخیره کنید'); + } + const started = this.worker.runNow(job as JobName); + return { started, message: started ? 'شروع شد' : 'یک همگام‌سازی دیگر در حال اجراست؛ کمی بعد دوباره امتحان کنید' }; + } + + // ── outbox log ────────────────────────────────────────────────────── + + async outbox(q: Record) { + const where: Prisma.AccountingOutboxWhereInput = {}; + if (typeof q.status === 'string' && STATUSES.includes(q.status as AccountingOutboxStatus)) { + where.status = q.status as AccountingOutboxStatus; + } + if (typeof q.kind === 'string' && q.kind) where.kind = q.kind as Prisma.AccountingOutboxWhereInput['kind']; + if (typeof q.entityId === 'string' && q.entityId) where.entityId = q.entityId; + const p = page(q.page); + const l = limit(q.limit); + const [rows, total] = await Promise.all([ + this.prisma.accountingOutbox.findMany({ where, orderBy: { createdAt: 'desc' }, skip: (p - 1) * l, take: l }), + this.prisma.accountingOutbox.count({ where }), + ]); + const labels = await this.labelsFor(rows.map((r) => ({ kind: r.kind, entityId: r.entityId }))); + return { rows: rows.map((r) => ({ ...r, entityLabel: labels.get(r.entityId) ?? null })), total, page: p, limit: l }; + } + + private async labelsFor(items: { kind: string; entityId: string }[]) { + const orderIds = items.filter((i) => i.kind.startsWith('ORDER')).map((i) => i.entityId); + const customerIds = items.filter((i) => i.kind === 'CUSTOMER_PUSH').map((i) => i.entityId); + const productIds = items.filter((i) => i.kind === 'PRODUCT_PUSH').map((i) => i.entityId); + const [orders, customers, products] = await Promise.all([ + orderIds.length ? this.prisma.order.findMany({ where: { id: { in: orderIds } }, select: { id: true, orderNumber: true, customer: { select: { fullName: true } } } }) : [], + customerIds.length ? this.prisma.customer.findMany({ where: { id: { in: customerIds } }, select: { id: true, fullName: true, mobile: true } }) : [], + productIds.length ? this.prisma.product.findMany({ where: { id: { in: productIds } }, select: { id: true, title: true } }) : [], + ]); + const m = new Map(); + for (const o of orders) m.set(o.id, `سفارش ${o.orderNumber} — ${o.customer.fullName}`); + for (const c of customers) m.set(c.id, `${c.fullName} (${c.mobile})`); + for (const p of products) m.set(p.id, p.title); + return m; + } + + async retry(id: string) { + const row = await this.prisma.accountingOutbox.findUnique({ where: { id } }); + if (!row) throw new NotFoundException('ردیف پیدا نشد'); + if (row.status === 'SENT' || row.status === 'SENDING') throw new BadRequestException('این ردیف قابل تلاش دوباره نیست'); + return this.prisma.accountingOutbox.update({ + where: { id }, + data: { status: 'PENDING', nextAttemptAt: new Date(), attempts: row.status === 'PENDING' ? row.attempts : 0 }, + }); + } + + async resolve(id: string, adminId: string, note?: string) { + const row = await this.prisma.accountingOutbox.findUnique({ where: { id } }); + if (!row) throw new NotFoundException('ردیف پیدا نشد'); + if (row.status === 'SENDING') throw new BadRequestException('در حال ارسال است'); + return this.prisma.accountingOutbox.update({ + where: { id }, + data: { status: 'RESOLVED', resolvedById: adminId, lastError: note ? `حل‌شده: ${note}` : row.lastError }, + }); + } + + // ── issues ────────────────────────────────────────────────────────── + + async issues(q: Record) { + const where: Prisma.AccountingIssueWhereInput = q.resolved === '1' ? { resolvedAt: { not: null } } : { resolvedAt: null }; + const p = page(q.page); + const l = limit(q.limit); + const [rows, total] = await Promise.all([ + this.prisma.accountingIssue.findMany({ where, orderBy: { updatedAt: 'desc' }, skip: (p - 1) * l, take: l }), + this.prisma.accountingIssue.count({ where }), + ]); + return { rows, total, page: p, limit: l }; + } + + resolveIssue(id: string) { + return this.prisma.accountingIssue.update({ where: { id }, data: { resolvedAt: new Date() } }); + } + + // ── links ─────────────────────────────────────────────────────────── + + async links(q: Record) { + const config = await this.config.get(); + const where: Prisma.AccountingLinkWhereInput = {}; + if (q.entityType === 'CUSTOMER' || q.entityType === 'PRODUCT') where.entityType = q.entityType; + where.provider = isProviderName(q.provider) ? q.provider : config.provider === 'none' ? undefined : config.provider; + if (typeof q.entityId === 'string' && q.entityId) where.entityId = q.entityId; + if (typeof q.q === 'string' && q.q.trim()) { + where.OR = [{ externalCode: { contains: q.q.trim() } }, { externalName: { contains: q.q.trim() } }]; + } + const p = page(q.page); + const l = limit(q.limit); + const [rows, total] = await Promise.all([ + this.prisma.accountingLink.findMany({ where, orderBy: { createdAt: 'desc' }, skip: (p - 1) * l, take: l }), + this.prisma.accountingLink.count({ where }), + ]); + return { rows, total, page: p, limit: l }; + } + + async manualLink(body: Record) { + const config = await this.config.get(); + if (config.provider === 'none') throw new BadRequestException('نرم‌افزار حسابداری انتخاب نشده است'); + const provider = config.provider as ProviderName; + const entityType = body.entityType === 'PRODUCT' ? AccountingEntityType.PRODUCT : AccountingEntityType.CUSTOMER; + const entityId = String(body.entityId ?? '').trim(); + const externalCode = String(body.externalCode ?? '').trim(); + if (!entityId || !externalCode) throw new BadRequestException('شناسه و کد حسابداری الزامی است'); + + const exists = + entityType === 'CUSTOMER' + ? await this.prisma.customer.findUnique({ where: { id: entityId }, select: { id: true } }) + : await this.prisma.product.findUnique({ where: { id: entityId }, select: { id: true } }); + if (!exists) throw new NotFoundException('ردیف اپ پیدا نشد'); + + const taken = await this.prisma.accountingLink.findUnique({ + where: { provider_entityType_externalCode: { provider, entityType, externalCode } }, + }); + if (taken && taken.entityId !== entityId) throw new BadRequestException('این کد به ردیف دیگری لینک است'); + + return this.prisma.accountingLink.upsert({ + where: { provider_entityType_entityId: { provider, entityType, entityId } }, + update: { externalCode, origin: 'MANUAL', syncedAt: new Date() }, + create: { provider, entityType, entityId, externalCode, origin: 'MANUAL', externalName: (body.externalName as string) || null }, + }); + } + + async unlink(id: string) { + await this.prisma.accountingLink.delete({ where: { id } }).catch(() => { + throw new NotFoundException('لینک پیدا نشد'); + }); + return { success: true }; + } + + // ── per-row panels ────────────────────────────────────────────────── + + async customer(id: string) { + const config = await this.config.get(); + const c = await this.prisma.customer.findUnique({ + where: { id }, + select: { + id: true, + goldDebtGrams: true, + fiatDebtRial: true, + accountingGoldBalance: true, + accountingRialBalance: true, + accountingBalanceAt: true, + }, + }); + if (!c) throw new NotFoundException('مشتری یافت نشد'); + const link = + config.provider === 'none' + ? null + : await this.prisma.accountingLink.findUnique({ + where: { provider_entityType_entityId: { provider: config.provider, entityType: 'CUSTOMER', entityId: id } }, + }); + const fresh = link ? await this.sync.customerBalance(id) : null; + const jobs = await this.prisma.accountingOutbox.findMany({ + where: { entityId: id, kind: 'CUSTOMER_PUSH' }, + orderBy: { createdAt: 'desc' }, + take: 5, + }); + return { + provider: config.provider, + link, + internal: { gold: c.goldDebtGrams, rial: c.fiatDebtRial }, + accounting: fresh + ? { gold: fresh.gold, rial: fresh.rial, at: fresh.at } + : c.accountingBalanceAt + ? { gold: c.accountingGoldBalance, rial: c.accountingRialBalance, at: c.accountingBalanceAt } + : null, + jobs, + }; + } + + async productsStatus(idsCsv: string) { + const ids = String(idsCsv ?? '') + .split(',') + .map((s) => s.trim()) + .filter(Boolean) + .slice(0, 500); + const config = await this.config.get(); + if (ids.length === 0) return {}; + const [products, links] = await Promise.all([ + this.prisma.product.findMany({ + where: { id: { in: ids } }, + select: { + id: true, + accountingStockWeight: true, + accountingStockCount: true, + accountingStockAt: true, + _count: { select: { images: true } }, + }, + }), + config.provider === 'none' + ? [] + : this.prisma.accountingLink.findMany({ where: { provider: config.provider, entityType: 'PRODUCT', entityId: { in: ids } } }), + ]); + const linkBy = new Map(links.map((l) => [l.entityId, l])); + return Object.fromEntries( + products.map((p) => { + const l = linkBy.get(p.id); + return [ + p.id, + { + linked: !!l, + locked: !!l && config.features.products, + code: l?.externalCode ?? null, + origin: l?.origin ?? null, + stockWeight: p.accountingStockWeight, + stockCount: p.accountingStockCount, + stockAt: p.accountingStockAt, + hasImage: p._count.images > 0, + }, + ]; + }), + ); + } + + async movement(q: Record) { + const a = await this.config.active(); + if (!a) throw new BadRequestException('اتصال حسابداری فعال نیست'); + const to = parseJalali(q.to as string) ?? toJalali(new Date()); + const from = parseJalali(q.from as string) ?? toJalali(new Date(Date.now() - 30 * 24 * 3600 * 1000)); + const rows = await a.provider.getKarSakhteMovement(a.settings, from, to); + return { provider: a.provider.label, scope: a.provider.capabilities.movementScope, rows }; + } +} diff --git a/apps/api/src/modules/accounting-sync/accounting-config.service.ts b/apps/api/src/modules/accounting-sync/accounting-config.service.ts new file mode 100644 index 0000000..b8aff8e --- /dev/null +++ b/apps/api/src/modules/accounting-sync/accounting-config.service.ts @@ -0,0 +1,298 @@ +import { BadRequestException, Injectable, Logger, OnModuleInit } from '@nestjs/common'; +import { Prisma } from '@prisma/client'; +import { PrismaService } from '../../prisma/prisma.service'; +import { + ACCOUNTING_CONFIG_KEY, + ACCOUNTING_STATE_KEY, + AccountingConfig, + StoredConnection, + cleanBool, + cleanCa, + cleanGroup, + cleanGroups, + cleanInt, + cleanUrl, + documentStatusRank, + withDefaults, +} from './accounting-config'; +import { ACCOUNTING_PROVIDERS, AccountingProvider, ProviderName, ProviderSettings, isProviderName } from './providers'; +import { openSecret, sealSecret, secretKeySource } from './secret-box'; +import { parsePemCertificates } from './accounting-http'; + +/** The first certificate of a pasted bundle, for display; null when none parses. */ +function describeCertificate(pem: string | null) { + const [c] = parsePemCertificates(pem); + if (!c) return null; + return { + subject: c.subject, + subjectAltName: c.subjectAltName ?? null, + validTo: c.validTo, + expired: new Date(c.validTo).getTime() < Date.now(), + fingerprint256: c.fingerprint256, + }; +} + +export interface ActiveProvider { + provider: AccountingProvider; + settings: ProviderSettings; + config: AccountingConfig; +} + +export type JobName = 'customers' | 'balances' | 'products' | 'outbox'; + +export interface JobState { + lastRunAt?: string; + lastOkAt?: string; + lastError?: string | null; + summary?: Record; +} + +export interface AccountingState { + jobs: Partial>; +} + +/** How long a read config is reused before going back to the database. */ +const CACHE_MS = 5_000; + +@Injectable() +export class AccountingConfigService implements OnModuleInit { + private readonly logger = new Logger('Accounting'); + private cache: { at: number; config: AccountingConfig } | null = null; + + constructor(private readonly prisma: PrismaService) {} + + onModuleInit() { + if (secretKeySource() !== 'ACCOUNTING_SECRET_KEY') { + this.logger.warn( + '⚠️ ACCOUNTING_SECRET_KEY تنظیم نشده است. توکن نرم‌افزار حسابداری با کلیدی مشتق از JWT_SECRET رمز می‌شود؛ ' + + 'با عوض‌شدن JWT_SECRET توکن ذخیره‌شده قابل‌خواندن نمی‌ماند و باید دوباره وارد شود. (D27)', + ); + } + } + + async get(): Promise { + if (this.cache && Date.now() - this.cache.at < CACHE_MS) return this.cache.config; + const row = await this.prisma.setting.findUnique({ where: { key: ACCOUNTING_CONFIG_KEY } }); + const config = withDefaults(row?.value); + this.cache = { at: Date.now(), config }; + return config; + } + + /** The configuration as the admin screen sees it: tokens reduced to flags. */ + async getPublic() { + const c = await this.get(); + const publicConn = (conn: StoredConnection) => { + const { tokenSealed, ...rest } = conn; + return { + ...rest, + tokenSet: !!tokenSealed, + tokenReadable: !!tokenSealed && openSecret(tokenSealed) !== null, + // What the pinned certificate is, so the screen can show it instead of PEM. + caInfo: describeCertificate(rest.caCert), + }; + }; + return { + ...c, + tahesab: publicConn(c.tahesab), + zarrin: publicConn(c.zarrin), + secretKeySource: secretKeySource(), + providers: Object.values(ACCOUNTING_PROVIDERS).map((p) => ({ + name: p.name, + label: p.label, + capabilities: p.capabilities, + })), + }; + } + + /** + * Applies an admin's edit. Anything not sent is kept. A token is replaced + * only by a non-empty string and removed only by an explicit null — so the + * form can be saved without ever having seen the token. + */ + async save(input: Record): Promise<{ providerChanged: boolean }> { + const current = await this.get(); + const next: AccountingConfig = JSON.parse(JSON.stringify(current)); + + if (input.provider !== undefined) { + if (input.provider !== 'none' && !isProviderName(input.provider)) { + throw new BadRequestException('نرم‌افزار حسابداری نامعتبر است'); + } + next.provider = input.provider; + } + + const conn = (key: ProviderName) => { + const src = input[key]; + if (!src || typeof src !== 'object') return; + const label = ACCOUNTING_PROVIDERS[key].label; + const dst: StoredConnection = next[key]; + if (src.baseUrl !== undefined) dst.baseUrl = cleanUrl(src.baseUrl, `آدرس ${label}`); + if (src.caCert !== undefined) dst.caCert = cleanCa(src.caCert); + if (src.timeoutMs !== undefined) dst.timeoutMs = cleanInt(src.timeoutMs, 'مهلت پاسخ (میلی‌ثانیه)', 3000, 120000, dst.timeoutMs); + if (src.token === null) dst.tokenSealed = null; + else if (typeof src.token === 'string' && src.token.trim()) { + try { + dst.tokenSealed = sealSecret(src.token.trim()); + } catch (err) { + throw new BadRequestException((err as Error).message); + } + } + }; + conn('tahesab'); + conn('zarrin'); + + if (input.tahesab?.dbName !== undefined) { + const db = String(input.tahesab.dbName ?? '').trim(); + if (!/^[A-Za-z0-9_]{1,64}$/.test(db)) throw new BadRequestException('نام دیتابیس ته‌حساب نامعتبر است'); + next.tahesab.dbName = db; + } + if (input.zarrin?.balanceOwesWhen !== undefined) { + if (input.zarrin.balanceOwesWhen !== 'negative' && input.zarrin.balanceOwesWhen !== 'positive') { + throw new BadRequestException('علامت مانده‌ی زرین نامعتبر است'); + } + next.zarrin.balanceOwesWhen = input.zarrin.balanceOwesWhen; + } + + if (input.features && typeof input.features === 'object') { + for (const k of Object.keys(next.features) as (keyof AccountingConfig['features'])[]) { + next.features[k] = cleanBool(input.features[k], next.features[k]); + } + } + + if (input.intervals && typeof input.intervals === 'object') { + const i = input.intervals; + next.intervals.customersMinutes = cleanInt(i.customersMinutes, 'بازه‌ی سینک مشتری', 5, 1440, next.intervals.customersMinutes); + next.intervals.balancesMinutes = cleanInt(i.balancesMinutes, 'بازه‌ی سینک مانده', 1, 1440, next.intervals.balancesMinutes); + next.intervals.productsMinutes = cleanInt(i.productsMinutes, 'بازه‌ی سینک کارساخته', 5, 1440, next.intervals.productsMinutes); + } + + if (input.mapping && typeof input.mapping === 'object') { + const m = input.mapping; + if (m.importCustomerGroups !== undefined) next.mapping.importCustomerGroups = cleanGroups(m.importCustomerGroups); + if (m.newCustomerGroup !== undefined) next.mapping.newCustomerGroup = cleanGroup(m.newCustomerGroup); + if (m.newKarSakhteGroup !== undefined) next.mapping.newKarSakhteGroup = cleanGroup(m.newKarSakhteGroup); + if (m.newKarSakhteType !== undefined) next.mapping.newKarSakhteType = cleanGroup(m.newKarSakhteType); + if (m.categoryGroups !== undefined) { + next.mapping.categoryGroups = (Array.isArray(m.categoryGroups) ? m.categoryGroups : []) + .map((x: any) => ({ categoryId: String(x?.categoryId ?? '').trim(), group: cleanGroup(x?.group) })) + .filter((x: any) => x.categoryId && x.group); + } + if (m.karat !== undefined) next.mapping.karat = cleanInt(m.karat, 'عیار پایه', 1, 1000, next.mapping.karat); + } + + if (input.documents && typeof input.documents === 'object' && input.documents.triggerStatus !== undefined) { + if (!documentStatusRank(String(input.documents.triggerStatus))) { + throw new BadRequestException('وضعیت ثبت سند سفارش نامعتبر است'); + } + next.documents.triggerStatus = input.documents.triggerStatus; + } + + if (input.report && typeof input.report === 'object') { + next.report.windowDays = cleanInt(input.report.windowDays, 'بازه‌ی گزارش (روز)', 7, 3650, next.report.windowDays); + } + + // Selecting a software that has no address/token would switch the sync + // off without a word (the worker finds nothing usable). + if (next.provider !== 'none' && (!next[next.provider].baseUrl || !next[next.provider].tokenSealed)) { + const label = ACCOUNTING_PROVIDERS[next.provider].label; + throw new BadRequestException(`«${label}» انتخاب شده ولی آدرس یا توکن آن وارد نشده است`); + } + + await this.prisma.setting.upsert({ + where: { key: ACCOUNTING_CONFIG_KEY }, + update: { value: next as unknown as Prisma.InputJsonValue }, + create: { key: ACCOUNTING_CONFIG_KEY, value: next as unknown as Prisma.InputJsonValue }, + }); + this.cache = null; + return { providerChanged: current.provider !== next.provider }; + } + + /** Decrypted settings for one provider; null when it is not usable. */ + settingsFor(config: AccountingConfig, name: ProviderName): ProviderSettings | null { + const conn = config[name]; + if (!conn.baseUrl) return null; + const token = openSecret(conn.tokenSealed); + if (!token) return null; + return { + baseUrl: conn.baseUrl, + token, + caCert: conn.caCert, + timeoutMs: conn.timeoutMs, + dbName: name === 'tahesab' ? config.tahesab.dbName : undefined, + balanceOwesWhen: name === 'zarrin' ? config.zarrin.balanceOwesWhen : undefined, + }; + } + + /** + * Settings as the admin form currently shows them, saved or not, so «تست + * اتصال» checks what is on screen. A blank token means "the saved one". + * Validated like a save; nothing is stored. + */ + draftSettings(config: AccountingConfig, name: ProviderName, input: Record | undefined): ProviderSettings | null { + const src = input && typeof input === 'object' ? input : {}; + const label = ACCOUNTING_PROVIDERS[name].label; + const saved = config[name]; + const baseUrl = src.baseUrl !== undefined ? cleanUrl(src.baseUrl, `آدرس ${label}`) : saved.baseUrl; + const token = typeof src.token === 'string' && src.token.trim() ? src.token.trim() : openSecret(saved.tokenSealed); + if (!baseUrl || !token) return null; + let dbName = config.tahesab.dbName; + if (name === 'tahesab' && src.dbName !== undefined) { + dbName = String(src.dbName ?? '').trim(); + if (!/^[A-Za-z0-9_]{1,64}$/.test(dbName)) throw new BadRequestException('نام دیتابیس ته‌حساب نامعتبر است'); + } + let balanceOwesWhen = config.zarrin.balanceOwesWhen; + if (name === 'zarrin' && (src.balanceOwesWhen === 'negative' || src.balanceOwesWhen === 'positive')) { + balanceOwesWhen = src.balanceOwesWhen; + } + return { + baseUrl, + token, + caCert: src.caCert !== undefined ? cleanCa(src.caCert) : saved.caCert, + timeoutMs: cleanInt(src.timeoutMs, 'مهلت پاسخ (میلی‌ثانیه)', 3000, 120000, saved.timeoutMs), + dbName: name === 'tahesab' ? dbName : undefined, + balanceOwesWhen: name === 'zarrin' ? balanceOwesWhen : undefined, + }; + } + + /** Why nothing syncs, in words for the admin screen; null when a provider is usable. */ + inactiveReason(config: AccountingConfig): string | null { + if (config.provider === 'none') return 'سوییچ روی «بدون اتصال» است'; + const label = ACCOUNTING_PROVIDERS[config.provider].label; + const conn = config[config.provider]; + if (!conn.baseUrl || !conn.tokenSealed) return `«${label}» انتخاب شده ولی آدرس یا توکن آن وارد نشده است`; + if (!this.settingsFor(config, config.provider)) return `توکن ذخیره‌شده‌ی «${label}» قابل‌خواندن نیست؛ دوباره وارد کنید`; + return null; + } + + /** The selected, fully configured provider — or null when the switch is off. */ + async active(): Promise { + const config = await this.get(); + if (config.provider === 'none') return null; + const settings = this.settingsFor(config, config.provider); + if (!settings) return null; + return { provider: ACCOUNTING_PROVIDERS[config.provider], settings, config }; + } + + /** Active provider with this feature switched on, or null. */ + async activeFor(feature: keyof AccountingConfig['features']): Promise { + const a = await this.active(); + return a && a.config.features[feature] ? a : null; + } + + // ── job bookkeeping (shown on the admin screen) ─────────────────────── + + async getState(): Promise { + const row = await this.prisma.setting.findUnique({ where: { key: ACCOUNTING_STATE_KEY } }); + const v = (row?.value ?? {}) as Partial; + return { jobs: v.jobs ?? {} }; + } + + async recordJob(job: JobName, patch: JobState) { + const state = await this.getState(); + state.jobs[job] = { ...(state.jobs[job] ?? {}), ...patch }; + await this.prisma.setting.upsert({ + where: { key: ACCOUNTING_STATE_KEY }, + update: { value: state as unknown as Prisma.InputJsonValue }, + create: { key: ACCOUNTING_STATE_KEY, value: state as unknown as Prisma.InputJsonValue }, + }); + } +} diff --git a/apps/api/src/modules/accounting-sync/accounting-config.ts b/apps/api/src/modules/accounting-sync/accounting-config.ts new file mode 100644 index 0000000..4ab71b2 --- /dev/null +++ b/apps/api/src/modules/accounting-sync/accounting-config.ts @@ -0,0 +1,181 @@ +import { BadRequestException } from '@nestjs/common'; +import { ExternalGroup, ProviderName } from './providers/accounting-provider'; + +/** + * The admin-editable configuration of the accounting integration (D27), + * stored as one Setting row. Every `accounting.*` Setting key is refused by + * the generic `const` routes (admin-misc), so the only way in or out is the + * dedicated, `config.accounting`-guarded screen — and even that never returns + * a token. + */ + +export const ACCOUNTING_SETTING_PREFIX = 'accounting.'; +export const ACCOUNTING_CONFIG_KEY = 'accounting.config'; +export const ACCOUNTING_STATE_KEY = 'accounting.state'; + +/** Keys the generic `const` settings routes must never read or write. */ +export function isAccountingSettingKey(key: string) { + return key.trim().toLowerCase().startsWith(ACCOUNTING_SETTING_PREFIX); +} + +export type ProviderChoice = 'none' | ProviderName; + +export interface StoredConnection { + baseUrl: string; + /** AES-GCM sealed (secret-box.ts). Never leaves the server. */ + tokenSealed: string | null; + /** PEM CA of a self-signed installation; verification is never turned off. */ + caCert: string | null; + timeoutMs: number; +} + +export interface AccountingFeatures { + /** F1 — customer import/link and push. */ + customers: boolean; + /** F2 — balance pull; the customer sees the accounting balance. */ + balances: boolean; + /** F6 — «گزارش» reads the accounting statement. */ + report: boolean; + /** F4 — کارساخته ↔ product sync and the out-of-stock lock. */ + products: boolean; + /** F3 — order documents. */ + documents: boolean; +} + +export interface AccountingConfig { + provider: ProviderChoice; + tahesab: StoredConnection & { dbName: string }; + zarrin: StoredConnection & { balanceOwesWhen: 'negative' | 'positive' }; + features: AccountingFeatures; + intervals: { + customersMinutes: number; + balancesMinutes: number; + productsMinutes: number; + }; + mapping: { + /** Account groups imported into the app; empty = every group. */ + importCustomerGroups: ExternalGroup[]; + /** Group a customer created from the app is put in. */ + newCustomerGroup: ExternalGroup | null; + /** Zarrin: group (گروه ساخته) for a product created in the admin… */ + newKarSakhteGroup: ExternalGroup | null; + /** …overridden per app category. */ + categoryGroups: { categoryId: string; group: ExternalGroup }[]; + /** Zarrin: item type (گرمی/تعدادی…) for a product created in the admin. */ + newKarSakhteType: ExternalGroup | null; + /** Purity the app's grams are in. */ + karat: number; + }; + /** How far back «گزارش» reads the accounting statement. */ + report: { windowDays: number }; + /** F3 — the order status at (or past) which the temporary document (پیش‌فاکتور) is posted. */ + documents: { triggerStatus: DocumentTriggerStatus }; +} + +/** Order statuses in the order an order passes them; SUSPENDED/CANCELLED never trigger. */ +export const DOCUMENT_TRIGGER_STATUSES = [ + 'PLACED', + 'ADMIN_APPROVED', + 'SOURCING', + 'PREPARING', + 'DELIVERED_TO_AGENT', + 'DELIVERED_TO_CUSTOMER', +] as const; +export type DocumentTriggerStatus = (typeof DOCUMENT_TRIGGER_STATUSES)[number]; + +/** 1-based place of a status in DOCUMENT_TRIGGER_STATUSES; 0 = never triggers. */ +export function documentStatusRank(status: string): number { + return DOCUMENT_TRIGGER_STATUSES.indexOf(status as DocumentTriggerStatus) + 1; +} + +export const DEFAULT_TIMEOUT_MS = 20_000; + +export function defaultConfig(): AccountingConfig { + return { + provider: 'none', + tahesab: { baseUrl: '', tokenSealed: null, caCert: null, timeoutMs: DEFAULT_TIMEOUT_MS, dbName: 'TahesabDB' }, + zarrin: { baseUrl: '', tokenSealed: null, caCert: null, timeoutMs: DEFAULT_TIMEOUT_MS, balanceOwesWhen: 'negative' }, + features: { customers: false, balances: false, report: false, products: false, documents: false }, + intervals: { customersMinutes: 60, balancesMinutes: 10, productsMinutes: 30 }, + mapping: { + importCustomerGroups: [], + newCustomerGroup: null, + newKarSakhteGroup: null, + categoryGroups: [], + newKarSakhteType: null, + karat: 750, + }, + report: { windowDays: 365 }, + // The point the debt is recognised — the behaviour before the rule existed. + documents: { triggerStatus: 'DELIVERED_TO_AGENT' }, + }; +} + +/** Stored JSON → a complete config, tolerating rows written by older code. */ +export function withDefaults(raw: unknown): AccountingConfig { + const d = defaultConfig(); + const r = (raw && typeof raw === 'object' ? raw : {}) as Partial; + return { + provider: r.provider === 'tahesab' || r.provider === 'zarrin' ? r.provider : 'none', + tahesab: { ...d.tahesab, ...(r.tahesab ?? {}) }, + zarrin: { ...d.zarrin, ...(r.zarrin ?? {}) }, + features: { ...d.features, ...(r.features ?? {}) }, + intervals: { ...d.intervals, ...(r.intervals ?? {}) }, + mapping: { ...d.mapping, ...(r.mapping ?? {}) }, + report: { ...d.report, ...(r.report ?? {}) }, + documents: { ...d.documents, ...(r.documents ?? {}) }, + }; +} + +// ── input validation ──────────────────────────────────────────────────── + +export function cleanUrl(v: unknown, label: string): string { + const s = typeof v === 'string' ? v.trim() : ''; + if (!s) return ''; + let u: URL; + try { + u = new URL(s); + } catch { + throw new BadRequestException(`${label}: آدرس معتبر نیست`); + } + if (u.protocol !== 'http:' && u.protocol !== 'https:') { + throw new BadRequestException(`${label}: آدرس باید با http:// یا https:// شروع شود`); + } + if (u.username || u.password) throw new BadRequestException(`${label}: آدرس نباید نام کاربری/رمز داشته باشد`); + return s; +} + +export function cleanCa(v: unknown): string | null { + const s = typeof v === 'string' ? v.trim() : ''; + if (!s) return null; + if (!s.includes('-----BEGIN CERTIFICATE-----')) { + throw new BadRequestException('گواهی CA باید با قالب PEM (BEGIN CERTIFICATE) باشد'); + } + return s; +} + +export function cleanInt(v: unknown, label: string, min: number, max: number, fallback: number): number { + if (v === undefined || v === null || v === '') return fallback; + const n = Number(v); + if (!Number.isInteger(n) || n < min || n > max) { + throw new BadRequestException(`${label}: عدد صحیح بین ${min} و ${max}`); + } + return n; +} + +export function cleanGroup(v: unknown): ExternalGroup | null { + if (!v || typeof v !== 'object') return null; + const g = v as Record; + const id = g.id === undefined || g.id === null ? '' : String(g.id).trim(); + const name = typeof g.name === 'string' ? g.name.trim() : ''; + if (!id && !name) return null; + return { id, name }; +} + +export function cleanGroups(v: unknown): ExternalGroup[] { + return Array.isArray(v) ? v.map(cleanGroup).filter((g): g is ExternalGroup => !!g) : []; +} + +export function cleanBool(v: unknown, fallback: boolean): boolean { + return typeof v === 'boolean' ? v : fallback; +} diff --git a/apps/api/src/modules/accounting-sync/accounting-hooks.service.spec.ts b/apps/api/src/modules/accounting-sync/accounting-hooks.service.spec.ts new file mode 100644 index 0000000..68c2f31 --- /dev/null +++ b/apps/api/src/modules/accounting-sync/accounting-hooks.service.spec.ts @@ -0,0 +1,106 @@ +import { AccountingHooksService } from './accounting-hooks.service'; +import { AccountingConfig, defaultConfig } from './accounting-config'; + +type Row = { id: string; provider: string; kind: string; entityId: string; status: string }; + +/** Just enough of a Prisma transaction client for the outbox rules. */ +function fakeTx(rows: Row[]) { + const match = (r: Row, where: any) => + (!where.provider || r.provider === where.provider) && + (!where.kind || r.kind === where.kind) && + (!where.entityId || r.entityId === where.entityId) && + (!where.status || + (where.status.in ? where.status.in.includes(r.status) : true) && + (where.status.notIn ? !where.status.notIn.includes(r.status) : true) && + (where.status.not ? r.status !== where.status.not : true)); + return { + accountingOutbox: { + findFirst: async ({ where }: any) => rows.find((r) => match(r, where)) ?? null, + findMany: async ({ where }: any) => rows.filter((r) => match(r, where)), + create: async ({ data }: any) => { + rows.push({ id: String(rows.length + 1), status: 'PENDING', ...data }); + }, + update: async ({ where, data }: any) => { + Object.assign(rows.find((r) => r.id === where.id)!, data); + }, + }, + }; +} + +function hooks(trigger: AccountingConfig['documents']['triggerStatus'], provider: 'tahesab' | 'zarrin' = 'tahesab') { + const c = defaultConfig(); + c.provider = provider; + c.features.documents = true; + c.documents.triggerStatus = trigger; + const config = { get: async () => c } as any; + const worker = { kickSoon: jest.fn() } as any; + return new AccountingHooksService({} as any, config, {} as any, worker); +} + +const docs = (rows: Row[], kind = 'ORDER_DOCUMENT') => rows.filter((r) => r.kind === kind); + +describe('document rule (پیش‌فاکتور at a chosen status)', () => { + it('rule «ثبت سفارش»: the document is queued as the order is placed', async () => { + const rows: Row[] = []; + await hooks('PLACED').orderStatusReached(fakeTx(rows) as any, 'o1', 'PLACED'); + expect(docs(rows)).toHaveLength(1); + }); + + it('default rule: nothing before «تحویل مسئول فروش», then once', async () => { + const rows: Row[] = []; + const h = hooks('DELIVERED_TO_AGENT'); + for (const s of ['PLACED', 'ADMIN_APPROVED', 'PREPARING']) await h.orderStatusReached(fakeTx(rows) as any, 'o1', s); + expect(docs(rows)).toHaveLength(0); + await h.orderStatusReached(fakeTx(rows) as any, 'o1', 'DELIVERED_TO_AGENT'); + await h.orderStatusReached(fakeTx(rows) as any, 'o1', 'DELIVERED_TO_CUSTOMER'); + expect(docs(rows)).toHaveLength(1); + }); + + it('an order that jumps past the rule status still gets its document', async () => { + const rows: Row[] = []; + await hooks('PREPARING').orderStatusReached(fakeTx(rows) as any, 'o1', 'DELIVERED_TO_CUSTOMER'); + expect(docs(rows)).toHaveLength(1); + }); + + it('a suspended order never triggers', async () => { + const rows: Row[] = []; + await hooks('PLACED').orderStatusReached(fakeTx(rows) as any, 'o1', 'SUSPENDED'); + expect(rows).toHaveLength(0); + }); + + it('rolled back below the rule: a waiting document is dropped, a sent one gets a delete job', async () => { + const waiting: Row[] = [{ id: '1', provider: 'tahesab', kind: 'ORDER_DOCUMENT', entityId: 'o1', status: 'PENDING' }]; + await hooks('PREPARING').orderStatusReached(fakeTx(waiting) as any, 'o1', 'ADMIN_APPROVED'); + expect(waiting[0].status).toBe('RESOLVED'); + + const sent: Row[] = [{ id: '1', provider: 'tahesab', kind: 'ORDER_DOCUMENT', entityId: 'o1', status: 'SENT' }]; + await hooks('PREPARING').orderStatusReached(fakeTx(sent) as any, 'o1', 'ADMIN_APPROVED'); + expect(docs(sent, 'ORDER_DOCUMENT_DELETE')).toHaveLength(1); + }); + + it('Tahesab: reaching the rule again after a withdrawal queues a new document behind the delete', async () => { + const rows: Row[] = [ + { id: '1', provider: 'tahesab', kind: 'ORDER_DOCUMENT', entityId: 'o1', status: 'SENT' }, + { id: '2', provider: 'tahesab', kind: 'ORDER_DOCUMENT_DELETE', entityId: 'o1', status: 'PENDING' }, + ]; + await hooks('PREPARING').orderStatusReached(fakeTx(rows) as any, 'o1', 'PREPARING'); + expect(docs(rows)).toHaveLength(2); + }); + + it('Zarrin: never queued twice (no duplicate guard in its API)', async () => { + const rows: Row[] = [ + { id: '1', provider: 'zarrin', kind: 'ORDER_DOCUMENT', entityId: 'o1', status: 'SENT' }, + { id: '2', provider: 'zarrin', kind: 'ORDER_DOCUMENT_DELETE', entityId: 'o1', status: 'PENDING' }, + ]; + await hooks('PREPARING', 'zarrin').orderStatusReached(fakeTx(rows) as any, 'o1', 'PREPARING'); + expect(docs(rows)).toHaveLength(1); + }); + + it('does nothing while the document feature is off', async () => { + const rows: Row[] = []; + const h = hooks('PLACED'); + ((await (h as any).config.get()) as AccountingConfig).features.documents = false; + await h.orderStatusReached(fakeTx(rows) as any, 'o1', 'PLACED'); + expect(rows).toHaveLength(0); + }); +}); diff --git a/apps/api/src/modules/accounting-sync/accounting-hooks.service.ts b/apps/api/src/modules/accounting-sync/accounting-hooks.service.ts new file mode 100644 index 0000000..7234ccd --- /dev/null +++ b/apps/api/src/modules/accounting-sync/accounting-hooks.service.ts @@ -0,0 +1,164 @@ +import { Injectable } from '@nestjs/common'; +import { AccountingEntityType, AccountingOutboxKind, AccountingOutboxStatus, Prisma } from '@prisma/client'; +import { PrismaService } from '../../prisma/prisma.service'; +import { AccountingConfigService } from './accounting-config.service'; +import { AccountingFeatures, documentStatusRank } from './accounting-config'; +import { AccountingSyncService } from './accounting-sync.service'; +import { AccountingWorkerService } from './accounting-worker.service'; +import { ACCOUNTING_PROVIDERS } from './providers'; + +type Tx = Prisma.TransactionClient | PrismaService; + +const OPEN: AccountingOutboxStatus[] = ['PENDING', 'SENDING']; + +/** + * The narrow surface the rest of the app calls into (D27): orders, customer + * admin, product admin, catalog. Every write goes through the caller's own + * transaction client, so the outbox row commits or rolls back with the change + * that caused it. Nothing here talks to the accounting software. + */ +@Injectable() +export class AccountingHooksService { + constructor( + private readonly prisma: PrismaService, + private readonly config: AccountingConfigService, + private readonly sync: AccountingSyncService, + private readonly worker: AccountingWorkerService, + ) {} + + private async enqueue(tx: Tx, feature: keyof AccountingFeatures, kind: AccountingOutboxKind, entityId: string) { + const c = await this.config.get(); + if (c.provider === 'none' || !c.features[feature]) return false; + const open = await tx.accountingOutbox.findFirst({ + where: { provider: c.provider, kind, entityId, status: { in: OPEN } }, + select: { id: true }, + }); + if (open) return false; + await tx.accountingOutbox.create({ data: { provider: c.provider, kind, entityId } }); + this.worker.kickSoon(); + return true; + } + + /** + * F3 — the order is now in `status` (created, advanced, or rolled back). + * The owner's rule (`documents.triggerStatus`, «اتصال حسابداری») says from + * which status on the temporary document (پیش‌فاکتور) belongs in the books: + * at or past it the document is queued once; back below it, a document + * already sent is withdrawn like a cancellation. + */ + async orderStatusReached(tx: Tx, orderId: string, status: string) { + const c = await this.config.get(); + if (c.provider === 'none' || !c.features.documents) return; + const rank = documentStatusRank(status); + if (!rank) return; + if (rank >= documentStatusRank(c.documents.triggerStatus)) await this.queueOrderDocument(tx, c.provider, orderId); + else await this.orderCancelled(tx, orderId); + } + + private async queueOrderDocument(tx: Tx, provider: string, orderId: string) { + const existing = await tx.accountingOutbox.findFirst({ + where: { provider, kind: 'ORDER_DOCUMENT', entityId: orderId, status: { notIn: ['RESOLVED'] } }, + select: { id: true }, + }); + if (existing) { + // Withdrawn and wanted again: Tahesab deletes first (older job), then + // the new one posts — and a duplicate is refused by its Factor_Code key. + // Zarrin has no such key, so its document is never queued twice. + const deleting = await tx.accountingOutbox.findFirst({ + where: { provider, kind: 'ORDER_DOCUMENT_DELETE', entityId: orderId, status: { in: ['PENDING', 'SENDING'] } }, + select: { id: true }, + }); + if (!(provider === 'tahesab' && deleting)) return; + } + await this.enqueue(tx, 'documents', 'ORDER_DOCUMENT', orderId); + } + + /** + * F3 — the order was cancelled. A document still waiting is simply dropped; + * one that may already be in the books gets a delete job, which itself only + * deletes a document that is still temporary (worker). + */ + async orderCancelled(tx: Tx, orderId: string) { + const docs = await tx.accountingOutbox.findMany({ + where: { kind: 'ORDER_DOCUMENT', entityId: orderId, status: { not: 'RESOLVED' } }, + }); + for (const doc of docs) { + if (doc.status === 'PENDING') { + await tx.accountingOutbox.update({ + where: { id: doc.id }, + data: { status: 'RESOLVED', lastError: 'سفارش پیش از ارسال سند لغو شد' }, + }); + continue; + } + const open = await tx.accountingOutbox.findFirst({ + where: { provider: doc.provider, kind: 'ORDER_DOCUMENT_DELETE', entityId: orderId, status: { not: 'RESOLVED' } }, + select: { id: true }, + }); + if (!open) { + await tx.accountingOutbox.create({ + data: { provider: doc.provider, kind: 'ORDER_DOCUMENT_DELETE', entityId: orderId }, + }); + } + } + } + + /** F1 — an admin marked the customer VERIFIED. */ + async customerVerified(tx: Tx, customerId: string) { + await this.enqueue(tx, 'customers', 'CUSTOMER_PUSH', customerId); + } + + /** F1 — a linked customer's contact details changed. */ + async customerEdited(tx: Tx, customerId: string) { + const c = await this.config.get(); + if (c.provider === 'none' || !c.features.customers) return; + const link = await tx.accountingLink.findUnique({ + where: { provider_entityType_entityId: { provider: c.provider, entityType: 'CUSTOMER', entityId: customerId } }, + select: { id: true }, + }); + if (link) await this.enqueue(tx, 'customers', 'CUSTOMER_PUSH', customerId); + } + + /** F4 — a product was created in the admin panel. */ + async productCreated(tx: Tx, productId: string) { + const c = await this.config.get(); + if (c.provider === 'none' || !ACCOUNTING_PROVIDERS[c.provider].capabilities.createKarSakhte) return; + await this.enqueue(tx, 'products', 'PRODUCT_PUSH', productId); + } + + /** + * F4 — title and code of a linked product belong to the accounting software + * (D27); the admin form locks them. Null when the product is not linked. + */ + async productLink(productId: string) { + const c = await this.config.get(); + if (c.provider === 'none' || !c.features.products) return null; + return this.prisma.accountingLink.findUnique({ + where: { provider_entityType_entityId: { provider: c.provider, entityType: AccountingEntityType.PRODUCT, entityId: productId } }, + }); + } + + /** + * Order time: the product with its stock read live from the accounting + * software, or as last stored when that cannot answer in a moment. + */ + liveStock(product: T) { + return this.sync.liveStock(product); + } + + /** + * F4 — is this product out of stock in the accounting software? Only + * meaningful while the product sync is on; stock fields of products that are + * not linked under the active provider are cleared by every product pull. + */ + async stockBlocked(product: { + accountingStockAt: Date | null; + accountingStockWeight: Prisma.Decimal | null; + accountingStockCount: Prisma.Decimal | null; + }) { + if (!product.accountingStockAt) return false; + const c = await this.config.get(); + if (c.provider === 'none' || !c.features.products) return false; + const stock = product.accountingStockWeight ?? product.accountingStockCount; + return stock !== null && new Prisma.Decimal(stock).lte(0); + } +} diff --git a/apps/api/src/modules/accounting-sync/accounting-http.spec.ts b/apps/api/src/modules/accounting-sync/accounting-http.spec.ts new file mode 100644 index 0000000..4594f86 --- /dev/null +++ b/apps/api/src/modules/accounting-sync/accounting-http.spec.ts @@ -0,0 +1,87 @@ +import * as https from 'https'; +import { AddressInfo } from 'net'; +import { AccountingHttpError, fetchServerCertificate, httpRequest, pinnedFingerprints } from './accounting-http'; + +// Throwaway self-signed test certificates (EC P-256, valid to 2126), issued +// for *.invalid names so connecting to 127.0.0.1 never matches them — the +// same situation as a Tahesab install whose certificate says `localhost`. +const CERT_A = `-----BEGIN CERTIFICATE----- +MIIBxTCCAWugAwIBAgIUNaqVnWRRUyN8hOGPQtARjZymRcUwCgYIKoZIzj0EAwIw +JDEiMCAGA1UEAwwZYWNjb3VudGluZy10ZXN0LWEuaW52YWxpZDAgFw0yNjEwMDUx +MjA3NDJaGA8yMTI2MDkxMTEyMDc0MlowJDEiMCAGA1UEAwwZYWNjb3VudGluZy10 +ZXN0LWEuaW52YWxpZDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABFC+h8KB1h41 +56L9+l8nHbMZ5hrrp9nwqmz5RoAqrkVI8Ii5RFYUjssaH2Y0P9+B9L9SvijfB5Xi +Wwk6eVzGKtSjeTB3MB0GA1UdDgQWBBSokIrPzA6ur33vyVeBY+2/NWHx1TAfBgNV +HSMEGDAWgBSokIrPzA6ur33vyVeBY+2/NWHx1TAPBgNVHRMBAf8EBTADAQH/MCQG +A1UdEQQdMBuCGWFjY291bnRpbmctdGVzdC1hLmludmFsaWQwCgYIKoZIzj0EAwID +SAAwRQIgCLZVDlrE2aO8poWAdZMOd+obOeB23TU1Jfh3nnbEDF0CIQCB5+8PNRQe +aWzW6sgCcDWdiga81Nhm7FxYj4AorbPO1w== +-----END CERTIFICATE-----`; +const KEY_A = `-----BEGIN PRIVATE KEY----- +MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgOQ//h9ZRCK1KaiXW +Ij3FN+77RDPYSWgY6DwZqC5x0A6hRANCAARQvofCgdYeNeei/fpfJx2zGeYa66fZ +8Kps+UaAKq5FSPCIuURWFI7LGh9mND/fgfS/Ur4o3weV4lsJOnlcxirU +-----END PRIVATE KEY-----`; +const CERT_B = `-----BEGIN CERTIFICATE----- +MIIBxjCCAWugAwIBAgIUMO+HE/U7Z4EXTnw9ucoKjRz/u7MwCgYIKoZIzj0EAwIw +JDEiMCAGA1UEAwwZYWNjb3VudGluZy10ZXN0LWIuaW52YWxpZDAgFw0yNjEwMDUx +MjA3NDJaGA8yMTI2MDkxMTEyMDc0MlowJDEiMCAGA1UEAwwZYWNjb3VudGluZy10 +ZXN0LWIuaW52YWxpZDBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABI2Naohejia1 +fQnFx33/5jasQJudFTmAdPEHxlIyBlUUi2IoaMWbSyMBBfgy+dX6gM7QetK/99ex +rt/d5OQNyvqjeTB3MB0GA1UdDgQWBBSgpkkpJptOajy+1aSgPZ8gre559TAfBgNV +HSMEGDAWgBSgpkkpJptOajy+1aSgPZ8gre559TAPBgNVHRMBAf8EBTADAQH/MCQG +A1UdEQQdMBuCGWFjY291bnRpbmctdGVzdC1iLmludmFsaWQwCgYIKoZIzj0EAwID +SQAwRgIhALJMbkGHT256tdNcVJfnB0eqxivGD7hooljD6epmvTgbAiEA1r/cX59l +0bu56aMEi0TeoQAAQRiEpdBIwe0F/YjWXL4= +-----END CERTIFICATE-----`; + +describe('accounting HTTP client — TLS with a pinned certificate', () => { + let server: https.Server; + let url: string; + + beforeAll(async () => { + server = https.createServer({ cert: CERT_A, key: KEY_A }, (_req, res) => { + res.writeHead(200, { 'Content-Type': 'application/json' }); + res.end('{"Status":"OK"}'); + }); + await new Promise((resolve) => server.listen(0, '127.0.0.1', resolve)); + url = `https://127.0.0.1:${(server.address() as AddressInfo).port}/`; + }); + + afterAll(async () => { + server.closeAllConnections(); + await new Promise((resolve) => server.close(resolve)); + }); + + const call = (ca: string | null) => httpRequest({ method: 'POST', url, body: '{}', timeoutMs: 5000, ca }); + + it('rejects a self-signed server when nothing is pinned, without claiming it may have been received', async () => { + const err = await call(null).catch((e) => e); + expect(err).toBeInstanceOf(AccountingHttpError); + expect(err.ambiguous).toBe(false); + expect(err.message).toContain('بررسی گواهی سرور'); + }); + + it('accepts exactly the pinned certificate even though it names another host', async () => { + await expect(call(CERT_A)).resolves.toEqual({ status: 200, body: '{"Status":"OK"}' }); + }); + + it('still rejects when a different certificate is pinned', async () => { + const err = await call(CERT_B).catch((e) => e); + expect(err).toBeInstanceOf(AccountingHttpError); + expect(err.message).toContain('یکی نیست'); + }); + + it('reads the presented certificate for the admin to compare and pin', async () => { + const c = await fetchServerCertificate(url, 5000); + expect(c.fingerprint256).toBe([...pinnedFingerprints(CERT_A)][0]); + expect(c.selfSigned).toBe(true); + expect(c.trustedBySystem).toBe(false); + expect(c.subjectAltName).toContain('accounting-test-a.invalid'); + expect(pinnedFingerprints(c.pem).has(c.fingerprint256)).toBe(true); + }); + + it('refuses to fetch a certificate from a plain-http address', async () => { + await expect(fetchServerCertificate('http://127.0.0.1:1/', 1000)).rejects.toThrow('https'); + }); +}); diff --git a/apps/api/src/modules/accounting-sync/accounting-http.ts b/apps/api/src/modules/accounting-sync/accounting-http.ts new file mode 100644 index 0000000..470a6c5 --- /dev/null +++ b/apps/api/src/modules/accounting-sync/accounting-http.ts @@ -0,0 +1,281 @@ +import { X509Certificate } from 'crypto'; +import * as http from 'http'; +import * as https from 'https'; +import * as net from 'net'; +import * as tls from 'tls'; + +/** + * The one HTTP client both accounting drivers use. + * + * Built on node:http(s) rather than global fetch because a self-hosted + * Tahesab/Zarrin often serves a self-signed certificate, and fetch cannot be + * given a CA without an extra dependency. The reference "solved" that with + * `Http::withoutVerifying()` (SEC-17); here verification is ALWAYS on and the + * admin can paste the installation's certificate instead. + * + * A pasted certificate is trusted two ways: as a CA (the normal chain and + * hostname checks), and as a pin — when the server presents exactly that + * certificate it is accepted whatever name it was issued for. Tahesab's own + * certificate is self-signed for `localhost`, so a remote install reached by + * IP can only be verified by the pin. + * + * Errors say whether the request may have reached the server. That decides + * what the outbox may do next: a refused connection is safe to retry, a + * timeout after the request went out is not (Zarrin has no idempotency key). + */ + +export interface HttpRequest { + method: 'GET' | 'POST'; + url: string; + headers?: Record; + body?: string; + timeoutMs: number; + /** PEM CA certificate(s) to trust in addition to the system store. */ + ca?: string | null; +} + +export interface HttpResponse { + status: number; + body: string; +} + +export class AccountingHttpError extends Error { + constructor( + message: string, + /** True when the request may have been received and acted on. */ + readonly ambiguous: boolean, + readonly code?: string, + ) { + super(message); + this.name = 'AccountingHttpError'; + } +} + +const MAX_BODY_BYTES = 20 * 1024 * 1024; + +const TLS_CERT_ERRORS = /CERT|SELF_SIGNED|UNABLE_TO_VERIFY|UNABLE_TO_GET_ISSUER/; + +/** The PEM blocks in a pasted bundle, parsed; unparsable blocks are skipped. */ +export function parsePemCertificates(pem: string | null | undefined): X509Certificate[] { + const blocks = (pem ?? '').match(/-----BEGIN CERTIFICATE-----[\s\S]+?-----END CERTIFICATE-----/g) ?? []; + const out: X509Certificate[] = []; + for (const block of blocks) { + try { + out.push(new X509Certificate(block)); + } catch { + // not a certificate — the CA list below will reject it too + } + } + return out; +} + +/** SHA-256 fingerprints, as Node prints them (`AB:CD:…`), of the pasted certificates. */ +export function pinnedFingerprints(pem: string | null | undefined): Set { + return new Set(parsePemCertificates(pem).map((c) => c.fingerprint256)); +} + +function tlsErrorMessage(err: NodeJS.ErrnoException, pinned: boolean): string { + if (err.code === 'ERR_TLS_CERT_ALTNAME_INVALID') { + return pinned + ? `گواهی سرور برای این آدرس صادر نشده و با گواهی ثبت‌شده در تنظیمات هم یکی نیست (${err.code}) — اگر گواهی سرور عوض شده، در بخش «گواهی امنیتی سرور» «بررسی دوباره» را بزنید` + : `گواهی TLS سرور برای این آدرس صادر نشده (${err.code}) — در تب «اتصال»، بخش «گواهی امنیتی سرور»، «بررسی گواهی سرور» را بزنید و پس از تطبیق اثرانگشت تأیید و ذخیره کنید`; + } + return pinned + ? `گواهی فعلی سرور با گواهی ثبت‌شده در تنظیمات یکی نیست (${err.code}) — اگر گواهی سرور عوض شده، در بخش «گواهی امنیتی سرور» «بررسی دوباره» را بزنید` + : `گواهی TLS سرور قابل‌اعتماد نیست (${err.code}) — در تب «اتصال»، بخش «گواهی امنیتی سرور»، «بررسی گواهی سرور» را بزنید و پس از تطبیق اثرانگشت تأیید و ذخیره کنید`; +} + +export function httpRequest(req: HttpRequest): Promise { + let url: URL; + try { + url = new URL(req.url); + } catch { + return Promise.reject(new AccountingHttpError('آدرس سرور حسابداری نامعتبر است', false, 'BAD_URL')); + } + const isHttps = url.protocol === 'https:'; + if (!isHttps && url.protocol !== 'http:') { + return Promise.reject(new AccountingHttpError('آدرس باید با http یا https شروع شود', false, 'BAD_URL')); + } + + const headers: Record = { ...(req.headers ?? {}) }; + if (req.body !== undefined) headers['Content-Length'] = Buffer.byteLength(req.body); + + const options: https.RequestOptions = { + method: req.method, + hostname: url.hostname, + port: url.port || (isHttps ? 443 : 80), + path: `${url.pathname}${url.search}`, + headers, + }; + const pins = isHttps ? pinnedFingerprints(req.ca) : new Set(); + if (isHttps) { + options.rejectUnauthorized = true; + if (req.ca && req.ca.trim()) { + // Extra CA on top of the system store, never instead of verification. + options.ca = [...tls.rootCertificates, req.ca]; + // Runs only after the chain verified. The exact pasted certificate is + // accepted under any name; anything else gets the normal name check. + // (Pooled sockets are keyed by `ca`, so a reused one had the same pins.) + options.checkServerIdentity = (host, cert) => + pins.has(cert.fingerprint256) ? undefined : tls.checkServerIdentity(host, cert); + } + } + + return new Promise((resolve, reject) => { + let connected = false; + let settled = false; + const finish = (fn: () => void) => { + if (settled) return; + settled = true; + clearTimeout(timer); + fn(); + }; + + const client = isHttps ? https : http; + const request = client.request(options, (res) => { + const chunks: Buffer[] = []; + let size = 0; + res.on('data', (chunk: Buffer) => { + size += chunk.length; + if (size > MAX_BODY_BYTES) { + request.destroy(); + finish(() => reject(new AccountingHttpError('پاسخ سرور حسابداری بیش از حد بزرگ است', true, 'TOO_LARGE'))); + return; + } + chunks.push(chunk); + }); + res.on('end', () => + finish(() => resolve({ status: res.statusCode ?? 0, body: Buffer.concat(chunks).toString('utf8') })), + ); + res.on('error', (err) => finish(() => reject(new AccountingHttpError(err.message, true, 'RESPONSE')))); + }); + + request.on('socket', (socket) => { + // A kept-alive socket is already connected; listening on it again would + // pile up a listener per request. + if (!(socket as { connecting?: boolean }).connecting) { + connected = true; + return; + } + socket.once(isHttps ? 'secureConnect' : 'connect', () => { + connected = true; + }); + }); + + const timer = setTimeout(() => { + request.destroy(); + finish(() => + reject( + new AccountingHttpError( + connected ? 'پاسخ سرور حسابداری در زمان مقرر نرسید' : 'اتصال به سرور حسابداری برقرار نشد (timeout)', + connected, + 'TIMEOUT', + ), + ), + ); + }, req.timeoutMs); + + request.on('error', (err: NodeJS.ErrnoException) => { + // Node's own text for these suggests flags that do not apply here. + const text = isHttps && err.code && TLS_CERT_ERRORS.test(err.code) ? tlsErrorMessage(err, pins.size > 0) : err.message; + finish(() => reject(new AccountingHttpError(text, connected, err.code))); + }); + + if (req.body !== undefined) request.write(req.body); + request.end(); + }); +} + +export interface ServerCertificate { + pem: string; + subject: string; + issuer: string; + subjectAltName: string | null; + validFrom: string; + validTo: string; + expired: boolean; + fingerprint256: string; + selfSigned: boolean; + /** Valid chain to a system CA and issued for this host: no pin needed. */ + trustedBySystem: boolean; +} + +/** + * Reads the certificate an https server presents, WITHOUT trusting it, so the + * admin can compare its fingerprint with the one on the accounting server and + * pin it. Nothing but the TLS handshake is sent. + */ +export function fetchServerCertificate(baseUrl: string, timeoutMs: number): Promise { + let url: URL; + try { + url = new URL(baseUrl); + } catch { + return Promise.reject(new AccountingHttpError('آدرس سرور حسابداری نامعتبر است', false, 'BAD_URL')); + } + if (url.protocol !== 'https:') { + return Promise.reject(new AccountingHttpError('این آدرس https نیست؛ گواهی ندارد', false, 'NOT_HTTPS')); + } + const host = url.hostname.replace(/^\[|\]$/g, ''); + return new Promise((resolve, reject) => { + const socket = tls.connect({ + host, + port: Number(url.port || 443), + servername: net.isIP(host) ? undefined : host, + rejectUnauthorized: false, + }); + const timer = setTimeout(() => { + socket.destroy(); + reject(new AccountingHttpError('اتصال به سرور حسابداری برقرار نشد (timeout)', false, 'TIMEOUT')); + }, timeoutMs); + socket.once('secureConnect', () => { + clearTimeout(timer); + const peer = socket.getPeerCertificate(); + const chainOk = socket.authorized; + socket.end(); + if (!peer?.raw) { + reject(new AccountingHttpError('سرور گواهی ارسال نکرد', false, 'NO_CERT')); + return; + } + const cert = new X509Certificate(peer.raw); + const nameOk = net.isIP(host) ? !!cert.checkIP(host) : !!cert.checkHost(host); + const b64 = peer.raw.toString('base64').match(/.{1,64}/g)!.join('\n'); + resolve({ + pem: `-----BEGIN CERTIFICATE-----\n${b64}\n-----END CERTIFICATE-----`, + subject: cert.subject, + issuer: cert.issuer, + subjectAltName: cert.subjectAltName ?? null, + validFrom: cert.validFrom, + validTo: cert.validTo, + expired: new Date(cert.validTo).getTime() < Date.now(), + fingerprint256: cert.fingerprint256, + // checkIssued() also wants keyCertSign, which Tahesab's certificate lacks. + selfSigned: cert.subject === cert.issuer && cert.verify(cert.publicKey), + trustedBySystem: chainOk && nameOk, + }); + }); + socket.once('error', (err: NodeJS.ErrnoException) => { + clearTimeout(timer); + reject(new AccountingHttpError(err.message, false, err.code)); + }); + }); +} + +/** + * Parses a JSON body that may carry junk around it. Tahesab replies have been + * seen with a BOM, raw control characters and unescaped backslashes inside + * strings (henza_server TahesabController::test had to scrub them the same + * way before json_decode would accept the body). + */ +export function parseLooseJson(body: string): unknown { + try { + return JSON.parse(body); + } catch { + // fall through to the scrubbed attempt + } + let raw = body.replace(/^/, ''); + raw = raw.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]/g, ''); + raw = raw.replace(/\\(?!["\\/bfnrtu])/g, '-'); + const start = raw.search(/[{[]/); + if (start > 0) raw = raw.slice(start); + return JSON.parse(raw); +} diff --git a/apps/api/src/modules/accounting-sync/accounting-quick.controller.ts b/apps/api/src/modules/accounting-sync/accounting-quick.controller.ts new file mode 100644 index 0000000..09fe0c3 --- /dev/null +++ b/apps/api/src/modules/accounting-sync/accounting-quick.controller.ts @@ -0,0 +1,48 @@ +import { Controller, Get, HttpCode, Post } from '@nestjs/common'; +import { CurrentCustomer, CustomerAuth } from '../customer-auth/customer.guards'; +import type { AuthenticatedCustomer } from '../customer-auth/customer-jwt.strategy'; +import { RequirePermission } from '../auth/guards'; +import { AccountingAdminService } from './accounting-admin.service'; +import { AccountingSyncService } from './accounting-sync.service'; + +/** + * D27, plan §12 — sync where people work, on top of the «اتصال حسابداری» + * screen: a button on the wholesale-customer list and on the product list, + * and the customer's own balance read live each time the app's profile opens. + * Each is behind the permission of the screen it sits on, and works whenever a + * provider is connected, whatever the feature switches say (owner's ruling). + */ +@Controller() +export class AccountingQuickController { + constructor( + private readonly admin: AccountingAdminService, + private readonly sync: AccountingSyncService, + ) {} + + /** Whether to show the sync buttons. Any signed-in admin; reveals no settings. */ + @Get('admin/accounting-status') + status() { + return this.admin.connectionStatus(); + } + + @Post('admin/customers-omde/accounting-sync') + @HttpCode(200) + @RequirePermission('persons.list.client.omde') + syncCustomers() { + return this.admin.syncNow(['customers', 'balances']); + } + + @Post('admin/products/accounting-sync') + @HttpCode(200) + @RequirePermission('product.list') + syncProducts() { + return this.admin.syncNow(['products']); + } + + /** The app's profile: this customer's balance, read from the software now. */ + @CustomerAuth() + @Get('customer/me/accounting-balance') + myBalance(@CurrentCustomer() me: AuthenticatedCustomer) { + return this.sync.customerBalanceLive(me.id); + } +} diff --git a/apps/api/src/modules/accounting-sync/accounting-sync.module.ts b/apps/api/src/modules/accounting-sync/accounting-sync.module.ts new file mode 100644 index 0000000..5a6fb11 --- /dev/null +++ b/apps/api/src/modules/accounting-sync/accounting-sync.module.ts @@ -0,0 +1,27 @@ +import { Global, Module } from '@nestjs/common'; +import { AccountingAdminController } from './accounting-admin.controller'; +import { AccountingAdminService } from './accounting-admin.service'; +import { AccountingConfigService } from './accounting-config.service'; +import { AccountingHooksService } from './accounting-hooks.service'; +import { AccountingQuickController } from './accounting-quick.controller'; +import { AccountingSyncService } from './accounting-sync.service'; +import { AccountingWorkerService } from './accounting-worker.service'; + +/** + * Accounting software integration (D27). Global so orders, customer admin, + * product admin, the catalog and the report can call the hooks without each + * re-importing it — the same reason SmsModule is global. + */ +@Global() +@Module({ + controllers: [AccountingAdminController, AccountingQuickController], + providers: [ + AccountingConfigService, + AccountingHooksService, + AccountingSyncService, + AccountingWorkerService, + AccountingAdminService, + ], + exports: [AccountingConfigService, AccountingHooksService, AccountingSyncService], +}) +export class AccountingSyncModule {} diff --git a/apps/api/src/modules/accounting-sync/accounting-sync.service.ts b/apps/api/src/modules/accounting-sync/accounting-sync.service.ts new file mode 100644 index 0000000..34da792 --- /dev/null +++ b/apps/api/src/modules/accounting-sync/accounting-sync.service.ts @@ -0,0 +1,950 @@ +import { Injectable, Logger } from '@nestjs/common'; +import { AccountingOutbox, Prisma } from '@prisma/client'; +import { PrismaService } from '../../prisma/prisma.service'; +import { OTP_ONLY_PASSWORD_HASH } from '../auth/password-hash'; +import { ActiveProvider, AccountingConfigService } from './accounting-config.service'; +import { AccountingConfig } from './accounting-config'; +import { JalaliDate, parseJalali, toJalali } from './jalali'; +import { + AccountingProviderError, + CustomerPayload, + DocumentLine, + ExternalCustomer, + ExternalGroup, + ExternalKarSakhte, + ProviderName, + StatementRow, + normalizeMobile, + splitName, +} from './providers'; + +/** A job that must stop and wait for a human, not be retried. */ +export class NeedsReviewError extends Error { + constructor(message: string) { + super(message); + this.name = 'NeedsReviewError'; + } +} + +const MAX_CUSTOMER_PAGES = 1000; +// Real-time (owner, 2026-10-05): the change poll keeps stored figures a few +// seconds old; these windows only absorb a burst of reads of the same figure. +const STATEMENT_CACHE_MS = 10_000; +const BALANCE_FRESH_MS = 5_000; +const BALANCE_ON_DEMAND_TIMEOUT_MS = 3_000; +const STOCK_ON_DEMAND_TIMEOUT_MS = 2_500; + +/** Lowercase alphanumeric, ≥ 20 chars: Tahesab lowercases Factor_Code and dedupes on it. */ +export function factorCodeFor(orderId: string) { + return `gbord${orderId}`.toLowerCase().replace(/[^a-z0-9]/g, ''); +} + +function groupMatches(selected: ExternalGroup[], c: { groupId: string | null; groupName: string | null }) { + if (selected.length === 0) return true; + return selected.some( + (g) => (g.id !== '' && c.groupId !== null && g.id === c.groupId) || (!!g.name && !!c.groupName && g.name === c.groupName), + ); +} + +/** A real Iranian national code (10 digits, checksum), excluding the all-same placeholders. */ +export function validNationalCode(v: string | null): string | null { + if (!v) return null; + const d = v.replace(/\D/g, ''); + if (!/^\d{10}$/.test(d) || /^(\d)\1{9}$/.test(d)) return null; + const check = Number(d[9]); + const sum = d + .slice(0, 9) + .split('') + .reduce((s, ch, i) => s + Number(ch) * (10 - i), 0); + const r = sum % 11; + return (r < 2 ? check === r : check === 11 - r) ? d : null; +} + +/** + * Everything the accounting integration does (D27, plan + * docs/ACCOUNTING-INTEGRATION-PLAN.md §4): pulls on a schedule, outbox jobs, + * and the reads the customer app makes. Each public pull takes the active + * provider so the worker resolves configuration once per run. + */ +@Injectable() +export class AccountingSyncService { + private readonly logger = new Logger('Accounting'); + private readonly statementCache = new Map(); + private itemCache: { provider: string; at: number; items: ExternalKarSakhte[] } | null = null; + + constructor( + private readonly prisma: PrismaService, + private readonly config: AccountingConfigService, + ) {} + + // ════════════════════════════════════════════════════════════════════ + // F1 — customers + // ════════════════════════════════════════════════════════════════════ + + /** + * Reads every account (in the selected groups) and links or imports it. + * Two passes: all accounts first, so two accounts sharing one mobile are + * caught before either is linked. + */ + async pullCustomers(a: ActiveProvider) { + // No groups must not mean "all": cash boxes, staff and investors are + // accounts too, and would become app customers. + if (a.config.mapping.importCustomerGroups.length === 0) { + throw new Error('هیچ گروه مشتری برای ورود انتخاب نشده است (تب «نگاشت»)'); + } + const provider = a.provider.name; + const all: ExternalCustomer[] = []; + let cursor: string | null = null; + for (let page = 0; page < MAX_CUSTOMER_PAGES; page += 1) { + const res = await a.provider.listCustomers(a.settings, cursor); + all.push(...res.items); + if (!res.next) break; + cursor = res.next; + } + + const inScope = all.filter((c) => groupMatches(a.config.mapping.importCustomerGroups, c)); + const byMobile = new Map(); + for (const c of inScope) { + if (!c.mobile) continue; + byMobile.set(c.mobile, [...(byMobile.get(c.mobile) ?? []), c]); + } + + const existingLinks = await this.prisma.accountingLink.findMany({ + where: { provider, entityType: 'CUSTOMER' }, + select: { id: true, entityId: true, externalCode: true }, + }); + const linkByCode = new Map(existingLinks.map((l) => [l.externalCode, l])); + const linkedCustomerIds = new Set(existingLinks.map((l) => l.entityId)); + + const summary = { scanned: all.length, inScope: inScope.length, refreshed: 0, linked: 0, imported: 0, issues: 0 }; + + for (const ext of inScope) { + const snapshot = ext as unknown as Prisma.InputJsonValue; + const link = linkByCode.get(ext.code); + if (link) { + await this.prisma.accountingLink.update({ + where: { id: link.id }, + data: { externalName: ext.name, snapshot, syncedAt: new Date() }, + }); + summary.refreshed += 1; + continue; + } + + if (!ext.mobile) { + await this.issue(provider, 'CUSTOMER_NO_MOBILE', ext.code, `حساب «${ext.name}» (کد ${ext.code}) موبایل معتبر ندارد`, ext); + summary.issues += 1; + continue; + } + const siblings = byMobile.get(ext.mobile) ?? []; + if (siblings.length > 1) { + await this.issue( + provider, + 'CUSTOMER_DUPLICATE_MOBILE', + ext.code, + `موبایل ${ext.mobile} در ${siblings.length} حساب حسابداری تکرار شده (کدها: ${siblings.map((s) => s.code).join('، ')})`, + siblings, + ); + summary.issues += 1; + continue; + } + + const appCustomer = await this.prisma.customer.findUnique({ where: { mobile: ext.mobile }, select: { id: true } }); + if (appCustomer) { + if (linkedCustomerIds.has(appCustomer.id)) { + await this.issue( + provider, + 'CUSTOMER_LINK_CONFLICT', + ext.code, + `مشتری با موبایل ${ext.mobile} قبلاً به حساب دیگری لینک شده؛ حساب ${ext.code} لینک نشد`, + ext, + appCustomer.id, + ); + summary.issues += 1; + continue; + } + await this.prisma.accountingLink.create({ + data: { provider, entityType: 'CUSTOMER', entityId: appCustomer.id, externalCode: ext.code, externalName: ext.name, origin: 'LINKED', snapshot }, + }); + linkedCustomerIds.add(appCustomer.id); + summary.linked += 1; + continue; + } + + const created = await this.importCustomer(provider, ext); + linkedCustomerIds.add(created); + summary.imported += 1; + } + + return summary; + } + + /** + * An account that exists only in the accounting software becomes an app + * customer, keyed by mobile (owner: «اولویت با شماره هست نه کد ملی»). The + * national code is the account's own when it is a real one and still free, + * else none (the column is optional since 2026-10-07 and holds national + * codes only — never the mobile or a made-up key). + * Credit limit 0 and UNVERIFIED: everything beyond identity is the app's. + * OTP-only: an imported account has no app password. + */ + private async importCustomer(provider: ProviderName, ext: ExternalCustomer): Promise { + const mobile = ext.mobile as string; + let nationalCode = validNationalCode(ext.nationalCode); + if (nationalCode) { + const taken = await this.prisma.customer.findUnique({ where: { nationalCode }, select: { id: true } }); + if (taken) nationalCode = null; + } + const { firstName, lastName } = splitName(ext.name || mobile); + + return this.prisma.$transaction(async (tx) => { + const customer = await tx.customer.create({ + data: { + // The DB trigger rebuilds fullName from the parts (schema.prisma). + fullName: [firstName, lastName].filter(Boolean).join(' ') || mobile, + firstName: firstName || null, + lastName: lastName || null, + mobile, + nationalCode, + passwordHash: OTP_ONLY_PASSWORD_HASH, + phone: ext.phone, + address: ext.address, + }, + select: { id: true }, + }); + await tx.accountingLink.create({ + data: { + provider, + entityType: 'CUSTOMER', + entityId: customer.id, + externalCode: ext.code, + externalName: ext.name, + origin: 'IMPORTED', + snapshot: ext as unknown as Prisma.InputJsonValue, + }, + }); + return customer.id; + }); + } + + private customerPayload( + // nationalCode is nullable since 2026-10-07 (no legacy customer has one — + // docs/DATA-MIGRATION-MAP.md §10.4). validNationalCode() already takes + // `string | null` and maps empty/invalid to null, so the providers below + // keep receiving exactly what they received before. + c: { firstName: string | null; lastName: string | null; fullName: string; mobile: string; phone: string | null; address: string | null; nationalCode: string | null }, + group: ExternalGroup | null, + ): CustomerPayload { + const parts = c.firstName || c.lastName ? { firstName: c.firstName ?? '', lastName: c.lastName ?? '' } : splitName(c.fullName); + return { + firstName: parts.firstName, + lastName: parts.lastName, + fullName: c.fullName || [parts.firstName, parts.lastName].filter(Boolean).join(' '), + mobile: normalizeMobile(c.mobile) ?? c.mobile, + phone: c.phone, + address: c.address, + nationalCode: validNationalCode(c.nationalCode), + group: { id: group?.id || null, name: group?.name || null }, + }; + } + + /** + * Makes sure the customer has an account in the accounting software and + * returns its code: existing link → update it (when `update`); else search + * by mobile → link; else create → link. Search-before-create is what makes a + * retried push safe on both providers. + */ + async ensureCustomerAccount(a: ActiveProvider, customerId: string, opts: { update: boolean }) { + const provider = a.provider.name; + const customer = await this.prisma.customer.findUnique({ where: { id: customerId } }); + if (!customer) throw new NeedsReviewError('مشتری در اپ پیدا نشد'); + + const link = await this.prisma.accountingLink.findUnique({ + where: { provider_entityType_entityId: { provider, entityType: 'CUSTOMER', entityId: customerId } }, + }); + + if (link) { + if (opts.update) { + // Keep the account in its current group: Zarrin moves it otherwise. + const snap = (link.snapshot ?? {}) as Partial; + const group = snap.groupName || snap.groupId ? { id: snap.groupId ?? '', name: snap.groupName ?? '' } : a.config.mapping.newCustomerGroup; + const payload = this.customerPayload(customer, group); + const res = await a.provider.updateCustomer(a.settings, link.externalCode, payload); + await this.prisma.accountingLink.update({ where: { id: link.id }, data: { syncedAt: new Date() } }); + return { code: link.externalCode, request: { action: 'update', code: link.externalCode, payload }, response: res.response }; + } + return { code: link.externalCode, request: { action: 'none' }, response: null }; + } + + const mobile = normalizeMobile(customer.mobile); + if (!mobile) throw new NeedsReviewError(`موبایل مشتری (${customer.mobile}) معتبر نیست`); + + const matches = await a.provider.findCustomersByMobile(a.settings, mobile); + const free = []; + for (const m of matches) { + const taken = await this.prisma.accountingLink.findUnique({ + where: { provider_entityType_externalCode: { provider, entityType: 'CUSTOMER', externalCode: m.code } }, + select: { id: true }, + }); + if (!taken) free.push(m); + } + if (free.length > 1) { + throw new NeedsReviewError( + `موبایل ${mobile} در چند حساب حسابداری هست (کدها: ${free.map((m) => m.code).join('، ')}). از «لینک دستی» یکی را انتخاب کنید.`, + ); + } + if (free.length === 1) { + const m = free[0]; + await this.prisma.accountingLink.create({ + data: { provider, entityType: 'CUSTOMER', entityId: customerId, externalCode: m.code, externalName: m.name, origin: 'LINKED', snapshot: m as unknown as Prisma.InputJsonValue }, + }); + return { code: m.code, request: { action: 'link', mobile }, response: m }; + } + + if (!a.config.mapping.newCustomerGroup) { + throw new NeedsReviewError('گروه مشتری جدید در تب «نگاشت» تعیین نشده؛ بعد از تعیین، «تلاش دوباره» را بزنید'); + } + const payload = this.customerPayload(customer, a.config.mapping.newCustomerGroup); + const res = await a.provider.createCustomer(a.settings, payload); + await this.prisma.accountingLink.create({ + data: { + provider, + entityType: 'CUSTOMER', + entityId: customerId, + externalCode: res.code, + externalName: payload.fullName, + origin: 'PUSHED', + snapshot: { ...payload, groupId: payload.group.id, groupName: payload.group.name } as unknown as Prisma.InputJsonValue, + }, + }); + return { code: res.code, request: { action: 'create', payload }, response: res.response }; + } + + // ════════════════════════════════════════════════════════════════════ + // F2 — balances + // ════════════════════════════════════════════════════════════════════ + + async pullBalances(a: ActiveProvider) { + const links = await this.prisma.accountingLink.findMany({ + where: { provider: a.provider.name, entityType: 'CUSTOMER' }, + select: { entityId: true, externalCode: true }, + }); + if (links.length === 0) return { linked: 0, updated: 0 }; + const balances = await a.provider.getBalances( + a.settings, + links.map((l) => l.externalCode), + ); + const byCode = new Map(balances.map((b) => [b.code, b])); + const now = new Date(); + let updated = 0; + for (const l of links) { + const b = byCode.get(l.externalCode); + if (!b) continue; + await this.prisma.customer.update({ + where: { id: l.entityId }, + data: { accountingGoldBalance: b.goldGrams, accountingRialBalance: b.rial, accountingBalanceAt: now }, + }); + updated += 1; + } + return { linked: links.length, updated }; + } + + /** + * The balance the customer sees (D27): the accounting software's, refreshed + * on demand when older than a minute, with a short timeout so the app never + * waits on a slow installation — on any failure the last stored figure is + * served. Null when the integration does not apply to this customer. + */ + async customerBalance(customerId: string) { + const a = await this.config.activeFor('balances'); + if (!a) return null; + const link = await this.prisma.accountingLink.findUnique({ + where: { provider_entityType_entityId: { provider: a.provider.name, entityType: 'CUSTOMER', entityId: customerId } }, + }); + if (!link) return null; + + let c = await this.prisma.customer.findUnique({ + where: { id: customerId }, + select: { accountingGoldBalance: true, accountingRialBalance: true, accountingBalanceAt: true }, + }); + const stale = !c?.accountingBalanceAt || Date.now() - c.accountingBalanceAt.getTime() > BALANCE_FRESH_MS; + if (stale) { + try { + const [b] = await a.provider.getBalances( + { ...a.settings, timeoutMs: Math.min(a.settings.timeoutMs, BALANCE_ON_DEMAND_TIMEOUT_MS) }, + [link.externalCode], + ); + if (b) { + c = await this.prisma.customer.update({ + where: { id: customerId }, + data: { accountingGoldBalance: b.goldGrams, accountingRialBalance: b.rial, accountingBalanceAt: new Date() }, + select: { accountingGoldBalance: true, accountingRialBalance: true, accountingBalanceAt: true }, + }); + } + } catch (err) { + this.logger.warn(`On-demand balance for ${customerId} failed, serving the stored one: ${(err as Error).message}`); + } + } + if (!c?.accountingBalanceAt) return null; + return { + gold: c.accountingGoldBalance ?? new Prisma.Decimal(0), + rial: c.accountingRialBalance ?? new Prisma.Decimal(0), + at: c.accountingBalanceAt, + provider: a.provider.label, + }; + } + + + // ════════════════════════════════════════════════════════════════════ + // Real-time: change poll + live reads + // ════════════════════════════════════════════════════════════════════ + + /** + * One poll of the software's change feed. Only the accounts and کارساخته + * that changed are re-read, so this is cheap enough to run every few + * seconds. Returns the new cursor and what the slow jobs should still do. + */ + async pollChanges(a: ActiveProvider, cursor: string | null) { + const batch = await a.provider.getChanges(a.settings, cursor); + const out = { cursor: batch.cursor, balances: 0, stocks: 0, fullBalances: false, fullProducts: false, newAccounts: false }; + if (cursor === null) return out; + const provider = a.provider.name; + + if (a.config.features.balances) { + if (batch.overflow) out.fullBalances = true; + else if (batch.accountCodes.length > 0) { + const links = await this.prisma.accountingLink.findMany({ + where: { provider, entityType: 'CUSTOMER', externalCode: { in: batch.accountCodes } }, + select: { entityId: true, externalCode: true }, + }); + out.newAccounts = links.length < batch.accountCodes.length; + if (links.length > 0) out.balances = await this.storeBalances(a, links); + } + } + + if (a.config.features.products) { + if (batch.overflow) out.fullProducts = true; + else if (batch.itemNames.length > 0) { + const links = await this.prisma.accountingLink.findMany({ + where: { provider, entityType: 'PRODUCT', externalCode: { in: batch.itemNames } }, + select: { entityId: true, externalCode: true }, + }); + // A name with no product yet is a new کارساخته: the product pull imports it. + if (links.length < batch.itemNames.length) out.fullProducts = true; + for (const l of links) { + if (await this.storeStock(a, l.entityId, l.externalCode, l.externalCode)) out.stocks += 1; + } + } + } + return out; + } + + /** Reads the balances of these linked customers and stores them. */ + private async storeBalances(a: ActiveProvider, links: { entityId: string; externalCode: string }[]) { + const balances = await a.provider.getBalances(a.settings, links.map((l) => l.externalCode)); + const byCode = new Map(balances.map((b) => [b.code, b])); + const now = new Date(); + let n = 0; + for (const l of links) { + const b = byCode.get(l.externalCode); + if (!b) continue; + await this.prisma.customer.update({ + where: { id: l.entityId }, + data: { accountingGoldBalance: b.goldGrams, accountingRialBalance: b.rial, accountingBalanceAt: now }, + }); + n += 1; + } + return n; + } + + private async storeStock(a: ActiveProvider, productId: string, code: string, name: string, timeoutMs?: number) { + const settings = timeoutMs ? { ...a.settings, timeoutMs: Math.min(a.settings.timeoutMs, timeoutMs) } : a.settings; + const stock = await a.provider.getKarSakhteStock(settings, { code, name }); + const known = stock.weight !== null || stock.count !== null; + await this.prisma.product.update({ + where: { id: productId }, + data: { + accountingStockWeight: stock.weight, + accountingStockCount: stock.count, + accountingStockAt: known ? new Date() : null, + }, + }); + return known; + } + + /** + * At order time: the product's stock straight from the accounting software. + * If it cannot answer in time the order goes ahead on the last stored figure + * (owner's ruling) and the next change poll corrects it. Returns the product + * fields stockBlocked() reads, fresh when it could be. + */ + async liveStock( + product: T, + ): Promise { + const a = await this.config.activeFor('products'); + if (!a) return product; + const link = await this.prisma.accountingLink.findUnique({ + where: { provider_entityType_entityId: { provider: a.provider.name, entityType: 'PRODUCT', entityId: product.id } }, + select: { externalCode: true, externalName: true }, + }); + if (!link) return product; + try { + await this.storeStock(a, product.id, link.externalCode, link.externalName ?? link.externalCode, STOCK_ON_DEMAND_TIMEOUT_MS); + const fresh = await this.prisma.product.findUnique({ + where: { id: product.id }, + select: { accountingStockAt: true, accountingStockWeight: true, accountingStockCount: true }, + }); + return fresh ? { ...product, ...fresh } : product; + } catch (err) { + this.logger.warn(`Live stock of product ${product.id} unavailable, using the stored figure: ${(err as Error).message}`); + return product; + } + } + + /** + * The app's profile (plan §12): this one customer's balance, read from the + * accounting software on every call — no freshness window, no feature + * switch, only a connected provider. On no answer the stored figure is + * served and labelled as such. + */ + async customerBalanceLive(customerId: string) { + const none = { source: 'none' as const, gold: null, rial: null, at: null, provider: null }; + const a = await this.config.active(); + if (!a) return none; + const link = await this.prisma.accountingLink.findUnique({ + where: { provider_entityType_entityId: { provider: a.provider.name, entityType: 'CUSTOMER', entityId: customerId } }, + select: { externalCode: true }, + }); + if (!link) return none; + try { + const [b] = await a.provider.getBalances( + { ...a.settings, timeoutMs: Math.min(a.settings.timeoutMs, BALANCE_ON_DEMAND_TIMEOUT_MS) }, + [link.externalCode], + ); + if (b) { + const at = new Date(); + await this.prisma.customer.update({ + where: { id: customerId }, + data: { accountingGoldBalance: b.goldGrams, accountingRialBalance: b.rial, accountingBalanceAt: at }, + }); + return { source: 'accounting' as const, gold: b.goldGrams.toString(), rial: b.rial.toString(), at, provider: a.provider.label }; + } + } catch (err) { + this.logger.warn(`Live balance for ${customerId} failed, serving the stored one: ${(err as Error).message}`); + } + const c = await this.prisma.customer.findUnique({ + where: { id: customerId }, + select: { accountingGoldBalance: true, accountingRialBalance: true, accountingBalanceAt: true }, + }); + if (!c?.accountingBalanceAt) return none; + return { + source: 'stored' as const, + gold: (c.accountingGoldBalance ?? 0).toString(), + rial: (c.accountingRialBalance ?? 0).toString(), + at: c.accountingBalanceAt, + provider: a.provider.label, + }; + } + + // ════════════════════════════════════════════════════════════════════ + // F6 — statement («گزارش») + // ════════════════════════════════════════════════════════════════════ + + /** + * The customer's statement from the accounting software, oldest first, or + * null when the integration does not apply (the report then falls back to + * the internal ledger). Cached for a minute per customer so paging through + * the report costs one call. + */ + async customerStatement(customerId: string, range?: { from?: string; to?: string }) { + const a = await this.config.activeFor('report'); + if (!a) return null; + const link = await this.prisma.accountingLink.findUnique({ + where: { provider_entityType_entityId: { provider: a.provider.name, entityType: 'CUSTOMER', entityId: customerId } }, + }); + if (!link) return null; + + const to: JalaliDate = parseJalali(range?.to) ?? toJalali(new Date()); + const from: JalaliDate = + parseJalali(range?.from) ?? toJalali(new Date(Date.now() - a.config.report.windowDays * 24 * 3600 * 1000)); + const key = `${a.provider.name}:${link.externalCode}:${from.jy}-${from.jm}-${from.jd}:${to.jy}-${to.jm}-${to.jd}`; + const hit = this.statementCache.get(key); + if (hit && Date.now() - hit.at < STATEMENT_CACHE_MS) return { rows: hit.rows, code: link.externalCode, provider: a.provider.label }; + + const rows = await a.provider.getStatement(a.settings, { code: link.externalCode, from, to }); + // SEC-16: never hand back a line that belongs to another account, whatever + // the software returned. + const own = rows.filter((r) => !r.accountCode || r.accountCode === link.externalCode); + this.statementCache.set(key, { at: Date.now(), rows: own }); + if (this.statementCache.size > 500) this.statementCache.delete(this.statementCache.keys().next().value as string); + return { rows: own, code: link.externalCode, provider: a.provider.label }; + } + + // ════════════════════════════════════════════════════════════════════ + // F4 — کارساخته ↔ products + // ════════════════════════════════════════════════════════════════════ + + /** + * Accounting items → app products. A new item becomes a product with no + * image and no variant, so it stays out of the app (F5) until an admin + * photographs it and adds its weights. Title, code and stock follow the + * accounting software; everything else is the app's (D27). + */ + async pullProducts(a: ActiveProvider) { + const provider = a.provider.name; + const items = await a.provider.listKarSakhte(a.settings); + const links = await this.prisma.accountingLink.findMany({ where: { provider, entityType: 'PRODUCT' } }); + const linkByCode = new Map(links.map((l) => [l.externalCode, l])); + const linkedProductIds = new Set(links.map((l) => l.entityId)); + const summary = { items: items.length, updated: 0, linked: 0, imported: 0, stockErrors: 0, issues: 0 }; + const now = new Date(); + const touched = new Set(); + + for (const item of items) { + let stock = { weight: item.stockWeight, count: item.stockCount }; + if (stock.weight === null && stock.count === null) { + try { + stock = await a.provider.getKarSakhteStock(a.settings, item); + } catch (err) { + summary.stockErrors += 1; + this.logger.warn(`Stock of «${item.name}» unavailable: ${(err as Error).message}`); + } + } + const stockData = { + accountingStockWeight: stock.weight, + accountingStockCount: stock.count, + accountingStockAt: stock.weight !== null || stock.count !== null ? now : null, + }; + const snapshot = item as unknown as Prisma.InputJsonValue; + + const link = linkByCode.get(item.code); + if (link) { + await this.applyItemToProduct(provider, link.entityId, item, stockData); + await this.prisma.accountingLink.update({ + where: { id: link.id }, + data: { externalName: item.name, snapshot, syncedAt: now }, + }); + touched.add(link.entityId); + summary.updated += 1; + continue; + } + + // A product an admin created by the same name (in Tahesab an item only + // appears after its first document, which is how it gets linked). + const sameName = await this.prisma.product.findMany({ where: { title: item.name }, select: { id: true } }); + const candidates = sameName.filter((p) => !linkedProductIds.has(p.id)); + if (candidates.length > 1) { + await this.issue(provider, 'PRODUCT_DUPLICATE_TITLE', item.code, `چند محصول با عنوان «${item.name}» هست؛ کارساخته لینک نشد`, item); + summary.issues += 1; + continue; + } + if (candidates.length === 1) { + const productId = candidates[0].id; + await this.prisma.accountingLink.create({ + data: { provider, entityType: 'PRODUCT', entityId: productId, externalCode: item.code, externalName: item.name, origin: 'LINKED', snapshot }, + }); + await this.applyItemToProduct(provider, productId, item, stockData); + linkedProductIds.add(productId); + touched.add(productId); + summary.linked += 1; + continue; + } + + const productId = await this.prisma.$transaction(async (tx) => { + const product = await tx.product.create({ + data: { title: item.name, ...stockData }, + select: { id: true }, + }); + await tx.accountingLink.create({ + data: { provider, entityType: 'PRODUCT', entityId: product.id, externalCode: item.code, externalName: item.name, origin: 'IMPORTED', snapshot }, + }); + return product.id; + }); + await this.setProductCode(provider, productId, item); + linkedProductIds.add(productId); + touched.add(productId); + summary.imported += 1; + } + + // Stock figures only mean something for products linked under the active + // provider; anything else (unlinked, or from a provider switched away + // from) must not keep blocking orders. + await this.prisma.product.updateMany({ + where: { accountingStockAt: { not: null }, id: { notIn: [...touched] } }, + data: { accountingStockWeight: null, accountingStockCount: null, accountingStockAt: null }, + }); + + return summary; + } + + private async applyItemToProduct( + provider: ProviderName, + productId: string, + item: ExternalKarSakhte, + stockData: Prisma.ProductUpdateInput, + ) { + await this.prisma.product.update({ where: { id: productId }, data: { title: item.name, ...stockData } }); + await this.setProductCode(provider, productId, item); + } + + /** + * Zarrin items have a numeric id, which becomes the product's code. Tahesab + * items have none (the name is the key), so the code stays the app's. + */ + private async setProductCode(provider: ProviderName, productId: string, item: ExternalKarSakhte) { + if (provider !== 'zarrin') return; + const owner = await this.prisma.product.findUnique({ where: { productCode: item.code }, select: { id: true } }); + if (owner && owner.id !== productId) { + await this.issue(provider, 'PRODUCT_CODE_TAKEN', item.code, `کد ${item.code} روی محصول دیگری است؛ کد محصول «${item.name}» عوض نشد`, item, productId); + return; + } + if (!owner) await this.prisma.product.update({ where: { id: productId }, data: { productCode: item.code } }); + } + + /** + * Makes sure a product has its کارساخته: existing link → done; an item by + * the same name → link; else create it (Zarrin). Tahesab cannot create items + * through its API — the item comes into being with the first document under + * the product's title, and the next pull links it by name. + */ + async ensureProductItem(a: ActiveProvider, productId: string): Promise<{ code: string; name: string; created: boolean } | null> { + const provider = a.provider.name; + const link = await this.prisma.accountingLink.findUnique({ + where: { provider_entityType_entityId: { provider, entityType: 'PRODUCT', entityId: productId } }, + }); + const product = await this.prisma.product.findUnique({ where: { id: productId }, select: { id: true, title: true, categoryId: true } }); + if (!product) throw new NeedsReviewError('محصول در اپ پیدا نشد'); + if (link) return { code: link.externalCode, name: link.externalName ?? product.title, created: false }; + + if (!a.provider.capabilities.createKarSakhte) return null; + + const existing = (await this.itemsCached(a)).filter((i) => i.name === product.title); + for (const item of existing) { + const taken = await this.prisma.accountingLink.findUnique({ + where: { provider_entityType_externalCode: { provider, entityType: 'PRODUCT', externalCode: item.code } }, + select: { id: true }, + }); + if (!taken) { + await this.prisma.accountingLink.create({ + data: { provider, entityType: 'PRODUCT', entityId: productId, externalCode: item.code, externalName: item.name, origin: 'LINKED', snapshot: item as unknown as Prisma.InputJsonValue }, + }); + await this.setProductCode(provider, productId, item); + return { code: item.code, name: item.name, created: false }; + } + } + + const m = a.config.mapping; + const group = (product.categoryId && m.categoryGroups.find((x) => x.categoryId === product.categoryId)?.group) || m.newKarSakhteGroup; + if (!group?.id) throw new NeedsReviewError('گروه ساخته برای این دسته‌بندی/پیش‌فرض در تنظیمات حسابداری تعیین نشده'); + if (!m.newKarSakhteType?.id) throw new NeedsReviewError('نوع کارساخته‌ی پیش‌فرض در تنظیمات حسابداری تعیین نشده'); + + const res = await a.provider.createKarSakhte(a.settings, { name: product.title, groupId: group.id, typeId: m.newKarSakhteType.id }); + const item: ExternalKarSakhte = { + code: res.code, + name: product.title, + groupId: group.id, + groupName: group.name, + typeId: m.newKarSakhteType.id, + typeName: m.newKarSakhteType.name, + saleWagePercent: null, + stockWeight: null, + stockCount: null, + }; + await this.prisma.accountingLink.create({ + data: { provider, entityType: 'PRODUCT', entityId: productId, externalCode: res.code, externalName: product.title, origin: 'PUSHED', snapshot: item as unknown as Prisma.InputJsonValue }, + }); + await this.setProductCode(provider, productId, item); + return { code: res.code, name: product.title, created: true }; + } + + /** Zarrin's listKarSakhte takes seconds; an order with several lines needs it once. */ + private async itemsCached(a: ActiveProvider) { + const c = this.itemCache; + if (c && c.provider === a.provider.name && Date.now() - c.at < STATEMENT_CACHE_MS) return c.items; + const items = await a.provider.listKarSakhte(a.settings); + this.itemCache = { provider: a.provider.name, at: Date.now(), items }; + return items; + } + + // ════════════════════════════════════════════════════════════════════ + // F3 — order documents + // ════════════════════════════════════════════════════════════════════ + + async buildOrderDocument(a: ActiveProvider, orderId: string) { + const order = await this.prisma.order.findUnique({ + where: { id: orderId }, + include: { items: { include: { productVariant: { include: { product: true } } } } }, + }); + if (!order) throw new NeedsReviewError('سفارش در اپ پیدا نشد'); + if (order.items.length === 0) throw new NeedsReviewError('سفارش قلمی ندارد'); + + const customer = await this.ensureCustomerAccount(a, order.customerId, { update: false }); + + const lines: DocumentLine[] = []; + let total = new Prisma.Decimal(0); + for (const item of order.items) { + const product = item.productVariant.product; + let ref: { code: string; name: string }; + const ensured = await this.ensureProductItem(a, product.id); + if (ensured) ref = ensured; + else { + // Tahesab: the item is identified by name and created by this document. + ref = { code: product.title, name: product.title }; + } + const qty = item.quantity; + const wage = new Prisma.Decimal(item.wagePercentSnapshot).sub(item.discountPercentSnapshot); + const weight = new Prisma.Decimal(item.rashWeightGramsSnapshot).mul(qty); + total = total.add(new Prisma.Decimal(item.computedWeightGrams).mul(qty)); + lines.push({ + itemCode: ref.code, + itemName: ref.name, + weightGrams: weight, + count: qty, + wagePercent: wage, + flatRial: new Prisma.Decimal(item.flatRialCharge).mul(qty), + karat: a.config.mapping.karat, + description: `${product.title} — ${item.productVariant.title} — سفارش ${order.orderNumber} — اجرت ${wage.toString()}٪`, + }); + } + + // Acceptance rule of F3: the gold the document moves must equal the + // order's own total, or the two books disagree from the first day. + const docGold = lines.reduce( + (s, l) => s.add(l.weightGrams.mul(new Prisma.Decimal(1).add(l.wagePercent.div(100)))), + new Prisma.Decimal(0), + ); + const mismatch = docGold.sub(order.totalGoldWeightGrams).abs(); + if (mismatch.gt('0.01')) { + throw new NeedsReviewError( + `جمع وزن سند (${docGold.toFixed(3)}) با وزن سفارش (${new Prisma.Decimal(order.totalGoldWeightGrams).toFixed(3)}) نمی‌خواند`, + ); + } + + return { + order, + input: { + factorCode: factorCodeFor(order.id), + customerCode: customer.code, + date: order.deliveredAt ?? new Date(), + description: `سفارش ${order.orderNumber} از اپ`, + temporary: true, // D27: the accountant finalises + lines, + }, + check: { orderTotal: new Prisma.Decimal(order.totalGoldWeightGrams).toFixed(3), documentGold: docGold.toFixed(3), linesTotal: total.toFixed(3) }, + }; + } + + // ════════════════════════════════════════════════════════════════════ + // outbox jobs + // ════════════════════════════════════════════════════════════════════ + + /** Runs one outbox job. Throws to signal failure; the worker decides retry vs review. */ + async runJob(a: ActiveProvider, job: AccountingOutbox): Promise<{ externalRef?: string | null; request?: unknown; response?: unknown }> { + switch (job.kind) { + case 'CUSTOMER_PUSH': { + const res = await this.ensureCustomerAccount(a, job.entityId, { update: true }); + return { externalRef: res.code, request: res.request, response: res.response }; + } + + case 'PRODUCT_PUSH': { + const res = await this.ensureProductItem(a, job.entityId); + return { + externalRef: res?.code ?? null, + request: { productId: job.entityId }, + response: res ?? { note: `${a.provider.label} ساخت کارساخته ندارد؛ با اولین سند ساخته می‌شود` }, + }; + } + + case 'ORDER_DOCUMENT': { + const doc = await this.buildOrderDocument(a, job.entityId); + const request = { ...doc.input, lines: doc.input.lines.map((l) => ({ ...l, weightGrams: l.weightGrams.toFixed(3), wagePercent: l.wagePercent.toString(), flatRial: l.flatRial.toFixed(0) })), check: doc.check }; + await this.prisma.accountingOutbox.update({ where: { id: job.id }, data: { lastRequest: request as unknown as Prisma.InputJsonValue } }); + const result = await a.provider.postOrderDocument( + a.settings, + doc.input, + (job.progress ?? {}) as Record, + async (p) => { + await this.prisma.accountingOutbox.update({ where: { id: job.id }, data: { progress: p as unknown as Prisma.InputJsonValue } }); + }, + ); + return { externalRef: result.ref, request, response: result.response }; + } + + case 'ORDER_DOCUMENT_DELETE': { + const sent = await this.prisma.accountingOutbox.findFirst({ + where: { provider: job.provider, kind: 'ORDER_DOCUMENT', entityId: job.entityId, status: { in: ['SENT', 'SENDING', 'NEEDS_REVIEW', 'FAILED'] } }, + orderBy: { createdAt: 'desc' }, + }); + if (!sent) return { response: { note: 'سندی برای حذف ثبت نشده بود' } }; + // The order row may be gone (deleted from the admin panel); the sent + // document's own request says which account it went to. + const order = await this.prisma.order.findUnique({ where: { id: job.entityId }, select: { customerId: true, deliveredAt: true } }); + let customerCode = (sent.lastRequest as { customerCode?: string } | null)?.customerCode ?? null; + if (!customerCode && order) { + const link = await this.prisma.accountingLink.findUnique({ + where: { provider_entityType_entityId: { provider: job.provider, entityType: 'CUSTOMER', entityId: order.customerId } }, + }); + customerCode = link?.externalCode ?? null; + } + if (!customerCode) throw new NeedsReviewError('حساب مشتری در حسابداری معلوم نیست؛ سند را دستی حذف کنید'); + const link = { externalCode: customerCode }; + const factorCode = factorCodeFor(job.entityId); + + // Only a document still temporary may be deleted automatically (plan + // F3). Tahesab reports that per row; Zarrin cannot, so a person checks. + if (job.provider === 'tahesab') { + // The document is dated when it was built (or at delivery, if earlier). + const posted = order?.deliveredAt && order.deliveredAt < sent.createdAt ? order.deliveredAt : sent.createdAt; + const date = toJalali(posted); + const rows = await a.provider.getStatement(a.settings, { code: link.externalCode, from: date, to: toJalali(new Date()) }); + const docRows = rows.filter((r) => r.documentRef === factorCode); + if (docRows.some((r) => !r.temporary)) { + throw new NeedsReviewError('سند در حسابداری نهایی شده؛ حذف خودکار انجام نشد. حسابدار باید دستی اصلاح کند.'); + } + } else { + throw new NeedsReviewError( + `${a.provider.label} وضعیت موقت/نهایی سند را گزارش نمی‌دهد؛ سند ${sent.externalRef ?? ''} را حسابدار بررسی و حذف کند.`, + ); + } + const res = await a.provider.deleteDocument(a.settings, { factorCode, ref: sent.externalRef, customerCode: link.externalCode }); + await this.prisma.accountingOutbox.update({ + where: { id: sent.id }, + data: { status: 'RESOLVED', lastError: 'سند به‌خاطر لغو سفارش حذف شد' }, + }); + return { externalRef: sent.externalRef, request: { factorCode }, response: res.response }; + } + } + } + + /** + * Is a job whose call may or may not have landed safe to send again? + * Customer/product pushes search before they create; Tahesab rejects a + * repeated document row; a Zarrin document has no such guard. + */ + isRetrySafe(provider: ProviderName, kind: AccountingOutbox['kind']) { + if (kind === 'ORDER_DOCUMENT') return provider === 'tahesab'; + return true; + } + + // ════════════════════════════════════════════════════════════════════ + + async issue(provider: ProviderName, kind: string, externalCode: string, message: string, data?: unknown, entityId?: string) { + const json = + data === undefined || data === null ? Prisma.JsonNull : (JSON.parse(JSON.stringify(data)) as Prisma.InputJsonValue); + await this.prisma.accountingIssue.upsert({ + where: { provider_kind_externalCode: { provider, kind, externalCode } }, + update: { message, data: json, entityId: entityId ?? null, resolvedAt: null }, + create: { provider, kind, externalCode, message, data: json, entityId: entityId ?? null }, + }); + } + + describeError(err: unknown) { + if (err instanceof AccountingProviderError) return err.message; + if (err instanceof NeedsReviewError) return err.message; + return (err as Error)?.message ?? String(err); + } + + /** For callers that only need to know the configuration. */ + activeConfig(): Promise { + return this.config.get(); + } +} diff --git a/apps/api/src/modules/accounting-sync/accounting-utils.spec.ts b/apps/api/src/modules/accounting-sync/accounting-utils.spec.ts new file mode 100644 index 0000000..f96cb59 --- /dev/null +++ b/apps/api/src/modules/accounting-sync/accounting-utils.spec.ts @@ -0,0 +1,128 @@ +import { Prisma } from '@prisma/client'; +import { formatJalali, jalaliToIsoDate, parseJalali, toIsoDateTehran, toJalali } from './jalali'; +import { openSecret, sealSecret } from './secret-box'; +import { dec, normalizeMobile, splitName } from './providers/accounting-provider'; +import { factorCodeFor, validNationalCode } from './accounting-sync.service'; +import { parseLooseJson } from './accounting-http'; +import { isAccountingSettingKey, withDefaults } from './accounting-config'; + +describe('jalali', () => { + it('converts a Tehran calendar day', () => { + // The Tahesab test server reported 1405/07/13 on 2026-10-05. + expect(formatJalali(toJalali(new Date('2026-10-05T08:00:00Z')), '/')).toBe('1405/07/13'); + // Nowruz 1404: 2025-03-21 00:30 in Tehran is still 20 March in UTC. + expect(formatJalali(toJalali(new Date('2025-03-20T21:00:00Z')))).toBe('1404-01-01'); + }); + + it('goes back to Gregorian', () => { + expect(jalaliToIsoDate({ jy: 1405, jm: 7, jd: 13 })).toBe('2026-10-05'); + expect(jalaliToIsoDate({ jy: 1403, jm: 12, jd: 30 })).toBe('2025-03-20'); + }); + + it('parses the forms the apps and Tahesab use, and rejects impossible days', () => { + expect(parseJalali('1405/7/13')).toEqual({ jy: 1405, jm: 7, jd: 13 }); + expect(parseJalali('۱۴۰۵-۰۷-۱۳')).toEqual({ jy: 1405, jm: 7, jd: 13 }); + expect(parseJalali('1403/12/30')).not.toBeNull(); // leap year + expect(parseJalali('1404/12/30')).toBeNull(); // common year + expect(parseJalali('1405/07/31')).toBeNull(); + expect(parseJalali('2026-10-05x')).toBeNull(); + }); + + it('formats a Tehran ISO day', () => { + expect(toIsoDateTehran(new Date('2026-10-04T21:00:00Z'))).toBe('2026-10-05'); + }); +}); + +describe('secret-box', () => { + const saved = { ...process.env }; + afterEach(() => { + process.env = { ...saved }; + }); + + it('round-trips and never stores the plain token', () => { + process.env.ACCOUNTING_SECRET_KEY = 'k1'; + const sealed = sealSecret('M3Y3D2Y7'); + expect(sealed.startsWith('enc:v1:')).toBe(true); + expect(sealed).not.toContain('M3Y3D2Y7'); + expect(openSecret(sealed)).toBe('M3Y3D2Y7'); + }); + + it('cannot be opened with another key', () => { + process.env.ACCOUNTING_SECRET_KEY = 'k1'; + const sealed = sealSecret('secret'); + process.env.ACCOUNTING_SECRET_KEY = 'k2'; + expect(openSecret(sealed)).toBeNull(); + expect(openSecret('plain-text')).toBeNull(); + }); + + it('falls back to JWT_SECRET when the dedicated key is blank', () => { + process.env.ACCOUNTING_SECRET_KEY = ' '; + process.env.JWT_SECRET = 'jwt'; + expect(openSecret(sealSecret('x'))).toBe('x'); + }); +}); + +describe('helpers', () => { + it('normalises every mobile form the two programs store', () => { + expect(normalizeMobile('9121234567')).toBe('09121234567'); + expect(normalizeMobile('09121234567')).toBe('09121234567'); + expect(normalizeMobile('+98 912 123 4567')).toBe('09121234567'); + expect(normalizeMobile('00989121234567')).toBe('09121234567'); + expect(normalizeMobile('۰۹۱۲۱۲۳۴۵۶۷')).toBe('09121234567'); + expect(normalizeMobile('02155662233')).toBeNull(); + expect(normalizeMobile('')).toBeNull(); + expect(normalizeMobile(null)).toBeNull(); + }); + + it('reads the numbers Tahesab sends as strings, and its literal "null"', () => { + expect(dec('-177.431')?.toString()).toBe('-177.431'); + expect(dec('1,234')?.toString()).toBe('1234'); + expect(dec('null')).toBeNull(); + expect(dec(null)).toBeNull(); + expect(dec('abc')).toBeNull(); + }); + + it('accepts only real national codes', () => { + expect(validNationalCode('0499370899')).toBe('0499370899'); + expect(validNationalCode('0000000000')).toBeNull(); // seen on the Tahesab test server + expect(validNationalCode('1234567890')).toBeNull(); + expect(validNationalCode(null)).toBeNull(); + }); + + it('builds a Tahesab-safe Factor_Code from an order id', () => { + const code = factorCodeFor('cm1abcdefghijklmnopqrstuv'); + expect(code).toBe(code.toLowerCase()); + expect(code).toMatch(/^[a-z0-9]+$/); + expect(code.length).toBeGreaterThanOrEqual(20); + }); + + it('splits a name the way the DB trigger does', () => { + expect(splitName('علی رضا محمدی')).toEqual({ firstName: 'علی', lastName: 'رضا محمدی' }); + expect(splitName('masoud')).toEqual({ firstName: 'masoud', lastName: '' }); + }); + + it('scrubs the junk Tahesab replies have carried', () => { + expect(parseLooseJson('{"a":"x\\y"}')).toEqual({ a: 'x-y' }); + expect(parseLooseJson('garbage [1,2]')).toEqual([1, 2]); + }); + + it('fences off every accounting Setting key from the const routes', () => { + expect(isAccountingSettingKey('accounting.config')).toBe(true); + expect(isAccountingSettingKey('Accounting.lease')).toBe(true); + expect(isAccountingSettingKey('wallet.config')).toBe(false); + }); + + it('fills a partial stored config with defaults', () => { + const c = withDefaults({ provider: 'tahesab', features: { balances: true } }); + expect(c.provider).toBe('tahesab'); + expect(c.features).toEqual({ customers: false, balances: true, report: false, products: false, documents: false }); + expect(c.tahesab.dbName).toBe('TahesabDB'); + expect(c.mapping.karat).toBe(750); + expect(withDefaults({ provider: 'other' }).provider).toBe('none'); + }); + + it('keeps Decimal maths exact for the wage-as-karat rule', () => { + const w = new Prisma.Decimal(18.5); + expect(new Prisma.Decimal(750).mul(new Prisma.Decimal(1).add(w.div(100))).toString()).toBe('888.75'); + }); +}); diff --git a/apps/api/src/modules/accounting-sync/accounting-worker.service.ts b/apps/api/src/modules/accounting-sync/accounting-worker.service.ts new file mode 100644 index 0000000..90bf623 --- /dev/null +++ b/apps/api/src/modules/accounting-sync/accounting-worker.service.ts @@ -0,0 +1,375 @@ +import { Injectable, Logger, OnApplicationBootstrap, OnModuleDestroy } from '@nestjs/common'; +import { AccountingOutbox, Prisma } from '@prisma/client'; +import { randomUUID } from 'crypto'; +import { envOr } from '../../common/env'; +import { PrismaService } from '../../prisma/prisma.service'; +import { ActiveProvider, AccountingConfigService, JobName } from './accounting-config.service'; +import { AccountingSyncService, NeedsReviewError } from './accounting-sync.service'; +import { AccountingNotSupportedError, AccountingProviderError } from './providers'; + +/** Scheduled pulls (customers, full balances, full products): the safety net. */ +const TICK_MS = 30_000; +/** Outbox and change poll, the real-time path: checked this often. */ +const FAST_TICK_MS = 2_000; +/** How often the change feed is polled. */ +const CHANGES_POLL_MS = 5_000; +/** Long enough for a full customer import; renewed before every step. */ +const LEASE_MS = 10 * 60_000; +const LEASE_KEY = 'accounting.lease'; +const OUTBOX_BATCH = 25; +const MAX_ATTEMPTS = 8; + +type PullJob = Exclude; + +export const PULL_FEATURE: Record = { + customers: 'customers', + balances: 'balances', + products: 'products', +}; + +function toJson(v: unknown): Prisma.InputJsonValue | typeof Prisma.JsonNull { + if (v === undefined || v === null) return Prisma.JsonNull; + return JSON.parse(JSON.stringify(v)) as Prisma.InputJsonValue; +} + +/** + * Runs the accounting integration in the background (D27, plan §3.4). Two + * loops: a fast one (every couple of seconds) for the outbox and the change + * feed, the real-time path; and the 30-second one for the scheduled pulls that + * reconcile what the feed cannot see (new customers, edits and deletions, + * overflow). + * + * In-process, no queue dependency. A lease row in the Setting table + * (`accounting.lease`) keeps a second API instance from running the same jobs + * at the same time; the in-memory flag keeps one instance's ticks from + * overlapping. Set ACCOUNTING_WORKER=off to keep an instance out entirely. + */ +@Injectable() +export class AccountingWorkerService implements OnApplicationBootstrap, OnModuleDestroy { + private readonly logger = new Logger('Accounting'); + private readonly owner = randomUUID(); + private timer: NodeJS.Timeout | null = null; + private running = false; + private fastRunning = false; + private fastTimer: NodeJS.Timeout | null = null; + private kickTimer: NodeJS.Timeout | null = null; + private changes: { provider: string; cursor: string | null } = { provider: '', cursor: null }; + private lastChangePollAt = 0; + private lastChangeWarnAt = 0; + private forced = new Set(); + private lastForcedCustomersAt = 0; + /** Shown on the admin screen. */ + readonly realtime: { + lastPollAt?: string; + lastOkAt?: string; + lastError?: string | null; + lastChangeAt?: string; + lastSummary?: Record; + } = {}; + private recovered = new Set(); + + constructor( + private readonly prisma: PrismaService, + private readonly config: AccountingConfigService, + private readonly sync: AccountingSyncService, + ) {} + + onApplicationBootstrap() { + if (envOr('ACCOUNTING_WORKER', 'on') === 'off' || process.env.NODE_ENV === 'test') return; + this.timer = setInterval(() => void this.tick(), TICK_MS); + this.timer.unref?.(); + this.fastTimer = setInterval(() => void this.fastTick(), FAST_TICK_MS); + this.fastTimer.unref?.(); + } + + onModuleDestroy() { + if (this.timer) clearInterval(this.timer); + if (this.fastTimer) clearInterval(this.fastTimer); + if (this.kickTimer) clearTimeout(this.kickTimer); + } + + /** + * Something was just queued. Hooks run inside the caller's transaction, so + * wake the outbox a moment later, once it has committed, instead of waiting + * for the next tick. + */ + kickSoon() { + if (this.kickTimer || !this.fastTimer) return; + this.kickTimer = setTimeout(() => { + this.kickTimer = null; + void this.fastTick(true); + }, 700); + this.kickTimer.unref?.(); + } + + /** True when this instance holds (or just took) the lease. */ + private async acquireLease(): Promise { + const value = JSON.stringify({ owner: this.owner, until: new Date(Date.now() + LEASE_MS).toISOString() }); + await this.prisma.$executeRaw` + INSERT INTO "Setting" ("key", "value", "updatedAt") VALUES (${LEASE_KEY}, ${value}::jsonb, now()) + ON CONFLICT ("key") DO NOTHING`; + const n = await this.prisma.$executeRaw` + UPDATE "Setting" SET "value" = ${value}::jsonb, "updatedAt" = now() + WHERE "key" = ${LEASE_KEY} + AND ("value"->>'owner' = ${this.owner} OR ("value"->>'until')::timestamptz < now())`; + return n > 0; + } + + async tick(only?: JobName): Promise { + if (this.running) return false; + this.running = true; + try { + if (!(await this.acquireLease())) return false; + const a = await this.config.active(); + if (!a) return false; + + if (!this.recovered.has(a.provider.name)) { + await this.recoverInterrupted(a); + this.recovered.add(a.provider.name); + } + + if (only === 'outbox') await this.processOutbox(a); + for (const job of ['balances', 'customers', 'products'] as PullJob[]) { + if (only && only !== job) continue; + if (!a.config.features[PULL_FEATURE[job]]) continue; + const wasForced = this.forced.delete(job); + if (!only && !wasForced && !(await this.isDue(job, a))) continue; + await this.acquireLease(); + await this.runPull(job, a); + } + return true; + } catch (err) { + this.logger.error(`Accounting tick failed: ${(err as Error).message}`); + return false; + } finally { + this.running = false; + } + } + + /** + * The real-time path, every couple of seconds: send queued documents and + * edits at once, and poll the software's change feed so a balance or a stock + * figure changed there is changed here moments later. Never waits behind a + * long scheduled pull (it has its own guard, apart from tick()). + */ + async fastTick(force = false): Promise { + if (this.fastRunning) return; + this.fastRunning = true; + try { + if (!(await this.acquireLease())) return; + const a = await this.config.active(); + if (!a) return; + if (!this.recovered.has(a.provider.name)) { + await this.recoverInterrupted(a); + this.recovered.add(a.provider.name); + } + await this.processOutbox(a); + + if (!force && Date.now() - this.lastChangePollAt < CHANGES_POLL_MS) return; + if (!a.provider.capabilities.changeFeed || !(a.config.features.balances || a.config.features.products)) return; + this.lastChangePollAt = Date.now(); + await this.pollChanges(a); + } catch (err) { + this.logger.error(`Accounting fast tick failed: ${(err as Error).message}`); + } finally { + this.fastRunning = false; + } + } + + private async pollChanges(a: ActiveProvider) { + if (this.changes.provider !== a.provider.name) this.changes = { provider: a.provider.name, cursor: null }; + this.realtime.lastPollAt = new Date().toISOString(); + try { + const baseline = this.changes.cursor === null; + const r = await this.sync.pollChanges(a, this.changes.cursor); + this.changes.cursor = r.cursor; + this.realtime.lastOkAt = new Date().toISOString(); + this.realtime.lastError = null; + if (r.balances > 0 || r.stocks > 0) { + this.realtime.lastChangeAt = this.realtime.lastOkAt; + this.realtime.lastSummary = { balances: r.balances, stocks: r.stocks }; + } + if (baseline) return; + // What the feed cannot describe goes to the scheduled jobs right away. + if (r.fullBalances) this.forced.add('balances'); + if (r.fullProducts) this.forced.add('products'); + if (r.newAccounts && a.config.features.customers && Date.now() - this.lastForcedCustomersAt > 60_000) { + this.lastForcedCustomersAt = Date.now(); + this.forced.add('customers'); + } + if (this.forced.size > 0) void this.tick(); + } catch (err) { + const msg = this.sync.describeError(err); + this.realtime.lastError = msg; + if (Date.now() - this.lastChangeWarnAt > 60_000) { + this.lastChangeWarnAt = Date.now(); + this.logger.warn(`Accounting change poll failed: ${msg}`); + } + } + } + + /** + * A sync button (plan §12): runs these pulls now and waits for them. Needs + * only a connected provider — the feature switches do not apply. Each job + * reports on its own, so one failing does not hide the others. + */ + async runPullsNow(jobs: PullJob[]): Promise | null> { + if (this.running) return null; + this.running = true; + try { + const a = await this.config.active(); + if (!a) return null; + const out: Record = {}; + for (const job of jobs) { + await this.acquireLease(); + const startedAt = new Date().toISOString(); + await this.config.recordJob(job, { lastRunAt: startedAt }); + try { + const summary = + job === 'customers' + ? await this.sync.pullCustomers(a) + : job === 'balances' + ? await this.sync.pullBalances(a) + : await this.sync.pullProducts(a); + await this.config.recordJob(job, { lastOkAt: new Date().toISOString(), lastError: null, summary }); + out[job] = { ok: true, summary }; + } catch (err) { + const error = this.sync.describeError(err); + await this.config.recordJob(job, { lastError: error }); + out[job] = { ok: false, error }; + } + } + return out; + } finally { + this.running = false; + } + } + + /** «سینک الان» from the admin screen: runs in the background, returns at once. */ + runNow(job: JobName): boolean { + if (job === 'outbox') { + if (this.fastRunning) return false; + void this.fastTick(true); + return true; + } + if (this.running) return false; + void this.tick(job); + return true; + } + + get busy() { + return this.running; + } + + private async isDue(job: PullJob, a: ActiveProvider) { + const minutes = { + customers: a.config.intervals.customersMinutes, + balances: a.config.intervals.balancesMinutes, + products: a.config.intervals.productsMinutes, + }[job]; + const state = await this.config.getState(); + const last = state.jobs[job]?.lastRunAt; + return !last || Date.now() - new Date(last).getTime() >= minutes * 60_000; + } + + private async runPull(job: PullJob, a: ActiveProvider) { + const startedAt = new Date().toISOString(); + await this.config.recordJob(job, { lastRunAt: startedAt }); + try { + const summary = + job === 'customers' + ? await this.sync.pullCustomers(a) + : job === 'balances' + ? await this.sync.pullBalances(a) + : await this.sync.pullProducts(a); + await this.config.recordJob(job, { lastOkAt: new Date().toISOString(), lastError: null, summary }); + } catch (err) { + const msg = this.sync.describeError(err); + this.logger.warn(`Accounting ${job} pull failed: ${msg}`); + await this.config.recordJob(job, { lastError: msg }); + } + } + + /** + * A job left in SENDING means the process stopped mid-call: its outcome is + * unknown. Safe kinds go back to the queue; a Zarrin document goes to a + * person, since sending it again could post it twice. + */ + private async recoverInterrupted(a: ActiveProvider) { + const stuck = await this.prisma.accountingOutbox.findMany({ where: { provider: a.provider.name, status: 'SENDING' } }); + for (const job of stuck) { + const safe = this.sync.isRetrySafe(a.provider.name, job.kind); + await this.prisma.accountingOutbox.update({ + where: { id: job.id }, + data: safe + ? { status: 'PENDING', nextAttemptAt: new Date() } + : { + status: 'NEEDS_REVIEW', + lastError: 'سرور هنگام ارسال متوقف شد؛ معلوم نیست سند ثبت شده یا نه. پیش از «تلاش دوباره» در حسابداری بررسی کنید.', + }, + }); + } + } + + private async processOutbox(a: ActiveProvider) { + const jobs = await this.prisma.accountingOutbox.findMany({ + where: { provider: a.provider.name, status: 'PENDING', nextAttemptAt: { lte: new Date() } }, + orderBy: { createdAt: 'asc' }, + take: OUTBOX_BATCH, + }); + const startedAt = new Date().toISOString(); + let sent = 0; + let failed = 0; + for (const job of jobs) { + await this.acquireLease(); + const ok = await this.runOne(a, job); + if (ok) sent += 1; + else failed += 1; + } + if (jobs.length > 0) { + await this.config.recordJob('outbox', { lastRunAt: startedAt, lastOkAt: new Date().toISOString(), summary: { picked: jobs.length, sent, failed } }); + } + } + + private async runOne(a: ActiveProvider, job: AccountingOutbox): Promise { + const attempts = job.attempts + 1; + await this.prisma.accountingOutbox.update({ where: { id: job.id }, data: { status: 'SENDING', attempts } }); + const fresh = { ...job, attempts }; + try { + const res = await this.sync.runJob(a, fresh); + await this.prisma.accountingOutbox.update({ + where: { id: job.id }, + data: { + status: 'SENT', + sentAt: new Date(), + externalRef: res.externalRef ?? null, + lastRequest: toJson(res.request), + lastResponse: toJson(res.response), + lastError: null, + }, + }); + return true; + } catch (err) { + const msg = this.sync.describeError(err); + const response = err instanceof AccountingProviderError ? err.response : undefined; + let data: Prisma.AccountingOutboxUpdateInput; + if (err instanceof NeedsReviewError || err instanceof AccountingNotSupportedError) { + data = { status: 'NEEDS_REVIEW', lastError: msg }; + } else if (err instanceof AccountingProviderError && err.ambiguous && !this.sync.isRetrySafe(a.provider.name, job.kind)) { + data = { + status: 'NEEDS_REVIEW', + lastError: `${msg} — ممکن است سند ثبت شده باشد؛ پیش از «تلاش دوباره» در حسابداری بررسی کنید.`, + }; + } else if (attempts >= MAX_ATTEMPTS) { + data = { status: 'FAILED', lastError: msg }; + } else { + const delayMin = Math.min(2 ** (attempts - 1), 60); + data = { status: 'PENDING', lastError: msg, nextAttemptAt: new Date(Date.now() + delayMin * 60_000) }; + } + if (response !== undefined) data.lastResponse = toJson(response); + await this.prisma.accountingOutbox.update({ where: { id: job.id }, data }); + this.logger.warn(`Accounting job ${job.kind} ${job.entityId} → ${String(data.status)}: ${msg}`); + return false; + } + } +} diff --git a/apps/api/src/modules/accounting-sync/jalali.ts b/apps/api/src/modules/accounting-sync/jalali.ts new file mode 100644 index 0000000..342f738 --- /dev/null +++ b/apps/api/src/modules/accounting-sync/jalali.ts @@ -0,0 +1,152 @@ +/** + * Jalali (Shamsi) ⇄ Gregorian conversion. + * + * Tahesab wants a document date as separate Shamsi year/month/day integers and + * its list filters as `1405-04-24`; the customer app sends report ranges as + * `1405/04/24`; Zarrin wants Gregorian `2024-10-12` on most calls. One small + * converter covers all three without a dependency. + * + * The arithmetic is the well-known jalaali-js algorithm (Borkowski's leap-year + * break table), valid for Jalali years -61 … 3177. + */ + +export interface JalaliDate { + jy: number; + jm: number; + jd: number; +} + +const BREAKS = [ + -61, 9, 38, 199, 426, 686, 756, 818, 1111, 1181, 1210, 1635, 2060, 2097, 2192, 2262, 2324, 2394, 2456, + 3178, +]; + +function div(a: number, b: number) { + return ~~(a / b); +} + +function mod(a: number, b: number) { + return a - ~~(a / b) * b; +} + +function jalCal(jy: number) { + const gy = jy + 621; + let leapJ = -14; + let jp = BREAKS[0]; + let jump = 0; + if (jy < jp || jy >= BREAKS[BREAKS.length - 1]) throw new RangeError(`Invalid Jalali year ${jy}`); + + for (let i = 1; i < BREAKS.length; i += 1) { + const jm = BREAKS[i]; + jump = jm - jp; + if (jy < jm) break; + leapJ = leapJ + div(jump, 33) * 8 + div(mod(jump, 33), 4); + jp = jm; + } + let n = jy - jp; + leapJ = leapJ + div(n, 33) * 8 + div(mod(n, 33) + 3, 4); + if (mod(jump, 33) === 4 && jump - n === 4) leapJ += 1; + const leapG = div(gy, 4) - div((div(gy, 100) + 1) * 3, 4) - 150; + const march = 20 + leapJ - leapG; + if (jump - n < 6) n = n - jump + div(jump + 4, 33) * 33; + let leap = mod(mod(n + 1, 33) - 1, 4); + if (leap === -1) leap = 4; + return { leap, gy, march }; +} + +function g2d(gy: number, gm: number, gd: number) { + let d = + div((gy + div(gm - 8, 6) + 100100) * 1461, 4) + div(153 * mod(gm + 9, 12) + 2, 5) + gd - 34840408; + d = d - div(div(gy + 100100 + div(gm - 8, 6), 100) * 3, 4) + 752; + return d; +} + +function d2g(jdn: number) { + let j = 4 * jdn + 139361631; + j = j + div(div(4 * jdn + 183187720, 146097) * 3, 4) * 4 - 3908; + const i = div(mod(j, 1461), 4) * 5 + 308; + const gd = div(mod(i, 153), 5) + 1; + const gm = mod(div(i, 153), 12) + 1; + const gy = div(j, 1461) - 100100 + div(8 - gm, 6); + return { gy, gm, gd }; +} + +function j2d(jy: number, jm: number, jd: number) { + const r = jalCal(jy); + return g2d(r.gy, 3, r.march) + (jm - 1) * 31 - div(jm, 7) * (jm - 7) + jd - 1; +} + +function d2j(jdn: number): JalaliDate { + const gy = d2g(jdn).gy; + let jy = gy - 621; + const r = jalCal(jy); + const jdn1f = g2d(gy, 3, r.march); + let k = jdn - jdn1f; + if (k >= 0) { + if (k <= 185) return { jy, jm: 1 + div(k, 31), jd: mod(k, 31) + 1 }; + k -= 186; + } else { + jy -= 1; + k += 179; + if (r.leap === 1) k += 1; + } + return { jy, jm: 7 + div(k, 30), jd: mod(k, 30) + 1 }; +} + +/** Iran has had no DST since 2022, so a fixed +03:30 gives the local calendar day. */ +const TEHRAN_OFFSET_MS = (3 * 60 + 30) * 60 * 1000; + +/** The Jalali calendar day of an instant, as seen in Tehran. */ +export function toJalali(date: Date): JalaliDate { + const local = new Date(date.getTime() + TEHRAN_OFFSET_MS); + return d2j(g2d(local.getUTCFullYear(), local.getUTCMonth() + 1, local.getUTCDate())); +} + +/** Gregorian calendar day for a Jalali day: `{ gy, gm, gd }`. */ +export function jalaliToGregorian(jy: number, jm: number, jd: number) { + return d2g(j2d(jy, jm, jd)); +} + +/** + * Parses `1405/04/24`, `1405-4-24` or Persian digits. Returns null for anything + * that is not a real Jalali date. + */ +export function parseJalali(input: string | null | undefined): JalaliDate | null { + if (!input) return null; + const ascii = String(input) + .trim() + .replace(/[۰-۹]/g, (d) => String('۰۱۲۳۴۵۶۷۸۹'.indexOf(d))) + .replace(/[٠-٩]/g, (d) => String('٠١٢٣٤٥٦٧٨٩'.indexOf(d))); + const m = ascii.match(/^(\d{4})[/-](\d{1,2})[/-](\d{1,2})$/); + if (!m) return null; + const jy = Number(m[1]); + const jm = Number(m[2]); + const jd = Number(m[3]); + if (jm < 1 || jm > 12 || jd < 1 || jd > 31 || (jm > 6 && jd > 30)) return null; + try { + // Round-trip rejects 30 Esfand in a common year. + const back = d2j(j2d(jy, jm, jd)); + return back.jy === jy && back.jm === jm && back.jd === jd ? { jy, jm, jd } : null; + } catch { + return null; + } +} + +const pad = (n: number) => String(n).padStart(2, '0'); + +/** `1405-04-24` (or with another separator). */ +export function formatJalali(d: JalaliDate, sep = '-') { + return `${d.jy}${sep}${pad(d.jm)}${sep}${pad(d.jd)}`; +} + +/** `2026-07-15` for a Jalali day. */ +export function jalaliToIsoDate(d: JalaliDate) { + const g = jalaliToGregorian(d.jy, d.jm, d.jd); + return `${g.gy}-${pad(g.gm)}-${pad(g.gd)}`; +} + +/** `2026-07-15` for an instant, Tehran calendar day. */ +export function toIsoDateTehran(date: Date) { + const local = new Date(date.getTime() + TEHRAN_OFFSET_MS); + return `${local.getUTCFullYear()}-${pad(local.getUTCMonth() + 1)}-${pad(local.getUTCDate())}`; +} diff --git a/apps/api/src/modules/accounting-sync/providers/accounting-provider.ts b/apps/api/src/modules/accounting-sync/providers/accounting-provider.ts new file mode 100644 index 0000000..c0bd30a --- /dev/null +++ b/apps/api/src/modules/accounting-sync/providers/accounting-provider.ts @@ -0,0 +1,310 @@ +import { Prisma } from '@prisma/client'; +import { JalaliDate } from '../jalali'; + +/** + * One accounting software (D27). AccountingSyncService picks a driver by the + * admin's switch and owns everything around the call — links, outbox, retries, + * logging — so a driver only translates between the app's shapes and its + * software's API. + * + * Every figure a driver returns is ALREADY in the app's convention: + * * gold in grams of 750, positive balance = the customer owes; + * * rial in rial, positive balance = the customer owes. + * Each software's own sign and unit quirks stay inside its driver. + */ + +export type ProviderName = 'tahesab' | 'zarrin'; + +/** Decrypted connection settings, handed to every call. */ +export interface ProviderSettings { + baseUrl: string; + token: string; + caCert: string | null; + timeoutMs: number; + /** Tahesab only: the `DBname` header (`TahesabDB` for SQL Server, `DB` for Access). */ + dbName?: string; + /** Zarrin only, until verified on a real installation (plan §9). */ + balanceOwesWhen?: 'negative' | 'positive'; +} + +export interface ExternalGroup { + id: string; + name: string; +} + +export interface ExternalCustomer { + code: string; + name: string; + /** Normalised to 09xxxxxxxxx, or null when the account has no usable mobile. */ + mobile: string | null; + phone: string | null; + nationalCode: string | null; + address: string | null; + groupId: string | null; + groupName: string | null; +} + +export interface CustomerPayload { + firstName: string; + lastName: string; + fullName: string; + mobile: string; + phone: string | null; + address: string | null; + nationalCode: string | null; + group: { id: string | null; name: string | null }; +} + +export interface ExternalBalance { + code: string; + goldGrams: Prisma.Decimal; + rial: Prisma.Decimal; +} + +export interface StatementQuery { + code: string; + from: JalaliDate; + to: JalaliDate; +} + +/** One line of a customer's statement, normalised across providers. */ +export interface StatementRow { + /** Stable within the provider (Tahesab ID + Radif, Zarrin idRadif). */ + key: string; + /** The document the line belongs to — what a detail lookup is keyed on. */ + documentRef: string; + /** The account the line belongs to, for the SEC-16 ownership check. */ + accountCode: string; + documentNo: string; + /** Jalali `1405/07/12`. */ + date: string; + time: string | null; + title: string; + description: string | null; + itemName: string | null; + weight: Prisma.Decimal | null; + karat: number | null; + count: Prisma.Decimal | null; + unitPrice: Prisma.Decimal | null; + wagePercent: Prisma.Decimal | null; + /** 750-equivalent gold received from the customer (reduces what they owe). */ + goldIn: Prisma.Decimal; + goldOut: Prisma.Decimal; + rialIn: Prisma.Decimal; + rialOut: Prisma.Decimal; + /** Running balance after this line, when the software reports one. */ + goldBalance: Prisma.Decimal | null; + rialBalance: Prisma.Decimal | null; + metal: string | null; + temporary: boolean; +} + +export interface ExternalKarSakhte { + /** Zarrin idKar; for Tahesab, which has no item ids, the item name itself. */ + code: string; + name: string; + groupId: string | null; + groupName: string | null; + typeId: string | null; + typeName: string | null; + saleWagePercent: Prisma.Decimal | null; + stockWeight: Prisma.Decimal | null; + stockCount: Prisma.Decimal | null; +} + +export interface KarSakhteStock { + weight: Prisma.Decimal | null; + count: Prisma.Decimal | null; +} + +export interface MovementRow { + itemCode: string | null; + itemName: string; + date: string; + description: string | null; + weight: Prisma.Decimal | null; + amount: Prisma.Decimal | null; + count: Prisma.Decimal | null; +} + +export interface DocumentLine { + /** The linked کارساخته: Zarrin idKar / Tahesab Name_Kar. */ + itemCode: string; + itemName: string; + /** Physical (raw) weight of the line, all pieces. */ + weightGrams: Prisma.Decimal; + count: number; + /** Effective making charge: variant wage minus discount, in percent. */ + wagePercent: Prisma.Decimal; + /** Flat rial charge of the line (stones), all pieces. */ + flatRial: Prisma.Decimal; + karat: number; + description: string; +} + +export interface OrderDocumentInput { + /** Deterministic per order; Tahesab dedupes on it (≥ 20 chars, lowercase). */ + factorCode: string; + customerCode: string; + date: Date; + description: string; + temporary: boolean; + lines: DocumentLine[]; +} + +/** Resumable state of a multi-call document (Zarrin posts one call per line). */ +export interface DocumentProgress { + factorId?: string; + doneLines?: number; +} + +export interface DocumentPostResult { + ref: string; + progress: DocumentProgress; + response: unknown; +} + +/** What changed in the accounting software since the last poll (real-time sync). */ +export interface ChangeBatch { + /** Opaque; hand it back on the next poll. */ + cursor: string; + /** Accounts that got a new or edited document. */ + accountCodes: string[]; + /** کارساخته names that got a new or edited document. */ + itemNames: string[]; + /** More changed than one poll can see: the caller must do a full refresh. */ + overflow: boolean; +} + +export interface ProviderCapabilities { + /** Can a کارساخته be created through the API? (Zarrin yes, Tahesab no.) */ + createKarSakhte: boolean; + /** Can a posted document be looked up by our own key before a retry? */ + documentInquiry: boolean; + /** Does the movement report cover every account, or only recent documents? */ + movementScope: 'all' | 'recent-documents'; + /** Can recent changes be polled cheaply (see getChanges)? */ + changeFeed: boolean; +} + +export interface AccountingProvider { + readonly name: ProviderName; + readonly label: string; + readonly capabilities: ProviderCapabilities; + + health(s: ProviderSettings): Promise>; + + listCustomerGroups(s: ProviderSettings): Promise; + /** One page of accounts; `next` is null after the last page. */ + listCustomers(s: ProviderSettings, cursor: string | null): Promise<{ items: ExternalCustomer[]; next: string | null }>; + findCustomersByMobile(s: ProviderSettings, mobile: string): Promise; + createCustomer(s: ProviderSettings, p: CustomerPayload): Promise<{ code: string; response: unknown }>; + updateCustomer(s: ProviderSettings, code: string, p: CustomerPayload): Promise<{ response: unknown }>; + + getBalances(s: ProviderSettings, codes: string[]): Promise; + /** + * Documents added or edited since `cursor` (null = first poll: only returns + * the starting cursor). Cheap enough to call every few seconds. + */ + getChanges(s: ProviderSettings, cursor: string | null): Promise; + getStatement(s: ProviderSettings, q: StatementQuery): Promise; + + listKarSakhteGroups(s: ProviderSettings): Promise; + listKarSakhteTypes(s: ProviderSettings): Promise; + listKarSakhte(s: ProviderSettings): Promise; + getKarSakhteStock(s: ProviderSettings, item: { code: string; name: string }): Promise; + getKarSakhteMovement(s: ProviderSettings, from: JalaliDate, to: JalaliDate): Promise; + createKarSakhte( + s: ProviderSettings, + item: { name: string; groupId: string | null; typeId: string | null }, + ): Promise<{ code: string; response: unknown }>; + + postOrderDocument( + s: ProviderSettings, + doc: OrderDocumentInput, + progress: DocumentProgress, + onProgress: (p: DocumentProgress) => Promise, + ): Promise; + /** True when a document with this key exists. */ + documentExists(s: ProviderSettings, doc: { factorCode: string; ref: string | null }): Promise; + deleteDocument( + s: ProviderSettings, + doc: { factorCode: string; ref: string | null; customerCode: string }, + ): Promise<{ response: unknown }>; +} + +/** + * A call the software answered with an error, or could not be made. + * `ambiguous` = the software may have acted on it anyway (timeout after send). + */ +export class AccountingProviderError extends Error { + constructor( + message: string, + readonly ambiguous = false, + readonly response?: unknown, + readonly notFound = false, + ) { + super(message); + this.name = 'AccountingProviderError'; + } +} + +/** Not offered by this software's API. */ +export class AccountingNotSupportedError extends AccountingProviderError { + constructor(what: string) { + super(`${what} در API این نرم‌افزار وجود ندارد`); + this.name = 'AccountingNotSupportedError'; + } +} + +// ── shared helpers ───────────────────────────────────────────────────── + +const PERSIAN_DIGITS = '۰۱۲۳۴۵۶۷۸۹'; +const ARABIC_DIGITS = '٠١٢٣٤٥٦٧٨٩'; + +export function asciiDigits(v: string) { + return v + .replace(/[۰-۹]/g, (d) => String(PERSIAN_DIGITS.indexOf(d))) + .replace(/[٠-٩]/g, (d) => String(ARABIC_DIGITS.indexOf(d))); +} + +/** + * `9121234567`, `09121234567`, `+989121234567`, `00989121234567`, Persian + * digits → `09121234567`. Anything that is not an Iranian mobile → null. + */ +export function normalizeMobile(v: unknown): string | null { + if (v === null || v === undefined) return null; + let d = asciiDigits(String(v)).replace(/\D/g, ''); + if (d.startsWith('0098')) d = d.slice(4); + else if (d.startsWith('98') && d.length === 12) d = d.slice(2); + if (d.length === 10 && d.startsWith('9')) d = `0${d}`; + return /^09\d{9}$/.test(d) ? d : null; +} + +/** A Prisma.Decimal from a value the software sent, or null for "null"/blank/NaN. */ +export function dec(v: unknown): Prisma.Decimal | null { + if (v === null || v === undefined) return null; + const s = asciiDigits(String(v)).replace(/,/g, '').trim(); + if (s === '' || s.toLowerCase() === 'null' || s.toLowerCase() === 'nan') return null; + try { + const d = new Prisma.Decimal(s); + return d.isFinite() ? d : null; + } catch { + return null; + } +} + +export const ZERO = new Prisma.Decimal(0); + +export function str(v: unknown): string | null { + if (v === null || v === undefined) return null; + const s = String(v).trim(); + return s === '' || s.toLowerCase() === 'null' ? null : s; +} + +/** Split a full name into first/last the way the app's DB trigger does. */ +export function splitName(full: string): { firstName: string; lastName: string } { + const parts = full.trim().split(/\s+/).filter(Boolean); + if (parts.length <= 1) return { firstName: parts[0] ?? '', lastName: '' }; + return { firstName: parts[0], lastName: parts.slice(1).join(' ') }; +} diff --git a/apps/api/src/modules/accounting-sync/providers/index.ts b/apps/api/src/modules/accounting-sync/providers/index.ts new file mode 100644 index 0000000..b496fc9 --- /dev/null +++ b/apps/api/src/modules/accounting-sync/providers/index.ts @@ -0,0 +1,18 @@ +import { AccountingProvider, ProviderName } from './accounting-provider'; +import { tahesabProvider } from './tahesab.provider'; +import { zarrinProvider } from './zarrin.provider'; + +/** + * Every accounting software, keyed by the admin switch's value. A new one is a + * driver file plus one line here — the same shape as the SMS drivers (D26). + */ +export const ACCOUNTING_PROVIDERS: Readonly> = { + tahesab: tahesabProvider, + zarrin: zarrinProvider, +}; + +export function isProviderName(v: unknown): v is ProviderName { + return typeof v === 'string' && Object.prototype.hasOwnProperty.call(ACCOUNTING_PROVIDERS, v); +} + +export * from './accounting-provider'; diff --git a/apps/api/src/modules/accounting-sync/providers/tahesab.provider.spec.ts b/apps/api/src/modules/accounting-sync/providers/tahesab.provider.spec.ts new file mode 100644 index 0000000..2aca68d --- /dev/null +++ b/apps/api/src/modules/accounting-sync/providers/tahesab.provider.spec.ts @@ -0,0 +1,298 @@ +import { Prisma } from '@prisma/client'; +import { httpRequest } from '../accounting-http'; +import { AccountingProviderError, OrderDocumentInput, ProviderSettings } from './accounting-provider'; +import { karatWithWage, tahesabProvider as t } from './tahesab.provider'; + +jest.mock('../accounting-http', () => ({ + ...jest.requireActual('../accounting-http'), + httpRequest: jest.fn(), +})); +const http = httpRequest as jest.MockedFunction; + +const s: ProviderSettings = { baseUrl: 'https://tahesab.local:8081/', token: 'TOK', caCert: null, timeoutMs: 5000, dbName: 'TahesabDB' }; + +const reply = (status: number, body: unknown) => + Promise.resolve({ status, body: typeof body === 'string' ? body : JSON.stringify(body) }); + +/** The body of the n-th request, parsed. */ +const sent = (n = 0) => JSON.parse(http.mock.calls[n][0].body as string); + +beforeEach(() => http.mockReset()); + +describe('wire format', () => { + it('posts {"Method": [args]} to the root with the bearer token and DBname', async () => { + http.mockReturnValueOnce(reply(200, [{ Name: 'بنکدار', GID: 2 }])); + const groups = await t.listCustomerGroups(s); + const req = http.mock.calls[0][0]; + expect(req.method).toBe('POST'); + expect(req.url).toBe('https://tahesab.local:8081/'); + expect(req.headers).toMatchObject({ Authorization: 'Bearer TOK', DBname: 'TahesabDB' }); + expect(sent()).toEqual({ DoListGorooh: [] }); + // GID 0 (accounts in no group) is offered too. + expect(groups).toEqual([ + { id: '2', name: 'بنکدار' }, + { id: '0', name: 'بدون گروه (GID 0)' }, + ]); + }); + + it('turns {"ERROR": …} into a provider error, flagging "not found"', async () => { + http.mockReturnValueOnce(reply(404, { ERROR: 'هیچ رکوردی یافت نشد.', Command: 'POST', SSL: '1' })); + await expect(t.updateCustomer(s, '5', { firstName: 'a', lastName: 'b', fullName: 'a b', mobile: '09120000000', phone: null, address: null, nationalCode: null, group: { id: null, name: null } })).rejects.toMatchObject({ + notFound: true, + response: { ERROR: 'هیچ رکوردی یافت نشد.' }, + }); + }); + + it('reports a timeout after the request went out as ambiguous', async () => { + const { AccountingHttpError } = jest.requireActual('../accounting-http'); + http.mockRejectedValueOnce(new AccountingHttpError('timeout', true, 'TIMEOUT')); + await expect(t.listCustomerGroups(s)).rejects.toMatchObject({ ambiguous: true }); + }); +}); + +describe('customers', () => { + it('pages through code windows and stops after empty ones', async () => { + http.mockReturnValueOnce( + reply(200, { + '1': { Code: 1, Name: 'masoud', GID: '2', GoroupName: 'بنکدار', Mobile: '9121234567', CodeMelli: '', Address: 'آدرس' }, + }), + ); + const page1 = await t.listCustomers(s, null); + expect(sent()).toEqual({ Dolistmoshtari: [1, 500] }); + expect(page1.items[0]).toMatchObject({ code: '1', mobile: '09121234567', groupId: '2', nationalCode: null }); + expect(page1.next).toBe('501:0'); + + http.mockReturnValue(reply(404, { ERROR: 'هیچ رکوردی یافت نشد.' })); + let cursor: string | null = page1.next; + let calls = 0; + while (cursor) { + cursor = (await t.listCustomers(s, cursor)).next; + calls += 1; + } + expect(calls).toBe(4); + }); + + it('looks a mobile up in both stored forms and keeps exact matches only', async () => { + http + .mockReturnValueOnce(reply(200, { '1': { Code: 1, Name: 'a', Mobile: '9121234567' }, '790': { Code: 790, Name: 'b', Mobile: '9121234567' } })) + .mockReturnValueOnce(reply(404, { ERROR: 'هیچ رکوردی یافت نشد.' })); + const found = await t.findCustomersByMobile(s, '09121234567'); + expect(sent(0)).toEqual({ DoListMoshtari: [9121234567] }); + expect(sent(1)).toEqual({ DoListMoshtari: ['09121234567'] }); + expect(found.map((c) => c.code)).toEqual(['1', '790']); + }); + + it('creates with an auto code and returns it', async () => { + http.mockReturnValueOnce(reply(200, { OK: 35 })); + const res = await t.createCustomer(s, { + firstName: 'علی', + lastName: 'محمدی', + fullName: 'علی محمدی', + mobile: '09121112233', + phone: null, + address: null, + nationalCode: null, + group: { id: '13', name: 'مشتري' }, + }); + expect(res.code).toBe('35'); + const args = sent().DoNewMoshtari; + expect(args[0]).toBe('علی محمدی'); + expect(args[1]).toBe('مشتري'); + expect(args[2]).toBe('09121112233'); + expect(args[8]).toBe(-1); + }); +}); + +describe('balances and statement', () => { + it('flips the sign: in Tahesab negative means the customer owes', async () => { + http.mockReturnValueOnce( + reply(200, { MandeHesab: [{ Code: '1', MandeyeMali: '-238999230', MandeyeVazni: '-177.431' }, { Code: '2', MandeyeMali: '5', MandeyeVazni: '1.5' }] }), + ); + const b = await t.getBalances(s, ['1', '2', '999']); + expect(sent()).toEqual({ getmandehesabbycode: ['1', '2', '999'] }); + expect(b).toEqual([ + { code: '1', goldGrams: new Prisma.Decimal('177.431'), rial: new Prisma.Decimal('238999230') }, + { code: '2', goldGrams: new Prisma.Decimal('-1.5'), rial: new Prisma.Decimal('-5') }, + ]); + }); + + it('maps DoListAsnad rows (real test-server rows)', async () => { + http.mockReturnValueOnce( + reply(200, { + '11558': { + ID: 11558, Radif: 1, Factor_Code: '123456789123421578191111985', MCode: 1, Tarikh: '1405/07/11', Tarikh_Time: '19:47:44', + NO: 'ورود کارساخته', Sh_Factor: 228, Vazn: 1.25, No_Kar: 'testmm', Ayar: 750, Fi: 10000, Mazaneh: 'null', Count: 1, + TabdilVazn: 1.25, Mali: 100000, Sharh1: 'sharhtest', TahesabVazni: 11526.174, TahesabMali: -209358396276, + Arz: 'IRR', Jens_Felez: 0, isSanadMovaghat: false, DarsadSood: 5.5, + }, + '12261': { + ID: 12261, Radif: 1, Factor_Code: 'GBORDX', MCode: 1, Tarikh: '1405/07/12', NO: 'خروج کارساخته', Vazn: 2, + TabdilVazn: -2, Mali: 'null', TahesabVazni: 0, TahesabMali: 0, Arz: 'IRR', Jens_Felez: 0, isSanadMovaghat: true, + }, + }), + ); + const rows = await t.getStatement(s, { code: '1', from: { jy: 1405, jm: 6, jd: 1 }, to: { jy: 1405, jm: 7, jd: 13 } }); + expect(sent()).toEqual({ DoListAsnad: [-1, 1, '1405-06-01', '1405-07-13', '', 0, 'IRR'] }); + expect(rows[0]).toMatchObject({ + documentRef: '123456789123421578191111985', + accountCode: '1', + title: 'ورود کارساخته', + itemName: 'testmm', + metal: 'طلا', + temporary: false, + }); + expect(rows[0].goldIn.toString()).toBe('1.25'); + expect(rows[0].goldOut.toString()).toBe('0'); + expect(rows[0].rialIn.toString()).toBe('100000'); + expect(rows[0].goldBalance?.toString()).toBe('-11526.174'); + expect(rows[0].rialBalance?.toString()).toBe('209358396276'); + // A temporary row moves nothing yet: no balance of its own. + expect(rows[1]).toMatchObject({ documentRef: 'gbordx', temporary: true, goldBalance: null }); + expect(rows[1].goldOut.toString()).toBe('2'); + }); +}); + +describe('order documents', () => { + const doc: OrderDocumentInput = { + factorCode: 'gbordcm1abcdefghijklmnopqrstuv', + customerCode: '2', + date: new Date('2026-10-05T08:00:00Z'), + description: 'سفارش 1001 از اپ', + temporary: true, + lines: [ + { itemCode: 'انگشتر', itemName: 'انگشتر', weightGrams: new Prisma.Decimal('4.200'), count: 2, wagePercent: new Prisma.Decimal(10), flatRial: new Prisma.Decimal(0), karat: 750, description: 'line 1' }, + { itemCode: 'النگو', itemName: 'النگو', weightGrams: new Prisma.Decimal('10'), count: 1, wagePercent: new Prisma.Decimal('18.5'), flatRial: new Prisma.Decimal(500000), karat: 750, description: 'line 2' }, + ], + }; + + it('raises the karat by the making charge — the only field that moves the gold balance', () => { + expect(karatWithWage(750, new Prisma.Decimal(10)).toString()).toBe('825'); + expect(karatWithWage(750, new Prisma.Decimal('18.5')).toString()).toBe('888.75'); + }); + + it('posts one temporary exit row per line under one Factor_Code', async () => { + http.mockReturnValue(reply(200, { OK: doc.factorCode, Factor_Code: doc.factorCode })); + const progress: unknown[] = []; + const res = await t.postOrderDocument(s, doc, {}, async (p) => { + progress.push(p); + }); + + const r1 = sent(0).DoNewSanadVKHKar; + const r2 = sent(1).DoNewSanadVKHKar; + expect(r1).toHaveLength(27); + expect(r1[0]).toBe(0); // temporary + expect(r1[1]).toBe(2); // Moshtari_Code + expect([r1[3], r2[3]]).toEqual([1, 2]); // Radif_Number + expect([r1[4], r1[5], r1[6]]).toEqual([1405, 7, 13]); + expect(r1[7]).toBe(4.2); // physical weight + expect(r1[8]).toBe(825); // karat with the charge + expect(r1[9]).toBe(2); + expect(r1[10]).toBe('انگشتر'); + expect(r1[11]).toBe(1); // exit + expect(r1[16]).toBe(0); // Darsad_Talayee never double-counts + expect(r2[13]).toBe(500000); // stones in MablaghKol + expect(r2[20]).toBe(0); // not PoolSang + expect(r1[22]).toBe(doc.factorCode); + expect(r1[24]).toBe(1); // MultiRadif + expect(progress).toEqual([{ doneLines: 1 }, { doneLines: 2 }]); + expect(res.ref).toBe(doc.factorCode); + }); + + it('resumes after the last confirmed line', async () => { + http.mockReturnValue(reply(200, { OK: doc.factorCode, Factor_Code: doc.factorCode })); + await t.postOrderDocument(s, doc, { doneLines: 1 }, async () => undefined); + expect(http).toHaveBeenCalledTimes(1); + expect(sent(0).DoNewSanadVKHKar[3]).toBe(2); + }); + + it('treats a duplicate-row rejection as "already there", which makes a retry safe', async () => { + http + .mockReturnValueOnce( + reply(400, { + ERROR: + "[EUniError] The statement has been terminated.\r\nCannot insert duplicate key row in object 'dbo.hesab_detail' with unique index 'UX_hesab_detail_UniqRowID'.", + }), + ) + .mockReturnValueOnce(reply(200, { OK: doc.factorCode, Factor_Code: doc.factorCode })); + const res = await t.postOrderDocument(s, doc, {}, async () => undefined); + expect(res.progress).toEqual({ doneLines: 2 }); + }); + + it('does not swallow other errors', async () => { + http.mockReturnValueOnce(reply(400, { ERROR: 'کد حساب نامعتبر است' })); + await expect(t.postOrderDocument(s, doc, {}, async () => undefined)).rejects.toBeInstanceOf(AccountingProviderError); + }); + + it('inquires and deletes by Factor_Code', async () => { + http.mockReturnValueOnce(reply(200, { Found: doc.factorCode })).mockReturnValueOnce(reply(404, { ERROR: 'Not_Found' })); + expect(await t.documentExists(s, { factorCode: doc.factorCode, ref: null })).toBe(true); + expect(await t.documentExists(s, { factorCode: 'x', ref: null })).toBe(false); + + http.mockReturnValueOnce(reply(404, { ERROR: 'سند یافت نشد.' })); + expect((await t.deleteDocument(s, { factorCode: 'x', ref: null, customerCode: '2' })).response).toEqual({ alreadyDeleted: true }); + }); +}); + +describe('items', () => { + it('skips item names that lost their encoding and reads stock per name', async () => { + http.mockReturnValueOnce(reply(200, [{ Name: 'انگشتر', Ayar: 750 }, { Name: '???????0.400????' }])); + const items = await t.listKarSakhte(s); + expect(items.map((i) => i.name)).toEqual(['انگشتر']); + + http.mockReturnValueOnce(reply(200, { Name: 'انگشتر', VaznMojood: 12.5, TedadMojood: 3, MaxAyar: 750 })); + const stock = await t.getKarSakhteStock(s, { code: 'انگشتر', name: 'انگشتر' }); + expect(sent(1)).toEqual({ GetMojoodiKarSakhte: ['انگشتر', 0] }); + expect(stock.weight?.toString()).toBe('12.5'); + expect(stock.count?.toString()).toBe('3'); + }); + + it('cannot create items through the API', async () => { + await expect(t.createKarSakhte(s, { name: 'x', groupId: null, typeId: null })).rejects.toThrow('وجود ندارد'); + }); +}); + +describe('change feed (real-time sync)', () => { + const row = (ID: number, MCode: number, extra: Record = {}) => ({ + ID, + MCode, + NO: 'فروش طلا', + No_Kar: 'null', + ZamanEdit: null, + ...extra, + }); + const feed = (rows: ReturnType[]) => reply(200, Object.fromEntries(rows.map((r) => [String(r.ID), r]))); + + it('the first poll only returns the starting cursor', async () => { + http.mockReturnValueOnce(feed([row(10, 1), row(11, 2)])); + expect(await t.getChanges(s, null)).toEqual({ cursor: '11|', accountCodes: [], itemNames: [], overflow: false }); + expect(sent()).toEqual({ DoListUpdatedAsnad: [200] }); + }); + + it('later polls report the accounts and کارساخته of new documents only', async () => { + http.mockReturnValueOnce( + feed([row(11, 2), row(12, 7), row(13, 7), row(14, 9, { NO: 'خروج کارساخته', No_Kar: 'انگشتر' })]), + ); + const r = await t.getChanges(s, '11|'); + expect(r.accountCodes.sort()).toEqual(['7', '9']); + expect(r.itemNames).toEqual(['انگشتر']); + expect(r.cursor).toBe('14|'); + expect(r.overflow).toBe(false); + }); + + it('sees an edit of an old document through ZamanEdit', async () => { + http.mockReturnValueOnce(feed([row(11, 2, { ZamanEdit: '1405/07/12 18:00:00' }), row(12, 3)])); + const r = await t.getChanges(s, '12|1405/07/12 17:00:00'); + expect(r.accountCodes).toEqual(['2']); + }); + + it('says overflow when every row of the window is new', async () => { + const rows = Array.from({ length: 200 }, (_, i) => row(100 + i, i)); + http.mockReturnValueOnce(feed(rows)); + expect((await t.getChanges(s, '50|')).overflow).toBe(true); + }); + + it('reports nothing when nothing changed', async () => { + http.mockReturnValueOnce(feed([row(11, 2), row(12, 3)])); + expect(await t.getChanges(s, '12|')).toMatchObject({ accountCodes: [], itemNames: [], overflow: false }); + }); +}); diff --git a/apps/api/src/modules/accounting-sync/providers/tahesab.provider.ts b/apps/api/src/modules/accounting-sync/providers/tahesab.provider.ts new file mode 100644 index 0000000..208a11f --- /dev/null +++ b/apps/api/src/modules/accounting-sync/providers/tahesab.provider.ts @@ -0,0 +1,511 @@ +import { Prisma } from '@prisma/client'; +import { AccountingHttpError, httpRequest, parseLooseJson } from '../accounting-http'; +import { formatJalali, toJalali } from '../jalali'; +import { + AccountingNotSupportedError, + AccountingProvider, + AccountingProviderError, + ExternalCustomer, + ProviderSettings, + StatementRow, + ZERO, + dec, + normalizeMobile, + str, +} from './accounting-provider'; + +/** + * Tahesab (ته‌حساب) — https://tahesab.ir/APiDoc/ (OpenAPI 3.1, API 10.1405.x). + * + * Wire format, confirmed against the public test server on 2026-10-05: + * POST / body {"": [args by position]} + * headers Authorization: Bearer , DBname: TahesabDB (SQL Server) | DB (Access) + * The server dispatches on the body key; the path in the docs is cosmetic. + * Errors come back as {"ERROR": "..."} with HTTP 400/404. + * + * Behaviour measured on the test server (plan §9), which this driver relies on: + * * Balance sign: an exit (خروج) LOWERS MandeyeVazni — negative = the + * customer owes, as henza_server's `* -1` assumed. Flipped here. + * * A temporary (موقت) document does not move the balance until the + * accountant finalises it. + * * The gold a document moves is Vazn × Ayar / 750. Darsad_Talayee and + * Ojrat are stored but do NOT move the balance, so the making charge is sent + * as a raised Ayar (750 at 10% → 825); Vazn stays the physical weight. + * * PoolSang does not move the rial balance; MablaghKol does. + * * Factor_Code is stored lowercased; re-sending a row with the same + * Factor_Code + Radif_Number is rejected as a duplicate key — which is what + * makes a retry safe. + */ + +const CUSTOMER_PAGE = 500; +/** Consecutive empty code windows before the account list is considered done. */ +const EMPTY_WINDOWS_TO_STOP = 4; +const MAX_CUSTOMER_CODE = 2_000_000; +const BALANCE_CHUNK = 100; +const RECENT_DOCUMENTS = 1000; +const CHANGE_WINDOW = 200; + +function baseUrl(s: ProviderSettings) { + return s.baseUrl.replace(/\/+$/, ''); +} + +function headers(s: ProviderSettings) { + return { + Authorization: `Bearer ${s.token}`, + DBname: s.dbName || 'TahesabDB', + 'Content-Type': 'application/json', + Accept: 'application/json', + }; +} + +function isNotFoundMessage(msg: string) { + return /یافت نشد|Not_Found|not found/i.test(msg); +} + +async function call(s: ProviderSettings, method: string, args: unknown[]): Promise { + let res; + try { + res = await httpRequest({ + method: 'POST', + url: `${baseUrl(s)}/`, + headers: headers(s), + body: JSON.stringify({ [method]: args }), + timeoutMs: s.timeoutMs, + ca: s.caCert, + }); + } catch (err) { + if (err instanceof AccountingHttpError) { + throw new AccountingProviderError(`ته‌حساب (${method}): ${err.message}`, err.ambiguous); + } + throw err; + } + + let json: unknown; + try { + json = parseLooseJson(res.body); + } catch { + throw new AccountingProviderError( + `ته‌حساب (${method}): پاسخ نامعتبر (HTTP ${res.status})`, + res.status >= 200 && res.status < 300, + res.body.slice(0, 500), + ); + } + + const error = json && typeof json === 'object' && !Array.isArray(json) ? (json as { ERROR?: unknown }).ERROR : undefined; + if (error !== undefined || res.status < 200 || res.status >= 300) { + const msg = typeof error === 'string' ? error : `HTTP ${res.status}`; + throw new AccountingProviderError( + `ته‌حساب (${method}): ${msg.split('\r\n')[0]}`, + false, + trimDiagnostics(json), + res.status === 404 || isNotFoundMessage(msg), + ); + } + return json; +} + +/** Tahesab error bodies carry ~30 diagnostic fields; keep only the message. */ +function trimDiagnostics(json: unknown) { + if (json && typeof json === 'object' && 'ERROR' in (json as object)) { + return { ERROR: (json as { ERROR: unknown }).ERROR }; + } + return json; +} + +/** A method that answers "nothing found" with an ERROR, as an empty result. */ +async function callList(s: ProviderSettings, method: string, args: unknown[]) { + try { + return await call(s, method, args); + } catch (err) { + if (err instanceof AccountingProviderError && err.notFound) return null; + throw err; + } +} + +/** Tahesab keys row objects by id: {"1": {...}, "2": {...}}. */ +function rowsOf(json: unknown): Record[] { + if (!json) return []; + if (Array.isArray(json)) return json as Record[]; + if (typeof json === 'object') { + return Object.values(json as Record).filter( + (v): v is Record => !!v && typeof v === 'object', + ); + } + return []; +} + +function toCustomer(r: Record): ExternalCustomer { + return { + code: String(r.Code), + name: str(r.Name) ?? '', + mobile: normalizeMobile(r.Mobile), + phone: null, + nationalCode: str(r.CodeMelli), + address: str(r.Address), + groupId: str(r.GID), + groupName: str(r.GoroupName), + }; +} + +const neg = (d: Prisma.Decimal | null) => (d ? d.negated() : null); + +const METALS: Record = { '0': 'طلا', '1': 'پلاتین', '2': 'نقره' }; + +/** + * Rounds the raised karat to 3 decimals, which is what the desktop app keeps. + * 750 × (1 + 10/100) = 825. + */ +export function karatWithWage(karat: number, wagePercent: Prisma.Decimal) { + return new Prisma.Decimal(karat).mul(new Prisma.Decimal(1).add(wagePercent.div(100))).toDecimalPlaces(3); +} + +export const tahesabProvider: AccountingProvider = { + name: 'tahesab', + label: 'ته‌حساب', + capabilities: { createKarSakhte: false, documentInquiry: true, movementScope: 'recent-documents', changeFeed: true }, + + async health(s) { + const path = baseUrl(s).startsWith('https:') ? 'CheckHealth-SSL' : 'CheckHealth-No-SSL'; + let info: Record = {}; + try { + const res = await httpRequest({ + method: 'GET', + url: `${baseUrl(s)}/${path}`, + headers: headers(s), + timeoutMs: s.timeoutMs, + ca: s.caCert, + }); + const json = parseLooseJson(res.body) as Record; + info = { + status: json.Status, + api: json.Api_Status, + db: json.DB_Status, + version: json.TahesabVersion, + dbType: json.DBType, + dbName: json.DBName, + }; + } catch (err) { + if (err instanceof AccountingHttpError) throw new AccountingProviderError(`ته‌حساب: ${err.message}`); + throw new AccountingProviderError('ته‌حساب: پاسخ CheckHealth نامعتبر است'); + } + // CheckHealth ignores the token and DBname; a real call proves both. + const groups = rowsOf(await call(s, 'DoListGorooh', [])); + return { ...info, customerGroups: groups.length }; + }, + + async listCustomerGroups(s) { + const groups = rowsOf(await call(s, 'DoListGorooh', [])).map((g) => ({ + id: String(g.GID), + name: str(g.Name) ?? String(g.GID), + })); + // Accounts outside every defined group carry GID 0 (seen on the test + // server as «مشتري»); offer it so it can be picked for import. + if (!groups.some((g) => g.id === '0')) groups.push({ id: '0', name: 'بدون گروه (GID 0)' }); + return groups; + }, + + async listCustomers(s, cursor) { + let [start, empty] = (cursor ?? '1:0').split(':').map(Number); + if (!Number.isFinite(start) || start < 1) start = 1; + if (!Number.isFinite(empty)) empty = 0; + + const json = await callList(s, 'Dolistmoshtari', [start, start + CUSTOMER_PAGE - 1]); + const items = rowsOf(json).map(toCustomer); + empty = items.length === 0 ? empty + 1 : 0; + const nextStart = start + CUSTOMER_PAGE; + const done = empty >= EMPTY_WINDOWS_TO_STOP || nextStart > MAX_CUSTOMER_CODE; + return { items, next: done ? null : `${nextStart}:${empty}` }; + }, + + async findCustomersByMobile(s, mobile) { + const target = normalizeMobile(mobile); + if (!target) return []; + // The account's Mobile is free text: some rows hold 9121234567, others + // 09121234567, and the lookup matches the stored form. Ask both ways. + const found = new Map(); + for (const form of [Number(target.slice(1)), target]) { + for (const r of rowsOf(await callList(s, 'DoListMoshtari', [form]))) { + const c = toCustomer(r); + if (c.mobile === target) found.set(c.code, c); + } + } + return [...found.values()]; + }, + + async createCustomer(s, p) { + const json = (await call(s, 'DoNewMoshtari', [ + p.fullName, + p.group.name ?? '', + p.mobile, + p.address ?? '', + p.nationalCode ?? '', + '', + '', + '-1', + -1, // Moshtari_Code -1: Tahesab assigns the code + 0, // Jens_Felez: gold + ])) as { OK?: unknown }; + if (json?.OK === undefined || json.OK === null) { + throw new AccountingProviderError('ته‌حساب: کد حساب جدید برنگشت', false, json); + } + return { code: String(json.OK), response: json }; + }, + + async updateCustomer(s, code, p) { + // "-1" leaves a field unchanged (DoEditMoshtari example in the docs). + const json = await call(s, 'DoEditMoshtari', [ + p.fullName, + p.group.name ?? '-1', + p.mobile, + p.address ?? '-1', + p.nationalCode ?? '-1', + '-1', + '-1', + '-1', + Number(code), + ]); + return { response: json }; + }, + + async getBalances(s, codes) { + const out = []; + for (let i = 0; i < codes.length; i += BALANCE_CHUNK) { + const chunk = codes.slice(i, i + BALANCE_CHUNK); + // Unknown codes are simply left out of MandeHesab. + const json = (await callList(s, 'getmandehesabbycode', chunk)) as { MandeHesab?: unknown } | null; + for (const r of rowsOf(json?.MandeHesab)) { + out.push({ + code: String(r.Code), + goldGrams: (dec(r.MandeyeVazni) ?? ZERO).negated(), + rial: (dec(r.MandeyeMali) ?? ZERO).negated(), + }); + } + } + return out; + }, + + async getChanges(s, cursor) { + // DoListUpdatedAsnad lists the newest documents by registration/edit time. + // Cursor "maxId|latestEdit": a row is news when its ID is higher, or it + // carries a later ZamanEdit. Nothing older than the window is visible, so + // a window with no already-seen row means "too many changes: refresh all". + const rows = rowsOf(await callList(s, 'DoListUpdatedAsnad', [CHANGE_WINDOW])); + let maxId = 0; + let latestEdit = ''; + for (const r of rows) { + maxId = Math.max(maxId, Number(r.ID) || 0); + const edited = String(r.ZamanEdit ?? ''); + if (edited && edited !== 'null' && edited > latestEdit) latestEdit = edited; + } + const next = `${maxId}|${latestEdit}`; + if (cursor === null) return { cursor: next, accountCodes: [], itemNames: [], overflow: false }; + + const [seenId, seenEdit] = [Number(cursor.split('|')[0]) || 0, cursor.split('|')[1] ?? '']; + const fresh = rows.filter((r) => { + const edited = String(r.ZamanEdit ?? ''); + return (Number(r.ID) || 0) > seenId || (!!edited && edited !== 'null' && edited > seenEdit); + }); + const accounts = new Set(); + const items = new Set(); + for (const r of fresh) { + const code = str(r.MCode); + if (code) accounts.add(code); + const kar = str(r.No_Kar); + if (kar && /کار/.test(String(r.NO ?? ''))) items.add(kar); + } + return { + cursor: next, + accountCodes: [...accounts], + itemNames: [...items], + overflow: rows.length >= CHANGE_WINDOW && fresh.length === rows.length, + }; + }, + + async getStatement(s, q) { + // Count_Last = -1 asks for the running balance on every row. + const json = await callList(s, 'DoListAsnad', [ + -1, + Number(q.code), + formatJalali(q.from), + formatJalali(q.to), + '', + 0, + 'IRR', + ]); + return rowsOf(json).map((r) => toStatementRow(r)); + }, + + async listKarSakhteGroups() { + return []; + }, + + async listKarSakhteTypes() { + return []; + }, + + async listKarSakhte(s) { + // Only items that already have a document appear here (Tahesab has no + // item master in its API). Names that arrive as "????" lost their + // encoding upstream and cannot be matched back; they are skipped. + return rowsOf(await callList(s, 'DoListNameKarsakhte', [])) + .map((r) => str(r.Name)) + .filter((name): name is string => !!name && !name.includes('??')) + .map((name) => ({ + code: name, + name, + groupId: null, + groupName: null, + typeId: null, + typeName: null, + saleWagePercent: null, + stockWeight: null, + stockCount: null, + })); + }, + + async getKarSakhteStock(s, item) { + const json = (await callList(s, 'GetMojoodiKarSakhte', [item.name, 0])) as Record | null; + return { weight: dec(json?.VaznMojood), count: dec(json?.TedadMojood) }; + }, + + async getKarSakhteMovement(s, from, to) { + // Tahesab cannot list documents across all accounts by date; the closest + // is the most recent N documents, filtered here. + const lo = formatJalali(from, '/'); + const hi = formatJalali(to, '/'); + return rowsOf(await callList(s, 'DoListUpdatedAsnad', [RECENT_DOCUMENTS])) + .filter((r) => /کار/.test(String(r.NO ?? ''))) + .filter((r) => { + const d = String(r.Tarikh ?? ''); + return d >= lo && d <= hi; + }) + .map((r) => ({ + itemCode: str(r.No_Kar), + itemName: str(r.No_Kar) ?? '—', + date: String(r.Tarikh ?? ''), + description: [str(r.NO), str(r.Sharh1)].filter(Boolean).join(' — ') || null, + weight: dec(r.Vazn), + amount: dec(r.Mali), + count: dec(r.Count), + })); + }, + + async createKarSakhte() { + throw new AccountingNotSupportedError('ساخت کارساخته'); + }, + + async postOrderDocument(s, doc, progress, onProgress) { + const d = toJalali(doc.date); + const multi = doc.lines.length > 1 ? 1 : -1; + let done = progress.doneLines ?? 0; + let last: unknown = null; + + for (let i = done; i < doc.lines.length; i += 1) { + const line = doc.lines[i]; + const args = [ + doc.temporary ? 0 : 1, // Sabte_Kol_Or_Movaghat: 0 = temporary + Number(doc.customerCode), + -1, // Factor_Number: assigned by Tahesab + i + 1, // Radif_Number + d.jy, + d.jm, + d.jd, + Number(line.weightGrams.toFixed(3)), + Number(karatWithWage(line.karat, line.wagePercent).toString()), + line.count, + line.itemName, + 1, // IsVoroodOrKhorooj: 1 = exit (goods to the customer) + 1, // OjratTedadiOrGerami: per gram + Number(line.flatRial.toFixed(0)), // MablaghKol — the only rial field that moves the balance + 0, + 0, + 0, // Darsad_Talayee: the charge is already in Ayar; never count it twice + 0, + '', + 0, + 0, // PoolSang: does not move the balance; the stones are in MablaghKol + line.description, + doc.factorCode, + -1, + multi, + 0, + 0, + ]; + try { + last = await call(s, 'DoNewSanadVKHKar', args); + } catch (err) { + // The row is already there (an earlier attempt landed but its reply + // was lost): Factor_Code + Radif_Number is a unique key in Tahesab. + if (!(err instanceof AccountingProviderError && /duplicate key/i.test(err.message + JSON.stringify(err.response ?? '')))) { + throw err; + } + last = { duplicate: true }; + } + done = i + 1; + await onProgress({ doneLines: done }); + } + + const ref = String((last as { Factor_Code?: unknown })?.Factor_Code ?? doc.factorCode).toLowerCase(); + return { ref, progress: { doneLines: done }, response: last }; + }, + + async documentExists(s, doc) { + try { + await call(s, 'DoNewSanadInquiry', [doc.factorCode]); + return true; + } catch (err) { + if (err instanceof AccountingProviderError && err.notFound) return false; + // A multi-row document answers {"ERROR":"Duplicate"}: found, more than + // one row under the code (seen on the test server). + if (err instanceof AccountingProviderError && /:\s*Duplicate$/i.test(err.message)) return true; + throw err; + } + }, + + async deleteDocument(s, doc) { + try { + return { response: await call(s, 'DoDeleteSanad', [doc.factorCode]) }; + } catch (err) { + // Already gone — the goal is reached. + if (err instanceof AccountingProviderError && err.notFound) return { response: { alreadyDeleted: true } }; + throw err; + } + }, +}; + +function toStatementRow(r: Record): StatementRow { + const metal = String(r.Jens_Felez ?? '0'); + const temporary = r.isSanadMovaghat === true; + const isGold = metal === '0'; + const isRial = !r.Arz || String(r.Arz).toUpperCase() === 'IRR'; + // Positive TabdilVazn / Mali = in the customer's favour (they gave us gold + // or money); negative = they took goods or money from us. + const tabdil = isGold ? dec(r.TabdilVazn) ?? ZERO : ZERO; + const mali = isRial ? dec(r.Mali) ?? ZERO : ZERO; + return { + key: `${r.ID}-${r.Radif ?? 1}`, + documentRef: String(r.Factor_Code ?? r.ID).toLowerCase(), + accountCode: String(r.MCode ?? ''), + documentNo: String(r.Sh_Factor ?? ''), + date: String(r.Tarikh ?? ''), + time: str(r.Tarikh_Time), + title: str(r.NO) ?? '', + description: [str(r.Sharh1), str(r.Sharh2), str(r.Baabat)].filter(Boolean).join(' — ') || null, + itemName: str(r.No_Kar), + weight: dec(r.Vazn), + karat: dec(r.Ayar)?.toNumber() ?? null, + count: dec(r.Count), + unitPrice: dec(r.Fi) ?? dec(r.Mazaneh), + wagePercent: dec(r.DarsadSood), + goldIn: tabdil.gt(0) ? tabdil : ZERO, + goldOut: tabdil.lt(0) ? tabdil.negated() : ZERO, + rialIn: mali.gt(0) ? mali : ZERO, + rialOut: mali.lt(0) ? mali.negated() : ZERO, + // A temporary row reports TahesabVazni/Mali = 0 because it moves nothing + // yet; null lets the report carry the previous balance forward instead. + goldBalance: temporary ? null : neg(dec(r.TahesabVazni)), + rialBalance: temporary ? null : neg(dec(r.TahesabMali)), + metal: METALS[metal] ?? metal, + temporary, + }; +} diff --git a/apps/api/src/modules/accounting-sync/providers/zarrin.provider.spec.ts b/apps/api/src/modules/accounting-sync/providers/zarrin.provider.spec.ts new file mode 100644 index 0000000..794b569 --- /dev/null +++ b/apps/api/src/modules/accounting-sync/providers/zarrin.provider.spec.ts @@ -0,0 +1,215 @@ +import { Prisma } from '@prisma/client'; +import { httpRequest } from '../accounting-http'; +import { OrderDocumentInput, ProviderSettings } from './accounting-provider'; +import { __zarrinInternals, zarrinProvider as z } from './zarrin.provider'; + +jest.mock('../accounting-http', () => ({ + ...jest.requireActual('../accounting-http'), + httpRequest: jest.fn(), +})); +const http = httpRequest as jest.MockedFunction; + +const s: ProviderSettings = { + baseUrl: 'http://zarrin.local:8000/ZarrinService/accounting', + token: 'SECRET', + caCert: null, + timeoutMs: 5000, + balanceOwesWhen: 'negative', +}; + +const reply = (body: unknown, status = 200) => + Promise.resolve({ status, body: typeof body === 'string' ? body : JSON.stringify(body) }); + +const url = (n = 0) => new URL(http.mock.calls[n][0].url); + +beforeEach(() => http.mockReset()); + +describe('wire format', () => { + it('sends GET ?kind=…&token=… with the parameters, and nothing blank', async () => { + http.mockReturnValueOnce(reply({ state: true, msg: 'OK', data: [{ id: '4', name: 'مشتری (خریدار)' }] })); + const groups = await z.listCustomerGroups(s); + const u = url(); + expect(http.mock.calls[0][0].method).toBe('GET'); + expect(u.pathname).toBe('/ZarrinService/accounting'); + expect(u.searchParams.get('kind')).toBe('listGorooheHesabha'); + expect(u.searchParams.get('token')).toBe('SECRET'); + expect(groups).toEqual([{ id: '4', name: 'مشتری (خریدار)' }]); + }); + + it('unwraps the JSON-in-a-string replies the documentation shows', async () => { + const inner = JSON.stringify({ state: true, msg: 'حساب با موفقیت ایجاد شد', id: 132 }); + http.mockReturnValueOnce(reply(JSON.stringify(inner))); + const res = await z.createCustomer(s, { + firstName: 'تست', + lastName: 'تست', + fullName: 'تست تست', + mobile: '09121112233', + phone: null, + address: null, + nationalCode: null, + group: { id: '4', name: 'مشتری' }, + }); + expect(res.code).toBe('132'); + expect(url().searchParams.get('fkNoe')).toBe('4'); + expect(url().searchParams.has('telephone')).toBe(false); + }); + + it('turns state:false into an error carrying the message', async () => { + http.mockReturnValueOnce(reply({ state: false, msg: 'دسترسی مجاز نیست' })); + await expect(z.listCustomerGroups(s)).rejects.toThrow('دسترسی مجاز نیست'); + }); + + it('lists the different envelopes Zarrin uses', () => { + const { listOf, fullJalali } = __zarrinInternals; + expect(listOf({ data: [1] })).toEqual([1]); + expect(listOf({ date: [2] })).toEqual([2]); // Get100Account's typo + expect(listOf([3])).toEqual([3]); + expect(listOf({ id: '84', nam: 'x' })).toEqual([{ id: '84', nam: 'x' }]); + expect(fullJalali('04/05/29')).toBe('1404/05/29'); + }); +}); + +describe('customers', () => { + it('pages with Get100Account and fills groups from listhesabha', async () => { + const page = Array.from({ length: 100 }, (_, i) => ({ code: 81 + i, name: 'n', namKhanevadegi: `f${i}`, mobile: i === 0 ? '09121112233' : '' })); + http + .mockReturnValueOnce(reply({ state: true, msg: '', date: page })) + .mockReturnValueOnce(reply({ data: [{ id: '81', nam: 'حسین اصغری', gorooh: 'مشتری (خریدار)', tell: '021', mobile: '09121112233', codeMeli: '' }] })); + const res = await z.listCustomers(s, null); + expect(url(0).searchParams.get('id')).toBe('0'); + expect(url(1).searchParams.get('az')).toBe('81'); + expect(url(1).searchParams.get('ta')).toBe('180'); + expect(res.items[0]).toMatchObject({ code: '81', name: 'حسین اصغری', mobile: '09121112233', groupName: 'مشتری (خریدار)', phone: '021' }); + expect(res.next).toBe('181'); + }); + + it('keeps the account in its group on edit', async () => { + http.mockReturnValueOnce(reply({ state: true, msg: 'ویرایش اطلاعات با موفقیت انجام شد' })); + await z.updateCustomer(s, '101', { + firstName: 'حسین', + lastName: 'اصغری', + fullName: 'حسین اصغری', + mobile: '09121427233', + phone: null, + address: 'خیابان مولوی', + nationalCode: null, + group: { id: null, name: 'واسطه' }, + }); + expect(url().searchParams.get('nameG')).toBe('واسطه'); + expect(url().searchParams.get('id')).toBe('101'); + }); +}); + +describe('balances and statement', () => { + it('applies the configured sign', async () => { + http.mockReturnValue(reply({ state: true, msg: 'OK', data: [{ id: '108', name: 'x', geram: '-75.409', pool: '-3.211960271E9' }, { id: '9', geram: '1', pool: '1' }] })); + const neg = await z.getBalances(s, ['108', '5']); + expect(neg).toHaveLength(1); + expect(neg[0].goldGrams.toString()).toBe('75.409'); + expect(neg[0].rial.toString()).toBe('3211960271'); + const pos = await z.getBalances({ ...s, balanceOwesWhen: 'positive' }, ['108', '9']); + expect(pos[0].goldGrams.toString()).toBe('-75.409'); + }); + + it('folds a running balance from «مانده از قبل»', async () => { + http.mockReturnValueOnce( + reply({ + state: true, + detail: 'OK', + data: [ + { idRadif: '0', idFactor: '0', idHesab: '81', sharh: 'مانده از قبل', vaznTarazooPardakht: '10.0', vaznTarazooDaryaft: '0.0', poolPardakht: '0', poolDaryaft: '0' }, + { idRadif: '470', idFactor: '221', idHesab: '81', noeRadif: 'چک', tarikh: '04/05/29', vaznTarazooPardakht: '0.0', vaznTarazooDaryaft: '2.5', poolPardakht: '810000000', poolDaryaft: '0', ayar: '0' }, + ], + }), + ); + const rows = await z.getStatement(s, { code: '81', from: { jy: 1404, jm: 5, jd: 1 }, to: { jy: 1404, jm: 5, jd: 31 } }); + expect(url().searchParams.get('dateAz')).toBe('2025-07-23'); + expect(rows[0].goldBalance?.toString()).toBe('10'); + expect(rows[1]).toMatchObject({ documentRef: '221', date: '1404/05/29', title: 'چک' }); + expect(rows[1].goldBalance?.toString()).toBe('7.5'); + expect(rows[1].rialBalance?.toString()).toBe('810000000'); + }); +}); + +describe('order documents', () => { + const line = (code: string, wage: number) => ({ + itemCode: code, + itemName: code, + weightGrams: new Prisma.Decimal('10'), + count: 1, + wagePercent: new Prisma.Decimal(wage), + flatRial: new Prisma.Decimal(0), + karat: 750, + description: 'd', + }); + const doc: OrderDocumentInput = { + factorCode: 'gbordx00000000000000000', + customerCode: '81', + date: new Date(), + description: 'سفارش', + temporary: true, + lines: [line('19', 12), line('20', 8)], + }; + + it('opens the invoice with the account, appends with the invoice id, in bonak mode', async () => { + http.mockReturnValueOnce(reply({ state: true, msg: 'OK', data: { idFactor: 117764 } })).mockReturnValueOnce(reply({ state: true, msg: 'OK', data: { idFactor: 117764 } })); + const progress: unknown[] = []; + const res = await z.postOrderDocument(s, doc, {}, async (p) => { + progress.push(p); + }); + const a = url(0).searchParams; + const b = url(1).searchParams; + expect(a.get('kind')).toBe('foroushSakhte'); + expect(a.get('idHesab')).toBe('81'); + expect(a.has('idFactor')).toBe(false); + expect(a.get('idSakhte')).toBe('19'); + expect(a.get('darsad')).toBe('12'); + expect(a.get('vazn')).toBe('10.000'); + expect(a.get('pd')).toBe('-1'); + expect(a.get('bonak')).toBe('1'); + expect(a.get('movaghat')).toBe('1'); + expect(b.get('idFactor')).toBe('117764'); + expect(b.has('idHesab')).toBe(false); + expect(b.get('movaghat')).toBe('1'); // temporary, as the owner ruled + expect(progress).toEqual([ + { factorId: '117764', doneLines: 1 }, + { factorId: '117764', doneLines: 2 }, + ]); + expect(res.ref).toBe('117764'); + }); + + it('resumes into the same invoice', async () => { + http.mockReturnValueOnce(reply({ state: true, data: { idFactor: 5 } })); + await z.postOrderDocument(s, doc, { factorId: '5', doneLines: 1 }, async () => undefined); + expect(http).toHaveBeenCalledTimes(1); + expect(url().searchParams.get('idFactor')).toBe('5'); + expect(url().searchParams.get('idSakhte')).toBe('20'); + }); + + it('finds the row to delete in the ledger, since foroushSakhte never returned it', async () => { + http + .mockReturnValueOnce(reply({ state: true, data: [{ idRadif: '0', idFactor: '0' }, { idRadif: '731', idFactor: '390' }] })) + .mockReturnValueOnce(reply({ state: true, msg: 'حذف با موفقیت انجام شد :)' })); + await z.deleteDocument(s, { factorCode: 'x', ref: '390', customerCode: '81' }); + expect(url(1).searchParams.get('kind')).toBe('hazfRadifSanad'); + expect(url(1).searchParams.get('pkRadifSanad')).toBe('731'); + expect(url(1).searchParams.get('kol')).toBe('1'); + }); +}); + +describe('change feed (real-time sync)', () => { + it('reads the newest journal rows and reports accounts above the cursor', async () => { + http.mockReturnValueOnce( + reply({ state: true, data: [{ idRadif: '731', idHesab: '118' }, { idRadif: '733', idHesab: '40' }, { idRadif: '734', idHesab: '40' }] }), + ); + const r = await z.getChanges(s, '731'); + expect(url().searchParams.get('kind')).toBe('parLastTenRadif'); + expect(url().searchParams.has('idHesab')).toBe(false); + expect(r).toMatchObject({ cursor: '734', accountCodes: ['40'], overflow: false }); + }); + + it('first poll only returns the cursor', async () => { + http.mockReturnValueOnce(reply({ state: true, data: [{ idRadif: '731', idHesab: '118' }] })); + expect(await z.getChanges(s, null)).toEqual({ cursor: '731', accountCodes: [], itemNames: [], overflow: false }); + }); +}); diff --git a/apps/api/src/modules/accounting-sync/providers/zarrin.provider.ts b/apps/api/src/modules/accounting-sync/providers/zarrin.provider.ts new file mode 100644 index 0000000..cd3d4a6 --- /dev/null +++ b/apps/api/src/modules/accounting-sync/providers/zarrin.provider.ts @@ -0,0 +1,466 @@ +import { Prisma } from '@prisma/client'; +import { AccountingHttpError, httpRequest, parseLooseJson } from '../accounting-http'; +import { jalaliToIsoDate, toIsoDateTehran } from '../jalali'; +import { + AccountingProvider, + AccountingProviderError, + ExternalCustomer, + ProviderSettings, + StatementRow, + ZERO, + dec, + normalizeMobile, + splitName, + str, +} from './accounting-provider'; + +/** + * Zarrin (زرین) — https://zarrin.ir/api-docs/ (the page renders + * /wp-content/themes/Hirad/data/api.json, 82 entries). + * + * Wire format: GET ?kind=&token=&, where is + * the installation's `http://host:8000/ZarrinService/accounting`. The token + * travels in the query string, so a URL built here must never be logged. + * + * NOT verified against a live installation — the owner has none to test on + * (plan, decision 11). Everything below follows the documentation and its + * sample outputs, and is covered by unit tests built from those samples. The + * open points (balance sign, which rial field the stones belong in) are + * configurable or flagged, and the integration is to be switched on for real + * only after a trial period on temporary documents. + * + * Differences from Tahesab that shape the sync: + * * No idempotency key on foroushSakhte. A timed-out document call cannot be + * retried blindly — the worker parks it as NEEDS_REVIEW. + * * foroushSakhte does not return the row id needed to delete a document; + * deleteDocument looks it up from the account's ledger (parvande). + * * کارساخته can be created (addFelezsakhteModel) but never edited. + */ + +const STATEMENT_PAGE = 250; +const CHANGE_WINDOW = 50; +const MAX_STATEMENT_PAGES = 20; + +function endpoint(s: ProviderSettings) { + return s.baseUrl.trim(); +} + +async function call( + s: ProviderSettings, + kind: string, + params: Record = {}, +): Promise | unknown[]> { + let url: URL; + try { + url = new URL(endpoint(s)); + } catch { + throw new AccountingProviderError('زرین: آدرس سرور نامعتبر است'); + } + url.searchParams.set('kind', kind); + url.searchParams.set('token', s.token); + for (const [k, v] of Object.entries(params)) { + if (v !== null && v !== undefined && v !== '') url.searchParams.set(k, String(v)); + } + + let res; + try { + res = await httpRequest({ method: 'GET', url: url.toString(), timeoutMs: s.timeoutMs, ca: s.caCert }); + } catch (err) { + if (err instanceof AccountingHttpError) { + throw new AccountingProviderError(`زرین (${kind}): ${err.message}`, err.ambiguous); + } + throw err; + } + + if (res.status < 200 || res.status >= 300) { + throw new AccountingProviderError(`زرین (${kind}): HTTP ${res.status}`, false, res.body.slice(0, 500), res.status === 404); + } + + let json: unknown; + try { + json = parseLooseJson(res.body); + // The documented outputs are JSON-encoded strings of JSON ("{\"state\":…}"). + if (typeof json === 'string' && /^\s*[{[]/.test(json)) json = parseLooseJson(json); + } catch { + throw new AccountingProviderError(`زرین (${kind}): پاسخ نامعتبر`, true, res.body.slice(0, 500)); + } + if (!json || typeof json !== 'object') { + throw new AccountingProviderError(`زرین (${kind}): پاسخ نامعتبر`, true, json); + } + + const o = json as Record; + if (o.state === false || o.status === false) { + const msg = str(o.msg) ?? str(o.detail) ?? str(o.message) ?? 'خطای نامشخص'; + throw new AccountingProviderError(`زرین (${kind}): ${msg}`, false, json, /یافت نشد|موجود نیست/.test(msg)); + } + return json as Record | unknown[]; +} + +/** Zarrin wraps lists as `data`, once as `date` (Get100Account), or not at all. */ +function listOf(json: unknown): Record[] { + if (Array.isArray(json)) return json as Record[]; + if (json && typeof json === 'object') { + const o = json as Record; + for (const key of ['data', 'date', 'mande']) { + if (Array.isArray(o[key])) return o[key] as Record[]; + } + if ('id' in o || 'code' in o) return [o]; + } + return []; +} + +function dataOf(json: unknown): Record { + const o = (json ?? {}) as Record; + const d = o.data; + if (d && typeof d === 'object' && !Array.isArray(d)) return d as Record; + return o; +} + +function joinName(first: unknown, last: unknown) { + return [str(first), str(last)].filter(Boolean).join(' ').trim(); +} + +/** Zarrin prints dates as yy/mm/dd of the 1400s: "04/05/29" → "1404/05/29". */ +function fullJalali(v: unknown): string { + const s = str(v) ?? ''; + const m = s.match(/^(\d{2})\/(\d{1,2})\/(\d{1,2})$/); + if (!m) return s; + return `14${m[1]}/${m[2].padStart(2, '0')}/${m[3].padStart(2, '0')}`; +} + +function signed(s: ProviderSettings, v: Prisma.Decimal) { + // Until checked on a real installation (plan §9) the sign is a setting. + return (s.balanceOwesWhen ?? 'negative') === 'negative' ? v.negated() : v; +} + +export const zarrinProvider: AccountingProvider = { + name: 'zarrin', + label: 'زرین', + capabilities: { createKarSakhte: true, documentInquiry: false, movementScope: 'all', changeFeed: true }, + + async health(s) { + const v = (await call(s, 'version')) as Record; + // `version` may not check the token; a group listing does. + const groups = listOf(await call(s, 'listGorooheHesabha')); + return { version: v.version, message: v.message, customerGroups: groups.length }; + }, + + async listCustomerGroups(s) { + return listOf(await call(s, 'listGorooheHesabha')).map((g) => ({ + id: String(g.id), + name: str(g.name) ?? String(g.id), + })); + }, + + async listCustomers(s, cursor) { + const from = Number(cursor ?? 0) || 0; + // Get100Account pages by code (100 accounts from `id` on) but carries no + // group or address; listhesabha over the same code span fills those in. + const page = listOf(await call(s, 'Get100Account', { id: from })); + if (page.length === 0) return { items: [], next: null }; + + const codes = page.map((r) => Number(r.code)).filter(Number.isFinite); + const lo = Math.min(...codes); + const hi = Math.max(...codes); + const details = new Map>(); + for (const r of listOf(await call(s, 'listhesabha', { az: lo, ta: hi }))) details.set(String(r.id), r); + + const items: ExternalCustomer[] = page.map((r) => { + const code = String(r.code); + const d = details.get(code) ?? {}; + return { + code, + name: str(d.nam) ?? joinName(r.name, r.namKhanevadegi), + mobile: normalizeMobile(d.mobile ?? r.mobile), + phone: str(d.tell), + nationalCode: str(d.codeMeli), + address: str(d.address), + groupId: null, + groupName: str(d.gorooh), + }; + }); + const next = page.length < 100 ? null : String(hi + 1); + return { items, next }; + }, + + async findCustomersByMobile(s, mobile) { + const target = normalizeMobile(mobile); + if (!target) return []; + let rows: Record[]; + try { + rows = listOf(await call(s, 'getinfoByPhone', { number: target })); + } catch (err) { + if (err instanceof AccountingProviderError && err.notFound) return []; + throw err; + } + return rows + .filter((r) => r.code !== undefined && normalizeMobile(r.mobile) === target) + .map((r) => ({ + code: String(r.code), + name: joinName(r.nam, r.namKhanevadegi), + mobile: target, + phone: str(r.tel), + nationalCode: null, + address: str(r.address), + groupId: null, + groupName: null, + })); + }, + + async createCustomer(s, p) { + const json = (await call(s, 'addAccount', { + firstName: p.firstName || p.fullName, + lastName: p.lastName || '-', + fkNoe: p.group.id, + mobile: p.mobile, + telephone: p.phone, + address: p.address, + codeMelli: p.nationalCode, + })) as Record; + const id = json.id ?? dataOf(json).id; + if (id === undefined || id === null) throw new AccountingProviderError('زرین: کد حساب جدید برنگشت', false, json); + return { code: String(id), response: json }; + }, + + async updateCustomer(s, code, p) { + const json = await call(s, 'edithesab', { + id: code, + name: p.firstName || p.fullName, + family: p.lastName, + mobile: p.mobile, + tel: p.phone, + address: p.address, + codeMeli: p.nationalCode, + // Without nameG Zarrin moves the account into its customers group, so the + // current group is always sent back. + nameG: p.group.name, + }); + return { response: json }; + }, + + async getBalances(s, codes) { + if (codes.length === 0) return []; + const wanted = new Set(codes); + const rows = + codes.length === 1 + ? listOf(await call(s, 'listMandeHesabha', { id: codes[0], isRial: 0 })) + : listOf(await call(s, 'listMandeHesabha', { isRial: 0 })); + return rows + .filter((r) => wanted.has(String(r.id))) + .map((r) => ({ + code: String(r.id), + goldGrams: signed(s, dec(r.geram) ?? ZERO), + rial: signed(s, dec(r.pool) ?? ZERO), + })); + }, + + async getChanges(s, cursor) { + // parLastTenRadif without an account is the newest rows of the whole + // journal; each row names its account (idHesab) and has an ascending idRadif. + // Not yet seen on a real install (ACC-01). + const rows = listOf(await call(s, 'parLastTenRadif', { limit: CHANGE_WINDOW })); + let maxId = 0; + for (const r of rows) maxId = Math.max(maxId, Number(r.idRadif) || 0); + if (cursor === null) return { cursor: String(maxId), accountCodes: [], itemNames: [], overflow: false }; + const seen = Number(cursor) || 0; + const fresh = rows.filter((r) => (Number(r.idRadif) || 0) > seen); + const accounts = new Set(); + for (const r of fresh) { + const code = str(r.idHesab); + if (code) accounts.add(code); + } + return { + cursor: String(Math.max(maxId, seen)), + accountCodes: [...accounts], + itemNames: [], + overflow: rows.length >= CHANGE_WINDOW && fresh.length === rows.length, + }; + }, + + async getStatement(s, q) { + const rows: Record[] = []; + for (let page = 1; page <= MAX_STATEMENT_PAGES; page += 1) { + const batch = listOf( + await call(s, 'parvande', { + id: q.code, + dateAz: jalaliToIsoDate(q.from), + dateTa: jalaliToIsoDate(q.to), + pageNum: page, + detailCount: STATEMENT_PAGE, + }), + ); + rows.push(...batch); + if (batch.length < STATEMENT_PAGE) break; + } + + // parvande has no running balance; it opens with «مانده از قبل» and the + // balance is folded from there. پرداخت = we gave = the customer owes more. + let gold = ZERO; + let rial = ZERO; + return rows.map((r): StatementRow => { + const goldIn = dec(r.vaznTarazooDaryaft) ?? ZERO; + const goldOut = dec(r.vaznTarazooPardakht) ?? ZERO; + const rialIn = dec(r.poolDaryaft) ?? ZERO; + const rialOut = dec(r.poolPardakht) ?? ZERO; + gold = gold.add(goldOut).sub(goldIn); + rial = rial.add(rialOut).sub(rialIn); + const factor = str(r.idFactor); + return { + key: String(r.idRadif ?? ''), + documentRef: factor && factor !== '0' ? factor : '', + accountCode: String(r.idHesab ?? q.code), + documentNo: factor && factor !== '0' ? factor : '', + date: fullJalali(r.tarikh), + time: null, + title: str(r.noeRadif) ?? str(r.noeFactor) ?? str(r.sharh) ?? '', + description: str(r.sharh), + itemName: str(r.namFelez), + weight: dec(r.vaznDaryaft)?.gt(0) ? dec(r.vaznDaryaft) : dec(r.vaznPardakht), + karat: dec(r.ayar)?.toNumber() || null, + count: null, + unitPrice: null, + wagePercent: null, + goldIn, + goldOut, + rialIn, + rialOut, + goldBalance: gold, + rialBalance: rial, + metal: null, + temporary: false, + }; + }); + }, + + async listKarSakhteGroups(s) { + return listOf(await call(s, 'goroohSakhte')).map((g) => ({ id: String(g.id), name: str(g.name) ?? String(g.id) })); + }, + + async listKarSakhteTypes(s) { + const types = new Map(); + for (const r of listOf(await call(s, 'listKarSakhte'))) { + if (r.fkNoe !== undefined) types.set(String(r.fkNoe), str(r.NoeName) ?? String(r.fkNoe)); + } + return [...types].map(([id, name]) => ({ id, name })); + }, + + async listKarSakhte(s) { + return listOf(await call(s, 'listKarSakhte')) + .filter((r) => r.id !== undefined && str(r.namFelezsakhthe)) + .map((r) => ({ + code: String(r.id), + name: str(r.namFelezsakhthe) as string, + // listKarSakhte carries the item's type (گرمی/تعدادی…) but not its + // group (النگو/انگشتر…); category stays the app's call (D27). + groupId: null, + groupName: null, + typeId: str(r.fkNoe), + typeName: str(r.NoeName), + saleWagePercent: dec(r.darsadForoosh), + stockWeight: dec(r.vazn), + stockCount: dec(r.tedad), + })); + }, + + async getKarSakhteStock(s, item) { + const d = dataOf(await call(s, 'mojoodiKala', { id: item.code, dateTa: toIsoDateTehran(new Date()) })); + const qty = dec(d.mojoodi); + const byWeight = /گرم/.test(String(d.noeName ?? 'گرمی')); + return { weight: byWeight ? qty : null, count: byWeight ? null : qty }; + }, + + async getKarSakhteMovement(s, from, to) { + return listOf(await call(s, 'infogardeshsakhte', { az: jalaliToIsoDate(from), ta: jalaliToIsoDate(to) })).map( + (r) => ({ + itemCode: str(r.code_kar), + itemName: str(r.nam_kar) ?? '—', + date: str(r.tarikh_akharin_gardesh) ?? '', + description: str(r.sharh_akharin_gardesh), + weight: dec(r.vazn_akharin_gardesh), + amount: dec(r.mablagh_akharin_gardesh), + count: null, + }), + ); + }, + + async createKarSakhte(s, item) { + const json = (await call(s, 'addFelezsakhteModel', { + nameKar: item.name, + noeKar: item.typeId, + gorooheKar: item.groupId, + })) as Record; + const id = json.idKar ?? dataOf(json).idKar; + if (id === undefined || id === null) throw new AccountingProviderError('زرین: کد کارساخته‌ی جدید برنگشت', false, json); + return { code: String(id), response: json }; + }, + + async postOrderDocument(s, doc, progress, onProgress) { + let factorId = progress.factorId; + let done = progress.doneLines ?? 0; + let last: unknown = null; + + for (let i = done; i < doc.lines.length; i += 1) { + const line = doc.lines[i]; + const isLast = i === doc.lines.length - 1; + last = await call(s, 'foroushSakhte', { + // The first call opens the invoice for the account; the rest append. + ...(factorId ? { idFactor: factorId } : { idHesab: doc.customerCode }), + idSakhte: line.itemCode, + // Bonak mode: mablagh is the rial charge, darsad the per-gram making charge. + mablagh: line.flatRial.toFixed(0), + sharh: line.description, + vazn: line.weightGrams.toFixed(3), + vaznSang: 0, + mablaghSang: 0, + pd: -1, // پرداخت: goods leave to the customer + darsad: line.wagePercent.toString(), + // The invoice has to stay open while lines are still to come; the last + // line closes it unless the document is to stay temporary (D27: it is). + movaghat: doc.temporary || !isLast ? 1 : 0, + bonak: 1, + }); + const id = (dataOf(last).idFactor ?? (last as Record).idFactor) as unknown; + if (!factorId) { + if (id === undefined || id === null) throw new AccountingProviderError('زرین: شماره فاکتور برنگشت', true, last); + factorId = String(id); + } + done = i + 1; + await onProgress({ factorId, doneLines: done }); + } + + return { ref: String(factorId ?? ''), progress: { factorId, doneLines: done }, response: last }; + }, + + async documentExists() { + // No lookup by our own key exists in Zarrin's API. + return false; + }, + + async deleteDocument(s, doc) { + if (!doc.ref) throw new AccountingProviderError('زرین: شماره فاکتور سند معلوم نیست'); + // hazfRadifSanad needs a row id, which foroushSakhte never returned; find + // one in the account's ledger for the last year. + const today = new Date(); + const yearAgo = new Date(today.getTime() - 366 * 24 * 3600 * 1000); + const rows = listOf( + await call(s, 'parvande', { + id: doc.customerCode, + dateAz: toIsoDateTehran(yearAgo), + dateTa: toIsoDateTehran(today), + pageNum: 1, + detailCount: STATEMENT_PAGE, + }), + ); + const row = rows.find((r) => String(r.idFactor) === doc.ref && str(r.idRadif) && String(r.idRadif) !== '0'); + if (!row) return { response: { alreadyDeleted: true } }; + const json = await call(s, 'hazfRadifSanad', { + pkRadifSanad: String(row.idRadif), + kol: 1, + commentUser: 'لغو سفارش در اپ', + }); + return { response: json }; + }, +}; + +/** Exposed for tests. */ +export const __zarrinInternals = { listOf, fullJalali }; diff --git a/apps/api/src/modules/accounting-sync/secret-box.ts b/apps/api/src/modules/accounting-sync/secret-box.ts new file mode 100644 index 0000000..ed93abb --- /dev/null +++ b/apps/api/src/modules/accounting-sync/secret-box.ts @@ -0,0 +1,56 @@ +import { createCipheriv, createDecipheriv, createHash, randomBytes } from 'crypto'; +import { envOrNull } from '../../common/env'; + +/** + * Encrypts the accounting-software token at rest (D27). + * + * The token sits in the Setting table, so a database dump or a backup would + * otherwise hand out a live credential to the shop's books. AES-256-GCM with a + * key derived from `ACCOUNTING_SECRET_KEY`. + * + * When that variable is unset the key falls back to one derived from + * `JWT_SECRET`, with a loud warning at boot — the same "warn, don't refuse" + * trade-off D23 made — so an admin can configure the integration before ops + * add the variable. The cost: rotating JWT_SECRET then makes the stored token + * unreadable and the admin has to enter it again (the screen says so). + */ + +const PREFIX = 'enc:v1:'; + +export function secretKeySource(): 'ACCOUNTING_SECRET_KEY' | 'JWT_SECRET' | null { + if (envOrNull('ACCOUNTING_SECRET_KEY')) return 'ACCOUNTING_SECRET_KEY'; + if (envOrNull('JWT_SECRET')) return 'JWT_SECRET'; + return null; +} + +function key(): Buffer { + const material = envOrNull('ACCOUNTING_SECRET_KEY') ?? envOrNull('JWT_SECRET'); + if (!material) { + throw new Error('ACCOUNTING_SECRET_KEY تنظیم نشده است؛ ذخیره‌ی توکن حسابداری ممکن نیست.'); + } + return createHash('sha256').update(`goldbank-accounting:${material}`).digest(); +} + +export function sealSecret(plain: string): string { + const iv = randomBytes(12); + const cipher = createCipheriv('aes-256-gcm', key(), iv); + const body = Buffer.concat([cipher.update(plain, 'utf8'), cipher.final()]); + const tag = cipher.getAuthTag(); + return PREFIX + Buffer.concat([iv, tag, body]).toString('base64'); +} + +/** Null when the value cannot be decrypted (wrong key, tampered, malformed). */ +export function openSecret(sealed: string | null | undefined): string | null { + if (!sealed || !sealed.startsWith(PREFIX)) return null; + try { + const raw = Buffer.from(sealed.slice(PREFIX.length), 'base64'); + const iv = raw.subarray(0, 12); + const tag = raw.subarray(12, 28); + const body = raw.subarray(28); + const decipher = createDecipheriv('aes-256-gcm', key(), iv); + decipher.setAuthTag(tag); + return Buffer.concat([decipher.update(body), decipher.final()]).toString('utf8'); + } catch { + return null; + } +} diff --git a/apps/api/src/modules/accounting/accounting.controller.ts b/apps/api/src/modules/accounting/accounting.controller.ts index b6286e7..86692a8 100644 --- a/apps/api/src/modules/accounting/accounting.controller.ts +++ b/apps/api/src/modules/accounting/accounting.controller.ts @@ -2,34 +2,53 @@ import { Body, Controller, Get, Param, Post } from '@nestjs/common'; import { LedgerService } from './ledger.service'; import { PostGoldRepaymentDto } from './dto/post-gold-repayment.dto'; import { PostRialRepaymentDto } from './dto/post-rial-repayment.dto'; -import { Public } from '../auth/guards'; +import { RequirePermission } from '../auth/guards'; -@Public() // pre-existing unauthenticated endpoint; see Phase 1 notes +/** + * Ledger operations — admin only. + * + * These were `@Public()` until the security hotfix. That was faithful to the + * reference, where the whole admin route file is unauthenticated (the + * `auth:api` group wrapper is commented out at henza_server/routes/admin.php:12 + * and :272), but it contradicted decision D1 in docs/parity/DECISIONS.md, which + * confirms the target keeps its stricter auth. Four of these five routes WRITE + * to the ledger, so an anonymous caller could reconcile a balance or post and + * confirm a repayment. + * + * Rids follow the legacy vocabulary: reading a balance is a wallet read, + * repayments are financial documents, and confirming an entry is the existing + * document-confirm permission. + */ @Controller('accounting') export class AccountingController { constructor(private readonly ledger: LedgerService) {} @Get('customers/:customerId/balance') + @RequirePermission('wallet.list') getBalance(@Param('customerId') customerId: string) { return this.ledger.getBalance(customerId); } @Post('customers/:customerId/reconcile') + @RequirePermission('wallet.charge') reconcile(@Param('customerId') customerId: string) { return this.ledger.reconcileBalance(customerId); } @Post('repayments/gold') + @RequirePermission('document.create') postGoldRepayment(@Body() dto: PostGoldRepaymentDto) { return this.ledger.postGoldRepayment(dto); } @Post('repayments/rial') + @RequirePermission('document.create') postRialRepayment(@Body() dto: PostRialRepaymentDto) { return this.ledger.postRialRepayment(dto); } @Post('entries/:entryId/confirm') + @RequirePermission('document.list.confirm') confirmEntry(@Param('entryId') entryId: string) { return this.ledger.confirmEntry(entryId); } diff --git a/apps/api/src/modules/accounting/ledger.service.spec.ts b/apps/api/src/modules/accounting/ledger.service.spec.ts new file mode 100644 index 0000000..7d92f7a --- /dev/null +++ b/apps/api/src/modules/accounting/ledger.service.spec.ts @@ -0,0 +1,94 @@ +import { LedgerCurrency, LedgerDirection, OrderStatus, Prisma } from '@prisma/client'; +import { LedgerService } from './ledger.service'; + +/** + * ACC-03 / MON-04 — an order's debt follows its status, exactly as legacy's + * recomputed `Σ orders.input WHERE sts > 4`: owed once while delivered (to the + * expert or the customer), nothing otherwise, never twice. + */ +describe('LedgerService.syncOrderDebt', () => { + type Entry = { orderId: string; currency: LedgerCurrency; direction: LedgerDirection; amount: Prisma.Decimal; confirmed: boolean }; + + function build(order: { status: OrderStatus; totalGoldWeightGrams: string; flatRialCharge: string }) { + const entries: Entry[] = []; + const balance = { gold: new Prisma.Decimal(0), rial: new Prisma.Decimal(0) }; + const row = { id: 'o1', customerId: 'c1', ...order }; + const tx = { + order: { findUnique: jest.fn(async () => row) }, + ledgerEntry: { + create: jest.fn(async ({ data }: { data: Entry }) => { + entries.push(data); + return data; + }), + groupBy: jest.fn(async ({ where }: { where: { orderId: string; currency: LedgerCurrency } }) => { + const out: { direction: LedgerDirection; _sum: { amount: Prisma.Decimal } }[] = []; + for (const d of [LedgerDirection.DEBIT, LedgerDirection.CREDIT]) { + const hit = entries.filter((e) => e.orderId === where.orderId && e.currency === where.currency && e.direction === d && e.confirmed); + if (hit.length) out.push({ direction: d, _sum: { amount: hit.reduce((s, e) => s.add(e.amount), new Prisma.Decimal(0)) } }); + } + return out; + }), + }, + customer: { + update: jest.fn(async ({ data }: { data: { goldDebtGrams?: { increment: Prisma.Decimal }; fiatDebtRial?: { increment: Prisma.Decimal } } }) => { + if (data.goldDebtGrams) balance.gold = balance.gold.add(data.goldDebtGrams.increment); + if (data.fiatDebtRial) balance.rial = balance.rial.add(data.fiatDebtRial.increment); + }), + }, + }; + const service = new LedgerService(tx as never); + const move = async (status: OrderStatus) => { + row.status = status; + await service.syncOrderDebt('o1', tx as never); + }; + return { move, entries, balance }; + } + + it('posts the gold and rial debt once on delivery to the expert', async () => { + const t = build({ status: OrderStatus.PLACED, totalGoldWeightGrams: '10.5', flatRialCharge: '2000' }); + await t.move(OrderStatus.DELIVERED_TO_AGENT); + expect(t.balance.gold.toString()).toBe('10.5'); + expect(t.balance.rial.toString()).toBe('2000'); + expect(t.entries).toHaveLength(2); + }); + + it('never posts twice when the order reaches delivered again (the ACC-03 bug)', async () => { + const t = build({ status: OrderStatus.PLACED, totalGoldWeightGrams: '10.5', flatRialCharge: '0' }); + await t.move(OrderStatus.DELIVERED_TO_AGENT); + await t.move(OrderStatus.DELIVERED_TO_AGENT); + await t.move(OrderStatus.DELIVERED_TO_CUSTOMER); + expect(t.balance.gold.toString()).toBe('10.5'); + expect(t.entries).toHaveLength(1); + }); + + it('takes the debt off when the order goes back, and puts it back once', async () => { + const t = build({ status: OrderStatus.PLACED, totalGoldWeightGrams: '10.5', flatRialCharge: '0' }); + await t.move(OrderStatus.DELIVERED_TO_AGENT); + await t.move(OrderStatus.PREPARING); + expect(t.balance.gold.toString()).toBe('0'); + expect(t.entries[1].direction).toBe(LedgerDirection.CREDIT); + await t.move(OrderStatus.DELIVERED_TO_AGENT); + expect(t.balance.gold.toString()).toBe('10.5'); + }); + + it('posts the debt when an order goes straight to delivered-to-customer', async () => { + const t = build({ status: OrderStatus.PLACED, totalGoldWeightGrams: '3', flatRialCharge: '0' }); + await t.move(OrderStatus.DELIVERED_TO_CUSTOMER); + expect(t.balance.gold.toString()).toBe('3'); + }); + + it('a cancelled delivered order owes nothing', async () => { + const t = build({ status: OrderStatus.PLACED, totalGoldWeightGrams: '3', flatRialCharge: '500' }); + await t.move(OrderStatus.DELIVERED_TO_AGENT); + await t.move(OrderStatus.CANCELLED); + expect(t.balance.gold.toString()).toBe('0'); + expect(t.balance.rial.toString()).toBe('0'); + }); + + it('posts nothing for an order that was never delivered', async () => { + const t = build({ status: OrderStatus.PLACED, totalGoldWeightGrams: '3', flatRialCharge: '500' }); + await t.move(OrderStatus.ADMIN_APPROVED); + await t.move(OrderStatus.PREPARING); + expect(t.entries).toHaveLength(0); + }); +}); diff --git a/apps/api/src/modules/accounting/ledger.service.ts b/apps/api/src/modules/accounting/ledger.service.ts index 8bf68b8..d9df811 100644 --- a/apps/api/src/modules/accounting/ledger.service.ts +++ b/apps/api/src/modules/accounting/ledger.service.ts @@ -1,10 +1,15 @@ import { BadRequestException, Injectable, NotFoundException } from '@nestjs/common'; -import { LedgerCurrency, LedgerDirection, LedgerSourceType, Prisma, PrismaClient } from '@prisma/client'; +import { LedgerCurrency, LedgerDirection, LedgerSourceType, OrderStatus, Prisma, PrismaClient } from '@prisma/client'; import { GRAMS_PER_MESGHAL, STANDARD_KARAT_PER_MILLE } from '@gold-bank/shared-types'; import { PrismaService } from '../../prisma/prisma.service'; type Tx = Prisma.TransactionClient | PrismaClient; +const ZERO = new Prisma.Decimal(0); + +/** Legacy `sts > 4`: delivered to the expert (5) or to the customer (6). */ +const OWING_STATUSES: OrderStatus[] = [OrderStatus.DELIVERED_TO_AGENT, OrderStatus.DELIVERED_TO_CUSTOMER]; + export interface PostEntryInput { customerId: string; currency: LedgerCurrency; @@ -103,42 +108,56 @@ export class LedgerService { } /** - * Posts the dual-currency debt for a stock order once it reaches - * DELIVERED_TO_AGENT: GOLD_GRAM debt = order.totalGoldWeightGrams, RIAL debt - * = order.flatRialCharge. Both entries are self-confirming — the status - * transition itself is the confirming event (mirrors legacy sts>4, which - * first becomes true at sts=5 "تحویل مسئول فروش" / delivered to agent, not - * sts=6 delivered to customer). + * Brings an order's debt in line with its status — legacy's rule exactly. + * + * Legacy never "posted" order debt; it RECOMPUTED it + * (CustomerController::updateRemain): Σ orders.input WHERE sts > 4, i.e. an + * order owes its full weight (and its rial charge) while it is delivered — + * to the expert (5) or to the customer (6) — and nothing otherwise. So: + * - moving into a delivered status twice never counts twice (ACC-03 / + * MON-04: the old guard on `deliveredAt` let a second DELIVERED_TO_AGENT + * post the debt again); + * - going straight to DELIVERED_TO_CUSTOMER still creates the debt (the + * old trigger fired only on DELIVERED_TO_AGENT, so that order owed nothing); + * - moving back below delivered, or cancelling, takes it off again. + * + * It compares what the order SHOULD owe with the confirmed ORDER_STOCK + * entries already on it and posts only the difference, as a confirmed + * DEBIT or CREDIT — so it is idempotent and nothing is ever edited or + * deleted (the ledger stays append-only). Entries imported from legacy carry + * their orderId, so imported orders reconcile the same way. */ - async postOrderDebt(orderId: string, tx: Tx = this.prisma) { + async syncOrderDebt(orderId: string, tx: Tx = this.prisma) { const order = await tx.order.findUnique({ where: { id: orderId } }); if (!order) throw new NotFoundException('Order not found'); - await this.postEntry( - { - customerId: order.customerId, - currency: LedgerCurrency.GOLD_GRAM, - direction: LedgerDirection.DEBIT, - sourceType: LedgerSourceType.ORDER_STOCK, - amount: order.totalGoldWeightGrams, - orderId: order.id, - confirmed: true, - note: 'Gold-weight debt on delivery', - }, - tx, - ); + const owes = OWING_STATUSES.includes(order.status); + const targets: [LedgerCurrency, Prisma.Decimal, string][] = [ + [LedgerCurrency.GOLD_GRAM, owes ? new Prisma.Decimal(order.totalGoldWeightGrams) : ZERO, 'Gold-weight debt'], + [LedgerCurrency.RIAL, owes ? new Prisma.Decimal(order.flatRialCharge) : ZERO, 'Flat Rial charge (e.g. stones)'], + ]; + + for (const [currency, should, label] of targets) { + const posted = await tx.ledgerEntry.groupBy({ + by: ['direction'], + where: { orderId, currency, sourceType: LedgerSourceType.ORDER_STOCK, confirmed: true }, + _sum: { amount: true }, + }); + const sum = (d: LedgerDirection) => posted.find((p) => p.direction === d)?._sum.amount ?? ZERO; + const current = new Prisma.Decimal(sum(LedgerDirection.DEBIT)).sub(sum(LedgerDirection.CREDIT)); + const diff = should.sub(current); + if (diff.isZero()) continue; - if (new Prisma.Decimal(order.flatRialCharge).gt(0)) { await this.postEntry( { customerId: order.customerId, - currency: LedgerCurrency.RIAL, - direction: LedgerDirection.DEBIT, + currency, + direction: diff.gt(0) ? LedgerDirection.DEBIT : LedgerDirection.CREDIT, sourceType: LedgerSourceType.ORDER_STOCK, - amount: order.flatRialCharge, + amount: diff.abs(), orderId: order.id, confirmed: true, - note: 'Flat Rial charge (e.g. stones) on delivery', + note: owes ? `${label} — order delivered (${order.status})` : `${label} reversed — order moved to ${order.status}`, }, tx, ); diff --git a/apps/api/src/modules/admin-branches/admin-branches.service.ts b/apps/api/src/modules/admin-branches/admin-branches.service.ts index e96b18d..82cd20c 100644 --- a/apps/api/src/modules/admin-branches/admin-branches.service.ts +++ b/apps/api/src/modules/admin-branches/admin-branches.service.ts @@ -3,6 +3,7 @@ import { AdminRole, Prisma } from '@prisma/client'; import * as bcrypt from 'bcryptjs'; import { PrismaService } from '../../prisma/prisma.service'; import { TableService } from '../admin-table/table.service'; +import { NO_PASSWORD_YET_HASH } from '../auth/password-hash'; import type { TableQueryDto } from '../admin-table/table-query.dto'; /** @@ -327,7 +328,7 @@ export class AdminBranchesService { fullName, mobile: phone, // No password is set: the supervisor cannot sign in until one is issued. - passwordHash: '', + passwordHash: NO_PASSWORD_YET_HASH, role: AdminRole.WORKSHOP_SUPERVISOR, }, }); diff --git a/apps/api/src/modules/admin-cities/admin-cities.controller.ts b/apps/api/src/modules/admin-cities/admin-cities.controller.ts index ad729cc..cce6abe 100644 --- a/apps/api/src/modules/admin-cities/admin-cities.controller.ts +++ b/apps/api/src/modules/admin-cities/admin-cities.controller.ts @@ -16,7 +16,16 @@ export class AdminCitiesController { @HttpCode(200) async list() { const cities = await this.prisma.city.findMany({ orderBy: { name: 'asc' } }); - // legacy shape: { id, title } - return { rows: cities.map((c) => ({ id: c.id, title: c.name, province: c.province })) }; + // legacy shape: the cities row — { id, title, parent, percent, percent_aux }. + // `parent` lets the admin pickers draw legacy's tree (PERS-02). + return { + rows: cities.map((c) => ({ + id: c.id, + title: c.name, + parent: c.parentId, + percent: c.percent, + percent_aux: c.percentAux, + })), + }; } } diff --git a/apps/api/src/modules/admin-comments/admin-comments.service.ts b/apps/api/src/modules/admin-comments/admin-comments.service.ts index b2e289d..c141355 100644 --- a/apps/api/src/modules/admin-comments/admin-comments.service.ts +++ b/apps/api/src/modules/admin-comments/admin-comments.service.ts @@ -125,8 +125,9 @@ export class AdminCommentsService { customer: { id: c.customer.id, name: c.customer.fullName, - fname: c.customer.fullName, - lname: '', + // D0 — real name parts + fname: c.customer.firstName ?? c.customer.fullName, + lname: c.customer.lastName ?? '', mobile: c.customer.mobile, }, caj: c.createdAt, diff --git a/apps/api/src/modules/admin-customers/admin-customers.controller.ts b/apps/api/src/modules/admin-customers/admin-customers.controller.ts index 25c9d51..b7a35de 100644 --- a/apps/api/src/modules/admin-customers/admin-customers.controller.ts +++ b/apps/api/src/modules/admin-customers/admin-customers.controller.ts @@ -171,7 +171,13 @@ export class AdminCustomersController { @RequirePermission('persons.list.client.omde.edit') verify( @Body() - body: { customer_id: string; sts_verify_step_one?: number; sts_verify_step_two?: number }, + body: { + customer_id: string; + sts_verify_step_one?: number; + sts_verify_step_two?: number; + /** Optional, only read on a reject. */ + reason?: string | null; + }, ) { return this.customers.verify(body); } diff --git a/apps/api/src/modules/admin-customers/admin-customers.service.spec.ts b/apps/api/src/modules/admin-customers/admin-customers.service.spec.ts new file mode 100644 index 0000000..aa1e3e8 --- /dev/null +++ b/apps/api/src/modules/admin-customers/admin-customers.service.spec.ts @@ -0,0 +1,99 @@ +import { VerificationStep } from '@prisma/client'; +import { OTP_ONLY_PASSWORD_HASH } from '../auth/password-hash'; +import { AdminCustomersService } from './admin-customers.service'; + +/** + * Owner rulings 2026-10-07: + * - a reject stores REJECTED with an optional reason (it used to fall back to + * UNVERIFIED / STEP_ONE_SUBMITTED and leave no trace); + * - every value sits in its own column: no mobile in nationalCode, no '' + * password — an absent national code is NULL, an absent password is the + * explicit OTP-only marker. + */ +describe('AdminCustomersService', () => { + function build(current: Record = { id: 'c1', verificationStep: VerificationStep.STEP_ONE_SUBMITTED }) { + const writes: Record[] = []; + const tx = { + customer: { + update: jest.fn(async ({ data }: { data: Record }) => { + writes.push(data); + return { ...current, ...data }; + }), + create: jest.fn(async ({ data }: { data: Record }) => { + writes.push(data); + return { id: 'new', ...data }; + }), + findUnique: jest.fn(async () => current), + }, + }; + const prisma = { ...tx, $transaction: jest.fn(async (fn: (t: typeof tx) => unknown) => fn(tx)) }; + const accounting = { customerVerified: jest.fn(), customerChanged: jest.fn() }; + const sms = { send: jest.fn(async () => undefined) }; + const service = new AdminCustomersService(prisma as never, {} as never, sms as never, accounting as never); + return { service, writes, accounting }; + } + + describe('verify()', () => { + it('a step-one reject stores REJECTED with the reason and time', async () => { + const { service, writes } = build(); + await service.verify({ customer_id: 'c1', sts_verify_step_one: 3, reason: ' کارت ملی خوانا نیست ' }); + expect(writes[0]).toMatchObject({ + verificationStep: VerificationStep.REJECTED, + verificationRejectionReason: 'کارت ملی خوانا نیست', + }); + expect(writes[0].verificationRejectedAt).toBeInstanceOf(Date); + }); + + it('a step-two reject is REJECTED too, and the reason is optional', async () => { + const { service, writes } = build({ id: 'c1', verificationStep: VerificationStep.STEP_TWO_SUBMITTED }); + await service.verify({ customer_id: 'c1', sts_verify_step_two: 3 }); + expect(writes[0]).toMatchObject({ verificationStep: VerificationStep.REJECTED, verificationRejectionReason: null }); + }); + + it('accepting a rejected customer clears the reason', async () => { + const { service, writes } = build({ id: 'c1', verificationStep: VerificationStep.REJECTED }); + await service.verify({ customer_id: 'c1', sts_verify_step_one: 2 }); + expect(writes[0]).toEqual({ + verificationStep: VerificationStep.STEP_TWO_SUBMITTED, + verificationRejectionReason: null, + verificationRejectedAt: null, + }); + }); + + it('step-two accept verifies and tells accounting once', async () => { + const { service, writes, accounting } = build({ id: 'c1', verificationStep: VerificationStep.STEP_TWO_SUBMITTED }); + await service.verify({ customer_id: 'c1', sts_verify_step_two: 2 }); + expect(writes[0].verificationStep).toBe(VerificationStep.VERIFIED); + expect(accounting.customerVerified).toHaveBeenCalledTimes(1); + }); + + it('a reject never tells accounting', async () => { + const { service, accounting } = build({ id: 'c1', verificationStep: VerificationStep.STEP_TWO_SUBMITTED }); + await service.verify({ customer_id: 'c1', sts_verify_step_two: 3 }); + expect(accounting.customerVerified).not.toHaveBeenCalled(); + }); + }); + + describe('national code and password', () => { + it('create() without a national code or password stores NULL and the OTP-only marker', async () => { + const { service, writes } = build(); + await service.create({ fname: 'علی', lname: 'رضایی', mobile: '09120000000', percent: '3' }); + expect(writes[0].nationalCode).toBeNull(); + expect(writes[0].mobile).toBe('09120000000'); + expect(writes[0].passwordHash).toBe(OTP_ONLY_PASSWORD_HASH); + }); + + it('create() keeps a typed national code, digits normalised', async () => { + const { service, writes } = build(); + await service.create({ fname: 'علی', mobile: '09120000000', percent: '3', national_code: ' ۰۰۱۲۳۴۵۶۷۸ ' }); + expect(writes[0].nationalCode).toBe('0012345678'); + }); + + it('createSingle() never copies the mobile into nationalCode', async () => { + const { service, writes } = build(); + await service.createSingle({ fname: 'علی', mobile: '09120000000' }); + expect(writes[0].nationalCode).toBeNull(); + expect(writes[0].passwordHash).toBe(OTP_ONLY_PASSWORD_HASH); + }); + }); +}); diff --git a/apps/api/src/modules/admin-customers/admin-customers.service.ts b/apps/api/src/modules/admin-customers/admin-customers.service.ts index ae0af76..0b370dc 100644 --- a/apps/api/src/modules/admin-customers/admin-customers.service.ts +++ b/apps/api/src/modules/admin-customers/admin-customers.service.ts @@ -1,9 +1,14 @@ -import { BadRequestException, Injectable, NotFoundException } from '@nestjs/common'; +import { BadRequestException, Injectable, Logger, NotFoundException } from '@nestjs/common'; import { CustomerKind, Prisma, VerificationStep } from '@prisma/client'; import * as bcrypt from 'bcryptjs'; import { PrismaService } from '../../prisma/prisma.service'; import { TableService } from '../admin-table/table.service'; import type { TableQueryDto } from '../admin-table/table-query.dto'; +import { faToEn } from '../customer-auth/digits'; +import { OTP_ONLY_PASSWORD_HASH } from '../auth/password-hash'; +import { agentSalesWhere, customerSalesWhere } from '../sales-agent/agent-orders'; +import { SmsService } from '../sms/sms.service'; +import { AccountingHooksService } from '../accounting-sync/accounting-hooks.service'; /** * Wholesale ("عمده") customer lists — legacy views/customer/omde/*. @@ -64,14 +69,48 @@ export type OmdeScope = 'all' | 'banker' | 'shopkeeper' | 'non_verified' | 'arch * `sts_verify_step_one !== 2`, i.e. only an ACCEPTED first step unlocks them. * The new schema models one ordered enum, so these numbers are derived from it. */ +/** + * PERS-03: the birth date both customer forms collect (legacy bulkCustomer + * `birth_date`, singleCustomer `birth_day`). DateInput sends the Gregorian + * 'YYYY-MM-DD' of the Jalali date picked; stored at UTC midnight, as the + * import stores legacy's. undefined = not sent (leave as is), '' = cleared. + */ +function birthDateOrNull(raw: unknown): Date | null | undefined { + if (raw === undefined) return undefined; + if (raw === null || String(raw).trim() === '') return null; + const m = /^(\d{4})-(\d{1,2})-(\d{1,2})/.exec(String(raw).trim()); + const d = m ? new Date(Date.UTC(+m[1], +m[2] - 1, +m[3])) : null; + if (!d || d.getUTCMonth() !== +m![2] - 1 || d.getUTCFullYear() < 1900 || d > new Date()) { + throw new BadRequestException('تاریخ تولد معتبر نیست'); + } + return d; +} + +/** + * A national code as the operator typed it, digits normalised; empty -> null. + * The column is optional and unique (2026-10-07): an absent code is NULL, + * never the mobile or '' — two customers without one must not collide, and + * the column must only ever hold a national code. + */ +function nationalCodeOrNull(raw: unknown): string | null { + return faToEn(String(raw ?? '').trim()) || null; +} + function verifyStepOne(step: VerificationStep): number { switch (step) { case VerificationStep.UNVERIFIED: return 3; // rejected / not yet submitted case VerificationStep.STEP_ONE_SUBMITTED: return 1; // pending review - default: - // STEP_TWO_SUBMITTED and VERIFIED both imply step one was accepted + case VerificationStep.REJECTED: + // Must be explicit: falling into `default` would report 2 (accepted), + // and the view unlocks the order/account switches on step one === 2. + // Rejected customers keep them locked — legacy's step-one reject also + // set active = -1 (MajorCustomerController.php:116-117). + return 3; + case VerificationStep.STEP_TWO_SUBMITTED: + case VerificationStep.VERIFIED: + // both imply step one was accepted return 2; } } @@ -82,21 +121,57 @@ function verifyStepTwo(step: VerificationStep): number { return 1; // pending review case VerificationStep.VERIFIED: return 2; // accepted - default: + case VerificationStep.UNVERIFIED: + case VerificationStep.STEP_ONE_SUBMITTED: + case VerificationStep.REJECTED: return 3; // rejected / not reached } } @Injectable() export class AdminCustomersService { + private readonly logger = new Logger(AdminCustomersService.name); + constructor( private readonly prisma: PrismaService, private readonly table: TableService, + private readonly sms: SmsService, + private readonly accounting: AccountingHooksService, ) {} + /** + * The welcome SMS the reference sends after every new customer is created + * (AdminController.php:378-387). Byte-identical, including the line order and + * the trailing PWA link; the commented-out Android/iOS lines are not sent + * there and are not sent here. + * + * D20 — awaiting it would let a slow or unconfigured gateway hold up the + * HTTP response, and `send()` already swallows every error, so the result is + * only logged. The reference behaves the same way: `Sms::Send` is fired + * inline and its return value discarded, so a failed message never blocked + * the creation. + */ + private sendWelcomeSms(mobile: string, firstName: string, lastName: string) { + const body = + 'هنزا گلد\n' + + `همکار گرامی ${firstName} ${lastName}\n` + + `نام کاربری : ${mobile}\n` + + 'لینک pwa \n' + + 'https://app.henzagold.com'; + + void this.sms.send(mobile, body).catch((e: unknown) => { + // send() is documented never to throw; this is belt-and-braces so an + // unexpected rejection can never become an unhandled promise rejection. + this.logger.error(`Welcome SMS to ${mobile} failed: ${String(e)}`); + }); + } + private static readonly ALLOWED = [ 'id', 'fullName', + 'firstName', + 'lastName', + 'makingChargeOffsetPercent', 'mobile', 'nationalCode', 'cityId', @@ -120,8 +195,11 @@ export class AdminCustomersService { /** Translates legacy filter field names onto real schema paths. */ private static readonly FIELD_ALIASES: Record = { name: 'fullName', - fname: 'fullName', - lname: 'fullName', + // D0 — these now have real columns to point at. Sorting or filtering on + // the last name used to silently act on the whole name. + fname: 'firstName', + lname: 'lastName', + percent: 'makingChargeOffsetPercent', city_id: 'cityId', active: 'isActive', gram_level: 'goldCreditLimitGrams', @@ -196,7 +274,10 @@ export class AdminCustomersService { const aliased = this.applyAliases(query); const { where, orderBy, skip, take, page, limit } = this.table.build(aliased, { - searchable: ['fullName', 'mobile', 'nationalCode'], + // D0 — `fullName` is kept in sync by the trigger so it still matches, but + // the parts are searched too: a surname-only query is the common case and + // it must not depend on how the whole name happens to be spaced. + searchable: ['fullName', 'firstName', 'lastName', 'mobile', 'nationalCode'], allowed: AdminCustomersService.ALLOWED, defaultOrderBy: { createdAt: 'desc' }, }); @@ -227,10 +308,15 @@ export class AdminCustomersService { ) { return { id: c.id, - // Legacy stored fname/lname separately; the new schema has one fullName. + // D0 — the schema now has the real parts, as the reference always did + // (2020_10_01_120430_customers_table.php:18-19). Before this, the edit + // form showed the WHOLE name in the "first name" box and saved an empty + // last name. `firstName`/`lastName` are backfilled and kept in sync with + // `fullName` by the customer_sync_full_name trigger, so the fallbacks + // below only matter for a row written before the migration ran. name: c.fullName, - fname: c.fullName, - lname: '', + fname: c.firstName ?? c.fullName, + lname: c.lastName ?? '', mobile: c.mobile, national_code: c.nationalCode, city_id: c.cityId, @@ -241,18 +327,25 @@ export class AdminCustomersService { gram_level: c.goldCreditLimitGrams, remain: c.goldDebtGrams, rial_remain: c.fiatDebtRial, - // legacy `percent` came from the referring agent's commission rate - percent: c.referredByAgent?.wagePercent ?? null, + // D9 — legacy `percent` is a column ON THE CUSTOMER + // (customer_add.php:32), the per-customer making-charge offset. The port + // read the referring AGENT's commission rate instead, which is a + // different number entirely (CUST-02). The legacy key is kept so the + // ported table models and forms bind unchanged. + percent: c.makingChargeOffsetPercent, // legacy kept these as two INDEPENDENT switches — see toggleSts/toggleActive active: c.isActive ? 1 : -1, sts: c.canPlaceOrders ? 1 : -1, - sts_str: c.canPlaceOrders ? 'مجاز' : 'غیر مجاز', + // Legacy Customer::$STS labels (Customer.php:94-97). + sts_str: c.canPlaceOrders ? 'فعال' : 'عدم سفارش', type: kindToLegacyType(c.kind), type_str: CUSTOMER_TYPE_STR[c.kind], is_archive: c.isArchived ? 1 : 0, sts_verify_step_one: verifyStepOne(c.verificationStep), sts_verify_step_two: verifyStepTwo(c.verificationStep), verificationStep: c.verificationStep, + verification_rejection_reason: c.verificationRejectionReason, + verification_rejected_at: c.verificationRejectedAt, national_id_image: c.nationalIdImageUrl, business_license: c.businessLicenseUrl, shop_image: c.shopImageUrl, @@ -268,6 +361,9 @@ export class AdminCustomersService { zone: c.zone, pasazh_name: c.pasazhName, mcode: c.memberCode, + // Both legacy names: bulkCustomer reads birth_date, singleCustomer birth_day. + birth_date: c.birthDate ? c.birthDate.toISOString().slice(0, 10) : null, + birth_day: c.birthDate ? c.birthDate.toISOString().slice(0, 10) : null, }; } @@ -304,10 +400,16 @@ export class AdminCustomersService { const aliases: Record = { name: 'fullName', - lname: 'fullName', + // D0/D17 — real columns on AdminUser now, as on Customer. + fname: 'firstName', + lname: 'lastName', caj: 'createdAt', active: 'isActive', percent: 'wagePercent', + // D17 — these live on the related SalesExpertProfile, so the grid's two + // filters have to reach through the relation. + city_id: 'salesExpertProfile.cityId', + gram_level: 'salesExpertProfile.gramLevel', }; const mapField = (f?: string) => (f ? (aliases[f] ?? f) : f); @@ -326,8 +428,21 @@ export class AdminCustomersService { }; const { where, orderBy, skip, take, page, limit } = this.table.build(aliased, { - searchable: ['fullName', 'mobile'], - allowed: ['id', 'fullName', 'mobile', 'isActive', 'createdAt', 'wagePercent', 'role'], + searchable: ['fullName', 'firstName', 'lastName', 'mobile'], + allowed: [ + 'id', + 'fullName', + 'firstName', + 'lastName', + 'mobile', + 'isActive', + 'createdAt', + 'wagePercent', + 'role', + // D17 — the grid's «شهر» and «سطح اعتبار» filters. + 'salesExpertProfile.cityId', + 'salesExpertProfile.gramLevel', + ], defaultOrderBy: { createdAt: 'desc' }, }); @@ -341,7 +456,14 @@ export class AdminCustomersService { orderBy: orderBy as Prisma.AdminUserOrderByWithRelationInput, skip, take, - include: { branch: true, _count: { select: { referredCustomers: true } } }, + // D17 — a LEFT JOIN by nature in Prisma: an expert without a profile + // still comes back, with `salesExpertProfile` null, so a missing row + // degrades to empty cells rather than dropping the agent from the grid. + include: { + branch: true, + salesExpertProfile: { include: { city: true } }, + _count: { select: { referredCustomers: true } }, + }, }), this.prisma.adminUser.count({ where: scoped }), ]); @@ -350,32 +472,41 @@ export class AdminCustomersService { const mapped = await Promise.all( rows.map(async (r) => { const agg = await this.prisma.order.aggregate({ - where: { customer: { referredByAgentId: r.id } }, + where: agentSalesWhere(r.id), _sum: { totalGoldWeightGrams: true }, }); return { id: r.id, name: r.fullName, - fname: r.fullName, - lname: '', + // D0 requirement 7 — the real parts, as on Customer. This used to be + // `fname: r.fullName, lname: ''`, the same defect the customer forms had. + fname: r.firstName ?? r.fullName, + lname: r.lastName ?? '', mobile: r.mobile, - city_id: null, - city: null, + // D17 — real values now, so the grid's city column and its filter work. + // Null-safe: an expert with no profile row simply shows empty. + city_id: r.salesExpertProfile?.cityId ?? null, + city: r.salesExpertProfile?.city + ? { id: r.salesExpertProfile.city.id, title: r.salesExpertProfile.city.name } + : null, percent: r.wagePercent, grams_sell: agg._sum.totalGoldWeightGrams ?? 0, child: r._count.referredCustomers, active: r.isActive ? 1 : -1, sts: r.isActive ? 1 : -1, - sts_str: r.isActive ? 'مجاز' : 'غیر مجاز', + sts_str: r.isActive ? 'فعال' : 'عدم سفارش', caj: r.createdAt, uaj: r.createdAt, branch: r.branch ? { id: r.branch.id, name: r.branch.name } : null, - // Legacy columns an AdminUser has no counterpart for. - gram_level: null, + // D17 — from SalesExpertProfile. Null-safe for an expert with no row. + gram_level: r.salesExpertProfile?.gramLevel ?? null, + phone: r.salesExpertProfile?.phone ?? null, + ncode: r.salesExpertProfile?.nationalCode ?? null, + // Still genuinely absent: a sales expert is an AdminUser and has no + // ledger of its own, so it carries no gram or rial debt (D10). remain: null, rial_remain: null, - phone: null, - address: null, + address: r.address ?? null, }; }), ); @@ -405,14 +536,19 @@ export class AdminCustomersService { }); const orders = await this.prisma.order.findMany({ - where: { customer: { referredByAgentId: id } }, + // The orders credited to this expert (Order.salesAgentId) plus their own — + // the same set «میزان فروش» counts, so the list and the figure agree. + where: agentSalesWhere(id), orderBy: { createdAt: 'desc' }, take: 100, include: { customer: true }, }); const gramsSoldAgg = await this.prisma.order.aggregate({ - where: { customer: { referredByAgentId: id }, ...AdminCustomersService.SOLD }, + // Same figure as the experts list and legacy grams_sell: no status filter + // (CustomerController::updateGramSell). This screen used to count only + // delivered orders, so the same expert showed two different numbers. + where: agentSalesWhere(id), _sum: { totalGoldWeightGrams: true }, }); @@ -446,11 +582,6 @@ export class AdminCustomersService { }; } - /** Orders that reached debt-recognition, reused by reagentDetail(). */ - private static readonly SOLD: Prisma.OrderWhereInput = { - status: { in: ['DELIVERED_TO_AGENT', 'DELIVERED_TO_CUSTOMER'] }, - }; - /** * Legacy `POST single-customer` — the retail ("تک") customer list. * @@ -516,7 +647,13 @@ export class AdminCustomersService { * is generic enough to patch any Customer row, agent or otherwise. */ async createSingle(data: Record) { - const fullName = String(data.name ?? data.fname ?? '').trim(); + // D0 — store the parts when the caller sends them. This is the retail + // (storefront) form, which D13 puts out of scope for parity work; the name + // handling is corrected only so the shared Customer columns stay + // consistent, and no storefront behaviour changes. + const firstName = String(data.fname ?? data.name ?? '').trim(); + const lastName = String(data.lname ?? '').trim(); + const fullName = [firstName, lastName].filter(Boolean).join(' '); const mobile = String(data.mobile ?? data.phone ?? '').trim(); if (!fullName || !mobile) { @@ -526,10 +663,14 @@ export class AdminCustomersService { return this.prisma.customer.create({ data: { fullName, + firstName: firstName || null, + lastName: lastName || null, mobile, - nationalCode: mobile, // schema requires it and it is unique; singleCustomer.vue collects no ncode - passwordHash: '', + // singleCustomer.vue collects no national code. + nationalCode: null, + passwordHash: OTP_ONLY_PASSWORD_HASH, cityId: (data.city_id as string) || null, + birthDate: birthDateOrNull(data.birth_day ?? data.birth_date) ?? null, kind: CustomerKind.RETAIL, }, }); @@ -545,14 +686,31 @@ export class AdminCustomersService { * (e.g. reg.vue, or a stale client) still sending type=1. */ async create(data: Record) { - const fullName = String(data.name ?? data.fname ?? '').trim(); - const mobile = String(data.mobile ?? '').trim(); - const nationalCode = String(data.national_code ?? data.nationalCode ?? '').trim(); + // D0 — the form posts fname and lname separately; store them separately. + // `name` is still accepted for the callers that only send a whole name. + const firstName = String(data.fname ?? data.name ?? '').trim(); + const lastName = String(data.lname ?? '').trim(); + const fullName = [firstName, lastName].filter(Boolean).join(' '); + // D19 gap 2 — the reference normalises the submitted mobile with + // Utility::faTOen before storing it (AdminController.php:333,364). Without + // this, an operator typing ۰۹۱۲… stores Persian digits and that customer + // can never log in: the app's own faToEn turns the typed number into ASCII + // and the lookup misses. + const mobile = faToEn(String(data.mobile ?? '').trim()); + const nationalCode = nationalCodeOrNull(data.national_code ?? data.nationalCode); if (!fullName || !mobile) { throw new BadRequestException('نام و موبایل الزامی است'); } + // D9 — the reference makes `percent` required on create + // (AdminController.php:354) with the stock Laravel message, and its + // attribute has no Persian translation, so the text is verbatim what the + // reference produces. + if (data.percent === undefined || data.percent === null || data.percent === '') { + throw new BadRequestException('وارد کردن percent الزامی است'); + } + const kind = legacyTypeToKind(data.type) ?? CustomerKind.APP_SHOPKEEPER; if (kind === CustomerKind.SALES_AGENT) { throw new BadRequestException( @@ -560,16 +718,22 @@ export class AdminCustomersService { ); } - return this.prisma.customer.create({ + const created = await this.prisma.customer.create({ data: { fullName, + firstName: firstName || null, + lastName: lastName || null, + // D9 — per-customer making-charge offset. Required above, so this is + // always a real value; the reference's own form default is 3 + // (AdminController.php:338) and is applied client-side. + makingChargeOffsetPercent: new Prisma.Decimal(String(data.percent)), mobile, - nationalCode: nationalCode || mobile, // schema requires it and it is unique + nationalCode, // The form collects a password (bulkCustomer.vue / ReagentCustomer.vue). // It used to be discarded and '' stored, so the operator typed a password - // that silently did nothing. Hashed here when supplied; '' still means - // "no password yet", which no bcrypt hash can ever match. - passwordHash: data.password ? await bcrypt.hash(String(data.password), 10) : '', + // that silently did nothing. Hashed here when supplied; otherwise the + // account signs in by OTP only. + passwordHash: data.password ? await bcrypt.hash(String(data.password), 10) : OTP_ONLY_PASSWORD_HASH, cityId: (data.city_id as string) ?? null, goldCreditLimitGrams: data.gram_level ? new Prisma.Decimal(String(data.gram_level)) @@ -583,6 +747,7 @@ export class AdminCustomersService { pasazhName: (data.pasazh_name as string) ?? null, zone: (data.zone as string) ?? null, memberCode: (data.mcode as string) ?? null, + birthDate: birthDateOrNull(data.birth_date ?? data.birth_day) ?? null, // legacy `image_id` from MyUpload's `ok` payload avatarFileId: (data.image_id as string) || null, // The three document photos the wholesale form collects. These were @@ -596,6 +761,13 @@ export class AdminCustomersService { referredByAgentId: (data.reagent_id as string) || null, }, }); + + // D19 gap 1 — the reference sends this only on CREATE, guarded by + // `if (!isset($input['id']))` (AdminController.php:378). Fire-and-forget, + // so the operator's save never waits on the gateway. + this.sendWelcomeSms(mobile, firstName, lastName); + + return created; } async update(id: string, data: Record) { @@ -603,9 +775,31 @@ export class AdminCustomersService { if (!existing) throw new NotFoundException('مشتری یافت نشد'); const patch: Prisma.CustomerUpdateInput = {}; - if (data.name !== undefined) patch.fullName = String(data.name); - if (data.mobile !== undefined) patch.mobile = String(data.mobile); - if (data.national_code !== undefined) patch.nationalCode = String(data.national_code); + + // D0 — write the parts, not a collapsed whole name. The + // customer_sync_full_name trigger rebuilds `fullName` from them, and when + // a caller sends both the parts win (see the migration's header). + if (data.fname !== undefined || data.lname !== undefined) { + const firstName = String(data.fname ?? existing.firstName ?? '').trim(); + const lastName = String(data.lname ?? existing.lastName ?? '').trim(); + patch.firstName = firstName || null; + patch.lastName = lastName || null; + } else if (data.name !== undefined) { + // Whole-name-only callers: the trigger derives the parts. + patch.fullName = String(data.name); + } + + // D9 — this was simply not handled, so editing it silently did nothing. + if (data.percent !== undefined && data.percent !== null && data.percent !== '') { + patch.makingChargeOffsetPercent = new Prisma.Decimal(String(data.percent)); + } + + // D19 gap 2 — same normalisation as create(). The reference discards the + // submitted mobile entirely on edit (AdminController.php:348); D19 ruled + // that lock NOT ported, so the field stays editable here and is normalised + // instead. Logged in ISSUES as PERS-01. + if (data.mobile !== undefined) patch.mobile = faToEn(String(data.mobile)); + if (data.national_code !== undefined) patch.nationalCode = nationalCodeOrNull(data.national_code); if (data.city_id !== undefined) { patch.city = data.city_id ? { connect: { id: String(data.city_id) } } : { disconnect: true }; } @@ -630,6 +824,8 @@ export class AdminCustomersService { if (data.pasazh_name !== undefined) patch.pasazhName = String(data.pasazh_name); if (data.zone !== undefined) patch.zone = String(data.zone); if (data.mcode !== undefined) patch.memberCode = String(data.mcode); + const birthDate = birthDateOrNull(data.birth_date !== undefined ? data.birth_date : data.birth_day); + if (birthDate !== undefined) patch.birthDate = birthDate; if (data.reagent_id !== undefined) { patch.referredByAgent = data.reagent_id ? { connect: { id: String(data.reagent_id) } } @@ -657,7 +853,16 @@ export class AdminCustomersService { patch.shopImageUrl = (data.shop_image as string) || null; } - return this.prisma.customer.update({ where: { id }, data: patch }); + // D27 — the fields the accounting account carries. A change to one of them + // is pushed to a linked account. + const contactChanged = ['fname', 'lname', 'name', 'mobile', 'national_code', 'phone', 'address'].some( + (k) => data[k] !== undefined, + ); + return this.prisma.$transaction(async (tx) => { + const updated = await tx.customer.update({ where: { id }, data: patch }); + if (contactChanged) await this.accounting.customerEdited(tx, id); + return updated; + }); } /** @@ -785,34 +990,57 @@ export class AdminCustomersService { * Legacy's payload is `{ customer_id, sts_verify_step_one }` or * `{ customer_id, sts_verify_step_two }`, where the value is 2 (accept) or * 3 (reject) — see OmdeList.vue acceptStepOne/rejectStepOne. Accepted here in - * exactly that shape so the ported view posts unchanged. + * exactly that shape so the ported view posts unchanged, plus an optional + * `reason` on a reject. + * + * A reject at either step records REJECTED with its reason and time (owner + * ruling 2026-10-07). It used to send the customer back to UNVERIFIED / + * STEP_ONE_SUBMITTED, so a rejection left no trace and looked like a + * customer who had simply not finished. Same rule as the legacy import: + * a rejected first OR second step is REJECTED (DATA-MIGRATION-MAP §5.5). + * Accepting again clears the reason. */ async verify(payload: { customer_id: string; sts_verify_step_one?: number; sts_verify_step_two?: number; + reason?: string | null; }) { const id = payload.customer_id; const c = await this.prisma.customer.findUnique({ where: { id } }); if (!c) throw new NotFoundException('مشتری یافت نشد'); - let next: VerificationStep; + const step = payload.sts_verify_step_one ?? payload.sts_verify_step_two; + if (step === undefined) throw new BadRequestException('مرحله‌ی تایید مشخص نشده است'); - if (payload.sts_verify_step_one !== undefined) { - next = - payload.sts_verify_step_one === 2 - ? VerificationStep.STEP_TWO_SUBMITTED // step one accepted -> step two pending - : VerificationStep.UNVERIFIED; // rejected - } else if (payload.sts_verify_step_two !== undefined) { - next = - payload.sts_verify_step_two === 2 - ? VerificationStep.VERIFIED - : VerificationStep.STEP_ONE_SUBMITTED; // rejected -> back to step one accepted + let data: Prisma.CustomerUpdateInput; + if (step === 2) { + data = { + verificationStep: + payload.sts_verify_step_one !== undefined + ? VerificationStep.STEP_TWO_SUBMITTED // step one accepted -> step two pending + : VerificationStep.VERIFIED, + verificationRejectionReason: null, + verificationRejectedAt: null, + }; } else { - throw new BadRequestException('مرحله‌ی تایید مشخص نشده است'); + data = { + verificationStep: VerificationStep.REJECTED, + verificationRejectionReason: String(payload.reason ?? '').trim() || null, + verificationRejectedAt: new Date(), + }; } + const next = data.verificationStep; - return this.prisma.customer.update({ where: { id }, data: { verificationStep: next } }); + return this.prisma.$transaction(async (tx) => { + const updated = await tx.customer.update({ where: { id }, data }); + // D27 — a verified customer gets an account in the accounting software + // (queued; searched by mobile first, so an existing account is linked). + if (next === VerificationStep.VERIFIED && c.verificationStep !== VerificationStep.VERIFIED) { + await this.accounting.customerVerified(tx, id); + } + return updated; + }); } /** Legacy `GET major/archive/{id}` — MajorCustomerController::archive. */ @@ -830,12 +1058,14 @@ export class AdminCustomersService { const c = await this.prisma.customer.findUnique({ where: { id } }); if (!c) throw new NotFoundException('مشتری یافت نشد'); - const [orderCount, openOrders, ledgerCount] = await Promise.all([ + const [orderCount, openOrders, ledgerCount, sold] = await Promise.all([ this.prisma.order.count({ where: { customerId: id } }), this.prisma.order.count({ where: { customerId: id, deliveredAt: null, status: { not: 'CANCELLED' } }, }), this.prisma.ledgerEntry.count({ where: { customerId: id } }), + // Legacy ViewOmdeCustomer «میزان فروش» (customers.grams_sell). + this.prisma.order.aggregate({ where: customerSalesWhere(id), _sum: { totalGoldWeightGrams: true } }), ]); return { @@ -845,6 +1075,7 @@ export class AdminCustomersService { gram_level: c.goldCreditLimitGrams, remain: c.goldDebtGrams, rial_remain: c.fiatDebtRial, + grams_sell: sold._sum.totalGoldWeightGrams ?? 0, }; } @@ -857,9 +1088,15 @@ export class AdminCustomersService { throw new BadRequestException('مقدار سطح اعتبار ارسال نشده است'); } - return this.prisma.customer.update({ - where: { id }, - data: { goldCreditLimitGrams: new Prisma.Decimal(data.gram_level) }, - }); + // D9 — `percent` was in this method's signature but was never written, so + // editing it from the row menu silently did nothing. + const patch: Prisma.CustomerUpdateInput = { + goldCreditLimitGrams: new Prisma.Decimal(data.gram_level), + }; + if (data.percent !== undefined && data.percent !== null && String(data.percent) !== '') { + patch.makingChargeOffsetPercent = new Prisma.Decimal(String(data.percent)); + } + + return this.prisma.customer.update({ where: { id }, data: patch }); } } diff --git a/apps/api/src/modules/admin-dashboard/admin-dashboard.service.ts b/apps/api/src/modules/admin-dashboard/admin-dashboard.service.ts index 6baf2f4..6cc96d7 100644 --- a/apps/api/src/modules/admin-dashboard/admin-dashboard.service.ts +++ b/apps/api/src/modules/admin-dashboard/admin-dashboard.service.ts @@ -1,6 +1,7 @@ import { Injectable } from '@nestjs/common'; import { OrderStatus, Prisma } from '@prisma/client'; import { PrismaService } from '../../prisma/prisma.service'; +import { agentSalesWhere } from '../sales-agent/agent-orders'; /** * Dashboards — legacy views/DashboardECommerce.vue (`GET get-analytics`) and @@ -217,7 +218,7 @@ export class AdminDashboardService { where: { AND: [ AdminDashboardService.SOLD, - { customer: { referredByAgentId: a.id } }, + agentSalesWhere(a.id), { createdAt: { gte: since30 } }, ], }, diff --git a/apps/api/src/modules/admin-documents/admin-documents.service.ts b/apps/api/src/modules/admin-documents/admin-documents.service.ts index 1f08ed3..160809f 100644 --- a/apps/api/src/modules/admin-documents/admin-documents.service.ts +++ b/apps/api/src/modules/admin-documents/admin-documents.service.ts @@ -3,6 +3,7 @@ import { LedgerCurrency, LedgerDirection, LedgerSourceType, Prisma } from '@pris import { PrismaService } from '../../prisma/prisma.service'; import { TableService } from '../admin-table/table.service'; import { LedgerService } from '../accounting/ledger.service'; +import { SmsService } from '../sms/sms.service'; import type { TableQueryDto } from '../admin-table/table-query.dto'; /** @@ -62,6 +63,7 @@ export class AdminDocumentsService { private readonly prisma: PrismaService, private readonly table: TableService, private readonly ledger: LedgerService, + private readonly sms: SmsService, ) {} private static readonly ALLOWED = [ @@ -182,8 +184,9 @@ export class AdminDocumentsService { customer: { id: e.customer.id, name: e.customer.fullName, - fname: e.customer.fullName, - lname: '', + // D0 — real name parts + fname: e.customer.firstName ?? e.customer.fullName, + lname: e.customer.lastName ?? '', mobile: e.customer.mobile, }, posted_by: e.postedByAdminUser ? e.postedByAdminUser.fullName : null, @@ -312,6 +315,7 @@ export class AdminDocumentsService { if (!e.confirmed) { await this.ledger.confirmEntry(id, adminUserId); + this.notifyDocumentConfirm(e.customerId, true); return this.findOne(id); } @@ -334,9 +338,24 @@ export class AdminDocumentsService { }); }); + this.notifyDocumentConfirm(e.customerId, false); return this.findOne(id); } + // Legacy CashController::toggleConfiremCash sent an SMS on both outcomes. + private notifyDocumentConfirm(customerId: string, confirmed: boolean) { + const text = confirmed + ? 'هنزا گلد\nسند مالی شما توسط مدیر سیستم تایید شد.' + : 'هنزا گلد\nسند مالی شما توسط مدیر سیستم رد شد.'; + + this.prisma.customer + .findUnique({ where: { id: customerId }, select: { mobile: true } }) + .then((c) => { + if (c) this.sms.send(c.mobile, text); + }) + .catch(() => {}); + } + /** * Legacy `DELETE cash/{id}`. * @@ -432,8 +451,15 @@ export class AdminDocumentsService { const rows = await this.prisma.customer.findMany({ where: { isActive: true }, orderBy: { fullName: 'asc' }, - select: { id: true, fullName: true, mobile: true }, + select: { id: true, fullName: true, firstName: true, lastName: true, mobile: true }, }); - return rows.map((c) => ({ id: c.id, name: c.fullName, fname: c.fullName, lname: '', mobile: c.mobile })); + // D0 — real name parts. + return rows.map((c) => ({ + id: c.id, + name: c.fullName, + fname: c.firstName ?? c.fullName, + lname: c.lastName ?? '', + mobile: c.mobile, + })); } } diff --git a/apps/api/src/modules/admin-misc/admin-misc.cities.spec.ts b/apps/api/src/modules/admin-misc/admin-misc.cities.spec.ts new file mode 100644 index 0000000..5f85cde --- /dev/null +++ b/apps/api/src/modules/admin-misc/admin-misc.cities.spec.ts @@ -0,0 +1,59 @@ +import { BadRequestException } from '@nestjs/common'; +import { Prisma } from '@prisma/client'; +import { AdminMiscService } from './admin-misc.service'; + +/** Cities as a tree (PERS-02): legacy's percent inheritance and loop guard. */ +describe('AdminMiscService — city tree', () => { + type Row = { id: string; parentId: string | null; percent: Prisma.Decimal | null; percentAux: Prisma.Decimal | null }; + const D = (v: number) => new Prisma.Decimal(v); + let rows: Map; + let service: AdminMiscService; + let update: jest.Mock; + + beforeEach(() => { + // ایران > استان تهران > تهران > تهران شمال + rows = new Map( + [ + { id: 'iran', parentId: null, percent: null, percentAux: null }, + { id: 'prov', parentId: 'iran', percent: D(10.12), percentAux: D(10.12) }, + { id: 'teh', parentId: 'prov', percent: D(0), percentAux: D(8) }, + { id: 'north', parentId: 'teh', percent: null, percentAux: null }, + ].map((r) => [r.id, r]), + ); + update = jest.fn(async ({ where, data }) => ({ ...rows.get(where.id), ...data })); + const prisma = { + city: { + findUnique: jest.fn(async ({ where }) => rows.get(where.id) ?? null), + update, + }, + }; + service = new AdminMiscService(prisma as never, {} as never, {} as never); + }); + + it('a city without its own percent takes the nearest ancestor’s (legacy _getP)', async () => { + expect(String(await service.getCityPercent('north', true))).toBe('8'); + // 0 counts as "none", as legacy's `> 0`: تهران has 0, so استان تهران's. + expect(String(await service.getCityPercent('north', false))).toBe('10.12'); + }); + + it('0 when no ancestor has one', async () => { + expect(await service.getCityPercent('iran', false)).toBe(0); + }); + + it('refuses to put a city under its own descendant', async () => { + await expect(service.updateCity('teh', { parent: 'north' })).rejects.toBeInstanceOf(BadRequestException); + await expect(service.updateCity('teh', { parent: 'teh' })).rejects.toBeInstanceOf(BadRequestException); + expect(update).not.toHaveBeenCalled(); + }); + + it('moves a city and clears a parent', async () => { + await service.updateCity('north', { parent: 'prov' }); + expect(update).toHaveBeenLastCalledWith({ where: { id: 'north' }, data: { parentId: 'prov' } }); + await service.updateCity('north', { parent: '' }); + expect(update).toHaveBeenLastCalledWith({ where: { id: 'north' }, data: { parentId: null } }); + }); + + it('refuses an unknown parent', async () => { + await expect(service.updateCity('north', { parent: 'nope' })).rejects.toBeInstanceOf(BadRequestException); + }); +}); diff --git a/apps/api/src/modules/admin-misc/admin-misc.controller.ts b/apps/api/src/modules/admin-misc/admin-misc.controller.ts index f22f8e5..71338bf 100644 --- a/apps/api/src/modules/admin-misc/admin-misc.controller.ts +++ b/apps/api/src/modules/admin-misc/admin-misc.controller.ts @@ -13,6 +13,8 @@ import { AdminMiscService } from './admin-misc.service'; import { TableQueryDto } from '../admin-table/table-query.dto'; import { CurrentAdmin, RequirePermission } from '../auth/guards'; import type { AuthenticatedAdmin } from '../auth/jwt.strategy'; +import { isAccountingSettingKey } from '../accounting-sync/accounting-config'; +import { PRICING_SETTING_PREFIX } from '../pricing/wage.service'; /** * Cities, SMS, notifications, newsletter, activity log and settings — the @@ -33,7 +35,7 @@ export class AdminMiscController { @Post('cities') @HttpCode(200) @RequirePermission('cities.create') - createCity(@Body() data: { title?: string; name?: string; province?: string }) { + createCity(@Body() data: Record) { return this.misc.createCity(data); } @@ -227,7 +229,7 @@ export class AdminMiscController { // `custom.config.statics.slider`) simply by calling `const/mobile_main_slider` // directly, since the underlying Setting row is keyed the same either way. private assertNotSliderKey(key: string) { - if (key === 'mobile_main_slider') { + if (key === 'mobile_main_slider' || isAccountingSettingKey(key) || key.trim().toLowerCase().startsWith(PRICING_SETTING_PREFIX)) { throw new ForbiddenException('این تنظیم فقط از مسیر اختصاصی خود قابل دسترسی است'); } } diff --git a/apps/api/src/modules/admin-misc/admin-misc.service.ts b/apps/api/src/modules/admin-misc/admin-misc.service.ts index 332d753..d2de577 100644 --- a/apps/api/src/modules/admin-misc/admin-misc.service.ts +++ b/apps/api/src/modules/admin-misc/admin-misc.service.ts @@ -2,7 +2,10 @@ import { BadRequestException, Injectable, NotFoundException } from '@nestjs/comm import { MessageAudience, Prisma } from '@prisma/client'; import { PrismaService } from '../../prisma/prisma.service'; import { TableService } from '../admin-table/table.service'; +import { SmsService } from '../sms/sms.service'; import type { TableQueryDto } from '../admin-table/table-query.dto'; +import { ACCOUNTING_SETTING_PREFIX } from '../accounting-sync/accounting-config'; +import { PRICING_SETTING_PREFIX } from '../pricing/wage.service'; /** * The remaining admin screens — legacy views/city, views/sms, views/notify, @@ -21,17 +24,21 @@ export class AdminMiscService { constructor( private readonly prisma: PrismaService, private readonly table: TableService, + private readonly sms: SmsService, ) {} // ── Cities ───────────────────────────────────────────────────────── + // + // Legacy cities are a tree (country > province > city > district) and so are + // the target's again (PERS-02): each city may hang under a `parent`. /** Legacy `POST cities/list` grid. */ async listCities(query: TableQueryDto) { this.table.assertNotExport(query); const { where, orderBy, skip, take, page, limit } = this.table.build(query, { - searchable: ['name', 'province'], - allowed: ['id', 'name', 'province', 'percent', 'percentAux'], + searchable: ['name'], + allowed: ['id', 'name', 'parentId', 'percent', 'percentAux'], defaultOrderBy: { name: 'asc' }, }); @@ -41,7 +48,10 @@ export class AdminMiscService { orderBy: orderBy as Prisma.CityOrderByWithRelationInput, skip, take, - include: { _count: { select: { customers: true, branches: true } } }, + include: { + parent: { select: { id: true, name: true } }, + _count: { select: { customers: true, branches: true, children: true } }, + }, }), this.prisma.city.count({ where: where as Prisma.CityWhereInput }), ]); @@ -51,11 +61,13 @@ export class AdminMiscService { id: c.id, title: c.name, name: c.name, - province: c.province, + parent: c.parentId, + parent_title: c.parent?.name ?? null, percent: c.percent, percent_aux: c.percentAux, customers_count: c._count.customers, branches_count: c._count.branches, + children_count: c._count.children, })), total, query, @@ -64,33 +76,82 @@ export class AdminMiscService { ); } - /** Legacy `POST cities`. */ - async createCity(data: { title?: string; name?: string; province?: string }) { - const name = String(data.title ?? data.name ?? '').trim(); - if (!name) throw new BadRequestException('نام شهر الزامی است'); - return this.prisma.city.create({ data: { name, province: data.province ?? null } }); + /** + * The parent a create/update asks for: `parent` (legacy's field name) or + * `parent_id`; empty means top level. Refuses an unknown city, the city + * itself, or one of its own descendants (that would make a loop). + */ + private async resolveCityParent( + data: { parent?: unknown; parent_id?: unknown }, + selfId?: string, + ): Promise { + const raw = data.parent !== undefined ? data.parent : data.parent_id; + if (raw === undefined) return undefined; + if (raw === null || String(raw).trim() === '') return null; + const parentId = String(raw).trim(); + + // Walk up from the requested parent; meeting selfId means a loop. + let cur: string | null = parentId; + for (let guard = 0; cur && guard < 50; guard++) { + if (cur === selfId) throw new BadRequestException('شهر نمی‌تواند زیرمجموعه‌ی خودش باشد.'); + const row: { parentId: string | null } | null = await this.prisma.city.findUnique({ + where: { id: cur }, + select: { parentId: true }, + }); + if (!row) { + if (cur === parentId) throw new BadRequestException('والد انتخاب‌شده پیدا نشد.'); + break; + } + cur = row.parentId; + } + return parentId; } - /** Legacy `PUT cities/{id}` — the grid's inline edit also sets the percents. */ + private static cityPercent(v: unknown): Prisma.Decimal | null | undefined { + if (v === undefined) return undefined; + if (v === null || String(v).trim() === '') return null; + try { + return new Prisma.Decimal(String(v)); + } catch { + throw new BadRequestException('درصد باید عدد باشد.'); + } + } + + /** Legacy `POST cities` — name, parent and the two percents. */ + async createCity(data: { title?: string; name?: string; parent?: unknown; parent_id?: unknown; percent?: unknown; percent_aux?: unknown }) { + const name = String(data.title ?? data.name ?? '').trim(); + if (!name) throw new BadRequestException('نام شهر الزامی است'); + const parentId = await this.resolveCityParent(data); + return this.prisma.city.create({ + data: { + name, + parentId: parentId ?? null, + percent: AdminMiscService.cityPercent(data.percent) ?? null, + percentAux: AdminMiscService.cityPercent(data.percent_aux) ?? null, + }, + }); + } + + /** Legacy `PUT cities/{id}` — name, parent and the two percents. */ async updateCity( id: string, - data: { title?: string; name?: string; province?: string; percent?: unknown; percent_aux?: unknown }, + data: { title?: string; name?: string; parent?: unknown; parent_id?: unknown; percent?: unknown; percent_aux?: unknown }, ) { const existing = await this.prisma.city.findUnique({ where: { id } }); if (!existing) throw new NotFoundException('شهر یافت نشد'); - const patch: Prisma.CityUpdateInput = {}; + const patch: Prisma.CityUncheckedUpdateInput = {}; if (data.title !== undefined || data.name !== undefined) { - patch.name = String(data.title ?? data.name); - } - if (data.province !== undefined) patch.province = data.province ?? null; - if (data.percent !== undefined) { - patch.percent = data.percent === null ? null : new Prisma.Decimal(String(data.percent)); - } - if (data.percent_aux !== undefined) { - patch.percentAux = - data.percent_aux === null ? null : new Prisma.Decimal(String(data.percent_aux)); + const name = String(data.title ?? data.name ?? '').trim(); + if (!name) throw new BadRequestException('نام شهر الزامی است'); + patch.name = name; } + const parentId = await this.resolveCityParent(data, id); + if (parentId !== undefined) patch.parentId = parentId; + const percent = AdminMiscService.cityPercent(data.percent); + if (percent !== undefined) patch.percent = percent; + const percentAux = AdminMiscService.cityPercent(data.percent_aux); + if (percentAux !== undefined) patch.percentAux = percentAux; return this.prisma.city.update({ where: { id }, data: patch }); } @@ -98,16 +159,19 @@ export class AdminMiscService { /** * Legacy `DELETE cities/{id}`. * - * Refuses while customers or branches still point at the city — legacy deleted - * regardless, orphaning those rows. + * Refuses while customers, branches or child cities still point at the city — + * legacy deleted regardless, orphaning those rows. */ async removeCity(id: string) { const c = await this.prisma.city.findUnique({ where: { id }, - include: { _count: { select: { customers: true, branches: true, addresses: true } } }, + include: { _count: { select: { customers: true, branches: true, addresses: true, children: true } } }, }); if (!c) throw new NotFoundException('شهر یافت نشد'); + if (c._count.children > 0) { + throw new BadRequestException(`حذف این شهر ممکن نیست، چون ${c._count.children} شهر زیرمجموعه‌ی آن است.`); + } const refs = c._count.customers + c._count.branches + c._count.addresses; if (refs > 0) { throw new BadRequestException( @@ -118,11 +182,28 @@ export class AdminMiscService { return { success: true }; } - /** Legacy `GET cities/get-percent/{id}` — returns the bare number. */ + /** + * Legacy `GET cities/get-percent/{id}` — returns the bare number. As legacy's + * CitiesController::_getP: a city without its own percent (null or 0) takes + * its parent's, and so on up; 0 when no ancestor has one. + */ async getCityPercent(id: string, aux: boolean) { - const c = await this.prisma.city.findUnique({ where: { id } }); - if (!c) throw new NotFoundException('شهر یافت نشد'); - return aux ? c.percentAux : c.percent; + let cur: string | null = id; + for (let guard = 0; cur && guard < 50; guard++) { + const c: { parentId: string | null; percent: Prisma.Decimal | null; percentAux: Prisma.Decimal | null } | null = + await this.prisma.city.findUnique({ + where: { id: cur }, + select: { parentId: true, percent: true, percentAux: true }, + }); + if (!c) { + if (cur === id) throw new NotFoundException('شهر یافت نشد'); + break; + } + const v = aux ? c.percentAux : c.percent; + if (v !== null && v.gt(0)) return v; + cur = c.parentId; + } + return 0; } // ── SMS ──────────────────────────────────────────────────────────── @@ -166,12 +247,9 @@ export class AdminMiscService { } /** - * Legacy `POST sms` — records the send. - * - * NOTE no SMS gateway is wired up: legacy handed the message to an external - * provider, and this port has no credentials for one. The message is stored - * with the audience it resolved to, so the log is accurate, but nothing is - * actually transmitted. Flagged in docs/ADMIN-PORT-PLAN.md. + * Legacy `POST sms` — resolves the audience, substitutes `%name` per + * recipient (legacy SmsController::batch + replaceName), delivers via the + * configured gateway (D26 relay), and records the send. */ async sendSms( data: { type?: string | number; mobile?: string; text?: string }, @@ -183,6 +261,18 @@ export class AdminMiscService { const audience = this.resolveAudience(data.type); const recipients = await this.resolveRecipients(audience, data.mobile); + const needsNameSub = body.includes('%name'); + const customersByMobile = needsNameSub + ? await this.customerNamesByMobile(recipients) + : new Map(); + + for (const mobile of recipients) { + const text = needsNameSub + ? body.replace(/%name/g, customersByMobile.get(mobile) ?? 'مشتری عزیز') + : body; + this.sms.send(mobile, text, { audience }); + } + return this.prisma.smsMessage.create({ data: { audience, @@ -194,6 +284,18 @@ export class AdminMiscService { }); } + private async customerNamesByMobile(mobiles: string[]): Promise> { + const rows = await this.prisma.customer.findMany({ + where: { mobile: { in: mobiles } }, + select: { mobile: true, fullName: true }, + }); + const map = new Map(); + for (const r of rows) { + if (r.fullName) map.set(r.mobile, r.fullName + ' عزیز'); + } + return map; + } + /** * Legacy's numeric audience codes, read off views/sms/create.vue where each * option is gated by its own rid: @@ -477,7 +579,13 @@ export class AdminMiscService { } async listConsts() { - const rows = await this.prisma.setting.findMany({ orderBy: { key: 'asc' } }); + // The accounting integration's rows (connection, encrypted token, worker + // lease) have their own `config.accounting` screen and never appear here + // (D27); the single-key routes refuse them in the controller. + const rows = await this.prisma.setting.findMany({ + where: { AND: [{ NOT: { key: { startsWith: ACCOUNTING_SETTING_PREFIX } } }, { NOT: { key: { startsWith: PRICING_SETTING_PREFIX } } }] }, + orderBy: { key: 'asc' }, + }); return rows.map((r) => ({ key: r.key, value: r.value, updated_at: r.updatedAt })); } diff --git a/apps/api/src/modules/admin-orders/admin-orders.module.ts b/apps/api/src/modules/admin-orders/admin-orders.module.ts index bf089ed..ded9abb 100644 --- a/apps/api/src/modules/admin-orders/admin-orders.module.ts +++ b/apps/api/src/modules/admin-orders/admin-orders.module.ts @@ -1,11 +1,12 @@ import { Module } from '@nestjs/common'; import { PrismaModule } from '../../prisma/prisma.module'; import { OrdersModule } from '../orders/orders.module'; +import { AccountingModule } from '../accounting/accounting.module'; import { AdminOrdersController } from './admin-orders.controller'; import { AdminOrdersService } from './admin-orders.service'; @Module({ - imports: [PrismaModule, OrdersModule], + imports: [PrismaModule, OrdersModule, AccountingModule], controllers: [AdminOrdersController], providers: [AdminOrdersService], }) diff --git a/apps/api/src/modules/admin-orders/admin-orders.service.ts b/apps/api/src/modules/admin-orders/admin-orders.service.ts index 3b43734..f42950a 100644 --- a/apps/api/src/modules/admin-orders/admin-orders.service.ts +++ b/apps/api/src/modules/admin-orders/admin-orders.service.ts @@ -3,7 +3,9 @@ import { OrderChannel, OrderStatus, Prisma } from '@prisma/client'; import { PrismaService } from '../../prisma/prisma.service'; import { TableService } from '../admin-table/table.service'; import type { TableQueryDto } from '../admin-table/table-query.dto'; +import { AccountingHooksService } from '../accounting-sync/accounting-hooks.service'; import { OrdersService } from '../orders/orders.service'; +import { LedgerService } from '../accounting/ledger.service'; import type { UpdateOrderStatusDto } from './update-status.dto'; /** @@ -40,6 +42,8 @@ export class AdminOrdersService { private readonly prisma: PrismaService, private readonly table: TableService, private readonly orders: OrdersService, + private readonly accounting: AccountingHooksService, + private readonly ledger: LedgerService, ) {} /** Fields the XTable filter bar and sorter may reference. */ @@ -129,8 +133,8 @@ export class AdminOrdersService { id: o.customer.id, // Legacy split names into fname/lname; the new schema has one fullName. // Both are exposed so ported templates binding either keep working. - fname: o.customer.fullName, - lname: '', + fname: o.customer.firstName ?? o.customer.fullName, + lname: o.customer.lastName ?? '', fullName: o.customer.fullName, phone: o.customer.mobile, }, @@ -220,11 +224,14 @@ export class AdminOrdersService { ); } - await this.prisma.$transaction([ - this.prisma.orderStatusEvent.deleteMany({ where: { orderId: id } }), - this.prisma.orderItem.deleteMany({ where: { orderId: id } }), - this.prisma.order.delete({ where: { id } }), - ]); + await this.prisma.$transaction(async (tx) => { + // D27 — a temporary document may already be in the books (the rule can + // post it at placement); withdraw it like a cancellation. + await this.accounting.orderCancelled(tx, id); + await tx.orderStatusEvent.deleteMany({ where: { orderId: id } }); + await tx.orderItem.deleteMany({ where: { orderId: id } }); + await tx.order.delete({ where: { id } }); + }); return { success: true }; } @@ -320,14 +327,21 @@ export class AdminOrdersService { }), ); - const order = await this.orders.createOrder({ - customerId: payload.customer_id, - items, - // The admin builder serves the omde (major/*) flow, so orders it creates - // belong to the wholesale channel — legacy wrote them to the `orders` - // table, which MajorOrderController::index listed. - channel: OrderChannel.WHOLESALE, - }); + // The customer id is now a separate argument rather than a body field, so + // the customer-facing route can take it from the caller's token (SEC-02). + // This path is different: an operator legitimately places an order FOR a + // customer, so it passes the one the builder selected. The route itself is + // admin-guarded, which is what makes that safe. + const order = await this.orders.createOrder( + { + items, + // The admin builder serves the omde (major/*) flow, so orders it creates + // belong to the wholesale channel — legacy wrote them to the `orders` + // table, which MajorOrderController::index listed. + channel: OrderChannel.WHOLESALE, + }, + payload.customer_id, + ); // legacy `sts`: advance the new order to the chosen delivery status. const target = this.statusFromLegacyCode(payload.sts); @@ -359,8 +373,8 @@ export class AdminOrdersService { * Legacy `POST single/order-sts/edit` — advance or remove a status. * * Setting a status delegates to OrdersService.updateStatus rather than writing - * the row here, because that method also posts the gold debt to the ledger at - * DELIVERED_TO_AGENT. Duplicating the update would silently skip that. + * the row here, because that method also keeps the order's debt in line with its status + * (syncOrderDebt). Duplicating the update would silently skip that. */ async setStatus(dto: UpdateOrderStatusDto, actorAdminUserId: string) { if (dto.remove) { @@ -372,35 +386,36 @@ export class AdminOrdersService { /** * Legacy's `remove: true` branch: drop a recorded status event. * - * Deliberately refuses to remove DELIVERED_TO_AGENT. In legacy, deleting that - * row left the posted debt ledger entries behind, so the customer stayed in - * debt for an order no longer marked delivered. Rather than reproduce a - * data-corrupting path, this rejects and explains — recorded in - * docs/ADMIN-PORT-PLAN.md. + * Any status may be removed, as in legacy (MajorOrderController.php:180-203), + * which stepped `sts` back and then RECOMPUTED the debt (updateRemain). The + * rollback below does the same through syncOrderDebt, so taking an order + * back below «تحویل به نماینده» takes its debt off, and nothing is left + * behind. (This used to be refused, on the belief that legacy left the debt + * in place; legacy recomputed it.) */ private async removeStatusEvent(orderId: string, status: OrderStatus) { - if (status === OrderStatus.DELIVERED_TO_AGENT) { - throw new BadRequestException( - 'حذف وضعیت «تحویل به نماینده» ممکن نیست، چون بدهی طلا در همین مرحله ثبت شده است.', - ); - } - const event = await this.prisma.orderStatusEvent.findFirst({ where: { orderId, toStatus: status }, orderBy: { createdAt: 'desc' }, }); if (!event) throw new NotFoundException('وضعیت مورد نظر یافت نشد'); - await this.prisma.orderStatusEvent.delete({ where: { id: event.id } }); + // One transaction: the event, the status and the debt move together or not at all. + return this.prisma.$transaction(async (tx) => { + await tx.orderStatusEvent.delete({ where: { id: event.id } }); - // Roll the order back to whatever status is now the latest recorded one. - const latest = await this.prisma.orderStatusEvent.findFirst({ - where: { orderId }, - orderBy: { createdAt: 'desc' }, - }); - return this.prisma.order.update({ - where: { id: orderId }, - data: { status: latest?.toStatus ?? OrderStatus.PLACED }, + // Roll the order back to whatever status is now the latest recorded one. + const latest = await tx.orderStatusEvent.findFirst({ + where: { orderId }, + orderBy: { createdAt: 'desc' }, + }); + const rolledBackTo = latest?.toStatus ?? OrderStatus.PLACED; + const updated = await tx.order.update({ where: { id: orderId }, data: { status: rolledBackTo } }); + // Legacy updateRemain after the step back: the debt follows the status. + await this.ledger.syncOrderDebt(orderId, tx); + // D27 — rolled back below the document rule: the پیش‌فاکتور is withdrawn. + await this.accounting.orderStatusReached(tx, orderId, rolledBackTo); + return updated; }); } } diff --git a/apps/api/src/modules/admin-preorders/admin-preorders.service.ts b/apps/api/src/modules/admin-preorders/admin-preorders.service.ts index e0229b2..d9e6b64 100644 --- a/apps/api/src/modules/admin-preorders/admin-preorders.service.ts +++ b/apps/api/src/modules/admin-preorders/admin-preorders.service.ts @@ -92,8 +92,9 @@ export class AdminPreOrdersService { workshop: p.workshop ? { id: p.workshop.id, name: p.workshop.name } : null, customer: { id: p.customer.id, - fname: p.customer.fullName, - lname: '', + // D0 — real name parts + fname: p.customer.firstName ?? p.customer.fullName, + lname: p.customer.lastName ?? '', name: p.customer.fullName, fullName: p.customer.fullName, mobile: p.customer.mobile, diff --git a/apps/api/src/modules/admin-products/admin-products.service.ts b/apps/api/src/modules/admin-products/admin-products.service.ts index 4a5cfbd..57d0b68 100644 --- a/apps/api/src/modules/admin-products/admin-products.service.ts +++ b/apps/api/src/modules/admin-products/admin-products.service.ts @@ -3,6 +3,7 @@ import { Prisma } from '@prisma/client'; import { PrismaService } from '../../prisma/prisma.service'; import { TableService } from '../admin-table/table.service'; import type { TableQueryDto } from '../admin-table/table-query.dto'; +import { AccountingHooksService } from '../accounting-sync/accounting-hooks.service'; /** * Product administration — legacy views/apps/product/* served by @@ -24,6 +25,7 @@ export class AdminProductsService { constructor( private readonly prisma: PrismaService, private readonly table: TableService, + private readonly accounting: AccountingHooksService, ) {} private static readonly ALLOWED = [ @@ -115,6 +117,11 @@ export class AdminProductsService { : null, // legacy grid slot reads `ProductImage` ProductImage: p.images.map((i) => ({ id: i.id, image: i.url, full: i.url, url: i.url })), + // D27 — stock as last read from the accounting software (null = not + // linked / never synced). + accounting_stock: p.accountingStockAt + ? { weight: p.accountingStockWeight, count: p.accountingStockCount, at: p.accountingStockAt } + : null, images: p.images.map((i) => ({ id: i.id, url: i.url, sortOrder: i.sortOrder, role: i.role })), // The order builder's grid reads `thumb.full` and `variants_all` directly // off each row, so both travel with the list as they did in legacy. Legacy's @@ -159,8 +166,16 @@ export class AdminProductsService { }); if (!p) throw new NotFoundException('محصول یافت نشد'); + // D27 — the form locks title/code of a linked product, and offers the + // accounting software's sale making charge as the default for new variants. + const link = await this.accounting.productLink(p.id); + const snapshot = (link?.snapshot ?? {}) as { saleWagePercent?: string | null }; + return { ...this.toRow(p), + accounting: link + ? { locked: true, code: link.externalCode, origin: link.origin, sale_wage_percent: snapshot.saleWagePercent ?? null } + : null, body_html: p.description, brand_id: p.brandId, cats: p.categoryId ? [p.categoryId] : [], @@ -446,6 +461,10 @@ export class AdminProductsService { } } + // D27 — create the matching کارساخته in the accounting software (queued; + // only where the software's API can create items). + await this.accounting.productCreated(this.prisma, created.id); + return this.findOne(created.id); } @@ -454,6 +473,21 @@ export class AdminProductsService { const existing = await this.prisma.product.findUnique({ where: { id } }); if (!existing) throw new NotFoundException('محصول یافت نشد'); + // D27 — title and code of a product linked to the accounting software are + // that software's; the form shows them locked. Re-posting the same values + // is fine, changing them is not. + const link = await this.accounting.productLink(id); + if (link) { + const titleChanged = data.title !== undefined && String(data.title).trim() !== existing.title; + const codeChanged = + data.product_code !== undefined && ((data.product_code as string) || null) !== existing.productCode; + if (titleChanged || codeChanged) { + throw new BadRequestException( + 'عنوان و کد این محصول از نرم‌افزار حسابداری می‌آید؛ برای تغییر، آن را در حسابداری ویرایش کنید.', + ); + } + } + const patch: Prisma.ProductUpdateInput = {}; if (data.title !== undefined) patch.title = String(data.title); if (data.body_html !== undefined) patch.description = String(data.body_html); diff --git a/apps/api/src/modules/admin-report/admin-report.controller.ts b/apps/api/src/modules/admin-report/admin-report.controller.ts new file mode 100644 index 0000000..7376b5e --- /dev/null +++ b/apps/api/src/modules/admin-report/admin-report.controller.ts @@ -0,0 +1,21 @@ +import { Controller, Get, Query } from '@nestjs/common'; +import { AdminReportService } from './admin-report.service'; +import { RequirePermission } from '../auth/guards'; + +/** + * Legacy `GET report/get-order-item-with-details` — a combined order-item + + * financial-document Excel export with 32 Persian-header columns, date-filtered. + */ +@Controller('admin/report') +export class AdminReportController { + constructor(private readonly report: AdminReportService) {} + + @Get('order-items') + @RequirePermission('report.order.item') + getOrderItemReport( + @Query('start_date') startDate?: string, + @Query('end_date') endDate?: string, + ) { + return this.report.getOrderItemReport(startDate, endDate); + } +} diff --git a/apps/api/src/modules/admin-report/admin-report.module.ts b/apps/api/src/modules/admin-report/admin-report.module.ts new file mode 100644 index 0000000..0495e86 --- /dev/null +++ b/apps/api/src/modules/admin-report/admin-report.module.ts @@ -0,0 +1,11 @@ +import { Module } from '@nestjs/common'; +import { PrismaModule } from '../../prisma/prisma.module'; +import { AdminReportController } from './admin-report.controller'; +import { AdminReportService } from './admin-report.service'; + +@Module({ + imports: [PrismaModule], + controllers: [AdminReportController], + providers: [AdminReportService], +}) +export class AdminReportModule {} diff --git a/apps/api/src/modules/admin-report/admin-report.service.ts b/apps/api/src/modules/admin-report/admin-report.service.ts new file mode 100644 index 0000000..c6ea7fb --- /dev/null +++ b/apps/api/src/modules/admin-report/admin-report.service.ts @@ -0,0 +1,221 @@ +import { BadRequestException, Injectable, StreamableFile } from '@nestjs/common'; +import { LedgerSourceType, Prisma } from '@prisma/client'; +import { PrismaService } from '../../prisma/prisma.service'; +import { toJalali, formatJalali } from '../accounting-sync/jalali'; +import * as ExcelJS from 'exceljs'; + +const TYPE_LABELS: Partial> = { + REPAYMENT_MELTED_GOLD: 'آب شده', + REPAYMENT_TRANSFER: 'حواله', + REPAYMENT_CHEQUE: 'چک', + REPAYMENT_CASH: 'پولی', +}; + +const REPAYMENT_TYPES: LedgerSourceType[] = [ + LedgerSourceType.REPAYMENT_MELTED_GOLD, + LedgerSourceType.REPAYMENT_TRANSFER, + LedgerSourceType.REPAYMENT_CHEQUE, + LedgerSourceType.REPAYMENT_CASH, +]; + +const HEADERS = [ + 'کد آیتم', + 'نام محصول', + 'کد محصول', + 'عنوان تنوع', + 'وزن خام تحویل مشتری', + 'وزن نهایی با درصد', + 'تعداد', + 'درصد', + 'اجرت ریالی', + 'توضیحات', + 'شماره سفارش', + 'تاریخ ثبت', + 'تاریخ', + 'سال', + 'ماه', + 'روز', + 'ساعت', + 'شماره سند', + 'نوع سند', + 'میزان پول', + 'میزان گرم', + 'وضعیت سند', + 'نام مشتری', + 'نام خانوادگی مشتری', + 'نام و نام خانوادگی مشتری', + 'کارشناس فروش', + 'شماره موبایل مشتری', + 'آدرس', + 'تلفن مغازه', + 'بدهکار', + 'بستانکار', + 'بدهی ریالی', +]; + +@Injectable() +export class AdminReportService { + constructor(private readonly prisma: PrismaService) {} + + async getOrderItemReport(startDate?: string, endDate?: string): Promise { + const dateFilter: Prisma.DateTimeFilter = {}; + if (startDate) dateFilter.gte = parseDate(startDate, 'از تاریخ'); + if (endDate) { + // The whole end day, as the on-screen report (admin-dashboard dateWhere). + const end = parseDate(endDate, 'تا تاریخ'); + end.setHours(23, 59, 59, 999); + dateFilter.lte = end; + } + const hasDateFilter = startDate || endDate; + + const orderItems = await this.prisma.orderItem.findMany({ + where: hasDateFilter ? { order: { createdAt: dateFilter } } : undefined, + orderBy: { id: 'desc' }, + include: { + order: { + include: { + customer: true, + salesAgent: true, + }, + }, + productVariant: { include: { product: true } }, + }, + }); + + const ledgerEntries = await this.prisma.ledgerEntry.findMany({ + where: { + sourceType: { in: REPAYMENT_TYPES }, + ...(hasDateFilter ? { createdAt: dateFilter } : {}), + }, + include: { customer: true }, + }); + + const wb = new ExcelJS.Workbook(); + const ws = wb.addWorksheet('گزارش', { + views: [{ rightToLeft: true }], + }); + + ws.columns = HEADERS.map((h) => ({ header: h, width: 18 })); + + for (const item of orderItems) { + const order = item.order; + const customer = order.customer; + const jalali = toJalali(order.createdAt); + const jalaliStr = formatJalali(jalali, '/'); + const hour = new Date(order.createdAt.getTime() + 3.5 * 60 * 60 * 1000) + .toISOString() + .slice(11, 16); + + // computedWeightGrams is ONE unit's weight (OrdersService.createOrder + // multiplies it by quantity for the order total), as legacy's order_items.w + // is. Legacy's export divided it by qty again, so every multi-unit line + // under-reported its weight; not repeated here. + const perUnitWeight = Number(item.computedWeightGrams); + // Legacy's «درصد» is the final percent: percent_pay − discount. + const finalPercent = Number(item.wagePercentSnapshot.sub(item.discountPercentSnapshot)); + + for (let i = 0; i < item.quantity; i++) { + ws.addRow([ + item.id, + item.productVariant?.product?.title ?? '', + item.productVariant?.product?.productCode ?? '', + item.productVariant?.title ?? '', + Number(item.rashWeightGramsSnapshot), + round4(perUnitWeight), + 1, + finalPercent, + Number(item.flatRialCharge), + '', + order.orderNumber, + jalaliStr, + jalaliStr, + jalali.jy, + jalali.jm, + jalali.jd, + hour, + null, + null, + null, + null, + null, + customer.firstName ?? '', + customer.lastName ?? '', + customer.fullName, + order.salesAgent?.fullName ?? '', + customer.mobile, + customer.address ?? '', + customer.phone ?? '', + round4(perUnitWeight), + 0, + Number(item.flatRialCharge), + ]); + } + } + + for (const entry of ledgerEntries) { + const customer = entry.customer; + const jalali = toJalali(entry.createdAt); + const jalaliStr = formatJalali(jalali, '/'); + const hour = new Date(entry.createdAt.getTime() + 3.5 * 60 * 60 * 1000) + .toISOString() + .slice(11, 16); + + const isCashOrCheque = + entry.sourceType === LedgerSourceType.REPAYMENT_CASH || + entry.sourceType === LedgerSourceType.REPAYMENT_CHEQUE; + const rialAmount = isCashOrCheque ? Number(entry.priceRial ?? 0) : 0; + const gramAmount = !isCashOrCheque ? Number(entry.amount) : 0; + + ws.addRow([ + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + entry.orderId ?? '', + jalaliStr, + jalaliStr, + jalali.jy, + jalali.jm, + jalali.jd, + hour, + entry.id, + TYPE_LABELS[entry.sourceType] ?? '', + rialAmount, + gramAmount, + entry.confirmed ? 'تایید شده' : 'تایید نشده', + customer.firstName ?? '', + customer.lastName ?? '', + customer.fullName, + null, + customer.mobile, + customer.address ?? '', + customer.phone ?? '', + 0, + gramAmount, + 0, + ]); + } + + const buffer = await wb.xlsx.writeBuffer(); + return new StreamableFile(Buffer.from(buffer), { + type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + disposition: 'attachment; filename="report.xlsx"', + }); + } +} + +function parseDate(v: string, field: string): Date { + const d = new Date(v); + if (Number.isNaN(d.getTime())) throw new BadRequestException(`${field}: تاریخ معتبر نیست`); + return d; +} + +function round4(n: number): number { + return Math.round(n * 10000) / 10000; +} diff --git a/apps/api/src/modules/admin-uploads/upload-path.ts b/apps/api/src/modules/admin-uploads/upload-path.ts index 32fbc25..afc3ada 100644 --- a/apps/api/src/modules/admin-uploads/upload-path.ts +++ b/apps/api/src/modules/admin-uploads/upload-path.ts @@ -1,5 +1,6 @@ import { existsSync, statSync } from 'node:fs'; import { basename, isAbsolute, join, relative, resolve } from 'node:path'; +import { envOr } from '../../common/env'; /** * Directory files are written to and served from. @@ -10,7 +11,7 @@ import { basename, isAbsolute, join, relative, resolve } from 'node:path'; * directory and the previous static root then 404'd every file. */ export function getUploadDir(): string { - return resolve(process.env.UPLOAD_DIR ?? join(process.cwd(), 'storage', 'uploads')); + return resolve(envOr('UPLOAD_DIR', join(process.cwd(), 'storage', 'uploads'))); } const UPLOAD_MIME: Record = { diff --git a/apps/api/src/modules/admin-users/admin-users.roles.spec.ts b/apps/api/src/modules/admin-users/admin-users.roles.spec.ts new file mode 100644 index 0000000..24c59b4 --- /dev/null +++ b/apps/api/src/modules/admin-users/admin-users.roles.spec.ts @@ -0,0 +1,31 @@ +import { AdminUsersService } from './admin-users.service'; + +/** SEC-07: a role's saved permissions are limited to rids the server knows. */ +describe('AdminUsersService.setRoles', () => { + let createMany: jest.Mock; + let service: AdminUsersService; + + beforeEach(() => { + createMany = jest.fn(); + const prisma = { + userType: { findUnique: jest.fn(async () => ({ id: 90, permissions: [] })) }, + permission: { deleteMany: jest.fn(), createMany }, + $transaction: jest.fn(async () => []), + }; + service = new AdminUsersService(prisma as never, {} as never, {} as never); + }); + + it('keeps catalogue rids and their tree parents, drops anything else', async () => { + await service.setRoles(90, [ + 'order.list', + 'order', // tree parent of order.list + 'persons', // tree parent of persons.* + 'notify.create.single.customer', // legacy tree leaf no route checks + 'made.up.permission', + 'order.list', // duplicate + '', + ]); + const rows = createMany.mock.calls[0][0].data.map((d: { rid: string }) => d.rid); + expect(rows.sort()).toEqual(['order', 'order.list', 'persons']); + }); +}); diff --git a/apps/api/src/modules/admin-users/admin-users.service.ts b/apps/api/src/modules/admin-users/admin-users.service.ts index abaca8d..2bd5d41 100644 --- a/apps/api/src/modules/admin-users/admin-users.service.ts +++ b/apps/api/src/modules/admin-users/admin-users.service.ts @@ -1,9 +1,23 @@ -import { BadRequestException, Injectable, NotFoundException } from '@nestjs/common'; +import { BadRequestException, Injectable, Logger, NotFoundException } from '@nestjs/common'; import { AdminRole, Prisma } from '@prisma/client'; import * as bcrypt from 'bcryptjs'; import { PrismaService } from '../../prisma/prisma.service'; import { TableService } from '../admin-table/table.service'; +import { AdminSessionService } from '../sessions/admin-session.service'; import type { TableQueryDto } from '../admin-table/table-query.dto'; +import { faToEn } from '../customer-auth/digits'; +import { ALL_RIDS } from '../auth/acl.constants'; + +/** + * SEC-07: the rids a role may hold — every rid in the catalogue and each of + * their tree parents ("persons", "order.omde", …), which the permission tree + * posts when a whole branch is ticked. + */ +const STORABLE_RIDS: ReadonlySet = new Set( + (ALL_RIDS as readonly string[]).flatMap((rid) => + rid.split('.').map((_, i, parts) => parts.slice(0, i + 1).join('.')), + ), +); /** * Admin users and the permission matrix — legacy views/user/*, served by @@ -20,9 +34,12 @@ import type { TableQueryDto } from '../admin-table/table-query.dto'; */ @Injectable() export class AdminUsersService { + private readonly logger = new Logger(AdminUsersService.name); + constructor( private readonly prisma: PrismaService, private readonly table: TableService, + private readonly sessions: AdminSessionService, ) {} private static readonly ALLOWED = [ @@ -93,13 +110,24 @@ export class AdminUsersService { private toRow( u: Prisma.AdminUserGetPayload<{ include: { userType: true; branch: true; avatarFile: true }; - }>, + }> & { + // D17 — present on the detail read; absent from the list query, hence optional. + salesExpertProfile?: { + cityId: string | null; + gramLevel: Prisma.Decimal; + phone: string | null; + nationalCode: string | null; + city?: { id: string; name: string } | null; + } | null; + }, ) { return { id: u.id, name: u.fullName, - fname: u.fullName, - lname: '', + // D0 requirement 7 — the real parts. The fallback only matters for a row + // written before the 20260922180000 migration backfilled them. + fname: u.firstName ?? u.fullName, + lname: u.lastName ?? '', mobile: u.mobile, role: u.role, ut: u.userTypeId, @@ -119,13 +147,28 @@ export class AdminUsersService { mcode: u.memberCode, image_id: u.avatarFileId, image: u.avatarFile ? { id: u.avatarFile.id, image: u.avatarFile.url } : null, + // D17 — from SalesExpertProfile. Null for a non-expert, and null-safe for + // an expert whose profile row is somehow missing. + city_id: u.salesExpertProfile?.cityId ?? null, + city: u.salesExpertProfile?.city + ? { id: u.salesExpertProfile.city.id, title: u.salesExpertProfile.city.name } + : null, + gram_level: u.salesExpertProfile?.gramLevel ?? null, + phone: u.salesExpertProfile?.phone ?? null, + ncode: u.salesExpertProfile?.nationalCode ?? null, }; } async findOne(id: string) { const u = await this.prisma.adminUser.findUnique({ where: { id }, - include: { userType: true, branch: true, avatarFile: true }, + // D17 — the edit form needs the sales-expert fields too. + include: { + userType: true, + branch: true, + avatarFile: true, + salesExpertProfile: { include: { city: true } }, + }, }); if (!u) throw new NotFoundException('کاربر یافت نشد'); return this.toRow(u); @@ -140,8 +183,16 @@ export class AdminUsersService { * کاربری") actually chosen. UserCreate.vue now always sends one. */ async create(data: Record) { - const fullName = String(data.name ?? data.fname ?? '').trim(); - const mobile = String(data.mobile ?? '').trim(); + // D0 requirement 7 — store the real name parts, as Customer does. `name` + // is still accepted for callers that only send a whole name. + const firstName = String(data.fname ?? data.name ?? '').trim(); + const lastName = String(data.lname ?? '').trim(); + const fullName = [firstName, lastName].filter(Boolean).join(' '); + // D19 gap 2 — normalise Persian digits, as the reference does with + // Utility::faTOen (AdminController.php:333,364). Done BEFORE the + // uniqueness lookup below: otherwise ۰۹۱۲… and 0912… are different strings + // and the same number could be registered twice. + const mobile = faToEn(String(data.mobile ?? '').trim()); const password = String(data.password ?? ''); const role = data.role as AdminRole | undefined; @@ -156,6 +207,8 @@ export class AdminUsersService { return this.prisma.adminUser.create({ data: { fullName, + firstName: firstName || null, + lastName: lastName || null, mobile, passwordHash: await bcrypt.hash(password, 10), role, @@ -173,20 +226,63 @@ export class AdminUsersService { pasazhName: (data.pasazh_name as string) || null, memberCode: (data.mcode as string) || null, avatarFileId: (data.image_id as string) || null, + // D17 — a sales expert always gets its profile row, so the grid's city + // and credit-limit columns have somewhere to read from immediately. + ...(role === 'SALES_EXPERT' + ? { salesExpertProfile: { create: this.salesExpertProfileData(data) } } + : {}), + }, + include: { + userType: true, + branch: true, + avatarFile: true, + salesExpertProfile: { include: { city: true } }, }, - include: { userType: true, branch: true, avatarFile: true }, }); } + /** + * The SalesExpertProfile columns as posted by ReagentCustomer.vue (D17). + * + * `phone` and `nationalCode` are stored exactly as the reference does: + * optional, not unique, no format rule — the reference validates only + * `mobile` and `percent` on this form (AdminController.php:354). + */ + private salesExpertProfileData(data: Record) { + return { + cityId: (data.city_id as string) || null, + gramLevel: + data.gram_level !== undefined && data.gram_level !== null && data.gram_level !== '' + ? new Prisma.Decimal(String(data.gram_level)) + : new Prisma.Decimal(0), + phone: (data.phone as string) || null, + nationalCode: (data.ncode as string) || null, + }; + } + /** Legacy `PUT users/{id}`. */ async update(id: string, data: Record) { const existing = await this.prisma.adminUser.findUnique({ where: { id } }); if (!existing) throw new NotFoundException('کاربر یافت نشد'); const patch: Prisma.AdminUserUpdateInput = {}; - if (data.name !== undefined) patch.fullName = String(data.name); + + // D0 requirement 7 — write the parts and let the + // admin_user_sync_full_name trigger rebuild `fullName`. When a caller sends + // both, the parts win (see the migration header). + if (data.fname !== undefined || data.lname !== undefined) { + const firstName = String(data.fname ?? existing.firstName ?? '').trim(); + const lastName = String(data.lname ?? existing.lastName ?? '').trim(); + patch.firstName = firstName || null; + patch.lastName = lastName || null; + } else if (data.name !== undefined) { + // Whole-name-only callers: the trigger derives the parts. + patch.fullName = String(data.name); + } + if (data.mobile !== undefined) { - const mobile = String(data.mobile); + // Normalised before the clash check, for the same reason as create(). + const mobile = faToEn(String(data.mobile)); if (mobile !== existing.mobile) { const clash = await this.prisma.adminUser.findUnique({ where: { mobile } }); if (clash) throw new BadRequestException('این شماره موبایل قبلاً ثبت شده است'); @@ -220,11 +316,60 @@ export class AdminUsersService { : { disconnect: true }; } - return this.prisma.adminUser.update({ + // D17 — the profile follows the role. + // + // `upsert` covers all three cases in one statement: a user becoming a sales + // expert gets a profile; an existing expert's profile is updated; and an + // expert whose profile went missing gets one back rather than erroring. + // A profile is never deleted when the role changes away — that would + // silently discard the operator's city and credit limit on a mistaken role + // switch, and it costs nothing to keep. + const effectiveRole = (patch.role as AdminRole | undefined) ?? existing.role; + const touchesProfile = + data.city_id !== undefined || + data.gram_level !== undefined || + data.phone !== undefined || + data.ncode !== undefined; + + if (effectiveRole === 'SALES_EXPERT' && (touchesProfile || patch.role !== undefined)) { + const profile = this.salesExpertProfileData(data); + patch.salesExpertProfile = { + upsert: { + create: profile, + // Only the keys the caller actually sent, so an untouched field is + // not overwritten with a default on a partial (diff-send) save. + update: { + ...(data.city_id !== undefined ? { cityId: profile.cityId } : {}), + ...(data.gram_level !== undefined ? { gramLevel: profile.gramLevel } : {}), + ...(data.phone !== undefined ? { phone: profile.phone } : {}), + ...(data.ncode !== undefined ? { nationalCode: profile.nationalCode } : {}), + }, + }, + }; + } + + const updated = await this.prisma.adminUser.update({ where: { id }, data: patch, - include: { userType: true, branch: true, avatarFile: true }, + include: { + userType: true, + branch: true, + avatarFile: true, + salesExpertProfile: { include: { city: true } }, + }, }); + + // Disabling an account or changing its password used to leave every already + // issued token working for up to 12h. With session tracking on, those tokens + // end here; with it off, nothing happens and the behaviour is as before. + if (patch.isActive === false || patch.passwordHash !== undefined) { + await this.sessions.revokeAllForAdmin( + id, + patch.isActive === false ? 'account_disabled' : 'password_changed', + ); + } + + return updated; } /** @@ -318,7 +463,15 @@ export class AdminUsersService { const type = await this.prisma.userType.findUnique({ where: { id: userTypeId } }); if (!type) throw new NotFoundException('سطح دسترسی یافت نشد'); - const clean = [...new Set((rids ?? []).map((r) => String(r)).filter(Boolean))]; + const posted = [...new Set((rids ?? []).map((r) => String(r).trim()).filter(Boolean))]; + // SEC-07: only rids the server knows are stored. The rest grant nothing — + // most are legacy tree leaves no route checks (e.g. notify.create.single.*) + // — so they are dropped rather than failing the whole save. + const clean = posted.filter((r) => STORABLE_RIDS.has(r)); + const dropped = posted.filter((r) => !STORABLE_RIDS.has(r)); + if (dropped.length) { + this.logger.warn(`setRoles(${userTypeId}): ignored ${dropped.length} unknown rid(s): ${dropped.slice(0, 20).join(', ')}`); + } await this.prisma.$transaction([ this.prisma.permission.deleteMany({ where: { userTypeId } }), diff --git a/apps/api/src/modules/auth/acl.constants.ts b/apps/api/src/modules/auth/acl.constants.ts index f09825f..e154f99 100644 --- a/apps/api/src/modules/auth/acl.constants.ts +++ b/apps/api/src/modules/auth/acl.constants.ts @@ -32,6 +32,9 @@ export const ALL_RIDS = [ 'comment.state', 'comment.view', 'comment.view.edit', + // D27 — «اتصال حسابداری» (Tahesab / Zarrin). Not a legacy rid. + 'config.accounting', + 'config.wage', 'config.report', 'config.statics', 'config.statics.brand', diff --git a/apps/api/src/modules/auth/auth.controller.ts b/apps/api/src/modules/auth/auth.controller.ts index 248afd0..0c14795 100644 --- a/apps/api/src/modules/auth/auth.controller.ts +++ b/apps/api/src/modules/auth/auth.controller.ts @@ -1,4 +1,5 @@ -import { Body, Controller, Get, HttpCode, Post } from '@nestjs/common'; +import { Body, Controller, Get, Headers, HttpCode, Ip, Post, Query, Res } from '@nestjs/common'; +import type { Response } from 'express'; import { AuthService } from './auth.service'; import { LoginDto } from './dto/login.dto'; import { CurrentAdmin, Public } from './guards'; @@ -19,8 +20,46 @@ export class AuthController { @Public() @Post('login') @HttpCode(200) - login(@Body() dto: LoginDto) { - return this.authService.login(dto); + login(@Body() dto: LoginDto, @Ip() ip: string, @Headers('user-agent') userAgent?: string) { + // The IP is forwarded to the identity service (when delegation is on) so its + // per-IP rate limit applies to the real admin, not to this API server; both + // are also recorded on the session row when session tracking is on. + return this.authService.login(dto, ip, userAgent); + } + + @Public() + @Get('sso/start') + startSso(@Query('redirect_uri') redirectUri: string | undefined, @Res({ passthrough: true }) res: Response) { + const started = this.authService.beginBrowserSso(redirectUri); + if (!started) return { enabled: false, authorize_url: null }; + res.setHeader('Set-Cookie', started.cookie); + return { enabled: true, authorize_url: started.authorizeUrl }; + } + + @Public() + @Post('sso/callback') + @HttpCode(200) + ssoCallback( + @Body() body: { code?: string; state?: string }, + @Headers('cookie') cookieHeader: string | undefined, + @Ip() ip: string, + @Headers('user-agent') userAgent: string | undefined, + @Res({ passthrough: true }) res: Response, + ) { + res.setHeader('Set-Cookie', 'gb_admin_iam_sso=; HttpOnly; Path=/; Max-Age=0; SameSite=Lax'); + return this.authService.completeBrowserSso( + readCookie(cookieHeader, 'gb_admin_iam_sso'), + body.code ?? '', + body.state ?? '', + ip, + userAgent, + ); + } + + @Public() + @Get('sso/logout-url') + ssoLogoutUrl(@Query('return_url') returnUrl?: string) { + return { logout_url: this.authService.centralLogoutUrl(returnUrl) }; } /** Legacy `users/show` — the router guard's permission refresh. */ @@ -29,3 +68,12 @@ export class AuthController { return this.authService.showData(admin.id); } } + +function readCookie(header: string | undefined, name: string): string | null { + if (!header) return null; + for (const part of header.split(';')) { + const [key, ...rest] = part.trim().split('='); + if (key === name) return decodeURIComponent(rest.join('=')); + } + return null; +} diff --git a/apps/api/src/modules/auth/auth.module.ts b/apps/api/src/modules/auth/auth.module.ts index d71f978..1d2dde8 100644 --- a/apps/api/src/modules/auth/auth.module.ts +++ b/apps/api/src/modules/auth/auth.module.ts @@ -3,6 +3,7 @@ import { APP_GUARD } from '@nestjs/core'; import { JwtModule } from '@nestjs/jwt'; import { PassportModule } from '@nestjs/passport'; import { PrismaModule } from '../../prisma/prisma.module'; +import { envOr } from '../../common/env'; import { AuthController } from './auth.controller'; import { AuthService } from './auth.service'; import { JwtStrategy } from './jwt.strategy'; @@ -13,11 +14,15 @@ import { JwtAuthGuard, PermissionsGuard } from './guards'; PrismaModule, PassportModule, JwtModule.register({ - secret: process.env.JWT_SECRET ?? 'dev-only-insecure-secret', + // envOr, not `??`: docker-compose passes every optional variable as + // `${X:-}`, so an unconfigured one arrives as "" rather than undefined. + // An empty expiresIn makes jsonwebtoken throw on EVERY sign, which 500s + // admin login in Docker only. See DEPLOY-02. + secret: envOr('JWT_SECRET', 'dev-only-insecure-secret'), // jsonwebtoken types expiresIn as a template-literal union, which a plain // `string` from process.env does not satisfy; the cast is the documented escape. signOptions: { - expiresIn: (process.env.JWT_EXPIRES_IN ?? '12h') as `${number}h`, + expiresIn: envOr('JWT_EXPIRES_IN', '12h') as `${number}h`, }, }), ], diff --git a/apps/api/src/modules/auth/auth.service.spec.ts b/apps/api/src/modules/auth/auth.service.spec.ts new file mode 100644 index 0000000..070abe8 --- /dev/null +++ b/apps/api/src/modules/auth/auth.service.spec.ts @@ -0,0 +1,334 @@ +import { UnauthorizedException } from '@nestjs/common'; +import * as bcrypt from 'bcryptjs'; + +/** + * `@nestjs/jwt` v12 ships as ESM and this repo's jest does not transform + * node_modules, so importing AuthService would fail to load. The real class is + * never exercised here (the test injects its own stub), so replacing the module + * keeps the suite runnable without touching the shared jest config. + */ +jest.mock('@nestjs/jwt', () => ({ JwtService: class JwtService {} })); + +/** + * The real bcryptjs, with `compare` wrapped so a test can assert it was never + * reached. It calls straight through, so every other test still runs against + * the real implementation. (A namespace import's properties cannot be + * re-defined, so jest.spyOn is not an option here.) + */ +jest.mock('bcryptjs', () => { + const actual = jest.requireActual('bcryptjs'); + return { ...actual, compare: jest.fn(actual.compare) }; +}); + +import { AuthService, compareLocalHash, OTP_ONLY_PASSWORD_HASH } from './auth.service'; +import type { AdminSessionService } from '../sessions/admin-session.service'; +import { + IamInvalidCredentialsError, + IamMfaRequiredError, + IamService, + IamUnavailableError, +} from '../iam/iam.service'; + +/** + * Admin login with the identity service in the loop. + * + * The contract being locked down: with the feature off, login behaves exactly + * as before (one bcrypt compare, no network). With it on, an IAM problem must + * never block an admin who still has a valid local password. + */ +describe('AuthService login', () => { + const PASSWORD = 'Secret123!'; + let passwordHash: string; + + const adminRow = () => ({ + id: 'admin-1', + mobile: '09120000000', + fullName: 'مدیر سامانه', + role: 'admin', + userTypeId: 'ut-1', + branchId: 'br-1', + isActive: true, + passwordHash, + userType: { permissions: [{ rid: 10 }, { rid: 20 }] }, + }); + + /** Session tracking off — the shape of a deployment that does not use it. */ + const untrackedSessions = (): Partial => ({ + newTokenId: jest.fn().mockReturnValue(null), + record: jest.fn(), + }); + + const build = ( + iam: Partial, + user: unknown = adminRow(), + sessions: Partial = untrackedSessions(), + ) => { + const prisma = { + adminUser: { findUnique: jest.fn().mockResolvedValue(user) }, + }; + const jwt = { signAsync: jest.fn().mockResolvedValue('local.jwt.token') }; + + return { + service: new AuthService( + prisma as never, + jwt as never, + { browserBootstrapUrl: () => null, ...iam } as IamService, + sessions as AdminSessionService, + ), + prisma, + jwt, + sessions, + }; + }; + + const disabledIam = (): Partial => ({ + enabled: false, + allowsLocalFallback: true, + verifyCredentials: jest.fn(), + }); + + beforeAll(async () => { + passwordHash = await bcrypt.hash(PASSWORD, 8); + }); + + /* ─────────────── feature off: unchanged behaviour ─────────────── */ + + it('logs in with the local password and never calls the identity service', async () => { + const iam = disabledIam(); + const { service, jwt } = build(iam); + + const result = await service.login({ phone: '09120000000', password: PASSWORD }); + + expect(result.api_token).toBe('local.jwt.token'); + expect(result.roles).toEqual([{ rid: 10 }, { rid: 20 }]); + expect(jwt.signAsync).toHaveBeenCalledTimes(1); + expect(iam.verifyCredentials).not.toHaveBeenCalled(); + }); + + it('still rejects a wrong local password', async () => { + const { service } = build(disabledIam()); + + await expect( + service.login({ phone: '09120000000', password: 'wrong' }), + ).rejects.toBeInstanceOf(UnauthorizedException); + }); + + it('still rejects an inactive admin', async () => { + const { service } = build(disabledIam(), { ...adminRow(), isActive: false }); + + await expect( + service.login({ phone: '09120000000', password: PASSWORD }), + ).rejects.toBeInstanceOf(UnauthorizedException); + }); + + it('still rejects an unknown phone without leaking that it is unknown', async () => { + const { service } = build(disabledIam(), null); + + await expect( + service.login({ phone: '09129999999', password: PASSWORD }), + ).rejects.toThrow('نام کاربری یا رمز عبور اشتباه است'); + }); + + /* ─────────────── feature on ─────────────── */ + + it('accepts a password the identity service approves', async () => { + const verifyCredentials = jest.fn().mockResolvedValue({ sub: 'sub-1' }); + const { service } = build({ enabled: true, allowsLocalFallback: true, verifyCredentials }); + + // Deliberately not the local password: the IAM is the authority here + const result = await service.login({ phone: '09120000000', password: 'iam-side-password' }); + + expect(result.api_token).toBe('local.jwt.token'); + expect(verifyCredentials).toHaveBeenCalledWith('09120000000', 'iam-side-password', undefined); + }); + + it('forwards the end-user IP to the identity service', async () => { + const verifyCredentials = jest.fn().mockResolvedValue({ sub: 'sub-1' }); + const { service } = build({ enabled: true, allowsLocalFallback: true, verifyCredentials }); + + await service.login({ phone: '09120000000', password: 'x' }, '203.0.113.5'); + + expect(verifyCredentials).toHaveBeenCalledWith('09120000000', 'x', '203.0.113.5'); + }); + + /* ─────────────── the safety net ─────────────── */ + + it('falls back to the local password when the account is unknown there', async () => { + const verifyCredentials = jest + .fn() + .mockRejectedValue(new IamInvalidCredentialsError('invalid_credentials')); + const { service } = build({ enabled: true, allowsLocalFallback: true, verifyCredentials }); + + const result = await service.login({ phone: '09120000000', password: PASSWORD }); + + expect(result.api_token).toBe('local.jwt.token'); + }); + + it('falls back to the local password when the identity service is down', async () => { + const verifyCredentials = jest.fn().mockRejectedValue(new IamUnavailableError('down')); + const { service } = build({ enabled: true, allowsLocalFallback: true, verifyCredentials }); + + // The single most important guarantee: an IAM outage cannot lock admins out + const result = await service.login({ phone: '09120000000', password: PASSWORD }); + + expect(result.api_token).toBe('local.jwt.token'); + }); + + it('rejects a wrong password even when falling back', async () => { + const verifyCredentials = jest + .fn() + .mockRejectedValue(new IamInvalidCredentialsError('invalid_credentials')); + const { service } = build({ enabled: true, allowsLocalFallback: true, verifyCredentials }); + + await expect( + service.login({ phone: '09120000000', password: 'wrong' }), + ).rejects.toBeInstanceOf(UnauthorizedException); + }); + + /* ─────────────── exclusive mode ─────────────── */ + + it('refuses the local password in exclusive mode', async () => { + const verifyCredentials = jest + .fn() + .mockRejectedValue(new IamInvalidCredentialsError('invalid_credentials')); + const { service } = build({ enabled: true, allowsLocalFallback: false, verifyCredentials }); + + await expect( + service.login({ phone: '09120000000', password: PASSWORD }), + ).rejects.toBeInstanceOf(UnauthorizedException); + }); + + it('fails loudly in exclusive mode when the identity service is down', async () => { + const verifyCredentials = jest.fn().mockRejectedValue(new IamUnavailableError('down')); + const { service } = build({ enabled: true, allowsLocalFallback: false, verifyCredentials }); + + await expect( + service.login({ phone: '09120000000', password: PASSWORD }), + ).rejects.toThrow('سرویس هویت در دسترس نیست'); + }); + + /* ─────────────── revocable sessions ─────────────── */ + + it('signs the same token as before while session tracking is off', async () => { + const { service, jwt, sessions } = build(disabledIam()); + + await service.login({ phone: '09120000000', password: PASSWORD }); + + // No jti, no row: the previous behaviour, byte for byte + expect(jwt.signAsync).toHaveBeenCalledWith({ sub: 'admin-1', mobile: '09120000000' }); + expect(sessions.record).not.toHaveBeenCalled(); + }); + + it('records the issued token with the IAM session id when tracking is on', async () => { + const tracked: Partial = { + newTokenId: jest.fn().mockReturnValue('jti-1'), + record: jest.fn(), + }; + const verifyCredentials = jest.fn().mockResolvedValue({ sub: 'sub-1', sessionId: 'sid-1' }); + const { service, jwt } = build( + { enabled: true, allowsLocalFallback: true, verifyCredentials }, + adminRow(), + tracked, + ); + + await service.login({ phone: '09120000000', password: 'x' }, '203.0.113.5', 'Firefox'); + + expect(jwt.signAsync).toHaveBeenCalledWith({ + sub: 'admin-1', + mobile: '09120000000', + jti: 'jti-1', + }); + // Without the IAM session id, a back-channel logout could not find this session + expect(tracked.record).toHaveBeenCalledWith({ + jti: 'jti-1', + adminUserId: 'admin-1', + iamSessionId: 'sid-1', + iamSub: 'sub-1', + ipAddress: '203.0.113.5', + userAgent: 'Firefox', + }); + }); + + it('still records a session when the login fell back to the local password', async () => { + const tracked: Partial = { + newTokenId: jest.fn().mockReturnValue('jti-2'), + record: jest.fn(), + }; + const verifyCredentials = jest.fn().mockRejectedValue(new IamUnavailableError('down')); + const { service } = build( + { enabled: true, allowsLocalFallback: true, verifyCredentials }, + adminRow(), + tracked, + ); + + await service.login({ phone: '09120000000', password: PASSWORD }); + + // No IAM identity to attach, but the session must still be revocable locally + expect(tracked.record).toHaveBeenCalledWith( + expect.objectContaining({ jti: 'jti-2', iamSessionId: null, iamSub: null }), + ); + }); + + /* ─────────────── accounts with no usable password ─────────────── */ + + describe('accounts with no usable password', () => { + const noPassword = ['', OTP_ONLY_PASSWORD_HASH]; + + it.each(noPassword)('refuses login for hash %j, whatever is typed', async (hash) => { + const { service } = build(disabledIam(), { ...adminRow(), passwordHash: hash }); + + // Including the empty string and the sentinel itself: neither may open it + for (const typed of ['', 'x', OTP_ONLY_PASSWORD_HASH]) { + await expect( + service.login({ phone: '09120000000', password: typed }), + ).rejects.toThrow('نام کاربری یا رمز عبور اشتباه است'); + } + }); + + it.each(noPassword)('refuses hash %j on the IAM fallback path too', async (hash) => { + const verifyCredentials = jest.fn().mockRejectedValue(new IamUnavailableError('down')); + const { service } = build( + { enabled: true, allowsLocalFallback: true, verifyCredentials }, + { ...adminRow(), passwordHash: hash }, + ); + + await expect( + service.login({ phone: '09120000000', password: '' }), + ).rejects.toBeInstanceOf(UnauthorizedException); + }); + + it('never hands a malformed hash to bcrypt', async () => { + const compare = bcrypt.compare as unknown as jest.Mock; + compare.mockClear(); + + expect(await compareLocalHash('x', OTP_ONLY_PASSWORD_HASH)).toBe(false); + expect(await compareLocalHash('x', '')).toBe(false); + expect(await compareLocalHash('x', null)).toBe(false); + expect(compare).not.toHaveBeenCalled(); + + // …while a real hash still goes through it + await compareLocalHash(PASSWORD, passwordHash); + expect(compare).toHaveBeenCalledTimes(1); + }); + + it("still accepts the legacy server's PHP $2y$ hashes", async () => { + // PHP's $2y$ is the same algorithm as $2b$; the legacy passwords + // (customers and the sales experts moving to AdminUser) use it. + const legacy = '$2y$' + (await bcrypt.hash(PASSWORD, 4)).slice(4); + + expect(await compareLocalHash(PASSWORD, legacy)).toBe(true); + expect(await compareLocalHash('wrong', legacy)).toBe(false); + }); + }); + + /* ─────────────── two-factor ─────────────── */ + + it('explains that a two-factor account cannot log in through this path', async () => { + const verifyCredentials = jest.fn().mockRejectedValue(new IamMfaRequiredError('mfa')); + const { service } = build({ enabled: true, allowsLocalFallback: true, verifyCredentials }); + + await expect( + service.login({ phone: '09120000000', password: PASSWORD }), + ).rejects.toThrow('دو مرحله‌ای'); + }); +}); diff --git a/apps/api/src/modules/auth/auth.service.ts b/apps/api/src/modules/auth/auth.service.ts index be1ddca..74db856 100644 --- a/apps/api/src/modules/auth/auth.service.ts +++ b/apps/api/src/modules/auth/auth.service.ts @@ -1,14 +1,29 @@ -import { Injectable, UnauthorizedException } from '@nestjs/common'; +import { createHash, createHmac, randomBytes } from 'node:crypto'; +import { Injectable, Logger, UnauthorizedException } from '@nestjs/common'; import { JwtService } from '@nestjs/jwt'; -import * as bcrypt from 'bcryptjs'; import { PrismaService } from '../../prisma/prisma.service'; +import { + IamInvalidCredentialsError, + IamMfaRequiredError, + IamService, + type IamIdentity, +} from '../iam/iam.service'; +import { AdminSessionService } from '../sessions/admin-session.service'; +import { envList, envOr, envOrNull, pickExactUri } from '../../common/env'; import type { LoginDto } from './dto/login.dto'; +import { compareLocalHash } from './password-hash'; + +export { compareLocalHash, OTP_ONLY_PASSWORD_HASH } from './password-hash'; @Injectable() export class AuthService { + private readonly logger = new Logger(AuthService.name); + constructor( private readonly prisma: PrismaService, private readonly jwt: JwtService, + private readonly iam: IamService, + private readonly sessions: AdminSessionService, ) {} /** @@ -25,7 +40,7 @@ export class AuthService { * 401 here. Legacy returned 404 (firstOrFail) for an unknown phone and 422 for * a wrong password, which let anyone enumerate valid admin phone numbers. */ - async login(dto: LoginDto) { + async login(dto: LoginDto, clientIp?: string, userAgent?: string) { const user = await this.prisma.adminUser.findUnique({ where: { mobile: dto.phone }, include: { userType: { include: { permissions: true } } }, @@ -35,13 +50,157 @@ export class AuthService { throw new UnauthorizedException('نام کاربری یا رمز عبور اشتباه است'); } - const passwordOk = await bcrypt.compare(dto.password, user.passwordHash); - if (!passwordOk) { + const verified = await this.verifyPassword(dto, user.passwordHash, clientIp); + if (!verified.ok) { throw new UnauthorizedException('نام کاربری یا رمز عبور اشتباه است'); } - const apiToken = await this.jwt.signAsync({ sub: user.id, mobile: user.mobile }); + // While session tracking is off this is null and the token is signed exactly + // as before — same payload, same claims. + const jti = this.sessions.newTokenId(); + const apiToken = await this.jwt.signAsync({ + sub: user.id, + mobile: user.mobile, + ...(jti ? { jti } : {}), + }); + if (jti) { + // Recorded so a central sign-out (or an admin revoking the session) can end + // this token before it expires — see AdminSessionService. + await this.sessions.record({ + jti, + adminUserId: user.id, + iamSessionId: verified.identity?.sessionId ?? null, + iamSub: verified.identity?.sub ?? null, + ipAddress: clientIp ?? null, + userAgent: userAgent ?? null, + }); + } + + const bootstrap = this.iam.browserBootstrapUrl(verified.identity?.browserTicket); + return { + id: user.id, + name: user.fullName, + fullName: user.fullName, + mobile: user.mobile, + role: user.role, + ut: user.userTypeId, + branch_id: user.branchId, + api_token: apiToken, + roles: (user.userType?.permissions ?? []).map((p) => ({ rid: p.rid })), + ...(bootstrap ? { iamBootstrapUrl: bootstrap } : {}), + }; + } + + beginBrowserSso(requestedRedirect?: string): { authorizeUrl: string; cookie: string } | null { + if (!this.iam.enabled) return null; + const redirectUri = pickExactUri(requestedRedirect, [ + envOrNull('IAM_ADMIN_REDIRECT_URI'), + ...envList('IAM_ADMIN_REDIRECT_URIS'), + ]); + const clientId = envOrNull('IAM_CLIENT_ID'); + if (!redirectUri || !clientId) return null; + + const state = randomBytes(24).toString('base64url'); + const nonce = randomBytes(24).toString('base64url'); + const verifier = randomBytes(48).toString('base64url'); + const challenge = createHash('sha256').update(verifier).digest('base64url'); + const payload = Buffer.from(JSON.stringify({ state, nonce, verifier, redirectUri })).toString('base64url'); + const sig = createHmac('sha256', this.ssoSecret()).update(payload).digest('base64url'); + const secure = redirectUri.startsWith('https:'); + const cookie = + `gb_admin_iam_sso=${payload}.${sig}; HttpOnly; Path=/; Max-Age=180; SameSite=Lax` + + (secure ? '; Secure' : ''); + + const url = new URL(`${this.iam.issuer}/oauth/authorize`); + url.searchParams.set('response_type', 'code'); + url.searchParams.set('client_id', clientId); + url.searchParams.set('redirect_uri', redirectUri); + url.searchParams.set('scope', 'openid profile email'); + url.searchParams.set('state', state); + url.searchParams.set('nonce', nonce); + url.searchParams.set('code_challenge', challenge); + url.searchParams.set('code_challenge_method', 'S256'); + url.searchParams.set('prompt', 'none'); + return { authorizeUrl: url.toString(), cookie }; + } + + async completeBrowserSso(cookieValue: string | null, code: string, state: string, ip?: string, userAgent?: string) { + const pending = this.readSsoCookie(cookieValue); + if (!pending || pending.state !== state) { + throw new UnauthorizedException('درخواست ورود مشترک معتبر نیست'); + } + + const claims = await this.iam.exchangeAuthorizationCode(code, pending.verifier, pending.redirectUri); + if (!claims.phoneNumber) { + throw new UnauthorizedException('هویت مشترک شماره موبایل ندارد'); + } + + const user = await this.prisma.adminUser.findFirst({ + where: { mobile: { in: mobileVariants(claims.phoneNumber) }, isActive: true }, + include: { userType: { include: { permissions: true } } }, + }); + if (!user) { + throw new UnauthorizedException('حساب مدیری با این شماره در این سامانه نیست'); + } + + const identity: IamIdentity = { + sub: claims.sub, + email: null, + phoneNumber: claims.phoneNumber, + firstName: null, + lastName: null, + sessionId: claims.sessionId, + browserTicket: null, + }; + return this.issueAdminToken(user, identity, ip, userAgent); + } + + centralLogoutUrl(requestedReturn?: string): string | null { + if (!this.iam.enabled) return null; + const redirect = pickExactUri(requestedReturn, [ + envOrNull('IAM_ADMIN_POST_LOGOUT_REDIRECT_URI'), + envOrNull('IAM_ADMIN_BROWSER_RETURN_URL'), + ...envList('IAM_ADMIN_ALLOWED_RETURN_URLS'), + ]); + const clientId = envOrNull('IAM_CLIENT_ID'); + if (!redirect || !clientId) return null; + const url = new URL(`${this.iam.issuer}/oauth/logout`); + url.searchParams.set('client_id', clientId); + url.searchParams.set('post_logout_redirect_uri', redirect); + return url.toString(); + } + + private async issueAdminToken( + user: { + id: string; + fullName: string; + mobile: string; + role: string; + userTypeId: number | null; + branchId: string | null; + userType: { permissions: { rid: string }[] } | null; + }, + identity: IamIdentity | undefined, + ip?: string, + userAgent?: string, + ) { + const jti = this.sessions.newTokenId(); + const apiToken = await this.jwt.signAsync({ + sub: user.id, + mobile: user.mobile, + ...(jti ? { jti } : {}), + }); + if (jti) { + await this.sessions.record({ + jti, + adminUserId: user.id, + iamSessionId: identity?.sessionId ?? null, + iamSub: identity?.sub ?? null, + ipAddress: ip ?? null, + userAgent: userAgent ?? null, + }); + } return { id: user.id, name: user.fullName, @@ -55,6 +214,77 @@ export class AuthService { }; } + private ssoSecret(): string { + return envOrNull('JWT_SECRET') || envOr('IAM_CLIENT_SECRET', 'iam-sso'); + } + + private readSsoCookie(value: string | null): { state: string; verifier: string; redirectUri: string } | null { + if (!value || !value.includes('.')) return null; + const split = value.lastIndexOf('.'); + const payload = value.slice(0, split); + const sig = value.slice(split + 1); + const expected = createHmac('sha256', this.ssoSecret()).update(payload).digest('base64url'); + if (expected.length !== sig.length) return null; + let same = 0; + for (let i = 0; i < expected.length; i++) same |= expected.charCodeAt(i) ^ sig.charCodeAt(i); + if (same !== 0) return null; + try { + return JSON.parse(Buffer.from(payload, 'base64url').toString('utf8')); + } catch { + return null; + } + } + + /** + * Password check, optionally delegated to the central identity service. + * + * With `IAM_ENABLED=false` (the default) this is exactly the previous + * behaviour: a single bcrypt compare. With it on, the identity service is + * asked first and the local hash is only consulted when that check could not + * give a definite answer — so an IAM outage never blocks admin login. + */ + private async verifyPassword( + dto: LoginDto, + passwordHash: string, + clientIp?: string, + ): Promise<{ ok: boolean; identity?: IamIdentity }> { + if (!this.iam.enabled) { + return { ok: await compareLocalHash(dto.password, passwordHash) }; + } + + try { + const identity = await this.iam.verifyCredentials(dto.phone, dto.password, clientIp); + + // The IAM session id travels with the recorded session so a back-channel + // logout can find and end exactly this session. + return { ok: true, identity }; + } catch (error) { + if (error instanceof IamMfaRequiredError) { + // Nowhere to collect the code on this UI-less path; say so plainly + // instead of silently falling back to a password the IAM may have retired. + throw new UnauthorizedException( + 'برای این حساب احراز هویت دو مرحله‌ای فعال است و از این مسیر قابل تکمیل نیست', + ); + } + + if (error instanceof IamInvalidCredentialsError && !this.iam.allowsLocalFallback) { + return { ok: false }; + } + + if (!(error instanceof IamInvalidCredentialsError)) { + this.logger.warn( + `falling back to the local password check: ${(error as Error).message}`, + ); + if (!this.iam.allowsLocalFallback) { + throw new UnauthorizedException('ورود در حال حاضر ممکن نیست؛ سرویس هویت در دسترس نیست'); + } + } + + // fallback mode: the account may not have been migrated to the IAM yet + return { ok: await compareLocalHash(dto.password, passwordHash) }; + } + } + /** * Port of legacy UserController::showData, which the router guard calls on every * cold load to refresh the permission list: @@ -87,3 +317,11 @@ export class AuthService { }; } } + +function mobileVariants(raw: string): string[] { + const digits = raw.replace(/\D/g, ''); + const variants = new Set([raw.trim(), digits]); + if (digits.startsWith('98') && digits.length >= 12) variants.add(`0${digits.slice(2)}`); + if (digits.startsWith('0') && digits.length === 11) variants.add(`98${digits.slice(1)}`); + return [...variants].filter((value) => value !== ''); +} diff --git a/apps/api/src/modules/auth/jwt.strategy.ts b/apps/api/src/modules/auth/jwt.strategy.ts index 8f5ed8d..e328948 100644 --- a/apps/api/src/modules/auth/jwt.strategy.ts +++ b/apps/api/src/modules/auth/jwt.strategy.ts @@ -2,13 +2,39 @@ import { Injectable, UnauthorizedException } from '@nestjs/common'; import { PassportStrategy } from '@nestjs/passport'; import { ExtractJwt, Strategy } from 'passport-jwt'; import { PrismaService } from '../../prisma/prisma.service'; +import { envOr } from '../../common/env'; +import { AdminSessionService } from '../sessions/admin-session.service'; import { expandWithParents } from './acl.constants'; export interface JwtPayload { sub: string; mobile: string; + /** + * Present only on tokens issued while session tracking is on. It identifies the + * AdminSession row, which is what makes revoking a token before it expires + * possible. A token without it predates tracking and stays valid until it + * expires, so switching the feature on does not sign everyone out. + */ + jti?: string; + /** + * Set on APP tokens only ('customer' or 'sales-expert'). An admin-panel + * token has no `typ`. Checked in validate() below — see the note there. + */ + typ?: string; } +/** + * App token types, which must NEVER authenticate an admin-panel route. + * + * This matters because a sales expert's app token carries their AdminUser id + * in `sub` (D21). The two token families are signed with different secrets, so + * normally the signature alone stops it — but `JWT_CUSTOMER_SECRET` falls back + * to `JWT_SECRET` when unset, and in that configuration an expert's app token + * WOULD verify here and be handed full admin-panel permissions. This check + * closes that regardless of how the secrets are configured. + */ +const APP_TOKEN_TYPES = new Set(['customer', 'sales-expert']); + /** * The authenticated principal attached to `req.user`. * @@ -28,15 +54,30 @@ export interface AuthenticatedAdmin { @Injectable() export class JwtStrategy extends PassportStrategy(Strategy, 'jwt') { - constructor(private readonly prisma: PrismaService) { + constructor( + private readonly prisma: PrismaService, + private readonly sessions: AdminSessionService, + ) { super({ jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(), ignoreExpiration: false, - secretOrKey: process.env.JWT_SECRET ?? 'dev-only-insecure-secret', + secretOrKey: envOr('JWT_SECRET', 'dev-only-insecure-secret'), }); } async validate(payload: JwtPayload): Promise { + // An app token is never an admin-panel token, whatever it is signed with. + if (payload?.typ && APP_TOKEN_TYPES.has(payload.typ)) { + throw new UnauthorizedException(); + } + + // Revoked centrally (IAM back-channel logout) or locally? While tracking is + // off this returns true without touching the database, so the request costs + // exactly what it did before. + if (!(await this.sessions.isActive(payload.jti))) { + throw new UnauthorizedException(); + } + const user = await this.prisma.adminUser.findUnique({ where: { id: payload.sub }, include: { userType: { include: { permissions: true } } }, diff --git a/apps/api/src/modules/auth/password-hash.ts b/apps/api/src/modules/auth/password-hash.ts new file mode 100644 index 0000000..435a165 --- /dev/null +++ b/apps/api/src/modules/auth/password-hash.ts @@ -0,0 +1,40 @@ +import * as bcrypt from 'bcryptjs'; + +/** + * Value written into `passwordHash` for accounts that must never log in with a + * password — the ~1,590 legacy customers who only ever used OTP + * (docs/DATA-MIGRATION-MAP.md §10.4). The `!` prefix is the Django/Rails + * "unusable password" convention: readable by anyone looking at the row, and + * matched by no password. + * + * Kept in this dependency-free module (bcryptjs only) so the data-import + * script can use it without loading NestJS. + */ +export const OTP_ONLY_PASSWORD_HASH = '!OTP_ONLY_NO_PASSWORD_LOGIN'; + +/** + * Same idea for an admin account created before anyone has issued it a + * password (e.g. a workshop supervisor added from the branch form): it cannot + * sign in until a password is set through the users screen. + */ +export const NO_PASSWORD_YET_HASH = '!NO_PASSWORD_SET_YET'; + +/** + * A real bcrypt hash always starts with `$2` ($2a$, $2b$, or PHP's $2y$ from + * the legacy server — all three verify with bcryptjs). Anything else is not a + * password: '' on accounts created without one, or OTP_ONLY_PASSWORD_HASH. + * + * Such hashes are refused here, BEFORE bcrypt is called, so the outcome never + * depends on how a particular bcrypt build treats a malformed hash. bcryptjs 3 + * happens to return false today; a future version or a native binding might + * throw and turn a wrong password into a 500 (owner ruling 2026-10-07). + */ +export async function compareLocalHash(password: string, passwordHash: string | null | undefined) { + if (typeof passwordHash !== 'string' || !passwordHash.startsWith('$2')) return false; + return bcrypt.compare(password, passwordHash); +} + +/** True when a stored legacy hash can be carried over as a working password. */ +export function isPasswordHash(hash: unknown): hash is string { + return typeof hash === 'string' && hash.startsWith('$2'); +} diff --git a/apps/api/src/modules/catalog/catalog.service.ts b/apps/api/src/modules/catalog/catalog.service.ts index 43600cd..d0cdeca 100644 --- a/apps/api/src/modules/catalog/catalog.service.ts +++ b/apps/api/src/modules/catalog/catalog.service.ts @@ -1,13 +1,20 @@ -import { Injectable, NotFoundException } from '@nestjs/common'; +import { BadRequestException, Injectable, NotFoundException } from '@nestjs/common'; import { PrismaService } from '../../prisma/prisma.service'; +import { AccountingHooksService } from '../accounting-sync/accounting-hooks.service'; @Injectable() export class CatalogService { - constructor(private readonly prisma: PrismaService) {} + constructor( + private readonly prisma: PrismaService, + private readonly accounting: AccountingHooksService, + ) {} - listProducts() { - return this.prisma.product.findMany({ - where: { isActive: true }, + async listProducts() { + const products = await this.prisma.product.findMany({ + // D27 — a product with no image is never shown in the app. Products now + // also arrive from the accounting software, which carries no pictures; + // they appear once an admin photographs them. + where: { isActive: true, images: { some: {} } }, include: { // Only orderable variants reach the storefront. An inactive one used to // be listed and then rejected by getVariantOrThrow at checkout, so the @@ -26,13 +33,49 @@ export class CatalogService { collections: { include: { collection: true } }, }, }); + + const out = []; + for (const p of products) { + const { accountingStockWeight, accountingStockCount, accountingStockAt, ...product } = p; + // D27 — out of stock in the accounting software: every variant reads as + // qty 0, which the apps already render as «ناموجود» and refuse to add to + // the cart unless it is a pre-order variant. The stock figures themselves + // stay server-side; this endpoint is public. + const blocked = await this.accounting.stockBlocked({ accountingStockWeight, accountingStockCount, accountingStockAt }); + out.push(blocked ? { ...product, variants: product.variants.map((v) => (v.isPreOrder ? v : { ...v, qty: 0 })) } : product); + } + return out; } async getVariantOrThrow(variantId: string) { - const variant = await this.prisma.productVariant.findUnique({ where: { id: variantId } }); + const variant = await this.prisma.productVariant.findUnique({ + where: { id: variantId }, + include: { + product: { + select: { + id: true, + accountingStockWeight: true, + accountingStockCount: true, + accountingStockAt: true, + _count: { select: { images: true } }, + }, + }, + }, + }); if (!variant || !variant.isActive) { throw new NotFoundException(`Product variant ${variantId} not found or inactive`); } - return variant; + // The same two rules the listing applies, so a stale client cannot order + // around them. + if (variant.product._count.images === 0) { + throw new BadRequestException('این محصول هنوز تصویر ندارد و قابل سفارش نیست'); + } + // Live from the accounting software at order time; on no answer the last + // stored figure decides (liveStock). + if (!variant.isPreOrder && (await this.accounting.stockBlocked(await this.accounting.liveStock(variant.product)))) { + throw new BadRequestException('این محصول در انبار موجود نیست'); + } + const { product: _product, ...plain } = variant; + return plain; } } diff --git a/apps/api/src/modules/customer-auth/app-principal.ts b/apps/api/src/modules/customer-auth/app-principal.ts new file mode 100644 index 0000000..5b483d5 --- /dev/null +++ b/apps/api/src/modules/customer-auth/app-principal.ts @@ -0,0 +1,69 @@ +/** + * Who is signed into the customer apps. + * + * The apps serve TWO kinds of user — an ordinary customer, and a sales expert + * ("کارشناس فروش"). In the reference both were rows in `customers` (the agent + * was `type = 1`), so one login and one token covered both and the agent simply + * had extra screens. Here a sales expert is an AdminUser (D17), so the two + * principals are genuinely different records and need to be told apart. + * + * The distinction is carried in the token's `typ` claim and re-checked on every + * request, never taken from the client. + */ + +/** An ordinary customer signed into the app. */ +export const CUSTOMER_TOKEN_TYPE = 'customer' as const; + +/** + * A sales expert signed into the app. A DIFFERENT value from the admin panel's + * token type, so an expert's app token is not an admin-panel token: it cannot + * open the admin panel, and an admin token cannot drive the app. + */ +export const EXPERT_TOKEN_TYPE = 'sales-expert' as const; + +export type AppTokenType = typeof CUSTOMER_TOKEN_TYPE | typeof EXPERT_TOKEN_TYPE; + +export interface AppJwtPayload { + /** + * For a customer: the Customer id. + * For an expert: the ADMIN USER id — the durable identity. Their trading + * Customer row is resolved server-side on each request, so the token never + * needs reissuing when that row is created. + */ + sub: string; + mobile: string; + typ: AppTokenType; + /** + * Present only on tokens issued while session tracking is on. It identifies + * the AppSession row, which is what makes ending a session before its 30-day + * expiry possible (central sign-out, or revoking locally). A token without it + * predates tracking and stays valid until it expires. + */ + jti?: string; +} + +/** + * The principal a handler receives from `@CurrentCustomer()`. + * + * `id` is ALWAYS a Customer id — for an expert it is their trading account — + * so every existing customer route (orders, cart, me, ledger) keeps working + * unchanged and an expert gets the whole ordinary app for free, which is what + * the reference gave them. + * + * `adminUserId` is set only for an expert and is what scopes "my customers": + * Customer.referredByAgentId points at the AdminUser, not at the trading row. + */ +export interface AuthenticatedCustomer { + /** Customer id. For an expert, their own trading account. */ + id: string; + mobile: string; + /** Which kind of principal this is. */ + type: AppTokenType; + /** The AdminUser id — present only for a sales expert. */ + adminUserId?: string; +} + +/** True when this principal is a sales expert. */ +export function isSalesExpert(me: AuthenticatedCustomer): boolean { + return me.type === EXPERT_TOKEN_TYPE && Boolean(me.adminUserId); +} diff --git a/apps/api/src/modules/customer-auth/customer-auth-iam.spec.ts b/apps/api/src/modules/customer-auth/customer-auth-iam.spec.ts new file mode 100644 index 0000000..5a9182c --- /dev/null +++ b/apps/api/src/modules/customer-auth/customer-auth-iam.spec.ts @@ -0,0 +1,166 @@ +import { UnauthorizedException } from '@nestjs/common'; +import * as bcrypt from 'bcryptjs'; + +/** + * `@nestjs/jwt` v12 is ESM and this repo's jest does not transform node_modules, + * so the real class cannot be imported here. The test injects its own stub. + */ +jest.mock('@nestjs/jwt', () => ({ JwtService: class JwtService {} })); + +import { CustomerAuthService } from './customer-auth.service'; +import { IamAccessDeniedError, IamUnavailableError, IamUserUnknownError } from '../iam/iam.service'; + +/** + * The app's OTP login and the central identity service. + * + * This login has **no password**, so it never reached the identity service at + * all: no central session, nothing in the security log, and a central sign-out + * could not end it. These tests lock down the fix and, more importantly, the + * boundaries: an identity-service problem must never keep a customer out of the + * app, while a refusal (locked / deactivated / two-factor) must be honoured. + */ +describe('CustomerAuthService — OTP login with the identity service', () => { + const MOBILE = '09120000000'; + const CODE = '1234'; + const CUSTOMER = { id: 'cust-1', mobile: MOBILE, isActive: true, isArchived: false }; + + let prisma: any; + let jwt: { signAsync: jest.Mock }; + let sms: { send: jest.Mock }; + + const challenge = async () => ({ + id: 'otp-1', + mobile: MOBILE, + codeHash: await bcrypt.hash(CODE, 8), + attempts: 0, + consumedAt: null, + expiresAt: new Date(Date.now() + 60_000), + customer: CUSTOMER, + }); + + const build = (iam: Record, sessions?: Record) => { + const session = sessions ?? { newTokenId: jest.fn().mockReturnValue(null), record: jest.fn() }; + const service = new CustomerAuthService( + prisma as never, + jwt as never, + sms as never, + { browserBootstrapUrl: () => null, ...iam } as never, + session as never, + ); + jest.spyOn((service as any).logger, 'warn').mockImplementation(() => undefined); + return { service, sessions: session }; + }; + + beforeEach(async () => { + delete process.env.OTP_MASTER_CODE; + process.env.JWT_CUSTOMER_SECRET = 'test-secret'; + + prisma = { + customer: { findFirst: jest.fn().mockResolvedValue(CUSTOMER) }, + customerOtp: { + findFirst: jest.fn().mockResolvedValue(await challenge()), + update: jest.fn().mockResolvedValue({}), + create: jest.fn().mockResolvedValue({}), + count: jest.fn().mockResolvedValue(0), + }, + adminUser: { findFirst: jest.fn().mockResolvedValue(null) }, + appSession: { create: jest.fn(), findUnique: jest.fn(), updateMany: jest.fn() }, + }; + jwt = { signAsync: jest.fn().mockResolvedValue('signed.jwt.token') }; + sms = { send: jest.fn().mockResolvedValue({ ok: true }) }; + }); + + /* ─────────────── feature off: unchanged behaviour ─────────────── */ + + it('never contacts the identity service while the feature is off', async () => { + const attestOtpLogin = jest.fn(); + const { service } = build({ enabled: false, attestOtpLogin }); + + const result = await service.verifyOtp(MOBILE, CODE, '203.0.113.5'); + + expect(result.token).toBe('signed.jwt.token'); + expect(attestOtpLogin).not.toHaveBeenCalled(); + // بدون ردیابی نشست، توکن دقیقاً همان ادعاهای قبلی را دارد + expect(jwt.signAsync.mock.calls[0][0]).toEqual({ sub: 'cust-1', mobile: MOBILE, typ: 'customer' }); + }); + + /* ─────────────── feature on ─────────────── */ + + it('reports the verified code with the end-user IP and a masked number', async () => { + const attestOtpLogin = jest.fn().mockResolvedValue({ sub: 'sub-1', sessionId: 'sid-1' }); + const { service } = build({ enabled: true, attestOtpLogin }); + + await service.verifyOtp(MOBILE, CODE, '203.0.113.5'); + + // بدون IP کاربر نهایی، محدودیت نرخ IdP روی IP همین سرور می‌افتاد + expect(attestOtpLogin).toHaveBeenCalledWith(MOBILE, '203.0.113.5', '0912***0000'); + }); + + it('records the session with the identity service ids so a central sign-out can end it', async () => { + const attestOtpLogin = jest.fn().mockResolvedValue({ sub: 'sub-1', sessionId: 'sid-1' }); + const tracked = { newTokenId: jest.fn().mockReturnValue('jti-1'), record: jest.fn() }; + const { service } = build({ enabled: true, attestOtpLogin }, tracked); + + await service.verifyOtp(MOBILE, CODE, '203.0.113.5'); + + expect(jwt.signAsync.mock.calls[0][0]).toMatchObject({ jti: 'jti-1' }); + expect(tracked.record).toHaveBeenCalledWith( + expect.objectContaining({ + jti: 'jti-1', + subjectId: 'cust-1', + subjectType: 'customer', + iamSessionId: 'sid-1', + iamSub: 'sub-1', + }), + ); + }); + + /* ─────────────── the safety net ─────────────── */ + + it('lets the customer in when the identity service does not know them yet', async () => { + const attestOtpLogin = jest.fn().mockRejectedValue(new IamUserUnknownError(MOBILE)); + const { service } = build({ enabled: true, attestOtpLogin }); + + const result = await service.verifyOtp(MOBILE, CODE, undefined); + + // مناسب مهاجرت تدریجی: هنوز همه کاربران آنجا نیستند + expect(result.token).toBe('signed.jwt.token'); + }); + + it('lets the customer in when the identity service is down', async () => { + const attestOtpLogin = jest.fn().mockRejectedValue(new IamUnavailableError('down')); + const { service } = build({ enabled: true, attestOtpLogin }); + + // مهم‌ترین تضمین: خرابی IdP نباید کاربر را از اپ بیرون نگه دارد + await expect(service.verifyOtp(MOBILE, CODE, undefined)).resolves.toMatchObject({ + token: 'signed.jwt.token', + }); + }); + + it('honours a refusal from the identity service (locked / deactivated / two-factor)', async () => { + const attestOtpLogin = jest.fn().mockRejectedValue(new IamAccessDeniedError('refused', 'account_locked')); + const { service } = build({ enabled: true, attestOtpLogin }); + + // اینجا «نمی‌دانم» نیست، «نه» است — دور زدنش قفل مرکزی را بی‌اثر می‌کرد + await expect(service.verifyOtp(MOBILE, CODE, undefined)).rejects.toBeInstanceOf(UnauthorizedException); + }); + + it('still refuses a wrong code before any of this runs', async () => { + const attestOtpLogin = jest.fn(); + const { service } = build({ enabled: true, attestOtpLogin }); + + await expect(service.verifyOtp(MOBILE, '9999', undefined)).rejects.toBeInstanceOf(UnauthorizedException); + expect(attestOtpLogin).not.toHaveBeenCalled(); + }); + + it('does not report the delivery master code as a verified factor', async () => { + process.env.OTP_MASTER_CODE = '4321'; + const attestOtpLogin = jest.fn(); + const { service } = build({ enabled: true, attestOtpLogin }); + + await service.verifyOtp(MOBILE, '4321', undefined); + + // کد اضطراری، عامل واقعی کاربر نیست؛ نشست مرکزی روی آن ساخته نمی‌شود + expect(attestOtpLogin).not.toHaveBeenCalled(); + }); +}); diff --git a/apps/api/src/modules/customer-auth/customer-auth.controller.ts b/apps/api/src/modules/customer-auth/customer-auth.controller.ts new file mode 100644 index 0000000..baf94ff --- /dev/null +++ b/apps/api/src/modules/customer-auth/customer-auth.controller.ts @@ -0,0 +1,102 @@ +import { Body, Controller, Get, Headers, HttpCode, Ip, Post, Query, Res } from '@nestjs/common'; +import type { Response } from 'express'; +import { CustomerAuthService } from './customer-auth.service'; +import { CustomersService } from '../customers/customers.service'; +import { RequestOtpDto } from './dto/request-otp.dto'; +import { VerifyOtpDto } from './dto/verify-otp.dto'; +import { Public } from '../auth/guards'; +import { CurrentCustomer, CustomerAuth } from './customer.guards'; +import type { AuthenticatedCustomer } from './customer-jwt.strategy'; + +/** + * The customer-facing session. + * + * Replaces the login that downloaded every customer and matched the phone + * number in the browser (SEC-08). Mirrors the reference's two-step SMS flow: + * + * POST customer/auth/request-otp <- ApiMobileController::userAuth (:39-49) + * POST customer/auth/verify-otp <- ApiMobileController::userVerfiy (:51-64) + * + * Everything below verify is token-derived: `/me`, `/me/orders` and + * `/me/ledger-entries` read the customer id from the JWT, never from the URL, + * so one customer cannot fetch another's data. + */ +@Controller('customer') +export class CustomerAuthController { + constructor( + private readonly auth: CustomerAuthService, + private readonly customers: CustomersService, + ) {} + + /** Step 1. Always answers `{ sent: true }` — it never reveals whether the number is registered. */ + @Public() + @Post('auth/request-otp') + @HttpCode(200) + requestOtp(@Body() dto: RequestOtpDto, @Ip() ip: string) { + return this.auth.requestOtp(dto.username, ip); + } + + /** Step 2. Returns the token and that one customer, as the reference did. */ + @Public() + @Post('auth/verify-otp') + @HttpCode(200) + verifyOtp(@Body() dto: VerifyOtpDto, @Ip() ip: string) { + return this.auth.verifyOtp(dto.username, dto.password, ip); + } + + /** اگر نشست IAM در مرورگر باشد، آدرس authorize با prompt=none برمی‌گردد. */ + @Public() + @Get('auth/sso/start') + startSso(@Query('redirect_uri') redirectUri: string | undefined, @Res({ passthrough: true }) res: Response) { + const started = this.auth.beginBrowserSso(redirectUri); + if (!started) return { enabled: false, authorize_url: null }; + res.setHeader('Set-Cookie', started.cookie); + return { enabled: true, authorize_url: started.authorizeUrl }; + } + + @Public() + @Post('auth/sso/callback') + @HttpCode(200) + ssoCallback( + @Body() body: { code?: string; state?: string }, + @Headers('cookie') cookieHeader: string | undefined, + @Ip() ip: string, + @Res({ passthrough: true }) res: Response, + ) { + res.setHeader('Set-Cookie', 'gb_iam_sso=; HttpOnly; Path=/; Max-Age=0; SameSite=Lax'); + return this.auth.completeBrowserSso(readCookie(cookieHeader, 'gb_iam_sso'), body.code ?? '', body.state ?? '', ip); + } + + @Public() + @Get('auth/sso/logout-url') + ssoLogoutUrl(@Query('return_url') returnUrl?: string) { + return { logout_url: this.auth.centralLogoutUrl(returnUrl) }; + } + + @CustomerAuth() + @Get('me') + me(@CurrentCustomer() me: AuthenticatedCustomer) { + return this.customers.getOrThrow(me.id); + } + + @CustomerAuth() + @Get('me/orders') + myOrders(@CurrentCustomer() me: AuthenticatedCustomer) { + return this.customers.getOrders(me.id); + } + + @CustomerAuth() + @Get('me/ledger-entries') + myLedgerEntries(@CurrentCustomer() me: AuthenticatedCustomer) { + return this.customers.getLedgerEntries(me.id); + } +} + +function readCookie(header: string | undefined, name: string): string | null { + if (!header) return null; + for (const part of header.split(';')) { + const [key, ...rest] = part.trim().split('='); + if (key === name) return decodeURIComponent(rest.join('=')); + } + return null; +} diff --git a/apps/api/src/modules/customer-auth/customer-auth.module.ts b/apps/api/src/modules/customer-auth/customer-auth.module.ts new file mode 100644 index 0000000..5d743bb --- /dev/null +++ b/apps/api/src/modules/customer-auth/customer-auth.module.ts @@ -0,0 +1,25 @@ +import { Module } from '@nestjs/common'; +import { JwtModule } from '@nestjs/jwt'; +import { PassportModule } from '@nestjs/passport'; +import { PrismaModule } from '../../prisma/prisma.module'; +import { CustomersModule } from '../customers/customers.module'; +import { CustomerAuthController } from './customer-auth.controller'; +import { CustomerAuthService } from './customer-auth.service'; +import { CustomerJwtStrategy } from './customer-jwt.strategy'; + +/** + * Customer session, deliberately separate from AuthModule (admins). + * + * JwtModule is registered without a secret here: the customer secret is passed + * per-call in CustomerAuthService.verifyOtp, and CustomerJwtStrategy reads it + * directly, so an admin secret can never sign a customer token by accident. + * + * No APP_GUARD is registered — customer routes opt in with @CustomerAuth(). + */ +@Module({ + imports: [PrismaModule, PassportModule, JwtModule.register({}), CustomersModule], + controllers: [CustomerAuthController], + providers: [CustomerAuthService, CustomerJwtStrategy], + exports: [CustomerAuthService], +}) +export class CustomerAuthModule {} diff --git a/apps/api/src/modules/customer-auth/customer-auth.service.ts b/apps/api/src/modules/customer-auth/customer-auth.service.ts new file mode 100644 index 0000000..1ee566f --- /dev/null +++ b/apps/api/src/modules/customer-auth/customer-auth.service.ts @@ -0,0 +1,778 @@ +import { createHash, createHmac, randomBytes } from 'node:crypto'; +import { HttpException, HttpStatus, Injectable, Logger, UnauthorizedException } from '@nestjs/common'; +import { JwtService } from '@nestjs/jwt'; +import { AdminRole, CustomerKind, MessageAudience, Prisma } from '@prisma/client'; +import * as bcrypt from 'bcryptjs'; +import { PrismaService } from '../../prisma/prisma.service'; +import { + IamAccessDeniedError, + IamService, + IamUserUnknownError, + type IamIdentity, +} from '../iam/iam.service'; +import { AppSessionService } from '../sessions/app-session.service'; +import { OTP_ONLY_PASSWORD_HASH } from '../auth/password-hash'; +import { envList, envOr, envOrNull, pickExactUri } from '../../common/env'; +import { CUSTOMER_TOKEN_TYPE, EXPERT_TOKEN_TYPE, type CustomerJwtPayload } from './customer-jwt.strategy'; +import { faToEn } from './digits'; +import { SmsService, smsConfigured } from '../sms/sms.service'; + +/** Nest 10 has no TooManyRequestsException; 429 with a Persian message. */ +class TooManyRequestsException extends HttpException { + constructor(message: string) { + super(message, HttpStatus.TOO_MANY_REQUESTS); + } +} + +/** How long a code stays usable. The reference had no expiry at all (D6). */ +const OTP_TTL_MS = 2 * 60 * 1000; +/** Wrong guesses allowed against one challenge before it is burned. */ +const MAX_ATTEMPTS = 5; +/** Sends allowed per mobile number inside the window. */ +const MAX_SENDS_PER_MOBILE = 5; +/** Sends allowed per source IP inside the window. */ +const MAX_SENDS_PER_IP = 20; +const SEND_WINDOW_MS = 10 * 60 * 1000; +/** Minimum gap between two sends to the same number. */ +const RESEND_COOLDOWN_MS = 60 * 1000; + +/** + * D20 — the delivery master OTP. + * + * Read from `OTP_MASTER_CODE` and NEVER hardcoded. Unset or empty disables it + * completely, which is the state every real deployment must be in. + * + * Read through a function rather than a module constant so tests (and a + * restart-free config change) see the current value instead of whatever was in + * the environment when this module was first imported. + */ +export function masterOtpCode(): string | null { + const raw = process.env.OTP_MASTER_CODE?.trim(); + return raw ? raw : null; +} + +/** Whether the master code is currently armed. */ +export function masterOtpEnabled(): boolean { + return masterOtpCode() !== null; +} + +/** اطلاعات جانبی صدور توکن: هویت تأییدشده در IdP و IP کاربر */ +interface IssueContext { + identity?: IamIdentity | null; + ip?: string; +} + +/** شماره ماسک‌شده برای لاگ امنیتی IdP — بدون افشای کامل شماره */ +function mobileVariants(raw: string): string[] { + const digits = raw.replace(/\D/g, ''); + const variants = new Set([raw.trim(), digits]); + if (digits.startsWith('98') && digits.length >= 12) variants.add(`0${digits.slice(2)}`); + if (digits.startsWith('0') && digits.length === 11) variants.add(`98${digits.slice(1)}`); + return [...variants].filter((value) => value !== ''); +} + +function maskMobile(mobile: string): string | null { + return mobile.length < 7 ? null : `${mobile.slice(0, 4)}***${mobile.slice(-4)}`; +} + +@Injectable() +export class CustomerAuthService { + private readonly logger = new Logger(CustomerAuthService.name); + + constructor( + private readonly prisma: PrismaService, + private readonly jwt: JwtService, + private readonly sms: SmsService, + private readonly iam: IamService, + private readonly sessions: AppSessionService, + ) {} + + /** + * Tell the central identity service about a code this app just verified. + * + * The app's login has no password, so this is the only way an OTP login can + * reach the identity service at all. Deliberate asymmetry in how failures are + * treated, mirroring the admin path: + * + * - unknown user / service down / rate limited → local login continues + * (an IAM problem must never lock customers out of the app); + * - locked, deactivated or two-factor there → the login is refused, + * because that is a decision, not a gap. + */ + private async attestToIam(mobile: string, ip: string | undefined): Promise { + if (!this.iam.enabled) return null; + + try { + return await this.iam.attestOtpLogin(mobile, ip, maskMobile(mobile)); + } catch (error) { + if (error instanceof IamAccessDeniedError) { + this.logger.warn(`identity service refused ${mobile}: ${error.reason}`); + throw new UnauthorizedException('ورود این حساب در حال حاضر مجاز نیست'); + } + + if (!(error instanceof IamUserUnknownError)) { + this.logger.warn(`OTP attestation skipped: ${(error as Error).message}`); + } + + return null; + } + } + + /** + * Step 1 — port of ApiMobileController::userAuth (henza_server:39-49). + * + * Reference: validate `username`, find an ACTIVE customer by mobile, generate + * rand(1000,9999), store it, send it by SMS, return `true`. + * + * Kept: the active-customer filter, the 4-digit range, the opaque `true` + * response (it never reveals whether the number exists). + * Changed: the code is hashed, it expires, and sends are rate limited. + */ + async requestOtp(rawMobile: string, ip: string | undefined) { + const mobile = faToEn(rawMobile); + + await this.assertSendAllowed(mobile, ip); + + // D21 — a sales expert signs in with the SAME flow, on the mobile of their + // AdminUser. Checked first: the owner ruled that if a number somehow + // existed on both sides, the expert wins. + // + // Their trading Customer row is created here rather than at verify, because + // CustomerOtp.customerId is a required FK and the challenge has to hang off + // a real row. Creating it costs nothing for a number that never completes + // login: it is that expert's own account either way, and it is created once. + const expertAccount = await this.resolveExpertTradingAccount(mobile); + + // Legacy used Customer::active(), and the archived filter matches the + // customer-list lookup the app login previously relied on. + const customer = + expertAccount ?? + (await this.prisma.customer.findFirst({ + where: { mobile, isActive: true, isArchived: false }, + select: { id: true }, + })); + + // Deliberately opaque: the reference used firstOrFail() and leaked a 404 + // for unknown numbers, which let anyone enumerate registered customers. + // Recorded as a deviation in docs/parity/DECISIONS.md. + if (!customer) { + this.logger.warn(`OTP requested for unknown or inactive mobile ${mobile}`); + return { sent: true }; + } + + const code = String(Math.floor(1000 + Math.random() * 9000)); + + await this.prisma.customerOtp.create({ + data: { + mobile, + customerId: customer.id, + codeHash: await bcrypt.hash(code, 10), + expiresAt: new Date(Date.now() + OTP_TTL_MS), + requestIp: ip ?? null, + }, + }); + + await this.deliver(mobile, code); + return { sent: true }; + } + + /** + * D21 — find an active sales expert by mobile and return their trading + * Customer account, creating it on first sign-in. + * + * WHY A TRADING ACCOUNT EXISTS + * In the reference a sales agent WAS a Customer (type=1), so `setOrder` did + * `Customer::findOrFail(auth()->id())` and read that row's `gram_level` + * (ApiMobileController.php:534-535) — the agent's own order, own credit + * limit, own ledger. Here the expert is an AdminUser (D17), which has no + * ledger and cannot be an Order's subject, so this one linked Customer row + * plays that part. It is NOT one of their referred customers. + * + * Seeded from what the reference used for exactly these two numbers: + * gram_level -> goldCreditLimitGrams (SalesExpertProfile.gramLevel) + * percent -> makingChargeOffsetPercent (AdminUser.wagePercent) + * + * Returns null for any mobile that is not an active sales expert, so an + * ordinary customer's login is completely unaffected. + */ + /** `code` when it is set and no customer holds it yet, else null. */ + private async freeNationalCode(code: string | null): Promise { + if (!code) return null; + const taken = await this.prisma.customer.findUnique({ where: { nationalCode: code }, select: { id: true } }); + return taken ? null : code; + } + + private async resolveExpertTradingAccount(mobile: string): Promise<{ id: string } | null> { + const admin = await this.prisma.adminUser.findFirst({ + where: { mobile, isActive: true, role: AdminRole.SALES_EXPERT }, + select: { + id: true, + fullName: true, + firstName: true, + lastName: true, + mobile: true, + wagePercent: true, + salesExpertProfile: { + select: { id: true, gramLevel: true, nationalCode: true, tradingCustomerId: true }, + }, + }, + }); + if (!admin) return null; + + const existingId = admin.salesExpertProfile?.tradingCustomerId; + if (existingId) { + // Re-activate nothing and change nothing — just confirm it is usable. + const existing = await this.prisma.customer.findUnique({ + where: { id: existingId }, + select: { id: true, isActive: true, isArchived: true }, + }); + if (existing && existing.isActive && !existing.isArchived) return { id: existing.id }; + // Deliberately does NOT silently create a second account when the first + // was deactivated: an operator disabled it, and that decision stands. + this.logger.warn( + `Sales expert ${admin.id} has a trading account that is inactive or archived; refusing to create another.`, + ); + return null; + } + + if (!admin.salesExpertProfile) { + // Every SALES_EXPERT gets a profile on create and on role change (D17), + // so this means something bypassed both paths. + this.logger.warn(`Sales expert ${admin.id} has no SalesExpertProfile; cannot sign in to the app.`); + return null; + } + + // The mobile is unique on Customer, so a pre-existing customer row with + // this number would collide. That cannot normally happen — the owner + // stated expert and customer numbers are never the same — but if it does, + // adopt that row rather than fail the login or create a duplicate. + const clash = await this.prisma.customer.findFirst({ + where: { mobile }, + select: { id: true, isActive: true, isArchived: true }, + }); + if (clash) { + this.logger.warn( + `Mobile ${mobile} belongs to both sales expert ${admin.id} and customer ${clash.id}; ` + + `adopting the existing customer row as the expert's trading account.`, + ); + if (!clash.isActive || clash.isArchived) return null; + await this.prisma.salesExpertProfile.update({ + where: { id: admin.salesExpertProfile.id }, + data: { tradingCustomerId: clash.id }, + }); + return { id: clash.id }; + } + + const created = await this.prisma.customer.create({ + data: { + fullName: admin.fullName, + firstName: admin.firstName, + lastName: admin.lastName, + mobile: admin.mobile, + // The expert's own national code when they have one and no other + // customer holds it (the column is unique); else none. Never the + // mobile — the column holds national codes only. + nationalCode: await this.freeNationalCode(admin.salesExpertProfile.nationalCode), + // No app password: this account is reached only through the expert's + // AdminUser session, never by a password login of its own. + passwordHash: OTP_ONLY_PASSWORD_HASH, + kind: CustomerKind.APP_SHOPKEEPER, + goldCreditLimitGrams: admin.salesExpertProfile.gramLevel, + makingChargeOffsetPercent: admin.wagePercent ?? new Prisma.Decimal(0), + }, + select: { id: true }, + }); + + await this.prisma.salesExpertProfile.update({ + where: { id: admin.salesExpertProfile.id }, + data: { tradingCustomerId: created.id }, + }); + + this.logger.log( + `Created trading account ${created.id} for sales expert ${admin.id} on first app sign-in.`, + ); + return { id: created.id }; + } + + /** + * Step 2 — port of ApiMobileController::userVerfiy (henza_server:51-64). + * + * Reference: `if (faTOen($request->password) != $customer->send_password) abort(422);` + * then issue a token and return THAT ONE customer. + * + * The parity behaviour is the comparison and the rejection. The attempt + * counter, the expiry check and the single-use consumption are the D6 + * additions. + */ + async verifyOtp(rawMobile: string, rawCode: string, ip: string | undefined) { + const mobile = faToEn(rawMobile); + const code = faToEn(rawCode); + + // One message for every failure mode, so a caller cannot tell "no code was + // sent" from "wrong code" from "expired". Declared before the master-code + // branch so that path can reject identically. + const reject = () => new UnauthorizedException('کد وارد شده صحیح نیست'); + + // D20 — the delivery master code. Checked BEFORE the stored challenge so it + // works even when the customer never requested a code (no CustomerOtp row + // exists to compare against). It does not weaken any other rule: the + // customer must still exist, be active and not archived, and the send + // throttle on requestOtp is untouched. + // + // MUST be removed from the environment before the real release — see D20 + // and DELIVERY.md. + const master = masterOtpCode(); + if (master !== null && code === master) { + // D21 — the master code works for a sales expert too, and the expert is + // checked first for the same reason requestOtp does it. + const expert = await this.resolveExpertPrincipal(mobile); + if (expert) { + this.logger.warn( + `OTP_MASTER_CODE used to sign in SALES EXPERT ${expert.adminUserId} (mobile ${mobile})`, + ); + // کد اضطراری تحویل، عامل واقعی نیست؛ عمداً به IdP اعلام نمی‌شود تا + // نشست مرکزی روی چیزی که کاربر واقعاً نداشته ساخته نشود. + return { + token: await this.issueExpertToken(expert.adminUserId, mobile, { ip }), + customer: { id: expert.tradingCustomerId, mobile }, + }; + } + + const customer = await this.prisma.customer.findFirst({ + where: { mobile, isActive: true, isArchived: false }, + select: { id: true, mobile: true }, + }); + if (!customer) throw reject(); + + // Audited with the mobile, as D20 requires, so every bypass login is + // traceable in the server log. + this.logger.warn( + `OTP_MASTER_CODE used to sign in customer ${customer.id} (mobile ${customer.mobile})`, + ); + + return { + token: await this.issueToken(customer.id, customer.mobile, { ip }), + customer: { id: customer.id, mobile: customer.mobile }, + }; + } + + const challenge = await this.prisma.customerOtp.findFirst({ + where: { mobile, consumedAt: null }, + orderBy: { createdAt: 'desc' }, + include: { + customer: { + select: { id: true, mobile: true, isActive: true, isArchived: true }, + }, + }, + }); + + if (!challenge) throw reject(); + if (challenge.expiresAt.getTime() < Date.now()) throw reject(); + + if (challenge.attempts >= MAX_ATTEMPTS) { + throw new TooManyRequestsException( + 'تعداد تلاش‌های ناموفق بیش از حد مجاز است. لطفاً کد جدیدی درخواست کنید.', + ); + } + + const ok = await bcrypt.compare(code, challenge.codeHash); + if (!ok) { + await this.prisma.customerOtp.update({ + where: { id: challenge.id }, + data: { attempts: { increment: 1 } }, + }); + throw reject(); + } + + if (!challenge.customer.isActive || challenge.customer.isArchived) { + throw reject(); + } + + // Single use: burn the challenge before issuing the token. + await this.prisma.customerOtp.update({ + where: { id: challenge.id }, + data: { consumedAt: new Date() }, + }); + + // D21 — the challenge hangs off the expert's trading Customer row, so a + // correct code here may belong to either principal. Resolved from the + // mobile, never from anything the client sent. + // کد درست بود؛ حالا همین را به مرجع هویت اعلام می‌کنیم تا نشست مرکزی، + // لاگ امنیتی و خروج سراسری شامل این ورود هم بشود. در حالت خاموش یا خرابی + // IdP، هیچ چیزی تغییر نمی‌کند و ورود مثل همیشه ادامه می‌یابد. + const identity = await this.attestToIam(mobile, ip); + + const expert = await this.resolveExpertPrincipal(mobile); + if (expert) { + return this.withBootstrap( + { + token: await this.issueExpertToken(expert.adminUserId, mobile, { identity, ip }), + customer: { id: expert.tradingCustomerId, mobile }, + }, + identity, + ); + } + + return this.withBootstrap( + { + token: await this.issueToken(challenge.customer.id, challenge.customer.mobile, { identity, ip }), + customer: { id: challenge.customer.id, mobile: challenge.customer.mobile }, + }, + identity, + ); + } + + /** + * D21 — is this mobile an active sales expert with a usable trading account? + * + * Read-only: unlike `resolveExpertTradingAccount`, this never creates + * anything, because by verify time requestOtp has already done so. Returns + * null for every ordinary customer, so their path is untouched. + */ + private async resolveExpertPrincipal( + mobile: string, + ): Promise<{ adminUserId: string; tradingCustomerId: string } | null> { + const admin = await this.prisma.adminUser.findFirst({ + where: { mobile, isActive: true, role: AdminRole.SALES_EXPERT }, + select: { + id: true, + salesExpertProfile: { + select: { + tradingCustomer: { select: { id: true, isActive: true, isArchived: true } }, + }, + }, + }, + }); + + const trading = admin?.salesExpertProfile?.tradingCustomer; + if (!admin || !trading || !trading.isActive || trading.isArchived) return null; + return { adminUserId: admin.id, tradingCustomerId: trading.id }; + } + + /** + * Sign a SALES EXPERT app token. + * + * `sub` is the AdminUser id — the durable identity — not the trading + * Customer id, so the token survives anything that changes the trading row + * and the role check can be re-applied on every request. + * + * Same secret and lifetime as a customer token; only `typ` differs. It is + * NOT an admin-panel token: JwtStrategy requires the admin type and refuses + * this one on every admin route. + */ + private async issueExpertToken( + adminUserId: string, + mobile: string, + context: IssueContext = {}, + ): Promise { + const jti = this.sessions.newTokenId(); + const payload: CustomerJwtPayload = { + sub: adminUserId, + mobile, + typ: EXPERT_TOKEN_TYPE, + ...(jti ? { jti } : {}), + }; + + const token = await this.jwt.signAsync(payload, { + secret: customerJwtSecret(), + expiresIn: envOr('JWT_CUSTOMER_EXPIRES_IN', '30d') as `${number}d`, + }); + + if (jti) { + await this.sessions.record({ + jti, + subjectId: adminUserId, + subjectType: 'sales-expert', + mobile, + iamSessionId: context.identity?.sessionId ?? null, + iamSub: context.identity?.sub ?? null, + ipAddress: context.ip ?? null, + }); + } + + return token; + } + + /** + * Sign a customer JWT. Shared by the normal verify path and the D20 master + * code so both issue exactly the same token — the bypass grants no extra + * privilege and no longer lifetime. + * + * Reference reused api_token forever once set (:60-62); a fresh token is + * issued on every verify here (T1). + */ + /** + * شروع بررسی بی‌صدای نشست IAM. کوکی امضاشده code_verifier را نگه می‌دارد + * تا در آدرس بازگشت دیده نشود. + */ + beginBrowserSso(requestedRedirect?: string): { authorizeUrl: string; cookie: string } | null { + if (!this.iam.enabled) return null; + const redirectUri = pickExactUri(requestedRedirect, [ + envOrNull('IAM_REDIRECT_URI'), + ...envList('IAM_REDIRECT_URIS'), + ]); + const clientId = envOrNull('IAM_CLIENT_ID'); + if (!redirectUri || !clientId) return null; + + const state = randomBytes(24).toString('base64url'); + const nonce = randomBytes(24).toString('base64url'); + const verifier = randomBytes(48).toString('base64url'); + const challenge = createHash('sha256').update(verifier).digest('base64url'); + const payload = Buffer.from(JSON.stringify({ state, nonce, verifier, redirectUri })).toString('base64url'); + const sig = createHmac('sha256', this.ssoSecret()).update(payload).digest('base64url'); + const secure = redirectUri.startsWith('https:'); + const cookie = + `gb_iam_sso=${payload}.${sig}; HttpOnly; Path=/; Max-Age=180; SameSite=Lax` + + (secure ? '; Secure' : ''); + + const url = new URL(`${this.iam.issuer}/oauth/authorize`); + url.searchParams.set('response_type', 'code'); + url.searchParams.set('client_id', clientId); + url.searchParams.set('redirect_uri', redirectUri); + url.searchParams.set('scope', 'openid profile email'); + url.searchParams.set('state', state); + url.searchParams.set('nonce', nonce); + url.searchParams.set('code_challenge', challenge); + url.searchParams.set('code_challenge_method', 'S256'); + url.searchParams.set('prompt', 'none'); + + return { authorizeUrl: url.toString(), cookie }; + } + + async completeBrowserSso(cookieValue: string | null, code: string, state: string, ip: string | undefined) { + const pending = this.readSsoCookie(cookieValue); + if (!pending || pending.state !== state) { + throw new UnauthorizedException('درخواست ورود مشترک معتبر نیست'); + } + + const claims = await this.iam.exchangeAuthorizationCode(code, pending.verifier, pending.redirectUri); + if (!claims.phoneNumber || !claims.sub) { + throw new UnauthorizedException('هویت مشترک شماره موبایل ندارد'); + } + + const mobiles = mobileVariants(claims.phoneNumber); + let expert: { adminUserId: string; tradingCustomerId: string } | null = null; + let expertMobile = claims.phoneNumber; + for (const candidate of mobiles) { + expert = await this.resolveExpertPrincipal(candidate); + if (expert) { + expertMobile = candidate; + break; + } + } + const identity: IamIdentity = { + sub: claims.sub, + email: null, + phoneNumber: claims.phoneNumber, + firstName: null, + lastName: null, + sessionId: claims.sessionId, + browserTicket: null, + }; + + if (expert) { + return { + token: await this.issueExpertToken(expert.adminUserId, expertMobile, { identity, ip }), + customer: { id: expert.tradingCustomerId, mobile: expertMobile }, + }; + } + + const customer = await this.prisma.customer.findFirst({ + where: { mobile: { in: mobiles }, isActive: true, isArchived: false }, + select: { id: true, mobile: true }, + }); + if (!customer) { + throw new UnauthorizedException('حسابی با این شماره در این سامانه نیست'); + } + + return { + token: await this.issueToken(customer.id, customer.mobile, { identity, ip }), + customer: { id: customer.id, mobile: customer.mobile }, + }; + } + + centralLogoutUrl(requestedReturn?: string): string | null { + if (!this.iam.enabled) return null; + const redirect = pickExactUri(requestedReturn, [ + envOrNull('IAM_POST_LOGOUT_REDIRECT_URI'), + envOrNull('IAM_BROWSER_RETURN_URL'), + ...envList('IAM_ALLOWED_RETURN_URLS'), + ]); + const clientId = envOrNull('IAM_CLIENT_ID'); + if (!redirect || !clientId) return null; + const url = new URL(`${this.iam.issuer}/oauth/logout`); + url.searchParams.set('client_id', clientId); + url.searchParams.set('post_logout_redirect_uri', redirect); + return url.toString(); + } + + private withBootstrap( + body: T, + identity: IamIdentity | null, + ): T & { iamBootstrapUrl?: string } { + const url = this.iam.browserBootstrapUrl(identity?.browserTicket); + return url ? { ...body, iamBootstrapUrl: url } : body; + } + + private ssoSecret(): string { + return envOrNull('JWT_CUSTOMER_SECRET') || envOrNull('JWT_SECRET') || envOr('IAM_CLIENT_SECRET', 'iam-sso'); + } + + private readSsoCookie(value: string | null): { state: string; nonce: string; verifier: string; redirectUri: string } | null { + if (!value || !value.includes('.')) return null; + const split = value.lastIndexOf('.'); + const payload = value.slice(0, split); + const sig = value.slice(split + 1); + const expected = createHmac('sha256', this.ssoSecret()).update(payload).digest('base64url'); + if (expected.length !== sig.length) return null; + let same = 0; + for (let i = 0; i < expected.length; i++) same |= expected.charCodeAt(i) ^ sig.charCodeAt(i); + if (same !== 0) return null; + try { + return JSON.parse(Buffer.from(payload, 'base64url').toString('utf8')); + } catch { + return null; + } + } + + private async issueToken( + customerId: string, + mobile: string, + context: IssueContext = {}, + ): Promise { + // null while session tracking is off ⇒ همان توکن قبلی، بدون ادعای اضافه + const jti = this.sessions.newTokenId(); + const payload: CustomerJwtPayload = { + sub: customerId, + mobile, + typ: CUSTOMER_TOKEN_TYPE, + ...(jti ? { jti } : {}), + }; + + const token = await this.jwt.signAsync(payload, { + secret: customerJwtSecret(), + // jsonwebtoken types expiresIn as a template-literal union, which a plain + // string from process.env does not satisfy — same cast AuthModule uses. + expiresIn: envOr('JWT_CUSTOMER_EXPIRES_IN', '30d') as `${number}d`, + }); + + if (jti) { + await this.sessions.record({ + jti, + subjectId: customerId, + subjectType: 'customer', + mobile, + iamSessionId: context.identity?.sessionId ?? null, + iamSub: context.identity?.sub ?? null, + ipAddress: context.ip ?? null, + }); + } + + return token; + } + + /** + * Per-mobile and per-IP send throttle. + * + * Counted off the CustomerOtp rows rather than an in-memory map, so the limit + * survives a restart and holds across replicas. The reference had no limit: + * userAuth could be called in a loop, each call sending a real (billed) SMS. + */ + private async assertSendAllowed(mobile: string, ip: string | undefined) { + const since = new Date(Date.now() - SEND_WINDOW_MS); + + const lastToMobile = await this.prisma.customerOtp.findFirst({ + where: { mobile }, + orderBy: { createdAt: 'desc' }, + select: { createdAt: true }, + }); + if (lastToMobile && Date.now() - lastToMobile.createdAt.getTime() < RESEND_COOLDOWN_MS) { + const wait = Math.ceil( + (RESEND_COOLDOWN_MS - (Date.now() - lastToMobile.createdAt.getTime())) / 1000, + ); + throw new TooManyRequestsException(`لطفاً ${wait} ثانیه دیگر تلاش کنید`); + } + + const sentToMobile = await this.prisma.customerOtp.count({ + where: { mobile, createdAt: { gte: since } }, + }); + if (sentToMobile >= MAX_SENDS_PER_MOBILE) { + throw new TooManyRequestsException( + 'تعداد درخواست‌های کد بیش از حد مجاز است. لطفاً بعداً تلاش کنید.', + ); + } + + if (ip) { + const sentFromIp = await this.prisma.customerOtp.count({ + where: { requestIp: ip, createdAt: { gte: since } }, + }); + if (sentFromIp >= MAX_SENDS_PER_IP) { + throw new TooManyRequestsException( + 'تعداد درخواست‌های کد بیش از حد مجاز است. لطفاً بعداً تلاش کنید.', + ); + } + } + } + + /** + * Hands the code to the SMS gateway (SmsService -> the SMS_PROVIDER driver, + * relay by default per D26). + * + * When no gateway is configured, SmsService does not send and the code is + * logged instead — outside production only (D20). + * + * A failed send does NOT throw. The reference ignored Sms::Send's result, so + * a gateway outage never blocked the flow that triggered it; the customer + * simply retries, and the throttle in assertSendAllowed still applies. + */ + private async deliver(mobile: string, code: string) { + // BYTE-IDENTICAL to the reference (ApiMobileController.php:47). The + // leading "<#> code is " line and the trailing "aMo6iFyUQaY" are the + // Android SMS Retriever app hash — change either and autofill stops + // working on every installed client. Do not "tidy" this string. + const smsText = + `<#> code is ${code}\n` + + `رمز عبور یکبار مصرف شما جهت ورود به اپلیکشن هنزا گلد ${code} می باشد\n` + + `aMo6iFyUQaY`; + + // persist:false — the real text carries the live code, and the admin SMS + // grid lists and searches `body` (SEC-11). The redacted audit row below + // takes its place. + await this.sms.send(mobile, smsText, { persist: false }); + + // Only outside production, and only when no gateway is configured, so a + // deployment can never print live codes into its logs. + if (process.env.NODE_ENV !== 'production' && !smsConfigured()) { + this.logger.log(`[dev] OTP for ${mobile}: ${code}`); + } + + // An audit row, NOT the message body. + // + // SmsMessage.body is listed and full-text searchable on the admin panel's + // SMS grid (admin-misc.service.ts:136 allows `body`, :135 searches it), so + // persisting the real text would show every live OTP to any operator + // holding the `sms` rid — and the whole point of hashing codeHash is that + // the code exists nowhere in readable form. The code is redacted here. + await this.prisma.smsMessage.create({ + data: { + audience: MessageAudience.SINGLE_NUMBER, + recipients: mobile, + body: 'کد یکبار مصرف ورود (متن پیام ثبت نمی‌شود)', + sentCount: 1, + }, + }); + } +} + +/** + * Customer tokens are signed with their own secret so an admin token can never + * validate as a customer token, or the reverse, even if the `typ` check were + * ever removed (T1). + */ +export function customerJwtSecret(): string { + return ( + envOrNull('JWT_CUSTOMER_SECRET') ?? + envOrNull('JWT_SECRET') ?? + 'dev-only-insecure-customer-secret' + ); +} diff --git a/apps/api/src/modules/customer-auth/customer-jwt.strategy.ts b/apps/api/src/modules/customer-auth/customer-jwt.strategy.ts new file mode 100644 index 0000000..801a0dd --- /dev/null +++ b/apps/api/src/modules/customer-auth/customer-jwt.strategy.ts @@ -0,0 +1,131 @@ +import { Injectable, UnauthorizedException } from '@nestjs/common'; +import { PassportStrategy } from '@nestjs/passport'; +import { AdminRole } from '@prisma/client'; +import { ExtractJwt, Strategy } from 'passport-jwt'; +import { PrismaService } from '../../prisma/prisma.service'; +import { customerJwtSecret } from './customer-auth.service'; +import { + CUSTOMER_TOKEN_TYPE, + EXPERT_TOKEN_TYPE, + type AppJwtPayload, + type AuthenticatedCustomer, +} from './app-principal'; +import { AppSessionService } from '../sessions/app-session.service'; + +export { + CUSTOMER_TOKEN_TYPE, + EXPERT_TOKEN_TYPE, + type AuthenticatedCustomer, +} from './app-principal'; + +/** Kept for the existing imports; the payload now covers both principals. */ +export type CustomerJwtPayload = AppJwtPayload; + +/** + * The app principal, kept entirely separate from JwtStrategy (which reads + * AdminUser for the admin PANEL). The reference had the same split: `auth:api` + * for admins and `auth('api-customer')` for the app. + * + * This strategy accepts TWO token types and resolves both to one shape: + * + * typ 'customer' -> the Customer row named by `sub` + * typ 'sales-expert' -> the AdminUser named by `sub`, plus their trading + * Customer row, which becomes `id` + * + * Because `id` is always a Customer id, every route already written for a + * customer works unchanged for an expert — which is exactly the reference's + * behaviour, where an agent was a customer with extra screens. + * + * An expert's app token is NOT an admin-panel token: its `typ` is + * 'sales-expert', while JwtStrategy requires the admin type, so it is refused + * on every admin route. + */ +@Injectable() +export class CustomerJwtStrategy extends PassportStrategy(Strategy, 'customer-jwt') { + constructor( + private readonly prisma: PrismaService, + private readonly sessions: AppSessionService, + ) { + super({ + jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(), + ignoreExpiration: false, + secretOrKey: customerJwtSecret(), + }); + } + + async validate(payload: AppJwtPayload): Promise { + // نشست باطل‌شده (خروج سراسری از IdP یا ابطال محلی). در حالت خاموشِ ردیابی، + // بدون هیچ کوئری true برمی‌گردد ⇒ هزینه و رفتار دقیقاً مثل قبل. + if (!(await this.sessions.isActive(payload?.jti))) { + throw new UnauthorizedException(); + } + + if (payload?.typ === EXPERT_TOKEN_TYPE) { + return this.validateExpert(payload); + } + + // A token that is not explicitly a customer token is refused, whatever + // else it carries. + if (payload?.typ !== CUSTOMER_TOKEN_TYPE) { + throw new UnauthorizedException(); + } + + // Re-read on every request, so deactivating or archiving a customer takes + // effect immediately instead of at token expiry. + const customer = await this.prisma.customer.findUnique({ + where: { id: payload.sub }, + select: { id: true, mobile: true, isActive: true, isArchived: true }, + }); + + if (!customer || !customer.isActive || customer.isArchived) { + throw new UnauthorizedException(); + } + + return { id: customer.id, mobile: customer.mobile, type: CUSTOMER_TOKEN_TYPE }; + } + + /** + * A sales expert. `sub` is their AdminUser id, so the role and active flag + * are re-checked on every request: demoting an expert or deactivating them + * locks them out immediately rather than at token expiry. + * + * The trading Customer row is resolved here rather than stored in the token, + * so a token issued before that row existed keeps working. + */ + private async validateExpert(payload: AppJwtPayload): Promise { + const admin = await this.prisma.adminUser.findUnique({ + where: { id: payload.sub }, + select: { + id: true, + mobile: true, + role: true, + isActive: true, + salesExpertProfile: { + select: { + tradingCustomerId: true, + tradingCustomer: { select: { id: true, isActive: true, isArchived: true } }, + }, + }, + }, + }); + + if (!admin || !admin.isActive || admin.role !== AdminRole.SALES_EXPERT) { + throw new UnauthorizedException(); + } + + const trading = admin.salesExpertProfile?.tradingCustomer; + if (!trading || !trading.isActive || trading.isArchived) { + // The account is created at sign-in; if it is missing or has been + // deactivated, the session cannot act. Refused rather than silently + // degraded, so an expert never places an order against nothing. + throw new UnauthorizedException(); + } + + return { + id: trading.id, + mobile: admin.mobile, + type: EXPERT_TOKEN_TYPE, + adminUserId: admin.id, + }; + } +} diff --git a/apps/api/src/modules/customer-auth/customer.guards.ts b/apps/api/src/modules/customer-auth/customer.guards.ts new file mode 100644 index 0000000..36e2270 --- /dev/null +++ b/apps/api/src/modules/customer-auth/customer.guards.ts @@ -0,0 +1,33 @@ +import { ExecutionContext, Injectable, createParamDecorator } from '@nestjs/common'; +import { AuthGuard } from '@nestjs/passport'; +import { Public } from '../auth/guards'; +import { applyDecorators, UseGuards } from '@nestjs/common'; +import type { AuthenticatedCustomer } from './customer-jwt.strategy'; + +/** Passport guard for the 'customer-jwt' strategy. */ +@Injectable() +export class CustomerJwtGuard extends AuthGuard('customer-jwt') {} + +/** + * Put on every customer route. + * + * Two decorators, because the globally-registered admin JwtAuthGuard runs + * first on every route in the app: `@Public()` takes the route out of the admin + * guard's hands, and CustomerJwtGuard then requires a valid customer token. The + * route is therefore NOT public — swapping the order or dropping either half + * would either lock customers out or leave the route open. + */ +export const CustomerAuth = () => applyDecorators(Public(), UseGuards(CustomerJwtGuard)); + +/** + * The authenticated customer: `@CurrentCustomer() me: AuthenticatedCustomer`. + * + * Every customer route derives its subject from this, never from an id in the + * URL or body. That is what closes the IDOR the old /customers/:id routes had, + * and it matches the reference, which read `auth()->id()` + * (henza_server ApiMobileController.php:533). + */ +export const CurrentCustomer = createParamDecorator( + (_data: unknown, ctx: ExecutionContext): AuthenticatedCustomer => + ctx.switchToHttp().getRequest().user, +); diff --git a/apps/api/src/modules/customer-auth/digits.spec.ts b/apps/api/src/modules/customer-auth/digits.spec.ts new file mode 100644 index 0000000..cfc8652 --- /dev/null +++ b/apps/api/src/modules/customer-auth/digits.spec.ts @@ -0,0 +1,39 @@ +import { faToEn } from './digits'; + +/** + * Digit normalisation, ported from the reference's Utility::faTOen(), which + * every mobile number and every submitted OTP code passes through before it is + * compared (henza_server ApiMobileController.php:42,56). + * + * Without it a user typing ۱۲۳۴ on a Persian keypad could never match a stored + * 1234, and the phone lookup would miss a registered customer entirely. + */ +describe('faToEn', () => { + it('converts Persian (Extended Arabic-Indic) digits', () => { + expect(faToEn('۰۹۱۲۸۰۸۱۳۹۲')).toBe('09128081392'); + }); + + it('converts Arabic-Indic digits', () => { + expect(faToEn('٠٩١٢٨٠٨١٣٩٢')).toBe('09128081392'); + }); + + it('leaves ASCII digits untouched', () => { + expect(faToEn('09128081392')).toBe('09128081392'); + }); + + it('handles a mixed-script number', () => { + expect(faToEn('۰۹12۸0۸1۳۹۲')).toBe('09128081392'); + }); + + it('trims surrounding whitespace, as a pasted number often carries', () => { + expect(faToEn(' ۰۹۱۲۳۴۵۶۷۸۹ ')).toBe('09123456789'); + }); + + it('normalises a 4-digit OTP code the same way', () => { + expect(faToEn('۷۳۵۷')).toBe('7357'); + }); + + it('is a no-op on an empty string', () => { + expect(faToEn('')).toBe(''); + }); +}); diff --git a/apps/api/src/modules/customer-auth/digits.ts b/apps/api/src/modules/customer-auth/digits.ts new file mode 100644 index 0000000..429f707 --- /dev/null +++ b/apps/api/src/modules/customer-auth/digits.ts @@ -0,0 +1,18 @@ +/** + * Persian/Arabic-Indic digits to ASCII. + * + * Port of the reference's `Utility::faTOen()`, which every mobile number and + * every submitted OTP code passes through before being compared + * (henza_server ApiMobileController.php:42,56). The app's numeric keypad emits + * Persian digits, so without this a user typing ۱۲۳۴ would never match a stored + * 1234 and the phone lookup would miss a registered customer entirely. + * + * Kept in its own module, free of Nest and Prisma imports, so it can be unit + * tested without booting the DI container. + */ +export function faToEn(input: string): string { + return input + .replace(/[۰-۹]/g, (d) => String(d.charCodeAt(0) - 0x06f0)) + .replace(/[٠-٩]/g, (d) => String(d.charCodeAt(0) - 0x0660)) + .trim(); +} diff --git a/apps/api/src/modules/customer-auth/dto/request-otp.dto.ts b/apps/api/src/modules/customer-auth/dto/request-otp.dto.ts new file mode 100644 index 0000000..8ca5876 --- /dev/null +++ b/apps/api/src/modules/customer-auth/dto/request-otp.dto.ts @@ -0,0 +1,9 @@ +import { IsNotEmpty, IsString, MaxLength } from 'class-validator'; + +/** Body of POST customer/auth/request-otp. Legacy called this field `username`. */ +export class RequestOtpDto { + @IsString() + @IsNotEmpty({ message: 'شماره موبایل الزامی است' }) + @MaxLength(20) + username!: string; +} diff --git a/apps/api/src/modules/customer-auth/dto/verify-otp.dto.ts b/apps/api/src/modules/customer-auth/dto/verify-otp.dto.ts new file mode 100644 index 0000000..f93ddbe --- /dev/null +++ b/apps/api/src/modules/customer-auth/dto/verify-otp.dto.ts @@ -0,0 +1,19 @@ +import { IsNotEmpty, IsString, MaxLength } from 'class-validator'; + +/** + * Body of POST customer/auth/verify-otp. + * + * Field names match the reference's userVerfiy, which took `username` and + * `password` (henza_server ApiMobileController.php:53). + */ +export class VerifyOtpDto { + @IsString() + @IsNotEmpty({ message: 'شماره موبایل الزامی است' }) + @MaxLength(20) + username!: string; + + @IsString() + @IsNotEmpty({ message: 'کد الزامی است' }) + @MaxLength(10) + password!: string; +} diff --git a/apps/api/src/modules/customer-auth/master-otp.spec.ts b/apps/api/src/modules/customer-auth/master-otp.spec.ts new file mode 100644 index 0000000..1a6dad8 --- /dev/null +++ b/apps/api/src/modules/customer-auth/master-otp.spec.ts @@ -0,0 +1,215 @@ +import { UnauthorizedException } from '@nestjs/common'; + +// @nestjs/jwt v12 ships ESM only, which this CommonJS jest setup cannot load. +// The service is constructed with a hand-built JwtService double anyway, so the +// real module is never used here — stubbing it keeps the suite runnable without +// touching the shared jest config (D19: lowest-risk option). +jest.mock('@nestjs/jwt', () => ({ JwtService: class {} })); + +import { CustomerAuthService, masterOtpCode, masterOtpEnabled } from './customer-auth.service'; + +/** + * D20 — the delivery master OTP. + * + * The three cases the owner specified: + * 1. with OTP_MASTER_CODE set, that code signs an active customer in; + * 2. with the variable absent, the same code is rejected; + * 3. the real, stored code still works. + * + * Plus the guards that must survive the bypass: an inactive or archived + * customer is still refused, and an unknown mobile is still refused. + * + * The service is driven with hand-built doubles rather than a Nest testing + * module, so these run without a database. + */ +describe('OTP_MASTER_CODE (D20)', () => { + const saved = { ...process.env }; + + /** An active customer whose stored challenge holds the real code "4321". */ + const CUSTOMER = { id: 'cus_1', mobile: '09121112233', isActive: true, isArchived: false }; + + let prisma: { + customer: { findFirst: jest.Mock }; + customerOtp: { findFirst: jest.Mock; update: jest.Mock; create: jest.Mock; count: jest.Mock }; + // D21 — verify now asks whether the mobile is a sales expert before + // treating it as a customer. These tests are all about the CUSTOMER path, + // so it answers "not an expert" and the customer branch runs as before. + adminUser: { findFirst: jest.Mock }; + }; + let jwt: { signAsync: jest.Mock }; + let sms: { send: jest.Mock }; + let service: CustomerAuthService; + + beforeEach(() => { + delete process.env.OTP_MASTER_CODE; + process.env.JWT_CUSTOMER_SECRET = 'test-secret'; + + prisma = { + customer: { findFirst: jest.fn().mockResolvedValue(CUSTOMER) }, + customerOtp: { + findFirst: jest.fn().mockResolvedValue(null), + update: jest.fn().mockResolvedValue({}), + create: jest.fn().mockResolvedValue({}), + count: jest.fn().mockResolvedValue(0), + }, + // No sales expert on this mobile — the customer path under test. + adminUser: { findFirst: jest.fn().mockResolvedValue(null) }, + }; + jwt = { signAsync: jest.fn().mockResolvedValue('signed.jwt.token') }; + sms = { send: jest.fn().mockResolvedValue({ ok: true }) }; + + // IAM خاموش و ردیابی نشست خاموش ⇒ همان رفتار قبلی این سرویس + const iam = { enabled: false, attestOtpLogin: jest.fn(), browserBootstrapUrl: () => null }; + const sessions = { newTokenId: jest.fn().mockReturnValue(null), record: jest.fn() }; + + service = new CustomerAuthService( + prisma as never, + jwt as never, + sms as never, + iam as never, + sessions as never, + ); + // The bypass logs every use; keep the test output clean. + jest.spyOn(service['logger'], 'warn').mockImplementation(() => undefined); + }); + + afterAll(() => { + process.env = { ...saved }; + }); + + describe('the env switch itself', () => { + it('is disabled when the variable is absent', () => { + expect(masterOtpCode()).toBeNull(); + expect(masterOtpEnabled()).toBe(false); + }); + + it('is disabled when the variable is empty or only whitespace', () => { + process.env.OTP_MASTER_CODE = ''; + expect(masterOtpEnabled()).toBe(false); + process.env.OTP_MASTER_CODE = ' '; + expect(masterOtpEnabled()).toBe(false); + }); + + it('is enabled when the variable holds a code', () => { + process.env.OTP_MASTER_CODE = '1379'; + expect(masterOtpCode()).toBe('1379'); + expect(masterOtpEnabled()).toBe(true); + }); + }); + + describe('1 — the master code signs an active customer in', () => { + it('issues a token without any stored challenge', async () => { + process.env.OTP_MASTER_CODE = '1379'; + + const result = await service.verifyOtp(CUSTOMER.mobile, '1379', '127.0.0.1'); + + expect(result.token).toBe('signed.jwt.token'); + expect(result.customer).toEqual({ id: CUSTOMER.id, mobile: CUSTOMER.mobile }); + // It must not depend on a CustomerOtp row existing. + expect(prisma.customerOtp.findFirst).not.toHaveBeenCalled(); + }); + + it('accepts the master code typed with Persian digits', async () => { + // faToEn runs before the comparison, as it does for a real code. + process.env.OTP_MASTER_CODE = '1379'; + await expect(service.verifyOtp(CUSTOMER.mobile, '۱۳۷۹', undefined)).resolves.toMatchObject({ + token: 'signed.jwt.token', + }); + }); + + it('logs the bypass with the customer mobile', async () => { + process.env.OTP_MASTER_CODE = '1379'; + const warn = jest.spyOn(service['logger'], 'warn'); + + await service.verifyOtp(CUSTOMER.mobile, '1379', undefined); + + expect(warn).toHaveBeenCalledWith(expect.stringContaining(CUSTOMER.mobile)); + expect(warn).toHaveBeenCalledWith(expect.stringContaining('OTP_MASTER_CODE')); + }); + + it('still refuses an inactive or archived customer', async () => { + process.env.OTP_MASTER_CODE = '1379'; + // The lookup filters on isActive/isArchived, so it finds nothing. + prisma.customer.findFirst.mockResolvedValue(null); + + await expect(service.verifyOtp(CUSTOMER.mobile, '1379', undefined)).rejects.toBeInstanceOf( + UnauthorizedException, + ); + }); + + it('still refuses a mobile that belongs to no customer', async () => { + process.env.OTP_MASTER_CODE = '1379'; + prisma.customer.findFirst.mockResolvedValue(null); + + await expect(service.verifyOtp('09990000000', '1379', undefined)).rejects.toBeInstanceOf( + UnauthorizedException, + ); + }); + }); + + describe('2 — without the env var the same code is rejected', () => { + it('falls through to the normal path and rejects it', async () => { + // No OTP_MASTER_CODE, and no stored challenge to match. + await expect(service.verifyOtp(CUSTOMER.mobile, '1379', undefined)).rejects.toBeInstanceOf( + UnauthorizedException, + ); + // It took the ordinary route, which does consult the challenge table. + expect(prisma.customerOtp.findFirst).toHaveBeenCalled(); + expect(jwt.signAsync).not.toHaveBeenCalled(); + }); + + it('rejects a code that merely resembles the master one while it is armed', async () => { + process.env.OTP_MASTER_CODE = '1379'; + + await expect(service.verifyOtp(CUSTOMER.mobile, '1378', undefined)).rejects.toBeInstanceOf( + UnauthorizedException, + ); + expect(jwt.signAsync).not.toHaveBeenCalled(); + }); + }); + + describe('3 — the real code still works', () => { + /** bcrypt hash of "4321", generated once for this test. */ + const bcrypt = require('bcryptjs') as typeof import('bcryptjs'); + + const challengeWith = async (code: string) => ({ + id: 'otp_1', + codeHash: await bcrypt.hash(code, 4), + expiresAt: new Date(Date.now() + 60_000), + attempts: 0, + customer: CUSTOMER, + }); + + it('verifies a stored code while the master code is armed', async () => { + process.env.OTP_MASTER_CODE = '1379'; + prisma.customerOtp.findFirst.mockResolvedValue(await challengeWith('4321')); + + const result = await service.verifyOtp(CUSTOMER.mobile, '4321', undefined); + + expect(result.token).toBe('signed.jwt.token'); + // The real path burns the challenge; the master path never touches it. + expect(prisma.customerOtp.update).toHaveBeenCalledWith( + expect.objectContaining({ data: expect.objectContaining({ consumedAt: expect.any(Date) }) }), + ); + }); + + it('verifies a stored code while the master code is absent', async () => { + prisma.customerOtp.findFirst.mockResolvedValue(await challengeWith('4321')); + + await expect(service.verifyOtp(CUSTOMER.mobile, '4321', undefined)).resolves.toMatchObject({ + token: 'signed.jwt.token', + }); + }); + + it('still rejects a wrong code and counts the attempt', async () => { + prisma.customerOtp.findFirst.mockResolvedValue(await challengeWith('4321')); + + await expect(service.verifyOtp(CUSTOMER.mobile, '0000', undefined)).rejects.toBeInstanceOf( + UnauthorizedException, + ); + expect(prisma.customerOtp.update).toHaveBeenCalledWith( + expect.objectContaining({ data: { attempts: { increment: 1 } } }), + ); + }); + }); +}); diff --git a/apps/api/src/modules/customer-favorites/customer-favorites.controller.ts b/apps/api/src/modules/customer-favorites/customer-favorites.controller.ts new file mode 100644 index 0000000..5d429ca --- /dev/null +++ b/apps/api/src/modules/customer-favorites/customer-favorites.controller.ts @@ -0,0 +1,30 @@ +import { Body, Controller, Get, HttpCode, Post } from '@nestjs/common'; +import { CurrentCustomer, CustomerAuth } from '../customer-auth/customer.guards'; +import type { AuthenticatedCustomer } from '../customer-auth/customer-jwt.strategy'; +import { CustomerFavoritesService } from './customer-favorites.service'; +import { ToggleFavoriteDto } from './dto/toggle-favorite.dto'; + +/** + * Legacy endpoints (routes/api.php:84-85, customer guard): + * POST add-to-fav -> POST customer/me/favorites/toggle + * POST get-favorites -> GET customer/me/favorites + * The customer always comes from the token (D21); for a sales expert that is + * their trading account. + */ +@Controller('customer/me/favorites') +export class CustomerFavoritesController { + constructor(private readonly favorites: CustomerFavoritesService) {} + + @CustomerAuth() + @Get() + list(@CurrentCustomer() me: AuthenticatedCustomer) { + return this.favorites.list(me.id); + } + + @CustomerAuth() + @Post('toggle') + @HttpCode(200) + toggle(@Body() dto: ToggleFavoriteDto, @CurrentCustomer() me: AuthenticatedCustomer) { + return this.favorites.toggle(me.id, dto.productId); + } +} diff --git a/apps/api/src/modules/customer-favorites/customer-favorites.module.ts b/apps/api/src/modules/customer-favorites/customer-favorites.module.ts new file mode 100644 index 0000000..a054e20 --- /dev/null +++ b/apps/api/src/modules/customer-favorites/customer-favorites.module.ts @@ -0,0 +1,11 @@ +import { Module } from '@nestjs/common'; +import { PrismaModule } from '../../prisma/prisma.module'; +import { CustomerFavoritesController } from './customer-favorites.controller'; +import { CustomerFavoritesService } from './customer-favorites.service'; + +@Module({ + imports: [PrismaModule], + controllers: [CustomerFavoritesController], + providers: [CustomerFavoritesService], +}) +export class CustomerFavoritesModule {} diff --git a/apps/api/src/modules/customer-favorites/customer-favorites.service.spec.ts b/apps/api/src/modules/customer-favorites/customer-favorites.service.spec.ts new file mode 100644 index 0000000..c38e4fa --- /dev/null +++ b/apps/api/src/modules/customer-favorites/customer-favorites.service.spec.ts @@ -0,0 +1,49 @@ +import { NotFoundException } from '@nestjs/common'; +import { CustomerFavoritesService } from './customer-favorites.service'; + +/** FAV-01 — favourites live on the server, toggled the way legacy did. */ +describe('CustomerFavoritesService', () => { + function build(rows: { customerId: string; productId: string }[], products = ['p1', 'p2']) { + const prisma = { + customerFavorite: { + findMany: jest.fn(async ({ where }: { where: { customerId: string } }) => + rows.filter((r) => r.customerId === where.customerId).map((r) => ({ productId: r.productId })), + ), + deleteMany: jest.fn(async ({ where }: { where: { customerId: string; productId: string } }) => { + const before = rows.length; + rows.splice(0, rows.length, ...rows.filter((r) => !(r.customerId === where.customerId && r.productId === where.productId))); + return { count: before - rows.length }; + }), + upsert: jest.fn(async ({ create }: { create: { customerId: string; productId: string } }) => { + rows.push(create); + return create; + }), + }, + product: { + findUnique: jest.fn(async ({ where }: { where: { id: string } }) => (products.includes(where.id) ? { id: where.id } : null)), + }, + }; + return { service: new CustomerFavoritesService(prisma as never), rows }; + } + + it('lists only the caller’s own favourites', async () => { + const { service } = build([ + { customerId: 'c1', productId: 'p1' }, + { customerId: 'c2', productId: 'p2' }, + ]); + expect(await service.list('c1')).toEqual({ ids: ['p1'] }); + }); + + it('adds when absent and removes when present', async () => { + const { service, rows } = build([]); + expect(await service.toggle('c1', 'p1')).toEqual({ favorite: true }); + expect(rows).toEqual([{ customerId: 'c1', productId: 'p1' }]); + expect(await service.toggle('c1', 'p1')).toEqual({ favorite: false }); + expect(rows).toEqual([]); + }); + + it('refuses a product that does not exist', async () => { + const { service } = build([]); + await expect(service.toggle('c1', 'nope')).rejects.toBeInstanceOf(NotFoundException); + }); +}); diff --git a/apps/api/src/modules/customer-favorites/customer-favorites.service.ts b/apps/api/src/modules/customer-favorites/customer-favorites.service.ts new file mode 100644 index 0000000..90080c7 --- /dev/null +++ b/apps/api/src/modules/customer-favorites/customer-favorites.service.ts @@ -0,0 +1,40 @@ +import { Injectable, NotFoundException } from '@nestjs/common'; +import { PrismaService } from '../../prisma/prisma.service'; + +/** + * The customer's favourite products, kept on the server as legacy did + * (`major_favorites`, ApiMobileController::toggleFavorite / getFavorites). + * The apps used to keep them in memory only, so they vanished on reload and + * the 874 favourites imported from legacy were never shown (FAV-01). + */ +@Injectable() +export class CustomerFavoritesService { + constructor(private readonly prisma: PrismaService) {} + + /** + * Product ids, newest first (legacy: `orderBy('updated_at', 'DESC')`). + * Legacy also hid inactive products; the apps render favourites from the + * catalogue, which already lists only active ones, so ids are enough. + */ + async list(customerId: string) { + const rows = await this.prisma.customerFavorite.findMany({ + where: { customerId }, + orderBy: { createdAt: 'desc' }, + select: { productId: true }, + }); + return { ids: rows.map((r) => r.productId) }; + } + + /** Legacy toggle: delete if present, else add. Answers the new state. */ + async toggle(customerId: string, productId: string) { + const key = { customerId_productId: { customerId, productId } }; + const removed = await this.prisma.customerFavorite.deleteMany({ where: { customerId, productId } }); + if (removed.count > 0) return { favorite: false }; + + const product = await this.prisma.product.findUnique({ where: { id: productId }, select: { id: true } }); + if (!product) throw new NotFoundException('محصول یافت نشد'); + // upsert, so a double tap racing itself cannot fail on the primary key. + await this.prisma.customerFavorite.upsert({ where: key, create: { customerId, productId }, update: {} }); + return { favorite: true }; + } +} diff --git a/apps/api/src/modules/customer-favorites/dto/toggle-favorite.dto.ts b/apps/api/src/modules/customer-favorites/dto/toggle-favorite.dto.ts new file mode 100644 index 0000000..d033d12 --- /dev/null +++ b/apps/api/src/modules/customer-favorites/dto/toggle-favorite.dto.ts @@ -0,0 +1,9 @@ +import { IsNotEmpty, IsString, MaxLength } from 'class-validator'; + +/** Legacy `POST add-to-fav` sent `{ id }`; the product id here is explicit. */ +export class ToggleFavoriteDto { + @IsString() + @IsNotEmpty({ message: 'شناسه‌ی محصول الزامی است' }) + @MaxLength(64) + productId!: string; +} diff --git a/apps/api/src/modules/customer-profile/customer-profile.controller.ts b/apps/api/src/modules/customer-profile/customer-profile.controller.ts new file mode 100644 index 0000000..c4911f4 --- /dev/null +++ b/apps/api/src/modules/customer-profile/customer-profile.controller.ts @@ -0,0 +1,79 @@ +import { + Controller, + HttpCode, + Post, + UploadedFile, + UseInterceptors, +} from '@nestjs/common'; +import { Body } from '@nestjs/common'; +import { FileInterceptor } from '@nestjs/platform-express'; +import { CustomerProfileService } from './customer-profile.service'; +import { AdminUploadsService } from '../admin-uploads/admin-uploads.service'; +import { CompleteProfileDto } from './dto/complete-profile.dto'; +import { CurrentCustomer, CustomerAuth } from '../customer-auth/customer.guards'; +import type { AuthenticatedCustomer } from '../customer-auth/customer-jwt.strategy'; + +/** See AdminUploadsController — the same locally-declared multer subset. */ +interface UploadedMulterFile { + originalname: string; + mimetype: string; + size: number; + buffer: Buffer; +} + +/** + * The customer's own profile writes. + * + * Legacy endpoints: + * POST file/create -> the PWA's SingleImageUploader posted here with the + * customer token (routes/api.php:95, inside the + * `auth:api-customer` group) + * POST major/complete -> Major\CustomerController::complete + * (routes/api.php:114) + * + * Both are mounted under /customer/me here so the customer surface stays in one + * place. The subject always comes from the token — no id is accepted from the + * client, per D21. + */ +@Controller('customer/me') +export class CustomerProfileController { + constructor( + private readonly profile: CustomerProfileService, + private readonly uploads: AdminUploadsService, + ) {} + + /** + * A customer uploading one of their own documents. + * + * The reference let the app upload through the very same `file/create` the + * admin panel used, behind the customer guard (routes/api.php:95). The + * target's copy of that route sits behind an ADMIN guard + * (AdminUploadsController), which no app token can pass — so without this + * route the page could not upload at all. + * + * It reuses AdminUploadsService unchanged, so the size limit, the MIME + * whitelist and the stored-name scheme are identical on both paths. The + * uploader is recorded as null rather than as an admin, because + * `UploadedFile.uploadedByAdminUserId` is an AdminUser FK and this caller is + * a customer; `purpose` carries the document kind instead. + */ + @CustomerAuth() + @Post('documents') + @HttpCode(200) + @UseInterceptors(FileInterceptor('file')) + upload( + @UploadedFile() file: UploadedMulterFile | undefined, + @Body('purpose') purpose: string | undefined, + @CurrentCustomer() _me: AuthenticatedCustomer, + ) { + return this.uploads.store(file, purpose ?? 'customer-document', null); + } + + /** Ports POST major/complete. The customer is the token's. */ + @CustomerAuth() + @Post('complete-profile') + @HttpCode(200) + complete(@Body() dto: CompleteProfileDto, @CurrentCustomer() me: AuthenticatedCustomer) { + return this.profile.complete(me.id, dto); + } +} diff --git a/apps/api/src/modules/customer-profile/customer-profile.module.ts b/apps/api/src/modules/customer-profile/customer-profile.module.ts new file mode 100644 index 0000000..5d96731 --- /dev/null +++ b/apps/api/src/modules/customer-profile/customer-profile.module.ts @@ -0,0 +1,20 @@ +import { Module } from '@nestjs/common'; +import { PrismaModule } from '../../prisma/prisma.module'; +import { SmsModule } from '../sms/sms.module'; +import { AdminUploadsModule } from '../admin-uploads/admin-uploads.module'; +import { CustomerProfileController } from './customer-profile.controller'; +import { CustomerProfileService } from './customer-profile.service'; + +/** + * The customer's own profile writes ("تکمیل پروفایل"). + * + * AdminUploadsModule is imported for its service only — the controller reuses + * it so both upload paths share one implementation, rather than for its + * admin-guarded routes. + */ +@Module({ + imports: [PrismaModule, SmsModule, AdminUploadsModule], + controllers: [CustomerProfileController], + providers: [CustomerProfileService], +}) +export class CustomerProfileModule {} diff --git a/apps/api/src/modules/customer-profile/customer-profile.service.ts b/apps/api/src/modules/customer-profile/customer-profile.service.ts new file mode 100644 index 0000000..b79178e --- /dev/null +++ b/apps/api/src/modules/customer-profile/customer-profile.service.ts @@ -0,0 +1,126 @@ +import { BadRequestException, Injectable, Logger, NotFoundException } from '@nestjs/common'; +import { PrismaService } from '../../prisma/prisma.service'; +import { SmsService } from '../sms/sms.service'; +import { CompleteProfileDto } from './dto/complete-profile.dto'; + +/** + * "تکمیل پروفایل" — the customer uploads their three documents. + * + * Ports henza_server Major/CustomerController::complete + * (app/Http/Controllers/Major/CustomerController.php:73-108), reached from the + * PWA at POST /major/complete (completeProfile.vue:193). + * + * Reference behaviour kept: + * - all three document ids are required (:75-79); a miss is a 422 + * - the customer is taken from the session (`auth('api-customer')->id()`, :86) + * - the verification step is set to the reference's post-change value 2, + * i.e. approved outright, NOT "waiting for an expert" — the reference's + * own `$input['sts_verify_step_two'] = 1;` line is commented out at :83 + * in favour of `= 2` at :85. Here that is VerificationStep.VERIFIED. + * - the customer SMS and the admin SMS, both byte-identical (:97-105) + * + * Reference behaviour deliberately NOT ported, both recorded in ISSUES.md: + * - SEC-14: `$customer->update($request->all())` mass-assigned the entire + * request body onto the customer row, so the app could set `gram_level`, + * `percent`, `active` or `remain` on itself. Only the three document ids + * are read here. + * - SEC-15: the four admin mobiles were hardcoded in the source + * (sendSmsToAdmin, :110-112). They come from PROFILE_ADMIN_MOBILES here, + * so no personal number is committed to this repository. + */ +@Injectable() +export class CustomerProfileService { + private readonly logger = new Logger(CustomerProfileService.name); + + constructor( + private readonly prisma: PrismaService, + private readonly sms: SmsService, + ) {} + + /** + * The admins who are told a customer uploaded their documents. + * + * The reference hardcoded four numbers; this reads a comma-separated env var + * instead. Unset means nobody is notified, and the customer's own SMS and the + * upload itself still go through — consistent with D20, where SMS never + * blocks an operation. + */ + private adminMobiles(): string[] { + return (process.env.PROFILE_ADMIN_MOBILES ?? '') + .split(',') + .map((m) => m.trim()) + .filter(Boolean); + } + + /** + * Resolves an uploaded-file id to its stored URL. + * + * The reference stored the raw id in the customer row and joined to `files` + * on read; the target's Customer columns hold URLs + * (`nationalIdImageUrl`, `businessLicenseUrl`, `shopImageUrl`), so the id is + * resolved here. An id that names no file is a 400 rather than a silent + * null, so a half-completed profile can never be marked verified. + */ + private async urlOf(id: string, label: string): Promise { + const file = await this.prisma.uploadedFile.findUnique({ where: { id } }); + if (!file) throw new BadRequestException(`${label} یافت نشد`); + return file.url; + } + + async complete(customerId: string, dto: CompleteProfileDto) { + const customer = await this.prisma.customer.findUnique({ where: { id: customerId } }); + if (!customer) throw new NotFoundException('مشتری یافت نشد'); + + // Resolved before the write, so a bad id fails the whole call. + const [businessLicenseUrl, shopImageUrl, nationalIdImageUrl] = await Promise.all([ + this.urlOf(dto.business_license_image_id, 'تصویر جواز کسب'), + this.urlOf(dto.shop_image_id, 'تصویر سردر مغازه'), + this.urlOf(dto.ncode_image_id, 'تصویر کارت ملی'), + ]); + + const updated = await this.prisma.customer.update({ + where: { id: customerId }, + data: { + businessLicenseUrl, + shopImageUrl, + nationalIdImageUrl, + // The reference's live value: 2, approved outright (:85). + verificationStep: 'VERIFIED', + }, + }); + + this.notify(updated.mobile, updated.firstName ?? '', updated.lastName ?? ''); + + // The reference answered a bare `true` (:107); the app only checks that the + // call succeeded (completeProfile.vue:193-194). + return { ok: true }; + } + + /** + * Both messages, fire-and-forget. + * + * D20: a failed or unconfigured SMS must never fail the upload, so nothing + * here is awaited and every rejection is swallowed into the log. The + * reference likewise queued them (SendSmsAfterCreate::dispatch, :100). + */ + private notify(mobile: string, firstName: string, lastName: string) { + // Byte-identical to Major/CustomerController::complete:97-99. + const message = + 'هنزا گلد\n' + + `همکار گرامی ${firstName} ${lastName}\n` + + 'تکمیل پروفایل شما با موفقیت انجام شد.'; + + // Byte-identical to :103-105. + const adminMessage = + 'هنزا گلد\n' + `مشتری با نام ${firstName} ${lastName}` + ' مدارک خود را بارگذاری کرد.'; + + const fire = (to: string, body: string) => { + void this.sms.send(to, body).catch((e: unknown) => { + this.logger.error(`Complete-profile SMS to ${to} failed: ${String(e)}`); + }); + }; + + fire(mobile, message); + for (const admin of this.adminMobiles()) fire(admin, adminMessage); + } +} diff --git a/apps/api/src/modules/customer-profile/dto/complete-profile.dto.ts b/apps/api/src/modules/customer-profile/dto/complete-profile.dto.ts new file mode 100644 index 0000000..9a0f78a --- /dev/null +++ b/apps/api/src/modules/customer-profile/dto/complete-profile.dto.ts @@ -0,0 +1,39 @@ +import { IsNotEmpty, IsString, MaxLength } from 'class-validator'; + +/** + * Body of POST customer/me/complete-profile. + * + * The three ids are the reference's exactly + * (henza_server Major/CustomerController::complete:73-79): + * + * 'business_license_image_id' => 'required', + * 'shop_image_id' => 'required', + * 'ncode_image_id' => 'required', + * + * and the PWA sends those same three keys (completeProfile.vue:136-140, :193). + * They are kept verbatim rather than camelCased so the app's payload is + * byte-identical to the reference's. + * + * Deliberately NOT accepted: anything else. The reference did + * `$customer->update($request->all())` (:87), so ANY column the caller named — + * `gram_level`, `percent`, `active`, `remain` — was written straight onto the + * customer row from the app. That is a privilege-escalation and money hole, not + * a feature, so only these three ids are read (whitelist, not mass-assign). + * Recorded in ISSUES.md as SEC-14. + */ +export class CompleteProfileDto { + @IsString() + @IsNotEmpty({ message: 'تصویر جواز کسب الزامی است' }) + @MaxLength(64) + business_license_image_id!: string; + + @IsString() + @IsNotEmpty({ message: 'تصویر سردر مغازه الزامی است' }) + @MaxLength(64) + shop_image_id!: string; + + @IsString() + @IsNotEmpty({ message: 'تصویر کارت ملی الزامی است' }) + @MaxLength(64) + ncode_image_id!: string; +} diff --git a/apps/api/src/modules/customer-report/customer-report.controller.ts b/apps/api/src/modules/customer-report/customer-report.controller.ts new file mode 100644 index 0000000..06f0761 --- /dev/null +++ b/apps/api/src/modules/customer-report/customer-report.controller.ts @@ -0,0 +1,59 @@ +import { Controller, Get, Param, Query } from '@nestjs/common'; +import { CustomerReportService } from './customer-report.service'; +import { CurrentCustomer, CustomerAuth } from '../customer-auth/customer.guards'; +import type { AuthenticatedCustomer } from '../customer-auth/customer-jwt.strategy'; + +/** + * "گزارش" — the customer's own account statement. + * + * Legacy endpoints, all inside the `auth:api-customer` group + * (henza_server routes/api.php:108-110): + * GET tahesab/me -> TahesabController::mandeh + * GET fin_tahesab/table -> TahesabController::index + * GET fin_tahesab/my_detail/{n} -> TahesabController::my_detail + * GET fin_tahesab/detail/{id} -> TahesabController::detail + * + * Every one of those proxied an external accounting system keyed on + * `Customer.mcode`. These read the target's own ledger instead (option الف, + * D24) — no external call, no `mcode`, and the customer always comes from the + * token. `fin_tahesab/detail/{id}` took the factor code straight from the URL + * with **no ownership check at all** (`detail()` never looks at `auth()`), so + * any signed-in customer could read any other customer's document by guessing + * a code. Here the id is only ever a filter on top of a customerId scope, so + * someone else's id returns nothing. Recorded as SEC-16. + */ +@Controller('customer/me/report') +export class CustomerReportController { + constructor(private readonly report: CustomerReportService) {} + + /** "کلیات حساب" — the running statement. */ + @CustomerAuth() + @Get() + summary(@CurrentCustomer() me: AuthenticatedCustomer, @Query('page') page?: string) { + return this.report.summary(me.id, Number(page) || 1); + } + + /** "جزئیات حساب" — the whole detail list (the second tab). */ + @CustomerAuth() + @Get('detail') + detailList(@CurrentCustomer() me: AuthenticatedCustomer, @Query('page') page?: string) { + return this.report.detail(me.id, undefined, Number(page) || 1); + } + + /** The current balances, for the statement header. */ + @CustomerAuth() + @Get('balances') + balances(@CurrentCustomer() me: AuthenticatedCustomer) { + return this.report.balances(me.id); + } + + /** + * One document. Declared last so the literal routes above are matched first — + * Nest resolves in declaration order. + */ + @CustomerAuth() + @Get(':id') + detail(@Param('id') id: string, @CurrentCustomer() me: AuthenticatedCustomer) { + return this.report.detail(me.id, id); + } +} diff --git a/apps/api/src/modules/customer-report/customer-report.module.ts b/apps/api/src/modules/customer-report/customer-report.module.ts new file mode 100644 index 0000000..dc70192 --- /dev/null +++ b/apps/api/src/modules/customer-report/customer-report.module.ts @@ -0,0 +1,12 @@ +import { Module } from '@nestjs/common'; +import { PrismaModule } from '../../prisma/prisma.module'; +import { CustomerReportController } from './customer-report.controller'; +import { CustomerReportService } from './customer-report.service'; + +/** "گزارش" — the customer's own account statement, from the internal ledger (D24). */ +@Module({ + imports: [PrismaModule], + controllers: [CustomerReportController], + providers: [CustomerReportService], +}) +export class CustomerReportModule {} diff --git a/apps/api/src/modules/customer-report/customer-report.service.ts b/apps/api/src/modules/customer-report/customer-report.service.ts new file mode 100644 index 0000000..0924ea0 --- /dev/null +++ b/apps/api/src/modules/customer-report/customer-report.service.ts @@ -0,0 +1,392 @@ +import { Injectable, Logger } from '@nestjs/common'; +import { Prisma } from '@prisma/client'; +import { PrismaService } from '../../prisma/prisma.service'; +import { AccountingSyncService } from '../accounting-sync/accounting-sync.service'; +import { jalaliToGregorian, parseJalali } from '../accounting-sync/jalali'; +import type { StatementRow } from '../accounting-sync/providers'; + +/** + * "گزارش" — the customer's account statement. + * + * ── Why this is built on the internal ledger ─────────────────────────────── + * + * In the reference this whole feature is a PROXY. `Customer\TahesabController` + * (henza_server app/Http/Controllers/Customer/TahesabController.php) forwards + * every call to an external accounting system — `hesab.henzagold.com` and a + * bare IP at `31.7.68.147:3030` — with `Http::withoutVerifying()` (TLS + * verification off), a bearer token hardcoded in the source, and a URL-embedded + * `sfx` secret. It computes nothing: the PWA renders whatever that system + * returns, keyed on `Customer.mcode`, its id in that other system. + * + * The target has no such system and no `mcode`. The owner chose option الف: + * build the reference's UI and flow over OUR OWN ledger, with no external + * connection. So this service reproduces the statement's SHAPE — the same field + * names the PWA binds to (`henza_pwa/src/type/accounting.ts`) — from + * `LedgerEntry`, which is the target's system of record for the same facts. + * + * Nothing here is invented: every figure is computed from confirmed ledger + * entries. Where the external system carried a column the target has no + * equivalent for (ارز/foreign currency, وزن پلاستیک, and the internal + * bookkeeping ids `gid`/`rec`/`reg`), the field is present and ZERO/null rather + * than fabricated, so the UI binds without pretending to know something it does + * not. Recorded as REP-01 in ISSUES.md. + */ +@Injectable() +export class CustomerReportService { + private readonly logger = new Logger(CustomerReportService.name); + + constructor( + private readonly prisma: PrismaService, + private readonly accounting: AccountingSyncService, + ) {} + + /** + * The accounting statement, or null to fall back to the internal ledger — + * when the integration is off, the customer is not linked, or the software + * cannot be reached (the report must still open). + */ + private async accountingStatement(customerId: string) { + try { + return await this.accounting.customerStatement(customerId); + } catch (err) { + this.logger.warn(`Accounting statement unavailable for ${customerId}, using the ledger: ${(err as Error).message}`); + return null; + } + } + + /** The reference's page size (report/index.vue:96). */ + private static readonly LIMIT = 50; + + /** + * "کلیات حساب" — one row per ledger entry, oldest first, each carrying the + * running balance AFTER it. + * + * The running balance is why this cannot be a plain paginated query: a row's + * `tahesab_T` depends on every entry before it. Entries are therefore folded + * in chronological order from the beginning of the account, and the requested + * page is sliced out afterwards. At the row counts this app deals with + * (one customer's own documents) that is cheap; if a customer ever + * accumulates enough entries for it to matter, the fold should move into a + * stored running total. Noted in ISSUES.md as REP-02. + * + * The reference's own list arrives oldest-first and is then `.reverse()`d for + * display (report/index.vue:191), so the app shows newest first. Same here. + */ + async summary(customerId: string, page = 1) { + // D27 — from the accounting software when the integration covers this + // customer, so the statement agrees with the balance they are shown. + const statement = await this.accountingStatement(customerId); + if (statement) { + const rows = statementToSummary(statement.rows).reverse(); + const start = (Math.max(1, page) - 1) * CustomerReportService.LIMIT; + return { + result: rows.slice(start, start + CustomerReportService.LIMIT), + count: rows.length, + page: Math.max(1, page), + limit: CustomerReportService.LIMIT, + source: 'accounting', + }; + } + + const entries = await this.prisma.ledgerEntry.findMany({ + // Only confirmed entries move a balance — the same rule the cached + // Customer.goldDebtGrams / fiatDebtRial follow, so the statement's final + // balance agrees with the figure shown everywhere else in the app. + where: { customerId, confirmed: true }, + orderBy: [{ createdAt: 'asc' }, { id: 'asc' }], + include: { order: { select: { orderNumber: true } } }, + }); + + let goldRunning = new Prisma.Decimal(0); + let rialRunning = new Prisma.Decimal(0); + + const rows = entries.map((e, index) => { + const amount = new Prisma.Decimal(e.amount); + const isGold = e.currency === 'GOLD_GRAM'; + // DEBIT increases what the customer owes; CREDIT reduces it. The same + // convention the ledger itself documents (schema.prisma:94-97). + const signed = e.direction === 'DEBIT' ? amount : amount.negated(); + + if (isGold) goldRunning = goldRunning.plus(signed); + else rialRunning = rialRunning.plus(signed); + + return { + id: index + 1, + // The reference keyed the detail lookup on factor_Code; here it is the + // entry's own id, so the detail call needs nothing else from the client. + factor_Code: e.id, + sh_factor: e.order?.orderNumber ?? e.id.slice(-8), + tarikh: e.createdAt.toISOString(), + + // Gold in / out, as separate positive columns — the reference showed + // them on two lines (Accounting.vue:21-22). + geram_v: isGold && e.direction === 'CREDIT' ? amount.toFixed(3) : '0.000', + geram_kh: isGold && e.direction === 'DEBIT' ? amount.toFixed(3) : '0.000', + + rial_v: !isGold && e.direction === 'CREDIT' ? amount.toFixed(2) : '0.00', + rial_kh: !isGold && e.direction === 'DEBIT' ? amount.toFixed(2) : '0.00', + + // Running balances. The reference colours these by sign + // (Accounting.vue:29, :46), so the sign must be preserved. + tahesab_T: goldRunning.toFixed(3), + tahesab_P: rialRunning.toFixed(2), + + // Present so the UI binds, but the target has no foreign-currency + // ledger — always zero rather than invented. REP-01. + rial_V2: '0.00', + rial_Kh2: '0.00', + tahesabP2: '0.00', + + sourceType: e.sourceType, + note: e.note, + }; + }); + + // Newest first, as the reference displayed it. + rows.reverse(); + + const start = (Math.max(1, page) - 1) * CustomerReportService.LIMIT; + return { + result: rows.slice(start, start + CustomerReportService.LIMIT), + count: rows.length, + page: Math.max(1, page), + limit: CustomerReportService.LIMIT, + }; + } + + /** + * "جزئیات حساب" — the per-document detail. + * + * With no id, this is the whole list the second tab renders (the reference's + * `my_detail`); with one, it is the single document behind the «جزئیات» link + * (its `GetHesabDetailByFactorCode`). + * + * Scoped on customerId in the WHERE clause, so an id belonging to someone + * else simply returns nothing — ids stay unenumerable, and no id is trusted + * from the client beyond being a filter. + */ + async detail(customerId: string, entryId?: string, page = 1) { + const statement = await this.accountingStatement(customerId); + if (statement) { + // SEC-16 holds: the rows are already limited to this customer's own + // account (AccountingSyncService.customerStatement), and the id is only a + // filter over them — another customer's document id matches nothing. + let rows = statement.rows.map(statementToDetail).reverse(); + if (entryId) rows = rows.filter((r) => r.factor_Code === entryId); + const start = (Math.max(1, page) - 1) * CustomerReportService.LIMIT; + return { + result: entryId ? rows : rows.slice(start, start + CustomerReportService.LIMIT), + page: Math.max(1, page), + limit: CustomerReportService.LIMIT, + source: 'accounting', + }; + } + + const where: Prisma.LedgerEntryWhereInput = { + customerId, + confirmed: true, + ...(entryId ? { id: entryId } : {}), + }; + + const entries = await this.prisma.ledgerEntry.findMany({ + where, + orderBy: [{ createdAt: 'desc' }, { id: 'desc' }], + ...(entryId + ? {} + : { + skip: (Math.max(1, page) - 1) * CustomerReportService.LIMIT, + take: CustomerReportService.LIMIT, + }), + include: { + order: { + select: { + orderNumber: true, + totalGoldWeightGrams: true, + wageWeightGrams: true, + }, + }, + }, + }); + + const result = entries.map((e) => { + const amount = new Prisma.Decimal(e.amount); + const isGold = e.currency === 'GOLD_GRAM'; + + return { + factor_Code: e.id, + sh_factor: e.order?.orderNumber ?? e.id.slice(-8), + tarikh: e.createdAt.toISOString(), + + /// Net weight. For a melted-gold repayment the ledger keeps the weight + /// as handed over, BEFORE karat normalization (schema.prisma:685), which + /// is what a paper document states; `amount` is the normalized figure. + vazn: isGold ? (e.originalValue ?? amount).toFixed(3) : '0.000', + /// Purity, for the documents that carry one. + ayar: e.karatPerMille ?? null, + no: SOURCE_LABELS[e.sourceType] ?? e.sourceType, + /// Hallmark and lab — the target ledger carries both, from the same + /// legacy `ang` / `lab` columns the reference's document form had. + sh_sharti: e.hallmark, + name_az: e.labName, + + /// Gold in / out for this document, normalized to 750 as the reference's + /// tabdil750 columns were. + tabdil750_v: isGold && e.direction === 'CREDIT' ? amount.toFixed(3) : '0.000', + tabdil750_kh: isGold && e.direction === 'DEBIT' ? amount.toFixed(3) : '0.000', + + /// Unit price at the time, for the documents that have one. + fi: e.pricePerGramRialAtEntry ? e.pricePerGramRialAtEntry.toFixed(2) : null, + fiF: e.priceRial ? e.priceRial.toFixed(2) : null, + + /// The making charge the order carried, where this entry came from one. + Darsad_Talayee: e.order?.wageWeightGrams ? e.order.wageWeightGrams.toFixed(3) : null, + + accountName: e.accountName, + bankName: e.bankName, + transferTo: e.transferTo, + receivedAt: e.receivedAt ? e.receivedAt.toISOString() : null, + note: e.note, + + /// No equivalent in the target — shown as null, never invented. REP-01. + nO_kar: null, + jens_felez: null, + Darsad: null, + maliatDarsad: null, + }; + }); + + return { result, page: Math.max(1, page), limit: CustomerReportService.LIMIT }; + } + + /** + * "مانده" — the current balances. + * + * Ports the shape of TahesabController::mandeh, which answered a `result` + * array of `{arz, mandeh}`. The reference multiplied the external system's + * figures by -1 to flip its sign convention; here the cached customer + * balances are already in the app's own convention (positive = owes), so no + * flip is applied and the figure matches every other screen. + */ + async balances(customerId: string) { + // D27 — the accounting software's balance when the integration covers + // this customer; the same figure /customer/me shows. + const accounting = await this.accounting.customerBalance(customerId); + if (accounting) { + return { + status: 200, + message: '', + source: 'accounting', + at: accounting.at, + result: [ + { arz: 'IRR', mandeh: accounting.rial.toFixed(2) }, + { arz: 'gold', mandeh: accounting.gold.toFixed(3) }, + ], + }; + } + + const c = await this.prisma.customer.findUnique({ + where: { id: customerId }, + select: { goldDebtGrams: true, fiatDebtRial: true }, + }); + + return { + status: 200, + message: '', + result: [ + { arz: 'IRR', mandeh: (c?.fiatDebtRial ?? new Prisma.Decimal(0)).toFixed(2) }, + { arz: 'gold', mandeh: (c?.goldDebtGrams ?? new Prisma.Decimal(0)).toFixed(3) }, + ], + }; + } +} + +/** The reference's `no` column held a document-type label. */ +const SOURCE_LABELS: Record = { + ORDER_STOCK: 'سفارش', + ORDER_PRE_ORDER: 'پیش‌سفارش', + REPAYMENT_MELTED_GOLD: 'طلای آبشده', + REPAYMENT_TRANSFER: 'حواله', + REPAYMENT_CHEQUE: 'چک', + REPAYMENT_CASH: 'نقدی', + WALLET_BONUS: 'هدیه', + ADJUSTMENT: 'اصلاحیه', +}; + +// ── D27: accounting statement → the report's existing shape ───────────── +// +// The apps bind the reference's field names (henza_pwa/src/type/accounting.ts) +// and format `tarikh` as an ISO instant, so the accounting rows are mapped onto +// exactly what the ledger-based report already returns. + +/** `1405/07/12` + `20:20:41` → ISO in Tehran time, which the apps' jdate() reads. */ +function isoFromJalali(date: string, time: string | null): string { + const j = parseJalali(date); + if (!j) return date; + const g = jalaliToGregorian(j.jy, j.jm, j.jd); + const pad = (n: number) => String(n).padStart(2, '0'); + const t = time && /^\d{1,2}:\d{2}(:\d{2})?$/.test(time) ? (time.length === 5 ? `${time}:00` : time) : '12:00:00'; + return `${g.gy}-${pad(g.gm)}-${pad(g.gd)}T${t.padStart(8, '0')}+03:30`; +} + +const fixed = (d: Prisma.Decimal | null, places: number) => (d ?? new Prisma.Decimal(0)).toFixed(places); + +/** + * Oldest first, with a running balance on every row. The software's own + * running balance wins where it reports one; a row without one (a temporary + * Tahesab document, which moves nothing yet) carries the previous figure. + */ +function statementToSummary(rows: StatementRow[]) { + let gold = new Prisma.Decimal(0); + let rial = new Prisma.Decimal(0); + return rows.map((r, index) => { + if (r.goldBalance) gold = r.goldBalance; + else if (!r.temporary) gold = gold.add(r.goldOut).sub(r.goldIn); + if (r.rialBalance) rial = r.rialBalance; + else if (!r.temporary) rial = rial.add(r.rialOut).sub(r.rialIn); + return { + id: index + 1, + factor_Code: r.documentRef || r.key, + sh_factor: r.documentNo, + tarikh: isoFromJalali(r.date, r.time), + geram_v: fixed(r.goldIn, 3), + geram_kh: fixed(r.goldOut, 3), + rial_v: fixed(r.rialIn, 2), + rial_kh: fixed(r.rialOut, 2), + tahesab_T: gold.toFixed(3), + tahesab_P: rial.toFixed(2), + rial_V2: '0.00', + rial_Kh2: '0.00', + tahesabP2: '0.00', + sourceType: 'ACCOUNTING', + note: [r.title, r.description, r.temporary ? '(موقت — هنوز در مانده اثر ندارد)' : null].filter(Boolean).join(' — '), + }; + }); +} + +function statementToDetail(r: StatementRow) { + return { + factor_Code: r.documentRef || r.key, + sh_factor: r.documentNo, + tarikh: isoFromJalali(r.date, r.time), + vazn: fixed(r.weight, 3), + ayar: r.karat, + no: r.title, + sh_sharti: null, + name_az: null, + tabdil750_v: fixed(r.goldIn, 3), + tabdil750_kh: fixed(r.goldOut, 3), + fi: r.unitPrice ? r.unitPrice.toFixed(2) : null, + fiF: r.rialIn.gt(0) ? r.rialIn.toFixed(2) : r.rialOut.gt(0) ? r.rialOut.toFixed(2) : null, + Darsad_Talayee: r.wagePercent ? r.wagePercent.toString() : null, + accountName: null, + bankName: null, + transferTo: null, + receivedAt: null, + note: [r.description, r.temporary ? 'سند موقت' : null].filter(Boolean).join(' — ') || null, + // REP-01: the accounting software does carry these. + nO_kar: r.itemName, + jens_felez: r.metal, + Darsad: null, + maliatDarsad: null, + }; +} diff --git a/apps/api/src/modules/customers/customers.controller.ts b/apps/api/src/modules/customers/customers.controller.ts deleted file mode 100644 index 9e42b92..0000000 --- a/apps/api/src/modules/customers/customers.controller.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Controller, Get, Param } from '@nestjs/common'; -import { CustomersService } from './customers.service'; -import { Public } from '../auth/guards'; - -@Public() // pre-existing unauthenticated endpoint; see Phase 1 notes -@Controller('customers') -export class CustomersController { - constructor(private readonly customers: CustomersService) {} - - @Get() - list() { - return this.customers.list(); - } - - @Get(':id') - get(@Param('id') id: string) { - return this.customers.getOrThrow(id); - } - - @Get(':id/orders') - getOrders(@Param('id') id: string) { - return this.customers.getOrders(id); - } - - @Get(':id/ledger-entries') - getLedgerEntries(@Param('id') id: string) { - return this.customers.getLedgerEntries(id); - } -} diff --git a/apps/api/src/modules/customers/customers.module.ts b/apps/api/src/modules/customers/customers.module.ts index febd1f8..4540111 100644 --- a/apps/api/src/modules/customers/customers.module.ts +++ b/apps/api/src/modules/customers/customers.module.ts @@ -1,9 +1,21 @@ import { Module } from '@nestjs/common'; import { CustomersService } from './customers.service'; -import { CustomersController } from './customers.controller'; +/** + * Customer reads, exposed only through CustomerAuthController's token-derived + * /customer/me* routes. + * + * CustomersController used to live here and served GET /customers, + * /customers/:id, /customers/:id/orders and /customers/:id/ledger-entries, all + * unauthenticated. The list handed any visitor every customer's national code, + * debts, credit limit and identity-document URLs, and the :id routes let anyone + * holding an id read that customer's profile, orders and ledger — so narrowing + * the list alone did not close it. The whole controller is gone; the service + * stays and is now only reachable behind a customer token. + * + * See SEC-08 in docs/parity/ISSUES.md. + */ @Module({ - controllers: [CustomersController], providers: [CustomersService], exports: [CustomersService], }) diff --git a/apps/api/src/modules/customers/customers.service.ts b/apps/api/src/modules/customers/customers.service.ts index 025677c..7ab8040 100644 --- a/apps/api/src/modules/customers/customers.service.ts +++ b/apps/api/src/modules/customers/customers.service.ts @@ -1,6 +1,7 @@ import { Injectable, NotFoundException } from '@nestjs/common'; import { Prisma } from '@prisma/client'; import { PrismaService } from '../../prisma/prisma.service'; +import { AccountingSyncService } from '../accounting-sync/accounting-sync.service'; // passwordHash must never leave the API — every customer read goes through this. const PUBLIC_CUSTOMER_SELECT = { @@ -23,9 +24,22 @@ const PUBLIC_CUSTOMER_SELECT = { updatedAt: true, } satisfies Prisma.CustomerSelect; +/** + * Every method here is reached only through CustomerAuthController's + * token-derived /customer/me* routes, which pass the id from the JWT. + * + * There used to be a `list()` returning every active customer, because the two + * apps' login screens downloaded it and matched the phone number in the + * browser. It is gone: the login lookup now happens server-side inside + * CustomerAuthService.requestOtp, which is what the reference did + * (henza_server ApiMobileController.php:39-49). See SEC-08. + */ @Injectable() export class CustomersService { - constructor(private readonly prisma: PrismaService) {} + constructor( + private readonly prisma: PrismaService, + private readonly accounting: AccountingSyncService, + ) {} async getOrThrow(customerId: string) { const customer = await this.prisma.customer.findUnique({ @@ -33,22 +47,21 @@ export class CustomersService { select: PUBLIC_CUSTOMER_SELECT, }); if (!customer) throw new NotFoundException(`Customer ${customerId} not found`); - return customer; - } - // Ported from legacy henza_server's WebApp\AuthController::userAuth() / - // ApiMobileController::userAuth(), both of which query - // Customer::active()->where('is_archive', 0) — an inactive or archived - // customer cannot authenticate in the customer-facing app. This endpoint is - // that same lookup surface for the user-app login flow (client-side match - // on `mobile`), so it must apply the same two filters, or a - // deactivated/archived customer would still be able to log in. - list() { - return this.prisma.customer.findMany({ - where: { isActive: true, isArchived: false }, - select: PUBLIC_CUSTOMER_SELECT, - orderBy: { createdAt: 'desc' }, - }); + // D27 — with the accounting integration on, the customer sees the balance + // the accounting software holds. The apps only display these two fields; + // the credit-limit check runs server-side on the internal ledger, untouched. + const accounting = await this.accounting.customerBalance(customerId); + if (accounting) { + return { + ...customer, + goldDebtGrams: accounting.gold, + fiatDebtRial: accounting.rial, + balanceSource: 'accounting' as const, + balanceAt: accounting.at, + }; + } + return { ...customer, balanceSource: 'app' as const, balanceAt: null }; } getOrders(customerId: string) { diff --git a/apps/api/src/modules/iam/iam-logout.service.spec.ts b/apps/api/src/modules/iam/iam-logout.service.spec.ts new file mode 100644 index 0000000..206c02e --- /dev/null +++ b/apps/api/src/modules/iam/iam-logout.service.spec.ts @@ -0,0 +1,161 @@ +import { createSign, generateKeyPairSync, type KeyObject } from 'node:crypto'; +import { IamLogoutService, IamLogoutTokenError } from './iam-logout.service'; +import type { IamService } from './iam.service'; + +/** + * Back-channel logout token verification. + * + * This endpoint is unauthenticated by design: the token's signature is the only + * thing standing between a stranger and "sign out every admin of this system". + * Each test here is one of the checks that keeps that true. + */ +describe('IamLogoutService', () => { + const ISSUER = 'https://auth.test.local'; + const CLIENT_ID = 'goldbank_api'; + const EVENT = 'http://schemas.openid.net/event/backchannel-logout'; + + let keyPair: { publicKey: KeyObject; privateKey: KeyObject }; + let otherKeyPair: { publicKey: KeyObject; privateKey: KeyObject }; + let service: IamLogoutService; + let fetchMock: jest.Mock; + + const jwk = (key: KeyObject, kid: string) => ({ ...key.export({ format: 'jwk' }), kid, alg: 'RS256', use: 'sig' }); + + const sign = ( + payload: Record, + options: { kid?: string; alg?: string; key?: KeyObject } = {}, + ): string => { + const header = { alg: options.alg ?? 'RS256', typ: 'logout+jwt', kid: options.kid ?? 'key-1' }; + const encode = (value: unknown) => Buffer.from(JSON.stringify(value)).toString('base64url'); + const body = `${encode(header)}.${encode(payload)}`; + const signer = createSign('RSA-SHA256'); + signer.update(body); + return `${body}.${signer.sign(options.key ?? keyPair.privateKey).toString('base64url')}`; + }; + + const validPayload = (overrides: Record = {}) => ({ + iss: ISSUER, + aud: CLIENT_ID, + iat: Math.floor(Date.now() / 1000), + exp: Math.floor(Date.now() / 1000) + 120, + jti: 'logout-1', + sub: 'sub-1', + sid: 'sid-1', + events: { [EVENT]: {} }, + ...overrides, + }); + + beforeAll(() => { + keyPair = generateKeyPairSync('rsa', { modulusLength: 2048 }); + otherKeyPair = generateKeyPairSync('rsa', { modulusLength: 2048 }); + }); + + beforeEach(() => { + service = new IamLogoutService({ issuer: ISSUER, clientId: CLIENT_ID } as IamService); + fetchMock = jest.fn().mockResolvedValue({ + ok: true, + status: 200, + json: async () => ({ keys: [jwk(keyPair.publicKey, 'key-1')] }), + }); + global.fetch = fetchMock as unknown as typeof fetch; + }); + + /* ─────────────── the happy path ─────────────── */ + + it('accepts a properly signed logout token and reports the session', async () => { + const result = await service.verify(sign(validPayload())); + + expect(result).toEqual({ sessionId: 'sid-1', subject: 'sub-1' }); + expect(fetchMock.mock.calls[0][0]).toBe(`${ISSUER}/.well-known/jwks.json`); + }); + + it('accepts a token that names only the identity', async () => { + const result = await service.verify(sign(validPayload({ sid: undefined }))); + + expect(result).toEqual({ sessionId: null, subject: 'sub-1' }); + }); + + it('caches the keys instead of fetching them for every notification', async () => { + await service.verify(sign(validPayload())); + await service.verify(sign(validPayload({ jti: 'logout-2' }))); + + expect(fetchMock).toHaveBeenCalledTimes(1); + }); + + it('refetches the keys when an unknown key id appears, so rotation needs no restart', async () => { + await service.verify(sign(validPayload())); + + fetchMock.mockResolvedValue({ + ok: true, + status: 200, + json: async () => ({ keys: [jwk(otherKeyPair.publicKey, 'key-2')] }), + }); + + const rotated = sign(validPayload({ jti: 'logout-3' }), { kid: 'key-2', key: otherKeyPair.privateKey }); + await expect(service.verify(rotated)).resolves.toMatchObject({ sessionId: 'sid-1' }); + expect(fetchMock).toHaveBeenCalledTimes(2); + }); + + /* ─────────────── what must be refused ─────────────── */ + + it('refuses a token signed with an unknown key', async () => { + const forged = sign(validPayload(), { key: otherKeyPair.privateKey }); + + await expect(service.verify(forged)).rejects.toBeInstanceOf(IamLogoutTokenError); + }); + + it('refuses an unsigned token however it describes itself', async () => { + const parts = sign(validPayload()).split('.'); + const header = Buffer.from(JSON.stringify({ alg: 'none', typ: 'logout+jwt' })).toString('base64url'); + + await expect(service.verify(`${header}.${parts[1]}.`)).rejects.toBeInstanceOf(IamLogoutTokenError); + }); + + it('refuses a token from another issuer', async () => { + await expect( + service.verify(sign(validPayload({ iss: 'https://evil.test.local' }))), + ).rejects.toThrow('another identity service'); + }); + + it('refuses a token addressed to another client', async () => { + await expect(service.verify(sign(validPayload({ aud: 'someone_else' })))).rejects.toThrow( + 'not addressed to this client', + ); + }); + + it('refuses an ID token replayed as a logout token', async () => { + // Without the events check, an ID token from a normal login would end sessions + await expect(service.verify(sign(validPayload({ events: undefined })))).rejects.toThrow( + 'back-channel logout event', + ); + }); + + it('refuses a logout token carrying a nonce', async () => { + await expect(service.verify(sign(validPayload({ nonce: 'n-1' })))).rejects.toThrow('nonce'); + }); + + it('refuses an expired token', async () => { + const stale = validPayload({ + iat: Math.floor(Date.now() / 1000) - 3600, + exp: Math.floor(Date.now() / 1000) - 3000, + }); + + await expect(service.verify(sign(stale))).rejects.toThrow('expired'); + }); + + it('refuses a token that names neither a session nor an identity', async () => { + await expect( + service.verify(sign(validPayload({ sid: undefined, sub: undefined }))), + ).rejects.toThrow('neither a session nor a subject'); + }); + + it('refuses a malformed token', async () => { + await expect(service.verify('not-a-token')).rejects.toBeInstanceOf(IamLogoutTokenError); + }); + + it('reports an unreachable identity service as an availability problem', async () => { + fetchMock.mockRejectedValue(new Error('ECONNREFUSED')); + + await expect(service.verify(sign(validPayload()))).rejects.toThrow('could not reach'); + }); +}); diff --git a/apps/api/src/modules/iam/iam-logout.service.ts b/apps/api/src/modules/iam/iam-logout.service.ts new file mode 100644 index 0000000..6731f8f --- /dev/null +++ b/apps/api/src/modules/iam/iam-logout.service.ts @@ -0,0 +1,170 @@ +import { Injectable, Logger } from '@nestjs/common'; +import { createPublicKey, createVerify, type KeyObject } from 'node:crypto'; +import { IamService, IamUnavailableError } from './iam.service'; + +/** The logout token was not a valid, current back-channel logout token. */ +export class IamLogoutTokenError extends Error {} + +export interface LogoutSubject { + /** The IAM session id (`sid`), when the token names one session. */ + sessionId: string | null; + /** The IAM user id (`sub`), when the token names a whole identity. */ + subject: string | null; +} + +const BACKCHANNEL_LOGOUT_EVENT = 'http://schemas.openid.net/event/backchannel-logout'; + +/** + * Verification of OpenID Connect Back-Channel Logout 1.0 tokens. + * + * The IAM calls this app when a session ends elsewhere (the user signed out, or + * an administrator revoked the session). The request carries no credentials by + * design — its authority is the token's RS256 signature, checked here against the + * IAM's published keys — so every one of the spec's checks matters: + * + * - signature verifies against a key from the IAM's JWKS (keys are cached, and + * an unknown `kid` refetches once so key rotation needs no restart); + * - `iss` is exactly the configured issuer and `aud` contains this client id, + * otherwise another tenant's token could sign out our admins; + * - the `events` claim holds the back-channel logout event, so an ID token + * cannot be replayed here; + * - a `nonce` MUST NOT be present (that would make it an ID token); + * - `iat`/`exp` are honoured with a small clock skew allowance. + * + * No new dependency: Node verifies RS256 and imports a JWK natively. + */ +@Injectable() +export class IamLogoutService { + private readonly logger = new Logger(IamLogoutService.name); + + /** kid -> public key, plus when the set was fetched. */ + private keys = new Map(); + private keysFetchedAt = 0; + + constructor(private readonly iam: IamService) {} + + /** Seconds of clock skew tolerated on `iat`/`exp`. */ + private get leeway(): number { + return 60; + } + + async verify(logoutToken: string): Promise { + const parts = logoutToken.split('.'); + if (parts.length !== 3) throw new IamLogoutTokenError('logout token is malformed'); + + const [rawHeader, rawPayload, rawSignature] = parts as [string, string, string]; + const header = this.decodeJson(rawHeader, 'header'); + const payload = this.decodeJson(rawPayload, 'payload'); + + if (header.alg !== 'RS256') { + // Never trust the token's own word that it needs no signature. + throw new IamLogoutTokenError(`unsupported logout token algorithm: ${String(header.alg)}`); + } + + const key = await this.publicKey(typeof header.kid === 'string' ? header.kid : null); + const verifier = createVerify('RSA-SHA256'); + verifier.update(`${rawHeader}.${rawPayload}`); + if (!verifier.verify(key, Buffer.from(rawSignature, 'base64url'))) { + throw new IamLogoutTokenError('logout token signature does not verify'); + } + + this.assertClaims(payload); + + const sessionId = typeof payload.sid === 'string' && payload.sid !== '' ? payload.sid : null; + const subject = typeof payload.sub === 'string' && payload.sub !== '' ? payload.sub : null; + if (!sessionId && !subject) { + throw new IamLogoutTokenError('logout token names neither a session nor a subject'); + } + + return { sessionId, subject }; + } + + private assertClaims(payload: Record): void { + if (payload.iss !== this.iam.issuer) { + throw new IamLogoutTokenError('logout token was issued by another identity service'); + } + + const audiences = Array.isArray(payload.aud) ? payload.aud : [payload.aud]; + if (!audiences.includes(this.iam.clientId)) { + throw new IamLogoutTokenError('logout token is not addressed to this client'); + } + + // A logout token carries the logout event; an ID token does not. Without this + // check an ID token obtained during a normal login could end sessions. + const events = payload.events as Record | undefined; + if (!events || typeof events !== 'object' || !(BACKCHANNEL_LOGOUT_EVENT in events)) { + throw new IamLogoutTokenError('logout token does not carry the back-channel logout event'); + } + + if ('nonce' in payload) { + throw new IamLogoutTokenError('a logout token must not carry a nonce'); + } + + const now = Math.floor(Date.now() / 1000); + if (typeof payload.exp === 'number' && payload.exp + this.leeway < now) { + throw new IamLogoutTokenError('logout token has expired'); + } + if (typeof payload.iat === 'number' && payload.iat - this.leeway > now) { + throw new IamLogoutTokenError('logout token is not valid yet'); + } + } + + /** + * The signing key for this `kid`. An unknown kid triggers one refetch, so a key + * rotation at the IAM takes effect without restarting this service. + */ + private async publicKey(kid: string | null): Promise { + const cacheAgeSeconds = (Date.now() - this.keysFetchedAt) / 1000; + const stale = cacheAgeSeconds > 24 * 3600; + const cached = kid ? this.keys.get(kid) : [...this.keys.values()][0]; + + if (cached && !stale) return cached; + + await this.loadKeys(); + + const key = kid ? this.keys.get(kid) : [...this.keys.values()][0]; + if (!key) throw new IamLogoutTokenError('no matching signing key at the identity service'); + + return key; + } + + private async loadKeys(): Promise { + let response: Response; + try { + response = await fetch(`${this.iam.issuer}/.well-known/jwks.json`, { + headers: { accept: 'application/json' }, + }); + } catch (error) { + throw new IamUnavailableError(`could not reach the identity service: ${(error as Error).message}`); + } + + if (!response.ok) { + throw new IamUnavailableError(`the identity service returned ${response.status} for its keys`); + } + + const body = (await response.json()) as { keys?: Array> }; + const keys = new Map(); + + for (const jwk of body.keys ?? []) { + if (jwk.kty !== 'RSA' || typeof jwk.kid !== 'string') continue; + try { + keys.set(jwk.kid, createPublicKey({ key: jwk as never, format: 'jwk' })); + } catch (error) { + this.logger.warn(`skipping an unusable key from the identity service: ${(error as Error).message}`); + } + } + + if (keys.size === 0) throw new IamUnavailableError('the identity service published no usable keys'); + + this.keys = keys; + this.keysFetchedAt = Date.now(); + } + + private decodeJson(segment: string, what: string): Record { + try { + return JSON.parse(Buffer.from(segment, 'base64url').toString('utf8')) as Record; + } catch { + throw new IamLogoutTokenError(`logout token ${what} is not readable`); + } + } +} diff --git a/apps/api/src/modules/iam/iam.controller.ts b/apps/api/src/modules/iam/iam.controller.ts new file mode 100644 index 0000000..8d92ffd --- /dev/null +++ b/apps/api/src/modules/iam/iam.controller.ts @@ -0,0 +1,87 @@ +import { Body, Controller, HttpCode, Logger, Post } from '@nestjs/common'; +import { Public } from '../auth/guards'; +import { AdminSessionService } from '../sessions/admin-session.service'; +import { AppSessionService } from '../sessions/app-session.service'; +import { IamLogoutService, IamLogoutTokenError } from './iam-logout.service'; +import { IamService } from './iam.service'; + +/** + * Back-channel logout receiver (OpenID Connect Back-Channel Logout 1.0). + * + * Register this path as the client's `backchannel_logout_uri` in the IAM: + * + * https:///api/iam/backchannel-logout + * + * The endpoint is public because it carries no credentials by design — its + * authority is the logout token's signature, verified against the IAM's keys. It + * always answers 200, as the spec asks, so a rejected token does not make the IAM + * retry forever; the reason is logged here instead. + * + * Nothing in the UI changes: this is how a central "sign out everywhere" or an + * administrator revoking a session actually ends a session in this app. + */ +@Controller('iam') +export class IamController { + private readonly logger = new Logger(IamController.name); + + constructor( + private readonly iam: IamService, + private readonly logout: IamLogoutService, + private readonly sessions: AdminSessionService, + private readonly appSessions: AppSessionService, + ) {} + + @Public() + @Post('backchannel-logout') + @HttpCode(200) + async backchannelLogout(@Body() body: Record) { + if (!this.iam.enabled) { + // Not configured: nothing to act on, and no information to give away. + return { status: 'ignored' }; + } + + const token = typeof body?.logout_token === 'string' ? body.logout_token : ''; + if (!token) { + this.logger.warn('back-channel logout called without a logout token'); + return { status: 'ignored' }; + } + + try { + const { sessionId, subject } = await this.logout.verify(token); + + // `sid` names one session; a token with only `sub` means every session of + // that identity — matching the spec's two forms. + // + // Both token families are ended: the admin panel AND the app (customer / + // sales expert). Leaving the app out would make a central sign-out look + // like it worked while the phone in the user's pocket stayed signed in. + const [admin, app] = sessionId + ? await Promise.all([ + this.sessions.revokeByIamSession(sessionId), + this.appSessions.revokeByIamSession(sessionId), + ]) + : await Promise.all([ + this.sessions.revokeByIamSubject(subject as string), + this.appSessions.revokeByIamSubject(subject as string), + ]); + + const revoked = admin + app; + this.logger.log( + `back-channel logout accepted (${sessionId ? `sid=${sessionId}` : `sub=${subject}`}): ` + + `${admin} admin + ${app} app session(s) revoked`, + ); + + return { status: 'ok', revoked }; + } catch (error) { + // A bad token is a security event worth logging, not a 4xx worth retrying. + const detail = (error as Error).message; + if (error instanceof IamLogoutTokenError) { + this.logger.warn(`rejected a back-channel logout token: ${detail}`); + } else { + this.logger.error(`back-channel logout could not be processed: ${detail}`); + } + + return { status: 'ignored' }; + } + } +} diff --git a/apps/api/src/modules/iam/iam.module.ts b/apps/api/src/modules/iam/iam.module.ts new file mode 100644 index 0000000..46625d5 --- /dev/null +++ b/apps/api/src/modules/iam/iam.module.ts @@ -0,0 +1,19 @@ +import { Global, Module } from '@nestjs/common'; +import { IamController } from './iam.controller'; +import { IamLogoutService } from './iam-logout.service'; +import { IamService } from './iam.service'; + +/** + * Central IAM integration. + * + * Global so any module can delegate credential checks without wiring imports; + * the service itself is inert until `IAM_ENABLED=true`, so importing it costs + * nothing in a deployment that does not use the identity service. + */ +@Global() +@Module({ + controllers: [IamController], + providers: [IamService, IamLogoutService], + exports: [IamService, IamLogoutService], +}) +export class IamModule {} diff --git a/apps/api/src/modules/iam/iam.service.spec.ts b/apps/api/src/modules/iam/iam.service.spec.ts new file mode 100644 index 0000000..84c362a --- /dev/null +++ b/apps/api/src/modules/iam/iam.service.spec.ts @@ -0,0 +1,214 @@ +import { + IamInvalidCredentialsError, + IamMfaRequiredError, + IamService, + IamUnavailableError, +} from './iam.service'; + +/** + * Credential delegation to the central identity service. + * + * The behaviour these lock down is the safety contract: the feature is inert + * until fully configured, and any uncertain outcome must leave the existing + * local password check in charge so an IAM problem can never lock admins out. + */ +describe('IamService', () => { + const ORIGINAL_ENV = process.env; + let service: IamService; + let fetchMock: jest.Mock; + + const configure = (overrides: Record = {}) => { + process.env = { + ...ORIGINAL_ENV, + IAM_ENABLED: 'true', + IAM_ISSUER: 'https://auth.test.local', + IAM_CLIENT_ID: 'goldbank_api', + IAM_CLIENT_SECRET: 'server-secret', + IAM_TENANT_SLUG: 'montzar', + IAM_LOGIN_DELEGATION: 'fallback', + ...overrides, + }; + }; + + const respondWith = (status: number, body: unknown) => { + fetchMock.mockResolvedValue({ + ok: status >= 200 && status < 300, + status, + json: async () => body, + } as Response); + }; + + beforeEach(() => { + service = new IamService(); + fetchMock = jest.fn(); + global.fetch = fetchMock as unknown as typeof fetch; + configure(); + }); + + afterEach(() => { + process.env = ORIGINAL_ENV; + jest.restoreAllMocks(); + }); + + /* ─────────────── the switch ─────────────── */ + + it('is disabled by default', () => { + process.env = { ...ORIGINAL_ENV }; + delete process.env.IAM_ENABLED; + + expect(new IamService().enabled).toBe(false); + }); + + it('stays disabled when the switch is on but configuration is incomplete', () => { + configure({ IAM_CLIENT_SECRET: '' }); + expect(service.enabled).toBe(false); + + configure({ IAM_ISSUER: '' }); + expect(service.enabled).toBe(false); + + configure({ IAM_CLIENT_ID: '' }); + expect(service.enabled).toBe(false); + + configure(); + expect(service.enabled).toBe(true); + }); + + it('treats an empty value as unset, like the rest of the codebase', () => { + // docker-compose passes unset optional variables as "" — see common/env.ts + configure({ IAM_ENABLED: ' ' }); + expect(service.enabled).toBe(false); + }); + + it('is disabled when delegation is explicitly turned off', () => { + configure({ IAM_LOGIN_DELEGATION: 'off' }); + expect(service.enabled).toBe(false); + }); + + it('falls back to the local password check unless exclusive mode is set', () => { + expect(service.allowsLocalFallback).toBe(true); + + configure({ IAM_LOGIN_DELEGATION: 'exclusive' }); + expect(service.allowsLocalFallback).toBe(false); + }); + + it('ignores an unknown delegation mode rather than failing', () => { + configure({ IAM_LOGIN_DELEGATION: 'nonsense' }); + expect(service.mode).toBe('fallback'); + }); + + /* ─────────────── request contract ─────────────── */ + + it('sends client credentials, tenant and the end-user IP', async () => { + respondWith(200, { status: 'SUCCESS', user: { id: 'sub-1' }, session_id: 'sid-1' }); + + await service.verifyCredentials('09120000000', 'secret', '203.0.113.7'); + + const [url, init] = fetchMock.mock.calls[0]; + expect(url).toBe('https://auth.test.local/api/v1/auth/login'); + + const body = JSON.parse((init as RequestInit).body as string); + expect(body.identifier).toBe('09120000000'); + expect(body.client_id).toBe('goldbank_api'); + expect(body.client_secret).toBe('server-secret'); + expect(body.tenant_slug).toBe('montzar'); + // Without this the IAM would rate-limit on this server's IP and lock + // out every admin after a handful of attempts. + expect(body.client_ip).toBe('203.0.113.7'); + }); + + it('prefers tenant id over slug when both are configured', async () => { + configure({ IAM_TENANT_ID: '11111111-2222-3333-4444-555555555555' }); + respondWith(200, { status: 'SUCCESS', user: { id: 'sub-1' } }); + + await service.verifyCredentials('09120000000', 'secret'); + + const body = JSON.parse((fetchMock.mock.calls[0][1] as RequestInit).body as string); + expect(body.tenant_id).toBe('11111111-2222-3333-4444-555555555555'); + expect(body.tenant_slug).toBeUndefined(); + }); + + it('returns the identity on success', async () => { + respondWith(200, { + status: 'SUCCESS', + session_id: 'sid-9', + user: { + id: 'sub-9', + email: 'a@b.c', + phone_number: '09120000000', + first_name: 'رضا', + last_name: 'کاظمی', + }, + }); + + const identity = await service.verifyCredentials('09120000000', 'secret'); + + expect(identity).toEqual({ + sub: 'sub-9', + email: 'a@b.c', + phoneNumber: '09120000000', + firstName: 'رضا', + lastName: 'کاظمی', + sessionId: 'sid-9', + browserTicket: null, + }); + }); + + /* ─────────────── failure mapping ─────────────── */ + + it('maps a rejected password to an invalid-credentials error', async () => { + respondWith(401, { error: 'invalid_credentials' }); + + await expect(service.verifyCredentials('09120000000', 'bad')).rejects.toBeInstanceOf( + IamInvalidCredentialsError, + ); + }); + + it('treats a locked account as a definite rejection, not an outage', async () => { + // Falling back to the local password here would defeat the IAM's lockout. + respondWith(403, { error: 'account_locked' }); + + await expect(service.verifyCredentials('09120000000', 'x')).rejects.toBeInstanceOf( + IamInvalidCredentialsError, + ); + }); + + it('maps a two-factor challenge to its own error', async () => { + respondWith(200, { status: 'MFA_REQUIRED', mfa_session_token: 'x' }); + + await expect(service.verifyCredentials('09120000000', 'x')).rejects.toBeInstanceOf( + IamMfaRequiredError, + ); + }); + + it('maps a server error to an availability problem', async () => { + respondWith(500, {}); + + await expect(service.verifyCredentials('09120000000', 'x')).rejects.toBeInstanceOf( + IamUnavailableError, + ); + }); + + it('maps rate limiting to an availability problem so login still falls back', async () => { + respondWith(429, { error: 'rate_limited' }); + + await expect(service.verifyCredentials('09120000000', 'x')).rejects.toBeInstanceOf( + IamUnavailableError, + ); + }); + + it('maps a network failure to an availability problem', async () => { + fetchMock.mockRejectedValue(new Error('ECONNREFUSED')); + + await expect(service.verifyCredentials('09120000000', 'x')).rejects.toBeInstanceOf( + IamUnavailableError, + ); + }); + + it('rejects an unexpected success payload instead of trusting it', async () => { + respondWith(200, { status: 'SOMETHING_ELSE' }); + + await expect(service.verifyCredentials('09120000000', 'x')).rejects.toBeInstanceOf( + IamUnavailableError, + ); + }); +}); diff --git a/apps/api/src/modules/iam/iam.service.ts b/apps/api/src/modules/iam/iam.service.ts new file mode 100644 index 0000000..66be9f9 --- /dev/null +++ b/apps/api/src/modules/iam/iam.service.ts @@ -0,0 +1,340 @@ +import { Injectable, Logger } from '@nestjs/common'; +import { envList, envOr, envOrNull } from '../../common/env'; + +/** + * Credential delegation to the central identity service (Central IAM). + * + * The point of this module is that **nothing in the UI changes**. Admins keep + * typing their phone and password into this app's own login form; when the + * feature is switched on, this service checks those credentials against the + * IAM instead of (or before) the local password hash. There is no redirect, no + * SSO button and no extra screen. + * + * Safety first: every uncertain outcome (service down, user unknown there, + * rate limited) falls back to the existing local check, so turning this on can + * never lock admins out. Only `exclusive` mode refuses the local password. + */ + +export type IamDelegationMode = 'off' | 'fallback' | 'exclusive'; + +export interface IamIdentity { + sub: string; + email: string | null; + phoneNumber: string | null; + firstName: string | null; + lastName: string | null; + sessionId: string | null; + /** بلیت یکبارمصرف برای گذاشتن کوکی نشست روی دامنه IAM */ + browserTicket: string | null; +} + +/** The identity service rejected the credentials (unknown user or wrong password). */ +export class IamInvalidCredentialsError extends Error {} + +/** The identity service could not be reached or failed; not the user's fault. */ +export class IamUnavailableError extends Error {} + +/** The account has two-factor enabled there, which this UI-less path cannot collect. */ +export class IamMfaRequiredError extends Error {} + +/** The identity service does not know this user — it never creates accounts. */ +export class IamUserUnknownError extends Error {} + +/** + * The identity service refused this identity outright (locked, deactivated, or + * two-factor). Unlike an unknown user, this is a decision that must be honoured + * rather than worked around locally. + */ +export class IamAccessDeniedError extends Error { + constructor( + message: string, + readonly reason: string, + ) { + super(message); + } +} + +@Injectable() +export class IamService { + private readonly logger = new Logger(IamService.name); + + get issuer(): string { + return (envOrNull('IAM_ISSUER') ?? '').replace(/\/$/, ''); + } + + get clientId(): string | null { + return envOrNull('IAM_CLIENT_ID'); + } + + get mode(): IamDelegationMode { + const value = envOr('IAM_LOGIN_DELEGATION', 'fallback'); + return value === 'off' || value === 'exclusive' ? value : 'fallback'; + } + + /** + * Enabled only when the switch is on **and** the minimum configuration is + * present. A half-configured deployment behaves exactly like an unconfigured + * one rather than failing in confusing ways at login time. + */ + get enabled(): boolean { + return ( + envOr('IAM_ENABLED', 'false').toLowerCase() === 'true' && + this.issuer !== '' && + this.clientId !== null && + envOrNull('IAM_CLIENT_SECRET') !== null && + this.mode !== 'off' + ); + } + + /** Should an unknown user / wrong password still be checked locally? */ + get allowsLocalFallback(): boolean { + return this.mode !== 'exclusive'; + } + + /** + * Verify a phone + password pair against the identity service. + * + * `clientIp` is forwarded so the IAM applies its per-IP rate limit to the + * real end user. Without it every login would share this server's IP and a + * handful of attempts would lock out the whole admin panel. + */ + async verifyCredentials( + identifier: string, + password: string, + clientIp?: string, + ): Promise { + const body: Record = { + identifier, + password, + client_id: this.clientId as string, + client_secret: envOrNull('IAM_CLIENT_SECRET') as string, + }; + + const tenantId = envOrNull('IAM_TENANT_ID'); + const tenantSlug = envOrNull('IAM_TENANT_SLUG'); + if (tenantId) body.tenant_id = tenantId; + else if (tenantSlug) body.tenant_slug = tenantSlug; + if (clientIp) body.client_ip = clientIp; + const returnTo = this.adminBrowserReturnUrl(); + if (returnTo) body.return_to = returnTo; + + const timeout = Number(envOr('IAM_HTTP_TIMEOUT_MS', '8000')); + + let response: Response; + try { + response = await fetch(`${this.issuer}/api/v1/auth/login`, { + method: 'POST', + headers: { 'content-type': 'application/json', accept: 'application/json' }, + body: JSON.stringify(body), + signal: AbortSignal.timeout(timeout), + }); + } catch (error) { + throw new IamUnavailableError( + `identity service unreachable: ${(error as Error).message}`, + ); + } + + const payload = (await response.json().catch(() => ({}))) as Record; + + if (response.ok) { + if (payload.status === 'MFA_REQUIRED') { + throw new IamMfaRequiredError('two-factor authentication required'); + } + if (payload.status !== 'SUCCESS') { + throw new IamUnavailableError('unexpected response from identity service'); + } + + const user = (payload.user ?? {}) as Record; + return { + sub: String(user.id ?? ''), + email: user.email ?? null, + phoneNumber: user.phone_number ?? null, + firstName: user.first_name ?? null, + lastName: user.last_name ?? null, + sessionId: payload.session_id ?? null, + browserTicket: typeof payload.browser_ticket === 'string' ? payload.browser_ticket : null, + }; + } + + // 401/403/422 mean the credentials themselves were not accepted. + if ([401, 403, 422].includes(response.status)) { + const code = String(payload.error ?? ''); + if (code === 'account_locked' || code === 'user_inactive') { + // A locked account is a definite answer, not an "unknown user" — + // falling back to the local password would defeat the lockout. + throw new IamInvalidCredentialsError(code); + } + throw new IamInvalidCredentialsError('invalid_credentials'); + } + + this.logger.warn( + `identity service returned ${response.status} for a delegated login`, + ); + throw new IamUnavailableError(`identity service returned ${response.status}`); + } + + /** + * Report a one-time code this app generated, sent and verified itself. + * + * The app's login has **no password**, so `verifyCredentials` cannot be used: + * there is nothing to send. Without this call, an OTP login never reaches the + * identity service at all — no central session, no entry in the security log + * and no way for a central sign-out to end it. + * + * The IAM only accepts this from a trusted confidential client carrying the + * explicit `passwordless_delegation_allowed` flag. An unknown mobile is + * created there. A locked or inactive account is still refused. + */ + async attestOtpLogin( + identifier: string, + clientIp?: string, + factorReference?: string | null, + ): Promise { + const body: Record = { + identifier, + client_id: this.clientId as string, + client_secret: envOrNull('IAM_CLIENT_SECRET') as string, + factor: 'sms_otp', + }; + + const tenantId = envOrNull('IAM_TENANT_ID'); + const tenantSlug = envOrNull('IAM_TENANT_SLUG'); + if (tenantId) body.tenant_id = tenantId; + else if (tenantSlug) body.tenant_slug = tenantSlug; + if (clientIp) body.client_ip = clientIp; + if (factorReference) body.factor_reference = factorReference; + const returnTo = this.customerBrowserReturnUrl(); + if (returnTo) body.return_to = returnTo; + + const timeout = Number(envOr('IAM_HTTP_TIMEOUT_MS', '8000')); + + let response: Response; + try { + response = await fetch(`${this.issuer}/api/v1/auth/login/delegated-otp`, { + method: 'POST', + headers: { 'content-type': 'application/json', accept: 'application/json' }, + body: JSON.stringify(body), + signal: AbortSignal.timeout(timeout), + }); + } catch (error) { + throw new IamUnavailableError(`identity service unreachable: ${(error as Error).message}`); + } + + const payload = (await response.json().catch(() => ({}))) as Record; + + if (response.ok) { + if (payload.status !== 'SUCCESS') { + throw new IamUnavailableError('unexpected response from identity service'); + } + const user = (payload.user ?? {}) as Record; + return { + sub: String(user.id ?? ''), + email: user.email ?? null, + phoneNumber: user.phone_number ?? null, + firstName: user.first_name ?? null, + lastName: user.last_name ?? null, + sessionId: payload.session_id ?? null, + browserTicket: typeof payload.browser_ticket === 'string' ? payload.browser_ticket : null, + }; + } + + const code = String(payload.error ?? ''); + + // Not migrated to the IAM yet: this app stays the authority for them. + if (response.status === 401 && code === 'user_not_found') { + throw new IamUserUnknownError(identifier); + } + + // Locked, deactivated or two-factor: a decision, not a gap. Honour it. + if ([401, 403, 422].includes(response.status)) { + throw new IamAccessDeniedError(`identity service refused the login: ${code}`, code || 'denied'); + } + + this.logger.warn(`identity service returned ${response.status} for an OTP attestation`); + throw new IamUnavailableError(`identity service returned ${response.status}`); + } + + /** + * مقصد بلیت مرورگر. خروج از فهرست گسترده‌تری استفاده می‌کند؛ اگر ورود فقط + * `IAM_BROWSER_RETURN_URL` را ببیند و آن خالی باشد، کوکی مشترک گذاشته نمی‌شود + * و فقط خروج به IAM می‌رود. + */ + private customerBrowserReturnUrl(): string | null { + return ( + envOrNull('IAM_BROWSER_RETURN_URL') || + envOrNull('IAM_POST_LOGOUT_REDIRECT_URI') || + envList('IAM_ALLOWED_RETURN_URLS')[0] || + null + ); + } + + private adminBrowserReturnUrl(): string | null { + return ( + envOrNull('IAM_ADMIN_BROWSER_RETURN_URL') || + envOrNull('IAM_ADMIN_POST_LOGOUT_REDIRECT_URI') || + envList('IAM_ADMIN_ALLOWED_RETURN_URLS')[0] || + this.customerBrowserReturnUrl() + ); + } + + browserBootstrapUrl(ticket: string | null | undefined): string | null { + if (!ticket || !this.issuer) return null; + return `${this.issuer}/auth/bootstrap?ticket=${encodeURIComponent(ticket)}`; + } + + /** تبادل کد مجوز مرورگر. پاسخ از خود issuer و با راز کلاینت آمده است. */ + async exchangeAuthorizationCode( + code: string, + codeVerifier: string, + redirectUri: string, + ): Promise<{ sub: string; phoneNumber: string | null; sessionId: string | null }> { + const timeout = Number(envOr('IAM_HTTP_TIMEOUT_MS', '8000')); + const body = new URLSearchParams({ + grant_type: 'authorization_code', + code, + redirect_uri: redirectUri, + code_verifier: codeVerifier, + client_id: this.clientId as string, + client_secret: envOrNull('IAM_CLIENT_SECRET') as string, + }); + + let response: Response; + try { + response = await fetch(`${this.issuer}/oauth/token`, { + method: 'POST', + headers: { 'content-type': 'application/x-www-form-urlencoded', accept: 'application/json' }, + body, + signal: AbortSignal.timeout(timeout), + }); + } catch (error) { + throw new IamUnavailableError(`identity service unreachable: ${(error as Error).message}`); + } + + const payload = (await response.json().catch(() => ({}))) as Record; + if (!response.ok || typeof payload.id_token !== 'string') { + throw new IamUnavailableError(`identity service refused the authorization code (${response.status})`); + } + + const claims = decodeIdToken(payload.id_token); + if (claims.iss !== this.issuer) { + throw new IamUnavailableError('identity token issuer does not match'); + } + const aud = claims.aud; + const audiences = Array.isArray(aud) ? aud : [aud]; + if (!audiences.includes(this.clientId)) { + throw new IamUnavailableError('identity token audience does not match'); + } + + return { + sub: String(claims.sub ?? ''), + phoneNumber: typeof claims.phone_number === 'string' ? claims.phone_number : null, + sessionId: typeof claims.sid === 'string' ? claims.sid : null, + }; + } +} + +function decodeIdToken(token: string): Record { + const part = token.split('.')[1]; + if (!part) throw new IamUnavailableError('identity token is malformed'); + return JSON.parse(Buffer.from(part, 'base64url').toString('utf8')) as Record; +} diff --git a/apps/api/src/modules/orders/dto/create-order.dto.ts b/apps/api/src/modules/orders/dto/create-order.dto.ts index 6c3d828..c029120 100644 --- a/apps/api/src/modules/orders/dto/create-order.dto.ts +++ b/apps/api/src/modules/orders/dto/create-order.dto.ts @@ -25,8 +25,20 @@ export class CreateOrderItemInputDto { } export class CreateOrderDto { + /** + * IGNORED BY THE SERVER. The customer is taken from the caller's token. + * + * It was required, and the route was public, so anyone could place an order + * on any customer's account — which lands on their gold debt and their + * ledger. Logged as SEC-02 in docs/parity/ISSUES.md. + * + * Kept as an optional field only so the two apps, which still send it, do not + * fail validation mid-flight. OrdersService logs a mismatch and always uses + * the token. Removed from the DTO and from both apps in Phase 2. + */ + @IsOptional() @IsString() - customerId!: string; + customerId?: string; @IsOptional() @IsString() diff --git a/apps/api/src/modules/orders/orders.controller.ts b/apps/api/src/modules/orders/orders.controller.ts index afb2937..b2eefc9 100644 --- a/apps/api/src/modules/orders/orders.controller.ts +++ b/apps/api/src/modules/orders/orders.controller.ts @@ -2,24 +2,61 @@ import { Body, Controller, Get, Param, Patch, Post } from '@nestjs/common'; import { OrdersService } from './orders.service'; import { CreateOrderDto } from './dto/create-order.dto'; import { UpdateOrderStatusDto } from './dto/update-order-status.dto'; -import { Public } from '../auth/guards'; +import { RequirePermission } from '../auth/guards'; +import { CurrentCustomer, CustomerAuth } from '../customer-auth/customer.guards'; +import type { AuthenticatedCustomer } from '../customer-auth/customer-jwt.strategy'; -@Public() // pre-existing unauthenticated endpoint; see Phase 1 notes +/** + * Order routes. + * + * All three were `@Public()` until the security hotfix. The reference's + * customer-facing order endpoints sat behind its `api-customer` guard and read + * the customer from the token (`auth()->id()`, + * henza_server ApiMobileController.php:533); the target had no customer session + * at the time, so the id travelled in the body and the server trusted it. + * That meant an anonymous caller could place an order on anyone's account — + * and an order lands on that customer's gold debt and ledger. Now that the + * customer token exists, the reference's arrangement is restored. + */ @Controller('orders') export class OrdersController { constructor(private readonly orders: OrdersService) {} + /** The customer comes from the token; the body's `customerId` is ignored. */ + @CustomerAuth() @Post() - create(@Body() dto: CreateOrderDto) { - return this.orders.createOrder(dto); + create(@Body() dto: CreateOrderDto, @CurrentCustomer() me: AuthenticatedCustomer) { + return this.orders.createOrder(dto, me.id, { placedBy: 'customer' }); } - @Get(':id') - get(@Param('id') id: string) { + /** + * Unscoped read for operators. + * + * Declared BEFORE the `:id` route below: Nest matches in declaration order, + * so a literal segment that could also be read as a parameter has to come + * first or it is never reached. + */ + @Get('admin/:id') + @RequirePermission('order.list') + getAsAdmin(@Param('id') id: string) { return this.orders.getById(id); } + /** + * A customer reading one of their own orders. Scoped by token; someone + * else's order is a 404 rather than a 403, so ids stay unenumerable. + * + * Mounted under /orders/:id (not /customer/me/orders/:id) so the existing + * client paths keep working; it is the scoping that matters, not the shape. + */ + @CustomerAuth() + @Get(':id') + get(@Param('id') id: string, @CurrentCustomer() me: AuthenticatedCustomer) { + return this.orders.getOwnedById(id, me.id); + } + @Patch(':id/status') + @RequirePermission('order.list.sts.submit') updateStatus(@Param('id') id: string, @Body() dto: UpdateOrderStatusDto) { return this.orders.updateStatus(id, dto.status, dto.actorAdminUserId, dto.note); } diff --git a/apps/api/src/modules/orders/orders.module.ts b/apps/api/src/modules/orders/orders.module.ts index d7316d1..00237c7 100644 --- a/apps/api/src/modules/orders/orders.module.ts +++ b/apps/api/src/modules/orders/orders.module.ts @@ -3,9 +3,10 @@ import { OrdersService } from './orders.service'; import { OrdersController } from './orders.controller'; import { CatalogModule } from '../catalog/catalog.module'; import { AccountingModule } from '../accounting/accounting.module'; +import { PricingModule } from '../pricing/pricing.module'; @Module({ - imports: [CatalogModule, AccountingModule], + imports: [CatalogModule, AccountingModule, PricingModule], controllers: [OrdersController], providers: [OrdersService], exports: [OrdersService], diff --git a/apps/api/src/modules/orders/orders.service.spec.ts b/apps/api/src/modules/orders/orders.service.spec.ts new file mode 100644 index 0000000..395de63 --- /dev/null +++ b/apps/api/src/modules/orders/orders.service.spec.ts @@ -0,0 +1,121 @@ +import { Prisma } from '@prisma/client'; +import { OrdersService } from './orders.service'; + +/** + * Owner ruling 2026-10-08: an order is credited to the customer's expert AT + * THE MOMENT IT IS PLACED (legacy `orders.reagent_id`), and a later change of + * the customer's expert never moves it. + */ +describe('OrdersService.createOrder — sales expert credit', () => { + function build(referredByAgentId: string | null) { + const created: Record[] = []; + const tx = { + order: { + create: jest.fn(async ({ data }: { data: Record }) => { + created.push(data); + return { id: 'o1', ...data }; + }), + }, + }; + const prisma = { + customer: { + findUnique: jest.fn(async () => ({ + id: 'c1', + referredByAgentId, + goldDebtGrams: new Prisma.Decimal(0), + goldCreditLimitGrams: new Prisma.Decimal(1000), + })), + }, + $transaction: jest.fn(async (fn: (t: typeof tx) => unknown) => fn(tx)), + }; + const catalog = { getVariantOrThrow: jest.fn(async () => ({ id: 'v1', rashWeightGrams: '10' })) }; + const accounting = { orderStatusReached: jest.fn() }; + const wage = { quote: jest.fn() }; + const service = new OrdersService(prisma as never, catalog as never, {} as never, accounting as never, wage as never); + return { service, created }; + } + + const dto = { items: [{ productVariantId: 'v1', quantity: 1, wagePercent: 3 }] } as never; + + it("records the customer's current expert on the order", async () => { + const { service, created } = build('agent-A'); + await service.createOrder(dto, 'c1'); + expect(created[0].salesAgentId).toBe('agent-A'); + }); + + it('records no expert for a customer without one', async () => { + const { service, created } = build(null); + await service.createOrder(dto, 'c1'); + expect(created[0].salesAgentId).toBeNull(); + }); +}); + +/** A server quote of 10% for every variant. */ +const wageStub = { + quote: jest.fn(async (_c: string, ids: string[]) => new Map(ids.map((id) => [id, { wagePercentSnapshot: '10', discountPercentSnapshot: '0' }]))), +}; + +/** MON-05 (owner ruling 2026-10-08): «عدم سفارش» stops app orders only. */ +describe('OrdersService.createOrder — order ban', () => { + function build(canPlaceOrders: boolean) { + const tx = { order: { create: jest.fn(async ({ data }: { data: object }) => ({ id: 'o1', ...data })) } }; + const prisma = { + customer: { + findUnique: jest.fn(async () => ({ + id: 'c1', + canPlaceOrders, + referredByAgentId: null, + goldDebtGrams: new Prisma.Decimal(0), + goldCreditLimitGrams: new Prisma.Decimal(1000), + })), + }, + $transaction: jest.fn(async (fn: (t: typeof tx) => unknown) => fn(tx)), + }; + const catalog = { getVariantOrThrow: jest.fn(async () => ({ id: 'v1', rashWeightGrams: '10' })) }; + return new OrdersService(prisma as never, catalog as never, {} as never, { orderStatusReached: jest.fn() } as never, wageStub as never); + } + const dto = { items: [{ productVariantId: 'v1', quantity: 1, wagePercent: 3 }] } as never; + + it('refuses a suspended customer ordering from the app', async () => { + await expect(build(false).createOrder(dto, 'c1', { placedBy: 'customer' })).rejects.toThrow('غیرفعال'); + }); + + it('lets an operator place an order for a suspended customer', async () => { + await expect(build(false).createOrder(dto, 'c1', { placedBy: 'operator' })).resolves.toMatchObject({ id: 'o1' }); + }); + + it('lets an allowed customer order from the app', async () => { + await expect(build(true).createOrder(dto, 'c1', { placedBy: 'customer' })).resolves.toMatchObject({ id: 'o1' }); + }); +}); + +/** MON-08 (owner ruling 2026-10-08): an app order is priced by the server, never by the app. */ +describe('OrdersService.createOrder — server-side making charge', () => { + function build() { + const created: Record[] = []; + const tx = { order: { create: jest.fn(async ({ data }: { data: Record }) => { created.push(data); return { id: 'o1', ...data }; }) } }; + const prisma = { + customer: { findUnique: jest.fn(async () => ({ id: 'c1', canPlaceOrders: true, referredByAgentId: null, goldDebtGrams: new Prisma.Decimal(0), goldCreditLimitGrams: new Prisma.Decimal(1000) })) }, + $transaction: jest.fn(async (fn: (t: typeof tx) => unknown) => fn(tx)), + }; + const catalog = { getVariantOrThrow: jest.fn(async () => ({ id: 'v1', rashWeightGrams: '10' })) }; + const service = new OrdersService(prisma as never, catalog as never, {} as never, { orderStatusReached: jest.fn() } as never, wageStub as never); + return { service, created }; + } + // A tampered request: zero making charge, a 50% discount and a rial charge. + const tampered = { items: [{ productVariantId: 'v1', quantity: 1, wagePercent: 0, discountPercent: 50, flatRialCharge: 999 }] } as never; + + it('ignores what the app sends and uses the server quote', async () => { + const { service, created } = build(); + await service.createOrder(tampered, 'c1', { placedBy: 'customer' }); + expect(created[0].totalGoldWeightGrams.toString()).toBe('11'); + expect(created[0].flatRialCharge.toString()).toBe('0'); + }); + + it('keeps the numbers an operator entered in the panel', async () => { + const { service, created } = build(); + await service.createOrder(tampered, 'c1', { placedBy: 'operator' }); + expect(created[0].totalGoldWeightGrams.toString()).toBe('5'); + expect(created[0].flatRialCharge.toString()).toBe('999'); + }); +}); diff --git a/apps/api/src/modules/orders/orders.service.ts b/apps/api/src/modules/orders/orders.service.ts index af274e8..bd4c982 100644 --- a/apps/api/src/modules/orders/orders.service.ts +++ b/apps/api/src/modules/orders/orders.service.ts @@ -1,9 +1,11 @@ -import { Injectable, NotFoundException } from '@nestjs/common'; +import { ForbiddenException, Injectable, Logger, NotFoundException } from '@nestjs/common'; import { OrderChannel, OrderStatus, Prisma } from '@prisma/client'; import { PrismaService } from '../../prisma/prisma.service'; import { CatalogService } from '../catalog/catalog.service'; import { LedgerService } from '../accounting/ledger.service'; +import { AccountingHooksService } from '../accounting-sync/accounting-hooks.service'; import { CreateOrderDto } from './dto/create-order.dto'; +import { WageService } from '../pricing/wage.service'; interface ComputedItem { productVariantId: string; @@ -17,28 +19,73 @@ interface ComputedItem { @Injectable() export class OrdersService { + private readonly logger = new Logger(OrdersService.name); + constructor( private readonly prisma: PrismaService, private readonly catalog: CatalogService, private readonly ledger: LedgerService, + private readonly accounting: AccountingHooksService, + private readonly wage: WageService, ) {} /** * Places a stock order. Per line item: * w = rashWeightGrams * (1 + (wagePercent - discountPercent) / 100) * mirrors legacy ApiMobileController::setOrder. Debt is NOT posted here — - * only once the order reaches DELIVERED_TO_AGENT (see updateStatus). + * only while the order is delivered (see updateStatus / syncOrderDebt). */ - async createOrder(dto: CreateOrderDto) { - const customer = await this.prisma.customer.findUnique({ where: { id: dto.customerId } }); - if (!customer) throw new NotFoundException(`Customer ${dto.customerId} not found`); + /** + * @param customerId taken from the caller's token by the controller, NEVER + * from the request body. The body's `customerId` is ignored; see the note + * on CreateOrderDto. + */ + async createOrder( + dto: CreateOrderDto, + customerId: string, + opts: { placedBy: 'customer' | 'operator' } = { placedBy: 'operator' }, + ) { + const customer = await this.prisma.customer.findUnique({ where: { id: customerId } }); + if (!customer) throw new NotFoundException(`Customer ${customerId} not found`); + + // MON-05 (owner ruling 2026-10-08): «معلق کردن سفارش» stops the customer + // ordering from the app. Legacy stored the switch (customers.sts) but no + // code read it, so it stopped nothing. An operator placing an order FOR + // the customer from the panel is not blocked — that is how a suspended + // account is still served. + if (opts.placedBy === 'customer' && !customer.canPlaceOrders) { + throw new ForbiddenException('ثبت سفارش برای حساب شما فعلاً غیرفعال است. لطفاً با پشتیبانی تماس بگیرید.'); + } + + // The apps still send customerId in the body (removed from them in Phase 2). + // It is not used for anything; a mismatch means either a stale client or an + // attempt to order on someone else's account, and both are worth seeing. + if (dto.customerId && dto.customerId !== customerId) { + this.logger.warn( + `Order body carried customerId=${dto.customerId} but the token is ${customerId}; ` + + `the token wins.`, + ); + } + + // MON-08 (owner ruling 2026-10-08): an app order is priced by the server's + // making-charge formula (pricing/wage-formula.ts — legacy's by default), the + // same figure the app showed. Whatever the app sends for wage, discount or + // rial charge is ignored, so a tampered request cannot set its own price. + // An operator ordering from the panel keeps the numbers they entered, as + // legacy's order builder did. + const quotes = + opts.placedBy === 'customer' + ? await this.wage.quote(customerId, dto.items.map((i) => i.productVariantId)) + : null; const computedItems: ComputedItem[] = await Promise.all( dto.items.map(async (item) => { const variant = await this.catalog.getVariantOrThrow(item.productVariantId); const rashWeight = new Prisma.Decimal(variant.rashWeightGrams); - const wagePercent = new Prisma.Decimal(item.wagePercent); - const discountPercent = new Prisma.Decimal(item.discountPercent ?? 0); + const quote = quotes?.get(variant.id); + if (quotes && !quote) throw new NotFoundException(`Variant ${variant.id} not found`); + const wagePercent = new Prisma.Decimal(quote ? quote.wagePercentSnapshot : item.wagePercent); + const discountPercent = new Prisma.Decimal(quote ? quote.discountPercentSnapshot : (item.discountPercent ?? 0)); const netPercent = wagePercent.sub(discountPercent); const computedWeightGrams = rashWeight.mul(netPercent.div(100).add(1)); @@ -49,7 +96,8 @@ export class OrdersService { wagePercentSnapshot: wagePercent, discountPercentSnapshot: discountPercent, computedWeightGrams, - flatRialCharge: new Prisma.Decimal(item.flatRialCharge ?? 0), + // Legacy app: rial_pay is always 0 (cart.vue); only an operator sets one. + flatRialCharge: new Prisma.Decimal(quotes ? 0 : (item.flatRialCharge ?? 0)), }; }), ); @@ -78,7 +126,7 @@ export class OrdersService { const order = await tx.order.create({ data: { orderNumber: this.generateOrderNumber(), - customerId: dto.customerId, + customerId, branchId: dto.branchId, channel: dto.channel ?? OrderChannel.RETAIL, status: initialStatus, @@ -86,6 +134,11 @@ export class OrdersService { wageWeightGrams, flatRialCharge, isSuspendedOverCreditLimit, + // Legacy `'reagent_id' => auth()->user()->reagent_id` + // (ApiMobileController.php:601): the customer's expert at THIS + // moment, fixed on the order so a later change of expert never moves + // past sales (owner ruling 2026-10-08). + salesAgentId: customer.referredByAgentId, items: { create: computedItems.map((item) => ({ productVariantId: item.productVariantId, @@ -104,6 +157,9 @@ export class OrdersService { include: { items: true, statusEvents: true }, }); + // D27 — the document rule may say «at order placement». + await this.accounting.orderStatusReached(tx, order.id, initialStatus); + return order; }); } @@ -125,19 +181,24 @@ export class OrdersService { data: { orderId, fromStatus: order.status, toStatus: newStatus, note, actorAdminUserId }, }); - // Debt recognition point — mirrors legacy sts>4, which first becomes true - // at sts=5 ("تحویل مسئول فروش" / delivered to agent), not sts=6 (delivered - // to customer). Only fires once: a second transition into this status - // (e.g. a data-fix re-save) would double-post debt, so guard on the order - // not already having deliveredAt. - if (newStatus === OrderStatus.DELIVERED_TO_AGENT && !order.deliveredAt) { - await this.ledger.postOrderDebt(orderId, tx); + // Debt follows the status, as legacy's recomputed `sts > 4` did: owed + // while delivered (to the expert or the customer), not otherwise, never + // twice. See LedgerService.syncOrderDebt (ACC-03 / MON-04). + await this.ledger.syncOrderDebt(orderId, tx); + + // D27 — the accounting document (پیش‌فاکتور) follows the owner's rule on + // which status posts it, queued in this same transaction. + if (newStatus === OrderStatus.CANCELLED && order.status !== OrderStatus.CANCELLED) { + await this.accounting.orderCancelled(tx, orderId); + } else if (newStatus !== order.status) { + await this.accounting.orderStatusReached(tx, orderId, newStatus); } return updated; }); } + /** Unscoped read. Only reachable from the admin-guarded route. */ getById(orderId: string) { return this.prisma.order.findUnique({ where: { id: orderId }, @@ -145,6 +206,22 @@ export class OrdersService { }); } + /** + * A customer reading one of their own orders. + * + * Someone else's order is reported as 404, not 403: a 403 would confirm the + * id exists, which is the same enumeration leak the id-addressed customer + * routes had. + */ + async getOwnedById(orderId: string, customerId: string) { + const order = await this.prisma.order.findFirst({ + where: { id: orderId, customerId }, + include: { items: true, statusEvents: true, ledgerEntries: true }, + }); + if (!order) throw new NotFoundException('سفارش یافت نشد'); + return order; + } + private generateOrderNumber(): string { const random = Math.random().toString(36).slice(2, 8).toUpperCase(); return `ORD-${Date.now()}-${random}`; diff --git a/apps/api/src/modules/pricing/pricing.module.ts b/apps/api/src/modules/pricing/pricing.module.ts index 6688c69..7d1c42f 100644 --- a/apps/api/src/modules/pricing/pricing.module.ts +++ b/apps/api/src/modules/pricing/pricing.module.ts @@ -1,10 +1,12 @@ import { Module } from '@nestjs/common'; import { PricingService } from './pricing.service'; import { PricingController } from './pricing.controller'; +import { WageService } from './wage.service'; +import { WageAdminController, WageCustomerController } from './wage.controller'; @Module({ - controllers: [PricingController], - providers: [PricingService], - exports: [PricingService], + controllers: [PricingController, WageAdminController, WageCustomerController], + providers: [PricingService, WageService], + exports: [PricingService, WageService], }) export class PricingModule {} diff --git a/apps/api/src/modules/pricing/variant-price.spec.ts b/apps/api/src/modules/pricing/variant-price.spec.ts new file mode 100644 index 0000000..846b3f8 --- /dev/null +++ b/apps/api/src/modules/pricing/variant-price.spec.ts @@ -0,0 +1,208 @@ +import { + computeVariantPrice, + DEFAULT_PRODUCT_PRICE_EXTRA_PERCENT, +} from './variant-price'; + +/** + * D4 — unit-test the reference price formula against a HAND calculation. + * + * The expected numbers below were derived by walking + * henza_server/app/Models/ProductVariant.php:183-190 step by step with a + * calculator, NOT by running the implementation under test. Each case lists + * its intermediate steps so a reviewer can check the arithmetic without + * trusting the code. + * + * Reference formula: + * price = gold + gold * ((pay + extra) / 100) + * price = price + price * 0.07 + * temp = price - gold + * temp = temp + temp * 0.09 + * price = gold + temp + * price = price * grams + * return floor(price / 1000) * 1000 + */ +describe('computeVariantPrice — reference parity', () => { + describe('without the customer making-charge offset', () => { + it('matches the hand calculation for 1g at 15% wage', () => { + // gold = 30,000,000 pay = 15 extra = 7 grams = 1 + // 1) 30,000,000 + 30,000,000 * (22/100) = 36,600,000 + // 2) 36,600,000 * 1.07 = 39,162,000 + // 3) temp = 39,162,000 - 30,000,000 = 9,162,000 + // 4) temp * 1.09 = 9,986,580 + // 5) 30,000,000 + 9,986,580 = 39,986,580 + // 6) * 1 gram = 39,986,580 + // 7) floor(/1000)*1000 = 39,986,000 + expect( + computeVariantPrice({ + goldPricePerGram: 30_000_000, + wagePercent: 15, + grams: 1, + }), + ).toBe(39_986_000); + }); + + it('applies VAT to the non-metal portion only, not the whole price', () => { + // This is what the three SUPERSEDED formulas got wrong. If 9% were + // applied to the whole price the answer would be + // 39,162,000 * 1.09 = 42,686,580 -> 42,686,000 + // The live formula gives 39,986,000. Guards against porting the wrong one. + const live = computeVariantPrice({ + goldPricePerGram: 30_000_000, + wagePercent: 15, + grams: 1, + }); + const ifVatOnWholePrice = Math.floor((30_000_000 * 1.22 * 1.07 * 1.09) / 1000) * 1000; + + expect(live).toBe(39_986_000); + expect(ifVatOnWholePrice).toBe(42_686_000); + expect(live).not.toBe(ifVatOnWholePrice); + }); + + it('handles a zero making charge', () => { + // 1) 30,000,000 * 1.07 (extra 7 only) = 32,100,000 + // 2) * 1.07 = 34,347,000 + // 3) temp = 4,347,000 4) * 1.09 = 4,738,230 + // 5) 34,738,230 6) * 1g 7) floor -> 34,738,000 + expect( + computeVariantPrice({ + goldPricePerGram: 30_000_000, + wagePercent: 0, + grams: 1, + }), + ).toBe(34_738_000); + }); + + it('multiplies by weight before the final floor', () => { + // gold = 28,500,000 pay = 20 extra = 7 grams = 2.345 + // 1) 28,500,000 * 1.27 = 36,195,000 + // 2) * 1.07 = 38,728,650 + // 3) temp = 10,228,650 4) * 1.09 = 11,149,228.5 + // 5) 39,649,228.5 6) * 2.345 = 92,977,440.8325 + // 7) floor(/1000)*1000 = 92,977,000 + expect( + computeVariantPrice({ + goldPricePerGram: 28_500_000, + wagePercent: 20, + grams: 2.345, + }), + ).toBe(92_977_000); + }); + + it('rounds DOWN to the nearest 1000, never up', () => { + const price = computeVariantPrice({ + goldPricePerGram: 28_500_000, + wagePercent: 20, + grams: 2.345, + }); + // The unfloored value is 92,977,440.83 — rounding half-up would give + // 92,977,000 too, so also assert the property directly. + expect(price % 1000).toBe(0); + expect(price).toBeLessThanOrEqual(92_977_440.8325); + }); + + it('defaults extraPercent to 7 when the config row is missing', () => { + expect(DEFAULT_PRODUCT_PRICE_EXTRA_PERCENT).toBe(7); + expect( + computeVariantPrice({ goldPricePerGram: 30_000_000, wagePercent: 15, grams: 1 }), + ).toBe( + computeVariantPrice({ + goldPricePerGram: 30_000_000, + wagePercent: 15, + grams: 1, + extraPercent: 7, + }), + ); + }); + }); + + describe('with the customer making-charge offset (customers.percent)', () => { + it('adds the offset to the wage percent — hand-checked at offset 3', () => { + // gold = 30,000,000 pay = 15 offset = 3 -> effective wage 18 + // 1) 30,000,000 + 30,000,000 * (25/100) = 37,500,000 + // 2) * 1.07 = 40,125,000 + // 3) temp = 10,125,000 4) * 1.09 = 11,036,250 + // 5) 41,036,250 6) * 1g 7) floor = 41,036,000 + expect( + computeVariantPrice({ + goldPricePerGram: 30_000_000, + wagePercent: 15, + grams: 1, + makingChargeOffsetPercent: 3, + }), + ).toBe(41_036_000); + }); + + it('an offset of 0 is identical to passing no offset at all', () => { + // This is the behaviour-neutrality guarantee behind the migration's + // DEFAULT 0: every existing customer keeps today's price. + const withoutField = computeVariantPrice({ + goldPricePerGram: 30_000_000, + wagePercent: 15, + grams: 1, + }); + const withZero = computeVariantPrice({ + goldPricePerGram: 30_000_000, + wagePercent: 15, + grams: 1, + makingChargeOffsetPercent: 0, + }); + + expect(withZero).toBe(withoutField); + expect(withZero).toBe(39_986_000); + }); + + it('a non-zero offset raises the price — the default must stay 0', () => { + const atZero = computeVariantPrice({ + goldPricePerGram: 30_000_000, + wagePercent: 15, + grams: 1, + makingChargeOffsetPercent: 0, + }); + const atThree = computeVariantPrice({ + goldPricePerGram: 30_000_000, + wagePercent: 15, + grams: 1, + makingChargeOffsetPercent: 3, + }); + + expect(atThree).toBeGreaterThan(atZero); + // Backfilling 3 instead of 0 would have moved this price by 1,050,000. + expect(atThree - atZero).toBe(1_050_000); + }); + + it('matches the hand calculation for a multi-gram line with an offset', () => { + // gold = 35,000,000 pay = 12.5 offset = 3 extra = 7 grams = 5.25 + // 1) 35,000,000 * 1.225 = 42,875,000 + // 2) * 1.07 = 45,876,250 + // 3) temp = 10,876,250 4) * 1.09 = 11,855,112.5 + // 5) 46,855,112.5 6) * 5.25 = 245,989,340.625 + // 7) floor(/1000)*1000 = 245,989,000 + expect( + computeVariantPrice({ + goldPricePerGram: 35_000_000, + wagePercent: 12.5, + grams: 5.25, + makingChargeOffsetPercent: 3, + }), + ).toBe(245_989_000); + }); + + it('is equivalent to folding the offset into wagePercent, as the app does', () => { + // henza_pwa sends percent_pay = state.percent + variant.percentage_pay + // (src/Mixins/product/index.ts:69-75), so the two must agree exactly. + const asAppSendsIt = computeVariantPrice({ + goldPricePerGram: 31_250_000, + wagePercent: 18 + 4, + grams: 3.1, + }); + const asServerWillDeriveIt = computeVariantPrice({ + goldPricePerGram: 31_250_000, + wagePercent: 18, + grams: 3.1, + makingChargeOffsetPercent: 4, + }); + + expect(asServerWillDeriveIt).toBe(asAppSendsIt); + }); + }); +}); diff --git a/apps/api/src/modules/pricing/variant-price.ts b/apps/api/src/modules/pricing/variant-price.ts new file mode 100644 index 0000000..2d4597e --- /dev/null +++ b/apps/api/src/modules/pricing/variant-price.ts @@ -0,0 +1,94 @@ +/** + * The reference gold price formula, ported verbatim. + * + * Source of truth: henza_server/app/Models/ProductVariant.php:183-190 + * + * $price = goldPrice + (goldPrice * ((percentage_pay + extra_percent) / 100)); + * $price += $price * 0.07; // margin + * $temp = $price - goldPrice; // the non-metal portion ONLY + * $temp += $temp * 0.09; // VAT, on that portion only + * $price = goldPrice + $temp; + * $price *= grams; + * return floor($price / 1000) * 1000; + * + * Three superseded variants are commented out above it (`:170-179`, `:192-200`) + * which apply the 9% to the WHOLE price. Those are NOT the live behaviour and + * are deliberately not ported (D4). + * + * `extra_percent` comes from ConfigStatic['product_price_extra_percent'] and + * falls back to 7 when the row is missing (`ProductVariant.php:50`). + * + * Number semantics: the reference computes in PHP floats and only rounds at the + * very end, with floor() to the nearest 1000. Decimal is deliberately NOT used + * here — switching to exact arithmetic would change results at the boundary and + * break parity with the reference (D4: match calculations and rounding + * exactly). Money that is STORED still uses Prisma.Decimal; this is a + * presentation-time price computation, as in the reference. + */ + +/** ConfigStatic['product_price_extra_percent'] default (ProductVariant.php:50). */ +export const DEFAULT_PRODUCT_PRICE_EXTRA_PERCENT = 7; + +/** The fixed margin applied before VAT (ProductVariant.php:184). */ +const MARGIN_RATE = 0.07; + +/** VAT, applied to the non-metal portion only (ProductVariant.php:186). */ +const VAT_RATE = 0.09; + +export interface VariantPriceInput { + /** Gold price per gram, in the same unit the reference's WebServiceGold returns. */ + goldPricePerGram: number; + /** The variant's making charge, legacy `percentage_pay`. */ + wagePercent: number; + /** The variant's weight in grams, legacy `grams`. */ + grams: number; + /** ConfigStatic['product_price_extra_percent']; defaults to 7 when absent. */ + extraPercent?: number; + /** + * The per-customer making-charge offset — legacy `customers.percent`, the + * target's `Customer.makingChargeOffsetPercent`. + * + * The reference does NOT apply this inside the formula. The app adds it to + * the variant's making charge before sending the order line + * (henza_pwa/src/Mixins/product/index.ts:69-75: + * getWage(v) = myStore.state.percent + v.percentage_pay), + * so the effective wage percent is the sum. Modelled here as an explicit, + * defaulted-to-zero input so both paths can be tested, and so that passing 0 + * reproduces today's behaviour exactly. + */ + makingChargeOffsetPercent?: number; +} + +/** + * Computes a variant's price exactly as the reference does. + * + * Returns the price for the FULL weight (already multiplied by grams) and + * floored to the nearest 1000. + */ +export function computeVariantPrice(input: VariantPriceInput): number { + const { + goldPricePerGram, + wagePercent, + grams, + extraPercent = DEFAULT_PRODUCT_PRICE_EXTRA_PERCENT, + makingChargeOffsetPercent = 0, + } = input; + + // The app-side sum: customer offset + variant making charge. + const effectiveWagePercent = wagePercent + makingChargeOffsetPercent; + + let price = + goldPricePerGram + goldPricePerGram * ((effectiveWagePercent + extraPercent) / 100); + + price += price * MARGIN_RATE; + + // VAT applies to the non-metal portion only — this is the part the three + // superseded formulas got wrong. + let temp = price - goldPricePerGram; + temp += temp * VAT_RATE; + + price = goldPricePerGram + temp; + price *= grams; + + return Math.floor(price / 1000) * 1000; +} diff --git a/apps/api/src/modules/pricing/wage-formula.spec.ts b/apps/api/src/modules/pricing/wage-formula.spec.ts new file mode 100644 index 0000000..cd5a87a --- /dev/null +++ b/apps/api/src/modules/pricing/wage-formula.spec.ts @@ -0,0 +1,54 @@ +import { BadRequestException } from '@nestjs/common'; +import { computeSample, computeWage, LEGACY_WAGE_FORMULA, parseWageFormula, type WageFormula } from './wage-formula'; + +/** + * The making-charge formula. The default must reproduce legacy exactly: + * final % = variant % + customer % − largest active promotion + * weight = rash × (1 + final/100) × qty + */ +describe('wage formula', () => { + const legacy = LEGACY_WAGE_FORMULA; + + it('legacy: variant + customer, no promotion', () => { + const w = computeWage(legacy, { variantPercent: '7', customerPercent: '3', promotionPercents: [] }); + expect(w.finalPercent).toBe('10'); + expect(w.wagePercentSnapshot).toBe('10'); + expect(w.discountPercentSnapshot).toBe('0'); + }); + + it('legacy: the LARGEST promotion is subtracted, not the sum', () => { + const w = computeWage(legacy, { variantPercent: '7', customerPercent: '3', promotionPercents: ['1', '2.5', '2'] }); + expect(w.promotionPercent).toBe('2.5'); + expect(w.finalPercent).toBe('7.5'); + // Stored so that wage − discount = final, which is what createOrder multiplies by. + expect(w.wagePercentSnapshot).toBe('10'); + expect(w.discountPercentSnapshot).toBe('2.5'); + }); + + it('legacy sample weight matches setOrder: 10 g × (1 + 10%) = 11 g', () => { + const r = computeSample(legacy, { rashWeightGrams: '10', quantity: 1, variantPercent: '7', customerPercent: '3', promotionPercent: '0' }); + expect(r.totalGrams).toBe('11'); + expect(r.wageGrams).toBe('1'); + }); + + it('a changed structure: no customer term, sum of promotions, +0.5, floor 5, 2 decimals', () => { + const f: WageFormula = { ...legacy, customerCoef: '0', promotionPick: 'sum', constant: '0.5', min: '5', decimals: 2 }; + expect(computeWage(f, { variantPercent: '6', customerPercent: '3', promotionPercents: ['1', '1'] }).finalPercent).toBe('5'); + const w = computeWage(f, { variantPercent: '7.333', customerPercent: '3', promotionPercents: [] }); + expect(w.finalPercent).toBe('7.83'); + expect(w.limitedBy).toBeNull(); + }); + + it('the cap is reported when it bites', () => { + const w = computeWage({ ...legacy, max: '8' }, { variantPercent: '7', customerPercent: '3', promotionPercents: [] }); + expect(w).toMatchObject({ finalPercent: '8', limitedBy: 'max', beforeLimits: '10' }); + }); + + it('rejects nonsense from the admin form', () => { + expect(() => parseWageFormula({ ...legacy, variantCoef: 'abc' })).toThrow(BadRequestException); + expect(() => parseWageFormula({ ...legacy, min: '9', max: '8' })).toThrow(BadRequestException); + expect(() => parseWageFormula({ ...legacy, promotionPick: 'avg' })).toThrow(BadRequestException); + expect(() => parseWageFormula({ ...legacy, decimals: 9 })).toThrow(BadRequestException); + expect(parseWageFormula({ ...legacy })).toEqual(legacy); + }); +}); diff --git a/apps/api/src/modules/pricing/wage-formula.ts b/apps/api/src/modules/pricing/wage-formula.ts new file mode 100644 index 0000000..74058c5 --- /dev/null +++ b/apps/api/src/modules/pricing/wage-formula.ts @@ -0,0 +1,211 @@ +import { BadRequestException } from '@nestjs/common'; +import { Prisma } from '@prisma/client'; + +/** + * The making-charge («اجرت») formula — one place, used to price every order + * line placed from the app and to show the same figure in the app beforehand + * (owner ruling 2026-10-08: the number shown must be the number charged, and + * nothing the app sends is trusted). + * + * Legacy, reconstructed from henza_pwa + ApiMobileController::setOrder: + * percent_pay = customer.percent + variant.percentage_pay (Mixins/product getWage) + * discount = the LARGEST active promotion for the product, + * its category or its brand (getPromotion; customer-type off) + * final % = percent_pay − discount (setOrder :558) + * weight = rash × (1 + final/100) × qty + * rial charge = 0 (cart.vue: rial_pay: 0) + * + * The admin «اجرت» screen may change the numbers AND the structure: each term + * has a coefficient (0 switches it off), the promotion can be the largest or + * the sum, a constant can be added, and the result can be floored, capped and + * rounded. LEGACY_WAGE_FORMULA reproduces legacy exactly. + */ +export interface WageFormula { + version: 1; + /** × the variant's own making charge (legacy percentage_pay). */ + variantCoef: string; + /** × the customer's own percent (legacy customers.percent). */ + customerCoef: string; + /** × the promotion discount, SUBTRACTED. */ + promotionCoef: string; + /** Which promotion counts when several apply: legacy takes the largest. */ + promotionPick: 'max' | 'sum'; + /** Added as is, in percent. */ + constant: string; + /** Floor / cap on the final percent; null = none (legacy has neither). */ + min: string | null; + max: string | null; + /** Round the final percent to this many decimals; null = none (legacy). */ + decimals: number | null; +} + +export const LEGACY_WAGE_FORMULA: WageFormula = Object.freeze({ + version: 1, + variantCoef: '1', + customerCoef: '1', + promotionCoef: '1', + promotionPick: 'max', + constant: '0', + min: null, + max: null, + decimals: null, +}); + +export interface WageInputs { + variantPercent: Prisma.Decimal.Value; + customerPercent: Prisma.Decimal.Value; + /** Every active promotion that applies, in percent. */ + promotionPercents: Prisma.Decimal.Value[]; +} + +export interface WageBreakdown { + variantTerm: string; + customerTerm: string; + /** The promotion percent picked (largest or sum) before its coefficient. */ + promotionPercent: string; + promotionTerm: string; + constant: string; + beforeLimits: string; + /** Which limit changed the result, if any. */ + limitedBy: 'min' | 'max' | null; + finalPercent: string; + /** + * What the order line stores. OrdersService computes + * weight = rash × (1 + (wage − discount)/100), so wage = final + discount term + * and discount = discount term keeps that product equal to `finalPercent`. + */ + wagePercentSnapshot: string; + discountPercentSnapshot: string; +} + +const D = (v: Prisma.Decimal.Value | null | undefined) => new Prisma.Decimal(v ?? 0); + +export function computeWage(f: WageFormula, i: WageInputs): WageBreakdown { + const promos = i.promotionPercents.map(D); + const promo = + promos.length === 0 + ? D(0) + : f.promotionPick === 'sum' + ? promos.reduce((s, p) => s.add(p), D(0)) + : promos.reduce((m, p) => (p.gt(m) ? p : m), promos[0]); + + const variantTerm = D(f.variantCoef).mul(D(i.variantPercent)); + const customerTerm = D(f.customerCoef).mul(D(i.customerPercent)); + const promotionTerm = D(f.promotionCoef).mul(promo); + const constant = D(f.constant); + const before = variantTerm.add(customerTerm).sub(promotionTerm).add(constant); + + let final = before; + let limitedBy: WageBreakdown['limitedBy'] = null; + if (f.min !== null && final.lt(D(f.min))) { + final = D(f.min); + limitedBy = 'min'; + } + if (f.max !== null && final.gt(D(f.max))) { + final = D(f.max); + limitedBy = 'max'; + } + if (f.decimals !== null) final = final.toDecimalPlaces(f.decimals, Prisma.Decimal.ROUND_HALF_UP); + + return { + variantTerm: variantTerm.toString(), + customerTerm: customerTerm.toString(), + promotionPercent: promo.toString(), + promotionTerm: promotionTerm.toString(), + constant: constant.toString(), + beforeLimits: before.toString(), + limitedBy, + finalPercent: final.toString(), + wagePercentSnapshot: final.add(promotionTerm).toString(), + discountPercentSnapshot: promotionTerm.toString(), + }; +} + +/** A worked example for the admin screen: the formula applied to one order line. */ +export interface WageSample { + rashWeightGrams: string; + quantity: number; + variantPercent: string; + customerPercent: string; + promotionPercent: string; +} + +export const DEFAULT_WAGE_SAMPLE: WageSample = Object.freeze({ + rashWeightGrams: '10', + quantity: 1, + variantPercent: '7', + customerPercent: '3', + promotionPercent: '0', +}); + +export function computeSample(f: WageFormula, s: WageSample) { + const wage = computeWage(f, { + variantPercent: s.variantPercent, + customerPercent: s.customerPercent, + promotionPercents: D(s.promotionPercent).isZero() ? [] : [s.promotionPercent], + }); + const rash = D(s.rashWeightGrams).mul(s.quantity); + // Same formula as OrdersService.createOrder. + const total = rash.mul(D(wage.finalPercent).div(100).add(1)); + return { + ...wage, + rashTotalGrams: rash.toString(), + wageGrams: total.sub(rash).toDecimalPlaces(4).toString(), + totalGrams: total.toDecimalPlaces(4).toString(), + }; +} + +/* ───────────── validation (admin input) ───────────── */ + +function num(v: unknown, field: string, lo: number, hi: number): string { + const s = String(v ?? '').trim(); + let d: Prisma.Decimal; + try { + d = new Prisma.Decimal(s); + } catch { + throw new BadRequestException(`${field}: عدد معتبر نیست`); + } + if (!d.isFinite() || d.lt(lo) || d.gt(hi)) throw new BadRequestException(`${field}: باید بین ${lo} و ${hi} باشد`); + return d.toString(); +} + +function optNum(v: unknown, field: string, lo: number, hi: number): string | null { + return v === null || v === undefined || String(v).trim() === '' ? null : num(v, field, lo, hi); +} + +export function parseWageFormula(raw: unknown): WageFormula { + const r = (raw ?? {}) as Record; + const pick = r.promotionPick === 'sum' ? 'sum' : r.promotionPick === 'max' ? 'max' : null; + if (!pick) throw new BadRequestException('نحوه‌ی انتخاب تخفیف باید «بیشترین» یا «جمع» باشد'); + const decimals = + r.decimals === null || r.decimals === undefined || r.decimals === '' ? null : Number(num(r.decimals, 'تعداد رقم اعشار', 0, 4)); + if (decimals !== null && !Number.isInteger(decimals)) throw new BadRequestException('تعداد رقم اعشار باید عدد صحیح باشد'); + const f: WageFormula = { + version: 1, + variantCoef: num(r.variantCoef, 'ضریب اجرت مدل', -10, 10), + customerCoef: num(r.customerCoef, 'ضریب درصد مشتری', -10, 10), + promotionCoef: num(r.promotionCoef, 'ضریب تخفیف', -10, 10), + promotionPick: pick, + constant: num(r.constant, 'مقدار ثابت', -100, 100), + min: optNum(r.min, 'حداقل اجرت', -100, 1000), + max: optNum(r.max, 'حداکثر اجرت', -100, 1000), + decimals, + }; + if (f.min !== null && f.max !== null && D(f.min).gt(D(f.max))) { + throw new BadRequestException('حداقل اجرت نمی‌تواند از حداکثر بیشتر باشد'); + } + return f; +} + +export function parseWageSample(raw: unknown): WageSample { + const r = (raw ?? {}) as Record; + const qty = Number(r.quantity); + if (!Number.isInteger(qty) || qty < 1 || qty > 1000) throw new BadRequestException('تعداد نمونه باید عدد صحیح بین ۱ و ۱۰۰۰ باشد'); + return { + rashWeightGrams: num(r.rashWeightGrams, 'وزن خام نمونه', 0, 100000), + quantity: qty, + variantPercent: num(r.variantPercent, 'اجرت مدل نمونه', -100, 1000), + customerPercent: num(r.customerPercent, 'درصد مشتری نمونه', -100, 1000), + promotionPercent: num(r.promotionPercent, 'تخفیف نمونه', 0, 100), + }; +} diff --git a/apps/api/src/modules/pricing/wage.controller.ts b/apps/api/src/modules/pricing/wage.controller.ts new file mode 100644 index 0000000..974e6e5 --- /dev/null +++ b/apps/api/src/modules/pricing/wage.controller.ts @@ -0,0 +1,58 @@ +import { Body, Controller, Get, HttpCode, Post, Put } from '@nestjs/common'; +import { ArrayMaxSize, IsArray, IsString } from 'class-validator'; +import { CurrentAdmin, RequirePermission } from '../auth/guards'; +import type { AuthenticatedAdmin } from '../auth/jwt.strategy'; +import { CurrentCustomer, CustomerAuth } from '../customer-auth/customer.guards'; +import type { AuthenticatedCustomer } from '../customer-auth/customer-jwt.strategy'; +import { WageService } from './wage.service'; + +/** + * «اجرت» admin screen — the making-charge formula, a worked sample, and the + * approval that puts a new formula in force. Behind its own rid. + */ +@Controller('admin/pricing/wage-formula') +@RequirePermission('config.wage') +export class WageAdminController { + constructor(private readonly wage: WageService) {} + + @Get() + get() { + return this.wage.getConfig(); + } + + /** Nothing is saved: the draft and the formula in force on the same sample. */ + @Post('preview') + @HttpCode(200) + preview(@Body() body: { formula?: unknown; sample?: unknown }) { + return this.wage.preview(body?.formula, body?.sample); + } + + /** Puts the formula in force, recorded with the sample it was checked on. */ + @Put() + approve(@Body() body: { formula?: unknown; sample?: unknown }, @CurrentAdmin() admin: AuthenticatedAdmin) { + return this.wage.approve(body?.formula, body?.sample, admin); + } +} + +class WageQuoteDto { + @IsArray() + @ArrayMaxSize(200) + @IsString({ each: true }) + variantIds!: string[]; +} + +/** + * The making charge the app shows on a product and in the cart — computed by + * the same code that prices the order, for the signed-in customer. + */ +@Controller('customer/me/wage-quote') +export class WageCustomerController { + constructor(private readonly wage: WageService) {} + + @CustomerAuth() + @Post() + @HttpCode(200) + async quote(@Body() dto: WageQuoteDto, @CurrentCustomer() me: AuthenticatedCustomer) { + return [...(await this.wage.quote(me.id, dto.variantIds)).values()]; + } +} diff --git a/apps/api/src/modules/pricing/wage.service.ts b/apps/api/src/modules/pricing/wage.service.ts new file mode 100644 index 0000000..ae5f337 --- /dev/null +++ b/apps/api/src/modules/pricing/wage.service.ts @@ -0,0 +1,171 @@ +import { Injectable, NotFoundException } from '@nestjs/common'; +import { Prisma, PromotionScope } from '@prisma/client'; +import { PrismaService } from '../../prisma/prisma.service'; +import { + computeSample, + computeWage, + DEFAULT_WAGE_SAMPLE, + LEGACY_WAGE_FORMULA, + parseWageFormula, + parseWageSample, + type WageBreakdown, + type WageFormula, + type WageSample, +} from './wage-formula'; + +/** Setting row holding the formula; kept off the generic `const` routes (see admin-misc). */ +export const WAGE_FORMULA_SETTING_KEY = 'pricing.wageFormula'; +export const PRICING_SETTING_PREFIX = 'pricing.'; + +interface Approval { + formula: WageFormula; + sample: WageSample; + approvedAt: string; + approvedBy: { id: string; name: string }; +} + +interface StoredWageFormula extends Approval { + /** Earlier approved versions, newest first (last 20). */ + history: Approval[]; +} + +type Tx = Prisma.TransactionClient | PrismaService; + +/** One variant's making charge for one customer, as charged and as shown. */ +export interface WageQuote extends WageBreakdown { + variantId: string; + variantPercent: string; + customerPercent: string; +} + +@Injectable() +export class WageService { + constructor(private readonly prisma: PrismaService) {} + + private async stored(tx: Tx = this.prisma): Promise { + const row = await tx.setting.findUnique({ where: { key: WAGE_FORMULA_SETTING_KEY } }); + return row ? (row.value as unknown as StoredWageFormula) : null; + } + + /** The formula in force; legacy's exactly until an admin approves another. */ + async formula(tx: Tx = this.prisma): Promise { + const s = await this.stored(tx); + return s ? parseWageFormula(s.formula) : { ...LEGACY_WAGE_FORMULA }; + } + + /* ───────────── admin screen ───────────── */ + + async getConfig() { + const s = await this.stored(); + const formula = s ? parseWageFormula(s.formula) : { ...LEGACY_WAGE_FORMULA }; + const sample = s ? parseWageSample(s.sample) : { ...DEFAULT_WAGE_SAMPLE }; + return { + formula, + sample, + result: computeSample(formula, sample), + approvedAt: s?.approvedAt ?? null, + approvedBy: s?.approvedBy ?? null, + isLegacyDefault: !s, + legacy: LEGACY_WAGE_FORMULA, + history: (s?.history ?? []).map((h) => ({ ...h, result: computeSample(parseWageFormula(h.formula), parseWageSample(h.sample)) })), + }; + } + + /** The draft and the formula in force, side by side, on the same sample. */ + async preview(rawFormula: unknown, rawSample: unknown) { + const draft = parseWageFormula(rawFormula); + const sample = parseWageSample(rawSample); + return { + draft: computeSample(draft, sample), + current: computeSample(await this.formula(), sample), + }; + } + + /** Approves a formula together with the sample it was checked on. */ + async approve(rawFormula: unknown, rawSample: unknown, admin: { id: string; fullName: string }) { + const formula = parseWageFormula(rawFormula); + const sample = parseWageSample(rawSample); + await this.prisma.$transaction(async (tx) => { + const prev = await this.stored(tx); + const next: StoredWageFormula = { + formula, + sample, + approvedAt: new Date().toISOString(), + approvedBy: { id: admin.id, name: admin.fullName }, + history: prev + ? [{ formula: prev.formula, sample: prev.sample, approvedAt: prev.approvedAt, approvedBy: prev.approvedBy }, ...prev.history].slice(0, 20) + : [], + }; + const value = next as unknown as Prisma.InputJsonValue; + await tx.setting.upsert({ + where: { key: WAGE_FORMULA_SETTING_KEY }, + update: { value }, + create: { key: WAGE_FORMULA_SETTING_KEY, value }, + }); + }); + return this.getConfig(); + } + + /* ───────────── pricing a customer's lines ───────────── */ + + /** + * The making charge of each variant for this customer — what the app shows + * and what an app order is charged. The promotions considered are legacy's: + * active, inside their dates, scoped to the product, its category or its + * brand (customer-scoped promotions were switched off in the legacy app). + */ + async quote(customerId: string, variantIds: string[], tx: Tx = this.prisma): Promise> { + const customer = await tx.customer.findUnique({ + where: { id: customerId }, + select: { makingChargeOffsetPercent: true }, + }); + if (!customer) throw new NotFoundException('مشتری یافت نشد'); + + const ids = [...new Set(variantIds)]; + const variants = await tx.productVariant.findMany({ + where: { id: { in: ids } }, + select: { id: true, defaultWagePercent: true, product: { select: { id: true, categoryId: true, brandId: true } } }, + }); + + const now = new Date(); + const promotions = await tx.promotion.findMany({ + where: { + isActive: true, + scope: { in: [PromotionScope.PRODUCT, PromotionScope.CATEGORY, PromotionScope.BRAND] }, + AND: [ + { OR: [{ startsAt: null }, { startsAt: { lte: now } }] }, + { OR: [{ endsAt: null }, { endsAt: { gte: now } }] }, + ], + OR: [ + { productId: { in: variants.map((v) => v.product.id) } }, + { categoryId: { in: variants.map((v) => v.product.categoryId).filter((x): x is string => !!x) } }, + { brandId: { in: variants.map((v) => v.product.brandId).filter((x): x is string => !!x) } }, + ], + }, + select: { scope: true, productId: true, categoryId: true, brandId: true, discountPercent: true }, + }); + + const formula = await this.formula(tx); + const out = new Map(); + for (const v of variants) { + const applying = promotions.filter( + (p) => + (p.scope === PromotionScope.PRODUCT && p.productId === v.product.id) || + (p.scope === PromotionScope.CATEGORY && !!v.product.categoryId && p.categoryId === v.product.categoryId) || + (p.scope === PromotionScope.BRAND && !!v.product.brandId && p.brandId === v.product.brandId), + ); + const inputs = { + variantPercent: v.defaultWagePercent, + customerPercent: customer.makingChargeOffsetPercent, + promotionPercents: applying.map((p) => p.discountPercent), + }; + out.set(v.id, { + variantId: v.id, + variantPercent: new Prisma.Decimal(v.defaultWagePercent).toString(), + customerPercent: new Prisma.Decimal(customer.makingChargeOffsetPercent).toString(), + ...computeWage(formula, inputs), + }); + } + return out; + } +} diff --git a/apps/api/src/modules/sales-agent/agent-orders.ts b/apps/api/src/modules/sales-agent/agent-orders.ts new file mode 100644 index 0000000..595696c --- /dev/null +++ b/apps/api/src/modules/sales-agent/agent-orders.ts @@ -0,0 +1,29 @@ +import type { Prisma } from '@prisma/client'; + +/** + * The orders that count as a sales expert's sales («میزان فروش»). + * + * Legacy `CustomerController::updateGramSell`: + * SUM(orders.input) WHERE customer_id = X OR reagent_id = X + * (soft-deleted orders excluded by the model, no status filter). + * + * - `reagent_id = X` is Order.salesAgentId: the expert recorded on the order + * when it was placed — NOT the customer's current referrer, so a customer + * moving to another expert never moves past sales (owner ruling 2026-10-08). + * - `customer_id = X` is the expert's own orders, which live on their trading + * account (SalesExpertProfile.tradingCustomerId, D21). + */ +export function agentSalesWhere(agentId: string): Prisma.OrderWhereInput { + return { + OR: [{ salesAgentId: agentId }, { customer: { salesExpertTradingFor: { adminUserId: agentId } } }], + }; +} + +/** + * The same figure for a CUSTOMER's own page (legacy ViewOmdeCustomer «میزان + * فروش» — the same `grams_sell` column): their own orders plus any legacy + * order that named them as its referrer (Order.referrerCustomerId). + */ +export function customerSalesWhere(customerId: string): Prisma.OrderWhereInput { + return { OR: [{ customerId }, { referrerCustomerId: customerId }] }; +} diff --git a/apps/api/src/modules/sales-agent/sales-agent.service.ts b/apps/api/src/modules/sales-agent/sales-agent.service.ts index c4a95a0..121cfd1 100644 --- a/apps/api/src/modules/sales-agent/sales-agent.service.ts +++ b/apps/api/src/modules/sales-agent/sales-agent.service.ts @@ -2,6 +2,7 @@ import { ForbiddenException, Injectable, NotFoundException } from '@nestjs/commo import { Prisma } from '@prisma/client'; import { PrismaService } from '../../prisma/prisma.service'; import type { AuthenticatedAdmin } from '../auth/jwt.strategy'; +import { agentSalesWhere } from './agent-orders'; /** * Backs the sales expert's ("کارشناس فروش") own screens in the customer apps. @@ -45,12 +46,12 @@ export class SalesAgentService { * Legacy kept this denormalised in `customers.grams_sell`, recomputed by * `CustomerController::updateGramSell` as * SUM(orders.input) WHERE customer_id = X OR reagent_id = X - * with NO order-status filter. Computed live here instead of denormalised. + * with NO order-status filter. Computed live here instead of denormalised; + * both arms are kept — see agent-orders.ts. * * Two deliberate fidelity notes: - * - The `OR customer_id = X` arm is structurally empty now: an agent is an - * AdminUser and cannot own an Order, so only the referred-customer arm can - * ever contribute. Kept as a comment rather than silently dropped. + * - The `OR customer_id = X` arm is the expert's trading account (D21): an + * AdminUser cannot own an Order, so their own orders sit on that Customer. * - No status filter, matching legacy. The admin panel disagrees with itself * here — `AdminCustomersService.listReagents` aggregates unfiltered while * `reagentDetail` filters on the SOLD statuses — so this matches @@ -59,7 +60,7 @@ export class SalesAgentService { */ private async gramsSoldFor(agentId: string) { const agg = await this.prisma.order.aggregate({ - where: { customer: { referredByAgentId: agentId } }, + where: agentSalesWhere(agentId), _sum: { totalGoldWeightGrams: true }, }); return agg._sum.totalGoldWeightGrams ?? new Prisma.Decimal(0); diff --git a/apps/api/src/modules/sales-expert-app/sales-expert-app.controller.ts b/apps/api/src/modules/sales-expert-app/sales-expert-app.controller.ts new file mode 100644 index 0000000..4c45bf6 --- /dev/null +++ b/apps/api/src/modules/sales-expert-app/sales-expert-app.controller.ts @@ -0,0 +1,66 @@ +import { Body, Controller, Get, HttpCode, Post, Query } from '@nestjs/common'; +import { SalesExpertAppService } from './sales-expert-app.service'; +import { CurrentCustomer, CustomerAuth } from '../customer-auth/customer.guards'; +import type { AuthenticatedCustomer } from '../customer-auth/app-principal'; + +/** + * The sales expert's own screens in the customer apps. + * + * POST expert/child-orders -> legacy POST /order/child (ApiMobileController:759) + * POST expert/my-customers -> legacy POST /my-child (ApiMobileController:184) + * GET expert/me -> the expert's profile strip + * + * Every route sits behind the app token and takes its scope from + * `me.adminUserId`, which only a sales-expert token carries. An ordinary + * customer's token has it undefined, so the service refuses with 403 — the + * apps also hide the menu entries, but the server does not rely on that. + * + * No route accepts a customer id or an agent id from the client. + */ +@Controller('expert') +export class SalesExpertAppController { + constructor(private readonly expert: SalesExpertAppService) {} + + /** Legacy POST /order/child — POST because the reference posted its paging. */ + @CustomerAuth() + @Post('child-orders') + @HttpCode(200) + childOrders( + @Body() body: { page?: number; limit?: number; search?: string | null }, + @CurrentCustomer() me: AuthenticatedCustomer, + ) { + return this.expert.childOrders(me.adminUserId, body ?? {}); + } + + /** Legacy POST /my-child. */ + @CustomerAuth() + @Post('my-customers') + @HttpCode(200) + myCustomers( + @Body() body: { search?: string | null; text_search?: string | null }, + @CurrentCustomer() me: AuthenticatedCustomer, + ) { + // The reference read `text_search` (ApiMobileController.php:186); the + // ported screens send `search`. Both accepted. + return this.expert.myCustomers(me.adminUserId, { + search: body?.search ?? body?.text_search ?? null, + }); + } + + @CustomerAuth() + @Get('me') + me(@CurrentCustomer() me: AuthenticatedCustomer) { + return this.expert.me(me.adminUserId); + } + + /** + * Whether the signed-in principal is a sales expert. The apps call this once + * after login to decide whether to show the two expert entries; the answer + * comes from the token, so a customer cannot make it say yes. + */ + @CustomerAuth() + @Get('whoami') + whoami(@CurrentCustomer() me: AuthenticatedCustomer) { + return { isSalesExpert: Boolean(me.adminUserId), type: me.type }; + } +} diff --git a/apps/api/src/modules/sales-expert-app/sales-expert-app.module.ts b/apps/api/src/modules/sales-expert-app/sales-expert-app.module.ts new file mode 100644 index 0000000..7bac388 --- /dev/null +++ b/apps/api/src/modules/sales-expert-app/sales-expert-app.module.ts @@ -0,0 +1,13 @@ +import { Module } from '@nestjs/common'; +import { PrismaModule } from '../../prisma/prisma.module'; +import { SalesExpertAppController } from './sales-expert-app.controller'; +import { SalesExpertAppService } from './sales-expert-app.service'; + +/** The sales expert's own screens in the customer apps (D21). */ +@Module({ + imports: [PrismaModule], + controllers: [SalesExpertAppController], + providers: [SalesExpertAppService], + exports: [SalesExpertAppService], +}) +export class SalesExpertAppModule {} diff --git a/apps/api/src/modules/sales-expert-app/sales-expert-app.service.ts b/apps/api/src/modules/sales-expert-app/sales-expert-app.service.ts new file mode 100644 index 0000000..789386d --- /dev/null +++ b/apps/api/src/modules/sales-expert-app/sales-expert-app.service.ts @@ -0,0 +1,217 @@ +import { ForbiddenException, Injectable } from '@nestjs/common'; +import { OrderStatus, Prisma } from '@prisma/client'; +import { PrismaService } from '../../prisma/prisma.service'; + +/** + * The two screens a sales expert has in the app beyond what every customer + * gets: "سفارش مشتریان" (their referred customers' orders) and + * "انتخاب مشتری" (their referred customers). + * + * Reference: ApiMobileController::getChildOrder (:759-781) and ::myChild + * (:184-195). Both scoped on `reagent_id = auth()->id()` — in the reference the + * agent was a Customer, so that was the logged-in customer's own id. Here the + * expert is an AdminUser (D17) and `Customer.referredByAgentId` points at it, + * so the scope is the AdminUser id taken from the token. Nothing is ever read + * from the request. + */ +@Injectable() +export class SalesExpertAppService { + constructor(private readonly prisma: PrismaService) {} + + /** Refuses any principal that is not a sales expert. */ + private assertExpert(adminUserId: string | undefined): string { + if (!adminUserId) { + throw new ForbiddenException('این بخش فقط برای کارشناس فروش است'); + } + return adminUserId; + } + + /** + * Port of `getChildOrder` (ApiMobileController.php:759-781). + * + * The reference filtered `where('sts', 5)` — legacy status 5 is + * «تحویل مسئول فروش» (delivered to the sales agent), the point at which the + * agent has to act on the order. Reproduced with the equivalent status here; + * the heading the reference hardcodes on every card is that same label + * (ChildOrders.vue:48). + * + * Search covers what the reference searched: order id, customer name and + * customer mobile (`initSearch(['id','customer_id','customer.name','customer.mobile'])`). + * Ordered `id DESC`, i.e. newest first. + */ + async childOrders( + adminUserId: string | undefined, + params: { page?: number; limit?: number; search?: string | null }, + ) { + const agentId = this.assertExpert(adminUserId); + + const page = Math.max(1, Number(params.page ?? 1)); + const limit = Math.min(100, Math.max(1, Number(params.limit ?? 20))); + const search = (params.search ?? '').trim(); + + const scope: Prisma.OrderWhereInput = { + // Legacy getChildOrder: `where('reagent_id', auth()->id())` + // (ApiMobileController.php:779) — the orders credited to THIS expert when + // they were placed (Order.salesAgentId), not the customer's current + // referrer. No id from the request takes part in this. + salesAgentId: agentId, + status: OrderStatus.DELIVERED_TO_AGENT, + }; + + const where: Prisma.OrderWhereInput = search + ? { + AND: [ + scope, + { + OR: [ + { orderNumber: { contains: search, mode: 'insensitive' } }, + { customer: { fullName: { contains: search, mode: 'insensitive' } } }, + { customer: { mobile: { contains: search } } }, + ], + }, + ], + } + : scope; + + const [rows, total] = await Promise.all([ + this.prisma.order.findMany({ + where, + orderBy: { createdAt: 'desc' }, + skip: (page - 1) * limit, + take: limit, + include: { + items: true, + customer: { select: { id: true, fullName: true, mobile: true } }, + }, + }), + this.prisma.order.count({ where }), + ]); + + return { + rows: rows.map((o) => ({ + id: o.id, + orderNumber: o.orderNumber, + status: o.status, + // The reference's card shows the order's total weight as `item.w` + // (ChildOrders.vue:55) and the item count as `items.length`. + w: o.totalGoldWeightGrams, + totalGoldWeightGrams: o.totalGoldWeightGrams, + createdAt: o.createdAt, + items: o.items, + customer: o.customer + ? { id: o.customer.id, name: o.customer.fullName, mobile: o.customer.mobile } + : null, + })), + total, + page, + limit, + }; + } + + /** + * Port of `myChild` (ApiMobileController.php:184-195) — the expert's own + * referred customers, for "انتخاب مشتری". + * + * The reference searched name, mobile, phone, store_name and pasazh_name; + * all five exist here. It also returned EVERY referred customer, active or + * not — the `active()` scope is commented out at :187 — so that is + * reproduced rather than "fixed" (D4). + * + * NOT ported: the reference minted an `api_token` for each listed customer + * as a side effect (:197-201), which let an agent act AS that customer. That + * is a session-hijack primitive; this system derives every session from the + * caller's own token. See D21. + */ + async myCustomers(adminUserId: string | undefined, params: { search?: string | null }) { + const agentId = this.assertExpert(adminUserId); + const search = (params.search ?? '').trim(); + + const scope: Prisma.CustomerWhereInput = { referredByAgentId: agentId }; + const where: Prisma.CustomerWhereInput = search + ? { + AND: [ + scope, + { + OR: [ + { fullName: { contains: search, mode: 'insensitive' } }, + { mobile: { contains: search } }, + { phone: { contains: search } }, + { storeName: { contains: search, mode: 'insensitive' } }, + { pasazhName: { contains: search, mode: 'insensitive' } }, + ], + }, + ], + } + : scope; + + const rows = await this.prisma.customer.findMany({ + where, + orderBy: { createdAt: 'desc' }, + select: { + id: true, + fullName: true, + mobile: true, + phone: true, + storeName: true, + pasazhName: true, + goldCreditLimitGrams: true, + goldDebtGrams: true, + fiatDebtRial: true, + isActive: true, + createdAt: true, + }, + }); + + return rows.map((c) => ({ + id: c.id, + // legacy key, which the ported card binds to + name: c.fullName, + fullName: c.fullName, + mobile: c.mobile, + phone: c.phone, + store_name: c.storeName, + pasazh_name: c.pasazhName, + gram_level: c.goldCreditLimitGrams, + remain: c.goldDebtGrams, + rial_remain: c.fiatDebtRial, + active: c.isActive ? 1 : -1, + createdAt: c.createdAt, + })); + } + + /** The expert's own profile strip, for the app header. */ + async me(adminUserId: string | undefined) { + const agentId = this.assertExpert(adminUserId); + const admin = await this.prisma.adminUser.findUnique({ + where: { id: agentId }, + select: { + id: true, + fullName: true, + firstName: true, + lastName: true, + mobile: true, + wagePercent: true, + salesExpertProfile: { + select: { gramLevel: true, tradingCustomerId: true, city: { select: { id: true, name: true } } }, + }, + _count: { select: { referredCustomers: true } }, + }, + }); + + return { + id: admin?.id, + name: admin?.fullName, + fname: admin?.firstName ?? admin?.fullName, + lname: admin?.lastName ?? '', + mobile: admin?.mobile, + percent: admin?.wagePercent, + gram_level: admin?.salesExpertProfile?.gramLevel ?? null, + city: admin?.salesExpertProfile?.city + ? { id: admin.salesExpertProfile.city.id, title: admin.salesExpertProfile.city.name } + : null, + customers_count: admin?._count.referredCustomers ?? 0, + /** The Customer row the expert's OWN orders land on. */ + trading_customer_id: admin?.salesExpertProfile?.tradingCustomerId ?? null, + }; + } +} diff --git a/apps/api/src/modules/sessions/admin-session.module.ts b/apps/api/src/modules/sessions/admin-session.module.ts new file mode 100644 index 0000000..dadc70f --- /dev/null +++ b/apps/api/src/modules/sessions/admin-session.module.ts @@ -0,0 +1,19 @@ +import { Global, Module } from '@nestjs/common'; +import { PrismaModule } from '../../prisma/prisma.module'; +import { AdminSessionService } from './admin-session.service'; +import { AppSessionService } from './app-session.service'; + +/** + * Revocable admin sessions. + * + * Global so every login path (admin panel and app) and the IAM + * back-channel-logout endpoint can use these without wiring imports. Both + * services are inert while tracking is off (see AdminSessionService). + */ +@Global() +@Module({ + imports: [PrismaModule], + providers: [AdminSessionService, AppSessionService], + exports: [AdminSessionService, AppSessionService], +}) +export class AdminSessionModule {} diff --git a/apps/api/src/modules/sessions/admin-session.service.spec.ts b/apps/api/src/modules/sessions/admin-session.service.spec.ts new file mode 100644 index 0000000..83ac3ea --- /dev/null +++ b/apps/api/src/modules/sessions/admin-session.service.spec.ts @@ -0,0 +1,164 @@ +import { AdminSessionService } from './admin-session.service'; +import type { IamService } from '../iam/iam.service'; + +/** + * Revocable admin sessions. + * + * Two contracts are locked down here. First, with tracking off nothing changes: + * no `jti`, no row, and no extra query on an authenticated request. Second, with + * it on, a revoked session stops working immediately — which is the whole point, + * because before this table an issued token was usable for its full 12h no matter + * what happened centrally. + */ +describe('AdminSessionService', () => { + const ORIGINAL_ENV = process.env; + + const build = (opts: { iamEnabled?: boolean; tracking?: string | null } = {}) => { + process.env = { ...ORIGINAL_ENV }; + delete process.env.AUTH_SESSION_TRACKING; + if (opts.tracking != null) process.env.AUTH_SESSION_TRACKING = opts.tracking; + + const prisma = { + adminSession: { + create: jest.fn().mockResolvedValue({}), + findUnique: jest.fn(), + updateMany: jest.fn().mockResolvedValue({ count: 2 }), + }, + }; + const iam = { enabled: opts.iamEnabled ?? false } as IamService; + + return { service: new AdminSessionService(prisma as never, iam), prisma }; + }; + + afterEach(() => { + process.env = ORIGINAL_ENV; + }); + + /* ─────────────── off by default ─────────────── */ + + it('is off in a deployment that does not use the identity service', () => { + expect(build().service.enabled).toBe(false); + }); + + it('turns itself on with the identity service, so central revocation reaches us', () => { + expect(build({ iamEnabled: true }).service.enabled).toBe(true); + }); + + it('can be turned on on its own', () => { + expect(build({ tracking: 'true' }).service.enabled).toBe(true); + }); + + it('can be turned off explicitly even with the identity service on', () => { + // Opting out of the per-request lookup; central revocation then cannot reach here + expect(build({ iamEnabled: true, tracking: 'false' }).service.enabled).toBe(false); + }); + + /* ─────────────── unchanged behaviour while off ─────────────── */ + + it('issues no token id and writes no row while off', async () => { + const { service, prisma } = build(); + + expect(service.newTokenId()).toBeNull(); + await service.record({ jti: 'x', adminUserId: 'a' }); + + expect(prisma.adminSession.create).not.toHaveBeenCalled(); + }); + + it('authenticates without a database lookup while off', async () => { + const { service, prisma } = build(); + + await expect(service.isActive('some-jti')).resolves.toBe(true); + expect(prisma.adminSession.findUnique).not.toHaveBeenCalled(); + }); + + /* ─────────────── enforcement while on ─────────────── */ + + it('accepts a live session', async () => { + const { service, prisma } = build({ iamEnabled: true }); + prisma.adminSession.findUnique.mockResolvedValue({ revokedAt: null }); + + await expect(service.isActive('jti-1')).resolves.toBe(true); + }); + + it('refuses a revoked session', async () => { + const { service, prisma } = build({ iamEnabled: true }); + prisma.adminSession.findUnique.mockResolvedValue({ revokedAt: new Date() }); + + // The gap this closes: previously the token kept working until it expired + await expect(service.isActive('jti-1')).resolves.toBe(false); + }); + + it('refuses a token whose session row is gone', async () => { + const { service, prisma } = build({ iamEnabled: true }); + prisma.adminSession.findUnique.mockResolvedValue(null); + + await expect(service.isActive('jti-1')).resolves.toBe(false); + }); + + it('keeps tokens issued before tracking was switched on working', async () => { + const { service, prisma } = build({ iamEnabled: true }); + + // Such a token carries no jti; refusing it would sign every admin out at once + await expect(service.isActive(undefined)).resolves.toBe(true); + expect(prisma.adminSession.findUnique).not.toHaveBeenCalled(); + }); + + /* ─────────────── recording and revoking ─────────────── */ + + it('records the session with an expiry derived from the token lifetime', async () => { + process.env.JWT_EXPIRES_IN = '12h'; + const { service, prisma } = build({ iamEnabled: true }); + process.env.JWT_EXPIRES_IN = '12h'; + + await service.record({ jti: 'jti-1', adminUserId: 'admin-1', iamSessionId: 'sid-1', iamSub: 'sub-1' }); + + const data = prisma.adminSession.create.mock.calls[0][0].data; + expect(data).toMatchObject({ jti: 'jti-1', adminUserId: 'admin-1', iamSessionId: 'sid-1' }); + expect(data.expiresAt.getTime()).toBeGreaterThan(Date.now() + 11 * 3600 * 1000); + }); + + it('never breaks login when the session row cannot be written', async () => { + const { service, prisma } = build({ iamEnabled: true }); + prisma.adminSession.create.mockRejectedValue(new Error('unique violation')); + + // Worst case is a session that cannot be revoked early — not a failed login + await expect(service.record({ jti: 'jti-1', adminUserId: 'a' })).resolves.toBeUndefined(); + }); + + it('revokes by the identity service session id', async () => { + const { service, prisma } = build({ iamEnabled: true }); + + await expect(service.revokeByIamSession('sid-1')).resolves.toBe(2); + expect(prisma.adminSession.updateMany).toHaveBeenCalledWith({ + where: { iamSessionId: 'sid-1', revokedAt: null }, + data: expect.objectContaining({ revokedReason: 'iam_backchannel_logout' }), + }); + }); + + it('revokes every session of an identity when the token names only a subject', async () => { + const { service, prisma } = build({ iamEnabled: true }); + + await service.revokeByIamSubject('sub-1'); + expect(prisma.adminSession.updateMany).toHaveBeenCalledWith({ + where: { iamSub: 'sub-1', revokedAt: null }, + data: expect.objectContaining({ revokedReason: 'iam_backchannel_logout' }), + }); + }); + + it('revokes every session of a local admin', async () => { + const { service, prisma } = build({ iamEnabled: true }); + + await service.revokeAllForAdmin('admin-1', 'account_disabled'); + expect(prisma.adminSession.updateMany).toHaveBeenCalledWith({ + where: { adminUserId: 'admin-1', revokedAt: null }, + data: expect.objectContaining({ revokedReason: 'account_disabled' }), + }); + }); + + it('does not touch anything while off', async () => { + const { service, prisma } = build(); + + await expect(service.revokeByIamSession('sid-1')).resolves.toBe(0); + expect(prisma.adminSession.updateMany).not.toHaveBeenCalled(); + }); +}); diff --git a/apps/api/src/modules/sessions/admin-session.service.ts b/apps/api/src/modules/sessions/admin-session.service.ts new file mode 100644 index 0000000..14d9800 --- /dev/null +++ b/apps/api/src/modules/sessions/admin-session.service.ts @@ -0,0 +1,137 @@ +import { Injectable, Logger } from '@nestjs/common'; +import { randomUUID } from 'node:crypto'; +import { PrismaService } from '../../prisma/prisma.service'; +import { envOr } from '../../common/env'; +import { IamService } from '../iam/iam.service'; + +/** + * Revocable admin sessions. + * + * An admin token is self-contained and lives for 12h, so until now nothing could + * end a session early: deactivating the account or signing the user out centrally + * left every already-issued token working until it expired. Each issued token now + * carries a `jti` recorded on AdminSession, and JwtStrategy refuses a token whose + * row is revoked or gone. + * + * The previous behaviour is preserved exactly when tracking is off: no row is + * written, no extra query runs on authentication, and tokens keep working as + * before. Tracking turns itself on when the IAM is enabled — without it a central + * revocation would silently do nothing here — and can be turned on independently + * with `AUTH_SESSION_TRACKING=true`. + */ +@Injectable() +export class AdminSessionService { + private readonly logger = new Logger(AdminSessionService.name); + + constructor( + private readonly prisma: PrismaService, + private readonly iam: IamService, + ) {} + + get enabled(): boolean { + if (envOr('AUTH_SESSION_TRACKING', '').toLowerCase() === 'true') return true; + // Explicit opt-out for a deployment that uses the IAM but does not want the + // per-request lookup; central revocation then cannot reach this app. + if (envOr('AUTH_SESSION_TRACKING', '').toLowerCase() === 'false') return false; + return this.iam.enabled; + } + + /** A fresh `jti` for a token about to be signed, or null while tracking is off. */ + newTokenId(): string | null { + return this.enabled ? randomUUID() : null; + } + + /** + * Record an issued token. A failure here must not break login, so it is logged + * and swallowed: the worst case is a session that cannot be revoked early, + * which is exactly the behaviour before this table existed. + */ + async record(input: { + jti: string; + adminUserId: string; + iamSessionId?: string | null; + iamSub?: string | null; + ipAddress?: string | null; + userAgent?: string | null; + }): Promise { + if (!this.enabled) return; + + try { + await this.prisma.adminSession.create({ + data: { + jti: input.jti, + adminUserId: input.adminUserId, + iamSessionId: input.iamSessionId ?? null, + iamSub: input.iamSub ?? null, + ipAddress: input.ipAddress ?? null, + userAgent: input.userAgent ?? null, + expiresAt: this.tokenExpiry(), + }, + }); + } catch (error) { + this.logger.warn(`could not record the admin session: ${(error as Error).message}`); + } + } + + /** + * Is this token still usable? Called on every authenticated request. + * + * A token signed before tracking was switched on carries no `jti`; it stays + * valid until it expires, so enabling the feature does not sign everyone out. + */ + async isActive(jti: string | undefined): Promise { + if (!this.enabled || !jti) return true; + + const session = await this.prisma.adminSession.findUnique({ + where: { jti }, + select: { revokedAt: true }, + }); + + // A missing row means the session was deleted (or the token was signed + // elsewhere): refuse rather than assume. + return session !== null && session.revokedAt === null; + } + + /** Revoke by the IAM's session id (`sid` in a back-channel logout token). */ + async revokeByIamSession(iamSessionId: string, reason = 'iam_backchannel_logout'): Promise { + return this.revokeWhere({ iamSessionId }, reason); + } + + /** Revoke every session of an IAM identity (a logout token carrying only `sub`). */ + async revokeByIamSubject(iamSub: string, reason = 'iam_backchannel_logout'): Promise { + return this.revokeWhere({ iamSub }, reason); + } + + /** Revoke every session of a local admin (account disabled, password changed). */ + async revokeAllForAdmin(adminUserId: string, reason = 'revoked'): Promise { + return this.revokeWhere({ adminUserId }, reason); + } + + private async revokeWhere( + where: { iamSessionId?: string; iamSub?: string; adminUserId?: string }, + reason: string, + ): Promise { + if (!this.enabled) return 0; + + const result = await this.prisma.adminSession.updateMany({ + where: { ...where, revokedAt: null }, + data: { revokedAt: new Date(), revokedReason: reason }, + }); + + return result.count; + } + + /** + * When the recorded token expires, mirroring JWT_EXPIRES_IN so old rows can be + * pruned. Only `h` / `m` / `d` / `s` are understood — anything else + * leaves the column null rather than guessing. + */ + private tokenExpiry(): Date | null { + const raw = envOr('JWT_EXPIRES_IN', '12h'); + const match = /^(\d+)\s*([smhd])$/.exec(raw); + if (!match) return null; + + const seconds = Number(match[1]) * { s: 1, m: 60, h: 3600, d: 86400 }[match[2] as 's' | 'm' | 'h' | 'd']; + return new Date(Date.now() + seconds * 1000); + } +} diff --git a/apps/api/src/modules/sessions/app-session.service.ts b/apps/api/src/modules/sessions/app-session.service.ts new file mode 100644 index 0000000..fa59ca7 --- /dev/null +++ b/apps/api/src/modules/sessions/app-session.service.ts @@ -0,0 +1,130 @@ +import { Injectable, Logger } from '@nestjs/common'; +import { randomUUID } from 'node:crypto'; +import { PrismaService } from '../../prisma/prisma.service'; +import { envOr } from '../../common/env'; +import { IamService } from '../iam/iam.service'; + +/** What an app token's `sub` points at — a Customer, or an AdminUser (D21). */ +export type AppSubjectType = 'customer' | 'sales-expert'; + +/** + * Revocable app sessions (customer app and sales-expert app). + * + * The counterpart of AdminSessionService for the other token family. It matters + * more here: the app's login is OTP-only, so there is no password an operator + * could change to cut off a stolen 30-day token — before this table, nothing + * could end an app session early. + * + * Exactly as with the admin side, everything is inert while tracking is off: no + * `jti`, no row, and no extra query on the authenticated path. + */ +@Injectable() +export class AppSessionService { + private readonly logger = new Logger(AppSessionService.name); + + constructor( + private readonly prisma: PrismaService, + private readonly iam: IamService, + ) {} + + get enabled(): boolean { + const flag = envOr('AUTH_SESSION_TRACKING', '').toLowerCase(); + if (flag === 'true') return true; + if (flag === 'false') return false; + return this.iam.enabled; + } + + newTokenId(): string | null { + return this.enabled ? randomUUID() : null; + } + + /** + * Record an issued token. A failure must not break the login: the worst case + * is a session that cannot be revoked early, which is the behaviour that + * existed before this table. + */ + async record(input: { + jti: string; + subjectId: string; + subjectType: AppSubjectType; + mobile?: string | null; + iamSessionId?: string | null; + iamSub?: string | null; + ipAddress?: string | null; + userAgent?: string | null; + }): Promise { + if (!this.enabled) return; + + try { + await this.prisma.appSession.create({ + data: { + jti: input.jti, + subjectId: input.subjectId, + subjectType: input.subjectType, + mobile: input.mobile ?? null, + iamSessionId: input.iamSessionId ?? null, + iamSub: input.iamSub ?? null, + ipAddress: input.ipAddress ?? null, + userAgent: input.userAgent ?? null, + expiresAt: this.tokenExpiry(), + }, + }); + } catch (error) { + this.logger.warn(`could not record the app session: ${(error as Error).message}`); + } + } + + /** + * Is this token still usable? A token signed before tracking was switched on + * carries no `jti` and stays valid until it expires, so enabling the feature + * does not sign every app user out at once. + */ + async isActive(jti: string | undefined): Promise { + if (!this.enabled || !jti) return true; + + const session = await this.prisma.appSession.findUnique({ + where: { jti }, + select: { revokedAt: true }, + }); + + return session !== null && session.revokedAt === null; + } + + /** Revoke by the IAM's session id (`sid` in a back-channel logout token). */ + revokeByIamSession(iamSessionId: string, reason = 'iam_backchannel_logout'): Promise { + return this.revokeWhere({ iamSessionId }, reason); + } + + /** Revoke every session of an IAM identity (a logout token carrying only `sub`). */ + revokeByIamSubject(iamSub: string, reason = 'iam_backchannel_logout'): Promise { + return this.revokeWhere({ iamSub }, reason); + } + + /** Revoke every app session of one subject (customer archived/deactivated). */ + revokeAllForSubject(subjectId: string, reason = 'revoked'): Promise { + return this.revokeWhere({ subjectId }, reason); + } + + private async revokeWhere( + where: { iamSessionId?: string; iamSub?: string; subjectId?: string }, + reason: string, + ): Promise { + if (!this.enabled) return 0; + + const result = await this.prisma.appSession.updateMany({ + where: { ...where, revokedAt: null }, + data: { revokedAt: new Date(), revokedReason: reason }, + }); + + return result.count; + } + + /** Mirrors JWT_CUSTOMER_EXPIRES_IN so old rows can be pruned. */ + private tokenExpiry(): Date | null { + const match = /^(\d+)\s*([smhd])$/.exec(envOr('JWT_CUSTOMER_EXPIRES_IN', '30d')); + if (!match) return null; + + const seconds = Number(match[1]) * { s: 1, m: 60, h: 3600, d: 86400 }[match[2] as 's' | 'm' | 'h' | 'd']; + return new Date(Date.now() + seconds * 1000); + } +} diff --git a/apps/api/src/modules/sms/drivers/index.ts b/apps/api/src/modules/sms/drivers/index.ts new file mode 100644 index 0000000..2955049 --- /dev/null +++ b/apps/api/src/modules/sms/drivers/index.ts @@ -0,0 +1,17 @@ +import { relayDriver } from './relay.driver'; +import { SmsDriver } from './sms-driver'; +import { trezDriver } from './trez.driver'; + +/** + * Every SMS gateway, keyed by its `SMS_PROVIDER` value. A new provider is one + * driver file plus one line here. + */ +export const SMS_DRIVERS: Readonly> = { + [relayDriver.name]: relayDriver, + [trezDriver.name]: trezDriver, +}; + +/** Used when `SMS_PROVIDER` is unset or blank (D26). */ +export const DEFAULT_SMS_PROVIDER = relayDriver.name; + +export type { SmsDriver, SmsSendResult } from './sms-driver'; diff --git a/apps/api/src/modules/sms/drivers/relay.driver.ts b/apps/api/src/modules/sms/drivers/relay.driver.ts new file mode 100644 index 0000000..04e8116 --- /dev/null +++ b/apps/api/src/modules/sms/drivers/relay.driver.ts @@ -0,0 +1,111 @@ +import { networkInterfaces } from 'node:os'; +import { envOr, envOrNull } from '../../../common/env'; +import { SmsDriver, postWithTimeout } from './sms-driver'; + +/** + * The owner's SMS gateway (`/api/createsms`) — a relay that serves the SMS of + * several panels and apps and forwards to the actual provider. The default + * driver since D26. + * + * Shape, from the owner's PHP client: + * * POST JSON, 15s timeout, auth header `secret_key` + * * body: { phone, host, text, platform } + * * `host` identifies the sending server: a configured value, else the + * server's own IP (`gethostbyname(gethostname())`) + * * `platform: "kave"` routes through Kavenegar; null lets the gateway pick. + * The owner wants every message through Kavenegar. + * + * The secret is in source on the owner's decision (D26): the gateway has a + * second verification factor held elsewhere. `SMS_RELAY_SECRET` overrides it. + * + * The PHP client forced IPv4 (CURLOPT_IPRESOLVE); the URL is an IP literal, so + * there is nothing to resolve and fetch needs no equivalent. + */ + +const DEFAULT_RELAY_URL = 'http://185.231.112.101/api/createsms'; +const DEFAULT_RELAY_SECRET = 'f21debfb-83ac-4624-a2f4-f08375043181'; +const DEFAULT_RELAY_PLATFORM = 'kave'; + +/** `Http::timeout(15)` in the owner's client. */ +const REQUEST_TIMEOUT_MS = 15_000; + +/** The first external IPv4 of this machine — Node's `gethostbyname(gethostname())`. */ +export function serverIpv4(): string | null { + for (const addresses of Object.values(networkInterfaces())) { + for (const a of addresses ?? []) { + if (a.family === 'IPv4' && !a.internal) return a.address; + } + } + return null; +} + +export function relayConfig() { + const platform = envOr('SMS_RELAY_PLATFORM', DEFAULT_RELAY_PLATFORM); + return { + url: envOr('SMS_RELAY_URL', DEFAULT_RELAY_URL), + secret: envOr('SMS_RELAY_SECRET', DEFAULT_RELAY_SECRET), + host: envOrNull('SMS_RELAY_HOST') ?? serverIpv4(), + // "default" sends null, so the gateway chooses the line itself. + platform: platform.toLowerCase() === 'default' ? null : platform, + }; +} + +/** + * The gateway's reply format is not documented, so a 2xx is trusted unless the + * body plainly says otherwise. Returns the reason, or null when the reply + * reads as accepted. + * + * A non-empty body that is not JSON counts as a failure: the gateway is a JSON + * API, and its own PHP errors arrive as bare text with HTTP 200 — seen live on + * 2026-10-05 as "cURL library is not loaded", with nothing delivered. + */ +export function relayRejection(body: string): string | null { + const text = body.trim(); + if (text === '') return null; + + let data: unknown; + try { + data = JSON.parse(text); + } catch { + return text.slice(0, 200); + } + if (!data || typeof data !== 'object' || Array.isArray(data)) return null; + + const d = data as Record; + const failedStatus = + d.status === false || + (typeof d.status === 'string' && /^(error|fail|failed|failure)$/i.test(d.status)); + const failed = failedStatus || d.success === false || d.ok === false || Boolean(d.error); + if (!failed) return null; + + if (typeof d.error === 'string' && d.error) return d.error; + if (typeof d.message === 'string' && d.message) return d.message; + return 'rejected-by-gateway'; +} + +export const relayDriver: SmsDriver = { + name: 'relay', + + missingConfig() { + // The URL and secret always have defaults; only the host can be missing, + // on a machine with no external IPv4. + return relayConfig().host ? [] : ['SMS_RELAY_HOST']; + }, + + async deliver(mobile, text) { + const c = relayConfig(); + const reply = await postWithTimeout( + c.url, + { 'Content-Type': 'application/json', secret_key: c.secret }, + JSON.stringify({ phone: mobile, host: c.host, text, platform: c.platform }), + REQUEST_TIMEOUT_MS, + ); + + if (!reply.ok) return { ok: false, response: reply.body, error: `http-${reply.status}` }; + + const rejection = relayRejection(reply.body); + if (rejection) return { ok: false, response: reply.body, error: rejection }; + + return { ok: true, response: reply.body }; + }, +}; diff --git a/apps/api/src/modules/sms/drivers/sms-driver.ts b/apps/api/src/modules/sms/drivers/sms-driver.ts new file mode 100644 index 0000000..fc53e9b --- /dev/null +++ b/apps/api/src/modules/sms/drivers/sms-driver.ts @@ -0,0 +1,55 @@ +/** + * One SMS gateway. SmsService picks a driver by `SMS_PROVIDER` and owns + * everything around the call — trimming, persistence, logging and the + * never-throw guarantee — so a driver only has to talk to its provider. + */ + +export interface SmsSendResult { + ok: boolean; + /** Provider response body, when one was received. */ + response?: string; + error?: string; +} + +export interface SmsDriver { + /** The `SMS_PROVIDER` value that selects this driver. */ + readonly name: string; + + /** Names of the env variables this driver still needs; empty when it can send. */ + missingConfig(): string[]; + + /** + * Sends one already-trimmed message. May throw on a network error or + * timeout — SmsService turns that into `{ ok: false }`. + */ + deliver(mobile: string, text: string): Promise; +} + +export interface HttpReply { + ok: boolean; + status: number; + body: string; +} + +/** POST with an abort-based timeout. Throws on network failure or timeout. */ +export async function postWithTimeout( + url: string, + headers: Record, + body: string, + timeoutMs: number, +): Promise { + const controller = new AbortController(); + const timer = setTimeout(() => controller.abort(), timeoutMs); + + try { + const response = await fetch(url, { + method: 'POST', + headers, + body, + signal: controller.signal, + }); + return { ok: response.ok, status: response.status, body: await response.text() }; + } finally { + clearTimeout(timer); + } +} diff --git a/apps/api/src/modules/sms/drivers/trez.driver.ts b/apps/api/src/modules/sms/drivers/trez.driver.ts new file mode 100644 index 0000000..69f888f --- /dev/null +++ b/apps/api/src/modules/sms/drivers/trez.driver.ts @@ -0,0 +1,66 @@ +import { envOr } from '../../../common/env'; +import { SmsDriver, postWithTimeout } from './sms-driver'; + +/** + * Trez panel — port of henza_server/app/Models/Sms.php. + * + * Reference behaviour (`Sms::Send`, `Sms.php:57-82`): + * * POST, form-urlencoded, 20s timeout + * * fields: PhoneNumber (sender line), Username, Password, Mobile, Message + * + * Credentials come from the environment. The reference hardcodes live + * production credentials in the source (SEC-12); they are not copied here. + * + * No longer the default since D26, kept selectable with `SMS_PROVIDER=trez`. + */ + +/** Reference endpoint (`Sms.php:69`). Overridable for staging. */ +export const DEFAULT_TREZ_URL = 'https://smspanel.trez.ir/SendMessageWithCode.ashx'; + +/** `Http::timeout(20)` in the reference (`Sms.php:72`). */ +const REQUEST_TIMEOUT_MS = 20_000; + +export function trezConfig() { + return { + url: envOr('SMS_TREZ_URL', DEFAULT_TREZ_URL), + username: process.env.SMS_TREZ_USERNAME ?? '', + password: process.env.SMS_TREZ_PASSWORD ?? '', + senderLine: process.env.SMS_TREZ_SENDER_LINE ?? '', + }; +} + +export const trezDriver: SmsDriver = { + name: 'trez', + + missingConfig() { + const c = trezConfig(); + return ( + [ + ['SMS_TREZ_USERNAME', c.username], + ['SMS_TREZ_PASSWORD', c.password], + ['SMS_TREZ_SENDER_LINE', c.senderLine], + ] as const + ) + .filter(([, v]) => !v) + .map(([name]) => name); + }, + + async deliver(mobile, text) { + const c = trezConfig(); + const reply = await postWithTimeout( + c.url, + { 'Content-Type': 'application/x-www-form-urlencoded' }, + new URLSearchParams({ + PhoneNumber: c.senderLine, + Username: c.username, + Password: c.password, + Mobile: mobile, + Message: text, + }).toString(), + REQUEST_TIMEOUT_MS, + ); + + if (!reply.ok) return { ok: false, response: reply.body, error: `http-${reply.status}` }; + return { ok: true, response: reply.body }; + }, +}; diff --git a/apps/api/src/modules/sms/sms.module.ts b/apps/api/src/modules/sms/sms.module.ts new file mode 100644 index 0000000..23810ea --- /dev/null +++ b/apps/api/src/modules/sms/sms.module.ts @@ -0,0 +1,14 @@ +import { Global, Module } from '@nestjs/common'; +import { SmsService } from './sms.service'; + +/** + * Global so any module can send an SMS without re-importing it — the twelve + * reference notification points are spread across orders, documents and + * customer management. + */ +@Global() +@Module({ + providers: [SmsService], + exports: [SmsService], +}) +export class SmsModule {} diff --git a/apps/api/src/modules/sms/sms.service.spec.ts b/apps/api/src/modules/sms/sms.service.spec.ts new file mode 100644 index 0000000..cf8d410 --- /dev/null +++ b/apps/api/src/modules/sms/sms.service.spec.ts @@ -0,0 +1,333 @@ +import { NetworkInterfaceInfo, networkInterfaces } from 'node:os'; +import { Logger } from '@nestjs/common'; +import { PrismaService } from '../../prisma/prisma.service'; +import { DEFAULT_TREZ_URL, trezConfig } from './drivers/trez.driver'; +import { relayConfig, relayRejection } from './drivers/relay.driver'; +import { + SmsService, + assertSmsConfigured, + smsConfigured, + smsProvider, +} from './sms.service'; + +const SMS_ENV = [ + 'SMS_PROVIDER', + 'SMS_RELAY_URL', + 'SMS_RELAY_SECRET', + 'SMS_RELAY_HOST', + 'SMS_RELAY_PLATFORM', + 'SMS_TREZ_URL', + 'SMS_TREZ_USERNAME', + 'SMS_TREZ_PASSWORD', + 'SMS_TREZ_SENDER_LINE', + 'NODE_ENV', +]; + +// Node's own module namespace cannot be spied on, so the lookup is mocked. +jest.mock('node:os', () => ({ ...jest.requireActual('node:os'), networkInterfaces: jest.fn() })); +const interfaces = networkInterfaces as jest.MockedFunction; + +const iface = (address: string, internal: boolean) => + ({ address, internal, family: 'IPv4' }) as NetworkInterfaceInfo; + +/** A machine with only loopback, so the relay has no host to report. */ +const noExternalIp = () => interfaces.mockReturnValue({ lo: [iface('127.0.0.1', true)] }); + +const saved = { ...process.env }; + +beforeEach(() => { + for (const key of SMS_ENV) delete process.env[key]; + jest.restoreAllMocks(); + interfaces.mockReturnValue({ eth0: [iface('10.9.9.9', false)] }); +}); + +afterAll(() => { + process.env = { ...saved }; +}); + +/** + * Covers the boot-time contract as REVISED by D20 and the driver choice of D26: + * * a missing key NEVER stops the boot, in any environment — it warns, and + * sending silently declines; + * * `relay` is the default provider; `trez` stays selectable. + */ +describe('SMS configuration', () => { + // Silence the warnings these tests deliberately provoke. + const logger = { warn: jest.fn(), log: jest.fn(), error: jest.fn() } as unknown as Logger; + const warned = () => (logger.warn as jest.Mock).mock.calls.flat().join(' '); + + beforeEach(() => jest.clearAllMocks()); + + describe('provider selection (D26)', () => { + it('defaults to relay', () => { + expect(smsProvider()).toBe('relay'); + }); + + it('treats a blank SMS_PROVIDER, as docker-compose passes it, as the default', () => { + process.env.SMS_PROVIDER = ''; + expect(smsProvider()).toBe('relay'); + }); + + it('still selects trez on request', () => { + process.env.SMS_PROVIDER = 'Trez'; + expect(smsProvider()).toBe('trez'); + }); + }); + + describe('relay', () => { + it('works out of the box, sending through Kavenegar', () => { + process.env.SMS_RELAY_HOST = '10.0.0.5'; + const c = relayConfig(); + expect(c.url).toBe('http://185.231.112.101/api/createsms'); + expect(c.secret).toBeTruthy(); + expect(c.platform).toBe('kave'); + expect(smsConfigured()).toBe(true); + }); + + it('falls back to the server IP for host, skipping loopback', () => { + interfaces.mockReturnValue({ + lo: [iface('127.0.0.1', true)], + eth0: [iface('192.168.1.20', false)], + }); + expect(relayConfig().host).toBe('192.168.1.20'); + }); + + it('lets SMS_RELAY_HOST override the server IP', () => { + process.env.SMS_RELAY_HOST = 'gold.example'; + expect(relayConfig().host).toBe('gold.example'); + }); + + it('sends platform null when SMS_RELAY_PLATFORM=default', () => { + process.env.SMS_RELAY_PLATFORM = 'default'; + expect(relayConfig().platform).toBeNull(); + }); + + it('is not configured, and warns by name, when no host can be found', () => { + noExternalIp(); + expect(smsConfigured()).toBe(false); + expect(() => assertSmsConfigured(logger)).not.toThrow(); + expect(warned()).toMatch(/SMS_RELAY_HOST/); + }); + + it('passes silently once a host is known', () => { + process.env.SMS_RELAY_HOST = '10.0.0.5'; + assertSmsConfigured(logger); + expect(logger.warn).not.toHaveBeenCalled(); + }); + }); + + describe('trez', () => { + beforeEach(() => { + process.env.SMS_PROVIDER = 'trez'; + }); + + const configureFully = () => { + process.env.SMS_TREZ_USERNAME = 'u'; + process.env.SMS_TREZ_PASSWORD = 'p'; + process.env.SMS_TREZ_SENDER_LINE = '9998882797'; + }; + + it('defaults the URL to the reference endpoint and lets staging override it', () => { + expect(trezConfig().url).toBe(DEFAULT_TREZ_URL); + process.env.SMS_TREZ_URL = 'https://staging.example/send'; + expect(trezConfig().url).toBe('https://staging.example/send'); + }); + + it('is configured only once all three credentials are set', () => { + expect(smsConfigured()).toBe(false); + process.env.SMS_TREZ_USERNAME = 'u'; + process.env.SMS_TREZ_PASSWORD = 'p'; + expect(smsConfigured()).toBe(false); + process.env.SMS_TREZ_SENDER_LINE = '9998882797'; + expect(smsConfigured()).toBe(true); + }); + + it('warns in production when keys are missing, naming them, and still boots', () => { + process.env.NODE_ENV = 'production'; + expect(() => assertSmsConfigured(logger)).not.toThrow(); + expect(warned()).toMatch(/SMS_TREZ_USERNAME/); + expect(warned()).toMatch(/SMS_TREZ_PASSWORD/); + expect(warned()).toMatch(/SMS_TREZ_SENDER_LINE/); + }); + + it('passes silently in production once everything is set', () => { + process.env.NODE_ENV = 'production'; + configureFully(); + assertSmsConfigured(logger); + expect(logger.warn).not.toHaveBeenCalled(); + }); + }); + + describe('none and unknown providers (D20 — never throws)', () => { + it('allows SMS to be explicitly disabled, in production too', () => { + process.env.NODE_ENV = 'production'; + process.env.SMS_PROVIDER = 'none'; + process.env.SMS_RELAY_HOST = '10.0.0.5'; + expect(smsConfigured()).toBe(false); + expect(() => assertSmsConfigured(logger)).not.toThrow(); + expect(logger.warn).toHaveBeenCalled(); + }); + + it('warns about an unknown provider name instead of refusing to boot', () => { + process.env.SMS_PROVIDER = 'kavenegar'; + expect(smsConfigured()).toBe(false); + expect(() => assertSmsConfigured(logger)).not.toThrow(); + expect(warned()).toMatch(/Unknown SMS_PROVIDER/); + expect(warned()).toMatch(/"relay", "trez", "none"/); + }); + }); +}); + +describe('relayRejection', () => { + it('accepts empty and neutral JSON bodies', () => { + expect(relayRejection('')).toBeNull(); + expect(relayRejection('{"status":true,"id":12}')).toBeNull(); + expect(relayRejection('{"status":"success"}')).toBeNull(); + expect(relayRejection('[1,2]')).toBeNull(); + }); + + it('rejects bodies that say they failed', () => { + expect(relayRejection('{"status":false}')).toBe('rejected-by-gateway'); + expect(relayRejection('{"success":false,"message":"bad phone"}')).toBe('bad phone'); + expect(relayRejection('{"status":"error"}')).toBe('rejected-by-gateway'); + expect(relayRejection('{"error":"invalid key"}')).toBe('invalid key'); + }); + + it('rejects a bare-text body — the gateway reports its own PHP errors that way', () => { + expect(relayRejection('cURL library is not loaded')).toBe('cURL library is not loaded'); + }); +}); + +describe('SmsService.send', () => { + const create = jest.fn(); + const service = new SmsService({ smsMessage: { create } } as unknown as PrismaService); + let fetchMock: jest.SpyInstance; + + const reply = (status: number, body: string) => + fetchMock.mockResolvedValue(new Response(body, { status })); + + beforeEach(() => { + create.mockReset().mockResolvedValue({}); + fetchMock = jest.spyOn(globalThis, 'fetch'); + // Keep the deliberate failure logs out of the test output. + jest.spyOn(Logger.prototype, 'error').mockImplementation(() => undefined); + jest.spyOn(Logger.prototype, 'warn').mockImplementation(() => undefined); + process.env.SMS_RELAY_HOST = '10.0.0.5'; + }); + + it('posts the shape of the owner PHP client to the relay', async () => { + reply(200, '{"status":true}'); + + const result = await service.send('09120000000', ' سلام '); + + expect(result).toEqual({ ok: true, response: '{"status":true}' }); + const [url, init] = fetchMock.mock.calls[0]; + expect(url).toBe('http://185.231.112.101/api/createsms'); + expect(init.method).toBe('POST'); + expect(init.headers).toEqual({ + 'Content-Type': 'application/json', + secret_key: relayConfig().secret, + }); + expect(JSON.parse(init.body)).toEqual({ + phone: '09120000000', + host: '10.0.0.5', + text: 'سلام', + platform: 'kave', + }); + expect(create).toHaveBeenCalledWith({ + data: expect.objectContaining({ recipients: '09120000000', body: 'سلام' }), + }); + }); + + it('reports an HTTP error without throwing, and still records the message', async () => { + reply(500, 'boom'); + await expect(service.send('09120000000', 'x')).resolves.toEqual({ + ok: false, + response: 'boom', + error: 'http-500', + }); + expect(create).toHaveBeenCalled(); + }); + + it('reports a 200 that the gateway marks as failed', async () => { + reply(200, '{"status":false,"message":"no credit"}'); + const result = await service.send('09120000000', 'x'); + expect(result.ok).toBe(false); + expect(result.error).toBe('no credit'); + }); + + it('turns a network failure into ok:false', async () => { + fetchMock.mockRejectedValue(new Error('ECONNREFUSED')); + await expect(service.send('09120000000', 'x')).resolves.toEqual({ + ok: false, + error: 'ECONNREFUSED', + }); + }); + + it('reports the gateway bare-text PHP error, as seen live', async () => { + reply(200, 'cURL library is not loaded'); + await expect(service.send('09120000000', 'x')).resolves.toEqual({ + ok: false, + response: 'cURL library is not loaded', + error: 'cURL library is not loaded', + }); + }); + + it('honours persist:false', async () => { + reply(200, '{}'); + await service.send('09120000000', 'x', { persist: false }); + expect(create).not.toHaveBeenCalled(); + }); + + it('sends nothing when the provider is disabled', async () => { + process.env.SMS_PROVIDER = 'none'; + const result = await service.send('09120000000', 'x'); + expect(result).toEqual({ ok: false, error: 'sms-not-configured' }); + expect(fetchMock).not.toHaveBeenCalled(); + }); + + it('still drives trez when selected', async () => { + process.env.SMS_PROVIDER = 'trez'; + process.env.SMS_TREZ_USERNAME = 'u'; + process.env.SMS_TREZ_PASSWORD = 'p'; + process.env.SMS_TREZ_SENDER_LINE = '9998882797'; + reply(200, '1'); + + await service.send('09120000000', 'x'); + + const [url, init] = fetchMock.mock.calls[0]; + expect(url).toBe(DEFAULT_TREZ_URL); + expect(Object.fromEntries(new URLSearchParams(init.body))).toEqual({ + PhoneNumber: '9998882797', + Username: 'u', + Password: 'p', + Mobile: '09120000000', + Message: 'x', + }); + }); +}); + +/** + * The OTP text must stay byte-identical to the reference + * (ApiMobileController.php:47) — the first line and the trailing token are the + * Android SMS Retriever hash, and autofill breaks if either changes. + */ +describe('OTP message template', () => { + const build = (code: string) => + `<#> code is ${code}\n` + + `رمز عبور یکبار مصرف شما جهت ورود به اپلیکشن هنزا گلد ${code} می باشد\n` + + `aMo6iFyUQaY`; + + it('matches the reference byte for byte', () => { + expect(build('1234')).toBe( + '<#> code is 1234\nرمز عبور یکبار مصرف شما جهت ورود به اپلیکشن هنزا گلد 1234 می باشد\naMo6iFyUQaY', + ); + }); + + it('keeps the SMS Retriever markers', () => { + const text = build('9876'); + expect(text.startsWith('<#> code is ')).toBe(true); + expect(text.endsWith('\naMo6iFyUQaY')).toBe(true); + expect(text.split('\n')).toHaveLength(3); + }); +}); diff --git a/apps/api/src/modules/sms/sms.service.ts b/apps/api/src/modules/sms/sms.service.ts new file mode 100644 index 0000000..cd5bf21 --- /dev/null +++ b/apps/api/src/modules/sms/sms.service.ts @@ -0,0 +1,157 @@ +import { Injectable, Logger } from '@nestjs/common'; +import { MessageAudience } from '@prisma/client'; +import { PrismaService } from '../../prisma/prisma.service'; +import { envOr } from '../../common/env'; +import { DEFAULT_SMS_PROVIDER, SMS_DRIVERS, SmsDriver, SmsSendResult } from './drivers'; + +/** + * SMS delivery — port of henza_server/app/Models/Sms.php, with the gateway + * pulled out into drivers (`./drivers`) selected by `SMS_PROVIDER`: + * * `relay` (default, D26) — the owner's createsms gateway + * * `trez` — the reference's Trez panel + * * `none` — send nothing + * + * Reference behaviour kept for every driver: + * * the message is trim()ed before sending (`Sms.php:77`) + * * EVERY message is persisted, via `Sms::set()` (`:80`) + * * the response body is returned and the callers ignore it + * + * The OTP message body is NOT persisted in readable form — see + * CustomerAuthService.deliver() and SEC-11. + * + * Failure handling matches the reference: `Sms::Send` is called inline and its + * result is discarded, so a failed send never aborted the order, the document + * approval or the customer creation that triggered it. `send()` therefore + * never throws — it logs and reports failure in its return value. + */ + +export type { SmsSendResult } from './drivers'; + +export interface SmsSendOptions { + /** + * Persist the message body. Default true, matching `Sms::set()`. + * OTP delivery passes false and writes its own redacted row (SEC-11). + */ + persist?: boolean; + audience?: MessageAudience; +} + +/** The selected `SMS_PROVIDER`, lower-cased. */ +export function smsProvider(): string { + return envOr('SMS_PROVIDER', DEFAULT_SMS_PROVIDER).toLowerCase(); +} + +/** The selected driver, or null for `none` and unknown names. */ +export function smsDriver(): SmsDriver | null { + return SMS_DRIVERS[smsProvider()] ?? null; +} + +/** + * True when a real gateway is configured. When false the service stays in + * development mode: nothing is sent, and OTP codes are logged locally. + */ +export function smsConfigured(): boolean { + const driver = smsDriver(); + return driver !== null && driver.missingConfig().length === 0; +} + +/** + * Called from main.ts before the app listens. Reports the SMS configuration + * and NEVER throws. + * + * D20 reversed the earlier rule (D14) that a missing credential should abort + * the boot in production. The server now always starts: a missing or unknown + * provider is a warning, `send()` declines silently and logs, and no message — + * including the welcome SMS — can stop an operation. The trade-off is + * deliberate and accepted: with SMS unconfigured, customers cannot receive a + * login code, which is why `OTP_MASTER_CODE` exists for the delivery. + */ +export function assertSmsConfigured(logger: Logger = new Logger('SmsConfig')): void { + const provider = smsProvider(); + + if (provider === 'none') { + logger.warn('SMS_PROVIDER=none — no SMS will be sent.'); + return; + } + + const driver = smsDriver(); + if (!driver) { + const supported = [...Object.keys(SMS_DRIVERS), 'none'].map((n) => `"${n}"`).join(', '); + logger.warn( + `Unknown SMS_PROVIDER "${provider}" (supported: ${supported}). No SMS will be sent.`, + ); + return; + } + + const missing = driver.missingConfig(); + if (missing.length === 0) { + logger.log(`SMS provider: ${driver.name}`); + return; + } + + logger.warn( + `SMS provider "${driver.name}" is selected but these are not set: ${missing.join(', ')}. ` + + 'Messages are logged, not sent. Customers cannot receive a login code.', + ); +} + +@Injectable() +export class SmsService { + private readonly logger = new Logger(SmsService.name); + + constructor(private readonly prisma: PrismaService) {} + + /** + * Sends one message. Never throws — a failed SMS must not roll back the + * business operation that triggered it, exactly as in the reference. + */ + async send(mobile: string, body: string, options: SmsSendOptions = {}): Promise { + const { persist = true, audience = MessageAudience.SINGLE_NUMBER } = options; + // The reference trims before sending (`Sms.php:77`). + const text = body.trim(); + + console.log("mobile ==>" ,mobile) + const result = await this.deliver(mobile, text); + + if (persist) { + // `Sms::set()` records every message, delivered or not. + await this.record(mobile, text, audience); + } + + return result; + } + + private async deliver(mobile: string, text: string): Promise { + const driver = smsDriver(); + if (!driver || driver.missingConfig().length > 0) { + this.logger.warn(`[dev] SMS not configured; not sending to ${mobile}`); + return { ok: false, error: 'sms-not-configured' }; + } + + let result: SmsSendResult; + try { + result = await driver.deliver(mobile, text); + } catch (e) { + result = { ok: false, error: e instanceof Error ? e.message : String(e) }; + } + + if (!result.ok) { + // Logged, not thrown — see the class comment. + const detail = result.response ? ` ${result.response}` : ''; + this.logger.error(`SMS to ${mobile} via ${driver.name} failed: ${result.error}${detail}`); + } + return result; + } + + /** The `messages` row the reference writes for every send (`Sms.php:120-129`). */ + private async record(mobile: string, body: string, audience: MessageAudience) { + try { + await this.prisma.smsMessage.create({ + data: { audience, recipients: mobile, body, sentCount: 1 }, + }); + } catch (e) { + // Never let the audit write break the caller either. + this.logger.error(`Could not record the SMS to ${mobile}: ${String(e)}`); + } + } +} diff --git a/apps/user-app-v2/Dockerfile b/apps/user-app-v2/Dockerfile index 7813ae7..2071cbc 100644 --- a/apps/user-app-v2/Dockerfile +++ b/apps/user-app-v2/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.arvancloud.ir/nginx:latest +FROM nginx:latest COPY nginx.conf /etc/nginx/conf.d/default.conf COPY dist /usr/share/nginx/html diff --git a/apps/user-app-v2/dist/assets/AppearanceView-B8ytXsfh.css b/apps/user-app-v2/dist/assets/AppearanceView-B8ytXsfh.css new file mode 100644 index 0000000..97c26ca --- /dev/null +++ b/apps/user-app-v2/dist/assets/AppearanceView-B8ytXsfh.css @@ -0,0 +1 @@ +.tsw[data-v-3f7a6b1f]{position:relative;flex:0 0 auto;display:inline-block;width:46px;height:28px;border-radius:999px;transition:background-color .22s ease}.tsw__knob[data-v-3f7a6b1f]{position:absolute;top:3px;inset-inline-start:3px;width:22px;height:22px;border-radius:50%;box-shadow:0 2px 6px -1px #14161a59;transition:transform .26s cubic-bezier(.32,.72,0,1),background-color .22s ease}.tsw.is-on .tsw__knob[data-v-3f7a6b1f]{transform:translate(-18px)}.tsw[data-v-3f7a6b1f]{background:var(--c-hairline)}.tsw__knob[data-v-3f7a6b1f]{background:#fff}.tsw.is-on[data-v-3f7a6b1f]{background:var(--c-ink)}.tsw.is-on .tsw__knob[data-v-3f7a6b1f]{background:var(--c-onInk)}.ap[data-v-d05eb581]{min-height:100vh}.ap__body[data-v-d05eb581]{padding-top:76px;padding-bottom:90px;display:flex;flex-direction:column;gap:26px}.ap__title[data-v-d05eb581],.ap__sub[data-v-d05eb581],.ap__note[data-v-d05eb581]{margin:0}.ap__themes[data-v-d05eb581]{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.ap__theme[data-v-d05eb581]{position:relative;display:flex;flex-direction:column;align-items:center;gap:10px;cursor:pointer;font-family:inherit;-webkit-tap-highlight-color:transparent;transition:transform .15s ease,border-color .2s ease,box-shadow .2s ease,background-color .2s ease}.ap__theme[data-v-d05eb581]:active{transform:scale(.97)}.ap__themeLabel[data-v-d05eb581]{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}.ap__check[data-v-d05eb581]{position:absolute;top:8px;inset-inline-end:8px;display:grid;place-items:center;opacity:0;transform:scale(.6);transition:opacity .18s ease,transform .22s cubic-bezier(.32,.72,0,1)}.ap__theme.is-on .ap__check[data-v-d05eb581]{opacity:1;transform:none}.ap__preview[data-v-d05eb581]{position:relative;width:100%;aspect-ratio:3 / 4;overflow:hidden;display:flex;flex-direction:column;gap:6%;padding:10% 12%;--pv-bg: #ffffff;--pv-bar: #f4f5f6;--pv-card: #ecedef;--pv-line: #dadce0;--pv-btn: #14161a;background:var(--pv-bg)}.ap__preview--dark[data-v-d05eb581]{--pv-bg: #16171a;--pv-bar: #1e2024;--pv-card: #2b2e34;--pv-line: #3a3e45;--pv-btn: #f1f2f4}.ap__preview--system[data-v-d05eb581]:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;background:#16171a;clip-path:polygon(100% 0,100% 100%,0 100%);opacity:.94}.ap__pvBar[data-v-d05eb581]{height:9%;border-radius:4px;background:var(--pv-bar)}.ap__pvCard[data-v-d05eb581]{flex:1;border-radius:7px;background:var(--pv-card)}.ap__pvLine[data-v-d05eb581]{height:6%;border-radius:3px;background:var(--pv-line)}.ap__pvLine--short[data-v-d05eb581]{width:60%}.ap__pvBtn[data-v-d05eb581]{height:11%;border-radius:999px;background:var(--pv-btn)}.ap__row[data-v-d05eb581]{width:100%;display:flex;align-items:center;gap:12px;cursor:pointer;font-family:inherit;text-align:start;-webkit-tap-highlight-color:transparent;transition:transform .15s ease,border-color .2s ease}.ap__row[data-v-d05eb581]:active{transform:scale(.985)}.ap__rowIcon[data-v-d05eb581]{flex:0 0 auto;display:grid;place-items:center}.ap__rowText[data-v-d05eb581]{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.ap[data-v-d05eb581]{background:var(--c-page)}.ap__head[data-v-d05eb581]{margin-bottom:12px}.ap__title[data-v-d05eb581]{font-size:16px;font-weight:700;color:var(--c-ink)}.ap__sub[data-v-d05eb581]{margin-top:4px;font-size:11.5px;color:var(--c-inkFaint)}.ap__note[data-v-d05eb581]{margin-top:10px;font-size:11.5px;color:var(--c-inkMuted)}.ap__theme[data-v-d05eb581]{padding:10px 10px 12px;border:0;border-radius:22px;background:var(--c-hairlineSoft);color:var(--c-inkMuted);box-shadow:inset 0 0 0 1.5px transparent}.ap__theme.is-on[data-v-d05eb581]{color:var(--c-ink);box-shadow:inset 0 0 0 1.5px var(--c-ink)}.ap__preview[data-v-d05eb581]{border-radius:14px;box-shadow:0 0 0 1px #14161a0f}.ap__themeLabel[data-v-d05eb581]{font-size:12px;font-weight:700}.ap__check[data-v-d05eb581]{width:22px;height:22px;border-radius:50%;color:var(--c-onInk);background:var(--c-ink)}.ap__row[data-v-d05eb581]{padding:13px 14px;border:1px solid var(--c-hairline);border-radius:17px;background:var(--c-canvas)}.ap__row[data-v-d05eb581]:active{border-color:rgb(var(--c-wine-rgb) / 20%)}.ap__rowIcon[data-v-d05eb581]{width:38px;height:38px;border-radius:12px;color:var(--c-wine);background:var(--c-wineWash)}.ap__rowText b[data-v-d05eb581]{font-size:12.5px;font-weight:700;color:var(--c-ink)}.ap__rowText small[data-v-d05eb581]{font-size:10.5px;line-height:1.9;color:var(--c-inkFaint)} diff --git a/apps/user-app-v2/dist/assets/AppearanceView-Cs0B0IPW.js b/apps/user-app-v2/dist/assets/AppearanceView-Cs0B0IPW.js new file mode 100644 index 0000000..b6e71c4 --- /dev/null +++ b/apps/user-app-v2/dist/assets/AppearanceView-Cs0B0IPW.js @@ -0,0 +1 @@ +import{d,f as i,c as _,i as r,b as e,_ as h,u as v,p as o,z as b,B as k,F as f,r as w,m as n,t as u,e as x,I as c,N as g}from"./index-BAr1mMLP.js";import{P as y}from"./PageBar-B1ks8U8i.js";const C=d({__name:"ToggleSwitch",props:{on:{type:Boolean}},setup(p){return(a,l)=>(i(),_("span",{class:r(["tsw",{"is-on":p.on}]),"aria-hidden":"true"},[...l[0]||(l[0]=[e("span",{class:"tsw__knob"},null,-1)])],2))}}),B=h(C,[["__scopeId","data-v-3f7a6b1f"]]),T={class:"ap"},S={class:"ap__section"},V={class:"ap__themes",role:"radiogroup","aria-labelledby":"ap-theme"},z=["aria-checked","onClick"],I={class:"ap__themeLabel"},L={class:"ap__check","aria-hidden":"true"},M={key:0,class:"ap__note"},N={class:"ap__section"},$=["aria-checked"],A={class:"ap__rowIcon","aria-hidden":"true"},E=d({__name:"AppearanceView",setup(p){const a=v(),l=[{value:"light",label:"روشن",icon:"vuesax-linear:sun-1"},{value:"dark",label:"تیره",icon:"vuesax-linear:moon"},{value:"system",label:"مطابق سیستم",icon:"vuesax-linear:monitor-mobbile"}];return(P,s)=>{const m=k("container");return i(),_("div",T,[o(y,{title:"تنظیمات ظاهری","back-to":"userPage::hasSubRoute"}),o(m,{class:"ap__body"},{default:b(()=>[e("section",S,[s[2]||(s[2]=e("header",{class:"ap__head"},[e("h2",{id:"ap-theme",class:"ap__title"},"پوسته برنامه"),e("p",{class:"ap__sub"},"ظاهر روشن یا تیره، یا هماهنگ با تنظیمات گوشی شما")],-1)),e("div",V,[(i(),_(f,null,w(l,t=>e("button",{key:t.value,type:"button",role:"radio",class:r(["ap__theme",{"is-on":n(a).theme===t.value}]),"aria-checked":n(a).theme===t.value,onClick:F=>n(a).setTheme(t.value)},[e("span",{class:r(["ap__preview",`ap__preview--${t.value}`]),"aria-hidden":"true"},[...s[1]||(s[1]=[e("span",{class:"ap__pvBar"},null,-1),e("span",{class:"ap__pvCard"},null,-1),e("span",{class:"ap__pvLine"},null,-1),e("span",{class:"ap__pvLine ap__pvLine--short"},null,-1),e("span",{class:"ap__pvBtn"},null,-1)])],2),e("span",I,[o(c,{icon:t.icon,size:"15"},null,8,["icon"]),g(" "+u(t.label),1)]),e("span",L,[o(c,{icon:"vuesax-linear:tick-circle",size:"18"})])],10,z)),64))]),n(a).theme==="system"?(i(),_("p",M," الان "+u(n(a).resolvedTheme==="dark"?"تیره":"روشن")+" است، مطابق تنظیمات گوشی. ",1)):x("",!0)]),e("section",N,[s[4]||(s[4]=e("header",{class:"ap__head"},[e("h2",{class:"ap__title"},"انیمیشن‌ها"),e("p",{class:"ap__sub"},"برای سرعت بیشتر روی گوشی‌های ضعیف‌تر")],-1)),e("button",{type:"button",role:"switch",class:"ap__row","aria-checked":n(a).reduceMotion,onClick:s[0]||(s[0]=t=>n(a).setReduceMotion(!n(a).reduceMotion))},[e("span",A,[o(c,{icon:"vuesax-linear:flash",size:"18"})]),s[3]||(s[3]=e("span",{class:"ap__rowText"},[e("b",null,"حالت سبک و سریع"),e("small",null," حرکت‌های سنگین، افکت‌های شیشه‌ای و اسلاید خودکار خاموش می‌شوند؛ بازخورد کوتاه لمس‌ها و جابه‌جایی‌های سریع باقی می‌مانند تا برنامه خشک و بی‌روح نشود. ")],-1)),o(B,{on:n(a).reduceMotion},null,8,["on"])],8,$)])]),_:1})])}}}),H=h(E,[["__scopeId","data-v-d05eb581"]]);export{H as default}; diff --git a/apps/user-app-v2/dist/assets/CartView-Cb4qKsUd.js b/apps/user-app-v2/dist/assets/CartView-Cb4qKsUd.js deleted file mode 100644 index 01f00d5..0000000 --- a/apps/user-app-v2/dist/assets/CartView-Cb4qKsUd.js +++ /dev/null @@ -1 +0,0 @@ -import{d as B,k as L,f as l,c as r,b as e,u as o,w as T,l as n,I as g,t as m,e as P,C as I,h as A,_ as S,D as M,o as j,p as W,q as i,j as z,g as D,A as F,i as G,F as H,r as X,L as R,v as J,s as K,n as Q}from"./index-CZjgV-Yn.js";import{l as Y}from"./dialogEmpty1-Caw7F5KL.js";import{P as Z}from"./PageBar-Bkc2Ht1O.js";import{a as tt}from"./Spinner.vue_vue_type_style_index_0_lang-ghXHCVpI.js";import{_ as U}from"./DialogVant.vue_vue_type_style_index_0_lang-DKsdrzNc.js";import{a as N,u as et}from"./cartStore-CoSoowuC.js";import{a as st}from"./client-WIBW0tF5.js";import{D as ot}from"./index-Ca8ka09f.js";import{P as at}from"./index-BBOQn_fb.js";import{F as nt,T as it,a as lt}from"./index-DtVU50JL.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./classCallCheck-BSDY9VEy.js";import"./FormItemContext-Dxet_qkI.js";const rt="/assets/dialogEmpty4-Bh_UXocp.svg",ct={class:"ci"},ut={class:"ci__art"},dt=["alt"],mt={key:1,class:"ci__artEmpty","aria-hidden":"true"},_t={class:"ci__main"},pt={class:"ci__title"},vt={class:"ci__meta"},yt={class:"ci__weight"},ft={key:0,class:"ci__wage"},gt={class:"ci__row"},bt={class:"ci__qty"},wt={class:"ci__qtyValue"},kt={key:0,class:"ci__noteText"},xt=B({__name:"CartItem",props:{value:{}},emits:["note"],setup(d,{emit:h}){const u=d,c=h,_=N(),p=_.find_index(u.value),k=()=>{_.updateFeild(u.value.qty+1,p,u.value,"qty")},x=()=>{_.updateFeild(u.value.qty-1,p,u.value,"qty")},{image:C,title:s,selectedVariant:v,wage:$}=et(u.value.product,_.variant(u.value)),q=A(()=>{const f=$.value;return f==null?"":f%1===0?String(f):f.toFixed(2)});return(f,b)=>{var t;const y=L("lazy");return l(),r("article",ct,[e("div",ut,[o(C)?T((l(),r("img",{key:0,alt:o(s)},null,8,dt)),[[y,o(C)]]):(l(),r("div",mt,[n(g,{icon:"vuesax-linear:diamonds",size:"20"})]))]),e("div",_t,[e("h3",pt,m(o(s)),1),e("div",vt,[e("span",yt,m((t=o(v))==null?void 0:t.rashWeightGrams)+" گرم",1),o($)!=null?(l(),r("span",ft,"اجرت "+m(q.value)+"٪",1)):P("",!0)]),e("div",gt,[e("div",bt,[e("button",{type:"button",class:"ci__qtyBtn","aria-label":"افزودن",onClick:k},[n(g,{icon:"vuesax-linear:add",size:"16"})]),e("span",wt,m(d.value.qty),1),d.value.qty===1?(l(),r("button",{key:0,type:"button",class:"ci__qtyBtn ci__qtyBtn--danger","aria-label":"حذف",onClick:b[0]||(b[0]=w=>o(_).remove(d.value))},[n(g,{icon:"vuesax-linear:trash",size:"16"})])):(l(),r("button",{key:1,type:"button",class:"ci__qtyBtn","aria-label":"کاهش",onClick:x},[n(g,{icon:"vuesax-linear:minus",size:"16"})]))]),e("button",{type:"button",class:"ci__note",onClick:b[1]||(b[1]=w=>c("note",o(p)))},[n(g,{icon:"vuesax-linear:note-text",size:"15"}),I(" "+m(!d.value.note||d.value.note===""?"توضیحات":"ویرایش توضیحات"),1)])]),d.value.note?(l(),r("p",kt,m(d.value.note),1)):P("",!0)])])}}}),ht=S(xt,[["__scopeId","data-v-7fb07fff"]]),Ct={class:"cart"},$t={key:1,class:"cart__empty"},It={key:1,class:"cart__done"},Pt={class:"cart__doneIcon","aria-hidden":"true"},qt={class:"cart__doneSub"},zt={key:0,class:"cart__bar"},Dt={class:"cart__barInner"},Rt={class:"cart__total"},Vt={class:"cart__totalValue"},Ft={class:"sheet"},Ut={class:"sheet__title"},Bt=["src"],St=["src"],Nt=60,Ot=B({__name:"CartView",setup(d){let h=!1;const u=J(),c=N(),_=M(),p=D(!1),k=D(!1),x=D(h);function C(y){return{"--reveal-delay":`${y*Nt}ms`}}const s=F({loadingPage:!1,showPopUp:!1,step:1,notify:!1,orderID:"",tempRowIndex:-1,tempRow:{product:void 0}}),v=F({note:void 0}),$=()=>{c.updateFeild(v.note,s.tempRowIndex,s.tempRow,"note"),s.showPopUp=!1,v.note=void 0,s.tempRow={product:void 0}},q=async()=>{await u.push({name:"ordersList"}),s.step=1},f=async()=>{if(s.notify=!1,!_.customerId){p.value=!0;return}try{s.loadingPage=!0;const y=await st.createOrder({customerId:_.customerId,items:c.items.map(t=>{const w=c.variant(t);return{productVariantId:t.vid,quantity:t.qty,wagePercent:w?parseFloat(w.defaultWagePercent):0}})});s.orderID=y.orderNumber,s.step=2,c.clear()}catch(y){console.log(y)}finally{s.loadingPage=!1}};async function b(){await c.init(),k.value=!1}return j(async()=>{await c.init(),!x.value&&(await W(),requestAnimationFrame(()=>{x.value=!0,h=!0}))}),(y,t)=>{var V;const w=K("container");return l(),r("div",Ct,[n(Z,{title:"سبد خرید","back-to":"home"}),n(tt,{spinning:s.loadingPage,tip:"درحال دریافت اطلاعات"},{default:i(()=>[n(w,{class:"cart__body"},{default:i(()=>[s.step===1?(l(),z(o(at),{key:0,modelValue:k.value,"onUpdate:modelValue":t[1]||(t[1]=a=>k.value=a),onRefresh:b},{pulling:i(()=>[n(o(R),{size:"18"})]),loosing:i(()=>[n(o(R),{size:"18"})]),loading:i(()=>[n(o(R),{size:"18"})]),success:i(()=>[...t[10]||(t[10]=[e("span",null,null,-1)])]),default:i(()=>[o(c).items.length?(l(),r("div",{key:0,class:G(["cart__items",{"is-revealed":x.value}])},[(l(!0),r(H,null,X(o(c).items,(a,O)=>(l(),z(ht,{key:a.pid+a.vid,value:a,class:"cart__row",style:Q(C(O)),onNote:E=>{s.tempRow=a,s.showPopUp=!0,s.tempRowIndex=E,v.note=a.note??void 0}},null,8,["value","style","onNote"]))),128))],2)):(l(),r("section",$t,[n(g,{icon:"vuesax-linear:bag-2",size:"26"}),t[11]||(t[11]=e("p",null,"سبد خرید شما خالی است.",-1)),e("button",{type:"button",class:"cart__emptyCta",onClick:t[0]||(t[0]=a=>o(u).push({name:"home"}))}," دیدن محصولات ")]))]),_:1},8,["modelValue"])):(l(),r("section",It,[e("div",Pt,[n(g,{icon:"vuesax-linear:tick-circle",size:"30"})]),t[13]||(t[13]=e("h2",{class:"cart__doneTitle"},"سفارش شما ثبت شد",-1)),e("p",qt,[t[12]||(t[12]=I(" شماره سفارش ",-1)),e("b",null,m(s.orderID),1)]),t[14]||(t[14]=e("p",{class:"cart__doneHint"},"برای پیگیری وضعیت، به فهرست سفارش‌ها مراجعه کنید.",-1)),e("button",{type:"button",class:"cart__doneCta",onClick:q},"فهرست سفارش‌ها")]))]),_:1})]),_:1},8,["spinning"]),o(c).items.length>0&&s.step===1?(l(),r("div",zt,[e("div",Dt,[e("div",Rt,[t[16]||(t[16]=e("span",{class:"cart__totalLabel"},"جمع وزن",-1)),e("span",Vt,[I(m(o(c).total())+" ",1),t[15]||(t[15]=e("i",null,"گرم",-1))])]),e("button",{type:"button",class:"cart__submit",onClick:t[2]||(t[2]=a=>s.notify=!0)},"ثبت نهایی سفارش")])])):P("",!0),(V=s.tempRow)!=null&&V.product?(l(),z(o(ot),{key:1,visible:s.showPopUp,"onUpdate:visible":t[4]||(t[4]=a=>s.showPopUp=a),placement:"bottom",closable:!1,height:"300px",class:"rtl",bodyStyle:{padding:0}},{default:i(()=>[e("div",Ft,[e("h3",Ut,"توضیح برای "+m(s.tempRow.product.title),1),n(o(lt),{model:v,name:"noteForm",layout:"vertical",autocomplete:"off",onFinish:$},{default:i(()=>[n(o(nt),{"has-feedback":"",name:"note"},{default:i(()=>[n(o(it),{value:v.note,"onUpdate:value":t[3]||(t[3]=a=>v.note=a),rows:4,placeholder:"مثلاً سایز یا جزئیات سفارش"},null,8,["value"])]),_:1}),t[17]||(t[17]=e("button",{type:"submit",class:"sheet__cta"},"ثبت توضیحات",-1))]),_:1},8,["model"])])]),_:1},8,["visible"])):P("",!0),n(U,{timeOut:-1,show:s.notify,"onUpdate:show":t[6]||(t[6]=a=>s.notify=a),closeOnClickOverlay:!0},{img:i(()=>[e("img",{src:o(rt),alt:"",class:"opacity-70"},null,8,Bt)]),title:i(()=>[...t[18]||(t[18]=[I("آیا مطمئن به ثبت سفارش هستید ؟",-1)])]),button:i(()=>[e("div",{class:"text-center text-[#1C2D56]",onClick:f},"بله"),e("div",{class:"text-center text-[#6b7280]",onClick:t[5]||(t[5]=a=>s.notify=!1)},"بی خیال")]),_:1},8,["show"]),n(U,{timeOut:-1,show:p.value,"onUpdate:show":t[9]||(t[9]=a=>p.value=a),closeOnClickOverlay:!0},{img:i(()=>[e("img",{src:o(Y),alt:"",class:"opacity-80"},null,8,St)]),title:i(()=>[...t[19]||(t[19]=[e("div",{class:"p-8 text-justify"},"برای ثبت سفارش ابتدا باید وارد حساب کاربری خود شوید.",-1)])]),button:i(()=>[e("div",{class:"text-center text-[#1C2D56]",onClick:t[7]||(t[7]=a=>o(u).push({name:"login"}))},"ورود/ثبت نام"),e("div",{class:"text-center text-danger",onClick:t[8]||(t[8]=a=>p.value=!1)},"بیخیال")]),_:1},8,["show"])])}}}),Yt=S(Ot,[["__scopeId","data-v-b9a90729"]]);export{Yt as default}; diff --git a/apps/user-app-v2/dist/assets/CartView-DKfSBWzV.css b/apps/user-app-v2/dist/assets/CartView-DKfSBWzV.css new file mode 100644 index 0000000..0acb0d3 --- /dev/null +++ b/apps/user-app-v2/dist/assets/CartView-DKfSBWzV.css @@ -0,0 +1 @@ +.ci[data-v-d4b1ffdf]{display:flex;gap:14px;padding:16px 2px;background:transparent}.ci__art[data-v-d4b1ffdf]{flex:0 0 84px;width:84px;height:84px;display:flex;align-items:center;justify-content:center;border-radius:13px;overflow:hidden;background:var(--c-hairlineSoft)}.ci__art img[data-v-d4b1ffdf]{width:90px;height:90px;-o-object-fit:contain;object-fit:contain;-o-object-position:center;object-position:center;display:block}html.theme-dark .ci__art img[data-v-d4b1ffdf]{background:var(--c-photoMat);border-radius:12px}.ci__artEmpty[data-v-d4b1ffdf]{width:100%;height:100%;display:grid;place-items:center;color:var(--c-inkFaint)}.ci__main[data-v-d4b1ffdf]{flex:1;min-width:0}.ci__title[data-v-d4b1ffdf]{margin:0;font-size:13px;font-weight:700;color:var(--c-ink);line-height:1.6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ci__meta[data-v-d4b1ffdf]{display:flex;align-items:center;gap:7px;padding-top:5px}.ci__weight[data-v-d4b1ffdf]{font-size:11.5px;font-weight:700;color:var(--c-inkSoft)}.ci__wage[data-v-d4b1ffdf]{font-size:10.5px;color:var(--c-inkFaint);padding-inline-start:7px;border-inline-start:1px solid var(--c-hairline)}.ci__row[data-v-d4b1ffdf]{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:10px}.ci__qty[data-v-d4b1ffdf]{display:inline-flex;align-items:center;gap:4px;padding:3px;border-radius:999px;background:var(--c-hairlineSoft);border:1px solid var(--c-hairline)}.ci__qtyBtn[data-v-d4b1ffdf]{width:27px;height:27px;border:0;cursor:pointer;border-radius:50%;display:grid;place-items:center;color:var(--c-inkSoft);background:var(--c-canvas);transition:transform .15s ease,color .15s ease}.ci__qtyBtn--danger[data-v-d4b1ffdf]{color:var(--c-wine)}.ci__qtyBtn[data-v-d4b1ffdf]:active{transform:scale(.9)}.ci__qtyValue[data-v-d4b1ffdf]{min-width:22px;text-align:center;font-size:12.5px;font-weight:700;color:var(--c-ink)}.ci__note[data-v-d4b1ffdf]{display:inline-flex;align-items:center;gap:5px;border:0;background:none;cursor:pointer;padding:0;font-family:inherit;font-size:11.5px;font-weight:700;color:var(--c-wine);white-space:nowrap}.ci__noteText[data-v-d4b1ffdf]{margin:8px 0 0;padding:8px 10px;border-radius:11px;background:var(--c-hairlineSoft);font-size:11.5px;line-height:1.7;color:var(--c-inkMuted)}.cart[data-v-f2959d4b]{background:var(--c-page);min-height:100vh}.cart__body[data-v-f2959d4b]{padding-top:76px;padding-bottom:150px}.cart__items[data-v-f2959d4b]{display:flex;flex-direction:column;padding-top:8px}.cart__row+.cart__row[data-v-f2959d4b]{border-top:1px solid var(--c-hairline)}.cart__row[data-v-f2959d4b]{opacity:0;transform:translate3d(0,12px,0) scale(.98);will-change:transform,opacity}.is-revealed .cart__row[data-v-f2959d4b]{opacity:1;transform:translateZ(0) scale(1);transition:opacity .62s cubic-bezier(.32,.72,0,1) var(--reveal-delay, 0ms),transform .62s cubic-bezier(.32,.72,0,1) var(--reveal-delay, 0ms)}@media (prefers-reduced-motion: reduce){.cart__row[data-v-f2959d4b]{opacity:1;transform:none}.is-revealed .cart__row[data-v-f2959d4b]{transition:none}}.cart__empty[data-v-f2959d4b]{margin-top:8px;padding:38px 20px;border:1px dashed var(--c-hairline);border-radius:18px;display:flex;flex-direction:column;align-items:center;gap:10px;color:var(--c-inkFaint)}.cart__empty p[data-v-f2959d4b]{margin:0;font-size:12.5px}.cart__emptyCta[data-v-f2959d4b]{margin-top:4px;padding:9px 18px;border:0;cursor:pointer;border-radius:999px;font-family:inherit;font-size:12.5px;font-weight:700;color:var(--c-onInk);background:var(--c-ink)}.cart__done[data-v-f2959d4b]{margin-top:20px;padding:34px 22px;border:1px solid var(--c-hairline);border-radius:20px;display:flex;flex-direction:column;align-items:center;text-align:center}.cart__doneIcon[data-v-f2959d4b]{width:56px;height:56px;border-radius:50%;display:grid;place-items:center;color:var(--c-wine);background:var(--c-wineWash)}.cart__doneTitle[data-v-f2959d4b]{margin:14px 0 0;font-size:15px;font-weight:800;color:var(--c-ink)}.cart__doneSub[data-v-f2959d4b]{margin:8px 0 0;font-size:12.5px;color:var(--c-inkMuted)}.cart__doneSub b[data-v-f2959d4b]{color:var(--c-ink)}.cart__doneHint[data-v-f2959d4b]{margin:5px 0 0;font-size:11.5px;color:var(--c-inkFaint)}.cart__doneCta[data-v-f2959d4b]{margin-top:18px;padding:11px 22px;border:0;cursor:pointer;border-radius:999px;font-family:inherit;font-size:12.5px;font-weight:700;color:var(--c-onInk);background:var(--c-ink)}.cart__bar[data-v-f2959d4b]{position:fixed;bottom:0;left:0;right:0;z-index:5;background:rgb(var(--c-canvas-rgb) / 92%);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border-top:1px solid var(--c-hairline);padding-bottom:66px}.cart__barInner[data-v-f2959d4b]{max-width:768px;margin:0 auto;padding:12px 16px;display:flex;align-items:center;justify-content:space-between;gap:14px}.cart__total[data-v-f2959d4b]{display:flex;flex-direction:column;gap:3px}.cart__totalLabel[data-v-f2959d4b]{font-size:11px;color:var(--c-inkFaint)}.cart__totalValue[data-v-f2959d4b]{font-size:16px;font-weight:800;color:var(--c-ink)}.cart__totalValue i[data-v-f2959d4b]{font-style:normal;font-size:11px;font-weight:600;color:var(--c-inkFaint);padding-inline-start:3px}.cart__submit[data-v-f2959d4b]{flex:1;max-width:200px;padding:13px 18px;border:0;cursor:pointer;border-radius:14px;font-family:inherit;font-size:13px;font-weight:700;color:var(--c-onInk);background:var(--c-ink);transition:transform .15s ease}.cart__submit[data-v-f2959d4b]:active{transform:scale(.98)}.sheet[data-v-f2959d4b]{padding:18px 16px 22px}.sheet__title[data-v-f2959d4b]{margin:0 0 14px;font-size:13.5px;font-weight:800;color:var(--c-ink)}.sheet__cta[data-v-f2959d4b]{width:100%;padding:12px 18px;border:0;cursor:pointer;border-radius:14px;font-family:inherit;font-size:13px;font-weight:700;color:var(--c-onInk);background:var(--c-ink)} diff --git a/apps/user-app-v2/dist/assets/CartView-KYhz2yxy.js b/apps/user-app-v2/dist/assets/CartView-KYhz2yxy.js new file mode 100644 index 0000000..143d696 --- /dev/null +++ b/apps/user-app-v2/dist/assets/CartView-KYhz2yxy.js @@ -0,0 +1 @@ +import{d as S,M as U,k as M,l as O,f as i,c as r,b as e,m as a,w as A,p as n,I as f,t as v,e as I,N as B,h as z,_ as L,O as Q,o as W,x as j,z as u,J as G,j as R,P as D,C as H,g as V,K as N,i as J,F as K,r as X,B as Y,n as Z,s as tt}from"./index-BAr1mMLP.js";import{P as et}from"./PageBar-B1ks8U8i.js";import{D as st}from"./index-DWuFFuVX.js";import{L as F,P as at}from"./index-DPSZMLNJ.js";import{F as ot,T as nt,a as it}from"./index-BkhudXey.js";import"./KeyCode-BMdFtCT-.js";import"./classCallCheck-DDMOgDz1.js";import"./raf-nDFcuFT6.js";import"./FormItemContext-YTkEF048.js";const lt={class:"ci"},rt={class:"ci__art"},ct=["alt"],dt={key:1,class:"ci__artEmpty","aria-hidden":"true"},ut={class:"ci__main"},_t={class:"ci__title"},mt={class:"ci__meta"},pt={class:"ci__weight"},vt={key:0,class:"ci__wage"},yt={class:"ci__row"},ft={class:"ci__qty"},bt=["disabled"],gt={class:"ci__qtyValue"},wt={key:0,class:"ci__noteText"},ht=S({__name:"CartItem",props:{value:{}},emits:["note"],setup(_,{emit:x}){const l=_,c=x,m=U(),y=m.find_index(l.value),b=z(()=>m.maxQty(l.value)),g=z(()=>b.value===null||l.value.qty{g.value&&m.updateFeild(l.value.qty+1,y,l.value,"qty")},s=()=>{m.updateFeild(l.value.qty-1,y,l.value,"qty")},{image:p,title:k,selectedVariant:P,wage:C}=M(l.value.product,m.variant(l.value)),q=z(()=>{const d=C.value;return d==null?"":d%1===0?String(d):d.toFixed(2)});return(d,t)=>{var h;const w=O("lazy");return i(),r("article",lt,[e("div",rt,[a(p)?A((i(),r("img",{key:0,alt:a(k)},null,8,ct)),[[w,a(p)]]):(i(),r("div",dt,[n(f,{icon:"vuesax-linear:diamonds",size:"20"})]))]),e("div",ut,[e("h3",_t,v(a(k)),1),e("div",mt,[e("span",pt,v((h=a(P))==null?void 0:h.rashWeightGrams)+" گرم",1),a(C)!=null?(i(),r("span",vt,"اجرت "+v(q.value)+"٪",1)):I("",!0)]),e("div",yt,[e("div",ft,[e("button",{type:"button",class:"ci__qtyBtn","aria-label":"افزودن",disabled:!g.value,onClick:$},[n(f,{icon:"vuesax-linear:add",size:"16"})],8,bt),e("span",gt,v(_.value.qty),1),_.value.qty===1?(i(),r("button",{key:0,type:"button",class:"ci__qtyBtn ci__qtyBtn--danger","aria-label":"حذف",onClick:t[0]||(t[0]=o=>a(m).remove(_.value))},[n(f,{icon:"vuesax-linear:trash",size:"16"})])):(i(),r("button",{key:1,type:"button",class:"ci__qtyBtn","aria-label":"کاهش",onClick:s},[n(f,{icon:"vuesax-linear:minus",size:"16"})]))]),e("button",{type:"button",class:"ci__note",onClick:t[1]||(t[1]=o=>c("note",a(y)))},[n(f,{icon:"vuesax-linear:note-text",size:"15"}),B(" "+v(!_.value.note||_.value.note===""?"توضیحات":"ویرایش توضیحات"),1)])]),_.value.note?(i(),r("p",wt,v(_.value.note),1)):I("",!0)])])}}}),xt=L(ht,[["__scopeId","data-v-d4b1ffdf"]]),kt={class:"cart"},Ct={key:1,class:"cart__empty"},It={key:1,class:"cart__done"},$t={class:"cart__doneIcon","aria-hidden":"true"},Pt={class:"cart__doneSub"},qt={key:0,class:"cart__bar"},zt={class:"cart__barInner"},Rt={class:"cart__total"},Vt={class:"cart__totalValue"},Ft={class:"sheet"},Bt={class:"sheet__title"},Dt=60,Nt=S({__name:"CartView",setup(_){let x=!1;const l=H(),c=U(),m=Q(),y=V(!1),b=V(!1),g=V(x);function $(d){return{"--reveal-delay":`${d*Dt}ms`}}const s=N({loadingPage:!1,showPopUp:!1,step:1,notify:!1,orderID:"",tempRowIndex:-1,tempRow:{product:void 0}}),p=N({note:void 0}),k=()=>{c.updateFeild(p.note,s.tempRowIndex,s.tempRow,"note"),s.showPopUp=!1,p.note=void 0,s.tempRow={product:void 0}},P=async()=>{await l.push({name:"ordersList"}),s.step=1},C=async()=>{if(s.notify=!1,!m.isLoggedIn){y.value=!0;return}try{s.loadingPage=!0;const d=await tt.createOrder({customerId:m.customerId??void 0,items:c.items.map(t=>{const w=c.variant(t);return{productVariantId:t.vid,quantity:t.qty,wagePercent:w?parseFloat(w.defaultWagePercent):0}})});s.orderID=d.orderNumber,s.step=2,c.clear()}catch(d){console.log(d)}finally{s.loadingPage=!1}};async function q(){await c.init(),b.value=!1}return W(async()=>{await c.init(),!g.value&&(await j(),requestAnimationFrame(()=>{g.value=!0,x=!0}))}),(d,t)=>{var h;const w=Y("container");return i(),r("div",kt,[n(et,{title:"سبد خرید","back-to":"home"}),n(G,{spinning:s.loadingPage,tip:"درحال دریافت اطلاعات"},{default:u(()=>[n(w,{class:"cart__body"},{default:u(()=>[s.step===1?(i(),R(a(at),{key:0,modelValue:b.value,"onUpdate:modelValue":t[1]||(t[1]=o=>b.value=o),onRefresh:q},{pulling:u(()=>[n(a(F),{size:"18"})]),loosing:u(()=>[n(a(F),{size:"18"})]),loading:u(()=>[n(a(F),{size:"18"})]),success:u(()=>[...t[8]||(t[8]=[e("span",null,null,-1)])]),default:u(()=>[a(c).items.length?(i(),r("div",{key:0,class:J(["cart__items",{"is-revealed":g.value}])},[(i(!0),r(K,null,X(a(c).items,(o,T)=>(i(),R(xt,{key:o.pid+o.vid,value:o,class:"cart__row",style:Z($(T)),onNote:E=>{s.tempRow=o,s.showPopUp=!0,s.tempRowIndex=E,p.note=o.note??void 0}},null,8,["value","style","onNote"]))),128))],2)):(i(),r("section",Ct,[n(f,{icon:"vuesax-linear:bag-2",size:"26"}),t[9]||(t[9]=e("p",null,"سبد خرید شما خالی است.",-1)),e("button",{type:"button",class:"cart__emptyCta",onClick:t[0]||(t[0]=o=>a(l).push({name:"home"}))}," دیدن محصولات ")]))]),_:1},8,["modelValue"])):(i(),r("section",It,[e("div",$t,[n(f,{icon:"vuesax-linear:tick-circle",size:"30"})]),t[11]||(t[11]=e("h2",{class:"cart__doneTitle"},"سفارش شما ثبت شد",-1)),e("p",Pt,[t[10]||(t[10]=B(" شماره سفارش ",-1)),e("b",null,v(s.orderID),1)]),t[12]||(t[12]=e("p",{class:"cart__doneHint"},"برای پیگیری وضعیت، به فهرست سفارش‌ها مراجعه کنید.",-1)),e("button",{type:"button",class:"cart__doneCta",onClick:P},"فهرست سفارش‌ها")]))]),_:1})]),_:1},8,["spinning"]),a(c).items.length>0&&s.step===1?(i(),r("div",qt,[e("div",zt,[e("div",Rt,[t[14]||(t[14]=e("span",{class:"cart__totalLabel"},"جمع وزن",-1)),e("span",Vt,[B(v(a(c).total())+" ",1),t[13]||(t[13]=e("i",null,"گرم",-1))])]),e("button",{type:"button",class:"cart__submit",onClick:t[2]||(t[2]=o=>s.notify=!0)},"ثبت نهایی سفارش")])])):I("",!0),(h=s.tempRow)!=null&&h.product?(i(),R(a(st),{key:1,visible:s.showPopUp,"onUpdate:visible":t[4]||(t[4]=o=>s.showPopUp=o),placement:"bottom",closable:!1,height:"300px",class:"rtl island-sheet",bodyStyle:{padding:0}},{default:u(()=>[e("div",Ft,[e("h3",Bt,"توضیح برای "+v(s.tempRow.product.title),1),n(a(it),{model:p,name:"noteForm",layout:"vertical",autocomplete:"off",onFinish:k},{default:u(()=>[n(a(ot),{"has-feedback":"",name:"note"},{default:u(()=>[n(a(nt),{value:p.note,"onUpdate:value":t[3]||(t[3]=o=>p.note=o),rows:4,placeholder:"مثلاً سایز یا جزئیات سفارش"},null,8,["value"])]),_:1}),t[15]||(t[15]=e("button",{type:"submit",class:"sheet__cta"},"ثبت توضیحات",-1))]),_:1},8,["model"])])]),_:1},8,["visible"])):I("",!0),n(D,{show:s.notify,"onUpdate:show":t[5]||(t[5]=o=>s.notify=o),art:"order",title:"آیا مطمئن به ثبت سفارش هستید؟",description:"پس از ثبت، وضعیت سفارش را می توانید از بخش سفارش ها پیگیری کنید.","confirm-text":"بله","cancel-text":"بی خیال",onConfirm:C},null,8,["show"]),n(D,{show:y.value,"onUpdate:show":t[6]||(t[6]=o=>y.value=o),art:"login",title:"برای ثبت سفارش وارد شوید",description:"برای ثبت سفارش ابتدا باید وارد حساب کاربری خود شوید. سبد خرید شما حفظ می شود.","confirm-text":"ورود/ثبت نام","cancel-text":"بیخیال",onConfirm:t[7]||(t[7]=o=>a(l).push({name:"login"}))},null,8,["show"])])}}}),Wt=L(Nt,[["__scopeId","data-v-f2959d4b"]]);export{Wt as default}; diff --git a/apps/user-app-v2/dist/assets/CartView-yrzTKQ4M.css b/apps/user-app-v2/dist/assets/CartView-yrzTKQ4M.css deleted file mode 100644 index bccf197..0000000 --- a/apps/user-app-v2/dist/assets/CartView-yrzTKQ4M.css +++ /dev/null @@ -1 +0,0 @@ -.ci[data-v-7fb07fff]{display:flex;gap:14px;padding:16px 2px;background:transparent}.ci__art[data-v-7fb07fff]{flex:0 0 84px;width:84px;height:84px;display:flex;align-items:center;justify-content:center;border-radius:13px;overflow:hidden;background:#f4f5f6}.ci__art img[data-v-7fb07fff]{width:90px;height:90px;-o-object-fit:contain;object-fit:contain;-o-object-position:center;object-position:center;display:block}.ci__artEmpty[data-v-7fb07fff]{width:100%;height:100%;display:grid;place-items:center;color:#8a909c}.ci__main[data-v-7fb07fff]{flex:1;min-width:0}.ci__title[data-v-7fb07fff]{margin:0;font-size:13px;font-weight:700;color:#14161a;line-height:1.6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ci__meta[data-v-7fb07fff]{display:flex;align-items:center;gap:7px;padding-top:5px}.ci__weight[data-v-7fb07fff]{font-size:11.5px;font-weight:700;color:#22262e}.ci__wage[data-v-7fb07fff]{font-size:10.5px;color:#8a909c;padding-inline-start:7px;border-inline-start:1px solid #ECEDEF}.ci__row[data-v-7fb07fff]{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:10px}.ci__qty[data-v-7fb07fff]{display:inline-flex;align-items:center;gap:4px;padding:3px;border-radius:999px;background:#f4f5f6;border:1px solid #ECEDEF}.ci__qtyBtn[data-v-7fb07fff]{width:27px;height:27px;border:0;cursor:pointer;border-radius:50%;display:grid;place-items:center;color:#22262e;background:#fff;transition:transform .15s ease,color .15s ease}.ci__qtyBtn--danger[data-v-7fb07fff]{color:#7a1b33}.ci__qtyBtn[data-v-7fb07fff]:active{transform:scale(.9)}.ci__qtyValue[data-v-7fb07fff]{min-width:22px;text-align:center;font-size:12.5px;font-weight:700;color:#14161a}.ci__note[data-v-7fb07fff]{display:inline-flex;align-items:center;gap:5px;border:0;background:none;cursor:pointer;padding:0;font-family:inherit;font-size:11.5px;font-weight:700;color:#7a1b33;white-space:nowrap}.ci__noteText[data-v-7fb07fff]{margin:8px 0 0;padding:8px 10px;border-radius:11px;background:#f4f5f6;font-size:11.5px;line-height:1.7;color:#5b616e}.cart[data-v-b9a90729]{background:#fff;min-height:100vh}.cart__body[data-v-b9a90729]{padding-top:76px;padding-bottom:150px}.cart__items[data-v-b9a90729]{display:flex;flex-direction:column;padding-top:8px}.cart__row+.cart__row[data-v-b9a90729]{border-top:1px solid #ECEDEF}.cart__row[data-v-b9a90729]{opacity:0;transform:translate3d(0,12px,0) scale(.98);will-change:transform,opacity}.is-revealed .cart__row[data-v-b9a90729]{opacity:1;transform:translateZ(0) scale(1);transition:opacity .62s cubic-bezier(.32,.72,0,1) var(--reveal-delay, 0ms),transform .62s cubic-bezier(.32,.72,0,1) var(--reveal-delay, 0ms)}@media (prefers-reduced-motion: reduce){.cart__row[data-v-b9a90729]{opacity:1;transform:none}.is-revealed .cart__row[data-v-b9a90729]{transition:none}}.cart__empty[data-v-b9a90729]{margin-top:8px;padding:38px 20px;border:1px dashed #ECEDEF;border-radius:18px;display:flex;flex-direction:column;align-items:center;gap:10px;color:#8a909c}.cart__empty p[data-v-b9a90729]{margin:0;font-size:12.5px}.cart__emptyCta[data-v-b9a90729]{margin-top:4px;padding:9px 18px;border:0;cursor:pointer;border-radius:999px;font-family:inherit;font-size:12.5px;font-weight:700;color:#fff;background:#14161a}.cart__done[data-v-b9a90729]{margin-top:20px;padding:34px 22px;border:1px solid #ECEDEF;border-radius:20px;display:flex;flex-direction:column;align-items:center;text-align:center}.cart__doneIcon[data-v-b9a90729]{width:56px;height:56px;border-radius:50%;display:grid;place-items:center;color:#7a1b33;background:#fbf2f4}.cart__doneTitle[data-v-b9a90729]{margin:14px 0 0;font-size:15px;font-weight:800;color:#14161a}.cart__doneSub[data-v-b9a90729]{margin:8px 0 0;font-size:12.5px;color:#5b616e}.cart__doneSub b[data-v-b9a90729]{color:#14161a}.cart__doneHint[data-v-b9a90729]{margin:5px 0 0;font-size:11.5px;color:#8a909c}.cart__doneCta[data-v-b9a90729]{margin-top:18px;padding:11px 22px;border:0;cursor:pointer;border-radius:999px;font-family:inherit;font-size:12.5px;font-weight:700;color:#fff;background:#14161a}.cart__bar[data-v-b9a90729]{position:fixed;bottom:0;left:0;right:0;z-index:5;background:#ffffffeb;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border-top:1px solid #ECEDEF;padding-bottom:66px}.cart__barInner[data-v-b9a90729]{max-width:768px;margin:0 auto;padding:12px 16px;display:flex;align-items:center;justify-content:space-between;gap:14px}.cart__total[data-v-b9a90729]{display:flex;flex-direction:column;gap:3px}.cart__totalLabel[data-v-b9a90729]{font-size:11px;color:#8a909c}.cart__totalValue[data-v-b9a90729]{font-size:16px;font-weight:800;color:#14161a}.cart__totalValue i[data-v-b9a90729]{font-style:normal;font-size:11px;font-weight:600;color:#8a909c;padding-inline-start:3px}.cart__submit[data-v-b9a90729]{flex:1;max-width:200px;padding:13px 18px;border:0;cursor:pointer;border-radius:14px;font-family:inherit;font-size:13px;font-weight:700;color:#fff;background:#14161a;transition:transform .15s ease}.cart__submit[data-v-b9a90729]:active{transform:scale(.98)}.sheet[data-v-b9a90729]{padding:18px 16px 22px}.sheet__title[data-v-b9a90729]{margin:0 0 14px;font-size:13.5px;font-weight:800;color:#14161a}.sheet__cta[data-v-b9a90729]{width:100%;padding:12px 18px;border:0;cursor:pointer;border-radius:14px;font-family:inherit;font-size:13px;font-weight:700;color:#fff;background:#14161a} diff --git a/apps/user-app-v2/dist/assets/ChildOrdersView-BSUeH1Jr.css b/apps/user-app-v2/dist/assets/ChildOrdersView-BSUeH1Jr.css new file mode 100644 index 0000000..1ae7473 --- /dev/null +++ b/apps/user-app-v2/dist/assets/ChildOrdersView-BSUeH1Jr.css @@ -0,0 +1 @@ +.cho__barExtra[data-v-24fb71cb]{padding:0 16px 12px}.cho__body[data-v-24fb71cb]{padding-top:132px;padding-bottom:90px}.cho__list[data-v-24fb71cb]{display:flex;flex-direction:column;padding-top:8px}.cho__card[data-v-24fb71cb]{padding:18px 2px;background:transparent;border:none;border-bottom:1px solid var(--c-hairline);cursor:pointer}.cho__card[data-v-24fb71cb]:last-child{border-bottom:none}.cho__card[data-v-24fb71cb]:active{opacity:.75}.cho__top[data-v-24fb71cb]{display:flex;justify-content:space-between;gap:12px}.cho__right[data-v-24fb71cb]{display:flex;flex-direction:column;align-items:flex-end;gap:8px}.cho__num[data-v-24fb71cb]{font-size:15px;font-weight:700;margin-bottom:10px}.cho__muted[data-v-24fb71cb]{color:var(--c-inkFaint);font-weight:500;margin-left:4px}.cho__meta[data-v-24fb71cb]{display:flex;align-items:baseline;gap:4px}.cho__strong[data-v-24fb71cb]{font-size:15px;font-weight:700}.cho__unit[data-v-24fb71cb]{font-size:12px;color:var(--c-inkFaint)}.cho__status[data-v-24fb71cb]{padding:5px 14px;border-radius:999px;font-size:11.5px;font-weight:600;color:#06b6d4;background:#06b6d41f;white-space:nowrap}.cho__divider[data-v-24fb71cb]{height:10px}.cho__bottom[data-v-24fb71cb]{display:flex;justify-content:space-between;align-items:center}.cho__customer[data-v-24fb71cb]{font-size:13.5px;font-weight:600;color:var(--c-inkMuted)}.cho__more[data-v-24fb71cb],.cho__sentinel[data-v-24fb71cb]{padding:12px 0;text-align:center;font-size:12px;color:var(--c-inkFaint)}.cho__empty[data-v-24fb71cb]{margin-top:8px;padding:34px 20px;border:1px dashed var(--c-hairline);border-radius:18px;display:flex;flex-direction:column;align-items:center;gap:10px;color:var(--c-inkFaint)}.cho__empty p[data-v-24fb71cb]{margin:0;font-size:12.5px}.cho__retry[data-v-24fb71cb]{padding:8px 18px;border-radius:999px;border:1px solid var(--c-hairline);background:var(--c-canvas);font-family:inherit;font-size:12px;font-weight:600;cursor:pointer}.cho__detail[data-v-24fb71cb]{padding:20px 16px 24px}.cho__detailTitle[data-v-24fb71cb]{margin:0 0 16px;font-size:17px;font-weight:700}.cho__rows[data-v-24fb71cb]{margin:0;display:flex;flex-direction:column}.cho__row[data-v-24fb71cb]{display:flex;justify-content:space-between;align-items:center;padding:13px 2px;border-bottom:1px solid var(--c-hairline)}.cho__row[data-v-24fb71cb]:last-child{border-bottom:none}.cho__row dt[data-v-24fb71cb]{font-size:13px;color:var(--c-inkFaint)}.cho__row dd[data-v-24fb71cb]{margin:0;font-size:14px;font-weight:600}.cho__close[data-v-24fb71cb]{margin-top:18px;width:100%;padding:13px;border:none;border-radius:14px;background:var(--c-ink);color:var(--c-onInk);font-family:inherit;font-size:14px;font-weight:700;cursor:pointer} diff --git a/apps/user-app-v2/dist/assets/ChildOrdersView-C9qT9wGg.js b/apps/user-app-v2/dist/assets/ChildOrdersView-C9qT9wGg.js new file mode 100644 index 0000000..39768d9 --- /dev/null +++ b/apps/user-app-v2/dist/assets/ChildOrdersView-C9qT9wGg.js @@ -0,0 +1 @@ +import{d as R,o as U,a as $,c as d,p as n,z as i,J as j,m as v,g as a,s as M,f as u,b as s,F as O,r as T,e as y,I as z,t as l,B as A,N as J,_ as q}from"./index-BAr1mMLP.js";import{P as G}from"./PageBar-B1ks8U8i.js";import{S as H}from"./SearchInput-vVDQz-rO.js";import{j as K}from"./filters-Cm9yhZZ9.js";import{D as Q}from"./index-DWuFFuVX.js";import{P as W,L as I}from"./index-DPSZMLNJ.js";import"./KeyCode-BMdFtCT-.js";import"./classCallCheck-DDMOgDz1.js";import"./raf-nDFcuFT6.js";const X={class:"cho"},Y={class:"cho__barExtra"},Z={class:"cho__list"},ss=["onClick"],es={class:"cho__top"},ts={class:"cho__left"},os={class:"cho__num"},ns={class:"cho__meta"},ls={class:"cho__strong"},as={class:"cho__right"},is={class:"cho__meta"},rs={class:"cho__strong"},ds={class:"cho__bottom"},us={class:"cho__customer"},cs={key:0,class:"cho__more"},_s={key:1,class:"cho__empty"},vs={key:2,class:"cho__empty"},fs={key:0,class:"cho__detail"},hs={class:"cho__detailTitle"},ms={class:"cho__rows"},ps={class:"cho__row"},gs={class:"cho__row"},bs={dir:"ltr"},ys={class:"cho__row"},ws={dir:"ltr"},ks={class:"cho__row"},xs={class:"cho__row"},Cs=R({__name:"ChildOrdersView",setup(Ns){const c=a([]),_=a(!1),w=a(!1),p=a(!1),k=a(null),x=a(1),g=a(!0),b=a(!1),r=a(null);function B(t){const e=Number(t??0);return Number.isFinite(e)?e.toFixed(3):"0.000"}async function C(){if(!(_.value||!g.value)){_.value=!0,p.value=!1;try{const t=await M.getExpertChildOrders(x.value,k.value),e=t.rows??[];c.value=[...c.value,...e],e.length<(t.limit??20)?g.value=!1:x.value+=1}catch{p.value=!0,g.value=!1}finally{_.value=!1}}}function P(){c.value=[],x.value=1,g.value=!0,p.value=!1}async function N(){P(),await C()}async function S(t){k.value=t!=null&&t.trim()?t.trim():null,await N()}async function D(){await N(),w.value=!1}function F(t){r.value=t,b.value=!0}const V=a(null);let f=null;return U(async()=>{await C(),typeof IntersectionObserver<"u"&&(f=new IntersectionObserver(t=>{t.some(e=>e.isIntersecting)&&C()}),V.value&&f.observe(V.value))}),$(()=>f==null?void 0:f.disconnect()),(t,e)=>{const E=A("container");return u(),d("div",X,[n(G,{title:"سفارشات مشتریان","back-to":"userPage::hasSubRoute"},{below:i(()=>[s("div",Y,[n(H,{onSearch:S,"place-holder":"جستجو"})])]),_:1}),n(j,{spinning:_.value&&!c.value.length,tip:"درحال دریافت اطلاعات"},{default:i(()=>[n(v(W),{modelValue:w.value,"onUpdate:modelValue":e[0]||(e[0]=o=>w.value=o),onRefresh:D},{pulling:i(()=>[n(v(I),{size:"18"})]),loosing:i(()=>[n(v(I),{size:"18"})]),loading:i(()=>[n(v(I),{size:"18"})]),success:i(()=>[...e[3]||(e[3]=[s("span",null,null,-1)])]),default:i(()=>[n(E,{class:"cho__body"},{default:i(()=>[c.value.length?(u(),d(O,{key:0},[s("div",Z,[(u(!0),d(O,null,T(c.value,o=>{var h,m;return u(),d("article",{key:o.id,class:"cho__card",onClick:L=>F(o)},[s("div",es,[s("div",ts,[s("div",os,[e[4]||(e[4]=s("span",{class:"cho__muted"},"سفارش :",-1)),J(" "+l(o.orderNumber),1)]),s("div",ns,[s("span",ls,l(((h=o.items)==null?void 0:h.length)??0),1),e[5]||(e[5]=s("span",{class:"cho__unit"},"آیتم",-1))])]),s("div",as,[e[7]||(e[7]=s("span",{class:"cho__status"},"تحویل مسئول فروش",-1)),s("div",is,[s("span",rs,l(B(o.w)),1),e[6]||(e[6]=s("span",{class:"cho__unit"},"گرم",-1))])])]),e[8]||(e[8]=s("div",{class:"cho__divider"},null,-1)),s("div",ds,[s("div",us," نام مشتری : "+l(((m=o.customer)==null?void 0:m.name)??"—"),1),n(z,{icon:"vuesax-linear:arrow-left-1",size:"20"})])],8,ss)}),128))]),_.value?(u(),d("div",cs,"در حال دریافت…")):y("",!0)],64)):_.value?y("",!0):(u(),d("section",_s,[n(z,{icon:"vuesax-linear:box",size:"26"}),s("p",null,l(k.value?"سفارشی با این مشخصات پیدا نشد.":"هنوز سفارشی ثبت نشده است."),1)])),p.value?(u(),d("section",vs,[n(z,{icon:"vuesax-linear:danger",size:"26"}),e[9]||(e[9]=s("p",null,"دریافت اطلاعات با خطا روبه‌رو شد.",-1)),s("button",{type:"button",class:"cho__retry",onClick:N},"تلاش دوباره")])):y("",!0),s("div",{ref_key:"sentinel",ref:V,class:"cho__sentinel"},null,512)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["spinning"]),n(v(Q),{open:b.value,"onUpdate:open":e[2]||(e[2]=o=>b.value=o),placement:"bottom",height:"auto",closable:!1,"body-style":{padding:"0"}},{default:i(()=>{var o,h,m;return[r.value?(u(),d("div",fs,[s("h2",hs,l(r.value.orderNumber),1),s("dl",ms,[s("div",ps,[e[10]||(e[10]=s("dt",null,"نام مشتری",-1)),s("dd",null,l(((o=r.value.customer)==null?void 0:o.name)??"—"),1)]),s("div",gs,[e[11]||(e[11]=s("dt",null,"شماره تماس",-1)),s("dd",bs,l(((h=r.value.customer)==null?void 0:h.mobile)??"—"),1)]),s("div",ys,[e[12]||(e[12]=s("dt",null,"وزن کل",-1)),s("dd",ws,l(B(r.value.w))+" گرم",1)]),s("div",ks,[e[13]||(e[13]=s("dt",null,"تعداد آیتم‌ها",-1)),s("dd",null,l(((m=r.value.items)==null?void 0:m.length)??0),1)]),s("div",xs,[e[14]||(e[14]=s("dt",null,"تاریخ ثبت",-1)),s("dd",null,l(v(K)(r.value.createdAt)),1)]),e[15]||(e[15]=s("div",{class:"cho__row"},[s("dt",null,"وضعیت"),s("dd",null,"تحویل مسئول فروش")],-1))]),s("button",{type:"button",class:"cho__close",onClick:e[1]||(e[1]=L=>b.value=!1)},"بستن")])):y("",!0)]}),_:1},8,["open"])])}}}),Es=q(Cs,[["__scopeId","data-v-24fb71cb"]]);export{Es as default}; diff --git a/apps/user-app-v2/dist/assets/CollectionView-Bm2v65eC.js b/apps/user-app-v2/dist/assets/CollectionView-Bm2v65eC.js new file mode 100644 index 0000000..8273714 --- /dev/null +++ b/apps/user-app-v2/dist/assets/CollectionView-Bm2v65eC.js @@ -0,0 +1 @@ +import{d as f,o as v,s as g,c as s,p as e,z as u,J as y,g as d,h as _,f as t,F as P,r as k,I as C,b as h,e as x,B,S as b,j as V,_ as w}from"./index-BAr1mMLP.js";import{P as I}from"./PageBar-B1ks8U8i.js";import{S as N}from"./SectionHead-DadL6umU.js";import{P as S}from"./ProductCard-4TPJHHsT.js";const z={class:"coll"},F={key:0,class:"coll__grid"},j={key:1,class:"coll__empty"},q=f({__name:"CollectionView",setup(E){const l=b(),o=d(!1),n=d([]),p=_(()=>l.query.page||"مجموعه"),c=_(()=>n.value.filter(i=>i.collections.some(a=>a.collectionId===l.params.id)));return v(async()=>{o.value=!0;try{n.value=await g.listProducts()}finally{o.value=!1}}),(i,a)=>{const m=B("container");return t(),s("div",z,[e(I,{title:p.value,"back-to":"search"},null,8,["title"]),e(y,{spinning:o.value,tip:"درحال دریافت اطلاعات"},{default:u(()=>[e(m,{class:"coll__body"},{default:u(()=>[e(N,{title:"محصولات این مجموعه",subtitle:"برای دیدن جزئیات، روی محصول ضربه بزنید"}),c.value.length?(t(),s("div",F,[(t(!0),s(P,null,k(c.value,r=>(t(),V(S,{key:r.id,value:r},null,8,["value"]))),128))])):o.value?x("",!0):(t(),s("section",j,[e(C,{icon:"vuesax-linear:box",size:"26"}),a[0]||(a[0]=h("p",null,"در این مجموعه محصولی ثبت نشده است.",-1))]))]),_:1})]),_:1},8,["spinning"])])}}}),R=w(q,[["__scopeId","data-v-7e172d86"]]);export{R as default}; diff --git a/apps/user-app-v2/dist/assets/CollectionView-CP2W-zpK.css b/apps/user-app-v2/dist/assets/CollectionView-CP2W-zpK.css deleted file mode 100644 index 7cb12f2..0000000 --- a/apps/user-app-v2/dist/assets/CollectionView-CP2W-zpK.css +++ /dev/null @@ -1 +0,0 @@ -.coll[data-v-6fdc1b6f]{background:#fff;min-height:100vh}.coll__body[data-v-6fdc1b6f]{padding-top:76px;padding-bottom:90px}.coll__grid[data-v-6fdc1b6f]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.coll__empty[data-v-6fdc1b6f]{margin-top:8px;padding:34px 20px;border:1px dashed #ECEDEF;border-radius:18px;display:flex;flex-direction:column;align-items:center;gap:10px;color:#8a909c}.coll__empty p[data-v-6fdc1b6f]{margin:0;font-size:12.5px} diff --git a/apps/user-app-v2/dist/assets/CollectionView-CexNr-aN.js b/apps/user-app-v2/dist/assets/CollectionView-CexNr-aN.js deleted file mode 100644 index 5d3e234..0000000 --- a/apps/user-app-v2/dist/assets/CollectionView-CexNr-aN.js +++ /dev/null @@ -1 +0,0 @@ -import{d as f,o as v,c as s,l as e,q as u,g as m,h as p,f as o,F as g,r as y,I as P,b as k,e as C,s as b,H as h,j as x,_ as B}from"./index-CZjgV-Yn.js";import{P as V}from"./PageBar-Bkc2Ht1O.js";import{a as w}from"./Spinner.vue_vue_type_style_index_0_lang-ghXHCVpI.js";import{S as I}from"./SectionHead-CiwUIGKe.js";import{P as N}from"./ProductCard-Cd-G3dvx.js";import{a as q}from"./client-WIBW0tF5.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./SingleProduct-DS8wIDwN.js";import"./NotifyVant.vue_vue_type_script_setup_true_lang-CY4DS_6T.js";import"./DialogVant.vue_vue_type_style_index_0_lang-DKsdrzNc.js";import"./cartStore-CoSoowuC.js";import"./dialogEmpty1-Caw7F5KL.js";import"./index-Ca8ka09f.js";import"./classCallCheck-BSDY9VEy.js";const F={class:"coll"},H={key:0,class:"coll__grid"},S={key:1,class:"coll__empty"},j=f({__name:"CollectionView",setup(z){const l=h(),t=m(!1),n=m([]),d=p(()=>l.query.page||"مجموعه"),r=p(()=>n.value.filter(c=>c.collections.some(a=>a.collectionId===l.params.id)));return v(async()=>{t.value=!0;try{n.value=await q.listProducts()}finally{t.value=!1}}),(c,a)=>{const _=b("container");return o(),s("div",F,[e(V,{title:d.value,"back-to":"search"},null,8,["title"]),e(w,{spinning:t.value,tip:"درحال دریافت اطلاعات"},{default:u(()=>[e(_,{class:"coll__body"},{default:u(()=>[e(I,{title:"محصولات این مجموعه",subtitle:"برای دیدن جزئیات، روی محصول ضربه بزنید"}),r.value.length?(o(),s("div",H,[(o(!0),s(g,null,y(r.value,i=>(o(),x(N,{key:i.id,value:i},null,8,["value"]))),128))])):t.value?C("",!0):(o(),s("section",S,[e(P,{icon:"vuesax-linear:box",size:"26"}),a[0]||(a[0]=k("p",null,"در این مجموعه محصولی ثبت نشده است.",-1))]))]),_:1})]),_:1},8,["spinning"])])}}}),W=B(j,[["__scopeId","data-v-6fdc1b6f"]]);export{W as default}; diff --git a/apps/user-app-v2/dist/assets/CollectionView-hOc6F2Q6.css b/apps/user-app-v2/dist/assets/CollectionView-hOc6F2Q6.css new file mode 100644 index 0000000..51a0e45 --- /dev/null +++ b/apps/user-app-v2/dist/assets/CollectionView-hOc6F2Q6.css @@ -0,0 +1 @@ +.coll[data-v-7e172d86]{background:var(--c-page);min-height:100vh}.coll__body[data-v-7e172d86]{padding-top:76px;padding-bottom:90px}.coll__grid[data-v-7e172d86]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.coll__empty[data-v-7e172d86]{margin-top:8px;padding:34px 20px;border:1px dashed var(--c-hairline);border-radius:18px;display:flex;flex-direction:column;align-items:center;gap:10px;color:var(--c-inkFaint)}.coll__empty p[data-v-7e172d86]{margin:0;font-size:12.5px} diff --git a/apps/user-app-v2/dist/assets/CompleteProfileView-Bbq7Qgyl.js b/apps/user-app-v2/dist/assets/CompleteProfileView-Bbq7Qgyl.js new file mode 100644 index 0000000..a5ae55a --- /dev/null +++ b/apps/user-app-v2/dist/assets/CompleteProfileView-Bbq7Qgyl.js @@ -0,0 +1 @@ +import{d as B,f as r,c,i as $,b as d,p as n,I as w,t as h,e as x,g as o,s as P,_ as I,z as C,J as S,P as U,aN as z,K as D,B as V,C as N,U as R}from"./index-BAr1mMLP.js";import{P as T}from"./PageBar-B1ks8U8i.js";const j=["disabled"],E=["src"],L={key:1,class:"siu__icon"},M={class:"siu__text"},A={key:2,class:"siu__badge"},J={key:0,class:"siu__error"},K=8*1024*1024,O=B({__name:"SingleImageUploader",props:{uploadText:{},purpose:{}},emits:["done"],setup(g,{emit:b}){const a=g,_=b,l=o(null),i=o(!1),t=o(null),u=o(null),m=o(null);async function s(v){var f;const e=v.target,p=(f=e.files)==null?void 0:f[0];if(e.value="",!!p){if(t.value=null,p.size>K){t.value="حجم فایل بیش از حد مجاز است (۸ مگابایت)";return}i.value=!0;try{const k=await P.uploadDocument(p,a.purpose);u.value=k.id,m.value=p.type.startsWith("image/")?URL.createObjectURL(p):null,_("done",k.id)}catch{t.value="بارگذاری انجام نشد. دوباره تلاش کنید.",u.value=null,m.value=null}finally{i.value=!1}}}return(v,e)=>(r(),c("div",{class:$(["siu",{"is-done":!!u.value,"is-error":!!t.value}])},[d("input",{ref_key:"input",ref:l,type:"file",accept:"image/jpeg,image/png,image/webp,application/pdf",class:"siu__input",onChange:s},null,544),d("button",{type:"button",class:"siu__box",disabled:i.value,onClick:e[0]||(e[0]=p=>{var f;return(f=l.value)==null?void 0:f.click()})},[m.value?(r(),c("img",{key:0,src:m.value,class:"siu__preview",alt:""},null,8,E)):(r(),c("span",L,[n(w,{icon:i.value?"vuesax-linear:refresh":"vuesax-linear:gallery-add",size:"26"},null,8,["icon"])])),d("span",M,h(i.value?"در حال بارگذاری…":u.value?"تغییر تصویر":g.uploadText),1),u.value&&!i.value?(r(),c("span",A,[n(w,{icon:"vuesax-linear:tick-circle",size:"16"})])):x("",!0)],8,j),t.value?(r(),c("p",J,h(t.value),1)):x("",!0)],2))}}),y=I(O,[["__scopeId","data-v-3a42e270"]]),W={class:"cpf"},X={key:0,class:"cpf__error"},Y=["disabled"],q=B({__name:"CompleteProfileView",setup(g){const b=N(),a=D({business_license_image_id:null,shop_image_id:null,ncode_image_id:null}),_=o(!1),l=o(!1),i=o(null);async function t(){if(i.value=null,!a.business_license_image_id||!a.shop_image_id||!a.ncode_image_id){R.warning("لطفا تمامی عکس های خواسته شده را آپلود کنید");return}_.value=!0;try{await P.completeProfile({business_license_image_id:a.business_license_image_id,shop_image_id:a.shop_image_id,ncode_image_id:a.ncode_image_id}),l.value=!0}catch{i.value="ثبت اطلاعات انجام نشد. دوباره تلاش کنید."}finally{_.value=!1}}function u(){l.value=!1,b.push({name:"home"})}return(m,s)=>{const v=V("container");return r(),c("div",W,[n(T,{title:"تکمیل پروفایل","back-to":"userPage::hasSubRoute"}),n(S,{spinning:_.value,tip:"در حال ثبت اطلاعات"},{default:C(()=>[n(v,{class:"cpf__body"},{default:C(()=>[s[4]||(s[4]=d("p",{class:"cpf__lead"}," برای تکمیل پروفایل، سه مدرک زیر را بارگذاری کنید. ",-1)),d("form",{class:"cpf__form",onSubmit:z(t,["prevent"])},[n(y,{"upload-text":"بارگذاری عکس جواز کسب",purpose:"business-license",onDone:s[0]||(s[0]=e=>a.business_license_image_id=e)}),n(y,{"upload-text":"بارگذاری عکس سردر مغازه",purpose:"shop-image",onDone:s[1]||(s[1]=e=>a.shop_image_id=e)}),n(y,{"upload-text":"بارگذاری عکس کارت ملی",purpose:"national-card",onDone:s[2]||(s[2]=e=>a.ncode_image_id=e)}),i.value?(r(),c("p",X,h(i.value),1)):x("",!0),d("button",{type:"submit",class:"cpf__submit",disabled:_.value}," بارگذاری اطلاعات ",8,Y)],32)]),_:1})]),_:1},8,["spinning"]),n(U,{show:l.value,"onUpdate:show":s[3]||(s[3]=e=>l.value=e),art:"success",title:"تکمیل اطلاعات شما با موفقیت انجام شد.",description:"مدارک شما با موفقیت بارگذاری شد.","confirm-text":"متوجه شدم","close-on-click-overlay":!1,onConfirm:u},null,8,["show"])])}}}),H=I(q,[["__scopeId","data-v-630e0720"]]);export{H as default}; diff --git a/apps/user-app-v2/dist/assets/CompleteProfileView-Cy-typLQ.css b/apps/user-app-v2/dist/assets/CompleteProfileView-Cy-typLQ.css new file mode 100644 index 0000000..21b5e08 --- /dev/null +++ b/apps/user-app-v2/dist/assets/CompleteProfileView-Cy-typLQ.css @@ -0,0 +1 @@ +.siu__input[data-v-3a42e270]{display:none}.siu__box[data-v-3a42e270]{position:relative;width:100%;padding:18px 2px;display:flex;flex-direction:row-reverse;align-items:center;justify-content:flex-end;gap:12px;border:none;border-bottom:1px solid var(--c-hairline);background:transparent;font-family:inherit;text-align:right;cursor:pointer;overflow:hidden}.siu__box[data-v-3a42e270]:disabled{cursor:progress}.siu__box[data-v-3a42e270]:active{opacity:.75}.is-done .siu__box[data-v-3a42e270]{border-bottom-color:var(--c-green)}.is-error .siu__box[data-v-3a42e270]{border-bottom-color:var(--c-red)}.siu__preview[data-v-3a42e270]{width:46px;height:46px;flex:0 0 auto;-o-object-fit:cover;object-fit:cover;border-radius:12px;order:-1}.siu__icon[data-v-3a42e270]{display:flex;flex:0 0 auto;align-items:center;justify-content:center;width:46px;height:46px;border-radius:12px;background:var(--c-canvasSoft);color:var(--c-inkMuted);order:-1}.siu__text[data-v-3a42e270]{flex:1;font-size:13.5px;font-weight:600;color:var(--c-ink)}.siu__badge[data-v-3a42e270]{flex:0 0 auto;display:flex;color:var(--c-green)}.siu__error[data-v-3a42e270]{margin:7px 2px 0;font-size:12px;color:var(--c-red)}.cpf__body[data-v-630e0720]{padding-top:84px;padding-bottom:110px}.cpf__lead[data-v-630e0720]{margin:4px 0 6px;font-size:13px;color:var(--c-inkMuted)}.cpf__form[data-v-630e0720]{display:flex;flex-direction:column}.cpf__error[data-v-630e0720]{margin:12px 2px 0;font-size:12.5px;color:var(--c-red)}.cpf__submit[data-v-630e0720]{position:fixed;left:16px;right:16px;bottom:20px;z-index:20;max-width:736px;margin:0 auto;padding:15px;border:none;border-radius:999px;background:var(--c-wine);color:#fff;font-family:inherit;font-size:15px;font-weight:700;cursor:pointer}.cpf__submit[data-v-630e0720]:disabled{opacity:.6;cursor:progress} diff --git a/apps/user-app-v2/dist/assets/CustomerChoiceView-AilyPwLn.js b/apps/user-app-v2/dist/assets/CustomerChoiceView-AilyPwLn.js new file mode 100644 index 0000000..41f66b7 --- /dev/null +++ b/apps/user-app-v2/dist/assets/CustomerChoiceView-AilyPwLn.js @@ -0,0 +1 @@ +import{d as S,o as B,c,p as o,z as i,J as N,m as u,g as d,s as P,f as r,b as s,F as D,r as F,I as v,t as l,e as g,B as I,i as E,_ as L}from"./index-BAr1mMLP.js";import{P as R}from"./PageBar-B1ks8U8i.js";import{S as $}from"./SearchInput-vVDQz-rO.js";import{D as U}from"./index-DWuFFuVX.js";import{P as J,L as w}from"./index-DPSZMLNJ.js";import"./KeyCode-BMdFtCT-.js";import"./classCallCheck-DDMOgDz1.js";import"./raf-nDFcuFT6.js";const M={class:"cch"},O={class:"cch__barExtra"},T={key:0,class:"cch__list"},j=["onClick"],q={class:"cch__head"},A={class:"cch__name"},G={class:"cch__facts"},H={class:"cch__fact"},K={dir:"ltr"},Q={class:"cch__fact"},W={dir:"ltr"},X={key:0,class:"cch__fact"},Y={key:1,class:"cch__empty"},Z={key:2,class:"cch__empty"},ss={key:0,class:"cch__detail"},es={class:"cch__detailTitle"},ts={class:"cch__rows"},os={class:"cch__row"},ls={dir:"ltr"},as={class:"cch__row"},ns={dir:"ltr"},is={class:"cch__row"},cs={class:"cch__row"},rs={class:"cch__row"},ds={dir:"ltr"},_s={class:"cch__row"},us={dir:"ltr"},vs={class:"cch__row"},hs=S({__name:"CustomerChoiceView",setup(ps){const _=d([]),h=d(!1),b=d(!1),p=d(!1),y=d(null),f=d(!1),a=d(null);function C(n){const e=Number(n??0);return Number.isFinite(e)?e.toFixed(3):"0.000"}async function m(){h.value=!0,p.value=!1;try{_.value=await P.getExpertCustomers(y.value)}catch{p.value=!0,_.value=[]}finally{h.value=!1}}async function k(n){y.value=n!=null&&n.trim()?n.trim():null,await m()}async function x(){await m(),b.value=!1}function z(n){a.value=n,f.value=!0}return B(m),(n,e)=>{const V=I("container");return r(),c("div",M,[o(R,{title:"لیست مشتریان","back-to":"userPage::hasSubRoute"},{below:i(()=>[s("div",O,[o($,{onSearch:k,"place-holder":"جستجو"})])]),_:1}),o(N,{spinning:h.value&&!_.value.length,tip:"درحال دریافت اطلاعات"},{default:i(()=>[o(u(J),{modelValue:b.value,"onUpdate:modelValue":e[0]||(e[0]=t=>b.value=t),onRefresh:x},{pulling:i(()=>[o(u(w),{size:"18"})]),loosing:i(()=>[o(u(w),{size:"18"})]),loading:i(()=>[o(u(w),{size:"18"})]),success:i(()=>[...e[3]||(e[3]=[s("span",null,null,-1)])]),default:i(()=>[o(V,{class:"cch__body"},{default:i(()=>[_.value.length?(r(),c("div",T,[(r(!0),c(D,null,F(_.value,t=>(r(),c("article",{key:t.id,class:"cch__card",onClick:fs=>z(t)},[s("div",q,[s("h3",A,l(t.name),1),s("span",{class:E(["cch__state",t.active===1?"is-on":"is-off"])},l(t.active===1?"فعال":"غیرفعال"),3)]),s("div",G,[s("div",H,[o(v,{icon:"vuesax-linear:mobile",size:"15"}),s("span",K,l(t.mobile||"—"),1)]),s("div",Q,[o(v,{icon:"vuesax-linear:call",size:"15"}),s("span",W,l(t.phone||"—"),1)]),t.store_name?(r(),c("div",X,[o(v,{icon:"vuesax-linear:shop",size:"15"}),s("span",null,l(t.store_name),1)])):g("",!0)])],8,j))),128))])):!h.value&&!p.value?(r(),c("section",Y,[o(v,{icon:"vuesax-linear:profile-2user",size:"26"}),s("p",null,l(y.value?"مشتری با این مشخصات پیدا نشد.":"هنوز مشتری‌ای به شما معرفی نشده است."),1)])):g("",!0),p.value?(r(),c("section",Z,[o(v,{icon:"vuesax-linear:danger",size:"26"}),e[4]||(e[4]=s("p",null,"دریافت اطلاعات با خطا روبه‌رو شد.",-1)),s("button",{type:"button",class:"cch__retry",onClick:m},"تلاش دوباره")])):g("",!0)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["spinning"]),o(u(U),{open:f.value,"onUpdate:open":e[2]||(e[2]=t=>f.value=t),placement:"bottom",height:"auto",closable:!1,"body-style":{padding:"0"}},{default:i(()=>[a.value?(r(),c("div",ss,[s("h2",es,l(a.value.name),1),s("dl",ts,[s("div",os,[e[5]||(e[5]=s("dt",null,"موبایل",-1)),s("dd",ls,l(a.value.mobile||"—"),1)]),s("div",as,[e[6]||(e[6]=s("dt",null,"تلفن",-1)),s("dd",ns,l(a.value.phone||"—"),1)]),s("div",is,[e[7]||(e[7]=s("dt",null,"نام مغازه",-1)),s("dd",null,l(a.value.store_name||"—"),1)]),s("div",cs,[e[8]||(e[8]=s("dt",null,"نام پاساژ",-1)),s("dd",null,l(a.value.pasazh_name||"—"),1)]),s("div",rs,[e[9]||(e[9]=s("dt",null,"سقف اعتبار",-1)),s("dd",ds,l(C(a.value.gram_level))+" گرم",1)]),s("div",_s,[e[10]||(e[10]=s("dt",null,"بدهی گرمی",-1)),s("dd",us,l(C(a.value.remain))+" گرم",1)]),s("div",vs,[e[11]||(e[11]=s("dt",null,"وضعیت",-1)),s("dd",null,l(a.value.active===1?"فعال":"غیرفعال"),1)])]),s("button",{type:"button",class:"cch__close",onClick:e[1]||(e[1]=t=>f.value=!1)},"بستن")])):g("",!0)]),_:1},8,["open"])])}}}),zs=L(hs,[["__scopeId","data-v-b1fb7f3c"]]);export{zs as default}; diff --git a/apps/user-app-v2/dist/assets/CustomerChoiceView-H1FeybTn.css b/apps/user-app-v2/dist/assets/CustomerChoiceView-H1FeybTn.css new file mode 100644 index 0000000..72c479b --- /dev/null +++ b/apps/user-app-v2/dist/assets/CustomerChoiceView-H1FeybTn.css @@ -0,0 +1 @@ +.cch__barExtra[data-v-b1fb7f3c]{padding:0 16px 12px}.cch__body[data-v-b1fb7f3c]{padding-top:132px;padding-bottom:90px}.cch__list[data-v-b1fb7f3c]{display:flex;flex-direction:column;padding-top:8px}.cch__card[data-v-b1fb7f3c]{padding:18px 2px;background:transparent;border:none;border-bottom:1px solid var(--c-hairline);cursor:pointer}.cch__card[data-v-b1fb7f3c]:last-child{border-bottom:none}.cch__card[data-v-b1fb7f3c]:active{opacity:.75}.cch__head[data-v-b1fb7f3c]{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px}.cch__name[data-v-b1fb7f3c]{margin:0;font-size:15.5px;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cch__state[data-v-b1fb7f3c]{flex:0 0 auto;padding:4px 12px;border-radius:999px;font-size:11.5px;font-weight:600}.cch__state.is-on[data-v-b1fb7f3c]{color:var(--c-green);background:rgb(var(--c-green-rgb) / 14%)}.cch__state.is-off[data-v-b1fb7f3c]{color:var(--c-red);background:rgb(var(--c-red-rgb) / 12%)}.cch__facts[data-v-b1fb7f3c]{display:flex;flex-direction:column;gap:7px}.cch__fact[data-v-b1fb7f3c]{display:flex;align-items:center;gap:7px;font-size:13px;font-weight:600;color:var(--c-inkFaint)}.cch__empty[data-v-b1fb7f3c]{margin-top:8px;padding:34px 20px;border:1px dashed var(--c-hairline);border-radius:18px;display:flex;flex-direction:column;align-items:center;gap:10px;color:var(--c-inkFaint)}.cch__empty p[data-v-b1fb7f3c]{margin:0;font-size:12.5px}.cch__retry[data-v-b1fb7f3c]{padding:8px 18px;border-radius:999px;border:1px solid var(--c-hairline);background:var(--c-canvas);font-family:inherit;font-size:12px;font-weight:600;cursor:pointer}.cch__detail[data-v-b1fb7f3c]{padding:20px 16px 24px}.cch__detailTitle[data-v-b1fb7f3c]{margin:0 0 16px;font-size:17px;font-weight:700}.cch__rows[data-v-b1fb7f3c]{margin:0;display:flex;flex-direction:column}.cch__row[data-v-b1fb7f3c]{display:flex;justify-content:space-between;align-items:center;padding:13px 2px;border-bottom:1px solid var(--c-hairline)}.cch__row[data-v-b1fb7f3c]:last-child{border-bottom:none}.cch__row dt[data-v-b1fb7f3c]{font-size:13px;color:var(--c-inkFaint)}.cch__row dd[data-v-b1fb7f3c]{margin:0;font-size:14px;font-weight:600}.cch__close[data-v-b1fb7f3c]{margin-top:18px;width:100%;padding:13px;border:none;border-radius:14px;background:var(--c-ink);color:var(--c-onInk);font-family:inherit;font-size:14px;font-weight:700;cursor:pointer} diff --git a/apps/user-app-v2/dist/assets/DashboardView-DTklY0sQ.css b/apps/user-app-v2/dist/assets/DashboardView-DTklY0sQ.css deleted file mode 100644 index 1380ee8..0000000 --- a/apps/user-app-v2/dist/assets/DashboardView-DTklY0sQ.css +++ /dev/null @@ -1 +0,0 @@ -.dash[data-v-b8482634]{background:#fff;min-height:100vh}.dash__bar[data-v-b8482634]{position:fixed;top:0;left:0;right:0;z-index:20;background:#ffffffd1;-webkit-backdrop-filter:blur(18px) saturate(140%);backdrop-filter:blur(18px) saturate(140%);border-bottom:1px solid rgba(28,45,86,.05);box-shadow:0 8px 20px -18px #1c2d568c}.dash__barInner[data-v-b8482634]{max-width:768px;margin:0 auto;padding:10px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px}.dash__brand[data-v-b8482634]{font-size:14.5px;font-weight:800;color:#14161a}.dash__exit[data-v-b8482634]{flex:0 0 auto;width:34px;height:34px;border:0;cursor:pointer;border-radius:11px;display:grid;place-items:center;color:#7a1b33;background:#fbf2f4;transition:transform .18s ease}.dash__exit[data-v-b8482634]:active{transform:scale(.92)}.dash__body[data-v-b8482634]{padding-top:58px;padding-bottom:90px}.dash__reveal[data-v-b8482634]{opacity:0;transform:translate3d(0,14px,0) scale(.98);will-change:transform,opacity}.is-revealed .dash__reveal[data-v-b8482634]{opacity:1;transform:translateZ(0) scale(1);transition:opacity .62s cubic-bezier(.32,.72,0,1) var(--reveal-delay, 0ms),transform .62s cubic-bezier(.32,.72,0,1) var(--reveal-delay, 0ms)}@media (prefers-reduced-motion: reduce){.dash__reveal[data-v-b8482634]{opacity:1;transform:none}.is-revealed .dash__reveal[data-v-b8482634]{transition:none}}.dash__hero[data-v-b8482634]{margin-top:16px;margin-bottom:28px;padding:20px 18px 16px;border-radius:26px;background:linear-gradient(155deg,#14161a,#14161a 55%,#5e1427 130%);color:#fff;box-shadow:0 22px 40px -26px #14161a52}.dash__heroTop[data-v-b8482634]{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.dash__heroIdentity[data-v-b8482634]{display:flex;flex-direction:column;gap:3px;min-width:0}.dash__heroName[data-v-b8482634]{font-size:13.5px;font-weight:800}.dash__heroMobile[data-v-b8482634]{font-size:11px;color:#ffffff8c;direction:ltr;text-align:right}.dash__heroSeal[data-v-b8482634]{flex:0 0 auto;padding:5px 12px;border-radius:999px;font-size:10.5px;font-weight:700}.dash__heroSeal.is-debtor[data-v-b8482634]{color:#fff;background:#a33c55}.dash__heroSeal.is-creditor[data-v-b8482634]{color:#14161a;background:#ffffffe6}.dash__heroFigure[data-v-b8482634]{margin-top:20px;display:flex;align-items:baseline;gap:8px}.dash__heroNum[data-v-b8482634]{font-size:34px;font-weight:800;letter-spacing:-.5px}.dash__heroUnit[data-v-b8482634]{font-size:12px;font-weight:600;color:#ffffff9e}.dash__heroDebt[data-v-b8482634]{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:14px;padding-top:13px;border-top:1px solid rgba(255,255,255,.14);font-size:11.5px;color:#ffffff9e}.dash__heroDebt b[data-v-b8482634]{font-size:13px;font-weight:700;color:#fff}.dash__heroDebt i[data-v-b8482634]{font-style:normal;font-size:10.5px;font-weight:600;color:#ffffff9e;padding-inline-start:3px}.dash__invite[data-v-b8482634]{margin-top:16px;padding:26px 20px;border-radius:26px;background:#14161a;color:#fff;display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px}.dash__inviteIcon[data-v-b8482634]{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;background:#ffffff1a;margin-bottom:2px}.dash__invite h3[data-v-b8482634]{margin:0;font-size:14px;font-weight:800}.dash__invite p[data-v-b8482634]{margin:0;font-size:11.5px;color:#fff9;max-width:240px}.dash__inviteCta[data-v-b8482634]{margin-top:6px;padding:10px 22px;border:0;cursor:pointer;border-radius:999px;font-family:inherit;font-size:12px;font-weight:700;color:#14161a;background:#fff;transition:transform .18s ease}.dash__inviteCta[data-v-b8482634]:active{transform:scale(.96)}.dash__rows[data-v-b8482634]{margin-top:0;display:flex;flex-direction:column;gap:9px}.dash__row[data-v-b8482634]{display:flex;align-items:center;gap:12px;padding:13px 14px;border:1px solid #ECEDEF;border-radius:17px;cursor:pointer;background:#fff;font-family:inherit;text-align:right;transition:transform .18s ease,border-color .18s ease}.dash__row[data-v-b8482634]:active{transform:scale(.985);border-color:#7a1b3333}.dash__rowIcon[data-v-b8482634]{flex:0 0 auto;width:38px;height:38px;border-radius:12px;display:grid;place-items:center;color:#7a1b33;background:#fbf2f4}.dash__rowText[data-v-b8482634]{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.dash__rowText b[data-v-b8482634]{font-size:12.5px;font-weight:700;color:#14161a}.dash__rowText small[data-v-b8482634]{font-size:10.5px;color:#8a909c}.dash__rate[data-v-b8482634]{margin-top:14px} diff --git a/apps/user-app-v2/dist/assets/DashboardView-DcUY6mzx.css b/apps/user-app-v2/dist/assets/DashboardView-DcUY6mzx.css new file mode 100644 index 0000000..4753859 --- /dev/null +++ b/apps/user-app-v2/dist/assets/DashboardView-DcUY6mzx.css @@ -0,0 +1 @@ +.dash[data-v-b679c1dd]{background:var(--c-page);min-height:100vh}.dash__bar[data-v-b679c1dd]{position:fixed;top:0;left:0;right:0;z-index:20;background:rgb(var(--c-canvas-rgb) / 82%);-webkit-backdrop-filter:blur(18px) saturate(140%);backdrop-filter:blur(18px) saturate(140%);border-bottom:1px solid rgb(var(--c-primary-rgb) / 5%);box-shadow:0 8px 20px -18px rgb(var(--c-primary-rgb) / 55%)}.dash__barInner[data-v-b679c1dd]{max-width:768px;margin:0 auto;padding:10px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px}.dash__brand[data-v-b679c1dd]{font-size:14.5px;font-weight:800;color:var(--c-ink)}.dash__exit[data-v-b679c1dd]{flex:0 0 auto;width:34px;height:34px;border:0;cursor:pointer;border-radius:11px;display:grid;place-items:center;color:var(--c-wine);background:var(--c-wineWash);transition:transform .18s ease}.dash__exit[data-v-b679c1dd]:active{transform:scale(.92)}.dash__body[data-v-b679c1dd]{padding-top:58px;padding-bottom:90px}.dash__reveal[data-v-b679c1dd]{opacity:0;transform:translate3d(0,14px,0) scale(.98);will-change:transform,opacity}.is-revealed .dash__reveal[data-v-b679c1dd]{opacity:1;transform:translateZ(0) scale(1);transition:opacity .62s cubic-bezier(.32,.72,0,1) var(--reveal-delay, 0ms),transform .62s cubic-bezier(.32,.72,0,1) var(--reveal-delay, 0ms)}@media (prefers-reduced-motion: reduce){.dash__reveal[data-v-b679c1dd]{opacity:1;transform:none}.is-revealed .dash__reveal[data-v-b679c1dd]{transition:none}}.dash__hero[data-v-b679c1dd]{margin-top:16px;margin-bottom:28px;padding:20px 18px 16px;border-radius:26px;background:linear-gradient(155deg,var(--c-heroSurface) 0%,var(--c-heroSurface) 55%,#5E1427 130%);color:#fff;box-shadow:0 22px 40px -26px #14161a52}.dash__heroTop[data-v-b679c1dd]{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.dash__heroIdentity[data-v-b679c1dd]{display:flex;flex-direction:column;gap:3px;min-width:0}.dash__heroName[data-v-b679c1dd]{font-size:13.5px;font-weight:800}.dash__heroMobile[data-v-b679c1dd]{font-size:11px;color:#ffffff8c;direction:ltr;text-align:right}.dash__heroSeal[data-v-b679c1dd]{flex:0 0 auto;padding:5px 12px;border-radius:999px;font-size:10.5px;font-weight:700}.dash__heroSeal.is-debtor[data-v-b679c1dd]{color:#fff;background:var(--c-wineSoft)}.dash__heroSeal.is-creditor[data-v-b679c1dd]{color:#14161a;background:#ffffffe6}.dash__heroFigure[data-v-b679c1dd]{margin-top:20px;display:flex;align-items:baseline;gap:8px}.dash__heroNum[data-v-b679c1dd]{font-size:34px;font-weight:800;letter-spacing:-.5px}.dash__heroUnit[data-v-b679c1dd]{font-size:12px;font-weight:600;color:#ffffff9e}.dash__heroDebt[data-v-b679c1dd]{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:14px;padding-top:13px;border-top:1px solid rgba(255,255,255,.14);font-size:11.5px;color:#ffffff9e}.dash__heroDebt b[data-v-b679c1dd]{font-size:13px;font-weight:700;color:#fff}.dash__heroDebt i[data-v-b679c1dd]{font-style:normal;font-size:10.5px;font-weight:600;color:#ffffff9e;padding-inline-start:3px}.dash__invite[data-v-b679c1dd]{margin-top:16px;padding:26px 20px;border-radius:26px;background:var(--c-heroSurface);color:#fff;display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px}.dash__inviteIcon[data-v-b679c1dd]{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;background:#ffffff1a;margin-bottom:2px}.dash__invite h3[data-v-b679c1dd]{margin:0;font-size:14px;font-weight:800}.dash__invite p[data-v-b679c1dd]{margin:0;font-size:11.5px;color:#fff9;max-width:240px}.dash__inviteCta[data-v-b679c1dd]{margin-top:6px;padding:10px 22px;border:0;cursor:pointer;border-radius:999px;font-family:inherit;font-size:12px;font-weight:700;color:#14161a;background:#fff;transition:transform .18s ease}.dash__inviteCta[data-v-b679c1dd]:active{transform:scale(.96)}.dash__rows[data-v-b679c1dd]{margin-top:0;display:flex;flex-direction:column;gap:9px}.dash__row[data-v-b679c1dd]{display:flex;align-items:center;gap:12px;padding:13px 14px;border:1px solid var(--c-hairline);border-radius:17px;cursor:pointer;background:var(--c-canvas);font-family:inherit;text-align:right;transition:transform .18s ease,border-color .18s ease}.dash__row[data-v-b679c1dd]:active{transform:scale(.985);border-color:rgb(var(--c-wine-rgb) / 20%)}.dash__rowIcon[data-v-b679c1dd]{flex:0 0 auto;width:38px;height:38px;border-radius:12px;display:grid;place-items:center;color:var(--c-wine);background:var(--c-wineWash)}.dash__rowText[data-v-b679c1dd]{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.dash__rowText b[data-v-b679c1dd]{font-size:12.5px;font-weight:700;color:var(--c-ink)}.dash__rowText small[data-v-b679c1dd]{font-size:10.5px;color:var(--c-inkFaint)}.dash__rate[data-v-b679c1dd]{margin-top:14px} diff --git a/apps/user-app-v2/dist/assets/DashboardView-F1CUJWd2.js b/apps/user-app-v2/dist/assets/DashboardView-F1CUJWd2.js new file mode 100644 index 0000000..ec272a8 --- /dev/null +++ b/apps/user-app-v2/dist/assets/DashboardView-F1CUJWd2.js @@ -0,0 +1 @@ +import{d as P,O as E,o as M,x as U,c as v,b as s,m as i,p as a,e as T,z as c,P as $,C as B,g as m,K as q,s as k,f as h,i as D,n as b,t as p,N as G,I as o,F as O,h as z,B as A,_ as K}from"./index-BAr1mMLP.js";import{R as j}from"./RateStrip-DvVfajyI.js";import{p as H}from"./filters-Cm9yhZZ9.js";import{P as J,L as C}from"./index-DPSZMLNJ.js";const Q={class:"dash"},W={class:"dash__bar"},X={class:"dash__barInner"},Y={class:"dash__heroTop"},Z={class:"dash__heroIdentity"},ss={class:"dash__heroName"},es={class:"dash__heroMobile"},as={class:"dash__heroFigure"},os={class:"dash__heroNum"},ns={class:"dash__heroUnit"},ts={class:"dash__heroDebt"},ls={class:"dash__inviteIcon","aria-hidden":"true"},is={class:"dash__rowIcon","aria-hidden":"true"},rs={class:"dash__rowIcon","aria-hidden":"true"},us={class:"dash__rowIcon","aria-hidden":"true"},ds={class:"dash__rowIcon","aria-hidden":"true"},_s={class:"dash__rowIcon","aria-hidden":"true"},cs={class:"dash__rowIcon","aria-hidden":"true"},ps={class:"dash__rowIcon","aria-hidden":"true"},vs={class:"dash__rowIcon","aria-hidden":"true"},hs=70,fs=P({__name:"DashboardView",setup(ms){const l=B(),_=E(),r=m(null),w=m(null),x=m(!1),y=z(()=>r.value?parseFloat(r.value.goldDebtGrams)>0:!1),N=z(()=>y.value?"بدهکار":"بستانکار"),L=z(()=>r.value?Math.abs(parseFloat(r.value.goldDebtGrams)):0),u=q({notify:!1,loginNotify:!1});function d(n){if(!_.isLoggedIn){u.loginNotify=!0;return}n===0&&l.push({name:"ordersList"}),n===1&&l.push({name:"transactionsList"}),n===2&&l.push({name:"profileData"}),n===3&&l.push({name:"favoritesList"}),n===4&&l.push({name:"ChildOrder"}),n===5&&l.push({name:"customerChoice"}),n===6&&l.push({name:"report"})}async function S(){u.notify=!1;let n=null;try{n=(await k.ssoLogoutUrl()).logout_url}catch{n=null}if(_.logout(),sessionStorage.removeItem("gb_iam_sso_checked"),n){window.location.assign(n);return}l.push({name:"home"})}async function I(){if(_.isLoggedIn)try{r.value=await k.getMe()}catch(n){console.log(n)}try{w.value=await k.getLatestGoldPrice()}catch{w.value=null}}async function V(){await I(),x.value=!1}let F=!1;const g=m(F);function f(n){return{"--reveal-delay":`${n*hs}ms`}}return M(async()=>{await I(),!g.value&&(await U(),requestAnimationFrame(()=>{g.value=!0,F=!0}))}),(n,e)=>{const R=A("container");return h(),v("div",Q,[s("header",W,[s("div",X,[e[14]||(e[14]=s("span",{class:"dash__brand"},"میز کار",-1)),i(_).isLoggedIn?(h(),v("button",{key:0,type:"button",class:"dash__exit","aria-label":"خروج",onClick:e[0]||(e[0]=t=>u.notify=!0)},[a(o,{icon:"vuesax-linear:logout",size:"18"})])):T("",!0)])]),a(i(J),{modelValue:x.value,"onUpdate:modelValue":e[10]||(e[10]=t=>x.value=t),onRefresh:V},{pulling:c(()=>[a(i(C),{size:"18"})]),loosing:c(()=>[a(i(C),{size:"18"})]),loading:c(()=>[a(i(C),{size:"18"})]),success:c(()=>[...e[15]||(e[15]=[s("span",null,null,-1)])]),default:c(()=>[a(R,{class:D(["dash__body",{"is-revealed":g.value}])},{default:c(()=>[r.value?(h(),v("section",{key:0,class:"dash__hero dash__reveal",style:b(f(0))},[s("div",Y,[s("div",Z,[s("span",ss,p(r.value.fullName),1),s("span",es,p(i(_).mobile),1)]),s("span",{class:D(["dash__heroSeal",y.value?"is-debtor":"is-creditor"])},p(y.value?"بدهکار":"بستانکار"),3)]),s("div",as,[s("span",os,p(L.value),1),s("span",ns,"گرم "+p(N.value),1)]),s("div",ts,[e[17]||(e[17]=s("span",null,"بدهی ریالی",-1)),s("b",null,[G(p(i(H)(r.value.fiatDebtRial))+" ",1),e[16]||(e[16]=s("i",null,"ریال",-1))])])],4)):(h(),v("section",{key:1,class:"dash__invite dash__reveal",style:b(f(0))},[s("div",ls,[a(o,{icon:"vuesax-linear:security-user",size:"22",color:"#fff"})]),e[18]||(e[18]=s("h3",null,"حساب گرمی شما",-1)),e[19]||(e[19]=s("p",null,"برای دیدن موجودی، سفارش‌ها و اسناد خود وارد شوید.",-1)),s("button",{type:"button",class:"dash__inviteCta",onClick:e[1]||(e[1]=t=>i(l).push({name:"login"}))}," ورود / ثبت‌نام ")],4)),s("section",{class:"dash__rows dash__reveal",style:b(f(1))},[s("button",{type:"button",class:"dash__row",onClick:e[2]||(e[2]=t=>d(0))},[s("span",is,[a(o,{icon:"vuesax-linear:box",size:"18"})]),e[20]||(e[20]=s("span",{class:"dash__rowText"},[s("b",null,"سفارشات"),s("small",null,"پیگیری سفارش‌های شما")],-1)),a(o,{icon:"vuesax-linear:arrow-left-2",size:"16",color:"var(--c-inkFaint)"})]),s("button",{type:"button",class:"dash__row",onClick:e[3]||(e[3]=t=>d(1))},[s("span",rs,[a(o,{icon:"vuesax-linear:receipt-text",size:"18"})]),e[21]||(e[21]=s("span",{class:"dash__rowText"},[s("b",null,"اسناد"),s("small",null,"تراکنش‌ها و رسیدهای حساب")],-1)),a(o,{icon:"vuesax-linear:arrow-left-2",size:"16",color:"var(--c-inkFaint)"})]),s("button",{type:"button",class:"dash__row",onClick:e[4]||(e[4]=t=>d(2))},[s("span",us,[a(o,{icon:"vuesax-linear:user",size:"18"})]),e[22]||(e[22]=s("span",{class:"dash__rowText"},[s("b",null,"پروفایل"),s("small",null,"اطلاعات و تنظیمات حساب")],-1)),a(o,{icon:"vuesax-linear:arrow-left-2",size:"16",color:"var(--c-inkFaint)"})]),s("button",{type:"button",class:"dash__row",onClick:e[5]||(e[5]=t=>d(3))},[s("span",ds,[a(o,{icon:"vuesax-linear:heart",size:"18"})]),e[23]||(e[23]=s("span",{class:"dash__rowText"},[s("b",null,"علاقمندی"),s("small",null,"محصولات ذخیره‌شده شما")],-1)),a(o,{icon:"vuesax-linear:arrow-left-2",size:"16",color:"var(--c-inkFaint)"})]),s("button",{type:"button",class:"dash__row",onClick:e[6]||(e[6]=t=>d(6))},[s("span",_s,[a(o,{icon:"vuesax-linear:chart-2",size:"18"})]),e[24]||(e[24]=s("span",{class:"dash__rowText"},[s("b",null,"گزارش"),s("small",null,"گردش حساب طلایی و ریالی شما")],-1)),a(o,{icon:"vuesax-linear:arrow-left-2",size:"16",color:"var(--c-inkFaint)"})]),s("button",{type:"button",class:"dash__row",onClick:e[7]||(e[7]=t=>i(l).push({name:"appearanceSettings"}))},[s("span",cs,[a(o,{icon:"vuesax-linear:brush",size:"18"})]),e[25]||(e[25]=s("span",{class:"dash__rowText"},[s("b",null,"تنظیمات ظاهری"),s("small",null,"پوسته روشن و تیره، انیمیشن‌ها")],-1)),a(o,{icon:"vuesax-linear:arrow-left-2",size:"16",color:"var(--c-inkFaint)"})]),i(_).isSalesExpert?(h(),v(O,{key:0},[s("button",{type:"button",class:"dash__row",onClick:e[8]||(e[8]=t=>d(4))},[s("span",ps,[a(o,{icon:"vuesax-linear:box-tick",size:"18"})]),e[26]||(e[26]=s("span",{class:"dash__rowText"},[s("b",null,"سفارش مشتریان"),s("small",null,"سفارش‌های مشتریان معرفی‌شده شما")],-1)),a(o,{icon:"vuesax-linear:arrow-left-2",size:"16",color:"var(--c-inkFaint)"})]),s("button",{type:"button",class:"dash__row",onClick:e[9]||(e[9]=t=>d(5))},[s("span",vs,[a(o,{icon:"vuesax-linear:profile-2user",size:"18"})]),e[27]||(e[27]=s("span",{class:"dash__rowText"},[s("b",null,"مشتریان من"),s("small",null,"فهرست مشتریان معرفی‌شده شما")],-1)),a(o,{icon:"vuesax-linear:arrow-left-2",size:"16",color:"var(--c-inkFaint)"})])],64)):T("",!0)],4),a(j,{quote:w.value,class:"dash__rate dash__reveal",style:b(f(2))},null,8,["quote","style"])]),_:1},8,["class"])]),_:1},8,["modelValue"]),a($,{show:u.notify,"onUpdate:show":e[11]||(e[11]=t=>u.notify=t),art:"logout",title:"آیا می خواهید از برنامه خارج شوید؟",description:"برای استفاده دوباره از امکانات منتزر، باید دوباره وارد حساب کاربری خود شوید.","confirm-text":"بله","cancel-text":"بی خیال",onConfirm:S},null,8,["show"]),a($,{show:u.loginNotify,"onUpdate:show":e[12]||(e[12]=t=>u.loginNotify=t),art:"login",title:"ابتدا وارد حساب کاربری شوید",description:"برای دسترسی به تمامی امکانات نرم افزار منتزر، گزینه ورود/ثبت نام را لمس کنید و در صورت نداشتن حساب کاربری، ثبت نام نمایید.","confirm-text":"ورود/ثبت نام","cancel-text":"بیخیال",onConfirm:e[13]||(e[13]=t=>i(l).push({name:"login"}))},null,8,["show"])])}}}),gs=K(fs,[["__scopeId","data-v-b679c1dd"]]);export{gs as default}; diff --git a/apps/user-app-v2/dist/assets/DashboardView-pCHsg2UC.js b/apps/user-app-v2/dist/assets/DashboardView-pCHsg2UC.js deleted file mode 100644 index 847f866..0000000 --- a/apps/user-app-v2/dist/assets/DashboardView-pCHsg2UC.js +++ /dev/null @@ -1 +0,0 @@ -import{d as O,D as E,o as P,p as U,c as p,b as e,u as l,l as t,e as q,q as o,g as f,A as F,f as h,i as z,n as b,t as v,C as N,I as n,L as C,v as M,h as k,s as B,_ as G}from"./index-CZjgV-Yn.js";import{R as j}from"./RateStrip-CoZk8fjQ.js";import{_ as $}from"./DialogVant.vue_vue_type_style_index_0_lang-DKsdrzNc.js";import{l as W}from"./dialogEmpty1-Caw7F5KL.js";import{p as H}from"./filters-CLL9nGZ2.js";import{a as T}from"./client-WIBW0tF5.js";import{P as J}from"./index-BBOQn_fb.js";import"./_commonjsHelpers-Cpj98o6Y.js";const K="/assets/dialogEmpty5-DWebUDaI.svg",Q={class:"dash"},X={class:"dash__bar"},Y={class:"dash__barInner"},Z={class:"dash__heroTop"},ss={class:"dash__heroIdentity"},es={class:"dash__heroName"},ts={class:"dash__heroMobile"},as={class:"dash__heroFigure"},os={class:"dash__heroNum"},ls={class:"dash__heroUnit"},ns={class:"dash__heroDebt"},is={class:"dash__inviteIcon","aria-hidden":"true"},rs={class:"dash__rowIcon","aria-hidden":"true"},us={class:"dash__rowIcon","aria-hidden":"true"},ds={class:"dash__rowIcon","aria-hidden":"true"},_s={class:"dash__rowIcon","aria-hidden":"true"},vs=["src"],cs=["src"],ms=70,ps=O({__name:"DashboardView",setup(fs){const u=M(),_=E(),r=f(null),y=f(null),g=f(!1),x=k(()=>r.value?parseFloat(r.value.goldDebtGrams)>0:!1),V=k(()=>x.value?"بدهکار":"بستانکار"),R=k(()=>r.value?Math.abs(parseFloat(r.value.goldDebtGrams)):0),i=F({notify:!1,loginNotify:!1});function c(d){if(!_.customerId){i.loginNotify=!0;return}d===0&&u.push({name:"ordersList"}),d===1&&u.push({name:"transactionsList"}),d===2&&u.push({name:"profileData"}),d===3&&u.push({name:"favoritesList"})}function S(){_.logout(),i.notify=!1,u.push({name:"home"})}async function D(){_.customerId&&(r.value=await T.getCustomer(_.customerId));try{y.value=await T.getLatestGoldPrice()}catch{y.value=null}}async function A(){await D(),g.value=!1}let I=!1;const w=f(I);function m(d){return{"--reveal-delay":`${d*ms}ms`}}return P(async()=>{await D(),!w.value&&(await U(),requestAnimationFrame(()=>{w.value=!0,I=!0}))}),(d,s)=>{const L=B("container");return h(),p("div",Q,[e("header",X,[e("div",Y,[s[12]||(s[12]=e("span",{class:"dash__brand"},"میز کار",-1)),l(_).customerId?(h(),p("button",{key:0,type:"button",class:"dash__exit","aria-label":"خروج",onClick:s[0]||(s[0]=a=>i.notify=!0)},[t(n,{icon:"vuesax-linear:logout",size:"18"})])):q("",!0)])]),t(l(J),{modelValue:g.value,"onUpdate:modelValue":s[6]||(s[6]=a=>g.value=a),onRefresh:A},{pulling:o(()=>[t(l(C),{size:"18"})]),loosing:o(()=>[t(l(C),{size:"18"})]),loading:o(()=>[t(l(C),{size:"18"})]),success:o(()=>[...s[13]||(s[13]=[e("span",null,null,-1)])]),default:o(()=>[t(L,{class:z(["dash__body",{"is-revealed":w.value}])},{default:o(()=>[r.value?(h(),p("section",{key:0,class:"dash__hero dash__reveal",style:b(m(0))},[e("div",Z,[e("div",ss,[e("span",es,v(r.value.fullName),1),e("span",ts,v(l(_).mobile),1)]),e("span",{class:z(["dash__heroSeal",x.value?"is-debtor":"is-creditor"])},v(x.value?"بدهکار":"بستانکار"),3)]),e("div",as,[e("span",os,v(R.value),1),e("span",ls,"گرم "+v(V.value),1)]),e("div",ns,[s[15]||(s[15]=e("span",null,"بدهی ریالی",-1)),e("b",null,[N(v(l(H)(r.value.fiatDebtRial))+" ",1),s[14]||(s[14]=e("i",null,"ریال",-1))])])],4)):(h(),p("section",{key:1,class:"dash__invite dash__reveal",style:b(m(0))},[e("div",is,[t(n,{icon:"vuesax-linear:security-user",size:"22",color:"#fff"})]),s[16]||(s[16]=e("h3",null,"حساب گرمی شما",-1)),s[17]||(s[17]=e("p",null,"برای دیدن موجودی، سفارش‌ها و اسناد خود وارد شوید.",-1)),e("button",{type:"button",class:"dash__inviteCta",onClick:s[1]||(s[1]=a=>l(u).push({name:"login"}))}," ورود / ثبت‌نام ")],4)),e("section",{class:"dash__rows dash__reveal",style:b(m(1))},[e("button",{type:"button",class:"dash__row",onClick:s[2]||(s[2]=a=>c(0))},[e("span",rs,[t(n,{icon:"vuesax-linear:box",size:"18"})]),s[18]||(s[18]=e("span",{class:"dash__rowText"},[e("b",null,"سفارشات"),e("small",null,"پیگیری سفارش‌های شما")],-1)),t(n,{icon:"vuesax-linear:arrow-left-2",size:"16",color:"#8A909C"})]),e("button",{type:"button",class:"dash__row",onClick:s[3]||(s[3]=a=>c(1))},[e("span",us,[t(n,{icon:"vuesax-linear:receipt-text",size:"18"})]),s[19]||(s[19]=e("span",{class:"dash__rowText"},[e("b",null,"اسناد"),e("small",null,"تراکنش‌ها و رسیدهای حساب")],-1)),t(n,{icon:"vuesax-linear:arrow-left-2",size:"16",color:"#8A909C"})]),e("button",{type:"button",class:"dash__row",onClick:s[4]||(s[4]=a=>c(2))},[e("span",ds,[t(n,{icon:"vuesax-linear:user",size:"18"})]),s[20]||(s[20]=e("span",{class:"dash__rowText"},[e("b",null,"پروفایل"),e("small",null,"اطلاعات و تنظیمات حساب")],-1)),t(n,{icon:"vuesax-linear:arrow-left-2",size:"16",color:"#8A909C"})]),e("button",{type:"button",class:"dash__row",onClick:s[5]||(s[5]=a=>c(3))},[e("span",_s,[t(n,{icon:"vuesax-linear:heart",size:"18"})]),s[21]||(s[21]=e("span",{class:"dash__rowText"},[e("b",null,"علاقمندی"),e("small",null,"محصولات ذخیره‌شده شما")],-1)),t(n,{icon:"vuesax-linear:arrow-left-2",size:"16",color:"#8A909C"})])],4),t(j,{quote:y.value,class:"dash__rate dash__reveal",style:b(m(2))},null,8,["quote","style"])]),_:1},8,["class"])]),_:1},8,["modelValue"]),t($,{timeOut:-1,show:i.notify,"onUpdate:show":s[8]||(s[8]=a=>i.notify=a),closeOnClickOverlay:!0},{img:o(()=>[e("img",{src:l(K),alt:"",class:"opacity-70 mb-8"},null,8,vs)]),title:o(()=>[...s[22]||(s[22]=[N("آیا می خواهید از برنامه خارج شوید؟",-1)])]),button:o(()=>[e("div",{class:"text-center text-[#1C2D56]",onClick:S},"بله"),e("div",{class:"text-center text-[#6b7280]",onClick:s[7]||(s[7]=a=>i.notify=!1)},"بی خیال")]),_:1},8,["show"]),t($,{timeOut:-1,show:i.loginNotify,"onUpdate:show":s[11]||(s[11]=a=>i.loginNotify=a),closeOnClickOverlay:!0},{img:o(()=>[e("img",{src:l(W),alt:"",class:"opacity-80"},null,8,cs)]),title:o(()=>[...s[23]||(s[23]=[e("div",{class:"p-8 text-justify"}," برای دسترسی به تمامی امکانات نرم افزار منتزر، ابتدا گزینه ورود/ثبت نام را لمس کنید و در صورت نداشتن حساب کاربری، ثبت نام نمایید. ",-1)])]),button:o(()=>[e("div",{class:"text-center text-[#1C2D56]",onClick:s[9]||(s[9]=a=>l(u).push({name:"login"}))},"ورود/ثبت نام"),e("div",{class:"text-center text-danger",onClick:s[10]||(s[10]=a=>i.loginNotify=!1)},"بیخیال")]),_:1},8,["show"])])}}}),Ds=G(ps,[["__scopeId","data-v-b8482634"]]);export{Ds as default}; diff --git a/apps/user-app-v2/dist/assets/DialogVant-CIAzSUS_.css b/apps/user-app-v2/dist/assets/DialogVant-CIAzSUS_.css deleted file mode 100644 index cc9512d..0000000 --- a/apps/user-app-v2/dist/assets/DialogVant-CIAzSUS_.css +++ /dev/null @@ -1 +0,0 @@ -.van-dialog__confirm,.van-dialog__cancel{display:none!important}.mDialog.van-dialog{width:min(320px,calc(100vw - 48px));border-radius:26px;background:#fff;box-shadow:0 30px 60px -24px #14161a73;overflow:hidden}.mDialog__body{padding:26px 22px 20px;display:flex;flex-direction:column;align-items:center;text-align:center}.mDialog__art{width:84px;height:84px;border-radius:50%;display:flex;align-items:center;justify-content:center;overflow:hidden;background:#fbf2f4;margin-bottom:18px}.mDialog__art img,.mDialog__art svg,.mDialog__art canvas{width:56px;height:56px;-o-object-fit:contain;object-fit:contain;opacity:1!important}.mDialog__title{font-size:14.5px;font-weight:700;line-height:1.9;color:#14161a}.mDialog__actions{width:100%;display:flex;flex-direction:column;gap:9px;margin-top:22px;font-size:13px;font-weight:700}.mDialog__actions>*{padding:12px;border-radius:14px;cursor:pointer;transition:transform .18s ease,opacity .18s ease}.mDialog__actions>*:active{transform:scale(.97)}.mDialog__actions>*:first-child{color:#fff!important;background:#14161a}.mDialog__actions>*:last-child{color:#8a909c!important;background:none} diff --git a/apps/user-app-v2/dist/assets/DialogVant.vue_vue_type_style_index_0_lang-DKsdrzNc.js b/apps/user-app-v2/dist/assets/DialogVant.vue_vue_type_style_index_0_lang-DKsdrzNc.js deleted file mode 100644 index 91f8c32..0000000 --- a/apps/user-app-v2/dist/assets/DialogVant.vue_vue_type_style_index_0_lang-DKsdrzNc.js +++ /dev/null @@ -1 +0,0 @@ -import{d as l,j as n,q as c,u as _,an as d,f as r,b as t,z as a,C as o,t as i}from"./index-CZjgV-Yn.js";const m={class:"mDialog__body"},g={class:"mDialog__art"},u={class:"mDialog__title"},D={class:"mDialog__actions"},h=l({__name:"DialogVant",props:{timeOut:{},text1:{},text2:{},text3:{}},setup(s){return(e,x)=>(r(),n(_(d),{class:"mDialog"},{default:c(()=>[t("div",m,[t("div",g,[a(e.$slots,"img",{},()=>[o(i(s.text2),1)])]),t("div",u,[a(e.$slots,"title",{},()=>[o(i(s.text1),1)])]),t("div",D,[a(e.$slots,"button",{},()=>[o(i(s.text3),1)])])])]),_:3}))}});export{h as _}; diff --git a/apps/user-app-v2/dist/assets/FavoritesView-ChC1yylj.css b/apps/user-app-v2/dist/assets/FavoritesView-ChC1yylj.css new file mode 100644 index 0000000..251dd94 --- /dev/null +++ b/apps/user-app-v2/dist/assets/FavoritesView-ChC1yylj.css @@ -0,0 +1 @@ +.favs[data-v-d58ee1f5]{background:var(--c-page);min-height:100vh}.favs__body[data-v-d58ee1f5]{padding-top:76px;padding-bottom:90px}.favs__grid[data-v-d58ee1f5]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.favs__empty[data-v-d58ee1f5]{margin-top:8px;padding:38px 20px;border:1px dashed var(--c-hairline);border-radius:18px;display:flex;flex-direction:column;align-items:center;gap:10px;color:var(--c-inkFaint)}.favs__empty p[data-v-d58ee1f5]{margin:0;font-size:12.5px}.favs__emptyCta[data-v-d58ee1f5]{margin-top:4px;padding:9px 18px;border:0;cursor:pointer;border-radius:999px;font-family:inherit;font-size:12.5px;font-weight:700;color:var(--c-onInk);background:var(--c-ink)} diff --git a/apps/user-app-v2/dist/assets/FavoritesView-DpZcWcm_.js b/apps/user-app-v2/dist/assets/FavoritesView-DpZcWcm_.js deleted file mode 100644 index be6869d..0000000 --- a/apps/user-app-v2/dist/assets/FavoritesView-DpZcWcm_.js +++ /dev/null @@ -1 +0,0 @@ -import{d as f,o as g,c as o,l as e,q as c,g as m,f as t,F as p,b as i,r as y,I as b,u as h,e as k,v as P,h as C,s as F,j as x,_ as B}from"./index-CZjgV-Yn.js";import{P as V}from"./PageBar-Bkc2Ht1O.js";import{a as w}from"./Spinner.vue_vue_type_style_index_0_lang-ghXHCVpI.js";import{S}from"./SectionHead-CiwUIGKe.js";import{P as I}from"./ProductCard-Cd-G3dvx.js";import{a as N}from"./SingleProduct-DS8wIDwN.js";import{a as $}from"./client-WIBW0tF5.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./cartStore-CoSoowuC.js";import"./index-Ca8ka09f.js";import"./classCallCheck-BSDY9VEy.js";import"./NotifyVant.vue_vue_type_script_setup_true_lang-CY4DS_6T.js";import"./DialogVant.vue_vue_type_style_index_0_lang-DKsdrzNc.js";import"./dialogEmpty1-Caw7F5KL.js";const R={class:"favs"},j={class:"favs__grid"},q={key:1,class:"favs__empty"},z=f({__name:"FavoritesView",setup(E){const d=P(),v=N(),a=m(!1),l=m([]),r=C(()=>l.value.filter(u=>v.isFavorite(u.id)));return g(async()=>{a.value=!0;try{l.value=await $.listProducts()}finally{a.value=!1}}),(u,s)=>{const _=F("container");return t(),o("div",R,[e(V,{title:"علاقه‌مندی","back-to":"userPage::hasSubRoute"}),e(w,{spinning:a.value,tip:"در حال دریافت اطلاعات"},{default:c(()=>[e(_,{class:"favs__body"},{default:c(()=>[r.value.length?(t(),o(p,{key:0},[e(S,{title:"ذخیره‌شده‌ها",subtitle:`${r.value.length} محصول`},null,8,["subtitle"]),i("div",j,[(t(!0),o(p,null,y(r.value,n=>(t(),x(I,{key:n.id,value:n},null,8,["value"]))),128))])],64)):a.value?k("",!0):(t(),o("section",q,[e(b,{icon:"vuesax-linear:heart",size:"26"}),s[1]||(s[1]=i("p",null,"هنوز محصولی را به علاقه‌مندی‌ها اضافه نکرده‌اید.",-1)),i("button",{type:"button",class:"favs__emptyCta",onClick:s[0]||(s[0]=n=>h(d).push({name:"home"}))}," دیدن محصولات ")]))]),_:1})]),_:1},8,["spinning"])])}}}),Y=B(z,[["__scopeId","data-v-a8e72280"]]);export{Y as default}; diff --git a/apps/user-app-v2/dist/assets/FavoritesView-KwTaarkp.js b/apps/user-app-v2/dist/assets/FavoritesView-KwTaarkp.js new file mode 100644 index 0000000..90867ac --- /dev/null +++ b/apps/user-app-v2/dist/assets/FavoritesView-KwTaarkp.js @@ -0,0 +1 @@ +import{d as m,aM as g,o as y,s as b,c as o,p as e,z as c,J as h,g as d,f as t,F as _,b as l,r as k,I as C,m as P,e as B,C as F,h as x,B as V,j as w,_ as S}from"./index-BAr1mMLP.js";import{P as I}from"./PageBar-B1ks8U8i.js";import{S as N}from"./SectionHead-DadL6umU.js";import{P as $}from"./ProductCard-4TPJHHsT.js";const z={class:"favs"},M={class:"favs__grid"},R={key:1,class:"favs__empty"},j=m({__name:"FavoritesView",setup(E){const v=F(),f=g(),a=d(!1),i=d([]),n=x(()=>i.value.filter(u=>f.isFavorite(u.id)));return y(async()=>{a.value=!0;try{i.value=await b.listProducts()}finally{a.value=!1}}),(u,s)=>{const p=V("container");return t(),o("div",z,[e(I,{title:"علاقه‌مندی","back-to":"userPage::hasSubRoute"}),e(h,{spinning:a.value,tip:"در حال دریافت اطلاعات"},{default:c(()=>[e(p,{class:"favs__body"},{default:c(()=>[n.value.length?(t(),o(_,{key:0},[e(N,{title:"ذخیره‌شده‌ها",subtitle:`${n.value.length} محصول`},null,8,["subtitle"]),l("div",M,[(t(!0),o(_,null,k(n.value,r=>(t(),w($,{key:r.id,value:r},null,8,["value"]))),128))])],64)):a.value?B("",!0):(t(),o("section",R,[e(C,{icon:"vuesax-linear:heart",size:"26"}),s[1]||(s[1]=l("p",null,"هنوز محصولی را به علاقه‌مندی‌ها اضافه نکرده‌اید.",-1)),l("button",{type:"button",class:"favs__emptyCta",onClick:s[0]||(s[0]=r=>P(v).push({name:"home"}))}," دیدن محصولات ")]))]),_:1})]),_:1},8,["spinning"])])}}}),A=S(j,[["__scopeId","data-v-d58ee1f5"]]);export{A as default}; diff --git a/apps/user-app-v2/dist/assets/FavoritesView-v_Hv-tez.css b/apps/user-app-v2/dist/assets/FavoritesView-v_Hv-tez.css deleted file mode 100644 index dc664e6..0000000 --- a/apps/user-app-v2/dist/assets/FavoritesView-v_Hv-tez.css +++ /dev/null @@ -1 +0,0 @@ -.favs[data-v-a8e72280]{background:#fff;min-height:100vh}.favs__body[data-v-a8e72280]{padding-top:76px;padding-bottom:90px}.favs__grid[data-v-a8e72280]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.favs__empty[data-v-a8e72280]{margin-top:8px;padding:38px 20px;border:1px dashed #ECEDEF;border-radius:18px;display:flex;flex-direction:column;align-items:center;gap:10px;color:#8a909c}.favs__empty p[data-v-a8e72280]{margin:0;font-size:12.5px}.favs__emptyCta[data-v-a8e72280]{margin-top:4px;padding:9px 18px;border:0;cursor:pointer;border-radius:999px;font-family:inherit;font-size:12.5px;font-weight:700;color:#fff;background:#14161a} diff --git a/apps/user-app-v2/dist/assets/FormItemContext-Dxet_qkI.js b/apps/user-app-v2/dist/assets/FormItemContext-Dxet_qkI.js deleted file mode 100644 index a3268f1..0000000 --- a/apps/user-app-v2/dist/assets/FormItemContext-Dxet_qkI.js +++ /dev/null @@ -1 +0,0 @@ -import{K as Ke,d as ae,O as qe,o as We,v as Ie,b as j,w,S as oe,i as F,a1 as Ve}from"./Spinner.vue_vue_type_style_index_0_lang-ghXHCVpI.js";import{S as Xe,E as Ye,O as se,a as Je,N as Ze,d as Qe,h as Se,g as ke,R as P}from"./index-CZjgV-Yn.js";var Ce=function(){if(typeof Map<"u")return Map;function e(t,r){var n=-1;return t.some(function(i,a){return i[0]===r?(n=a,!0):!1}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(r){var n=e(this.__entries__,r),i=this.__entries__[n];return i&&i[1]},t.prototype.set=function(r,n){var i=e(this.__entries__,r);~i?this.__entries__[i][1]=n:this.__entries__.push([r,n])},t.prototype.delete=function(r){var n=this.__entries__,i=e(n,r);~i&&n.splice(i,1)},t.prototype.has=function(r){return!!~e(this.__entries__,r)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(r,n){n===void 0&&(n=null);for(var i=0,a=this.__entries__;i0},e.prototype.connect_=function(){!J||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),at?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!J||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var r=t.propertyName,n=r===void 0?"":r,i=it.some(function(a){return!!~n.indexOf(a)});i&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),Fe=function(e,t){for(var r=0,n=Object.keys(t);r"u"||!(Element instanceof Object))){if(!(t instanceof I(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)||(r.set(t,new pt(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof I(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)&&(r.delete(t),r.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&t.activeObservations_.push(r)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,r=this.activeObservations_.map(function(n){return new vt(n.target,n.broadcastRect())});this.callback_.call(t,r,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),Re=typeof WeakMap<"u"?new WeakMap:new Ce,je=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=ot.getInstance(),n=new _t(t,r,this);Re.set(this,n)}return e}();["observe","unobserve","disconnect"].forEach(function(e){je.prototype[e]=function(){var t;return(t=Re.get(this))[e].apply(t,arguments)}});var Qn=function(){return typeof L.ResizeObserver<"u"?L.ResizeObserver:je}();function gt(e,t){return function(r){return e(t(r))}}function fe(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(f){return void r(f)}s.done?t(u):Promise.resolve(u).then(n,i)}function kn(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function o(u){fe(a,n,i,o,s,"next",u)}function s(u){fe(a,n,i,o,s,"throw",u)}o(void 0)})}}function ei(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,i=e;if(Array.isArray(e)&&(i=Ke(e)[0]),!i)return null;var a=Xe(i,t,n);return a.props=r?ae(ae({},a.props),t):a.props,qe(We(a.props.class)!=="object","class must be string"),a}function mt(){this.__data__=[],this.size=0}function Me(e,t){return e===t||e!==e&&t!==t}function q(e,t){for(var r=e.length;r--;)if(Me(e[r][0],t))return r;return-1}var yt=Array.prototype,bt=yt.splice;function wt(e){var t=this.__data__,r=q(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():bt.call(t,r,1),--this.size,!0}function Ot(e){var t=this.__data__,r=q(t,e);return r<0?void 0:t[r][1]}function At(e){return q(this.__data__,e)>-1}function Tt(e,t){var r=this.__data__,n=q(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function g(e){var t=-1,r=e==null?0:e.length;for(this.clear();++ts))return!1;var f=a.get(e),d=a.get(t);if(f&&d)return f==t&&d==e;var h=-1,l=!0,_=r&_r?new B:void 0;for(a.set(e,t),a.set(t,e);++h-1&&e%1==0&&e-1&&e%1==0&&e<=Zr}var Qr="[object Arguments]",kr="[object Array]",en="[object Boolean]",tn="[object Date]",rn="[object Error]",nn="[object Function]",an="[object Map]",on="[object Number]",sn="[object Object]",un="[object RegExp]",fn="[object Set]",cn="[object String]",ln="[object WeakMap]",dn="[object ArrayBuffer]",hn="[object DataView]",pn="[object Float32Array]",vn="[object Float64Array]",_n="[object Int8Array]",gn="[object Int16Array]",mn="[object Int32Array]",yn="[object Uint8Array]",bn="[object Uint8ClampedArray]",wn="[object Uint16Array]",On="[object Uint32Array]",c={};c[pn]=c[vn]=c[_n]=c[gn]=c[mn]=c[yn]=c[bn]=c[wn]=c[On]=!0;c[Qr]=c[kr]=c[dn]=c[en]=c[hn]=c[tn]=c[rn]=c[nn]=c[an]=c[on]=c[sn]=c[un]=c[fn]=c[cn]=c[ln]=!1;function An(e){return F(e)&&Be(e.length)&&!!c[j(e)]}function Tn(e){return function(t){return e(t)}}var He=typeof exports=="object"&&exports&&!exports.nodeType&&exports,C=He&&typeof module=="object"&&module&&!module.nodeType&&module,En=C&&C.exports===He,Y=En&&Ve.process,ge=function(){try{var e=C&&C.require&&C.require("util").types;return e||Y&&Y.binding&&Y.binding("util")}catch{}}(),me=ge&&ge.isTypedArray,Ne=me?Tn(me):An,xn=Object.prototype,Pn=xn.hasOwnProperty;function In(e,t){var r=H(e),n=!r&&Kr(e),i=!r&&!n&&Z(e),a=!r&&!n&&!i&&Ne(e),o=r||n||i||a,s=o?Br(e.length,String):[],u=s.length;for(var f in e)(t||Pn.call(e,f))&&!(o&&(f=="length"||i&&(f=="offset"||f=="parent")||a&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||Jr(f,u)))&&s.push(f);return s}var Sn=Object.prototype;function Cn(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Sn;return e===r}var Fn=gt(Object.keys,Object),$n=Object.prototype,Rn=$n.hasOwnProperty;function jn(e){if(!Cn(e))return Fn(e);var t=[];for(var r in Object(e))Rn.call(e,r)&&r!="constructor"&&t.push(r);return t}function Mn(e){return e!=null&&Be(e.length)&&!De(e)}function Dn(e){return Mn(e)?In(e):jn(e)}function ye(e){return jr(e,Dn,Gr)}var zn=1,Ln=Object.prototype,Gn=Ln.hasOwnProperty;function Bn(e,t,r,n,i,a){var o=r&zn,s=ye(e),u=s.length,f=ye(t),d=f.length;if(u!=d&&!o)return!1;for(var h=u;h--;){var l=s[h];if(!(o?l in t:Gn.call(t,l)))return!1}var _=a.get(e),p=a.get(t);if(_&&p)return _==t&&p==e;var v=!0;a.set(e,t),a.set(t,e);for(var m=o;++h1&&arguments[1]!==void 0?arguments[1]:Se(function(){return!0}),n=ke(new Map),i=function(s,u){n.value.set(s,u),n.value=new Map(n.value)},a=function(s){n.value.delete(s),n.value=new Map(n.value)};Ye([r,n],function(){}),P(N,t),P(U,{addFormItemField:i,removeFormItemField:a})},re={id:Se(function(){}),onFieldBlur:function(){},onFieldChange:function(){},clearValidate:function(){}},ne={addFormItemField:function(){},removeFormItemField:function(){}},ni=function(){var t=se(U,ne),r=Symbol("FormItemFieldKey"),n=Ze();return t.addFormItemField(r,n.type),Je(function(){t.removeFormItemField(r)}),P(U,ne),P(N,re),se(N,re)};const ii=Qe({compatConfig:{MODE:3},name:"AFormItemRest",setup:function(t,r){var n=r.slots;return P(U,ne),P(N,re),function(){var i;return(i=n.default)===null||i===void 0?void 0:i.call(n)}}});export{ni as A,ei as B,ii as F,x as M,b as S,le as U,kn as _,H as a,Be as b,Jr as c,Kr as d,Me as e,Rr as f,S as g,Cn as h,Qn as i,Mn as j,Dn as k,In as l,Gr as m,jr as n,gt as o,y as p,Tn as q,ge as r,Dr as s,Z as t,ye as u,Ue as v,ri as w,B as x,pr as y,ti as z}; diff --git a/apps/user-app-v2/dist/assets/FormItemContext-YTkEF048.js b/apps/user-app-v2/dist/assets/FormItemContext-YTkEF048.js new file mode 100644 index 0000000..fc7e865 --- /dev/null +++ b/apps/user-app-v2/dist/assets/FormItemContext-YTkEF048.js @@ -0,0 +1 @@ +import{aG as Ke,av as qe,a1 as ie,aK as We,ah as Ve,aq as Ie,X as j,ar as w,ak as oe,W as F,b2 as Xe,Q as Ye,a9 as se,a as Je,a2 as Qe,h as Ce,g as Ze,d as ke,an as P}from"./index-BAr1mMLP.js";var Se=function(){if(typeof Map<"u")return Map;function e(t,r){var n=-1;return t.some(function(a,i){return a[0]===r?(n=i,!0):!1}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(r){var n=e(this.__entries__,r),a=this.__entries__[n];return a&&a[1]},t.prototype.set=function(r,n){var a=e(this.__entries__,r);~a?this.__entries__[a][1]=n:this.__entries__.push([r,n])},t.prototype.delete=function(r){var n=this.__entries__,a=e(n,r);~a&&n.splice(a,1)},t.prototype.has=function(r){return!!~e(this.__entries__,r)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(r,n){n===void 0&&(n=null);for(var a=0,i=this.__entries__;a0},e.prototype.connect_=function(){!J||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),it?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!J||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var r=t.propertyName,n=r===void 0?"":r,a=at.some(function(i){return!!~n.indexOf(i)});a&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),Fe=function(e,t){for(var r=0,n=Object.keys(t);r"u"||!(Element instanceof Object))){if(!(t instanceof I(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)||(r.set(t,new pt(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof I(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)&&(r.delete(t),r.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&t.activeObservations_.push(r)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,r=this.activeObservations_.map(function(n){return new vt(n.target,n.broadcastRect())});this.callback_.call(t,r,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),Re=typeof WeakMap<"u"?new WeakMap:new Se,je=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=ot.getInstance(),n=new _t(t,r,this);Re.set(this,n)}return e}();["observe","unobserve","disconnect"].forEach(function(e){je.prototype[e]=function(){var t;return(t=Re.get(this))[e].apply(t,arguments)}});var Qn=function(){return typeof L.ResizeObserver<"u"?L.ResizeObserver:je}();function gt(e,t){return function(r){return e(t(r))}}function fe(e,t,r,n,a,i,o){try{var s=e[i](o),u=s.value}catch(f){return void r(f)}s.done?t(u):Promise.resolve(u).then(n,a)}function Zn(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var i=e.apply(t,r);function o(u){fe(i,n,a,o,s,"next",u)}function s(u){fe(i,n,a,o,s,"throw",u)}o(void 0)})}}function kn(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a=e;if(Array.isArray(e)&&(a=Ke(e)[0]),!a)return null;var i=qe(a,t,n);return i.props=r?ie(ie({},i.props),t):i.props,We(Ve(i.props.class)!=="object","class must be string"),i}function yt(){this.__data__=[],this.size=0}function Me(e,t){return e===t||e!==e&&t!==t}function q(e,t){for(var r=e.length;r--;)if(Me(e[r][0],t))return r;return-1}var mt=Array.prototype,bt=mt.splice;function wt(e){var t=this.__data__,r=q(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():bt.call(t,r,1),--this.size,!0}function Ot(e){var t=this.__data__,r=q(t,e);return r<0?void 0:t[r][1]}function At(e){return q(this.__data__,e)>-1}function Tt(e,t){var r=this.__data__,n=q(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function g(e){var t=-1,r=e==null?0:e.length;for(this.clear();++ts))return!1;var f=i.get(e),d=i.get(t);if(f&&d)return f==t&&d==e;var h=-1,l=!0,_=r&_r?new B:void 0;for(i.set(e,t),i.set(t,e);++h-1&&e%1==0&&e-1&&e%1==0&&e<=Qr}var Zr="[object Arguments]",kr="[object Array]",en="[object Boolean]",tn="[object Date]",rn="[object Error]",nn="[object Function]",an="[object Map]",on="[object Number]",sn="[object Object]",un="[object RegExp]",fn="[object Set]",cn="[object String]",ln="[object WeakMap]",dn="[object ArrayBuffer]",hn="[object DataView]",pn="[object Float32Array]",vn="[object Float64Array]",_n="[object Int8Array]",gn="[object Int16Array]",yn="[object Int32Array]",mn="[object Uint8Array]",bn="[object Uint8ClampedArray]",wn="[object Uint16Array]",On="[object Uint32Array]",c={};c[pn]=c[vn]=c[_n]=c[gn]=c[yn]=c[mn]=c[bn]=c[wn]=c[On]=!0;c[Zr]=c[kr]=c[dn]=c[en]=c[hn]=c[tn]=c[rn]=c[nn]=c[an]=c[on]=c[sn]=c[un]=c[fn]=c[cn]=c[ln]=!1;function An(e){return F(e)&&Be(e.length)&&!!c[j(e)]}function Tn(e){return function(t){return e(t)}}var He=typeof exports=="object"&&exports&&!exports.nodeType&&exports,S=He&&typeof module=="object"&&module&&!module.nodeType&&module,En=S&&S.exports===He,Y=En&&Xe.process,ge=function(){try{var e=S&&S.require&&S.require("util").types;return e||Y&&Y.binding&&Y.binding("util")}catch{}}(),ye=ge&&ge.isTypedArray,Ne=ye?Tn(ye):An,xn=Object.prototype,Pn=xn.hasOwnProperty;function In(e,t){var r=H(e),n=!r&&Kr(e),a=!r&&!n&&Q(e),i=!r&&!n&&!a&&Ne(e),o=r||n||a||i,s=o?Br(e.length,String):[],u=s.length;for(var f in e)(t||Pn.call(e,f))&&!(o&&(f=="length"||a&&(f=="offset"||f=="parent")||i&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||Jr(f,u)))&&s.push(f);return s}var Cn=Object.prototype;function Sn(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Cn;return e===r}var Fn=gt(Object.keys,Object),$n=Object.prototype,Rn=$n.hasOwnProperty;function jn(e){if(!Sn(e))return Fn(e);var t=[];for(var r in Object(e))Rn.call(e,r)&&r!="constructor"&&t.push(r);return t}function Mn(e){return e!=null&&Be(e.length)&&!De(e)}function Dn(e){return Mn(e)?In(e):jn(e)}function me(e){return jr(e,Dn,Gr)}var zn=1,Ln=Object.prototype,Gn=Ln.hasOwnProperty;function Bn(e,t,r,n,a,i){var o=r&zn,s=me(e),u=s.length,f=me(t),d=f.length;if(u!=d&&!o)return!1;for(var h=u;h--;){var l=s[h];if(!(o?l in t:Gn.call(t,l)))return!1}var _=i.get(e),p=i.get(t);if(_&&p)return _==t&&p==e;var v=!0;i.set(e,t),i.set(t,e);for(var y=o;++h1&&arguments[1]!==void 0?arguments[1]:Ce(function(){return!0}),n=Ze(new Map),a=function(s,u){n.value.set(s,u),n.value=new Map(n.value)},i=function(s){n.value.delete(s),n.value=new Map(n.value)};Ye([r,n],function(){}),P(N,t),P(U,{addFormItemField:a,removeFormItemField:i})},re={id:Ce(function(){}),onFieldBlur:function(){},onFieldChange:function(){},clearValidate:function(){}},ne={addFormItemField:function(){},removeFormItemField:function(){}},ra=function(){var t=se(U,ne),r=Symbol("FormItemFieldKey"),n=Qe();return t.addFormItemField(r,n.type),Je(function(){t.removeFormItemField(r)}),P(U,ne),P(N,re),se(N,re)};const na=ke({compatConfig:{MODE:3},name:"AFormItemRest",setup:function(t,r){var n=r.slots;return P(U,ne),P(N,re),function(){var a;return(a=n.default)===null||a===void 0?void 0:a.call(n)}}});export{ra as A,kn as B,na as F,x as M,b as S,le as U,Zn as _,H as a,Be as b,Jr as c,Kr as d,Me as e,Rr as f,C as g,Sn as h,Qn as i,Mn as j,Dn as k,In as l,Gr as m,jr as n,gt as o,m as p,Tn as q,ge as r,Dr as s,Q as t,me as u,Ue as v,ta as w,B as x,pr as y,ea as z}; diff --git a/apps/user-app-v2/dist/assets/HomeView-BOniF0DH.js b/apps/user-app-v2/dist/assets/HomeView-BOniF0DH.js deleted file mode 100644 index 5179a15..0000000 --- a/apps/user-app-v2/dist/assets/HomeView-BOniF0DH.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as se}from"./Spinner.vue_vue_type_style_index_0_lang-ghXHCVpI.js";import{d as V,o as Z,a as ne,c as i,b as v,F as B,r as N,e as w,f as o,g,h as O,n as z,i as F,_ as X,j as G,t as U,I as j,k as ae,w as oe,u as I,l as P,m as le,p as ie,q as L,L as W,s as re,v as ce}from"./index-CZjgV-Yn.js";import{u as ue,S as de}from"./SingleProduct-DS8wIDwN.js";import{R as ve}from"./RateStrip-CoZk8fjQ.js";import{u as _e}from"./cartStore-CoSoowuC.js";import{a as Y}from"./client-WIBW0tF5.js";import{P as pe}from"./index-BBOQn_fb.js";import{D as fe}from"./index-Ca8ka09f.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./NotifyVant.vue_vue_type_script_setup_true_lang-CY4DS_6T.js";import"./DialogVant.vue_vue_type_style_index_0_lang-DKsdrzNc.js";import"./dialogEmpty1-Caw7F5KL.js";import"./filters-CLL9nGZ2.js";import"./classCallCheck-BSDY9VEy.js";const me={key:0,class:"hero"},ge=["onClick"],he=["src","alt"],ye={key:1,class:"hero__artFallback","aria-hidden":"true"},ke={key:0,class:"hero__dots"},Ie=["aria-label","onClick"],J=46,be=.76,$e=36.6,Pe=.75,Ce=V({__name:"HeroCarousel",props:{slides:{},autoplay:{type:Boolean,default:!0}},emits:["select"],setup(c,{emit:h}){const _=c,b=h,d=g(0),p=g(null),u=g(!1),r=g(0);let y=0,f=null,m;const l=O(()=>_.slides.length);function S(t){let n=t-d.value;l.value>2&&(n>l.value/2&&(n-=l.value),n<-l.value/2&&(n+=l.value));const e=u.value?r.value:0,s=Math.abs(n),C=n*$e+e,k=n===0?1:be,E=s>1?0:s===0?1:Pe;return{transform:`translate3d(${C}%, 0, 0) scale(${k})`,opacity:String(E),zIndex:String(10-s),pointerEvents:s>1?"none":"auto",transition:u.value?"none":"transform .42s cubic-bezier(.22,.61,.36,1), opacity .42s ease"}}function $(t){d.value=(t%l.value+l.value)%l.value,a()}function R(){$(d.value+1)}function D(){$(d.value-1)}function M(t){var n,e;l.value<2||(u.value=!0,y=t.clientX,r.value=0,f=t.pointerId,(e=(n=t.currentTarget).setPointerCapture)==null||e.call(n,t.pointerId),H())}function T(t){var e;if(!u.value||t.pointerId!==f)return;const n=((e=p.value)==null?void 0:e.clientWidth)||1;r.value=(t.clientX-y)/n*100}function x(t){if(!u.value)return;const n=t.clientX-y;u.value=!1,r.value=0,f=null,n>J?D():n<-J?R():a()}function A(t,n){if(!(Math.abs(r.value)>1)){if(t!==d.value){$(t);return}b("select",n)}}function H(){m&&clearInterval(m),m=void 0}function a(){H(),_.autoplay&&l.value>1&&(m=setInterval(R,6e3))}return Z(a),ne(H),(t,n)=>c.slides.length?(o(),i("section",me,[v("div",{class:"hero__stage",ref_key:"stage",ref:p,onPointerdown:M,onPointermove:T,onPointerup:x,onPointercancel:x},[(o(!0),i(B,null,N(c.slides,(e,s)=>(o(),i("article",{key:e.key,class:F(["hero__card",{"is-active":s===d.value}]),style:z(S(s)),onClick:C=>A(s,e)},[e.image?(o(),i("img",{key:0,src:e.image,alt:e.title,class:"hero__art",draggable:"false"},null,8,he)):(o(),i("div",ye))],14,ge))),128))],544),c.slides.length>1?(o(),i("div",ke,[(o(!0),i(B,null,N(c.slides,(e,s)=>(o(),i("button",{key:e.key,type:"button",class:F(["hero__dot",{"is-active":s===d.value}]),"aria-label":e.title,onClick:C=>$(s)},null,10,Ie))),128))])):w("",!0)])):w("",!0)}}),Se=X(Ce,[["__scopeId","data-v-97560afa"]]),we={class:"cats no-scrollbar"},xe=["onClick"],Ee={class:"cats__mark","aria-hidden":"true"},He=["src"],Le={class:"cats__title"},Oe=V({__name:"CategoryGrid",props:{categories:{},activeId:{}},emits:["select"],setup(c,{emit:h}){const _=h;return(b,d)=>(o(),i("div",we,[(o(!0),i(B,null,N(c.categories,p=>{var u;return o(),i("button",{key:p.id,type:"button",class:F(["cats__tile",{"is-active":p.id===c.activeId}]),onClick:r=>_("select",p)},[v("span",Ee,[(u=p.icon)!=null&&u.image?(o(),i("img",{key:0,src:p.icon.image,alt:""},null,8,He)):(o(),G(j,{key:1,icon:"vuesax-linear:3d-cube-scan",size:"27"}))]),v("span",Le,U(p.title),1)],10,xe)}),128))]))}}),Re=X(Oe,[["__scopeId","data-v-aef04be0"]]),Me={class:"panel__art"},ze=["alt"],Be={class:"panel__title"},De={class:"panel__meta"},Te={class:"panel__weight"},Ae={key:0,class:"panel__wageOld"},Ue={class:"panel__wage"},Ge=V({__name:"ProductPanel",props:{value:{},wageBefore:{}},emits:["open"],setup(c,{emit:h}){const _=c,b=h,{image:d,title:p,min_gram:u,wage:r}=_e(_.value);function y(f){return f%1===0?String(f):f.toFixed(2)}return(f,m)=>{const l=ae("lazy");return o(),i("article",{class:"panel",onClick:m[0]||(m[0]=S=>b("open",c.value))},[v("div",Me,[oe(v("img",{alt:I(p)},null,8,ze),[[l,I(d)]])]),v("h3",Be,U(I(p)),1),v("div",De,[v("span",Te,U(I(u))+" گرم",1),I(r)!=null?(o(),i(B,{key:0},[m[1]||(m[1]=v("span",{class:"panel__sep","aria-hidden":"true"},null,-1)),c.wageBefore!=null?(o(),i("span",Ae,"اجرت "+U(y(c.wageBefore))+"٪",1)):w("",!0),v("span",Ue,U(y(I(r)))+"٪ اجرت",1)],64)):w("",!0)])])}}}),ee=X(Ge,[["__scopeId","data-v-4f623012"]]),Ne={class:"reel"},Fe=["onClick"],Ve={class:"reel__allMark","aria-hidden":"true"},K=46,Xe=.78,Q=92.5,qe=.62,We=V({__name:"ProductCarousel",props:{products:{}},emits:["open","all"],setup(c,{emit:h}){const _=c,b=h,d=g(0),p=g(null),u=g(!1),r=g(0);let y=0,f=null;const m=O(()=>[..._.products.map(a=>({key:a.id,kind:"product",product:a})),{key:"__all__",kind:"all"}]),l=O(()=>m.value.length);function S(a){let t=a-d.value;l.value>2&&(t>l.value/2&&(t-=l.value),t<-l.value/2&&(t+=l.value));const n=u.value?r.value:0,e=t*Q+n,s=Math.min(Math.abs(t+n/Q),1),C=1-(1-Xe)*s,k=1-(1-qe)*s,E=Math.abs(t)<=1,q=E?k:0;return{transform:`translate3d(${e}%, 0, 0) scale(${C})`,opacity:String(q),zIndex:String(10-Math.abs(t)),pointerEvents:E?"auto":"none",transition:u.value?"none":"transform .55s cubic-bezier(.21,1.02,.36,1), opacity .45s ease"}}function $(a){d.value=(a%l.value+l.value)%l.value}function R(){$(d.value+1)}function D(){$(d.value-1)}function M(a){var t,n;l.value<2||(u.value=!0,y=a.clientX,r.value=0,f=a.pointerId,(n=(t=a.currentTarget).setPointerCapture)==null||n.call(t,a.pointerId))}function T(a){var n;if(!u.value||a.pointerId!==f)return;const t=((n=p.value)==null?void 0:n.clientWidth)||1;r.value=(a.clientX-y)/t*100}function x(a){if(!u.value)return;const t=a.clientX-y;u.value=!1,r.value=0,f=null,t>K?D():t<-K&&R()}function A(a,t){if(!(Math.abs(r.value)>1)){if(a!==d.value){$(a);return}b("open",t)}}function H(a){if(!(Math.abs(r.value)>1)){if(a!==d.value){$(a);return}b("all")}}return(a,t)=>(o(),i("section",Ne,[v("div",{class:"reel__stage",ref_key:"stage",ref:p,onPointerdown:M,onPointermove:T,onPointerup:x,onPointercancel:x},[(o(!0),i(B,null,N(m.value,(n,e)=>(o(),i("div",{key:n.key,class:F(["reel__cell",{"is-active":e===d.value}]),style:z(S(e))},[n.kind==="product"?(o(),G(ee,{key:0,value:n.product,onOpen:s=>A(e,s)},null,8,["value","onOpen"])):(o(),i("button",{key:1,type:"button",class:"reel__all",onClick:s=>H(e)},[v("span",Ve,[P(j,{icon:"vuesax-linear:arrow-left-2",size:"26"})]),t[0]||(t[0]=v("span",{class:"reel__allText"},"مشاهده همه محصولات جدید",-1))],8,Fe))],6))),128))],544)]))}}),Ye=X(We,[["__scopeId","data-v-b79ea2a7"]]),je="/assets/shipping-and-delivery-CyUGL93q.png",Je="/assets/sports-and-competition-ao926_SX.png",te="/assets/montzar-logo-05_bmbid.png",Ke=[{type:"popup",src:je,text:"ارسال سریع و مطمئن سفارش‌های شما به سراسر کشور.",link:void 0},{type:"popup",src:Je,text:"جدیدترین محصولات منتزر را در بخش محصولات جدید ببینید.",link:void 0},{type:"popup",src:te,text:"منتزر، همراه شما در خرید و فروش طلا.",link:void 0}],Qe=le("config",{state:()=>({config:{main_slider:Ke},cats:[],loaded:!1}),actions:{setCats(c){this.cats=c},async init(){try{const c=await Y.listProducts(),h=new Map;for(const _ of c)_.category&&!h.has(_.category.id)&&h.set(_.category.id,{id:_.category.id,title:_.category.title,icon:{image:te}});this.cats=[...h.values()],this.loaded=!0}catch(c){console.log(c)}}}}),Ze={class:"home"},et={class:"home__bar"},tt={class:"home__barInner"},st={class:"home__list"},nt={key:3,class:"home__empty"},at=70,ot=6,lt=4,it=V({__name:"HomeView",setup(c){let h=!1;const _=ce(),b=Qe(),d=ue(),p=g(!0),u=g(!1),r=g([]),y=g(null),f=g(!1),m=g(null),l=g(h);function S(e){return{"--reveal-delay":`${e*at}ms`}}const $=O(()=>r.value),R=O(()=>r.value.slice(0,ot)),D=O(()=>r.value.slice(0,lt)),M=O(()=>b.cats.slice(0,5).map(e=>({key:e.id,title:e.title,image:T(e.id),categoryId:e.id})));function T(e){var C,k;const s=r.value.find(E=>{var q;return((q=E.category)==null?void 0:q.id)===e});return(k=(C=s==null?void 0:s.images)==null?void 0:C[0])==null?void 0:k.url}function x(e){m.value=e.id,f.value=!0}function A(e){d.query.cats=[e.id],_.push({name:"search"})}function H(e){e.categoryId&&(d.query.cats=[e.categoryId]),_.push({name:"search"})}function a(){_.push({name:"newestProduct"})}async function t(){try{const[e]=await Promise.all([Y.listProducts(),b.init()]);r.value=e}catch(e){console.log(e)}try{y.value=await Y.getLatestGoldPrice()}catch{y.value=null}}async function n(){await t(),u.value=!1}return Z(async()=>{await t(),p.value=!1,!l.value&&(await ie(),requestAnimationFrame(()=>{l.value=!0,h=!0}))}),(e,s)=>{const C=re("container");return o(),i("div",Ze,[v("header",et,[v("div",tt,[s[3]||(s[3]=v("img",{src:se,alt:"منتزر",class:"home__logo"},null,-1)),P(ve,{quote:y.value,compact:"",class:"home__rate"},null,8,["quote"])])]),P(I(pe),{modelValue:u.value,"onUpdate:modelValue":s[0]||(s[0]=k=>u.value=k),onRefresh:n},{pulling:L(()=>[P(I(W),{size:"18"})]),loosing:L(()=>[P(I(W),{size:"18"})]),loading:L(()=>[P(I(W),{size:"18"})]),success:L(()=>[...s[4]||(s[4]=[v("span",null,null,-1)])]),default:L(()=>[P(C,{class:F(["home__body",{"is-revealed":l.value}])},{default:L(()=>[M.value.length?(o(),G(Se,{key:0,slides:M.value,class:"home__hero home__reveal",style:z(S(0)),onSelect:H},null,8,["slides","style"])):w("",!0),I(b).cats.length?(o(),i("section",{key:1,class:"home__section home__reveal",style:z(S(1))},[s[5]||(s[5]=v("h2",{class:"home__heading"},"دسته بندی ها",-1)),P(Re,{categories:I(b).cats,"active-id":null,onSelect:A},null,8,["categories"])],4)):w("",!0),$.value.length?(o(),i("section",{key:2,class:"home__section home__reveal",style:z(S(2))},[s[6]||(s[6]=v("h2",{class:"home__heading"},"محصولات جدید",-1)),P(Ye,{products:R.value,onOpen:x,onAll:a},null,8,["products"]),v("div",st,[(o(!0),i(B,null,N(D.value,(k,E)=>(o(),G(ee,{key:k.id,value:k,class:"home__reveal",style:z(S(3+E)),onOpen:x},null,8,["value","style"]))),128))])],4)):w("",!0),!p.value&&!r.value.length?(o(),i("section",nt,[P(j,{icon:"vuesax-linear:box",size:"26"}),s[7]||(s[7]=v("p",null,"هنوز محصولی در مجموعه ثبت نشده است.",-1))])):w("",!0)]),_:1},8,["class"])]),_:1},8,["modelValue"]),P(I(fe),{visible:f.value,"onUpdate:visible":s[2]||(s[2]=k=>f.value=k),placement:"bottom",closable:!1,class:"rtl",height:"100vh",bodyStyle:{padding:0,position:"relative"}},{default:L(()=>[m.value?(o(),G(de,{key:0,id:m.value,onCloseDrawer:s[1]||(s[1]=k=>f.value=!1)},null,8,["id"])):w("",!0)]),_:1},8,["visible"])])}}}),bt=X(it,[["__scopeId","data-v-2cc1ae19"]]);export{bt as default}; diff --git a/apps/user-app-v2/dist/assets/HomeView-BsWyRfva.css b/apps/user-app-v2/dist/assets/HomeView-BsWyRfva.css new file mode 100644 index 0000000..c98fd03 --- /dev/null +++ b/apps/user-app-v2/dist/assets/HomeView-BsWyRfva.css @@ -0,0 +1 @@ +.hero__stage[data-v-d3ac0cc7]{position:relative;aspect-ratio:1.063;touch-action:pan-y;-webkit-user-select:none;-moz-user-select:none;user-select:none}.hero__card[data-v-d3ac0cc7]{position:absolute;top:0;bottom:0;left:13.45%;right:13.45%;border-radius:32px;overflow:hidden;cursor:pointer;background:var(--c-hairlineSoft);will-change:transform,opacity}.hero__card.is-active[data-v-d3ac0cc7]{box-shadow:0 18px 44px -12px #14161a73,0 0 0 1px #ffffffe6}.hero__art[data-v-d3ac0cc7],.hero__artFallback[data-v-d3ac0cc7]{width:100%;height:100%;-o-object-fit:cover;object-fit:cover;display:block;transition:filter .42s cubic-bezier(.22,.61,.36,1)}.hero__card:not(.is-active) .hero__art[data-v-d3ac0cc7]{filter:grayscale(1)}.hero__artFallback[data-v-d3ac0cc7]{background:linear-gradient(140deg,var(--c-hairlineSoft) 0%,var(--c-hairline) 100%)}.hero__dots[data-v-d3ac0cc7]{display:flex;justify-content:center;gap:6px;padding-top:14px}.hero__dot[data-v-d3ac0cc7]{width:6px;height:6px;padding:0;border:0;cursor:pointer;border-radius:999px;background:var(--c-hairline);transition:all .25s ease}.hero__dot.is-active[data-v-d3ac0cc7]{width:20px;background:var(--c-wine)}.cats[data-v-155beefb]{display:flex;gap:15px;overflow-x:auto;margin:0 -16px;padding:2px 16px;scroll-snap-type:x proximity}.cats__tile[data-v-155beefb]{scroll-snap-align:start;flex:0 0 auto;width:79px;height:65px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;cursor:pointer;font-family:inherit;border-radius:22px;border:0;background:var(--c-hairlineSoft);color:var(--c-primary);transition:border-color .2s ease,background .2s ease,transform .18s ease}.cats__tile[data-v-155beefb]:active{transform:scale(.96)}.cats__tile.is-active[data-v-155beefb]{background:var(--c-hairline)}.cats__mark[data-v-155beefb]{display:grid;place-items:center;color:var(--c-primary)}.cats__mark img[data-v-155beefb]{width:27px;height:27px;-o-object-fit:contain;object-fit:contain}html.theme-dark .cats__mark img[data-v-155beefb]{background:var(--c-photoMat);border-radius:12px}.cats__title[data-v-155beefb]{font-size:11px;font-weight:600;white-space:nowrap;max-width:71px;overflow:hidden;text-overflow:ellipsis}.panel[data-v-ccafc905]{cursor:pointer;border-radius:32px;background:var(--c-hairlineSoft);padding:18px 16px 16px;text-align:center;transition:transform .2s ease,background .2s ease}.panel[data-v-ccafc905]:active{transform:scale(.985)}.panel__art[data-v-ccafc905]{height:148px;display:flex;align-items:center;justify-content:center}.panel__art img[data-v-ccafc905]{max-width:78%;max-height:100%;-o-object-fit:contain;object-fit:contain;display:block}html.theme-dark .panel__art img[data-v-ccafc905]{background:var(--c-photoMat);border-radius:12px}.panel__title[data-v-ccafc905]{margin:14px 0 0;font-size:14px;font-weight:600;color:var(--c-ink);line-height:1.6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.panel__meta[data-v-ccafc905]{display:flex;align-items:center;justify-content:center;gap:8px;padding-top:9px;font-size:12px}.panel__weight[data-v-ccafc905]{color:var(--c-inkSoft);font-weight:500;font-size:14px}.panel__sep[data-v-ccafc905]{width:1px;height:12px;background:var(--c-hairline)}.panel__wageOld[data-v-ccafc905]{color:var(--c-inkFaint);text-decoration:line-through}.panel__wage[data-v-ccafc905]{color:#e31a1a;font-weight:600;font-size:12px!important}.reel__stage[data-v-9bb6595e]{position:relative;height:252px;touch-action:pan-y;-webkit-user-select:none;-moz-user-select:none;user-select:none;margin:0 -16px 26px}.reel__cell[data-v-9bb6595e]{position:absolute;top:0;bottom:0;left:13%;right:13%;transform-origin:bottom center;will-change:transform,opacity}.reel__cell[data-v-9bb6595e]>.panel,.reel__all[data-v-9bb6595e]{transition:box-shadow .55s cubic-bezier(.21,1.02,.36,1)}.reel__cell.is-active[data-v-9bb6595e]>.panel,.reel__cell.is-active .reel__all[data-v-9bb6595e]{box-shadow:0 18px 38px -24px #14161a8c}.reel__cell[data-v-9bb6595e]>.panel{height:100%;display:flex;flex-direction:column;justify-content:center}.reel__all[data-v-9bb6595e]{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;cursor:pointer;font-family:inherit;padding:18px 16px;border:0;border-radius:32px;background:var(--c-hairlineSoft);color:var(--c-wine);transition:transform .2s ease,background .2s ease}.reel__all[data-v-9bb6595e]:active{transform:scale(.985)}.reel__allMark[data-v-9bb6595e]{width:56px;height:56px;border-radius:999px;display:grid;place-items:center;background:var(--c-canvas)}.reel__allText[data-v-9bb6595e]{font-size:13.5px;font-weight:700;line-height:1.7}.home[data-v-3a35bb09]{background:var(--c-page);min-height:100vh}.home__bar[data-v-3a35bb09]{position:fixed;top:0;left:0;right:0;z-index:20;background:rgb(var(--c-canvas-rgb) / 82%);-webkit-backdrop-filter:blur(18px) saturate(140%);backdrop-filter:blur(18px) saturate(140%);border-bottom:1px solid rgb(var(--c-primary-rgb) / 5%);box-shadow:0 8px 20px -18px rgb(var(--c-primary-rgb) / 55%)}.home__barInner[data-v-3a35bb09]{max-width:768px;margin:0 auto;padding:10px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px}.home__logo[data-v-3a35bb09]{height:25px;-o-object-fit:contain;object-fit:contain}.home__body[data-v-3a35bb09]{padding-top:58px;padding-bottom:90px}.home__reveal[data-v-3a35bb09]{opacity:0;transform:translate3d(0,14px,0) scale(.98);will-change:transform,opacity}.is-revealed .home__reveal[data-v-3a35bb09]{opacity:1;transform:translateZ(0) scale(1);transition:opacity .62s cubic-bezier(.32,.72,0,1) var(--reveal-delay, 0ms),transform .62s cubic-bezier(.32,.72,0,1) var(--reveal-delay, 0ms)}@media (prefers-reduced-motion: reduce){.home__reveal[data-v-3a35bb09]{opacity:1;transform:none}.is-revealed .home__reveal[data-v-3a35bb09]{transition:none}}.home__hero[data-v-3a35bb09]{margin-top:18px;margin-inline:-16px}.home__section[data-v-3a35bb09]{margin-top:30px}.home__heading[data-v-3a35bb09]{margin:0 0 14px;font-size:16px;font-weight:500;color:var(--c-ink);text-align:right}.home__list[data-v-3a35bb09]{display:flex;flex-direction:column;gap:14px;margin-top:14px}.home__empty[data-v-3a35bb09]{margin-top:28px;padding:34px 20px;border:1px dashed var(--c-hairline);border-radius:32px;display:flex;flex-direction:column;align-items:center;gap:10px;color:var(--c-inkFaint)}.home__empty p[data-v-3a35bb09]{margin:0;font-size:12.5px} diff --git a/apps/user-app-v2/dist/assets/HomeView-Cl6D8_Sy.js b/apps/user-app-v2/dist/assets/HomeView-Cl6D8_Sy.js new file mode 100644 index 0000000..0b3755f --- /dev/null +++ b/apps/user-app-v2/dist/assets/HomeView-Cl6D8_Sy.js @@ -0,0 +1 @@ +import{d as F,u as ne,o as Z,a as se,c as l,b as _,F as A,r as G,e as x,f as a,g as I,h as R,n as B,i as N,_ as V,j as q,t as U,I as j,k as ae,l as oe,w as le,m as $,p as P,q as ie,s as X,v as re,x as ce,y as ue,z,A as de,B as _e,C as ve}from"./index-BAr1mMLP.js";import{R as pe}from"./RateStrip-DvVfajyI.js";import{P as fe,L as Y}from"./index-DPSZMLNJ.js";import"./filters-Cm9yhZZ9.js";const me={key:0,class:"hero"},ge=["onClick"],he=["src","alt"],ye={key:1,class:"hero__artFallback","aria-hidden":"true"},ke={key:0,class:"hero__dots"},Ie=["aria-label","onClick"],J=46,be=.76,$e=36.6,Pe=.75,Ce=F({__name:"HeroCarousel",props:{slides:{},autoplay:{type:Boolean,default:!0}},emits:["select"],setup(r,{emit:y}){const v=r,b=y,u=I(0),p=I(null),c=I(!1),i=I(0);let k=0,m=null,g;const f=ne(),h=R(()=>v.slides.length);function S(e){let t=e-u.value;h.value>2&&(t>h.value/2&&(t-=h.value),t<-h.value/2&&(t+=h.value));const s=c.value?i.value:0,d=Math.abs(t),C=t*$e+s,H=t===0?1:be,W=d>1?0:d===0?1:Pe;return{transform:`translate3d(${C}%, 0, 0) scale(${H})`,opacity:String(W),zIndex:String(10-d),pointerEvents:d>1?"none":"auto",transition:c.value?"none":"transform .42s cubic-bezier(.22,.61,.36,1), opacity .42s ease"}}function w(e){u.value=(e%h.value+h.value)%h.value,o()}function E(){w(u.value+1)}function T(){w(u.value-1)}function L(e){var t,s;h.value<2||(c.value=!0,k=e.clientX,i.value=0,m=e.pointerId,(s=(t=e.currentTarget).setPointerCapture)==null||s.call(t,e.pointerId),n())}function M(e){var s;if(!c.value||e.pointerId!==m)return;const t=((s=p.value)==null?void 0:s.clientWidth)||1;i.value=(e.clientX-k)/t*100}function O(e){if(!c.value)return;const t=e.clientX-k;c.value=!1,i.value=0,m=null,t>J?T():t<-J?E():o()}function D(e,t){if(!(Math.abs(i.value)>1)){if(e!==u.value){w(e);return}b("select",t)}}function n(){g&&clearInterval(g),g=void 0}function o(){n(),v.autoplay&&!f.isReducedMotion&&h.value>1&&(g=setInterval(E,6e3))}return Z(o),se(n),(e,t)=>r.slides.length?(a(),l("section",me,[_("div",{class:"hero__stage",ref_key:"stage",ref:p,onPointerdown:L,onPointermove:M,onPointerup:O,onPointercancel:O},[(a(!0),l(A,null,G(r.slides,(s,d)=>(a(),l("article",{key:s.key,class:N(["hero__card",{"is-active":d===u.value}]),style:B(S(d)),onClick:C=>D(d,s)},[s.image?(a(),l("img",{key:0,src:s.image,alt:s.title,class:"hero__art",draggable:"false"},null,8,he)):(a(),l("div",ye))],14,ge))),128))],544),r.slides.length>1?(a(),l("div",ke,[(a(!0),l(A,null,G(r.slides,(s,d)=>(a(),l("button",{key:s.key,type:"button",class:N(["hero__dot",{"is-active":d===u.value}]),"aria-label":s.title,onClick:C=>w(d)},null,10,Ie))),128))])):x("",!0)])):x("",!0)}}),Se=V(Ce,[["__scopeId","data-v-d3ac0cc7"]]),we={class:"cats no-scrollbar"},xe=["onClick"],Ee={class:"cats__mark","aria-hidden":"true"},He=["src"],Re={class:"cats__title"},Le=F({__name:"CategoryGrid",props:{categories:{},activeId:{}},emits:["select"],setup(r,{emit:y}){const v=y;return(b,u)=>(a(),l("div",we,[(a(!0),l(A,null,G(r.categories,p=>{var c;return a(),l("button",{key:p.id,type:"button",class:N(["cats__tile",{"is-active":p.id===r.activeId}]),onClick:i=>v("select",p)},[_("span",Ee,[(c=p.icon)!=null&&c.image?(a(),l("img",{key:0,src:p.icon.image,alt:""},null,8,He)):(a(),q(j,{key:1,icon:"vuesax-linear:3d-cube-scan",size:"27"}))]),_("span",Re,U(p.title),1)],10,xe)}),128))]))}}),Me=V(Le,[["__scopeId","data-v-155beefb"]]),Oe={class:"panel__art"},ze=["alt"],Be={class:"panel__title"},Ae={class:"panel__meta"},Te={class:"panel__weight"},De={key:0,class:"panel__wageOld"},Ue={class:"panel__wage"},Ge=F({__name:"ProductPanel",props:{value:{},wageBefore:{}},emits:["open"],setup(r,{emit:y}){const v=r,b=y,{image:u,title:p,min_gram:c,wage:i}=ae(v.value);function k(m){return m%1===0?String(m):m.toFixed(2)}return(m,g)=>{const f=oe("lazy");return a(),l("article",{class:"panel","data-product-origin":"",onClick:g[0]||(g[0]=h=>b("open",r.value))},[_("div",Oe,[le(_("img",{alt:$(p)},null,8,ze),[[f,$(u)]])]),_("h3",Be,U($(p)),1),_("div",Ae,[_("span",Te,U($(c))+" گرم",1),$(i)!=null?(a(),l(A,{key:0},[g[1]||(g[1]=_("span",{class:"panel__sep","aria-hidden":"true"},null,-1)),r.wageBefore!=null?(a(),l("span",De,"اجرت "+U(k(r.wageBefore))+"٪",1)):x("",!0),_("span",Ue,U(k($(i)))+"٪ اجرت",1)],64)):x("",!0)])])}}}),ee=V(Ge,[["__scopeId","data-v-ccafc905"]]),Ne={class:"reel"},Fe=["onClick"],Ve={class:"reel__allMark","aria-hidden":"true"},K=46,Xe=.78,Q=92.5,qe=.62,We=F({__name:"ProductCarousel",props:{products:{}},emits:["open","all"],setup(r,{emit:y}){const v=r,b=y,u=I(0),p=I(null),c=I(!1),i=I(0);let k=0,m=null;const g=R(()=>[...v.products.map(n=>({key:n.id,kind:"product",product:n})),{key:"__all__",kind:"all"}]),f=R(()=>g.value.length);function h(n){let o=n-u.value;f.value>2&&(o>f.value/2&&(o-=f.value),o<-f.value/2&&(o+=f.value));const e=c.value?i.value:0,t=o*Q+e,s=Math.min(Math.abs(o+e/Q),1),d=1-(1-Xe)*s,C=1-(1-qe)*s,H=Math.abs(o)<=1,W=H?C:0;return{transform:`translate3d(${t}%, 0, 0) scale(${d})`,opacity:String(W),zIndex:String(10-Math.abs(o)),pointerEvents:H?"auto":"none",transition:c.value?"none":"transform .55s cubic-bezier(.21,1.02,.36,1), opacity .45s ease"}}function S(n){u.value=(n%f.value+f.value)%f.value}function w(){S(u.value+1)}function E(){S(u.value-1)}function T(n){var o,e;f.value<2||(c.value=!0,k=n.clientX,i.value=0,m=n.pointerId,(e=(o=n.currentTarget).setPointerCapture)==null||e.call(o,n.pointerId))}function L(n){var e;if(!c.value||n.pointerId!==m)return;const o=((e=p.value)==null?void 0:e.clientWidth)||1;i.value=(n.clientX-k)/o*100}function M(n){if(!c.value)return;const o=n.clientX-k;c.value=!1,i.value=0,m=null,o>K?E():o<-K&&w()}function O(n,o){if(!(Math.abs(i.value)>1)){if(n!==u.value){S(n);return}b("open",o)}}function D(n){if(!(Math.abs(i.value)>1)){if(n!==u.value){S(n);return}b("all")}}return(n,o)=>(a(),l("section",Ne,[_("div",{class:"reel__stage",ref_key:"stage",ref:p,onPointerdown:T,onPointermove:L,onPointerup:M,onPointercancel:M},[(a(!0),l(A,null,G(g.value,(e,t)=>(a(),l("div",{key:e.key,class:N(["reel__cell",{"is-active":t===u.value}]),style:B(h(t))},[e.kind==="product"?(a(),q(ee,{key:0,value:e.product,onOpen:s=>O(t,s)},null,8,["value","onOpen"])):(a(),l("button",{key:1,type:"button",class:"reel__all",onClick:s=>D(t)},[_("span",Ve,[P(j,{icon:"vuesax-linear:arrow-left-2",size:"26"})]),o[0]||(o[0]=_("span",{class:"reel__allText"},"مشاهده همه محصولات جدید",-1))],8,Fe))],6))),128))],544)]))}}),Ye=V(We,[["__scopeId","data-v-9bb6595e"]]),je="/assets/shipping-and-delivery-CyUGL93q.png",Je="/assets/sports-and-competition-ao926_SX.png",te="/assets/montzar-logo-05_bmbid.png",Ke=[{type:"popup",src:je,text:"ارسال سریع و مطمئن سفارش‌های شما به سراسر کشور.",link:void 0},{type:"popup",src:Je,text:"جدیدترین محصولات منتزر را در بخش محصولات جدید ببینید.",link:void 0},{type:"popup",src:te,text:"منتزر، همراه شما در خرید و فروش طلا.",link:void 0}],Qe=ie("config",{state:()=>({config:{main_slider:Ke},cats:[],loaded:!1}),actions:{setCats(r){this.cats=r},async init(){try{const r=await X.listProducts(),y=new Map;for(const v of r)v.category&&!y.has(v.category.id)&&y.set(v.category.id,{id:v.category.id,title:v.category.title,icon:{image:te}});this.cats=[...y.values()],this.loaded=!0}catch(r){console.log(r)}}}}),Ze={class:"home"},et={class:"home__bar"},tt={class:"home__barInner"},nt={class:"home__list"},st={key:3,class:"home__empty"},at=70,ot=6,lt=4,it=F({__name:"HomeView",setup(r){let y=!1;const v=ve(),b=Qe(),u=re(),p=I(!0),c=I(!1),i=I([]),k=I(null),m=I(null),g=I(y);function f(e){return{"--reveal-delay":`${e*at}ms`}}const h=R(()=>i.value),S=R(()=>i.value.slice(0,ot)),w=R(()=>i.value.slice(0,lt)),E=R(()=>{var e;return(e=m.value)!=null&&e.length?m.value.filter(t=>t.image).map((t,s)=>({key:`${s}-${t.image}`,title:"",image:t.image,link:t.link||void 0})):b.cats.slice(0,5).map(t=>({key:t.id,title:t.title,image:T(t.id),categoryId:t.id}))});function T(e){var s,d;const t=i.value.find(C=>{var H;return((H=C.category)==null?void 0:H.id)===e});return(d=(s=t==null?void 0:t.images)==null?void 0:s[0])==null?void 0:d.url}function L(e){de(e)}function M(e){u.query.cats=[e.id],v.push({name:"search"})}function O(e){if(e.link){/^https?:\/\//i.test(e.link)?window.open(e.link,"_blank","noopener"):v.push(e.link);return}e.categoryId&&(u.query.cats=[e.categoryId]),v.push({name:"search"})}function D(){v.push({name:"newestProduct"})}async function n(){try{const[e]=await Promise.all([X.listProducts(),b.init()]);i.value=e}catch(e){console.log(e)}try{k.value=await X.getLatestGoldPrice()}catch{k.value=null}try{m.value=await X.getHomeSlider()}catch{m.value=null}}async function o(){await n(),c.value=!1}return Z(async()=>{await n(),p.value=!1,!g.value&&(await ce(),requestAnimationFrame(()=>{g.value=!0,y=!0}))}),(e,t)=>{const s=_e("container");return a(),l("div",Ze,[_("header",et,[_("div",tt,[t[1]||(t[1]=_("img",{src:ue,alt:"منتزر",class:"home__logo"},null,-1)),P(pe,{quote:k.value,compact:"",class:"home__rate"},null,8,["quote"])])]),P($(fe),{modelValue:c.value,"onUpdate:modelValue":t[0]||(t[0]=d=>c.value=d),onRefresh:o},{pulling:z(()=>[P($(Y),{size:"18"})]),loosing:z(()=>[P($(Y),{size:"18"})]),loading:z(()=>[P($(Y),{size:"18"})]),success:z(()=>[...t[2]||(t[2]=[_("span",null,null,-1)])]),default:z(()=>[P(s,{class:N(["home__body",{"is-revealed":g.value}])},{default:z(()=>[E.value.length?(a(),q(Se,{key:0,slides:E.value,class:"home__hero home__reveal",style:B(f(0)),onSelect:O},null,8,["slides","style"])):x("",!0),$(b).cats.length?(a(),l("section",{key:1,class:"home__section home__reveal",style:B(f(1))},[t[3]||(t[3]=_("h2",{class:"home__heading"},"دسته بندی ها",-1)),P(Me,{categories:$(b).cats,"active-id":null,onSelect:M},null,8,["categories"])],4)):x("",!0),h.value.length?(a(),l("section",{key:2,class:"home__section home__reveal",style:B(f(2))},[t[4]||(t[4]=_("h2",{class:"home__heading"},"محصولات جدید",-1)),P(Ye,{products:S.value,onOpen:L,onAll:D},null,8,["products"]),_("div",nt,[(a(!0),l(A,null,G(w.value,(d,C)=>(a(),q(ee,{key:d.id,value:d,class:"home__reveal",style:B(f(3+C)),onOpen:L},null,8,["value","style"]))),128))])],4)):x("",!0),!p.value&&!i.value.length?(a(),l("section",st,[P(j,{icon:"vuesax-linear:box",size:"26"}),t[5]||(t[5]=_("p",null,"هنوز محصولی در مجموعه ثبت نشده است.",-1))])):x("",!0)]),_:1},8,["class"])]),_:1},8,["modelValue"])])}}}),_t=V(it,[["__scopeId","data-v-3a35bb09"]]);export{_t as default}; diff --git a/apps/user-app-v2/dist/assets/HomeView-waaUoUs9.css b/apps/user-app-v2/dist/assets/HomeView-waaUoUs9.css deleted file mode 100644 index 769735c..0000000 --- a/apps/user-app-v2/dist/assets/HomeView-waaUoUs9.css +++ /dev/null @@ -1 +0,0 @@ -.hero__stage[data-v-97560afa]{position:relative;aspect-ratio:1.063;touch-action:pan-y;-webkit-user-select:none;-moz-user-select:none;user-select:none}.hero__card[data-v-97560afa]{position:absolute;top:0;bottom:0;left:13.45%;right:13.45%;border-radius:32px;overflow:hidden;cursor:pointer;background:#f4f5f6;will-change:transform,opacity}.hero__card.is-active[data-v-97560afa]{box-shadow:0 18px 44px -12px #14161a73,0 0 0 1px #ffffffe6}.hero__art[data-v-97560afa],.hero__artFallback[data-v-97560afa]{width:100%;height:100%;-o-object-fit:cover;object-fit:cover;display:block;transition:filter .42s cubic-bezier(.22,.61,.36,1)}.hero__card:not(.is-active) .hero__art[data-v-97560afa]{filter:grayscale(1)}.hero__artFallback[data-v-97560afa]{background:linear-gradient(140deg,#f4f5f6,#ecedef)}.hero__dots[data-v-97560afa]{display:flex;justify-content:center;gap:6px;padding-top:14px}.hero__dot[data-v-97560afa]{width:6px;height:6px;padding:0;border:0;cursor:pointer;border-radius:999px;background:#ecedef;transition:all .25s ease}.hero__dot.is-active[data-v-97560afa]{width:20px;background:#7a1b33}.cats[data-v-aef04be0]{display:flex;gap:15px;overflow-x:auto;margin:0 -16px;padding:2px 16px;scroll-snap-type:x proximity}.cats__tile[data-v-aef04be0]{scroll-snap-align:start;flex:0 0 auto;width:79px;height:65px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;cursor:pointer;font-family:inherit;border-radius:22px;border:0;background:#f4f5f6;color:#1c2d56;transition:border-color .2s ease,background .2s ease,transform .18s ease}.cats__tile[data-v-aef04be0]:active{transform:scale(.96)}.cats__tile.is-active[data-v-aef04be0]{background:#ecedef}.cats__mark[data-v-aef04be0]{display:grid;place-items:center;color:#1c2d56}.cats__mark img[data-v-aef04be0]{width:27px;height:27px;-o-object-fit:contain;object-fit:contain}.cats__title[data-v-aef04be0]{font-size:11px;font-weight:600;white-space:nowrap;max-width:71px;overflow:hidden;text-overflow:ellipsis}.panel[data-v-4f623012]{cursor:pointer;border-radius:32px;background:#f4f5f6;padding:18px 16px 16px;text-align:center;transition:transform .2s ease,background .2s ease}.panel[data-v-4f623012]:active{transform:scale(.985)}.panel__art[data-v-4f623012]{height:148px;display:flex;align-items:center;justify-content:center}.panel__art img[data-v-4f623012]{max-width:78%;max-height:100%;-o-object-fit:contain;object-fit:contain;display:block}.panel__title[data-v-4f623012]{margin:14px 0 0;font-size:14px;font-weight:600;color:#14161a;line-height:1.6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.panel__meta[data-v-4f623012]{display:flex;align-items:center;justify-content:center;gap:8px;padding-top:9px;font-size:12px}.panel__weight[data-v-4f623012]{color:#22262e;font-weight:500;font-size:14px}.panel__sep[data-v-4f623012]{width:1px;height:12px;background:#ecedef}.panel__wageOld[data-v-4f623012]{color:#8a909c;text-decoration:line-through}.panel__wage[data-v-4f623012]{color:#e31a1a;font-weight:600;font-size:12px!important}.reel__stage[data-v-b79ea2a7]{position:relative;height:252px;touch-action:pan-y;-webkit-user-select:none;-moz-user-select:none;user-select:none;margin:0 -16px 26px}.reel__cell[data-v-b79ea2a7]{position:absolute;top:0;bottom:0;left:13%;right:13%;transform-origin:bottom center;will-change:transform,opacity}.reel__cell[data-v-b79ea2a7]>.panel,.reel__all[data-v-b79ea2a7]{transition:box-shadow .55s cubic-bezier(.21,1.02,.36,1)}.reel__cell.is-active[data-v-b79ea2a7]>.panel,.reel__cell.is-active .reel__all[data-v-b79ea2a7]{box-shadow:0 18px 38px -24px #14161a8c}.reel__cell[data-v-b79ea2a7]>.panel{height:100%;display:flex;flex-direction:column;justify-content:center}.reel__all[data-v-b79ea2a7]{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;cursor:pointer;font-family:inherit;padding:18px 16px;border:0;border-radius:32px;background:#f4f5f6;color:#7a1b33;transition:transform .2s ease,background .2s ease}.reel__all[data-v-b79ea2a7]:active{transform:scale(.985)}.reel__allMark[data-v-b79ea2a7]{width:56px;height:56px;border-radius:999px;display:grid;place-items:center;background:#fff}.reel__allText[data-v-b79ea2a7]{font-size:13.5px;font-weight:700;line-height:1.7}.home[data-v-2cc1ae19]{background:#fff;min-height:100vh}.home__bar[data-v-2cc1ae19]{position:fixed;top:0;left:0;right:0;z-index:20;background:#ffffffd1;-webkit-backdrop-filter:blur(18px) saturate(140%);backdrop-filter:blur(18px) saturate(140%);border-bottom:1px solid rgba(28,45,86,.05);box-shadow:0 8px 20px -18px #1c2d568c}.home__barInner[data-v-2cc1ae19]{max-width:768px;margin:0 auto;padding:10px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px}.home__logo[data-v-2cc1ae19]{height:25px;-o-object-fit:contain;object-fit:contain}.home__body[data-v-2cc1ae19]{padding-top:58px;padding-bottom:90px}.home__reveal[data-v-2cc1ae19]{opacity:0;transform:translate3d(0,14px,0) scale(.98);will-change:transform,opacity}.is-revealed .home__reveal[data-v-2cc1ae19]{opacity:1;transform:translateZ(0) scale(1);transition:opacity .62s cubic-bezier(.32,.72,0,1) var(--reveal-delay, 0ms),transform .62s cubic-bezier(.32,.72,0,1) var(--reveal-delay, 0ms)}@media (prefers-reduced-motion: reduce){.home__reveal[data-v-2cc1ae19]{opacity:1;transform:none}.is-revealed .home__reveal[data-v-2cc1ae19]{transition:none}}.home__hero[data-v-2cc1ae19]{margin-top:18px;margin-inline:-16px}.home__section[data-v-2cc1ae19]{margin-top:30px}.home__heading[data-v-2cc1ae19]{margin:0 0 14px;font-size:16px;font-weight:500;color:#14161a;text-align:right}.home__list[data-v-2cc1ae19]{display:flex;flex-direction:column;gap:14px;margin-top:14px}.home__empty[data-v-2cc1ae19]{margin-top:28px;padding:34px 20px;border:1px dashed #ECEDEF;border-radius:32px;display:flex;flex-direction:column;align-items:center;gap:10px;color:#8a909c}.home__empty p[data-v-2cc1ae19]{margin:0;font-size:12.5px} diff --git a/apps/user-app-v2/dist/assets/IamCallback-CuKyx6n2.js b/apps/user-app-v2/dist/assets/IamCallback-CuKyx6n2.js new file mode 100644 index 0000000..c9ddf71 --- /dev/null +++ b/apps/user-app-v2/dist/assets/IamCallback-CuKyx6n2.js @@ -0,0 +1 @@ +import{d as c,O as n,o as i,s as o,c as l,C as m,f as p}from"./index-BAr1mMLP.js";const d={style:{"min-height":"100vh",display:"grid","place-items":"center"}},_=c({__name:"IamCallback",setup(g){const a=m(),s=n();return i(async()=>{const e=new URLSearchParams(window.location.search);if(sessionStorage.setItem("gb_iam_sso_checked","1"),e.get("error")||!e.get("code")||!e.get("state")){await a.replace({name:"login"});return}try{const t=await o.ssoCallback(e.get("code"),e.get("state"));s.login(t.token,t.customer.id,t.customer.mobile);try{const r=await o.getExpertIdentity();s.setSalesExpert(r.isSalesExpert)}catch{s.setSalesExpert(!1)}await a.replace({name:"home"})}catch{await a.replace({name:"login"})}}),(e,t)=>(p(),l("div",d,"در حال ورود..."))}});export{_ as default}; diff --git a/apps/user-app-v2/dist/assets/KeyCode-BMdFtCT-.js b/apps/user-app-v2/dist/assets/KeyCode-BMdFtCT-.js new file mode 100644 index 0000000..dc5bbef --- /dev/null +++ b/apps/user-app-v2/dist/assets/KeyCode-BMdFtCT-.js @@ -0,0 +1 @@ +import{a9 as d,h as f,an as g,d as P,ab as p,L as C,Q as T,Y as h,x as m,a as x,p as R,bj as y}from"./index-BAr1mMLP.js";var E=!1;try{var c=Object.defineProperty({},"passive",{get:function(){E=!0}});window.addEventListener("testPassive",null,c),window.removeEventListener("testPassive",null,c)}catch{}var j=Symbol("TriggerContextKey"),K=function(e){return e?d(j,{setPortal:function(){},popPortal:!1}):{setPortal:function(){},popPortal:!1}},v=Symbol("PortalContextKey"),b=function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{inTriggerContext:!0};g(v,{inTriggerContext:i.inTriggerContext,shouldRender:f(function(){var n=e||{},u=n.sPopupVisible,t=n.popupRef,l=n.forceRender,r=n.autoDestroy,s=!1;return(u||t||l)&&(s=!0),!u&&r&&(s=!1),s})})},D=function(){b({},{inTriggerContext:!1});var e=d(v,{shouldRender:f(function(){return!1}),inTriggerContext:!1});return{shouldRender:f(function(){return e.shouldRender.value||e.inTriggerContext===!1})}};const N=P({compatConfig:{MODE:3},name:"Portal",inheritAttrs:!1,props:{getContainer:p.func.isRequired,didUpdate:Function},setup:function(e,i){var n=i.slots,u=!0,t,l=D(),r=l.shouldRender;C(function(){u=!1,r.value&&(t=e.getContainer())});var s=T(r,function(){r.value&&!t&&(t=e.getContainer()),t&&s()});return h(function(){m(function(){if(r.value){var o;(o=e.didUpdate)===null||o===void 0||o.call(e,e)}})}),x(function(){t&&t.parentNode&&t.parentNode.removeChild(t)}),function(){if(!r.value)return null;if(u){var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}return t?R(y,{to:t},n):null}}});var w={ESC:27,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40};export{w as K,N as P,K as a,E as s,b as u}; diff --git a/apps/user-app-v2/dist/assets/LoginRegisterView-B7DR4Q72.css b/apps/user-app-v2/dist/assets/LoginRegisterView-B7DR4Q72.css deleted file mode 100644 index a125be9..0000000 --- a/apps/user-app-v2/dist/assets/LoginRegisterView-B7DR4Q72.css +++ /dev/null @@ -1 +0,0 @@ -.otp-single-input{display:flex;align-items:center}.auth[data-v-08d7f1af]{background:#fff;min-height:100vh}.auth__body[data-v-08d7f1af]{padding-top:86px;padding-bottom:90px}.auth__intro[data-v-08d7f1af]{display:flex;flex-direction:column;align-items:center;text-align:center;padding-bottom:24px}.auth__mark[data-v-08d7f1af]{width:64px;height:64px;border-radius:50%;display:grid;place-items:center;color:#7a1b33;background:#fbf2f4}.auth__title[data-v-08d7f1af]{margin:14px 0 0;font-size:16px;font-weight:800;color:#14161a}.auth__sub[data-v-08d7f1af]{margin:6px 0 0;font-size:12.5px;color:#8a909c}.auth__card[data-v-08d7f1af]{padding:18px 16px;border:1px solid #ECEDEF;border-radius:20px;background:#fafafa}.auth__otp[data-v-08d7f1af]{display:flex;justify-content:center;gap:10px;direction:ltr;padding-bottom:6px}.auth__timer[data-v-08d7f1af]{margin:12px 0 16px;text-align:center;font-size:11.5px;color:#5b616e}.auth__form[data-v-08d7f1af] .ant-form-item-label>label{font-size:12px;color:#5b616e}.auth__cta[data-v-08d7f1af]{width:100%;padding:13px 18px;border:0;cursor:pointer;border-radius:14px;font-family:inherit;font-size:13px;font-weight:700;color:#fff;background:#14161a;transition:transform .15s ease,opacity .15s ease}.auth__cta[data-v-08d7f1af]:active{transform:scale(.99)}.auth__cta[data-v-08d7f1af]:disabled{opacity:.45;cursor:default}.auth__switch[data-v-08d7f1af]{margin:20px 0 0;text-align:center;font-size:12px;color:#5b616e}.auth__switch button[data-v-08d7f1af]{border:0;background:none;cursor:pointer;padding:0 3px;font-family:inherit;font-size:12px;font-weight:700;color:#7a1b33}.otp-input{width:48px;height:52px;padding:5px;margin:0;font-size:19px;font-weight:700;color:#14161a;background:#fff;border:1px solid #ECEDEF;border-radius:13px;text-align:center;transition:border-color .18s ease}.otp-input:focus{outline:none;border-color:#14161a}.otp-input.error{border-color:#e31a1a!important}.otp-input::-webkit-inner-spin-button,.otp-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.auth[data-v-23baea3e]{background:#fff;min-height:100vh}.auth__body[data-v-23baea3e]{padding-top:86px;padding-bottom:90px}.auth__intro[data-v-23baea3e]{display:flex;flex-direction:column;align-items:center;text-align:center;padding-bottom:24px}.auth__mark[data-v-23baea3e]{width:64px;height:64px;border-radius:50%;display:grid;place-items:center;color:#7a1b33;background:#fbf2f4}.auth__title[data-v-23baea3e]{margin:14px 0 0;font-size:16px;font-weight:800;color:#14161a}.auth__sub[data-v-23baea3e]{margin:6px 0 0;font-size:12.5px;color:#8a909c}.auth__card[data-v-23baea3e]{padding:18px 16px 20px;border:1px solid #ECEDEF;border-radius:20px;background:#fafafa}.auth__form[data-v-23baea3e] .ant-form-item-label>label{font-size:12px;color:#5b616e}.auth__cta[data-v-23baea3e]{width:100%;margin-top:4px;padding:13px 18px;border:0;cursor:pointer;border-radius:14px;font-family:inherit;font-size:13px;font-weight:700;color:#fff;background:#14161a;transition:transform .15s ease}.auth__cta[data-v-23baea3e]:active{transform:scale(.99)}.auth__switch[data-v-23baea3e]{margin:20px 0 0;text-align:center;font-size:12px;color:#5b616e}.auth__switch button[data-v-23baea3e]{border:0;background:none;cursor:pointer;padding:0 3px;font-family:inherit;font-size:12px;font-weight:700;color:#7a1b33} diff --git a/apps/user-app-v2/dist/assets/LoginRegisterView-CBenlDic.css b/apps/user-app-v2/dist/assets/LoginRegisterView-CBenlDic.css new file mode 100644 index 0000000..c11660b --- /dev/null +++ b/apps/user-app-v2/dist/assets/LoginRegisterView-CBenlDic.css @@ -0,0 +1 @@ +.otp-single-input{display:flex;align-items:center}.auth[data-v-9dcc7c41]{background:var(--c-page);min-height:100vh}.auth__body[data-v-9dcc7c41]{padding-top:86px;padding-bottom:90px}.auth__intro[data-v-9dcc7c41]{display:flex;flex-direction:column;align-items:center;text-align:center;padding-bottom:24px}.auth__mark[data-v-9dcc7c41]{width:64px;height:64px;border-radius:50%;display:grid;place-items:center;color:var(--c-wine);background:var(--c-wineWash)}.auth__title[data-v-9dcc7c41]{margin:14px 0 0;font-size:16px;font-weight:800;color:var(--c-ink)}.auth__sub[data-v-9dcc7c41]{margin:6px 0 0;font-size:12.5px;color:var(--c-inkFaint)}.auth__card[data-v-9dcc7c41]{padding:18px 16px;border:1px solid var(--c-hairline);border-radius:20px;background:var(--c-canvasSoft)}.auth__otp[data-v-9dcc7c41]{display:flex;justify-content:center;gap:10px;direction:ltr;padding-bottom:6px}.auth__timer[data-v-9dcc7c41]{margin:12px 0 16px;text-align:center;font-size:11.5px;color:var(--c-inkMuted)}.auth__form[data-v-9dcc7c41] .ant-form-item-label>label{font-size:12px;color:var(--c-inkMuted)}.auth__cta[data-v-9dcc7c41]{width:100%;padding:13px 18px;border:0;cursor:pointer;border-radius:14px;font-family:inherit;font-size:13px;font-weight:700;color:var(--c-onInk);background:var(--c-ink);transition:transform .15s ease,opacity .15s ease}.auth__cta[data-v-9dcc7c41]:active{transform:scale(.99)}.auth__cta[data-v-9dcc7c41]:disabled{opacity:.45;cursor:default}.auth__switch[data-v-9dcc7c41]{margin:20px 0 0;text-align:center;font-size:12px;color:var(--c-inkMuted)}.auth__switch button[data-v-9dcc7c41]{border:0;background:none;cursor:pointer;padding:0 3px;font-family:inherit;font-size:12px;font-weight:700;color:var(--c-wine)}.otp-input{width:48px;height:52px;padding:5px;margin:0;font-size:19px;font-weight:700;color:var(--c-ink);background:var(--c-canvas);border:1px solid var(--c-hairline);border-radius:13px;text-align:center;transition:border-color .18s ease}.otp-input:focus{outline:none;border-color:var(--c-ink)}.otp-input.error{border-color:#e31a1a!important}.otp-input::-webkit-inner-spin-button,.otp-input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.reg[data-v-84dbe021]{min-height:100vh;background:var(--c-page)}.reg__body[data-v-84dbe021]{padding-top:78px;padding-bottom:calc(150px + env(safe-area-inset-bottom,0px))}.reg__head[data-v-84dbe021]{padding:6px 2px 22px}.reg__steps[data-v-84dbe021]{display:grid;grid-template-columns:1fr 1fr;gap:6px}.reg__seg[data-v-84dbe021]{position:relative;height:4px;border-radius:4px;background:var(--c-hairline);overflow:hidden}.reg__seg[data-v-84dbe021]:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;border-radius:inherit;background:var(--c-wine);transform:scaleX(0);transform-origin:right center;transition:transform .5s cubic-bezier(.65,0,.35,1)}.reg__seg.is-on[data-v-84dbe021]:after{transform:scaleX(1)}.reg__stepLabel[data-v-84dbe021]{margin:14px 0 0;font-size:11.5px;font-weight:700;color:var(--c-wine)}.reg__title[data-v-84dbe021]{margin:4px 0 0;font-size:20px;font-weight:800;color:var(--c-ink);letter-spacing:-.2px}.reg__sub[data-v-84dbe021]{margin:6px 0 0;font-size:12.5px;line-height:1.8;color:var(--c-inkMuted)}.reg__row[data-v-84dbe021]{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px}.reg__form[data-v-84dbe021] .ant-form-item{display:flex;flex-direction:column;flex-wrap:nowrap;min-width:0;margin-bottom:16px}.reg__form[data-v-84dbe021] .ant-form-item-label,.reg__form[data-v-84dbe021] .ant-form-item-control{flex:none;width:100%;max-width:100%;min-width:0;text-align:right}.reg__form[data-v-84dbe021] .ant-form-item-label{padding:0 0 6px;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.reg__form[data-v-84dbe021] .ant-form-item-label>label{height:auto;font-size:12px;font-weight:700;color:var(--c-inkSoft)}.reg__form[data-v-84dbe021] .ant-form-item-label>label:before{display:none!important}.reg__form[data-v-84dbe021] .ant-input,.reg__form[data-v-84dbe021] .ant-input-affix-wrapper{border-radius:14px;border:1.5px solid var(--c-hairline);background:var(--c-canvasSoft);font-family:inherit;font-size:14px;color:var(--c-ink);box-shadow:none;transition:border-color .2s ease,background .2s ease,box-shadow .2s ease}.reg__form[data-v-84dbe021] .ant-input{min-height:50px;padding:12px 14px}.reg__form[data-v-84dbe021] .ant-input-affix-wrapper{min-height:50px;padding:0 14px}.reg__form[data-v-84dbe021] .ant-input-affix-wrapper .ant-input{min-height:46px;padding:0;border:0;background:transparent;box-shadow:none}.reg__form[data-v-84dbe021] textarea.ant-input{min-height:96px;line-height:1.8;resize:none}.reg__form[data-v-84dbe021] .ant-input-prefix{margin-inline-end:10px;color:var(--c-inkFaint);transition:color .2s ease}.reg__form[data-v-84dbe021] .ant-input::-moz-placeholder{color:var(--c-inkFaint)}.reg__form[data-v-84dbe021] .ant-input::placeholder{color:var(--c-inkFaint)}.reg__form[data-v-84dbe021] .ant-input:hover,.reg__form[data-v-84dbe021] .ant-input-affix-wrapper:hover{border-color:var(--c-hairlineStrong)}.reg__form[data-v-84dbe021] .ant-input:focus,.reg__form[data-v-84dbe021] .ant-input-focused,.reg__form[data-v-84dbe021] .ant-input-affix-wrapper-focused{border-color:var(--c-wine);background:var(--c-canvas);box-shadow:0 0 0 4px rgb(var(--c-wine-rgb) / 10%)}.reg__form[data-v-84dbe021] .ant-input:focus .ant-input-prefix,.reg__form[data-v-84dbe021] .ant-input-focused .ant-input-prefix,.reg__form[data-v-84dbe021] .ant-input-affix-wrapper-focused .ant-input-prefix{color:var(--c-wine)}.reg__form[data-v-84dbe021] .ant-input-affix-wrapper-focused .ant-input-prefix{color:var(--c-wine)}.reg__form[data-v-84dbe021] .ant-form-item-has-error .ant-input,.reg__form[data-v-84dbe021] .ant-form-item-has-error .ant-input-affix-wrapper{border-color:var(--c-red)!important;background:rgb(var(--c-red-rgb) / 3%)}.reg__form[data-v-84dbe021] .ant-form-item-has-error .ant-input:focus,.reg__form[data-v-84dbe021] .ant-form-item-has-error .ant-input-affix-wrapper-focused{box-shadow:0 0 0 4px rgb(var(--c-red-rgb) / 10%)!important}.reg__form[data-v-84dbe021] .ant-form-item-has-error .ant-input-affix-wrapper .ant-input{background:transparent;border:0!important}.reg__form[data-v-84dbe021] .ant-form-item-explain,.reg__form[data-v-84dbe021] .ant-form-item-extra{min-height:0;margin-top:6px;font-size:11.5px;line-height:1.6}.reg__form[data-v-84dbe021] .ant-form-item-extra{color:var(--c-inkFaint)}.reg__form[data-v-84dbe021] .ant-form-item-children-icon{display:none}.reg__num[data-v-84dbe021] input{direction:ltr;text-align:right;letter-spacing:.5px}.reg__note[data-v-84dbe021]{display:flex;align-items:flex-start;gap:10px;margin-top:4px;padding:12px 14px;border-radius:14px;background:var(--c-wineWash);color:var(--c-wine);font-size:12px;font-weight:600;line-height:1.8}.reg__note[data-v-84dbe021] svg{flex:0 0 auto;margin-top:2px}.reg__footer[data-v-84dbe021]{position:fixed;left:0;right:0;bottom:0;z-index:15;padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px));background:rgb(var(--c-canvas-rgb) / 86%);-webkit-backdrop-filter:blur(16px) saturate(180%);backdrop-filter:blur(16px) saturate(180%);border-top:1px solid var(--c-hairline)}.reg__footerInner[data-v-84dbe021]{max-width:736px;margin:0 auto}.reg__cta[data-v-84dbe021]{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:52px;padding:0 18px;border:0;cursor:pointer;border-radius:16px;font-family:inherit;font-size:14px;font-weight:800;color:var(--c-onInk);background:var(--c-ink);box-shadow:0 10px 22px -12px rgb(var(--c-ink-rgb) / 70%);transition:transform .15s ease,opacity .2s ease}.reg__cta[data-v-84dbe021]:active{transform:scale(.98)}.reg__cta.is-loading[data-v-84dbe021],.reg__cta[data-v-84dbe021]:disabled{opacity:.75;cursor:default}.reg__cta[data-v-84dbe021] svg{transition:transform .2s ease}.reg__cta[data-v-84dbe021]:active svg{transform:translate(-3px)}.reg__spinner[data-v-84dbe021]{width:16px;height:16px;border-radius:50%;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;animation:reg-spin-84dbe021 .7s linear infinite}.reg__ghost[data-v-84dbe021]{width:100%;min-height:50px;border:1.5px solid var(--c-hairline);border-radius:16px;background:var(--c-canvas);cursor:pointer;font-family:inherit;font-size:13.5px;font-weight:700;color:var(--c-ink)}.reg__switch[data-v-84dbe021]{margin:10px 0 0;text-align:center;font-size:12px;color:var(--c-inkMuted)}.reg__switch button[data-v-84dbe021]{border:0;background:none;cursor:pointer;padding:0 3px;font-family:inherit;font-size:12px;font-weight:800;color:var(--c-wine)}.reg__done[data-v-84dbe021]{display:flex;flex-direction:column;align-items:center;text-align:center;padding-top:120px;padding-bottom:40px}.reg__doneMark[data-v-84dbe021]{position:relative;display:grid;place-items:center;width:88px;height:88px;border-radius:26px;color:var(--c-green);background:rgb(var(--c-green-rgb) / 10%);animation:reg-pop-84dbe021 .6s cubic-bezier(.2,1.5,.4,1) both}.reg__doneMark[data-v-84dbe021] svg{animation:reg-pop-84dbe021 .6s .15s cubic-bezier(.2,1.6,.4,1) both}.reg__doneRing[data-v-84dbe021]{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:inherit;border:2px solid var(--c-green);opacity:0;animation:reg-ring-84dbe021 1.1s .3s ease-out both}.reg__doneTitle[data-v-84dbe021]{margin:22px 0 0;font-size:19px;font-weight:800;color:var(--c-ink)}.reg__doneText[data-v-84dbe021]{max-width:320px;margin:10px 0 0;font-size:13px;line-height:2;color:var(--c-inkMuted)}.reg__ltr[data-v-84dbe021]{direction:ltr;unicode-bidi:isolate;font-weight:700;color:var(--c-ink)}.reg__doneActions[data-v-84dbe021]{display:grid;gap:10px;width:100%;max-width:360px;margin-top:30px}.reg-next-enter-active[data-v-84dbe021],.reg-next-leave-active[data-v-84dbe021],.reg-prev-enter-active[data-v-84dbe021],.reg-prev-leave-active[data-v-84dbe021]{transition:transform .28s cubic-bezier(.65,0,.35,1),opacity .22s ease}.reg-next-enter-from[data-v-84dbe021],.reg-prev-leave-to[data-v-84dbe021]{transform:translate(-24px);opacity:0}.reg-next-leave-to[data-v-84dbe021],.reg-prev-enter-from[data-v-84dbe021]{transform:translate(24px);opacity:0}.reg-fade-enter-active[data-v-84dbe021],.reg-fade-leave-active[data-v-84dbe021]{transition:opacity .25s ease}.reg-fade-enter-from[data-v-84dbe021],.reg-fade-leave-to[data-v-84dbe021]{opacity:0}@keyframes reg-spin-84dbe021{to{transform:rotate(360deg)}}@keyframes reg-pop-84dbe021{0%{transform:scale(.4);opacity:0}to{transform:scale(1);opacity:1}}@keyframes reg-ring-84dbe021{0%{transform:scale(1);opacity:.6}to{transform:scale(1.55);opacity:0}}@media (prefers-reduced-motion: reduce){.reg-next-enter-active[data-v-84dbe021],.reg-next-leave-active[data-v-84dbe021],.reg-prev-enter-active[data-v-84dbe021],.reg-prev-leave-active[data-v-84dbe021]{transition:opacity .2s ease}.reg-next-enter-from[data-v-84dbe021],.reg-next-leave-to[data-v-84dbe021],.reg-prev-enter-from[data-v-84dbe021],.reg-prev-leave-to[data-v-84dbe021]{transform:none}.reg__doneMark[data-v-84dbe021],.reg__doneMark[data-v-84dbe021] svg,.reg__doneRing[data-v-84dbe021]{animation:none}} diff --git a/apps/user-app-v2/dist/assets/LoginRegisterView-Co0TkemA.js b/apps/user-app-v2/dist/assets/LoginRegisterView-Co0TkemA.js deleted file mode 100644 index b8ec2d9..0000000 --- a/apps/user-app-v2/dist/assets/LoginRegisterView-Co0TkemA.js +++ /dev/null @@ -1 +0,0 @@ -import{d as B,g as F,E as j,B as Z,f as y,c as w,w as M,G as Q,b as c,i as S,e as T,F as L,r as ee,j as U,v as q,H as te,D as se,s as N,l as a,q as f,I as K,t as A,u as s,J as ne,C as H,A as D,p as ae,h as oe,_ as W}from"./index-CZjgV-Yn.js";import{P as z}from"./PageBar-Bkc2Ht1O.js";import{_ as le}from"./NotifyVant.vue_vue_type_script_setup_true_lang-CY4DS_6T.js";import{a as ue}from"./client-WIBW0tF5.js";import{a as G,F as I,I as $,T as ie}from"./index-DtVU50JL.js";import{a as re}from"./Spinner.vue_vue_type_style_index_0_lang-ghXHCVpI.js";import{_ as ce}from"./DialogVant.vue_vue_type_style_index_0_lang-DKsdrzNc.js";import"./FormItemContext-Dxet_qkI.js";import"./classCallCheck-BSDY9VEy.js";import"./_commonjsHelpers-Cpj98o6Y.js";const de={class:"otp-single-input"},pe=["type","placeholder","disabled"],me={key:0},fe=["innerHTML"],ve=B({__name:"SingleOtpInput",props:{inputType:{default:"tel"},value:{},separator:{},focus:{type:Boolean},inputClasses:{},shouldAutoFocus:{type:Boolean},isLastChild:{type:Boolean},placeholder:{},disabled:{type:Boolean}},emits:["on-change","on-keydown","on-paste","on-focus","on-blur"],setup(o,{emit:g}){const r=o,v=g,n=F(r.value||""),l=F(null),u=()=>(n.value=n.value.toString(),n.value.length>1&&(n.value=n.value.slice(0,1)),v("on-change",n.value)),_=d=>d>=48&&d<=57||d>=96&&d<=105,p=d=>{r.disabled&&d.preventDefault();const m=d||window.event,k=m.which?m.which:m.keyCode;_(k)||[8,9,13,37,39,46,86].includes(k)?v("on-keydown",d):m.preventDefault()},e=d=>v("on-paste",d),h=()=>(l.value.select(),v("on-focus")),i=()=>v("on-blur");return j(()=>r.value,(d,m)=>{d!==m&&(n.value=d??"")}),j(()=>r.focus,(d,m)=>{m!==d&&l.value&&r.focus&&(l.value.focus(),l.value.select())}),Z(()=>{l.value&&r.focus&&r.shouldAutoFocus&&(l.value.focus(),l.value.select())}),(d,m)=>(y(),w("div",de,[M(c("input",{type:o.inputType,placeholder:o.placeholder,disabled:o.disabled,ref_key:"input",ref:l,min:"0",max:"9",maxlength:"1",pattern:"[0-9]","onUpdate:modelValue":m[0]||(m[0]=k=>n.value=k),class:S(o.inputClasses),onInput:u,onKeydown:p,onPaste:e,onFocus:h,onBlur:i},null,42,pe),[[Q,n.value]]),!o.isLastChild&&o.separator?(y(),w("span",me,[c("span",{innerHTML:o.separator},null,8,fe)])):T("",!0)]))}}),he={class:"flex ltr justify-around w-full"},_e=8,ye=37,ge=39,be=46,we=B({__name:"OtpInput",props:{defaultFocus:{type:Boolean},numInputs:{default:4},separator:{},inputClasses:{},inputType:{},shouldAutoFocus:{type:Boolean,default:!1},placeholder:{},disabled:{type:Boolean,default:!1}},emits:["on-change","on-complete"],setup(o,{emit:g}){const r=o,v=g,n=F(0),l=F([]),u=F([]),_=t=>{r.defaultFocus&&t{n.value=-1},e=()=>l.value.join("").length===r.numInputs?v("on-complete",l.value.join("")):"Wait until the user enters the required number of characters",h=t=>{n.value=Math.max(Math.min(r.numInputs-1,t),0)},i=()=>h(n.value+1),d=()=>h(n.value-1),m=t=>{u.value=Object.assign([],l.value),typeof t=="string"&&t===""?l.value.splice(n.value,1):l.value[n.value]=t,u.value.join("")!==l.value.join("")&&(v("on-change",l.value.join("")),e())},k=t=>{var P;t.preventDefault();const C=(((P=t.clipboardData)==null?void 0:P.getData("text/plain"))??"").slice(0,r.numInputs-n.value).split("");if(r.inputType==="number"&&!C.join("").match(/^\d+$/))return"Invalid pasted data";const V=l.value.slice(0,n.value).concat(C);return V.slice(0,r.numInputs).forEach((X,Y)=>{l.value[Y]=X}),h(V.slice(0,r.numInputs).length),e()},R=t=>{m(t),i()},b=t=>{switch(t.keyCode){case _e:t.preventDefault(),m(""),d();break;case be:t.preventDefault(),m("");break;case ye:t.preventDefault(),d();break;case ge:t.preventDefault(),i();break}};return(t,E)=>(y(),w("div",null,[c("div",he,[(y(!0),w(L,null,ee(o.numInputs,(C,x)=>(y(),U(ve,{key:x,focus:n.value===x,value:l.value[x],separator:o.separator,"input-type":o.inputType,"input-classes":o.inputClasses,"is-last-child":x===o.numInputs-1,"should-auto-focus":o.shouldAutoFocus,placeholder:o.placeholder,disabled:o.disabled,onOnChange:R,onOnKeydown:b,onOnPaste:k,onOnFocus:V=>_(x),onOnBlur:p},null,8,["focus","value","separator","input-type","input-classes","is-last-child","should-auto-focus","placeholder","disabled","onOnFocus"]))),128))])]))}}),ke=o=>` مقدار ${o} نا معتبر است `,J=o=>({pattern:/^(\+98|0098|98|0)?9\d{9}$/g,message:ke(o)}),O=o=>({required:!0,message:` لطفا ${o} را وارد کنید `}),Ce={class:"auth"},Ie={class:"auth__intro"},Oe={class:"auth__mark","aria-hidden":"true"},Fe={class:"auth__sub"},$e={class:"auth__card"},xe={key:0,class:"auth__timer"},De={key:1,class:"auth__timer"},Be=["disabled"],Te={class:"auth__switch"},Re=B({__name:"LoginView",emits:["register"],setup(o,{emit:g}){const r=g,v=q(),n=te(),l=se(),u=D({username:void 0}),_=D({show:!1,text:"اطلاعات کاربری در سیستم وجود ندارد."}),p=D({step:1,loading:!1,defaultFocus:!1});let e=null;const h=F(0),i=()=>{h.value>0&&setTimeout(()=>{h.value>0&&(h.value-=1,i())},1e3)},d=async()=>{try{if(p.loading=!0,e=(await ue.listCustomers()).find(t=>t.mobile===u.username)??null,!e){_.text="اطلاعات کاربری در سیستم وجود ندارد.",_.show=!0;return}p.step=2,h.value=120,i(),await ae(()=>{p.defaultFocus=!0})}catch(b){console.log(b)}finally{p.loading=!1}},m=async b=>{try{if(p.loading=!0,!e)return;l.login(e.id,e.mobile);const t=typeof n.query.redirect=="string"?n.query.redirect:void 0;await v.push(t??{name:"home"}),_.text="با موفقیت وارد شدید",_.show=!0}finally{p.loading=!1}},k=b=>b<10?"0"+b:b,R=oe(()=>p.step===1?"دریافت رمز عبور":"دریافت مجدد رمز عبور");return(b,t)=>{const E=N("container");return y(),w("div",Ce,[a(le,{timeOut:2e3,modelValue:_.show,"onUpdate:modelValue":t[0]||(t[0]=C=>_.show=C),text:_.text,color:"background-color: #DC2626"},null,8,["modelValue","text"]),a(z,{title:"ورود","back-to":"home"}),a(E,{class:"auth__body"},{default:f(()=>[c("section",Ie,[c("div",Oe,[a(K,{icon:"vuesax-linear:security-user",size:"28"})]),t[3]||(t[3]=c("h2",{class:"auth__title"},"ورود به منتزر",-1)),c("p",Fe,A(p.step===1?"شماره موبایل خود را وارد کنید":"رمز یکبارمصرف را وارد کنید"),1)]),c("section",$e,[p.step===2?(y(),w(L,{key:0},[a(we,{class:"auth__otp","input-classes":"otp-input",inputType:"tel","num-inputs":4,"should-auto-focus":!0,defaultFocus:p.defaultFocus,onOnComplete:m},null,8,["defaultFocus"]),h.value>0?(y(),w("p",xe," امکان دریافت مجدد رمز در "+A(k(h.value))+" ثانیه دیگر ",1)):(y(),w("p",De,"برای دریافت رمز عبور مجدد تلاش کنید"))],64)):T("",!0),a(s(G),{model:u,layout:"vertical",onFinish:d,class:"auth__form"},{default:f(()=>[M(a(s(I),{name:"username",label:"تلفن همراه",rules:[s(O)("تلفن همراه"),s(J)("تلفن همراه")]},{default:f(()=>[a(s($),{type:"number",value:u.username,"onUpdate:value":t[1]||(t[1]=C=>u.username=C)},null,8,["value"])]),_:1},8,["rules"]),[[ne,p.step===1]]),c("button",{type:"submit",class:S(["auth__cta",{"is-loading":p.loading}]),disabled:p.loading||h.value>0&&p.step===2},A(R.value),11,Be)]),_:1},8,["model"])]),c("p",Te,[t[4]||(t[4]=H(" اگر ثبت نام نکرده‌اید ",-1)),c("button",{type:"button",onClick:t[2]||(t[2]=C=>r("register",!0))},"ثبت نام کنید")])]),_:1})])}}}),Ee=W(Re,[["__scopeId","data-v-08d7f1af"]]),Ve="/assets/registerDelay-BdXluE_Y.svg",Ae={class:"auth"},Ue={class:"auth__intro"},Le={class:"auth__mark","aria-hidden":"true"},Pe={class:"auth__card"},je={class:"auth__switch"},Me=["src"],Se=B({__name:"RegisterView",emits:["register"],setup(o,{emit:g}){const r=g,v=q(),n=D({loading:!1}),l=F(!1),u=D({fname:void 0,lname:void 0,mobile:void 0,store_name:void 0,phone:void 0,address:void 0,city:void 0}),_=async()=>{try{n.loading=!0,l.value=!0}finally{n.loading=!1}};return(p,e)=>{const h=N("container");return y(),w("div",Ae,[a(z,{title:"ثبت نام","back-to":"home"}),a(re,{spinning:n.loading,tip:"در حال ثبت اطلاعات"},{default:f(()=>[a(h,{class:"auth__body"},{default:f(()=>[c("section",Ue,[c("div",Le,[a(K,{icon:"vuesax-linear:user-add",size:"28"})]),e[10]||(e[10]=c("h2",{class:"auth__title"},"ساخت حساب کاربری",-1)),e[11]||(e[11]=c("p",{class:"auth__sub"},"اطلاعات فروشگاه خود را وارد کنید",-1))]),c("section",Pe,[a(s(G),{model:u,layout:"vertical",onFinish:_,class:"auth__form"},{default:f(()=>[a(s(I),{name:"fname",label:"نام",rules:s(O)("نام")},{default:f(()=>[a(s($),{value:u.fname,"onUpdate:value":e[0]||(e[0]=i=>u.fname=i)},null,8,["value"])]),_:1},8,["rules"]),a(s(I),{name:"lname",label:"نام خانوادگی",rules:s(O)("نام خانوادگی")},{default:f(()=>[a(s($),{value:u.lname,"onUpdate:value":e[1]||(e[1]=i=>u.lname=i)},null,8,["value"])]),_:1},8,["rules"]),a(s(I),{name:"mobile",label:"شماره موبایل",rules:[s(J)("شماره موبایل"),s(O)("شماره موبایل")]},{default:f(()=>[a(s($),{value:u.mobile,"onUpdate:value":e[2]||(e[2]=i=>u.mobile=i),type:"number"},null,8,["value"])]),_:1},8,["rules"]),a(s(I),{name:"store_name",label:"نام فروشگاه",rules:s(O)("نام فروشگاه")},{default:f(()=>[a(s($),{value:u.store_name,"onUpdate:value":e[3]||(e[3]=i=>u.store_name=i)},null,8,["value"])]),_:1},8,["rules"]),a(s(I),{name:"phone",label:"تلفن فروشگاه",rules:[s(O)("تلفن فروشگاه")]},{default:f(()=>[a(s($),{value:u.phone,"onUpdate:value":e[4]||(e[4]=i=>u.phone=i),type:"number"},null,8,["value"])]),_:1},8,["rules"]),a(s(I),{name:"address",label:"آدرس پستی",rules:s(O)("آدرس")},{default:f(()=>[a(s(ie),{value:u.address,"onUpdate:value":e[5]||(e[5]=i=>u.address=i),rows:3},null,8,["value"])]),_:1},8,["rules"]),a(s(I),{name:"city",label:"شهر",rules:s(O)("شهر")},{default:f(()=>[a(s($),{value:u.city,"onUpdate:value":e[6]||(e[6]=i=>u.city=i)},null,8,["value"])]),_:1},8,["rules"]),e[12]||(e[12]=c("button",{type:"submit",class:"auth__cta"},"ثبت اطلاعات",-1))]),_:1},8,["model"])]),c("p",je,[e[13]||(e[13]=H(" اگر حساب کاربری دارید ",-1)),c("button",{type:"button",onClick:e[7]||(e[7]=i=>r("register",!1))},"وارد شوید")])]),_:1})]),_:1},8,["spinning"]),a(ce,{timeOut:-1,show:l.value,"onUpdate:show":e[9]||(e[9]=i=>l.value=i),closeOnClickOverlay:!1},{img:f(()=>[c("img",{src:s(Ve),alt:"",class:"opacity-80"},null,8,Me)]),title:f(()=>[...e[14]||(e[14]=[c("div",{class:"p-5"}," ثبت نام شما با موفقیت انجام شد. منتظر تایید اطلاعات ثبت نامی شما توسط کارشناسان بمانید. ",-1)])]),button:f(()=>[c("div",{class:"text-center",onClick:e[8]||(e[8]=i=>s(v).push({name:"home"}))},"متوجه شدم")]),_:1},8,["show"])])}}}),qe=W(Se,[["__scopeId","data-v-23baea3e"]]),Qe=B({__name:"LoginRegisterView",setup(o){const g=F(!1),r=v=>g.value=v;return(v,n)=>(y(),w(L,null,[g.value?T("",!0):(y(),U(Ee,{key:0,onRegister:r})),g.value?(y(),U(qe,{key:1,onRegister:r})):T("",!0)],64))}});export{Qe as default}; diff --git a/apps/user-app-v2/dist/assets/LoginRegisterView-DruItYRS.js b/apps/user-app-v2/dist/assets/LoginRegisterView-DruItYRS.js new file mode 100644 index 0000000..946e298 --- /dev/null +++ b/apps/user-app-v2/dist/assets/LoginRegisterView-DruItYRS.js @@ -0,0 +1 @@ +import{d as E,g as x,Q as N,L as Y,f as v,c as b,w as K,R as ee,b as a,i as L,e as D,F as V,r as te,j as S,C as W,S as se,O as ae,B as H,p as n,z as _,I as C,t as I,m,T as ne,N as A,K as M,s as z,x as oe,U as P,h as le,_ as G,V as q}from"./index-BAr1mMLP.js";import{P as J}from"./PageBar-B1ks8U8i.js";import{a as Q,F,I as B,T as ue}from"./index-BkhudXey.js";import"./FormItemContext-YTkEF048.js";import"./classCallCheck-DDMOgDz1.js";import"./raf-nDFcuFT6.js";const re={class:"otp-single-input"},ie=["type","placeholder","disabled"],ce={key:0},de=["innerHTML"],pe=E({__name:"SingleOtpInput",props:{inputType:{default:"tel"},value:{},separator:{},focus:{type:Boolean},inputClasses:{},shouldAutoFocus:{type:Boolean},isLastChild:{type:Boolean},placeholder:{},disabled:{type:Boolean}},emits:["on-change","on-keydown","on-paste","on-focus","on-blur"],setup(u,{emit:k}){const i=u,g=k,r=x(i.value||""),t=x(null),f=()=>(r.value=r.value.toString(),r.value.length>1&&(r.value=r.value.slice(0,1)),g("on-change",r.value)),p=c=>c>=48&&c<=57||c>=96&&c<=105,o=c=>{i.disabled&&c.preventDefault();const d=c||window.event,e=d.which?d.which:d.keyCode;p(e)||[8,9,13,37,39,46,86].includes(e)?g("on-keydown",c):d.preventDefault()},y=c=>g("on-paste",c),w=()=>(t.value.select(),g("on-focus")),$=()=>g("on-blur");return N(()=>i.value,(c,d)=>{c!==d&&(r.value=c??"")}),N(()=>i.focus,(c,d)=>{d!==c&&t.value&&i.focus&&(t.value.focus(),t.value.select())}),Y(()=>{t.value&&i.focus&&i.shouldAutoFocus&&(t.value.focus(),t.value.select())}),(c,d)=>(v(),b("div",re,[K(a("input",{type:u.inputType,placeholder:u.placeholder,disabled:u.disabled,ref_key:"input",ref:t,min:"0",max:"9",maxlength:"1",pattern:"[0-9]","onUpdate:modelValue":d[0]||(d[0]=e=>r.value=e),class:L(u.inputClasses),onInput:f,onKeydown:o,onPaste:y,onFocus:w,onBlur:$},null,42,ie),[[ee,r.value]]),!u.isLastChild&&u.separator?(v(),b("span",ce,[a("span",{innerHTML:u.separator},null,8,de)])):D("",!0)]))}}),me={class:"flex ltr justify-around w-full"},ve=8,_e=37,fe=39,he=46,ge=E({__name:"OtpInput",props:{defaultFocus:{type:Boolean},numInputs:{default:4},separator:{},inputClasses:{},inputType:{},shouldAutoFocus:{type:Boolean,default:!1},placeholder:{},disabled:{type:Boolean,default:!1}},emits:["on-change","on-complete"],setup(u,{emit:k}){const i=u,g=k,r=x(0),t=x([]),f=x([]),p=l=>{i.defaultFocus&&l{r.value=-1},y=()=>t.value.join("").length===i.numInputs?g("on-complete",t.value.join("")):"Wait until the user enters the required number of characters",w=l=>{r.value=Math.max(Math.min(i.numInputs-1,l),0)},$=()=>w(r.value+1),c=()=>w(r.value-1),d=l=>{f.value=Object.assign([],t.value),typeof l=="string"&&l===""?t.value.splice(r.value,1):t.value[r.value]=l,f.value.join("")!==t.value.join("")&&(g("on-change",t.value.join("")),y())},e=l=>{var j;l.preventDefault();const R=(((j=l.clipboardData)==null?void 0:j.getData("text/plain"))??"").slice(0,i.numInputs-r.value).split("");if(i.inputType==="number"&&!R.join("").match(/^\d+$/))return"Invalid pasted data";const U=t.value.slice(0,r.value).concat(R);return U.slice(0,i.numInputs).forEach((Z,X)=>{t.value[X]=Z}),w(U.slice(0,i.numInputs).length),y()},h=l=>{d(l),$()},s=l=>{switch(l.keyCode){case ve:l.preventDefault(),d(""),c();break;case he:l.preventDefault(),d("");break;case _e:l.preventDefault(),c();break;case fe:l.preventDefault(),$();break}};return(l,T)=>(v(),b("div",null,[a("div",me,[(v(!0),b(V,null,te(u.numInputs,(R,O)=>(v(),S(pe,{key:O,focus:r.value===O,value:t.value[O],separator:u.separator,"input-type":u.inputType,"input-classes":u.inputClasses,"is-last-child":O===u.numInputs-1,"should-auto-focus":u.shouldAutoFocus,placeholder:u.placeholder,disabled:u.disabled,onOnChange:h,onOnKeydown:s,onOnPaste:e,onOnFocus:U=>p(O),onOnBlur:o},null,8,["focus","value","separator","input-type","input-classes","is-last-child","should-auto-focus","placeholder","disabled","onOnFocus"]))),128))])]))}}),ye=u=>` مقدار ${u} نا معتبر است `,be=u=>({pattern:/^(\+98|0098|98|0)?9\d{9}$/g,message:ye(u)}),ke=u=>({required:!0,message:` لطفا ${u} را وارد کنید `}),xe={class:"auth"},we={class:"auth__intro"},Ie={class:"auth__mark","aria-hidden":"true"},$e={class:"auth__sub"},Oe={class:"auth__card"},Ce={key:0,class:"auth__timer"},Fe={key:1,class:"auth__timer"},Te=["disabled"],Be={class:"auth__switch"},De=E({__name:"LoginView",emits:["register"],setup(u,{emit:k}){const i=k,g=W(),r=se(),t=ae(),f=M({username:void 0}),p=M({step:1,loading:!1,defaultFocus:!1}),o=x(0),y=()=>{o.value>0&&setTimeout(()=>{o.value>0&&(o.value-=1,y())},1e3)},w=async()=>{try{p.loading=!0,await z.requestOtp(String(f.username??"")),p.step=2,o.value=120,y(),await oe(()=>{p.defaultFocus=!0})}catch(h){const s=h instanceof Error&&/\(429\)/.test(h.message)?c(h):null;P.error(s??"خطا در ارسال کد. لطفاً دوباره تلاش کنید.")}finally{p.loading=!1}},$=async h=>{try{p.loading=!0;const s=await z.verifyOtp(String(f.username??""),h),{token:l,customer:T}=s;t.login(l,T.id,T.mobile);try{const O=await z.getExpertIdentity();t.setSalesExpert(O.isSalesExpert)}catch{t.setSalesExpert(!1)}if(s.iamBootstrapUrl){window.location.assign(s.iamBootstrapUrl);return}const R=typeof r.query.redirect=="string"?r.query.redirect:void 0;await g.push(R??{name:"home"}),P.success("با موفقیت وارد شدید")}catch(s){P.error(s instanceof Error&&/\(429\)/.test(s.message)?c(s)??"تعداد تلاش‌ها بیش از حد مجاز است.":"کد وارد شده صحیح نیست")}finally{p.loading=!1}};function c(h){const s=h.message.match(/\{.*\}/);if(!s)return null;try{const l=JSON.parse(s[0]);return typeof l.message=="string"?l.message:null}catch{return null}}const d=h=>h<10?"0"+h:h,e=le(()=>p.step===1?"دریافت رمز عبور":"دریافت مجدد رمز عبور");return(h,s)=>{const l=H("container");return v(),b("div",xe,[n(J,{title:"ورود","back-to":"home"}),n(l,{class:"auth__body"},{default:_(()=>[a("section",we,[a("div",Ie,[n(C,{icon:"vuesax-linear:security-user",size:"28"})]),s[2]||(s[2]=a("h2",{class:"auth__title"},"ورود به منتزر",-1)),a("p",$e,I(p.step===1?"شماره موبایل خود را وارد کنید":"رمز یکبارمصرف را وارد کنید"),1)]),a("section",Oe,[p.step===2?(v(),b(V,{key:0},[n(ge,{class:"auth__otp","input-classes":"otp-input",inputType:"tel","num-inputs":4,"should-auto-focus":!0,defaultFocus:p.defaultFocus,onOnComplete:$},null,8,["defaultFocus"]),o.value>0?(v(),b("p",Ce," امکان دریافت مجدد رمز در "+I(d(o.value))+" ثانیه دیگر ",1)):(v(),b("p",Fe,"برای دریافت رمز عبور مجدد تلاش کنید"))],64)):D("",!0),n(m(Q),{model:f,layout:"vertical",onFinish:w,class:"auth__form"},{default:_(()=>[K(n(m(F),{name:"username",label:"تلفن همراه",rules:[m(ke)("تلفن همراه"),m(be)("تلفن همراه")]},{default:_(()=>[n(m(B),{type:"number",value:f.username,"onUpdate:value":s[0]||(s[0]=T=>f.username=T)},null,8,["value"])]),_:1},8,["rules"]),[[ne,p.step===1]]),a("button",{type:"submit",class:L(["auth__cta",{"is-loading":p.loading}]),disabled:p.loading||o.value>0&&p.step===2},I(e.value),11,Te)]),_:1},8,["model"])]),a("p",Be,[s[3]||(s[3]=A(" اگر ثبت نام نکرده‌اید ",-1)),a("button",{type:"button",onClick:s[1]||(s[1]=T=>i("register",!0))},"ثبت نام کنید")])]),_:1})])}}}),Se=G(De,[["__scopeId","data-v-9dcc7c41"]]),Re={class:"reg"},Ee={class:"reg__doneMark","aria-hidden":"true"},Ae={class:"reg__doneText"},Le={class:"reg__ltr"},Ue={class:"reg__doneActions"},ze={class:"reg__head"},Pe=["aria-valuenow"],Me={class:"reg__stepLabel"},Ve={class:"reg__title"},je={class:"reg__sub"},Ne={key:"s1",class:"reg__fields"},qe={class:"reg__row"},Ke={key:"s2",class:"reg__fields"},We={class:"reg__note"},He={class:"reg__footer"},Ge={class:"reg__footerInner"},Je=["disabled"],Qe={key:0,class:"reg__spinner keep-motion","aria-hidden":"true"},Ze={key:0,class:"reg__switch"},Xe=E({__name:"RegisterView",emits:["register"],setup(u,{emit:k}){const i=k,g=W(),r=x(),t=x(1),f=x(!1),p=x(!1),o=M({fname:void 0,lname:void 0,mobile:void 0,store_name:void 0,phone:void 0,city:void 0,address:void 0}),y=d=>({required:!0,whitespace:!0,message:`لطفاً ${d} را وارد کنید`});function w(d){return(d??"").replace(/[۰-۹]/g,e=>String(e.charCodeAt(0)-1776)).replace(/[٠-٩]/g,e=>String(e.charCodeAt(0)-1632)).replace(/\D/g,"")}function $(){p.value?g.push({name:"home"}):t.value===2?t.value=1:i("register",!1)}async function c(){if(t.value===1){t.value=2,window.scrollTo({top:0,behavior:"smooth"});return}try{f.value=!0,await new Promise(d=>setTimeout(d,600)),p.value=!0,window.scrollTo({top:0})}finally{f.value=!1}}return(d,e)=>{const h=H("container");return v(),b("div",Re,[n(J,{title:"ثبت نام","back-action":$}),n(q,{name:"reg-fade",mode:"out-in"},{default:_(()=>[p.value?(v(),S(h,{key:"done",class:"reg__body reg__done"},{default:_(()=>[a("div",Ee,[e[10]||(e[10]=a("span",{class:"reg__doneRing"},null,-1)),n(C,{icon:"vuesax-linear:tick-circle",size:"40"})]),e[12]||(e[12]=a("h2",{class:"reg__doneTitle"},"درخواست شما ثبت شد",-1)),a("p",Ae,[A(" اطلاعات فروشگاه "+I(o.store_name)+" برای کارشناسان ما ارسال شد. پس از بررسی و تایید، می‌توانید با شماره ",1),a("span",Le,I(o.mobile),1),e[11]||(e[11]=A(" وارد شوید. ",-1))]),a("div",Ue,[a("button",{type:"button",class:"reg__cta",onClick:e[0]||(e[0]=s=>m(g).push({name:"home"}))},"بازگشت به صفحه اصلی"),a("button",{type:"button",class:"reg__ghost",onClick:e[1]||(e[1]=s=>i("register",!1))},"رفتن به صفحه ورود")])]),_:1})):(v(),S(h,{key:"form",class:"reg__body"},{default:_(()=>[a("header",ze,[a("div",{class:"reg__steps",role:"progressbar","aria-valuenow":t.value,"aria-valuemin":"1","aria-valuemax":"2"},[e[13]||(e[13]=a("span",{class:"reg__seg is-on"},null,-1)),a("span",{class:L(["reg__seg",{"is-on":t.value===2}])},null,2)],8,Pe),a("p",Me,"مرحله "+I(t.value===1?"۱":"۲")+" از ۲",1),a("h2",Ve,I(t.value===1?"اطلاعات شما":"اطلاعات فروشگاه"),1),a("p",je,I(t.value===1?"برای ساخت حساب فروشگاه، ابتدا خودتان را معرفی کنید.":"این اطلاعات برای ارسال سفارش و تایید حساب استفاده می‌شود."),1)]),n(m(Q),{ref_key:"formRef",ref:r,model:o,layout:"vertical",class:"reg__form",onFinish:c},{default:_(()=>[n(q,{name:t.value===2?"reg-next":"reg-prev",mode:"out-in"},{default:_(()=>[t.value===1?(v(),b("div",Ne,[a("div",qe,[n(m(F),{name:"fname",label:"نام",rules:[y("نام خود")]},{default:_(()=>[n(m(B),{value:o.fname,"onUpdate:value":e[2]||(e[2]=s=>o.fname=s),placeholder:"مثلاً علی",autocomplete:"given-name",enterkeyhint:"next"},null,8,["value"])]),_:1},8,["rules"]),n(m(F),{name:"lname",label:"نام خانوادگی",rules:[y("نام خانوادگی")]},{default:_(()=>[n(m(B),{value:o.lname,"onUpdate:value":e[3]||(e[3]=s=>o.lname=s),placeholder:"مثلاً محمدی",autocomplete:"family-name",enterkeyhint:"next"},null,8,["value"])]),_:1},8,["rules"])]),n(m(F),{name:"mobile",label:"شماره موبایل",rules:[y("شماره موبایل"),{pattern:/^09\d{9}$/,message:"شماره موبایل باید ۱۱ رقم و با ۰۹ شروع شود"}],extra:"کد ورود به این شماره پیامک می‌شود."},{default:_(()=>[n(m(B),{value:o.mobile,class:"reg__num",type:"tel",inputmode:"numeric",maxlength:11,placeholder:"09123456789",autocomplete:"tel",enterkeyhint:"next","onUpdate:value":e[4]||(e[4]=s=>o.mobile=w(s))},{prefix:_(()=>[n(C,{icon:"vuesax-linear:mobile",size:"18"})]),_:1},8,["value"])]),_:1},8,["rules"])])):(v(),b("div",Ke,[n(m(F),{name:"store_name",label:"نام فروشگاه",rules:[y("نام فروشگاه")]},{default:_(()=>[n(m(B),{value:o.store_name,"onUpdate:value":e[5]||(e[5]=s=>o.store_name=s),placeholder:"مثلاً گالری طلای آفتاب",autocomplete:"organization",enterkeyhint:"next"},{prefix:_(()=>[n(C,{icon:"vuesax-linear:shop",size:"18"})]),_:1},8,["value"])]),_:1},8,["rules"]),n(m(F),{name:"phone",label:"تلفن فروشگاه",rules:[y("تلفن فروشگاه"),{pattern:/^(0\d{10}|\d{8})$/,message:"تلفن را با کد شهر وارد کنید، مثلاً 02112345678"}]},{default:_(()=>[n(m(B),{value:o.phone,class:"reg__num",type:"tel",inputmode:"numeric",maxlength:11,placeholder:"02112345678",autocomplete:"tel-national",enterkeyhint:"next","onUpdate:value":e[6]||(e[6]=s=>o.phone=w(s))},{prefix:_(()=>[n(C,{icon:"vuesax-linear:call",size:"18"})]),_:1},8,["value"])]),_:1},8,["rules"]),n(m(F),{name:"city",label:"شهر",rules:[y("شهر")]},{default:_(()=>[n(m(B),{value:o.city,"onUpdate:value":e[7]||(e[7]=s=>o.city=s),placeholder:"مثلاً تهران",autocomplete:"address-level2",enterkeyhint:"next"},{prefix:_(()=>[n(C,{icon:"vuesax-linear:buildings",size:"18"})]),_:1},8,["value"])]),_:1},8,["rules"]),n(m(F),{name:"address",label:"آدرس پستی",rules:[y("آدرس فروشگاه")]},{default:_(()=>[n(m(ue),{value:o.address,"onUpdate:value":e[8]||(e[8]=s=>o.address=s),rows:3,placeholder:"خیابان، کوچه، پلاک، واحد",autocomplete:"street-address"},null,8,["value"])]),_:1},8,["rules"]),a("div",We,[n(C,{icon:"vuesax-linear:shield-tick",size:"18"}),e[14]||(e[14]=a("span",null,"حساب شما پس از بررسی اطلاعات توسط کارشناسان فعال می‌شود.",-1))])]))]),_:1},8,["name"]),a("footer",He,[a("div",Ge,[a("button",{type:"submit",class:L(["reg__cta",{"is-loading":f.value}]),disabled:f.value},[f.value?(v(),b("span",Qe)):D("",!0),a("span",null,I(t.value===1?"ادامه":f.value?"در حال ثبت…":"ثبت درخواست"),1),t.value===1?(v(),S(C,{key:1,icon:"vuesax-linear:arrow-left",size:"18"})):D("",!0)],10,Je),t.value===1?(v(),b("p",Ze,[e[15]||(e[15]=A(" حساب دارید؟ ",-1)),a("button",{type:"button",onClick:e[9]||(e[9]=s=>i("register",!1))},"وارد شوید")])):D("",!0)])])]),_:1},8,["model"])]),_:1}))]),_:1})])}}}),Ye=G(Xe,[["__scopeId","data-v-84dbe021"]]),lt=E({__name:"LoginRegisterView",setup(u){const k=x(!1),i=g=>k.value=g;return(g,r)=>(v(),b(V,null,[k.value?D("",!0):(v(),S(Se,{key:0,onRegister:i})),k.value?(v(),S(Ye,{key:1,onRegister:i})):D("",!0)],64))}});export{lt as default}; diff --git a/apps/user-app-v2/dist/assets/NewestView-9BZMw3ID.css b/apps/user-app-v2/dist/assets/NewestView-9BZMw3ID.css deleted file mode 100644 index bc48a49..0000000 --- a/apps/user-app-v2/dist/assets/NewestView-9BZMw3ID.css +++ /dev/null @@ -1 +0,0 @@ -.ant-empty .ant-empty-description{font-size:16px!important;font-weight:600;margin-top:-36px}.empty{min-height:calc(100vh - 350px);vertical-align:middle}.newest[data-v-ecd416be]{background:#fff;min-height:100vh}.newest__scroll[data-v-ecd416be]{height:calc(100vh - 61px)}.newest__body[data-v-ecd416be]{padding-top:76px;padding-bottom:90px}.newest__grid[data-v-ecd416be]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.newest__empty[data-v-ecd416be]{margin-top:8px;padding:34px 20px;border:1px dashed #ECEDEF;border-radius:18px;display:flex;flex-direction:column;align-items:center;gap:10px;color:#8a909c}.newest__empty p[data-v-ecd416be]{margin:0;font-size:12.5px} diff --git a/apps/user-app-v2/dist/assets/NewestView-BU18f8_c.js b/apps/user-app-v2/dist/assets/NewestView-BU18f8_c.js new file mode 100644 index 0000000..c393c2f --- /dev/null +++ b/apps/user-app-v2/dist/assets/NewestView-BU18f8_c.js @@ -0,0 +1 @@ +import{d as p,f as n,c,p as a,m as r,E as P,D as b,G as k,n as S,H as B,J as v,j as y,e as h,g as u,s as E,K as L,L as C,z as d,F as I,r as N,I as V,b as $,h as A,B as F,_ as z}from"./index-BAr1mMLP.js";import{P as D}from"./PageBar-B1ks8U8i.js";import{S as H}from"./SectionHead-DadL6umU.js";import{P as j}from"./ProductCard-4TPJHHsT.js";const G={class:"flex justify-center items-center empty"},T=p({__name:"EmptyState",props:{description:{},image:{}},setup(e){return(t,s)=>(n(),c("div",G,[a(r(P),{description:"موردی یافت نشد",image:e.image,class:"h-[200px] w-[200px] opacity-70"},null,8,["image"])]))}}),J="/assets/favoritEmpty-kbtPAdi5.svg",K=p({__name:"ScrollFetchSearch",props:{loading:{type:Boolean},flag:{type:Boolean},padding:{}},emits:["fetch"],setup(e,{emit:t}){const s=t,o=b(),l=u(null);return k(l,()=>{s("fetch")},{distance:50}),(i,f)=>(n(),c("main",{class:"flex flex-col flex-1 overflow-auto no-scrollbar w-[100vw] max-w-screen-md m-auto",style:S({paddingTop:e.padding||r(o).headerHeight+"px"}),ref_key:"scrollArea",ref:l},[B(i.$slots,"default"),a(v,{cls:"my-[10px]",spinning:e.loading,indicator:!0,tip:"درحال دریافت اطلاعات"},null,8,["spinning"]),e.flag?(n(),y(T,{key:0,image:r(J)},null,8,["image"])):h("",!0)],4))}});function M(){const e=L({totalPages:0,productList:[],flag:!1});return{productsData:e,getProducts:async(s,o=!1)=>{if(!o){s.value=!0;try{e.productList=await E.listProducts(),e.flag=e.productList.length<1}catch(l){console.log(l)}finally{s.value=!1}}}}}const Z={class:"newest"},q={key:0,class:"newest__grid"},O={key:1,class:"newest__empty"},g=20,Q=p({__name:"NewestView",setup(e){const{productsData:t,getProducts:s}=M(),o=u(!1),l=u(!1),i=u(g),f=A(()=>t.productList.slice(0,i.value));C(async()=>{await s(o,!1)});const w=async()=>{if(i.value{const x=F("container");return n(),c("div",Z,[a(D,{title:"جدیدترین محصولات","back-to":"home"}),a(v,{spinning:o.value,tip:"درحال دریافت اطلاعات"},{default:d(()=>[a(K,{class:"newest__scroll",loading:l.value,flag:r(t).flag,padding:"0px",onFetch:w},{default:d(()=>[a(x,{class:"newest__body"},{default:d(()=>[a(H,{title:"تازه‌ها",subtitle:"آخرین افزوده‌های مجموعه"}),r(t).productList.length?(n(),c("div",q,[(n(!0),c(I,null,N(f.value,_=>(n(),y(j,{key:_.id,value:_},null,8,["value"]))),128))])):o.value?h("",!0):(n(),c("section",O,[a(V,{icon:"vuesax-linear:box",size:"26"}),m[0]||(m[0]=$("p",null,"هنوز محصولی در مجموعه ثبت نشده است.",-1))]))]),_:1})]),_:1},8,["loading","flag"])]),_:1},8,["spinning"])])}}}),ee=z(Q,[["__scopeId","data-v-4551f84b"]]);export{ee as default}; diff --git a/apps/user-app-v2/dist/assets/NewestView-D2rB4-Sw.css b/apps/user-app-v2/dist/assets/NewestView-D2rB4-Sw.css new file mode 100644 index 0000000..56da1de --- /dev/null +++ b/apps/user-app-v2/dist/assets/NewestView-D2rB4-Sw.css @@ -0,0 +1 @@ +.ant-empty .ant-empty-description{font-size:16px!important;font-weight:600;margin-top:-36px}.empty{min-height:calc(100vh - 350px);vertical-align:middle}.newest[data-v-4551f84b]{background:var(--c-page);min-height:100vh}.newest__scroll[data-v-4551f84b]{height:calc(100vh - 61px)}.newest__body[data-v-4551f84b]{padding-top:76px;padding-bottom:90px}.newest__grid[data-v-4551f84b]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.newest__empty[data-v-4551f84b]{margin-top:8px;padding:34px 20px;border:1px dashed var(--c-hairline);border-radius:18px;display:flex;flex-direction:column;align-items:center;gap:10px;color:var(--c-inkFaint)}.newest__empty p[data-v-4551f84b]{margin:0;font-size:12.5px} diff --git a/apps/user-app-v2/dist/assets/NewestView-YTILSFOu.js b/apps/user-app-v2/dist/assets/NewestView-YTILSFOu.js deleted file mode 100644 index 646dd2e..0000000 --- a/apps/user-app-v2/dist/assets/NewestView-YTILSFOu.js +++ /dev/null @@ -1 +0,0 @@ -import{d,f as o,c as i,l as a,u as c,x as P,y as S,n as b,z as k,j as v,e as y,g as u,A as B,B as E,q as p,F as C,r as L,I,b as N,h as V,s as $,_ as A}from"./index-CZjgV-Yn.js";import{P as F}from"./PageBar-Bkc2Ht1O.js";import{E as z,a as h}from"./Spinner.vue_vue_type_style_index_0_lang-ghXHCVpI.js";import{S as j}from"./SectionHead-CiwUIGKe.js";import{P as q}from"./ProductCard-Cd-G3dvx.js";import{a as D}from"./client-WIBW0tF5.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./SingleProduct-DS8wIDwN.js";import"./NotifyVant.vue_vue_type_script_setup_true_lang-CY4DS_6T.js";import"./DialogVant.vue_vue_type_style_index_0_lang-DKsdrzNc.js";import"./cartStore-CoSoowuC.js";import"./dialogEmpty1-Caw7F5KL.js";import"./index-Ca8ka09f.js";import"./classCallCheck-BSDY9VEy.js";const H={class:"flex justify-center items-center empty"},T=d({__name:"EmptyState",props:{description:{},image:{}},setup(e){return(t,s)=>(o(),i("div",H,[a(c(z),{description:"موردی یافت نشد",image:e.image,class:"h-[200px] w-[200px] opacity-70"},null,8,["image"])]))}}),G="/assets/favoritEmpty-CIK7qR49.svg",K=d({__name:"ScrollFetchSearch",props:{loading:{type:Boolean},flag:{type:Boolean},padding:{}},emits:["fetch"],setup(e,{emit:t}){const s=t,n=P(),r=u(null);return S(r,()=>{s("fetch")},{distance:50}),(l,m)=>(o(),i("main",{class:"flex flex-col flex-1 overflow-auto no-scrollbar w-[100vw] max-w-screen-md m-auto",style:b({paddingTop:e.padding||c(n).headerHeight+"px"}),ref_key:"scrollArea",ref:r},[k(l.$slots,"default"),a(h,{cls:"my-[10px]",spinning:e.loading,indicator:!0,tip:"درحال دریافت اطلاعات"},null,8,["spinning"]),e.flag?(o(),v(T,{key:0,image:c(G)},null,8,["image"])):y("",!0)],4))}});function M(){const e=B({totalPages:0,productList:[],flag:!1});return{productsData:e,getProducts:async(s,n=!1)=>{if(!n){s.value=!0;try{e.productList=await D.listProducts(),e.flag=e.productList.length<1}catch(r){console.log(r)}finally{s.value=!1}}}}}const R={class:"newest"},Z={key:0,class:"newest__grid"},J={key:1,class:"newest__empty"},g=20,O=d({__name:"NewestView",setup(e){const{productsData:t,getProducts:s}=M(),n=u(!1),r=u(!1),l=u(g),m=V(()=>t.productList.slice(0,l.value));E(async()=>{await s(n,!1)});const w=async()=>{if(l.value{const x=$("container");return o(),i("div",R,[a(F,{title:"جدیدترین محصولات","back-to":"home"}),a(h,{spinning:n.value,tip:"درحال دریافت اطلاعات"},{default:p(()=>[a(K,{class:"newest__scroll",loading:r.value,flag:c(t).flag,padding:"0px",onFetch:w},{default:p(()=>[a(x,{class:"newest__body"},{default:p(()=>[a(j,{title:"تازه‌ها",subtitle:"آخرین افزوده‌های مجموعه"}),c(t).productList.length?(o(),i("div",Z,[(o(!0),i(C,null,L(m.value,_=>(o(),v(q,{key:_.id,value:_},null,8,["value"]))),128))])):n.value?y("",!0):(o(),i("section",J,[a(I,{icon:"vuesax-linear:box",size:"26"}),f[0]||(f[0]=N("p",null,"هنوز محصولی در مجموعه ثبت نشده است.",-1))]))]),_:1})]),_:1},8,["loading","flag"])]),_:1},8,["spinning"])])}}}),ue=A(O,[["__scopeId","data-v-ecd416be"]]);export{ue as default}; diff --git a/apps/user-app-v2/dist/assets/NotificationsView-BMMkA8pk.js b/apps/user-app-v2/dist/assets/NotificationsView-BMMkA8pk.js new file mode 100644 index 0000000..ddc7de0 --- /dev/null +++ b/apps/user-app-v2/dist/assets/NotificationsView-BMMkA8pk.js @@ -0,0 +1 @@ +import{d as n,c as a,p as o,z as i,B as c,f as _,b as e,I as r,_ as f}from"./index-BAr1mMLP.js";import{P as p}from"./PageBar-B1ks8U8i.js";const l={class:"notif"},d={class:"notif__empty"},m=n({__name:"NotificationsView",setup(u){return(x,t)=>{const s=c("container");return _(),a("div",l,[o(p,{title:"اعلان‌ها","back-to":"home"}),o(s,{class:"notif__body"},{default:i(()=>[e("section",d,[o(r,{icon:"vuesax-linear:notification",size:"26"}),t[0]||(t[0]=e("p",null,"اعلانی برای نمایش وجود ندارد.",-1))])]),_:1})])}}}),v=f(m,[["__scopeId","data-v-6887fb26"]]);export{v as default}; diff --git a/apps/user-app-v2/dist/assets/NotificationsView-BYJ2kMU3.css b/apps/user-app-v2/dist/assets/NotificationsView-BYJ2kMU3.css new file mode 100644 index 0000000..a0c2023 --- /dev/null +++ b/apps/user-app-v2/dist/assets/NotificationsView-BYJ2kMU3.css @@ -0,0 +1 @@ +.notif[data-v-6887fb26]{background:var(--c-page);min-height:100vh}.notif__body[data-v-6887fb26]{padding-top:76px;padding-bottom:90px}.notif__empty[data-v-6887fb26]{margin-top:8px;padding:38px 20px;border:1px dashed var(--c-hairline);border-radius:18px;display:flex;flex-direction:column;align-items:center;gap:10px;color:var(--c-inkFaint)}.notif__empty p[data-v-6887fb26]{margin:0;font-size:12.5px} diff --git a/apps/user-app-v2/dist/assets/NotificationsView-CSZgMF1r.css b/apps/user-app-v2/dist/assets/NotificationsView-CSZgMF1r.css deleted file mode 100644 index 5556b8a..0000000 --- a/apps/user-app-v2/dist/assets/NotificationsView-CSZgMF1r.css +++ /dev/null @@ -1 +0,0 @@ -.notif[data-v-44d0c9a5]{background:#fff;min-height:100vh}.notif__body[data-v-44d0c9a5]{padding-top:76px;padding-bottom:90px}.notif__empty[data-v-44d0c9a5]{margin-top:8px;padding:38px 20px;border:1px dashed #ECEDEF;border-radius:18px;display:flex;flex-direction:column;align-items:center;gap:10px;color:#8a909c}.notif__empty p[data-v-44d0c9a5]{margin:0;font-size:12.5px} diff --git a/apps/user-app-v2/dist/assets/NotificationsView-PW4uU2F9.js b/apps/user-app-v2/dist/assets/NotificationsView-PW4uU2F9.js deleted file mode 100644 index 0bca6dd..0000000 --- a/apps/user-app-v2/dist/assets/NotificationsView-PW4uU2F9.js +++ /dev/null @@ -1 +0,0 @@ -import{d as a,c as n,l as o,q as i,s as c,f as _,b as e,I as r,_ as f}from"./index-CZjgV-Yn.js";import{P as l}from"./PageBar-Bkc2Ht1O.js";const p={class:"notif"},d={class:"notif__empty"},m=a({__name:"NotificationsView",setup(u){return(x,t)=>{const s=c("container");return _(),n("div",p,[o(l,{title:"اعلان‌ها","back-to":"home"}),o(s,{class:"notif__body"},{default:i(()=>[e("section",d,[o(r,{icon:"vuesax-linear:notification",size:"26"}),t[0]||(t[0]=e("p",null,"اعلانی برای نمایش وجود ندارد.",-1))])]),_:1})])}}}),N=f(m,[["__scopeId","data-v-44d0c9a5"]]);export{N as default}; diff --git a/apps/user-app-v2/dist/assets/NotifyVant.vue_vue_type_script_setup_true_lang-CY4DS_6T.js b/apps/user-app-v2/dist/assets/NotifyVant.vue_vue_type_script_setup_true_lang-CY4DS_6T.js deleted file mode 100644 index 018d67d..0000000 --- a/apps/user-app-v2/dist/assets/NotifyVant.vue_vue_type_script_setup_true_lang-CY4DS_6T.js +++ /dev/null @@ -1 +0,0 @@ -import{d as r,l as n,ag as p,ah as f,ai as h,aj as w,ak as y,al as g,a5 as x,am as i,a4 as k,ac as N,E as S,f as V,c as v,u as P,n as _,q as b,b as l,I as B,z as I,C as z,t as C,e as O,g as E}from"./index-CZjgV-Yn.js";const[T,U]=k("notify"),j=["lockScroll","position","show","teleport","zIndex"],q=w({},y,{type:i("danger"),color:String,message:x,position:i("top"),className:g,background:String,lockScroll:Boolean});var D=r({name:T,props:q,emits:["update:show"],setup(e,{emit:o,slots:t}){const a=s=>o("update:show",s);return()=>n(h,p({class:[U([e.type]),e.className],style:{color:e.color,background:e.background},overlay:!1,duration:.2,"onUpdate:show":a},f(e,j)),{default:()=>[t.default?t.default():e.message]})}});const $=N(D),A={key:0,class:"flex"},F={class:"w-full text-white my-2"},G={class:"w-full flex content-end"},J=r({__name:"NotifyVant",props:{modelValue:{type:Boolean},timeOut:{},text:{},color:{}},emits:["update:modelValue"],setup(e,{emit:o}){const t=E(!0),a=e,s=o;S(()=>a.modelValue,()=>{a.timeOut!==-1&&u()});const u=()=>{setTimeout(()=>{s("update:modelValue",!1)},a.timeOut)};return(d,c)=>e.modelValue?(V(),v("div",A,[n(P($),{show:t.value,"onUpdate:show":c[0]||(c[0]=m=>t.value=m),style:_(e.color)},{default:b(()=>[l("div",F,[l("div",G,[n(B,{icon:"vuesax-linear:info-circle",class:"ml-[20px] text-white",size:"25"}),l("div",null,[I(d.$slots,"default",{},()=>[z(C(e.text),1)])])])])]),_:3},8,["show","style"])])):O("",!0)}});export{J as _}; diff --git a/apps/user-app-v2/dist/assets/OrdersView-BULq1WHJ.css b/apps/user-app-v2/dist/assets/OrdersView-BULq1WHJ.css new file mode 100644 index 0000000..44d582e --- /dev/null +++ b/apps/user-app-v2/dist/assets/OrdersView-BULq1WHJ.css @@ -0,0 +1 @@ +.oc[data-v-ef740bbe]{display:flex;gap:11px;cursor:pointer;padding:12px;background:var(--c-canvas);border:1px solid var(--c-hairline);border-radius:18px;transition:transform .18s ease}.oc[data-v-ef740bbe]:active{transform:scale(.99)}.oc__mark[data-v-ef740bbe]{flex:0 0 36px;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:var(--c-hairlineSoft);color:var(--c-inkFaint)}.oc__main[data-v-ef740bbe]{flex:1;min-width:0}.oc__head[data-v-ef740bbe]{display:flex;align-items:center;justify-content:space-between;gap:10px}.oc__id[data-v-ef740bbe]{margin:0;font-size:13.5px;font-weight:800;color:var(--c-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.oc__status[data-v-ef740bbe]{flex:0 0 auto;padding:4px 11px;border-radius:999px;font-size:10.5px;font-weight:700;white-space:nowrap}.oc__figures[data-v-ef740bbe]{display:flex;gap:14px;padding-top:6px}.oc__figure[data-v-ef740bbe]{font-size:12px;font-weight:700;color:var(--c-inkSoft)}.oc__figure i[data-v-ef740bbe]{font-style:normal;font-size:10px;font-weight:600;color:var(--c-inkFaint);padding-inline-start:2px}.oc__foot[data-v-ef740bbe]{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:8px}.oc__date[data-v-ef740bbe]{font-size:11px;color:var(--c-inkFaint)}.oc__more[data-v-ef740bbe]{display:inline-flex;align-items:center;gap:4px;font-size:11.5px;font-weight:700;color:var(--c-wine)}.oi[data-v-dfbe6e64]{display:flex;gap:11px;padding:11px;background:var(--c-canvas);border:1px solid var(--c-hairline);border-radius:16px}.oi__art[data-v-dfbe6e64]{flex:0 0 62px;width:62px;height:62px;border-radius:12px;overflow:hidden;background:var(--c-hairlineSoft)}.oi__art img[data-v-dfbe6e64]{width:100%;height:100%;-o-object-fit:cover;object-fit:cover;display:block}html.theme-dark .oi__art img[data-v-dfbe6e64]{background:var(--c-photoMat);border-radius:12px}.oi__artEmpty[data-v-dfbe6e64]{width:100%;height:100%;display:grid;place-items:center;color:var(--c-inkFaint)}.oi__main[data-v-dfbe6e64]{flex:1;min-width:0}.oi__head[data-v-dfbe6e64]{display:flex;align-items:baseline;gap:7px;min-width:0}.oi__title[data-v-dfbe6e64]{margin:0;font-size:12.5px;font-weight:700;color:var(--c-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.oi__variant[data-v-dfbe6e64]{flex:0 0 auto;font-size:10.5px;color:var(--c-inkFaint)}.oi__figures[data-v-dfbe6e64]{display:flex;flex-wrap:wrap;gap:14px;padding-top:9px}.oi__figure[data-v-dfbe6e64]{font-size:12px;font-weight:700;color:var(--c-inkSoft)}.oi__figure i[data-v-dfbe6e64]{font-style:normal;font-size:10px;font-weight:600;color:var(--c-inkFaint);padding-inline-start:2px}.ord[data-v-660b7444]{background:var(--c-page);min-height:100vh}.ord__barExtra[data-v-660b7444]{max-width:768px;margin:0 auto;padding:0 16px}.ord__chips[data-v-660b7444]{display:flex;gap:8px;overflow-x:auto;margin:8px 0 8px -16px;scroll-snap-type:x proximity}.ord__chip[data-v-660b7444]{scroll-snap-align:start;flex:0 0 auto;padding:7px 14px;border-radius:999px;cursor:pointer;font-family:inherit;font-size:12px;font-weight:600;white-space:nowrap;color:var(--c-inkSoft);background:var(--c-canvas);border:1px solid var(--c-hairline);transition:all .2s ease}.ord__chip.is-on[data-v-660b7444]{color:var(--c-onInk);background:var(--c-ink);border-color:var(--c-ink)}.ord__chip[data-v-660b7444]:active{transform:scale(.97)}.ord__body[data-v-660b7444]{padding-top:160px;padding-bottom:90px}.ord__list[data-v-660b7444]{display:flex;flex-direction:column;padding-top:16px;gap:11px}.ord__empty[data-v-660b7444]{margin-top:8px;padding:34px 20px;border:1px dashed var(--c-hairline);border-radius:18px;display:flex;flex-direction:column;align-items:center;gap:10px;color:var(--c-inkFaint)}.ord__empty p[data-v-660b7444]{margin:0;font-size:12.5px}.detail[data-v-660b7444]{height:100vh;display:flex;flex-direction:column;background:var(--c-canvas)}.detail__bar[data-v-660b7444]{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 16px;border-bottom:1px solid var(--c-hairline);background:rgb(var(--c-canvas-rgb) / 92%);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}.detail__title[data-v-660b7444]{margin:0;font-size:14px;font-weight:800;color:var(--c-ink)}.detail__close[data-v-660b7444]{width:38px;height:38px;border:0;cursor:pointer;border-radius:12px;display:grid;place-items:center;color:var(--c-ink);background:var(--c-hairlineSoft)}.detail__spacer[data-v-660b7444]{display:block;width:38px;height:38px}.detail__scroll[data-v-660b7444]{flex:1;overflow-y:auto;padding:16px 16px 40px}.detail__block[data-v-660b7444]{margin-bottom:22px}.detail__blockTitle[data-v-660b7444]{margin:0 0 11px;font-size:13px;font-weight:800;color:var(--c-ink)}.detail__steps[data-v-660b7444]{display:flex;gap:4px;overflow-x:auto;padding-bottom:4px}.detail__step[data-v-660b7444]{flex:1 0 74px;display:flex;flex-direction:column;align-items:center;gap:7px;text-align:center;position:relative}.detail__stepDot[data-v-660b7444]{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;font-size:11.5px;font-weight:700;color:var(--c-inkFaint);background:var(--c-hairlineSoft);border:1px solid var(--c-hairline);z-index:1}.detail__step.is-done .detail__stepDot[data-v-660b7444]{color:var(--c-onInk);background:var(--c-ink);border-color:var(--c-ink)}.detail__step.is-active .detail__stepDot[data-v-660b7444]{color:#fff;background:var(--c-wine);border-color:var(--c-wine)}.detail__stepTitle[data-v-660b7444]{font-size:10px;line-height:1.5;color:var(--c-inkFaint)}.detail__step.is-done .detail__stepTitle[data-v-660b7444]{color:var(--c-inkSoft);font-weight:600}.detail__headline[data-v-660b7444]{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding-bottom:14px}.detail__eyebrow[data-v-660b7444]{font-size:11px;color:var(--c-inkFaint)}.detail__number[data-v-660b7444]{padding-top:4px;font-size:18px;font-weight:800;color:var(--c-ink)}.detail__status[data-v-660b7444]{flex:0 0 auto;padding:5px 12px;border-radius:999px;font-size:10.5px;font-weight:700;white-space:nowrap}.detail__specs[data-v-660b7444]{margin:0;border:1px solid var(--c-hairline);border-radius:16px;overflow:hidden}.detail__spec[data-v-660b7444]{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;border-bottom:1px solid var(--c-hairlineSoft)}.detail__spec[data-v-660b7444]:last-child{border-bottom:0}.detail__spec dt[data-v-660b7444]{margin:0;font-size:12px;color:var(--c-inkFaint)}.detail__spec dd[data-v-660b7444]{margin:0;font-size:12.5px;font-weight:700;color:var(--c-ink)}.detail__items[data-v-660b7444]{display:flex;flex-direction:column;gap:10px} diff --git a/apps/user-app-v2/dist/assets/OrdersView-CfcB9slT.js b/apps/user-app-v2/dist/assets/OrdersView-CfcB9slT.js deleted file mode 100644 index c44b71a..0000000 --- a/apps/user-app-v2/dist/assets/OrdersView-CfcB9slT.js +++ /dev/null @@ -1 +0,0 @@ -import{d as F,f as i,c,b as e,l as p,I as S,n as $,t as o,C as g,u as O,h as y,_ as w,g as h,o as z,k as K,w as Q,e as V,D as X,q as R,j as P,A as Y,F as A,r as I,s as Z,i as M}from"./index-CZjgV-Yn.js";import{P as ee}from"./PageBar-Bkc2Ht1O.js";import{a as te}from"./Spinner.vue_vue_type_style_index_0_lang-ghXHCVpI.js";import{S as se}from"./SearchInput-CSiqcIfW.js";import{j as B}from"./filters-CLL9nGZ2.js";import{a as j}from"./client-WIBW0tF5.js";import{D as ae}from"./index-Ca8ka09f.js";import{P as oe}from"./index-BBOQn_fb.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./classCallCheck-BSDY9VEy.js";const E={SUSPENDED:"معلق",PLACED:"ثبت سفارش",ADMIN_APPROVED:"تایید مدیر سیستم",SOURCING:"درحال تامین",PREPARING:"درحال آماده سازی",DELIVERED_TO_AGENT:"تحویل مسئول فروش",DELIVERED_TO_CUSTOMER:"تحویل مشتری",CANCELLED:"لغو شده"},W={PLACED:{font:"#3B82F6",background:"#EFF6FF"},SOURCING:{font:"#EAB308",background:"#FEFCE8"},PREPARING:{font:"#F97316",background:"#FFF7ED"},DELIVERED_TO_AGENT:{font:"#06B6D4",background:"#ECFEFF"},DELIVERED_TO_CUSTOMER:{font:"#22C55E",background:"#F0FDF4"}},le=["ثبت سفارش","آماده سازی","تحویل مشتری","لغو شده"];function ie(l){switch(l){case"PLACED":case"ADMIN_APPROVED":case"SUSPENDED":return 0;case"SOURCING":case"PREPARING":return 1;case"DELIVERED_TO_AGENT":case"DELIVERED_TO_CUSTOMER":return 2;case"CANCELLED":return 3;default:return 0}}const ne={class:"oc__main"},re={class:"oc__head"},de={class:"oc__id"},ce={class:"oc__figures"},ue={class:"oc__figure"},_e={class:"oc__figure"},ve={class:"oc__foot"},me={class:"oc__date"},Ee={class:"oc__more"},pe=F({__name:"OrderCard",props:{value:{}},emits:["view"],setup(l,{emit:u}){const _=l,a=u,v=y(()=>E[_.value.status]??_.value.status),n=y(()=>W[_.value.status]);return(C,r)=>{var f,k,D,s;return i(),c("article",{class:"oc",onClick:r[0]||(r[0]=U=>a("view",l.value))},[e("span",{class:"oc__mark",style:$({background:(f=n.value)==null?void 0:f.background,color:(k=n.value)==null?void 0:k.font}),"aria-hidden":"true"},[p(S,{icon:"vuesax-linear:receipt-text",size:"16"})],4),e("div",ne,[e("div",re,[e("h3",de,o(l.value.orderNumber),1),e("span",{class:"oc__status",style:$({background:(D=n.value)==null?void 0:D.background,color:(s=n.value)==null?void 0:s.font})},o(v.value),5)]),e("div",ce,[e("span",ue,[g(o(l.value.items.length)+" ",1),r[1]||(r[1]=e("i",null,"آیتم",-1))]),e("span",_e,[g(o(parseFloat(l.value.totalGoldWeightGrams).toFixed(2))+" ",1),r[2]||(r[2]=e("i",null,"گرم",-1))])]),e("div",ve,[e("span",me,o(O(B)(l.value.createdAt)),1),e("span",Ee,[r[3]||(r[3]=g(" جزئیات ",-1)),p(S,{icon:"vuesax-linear:arrow-left-2",size:"14"})])])])])}}}),fe=w(pe,[["__scopeId","data-v-ef740bbe"]]),N=h(null);async function De(){var _;if(N.value)return N.value;const l=await j.listProducts(),u=new Map;for(const a of l)for(const v of a.variants)u.set(v.id,{productTitle:a.title,variantTitle:v.title,imageUrl:(_=a.images[0])==null?void 0:_.url});return N.value=u,u}function ke(){return{lookup:async u=>(await De()).get(u)}}const he={class:"oi"},be={class:"oi__art"},ye=["alt"],ge={key:1,class:"oi__artEmpty","aria-hidden":"true"},Ce={class:"oi__main"},Re={class:"oi__head"},Oe={class:"oi__title"},Se={key:0,class:"oi__variant"},Ae={class:"oi__figures"},Ie={class:"oi__figure"},Le={class:"oi__figure"},Te={class:"oi__figure"},Pe=F({__name:"OrderItemCard",props:{value:{}},setup(l){const u=l,{lookup:_}=ke(),a=h();return z(async()=>{a.value=await _(u.value.productVariantId)}),(v,n)=>{var r,f,k,D;const C=K("lazy");return i(),c("article",he,[e("div",be,[(r=a.value)!=null&&r.imageUrl?Q((i(),c("img",{key:0,alt:((f=a.value)==null?void 0:f.productTitle)??""},null,8,ye)),[[C,a.value.imageUrl]]):(i(),c("div",ge,[p(S,{icon:"vuesax-linear:diamonds",size:"18"})]))]),e("div",Ce,[e("div",Re,[e("h4",Oe,o(((k=a.value)==null?void 0:k.productTitle)??"—"),1),(D=a.value)!=null&&D.variantTitle?(i(),c("span",Se,o(a.value.variantTitle),1)):V("",!0)]),e("div",Ae,[e("span",Ie,[g(o(l.value.quantity)+" ",1),n[0]||(n[0]=e("i",null,"عدد",-1))]),e("span",Le,[g(o(l.value.computedWeightGrams)+" ",1),n[1]||(n[1]=e("i",null,"گرم",-1))]),e("span",Te,[g(o(l.value.wagePercentSnapshot)+" ",1),n[2]||(n[2]=e("i",null,"٪ اجرت",-1))])])])])}}}),Ne=w(Pe,[["__scopeId","data-v-ffa74b04"]]),$e={class:"ord"},Ve={class:"ord__barExtra"},Fe={class:"ord__chips no-scrollbar"},we=["onClick"],Ue={key:0,class:"ord__list"},Ge={key:1,class:"ord__empty"},xe={class:"detail"},Me={class:"detail__bar"},ze={class:"detail__scroll"},Be={class:"detail__block"},je={class:"detail__steps"},We={class:"detail__stepDot"},qe={class:"detail__stepTitle"},He={class:"detail__block"},Je={class:"detail__headline"},Ke={class:"detail__number"},Qe={class:"detail__specs"},Xe={class:"detail__spec"},Ye={class:"detail__spec"},Ze={class:"detail__spec"},et={class:"detail__block"},tt={class:"detail__items"},st=F({__name:"OrdersView",setup(l){const u=X(),_=[{title:"همه",key:"ALL"},{title:E.SUSPENDED,key:"SUSPENDED"},{title:E.PLACED,key:"PLACED"},{title:E.ADMIN_APPROVED,key:"ADMIN_APPROVED"},{title:E.SOURCING,key:"SOURCING"},{title:E.PREPARING,key:"PREPARING"},{title:E.DELIVERED_TO_AGENT,key:"DELIVERED_TO_AGENT"},{title:E.DELIVERED_TO_CUSTOMER,key:"DELIVERED_TO_CUSTOMER"},{title:E.CANCELLED,key:"CANCELLED"}],a=h("ALL"),v=h(!1),n=h(!1),C=h([]),r=h(void 0),f=y(()=>{let m=C.value;return a.value!=="ALL"&&(m=m.filter(t=>t.status===a.value)),r.value&&(m=m.filter(t=>t.orderNumber.includes(r.value))),m});function k(m){r.value=m}async function D(){if(u.customerId){v.value=!0;try{C.value=await j.getCustomerOrders(u.customerId)}finally{v.value=!1}}}const s=Y({model:!1,item:null}),U=y(()=>s.item?E[s.item.status]??s.item.status:""),G=y(()=>s.item?W[s.item.status]:void 0),x=y(()=>s.item?ie(s.item.status):0);function q(m){s.item=m,s.model=!0}async function H(){await D(),n.value=!1}return z(D),(m,t)=>{const J=Z("container");return i(),c("div",$e,[p(ee,{title:"سفارشات","back-to":"home"},{below:R(()=>[e("div",Ve,[p(se,{onSearch:k,"place-holder":"جستجوی شماره سفارش"}),e("div",Fe,[(i(),c(A,null,I(_,d=>e("button",{key:d.key,type:"button",class:M(["ord__chip",{"is-on":a.value===d.key}]),onClick:L=>a.value=d.key},o(d.title),11,we)),64))])])]),_:1}),p(te,{spinning:v.value,tip:"درحال دریافت اطلاعات"},{default:R(()=>[p(O(oe),{modelValue:n.value,"onUpdate:modelValue":t[0]||(t[0]=d=>n.value=d),onRefresh:H},{default:R(()=>[p(J,{class:"ord__body"},{default:R(()=>[f.value.length?(i(),c("div",Ue,[(i(!0),c(A,null,I(f.value,d=>(i(),P(fe,{key:d.id,value:d,onView:q},null,8,["value"]))),128))])):v.value?V("",!0):(i(),c("section",Ge,[p(S,{icon:"vuesax-linear:box",size:"26"}),t[3]||(t[3]=e("p",null,"سفارشی با این مشخصات پیدا نشد.",-1))]))]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["spinning"]),s.item?(i(),P(O(ae),{key:0,visible:s.model,"onUpdate:visible":t[2]||(t[2]=d=>s.model=d),placement:"bottom",closable:!1,height:"100vh",class:"rtl",bodyStyle:{padding:0,position:"relative"}},{default:R(()=>{var d,L;return[e("div",xe,[e("header",Me,[e("button",{type:"button",class:"detail__close","aria-label":"بستن",onClick:t[1]||(t[1]=b=>s.model=!1)},[p(S,{icon:"vuesax-linear:arrow-right-1",size:"20"})]),t[4]||(t[4]=e("h2",{class:"detail__title"},"جزئیات سفارش",-1)),t[5]||(t[5]=e("span",{class:"detail__spacer","aria-hidden":"true"},null,-1))]),e("div",ze,[e("section",Be,[e("div",je,[(i(!0),c(A,null,I(O(le),(b,T)=>(i(),c("div",{key:b,class:M(["detail__step",{"is-done":T<=x.value,"is-active":T===x.value}])},[e("span",We,o(T+1),1),e("span",qe,o(b),1)],2))),128))])]),e("section",He,[e("div",Je,[e("div",null,[t[6]||(t[6]=e("div",{class:"detail__eyebrow"},"شماره سفارش",-1)),e("div",Ke,o(s.item.orderNumber),1)]),e("span",{class:"detail__status",style:$({background:(d=G.value)==null?void 0:d.background,color:(L=G.value)==null?void 0:L.font})},o(U.value),5)]),e("dl",Qe,[e("div",Xe,[t[7]||(t[7]=e("dt",null,"تعداد کالاها",-1)),e("dd",null,o(s.item.items.length)+" آیتم",1)]),e("div",Ye,[t[8]||(t[8]=e("dt",null,"وزن سفارش",-1)),e("dd",null,o(parseFloat(s.item.totalGoldWeightGrams).toFixed(2))+" گرم",1)]),e("div",Ze,[t[9]||(t[9]=e("dt",null,"تاریخ سفارش",-1)),e("dd",null,o(O(B)(s.item.createdAt)),1)])])]),e("section",et,[t[10]||(t[10]=e("h3",{class:"detail__blockTitle"},"آیتم‌های سفارش",-1)),e("div",tt,[(i(!0),c(A,null,I(s.item.items,b=>(i(),P(Ne,{key:b.id,value:b},null,8,["value"]))),128))])])])])]}),_:1},8,["visible"])):V("",!0)])}}}),vt=w(st,[["__scopeId","data-v-c1663ade"]]);export{vt as default}; diff --git a/apps/user-app-v2/dist/assets/OrdersView-DENQ-Etu.js b/apps/user-app-v2/dist/assets/OrdersView-DENQ-Etu.js new file mode 100644 index 0000000..1a9f588 --- /dev/null +++ b/apps/user-app-v2/dist/assets/OrdersView-DENQ-Etu.js @@ -0,0 +1 @@ +import{d as U,f as i,c,b as e,p as u,I as L,n as V,t as o,N as O,m as g,h as R,_ as G,s as M,g as h,o as j,l as Q,w as X,e as w,O as Y,z as f,J as Z,j as N,K as ee,F as S,r as A,B as te,i as B}from"./index-BAr1mMLP.js";import{P as se}from"./PageBar-B1ks8U8i.js";import{S as ae}from"./SearchInput-vVDQz-rO.js";import{j as W}from"./filters-Cm9yhZZ9.js";import{D as oe}from"./index-DWuFFuVX.js";import{P as le,L as P}from"./index-DPSZMLNJ.js";import"./KeyCode-BMdFtCT-.js";import"./classCallCheck-DDMOgDz1.js";import"./raf-nDFcuFT6.js";const E={SUSPENDED:"معلق",PLACED:"ثبت سفارش",ADMIN_APPROVED:"تایید مدیر سیستم",SOURCING:"درحال تامین",PREPARING:"درحال آماده سازی",DELIVERED_TO_AGENT:"تحویل مسئول فروش",DELIVERED_TO_CUSTOMER:"تحویل مشتری",CANCELLED:"لغو شده"},q={PLACED:{font:"#3B82F6",background:"#3B82F61F"},SOURCING:{font:"#EAB308",background:"#EAB3081F"},PREPARING:{font:"#F97316",background:"#F973161F"},DELIVERED_TO_AGENT:{font:"#06B6D4",background:"#06B6D41F"},DELIVERED_TO_CUSTOMER:{font:"#22C55E",background:"#22C55E1F"}},ie=["ثبت سفارش","آماده سازی","تحویل مشتری","لغو شده"];function ne(l){switch(l){case"PLACED":case"ADMIN_APPROVED":case"SUSPENDED":return 0;case"SOURCING":case"PREPARING":return 1;case"DELIVERED_TO_AGENT":case"DELIVERED_TO_CUSTOMER":return 2;case"CANCELLED":return 3;default:return 0}}const re={class:"oc__main"},de={class:"oc__head"},ue={class:"oc__id"},ce={class:"oc__figures"},_e={class:"oc__figure"},ve={class:"oc__figure"},me={class:"oc__foot"},pe={class:"oc__date"},Ee={class:"oc__more"},fe=U({__name:"OrderCard",props:{value:{}},emits:["view"],setup(l,{emit:_}){const v=l,a=_,m=R(()=>E[v.value.status]??v.value.status),n=R(()=>q[v.value.status]);return(C,r)=>{var D,b,k,s;return i(),c("article",{class:"oc",onClick:r[0]||(r[0]=x=>a("view",l.value))},[e("span",{class:"oc__mark",style:V({background:(D=n.value)==null?void 0:D.background,color:(b=n.value)==null?void 0:b.font}),"aria-hidden":"true"},[u(L,{icon:"vuesax-linear:receipt-text",size:"16"})],4),e("div",re,[e("div",de,[e("h3",ue,o(l.value.orderNumber),1),e("span",{class:"oc__status",style:V({background:(k=n.value)==null?void 0:k.background,color:(s=n.value)==null?void 0:s.font})},o(m.value),5)]),e("div",ce,[e("span",_e,[O(o(l.value.items.length)+" ",1),r[1]||(r[1]=e("i",null,"آیتم",-1))]),e("span",ve,[O(o(parseFloat(l.value.totalGoldWeightGrams).toFixed(2))+" ",1),r[2]||(r[2]=e("i",null,"گرم",-1))])]),e("div",me,[e("span",pe,o(g(W)(l.value.createdAt)),1),e("span",Ee,[r[3]||(r[3]=O(" جزئیات ",-1)),u(L,{icon:"vuesax-linear:arrow-left-2",size:"14"})])])])])}}}),De=G(fe,[["__scopeId","data-v-ef740bbe"]]),$=h(null);async function ke(){var v;if($.value)return $.value;const l=await M.listProducts(),_=new Map;for(const a of l)for(const m of a.variants)_.set(m.id,{productTitle:a.title,variantTitle:m.title,imageUrl:(v=a.images[0])==null?void 0:v.url});return $.value=_,_}function ge(){return{lookup:async _=>(await ke()).get(_)}}const be={class:"oi"},he={class:"oi__art"},ye=["alt"],Re={key:1,class:"oi__artEmpty","aria-hidden":"true"},Oe={class:"oi__main"},Ce={class:"oi__head"},Le={class:"oi__title"},Se={key:0,class:"oi__variant"},Ae={class:"oi__figures"},Ie={class:"oi__figure"},Te={class:"oi__figure"},Ne={class:"oi__figure"},Pe=U({__name:"OrderItemCard",props:{value:{}},setup(l){const _=l,{lookup:v}=ge(),a=h();return j(async()=>{a.value=await v(_.value.productVariantId)}),(m,n)=>{var r,D,b,k;const C=Q("lazy");return i(),c("article",be,[e("div",he,[(r=a.value)!=null&&r.imageUrl?X((i(),c("img",{key:0,alt:((D=a.value)==null?void 0:D.productTitle)??""},null,8,ye)),[[C,a.value.imageUrl]]):(i(),c("div",Re,[u(L,{icon:"vuesax-linear:diamonds",size:"18"})]))]),e("div",Oe,[e("div",Ce,[e("h4",Le,o(((b=a.value)==null?void 0:b.productTitle)??"—"),1),(k=a.value)!=null&&k.variantTitle?(i(),c("span",Se,o(a.value.variantTitle),1)):w("",!0)]),e("div",Ae,[e("span",Ie,[O(o(l.value.quantity)+" ",1),n[0]||(n[0]=e("i",null,"عدد",-1))]),e("span",Te,[O(o(l.value.computedWeightGrams)+" ",1),n[1]||(n[1]=e("i",null,"گرم",-1))]),e("span",Ne,[O(o(l.value.wagePercentSnapshot)+" ",1),n[2]||(n[2]=e("i",null,"٪ اجرت",-1))])])])])}}}),$e=G(Pe,[["__scopeId","data-v-dfbe6e64"]]),Ve={class:"ord"},we={class:"ord__barExtra"},Ue={class:"ord__chips no-scrollbar"},Ge=["onClick"],xe={key:0,class:"ord__list"},Fe={key:1,class:"ord__empty"},ze={class:"detail"},Be={class:"detail__bar"},Me={class:"detail__scroll"},je={class:"detail__block"},We={class:"detail__steps"},qe={class:"detail__stepDot"},Je={class:"detail__stepTitle"},Ke={class:"detail__block"},He={class:"detail__headline"},Qe={class:"detail__number"},Xe={class:"detail__specs"},Ye={class:"detail__spec"},Ze={class:"detail__spec"},et={class:"detail__spec"},tt={class:"detail__block"},st={class:"detail__items"},at=U({__name:"OrdersView",setup(l){const _=Y(),v=[{title:"همه",key:"ALL"},{title:E.SUSPENDED,key:"SUSPENDED"},{title:E.PLACED,key:"PLACED"},{title:E.ADMIN_APPROVED,key:"ADMIN_APPROVED"},{title:E.SOURCING,key:"SOURCING"},{title:E.PREPARING,key:"PREPARING"},{title:E.DELIVERED_TO_AGENT,key:"DELIVERED_TO_AGENT"},{title:E.DELIVERED_TO_CUSTOMER,key:"DELIVERED_TO_CUSTOMER"},{title:E.CANCELLED,key:"CANCELLED"}],a=h("ALL"),m=h(!1),n=h(!1),C=h([]),r=h(void 0),D=R(()=>{let p=C.value;return a.value!=="ALL"&&(p=p.filter(t=>t.status===a.value)),r.value&&(p=p.filter(t=>t.orderNumber.includes(r.value))),p});function b(p){r.value=p}async function k(){if(_.isLoggedIn){m.value=!0;try{C.value=await M.getMyOrders()}finally{m.value=!1}}}const s=ee({model:!1,item:null}),x=R(()=>s.item?E[s.item.status]??s.item.status:""),F=R(()=>s.item?q[s.item.status]:void 0),z=R(()=>s.item?ne(s.item.status):0);function J(p){s.item=p,s.model=!0}async function K(){await k(),n.value=!1}return j(k),(p,t)=>{const H=te("container");return i(),c("div",Ve,[u(se,{title:"سفارشات","back-to":"home"},{below:f(()=>[e("div",we,[u(ae,{onSearch:b,"place-holder":"جستجوی شماره سفارش"}),e("div",Ue,[(i(),c(S,null,A(v,d=>e("button",{key:d.key,type:"button",class:B(["ord__chip",{"is-on":a.value===d.key}]),onClick:I=>a.value=d.key},o(d.title),11,Ge)),64))])])]),_:1}),u(Z,{spinning:m.value,tip:"درحال دریافت اطلاعات"},{default:f(()=>[u(g(le),{modelValue:n.value,"onUpdate:modelValue":t[0]||(t[0]=d=>n.value=d),onRefresh:K},{pulling:f(()=>[u(g(P),{size:"18"})]),loosing:f(()=>[u(g(P),{size:"18"})]),loading:f(()=>[u(g(P),{size:"18"})]),success:f(()=>[...t[3]||(t[3]=[e("span",null,null,-1)])]),default:f(()=>[u(H,{class:"ord__body"},{default:f(()=>[D.value.length?(i(),c("div",xe,[(i(!0),c(S,null,A(D.value,d=>(i(),N(De,{key:d.id,value:d,onView:J},null,8,["value"]))),128))])):m.value?w("",!0):(i(),c("section",Fe,[u(L,{icon:"vuesax-linear:box",size:"26"}),t[4]||(t[4]=e("p",null,"سفارشی با این مشخصات پیدا نشد.",-1))]))]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["spinning"]),s.item?(i(),N(g(oe),{key:0,visible:s.model,"onUpdate:visible":t[2]||(t[2]=d=>s.model=d),placement:"bottom",closable:!1,height:"100vh",class:"rtl",bodyStyle:{padding:0,position:"relative"}},{default:f(()=>{var d,I;return[e("div",ze,[e("header",Be,[e("button",{type:"button",class:"detail__close","aria-label":"بستن",onClick:t[1]||(t[1]=y=>s.model=!1)},[u(L,{icon:"vuesax-linear:arrow-right-1",size:"20"})]),t[5]||(t[5]=e("h2",{class:"detail__title"},"جزئیات سفارش",-1)),t[6]||(t[6]=e("span",{class:"detail__spacer","aria-hidden":"true"},null,-1))]),e("div",Me,[e("section",je,[e("div",We,[(i(!0),c(S,null,A(g(ie),(y,T)=>(i(),c("div",{key:y,class:B(["detail__step",{"is-done":T<=z.value,"is-active":T===z.value}])},[e("span",qe,o(T+1),1),e("span",Je,o(y),1)],2))),128))])]),e("section",Ke,[e("div",He,[e("div",null,[t[7]||(t[7]=e("div",{class:"detail__eyebrow"},"شماره سفارش",-1)),e("div",Qe,o(s.item.orderNumber),1)]),e("span",{class:"detail__status",style:V({background:(d=F.value)==null?void 0:d.background,color:(I=F.value)==null?void 0:I.font})},o(x.value),5)]),e("dl",Xe,[e("div",Ye,[t[8]||(t[8]=e("dt",null,"تعداد کالاها",-1)),e("dd",null,o(s.item.items.length)+" آیتم",1)]),e("div",Ze,[t[9]||(t[9]=e("dt",null,"وزن سفارش",-1)),e("dd",null,o(parseFloat(s.item.totalGoldWeightGrams).toFixed(2))+" گرم",1)]),e("div",et,[t[10]||(t[10]=e("dt",null,"تاریخ سفارش",-1)),e("dd",null,o(g(W)(s.item.createdAt)),1)])])]),e("section",tt,[t[11]||(t[11]=e("h3",{class:"detail__blockTitle"},"آیتم‌های سفارش",-1)),e("div",st,[(i(!0),c(S,null,A(s.item.items,y=>(i(),N($e,{key:y.id,value:y},null,8,["value"]))),128))])])])])]}),_:1},8,["visible"])):w("",!0)])}}}),vt=G(at,[["__scopeId","data-v-660b7444"]]);export{vt as default}; diff --git a/apps/user-app-v2/dist/assets/OrdersView-XheLpdhr.css b/apps/user-app-v2/dist/assets/OrdersView-XheLpdhr.css deleted file mode 100644 index 104ab67..0000000 --- a/apps/user-app-v2/dist/assets/OrdersView-XheLpdhr.css +++ /dev/null @@ -1 +0,0 @@ -.oc[data-v-ef740bbe]{display:flex;gap:11px;cursor:pointer;padding:12px;background:#fff;border:1px solid #ECEDEF;border-radius:18px;transition:transform .18s ease}.oc[data-v-ef740bbe]:active{transform:scale(.99)}.oc__mark[data-v-ef740bbe]{flex:0 0 36px;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#f4f5f6;color:#8a909c}.oc__main[data-v-ef740bbe]{flex:1;min-width:0}.oc__head[data-v-ef740bbe]{display:flex;align-items:center;justify-content:space-between;gap:10px}.oc__id[data-v-ef740bbe]{margin:0;font-size:13.5px;font-weight:800;color:#14161a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.oc__status[data-v-ef740bbe]{flex:0 0 auto;padding:4px 11px;border-radius:999px;font-size:10.5px;font-weight:700;white-space:nowrap}.oc__figures[data-v-ef740bbe]{display:flex;gap:14px;padding-top:6px}.oc__figure[data-v-ef740bbe]{font-size:12px;font-weight:700;color:#22262e}.oc__figure i[data-v-ef740bbe]{font-style:normal;font-size:10px;font-weight:600;color:#8a909c;padding-inline-start:2px}.oc__foot[data-v-ef740bbe]{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:8px}.oc__date[data-v-ef740bbe]{font-size:11px;color:#8a909c}.oc__more[data-v-ef740bbe]{display:inline-flex;align-items:center;gap:4px;font-size:11.5px;font-weight:700;color:#7a1b33}.oi[data-v-ffa74b04]{display:flex;gap:11px;padding:11px;background:#fff;border:1px solid #ECEDEF;border-radius:16px}.oi__art[data-v-ffa74b04]{flex:0 0 62px;width:62px;height:62px;border-radius:12px;overflow:hidden;background:#f4f5f6}.oi__art img[data-v-ffa74b04]{width:100%;height:100%;-o-object-fit:cover;object-fit:cover;display:block}.oi__artEmpty[data-v-ffa74b04]{width:100%;height:100%;display:grid;place-items:center;color:#8a909c}.oi__main[data-v-ffa74b04]{flex:1;min-width:0}.oi__head[data-v-ffa74b04]{display:flex;align-items:baseline;gap:7px;min-width:0}.oi__title[data-v-ffa74b04]{margin:0;font-size:12.5px;font-weight:700;color:#14161a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.oi__variant[data-v-ffa74b04]{flex:0 0 auto;font-size:10.5px;color:#8a909c}.oi__figures[data-v-ffa74b04]{display:flex;flex-wrap:wrap;gap:14px;padding-top:9px}.oi__figure[data-v-ffa74b04]{font-size:12px;font-weight:700;color:#22262e}.oi__figure i[data-v-ffa74b04]{font-style:normal;font-size:10px;font-weight:600;color:#8a909c;padding-inline-start:2px}.ord[data-v-c1663ade]{background:#fff;min-height:100vh}.ord__barExtra[data-v-c1663ade]{max-width:768px;margin:0 auto;padding:0 16px}.ord__chips[data-v-c1663ade]{display:flex;gap:8px;overflow-x:auto;margin:8px 0 8px -16px;scroll-snap-type:x proximity}.ord__chip[data-v-c1663ade]{scroll-snap-align:start;flex:0 0 auto;padding:7px 14px;border-radius:999px;cursor:pointer;font-family:inherit;font-size:12px;font-weight:600;white-space:nowrap;color:#22262e;background:#fff;border:1px solid #ECEDEF;transition:all .2s ease}.ord__chip.is-on[data-v-c1663ade]{color:#fff;background:#14161a;border-color:#14161a}.ord__chip[data-v-c1663ade]:active{transform:scale(.97)}.ord__body[data-v-c1663ade]{padding-top:160px;padding-bottom:90px}.ord__list[data-v-c1663ade]{display:flex;flex-direction:column;padding-top:16px;gap:11px}.ord__empty[data-v-c1663ade]{margin-top:8px;padding:34px 20px;border:1px dashed #ECEDEF;border-radius:18px;display:flex;flex-direction:column;align-items:center;gap:10px;color:#8a909c}.ord__empty p[data-v-c1663ade]{margin:0;font-size:12.5px}.detail[data-v-c1663ade]{height:100vh;display:flex;flex-direction:column;background:#fff}.detail__bar[data-v-c1663ade]{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 16px;border-bottom:1px solid #ECEDEF;background:#ffffffeb;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}.detail__title[data-v-c1663ade]{margin:0;font-size:14px;font-weight:800;color:#14161a}.detail__close[data-v-c1663ade]{width:38px;height:38px;border:0;cursor:pointer;border-radius:12px;display:grid;place-items:center;color:#14161a;background:#f4f5f6}.detail__spacer[data-v-c1663ade]{display:block;width:38px;height:38px}.detail__scroll[data-v-c1663ade]{flex:1;overflow-y:auto;padding:16px 16px 40px}.detail__block[data-v-c1663ade]{margin-bottom:22px}.detail__blockTitle[data-v-c1663ade]{margin:0 0 11px;font-size:13px;font-weight:800;color:#14161a}.detail__steps[data-v-c1663ade]{display:flex;gap:4px;overflow-x:auto;padding-bottom:4px}.detail__step[data-v-c1663ade]{flex:1 0 74px;display:flex;flex-direction:column;align-items:center;gap:7px;text-align:center;position:relative}.detail__stepDot[data-v-c1663ade]{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;font-size:11.5px;font-weight:700;color:#8a909c;background:#f4f5f6;border:1px solid #ECEDEF;z-index:1}.detail__step.is-done .detail__stepDot[data-v-c1663ade]{color:#fff;background:#14161a;border-color:#14161a}.detail__step.is-active .detail__stepDot[data-v-c1663ade]{color:#fff;background:#7a1b33;border-color:#7a1b33}.detail__stepTitle[data-v-c1663ade]{font-size:10px;line-height:1.5;color:#8a909c}.detail__step.is-done .detail__stepTitle[data-v-c1663ade]{color:#22262e;font-weight:600}.detail__headline[data-v-c1663ade]{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding-bottom:14px}.detail__eyebrow[data-v-c1663ade]{font-size:11px;color:#8a909c}.detail__number[data-v-c1663ade]{padding-top:4px;font-size:18px;font-weight:800;color:#14161a}.detail__status[data-v-c1663ade]{flex:0 0 auto;padding:5px 12px;border-radius:999px;font-size:10.5px;font-weight:700;white-space:nowrap}.detail__specs[data-v-c1663ade]{margin:0;border:1px solid #ECEDEF;border-radius:16px;overflow:hidden}.detail__spec[data-v-c1663ade]{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;border-bottom:1px solid #F4F5F6}.detail__spec[data-v-c1663ade]:last-child{border-bottom:0}.detail__spec dt[data-v-c1663ade]{margin:0;font-size:12px;color:#8a909c}.detail__spec dd[data-v-c1663ade]{margin:0;font-size:12.5px;font-weight:700;color:#14161a}.detail__items[data-v-c1663ade]{display:flex;flex-direction:column;gap:10px} diff --git a/apps/user-app-v2/dist/assets/PageBar-B1ks8U8i.js b/apps/user-app-v2/dist/assets/PageBar-B1ks8U8i.js new file mode 100644 index 0000000..b64e4e1 --- /dev/null +++ b/apps/user-app-v2/dist/assets/PageBar-B1ks8U8i.js @@ -0,0 +1 @@ +import{d as _,c as t,b as e,p as b,I as d,t as u,H as i,f as o,C as p,_ as k}from"./index-BAr1mMLP.js";const f={class:"bar"},h={class:"bar__inner"},m={key:1,class:"bar__spacer","aria-hidden":"true"},B={class:"bar__title"},g={class:"bar__trailing"},v=_({__name:"PageBar",props:{title:{},back:{type:Boolean,default:!0},backTo:{},backAction:{}},setup(s){const a=s,n=p();function l(){a.backAction?a.backAction():a.backTo?n.push({name:a.backTo}):n.back()}return(r,c)=>(o(),t("header",f,[e("div",h,[s.back?(o(),t("button",{key:0,type:"button",class:"bar__btn","aria-label":"بازگشت",onClick:l},[b(d,{icon:"vuesax-linear:arrow-right-1",size:"20"})])):(o(),t("span",m)),e("h1",B,u(s.title),1),e("div",g,[i(r.$slots,"trailing",{},()=>[c[0]||(c[0]=e("span",{class:"bar__spacer","aria-hidden":"true"},null,-1))],!0)])]),i(r.$slots,"below",{},void 0,!0)]))}}),A=k(v,[["__scopeId","data-v-dc516f82"]]);export{A as P}; diff --git a/apps/user-app-v2/dist/assets/PageBar-Bu_ZJ2Zu.css b/apps/user-app-v2/dist/assets/PageBar-Bu_ZJ2Zu.css deleted file mode 100644 index 34b264d..0000000 --- a/apps/user-app-v2/dist/assets/PageBar-Bu_ZJ2Zu.css +++ /dev/null @@ -1 +0,0 @@ -.bar[data-v-d2d3dfeb]{position:fixed;top:0;left:0;right:0;z-index:20;background:#ffffffe0;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border-bottom:1px solid #ECEDEF}.bar__inner[data-v-d2d3dfeb]{max-width:768px;margin:0 auto;padding:11px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px}.bar__title[data-v-d2d3dfeb]{margin:0;font-size:14.5px;font-weight:800;color:#14161a;letter-spacing:-.1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bar__btn[data-v-d2d3dfeb]{position:relative;flex:0 0 auto;width:38px;height:38px;border:0;cursor:pointer;border-radius:12px;display:grid;place-items:center;color:#14161a;background:#f4f5f6;transition:background .18s ease}.bar__btn[data-v-d2d3dfeb]:active{transform:scale(.94)}.bar__trailing[data-v-d2d3dfeb]{flex:0 0 auto;display:flex;align-items:center;gap:8px}.bar__spacer[data-v-d2d3dfeb]{display:block;width:38px;height:38px} diff --git a/apps/user-app-v2/dist/assets/PageBar-CKAnfXNs.css b/apps/user-app-v2/dist/assets/PageBar-CKAnfXNs.css new file mode 100644 index 0000000..ee3f982 --- /dev/null +++ b/apps/user-app-v2/dist/assets/PageBar-CKAnfXNs.css @@ -0,0 +1 @@ +.bar[data-v-dc516f82]{position:fixed;top:0;left:0;right:0;z-index:20;background:rgb(var(--c-canvas-rgb) / 88%);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border-bottom:1px solid var(--c-hairline)}.bar__inner[data-v-dc516f82]{max-width:768px;margin:0 auto;padding:11px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px}.bar__title[data-v-dc516f82]{margin:0;font-size:14.5px;font-weight:800;color:var(--c-ink);letter-spacing:-.1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bar__btn[data-v-dc516f82]{position:relative;flex:0 0 auto;width:38px;height:38px;border:0;cursor:pointer;border-radius:12px;display:grid;place-items:center;color:var(--c-ink);background:var(--c-hairlineSoft);transition:background .18s ease}.bar__btn[data-v-dc516f82]:active{transform:scale(.94)}.bar__trailing[data-v-dc516f82]{flex:0 0 auto;display:flex;align-items:center;gap:8px}.bar__spacer[data-v-dc516f82]{display:block;width:38px;height:38px} diff --git a/apps/user-app-v2/dist/assets/ProductCard-4TPJHHsT.js b/apps/user-app-v2/dist/assets/ProductCard-4TPJHHsT.js new file mode 100644 index 0000000..260b290 --- /dev/null +++ b/apps/user-app-v2/dist/assets/ProductCard-4TPJHHsT.js @@ -0,0 +1 @@ +import{d as B,aM as N,k as P,l as z,f as s,c as t,b as a,m as e,w as F,p as m,I as h,aN as V,i as D,e as _,t as r,N as I,g as S,A as E,_ as M}from"./index-BAr1mMLP.js";const O={class:"pc__art"},q=["alt"],A={key:1,class:"pc__artEmpty","aria-hidden":"true"},L=["aria-label"],T={key:2,class:"pc__flag"},U={key:3,class:"pc__flag pc__flag--soft"},$={class:"pc__title"},j={class:"pc__weight"},G={key:0,class:"pc__meta"},H={key:0,class:"pc__wageOld"},J={class:"pc__wage"},K=B({__name:"ProductCard",props:{value:{},wageBefore:{}},setup(l){const d=l,o=N(),{image:p,id:i,title:u,min_gram:y,wage:f,is_exist:k,qty:w,isPreOrder:x}=P(d.value),g=S(null);function b(){E(d.value,g.value)}function v(n){return n%1===0?String(n):n.toFixed(2)}return(n,c)=>{const C=z("lazy");return s(),t("article",{ref_key:"root",ref:g,class:"pc","data-product-origin":"",onClick:b},[a("div",O,[e(p)?F((s(),t("img",{key:0,alt:e(u)},null,8,q)),[[C,e(p)]]):(s(),t("div",A,[m(h,{icon:"vuesax-linear:diamonds",size:"26"})])),a("button",{type:"button",class:D(["pc__fav",{"is-on":e(o).isFavorite(e(i))}]),"aria-label":e(o).isFavorite(e(i))?"حذف از علاقه‌مندی":"افزودن به علاقه‌مندی",onClick:c[0]||(c[0]=V(Q=>e(o).toggle(e(i)),["stop"]))},[m(h,{icon:e(o).isFavorite(e(i))?"vuesax-linear:heart-fill":"vuesax-linear:heart",size:"16"},null,8,["icon"])],10,L),e(k)?e(x)&&e(w)===0?(s(),t("span",U,"پیش‌سفارش")):_("",!0):(s(),t("span",T,"ناموجود"))]),a("h3",$,r(e(u)),1),a("p",j,[I(r(e(y))+" ",1),c[1]||(c[1]=a("span",{class:"pc__weightUnit"},"گرم",-1))]),e(f)!=null?(s(),t("div",G,[l.wageBefore!=null?(s(),t("span",H,"اجرت "+r(v(l.wageBefore))+"٪",1)):_("",!0),a("span",J,r(v(e(f)))+"٪ اجرت",1)])):_("",!0)],512)}}}),W=M(K,[["__scopeId","data-v-63b56860"]]);export{W as P}; diff --git a/apps/user-app-v2/dist/assets/ProductCard-C8bieA3Y.css b/apps/user-app-v2/dist/assets/ProductCard-C8bieA3Y.css new file mode 100644 index 0000000..42f4b11 --- /dev/null +++ b/apps/user-app-v2/dist/assets/ProductCard-C8bieA3Y.css @@ -0,0 +1 @@ +.pc[data-v-63b56860]{cursor:pointer;border-radius:32px;background:var(--c-hairlineSoft);padding:16px 14px 15px;text-align:center;transition:transform .2s ease,background .2s ease}.pc[data-v-63b56860]:active{transform:scale(.985)}.pc__art[data-v-63b56860]{position:relative;aspect-ratio:1 / 1;display:flex;align-items:center;justify-content:center}.pc__art img[data-v-63b56860]{max-width:82%;max-height:100%;-o-object-fit:contain;object-fit:contain;-o-object-position:center;object-position:center;display:block}html.theme-dark .pc__art img[data-v-63b56860]{background:var(--c-photoMat);border-radius:12px}.pc__artEmpty[data-v-63b56860]{width:100%;height:100%;display:grid;place-items:center;color:var(--c-inkFaint)}.pc__fav[data-v-63b56860]{position:absolute;top:0;left:0;width:30px;height:30px;display:grid;place-items:center;border:0;cursor:pointer;border-radius:50%;color:var(--c-inkFaint);background:rgb(var(--c-canvas-rgb) / 75%);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);transition:color .18s ease,transform .18s ease}.pc__fav.is-on[data-v-63b56860]{color:var(--c-wine);background:var(--c-canvas)}.pc__fav[data-v-63b56860]:active{transform:scale(.9)}.pc__flag[data-v-63b56860]{position:absolute;top:0;right:0;padding:4px 9px;border-radius:999px;font-size:10px;font-weight:700;color:var(--c-onInk);background:var(--c-ink)}.pc__flag--soft[data-v-63b56860]{background:var(--c-wineSoft)}.pc__title[data-v-63b56860]{margin:12px 0 0;font-size:12px;font-weight:500;color:var(--c-ink);line-height:1.6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pc__weight[data-v-63b56860]{margin:5px 0 0;font-size:16px;font-weight:700;line-height:1.4;color:var(--c-inkSoft)}.pc__weightUnit[data-v-63b56860]{font-size:12px;font-weight:600;color:var(--c-inkMuted)}.pc__meta[data-v-63b56860]{display:flex;align-items:center;justify-content:center;gap:8px;padding-top:5px;font-size:11.5px}.pc__wageOld[data-v-63b56860]{color:var(--c-inkFaint);text-decoration:line-through}.pc__wage[data-v-63b56860]{color:#e31a1a;font-weight:500;font-size:12px} diff --git a/apps/user-app-v2/dist/assets/ProductCard-Cd-G3dvx.js b/apps/user-app-v2/dist/assets/ProductCard-Cd-G3dvx.js deleted file mode 100644 index 2393771..0000000 --- a/apps/user-app-v2/dist/assets/ProductCard-Cd-G3dvx.js +++ /dev/null @@ -1 +0,0 @@ -import{d as F,k as D,f as t,c as a,F as P,b as o,u as e,w as S,l as p,I as h,X as z,i as N,e as c,t as _,C as V,q as I,j as q,g as E,_ as O}from"./index-CZjgV-Yn.js";import{a as U,S as $}from"./SingleProduct-DS8wIDwN.js";import{u as j}from"./cartStore-CoSoowuC.js";import{D as L}from"./index-Ca8ka09f.js";const M={class:"pc__art"},T=["alt"],X={key:1,class:"pc__artEmpty","aria-hidden":"true"},A=["aria-label"],G={key:2,class:"pc__flag"},H={key:3,class:"pc__flag pc__flag--soft"},J={class:"pc__title"},K={class:"pc__weight"},Q={key:0,class:"pc__meta"},R={key:0,class:"pc__wageOld"},W={class:"pc__wage"},Y=F({__name:"ProductCard",props:{value:{},wageBefore:{}},setup(d){const w=d,r=U(),{image:v,id:i,title:f,min_gram:y,wage:m,is_exist:k,qty:b,isPreOrder:x}=j(w.value),l=E(!1);function C(){l.value=!0}function g(n){return n%1===0?String(n):n.toFixed(2)}return(n,s)=>{const B=D("lazy");return t(),a(P,null,[o("article",{class:"pc",onClick:C},[o("div",M,[e(v)?S((t(),a("img",{key:0,alt:e(f)},null,8,T)),[[B,e(v)]]):(t(),a("div",X,[p(h,{icon:"vuesax-linear:diamonds",size:"26"})])),o("button",{type:"button",class:N(["pc__fav",{"is-on":e(r).isFavorite(e(i))}]),"aria-label":e(r).isFavorite(e(i))?"حذف از علاقه‌مندی":"افزودن به علاقه‌مندی",onClick:s[0]||(s[0]=z(u=>e(r).toggle(e(i)),["stop"]))},[p(h,{icon:e(r).isFavorite(e(i))?"vuesax-linear:heart-fill":"vuesax-linear:heart",size:"16"},null,8,["icon"])],10,A),e(k)?e(x)&&e(b)===0?(t(),a("span",H,"پیش‌سفارش")):c("",!0):(t(),a("span",G,"ناموجود"))]),o("h3",J,_(e(f)),1),o("p",K,[V(_(e(y))+" ",1),s[3]||(s[3]=o("span",{class:"pc__weightUnit"},"گرم",-1))]),e(m)!=null?(t(),a("div",Q,[d.wageBefore!=null?(t(),a("span",R,"اجرت "+_(g(d.wageBefore))+"٪",1)):c("",!0),o("span",W,_(g(e(m)))+"٪ اجرت",1)])):c("",!0)]),p(e(L),{visible:l.value,"onUpdate:visible":s[2]||(s[2]=u=>l.value=u),placement:"bottom",closable:!1,class:"rtl",height:"100vh",bodyStyle:{padding:0,position:"relative"}},{default:I(()=>[l.value?(t(),q($,{id:e(i),key:e(i),onCloseDrawer:s[1]||(s[1]=u=>l.value=!1)},null,8,["id"])):c("",!0)]),_:1},8,["visible"])],64)}}}),ae=O(Y,[["__scopeId","data-v-ed785ed2"]]);export{ae as P}; diff --git a/apps/user-app-v2/dist/assets/ProductCard-ClTnYUud.css b/apps/user-app-v2/dist/assets/ProductCard-ClTnYUud.css deleted file mode 100644 index 2ce7148..0000000 --- a/apps/user-app-v2/dist/assets/ProductCard-ClTnYUud.css +++ /dev/null @@ -1 +0,0 @@ -.pc[data-v-ed785ed2]{cursor:pointer;border-radius:32px;background:#f4f5f6;padding:16px 14px 15px;text-align:center;transition:transform .2s ease,background .2s ease}.pc[data-v-ed785ed2]:active{transform:scale(.985)}.pc__art[data-v-ed785ed2]{position:relative;aspect-ratio:1 / 1;display:flex;align-items:center;justify-content:center}.pc__art img[data-v-ed785ed2]{max-width:82%;max-height:100%;-o-object-fit:contain;object-fit:contain;-o-object-position:center;object-position:center;display:block}.pc__artEmpty[data-v-ed785ed2]{width:100%;height:100%;display:grid;place-items:center;color:#8a909c}.pc__fav[data-v-ed785ed2]{position:absolute;top:0;left:0;width:30px;height:30px;display:grid;place-items:center;border:0;cursor:pointer;border-radius:50%;color:#8a909c;background:#ffffffbf;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);transition:color .18s ease,transform .18s ease}.pc__fav.is-on[data-v-ed785ed2]{color:#7a1b33;background:#fff}.pc__fav[data-v-ed785ed2]:active{transform:scale(.9)}.pc__flag[data-v-ed785ed2]{position:absolute;top:0;right:0;padding:4px 9px;border-radius:999px;font-size:10px;font-weight:700;color:#fff;background:#14161a}.pc__flag--soft[data-v-ed785ed2]{background:#a33c55}.pc__title[data-v-ed785ed2]{margin:12px 0 0;font-size:12px;font-weight:500;color:#14161a;line-height:1.6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pc__weight[data-v-ed785ed2]{margin:5px 0 0;font-size:16px;font-weight:700;line-height:1.4;color:#22262e}.pc__weightUnit[data-v-ed785ed2]{font-size:12px;font-weight:600;color:#5b616e}.pc__meta[data-v-ed785ed2]{display:flex;align-items:center;justify-content:center;gap:8px;padding-top:5px;font-size:11.5px}.pc__wageOld[data-v-ed785ed2]{color:#8a909c;text-decoration:line-through}.pc__wage[data-v-ed785ed2]{color:#e31a1a;font-weight:500;font-size:12px} diff --git a/apps/user-app-v2/dist/assets/ProfileView-C1gjwKvq.js b/apps/user-app-v2/dist/assets/ProfileView-C1gjwKvq.js new file mode 100644 index 0000000..9e2eecf --- /dev/null +++ b/apps/user-app-v2/dist/assets/ProfileView-C1gjwKvq.js @@ -0,0 +1 @@ +import{d as x,O as L,o as w,s as g,c as n,p as r,z as M,g as d,B as F,f as i,b as e,I as y,t as a,e as c,i as f,N as k,m as $,h as v,C as O,_ as z}from"./index-BAr1mMLP.js";import{P as U}from"./PageBar-B1ks8U8i.js";import{S as m}from"./SectionHead-DadL6umU.js";const A={class:"prof"},W={class:"prof__identity"},H={class:"prof__avatar","aria-hidden":"true"},J={class:"prof__name"},j={key:0,class:"prof__mobile"},q={key:0,class:"prof__block"},G={class:"prof__specs"},K={class:"prof__spec"},Q={class:"prof__spec"},X={class:"prof__spec"},Y={class:"prof__spec"},Z={key:1,class:"prof__block"},ee={class:"prof__specs"},se={class:"prof__spec"},te={class:"prof__spec"},oe={key:2,class:"prof__block"},le={key:3,class:"prof__empty"},ae=x({__name:"ProfileView",setup(ne){const b={UNVERIFIED:"احراز نشده",STEP_ONE_SUBMITTED:"مرحله اول ثبت شده",STEP_TWO_SUBMITTED:"مرحله دوم ثبت شده",VERIFIED:"تایید شده",REJECTED:"رد شده"},T=L(),o=d(null),_=d(!1),h=v(()=>{var s;return((s=o.value)==null?void 0:s.verificationStep)==="VERIFIED"}),B=v(()=>{var t;const s=(t=o.value)==null?void 0:t.verificationStep;return!!s&&s!=="VERIFIED"&&s!=="STEP_TWO_SUBMITTED"}),C=O(),l=d(null),p=d(!1),u=s=>Number(s??0),S=s=>u(s)>0?"بدهکار":u(s)<0?"بستانکار":"",E=s=>u(s)>0?"is-debt":u(s)<0?"is-credit":"",V=s=>`${Math.abs(u(s)).toLocaleString("fa-IR",{maximumFractionDigits:3})} گرم`,D=s=>`${Math.abs(u(s)).toLocaleString("fa-IR")} ریال`,N=v(()=>{const s=l.value;if(!(s!=null&&s.at))return"";const t=new Date(s.at).toLocaleString("fa-IR",{dateStyle:"short",timeStyle:"short"});return s.source==="stored"?`آخرین مانده‌ی ثبت‌شده — ${t}`:`از ${s.provider??"حسابداری"} — ${t}`});async function R(){p.value=!0;try{l.value=await g.getAccountingBalance()}catch{l.value=null}finally{p.value=!1}}return w(async()=>{if(T.isLoggedIn){R(),_.value=!0;try{o.value=await g.getMe()}finally{_.value=!1}}}),(s,t)=>{const P=F("container");return i(),n("div",A,[r(U,{title:"اطلاعات کاربری","back-to":"userPage::hasSubRoute"}),r(P,{class:"prof__body"},{default:M(()=>{var I;return[e("section",W,[e("div",H,[r(y,{icon:"vuesax-linear:user",size:"30"})]),e("h2",J,a(((I=o.value)==null?void 0:I.fullName)??"—"),1),o.value?(i(),n("p",j,a(o.value.mobile),1)):c("",!0),o.value?(i(),n("span",{key:1,class:f(["prof__seal",h.value?"is-ok":"is-pending"])},a(b[o.value.verificationStep]??o.value.verificationStep),3)):c("",!0)]),o.value?(i(),n("section",q,[r(m,{title:"مشخصات",subtitle:"اطلاعات ثبت‌شده حساب شما"}),e("dl",G,[e("div",K,[t[1]||(t[1]=e("dt",null,"نام و نام خانوادگی",-1)),e("dd",null,a(o.value.fullName),1)]),e("div",Q,[t[2]||(t[2]=e("dt",null,"تلفن همراه",-1)),e("dd",null,a(o.value.mobile),1)]),e("div",X,[t[3]||(t[3]=e("dt",null,"کد ملی",-1)),e("dd",null,a(o.value.nationalCode||"-"),1)]),e("div",Y,[t[4]||(t[4]=e("dt",null,"وضعیت احراز هویت",-1)),e("dd",null,a(b[o.value.verificationStep]??o.value.verificationStep),1)])])])):c("",!0),l.value&&l.value.source!=="none"?(i(),n("section",Z,[r(m,{title:"مانده‌ی حساب",subtitle:N.value},null,8,["subtitle"]),e("dl",ee,[e("div",se,[t[5]||(t[5]=e("dt",null,"مانده‌ی طلا",-1)),e("dd",{class:f(E(l.value.gold))},[k(a(V(l.value.gold))+" ",1),e("small",null,a(S(l.value.gold)),1)],2)]),e("div",te,[t[6]||(t[6]=e("dt",null,"مانده‌ی ریالی",-1)),e("dd",{class:f(E(l.value.rial))},[k(a(D(l.value.rial))+" ",1),e("small",null,a(S(l.value.rial)),1)],2)])])])):p.value?(i(),n("section",oe,[r(m,{title:"مانده‌ی حساب",subtitle:"در حال دریافت از حسابداری…"}),t[7]||(t[7]=e("div",{class:"prof__specs prof__skeleton"},null,-1))])):_.value?c("",!0):(i(),n("section",le,[r(y,{icon:"vuesax-linear:user",size:"26"}),t[8]||(t[8]=e("p",null,"اطلاعات حساب در دسترس نیست.",-1))])),B.value?(i(),n("button",{key:4,type:"button",class:"prof__complete",onClick:t[0]||(t[0]=ie=>$(C).push({name:"completeProfile"}))}," تکمیل پروفایل ")):c("",!0)]}),_:1})])}}}),de=z(ae,[["__scopeId","data-v-ac20b323"]]);export{de as default}; diff --git a/apps/user-app-v2/dist/assets/ProfileView-CAzDKC1_.js b/apps/user-app-v2/dist/assets/ProfileView-CAzDKC1_.js deleted file mode 100644 index ec2ac2b..0000000 --- a/apps/user-app-v2/dist/assets/ProfileView-CAzDKC1_.js +++ /dev/null @@ -1 +0,0 @@ -import{d as I,D as S,o as E,c as a,l,q as y,g as p,s as V,f as i,b as e,I as f,t,e as _,i as b,h as k,_ as h}from"./index-CZjgV-Yn.js";import{P as C}from"./PageBar-Bkc2Ht1O.js";import{S as N}from"./SectionHead-CiwUIGKe.js";import{a as T}from"./client-WIBW0tF5.js";const g={class:"prof"},B={class:"prof__identity"},D={class:"prof__avatar","aria-hidden":"true"},P={class:"prof__name"},x={key:0,class:"prof__mobile"},R={key:0,class:"prof__block"},w={class:"prof__specs"},F={class:"prof__spec"},z={class:"prof__spec"},M={class:"prof__spec"},O={class:"prof__spec"},U={key:1,class:"prof__empty"},A=I({__name:"ProfileView",setup(L){const c={UNVERIFIED:"احراز نشده",STEP_ONE_SUBMITTED:"مرحله اول ثبت شده",STEP_TWO_SUBMITTED:"مرحله دوم ثبت شده",VERIFIED:"تایید شده"},u=S(),s=p(null),n=p(!1),v=k(()=>{var r;return((r=s.value)==null?void 0:r.verificationStep)==="VERIFIED"});return E(async()=>{if(u.customerId){n.value=!0;try{s.value=await T.getCustomer(u.customerId)}finally{n.value=!1}}}),(r,o)=>{const m=V("container");return i(),a("div",g,[l(C,{title:"اطلاعات کاربری","back-to":"userPage::hasSubRoute"}),l(m,{class:"prof__body"},{default:y(()=>{var d;return[e("section",B,[e("div",D,[l(f,{icon:"vuesax-linear:user",size:"30"})]),e("h2",P,t(((d=s.value)==null?void 0:d.fullName)??"—"),1),s.value?(i(),a("p",x,t(s.value.mobile),1)):_("",!0),s.value?(i(),a("span",{key:1,class:b(["prof__seal",v.value?"is-ok":"is-pending"])},t(c[s.value.verificationStep]??s.value.verificationStep),3)):_("",!0)]),s.value?(i(),a("section",R,[l(N,{title:"مشخصات",subtitle:"اطلاعات ثبت‌شده حساب شما"}),e("dl",w,[e("div",F,[o[0]||(o[0]=e("dt",null,"نام و نام خانوادگی",-1)),e("dd",null,t(s.value.fullName),1)]),e("div",z,[o[1]||(o[1]=e("dt",null,"تلفن همراه",-1)),e("dd",null,t(s.value.mobile),1)]),e("div",M,[o[2]||(o[2]=e("dt",null,"کد ملی",-1)),e("dd",null,t(s.value.nationalCode),1)]),e("div",O,[o[3]||(o[3]=e("dt",null,"وضعیت احراز هویت",-1)),e("dd",null,t(c[s.value.verificationStep]??s.value.verificationStep),1)])])])):n.value?_("",!0):(i(),a("section",U,[l(f,{icon:"vuesax-linear:user",size:"26"}),o[4]||(o[4]=e("p",null,"اطلاعات حساب در دسترس نیست.",-1))]))]}),_:1})])}}}),G=h(A,[["__scopeId","data-v-7c544fc5"]]);export{G as default}; diff --git a/apps/user-app-v2/dist/assets/ProfileView-CPyo29sC.css b/apps/user-app-v2/dist/assets/ProfileView-CPyo29sC.css deleted file mode 100644 index 38b3db7..0000000 --- a/apps/user-app-v2/dist/assets/ProfileView-CPyo29sC.css +++ /dev/null @@ -1 +0,0 @@ -.prof[data-v-7c544fc5]{background:#fff;min-height:100vh}.prof__body[data-v-7c544fc5]{padding-top:80px;padding-bottom:90px}.prof__identity[data-v-7c544fc5]{display:flex;flex-direction:column;align-items:center;text-align:center;padding:26px 20px 28px;border:1px solid #ECEDEF;border-radius:20px;background:#fafafa}.prof__avatar[data-v-7c544fc5]{width:72px;height:72px;border-radius:50%;display:grid;place-items:center;color:#7a1b33;background:#fbf2f4}.prof__name[data-v-7c544fc5]{margin:14px 0 0;font-size:15.5px;font-weight:800;color:#14161a}.prof__mobile[data-v-7c544fc5]{margin:6px 0 0;font-size:12.5px;color:#5b616e;direction:ltr}.prof__seal[data-v-7c544fc5]{margin-top:12px;padding:5px 12px;border-radius:999px;font-size:11px;font-weight:700}.prof__seal.is-ok[data-v-7c544fc5]{color:#16a34a;background:#f0fdf4}.prof__seal.is-pending[data-v-7c544fc5]{color:#7a1b33;background:#fbf2f4}.prof__block[data-v-7c544fc5]{margin-top:26px}.prof__specs[data-v-7c544fc5]{margin:0;border:1px solid #ECEDEF;border-radius:18px;overflow:hidden}.prof__spec[data-v-7c544fc5]{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 14px;border-bottom:1px solid #F4F5F6}.prof__spec[data-v-7c544fc5]:last-child{border-bottom:0}.prof__spec dt[data-v-7c544fc5]{margin:0;font-size:12px;color:#8a909c}.prof__spec dd[data-v-7c544fc5]{margin:0;font-size:12.5px;font-weight:700;color:#14161a;text-align:left}.prof__empty[data-v-7c544fc5]{margin-top:26px;padding:34px 20px;border:1px dashed #ECEDEF;border-radius:18px;display:flex;flex-direction:column;align-items:center;gap:10px;color:#8a909c}.prof__empty p[data-v-7c544fc5]{margin:0;font-size:12.5px} diff --git a/apps/user-app-v2/dist/assets/ProfileView-umP5Sgbh.css b/apps/user-app-v2/dist/assets/ProfileView-umP5Sgbh.css new file mode 100644 index 0000000..ec4e7ca --- /dev/null +++ b/apps/user-app-v2/dist/assets/ProfileView-umP5Sgbh.css @@ -0,0 +1 @@ +.prof[data-v-ac20b323]{background:var(--c-page);min-height:100vh}.prof__body[data-v-ac20b323]{padding-top:80px;padding-bottom:90px}.prof__identity[data-v-ac20b323]{display:flex;flex-direction:column;align-items:center;text-align:center;padding:26px 20px 28px;border:1px solid var(--c-hairline);border-radius:20px;background:var(--c-canvasSoft)}.prof__avatar[data-v-ac20b323]{width:72px;height:72px;border-radius:50%;display:grid;place-items:center;color:var(--c-wine);background:var(--c-wineWash)}.prof__name[data-v-ac20b323]{margin:14px 0 0;font-size:15.5px;font-weight:800;color:var(--c-ink)}.prof__mobile[data-v-ac20b323]{margin:6px 0 0;font-size:12.5px;color:var(--c-inkMuted);direction:ltr}.prof__seal[data-v-ac20b323]{margin-top:12px;padding:5px 12px;border-radius:999px;font-size:11px;font-weight:700}.prof__seal.is-ok[data-v-ac20b323]{color:var(--c-green);background:rgb(var(--c-green-rgb) / 10%)}.prof__seal.is-pending[data-v-ac20b323]{color:var(--c-wine);background:var(--c-wineWash)}.prof__block[data-v-ac20b323]{margin-top:26px}.prof__specs[data-v-ac20b323]{margin:0;border:1px solid var(--c-hairline);border-radius:18px;overflow:hidden}.prof__spec[data-v-ac20b323]{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 14px;border-bottom:1px solid var(--c-hairlineSoft)}.prof__spec[data-v-ac20b323]:last-child{border-bottom:0}.prof__spec dt[data-v-ac20b323]{margin:0;font-size:12px;color:var(--c-inkFaint)}.prof__spec dd[data-v-ac20b323]{margin:0;font-size:12.5px;font-weight:700;color:var(--c-ink);text-align:left}.prof__spec dd.is-debt[data-v-ac20b323]{color:var(--c-wine)}.prof__spec dd.is-credit[data-v-ac20b323]{color:var(--c-green)}.prof__spec dd small[data-v-ac20b323]{font-weight:500;font-size:11px}.prof__skeleton[data-v-ac20b323]{height:92px;background:var(--c-hairlineSoft)}.prof__empty[data-v-ac20b323]{margin-top:26px;padding:34px 20px;border:1px dashed var(--c-hairline);border-radius:18px;display:flex;flex-direction:column;align-items:center;gap:10px;color:var(--c-inkFaint)}.prof__empty p[data-v-ac20b323]{margin:0;font-size:12.5px}.prof__complete[data-v-ac20b323]{margin-top:24px;width:100%;padding:15px;border:none;border-radius:999px;background:var(--c-wine);color:#fff;font-family:inherit;font-size:15px;font-weight:700;cursor:pointer} diff --git a/apps/user-app-v2/dist/assets/RateStrip-BjkE-E9D.css b/apps/user-app-v2/dist/assets/RateStrip-BjkE-E9D.css new file mode 100644 index 0000000..c7bd723 --- /dev/null +++ b/apps/user-app-v2/dist/assets/RateStrip-BjkE-E9D.css @@ -0,0 +1 @@ +.rate-strip[data-v-563349ab]{display:flex;align-items:center;gap:10px;padding:10px 14px;border-radius:14px;background:var(--c-heroSurface);color:#fff;box-shadow:0 10px 24px -18px #14161ae6}.rate-strip--compact[data-v-563349ab]{gap:7px;padding:6px 12px 6px 10px;border-radius:999px;box-shadow:none;background:rgb(var(--c-primary-rgb) / 6%);border:1px solid rgb(var(--c-primary-rgb) / 10%);color:var(--c-primary)}.rate-strip--compact .rate-strip__label[data-v-563349ab]{font-size:11px;font-weight:500;color:rgb(var(--c-primary-rgb) / 62%)}.rate-strip--compact .rate-strip__num[data-v-563349ab]{font-size:12.5px;font-weight:700;color:var(--c-primary)}.rate-strip--compact .rate-strip__value[data-v-563349ab]{margin-inline-start:0}.rate-strip--compact .rate-strip__dot[data-v-563349ab]{width:5px;height:5px;background:#8d6a46;box-shadow:none;animation:none}.rate-strip--compact .rate-strip__value--muted[data-v-563349ab]{font-size:11px;color:rgb(var(--c-primary-rgb) / 45%)}.rate-strip--compact .rate-strip__unit[data-v-563349ab],.rate-strip--compact .rate-strip__time[data-v-563349ab]{display:none}.rate-strip__label[data-v-563349ab]{display:flex;align-items:center;gap:7px;font-size:12px;color:#ffffffad;white-space:nowrap}.rate-strip__dot[data-v-563349ab]{width:6px;height:6px;border-radius:50%;background:var(--c-wineSoft);box-shadow:0 0 #a33c55a6;animation:ratePulse-563349ab 2.4s ease-out infinite}.rate-strip__value[data-v-563349ab]{margin-inline-start:auto;display:flex;align-items:baseline;gap:5px}.rate-strip__value--muted[data-v-563349ab]{font-size:12px;color:#ffffff8c}.rate-strip__num[data-v-563349ab]{font-size:16px;font-weight:700;letter-spacing:.2px}.rate-strip__unit[data-v-563349ab]{font-size:10.5px;color:#ffffff8c}.rate-strip__time[data-v-563349ab]{font-size:10.5px;color:#ffffff6b;padding-inline-start:10px;border-inline-start:1px solid rgba(255,255,255,.14);white-space:nowrap}@keyframes ratePulse-563349ab{0%{box-shadow:0 0 #a33c5599}70%{box-shadow:0 0 0 7px #a33c5500}to{box-shadow:0 0 #a33c5500}} diff --git a/apps/user-app-v2/dist/assets/RateStrip-CkNzWfWt.css b/apps/user-app-v2/dist/assets/RateStrip-CkNzWfWt.css deleted file mode 100644 index 5da7055..0000000 --- a/apps/user-app-v2/dist/assets/RateStrip-CkNzWfWt.css +++ /dev/null @@ -1 +0,0 @@ -.rate-strip[data-v-0b16738e]{display:flex;align-items:center;gap:10px;padding:10px 14px;border-radius:14px;background:#14161a;color:#fff;box-shadow:0 10px 24px -18px #14161ae6}.rate-strip--compact[data-v-0b16738e]{gap:7px;padding:6px 12px 6px 10px;border-radius:999px;box-shadow:none;background:#1c2d560f;border:1px solid rgba(28,45,86,.1);color:#1c2d56}.rate-strip--compact .rate-strip__label[data-v-0b16738e]{font-size:11px;font-weight:500;color:#1c2d569e}.rate-strip--compact .rate-strip__num[data-v-0b16738e]{font-size:12.5px;font-weight:700;color:#1c2d56}.rate-strip--compact .rate-strip__value[data-v-0b16738e]{margin-inline-start:0}.rate-strip--compact .rate-strip__dot[data-v-0b16738e]{width:5px;height:5px;background:#8d6a46;box-shadow:none;animation:none}.rate-strip--compact .rate-strip__value--muted[data-v-0b16738e]{font-size:11px;color:#1c2d5673}.rate-strip--compact .rate-strip__unit[data-v-0b16738e],.rate-strip--compact .rate-strip__time[data-v-0b16738e]{display:none}.rate-strip__label[data-v-0b16738e]{display:flex;align-items:center;gap:7px;font-size:12px;color:#ffffffad;white-space:nowrap}.rate-strip__dot[data-v-0b16738e]{width:6px;height:6px;border-radius:50%;background:#a33c55;box-shadow:0 0 #a33c55a6;animation:ratePulse-0b16738e 2.4s ease-out infinite}.rate-strip__value[data-v-0b16738e]{margin-inline-start:auto;display:flex;align-items:baseline;gap:5px}.rate-strip__value--muted[data-v-0b16738e]{font-size:12px;color:#ffffff8c}.rate-strip__num[data-v-0b16738e]{font-size:16px;font-weight:700;letter-spacing:.2px}.rate-strip__unit[data-v-0b16738e]{font-size:10.5px;color:#ffffff8c}.rate-strip__time[data-v-0b16738e]{font-size:10.5px;color:#ffffff6b;padding-inline-start:10px;border-inline-start:1px solid rgba(255,255,255,.14);white-space:nowrap}@keyframes ratePulse-0b16738e{0%{box-shadow:0 0 #a33c5599}70%{box-shadow:0 0 0 7px #a33c5500}to{box-shadow:0 0 #a33c5500}} diff --git a/apps/user-app-v2/dist/assets/RateStrip-CoZk8fjQ.js b/apps/user-app-v2/dist/assets/RateStrip-CoZk8fjQ.js deleted file mode 100644 index f439c81..0000000 --- a/apps/user-app-v2/dist/assets/RateStrip-CoZk8fjQ.js +++ /dev/null @@ -1 +0,0 @@ -import{p as n,j as d}from"./filters-CLL9nGZ2.js";import{d as l,c as s,i as u,b as a,C as m,t as i,u as c,e as _,h as v,f as r,_ as q}from"./index-CZjgV-Yn.js";const f={key:0,class:"rate-strip__value"},y={class:"rate-strip__num"},k={key:1,class:"rate-strip__value rate-strip__value--muted"},x={key:2,class:"rate-strip__time"},B=l({__name:"RateStrip",props:{quote:{},compact:{type:Boolean}},setup(t){const o=t,p=v(()=>o.quote?o.quote.pricePerGramRial.split(".")[0]:"");return(C,e)=>(r(),s("div",{class:u(["rate-strip",{"is-empty":!t.quote,"rate-strip--compact":t.compact}])},[e[1]||(e[1]=a("div",{class:"rate-strip__label"},[a("span",{class:"rate-strip__dot","aria-hidden":"true"}),m(" نرخ طلای ۱۸ عیار ")],-1)),t.quote?(r(),s("div",f,[a("span",y,i(c(n)(p.value)),1),e[0]||(e[0]=a("span",{class:"rate-strip__unit"},"ریال / گرم",-1))])):(r(),s("div",k,"در انتظار اعلام نرخ")),t.quote?(r(),s("div",x,i(c(d)(t.quote.quotedAt)),1)):_("",!0)],2))}}),h=q(B,[["__scopeId","data-v-0b16738e"]]);export{h as R}; diff --git a/apps/user-app-v2/dist/assets/RateStrip-DvVfajyI.js b/apps/user-app-v2/dist/assets/RateStrip-DvVfajyI.js new file mode 100644 index 0000000..a6f63da --- /dev/null +++ b/apps/user-app-v2/dist/assets/RateStrip-DvVfajyI.js @@ -0,0 +1 @@ +import{p as n,j as d}from"./filters-Cm9yhZZ9.js";import{d as l,c as a,i as m,b as s,N as u,t as i,m as c,e as _,h as v,f as r,_ as q}from"./index-BAr1mMLP.js";const f={key:0,class:"rate-strip__value"},y={class:"rate-strip__num"},k={key:1,class:"rate-strip__value rate-strip__value--muted"},x={key:2,class:"rate-strip__time"},B=l({__name:"RateStrip",props:{quote:{},compact:{type:Boolean}},setup(t){const o=t,p=v(()=>o.quote?o.quote.pricePerGramRial.split(".")[0]:"");return(N,e)=>(r(),a("div",{class:m(["rate-strip",{"is-empty":!t.quote,"rate-strip--compact":t.compact}])},[e[1]||(e[1]=s("div",{class:"rate-strip__label"},[s("span",{class:"rate-strip__dot","aria-hidden":"true"}),u(" نرخ طلای ۱۸ عیار ")],-1)),t.quote?(r(),a("div",f,[s("span",y,i(c(n)(p.value)),1),e[0]||(e[0]=s("span",{class:"rate-strip__unit"},"ریال / گرم",-1))])):(r(),a("div",k,"در انتظار اعلام نرخ")),t.quote?(r(),a("div",x,i(c(d)(t.quote.quotedAt)),1)):_("",!0)],2))}}),h=q(B,[["__scopeId","data-v-563349ab"]]);export{h as R}; diff --git a/apps/user-app-v2/dist/assets/ReportView-DdQlxLKa.js b/apps/user-app-v2/dist/assets/ReportView-DdQlxLKa.js new file mode 100644 index 0000000..f06e30c --- /dev/null +++ b/apps/user-app-v2/dist/assets/ReportView-DdQlxLKa.js @@ -0,0 +1 @@ +import{d as J,f as n,c as a,b as t,N as D,t as i,m as p,e as r,_ as K,g as u,o as W,a as X,p as c,z as m,J as U,S as Y,s as B,i as z,F as $,r as I,I as M,B as Z,j as A}from"./index-BAr1mMLP.js";import{P as tt}from"./PageBar-B1ks8U8i.js";import{j as S,p as q}from"./filters-Cm9yhZZ9.js";import{D as et}from"./index-DWuFFuVX.js";import{P as st,L}from"./index-DPSZMLNJ.js";import"./KeyCode-BMdFtCT-.js";import"./classCallCheck-DDMOgDz1.js";import"./raf-nDFcuFT6.js";const lt={class:"doc"},nt={class:"doc__head"},at={class:"doc__rows"},ot={class:"doc__row"},it={class:"doc__row"},rt={dir:"ltr"},dt={key:0,class:"doc__row"},ut={dir:"ltr"},ct={key:1,class:"doc__row"},_t={dir:"ltr"},vt={key:2,class:"doc__row"},mt={key:3,class:"doc__row"},ft={dir:"ltr"},pt={key:4,class:"doc__row"},yt={dir:"ltr"},kt={key:5,class:"doc__row"},gt={dir:"ltr"},bt={key:6,class:"doc__row"},ht={key:7,class:"doc__row"},wt={key:8,class:"doc__row"},$t={key:9,class:"doc__row"},Ct={key:10,class:"doc__row"},Rt={class:"doc__gold"},xt={class:"doc__stack"},zt={dir:"ltr",class:"is-in"},Dt={dir:"ltr",class:"is-out"},Nt=J({__name:"ReportDocument",props:{item:{}},setup(l){function C(v){const e=parseFloat(v);if(!Number.isFinite(e))return v;const f=Math.trunc(Math.abs(e)).toString();return(e<0?"-":"")+q(f)}return(v,e)=>(n(),a("article",lt,[t("header",nt,[t("span",null,[e[0]||(e[0]=t("span",{class:"doc__muted"},"شماره سند:",-1)),D(" "+i(l.item.sh_factor),1)]),t("span",null,[e[1]||(e[1]=t("span",{class:"doc__muted"},"تاریخ:",-1)),D(" "+i(p(S)(l.item.tarikh)),1)])]),t("dl",at,[t("div",ot,[e[2]||(e[2]=t("dt",null,"نوع سند",-1)),t("dd",null,i(l.item.no),1)]),t("div",it,[e[3]||(e[3]=t("dt",null,"وزن خالص",-1)),t("dd",rt,i(l.item.vazn),1)]),l.item.ayar!==null?(n(),a("div",dt,[e[4]||(e[4]=t("dt",null,"عیار",-1)),t("dd",ut,i(l.item.ayar),1)])):r("",!0),l.item.sh_sharti?(n(),a("div",ct,[e[5]||(e[5]=t("dt",null,"شماره انگ",-1)),t("dd",_t,i(l.item.sh_sharti),1)])):r("",!0),l.item.name_az?(n(),a("div",vt,[e[6]||(e[6]=t("dt",null,"نام آزمایشگاه",-1)),t("dd",null,i(l.item.name_az),1)])):r("",!0),l.item.Darsad_Talayee?(n(),a("div",mt,[e[7]||(e[7]=t("dt",null,"اجرت (گرم)",-1)),t("dd",ft,i(l.item.Darsad_Talayee),1)])):r("",!0),l.item.fi?(n(),a("div",pt,[e[8]||(e[8]=t("dt",null,"قیمت هر گرم",-1)),t("dd",yt,i(C(l.item.fi)),1)])):r("",!0),l.item.fiF?(n(),a("div",kt,[e[9]||(e[9]=t("dt",null,"مبلغ سند",-1)),t("dd",gt,i(C(l.item.fiF)),1)])):r("",!0),l.item.bankName?(n(),a("div",bt,[e[10]||(e[10]=t("dt",null,"بانک",-1)),t("dd",null,i(l.item.bankName),1)])):r("",!0),l.item.accountName?(n(),a("div",ht,[e[11]||(e[11]=t("dt",null,"نام حساب",-1)),t("dd",null,i(l.item.accountName),1)])):r("",!0),l.item.transferTo?(n(),a("div",wt,[e[12]||(e[12]=t("dt",null,"مقصد حواله",-1)),t("dd",null,i(l.item.transferTo),1)])):r("",!0),l.item.receivedAt?(n(),a("div",$t,[e[13]||(e[13]=t("dt",null,"تاریخ دریافت",-1)),t("dd",null,i(p(S)(l.item.receivedAt)),1)])):r("",!0),l.item.note?(n(),a("div",Ct,[e[14]||(e[14]=t("dt",null,"توضیحات",-1)),t("dd",null,i(l.item.note),1)])):r("",!0)]),t("div",Rt,[e[15]||(e[15]=t("span",null,"طلا",-1)),t("div",xt,[t("span",zt,i(l.item.tabdil750_v),1),t("span",Dt,i(l.item.tabdil750_kh),1)])])]))}}),E=K(Nt,[["__scopeId","data-v-21825ac9"]]),Ft={class:"rep"},Vt={class:"rep__tabs"},Pt={key:0,class:"rep__list"},Tt={class:"rep__head"},Bt={class:"rep__pair"},It={class:"rep__stack"},Mt={dir:"ltr",class:"is-in"},Lt={dir:"ltr",class:"is-out"},St={class:"rep__pair is-balance"},jt={class:"rep__pair"},Ot={class:"rep__stack"},Ut={dir:"ltr",class:"is-in"},At={dir:"ltr",class:"is-out"},Et={class:"rep__pair is-balance"},Jt=["onClick"],Kt={key:1,class:"rep__empty"},qt={key:0,class:"rep__list"},Gt={key:1,class:"rep__empty"},Ht={key:2,class:"rep__empty"},Qt={key:3,class:"rep__more"},Wt={class:"rep__modal"},Xt={key:0,class:"rep__modalEmpty"},Yt=J({__name:"ReportView",setup(l){const C=Y(),v=u(C.name==="reportDetail"?"2":"1"),e=u([]),f=u([]),g=u(1),b=u(!0),y=u(!1),N=u(!1),k=u(!1),R=u(!1),x=u(!1),h=u([]);function F(d){const s=parseFloat(d);if(!Number.isFinite(s))return d;const _=Math.trunc(Math.abs(s)).toString();return(s<0?"-":"")+q(_)}function j(d){return parseFloat(d)<0?"is-out":"is-in"}async function V(){var d,s;if(!(y.value||!b.value)){y.value=!0,k.value=!1;try{if(v.value==="1"){const _=await B.getReport(g.value);e.value=[...e.value,..._.result??[]],(((d=_.result)==null?void 0:d.length)??0)<(_.limit??50)?b.value=!1:g.value+=1}else{const _=await B.getReportDetailList(g.value);f.value=[...f.value,..._.result??[]],(((s=_.result)==null?void 0:s.length)??0)<(_.limit??50)?b.value=!1:g.value+=1}}catch{k.value=!0,b.value=!1}finally{y.value=!1}}}function G(){e.value=[],f.value=[],g.value=1,b.value=!0,k.value=!1}async function P(){G(),await V()}async function O(d){v.value!==d&&(v.value=d,await P())}async function H(){await P(),N.value=!1}async function Q(d){R.value=!0,x.value=!0,h.value=[];try{const s=await B.getReportDocument(d.factor_Code);h.value=s.result??[]}catch{h.value=[]}finally{x.value=!1}}const T=u(null);let w=null;return W(async()=>{await V(),typeof IntersectionObserver<"u"&&(w=new IntersectionObserver(d=>{d.some(s=>s.isIntersecting)&&V()}),T.value&&w.observe(T.value))}),X(()=>w==null?void 0:w.disconnect()),(d,s)=>{const _=Z("container");return n(),a("div",Ft,[c(tt,{title:"گزارش","back-to":"userPage::hasSubRoute"},{below:m(()=>[t("div",Vt,[t("button",{type:"button",class:z(["rep__tab",{"is-on":v.value==="1"}]),onClick:s[0]||(s[0]=o=>O("1"))}," کلیات حساب ",2),t("button",{type:"button",class:z(["rep__tab",{"is-on":v.value==="2"}]),onClick:s[1]||(s[1]=o=>O("2"))}," جزئیات حساب ",2)])]),_:1}),c(U,{spinning:y.value&&!e.value.length&&!f.value.length,tip:"درحال دریافت اطلاعات"},{default:m(()=>[c(p(st),{modelValue:N.value,"onUpdate:modelValue":s[2]||(s[2]=o=>N.value=o),onRefresh:H},{pulling:m(()=>[c(p(L),{size:"18"})]),loosing:m(()=>[c(p(L),{size:"18"})]),loading:m(()=>[c(p(L),{size:"18"})]),success:m(()=>[...s[5]||(s[5]=[t("span",null,null,-1)])]),default:m(()=>[c(_,{class:"rep__body"},{default:m(()=>[v.value==="1"?(n(),a($,{key:0},[e.value.length?(n(),a("div",Pt,[(n(!0),a($,null,I(e.value,o=>(n(),a("article",{key:o.factor_Code,class:"rep__card"},[t("header",Tt,[t("span",null,[s[6]||(s[6]=t("span",{class:"rep__muted"},"شماره سند:",-1)),D(" "+i(o.sh_factor),1)]),t("span",null,[s[7]||(s[7]=t("span",{class:"rep__muted"},"تاریخ:",-1)),D(" "+i(p(S)(o.tarikh)),1)])]),t("div",Bt,[s[8]||(s[8]=t("span",null,"طلا",-1)),t("div",It,[t("span",Mt,i(o.geram_v),1),t("span",Lt,i(o.geram_kh),1)])]),t("div",St,[s[9]||(s[9]=t("span",null,"مانده طلا:",-1)),t("span",{dir:"ltr",class:z(j(o.tahesab_T))},i(o.tahesab_T),3)]),t("div",jt,[s[10]||(s[10]=t("span",null,"ریال",-1)),t("div",Ot,[t("span",Ut,i(F(o.rial_v)),1),t("span",At,i(F(o.rial_kh)),1)])]),t("div",Et,[s[11]||(s[11]=t("span",null,"مانده ریال:",-1)),t("span",{dir:"ltr",class:z(j(o.tahesab_P))},i(F(o.tahesab_P)),3)]),t("button",{type:"button",class:"rep__more",onClick:Zt=>Q(o)},"جزئیات",8,Jt)]))),128))])):!y.value&&!k.value?(n(),a("section",Kt,[c(M,{icon:"vuesax-linear:receipt-text",size:"26"}),s[12]||(s[12]=t("p",null,"هنوز سندی برای حساب شما ثبت نشده است.",-1))])):r("",!0)],64)):(n(),a($,{key:1},[f.value.length?(n(),a("div",qt,[(n(!0),a($,null,I(f.value,o=>(n(),A(E,{key:o.factor_Code,item:o},null,8,["item"]))),128))])):!y.value&&!k.value?(n(),a("section",Gt,[c(M,{icon:"vuesax-linear:receipt-text",size:"26"}),s[13]||(s[13]=t("p",null,"هنوز سندی برای حساب شما ثبت نشده است.",-1))])):r("",!0)],64)),k.value?(n(),a("section",Ht,[c(M,{icon:"vuesax-linear:danger",size:"26"}),s[14]||(s[14]=t("p",null,"دریافت اطلاعات با خطا روبه‌رو شد.",-1)),t("button",{type:"button",class:"rep__retry",onClick:P},"تلاش دوباره")])):r("",!0),y.value&&(e.value.length||f.value.length)?(n(),a("div",Qt,"در حال دریافت…")):r("",!0),t("div",{ref_key:"sentinel",ref:T,class:"rep__sentinel"},null,512)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["spinning"]),c(p(et),{open:R.value,"onUpdate:open":s[4]||(s[4]=o=>R.value=o),placement:"bottom",height:"auto",closable:!1,"body-style":{padding:"0"}},{default:m(()=>[t("div",Wt,[c(U,{spinning:x.value,tip:"درحال دریافت اطلاعات"},{default:m(()=>[(n(!0),a($,null,I(h.value,o=>(n(),A(E,{key:o.factor_Code,item:o},null,8,["item"]))),128)),!x.value&&!h.value.length?(n(),a("p",Xt," جزئیاتی برای این سند ثبت نشده است. ")):r("",!0)]),_:1},8,["spinning"]),t("button",{type:"button",class:"rep__close",onClick:s[3]||(s[3]=o=>R.value=!1)},"بازگشت")])]),_:1},8,["open"])])}}}),re=K(Yt,[["__scopeId","data-v-24011723"]]);export{re as default}; diff --git a/apps/user-app-v2/dist/assets/ReportView-tLoo_9HZ.css b/apps/user-app-v2/dist/assets/ReportView-tLoo_9HZ.css new file mode 100644 index 0000000..36d3c5c --- /dev/null +++ b/apps/user-app-v2/dist/assets/ReportView-tLoo_9HZ.css @@ -0,0 +1 @@ +.doc[data-v-21825ac9]{padding:18px 2px;background:transparent;border:none;border-bottom:1px solid var(--c-hairline)}.doc[data-v-21825ac9]:last-child{border-bottom:none}.doc__head[data-v-21825ac9]{display:flex;justify-content:space-between;gap:10px;margin-bottom:10px;font-size:13px;font-weight:600}.doc__muted[data-v-21825ac9]{color:var(--c-inkMuted);font-weight:500;margin-left:4px}.doc__rows[data-v-21825ac9]{margin:0;display:flex;flex-direction:column}.doc__row[data-v-21825ac9]{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:9px 0;border-bottom:1px dashed var(--c-hairlineSoft)}.doc__row[data-v-21825ac9]:last-child{border-bottom:none}.doc__row dt[data-v-21825ac9]{font-size:12.5px;color:var(--c-inkMuted);white-space:nowrap}.doc__row dd[data-v-21825ac9]{margin:0;font-size:13.5px;font-weight:600;text-align:left}.doc__gold[data-v-21825ac9]{display:flex;justify-content:space-between;align-items:center;margin-top:10px;padding-top:10px;border-top:1px dashed var(--c-hairline);font-size:13px;font-weight:700}.doc__stack[data-v-21825ac9]{display:flex;flex-direction:column;align-items:flex-end;gap:2px}.is-in[data-v-21825ac9]{color:var(--c-green)}.is-out[data-v-21825ac9]{color:var(--c-red)}.rep__tabs[data-v-24011723]{display:flex;gap:24px;padding:0 16px 10px}.rep__tab[data-v-24011723]{padding:8px 0;border:none;border-bottom:2px solid transparent;background:transparent;font-family:inherit;font-size:14px;font-weight:600;color:var(--c-inkFaint);cursor:pointer}.rep__tab.is-on[data-v-24011723]{color:var(--c-ink);border-bottom-color:var(--c-wine)}.rep__body[data-v-24011723]{padding-top:126px;padding-bottom:90px}.rep__list[data-v-24011723]{display:flex;flex-direction:column;padding-top:8px}.rep__card[data-v-24011723]{padding:18px 2px;background:transparent;border:none;border-bottom:1px solid var(--c-hairline)}.rep__card[data-v-24011723]:last-child{border-bottom:none}.rep__head[data-v-24011723]{display:flex;justify-content:space-between;gap:10px;margin-bottom:12px;font-size:13px;font-weight:600}.rep__muted[data-v-24011723]{color:var(--c-inkMuted);font-weight:500;margin-left:4px}.rep__pair[data-v-24011723]{display:flex;justify-content:space-between;align-items:center;padding:8px 0;font-size:13px;color:var(--c-inkMuted)}.rep__pair.is-balance[data-v-24011723]{padding-top:10px;border-top:1px dashed var(--c-hairline);color:var(--c-ink);font-weight:700}.rep__stack[data-v-24011723]{display:flex;flex-direction:column;align-items:flex-end;gap:2px;font-weight:600}.is-in[data-v-24011723]{color:var(--c-green)}.is-out[data-v-24011723]{color:var(--c-red)}.rep__more[data-v-24011723],.rep__sentinel[data-v-24011723]{padding:12px 0;text-align:center;font-size:12px;color:var(--c-inkMuted)}.rep__more[data-v-24011723]{width:100%;margin-top:6px;border:none;background:transparent;font-family:inherit;font-weight:700;color:var(--c-wine);cursor:pointer}.rep__empty[data-v-24011723]{margin-top:40px;padding:34px 20px;display:flex;flex-direction:column;align-items:center;gap:10px;color:var(--c-inkMuted);font-size:13px}.rep__retry[data-v-24011723]{padding:8px 18px;border-radius:999px;border:1px solid var(--c-hairline);background:var(--c-canvas);font-family:inherit;font-size:12px;font-weight:600;cursor:pointer}.rep__modal[data-v-24011723]{padding:20px 16px 24px}.rep__modalEmpty[data-v-24011723]{padding:24px 0;text-align:center;font-size:13px;color:var(--c-inkMuted)}.rep__close[data-v-24011723]{margin-top:18px;width:100%;padding:14px;border:none;border-radius:999px;background:var(--c-wine);color:#fff;font-family:inherit;font-size:14px;font-weight:700;cursor:pointer} diff --git a/apps/user-app-v2/dist/assets/SearchInput-DEfgrsbu.css b/apps/user-app-v2/dist/assets/SearchInput-DEfgrsbu.css new file mode 100644 index 0000000..f9f52ec --- /dev/null +++ b/apps/user-app-v2/dist/assets/SearchInput-DEfgrsbu.css @@ -0,0 +1 @@ +.si[data-v-8ebd3183]{position:relative;display:flex;align-items:center}.si__icon[data-v-8ebd3183]{position:absolute;right:14px;color:var(--c-inkFaint);cursor:pointer}.si__input[data-v-8ebd3183]{width:100%;height:48px;padding:0 44px;font-family:inherit;font-size:13px;color:var(--c-ink);background:var(--c-canvas);border:1px solid var(--c-hairline);border-radius:999px;transition:border-color .18s ease,background .18s ease}.si__input[data-v-8ebd3183]::-moz-placeholder{color:var(--c-inkFaint)}.si__input[data-v-8ebd3183]::placeholder{color:var(--c-inkFaint)}.si__input[data-v-8ebd3183]:focus{outline:none;background:var(--c-canvas);border-color:var(--c-wineSoft)}.si__clear[data-v-8ebd3183]{position:absolute;left:10px;width:26px;height:26px;display:grid;place-items:center;border:0;cursor:pointer;border-radius:50%;color:var(--c-inkFaint);background:var(--c-hairline);transform:rotate(45deg);transition:color .18s ease,background .18s ease}.si__clear[data-v-8ebd3183]:active{transform:rotate(45deg) scale(.92)} diff --git a/apps/user-app-v2/dist/assets/SearchInput-R4CzmG27.css b/apps/user-app-v2/dist/assets/SearchInput-R4CzmG27.css deleted file mode 100644 index 32adfda..0000000 --- a/apps/user-app-v2/dist/assets/SearchInput-R4CzmG27.css +++ /dev/null @@ -1 +0,0 @@ -.si[data-v-8ebd3183]{position:relative;display:flex;align-items:center}.si__icon[data-v-8ebd3183]{position:absolute;right:14px;color:#8a909c;cursor:pointer}.si__input[data-v-8ebd3183]{width:100%;height:48px;padding:0 44px;font-family:inherit;font-size:13px;color:#14161a;background:#fff;border:1px solid #ECEDEF;border-radius:999px;transition:border-color .18s ease,background .18s ease}.si__input[data-v-8ebd3183]::-moz-placeholder{color:#8a909c}.si__input[data-v-8ebd3183]::placeholder{color:#8a909c}.si__input[data-v-8ebd3183]:focus{outline:none;background:#fff;border-color:#a33c55}.si__clear[data-v-8ebd3183]{position:absolute;left:10px;width:26px;height:26px;display:grid;place-items:center;border:0;cursor:pointer;border-radius:50%;color:#8a909c;background:#ecedef;transform:rotate(45deg);transition:color .18s ease,background .18s ease}.si__clear[data-v-8ebd3183]:active{transform:rotate(45deg) scale(.92)} diff --git a/apps/user-app-v2/dist/assets/SearchInput-CSiqcIfW.js b/apps/user-app-v2/dist/assets/SearchInput-vVDQz-rO.js similarity index 62% rename from apps/user-app-v2/dist/assets/SearchInput-CSiqcIfW.js rename to apps/user-app-v2/dist/assets/SearchInput-vVDQz-rO.js index bcb2e85..5fe22b3 100644 --- a/apps/user-app-v2/dist/assets/SearchInput-CSiqcIfW.js +++ b/apps/user-app-v2/dist/assets/SearchInput-vVDQz-rO.js @@ -1 +1 @@ -import{d as v,a1 as h,E as m,f as t,c as l,l as n,I as r,w as f,a2 as b,b as x,a3 as k,e as I,A as w,g as y,_ as C}from"./index-CZjgV-Yn.js";const S={class:"si"},V=["placeholder"],B=v({__name:"SearchInput",props:{placeHolder:{}},emits:["search"],setup(i,{emit:d}){const c=d,a=w({clear:!1}),e=y(void 0),s=()=>{c("search",e.value)},u=()=>{e.value=void 0,a.clear=!1,c("search",void 0)},p=h(e,700);return m(p,()=>{e?a.clear=!0:a.clear=!1,s()}),(N,o)=>(t(),l("div",S,[n(r,{icon:"vuesax-linear:search-normal-1",class:"si__icon",size:"18",onClick:s}),f(x("input",{"onUpdate:modelValue":o[0]||(o[0]=_=>e.value=_),class:"si__input",placeholder:i.placeHolder,onKeyup:k(s,["enter"])},null,40,V),[[b,e.value]]),a.clear?(t(),l("button",{key:0,type:"button",class:"si__clear","aria-label":"پاک کردن",onClick:u},[n(r,{icon:"vuesax-linear:add",size:"16"})])):I("",!0)]))}}),D=C(B,[["__scopeId","data-v-8ebd3183"]]);export{D as S}; +import{d as v,b3 as h,Q as m,f as t,c as l,p as n,I as r,w as f,b4 as b,b as x,b5 as k,e as I,K as w,g as y,_ as C}from"./index-BAr1mMLP.js";const S={class:"si"},V=["placeholder"],B=v({__name:"SearchInput",props:{placeHolder:{}},emits:["search"],setup(i,{emit:d}){const c=d,a=w({clear:!1}),e=y(void 0),s=()=>{c("search",e.value)},u=()=>{e.value=void 0,a.clear=!1,c("search",void 0)},p=h(e,700);return m(p,()=>{e?a.clear=!0:a.clear=!1,s()}),(K,o)=>(t(),l("div",S,[n(r,{icon:"vuesax-linear:search-normal-1",class:"si__icon",size:"18",onClick:s}),f(x("input",{"onUpdate:modelValue":o[0]||(o[0]=_=>e.value=_),class:"si__input",placeholder:i.placeHolder,onKeyup:k(s,["enter"])},null,40,V),[[b,e.value]]),a.clear?(t(),l("button",{key:0,type:"button",class:"si__clear","aria-label":"پاک کردن",onClick:u},[n(r,{icon:"vuesax-linear:add",size:"16"})])):I("",!0)]))}}),z=C(B,[["__scopeId","data-v-8ebd3183"]]);export{z as S}; diff --git a/apps/user-app-v2/dist/assets/SearchView-BAXvbdsy.js b/apps/user-app-v2/dist/assets/SearchView-BAXvbdsy.js deleted file mode 100644 index dd1d203..0000000 --- a/apps/user-app-v2/dist/assets/SearchView-BAXvbdsy.js +++ /dev/null @@ -1 +0,0 @@ -import{l as O,T as Ne,w as Oe,k as Vn,d as j,g as A,E as Y,o as be,a as Fe,h as W,p as Ue,K as kn,M as $n,J as Xe,X as ft,Y as An,F as Ve,R as Bn,O as Dn,P as _n,Z as Nn,f as L,c as I,i as ge,b as R,z as dt,C as ke,t as le,I as Ye,q as K,e as se,_ as Qe,r as Ge,u as ae,$ as Fn,a0 as En,s as vt,j as Hn}from"./index-CZjgV-Yn.js";import{P as Rn}from"./PageBar-Bkc2Ht1O.js";import{d as p,l as Kt,s as G,y as pt,B as $e,o as fe,R as Ln,k as B,x as q,T as jn,c as In,P as M,K as qt,U as Zt,V as ht,W as Ae,X as Wn,f as xe,Q as Be,Y as zn,r as Jt,u as Qt,O as et,z as en,m as tt,Z as Un,$ as tn,a0 as Xn,a as mt}from"./Spinner.vue_vue_type_style_index_0_lang-ghXHCVpI.js";import{S as Yn}from"./SearchInput-CSiqcIfW.js";import{s as te,P as gt,u as Gn,a as Kn,K as ee}from"./index-Ca8ka09f.js";import{w as Q}from"./classCallCheck-BSDY9VEy.js";import{_ as qn,i as Zn,B as De,z as Jn,A as Qn}from"./FormItemContext-Dxet_qkI.js";import{P as ei}from"./ProductCard-Cd-G3dvx.js";import{u as ti}from"./SingleProduct-DS8wIDwN.js";import{a as ni}from"./client-WIBW0tF5.js";import{P as ii}from"./index-BBOQn_fb.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./cartStore-CoSoowuC.js";import"./NotifyVant.vue_vue_type_script_setup_true_lang-CY4DS_6T.js";import"./DialogVant.vue_vue_type_style_index_0_lang-DKsdrzNc.js";import"./dialogEmpty1-Caw7F5KL.js";function Z(i,e,t,n){if(i&&i.addEventListener){var a=n;a===void 0&&te&&(e==="touchstart"||e==="touchmove"||e==="wheel")&&(a={passive:!1}),i.addEventListener(e,t,a)}return{remove:function(){i&&i.removeEventListener&&i.removeEventListener(e,t)}}}function re(i,e){return i?i.contains(e):!1}var nn=["moz","ms","webkit"];function ai(){var i=0;return function(e){var t=new Date().getTime(),n=Math.max(0,16-(t-i)),a=window.setTimeout(function(){e(t+n)},n);return i=t+n,a}}function oi(){if(typeof window>"u")return function(){};if(window.requestAnimationFrame)return window.requestAnimationFrame.bind(window);var i=nn.filter(function(e){return"".concat(e,"RequestAnimationFrame")in window})[0];return i?window["".concat(i,"RequestAnimationFrame")]:ai()}function ri(i){if(typeof window>"u")return null;if(window.cancelAnimationFrame)return window.cancelAnimationFrame(i);var e=nn.filter(function(t){return"".concat(t,"CancelAnimationFrame")in window||"".concat(t,"CancelRequestAnimationFrame")in window})[0];return e?(window["".concat(e,"CancelAnimationFrame")]||window["".concat(e,"CancelRequestAnimationFrame")]).call(this,i):clearTimeout(i)}var yt=oi(),si=function(e){return ri(e.id)},li=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=Date.now();function a(){Date.now()-n>=t?e.call():o.id=yt(a)}var o={id:yt(a)};return o},nt={visible:Boolean,prefixCls:String,zIndex:Number,destroyPopupOnHide:Boolean,forceRender:Boolean,animation:[String,Object],transitionName:String,stretch:{type:String},align:{type:Object},point:{type:Object},getRootDomNode:{type:Function},getClassNameFromAlign:{type:Function},onMouseenter:{type:Function},onMouseleave:{type:Function},onMousedown:{type:Function},onTouchstart:{type:Function}},ui=p(p({},nt),{},{mobile:{type:Object}}),ci=p(p({},nt),{},{mask:Boolean,mobile:{type:Object},maskAnimation:String,maskTransitionName:String});function an(i){var e=i.prefixCls,t=i.animation,n=i.transitionName;return t?{name:"".concat(e,"-").concat(t)}:n?{name:n}:{}}function on(i){var e=i.prefixCls,t=i.visible,n=i.zIndex,a=i.mask,o=i.maskAnimation,r=i.maskTransitionName;if(!a)return null;var s={};return(r||o)&&(s=an({prefixCls:e,transitionName:r,animation:o})),O(Ne,p({appear:!0},s),{default:function(){return[Oe(O("div",{style:{zIndex:n},class:"".concat(e,"-mask")},null),[[Vn("if"),t]])]}})}on.displayName="Mask";const fi=j({compatConfig:{MODE:3},name:"MobilePopupInner",inheritAttrs:!1,props:ui,emits:["mouseenter","mouseleave","mousedown","touchstart","align"],setup:function(e,t){var n=t.expose,a=t.slots,o=A();return n({forceAlign:function(){},getElement:function(){return o.value}}),function(){var r,s=e.zIndex,l=e.visible,u=e.prefixCls,c=e.mobile,h=c===void 0?{}:c,d=h.popupClassName,m=h.popupStyle,g=h.popupMotion,T=g===void 0?{}:g,k=h.popupRender,x=p({zIndex:s},m),y=Kt((r=a.default)===null||r===void 0?void 0:r.call(a));y.length>1&&(y=O("div",{class:"".concat(u,"-content")},[y])),k&&(y=k(y));var P=G(u,d);return O(Ne,p({ref:o},T),{default:function(){return[l?O("div",{class:P,style:x},[y]):null]}})}}});var bt=["measure","align",null,"motion"];const di=function(i,e){var t=A(null),n=A(),a=A(!1);function o(l){a.value||(t.value=l)}function r(){Q.cancel(n.value)}function s(l){r(),n.value=Q(function(){var u=t.value;switch(t.value){case"align":u="motion";break;case"motion":u="stable";break}o(u),l==null||l()})}return Y(i,function(){o("measure")},{immediate:!0,flush:"post"}),be(function(){Y(t,function(){switch(t.value){case"measure":e();break}t.value&&(n.value=Q(qn(pt.mark(function l(){var u,c;return pt.wrap(function(d){for(;;)switch(d.prev=d.next){case 0:u=bt.indexOf(t.value),c=bt[u+1],c&&u!==-1&&o(c);case 3:case"end":return d.stop()}},l)}))))},{immediate:!0,flush:"post"})}),Fe(function(){a.value=!0,r()}),[t,s]},vi=function(i){var e=A({width:0,height:0});function t(a){e.value={width:a.offsetWidth,height:a.offsetHeight}}var n=W(function(){var a={};if(i.value){var o=e.value,r=o.width,s=o.height;i.value.indexOf("height")!==-1&&s?a.height="".concat(s,"px"):i.value.indexOf("minHeight")!==-1&&s&&(a.minHeight="".concat(s,"px")),i.value.indexOf("width")!==-1&&r?a.width="".concat(r,"px"):i.value.indexOf("minWidth")!==-1&&r&&(a.minWidth="".concat(r,"px"))}return a});return[n,t]};function Ct(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(i,a).enumerable})),t.push.apply(t,n)}return t}function wt(i){for(var e=1;e=0&&t.left>=0&&t.bottom>t.top&&t.right>t.left?t:null}function Fi(i,e,t,n){var a=$.clone(i),o={width:e.width,height:e.height};return n.adjustX&&a.left=t.left&&a.left+o.width>t.right&&(o.width-=a.left+o.width-t.right),n.adjustX&&a.left+o.width>t.right&&(a.left=Math.max(t.right-o.width,t.left)),n.adjustY&&a.top=t.top&&a.top+o.height>t.bottom&&(o.height-=a.top+o.height-t.bottom),n.adjustY&&a.top+o.height>t.bottom&&(a.top=Math.max(t.bottom-o.height,t.top)),$.mix(a,o)}function rt(i){var e,t,n;if(!$.isWindow(i)&&i.nodeType!==9)e=$.offset(i),t=$.outerWidth(i),n=$.outerHeight(i);else{var a=$.getWindow(i);e={left:$.getWindowScrollLeft(a),top:$.getWindowScrollTop(a)},t=$.viewportWidth(a),n=$.viewportHeight(a)}return e.width=t,e.height=n,e}function kt(i,e){var t=e.charAt(0),n=e.charAt(1),a=i.width,o=i.height,r=i.left,s=i.top;return t==="c"?s+=o/2:t==="b"&&(s+=o),n==="c"?r+=a/2:n==="r"&&(r+=a),{left:r,top:s}}function Te(i,e,t,n,a){var o=kt(e,t[1]),r=kt(i,t[0]),s=[r.left-o.left,r.top-o.top];return{left:Math.round(i.left-s[0]+n[0]-a[0]),top:Math.round(i.top-s[1]+n[1]-a[1])}}function $t(i,e,t){return i.leftt.right}function At(i,e,t){return i.topt.bottom}function Ei(i,e,t){return i.left>t.right||i.left+e.widtht.bottom||i.top+e.height=t.right||n.top>=t.bottom}function st(i,e,t){var n=t.target||e,a=rt(n),o=!Ri(n,t.overflow&&t.overflow.alwaysByViewport);return vn(i,a,t,o)}st.__getOffsetParent=Je;st.__getVisibleRectForElement=ot;function Li(i,e,t){var n,a,o=$.getDocument(i),r=o.defaultView||o.parentWindow,s=$.getWindowScrollLeft(r),l=$.getWindowScrollTop(r),u=$.viewportWidth(r),c=$.viewportHeight(r);"pageX"in e?n=e.pageX:n=s+e.clientX,"pageY"in e?a=e.pageY:a=l+e.clientY;var h={left:n,top:a,width:0,height:0},d=n>=0&&n<=s+u&&a>=0&&a<=l+c,m=[t.points[0],"cc"];return vn(i,h,wt(wt({},t),{},{points:m}),d)}const ji=function(i){if(!i)return!1;if(i.offsetParent)return!0;if(i.getBBox){var e=i.getBBox();if(e.width||e.height)return!0}if(i.getBoundingClientRect){var t=i.getBoundingClientRect();if(t.width||t.height)return!0}return!1};function Ii(i,e){return i===e?!0:!i||!e?!1:"pageX"in e&&"pageY"in e?i.pageX===e.pageX&&i.pageY===e.pageY:"clientX"in e&&"clientY"in e?i.clientX===e.clientX&&i.clientY===e.clientY:!1}function Wi(i,e){i!==document.activeElement&&re(e,i)&&typeof i.focus=="function"&&i.focus()}function _t(i,e){var t=null,n=null;function a(r){var s=$e(r,1),l=s[0].target;if(document.documentElement.contains(l)){var u=l.getBoundingClientRect(),c=u.width,h=u.height,d=Math.floor(c),m=Math.floor(h);(t!==d||n!==m)&&Promise.resolve().then(function(){e({width:d,height:m})}),t=d,n=m}}var o=new Zn(a);return i&&o.observe(i),function(){o.disconnect()}}const zi=function(i,e){var t=!1,n=null;function a(){clearTimeout(n)}function o(r){if(!t||r===!0){if(i()===!1)return;t=!0,a(),n=setTimeout(function(){t=!1},e.value)}else a(),n=setTimeout(function(){t=!1,o()},e.value)}return[o,function(){t=!1,a()}]};var Ui={align:Object,target:[Object,Function],onAlign:Function,monitorBufferTime:Number,monitorWindowResize:Boolean,disabled:Boolean};function Nt(i){return typeof i!="function"?null:i()}function Ft(i){return fe(i)!=="object"||!i?null:i}const Xi=j({compatConfig:{MODE:3},name:"Align",props:Ui,emits:["align"],setup:function(e,t){var n=t.expose,a=t.slots,o=A({}),r=A(),s=zi(function(){var T=e.disabled,k=e.target,x=e.align,y=e.onAlign;if(!T&&k&&r.value){var P=r.value,V,S=Nt(k),b=Ft(k);o.value.element=S,o.value.point=b,o.value.align=x;var v=document,f=v.activeElement;return S&&ji(S)?V=st(P,S,x):b&&(V=Li(P,b,x)),Wi(f,P),y&&V&&y(P,V),!0}return!1},W(function(){return e.monitorBufferTime})),l=$e(s,2),u=l[0],c=l[1],h=A({cancel:function(){}}),d=A({cancel:function(){}}),m=function(){var k=e.target,x=Nt(k),y=Ft(k);r.value!==d.value.element&&(d.value.cancel(),d.value.element=r.value,d.value.cancel=_t(r.value,u)),(o.value.element!==x||!Ii(o.value.point,y)||!Jn(o.value.align,e.align))&&(u(),h.value.element!==x&&(h.value.cancel(),h.value.element=x,h.value.cancel=_t(x,u)))};be(function(){Ue(function(){m()})}),kn(function(){Ue(function(){m()})}),Y(function(){return e.disabled},function(T){T?c():u()},{immediate:!0,flush:"post"});var g=A(null);return Y(function(){return e.monitorWindowResize},function(T){T?g.value||(g.value=Z(window,"resize",u)):g.value&&(g.value.remove(),g.value=null)},{flush:"post"}),$n(function(){h.value.cancel(),d.value.cancel(),g.value&&g.value.remove(),c()}),n({forceAlign:function(){return u(!0)}}),function(){var T=a==null?void 0:a.default();return T?De(T[0],{ref:r},!0,!0):null}}}),Yi=j({compatConfig:{MODE:3},name:"PopupInner",inheritAttrs:!1,props:nt,emits:["mouseenter","mouseleave","mousedown","touchstart","align"],setup:function(e,t){var n=t.expose,a=t.attrs,o=t.slots,r=A(),s=A(),l=A(),u=vi(An(e,"stretch")),c=$e(u,2),h=c[0],d=c[1],m=function(){e.stretch&&d(e.getRootDomNode())},g=A(!1),T;Y(function(){return e.visible},function(C){clearTimeout(T),C?T=setTimeout(function(){g.value=e.visible}):g.value=!1},{immediate:!0});var k=di(g,m),x=$e(k,2),y=x[0],P=x[1],V=A(),S=function(){return e.point?e.point:e.getRootDomNode},b=function(){var _;(_=r.value)===null||_===void 0||_.forceAlign()},v=function(_,N){var E=e.getClassNameFromAlign(N),H=l.value;if(l.value!==E&&(l.value=E),y.value==="align"){var F;H!==E?Promise.resolve().then(function(){b()}):P(function(){var z;(z=V.value)===null||z===void 0||z.call(V)}),(F=e.onAlign)===null||F===void 0||F.call(e,_,N)}},f=W(function(){var C=fe(e.animation)==="object"?e.animation:an(e);return["onAfterEnter","onAfterLeave"].forEach(function(_){var N=C[_];C[_]=function(E){P(),y.value="stable",N==null||N(E)}}),C}),w=function(){return new Promise(function(_){V.value=_})};Y([f,y],function(){!f.value&&y.value==="motion"&&P()},{immediate:!0}),n({forceAlign:b,getElement:function(){return s.value.$el||s.value}});var D=W(function(){var C;return!((C=e.align)!==null&&C!==void 0&&C.points&&(y.value==="align"||y.value==="stable"))});return function(){var C,_=e.zIndex,N=e.align,E=e.prefixCls,H=e.destroyPopupOnHide,F=e.onMouseenter,z=e.onMouseleave,oe=e.onTouchstart,de=oe===void 0?function(){}:oe,ct=e.onMousedown,ve=y.value,Tn=[p(p({},h.value),{},{zIndex:_,opacity:ve==="motion"||ve==="stable"||!g.value?null:0,pointerEvents:!g.value&&ve!=="stable"?"none":null}),a.style],we=Kt((C=o.default)===null||C===void 0?void 0:C.call(o,{visible:e.visible}));we.length>1&&(we=O("div",{class:"".concat(E,"-content")},[we]));var Sn=G(E,a.class,l.value),Mn=g.value||!e.visible,On=Mn?Ln(f.value.name,f.value):{};return O(Ne,p(p({ref:s},On),{},{onBeforeEnter:w}),{default:function(){return!H||e.visible?Oe(O(Xi,{target:S(),key:"popup",ref:r,monitorWindowResize:!0,disabled:D.value,align:N,onAlign:v},{default:function(){return O("div",p(p({class:Sn,onMouseenter:F,onMouseleave:z,onMousedown:ft(ct,["capture"])},B({},te?"onTouchstartPassive":"onTouchstart",ft(de,["capture"]))),{},{style:Tn}),[we])}}),[[Xe,g.value]]):null}})}}}),Gi=j({compatConfig:{MODE:3},name:"Popup",inheritAttrs:!1,props:ci,setup:function(e,t){var n=t.attrs,a=t.slots,o=t.expose,r=A(!1),s=A(!1),l=A();return Y([function(){return e.visible},function(){return e.mobile}],function(){r.value=e.visible,e.visible&&e.mobile&&(s.value=!0)},{immediate:!0,flush:"post"}),o({forceAlign:function(){var c;(c=l.value)===null||c===void 0||c.forceAlign()},getElement:function(){var c;return(c=l.value)===null||c===void 0?void 0:c.getElement()}}),function(){var u=p(p(p({},e),n),{},{visible:r.value}),c=s.value?O(fi,p(p({},u),{},{mobile:e.mobile,ref:l}),{default:a.default}):O(Yi,p(p({},u),{},{ref:l}),{default:a.default});return O("div",null,[O(on,u,null),c])}}});function Ki(i,e,t){return t?i[0]===e[0]:i[0]===e[0]&&i[1]===e[1]}function Et(i,e,t){var n=i[e]||{};return p(p({},n),t)}function qi(i,e,t,n){for(var a=t.points,o=Object.keys(i),r=0;r0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=typeof e=="function"?e(this.$data,this.$props):e;if(this.getDerivedStateFromProps){var a=this.getDerivedStateFromProps(jn(this),p(p({},this.$data),n));if(a===null)return;n=p(p({},n),a||{})}In(this.$data,n),this._.isMounted&&this.$forceUpdate(),Ue(function(){t&&t()})},__emit:function(){var e=[].slice.call(arguments,0),t=e[0];t="on".concat(t[0].toUpperCase()).concat(t.substring(1));var n=this.$props[t]||this.$attrs[t];if(e.length&&n)if(Array.isArray(n))for(var a=0,o=n.length;a0&&arguments[0]!==void 0?arguments[0]:[],e=0,t=i.length;e=0||w.indexOf("Bottom")>=0?C.top="".concat(D.height-v.offset[1],"px"):(w.indexOf("Top")>=0||w.indexOf("bottom")>=0)&&(C.top="".concat(-v.offset[1],"px")),w.indexOf("left")>=0||w.indexOf("Right")>=0?C.left="".concat(D.width-v.offset[0],"px"):(w.indexOf("right")>=0||w.indexOf("Left")>=0)&&(C.left="".concat(-v.offset[0],"px")),b.style.transformOrigin="".concat(C.left," ").concat(C.top)}};return function(){var S,b,v,f=e.openClassName,w=e.color,D=e.overlayClassName,C=(S=qt((b=n.default)===null||b===void 0?void 0:b.call(n)))!==null&&S!==void 0?S:null;C=C.length===1?C[0]:C;var _=c.value;if(e.visible===void 0&&m()&&(_=!1),!C)return null;var N=y(en(C)?C:O("span",null,[C])),E=G((v={},B(v,f||"".concat(l.value,"-open"),!0),B(v,N.props&&N.props.class,N.props&&N.props.class),v)),H=G(D,B({},"".concat(l.value,"-").concat(w),w&&It.test(w))),F,z;w&&!It.test(w)&&(F={backgroundColor:w},z={backgroundColor:w});var oe=p(p(p({},o),e),{},{prefixCls:l.value,getPopupContainer:u.value,builtinPlacements:k.value,visible:_,ref:h,overlayClassName:H,overlayInnerStyle:F,onVisibleChange:g,onPopupAlign:V});return O(aa,oe,{default:function(){return[c.value?De(N,{class:E}):N]},arrowContent:function(){return O("span",{class:"".concat(l.value,"-arrow-content"),style:z},null)},overlay:P})}}}),va=tn(da);var lt=function(e,t){var n,a,o=t.attrs,r=o.included,s=o.vertical,l=o.style,u=o.class,c=o.length,h=o.offset,d=o.reverse;c<0&&(d=!d,c=Math.abs(c),h=100-h);var m=s?(n={},B(n,d?"top":"bottom","".concat(h,"%")),B(n,d?"bottom":"top","auto"),B(n,"height","".concat(c,"%")),n):(a={},B(a,d?"right":"left","".concat(h,"%")),B(a,d?"left":"right","auto"),B(a,"width","".concat(c,"%")),a),g=p(p({},l),m);return r?O("div",{class:u,style:g},null):null};lt.inheritAttrs=!1;var pa=function(e,t,n,a,o,r){et(n?a>0:!0,"Slider","`Slider[step]` should be a positive number in order to make Slider[dots] work.");var s=Object.keys(t).map(parseFloat).sort(function(u,c){return u-c});if(n&&a)for(var l=o;l<=r;l+=a)s.indexOf(l)===-1&&s.push(l);return s},mn=function(e,t){var n=t.attrs,a=n.prefixCls,o=n.vertical,r=n.reverse,s=n.marks,l=n.dots,u=n.step,c=n.included,h=n.lowerBound,d=n.upperBound,m=n.max,g=n.min,T=n.dotStyle,k=n.activeDotStyle,x=m-g,y=pa(o,s,l,u,g,m).map(function(P){var V,S="".concat(Math.abs(P-g)/x*100,"%"),b=!c&&P===d||c&&P<=d&&P>=h,v=o?p(p({},T),{},B({},r?"top":"bottom",S)):p(p({},T),{},B({},r?"right":"left",S));b&&(v=p(p({},v),k));var f=G((V={},B(V,"".concat(a,"-dot"),!0),B(V,"".concat(a,"-dot-active"),b),B(V,"".concat(a,"-dot-reverse"),r),V));return O("span",{class:f,style:v,key:P},null)});return O("div",{class:"".concat(a,"-step")},[y])};mn.inheritAttrs=!1;var gn=function(e,t){var n=t.attrs,a=t.slots,o=n.class,r=n.vertical,s=n.reverse,l=n.marks,u=n.included,c=n.upperBound,h=n.lowerBound,d=n.max,m=n.min,g=n.onClickLabel,T=Object.keys(l),k=a.mark,x=d-m,y=T.map(parseFloat).sort(function(P,V){return P-V}).map(function(P){var V,S=typeof l[P]=="function"?l[P]():l[P],b=fe(S)==="object"&&!en(S),v=b?S.label:S;if(!v&&v!==0)return null;k&&(v=k({point:P,label:v}));var f=!u&&P===c||u&&P<=c&&P>=h,w=G((V={},B(V,"".concat(o,"-text"),!0),B(V,"".concat(o,"-text-active"),f),V)),D=B({marginBottom:"-50%"},s?"top":"bottom","".concat((P-m)/x*100,"%")),C=B({transform:"translateX(".concat(s?"50%":"-50%",")"),msTransform:"translateX(".concat(s?"50%":"-50%",")")},s?"right":"left","".concat((P-m)/x*100,"%")),_=r?D:C,N=b?p(p({},_),S.style):_,E=B({},te?"onTouchstartPassive":"onTouchstart",function(H){return g(H,P)});return O("span",p({class:w,style:N,key:P,onMousedown:function(F){return g(F,P)}},E),[v])});return O("div",{class:o},[y])};gn.inheritAttrs=!1;const yn=j({compatConfig:{MODE:3},name:"Handle",inheritAttrs:!1,props:{prefixCls:String,vertical:{type:Boolean,default:void 0},offset:Number,disabled:{type:Boolean,default:void 0},min:Number,max:Number,value:Number,tabindex:M.oneOfType([M.number,M.string]),reverse:{type:Boolean,default:void 0},ariaLabel:String,ariaLabelledBy:String,ariaValueTextFormatter:Function,onMouseenter:{type:Function},onMouseleave:{type:Function},onMousedown:{type:Function}},setup:function(e,t){var n=t.attrs,a=t.emit,o=t.expose,r=A(!1),s=A(),l=function(){document.activeElement===s.value&&(r.value=!0)},u=function(y){r.value=!1,a("blur",y)},c=function(){r.value=!1},h=function(){var y;(y=s.value)===null||y===void 0||y.focus()},d=function(){var y;(y=s.value)===null||y===void 0||y.blur()},m=function(){r.value=!0,h()},g=function(y){y.preventDefault(),h(),a("mousedown",y)};o({focus:h,blur:d,clickFocus:m,ref:s});var T=null;be(function(){T=Z(document,"mouseup",l)}),Fe(function(){var x;(x=T)===null||x===void 0||x.remove()});var k=W(function(){var x,y,P=e.vertical,V=e.offset,S=e.reverse;return P?(x={},B(x,S?"top":"bottom","".concat(V,"%")),B(x,S?"bottom":"top","auto"),B(x,"transform",S?null:"translateY(+50%)"),x):(y={},B(y,S?"right":"left","".concat(V,"%")),B(y,S?"left":"right","auto"),B(y,"transform","translateX(".concat(S?"+":"-","50%)")),y)});return function(){var x=e.prefixCls,y=e.disabled,P=e.min,V=e.max,S=e.value,b=e.tabindex,v=e.ariaLabel,f=e.ariaLabelledBy,w=e.ariaValueTextFormatter,D=e.onMouseenter,C=e.onMouseleave,_=G(n.class,B({},"".concat(x,"-handle-click-focused"),r.value)),N={"aria-valuemin":P,"aria-valuemax":V,"aria-valuenow":S,"aria-disabled":!!y},E=[n.style,k.value],H=b||0;(y||b===null)&&(H=null);var F;w&&(F=w(S));var z=p(p(p({},n),{},{role:"slider",tabindex:H},N),{},{class:_,onBlur:u,onKeydown:c,onMousedown:g,onMouseenter:D,onMouseleave:C,ref:s,style:E});return O("div",p(p({},z),{},{"aria-label":v,"aria-labelledby":f,"aria-valuetext":F}),null)}}});function We(i,e){try{return Object.keys(e).some(function(t){return i.target===e[t].ref})}catch{return!1}}function bn(i,e){var t=e.min,n=e.max;return in}function Wt(i){return i.touches.length>1||i.type.toLowerCase()==="touchend"&&i.touches.length>0}function zt(i,e){var t=e.marks,n=e.step,a=e.min,o=e.max,r=Object.keys(t).map(parseFloat);if(n!==null){var s=Math.pow(10,Cn(n)),l=Math.floor((o*s-a*s)/(n*s)),u=Math.min((i-a)/n,l),c=Math.round(u)*n+a;r.push(c)}var h=r.map(function(d){return Math.abs(i-d)});return r[h.indexOf(Math.min.apply(Math,q(h)))]}function Cn(i){var e=i.toString(),t=0;return e.indexOf(".")>=0&&(t=e.length-e.indexOf(".")-1),t}function Ut(i,e){var t=1;return window.visualViewport&&(t=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(i?e.clientY:e.pageX)/t}function Xt(i,e){var t=1;return window.visualViewport&&(t=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(i?e.touches[0].clientY:e.touches[0].pageX)/t}function Yt(i,e){var t=e.getBoundingClientRect();return i?t.top+t.height*.5:window.pageXOffset+t.left+t.width*.5}function ut(i,e){var t=e.max,n=e.min;return i<=n?n:i>=t?t:i}function wn(i,e){var t=e.step,n=isFinite(zt(i,e))?zt(i,e):0;return t===null?n:parseFloat(n.toFixed(Cn(t)))}function ce(i){i.stopPropagation(),i.preventDefault()}function ha(i,e,t){var n={increase:function(s,l){return s+l},decrease:function(s,l){return s-l}},a=n[i](Object.keys(t.marks).indexOf(JSON.stringify(e)),1),o=Object.keys(t.marks)[a];return t.step?n[i](e,t.step):Object.keys(t.marks).length&&t.marks[o]?t.marks[o]:e}function xn(i,e,t){var n="increase",a="decrease",o=n;switch(i.keyCode){case ee.UP:o=e&&t?a:n;break;case ee.RIGHT:o=!e&&t?a:n;break;case ee.DOWN:o=e&&t?n:a;break;case ee.LEFT:o=!e&&t?n:a;break;case ee.END:return function(r,s){return s.max};case ee.HOME:return function(r,s){return s.min};case ee.PAGE_UP:return function(r,s){return r+s.step*2};case ee.PAGE_DOWN:return function(r,s){return r-s.step*2};default:return}return function(r,s){return ha(o,r,s)}}var ma=["index","directives","className","style"];function ie(){}function Pn(i){var e={id:String,min:Number,max:Number,step:Number,marks:M.object,included:{type:Boolean,default:void 0},prefixCls:String,disabled:{type:Boolean,default:void 0},handle:Function,dots:{type:Boolean,default:void 0},vertical:{type:Boolean,default:void 0},reverse:{type:Boolean,default:void 0},minimumTrackStyle:M.object,maximumTrackStyle:M.object,handleStyle:M.oneOfType([M.object,M.arrayOf(M.object)]),trackStyle:M.oneOfType([M.object,M.arrayOf(M.object)]),railStyle:M.object,dotStyle:M.object,activeDotStyle:M.object,autofocus:{type:Boolean,default:void 0},draggableTrack:{type:Boolean,default:void 0}};return j({compatConfig:{MODE:3},name:"CreateSlider",mixins:[He,i],inheritAttrs:!1,slots:["mark"],props:tt(e,{prefixCls:"rc-slider",min:0,max:100,step:1,marks:{},included:!0,disabled:!1,dots:!1,vertical:!1,reverse:!1,trackStyle:[{}],handleStyle:[{}],railStyle:{},dotStyle:{},activeDotStyle:{}}),emits:["change","blur","focus"],data:function(){var n=this.step,a=this.max,o=this.min,r=isFinite(a-o)?(a-o)%n===0:!0;return et(n&&Math.floor(n)===n?r:!0,"Slider[max] - Slider[min] (".concat(a-o,") should be a multiple of Slider[step] (").concat(n,")")),this.handlesRefs={},{}},mounted:function(){var n=this;this.$nextTick(function(){n.document=n.sliderRef&&n.sliderRef.ownerDocument;var a=n.autofocus,o=n.disabled;a&&!o&&n.focus()})},beforeUnmount:function(){var n=this;this.$nextTick(function(){n.removeDocumentEvents()})},methods:{defaultHandle:function(n){var a=n.index;n.directives;var o=n.className,r=n.style,s=Be(n,ma);if(delete s.dragging,s.value===null)return null;var l=p(p({},s),{},{class:o,style:r,key:a});return O(yn,l,null)},onDown:function(n,a){var o=a,r=this.$props,s=r.draggableTrack,l=r.vertical,u=this.$data.bounds,c=s&&this.positionGetValue?this.positionGetValue(o)||[]:[],h=We(n,this.handlesRefs);if(this.dragTrack=s&&u.length>=2&&!h&&!c.map(function(m,g){var T=g?!0:m>=u[g];return g===c.length-1?m<=u[g]:T}).some(function(m){return!m}),this.dragTrack)this.dragOffset=o,this.startBounds=q(u);else{if(!h)this.dragOffset=0;else{var d=Yt(l,n.target);this.dragOffset=o-d,o=d}this.onStart(o)}},onMouseDown:function(n){if(n.button===0){this.removeDocumentEvents();var a=this.$props.vertical,o=Ut(a,n);this.onDown(n,o),this.addDocumentMouseEvents()}},onTouchStart:function(n){if(!Wt(n)){var a=this.vertical,o=Xt(a,n);this.onDown(n,o),this.addDocumentTouchEvents(),ce(n)}},onFocus:function(n){var a=this.vertical;if(We(n,this.handlesRefs)&&!this.dragTrack){var o=Yt(a,n.target);this.dragOffset=0,this.onStart(o),ce(n),this.$emit("focus",n)}},onBlur:function(n){this.dragTrack||this.onEnd(),this.$emit("blur",n)},onMouseUp:function(){this.handlesRefs[this.prevMovedHandleIndex]&&this.handlesRefs[this.prevMovedHandleIndex].clickFocus()},onMouseMove:function(n){if(!this.sliderRef){this.onEnd();return}var a=Ut(this.vertical,n);this.onMove(n,a-this.dragOffset,this.dragTrack,this.startBounds)},onTouchMove:function(n){if(Wt(n)||!this.sliderRef){this.onEnd();return}var a=Xt(this.vertical,n);this.onMove(n,a-this.dragOffset,this.dragTrack,this.startBounds)},onKeyDown:function(n){this.sliderRef&&We(n,this.handlesRefs)&&this.onKeyboard(n)},onClickMarkLabel:function(n,a){var o=this;n.stopPropagation(),this.onChange({sValue:a}),this.setState({sValue:a},function(){return o.onEnd(!0)})},getSliderStart:function(){var n=this.sliderRef,a=this.vertical,o=this.reverse,r=n.getBoundingClientRect();return a?o?r.bottom:r.top:window.pageXOffset+(o?r.right:r.left)},getSliderLength:function(){var n=this.sliderRef;if(!n)return 0;var a=n.getBoundingClientRect();return this.vertical?a.height:a.width},addDocumentTouchEvents:function(){this.onTouchMoveListener=Z(this.document,"touchmove",this.onTouchMove),this.onTouchUpListener=Z(this.document,"touchend",this.onEnd)},addDocumentMouseEvents:function(){this.onMouseMoveListener=Z(this.document,"mousemove",this.onMouseMove),this.onMouseUpListener=Z(this.document,"mouseup",this.onEnd)},removeDocumentEvents:function(){this.onTouchMoveListener&&this.onTouchMoveListener.remove(),this.onTouchUpListener&&this.onTouchUpListener.remove(),this.onMouseMoveListener&&this.onMouseMoveListener.remove(),this.onMouseUpListener&&this.onMouseUpListener.remove()},focus:function(){var n;this.$props.disabled||(n=this.handlesRefs[0])===null||n===void 0||n.focus()},blur:function(){var n=this;this.$props.disabled||Object.keys(this.handlesRefs).forEach(function(a){var o,r;(o=n.handlesRefs[a])===null||o===void 0||(r=o.blur)===null||r===void 0||r.call(o)})},calcValue:function(n){var a=this.vertical,o=this.min,r=this.max,s=Math.abs(Math.max(n,0)/this.getSliderLength()),l=a?(1-s)*(r-o)+o:s*(r-o)+o;return l},calcValueByPos:function(n){var a=this.reverse?-1:1,o=a*(n-this.getSliderStart()),r=this.trimAlignValue(this.calcValue(o));return r},calcOffset:function(n){var a=this.min,o=this.max,r=(n-a)/(o-a);return Math.max(0,r*100)},saveSlider:function(n){this.sliderRef=n},saveHandle:function(n,a){this.handlesRefs[n]=a}},render:function(){var n,a=this.prefixCls,o=this.marks,r=this.dots,s=this.step,l=this.included,u=this.disabled,c=this.vertical,h=this.reverse,d=this.min,m=this.max,g=this.maximumTrackStyle,T=this.railStyle,k=this.dotStyle,x=this.activeDotStyle,y=this.id,P=this.$attrs,V=P.class,S=P.style,b=this.renderSlider(),v=b.tracks,f=b.handles,w=G(a,V,(n={},B(n,"".concat(a,"-with-marks"),Object.keys(o).length),B(n,"".concat(a,"-disabled"),u),B(n,"".concat(a,"-vertical"),c),n)),D={vertical:c,marks:o,included:l,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:m,min:d,reverse:h,class:"".concat(a,"-mark"),onClickLabel:u?ie:this.onClickMarkLabel},C=B({},te?"onTouchstartPassive":"onTouchstart",u?ie:this.onTouchStart);return O("div",p(p({id:y,ref:this.saveSlider,tabindex:"-1",class:w},C),{},{onMousedown:u?ie:this.onMouseDown,onMouseup:u?ie:this.onMouseUp,onKeydown:u?ie:this.onKeyDown,onFocus:u?ie:this.onFocus,onBlur:u?ie:this.onBlur,style:S}),[O("div",{class:"".concat(a,"-rail"),style:p(p({},g),T)},null),v,O(mn,{prefixCls:a,vertical:c,reverse:h,marks:o,dots:r,step:s,included:l,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:m,min:d,dotStyle:k,activeDotStyle:x},null),f,O(gn,D,{mark:this.$slots.mark}),Zt(this)])}})}var ga=j({compatConfig:{MODE:3},name:"Slider",mixins:[He],inheritAttrs:!1,props:{defaultValue:Number,value:Number,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},tabindex:M.oneOfType([M.number,M.string]),reverse:{type:Boolean,default:void 0},min:Number,max:Number,ariaLabelForHandle:String,ariaLabelledByForHandle:String,ariaValueTextFormatterForHandle:String,startPoint:Number},emits:["beforeChange","afterChange","change"],data:function(){var e=this.defaultValue!==void 0?this.defaultValue:this.min,t=this.value!==void 0?this.value:e;return{sValue:this.trimAlignValue(t),dragging:!1}},watch:{value:{handler:function(e){this.setChangeValue(e)},deep:!0},min:function(){var e=this.sValue;this.setChangeValue(e)},max:function(){var e=this.sValue;this.setChangeValue(e)}},methods:{setChangeValue:function(e){var t=e!==void 0?e:this.sValue,n=this.trimAlignValue(t,this.$props);n!==this.sValue&&(this.setState({sValue:n}),bn(t,this.$props)&&this.$emit("change",n))},onChange:function(e){var t=!Ae(this,"value"),n=e.sValue>this.max?p(p({},e),{},{sValue:this.max}):e;t&&this.setState(n);var a=n.sValue;this.$emit("change",a)},onStart:function(e){this.setState({dragging:!0});var t=this.sValue;this.$emit("beforeChange",t);var n=this.calcValueByPos(e);this.startValue=n,this.startPosition=e,n!==t&&(this.prevMovedHandleIndex=0,this.onChange({sValue:n}))},onEnd:function(e){var t=this.dragging;this.removeDocumentEvents(),(t||e)&&this.$emit("afterChange",this.sValue),this.setState({dragging:!1})},onMove:function(e,t){ce(e);var n=this.sValue,a=this.calcValueByPos(t);a!==n&&this.onChange({sValue:a})},onKeyboard:function(e){var t=this.$props,n=t.reverse,a=t.vertical,o=xn(e,a,n);if(o){ce(e);var r=this.sValue,s=o(r,this.$props),l=this.trimAlignValue(s);if(l===r)return;this.onChange({sValue:l}),this.$emit("afterChange",l),this.onEnd()}},getLowerBound:function(){var e=this.$props.startPoint||this.$props.min;return this.$data.sValue>e?e:this.$data.sValue},getUpperBound:function(){return this.$data.sValue1&&arguments[1]!==void 0?arguments[1]:{};if(e===null)return null;var n=p(p({},this.$props),t),a=ut(e,n);return wn(a,n)},getTrack:function(e){var t=e.prefixCls,n=e.reverse,a=e.vertical,o=e.included,r=e.minimumTrackStyle,s=e.mergedTrackStyle,l=e.length,u=e.offset;return O(lt,{class:"".concat(t,"-track"),vertical:a,included:o,offset:u,reverse:n,length:l,style:p(p({},r),s)},null)},renderSlider:function(){var e=this,t=this.prefixCls,n=this.vertical,a=this.included,o=this.disabled,r=this.minimumTrackStyle,s=this.trackStyle,l=this.handleStyle,u=this.tabindex,c=this.ariaLabelForHandle,h=this.ariaLabelledByForHandle,d=this.ariaValueTextFormatterForHandle,m=this.min,g=this.max,T=this.startPoint,k=this.reverse,x=this.handle,y=this.defaultHandle,P=x||y,V=this.sValue,S=this.dragging,b=this.calcOffset(V),v=P({class:"".concat(t,"-handle"),prefixCls:t,vertical:n,offset:b,value:V,dragging:S,disabled:o,min:m,max:g,reverse:k,index:0,tabindex:u,ariaLabel:c,ariaLabelledBy:h,ariaValueTextFormatter:d,style:l[0]||l,ref:function(C){return e.saveHandle(0,C)},onFocus:this.onFocus,onBlur:this.onBlur}),f=T!==void 0?this.calcOffset(T):0,w=s[0]||s;return{tracks:this.getTrack({prefixCls:t,reverse:k,vertical:n,included:a,offset:f,minimumTrackStyle:r,mergedTrackStyle:w,length:b-f}),handles:v}}}});const ya=Pn(ga);var he=function(e){var t=e.value,n=e.handle,a=e.bounds,o=e.props,r=o.allowCross,s=o.pushable,l=Number(s),u=ut(t,o),c=u;return!r&&n!=null&&a!==void 0&&(n>0&&u<=a[n-1]+l&&(c=a[n-1]+l),n=a[n+1]-l&&(c=a[n+1]-l)),wn(c,o)},ba={defaultValue:M.arrayOf(M.number),value:M.arrayOf(M.number),count:Number,pushable:Xn(M.oneOfType([M.looseBool,M.number])),allowCross:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},reverse:{type:Boolean,default:void 0},tabindex:M.arrayOf(M.number),prefixCls:String,min:Number,max:Number,autofocus:{type:Boolean,default:void 0},ariaLabelGroupForHandles:Array,ariaLabelledByGroupForHandles:Array,ariaValueTextFormatterGroupForHandles:Array,draggableTrack:{type:Boolean,default:void 0}},Ca=j({compatConfig:{MODE:3},name:"Range",mixins:[He],inheritAttrs:!1,props:tt(ba,{count:1,allowCross:!0,pushable:!1,tabindex:[],draggableTrack:!1,ariaLabelGroupForHandles:[],ariaLabelledByGroupForHandles:[],ariaValueTextFormatterGroupForHandles:[]}),emits:["beforeChange","afterChange","change"],displayName:"Range",data:function(){var e=this,t=this.count,n=this.min,a=this.max,o=Array.apply(void 0,q(Array(t+1))).map(function(){return n}),r=Ae(this,"defaultValue")?this.defaultValue:o,s=this.value;s===void 0&&(s=r);var l=s.map(function(c,h){return he({value:c,handle:h,props:e.$props})}),u=l[0]===a?0:l.length-1;return{sHandle:null,recent:u,bounds:l}},watch:{value:{handler:function(e){var t=this.bounds;this.setChangeValue(e||t)},deep:!0},min:function(){var e=this.value;this.setChangeValue(e||this.bounds)},max:function(){var e=this.value;this.setChangeValue(e||this.bounds)}},methods:{setChangeValue:function(e){var t=this,n=this.bounds,a=e.map(function(r,s){return he({value:r,handle:s,bounds:n,props:t.$props})});if(n.length===a.length){if(a.every(function(r,s){return r===n[s]}))return null}else a=e.map(function(r,s){return he({value:r,handle:s,props:t.$props})});if(this.setState({bounds:a}),e.some(function(r){return bn(r,t.$props)})){var o=e.map(function(r){return ut(r,t.$props)});this.$emit("change",o)}},onChange:function(e){var t=!Ae(this,"value");if(t)this.setState(e);else{var n={};["sHandle","recent"].forEach(function(r){e[r]!==void 0&&(n[r]=e[r])}),Object.keys(n).length&&this.setState(n)}var a=p(p({},this.$data),e),o=a.bounds;this.$emit("change",o)},positionGetValue:function(e){var t=this.getValue(),n=this.calcValueByPos(e),a=this.getClosestBound(n),o=this.getBoundNeedMoving(n,a),r=t[o];if(n===r)return null;var s=q(t);return s[o]=n,s},onStart:function(e){var t=this.bounds;this.$emit("beforeChange",t);var n=this.calcValueByPos(e);this.startValue=n,this.startPosition=e;var a=this.getClosestBound(n);this.prevMovedHandleIndex=this.getBoundNeedMoving(n,a),this.setState({sHandle:this.prevMovedHandleIndex,recent:this.prevMovedHandleIndex});var o=t[this.prevMovedHandleIndex];if(n!==o){var r=q(t);r[this.prevMovedHandleIndex]=n,this.onChange({bounds:r})}},onEnd:function(e){var t=this.sHandle;this.removeDocumentEvents(),t||(this.dragTrack=!1),(t!==null||e)&&this.$emit("afterChange",this.bounds),this.setState({sHandle:null})},onMove:function(e,t,n,a){ce(e);var o=this.$data,r=this.$props,s=r.max||100,l=r.min||0;if(n){var u=r.vertical?-t:t;u=r.reverse?-u:u;var c=s-Math.max.apply(Math,q(a)),h=l-Math.min.apply(Math,q(a)),d=Math.min(Math.max(u/(this.getSliderLength()/100),h),c),m=a.map(function(y){return Math.floor(Math.max(Math.min(y+d,s),l))});o.bounds.map(function(y,P){return y===m[P]}).some(function(y){return!y})&&this.onChange({bounds:m});return}var g=this.bounds,T=this.sHandle,k=this.calcValueByPos(t),x=g[T];k!==x&&this.moveTo(k)},onKeyboard:function(e){var t=this.$props,n=t.reverse,a=t.vertical,o=xn(e,a,n);if(o){ce(e);var r=this.bounds,s=this.sHandle,l=r[s===null?this.recent:s],u=o(l,this.$props),c=he({value:u,handle:s,bounds:r,props:this.$props});if(c===l)return;var h=!0;this.moveTo(c,h)}},getClosestBound:function(e){for(var t=this.bounds,n=0,a=1;a=t[a]&&(n=a);return Math.abs(t[n+1]-e)=a.length||r<0)return!1;var s=t+n,l=a[r],u=this.pushable,c=Number(u),h=n*(e[s]-l);return this.pushHandle(e,s,n,c-h)?(e[t]=l,!0):!1},trimAlignValue:function(e){var t=this.sHandle,n=this.bounds;return he({value:e,handle:t,bounds:n,props:this.$props})},ensureValueNotConflict:function(e,t,n){var a=n.allowCross,o=n.pushable,r=this.$data||{},s=r.bounds;if(e=e===void 0?r.sHandle:e,o=Number(o),!a&&e!=null&&s!==void 0){if(e>0&&t<=s[e-1]+o)return s[e-1]+o;if(e=s[e+1]-o)return s[e+1]-o}return t},getTrack:function(e){var t=e.bounds,n=e.prefixCls,a=e.reverse,o=e.vertical,r=e.included,s=e.offsets,l=e.trackStyle;return t.slice(0,-1).map(function(u,c){var h,d=c+1,m=G((h={},B(h,"".concat(n,"-track"),!0),B(h,"".concat(n,"-track-").concat(d),!0),h));return O(lt,{class:m,vertical:o,reverse:a,included:r,offset:s[d-1],length:s[d]-s[d-1],style:l[c],key:d},null)})},renderSlider:function(){var e=this,t=this.sHandle,n=this.bounds,a=this.prefixCls,o=this.vertical,r=this.included,s=this.disabled,l=this.min,u=this.max,c=this.reverse,h=this.handle,d=this.defaultHandle,m=this.trackStyle,g=this.handleStyle,T=this.tabindex,k=this.ariaLabelGroupForHandles,x=this.ariaLabelledByGroupForHandles,y=this.ariaValueTextFormatterGroupForHandles,P=h||d,V=n.map(function(v){return e.calcOffset(v)}),S="".concat(a,"-handle"),b=n.map(function(v,f){var w,D=T[f]||0;(s||T[f]===null)&&(D=null);var C=t===f;return P({class:G((w={},B(w,S,!0),B(w,"".concat(S,"-").concat(f+1),!0),B(w,"".concat(S,"-dragging"),C),w)),prefixCls:a,vertical:o,dragging:C,offset:V[f],value:v,index:f,tabindex:D,min:l,max:u,reverse:c,disabled:s,style:g[f],ref:function(N){return e.saveHandle(f,N)},onFocus:e.onFocus,onBlur:e.onBlur,ariaLabel:k[f],ariaLabelledBy:x[f],ariaValueTextFormatter:y[f]})});return{tracks:this.getTrack({bounds:n,prefixCls:a,reverse:c,vertical:o,included:r,offsets:V,trackStyle:m}),handles:b}}}});const wa=Pn(Ca),xa=j({compatConfig:{MODE:3},name:"SliderTooltip",inheritAttrs:!1,props:hn(),setup:function(e,t){var n=t.attrs,a=t.slots,o=A(null),r=A(null);function s(){Q.cancel(r.value),r.value=null}function l(){r.value=Q(function(){var c;(c=o.value)===null||c===void 0||c.forcePopupAlign(),r.value=null})}var u=function(){s(),e.visible&&l()};return Y([function(){return e.visible},function(){return e.title}],function(){u()},{flush:"post",immediate:!0}),Nn(function(){u()}),Fe(function(){s()}),function(){return O(va,p(p({ref:o},e),n),a)}}});var Pa=["value","dragging","index"],Ta=["tooltipPrefixCls","range","id"],Sa=function(e){return typeof e=="number"?e.toString():""},Ma=function(){return{id:String,prefixCls:String,tooltipPrefixCls:String,range:{type:[Boolean,Object],default:void 0},reverse:{type:Boolean,default:void 0},min:Number,max:Number,step:{type:[Number,Object]},marks:{type:Object},dots:{type:Boolean,default:void 0},value:{type:[Number,Array]},defaultValue:{type:[Number,Array]},included:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},vertical:{type:Boolean,default:void 0},tipFormatter:{type:[Function,Object],default:function(){return Sa}},tooltipVisible:{type:Boolean,default:void 0},tooltipPlacement:{type:String},getTooltipPopupContainer:{type:Function},autofocus:{type:Boolean,default:void 0},handleStyle:{type:[Object,Array]},trackStyle:{type:[Object,Array]},onChange:{type:Function},onAfterChange:{type:Function},onFocus:{type:Function},onBlur:{type:Function},"onUpdate:value":{type:Function}}},Oa=j({compatConfig:{MODE:3},name:"ASlider",inheritAttrs:!1,props:Ma(),slots:["mark"],setup:function(e,t){var n=t.attrs,a=t.slots,o=t.emit,r=t.expose,s=Qt("slider",e),l=s.prefixCls,u=s.rootPrefixCls,c=s.direction,h=s.getPopupContainer,d=s.configProvider,m=Qn(),g=A(),T=A({}),k=function(f,w){T.value[f]=w},x=W(function(){return e.tooltipPlacement?e.tooltipPlacement:e.vertical?c.value==="rtl"?"left":"right":"top"}),y=function(){var f;(f=g.value)===null||f===void 0||f.focus()},P=function(){var f;(f=g.value)===null||f===void 0||f.blur()},V=function(f){o("update:value",f),o("change",f),m.onFieldChange()},S=function(f){o("blur",f)};r({focus:y,blur:P});var b=function(f){var w=f.tooltipPrefixCls,D=f.info,C=D.value,_=D.dragging,N=D.index,E=Be(D,Pa),H=e.tipFormatter,F=e.tooltipVisible,z=e.getTooltipPopupContainer,oe=H?T.value[N]||_:!1,de=F||F===void 0&&oe;return O(xa,{prefixCls:w,title:H?H(C):"",visible:de,placement:x.value,transitionName:"".concat(u.value,"-zoom-down"),key:N,overlayClassName:"".concat(l.value,"-tooltip"),getPopupContainer:z||h.value},{default:function(){return[O(yn,p(p({},E),{},{value:C,onMouseenter:function(){return k(N,!0)},onMouseleave:function(){return k(N,!1)}}),null)]}})};return function(){var v=e.tooltipPrefixCls,f=e.range,w=e.id,D=w===void 0?m.id.value:w,C=Be(e,Ta),_=d.getPrefixCls("tooltip",v),N=G(n.class,B({},"".concat(l.value,"-rtl"),c.value==="rtl"));c.value==="rtl"&&!C.vertical&&(C.reverse=!C.reverse);var E;return fe(f)==="object"&&(E=f.draggableTrack),f?O(wa,p(p({},C),{},{step:C.step,draggableTrack:E,class:N,ref:g,handle:function(F){return b({tooltipPrefixCls:_,prefixCls:l.value,info:F})},prefixCls:l.value,onChange:V,onBlur:S}),{mark:a.mark}):O(ya,p(p({},C),{},{id:D,step:C.step,class:N,ref:g,handle:function(F){return b({tooltipPrefixCls:_,prefixCls:l.value,info:F})},prefixCls:l.value,onChange:V,onBlur:S}),{mark:a.mark})}}});const Va=tn(Oa),ka={class:"dd__title"},$a={key:0,class:"dd__body"},Aa=j({__name:"DropDown",props:{text:{}},setup(i){const e=A(!1);return(t,n)=>(L(),I("div",{class:ge(["dd",{"is-open":e.value}])},[R("button",{type:"button",class:"dd__head",onClick:n[0]||(n[0]=a=>e.value=!e.value)},[R("h3",ka,[dt(t.$slots,"text",{},()=>[ke(le(i.text),1)],!0)]),O(Ye,{icon:"vuesax-linear:arrow-down",class:"dd__chevron",size:"18"})]),O(Ne,{name:"drop",mode:"out-in",appear:""},{default:K(()=>[e.value?(L(),I("div",$a,[dt(t.$slots,"default",{},void 0,!0)])):se("",!0)]),_:3})],2))}}),Gt=Qe(Aa,[["__scopeId","data-v-9e57de56"]]),Ba={class:"filt"},Da={class:"filt__body"},_a={key:0,class:"filt__chips"},Na=["onClick"],Fa={key:1,class:"filt__empty"},Ea={class:"filt__gram"},Ha={key:0,class:"filt__gramFigures"},Ra={class:"filt__gramFigure"},La={class:"filt__gramFigure"},ja={class:"filt__bar"},Ia={class:"filt__barInner"},Wa=j({__name:"Filters",props:{modelValue:{},filterKeys:{},products:{}},emits:["change","update:filterKeys"],setup(i,{emit:e}){const t=i,n=e,a=W(()=>{const l=new Map;for(const u of t.products)u.brand&&l.set(u.brand.id,u.brand);return[...l.values()]}),o=W(()=>{const l=t.products.flatMap(u=>u.variants.map(c=>parseFloat(c.rashWeightGrams)));return l.length===0?[0,100]:[Math.floor(Math.min(...l)),Math.ceil(Math.max(...l))]});Y(o,l=>{t.modelValue.limit_gram.length===0&&(t.modelValue.limit_gram=[...l])},{immediate:!0});const r=l=>{const u=t.modelValue.brands,c=u.indexOf(l);c===-1?u.push(l):u.splice(c,1)},s=l=>{const u=[];l&&(t.modelValue.brands.length>0&&u.push("brands"),t.modelValue.limit_gram[0]!==void 0&&t.modelValue.limit_gram[1]!==void 0&&(t.modelValue.limit_gram[0]!==o.value[0]||t.modelValue.limit_gram[1]!==o.value[1])&&u.push("limit_gram")),l&&u.length>0?(n("update:filterKeys",u),n("change",{resetFilters:!1})):(n("update:filterKeys",[]),n("change",{resetFilters:!0}))};return(l,u)=>(L(),I("section",Ba,[R("div",Da,[O(Gt,{text:"فیلتر بر اساس برند"},{default:K(()=>[a.value.length?(L(),I("div",_a,[(L(!0),I(Ve,null,Ge(a.value,c=>(L(),I("button",{key:c.id,type:"button",class:ge(["filt__chip",{"is-on":i.modelValue.brands.includes(c.id)}]),onClick:h=>r(c.id)},le(c.title),11,Na))),128))])):(L(),I("p",Fa,"برندی برای فیلتر موجود نیست."))]),_:1}),O(Gt,{text:"فیلتر بر اساس گرم"},{default:K(()=>[R("div",Ea,[O(ae(Va),{value:i.modelValue.limit_gram,"onUpdate:value":u[0]||(u[0]=c=>i.modelValue.limit_gram=c),step:.01,range:"",reverse:"",min:o.value[0],max:o.value[1]},null,8,["value","min","max"]),i.modelValue.limit_gram.length>0?(L(),I("div",Ha,[R("span",Ra,[u[3]||(u[3]=R("i",null,"کمترین",-1)),ke(" "+le(i.modelValue.limit_gram[0])+" گرم ",1)]),R("span",La,[u[4]||(u[4]=R("i",null,"بیشترین",-1)),ke(" "+le(i.modelValue.limit_gram[1])+" گرم ",1)])])):se("",!0)])]),_:1})]),R("div",ja,[R("div",Ia,[R("button",{type:"button",class:"filt__clear",onClick:u[1]||(u[1]=c=>s(!1))},"پاک کردن فیلتر‌ها"),R("button",{type:"button",class:"filt__apply",onClick:u[2]||(u[2]=c=>s(!0))},"اعمال فیلتر")])])]))}}),za=Qe(Wa,[["__scopeId","data-v-9651e9da"]]),Ua={class:"search"},Xa={class:"search__barExtra"},Ya={key:0,class:"search__chips no-scrollbar"},Ga=["onClick"],Ka={key:0,class:"search__grid"},qa={key:2,class:"search__empty"},ze=20,Za=j({__name:"SearchView",setup(i){const e=ti(),t=Fn(),n=A(!1),a=A(!1),o=A([]),r=A(!1),s=A([]),l=W(()=>{const v=new Map;for(const f of o.value)f.category&&v.set(f.category.id,f.category);return[...v.values()]}),u=W(()=>{let v=o.value;const f=e.query;return f.text&&(v=v.filter(w=>w.title.includes(f.text))),f.cats&&f.cats.length>0&&(v=v.filter(w=>w.category&&f.cats.includes(w.category.id))),f.brands.length>0&&(v=v.filter(w=>w.brand&&f.brands.includes(w.brand.id))),f.limit_gram.length===2&&(v=v.filter(w=>w.variants.some(D=>parseFloat(D.rashWeightGrams)>=f.limit_gram[0]&&parseFloat(D.rashWeightGrams)<=f.limit_gram[1]))),v}),c=A(ze),h=W(()=>u.value.slice(0,c.value)),d=W(()=>c.value{v.some(f=>f.isIntersecting)&&d.value&&(c.value+=ze)},{rootMargin:"400px"}),g.observe(m.value))}Y(u,()=>{c.value=ze}),Y(m,T),Fe(()=>g==null?void 0:g.disconnect());async function k(){n.value=!0;try{o.value=await ni.listProducts()}finally{n.value=!1}}async function x(){await k(),a.value=!1}function y(v){e.query.text=v}function P(v){e.query.cats=v?[v]:void 0}function V(){r.value=!0,t.setNavVisibility(!1)}function S(v){r.value=!1,t.setNavVisibility(!0),v!=null&&v.resetFilters&&(e.reset(),s.value=[])}function b(v){var w;if(!r.value)return;((w=v.target)==null?void 0:w.closest("button"))&&(v.stopPropagation(),S())}return En(()=>{r.value&&t.setNavVisibility(!0)}),be(k),(v,f)=>{const w=vt("Loading"),D=vt("container");return L(),I("div",Ua,[O(Rn,{title:r.value?"فیلترها":"جستجو",back:r.value,onClickCapture:b},{below:K(()=>[R("div",Xa,[O(Yn,{onSearch:y,"place-holder":"جستجوی دسته بندی، محصولات و ..."}),r.value?se("",!0):(L(),I("div",Ya,[R("button",{type:"button",class:ge(["search__chip search__chip--filter",{"is-on":s.value.length>0}]),onClick:V},[O(Ye,{icon:"vuesax-linear:filter",size:"15"}),ke(" "+le(s.value.length>0?`${s.value.length} فیلتر`:"فیلتر"),1)],2),R("button",{type:"button",class:ge(["search__chip",{"is-on":!ae(e).query.cats}]),onClick:f[0]||(f[0]=C=>P(void 0))}," همه ",2),(L(!0),I(Ve,null,Ge(l.value,C=>(L(),I("button",{key:C.id,type:"button",class:ge(["search__chip",{"is-on":ae(e).query.cats&&ae(e).query.cats[0]===C.id}]),onClick:_=>P(C.id)},le(C.title),11,Ga))),128))]))])]),_:1},8,["title","back"]),O(mt,{spinning:n.value,tip:"درحال دریافت اطلاعات"},{default:K(()=>[Oe(O(za,{filterKeys:s.value,"onUpdate:filterKeys":f[1]||(f[1]=C=>s.value=C),modelValue:ae(e).query,"onUpdate:modelValue":f[2]||(f[2]=C=>ae(e).query=C),products:o.value,onChange:S},null,8,["filterKeys","modelValue","products"]),[[Xe,r.value]]),Oe(O(ae(ii),{modelValue:a.value,"onUpdate:modelValue":f[3]||(f[3]=C=>a.value=C),onRefresh:x},{pulling:K(()=>[O(w,{size:"18"})]),loosing:K(()=>[O(w,{size:"18"})]),loading:K(()=>[O(w,{size:"18"})]),success:K(()=>[...f[4]||(f[4]=[R("span",null,null,-1)])]),default:K(()=>[O(D,{class:"search__body"},{default:K(()=>[u.value.length?(L(),I("div",Ka,[(L(!0),I(Ve,null,Ge(h.value,C=>(L(),Hn(ei,{key:C.id,value:C},null,8,["value"]))),128))])):se("",!0),d.value?(L(),I("div",{key:1,ref_key:"sentinel",ref:m,class:"search__more"},[O(mt,{spinning:!0,indicator:!0,fixed:!1,tip:"",cls:"my-[10px]"})],512)):se("",!0),!u.value.length&&!n.value?(L(),I("section",qa,[O(Ye,{icon:"vuesax-linear:search-normal-1",size:"26"}),f[5]||(f[5]=R("p",null,"محصولی با این مشخصات پیدا نشد.",-1))])):se("",!0)]),_:1})]),_:1},8,["modelValue"]),[[Xe,!r.value]])]),_:1},8,["spinning"])])}}}),go=Qe(Za,[["__scopeId","data-v-6b08df20"]]);export{go as default}; diff --git a/apps/user-app-v2/dist/assets/SearchView-BO4eC48H.css b/apps/user-app-v2/dist/assets/SearchView-BO4eC48H.css deleted file mode 100644 index 1158dc6..0000000 --- a/apps/user-app-v2/dist/assets/SearchView-BO4eC48H.css +++ /dev/null @@ -1 +0,0 @@ -.dd[data-v-9e57de56]{padding:15px;border:1px solid #ECEDEF;border-radius:16px;background:#fff}.dd.is-open[data-v-9e57de56]{border-color:#a33c55}.dd__head[data-v-9e57de56]{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;border:0;padding:0;cursor:pointer;background:none;font-family:inherit;text-align:start}.dd__title[data-v-9e57de56]{margin:0;font-size:13px;font-weight:700;color:#14161a}.dd__chevron[data-v-9e57de56]{flex:0 0 auto;color:#8a909c;transition:transform .2s ease}.dd.is-open .dd__chevron[data-v-9e57de56]{transform:rotate(180deg);color:#7a1b33}.dd__body[data-v-9e57de56]{overflow:hidden;padding-top:15px}.drop-enter-active{animation:drop .2s cubic-bezier(.33,1,.68,1)}.drop-leave-to{animation:drop .2s cubic-bezier(.33,1,.68,1) reverse}@keyframes drop{0%{max-height:0}to{max-height:240px}}.filt[data-v-9651e9da]{background:#fff;min-height:100vh}.filt__body[data-v-9651e9da]{max-width:768px;margin:0 auto;padding:120px 16px 110px;display:flex;flex-direction:column;gap:12px}.filt__chips[data-v-9651e9da]{display:flex;flex-wrap:wrap;gap:8px}.filt__chip[data-v-9651e9da]{padding:8px 14px;border-radius:999px;cursor:pointer;font-family:inherit;font-size:12px;font-weight:600;color:#22262e;background:#fff;border:1px solid #ECEDEF;transition:all .2s ease}.filt__chip.is-on[data-v-9651e9da]{color:#fff;background:#14161a;border-color:#14161a}.filt__chip[data-v-9651e9da]:active{transform:scale(.97)}.filt__empty[data-v-9651e9da]{margin:0;font-size:12px;color:#8a909c}.filt__gram[data-v-9651e9da]{padding:4px 6px 0}.filt__gram[data-v-9651e9da] .ant-slider-track{background-color:#7a1b33}.filt__gram[data-v-9651e9da] .ant-slider-handle{border-color:#7a1b33}.filt__gram[data-v-9651e9da] .ant-slider-rail{background-color:#ecedef}.filt__gramFigures[data-v-9651e9da]{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:18px}.filt__gramFigure[data-v-9651e9da]{font-size:12px;font-weight:700;color:#14161a}.filt__gramFigure i[data-v-9651e9da]{font-style:normal;font-size:11px;font-weight:600;color:#8a909c;padding-inline-end:4px}.filt__bar[data-v-9651e9da]{position:fixed;bottom:0;left:0;right:0;z-index:5;background:#ffffffeb;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border-top:1px solid #ECEDEF;padding-bottom:16px}.filt__barInner[data-v-9651e9da]{max-width:768px;margin:0 auto;padding:12px 16px;display:flex;align-items:center;gap:10px}.filt__clear[data-v-9651e9da],.filt__apply[data-v-9651e9da]{flex:1;padding:13px 18px;border:0;cursor:pointer;border-radius:14px;font-family:inherit;font-size:13px;font-weight:700;transition:transform .15s ease}.filt__clear[data-v-9651e9da]{color:#22262e;background:#f4f5f6;border:1px solid #ECEDEF}.filt__apply[data-v-9651e9da]{color:#fff;background:#14161a}.filt__clear[data-v-9651e9da]:active,.filt__apply[data-v-9651e9da]:active{transform:scale(.98)}.search[data-v-6b08df20]{background:#fff;min-height:100vh}.search__barExtra[data-v-6b08df20]{max-width:768px;margin:0 auto;padding:0 16px}.search__chips[data-v-6b08df20]{display:flex;gap:8px;overflow-x:auto;margin:12px 0 10px -16px;scroll-snap-type:x proximity}.search__chips[data-v-6b08df20]:before,.search__chips[data-v-6b08df20]:after{content:"";flex:0 0 16px}.search__chip[data-v-6b08df20]{scroll-snap-align:start;flex:0 0 auto;display:inline-flex;align-items:center;gap:6px;height:40px;padding:0 18px;border-radius:999px;cursor:pointer;font-family:inherit;font-size:12.5px;font-weight:600;white-space:nowrap;color:#22262e;background:#fff;border:1px solid #ECEDEF;transition:all .2s ease}.search__chip.is-on[data-v-6b08df20]{color:#fff;background:#14161a;border-color:#14161a}.search__chip--filter.is-on[data-v-6b08df20]{background:#7a1b33;border-color:#7a1b33}.search__chip[data-v-6b08df20]:active{transform:scale(.97)}.search__body[data-v-6b08df20]{padding-top:176px;padding-bottom:90px}.search__body[data-v-6b08df20]>*:first-child{margin-top:16px}.search__collections[data-v-6b08df20]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-bottom:22px}.search__collection[data-v-6b08df20]{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:13px 10px;border-radius:14px;cursor:pointer;font-family:inherit;font-size:12.5px;font-weight:700;color:#22262e;background:#f4f5f6;border:1px solid #ECEDEF;transition:all .2s ease}.search__collection[data-v-6b08df20]:active{transform:scale(.98)}.search__grid[data-v-6b08df20]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.search__more[data-v-6b08df20]{display:flex;justify-content:center;padding:18px 0 4px}.search__empty[data-v-6b08df20]{margin-top:8px;padding:34px 20px;border:1px dashed #ECEDEF;border-radius:18px;display:flex;flex-direction:column;align-items:center;gap:10px;color:#8a909c}.search__empty p[data-v-6b08df20]{margin:0;font-size:12.5px} diff --git a/apps/user-app-v2/dist/assets/SearchView-C9JtP0Ya.js b/apps/user-app-v2/dist/assets/SearchView-C9JtP0Ya.js new file mode 100644 index 0000000..c6df45f --- /dev/null +++ b/apps/user-app-v2/dist/assets/SearchView-C9JtP0Ya.js @@ -0,0 +1 @@ +import{a1 as g,p as k,V as qe,w as Xt,l as kn,d as j,af as Yt,ap as G,g as D,Q as z,o as be,a as Ne,at as lt,h as L,ax as ke,x as ze,Y as Vn,Z as _n,ah as fe,aT as $n,T as An,aN as ut,a8 as B,aU as Dn,as as q,aV as Bn,a0 as Nn,ab as O,aG as Gt,aW as Kt,aX as ct,F as Ve,aY as _e,aZ as En,$ as xe,an as Fn,a9 as Hn,ad as Rn,aL as $e,aR as Ln,ao as qt,aa as Zt,aK as Ze,au as Qt,ag as Qe,a_ as jn,aQ as Jt,a$ as In,b0 as Wn,f as I,c as W,b as E,H as ft,N as ge,t as oe,I as Ae,i as le,_ as en,j as tn,z as K,m as te,b1 as zn,e as Oe,r as Ue,n as Un,v as Xn,J as dt,s as Yn,B as vt}from"./index-BAr1mMLP.js";import{P as Gn}from"./PageBar-B1ks8U8i.js";import{S as Kn}from"./SearchInput-vVDQz-rO.js";import{s as ne,P as pt,u as qn,a as Zn,K as ee}from"./KeyCode-BMdFtCT-.js";import{w as J}from"./raf-nDFcuFT6.js";import{_ as Qn,i as Jn,B as De,z as ei,A as ti}from"./FormItemContext-YTkEF048.js";import{P as ni}from"./ProductCard-4TPJHHsT.js";import{P as ii}from"./index-DPSZMLNJ.js";function Z(i,e,t,n){if(i&&i.addEventListener){var a=n;a===void 0&&ne&&(e==="touchstart"||e==="touchmove"||e==="wheel")&&(a={passive:!1}),i.addEventListener(e,t,a)}return{remove:function(){i&&i.removeEventListener&&i.removeEventListener(e,t)}}}function se(i,e){return i?i.contains(e):!1}var nn=["moz","ms","webkit"];function ai(){var i=0;return function(e){var t=new Date().getTime(),n=Math.max(0,16-(t-i)),a=window.setTimeout(function(){e(t+n)},n);return i=t+n,a}}function oi(){if(typeof window>"u")return function(){};if(window.requestAnimationFrame)return window.requestAnimationFrame.bind(window);var i=nn.filter(function(e){return"".concat(e,"RequestAnimationFrame")in window})[0];return i?window["".concat(i,"RequestAnimationFrame")]:ai()}function ri(i){if(typeof window>"u")return null;if(window.cancelAnimationFrame)return window.cancelAnimationFrame(i);var e=nn.filter(function(t){return"".concat(t,"CancelAnimationFrame")in window||"".concat(t,"CancelRequestAnimationFrame")in window})[0];return e?(window["".concat(e,"CancelAnimationFrame")]||window["".concat(e,"CancelRequestAnimationFrame")]).call(this,i):clearTimeout(i)}var ht=oi(),si=function(e){return ri(e.id)},li=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=Date.now();function a(){Date.now()-n>=t?e.call():o.id=ht(a)}var o={id:ht(a)};return o},Je={visible:Boolean,prefixCls:String,zIndex:Number,destroyPopupOnHide:Boolean,forceRender:Boolean,animation:[String,Object],transitionName:String,stretch:{type:String},align:{type:Object},point:{type:Object},getRootDomNode:{type:Function},getClassNameFromAlign:{type:Function},onMouseenter:{type:Function},onMouseleave:{type:Function},onMousedown:{type:Function},onTouchstart:{type:Function}},ui=g(g({},Je),{},{mobile:{type:Object}}),ci=g(g({},Je),{},{mask:Boolean,mobile:{type:Object},maskAnimation:String,maskTransitionName:String});function an(i){var e=i.prefixCls,t=i.animation,n=i.transitionName;return t?{name:"".concat(e,"-").concat(t)}:n?{name:n}:{}}function on(i){var e=i.prefixCls,t=i.visible,n=i.zIndex,a=i.mask,o=i.maskAnimation,r=i.maskTransitionName;if(!a)return null;var s={};return(r||o)&&(s=an({prefixCls:e,transitionName:r,animation:o})),k(qe,g({appear:!0},s),{default:function(){return[Xt(k("div",{style:{zIndex:n},class:"".concat(e,"-mask")},null),[[kn("if"),t]])]}})}on.displayName="Mask";const fi=j({compatConfig:{MODE:3},name:"MobilePopupInner",inheritAttrs:!1,props:ui,emits:["mouseenter","mouseleave","mousedown","touchstart","align"],setup:function(e,t){var n=t.expose,a=t.slots,o=D();return n({forceAlign:function(){},getElement:function(){return o.value}}),function(){var r,s=e.zIndex,l=e.visible,u=e.prefixCls,c=e.mobile,h=c===void 0?{}:c,f=h.popupClassName,p=h.popupStyle,w=h.popupMotion,M=w===void 0?{}:w,_=h.popupRender,T=g({zIndex:s},p),y=Yt((r=a.default)===null||r===void 0?void 0:r.call(a));y.length>1&&(y=k("div",{class:"".concat(u,"-content")},[y])),_&&(y=_(y));var S=G(u,f);return k(qe,g({ref:o},M),{default:function(){return[l?k("div",{class:S,style:T},[y]):null]}})}}});var mt=["measure","align",null,"motion"];const di=function(i,e){var t=D(null),n=D(),a=D(!1);function o(l){a.value||(t.value=l)}function r(){J.cancel(n.value)}function s(l){r(),n.value=J(function(){var u=t.value;switch(t.value){case"align":u="motion";break;case"motion":u="stable";break}o(u),l==null||l()})}return z(i,function(){o("measure")},{immediate:!0,flush:"post"}),be(function(){z(t,function(){switch(t.value){case"measure":e();break}t.value&&(n.value=J(Qn(lt.mark(function l(){var u,c;return lt.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:u=mt.indexOf(t.value),c=mt[u+1],c&&u!==-1&&o(c);case 3:case"end":return f.stop()}},l)}))))},{immediate:!0,flush:"post"})}),Ne(function(){a.value=!0,r()}),[t,s]},vi=function(i){var e=D({width:0,height:0});function t(a){e.value={width:a.offsetWidth,height:a.offsetHeight}}var n=L(function(){var a={};if(i.value){var o=e.value,r=o.width,s=o.height;i.value.indexOf("height")!==-1&&s?a.height="".concat(s,"px"):i.value.indexOf("minHeight")!==-1&&s&&(a.minHeight="".concat(s,"px")),i.value.indexOf("width")!==-1&&r?a.width="".concat(r,"px"):i.value.indexOf("minWidth")!==-1&&r&&(a.minWidth="".concat(r,"px"))}return a});return[n,t]};function gt(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(i,a).enumerable})),t.push.apply(t,n)}return t}function yt(i){for(var e=1;e=0&&t.left>=0&&t.bottom>t.top&&t.right>t.left?t:null}function Ei(i,e,t,n){var a=A.clone(i),o={width:e.width,height:e.height};return n.adjustX&&a.left=t.left&&a.left+o.width>t.right&&(o.width-=a.left+o.width-t.right),n.adjustX&&a.left+o.width>t.right&&(a.left=Math.max(t.right-o.width,t.left)),n.adjustY&&a.top=t.top&&a.top+o.height>t.bottom&&(o.height-=a.top+o.height-t.bottom),n.adjustY&&a.top+o.height>t.bottom&&(a.top=Math.max(t.bottom-o.height,t.top)),A.mix(a,o)}function it(i){var e,t,n;if(!A.isWindow(i)&&i.nodeType!==9)e=A.offset(i),t=A.outerWidth(i),n=A.outerHeight(i);else{var a=A.getWindow(i);e={left:A.getWindowScrollLeft(a),top:A.getWindowScrollTop(a)},t=A.viewportWidth(a),n=A.viewportHeight(a)}return e.width=t,e.height=n,e}function Mt(i,e){var t=e.charAt(0),n=e.charAt(1),a=i.width,o=i.height,r=i.left,s=i.top;return t==="c"?s+=o/2:t==="b"&&(s+=o),n==="c"?r+=a/2:n==="r"&&(r+=a),{left:r,top:s}}function Te(i,e,t,n,a){var o=Mt(e,t[1]),r=Mt(i,t[0]),s=[r.left-o.left,r.top-o.top];return{left:Math.round(i.left-s[0]+n[0]-a[0]),top:Math.round(i.top-s[1]+n[1]-a[1])}}function Ot(i,e,t){return i.leftt.right}function kt(i,e,t){return i.topt.bottom}function Fi(i,e,t){return i.left>t.right||i.left+e.widtht.bottom||i.top+e.height=t.right||n.top>=t.bottom}function at(i,e,t){var n=t.target||e,a=it(n),o=!Ri(n,t.overflow&&t.overflow.alwaysByViewport);return vn(i,a,t,o)}at.__getOffsetParent=Ke;at.__getVisibleRectForElement=nt;function Li(i,e,t){var n,a,o=A.getDocument(i),r=o.defaultView||o.parentWindow,s=A.getWindowScrollLeft(r),l=A.getWindowScrollTop(r),u=A.viewportWidth(r),c=A.viewportHeight(r);"pageX"in e?n=e.pageX:n=s+e.clientX,"pageY"in e?a=e.pageY:a=l+e.clientY;var h={left:n,top:a,width:0,height:0},f=n>=0&&n<=s+u&&a>=0&&a<=l+c,p=[t.points[0],"cc"];return vn(i,h,yt(yt({},t),{},{points:p}),f)}const ji=function(i){if(!i)return!1;if(i.offsetParent)return!0;if(i.getBBox){var e=i.getBBox();if(e.width||e.height)return!0}if(i.getBoundingClientRect){var t=i.getBoundingClientRect();if(t.width||t.height)return!0}return!1};function Ii(i,e){return i===e?!0:!i||!e?!1:"pageX"in e&&"pageY"in e?i.pageX===e.pageX&&i.pageY===e.pageY:"clientX"in e&&"clientY"in e?i.clientX===e.clientX&&i.clientY===e.clientY:!1}function Wi(i,e){i!==document.activeElement&&se(e,i)&&typeof i.focus=="function"&&i.focus()}function $t(i,e){var t=null,n=null;function a(r){var s=ke(r,1),l=s[0].target;if(document.documentElement.contains(l)){var u=l.getBoundingClientRect(),c=u.width,h=u.height,f=Math.floor(c),p=Math.floor(h);(t!==f||n!==p)&&Promise.resolve().then(function(){e({width:f,height:p})}),t=f,n=p}}var o=new Jn(a);return i&&o.observe(i),function(){o.disconnect()}}const zi=function(i,e){var t=!1,n=null;function a(){clearTimeout(n)}function o(r){if(!t||r===!0){if(i()===!1)return;t=!0,a(),n=setTimeout(function(){t=!1},e.value)}else a(),n=setTimeout(function(){t=!1,o()},e.value)}return[o,function(){t=!1,a()}]};var Ui={align:Object,target:[Object,Function],onAlign:Function,monitorBufferTime:Number,monitorWindowResize:Boolean,disabled:Boolean};function At(i){return typeof i!="function"?null:i()}function Dt(i){return fe(i)!=="object"||!i?null:i}const Xi=j({compatConfig:{MODE:3},name:"Align",props:Ui,emits:["align"],setup:function(e,t){var n=t.expose,a=t.slots,o=D({}),r=D(),s=zi(function(){var M=e.disabled,_=e.target,T=e.align,y=e.onAlign;if(!M&&_&&r.value){var S=r.value,C,d=At(_),m=Dt(_);o.value.element=d,o.value.point=m,o.value.align=T;var x=document,b=x.activeElement;return d&&ji(d)?C=at(S,d,T):m&&(C=Li(S,m,T)),Wi(b,S),y&&C&&y(S,C),!0}return!1},L(function(){return e.monitorBufferTime})),l=ke(s,2),u=l[0],c=l[1],h=D({cancel:function(){}}),f=D({cancel:function(){}}),p=function(){var _=e.target,T=At(_),y=Dt(_);r.value!==f.value.element&&(f.value.cancel(),f.value.element=r.value,f.value.cancel=$t(r.value,u)),(o.value.element!==T||!Ii(o.value.point,y)||!ei(o.value.align,e.align))&&(u(),h.value.element!==T&&(h.value.cancel(),h.value.element=T,h.value.cancel=$t(T,u)))};be(function(){ze(function(){p()})}),Vn(function(){ze(function(){p()})}),z(function(){return e.disabled},function(M){M?c():u()},{immediate:!0,flush:"post"});var w=D(null);return z(function(){return e.monitorWindowResize},function(M){M?w.value||(w.value=Z(window,"resize",u)):w.value&&(w.value.remove(),w.value=null)},{flush:"post"}),_n(function(){h.value.cancel(),f.value.cancel(),w.value&&w.value.remove(),c()}),n({forceAlign:function(){return u(!0)}}),function(){var M=a==null?void 0:a.default();return M?De(M[0],{ref:r},!0,!0):null}}}),Yi=j({compatConfig:{MODE:3},name:"PopupInner",inheritAttrs:!1,props:Je,emits:["mouseenter","mouseleave","mousedown","touchstart","align"],setup:function(e,t){var n=t.expose,a=t.attrs,o=t.slots,r=D(),s=D(),l=D(),u=vi(Dn(e,"stretch")),c=ke(u,2),h=c[0],f=c[1],p=function(){e.stretch&&f(e.getRootDomNode())},w=D(!1),M;z(function(){return e.visible},function(v){clearTimeout(M),v?M=setTimeout(function(){w.value=e.visible}):w.value=!1},{immediate:!0});var _=di(w,p),T=ke(_,2),y=T[0],S=T[1],C=D(),d=function(){return e.point?e.point:e.getRootDomNode},m=function(){var $;($=r.value)===null||$===void 0||$.forceAlign()},x=function($,N){var H=e.getClassNameFromAlign(N),R=l.value;if(l.value!==H&&(l.value=H),y.value==="align"){var F;R!==H?Promise.resolve().then(function(){m()}):S(function(){var U;(U=C.value)===null||U===void 0||U.call(C)}),(F=e.onAlign)===null||F===void 0||F.call(e,$,N)}},b=L(function(){var v=fe(e.animation)==="object"?e.animation:an(e);return["onAfterEnter","onAfterLeave"].forEach(function($){var N=v[$];v[$]=function(H){S(),y.value="stable",N==null||N(H)}}),v}),V=function(){return new Promise(function($){C.value=$})};z([b,y],function(){!b.value&&y.value==="motion"&&S()},{immediate:!0}),n({forceAlign:m,getElement:function(){return s.value.$el||s.value}});var P=L(function(){var v;return!((v=e.align)!==null&&v!==void 0&&v.points&&(y.value==="align"||y.value==="stable"))});return function(){var v,$=e.zIndex,N=e.align,H=e.prefixCls,R=e.destroyPopupOnHide,F=e.onMouseenter,U=e.onMouseleave,re=e.onTouchstart,de=re===void 0?function(){}:re,st=e.onMousedown,ve=y.value,Tn=[g(g({},h.value),{},{zIndex:$,opacity:ve==="motion"||ve==="stable"||!w.value?null:0,pointerEvents:!w.value&&ve!=="stable"?"none":null}),a.style],Ce=Yt((v=o.default)===null||v===void 0?void 0:v.call(o,{visible:e.visible}));Ce.length>1&&(Ce=k("div",{class:"".concat(H,"-content")},[Ce]));var Sn=G(H,a.class,l.value),Mn=w.value||!e.visible,On=Mn?$n(b.value.name,b.value):{};return k(qe,g(g({ref:s},On),{},{onBeforeEnter:V}),{default:function(){return!R||e.visible?Xt(k(Xi,{target:d(),key:"popup",ref:r,monitorWindowResize:!0,disabled:P.value,align:N,onAlign:x},{default:function(){return k("div",g(g({class:Sn,onMouseenter:F,onMouseleave:U,onMousedown:ut(st,["capture"])},B({},ne?"onTouchstartPassive":"onTouchstart",ut(de,["capture"]))),{},{style:Tn}),[Ce])}}),[[An,w.value]]):null}})}}}),Gi=j({compatConfig:{MODE:3},name:"Popup",inheritAttrs:!1,props:ci,setup:function(e,t){var n=t.attrs,a=t.slots,o=t.expose,r=D(!1),s=D(!1),l=D();return z([function(){return e.visible},function(){return e.mobile}],function(){r.value=e.visible,e.visible&&e.mobile&&(s.value=!0)},{immediate:!0,flush:"post"}),o({forceAlign:function(){var c;(c=l.value)===null||c===void 0||c.forceAlign()},getElement:function(){var c;return(c=l.value)===null||c===void 0?void 0:c.getElement()}}),function(){var u=g(g(g({},e),n),{},{visible:r.value}),c=s.value?k(fi,g(g({},u),{},{mobile:e.mobile,ref:l}),{default:a.default}):k(Yi,g(g({},u),{},{ref:l}),{default:a.default});return k("div",null,[k(on,u,null),c])}}});function Ki(i,e,t){return t?i[0]===e[0]:i[0]===e[0]&&i[1]===e[1]}function Bt(i,e,t){var n=i[e]||{};return g(g({},n),t)}function qi(i,e,t,n){for(var a=t.points,o=Object.keys(i),r=0;r0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=typeof e=="function"?e(this.$data,this.$props):e;if(this.getDerivedStateFromProps){var a=this.getDerivedStateFromProps(Bn(this),g(g({},this.$data),n));if(a===null)return;n=g(g({},n),a||{})}Nn(this.$data,n),this._.isMounted&&this.$forceUpdate(),ze(function(){t&&t()})},__emit:function(){var e=[].slice.call(arguments,0),t=e[0];t="on".concat(t[0].toUpperCase()).concat(t.substring(1));var n=this.$props[t]||this.$attrs[t];if(e.length&&n)if(Array.isArray(n))for(var a=0,o=n.length;a0&&arguments[0]!==void 0?arguments[0]:[],e=0,t=i.length;e=0||V.indexOf("Bottom")>=0?v.top="".concat(P.height-x.offset[1],"px"):(V.indexOf("Top")>=0||V.indexOf("bottom")>=0)&&(v.top="".concat(-x.offset[1],"px")),V.indexOf("left")>=0||V.indexOf("Right")>=0?v.left="".concat(P.width-x.offset[0],"px"):(V.indexOf("right")>=0||V.indexOf("Left")>=0)&&(v.left="".concat(-x.offset[0],"px")),m.style.transformOrigin="".concat(v.left," ").concat(v.top)}};return function(){var d,m,x,b=e.openClassName,V=e.color,P=e.overlayClassName,v=(d=Gt((m=n.default)===null||m===void 0?void 0:m.call(n)))!==null&&d!==void 0?d:null;v=v.length===1?v[0]:v;var $=c.value;if(e.visible===void 0&&p()&&($=!1),!v)return null;var N=y(Qt(v)?v:k("span",null,[v])),H=G((x={},B(x,b||"".concat(l.value,"-open"),!0),B(x,N.props&&N.props.class,N.props&&N.props.class),x)),R=G(P,B({},"".concat(l.value,"-").concat(V),V&&Rt.test(V))),F,U;V&&!Rt.test(V)&&(F={backgroundColor:V},U={backgroundColor:V});var re=g(g(g({},o),e),{},{prefixCls:l.value,getPopupContainer:u.value,builtinPlacements:_.value,visible:$,ref:h,overlayClassName:R,overlayInnerStyle:F,onVisibleChange:w,onPopupAlign:C});return k(aa,re,{default:function(){return[c.value?De(N,{class:H}):N]},arrowContent:function(){return k("span",{class:"".concat(l.value,"-arrow-content"),style:U},null)},overlay:S})}}}),va=Jt(da);var ot=function(e,t){var n,a,o=t.attrs,r=o.included,s=o.vertical,l=o.style,u=o.class,c=o.length,h=o.offset,f=o.reverse;c<0&&(f=!f,c=Math.abs(c),h=100-h);var p=s?(n={},B(n,f?"top":"bottom","".concat(h,"%")),B(n,f?"bottom":"top","auto"),B(n,"height","".concat(c,"%")),n):(a={},B(a,f?"right":"left","".concat(h,"%")),B(a,f?"left":"right","auto"),B(a,"width","".concat(c,"%")),a),w=g(g({},l),p);return r?k("div",{class:u,style:w},null):null};ot.inheritAttrs=!1;var pa=function(e,t,n,a,o,r){Ze(n?a>0:!0,"Slider","`Slider[step]` should be a positive number in order to make Slider[dots] work.");var s=Object.keys(t).map(parseFloat).sort(function(u,c){return u-c});if(n&&a)for(var l=o;l<=r;l+=a)s.indexOf(l)===-1&&s.push(l);return s},mn=function(e,t){var n=t.attrs,a=n.prefixCls,o=n.vertical,r=n.reverse,s=n.marks,l=n.dots,u=n.step,c=n.included,h=n.lowerBound,f=n.upperBound,p=n.max,w=n.min,M=n.dotStyle,_=n.activeDotStyle,T=p-w,y=pa(o,s,l,u,w,p).map(function(S){var C,d="".concat(Math.abs(S-w)/T*100,"%"),m=!c&&S===f||c&&S<=f&&S>=h,x=o?g(g({},M),{},B({},r?"top":"bottom",d)):g(g({},M),{},B({},r?"right":"left",d));m&&(x=g(g({},x),_));var b=G((C={},B(C,"".concat(a,"-dot"),!0),B(C,"".concat(a,"-dot-active"),m),B(C,"".concat(a,"-dot-reverse"),r),C));return k("span",{class:b,style:x,key:S},null)});return k("div",{class:"".concat(a,"-step")},[y])};mn.inheritAttrs=!1;var gn=function(e,t){var n=t.attrs,a=t.slots,o=n.class,r=n.vertical,s=n.reverse,l=n.marks,u=n.included,c=n.upperBound,h=n.lowerBound,f=n.max,p=n.min,w=n.onClickLabel,M=Object.keys(l),_=a.mark,T=f-p,y=M.map(parseFloat).sort(function(S,C){return S-C}).map(function(S){var C,d=typeof l[S]=="function"?l[S]():l[S],m=fe(d)==="object"&&!Qt(d),x=m?d.label:d;if(!x&&x!==0)return null;_&&(x=_({point:S,label:x}));var b=!u&&S===c||u&&S<=c&&S>=h,V=G((C={},B(C,"".concat(o,"-text"),!0),B(C,"".concat(o,"-text-active"),b),C)),P=B({marginBottom:"-50%"},s?"top":"bottom","".concat((S-p)/T*100,"%")),v=B({transform:"translateX(".concat(s?"50%":"-50%",")"),msTransform:"translateX(".concat(s?"50%":"-50%",")")},s?"right":"left","".concat((S-p)/T*100,"%")),$=r?P:v,N=m?g(g({},$),d.style):$,H=B({},ne?"onTouchstartPassive":"onTouchstart",function(R){return w(R,S)});return k("span",g({class:V,style:N,key:S,onMousedown:function(F){return w(F,S)}},H),[x])});return k("div",{class:o},[y])};gn.inheritAttrs=!1;const yn=j({compatConfig:{MODE:3},name:"Handle",inheritAttrs:!1,props:{prefixCls:String,vertical:{type:Boolean,default:void 0},offset:Number,disabled:{type:Boolean,default:void 0},min:Number,max:Number,value:Number,tabindex:O.oneOfType([O.number,O.string]),reverse:{type:Boolean,default:void 0},ariaLabel:String,ariaLabelledBy:String,ariaValueTextFormatter:Function,onMouseenter:{type:Function},onMouseleave:{type:Function},onMousedown:{type:Function}},setup:function(e,t){var n=t.attrs,a=t.emit,o=t.expose,r=D(!1),s=D(),l=function(){document.activeElement===s.value&&(r.value=!0)},u=function(y){r.value=!1,a("blur",y)},c=function(){r.value=!1},h=function(){var y;(y=s.value)===null||y===void 0||y.focus()},f=function(){var y;(y=s.value)===null||y===void 0||y.blur()},p=function(){r.value=!0,h()},w=function(y){y.preventDefault(),h(),a("mousedown",y)};o({focus:h,blur:f,clickFocus:p,ref:s});var M=null;be(function(){M=Z(document,"mouseup",l)}),Ne(function(){var T;(T=M)===null||T===void 0||T.remove()});var _=L(function(){var T,y,S=e.vertical,C=e.offset,d=e.reverse;return S?(T={},B(T,d?"top":"bottom","".concat(C,"%")),B(T,d?"bottom":"top","auto"),B(T,"transform",d?null:"translateY(+50%)"),T):(y={},B(y,d?"right":"left","".concat(C,"%")),B(y,d?"left":"right","auto"),B(y,"transform","translateX(".concat(d?"+":"-","50%)")),y)});return function(){var T=e.prefixCls,y=e.disabled,S=e.min,C=e.max,d=e.value,m=e.tabindex,x=e.ariaLabel,b=e.ariaLabelledBy,V=e.ariaValueTextFormatter,P=e.onMouseenter,v=e.onMouseleave,$=G(n.class,B({},"".concat(T,"-handle-click-focused"),r.value)),N={"aria-valuemin":S,"aria-valuemax":C,"aria-valuenow":d,"aria-disabled":!!y},H=[n.style,_.value],R=m||0;(y||m===null)&&(R=null);var F;V&&(F=V(d));var U=g(g(g({},n),{},{role:"slider",tabindex:R},N),{},{class:$,onBlur:u,onKeydown:c,onMousedown:w,onMouseenter:P,onMouseleave:v,ref:s,style:H});return k("div",g(g({},U),{},{"aria-label":x,"aria-labelledby":b,"aria-valuetext":F}),null)}}});function Ie(i,e){try{return Object.keys(e).some(function(t){return i.target===e[t].ref})}catch{return!1}}function bn(i,e){var t=e.min,n=e.max;return in}function Lt(i){return i.touches.length>1||i.type.toLowerCase()==="touchend"&&i.touches.length>0}function jt(i,e){var t=e.marks,n=e.step,a=e.min,o=e.max,r=Object.keys(t).map(parseFloat);if(n!==null){var s=Math.pow(10,wn(n)),l=Math.floor((o*s-a*s)/(n*s)),u=Math.min((i-a)/n,l),c=Math.round(u)*n+a;r.push(c)}var h=r.map(function(f){return Math.abs(i-f)});return r[h.indexOf(Math.min.apply(Math,q(h)))]}function wn(i){var e=i.toString(),t=0;return e.indexOf(".")>=0&&(t=e.length-e.indexOf(".")-1),t}function It(i,e){var t=1;return window.visualViewport&&(t=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(i?e.clientY:e.pageX)/t}function Wt(i,e){var t=1;return window.visualViewport&&(t=+(window.visualViewport.width/document.body.getBoundingClientRect().width).toFixed(2)),(i?e.touches[0].clientY:e.touches[0].pageX)/t}function zt(i,e){var t=e.getBoundingClientRect();return i?t.top+t.height*.5:window.pageXOffset+t.left+t.width*.5}function rt(i,e){var t=e.max,n=e.min;return i<=n?n:i>=t?t:i}function Cn(i,e){var t=e.step,n=isFinite(jt(i,e))?jt(i,e):0;return t===null?n:parseFloat(n.toFixed(wn(t)))}function ce(i){i.stopPropagation(),i.preventDefault()}function ha(i,e,t){var n={increase:function(s,l){return s+l},decrease:function(s,l){return s-l}},a=n[i](Object.keys(t.marks).indexOf(JSON.stringify(e)),1),o=Object.keys(t.marks)[a];return t.step?n[i](e,t.step):Object.keys(t.marks).length&&t.marks[o]?t.marks[o]:e}function xn(i,e,t){var n="increase",a="decrease",o=n;switch(i.keyCode){case ee.UP:o=e&&t?a:n;break;case ee.RIGHT:o=!e&&t?a:n;break;case ee.DOWN:o=e&&t?n:a;break;case ee.LEFT:o=!e&&t?n:a;break;case ee.END:return function(r,s){return s.max};case ee.HOME:return function(r,s){return s.min};case ee.PAGE_UP:return function(r,s){return r+s.step*2};case ee.PAGE_DOWN:return function(r,s){return r-s.step*2};default:return}return function(r,s){return ha(o,r,s)}}var ma=["index","directives","className","style"];function ae(){}function Pn(i){var e={id:String,min:Number,max:Number,step:Number,marks:O.object,included:{type:Boolean,default:void 0},prefixCls:String,disabled:{type:Boolean,default:void 0},handle:Function,dots:{type:Boolean,default:void 0},vertical:{type:Boolean,default:void 0},reverse:{type:Boolean,default:void 0},minimumTrackStyle:O.object,maximumTrackStyle:O.object,handleStyle:O.oneOfType([O.object,O.arrayOf(O.object)]),trackStyle:O.oneOfType([O.object,O.arrayOf(O.object)]),railStyle:O.object,dotStyle:O.object,activeDotStyle:O.object,autofocus:{type:Boolean,default:void 0},draggableTrack:{type:Boolean,default:void 0}};return j({compatConfig:{MODE:3},name:"CreateSlider",mixins:[Fe,i],inheritAttrs:!1,slots:["mark"],props:Qe(e,{prefixCls:"rc-slider",min:0,max:100,step:1,marks:{},included:!0,disabled:!1,dots:!1,vertical:!1,reverse:!1,trackStyle:[{}],handleStyle:[{}],railStyle:{},dotStyle:{},activeDotStyle:{}}),emits:["change","blur","focus"],data:function(){var n=this.step,a=this.max,o=this.min,r=isFinite(a-o)?(a-o)%n===0:!0;return Ze(n&&Math.floor(n)===n?r:!0,"Slider[max] - Slider[min] (".concat(a-o,") should be a multiple of Slider[step] (").concat(n,")")),this.handlesRefs={},{}},mounted:function(){var n=this;this.$nextTick(function(){n.document=n.sliderRef&&n.sliderRef.ownerDocument;var a=n.autofocus,o=n.disabled;a&&!o&&n.focus()})},beforeUnmount:function(){var n=this;this.$nextTick(function(){n.removeDocumentEvents()})},methods:{defaultHandle:function(n){var a=n.index;n.directives;var o=n.className,r=n.style,s=$e(n,ma);if(delete s.dragging,s.value===null)return null;var l=g(g({},s),{},{class:o,style:r,key:a});return k(yn,l,null)},onDown:function(n,a){var o=a,r=this.$props,s=r.draggableTrack,l=r.vertical,u=this.$data.bounds,c=s&&this.positionGetValue?this.positionGetValue(o)||[]:[],h=Ie(n,this.handlesRefs);if(this.dragTrack=s&&u.length>=2&&!h&&!c.map(function(p,w){var M=w?!0:p>=u[w];return w===c.length-1?p<=u[w]:M}).some(function(p){return!p}),this.dragTrack)this.dragOffset=o,this.startBounds=q(u);else{if(!h)this.dragOffset=0;else{var f=zt(l,n.target);this.dragOffset=o-f,o=f}this.onStart(o)}},onMouseDown:function(n){if(n.button===0){this.removeDocumentEvents();var a=this.$props.vertical,o=It(a,n);this.onDown(n,o),this.addDocumentMouseEvents()}},onTouchStart:function(n){if(!Lt(n)){var a=this.vertical,o=Wt(a,n);this.onDown(n,o),this.addDocumentTouchEvents(),ce(n)}},onFocus:function(n){var a=this.vertical;if(Ie(n,this.handlesRefs)&&!this.dragTrack){var o=zt(a,n.target);this.dragOffset=0,this.onStart(o),ce(n),this.$emit("focus",n)}},onBlur:function(n){this.dragTrack||this.onEnd(),this.$emit("blur",n)},onMouseUp:function(){this.handlesRefs[this.prevMovedHandleIndex]&&this.handlesRefs[this.prevMovedHandleIndex].clickFocus()},onMouseMove:function(n){if(!this.sliderRef){this.onEnd();return}var a=It(this.vertical,n);this.onMove(n,a-this.dragOffset,this.dragTrack,this.startBounds)},onTouchMove:function(n){if(Lt(n)||!this.sliderRef){this.onEnd();return}var a=Wt(this.vertical,n);this.onMove(n,a-this.dragOffset,this.dragTrack,this.startBounds)},onKeyDown:function(n){this.sliderRef&&Ie(n,this.handlesRefs)&&this.onKeyboard(n)},onClickMarkLabel:function(n,a){var o=this;n.stopPropagation(),this.onChange({sValue:a}),this.setState({sValue:a},function(){return o.onEnd(!0)})},getSliderStart:function(){var n=this.sliderRef,a=this.vertical,o=this.reverse,r=n.getBoundingClientRect();return a?o?r.bottom:r.top:window.pageXOffset+(o?r.right:r.left)},getSliderLength:function(){var n=this.sliderRef;if(!n)return 0;var a=n.getBoundingClientRect();return this.vertical?a.height:a.width},addDocumentTouchEvents:function(){this.onTouchMoveListener=Z(this.document,"touchmove",this.onTouchMove),this.onTouchUpListener=Z(this.document,"touchend",this.onEnd)},addDocumentMouseEvents:function(){this.onMouseMoveListener=Z(this.document,"mousemove",this.onMouseMove),this.onMouseUpListener=Z(this.document,"mouseup",this.onEnd)},removeDocumentEvents:function(){this.onTouchMoveListener&&this.onTouchMoveListener.remove(),this.onTouchUpListener&&this.onTouchUpListener.remove(),this.onMouseMoveListener&&this.onMouseMoveListener.remove(),this.onMouseUpListener&&this.onMouseUpListener.remove()},focus:function(){var n;this.$props.disabled||(n=this.handlesRefs[0])===null||n===void 0||n.focus()},blur:function(){var n=this;this.$props.disabled||Object.keys(this.handlesRefs).forEach(function(a){var o,r;(o=n.handlesRefs[a])===null||o===void 0||(r=o.blur)===null||r===void 0||r.call(o)})},calcValue:function(n){var a=this.vertical,o=this.min,r=this.max,s=Math.abs(Math.max(n,0)/this.getSliderLength()),l=a?(1-s)*(r-o)+o:s*(r-o)+o;return l},calcValueByPos:function(n){var a=this.reverse?-1:1,o=a*(n-this.getSliderStart()),r=this.trimAlignValue(this.calcValue(o));return r},calcOffset:function(n){var a=this.min,o=this.max,r=(n-a)/(o-a);return Math.max(0,r*100)},saveSlider:function(n){this.sliderRef=n},saveHandle:function(n,a){this.handlesRefs[n]=a}},render:function(){var n,a=this.prefixCls,o=this.marks,r=this.dots,s=this.step,l=this.included,u=this.disabled,c=this.vertical,h=this.reverse,f=this.min,p=this.max,w=this.maximumTrackStyle,M=this.railStyle,_=this.dotStyle,T=this.activeDotStyle,y=this.id,S=this.$attrs,C=S.class,d=S.style,m=this.renderSlider(),x=m.tracks,b=m.handles,V=G(a,C,(n={},B(n,"".concat(a,"-with-marks"),Object.keys(o).length),B(n,"".concat(a,"-disabled"),u),B(n,"".concat(a,"-vertical"),c),n)),P={vertical:c,marks:o,included:l,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:p,min:f,reverse:h,class:"".concat(a,"-mark"),onClickLabel:u?ae:this.onClickMarkLabel},v=B({},ne?"onTouchstartPassive":"onTouchstart",u?ae:this.onTouchStart);return k("div",g(g({id:y,ref:this.saveSlider,tabindex:"-1",class:V},v),{},{onMousedown:u?ae:this.onMouseDown,onMouseup:u?ae:this.onMouseUp,onKeydown:u?ae:this.onKeyDown,onFocus:u?ae:this.onFocus,onBlur:u?ae:this.onBlur,style:d}),[k("div",{class:"".concat(a,"-rail"),style:g(g({},w),M)},null),x,k(mn,{prefixCls:a,vertical:c,reverse:h,marks:o,dots:r,step:s,included:l,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:p,min:f,dotStyle:_,activeDotStyle:T},null),b,k(gn,P,{mark:this.$slots.mark}),Kt(this)])}})}var ga=j({compatConfig:{MODE:3},name:"Slider",mixins:[Fe],inheritAttrs:!1,props:{defaultValue:Number,value:Number,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},tabindex:O.oneOfType([O.number,O.string]),reverse:{type:Boolean,default:void 0},min:Number,max:Number,ariaLabelForHandle:String,ariaLabelledByForHandle:String,ariaValueTextFormatterForHandle:String,startPoint:Number},emits:["beforeChange","afterChange","change"],data:function(){var e=this.defaultValue!==void 0?this.defaultValue:this.min,t=this.value!==void 0?this.value:e;return{sValue:this.trimAlignValue(t),dragging:!1}},watch:{value:{handler:function(e){this.setChangeValue(e)},deep:!0},min:function(){var e=this.sValue;this.setChangeValue(e)},max:function(){var e=this.sValue;this.setChangeValue(e)}},methods:{setChangeValue:function(e){var t=e!==void 0?e:this.sValue,n=this.trimAlignValue(t,this.$props);n!==this.sValue&&(this.setState({sValue:n}),bn(t,this.$props)&&this.$emit("change",n))},onChange:function(e){var t=!_e(this,"value"),n=e.sValue>this.max?g(g({},e),{},{sValue:this.max}):e;t&&this.setState(n);var a=n.sValue;this.$emit("change",a)},onStart:function(e){this.setState({dragging:!0});var t=this.sValue;this.$emit("beforeChange",t);var n=this.calcValueByPos(e);this.startValue=n,this.startPosition=e,n!==t&&(this.prevMovedHandleIndex=0,this.onChange({sValue:n}))},onEnd:function(e){var t=this.dragging;this.removeDocumentEvents(),(t||e)&&this.$emit("afterChange",this.sValue),this.setState({dragging:!1})},onMove:function(e,t){ce(e);var n=this.sValue,a=this.calcValueByPos(t);a!==n&&this.onChange({sValue:a})},onKeyboard:function(e){var t=this.$props,n=t.reverse,a=t.vertical,o=xn(e,a,n);if(o){ce(e);var r=this.sValue,s=o(r,this.$props),l=this.trimAlignValue(s);if(l===r)return;this.onChange({sValue:l}),this.$emit("afterChange",l),this.onEnd()}},getLowerBound:function(){var e=this.$props.startPoint||this.$props.min;return this.$data.sValue>e?e:this.$data.sValue},getUpperBound:function(){return this.$data.sValue1&&arguments[1]!==void 0?arguments[1]:{};if(e===null)return null;var n=g(g({},this.$props),t),a=rt(e,n);return Cn(a,n)},getTrack:function(e){var t=e.prefixCls,n=e.reverse,a=e.vertical,o=e.included,r=e.minimumTrackStyle,s=e.mergedTrackStyle,l=e.length,u=e.offset;return k(ot,{class:"".concat(t,"-track"),vertical:a,included:o,offset:u,reverse:n,length:l,style:g(g({},r),s)},null)},renderSlider:function(){var e=this,t=this.prefixCls,n=this.vertical,a=this.included,o=this.disabled,r=this.minimumTrackStyle,s=this.trackStyle,l=this.handleStyle,u=this.tabindex,c=this.ariaLabelForHandle,h=this.ariaLabelledByForHandle,f=this.ariaValueTextFormatterForHandle,p=this.min,w=this.max,M=this.startPoint,_=this.reverse,T=this.handle,y=this.defaultHandle,S=T||y,C=this.sValue,d=this.dragging,m=this.calcOffset(C),x=S({class:"".concat(t,"-handle"),prefixCls:t,vertical:n,offset:m,value:C,dragging:d,disabled:o,min:p,max:w,reverse:_,index:0,tabindex:u,ariaLabel:c,ariaLabelledBy:h,ariaValueTextFormatter:f,style:l[0]||l,ref:function(v){return e.saveHandle(0,v)},onFocus:this.onFocus,onBlur:this.onBlur}),b=M!==void 0?this.calcOffset(M):0,V=s[0]||s;return{tracks:this.getTrack({prefixCls:t,reverse:_,vertical:n,included:a,offset:b,minimumTrackStyle:r,mergedTrackStyle:V,length:m-b}),handles:x}}}});const ya=Pn(ga);var he=function(e){var t=e.value,n=e.handle,a=e.bounds,o=e.props,r=o.allowCross,s=o.pushable,l=Number(s),u=rt(t,o),c=u;return!r&&n!=null&&a!==void 0&&(n>0&&u<=a[n-1]+l&&(c=a[n-1]+l),n=a[n+1]-l&&(c=a[n+1]-l)),Cn(c,o)},ba={defaultValue:O.arrayOf(O.number),value:O.arrayOf(O.number),count:Number,pushable:In(O.oneOfType([O.looseBool,O.number])),allowCross:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},reverse:{type:Boolean,default:void 0},tabindex:O.arrayOf(O.number),prefixCls:String,min:Number,max:Number,autofocus:{type:Boolean,default:void 0},ariaLabelGroupForHandles:Array,ariaLabelledByGroupForHandles:Array,ariaValueTextFormatterGroupForHandles:Array,draggableTrack:{type:Boolean,default:void 0}},wa=j({compatConfig:{MODE:3},name:"Range",mixins:[Fe],inheritAttrs:!1,props:Qe(ba,{count:1,allowCross:!0,pushable:!1,tabindex:[],draggableTrack:!1,ariaLabelGroupForHandles:[],ariaLabelledByGroupForHandles:[],ariaValueTextFormatterGroupForHandles:[]}),emits:["beforeChange","afterChange","change"],displayName:"Range",data:function(){var e=this,t=this.count,n=this.min,a=this.max,o=Array.apply(void 0,q(Array(t+1))).map(function(){return n}),r=_e(this,"defaultValue")?this.defaultValue:o,s=this.value;s===void 0&&(s=r);var l=s.map(function(c,h){return he({value:c,handle:h,props:e.$props})}),u=l[0]===a?0:l.length-1;return{sHandle:null,recent:u,bounds:l}},watch:{value:{handler:function(e){var t=this.bounds;this.setChangeValue(e||t)},deep:!0},min:function(){var e=this.value;this.setChangeValue(e||this.bounds)},max:function(){var e=this.value;this.setChangeValue(e||this.bounds)}},methods:{setChangeValue:function(e){var t=this,n=this.bounds,a=e.map(function(r,s){return he({value:r,handle:s,bounds:n,props:t.$props})});if(n.length===a.length){if(a.every(function(r,s){return r===n[s]}))return null}else a=e.map(function(r,s){return he({value:r,handle:s,props:t.$props})});if(this.setState({bounds:a}),e.some(function(r){return bn(r,t.$props)})){var o=e.map(function(r){return rt(r,t.$props)});this.$emit("change",o)}},onChange:function(e){var t=!_e(this,"value");if(t)this.setState(e);else{var n={};["sHandle","recent"].forEach(function(r){e[r]!==void 0&&(n[r]=e[r])}),Object.keys(n).length&&this.setState(n)}var a=g(g({},this.$data),e),o=a.bounds;this.$emit("change",o)},positionGetValue:function(e){var t=this.getValue(),n=this.calcValueByPos(e),a=this.getClosestBound(n),o=this.getBoundNeedMoving(n,a),r=t[o];if(n===r)return null;var s=q(t);return s[o]=n,s},onStart:function(e){var t=this.bounds;this.$emit("beforeChange",t);var n=this.calcValueByPos(e);this.startValue=n,this.startPosition=e;var a=this.getClosestBound(n);this.prevMovedHandleIndex=this.getBoundNeedMoving(n,a),this.setState({sHandle:this.prevMovedHandleIndex,recent:this.prevMovedHandleIndex});var o=t[this.prevMovedHandleIndex];if(n!==o){var r=q(t);r[this.prevMovedHandleIndex]=n,this.onChange({bounds:r})}},onEnd:function(e){var t=this.sHandle;this.removeDocumentEvents(),t||(this.dragTrack=!1),(t!==null||e)&&this.$emit("afterChange",this.bounds),this.setState({sHandle:null})},onMove:function(e,t,n,a){ce(e);var o=this.$data,r=this.$props,s=r.max||100,l=r.min||0;if(n){var u=r.vertical?-t:t;u=r.reverse?-u:u;var c=s-Math.max.apply(Math,q(a)),h=l-Math.min.apply(Math,q(a)),f=Math.min(Math.max(u/(this.getSliderLength()/100),h),c),p=a.map(function(y){return Math.floor(Math.max(Math.min(y+f,s),l))});o.bounds.map(function(y,S){return y===p[S]}).some(function(y){return!y})&&this.onChange({bounds:p});return}var w=this.bounds,M=this.sHandle,_=this.calcValueByPos(t),T=w[M];_!==T&&this.moveTo(_)},onKeyboard:function(e){var t=this.$props,n=t.reverse,a=t.vertical,o=xn(e,a,n);if(o){ce(e);var r=this.bounds,s=this.sHandle,l=r[s===null?this.recent:s],u=o(l,this.$props),c=he({value:u,handle:s,bounds:r,props:this.$props});if(c===l)return;var h=!0;this.moveTo(c,h)}},getClosestBound:function(e){for(var t=this.bounds,n=0,a=1;a=t[a]&&(n=a);return Math.abs(t[n+1]-e)=a.length||r<0)return!1;var s=t+n,l=a[r],u=this.pushable,c=Number(u),h=n*(e[s]-l);return this.pushHandle(e,s,n,c-h)?(e[t]=l,!0):!1},trimAlignValue:function(e){var t=this.sHandle,n=this.bounds;return he({value:e,handle:t,bounds:n,props:this.$props})},ensureValueNotConflict:function(e,t,n){var a=n.allowCross,o=n.pushable,r=this.$data||{},s=r.bounds;if(e=e===void 0?r.sHandle:e,o=Number(o),!a&&e!=null&&s!==void 0){if(e>0&&t<=s[e-1]+o)return s[e-1]+o;if(e=s[e+1]-o)return s[e+1]-o}return t},getTrack:function(e){var t=e.bounds,n=e.prefixCls,a=e.reverse,o=e.vertical,r=e.included,s=e.offsets,l=e.trackStyle;return t.slice(0,-1).map(function(u,c){var h,f=c+1,p=G((h={},B(h,"".concat(n,"-track"),!0),B(h,"".concat(n,"-track-").concat(f),!0),h));return k(ot,{class:p,vertical:o,reverse:a,included:r,offset:s[f-1],length:s[f]-s[f-1],style:l[c],key:f},null)})},renderSlider:function(){var e=this,t=this.sHandle,n=this.bounds,a=this.prefixCls,o=this.vertical,r=this.included,s=this.disabled,l=this.min,u=this.max,c=this.reverse,h=this.handle,f=this.defaultHandle,p=this.trackStyle,w=this.handleStyle,M=this.tabindex,_=this.ariaLabelGroupForHandles,T=this.ariaLabelledByGroupForHandles,y=this.ariaValueTextFormatterGroupForHandles,S=h||f,C=n.map(function(x){return e.calcOffset(x)}),d="".concat(a,"-handle"),m=n.map(function(x,b){var V,P=M[b]||0;(s||M[b]===null)&&(P=null);var v=t===b;return S({class:G((V={},B(V,d,!0),B(V,"".concat(d,"-").concat(b+1),!0),B(V,"".concat(d,"-dragging"),v),V)),prefixCls:a,vertical:o,dragging:v,offset:C[b],value:x,index:b,tabindex:P,min:l,max:u,reverse:c,disabled:s,style:w[b],ref:function(N){return e.saveHandle(b,N)},onFocus:e.onFocus,onBlur:e.onBlur,ariaLabel:_[b],ariaLabelledBy:T[b],ariaValueTextFormatter:y[b]})});return{tracks:this.getTrack({bounds:n,prefixCls:a,reverse:c,vertical:o,included:r,offsets:C,trackStyle:p}),handles:m}}}});const Ca=Pn(wa),xa=j({compatConfig:{MODE:3},name:"SliderTooltip",inheritAttrs:!1,props:hn(),setup:function(e,t){var n=t.attrs,a=t.slots,o=D(null),r=D(null);function s(){J.cancel(r.value),r.value=null}function l(){r.value=J(function(){var c;(c=o.value)===null||c===void 0||c.forcePopupAlign(),r.value=null})}var u=function(){s(),e.visible&&l()};return z([function(){return e.visible},function(){return e.title}],function(){u()},{flush:"post",immediate:!0}),Wn(function(){u()}),Ne(function(){s()}),function(){return k(va,g(g({ref:o},e),n),a)}}});var Pa=["value","dragging","index"],Ta=["tooltipPrefixCls","range","id"],Sa=function(e){return typeof e=="number"?e.toString():""},Ma=function(){return{id:String,prefixCls:String,tooltipPrefixCls:String,range:{type:[Boolean,Object],default:void 0},reverse:{type:Boolean,default:void 0},min:Number,max:Number,step:{type:[Number,Object]},marks:{type:Object},dots:{type:Boolean,default:void 0},value:{type:[Number,Array]},defaultValue:{type:[Number,Array]},included:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},vertical:{type:Boolean,default:void 0},tipFormatter:{type:[Function,Object],default:function(){return Sa}},tooltipVisible:{type:Boolean,default:void 0},tooltipPlacement:{type:String},getTooltipPopupContainer:{type:Function},autofocus:{type:Boolean,default:void 0},handleStyle:{type:[Object,Array]},trackStyle:{type:[Object,Array]},onChange:{type:Function},onAfterChange:{type:Function},onFocus:{type:Function},onBlur:{type:Function},"onUpdate:value":{type:Function}}},Oa=j({compatConfig:{MODE:3},name:"ASlider",inheritAttrs:!1,props:Ma(),slots:["mark"],setup:function(e,t){var n=t.attrs,a=t.slots,o=t.emit,r=t.expose,s=Zt("slider",e),l=s.prefixCls,u=s.rootPrefixCls,c=s.direction,h=s.getPopupContainer,f=s.configProvider,p=ti(),w=D(),M=D({}),_=function(b,V){M.value[b]=V},T=L(function(){return e.tooltipPlacement?e.tooltipPlacement:e.vertical?c.value==="rtl"?"left":"right":"top"}),y=function(){var b;(b=w.value)===null||b===void 0||b.focus()},S=function(){var b;(b=w.value)===null||b===void 0||b.blur()},C=function(b){o("update:value",b),o("change",b),p.onFieldChange()},d=function(b){o("blur",b)};r({focus:y,blur:S});var m=function(b){var V=b.tooltipPrefixCls,P=b.info,v=P.value,$=P.dragging,N=P.index,H=$e(P,Pa),R=e.tipFormatter,F=e.tooltipVisible,U=e.getTooltipPopupContainer,re=R?M.value[N]||$:!1,de=F||F===void 0&&re;return k(xa,{prefixCls:V,title:R?R(v):"",visible:de,placement:T.value,transitionName:"".concat(u.value,"-zoom-down"),key:N,overlayClassName:"".concat(l.value,"-tooltip"),getPopupContainer:U||h.value},{default:function(){return[k(yn,g(g({},H),{},{value:v,onMouseenter:function(){return _(N,!0)},onMouseleave:function(){return _(N,!1)}}),null)]}})};return function(){var x=e.tooltipPrefixCls,b=e.range,V=e.id,P=V===void 0?p.id.value:V,v=$e(e,Ta),$=f.getPrefixCls("tooltip",x),N=G(n.class,B({},"".concat(l.value,"-rtl"),c.value==="rtl"));c.value==="rtl"&&!v.vertical&&(v.reverse=!v.reverse);var H;return fe(b)==="object"&&(H=b.draggableTrack),b?k(Ca,g(g({},v),{},{step:v.step,draggableTrack:H,class:N,ref:w,handle:function(F){return m({tooltipPrefixCls:$,prefixCls:l.value,info:F})},prefixCls:l.value,onChange:C,onBlur:d}),{mark:a.mark}):k(ya,g(g({},v),{},{id:P,step:v.step,class:N,ref:w,handle:function(F){return m({tooltipPrefixCls:$,prefixCls:l.value,info:F})},prefixCls:l.value,onChange:C,onBlur:d}),{mark:a.mark})}}});const ka=Jt(Oa),Va=["aria-expanded"],_a={class:"dd__title"},$a={class:"dd__chevron","aria-hidden":"true"},Aa=["inert"],Da={class:"dd__clip"},Ba={class:"dd__body"},Na=j({__name:"DropDown",props:{text:{},defaultOpen:{type:Boolean,default:!1}},setup(i){const t=D(i.defaultOpen);return(n,a)=>(I(),W("div",{class:le(["dd",{"is-open":t.value}])},[E("button",{type:"button",class:"dd__head","aria-expanded":t.value,onClick:a[0]||(a[0]=o=>t.value=!t.value)},[E("h3",_a,[ft(n.$slots,"text",{},()=>[ge(oe(i.text),1)],!0)]),E("span",$a,[k(Ae,{icon:"vuesax-linear:arrow-down",size:"16"})])],8,Va),E("div",{class:"dd__panel",inert:!t.value},[E("div",Da,[E("div",Ba,[ft(n.$slots,"default",{},void 0,!0)])])],8,Aa)],2))}}),Ut=en(Na,[["__scopeId","data-v-7988b636"]]),Ea={class:"fSheet__headRow"},Fa={id:"fSheet-title",class:"fSheet__title"},Ha={key:0,class:"fSheet__count"},Ra={class:"fSheet__body"},La={key:0,class:"fSheet__chips"},ja=["aria-pressed","onClick"],Ia={key:1,class:"fSheet__empty"},Wa={class:"fSheet__gram"},za={class:"fSheet__gramFigures"},Ua={class:"fSheet__gramFigure"},Xa={class:"fSheet__gramFigure"},Ya=90,Ga=.5,Ka=j({__name:"Filters",props:{show:{type:Boolean},modelValue:{},filterKeys:{},products:{}},emits:["update:show","update:filterKeys"],setup(i,{emit:e}){const t=i,n=e,a=L(()=>{const P=new Map;for(const v of t.products)v.brand&&P.set(v.brand.id,v.brand);return[...P.values()]}),o=L(()=>{const P=t.products.flatMap(v=>v.variants.map($=>parseFloat($.rashWeightGrams)));return P.length===0?[0,100]:[Math.floor(Math.min(...P)),Math.ceil(Math.max(...P))]}),r=D([]),s=D([...o.value]);let l=!1;function u(){r.value=[...t.modelValue.brands];const P=t.modelValue.limit_gram;l=P.length===2,s.value=P.length===2?[P[0],P[1]]:[...o.value]}z(()=>t.show,P=>{P&&u()},{immediate:!0}),z(o,P=>{l||(s.value=[...P])});function c(P){Array.isArray(P)&&(s.value=[P[0],P[1]],l=!0)}const h=L(()=>{const[P,v]=s.value,[$,N]=o.value;return Math.abs(P-$)>.001||Math.abs(v-N)>.001}),f=L(()=>r.value.length+(h.value?1:0));function p(P){const v=r.value.indexOf(P);r.value=v===-1?[...r.value,P]:r.value.filter($=>$!==P)}function w(P){return P%1===0?String(P):String(+P.toFixed(2))}function M(){const P=t.modelValue;P.brands=[...r.value],P.limit_gram=h.value?[...s.value]:[];const v=[];P.brands.length&&v.push("brands"),P.limit_gram.length&&v.push("limit_gram"),n("update:filterKeys",v),T()}function _(){r.value=[],s.value=[...o.value],l=!1,M()}function T(){n("update:show",!1)}const y=D(0),S=D(!1);let C=0,d=0;const m=L(()=>y.value?{transform:`translate3d(0, ${y.value}px, 0)`}:void 0);function x(P){P.target.closest("button")||(C=P.touches[0].clientY,d=Date.now(),S.value=!0)}function b(P){if(!S.value)return;const v=P.touches[0].clientY-C;y.value=v>0?v:v*.12}function V(){if(!S.value)return;S.value=!1;const P=y.value/Math.max(1,Date.now()-d);y.value>Ya||y.value>30&&P>Ga?T():y.value=0}return(P,v)=>(I(),tn(te(zn),{show:i.show,position:"bottom",teleport:"body",transition:"fSheet-slide",class:"fSheet","overlay-class":"fSheet__overlay","close-on-popstate":"","onUpdate:show":v[0]||(v[0]=$=>n("update:show",$)),onClosed:v[1]||(v[1]=$=>y.value=0)},{default:K(()=>[E("div",{class:le(["fSheet__card",{"is-dragging":S.value}]),style:Un(m.value),dir:"rtl",role:"dialog","aria-modal":"true","aria-labelledby":"fSheet-title"},[E("header",{class:"fSheet__head",onTouchstartPassive:x,onTouchmovePassive:b,onTouchend:V,onTouchcancel:V},[v[3]||(v[3]=E("span",{class:"fSheet__grip","aria-hidden":"true"},null,-1)),E("div",Ea,[E("h3",Fa,[v[2]||(v[2]=ge(" فیلترها ",-1)),f.value?(I(),W("span",Ha,oe(f.value),1)):Oe("",!0)]),E("button",{type:"button",class:"fSheet__close","aria-label":"بستن",onClick:T},[k(Ae,{icon:"vuesax-linear:add",size:"18"})])])],32),E("div",Ra,[k(Ut,{text:"برند","default-open":""},{default:K(()=>[a.value.length?(I(),W("div",La,[(I(!0),W(Ve,null,Ue(a.value,$=>(I(),W("button",{key:$.id,type:"button",class:le(["fSheet__chip",{"is-on":r.value.includes($.id)}]),"aria-pressed":r.value.includes($.id),onClick:N=>p($.id)},oe($.title),11,ja))),128))])):(I(),W("p",Ia,"برندی برای فیلتر موجود نیست."))]),_:1}),k(Ut,{text:"وزن (گرم)","default-open":""},{default:K(()=>[E("div",Wa,[k(te(ka),{value:s.value,step:.01,range:"",reverse:"",min:o.value[0],max:o.value[1],"tooltip-visible":!1,"onUpdate:value":c},null,8,["value","min","max"]),E("div",za,[E("span",Ua,[v[4]||(v[4]=E("i",null,"کمترین",-1)),E("b",null,oe(w(s.value[0])),1),v[5]||(v[5]=ge(" گرم ",-1))]),E("span",Xa,[v[6]||(v[6]=E("i",null,"بیشترین",-1)),E("b",null,oe(w(s.value[1])),1),v[7]||(v[7]=ge(" گرم ",-1))])])])]),_:1})]),E("footer",{class:"fSheet__bar"},[E("button",{type:"button",class:"fSheet__clear",onClick:_},"پاک کردن"),E("button",{type:"button",class:"fSheet__apply",onClick:M},"اعمال فیلتر")])],6)]),_:1},8,["show"]))}}),qa={class:"search"},Za={class:"search__barExtra"},Qa={class:"search__chips no-scrollbar"},Ja=["onClick"],eo={key:0,class:"search__grid"},to={key:2,class:"search__empty"},We=20,no=j({__name:"SearchView",setup(i){const e=Xn(),t=D(!1),n=D(!1),a=D([]),o=D(!1),r=D([]),s=L(()=>{const C=new Map;for(const d of a.value)d.category&&C.set(d.category.id,d.category);return[...C.values()]}),l=L(()=>{let C=a.value;const d=e.query;return d.text&&(C=C.filter(m=>m.title.includes(d.text))),d.cats&&d.cats.length>0&&(C=C.filter(m=>m.category&&d.cats.includes(m.category.id))),d.brands.length>0&&(C=C.filter(m=>m.brand&&d.brands.includes(m.brand.id))),d.limit_gram.length===2&&(C=C.filter(m=>m.variants.some(x=>parseFloat(x.rashWeightGrams)>=d.limit_gram[0]&&parseFloat(x.rashWeightGrams)<=d.limit_gram[1]))),C}),u=D(We),c=L(()=>l.value.slice(0,u.value)),h=L(()=>u.value{C.some(d=>d.isIntersecting)&&h.value&&(u.value+=We)},{rootMargin:"400px"}),p.observe(f.value))}z(l,()=>{u.value=We}),z(f,w),Ne(()=>p==null?void 0:p.disconnect());async function M(){t.value=!0;try{a.value=await Yn.listProducts()}finally{t.value=!1}}async function _(){await M(),n.value=!1}function T(C){e.query.text=C}function y(C){e.query.cats=C?[C]:void 0}function S(){o.value=!0}return be(M),(C,d)=>{const m=vt("Loading"),x=vt("container");return I(),W("div",qa,[k(Gn,{title:"جستجو"},{below:K(()=>[E("div",Za,[k(Kn,{onSearch:T,"place-holder":"جستجوی دسته بندی، محصولات و ..."}),E("div",Qa,[E("button",{type:"button",class:le(["search__chip search__chip--filter",{"is-on":r.value.length>0}]),onClick:S},[k(Ae,{icon:"vuesax-linear:filter",size:"15"}),ge(" "+oe(r.value.length>0?`${r.value.length} فیلتر`:"فیلتر"),1)],2),E("button",{type:"button",class:le(["search__chip",{"is-on":!te(e).query.cats}]),onClick:d[0]||(d[0]=b=>y(void 0))}," همه ",2),(I(!0),W(Ve,null,Ue(s.value,b=>(I(),W("button",{key:b.id,type:"button",class:le(["search__chip",{"is-on":te(e).query.cats&&te(e).query.cats[0]===b.id}]),onClick:V=>y(b.id)},oe(b.title),11,Ja))),128))])])]),_:1}),k(dt,{spinning:t.value,tip:"درحال دریافت اطلاعات"},{default:K(()=>[k(te(ii),{modelValue:n.value,"onUpdate:modelValue":d[1]||(d[1]=b=>n.value=b),onRefresh:_},{pulling:K(()=>[k(m,{size:"18"})]),loosing:K(()=>[k(m,{size:"18"})]),loading:K(()=>[k(m,{size:"18"})]),success:K(()=>[...d[5]||(d[5]=[E("span",null,null,-1)])]),default:K(()=>[k(x,{class:"search__body"},{default:K(()=>[l.value.length?(I(),W("div",eo,[(I(!0),W(Ve,null,Ue(c.value,b=>(I(),tn(ni,{key:b.id,value:b},null,8,["value"]))),128))])):Oe("",!0),h.value?(I(),W("div",{key:1,ref_key:"sentinel",ref:f,class:"search__more"},[k(dt,{spinning:!0,indicator:!0,fixed:!1,tip:"",cls:"my-[10px]"})],512)):Oe("",!0),!l.value.length&&!t.value?(I(),W("section",to,[k(Ae,{icon:"vuesax-linear:search-normal-1",size:"26"}),d[6]||(d[6]=E("p",null,"محصولی با این مشخصات پیدا نشد.",-1))])):Oe("",!0)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["spinning"]),k(Ka,{show:o.value,"onUpdate:show":d[2]||(d[2]=b=>o.value=b),filterKeys:r.value,"onUpdate:filterKeys":d[3]||(d[3]=b=>r.value=b),modelValue:te(e).query,"onUpdate:modelValue":d[4]||(d[4]=b=>te(e).query=b),products:a.value},null,8,["show","filterKeys","modelValue","products"])])}}}),po=en(no,[["__scopeId","data-v-036a6a0e"]]);export{po as default}; diff --git a/apps/user-app-v2/dist/assets/SearchView-CS1oUiFo.css b/apps/user-app-v2/dist/assets/SearchView-CS1oUiFo.css new file mode 100644 index 0000000..50f854e --- /dev/null +++ b/apps/user-app-v2/dist/assets/SearchView-CS1oUiFo.css @@ -0,0 +1 @@ +.dd__head[data-v-7988b636]{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;border:0;cursor:pointer;background:none;font-family:inherit;text-align:start;-webkit-tap-highlight-color:transparent}.dd__title[data-v-7988b636]{margin:0}.dd__chevron[data-v-7988b636]{flex:0 0 auto;display:grid;place-items:center;transition:transform .34s cubic-bezier(.32,.72,0,1),color .2s ease,background-color .2s ease}.dd.is-open .dd__chevron[data-v-7988b636]{transform:rotate(180deg)}.dd__panel[data-v-7988b636]{display:grid;grid-template-rows:0fr;transition:grid-template-rows .34s cubic-bezier(.32,.72,0,1)}.dd.is-open .dd__panel[data-v-7988b636]{grid-template-rows:1fr}.dd__clip[data-v-7988b636]{min-height:0;overflow:hidden}.dd__body[data-v-7988b636]{opacity:0;transform:translateY(-6px);transition:opacity .18s ease,transform .34s cubic-bezier(.32,.72,0,1)}.dd.is-open .dd__body[data-v-7988b636]{opacity:1;transform:none;transition:opacity .24s ease .06s,transform .34s cubic-bezier(.32,.72,0,1)}@media (prefers-reduced-motion: reduce){.dd__panel[data-v-7988b636],.dd__body[data-v-7988b636],.dd__chevron[data-v-7988b636]{transition:none!important}}.dd[data-v-7988b636]{border-radius:22px;background:var(--c-hairlineSoft)}.dd__head[data-v-7988b636]{padding:14px 16px}.dd__title[data-v-7988b636]{font-size:14px;font-weight:700;color:var(--c-ink)}.dd__chevron[data-v-7988b636]{width:28px;height:28px;border-radius:9px;color:var(--c-inkMuted);background:var(--c-canvas)}.dd.is-open .dd__chevron[data-v-7988b636]{color:var(--c-onInk);background:var(--c-ink)}.dd__body[data-v-7988b636]{padding:0 16px 16px}.fSheet__overlay{background:#14161a6b}.fSheet.van-popup{background:transparent;overflow:visible}.fSheet-slide-enter-active,.fSheet-slide-leave-active{will-change:transform}.fSheet-slide-enter-active{transition:transform .42s cubic-bezier(.32,.72,0,1)}.fSheet-slide-leave-active{transition:transform .24s cubic-bezier(.4,0,1,1)}.fSheet-slide-enter-from,.fSheet-slide-leave-to{transform:translate3d(0,100%,0)}.fSheet__card{position:relative;max-width:768px;margin:0 auto;max-height:88vh;max-height:88dvh;display:flex;flex-direction:column;overflow:hidden;transition:transform .38s cubic-bezier(.22,1,.36,1)}.fSheet__card.is-dragging{transition:none}.fSheet__head{flex:none;touch-action:none}.fSheet__grip{display:block;margin:0 auto}.fSheet__headRow{display:flex;align-items:center;justify-content:space-between;gap:12px}.fSheet__title{display:flex;align-items:center;gap:8px;margin:0}.fSheet__count{min-width:20px;height:20px;padding:0 6px;display:inline-grid;place-items:center;border-radius:999px;font-size:11px;font-weight:800;color:#fff}.fSheet__close{display:grid;place-items:center;border:0;cursor:pointer;transform:rotate(45deg);transition:transform .15s ease}.fSheet__close:active{transform:rotate(45deg) scale(.92)}.fSheet__body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;display:flex;flex-direction:column}.fSheet__chips{display:flex;flex-wrap:wrap;gap:8px}.fSheet__chip{cursor:pointer;font-family:inherit;white-space:nowrap;-webkit-tap-highlight-color:transparent;transition:color .18s ease,background-color .18s ease,border-color .18s ease,transform .15s ease}.fSheet__chip:active{transform:scale(.96)}.fSheet__empty{margin:0;font-size:12px;color:var(--c-inkFaint)}.fSheet__gramFigures{display:flex;align-items:center;justify-content:space-between;gap:10px}.fSheet__gramFigure i{font-style:normal}.fSheet__bar{flex:none;display:flex;align-items:center;gap:10px;padding-bottom:calc(12px + env(safe-area-inset-bottom,0px))}.fSheet__clear,.fSheet__apply{cursor:pointer;font-family:inherit;white-space:nowrap;transition:transform .15s ease}.fSheet__clear:active,.fSheet__apply:active{transform:scale(.98)}.fSheet__card{border-radius:32px 32px 0 0;background:var(--c-canvas);box-shadow:0 -18px 40px -30px #14161a8c}.fSheet__head{padding:8px 18px 12px}.fSheet__grip{width:38px;height:4px;margin-bottom:12px;border-radius:999px;background:var(--c-hairline)}.fSheet__title{font-size:16px;font-weight:700;color:var(--c-ink)}.fSheet__count{background:var(--c-wine)}.fSheet__close{width:38px;height:38px;border-radius:12px;color:var(--c-ink);background:var(--c-hairlineSoft)}.fSheet__body{gap:10px;padding:2px 16px 16px}.fSheet__chip{height:34px;padding:0 14px;border-radius:999px;font-size:12.5px;font-weight:700;color:var(--c-inkMuted);background:var(--c-canvas);border:1px solid var(--c-hairline)}.fSheet__chip.is-on{color:var(--c-onInk);background:var(--c-ink);border-color:var(--c-ink)}.fSheet__gram{padding:2px 4px 0}.fSheet__gram .ant-slider-rail{background-color:var(--c-hairlineStrong)}.fSheet__gram .ant-slider-track{background-color:var(--c-wine)}.fSheet__gram .ant-slider-handle{border-color:var(--c-wine)}.fSheet__gramFigures{padding-top:12px}.fSheet__gramFigure{flex:1;display:flex;align-items:baseline;justify-content:center;gap:5px;padding:9px 12px;border-radius:13px;background:var(--c-canvas);font-size:11px;color:var(--c-inkFaint)}.fSheet__gramFigure i{font-size:10.5px;font-weight:500}.fSheet__gramFigure b{font-size:14px;font-weight:800;color:var(--c-ink);direction:ltr}.fSheet__bar{padding:12px 16px;padding-bottom:calc(12px + env(safe-area-inset-bottom,0px));background:var(--c-canvas);border-top:1px solid var(--c-hairline)}.fSheet__clear,.fSheet__apply{height:48px;border-radius:999px;font-size:13.5px;font-weight:800}.fSheet__clear{flex:0 0 auto;padding:0 22px;color:var(--c-ink);background:var(--c-canvas);border:1px solid var(--c-hairline)}.fSheet__apply{flex:1;border:0;color:var(--c-onInk);background:var(--c-ink);box-shadow:0 14px 30px -18px #14161ae6}.search[data-v-036a6a0e]{background:var(--c-page);min-height:100vh}.search__barExtra[data-v-036a6a0e]{max-width:768px;margin:0 auto;padding:0 16px}.search__chips[data-v-036a6a0e]{display:flex;gap:8px;overflow-x:auto;margin:12px 0 10px -16px;scroll-snap-type:x proximity}.search__chips[data-v-036a6a0e]:before,.search__chips[data-v-036a6a0e]:after{content:"";flex:0 0 16px}.search__chip[data-v-036a6a0e]{scroll-snap-align:start;flex:0 0 auto;display:inline-flex;align-items:center;gap:6px;height:40px;padding:0 18px;border-radius:999px;cursor:pointer;font-family:inherit;font-size:12.5px;font-weight:600;white-space:nowrap;color:var(--c-inkSoft);background:var(--c-canvas);border:1px solid var(--c-hairline);transition:all .2s ease}.search__chip.is-on[data-v-036a6a0e]{color:var(--c-onInk);background:var(--c-ink);border-color:var(--c-ink)}.search__chip--filter.is-on[data-v-036a6a0e]{background:var(--c-wine);border-color:var(--c-wine)}.search__chip[data-v-036a6a0e]:active{transform:scale(.97)}.search__body[data-v-036a6a0e]{padding-top:176px;padding-bottom:90px}.search__body[data-v-036a6a0e]>*:first-child{margin-top:16px}.search__collections[data-v-036a6a0e]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-bottom:22px}.search__collection[data-v-036a6a0e]{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:13px 10px;border-radius:14px;cursor:pointer;font-family:inherit;font-size:12.5px;font-weight:700;color:var(--c-inkSoft);background:var(--c-hairlineSoft);border:1px solid var(--c-hairline);transition:all .2s ease}.search__collection[data-v-036a6a0e]:active{transform:scale(.98)}.search__grid[data-v-036a6a0e]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.search__more[data-v-036a6a0e]{display:flex;justify-content:center;padding:18px 0 4px}.search__empty[data-v-036a6a0e]{margin-top:8px;padding:34px 20px;border:1px dashed var(--c-hairline);border-radius:18px;display:flex;flex-direction:column;align-items:center;gap:10px;color:var(--c-inkFaint)}.search__empty p[data-v-036a6a0e]{margin:0;font-size:12.5px} diff --git a/apps/user-app-v2/dist/assets/SectionHead-CldEyeHO.css b/apps/user-app-v2/dist/assets/SectionHead-CldEyeHO.css deleted file mode 100644 index 0d8ab45..0000000 --- a/apps/user-app-v2/dist/assets/SectionHead-CldEyeHO.css +++ /dev/null @@ -1 +0,0 @@ -.sec[data-v-e5c65b7c]{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;padding-bottom:13px}.sec__title[data-v-e5c65b7c]{margin:0;font-size:15px;font-weight:800;color:#14161a;letter-spacing:-.1px}.sec__sub[data-v-e5c65b7c]{margin:5px 0 0;font-size:11.5px;color:#8a909c}.sec__action[data-v-e5c65b7c]{display:inline-flex;align-items:center;gap:4px;border:0;background:none;cursor:pointer;padding:0;font-family:inherit;font-size:11.5px;font-weight:700;color:#7a1b33;white-space:nowrap} diff --git a/apps/user-app-v2/dist/assets/SectionHead-CiwUIGKe.js b/apps/user-app-v2/dist/assets/SectionHead-DadL6umU.js similarity index 55% rename from apps/user-app-v2/dist/assets/SectionHead-CiwUIGKe.js rename to apps/user-app-v2/dist/assets/SectionHead-DadL6umU.js index 4ca4745..b7c3d75 100644 --- a/apps/user-app-v2/dist/assets/SectionHead-CiwUIGKe.js +++ b/apps/user-app-v2/dist/assets/SectionHead-DadL6umU.js @@ -1 +1 @@ -import{d as r,f as t,c as s,b as o,t as a,e as n,C as _,l as d,I as u,_ as b}from"./index-CZjgV-Yn.js";const m={class:"sec"},f={class:"sec__text"},x={class:"sec__title"},h={key:0,class:"sec__sub"},k=r({__name:"SectionHead",props:{title:{},subtitle:{},actionLabel:{}},emits:["action"],setup(e,{emit:i}){const l=i;return(p,c)=>(t(),s("header",m,[o("div",f,[o("h2",x,a(e.title),1),e.subtitle?(t(),s("p",h,a(e.subtitle),1)):n("",!0)]),e.actionLabel?(t(),s("button",{key:0,type:"button",class:"sec__action",onClick:c[0]||(c[0]=v=>l("action"))},[_(a(e.actionLabel)+" ",1),d(u,{icon:"vuesax-linear:arrow-left-2",size:"15"})])):n("",!0)]))}}),C=b(k,[["__scopeId","data-v-e5c65b7c"]]);export{C as S}; +import{d as r,f as t,c as s,b as o,t as a,e as n,N as _,p as d,I as u,_ as b}from"./index-BAr1mMLP.js";const m={class:"sec"},f={class:"sec__text"},x={class:"sec__title"},h={key:0,class:"sec__sub"},k=r({__name:"SectionHead",props:{title:{},subtitle:{},actionLabel:{}},emits:["action"],setup(e,{emit:i}){const l=i;return(p,c)=>(t(),s("header",m,[o("div",f,[o("h2",x,a(e.title),1),e.subtitle?(t(),s("p",h,a(e.subtitle),1)):n("",!0)]),e.actionLabel?(t(),s("button",{key:0,type:"button",class:"sec__action",onClick:c[0]||(c[0]=N=>l("action"))},[_(a(e.actionLabel)+" ",1),d(u,{icon:"vuesax-linear:arrow-left-2",size:"15"})])):n("",!0)]))}}),y=b(k,[["__scopeId","data-v-e5c65b7c"]]);export{y as S}; diff --git a/apps/user-app-v2/dist/assets/SectionHead-X7JFvmOG.css b/apps/user-app-v2/dist/assets/SectionHead-X7JFvmOG.css new file mode 100644 index 0000000..1bce719 --- /dev/null +++ b/apps/user-app-v2/dist/assets/SectionHead-X7JFvmOG.css @@ -0,0 +1 @@ +.sec[data-v-e5c65b7c]{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;padding-bottom:13px}.sec__title[data-v-e5c65b7c]{margin:0;font-size:15px;font-weight:800;color:var(--c-ink);letter-spacing:-.1px}.sec__sub[data-v-e5c65b7c]{margin:5px 0 0;font-size:11.5px;color:var(--c-inkFaint)}.sec__action[data-v-e5c65b7c]{display:inline-flex;align-items:center;gap:4px;border:0;background:none;cursor:pointer;padding:0;font-family:inherit;font-size:11.5px;font-weight:700;color:var(--c-wine);white-space:nowrap} diff --git a/apps/user-app-v2/dist/assets/SingleProduct-DS8wIDwN.js b/apps/user-app-v2/dist/assets/SingleProduct-DS8wIDwN.js deleted file mode 100644 index 03a94e9..0000000 --- a/apps/user-app-v2/dist/assets/SingleProduct-DS8wIDwN.js +++ /dev/null @@ -1 +0,0 @@ -import{d as me,ad as Re,a as be,f as l,c as o,b as t,n as qe,F as G,r as H,t as i,e as c,z as Oe,i as $,ae as _e,g as m,h as n,_ as he,m as ke,E as De,B as Fe,u as w,j as X,q as z,l as d,I as _,C as R,af as Me,X as pe,T as Ve,v as Be,s as Le}from"./index-CZjgV-Yn.js";import{a as Xe}from"./Spinner.vue_vue_type_style_index_0_lang-ghXHCVpI.js";import{_ as Ae}from"./NotifyVant.vue_vue_type_script_setup_true_lang-CY4DS_6T.js";import{_ as Ue}from"./DialogVant.vue_vue_type_style_index_0_lang-DKsdrzNc.js";import{a as Ee,u as Ne}from"./cartStore-CoSoowuC.js";import{a as je}from"./client-WIBW0tF5.js";import{l as Ge}from"./dialogEmpty1-Caw7F5KL.js";const He=["src","alt"],Qe={key:0,class:"gs__counter"},fe=.18,We=6,Je=me({__name:"GallerySlider",props:_e({slides:{},alt:{},fit:{default:"cover"},showCounter:{type:Boolean,default:!1}},{index:{default:0},indexModifiers:{}}),emits:_e(["tap"],["update:index"]),setup(v,{emit:x}){const h=v,f=Re(v,"index"),P=x,O=n(()=>h.fit==="contain"?"gs__img--contain":"gs__img--cover"),S=m(null),r=m(!1),C=m(0);let b=null,q=0,g=0;function D(a){var k;if(h.slides.length<2||b!==null)return;const y=S.value;y&&(b=a.pointerId,q=a.clientX,g=y.getBoundingClientRect().width||1,C.value=0,r.value=!0,(k=y.setPointerCapture)==null||k.call(y,a.pointerId))}function A(a){!r.value||a.pointerId!==b||(C.value=a.clientX-q)}function U(){if(!r.value)return;const a=C.value,y=a/g;r.value=!1,b=null,C.value=0,y<=-fe&&f.value=fe&&f.value>0&&f.value--,Math.abs(a)<=We&&P("tap")}function Q(a){a.pointerId===b&&U()}function p(a){a.pointerId===b&&(r.value=!1,b=null,C.value=0)}function W(){}function J(a){f.value=a}const E=n(()=>{const a=-f.value*100,y=g?C.value/g*100:0;return{transform:`translate3d(${a+y}%, 0, 0)`,transition:r.value?"none":void 0}});return be(()=>{if(b!==null&&S.value)try{S.value.releasePointerCapture(b)}catch{}}),(a,y)=>(l(),o("div",{ref_key:"root",ref:S,class:$(["gs",{"is-dragging":r.value}]),onPointerdown:D,onPointermove:A,onPointerup:Q,onPointercancel:p,onClick:W},[t("div",{class:"gs__track",style:qe(E.value)},[(l(!0),o(G,null,H(v.slides,k=>(l(),o("div",{key:k,class:"gs__cell"},[t("img",{src:k,alt:v.alt,class:$(["gs__img",O.value]),draggable:"false"},null,10,He)]))),128))],4),v.showCounter&&v.slides.length>1?(l(),o("div",Qe,i(f.value+1)+"/"+i(v.slides.length),1)):c("",!0),Oe(a.$slots,"dots",{index:f.value,go:J},void 0,!0)],34))}}),ge=he(Je,[["__scopeId","data-v-c30d71a6"]]);function Ke(v){const x=m(!1),h=m(!1),f=m(!1),P=m(null);return{loading:x,flag:h,notFound:f,productRef:P,load:async()=>{x.value=!0;try{const r=(await je.listProducts()).find(C=>C.id===v)??null;P.value=r,f.value=!r,h.value=!0}catch(S){console.log(S)}finally{x.value=!1}}}}const Ye=ke("favorites",{state:()=>({ids:[]}),actions:{toggle(v){const x=this.ids.indexOf(v);x===-1?this.ids.push(v):this.ids.splice(x,1)},isFavorite(v){return this.ids.includes(v)}}}),ye={colors:[],brands:[],ciny_id:[],limit_percent:[],limit_gram:[],has_discount:!1,text:void 0,cats:void 0,page:0},Ze=ke("filters",{state:()=>({query:{...ye}}),actions:{reset(){this.query={...ye}}}});function et(){return localStorage.getItem("appToken")}const tt={class:"pd__controls"},st={class:"pd__headerTitle"},lt={class:"pd__controlsEnd"},at={key:0,class:"pd__roundBadge"},ot={class:"pd__gallery"},nt={key:0,class:"pd__rail"},it=["aria-label","onClick"],ut={key:1,class:"pd__stage pd__stage--empty"},rt={key:2,class:"pd__expand","aria-hidden":"true"},dt={class:"pd__scroll"},ct={class:"pd__sheet"},vt={class:"pd__eyebrow"},_t={class:"pd__eyebrowText"},pt={class:"pd__head"},ft={class:"pd__headMain"},gt={class:"pd__title"},yt={key:0,class:"pd__code"},mt={class:"pd__figures"},bt={class:"pd__figure"},ht={class:"pd__figureValue"},kt={key:0,class:"pd__figure pd__figure--accent"},xt={class:"pd__figureValue"},Ct={key:0,class:"pd__chips no-scrollbar"},wt=["onClick"],Pt={key:1,class:"pd__block"},St={class:"pd__block"},Tt={class:"pd__specs"},It={class:"pd__spec"},zt={key:0,class:"pd__spec"},$t={key:1,class:"pd__spec"},Rt={key:2,class:"pd__spec"},qt={key:3,class:"pd__spec"},Ot={class:"pd__bar"},Dt={key:0,class:"pd__qty"},Ft={class:"pd__qtyValue"},Mt=["aria-label"],Vt={class:"pd__pillText"},Bt=["disabled"],Lt={key:0,class:"pd__previewCounter"},Xt={key:1,class:"pd__previewThumbs no-scrollbar"},At=["aria-label","onClick"],Ut=["src","alt"],Et=["src"],Nt=56,jt=me({__name:"SingleProduct",props:{id:{}},emits:["closeDrawer"],setup(v,{emit:x}){const h=v,f=x,P=Be(),O=Ye(),S=Ze(),r=Ee(),C=()=>{f("closeDrawer"),P.currentRoute.value.name==="singleProduct"&&P.back()},b=m(!1),q=m(!1),g=m(0),D=m(!1),A=m(null),U=m(!1);function Q(){var L;const s=A.value;if(!s)return;const e=((L=s.querySelector(".pd__gallery"))==null?void 0:L.clientHeight)??0;U.value=s.scrollTop>Math.max(e-Nt,0)}const p=Ke(h.id),W=p.loading,J=p.flag,E={id:h.id,title:"",description:null,variants:[],images:[],category:null,brand:null,collections:[]},a=n(()=>Ne(p.productRef.value??E)),y=n(()=>a.value.id.value),k=n(()=>a.value.title.value),oe=n(()=>a.value.productCode.value),K=n(()=>a.value.variants.value),V=n({get:()=>a.value.selectedVariant.value,set:s=>a.value.selectedVariant.value=s}),ne=n(()=>a.value.min_gram.value),Y=n(()=>a.value.wage.value),Z=n(()=>a.value.qty.value),ie=n(()=>a.value.isPreOrder.value),ee=n(()=>a.value.is_exist.value),te=n(()=>{var s;return((s=p.productRef.value)==null?void 0:s.description)??""}),xe=n(()=>te.value.length>120),ue=n(()=>{var s,e;return((e=(s=p.productRef.value)==null?void 0:s.category)==null?void 0:e.id)??""}),B=n(()=>{var s,e;return((e=(s=p.productRef.value)==null?void 0:s.category)==null?void 0:e.title)??""}),re=n(()=>{var s,e;return((e=(s=p.productRef.value)==null?void 0:s.brand)==null?void 0:e.title)??""}),se=n(()=>{var s;return(((s=p.productRef.value)==null?void 0:s.images.length)??0)>0}),T=n(()=>{var s;return((s=p.productRef.value)==null?void 0:s.images.map(e=>e.url))??[]});De(T,s=>{g.value>s.length-1&&(g.value=0)});const N=m(!1);function Ce(){se.value&&(N.value=!0,document.body.style.overflow="hidden")}function de(){N.value=!1,document.body.style.overflow=""}const ce=n(()=>{const s=Y.value;return s==null?"":s%1===0?String(s):s.toFixed(2)}),we=n(()=>Z.value>0?`${Z.value} عدد موجود`:ie.value?"پیش‌سفارش":"ناموجود"),Pe=n(()=>Z.value>0?"is-in":ie.value?"is-pre":"is-out"),F=n(()=>{var s,e;return{vid:((s=V.value)==null?void 0:s.id)??"",note:null,pid:((e=p.productRef.value)==null?void 0:e.id)??h.id,product:p.productRef.value??E,qty:1}}),ve=n(()=>r.isInCart(F.value)),j=n(()=>r.find_index(F.value)),M=n(()=>j.value>-1?r.items[j.value].qty:0),Se=()=>r.updateFeild(M.value+1,j.value,F.value,"qty"),Te=()=>{if(M.value<=1){r.remove(F.value);return}r.updateFeild(M.value-1,j.value,F.value,"qty")},Ie=()=>{r.addToCart(F.value),b.value=!0},ze=s=>{s.stopPropagation(),O.toggle(h.id)},$e=()=>{ue.value&&(S.query.cats=[ue.value],f("closeDrawer"),P.push({name:"search"}))};return Fe(async()=>{await p.load()}),be(()=>{N.value&&(document.body.style.overflow="")}),(s,e)=>{const L=Le("router-link");return w(J)&&w(p).productRef.value?(l(),X(Xe,{key:0,spinning:w(W),tip:"درحال دریافت اطلاعات"},{default:z(()=>[t("article",{class:"pd",ref_key:"scroller",ref:A,onScrollPassive:Q},[t("header",{class:$(["pd__header",{"is-solid":U.value}])},[t("div",tt,[t("button",{type:"button",class:"pd__round","aria-label":"بازگشت",onClick:C},[d(_,{icon:"vuesax-linear:arrow-right-1",size:"18"})]),t("h2",st,i(k.value),1),t("div",lt,[t("button",{type:"button",class:$(["pd__round",{"is-on":w(O).isFavorite(y.value)}]),"aria-label":"علاقه‌مندی",onClick:ze},[d(_,{icon:w(O).isFavorite(y.value)?"vuesax-linear:heart-fill":"vuesax-linear:heart",size:"18"},null,8,["icon"])],2),d(L,{class:"pd__round",to:{name:"cart"},"aria-label":"سبد خرید"},{default:z(()=>[d(_,{icon:"vuesax-linear:bag-2",size:"18"}),w(r).items.length?(l(),o("span",at,i(w(r).items.length),1)):c("",!0)]),_:1})])])],2),t("div",ot,[se.value?(l(),X(ge,{key:0,index:g.value,"onUpdate:index":e[0]||(e[0]=u=>g.value=u),slides:T.value,alt:k.value,class:"pd__stage",onTap:Ce},{dots:z(({index:u,go:I})=>[T.value.length>1?(l(),o("div",nt,[(l(!0),o(G,null,H(T.value,(le,ae)=>(l(),o("button",{key:le,type:"button",class:$(["pd__railDot",{"is-on":ae===u}]),"aria-label":`تصویر ${ae+1}`,onClick:pe(Ht=>I(ae),["stop"])},null,10,it))),128))])):c("",!0)]),_:1},8,["index","slides","alt"])):(l(),o("div",ut,[d(_,{icon:"vuesax-linear:diamonds",size:"27"})])),se.value?(l(),o("span",rt,[d(_,{icon:"vuesax-linear:maximize-4",size:"15"})])):c("",!0)]),t("div",dt,[t("div",ct,[e[18]||(e[18]=t("div",{class:"pd__grip","aria-hidden":"true"},null,-1)),t("div",vt,[t("span",_t,i(B.value||"محصول"),1),t("span",{class:$(["pd__stock",Pe.value])},[e[8]||(e[8]=t("span",{class:"pd__stockDot","aria-hidden":"true"},null,-1)),R(" "+i(we.value),1)],2)]),t("header",pt,[t("div",ft,[t("h1",gt,i(k.value),1),oe.value?(l(),o("p",yt,i(oe.value),1)):c("",!0)]),t("div",mt,[t("div",bt,[t("span",ht,i(ne.value),1),e[9]||(e[9]=t("span",{class:"pd__figureLabel"},"گرم",-1))]),Y.value!=null?(l(),o("div",kt,[t("span",xt,i(ce.value)+"٪",1),e[10]||(e[10]=t("span",{class:"pd__figureLabel"},"اجرت",-1))])):c("",!0)])]),K.value&&K.value.length>1?(l(),o("section",Ct,[(l(!0),o(G,null,H(K.value,u=>{var I;return l(),o("button",{key:u.id,type:"button",class:$(["pd__chip",{"is-on":((I=V.value)==null?void 0:I.id)===u.id}]),onClick:le=>V.value=u},i(u.title),11,wt)}),128))])):c("",!0),te.value?(l(),o("section",Pt,[e[11]||(e[11]=t("h2",{class:"pd__blockTitle"},"توضیحات",-1)),t("p",{class:$(["pd__body",{"is-clamped":!D.value}])},i(te.value),3),xe.value?(l(),o("button",{key:0,type:"button",class:"pd__more",onClick:e[1]||(e[1]=u=>D.value=!D.value)},i(D.value?"بستن":"ادامه مطلب"),1)):c("",!0)])):c("",!0),t("section",St,[e[17]||(e[17]=t("h2",{class:"pd__blockTitle"},"مشخصات",-1)),t("dl",Tt,[t("div",It,[t("dt",null,[d(_,{icon:"vuesax-linear:weight",size:"15"}),e[12]||(e[12]=R(" وزن",-1))]),t("dd",null,i(ne.value)+" گرم",1)]),Y.value!=null?(l(),o("div",zt,[t("dt",null,[d(_,{icon:"vuesax-linear:percentage-square",size:"15"}),e[13]||(e[13]=R(" اجرت",-1))]),t("dd",null,i(ce.value)+"٪",1)])):c("",!0),V.value?(l(),o("div",$t,[t("dt",null,[d(_,{icon:"vuesax-linear:diamonds",size:"15"}),e[14]||(e[14]=R(" تنوع",-1))]),t("dd",null,i(V.value.title),1)])):c("",!0),B.value?(l(),o("div",Rt,[t("dt",null,[d(_,{icon:"vuesax-linear:category",size:"15"}),e[15]||(e[15]=R(" دسته‌بندی",-1))]),t("dd",null,i(B.value),1)])):c("",!0),re.value?(l(),o("div",qt,[t("dt",null,[d(_,{icon:"vuesax-linear:shop",size:"15"}),e[16]||(e[16]=R(" برند",-1))]),t("dd",null,i(re.value),1)])):c("",!0)])])])]),t("div",Ot,[ve.value?(l(),o("div",Dt,[t("button",{type:"button",class:"pd__qtyBtn","aria-label":"افزایش",onClick:Se},[d(_,{icon:"vuesax-linear:add",size:"15"})]),t("span",Ft,i(M.value),1),t("button",{type:"button",class:"pd__qtyBtn","aria-label":M.value===1?"حذف":"کاهش",onClick:Te},[d(_,{icon:M.value===1?"vuesax-linear:trash":"vuesax-linear:minus",size:"15"},null,8,["icon"])],8,Mt)])):B.value?(l(),o("button",{key:1,type:"button",class:"pd__pill",onClick:$e},[d(_,{icon:"vuesax-linear:category",size:"17"}),t("span",Vt,i(B.value),1)])):c("",!0),ve.value?(l(),X(L,{key:3,class:"pd__cta",to:{name:"cart"}},{default:z(()=>[d(_,{icon:"vuesax-linear:bag-2",size:"17"}),e[19]||(e[19]=R(" مشاهده سبد خرید ",-1))]),_:1})):(l(),o("button",{key:2,type:"button",class:"pd__cta",disabled:!ee.value,onClick:e[2]||(e[2]=u=>w(et)()?Ie():q.value=!0)},[ee.value?(l(),X(_,{key:0,icon:"vuesax-linear:bag-2",size:"17"})):c("",!0),R(" "+i(ee.value?"افزودن به سفارش":"ناموجود"),1)],8,Bt))])],544),(l(),X(Me,{to:"body"},[d(Ve,{name:"pd-preview"},{default:z(()=>[N.value?(l(),o("div",{key:0,class:"pd__preview",onClick:pe(de,["self"])},[t("button",{type:"button",class:"pd__previewClose","aria-label":"بستن",onClick:de},[d(_,{icon:"vuesax-linear:add",size:"20"})]),T.value.length>1?(l(),o("div",Lt,i(g.value+1)+" / "+i(T.value.length),1)):c("",!0),d(ge,{index:g.value,"onUpdate:index":e[3]||(e[3]=u=>g.value=u),slides:T.value,alt:k.value,class:"pd__previewStage",fit:"contain"},null,8,["index","slides","alt"]),T.value.length>1?(l(),o("div",Xt,[(l(!0),o(G,null,H(T.value,(u,I)=>(l(),o("button",{key:u,type:"button",class:$(["pd__previewThumb",{"is-on":I===g.value}]),"aria-label":`تصویر ${I+1}`,onClick:le=>g.value=I},[t("img",{src:u,alt:`${k.value} ${I+1}`,draggable:"false"},null,8,Ut)],10,At))),128))])):c("",!0)])):c("",!0)]),_:1})])),d(Ae,{timeOut:3e3,modelValue:b.value,"onUpdate:modelValue":e[4]||(e[4]=u=>b.value=u),color:"background-color: #14161A"},{default:z(()=>[...e[20]||(e[20]=[t("div",{class:"font-bold text-right mb-2"},"ثبت سفارش",-1),t("div",null,"محصول با موفقیت به سبد خرید افزوده شد",-1)])]),_:1},8,["modelValue"]),d(Ue,{timeOut:-1,show:q.value,"onUpdate:show":e[7]||(e[7]=u=>q.value=u),closeOnClickOverlay:!0},{img:z(()=>[t("img",{src:w(Ge),alt:"",class:"opacity-80"},null,8,Et)]),title:z(()=>[...e[21]||(e[21]=[t("div",{class:"p-8 text-justify"}," برای دسترسی به تمامی امکانات نرم افزار منتزر، ابتدا گزینه ورود/ثبت نام را لمس کنید و در صورت نداشتن حساب کاربری، ثبت نام نمایید. ",-1)])]),button:z(()=>[t("div",{class:"text-center font-bold",onClick:e[5]||(e[5]=u=>w(P).push({name:"login"}))},"ورود/ثبت نام"),t("div",{class:"text-center",onClick:e[6]||(e[6]=u=>q.value=!1)},"بیخیال")]),_:1},8,["show"])]),_:1},8,["spinning"])):c("",!0)}}}),Gt=he(jt,[["__scopeId","data-v-cb79448a"]]),ts=Object.freeze(Object.defineProperty({__proto__:null,default:Gt},Symbol.toStringTag,{value:"Module"}));export{Gt as S,Ye as a,ts as b,Ze as u}; diff --git a/apps/user-app-v2/dist/assets/SingleProduct-xA-Dyu9r.css b/apps/user-app-v2/dist/assets/SingleProduct-xA-Dyu9r.css deleted file mode 100644 index 1889595..0000000 --- a/apps/user-app-v2/dist/assets/SingleProduct-xA-Dyu9r.css +++ /dev/null @@ -1 +0,0 @@ -.gs[data-v-c30d71a6]{position:relative;width:100%;height:100%;overflow:hidden;touch-action:pan-y;-moz-user-select:none;user-select:none;-webkit-user-select:none}.gs__track[data-v-c30d71a6]{direction:ltr;display:flex;height:100%;width:100%;transition:transform .42s cubic-bezier(.22,.61,.36,1);will-change:transform}.gs.is-dragging .gs__track[data-v-c30d71a6]{transition:none}.gs__cell[data-v-c30d71a6]{flex:0 0 100%;width:100%;height:100%}.gs__img[data-v-c30d71a6]{width:100%;height:100%;display:block;-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.gs__img--cover[data-v-c30d71a6]{-o-object-fit:contain;object-fit:contain;padding:46px 20px 20px}.gs__img--contain[data-v-c30d71a6]{-o-object-fit:contain;object-fit:contain;padding:20px 22px}.gs__counter[data-v-c30d71a6]{position:absolute;bottom:14px;inset-inline-start:14px;padding:4px 9px;border-radius:999px;font-size:10.5px;font-weight:700;color:#fff;background:#14161a73;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);direction:ltr;pointer-events:none}.pd[data-v-cb79448a]{position:relative;height:100vh;overflow-y:auto;overflow-x:hidden;background:#fff;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}.pd__gallery[data-v-cb79448a]{position:sticky;top:0;z-index:1;margin-top:calc(-60px - env(safe-area-inset-top,0px))}.pd__header[data-v-cb79448a]{position:sticky;top:0;z-index:10;padding-top:env(safe-area-inset-top,0px);background:transparent;border-bottom:1px solid transparent;transition:background .28s ease,border-color .28s ease,backdrop-filter .28s ease}.pd__header.is-solid[data-v-cb79448a]{background:#ffffffe0;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border-bottom-color:#ecedef}.pd__headerTitle[data-v-cb79448a]{flex:1;min-width:0;margin:0;text-align:center;font-size:14.5px;font-weight:800;color:#14161a;letter-spacing:-.1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;opacity:0;transition:opacity .28s ease}.is-solid .pd__headerTitle[data-v-cb79448a]{opacity:1}.pd__controls[data-v-cb79448a]{max-width:768px;margin:0 auto;padding:11px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px}.pd__controlsEnd[data-v-cb79448a]{display:flex;gap:9px}.pd__round[data-v-cb79448a]{position:relative;width:38px;height:38px;display:grid;place-items:center;border:0;border-radius:12px;cursor:pointer;text-decoration:none;color:#14161a;background:#ffffffe6;-webkit-backdrop-filter:blur(10px) saturate(140%);backdrop-filter:blur(10px) saturate(140%);box-shadow:0 10px 26px -16px #14161ab3;transition:transform .18s ease,color .28s ease,background .28s ease,box-shadow .28s ease}.pd__round[data-v-cb79448a]:active{transform:scale(.92)}.pd__round.is-on[data-v-cb79448a]{color:#fff;background:#7a1b33}.is-solid .pd__round[data-v-cb79448a]{color:#14161a;background:#f4f5f6;-webkit-backdrop-filter:none;backdrop-filter:none;box-shadow:none}.is-solid .pd__round.is-on[data-v-cb79448a]{color:#fff;background:#7a1b33}.pd__roundBadge[data-v-cb79448a]{position:absolute;top:-5px;inset-inline-start:-5px;min-width:18px;height:18px;padding:0 5px;display:grid;place-items:center;border-radius:999px;font-size:10px;font-weight:800;color:#fff;background:#7a1b33}.pd__stage[data-v-cb79448a]{position:relative;height:54vh;min-height:320px;max-height:460px;overflow:hidden;background:#f4f5f6;touch-action:pan-y}.pd__stage--empty[data-v-cb79448a]{display:grid;place-items:center;color:#8a909c}.pd__rail[data-v-cb79448a]{position:absolute;top:50%;inset-inline-end:12px;transform:translateY(-50%);display:flex;flex-direction:column;gap:6px;padding:7px 5px;border-radius:999px;background:#14161a4d;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}.pd__railDot[data-v-cb79448a]{width:6px;height:6px;padding:0;border:0;border-radius:999px;cursor:pointer;background:#ffffff80;transition:height .25s cubic-bezier(.32,.72,0,1),background .25s ease}.pd__railDot.is-on[data-v-cb79448a]{height:20px;background:#fff}.pd__expand[data-v-cb79448a]{position:absolute;bottom:12px;inset-inline-start:12px;width:30px;height:30px;display:grid;place-items:center;border-radius:10px;color:#fff;background:#14161a59;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);pointer-events:none}.pd__preview[data-v-cb79448a]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:2000;display:flex;flex-direction:column;background:#0a0a0c8c;-webkit-backdrop-filter:blur(28px) saturate(140%);backdrop-filter:blur(28px) saturate(140%)}.pd__previewClose[data-v-cb79448a]{position:absolute;top:calc(14px + env(safe-area-inset-top,0px));inset-inline-end:14px;z-index:2;width:38px;height:38px;display:grid;place-items:center;border:0;border-radius:12px;cursor:pointer;color:#fff;background:#00000059;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);transform:rotate(45deg);transition:transform .18s ease,background .18s ease}.pd__previewClose[data-v-cb79448a]:active{transform:rotate(45deg) scale(.92)}.pd__previewCounter[data-v-cb79448a]{position:absolute;top:calc(24px + env(safe-area-inset-top,0px));inset-inline-start:0;inset-inline-end:0;z-index:2;text-align:center;font-size:12px;font-weight:700;color:#ffffffbf;direction:ltr;pointer-events:none}.pd__previewStage[data-v-cb79448a]{flex:1;min-height:0}.pd__previewThumbs[data-v-cb79448a]{flex-shrink:0;display:flex;justify-content:center;gap:8px;overflow-x:auto;scroll-snap-type:x proximity;padding:10px 16px calc(18px + env(safe-area-inset-bottom,0px))}.pd__previewThumb[data-v-cb79448a]{scroll-snap-align:center;flex:0 0 auto;width:52px;height:52px;padding:6px;border:0;border-radius:12px;cursor:pointer;overflow:hidden;background:#fff;opacity:.65;outline:2px solid transparent;outline-offset:2px;transition:opacity .2s ease,outline-color .2s ease,transform .18s ease}.pd__previewThumb[data-v-cb79448a]:active{transform:scale(.94)}.pd__previewThumb.is-on[data-v-cb79448a]{opacity:1;outline-color:#fff}.pd__previewThumb img[data-v-cb79448a]{width:100%;height:100%;-o-object-fit:contain;object-fit:contain;display:block;-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.pd-preview-enter-active[data-v-cb79448a],.pd-preview-leave-active[data-v-cb79448a]{transition:opacity .24s ease}.pd-preview-enter-from[data-v-cb79448a],.pd-preview-leave-to[data-v-cb79448a]{opacity:0}.pd__scroll[data-v-cb79448a]{position:relative;z-index:2}.pd__sheet[data-v-cb79448a]{position:relative;margin-top:-8px;border-radius:32px 32px 0 0;background:#fff;padding:8px 18px;box-shadow:0 -18px 40px -30px #14161a8c;min-height:calc(100vh - 132px - env(safe-area-inset-top,0px))}.pd__grip[data-v-cb79448a]{width:38px;height:4px;margin:0 auto 12px;border-radius:999px;background:#ecedef}.pd__eyebrow[data-v-cb79448a]{display:flex;align-items:center;justify-content:space-between;gap:12px}.pd__eyebrowText[data-v-cb79448a]{font-size:11.5px;font-weight:600;color:#8a909c}.pd__stock[data-v-cb79448a]{flex-shrink:0;display:inline-flex;align-items:center;gap:6px;padding:5px 11px;border-radius:999px;font-size:10.5px;font-weight:700;white-space:nowrap}.pd__stockDot[data-v-cb79448a]{width:5px;height:5px;border-radius:999px;background:currentColor}.pd__stock.is-in[data-v-cb79448a]{color:#16a34a;background:#16a34a14}.pd__stock.is-pre[data-v-cb79448a]{color:#7a1b33;background:#fbf2f4}.pd__stock.is-out[data-v-cb79448a]{color:#5b616e;background:#f4f5f6}.pd__head[data-v-cb79448a]{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;padding-top:10px}.pd__headMain[data-v-cb79448a]{min-width:0}.pd__title[data-v-cb79448a]{margin:0;font-size:14px;font-weight:700;line-height:1.7;color:#14161a}.pd__code[data-v-cb79448a]{margin:5px 0 0;direction:ltr;text-align:end;font-size:11px;font-weight:700;color:#8a909c}.pd__figures[data-v-cb79448a]{flex-shrink:0;display:flex;align-items:flex-end;gap:8px}.pd__figure[data-v-cb79448a]{display:flex;flex-direction:column;align-items:center;gap:2px;padding:7px 11px;border-radius:13px;color:#14161a;background:#f4f5f6}.pd__figure--accent[data-v-cb79448a]{color:#7a1b33;background:#fbf2f4}.pd__figureValue[data-v-cb79448a]{font-size:14px;font-weight:800;line-height:1.3;color:inherit;direction:ltr}.pd__figureLabel[data-v-cb79448a]{font-size:10px;font-weight:500;color:#8a909c}.pd__figure--accent .pd__figureLabel[data-v-cb79448a]{color:#7a1b33a6}.pd__chips[data-v-cb79448a]{display:flex;gap:8px;margin-top:20px;margin-inline:-18px;padding:3px 18px;overflow-x:auto}.pd__chip[data-v-cb79448a]{flex:0 0 auto;min-width:42px;height:34px;padding:0 14px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;font-family:inherit;font-size:12.5px;font-weight:700;white-space:nowrap;border-radius:999px;border:1px solid #ECEDEF;color:#5b616e;background:#fff;transition:transform .18s ease,background .2s ease,color .2s ease,border-color .2s ease}.pd__chip[data-v-cb79448a]:active{transform:scale(.95)}.pd__chip.is-on[data-v-cb79448a]{color:#fff;background:#14161a;border-color:#14161a}.pd__block[data-v-cb79448a]{margin-top:24px}.pd__blockTitle[data-v-cb79448a]{margin:0 0 11px;font-size:16px;font-weight:600;color:#14161a}.pd__body[data-v-cb79448a]{margin:0;font-size:12.5px;line-height:2.1;color:#5b616e;text-align:justify}.pd__body.is-clamped[data-v-cb79448a]{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.pd__more[data-v-cb79448a]{margin-top:8px;padding:0;border:0;background:none;cursor:pointer;font-family:inherit;font-size:11.5px;font-weight:800;color:#14161a;text-decoration:underline;text-underline-offset:4px}.pd__specs[data-v-cb79448a]{margin:0;border-radius:22px;background:#f4f5f6;overflow:hidden}.pd__spec[data-v-cb79448a]{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 16px;border-bottom:1px solid #ECEDEF}.pd__spec[data-v-cb79448a]:last-child{border-bottom:0}.pd__spec dt[data-v-cb79448a]{display:flex;align-items:center;gap:7px;margin:0;font-size:12.5px;color:#5b616e}.pd__spec dd[data-v-cb79448a]{margin:0;font-size:12.5px;font-weight:700;color:#14161a}.pd__bar[data-v-cb79448a]{position:sticky;bottom:0;z-index:20;display:flex;align-items:center;gap:10px;max-width:768px;margin:0 auto;padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px));background:#ffffffe6;-webkit-backdrop-filter:blur(18px) saturate(140%);backdrop-filter:blur(18px) saturate(140%);border-top:1px solid #ECEDEF}.pd__pill[data-v-cb79448a]{flex-shrink:0;max-width:44%;height:48px;padding:0 15px;display:inline-flex;align-items:center;gap:7px;cursor:pointer;font-family:inherit;font-size:12.5px;font-weight:700;border-radius:999px;border:1px solid #ECEDEF;color:#14161a;background:#fff;transition:transform .18s ease,background .2s ease}.pd__pill[data-v-cb79448a]:active{transform:scale(.97)}.pd__pillText[data-v-cb79448a]{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.pd__qty[data-v-cb79448a]{flex-shrink:0;height:48px;padding:0 6px;display:inline-flex;align-items:center;gap:4px;border-radius:999px;border:1px solid #ECEDEF;background:#fff}.pd__qtyBtn[data-v-cb79448a]{width:32px;height:32px;display:grid;place-items:center;border:0;border-radius:50%;cursor:pointer;color:#14161a;background:#f4f5f6;transition:transform .18s ease}.pd__qtyBtn[data-v-cb79448a]:active{transform:scale(.9)}.pd__qtyValue[data-v-cb79448a]{min-width:20px;text-align:center;font-size:13px;font-weight:800;color:#14161a}.pd__cta[data-v-cb79448a]{flex:1;min-width:0;display:inline-flex;align-items:center;justify-content:center;gap:8px;height:48px;border:0;border-radius:999px;cursor:pointer;font-family:inherit;font-size:13.5px;font-weight:800;white-space:nowrap;text-decoration:none;color:#fff;background:#14161a;box-shadow:0 14px 30px -18px #14161ae6;transition:transform .18s ease,opacity .18s ease}.pd__cta[data-v-cb79448a]:active{transform:scale(.985)}.pd__cta[data-v-cb79448a]:disabled{cursor:default;opacity:.4;box-shadow:none} diff --git a/apps/user-app-v2/dist/assets/Spinner-CNMYSNQh.css b/apps/user-app-v2/dist/assets/Spinner-CNMYSNQh.css deleted file mode 100644 index 5d4aeb6..0000000 --- a/apps/user-app-v2/dist/assets/Spinner-CNMYSNQh.css +++ /dev/null @@ -1 +0,0 @@ -.loading *{box-sizing:border-box}.loading{position:relative;width:50px;height:50px;border-radius:50%;box-sizing:border-box;border:3px solid transparent}.loading .effect-1,.loading .effect-2{position:absolute;width:50px;height:50px;border:3px solid transparent;border-left:3px solid #8D6A46;border-radius:50%;box-sizing:border-box}.loading .effect-1{animation:rotate 1s ease infinite}.loading .effect-2{animation:rotateOpacity 1s ease infinite .1s}.loading .effect-3{position:absolute;width:50px;height:50px;border:3px solid transparent;border-left:3px solid #8D6A46;animation:rotateOpacity 1s ease infinite .2s;border-radius:50%;box-sizing:border-box}.loading .effects{transition:all .3s ease}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(1turn)}}@keyframes rotateOpacity{0%{transform:rotate(0);opacity:.1}to{transform:rotate(1turn);opacity:1}}.spinner-brand{display:block;width:48px;height:48px;-o-object-fit:contain;object-fit:contain;border-radius:8px}.ant-spin-text{color:#1c2d56}.loading+.ant-spin-text{margin-top:24px} diff --git a/apps/user-app-v2/dist/assets/Spinner.vue_vue_type_style_index_0_lang-ghXHCVpI.js b/apps/user-app-v2/dist/assets/Spinner.vue_vue_type_style_index_0_lang-ghXHCVpI.js deleted file mode 100644 index 78050b3..0000000 --- a/apps/user-app-v2/dist/assets/Spinner.vue_vue_type_style_index_0_lang-ghXHCVpI.js +++ /dev/null @@ -1,71 +0,0 @@ -import{ao as ne,F as we,ap as Hn,Q as Bn,d as X,O as je,h as A,u as ct,l as v,A as Z,E as Be,R as xt,o as wr,M as zn,af as Gn,U as Vn,g as jr,aq as Nt,p as _r,ar as Ft,P as Ct,S as Rt,j as Un,i as Lt,q as Dt,f as Qe,b as Ee,z as Wn,c as Ht}from"./index-CZjgV-Yn.js";import{g as Yn}from"./_commonjsHelpers-Cpj98o6Y.js";const qn="/img/montzar-logo.png";function J(e){"@babel/helpers - typeof";return J=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},J(e)}function Kn(e,t){if(J(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(J(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Jn(e){var t=Kn(e,"string");return J(t)=="symbol"?t:t+""}function E(e,t,r){return(t=Jn(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Bt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function C(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0;return typeof e=="function"?e(t):e??r}function _e(){for(var e=[],t=0;te.length)&&(t=e.length);for(var r=0,n=Array(t);r0&&arguments[0]!==void 0?arguments[0]:"",r=arguments.length>1?arguments[1]:void 0,n={},a=/;(?![^(]*\))/g,o=/:(.+)/;return J(t)==="object"?t:(t.split(a).forEach(function(c){if(c){var i=c.split(o);if(i.length>1){var l=r?Ar(i[0].trim()):i[0].trim();n[l]=i[1].trim()}}}),n)},Cc=function(t,r){return t[r]!==void 0},Ne=function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=Array.isArray(t)?t:[t],a=[];return n.forEach(function(o){Array.isArray(o)?a.push.apply(a,ze(e(o,r))):o&&o.type===we?a.push.apply(a,ze(e(o.children,r))):o&&ne(o)?r&&!Ir(o)?a.push(o):r||a.push(o):ja(o)&&a.push(o)}),a},Ea=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"default",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(ne(t))return t.type===we?r==="default"?Ne(t.children):[]:t.children&&t.children[r]?Ne(t.children[r](n)):[];var a=t.$slots[r]&&t.$slots[r](n);return Ne(a)},Oc=function(t){for(var r,n=(t==null||(r=t.vnode)===null||r===void 0?void 0:r.el)||t&&(t.$el||t);n&&!n.tagName;)n=n.nextSibling;return n},Sc=function(t){var r={};if(t.$&&t.$.vnode){var n=t.$.vnode.props||{};Object.keys(t.$props).forEach(function(i){var l=t.$props[i],s=oa(i);(l!==void 0||s in n)&&(r[i]=l)})}else if(ne(t)&&J(t.type)==="object"){var a=t.props||{},o={};Object.keys(a).forEach(function(i){o[Ar(i)]=a[i]});var c=t.type.props||{};Object.keys(c).forEach(function(i){var l=ca(c,o,i,o[i]);(l!==void 0||i in o)&&(r[i]=l)})}return r},$a=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"default",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,o=void 0;if(t.$){var c=t[r];if(c!==void 0)return typeof c=="function"&&a?c(n):c;o=t.$slots[r],o=a&&o?o(n):o}else if(ne(t)){var i=t.props&&t.props[r];if(i!==void 0&&t.props!==null)return typeof i=="function"&&a?i(n):i;t.type===we?o=t.children:t.children&&t.children[r]&&(o=t.children[r],o=a&&o?o(n):o)}return Array.isArray(o)&&(o=Ne(o),o=o.length===1?o[0]:o,o=o.length===0?void 0:o),o};function Pc(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r={};return e.$?r=C(C({},r),e.$attrs):r=C(C({},r),e.props),Ta(r)[t?"onEvents":"events"]}function wc(e,t){var r=(ne(e)?e.props:e.$attrs)||{},n=r.style||{};return typeof n=="string"&&(n=Aa(n,t)),n}function Ir(e){return e&&(e.type===Hn||e.type===we&&e.children.length===0||e.type===Bn&&e.children.trim()==="")}function kr(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=[];return e.forEach(function(r){Array.isArray(r)?t.push.apply(t,ze(r)):(r==null?void 0:r.type)===we?t.push.apply(t,ze(kr(r.children))):t.push(r)}),t.filter(function(r){return!Ir(r)})}function jc(e){return Array.isArray(e)&&e.length===1&&(e=e[0]),e&&e.__v_isVNode&&J(e.type)!=="symbol"}function _c(e,t){var r,n,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"default";return(r=t[a])!==null&&r!==void 0?r:(n=e[a])===null||n===void 0?void 0:n.call(e)}var Ma=function(){for(var t=arguments.length,r=new Array(t),n=0;n=0||(a[r]=e[r]);return a}function Wt(e){return((t=e)!=null&&typeof t=="object"&&Array.isArray(t)===!1)==1&&Object.prototype.toString.call(e)==="[object Object]";var t}var Gr=Object.prototype,Vr=Gr.toString,Ra=Gr.hasOwnProperty,Ur=/^\s*function (\w+)/;function Yt(e){var t,r=(t=e==null?void 0:e.type)!==null&&t!==void 0?t:e;if(r){var n=r.toString().match(Ur);return n?n[1]:""}return""}var oe=function(e){var t,r;return Wt(e)!==!1&&typeof(t=e.constructor)=="function"&&Wt(r=t.prototype)!==!1&&r.hasOwnProperty("isPrototypeOf")!==!1},La=function(e){return e},H=La,Ce=function(e,t){return Ra.call(e,t)},Da=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e},fe=Array.isArray||function(e){return Vr.call(e)==="[object Array]"},de=function(e){return Vr.call(e)==="[object Function]"},Ue=function(e){return oe(e)&&Ce(e,"_vueTypes_name")},Wr=function(e){return oe(e)&&(Ce(e,"type")||["_vueTypes_name","validator","default","required"].some(function(t){return Ce(e,t)}))};function St(e,t){return Object.defineProperty(e.bind(t),"__original",{value:e})}function ie(e,t,r){var n,a=!0,o="";n=oe(e)?e:{type:e};var c=Ue(n)?n._vueTypes_name+" - ":"";if(Wr(n)&&n.type!==null){if(n.type===void 0||n.type===!0||!n.required&&t===void 0)return a;fe(n.type)?(a=n.type.some(function(u){return ie(u,t)===!0}),o=n.type.map(function(u){return Yt(u)}).join(" or ")):a=(o=Yt(n))==="Array"?fe(t):o==="Object"?oe(t):o==="String"||o==="Number"||o==="Boolean"||o==="Function"?function(u){if(u==null)return"";var f=u.constructor.toString().match(Ur);return f?f[1]:""}(t)===o:t instanceof n.type}if(!a){var i=c+'value "'+t+'" should be of type "'+o+'"';return i}if(Ce(n,"validator")&&de(n.validator)){var l=H,s=[];if(H=function(u){s.push(u)},a=n.validator(t),H=l,!a){var d=(s.length>1?"* ":"")+s.join(` -* `);return s.length=0,d}}return a}function B(e,t){var r=Object.defineProperties(t,{_vueTypes_name:{value:e,writable:!0},isRequired:{get:function(){return this.required=!0,this}},def:{value:function(a){return a!==void 0||this.default?de(a)||ie(this,a)===!0?(this.default=fe(a)?function(){return[].concat(a)}:oe(a)?function(){return Object.assign({},a)}:a,this):(H(this._vueTypes_name+' - invalid default value: "'+a+'"'),this):this}}}),n=r.validator;return de(n)&&(r.validator=St(n,r)),r}function q(e,t){var r=B(e,t);return Object.defineProperty(r,"validate",{value:function(n){return de(this.validator)&&H(this._vueTypes_name+` - calling .validate() will overwrite the current custom validator function. Validator info: -`+JSON.stringify(this)),this.validator=St(n,this),this}})}function qt(e,t,r){var n,a,o=(n=t,a={},Object.getOwnPropertyNames(n).forEach(function(u){a[u]=Object.getOwnPropertyDescriptor(n,u)}),Object.defineProperties({},a));if(o._vueTypes_name=e,!oe(r))return o;var c,i,l=r.validator,s=zr(r,["validator"]);if(de(l)){var d=o.validator;d&&(d=(i=(c=d).__original)!==null&&i!==void 0?i:c),o.validator=St(d?function(u){return d.call(this,u)&&l.call(this,u)}:l,o)}return Object.assign(o,s)}function qe(e){return e.replace(/^(?!\s*$)/gm," ")}var Ha=function(){return q("any",{})},Ba=function(){return q("function",{type:Function})},za=function(){return q("boolean",{type:Boolean})},Ga=function(){return q("string",{type:String})},Va=function(){return q("number",{type:Number})},Ua=function(){return q("array",{type:Array})},Wa=function(){return q("object",{type:Object})},Ya=function(){return B("integer",{type:Number,validator:function(e){return Da(e)}})},qa=function(){return B("symbol",{validator:function(e){return typeof e=="symbol"}})};function Ka(e,t){if(t===void 0&&(t="custom validation failed"),typeof e!="function")throw new TypeError("[VueTypes error]: You must provide a function as argument");return B(e.name||"<>",{validator:function(r){var n=e(r);return n||H(this._vueTypes_name+" - "+t),n}})}function Ja(e){if(!fe(e))throw new TypeError("[VueTypes error]: You must provide an array as argument.");var t='oneOf - value should be one of "'+e.join('", "')+'".',r=e.reduce(function(n,a){if(a!=null){var o=a.constructor;n.indexOf(o)===-1&&n.push(o)}return n},[]);return B("oneOf",{type:r.length>0?r:void 0,validator:function(n){var a=e.indexOf(n)!==-1;return a||H(t),a}})}function Qa(e){if(!fe(e))throw new TypeError("[VueTypes error]: You must provide an array as argument");for(var t=!1,r=[],n=0;n0&&r.some(function(l){return c.indexOf(l)===-1})){var i=r.filter(function(l){return c.indexOf(l)===-1});return H(i.length===1?'shape - required property "'+i[0]+'" is not defined.':'shape - required properties "'+i.join('", "')+'" are not defined.'),!1}return c.every(function(l){if(t.indexOf(l)===-1)return o._vueTypes_isLoose===!0||(H('shape - shape definition does not include a "'+l+'" property. Allowed keys: "'+t.join('", "')+'".'),!1);var s=ie(e[l],a[l]);return typeof s=="string"&&H('shape - "'+l+`" property validation error: - `+qe(s)),s===!0})}});return Object.defineProperty(n,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(n,"loose",{get:function(){return this._vueTypes_isLoose=!0,this}}),n}var Y=function(){function e(){}return e.extend=function(t){var r=this;if(fe(t))return t.forEach(function(u){return r.extend(u)}),this;var n=t.name,a=t.validate,o=a!==void 0&&a,c=t.getter,i=c!==void 0&&c,l=zr(t,["name","validate","getter"]);if(Ce(this,n))throw new TypeError('[VueTypes error]: Type "'+n+'" already defined');var s,d=l.type;return Ue(d)?(delete l.type,Object.defineProperty(this,n,i?{get:function(){return qt(n,d,l)}}:{value:function(){var u,f=qt(n,d,l);return f.validator&&(f.validator=(u=f.validator).bind.apply(u,[f].concat([].slice.call(arguments)))),f}})):(s=i?{get:function(){var u=Object.assign({},l);return o?q(n,u):B(n,u)},enumerable:!0}:{value:function(){var u,f,p=Object.assign({},l);return u=o?q(n,p):B(n,p),p.validator&&(u.validator=(f=p.validator).bind.apply(f,[u].concat([].slice.call(arguments)))),u},enumerable:!0},Object.defineProperty(this,n,s))},Hr(e,null,[{key:"any",get:function(){return Ha()}},{key:"func",get:function(){return Ba().def(this.defaults.func)}},{key:"bool",get:function(){return za().def(this.defaults.bool)}},{key:"string",get:function(){return Ga().def(this.defaults.string)}},{key:"number",get:function(){return Va().def(this.defaults.number)}},{key:"array",get:function(){return Ua().def(this.defaults.array)}},{key:"object",get:function(){return Wa().def(this.defaults.object)}},{key:"integer",get:function(){return Ya().def(this.defaults.integer)}},{key:"symbol",get:function(){return qa()}}]),e}();function Yr(e){var t;return e===void 0&&(e={func:function(){},bool:!0,string:"",number:0,array:function(){return[]},object:function(){return{}},integer:0}),(t=function(r){function n(){return r.apply(this,arguments)||this}return Br(n,r),Hr(n,null,[{key:"sensibleDefaults",get:function(){return Fe({},this.defaults)},set:function(a){this.defaults=a!==!1?Fe({},a!==!0?a:e):{}}}]),n}(Y)).defaults=Fe({},e),t}Y.defaults={},Y.custom=Ka,Y.oneOf=Ja,Y.instanceOf=Xa,Y.oneOfType=Qa,Y.arrayOf=Za,Y.objectOf=eo,Y.shape=to,Y.utils={validate:function(e,t){return ie(t,e)===!0},toType:function(e,t,r){return r===void 0&&(r=!1),r?q(e,t):B(e,t)}};(function(e){function t(){return e.apply(this,arguments)||this}return Br(t,e),t})(Yr());var Oe=Yr({func:void 0,bool:void 0,string:void 0,number:void 0,array:void 0,object:void 0,integer:void 0});Oe.extend([{name:"looseBool",getter:!0,type:Boolean,default:void 0},{name:"style",getter:!0,type:[String,Object],default:void 0},{name:"VueNode",getter:!0,type:null}]);function Ac(e){return e.default=void 0,e}var ro=["image","description","imageStyle","class"],qr=v(Lr,null,null),Kr=v(Dr,null,null),pe=function(t,r){var n,a=r.slots,o=a===void 0?{}:a,c=r.attrs,i=Ke("empty",t),l=i.direction,s=i.prefixCls,d=s.value,u=C(C({},t),c),f=u.image,p=f===void 0?qr:f,g=u.description,x=g===void 0?((n=o.description)===null||n===void 0?void 0:n.call(o))||void 0:g,m=u.imageStyle,y=u.class,h=y===void 0?"":y,w=Ot(u,ro);return v(Rr,{componentName:"Empty",children:function(S){var b,P=typeof x<"u"?x:S.description,T=typeof P=="string"?P:"empty",_=null;return typeof p=="string"?_=v("img",{alt:T,src:p},null):_=p,v("div",C({class:_e(d,h,(b={},E(b,"".concat(d,"-normal"),p===Kr),E(b,"".concat(d,"-rtl"),l.value==="rtl"),b))},w),[v("div",{class:"".concat(d,"-image"),style:m},[_]),P&&v("p",{class:"".concat(d,"-description")},[P]),o.default&&v("div",{class:"".concat(d,"-footer")},[kr(o.default())])])}},null)};pe.displayName="AEmpty";pe.PRESENTED_IMAGE_DEFAULT=qr;pe.PRESENTED_IMAGE_SIMPLE=Kr;pe.inheritAttrs=!1;pe.props={prefixCls:String,image:Oe.any,description:Oe.any,imageStyle:{type:Object,default:void 0}};const ge=Nr(pe);var no=function(t){var r=Ke("empty",t),n=r.prefixCls,a=function(c){switch(c){case"Table":case"List":return v(ge,{image:ge.PRESENTED_IMAGE_SIMPLE},null);case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return v(ge,{image:ge.PRESENTED_IMAGE_SIMPLE,class:"".concat(n.value,"-small")},null);default:return v(ge,null,null)}};return a(t.componentName)};function Jr(e){return v(no,{componentName:e},null)}var Kt={};function ao(e,t){}function oo(e,t,r){!t&&!Kt[r]&&(Kt[r]=!0)}function Qr(e,t){oo(ao,e,t)}const io=function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";Qr(e,"[antdv: ".concat(t,"] ").concat(r))};var ut="internalMark",Re=X({compatConfig:{MODE:3},name:"ALocaleProvider",props:{locale:{type:Object},ANT_MARK__:String},setup:function(t,r){var n=r.slots;io(t.ANT_MARK__===ut,"LocaleProvider","`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead");var a=Z({antLocale:C(C({},t.locale),{},{exist:!0}),ANT_MARK__:ut});return xt("localeData",a),Be(function(){return t.locale},function(){a.antLocale=C(C({},t.locale),{},{exist:!0})},{immediate:!0}),function(){var o;return(o=n.default)===null||o===void 0?void 0:o.call(n)}}});Re.install=function(e){return e.component(Re.name,Re),e};const co=Nr(Re);Ma("bottomLeft","bottomRight","topLeft","topRight");var Ec=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=C(t?{name:t,appear:!0,enterFromClass:"".concat(t,"-enter ").concat(t,"-enter-prepare"),enterActiveClass:"".concat(t,"-enter ").concat(t,"-enter-prepare"),enterToClass:"".concat(t,"-enter ").concat(t,"-enter-active"),leaveFromClass:" ".concat(t,"-leave"),leaveActiveClass:"".concat(t,"-leave ").concat(t,"-leave-active"),leaveToClass:"".concat(t,"-leave ").concat(t,"-leave-active")}:{css:!1},r);return n},lo=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=C(t?{name:t,appear:!0,appearActiveClass:"".concat(t),appearToClass:"".concat(t,"-appear ").concat(t,"-appear-active"),enterFromClass:"".concat(t,"-appear ").concat(t,"-enter ").concat(t,"-appear-prepare ").concat(t,"-enter-prepare"),enterActiveClass:"".concat(t),enterToClass:"".concat(t,"-enter ").concat(t,"-appear ").concat(t,"-appear-active ").concat(t,"-enter-active"),leaveActiveClass:"".concat(t," ").concat(t,"-leave"),leaveToClass:"".concat(t,"-leave-active")}:{css:!1},r);return n};const uo=X({name:"Notice",inheritAttrs:!1,props:["prefixCls","duration","updateMark","noticeKey","closeIcon","closable","props","onClick","onClose","holder","visible"],setup:function(t,r){var n=r.attrs,a=r.slots,o,c=!1,i=A(function(){return t.duration===void 0?4.5:t.duration}),l=function(){i.value&&!c&&(o=setTimeout(function(){d()},i.value*1e3))},s=function(){o&&(clearTimeout(o),o=null)},d=function(p){p&&p.stopPropagation(),s();var g=t.onClose,x=t.noticeKey;g&&g(x)},u=function(){s(),l()};return wr(function(){l()}),zn(function(){c=!0,s()}),Be([i,function(){return t.updateMark},function(){return t.visible}],function(f,p){var g=Gt(f,3),x=g[0],m=g[1],y=g[2],h=Gt(p,3),w=h[0],O=h[1],S=h[2];(x!==w||m!==O||y!==S&&S)&&u()},{flush:"post"}),function(){var f,p,g=t.prefixCls,x=t.closable,m=t.closeIcon,y=m===void 0?(f=a.closeIcon)===null||f===void 0?void 0:f.call(a):m,h=t.onClick,w=t.holder,O=n.class,S=n.style,b="".concat(g,"-notice"),P=Object.keys(n).reduce(function(_,j){return(j.substr(0,5)==="data-"||j.substr(0,5)==="aria-"||j==="role")&&(_[j]=n[j]),_},{}),T=v("div",C({class:_e(b,O,E({},"".concat(b,"-closable"),x)),style:S,onMouseenter:s,onMouseleave:l,onClick:h},P),[v("div",{class:"".concat(b,"-content")},[(p=a.default)===null||p===void 0?void 0:p.call(a)]),x?v("a",{tabindex:0,onClick:d,class:"".concat(b,"-close")},[y||v("span",{class:"".concat(b,"-close-x")},null)]):null]);return w?v(Gn,{to:w},{default:function(){return T}}):T}}});var so=["name","getContainer","appContext","prefixCls","rootPrefixCls","transitionName","hasTransitionName"],Jt=0,fo=Date.now();function Qt(){var e=Jt;return Jt+=1,"rcNotification_".concat(fo,"_").concat(e)}var We=X({name:"Notification",inheritAttrs:!1,props:["prefixCls","transitionName","animation","maxCount","closeIcon"],setup:function(t,r){var n=r.attrs,a=r.expose,o=r.slots,c=new Map,i=jr([]),l=A(function(){var u=t.prefixCls,f=t.animation,p=f===void 0?"fade":f,g=t.transitionName;return!g&&p&&(g="".concat(u,"-").concat(p)),lo(g)}),s=function(f,p){var g=f.key||Qt(),x=C(C({},f),{},{key:g}),m=t.maxCount,y=i.value.map(function(w){return w.notice.key}).indexOf(g),h=i.value.concat();y!==-1?h.splice(y,1,{notice:x,holderCallback:p}):(m&&i.value.length>=m&&(x.key=h[0].notice.key,x.updateMark=Qt(),x.userPassKey=g,h.shift()),h.push({notice:x,holderCallback:p})),i.value=h},d=function(f){i.value=i.value.filter(function(p){var g=p.notice,x=g.key,m=g.userPassKey,y=m||x;return y!==f})};return a({add:s,remove:d,notices:i}),function(){var u,f,p=t.prefixCls,g=t.closeIcon,x=g===void 0?(u=o.closeIcon)===null||u===void 0?void 0:u.call(o,{prefixCls:p}):g,m=i.value.map(function(h,w){var O=h.notice,S=h.holderCallback,b=w===i.value.length-1?O.updateMark:void 0,P=O.key,T=O.userPassKey,_=O.content,j=C(C(C({prefixCls:p,closeIcon:typeof x=="function"?x({prefixCls:p}):x},O),O.props),{},{key:P,noticeKey:T||P,updateMark:b,onClose:function(V){var ce;d(V),(ce=O.onClose)===null||ce===void 0||ce.call(O)},onClick:O.onClick});return S?v("div",{key:P,class:"".concat(p,"-hook-holder"),ref:function(V){typeof P>"u"||(V?(c.set(P,V),S(V,j)):c.delete(P))}},null):v(uo,j,{default:function(){return[typeof _=="function"?_({prefixCls:p}):_]}})}),y=(f={},E(f,p,1),E(f,n.class,!!n.class),f);return v("div",{class:y,style:n.style||{top:"65px",left:"50%"}},[v(Vn,C({tag:"div"},l.value),{default:function(){return[m]}})])}}});We.newInstance=function(t,r){var n=t||{},a=n.name,o=a===void 0?"notification":a,c=n.getContainer,i=n.appContext,l=n.prefixCls,s=n.rootPrefixCls,d=n.transitionName,u=n.hasTransitionName,f=Ot(n,so),p=document.createElement("div");if(c){var g=c();g.appendChild(p)}else document.body.appendChild(p);var x=X({compatConfig:{MODE:3},name:"NotificationWrapper",setup:function(h,w){var O=w.attrs,S=jr();return wr(function(){r({notice:function(P){var T;(T=S.value)===null||T===void 0||T.add(P)},removeNotice:function(P){var T;(T=S.value)===null||T===void 0||T.remove(P)},destroy:function(){Nt(null,p),p.parentNode&&p.parentNode.removeChild(p)},component:S})}),function(){var b=D,P=b.getPrefixCls(o,l),T=b.getRootPrefixCls(s,P),_=u?d:"".concat(T,"-").concat(d);return v(be,C(C({},b),{},{notUpdateGlobalConfig:!0,prefixCls:T}),{default:function(){return[v(We,C(C({ref:S},O),{},{prefixCls:P,transitionName:_}),null)]}})}}}),m=v(x,f);m.appContext=i||m.appContext,Nt(m,p)};var po={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};function $(e,t){vo(e)&&(e="100%");var r=go(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function $e(e){return Math.min(1,Math.max(0,e))}function vo(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function go(e){return typeof e=="string"&&e.indexOf("%")!==-1}function Zr(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Me(e){return e<=1?"".concat(Number(e)*100,"%"):e}function re(e){return e.length===1?"0"+e:String(e)}function ho(e,t,r){return{r:$(e,255)*255,g:$(t,255)*255,b:$(r,255)*255}}function Zt(e,t,r){e=$(e,255),t=$(t,255),r=$(r,255);var n=Math.max(e,t,r),a=Math.min(e,t,r),o=0,c=0,i=(n+a)/2;if(n===a)c=0,o=0;else{var l=n-a;switch(c=i>.5?l/(2-n-a):l/(n+a),n){case e:o=(t-r)/l+(t1&&(r-=1),r<1/6?e+(t-e)*(6*r):r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function mo(e,t,r){var n,a,o;if(e=$(e,360),t=$(t,100),r=$(r,100),t===0)a=r,o=r,n=r;else{var c=r<.5?r*(1+t):r+t-r*t,i=2*r-c;n=Ze(i,c,e+1/3),a=Ze(i,c,e),o=Ze(i,c,e-1/3)}return{r:n*255,g:a*255,b:o*255}}function st(e,t,r){e=$(e,255),t=$(t,255),r=$(r,255);var n=Math.max(e,t,r),a=Math.min(e,t,r),o=0,c=n,i=n-a,l=n===0?0:i/n;if(n===a)o=0;else{switch(n){case e:o=(t-r)/i+(t>16,g:(e&65280)>>8,b:e&255}}var dt={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function ue(e){var t={r:0,g:0,b:0},r=1,n=null,a=null,o=null,c=!1,i=!1;return typeof e=="string"&&(e=Po(e)),typeof e=="object"&&(K(e.r)&&K(e.g)&&K(e.b)?(t=ho(e.r,e.g,e.b),c=!0,i=String(e.r).substr(-1)==="%"?"prgb":"rgb"):K(e.h)&&K(e.s)&&K(e.v)?(n=Me(e.s),a=Me(e.v),t=yo(e.h,n,a),c=!0,i="hsv"):K(e.h)&&K(e.s)&&K(e.l)&&(n=Me(e.s),o=Me(e.l),t=mo(e.h,n,o),c=!0,i="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(r=e.a)),r=Zr(r),{ok:c,format:e.format||i,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}var Oo="[-\\+]?\\d+%?",So="[-\\+]?\\d*\\.\\d+%?",Q="(?:".concat(So,")|(?:").concat(Oo,")"),Xe="[\\s|\\(]+(".concat(Q,")[,|\\s]+(").concat(Q,")[,|\\s]+(").concat(Q,")\\s*\\)?"),et="[\\s|\\(]+(".concat(Q,")[,|\\s]+(").concat(Q,")[,|\\s]+(").concat(Q,")[,|\\s]+(").concat(Q,")\\s*\\)?"),G={CSS_UNIT:new RegExp(Q),rgb:new RegExp("rgb"+Xe),rgba:new RegExp("rgba"+et),hsl:new RegExp("hsl"+Xe),hsla:new RegExp("hsla"+et),hsv:new RegExp("hsv"+Xe),hsva:new RegExp("hsva"+et),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Po(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(dt[e])e=dt[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var r=G.rgb.exec(e);return r?{r:r[1],g:r[2],b:r[3]}:(r=G.rgba.exec(e),r?{r:r[1],g:r[2],b:r[3],a:r[4]}:(r=G.hsl.exec(e),r?{h:r[1],s:r[2],l:r[3]}:(r=G.hsla.exec(e),r?{h:r[1],s:r[2],l:r[3],a:r[4]}:(r=G.hsv.exec(e),r?{h:r[1],s:r[2],v:r[3]}:(r=G.hsva.exec(e),r?{h:r[1],s:r[2],v:r[3],a:r[4]}:(r=G.hex8.exec(e),r?{r:L(r[1]),g:L(r[2]),b:L(r[3]),a:Xt(r[4]),format:t?"name":"hex8"}:(r=G.hex6.exec(e),r?{r:L(r[1]),g:L(r[2]),b:L(r[3]),format:t?"name":"hex"}:(r=G.hex4.exec(e),r?{r:L(r[1]+r[1]),g:L(r[2]+r[2]),b:L(r[3]+r[3]),a:Xt(r[4]+r[4]),format:t?"name":"hex8"}:(r=G.hex3.exec(e),r?{r:L(r[1]+r[1]),g:L(r[2]+r[2]),b:L(r[3]+r[3]),format:t?"name":"hex"}:!1)))))))))}function K(e){return!!G.CSS_UNIT.exec(String(e))}var tt=function(){function e(t,r){t===void 0&&(t=""),r===void 0&&(r={});var n;if(t instanceof e)return t;typeof t=="number"&&(t=Co(t)),this.originalInput=t;var a=ue(t);this.originalInput=t,this.r=a.r,this.g=a.g,this.b=a.b,this.a=a.a,this.roundA=Math.round(100*this.a)/100,this.format=(n=r.format)!==null&&n!==void 0?n:a.format,this.gradientType=r.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=a.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),r,n,a,o=t.r/255,c=t.g/255,i=t.b/255;return o<=.03928?r=o/12.92:r=Math.pow((o+.055)/1.055,2.4),c<=.03928?n=c/12.92:n=Math.pow((c+.055)/1.055,2.4),i<=.03928?a=i/12.92:a=Math.pow((i+.055)/1.055,2.4),.2126*r+.7152*n+.0722*a},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=Zr(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=st(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=st(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),a=Math.round(t.v*100);return this.a===1?"hsv(".concat(r,", ").concat(n,"%, ").concat(a,"%)"):"hsva(".concat(r,", ").concat(n,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=Zt(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=Zt(this.r,this.g,this.b),r=Math.round(t.h*360),n=Math.round(t.s*100),a=Math.round(t.l*100);return this.a===1?"hsl(".concat(r,", ").concat(n,"%, ").concat(a,"%)"):"hsla(".concat(r,", ").concat(n,"%, ").concat(a,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),ft(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),bo(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),r=Math.round(this.g),n=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(r,", ").concat(n,")"):"rgba(".concat(t,", ").concat(r,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(r){return"".concat(Math.round($(r,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(r){return Math.round($(r,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+ft(this.r,this.g,this.b,!1),r=0,n=Object.entries(dt);r=0,o=!r&&a&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(n=this.toRgbString()),t==="prgb"&&(n=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(n=this.toHexString()),t==="hex3"&&(n=this.toHexString(!0)),t==="hex4"&&(n=this.toHex8String(!0)),t==="hex8"&&(n=this.toHex8String()),t==="name"&&(n=this.toName()),t==="hsl"&&(n=this.toHslString()),t==="hsv"&&(n=this.toHsvString()),n||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l+=t/100,r.l=$e(r.l),new e(r)},e.prototype.brighten=function(t){t===void 0&&(t=10);var r=this.toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(255*-(t/100)))),r.g=Math.max(0,Math.min(255,r.g-Math.round(255*-(t/100)))),r.b=Math.max(0,Math.min(255,r.b-Math.round(255*-(t/100)))),new e(r)},e.prototype.darken=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.l-=t/100,r.l=$e(r.l),new e(r)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s-=t/100,r.s=$e(r.s),new e(r)},e.prototype.saturate=function(t){t===void 0&&(t=10);var r=this.toHsl();return r.s+=t/100,r.s=$e(r.s),new e(r)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var r=this.toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,new e(r)},e.prototype.mix=function(t,r){r===void 0&&(r=50);var n=this.toRgb(),a=new e(t).toRgb(),o=r/100,c={r:(a.r-n.r)*o+n.r,g:(a.g-n.g)*o+n.g,b:(a.b-n.b)*o+n.b,a:(a.a-n.a)*o+n.a};return new e(c)},e.prototype.analogous=function(t,r){t===void 0&&(t=6),r===void 0&&(r=30);var n=this.toHsl(),a=360/r,o=[this];for(n.h=(n.h-(a*t>>1)+720)%360;--t;)n.h=(n.h+a)%360,o.push(new e(n));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var r=this.toHsv(),n=r.h,a=r.s,o=r.v,c=[],i=1/t;t--;)c.push(new e({h:n,s:a,v:o})),o=(o+i)%1;return c},e.prototype.splitcomplement=function(){var t=this.toHsl(),r=t.h;return[this,new e({h:(r+72)%360,s:t.s,l:t.l}),new e({h:(r+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var r=this.toRgb(),n=new e(t).toRgb(),a=r.a+n.a*(1-r.a);return new e({r:(r.r*r.a+n.r*n.a*(1-r.a))/a,g:(r.g*r.a+n.g*n.a*(1-r.a))/a,b:(r.b*r.a+n.b*n.a*(1-r.a))/a,a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var r=this.toHsl(),n=r.h,a=[this],o=360/t,c=1;c=60&&Math.round(e.h)<=240?n=r?Math.round(e.h)-Ie*t:Math.round(e.h)+Ie*t:n=r?Math.round(e.h)+Ie*t:Math.round(e.h)-Ie*t,n<0?n+=360:n>=360&&(n-=360),n}function nr(e,t,r){if(e.h===0&&e.s===0)return e.s;var n;return r?n=e.s-er*t:t===en?n=e.s+er:n=e.s+wo*t,n>1&&(n=1),r&&t===Xr&&n>.1&&(n=.1),n<.06&&(n=.06),Number(n.toFixed(2))}function ar(e,t,r){var n;return r?n=e.v+jo*t:n=e.v-_o*t,n>1&&(n=1),Number(n.toFixed(2))}function Se(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[],n=ue(e),a=Xr;a>0;a-=1){var o=tr(n),c=ke(ue({h:rr(o,a,!0),s:nr(o,a,!0),v:ar(o,a,!0)}));r.push(c)}r.push(ke(n));for(var i=1;i<=en;i+=1){var l=tr(n),s=ke(ue({h:rr(l,i),s:nr(l,i),v:ar(l,i)}));r.push(s)}return t.theme==="dark"?To.map(function(d){var u=d.index,f=d.opacity,p=ke(Ao(ue(t.backgroundColor||"#141414"),ue(r[u]),f*100));return p}):r}var rt={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},nt={},at={};Object.keys(rt).forEach(function(e){nt[e]=Se(rt[e]),nt[e].primary=nt[e][5],at[e]=Se(rt[e],{theme:"dark",backgroundColor:"#141414"}),at[e].primary=at[e][5]});var or=[],he=[],Eo="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function $o(){var e=document.createElement("style");return e.setAttribute("type","text/css"),e}function Mo(e,t){if(t=t||{},e===void 0)throw new Error(Eo);var r=t.prepend===!0?"prepend":"append",n=t.container!==void 0?t.container:document.querySelector("head"),a=or.indexOf(n);a===-1&&(a=or.push(n)-1,he[a]={});var o;return he[a]!==void 0&&he[a][r]!==void 0?o=he[a][r]:(o=he[a][r]=$o(),r==="prepend"?n.insertBefore(o,n.childNodes[0]):n.appendChild(o)),e.charCodeAt(0)===65279&&(e=e.substr(1,e.length)),o.styleSheet?o.styleSheet.cssText+=e:o.textContent+=e,o}function ir(e){for(var t=1;t * { - line-height: 1; -} - -.anticon svg { - display: inline-block; -} - -.anticon::before { - display: none; -} - -.anticon .anticon-icon { - display: block; -} - -.anticon[tabindex] { - cursor: pointer; -} - -.anticon-spin::before, -.anticon-spin { - display: inline-block; - -webkit-animation: loadingCircle 1s infinite linear; - animation: loadingCircle 1s infinite linear; -} - -@-webkit-keyframes loadingCircle { - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} - -@keyframes loadingCircle { - 100% { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} -`,lr=!1,No=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ko;_r(function(){lr||(typeof window<"u"&&window.document&&window.document.documentElement&&Mo(t,{prepend:!0}),lr=!0)})},Fo=["icon","primaryColor","secondaryColor"];function Ro(e,t){if(e==null)return{};var r=Lo(e,t),n,a;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Lo(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o=0)&&(r[a]=e[a]);return r}function Le(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function ti(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,o;for(o=0;o=0)&&(r[a]=e[a]);return r}nn("#1890ff");var k=function(t,r){var n,a=fr({},t,r.attrs),o=a.class,c=a.icon,i=a.spin,l=a.rotate,s=a.tabindex,d=a.twoToneColor,u=a.onClick,f=ei(a,qo),p=(n={anticon:!0},vt(n,"anticon-".concat(c.name),!!c.name),vt(n,o,o),n),g=i===""||i||c.name==="loading"?"anticon-spin":"",x=s;x===void 0&&u&&(x=-1,f.tabindex=x);var m=l?{msTransform:"rotate(".concat(l,"deg)"),transform:"rotate(".concat(l,"deg)")}:void 0,y=rn(d),h=Ko(y,2),w=h[0],O=h[1];return v("span",fr({role:"img","aria-label":c.name},f,{onClick:u,class:p}),[v(ee,{class:g,icon:c,primaryColor:w,secondaryColor:O,style:m},null)])};k.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:String};k.displayName="AntdIcon";k.inheritAttrs=!1;k.getTwoToneColor=Yo;k.setTwoToneColor=nn;function dr(e){for(var t=1;t3?(W=Ae===N)&&(M=F[(j=F[4])?5:(j=3,3)],F[4]=F[5]=n):F[0]<=Je&&((W=z<2&&JeN||N>Ae)&&(F[4]=z,F[5]=N,U.n=Ae,j=0))}if(W||z>1)return s;throw le=!0,N}return function(z,N,W){if(V>1)throw TypeError("Generator is already running");for(le&&N===1&&Te(N,W),j=N,M=W;(a=j<2?n:M)||!le;){_||(j?j<3?(j>1&&(U.n=-1),Te(j,M)):U.n=M:U.v=M);try{if(V=2,_){if(j||(z="next"),a=_[z]){if(!(a=a.call(_,M)))throw TypeError("iterator result is not an object");if(!a.done)return a;M=a.value,j<2&&(j=0)}else j===1&&(a=_.return)&&a.call(_),j<2&&(M=TypeError("The iterator does not provide a '"+z+"' method"),j=1);_=n}else if((a=(le=U.n<0)?M:b.call(P,U))!==s)break}catch(F){_=n,j=1,M=F}finally{V=1}}return{value:a,done:le}}}(m,h,w),!0),S}var s={};function d(){}function u(){}function f(){}a=Object.getPrototypeOf;var p=[][c]?a(a([][c]())):(t(a={},c,function(){return this}),a),g=f.prototype=d.prototype=Object.create(p);function x(m){return Object.setPrototypeOf?Object.setPrototypeOf(m,f):(m.__proto__=f,t(m,i,"GeneratorFunction")),m.prototype=Object.create(g),m}return u.prototype=f,t(g,"constructor",f),t(f,"constructor",u),u.displayName="GeneratorFunction",t(f,i,"GeneratorFunction"),t(g),t(g,i,"Generator"),t(g,c,function(){return this}),t(g,"toString",function(){return"[object Generator]"}),(e.exports=r=function(){return{w:l,m:x}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(hn);var bn=hn.exports,xn={exports:{}},Cn={exports:{}},On={exports:{}};(function(e){var t=gn,r=yn;function n(a,o){function c(l,s,d,u){try{var f=a[l](s),p=f.value;return p instanceof t?o.resolve(p.v).then(function(g){c("next",g,d,u)},function(g){c("throw",g,d,u)}):o.resolve(p).then(function(g){f.value=g,d(f)},function(g){return c("throw",g,d,u)})}catch(g){u(g)}}var i;this.next||(r(n.prototype),r(n.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),r(this,"_invoke",function(l,s,d){function u(){return new o(function(f,p){c(l,d,f,p)})}return i=i?i.then(u,u):u()},!0)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(On);var Sn=On.exports;(function(e){var t=bn,r=Sn;function n(a,o,c,i,l){return new r(t().w(a,o,c,i),l||Promise)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(Cn);var Pn=Cn.exports;(function(e){var t=Pn;function r(n,a,o,c,i){var l=t(n,a,o,c,i);return l.next().then(function(s){return s.done?s.value:l.next()})}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(xn);var bi=xn.exports,wn={exports:{}};(function(e){function t(r){var n=Object(r),a=[];for(var o in n)a.unshift(o);return function c(){for(;a.length;)if((o=a.pop())in n)return c.value=o,c.done=!1,c;return c.done=!0,c}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(wn);var xi=wn.exports,jn={exports:{}},_n={exports:{}};(function(e){function t(r){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(_n);var Ci=_n.exports;(function(e){var t=Ci.default;function r(n){if(n!=null){var a=n[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],o=0;if(a)return a.call(n);if(typeof n.next=="function")return n;if(!isNaN(n.length))return{next:function(){return n&&o>=n.length&&(n=void 0),{value:n&&n[o++],done:!n}}}}throw new TypeError(t(n)+" is not iterable")}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports})(jn);var Oi=jn.exports;(function(e){var t=gn,r=bn,n=bi,a=Pn,o=Sn,c=xi,i=Oi;function l(){var s=r(),d=s.m(l),u=(Object.getPrototypeOf?Object.getPrototypeOf(d):d.__proto__).constructor;function f(x){var m=typeof x=="function"&&x.constructor;return!!m&&(m===u||(m.displayName||m.name)==="GeneratorFunction")}var p={throw:1,return:2,break:3,continue:3};function g(x){var m,y;return function(h){m||(m={stop:function(){return y(h.a,2)},catch:function(){return h.v},abrupt:function(O,S){return y(h.a,p[O],S)},delegateYield:function(O,S,b){return m.resultName=S,y(h.d,i(O),b)},finish:function(O){return y(h.f,O)}},y=function(O,S,b){h.p=m.prev,h.n=m.next;try{return O(S,b)}finally{m.next=h.n}}),m.resultName&&(m[m.resultName]=h.v,m.resultName=void 0),m.sent=h.v,m.next=h.n;try{return x.call(this,m)}finally{h.p=m.prev,h.n=m.next}}}return(e.exports=l=function(){return{wrap:function(y,h,w,O){return s.w(g(y),h,w,O&&O.reverse())},isGeneratorFunction:f,mark:s.m,awrap:function(y,h){return new t(y,h)},AsyncIterator:o,async:function(y,h,w,O,S){return(f(h)?a:n)(g(y),h,w,O,S)},keys:c,values:i}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=l,e.exports.__esModule=!0,e.exports.default=e.exports})(pn);var Si=pn.exports,De=Si(),Pi=De;try{regeneratorRuntime=De}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=De:Function("r","regeneratorRuntime = r")(De)}const $c=Yn(Pi);var wi={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"};function mr(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:An,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:En,n;switch(e){case"topLeft":n={left:"0px",top:t,bottom:"auto"};break;case"topRight":n={right:"0px",top:t,bottom:"auto"};break;case"bottomLeft":n={left:"0px",top:"auto",bottom:r};break;default:n={right:"0px",top:"auto",bottom:r};break}return n}function Ri(e,t){var r=e.prefixCls,n=e.placement,a=n===void 0?$n:n,o=e.getContainer,c=o===void 0?Mn:o,i=e.top,l=e.bottom,s=e.closeIcon,d=s===void 0?In:s,u=e.appContext,f=Qi(),p=f.getPrefixCls,g=p("notification",r||gt),x="".concat(g,"-").concat(a,"-").concat(ht),m=te[x];if(m){Promise.resolve(m).then(function(h){t(h)});return}var y=_e("".concat(g,"-").concat(a),E({},"".concat(g,"-rtl"),ht===!0));We.newInstance({name:"notification",prefixCls:r||gt,class:y,style:Fi(a,i,l),appContext:u,getContainer:c,closeIcon:function(w){var O=w.prefixCls,S=v("span",{class:"".concat(O,"-close-x")},[me(d,{},v(It,{class:"".concat(O,"-close-icon")},null))]);return S},maxCount:kn,hasTransitionName:!0},function(h){te[x]=h,t(h)})}var Li={success:At,info:Et,error:$t,warning:Mt};function Di(e){var t=e.icon,r=e.type,n=e.description,a=e.message,o=e.btn,c=e.duration===void 0?Tn:e.duration;Ri(e,function(i){i.notice({content:function(s){var d=s.prefixCls,u="".concat(d,"-notice"),f=null;if(t)f=function(){return v("span",{class:"".concat(u,"-icon")},[me(t)])};else if(r){var p=Li[r];f=function(){return v(p,{class:"".concat(u,"-icon ").concat(u,"-icon-").concat(r)},null)}}return v("div",{class:f?"".concat(u,"-with-icon"):""},[f&&f(),v("div",{class:"".concat(u,"-message")},[!n&&f?v("span",{class:"".concat(u,"-message-single-line-auto-margin")},null):null,me(a)]),v("div",{class:"".concat(u,"-description")},[me(n)]),o?v("span",{class:"".concat(u,"-btn")},[me(o)]):null])},duration:c,closable:!0,onClose:e.onClose,onClick:e.onClick,key:e.key,style:e.style||{},class:e.class})})}var Pe={open:Di,close:function(t){Object.keys(te).forEach(function(r){return Promise.resolve(te[r]).then(function(n){n.removeNotice(t)})})},config:Ni,destroy:function(){Object.keys(te).forEach(function(t){Promise.resolve(te[t]).then(function(r){r.destroy()}),delete te[t]})}},Hi=["success","info","warning","error"];Hi.forEach(function(e){Pe[e]=function(t){return Pe.open(C(C({},t),{},{type:e}))}});Pe.warn=Pe.warning;function Nn(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var Bi="vc-util-key";function Fn(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):Bi}function kt(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function Or(e){var t,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Nn())return null;var n=document.createElement("style");if((t=r.csp)!==null&&t!==void 0&&t.nonce){var a;n.nonce=(a=r.csp)===null||a===void 0?void 0:a.nonce}n.innerHTML=e;var o=kt(r),c=o.firstChild;return r.prepend&&o.prepend?o.prepend(n):r.prepend&&c?o.insertBefore(n,c):o.appendChild(n),n}var mt=new Map;function zi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=kt(t);return Array.from(mt.get(r).children).find(function(n){return n.tagName==="STYLE"&&n.getAttribute(Fn(t))===e})}function Gi(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=kt(r);if(!mt.has(n)){var a=Or("",r),o=a.parentNode;mt.set(n,o),o.removeChild(a)}var c=zi(t,r);if(c){var i,l;if((i=r.csp)!==null&&i!==void 0&&i.nonce&&c.nonce!==((l=r.csp)===null||l===void 0?void 0:l.nonce)){var s;c.nonce=(s=r.csp)===null||s===void 0?void 0:s.nonce}return c.innerHTML!==e&&(c.innerHTML=e),c}var d=Or(e,r);return d.setAttribute(Fn(r),t),d}const Vi=function(e,t,r){Qr(e,"[ant-design-vue: ".concat(t,"] ").concat(r))};var Ui="-ant-".concat(Date.now(),"-").concat(Math.random());function Wi(e,t){var r={},n=function(d,u){var f=d.clone();return f=(u==null?void 0:u(f))||f,f.toRgbString()},a=function(d,u){var f=new tt(d),p=Se(f.toRgbString());r["".concat(u,"-color")]=n(f),r["".concat(u,"-color-disabled")]=p[1],r["".concat(u,"-color-hover")]=p[4],r["".concat(u,"-color-active")]=p[6],r["".concat(u,"-color-outline")]=f.clone().setAlpha(.2).toRgbString(),r["".concat(u,"-color-deprecated-bg")]=p[1],r["".concat(u,"-color-deprecated-border")]=p[3]};if(t.primaryColor){a(t.primaryColor,"primary");var o=new tt(t.primaryColor),c=Se(o.toRgbString());c.forEach(function(s,d){r["primary-".concat(d+1)]=s}),r["primary-color-deprecated-l-35"]=n(o,function(s){return s.lighten(35)}),r["primary-color-deprecated-l-20"]=n(o,function(s){return s.lighten(20)}),r["primary-color-deprecated-t-20"]=n(o,function(s){return s.tint(20)}),r["primary-color-deprecated-t-50"]=n(o,function(s){return s.tint(50)}),r["primary-color-deprecated-f-12"]=n(o,function(s){return s.setAlpha(s.getAlpha()*.12)});var i=new tt(c[0]);r["primary-color-active-deprecated-f-30"]=n(i,function(s){return s.setAlpha(s.getAlpha()*.3)}),r["primary-color-active-deprecated-d-02"]=n(i,function(s){return s.darken(2)})}t.successColor&&a(t.successColor,"success"),t.warningColor&&a(t.warningColor,"warning"),t.errorColor&&a(t.errorColor,"error"),t.infoColor&&a(t.infoColor,"info");var l=Object.keys(r).map(function(s){return"--".concat(e,"-").concat(s,": ").concat(r[s],";")});Nn()?Gi(` - :root { - `.concat(l.join(` -`),` - } - `),"".concat(Ui,"-dynamic-theme")):Vi(!1,"ConfigProvider","SSR do not support dynamic theme with css variables.")}var Rn=Symbol("GlobalFormContextKey"),Yi=function(t){xt(Rn,t)},Mc=function(){return je(Rn,{validateMessages:A(function(){})})},qi=function(){return{getTargetContainer:{type:Function},getPopupContainer:{type:Function},prefixCls:String,getPrefixCls:{type:Function},renderEmpty:{type:Function},transformCellText:{type:Function},csp:{type:Object,default:void 0},input:{type:Object},autoInsertSpaceInButton:{type:Boolean,default:void 0},locale:{type:Object,default:void 0},pageHeader:{type:Object},componentSize:{type:String},direction:{type:String},space:{type:Object},virtual:{type:Boolean,default:void 0},dropdownMatchSelectWidth:{type:[Number,Boolean],default:!0},form:{type:Object,default:void 0},notUpdateGlobalConfig:Boolean}},Ki="ant";function se(){return D.prefixCls||Ki}var yt=Z({}),Ln=Z({}),D=Z({});Ct(function(){ae(D,yt,Ln),D.prefixCls=se(),D.getPrefixCls=function(e,t){return t||(e?"".concat(D.prefixCls,"-").concat(e):D.prefixCls)},D.getRootPrefixCls=function(e,t){return e||(D.prefixCls?D.prefixCls:t&&t.includes("-")?t.replace(/^(.*)-[^-]*$/,"$1"):se())}});var ot,Ji=function(t){ot&&ot(),ot=Ct(function(){ae(Ln,Z(t)),ae(D,Z(t))}),t.theme&&Wi(se(),t.theme)},Qi=function(){return{getPrefixCls:function(r,n){return n||(r?"".concat(se(),"-").concat(r):se())},getRootPrefixCls:function(r,n){return r||(D.prefixCls?D.prefixCls:n&&n.includes("-")?n.replace(/^(.*)-[^-]*$/,"$1"):se())}}},be=X({compatConfig:{MODE:3},name:"AConfigProvider",inheritAttrs:!1,props:qi(),setup:function(t,r){var n=r.slots,a=function(u,f){var p=t.prefixCls,g=p===void 0?"ant":p;return u?"".concat(g,"-").concat(u):g},o=function(u){var f=t.renderEmpty||n.renderEmpty||Jr;return f(u)},c=function(u,f){var p=t.prefixCls;if(f)return f;var g=p||a("");return u?"".concat(g,"-").concat(u):g},i=Z(C(C({},t),{},{getPrefixCls:c,renderEmpty:o}));Object.keys(t).forEach(function(d){Be(function(){return t[d]},function(){i[d]=t[d]})}),t.notUpdateGlobalConfig||(ae(yt,i),Be(i,function(){ae(yt,i)}));var l=A(function(){var d={};if(t.locale){var u,f;d=((u=t.locale.Form)===null||u===void 0?void 0:u.defaultValidateMessages)||((f=Ve.Form)===null||f===void 0?void 0:f.defaultValidateMessages)||{}}return t.form&&t.form.validateMessages&&(d=C(C({},d),t.form.validateMessages)),d});Yi({validateMessages:l}),xt("configProvider",i);var s=function(u){var f;return v(co,{locale:t.locale||u,ANT_MARK__:ut},{default:function(){return[(f=n.default)===null||f===void 0?void 0:f.call(n)]}})};return Ct(function(){t.direction&&(Ye.config({rtl:t.direction==="rtl"}),Pe.config({rtl:t.direction==="rtl"}))}),function(){return v(Rr,{children:function(u,f,p){return s(p)}},null)}}}),Dn=Z({getPrefixCls:function(t,r){return r||(t?"ant-".concat(t):"ant")},renderEmpty:Jr,direction:"ltr"});be.config=Ji;be.install=function(e){e.component(be.name,be)};const Ke=function(e,t){var r=je("configProvider",Dn),n=A(function(){return r.getPrefixCls(e,t.prefixCls)}),a=A(function(){var h;return(h=t.direction)!==null&&h!==void 0?h:r.direction}),o=A(function(){return r.getPrefixCls()}),c=A(function(){return r.autoInsertSpaceInButton}),i=A(function(){return r.renderEmpty}),l=A(function(){return r.space}),s=A(function(){return r.pageHeader}),d=A(function(){return r.form}),u=A(function(){return t.getTargetContainer||r.getTargetContainer}),f=A(function(){return t.getPopupContainer||r.getPopupContainer}),p=A(function(){var h;return(h=t.dropdownMatchSelectWidth)!==null&&h!==void 0?h:r.dropdownMatchSelectWidth}),g=A(function(){return(t.virtual===void 0?r.virtual!==!1:t.virtual!==!1)&&p.value!==!1}),x=A(function(){return t.size||r.componentSize}),m=A(function(){var h;return t.autocomplete||((h=r.input)===null||h===void 0?void 0:h.autocomplete)}),y=A(function(){return r.csp});return{configProvider:r,prefixCls:n,direction:a,size:x,getTargetContainer:u,getPopupContainer:f,space:l,pageHeader:s,form:d,autoInsertSpaceInButton:c,renderEmpty:i,virtual:g,dropdownMatchSelectWidth:p,rootPrefixCls:o,getPrefixCls:r.getPrefixCls,autocomplete:m,csp:y}};function bt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Zi="[object Symbol]";function Xi(e){return typeof e=="symbol"||wa(e)&&Pa(e)==Zi}var ec=/\s/;function tc(e){for(var t=e.length;t--&&ec.test(e.charAt(t)););return t}var rc=/^\s+/;function nc(e){return e&&e.slice(0,tc(e)+1).replace(rc,"")}var Sr=NaN,ac=/^[-+]0x[0-9a-f]+$/i,oc=/^0b[01]+$/i,ic=/^0o[0-7]+$/i,cc=parseInt;function Pr(e){if(typeof e=="number")return e;if(Xi(e))return Sr;if(bt(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=bt(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=nc(e);var r=oc.test(e);return r||ic.test(e)?cc(e.slice(2),r?2:8):ac.test(e)?Sr:+e}var it=function(){return $r.Date.now()},lc="Expected a function",uc=Math.max,sc=Math.min;function fc(e,t,r){var n,a,o,c,i,l,s=0,d=!1,u=!1,f=!0;if(typeof e!="function")throw new TypeError(lc);t=Pr(t)||0,bt(r)&&(d=!!r.leading,u="maxWait"in r,o=u?uc(Pr(r.maxWait)||0,t):o,f="trailing"in r?!!r.trailing:f);function p(b){var P=n,T=a;return n=a=void 0,s=b,c=e.apply(T,P),c}function g(b){return s=b,i=setTimeout(y,t),d?p(b):c}function x(b){var P=b-l,T=b-s,_=t-P;return u?sc(_,o-T):_}function m(b){var P=b-l,T=b-s;return l===void 0||P>=t||P<0||u&&T>=o}function y(){var b=it();if(m(b))return h(b);i=setTimeout(y,x(b))}function h(b){return i=void 0,f&&n?p(b):(n=a=void 0,c)}function w(){i!==void 0&&clearTimeout(i),s=0,n=l=a=i=void 0}function O(){return i===void 0?c:h(it())}function S(){var b=it(),P=m(b);if(n=arguments,a=this,l=b,P){if(i===void 0)return g(l);if(u)return clearTimeout(i),i=setTimeout(y,t),p(l)}return i===void 0&&(i=setTimeout(y,t)),c}return S.cancel=w,S.flush=O,S}var dc=["class","style"],pc=function(){return{prefixCls:String,spinning:{type:Boolean,default:void 0},size:String,wrapperClassName:String,tip:Oe.any,delay:Number,indicator:Oe.any}},He=null;function vc(e,t){return!!e&&!!t&&!isNaN(Number(t))}function gc(e){var t=e.indicator;He=typeof t=="function"?t:function(){return v(t,null,null)}}const xe=X({compatConfig:{MODE:3},name:"ASpin",inheritAttrs:!1,props:_a(pc(),{size:"default",spinning:!0,wrapperClassName:""}),setup:function(){return{originalUpdateSpinning:null,configProvider:je("configProvider",Dn)}},data:function(){var t=this.spinning,r=this.delay,n=vc(t,r);return{sSpinning:t&&!n}},created:function(){this.originalUpdateSpinning=this.updateSpinning,this.debouncifyUpdateSpinning(this.$props)},mounted:function(){this.updateSpinning()},updated:function(){var t=this;_r(function(){t.debouncifyUpdateSpinning(),t.updateSpinning()})},beforeUnmount:function(){this.cancelExistingSpin()},methods:{debouncifyUpdateSpinning:function(t){var r=t||this.$props,n=r.delay;n&&(this.cancelExistingSpin(),this.updateSpinning=fc(this.originalUpdateSpinning,n))},updateSpinning:function(){var t=this.spinning,r=this.sSpinning;r!==t&&(this.sSpinning=t)},cancelExistingSpin:function(){var t=this.updateSpinning;t&&t.cancel&&t.cancel()},renderIndicator:function(t){var r="".concat(t,"-dot"),n=$a(this,"indicator");return n===null?null:(Array.isArray(n)&&(n=n.length===1?n[0]:n),ne(n)?Rt(n,{class:r}):He&&ne(He())?Rt(He(),{class:r}):v("span",{class:"".concat(r," ").concat(t,"-dot-spin")},[v("i",{class:"".concat(t,"-dot-item")},null),v("i",{class:"".concat(t,"-dot-item")},null),v("i",{class:"".concat(t,"-dot-item")},null),v("i",{class:"".concat(t,"-dot-item")},null)]))}},render:function(){var t,r,n,a=this.$props,o=a.size,c=a.prefixCls,i=a.tip,l=i===void 0?(t=(r=this.$slots).tip)===null||t===void 0?void 0:t.call(r):i,s=a.wrapperClassName,d=this.$attrs,u=d.class,f=d.style,p=Ot(d,dc),g=this.configProvider,x=g.getPrefixCls,m=g.direction,y=x("spin",c),h=this.sSpinning,w=(n={},E(n,y,!0),E(n,"".concat(y,"-sm"),o==="small"),E(n,"".concat(y,"-lg"),o==="large"),E(n,"".concat(y,"-spinning"),h),E(n,"".concat(y,"-show-text"),!!l),E(n,"".concat(y,"-rtl"),m==="rtl"),E(n,u,!!u),n),O=v("div",C(C({},p),{},{style:f,class:w}),[this.renderIndicator(y),l?v("div",{class:"".concat(y,"-text")},[l]):null]),S=Ea(this);if(S&&S.length){var b,P=(b={},E(b,"".concat(y,"-container"),!0),E(b,"".concat(y,"-blur"),h),b);return v("div",{class:["".concat(y,"-nested-loading"),s]},[h&&v("div",{key:"loading"},[O]),v("div",{class:P,key:"container"},[S])])}return O}});xe.setDefaultIndicator=gc;xe.install=function(e){return e.component(xe.name,xe),e};const hc={key:0,src:qn,alt:"Montzar",class:"spinner-brand",width:"48",height:"48"},mc={key:1,class:"loading"},Ic=X({__name:"Spinner",props:{tip:{},size:{default:"large"},cls:{},delay:{},spinning:{type:Boolean},indicator:{type:Boolean},fixed:{type:Boolean,default:!0}},setup(e){return(t,r)=>(Qe(),Un(ct(xe),{spinning:e.spinning,tip:e.tip,size:e.size,delay:e.delay,class:Lt(e.fixed?"!max-h-screen !fixed":"")},{indicator:Dt(()=>[e.indicator?(Qe(),Ht("div",mc,[...r[0]||(r[0]=[Ee("div",{class:"effect-1 effects"},null,-1),Ee("div",{class:"effect-2 effects"},null,-1),Ee("div",{class:"effect-3 effects"},null,-1)])])):(Qe(),Ht("img",hc))]),default:Dt(()=>[Ee("div",{class:Lt(e.cls)},[Wn(t.$slots,"default")],2)]),_:3},8,["spinning","tip","size","delay","class"]))}});export{Nr as $,Tc as A,Gt as B,Ve as C,lo as D,ge as E,jt as F,wt as G,_t as H,k as I,ao as J,kr as K,Pt as L,fc as M,Mc as N,io as O,Oe as P,Ot as Q,Ec as R,Ge as S,Sc as T,Ea as U,Pc as V,Cc as W,$a as X,_c as Y,wc as Z,qn as _,Ic as a,Ac as a0,va as a1,It as a2,Pa as b,ae as c,C as d,la as e,Oc as f,da as g,Er as h,wa as i,sa as j,E as k,Ne as l,_a as m,Vi as n,J as o,Xi as p,Nn as q,Ma as r,_e as s,Pr as t,Ke as u,bt as v,$r as w,ze as x,$c as y,jc as z}; diff --git a/apps/user-app-v2/dist/assets/TransactionsView-BpNfNk05.js b/apps/user-app-v2/dist/assets/TransactionsView-BpNfNk05.js new file mode 100644 index 0000000..91fcf4b --- /dev/null +++ b/apps/user-app-v2/dist/assets/TransactionsView-BpNfNk05.js @@ -0,0 +1 @@ +import{d as k,O as A,o as C,s as D,c as i,p as _,z as f,J as w,j as L,m as E,e as m,g as u,f as l,F as y,b as s,r as N,I as g,t as o,i as p,B as M,_ as O}from"./index-BAr1mMLP.js";import{P}from"./PageBar-B1ks8U8i.js";import{S as B}from"./SectionHead-DadL6umU.js";import{j as R,p as U}from"./filters-Cm9yhZZ9.js";import{D as I}from"./index-DWuFFuVX.js";import"./KeyCode-BMdFtCT-.js";import"./classCallCheck-DDMOgDz1.js";import"./raf-nDFcuFT6.js";const V={class:"tx"},$={class:"tx__list"},z=["onClick"],Y={class:"tx__main"},j={class:"tx__head"},F={class:"tx__kind"},G={key:0,class:"tx__note"},H={class:"tx__foot"},J={class:"tx__date"},K={key:1,class:"tx__empty"},Q={class:"sheet"},W={class:"sheet__specs"},q={class:"sheet__spec"},X={class:"sheet__spec"},Z={class:"sheet__spec"},ss={class:"sheet__spec"},es={class:"sheet__spec"},ts=k({__name:"TransactionsView",setup(os){const x={ORDER_STOCK:"سفارش",ORDER_PRE_ORDER:"سفارش ساخت",REPAYMENT_MELTED_GOLD:"طلای آب‌شده",REPAYMENT_TRANSFER:"حواله",REPAYMENT_CHEQUE:"چک",REPAYMENT_CASH:"پولی",WALLET_BONUS:"پاداش",ADJUSTMENT:"اصلاحیه"},T=A(),r=u(!1),d=u([]),v=u(!1),n=u(null),c=a=>a.direction==="CREDIT",h=a=>a.currency==="GOLD_GRAM"?`${a.amount} گرم`:`${U(a.amount)} ریال`,S=a=>{n.value=a,v.value=!0};return C(async()=>{if(T.isLoggedIn){r.value=!0;try{d.value=await D.getMyLedgerEntries()}finally{r.value=!1}}}),(a,e)=>{const b=M("container");return l(),i("div",V,[_(P,{title:"اسناد","back-to":"userPage::hasSubRoute"}),_(w,{spinning:r.value,tip:"درحال دریافت اطلاعات"},{default:f(()=>[_(b,{class:"tx__body"},{default:f(()=>[d.value.length?(l(),i(y,{key:0},[_(B,{title:"گردش حساب",subtitle:`${d.value.length} سند`},null,8,["subtitle"]),s("div",$,[(l(!0),i(y,null,N(d.value,t=>(l(),i("article",{key:t.id,class:"tx__row",onClick:ns=>S(t)},[s("span",{class:p(["tx__mark",c(t)?"is-in":"is-out"]),"aria-hidden":"true"},[_(g,{icon:c(t)?"vuesax-linear:arrow-down":"vuesax-linear:arrow-up",size:"16"},null,8,["icon"])],2),s("div",Y,[s("div",j,[s("h3",F,o(x[t.sourceType]??t.sourceType),1),s("span",{class:p(["tx__amount",c(t)?"is-in":"is-out"])},o(h(t)),3)]),t.note?(l(),i("p",G,o(t.note),1)):m("",!0),s("div",H,[s("span",J,o(E(R)(t.createdAt)),1),s("span",{class:p(["tx__state",{"is-pending":!t.confirmed}])},o(t.confirmed?"تایید شده":"در انتظار تایید"),3)])])],8,z))),128))])],64)):r.value?m("",!0):(l(),i("section",K,[_(g,{icon:"vuesax-linear:receipt-text",size:"26"}),e[1]||(e[1]=s("p",null,"سندی برای حساب شما ثبت نشده است.",-1))]))]),_:1})]),_:1},8,["spinning"]),n.value?(l(),L(E(I),{key:0,visible:v.value,"onUpdate:visible":e[0]||(e[0]=t=>v.value=t),placement:"bottom",closable:!1,height:"420px",class:"rtl",bodyStyle:{padding:0}},{default:f(()=>[s("div",Q,[e[7]||(e[7]=s("h3",{class:"sheet__title"},"جزئیات سند",-1)),s("dl",W,[s("div",q,[e[2]||(e[2]=s("dt",null,"نوع سند",-1)),s("dd",null,o(x[n.value.sourceType]??n.value.sourceType),1)]),s("div",X,[e[3]||(e[3]=s("dt",null,"مبلغ",-1)),s("dd",{class:p(c(n.value)?"is-in":"is-out")},o(h(n.value)),3)]),s("div",Z,[e[4]||(e[4]=s("dt",null,"وضعیت",-1)),s("dd",null,o(n.value.confirmed?"تایید شده":"در انتظار تایید"),1)]),s("div",ss,[e[5]||(e[5]=s("dt",null,"تاریخ",-1)),s("dd",null,o(E(R)(n.value.createdAt)),1)]),s("div",es,[e[6]||(e[6]=s("dt",null,"توضیحات",-1)),s("dd",null,o(n.value.note||"—"),1)])])])]),_:1},8,["visible"])):m("",!0)])}}}),ps=O(ts,[["__scopeId","data-v-3923099b"]]);export{ps as default}; diff --git a/apps/user-app-v2/dist/assets/TransactionsView-CE67aKDY.css b/apps/user-app-v2/dist/assets/TransactionsView-CE67aKDY.css new file mode 100644 index 0000000..08b2351 --- /dev/null +++ b/apps/user-app-v2/dist/assets/TransactionsView-CE67aKDY.css @@ -0,0 +1 @@ +.tx[data-v-3923099b]{background:var(--c-page);min-height:100vh}.tx__body[data-v-3923099b]{padding-top:76px;padding-bottom:90px}.tx__list[data-v-3923099b]{display:flex;flex-direction:column;gap:10px}.tx__row[data-v-3923099b]{display:flex;gap:11px;padding:12px;cursor:pointer;background:var(--c-canvas);border:1px solid var(--c-hairline);border-radius:18px;transition:transform .18s ease}.tx__row[data-v-3923099b]:active{transform:scale(.99)}.tx__mark[data-v-3923099b]{flex:0 0 36px;width:36px;height:36px;border-radius:50%;display:grid;place-items:center}.tx__mark.is-in[data-v-3923099b]{color:var(--c-green);background:rgb(var(--c-green-rgb) / 10%)}.tx__mark.is-out[data-v-3923099b]{color:var(--c-wine);background:var(--c-wineWash)}.tx__main[data-v-3923099b]{flex:1;min-width:0}.tx__head[data-v-3923099b]{display:flex;align-items:baseline;justify-content:space-between;gap:10px}.tx__kind[data-v-3923099b]{margin:0;font-size:13px;font-weight:700;color:var(--c-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tx__amount[data-v-3923099b]{font-size:12.5px;font-weight:800;white-space:nowrap}.tx__amount.is-in[data-v-3923099b]{color:var(--c-green)}.tx__amount.is-out[data-v-3923099b]{color:var(--c-wine)}.tx__note[data-v-3923099b]{margin:6px 0 0;font-size:11.5px;line-height:1.7;color:var(--c-inkMuted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.tx__foot[data-v-3923099b]{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:8px}.tx__date[data-v-3923099b]{font-size:11px;color:var(--c-inkFaint)}.tx__state[data-v-3923099b]{font-size:10.5px;font-weight:700;color:var(--c-inkMuted)}.tx__state.is-pending[data-v-3923099b]{color:#916f48}.tx__empty[data-v-3923099b]{margin-top:8px;padding:34px 20px;border:1px dashed var(--c-hairline);border-radius:18px;display:flex;flex-direction:column;align-items:center;gap:10px;color:var(--c-inkFaint)}.tx__empty p[data-v-3923099b]{margin:0;font-size:12.5px}.sheet[data-v-3923099b]{padding:18px 16px 22px}.sheet__title[data-v-3923099b]{margin:0 0 14px;font-size:13.5px;font-weight:800;color:var(--c-ink)}.sheet__specs[data-v-3923099b]{margin:0;border:1px solid var(--c-hairline);border-radius:16px;overflow:hidden}.sheet__spec[data-v-3923099b]{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;border-bottom:1px solid var(--c-hairlineSoft)}.sheet__spec[data-v-3923099b]:last-child{border-bottom:0}.sheet__spec dt[data-v-3923099b]{margin:0;font-size:12px;color:var(--c-inkFaint)}.sheet__spec dd[data-v-3923099b]{margin:0;font-size:12.5px;font-weight:700;color:var(--c-ink);text-align:left}.sheet__spec dd.is-in[data-v-3923099b]{color:var(--c-green)}.sheet__spec dd.is-out[data-v-3923099b]{color:var(--c-wine)} diff --git a/apps/user-app-v2/dist/assets/TransactionsView-DtBUcl6Y.css b/apps/user-app-v2/dist/assets/TransactionsView-DtBUcl6Y.css deleted file mode 100644 index 50ee41a..0000000 --- a/apps/user-app-v2/dist/assets/TransactionsView-DtBUcl6Y.css +++ /dev/null @@ -1 +0,0 @@ -.tx[data-v-83b037a9]{background:#fff;min-height:100vh}.tx__body[data-v-83b037a9]{padding-top:76px;padding-bottom:90px}.tx__list[data-v-83b037a9]{display:flex;flex-direction:column;gap:10px}.tx__row[data-v-83b037a9]{display:flex;gap:11px;padding:12px;cursor:pointer;background:#fff;border:1px solid #ECEDEF;border-radius:18px;transition:transform .18s ease}.tx__row[data-v-83b037a9]:active{transform:scale(.99)}.tx__mark[data-v-83b037a9]{flex:0 0 36px;width:36px;height:36px;border-radius:50%;display:grid;place-items:center}.tx__mark.is-in[data-v-83b037a9]{color:#16a34a;background:#f0fdf4}.tx__mark.is-out[data-v-83b037a9]{color:#7a1b33;background:#fbf2f4}.tx__main[data-v-83b037a9]{flex:1;min-width:0}.tx__head[data-v-83b037a9]{display:flex;align-items:baseline;justify-content:space-between;gap:10px}.tx__kind[data-v-83b037a9]{margin:0;font-size:13px;font-weight:700;color:#14161a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tx__amount[data-v-83b037a9]{font-size:12.5px;font-weight:800;white-space:nowrap}.tx__amount.is-in[data-v-83b037a9]{color:#16a34a}.tx__amount.is-out[data-v-83b037a9]{color:#7a1b33}.tx__note[data-v-83b037a9]{margin:6px 0 0;font-size:11.5px;line-height:1.7;color:#5b616e;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.tx__foot[data-v-83b037a9]{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:8px}.tx__date[data-v-83b037a9]{font-size:11px;color:#8a909c}.tx__state[data-v-83b037a9]{font-size:10.5px;font-weight:700;color:#5b616e}.tx__state.is-pending[data-v-83b037a9]{color:#916f48}.tx__empty[data-v-83b037a9]{margin-top:8px;padding:34px 20px;border:1px dashed #ECEDEF;border-radius:18px;display:flex;flex-direction:column;align-items:center;gap:10px;color:#8a909c}.tx__empty p[data-v-83b037a9]{margin:0;font-size:12.5px}.sheet[data-v-83b037a9]{padding:18px 16px 22px}.sheet__title[data-v-83b037a9]{margin:0 0 14px;font-size:13.5px;font-weight:800;color:#14161a}.sheet__specs[data-v-83b037a9]{margin:0;border:1px solid #ECEDEF;border-radius:16px;overflow:hidden}.sheet__spec[data-v-83b037a9]{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;border-bottom:1px solid #F4F5F6}.sheet__spec[data-v-83b037a9]:last-child{border-bottom:0}.sheet__spec dt[data-v-83b037a9]{margin:0;font-size:12px;color:#8a909c}.sheet__spec dd[data-v-83b037a9]{margin:0;font-size:12.5px;font-weight:700;color:#14161a;text-align:left}.sheet__spec dd.is-in[data-v-83b037a9]{color:#16a34a}.sheet__spec dd.is-out[data-v-83b037a9]{color:#7a1b33} diff --git a/apps/user-app-v2/dist/assets/TransactionsView-ErSrFuLg.js b/apps/user-app-v2/dist/assets/TransactionsView-ErSrFuLg.js deleted file mode 100644 index 48106c9..0000000 --- a/apps/user-app-v2/dist/assets/TransactionsView-ErSrFuLg.js +++ /dev/null @@ -1 +0,0 @@ -import{d as k,D as A,o as C,c as i,l as r,q as f,j as D,u as m,e as E,g as u,f as l,F as R,b as s,r as w,I as T,t as o,i as p,s as N,_ as L}from"./index-CZjgV-Yn.js";import{P}from"./PageBar-Bkc2Ht1O.js";import{a as M}from"./Spinner.vue_vue_type_style_index_0_lang-ghXHCVpI.js";import{S as O}from"./SectionHead-CiwUIGKe.js";import{j as g,p as B}from"./filters-CLL9nGZ2.js";import{a as I}from"./client-WIBW0tF5.js";import{D as U}from"./index-Ca8ka09f.js";import"./_commonjsHelpers-Cpj98o6Y.js";import"./classCallCheck-BSDY9VEy.js";const V={class:"tx"},$={class:"tx__list"},Y=["onClick"],j={class:"tx__main"},z={class:"tx__head"},F={class:"tx__kind"},G={key:0,class:"tx__note"},H={class:"tx__foot"},q={class:"tx__date"},J={key:1,class:"tx__empty"},K={class:"sheet"},Q={class:"sheet__specs"},W={class:"sheet__spec"},X={class:"sheet__spec"},Z={class:"sheet__spec"},ss={class:"sheet__spec"},es={class:"sheet__spec"},ts=k({__name:"TransactionsView",setup(os){const x={ORDER_STOCK:"سفارش",ORDER_PRE_ORDER:"سفارش ساخت",REPAYMENT_MELTED_GOLD:"طلای آب‌شده",REPAYMENT_TRANSFER:"حواله",REPAYMENT_CHEQUE:"چک",REPAYMENT_CASH:"پولی",WALLET_BONUS:"پاداش",ADJUSTMENT:"اصلاحیه"},h=A(),_=u(!1),d=u([]),v=u(!1),n=u(null),c=a=>a.direction==="CREDIT",y=a=>a.currency==="GOLD_GRAM"?`${a.amount} گرم`:`${B(a.amount)} ریال`,S=a=>{n.value=a,v.value=!0};return C(async()=>{if(h.customerId){_.value=!0;try{d.value=await I.getLedgerEntries(h.customerId)}finally{_.value=!1}}}),(a,e)=>{const b=N("container");return l(),i("div",V,[r(P,{title:"اسناد","back-to":"userPage::hasSubRoute"}),r(M,{spinning:_.value,tip:"درحال دریافت اطلاعات"},{default:f(()=>[r(b,{class:"tx__body"},{default:f(()=>[d.value.length?(l(),i(R,{key:0},[r(O,{title:"گردش حساب",subtitle:`${d.value.length} سند`},null,8,["subtitle"]),s("div",$,[(l(!0),i(R,null,w(d.value,t=>(l(),i("article",{key:t.id,class:"tx__row",onClick:ns=>S(t)},[s("span",{class:p(["tx__mark",c(t)?"is-in":"is-out"]),"aria-hidden":"true"},[r(T,{icon:c(t)?"vuesax-linear:arrow-down":"vuesax-linear:arrow-up",size:"16"},null,8,["icon"])],2),s("div",j,[s("div",z,[s("h3",F,o(x[t.sourceType]??t.sourceType),1),s("span",{class:p(["tx__amount",c(t)?"is-in":"is-out"])},o(y(t)),3)]),t.note?(l(),i("p",G,o(t.note),1)):E("",!0),s("div",H,[s("span",q,o(m(g)(t.createdAt)),1),s("span",{class:p(["tx__state",{"is-pending":!t.confirmed}])},o(t.confirmed?"تایید شده":"در انتظار تایید"),3)])])],8,Y))),128))])],64)):_.value?E("",!0):(l(),i("section",J,[r(T,{icon:"vuesax-linear:receipt-text",size:"26"}),e[1]||(e[1]=s("p",null,"سندی برای حساب شما ثبت نشده است.",-1))]))]),_:1})]),_:1},8,["spinning"]),n.value?(l(),D(m(U),{key:0,visible:v.value,"onUpdate:visible":e[0]||(e[0]=t=>v.value=t),placement:"bottom",closable:!1,height:"420px",class:"rtl",bodyStyle:{padding:0}},{default:f(()=>[s("div",K,[e[7]||(e[7]=s("h3",{class:"sheet__title"},"جزئیات سند",-1)),s("dl",Q,[s("div",W,[e[2]||(e[2]=s("dt",null,"نوع سند",-1)),s("dd",null,o(x[n.value.sourceType]??n.value.sourceType),1)]),s("div",X,[e[3]||(e[3]=s("dt",null,"مبلغ",-1)),s("dd",{class:p(c(n.value)?"is-in":"is-out")},o(y(n.value)),3)]),s("div",Z,[e[4]||(e[4]=s("dt",null,"وضعیت",-1)),s("dd",null,o(n.value.confirmed?"تایید شده":"در انتظار تایید"),1)]),s("div",ss,[e[5]||(e[5]=s("dt",null,"تاریخ",-1)),s("dd",null,o(m(g)(n.value.createdAt)),1)]),s("div",es,[e[6]||(e[6]=s("dt",null,"توضیحات",-1)),s("dd",null,o(n.value.note||"—"),1)])])])]),_:1},8,["visible"])):E("",!0)])}}}),vs=L(ts,[["__scopeId","data-v-83b037a9"]]);export{vs as default}; diff --git a/apps/user-app-v2/dist/assets/_commonjsHelpers-Cpj98o6Y.js b/apps/user-app-v2/dist/assets/_commonjsHelpers-Cpj98o6Y.js deleted file mode 100644 index b285ce5..0000000 --- a/apps/user-app-v2/dist/assets/_commonjsHelpers-Cpj98o6Y.js +++ /dev/null @@ -1 +0,0 @@ -var o=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}export{o as c,l as g}; diff --git a/apps/user-app-v2/dist/assets/cartStore-CoSoowuC.js b/apps/user-app-v2/dist/assets/cartStore-CoSoowuC.js deleted file mode 100644 index 49b65b3..0000000 --- a/apps/user-app-v2/dist/assets/cartStore-CoSoowuC.js +++ /dev/null @@ -1 +0,0 @@ -import{g as d,u as F,h as i,m as S}from"./index-CZjgV-Yn.js";import{a as P}from"./client-WIBW0tF5.js";function W(t){return!t||t.length===0?null:t.reduce((e,s)=>parseFloat(s.defaultWagePercent){var n,m;return(m=(n=s.value.images)==null?void 0:n[0])==null?void 0:m.url}),o=i(()=>s.value.id),u=i(()=>s.value.title),l=i(()=>s.value.variants),a=d(e??W(F(l))),v=i(()=>a.value?parseFloat(a.value.rashWeightGrams):0),g=i(()=>a.value?parseFloat(a.value.defaultWagePercent):null),x=d(null),h=i(()=>{var n;return((n=a.value)==null?void 0:n.qty)??0}),f=i(()=>{var n;return((n=a.value)==null?void 0:n.isPreOrder)??!1}),y=i(()=>h.value>0||f.value),_=i(()=>s.value.productCode??null),C=d(!1);return{product:s,image:r,id:o,title:u,productCode:_,variants:l,selectedVariant:a,min_gram:v,wage:g,hasDiscountWage:x,qty:h,isPreOrder:f,is_exist:y,has_warranty:C}}const p="appCart";function q(){try{const t=localStorage.getItem(p);return t?JSON.parse(t):[]}catch{return[]}}function c(t){localStorage.setItem(p,JSON.stringify(t))}const G=S("cart",{state:()=>({items:q()}),actions:{async init(){try{const t=await P.listProducts(),e=[];for(const s of this.items){const r=t.find(u=>u.id===s.pid),o=r==null?void 0:r.variants.find(u=>u.id===s.vid);r&&o&&e.push({...s,product:r})}this.items=e,c(this.items)}catch(t){console.log(t)}},addToCart(t){const e=this.find_index(t);e===-1?this.items.push(t):(this.items[e].product=t.product,this.items[e].qty=t.qty),c(this.items)},remove(t){const e=this.find_index(t);e>-1&&this.items.splice(e,1),c(this.items)},updateFeild(t,e,s,r){if(!this.isInCart(s))return!1;const o=e??this.find_index(s);return this.items[o][r]=t,c(this.items),!0},find_index(t){return this.items.findIndex(e=>e.pid===t.pid&&e.vid===t.vid)},isInCart(t){return this.find_index(t)>-1},variant(t){return t.product.variants.find(e=>e.id===t.vid)},total(){return this.items.reduce((t,e)=>{const s=this.variant(e);return t+(s?parseFloat(s.rashWeightGrams)*e.qty:0)},0).toFixed(2)},clear(){this.items=[],c(this.items)}}});export{G as a,I as u}; diff --git a/apps/user-app-v2/dist/assets/classCallCheck-BSDY9VEy.js b/apps/user-app-v2/dist/assets/classCallCheck-BSDY9VEy.js deleted file mode 100644 index 9051345..0000000 --- a/apps/user-app-v2/dist/assets/classCallCheck-BSDY9VEy.js +++ /dev/null @@ -1 +0,0 @@ -import{c as l}from"./Spinner.vue_vue_type_style_index_0_lang-ghXHCVpI.js";var f=function(n){return setTimeout(n,16)},c=function(n){return clearTimeout(n)};typeof window<"u"&&"requestAnimationFrame"in window&&(f=function(n){return window.requestAnimationFrame(n)},c=function(n){return window.cancelAnimationFrame(n)});var i=0,o=new Map;function u(e){o.delete(e)}function w(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;i+=1;var r=i;function a(t){if(t===0)u(r),e();else{var s=f(function(){a(t-1)});o.set(r,s)}}return a(n),r}w.cancel=function(e){var n=o.get(e);return u(n),c(n)};function m(e,n){for(var r=l({},e),a=0;at("/catalog/products"),listCustomers:()=>t("/customers"),getCustomer:e=>t(`/customers/${e}`),getBalance:e=>t(`/accounting/customers/${e}/balance`),getLedgerEntries:e=>t(`/customers/${e}/ledger-entries`),createOrder:e=>t("/orders",{method:"POST",body:JSON.stringify(e)}),getCustomerOrders:e=>t(`/customers/${e}/orders`),getLatestGoldPrice:(e=750)=>t(`/pricing/latest?karatPerMille=${e}`)};export{c as a}; diff --git a/apps/user-app-v2/dist/assets/dialogEmpty1-Caw7F5KL.js b/apps/user-app-v2/dist/assets/dialogEmpty1-Caw7F5KL.js deleted file mode 100644 index b2a778c..0000000 --- a/apps/user-app-v2/dist/assets/dialogEmpty1-Caw7F5KL.js +++ /dev/null @@ -1 +0,0 @@ -const s="/assets/dialogEmpty1-DRc_s2oB.svg";export{s as l}; diff --git a/apps/user-app-v2/dist/assets/favoritEmpty-CIK7qR49.svg b/apps/user-app-v2/dist/assets/favoritEmpty-kbtPAdi5.svg similarity index 100% rename from apps/user-app-v2/dist/assets/favoritEmpty-CIK7qR49.svg rename to apps/user-app-v2/dist/assets/favoritEmpty-kbtPAdi5.svg diff --git a/apps/user-app/dist/assets/filters-CLL9nGZ2.js b/apps/user-app-v2/dist/assets/filters-Cm9yhZZ9.js similarity index 95% rename from apps/user-app/dist/assets/filters-CLL9nGZ2.js rename to apps/user-app-v2/dist/assets/filters-Cm9yhZZ9.js index c74c78b..fd5c369 100644 --- a/apps/user-app/dist/assets/filters-CLL9nGZ2.js +++ b/apps/user-app-v2/dist/assets/filters-Cm9yhZZ9.js @@ -1,4 +1,4 @@ -import{c as yo,g as Mo}from"./_commonjsHelpers-Cpj98o6Y.js";function Do(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var as={exports:{}};(function(n,o){(function(u,l){n.exports=l()})(yo,function(){var u;function l(){return u.apply(null,arguments)}function h(e){u=e}function _(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function p(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function c(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function T(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(c(e,t))return!1;return!0}function F(e){return e===void 0}function C(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function I(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function me(e,t){var r=[],s,a=e.length;for(s=0;s>>0,s;for(s=0;s0)for(r=0;r>>0,s;for(s=0;s0)for(r=0;r=0;return(i?r?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+s}var pt=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Ve=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Yt={},pe={};function M(e,t,r,s){var a=s;typeof s=="string"&&(a=function(){return this[s]()}),e&&(pe[e]=a),t&&(pe[t[0]]=function(){return B(a.apply(this,arguments),t[1],t[2])}),r&&(pe[r]=function(){return this.localeData().ordinal(a.apply(this,arguments),e)})}function ps(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function Ys(e){var t=e.match(pt),r,s;for(r=0,s=t.length;r=0&&Ve.test(e);)e=e.replace(Ve,s),Ve.lastIndex=0,r-=1;return e}var ws={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function gs(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(pt).map(function(s){return s==="MMMM"||s==="MM"||s==="DD"||s==="dddd"?s.slice(1):s}).join(""),this._longDateFormat[e])}var ks="Invalid date";function Ss(){return this._invalidDate}var vs="%d",Os=/\d{1,2}/;function Ts(e){return this._ordinal.replace("%d",e)}var js={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function bs(e,t,r,s){var a=this._relativeTime[r];return q(a)?a(e,t,r,s):a.replace(/%d/i,e)}function xs(e,t){var r=this._relativeTime[e>0?"future":"past"];return q(r)?r(t):r.replace(/%s/i,t)}var ar={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function V(e){return typeof e=="string"?ar[e]||ar[e.toLowerCase()]:void 0}function wt(e){var t={},r,s;for(s in e)c(e,s)&&(r=V(s),r&&(t[r]=e[s]));return t}var Ps={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Ls(e){var t=[],r;for(r in e)c(e,r)&&t.push({unit:r,priority:Ps[r]});return t.sort(function(s,a){return s.priority-a.priority}),t}var nr=/\d/,H=/\d\d/,ir=/\d{3}/,gt=/\d{4}/,ze=/[+-]?\d{6}/,j=/\d\d?/,or=/\d\d\d\d?/,lr=/\d\d\d\d\d\d?/,Ze=/\d{1,3}/,kt=/\d{1,4}/,$e=/[+-]?\d{1,6}/,Ye=/\d+/,Je=/[+-]?\d+/,Ns=/Z|[+-]\d\d:?\d\d/gi,qe=/Z|[+-]\d\d(?::?\d\d)?/gi,Fs=/[+-]?\d+(\.\d{1,3})?/,be=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,we=/^[1-9]\d?/,St=/^([1-9]\d|\d)/,Be;Be={};function y(e,t,r){Be[e]=q(t)?t:function(s,a){return s&&r?r:t}}function Ws(e,t){return c(Be,e)?Be[e](t._strict,t._locale):new RegExp(Rs(e))}function Rs(e){return K(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,r,s,a,i){return r||s||a||i}))}function K(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function G(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function g(e){var t=+e,r=0;return t!==0&&isFinite(t)&&(r=G(t)),r}var vt={};function O(e,t){var r,s=t,a;for(typeof e=="string"&&(e=[e]),C(t)&&(s=function(i,d){d[t]=g(i)}),a=e.length,r=0;r68?1900:2e3)};var ur=ge("FullYear",!0);function Hs(){return Qe(this.year())}function ge(e,t){return function(r){return r!=null?(dr(this,e,r),l.updateOffset(this,t),this):Le(this,e)}}function Le(e,t){if(!e.isValid())return NaN;var r=e._d,s=e._isUTC;switch(t){case"Milliseconds":return s?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return s?r.getUTCSeconds():r.getSeconds();case"Minutes":return s?r.getUTCMinutes():r.getMinutes();case"Hours":return s?r.getUTCHours():r.getHours();case"Date":return s?r.getUTCDate():r.getDate();case"Day":return s?r.getUTCDay():r.getDay();case"Month":return s?r.getUTCMonth():r.getMonth();case"FullYear":return s?r.getUTCFullYear():r.getFullYear();default:return NaN}}function dr(e,t,r){var s,a,i,d,m;if(!(!e.isValid()||isNaN(r))){switch(s=e._d,a=e._isUTC,t){case"Milliseconds":return void(a?s.setUTCMilliseconds(r):s.setMilliseconds(r));case"Seconds":return void(a?s.setUTCSeconds(r):s.setSeconds(r));case"Minutes":return void(a?s.setUTCMinutes(r):s.setMinutes(r));case"Hours":return void(a?s.setUTCHours(r):s.setHours(r));case"Date":return void(a?s.setUTCDate(r):s.setDate(r));case"FullYear":break;default:return}i=r,d=e.month(),m=e.date(),m=m===29&&d===1&&!Qe(i)?28:m,a?s.setUTCFullYear(i,d,m):s.setFullYear(i,d,m)}}function As(e){return e=V(e),q(this[e])?this[e]():this}function Es(e,t){if(typeof e=="object"){e=wt(e);var r=Ls(e),s,a=r.length;for(s=0;s=0?(m=new Date(e+400,t,r,s,a,i,d),isFinite(m.getFullYear())&&m.setFullYear(e)):m=new Date(e,t,r,s,a,i,d),m}function Ne(e){var t,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Xe(e,t,r){var s=7+t-r,a=(7+Ne(e,0,s).getUTCDay()-t)%7;return-a+s-1}function yr(e,t,r,s,a){var i=(7+r-s)%7,d=Xe(e,s,a),m=1+7*(t-1)+i+d,D,k;return m<=0?(D=e-1,k=Pe(D)+m):m>Pe(e)?(D=e+1,k=m-Pe(e)):(D=e,k=m),{year:D,dayOfYear:k}}function Fe(e,t,r){var s=Xe(e.year(),t,r),a=Math.floor((e.dayOfYear()-s-1)/7)+1,i,d;return a<1?(d=e.year()-1,i=a+re(d,t,r)):a>re(e.year(),t,r)?(i=a-re(e.year(),t,r),d=e.year()+1):(d=e.year(),i=a),{week:i,year:d}}function re(e,t,r){var s=Xe(e,t,r),a=Xe(e+1,t,r);return(Pe(e)-s+a)/7}M("w",["ww",2],"wo","week"),M("W",["WW",2],"Wo","isoWeek"),y("w",j,we),y("ww",j,H),y("W",j,we),y("WW",j,H),xe(["w","ww","W","WW"],function(e,t,r,s){t[s.substr(0,1)]=g(e)});function ta(e){return Fe(e,this._week.dow,this._week.doy).week}var ra={dow:0,doy:6};function sa(){return this._week.dow}function aa(){return this._week.doy}function na(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function ia(e){var t=Fe(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}M("d",0,"do","day"),M("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),M("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),M("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),M("e",0,0,"weekday"),M("E",0,0,"isoWeekday"),y("d",j),y("e",j),y("E",j),y("dd",function(e,t){return t.weekdaysMinRegex(e)}),y("ddd",function(e,t){return t.weekdaysShortRegex(e)}),y("dddd",function(e,t){return t.weekdaysRegex(e)}),xe(["dd","ddd","dddd"],function(e,t,r,s){var a=r._locale.weekdaysParse(e,s,r._strict);a!=null?t.d=a:w(r).invalidWeekday=e}),xe(["d","e","E"],function(e,t,r,s){t[s]=g(e)});function oa(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function la(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Tt(e,t){return e.slice(t,7).concat(e.slice(0,t))}var ua="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Mr="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),da="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),fa=be,ha=be,ca=be;function _a(e,t){var r=_(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Tt(r,this._week.dow):e?r[e.day()]:r}function ma(e){return e===!0?Tt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function ya(e){return e===!0?Tt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Ma(e,t,r){var s,a,i,d=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],s=0;s<7;++s)i=J([2e3,1]).day(s),this._minWeekdaysParse[s]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[s]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[s]=this.weekdays(i,"").toLocaleLowerCase();return r?t==="dddd"?(a=N.call(this._weekdaysParse,d),a!==-1?a:null):t==="ddd"?(a=N.call(this._shortWeekdaysParse,d),a!==-1?a:null):(a=N.call(this._minWeekdaysParse,d),a!==-1?a:null):t==="dddd"?(a=N.call(this._weekdaysParse,d),a!==-1||(a=N.call(this._shortWeekdaysParse,d),a!==-1)?a:(a=N.call(this._minWeekdaysParse,d),a!==-1?a:null)):t==="ddd"?(a=N.call(this._shortWeekdaysParse,d),a!==-1||(a=N.call(this._weekdaysParse,d),a!==-1)?a:(a=N.call(this._minWeekdaysParse,d),a!==-1?a:null)):(a=N.call(this._minWeekdaysParse,d),a!==-1||(a=N.call(this._weekdaysParse,d),a!==-1)?a:(a=N.call(this._shortWeekdaysParse,d),a!==-1?a:null))}function Da(e,t,r){var s,a,i;if(this._weekdaysParseExact)return Ma.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),s=0;s<7;s++){if(a=J([2e3,1]).day(s),r&&!this._fullWeekdaysParse[s]&&(this._fullWeekdaysParse[s]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[s]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[s]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[s]||(i="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[s]=new RegExp(i.replace(".",""),"i")),r&&t==="dddd"&&this._fullWeekdaysParse[s].test(e))return s;if(r&&t==="ddd"&&this._shortWeekdaysParse[s].test(e))return s;if(r&&t==="dd"&&this._minWeekdaysParse[s].test(e))return s;if(!r&&this._weekdaysParse[s].test(e))return s}}function pa(e){if(!this.isValid())return e!=null?this:NaN;var t=Le(this,"Day");return e!=null?(e=oa(e,this.localeData()),this.add(e-t,"d")):t}function Ya(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function wa(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=la(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function ga(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||jt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,"_weekdaysRegex")||(this._weekdaysRegex=fa),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function ka(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||jt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ha),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Sa(e){return this._weekdaysParseExact?(c(this,"_weekdaysRegex")||jt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=ca),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function jt(){function e(U,oe){return oe.length-U.length}var t=[],r=[],s=[],a=[],i,d,m,D,k;for(i=0;i<7;i++)d=J([2e3,1]).day(i),m=K(this.weekdaysMin(d,"")),D=K(this.weekdaysShort(d,"")),k=K(this.weekdays(d,"")),t.push(m),r.push(D),s.push(k),a.push(m),a.push(D),a.push(k);t.sort(e),r.sort(e),s.sort(e),a.sort(e),this._weekdaysRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function bt(){return this.hours()%12||12}function va(){return this.hours()||24}M("H",["HH",2],0,"hour"),M("h",["hh",2],0,bt),M("k",["kk",2],0,va),M("hmm",0,0,function(){return""+bt.apply(this)+B(this.minutes(),2)}),M("hmmss",0,0,function(){return""+bt.apply(this)+B(this.minutes(),2)+B(this.seconds(),2)}),M("Hmm",0,0,function(){return""+this.hours()+B(this.minutes(),2)}),M("Hmmss",0,0,function(){return""+this.hours()+B(this.minutes(),2)+B(this.seconds(),2)});function Dr(e,t){M(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Dr("a",!0),Dr("A",!1);function pr(e,t){return t._meridiemParse}y("a",pr),y("A",pr),y("H",j,St),y("h",j,we),y("k",j,we),y("HH",j,H),y("hh",j,H),y("kk",j,H),y("hmm",or),y("hmmss",lr),y("Hmm",or),y("Hmmss",lr),O(["H","HH"],W),O(["k","kk"],function(e,t,r){var s=g(e);t[W]=s===24?0:s}),O(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e}),O(["h","hh"],function(e,t,r){t[W]=g(e),w(r).bigHour=!0}),O("hmm",function(e,t,r){var s=e.length-2;t[W]=g(e.substr(0,s)),t[Z]=g(e.substr(s)),w(r).bigHour=!0}),O("hmmss",function(e,t,r){var s=e.length-4,a=e.length-2;t[W]=g(e.substr(0,s)),t[Z]=g(e.substr(s,2)),t[te]=g(e.substr(a)),w(r).bigHour=!0}),O("Hmm",function(e,t,r){var s=e.length-2;t[W]=g(e.substr(0,s)),t[Z]=g(e.substr(s))}),O("Hmmss",function(e,t,r){var s=e.length-4,a=e.length-2;t[W]=g(e.substr(0,s)),t[Z]=g(e.substr(s,2)),t[te]=g(e.substr(a))});function Oa(e){return(e+"").toLowerCase().charAt(0)==="p"}var Ta=/[ap]\.?m?\.?/i,ja=ge("Hours",!0);function ba(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var Yr={calendar:Ms,longDateFormat:ws,invalidDate:ks,ordinal:vs,dayOfMonthOrdinalParse:Os,relativeTime:js,months:Gs,monthsShort:fr,week:ra,weekdays:ua,weekdaysMin:da,weekdaysShort:Mr,meridiemParse:Ta},P={},We={},Re;function xa(e,t){var r,s=Math.min(e.length,t.length);for(r=0;r0;){if(a=Ke(i.slice(0,r).join("-")),a)return a;if(s&&s.length>=r&&xa(i,s)>=r-1)break;r--}t++}return Re}function La(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Ke(e){var t=null,r;if(P[e]===void 0&&n&&n.exports&&La(e))try{t=Re._abbr,r=Do,r("./locale/"+e),de(t)}catch{P[e]=null}return P[e]}function de(e,t){var r;return e&&(F(t)?r=se(e):r=xt(e,t),r?Re=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Re._abbr}function xt(e,t){if(t!==null){var r,s=Yr;if(t.abbr=e,P[e]!=null)rr("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=P[e]._config;else if(t.parentLocale!=null)if(P[t.parentLocale]!=null)s=P[t.parentLocale]._config;else if(r=Ke(t.parentLocale),r!=null)s=r._config;else return We[t.parentLocale]||(We[t.parentLocale]=[]),We[t.parentLocale].push({name:e,config:t}),null;return P[e]=new Mt(yt(s,t)),We[e]&&We[e].forEach(function(a){xt(a.name,a.config)}),de(e),P[e]}else return delete P[e],null}function Na(e,t){if(t!=null){var r,s,a=Yr;P[e]!=null&&P[e].parentLocale!=null?P[e].set(yt(P[e]._config,t)):(s=Ke(e),s!=null&&(a=s._config),t=yt(a,t),s==null&&(t.abbr=e),r=new Mt(t),r.parentLocale=P[e],P[e]=r),de(e)}else P[e]!=null&&(P[e].parentLocale!=null?(P[e]=P[e].parentLocale,e===de()&&de(e)):P[e]!=null&&delete P[e]);return P[e]}function se(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Re;if(!_(e)){if(t=Ke(e),t)return t;e=[e]}return Pa(e)}function Fa(){return Dt(P)}function Pt(e){var t,r=e._a;return r&&w(e).overflow===-2&&(t=r[ee]<0||r[ee]>11?ee:r[Q]<1||r[Q]>Ot(r[R],r[ee])?Q:r[W]<0||r[W]>24||r[W]===24&&(r[Z]!==0||r[te]!==0||r[ye]!==0)?W:r[Z]<0||r[Z]>59?Z:r[te]<0||r[te]>59?te:r[ye]<0||r[ye]>999?ye:-1,w(e)._overflowDayOfYear&&(tQ)&&(t=Q),w(e)._overflowWeeks&&t===-1&&(t=Us),w(e)._overflowWeekday&&t===-1&&(t=Is),w(e).overflow=t),e}var Wa=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ra=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ca=/Z|[+-]\d\d(?::?\d\d)?/,et=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Lt=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ua=/^\/?Date\((-?\d+)/i,Ia=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Ha={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function gr(e){var t,r,s=e._i,a=Wa.exec(s)||Ra.exec(s),i,d,m,D,k=et.length,U=Lt.length;if(a){for(w(e).iso=!0,t=0,r=k;tPe(d)||e._dayOfYear===0)&&(w(e)._overflowDayOfYear=!0),r=Ne(d,0,e._dayOfYear),e._a[ee]=r.getUTCMonth(),e._a[Q]=r.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=s[t]=a[t];for(;t<7;t++)e._a[t]=s[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[W]===24&&e._a[Z]===0&&e._a[te]===0&&e._a[ye]===0&&(e._nextDay=!0,e._a[W]=0),e._d=(e._useUTC?Ne:ea).apply(null,s),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[W]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==i&&(w(e).weekdayMismatch=!0)}}function Ja(e){var t,r,s,a,i,d,m,D,k;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(i=1,d=4,r=ke(t.GG,e._a[R],Fe(b(),1,4).year),s=ke(t.W,1),a=ke(t.E,1),(a<1||a>7)&&(D=!0)):(i=e._locale._week.dow,d=e._locale._week.doy,k=Fe(b(),i,d),r=ke(t.gg,e._a[R],k.year),s=ke(t.w,k.week),t.d!=null?(a=t.d,(a<0||a>6)&&(D=!0)):t.e!=null?(a=t.e+i,(t.e<0||t.e>6)&&(D=!0)):a=i),s<1||s>re(r,i,d)?w(e)._overflowWeeks=!0:D!=null?w(e)._overflowWeekday=!0:(m=yr(r,s,a,i,d),e._a[R]=m.year,e._dayOfYear=m.dayOfYear)}l.ISO_8601=function(){},l.RFC_2822=function(){};function Ft(e){if(e._f===l.ISO_8601){gr(e);return}if(e._f===l.RFC_2822){kr(e);return}e._a=[],w(e).empty=!0;var t=""+e._i,r,s,a,i,d,m=t.length,D=0,k,U;for(a=sr(e._f,e._locale).match(pt)||[],U=a.length,r=0;r0&&w(e).unusedInput.push(d),t=t.slice(t.indexOf(s)+s.length),D+=s.length),pe[i]?(s?w(e).empty=!1:w(e).unusedTokens.push(i),Cs(i,s,e)):e._strict&&!s&&w(e).unusedTokens.push(i);w(e).charsLeftOver=m-D,t.length>0&&w(e).unusedInput.push(t),e._a[W]<=12&&w(e).bigHour===!0&&e._a[W]>0&&(w(e).bigHour=void 0),w(e).parsedDateParts=e._a.slice(0),w(e).meridiem=e._meridiem,e._a[W]=qa(e._locale,e._a[W],e._meridiem),k=w(e).era,k!==null&&(e._a[R]=e._locale.erasConvertYear(k,e._a[R])),Nt(e),Pt(e)}function qa(e,t,r){var s;return r==null?t:e.meridiemHour!=null?e.meridiemHour(t,r):(e.isPM!=null&&(s=e.isPM(r),s&&t<12&&(t+=12),!s&&t===12&&(t=0)),t)}function Ba(e){var t,r,s,a,i,d,m=!1,D=e._f.length;if(D===0){w(e).invalidFormat=!0,e._d=new Date(NaN);return}for(a=0;athis?this:e:Ee()});function Or(e,t){var r,s;if(t.length===1&&_(t[0])&&(t=t[0]),!t.length)return b();for(r=t[0],s=1;sthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Dn(){if(!F(this._isDSTShifted))return this._isDSTShifted;var e={},t;return mt(e,this),e=Sr(e),e._a?(t=e._isUTC?J(e._a):b(e._a),this._isDSTShifted=this.isValid()&&un(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function pn(){return this.isValid()?!this._isUTC:!1}function Yn(){return this.isValid()?this._isUTC:!1}function jr(){return this.isValid()?this._isUTC&&this._offset===0:!1}var wn=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,gn=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function $(e,t){var r=e,s=null,a,i,d;return rt(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:C(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(s=wn.exec(e))?(a=s[1]==="-"?-1:1,r={y:0,d:g(s[Q])*a,h:g(s[W])*a,m:g(s[Z])*a,s:g(s[te])*a,ms:g(Wt(s[ye]*1e3))*a}):(s=gn.exec(e))?(a=s[1]==="-"?-1:1,r={y:Me(s[2],a),M:Me(s[3],a),w:Me(s[4],a),d:Me(s[5],a),h:Me(s[6],a),m:Me(s[7],a),s:Me(s[8],a)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(d=kn(b(r.from),b(r.to)),r={},r.ms=d.milliseconds,r.M=d.months),i=new tt(r),rt(e)&&c(e,"_locale")&&(i._locale=e._locale),rt(e)&&c(e,"_isValid")&&(i._isValid=e._isValid),i}$.fn=tt.prototype,$.invalid=ln;function Me(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function br(e,t){var r={};return r.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function kn(e,t){var r;return e.isValid()&&t.isValid()?(t=Ct(t,e),e.isBefore(t)?r=br(e,t):(r=br(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function xr(e,t){return function(r,s){var a,i;return s!==null&&!isNaN(+s)&&(rr(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=r,r=s,s=i),a=$(r,s),Pr(this,a,e),this}}function Pr(e,t,r,s){var a=t._milliseconds,i=Wt(t._days),d=Wt(t._months);e.isValid()&&(s=s??!0,d&&cr(e,Le(e,"Month")+d*r),i&&dr(e,"Date",Le(e,"Date")+i*r),a&&e._d.setTime(e._d.valueOf()+a*r),s&&l.updateOffset(e,i||d))}var Sn=xr(1,"add"),vn=xr(-1,"subtract");function Lr(e){return typeof e=="string"||e instanceof String}function On(e){return z(e)||I(e)||Lr(e)||C(e)||jn(e)||Tn(e)||e===null||e===void 0}function Tn(e){var t=p(e)&&!T(e),r=!1,s=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],a,i,d=s.length;for(a=0;ar.valueOf():r.valueOf()9999?Ge(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):q(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Ge(r,"Z")):Ge(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function En(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,s,a,i;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),r="["+e+'("]',s=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",a="-MM-DD[T]HH:mm:ss.SSS",i=t+'[")]',this.format(r+s+a+i)}function Vn(e){e||(e=this.isUtc()?l.defaultFormatUtc:l.defaultFormat);var t=Ge(this,e);return this.localeData().postformat(t)}function Gn(e,t){return this.isValid()&&(z(e)&&e.isValid()||b(e).isValid())?$({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function zn(e){return this.from(b(),e)}function Zn(e,t){return this.isValid()&&(z(e)&&e.isValid()||b(e).isValid())?$({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function $n(e){return this.to(b(),e)}function Nr(e){var t;return e===void 0?this._locale._abbr:(t=se(e),t!=null&&(this._locale=t),this)}var Fr=E("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Wr(){return this._locale}var at=1e3,Se=60*at,nt=60*Se,Rr=(365*400+97)*24*nt;function ve(e,t){return(e%t+t)%t}function Cr(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-Rr:new Date(e,t,r).valueOf()}function Ur(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-Rr:Date.UTC(e,t,r)}function Jn(e){var t,r;if(e=V(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?Ur:Cr,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=ve(t+(this._isUTC?0:this.utcOffset()*Se),nt);break;case"minute":t=this._d.valueOf(),t-=ve(t,Se);break;case"second":t=this._d.valueOf(),t-=ve(t,at);break}return this._d.setTime(t),l.updateOffset(this,!0),this}function qn(e){var t,r;if(e=V(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?Ur:Cr,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=nt-ve(t+(this._isUTC?0:this.utcOffset()*Se),nt)-1;break;case"minute":t=this._d.valueOf(),t+=Se-ve(t,Se)-1;break;case"second":t=this._d.valueOf(),t+=at-ve(t,at)-1;break}return this._d.setTime(t),l.updateOffset(this,!0),this}function Bn(){return this._d.valueOf()-(this._offset||0)*6e4}function Qn(){return Math.floor(this.valueOf()/1e3)}function Xn(){return new Date(this.valueOf())}function Kn(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function ei(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function ti(){return this.isValid()?this.toISOString():null}function ri(){return ct(this)}function si(){return ue({},w(this))}function ai(){return w(this).overflow}function ni(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}M("N",0,0,"eraAbbr"),M("NN",0,0,"eraAbbr"),M("NNN",0,0,"eraAbbr"),M("NNNN",0,0,"eraName"),M("NNNNN",0,0,"eraNarrow"),M("y",["y",1],"yo","eraYear"),M("y",["yy",2],0,"eraYear"),M("y",["yyy",3],0,"eraYear"),M("y",["yyyy",4],0,"eraYear"),y("N",It),y("NN",It),y("NNN",It),y("NNNN",yi),y("NNNNN",Mi),O(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,s){var a=r._locale.erasParse(e,s,r._strict);a?w(r).era=a:w(r).invalidEra=e}),y("y",Ye),y("yy",Ye),y("yyy",Ye),y("yyyy",Ye),y("yo",Di),O(["y","yy","yyy","yyyy"],R),O(["yo"],function(e,t,r,s){var a;r._locale._eraYearOrdinalRegex&&(a=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[R]=r._locale.eraYearOrdinalParse(e,a):t[R]=parseInt(e,10)});function ii(e,t){var r,s,a,i=this._eras||se("en")._eras;for(r=0,s=i.length;r=0)return i[s]}function li(e,t){var r=e.since<=e.until?1:-1;return t===void 0?l(e.since).year():l(e.since).year()+(t-e.offset)*r}function ui(){var e,t,r,s=this.localeData().eras();for(e=0,t=s.length;ei&&(t=i),vi.call(this,e,t,r,s,a))}function vi(e,t,r,s,a){var i=yr(e,t,r,s,a),d=Ne(i.year,0,i.dayOfYear);return this.year(d.getUTCFullYear()),this.month(d.getUTCMonth()),this.date(d.getUTCDate()),this}M("Q",0,"Qo","quarter"),y("Q",nr),O("Q",function(e,t){t[ee]=(g(e)-1)*3});function Oi(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}M("D",["DD",2],"Do","date"),y("D",j,we),y("DD",j,H),y("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),O(["D","DD"],Q),O("Do",function(e,t){t[Q]=g(e.match(j)[0])});var Hr=ge("Date",!0);M("DDD",["DDDD",3],"DDDo","dayOfYear"),y("DDD",Ze),y("DDDD",ir),O(["DDD","DDDD"],function(e,t,r){r._dayOfYear=g(e)});function Ti(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}M("m",["mm",2],0,"minute"),y("m",j,St),y("mm",j,H),O(["m","mm"],Z);var ji=ge("Minutes",!1);M("s",["ss",2],0,"second"),y("s",j,St),y("ss",j,H),O(["s","ss"],te);var bi=ge("Seconds",!1);M("S",0,0,function(){return~~(this.millisecond()/100)}),M(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),M(0,["SSS",3],0,"millisecond"),M(0,["SSSS",4],0,function(){return this.millisecond()*10}),M(0,["SSSSS",5],0,function(){return this.millisecond()*100}),M(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),M(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),M(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),M(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),y("S",Ze,nr),y("SS",Ze,H),y("SSS",Ze,ir);var fe,Ar;for(fe="SSSS";fe.length<=9;fe+="S")y(fe,Ye);function xi(e,t){t[ye]=g(("0."+e)*1e3)}for(fe="S";fe.length<=9;fe+="S")O(fe,xi);Ar=ge("Milliseconds",!1),M("z",0,0,"zoneAbbr"),M("zz",0,0,"zoneName");function Pi(){return this._isUTC?"UTC":""}function Li(){return this._isUTC?"Coordinated Universal Time":""}var f=je.prototype;f.add=Sn,f.calendar=Pn,f.clone=Ln,f.diff=In,f.endOf=qn,f.format=Vn,f.from=Gn,f.fromNow=zn,f.to=Zn,f.toNow=$n,f.get=As,f.invalidAt=ai,f.isAfter=Nn,f.isBefore=Fn,f.isBetween=Wn,f.isSame=Rn,f.isSameOrAfter=Cn,f.isSameOrBefore=Un,f.isValid=ri,f.lang=Fr,f.locale=Nr,f.localeData=Wr,f.max=tn,f.min=en,f.parsingFlags=si,f.set=Es,f.startOf=Jn,f.subtract=vn,f.toArray=Kn,f.toObject=ei,f.toDate=Xn,f.toISOString=An,f.inspect=En,typeof Symbol<"u"&&Symbol.for!=null&&(f[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),f.toJSON=ti,f.toString=Hn,f.unix=Qn,f.valueOf=Bn,f.creationData=ni,f.eraName=ui,f.eraNarrow=di,f.eraAbbr=fi,f.eraYear=hi,f.year=ur,f.isLeapYear=Hs,f.weekYear=pi,f.isoWeekYear=Yi,f.quarter=f.quarters=Oi,f.month=_r,f.daysInMonth=Qs,f.week=f.weeks=na,f.isoWeek=f.isoWeeks=ia,f.weeksInYear=ki,f.weeksInWeekYear=Si,f.isoWeeksInYear=wi,f.isoWeeksInISOWeekYear=gi,f.date=Hr,f.day=f.days=pa,f.weekday=Ya,f.isoWeekday=wa,f.dayOfYear=Ti,f.hour=f.hours=ja,f.minute=f.minutes=ji,f.second=f.seconds=bi,f.millisecond=f.milliseconds=Ar,f.utcOffset=fn,f.utc=cn,f.local=_n,f.parseZone=mn,f.hasAlignedHourOffset=yn,f.isDST=Mn,f.isLocal=pn,f.isUtcOffset=Yn,f.isUtc=jr,f.isUTC=jr,f.zoneAbbr=Pi,f.zoneName=Li,f.dates=E("dates accessor is deprecated. Use date instead.",Hr),f.months=E("months accessor is deprecated. Use month instead",_r),f.years=E("years accessor is deprecated. Use year instead",ur),f.zone=E("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",hn),f.isDSTShifted=E("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Dn);function Ni(e){return b(e*1e3)}function Fi(){return b.apply(null,arguments).parseZone()}function Er(e){return e}var v=Mt.prototype;v.calendar=Ds,v.longDateFormat=gs,v.invalidDate=Ss,v.ordinal=Ts,v.preparse=Er,v.postformat=Er,v.relativeTime=bs,v.pastFuture=xs,v.set=ys,v.eras=ii,v.erasParse=oi,v.erasConvertYear=li,v.erasAbbrRegex=_i,v.erasNameRegex=ci,v.erasNarrowRegex=mi,v.months=$s,v.monthsShort=Js,v.monthsParse=Bs,v.monthsRegex=Ks,v.monthsShortRegex=Xs,v.week=ta,v.firstDayOfYear=aa,v.firstDayOfWeek=sa,v.weekdays=_a,v.weekdaysMin=ya,v.weekdaysShort=ma,v.weekdaysParse=Da,v.weekdaysRegex=ga,v.weekdaysShortRegex=ka,v.weekdaysMinRegex=Sa,v.isPM=Oa,v.meridiem=ba;function ot(e,t,r,s){var a=se(),i=J().set(s,t);return a[r](i,e)}function Vr(e,t,r){if(C(e)&&(t=e,e=void 0),e=e||"",t!=null)return ot(e,t,r,"month");var s,a=[];for(s=0;s<12;s++)a[s]=ot(e,s,r,"month");return a}function At(e,t,r,s){typeof e=="boolean"?(C(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,C(t)&&(r=t,t=void 0),t=t||"");var a=se(),i=e?a._week.dow:0,d,m=[];if(r!=null)return ot(t,(r+i)%7,s,"day");for(d=0;d<7;d++)m[d]=ot(t,(d+i)%7,s,"day");return m}function Wi(e,t){return Vr(e,t,"months")}function Ri(e,t){return Vr(e,t,"monthsShort")}function Ci(e,t,r){return At(e,t,r,"weekdays")}function Ui(e,t,r){return At(e,t,r,"weekdaysShort")}function Ii(e,t,r){return At(e,t,r,"weekdaysMin")}de("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,r=g(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+r}}),l.lang=E("moment.lang is deprecated. Use moment.locale instead.",de),l.langData=E("moment.langData is deprecated. Use moment.localeData instead.",se);var ae=Math.abs;function Hi(){var e=this._data;return this._milliseconds=ae(this._milliseconds),this._days=ae(this._days),this._months=ae(this._months),e.milliseconds=ae(e.milliseconds),e.seconds=ae(e.seconds),e.minutes=ae(e.minutes),e.hours=ae(e.hours),e.months=ae(e.months),e.years=ae(e.years),this}function Gr(e,t,r,s){var a=$(t,r);return e._milliseconds+=s*a._milliseconds,e._days+=s*a._days,e._months+=s*a._months,e._bubble()}function Ai(e,t){return Gr(this,e,t,1)}function Ei(e,t){return Gr(this,e,t,-1)}function zr(e){return e<0?Math.floor(e):Math.ceil(e)}function Vi(){var e=this._milliseconds,t=this._days,r=this._months,s=this._data,a,i,d,m,D;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=zr(Et(r)+t)*864e5,t=0,r=0),s.milliseconds=e%1e3,a=G(e/1e3),s.seconds=a%60,i=G(a/60),s.minutes=i%60,d=G(i/60),s.hours=d%24,t+=G(d/24),D=G(Zr(t)),r+=D,t-=zr(Et(D)),m=G(r/12),r%=12,s.days=t,s.months=r,s.years=m,this}function Zr(e){return e*4800/146097}function Et(e){return e*146097/4800}function Gi(e){if(!this.isValid())return NaN;var t,r,s=this._milliseconds;if(e=V(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+s/864e5,r=this._months+Zr(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Et(this._months)),e){case"week":return t/7+s/6048e5;case"day":return t+s/864e5;case"hour":return t*24+s/36e5;case"minute":return t*1440+s/6e4;case"second":return t*86400+s/1e3;case"millisecond":return Math.floor(t*864e5)+s;default:throw new Error("Unknown unit "+e)}}function ne(e){return function(){return this.as(e)}}var $r=ne("ms"),zi=ne("s"),Zi=ne("m"),$i=ne("h"),Ji=ne("d"),qi=ne("w"),Bi=ne("M"),Qi=ne("Q"),Xi=ne("y"),Ki=$r;function eo(){return $(this)}function to(e){return e=V(e),this.isValid()?this[e+"s"]():NaN}function De(e){return function(){return this.isValid()?this._data[e]:NaN}}var ro=De("milliseconds"),so=De("seconds"),ao=De("minutes"),no=De("hours"),io=De("days"),oo=De("months"),lo=De("years");function uo(){return G(this.days()/7)}var ie=Math.round,Oe={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function fo(e,t,r,s,a){return a.relativeTime(t||1,!!r,e,s)}function ho(e,t,r,s){var a=$(e).abs(),i=ie(a.as("s")),d=ie(a.as("m")),m=ie(a.as("h")),D=ie(a.as("d")),k=ie(a.as("M")),U=ie(a.as("w")),oe=ie(a.as("y")),he=i<=r.ss&&["s",i]||i0,he[4]=s,fo.apply(null,he)}function co(e){return e===void 0?ie:typeof e=="function"?(ie=e,!0):!1}function _o(e,t){return Oe[e]===void 0?!1:t===void 0?Oe[e]:(Oe[e]=t,e==="s"&&(Oe.ss=t-1),!0)}function mo(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,s=Oe,a,i;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(s=Object.assign({},Oe,t),t.s!=null&&t.ss==null&&(s.ss=t.s-1)),a=this.localeData(),i=ho(this,!r,s,a),r&&(i=a.pastFuture(+this,i)),a.postformat(i)}var Vt=Math.abs;function Te(e){return(e>0)-(e<0)||+e}function lt(){if(!this.isValid())return this.localeData().invalidDate();var e=Vt(this._milliseconds)/1e3,t=Vt(this._days),r=Vt(this._months),s,a,i,d,m=this.asSeconds(),D,k,U,oe;return m?(s=G(e/60),a=G(s/60),e%=60,s%=60,i=G(r/12),r%=12,d=e?e.toFixed(3).replace(/\.?0+$/,""):"",D=m<0?"-":"",k=Te(this._months)!==Te(m)?"-":"",U=Te(this._days)!==Te(m)?"-":"",oe=Te(this._milliseconds)!==Te(m)?"-":"",D+"P"+(i?k+i+"Y":"")+(r?k+r+"M":"")+(t?U+t+"D":"")+(a||s||e?"T":"")+(a?oe+a+"H":"")+(s?oe+s+"M":"")+(e?oe+d+"S":"")):"P0D"}var S=tt.prototype;S.isValid=on,S.abs=Hi,S.add=Ai,S.subtract=Ei,S.as=Gi,S.asMilliseconds=$r,S.asSeconds=zi,S.asMinutes=Zi,S.asHours=$i,S.asDays=Ji,S.asWeeks=qi,S.asMonths=Bi,S.asQuarters=Qi,S.asYears=Xi,S.valueOf=Ki,S._bubble=Vi,S.clone=eo,S.get=to,S.milliseconds=ro,S.seconds=so,S.minutes=ao,S.hours=no,S.days=io,S.weeks=uo,S.months=oo,S.years=lo,S.humanize=mo,S.toISOString=lt,S.toString=lt,S.toJSON=lt,S.locale=Nr,S.localeData=Wr,S.toIsoString=E("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",lt),S.lang=Fr,M("X",0,0,"unix"),M("x",0,0,"valueOf"),y("x",Je),y("X",Fs),O("X",function(e,t,r){r._d=new Date(parseFloat(e)*1e3)}),O("x",function(e,t,r){r._d=new Date(g(e))});//! moment.js diff --git a/apps/user-app/dist/assets/index-CBZSLIgu.js b/apps/user-app-v2/dist/assets/index-BAr1mMLP.js similarity index 63% rename from apps/user-app/dist/assets/index-CBZSLIgu.js rename to apps/user-app-v2/dist/assets/index-BAr1mMLP.js index 6b293f1..c42f08e 100644 --- a/apps/user-app/dist/assets/index-CBZSLIgu.js +++ b/apps/user-app-v2/dist/assets/index-BAr1mMLP.js @@ -1,44 +1,39 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HomeView-CRWeDhDU.js","assets/Spinner.vue_vue_type_style_index_0_lang-DQwH-Xdy.js","assets/_commonjsHelpers-Cpj98o6Y.js","assets/Spinner-CNMYSNQh.css","assets/SingleProduct-DssXZ7g8.js","assets/NotifyVant.vue_vue_type_script_setup_true_lang-BZS-5R5g.js","assets/DialogVant.vue_vue_type_style_index_0_lang-CINs34e0.js","assets/DialogVant-DxmIm7bG.css","assets/cartStore-CAFgxy6H.js","assets/client-CJxy5iKa.js","assets/dialogEmpty1-Caw7F5KL.js","assets/SingleProduct-DPEnEdjz.css","assets/RateStrip-DenPQ3DT.js","assets/filters-CLL9nGZ2.js","assets/RateStrip-DohuneFP.css","assets/SectionHead-QOHixgma.js","assets/SectionHead-CldEyeHO.css","assets/filtersStore-CTKLivNl.js","assets/index-B7hHgu-D.js","assets/index-CUVFR_Bx.js","assets/classCallCheck-R2Fkn3Yh.js","assets/HomeView-C9w04Nlc.css","assets/NewestView-DtmcOiJN.js","assets/PageBar-BrfQrql1.js","assets/PageBar-Bu_ZJ2Zu.css","assets/ProductCard-Dj_Eu2VB.js","assets/ProductCard-Cn3qLCse.css","assets/NewestView-D-q-nm4Q.css","assets/CartView-Bz867OrP.js","assets/index-DhY79V3c.js","assets/FormItemContext-ByaoQ3t8.js","assets/CartView-DFvgp1Pt.css","assets/LoginRegisterView-CfYXrVGb.js","assets/LoginRegisterView-B7DR4Q72.css","assets/DashboardView-CpfMS70r.js","assets/DashboardView-DsIIkW4Q.css","assets/OrdersView-CU0UPays.js","assets/SearchInput-ChlTMHga.js","assets/SearchInput-CF6DHCU-.css","assets/OrdersView-XheLpdhr.css","assets/TransactionsView-CyfV2zci.js","assets/TransactionsView-DtBUcl6Y.css","assets/ProfileView-iUFrvwpr.js","assets/ProfileView-CPyo29sC.css","assets/FavoritesView-CBkkcvfZ.js","assets/FavoritesView-Lyqq3dqN.css","assets/NotificationsView-BVjfsl9P.js","assets/NotificationsView-CSZgMF1r.css","assets/SearchView-BsJur4gA.js","assets/SearchView-BMkMPZ_4.css","assets/CollectionView-BYIAr_7T.js","assets/CollectionView-CLNeGS0w.css"])))=>i.map(i=>d[i]); -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))n(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)}).observe(document,{childList:!0,subtree:!0});function o(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(r){if(r.ep)return;r.ep=!0;const i=o(r);fetch(r.href,i)}})();/** +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HomeView-Cl6D8_Sy.js","assets/RateStrip-DvVfajyI.js","assets/filters-Cm9yhZZ9.js","assets/RateStrip-BjkE-E9D.css","assets/index-DPSZMLNJ.js","assets/HomeView-BsWyRfva.css","assets/NewestView-BU18f8_c.js","assets/PageBar-B1ks8U8i.js","assets/PageBar-CKAnfXNs.css","assets/SectionHead-DadL6umU.js","assets/SectionHead-X7JFvmOG.css","assets/ProductCard-4TPJHHsT.js","assets/ProductCard-C8bieA3Y.css","assets/NewestView-D2rB4-Sw.css","assets/CartView-KYhz2yxy.js","assets/index-DWuFFuVX.js","assets/KeyCode-BMdFtCT-.js","assets/classCallCheck-DDMOgDz1.js","assets/raf-nDFcuFT6.js","assets/index-BkhudXey.js","assets/FormItemContext-YTkEF048.js","assets/CartView-DKfSBWzV.css","assets/LoginRegisterView-DruItYRS.js","assets/LoginRegisterView-CBenlDic.css","assets/DashboardView-F1CUJWd2.js","assets/DashboardView-DcUY6mzx.css","assets/OrdersView-DENQ-Etu.js","assets/SearchInput-vVDQz-rO.js","assets/SearchInput-DEfgrsbu.css","assets/OrdersView-BULq1WHJ.css","assets/TransactionsView-BpNfNk05.js","assets/TransactionsView-CE67aKDY.css","assets/ProfileView-C1gjwKvq.js","assets/ProfileView-umP5Sgbh.css","assets/FavoritesView-KwTaarkp.js","assets/FavoritesView-ChC1yylj.css","assets/AppearanceView-Cs0B0IPW.js","assets/AppearanceView-B8ytXsfh.css","assets/ChildOrdersView-C9qT9wGg.js","assets/ChildOrdersView-BSUeH1Jr.css","assets/CustomerChoiceView-AilyPwLn.js","assets/CustomerChoiceView-H1FeybTn.css","assets/CompleteProfileView-Bbq7Qgyl.js","assets/CompleteProfileView-Cy-typLQ.css","assets/ReportView-DdQlxLKa.js","assets/ReportView-tLoo_9HZ.css","assets/NotificationsView-BMMkA8pk.js","assets/NotificationsView-BYJ2kMU3.css","assets/SearchView-C9JtP0Ya.js","assets/SearchView-CS1oUiFo.css","assets/CollectionView-Bm2v65eC.js","assets/CollectionView-hOc6F2Q6.css"])))=>i.map(i=>d[i]); +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&o(s)}).observe(document,{childList:!0,subtree:!0});function n(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function o(r){if(r.ep)return;r.ep=!0;const i=n(r);fetch(r.href,i)}})();/** * @vue/shared v3.5.42 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function _t(e){const t=Object.create(null);for(const o of e.split(","))t[o]=1;return o=>o in t}const m1={},s3=[],o0=()=>{},k5=()=>!1,$9=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),U9=e=>e.startsWith("onUpdate:"),T1=Object.assign,yt=(e,t)=>{const o=e.indexOf(t);o>-1&&e.splice(o,1)},ui=Object.prototype.hasOwnProperty,x1=(e,t)=>ui.call(e,t),t1=Array.isArray,I0=e=>m3(e)==="[object Map]",m0=e=>m3(e)==="[object Set]",Ho=e=>m3(e)==="[object Date]",pi=e=>m3(e)==="[object RegExp]",l1=e=>typeof e=="function",_1=e=>typeof e=="string",M2=e=>typeof e=="symbol",M1=e=>e!==null&&typeof e=="object",h5=e=>(M1(e)||l1(e))&&l1(e.then)&&l1(e.catch),u5=Object.prototype.toString,m3=e=>u5.call(e),wi=e=>m3(e).slice(8,-1),p5=e=>m3(e)==="[object Object]",W9=e=>_1(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,S3=_t(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),z9=e=>{const t=Object.create(null);return o=>t[o]||(t[o]=e(o))},Ci=/-\w/g,s2=z9(e=>e.replace(Ci,t=>t.slice(1).toUpperCase())),ci=/\B([A-Z])/g,x0=z9(e=>e.replace(ci,"-$1").toLowerCase()),q9=z9(e=>e.charAt(0).toUpperCase()+e.slice(1)),_e=z9(e=>e?`on${q9(e)}`:""),J1=(e,t)=>!Object.is(e,t),d3=(e,...t)=>{for(let o=0;o{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:o})},K9=e=>{const t=parseFloat(e);return isNaN(t)?e:t},C5=e=>{const t=_1(e)?Number(e):NaN;return isNaN(t)?e:t};let Vo;const G9=()=>Vo||(Vo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function h3(e){if(t1(e)){const t={};for(let o=0;o{if(o){const n=o.split(vi);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function J9(e){let t="";if(_1(e))t=e;else if(t1(e))for(let o=0;oz2(o,t))}const g5=e=>!!(e&&e.__v_isRef===!0),A3=e=>_1(e)?e:e==null?"":t1(e)||M1(e)&&(e.toString===u5||!l1(e.toString))?g5(e)?A3(e.value):JSON.stringify(e,v5,2):String(e),v5=(e,t)=>g5(t)?v5(e,t.value):I0(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((o,[n,r],i)=>(o[ye(n,i)+" =>"]=r,o),{})}:m0(t)?{[`Set(${t.size})`]:[...t.values()].map(o=>ye(o))}:M2(t)?ye(t):M1(t)&&!t1(t)&&!p5(t)?String(t):t,ye=(e,t="")=>{var o;return M2(e)?`Symbol(${(o=e.description)!=null?o:t})`:e};/** +**/function rr(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const g1={},et=[],F2=()=>{},js=()=>!1,kn=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),un=e=>e.startsWith("onUpdate:"),T1=Object.assign,ir=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Wl=Object.prototype.hasOwnProperty,x1=(e,t)=>Wl.call(e,t),J=Array.isArray,Me=e=>wt(e)==="[object Map]",oe=e=>wt(e)==="[object Set]",Yr=e=>wt(e)==="[object Date]",Gl=e=>wt(e)==="[object RegExp]",a1=e=>typeof e=="function",y1=e=>typeof e=="string",g2=e=>typeof e=="symbol",m1=e=>e!==null&&typeof e=="object",xs=e=>(m1(e)||a1(e))&&a1(e.then)&&a1(e.catch),Ds=Object.prototype.toString,wt=e=>Ds.call(e),Kl=e=>wt(e).slice(8,-1),Ls=e=>wt(e)==="[object Object]",hn=e=>y1(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,At=rr(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),pn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Yl=/-\w/g,n2=pn(e=>e.replace(Yl,t=>t.slice(1).toUpperCase())),Ql=/\B([A-Z])/g,ke=pn(e=>e.replace(Ql,"-$1").toLowerCase()),cn=pn(e=>e.charAt(0).toUpperCase()+e.slice(1)),In=pn(e=>e?`on${cn(e)}`:""),Y1=(e,t)=>!Object.is(e,t),tt=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},wn=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Vs=e=>{const t=y1(e)?Number(e):NaN;return isNaN(t)?e:t};let Qr;const Cn=()=>Qr||(Qr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function re(e){if(J(e)){const t={};for(let n=0;n{if(n){const o=n.split(Xl);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function q1(e){let t="";if(y1(e))t=e;else if(J(e))for(let n=0;nb2(n,t))}const bs=e=>!!(e&&e.__v_isRef===!0),M1=e=>y1(e)?e:e==null?"":J(e)||m1(e)&&(e.toString===Ds||!a1(e.toString))?bs(e)?M1(e.value):JSON.stringify(e,Zs,2):String(e),Zs=(e,t)=>bs(t)?Zs(e,t.value):Me(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,r],i)=>(n[Rn(o,i)+" =>"]=r,n),{})}:oe(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Rn(n))}:g2(t)?Rn(t):m1(t)&&!J(t)&&!Ls(t)?String(t):t,Rn=(e,t="")=>{var n;return g2(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** * @vue/reactivity v3.5.42 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let $1;class m5{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&$1&&($1.active?(this.parent=$1,this.index=($1.scopes||($1.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,o;if(this.scopes){const n=this.scopes.slice();for(t=0,o=n.length;t0&&--this._on===0){if($1===this)$1=this.prevScope;else{let t=$1;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let o,n;for(o=0,n=this.effects.length;o0)return;if(P3){let t=P3;for(P3=void 0;t;){const o=t.next;t.next=void 0,t.flags&=-9,t=o}}let e;for(;I3;){let t=I3;for(I3=void 0;t;){const o=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=o}}if(e)throw e}function L5(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function H5(e){let t,o=e.depsTail,n=o;for(;n;){const r=n.prevDep;n.version===-1?(n===o&&(o=r),At(n),xi(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=r}e.deps=t,e.depsTail=o}function tt(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(V5(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function V5(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===W3)||(e.globalVersion=W3,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!tt(e))))return;e.flags|=2;const t=e.dep,o=Z1,n=W2;Z1=e,W2=!0;try{L5(e);const r=e.fn(e._value);(t.version===0||J1(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{Z1=o,W2=n,H5(e),e.flags&=-3}}function At(e,t=!1){const{dep:o,prevSub:n,nextSub:r}=e;if(n&&(n.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=n,e.nextSub=void 0),o.subs===e&&(o.subs=n,!n&&o.computed)){o.computed.flags&=-5;for(let i=o.computed.deps;i;i=i.nextDep)At(i,!0)}!t&&!--o.sc&&o.map&&o.map.delete(o.key)}function xi(e){const{prevDep:t,nextDep:o}=e;t&&(t.nextDep=o,e.prevDep=void 0),o&&(o.prevDep=t,e.nextDep=void 0)}let W2=!0;const Z5=[];function f0(){Z5.push(W2),W2=!1}function M0(){const e=Z5.pop();W2=e===void 0?!0:e}function _o(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const o=Z1;Z1=void 0;try{t()}finally{Z1=o}}}let W3=0;class Li{constructor(t,o){this.sub=t,this.dep=o,this.version=o.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Y9{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Z1||!W2||Z1===this.computed)return;let o=this.activeLink;if(o===void 0||o.sub!==Z1)o=this.activeLink=new Li(Z1,this),Z1.deps?(o.prevDep=Z1.depsTail,Z1.depsTail.nextDep=o,Z1.depsTail=o):Z1.deps=Z1.depsTail=o,_5(o);else if(o.version===-1&&(o.version=this.version,o.nextDep)){const n=o.nextDep;n.prevDep=o.prevDep,o.prevDep&&(o.prevDep.nextDep=n),o.prevDep=Z1.depsTail,o.nextDep=void 0,Z1.depsTail.nextDep=o,Z1.depsTail=o,Z1.deps===o&&(Z1.deps=n)}return o}trigger(t){this.version++,W3++,this.notify(t)}notify(t){Et();try{for(let o=this.subs;o;o=o.prevSub)o.sub.notify()&&o.sub.dep.notify()}finally{St()}}}function _5(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)_5(n)}const o=e.dep.subs;o!==e&&(e.prevSub=o,o&&(o.nextSub=e)),e.dep.subs=e}}const L9=new WeakMap,J0=Symbol(""),ot=Symbol(""),z3=Symbol("");function n2(e,t,o){if(W2&&Z1){let n=L9.get(e);n||L9.set(e,n=new Map);let r=n.get(o);r||(n.set(o,r=new Y9),r.map=n,r.key=o),r.track()}}function p0(e,t,o,n,r,i){const s=L9.get(e);if(!s){W3++;return}const d=l=>{l&&l.trigger()};if(Et(),t==="clear")s.forEach(d);else{const l=t1(e),h=l&&W9(o);if(l&&o==="length"){const u=Number(n);s.forEach((p,w)=>{(w==="length"||w===z3||!M2(w)&&w>=u)&&d(p)})}else switch((o!==void 0||s.has(void 0))&&d(s.get(o)),h&&d(s.get(z3)),t){case"add":l?h&&d(s.get("length")):(d(s.get(J0)),I0(e)&&d(s.get(ot)));break;case"delete":l||(d(s.get(J0)),I0(e)&&d(s.get(ot)));break;case"set":I0(e)&&d(s.get(J0));break}}St()}function Hi(e,t){const o=L9.get(e);return o&&o.get(t)}function t3(e){const t=c1(e);return t===e?t:(n2(t,"iterate",z3),f2(e)?t:t.map(q2))}function Q9(e){return n2(e=c1(e),"iterate",z3),e}function Q2(e,t){return j0(e)?u3(g0(e)?q2(t):t):q2(t)}const Vi={__proto__:null,[Symbol.iterator](){return be(this,Symbol.iterator,e=>Q2(this,e))},concat(...e){return t3(this).concat(...e.map(t=>t1(t)?t3(t):t))},entries(){return be(this,"entries",e=>(e[1]=Q2(this,e[1]),e))},every(e,t){return l0(this,"every",e,t,void 0,arguments)},filter(e,t){return l0(this,"filter",e,t,o=>o.map(n=>Q2(this,n)),arguments)},find(e,t){return l0(this,"find",e,t,o=>Q2(this,o),arguments)},findIndex(e,t){return l0(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return l0(this,"findLast",e,t,o=>Q2(this,o),arguments)},findLastIndex(e,t){return l0(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return l0(this,"forEach",e,t,void 0,arguments)},includes(...e){return Ee(this,"includes",e)},indexOf(...e){return Ee(this,"indexOf",e)},join(e){return t3(this).join(e)},lastIndexOf(...e){return Ee(this,"lastIndexOf",e)},map(e,t){return l0(this,"map",e,t,void 0,arguments)},pop(){return x3(this,"pop")},push(...e){return x3(this,"push",e)},reduce(e,...t){return yo(this,"reduce",e,t)},reduceRight(e,...t){return yo(this,"reduceRight",e,t)},shift(){return x3(this,"shift")},some(e,t){return l0(this,"some",e,t,void 0,arguments)},splice(...e){return x3(this,"splice",e)},toReversed(){return t3(this).toReversed()},toSorted(e){return t3(this).toSorted(e)},toSpliced(...e){return t3(this).toSpliced(...e)},unshift(...e){return x3(this,"unshift",e)},values(){return be(this,"values",e=>Q2(this,e))}};function be(e,t,o){const n=Q9(e),r=n[t]();return n!==e&&!f2(e)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.done||(i.value=o(i.value)),i}),r}const Zi=Array.prototype;function l0(e,t,o,n,r,i){const s=Q9(e),d=s!==e&&!f2(e),l=s[t];if(l!==Zi[t]){const p=l.apply(e,i);return d?q2(p):p}let h=o;s!==e&&(d?h=function(p,w){return o.call(this,Q2(e,p),w,e)}:o.length>2&&(h=function(p,w){return o.call(this,p,w,e)}));const u=l.call(s,h,n);return d&&r?r(u):u}function yo(e,t,o,n){const r=Q9(e),i=r!==e&&!f2(e);let s=o,d=!1;r!==e&&(i?(d=n.length===0,s=function(h,u,p){return d&&(d=!1,h=Q2(e,h)),o.call(this,h,Q2(e,u),p,e)}):o.length>3&&(s=function(h,u,p){return o.call(this,h,u,p,e)}));const l=r[t](s,...n);return d?Q2(e,l):l}function Ee(e,t,o){const n=c1(e);n2(n,"iterate",z3);const r=n[t](...o);return(r===-1||r===!1)&&X9(o[0])?(o[0]=c1(o[0]),n[t](...o)):r}function x3(e,t,o=[]){f0(),Et();const n=c1(e)[t].apply(e,o);return St(),M0(),n}const _i=_t("__proto__,__v_isRef,__isVue"),y5=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(M2));function yi(e){M2(e)||(e=String(e));const t=c1(this);return n2(t,"has",e),t.hasOwnProperty(e)}class B5{constructor(t=!1,o=!1){this._isReadonly=t,this._isShallow=o}get(t,o,n){if(o==="__v_skip")return t.__v_skip;const r=this._isReadonly,i=this._isShallow;if(o==="__v_isReactive")return!r;if(o==="__v_isReadonly")return r;if(o==="__v_isShallow")return i;if(o==="__v_raw")return n===(r?i?Ri:A5:i?S5:E5).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const s=t1(t);if(!r){let l;if(s&&(l=Vi[o]))return l;if(o==="hasOwnProperty")return yi}const d=Reflect.get(t,o,b1(t)?t:n);if((M2(o)?y5.has(o):_i(o))||(r||n2(t,"get",o),i))return d;if(b1(d)){const l=s&&W9(o)?d:d.value;return r&&M1(l)?rt(l):l}return M1(d)?r?rt(d):y2(d):d}}class b5 extends B5{constructor(t=!1){super(!1,t)}set(t,o,n,r){let i=t[o];const s=t1(t)&&W9(o);if(!this._isShallow){const h=j0(i);if(!f2(n)&&!j0(n)&&(i=c1(i),n=c1(n)),!s&&b1(i)&&!b1(n))return h||(i.value=n),!0}const d=s?Number(o)e,u9=e=>Reflect.getPrototypeOf(e);function Ai(e,t,o){return function(...n){const r=this.__v_raw,i=c1(r),s=I0(i),d=e==="entries"||e===Symbol.iterator&&s,l=e==="keys"&&s,h=r[e](...n),u=o?nt:t?u3:q2;return!t&&n2(i,"iterate",l?ot:J0),T1(Object.create(h),{next(){const{value:p,done:w}=h.next();return w?{value:p,done:w}:{value:d?[u(p[0]),u(p[1])]:u(p),done:w}}})}}function p9(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Ii(e,t){const o={get(r){const i=this.__v_raw,s=c1(i),d=c1(r);e||(J1(r,d)&&n2(s,"get",r),n2(s,"get",d));const{has:l}=u9(s),h=t?nt:e?u3:q2;if(l.call(s,r))return h(i.get(r));if(l.call(s,d))return h(i.get(d));i!==s&&i.get(r)},get size(){const r=this.__v_raw;return!e&&n2(c1(r),"iterate",J0),r.size},has(r){const i=this.__v_raw,s=c1(i),d=c1(r);return e||(J1(r,d)&&n2(s,"has",r),n2(s,"has",d)),r===d?i.has(r):i.has(r)||i.has(d)},forEach(r,i){const s=this,d=s.__v_raw,l=c1(d),h=t?nt:e?u3:q2;return!e&&n2(l,"iterate",J0),d.forEach((u,p)=>r.call(i,h(u),h(p),s))}};return T1(o,e?{add:p9("add"),set:p9("set"),delete:p9("delete"),clear:p9("clear")}:{add(r){const i=c1(this),s=u9(i),d=c1(r),l=!t&&!f2(r)&&!j0(r)?d:r;return s.has.call(i,l)||J1(r,l)&&s.has.call(i,r)||J1(d,l)&&s.has.call(i,d)||(i.add(l),p0(i,"add",l,l)),this},set(r,i){!t&&!f2(i)&&!j0(i)&&(i=c1(i));const s=c1(this),{has:d,get:l}=u9(s);let h=d.call(s,r);h||(r=c1(r),h=d.call(s,r));const u=l.call(s,r);return s.set(r,i),h?J1(i,u)&&p0(s,"set",r,i):p0(s,"add",r,i),this},delete(r){const i=c1(this),{has:s,get:d}=u9(i);let l=s.call(i,r);l||(r=c1(r),l=s.call(i,r)),d&&d.call(i,r);const h=i.delete(r);return l&&p0(i,"delete",r,void 0),h},clear(){const r=c1(this),i=r.size!==0,s=r.clear();return i&&p0(r,"clear",void 0,void 0),s}}),["keys","values","entries",Symbol.iterator].forEach(r=>{o[r]=Ai(r,e,t)}),o}function It(e,t){const o=Ii(e,t);return(n,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?n:Reflect.get(x1(o,r)&&r in n?o:n,r,i)}const Pi={get:It(!1,!1)},Oi={get:It(!1,!0)},Ti={get:It(!0,!1)};const E5=new WeakMap,S5=new WeakMap,A5=new WeakMap,Ri=new WeakMap;function Fi(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function y2(e){return j0(e)?e:Pt(e,!1,bi,Pi,E5)}function I5(e){return Pt(e,!1,Si,Oi,S5)}function rt(e){return Pt(e,!0,Ei,Ti,A5)}function Pt(e,t,o,n,r){if(!M1(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=r.get(e);if(i)return i;const s=Fi(wi(e));if(s===0)return e;const d=new Proxy(e,s===2?n:o);return r.set(e,d),d}function g0(e){return j0(e)?g0(e.__v_raw):!!(e&&e.__v_isReactive)}function j0(e){return!!(e&&e.__v_isReadonly)}function f2(e){return!!(e&&e.__v_isShallow)}function X9(e){return e?!!e.__v_raw:!1}function c1(e){const t=e&&e.__v_raw;return t?c1(t):e}function Ot(e){return!x1(e,"__v_skip")&&Object.isExtensible(e)&&w5(e,"__v_skip",!0),e}const q2=e=>M1(e)?y2(e):e,u3=e=>M1(e)?rt(e):e;function b1(e){return e?e.__v_isRef===!0:!1}function g1(e){return P5(e,!1)}function Ni(e){return P5(e,!0)}function P5(e,t){return b1(e)?e:new $i(e,t)}class $i{constructor(t,o){this.dep=new Y9,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=o?t:c1(t),this._value=o?t:q2(t),this.__v_isShallow=o}get value(){return this.dep.track(),this._value}set value(t){const o=this._rawValue,n=this.__v_isShallow||f2(t)||j0(t);t=n?t:c1(t),J1(t,o)&&(this._rawValue=t,this._value=n?t:q2(t),this.dep.trigger())}}function W1(e){return b1(e)?e.value:e}const Ui={get:(e,t,o)=>t==="__v_raw"?e:W1(Reflect.get(e,t,o)),set:(e,t,o,n)=>{const r=e[t];return b1(r)&&!b1(o)?(r.value=o,!0):Reflect.set(e,t,o,n)}};function O5(e){return g0(e)?e:new Proxy(e,Ui)}class Wi{constructor(t){this.__v_isRef=!0,this._value=void 0;const o=this.dep=new Y9,{get:n,set:r}=t(o.track.bind(o),o.trigger.bind(o));this._get=n,this._set=r}get value(){return this._value=this._get()}set value(t){this._set(t)}}function zi(e){return new Wi(e)}function T5(e){const t=t1(e)?new Array(e.length):{};for(const o in e)t[o]=R5(e,o);return t}class qi{constructor(t,o,n){this._object=t,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0,this._key=M2(o)?o:String(o),this._raw=c1(t);let r=!0,i=t;if(!t1(t)||M2(this._key)||!W9(this._key))do r=!X9(i)||f2(i);while(r&&(i=i.__v_raw));this._shallow=r}get value(){let t=this._object[this._key];return this._shallow&&(t=W1(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&b1(this._raw[this._key])){const o=this._object[this._key];if(b1(o)){o.value=t;return}}this._object[this._key]=t}get dep(){return Hi(this._raw,this._key)}}class Ki{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function ha(e,t,o){return b1(e)?e:l1(e)?new Ki(e):M1(e)&&arguments.length>1?R5(e,t,o):g1(e)}function R5(e,t,o){return new qi(e,t,o)}class Gi{constructor(t,o,n){this.fn=t,this.setter=o,this._value=void 0,this.dep=new Y9(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=W3-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!o,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&Z1!==this)return x5(this,!0),!0}get value(){const t=this.dep.track();return V5(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function Ji(e,t,o=!1){let n,r;return l1(e)?n=e:(n=e.get,r=e.set),new Gi(n,r,o)}const w9={},H9=new WeakMap;let z0;function Yi(e,t=!1,o=z0){if(o){let n=H9.get(o);n||H9.set(o,n=[]),n.push(e)}}function Qi(e,t,o=m1){const{immediate:n,deep:r,once:i,scheduler:s,augmentJob:d,call:l}=o,h=L=>r?L:f2(L)||r===!1||r===0?w0(L,1):w0(L);let u,p,w,v,f=!1,x=!1;if(b1(e)?(p=()=>e.value,f=f2(e)):g0(e)?(p=()=>h(e),f=!0):t1(e)?(x=!0,f=e.some(L=>g0(L)||f2(L)),p=()=>e.map(L=>{if(b1(L))return L.value;if(g0(L))return h(L);if(l1(L))return l?l(L,2):L()})):l1(e)?t?p=l?()=>l(e,2):e:p=()=>{if(w){f0();try{w()}finally{M0()}}const L=z0;z0=u;try{return l?l(e,3,[v]):e(v)}finally{z0=L}}:p=o0,t&&r){const L=p,Z=r===!0?1/0:r;p=()=>w0(L(),Z)}const S=bt(),O=()=>{u.stop(),S&&S.active&&yt(S.effects,u)};if(i&&t){const L=t;t=(...Z)=>{const T=L(...Z);return O(),T}}let D=x?new Array(e.length).fill(w9):w9;const H=L=>{if(!(!(u.flags&1)||!u.dirty&&!L))if(t){const Z=u.run();if(L||r||f||(x?Z.some((T,_)=>J1(T,D[_])):J1(Z,D))){w&&w();const T=z0;z0=u;try{const _=[Z,D===w9?void 0:x&&D[0]===w9?[]:D,v];D=Z,l?l(t,3,_):t(..._)}finally{z0=T}}}else u.run()};return d&&d(H),u=new j5(p),u.scheduler=s?()=>s(H,!1):H,v=L=>Yi(L,!1,u),w=u.onStop=()=>{const L=H9.get(u);if(L){if(l)l(L,4);else for(const Z of L)Z();H9.delete(u)}},t?n?H(!0):D=u.run():s?s(H.bind(null,!0),!0):u.run(),O.pause=u.pause.bind(u),O.resume=u.resume.bind(u),O.stop=O,O}function w0(e,t=1/0,o){if(t<=0||!M1(e)||e.__v_skip||(o=o||new Map,(o.get(e)||0)>=t))return e;if(o.set(e,t),t--,b1(e))w0(e.value,t,o);else if(t1(e))for(let n=0;n{w0(n,t,o)});else if(p5(e)){for(const n in e)w0(e[n],t,o);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&w0(e[n],t,o)}return e}/** +**/let N1;class _s{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&N1&&(N1.active?(this.parent=N1,this.index=(N1.scopes||(N1.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const o=this.scopes.slice();for(t=0,n=o.length;t0&&--this._on===0){if(N1===this)N1=this.prevScope;else{let t=N1;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,o;for(n=0,o=this.effects.length;n0)return;if(Tt){let t=Tt;for(Tt=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;Pt;){let t=Pt;for(Pt=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(o){e||(e=o)}t=n}}if(e)throw e}function Ps(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ts(e){let t,n=e.depsTail,o=n;for(;o;){const r=o.prevDep;o.version===-1?(o===n&&(n=r),kr(o),i3(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=r}e.deps=t,e.depsTail=n}function fo(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Is(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Is(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Wt)||(e.globalVersion=Wt,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!fo(e))))return;e.flags|=2;const t=e.dep,n=V1,o=y2;V1=e,y2=!0;try{Ps(e);const r=e.fn(e._value);(t.version===0||Y1(r,e._value))&&(e.flags|=128,e._value=r,t.version++)}catch(r){throw t.version++,r}finally{V1=n,y2=o,Ts(e),e.flags&=-3}}function kr(e,t=!1){const{dep:n,prevSub:o,nextSub:r}=e;if(o&&(o.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)kr(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function i3(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let y2=!0;const Rs=[];function ie(){Rs.push(y2),y2=!1}function se(){const e=Rs.pop();y2=e===void 0?!0:e}function Xr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=V1;V1=void 0;try{t()}finally{V1=n}}}let Wt=0;class s3{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class gn{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!V1||!y2||V1===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==V1)n=this.activeLink=new s3(V1,this),V1.deps?(n.prevDep=V1.depsTail,V1.depsTail.nextDep=n,V1.depsTail=n):V1.deps=V1.depsTail=n,$s(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const o=n.nextDep;o.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=o),n.prevDep=V1.depsTail,n.nextDep=void 0,V1.depsTail.nextDep=n,V1.depsTail=n,V1.deps===n&&(V1.deps=o)}return n}trigger(t){this.version++,Wt++,this.notify(t)}notify(t){dr();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{ar()}}}function $s(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let o=t.deps;o;o=o.nextDep)$s(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const F9=new WeakMap,Te=Symbol(""),mo=Symbol(""),Gt=Symbol("");function X1(e,t,n){if(y2&&V1){let o=F9.get(e);o||F9.set(e,o=new Map);let r=o.get(n);r||(o.set(n,r=new gn),r.map=o,r.key=n),r.track()}}function J2(e,t,n,o,r,i){const s=F9.get(e);if(!s){Wt++;return}const l=d=>{d&&d.trigger()};if(dr(),t==="clear")s.forEach(l);else{const d=J(e),a=d&&hn(n);if(d&&n==="length"){const k=Number(o);s.forEach((u,h)=>{(h==="length"||h===Gt||!g2(h)&&h>=k)&&l(u)})}else switch((n!==void 0||s.has(void 0))&&l(s.get(n)),a&&l(s.get(Gt)),t){case"add":d?a&&l(s.get("length")):(l(s.get(Te)),Me(e)&&l(s.get(mo)));break;case"delete":d||(l(s.get(Te)),Me(e)&&l(s.get(mo)));break;case"set":Me(e)&&l(s.get(Te));break}}ar()}function l3(e,t){const n=F9.get(e);return n&&n.get(t)}function Ge(e){const t=w1(e);return t===e?t:(X1(t,"iterate",Gt),w2(e)?t:t.map(Z2))}function vn(e){return X1(e=w1(e),"iterate",Gt),e}function I2(e,t){return le(e)?lt(te(e)?Z2(t):t):Z2(t)}const d3={__proto__:null,[Symbol.iterator](){return Fn(this,Symbol.iterator,e=>I2(this,e))},concat(...e){return Ge(this).concat(...e.map(t=>J(t)?Ge(t):t))},entries(){return Fn(this,"entries",e=>(e[1]=I2(this,e[1]),e))},every(e,t){return z2(this,"every",e,t,void 0,arguments)},filter(e,t){return z2(this,"filter",e,t,n=>n.map(o=>I2(this,o)),arguments)},find(e,t){return z2(this,"find",e,t,n=>I2(this,n),arguments)},findIndex(e,t){return z2(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return z2(this,"findLast",e,t,n=>I2(this,n),arguments)},findLastIndex(e,t){return z2(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return z2(this,"forEach",e,t,void 0,arguments)},includes(...e){return Nn(this,"includes",e)},indexOf(...e){return Nn(this,"indexOf",e)},join(e){return Ge(this).join(e)},lastIndexOf(...e){return Nn(this,"lastIndexOf",e)},map(e,t){return z2(this,"map",e,t,void 0,arguments)},pop(){return ft(this,"pop")},push(...e){return ft(this,"push",e)},reduce(e,...t){return e0(this,"reduce",e,t)},reduceRight(e,...t){return e0(this,"reduceRight",e,t)},shift(){return ft(this,"shift")},some(e,t){return z2(this,"some",e,t,void 0,arguments)},splice(...e){return ft(this,"splice",e)},toReversed(){return Ge(this).toReversed()},toSorted(e){return Ge(this).toSorted(e)},toSpliced(...e){return Ge(this).toSpliced(...e)},unshift(...e){return ft(this,"unshift",e)},values(){return Fn(this,"values",e=>I2(this,e))}};function Fn(e,t,n){const o=vn(e),r=o[t]();return o!==e&&!w2(e)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.done||(i.value=n(i.value)),i}),r}const a3=Array.prototype;function z2(e,t,n,o,r,i){const s=vn(e),l=s!==e&&!w2(e),d=s[t];if(d!==a3[t]){const u=d.apply(e,i);return l?Z2(u):u}let a=n;s!==e&&(l?a=function(u,h){return n.call(this,I2(e,u),h,e)}:n.length>2&&(a=function(u,h){return n.call(this,u,h,e)}));const k=d.call(s,a,o);return l&&r?r(k):k}function e0(e,t,n,o){const r=vn(e),i=r!==e&&!w2(e);let s=n,l=!1;r!==e&&(i?(l=o.length===0,s=function(a,k,u){return l&&(l=!1,a=I2(e,a)),n.call(this,a,I2(e,k),u,e)}):n.length>3&&(s=function(a,k,u){return n.call(this,a,k,u,e)}));const d=r[t](s,...o);return l?I2(e,d):d}function Nn(e,t,n){const o=w1(e);X1(o,"iterate",Gt);const r=o[t](...n);return(r===-1||r===!1)&&fn(n[0])?(n[0]=w1(n[0]),o[t](...n)):r}function ft(e,t,n=[]){ie(),dr();const o=w1(e)[t].apply(e,n);return ar(),se(),o}const k3=rr("__proto__,__v_isRef,__isVue"),Fs=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(g2));function u3(e){g2(e)||(e=String(e));const t=w1(this);return X1(t,"has",e),t.hasOwnProperty(e)}class Ns{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,o){if(n==="__v_skip")return t.__v_skip;const r=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return o===(r?i?M3:Ws:i?zs:Us).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const s=J(t);if(!r){let d;if(s&&(d=d3[n]))return d;if(n==="hasOwnProperty")return u3}const l=Reflect.get(t,n,B1(t)?t:o);if((g2(n)?Fs.has(n):k3(n))||(r||X1(t,"get",n),i))return l;if(B1(l)){const d=s&&hn(n)?l:l.value;return r&&m1(d)?jo(d):d}return m1(l)?r?jo(l):G1(l):l}}class qs extends Ns{constructor(t=!1){super(!1,t)}set(t,n,o,r){let i=t[n];const s=J(t)&&hn(n);if(!this._isShallow){const a=le(i);if(!w2(o)&&!le(o)&&(i=w1(i),o=w1(o)),!s&&B1(i)&&!B1(o))return a||(i.value=o),!0}const l=s?Number(n)e,g9=e=>Reflect.getPrototypeOf(e);function C3(e,t,n){return function(...o){const r=this.__v_raw,i=w1(r),s=Me(i),l=e==="entries"||e===Symbol.iterator&&s,d=e==="keys"&&s,a=r[e](...o),k=n?Mo:t?lt:Z2;return!t&&X1(i,"iterate",d?mo:Te),T1(Object.create(a),{next(){const{value:u,done:h}=a.next();return h?{value:u,done:h}:{value:l?[k(u[0]),k(u[1])]:k(u),done:h}}})}}function v9(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function g3(e,t){const n={get(r){const i=this.__v_raw,s=w1(i),l=w1(r);e||(Y1(r,l)&&X1(s,"get",r),X1(s,"get",l));const{has:d}=g9(s),a=t?Mo:e?lt:Z2;if(d.call(s,r))return a(i.get(r));if(d.call(s,l))return a(i.get(l));i!==s&&i.get(r)},get size(){const r=this.__v_raw;return!e&&X1(w1(r),"iterate",Te),r.size},has(r){const i=this.__v_raw,s=w1(i),l=w1(r);return e||(Y1(r,l)&&X1(s,"has",r),X1(s,"has",l)),r===l?i.has(r):i.has(r)||i.has(l)},forEach(r,i){const s=this,l=s.__v_raw,d=w1(l),a=t?Mo:e?lt:Z2;return!e&&X1(d,"iterate",Te),l.forEach((k,u)=>r.call(i,a(k),a(u),s))}};return T1(n,e?{add:v9("add"),set:v9("set"),delete:v9("delete"),clear:v9("clear")}:{add(r){const i=w1(this),s=g9(i),l=w1(r),d=!t&&!w2(r)&&!le(r)?l:r;return s.has.call(i,d)||Y1(r,d)&&s.has.call(i,r)||Y1(l,d)&&s.has.call(i,l)||(i.add(d),J2(i,"add",d,d)),this},set(r,i){!t&&!w2(i)&&!le(i)&&(i=w1(i));const s=w1(this),{has:l,get:d}=g9(s);let a=l.call(s,r);a||(r=w1(r),a=l.call(s,r));const k=d.call(s,r);return s.set(r,i),a?Y1(i,k)&&J2(s,"set",r,i):J2(s,"add",r,i),this},delete(r){const i=w1(this),{has:s,get:l}=g9(i);let d=s.call(i,r);d||(r=w1(r),d=s.call(i,r)),l&&l.call(i,r);const a=i.delete(r);return d&&J2(i,"delete",r,void 0),a},clear(){const r=w1(this),i=r.size!==0,s=r.clear();return i&&J2(r,"clear",void 0,void 0),s}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=C3(r,e,t)}),n}function ur(e,t){const n=g3(e,t);return(o,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?o:Reflect.get(x1(n,r)&&r in o?n:o,r,i)}const v3={get:ur(!1,!1)},f3={get:ur(!1,!0)},m3={get:ur(!0,!1)};const Us=new WeakMap,zs=new WeakMap,Ws=new WeakMap,M3=new WeakMap;function j3(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function G1(e){return le(e)?e:hr(e,!1,p3,v3,Us)}function Gs(e){return hr(e,!1,w3,f3,zs)}function jo(e){return hr(e,!0,c3,m3,Ws)}function hr(e,t,n,o,r){if(!m1(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const i=r.get(e);if(i)return i;const s=j3(Kl(e));if(s===0)return e;const l=new Proxy(e,s===2?o:n);return r.set(e,l),l}function te(e){return le(e)?te(e.__v_raw):!!(e&&e.__v_isReactive)}function le(e){return!!(e&&e.__v_isReadonly)}function w2(e){return!!(e&&e.__v_isShallow)}function fn(e){return e?!!e.__v_raw:!1}function w1(e){const t=e&&e.__v_raw;return t?w1(t):e}function pr(e){return!x1(e,"__v_skip")&&Object.isExtensible(e)&&Hs(e,"__v_skip",!0),e}const Z2=e=>m1(e)?G1(e):e,lt=e=>m1(e)?jo(e):e;function B1(e){return e?e.__v_isRef===!0:!1}function Q(e){return Ks(e,!1)}function cr(e){return Ks(e,!0)}function Ks(e,t){return B1(e)?e:new x3(e,t)}class x3{constructor(t,n){this.dep=new gn,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:w1(t),this._value=n?t:Z2(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||w2(t)||le(t);t=o?t:w1(t),Y1(t,n)&&(this._rawValue=t,this._value=o?t:Z2(t),this.dep.trigger())}}function v1(e){return B1(e)?e.value:e}const D3={get:(e,t,n)=>t==="__v_raw"?e:v1(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return B1(r)&&!B1(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function Ys(e){return te(e)?e:new Proxy(e,D3)}class L3{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new gn,{get:o,set:r}=t(n.track.bind(n),n.trigger.bind(n));this._get=o,this._set=r}get value(){return this._value=this._get()}set value(t){this._set(t)}}function H3(e){return new L3(e)}function V3(e){const t=J(e)?new Array(e.length):{};for(const n in e)t[n]=Qs(e,n);return t}class y3{constructor(t,n,o){this._object=t,this._defaultValue=o,this.__v_isRef=!0,this._value=void 0,this._key=g2(n)?n:String(n),this._raw=w1(t);let r=!0,i=t;if(!J(t)||g2(this._key)||!hn(this._key))do r=!fn(i)||w2(i);while(r&&(i=i.__v_raw));this._shallow=r}get value(){let t=this._object[this._key];return this._shallow&&(t=v1(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&B1(this._raw[this._key])){const n=this._object[this._key];if(B1(n)){n.value=t;return}}this._object[this._key]=t}get dep(){return l3(this._raw,this._key)}}class b3{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function hw(e,t,n){return B1(e)?e:a1(e)?new b3(e):m1(e)&&arguments.length>1?Qs(e,t,n):Q(e)}function Qs(e,t,n){return new y3(e,t,n)}class Z3{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new gn(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Wt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&V1!==this)return As(this,!0),!0}get value(){const t=this.dep.track();return Is(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function _3(e,t,n=!1){let o,r;return a1(e)?o=e:(o=e.get,r=e.set),new Z3(o,r,n)}const f9={},N9=new WeakMap;let _e;function B3(e,t=!1,n=_e){if(n){let o=N9.get(n);o||N9.set(n,o=[]),o.push(e)}}function E3(e,t,n=g1){const{immediate:o,deep:r,once:i,scheduler:s,augmentJob:l,call:d}=n,a=f=>r?f:w2(f)||r===!1||r===0?X2(f,1):X2(f);let k,u,h,p,g=!1,v=!1;if(B1(e)?(u=()=>e.value,g=w2(e)):te(e)?(u=()=>a(e),g=!0):J(e)?(v=!0,g=e.some(f=>te(f)||w2(f)),u=()=>e.map(f=>{if(B1(f))return f.value;if(te(f))return a(f);if(a1(f))return d?d(f,2):f()})):a1(e)?t?u=d?()=>d(e,2):e:u=()=>{if(h){ie();try{h()}finally{se()}}const f=_e;_e=k;try{return d?d(e,3,[p]):e(p)}finally{_e=f}}:u=F2,t&&r){const f=u,x=r===!0?1/0:r;u=()=>X2(f(),x)}const m=lr(),H=()=>{k.stop(),m&&m.active&&ir(m.effects,k)};if(i&&t){const f=t;t=(...x)=>{const D=f(...x);return H(),D}}let w=v?new Array(e.length).fill(f9):f9;const j=f=>{if(!(!(k.flags&1)||!k.dirty&&!f))if(t){const x=k.run();if(f||r||g||(v?x.some((D,y)=>Y1(D,w[y])):Y1(x,w))){h&&h();const D=_e;_e=k;try{const y=[x,w===f9?void 0:v&&w[0]===f9?[]:w,p];w=x,d?d(t,3,y):t(...y)}finally{_e=D}}}else k.run()};return l&&l(j),k=new Ss(u),k.scheduler=s?()=>s(j,!1):j,p=f=>B3(f,!1,k),h=k.onStop=()=>{const f=N9.get(k);if(f){if(d)d(f,4);else for(const x of f)x();N9.delete(k)}},t?o?j(!0):w=k.run():s?s(j.bind(null,!0),!0):k.run(),H.pause=k.pause.bind(k),H.resume=k.resume.bind(k),H.stop=H,H}function X2(e,t=1/0,n){if(t<=0||!m1(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,B1(e))X2(e.value,t,n);else if(J(e))for(let o=0;o{X2(o,t,n)});else if(Ls(e)){for(const o in e)X2(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&X2(e[o],t,n)}return e}/** * @vue/runtime-core v3.5.42 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/function e9(e,t,o,n){try{return n?e(...n):e()}catch(r){t9(r,t,o)}}function B2(e,t,o,n){if(l1(e)){const r=e9(e,t,o,n);return r&&h5(r)&&r.catch(i=>{t9(i,t,o)}),r}if(t1(e)){const r=[];for(let i=0;i>>1,r=h2[n],i=q3(r);i=q3(o)?h2.push(e):h2.splice(es(t),0,e),e.flags|=1,N5()}}function N5(){V9||(V9=F5.then(U5))}function it(e){if(!t1(e))S0&&e.id===-1?S0.splice(r3+1,0,e):e.flags&1||(l3.push(e),e.flags|=1);else for(let t=0;tq3(o)-q3(n));if(l3.length=0,S0){for(let o=0;oe.id==null?e.flags&2?-1:1/0:e.id;function U5(e){try{for(Y2=0;Y2{n._d&&A9(-1);const i=Z9(t),s=v0.length;let d;try{d=e(...r)}finally{for(let l=v0.length;l>s;l--)le();Z9(i),n._d&&A9(1)}return d};return n._n=!0,n._c=!0,n._d=!0,n}function Rt(e,t){if(Q1===null)return e;const o=ae(Q1),n=e.dirs||(e.dirs=[]);for(let r=0;r1)return o&&l1(t)?t.call(n&&n.proxy):t}}function ts(){return!!(b2()||Y0)}const os=Symbol.for("v-scx"),ns=()=>d2(os);function rs(e,t){return ee(e,null,t)}function is(e,t){return ee(e,null,{flush:"sync"})}function H1(e,t,o){return ee(e,t,o)}function ee(e,t,o=m1){const{immediate:n,deep:r,flush:i,once:s}=o,d=T1({},o),l=t&&n||!t&&i!=="post";let h;if(Y3){if(i==="sync"){const v=ns();h=v.__watcherHandles||(v.__watcherHandles=[])}else if(!l){const v=()=>{};return v.stop=o0,v.resume=o0,v.pause=o0,v}}const u=i2;d.call=(v,f,x)=>B2(v,u,f,x);let p=!1;i==="post"?d.scheduler=v=>{F1(v,u&&u.suspense)}:i!=="sync"&&(p=!0,d.scheduler=(v,f)=>{f?v():Tt(v)}),d.augmentJob=v=>{t&&(v.flags|=4),p&&(v.flags|=2,u&&(v.id=u.uid,v.i=u))};const w=Qi(e,t,d);return Y3&&(h?h.push(w):l&&w()),w}function ss(e,t,o){const n=this.proxy,r=_1(e)?e.includes(".")?z5(n,e):()=>n[e]:e.bind(n,n);let i;l1(t)?i=t:(i=t.handler,o=t);const s=i9(this),d=ee(r,i.bind(n),o);return s(),d}function z5(e,t){const o=t.split(".");return()=>{let n=e;for(let r=0;re.__isTeleport,K0=e=>e&&(e.disabled||e.disabled===""),ds=e=>e&&(e.defer||e.defer===""),bo=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Eo=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,st=(e,t)=>{const o=e&&e.to;return _1(o)?t?t(o):null:o},ls={name:"Teleport",__isTeleport:!0,process(e,t,o,n,r,i,s,d,l,h){const{mc:u,pc:p,pbc:w,o:{insert:v,querySelector:f,createText:x,createComment:S,parentNode:O}}=h,D=K0(t.props);let{dynamicChildren:H}=t;const L=(_,U,A)=>{_.shapeFlag&16&&u(_.children,U,A,r,i,s,d,l)},Z=(_=t)=>{const U=K0(_.props),A=_.target=st(_.props,f),q=dt(A,_,x,v);A&&(s!=="svg"&&bo(A)?s="svg":s!=="mathml"&&Eo(A)&&(s="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(A),U||(L(_,A,q),y3(_,!1)))},T=_=>{const U=()=>{if(B0.get(_)===U){if(B0.delete(_),K0(_.props)){const A=O(_.el)||o;L(_,A,_.anchor),y3(_,!0)}Z(_)}};B0.set(_,U),F1(U,i)};if(e==null){const _=t.el=x(""),U=t.anchor=x("");if(v(_,o,n),v(U,o,n),ds(t.props)||i&&i.pendingBranch){T(t);return}D&&(L(t,o,U),y3(t,!0)),Z()}else{t.el=e.el;const _=t.anchor=e.anchor,U=B0.get(e);if(U){U.flags|=8,B0.delete(e),T(t);return}t.targetStart=e.targetStart;const A=t.target=e.target,q=t.targetAnchor=e.targetAnchor,r1=K0(e.props),F=r1?o:A,d1=r1?_:q;if(s==="svg"||bo(A)?s="svg":(s==="mathml"||Eo(A))&&(s="mathml"),H?(w(e.dynamicChildren,H,F,r,i,s,d),Kt(e,t,!0)):l||p(e,t,F,d1,r,i,s,d,!1),D)r1?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):C9(t,o,_,h,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const v1=st(t.props,f);v1&&(t.target=v1,C9(t,v1,null,h,0))}else r1&&C9(t,A,q,h,1);y3(t,D)}},remove(e,t,o,{um:n,o:{remove:r}},i){const{shapeFlag:s,children:d,anchor:l,targetStart:h,targetAnchor:u,target:p,props:w}=e,v=K0(w),f=i||!v,x=B0.get(e);if(x&&(x.flags|=8,B0.delete(e)),p&&(r(h),r(u)),i&&r(l),!x&&(v||p)&&s&16)for(let S=0;S{e.isMounted=!0}),n9(()=>{e.isUnmounting=!0}),e}const L2=[Function,Array],J5={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:L2,onEnter:L2,onAfterEnter:L2,onEnterCancelled:L2,onBeforeLeave:L2,onLeave:L2,onAfterLeave:L2,onLeaveCancelled:L2,onBeforeAppear:L2,onAppear:L2,onAfterAppear:L2,onAppearCancelled:L2},Y5=e=>{const t=e.subTree;return t.component?Y5(t.component):t},ks={name:"BaseTransition",props:J5,setup(e,{slots:t}){const o=b2(),n=G5();return()=>{const r=t.default&&Ft(t.default(),!0),i=r&&r.length?Q5(r):o.subTree?o6():void 0;if(!i)return;const s=c1(e),{mode:d}=s;if(n.isLeaving)return Se(i);const l=_9(i);if(!l)return Se(i);let h=K3(l,s,n,o,p=>h=p);l.type!==U1&&O0(l,h);let u=o.subTree&&_9(o.subTree);if(u&&u.type!==U1&&!$2(u,l)&&Y5(o).type!==U1){let p=K3(u,s,n,o);if(O0(u,p),d==="out-in"&&l.type!==U1)return n.isLeaving=!0,p.afterLeave=()=>{n.isLeaving=!1,o.job.flags&8||o.update(),delete p.afterLeave,u=void 0},Se(i);d==="in-out"&&l.type!==U1?p.delayLeave=(w,v,f)=>{const x=X5(n,u);x[String(u.key)]=u,w[V2]=()=>{v(),w[V2]=void 0,delete h.delayedLeave,u=void 0},h.delayedLeave=()=>{f(),delete h.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return i}}};function Q5(e){let t=e[0];if(e.length>1){for(const o of e)if(o.type!==U1){t=o;break}}return t}const hs=ks;function X5(e,t){const{leavingVNodes:o}=e;let n=o.get(t.type);return n||(n=Object.create(null),o.set(t.type,n)),n}function K3(e,t,o,n,r){const{appear:i,mode:s,persisted:d=!1,onBeforeEnter:l,onEnter:h,onAfterEnter:u,onEnterCancelled:p,onBeforeLeave:w,onLeave:v,onAfterLeave:f,onLeaveCancelled:x,onBeforeAppear:S,onAppear:O,onAfterAppear:D,onAppearCancelled:H}=t,L=String(e.key),Z=X5(o,e),T=(A,q)=>{A&&B2(A,n,9,q)},_=(A,q)=>{const r1=q[1];T(A,q),t1(A)?A.every(F=>F.length<=1)&&r1():A.length<=1&&r1()},U={mode:s,persisted:d,beforeEnter(A){let q=l;if(!o.isMounted)if(i)q=S||l;else return;A[V2]&&A[V2](!0);const r1=Z[L];r1&&$2(e,r1)&&r1.el[V2]&&r1.el[V2](),T(q,[A])},enter(A){if(Z[L]===e)return;let q=h,r1=u,F=p;if(!o.isMounted)if(i)q=O||h,r1=D||u,F=H||p;else return;let d1=!1;A[L3]=L1=>{d1||(d1=!0,L1?T(F,[A]):T(r1,[A]),U.delayedLeave&&U.delayedLeave(),A[L3]=void 0)};const v1=A[L3].bind(null,!1);q?_(q,[A,v1]):v1()},leave(A,q){const r1=String(e.key);if(A[L3]&&A[L3](!0),o.isUnmounting)return q();T(w,[A]);let F=!1;A[V2]=v1=>{F||(F=!0,q(),v1?T(x,[A]):T(f,[A]),A[V2]=void 0,Z[r1]===e&&delete Z[r1])};const d1=A[V2].bind(null,!1);Z[r1]=e,v?_(v,[A,d1]):d1()},clone(A){const q=K3(A,t,o,n,r);return r&&r(q),q}};return U}function Se(e){if(oe(e))return e=D0(e),e.children=null,e}function _9(e){if(!oe(e))return te(e.type)&&e.children?Q5(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:o}=e;if(o){if(t&16)return o[0];if(t&32&&l1(o.default))return o.default()}}function O0(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const o=e.component.subTree;O0(te(o.type)&&_9(o)||o,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Ft(e,t=!1,o){let n=[],r=0;for(let i=0;i1)for(let i=0;iO3(x,t&&(t1(t)?t[S]:t),o,n,r));return}if(P0(n)&&!r){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&O3(e,t,o,n.component.subTree);return}const i=n.shapeFlag&4?ae(n.component):n.el,s=r?null:i,{i:d,r:l}=e,h=t&&t.r,u=d.refs===m1?d.refs={}:d.refs,p=d.setupState,w=c1(p),v=p===m1?k5:x=>So(u,x)?!1:x1(w,x),f=(x,S)=>!(S&&So(u,S));if(h!=null&&h!==l){if(Ao(t),_1(h))u[h]=null,v(h)&&(p[h]=null);else if(b1(h)){const x=t;f(h,x.k)&&(h.value=null),x.k&&(u[x.k]=null)}}if(l1(l))e9(l,d,12,[s,u]);else{const x=_1(l),S=b1(l);if(x||S){const O=()=>{if(e.f){const D=x?v(l)?p[l]:u[l]:f()||!e.k?l.value:u[e.k];if(r)t1(D)&&yt(D,i);else if(t1(D))D.includes(i)||D.push(i);else if(x)u[l]=[i],v(l)&&(p[l]=u[l]);else{const H=[i];f(l,e.k)&&(l.value=H),e.k&&(u[e.k]=H)}}else x?(u[l]=s,v(l)&&(p[l]=s)):S&&(f(l,e.k)&&(l.value=s),e.k&&(u[e.k]=s))};if(s){const D=()=>{O(),y9.delete(e)};D.id=-1,y9.set(e,D),F1(D,o)}else Ao(e),O()}}}function Ao(e){const t=y9.get(e);t&&(t.flags|=8,y9.delete(e))}G9().requestIdleCallback;G9().cancelIdleCallback;const P0=e=>!!e.type.__asyncLoader,oe=e=>e.type.__isKeepAlive,us={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const o=b2(),n=o.ctx;if(!n.renderer)return()=>{const D=t.default&&t.default();return D&&D.length===1?D[0]:D};const r=new Map,i=new Set;let s=null;const d=o.suspense,{renderer:{p:l,m:h,um:u,o:{createElement:p}}}=n,w=p("div");n.activate=(D,H,L,Z,T)=>{const _=D.component;h(D,H,L,0,d),l(_.vnode,D,H,L,_,d,Z,D.slotScopeIds,T),F1(()=>{_.isDeactivated=!1,_.a&&d3(_.a);const U=D.props&&D.props.onVnodeMounted;U&&H2(U,_.parent,D)},d)},n.deactivate=D=>{const H=D.component;E9(H.m),E9(H.a),h(D,w,null,1,d),F1(()=>{H.da&&d3(H.da);const L=D.props&&D.props.onVnodeUnmounted;L&&H2(L,H.parent,D),H.isDeactivated=!0},d)};function v(D){Ae(D),u(D,o,d,!0)}function f(D){r.forEach((H,L)=>{const Z=Ct(P0(H)?H.type.__asyncResolved||{}:H.type);Z&&!D(Z)&&x(L)})}function x(D){const H=r.get(D);H&&(!s||!$2(H,s))?v(H):s&&Ae(s),r.delete(D),i.delete(D)}H1(()=>[e.include,e.exclude],([D,H])=>{D&&f(L=>B3(D,L)),H&&f(L=>!B3(H,L))},{flush:"post",deep:!0});let S=null;const O=()=>{S!=null&&(S9(o.subTree.type)?F1(()=>{const D=c9(o.subTree);D.component&&r.set(S,D)},o.subTree.suspense):r.set(S,c9(o.subTree)))};return n0(O),Nt(O),n9(()=>{r.forEach(D=>{const{subTree:H,suspense:L}=o,Z=c9(H);if(D.type===Z.type&&D.key===Z.key){Ae(Z);const T=Z.component.da;T&&F1(T,L);return}v(D)})}),()=>{if(S=null,!t.default)return s=null;const D=t.default(),H=D[0];if(D.length>1)return s=null,D;if(!T0(H)||!(H.shapeFlag&4)&&!(H.shapeFlag&128))return s=null,H;let L=c9(H);if(L.type===U1)return s=null,L;const Z=L.type,T=Ct(P0(L)?L.type.__asyncResolved||{}:Z),{include:_,exclude:U,max:A}=e;if(_&&(!T||!B3(_,T))||U&&T&&B3(U,T))return L.shapeFlag&=-257,s=L,H;const q=L.key==null?Z:L.key,r1=r.get(q);return L.el&&(L=D0(L),H.shapeFlag&128&&(H.ssContent=L)),S=q,r1?(L.el=r1.el,L.component=r1.component,L.transition&&O0(L,L.transition),L.shapeFlag|=512,i.delete(q),i.add(q)):(i.add(q),A&&i.size>parseInt(A,10)&&x(i.values().next().value)),L.shapeFlag|=256,s=L,S9(H.type)?H:L}}},ps=us;function B3(e,t){return t1(e)?e.some(o=>B3(o,t)):_1(e)?e.split(",").includes(t):pi(e)?(e.lastIndex=0,e.test(t)):!1}function ne(e,t){t4(e,"a",t)}function o9(e,t){t4(e,"da",t)}function t4(e,t,o=i2){const n=e.__wdc||(e.__wdc=()=>{let r=o;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(re(t,n,o),o){let r=o.parent;for(;r&&r.parent;)oe(r.parent.vnode)&&ws(n,t,o,r),r=r.parent}}function ws(e,t,o,n){const r=re(t,e,n,!0);r9(()=>{yt(n[t],r)},o)}function Ae(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function c9(e){return e.shapeFlag&128?e.ssContent:e}function re(e,t,o=i2,n=!1){if(o){const r=o[e]||(o[e]=[]),i=t.__weh||(t.__weh=(...s)=>{f0();const d=i9(o),l=B2(t,o,e,s);return d(),M0(),l});return n?r.unshift(i):r.push(i),i}}const L0=e=>(t,o=i2)=>{(!Y3||e==="sp")&&re(e,(...n)=>t(...n),o)},o4=L0("bm"),n0=L0("m"),Cs=L0("bu"),Nt=L0("u"),n9=L0("bum"),r9=L0("um"),cs=L0("sp"),gs=L0("rtg"),vs=L0("rtc");function ms(e,t=i2){re("ec",e,t)}const $t="components",fs="directives";function ie(e,t){return Ut($t,e,!0,t)||e}const n4=Symbol.for("v-ndc");function Io(e){return _1(e)?Ut($t,e,!1)||e:e||n4}function ua(e){return Ut(fs,e)}function Ut(e,t,o=!0,n=!1){const r=Q1||i2;if(r){const i=r.type;if(e===$t){const d=Ct(i,!1);if(d&&(d===t||d===s2(t)||d===q9(s2(t))))return i}const s=Po(r[e]||i[e],t)||Po(r.appContext[e],t);return!s&&n?i:s}}function Po(e,t){return e&&(e[t]||e[s2(t)]||e[q9(s2(t))])}function Ms(e,t,o,n){let r;const i=o,s=t1(e);if(s||_1(e)){const d=s&&g0(e);let l=!1,h=!1;d&&(l=!f2(e),h=j0(e),e=Q9(e)),r=new Array(e.length);for(let u=0,p=e.length;ut(d,l,void 0,i));else{const d=Object.keys(e);r=new Array(d.length);for(let l=0,h=d.length;l0;return t!=="default"&&(h.name=t),Y1(),c0(r2,null,[e1("slot",h,n&&n())],u?-2:64)}let s=e[t];s&&s._c&&(s._d=!1);const d=v0.length;Y1();let l;try{const h=s&&r4(s(o)),u=o.key||i||h&&h.key;l=c0(r2,{key:(u&&!M2(u)?u:`_${t}`)+(!h&&n?"_fb":"")},h||(n?n():[]),h&&e._===1?64:-2)}catch(h){for(let u=v0.length;u>d;u--)le();throw h}finally{s&&s._c&&(s._d=!0)}return!r&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),l}function r4(e){return e.some(t=>T0(t)?!(t.type===U1||t.type===r2&&!r4(t.children)):!0)?e:null}const lt=e=>e?x4(e)?ae(e):lt(e.parent):null,T3=T1(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>lt(e.parent),$root:e=>lt(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>s4(e),$forceUpdate:e=>e.f||(e.f=()=>{Tt(e.update)}),$nextTick:e=>e.n||(e.n=K2.bind(e.proxy)),$watch:e=>ss.bind(e)}),Ie=(e,t)=>e!==m1&&!e.__isScriptSetup&&x1(e,t),js={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:o,setupState:n,data:r,props:i,accessCache:s,type:d,appContext:l}=e;if(t[0]!=="$"){const w=s[t];if(w!==void 0)switch(w){case 1:return n[t];case 2:return r[t];case 4:return o[t];case 3:return i[t]}else{if(Ie(n,t))return s[t]=1,n[t];if(r!==m1&&x1(r,t))return s[t]=2,r[t];if(x1(i,t))return s[t]=3,i[t];if(o!==m1&&x1(o,t))return s[t]=4,o[t];at&&(s[t]=0)}}const h=T3[t];let u,p;if(h)return t==="$attrs"&&n2(e.attrs,"get",""),h(e);if((u=d.__cssModules)&&(u=u[t]))return u;if(o!==m1&&x1(o,t))return s[t]=4,o[t];if(p=l.config.globalProperties,x1(p,t))return p[t]},set({_:e},t,o){const{data:n,setupState:r,ctx:i}=e;return Ie(r,t)?(r[t]=o,!0):n!==m1&&x1(n,t)?(n[t]=o,!0):x1(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=o,!0)},has({_:{data:e,setupState:t,accessCache:o,ctx:n,appContext:r,props:i,type:s}},d){let l;return!!(o[d]||e!==m1&&d[0]!=="$"&&x1(e,d)||Ie(t,d)||x1(i,d)||x1(n,d)||x1(T3,d)||x1(r.config.globalProperties,d)||(l=s.__cssModules)&&l[d])},defineProperty(e,t,o){return o.get!=null?e._.accessCache[t]=0:x1(o,"value")&&this.set(e,t,o.value,null),Reflect.defineProperty(e,t,o)}};function B9(e){return t1(e)?e.reduce((t,o)=>(t[o]=null,t),{}):e}function pa(e,t){return!e||!t?e||t:t1(e)&&t1(t)?e.concat(t):T1({},B9(e),B9(t))}let at=!0;function Ds(e){const t=s4(e),o=e.proxy,n=e.ctx;at=!1,t.beforeCreate&&Oo(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:s,watch:d,provide:l,inject:h,created:u,beforeMount:p,mounted:w,beforeUpdate:v,updated:f,activated:x,deactivated:S,beforeDestroy:O,beforeUnmount:D,destroyed:H,unmounted:L,render:Z,renderTracked:T,renderTriggered:_,errorCaptured:U,serverPrefetch:A,expose:q,inheritAttrs:r1,components:F,directives:d1,filters:v1}=t;if(h&&xs(h,n,null),s)for(const i1 in s){const w1=s[i1];l1(w1)&&(n[i1]=w1.bind(o))}if(r){const i1=r.call(o,o);M1(i1)&&(e.data=y2(i1))}if(at=!0,i)for(const i1 in i){const w1=i[i1],P1=l1(w1)?w1.bind(o,o):l1(w1.get)?w1.get.bind(o,o):o0,E2=!l1(w1)&&l1(w1.set)?w1.set.bind(o):o0,D2=B1({get:P1,set:E2});Object.defineProperty(n,i1,{enumerable:!0,configurable:!0,get:()=>D2.value,set:K1=>D2.value=K1})}if(d)for(const i1 in d)i4(d[i1],n,o,i1);if(l){const i1=l1(l)?l.call(o):l;Reflect.ownKeys(i1).forEach(w1=>{a3(w1,i1[w1])})}u&&Oo(u,e,"c");function h1(i1,w1){t1(w1)?w1.forEach(P1=>i1(P1.bind(o))):w1&&i1(w1.bind(o))}if(h1(o4,p),h1(n0,w),h1(Cs,v),h1(Nt,f),h1(ne,x),h1(o9,S),h1(ms,U),h1(vs,T),h1(gs,_),h1(n9,D),h1(r9,L),h1(cs,A),t1(q))if(q.length){const i1=e.exposed||(e.exposed={});q.forEach(w1=>{Object.defineProperty(i1,w1,{get:()=>o[w1],set:P1=>o[w1]=P1,enumerable:!0})})}else e.exposed||(e.exposed={});Z&&e.render===o0&&(e.render=Z),r1!=null&&(e.inheritAttrs=r1),F&&(e.components=F),d1&&(e.directives=d1),A&&e4(e)}function xs(e,t,o=o0){t1(e)&&(e=kt(e));for(const n in e){const r=e[n];let i;M1(r)?"default"in r?i=d2(r.from||n,r.default,!0):i=d2(r.from||n):i=d2(r),b1(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:s=>i.value=s}):t[n]=i}}function Oo(e,t,o){B2(t1(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,o)}function i4(e,t,o,n){let r=n.includes(".")?z5(o,n):()=>o[n];if(_1(e)){const i=t[e];l1(i)&&H1(r,i)}else if(l1(e))H1(r,e.bind(o));else if(M1(e))if(t1(e))e.forEach(i=>i4(i,t,o,n));else{const i=l1(e.handler)?e.handler.bind(o):t[e.handler];l1(i)&&H1(r,i,e)}}function s4(e){const t=e.type,{mixins:o,extends:n}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:s}}=e.appContext,d=i.get(t);let l;return d?l=d:!r.length&&!o&&!n?l=t:(l={},r.length&&r.forEach(h=>b9(l,h,s,!0)),b9(l,t,s)),M1(t)&&i.set(t,l),l}function b9(e,t,o,n=!1){const{mixins:r,extends:i}=t;i&&b9(e,i,o,!0),r&&r.forEach(s=>b9(e,s,o,!0));for(const s in t)if(!(n&&s==="expose")){const d=Ls[s]||o&&o[s];e[s]=d?d(e[s],t[s]):t[s]}return e}const Ls={data:To,props:Ro,emits:Ro,methods:b3,computed:b3,beforeCreate:a2,created:a2,beforeMount:a2,mounted:a2,beforeUpdate:a2,updated:a2,beforeDestroy:a2,beforeUnmount:a2,destroyed:a2,unmounted:a2,activated:a2,deactivated:a2,errorCaptured:a2,serverPrefetch:a2,components:b3,directives:b3,watch:Vs,provide:To,inject:Hs};function To(e,t){return t?e?function(){return T1(l1(e)?e.call(this,this):e,l1(t)?t.call(this,this):t)}:t:e}function Hs(e,t){return b3(kt(e),kt(t))}function kt(e){if(t1(e)){const t={};for(let o=0;o{let u,p=m1,w;return is(()=>{const v=e[r];J1(u,v)&&(u=v,h())}),{get(){return l(),o.get?o.get(u):u},set(v){const f=o.set?o.set(v):v;if(!J1(f,u)&&!(p!==m1&&J1(v,p)))return;const x=n.vnode.props,S=!!(x&&(t in x||r in x||i in x)&&(`onUpdate:${t}`in x||`onUpdate:${r}`in x||`onUpdate:${i}`in x));S||(u=v,h()),n.emit(`update:${t}`,f),J1(v,p)&&(J1(v,f)&&!J1(f,w)||S&&p!==m1&&!J1(f,u))&&h(),p=v,w=f}}});return d[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?s||m1:d,done:!1}:{done:!0}}}},d}const l4=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${s2(t)}Modifiers`]||e[`${x0(t)}Modifiers`];function ys(e,t,...o){if(e.isUnmounted)return;const n=e.vnode.props||m1;let r=o;const i=t.startsWith("update:"),s=i&&l4(n,t.slice(7));s&&(s.trim&&(r=o.map(u=>_1(u)?u.trim():u)),s.number&&(r=r.map(K9)));let d,l=n[d=_e(t)]||n[d=_e(s2(t))];!l&&i&&(l=n[d=_e(x0(t))]),l&&B2(l,e,6,r);const h=n[d+"Once"];if(h){if(!e.emitted)e.emitted={};else if(e.emitted[d])return;e.emitted[d]=!0,B2(h,e,6,r)}}const Bs=new WeakMap;function a4(e,t,o=!1){const n=o?Bs:t.emitsCache,r=n.get(e);if(r!==void 0)return r;const i=e.emits;let s={},d=!1;if(!l1(e)){const l=h=>{const u=a4(h,t,!0);u&&(d=!0,T1(s,u))};!o&&t.mixins.length&&t.mixins.forEach(l),e.extends&&l(e.extends),e.mixins&&e.mixins.forEach(l)}return!i&&!d?(M1(e)&&n.set(e,null),null):(t1(i)?i.forEach(l=>s[l]=null):T1(s,i),M1(e)&&n.set(e,s),s)}function se(e,t){return!e||!$9(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),x1(e,t[0].toLowerCase()+t.slice(1))||x1(e,x0(t))||x1(e,t))}function Fo(e){const{type:t,vnode:o,proxy:n,withProxy:r,propsOptions:[i],slots:s,attrs:d,emit:l,render:h,renderCache:u,props:p,data:w,setupState:v,ctx:f,inheritAttrs:x}=e,S=Z9(e);let O,D;try{if(o.shapeFlag&4){const L=r||n,Z=L;O=N2(h.call(Z,L,u,p,v,w,f)),D=d}else{const L=t;O=N2(L.length>1?L(p,{attrs:d,slots:s,emit:l}):L(p,null)),D=t.props?d:Es(d)}}catch(L){v0.length=0,t9(L,e,1),O=e1(U1)}let H=O;if(D&&x!==!1){const L=Object.keys(D),{shapeFlag:Z}=H;L.length&&Z&7&&(i&&L.some(U9)&&(D=Ss(D,i)),H=D0(H,D,!1,!0))}if(o.dirs&&(H=D0(H,null,!1,!0),H.dirs=H.dirs?H.dirs.concat(o.dirs):o.dirs),o.transition){const L=te(H.type)&&_9(H)||H;O0(L,o.transition)}return O=H,Z9(S),O}function bs(e,t=!0){let o;for(let n=0;n{let t;for(const o in e)(o==="class"||o==="style"||$9(o))&&((t||(t={}))[o]=e[o]);return t},Ss=(e,t)=>{const o={};for(const n in e)(!U9(n)||!(n.slice(9)in t))&&(o[n]=e[n]);return o};function As(e,t,o){const{props:n,children:r,component:i}=e,{props:s,children:d,patchFlag:l}=t,h=i.emitsOptions;if(t.dirs||t.transition)return!0;if(o&&l>=0){if(l&1024)return!0;if(l&16)return n?No(n,s,h):!!s;if(l&8){const u=t.dynamicProps;for(let p=0;pObject.create(h4),p4=e=>Object.getPrototypeOf(e)===h4;function Is(e,t,o,n=!1){const r={},i=u4();e.propsDefaults=Object.create(null),w4(e,t,r,i);for(const s in e.propsOptions[0])s in r||(r[s]=void 0);o?e.props=n?r:I5(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function Ps(e,t,o,n){const{props:r,attrs:i,vnode:{patchFlag:s}}=e,d=c1(r),[l]=e.propsOptions;let h=!1;if((n||s>0)&&!(s&16)){if(s&8){const u=e.vnode.dynamicProps;for(let p=0;p{l=!0;const[w,v]=C4(p,t,!0);T1(s,w),v&&d.push(...v)};!o&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!i&&!l)return M1(e)&&n.set(e,s3),s3;if(t1(i))for(let u=0;ue==="_"||e==="_ctx"||e==="$stable",qt=e=>t1(e)?e.map(N2):[N2(e)],Ts=(e,t,o)=>{if(t._n)return t;const n=h0((...r)=>qt(t(...r)),o);return n._c=!1,n},c4=(e,t,o)=>{const n=e._ctx;for(const r in e){if(zt(r))continue;const i=e[r];if(l1(i))t[r]=Ts(r,i,n);else if(i!=null){const s=qt(i);t[r]=()=>s}}},g4=(e,t)=>{const o=qt(t);e.slots.default=()=>o},v4=(e,t,o)=>{for(const n in t)(o||!zt(n))&&(e[n]=t[n])},Rs=(e,t,o)=>{const n=e.slots=u4();if(e.vnode.shapeFlag&32){const r=t._;r?(v4(n,t,o),o&&w5(n,"_",r,!0)):c4(t,n)}else t&&g4(e,t)},Fs=(e,t,o)=>{const{vnode:n,slots:r}=e;let i=!0,s=m1;if(n.shapeFlag&32){const d=t._;d?o&&d===1?i=!1:v4(r,t,o):(i=!t.$stable,c4(t,r)),s=t}else t&&(g4(e,t),s={default:1});if(i)for(const d in r)!zt(d)&&s[d]==null&&delete r[d]},F1=Qs;function Ns(e){return $s(e)}function $s(e,t){const o=G9();o.__VUE__=!0;const{insert:n,remove:r,patchProp:i,createElement:s,createText:d,createComment:l,setText:h,setElementText:u,parentNode:p,nextSibling:w,setScopeId:v=o0,insertStaticContent:f}=e,x=(g,m,j,y=null,P=null,B=null,z=void 0,N=null,W=!!m.dynamicChildren)=>{if(g===m)return;g&&!$2(g,m)&&(y=I(g),K1(g,P,B,!0),g=null),m.patchFlag===-2&&(W=!1,m.dynamicChildren=null);const{type:b,ref:$,shapeFlag:G}=m;switch(b){case de:S(g,m,j,y);break;case U1:O(g,m,j,y);break;case Oe:g==null&&D(m,j,y,z);break;case r2:F(g,m,j,y,P,B,z,N,W);break;default:G&1?Z(g,m,j,y,P,B,z,N,W):G&6?d1(g,m,j,y,P,B,z,N,W):(G&64||G&128)&&b.process(g,m,j,y,P,B,z,N,W,o1)}$!=null&&P?O3($,g&&g.ref,B,m||g,!m):$==null&&g&&g.ref!=null&&O3(g.ref,null,B,g,!0)},S=(g,m,j,y)=>{if(g==null)n(m.el=d(m.children),j,y);else{const P=m.el=g.el;m.children!==g.children&&h(P,m.children)}},O=(g,m,j,y)=>{g==null?n(m.el=l(m.children||""),j,y):m.el=g.el},D=(g,m,j,y)=>{[g.el,g.anchor]=f(g.children,m,j,y,g.el,g.anchor)},H=({el:g,anchor:m},j,y)=>{let P;for(;g&&g!==m;)P=w(g),n(g,j,y),g=P;n(m,j,y)},L=({el:g,anchor:m})=>{let j;for(;g&&g!==m;)j=w(g),r(g),g=j;r(m)},Z=(g,m,j,y,P,B,z,N,W)=>{if(m.type==="svg"?z="svg":m.type==="math"&&(z="mathml"),g==null)T(m,j,y,P,B,z,N,W);else{const b=g.el&&g.el._isVueCE?g.el:null;try{b&&b._beginPatch(),A(g,m,P,B,z,N,W)}finally{b&&b._endPatch()}}},T=(g,m,j,y,P,B,z,N)=>{let W,b;const{props:$,shapeFlag:G,transition:X,dirs:s1}=g;if(W=g.el=s(g.type,B,$&&$.is,$),G&8?u(W,g.children):G&16&&U(g.children,W,null,y,P,Pe(g,B),z,N),s1&&$0(g,null,y,"created"),_(W,g,g.scopeId,z,y),$){for(const j1 in $)j1!=="value"&&!S3(j1)&&i(W,j1,null,$[j1],B,y);"value"in $&&i(W,"value",null,$.value,B),(b=$.onVnodeBeforeMount)&&H2(b,y,g)}s1&&$0(g,null,y,"beforeMount");const u1=Us(P,X);u1&&X.beforeEnter(W),n(W,m,j),((b=$&&$.onVnodeMounted)||u1||s1)&&F1(()=>{try{b&&H2(b,y,g),u1&&X.enter(W),s1&&$0(g,null,y,"mounted")}finally{}},P)},_=(g,m,j,y,P)=>{if(j&&v(g,j),y)for(let B=0;B{for(let b=W;b{const N=m.el=g.el;let{patchFlag:W,dynamicChildren:b,dirs:$}=m;W|=g.patchFlag&16;const G=g.props||m1,X=m.props||m1;let s1;if(j&&U0(j,!1),(s1=X.onVnodeBeforeUpdate)&&H2(s1,j,m,g),$&&$0(m,g,j,"beforeUpdate"),j&&U0(j,!0),b&&(!g.dynamicChildren||g.dynamicChildren.length!==b.length)&&(W=0,z=!1,b=null),(G.innerHTML&&X.innerHTML==null||G.textContent&&X.textContent==null)&&u(N,""),b?q(g.dynamicChildren,b,N,j,y,Pe(m,P),B):z||w1(g,m,N,null,j,y,Pe(m,P),B,!1),W>0){if(W&16)r1(N,G,X,j,P);else if(W&2&&G.class!==X.class&&i(N,"class",null,X.class,P),W&4&&i(N,"style",G.style,X.style,P),W&8){const u1=m.dynamicProps;for(let j1=0;j1{s1&&H2(s1,j,m,g),$&&$0(m,g,j,"updated")},y)},q=(g,m,j,y,P,B,z)=>{for(let N=0;N{if(m!==j){if(m!==m1)for(const B in m)!S3(B)&&!(B in j)&&i(g,B,m[B],null,P,y);for(const B in j){if(S3(B))continue;const z=j[B],N=m[B];z!==N&&B!=="value"&&i(g,B,N,z,P,y)}"value"in j&&i(g,"value",m.value,j.value,P)}},F=(g,m,j,y,P,B,z,N,W)=>{const b=m.el=g?g.el:d(""),$=m.anchor=g?g.anchor:d("");let{patchFlag:G,dynamicChildren:X,slotScopeIds:s1}=m;s1&&(N=N?N.concat(s1):s1),g==null?(n(b,j,y),n($,j,y),U(m.children||[],j,$,P,B,z,N,W)):G>0&&G&64&&X&&g.dynamicChildren&&g.dynamicChildren.length===X.length?(q(g.dynamicChildren,X,j,P,B,z,N),(m.key!=null||P&&m===P.subTree)&&Kt(g,m,!0)):w1(g,m,j,$,P,B,z,N,W)},d1=(g,m,j,y,P,B,z,N,W)=>{m.slotScopeIds=N,g==null?m.shapeFlag&512?P.ctx.activate(m,j,y,z,W):v1(m,j,y,P,B,z,W):L1(g,m,W)},v1=(g,m,j,y,P,B,z)=>{const N=g.component=i6(g,y,P);if(oe(g)&&(N.ctx.renderer=o1),s6(N,!1,z),N.asyncDep){if(P&&P.registerDep(N,h1,z),!g.el){const W=N.subTree=e1(U1);O(null,W,m,j),g.placeholder=W.el}}else h1(N,g,m,j,P,B,z)},L1=(g,m,j)=>{const y=m.component=g.component;if(As(g,m,j))if(y.asyncDep&&!y.asyncResolved){i1(y,m,j);return}else y.next=m,y.update();else m.el=g.el,y.vnode=m},h1=(g,m,j,y,P,B,z)=>{const N=()=>{if(g.isMounted){let{next:G,bu:X,u:s1,parent:u1,vnode:j1}=g;{const e2=m4(g);if(e2){G&&(G.el=j1.el,i1(g,G,z)),e2.asyncDep.then(()=>{F1(()=>{g.isUnmounted||b()},P)});return}}let f1=G,E1;U0(g,!1),G?(G.el=j1.el,i1(g,G,z)):G=j1,X&&d3(X),(E1=G.props&&G.props.onVnodeBeforeUpdate)&&H2(E1,u1,G,j1),U0(g,!0);const S1=Fo(g),u2=g.subTree;g.subTree=S1,x(u2,S1,p(u2.el),I(u2),g,P,B),G.el=S1.el,f1===null&&Wt(g,S1.el),s1&&F1(s1,P),(E1=G.props&&G.props.onVnodeUpdated)&&F1(()=>H2(E1,u1,G,j1),P)}else{let G;const{el:X,props:s1}=m,{bm:u1,m:j1,parent:f1,root:E1,type:S1}=g,u2=P0(m);U0(g,!1),u1&&d3(u1),!u2&&(G=s1&&s1.onVnodeBeforeMount)&&H2(G,f1,m),U0(g,!0);{E1.ce&&E1.ce._hasShadowRoot()&&E1.ce._injectChildStyle(S1,g.parent?g.parent.type:void 0);const e2=g.subTree=Fo(g);x(null,e2,j,y,g,P,B),m.el=e2.el}if(j1&&F1(j1,P),!u2&&(G=s1&&s1.onVnodeMounted)){const e2=m;F1(()=>H2(G,f1,e2),P)}(m.shapeFlag&256||f1&&P0(f1.vnode)&&f1.vnode.shapeFlag&256)&&g.a&&F1(g.a,P),g.isMounted=!0,m=j=y=null}};g.scope.on();const W=g.effect=new j5(N);g.scope.off();const b=g.update=W.run.bind(W),$=g.job=W.runIfDirty.bind(W);$.i=g,$.id=g.uid,W.scheduler=()=>Tt($),U0(g,!0),b()},i1=(g,m,j)=>{m.component=g;const y=g.vnode.props;g.vnode=m,g.next=null,Ps(g,m.props,y,j),Fs(g,m.children,j),f0(),Bo(g),M0()},w1=(g,m,j,y,P,B,z,N,W=!1)=>{const b=g&&g.children,$=g?g.shapeFlag:0,G=m.children,{patchFlag:X,shapeFlag:s1}=m;if(X>0){if(X&128){E2(b,G,j,y,P,B,z,N,W);return}else if(X&256){P1(b,G,j,y,P,B,z,N,W);return}}s1&8?($&16&&X1(b,P,B),G!==b&&u(j,G)):$&16?s1&16?E2(b,G,j,y,P,B,z,N,W):X1(b,P,B,!0):($&8&&u(j,""),s1&16&&U(G,j,y,P,B,z,N,W))},P1=(g,m,j,y,P,B,z,N,W)=>{g=g||s3,m=m||s3;const b=g.length,$=m.length,G=Math.min(b,$);let X;for(X=0;X$?X1(g,P,B,!0,!1,G):U(m,j,y,P,B,z,N,W,G)},E2=(g,m,j,y,P,B,z,N,W)=>{let b=0;const $=m.length;let G=g.length-1,X=$-1;for(;b<=G&&b<=X;){const s1=g[b],u1=m[b]=W?u0(m[b]):N2(m[b]);if($2(s1,u1))x(s1,u1,j,null,P,B,z,N,W);else break;b++}for(;b<=G&&b<=X;){const s1=g[G],u1=m[X]=W?u0(m[X]):N2(m[X]);if($2(s1,u1))x(s1,u1,j,null,P,B,z,N,W);else break;G--,X--}if(b>G){if(b<=X){const s1=X+1,u1=s1<$?m[s1].el:y;for(;b<=X;)x(null,m[b]=W?u0(m[b]):N2(m[b]),j,u1,P,B,z,N,W),b++}}else if(b>X)for(;b<=G;)K1(g[b],P,B,!0),b++;else{const s1=b,u1=b,j1=new Map;for(b=u1;b<=X;b++){const z1=m[b]=W?u0(m[b]):N2(m[b]);z1.key!=null&&j1.set(z1.key,b)}let f1,E1=0;const S1=X-u1+1;let u2=!1,e2=0;const A2=new Array(S1);for(b=0;b=S1){K1(z1,P,B,!0);continue}let t2;if(z1.key!=null)t2=j1.get(z1.key);else for(f1=u1;f1<=X;f1++)if(A2[f1-u1]===0&&$2(z1,m[f1])){t2=f1;break}t2===void 0?K1(z1,P,B,!0):(A2[t2-u1]=b+1,t2>=e2?e2=t2:u2=!0,x(z1,m[t2],j,null,P,B,z,N,W),E1++)}const d9=u2?Ws(A2):s3;for(f1=d9.length-1,b=S1-1;b>=0;b--){const z1=u1+b,t2=m[z1],N0=m[z1+1],Z0=z1+1<$?N0.el||f4(N0):y;A2[b]===0?x(null,t2,j,Z0,P,B,z,N,W):u2&&(f1<0||b!==d9[f1]?D2(t2,j,Z0,2):f1--)}}},D2=(g,m,j,y,P=null)=>{const{el:B,type:z,transition:N,children:W,shapeFlag:b}=g;if(b&6){D2(g.component.subTree,m,j,y);return}if(b&128){g.suspense.move(m,j,y);return}if(b&64){z.move(g,m,j,o1);return}if(z===r2){n(B,m,j);for(let G=0;GN.enter(B),P));else{const{leave:G,delayLeave:X,afterLeave:s1}=N,u1=()=>{g.ctx.isUnmounted?r(B):n(B,m,j)},j1=()=>{const f1=B._isLeaving||!!B[V2];B._isLeaving&&B[V2](!0),N.persisted&&!f1?u1():G(B,()=>{u1(),s1&&s1()})};X?X(B,u1,j1):j1()}else n(B,m,j)},K1=(g,m,j,y=!1,P=!1)=>{const{type:B,props:z,ref:N,children:W,dynamicChildren:b,shapeFlag:$,patchFlag:G,dirs:X,cacheIndex:s1,memo:u1}=g;if(G===-2&&(P=!1),N!=null&&(f0(),O3(N,null,j,g,!0),M0()),s1!=null&&(m.renderCache[s1]=void 0),$&256){m.ctx.deactivate(g);return}const j1=$&1&&X,f1=!P0(g);let E1;if(f1&&(E1=z&&z.onVnodeBeforeUnmount)&&H2(E1,m,g),$&6)S2(g.component,j,y);else{if($&128){g.suspense.unmount(j,y);return}j1&&$0(g,null,m,"beforeUnmount"),$&64?g.type.remove(g,m,j,o1,y):b&&!b.hasOnce&&(B!==r2||G>0&&G&64)?X1(b,m,j,!1,!0):(B===r2&&G&384||!P&&$&16)&&X1(W,m,j),y&&V0(g)}const S1=u1!=null&&s1==null;(f1&&(E1=z&&z.onVnodeUnmounted)||j1||S1)&&F1(()=>{E1&&H2(E1,m,g),j1&&$0(g,null,m,"unmounted"),S1&&(g.el=null)},j)},V0=g=>{const{type:m,el:j,anchor:y,transition:P}=g;if(m===r2){i0(j,y);return}if(m===Oe){L(g);return}const B=()=>{r(j),P&&!P.persisted&&P.afterLeave&&P.afterLeave()};if(g.shapeFlag&1&&P&&!P.persisted){const{leave:z,delayLeave:N}=P,W=()=>z(j,B);N?N(g.el,B,W):W()}else B()},i0=(g,m)=>{let j;for(;g!==m;)j=w(g),r(g),g=j;r(m)},S2=(g,m,j)=>{const{bum:y,scope:P,job:B,subTree:z,um:N,m:W,a:b}=g;E9(W),E9(b),y&&d3(y),P.stop(),B&&(B.flags|=8,K1(z,g,m,j)),N&&F1(N,m),F1(()=>{g.isUnmounted=!0},m)},X1=(g,m,j,y=!1,P=!1,B=0)=>{for(let z=B;z{if(g.shapeFlag&6)return I(g.component.subTree);if(g.shapeFlag&128)return g.suspense.next();const m=w(g.anchor||g.el),j=m&&m[q5];return j?w(j):m};let Y=!1;const K=(g,m,j)=>{let y;g==null?m._vnode&&(K1(m._vnode,null,null,!0),y=m._vnode.component):x(m._vnode||null,g,m,null,null,null,j),m._vnode=g,Y||(Y=!0,Bo(y),$5(),Y=!1)},o1={p:x,um:K1,m:D2,r:V0,mt:v1,mc:U,pc:w1,pbc:q,n:I,o:e};return{render:K,hydrate:void 0,createApp:_s(K)}}function Pe({type:e,props:t},o){return o==="svg"&&e==="foreignObject"||o==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:o}function U0({effect:e,job:t},o){o?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Us(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Kt(e,t,o=!1){const n=e.children,r=t.children;if(t1(n)&&t1(r))for(let i=0;i>1,e[o[d]]0&&(t[n]=o[i-1]),o[i]=n)}}for(i=o.length,s=o[i-1];i-- >0;)o[i]=s,s=t[s];return o}function m4(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:m4(t)}function E9(e){if(e)for(let t=0;te.__isSuspense;let ut=0;const zs={name:"Suspense",__isSuspense:!0,process(e,t,o,n,r,i,s,d,l,h){if(e==null)Ks(t,o,n,r,i,s,d,l,h);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}Gs(e,t,o,n,r,s,d,l,h)}},hydrate:Js,normalize:Ys},qs=zs;function G3(e,t){const o=e.props&&e.props[t];l1(o)&&o()}function Ks(e,t,o,n,r,i,s,d,l){const{p:h,o:{createElement:u}}=l,p=u("div"),w=e.suspense=M4(e,r,n,t,p,o,i,s,d,l);h(null,w.pendingBranch=e.ssContent,p,null,n,w,i,s),w.deps>0?(G3(e,"onPending"),G3(e,"onFallback"),h(null,e.ssFallback,t,o,n,null,i,s),k3(w,e.ssFallback)):w.resolve(!1,!0)}function Gs(e,t,o,n,r,i,s,d,{p:l,um:h,o:{createElement:u}}){const p=t.suspense=e.suspense;p.vnode=t,t.el=e.el;const w=t.ssContent,v=t.ssFallback,{activeBranch:f,pendingBranch:x,isInFallback:S,isHydrating:O}=p;if(x)p.pendingBranch=w,$2(x,w)?(l(x,w,p.hiddenContainer,null,r,p,i,s,d),p.deps<=0?p.resolve():S&&!O&&!p.isFallbackMountPending&&(l(f,v,o,n,r,null,i,s,d),k3(p,v))):(p.pendingId=ut++,O?(p.isHydrating=!1,p.activeBranch=x):h(x,r,p),p.deps=0,p.effects.length=0,p.hiddenContainer=u("div"),S?(l(null,w,p.hiddenContainer,null,r,p,i,s,d),p.deps<=0?p.resolve():p.isFallbackMountPending||(l(f,v,o,n,r,null,i,s,d),k3(p,v))):f&&$2(f,w)?(l(f,w,o,n,r,p,i,s,d),p.resolve(!0)):(l(null,w,p.hiddenContainer,null,r,p,i,s,d),p.deps<=0&&p.resolve()));else if(f&&$2(f,w))l(f,w,o,n,r,p,i,s,d),k3(p,w);else if(G3(t,"onPending"),p.pendingBranch=w,w.shapeFlag&512?p.pendingId=w.component.suspenseId:p.pendingId=ut++,l(null,w,p.hiddenContainer,null,r,p,i,s,d),p.deps<=0)p.resolve();else{const{timeout:D,pendingId:H}=p;D>0?setTimeout(()=>{p.pendingId===H&&p.fallback(v)},D):D===0&&p.fallback(v)}}function M4(e,t,o,n,r,i,s,d,l,h,u=!1){const{p,m:w,um:v,n:f,o:{parentNode:x,remove:S}}=h;let O;const D=Xs(e);D&&t&&t.pendingBranch&&(O=t.pendingId,t.deps++);const H=e.props?C5(e.props.timeout):void 0,L=i,Z={vnode:e,parent:t,parentComponent:o,namespace:s,container:n,hiddenContainer:r,deps:0,pendingId:ut++,timeout:typeof H=="number"?H:-1,activeBranch:null,isFallbackMountPending:!1,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(T=!1,_=!1){const{vnode:U,activeBranch:A,pendingBranch:q,pendingId:r1,effects:F,parentComponent:d1,container:v1,isInFallback:L1}=Z;let h1=!1;if(Z.isHydrating)Z.isHydrating=!1;else if(!T){h1=A&&q.transition&&q.transition.mode==="out-in";let P1=!1;h1&&(A.transition.afterLeave=()=>{r1===Z.pendingId&&(w(q,v1,i===L&&!P1?f(A):i,0),it(F),L1&&U.ssFallback&&(U.ssFallback.el=null))}),A&&!Z.isFallbackMountPending&&(x(A.el)===v1&&(i=f(A),P1=!0),v(A,d1,Z,!0),!h1&&L1&&U.ssFallback&&F1(()=>U.ssFallback.el=null,Z)),h1||w(q,v1,i,0)}Z.isFallbackMountPending=!1,k3(Z,q),Z.pendingBranch=null,Z.isInFallback=!1;let i1=Z.parent,w1=!1;for(;i1;){if(i1.pendingBranch){for(let P1=0;P1{if(Z.isFallbackMountPending=!1,!Z.isInFallback)return;const L1=Z.vnode.ssFallback;p(null,L1,q,F,A,null,r1,d,l),k3(Z,L1)},v1=T.transition&&T.transition.mode==="out-in";v1&&(Z.isFallbackMountPending=!0,U.transition.afterLeave=d1),Z.isInFallback=!0,v(U,A,null,!0),v1||d1()},move(T,_,U){Z.activeBranch&&w(Z.activeBranch,T,_,U),Z.container=T},next(){return Z.activeBranch&&f(Z.activeBranch)},registerDep(T,_,U){const A=!!Z.pendingBranch;A&&Z.deps++;const q=T.vnode.el;T.asyncDep.catch(r1=>{t9(r1,T,0)}).then(r1=>{if(T.isUnmounted||Z.isUnmounted||Z.pendingId!==T.suspenseId)return;pt(),T.asyncResolved=!0;const{vnode:F}=T;wt(T,r1),q&&(F.el=q);const d1=!q&&T.subTree.el;_(T,F,x(q||T.subTree.el),q?null:f(T.subTree),Z,s,U),d1&&(F.placeholder=null,S(d1)),Wt(T,F.el),A&&--Z.deps===0&&Z.resolve()})},unmount(T,_){Z.isUnmounted=!0,Z.activeBranch&&v(Z.activeBranch,o,T,_),Z.pendingBranch&&v(Z.pendingBranch,o,T,_)}};return Z}function Js(e,t,o,n,r,i,s,d,l){const h=t.suspense=M4(t,n,o,e.parentNode,document.createElement("div"),null,r,i,s,d,!0),u=l(e,h.pendingBranch=t.ssContent,o,h,i,s);return h.deps===0&&h.resolve(!1,!0),u}function Ys(e){const{shapeFlag:t,children:o}=e,n=t&32;e.ssContent=Uo(n?o.default:o),e.ssFallback=n?Uo(o.fallback):e1(U1)}function Uo(e){let t;if(l1(e)){const o=p3&&e._c;o&&(e._d=!1,Y1()),e=e(),o&&(e._d=!0,t=C2,le())}return t1(e)&&(e=bs(e)),e=N2(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(o=>o!==e)),e}function Qs(e,t){t&&t.pendingBranch?t1(e)?t.effects.push(...e):t.effects.push(e):it(e)}function k3(e,t){e.activeBranch=t;const{vnode:o,parentComponent:n}=e;let r=t.el;for(;!r&&t.component;)t=t.component.subTree,r=t.el;o.el=r,n&&n.subTree===o&&(n.vnode.el=r,Wt(n,r))}function Xs(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const r2=Symbol.for("v-fgt"),de=Symbol.for("v-txt"),U1=Symbol.for("v-cmt"),Oe=Symbol.for("v-stc"),v0=[];let C2=null;function Y1(e=!1){v0.push(C2=e?null:[])}function le(){v0.pop(),C2=v0[v0.length-1]||null}let p3=1;function A9(e,t=!1){p3+=e,e<0&&C2&&t&&(C2.hasOnce=!0)}function j4(e){return e.dynamicChildren=p3>0?C2||s3:null,le(),p3>0&&C2&&C2.push(e),e}function Q0(e,t,o,n,r,i){return j4(_2(e,t,o,n,r,i,!0))}function c0(e,t,o,n,r){return j4(e1(e,t,o,n,r,!0))}function T0(e){return e?e.__v_isVNode===!0:!1}function $2(e,t){return e.type===t.type&&e.key===t.key}const D4=({key:e})=>e??null,D9=({ref:e,ref_key:t,ref_for:o})=>(typeof e=="number"&&(e=""+e),e!=null?_1(e)||b1(e)||l1(e)?{i:Q1,r:e,k:t,f:!!o}:e:null);function _2(e,t=null,o=null,n=0,r=null,i=e===r2?0:1,s=!1,d=!1){const l={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&D4(t),ref:t&&D9(t),scopeId:W5,slotScopeIds:null,children:o,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:n,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Q1};return d?(I9(l,o),i&128&&e.normalize(l)):o&&(l.shapeFlag|=_1(o)?8:16),p3>0&&!s&&C2&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&C2.push(l),l}const e1=e6;function e6(e,t=null,o=null,n=0,r=null,i=!1){if((!e||e===n4)&&(e=U1),T0(e)){const d=D0(e,t,!0);return o&&I9(d,o),p3>0&&!i&&C2&&(d.shapeFlag&6?C2[C2.indexOf(e)]=d:C2.push(d)),d.patchFlag=-2,d}if(k6(e)&&(e=e.__vccOpts),t){t=t6(t);let{class:d,style:l}=t;d&&!_1(d)&&(t.class=J9(d)),M1(l)&&(X9(l)&&!t1(l)&&(l=T1({},l)),t.style=h3(l))}const s=_1(e)?1:S9(e)?128:te(e)?64:M1(e)?4:l1(e)?2:0;return _2(e,t,o,n,r,s,i,!0)}function t6(e){return e?X9(e)||p4(e)?T1({},e):e:null}function D0(e,t,o=!1,n=!1){const{props:r,ref:i,patchFlag:s,children:d,transition:l}=e,h=t?w3(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:h,key:h&&D4(h),ref:t&&t.ref?o&&i?t1(i)?i.concat(D9(t)):[i,D9(t)]:D9(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:d,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==r2?s===-1?16:s|16:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:l,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&D0(e.ssContent),ssFallback:e.ssFallback&&D0(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return l&&n&&O0(u,l.clone(u)),u}function x9(e=" ",t=0){return e1(de,null,e,t)}function o6(e="",t=!1){return t?(Y1(),c0(U1,null,e)):e1(U1,null,e)}function N2(e){return e==null||typeof e=="boolean"?e1(U1):t1(e)?e1(r2,null,e.slice()):T0(e)?u0(e):e1(de,null,String(e))}function u0(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:D0(e)}function I9(e,t){let o=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(t1(t))o=16;else if(typeof t=="object")if(n&65){const r=t.default;r&&(r._c&&(r._d=!1),I9(e,r()),r._c&&(r._d=!0));return}else{o=32;const r=t._;!r&&!p4(t)?t._ctx=Q1:r===3&&Q1&&(Q1.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(l1(t)){if(n&65){I9(e,{default:t});return}t={default:t,_ctx:Q1},o=32}else t=String(t),n&64?(o=16,t=[x9(t)]):o=8;e.children=t,e.shapeFlag|=o}function w3(...e){const t={};for(let o=0;oi2||Q1;let P9,J3;{const e=G9(),t=(o,n)=>{let r;return(r=e[o])||(r=e[o]=[]),r.push(n),i=>{r.length>1?r.forEach(s=>s(i)):r[0](i)}};P9=t("__VUE_INSTANCE_SETTERS__",o=>i2=o),J3=t("__VUE_SSR_SETTERS__",o=>Y3=o)}const i9=e=>{const t=i2;return P9(e),e.scope.on(),()=>{e.scope.off(),P9(t)}},pt=()=>{i2&&i2.scope.off(),P9(null)};function x4(e){return e.vnode.shapeFlag&4}let Y3=!1;function s6(e,t=!1,o=!1){t&&J3(t);const{props:n,children:r}=e.vnode,i=x4(e);Is(e,n,i,t),Rs(e,r,o||t);const s=i?d6(e,t):void 0;return t&&J3(!1),s}function d6(e,t){const o=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,js);const{setup:n}=o;if(n){f0();const r=e.setupContext=n.length>1?a6(e):null,i=i9(e),s=e9(n,e,0,[e.props,r]),d=h5(s);if(M0(),i(),(d||e.sp)&&!P0(e)&&e4(e),d){if(s.then(pt,pt),t)return s.then(l=>{J3(!0);try{wt(e,l,t)}finally{J3(!1)}}).catch(l=>{t9(l,e,0)});e.asyncDep=s}else wt(e,s)}else L4(e)}function wt(e,t,o){l1(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:M1(t)&&(e.setupState=O5(t)),L4(e)}function L4(e,t,o){const n=e.type;e.render||(e.render=n.render||o0);{const r=i9(e);f0();try{Ds(e)}finally{M0(),r()}}}const l6={get(e,t){return n2(e,"get",""),e[t]}};function a6(e){const t=o=>{e.exposed=o||{}};return{attrs:new Proxy(e.attrs,l6),slots:e.slots,emit:e.emit,expose:t}}function ae(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(O5(Ot(e.exposed)),{get(t,o){if(o in t)return t[o];if(o in T3)return T3[o](e)},has(t,o){return o in t||o in T3}})):e.proxy}function Ct(e,t=!0){return l1(e)?e.displayName||e.name:e.name||t&&e.__name}function k6(e){return l1(e)&&"__vccOpts"in e}const B1=(e,t)=>Ji(e,t,Y3);function Q3(e,t,o){try{A9(-1);const n=arguments.length;return n===2?M1(t)&&!t1(t)?T0(t)?e1(e,null,[t]):e1(e,t):e1(e,null,t):(n>3?o=Array.prototype.slice.call(arguments,2):n===3&&T0(o)&&(o=[o]),e1(e,t,o))}finally{A9(1)}}const h6="3.5.42";/** +**/function d9(e,t,n,o){try{return o?e(...o):e()}catch(r){a9(r,t,n)}}function x2(e,t,n,o){if(a1(e)){const r=d9(e,t,n,o);return r&&xs(r)&&r.catch(i=>{a9(i,t,n)}),r}if(J(e)){const r=[];for(let i=0;i>>1,r=i2[o],i=Kt(r);i=Kt(n)?i2.push(e):i2.splice(O3(t),0,e),e.flags|=1,Xs()}}function Xs(){q9||(q9=Js.then(t5))}function xo(e){if(!J(e))ve&&e.id===-1?ve.splice(Qe+1,0,e):e.flags&1||(nt.push(e),e.flags|=1);else for(let t=0;tKt(n)-Kt(o));if(nt.length=0,ve){for(let n=0;ne.id==null?e.flags&2?-1:1/0:e.id;function t5(e){try{for(T2=0;T2{o._d&&J9(-1);const i=U9(t),s=ne.length;let l;try{l=e(...r)}finally{for(let d=ne.length;d>s;d--)bn();U9(i),o._d&&J9(1)}return l};return o._n=!0,o._c=!0,o._d=!0,o}function Cr(e,t){if(Q1===null)return e;const n=Zn(Q1),o=e.dirs||(e.dirs=[]);for(let r=0;r1)return n&&a1(t)?t.call(o&&o.proxy):t}}function A3(){return!!(U2()||Ie)}const P3=Symbol.for("v-scx"),T3=()=>W1(P3);function mn(e,t){return Mn(e,null,t)}function I3(e,t){return Mn(e,null,{flush:"sync"})}function E1(e,t,n){return Mn(e,t,n)}function Mn(e,t,n=g1){const{immediate:o,deep:r,flush:i,once:s}=n,l=T1({},n),d=t&&o||!t&&i!=="post";let a;if(e9){if(i==="sync"){const p=T3();a=p.__watcherHandles||(p.__watcherHandles=[])}else if(!d){const p=()=>{};return p.stop=F2,p.resume=F2,p.pause=F2,p}}const k=t2;l.call=(p,g,v)=>x2(p,k,g,v);let u=!1;i==="post"?l.scheduler=p=>{R1(p,k&&k.suspense)}:i!=="sync"&&(u=!0,l.scheduler=(p,g)=>{g?p():wr(p)}),l.augmentJob=p=>{t&&(p.flags|=4),u&&(p.flags|=2,k&&(p.id=k.uid,p.i=k))};const h=E3(e,t,l);return e9&&(a?a.push(h):d&&h()),h}function R3(e,t,n){const o=this.proxy,r=y1(e)?e.includes(".")?o5(o,e):()=>o[e]:e.bind(o,o);let i;a1(t)?i=t:(i=t.handler,n=t);const s=h9(this),l=Mn(r,i.bind(o),n);return s(),l}function o5(e,t){const n=t.split(".");return()=>{let o=e;for(let r=0;re.__isTeleport,Be=e=>e&&(e.disabled||e.disabled===""),$3=e=>e&&(e.defer||e.defer===""),n0=e=>typeof SVGElement<"u"&&e instanceof SVGElement,o0=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Do=(e,t)=>{const n=e&&e.to;return y1(n)?t?t(n):null:n},F3={name:"Teleport",__isTeleport:!0,process(e,t,n,o,r,i,s,l,d,a){const{mc:k,pc:u,pbc:h,o:{insert:p,querySelector:g,createText:v,createComment:m,parentNode:H}}=a,w=Be(t.props);let{dynamicChildren:j}=t;const f=(y,A,L)=>{y.shapeFlag&16&&k(y.children,A,L,r,i,s,l,d)},x=(y=t)=>{const A=Be(y.props),L=y.target=Do(y.props,g),P=Lo(L,y,v,p);L&&(s!=="svg"&&n0(L)?s="svg":s!=="mathml"&&o0(L)&&(s="mathml"),r&&r.isCE&&(r.ce._teleportTargets||(r.ce._teleportTargets=new Set)).add(L),A||(f(y,L,P),_t(y,!1)))},D=y=>{const A=()=>{if(we.get(y)===A){if(we.delete(y),Be(y.props)){const L=H(y.el)||n;f(y,L,y.anchor),_t(y,!0)}x(y)}};we.set(y,A),R1(A,i)};if(e==null){const y=t.el=v(""),A=t.anchor=v("");if(p(y,n,o),p(A,n,o),$3(t.props)||i&&i.pendingBranch){D(t);return}w&&(f(t,n,A),_t(t,!0)),x()}else{t.el=e.el;const y=t.anchor=e.anchor,A=we.get(e);if(A){A.flags|=8,we.delete(e),D(t);return}t.targetStart=e.targetStart;const L=t.target=e.target,P=t.targetAnchor=e.targetAnchor,U=Be(e.props),I=U?n:L,X=U?y:P;if(s==="svg"||n0(L)?s="svg":(s==="mathml"||o0(L))&&(s="mathml"),j?(h(e.dynamicChildren,j,I,r,i,s,l),Hr(e,t,!0)):d||u(e,t,I,X,r,i,s,l,!1),w)U?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):m9(t,n,y,a,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const l1=Do(t.props,g);l1&&(t.target=l1,m9(t,l1,null,a,0))}else U&&m9(t,L,P,a,1);_t(t,w)}},remove(e,t,n,{um:o,o:{remove:r}},i){const{shapeFlag:s,children:l,anchor:d,targetStart:a,targetAnchor:k,target:u,props:h}=e,p=Be(h),g=i||!p,v=we.get(e);if(v&&(v.flags|=8,we.delete(e)),u&&(r(a),r(k)),i&&r(d),!v&&(p||u)&&s&16)for(let m=0;m{e.isMounted=!0}),ze(()=>{e.isUnmounting=!0}),e}const m2=[Function,Array],s5={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:m2,onEnter:m2,onAfterEnter:m2,onEnterCancelled:m2,onBeforeLeave:m2,onLeave:m2,onAfterLeave:m2,onLeaveCancelled:m2,onBeforeAppear:m2,onAppear:m2,onAfterAppear:m2,onAppearCancelled:m2},l5=e=>{const t=e.subTree;return t.component?l5(t.component):t},q3={name:"BaseTransition",props:s5,setup(e,{slots:t}){const n=U2(),o=i5();return()=>{const r=t.default&&gr(t.default(),!0),i=r&&r.length?d5(r):n.subTree?L1():void 0;if(!i)return;const s=w1(e),{mode:l}=s;if(o.isLeaving)return qn(i);const d=z9(i);if(!d)return qn(i);let a=Yt(d,s,o,n,u=>a=u);d.type!==$1&&De(d,a);let k=n.subTree&&z9(n.subTree);if(k&&k.type!==$1&&!V2(k,d)&&l5(n).type!==$1){let u=Yt(k,s,o,n);if(De(k,u),l==="out-in"&&d.type!==$1)return o.isLeaving=!0,u.afterLeave=()=>{o.isLeaving=!1,n.job.flags&8||n.update(),delete u.afterLeave,k=void 0},qn(i);l==="in-out"&&d.type!==$1?u.delayLeave=(h,p,g)=>{const v=a5(o,k);v[String(k.key)]=k,h[j2]=()=>{p(),h[j2]=void 0,delete a.delayedLeave,k=void 0},a.delayedLeave=()=>{g(),delete a.delayedLeave,k=void 0}}:k=void 0}else k&&(k=void 0);return i}}};function d5(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==$1){t=n;break}}return t}const U3=q3;function a5(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function Yt(e,t,n,o,r){const{appear:i,mode:s,persisted:l=!1,onBeforeEnter:d,onEnter:a,onAfterEnter:k,onEnterCancelled:u,onBeforeLeave:h,onLeave:p,onAfterLeave:g,onLeaveCancelled:v,onBeforeAppear:m,onAppear:H,onAfterAppear:w,onAppearCancelled:j}=t,f=String(e.key),x=a5(n,e),D=(L,P)=>{L&&x2(L,o,9,P)},y=(L,P)=>{const U=P[1];D(L,P),J(L)?L.every(I=>I.length<=1)&&U():L.length<=1&&U()},A={mode:s,persisted:l,beforeEnter(L){let P=d;if(!n.isMounted)if(i)P=m||d;else return;L[j2]&&L[j2](!0);const U=x[f];U&&V2(e,U)&&U.el[j2]&&U.el[j2](),D(P,[L])},enter(L){if(x[f]===e)return;let P=a,U=k,I=u;if(!n.isMounted)if(i)P=H||a,U=w||k,I=j||u;else return;let X=!1;L[mt]=h1=>{X||(X=!0,h1?D(I,[L]):D(U,[L]),A.delayedLeave&&A.delayedLeave(),L[mt]=void 0)};const l1=L[mt].bind(null,!1);P?y(P,[L,l1]):l1()},leave(L,P){const U=String(e.key);if(L[mt]&&L[mt](!0),n.isUnmounting)return P();D(h,[L]);let I=!1;L[j2]=l1=>{I||(I=!0,P(),l1?D(v,[L]):D(g,[L]),L[j2]=void 0,x[U]===e&&delete x[U])};const X=L[j2].bind(null,!1);x[U]=e,p?y(p,[L,X]):X()},clone(L){const P=Yt(L,t,n,o,r);return r&&r(P),P}};return A}function qn(e){if(xn(e))return e=_2(e),e.children=null,e}function z9(e){if(!xn(e))return jn(e.type)&&e.children?d5(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&a1(n.default))return n.default()}}function De(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;De(jn(n.type)&&z9(n)||n,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function gr(e,t=!1,n){let o=[],r=0;for(let i=0;i1)for(let i=0;iIt(v,t&&(J(t)?t[m]:t),n,o,r));return}if(xe(o)&&!r){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&It(e,t,n,o.component.subTree);return}const i=o.shapeFlag&4?Zn(o.component):o.el,s=r?null:i,{i:l,r:d}=e,a=t&&t.r,k=l.refs===g1?l.refs={}:l.refs,u=l.setupState,h=w1(u),p=u===g1?js:v=>r0(k,v)?!1:x1(h,v),g=(v,m)=>!(m&&r0(k,m));if(a!=null&&a!==d){if(i0(t),y1(a))k[a]=null,p(a)&&(u[a]=null);else if(B1(a)){const v=t;g(a,v.k)&&(a.value=null),v.k&&(k[v.k]=null)}}if(a1(d))d9(d,l,12,[s,k]);else{const v=y1(d),m=B1(d);if(v||m){const H=()=>{if(e.f){const w=v?p(d)?u[d]:k[d]:g()||!e.k?d.value:k[e.k];if(r)J(w)&&ir(w,i);else if(J(w))w.includes(i)||w.push(i);else if(v)k[d]=[i],p(d)&&(u[d]=k[d]);else{const j=[i];g(d,e.k)&&(d.value=j),e.k&&(k[e.k]=j)}}else v?(k[d]=s,p(d)&&(u[d]=s)):m&&(g(d,e.k)&&(d.value=s),e.k&&(k[e.k]=s))};if(s){const w=()=>{H(),W9.delete(e)};w.id=-1,W9.set(e,w),R1(w,n)}else i0(e),H()}}}function i0(e){const t=W9.get(e);t&&(t.flags|=8,W9.delete(e))}Cn().requestIdleCallback;Cn().cancelIdleCallback;const xe=e=>!!e.type.__asyncLoader,xn=e=>e.type.__isKeepAlive,W3={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=U2(),o=n.ctx;if(!o.renderer)return()=>{const w=t.default&&t.default();return w&&w.length===1?w[0]:w};const r=new Map,i=new Set;let s=null;const l=n.suspense,{renderer:{p:d,m:a,um:k,o:{createElement:u}}}=o,h=u("div");o.activate=(w,j,f,x,D)=>{const y=w.component;a(w,j,f,0,l),d(y.vnode,w,j,f,y,l,x,w.slotScopeIds,D),R1(()=>{y.isDeactivated=!1,y.a&&tt(y.a);const A=w.props&&w.props.onVnodeMounted;A&&M2(A,y.parent,w)},l)},o.deactivate=w=>{const j=w.component;Y9(j.m),Y9(j.a),a(w,h,null,1,l),R1(()=>{j.da&&tt(j.da);const f=w.props&&w.props.onVnodeUnmounted;f&&M2(f,j.parent,w),j.isDeactivated=!0},l)};function p(w){Un(w),k(w,n,l,!0)}function g(w){r.forEach((j,f)=>{const x=So(xe(j)?j.type.__asyncResolved||{}:j.type);x&&!w(x)&&v(f)})}function v(w){const j=r.get(w);j&&(!s||!V2(j,s))?p(j):s&&Un(s),r.delete(w),i.delete(w)}E1(()=>[e.include,e.exclude],([w,j])=>{w&&g(f=>Bt(w,f)),j&&g(f=>!Bt(j,f))},{flush:"post",deep:!0});let m=null;const H=()=>{m!=null&&(Q9(n.subTree.type)?R1(()=>{const w=M9(n.subTree);w.component&&r.set(m,w)},n.subTree.suspense):r.set(m,M9(n.subTree)))};return q2(H),mr(H),ze(()=>{r.forEach(w=>{const{subTree:j,suspense:f}=n,x=M9(j);if(w.type===x.type&&w.key===x.key){Un(x);const D=x.component.da;D&&R1(D,f);return}p(w)})}),()=>{if(m=null,!t.default)return s=null;const w=t.default(),j=w[0];if(w.length>1)return s=null,w;if(!a2(j)||!(j.shapeFlag&4)&&!(j.shapeFlag&128))return s=null,j;let f=M9(j);if(f.type===$1)return s=null,f;const x=f.type,D=So(xe(f)?f.type.__asyncResolved||{}:x),{include:y,exclude:A,max:L}=e;if(y&&(!D||!Bt(y,D))||A&&D&&Bt(A,D))return f.shapeFlag&=-257,s=f,j;const P=f.key==null?x:f.key,U=r.get(P);return f.el&&(f=_2(f),j.shapeFlag&128&&(j.ssContent=f)),m=P,U?(f.el=U.el,f.component=U.component,f.transition&&De(f,f.transition),f.shapeFlag|=512,i.delete(P),i.add(P)):(i.add(P),L&&i.size>parseInt(L,10)&&v(i.values().next().value)),f.shapeFlag|=256,s=f,Q9(j.type)?j:f}}},G3=W3;function Bt(e,t){return J(e)?e.some(n=>Bt(n,t)):y1(e)?e.split(",").includes(t):Gl(e)?(e.lastIndex=0,e.test(t)):!1}function vr(e,t){u5(e,"a",t)}function Dn(e,t){u5(e,"da",t)}function u5(e,t,n=t2){const o=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Ln(t,o,n),n){let r=n.parent;for(;r&&r.parent;)xn(r.parent.vnode)&&K3(o,t,n,r),r=r.parent}}function K3(e,t,n,o){const r=Ln(t,e,o,!0);Hn(()=>{ir(o[t],r)},n)}function Un(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function M9(e){return e.shapeFlag&128?e.ssContent:e}function Ln(e,t,n=t2,o=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...s)=>{ie();const l=h9(n),d=x2(t,n,e,s);return l(),se(),d});return o?r.unshift(i):r.push(i),i}}const ue=e=>(t,n=t2)=>{(!e9||e==="sp")&&Ln(e,(...o)=>t(...o),n)},fr=ue("bm"),q2=ue("m"),Y3=ue("bu"),mr=ue("u"),ze=ue("bum"),Hn=ue("um"),Q3=ue("sp"),J3=ue("rtg"),X3=ue("rtc");function ed(e,t=t2){Ln("ec",e,t)}const Mr="components",td="directives";function k9(e,t){return jr(Mr,e,!0,t)||e}const h5=Symbol.for("v-ndc");function Ho(e){return y1(e)?jr(Mr,e,!1)||e:e||h5}function pw(e){return jr(td,e)}function jr(e,t,n=!0,o=!1){const r=Q1||t2;if(r){const i=r.type;if(e===Mr){const l=So(i,!1);if(l&&(l===t||l===n2(t)||l===cn(n2(t))))return i}const s=s0(r[e]||i[e],t)||s0(r.appContext[e],t);return!s&&o?i:s}}function s0(e,t){return e&&(e[t]||e[n2(t)]||e[cn(n2(t))])}function ot(e,t,n,o){let r;const i=n,s=J(e);if(s||y1(e)){const l=s&&te(e);let d=!1,a=!1;l&&(d=!w2(e),a=le(e),e=vn(e)),r=new Array(e.length);for(let k=0,u=e.length;kt(l,d,void 0,i));else{const l=Object.keys(e);r=new Array(l.length);for(let d=0,a=l.length;d0;return t!=="default"&&(a.name=t),W(),P1(f1,null,[b("slot",a,o&&o())],k?-2:64)}let s=e[t];s&&s._c&&(s._d=!1);const l=ne.length;W();let d;try{const a=s&&p5(s(n)),k=n.key||i||a&&a.key;d=P1(f1,{key:(k&&!g2(k)?k:`_${t}`)+(!a&&o?"_fb":"")},a||(o?o():[]),a&&e._===1?64:-2)}catch(a){for(let k=ne.length;k>l;k--)bn();throw a}finally{s&&s._c&&(s._d=!0)}return!r&&d.scopeId&&(d.slotScopeIds=[d.scopeId+"-s"]),d}function p5(e){return e.some(t=>a2(t)?!(t.type===$1||t.type===f1&&!p5(t.children)):!0)?e:null}const Vo=e=>e?E5(e)?Zn(e):Vo(e.parent):null,Rt=T1(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Vo(e.parent),$root:e=>Vo(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>w5(e),$forceUpdate:e=>e.f||(e.f=()=>{wr(e.update)}),$nextTick:e=>e.n||(e.n=v2.bind(e.proxy)),$watch:e=>R3.bind(e)}),zn=(e,t)=>e!==g1&&!e.__isScriptSetup&&x1(e,t),nd={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:r,props:i,accessCache:s,type:l,appContext:d}=e;if(t[0]!=="$"){const h=s[t];if(h!==void 0)switch(h){case 1:return o[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(zn(o,t))return s[t]=1,o[t];if(r!==g1&&x1(r,t))return s[t]=2,r[t];if(x1(i,t))return s[t]=3,i[t];if(n!==g1&&x1(n,t))return s[t]=4,n[t];yo&&(s[t]=0)}}const a=Rt[t];let k,u;if(a)return t==="$attrs"&&X1(e.attrs,"get",""),a(e);if((k=l.__cssModules)&&(k=k[t]))return k;if(n!==g1&&x1(n,t))return s[t]=4,n[t];if(u=d.config.globalProperties,x1(u,t))return u[t]},set({_:e},t,n){const{data:o,setupState:r,ctx:i}=e;return zn(r,t)?(r[t]=n,!0):o!==g1&&x1(o,t)?(o[t]=n,!0):x1(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:r,props:i,type:s}},l){let d;return!!(n[l]||e!==g1&&l[0]!=="$"&&x1(e,l)||zn(t,l)||x1(i,l)||x1(o,l)||x1(Rt,l)||x1(r.config.globalProperties,l)||(d=s.__cssModules)&&d[l])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:x1(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function G9(e){return J(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function l0(e,t){return!e||!t?e||t:J(e)&&J(t)?e.concat(t):T1({},G9(e),G9(t))}let yo=!0;function od(e){const t=w5(e),n=e.proxy,o=e.ctx;yo=!1,t.beforeCreate&&d0(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:s,watch:l,provide:d,inject:a,created:k,beforeMount:u,mounted:h,beforeUpdate:p,updated:g,activated:v,deactivated:m,beforeDestroy:H,beforeUnmount:w,destroyed:j,unmounted:f,render:x,renderTracked:D,renderTriggered:y,errorCaptured:A,serverPrefetch:L,expose:P,inheritAttrs:U,components:I,directives:X,filters:l1}=t;if(a&&rd(a,o,null),s)for(const Y in s){const n1=s[Y];a1(n1)&&(o[Y]=n1.bind(n))}if(r){const Y=r.call(n,n);m1(Y)&&(e.data=G1(Y))}if(yo=!0,i)for(const Y in i){const n1=i[Y],C1=a1(n1)?n1.bind(n,n):a1(n1.get)?n1.get.bind(n,n):F2,p1=!a1(n1)&&a1(n1.set)?n1.set.bind(n):F2,O1=N({get:C1,set:p1});Object.defineProperty(o,Y,{enumerable:!0,configurable:!0,get:()=>O1.value,set:Z1=>O1.value=Z1})}if(l)for(const Y in l)c5(l[Y],o,n,Y);if(d){const Y=a1(d)?d.call(n):d;Reflect.ownKeys(Y).forEach(n1=>{je(n1,Y[n1])})}k&&d0(k,e,"c");function k1(Y,n1){J(n1)?n1.forEach(C1=>Y(C1.bind(n))):n1&&Y(n1.bind(n))}if(k1(fr,u),k1(q2,h),k1(Y3,p),k1(mr,g),k1(vr,v),k1(Dn,m),k1(ed,A),k1(X3,D),k1(J3,y),k1(ze,w),k1(Hn,f),k1(Q3,L),J(P))if(P.length){const Y=e.exposed||(e.exposed={});P.forEach(n1=>{Object.defineProperty(Y,n1,{get:()=>n[n1],set:C1=>n[n1]=C1,enumerable:!0})})}else e.exposed||(e.exposed={});x&&e.render===F2&&(e.render=x),U!=null&&(e.inheritAttrs=U),I&&(e.components=I),X&&(e.directives=X),L&&k5(e)}function rd(e,t,n=F2){J(e)&&(e=bo(e));for(const o in e){const r=e[o];let i;m1(r)?"default"in r?i=W1(r.from||o,r.default,!0):i=W1(r.from||o):i=W1(r),B1(i)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>i.value,set:s=>i.value=s}):t[o]=i}}function d0(e,t,n){x2(J(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function c5(e,t,n,o){let r=o.includes(".")?o5(n,o):()=>n[o];if(y1(e)){const i=t[e];a1(i)&&E1(r,i)}else if(a1(e))E1(r,e.bind(n));else if(m1(e))if(J(e))e.forEach(i=>c5(i,t,n,o));else{const i=a1(e.handler)?e.handler.bind(n):t[e.handler];a1(i)&&E1(r,i,e)}}function w5(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:s}}=e.appContext,l=i.get(t);let d;return l?d=l:!r.length&&!n&&!o?d=t:(d={},r.length&&r.forEach(a=>K9(d,a,s,!0)),K9(d,t,s)),m1(t)&&i.set(t,d),d}function K9(e,t,n,o=!1){const{mixins:r,extends:i}=t;i&&K9(e,i,n,!0),r&&r.forEach(s=>K9(e,s,n,!0));for(const s in t)if(!(o&&s==="expose")){const l=id[s]||n&&n[s];e[s]=l?l(e[s],t[s]):t[s]}return e}const id={data:a0,props:k0,emits:k0,methods:Et,computed:Et,beforeCreate:o2,created:o2,beforeMount:o2,mounted:o2,beforeUpdate:o2,updated:o2,beforeDestroy:o2,beforeUnmount:o2,destroyed:o2,unmounted:o2,activated:o2,deactivated:o2,errorCaptured:o2,serverPrefetch:o2,components:Et,directives:Et,watch:ld,provide:a0,inject:sd};function a0(e,t){return t?e?function(){return T1(a1(e)?e.call(this,this):e,a1(t)?t.call(this,this):t)}:t:e}function sd(e,t){return Et(bo(e),bo(t))}function bo(e){if(J(e)){const t={};for(let n=0;n{let k,u=g1,h;return I3(()=>{const p=e[r];Y1(k,p)&&(k=p,a())}),{get(){return d(),n.get?n.get(k):k},set(p){const g=n.set?n.set(p):p;if(!Y1(g,k)&&!(u!==g1&&Y1(p,u)))return;const v=o.vnode.props,m=!!(v&&(t in v||r in v||i in v)&&(`onUpdate:${t}`in v||`onUpdate:${r}`in v||`onUpdate:${i}`in v));m||(k=p,a()),o.emit(`update:${t}`,g),Y1(p,u)&&(Y1(p,g)&&!Y1(g,h)||m&&u!==g1&&!Y1(g,k))&&a(),u=p,h=g}}});return l[Symbol.iterator]=()=>{let d=0;return{next(){return d<2?{value:d++?s||g1:l,done:!1}:{done:!0}}}},l}const g5=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${n2(t)}Modifiers`]||e[`${ke(t)}Modifiers`];function ud(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||g1;let r=n;const i=t.startsWith("update:"),s=i&&g5(o,t.slice(7));s&&(s.trim&&(r=n.map(k=>y1(k)?k.trim():k)),s.number&&(r=r.map(wn)));let l,d=o[l=In(t)]||o[l=In(n2(t))];!d&&i&&(d=o[l=In(ke(t))]),d&&x2(d,e,6,r);const a=o[l+"Once"];if(a){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,x2(a,e,6,r)}}const hd=new WeakMap;function v5(e,t,n=!1){const o=n?hd:t.emitsCache,r=o.get(e);if(r!==void 0)return r;const i=e.emits;let s={},l=!1;if(!a1(e)){const d=a=>{const k=v5(a,t,!0);k&&(l=!0,T1(s,k))};!n&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}return!i&&!l?(m1(e)&&o.set(e,null),null):(J(i)?i.forEach(d=>s[d]=null):T1(s,i),m1(e)&&o.set(e,s),s)}function yn(e,t){return!e||!kn(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),x1(e,t[0].toLowerCase()+t.slice(1))||x1(e,ke(t))||x1(e,t))}function u0(e){const{type:t,vnode:n,proxy:o,withProxy:r,propsOptions:[i],slots:s,attrs:l,emit:d,render:a,renderCache:k,props:u,data:h,setupState:p,ctx:g,inheritAttrs:v}=e,m=U9(e);let H,w;try{if(n.shapeFlag&4){const f=r||o,x=f;H=H2(a.call(x,f,k,u,p,h,g)),w=l}else{const f=t;H=H2(f.length>1?f(u,{attrs:l,slots:s,emit:d}):f(u,null)),w=t.props?l:cd(l)}}catch(f){ne.length=0,a9(f,e,1),H=b($1)}let j=H;if(w&&v!==!1){const f=Object.keys(w),{shapeFlag:x}=j;f.length&&x&7&&(i&&f.some(un)&&(w=wd(w,i)),j=_2(j,w,!1,!0))}if(n.dirs&&(j=_2(j,null,!1,!0),j.dirs=j.dirs?j.dirs.concat(n.dirs):n.dirs),n.transition){const f=jn(j.type)&&z9(j)||j;De(f,n.transition)}return H=j,U9(m),H}function pd(e,t=!0){let n;for(let o=0;o{let t;for(const n in e)(n==="class"||n==="style"||kn(n))&&((t||(t={}))[n]=e[n]);return t},wd=(e,t)=>{const n={};for(const o in e)(!un(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function Cd(e,t,n){const{props:o,children:r,component:i}=e,{props:s,children:l,patchFlag:d}=t,a=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&d>=0){if(d&1024)return!0;if(d&16)return o?h0(o,s,a):!!s;if(d&8){const k=t.dynamicProps;for(let u=0;uObject.create(m5),j5=e=>Object.getPrototypeOf(e)===m5;function gd(e,t,n,o=!1){const r={},i=M5();e.propsDefaults=Object.create(null),x5(e,t,r,i);for(const s in e.propsOptions[0])s in r||(r[s]=void 0);n?e.props=o?r:Gs(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function vd(e,t,n,o){const{props:r,attrs:i,vnode:{patchFlag:s}}=e,l=w1(r),[d]=e.propsOptions;let a=!1;if((o||s>0)&&!(s&16)){if(s&8){const k=e.vnode.dynamicProps;for(let u=0;u{d=!0;const[h,p]=D5(u,t,!0);T1(s,h),p&&l.push(...p)};!n&&t.mixins.length&&t.mixins.forEach(k),e.extends&&k(e.extends),e.mixins&&e.mixins.forEach(k)}if(!i&&!d)return m1(e)&&o.set(e,et),et;if(J(i))for(let k=0;ke==="_"||e==="_ctx"||e==="$stable",Lr=e=>J(e)?e.map(H2):[H2(e)],md=(e,t,n)=>{if(t._n)return t;const o=e2((...r)=>Lr(t(...r)),n);return o._c=!1,o},L5=(e,t,n)=>{const o=e._ctx;for(const r in e){if(Dr(r))continue;const i=e[r];if(a1(i))t[r]=md(r,i,o);else if(i!=null){const s=Lr(i);t[r]=()=>s}}},H5=(e,t)=>{const n=Lr(t);e.slots.default=()=>n},V5=(e,t,n)=>{for(const o in t)(n||!Dr(o))&&(e[o]=t[o])},Md=(e,t,n)=>{const o=e.slots=M5();if(e.vnode.shapeFlag&32){const r=t._;r?(V5(o,t,n),n&&Hs(o,"_",r,!0)):L5(t,o)}else t&&H5(e,t)},jd=(e,t,n)=>{const{vnode:o,slots:r}=e;let i=!0,s=g1;if(o.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:V5(r,t,n):(i=!t.$stable,L5(t,r)),s=t}else t&&(H5(e,t),s={default:1});if(i)for(const l in r)!Dr(l)&&s[l]==null&&delete r[l]},R1=Ed;function xd(e){return Dd(e)}function Dd(e,t){const n=Cn();n.__VUE__=!0;const{insert:o,remove:r,patchProp:i,createElement:s,createText:l,createComment:d,setText:a,setElementText:k,parentNode:u,nextSibling:h,setScopeId:p=F2,insertStaticContent:g}=e,v=(c,C,M,_=null,S=null,B=null,q=void 0,E=null,Z=!!C.dynamicChildren)=>{if(c===C)return;c&&!V2(c,C)&&(_=V(c),Z1(c,S,B,!0),c=null),C.patchFlag===-2&&(Z=!1,C.dynamicChildren=null);const{type:T,ref:G,shapeFlag:z}=C;switch(T){case u9:m(c,C,M,_);break;case $1:H(c,C,M,_);break;case B9:c==null&&w(C,M,_,q);break;case f1:I(c,C,M,_,S,B,q,E,Z);break;default:z&1?x(c,C,M,_,S,B,q,E,Z):z&6?X(c,C,M,_,S,B,q,E,Z):(z&64||z&128)&&T.process(c,C,M,_,S,B,q,E,Z,K)}G!=null&&S?It(G,c&&c.ref,B,C||c,!C):G==null&&c&&c.ref!=null&&It(c.ref,null,B,c,!0)},m=(c,C,M,_)=>{if(c==null)o(C.el=l(C.children),M,_);else{const S=C.el=c.el;C.children!==c.children&&a(S,C.children)}},H=(c,C,M,_)=>{c==null?o(C.el=d(C.children||""),M,_):C.el=c.el},w=(c,C,M,_)=>{[c.el,c.anchor]=g(c.children,C,M,_,c.el,c.anchor)},j=({el:c,anchor:C},M,_)=>{let S;for(;c&&c!==C;)S=h(c),o(c,M,_),c=S;o(C,M,_)},f=({el:c,anchor:C})=>{let M;for(;c&&c!==C;)M=h(c),r(c),c=M;r(C)},x=(c,C,M,_,S,B,q,E,Z)=>{if(C.type==="svg"?q="svg":C.type==="math"&&(q="mathml"),c==null)D(C,M,_,S,B,q,E,Z);else{const T=c.el&&c.el._isVueCE?c.el:null;try{T&&T._beginPatch(),L(c,C,S,B,q,E,Z)}finally{T&&T._endPatch()}}},D=(c,C,M,_,S,B,q,E)=>{let Z,T;const{props:G,shapeFlag:z,transition:e1,dirs:s1}=c;if(Z=c.el=s(c.type,B,G&&G.is,G),z&8?k(Z,c.children):z&16&&A(c.children,Z,null,_,S,Wn(c,B),q,E),s1&&ye(c,null,_,"created"),y(Z,c,c.scopeId,q,_),G){for(const H1 in G)H1!=="value"&&!At(H1)&&i(Z,H1,null,G[H1],B,_);"value"in G&&i(Z,"value",null,G.value,B),(T=G.onVnodeBeforeMount)&&M2(T,_,c)}s1&&ye(c,null,_,"beforeMount");const c1=Ld(S,e1);c1&&e1.beforeEnter(Z),o(Z,C,M),((T=G&&G.onVnodeMounted)||c1||s1)&&R1(()=>{try{T&&M2(T,_,c),c1&&e1.enter(Z),s1&&ye(c,null,_,"mounted")}finally{}},S)},y=(c,C,M,_,S)=>{if(M&&p(c,M),_)for(let B=0;B<_.length;B++)p(c,_[B]);if(S){let B=S.subTree;if(C===B||Q9(B.type)&&(B.ssContent===C||B.ssFallback===C)){const q=S.vnode;y(c,q,q.scopeId,q.slotScopeIds,S.parent)}}},A=(c,C,M,_,S,B,q,E,Z=0)=>{for(let T=Z;T{const E=C.el=c.el;let{patchFlag:Z,dynamicChildren:T,dirs:G}=C;Z|=c.patchFlag&16;const z=c.props||g1,e1=C.props||g1;let s1;if(M&&be(M,!1),(s1=e1.onVnodeBeforeUpdate)&&M2(s1,M,C,c),G&&ye(C,c,M,"beforeUpdate"),M&&be(M,!0),T&&(!c.dynamicChildren||c.dynamicChildren.length!==T.length)&&(Z=0,q=!1,T=null),(z.innerHTML&&e1.innerHTML==null||z.textContent&&e1.textContent==null)&&k(E,""),T?P(c.dynamicChildren,T,E,M,_,Wn(C,S),B):q||n1(c,C,E,null,M,_,Wn(C,S),B,!1),Z>0){if(Z&16)U(E,z,e1,M,S);else if(Z&2&&z.class!==e1.class&&i(E,"class",null,e1.class,S),Z&4&&i(E,"style",z.style,e1.style,S),Z&8){const c1=C.dynamicProps;for(let H1=0;H1{s1&&M2(s1,M,C,c),G&&ye(C,c,M,"updated")},_)},P=(c,C,M,_,S,B,q)=>{for(let E=0;E{if(C!==M){if(C!==g1)for(const B in C)!At(B)&&!(B in M)&&i(c,B,C[B],null,S,_);for(const B in M){if(At(B))continue;const q=M[B],E=C[B];q!==E&&B!=="value"&&i(c,B,E,q,S,_)}"value"in M&&i(c,"value",C.value,M.value,S)}},I=(c,C,M,_,S,B,q,E,Z)=>{const T=C.el=c?c.el:l(""),G=C.anchor=c?c.anchor:l("");let{patchFlag:z,dynamicChildren:e1,slotScopeIds:s1}=C;s1&&(E=E?E.concat(s1):s1),c==null?(o(T,M,_),o(G,M,_),A(C.children||[],M,G,S,B,q,E,Z)):z>0&&z&64&&e1&&c.dynamicChildren&&c.dynamicChildren.length===e1.length?(P(c.dynamicChildren,e1,M,S,B,q,E),(C.key!=null||S&&C===S.subTree)&&Hr(c,C,!0)):n1(c,C,M,G,S,B,q,E,Z)},X=(c,C,M,_,S,B,q,E,Z)=>{C.slotScopeIds=E,c==null?C.shapeFlag&512?S.ctx.activate(C,M,_,q,Z):l1(C,M,_,S,B,q,Z):h1(c,C,Z)},l1=(c,C,M,_,S,B,q)=>{const E=c.component=Id(c,_,S);if(xn(c)&&(E.ctx.renderer=K),Rd(E,!1,q),E.asyncDep){if(S&&S.registerDep(E,k1,q),!c.el){const Z=E.subTree=b($1);H(null,Z,C,M),c.placeholder=Z.el}}else k1(E,c,C,M,S,B,q)},h1=(c,C,M)=>{const _=C.component=c.component;if(Cd(c,C,M))if(_.asyncDep&&!_.asyncResolved){Y(_,C,M);return}else _.next=C,_.update();else C.el=c.el,_.vnode=C},k1=(c,C,M,_,S,B,q)=>{const E=()=>{if(c.isMounted){let{next:z,bu:e1,u:s1,parent:c1,vnode:H1}=c;{const S2=y5(c);if(S2){z&&(z.el=H1.el,Y(c,z,q)),S2.asyncDep.then(()=>{R1(()=>{c.isUnmounted||T()},S)});return}}let D1=z,I1;be(c,!1),z?(z.el=H1.el,Y(c,z,q)):z=H1,e1&&tt(e1),(I1=z.props&&z.props.onVnodeBeforeUpdate)&&M2(I1,c1,z,H1),be(c,!0);const K1=u0(c),E2=c.subTree;c.subTree=K1,v(E2,K1,u(E2.el),V(E2),c,S,B),z.el=K1.el,D1===null&&xr(c,K1.el),s1&&R1(s1,S),(I1=z.props&&z.props.onVnodeUpdated)&&R1(()=>M2(I1,c1,z,H1),S)}else{let z;const{el:e1,props:s1}=C,{bm:c1,m:H1,parent:D1,root:I1,type:K1}=c,E2=xe(C);be(c,!1),c1&&tt(c1),!E2&&(z=s1&&s1.onVnodeBeforeMount)&&M2(z,D1,C),be(c,!0);{I1.ce&&I1.ce._hasShadowRoot()&&I1.ce._injectChildStyle(K1,c.parent?c.parent.type:void 0);const S2=c.subTree=u0(c);v(null,S2,M,_,c,S,B),C.el=S2.el}if(H1&&R1(H1,S),!E2&&(z=s1&&s1.onVnodeMounted)){const S2=C;R1(()=>M2(z,D1,S2),S)}(C.shapeFlag&256||D1&&xe(D1.vnode)&&D1.vnode.shapeFlag&256)&&c.a&&R1(c.a,S),c.isMounted=!0,C=M=_=null}};c.scope.on();const Z=c.effect=new Ss(E);c.scope.off();const T=c.update=Z.run.bind(Z),G=c.job=Z.runIfDirty.bind(Z);G.i=c,G.id=c.uid,Z.scheduler=()=>wr(G),be(c,!0),T()},Y=(c,C,M)=>{C.component=c;const _=c.vnode.props;c.vnode=C,c.next=null,vd(c,C.props,_,M),jd(c,C.children,M),ie(),t0(c),se()},n1=(c,C,M,_,S,B,q,E,Z=!1)=>{const T=c&&c.children,G=c?c.shapeFlag:0,z=C.children,{patchFlag:e1,shapeFlag:s1}=C;if(e1>0){if(e1&128){p1(T,z,M,_,S,B,q,E,Z);return}else if(e1&256){C1(T,z,M,_,S,B,q,E,Z);return}}s1&8?(G&16&&t1(T,S,B),z!==T&&k(M,z)):G&16?s1&16?p1(T,z,M,_,S,B,q,E,Z):t1(T,S,B,!0):(G&8&&k(M,""),s1&16&&A(z,M,_,S,B,q,E,Z))},C1=(c,C,M,_,S,B,q,E,Z)=>{c=c||et,C=C||et;const T=c.length,G=C.length,z=Math.min(T,G);let e1;for(e1=0;e1G?t1(c,S,B,!0,!1,z):A(C,M,_,S,B,q,E,Z,z)},p1=(c,C,M,_,S,B,q,E,Z)=>{let T=0;const G=C.length;let z=c.length-1,e1=G-1;for(;T<=z&&T<=e1;){const s1=c[T],c1=C[T]=Z?Q2(C[T]):H2(C[T]);if(V2(s1,c1))v(s1,c1,M,null,S,B,q,E,Z);else break;T++}for(;T<=z&&T<=e1;){const s1=c[z],c1=C[e1]=Z?Q2(C[e1]):H2(C[e1]);if(V2(s1,c1))v(s1,c1,M,null,S,B,q,E,Z);else break;z--,e1--}if(T>z){if(T<=e1){const s1=e1+1,c1=s1e1)for(;T<=z;)Z1(c[T],S,B,!0),T++;else{const s1=T,c1=T,H1=new Map;for(T=c1;T<=e1;T++){const k2=C[T]=Z?Q2(C[T]):H2(C[T]);k2.key!=null&&H1.set(k2.key,T)}let D1,I1=0;const K1=e1-c1+1;let E2=!1,S2=0;const vt=new Array(K1);for(T=0;T=K1){Z1(k2,S,B,!0);continue}let O2;if(k2.key!=null)O2=H1.get(k2.key);else for(D1=c1;D1<=e1;D1++)if(vt[D1-c1]===0&&V2(k2,C[D1])){O2=D1;break}O2===void 0?Z1(k2,S,B,!0):(vt[O2-c1]=T+1,O2>=S2?S2=O2:E2=!0,v(k2,C[O2],M,null,S,B,q,E,Z),I1++)}const Wr=E2?Hd(vt):et;for(D1=Wr.length-1,T=K1-1;T>=0;T--){const k2=c1+T,O2=C[k2],Gr=C[k2+1],Kr=k2+1{const{el:B,type:q,transition:E,children:Z,shapeFlag:T}=c;if(T&6){O1(c.component.subTree,C,M,_);return}if(T&128){c.suspense.move(C,M,_);return}if(T&64){q.move(c,C,M,K);return}if(q===f1){o(B,C,M);for(let z=0;zE.enter(B),S));else{const{leave:z,delayLeave:e1,afterLeave:s1}=E,c1=()=>{c.ctx.isUnmounted?r(B):o(B,C,M)},H1=()=>{const D1=B._isLeaving||!!B[j2];B._isLeaving&&B[j2](!0),E.persisted&&!D1?c1():z(B,()=>{c1(),s1&&s1()})};e1?e1(B,c1,H1):H1()}else o(B,C,M)},Z1=(c,C,M,_=!1,S=!1)=>{const{type:B,props:q,ref:E,children:Z,dynamicChildren:T,shapeFlag:G,patchFlag:z,dirs:e1,cacheIndex:s1,memo:c1}=c;if(z===-2&&(S=!1),E!=null&&(ie(),It(E,null,M,c,!0),se()),s1!=null&&(C.renderCache[s1]=void 0),G&256){C.ctx.deactivate(c);return}const H1=G&1&&e1,D1=!xe(c);let I1;if(D1&&(I1=q&&q.onVnodeBeforeUnmount)&&M2(I1,C,c),G&6)d1(c.component,M,_);else{if(G&128){c.suspense.unmount(M,_);return}H1&&ye(c,null,C,"beforeUnmount"),G&64?c.type.remove(c,C,M,K,_):T&&!T.hasOnce&&(B!==f1||z>0&&z&64)?t1(T,C,M,!1,!0):(B===f1&&z&384||!S&&G&16)&&t1(Z,C,M),_&&$(c)}const K1=c1!=null&&s1==null;(D1&&(I1=q&&q.onVnodeUnmounted)||H1||K1)&&R1(()=>{I1&&M2(I1,C,c),H1&&ye(c,null,C,"unmounted"),K1&&(c.el=null)},M)},$=c=>{const{type:C,el:M,anchor:_,transition:S}=c;if(C===f1){r1(M,_);return}if(C===B9){f(c);return}const B=()=>{r(M),S&&!S.persisted&&S.afterLeave&&S.afterLeave()};if(c.shapeFlag&1&&S&&!S.persisted){const{leave:q,delayLeave:E}=S,Z=()=>q(M,B);E?E(c.el,B,Z):Z()}else B()},r1=(c,C)=>{let M;for(;c!==C;)M=h(c),r(c),c=M;r(C)},d1=(c,C,M)=>{const{bum:_,scope:S,job:B,subTree:q,um:E,m:Z,a:T}=c;Y9(Z),Y9(T),_&&tt(_),S.stop(),B&&(B.flags|=8,Z1(q,c,C,M)),E&&R1(E,C),R1(()=>{c.isUnmounted=!0},C)},t1=(c,C,M,_=!1,S=!1,B=0)=>{for(let q=B;q{if(c.shapeFlag&6)return V(c.component.subTree);if(c.shapeFlag&128)return c.suspense.next();const C=h(c.anchor||c.el),M=C&&C[r5];return M?h(M):C};let F=!1;const R=(c,C,M)=>{let _;c==null?C._vnode&&(Z1(C._vnode,null,null,!0),_=C._vnode.component):v(C._vnode||null,c,C,null,null,null,M),C._vnode=c,F||(F=!0,t0(_),e5(),F=!1)},K={p:v,um:Z1,m:O1,r:$,mt:l1,mc:A,pc:n1,pbc:P,n:V,o:e};return{render:R,hydrate:void 0,createApp:ad(R)}}function Wn({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function be({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Ld(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Hr(e,t,n=!1){const o=e.children,r=t.children;if(J(o)&&J(r))for(let i=0;i>1,e[n[l]]0&&(t[o]=n[i-1]),n[i]=o)}}for(i=n.length,s=n[i-1];i-- >0;)n[i]=s,s=t[s];return n}function y5(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:y5(t)}function Y9(e){if(e)for(let t=0;te.__isSuspense;let _o=0;const Vd={name:"Suspense",__isSuspense:!0,process(e,t,n,o,r,i,s,l,d,a){if(e==null)bd(t,n,o,r,i,s,l,d,a);else{if(i&&i.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}Zd(e,t,n,o,r,s,l,d,a)}},hydrate:_d,normalize:Bd},yd=Vd;function Qt(e,t){const n=e.props&&e.props[t];a1(n)&&n()}function bd(e,t,n,o,r,i,s,l,d){const{p:a,o:{createElement:k}}=d,u=k("div"),h=e.suspense=Z5(e,r,o,t,u,n,i,s,l,d);a(null,h.pendingBranch=e.ssContent,u,null,o,h,i,s),h.deps>0?(Qt(e,"onPending"),Qt(e,"onFallback"),a(null,e.ssFallback,t,n,o,null,i,s),rt(h,e.ssFallback)):h.resolve(!1,!0)}function Zd(e,t,n,o,r,i,s,l,{p:d,um:a,o:{createElement:k}}){const u=t.suspense=e.suspense;u.vnode=t,t.el=e.el;const h=t.ssContent,p=t.ssFallback,{activeBranch:g,pendingBranch:v,isInFallback:m,isHydrating:H}=u;if(v)u.pendingBranch=h,V2(v,h)?(d(v,h,u.hiddenContainer,null,r,u,i,s,l),u.deps<=0?u.resolve():m&&!H&&!u.isFallbackMountPending&&(d(g,p,n,o,r,null,i,s,l),rt(u,p))):(u.pendingId=_o++,H?(u.isHydrating=!1,u.activeBranch=v):a(v,r,u),u.deps=0,u.effects.length=0,u.hiddenContainer=k("div"),m?(d(null,h,u.hiddenContainer,null,r,u,i,s,l),u.deps<=0?u.resolve():u.isFallbackMountPending||(d(g,p,n,o,r,null,i,s,l),rt(u,p))):g&&V2(g,h)?(d(g,h,n,o,r,u,i,s,l),u.resolve(!0)):(d(null,h,u.hiddenContainer,null,r,u,i,s,l),u.deps<=0&&u.resolve()));else if(g&&V2(g,h))d(g,h,n,o,r,u,i,s,l),rt(u,h);else if(Qt(t,"onPending"),u.pendingBranch=h,h.shapeFlag&512?u.pendingId=h.component.suspenseId:u.pendingId=_o++,d(null,h,u.hiddenContainer,null,r,u,i,s,l),u.deps<=0)u.resolve();else{const{timeout:w,pendingId:j}=u;w>0?setTimeout(()=>{u.pendingId===j&&u.fallback(p)},w):w===0&&u.fallback(p)}}function Z5(e,t,n,o,r,i,s,l,d,a,k=!1){const{p:u,m:h,um:p,n:g,o:{parentNode:v,remove:m}}=a;let H;const w=Sd(e);w&&t&&t.pendingBranch&&(H=t.pendingId,t.deps++);const j=e.props?Vs(e.props.timeout):void 0,f=i,x={vnode:e,parent:t,parentComponent:n,namespace:s,container:o,hiddenContainer:r,deps:0,pendingId:_o++,timeout:typeof j=="number"?j:-1,activeBranch:null,isFallbackMountPending:!1,pendingBranch:null,isInFallback:!k,isHydrating:k,isUnmounted:!1,effects:[],resolve(D=!1,y=!1){const{vnode:A,activeBranch:L,pendingBranch:P,pendingId:U,effects:I,parentComponent:X,container:l1,isInFallback:h1}=x;let k1=!1;if(x.isHydrating)x.isHydrating=!1;else if(!D){k1=L&&P.transition&&P.transition.mode==="out-in";let C1=!1;k1&&(L.transition.afterLeave=()=>{U===x.pendingId&&(h(P,l1,i===f&&!C1?g(L):i,0),xo(I),h1&&A.ssFallback&&(A.ssFallback.el=null))}),L&&!x.isFallbackMountPending&&(v(L.el)===l1&&(i=g(L),C1=!0),p(L,X,x,!0),!k1&&h1&&A.ssFallback&&R1(()=>A.ssFallback.el=null,x)),k1||h(P,l1,i,0)}x.isFallbackMountPending=!1,rt(x,P),x.pendingBranch=null,x.isInFallback=!1;let Y=x.parent,n1=!1;for(;Y;){if(Y.pendingBranch){for(let C1=0;C1{if(x.isFallbackMountPending=!1,!x.isInFallback)return;const h1=x.vnode.ssFallback;u(null,h1,P,I,L,null,U,l,d),rt(x,h1)},l1=D.transition&&D.transition.mode==="out-in";l1&&(x.isFallbackMountPending=!0,A.transition.afterLeave=X),x.isInFallback=!0,p(A,L,null,!0),l1||X()},move(D,y,A){x.activeBranch&&h(x.activeBranch,D,y,A),x.container=D},next(){return x.activeBranch&&g(x.activeBranch)},registerDep(D,y,A){const L=!!x.pendingBranch;L&&x.deps++;const P=D.vnode.el;D.asyncDep.catch(U=>{a9(U,D,0)}).then(U=>{if(D.isUnmounted||x.isUnmounted||x.pendingId!==D.suspenseId)return;Bo(),D.asyncResolved=!0;const{vnode:I}=D;Eo(D,U),P&&(I.el=P);const X=!P&&D.subTree.el;y(D,I,v(P||D.subTree.el),P?null:g(D.subTree),x,s,A),X&&(I.placeholder=null,m(X)),xr(D,I.el),L&&--x.deps===0&&x.resolve()})},unmount(D,y){x.isUnmounted=!0,x.activeBranch&&p(x.activeBranch,n,D,y),x.pendingBranch&&p(x.pendingBranch,n,D,y)}};return x}function _d(e,t,n,o,r,i,s,l,d){const a=t.suspense=Z5(t,o,n,e.parentNode,document.createElement("div"),null,r,i,s,l,!0),k=d(e,a.pendingBranch=t.ssContent,n,a,i,s);return a.deps===0&&a.resolve(!1,!0),k}function Bd(e){const{shapeFlag:t,children:n}=e,o=t&32;e.ssContent=c0(o?n.default:n),e.ssFallback=o?c0(n.fallback):b($1)}function c0(e){let t;if(a1(e)){const n=dt&&e._c;n&&(e._d=!1,W()),e=e(),n&&(e._d=!0,t=d2,bn())}return J(e)&&(e=pd(e)),e=H2(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function Ed(e,t){t&&t.pendingBranch?J(e)?t.effects.push(...e):t.effects.push(e):xo(e)}function rt(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e;let r=t.el;for(;!r&&t.component;)t=t.component.subTree,r=t.el;n.el=r,o&&o.subTree===n&&(o.vnode.el=r,xr(o,r))}function Sd(e){const t=e.props&&e.props.suspensible;return t!=null&&t!==!1}const f1=Symbol.for("v-fgt"),u9=Symbol.for("v-txt"),$1=Symbol.for("v-cmt"),B9=Symbol.for("v-stc"),ne=[];let d2=null;function W(e=!1){ne.push(d2=e?null:[])}function bn(){ne.pop(),d2=ne[ne.length-1]||null}let dt=1;function J9(e,t=!1){dt+=e,e<0&&d2&&t&&(d2.hasOnce=!0)}function _5(e){return e.dynamicChildren=dt>0?d2||et:null,bn(),dt>0&&d2&&d2.push(e),e}function o1(e,t,n,o,r,i){return _5(O(e,t,n,o,r,i,!0))}function P1(e,t,n,o,r){return _5(b(e,t,n,o,r,!0))}function a2(e){return e?e.__v_isVNode===!0:!1}function V2(e,t){return e.type===t.type&&e.key===t.key}const B5=({key:e})=>e??null,E9=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?y1(e)||B1(e)||a1(e)?{i:Q1,r:e,k:t,f:!!n}:e:null);function O(e,t=null,n=null,o=0,r=null,i=e===f1?0:1,s=!1,l=!1){const d={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&B5(t),ref:t&&E9(t),scopeId:n5,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Q1};return l?(X9(d,n),i&128&&e.normalize(d)):n&&(d.shapeFlag|=y1(n)?8:16),dt>0&&!s&&d2&&(d.patchFlag>0||i&6)&&d.patchFlag!==32&&d2.push(d),d}const b=Od;function Od(e,t=null,n=null,o=0,r=null,i=!1){if((!e||e===h5)&&(e=$1),a2(e)){const l=_2(e,t,!0);return n&&X9(l,n),dt>0&&!i&&d2&&(l.shapeFlag&6?d2[d2.indexOf(e)]=l:d2.push(l)),l.patchFlag=-2,l}if(qd(e)&&(e=e.__vccOpts),t){t=Ad(t);let{class:l,style:d}=t;l&&!y1(l)&&(t.class=q1(l)),m1(d)&&(fn(d)&&!J(d)&&(d=T1({},d)),t.style=re(d))}const s=y1(e)?1:Q9(e)?128:jn(e)?64:m1(e)?4:a1(e)?2:0;return O(e,t,n,o,r,s,i,!0)}function Ad(e){return e?fn(e)||j5(e)?T1({},e):e:null}function _2(e,t,n=!1,o=!1){const{props:r,ref:i,patchFlag:s,children:l,transition:d}=e,a=t?Jt(r||{},t):r,k={__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&B5(a),ref:t&&t.ref?n&&i?J(i)?i.concat(E9(t)):[i,E9(t)]:E9(t):i,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==f1?s===-1?16:s|16:s,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:d,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&_2(e.ssContent),ssFallback:e.ssFallback&&_2(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return d&&o&&De(k,d.clone(k)),k}function K2(e=" ",t=0){return b(u9,null,e,t)}function j9(e,t){const n=b(B9,null,e);return n.staticCount=t,n}function L1(e="",t=!1){return t?(W(),P1($1,null,e)):b($1,null,e)}function H2(e){return e==null||typeof e=="boolean"?b($1):J(e)?b(f1,null,e.slice()):a2(e)?Q2(e):b(u9,null,String(e))}function Q2(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:_2(e)}function X9(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(J(t))n=16;else if(typeof t=="object")if(o&65){const r=t.default;r&&(r._c&&(r._d=!1),X9(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!j5(t)?t._ctx=Q1:r===3&&Q1&&(Q1.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(a1(t)){if(o&65){X9(e,{default:t});return}t={default:t,_ctx:Q1},n=32}else t=String(t),o&64?(n=16,t=[K2(t)]):n=8;e.children=t,e.shapeFlag|=n}function Jt(...e){const t={};for(let n=0;nt2||Q1;let en,Xt;{const e=Cn(),t=(n,o)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(o),i=>{r.length>1?r.forEach(s=>s(i)):r[0](i)}};en=t("__VUE_INSTANCE_SETTERS__",n=>t2=n),Xt=t("__VUE_SSR_SETTERS__",n=>e9=n)}const h9=e=>{const t=t2;return en(e),e.scope.on(),()=>{e.scope.off(),en(t)}},Bo=()=>{t2&&t2.scope.off(),en(null)};function E5(e){return e.vnode.shapeFlag&4}let e9=!1;function Rd(e,t=!1,n=!1){t&&Xt(t);const{props:o,children:r}=e.vnode,i=E5(e);gd(e,o,i,t),Md(e,r,n||t);const s=i?$d(e,t):void 0;return t&&Xt(!1),s}function $d(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,nd);const{setup:o}=n;if(o){ie();const r=e.setupContext=o.length>1?Nd(e):null,i=h9(e),s=d9(o,e,0,[e.props,r]),l=xs(s);if(se(),i(),(l||e.sp)&&!xe(e)&&k5(e),l){if(s.then(Bo,Bo),t)return s.then(d=>{Xt(!0);try{Eo(e,d,t)}finally{Xt(!1)}}).catch(d=>{a9(d,e,0)});e.asyncDep=s}else Eo(e,s)}else S5(e)}function Eo(e,t,n){a1(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:m1(t)&&(e.setupState=Ys(t)),S5(e)}function S5(e,t,n){const o=e.type;e.render||(e.render=o.render||F2);{const r=h9(e);ie();try{od(e)}finally{se(),r()}}}const Fd={get(e,t){return X1(e,"get",""),e[t]}};function Nd(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Fd),slots:e.slots,emit:e.emit,expose:t}}function Zn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Ys(pr(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Rt)return Rt[n](e)},has(t,n){return n in t||n in Rt}})):e.proxy}function So(e,t=!0){return a1(e)?e.displayName||e.name:e.name||t&&e.__name}function qd(e){return a1(e)&&"__vccOpts"in e}const N=(e,t)=>_3(e,t,e9);function t9(e,t,n){try{J9(-1);const o=arguments.length;return o===2?m1(t)&&!J(t)?a2(t)?b(e,null,[t]):b(e,t):b(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&a2(n)&&(n=[n]),b(e,t,n))}finally{J9(1)}}const Ud="3.5.42";/** * @vue/runtime-dom v3.5.42 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT -**/let ct;const Wo=typeof window<"u"&&window.trustedTypes;if(Wo)try{ct=Wo.createPolicy("vue",{createHTML:e=>e})}catch{}const H4=ct?e=>ct.createHTML(e):e=>e,u6="http://www.w3.org/2000/svg",p6="http://www.w3.org/1998/Math/MathML",k0=typeof document<"u"?document:null,zo=k0&&k0.createElement("template"),w6={insert:(e,t,o)=>{t.insertBefore(e,o||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,o,n)=>{const r=t==="svg"?k0.createElementNS(u6,e):t==="mathml"?k0.createElementNS(p6,e):o?k0.createElement(e,{is:o}):k0.createElement(e);return e==="select"&&n&&n.multiple!=null&&r.setAttribute("multiple",n.multiple),r},createText:e=>k0.createTextNode(e),createComment:e=>k0.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>k0.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,o,n,r,i){const s=o?o.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),o),!(r===i||!(r=r.nextSibling)););else{zo.innerHTML=H4(n==="svg"?`${e}`:n==="mathml"?`${e}`:e);const d=zo.content;if(n==="svg"||n==="mathml"){const l=d.firstChild;for(;l.firstChild;)d.appendChild(l.firstChild);d.removeChild(l)}t.insertBefore(d,o)}return[s?s.nextSibling:t.firstChild,o?o.previousSibling:t.lastChild]}},_0="transition",H3="animation",C3=Symbol("_vtc"),V4={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},Z4=T1({},J5,V4),C6=e=>(e.displayName="Transition",e.props=Z4,e),_4=C6((e,{slots:t})=>Q3(hs,y4(e),t)),W0=(e,t=[])=>{t1(e)?e.forEach(o=>o(...t)):e&&e(...t)},qo=e=>e?t1(e)?e.some(t=>t.length>1):e.length>1:!1;function y4(e){const t={};for(const F in e)F in V4||(t[F]=e[F]);if(e.css===!1)return t;const{name:o="v",type:n,duration:r,enterFromClass:i=`${o}-enter-from`,enterActiveClass:s=`${o}-enter-active`,enterToClass:d=`${o}-enter-to`,appearFromClass:l=i,appearActiveClass:h=s,appearToClass:u=d,leaveFromClass:p=`${o}-leave-from`,leaveActiveClass:w=`${o}-leave-active`,leaveToClass:v=`${o}-leave-to`}=e,f=c6(r),x=f&&f[0],S=f&&f[1],{onBeforeEnter:O,onEnter:D,onEnterCancelled:H,onLeave:L,onLeaveCancelled:Z,onBeforeAppear:T=O,onAppear:_=D,onAppearCancelled:U=H}=t,A=(F,d1,v1,L1)=>{F._enterCancelled=L1,b0(F,d1?u:d),b0(F,d1?h:s),v1&&v1()},q=(F,d1)=>{F._isLeaving=!1,b0(F,p),b0(F,v),b0(F,w),d1&&d1()},r1=F=>(d1,v1)=>{const L1=F?_:D,h1=()=>A(d1,F,v1);W0(L1,[d1,h1]),Ko(()=>{b0(d1,F?l:i),J2(d1,F?u:d),qo(L1)||Go(d1,n,x,h1)})};return T1(t,{onBeforeEnter(F){W0(O,[F]),J2(F,i),J2(F,s)},onBeforeAppear(F){W0(T,[F]),J2(F,l),J2(F,h)},onEnter:r1(!1),onAppear:r1(!0),onLeave(F,d1){F._isLeaving=!0;const v1=()=>q(F,d1);J2(F,p),F._enterCancelled?(J2(F,w),gt(F)):(gt(F),J2(F,w)),Ko(()=>{F._isLeaving&&(b0(F,p),J2(F,v),qo(L)||Go(F,n,S,v1))}),W0(L,[F,v1])},onEnterCancelled(F){A(F,!1,void 0,!0),W0(H,[F])},onAppearCancelled(F){A(F,!0,void 0,!0),W0(U,[F])},onLeaveCancelled(F){q(F),W0(Z,[F])}})}function c6(e){if(e==null)return null;if(M1(e))return[Te(e.enter),Te(e.leave)];{const t=Te(e);return[t,t]}}function Te(e){return C5(e)}function J2(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.add(o)),(e[C3]||(e[C3]=new Set)).add(t)}function b0(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.remove(n));const o=e[C3];o&&(o.delete(t),o.size||(e[C3]=void 0))}function Ko(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let g6=0;function Go(e,t,o,n){const r=e._endId=++g6,i=()=>{r===e._endId&&n()};if(o!=null)return setTimeout(i,o);const{type:s,timeout:d,propCount:l}=B4(e,t);if(!s)return n();const h=s+"end";let u=0;const p=()=>{e.removeEventListener(h,w),i()},w=v=>{v.target===e&&++u>=l&&p()};setTimeout(()=>{u(o[f]||"").split(", "),r=n(`${_0}Delay`),i=n(`${_0}Duration`),s=Jo(r,i),d=n(`${H3}Delay`),l=n(`${H3}Duration`),h=Jo(d,l);let u=null,p=0,w=0;t===_0?s>0&&(u=_0,p=s,w=i.length):t===H3?h>0&&(u=H3,p=h,w=l.length):(p=Math.max(s,h),u=p>0?s>h?_0:H3:null,w=u?u===_0?i.length:l.length:0);const v=u===_0&&/\b(?:transform|all)(?:,|$)/.test(n(`${_0}Property`).toString());return{type:u,timeout:p,propCount:w,hasTransform:v}}function Jo(e,t){for(;e.lengthYo(o)+Yo(e[n])))}function Yo(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function gt(e){return(e?e.ownerDocument:document).body.offsetHeight}function v6(e,t,o){const n=e[C3];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):o?e.setAttribute("class",t):e.className=t}const O9=Symbol("_vod"),Gt=Symbol("_vsh"),Jt={name:"show",beforeMount(e,{value:t},{transition:o}){e[O9]=e.style.display==="none"?"":e.style.display,o&&t?o.beforeEnter(e):V3(e,t)},mounted(e,{value:t},{transition:o}){o&&t&&o.enter(e)},updated(e,{value:t,oldValue:o},{transition:n}){!t!=!o&&(n?t?(n.beforeEnter(e),V3(e,!0),n.enter(e)):n.leave(e,()=>{V3(e,!1)}):V3(e,t))},beforeUnmount(e,{value:t}){V3(e,t)}};function V3(e,t){e.style.display=t?e[O9]:"none",e[Gt]=!t}const m6=Symbol(""),f6=/(?:^|;)\s*display\s*:/;function M6(e,t,o){const n=e.style,r=_1(o);let i=!1;if(o&&!r){if(t)if(_1(t))for(const s of t.split(";")){const d=s.slice(0,s.indexOf(":")).trim();o[d]==null&&E3(n,d,"")}else for(const s in t)o[s]==null&&E3(n,s,"");for(const s in o){s==="display"&&(i=!0);const d=o[s];d!=null?D6(e,s,!_1(t)&&t?t[s]:void 0,d)||E3(n,s,d):E3(n,s,"")}}else if(r){if(t!==o){const s=n[m6];s&&(o+=";"+s),n.cssText=o,i=f6.test(o)}}else t&&e.removeAttribute("style");O9 in e&&(e[O9]=i?n.display:"",e[Gt]&&(n.display="none"))}const g9=/\s*!important$/;function E3(e,t,o){if(t1(o))o.forEach(n=>E3(e,t,n));else if(o==null&&(o=""),t.startsWith("--"))g9.test(o)?e.setProperty(t,o.replace(g9,""),"important"):e.setProperty(t,o);else{const n=j6(e,t);g9.test(o)?e.setProperty(x0(n),o.replace(g9,""),"important"):e[n]=o}}const Qo=["Webkit","Moz","ms"],Re={};function j6(e,t){const o=Re[t];if(o)return o;let n=s2(t);if(n!=="filter"&&n in e)return Re[t]=n;n=q9(n);for(let r=0;rFe||(_6.then(()=>Fe=0),Fe=Date.now());function B6(e,t){const o=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=o.attached)return;const r=o.value;if(t1(r)){const i=n.stopImmediatePropagation;n.stopImmediatePropagation=()=>{i.call(n),n._stopped=!0};const s=r.slice(),d=[n];for(let l=0;le.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,b6=(e,t,o,n,r,i)=>{const s=r==="svg";t==="class"?v6(e,n,s):t==="style"?M6(e,o,n):$9(t)?U9(t)||L6(e,t,o,n,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):E6(e,t,n,s))?(tn(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&en(e,t,n,s,i,t!=="value")):e._isVueCE&&(S6(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!_1(n)))?tn(e,s2(t),n,i,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),en(e,t,n,s))};function E6(e,t,o,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&nn(t)&&l1(o));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return nn(t)&&_1(o)?!1:t in e}function S6(e,t){const o=e._def.props;if(!o)return!1;const n=s2(t);return Array.isArray(o)?o.some(r=>s2(r)===n):Object.keys(o).some(r=>s2(r)===n)}const b4=new WeakMap,E4=new WeakMap,T9=Symbol("_moveCb"),rn=Symbol("_enterCb"),A6=e=>(delete e.props.mode,e),I6=A6({name:"TransitionGroup",props:T1({},Z4,{tag:String,moveClass:String}),setup(e,{slots:t}){const o=b2(),n=G5();let r,i;return Nt(()=>{if(!r.length)return;const s=e.moveClass||`${e.name||"v"}-move`;if(!R6(r[0].el,o.vnode.el,s)){r=[];return}r.forEach(P6),r.forEach(O6);const d=r.filter(T6);gt(o.vnode.el),d.forEach(l=>{const h=l.el,u=h.style;J2(h,s),u.transform=u.webkitTransform=u.transitionDuration="";const p=h[T9]=w=>{w&&w.target!==h||(!w||w.propertyName.endsWith("transform"))&&(h.removeEventListener("transitionend",p),h[T9]=null,b0(h,s))};h.addEventListener("transitionend",p)}),r=[]}),()=>{const s=c1(e),d=y4(s);let l=s.tag||r2;if(r=[],i)for(let h=0;h{d.split(/\s+/).forEach(l=>l&&n.classList.remove(l))}),o.split(/\s+/).forEach(d=>d&&n.classList.add(d)),n.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(n);const{hasTransform:s}=B4(n);return i.removeChild(n),s}const R0=e=>{const t=e.props["onUpdate:modelValue"]||!1;return t1(t)?o=>d3(t,o):t};function F6(e){e.target.composing=!0}function sn(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const m2=Symbol("_assign"),v9=Symbol("_initialValue");function Ne(e,t,o){return t&&(e=e.trim()),o&&(e=K9(e)),e}const dn={created(e,{modifiers:{lazy:t,trim:o,number:n}},r){e.parentNode&&(e.type==="text"?e[v9]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[v9]=e.defaultValue.replace(/\r\n?/g,` -`))),e[m2]=R0(r);const i=n||r.props&&r.props.type==="number";C0(e,t?"change":"input",s=>{s.target.composing||e[m2](Ne(e.value,o,i))}),(o||i)&&C0(e,"change",()=>{e.value=Ne(e.value,o,i)}),t||(C0(e,"compositionstart",F6),C0(e,"compositionend",sn),C0(e,"change",sn))},mounted(e,{value:t,modifiers:{trim:o,number:n}}){const r=t??"",i=e[v9];delete e[v9],i!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==i?e[m2](Ne(e.value,o,n)):e.value=r},beforeUpdate(e,{value:t,oldValue:o,modifiers:{lazy:n,trim:r,number:i}},s){if(e[m2]=R0(s),e.composing)return;const d=(i||e.type==="number")&&!/^0\d/.test(e.value)?K9(e.value):e.value,l=t??"";if(d===l)return;const h=e.getRootNode();(h instanceof Document||h instanceof ShadowRoot)&&h.activeElement===e&&e.type!=="range"&&(n&&t===o||r&&e.value.trim()===l)||(e.value=l)}},N6={deep:!0,created(e,t,o){e[m2]=R0(o),C0(e,"change",()=>{const n=e._modelValue,r=c3(e),i=e.checked,s=e[m2];if(t1(n)){const d=Bt(n,r),l=d!==-1;if(i&&!l)s(n.concat(r));else if(!i&&l){const h=[...n];h.splice(d,1),s(h)}}else if(m0(n)){const d=new Set(n);i?d.add(r):d.delete(r),s(d)}else s(A4(e,i))})},mounted:ln,beforeUpdate(e,t,o){e[m2]=R0(o),ln(e,t,o)}};function ln(e,{value:t,oldValue:o},n){e._modelValue=t;let r;if(t1(t))r=Bt(t,n.props.value)>-1;else if(m0(t))r=t.has(n.props.value);else{if(t===o)return;r=z2(t,A4(e,!0))}e.checked!==r&&(e.checked=r)}const $6={created(e,{value:t},o){e.checked=z2(t,o.props.value),e[m2]=R0(o),C0(e,"change",()=>{e[m2](c3(e))})},beforeUpdate(e,{value:t,oldValue:o},n){e[m2]=R0(n),t!==o&&(e.checked=z2(t,n.props.value))}},U6={deep:!0,created(e,{value:t,modifiers:{number:o}},n){e._modelValue=t,C0(e,"change",()=>{const r=Array.prototype.filter.call(e.options,l=>l.selected).map(l=>o?K9(c3(l)):c3(l)),i=e.multiple,s=i?m0(e._modelValue)?new Set(r):r:r[0],d=e._pendingValue=[i,i?t1(s)?r.slice():r:s];try{e[m2](s)}finally{K2(()=>{e._pendingValue===d&&(e._pendingValue=void 0)})}}),e[m2]=R0(n)},mounted(e,{value:t}){an(e,t)},beforeUpdate(e,{value:t},o){e._modelValue=t,e[m2]=R0(o)},updated(e,{value:t}){const o=e._pendingValue;e._pendingValue=void 0,(!o||o[0]!==e.multiple||!W6(t,o[1],o[0]))&&an(e,t)}};function W6(e,t,o){if(!o||t1(e))return z2(e,t);if(m0(e)){if(e.size!==t.length)return!1;for(const n of t)if(!e.has(n))return!1;return!0}return!1}function an(e,t){const o=e.multiple,n=t1(t);if(!(o&&!n&&!m0(t))){for(let r=0,i=e.options.length;rString(h)===String(d)):s.selected=Bt(t,d)>-1}else s.selected=t.has(d);else if(z2(c3(s),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!o&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function c3(e){return"_value"in e?e._value:e.value}function A4(e,t){const o=t?"_trueValue":"_falseValue";return o in e?e[o]:t}const ca={created(e,t,o){m9(e,t,o,null,"created")},mounted(e,t,o){m9(e,t,o,null,"mounted")},beforeUpdate(e,t,o,n){m9(e,t,o,n,"beforeUpdate")},updated(e,t,o,n){m9(e,t,o,n,"updated")}};function z6(e,t){switch(e){case"SELECT":return U6;case"TEXTAREA":return dn;default:switch(t){case"checkbox":return N6;case"radio":return $6;default:return dn}}}function m9(e,t,o,n,r){const s=z6(e.tagName,o.props&&o.props.type)[r];s&&s(e,t,o,n)}const q6=["ctrl","shift","alt","meta"],K6={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>q6.some(o=>e[`${o}Key`]&&!t.includes(o))},ga=(e,t)=>{if(!e)return e;const o=e._withMods||(e._withMods={}),n=t.join(".");return o[n]||(o[n]=(r,...i)=>{for(let s=0;s{const o=e._withKeys||(e._withKeys={}),n=t.join(".");return o[n]||(o[n]=r=>{if(!("key"in r))return;const i=x0(r.key);if(t.some(s=>s===i||G6[s]===i))return e(r)})},Y6=T1({patchProp:b6},w6);let kn;function I4(){return kn||(kn=Ns(Y6))}const va=(...e)=>{I4().render(...e)},Q6=(...e)=>{const t=I4().createApp(...e),{mount:o}=t;return t.mount=n=>{const r=e7(n);if(!r)return;const i=t._component;!l1(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const s=o(r,!1,X6(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),s},t};function X6(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function e7(e){return _1(e)?document.querySelector(e):e}/*! +**/let Oo;const w0=typeof window<"u"&&window.trustedTypes;if(w0)try{Oo=w0.createPolicy("vue",{createHTML:e=>e})}catch{}const O5=Oo?e=>Oo.createHTML(e):e=>e,zd="http://www.w3.org/2000/svg",Wd="http://www.w3.org/1998/Math/MathML",Y2=typeof document<"u"?document:null,C0=Y2&&Y2.createElement("template"),Gd={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r=t==="svg"?Y2.createElementNS(zd,e):t==="mathml"?Y2.createElementNS(Wd,e):n?Y2.createElement(e,{is:n}):Y2.createElement(e);return e==="select"&&o&&o.multiple!=null&&r.setAttribute("multiple",o.multiple),r},createText:e=>Y2.createTextNode(e),createComment:e=>Y2.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Y2.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,r,i){const s=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{C0.innerHTML=O5(o==="svg"?`${e}`:o==="mathml"?`${e}`:e);const l=C0.content;if(o==="svg"||o==="mathml"){const d=l.firstChild;for(;d.firstChild;)l.appendChild(d.firstChild);l.removeChild(d)}t.insertBefore(l,n)}return[s?s.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},pe="transition",Mt="animation",at=Symbol("_vtc"),A5={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},P5=T1({},s5,A5),Kd=e=>(e.displayName="Transition",e.props=P5,e),_n=Kd((e,{slots:t})=>t9(U3,T5(e),t)),Ze=(e,t=[])=>{J(e)?e.forEach(n=>n(...t)):e&&e(...t)},g0=e=>e?J(e)?e.some(t=>t.length>1):e.length>1:!1;function T5(e){const t={};for(const I in e)I in A5||(t[I]=e[I]);if(e.css===!1)return t;const{name:n="v",type:o,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:s=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:d=i,appearActiveClass:a=s,appearToClass:k=l,leaveFromClass:u=`${n}-leave-from`,leaveActiveClass:h=`${n}-leave-active`,leaveToClass:p=`${n}-leave-to`}=e,g=Yd(r),v=g&&g[0],m=g&&g[1],{onBeforeEnter:H,onEnter:w,onEnterCancelled:j,onLeave:f,onLeaveCancelled:x,onBeforeAppear:D=H,onAppear:y=w,onAppearCancelled:A=j}=t,L=(I,X,l1,h1)=>{I._enterCancelled=h1,Ce(I,X?k:l),Ce(I,X?a:s),l1&&l1()},P=(I,X)=>{I._isLeaving=!1,Ce(I,u),Ce(I,p),Ce(I,h),X&&X()},U=I=>(X,l1)=>{const h1=I?y:w,k1=()=>L(X,I,l1);Ze(h1,[X,k1]),v0(()=>{Ce(X,I?d:i),A2(X,I?k:l),g0(h1)||f0(X,o,v,k1)})};return T1(t,{onBeforeEnter(I){Ze(H,[I]),A2(I,i),A2(I,s)},onBeforeAppear(I){Ze(D,[I]),A2(I,d),A2(I,a)},onEnter:U(!1),onAppear:U(!0),onLeave(I,X){I._isLeaving=!0;const l1=()=>P(I,X);A2(I,u),I._enterCancelled?(A2(I,h),Ao(I)):(Ao(I),A2(I,h)),v0(()=>{I._isLeaving&&(Ce(I,u),A2(I,p),g0(f)||f0(I,o,m,l1))}),Ze(f,[I,l1])},onEnterCancelled(I){L(I,!1,void 0,!0),Ze(j,[I])},onAppearCancelled(I){L(I,!0,void 0,!0),Ze(A,[I])},onLeaveCancelled(I){P(I),Ze(x,[I])}})}function Yd(e){if(e==null)return null;if(m1(e))return[Gn(e.enter),Gn(e.leave)];{const t=Gn(e);return[t,t]}}function Gn(e){return Vs(e)}function A2(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[at]||(e[at]=new Set)).add(t)}function Ce(e,t){t.split(/\s+/).forEach(o=>o&&e.classList.remove(o));const n=e[at];n&&(n.delete(t),n.size||(e[at]=void 0))}function v0(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Qd=0;function f0(e,t,n,o){const r=e._endId=++Qd,i=()=>{r===e._endId&&o()};if(n!=null)return setTimeout(i,n);const{type:s,timeout:l,propCount:d}=I5(e,t);if(!s)return o();const a=s+"end";let k=0;const u=()=>{e.removeEventListener(a,h),i()},h=p=>{p.target===e&&++k>=d&&u()};setTimeout(()=>{k(n[g]||"").split(", "),r=o(`${pe}Delay`),i=o(`${pe}Duration`),s=m0(r,i),l=o(`${Mt}Delay`),d=o(`${Mt}Duration`),a=m0(l,d);let k=null,u=0,h=0;t===pe?s>0&&(k=pe,u=s,h=i.length):t===Mt?a>0&&(k=Mt,u=a,h=d.length):(u=Math.max(s,a),k=u>0?s>a?pe:Mt:null,h=k?k===pe?i.length:d.length:0);const p=k===pe&&/\b(?:transform|all)(?:,|$)/.test(o(`${pe}Property`).toString());return{type:k,timeout:u,propCount:h,hasTransform:p}}function m0(e,t){for(;e.lengthM0(n)+M0(e[o])))}function M0(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Ao(e){return(e?e.ownerDocument:document).body.offsetHeight}function Jd(e,t,n){const o=e[at];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const tn=Symbol("_vod"),Vr=Symbol("_vsh"),yr={name:"show",beforeMount(e,{value:t},{transition:n}){e[tn]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):jt(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),jt(e,!0),o.enter(e)):o.leave(e,()=>{jt(e,!1)}):jt(e,t))},beforeUnmount(e,{value:t}){jt(e,t)}};function jt(e,t){e.style.display=t?e[tn]:"none",e[Vr]=!t}const Xd=Symbol(""),e7=/(?:^|;)\s*display\s*:/;function t7(e,t,n){const o=e.style,r=y1(n);let i=!1;if(n&&!r){if(t)if(y1(t))for(const s of t.split(";")){const l=s.slice(0,s.indexOf(":")).trim();n[l]==null&&St(o,l,"")}else for(const s in t)n[s]==null&&St(o,s,"");for(const s in n){s==="display"&&(i=!0);const l=n[s];l!=null?o7(e,s,!y1(t)&&t?t[s]:void 0,l)||St(o,s,l):St(o,s,"")}}else if(r){if(t!==n){const s=o[Xd];s&&(n+=";"+s),o.cssText=n,i=e7.test(n)}}else t&&e.removeAttribute("style");tn in e&&(e[tn]=i?o.display:"",e[Vr]&&(o.display="none"))}const x9=/\s*!important$/;function St(e,t,n){if(J(n))n.forEach(o=>St(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))x9.test(n)?e.setProperty(t,n.replace(x9,""),"important"):e.setProperty(t,n);else{const o=n7(e,t);x9.test(n)?e.setProperty(ke(o),n.replace(x9,""),"important"):e[o]=n}}const j0=["Webkit","Moz","ms"],Kn={};function n7(e,t){const n=Kn[t];if(n)return n;let o=n2(t);if(o!=="filter"&&o in e)return Kn[t]=o;o=cn(o);for(let r=0;rYn||(a7.then(()=>Yn=0),Yn=Date.now());function u7(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;const r=n.value;if(J(r)){const i=o.stopImmediatePropagation;o.stopImmediatePropagation=()=>{i.call(o),o._stopped=!0};const s=r.slice(),l=[o];for(let d=0;de.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,h7=(e,t,n,o,r,i)=>{const s=r==="svg";t==="class"?Jd(e,o,s):t==="style"?t7(e,n,o):kn(t)?un(t)||i7(e,t,n,o,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):p7(e,t,o,s))?(L0(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&D0(e,t,o,s,i,t!=="value")):e._isVueCE&&(c7(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!y1(o)))?L0(e,n2(t),o,i,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),D0(e,t,o,s))};function p7(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&V0(t)&&a1(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return V0(t)&&y1(n)?!1:t in e}function c7(e,t){const n=e._def.props;if(!n)return!1;const o=n2(t);return Array.isArray(n)?n.some(r=>n2(r)===o):Object.keys(n).some(r=>n2(r)===o)}const R5=new WeakMap,$5=new WeakMap,nn=Symbol("_moveCb"),y0=Symbol("_enterCb"),w7=e=>(delete e.props.mode,e),C7=w7({name:"TransitionGroup",props:T1({},P5,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=U2(),o=i5();let r,i;return mr(()=>{if(!r.length)return;const s=e.moveClass||`${e.name||"v"}-move`;if(!m7(r[0].el,n.vnode.el,s)){r=[];return}r.forEach(g7),r.forEach(v7);const l=r.filter(f7);Ao(n.vnode.el),l.forEach(d=>{const a=d.el,k=a.style;A2(a,s),k.transform=k.webkitTransform=k.transitionDuration="";const u=a[nn]=h=>{h&&h.target!==a||(!h||h.propertyName.endsWith("transform"))&&(a.removeEventListener("transitionend",u),a[nn]=null,Ce(a,s))};a.addEventListener("transitionend",u)}),r=[]}),()=>{const s=w1(e),l=T5(s);let d=s.tag||f1;if(r=[],i)for(let a=0;a{l.split(/\s+/).forEach(d=>d&&o.classList.remove(d))}),n.split(/\s+/).forEach(l=>l&&o.classList.add(l)),o.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(o);const{hasTransform:s}=I5(o);return i.removeChild(o),s}const Le=e=>{const t=e.props["onUpdate:modelValue"]||!1;return J(t)?n=>tt(t,n):t};function M7(e){e.target.composing=!0}function b0(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const c2=Symbol("_assign"),D9=Symbol("_initialValue");function Qn(e,t,n){return t&&(e=e.trim()),n&&(e=wn(e)),e}const Z0={created(e,{modifiers:{lazy:t,trim:n,number:o}},r){e.parentNode&&(e.type==="text"?e[D9]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[D9]=e.defaultValue.replace(/\r\n?/g,` +`))),e[c2]=Le(r);const i=o||r.props&&r.props.type==="number";ee(e,t?"change":"input",s=>{s.target.composing||e[c2](Qn(e.value,n,i))}),(n||i)&&ee(e,"change",()=>{e.value=Qn(e.value,n,i)}),t||(ee(e,"compositionstart",M7),ee(e,"compositionend",b0),ee(e,"change",b0))},mounted(e,{value:t,modifiers:{trim:n,number:o}}){const r=t??"",i=e[D9];delete e[D9],i!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==i?e[c2](Qn(e.value,n,o)):e.value=r},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:r,number:i}},s){if(e[c2]=Le(s),e.composing)return;const l=(i||e.type==="number")&&!/^0\d/.test(e.value)?wn(e.value):e.value,d=t??"";if(l===d)return;const a=e.getRootNode();(a instanceof Document||a instanceof ShadowRoot)&&a.activeElement===e&&e.type!=="range"&&(o&&t===n||r&&e.value.trim()===d)||(e.value=d)}},j7={deep:!0,created(e,t,n){e[c2]=Le(n),ee(e,"change",()=>{const o=e._modelValue,r=kt(e),i=e.checked,s=e[c2];if(J(o)){const l=sr(o,r),d=l!==-1;if(i&&!d)s(o.concat(r));else if(!i&&d){const a=[...o];a.splice(l,1),s(a)}}else if(oe(o)){const l=new Set(o);i?l.add(r):l.delete(r),s(l)}else s(q5(e,i))})},mounted:_0,beforeUpdate(e,t,n){e[c2]=Le(n),_0(e,t,n)}};function _0(e,{value:t,oldValue:n},o){e._modelValue=t;let r;if(J(t))r=sr(t,o.props.value)>-1;else if(oe(t))r=t.has(o.props.value);else{if(t===n)return;r=b2(t,q5(e,!0))}e.checked!==r&&(e.checked=r)}const x7={created(e,{value:t},n){e.checked=b2(t,n.props.value),e[c2]=Le(n),ee(e,"change",()=>{e[c2](kt(e))})},beforeUpdate(e,{value:t,oldValue:n},o){e[c2]=Le(o),t!==n&&(e.checked=b2(t,o.props.value))}},D7={deep:!0,created(e,{value:t,modifiers:{number:n}},o){e._modelValue=t,ee(e,"change",()=>{const r=Array.prototype.filter.call(e.options,d=>d.selected).map(d=>n?wn(kt(d)):kt(d)),i=e.multiple,s=i?oe(e._modelValue)?new Set(r):r:r[0],l=e._pendingValue=[i,i?J(s)?r.slice():r:s];try{e[c2](s)}finally{v2(()=>{e._pendingValue===l&&(e._pendingValue=void 0)})}}),e[c2]=Le(o)},mounted(e,{value:t}){B0(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[c2]=Le(n)},updated(e,{value:t}){const n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!L7(t,n[1],n[0]))&&B0(e,t)}};function L7(e,t,n){if(!n||J(e))return b2(e,t);if(oe(e)){if(e.size!==t.length)return!1;for(const o of t)if(!e.has(o))return!1;return!0}return!1}function B0(e,t){const n=e.multiple,o=J(t);if(!(n&&!o&&!oe(t))){for(let r=0,i=e.options.length;rString(a)===String(l)):s.selected=sr(t,l)>-1}else s.selected=t.has(l);else if(b2(kt(s),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function kt(e){return"_value"in e?e._value:e.value}function q5(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const cw={created(e,t,n){L9(e,t,n,null,"created")},mounted(e,t,n){L9(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){L9(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){L9(e,t,n,o,"updated")}};function H7(e,t){switch(e){case"SELECT":return D7;case"TEXTAREA":return Z0;default:switch(t){case"checkbox":return j7;case"radio":return x7;default:return Z0}}}function L9(e,t,n,o,r){const s=H7(e.tagName,n.props&&n.props.type)[r];s&&s(e,t,n,o)}const V7=["ctrl","shift","alt","meta"],y7={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>V7.some(n=>e[`${n}Key`]&&!t.includes(n))},E0=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=(r,...i)=>{for(let s=0;s{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=r=>{if(!("key"in r))return;const i=ke(r.key);if(t.some(s=>s===i||b7[s]===i))return e(r)})},Z7=T1({patchProp:h7},Gd);let S0;function U5(){return S0||(S0=xd(Z7))}const O0=(...e)=>{U5().render(...e)},_7=(...e)=>{const t=U5().createApp(...e),{mount:n}=t;return t.mount=o=>{const r=E7(o);if(!r)return;const i=t._component;!a1(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const s=n(r,!1,B7(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),s},t};function B7(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function E7(e){return y1(e)?document.querySelector(e):e}/*! * pinia v2.3.1 * (c) 2025 Eduardo San Martin Morote * @license MIT - */let P4;const ke=e=>P4=e,O4=Symbol();function vt(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var R3;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(R3||(R3={}));function t7(){const e=f5(!0),t=e.run(()=>g1({}));let o=[],n=[];const r=Ot({install(i){ke(r),r._a=i,i.provide(O4,r),i.config.globalProperties.$pinia=r,n.forEach(s=>o.push(s)),n=[]},use(i){return this._a?o.push(i):n.push(i),this},_p:o,_a:null,_e:e,_s:new Map,state:t});return r}const T4=()=>{};function hn(e,t,o,n=T4){e.push(t);const r=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),n())};return!o&&bt()&&M5(r),r}function o3(e,...t){e.slice().forEach(o=>{o(...t)})}const o7=e=>e(),un=Symbol(),$e=Symbol();function mt(e,t){e instanceof Map&&t instanceof Map?t.forEach((o,n)=>e.set(n,o)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const o in t){if(!t.hasOwnProperty(o))continue;const n=t[o],r=e[o];vt(r)&&vt(n)&&e.hasOwnProperty(o)&&!b1(n)&&!g0(n)?e[o]=mt(r,n):e[o]=n}return e}const n7=Symbol();function r7(e){return!vt(e)||!e.hasOwnProperty(n7)}const{assign:E0}=Object;function i7(e){return!!(b1(e)&&e.effect)}function s7(e,t,o,n){const{state:r,actions:i,getters:s}=t,d=o.state.value[e];let l;function h(){d||(o.state.value[e]=r?r():{});const u=T5(o.state.value[e]);return E0(u,i,Object.keys(s||{}).reduce((p,w)=>(p[w]=Ot(B1(()=>{ke(o);const v=o._s.get(e);return s[w].call(v,v)})),p),{}))}return l=R4(e,h,t,o,n,!0),l}function R4(e,t,o={},n,r,i){let s;const d=E0({actions:{}},o),l={deep:!0};let h,u,p=[],w=[],v;const f=n.state.value[e];!i&&!f&&(n.state.value[e]={});let x;function S(U){let A;h=u=!1,typeof U=="function"?(U(n.state.value[e]),A={type:R3.patchFunction,storeId:e,events:v}):(mt(n.state.value[e],U),A={type:R3.patchObject,payload:U,storeId:e,events:v});const q=x=Symbol();K2().then(()=>{x===q&&(h=!0)}),u=!0,o3(p,A,n.state.value[e])}const O=i?function(){const{state:A}=o,q=A?A():{};this.$patch(r1=>{E0(r1,q)})}:T4;function D(){s.stop(),p=[],w=[],n._s.delete(e)}const H=(U,A="")=>{if(un in U)return U[$e]=A,U;const q=function(){ke(n);const r1=Array.from(arguments),F=[],d1=[];function v1(i1){F.push(i1)}function L1(i1){d1.push(i1)}o3(w,{args:r1,name:q[$e],store:Z,after:v1,onError:L1});let h1;try{h1=U.apply(this&&this.$id===e?this:Z,r1)}catch(i1){throw o3(d1,i1),i1}return h1 instanceof Promise?h1.then(i1=>(o3(F,i1),i1)).catch(i1=>(o3(d1,i1),Promise.reject(i1))):(o3(F,h1),h1)};return q[un]=!0,q[$e]=A,q},L={_p:n,$id:e,$onAction:hn.bind(null,w),$patch:S,$reset:O,$subscribe(U,A={}){const q=hn(p,U,A.detached,()=>r1()),r1=s.run(()=>H1(()=>n.state.value[e],F=>{(A.flush==="sync"?u:h)&&U({storeId:e,type:R3.direct,events:v},F)},E0({},l,A)));return q},$dispose:D},Z=y2(L);n._s.set(e,Z);const _=(n._a&&n._a.runWithContext||o7)(()=>n._e.run(()=>(s=f5()).run(()=>t({action:H}))));for(const U in _){const A=_[U];if(b1(A)&&!i7(A)||g0(A))i||(f&&r7(A)&&(b1(A)?A.value=f[U]:mt(A,f[U])),n.state.value[e][U]=A);else if(typeof A=="function"){const q=H(A,U);_[U]=q,d.actions[U]=A}}return E0(Z,_),E0(c1(Z),_),Object.defineProperty(Z,"$state",{get:()=>n.state.value[e],set:U=>{S(A=>{E0(A,U)})}}),n._p.forEach(U=>{E0(Z,s.run(()=>U({store:Z,app:n._a,pinia:n,options:d})))}),f&&i&&o.hydrate&&o.hydrate(Z.$state,f),h=!0,u=!0,Z}/*! #__NO_SIDE_EFFECTS__ */function he(e,t,o){let n,r;const i=typeof t=="function";typeof e=="string"?(n=e,r=i?o:t):(r=e,n=e.id);function s(d,l){const h=ts();return d=d||(h?d2(O4,null):null),d&&ke(d),d=P4,d._s.has(n)||(i?R4(n,t,r,d):s7(n,r,d)),d._s.get(n)}return s.$id=n,s}/*! + */let z5;const Bn=e=>z5=e,W5=Symbol();function Po(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var $t;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})($t||($t={}));function S7(){const e=Bs(!0),t=e.run(()=>Q({}));let n=[],o=[];const r=pr({install(i){Bn(r),r._a=i,i.provide(W5,r),i.config.globalProperties.$pinia=r,o.forEach(s=>n.push(s)),o=[]},use(i){return this._a?n.push(i):o.push(i),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return r}const G5=()=>{};function A0(e,t,n,o=G5){e.push(t);const r=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),o())};return!n&&lr()&&Es(r),r}function Ke(e,...t){e.slice().forEach(n=>{n(...t)})}const O7=e=>e(),P0=Symbol(),Jn=Symbol();function To(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,o)=>e.set(o,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const o=t[n],r=e[n];Po(r)&&Po(o)&&e.hasOwnProperty(n)&&!B1(o)&&!te(o)?e[n]=To(r,o):e[n]=o}return e}const A7=Symbol();function P7(e){return!Po(e)||!e.hasOwnProperty(A7)}const{assign:ge}=Object;function T7(e){return!!(B1(e)&&e.effect)}function I7(e,t,n,o){const{state:r,actions:i,getters:s}=t,l=n.state.value[e];let d;function a(){l||(n.state.value[e]=r?r():{});const k=V3(n.state.value[e]);return ge(k,i,Object.keys(s||{}).reduce((u,h)=>(u[h]=pr(N(()=>{Bn(n);const p=n._s.get(e);return s[h].call(p,p)})),u),{}))}return d=K5(e,a,t,n,o,!0),d}function K5(e,t,n={},o,r,i){let s;const l=ge({actions:{}},n),d={deep:!0};let a,k,u=[],h=[],p;const g=o.state.value[e];!i&&!g&&(o.state.value[e]={});let v;function m(A){let L;a=k=!1,typeof A=="function"?(A(o.state.value[e]),L={type:$t.patchFunction,storeId:e,events:p}):(To(o.state.value[e],A),L={type:$t.patchObject,payload:A,storeId:e,events:p});const P=v=Symbol();v2().then(()=>{v===P&&(a=!0)}),k=!0,Ke(u,L,o.state.value[e])}const H=i?function(){const{state:L}=n,P=L?L():{};this.$patch(U=>{ge(U,P)})}:G5;function w(){s.stop(),u=[],h=[],o._s.delete(e)}const j=(A,L="")=>{if(P0 in A)return A[Jn]=L,A;const P=function(){Bn(o);const U=Array.from(arguments),I=[],X=[];function l1(Y){I.push(Y)}function h1(Y){X.push(Y)}Ke(h,{args:U,name:P[Jn],store:x,after:l1,onError:h1});let k1;try{k1=A.apply(this&&this.$id===e?this:x,U)}catch(Y){throw Ke(X,Y),Y}return k1 instanceof Promise?k1.then(Y=>(Ke(I,Y),Y)).catch(Y=>(Ke(X,Y),Promise.reject(Y))):(Ke(I,k1),k1)};return P[P0]=!0,P[Jn]=L,P},f={_p:o,$id:e,$onAction:A0.bind(null,h),$patch:m,$reset:H,$subscribe(A,L={}){const P=A0(u,A,L.detached,()=>U()),U=s.run(()=>E1(()=>o.state.value[e],I=>{(L.flush==="sync"?k:a)&&A({storeId:e,type:$t.direct,events:p},I)},ge({},d,L)));return P},$dispose:w},x=G1(f);o._s.set(e,x);const y=(o._a&&o._a.runWithContext||O7)(()=>o._e.run(()=>(s=Bs()).run(()=>t({action:j}))));for(const A in y){const L=y[A];if(B1(L)&&!T7(L)||te(L))i||(g&&P7(L)&&(B1(L)?L.value=g[A]:To(L,g[A])),o.state.value[e][A]=L);else if(typeof L=="function"){const P=j(L,A);y[A]=P,l.actions[A]=L}}return ge(x,y),ge(w1(x),y),Object.defineProperty(x,"$state",{get:()=>o.state.value[e],set:A=>{m(L=>{ge(L,A)})}}),o._p.forEach(A=>{ge(x,s.run(()=>A({store:x,app:o._a,pinia:o,options:l})))}),g&&i&&n.hydrate&&n.hydrate(x.$state,g),a=!0,k=!0,x}/*! #__NO_SIDE_EFFECTS__ */function he(e,t,n){let o,r;const i=typeof t=="function";typeof e=="string"?(o=e,r=i?n:t):(r=e,o=e.id);function s(l,d){const a=A3();return l=l||(a?W1(W5,null):null),l&&Bn(l),l=z5,l._s.has(o)||(i?K5(o,t,r,l):I7(o,r,l)),l._s.get(o)}return s.$id=o,s}/*! * Vue3-Lazyload.js v0.2.5-beta * A Vue3.x image lazyload plugin * (c) 2021 MuRong * Released under the MIT License. - */var F2;(function(e){e.LOADING="loading",e.LOADED="loaded",e.ERROR="error"})(F2||(F2={}));var d7=typeof window<"u"&&window!==null,l7=u7(),a7=Object.prototype.propertyIsEnumerable,pn=Object.getOwnPropertySymbols;function F3(e){return typeof e=="function"||toString.call(e)==="[object Object]"}function k7(e){return typeof e=="object"?e===null:typeof e!="function"}function h7(e){return e!=="__proto__"&&e!=="constructor"&&e!=="prototype"}function u7(){return d7&&"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype?("isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}}),!0):!1}function p7(e){for(var t=[],o=1;o0}}),!0):!1}function z7(e){for(var t=[],n=1;ne!==null&&typeof e=="object",$e=e=>e!=null,Io=e=>typeof e=="function",X7=e=>br(e)&&Io(e.then)&&Io(e.catch),Q5=e=>typeof e=="number"||/^\d+(\.\d+)?$/.test(e),e8=()=>J7?/ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()):!1;function R0(e,t){const n=t.split(".");let o=e;return n.forEach(r=>{var i;o=br(o)&&(i=o[r])!=null?i:""}),o}const J5=null,de=[Number,String],Se={type:Boolean,default:!0},Cw=e=>({type:de,default:e}),it=e=>({type:String,default:e});var Zr=typeof window<"u";function X5(e){let t;q2(()=>{e(),v2(()=>{t=!0})}),vr(()=>{t&&e()})}function e4(e,t,n={}){if(!Zr)return;const{target:o=window,passive:r=!1,capture:i=!1}=n;let s=!1,l;const d=u=>{if(s)return;const h=v1(u);h&&!l&&(h.addEventListener(e,t,{capture:i,passive:r}),l=!0)},a=u=>{if(s)return;const h=v1(u);h&&l&&(h.removeEventListener(e,t,i),l=!1)};Hn(()=>a(o)),Dn(()=>a(o)),X5(()=>d(o));let k;return B1(o)&&(k=E1(o,(u,h)=>{a(h),d(u)})),()=>{k==null||k(),a(o),s=!0}}var H9,Xn;function t8(){if(!H9&&(H9=Q(0),Xn=Q(0),Zr)){const e=()=>{H9.value=window.innerWidth,Xn.value=window.innerHeight};e(),window.addEventListener("resize",e,{passive:!0}),window.addEventListener("orientationchange",e,{passive:!0})}return{width:H9,height:Xn}}var n8=/scroll|auto|overlay/i,t4=Zr?window:void 0;function o8(e){return e.tagName!=="HTML"&&e.tagName!=="BODY"&&e.nodeType===1}function Ro(e,t=t4){let n=e;for(;n&&n!==t&&o8(n);){const{overflowY:o}=window.getComputedStyle(n);if(n8.test(o))return n;n=n.parentNode}return t}function gw(e,t=t4){const n=Q();return q2(()=>{e.value&&(n.value=Ro(e.value,t))}),n}function vw(e){const t="scrollTop"in e?e.scrollTop:e.pageYOffset;return Math.max(t,0)}e8();const r8=e=>e.stopPropagation();function n4(e,t){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),t&&r8(e)}t8();function R2(e){if($e(e))return Q5(e)?`${e}px`:String(e)}function fw(e){if($e(e)){if(Array.isArray(e))return{width:R2(e[0]),height:R2(e[1])};const t=R2(e);return{width:t,height:t}}}function i8(e){const t={};return e!==void 0&&(t.zIndex=+e),t}const s8=/-(\w)/g,o4=e=>e.replace(s8,(t,n)=>n.toUpperCase()),{hasOwnProperty:l8}=Object.prototype;function d8(e,t,n){const o=t[n];$e(o)&&(!l8.call(e,n)||!br(o)?e[n]=o:e[n]=r4(Object(e[n]),o))}function r4(e,t){return Object.keys(t).forEach(n=>{d8(e,t,n)}),e}var a8={name:"姓名",tel:"电话",save:"保存",clear:"清空",undo:"撤销",cancel:"取消",confirm:"确认",delete:"删除",loading:"加载中...",noCoupon:"暂无优惠券",nameEmpty:"请填写姓名",addContact:"添加联系人",telInvalid:"请填写正确的电话",vanCalendar:{end:"结束",start:"开始",title:"日期选择",weekdays:["日","一","二","三","四","五","六"],monthTitle:(e,t)=>`${e}年${t}月`,rangePrompt:e=>`最多选择 ${e} 天`},vanCascader:{select:"请选择"},vanPagination:{prev:"上一页",next:"下一页"},vanPullRefresh:{pulling:"下拉即可刷新...",loosing:"释放即可刷新..."},vanSubmitBar:{label:"合计:"},vanCoupon:{unlimited:"无门槛",discount:e=>`${e}折`,condition:e=>`满${e}元可用`},vanCouponCell:{title:"优惠券",count:e=>`${e}张可用`},vanCouponList:{exchange:"兑换",close:"不使用",enable:"可用",disabled:"不可用",placeholder:"输入优惠码"},vanAddressEdit:{area:"地区",areaEmpty:"请选择地区",addressEmpty:"请填写详细地址",addressDetail:"详细地址",defaultAddress:"设为默认收货地址"},vanAddressList:{add:"新增地址"}};const $0=Q("zh-CN"),F0=G1({"zh-CN":a8}),i4={messages(){return F0[$0.value]},use(e,t){$0.value=e,this.add({[e]:t})},add(e={}){r4(F0,e)}};var k8=i4;function u8(e){const t=o4(e)+".";return(n,...o)=>{const r=k8.messages(),i=R0(r,t+n)||R0(r,n);return Io(i)?i(...o):i}}function $o(e,t){return t?typeof t=="string"?` ${e}--${t}`:Array.isArray(t)?t.reduce((n,o)=>n+$o(e,o),""):Object.keys(t).reduce((n,o)=>n+(t[o]?$o(e,o):""),""):""}function h8(e){return(t,n)=>(t&&typeof t!="string"&&(n=t,t=""),t=t?`${e}__${t}`:e,`${t}${$o(t,n)}`)}function p9(e){const t=`van-${e}`;return[t,h8(t),u8(t)]}const p8="van-haptics-feedback",N0=5;function c8(e,{args:t=[],done:n,canceled:o,error:r}){if(e){const i=e.apply(null,t);X7(i)?i.then(s=>{s?n():o&&o()}).catch(r||Q7):i?n():o&&o()}else n()}function Sn(e){return e.install=t=>{const{name:n}=e;n&&(t.component(n,e),t.component(o4(`-${n}`),e))},e}const w8=Symbol();function C8(e){const t=U2();t&&En(t.proxy,e)}const[g8,q0]=p9("badge"),v8={dot:Boolean,max:de,tag:it("div"),color:String,offset:Array,content:de,showZero:Se,position:it("top-right")};var f8=b1({name:g8,props:v8,setup(e,{slots:t}){const n=()=>{if(t.content)return!0;const{content:l,showZero:d}=e;return $e(l)&&l!==""&&(d||l!==0&&l!=="0")},o=()=>{const{dot:l,max:d,content:a}=e;if(!l&&n())return t.content?t.content():$e(d)&&Q5(a)&&+a>+d?`${d}+`:a},r=l=>l.startsWith("-")?l.replace("-",""):`-${l}`,i=N(()=>{const l={background:e.color};if(e.offset){const[d,a]=e.offset,{position:k}=e,[u,h]=k.split("-");t.default?(typeof a=="number"?l[u]=R2(u==="top"?a:-a):l[u]=u==="top"?R2(a):r(a),typeof d=="number"?l[h]=R2(h==="left"?d:-d):l[h]=h==="left"?R2(d):r(d)):(l.marginTop=R2(a),l.marginLeft=R2(d))}return l}),s=()=>{if(n()||e.dot)return b("div",{class:q0([e.position,{dot:e.dot,fixed:!!t.default}]),style:i.value},[o()])};return()=>{if(t.default){const{tag:l}=e;return b(l,{class:q0("wrapper")},{default:()=>[t.default(),s()]})}return s()}}});const m8=Sn(f8);let M8=2e3;const j8=()=>++M8,[x8]=p9("config-provider"),D8=Symbol(x8),[L8,U0]=p9("icon"),H8=e=>e==null?void 0:e.includes("/"),V8={dot:Boolean,tag:it("i"),name:String,size:de,badge:de,color:String,badgeProps:Object,classPrefix:String};var y8=b1({name:L8,props:V8,setup(e,{slots:t}){const n=W1(D8,null),o=N(()=>e.classPrefix||(n==null?void 0:n.iconPrefix)||U0());return()=>{const{tag:r,dot:i,name:s,size:l,badge:d,color:a}=e,k=H8(s);return b(m8,Jt({dot:i,tag:r,class:[o.value,k?"":`${o.value}-${s}`],style:{color:a,fontSize:R2(l)},content:d},e.badgeProps),{default:()=>{var u;return[(u=t.default)==null?void 0:u.call(t),k&&b("img",{class:U0("image"),src:s},null)]}})}}});const b8=Sn(y8),Z8={show:Boolean,zIndex:de,overlay:Se,duration:de,teleport:[String,Object],lockScroll:Se,lazyRender:Se,beforeClose:Function,overlayProps:Object,overlayStyle:Object,overlayClass:J5,transitionAppear:Boolean,closeOnClickOverlay:Se};function _8(e,t){return e>t?"horizontal":t>e?"vertical":""}function B8(){const e=Q(0),t=Q(0),n=Q(0),o=Q(0),r=Q(0),i=Q(0),s=Q(""),l=Q(!0),d=()=>s.value==="vertical",a=()=>s.value==="horizontal",k=()=>{n.value=0,o.value=0,r.value=0,i.value=0,s.value="",l.value=!0};return{move:p=>{const g=p.touches[0];n.value=(g.clientX<0?0:g.clientX)-e.value,o.value=g.clientY-t.value,r.value=Math.abs(n.value),i.value=Math.abs(o.value);const v=10;(!s.value||r.valueN0||i.value>N0)&&(l.value=!1)},start:p=>{k(),e.value=p.touches[0].clientX,t.value=p.touches[0].clientY},reset:k,startX:e,startY:t,deltaX:n,deltaY:o,offsetX:r,offsetY:i,direction:s,isVertical:d,isHorizontal:a,isTap:l}}let xt=0;const z0="van-overflow-hidden";function E8(e,t){const n=B8(),o="01",r="10",i=k=>{n.move(k);const u=n.deltaY.value>0?r:o;let h=Ro(k.target,e.value);for(;h.scrollHeight<=h.offsetHeight&&h!==e.value&&h.parentElement;)h=Ro(h.parentElement,e.value);const{scrollHeight:p,offsetHeight:g,scrollTop:v}=h;let m="11";v===0?m=g>=p?"00":"01":v+g>=p&&(m="10"),m!=="11"&&n.isVertical()&&!(parseInt(m,2)&parseInt(u,2))&&n4(k,!0)},s=()=>{document.addEventListener("touchstart",n.start),document.addEventListener("touchmove",i,{passive:!1}),xt||document.body.classList.add(z0),xt++},l=()=>{xt&&(document.removeEventListener("touchstart",n.start),document.removeEventListener("touchmove",i),xt--,xt||document.body.classList.remove(z0))},d=()=>t()&&s(),a=()=>t()&&l();X5(d),Dn(a),ze(a),E1(t,k=>{k?s():l()})}function s4(e){const t=Q(!1);return E1(e,n=>{n&&(t.value=n)},{immediate:!0}),n=>()=>t.value?n():null}const W0=()=>{var e;const{scopeId:t}=((e=U2())==null?void 0:e.vnode)||{};return t?{[t]:""}:null},[S8,O8]=p9("overlay"),A8={show:Boolean,zIndex:de,duration:de,className:J5,lockScroll:Se,lazyRender:Se,customStyle:Object,teleport:[String,Object]};var P8=b1({name:S8,inheritAttrs:!1,props:A8,setup(e,{attrs:t,slots:n}){const o=Q(),r=s4(()=>e.show||!e.lazyRender),i=l=>{e.lockScroll&&n4(l,!0)},s=r(()=>{var l;const d=En(i8(e.zIndex),e.customStyle);return $e(e.duration)&&(d.animationDuration=`${e.duration}s`),Cr(b("div",Jt({ref:o,style:d,class:[O8(),e.className]},t),[(l=n.default)==null?void 0:l.call(n)]),[[yr,e.show]])});return e4("touchmove",i,{target:o}),()=>{const l=b(_n,{name:"van-fade",appear:!0},{default:s});return e.teleport?b(Ct,{to:e.teleport},{default:()=>[l]}):l}}});const T8=Sn(P8),I8=En({},Z8,{round:Boolean,position:it("center"),closeIcon:it("cross"),closeable:Boolean,transition:String,iconPrefix:String,closeOnPopstate:Boolean,closeIconPosition:it("top-right"),destroyOnClose:Boolean,safeAreaInsetTop:Boolean,safeAreaInsetBottom:Boolean}),[R8,G0]=p9("popup");var $8=b1({name:R8,inheritAttrs:!1,props:I8,emits:["open","close","opened","closed","keydown","update:show","clickOverlay","clickCloseIcon"],setup(e,{emit:t,attrs:n,slots:o}){let r,i;const s=Q(),l=Q(),d=s4(()=>e.show||!e.lazyRender),a=N(()=>{const D={zIndex:s.value};if($e(e.duration)){const y=e.position==="center"?"animationDuration":"transitionDuration";D[y]=`${e.duration}s`}return D}),k=()=>{r||(r=!0,s.value=e.zIndex!==void 0?+e.zIndex:j8(),t("open"))},u=()=>{r&&c8(e.beforeClose,{done(){r=!1,t("close"),t("update:show",!1)}})},h=D=>{t("clickOverlay",D),e.closeOnClickOverlay&&u()},p=()=>{if(e.overlay){const D=En({show:e.show,class:e.overlayClass,zIndex:s.value,duration:e.duration,customStyle:e.overlayStyle,role:e.closeOnClickOverlay?"button":void 0,tabindex:e.closeOnClickOverlay?0:void 0},e.overlayProps);return b(T8,Jt(D,W0(),{onClick:h}),{default:o["overlay-content"]})}},g=D=>{t("clickCloseIcon",D),u()},v=()=>{if(e.closeable)return b(b8,{role:"button",tabindex:0,name:e.closeIcon,class:[G0("close-icon",e.closeIconPosition),p8],classPrefix:e.iconPrefix,onClick:g},null)};let m;const H=()=>{m&&clearTimeout(m),m=setTimeout(()=>{t("opened")})},w=()=>t("closed"),j=D=>t("keydown",D),f=d(()=>{var D;const{destroyOnClose:y,round:A,position:L,safeAreaInsetTop:P,safeAreaInsetBottom:U,show:I}=e;if(!(!I&&y))return Cr(b("div",Jt({ref:l,style:a.value,role:"dialog",tabindex:0,class:[G0({round:A,[L]:L}),{"van-safe-area-top":P,"van-safe-area-bottom":U}],onKeydown:j},n,W0()),[(D=o.default)==null?void 0:D.call(o),v()]),[[yr,I]])}),x=()=>{const{position:D,transition:y,transitionAppear:A}=e,L=D==="center"?"van-fade":`van-popup-slide-${D}`;return b(_n,{name:y||L,appear:A,onAfterEnter:H,onAfterLeave:w},{default:f})};return E1(()=>e.show,D=>{D&&!r&&(k(),n.tabindex===0&&v2(()=>{var y;(y=l.value)==null||y.focus()})),!D&&r&&(r=!1,t("close"))}),C8({popupRef:l}),E8(l,()=>e.show&&e.lockScroll),e4("popstate",()=>{e.closeOnPopstate&&(u(),i=!1)}),q2(()=>{e.show&&k()}),vr(()=>{i&&(t("update:show",!0),i=!1)}),Dn(()=>{e.show&&e.teleport&&(u(),i=!0)}),je(w8,()=>e.show),()=>e.teleport?b(Ct,{to:e.teleport},{default:()=>[p(),x()]}):b(f1,null,[p(),x()])}});const F8=Sn($8);var N8={name:"نام",tel:"تلفن",save:"ذخیره",clear:"پاک کردن",undo:"واگرد",cancel:"انصراف",confirm:"تایید",delete:"حذف",loading:"در حال بارگزاری ...",noCoupon:"بدون کوپن",nameEmpty:"لطفا نام را وارد کنید",addContact:"افزودن مخاطب",telInvalid:"شماره تلفن ناقص",vanCalendar:{end:"پایان",start:"شروع",title:"تقویم",weekdays:["شنبه","یکشنبه","دوشنبه","سه‌شنبه","چهارشنبه","پنج‌شنبه","جمعه"],monthTitle:(e,t)=>`${e}/${t}`,rangePrompt:e=>`بیشتر از ${e} روز انتخاب کنید`},vanCascader:{select:"انتخاب"},vanPagination:{prev:"قبلی",next:"بعدی"},vanPullRefresh:{pulling:"بکشید تا تازه شود ...",loosing:"رها کنید تا تازه شود ..."},vanSubmitBar:{label:"مجموع:"},vanCoupon:{unlimited:"نامحدود",discount:e=>`${e*10}% تخفیف`,condition:e=>`حداقل ${e}`},vanCouponCell:{title:"کوپن",count:e=>`شما ${e} کوپن دارید`},vanCouponList:{exchange:"تبادل",close:"بستن",enable:"موجود",disabled:"ناموجود",placeholder:"کد کوپن"},vanAddressEdit:{area:"محدوده",postal:"کد پستی",areaEmpty:"لطفا یک منطقه برای دریافت انتخاب کنید",addressEmpty:"آدرس نمی‌تواند خالی باشد",postalEmpty:"کد پستی نامعتبر است",addressDetail:"آدرس",defaultAddress:"تنظیم به عنوان آدرس پیش فرض"},vanAddressList:{add:"افزودن آدرس جدید"}};/*! * vue-router v4.6.4 * (c) 2025 Eduardo San Martin Morote * @license MIT - */const i3=typeof document<"u";function N4(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function v7(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&N4(e.default)}const D1=Object.assign;function Ue(e,t){const o={};for(const n in t){const r=t[n];o[n]=G2(r)?r.map(e):e(r)}return o}const N3=()=>{},G2=Array.isArray;function Cn(e,t){const o={};for(const n in e)o[n]=n in t?t[n]:e[n];return o}const $4=/#/g,m7=/&/g,f7=/\//g,M7=/=/g,j7=/\?/g,U4=/\+/g,D7=/%5B/g,x7=/%5D/g,W4=/%5E/g,L7=/%60/g,z4=/%7B/g,H7=/%7C/g,q4=/%7D/g,V7=/%20/g;function Yt(e){return e==null?"":encodeURI(""+e).replace(H7,"|").replace(D7,"[").replace(x7,"]")}function Z7(e){return Yt(e).replace(z4,"{").replace(q4,"}").replace(W4,"^")}function ft(e){return Yt(e).replace(U4,"%2B").replace(V7,"+").replace($4,"%23").replace(m7,"%26").replace(L7,"`").replace(z4,"{").replace(q4,"}").replace(W4,"^")}function _7(e){return ft(e).replace(M7,"%3D")}function y7(e){return Yt(e).replace($4,"%23").replace(j7,"%3F")}function B7(e){return y7(e).replace(f7,"%2F")}function X3(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const b7=/\/$/,E7=e=>e.replace(b7,"");function We(e,t,o="/"){let n,r={},i="",s="";const d=t.indexOf("#");let l=t.indexOf("?");return l=d>=0&&l>d?-1:l,l>=0&&(n=t.slice(0,l),i=t.slice(l,d>0?d:t.length),r=e(i.slice(1))),d>=0&&(n=n||t.slice(0,d),s=t.slice(d,t.length)),n=P7(n??t,o),{fullPath:n+i+s,path:n,query:r,hash:X3(s)}}function S7(e,t){const o=t.query?e(t.query):"";return t.path+(o&&"?")+o+(t.hash||"")}function cn(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function A7(e,t,o){const n=t.matched.length-1,r=o.matched.length-1;return n>-1&&n===r&&g3(t.matched[n],o.matched[r])&&K4(t.params,o.params)&&e(t.query)===e(o.query)&&t.hash===o.hash}function g3(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function K4(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var o in e)if(!I7(e[o],t[o]))return!1;return!0}function I7(e,t){return G2(e)?gn(e,t):G2(t)?gn(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function gn(e,t){return G2(t)?e.length===t.length&&e.every((o,n)=>o===t[n]):e.length===1&&e[0]===t}function P7(e,t){if(e.startsWith("/"))return e;if(!e)return t;const o=t.split("/"),n=e.split("/"),r=n[n.length-1];(r===".."||r===".")&&n.push("");let i=o.length-1,s,d;for(s=0;s1&&i--;else break;return o.slice(0,i).join("/")+"/"+n.slice(s).join("/")}const y0={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let Mt=function(e){return e.pop="pop",e.push="push",e}({}),ze=function(e){return e.back="back",e.forward="forward",e.unknown="",e}({});function O7(e){if(!e)if(i3){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),E7(e)}const T7=/^[^#]+#/;function R7(e,t){return e.replace(T7,"#")+t}function F7(e,t){const o=document.documentElement.getBoundingClientRect(),n=e.getBoundingClientRect();return{behavior:t.behavior,left:n.left-o.left-(t.left||0),top:n.top-o.top-(t.top||0)}}const ue=()=>({left:window.scrollX,top:window.scrollY});function N7(e){let t;if("el"in e){const o=e.el,n=typeof o=="string"&&o.startsWith("#"),r=typeof o=="string"?n?document.getElementById(o.slice(1)):document.querySelector(o):o;if(!r)return;t=F7(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function vn(e,t){return(history.state?history.state.position-t:-1)+e}const jt=new Map;function $7(e,t){jt.set(e,t)}function U7(e){const t=jt.get(e);return jt.delete(e),t}function W7(e){return typeof e=="string"||e&&typeof e=="object"}function G4(e){return typeof e=="string"||typeof e=="symbol"}let I1=function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e}({});const J4=Symbol("");I1.MATCHER_NOT_FOUND+"",I1.NAVIGATION_GUARD_REDIRECT+"",I1.NAVIGATION_ABORTED+"",I1.NAVIGATION_CANCELLED+"",I1.NAVIGATION_DUPLICATED+"";function v3(e,t){return D1(new Error,{type:e,[J4]:!0},t)}function a0(e,t){return e instanceof Error&&J4 in e&&(t==null||!!(e.type&t))}const z7=["params","query","hash"];function q7(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const o of z7)o in e&&(t[o]=e[o]);return JSON.stringify(t,null,2)}function K7(e){const t={};if(e===""||e==="?")return t;const o=(e[0]==="?"?e.slice(1):e).split("&");for(let n=0;nr&&ft(r)):[n&&ft(n)]).forEach(r=>{r!==void 0&&(t+=(t.length?"&":"")+o,r!=null&&(t+="="+r))})}return t}function G7(e){const t={};for(const o in e){const n=e[o];n!==void 0&&(t[o]=G2(n)?n.map(r=>r==null?null:""+r):n==null?n:""+n)}return t}const Y4=Symbol(""),fn=Symbol(""),pe=Symbol(""),Qt=Symbol(""),Dt=Symbol("");function Z3(){let e=[];function t(n){return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}function o(){e=[]}return{add:t,list:()=>e.slice(),reset:o}}function J7(e,t,o){const n=()=>{e[t].delete(o)};r9(n),o9(n),ne(()=>{e[t].add(o)}),e[t].add(o)}function ma(e){const t=d2(Y4,{}).value;t&&J7(t,"leaveGuards",e)}function A0(e,t,o,n,r,i=s=>s()){const s=n&&(n.enterCallbacks[r]=n.enterCallbacks[r]||[]);return()=>new Promise((d,l)=>{const h=w=>{w===!1?l(v3(I1.NAVIGATION_ABORTED,{from:o,to:t})):w instanceof Error?l(w):W7(w)?l(v3(I1.NAVIGATION_GUARD_REDIRECT,{from:t,to:w})):(s&&n.enterCallbacks[r]===s&&typeof w=="function"&&s.push(w),d())},u=i(()=>e.call(n&&n.instances[r],t,o,h));let p=Promise.resolve(u);e.length<3&&(p=p.then(h)),p.catch(w=>l(w))})}function qe(e,t,o,n,r=i=>i()){const i=[];for(const s of e)for(const d in s.components){let l=s.components[d];if(!(t!=="beforeRouteEnter"&&!s.instances[d]))if(N4(l)){const h=(l.__vccOpts||l)[t];h&&i.push(A0(h,o,n,s,d,r))}else{let h=l();i.push(()=>h.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${d}" at "${s.path}"`);const p=v7(u)?u.default:u;s.mods[d]=u,s.components[d]=p;const w=(p.__vccOpts||p)[t];return w&&A0(w,o,n,s,d,r)()}))}}return i}function Y7(e,t){const o=[],n=[],r=[],i=Math.max(t.matched.length,e.matched.length);for(let s=0;sg3(h,d))?n.push(d):o.push(d));const l=e.matched[s];l&&(t.matched.find(h=>g3(h,l))||r.push(l))}return[o,n,r]}/*! + */const Je=typeof document<"u";function l4(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function q8(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&l4(e.default)}const j1=Object.assign;function eo(e,t){const n={};for(const o in t){const r=t[o];n[o]=B2(r)?r.map(e):e(r)}return n}const Nt=()=>{},B2=Array.isArray;function K0(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}const d4=/#/g,U8=/&/g,z8=/\//g,W8=/=/g,G8=/\?/g,a4=/\+/g,K8=/%5B/g,Y8=/%5D/g,k4=/%5E/g,Q8=/%60/g,u4=/%7B/g,J8=/%7C/g,h4=/%7D/g,X8=/%20/g;function _r(e){return e==null?"":encodeURI(""+e).replace(J8,"|").replace(K8,"[").replace(Y8,"]")}function ea(e){return _r(e).replace(u4,"{").replace(h4,"}").replace(k4,"^")}function Fo(e){return _r(e).replace(a4,"%2B").replace(X8,"+").replace(d4,"%23").replace(U8,"%26").replace(Q8,"`").replace(u4,"{").replace(h4,"}").replace(k4,"^")}function ta(e){return Fo(e).replace(W8,"%3D")}function na(e){return _r(e).replace(d4,"%23").replace(G8,"%3F")}function oa(e){return na(e).replace(z8,"%2F")}function n9(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const ra=/\/$/,ia=e=>e.replace(ra,"");function to(e,t,n="/"){let o,r={},i="",s="";const l=t.indexOf("#");let d=t.indexOf("?");return d=l>=0&&d>l?-1:d,d>=0&&(o=t.slice(0,d),i=t.slice(d,l>0?l:t.length),r=e(i.slice(1))),l>=0&&(o=o||t.slice(0,l),s=t.slice(l,t.length)),o=aa(o??t,n),{fullPath:o+i+s,path:o,query:r,hash:n9(s)}}function sa(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Y0(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function la(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&ut(t.matched[o],n.matched[r])&&p4(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function ut(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function p4(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!da(e[n],t[n]))return!1;return!0}function da(e,t){return B2(e)?Q0(e,t):B2(t)?Q0(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function Q0(e,t){return B2(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function aa(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/"),r=o[o.length-1];(r===".."||r===".")&&o.push("");let i=n.length-1,s,l;for(s=0;s1&&i--;else break;return n.slice(0,i).join("/")+"/"+o.slice(s).join("/")}const ce={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let No=function(e){return e.pop="pop",e.push="push",e}({}),no=function(e){return e.back="back",e.forward="forward",e.unknown="",e}({});function ka(e){if(!e)if(Je){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),ia(e)}const ua=/^[^#]+#/;function ha(e,t){return e.replace(ua,"#")+t}function pa(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}const On=()=>({left:window.scrollX,top:window.scrollY});function ca(e){let t;if("el"in e){const n=e.el,o=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=pa(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function J0(e,t){return(history.state?history.state.position-t:-1)+e}const qo=new Map;function wa(e,t){qo.set(e,t)}function Ca(e){const t=qo.get(e);return qo.delete(e),t}function ga(e){return typeof e=="string"||e&&typeof e=="object"}function c4(e){return typeof e=="string"||typeof e=="symbol"}let S1=function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e}({});const w4=Symbol("");S1.MATCHER_NOT_FOUND+"",S1.NAVIGATION_GUARD_REDIRECT+"",S1.NAVIGATION_ABORTED+"",S1.NAVIGATION_CANCELLED+"",S1.NAVIGATION_DUPLICATED+"";function ht(e,t){return j1(new Error,{type:e,[w4]:!0},t)}function W2(e,t){return e instanceof Error&&w4 in e&&(t==null||!!(e.type&t))}const va=["params","query","hash"];function fa(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const n of va)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function ma(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let o=0;or&&Fo(r)):[o&&Fo(o)]).forEach(r=>{r!==void 0&&(t+=(t.length?"&":"")+n,r!=null&&(t+="="+r))})}return t}function Ma(e){const t={};for(const n in e){const o=e[n];o!==void 0&&(t[n]=B2(o)?o.map(r=>r==null?null:""+r):o==null?o:""+o)}return t}const ja=Symbol(""),ei=Symbol(""),An=Symbol(""),Br=Symbol(""),Uo=Symbol("");function Dt(){let e=[];function t(o){return e.push(o),()=>{const r=e.indexOf(o);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function fe(e,t,n,o,r,i=s=>s()){const s=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise((l,d)=>{const a=h=>{h===!1?d(ht(S1.NAVIGATION_ABORTED,{from:n,to:t})):h instanceof Error?d(h):ga(h)?d(ht(S1.NAVIGATION_GUARD_REDIRECT,{from:t,to:h})):(s&&o.enterCallbacks[r]===s&&typeof h=="function"&&s.push(h),l())},k=i(()=>e.call(o&&o.instances[r],t,n,a));let u=Promise.resolve(k);e.length<3&&(u=u.then(a)),u.catch(h=>d(h))})}function oo(e,t,n,o,r=i=>i()){const i=[];for(const s of e)for(const l in s.components){let d=s.components[l];if(!(t!=="beforeRouteEnter"&&!s.instances[l]))if(l4(d)){const a=(d.__vccOpts||d)[t];a&&i.push(fe(a,n,o,s,l,r))}else{let a=d();i.push(()=>a.then(k=>{if(!k)throw new Error(`Couldn't resolve component "${l}" at "${s.path}"`);const u=q8(k)?k.default:k;s.mods[l]=k,s.components[l]=u;const h=(u.__vccOpts||u)[t];return h&&fe(h,n,o,s,l,r)()}))}}return i}function xa(e,t){const n=[],o=[],r=[],i=Math.max(t.matched.length,e.matched.length);for(let s=0;sut(a,l))?o.push(l):n.push(l));const d=e.matched[s];d&&(t.matched.find(a=>ut(a,d))||r.push(d))}return[n,o,r]}/*! * vue-router v4.6.4 * (c) 2025 Eduardo San Martin Morote * @license MIT - */let Q7=()=>location.protocol+"//"+location.host;function Q4(e,t){const{pathname:o,search:n,hash:r}=t,i=e.indexOf("#");if(i>-1){let s=r.includes(e.slice(i))?e.slice(i).length:1,d=r.slice(s);return d[0]!=="/"&&(d="/"+d),cn(d,"")}return cn(o,e)+n+r}function X7(e,t,o,n){let r=[],i=[],s=null;const d=({state:w})=>{const v=Q4(e,location),f=o.value,x=t.value;let S=0;if(w){if(o.value=v,t.value=w,s&&s===f){s=null;return}S=x?w.position-x.position:0}else n(v);r.forEach(O=>{O(o.value,f,{delta:S,type:Mt.pop,direction:S?S>0?ze.forward:ze.back:ze.unknown})})};function l(){s=o.value}function h(w){r.push(w);const v=()=>{const f=r.indexOf(w);f>-1&&r.splice(f,1)};return i.push(v),v}function u(){if(document.visibilityState==="hidden"){const{history:w}=window;if(!w.state)return;w.replaceState(D1({},w.state,{scroll:ue()}),"")}}function p(){for(const w of i)w();i=[],window.removeEventListener("popstate",d),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",d),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:l,listen:h,destroy:p}}function Mn(e,t,o,n=!1,r=!1){return{back:e,current:t,forward:o,replaced:n,position:window.history.length,scroll:r?ue():null}}function e8(e){const{history:t,location:o}=window,n={value:Q4(e,o)},r={value:t.state};r.value||i(n.value,{back:null,current:n.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(l,h,u){const p=e.indexOf("#"),w=p>-1?(o.host&&document.querySelector("base")?e:e.slice(p))+l:Q7()+e+l;try{t[u?"replaceState":"pushState"](h,"",w),r.value=h}catch(v){console.error(v),o[u?"replace":"assign"](w)}}function s(l,h){i(l,D1({},t.state,Mn(r.value.back,l,r.value.forward,!0),h,{position:r.value.position}),!0),n.value=l}function d(l,h){const u=D1({},r.value,t.state,{forward:l,scroll:ue()});i(u.current,u,!0),i(l,D1({},Mn(n.value,l,null),{position:u.position+1},h),!1),n.value=l}return{location:n,state:r,push:d,replace:s}}function t8(e){e=O7(e);const t=e8(e),o=X7(e,t.state,t.location,t.replace);function n(i,s=!0){s||o.pauseListeners(),history.go(i)}const r=D1({location:"",base:e,go:n,createHref:R7.bind(null,e)},t,o);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}let G0=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var N1=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e}(N1||{});const o8={type:G0.Static,value:""},n8=/[a-zA-Z0-9_]/;function r8(e){if(!e)return[[]];if(e==="/")return[[o8]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(v){throw new Error(`ERR (${o})/"${h}": ${v}`)}let o=N1.Static,n=o;const r=[];let i;function s(){i&&r.push(i),i=[]}let d=0,l,h="",u="";function p(){h&&(o===N1.Static?i.push({type:G0.Static,value:h}):o===N1.Param||o===N1.ParamRegExp||o===N1.ParamRegExpEnd?(i.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${h}) must be alone in its segment. eg: '/:ids+.`),i.push({type:G0.Param,value:h,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),h="")}function w(){h+=l}for(;dt.length?t.length===1&&t[0]===k2.Static+k2.Segment?1:-1:0}function X4(e,t){let o=0;const n=e.score,r=t.score;for(;o0&&t[t.length-1]<0}const a8={strict:!1,end:!0,sensitive:!1};function k8(e,t,o){const n=d8(r8(e.path),o),r=D1(n,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function h8(e,t){const o=[],n=new Map;t=Cn(a8,t);function r(p){return n.get(p)}function i(p,w,v){const f=!v,x=Ln(p);x.aliasOf=v&&v.record;const S=Cn(t,p),O=[x];if("alias"in p){const L=typeof p.alias=="string"?[p.alias]:p.alias;for(const Z of L)O.push(Ln(D1({},x,{components:v?v.record.components:x.components,path:Z,aliasOf:v?v.record:x})))}let D,H;for(const L of O){const{path:Z}=L;if(w&&Z[0]!=="/"){const T=w.record.path,_=T[T.length-1]==="/"?"":"/";L.path=w.record.path+(Z&&_+Z)}if(D=k8(L,w,S),v?v.alias.push(D):(H=H||D,H!==D&&H.alias.push(D),f&&p.name&&!Hn(D)&&s(p.name)),er(D)&&l(D),x.children){const T=x.children;for(let _=0;_{s(H)}:N3}function s(p){if(G4(p)){const w=n.get(p);w&&(n.delete(p),o.splice(o.indexOf(w),1),w.children.forEach(s),w.alias.forEach(s))}else{const w=o.indexOf(p);w>-1&&(o.splice(w,1),p.record.name&&n.delete(p.record.name),p.children.forEach(s),p.alias.forEach(s))}}function d(){return o}function l(p){const w=w8(p,o);o.splice(w,0,p),p.record.name&&!Hn(p)&&n.set(p.record.name,p)}function h(p,w){let v,f={},x,S;if("name"in p&&p.name){if(v=n.get(p.name),!v)throw v3(I1.MATCHER_NOT_FOUND,{location:p});S=v.record.name,f=D1(xn(w.params,v.keys.filter(H=>!H.optional).concat(v.parent?v.parent.keys.filter(H=>H.optional):[]).map(H=>H.name)),p.params&&xn(p.params,v.keys.map(H=>H.name))),x=v.stringify(f)}else if(p.path!=null)x=p.path,v=o.find(H=>H.re.test(x)),v&&(f=v.parse(x),S=v.record.name);else{if(v=w.name?n.get(w.name):o.find(H=>H.re.test(w.path)),!v)throw v3(I1.MATCHER_NOT_FOUND,{location:p,currentLocation:w});S=v.record.name,f=D1({},w.params,p.params),x=v.stringify(f)}const O=[];let D=v;for(;D;)O.unshift(D.record),D=D.parent;return{name:S,path:x,params:f,matched:O,meta:p8(O)}}e.forEach(p=>i(p));function u(){o.length=0,n.clear()}return{addRoute:i,resolve:h,removeRoute:s,clearRoutes:u,getRoutes:d,getRecordMatcher:r}}function xn(e,t){const o={};for(const n of t)n in e&&(o[n]=e[n]);return o}function Ln(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:u8(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function u8(e){const t={},o=e.props||!1;if("component"in e)t.default=o;else for(const n in e.components)t[n]=typeof o=="object"?o[n]:o;return t}function Hn(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function p8(e){return e.reduce((t,o)=>D1(t,o.meta),{})}function w8(e,t){let o=0,n=t.length;for(;o!==n;){const i=o+n>>1;X4(e,t[i])<0?n=i:o=i+1}const r=C8(e);return r&&(n=t.lastIndexOf(r,n-1)),n}function C8(e){let t=e;for(;t=t.parent;)if(er(t)&&X4(e,t)===0)return t}function er({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Vn(e){const t=d2(pe),o=d2(Qt),n=B1(()=>{const l=W1(e.to);return t.resolve(l)}),r=B1(()=>{const{matched:l}=n.value,{length:h}=l,u=l[h-1],p=o.matched;if(!u||!p.length)return-1;const w=p.findIndex(g3.bind(null,u));if(w>-1)return w;const v=Zn(l[h-2]);return h>1&&Zn(u)===v&&p[p.length-1].path!==v?p.findIndex(g3.bind(null,l[h-2])):w}),i=B1(()=>r.value>-1&&f8(o.params,n.value.params)),s=B1(()=>r.value>-1&&r.value===o.matched.length-1&&K4(o.params,n.value.params));function d(l={}){if(m8(l)){const h=t[W1(e.replace)?"replace":"push"](W1(e.to)).catch(N3);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>h),h}return Promise.resolve()}return{route:n,href:B1(()=>n.value.href),isActive:i,isExactActive:s,navigate:d}}function c8(e){return e.length===1?e[0]:e}const g8=q1({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:Vn,setup(e,{slots:t}){const o=y2(Vn(e)),{options:n}=d2(pe),r=B1(()=>({[_n(e.activeClass,n.linkActiveClass,"router-link-active")]:o.isActive,[_n(e.exactActiveClass,n.linkExactActiveClass,"router-link-exact-active")]:o.isExactActive}));return()=>{const i=t.default&&c8(t.default(o));return e.custom?i:Q3("a",{"aria-current":o.isExactActive?e.ariaCurrentValue:null,href:o.href,onClick:o.navigate,class:r.value},i)}}}),v8=g8;function m8(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function f8(e,t){for(const o in t){const n=t[o],r=e[o];if(typeof n=="string"){if(n!==r)return!1}else if(!G2(r)||r.length!==n.length||n.some((i,s)=>i.valueOf()!==r[s].valueOf()))return!1}return!0}function Zn(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const _n=(e,t,o)=>e??t??o,M8=q1({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:o}){const n=d2(Dt),r=B1(()=>e.route||n.value),i=d2(fn,0),s=B1(()=>{let h=W1(i);const{matched:u}=r.value;let p;for(;(p=u[h])&&!p.components;)h++;return h}),d=B1(()=>r.value.matched[s.value]);a3(fn,B1(()=>s.value+1)),a3(Y4,d),a3(Dt,r);const l=g1();return H1(()=>[l.value,d.value,e.name],([h,u,p],[w,v,f])=>{u&&(u.instances[p]=h,v&&v!==u&&h&&h===w&&(u.leaveGuards.size||(u.leaveGuards=v.leaveGuards),u.updateGuards.size||(u.updateGuards=v.updateGuards))),h&&u&&(!v||!g3(u,v)||!w)&&(u.enterCallbacks[p]||[]).forEach(x=>x(h))},{flush:"post"}),()=>{const h=r.value,u=e.name,p=d.value,w=p&&p.components[u];if(!w)return yn(o.default,{Component:w,route:h});const v=p.props[u],f=v?v===!0?h.params:typeof v=="function"?v(h):v:null,S=Q3(w,D1({},f,t,{onVnodeUnmounted:O=>{O.component.isUnmounted&&(p.instances[u]=null)},ref:l}));return yn(o.default,{Component:S,route:h})||S}}});function yn(e,t){if(!e)return null;const o=e(t);return o.length===1?o[0]:o}const j8=M8;function D8(e){const t=h8(e.routes,e),o=e.parseQuery||K7,n=e.stringifyQuery||mn,r=e.history,i=Z3(),s=Z3(),d=Z3(),l=Ni(y0);let h=y0;i3&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Ue.bind(null,I=>""+I),p=Ue.bind(null,B7),w=Ue.bind(null,X3);function v(I,Y){let K,o1;return G4(I)?(K=t.getRecordMatcher(I),o1=Y):o1=I,t.addRoute(o1,K)}function f(I){const Y=t.getRecordMatcher(I);Y&&t.removeRoute(Y)}function x(){return t.getRoutes().map(I=>I.record)}function S(I){return!!t.getRecordMatcher(I)}function O(I,Y){if(Y=D1({},Y||l.value),typeof I=="string"){const j=We(o,I,Y.path),y=t.resolve({path:j.path},Y),P=r.createHref(j.fullPath);return D1(j,y,{params:w(y.params),hash:X3(j.hash),redirectedFrom:void 0,href:P})}let K;if(I.path!=null)K=D1({},I,{path:We(o,I.path,Y.path).path});else{const j=D1({},I.params);for(const y in j)j[y]==null&&delete j[y];K=D1({},I,{params:p(j)}),Y.params=p(Y.params)}const o1=t.resolve(K,Y),a1=I.hash||"";o1.params=u(w(o1.params));const g=S7(n,D1({},I,{hash:Z7(a1),path:o1.path})),m=r.createHref(g);return D1({fullPath:g,hash:a1,query:n===mn?G7(I.query):I.query||{}},o1,{redirectedFrom:void 0,href:m})}function D(I){return typeof I=="string"?We(o,I,l.value.path):D1({},I)}function H(I,Y){if(h!==I)return v3(I1.NAVIGATION_CANCELLED,{from:Y,to:I})}function L(I){return _(I)}function Z(I){return L(D1(D(I),{replace:!0}))}function T(I,Y){const K=I.matched[I.matched.length-1];if(K&&K.redirect){const{redirect:o1}=K;let a1=typeof o1=="function"?o1(I,Y):o1;return typeof a1=="string"&&(a1=a1.includes("?")||a1.includes("#")?a1=D(a1):{path:a1},a1.params={}),D1({query:I.query,hash:I.hash,params:a1.path!=null?{}:I.params},a1)}}function _(I,Y){const K=h=O(I),o1=l.value,a1=I.state,g=I.force,m=I.replace===!0,j=T(K,o1);if(j)return _(D1(D(j),{state:typeof j=="object"?D1({},a1,j.state):a1,force:g,replace:m}),Y||K);const y=K;y.redirectedFrom=Y;let P;return!g&&A7(n,o1,K)&&(P=v3(I1.NAVIGATION_DUPLICATED,{to:y,from:o1}),D2(o1,o1,!0,!1)),(P?Promise.resolve(P):q(y,o1)).catch(B=>a0(B)?a0(B,I1.NAVIGATION_GUARD_REDIRECT)?B:E2(B):w1(B,y,o1)).then(B=>{if(B){if(a0(B,I1.NAVIGATION_GUARD_REDIRECT))return _(D1({replace:m},D(B.to),{state:typeof B.to=="object"?D1({},a1,B.to.state):a1,force:g}),Y||y)}else B=F(y,o1,!0,m,a1);return r1(y,o1,B),B})}function U(I,Y){const K=H(I,Y);return K?Promise.reject(K):Promise.resolve()}function A(I){const Y=i0.values().next().value;return Y&&typeof Y.runWithContext=="function"?Y.runWithContext(I):I()}function q(I,Y){let K;const[o1,a1,g]=Y7(I,Y);K=qe(o1.reverse(),"beforeRouteLeave",I,Y);for(const j of o1)j.leaveGuards.forEach(y=>{K.push(A0(y,I,Y))});const m=U.bind(null,I,Y);return K.push(m),X1(K).then(()=>{K=[];for(const j of i.list())K.push(A0(j,I,Y));return K.push(m),X1(K)}).then(()=>{K=qe(a1,"beforeRouteUpdate",I,Y);for(const j of a1)j.updateGuards.forEach(y=>{K.push(A0(y,I,Y))});return K.push(m),X1(K)}).then(()=>{K=[];for(const j of g)if(j.beforeEnter)if(G2(j.beforeEnter))for(const y of j.beforeEnter)K.push(A0(y,I,Y));else K.push(A0(j.beforeEnter,I,Y));return K.push(m),X1(K)}).then(()=>(I.matched.forEach(j=>j.enterCallbacks={}),K=qe(g,"beforeRouteEnter",I,Y,A),K.push(m),X1(K))).then(()=>{K=[];for(const j of s.list())K.push(A0(j,I,Y));return K.push(m),X1(K)}).catch(j=>a0(j,I1.NAVIGATION_CANCELLED)?j:Promise.reject(j))}function r1(I,Y,K){d.list().forEach(o1=>A(()=>o1(I,Y,K)))}function F(I,Y,K,o1,a1){const g=H(I,Y);if(g)return g;const m=Y===y0,j=i3?history.state:{};K&&(o1||m?r.replace(I.fullPath,D1({scroll:m&&j&&j.scroll},a1)):r.push(I.fullPath,a1)),l.value=I,D2(I,Y,K,m),E2()}let d1;function v1(){d1||(d1=r.listen((I,Y,K)=>{if(!S2.listening)return;const o1=O(I),a1=T(o1,S2.currentRoute.value);if(a1){_(D1(a1,{replace:!0,force:!0}),o1).catch(N3);return}h=o1;const g=l.value;i3&&$7(vn(g.fullPath,K.delta),ue()),q(o1,g).catch(m=>a0(m,I1.NAVIGATION_ABORTED|I1.NAVIGATION_CANCELLED)?m:a0(m,I1.NAVIGATION_GUARD_REDIRECT)?(_(D1(D(m.to),{force:!0}),o1).then(j=>{a0(j,I1.NAVIGATION_ABORTED|I1.NAVIGATION_DUPLICATED)&&!K.delta&&K.type===Mt.pop&&r.go(-1,!1)}).catch(N3),Promise.reject()):(K.delta&&r.go(-K.delta,!1),w1(m,o1,g))).then(m=>{m=m||F(o1,g,!1),m&&(K.delta&&!a0(m,I1.NAVIGATION_CANCELLED)?r.go(-K.delta,!1):K.type===Mt.pop&&a0(m,I1.NAVIGATION_ABORTED|I1.NAVIGATION_DUPLICATED)&&r.go(-1,!1)),r1(o1,g,m)}).catch(N3)}))}let L1=Z3(),h1=Z3(),i1;function w1(I,Y,K){E2(I);const o1=h1.list();return o1.length?o1.forEach(a1=>a1(I,Y,K)):console.error(I),Promise.reject(I)}function P1(){return i1&&l.value!==y0?Promise.resolve():new Promise((I,Y)=>{L1.add([I,Y])})}function E2(I){return i1||(i1=!I,v1(),L1.list().forEach(([Y,K])=>I?K(I):Y()),L1.reset()),I}function D2(I,Y,K,o1){const{scrollBehavior:a1}=e;if(!i3||!a1)return Promise.resolve();const g=!K&&U7(vn(I.fullPath,0))||(o1||!K)&&history.state&&history.state.scroll||null;return K2().then(()=>a1(I,Y,g)).then(m=>m&&N7(m)).catch(m=>w1(m,I,Y))}const K1=I=>r.go(I);let V0;const i0=new Set,S2={currentRoute:l,listening:!0,addRoute:v,removeRoute:f,clearRoutes:t.clearRoutes,hasRoute:S,getRoutes:x,resolve:O,options:e,push:L,replace:Z,go:K1,back:()=>K1(-1),forward:()=>K1(1),beforeEach:i.add,beforeResolve:s.add,afterEach:d.add,onError:h1.add,isReady:P1,install(I){I.component("RouterLink",v8),I.component("RouterView",j8),I.config.globalProperties.$router=S2,Object.defineProperty(I.config.globalProperties,"$route",{enumerable:!0,get:()=>W1(l)}),i3&&!V0&&l.value===y0&&(V0=!0,L(r.location).catch(o1=>{}));const Y={};for(const o1 in y0)Object.defineProperty(Y,o1,{get:()=>l.value[o1],enumerable:!0});I.provide(pe,S2),I.provide(Qt,I5(Y)),I.provide(Dt,l);const K=I.unmount;i0.add(I),I.unmount=function(){i0.delete(I),i0.size<1&&(h=y0,d1&&d1(),d1=null,l.value=y0,V0=!1,i1=!1),K()}}};function X1(I){return I.reduce((Y,K)=>Y.then(()=>A(K)),Promise.resolve())}return S2}function x8(){return d2(pe)}function fa(e){return d2(Qt)}var L8=Object.defineProperty,H8=Object.defineProperties,V8=Object.getOwnPropertyDescriptors,R9=Object.getOwnPropertySymbols,tr=Object.prototype.hasOwnProperty,or=Object.prototype.propertyIsEnumerable,xt=(e,t,o)=>t in e?L8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,G1=(e,t)=>{for(var o in t||(t={}))tr.call(t,o)&&xt(e,o,t[o]);if(R9)for(var o of R9(t))or.call(t,o)&&xt(e,o,t[o]);return e},w2=(e,t)=>H8(e,V8(t)),nr=(e,t)=>{var o={};for(var n in e)tr.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&R9)for(var n of R9(e))t.indexOf(n)<0&&or.call(e,n)&&(o[n]=e[n]);return o},k1=(e,t,o)=>xt(e,typeof t!="symbol"?t+"":t,o),p1=(e,t,o)=>new Promise((n,r)=>{var i=l=>{try{d(o.next(l))}catch(h){r(h)}},s=l=>{try{d(o.throw(l))}catch(h){r(h)}},d=l=>l.done?n(l.value):Promise.resolve(l.value).then(i,s);d((o=o.apply(e,t)).next())}),Z8=class{requestAnimationFrame(e){return requestAnimationFrame(e)}cancelAnimationFrame(e){cancelAnimationFrame(e)}},_8=class{constructor(){k1(this,"_lastHandleId",0),k1(this,"_lastImmediate",null)}requestAnimationFrame(e){return this._lastHandleId>=Number.MAX_SAFE_INTEGER&&(this._lastHandleId=0),this._lastHandleId+=1,this._lastImmediate=setImmediate(()=>{e(Date.now())}),this._lastHandleId}cancelAnimationFrame(e){this._lastImmediate&&clearImmediate(this._lastImmediate)}},y8=class{constructor(){k1(this,"_strategy"),this._strategy=typeof requestAnimationFrame=="function"?new Z8:new _8}requestAnimationFrame(e){return this._strategy.requestAnimationFrame(e)}cancelAnimationFrame(e){this._strategy.cancelAnimationFrame(e)}},o2=typeof window<"u"&&typeof window.document<"u",Ke=new Uint8Array([80,75,3,4]),B8=["v","ip","op","layers","fr","w","h"],rr="0.36.1",ir="@lottiefiles/dotlottie-web",b8=.75,E8=(()=>{var e,t=typeof document<"u"?(e=document.currentScript)==null?void 0:e.src:void 0;return function(o={}){var n,r=o,i,s,d=new Promise((a,k)=>{i=a,s=k}),l=Object.assign({},r),h="./this.program",u="",p;typeof document<"u"&&document.currentScript&&(u=document.currentScript.src),t&&(u=t),u.startsWith("blob:")?u="":u=u.substr(0,u.replace(/[?#].*/,"").lastIndexOf("/")+1),p=a=>fetch(a,{credentials:"same-origin"}).then(k=>k.ok?k.arrayBuffer():Promise.reject(Error(k.status+" : "+k.url)));var w=r.print||console.log.bind(console),v=r.printErr||console.error.bind(console);Object.assign(r,l),l=null,r.thisProgram&&(h=r.thisProgram);var f=r.wasmBinary,x,S=!1,O,D,H,L,Z,T,_,U,A;function q(){var a=x.buffer;r.HEAP8=D=new Int8Array(a),r.HEAP16=L=new Int16Array(a),r.HEAPU8=H=new Uint8Array(a),r.HEAPU16=Z=new Uint16Array(a),r.HEAP32=T=new Int32Array(a),r.HEAPU32=_=new Uint32Array(a),r.HEAPF32=U=new Float32Array(a),r.HEAPF64=A=new Float64Array(a)}var r1=[],F=[],d1=[];function v1(){var a=r.preRun.shift();r1.unshift(a)}var L1=0,h1=null;function i1(a){var k;throw(k=r.onAbort)==null||k.call(r,a),a="Aborted("+a+")",v(a),S=!0,a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info."),s(a),a}var w1=a=>a.startsWith("data:application/octet-stream;base64,"),P1;function E2(a){if(a==P1&&f)return new Uint8Array(f);throw"both async and sync fetching of the wasm failed"}function D2(a){return f?Promise.resolve().then(()=>E2(a)):p(a).then(k=>new Uint8Array(k),()=>E2(a))}function K1(a,k,C){return D2(a).then(c=>WebAssembly.instantiate(c,k)).then(C,c=>{v(`failed to asynchronously prepare wasm: ${c}`),i1(c)})}function V0(a,k){var C=P1;return f||typeof WebAssembly.instantiateStreaming!="function"||w1(C)||typeof fetch!="function"?K1(C,a,k):fetch(C,{credentials:"same-origin"}).then(c=>WebAssembly.instantiateStreaming(c,a).then(k,function(M){return v(`wasm streaming compile failed: ${M}`),v("falling back to ArrayBuffer instantiation"),K1(C,a,k)}))}function i0(a){this.name="ExitStatus",this.message=`Program terminated with exit(${a})`,this.status=a}var S2=a=>{for(;0{var c=k+C;for(C=k;a[C]&&!(C>=c);)++C;if(16M?c+=String.fromCharCode(M):(M-=65536,c+=String.fromCharCode(55296|M>>10,56320|M&1023))}}else c+=String.fromCharCode(M)}return c};class K{constructor(k){this.Ca=k-24}}var o1=0,a1=(a,k,C)=>{var c=H;if(0=V){var R=a.charCodeAt(++M);V=65536+((V&1023)<<10)|R&1023}if(127>=V){if(k>=C)break;c[k++]=V}else{if(2047>=V){if(k+1>=C)break;c[k++]=192|V>>6}else{if(65535>=V){if(k+2>=C)break;c[k++]=224|V>>12}else{if(k+3>=C)break;c[k++]=240|V>>18,c[k++]=128|V>>12&63}c[k++]=128|V>>6&63}c[k++]=128|V&63}}c[k]=0}},g={},m=a=>{for(;a.length;){var k=a.pop();a.pop()(k)}};function j(a){return this.fromWireType(_[a>>2])}var y={},P={},B={},z,N=(a,k,C)=>{function c(E){if(E=C(E),E.length!==a.length)throw new z("Mismatched type converter count");for(var J=0;JB[E]=k);var M=Array(k.length),V=[],R=0;k.forEach((E,J)=>{P.hasOwnProperty(E)?M[J]=P[E]:(V.push(E),y.hasOwnProperty(E)||(y[E]=[]),y[E].push(()=>{M[J]=P[E],++R,R===V.length&&c(M)}))}),V.length===0&&c(M)},W,b=a=>{for(var k="";H[a];)k+=W[H[a++]];return k},$;function G(a,k,C={}){var c=k.name;if(!a)throw new $(`type "${c}" must have a positive integer typeid pointer`);if(P.hasOwnProperty(a)){if(C.hb)return;throw new $(`Cannot register type '${c}' twice`)}P[a]=k,delete B[a],y.hasOwnProperty(a)&&(k=y[a],delete y[a],k.forEach(M=>M()))}function X(a,k,C={}){return G(a,k,C)}var s1=a=>{throw new $(a.Aa.Da.Ba.name+" instance already deleted")},u1=!1,j1=()=>{},f1=(a,k,C)=>k===C?a:C.Ga===void 0?null:(a=f1(a,k,C.Ga),a===null?null:C.$a(a)),E1={},S1=[],u2=()=>{for(;S1.length;){var a=S1.pop();a.Aa.Ma=!1,a.delete()}},e2,A2={},d9=(a,k)=>{if(k===void 0)throw new $("ptr should not be undefined");for(;a.Ga;)k=a.Pa(k),a=a.Ga;return A2[k]},z1=(a,k)=>{if(!k.Da||!k.Ca)throw new z("makeClassHandle requires ptr and ptrType");if(!!k.Ha!=!!k.Ea)throw new z("Both smartPtrType and smartPtr must be specified");return k.count={value:1},t2(Object.create(a,{Aa:{value:k,writable:!0}}))},t2=a=>typeof FinalizationRegistry>"u"?(t2=k=>k,a):(u1=new FinalizationRegistry(k=>{k=k.Aa,--k.count.value,k.count.value===0&&(k.Ea?k.Ha.Ka(k.Ea):k.Da.Ba.Ka(k.Ca))}),t2=k=>{var C=k.Aa;return C.Ea&&u1.register(k,{Aa:C},k),k},j1=k=>{u1.unregister(k)},t2(a));function N0(){}var Z0=(a,k)=>Object.defineProperty(k,"name",{value:a}),ao=(a,k,C)=>{if(a[k].Fa===void 0){var c=a[k];a[k]=function(...M){if(!a[k].Fa.hasOwnProperty(M.length))throw new $(`Function '${C}' called with an invalid number of arguments (${M.length}) - expects one of (${a[k].Fa})!`);return a[k].Fa[M.length].apply(this,M)},a[k].Fa=[],a[k].Fa[c.Qa]=c}},we=(a,k,C)=>{if(r.hasOwnProperty(a)){if(C===void 0||r[a].Fa!==void 0&&r[a].Fa[C]!==void 0)throw new $(`Cannot register public name '${a}' twice`);if(ao(r,a,a),r.hasOwnProperty(C))throw new $(`Cannot register multiple overloads of a function with the same number of arguments (${C})!`);r[a].Fa[C]=k}else r[a]=k,C!==void 0&&(r[a].qb=C)},Br=a=>{if(a===void 0)return"_unknown";a=a.replace(/[^a-zA-Z0-9_]/g,"$");var k=a.charCodeAt(0);return 48<=k&&57>=k?`_${a}`:a};function br(a,k,C,c,M,V,R,E){this.name=a,this.constructor=k,this.Na=C,this.Ka=c,this.Ga=M,this.bb=V,this.Pa=R,this.$a=E,this.jb=[]}var Ce=(a,k,C)=>{for(;k!==C;){if(!k.Pa)throw new $(`Expected null or instance of ${C.name}, got an instance of ${k.name}`);a=k.Pa(a),k=k.Ga}return a};function Er(a,k){if(k===null){if(this.Ta)throw new $(`null is not a valid ${this.name}`);return 0}if(!k.Aa)throw new $(`Cannot pass "${je(k)}" as a ${this.name}`);if(!k.Aa.Ca)throw new $(`Cannot pass deleted object as a pointer of type ${this.name}`);return Ce(k.Aa.Ca,k.Aa.Da.Ba,this.Ba)}function Sr(a,k){if(k===null){if(this.Ta)throw new $(`null is not a valid ${this.name}`);if(this.Sa){var C=this.Ua();return a!==null&&a.push(this.Ka,C),C}return 0}if(!k||!k.Aa)throw new $(`Cannot pass "${je(k)}" as a ${this.name}`);if(!k.Aa.Ca)throw new $(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.Ra&&k.Aa.Da.Ra)throw new $(`Cannot convert argument of type ${k.Aa.Ha?k.Aa.Ha.name:k.Aa.Da.name} to parameter type ${this.name}`);if(C=Ce(k.Aa.Ca,k.Aa.Da.Ba,this.Ba),this.Sa){if(k.Aa.Ea===void 0)throw new $("Passing raw pointer to smart pointer is illegal");switch(this.ob){case 0:if(k.Aa.Ha===this)C=k.Aa.Ea;else throw new $(`Cannot convert argument of type ${k.Aa.Ha?k.Aa.Ha.name:k.Aa.Da.name} to parameter type ${this.name}`);break;case 1:C=k.Aa.Ea;break;case 2:if(k.Aa.Ha===this)C=k.Aa.Ea;else{var c=k.clone();C=this.kb(C,a9(()=>c.delete())),a!==null&&a.push(this.Ka,C)}break;default:throw new $("Unsupporting sharing policy")}}return C}function Ar(a,k){if(k===null){if(this.Ta)throw new $(`null is not a valid ${this.name}`);return 0}if(!k.Aa)throw new $(`Cannot pass "${je(k)}" as a ${this.name}`);if(!k.Aa.Ca)throw new $(`Cannot pass deleted object as a pointer of type ${this.name}`);if(k.Aa.Da.Ra)throw new $(`Cannot convert argument of type ${k.Aa.Da.name} to parameter type ${this.name}`);return Ce(k.Aa.Ca,k.Aa.Da.Ba,this.Ba)}function f3(a,k,C,c,M,V,R,E,J,Q,n1){this.name=a,this.Ba=k,this.Ta=C,this.Ra=c,this.Sa=M,this.ib=V,this.ob=R,this.Ya=E,this.Ua=J,this.kb=Q,this.Ka=n1,M||k.Ga!==void 0?this.toWireType=Sr:(this.toWireType=c?Er:Ar,this.Ja=null)}var ko=(a,k,C)=>{if(!r.hasOwnProperty(a))throw new z("Replacing nonexistent public symbol");r[a].Fa!==void 0&&C!==void 0?r[a].Fa[C]=k:(r[a]=k,r[a].Qa=C)},x2,Ir=(a,k,C=[])=>(a.includes("j")?(a=a.replace(/p/g,"i"),k=(0,r["dynCall_"+a])(k,...C)):k=x2.get(k)(...C),k),Pr=(a,k)=>(...C)=>Ir(a,k,C),l2=(a,k)=>{a=b(a);var C=a.includes("j")?Pr(a,k):x2.get(k);if(typeof C!="function")throw new $(`unknown function pointer with signature ${a}: ${k}`);return C},ho,uo=a=>{a=Mo(a);var k=b(a);return d0(a),k},l9=(a,k)=>{function C(V){M[V]||P[V]||(B[V]?B[V].forEach(C):(c.push(V),M[V]=!0))}var c=[],M={};throw k.forEach(C),new ho(`${a}: `+c.map(uo).join([", "]))},ce=(a,k)=>{for(var C=[],c=0;c>2]);return C};function Or(a){for(var k=1;kV)throw new $("argTypes array size mismatch! Must at least get return value and 'this' types!");var R=k[1]!==null&&C!==null,E=Or(k),J=k[0].name!=="void",Q=V-2,n1=Array(Q),C1=[],V1=[];return Z0(a,function(...c2){if(V1.length=0,C1.length=R?2:1,C1[0]=M,R){var O1=k[1].toWireType(V1,this);C1[1]=O1}for(var R1=0;R1{a=a.trim();let k=a.indexOf("(");return k!==-1?a.substr(0,k):a},ve=[],s0=[],me=a=>{9{if(!a)throw new $("Cannot use deleted val. handle = "+a);return s0[a]},a9=a=>{switch(a){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:let k=ve.pop()||s0.length;return s0[k]=a,s0[k+1]=1,k}},wo={name:"emscripten::val",fromWireType:a=>{var k=fe(a);return me(a),k},toWireType:(a,k)=>a9(k),Ia:8,readValueFromPointer:j,Ja:null},Tr=(a,k,C)=>{switch(k){case 1:return C?function(c){return this.fromWireType(D[c])}:function(c){return this.fromWireType(H[c])};case 2:return C?function(c){return this.fromWireType(L[c>>1])}:function(c){return this.fromWireType(Z[c>>1])};case 4:return C?function(c){return this.fromWireType(T[c>>2])}:function(c){return this.fromWireType(_[c>>2])};default:throw new TypeError(`invalid integer width (${k}): ${a}`)}},Me=(a,k)=>{var C=P[a];if(C===void 0)throw a=`${k} has unknown type ${uo(a)}`,new $(a);return C},je=a=>{if(a===null)return"null";var k=typeof a;return k==="object"||k==="array"||k==="function"?a.toString():""+a},Rr=(a,k)=>{switch(k){case 4:return function(C){return this.fromWireType(U[C>>2])};case 8:return function(C){return this.fromWireType(A[C>>3])};default:throw new TypeError(`invalid float width (${k}): ${a}`)}},Fr=(a,k,C)=>{switch(k){case 1:return C?c=>D[c]:c=>H[c];case 2:return C?c=>L[c>>1]:c=>Z[c>>1];case 4:return C?c=>T[c>>2]:c=>_[c>>2];default:throw new TypeError(`invalid integer width (${k}): ${a}`)}},Nr=Object.assign({optional:!0},wo),Co=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,$r=(a,k)=>{for(var C=a>>1,c=C+k/2;!(C>=c)&&Z[C];)++C;if(C<<=1,32=k/2);++c){var M=L[a+2*c>>1];if(M==0)break;C+=String.fromCharCode(M)}return C},Ur=(a,k,C)=>{if(C!=null||(C=2147483647),2>C)return 0;C-=2;var c=k;C=C<2*a.length?C/2:a.length;for(var M=0;M>1]=a.charCodeAt(M),k+=2;return L[k>>1]=0,k-c},Wr=a=>2*a.length,zr=(a,k)=>{for(var C=0,c="";!(C>=k/4);){var M=T[a+4*C>>2];if(M==0)break;++C,65536<=M?(M-=65536,c+=String.fromCharCode(55296|M>>10,56320|M&1023)):c+=String.fromCharCode(M)}return c},qr=(a,k,C)=>{if(C!=null||(C=2147483647),4>C)return 0;var c=k;C=c+C-4;for(var M=0;M=V){var R=a.charCodeAt(++M);V=65536+((V&1023)<<10)|R&1023}if(T[k>>2]=V,k+=4,k+4>C)break}return T[k>>2]=0,k-c},Kr=a=>{for(var k=0,C=0;C=c&&++C,k+=4}return k},De=[],Gr=a=>{var k=De.length;return De.push(a),k},Jr=(a,k)=>{for(var C=Array(a),c=0;c>2],"parameter "+c);return C},Yr=Reflect.construct,M3={},co=a=>{if(!(a instanceof i0||a=="unwind"))throw a},xe=0,go=a=>{var k;throw O=a,X1||0{if(!S)try{if(a(),!(X1||0{if(!He){var a={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:h||"./this.program"},k;for(k in Le)Le[k]===void 0?delete a[k]:a[k]=Le[k];var C=[];for(k in a)C.push(`${k}=${a[k]}`);He=C}return He},He,Xr=[null,[],[]],ei=()=>{if(typeof crypto=="object"&&typeof crypto.getRandomValues=="function")return a=>crypto.getRandomValues(a);i1("initRandomDevice")},mo=a=>(mo=ei())(a);z=r.InternalError=class extends Error{constructor(a){super(a),this.name="InternalError"}};for(var fo=Array(256),k9=0;256>k9;++k9)fo[k9]=String.fromCharCode(k9);W=fo,$=r.BindingError=class extends Error{constructor(a){super(a),this.name="BindingError"}},Object.assign(N0.prototype,{isAliasOf:function(a){if(!(this instanceof N0&&a instanceof N0))return!1;var k=this.Aa.Da.Ba,C=this.Aa.Ca;a.Aa=a.Aa;var c=a.Aa.Da.Ba;for(a=a.Aa.Ca;k.Ga;)C=k.Pa(C),k=k.Ga;for(;c.Ga;)a=c.Pa(a),c=c.Ga;return k===c&&C===a},clone:function(){if(this.Aa.Ca||s1(this),this.Aa.Oa)return this.Aa.count.value+=1,this;var a=t2,k=Object,C=k.create,c=Object.getPrototypeOf(this),M=this.Aa;return a=a(C.call(k,c,{Aa:{value:{count:M.count,Ma:M.Ma,Oa:M.Oa,Ca:M.Ca,Da:M.Da,Ea:M.Ea,Ha:M.Ha}}})),a.Aa.count.value+=1,a.Aa.Ma=!1,a},delete(){if(this.Aa.Ca||s1(this),this.Aa.Ma&&!this.Aa.Oa)throw new $("Object already scheduled for deletion");j1(this);var a=this.Aa;--a.count.value,a.count.value===0&&(a.Ea?a.Ha.Ka(a.Ea):a.Da.Ba.Ka(a.Ca)),this.Aa.Oa||(this.Aa.Ea=void 0,this.Aa.Ca=void 0)},isDeleted:function(){return!this.Aa.Ca},deleteLater:function(){if(this.Aa.Ca||s1(this),this.Aa.Ma&&!this.Aa.Oa)throw new $("Object already scheduled for deletion");return S1.push(this),S1.length===1&&e2&&e2(u2),this.Aa.Ma=!0,this}}),r.getInheritedInstanceCount=()=>Object.keys(A2).length,r.getLiveInheritedInstances=()=>{var a=[],k;for(k in A2)A2.hasOwnProperty(k)&&a.push(A2[k]);return a},r.flushPendingDeletes=u2,r.setDelayFunction=a=>{e2=a,S1.length&&e2&&e2(u2)},Object.assign(f3.prototype,{cb(a){return this.Ya&&(a=this.Ya(a)),a},Wa(a){var k;(k=this.Ka)==null||k.call(this,a)},Ia:8,readValueFromPointer:j,fromWireType:function(a){function k(){return this.Sa?z1(this.Ba.Na,{Da:this.ib,Ca:C,Ha:this,Ea:a}):z1(this.Ba.Na,{Da:this,Ca:a})}var C=this.cb(a);if(!C)return this.Wa(a),null;var c=d9(this.Ba,C);if(c!==void 0)return c.Aa.count.value===0?(c.Aa.Ca=C,c.Aa.Ea=a,c.clone()):(c=c.clone(),this.Wa(a),c);if(c=this.Ba.bb(C),c=E1[c],!c)return k.call(this);c=this.Ra?c.Za:c.pointerType;var M=f1(C,this.Ba,c.Ba);return M===null?k.call(this):this.Sa?z1(c.Ba.Na,{Da:c,Ca:M,Ha:this,Ea:a}):z1(c.Ba.Na,{Da:c,Ca:M})}}),ho=r.UnboundTypeError=((a,k)=>{var C=Z0(k,function(c){this.name=k,this.message=c,c=Error(c).stack,c!==void 0&&(this.stack=this.toString()+` -`+c.replace(/^Error(:[^\n]*)?\n/,""))});return C.prototype=Object.create(a.prototype),C.prototype.constructor=C,C.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},C})(Error,"UnboundTypeError"),s0.push(0,1,void 0,1,null,1,!0,1,!1,1),r.count_emval_handles=()=>s0.length/2-5-ve.length;var ti={c:(a,k,C,c)=>{i1(`Assertion failed: ${a?Y(H,a):""}, at: `+[k?k?Y(H,k):"":"unknown filename",C,c?c?Y(H,c):"":"unknown function"])},m:(a,k,C)=>{var c=new K(a);throw _[c.Ca+16>>2]=0,_[c.Ca+4>>2]=k,_[c.Ca+8>>2]=C,o1=a,o1},C:function(){return 0},S:()=>{},P:()=>{},T:function(){return 0},Q:()=>{},B:function(){},R:()=>{},U:()=>{i1("")},v:a=>{var k=g[a];delete g[a];var C=k.Ua,c=k.Ka,M=k.Xa,V=M.map(R=>R.gb).concat(M.map(R=>R.mb));N([a],V,R=>{var E={};return M.forEach((J,Q)=>{var n1=R[Q],C1=J.eb,V1=J.fb,c2=R[Q+M.length],O1=J.lb,R1=J.nb;E[J.ab]={read:T2=>n1.fromWireType(C1(V1,T2)),write:(T2,j3)=>{var g2=[];O1(R1,T2,c2.toWireType(g2,j3)),m(g2)}}}),[{name:k.name,fromWireType:J=>{var Q={},n1;for(n1 in E)Q[n1]=E[n1].read(J);return c(J),Q},toWireType:(J,Q)=>{for(var n1 in E)if(!(n1 in Q))throw new TypeError(`Missing field: "${n1}"`);var C1=C();for(n1 in E)E[n1].write(C1,Q[n1]);return J!==null&&J.push(c,C1),C1},Ia:8,readValueFromPointer:j,Ja:c}]})},J:()=>{},_:(a,k,C,c)=>{k=b(k),X(a,{name:k,fromWireType:function(M){return!!M},toWireType:function(M,V){return V?C:c},Ia:8,readValueFromPointer:function(M){return this.fromWireType(H[M])},Ja:null})},r:(a,k,C,c,M,V,R,E,J,Q,n1,C1,V1)=>{n1=b(n1),V=l2(M,V),E&&(E=l2(R,E)),Q&&(Q=l2(J,Q)),V1=l2(C1,V1);var c2=Br(n1);we(c2,function(){l9(`Cannot construct ${n1} due to unbound types`,[c])}),N([a,k,C],c?[c]:[],O1=>{if(O1=O1[0],c)var R1=O1.Ba,T2=R1.Na;else T2=N0.prototype;O1=Z0(n1,function(...Ze){if(Object.getPrototypeOf(this)!==j3)throw new $("Use 'new' to construct "+n1);if(g2.La===void 0)throw new $(n1+" has no accessible constructor");var Lo=g2.La[Ze.length];if(Lo===void 0)throw new $(`Tried to invoke ctor of ${n1} with invalid number of parameters (${Ze.length}) - expected (${Object.keys(g2.La).toString()}) parameters instead!`);return Lo.apply(this,Ze)});var j3=Object.create(T2,{constructor:{value:O1}});O1.prototype=j3;var g2=new br(n1,O1,j3,V1,R1,V,E,Q);if(g2.Ga){var D3;(D3=g2.Ga).Va!=null||(D3.Va=[]),g2.Ga.Va.push(g2)}return R1=new f3(n1,g2,!0,!1,!1),D3=new f3(n1+"*",g2,!1,!1,!1),T2=new f3(n1+" const*",g2,!1,!0,!1),E1[a]={pointerType:D3,Za:T2},ko(c2,O1),[R1,D3,T2]})},q:(a,k,C,c,M,V)=>{var R=ce(k,C);M=l2(c,M),N([],[a],E=>{E=E[0];var J=`constructor ${E.name}`;if(E.Ba.La===void 0&&(E.Ba.La=[]),E.Ba.La[k-1]!==void 0)throw new $(`Cannot register multiple constructors with identical number of parameters (${k-1}) for class '${E.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return E.Ba.La[k-1]=()=>{l9(`Cannot construct ${E.name} due to unbound types`,R)},N([],R,Q=>(Q.splice(1,0,null),E.Ba.La[k-1]=ge(J,Q,null,M,V),[])),[]})},f:(a,k,C,c,M,V,R,E)=>{var J=ce(C,c);k=b(k),k=po(k),V=l2(M,V),N([],[a],Q=>{function n1(){l9(`Cannot call ${C1} due to unbound types`,J)}Q=Q[0];var C1=`${Q.name}.${k}`;k.startsWith("@@")&&(k=Symbol[k.substring(2)]),E&&Q.Ba.jb.push(k);var V1=Q.Ba.Na,c2=V1[k];return c2===void 0||c2.Fa===void 0&&c2.className!==Q.name&&c2.Qa===C-2?(n1.Qa=C-2,n1.className=Q.name,V1[k]=n1):(ao(V1,k,C1),V1[k].Fa[C-2]=n1),N([],J,O1=>(O1=ge(C1,O1,Q,V,R),V1[k].Fa===void 0?(O1.Qa=C-2,V1[k]=O1):V1[k].Fa[C-2]=O1,[])),[]})},Z:a=>X(a,wo),x:(a,k,C,c)=>{function M(){}k=b(k),M.values={},X(a,{name:k,constructor:M,fromWireType:function(V){return this.constructor.values[V]},toWireType:(V,R)=>R.value,Ia:8,readValueFromPointer:Tr(k,C,c),Ja:null}),we(k,M)},k:(a,k,C)=>{var c=Me(a,"enum");k=b(k),a=c.constructor,c=Object.create(c.constructor.prototype,{value:{value:C},constructor:{value:Z0(`${c.name}_${k}`,function(){})}}),a.values[C]=c,a[k]=c},D:(a,k,C)=>{k=b(k),X(a,{name:k,fromWireType:c=>c,toWireType:(c,M)=>M,Ia:8,readValueFromPointer:Rr(k,C),Ja:null})},F:(a,k,C,c,M,V)=>{var R=ce(k,C);a=b(a),a=po(a),M=l2(c,M),we(a,function(){l9(`Cannot call ${a} due to unbound types`,R)},k-1),N([],R,E=>(ko(a,ge(a,[E[0],null].concat(E.slice(1)),null,M,V),k-1),[]))},l:(a,k,C,c,M)=>{if(k=b(k),M===-1&&(M=4294967295),M=E=>E,c===0){var V=32-8*C;M=E=>E<>>V}var R=k.includes("unsigned")?function(E,J){return J>>>0}:function(E,J){return J};X(a,{name:k,fromWireType:M,toWireType:R,Ia:8,readValueFromPointer:Fr(k,C,c!==0),Ja:null})},h:(a,k,C)=>{function c(V){return new M(D.buffer,_[V+4>>2],_[V>>2])}var M=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][k];C=b(C),X(a,{name:C,fromWireType:c,Ia:8,readValueFromPointer:c},{hb:!0})},u:a=>{X(a,Nr)},ea:(a,k,C,c,M,V,R,E,J,Q,n1,C1)=>{C=b(C),V=l2(M,V),E=l2(R,E),Q=l2(J,Q),C1=l2(n1,C1),N([a],[k],V1=>(V1=V1[0],[new f3(C,V1.Ba,!1,!1,!0,V1,c,V,E,Q,C1)]))},E:(a,k)=>{k=b(k);var C=k==="std::string";X(a,{name:k,fromWireType:function(c){var M=_[c>>2],V=c+4;if(C)for(var R=V,E=0;E<=M;++E){var J=V+E;if(E==M||H[J]==0){if(R=R?Y(H,R,J-R):"",Q===void 0)var Q=R;else Q+="\0",Q+=R;R=J+1}}else{for(Q=Array(M),E=0;E=J?V++:2047>=J?V+=2:55296<=J&&57343>=J?(V+=4,++E):V+=3}else V=M.length;if(E=Ve(4+V+1),J=E+4,_[E>>2]=V,C&&R)a1(M,J,V+1);else if(R)for(R=0;R{if(C=b(C),k===2)var c=$r,M=Ur,V=Wr,R=E=>Z[E>>1];else k===4&&(c=zr,M=qr,V=Kr,R=E=>_[E>>2]);X(a,{name:C,fromWireType:E=>{for(var J=_[E>>2],Q,n1=E+4,C1=0;C1<=J;++C1){var V1=E+4+C1*k;(C1==J||R(V1)==0)&&(n1=c(n1,V1-n1),Q===void 0?Q=n1:(Q+="\0",Q+=n1),n1=V1+k)}return d0(E),Q},toWireType:(E,J)=>{if(typeof J!="string")throw new $(`Cannot pass non-string to C++ string type ${C}`);var Q=V(J),n1=Ve(4+Q+k);return _[n1>>2]=Q/k,M(J,n1+4,Q+k),E!==null&&E.push(d0,n1),n1},Ia:8,readValueFromPointer:j,Ja(E){d0(E)}})},w:(a,k,C,c,M,V)=>{g[a]={name:b(k),Ua:l2(C,c),Ka:l2(M,V),Xa:[]}},j:(a,k,C,c,M,V,R,E,J,Q)=>{g[a].Xa.push({ab:b(k),gb:C,eb:l2(c,M),fb:V,mb:R,lb:l2(E,J),nb:Q})},$:(a,k)=>{k=b(k),X(a,{pb:!0,name:k,Ia:0,fromWireType:()=>{},toWireType:()=>{}})},O:()=>{X1=!1,xe=0},K:()=>{throw 1/0},ca:(a,k,C,c)=>(a=De[a],k=fe(k),a(null,k,C,c)),G:me,ba:(a,k,C)=>{var c=Jr(a,k),M=c.shift();a--;var V=Array(a);return k=`methodCaller<(${c.map(R=>R.name).join(", ")}) => ${M.name}>`,Gr(Z0(k,(R,E,J,Q)=>{for(var n1=0,C1=0;C1>2]=a9(R)),E}))},da:a=>{9{var k=fe(a);m(k),me(a)},o:(a,k)=>(a=Me(a,"_emval_take_value"),a=a.readValueFromPointer(k),a9(a)),L:(a,k)=>{if(M3[a]&&(clearTimeout(M3[a].id),delete M3[a]),!k)return 0;var C=setTimeout(()=>{delete M3[a],Qr(()=>jo(a,performance.now()))},k);return M3[a]={id:C,rb:k},0},M:(a,k,C,c)=>{var M=new Date().getFullYear(),V=new Date(M,0,1).getTimezoneOffset();M=new Date(M,6,1).getTimezoneOffset(),_[a>>2]=60*Math.max(V,M),T[k>>2]=+(V!=M),k=R=>{var E=Math.abs(R);return`UTC${0<=R?"-":"+"}${String(Math.floor(E/60)).padStart(2,"0")}${String(E%60).padStart(2,"0")}`},a=k(V),k=k(M),Mperformance.now(),N:a=>{var k=H.length;if(a>>>=0,2147483648=C;C*=2){var c=k*(1+.2/C);c=Math.min(c,a+100663296);e:{c=(Math.min(2147483648,65536*Math.ceil(Math.max(a,c)/65536))-x.buffer.byteLength+65535)/65536;try{x.grow(c),q();var M=1;break e}catch{}M=void 0}if(M)return!0}return!1},W:(a,k)=>{var C=0;return vo().forEach((c,M)=>{var V=k+C;for(M=_[a+4*M>>2]=V,V=0;V{var C=vo();_[a>>2]=C.length;var c=0;return C.forEach(M=>c+=M.length+1),_[k>>2]=c,0},s:()=>52,A:()=>52,I:function(){return 70},z:(a,k,C,c)=>{for(var M=0,V=0;V>2],E=_[k+4>>2];k+=8;for(var J=0;J>2]=M,0},Y:(a,k)=>(mo(H.subarray(a,a+k)),0),i:si,d:ii,e:ri,p:di,y:ki,b:oi,a:ni,g:ai,n:li,H:hi,V:go},A1=function(){var a;function k(c){var M;return A1=c.exports,x=A1.ga,q(),x2=A1.ka,F.unshift(A1.ha),L1--,(M=r.monitorRunDependencies)==null||M.call(r,L1),L1==0&&h1&&(c=h1,h1=null,c()),A1}var C={a:ti};if(L1++,(a=r.monitorRunDependencies)==null||a.call(r,L1),r.instantiateWasm)try{return r.instantiateWasm(C,k)}catch(c){v(`Module.instantiateWasm callback failed with error: ${c}`),s(c)}return P1!=null||(P1=w1("DotLottiePlayer.wasm")?"DotLottiePlayer.wasm":r.locateFile?r.locateFile("DotLottiePlayer.wasm",u):u+"DotLottiePlayer.wasm"),V0(C,function(c){k(c.instance)}).catch(s),{}}(),Ve=a=>(Ve=A1.ia)(a),Mo=a=>(Mo=A1.ja)(a),d0=a=>(d0=A1.la)(a),jo=(a,k)=>(jo=A1.ma)(a,k),I2=(a,k)=>(I2=A1.na)(a,k),P2=a=>(P2=A1.oa)(a),O2=()=>(O2=A1.pa)();r.dynCall_iijj=(a,k,C,c,M,V)=>(r.dynCall_iijj=A1.qa)(a,k,C,c,M,V),r.dynCall_vijj=(a,k,C,c,M,V)=>(r.dynCall_vijj=A1.ra)(a,k,C,c,M,V),r.dynCall_jiii=(a,k,C,c)=>(r.dynCall_jiii=A1.sa)(a,k,C,c),r.dynCall_jii=(a,k,C)=>(r.dynCall_jii=A1.ta)(a,k,C);var Do=r.dynCall_vijjj=(a,k,C,c,M,V,R,E)=>(Do=r.dynCall_vijjj=A1.ua)(a,k,C,c,M,V,R,E);r.dynCall_jiji=(a,k,C,c,M)=>(r.dynCall_jiji=A1.va)(a,k,C,c,M),r.dynCall_viijii=(a,k,C,c,M,V,R)=>(r.dynCall_viijii=A1.wa)(a,k,C,c,M,V,R),r.dynCall_iiiiij=(a,k,C,c,M,V,R)=>(r.dynCall_iiiiij=A1.xa)(a,k,C,c,M,V,R),r.dynCall_iiiiijj=(a,k,C,c,M,V,R,E,J)=>(r.dynCall_iiiiijj=A1.ya)(a,k,C,c,M,V,R,E,J),r.dynCall_iiiiiijj=(a,k,C,c,M,V,R,E,J,Q)=>(r.dynCall_iiiiiijj=A1.za)(a,k,C,c,M,V,R,E,J,Q);function oi(a,k){var C=O2();try{x2.get(a)(k)}catch(c){if(P2(C),c!==c+0)throw c;I2(1,0)}}function ni(a,k,C){var c=O2();try{x2.get(a)(k,C)}catch(M){if(P2(c),M!==M+0)throw M;I2(1,0)}}function ri(a,k,C,c){var M=O2();try{return x2.get(a)(k,C,c)}catch(V){if(P2(M),V!==V+0)throw V;I2(1,0)}}function ii(a,k,C){var c=O2();try{return x2.get(a)(k,C)}catch(M){if(P2(c),M!==M+0)throw M;I2(1,0)}}function si(a,k){var C=O2();try{return x2.get(a)(k)}catch(c){if(P2(C),c!==c+0)throw c;I2(1,0)}}function di(a,k,C,c,M,V){var R=O2();try{return x2.get(a)(k,C,c,M,V)}catch(E){if(P2(R),E!==E+0)throw E;I2(1,0)}}function li(a,k,C,c,M){var V=O2();try{x2.get(a)(k,C,c,M)}catch(R){if(P2(V),R!==R+0)throw R;I2(1,0)}}function ai(a,k,C,c){var M=O2();try{x2.get(a)(k,C,c)}catch(V){if(P2(M),V!==V+0)throw V;I2(1,0)}}function ki(a){var k=O2();try{x2.get(a)()}catch(C){if(P2(k),C!==C+0)throw C;I2(1,0)}}function hi(a,k,C,c,M,V,R,E){var J=O2();try{Do(a,k,C,c,M,V,R,E)}catch(Q){if(P2(J),Q!==Q+0)throw Q;I2(1,0)}}var h9;h1=function a(){h9||xo(),h9||(h1=a)};function xo(){function a(){var k;if(!h9&&(h9=!0,r.calledRun=!0,!S)){if(S2(F),i(r),(k=r.onRuntimeInitialized)==null||k.call(r),r.postRun)for(typeof r.postRun=="function"&&(r.postRun=[r.postRun]);r.postRun.length;){var C=r.postRun.shift();d1.unshift(C)}S2(d1)}}if(!(0{setTimeout(()=>r.setStatus(""),1),a()},1)):a())}}if(r.preInit)for(typeof r.preInit=="function"&&(r.preInit=[r.preInit]);0e})})}static _loadWithBackup(){return p1(this,null,function*(){return this._ModulePromise||(this._ModulePromise=this._tryLoad(this._wasmURL).catch(e=>p1(this,null,function*(){let t=`https://unpkg.com/${ir}@${rr}/dist/dotlottie-player.wasm`;console.warn(`Primary WASM load failed from ${this._wasmURL}. Error: ${e.message}`),console.warn(`Attempting to load WASM from backup URL: ${t}`);try{return yield this._tryLoad(t)}catch(o){throw console.error(`Primary WASM URL failed: ${e.message}`),console.error(`Backup WASM URL failed: ${o.message}`),new Error("WASM loading failed from all sources.")}}))),this._ModulePromise})}static load(){return p1(this,null,function*(){return this._loadWithBackup()})}static setWasmUrl(e){this._wasmURL=e,this._ModulePromise=null}};k1(F9,"_ModulePromise",null),k1(F9,"_wasmURL",`https://cdn.jsdelivr.net/npm/${ir}@${rr}/dist/dotlottie-player.wasm`);var sr=class{constructor(){k1(this,"_eventListeners",new Map)}addEventListener(e,t){let o=this._eventListeners.get(e);o||(o=new Set,this._eventListeners.set(e,o)),o.add(t)}removeEventListener(e,t){let o=this._eventListeners.get(e);o&&(t?(o.delete(t),o.size===0&&this._eventListeners.delete(e)):this._eventListeners.delete(e))}dispatch(e){let t=this._eventListeners.get(e.type);t==null||t.forEach(o=>o(e))}removeAllEventListeners(){this._eventListeners.clear()}},X2=class{static _initializeObserver(){if(this._observer)return;let e=t=>{t.forEach(o=>{let n=this._observedCanvases.get(o.target);n&&(o.isIntersecting?n.unfreeze():n.freeze())})};this._observer=new IntersectionObserver(e,{threshold:0})}static observe(e,t){var o;this._initializeObserver(),!this._observedCanvases.has(e)&&(this._observedCanvases.set(e,t),(o=this._observer)==null||o.observe(e))}static unobserve(e){var t,o;(t=this._observer)==null||t.unobserve(e),this._observedCanvases.delete(e),this._observedCanvases.size===0&&((o=this._observer)==null||o.disconnect(),this._observer=null)}};k1(X2,"_observer",null),k1(X2,"_observedCanvases",new Map);var e0=class{static _initializeObserver(){if(this._observer)return;let e=t=>{t.forEach(o=>{let n=this._observedCanvases.get(o.target);if(!n)return;let[r,i]=n;clearTimeout(i);let s=setTimeout(()=>{r.resize()},100);this._observedCanvases.set(o.target,[r,s])})};this._observer=new ResizeObserver(e)}static observe(e,t){var o;this._initializeObserver(),!this._observedCanvases.has(e)&&(this._observedCanvases.set(e,[t,0]),(o=this._observer)==null||o.observe(e))}static unobserve(e){var t,o;(t=this._observer)==null||t.unobserve(e),this._observedCanvases.delete(e),this._observedCanvases.size===0&&((o=this._observer)==null||o.disconnect(),this._observer=null)}};k1(e0,"_observer",null),k1(e0,"_observedCanvases",new Map);function A8(e){return/^#([\da-f]{6}|[\da-f]{8})$/iu.test(e)}function I8(e){if(!A8(e))return 0;let t=e.replace("#","");return t=t.length===6?`${t}ff`:t,parseInt(t,16)}function Bn(e){if(e.byteLength<4)return!1;let t=new Uint8Array(e.slice(0,Ke.byteLength));for(let o=0;oObject.prototype.hasOwnProperty.call(e,t))}function En(e){if(typeof e=="string")try{return bn(JSON.parse(e))}catch{return!1}else return bn(e)}function $3(){return 1+((o2?window.devicePixelRatio:1)-1)*b8}function dr(e){let t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}var Ge=(e,t)=>e==="reverse"?t.Mode.Reverse:e==="bounce"?t.Mode.Bounce:e==="reverse-bounce"?t.Mode.ReverseBounce:t.Mode.Forward,Je=(e,t)=>e==="contain"?t.Fit.Contain:e==="cover"?t.Fit.Cover:e==="fill"?t.Fit.Fill:e==="fit-height"?t.Fit.FitHeight:e==="fit-width"?t.Fit.FitWidth:t.Fit.None,Ye=(e,t)=>{let o=new t.VectorFloat;return o.push_back(e[0]),o.push_back(e[1]),o},Qe=(e,t)=>{let o=new t.VectorFloat;return e.length!==2||(o.push_back(e[0]),o.push_back(e[1])),o},lr=class y1{constructor(t){k1(this,"_canvas"),k1(this,"_context",null),k1(this,"_eventManager"),k1(this,"_animationFrameId",null),k1(this,"_frameManager"),k1(this,"_dotLottieCore",null),k1(this,"_renderConfig",{}),k1(this,"_isFrozen",!1),k1(this,"_backgroundColor",null),k1(this,"_pointerUpMethod"),k1(this,"_pointerDownMethod"),k1(this,"_pointerMoveMethod"),k1(this,"_pointerEnterMethod"),k1(this,"_pointerExitMethod");var o,n,r;this._canvas=t.canvas,this._context=this._canvas.getContext("2d"),this._eventManager=new sr,this._frameManager=new y8,this._renderConfig=w2(G1({},t.renderConfig),{devicePixelRatio:((o=t.renderConfig)==null?void 0:o.devicePixelRatio)||$3(),freezeOnOffscreen:(r=(n=t.renderConfig)==null?void 0:n.freezeOnOffscreen)!=null?r:!0}),F9.load().then(i=>{var s,d,l,h,u,p,w;y1._wasmModule=i,this._dotLottieCore=new i.DotLottiePlayer({autoplay:(s=t.autoplay)!=null?s:!1,backgroundColor:0,loopAnimation:(d=t.loop)!=null?d:!1,mode:Ge((l=t.mode)!=null?l:"forward",i),segment:Qe((h=t.segment)!=null?h:[],i),speed:(u=t.speed)!=null?u:1,useFrameInterpolation:(p=t.useFrameInterpolation)!=null?p:!0,marker:(w=t.marker)!=null?w:"",layout:t.layout?{align:Ye(t.layout.align,i),fit:Je(t.layout.fit,i)}:i.createDefaultLayout()}),this._eventManager.dispatch({type:"ready"}),t.data?this._loadFromData(t.data):t.src&&this._loadFromSrc(t.src),t.backgroundColor&&this.setBackgroundColor(t.backgroundColor)}).catch(i=>{this._eventManager.dispatch({type:"loadError",error:new Error(`Failed to load wasm module: ${i}`)})}),this._pointerUpMethod=this._onPointerUp.bind(this),this._pointerDownMethod=this._onPointerDown.bind(this),this._pointerMoveMethod=this._onPointerMove.bind(this),this._pointerEnterMethod=this._onPointerEnter.bind(this),this._pointerExitMethod=this._onPointerLeave.bind(this)}_dispatchError(t){console.error(t),this._eventManager.dispatch({type:"loadError",error:new Error(t)})}_fetchData(t){return p1(this,null,function*(){let o=yield fetch(t);if(!o.ok)throw new Error(`Failed to fetch animation data from URL: ${t}. ${o.status}: ${o.statusText}`);let n=yield o.arrayBuffer();return Bn(n)?n:new TextDecoder().decode(n)})}_loadFromData(t){if(this._dotLottieCore===null)return;let o=this._canvas.width,n=this._canvas.height,r=!1;if(typeof t=="string"){if(!En(t)){this._dispatchError("Invalid Lottie JSON string: The provided string does not conform to the Lottie JSON format.");return}r=this._dotLottieCore.loadAnimationData(t,o,n)}else if(t instanceof ArrayBuffer){if(!Bn(t)){this._dispatchError("Invalid dotLottie ArrayBuffer: The provided ArrayBuffer does not conform to the dotLottie format.");return}r=this._dotLottieCore.loadDotLottieData(t,o,n)}else if(typeof t=="object"){if(!En(t)){this._dispatchError("Invalid Lottie JSON object: The provided object does not conform to the Lottie JSON format.");return}r=this._dotLottieCore.loadAnimationData(JSON.stringify(t),o,n)}else{this._dispatchError(`Unsupported data type for animation data. Expected: - - string (Lottie JSON), - - ArrayBuffer (dotLottie), - - object (Lottie JSON). - Received: ${typeof t}`);return}r?(this._eventManager.dispatch({type:"load"}),o2&&this.resize(),this._eventManager.dispatch({type:"frame",currentFrame:this._dotLottieCore.currentFrame()}),this._render(),this._dotLottieCore.config().autoplay&&(this._dotLottieCore.play(),this._dotLottieCore.isPlaying()?(this._eventManager.dispatch({type:"play"}),this._animationFrameId=this._frameManager.requestAnimationFrame(this._draw.bind(this))):console.error("something went wrong, the animation was suppose to autoplay")),o2&&this._canvas instanceof HTMLCanvasElement&&(this._renderConfig.freezeOnOffscreen&&X2.observe(this._canvas,this),this._renderConfig.autoResize&&e0.observe(this._canvas,this))):this._dispatchError("Failed to load animation data")}_loadFromSrc(t){this._fetchData(t).then(o=>this._loadFromData(o)).catch(o=>this._dispatchError(`Failed to load animation data from URL: ${t}. ${o}`))}get activeAnimationId(){var t;return(t=this._dotLottieCore)==null?void 0:t.activeAnimationId()}get activeThemeId(){var t;return(t=this._dotLottieCore)==null?void 0:t.activeThemeId()}get layout(){var t;let o=(t=this._dotLottieCore)==null?void 0:t.config().layout;if(o)return{align:[o.align.get(0),o.align.get(1)],fit:(()=>{var n,r,i,s,d,l;switch(o.fit){case((n=y1._wasmModule)==null?void 0:n.Fit.Contain):return"contain";case((r=y1._wasmModule)==null?void 0:r.Fit.Cover):return"cover";case((i=y1._wasmModule)==null?void 0:i.Fit.Fill):return"fill";case((s=y1._wasmModule)==null?void 0:s.Fit.FitHeight):return"fit-height";case((d=y1._wasmModule)==null?void 0:d.Fit.FitWidth):return"fit-width";case((l=y1._wasmModule)==null?void 0:l.Fit.None):return"none";default:return"contain"}})()}}get marker(){var t;return(t=this._dotLottieCore)==null?void 0:t.config().marker}get manifest(){var t;try{let o=(t=this._dotLottieCore)==null?void 0:t.manifestString();if(this._dotLottieCore===null||!o)return null;let n=JSON.parse(o);return Object.keys(n).length===0?null:n}catch{return null}}get renderConfig(){return this._renderConfig}get segment(){var t;let o=(t=this._dotLottieCore)==null?void 0:t.config().segment;if(o&&o.size()===2)return[o.get(0),o.get(1)]}get loop(){var t,o;return(o=(t=this._dotLottieCore)==null?void 0:t.config().loopAnimation)!=null?o:!1}get mode(){var t,o,n,r;let i=(t=this._dotLottieCore)==null?void 0:t.config().mode;return i===((o=y1._wasmModule)==null?void 0:o.Mode.Reverse)?"reverse":i===((n=y1._wasmModule)==null?void 0:n.Mode.Bounce)?"bounce":i===((r=y1._wasmModule)==null?void 0:r.Mode.ReverseBounce)?"reverse-bounce":"forward"}get isFrozen(){return this._isFrozen}get backgroundColor(){var t;return(t=this._backgroundColor)!=null?t:""}get autoplay(){var t,o;return(o=(t=this._dotLottieCore)==null?void 0:t.config().autoplay)!=null?o:!1}get useFrameInterpolation(){var t,o;return(o=(t=this._dotLottieCore)==null?void 0:t.config().useFrameInterpolation)!=null?o:!1}get speed(){var t,o;return(o=(t=this._dotLottieCore)==null?void 0:t.config().speed)!=null?o:0}get isReady(){return this._dotLottieCore!==null}get isLoaded(){var t,o;return(o=(t=this._dotLottieCore)==null?void 0:t.isLoaded())!=null?o:!1}get isPlaying(){var t,o;return(o=(t=this._dotLottieCore)==null?void 0:t.isPlaying())!=null?o:!1}get isPaused(){var t,o;return(o=(t=this._dotLottieCore)==null?void 0:t.isPaused())!=null?o:!1}get isStopped(){var t,o;return(o=(t=this._dotLottieCore)==null?void 0:t.isStopped())!=null?o:!1}get currentFrame(){var t,o;return(o=(t=this._dotLottieCore)==null?void 0:t.currentFrame())!=null?o:0}get loopCount(){var t,o;return(o=(t=this._dotLottieCore)==null?void 0:t.loopCount())!=null?o:0}get totalFrames(){var t,o;return(o=(t=this._dotLottieCore)==null?void 0:t.totalFrames())!=null?o:0}get duration(){var t,o;return(o=(t=this._dotLottieCore)==null?void 0:t.duration())!=null?o:0}get segmentDuration(){var t,o;return(o=(t=this._dotLottieCore)==null?void 0:t.segmentDuration())!=null?o:0}get canvas(){return this._canvas}load(t){var o,n,r,i,s,d,l,h;this._dotLottieCore===null||y1._wasmModule===null||(this._dotLottieCore.setConfig({autoplay:(o=t.autoplay)!=null?o:!1,backgroundColor:0,loopAnimation:(n=t.loop)!=null?n:!1,mode:Ge((r=t.mode)!=null?r:"forward",y1._wasmModule),segment:Qe((i=t.segment)!=null?i:[],y1._wasmModule),speed:(s=t.speed)!=null?s:1,useFrameInterpolation:(d=t.useFrameInterpolation)!=null?d:!0,marker:(l=t.marker)!=null?l:"",layout:t.layout?{align:Ye(t.layout.align,y1._wasmModule),fit:Je(t.layout.fit,y1._wasmModule)}:y1._wasmModule.createDefaultLayout()}),t.data?this._loadFromData(t.data):t.src&&this._loadFromSrc(t.src),this.setBackgroundColor((h=t.backgroundColor)!=null?h:""))}_render(){if(this._dotLottieCore===null||this._context===null)return!1;if(this._dotLottieCore.render()){let t=this._dotLottieCore.buffer(),o=new Uint8ClampedArray(t,0,this._canvas.width*this._canvas.height*4),n=null;return typeof ImageData>"u"?(n=this._context.createImageData(this._canvas.width,this._canvas.height),n.data.set(o)):n=new ImageData(o,this._canvas.width,this._canvas.height),this._context.putImageData(n,0,0),this._eventManager.dispatch({type:"render",currentFrame:this._dotLottieCore.currentFrame()}),!0}return!1}_draw(){if(this._dotLottieCore===null||this._context===null||!this._dotLottieCore.isPlaying())return;let t=this._dotLottieCore.requestFrame();this._dotLottieCore.setFrame(t)&&(this._eventManager.dispatch({type:"frame",currentFrame:this._dotLottieCore.currentFrame()}),this._render()&&this._dotLottieCore.isComplete()&&(this._dotLottieCore.config().loopAnimation?this._eventManager.dispatch({type:"loop",loopCount:this._dotLottieCore.loopCount()}):this._eventManager.dispatch({type:"complete"}))),this._animationFrameId=this._frameManager.requestAnimationFrame(this._draw.bind(this))}play(){this._dotLottieCore!==null&&((this._dotLottieCore.play()||this._dotLottieCore.isPlaying())&&(this._isFrozen=!1,this._eventManager.dispatch({type:"play"}),this._animationFrameId=this._frameManager.requestAnimationFrame(this._draw.bind(this))),o2&&this._canvas instanceof HTMLCanvasElement&&this._renderConfig.freezeOnOffscreen&&!dr(this._canvas)&&this.freeze())}pause(){this._dotLottieCore!==null&&(this._dotLottieCore.pause()||this._dotLottieCore.isPaused())&&this._eventManager.dispatch({type:"pause"})}stop(){this._dotLottieCore!==null&&this._dotLottieCore.stop()&&(this._eventManager.dispatch({type:"frame",currentFrame:this._dotLottieCore.currentFrame()}),this._render(),this._eventManager.dispatch({type:"stop"}))}setFrame(t){this._dotLottieCore===null||t<0||t>this._dotLottieCore.totalFrames()||this._dotLottieCore.seek(t)&&(this._eventManager.dispatch({type:"frame",currentFrame:this._dotLottieCore.currentFrame()}),this._render())}setSpeed(t){this._dotLottieCore!==null&&this._dotLottieCore.setConfig(w2(G1({},this._dotLottieCore.config()),{speed:t}))}setBackgroundColor(t){this._dotLottieCore!==null&&(o2&&this._canvas instanceof HTMLCanvasElement?this._canvas.style.backgroundColor=t:this._dotLottieCore.setConfig(w2(G1({},this._dotLottieCore.config()),{backgroundColor:I8(t)})),this._backgroundColor=t)}setLoop(t){this._dotLottieCore!==null&&this._dotLottieCore.setConfig(w2(G1({},this._dotLottieCore.config()),{loopAnimation:t}))}setUseFrameInterpolation(t){this._dotLottieCore!==null&&this._dotLottieCore.setConfig(w2(G1({},this._dotLottieCore.config()),{useFrameInterpolation:t}))}addEventListener(t,o){this._eventManager.addEventListener(t,o)}removeEventListener(t,o){this._eventManager.removeEventListener(t,o)}destroy(){var t;o2&&this._canvas instanceof HTMLCanvasElement&&(X2.unobserve(this._canvas),e0.unobserve(this._canvas)),(t=this._dotLottieCore)==null||t.delete(),this._dotLottieCore=null,this._context=null,this._eventManager.dispatch({type:"destroy"}),this._eventManager.removeAllEventListeners(),this._cleanupStateMachineListeners()}freeze(){this._animationFrameId!==null&&(this._frameManager.cancelAnimationFrame(this._animationFrameId),this._animationFrameId=null,this._isFrozen=!0,this._eventManager.dispatch({type:"freeze"}))}unfreeze(){this._animationFrameId===null&&(this._animationFrameId=this._frameManager.requestAnimationFrame(this._draw.bind(this)),this._isFrozen=!1,this._eventManager.dispatch({type:"unfreeze"}))}resize(){if(!(!this._dotLottieCore||!this.isLoaded)){if(o2&&this._canvas instanceof HTMLCanvasElement){let t=this._renderConfig.devicePixelRatio||window.devicePixelRatio||1,{height:o,width:n}=this._canvas.getBoundingClientRect();this._canvas.width=n*t,this._canvas.height=o*t}this._dotLottieCore.resize(this._canvas.width,this._canvas.height)&&this._render()}}setSegment(t,o){this._dotLottieCore===null||y1._wasmModule===null||this._dotLottieCore.setConfig(w2(G1({},this._dotLottieCore.config()),{segment:Qe([t,o],y1._wasmModule)}))}setMode(t){this._dotLottieCore===null||y1._wasmModule===null||this._dotLottieCore.setConfig(w2(G1({},this._dotLottieCore.config()),{mode:Ge(t,y1._wasmModule)}))}setRenderConfig(t){let o=t,{devicePixelRatio:n,freezeOnOffscreen:r}=o,i=nr(o,["devicePixelRatio","freezeOnOffscreen"]);this._renderConfig=w2(G1(G1({},this._renderConfig),i),{devicePixelRatio:n||$3(),freezeOnOffscreen:r??!0}),o2&&this._canvas instanceof HTMLCanvasElement&&(this._renderConfig.autoResize?e0.observe(this._canvas,this):e0.unobserve(this._canvas),this._renderConfig.freezeOnOffscreen?X2.observe(this._canvas,this):(X2.unobserve(this._canvas),this._isFrozen&&this.unfreeze()))}loadAnimation(t){this._dotLottieCore===null||this._dotLottieCore.activeAnimationId()===t||(this._dotLottieCore.loadAnimation(t,this._canvas.width,this._canvas.height)?(this._eventManager.dispatch({type:"load"}),this.resize()):this._eventManager.dispatch({type:"loadError",error:new Error(`Failed to animation :${t}`)}))}setMarker(t){this._dotLottieCore!==null&&this._dotLottieCore.setConfig(w2(G1({},this._dotLottieCore.config()),{marker:t}))}markers(){var t;let o=(t=this._dotLottieCore)==null?void 0:t.markers();if(o){let n=[];for(let r=0;r"u")throw new Error("Worker is not supported in this environment.");let e=new Blob([new Uint8Array([34,117,115,101,32,115,116,114,105,99,116,34,59,10,40,40,41,32,61,62,32,123,10,32,32,118,97,114,32,95,95,100,101,102,80,114,111,112,32,61,32,79,98,106,101,99,116,46,100,101,102,105,110,101,80,114,111,112,101,114,116,121,59,10,32,32,118,97,114,32,95,95,100,101,102,80,114,111,112,115,32,61,32,79,98,106,101,99,116,46,100,101,102,105,110,101,80,114,111,112,101,114,116,105,101,115,59,10,32,32,118,97,114,32,95,95,103,101,116,79,119,110,80,114,111,112,68,101,115,99,115,32,61,32,79,98,106,101,99,116,46,103,101,116,79,119,110,80,114,111,112,101,114,116,121,68,101,115,99,114,105,112,116,111,114,115,59,10,32,32,118,97,114,32,95,95,103,101,116,79,119,110,80,114,111,112,83,121,109,98,111,108,115,32,61,32,79,98,106,101,99,116,46,103,101,116,79,119,110,80,114,111,112,101,114,116,121,83,121,109,98,111,108,115,59,10,32,32,118,97,114,32,95,95,104,97,115,79,119,110,80,114,111,112,32,61,32,79,98,106,101,99,116,46,112,114,111,116,111,116,121,112,101,46,104,97,115,79,119,110,80,114,111,112,101,114,116,121,59,10,32,32,118,97,114,32,95,95,112,114,111,112,73,115,69,110,117,109,32,61,32,79,98,106,101,99,116,46,112,114,111,116,111,116,121,112,101,46,112,114,111,112,101,114,116,121,73,115,69,110,117,109,101,114,97,98,108,101,59,10,32,32,118,97,114,32,95,95,100,101,102,78,111,114,109,97,108,80,114,111,112,32,61,32,40,111,98,106,44,32,107,101,121,44,32,118,97,108,117,101,41,32,61,62,32,107,101,121,32,105,110,32,111,98,106,32,63,32,95,95,100,101,102,80,114,111,112,40,111,98,106,44,32,107,101,121,44,32,123,32,101,110,117,109,101,114,97,98,108,101,58,32,116,114,117,101,44,32,99,111,110,102,105,103,117,114,97,98,108,101,58,32,116,114,117,101,44,32,119,114,105,116,97,98,108,101,58,32,116,114,117,101,44,32,118,97,108,117,101,32,125,41,32,58,32,111,98,106,91,107,101,121,93,32,61,32,118,97,108,117,101,59,10,32,32,118,97,114,32,95,95,115,112,114,101,97,100,86,97,108,117,101,115,32,61,32,40,97,44,32,98,41,32,61,62,32,123,10,32,32,32,32,102,111,114,32,40,118,97,114,32,112,114,111,112,32,105,110,32,98,32,124,124,32,40,98,32,61,32,123,125,41,41,10,32,32,32,32,32,32,105,102,32,40,95,95,104,97,115,79,119,110,80,114,111,112,46,99,97,108,108,40,98,44,32,112,114,111,112,41,41,10,32,32,32,32,32,32,32,32,95,95,100,101,102,78,111,114,109,97,108,80,114,111,112,40,97,44,32,112,114,111,112,44,32,98,91,112,114,111,112,93,41,59,10,32,32,32,32,105,102,32,40,95,95,103,101,116,79,119,110,80,114,111,112,83,121,109,98,111,108,115,41,10,32,32,32,32,32,32,102,111,114,32,40,118,97,114,32,112,114,111,112,32,111,102,32,95,95,103,101,116,79,119,110,80,114,111,112,83,121,109,98,111,108,115,40,98,41,41,32,123,10,32,32,32,32,32,32,32,32,105,102,32,40,95,95,112,114,111,112,73,115,69,110,117,109,46,99,97,108,108,40,98,44,32,112,114,111,112,41,41,10,32,32,32,32,32,32,32,32,32,32,95,95,100,101,102,78,111,114,109,97,108,80,114,111,112,40,97,44,32,112,114,111,112,44,32,98,91,112,114,111,112,93,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,114,101,116,117,114,110,32,97,59,10,32,32,125,59,10,32,32,118,97,114,32,95,95,115,112,114,101,97,100,80,114,111,112,115,32,61,32,40,97,44,32,98,41,32,61,62,32,95,95,100,101,102,80,114,111,112,115,40,97,44,32,95,95,103,101,116,79,119,110,80,114,111,112,68,101,115,99,115,40,98,41,41,59,10,32,32,118,97,114,32,95,95,111,98,106,82,101,115,116,32,61,32,40,115,111,117,114,99,101,44,32,101,120,99,108,117,100,101,41,32,61,62,32,123,10,32,32,32,32,118,97,114,32,116,97,114,103,101,116,32,61,32,123,125,59,10,32,32,32,32,102,111,114,32,40,118,97,114,32,112,114,111,112,32,105,110,32,115,111,117,114,99,101,41,10,32,32,32,32,32,32,105,102,32,40,95,95,104,97,115,79,119,110,80,114,111,112,46,99,97,108,108,40,115,111,117,114,99,101,44,32,112,114,111,112,41,32,38,38,32,101,120,99,108,117,100,101,46,105,110,100,101,120,79,102,40,112,114,111,112,41,32,60,32,48,41,10,32,32,32,32,32,32,32,32,116,97,114,103,101,116,91,112,114,111,112,93,32,61,32,115,111,117,114,99,101,91,112,114,111,112,93,59,10,32,32,32,32,105,102,32,40,115,111,117,114,99,101,32,33,61,32,110,117,108,108,32,38,38,32,95,95,103,101,116,79,119,110,80,114,111,112,83,121,109,98,111,108,115,41,10,32,32,32,32,32,32,102,111,114,32,40,118,97,114,32,112,114,111,112,32,111,102,32,95,95,103,101,116,79,119,110,80,114,111,112,83,121,109,98,111,108,115,40,115,111,117,114,99,101,41,41,32,123,10,32,32,32,32,32,32,32,32,105,102,32,40,101,120,99,108,117,100,101,46,105,110,100,101,120,79,102,40,112,114,111,112,41,32,60,32,48,32,38,38,32,95,95,112,114,111,112,73,115,69,110,117,109,46,99,97,108,108,40,115,111,117,114,99,101,44,32,112,114,111,112,41,41,10,32,32,32,32,32,32,32,32,32,32,116,97,114,103,101,116,91,112,114,111,112,93,32,61,32,115,111,117,114,99,101,91,112,114,111,112,93,59,10,32,32,32,32,32,32,125,10,32,32,32,32,114,101,116,117,114,110,32,116,97,114,103,101,116,59,10,32,32,125,59,10,32,32,118,97,114,32,95,95,112,117,98,108,105,99,70,105,101,108,100,32,61,32,40,111,98,106,44,32,107,101,121,44,32,118,97,108,117,101,41,32,61,62,32,95,95,100,101,102,78,111,114,109,97,108,80,114,111,112,40,111,98,106,44,32,116,121,112,101,111,102,32,107,101,121,32,33,61,61,32,34,115,121,109,98,111,108,34,32,63,32,107,101,121,32,43,32,34,34,32,58,32,107,101,121,44,32,118,97,108,117,101,41,59,10,32,32,118,97,114,32,95,95,97,115,121,110,99,32,61,32,40,95,95,116,104,105,115,44,32,95,95,97,114,103,117,109,101,110,116,115,44,32,103,101,110,101,114,97,116,111,114,41,32,61,62,32,123,10,32,32,32,32,114,101,116,117,114,110,32,110,101,119,32,80,114,111,109,105,115,101,40,40,114,101,115,111,108,118,101,44,32,114,101,106,101,99,116,41,32,61,62,32,123,10,32,32,32,32,32,32,118,97,114,32,102,117,108,102,105,108,108,101,100,32,61,32,40,118,97,108,117,101,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,116,114,121,32,123,10,32,32,32,32,32,32,32,32,32,32,115,116,101,112,40,103,101,110,101,114,97,116,111,114,46,110,101,120,116,40,118,97,108,117,101,41,41,59,10,32,32,32,32,32,32,32,32,125,32,99,97,116,99,104,32,40,101,41,32,123,10,32,32,32,32,32,32,32,32,32,32,114,101,106,101,99,116,40,101,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,118,97,114,32,114,101,106,101,99,116,101,100,32,61,32,40,118,97,108,117,101,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,116,114,121,32,123,10,32,32,32,32,32,32,32,32,32,32,115,116,101,112,40,103,101,110,101,114,97,116,111,114,46,116,104,114,111,119,40,118,97,108,117,101,41,41,59,10,32,32,32,32,32,32,32,32,125,32,99,97,116,99,104,32,40,101,41,32,123,10,32,32,32,32,32,32,32,32,32,32,114,101,106,101,99,116,40,101,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,118,97,114,32,115,116,101,112,32,61,32,40,120,41,32,61,62,32,120,46,100,111,110,101,32,63,32,114,101,115,111,108,118,101,40,120,46,118,97,108,117,101,41,32,58,32,80,114,111,109,105,115,101,46,114,101,115,111,108,118,101,40,120,46,118,97,108,117,101,41,46,116,104,101,110,40,102,117,108,102,105,108,108,101,100,44,32,114,101,106,101,99,116,101,100,41,59,10,32,32,32,32,32,32,115,116,101,112,40,40,103,101,110,101,114,97,116,111,114,32,61,32,103,101,110,101,114,97,116,111,114,46,97,112,112,108,121,40,95,95,116,104,105,115,44,32,95,95,97,114,103,117,109,101,110,116,115,41,41,46,110,101,120,116,40,41,41,59,10,32,32,32,32,125,41,59,10,32,32,125,59,10,10,32,32,47,47,32,115,114,99,47,97,110,105,109,97,116,105,111,110,45,102,114,97,109,101,45,109,97,110,97,103,101,114,46,116,115,10,32,32,118,97,114,32,87,101,98,65,110,105,109,97,116,105,111,110,70,114,97,109,101,83,116,114,97,116,101,103,121,32,61,32,99,108,97,115,115,32,123,10,32,32,32,32,114,101,113,117,101,115,116,65,110,105,109,97,116,105,111,110,70,114,97,109,101,40,99,97,108,108,98,97,99,107,41,32,123,10,32,32,32,32,32,32,114,101,116,117,114,110,32,114,101,113,117,101,115,116,65,110,105,109,97,116,105,111,110,70,114,97,109,101,40,99,97,108,108,98,97,99,107,41,59,10,32,32,32,32,125,10,32,32,32,32,99,97,110,99,101,108,65,110,105,109,97,116,105,111,110,70,114,97,109,101,40,105,100,41,32,123,10,32,32,32,32,32,32,99,97,110,99,101,108,65,110,105,109,97,116,105,111,110,70,114,97,109,101,40,105,100,41,59,10,32,32,32,32,125,10,32,32,125,59,10,32,32,118,97,114,32,78,111,100,101,65,110,105,109,97,116,105,111,110,70,114,97,109,101,83,116,114,97,116,101,103,121,32,61,32,99,108,97,115,115,32,123,10,32,32,32,32,99,111,110,115,116,114,117,99,116,111,114,40,41,32,123,10,32,32,32,32,32,32,95,95,112,117,98,108,105,99,70,105,101,108,100,40,116,104,105,115,44,32,34,95,108,97,115,116,72,97,110,100,108,101,73,100,34,44,32,48,41,59,10,32,32,32,32,32,32,95,95,112,117,98,108,105,99,70,105,101,108,100,40,116,104,105,115,44,32,34,95,108,97,115,116,73,109,109,101,100,105,97,116,101,34,44,32,110,117,108,108,41,59,10,32,32,32,32,125,10,32,32,32,32,114,101,113,117,101,115,116,65,110,105,109,97,116,105,111,110,70,114,97,109,101,40,99,97,108,108,98,97,99,107,41,32,123,10,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,108,97,115,116,72,97,110,100,108,101,73,100,32,62,61,32,78,117,109,98,101,114,46,77,65,88,95,83,65,70,69,95,73,78,84,69,71,69,82,41,32,123,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,108,97,115,116,72,97,110,100,108,101,73,100,32,61,32,48,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,116,104,105,115,46,95,108,97,115,116,72,97,110,100,108,101,73,100,32,43,61,32,49,59,10,32,32,32,32,32,32,116,104,105,115,46,95,108,97,115,116,73,109,109,101,100,105,97,116,101,32,61,32,115,101,116,73,109,109,101,100,105,97,116,101,40,40,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,99,97,108,108,98,97,99,107,40,68,97,116,101,46,110,111,119,40,41,41,59,10,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,116,104,105,115,46,95,108,97,115,116,72,97,110,100,108,101,73,100,59,10,32,32,32,32,125,10,32,32,32,32,99,97,110,99,101,108,65,110,105,109,97,116,105,111,110,70,114,97,109,101,40,95,105,100,41,32,123,10,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,108,97,115,116,73,109,109,101,100,105,97,116,101,41,32,123,10,32,32,32,32,32,32,32,32,99,108,101,97,114,73,109,109,101,100,105,97,116,101,40,116,104,105,115,46,95,108,97,115,116,73,109,109,101,100,105,97,116,101,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,125,10,32,32,125,59,10,32,32,118,97,114,32,65,110,105,109,97,116,105,111,110,70,114,97,109,101,77,97,110,97,103,101,114,32,61,32,99,108,97,115,115,32,123,10,32,32,32,32,99,111,110,115,116,114,117,99,116,111,114,40,41,32,123,10,32,32,32,32,32,32,95,95,112,117,98,108,105,99,70,105,101,108,100,40,116,104,105,115,44,32,34,95,115,116,114,97,116,101,103,121,34,41,59,10,32,32,32,32,32,32,116,104,105,115,46,95,115,116,114,97,116,101,103,121,32,61,32,116,121,112,101,111,102,32,114,101,113,117,101,115,116,65,110,105,109,97,116,105,111,110,70,114,97,109,101,32,61,61,61,32,34,102,117,110,99,116,105,111,110,34,32,63,32,110,101,119,32,87,101,98,65,110,105,109,97,116,105,111,110,70,114,97,109,101,83,116,114,97,116,101,103,121,40,41,32,58,32,110,101,119,32,78,111,100,101,65,110,105,109,97,116,105,111,110,70,114,97,109,101,83,116,114,97,116,101,103,121,40,41,59,10,32,32,32,32,125,10,32,32,32,32,114,101,113,117,101,115,116,65,110,105,109,97,116,105,111,110,70,114,97,109,101,40,99,97,108,108,98,97,99,107,41,32,123,10,32,32,32,32,32,32,114,101,116,117,114,110,32,116,104,105,115,46,95,115,116,114,97,116,101,103,121,46,114,101,113,117,101,115,116,65,110,105,109,97,116,105,111,110,70,114,97,109,101,40,99,97,108,108,98,97,99,107,41,59,10,32,32,32,32,125,10,32,32,32,32,99,97,110,99,101,108,65,110,105,109,97,116,105,111,110,70,114,97,109,101,40,105,100,41,32,123,10,32,32,32,32,32,32,116,104,105,115,46,95,115,116,114,97,116,101,103,121,46,99,97,110,99,101,108,65,110,105,109,97,116,105,111,110,70,114,97,109,101,40,105,100,41,59,10,32,32,32,32,125,10,32,32,125,59,10,10,32,32,47,47,32,115,114,99,47,99,111,110,115,116,97,110,116,115,46,116,115,10,32,32,118,97,114,32,73,83,95,66,82,79,87,83,69,82,32,61,32,116,121,112,101,111,102,32,119,105,110,100,111,119,32,33,61,61,32,34,117,110,100,101,102,105,110,101,100,34,32,38,38,32,116,121,112,101,111,102,32,119,105,110,100,111,119,46,100,111,99,117,109,101,110,116,32,33,61,61,32,34,117,110,100,101,102,105,110,101,100,34,59,10,32,32,118,97,114,32,90,73,80,95,83,73,71,78,65,84,85,82,69,32,61,32,110,101,119,32,85,105,110,116,56,65,114,114,97,121,40,91,56,48,44,32,55,53,44,32,51,44,32,52,93,41,59,10,32,32,118,97,114,32,76,79,84,84,73,69,95,74,83,79,78,95,77,65,78,68,65,84,79,82,89,95,70,73,69,76,68,83,32,61,32,91,34,118,34,44,32,34,105,112,34,44,32,34,111,112,34,44,32,34,108,97,121,101,114,115,34,44,32,34,102,114,34,44,32,34,119,34,44,32,34,104,34,93,59,10,32,32,118,97,114,32,80,65,67,75,65,71,69,95,86,69,82,83,73,79,78,32,61,32,34,48,46,51,54,46,49,34,59,10,32,32,118,97,114,32,80,65,67,75,65,71,69,95,78,65,77,69,32,61,32,34,64,108,111,116,116,105,101,102,105,108,101,115,47,100,111,116,108,111,116,116,105,101,45,119,101,98,34,59,10,32,32,118,97,114,32,68,69,70,65,85,76,84,95,68,80,82,95,70,65,67,84,79,82,32,61,32,48,46,55,53,59,10,10,32,32,47,47,32,115,114,99,47,99,111,114,101,47,100,111,116,108,111,116,116,105,101,45,112,108,97,121,101,114,46,106,115,10,32,32,118,97,114,32,99,114,101,97,116,101,68,111,116,76,111,116,116,105,101,80,108,97,121,101,114,77,111,100,117,108,101,32,61,32,40,40,41,32,61,62,32,123,10,32,32,32,32,118,97,114,32,95,97,59,10,32,32,32,32,118,97,114,32,95,115,99,114,105,112,116,78,97,109,101,32,61,32,116,121,112,101,111,102,32,100,111,99,117,109,101,110,116,32,33,61,32,34,117,110,100,101,102,105,110,101,100,34,32,63,32,40,95,97,32,61,32,100,111,99,117,109,101,110,116,46,99,117,114,114,101,110,116,83,99,114,105,112,116,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,115,114,99,32,58,32,118,111,105,100,32,48,59,10,32,32,32,32,114,101,116,117,114,110,32,102,117,110,99,116,105,111,110,40,109,111,100,117,108,101,65,114,103,32,61,32,123,125,41,32,123,10,32,32,32,32,32,32,118,97,114,32,109,111,100,117,108,101,82,116,110,59,10,32,32,32,32,32,32,118,97,114,32,107,32,61,32,109,111,100,117,108,101,65,114,103,44,32,97,97,44,32,98,97,44,32,99,97,32,61,32,110,101,119,32,80,114,111,109,105,115,101,40,40,97,44,32,98,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,97,97,32,61,32,97,59,10,32,32,32,32,32,32,32,32,98,97,32,61,32,98,59,10,32,32,32,32,32,32,125,41,44,32,100,97,32,61,32,79,98,106,101,99,116,46,97,115,115,105,103,110,40,123,125,44,32,107,41,44,32,101,97,32,61,32,34,46,47,116,104,105,115,46,112,114,111,103,114,97,109,34,44,32,112,32,61,32,34,34,44,32,102,97,59,10,32,32,32,32,32,32,34,117,110,100,101,102,105,110,101,100,34,32,33,61,32,116,121,112,101,111,102,32,100,111,99,117,109,101,110,116,32,38,38,32,100,111,99,117,109,101,110,116,46,99,117,114,114,101,110,116,83,99,114,105,112,116,32,38,38,32,40,112,32,61,32,100,111,99,117,109,101,110,116,46,99,117,114,114,101,110,116,83,99,114,105,112,116,46,115,114,99,41,59,10,32,32,32,32,32,32,95,115,99,114,105,112,116,78,97,109,101,32,38,38,32,40,112,32,61,32,95,115,99,114,105,112,116,78,97,109,101,41,59,10,32,32,32,32,32,32,112,46,115,116,97,114,116,115,87,105,116,104,40,34,98,108,111,98,58,34,41,32,63,32,112,32,61,32,34,34,32,58,32,112,32,61,32,112,46,115,117,98,115,116,114,40,48,44,32,112,46,114,101,112,108,97,99,101,40,47,91,63,35,93,46,42,47,44,32,34,34,41,46,108,97,115,116,73,110,100,101,120,79,102,40,34,47,34,41,32,43,32,49,41,59,10,32,32,32,32,32,32,102,97,32,61,32,40,97,41,32,61,62,32,102,101,116,99,104,40,97,44,32,123,32,99,114,101,100,101,110,116,105,97,108,115,58,32,34,115,97,109,101,45,111,114,105,103,105,110,34,32,125,41,46,116,104,101,110,40,10,32,32,32,32,32,32,32,32,40,98,41,32,61,62,32,98,46,111,107,32,63,32,98,46,97,114,114,97,121,66,117,102,102,101,114,40,41,32,58,32,80,114,111,109,105,115,101,46,114,101,106,101,99,116,40,69,114,114,111,114,40,98,46,115,116,97,116,117,115,32,43,32,34,32,58,32,34,32,43,32,98,46,117,114,108,41,41,10,32,32,32,32,32,32,41,59,10,32,32,32,32,32,32,118,97,114,32,106,97,32,61,32,107,46,112,114,105,110,116,32,124,124,32,99,111,110,115,111,108,101,46,108,111,103,46,98,105,110,100,40,99,111,110,115,111,108,101,41,44,32,116,32,61,32,107,46,112,114,105,110,116,69,114,114,32,124,124,32,99,111,110,115,111,108,101,46,101,114,114,111,114,46,98,105,110,100,40,99,111,110,115,111,108,101,41,59,10,32,32,32,32,32,32,79,98,106,101,99,116,46,97,115,115,105,103,110,40,107,44,32,100,97,41,59,10,32,32,32,32,32,32,100,97,32,61,32,110,117,108,108,59,10,32,32,32,32,32,32,107,46,116,104,105,115,80,114,111,103,114,97,109,32,38,38,32,40,101,97,32,61,32,107,46,116,104,105,115,80,114,111,103,114,97,109,41,59,10,32,32,32,32,32,32,118,97,114,32,107,97,32,61,32,107,46,119,97,115,109,66,105,110,97,114,121,44,32,108,97,44,32,109,97,32,61,32,102,97,108,115,101,44,32,110,97,44,32,117,44,32,120,44,32,121,44,32,122,44,32,67,44,32,68,44,32,111,97,44,32,112,97,59,10,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,113,97,40,41,32,123,10,32,32,32,32,32,32,32,32,118,97,114,32,97,32,61,32,108,97,46,98,117,102,102,101,114,59,10,32,32,32,32,32,32,32,32,107,46,72,69,65,80,56,32,61,32,117,32,61,32,110,101,119,32,73,110,116,56,65,114,114,97,121,40,97,41,59,10,32,32,32,32,32,32,32,32,107,46,72,69,65,80,49,54,32,61,32,121,32,61,32,110,101,119,32,73,110,116,49,54,65,114,114,97,121,40,97,41,59,10,32,32,32,32,32,32,32,32,107,46,72,69,65,80,85,56,32,61,32,120,32,61,32,110,101,119,32,85,105,110,116,56,65,114,114,97,121,40,97,41,59,10,32,32,32,32,32,32,32,32,107,46,72,69,65,80,85,49,54,32,61,32,122,32,61,32,110,101,119,32,85,105,110,116,49,54,65,114,114,97,121,40,97,41,59,10,32,32,32,32,32,32,32,32,107,46,72,69,65,80,51,50,32,61,32,67,32,61,32,110,101,119,32,73,110,116,51,50,65,114,114,97,121,40,97,41,59,10,32,32,32,32,32,32,32,32,107,46,72,69,65,80,85,51,50,32,61,32,68,32,61,32,110,101,119,32,85,105,110,116,51,50,65,114,114,97,121,40,97,41,59,10,32,32,32,32,32,32,32,32,107,46,72,69,65,80,70,51,50,32,61,32,111,97,32,61,32,110,101,119,32,70,108,111,97,116,51,50,65,114,114,97,121,40,97,41,59,10,32,32,32,32,32,32,32,32,107,46,72,69,65,80,70,54,52,32,61,32,112,97,32,61,32,110,101,119,32,70,108,111,97,116,54,52,65,114,114,97,121,40,97,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,118,97,114,32,114,97,32,61,32,91,93,44,32,115,97,32,61,32,91,93,44,32,116,97,32,61,32,91,93,59,10,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,117,97,40,41,32,123,10,32,32,32,32,32,32,32,32,118,97,114,32,97,32,61,32,107,46,112,114,101,82,117,110,46,115,104,105,102,116,40,41,59,10,32,32,32,32,32,32,32,32,114,97,46,117,110,115,104,105,102,116,40,97,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,118,97,114,32,70,32,61,32,48,44,32,118,97,32,61,32,110,117,108,108,44,32,71,32,61,32,110,117,108,108,59,10,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,119,97,40,97,41,32,123,10,32,32,32,32,32,32,32,32,118,97,114,32,95,97,50,59,10,32,32,32,32,32,32,32,32,40,95,97,50,32,61,32,107,46,111,110,65,98,111,114,116,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,50,46,99,97,108,108,40,107,44,32,97,41,59,10,32,32,32,32,32,32,32,32,97,32,61,32,34,65,98,111,114,116,101,100,40,34,32,43,32,97,32,43,32,34,41,34,59,10,32,32,32,32,32,32,32,32,116,40,97,41,59,10,32,32,32,32,32,32,32,32,109,97,32,61,32,116,114,117,101,59,10,32,32,32,32,32,32,32,32,97,32,61,32,110,101,119,32,87,101,98,65,115,115,101,109,98,108,121,46,82,117,110,116,105,109,101,69,114,114,111,114,40,97,32,43,32,34,46,32,66,117,105,108,100,32,119,105,116,104,32,45,115,65,83,83,69,82,84,73,79,78,83,32,102,111,114,32,109,111,114,101,32,105,110,102,111,46,34,41,59,10,32,32,32,32,32,32,32,32,98,97,40,97,41,59,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,97,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,118,97,114,32,120,97,32,61,32,40,97,41,32,61,62,32,97,46,115,116,97,114,116,115,87,105,116,104,40,34,100,97,116,97,58,97,112,112,108,105,99,97,116,105,111,110,47,111,99,116,101,116,45,115,116,114,101,97,109,59,98,97,115,101,54,52,44,34,41,44,32,121,97,59,10,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,122,97,40,97,41,32,123,10,32,32,32,32,32,32,32,32,105,102,32,40,97,32,61,61,32,121,97,32,38,38,32,107,97,41,32,114,101,116,117,114,110,32,110,101,119,32,85,105,110,116,56,65,114,114,97,121,40,107,97,41,59,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,34,98,111,116,104,32,97,115,121,110,99,32,97,110,100,32,115,121,110,99,32,102,101,116,99,104,105,110,103,32,111,102,32,116,104,101,32,119,97,115,109,32,102,97,105,108,101,100,34,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,65,97,40,97,41,32,123,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,107,97,32,63,32,80,114,111,109,105,115,101,46,114,101,115,111,108,118,101,40,41,46,116,104,101,110,40,40,41,32,61,62,32,122,97,40,97,41,41,32,58,32,102,97,40,97,41,46,116,104,101,110,40,10,32,32,32,32,32,32,32,32,32,32,40,98,41,32,61,62,32,110,101,119,32,85,105,110,116,56,65,114,114,97,121,40,98,41,44,10,32,32,32,32,32,32,32,32,32,32,40,41,32,61,62,32,122,97,40,97,41,10,32,32,32,32,32,32,32,32,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,66,97,40,97,44,32,98,44,32,99,41,32,123,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,65,97,40,97,41,46,116,104,101,110,40,40,100,41,32,61,62,32,87,101,98,65,115,115,101,109,98,108,121,46,105,110,115,116,97,110,116,105,97,116,101,40,100,44,32,98,41,41,46,116,104,101,110,40,99,44,32,40,100,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,116,40,96,102,97,105,108,101,100,32,116,111,32,97,115,121,110,99,104,114,111,110,111,117,115,108,121,32,112,114,101,112,97,114,101,32,119,97,115,109,58,32,36,123,100,125,96,41,59,10,32,32,32,32,32,32,32,32,32,32,119,97,40,100,41,59,10,32,32,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,67,97,40,97,44,32,98,41,32,123,10,32,32,32,32,32,32,32,32,118,97,114,32,99,32,61,32,121,97,59,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,107,97,32,124,124,32,34,102,117,110,99,116,105,111,110,34,32,33,61,32,116,121,112,101,111,102,32,87,101,98,65,115,115,101,109,98,108,121,46,105,110,115,116,97,110,116,105,97,116,101,83,116,114,101,97,109,105,110,103,32,124,124,32,120,97,40,99,41,32,124,124,32,34,102,117,110,99,116,105,111,110,34,32,33,61,32,116,121,112,101,111,102,32,102,101,116,99,104,32,63,32,66,97,40,99,44,32,97,44,32,98,41,32,58,32,102,101,116,99,104,40,99,44,32,123,32,99,114,101,100,101,110,116,105,97,108,115,58,32,34,115,97,109,101,45,111,114,105,103,105,110,34,32,125,41,46,116,104,101,110,40,10,32,32,32,32,32,32,32,32,32,32,40,100,41,32,61,62,32,87,101,98,65,115,115,101,109,98,108,121,46,105,110,115,116,97,110,116,105,97,116,101,83,116,114,101,97,109,105,110,103,40,100,44,32,97,41,46,116,104,101,110,40,98,44,32,102,117,110,99,116,105,111,110,40,101,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,116,40,96,119,97,115,109,32,115,116,114,101,97,109,105,110,103,32,99,111,109,112,105,108,101,32,102,97,105,108,101,100,58,32,36,123,101,125,96,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,116,40,34,102,97,108,108,105,110,103,32,98,97,99,107,32,116,111,32,65,114,114,97,121,66,117,102,102,101,114,32,105,110,115,116,97,110,116,105,97,116,105,111,110,34,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,66,97,40,99,44,32,97,44,32,98,41,59,10,32,32,32,32,32,32,32,32,32,32,125,41,10,32,32,32,32,32,32,32,32,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,68,97,40,97,41,32,123,10,32,32,32,32,32,32,32,32,116,104,105,115,46,110,97,109,101,32,61,32,34,69,120,105,116,83,116,97,116,117,115,34,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,109,101,115,115,97,103,101,32,61,32,96,80,114,111,103,114,97,109,32,116,101,114,109,105,110,97,116,101,100,32,119,105,116,104,32,101,120,105,116,40,36,123,97,125,41,96,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,115,116,97,116,117,115,32,61,32,97,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,118,97,114,32,69,97,32,61,32,40,97,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,102,111,114,32,40,59,32,48,32,60,32,97,46,108,101,110,103,116,104,59,32,41,32,97,46,115,104,105,102,116,40,41,40,107,41,59,10,32,32,32,32,32,32,125,44,32,70,97,32,61,32,107,46,110,111,69,120,105,116,82,117,110,116,105,109,101,32,124,124,32,116,114,117,101,44,32,71,97,32,61,32,34,117,110,100,101,102,105,110,101,100,34,32,33,61,32,116,121,112,101,111,102,32,84,101,120,116,68,101,99,111,100,101,114,32,63,32,110,101,119,32,84,101,120,116,68,101,99,111,100,101,114,40,41,32,58,32,118,111,105,100,32,48,44,32,72,32,61,32,40,97,44,32,98,44,32,99,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,118,97,114,32,100,32,61,32,98,32,43,32,99,59,10,32,32,32,32,32,32,32,32,102,111,114,32,40,99,32,61,32,98,59,32,97,91,99,93,32,38,38,32,33,40,99,32,62,61,32,100,41,59,32,41,32,43,43,99,59,10,32,32,32,32,32,32,32,32,105,102,32,40,49,54,32,60,32,99,32,45,32,98,32,38,38,32,97,46,98,117,102,102,101,114,32,38,38,32,71,97,41,32,114,101,116,117,114,110,32,71,97,46,100,101,99,111,100,101,40,97,46,115,117,98,97,114,114,97,121,40,98,44,32,99,41,41,59,10,32,32,32,32,32,32,32,32,102,111,114,32,40,100,32,61,32,34,34,59,32,98,32,60,32,99,59,32,41,32,123,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,101,32,61,32,97,91,98,43,43,93,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,101,32,38,32,49,50,56,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,102,32,61,32,97,91,98,43,43,93,32,38,32,54,51,59,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,49,57,50,32,61,61,32,40,101,32,38,32,50,50,52,41,41,32,100,32,43,61,32,83,116,114,105,110,103,46,102,114,111,109,67,104,97,114,67,111,100,101,40,40,101,32,38,32,51,49,41,32,60,60,32,54,32,124,32,102,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,101,108,115,101,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,104,32,61,32,97,91,98,43,43,93,32,38,32,54,51,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,101,32,61,32,50,50,52,32,61,61,32,40,101,32,38,32,50,52,48,41,32,63,32,40,101,32,38,32,49,53,41,32,60,60,32,49,50,32,124,32,102,32,60,60,32,54,32,124,32,104,32,58,32,40,101,32,38,32,55,41,32,60,60,32,49,56,32,124,32,102,32,60,60,32,49,50,32,124,32,104,32,60,60,32,54,32,124,32,97,91,98,43,43,93,32,38,32,54,51,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,54,53,53,51,54,32,62,32,101,32,63,32,100,32,43,61,32,83,116,114,105,110,103,46,102,114,111,109,67,104,97,114,67,111,100,101,40,101,41,32,58,32,40,101,32,45,61,32,54,53,53,51,54,44,32,100,32,43,61,32,83,116,114,105,110,103,46,102,114,111,109,67,104,97,114,67,111,100,101,40,53,53,50,57,54,32,124,32,101,32,62,62,32,49,48,44,32,53,54,51,50,48,32,124,32,101,32,38,32,49,48,50,51,41,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,125,32,101,108,115,101,32,100,32,43,61,32,83,116,114,105,110,103,46,102,114,111,109,67,104,97,114,67,111,100,101,40,101,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,100,59,10,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,99,108,97,115,115,32,72,97,32,123,10,32,32,32,32,32,32,32,32,99,111,110,115,116,114,117,99,116,111,114,40,97,41,32,123,10,32,32,32,32,32,32,32,32,32,32,116,104,105,115,46,67,97,32,61,32,97,32,45,32,50,52,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,118,97,114,32,73,97,32,61,32,48,44,32,74,97,32,61,32,48,44,32,73,32,61,32,40,97,44,32,98,44,32,99,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,118,97,114,32,100,32,61,32,120,59,10,32,32,32,32,32,32,32,32,105,102,32,40,48,32,60,32,99,41,32,123,10,32,32,32,32,32,32,32,32,32,32,99,32,61,32,98,32,43,32,99,32,45,32,49,59,10,32,32,32,32,32,32,32,32,32,32,102,111,114,32,40,118,97,114,32,101,32,61,32,48,59,32,101,32,60,32,97,46,108,101,110,103,116,104,59,32,43,43,101,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,102,32,61,32,97,46,99,104,97,114,67,111,100,101,65,116,40,101,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,53,53,50,57,54,32,60,61,32,102,32,38,38,32,53,55,51,52,51,32,62,61,32,102,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,104,32,61,32,97,46,99,104,97,114,67,111,100,101,65,116,40,43,43,101,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,32,61,32,54,53,53,51,54,32,43,32,40,40,102,32,38,32,49,48,50,51,41,32,60,60,32,49,48,41,32,124,32,104,32,38,32,49,48,50,51,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,49,50,55,32,62,61,32,102,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,98,32,62,61,32,99,41,32,98,114,101,97,107,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,100,91,98,43,43,93,32,61,32,102,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,32,101,108,115,101,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,50,48,52,55,32,62,61,32,102,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,98,32,43,32,49,32,62,61,32,99,41,32,98,114,101,97,107,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,100,91,98,43,43,93,32,61,32,49,57,50,32,124,32,102,32,62,62,32,54,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,32,101,108,115,101,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,54,53,53,51,53,32,62,61,32,102,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,98,32,43,32,50,32,62,61,32,99,41,32,98,114,101,97,107,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,100,91,98,43,43,93,32,61,32,50,50,52,32,124,32,102,32,62,62,32,49,50,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,32,101,108,115,101,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,98,32,43,32,51,32,62,61,32,99,41,32,98,114,101,97,107,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,100,91,98,43,43,93,32,61,32,50,52,48,32,124,32,102,32,62,62,32,49,56,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,100,91,98,43,43,93,32,61,32,49,50,56,32,124,32,102,32,62,62,32,49,50,32,38,32,54,51,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,100,91,98,43,43,93,32,61,32,49,50,56,32,124,32,102,32,62,62,32,54,32,38,32,54,51,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,100,91,98,43,43,93,32,61,32,49,50,56,32,124,32,102,32,38,32,54,51,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,100,91,98,93,32,61,32,48,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,44,32,75,97,32,61,32,123,125,44,32,76,97,32,61,32,40,97,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,102,111,114,32,40,59,32,97,46,108,101,110,103,116,104,59,32,41,32,123,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,98,32,61,32,97,46,112,111,112,40,41,59,10,32,32,32,32,32,32,32,32,32,32,97,46,112,111,112,40,41,40,98,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,74,40,97,41,32,123,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,116,104,105,115,46,102,114,111,109,87,105,114,101,84,121,112,101,40,68,91,97,32,62,62,32,50,93,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,118,97,114,32,75,32,61,32,123,125,44,32,76,32,61,32,123,125,44,32,77,97,32,61,32,123,125,44,32,77,44,32,79,32,61,32,40,97,44,32,98,44,32,99,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,100,40,103,41,32,123,10,32,32,32,32,32,32,32,32,32,32,103,32,61,32,99,40,103,41,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,103,46,108,101,110,103,116,104,32,33,61,61,32,97,46,108,101,110,103,116,104,41,32,116,104,114,111,119,32,110,101,119,32,77,40,34,77,105,115,109,97,116,99,104,101,100,32,116,121,112,101,32,99,111,110,118,101,114,116,101,114,32,99,111,117,110,116,34,41,59,10,32,32,32,32,32,32,32,32,32,32,102,111,114,32,40,118,97,114,32,108,32,61,32,48,59,32,108,32,60,32,97,46,108,101,110,103,116,104,59,32,43,43,108,41,32,78,40,97,91,108,93,44,32,103,91,108,93,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,97,46,102,111,114,69,97,99,104,40,40,103,41,32,61,62,32,77,97,91,103,93,32,61,32,98,41,59,10,32,32,32,32,32,32,32,32,118,97,114,32,101,32,61,32,65,114,114,97,121,40,98,46,108,101,110,103,116,104,41,44,32,102,32,61,32,91,93,44,32,104,32,61,32,48,59,10,32,32,32,32,32,32,32,32,98,46,102,111,114,69,97,99,104,40,40,103,44,32,108,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,76,46,104,97,115,79,119,110,80,114,111,112,101,114,116,121,40,103,41,32,63,32,101,91,108,93,32,61,32,76,91,103,93,32,58,32,40,102,46,112,117,115,104,40,103,41,44,32,75,46,104,97,115,79,119,110,80,114,111,112,101,114,116,121,40,103,41,32,124,124,32,40,75,91,103,93,32,61,32,91,93,41,44,32,75,91,103,93,46,112,117,115,104,40,40,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,101,91,108,93,32,61,32,76,91,103,93,59,10,32,32,32,32,32,32,32,32,32,32,32,32,43,43,104,59,10,32,32,32,32,32,32,32,32,32,32,32,32,104,32,61,61,61,32,102,46,108,101,110,103,116,104,32,38,38,32,100,40,101,41,59,10,32,32,32,32,32,32,32,32,32,32,125,41,41,59,10,32,32,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,32,32,48,32,61,61,61,32,102,46,108,101,110,103,116,104,32,38,38,32,100,40,101,41,59,10,32,32,32,32,32,32,125,44,32,78,97,44,32,80,32,61,32,40,97,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,102,111,114,32,40,118,97,114,32,98,32,61,32,34,34,59,32,120,91,97,93,59,32,41,32,98,32,43,61,32,78,97,91,120,91,97,43,43,93,93,59,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,98,59,10,32,32,32,32,32,32,125,44,32,81,59,10,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,79,97,40,97,44,32,98,44,32,99,32,61,32,123,125,41,32,123,10,32,32,32,32,32,32,32,32,118,97,114,32,100,32,61,32,98,46,110,97,109,101,59,10,32,32,32,32,32,32,32,32,105,102,32,40,33,97,41,32,116,104,114,111,119,32,110,101,119,32,81,40,96,116,121,112,101,32,34,36,123,100,125,34,32,109,117,115,116,32,104,97,118,101,32,97,32,112,111,115,105,116,105,118,101,32,105,110,116,101,103,101,114,32,116,121,112,101,105,100,32,112,111,105,110,116,101,114,96,41,59,10,32,32,32,32,32,32,32,32,105,102,32,40,76,46,104,97,115,79,119,110,80,114,111,112,101,114,116,121,40,97,41,41,32,123,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,99,46,104,98,41,32,114,101,116,117,114,110,59,10,32,32,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,81,40,96,67,97,110,110,111,116,32,114,101,103,105,115,116,101,114,32,116,121,112,101,32,39,36,123,100,125,39,32,116,119,105,99,101,96,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,76,91,97,93,32,61,32,98,59,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,32,77,97,91,97,93,59,10,32,32,32,32,32,32,32,32,75,46,104,97,115,79,119,110,80,114,111,112,101,114,116,121,40,97,41,32,38,38,32,40,98,32,61,32,75,91,97,93,44,32,100,101,108,101,116,101,32,75,91,97,93,44,32,98,46,102,111,114,69,97,99,104,40,40,101,41,32,61,62,32,101,40,41,41,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,78,40,97,44,32,98,44,32,99,32,61,32,123,125,41,32,123,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,79,97,40,97,44,32,98,44,32,99,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,118,97,114,32,80,97,32,61,32,40,97,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,81,40,97,46,65,97,46,68,97,46,66,97,46,110,97,109,101,32,43,32,34,32,105,110,115,116,97,110,99,101,32,97,108,114,101,97,100,121,32,100,101,108,101,116,101,100,34,41,59,10,32,32,32,32,32,32,125,44,32,81,97,32,61,32,102,97,108,115,101,44,32,82,97,32,61,32,40,41,32,61,62,32,123,10,32,32,32,32,32,32,125,44,32,84,97,32,61,32,40,97,44,32,98,44,32,99,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,105,102,32,40,98,32,61,61,61,32,99,41,32,114,101,116,117,114,110,32,97,59,10,32,32,32,32,32,32,32,32,105,102,32,40,118,111,105,100,32,48,32,61,61,61,32,99,46,71,97,41,32,114,101,116,117,114,110,32,110,117,108,108,59,10,32,32,32,32,32,32,32,32,97,32,61,32,84,97,40,97,44,32,98,44,32,99,46,71,97,41,59,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,110,117,108,108,32,61,61,61,32,97,32,63,32,110,117,108,108,32,58,32,99,46,36,97,40,97,41,59,10,32,32,32,32,32,32,125,44,32,85,97,32,61,32,123,125,44,32,82,32,61,32,91,93,44,32,86,97,32,61,32,40,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,102,111,114,32,40,59,32,82,46,108,101,110,103,116,104,59,32,41,32,123,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,97,32,61,32,82,46,112,111,112,40,41,59,10,32,32,32,32,32,32,32,32,32,32,97,46,65,97,46,77,97,32,61,32,102,97,108,115,101,59,10,32,32,32,32,32,32,32,32,32,32,97,91,34,100,101,108,101,116,101,34,93,40,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,44,32,87,97,44,32,88,97,32,61,32,123,125,44,32,89,97,32,61,32,40,97,44,32,98,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,105,102,32,40,118,111,105,100,32,48,32,61,61,61,32,98,41,32,116,104,114,111,119,32,110,101,119,32,81,40,34,112,116,114,32,115,104,111,117,108,100,32,110,111,116,32,98,101,32,117,110,100,101,102,105,110,101,100,34,41,59,10,32,32,32,32,32,32,32,32,102,111,114,32,40,59,32,97,46,71,97,59,32,41,32,98,32,61,32,97,46,80,97,40,98,41,44,32,97,32,61,32,97,46,71,97,59,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,88,97,91,98,93,59,10,32,32,32,32,32,32,125,44,32,36,97,32,61,32,40,97,44,32,98,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,105,102,32,40,33,98,46,68,97,32,124,124,32,33,98,46,67,97,41,32,116,104,114,111,119,32,110,101,119,32,77,40,34,109,97,107,101,67,108,97,115,115,72,97,110,100,108,101,32,114,101,113,117,105,114,101,115,32,112,116,114,32,97,110,100,32,112,116,114,84,121,112,101,34,41,59,10,32,32,32,32,32,32,32,32,105,102,32,40,33,33,98,46,72,97,32,33,61,61,32,33,33,98,46,69,97,41,32,116,104,114,111,119,32,110,101,119,32,77,40,34,66,111,116,104,32,115,109,97,114,116,80,116,114,84,121,112,101,32,97,110,100,32,115,109,97,114,116,80,116,114,32,109,117,115,116,32,98,101,32,115,112,101,99,105,102,105,101,100,34,41,59,10,32,32,32,32,32,32,32,32,98,46,99,111,117,110,116,32,61,32,123,32,118,97,108,117,101,58,32,49,32,125,59,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,90,97,40,79,98,106,101,99,116,46,99,114,101,97,116,101,40,97,44,32,123,32,65,97,58,32,123,32,118,97,108,117,101,58,32,98,44,32,119,114,105,116,97,98,108,101,58,32,116,114,117,101,32,125,32,125,41,41,59,10,32,32,32,32,32,32,125,44,32,90,97,32,61,32,40,97,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,105,102,32,40,34,117,110,100,101,102,105,110,101,100,34,32,61,61,61,32,116,121,112,101,111,102,32,70,105,110,97,108,105,122,97,116,105,111,110,82,101,103,105,115,116,114,121,41,32,114,101,116,117,114,110,32,90,97,32,61,32,40,98,41,32,61,62,32,98,44,32,97,59,10,32,32,32,32,32,32,32,32,81,97,32,61,32,110,101,119,32,70,105,110,97,108,105,122,97,116,105,111,110,82,101,103,105,115,116,114,121,40,40,98,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,98,32,61,32,98,46,65,97,59,10,32,32,32,32,32,32,32,32,32,32,45,45,98,46,99,111,117,110,116,46,118,97,108,117,101,59,10,32,32,32,32,32,32,32,32,32,32,48,32,61,61,61,32,98,46,99,111,117,110,116,46,118,97,108,117,101,32,38,38,32,40,98,46,69,97,32,63,32,98,46,72,97,46,75,97,40,98,46,69,97,41,32,58,32,98,46,68,97,46,66,97,46,75,97,40,98,46,67,97,41,41,59,10,32,32,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,32,32,90,97,32,61,32,40,98,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,99,32,61,32,98,46,65,97,59,10,32,32,32,32,32,32,32,32,32,32,99,46,69,97,32,38,38,32,81,97,46,114,101,103,105,115,116,101,114,40,98,44,32,123,32,65,97,58,32,99,32,125,44,32,98,41,59,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,98,59,10,32,32,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,32,32,82,97,32,61,32,40,98,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,81,97,46,117,110,114,101,103,105,115,116,101,114,40,98,41,59,10,32,32,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,90,97,40,97,41,59,10,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,97,98,40,41,32,123,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,118,97,114,32,98,98,32,61,32,40,97,44,32,98,41,32,61,62,32,79,98,106,101,99,116,46,100,101,102,105,110,101,80,114,111,112,101,114,116,121,40,98,44,32,34,110,97,109,101,34,44,32,123,32,118,97,108,117,101,58,32,97,32,125,41,44,32,99,98,32,61,32,40,97,44,32,98,44,32,99,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,105,102,32,40,118,111,105,100,32,48,32,61,61,61,32,97,91,98,93,46,70,97,41,32,123,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,100,32,61,32,97,91,98,93,59,10,32,32,32,32,32,32,32,32,32,32,97,91,98,93,32,61,32,102,117,110,99,116,105,111,110,40,46,46,46,101,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,33,97,91,98,93,46,70,97,46,104,97,115,79,119,110,80,114,111,112,101,114,116,121,40,101,46,108,101,110,103,116,104,41,41,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,81,40,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,96,70,117,110,99,116,105,111,110,32,39,36,123,99,125,39,32,99,97,108,108,101,100,32,119,105,116,104,32,97,110,32,105,110,118,97,108,105,100,32,110,117,109,98,101,114,32,111,102,32,97,114,103,117,109,101,110,116,115,32,40,36,123,101,46,108,101,110,103,116,104,125,41,32,45,32,101,120,112,101,99,116,115,32,111,110,101,32,111,102,32,40,36,123,97,91,98,93,46,70,97,125,41,33,96,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,97,91,98,93,46,70,97,91,101,46,108,101,110,103,116,104,93,46,97,112,112,108,121,40,116,104,105,115,44,32,101,41,59,10,32,32,32,32,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,32,32,32,32,97,91,98,93,46,70,97,32,61,32,91,93,59,10,32,32,32,32,32,32,32,32,32,32,97,91,98,93,46,70,97,91,100,46,81,97,93,32,61,32,100,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,44,32,100,98,32,61,32,40,97,44,32,98,44,32,99,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,105,102,32,40,107,46,104,97,115,79,119,110,80,114,111,112,101,114,116,121,40,97,41,41,32,123,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,118,111,105,100,32,48,32,61,61,61,32,99,32,124,124,32,118,111,105,100,32,48,32,33,61,61,32,107,91,97,93,46,70,97,32,38,38,32,118,111,105,100,32,48,32,33,61,61,32,107,91,97,93,46,70,97,91,99,93,41,10,32,32,32,32,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,81,40,96,67,97,110,110,111,116,32,114,101,103,105,115,116,101,114,32,112,117,98,108,105,99,32,110,97,109,101,32,39,36,123,97,125,39,32,116,119,105,99,101,96,41,59,10,32,32,32,32,32,32,32,32,32,32,99,98,40,107,44,32,97,44,32,97,41,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,107,46,104,97,115,79,119,110,80,114,111,112,101,114,116,121,40,99,41,41,10,32,32,32,32,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,81,40,96,67,97,110,110,111,116,32,114,101,103,105,115,116,101,114,32,109,117,108,116,105,112,108,101,32,111,118,101,114,108,111,97,100,115,32,111,102,32,97,32,102,117,110,99,116,105,111,110,32,119,105,116,104,32,116,104,101,32,115,97,109,101,32,110,117,109,98,101,114,32,111,102,32,97,114,103,117,109,101,110,116,115,32,40,36,123,99,125,41,33,96,41,59,10,32,32,32,32,32,32,32,32,32,32,107,91,97,93,46,70,97,91,99,93,32,61,32,98,59,10,32,32,32,32,32,32,32,32,125,32,101,108,115,101,32,107,91,97,93,32,61,32,98,44,32,118,111,105,100,32,48,32,33,61,61,32,99,32,38,38,32,40,107,91,97,93,46,113,98,32,61,32,99,41,59,10,32,32,32,32,32,32,125,44,32,101,98,32,61,32,40,97,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,105,102,32,40,118,111,105,100,32,48,32,61,61,61,32,97,41,32,114,101,116,117,114,110,32,34,95,117,110,107,110,111,119,110,34,59,10,32,32,32,32,32,32,32,32,97,32,61,32,97,46,114,101,112,108,97,99,101,40,47,91,94,97,45,122,65,45,90,48,45,57,95,93,47,103,44,32,34,36,34,41,59,10,32,32,32,32,32,32,32,32,118,97,114,32,98,32,61,32,97,46,99,104,97,114,67,111,100,101,65,116,40,48,41,59,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,52,56,32,60,61,32,98,32,38,38,32,53,55,32,62,61,32,98,32,63,32,96,95,36,123,97,125,96,32,58,32,97,59,10,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,102,98,40,97,44,32,98,44,32,99,44,32,100,44,32,101,44,32,102,44,32,104,44,32,103,41,32,123,10,32,32,32,32,32,32,32,32,116,104,105,115,46,110,97,109,101,32,61,32,97,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,99,111,110,115,116,114,117,99,116,111,114,32,61,32,98,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,78,97,32,61,32,99,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,75,97,32,61,32,100,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,71,97,32,61,32,101,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,98,98,32,61,32,102,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,80,97,32,61,32,104,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,36,97,32,61,32,103,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,106,98,32,61,32,91,93,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,118,97,114,32,103,98,32,61,32,40,97,44,32,98,44,32,99,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,102,111,114,32,40,59,32,98,32,33,61,61,32,99,59,32,41,32,123,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,33,98,46,80,97,41,32,116,104,114,111,119,32,110,101,119,32,81,40,96,69,120,112,101,99,116,101,100,32,110,117,108,108,32,111,114,32,105,110,115,116,97,110,99,101,32,111,102,32,36,123,99,46,110,97,109,101,125,44,32,103,111,116,32,97,110,32,105,110,115,116,97,110,99,101,32,111,102,32,36,123,98,46,110,97,109,101,125,96,41,59,10,32,32,32,32,32,32,32,32,32,32,97,32,61,32,98,46,80,97,40,97,41,59,10,32,32,32,32,32,32,32,32,32,32,98,32,61,32,98,46,71,97,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,97,59,10,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,104,98,40,97,44,32,98,41,32,123,10,32,32,32,32,32,32,32,32,105,102,32,40,110,117,108,108,32,61,61,61,32,98,41,32,123,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,84,97,41,32,116,104,114,111,119,32,110,101,119,32,81,40,96,110,117,108,108,32,105,115,32,110,111,116,32,97,32,118,97,108,105,100,32,36,123,116,104,105,115,46,110,97,109,101,125,96,41,59,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,48,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,105,102,32,40,33,98,46,65,97,41,32,116,104,114,111,119,32,110,101,119,32,81,40,96,67,97,110,110,111,116,32,112,97,115,115,32,34,36,123,105,98,40,98,41,125,34,32,97,115,32,97,32,36,123,116,104,105,115,46,110,97,109,101,125,96,41,59,10,32,32,32,32,32,32,32,32,105,102,32,40,33,98,46,65,97,46,67,97,41,32,116,104,114,111,119,32,110,101,119,32,81,40,96,67,97,110,110,111,116,32,112,97,115,115,32,100,101,108,101,116,101,100,32,111,98,106,101,99,116,32,97,115,32,97,32,112,111,105,110,116,101,114,32,111,102,32,116,121,112,101,32,36,123,116,104,105,115,46,110,97,109,101,125,96,41,59,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,103,98,40,98,46,65,97,46,67,97,44,32,98,46,65,97,46,68,97,46,66,97,44,32,116,104,105,115,46,66,97,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,106,98,40,97,44,32,98,41,32,123,10,32,32,32,32,32,32,32,32,105,102,32,40,110,117,108,108,32,61,61,61,32,98,41,32,123,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,84,97,41,32,116,104,114,111,119,32,110,101,119,32,81,40,96,110,117,108,108,32,105,115,32,110,111,116,32,97,32,118,97,108,105,100,32,36,123,116,104,105,115,46,110,97,109,101,125,96,41,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,83,97,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,99,32,61,32,116,104,105,115,46,85,97,40,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,110,117,108,108,32,33,61,61,32,97,32,38,38,32,97,46,112,117,115,104,40,116,104,105,115,46,75,97,44,32,99,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,99,59,10,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,48,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,105,102,32,40,33,98,32,124,124,32,33,98,46,65,97,41,32,116,104,114,111,119,32,110,101,119,32,81,40,96,67,97,110,110,111,116,32,112,97,115,115,32,34,36,123,105,98,40,98,41,125,34,32,97,115,32,97,32,36,123,116,104,105,115,46,110,97,109,101,125,96,41,59,10,32,32,32,32,32,32,32,32,105,102,32,40,33,98,46,65,97,46,67,97,41,32,116,104,114,111,119,32,110,101,119,32,81,40,96,67,97,110,110,111,116,32,112,97,115,115,32,100,101,108,101,116,101,100,32,111,98,106,101,99,116,32,97,115,32,97,32,112,111,105,110,116,101,114,32,111,102,32,116,121,112,101,32,36,123,116,104,105,115,46,110,97,109,101,125,96,41,59,10,32,32,32,32,32,32,32,32,105,102,32,40,33,116,104,105,115,46,82,97,32,38,38,32,98,46,65,97,46,68,97,46,82,97,41,10,32,32,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,81,40,10,32,32,32,32,32,32,32,32,32,32,32,32,96,67,97,110,110,111,116,32,99,111,110,118,101,114,116,32,97,114,103,117,109,101,110,116,32,111,102,32,116,121,112,101,32,36,123,98,46,65,97,46,72,97,32,63,32,98,46,65,97,46,72,97,46,110,97,109,101,32,58,32,98,46,65,97,46,68,97,46,110,97,109,101,125,32,116,111,32,112,97,114,97,109,101,116,101,114,32,116,121,112,101,32,36,123,116,104,105,115,46,110,97,109,101,125,96,10,32,32,32,32,32,32,32,32,32,32,41,59,10,32,32,32,32,32,32,32,32,99,32,61,32,103,98,40,98,46,65,97,46,67,97,44,32,98,46,65,97,46,68,97,46,66,97,44,32,116,104,105,115,46,66,97,41,59,10,32,32,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,83,97,41,32,123,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,118,111,105,100,32,48,32,61,61,61,32,98,46,65,97,46,69,97,41,32,116,104,114,111,119,32,110,101,119,32,81,40,34,80,97,115,115,105,110,103,32,114,97,119,32,112,111,105,110,116,101,114,32,116,111,32,115,109,97,114,116,32,112,111,105,110,116,101,114,32,105,115,32,105,108,108,101,103,97,108,34,41,59,10,32,32,32,32,32,32,32,32,32,32,115,119,105,116,99,104,32,40,116,104,105,115,46,111,98,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,99,97,115,101,32,48,58,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,98,46,65,97,46,72,97,32,61,61,61,32,116,104,105,115,41,32,99,32,61,32,98,46,65,97,46,69,97,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,101,108,115,101,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,81,40,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,96,67,97,110,110,111,116,32,99,111,110,118,101,114,116,32,97,114,103,117,109,101,110,116,32,111,102,32,116,121,112,101,32,36,123,98,46,65,97,46,72,97,32,63,32,98,46,65,97,46,72,97,46,110,97,109,101,32,58,32,98,46,65,97,46,68,97,46,110,97,109,101,125,32,116,111,32,112,97,114,97,109,101,116,101,114,32,116,121,112,101,32,36,123,116,104,105,115,46,110,97,109,101,125,96,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,98,114,101,97,107,59,10,32,32,32,32,32,32,32,32,32,32,32,32,99,97,115,101,32,49,58,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,32,61,32,98,46,65,97,46,69,97,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,98,114,101,97,107,59,10,32,32,32,32,32,32,32,32,32,32,32,32,99,97,115,101,32,50,58,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,98,46,65,97,46,72,97,32,61,61,61,32,116,104,105,115,41,32,99,32,61,32,98,46,65,97,46,69,97,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,101,108,115,101,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,100,32,61,32,98,46,99,108,111,110,101,40,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,32,61,32,116,104,105,115,46,107,98,40,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,44,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,107,98,40,40,41,32,61,62,32,100,91,34,100,101,108,101,116,101,34,93,40,41,41,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,110,117,108,108,32,33,61,61,32,97,32,38,38,32,97,46,112,117,115,104,40,116,104,105,115,46,75,97,44,32,99,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,98,114,101,97,107,59,10,32,32,32,32,32,32,32,32,32,32,32,32,100,101,102,97,117,108,116,58,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,81,40,34,85,110,115,117,112,112,111,114,116,105,110,103,32,115,104,97,114,105,110,103,32,112,111,108,105,99,121,34,41,59,10,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,99,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,108,98,40,97,44,32,98,41,32,123,10,32,32,32,32,32,32,32,32,105,102,32,40,110,117,108,108,32,61,61,61,32,98,41,32,123,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,84,97,41,32,116,104,114,111,119,32,110,101,119,32,81,40,96,110,117,108,108,32,105,115,32,110,111,116,32,97,32,118,97,108,105,100,32,36,123,116,104,105,115,46,110,97,109,101,125,96,41,59,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,48,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,105,102,32,40,33,98,46,65,97,41,32,116,104,114,111,119,32,110,101,119,32,81,40,96,67,97,110,110,111,116,32,112,97,115,115,32,34,36,123,105,98,40,98,41,125,34,32,97,115,32,97,32,36,123,116,104,105,115,46,110,97,109,101,125,96,41,59,10,32,32,32,32,32,32,32,32,105,102,32,40,33,98,46,65,97,46,67,97,41,32,116,104,114,111,119,32,110,101,119,32,81,40,96,67,97,110,110,111,116,32,112,97,115,115,32,100,101,108,101,116,101,100,32,111,98,106,101,99,116,32,97,115,32,97,32,112,111,105,110,116,101,114,32,111,102,32,116,121,112,101,32,36,123,116,104,105,115,46,110,97,109,101,125,96,41,59,10,32,32,32,32,32,32,32,32,105,102,32,40,98,46,65,97,46,68,97,46,82,97,41,32,116,104,114,111,119,32,110,101,119,32,81,40,96,67,97,110,110,111,116,32,99,111,110,118,101,114,116,32,97,114,103,117,109,101,110,116,32,111,102,32,116,121,112,101,32,36,123,98,46,65,97,46,68,97,46,110,97,109,101,125,32,116,111,32,112,97,114,97,109,101,116,101,114,32,116,121,112,101,32,36,123,116,104,105,115,46,110,97,109,101,125,96,41,59,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,103,98,40,98,46,65,97,46,67,97,44,32,98,46,65,97,46,68,97,46,66,97,44,32,116,104,105,115,46,66,97,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,109,98,40,97,44,32,98,44,32,99,44,32,100,44,32,101,44,32,102,44,32,104,44,32,103,44,32,108,44,32,109,44,32,110,41,32,123,10,32,32,32,32,32,32,32,32,116,104,105,115,46,110,97,109,101,32,61,32,97,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,66,97,32,61,32,98,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,84,97,32,61,32,99,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,82,97,32,61,32,100,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,83,97,32,61,32,101,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,105,98,32,61,32,102,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,111,98,32,61,32,104,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,89,97,32,61,32,103,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,85,97,32,61,32,108,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,107,98,32,61,32,109,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,75,97,32,61,32,110,59,10,32,32,32,32,32,32,32,32,101,32,124,124,32,118,111,105,100,32,48,32,33,61,61,32,98,46,71,97,32,63,32,116,104,105,115,46,116,111,87,105,114,101,84,121,112,101,32,61,32,106,98,32,58,32,40,116,104,105,115,46,116,111,87,105,114,101,84,121,112,101,32,61,32,100,32,63,32,104,98,32,58,32,108,98,44,32,116,104,105,115,46,74,97,32,61,32,110,117,108,108,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,118,97,114,32,110,98,32,61,32,40,97,44,32,98,44,32,99,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,105,102,32,40,33,107,46,104,97,115,79,119,110,80,114,111,112,101,114,116,121,40,97,41,41,32,116,104,114,111,119,32,110,101,119,32,77,40,34,82,101,112,108,97,99,105,110,103,32,110,111,110,101,120,105,115,116,101,110,116,32,112,117,98,108,105,99,32,115,121,109,98,111,108,34,41,59,10,32,32,32,32,32,32,32,32,118,111,105,100,32,48,32,33,61,61,32,107,91,97,93,46,70,97,32,38,38,32,118,111,105,100,32,48,32,33,61,61,32,99,32,63,32,107,91,97,93,46,70,97,91,99,93,32,61,32,98,32,58,32,40,107,91,97,93,32,61,32,98,44,32,107,91,97,93,46,81,97,32,61,32,99,41,59,10,32,32,32,32,32,32,125,44,32,83,44,32,111,98,32,61,32,40,97,44,32,98,44,32,99,32,61,32,91,93,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,97,46,105,110,99,108,117,100,101,115,40,34,106,34,41,32,63,32,40,97,32,61,32,97,46,114,101,112,108,97,99,101,40,47,112,47,103,44,32,34,105,34,41,44,32,98,32,61,32,40,48,44,32,107,91,34,100,121,110,67,97,108,108,95,34,32,43,32,97,93,41,40,98,44,32,46,46,46,99,41,41,32,58,32,98,32,61,32,83,46,103,101,116,40,98,41,40,46,46,46,99,41,59,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,98,59,10,32,32,32,32,32,32,125,44,32,112,98,32,61,32,40,97,44,32,98,41,32,61,62,32,40,46,46,46,99,41,32,61,62,32,111,98,40,97,44,32,98,44,32,99,41,44,32,84,32,61,32,40,97,44,32,98,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,97,32,61,32,80,40,97,41,59,10,32,32,32,32,32,32,32,32,118,97,114,32,99,32,61,32,97,46,105,110,99,108,117,100,101,115,40,34,106,34,41,32,63,32,112,98,40,97,44,32,98,41,32,58,32,83,46,103,101,116,40,98,41,59,10,32,32,32,32,32,32,32,32,105,102,32,40,34,102,117,110,99,116,105,111,110,34,32,33,61,32,116,121,112,101,111,102,32,99,41,32,116,104,114,111,119,32,110,101,119,32,81,40,96,117,110,107,110,111,119,110,32,102,117,110,99,116,105,111,110,32,112,111,105,110,116,101,114,32,119,105,116,104,32,115,105,103,110,97,116,117,114,101,32,36,123,97,125,58,32,36,123,98,125,96,41,59,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,99,59,10,32,32,32,32,32,32,125,44,32,113,98,44,32,115,98,32,61,32,40,97,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,97,32,61,32,114,98,40,97,41,59,10,32,32,32,32,32,32,32,32,118,97,114,32,98,32,61,32,80,40,97,41,59,10,32,32,32,32,32,32,32,32,85,40,97,41,59,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,98,59,10,32,32,32,32,32,32,125,44,32,116,98,32,61,32,40,97,44,32,98,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,99,40,102,41,32,123,10,32,32,32,32,32,32,32,32,32,32,101,91,102,93,32,124,124,32,76,91,102,93,32,124,124,32,40,77,97,91,102,93,32,63,32,77,97,91,102,93,46,102,111,114,69,97,99,104,40,99,41,32,58,32,40,100,46,112,117,115,104,40,102,41,44,32,101,91,102,93,32,61,32,116,114,117,101,41,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,118,97,114,32,100,32,61,32,91,93,44,32,101,32,61,32,123,125,59,10,32,32,32,32,32,32,32,32,98,46,102,111,114,69,97,99,104,40,99,41,59,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,113,98,40,96,36,123,97,125,58,32,96,32,43,32,100,46,109,97,112,40,115,98,41,46,106,111,105,110,40,91,34,44,32,34,93,41,41,59,10,32,32,32,32,32,32,125,44,32,117,98,32,61,32,40,97,44,32,98,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,102,111,114,32,40,118,97,114,32,99,32,61,32,91,93,44,32,100,32,61,32,48,59,32,100,32,60,32,97,59,32,100,43,43,41,32,99,46,112,117,115,104,40,68,91,98,32,43,32,52,32,42,32,100,32,62,62,32,50,93,41,59,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,99,59,10,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,118,98,40,97,41,32,123,10,32,32,32,32,32,32,32,32,102,111,114,32,40,118,97,114,32,98,32,61,32,49,59,32,98,32,60,32,97,46,108,101,110,103,116,104,59,32,43,43,98,41,32,105,102,32,40,110,117,108,108,32,33,61,61,32,97,91,98,93,32,38,38,32,118,111,105,100,32,48,32,61,61,61,32,97,91,98,93,46,74,97,41,32,114,101,116,117,114,110,32,116,114,117,101,59,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,102,97,108,115,101,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,119,98,40,97,44,32,98,44,32,99,44,32,100,44,32,101,41,32,123,10,32,32,32,32,32,32,32,32,118,97,114,32,102,32,61,32,98,46,108,101,110,103,116,104,59,10,32,32,32,32,32,32,32,32,105,102,32,40,50,32,62,32,102,41,32,116,104,114,111,119,32,110,101,119,32,81,40,34,97,114,103,84,121,112,101,115,32,97,114,114,97,121,32,115,105,122,101,32,109,105,115,109,97,116,99,104,33,32,77,117,115,116,32,97,116,32,108,101,97,115,116,32,103,101,116,32,114,101,116,117,114,110,32,118,97,108,117,101,32,97,110,100,32,39,116,104,105,115,39,32,116,121,112,101,115,33,34,41,59,10,32,32,32,32,32,32,32,32,118,97,114,32,104,32,61,32,110,117,108,108,32,33,61,61,32,98,91,49,93,32,38,38,32,110,117,108,108,32,33,61,61,32,99,44,32,103,32,61,32,118,98,40,98,41,44,32,108,32,61,32,34,118,111,105,100,34,32,33,61,61,32,98,91,48,93,46,110,97,109,101,44,32,109,32,61,32,102,32,45,32,50,44,32,110,32,61,32,65,114,114,97,121,40,109,41,44,32,113,32,61,32,91,93,44,32,114,32,61,32,91,93,59,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,98,98,40,97,44,32,102,117,110,99,116,105,111,110,40,46,46,46,65,41,32,123,10,32,32,32,32,32,32,32,32,32,32,114,46,108,101,110,103,116,104,32,61,32,48,59,10,32,32,32,32,32,32,32,32,32,32,113,46,108,101,110,103,116,104,32,61,32,104,32,63,32,50,32,58,32,49,59,10,32,32,32,32,32,32,32,32,32,32,113,91,48,93,32,61,32,101,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,104,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,118,32,61,32,98,91,49,93,46,116,111,87,105,114,101,84,121,112,101,40,114,44,32,116,104,105,115,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,113,91,49,93,32,61,32,118,59,10,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,102,111,114,32,40,118,97,114,32,119,32,61,32,48,59,32,119,32,60,32,109,59,32,43,43,119,41,32,110,91,119,93,32,61,32,98,91,119,32,43,32,50,93,46,116,111,87,105,114,101,84,121,112,101,40,114,44,32,65,91,119,93,41,44,32,113,46,112,117,115,104,40,110,91,119,93,41,59,10,32,32,32,32,32,32,32,32,32,32,65,32,61,32,100,40,46,46,46,113,41,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,103,41,32,76,97,40,114,41,59,10,32,32,32,32,32,32,32,32,32,32,101,108,115,101,10,32,32,32,32,32,32,32,32,32,32,32,32,102,111,114,32,40,119,32,61,32,104,32,63,32,49,32,58,32,50,59,32,119,32,60,32,98,46,108,101,110,103,116,104,59,32,119,43,43,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,69,32,61,32,49,32,61,61,61,32,119,32,63,32,118,32,58,32,110,91,119,32,45,32,50,93,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,110,117,108,108,32,33,61,61,32,98,91,119,93,46,74,97,32,38,38,32,98,91,119,93,46,74,97,40,69,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,118,32,61,32,108,32,63,32,98,91,48,93,46,102,114,111,109,87,105,114,101,84,121,112,101,40,65,41,32,58,32,118,111,105,100,32,48,59,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,118,59,10,32,32,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,118,97,114,32,120,98,32,61,32,40,97,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,97,32,61,32,97,46,116,114,105,109,40,41,59,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,98,32,61,32,97,46,105,110,100,101,120,79,102,40,34,40,34,41,59,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,45,49,32,33,61,61,32,98,32,63,32,97,46,115,117,98,115,116,114,40,48,44,32,98,41,32,58,32,97,59,10,32,32,32,32,32,32,125,44,32,121,98,32,61,32,91,93,44,32,86,32,61,32,91,93,44,32,122,98,32,61,32,40,97,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,57,32,60,32,97,32,38,38,32,48,32,61,61,61,32,45,45,86,91,97,32,43,32,49,93,32,38,38,32,40,86,91,97,93,32,61,32,118,111,105,100,32,48,44,32,121,98,46,112,117,115,104,40,97,41,41,59,10,32,32,32,32,32,32,125,44,32,66,98,32,61,32,40,97,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,105,102,32,40,33,97,41,32,116,104,114,111,119,32,110,101,119,32,81,40,34,67,97,110,110,111,116,32,117,115,101,32,100,101,108,101,116,101,100,32,118,97,108,46,32,104,97,110,100,108,101,32,61,32,34,32,43,32,97,41,59,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,86,91,97,93,59,10,32,32,32,32,32,32,125,44,32,107,98,32,61,32,40,97,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,115,119,105,116,99,104,32,40,97,41,32,123,10,32,32,32,32,32,32,32,32,32,32,99,97,115,101,32,118,111,105,100,32,48,58,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,50,59,10,32,32,32,32,32,32,32,32,32,32,99,97,115,101,32,110,117,108,108,58,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,52,59,10,32,32,32,32,32,32,32,32,32,32,99,97,115,101,32,116,114,117,101,58,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,54,59,10,32,32,32,32,32,32,32,32,32,32,99,97,115,101,32,102,97,108,115,101,58,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,56,59,10,32,32,32,32,32,32,32,32,32,32,100,101,102,97,117,108,116,58,10,32,32,32,32,32,32,32,32,32,32,32,32,99,111,110,115,116,32,98,32,61,32,121,98,46,112,111,112,40,41,32,124,124,32,86,46,108,101,110,103,116,104,59,10,32,32,32,32,32,32,32,32,32,32,32,32,86,91,98,93,32,61,32,97,59,10,32,32,32,32,32,32,32,32,32,32,32,32,86,91,98,32,43,32,49,93,32,61,32,49,59,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,98,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,44,32,67,98,32,61,32,123,10,32,32,32,32,32,32,32,32,110,97,109,101,58,32,34,101,109,115,99,114,105,112,116,101,110,58,58,118,97,108,34,44,10,32,32,32,32,32,32,32,32,102,114,111,109,87,105,114,101,84,121,112,101,58,32,40,97,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,98,32,61,32,66,98,40,97,41,59,10,32,32,32,32,32,32,32,32,32,32,122,98,40,97,41,59,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,98,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,116,111,87,105,114,101,84,121,112,101,58,32,40,97,44,32,98,41,32,61,62,32,107,98,40,98,41,44,10,32,32,32,32,32,32,32,32,73,97,58,32,56,44,10,32,32,32,32,32,32,32,32,114,101,97,100,86,97,108,117,101,70,114,111,109,80,111,105,110,116,101,114,58,32,74,44,10,32,32,32,32,32,32,32,32,74,97,58,32,110,117,108,108,10,32,32,32,32,32,32,125,44,32,68,98,32,61,32,40,97,44,32,98,44,32,99,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,115,119,105,116,99,104,32,40,98,41,32,123,10,32,32,32,32,32,32,32,32,32,32,99,97,115,101,32,49,58,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,99,32,63,32,102,117,110,99,116,105,111,110,40,100,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,116,104,105,115,46,102,114,111,109,87,105,114,101,84,121,112,101,40,117,91,100,93,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,32,58,32,102,117,110,99,116,105,111,110,40,100,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,116,104,105,115,46,102,114,111,109,87,105,114,101,84,121,112,101,40,120,91,100,93,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,32,32,32,32,99,97,115,101,32,50,58,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,99,32,63,32,102,117,110,99,116,105,111,110,40,100,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,116,104,105,115,46,102,114,111,109,87,105,114,101,84,121,112,101,40,121,91,100,32,62,62,32,49,93,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,32,58,32,102,117,110,99,116,105,111,110,40,100,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,116,104,105,115,46,102,114,111,109,87,105,114,101,84,121,112,101,40,122,91,100,32,62,62,32,49,93,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,32,32,32,32,99,97,115,101,32,52,58,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,99,32,63,32,102,117,110,99,116,105,111,110,40,100,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,116,104,105,115,46,102,114,111,109,87,105,114,101,84,121,112,101,40,67,91,100,32,62,62,32,50,93,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,32,58,32,102,117,110,99,116,105,111,110,40,100,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,116,104,105,115,46,102,114,111,109,87,105,114,101,84,121,112,101,40,68,91,100,32,62,62,32,50,93,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,32,32,32,32,100,101,102,97,117,108,116,58,10,32,32,32,32,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,84,121,112,101,69,114,114,111,114,40,96,105,110,118,97,108,105,100,32,105,110,116,101,103,101,114,32,119,105,100,116,104,32,40,36,123,98,125,41,58,32,36,123,97,125,96,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,44,32,69,98,32,61,32,40,97,44,32,98,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,118,97,114,32,99,32,61,32,76,91,97,93,59,10,32,32,32,32,32,32,32,32,105,102,32,40,118,111,105,100,32,48,32,61,61,61,32,99,41,32,116,104,114,111,119,32,97,32,61,32,96,36,123,98,125,32,104,97,115,32,117,110,107,110,111,119,110,32,116,121,112,101,32,36,123,115,98,40,97,41,125,96,44,32,110,101,119,32,81,40,97,41,59,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,99,59,10,32,32,32,32,32,32,125,44,32,105,98,32,61,32,40,97,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,105,102,32,40,110,117,108,108,32,61,61,61,32,97,41,32,114,101,116,117,114,110,32,34,110,117,108,108,34,59,10,32,32,32,32,32,32,32,32,118,97,114,32,98,32,61,32,116,121,112,101,111,102,32,97,59,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,34,111,98,106,101,99,116,34,32,61,61,61,32,98,32,124,124,32,34,97,114,114,97,121,34,32,61,61,61,32,98,32,124,124,32,34,102,117,110,99,116,105,111,110,34,32,61,61,61,32,98,32,63,32,97,46,116,111,83,116,114,105,110,103,40,41,32,58,32,34,34,32,43,32,97,59,10,32,32,32,32,32,32,125,44,32,70,98,32,61,32,40,97,44,32,98,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,115,119,105,116,99,104,32,40,98,41,32,123,10,32,32,32,32,32,32,32,32,32,32,99,97,115,101,32,52,58,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,102,117,110,99,116,105,111,110,40,99,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,116,104,105,115,46,102,114,111,109,87,105,114,101,84,121,112,101,40,111,97,91,99,32,62,62,32,50,93,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,32,32,32,32,99,97,115,101,32,56,58,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,102,117,110,99,116,105,111,110,40,99,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,116,104,105,115,46,102,114,111,109,87,105,114,101,84,121,112,101,40,112,97,91,99,32,62,62,32,51,93,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,32,32,32,32,100,101,102,97,117,108,116,58,10,32,32,32,32,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,84,121,112,101,69,114,114,111,114,40,96,105,110,118,97,108,105,100,32,102,108,111,97,116,32,119,105,100,116,104,32,40,36,123,98,125,41,58,32,36,123,97,125,96,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,44,32,71,98,32,61,32,40,97,44,32,98,44,32,99,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,115,119,105,116,99,104,32,40,98,41,32,123,10,32,32,32,32,32,32,32,32,32,32,99,97,115,101,32,49,58,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,99,32,63,32,40,100,41,32,61,62,32,117,91,100,93,32,58,32,40,100,41,32,61,62,32,120,91,100,93,59,10,32,32,32,32,32,32,32,32,32,32,99,97,115,101,32,50,58,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,99,32,63,32,40,100,41,32,61,62,32,121,91,100,32,62,62,32,49,93,32,58,32,40,100,41,32,61,62,32,122,91,100,32,62,62,32,49,93,59,10,32,32,32,32,32,32,32,32,32,32,99,97,115,101,32,52,58,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,99,32,63,32,40,100,41,32,61,62,32,67,91,100,32,62,62,32,50,93,32,58,32,40,100,41,32,61,62,32,68,91,100,32,62,62,32,50,93,59,10,32,32,32,32,32,32,32,32,32,32,100,101,102,97,117,108,116,58,10,32,32,32,32,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,84,121,112,101,69,114,114,111,114,40,96,105,110,118,97,108,105,100,32,105,110,116,101,103,101,114,32,119,105,100,116,104,32,40,36,123,98,125,41,58,32,36,123,97,125,96,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,44,32,72,98,32,61,32,79,98,106,101,99,116,46,97,115,115,105,103,110,40,123,32,111,112,116,105,111,110,97,108,58,32,116,114,117,101,32,125,44,32,67,98,41,44,32,73,98,32,61,32,34,117,110,100,101,102,105,110,101,100,34,32,33,61,32,116,121,112,101,111,102,32,84,101,120,116,68,101,99,111,100,101,114,32,63,32,110,101,119,32,84,101,120,116,68,101,99,111,100,101,114,40,34,117,116,102,45,49,54,108,101,34,41,32,58,32,118,111,105,100,32,48,44,32,74,98,32,61,32,40,97,44,32,98,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,118,97,114,32,99,32,61,32,97,32,62,62,32,49,59,10,32,32,32,32,32,32,32,32,102,111,114,32,40,118,97,114,32,100,32,61,32,99,32,43,32,98,32,47,32,50,59,32,33,40,99,32,62,61,32,100,41,32,38,38,32,122,91,99,93,59,32,41,32,43,43,99,59,10,32,32,32,32,32,32,32,32,99,32,60,60,61,32,49,59,10,32,32,32,32,32,32,32,32,105,102,32,40,51,50,32,60,32,99,32,45,32,97,32,38,38,32,73,98,41,32,114,101,116,117,114,110,32,73,98,46,100,101,99,111,100,101,40,120,46,115,117,98,97,114,114,97,121,40,97,44,32,99,41,41,59,10,32,32,32,32,32,32,32,32,99,32,61,32,34,34,59,10,32,32,32,32,32,32,32,32,102,111,114,32,40,100,32,61,32,48,59,32,33,40,100,32,62,61,32,98,32,47,32,50,41,59,32,43,43,100,41,32,123,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,101,32,61,32,121,91,97,32,43,32,50,32,42,32,100,32,62,62,32,49,93,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,48,32,61,61,32,101,41,32,98,114,101,97,107,59,10,32,32,32,32,32,32,32,32,32,32,99,32,43,61,32,83,116,114,105,110,103,46,102,114,111,109,67,104,97,114,67,111,100,101,40,101,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,99,59,10,32,32,32,32,32,32,125,44,32,75,98,32,61,32,40,97,44,32,98,44,32,99,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,99,32,33,61,32,110,117,108,108,32,63,32,99,32,58,32,99,32,61,32,50,49,52,55,52,56,51,54,52,55,59,10,32,32,32,32,32,32,32,32,105,102,32,40,50,32,62,32,99,41,32,114,101,116,117,114,110,32,48,59,10,32,32,32,32,32,32,32,32,99,32,45,61,32,50,59,10,32,32,32,32,32,32,32,32,118,97,114,32,100,32,61,32,98,59,10,32,32,32,32,32,32,32,32,99,32,61,32,99,32,60,32,50,32,42,32,97,46,108,101,110,103,116,104,32,63,32,99,32,47,32,50,32,58,32,97,46,108,101,110,103,116,104,59,10,32,32,32,32,32,32,32,32,102,111,114,32,40,118,97,114,32,101,32,61,32,48,59,32,101,32,60,32,99,59,32,43,43,101,41,32,121,91,98,32,62,62,32,49,93,32,61,32,97,46,99,104,97,114,67,111,100,101,65,116,40,101,41,44,32,98,32,43,61,32,50,59,10,32,32,32,32,32,32,32,32,121,91,98,32,62,62,32,49,93,32,61,32,48,59,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,98,32,45,32,100,59,10,32,32,32,32,32,32,125,44,32,76,98,32,61,32,40,97,41,32,61,62,32,50,32,42,32,97,46,108,101,110,103,116,104,44,32,77,98,32,61,32,40,97,44,32,98,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,102,111,114,32,40,118,97,114,32,99,32,61,32,48,44,32,100,32,61,32,34,34,59,32,33,40,99,32,62,61,32,98,32,47,32,52,41,59,32,41,32,123,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,101,32,61,32,67,91,97,32,43,32,52,32,42,32,99,32,62,62,32,50,93,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,48,32,61,61,32,101,41,32,98,114,101,97,107,59,10,32,32,32,32,32,32,32,32,32,32,43,43,99,59,10,32,32,32,32,32,32,32,32,32,32,54,53,53,51,54,32,60,61,32,101,32,63,32,40,101,32,45,61,32,54,53,53,51,54,44,32,100,32,43,61,32,83,116,114,105,110,103,46,102,114,111,109,67,104,97,114,67,111,100,101,40,53,53,50,57,54,32,124,32,101,32,62,62,32,49,48,44,32,53,54,51,50,48,32,124,32,101,32,38,32,49,48,50,51,41,41,32,58,32,100,32,43,61,32,83,116,114,105,110,103,46,102,114,111,109,67,104,97,114,67,111,100,101,40,101,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,100,59,10,32,32,32,32,32,32,125,44,32,78,98,32,61,32,40,97,44,32,98,44,32,99,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,99,32,33,61,32,110,117,108,108,32,63,32,99,32,58,32,99,32,61,32,50,49,52,55,52,56,51,54,52,55,59,10,32,32,32,32,32,32,32,32,105,102,32,40,52,32,62,32,99,41,32,114,101,116,117,114,110,32,48,59,10,32,32,32,32,32,32,32,32,118,97,114,32,100,32,61,32,98,59,10,32,32,32,32,32,32,32,32,99,32,61,32,100,32,43,32,99,32,45,32,52,59,10,32,32,32,32,32,32,32,32,102,111,114,32,40,118,97,114,32,101,32,61,32,48,59,32,101,32,60,32,97,46,108,101,110,103,116,104,59,32,43,43,101,41,32,123,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,102,32,61,32,97,46,99,104,97,114,67,111,100,101,65,116,40,101,41,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,53,53,50,57,54,32,60,61,32,102,32,38,38,32,53,55,51,52,51,32,62,61,32,102,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,104,32,61,32,97,46,99,104,97,114,67,111,100,101,65,116,40,43,43,101,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,102,32,61,32,54,53,53,51,54,32,43,32,40,40,102,32,38,32,49,48,50,51,41,32,60,60,32,49,48,41,32,124,32,104,32,38,32,49,48,50,51,59,10,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,67,91,98,32,62,62,32,50,93,32,61,32,102,59,10,32,32,32,32,32,32,32,32,32,32,98,32,43,61,32,52,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,98,32,43,32,52,32,62,32,99,41,32,98,114,101,97,107,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,67,91,98,32,62,62,32,50,93,32,61,32,48,59,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,98,32,45,32,100,59,10,32,32,32,32,32,32,125,44,32,79,98,32,61,32,40,97,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,102,111,114,32,40,118,97,114,32,98,32,61,32,48,44,32,99,32,61,32,48,59,32,99,32,60,32,97,46,108,101,110,103,116,104,59,32,43,43,99,41,32,123,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,100,32,61,32,97,46,99,104,97,114,67,111,100,101,65,116,40,99,41,59,10,32,32,32,32,32,32,32,32,32,32,53,53,50,57,54,32,60,61,32,100,32,38,38,32,53,55,51,52,51,32,62,61,32,100,32,38,38,32,43,43,99,59,10,32,32,32,32,32,32,32,32,32,32,98,32,43,61,32,52,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,98,59,10,32,32,32,32,32,32,125,44,32,80,98,32,61,32,91,93,44,32,81,98,32,61,32,40,97,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,118,97,114,32,98,32,61,32,80,98,46,108,101,110,103,116,104,59,10,32,32,32,32,32,32,32,32,80,98,46,112,117,115,104,40,97,41,59,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,98,59,10,32,32,32,32,32,32,125,44,32,82,98,32,61,32,40,97,44,32,98,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,102,111,114,32,40,118,97,114,32,99,32,61,32,65,114,114,97,121,40,97,41,44,32,100,32,61,32,48,59,32,100,32,60,32,97,59,32,43,43,100,41,32,99,91,100,93,32,61,32,69,98,40,68,91,98,32,43,32,52,32,42,32,100,32,62,62,32,50,93,44,32,34,112,97,114,97,109,101,116,101,114,32,34,32,43,32,100,41,59,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,99,59,10,32,32,32,32,32,32,125,44,32,83,98,32,61,32,82,101,102,108,101,99,116,46,99,111,110,115,116,114,117,99,116,44,32,84,98,32,61,32,123,125,44,32,85,98,32,61,32,40,97,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,105,102,32,40,33,40,97,32,105,110,115,116,97,110,99,101,111,102,32,68,97,32,124,124,32,34,117,110,119,105,110,100,34,32,61,61,32,97,41,41,32,116,104,114,111,119,32,97,59,10,32,32,32,32,32,32,125,44,32,86,98,32,61,32,48,44,32,87,98,32,61,32,40,97,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,118,97,114,32,95,97,50,59,10,32,32,32,32,32,32,32,32,110,97,32,61,32,97,59,10,32,32,32,32,32,32,32,32,70,97,32,124,124,32,48,32,60,32,86,98,32,124,124,32,40,40,95,97,50,32,61,32,107,46,111,110,69,120,105,116,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,50,46,99,97,108,108,40,107,44,32,97,41,44,32,109,97,32,61,32,116,114,117,101,41,59,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,68,97,40,97,41,59,10,32,32,32,32,32,32,125,44,32,88,98,32,61,32,40,97,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,105,102,32,40,33,109,97,41,10,32,32,32,32,32,32,32,32,32,32,116,114,121,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,97,40,41,44,32,33,40,70,97,32,124,124,32,48,32,60,32,86,98,41,41,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,114,121,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,110,97,32,61,32,97,32,61,32,110,97,44,32,87,98,40,97,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,32,99,97,116,99,104,32,40,98,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,85,98,40,98,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,125,32,99,97,116,99,104,32,40,98,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,85,98,40,98,41,59,10,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,44,32,89,98,32,61,32,123,125,44,32,36,98,32,61,32,40,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,105,102,32,40,33,90,98,41,32,123,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,97,32,61,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,85,83,69,82,58,32,34,119,101,98,95,117,115,101,114,34,44,10,32,32,32,32,32,32,32,32,32,32,32,32,76,79,71,78,65,77,69,58,32,34,119,101,98,95,117,115,101,114,34,44,10,32,32,32,32,32,32,32,32,32,32,32,32,80,65,84,72,58,32,34,47,34,44,10,32,32,32,32,32,32,32,32,32,32,32,32,80,87,68,58,32,34,47,34,44,10,32,32,32,32,32,32,32,32,32,32,32,32,72,79,77,69,58,32,34,47,104,111,109,101,47,119,101,98,95,117,115,101,114,34,44,10,32,32,32,32,32,32,32,32,32,32,32,32,76,65,78,71,58,32,40,34,111,98,106,101,99,116,34,32,61,61,32,116,121,112,101,111,102,32,110,97,118,105,103,97,116,111,114,32,38,38,32,110,97,118,105,103,97,116,111,114,46,108,97,110,103,117,97,103,101,115,32,38,38,32,110,97,118,105,103,97,116,111,114,46,108,97,110,103,117,97,103,101,115,91,48,93,32,124,124,32,34,67,34,41,46,114,101,112,108,97,99,101,40,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,34,45,34,44,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,34,95,34,10,32,32,32,32,32,32,32,32,32,32,32,32,41,32,43,32,34,46,85,84,70,45,56,34,44,10,32,32,32,32,32,32,32,32,32,32,32,32,95,58,32,101,97,32,124,124,32,34,46,47,116,104,105,115,46,112,114,111,103,114,97,109,34,10,32,32,32,32,32,32,32,32,32,32,125,44,32,98,59,10,32,32,32,32,32,32,32,32,32,32,102,111,114,32,40,98,32,105,110,32,89,98,41,32,118,111,105,100,32,48,32,61,61,61,32,89,98,91,98,93,32,63,32,100,101,108,101,116,101,32,97,91,98,93,32,58,32,97,91,98,93,32,61,32,89,98,91,98,93,59,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,99,32,61,32,91,93,59,10,32,32,32,32,32,32,32,32,32,32,102,111,114,32,40,98,32,105,110,32,97,41,32,99,46,112,117,115,104,40,96,36,123,98,125,61,36,123,97,91,98,93,125,96,41,59,10,32,32,32,32,32,32,32,32,32,32,90,98,32,61,32,99,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,90,98,59,10,32,32,32,32,32,32,125,44,32,90,98,44,32,97,99,32,61,32,91,110,117,108,108,44,32,91,93,44,32,91,93,93,44,32,98,99,32,61,32,40,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,105,102,32,40,34,111,98,106,101,99,116,34,32,61,61,32,116,121,112,101,111,102,32,99,114,121,112,116,111,32,38,38,32,34,102,117,110,99,116,105,111,110,34,32,61,61,32,116,121,112,101,111,102,32,99,114,121,112,116,111,46,103,101,116,82,97,110,100,111,109,86,97,108,117,101,115,41,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,40,97,41,32,61,62,32,99,114,121,112,116,111,46,103,101,116,82,97,110,100,111,109,86,97,108,117,101,115,40,97,41,59,10,32,32,32,32,32,32,32,32,119,97,40,34,105,110,105,116,82,97,110,100,111,109,68,101,118,105,99,101,34,41,59,10,32,32,32,32,32,32,125,44,32,99,99,32,61,32,40,97,41,32,61,62,32,40,99,99,32,61,32,98,99,40,41,41,40,97,41,59,10,32,32,32,32,32,32,77,32,61,32,107,46,73,110,116,101,114,110,97,108,69,114,114,111,114,32,61,32,99,108,97,115,115,32,101,120,116,101,110,100,115,32,69,114,114,111,114,32,123,10,32,32,32,32,32,32,32,32,99,111,110,115,116,114,117,99,116,111,114,40,97,41,32,123,10,32,32,32,32,32,32,32,32,32,32,115,117,112,101,114,40,97,41,59,10,32,32,32,32,32,32,32,32,32,32,116,104,105,115,46,110,97,109,101,32,61,32,34,73,110,116,101,114,110,97,108,69,114,114,111,114,34,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,102,111,114,32,40,118,97,114,32,100,99,32,61,32,65,114,114,97,121,40,50,53,54,41,44,32,101,99,32,61,32,48,59,32,50,53,54,32,62,32,101,99,59,32,43,43,101,99,41,32,100,99,91,101,99,93,32,61,32,83,116,114,105,110,103,46,102,114,111,109,67,104,97,114,67,111,100,101,40,101,99,41,59,10,32,32,32,32,32,32,78,97,32,61,32,100,99,59,10,32,32,32,32,32,32,81,32,61,32,107,46,66,105,110,100,105,110,103,69,114,114,111,114,32,61,32,99,108,97,115,115,32,101,120,116,101,110,100,115,32,69,114,114,111,114,32,123,10,32,32,32,32,32,32,32,32,99,111,110,115,116,114,117,99,116,111,114,40,97,41,32,123,10,32,32,32,32,32,32,32,32,32,32,115,117,112,101,114,40,97,41,59,10,32,32,32,32,32,32,32,32,32,32,116,104,105,115,46,110,97,109,101,32,61,32,34,66,105,110,100,105,110,103,69,114,114,111,114,34,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,79,98,106,101,99,116,46,97,115,115,105,103,110,40,97,98,46,112,114,111,116,111,116,121,112,101,44,32,123,10,32,32,32,32,32,32,32,32,105,115,65,108,105,97,115,79,102,58,32,102,117,110,99,116,105,111,110,40,97,41,32,123,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,33,40,116,104,105,115,32,105,110,115,116,97,110,99,101,111,102,32,97,98,32,38,38,32,97,32,105,110,115,116,97,110,99,101,111,102,32,97,98,41,41,32,114,101,116,117,114,110,32,102,97,108,115,101,59,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,98,32,61,32,116,104,105,115,46,65,97,46,68,97,46,66,97,44,32,99,32,61,32,116,104,105,115,46,65,97,46,67,97,59,10,32,32,32,32,32,32,32,32,32,32,97,46,65,97,32,61,32,97,46,65,97,59,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,100,32,61,32,97,46,65,97,46,68,97,46,66,97,59,10,32,32,32,32,32,32,32,32,32,32,102,111,114,32,40,97,32,61,32,97,46,65,97,46,67,97,59,32,98,46,71,97,59,32,41,32,99,32,61,32,98,46,80,97,40,99,41,44,32,98,32,61,32,98,46,71,97,59,10,32,32,32,32,32,32,32,32,32,32,102,111,114,32,40,59,32,100,46,71,97,59,32,41,32,97,32,61,32,100,46,80,97,40,97,41,44,32,100,32,61,32,100,46,71,97,59,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,98,32,61,61,61,32,100,32,38,38,32,99,32,61,61,61,32,97,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,99,108,111,110,101,58,32,102,117,110,99,116,105,111,110,40,41,32,123,10,32,32,32,32,32,32,32,32,32,32,116,104,105,115,46,65,97,46,67,97,32,124,124,32,80,97,40,116,104,105,115,41,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,65,97,46,79,97,41,32,114,101,116,117,114,110,32,116,104,105,115,46,65,97,46,99,111,117,110,116,46,118,97,108,117,101,32,43,61,32,49,44,32,116,104,105,115,59,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,97,32,61,32,90,97,44,32,98,32,61,32,79,98,106,101,99,116,44,32,99,32,61,32,98,46,99,114,101,97,116,101,44,32,100,32,61,32,79,98,106,101,99,116,46,103,101,116,80,114,111,116,111,116,121,112,101,79,102,40,116,104,105,115,41,44,32,101,32,61,32,116,104,105,115,46,65,97,59,10,32,32,32,32,32,32,32,32,32,32,97,32,61,32,97,40,10,32,32,32,32,32,32,32,32,32,32,32,32,99,46,99,97,108,108,40,98,44,32,100,44,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,65,97,58,32,123,32,118,97,108,117,101,58,32,123,32,99,111,117,110,116,58,32,101,46,99,111,117,110,116,44,32,77,97,58,32,101,46,77,97,44,32,79,97,58,32,101,46,79,97,44,32,67,97,58,32,101,46,67,97,44,32,68,97,58,32,101,46,68,97,44,32,69,97,58,32,101,46,69,97,44,32,72,97,58,32,101,46,72,97,32,125,32,125,10,32,32,32,32,32,32,32,32,32,32,32,32,125,41,10,32,32,32,32,32,32,32,32,32,32,41,59,10,32,32,32,32,32,32,32,32,32,32,97,46,65,97,46,99,111,117,110,116,46,118,97,108,117,101,32,43,61,32,49,59,10,32,32,32,32,32,32,32,32,32,32,97,46,65,97,46,77,97,32,61,32,102,97,108,115,101,59,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,97,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,91,34,100,101,108,101,116,101,34,93,40,41,32,123,10,32,32,32,32,32,32,32,32,32,32,116,104,105,115,46,65,97,46,67,97,32,124,124,32,80,97,40,116,104,105,115,41,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,65,97,46,77,97,32,38,38,32,33,116,104,105,115,46,65,97,46,79,97,41,32,116,104,114,111,119,32,110,101,119,32,81,40,34,79,98,106,101,99,116,32,97,108,114,101,97,100,121,32,115,99,104,101,100,117,108,101,100,32,102,111,114,32,100,101,108,101,116,105,111,110,34,41,59,10,32,32,32,32,32,32,32,32,32,32,82,97,40,116,104,105,115,41,59,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,97,32,61,32,116,104,105,115,46,65,97,59,10,32,32,32,32,32,32,32,32,32,32,45,45,97,46,99,111,117,110,116,46,118,97,108,117,101,59,10,32,32,32,32,32,32,32,32,32,32,48,32,61,61,61,32,97,46,99,111,117,110,116,46,118,97,108,117,101,32,38,38,32,40,97,46,69,97,32,63,32,97,46,72,97,46,75,97,40,97,46,69,97,41,32,58,32,97,46,68,97,46,66,97,46,75,97,40,97,46,67,97,41,41,59,10,32,32,32,32,32,32,32,32,32,32,116,104,105,115,46,65,97,46,79,97,32,124,124,32,40,116,104,105,115,46,65,97,46,69,97,32,61,32,118,111,105,100,32,48,44,32,116,104,105,115,46,65,97,46,67,97,32,61,32,118,111,105,100,32,48,41,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,105,115,68,101,108,101,116,101,100,58,32,102,117,110,99,116,105,111,110,40,41,32,123,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,33,116,104,105,115,46,65,97,46,67,97,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,100,101,108,101,116,101,76,97,116,101,114,58,32,102,117,110,99,116,105,111,110,40,41,32,123,10,32,32,32,32,32,32,32,32,32,32,116,104,105,115,46,65,97,46,67,97,32,124,124,32,80,97,40,116,104,105,115,41,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,65,97,46,77,97,32,38,38,32,33,116,104,105,115,46,65,97,46,79,97,41,32,116,104,114,111,119,32,110,101,119,32,81,40,34,79,98,106,101,99,116,32,97,108,114,101,97,100,121,32,115,99,104,101,100,117,108,101,100,32,102,111,114,32,100,101,108,101,116,105,111,110,34,41,59,10,32,32,32,32,32,32,32,32,32,32,82,46,112,117,115,104,40,116,104,105,115,41,59,10,32,32,32,32,32,32,32,32,32,32,49,32,61,61,61,32,82,46,108,101,110,103,116,104,32,38,38,32,87,97,32,38,38,32,87,97,40,86,97,41,59,10,32,32,32,32,32,32,32,32,32,32,116,104,105,115,46,65,97,46,77,97,32,61,32,116,114,117,101,59,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,116,104,105,115,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,107,46,103,101,116,73,110,104,101,114,105,116,101,100,73,110,115,116,97,110,99,101,67,111,117,110,116,32,61,32,40,41,32,61,62,32,79,98,106,101,99,116,46,107,101,121,115,40,88,97,41,46,108,101,110,103,116,104,59,10,32,32,32,32,32,32,107,46,103,101,116,76,105,118,101,73,110,104,101,114,105,116,101,100,73,110,115,116,97,110,99,101,115,32,61,32,40,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,118,97,114,32,97,32,61,32,91,93,44,32,98,59,10,32,32,32,32,32,32,32,32,102,111,114,32,40,98,32,105,110,32,88,97,41,32,88,97,46,104,97,115,79,119,110,80,114,111,112,101,114,116,121,40,98,41,32,38,38,32,97,46,112,117,115,104,40,88,97,91,98,93,41,59,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,97,59,10,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,107,46,102,108,117,115,104,80,101,110,100,105,110,103,68,101,108,101,116,101,115,32,61,32,86,97,59,10,32,32,32,32,32,32,107,46,115,101,116,68,101,108,97,121,70,117,110,99,116,105,111,110,32,61,32,40,97,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,87,97,32,61,32,97,59,10,32,32,32,32,32,32,32,32,82,46,108,101,110,103,116,104,32,38,38,32,87,97,32,38,38,32,87,97,40,86,97,41,59,10,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,79,98,106,101,99,116,46,97,115,115,105,103,110,40,109,98,46,112,114,111,116,111,116,121,112,101,44,32,123,10,32,32,32,32,32,32,32,32,99,98,40,97,41,32,123,10,32,32,32,32,32,32,32,32,32,32,116,104,105,115,46,89,97,32,38,38,32,40,97,32,61,32,116,104,105,115,46,89,97,40,97,41,41,59,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,97,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,87,97,40,97,41,32,123,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,95,97,50,59,10,32,32,32,32,32,32,32,32,32,32,40,95,97,50,32,61,32,116,104,105,115,46,75,97,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,50,46,99,97,108,108,40,116,104,105,115,44,32,97,41,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,73,97,58,32,56,44,10,32,32,32,32,32,32,32,32,114,101,97,100,86,97,108,117,101,70,114,111,109,80,111,105,110,116,101,114,58,32,74,44,10,32,32,32,32,32,32,32,32,102,114,111,109,87,105,114,101,84,121,112,101,58,32,102,117,110,99,116,105,111,110,40,97,41,32,123,10,32,32,32,32,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,98,40,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,116,104,105,115,46,83,97,32,63,32,36,97,40,116,104,105,115,46,66,97,46,78,97,44,32,123,32,68,97,58,32,116,104,105,115,46,105,98,44,32,67,97,58,32,99,44,32,72,97,58,32,116,104,105,115,44,32,69,97,58,32,97,32,125,41,32,58,32,36,97,40,116,104,105,115,46,66,97,46,78,97,44,32,123,32,68,97,58,32,116,104,105,115,44,32,67,97,58,32,97,32,125,41,59,10,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,99,32,61,32,116,104,105,115,46,99,98,40,97,41,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,33,99,41,32,114,101,116,117,114,110,32,116,104,105,115,46,87,97,40,97,41,44,32,110,117,108,108,59,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,100,32,61,32,89,97,40,116,104,105,115,46,66,97,44,32,99,41,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,118,111,105,100,32,48,32,33,61,61,32,100,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,48,32,61,61,61,32,100,46,65,97,46,99,111,117,110,116,46,118,97,108,117,101,41,32,114,101,116,117,114,110,32,100,46,65,97,46,67,97,32,61,32,99,44,32,100,46,65,97,46,69,97,32,61,32,97,44,32,100,46,99,108,111,110,101,40,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,100,32,61,32,100,46,99,108,111,110,101,40,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,116,104,105,115,46,87,97,40,97,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,100,59,10,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,100,32,61,32,116,104,105,115,46,66,97,46,98,98,40,99,41,59,10,32,32,32,32,32,32,32,32,32,32,100,32,61,32,85,97,91,100,93,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,33,100,41,32,114,101,116,117,114,110,32,98,46,99,97,108,108,40,116,104,105,115,41,59,10,32,32,32,32,32,32,32,32,32,32,100,32,61,32,116,104,105,115,46,82,97,32,63,32,100,46,90,97,32,58,32,100,46,112,111,105,110,116,101,114,84,121,112,101,59,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,101,32,61,32,84,97,40,99,44,32,116,104,105,115,46,66,97,44,32,100,46,66,97,41,59,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,110,117,108,108,32,61,61,61,32,101,32,63,32,98,46,99,97,108,108,40,116,104,105,115,41,32,58,32,116,104,105,115,46,83,97,32,63,32,36,97,40,100,46,66,97,46,78,97,44,32,123,32,68,97,58,32,100,44,32,67,97,58,32,101,44,32,72,97,58,32,116,104,105,115,44,32,69,97,58,32,97,32,125,41,32,58,32,36,97,40,100,46,66,97,46,78,97,44,32,123,32,68,97,58,32,100,44,32,67,97,58,32,101,32,125,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,113,98,32,61,32,107,46,85,110,98,111,117,110,100,84,121,112,101,69,114,114,111,114,32,61,32,40,40,97,44,32,98,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,118,97,114,32,99,32,61,32,98,98,40,98,44,32,102,117,110,99,116,105,111,110,40,100,41,32,123,10,32,32,32,32,32,32,32,32,32,32,116,104,105,115,46,110,97,109,101,32,61,32,98,59,10,32,32,32,32,32,32,32,32,32,32,116,104,105,115,46,109,101,115,115,97,103,101,32,61,32,100,59,10,32,32,32,32,32,32,32,32,32,32,100,32,61,32,69,114,114,111,114,40,100,41,46,115,116,97,99,107,59,10,32,32,32,32,32,32,32,32,32,32,118,111,105,100,32,48,32,33,61,61,32,100,32,38,38,32,40,116,104,105,115,46,115,116,97,99,107,32,61,32,116,104,105,115,46,116,111,83,116,114,105,110,103,40,41,32,43,32,34,92,110,34,32,43,32,100,46,114,101,112,108,97,99,101,40,47,94,69,114,114,111,114,40,58,91,94,92,110,93,42,41,63,92,110,47,44,32,34,34,41,41,59,10,32,32,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,32,32,99,46,112,114,111,116,111,116,121,112,101,32,61,32,79,98,106,101,99,116,46,99,114,101,97,116,101,40,97,46,112,114,111,116,111,116,121,112,101,41,59,10,32,32,32,32,32,32,32,32,99,46,112,114,111,116,111,116,121,112,101,46,99,111,110,115,116,114,117,99,116,111,114,32,61,32,99,59,10,32,32,32,32,32,32,32,32,99,46,112,114,111,116,111,116,121,112,101,46,116,111,83,116,114,105,110,103,32,61,32,102,117,110,99,116,105,111,110,40,41,32,123,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,118,111,105,100,32,48,32,61,61,61,32,116,104,105,115,46,109,101,115,115,97,103,101,32,63,32,116,104,105,115,46,110,97,109,101,32,58,32,96,36,123,116,104,105,115,46,110,97,109,101,125,58,32,36,123,116,104,105,115,46,109,101,115,115,97,103,101,125,96,59,10,32,32,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,99,59,10,32,32,32,32,32,32,125,41,40,69,114,114,111,114,44,32,34,85,110,98,111,117,110,100,84,121,112,101,69,114,114,111,114,34,41,59,10,32,32,32,32,32,32,86,46,112,117,115,104,40,48,44,32,49,44,32,118,111,105,100,32,48,44,32,49,44,32,110,117,108,108,44,32,49,44,32,116,114,117,101,44,32,49,44,32,102,97,108,115,101,44,32,49,41,59,10,32,32,32,32,32,32,107,46,99,111,117,110,116,95,101,109,118,97,108,95,104,97,110,100,108,101,115,32,61,32,40,41,32,61,62,32,86,46,108,101,110,103,116,104,32,47,32,50,32,45,32,53,32,45,32,121,98,46,108,101,110,103,116,104,59,10,32,32,32,32,32,32,118,97,114,32,114,99,32,61,32,123,10,32,32,32,32,32,32,32,32,99,58,32,40,97,44,32,98,44,32,99,44,32,100,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,119,97,40,10,32,32,32,32,32,32,32,32,32,32,32,32,96,65,115,115,101,114,116,105,111,110,32,102,97,105,108,101,100,58,32,36,123,97,32,63,32,72,40,120,44,32,97,41,32,58,32,34,34,125,44,32,97,116,58,32,96,32,43,32,91,98,32,63,32,98,32,63,32,72,40,120,44,32,98,41,32,58,32,34,34,32,58,32,34,117,110,107,110,111,119,110,32,102,105,108,101,110,97,109,101,34,44,32,99,44,32,100,32,63,32,100,32,63,32,72,40,120,44,32,100,41,32,58,32,34,34,32,58,32,34,117,110,107,110,111,119,110,32,102,117,110,99,116,105,111,110,34,93,10,32,32,32,32,32,32,32,32,32,32,41,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,109,58,32,40,97,44,32,98,44,32,99,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,100,32,61,32,110,101,119,32,72,97,40,97,41,59,10,32,32,32,32,32,32,32,32,32,32,68,91,100,46,67,97,32,43,32,49,54,32,62,62,32,50,93,32,61,32,48,59,10,32,32,32,32,32,32,32,32,32,32,68,91,100,46,67,97,32,43,32,52,32,62,62,32,50,93,32,61,32,98,59,10,32,32,32,32,32,32,32,32,32,32,68,91,100,46,67,97,32,43,32,56,32,62,62,32,50,93,32,61,32,99,59,10,32,32,32,32,32,32,32,32,32,32,73,97,32,61,32,97,59,10,32,32,32,32,32,32,32,32,32,32,74,97,43,43,59,10,32,32,32,32,32,32,32,32,32,32,116,104,114,111,119,32,73,97,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,67,58,32,102,117,110,99,116,105,111,110,40,41,32,123,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,48,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,83,58,32,40,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,80,58,32,40,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,84,58,32,102,117,110,99,116,105,111,110,40,41,32,123,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,48,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,81,58,32,40,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,66,58,32,102,117,110,99,116,105,111,110,40,41,32,123,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,82,58,32,40,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,85,58,32,40,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,119,97,40,34,34,41,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,118,58,32,40,97,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,98,32,61,32,75,97,91,97,93,59,10,32,32,32,32,32,32,32,32,32,32,100,101,108,101,116,101,32,75,97,91,97,93,59,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,99,32,61,32,98,46,85,97,44,32,100,32,61,32,98,46,75,97,44,32,101,32,61,32,98,46,88,97,44,32,102,32,61,32,101,46,109,97,112,40,40,104,41,32,61,62,32,104,46,103,98,41,46,99,111,110,99,97,116,40,101,46,109,97,112,40,40,104,41,32,61,62,32,104,46,109,98,41,41,59,10,32,32,32,32,32,32,32,32,32,32,79,40,91,97,93,44,32,102,44,32,40,104,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,103,32,61,32,123,125,59,10,32,32,32,32,32,32,32,32,32,32,32,32,101,46,102,111,114,69,97,99,104,40,40,108,44,32,109,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,110,32,61,32,104,91,109,93,44,32,113,32,61,32,108,46,101,98,44,32,114,32,61,32,108,46,102,98,44,32,65,32,61,32,104,91,109,32,43,32,101,46,108,101,110,103,116,104,93,44,32,118,32,61,32,108,46,108,98,44,32,119,32,61,32,108,46,110,98,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,91,108,46,97,98,93,32,61,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,97,100,58,32,40,69,41,32,61,62,32,110,46,102,114,111,109,87,105,114,101,84,121,112,101,40,113,40,114,44,32,69,41,41,44,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,119,114,105,116,101,58,32,40,69,44,32,104,97,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,66,32,61,32,91,93,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,118,40,119,44,32,69,44,32,65,46,116,111,87,105,114,101,84,121,112,101,40,66,44,32,104,97,41,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,76,97,40,66,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,91,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,110,97,109,101,58,32,98,46,110,97,109,101,44,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,114,111,109,87,105,114,101,84,121,112,101,58,32,40,108,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,109,32,61,32,123,125,44,32,110,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,111,114,32,40,110,32,105,110,32,103,41,32,109,91,110,93,32,61,32,103,91,110,93,46,114,101,97,100,40,108,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,100,40,108,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,109,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,111,87,105,114,101,84,121,112,101,58,32,40,108,44,32,109,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,111,114,32,40,118,97,114,32,110,32,105,110,32,103,41,32,105,102,32,40,33,40,110,32,105,110,32,109,41,41,32,116,104,114,111,119,32,110,101,119,32,84,121,112,101,69,114,114,111,114,40,96,77,105,115,115,105,110,103,32,102,105,101,108,100,58,32,34,36,123,110,125,34,96,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,113,32,61,32,99,40,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,111,114,32,40,110,32,105,110,32,103,41,32,103,91,110,93,46,119,114,105,116,101,40,113,44,32,109,91,110,93,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,110,117,108,108,32,33,61,61,32,108,32,38,38,32,108,46,112,117,115,104,40,100,44,32,113,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,113,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,73,97,58,32,56,44,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,97,100,86,97,108,117,101,70,114,111,109,80,111,105,110,116,101,114,58,32,74,44,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,74,97,58,32,100,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,32,32,93,59,10,32,32,32,32,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,74,58,32,40,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,95,58,32,40,97,44,32,98,44,32,99,44,32,100,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,98,32,61,32,80,40,98,41,59,10,32,32,32,32,32,32,32,32,32,32,78,40,97,44,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,110,97,109,101,58,32,98,44,10,32,32,32,32,32,32,32,32,32,32,32,32,102,114,111,109,87,105,114,101,84,121,112,101,58,32,102,117,110,99,116,105,111,110,40,101,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,33,33,101,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,32,32,32,32,116,111,87,105,114,101,84,121,112,101,58,32,102,117,110,99,116,105,111,110,40,101,44,32,102,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,102,32,63,32,99,32,58,32,100,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,32,32,32,32,73,97,58,32,56,44,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,97,100,86,97,108,117,101,70,114,111,109,80,111,105,110,116,101,114,58,32,102,117,110,99,116,105,111,110,40,101,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,116,104,105,115,46,102,114,111,109,87,105,114,101,84,121,112,101,40,120,91,101,93,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,32,32,32,32,74,97,58,32,110,117,108,108,10,32,32,32,32,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,114,58,32,40,97,44,32,98,44,32,99,44,32,100,44,32,101,44,32,102,44,32,104,44,32,103,44,32,108,44,32,109,44,32,110,44,32,113,44,32,114,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,110,32,61,32,80,40,110,41,59,10,32,32,32,32,32,32,32,32,32,32,102,32,61,32,84,40,101,44,32,102,41,59,10,32,32,32,32,32,32,32,32,32,32,103,32,38,38,32,40,103,32,61,32,84,40,104,44,32,103,41,41,59,10,32,32,32,32,32,32,32,32,32,32,109,32,38,38,32,40,109,32,61,32,84,40,108,44,32,109,41,41,59,10,32,32,32,32,32,32,32,32,32,32,114,32,61,32,84,40,113,44,32,114,41,59,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,65,32,61,32,101,98,40,110,41,59,10,32,32,32,32,32,32,32,32,32,32,100,98,40,65,44,32,102,117,110,99,116,105,111,110,40,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,116,98,40,96,67,97,110,110,111,116,32,99,111,110,115,116,114,117,99,116,32,36,123,110,125,32,100,117,101,32,116,111,32,117,110,98,111,117,110,100,32,116,121,112,101,115,96,44,32,91,100,93,41,59,10,32,32,32,32,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,32,32,32,32,79,40,91,97,44,32,98,44,32,99,93,44,32,100,32,63,32,91,100,93,32,58,32,91,93,44,32,40,118,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,95,97,50,59,10,32,32,32,32,32,32,32,32,32,32,32,32,118,32,61,32,118,91,48,93,59,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,100,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,119,32,61,32,118,46,66,97,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,69,32,61,32,119,46,78,97,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,32,101,108,115,101,32,69,32,61,32,97,98,46,112,114,111,116,111,116,121,112,101,59,10,32,32,32,32,32,32,32,32,32,32,32,32,118,32,61,32,98,98,40,110,44,32,102,117,110,99,116,105,111,110,40,46,46,46,83,97,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,79,98,106,101,99,116,46,103,101,116,80,114,111,116,111,116,121,112,101,79,102,40,116,104,105,115,41,32,33,61,61,32,104,97,41,32,116,104,114,111,119,32,110,101,119,32,81,40,34,85,115,101,32,39,110,101,119,39,32,116,111,32,99,111,110,115,116,114,117,99,116,32,34,32,43,32,110,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,118,111,105,100,32,48,32,61,61,61,32,66,46,76,97,41,32,116,104,114,111,119,32,110,101,119,32,81,40,110,32,43,32,34,32,104,97,115,32,110,111,32,97,99,99,101,115,115,105,98,108,101,32,99,111,110,115,116,114,117,99,116,111,114,34,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,65,98,32,61,32,66,46,76,97,91,83,97,46,108,101,110,103,116,104,93,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,118,111,105,100,32,48,32,61,61,61,32,65,98,41,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,81,40,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,96,84,114,105,101,100,32,116,111,32,105,110,118,111,107,101,32,99,116,111,114,32,111,102,32,36,123,110,125,32,119,105,116,104,32,105,110,118,97,108,105,100,32,110,117,109,98,101,114,32,111,102,32,112,97,114,97,109,101,116,101,114,115,32,40,36,123,83,97,46,108,101,110,103,116,104,125,41,32,45,32,101,120,112,101,99,116,101,100,32,40,36,123,79,98,106,101,99,116,46,107,101,121,115,40,66,46,76,97,41,46,116,111,83,116,114,105,110,103,40,41,125,41,32,112,97,114,97,109,101,116,101,114,115,32,105,110,115,116,101,97,100,33,96,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,65,98,46,97,112,112,108,121,40,116,104,105,115,44,32,83,97,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,104,97,32,61,32,79,98,106,101,99,116,46,99,114,101,97,116,101,40,69,44,32,123,32,99,111,110,115,116,114,117,99,116,111,114,58,32,123,32,118,97,108,117,101,58,32,118,32,125,32,125,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,118,46,112,114,111,116,111,116,121,112,101,32,61,32,104,97,59,10,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,66,32,61,32,110,101,119,32,102,98,40,110,44,32,118,44,32,104,97,44,32,114,44,32,119,44,32,102,44,32,103,44,32,109,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,66,46,71,97,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,105,97,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,95,97,50,32,61,32,40,105,97,32,61,32,66,46,71,97,41,46,86,97,41,32,33,61,32,110,117,108,108,32,63,32,95,97,50,32,58,32,105,97,46,86,97,32,61,32,91,93,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,66,46,71,97,46,86,97,46,112,117,115,104,40,66,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,32,32,119,32,61,32,110,101,119,32,109,98,40,110,44,32,66,44,32,116,114,117,101,44,32,102,97,108,115,101,44,32,102,97,108,115,101,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,105,97,32,61,32,110,101,119,32,109,98,40,110,32,43,32,34,42,34,44,32,66,44,32,102,97,108,115,101,44,32,102,97,108,115,101,44,32,102,97,108,115,101,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,69,32,61,32,110,101,119,32,109,98,40,110,32,43,32,34,32,99,111,110,115,116,42,34,44,32,66,44,32,102,97,108,115,101,44,32,116,114,117,101,44,32,102,97,108,115,101,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,85,97,91,97,93,32,61,32,123,32,112,111,105,110,116,101,114,84,121,112,101,58,32,105,97,44,32,90,97,58,32,69,32,125,59,10,32,32,32,32,32,32,32,32,32,32,32,32,110,98,40,65,44,32,118,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,91,119,44,32,105,97,44,32,69,93,59,10,32,32,32,32,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,113,58,32,40,97,44,32,98,44,32,99,44,32,100,44,32,101,44,32,102,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,104,32,61,32,117,98,40,98,44,32,99,41,59,10,32,32,32,32,32,32,32,32,32,32,101,32,61,32,84,40,100,44,32,101,41,59,10,32,32,32,32,32,32,32,32,32,32,79,40,91,93,44,32,91,97,93,44,32,40,103,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,103,32,61,32,103,91,48,93,59,10,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,108,32,61,32,96,99,111,110,115,116,114,117,99,116,111,114,32,36,123,103,46,110,97,109,101,125,96,59,10,32,32,32,32,32,32,32,32,32,32,32,32,118,111,105,100,32,48,32,61,61,61,32,103,46,66,97,46,76,97,32,38,38,32,40,103,46,66,97,46,76,97,32,61,32,91,93,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,118,111,105,100,32,48,32,33,61,61,32,103,46,66,97,46,76,97,91,98,32,45,32,49,93,41,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,81,40,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,96,67,97,110,110,111,116,32,114,101,103,105,115,116,101,114,32,109,117,108,116,105,112,108,101,32,99,111,110,115,116,114,117,99,116,111,114,115,32,119,105,116,104,32,105,100,101,110,116,105,99,97,108,32,110,117,109,98,101,114,32,111,102,32,112,97,114,97,109,101,116,101,114,115,32,40,36,123,98,32,45,32,49,125,41,32,102,111,114,32,99,108,97,115,115,32,39,36,123,103,46,110,97,109,101,125,39,33,32,79,118,101,114,108,111,97,100,32,114,101,115,111,108,117,116,105,111,110,32,105,115,32,99,117,114,114,101,110,116,108,121,32,111,110,108,121,32,112,101,114,102,111,114,109,101,100,32,117,115,105,110,103,32,116,104,101,32,112,97,114,97,109,101,116,101,114,32,99,111,117,110,116,44,32,110,111,116,32,97,99,116,117,97,108,32,116,121,112,101,32,105,110,102,111,33,96,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,103,46,66,97,46,76,97,91,98,32,45,32,49,93,32,61,32,40,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,98,40,96,67,97,110,110,111,116,32,99,111,110,115,116,114,117,99,116,32,36,123,103,46,110,97,109,101,125,32,100,117,101,32,116,111,32,117,110,98,111,117,110,100,32,116,121,112,101,115,96,44,32,104,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,32,32,32,32,32,32,79,40,91,93,44,32,104,44,32,40,109,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,109,46,115,112,108,105,99,101,40,49,44,32,48,44,32,110,117,108,108,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,46,66,97,46,76,97,91,98,32,45,32,49,93,32,61,32,119,98,40,108,44,32,109,44,32,110,117,108,108,44,32,101,44,32,102,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,91,93,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,91,93,59,10,32,32,32,32,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,102,58,32,40,97,44,32,98,44,32,99,44,32,100,44,32,101,44,32,102,44,32,104,44,32,103,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,108,32,61,32,117,98,40,99,44,32,100,41,59,10,32,32,32,32,32,32,32,32,32,32,98,32,61,32,80,40,98,41,59,10,32,32,32,32,32,32,32,32,32,32,98,32,61,32,120,98,40,98,41,59,10,32,32,32,32,32,32,32,32,32,32,102,32,61,32,84,40,101,44,32,102,41,59,10,32,32,32,32,32,32,32,32,32,32,79,40,91,93,44,32,91,97,93,44,32,40,109,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,110,40,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,98,40,96,67,97,110,110,111,116,32,99,97,108,108,32,36,123,113,125,32,100,117,101,32,116,111,32,117,110,98,111,117,110,100,32,116,121,112,101,115,96,44,32,108,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,32,32,109,32,61,32,109,91,48,93,59,10,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,113,32,61,32,96,36,123,109,46,110,97,109,101,125,46,36,123,98,125,96,59,10,32,32,32,32,32,32,32,32,32,32,32,32,98,46,115,116,97,114,116,115,87,105,116,104,40,34,64,64,34,41,32,38,38,32,40,98,32,61,32,83,121,109,98,111,108,91,98,46,115,117,98,115,116,114,105,110,103,40,50,41,93,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,103,32,38,38,32,109,46,66,97,46,106,98,46,112,117,115,104,40,98,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,114,32,61,32,109,46,66,97,46,78,97,44,32,65,32,61,32,114,91,98,93,59,10,32,32,32,32,32,32,32,32,32,32,32,32,118,111,105,100,32,48,32,61,61,61,32,65,32,124,124,32,118,111,105,100,32,48,32,61,61,61,32,65,46,70,97,32,38,38,32,65,46,99,108,97,115,115,78,97,109,101,32,33,61,61,32,109,46,110,97,109,101,32,38,38,32,65,46,81,97,32,61,61,61,32,99,32,45,32,50,32,63,32,40,110,46,81,97,32,61,32,99,32,45,32,50,44,32,110,46,99,108,97,115,115,78,97,109,101,32,61,32,109,46,110,97,109,101,44,32,114,91,98,93,32,61,32,110,41,32,58,32,40,99,98,40,114,44,32,98,44,32,113,41,44,32,114,91,98,93,46,70,97,91,99,32,45,32,50,93,32,61,32,110,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,79,40,91,93,44,32,108,44,32,40,118,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,118,32,61,32,119,98,40,113,44,32,118,44,32,109,44,32,102,44,32,104,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,118,111,105,100,32,48,32,61,61,61,32,114,91,98,93,46,70,97,32,63,32,40,118,46,81,97,32,61,32,99,32,45,32,50,44,32,114,91,98,93,32,61,32,118,41,32,58,32,114,91,98,93,46,70,97,91,99,32,45,32,50,93,32,61,32,118,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,91,93,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,91,93,59,10,32,32,32,32,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,90,58,32,40,97,41,32,61,62,32,78,40,97,44,32,67,98,41,44,10,32,32,32,32,32,32,32,32,120,58,32,40,97,44,32,98,44,32,99,44,32,100,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,101,40,41,32,123,10,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,98,32,61,32,80,40,98,41,59,10,32,32,32,32,32,32,32,32,32,32,101,46,118,97,108,117,101,115,32,61,32,123,125,59,10,32,32,32,32,32,32,32,32,32,32,78,40,97,44,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,110,97,109,101,58,32,98,44,10,32,32,32,32,32,32,32,32,32,32,32,32,99,111,110,115,116,114,117,99,116,111,114,58,32,101,44,10,32,32,32,32,32,32,32,32,32,32,32,32,102,114,111,109,87,105,114,101,84,121,112,101,58,32,102,117,110,99,116,105,111,110,40,102,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,116,104,105,115,46,99,111,110,115,116,114,117,99,116,111,114,46,118,97,108,117,101,115,91,102,93,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,32,32,32,32,116,111,87,105,114,101,84,121,112,101,58,32,40,102,44,32,104,41,32,61,62,32,104,46,118,97,108,117,101,44,10,32,32,32,32,32,32,32,32,32,32,32,32,73,97,58,32,56,44,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,97,100,86,97,108,117,101,70,114,111,109,80,111,105,110,116,101,114,58,32,68,98,40,98,44,32,99,44,32,100,41,44,10,32,32,32,32,32,32,32,32,32,32,32,32,74,97,58,32,110,117,108,108,10,32,32,32,32,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,32,32,32,32,100,98,40,98,44,32,101,41,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,107,58,32,40,97,44,32,98,44,32,99,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,100,32,61,32,69,98,40,97,44,32,34,101,110,117,109,34,41,59,10,32,32,32,32,32,32,32,32,32,32,98,32,61,32,80,40,98,41,59,10,32,32,32,32,32,32,32,32,32,32,97,32,61,32,100,46,99,111,110,115,116,114,117,99,116,111,114,59,10,32,32,32,32,32,32,32,32,32,32,100,32,61,32,79,98,106,101,99,116,46,99,114,101,97,116,101,40,100,46,99,111,110,115,116,114,117,99,116,111,114,46,112,114,111,116,111,116,121,112,101,44,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,118,97,108,117,101,58,32,123,32,118,97,108,117,101,58,32,99,32,125,44,10,32,32,32,32,32,32,32,32,32,32,32,32,99,111,110,115,116,114,117,99,116,111,114,58,32,123,32,118,97,108,117,101,58,32,98,98,40,96,36,123,100,46,110,97,109,101,125,95,36,123,98,125,96,44,32,102,117,110,99,116,105,111,110,40,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,125,41,32,125,10,32,32,32,32,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,32,32,32,32,97,46,118,97,108,117,101,115,91,99,93,32,61,32,100,59,10,32,32,32,32,32,32,32,32,32,32,97,91,98,93,32,61,32,100,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,68,58,32,40,97,44,32,98,44,32,99,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,98,32,61,32,80,40,98,41,59,10,32,32,32,32,32,32,32,32,32,32,78,40,97,44,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,110,97,109,101,58,32,98,44,10,32,32,32,32,32,32,32,32,32,32,32,32,102,114,111,109,87,105,114,101,84,121,112,101,58,32,40,100,41,32,61,62,32,100,44,10,32,32,32,32,32,32,32,32,32,32,32,32,116,111,87,105,114,101,84,121,112,101,58,32,40,100,44,32,101,41,32,61,62,32,101,44,10,32,32,32,32,32,32,32,32,32,32,32,32,73,97,58,32,56,44,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,97,100,86,97,108,117,101,70,114,111,109,80,111,105,110,116,101,114,58,32,70,98,40,98,44,32,99,41,44,10,32,32,32,32,32,32,32,32,32,32,32,32,74,97,58,32,110,117,108,108,10,32,32,32,32,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,70,58,32,40,97,44,32,98,44,32,99,44,32,100,44,32,101,44,32,102,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,104,32,61,32,117,98,40,98,44,32,99,41,59,10,32,32,32,32,32,32,32,32,32,32,97,32,61,32,80,40,97,41,59,10,32,32,32,32,32,32,32,32,32,32,97,32,61,32,120,98,40,97,41,59,10,32,32,32,32,32,32,32,32,32,32,101,32,61,32,84,40,100,44,32,101,41,59,10,32,32,32,32,32,32,32,32,32,32,100,98,40,10,32,32,32,32,32,32,32,32,32,32,32,32,97,44,10,32,32,32,32,32,32,32,32,32,32,32,32,102,117,110,99,116,105,111,110,40,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,98,40,96,67,97,110,110,111,116,32,99,97,108,108,32,36,123,97,125,32,100,117,101,32,116,111,32,117,110,98,111,117,110,100,32,116,121,112,101,115,96,44,32,104,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,32,32,32,32,98,32,45,32,49,10,32,32,32,32,32,32,32,32,32,32,41,59,10,32,32,32,32,32,32,32,32,32,32,79,40,91,93,44,32,104,44,32,40,103,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,110,98,40,97,44,32,119,98,40,97,44,32,91,103,91,48,93,44,32,110,117,108,108,93,46,99,111,110,99,97,116,40,103,46,115,108,105,99,101,40,49,41,41,44,32,110,117,108,108,44,32,101,44,32,102,41,44,32,98,32,45,32,49,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,91,93,59,10,32,32,32,32,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,108,58,32,40,97,44,32,98,44,32,99,44,32,100,44,32,101,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,98,32,61,32,80,40,98,41,59,10,32,32,32,32,32,32,32,32,32,32,45,49,32,61,61,61,32,101,32,38,38,32,40,101,32,61,32,52,50,57,52,57,54,55,50,57,53,41,59,10,32,32,32,32,32,32,32,32,32,32,101,32,61,32,40,103,41,32,61,62,32,103,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,48,32,61,61,61,32,100,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,102,32,61,32,51,50,32,45,32,56,32,42,32,99,59,10,32,32,32,32,32,32,32,32,32,32,32,32,101,32,61,32,40,103,41,32,61,62,32,103,32,60,60,32,102,32,62,62,62,32,102,59,10,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,104,32,61,32,98,46,105,110,99,108,117,100,101,115,40,34,117,110,115,105,103,110,101,100,34,41,32,63,32,102,117,110,99,116,105,111,110,40,103,44,32,108,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,108,32,62,62,62,32,48,59,10,32,32,32,32,32,32,32,32,32,32,125,32,58,32,102,117,110,99,116,105,111,110,40,103,44,32,108,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,108,59,10,32,32,32,32,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,32,32,32,32,78,40,97,44,32,123,32,110,97,109,101,58,32,98,44,32,102,114,111,109,87,105,114,101,84,121,112,101,58,32,101,44,32,116,111,87,105,114,101,84,121,112,101,58,32,104,44,32,73,97,58,32,56,44,32,114,101,97,100,86,97,108,117,101,70,114,111,109,80,111,105,110,116,101,114,58,32,71,98,40,98,44,32,99,44,32,48,32,33,61,61,32,100,41,44,32,74,97,58,32,110,117,108,108,32,125,41,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,104,58,32,40,97,44,32,98,44,32,99,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,100,40,102,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,110,101,119,32,101,40,117,46,98,117,102,102,101,114,44,32,68,91,102,32,43,32,52,32,62,62,32,50,93,44,32,68,91,102,32,62,62,32,50,93,41,59,10,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,101,32,61,32,91,73,110,116,56,65,114,114,97,121,44,32,85,105,110,116,56,65,114,114,97,121,44,32,73,110,116,49,54,65,114,114,97,121,44,32,85,105,110,116,49,54,65,114,114,97,121,44,32,73,110,116,51,50,65,114,114,97,121,44,32,85,105,110,116,51,50,65,114,114,97,121,44,32,70,108,111,97,116,51,50,65,114,114,97,121,44,32,70,108,111,97,116,54,52,65,114,114,97,121,93,91,98,93,59,10,32,32,32,32,32,32,32,32,32,32,99,32,61,32,80,40,99,41,59,10,32,32,32,32,32,32,32,32,32,32,78,40,97,44,32,123,32,110,97,109,101,58,32,99,44,32,102,114,111,109,87,105,114,101,84,121,112,101,58,32,100,44,32,73,97,58,32,56,44,32,114,101,97,100,86,97,108,117,101,70,114,111,109,80,111,105,110,116,101,114,58,32,100,32,125,44,32,123,32,104,98,58,32,116,114,117,101,32,125,41,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,117,58,32,40,97,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,78,40,97,44,32,72,98,41,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,101,97,58,32,40,97,44,32,98,44,32,99,44,32,100,44,32,101,44,32,102,44,32,104,44,32,103,44,32,108,44,32,109,44,32,110,44,32,113,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,99,32,61,32,80,40,99,41,59,10,32,32,32,32,32,32,32,32,32,32,102,32,61,32,84,40,101,44,32,102,41,59,10,32,32,32,32,32,32,32,32,32,32,103,32,61,32,84,40,104,44,32,103,41,59,10,32,32,32,32,32,32,32,32,32,32,109,32,61,32,84,40,108,44,32,109,41,59,10,32,32,32,32,32,32,32,32,32,32,113,32,61,32,84,40,110,44,32,113,41,59,10,32,32,32,32,32,32,32,32,32,32,79,40,91,97,93,44,32,91,98,93,44,32,40,114,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,114,32,61,32,114,91,48,93,59,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,91,110,101,119,32,109,98,40,99,44,32,114,46,66,97,44,32,102,97,108,115,101,44,32,102,97,108,115,101,44,32,116,114,117,101,44,32,114,44,32,100,44,32,102,44,32,103,44,32,109,44,32,113,41,93,59,10,32,32,32,32,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,69,58,32,40,97,44,32,98,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,98,32,61,32,80,40,98,41,59,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,99,32,61,32,34,115,116,100,58,58,115,116,114,105,110,103,34,32,61,61,61,32,98,59,10,32,32,32,32,32,32,32,32,32,32,78,40,97,44,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,110,97,109,101,58,32,98,44,10,32,32,32,32,32,32,32,32,32,32,32,32,102,114,111,109,87,105,114,101,84,121,112,101,58,32,102,117,110,99,116,105,111,110,40,100,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,101,32,61,32,68,91,100,32,62,62,32,50,93,44,32,102,32,61,32,100,32,43,32,52,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,99,41,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,111,114,32,40,118,97,114,32,104,32,61,32,102,44,32,103,32,61,32,48,59,32,103,32,60,61,32,101,59,32,43,43,103,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,108,32,61,32,102,32,43,32,103,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,103,32,61,61,32,101,32,124,124,32,48,32,61,61,32,120,91,108,93,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,104,32,61,32,104,32,63,32,72,40,120,44,32,104,44,32,108,32,45,32,104,41,32,58,32,34,34,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,118,111,105,100,32,48,32,61,61,61,32,109,41,32,118,97,114,32,109,32,61,32,104,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,101,108,115,101,32,109,32,43,61,32,83,116,114,105,110,103,46,102,114,111,109,67,104,97,114,67,111,100,101,40,48,41,44,32,109,32,43,61,32,104,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,104,32,61,32,108,32,43,32,49,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,101,108,115,101,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,109,32,61,32,65,114,114,97,121,40,101,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,111,114,32,40,103,32,61,32,48,59,32,103,32,60,32,101,59,32,43,43,103,41,32,109,91,103,93,32,61,32,83,116,114,105,110,103,46,102,114,111,109,67,104,97,114,67,111,100,101,40,120,91,102,32,43,32,103,93,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,109,32,61,32,109,46,106,111,105,110,40,34,34,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,85,40,100,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,109,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,32,32,32,32,116,111,87,105,114,101,84,121,112,101,58,32,102,117,110,99,116,105,111,110,40,100,44,32,101,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,101,32,105,110,115,116,97,110,99,101,111,102,32,65,114,114,97,121,66,117,102,102,101,114,32,38,38,32,40,101,32,61,32,110,101,119,32,85,105,110,116,56,65,114,114,97,121,40,101,41,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,102,44,32,104,32,61,32,34,115,116,114,105,110,103,34,32,61,61,32,116,121,112,101,111,102,32,101,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,33,40,104,32,124,124,32,101,32,105,110,115,116,97,110,99,101,111,102,32,85,105,110,116,56,65,114,114,97,121,32,124,124,32,101,32,105,110,115,116,97,110,99,101,111,102,32,85,105,110,116,56,67,108,97,109,112,101,100,65,114,114,97,121,32,124,124,32,101,32,105,110,115,116,97,110,99,101,111,102,32,73,110,116,56,65,114,114,97,121,41,41,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,81,40,34,67,97,110,110,111,116,32,112,97,115,115,32,110,111,110,45,115,116,114,105,110,103,32,116,111,32,115,116,100,58,58,115,116,114,105,110,103,34,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,99,32,38,38,32,104,41,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,111,114,32,40,118,97,114,32,103,32,61,32,102,32,61,32,48,59,32,103,32,60,32,101,46,108,101,110,103,116,104,59,32,43,43,103,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,108,32,61,32,101,46,99,104,97,114,67,111,100,101,65,116,40,103,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,49,50,55,32,62,61,32,108,32,63,32,102,43,43,32,58,32,50,48,52,55,32,62,61,32,108,32,63,32,102,32,43,61,32,50,32,58,32,53,53,50,57,54,32,60,61,32,108,32,38,38,32,53,55,51,52,51,32,62,61,32,108,32,63,32,40,102,32,43,61,32,52,44,32,43,43,103,41,32,58,32,102,32,43,61,32,51,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,101,108,115,101,32,102,32,61,32,101,46,108,101,110,103,116,104,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,32,61,32,102,99,40,52,32,43,32,102,32,43,32,49,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,108,32,61,32,103,32,43,32,52,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,68,91,103,32,62,62,32,50,93,32,61,32,102,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,99,32,38,38,32,104,41,32,73,40,101,44,32,108,44,32,102,32,43,32,49,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,101,108,115,101,32,105,102,32,40,104,41,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,111,114,32,40,104,32,61,32,48,59,32,104,32,60,32,102,59,32,43,43,104,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,109,32,61,32,101,46,99,104,97,114,67,111,100,101,65,116,40,104,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,50,53,53,32,60,32,109,41,32,116,104,114,111,119,32,85,40,108,41,44,32,110,101,119,32,81,40,34,83,116,114,105,110,103,32,104,97,115,32,85,84,70,45,49,54,32,99,111,100,101,32,117,110,105,116,115,32,116,104,97,116,32,100,111,32,110,111,116,32,102,105,116,32,105,110,32,56,32,98,105,116,115,34,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,120,91,108,32,43,32,104,93,32,61,32,109,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,101,108,115,101,32,102,111,114,32,40,104,32,61,32,48,59,32,104,32,60,32,102,59,32,43,43,104,41,32,120,91,108,32,43,32,104,93,32,61,32,101,91,104,93,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,110,117,108,108,32,33,61,61,32,100,32,38,38,32,100,46,112,117,115,104,40,85,44,32,103,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,103,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,32,32,32,32,73,97,58,32,56,44,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,97,100,86,97,108,117,101,70,114,111,109,80,111,105,110,116,101,114,58,32,74,44,10,32,32,32,32,32,32,32,32,32,32,32,32,74,97,40,100,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,85,40,100,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,116,58,32,40,97,44,32,98,44,32,99,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,99,32,61,32,80,40,99,41,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,50,32,61,61,61,32,98,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,100,32,61,32,74,98,59,10,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,101,32,61,32,75,98,59,10,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,102,32,61,32,76,98,59,10,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,104,32,61,32,40,103,41,32,61,62,32,122,91,103,32,62,62,32,49,93,59,10,32,32,32,32,32,32,32,32,32,32,125,32,101,108,115,101,32,52,32,61,61,61,32,98,32,38,38,32,40,100,32,61,32,77,98,44,32,101,32,61,32,78,98,44,32,102,32,61,32,79,98,44,32,104,32,61,32,40,103,41,32,61,62,32,68,91,103,32,62,62,32,50,93,41,59,10,32,32,32,32,32,32,32,32,32,32,78,40,97,44,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,110,97,109,101,58,32,99,44,10,32,32,32,32,32,32,32,32,32,32,32,32,102,114,111,109,87,105,114,101,84,121,112,101,58,32,40,103,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,111,114,32,40,118,97,114,32,108,32,61,32,68,91,103,32,62,62,32,50,93,44,32,109,44,32,110,32,61,32,103,32,43,32,52,44,32,113,32,61,32,48,59,32,113,32,60,61,32,108,59,32,43,43,113,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,114,32,61,32,103,32,43,32,52,32,43,32,113,32,42,32,98,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,113,32,61,61,32,108,32,124,124,32,48,32,61,61,32,104,40,114,41,41,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,110,32,61,32,100,40,110,44,32,114,32,45,32,110,41,44,32,118,111,105,100,32,48,32,61,61,61,32,109,32,63,32,109,32,61,32,110,32,58,32,40,109,32,43,61,32,83,116,114,105,110,103,46,102,114,111,109,67,104,97,114,67,111,100,101,40,48,41,44,32,109,32,43,61,32,110,41,44,32,110,32,61,32,114,32,43,32,98,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,85,40,103,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,109,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,32,32,32,32,116,111,87,105,114,101,84,121,112,101,58,32,40,103,44,32,108,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,34,115,116,114,105,110,103,34,32,33,61,32,116,121,112,101,111,102,32,108,41,32,116,104,114,111,119,32,110,101,119,32,81,40,96,67,97,110,110,111,116,32,112,97,115,115,32,110,111,110,45,115,116,114,105,110,103,32,116,111,32,67,43,43,32,115,116,114,105,110,103,32,116,121,112,101,32,36,123,99,125,96,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,109,32,61,32,102,40,108,41,44,32,110,32,61,32,102,99,40,52,32,43,32,109,32,43,32,98,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,68,91,110,32,62,62,32,50,93,32,61,32,109,32,47,32,98,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,101,40,108,44,32,110,32,43,32,52,44,32,109,32,43,32,98,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,110,117,108,108,32,33,61,61,32,103,32,38,38,32,103,46,112,117,115,104,40,85,44,32,110,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,110,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,32,32,32,32,73,97,58,32,56,44,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,97,100,86,97,108,117,101,70,114,111,109,80,111,105,110,116,101,114,58,32,74,44,10,32,32,32,32,32,32,32,32,32,32,32,32,74,97,40,103,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,85,40,103,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,119,58,32,40,97,44,32,98,44,32,99,44,32,100,44,32,101,44,32,102,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,75,97,91,97,93,32,61,32,123,32,110,97,109,101,58,32,80,40,98,41,44,32,85,97,58,32,84,40,99,44,32,100,41,44,32,75,97,58,32,84,40,101,44,32,102,41,44,32,88,97,58,32,91,93,32,125,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,106,58,32,40,97,44,32,98,44,32,99,44,32,100,44,32,101,44,32,102,44,32,104,44,32,103,44,32,108,44,32,109,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,75,97,91,97,93,46,88,97,46,112,117,115,104,40,123,32,97,98,58,32,80,40,98,41,44,32,103,98,58,32,99,44,32,101,98,58,32,84,40,100,44,32,101,41,44,32,102,98,58,32,102,44,32,109,98,58,32,104,44,32,108,98,58,32,84,40,103,44,32,108,41,44,32,110,98,58,32,109,32,125,41,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,36,58,32,40,97,44,32,98,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,98,32,61,32,80,40,98,41,59,10,32,32,32,32,32,32,32,32,32,32,78,40,97,44,32,123,32,112,98,58,32,116,114,117,101,44,32,110,97,109,101,58,32,98,44,32,73,97,58,32,48,44,32,102,114,111,109,87,105,114,101,84,121,112,101,58,32,40,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,125,44,32,116,111,87,105,114,101,84,121,112,101,58,32,40,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,125,32,125,41,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,79,58,32,40,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,70,97,32,61,32,102,97,108,115,101,59,10,32,32,32,32,32,32,32,32,32,32,86,98,32,61,32,48,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,75,58,32,40,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,116,104,114,111,119,32,73,110,102,105,110,105,116,121,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,99,97,58,32,40,97,44,32,98,44,32,99,44,32,100,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,97,32,61,32,80,98,91,97,93,59,10,32,32,32,32,32,32,32,32,32,32,98,32,61,32,66,98,40,98,41,59,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,97,40,110,117,108,108,44,32,98,44,32,99,44,32,100,41,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,71,58,32,122,98,44,10,32,32,32,32,32,32,32,32,98,97,58,32,40,97,44,32,98,44,32,99,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,100,32,61,32,82,98,40,97,44,32,98,41,44,32,101,32,61,32,100,46,115,104,105,102,116,40,41,59,10,32,32,32,32,32,32,32,32,32,32,97,45,45,59,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,102,32,61,32,65,114,114,97,121,40,97,41,59,10,32,32,32,32,32,32,32,32,32,32,98,32,61,32,96,109,101,116,104,111,100,67,97,108,108,101,114,60,40,36,123,100,46,109,97,112,40,40,104,41,32,61,62,32,104,46,110,97,109,101,41,46,106,111,105,110,40,34,44,32,34,41,125,41,32,61,62,32,36,123,101,46,110,97,109,101,125,62,96,59,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,81,98,40,10,32,32,32,32,32,32,32,32,32,32,32,32,98,98,40,98,44,32,40,104,44,32,103,44,32,108,44,32,109,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,111,114,32,40,118,97,114,32,110,32,61,32,48,44,32,113,32,61,32,48,59,32,113,32,60,32,97,59,32,43,43,113,41,32,102,91,113,93,32,61,32,100,91,113,93,46,114,101,97,100,86,97,108,117,101,70,114,111,109,80,111,105,110,116,101,114,40,109,32,43,32,110,41,44,32,110,32,43,61,32,100,91,113,93,46,73,97,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,32,61,32,49,32,61,61,61,32,99,32,63,32,83,98,40,103,44,32,102,41,32,58,32,103,46,97,112,112,108,121,40,104,44,32,102,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,104,32,61,32,91,93,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,103,32,61,32,101,46,116,111,87,105,114,101,84,121,112,101,40,104,44,32,103,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,104,46,108,101,110,103,116,104,32,38,38,32,40,68,91,108,32,62,62,32,50,93,32,61,32,107,98,40,104,41,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,103,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,41,10,32,32,32,32,32,32,32,32,32,32,41,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,100,97,58,32,40,97,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,57,32,60,32,97,32,38,38,32,40,86,91,97,32,43,32,49,93,32,43,61,32,49,41,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,97,97,58,32,40,97,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,98,32,61,32,66,98,40,97,41,59,10,32,32,32,32,32,32,32,32,32,32,76,97,40,98,41,59,10,32,32,32,32,32,32,32,32,32,32,122,98,40,97,41,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,111,58,32,40,97,44,32,98,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,97,32,61,32,69,98,40,97,44,32,34,95,101,109,118,97,108,95,116,97,107,101,95,118,97,108,117,101,34,41,59,10,32,32,32,32,32,32,32,32,32,32,97,32,61,32,97,46,114,101,97,100,86,97,108,117,101,70,114,111,109,80,111,105,110,116,101,114,40,98,41,59,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,107,98,40,97,41,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,76,58,32,40,97,44,32,98,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,84,98,91,97,93,32,38,38,32,40,99,108,101,97,114,84,105,109,101,111,117,116,40,84,98,91,97,93,46,105,100,41,44,32,100,101,108,101,116,101,32,84,98,91,97,93,41,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,33,98,41,32,114,101,116,117,114,110,32,48,59,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,99,32,61,32,115,101,116,84,105,109,101,111,117,116,40,40,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,100,101,108,101,116,101,32,84,98,91,97,93,59,10,32,32,32,32,32,32,32,32,32,32,32,32,88,98,40,40,41,32,61,62,32,103,99,40,97,44,32,112,101,114,102,111,114,109,97,110,99,101,46,110,111,119,40,41,41,41,59,10,32,32,32,32,32,32,32,32,32,32,125,44,32,98,41,59,10,32,32,32,32,32,32,32,32,32,32,84,98,91,97,93,32,61,32,123,32,105,100,58,32,99,44,32,114,98,58,32,98,32,125,59,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,48,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,77,58,32,40,97,44,32,98,44,32,99,44,32,100,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,101,32,61,32,40,47,42,32,64,95,95,80,85,82,69,95,95,32,42,47,32,110,101,119,32,68,97,116,101,40,41,41,46,103,101,116,70,117,108,108,89,101,97,114,40,41,44,32,102,32,61,32,110,101,119,32,68,97,116,101,40,101,44,32,48,44,32,49,41,46,103,101,116,84,105,109,101,122,111,110,101,79,102,102,115,101,116,40,41,59,10,32,32,32,32,32,32,32,32,32,32,101,32,61,32,110,101,119,32,68,97,116,101,40,101,44,32,54,44,32,49,41,46,103,101,116,84,105,109,101,122,111,110,101,79,102,102,115,101,116,40,41,59,10,32,32,32,32,32,32,32,32,32,32,68,91,97,32,62,62,32,50,93,32,61,32,54,48,32,42,32,77,97,116,104,46,109,97,120,40,102,44,32,101,41,59,10,32,32,32,32,32,32,32,32,32,32,67,91,98,32,62,62,32,50,93,32,61,32,78,117,109,98,101,114,40,102,32,33,61,32,101,41,59,10,32,32,32,32,32,32,32,32,32,32,98,32,61,32,40,104,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,103,32,61,32,77,97,116,104,46,97,98,115,40,104,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,96,85,84,67,36,123,48,32,60,61,32,104,32,63,32,34,45,34,32,58,32,34,43,34,125,36,123,83,116,114,105,110,103,40,77,97,116,104,46,102,108,111,111,114,40,103,32,47,32,54,48,41,41,46,112,97,100,83,116,97,114,116,40,50,44,32,34,48,34,41,125,36,123,83,116,114,105,110,103,40,103,32,37,32,54,48,41,46,112,97,100,83,116,97,114,116,40,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,50,44,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,34,48,34,10,32,32,32,32,32,32,32,32,32,32,32,32,41,125,96,59,10,32,32,32,32,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,32,32,32,32,97,32,61,32,98,40,102,41,59,10,32,32,32,32,32,32,32,32,32,32,98,32,61,32,98,40,101,41,59,10,32,32,32,32,32,32,32,32,32,32,101,32,60,32,102,32,63,32,40,73,40,97,44,32,99,44,32,49,55,41,44,32,73,40,98,44,32,100,44,32,49,55,41,41,32,58,32,40,73,40,97,44,32,100,44,32,49,55,41,44,32,73,40,98,44,32,99,44,32,49,55,41,41,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,102,97,58,32,40,41,32,61,62,32,112,101,114,102,111,114,109,97,110,99,101,46,110,111,119,40,41,44,10,32,32,32,32,32,32,32,32,78,58,32,40,97,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,98,32,61,32,120,46,108,101,110,103,116,104,59,10,32,32,32,32,32,32,32,32,32,32,97,32,62,62,62,61,32,48,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,50,49,52,55,52,56,51,54,52,56,32,60,32,97,41,32,114,101,116,117,114,110,32,102,97,108,115,101,59,10,32,32,32,32,32,32,32,32,32,32,102,111,114,32,40,118,97,114,32,99,32,61,32,49,59,32,52,32,62,61,32,99,59,32,99,32,42,61,32,50,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,100,32,61,32,98,32,42,32,40,49,32,43,32,48,46,50,32,47,32,99,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,100,32,61,32,77,97,116,104,46,109,105,110,40,100,44,32,97,32,43,32,49,48,48,54,54,51,50,57,54,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,97,58,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,100,32,61,32,40,77,97,116,104,46,109,105,110,40,50,49,52,55,52,56,51,54,52,56,44,32,54,53,53,51,54,32,42,32,77,97,116,104,46,99,101,105,108,40,77,97,116,104,46,109,97,120,40,97,44,32,100,41,32,47,32,54,53,53,51,54,41,41,32,45,32,108,97,46,98,117,102,102,101,114,46,98,121,116,101,76,101,110,103,116,104,32,43,32,54,53,53,51,53,41,32,47,32,54,53,53,51,54,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,114,121,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,108,97,46,103,114,111,119,40,100,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,113,97,40,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,101,32,61,32,49,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,98,114,101,97,107,32,97,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,32,99,97,116,99,104,32,40,102,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,101,32,61,32,118,111,105,100,32,48,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,101,41,32,114,101,116,117,114,110,32,116,114,117,101,59,10,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,102,97,108,115,101,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,87,58,32,40,97,44,32,98,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,99,32,61,32,48,59,10,32,32,32,32,32,32,32,32,32,32,36,98,40,41,46,102,111,114,69,97,99,104,40,40,100,44,32,101,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,102,32,61,32,98,32,43,32,99,59,10,32,32,32,32,32,32,32,32,32,32,32,32,101,32,61,32,68,91,97,32,43,32,52,32,42,32,101,32,62,62,32,50,93,32,61,32,102,59,10,32,32,32,32,32,32,32,32,32,32,32,32,102,111,114,32,40,102,32,61,32,48,59,32,102,32,60,32,100,46,108,101,110,103,116,104,59,32,43,43,102,41,32,117,91,101,43,43,93,32,61,32,100,46,99,104,97,114,67,111,100,101,65,116,40,102,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,117,91,101,93,32,61,32,48,59,10,32,32,32,32,32,32,32,32,32,32,32,32,99,32,43,61,32,100,46,108,101,110,103,116,104,32,43,32,49,59,10,32,32,32,32,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,48,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,88,58,32,40,97,44,32,98,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,99,32,61,32,36,98,40,41,59,10,32,32,32,32,32,32,32,32,32,32,68,91,97,32,62,62,32,50,93,32,61,32,99,46,108,101,110,103,116,104,59,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,100,32,61,32,48,59,10,32,32,32,32,32,32,32,32,32,32,99,46,102,111,114,69,97,99,104,40,40,101,41,32,61,62,32,100,32,43,61,32,101,46,108,101,110,103,116,104,32,43,32,49,41,59,10,32,32,32,32,32,32,32,32,32,32,68,91,98,32,62,62,32,50,93,32,61,32,100,59,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,48,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,115,58,32,40,41,32,61,62,32,53,50,44,10,32,32,32,32,32,32,32,32,65,58,32,40,41,32,61,62,32,53,50,44,10,32,32,32,32,32,32,32,32,73,58,32,102,117,110,99,116,105,111,110,40,41,32,123,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,55,48,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,122,58,32,40,97,44,32,98,44,32,99,44,32,100,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,102,111,114,32,40,118,97,114,32,101,32,61,32,48,44,32,102,32,61,32,48,59,32,102,32,60,32,99,59,32,102,43,43,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,104,32,61,32,68,91,98,32,62,62,32,50,93,44,32,103,32,61,32,68,91,98,32,43,32,52,32,62,62,32,50,93,59,10,32,32,32,32,32,32,32,32,32,32,32,32,98,32,43,61,32,56,59,10,32,32,32,32,32,32,32,32,32,32,32,32,102,111,114,32,40,118,97,114,32,108,32,61,32,48,59,32,108,32,60,32,103,59,32,108,43,43,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,109,32,61,32,97,44,32,110,32,61,32,120,91,104,32,43,32,108,93,44,32,113,32,61,32,97,99,91,109,93,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,48,32,61,61,61,32,110,32,124,124,32,49,48,32,61,61,61,32,110,32,63,32,40,40,49,32,61,61,61,32,109,32,63,32,106,97,32,58,32,116,41,40,72,40,113,44,32,48,41,41,44,32,113,46,108,101,110,103,116,104,32,61,32,48,41,32,58,32,113,46,112,117,115,104,40,110,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,32,32,101,32,43,61,32,103,59,10,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,68,91,100,32,62,62,32,50,93,32,61,32,101,59,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,48,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,89,58,32,40,97,44,32,98,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,99,99,40,120,46,115,117,98,97,114,114,97,121,40,97,44,32,97,32,43,32,98,41,41,59,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,48,59,10,32,32,32,32,32,32,32,32,125,44,10,32,32,32,32,32,32,32,32,105,58,32,104,99,44,10,32,32,32,32,32,32,32,32,100,58,32,105,99,44,10,32,32,32,32,32,32,32,32,101,58,32,106,99,44,10,32,32,32,32,32,32,32,32,112,58,32,107,99,44,10,32,32,32,32,32,32,32,32,121,58,32,108,99,44,10,32,32,32,32,32,32,32,32,98,58,32,109,99,44,10,32,32,32,32,32,32,32,32,97,58,32,110,99,44,10,32,32,32,32,32,32,32,32,103,58,32,111,99,44,10,32,32,32,32,32,32,32,32,110,58,32,112,99,44,10,32,32,32,32,32,32,32,32,72,58,32,113,99,44,10,32,32,32,32,32,32,32,32,86,58,32,87,98,10,32,32,32,32,32,32,125,44,32,87,32,61,32,102,117,110,99,116,105,111,110,40,41,32,123,10,32,32,32,32,32,32,32,32,118,97,114,32,95,97,50,59,10,32,32,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,97,40,99,41,32,123,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,95,97,51,59,10,32,32,32,32,32,32,32,32,32,32,87,32,61,32,99,46,101,120,112,111,114,116,115,59,10,32,32,32,32,32,32,32,32,32,32,108,97,32,61,32,87,46,103,97,59,10,32,32,32,32,32,32,32,32,32,32,113,97,40,41,59,10,32,32,32,32,32,32,32,32,32,32,83,32,61,32,87,46,107,97,59,10,32,32,32,32,32,32,32,32,32,32,115,97,46,117,110,115,104,105,102,116,40,87,46,104,97,41,59,10,32,32,32,32,32,32,32,32,32,32,70,45,45,59,10,32,32,32,32,32,32,32,32,32,32,40,95,97,51,32,61,32,107,46,109,111,110,105,116,111,114,82,117,110,68,101,112,101,110,100,101,110,99,105,101,115,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,51,46,99,97,108,108,40,107,44,32,70,41,59,10,32,32,32,32,32,32,32,32,32,32,48,32,61,61,32,70,32,38,38,32,40,110,117,108,108,32,33,61,61,32,118,97,32,38,38,32,40,99,108,101,97,114,73,110,116,101,114,118,97,108,40,118,97,41,44,32,118,97,32,61,32,110,117,108,108,41,44,32,71,32,38,38,32,40,99,32,61,32,71,44,32,71,32,61,32,110,117,108,108,44,32,99,40,41,41,41,59,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,87,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,118,97,114,32,98,32,61,32,123,32,97,58,32,114,99,32,125,59,10,32,32,32,32,32,32,32,32,70,43,43,59,10,32,32,32,32,32,32,32,32,40,95,97,50,32,61,32,107,46,109,111,110,105,116,111,114,82,117,110,68,101,112,101,110,100,101,110,99,105,101,115,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,50,46,99,97,108,108,40,107,44,32,70,41,59,10,32,32,32,32,32,32,32,32,105,102,32,40,107,46,105,110,115,116,97,110,116,105,97,116,101,87,97,115,109,41,10,32,32,32,32,32,32,32,32,32,32,116,114,121,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,107,46,105,110,115,116,97,110,116,105,97,116,101,87,97,115,109,40,98,44,32,97,41,59,10,32,32,32,32,32,32,32,32,32,32,125,32,99,97,116,99,104,32,40,99,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,116,40,96,77,111,100,117,108,101,46,105,110,115,116,97,110,116,105,97,116,101,87,97,115,109,32,99,97,108,108,98,97,99,107,32,102,97,105,108,101,100,32,119,105,116,104,32,101,114,114,111,114,58,32,36,123,99,125,96,41,44,32,98,97,40,99,41,59,10,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,121,97,32,33,61,32,110,117,108,108,32,63,32,121,97,32,58,32,121,97,32,61,32,120,97,40,34,68,111,116,76,111,116,116,105,101,80,108,97,121,101,114,46,119,97,115,109,34,41,32,63,32,34,68,111,116,76,111,116,116,105,101,80,108,97,121,101,114,46,119,97,115,109,34,32,58,32,107,46,108,111,99,97,116,101,70,105,108,101,32,63,32,107,46,108,111,99,97,116,101,70,105,108,101,40,34,68,111,116,76,111,116,116,105,101,80,108,97,121,101,114,46,119,97,115,109,34,44,32,112,41,32,58,32,112,32,43,32,34,68,111,116,76,111,116,116,105,101,80,108,97,121,101,114,46,119,97,115,109,34,59,10,32,32,32,32,32,32,32,32,67,97,40,98,44,32,102,117,110,99,116,105,111,110,40,99,41,32,123,10,32,32,32,32,32,32,32,32,32,32,97,40,99,46,105,110,115,116,97,110,99,101,41,59,10,32,32,32,32,32,32,32,32,125,41,46,99,97,116,99,104,40,98,97,41,59,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,123,125,59,10,32,32,32,32,32,32,125,40,41,44,32,102,99,32,61,32,40,97,41,32,61,62,32,40,102,99,32,61,32,87,46,105,97,41,40,97,41,44,32,114,98,32,61,32,40,97,41,32,61,62,32,40,114,98,32,61,32,87,46,106,97,41,40,97,41,44,32,85,32,61,32,40,97,41,32,61,62,32,40,85,32,61,32,87,46,108,97,41,40,97,41,44,32,103,99,32,61,32,40,97,44,32,98,41,32,61,62,32,40,103,99,32,61,32,87,46,109,97,41,40,97,44,32,98,41,44,32,88,32,61,32,40,97,44,32,98,41,32,61,62,32,40,88,32,61,32,87,46,110,97,41,40,97,44,32,98,41,44,32,89,32,61,32,40,97,41,32,61,62,32,40,89,32,61,32,87,46,111,97,41,40,97,41,44,32,90,32,61,32,40,41,32,61,62,32,40,90,32,61,32,87,46,112,97,41,40,41,59,10,32,32,32,32,32,32,107,46,100,121,110,67,97,108,108,95,105,105,106,106,32,61,32,40,97,44,32,98,44,32,99,44,32,100,44,32,101,44,32,102,41,32,61,62,32,40,107,46,100,121,110,67,97,108,108,95,105,105,106,106,32,61,32,87,46,113,97,41,40,97,44,32,98,44,32,99,44,32,100,44,32,101,44,32,102,41,59,10,32,32,32,32,32,32,107,46,100,121,110,67,97,108,108,95,118,105,106,106,32,61,32,40,97,44,32,98,44,32,99,44,32,100,44,32,101,44,32,102,41,32,61,62,32,40,107,46,100,121,110,67,97,108,108,95,118,105,106,106,32,61,32,87,46,114,97,41,40,97,44,32,98,44,32,99,44,32,100,44,32,101,44,32,102,41,59,10,32,32,32,32,32,32,107,46,100,121,110,67,97,108,108,95,106,105,105,105,32,61,32,40,97,44,32,98,44,32,99,44,32,100,41,32,61,62,32,40,107,46,100,121,110,67,97,108,108,95,106,105,105,105,32,61,32,87,46,115,97,41,40,97,44,32,98,44,32,99,44,32,100,41,59,10,32,32,32,32,32,32,107,46,100,121,110,67,97,108,108,95,106,105,105,32,61,32,40,97,44,32,98,44,32,99,41,32,61,62,32,40,107,46,100,121,110,67,97,108,108,95,106,105,105,32,61,32,87,46,116,97,41,40,97,44,32,98,44,32,99,41,59,10,32,32,32,32,32,32,118,97,114,32,115,99,32,61,32,107,46,100,121,110,67,97,108,108,95,118,105,106,106,106,32,61,32,40,97,44,32,98,44,32,99,44,32,100,44,32,101,44,32,102,44,32,104,44,32,103,41,32,61,62,32,40,115,99,32,61,32,107,46,100,121,110,67,97,108,108,95,118,105,106,106,106,32,61,32,87,46,117,97,41,40,97,44,32,98,44,32,99,44,32,100,44,32,101,44,32,102,44,32,104,44,32,103,41,59,10,32,32,32,32,32,32,107,46,100,121,110,67,97,108,108,95,106,105,106,105,32,61,32,40,97,44,32,98,44,32,99,44,32,100,44,32,101,41,32,61,62,32,40,107,46,100,121,110,67,97,108,108,95,106,105,106,105,32,61,32,87,46,118,97,41,40,97,44,32,98,44,32,99,44,32,100,44,32,101,41,59,10,32,32,32,32,32,32,107,46,100,121,110,67,97,108,108,95,118,105,105,106,105,105,32,61,32,40,97,44,32,98,44,32,99,44,32,100,44,32,101,44,32,102,44,32,104,41,32,61,62,32,40,107,46,100,121,110,67,97,108,108,95,118,105,105,106,105,105,32,61,32,87,46,119,97,41,40,97,44,32,98,44,32,99,44,32,100,44,32,101,44,32,102,44,32,104,41,59,10,32,32,32,32,32,32,107,46,100,121,110,67,97,108,108,95,105,105,105,105,105,106,32,61,32,40,97,44,32,98,44,32,99,44,32,100,44,32,101,44,32,102,44,32,104,41,32,61,62,32,40,107,46,100,121,110,67,97,108,108,95,105,105,105,105,105,106,32,61,32,87,46,120,97,41,40,97,44,32,98,44,32,99,44,32,100,44,32,101,44,32,102,44,32,104,41,59,10,32,32,32,32,32,32,107,46,100,121,110,67,97,108,108,95,105,105,105,105,105,106,106,32,61,32,40,97,44,32,98,44,32,99,44,32,100,44,32,101,44,32,102,44,32,104,44,32,103,44,32,108,41,32,61,62,32,40,107,46,100,121,110,67,97,108,108,95,105,105,105,105,105,106,106,32,61,32,87,46,121,97,41,40,97,44,32,98,44,32,99,44,32,100,44,32,101,44,32,102,44,32,104,44,32,103,44,32,108,41,59,10,32,32,32,32,32,32,107,46,100,121,110,67,97,108,108,95,105,105,105,105,105,105,106,106,32,61,32,40,97,44,32,98,44,32,99,44,32,100,44,32,101,44,32,102,44,32,104,44,32,103,44,32,108,44,32,109,41,32,61,62,32,40,107,46,100,121,110,67,97,108,108,95,105,105,105,105,105,105,106,106,32,61,32,87,46,122,97,41,40,97,44,32,98,44,32,99,44,32,100,44,32,101,44,32,102,44,32,104,44,32,103,44,32,108,44,32,109,41,59,10,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,109,99,40,97,44,32,98,41,32,123,10,32,32,32,32,32,32,32,32,118,97,114,32,99,32,61,32,90,40,41,59,10,32,32,32,32,32,32,32,32,116,114,121,32,123,10,32,32,32,32,32,32,32,32,32,32,83,46,103,101,116,40,97,41,40,98,41,59,10,32,32,32,32,32,32,32,32,125,32,99,97,116,99,104,32,40,100,41,32,123,10,32,32,32,32,32,32,32,32,32,32,89,40,99,41,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,100,32,33,61,61,32,100,32,43,32,48,41,32,116,104,114,111,119,32,100,59,10,32,32,32,32,32,32,32,32,32,32,88,40,49,44,32,48,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,110,99,40,97,44,32,98,44,32,99,41,32,123,10,32,32,32,32,32,32,32,32,118,97,114,32,100,32,61,32,90,40,41,59,10,32,32,32,32,32,32,32,32,116,114,121,32,123,10,32,32,32,32,32,32,32,32,32,32,83,46,103,101,116,40,97,41,40,98,44,32,99,41,59,10,32,32,32,32,32,32,32,32,125,32,99,97,116,99,104,32,40,101,41,32,123,10,32,32,32,32,32,32,32,32,32,32,89,40,100,41,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,101,32,33,61,61,32,101,32,43,32,48,41,32,116,104,114,111,119,32,101,59,10,32,32,32,32,32,32,32,32,32,32,88,40,49,44,32,48,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,106,99,40,97,44,32,98,44,32,99,44,32,100,41,32,123,10,32,32,32,32,32,32,32,32,118,97,114,32,101,32,61,32,90,40,41,59,10,32,32,32,32,32,32,32,32,116,114,121,32,123,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,83,46,103,101,116,40,97,41,40,98,44,32,99,44,32,100,41,59,10,32,32,32,32,32,32,32,32,125,32,99,97,116,99,104,32,40,102,41,32,123,10,32,32,32,32,32,32,32,32,32,32,89,40,101,41,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,102,32,33,61,61,32,102,32,43,32,48,41,32,116,104,114,111,119,32,102,59,10,32,32,32,32,32,32,32,32,32,32,88,40,49,44,32,48,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,105,99,40,97,44,32,98,44,32,99,41,32,123,10,32,32,32,32,32,32,32,32,118,97,114,32,100,32,61,32,90,40,41,59,10,32,32,32,32,32,32,32,32,116,114,121,32,123,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,83,46,103,101,116,40,97,41,40,98,44,32,99,41,59,10,32,32,32,32,32,32,32,32,125,32,99,97,116,99,104,32,40,101,41,32,123,10,32,32,32,32,32,32,32,32,32,32,89,40,100,41,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,101,32,33,61,61,32,101,32,43,32,48,41,32,116,104,114,111,119,32,101,59,10,32,32,32,32,32,32,32,32,32,32,88,40,49,44,32,48,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,104,99,40,97,44,32,98,41,32,123,10,32,32,32,32,32,32,32,32,118,97,114,32,99,32,61,32,90,40,41,59,10,32,32,32,32,32,32,32,32,116,114,121,32,123,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,83,46,103,101,116,40,97,41,40,98,41,59,10,32,32,32,32,32,32,32,32,125,32,99,97,116,99,104,32,40,100,41,32,123,10,32,32,32,32,32,32,32,32,32,32,89,40,99,41,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,100,32,33,61,61,32,100,32,43,32,48,41,32,116,104,114,111,119,32,100,59,10,32,32,32,32,32,32,32,32,32,32,88,40,49,44,32,48,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,107,99,40,97,44,32,98,44,32,99,44,32,100,44,32,101,44,32,102,41,32,123,10,32,32,32,32,32,32,32,32,118,97,114,32,104,32,61,32,90,40,41,59,10,32,32,32,32,32,32,32,32,116,114,121,32,123,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,83,46,103,101,116,40,97,41,40,98,44,32,99,44,32,100,44,32,101,44,32,102,41,59,10,32,32,32,32,32,32,32,32,125,32,99,97,116,99,104,32,40,103,41,32,123,10,32,32,32,32,32,32,32,32,32,32,89,40,104,41,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,103,32,33,61,61,32,103,32,43,32,48,41,32,116,104,114,111,119,32,103,59,10,32,32,32,32,32,32,32,32,32,32,88,40,49,44,32,48,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,112,99,40,97,44,32,98,44,32,99,44,32,100,44,32,101,41,32,123,10,32,32,32,32,32,32,32,32,118,97,114,32,102,32,61,32,90,40,41,59,10,32,32,32,32,32,32,32,32,116,114,121,32,123,10,32,32,32,32,32,32,32,32,32,32,83,46,103,101,116,40,97,41,40,98,44,32,99,44,32,100,44,32,101,41,59,10,32,32,32,32,32,32,32,32,125,32,99,97,116,99,104,32,40,104,41,32,123,10,32,32,32,32,32,32,32,32,32,32,89,40,102,41,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,104,32,33,61,61,32,104,32,43,32,48,41,32,116,104,114,111,119,32,104,59,10,32,32,32,32,32,32,32,32,32,32,88,40,49,44,32,48,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,111,99,40,97,44,32,98,44,32,99,44,32,100,41,32,123,10,32,32,32,32,32,32,32,32,118,97,114,32,101,32,61,32,90,40,41,59,10,32,32,32,32,32,32,32,32,116,114,121,32,123,10,32,32,32,32,32,32,32,32,32,32,83,46,103,101,116,40,97,41,40,98,44,32,99,44,32,100,41,59,10,32,32,32,32,32,32,32,32,125,32,99,97,116,99,104,32,40,102,41,32,123,10,32,32,32,32,32,32,32,32,32,32,89,40,101,41,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,102,32,33,61,61,32,102,32,43,32,48,41,32,116,104,114,111,119,32,102,59,10,32,32,32,32,32,32,32,32,32,32,88,40,49,44,32,48,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,108,99,40,97,41,32,123,10,32,32,32,32,32,32,32,32,118,97,114,32,98,32,61,32,90,40,41,59,10,32,32,32,32,32,32,32,32,116,114,121,32,123,10,32,32,32,32,32,32,32,32,32,32,83,46,103,101,116,40,97,41,40,41,59,10,32,32,32,32,32,32,32,32,125,32,99,97,116,99,104,32,40,99,41,32,123,10,32,32,32,32,32,32,32,32,32,32,89,40,98,41,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,99,32,33,61,61,32,99,32,43,32,48,41,32,116,104,114,111,119,32,99,59,10,32,32,32,32,32,32,32,32,32,32,88,40,49,44,32,48,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,113,99,40,97,44,32,98,44,32,99,44,32,100,44,32,101,44,32,102,44,32,104,44,32,103,41,32,123,10,32,32,32,32,32,32,32,32,118,97,114,32,108,32,61,32,90,40,41,59,10,32,32,32,32,32,32,32,32,116,114,121,32,123,10,32,32,32,32,32,32,32,32,32,32,115,99,40,97,44,32,98,44,32,99,44,32,100,44,32,101,44,32,102,44,32,104,44,32,103,41,59,10,32,32,32,32,32,32,32,32,125,32,99,97,116,99,104,32,40,109,41,32,123,10,32,32,32,32,32,32,32,32,32,32,89,40,108,41,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,109,32,33,61,61,32,109,32,43,32,48,41,32,116,104,114,111,119,32,109,59,10,32,32,32,32,32,32,32,32,32,32,88,40,49,44,32,48,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,118,97,114,32,116,99,59,10,32,32,32,32,32,32,71,32,61,32,102,117,110,99,116,105,111,110,32,117,99,40,41,32,123,10,32,32,32,32,32,32,32,32,116,99,32,124,124,32,118,99,40,41,59,10,32,32,32,32,32,32,32,32,116,99,32,124,124,32,40,71,32,61,32,117,99,41,59,10,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,118,99,40,41,32,123,10,32,32,32,32,32,32,32,32,102,117,110,99,116,105,111,110,32,97,40,41,32,123,10,32,32,32,32,32,32,32,32,32,32,118,97,114,32,95,97,50,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,33,116,99,32,38,38,32,40,116,99,32,61,32,116,114,117,101,44,32,107,46,99,97,108,108,101,100,82,117,110,32,61,32,116,114,117,101,44,32,33,109,97,41,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,69,97,40,115,97,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,97,97,40,107,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,40,95,97,50,32,61,32,107,46,111,110,82,117,110,116,105,109,101,73,110,105,116,105,97,108,105,122,101,100,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,50,46,99,97,108,108,40,107,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,107,46,112,111,115,116,82,117,110,41,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,102,111,114,32,40,34,102,117,110,99,116,105,111,110,34,32,61,61,32,116,121,112,101,111,102,32,107,46,112,111,115,116,82,117,110,32,38,38,32,40,107,46,112,111,115,116,82,117,110,32,61,32,91,107,46,112,111,115,116,82,117,110,93,41,59,32,107,46,112,111,115,116,82,117,110,46,108,101,110,103,116,104,59,32,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,98,32,61,32,107,46,112,111,115,116,82,117,110,46,115,104,105,102,116,40,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,97,46,117,110,115,104,105,102,116,40,98,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,32,32,69,97,40,116,97,41,59,10,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,105,102,32,40,33,40,48,32,60,32,70,41,41,32,123,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,107,46,112,114,101,82,117,110,41,32,102,111,114,32,40,34,102,117,110,99,116,105,111,110,34,32,61,61,32,116,121,112,101,111,102,32,107,46,112,114,101,82,117,110,32,38,38,32,40,107,46,112,114,101,82,117,110,32,61,32,91,107,46,112,114,101,82,117,110,93,41,59,32,107,46,112,114,101,82,117,110,46,108,101,110,103,116,104,59,32,41,32,117,97,40,41,59,10,32,32,32,32,32,32,32,32,32,32,69,97,40,114,97,41,59,10,32,32,32,32,32,32,32,32,32,32,48,32,60,32,70,32,124,124,32,40,107,46,115,101,116,83,116,97,116,117,115,32,63,32,40,107,46,115,101,116,83,116,97,116,117,115,40,34,82,117,110,110,105,110,103,46,46,46,34,41,44,32,115,101,116,84,105,109,101,111,117,116,40,40,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,115,101,116,84,105,109,101,111,117,116,40,40,41,32,61,62,32,107,46,115,101,116,83,116,97,116,117,115,40,34,34,41,44,32,49,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,97,40,41,59,10,32,32,32,32,32,32,32,32,32,32,125,44,32,49,41,41,32,58,32,97,40,41,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,105,102,32,40,107,46,112,114,101,73,110,105,116,41,10,32,32,32,32,32,32,32,32,102,111,114,32,40,34,102,117,110,99,116,105,111,110,34,32,61,61,32,116,121,112,101,111,102,32,107,46,112,114,101,73,110,105,116,32,38,38,32,40,107,46,112,114,101,73,110,105,116,32,61,32,91,107,46,112,114,101,73,110,105,116,93,41,59,32,48,32,60,32,107,46,112,114,101,73,110,105,116,46,108,101,110,103,116,104,59,32,41,32,107,46,112,114,101,73,110,105,116,46,112,111,112,40,41,40,41,59,10,32,32,32,32,32,32,118,99,40,41,59,10,32,32,32,32,32,32,109,111,100,117,108,101,82,116,110,32,61,32,99,97,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,109,111,100,117,108,101,82,116,110,59,10,32,32,32,32,125,59,10,32,32,125,41,40,41,59,10,32,32,118,97,114,32,100,111,116,108,111,116,116,105,101,95,112,108,97,121,101,114,95,100,101,102,97,117,108,116,32,61,32,99,114,101,97,116,101,68,111,116,76,111,116,116,105,101,80,108,97,121,101,114,77,111,100,117,108,101,59,10,10,32,32,47,47,32,115,114,99,47,99,111,114,101,47,100,111,116,108,111,116,116,105,101,45,119,97,115,109,45,108,111,97,100,101,114,46,116,115,10,32,32,118,97,114,32,68,111,116,76,111,116,116,105,101,87,97,115,109,76,111,97,100,101,114,32,61,32,99,108,97,115,115,32,123,10,32,32,32,32,99,111,110,115,116,114,117,99,116,111,114,40,41,32,123,10,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,82,101,110,100,101,114,101,114,76,111,97,100,101,114,32,105,115,32,97,32,115,116,97,116,105,99,32,99,108,97,115,115,32,97,110,100,32,99,97,110,110,111,116,32,98,101,32,105,110,115,116,97,110,116,105,97,116,101,100,46,34,41,59,10,32,32,32,32,125,10,32,32,32,32,115,116,97,116,105,99,32,95,116,114,121,76,111,97,100,40,117,114,108,41,32,123,10,32,32,32,32,32,32,114,101,116,117,114,110,32,95,95,97,115,121,110,99,40,116,104,105,115,44,32,110,117,108,108,44,32,102,117,110,99,116,105,111,110,42,32,40,41,32,123,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,109,111,100,117,108,101,32,61,32,121,105,101,108,100,32,100,111,116,108,111,116,116,105,101,95,112,108,97,121,101,114,95,100,101,102,97,117,108,116,40,123,32,108,111,99,97,116,101,70,105,108,101,58,32,40,41,32,61,62,32,117,114,108,32,125,41,59,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,109,111,100,117,108,101,59,10,32,32,32,32,32,32,125,41,59,10,32,32,32,32,125,10,32,32,32,32,47,42,42,10,32,32,32,32,32,42,32,84,114,105,101,115,32,116,111,32,108,111,97,100,32,116,104,101,32,87,65,83,77,32,109,111,100,117,108,101,32,102,114,111,109,32,116,104,101,32,112,114,105,109,97,114,121,32,85,82,76,44,32,102,97,108,108,105,110,103,32,98,97,99,107,32,116,111,32,97,32,98,97,99,107,117,112,32,85,82,76,32,105,102,32,110,101,99,101,115,115,97,114,121,46,10,32,32,32,32,32,42,32,84,104,114,111,119,115,32,97,110,32,101,114,114,111,114,32,105,102,32,98,111,116,104,32,85,82,76,115,32,102,97,105,108,32,116,111,32,108,111,97,100,32,116,104,101,32,109,111,100,117,108,101,46,10,32,32,32,32,32,42,32,64,114,101,116,117,114,110,115,32,80,114,111,109,105,115,101,60,77,111,100,117,108,101,62,32,45,32,65,32,112,114,111,109,105,115,101,32,116,104,97,116,32,114,101,115,111,108,118,101,115,32,116,111,32,116,104,101,32,108,111,97,100,101,100,32,109,111,100,117,108,101,46,10,32,32,32,32,32,42,47,10,32,32,32,32,115,116,97,116,105,99,32,95,108,111,97,100,87,105,116,104,66,97,99,107,117,112,40,41,32,123,10,32,32,32,32,32,32,114,101,116,117,114,110,32,95,95,97,115,121,110,99,40,116,104,105,115,44,32,110,117,108,108,44,32,102,117,110,99,116,105,111,110,42,32,40,41,32,123,10,32,32,32,32,32,32,32,32,105,102,32,40,33,116,104,105,115,46,95,77,111,100,117,108,101,80,114,111,109,105,115,101,41,32,123,10,32,32,32,32,32,32,32,32,32,32,116,104,105,115,46,95,77,111,100,117,108,101,80,114,111,109,105,115,101,32,61,32,116,104,105,115,46,95,116,114,121,76,111,97,100,40,116,104,105,115,46,95,119,97,115,109,85,82,76,41,46,99,97,116,99,104,40,40,105,110,105,116,105,97,108,69,114,114,111,114,41,32,61,62,32,95,95,97,115,121,110,99,40,116,104,105,115,44,32,110,117,108,108,44,32,102,117,110,99,116,105,111,110,42,32,40,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,99,111,110,115,116,32,98,97,99,107,117,112,85,114,108,32,61,32,96,104,116,116,112,115,58,47,47,117,110,112,107,103,46,99,111,109,47,36,123,80,65,67,75,65,71,69,95,78,65,77,69,125,64,36,123,80,65,67,75,65,71,69,95,86,69,82,83,73,79,78,125,47,100,105,115,116,47,100,111,116,108,111,116,116,105,101,45,112,108,97,121,101,114,46,119,97,115,109,96,59,10,32,32,32,32,32,32,32,32,32,32,32,32,99,111,110,115,111,108,101,46,119,97,114,110,40,96,80,114,105,109,97,114,121,32,87,65,83,77,32,108,111,97,100,32,102,97,105,108,101,100,32,102,114,111,109,32,36,123,116,104,105,115,46,95,119,97,115,109,85,82,76,125,46,32,69,114,114,111,114,58,32,36,123,105,110,105,116,105,97,108,69,114,114,111,114,46,109,101,115,115,97,103,101,125,96,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,99,111,110,115,111,108,101,46,119,97,114,110,40,96,65,116,116,101,109,112,116,105,110,103,32,116,111,32,108,111,97,100,32,87,65,83,77,32,102,114,111,109,32,98,97,99,107,117,112,32,85,82,76,58,32,36,123,98,97,99,107,117,112,85,114,108,125,96,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,116,114,121,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,121,105,101,108,100,32,116,104,105,115,46,95,116,114,121,76,111,97,100,40,98,97,99,107,117,112,85,114,108,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,32,99,97,116,99,104,32,40,98,97,99,107,117,112,69,114,114,111,114,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,111,110,115,111,108,101,46,101,114,114,111,114,40,96,80,114,105,109,97,114,121,32,87,65,83,77,32,85,82,76,32,102,97,105,108,101,100,58,32,36,123,105,110,105,116,105,97,108,69,114,114,111,114,46,109,101,115,115,97,103,101,125,96,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,111,110,115,111,108,101,46,101,114,114,111,114,40,96,66,97,99,107,117,112,32,87,65,83,77,32,85,82,76,32,102,97,105,108,101,100,58,32,36,123,98,97,99,107,117,112,69,114,114,111,114,46,109,101,115,115,97,103,101,125,96,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,34,87,65,83,77,32,108,111,97,100,105,110,103,32,102,97,105,108,101,100,32,102,114,111,109,32,97,108,108,32,115,111,117,114,99,101,115,46,34,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,125,41,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,116,104,105,115,46,95,77,111,100,117,108,101,80,114,111,109,105,115,101,59,10,32,32,32,32,32,32,125,41,59,10,32,32,32,32,125,10,32,32,32,32,47,42,42,10,32,32,32,32,32,42,32,80,117,98,108,105,99,32,109,101,116,104,111,100,32,116,111,32,108,111,97,100,32,116,104,101,32,87,101,98,65,115,115,101,109,98,108,121,32,109,111,100,117,108,101,46,10,32,32,32,32,32,42,32,85,116,105,108,105,122,101,115,32,97,32,112,114,105,109,97,114,121,32,97,110,100,32,98,97,99,107,117,112,32,85,82,76,32,102,111,114,32,114,111,98,117,115,116,110,101,115,115,46,10,32,32,32,32,32,42,32,64,114,101,116,117,114,110,115,32,80,114,111,109,105,115,101,60,77,111,100,117,108,101,62,32,45,32,65,32,112,114,111,109,105,115,101,32,116,104,97,116,32,114,101,115,111,108,118,101,115,32,116,111,32,116,104,101,32,108,111,97,100,101,100,32,109,111,100,117,108,101,46,10,32,32,32,32,32,42,47,10,32,32,32,32,115,116,97,116,105,99,32,108,111,97,100,40,41,32,123,10,32,32,32,32,32,32,114,101,116,117,114,110,32,95,95,97,115,121,110,99,40,116,104,105,115,44,32,110,117,108,108,44,32,102,117,110,99,116,105,111,110,42,32,40,41,32,123,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,116,104,105,115,46,95,108,111,97,100,87,105,116,104,66,97,99,107,117,112,40,41,59,10,32,32,32,32,32,32,125,41,59,10,32,32,32,32,125,10,32,32,32,32,47,42,42,10,32,32,32,32,32,42,32,83,101,116,115,32,97,32,110,101,119,32,85,82,76,32,102,111,114,32,116,104,101,32,87,65,83,77,32,102,105,108,101,32,97,110,100,32,105,110,118,97,108,105,100,97,116,101,115,32,116,104,101,32,99,117,114,114,101,110,116,32,109,111,100,117,108,101,32,112,114,111,109,105,115,101,46,10,32,32,32,32,32,42,10,32,32,32,32,32,42,32,64,112,97,114,97,109,32,115,116,114,105,110,103,32,45,32,32,84,104,101,32,110,101,119,32,85,82,76,32,102,111,114,32,116,104,101,32,87,65,83,77,32,102,105,108,101,46,10,32,32,32,32,32,42,47,10,32,32,32,32,115,116,97,116,105,99,32,115,101,116,87,97,115,109,85,114,108,40,117,114,108,41,32,123,10,32,32,32,32,32,32,116,104,105,115,46,95,119,97,115,109,85,82,76,32,61,32,117,114,108,59,10,32,32,32,32,32,32,116,104,105,115,46,95,77,111,100,117,108,101,80,114,111,109,105,115,101,32,61,32,110,117,108,108,59,10,32,32,32,32,125,10,32,32,125,59,10,32,32,47,47,32,101,115,108,105,110,116,45,100,105,115,97,98,108,101,45,110,101,120,116,45,108,105,110,101,32,64,116,121,112,101,115,99,114,105,112,116,45,101,115,108,105,110,116,47,110,97,109,105,110,103,45,99,111,110,118,101,110,116,105,111,110,10,32,32,95,95,112,117,98,108,105,99,70,105,101,108,100,40,68,111,116,76,111,116,116,105,101,87,97,115,109,76,111,97,100,101,114,44,32,34,95,77,111,100,117,108,101,80,114,111,109,105,115,101,34,44,32,110,117,108,108,41,59,10,32,32,47,47,32,85,82,76,32,102,111,114,32,116,104,101,32,87,65,83,77,32,102,105,108,101,44,32,99,111,110,115,116,114,117,99,116,101,100,32,117,115,105,110,103,32,112,97,99,107,97,103,101,32,105,110,102,111,114,109,97,116,105,111,110,10,32,32,95,95,112,117,98,108,105,99,70,105,101,108,100,40,68,111,116,76,111,116,116,105,101,87,97,115,109,76,111,97,100,101,114,44,32,34,95,119,97,115,109,85,82,76,34,44,32,96,104,116,116,112,115,58,47,47,99,100,110,46,106,115,100,101,108,105,118,114,46,110,101,116,47,110,112,109,47,36,123,80,65,67,75,65,71,69,95,78,65,77,69,125,64,36,123,80,65,67,75,65,71,69,95,86,69,82,83,73,79,78,125,47,100,105,115,116,47,100,111,116,108,111,116,116,105,101,45,112,108,97,121,101,114,46,119,97,115,109,96,41,59,10,10,32,32,47,47,32,115,114,99,47,101,118,101,110,116,45,109,97,110,97,103,101,114,46,116,115,10,32,32,118,97,114,32,69,118,101,110,116,77,97,110,97,103,101,114,32,61,32,99,108,97,115,115,32,123,10,32,32,32,32,99,111,110,115,116,114,117,99,116,111,114,40,41,32,123,10,32,32,32,32,32,32,95,95,112,117,98,108,105,99,70,105,101,108,100,40,116,104,105,115,44,32,34,95,101,118,101,110,116,76,105,115,116,101,110,101,114,115,34,44,32,47,42,32,64,95,95,80,85,82,69,95,95,32,42,47,32,110,101,119,32,77,97,112,40,41,41,59,10,32,32,32,32,125,10,32,32,32,32,97,100,100,69,118,101,110,116,76,105,115,116,101,110,101,114,40,116,121,112,101,44,32,108,105,115,116,101,110,101,114,41,32,123,10,32,32,32,32,32,32,108,101,116,32,108,105,115,116,101,110,101,114,115,32,61,32,116,104,105,115,46,95,101,118,101,110,116,76,105,115,116,101,110,101,114,115,46,103,101,116,40,116,121,112,101,41,59,10,32,32,32,32,32,32,105,102,32,40,33,108,105,115,116,101,110,101,114,115,41,32,123,10,32,32,32,32,32,32,32,32,108,105,115,116,101,110,101,114,115,32,61,32,47,42,32,64,95,95,80,85,82,69,95,95,32,42,47,32,110,101,119,32,83,101,116,40,41,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,101,118,101,110,116,76,105,115,116,101,110,101,114,115,46,115,101,116,40,116,121,112,101,44,32,108,105,115,116,101,110,101,114,115,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,108,105,115,116,101,110,101,114,115,46,97,100,100,40,108,105,115,116,101,110,101,114,41,59,10,32,32,32,32,125,10,32,32,32,32,114,101,109,111,118,101,69,118,101,110,116,76,105,115,116,101,110,101,114,40,116,121,112,101,44,32,108,105,115,116,101,110,101,114,41,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,108,105,115,116,101,110,101,114,115,32,61,32,116,104,105,115,46,95,101,118,101,110,116,76,105,115,116,101,110,101,114,115,46,103,101,116,40,116,121,112,101,41,59,10,32,32,32,32,32,32,105,102,32,40,33,108,105,115,116,101,110,101,114,115,41,32,114,101,116,117,114,110,59,10,32,32,32,32,32,32,105,102,32,40,108,105,115,116,101,110,101,114,41,32,123,10,32,32,32,32,32,32,32,32,108,105,115,116,101,110,101,114,115,46,100,101,108,101,116,101,40,108,105,115,116,101,110,101,114,41,59,10,32,32,32,32,32,32,32,32,105,102,32,40,108,105,115,116,101,110,101,114,115,46,115,105,122,101,32,61,61,61,32,48,41,32,123,10,32,32,32,32,32,32,32,32,32,32,116,104,105,115,46,95,101,118,101,110,116,76,105,115,116,101,110,101,114,115,46,100,101,108,101,116,101,40,116,121,112,101,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,32,101,108,115,101,32,123,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,101,118,101,110,116,76,105,115,116,101,110,101,114,115,46,100,101,108,101,116,101,40,116,121,112,101,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,125,10,32,32,32,32,100,105,115,112,97,116,99,104,40,101,118,101,110,116,41,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,108,105,115,116,101,110,101,114,115,32,61,32,116,104,105,115,46,95,101,118,101,110,116,76,105,115,116,101,110,101,114,115,46,103,101,116,40,101,118,101,110,116,46,116,121,112,101,41,59,10,32,32,32,32,32,32,108,105,115,116,101,110,101,114,115,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,108,105,115,116,101,110,101,114,115,46,102,111,114,69,97,99,104,40,40,108,105,115,116,101,110,101,114,41,32,61,62,32,108,105,115,116,101,110,101,114,40,101,118,101,110,116,41,41,59,10,32,32,32,32,125,10,32,32,32,32,114,101,109,111,118,101,65,108,108,69,118,101,110,116,76,105,115,116,101,110,101,114,115,40,41,32,123,10,32,32,32,32,32,32,116,104,105,115,46,95,101,118,101,110,116,76,105,115,116,101,110,101,114,115,46,99,108,101,97,114,40,41,59,10,32,32,32,32,125,10,32,32,125,59,10,10,32,32,47,47,32,115,114,99,47,111,102,102,115,99,114,101,101,110,45,111,98,115,101,114,118,101,114,46,116,115,10,32,32,118,97,114,32,79,102,102,115,99,114,101,101,110,79,98,115,101,114,118,101,114,32,61,32,99,108,97,115,115,32,123,10,32,32,32,32,115,116,97,116,105,99,32,95,105,110,105,116,105,97,108,105,122,101,79,98,115,101,114,118,101,114,40,41,32,123,10,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,111,98,115,101,114,118,101,114,41,32,114,101,116,117,114,110,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,116,101,114,115,101,99,116,105,111,110,79,98,115,101,114,118,101,114,67,97,108,108,98,97,99,107,32,61,32,40,101,110,116,114,105,101,115,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,101,110,116,114,105,101,115,46,102,111,114,69,97,99,104,40,40,101,110,116,114,121,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,116,104,105,115,46,95,111,98,115,101,114,118,101,100,67,97,110,118,97,115,101,115,46,103,101,116,40,101,110,116,114,121,46,116,97,114,103,101,116,41,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,105,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,101,110,116,114,121,46,105,115,73,110,116,101,114,115,101,99,116,105,110,103,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,110,115,116,97,110,99,101,46,117,110,102,114,101,101,122,101,40,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,32,101,108,115,101,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,105,110,115,116,97,110,99,101,46,102,114,101,101,122,101,40,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,116,104,105,115,46,95,111,98,115,101,114,118,101,114,32,61,32,110,101,119,32,73,110,116,101,114,115,101,99,116,105,111,110,79,98,115,101,114,118,101,114,40,105,110,116,101,114,115,101,99,116,105,111,110,79,98,115,101,114,118,101,114,67,97,108,108,98,97,99,107,44,32,123,10,32,32,32,32,32,32,32,32,116,104,114,101,115,104,111,108,100,58,32,48,10,32,32,32,32,32,32,125,41,59,10,32,32,32,32,125,10,32,32,32,32,115,116,97,116,105,99,32,111,98,115,101,114,118,101,40,99,97,110,118,97,115,44,32,100,111,116,76,111,116,116,105,101,73,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,59,10,32,32,32,32,32,32,116,104,105,115,46,95,105,110,105,116,105,97,108,105,122,101,79,98,115,101,114,118,101,114,40,41,59,10,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,111,98,115,101,114,118,101,100,67,97,110,118,97,115,101,115,46,104,97,115,40,99,97,110,118,97,115,41,41,32,114,101,116,117,114,110,59,10,32,32,32,32,32,32,116,104,105,115,46,95,111,98,115,101,114,118,101,100,67,97,110,118,97,115,101,115,46,115,101,116,40,99,97,110,118,97,115,44,32,100,111,116,76,111,116,116,105,101,73,110,115,116,97,110,99,101,41,59,10,32,32,32,32,32,32,40,95,97,32,61,32,116,104,105,115,46,95,111,98,115,101,114,118,101,114,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,111,98,115,101,114,118,101,40,99,97,110,118,97,115,41,59,10,32,32,32,32,125,10,32,32,32,32,115,116,97,116,105,99,32,117,110,111,98,115,101,114,118,101,40,99,97,110,118,97,115,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,44,32,95,98,59,10,32,32,32,32,32,32,40,95,97,32,61,32,116,104,105,115,46,95,111,98,115,101,114,118,101,114,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,117,110,111,98,115,101,114,118,101,40,99,97,110,118,97,115,41,59,10,32,32,32,32,32,32,116,104,105,115,46,95,111,98,115,101,114,118,101,100,67,97,110,118,97,115,101,115,46,100,101,108,101,116,101,40,99,97,110,118,97,115,41,59,10,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,111,98,115,101,114,118,101,100,67,97,110,118,97,115,101,115,46,115,105,122,101,32,61,61,61,32,48,41,32,123,10,32,32,32,32,32,32,32,32,40,95,98,32,61,32,116,104,105,115,46,95,111,98,115,101,114,118,101,114,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,98,46,100,105,115,99,111,110,110,101,99,116,40,41,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,111,98,115,101,114,118,101,114,32,61,32,110,117,108,108,59,10,32,32,32,32,32,32,125,10,32,32,32,32,125,10,32,32,125,59,10,32,32,95,95,112,117,98,108,105,99,70,105,101,108,100,40,79,102,102,115,99,114,101,101,110,79,98,115,101,114,118,101,114,44,32,34,95,111,98,115,101,114,118,101,114,34,44,32,110,117,108,108,41,59,10,32,32,95,95,112,117,98,108,105,99,70,105,101,108,100,40,79,102,102,115,99,114,101,101,110,79,98,115,101,114,118,101,114,44,32,34,95,111,98,115,101,114,118,101,100,67,97,110,118,97,115,101,115,34,44,32,47,42,32,64,95,95,80,85,82,69,95,95,32,42,47,32,110,101,119,32,77,97,112,40,41,41,59,10,10,32,32,47,47,32,115,114,99,47,114,101,115,105,122,101,45,111,98,115,101,114,118,101,114,46,116,115,10,32,32,118,97,114,32,82,69,83,73,90,69,95,68,69,66,79,85,78,67,69,95,84,73,77,69,32,61,32,49,48,48,59,10,32,32,118,97,114,32,67,97,110,118,97,115,82,101,115,105,122,101,79,98,115,101,114,118,101,114,32,61,32,99,108,97,115,115,32,123,10,32,32,32,32,115,116,97,116,105,99,32,95,105,110,105,116,105,97,108,105,122,101,79,98,115,101,114,118,101,114,40,41,32,123,10,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,111,98,115,101,114,118,101,114,41,32,114,101,116,117,114,110,59,10,32,32,32,32,32,32,99,111,110,115,116,32,114,101,115,105,122,101,72,97,110,100,108,101,114,32,61,32,40,101,110,116,114,105,101,115,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,101,110,116,114,105,101,115,46,102,111,114,69,97,99,104,40,40,101,110,116,114,121,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,99,111,110,115,116,32,101,108,101,109,101,110,116,32,61,32,116,104,105,115,46,95,111,98,115,101,114,118,101,100,67,97,110,118,97,115,101,115,46,103,101,116,40,101,110,116,114,121,46,116,97,114,103,101,116,41,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,33,101,108,101,109,101,110,116,41,32,114,101,116,117,114,110,59,10,32,32,32,32,32,32,32,32,32,32,99,111,110,115,116,32,91,100,111,116,76,111,116,116,105,101,73,110,115,116,97,110,99,101,44,32,116,105,109,101,111,117,116,93,32,61,32,101,108,101,109,101,110,116,59,10,32,32,32,32,32,32,32,32,32,32,99,108,101,97,114,84,105,109,101,111,117,116,40,116,105,109,101,111,117,116,41,59,10,32,32,32,32,32,32,32,32,32,32,99,111,110,115,116,32,110,101,119,84,105,109,101,111,117,116,32,61,32,115,101,116,84,105,109,101,111,117,116,40,40,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,100,111,116,76,111,116,116,105,101,73,110,115,116,97,110,99,101,46,114,101,115,105,122,101,40,41,59,10,32,32,32,32,32,32,32,32,32,32,125,44,32,82,69,83,73,90,69,95,68,69,66,79,85,78,67,69,95,84,73,77,69,41,59,10,32,32,32,32,32,32,32,32,32,32,116,104,105,115,46,95,111,98,115,101,114,118,101,100,67,97,110,118,97,115,101,115,46,115,101,116,40,101,110,116,114,121,46,116,97,114,103,101,116,44,32,91,100,111,116,76,111,116,116,105,101,73,110,115,116,97,110,99,101,44,32,110,101,119,84,105,109,101,111,117,116,93,41,59,10,32,32,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,116,104,105,115,46,95,111,98,115,101,114,118,101,114,32,61,32,110,101,119,32,82,101,115,105,122,101,79,98,115,101,114,118,101,114,40,114,101,115,105,122,101,72,97,110,100,108,101,114,41,59,10,32,32,32,32,125,10,32,32,32,32,115,116,97,116,105,99,32,111,98,115,101,114,118,101,40,99,97,110,118,97,115,44,32,100,111,116,76,111,116,116,105,101,73,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,59,10,32,32,32,32,32,32,116,104,105,115,46,95,105,110,105,116,105,97,108,105,122,101,79,98,115,101,114,118,101,114,40,41,59,10,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,111,98,115,101,114,118,101,100,67,97,110,118,97,115,101,115,46,104,97,115,40,99,97,110,118,97,115,41,41,32,114,101,116,117,114,110,59,10,32,32,32,32,32,32,116,104,105,115,46,95,111,98,115,101,114,118,101,100,67,97,110,118,97,115,101,115,46,115,101,116,40,99,97,110,118,97,115,44,32,91,100,111,116,76,111,116,116,105,101,73,110,115,116,97,110,99,101,44,32,48,93,41,59,10,32,32,32,32,32,32,40,95,97,32,61,32,116,104,105,115,46,95,111,98,115,101,114,118,101,114,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,111,98,115,101,114,118,101,40,99,97,110,118,97,115,41,59,10,32,32,32,32,125,10,32,32,32,32,115,116,97,116,105,99,32,117,110,111,98,115,101,114,118,101,40,99,97,110,118,97,115,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,44,32,95,98,59,10,32,32,32,32,32,32,40,95,97,32,61,32,116,104,105,115,46,95,111,98,115,101,114,118,101,114,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,117,110,111,98,115,101,114,118,101,40,99,97,110,118,97,115,41,59,10,32,32,32,32,32,32,116,104,105,115,46,95,111,98,115,101,114,118,101,100,67,97,110,118,97,115,101,115,46,100,101,108,101,116,101,40,99,97,110,118,97,115,41,59,10,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,111,98,115,101,114,118,101,100,67,97,110,118,97,115,101,115,46,115,105,122,101,32,61,61,61,32,48,41,32,123,10,32,32,32,32,32,32,32,32,40,95,98,32,61,32,116,104,105,115,46,95,111,98,115,101,114,118,101,114,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,98,46,100,105,115,99,111,110,110,101,99,116,40,41,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,111,98,115,101,114,118,101,114,32,61,32,110,117,108,108,59,10,32,32,32,32,32,32,125,10,32,32,32,32,125,10,32,32,125,59,10,32,32,95,95,112,117,98,108,105,99,70,105,101,108,100,40,67,97,110,118,97,115,82,101,115,105,122,101,79,98,115,101,114,118,101,114,44,32,34,95,111,98,115,101,114,118,101,114,34,44,32,110,117,108,108,41,59,10,32,32,95,95,112,117,98,108,105,99,70,105,101,108,100,40,67,97,110,118,97,115,82,101,115,105,122,101,79,98,115,101,114,118,101,114,44,32,34,95,111,98,115,101,114,118,101,100,67,97,110,118,97,115,101,115,34,44,32,47,42,32,64,95,95,80,85,82,69,95,95,32,42,47,32,110,101,119,32,77,97,112,40,41,41,59,10,10,32,32,47,47,32,115,114,99,47,117,116,105,108,115,46,116,115,10,32,32,102,117,110,99,116,105,111,110,32,105,115,72,101,120,67,111,108,111,114,40,99,111,108,111,114,41,32,123,10,32,32,32,32,114,101,116,117,114,110,32,47,94,35,40,91,92,100,97,45,102,93,123,54,125,124,91,92,100,97,45,102,93,123,56,125,41,36,47,105,117,46,116,101,115,116,40,99,111,108,111,114,41,59,10,32,32,125,10,32,32,102,117,110,99,116,105,111,110,32,104,101,120,83,116,114,105,110,103,84,111,82,71,66,65,73,110,116,40,99,111,108,111,114,72,101,120,41,32,123,10,32,32,32,32,105,102,32,40,33,105,115,72,101,120,67,111,108,111,114,40,99,111,108,111,114,72,101,120,41,41,32,123,10,32,32,32,32,32,32,114,101,116,117,114,110,32,48,59,10,32,32,32,32,125,10,32,32,32,32,108,101,116,32,104,101,120,32,61,32,99,111,108,111,114,72,101,120,46,114,101,112,108,97,99,101,40,34,35,34,44,32,34,34,41,59,10,32,32,32,32,104,101,120,32,61,32,104,101,120,46,108,101,110,103,116,104,32,61,61,61,32,54,32,63,32,96,36,123,104,101,120,125,102,102,96,32,58,32,104,101,120,59,10,32,32,32,32,114,101,116,117,114,110,32,112,97,114,115,101,73,110,116,40,104,101,120,44,32,49,54,41,59,10,32,32,125,10,32,32,102,117,110,99,116,105,111,110,32,105,115,68,111,116,76,111,116,116,105,101,40,102,105,108,101,68,97,116,97,41,32,123,10,32,32,32,32,105,102,32,40,102,105,108,101,68,97,116,97,46,98,121,116,101,76,101,110,103,116,104,32,60,32,52,41,32,123,10,32,32,32,32,32,32,114,101,116,117,114,110,32,102,97,108,115,101,59,10,32,32,32,32,125,10,32,32,32,32,99,111,110,115,116,32,102,105,108,101,83,105,103,110,97,116,117,114,101,32,61,32,110,101,119,32,85,105,110,116,56,65,114,114,97,121,40,102,105,108,101,68,97,116,97,46,115,108,105,99,101,40,48,44,32,90,73,80,95,83,73,71,78,65,84,85,82,69,46,98,121,116,101,76,101,110,103,116,104,41,41,59,10,32,32,32,32,102,111,114,32,40,108,101,116,32,105,32,61,32,48,59,32,105,32,60,32,90,73,80,95,83,73,71,78,65,84,85,82,69,46,108,101,110,103,116,104,59,32,105,32,43,61,32,49,41,32,123,10,32,32,32,32,32,32,105,102,32,40,90,73,80,95,83,73,71,78,65,84,85,82,69,91,105,93,32,33,61,61,32,102,105,108,101,83,105,103,110,97,116,117,114,101,91,105,93,41,32,123,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,102,97,108,115,101,59,10,32,32,32,32,32,32,125,10,32,32,32,32,125,10,32,32,32,32,114,101,116,117,114,110,32,116,114,117,101,59,10,32,32,125,10,32,32,102,117,110,99,116,105,111,110,32,105,115,76,111,116,116,105,101,74,83,79,78,40,106,115,111,110,41,32,123,10,32,32,32,32,114,101,116,117,114,110,32,76,79,84,84,73,69,95,74,83,79,78,95,77,65,78,68,65,84,79,82,89,95,70,73,69,76,68,83,46,101,118,101,114,121,40,40,102,105,101,108,100,41,32,61,62,32,79,98,106,101,99,116,46,112,114,111,116,111,116,121,112,101,46,104,97,115,79,119,110,80,114,111,112,101,114,116,121,46,99,97,108,108,40,106,115,111,110,44,32,102,105,101,108,100,41,41,59,10,32,32,125,10,32,32,102,117,110,99,116,105,111,110,32,105,115,76,111,116,116,105,101,40,102,105,108,101,68,97,116,97,41,32,123,10,32,32,32,32,105,102,32,40,116,121,112,101,111,102,32,102,105,108,101,68,97,116,97,32,61,61,61,32,34,115,116,114,105,110,103,34,41,32,123,10,32,32,32,32,32,32,116,114,121,32,123,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,105,115,76,111,116,116,105,101,74,83,79,78,40,74,83,79,78,46,112,97,114,115,101,40,102,105,108,101,68,97,116,97,41,41,59,10,32,32,32,32,32,32,125,32,99,97,116,99,104,32,40,95,101,41,32,123,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,102,97,108,115,101,59,10,32,32,32,32,32,32,125,10,32,32,32,32,125,32,101,108,115,101,32,123,10,32,32,32,32,32,32,114,101,116,117,114,110,32,105,115,76,111,116,116,105,101,74,83,79,78,40,102,105,108,101,68,97,116,97,41,59,10,32,32,32,32,125,10,32,32,125,10,32,32,102,117,110,99,116,105,111,110,32,103,101,116,68,101,102,97,117,108,116,68,80,82,40,41,32,123,10,32,32,32,32,99,111,110,115,116,32,100,112,114,32,61,32,73,83,95,66,82,79,87,83,69,82,32,63,32,119,105,110,100,111,119,46,100,101,118,105,99,101,80,105,120,101,108,82,97,116,105,111,32,58,32,49,59,10,32,32,32,32,114,101,116,117,114,110,32,49,32,43,32,40,100,112,114,32,45,32,49,41,32,42,32,68,69,70,65,85,76,84,95,68,80,82,95,70,65,67,84,79,82,59,10,32,32,125,10,32,32,102,117,110,99,116,105,111,110,32,105,115,69,108,101,109,101,110,116,73,110,86,105,101,119,112,111,114,116,40,101,108,101,109,101,110,116,41,32,123,10,32,32,32,32,99,111,110,115,116,32,114,101,99,116,32,61,32,101,108,101,109,101,110,116,46,103,101,116,66,111,117,110,100,105,110,103,67,108,105,101,110,116,82,101,99,116,40,41,59,10,32,32,32,32,114,101,116,117,114,110,32,114,101,99,116,46,116,111,112,32,62,61,32,48,32,38,38,32,114,101,99,116,46,108,101,102,116,32,62,61,32,48,32,38,38,32,114,101,99,116,46,98,111,116,116,111,109,32,60,61,32,40,119,105,110,100,111,119,46,105,110,110,101,114,72,101,105,103,104,116,32,124,124,32,100,111,99,117,109,101,110,116,46,100,111,99,117,109,101,110,116,69,108,101,109,101,110,116,46,99,108,105,101,110,116,72,101,105,103,104,116,41,32,38,38,32,114,101,99,116,46,114,105,103,104,116,32,60,61,32,40,119,105,110,100,111,119,46,105,110,110,101,114,87,105,100,116,104,32,124,124,32,100,111,99,117,109,101,110,116,46,100,111,99,117,109,101,110,116,69,108,101,109,101,110,116,46,99,108,105,101,110,116,87,105,100,116,104,41,59,10,32,32,125,10,10,32,32,47,47,32,115,114,99,47,100,111,116,108,111,116,116,105,101,46,116,115,10,32,32,118,97,114,32,99,114,101,97,116,101,67,111,114,101,77,111,100,101,32,61,32,40,109,111,100,101,44,32,109,111,100,117,108,101,41,32,61,62,32,123,10,32,32,32,32,105,102,32,40,109,111,100,101,32,61,61,61,32,34,114,101,118,101,114,115,101,34,41,32,123,10,32,32,32,32,32,32,114,101,116,117,114,110,32,109,111,100,117,108,101,46,77,111,100,101,46,82,101,118,101,114,115,101,59,10,32,32,32,32,125,32,101,108,115,101,32,105,102,32,40,109,111,100,101,32,61,61,61,32,34,98,111,117,110,99,101,34,41,32,123,10,32,32,32,32,32,32,114,101,116,117,114,110,32,109,111,100,117,108,101,46,77,111,100,101,46,66,111,117,110,99,101,59,10,32,32,32,32,125,32,101,108,115,101,32,105,102,32,40,109,111,100,101,32,61,61,61,32,34,114,101,118,101,114,115,101,45,98,111,117,110,99,101,34,41,32,123,10,32,32,32,32,32,32,114,101,116,117,114,110,32,109,111,100,117,108,101,46,77,111,100,101,46,82,101,118,101,114,115,101,66,111,117,110,99,101,59,10,32,32,32,32,125,32,101,108,115,101,32,123,10,32,32,32,32,32,32,114,101,116,117,114,110,32,109,111,100,117,108,101,46,77,111,100,101,46,70,111,114,119,97,114,100,59,10,32,32,32,32,125,10,32,32,125,59,10,32,32,118,97,114,32,99,114,101,97,116,101,67,111,114,101,70,105,116,32,61,32,40,102,105,116,44,32,109,111,100,117,108,101,41,32,61,62,32,123,10,32,32,32,32,105,102,32,40,102,105,116,32,61,61,61,32,34,99,111,110,116,97,105,110,34,41,32,123,10,32,32,32,32,32,32,114,101,116,117,114,110,32,109,111,100,117,108,101,46,70,105,116,46,67,111,110,116,97,105,110,59,10,32,32,32,32,125,32,101,108,115,101,32,105,102,32,40,102,105,116,32,61,61,61,32,34,99,111,118,101,114,34,41,32,123,10,32,32,32,32,32,32,114,101,116,117,114,110,32,109,111,100,117,108,101,46,70,105,116,46,67,111,118,101,114,59,10,32,32,32,32,125,32,101,108,115,101,32,105,102,32,40,102,105,116,32,61,61,61,32,34,102,105,108,108,34,41,32,123,10,32,32,32,32,32,32,114,101,116,117,114,110,32,109,111,100,117,108,101,46,70,105,116,46,70,105,108,108,59,10,32,32,32,32,125,32,101,108,115,101,32,105,102,32,40,102,105,116,32,61,61,61,32,34,102,105,116,45,104,101,105,103,104,116,34,41,32,123,10,32,32,32,32,32,32,114,101,116,117,114,110,32,109,111,100,117,108,101,46,70,105,116,46,70,105,116,72,101,105,103,104,116,59,10,32,32,32,32,125,32,101,108,115,101,32,105,102,32,40,102,105,116,32,61,61,61,32,34,102,105,116,45,119,105,100,116,104,34,41,32,123,10,32,32,32,32,32,32,114,101,116,117,114,110,32,109,111,100,117,108,101,46,70,105,116,46,70,105,116,87,105,100,116,104,59,10,32,32,32,32,125,32,101,108,115,101,32,123,10,32,32,32,32,32,32,114,101,116,117,114,110,32,109,111,100,117,108,101,46,70,105,116,46,78,111,110,101,59,10,32,32,32,32,125,10,32,32,125,59,10,32,32,118,97,114,32,99,114,101,97,116,101,67,111,114,101,65,108,105,103,110,32,61,32,40,97,108,105,103,110,44,32,109,111,100,117,108,101,41,32,61,62,32,123,10,32,32,32,32,99,111,110,115,116,32,99,111,114,101,65,108,105,103,110,32,61,32,110,101,119,32,109,111,100,117,108,101,46,86,101,99,116,111,114,70,108,111,97,116,40,41,59,10,32,32,32,32,99,111,114,101,65,108,105,103,110,46,112,117,115,104,95,98,97,99,107,40,97,108,105,103,110,91,48,93,41,59,10,32,32,32,32,99,111,114,101,65,108,105,103,110,46,112,117,115,104,95,98,97,99,107,40,97,108,105,103,110,91,49,93,41,59,10,32,32,32,32,114,101,116,117,114,110,32,99,111,114,101,65,108,105,103,110,59,10,32,32,125,59,10,32,32,118,97,114,32,99,114,101,97,116,101,67,111,114,101,83,101,103,109,101,110,116,32,61,32,40,115,101,103,109,101,110,116,44,32,109,111,100,117,108,101,41,32,61,62,32,123,10,32,32,32,32,99,111,110,115,116,32,99,111,114,101,115,101,103,109,101,110,116,32,61,32,110,101,119,32,109,111,100,117,108,101,46,86,101,99,116,111,114,70,108,111,97,116,40,41,59,10,32,32,32,32,105,102,32,40,115,101,103,109,101,110,116,46,108,101,110,103,116,104,32,33,61,61,32,50,41,32,114,101,116,117,114,110,32,99,111,114,101,115,101,103,109,101,110,116,59,10,32,32,32,32,99,111,114,101,115,101,103,109,101,110,116,46,112,117,115,104,95,98,97,99,107,40,115,101,103,109,101,110,116,91,48,93,41,59,10,32,32,32,32,99,111,114,101,115,101,103,109,101,110,116,46,112,117,115,104,95,98,97,99,107,40,115,101,103,109,101,110,116,91,49,93,41,59,10,32,32,32,32,114,101,116,117,114,110,32,99,111,114,101,115,101,103,109,101,110,116,59,10,32,32,125,59,10,32,32,118,97,114,32,95,68,111,116,76,111,116,116,105,101,32,61,32,99,108,97,115,115,32,95,68,111,116,76,111,116,116,105,101,32,123,10,32,32,32,32,99,111,110,115,116,114,117,99,116,111,114,40,99,111,110,102,105,103,41,32,123,10,32,32,32,32,32,32,95,95,112,117,98,108,105,99,70,105,101,108,100,40,116,104,105,115,44,32,34,95,99,97,110,118,97,115,34,41,59,10,32,32,32,32,32,32,95,95,112,117,98,108,105,99,70,105,101,108,100,40,116,104,105,115,44,32,34,95,99,111,110,116,101,120,116,34,44,32,110,117,108,108,41,59,10,32,32,32,32,32,32,95,95,112,117,98,108,105,99,70,105,101,108,100,40,116,104,105,115,44,32,34,95,101,118,101,110,116,77,97,110,97,103,101,114,34,41,59,10,32,32,32,32,32,32,95,95,112,117,98,108,105,99,70,105,101,108,100,40,116,104,105,115,44,32,34,95,97,110,105,109,97,116,105,111,110,70,114,97,109,101,73,100,34,44,32,110,117,108,108,41,59,10,32,32,32,32,32,32,95,95,112,117,98,108,105,99,70,105,101,108,100,40,116,104,105,115,44,32,34,95,102,114,97,109,101,77,97,110,97,103,101,114,34,41,59,10,32,32,32,32,32,32,95,95,112,117,98,108,105,99,70,105,101,108,100,40,116,104,105,115,44,32,34,95,100,111,116,76,111,116,116,105,101,67,111,114,101,34,44,32,110,117,108,108,41,59,10,32,32,32,32,32,32,95,95,112,117,98,108,105,99,70,105,101,108,100,40,116,104,105,115,44,32,34,95,114,101,110,100,101,114,67,111,110,102,105,103,34,44,32,123,125,41,59,10,32,32,32,32,32,32,95,95,112,117,98,108,105,99,70,105,101,108,100,40,116,104,105,115,44,32,34,95,105,115,70,114,111,122,101,110,34,44,32,102,97,108,115,101,41,59,10,32,32,32,32,32,32,95,95,112,117,98,108,105,99,70,105,101,108,100,40,116,104,105,115,44,32,34,95,98,97,99,107,103,114,111,117,110,100,67,111,108,111,114,34,44,32,110,117,108,108,41,59,10,32,32,32,32,32,32,95,95,112,117,98,108,105,99,70,105,101,108,100,40,116,104,105,115,44,32,34,95,112,111,105,110,116,101,114,85,112,77,101,116,104,111,100,34,41,59,10,32,32,32,32,32,32,95,95,112,117,98,108,105,99,70,105,101,108,100,40,116,104,105,115,44,32,34,95,112,111,105,110,116,101,114,68,111,119,110,77,101,116,104,111,100,34,41,59,10,32,32,32,32,32,32,95,95,112,117,98,108,105,99,70,105,101,108,100,40,116,104,105,115,44,32,34,95,112,111,105,110,116,101,114,77,111,118,101,77,101,116,104,111,100,34,41,59,10,32,32,32,32,32,32,95,95,112,117,98,108,105,99,70,105,101,108,100,40,116,104,105,115,44,32,34,95,112,111,105,110,116,101,114,69,110,116,101,114,77,101,116,104,111,100,34,41,59,10,32,32,32,32,32,32,95,95,112,117,98,108,105,99,70,105,101,108,100,40,116,104,105,115,44,32,34,95,112,111,105,110,116,101,114,69,120,105,116,77,101,116,104,111,100,34,41,59,10,32,32,32,32,32,32,118,97,114,32,95,97,44,32,95,98,44,32,95,99,59,10,32,32,32,32,32,32,116,104,105,115,46,95,99,97,110,118,97,115,32,61,32,99,111,110,102,105,103,46,99,97,110,118,97,115,59,10,32,32,32,32,32,32,116,104,105,115,46,95,99,111,110,116,101,120,116,32,61,32,116,104,105,115,46,95,99,97,110,118,97,115,46,103,101,116,67,111,110,116,101,120,116,40,34,50,100,34,41,59,10,32,32,32,32,32,32,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,32,61,32,110,101,119,32,69,118,101,110,116,77,97,110,97,103,101,114,40,41,59,10,32,32,32,32,32,32,116,104,105,115,46,95,102,114,97,109,101,77,97,110,97,103,101,114,32,61,32,110,101,119,32,65,110,105,109,97,116,105,111,110,70,114,97,109,101,77,97,110,97,103,101,114,40,41,59,10,32,32,32,32,32,32,116,104,105,115,46,95,114,101,110,100,101,114,67,111,110,102,105,103,32,61,32,95,95,115,112,114,101,97,100,80,114,111,112,115,40,95,95,115,112,114,101,97,100,86,97,108,117,101,115,40,123,125,44,32,99,111,110,102,105,103,46,114,101,110,100,101,114,67,111,110,102,105,103,41,44,32,123,10,32,32,32,32,32,32,32,32,100,101,118,105,99,101,80,105,120,101,108,82,97,116,105,111,58,32,40,40,95,97,32,61,32,99,111,110,102,105,103,46,114,101,110,100,101,114,67,111,110,102,105,103,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,100,101,118,105,99,101,80,105,120,101,108,82,97,116,105,111,41,32,124,124,32,103,101,116,68,101,102,97,117,108,116,68,80,82,40,41,44,10,32,32,32,32,32,32,32,32,47,47,32,102,114,101,101,122,101,79,110,79,102,102,115,99,114,101,101,110,32,105,115,32,116,114,117,101,32,98,121,32,100,101,102,97,117,108,116,32,116,111,32,112,114,101,118,101,110,116,32,117,110,110,101,99,101,115,115,97,114,121,32,114,101,110,100,101,114,105,110,103,32,119,104,101,110,32,116,104,101,32,99,97,110,118,97,115,32,105,115,32,111,102,102,115,99,114,101,101,110,10,32,32,32,32,32,32,32,32,102,114,101,101,122,101,79,110,79,102,102,115,99,114,101,101,110,58,32,40,95,99,32,61,32,40,95,98,32,61,32,99,111,110,102,105,103,46,114,101,110,100,101,114,67,111,110,102,105,103,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,98,46,102,114,101,101,122,101,79,110,79,102,102,115,99,114,101,101,110,41,32,33,61,32,110,117,108,108,32,63,32,95,99,32,58,32,116,114,117,101,10,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,68,111,116,76,111,116,116,105,101,87,97,115,109,76,111,97,100,101,114,46,108,111,97,100,40,41,46,116,104,101,110,40,40,109,111,100,117,108,101,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,118,97,114,32,95,97,50,44,32,95,98,50,44,32,95,99,50,44,32,95,100,44,32,95,101,44,32,95,102,44,32,95,103,59,10,32,32,32,32,32,32,32,32,95,68,111,116,76,111,116,116,105,101,46,95,119,97,115,109,77,111,100,117,108,101,32,61,32,109,111,100,117,108,101,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,32,61,32,110,101,119,32,109,111,100,117,108,101,46,68,111,116,76,111,116,116,105,101,80,108,97,121,101,114,40,123,10,32,32,32,32,32,32,32,32,32,32,97,117,116,111,112,108,97,121,58,32,40,95,97,50,32,61,32,99,111,110,102,105,103,46,97,117,116,111,112,108,97,121,41,32,33,61,32,110,117,108,108,32,63,32,95,97,50,32,58,32,102,97,108,115,101,44,10,32,32,32,32,32,32,32,32,32,32,98,97,99,107,103,114,111,117,110,100,67,111,108,111,114,58,32,48,44,10,32,32,32,32,32,32,32,32,32,32,108,111,111,112,65,110,105,109,97,116,105,111,110,58,32,40,95,98,50,32,61,32,99,111,110,102,105,103,46,108,111,111,112,41,32,33,61,32,110,117,108,108,32,63,32,95,98,50,32,58,32,102,97,108,115,101,44,10,32,32,32,32,32,32,32,32,32,32,109,111,100,101,58,32,99,114,101,97,116,101,67,111,114,101,77,111,100,101,40,40,95,99,50,32,61,32,99,111,110,102,105,103,46,109,111,100,101,41,32,33,61,32,110,117,108,108,32,63,32,95,99,50,32,58,32,34,102,111,114,119,97,114,100,34,44,32,109,111,100,117,108,101,41,44,10,32,32,32,32,32,32,32,32,32,32,115,101,103,109,101,110,116,58,32,99,114,101,97,116,101,67,111,114,101,83,101,103,109,101,110,116,40,40,95,100,32,61,32,99,111,110,102,105,103,46,115,101,103,109,101,110,116,41,32,33,61,32,110,117,108,108,32,63,32,95,100,32,58,32,91,93,44,32,109,111,100,117,108,101,41,44,10,32,32,32,32,32,32,32,32,32,32,115,112,101,101,100,58,32,40,95,101,32,61,32,99,111,110,102,105,103,46,115,112,101,101,100,41,32,33,61,32,110,117,108,108,32,63,32,95,101,32,58,32,49,44,10,32,32,32,32,32,32,32,32,32,32,117,115,101,70,114,97,109,101,73,110,116,101,114,112,111,108,97,116,105,111,110,58,32,40,95,102,32,61,32,99,111,110,102,105,103,46,117,115,101,70,114,97,109,101,73,110,116,101,114,112,111,108,97,116,105,111,110,41,32,33,61,32,110,117,108,108,32,63,32,95,102,32,58,32,116,114,117,101,44,10,32,32,32,32,32,32,32,32,32,32,109,97,114,107,101,114,58,32,40,95,103,32,61,32,99,111,110,102,105,103,46,109,97,114,107,101,114,41,32,33,61,32,110,117,108,108,32,63,32,95,103,32,58,32,34,34,44,10,32,32,32,32,32,32,32,32,32,32,108,97,121,111,117,116,58,32,99,111,110,102,105,103,46,108,97,121,111,117,116,32,63,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,97,108,105,103,110,58,32,99,114,101,97,116,101,67,111,114,101,65,108,105,103,110,40,99,111,110,102,105,103,46,108,97,121,111,117,116,46,97,108,105,103,110,44,32,109,111,100,117,108,101,41,44,10,32,32,32,32,32,32,32,32,32,32,32,32,102,105,116,58,32,99,114,101,97,116,101,67,111,114,101,70,105,116,40,99,111,110,102,105,103,46,108,97,121,111,117,116,46,102,105,116,44,32,109,111,100,117,108,101,41,10,32,32,32,32,32,32,32,32,32,32,125,32,58,32,109,111,100,117,108,101,46,99,114,101,97,116,101,68,101,102,97,117,108,116,76,97,121,111,117,116,40,41,10,32,32,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,32,116,121,112,101,58,32,34,114,101,97,100,121,34,32,125,41,59,10,32,32,32,32,32,32,32,32,105,102,32,40,99,111,110,102,105,103,46,100,97,116,97,41,32,123,10,32,32,32,32,32,32,32,32,32,32,116,104,105,115,46,95,108,111,97,100,70,114,111,109,68,97,116,97,40,99,111,110,102,105,103,46,100,97,116,97,41,59,10,32,32,32,32,32,32,32,32,125,32,101,108,115,101,32,105,102,32,40,99,111,110,102,105,103,46,115,114,99,41,32,123,10,32,32,32,32,32,32,32,32,32,32,116,104,105,115,46,95,108,111,97,100,70,114,111,109,83,114,99,40,99,111,110,102,105,103,46,115,114,99,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,105,102,32,40,99,111,110,102,105,103,46,98,97,99,107,103,114,111,117,110,100,67,111,108,111,114,41,32,123,10,32,32,32,32,32,32,32,32,32,32,116,104,105,115,46,115,101,116,66,97,99,107,103,114,111,117,110,100,67,111,108,111,114,40,99,111,110,102,105,103,46,98,97,99,107,103,114,111,117,110,100,67,111,108,111,114,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,41,46,99,97,116,99,104,40,40,101,114,114,111,114,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,10,32,32,32,32,32,32,32,32,32,32,116,121,112,101,58,32,34,108,111,97,100,69,114,114,111,114,34,44,10,32,32,32,32,32,32,32,32,32,32,101,114,114,111,114,58,32,110,101,119,32,69,114,114,111,114,40,96,70,97,105,108,101,100,32,116,111,32,108,111,97,100,32,119,97,115,109,32,109,111,100,117,108,101,58,32,36,123,101,114,114,111,114,125,96,41,10,32,32,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,116,104,105,115,46,95,112,111,105,110,116,101,114,85,112,77,101,116,104,111,100,32,61,32,116,104,105,115,46,95,111,110,80,111,105,110,116,101,114,85,112,46,98,105,110,100,40,116,104,105,115,41,59,10,32,32,32,32,32,32,116,104,105,115,46,95,112,111,105,110,116,101,114,68,111,119,110,77,101,116,104,111,100,32,61,32,116,104,105,115,46,95,111,110,80,111,105,110,116,101,114,68,111,119,110,46,98,105,110,100,40,116,104,105,115,41,59,10,32,32,32,32,32,32,116,104,105,115,46,95,112,111,105,110,116,101,114,77,111,118,101,77,101,116,104,111,100,32,61,32,116,104,105,115,46,95,111,110,80,111,105,110,116,101,114,77,111,118,101,46,98,105,110,100,40,116,104,105,115,41,59,10,32,32,32,32,32,32,116,104,105,115,46,95,112,111,105,110,116,101,114,69,110,116,101,114,77,101,116,104,111,100,32,61,32,116,104,105,115,46,95,111,110,80,111,105,110,116,101,114,69,110,116,101,114,46,98,105,110,100,40,116,104,105,115,41,59,10,32,32,32,32,32,32,116,104,105,115,46,95,112,111,105,110,116,101,114,69,120,105,116,77,101,116,104,111,100,32,61,32,116,104,105,115,46,95,111,110,80,111,105,110,116,101,114,76,101,97,118,101,46,98,105,110,100,40,116,104,105,115,41,59,10,32,32,32,32,125,10,32,32,32,32,95,100,105,115,112,97,116,99,104,69,114,114,111,114,40,109,101,115,115,97,103,101,41,32,123,10,32,32,32,32,32,32,99,111,110,115,111,108,101,46,101,114,114,111,114,40,109,101,115,115,97,103,101,41,59,10,32,32,32,32,32,32,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,32,116,121,112,101,58,32,34,108,111,97,100,69,114,114,111,114,34,44,32,101,114,114,111,114,58,32,110,101,119,32,69,114,114,111,114,40,109,101,115,115,97,103,101,41,32,125,41,59,10,32,32,32,32,125,10,32,32,32,32,95,102,101,116,99,104,68,97,116,97,40,115,114,99,41,32,123,10,32,32,32,32,32,32,114,101,116,117,114,110,32,95,95,97,115,121,110,99,40,116,104,105,115,44,32,110,117,108,108,44,32,102,117,110,99,116,105,111,110,42,32,40,41,32,123,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,114,101,115,112,111,110,115,101,32,61,32,121,105,101,108,100,32,102,101,116,99,104,40,115,114,99,41,59,10,32,32,32,32,32,32,32,32,105,102,32,40,33,114,101,115,112,111,110,115,101,46,111,107,41,32,123,10,32,32,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,70,97,105,108,101,100,32,116,111,32,102,101,116,99,104,32,97,110,105,109,97,116,105,111,110,32,100,97,116,97,32,102,114,111,109,32,85,82,76,58,32,36,123,115,114,99,125,46,32,36,123,114,101,115,112,111,110,115,101,46,115,116,97,116,117,115,125,58,32,36,123,114,101,115,112,111,110,115,101,46,115,116,97,116,117,115,84,101,120,116,125,96,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,100,97,116,97,32,61,32,121,105,101,108,100,32,114,101,115,112,111,110,115,101,46,97,114,114,97,121,66,117,102,102,101,114,40,41,59,10,32,32,32,32,32,32,32,32,105,102,32,40,105,115,68,111,116,76,111,116,116,105,101,40,100,97,116,97,41,41,32,123,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,100,97,116,97,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,110,101,119,32,84,101,120,116,68,101,99,111,100,101,114,40,41,46,100,101,99,111,100,101,40,100,97,116,97,41,59,10,32,32,32,32,32,32,125,41,59,10,32,32,32,32,125,10,32,32,32,32,95,108,111,97,100,70,114,111,109,68,97,116,97,40,100,97,116,97,41,32,123,10,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,32,61,61,61,32,110,117,108,108,41,32,114,101,116,117,114,110,59,10,32,32,32,32,32,32,99,111,110,115,116,32,119,105,100,116,104,32,61,32,116,104,105,115,46,95,99,97,110,118,97,115,46,119,105,100,116,104,59,10,32,32,32,32,32,32,99,111,110,115,116,32,104,101,105,103,104,116,32,61,32,116,104,105,115,46,95,99,97,110,118,97,115,46,104,101,105,103,104,116,59,10,32,32,32,32,32,32,108,101,116,32,108,111,97,100,101,100,32,61,32,102,97,108,115,101,59,10,32,32,32,32,32,32,105,102,32,40,116,121,112,101,111,102,32,100,97,116,97,32,61,61,61,32,34,115,116,114,105,110,103,34,41,32,123,10,32,32,32,32,32,32,32,32,105,102,32,40,33,105,115,76,111,116,116,105,101,40,100,97,116,97,41,41,32,123,10,32,32,32,32,32,32,32,32,32,32,116,104,105,115,46,95,100,105,115,112,97,116,99,104,69,114,114,111,114,40,10,32,32,32,32,32,32,32,32,32,32,32,32,34,73,110,118,97,108,105,100,32,76,111,116,116,105,101,32,74,83,79,78,32,115,116,114,105,110,103,58,32,84,104,101,32,112,114,111,118,105,100,101,100,32,115,116,114,105,110,103,32,100,111,101,115,32,110,111,116,32,99,111,110,102,111,114,109,32,116,111,32,116,104,101,32,76,111,116,116,105,101,32,74,83,79,78,32,102,111,114,109,97,116,46,34,10,32,32,32,32,32,32,32,32,32,32,41,59,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,108,111,97,100,101,100,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,108,111,97,100,65,110,105,109,97,116,105,111,110,68,97,116,97,40,100,97,116,97,44,32,119,105,100,116,104,44,32,104,101,105,103,104,116,41,59,10,32,32,32,32,32,32,125,32,101,108,115,101,32,105,102,32,40,100,97,116,97,32,105,110,115,116,97,110,99,101,111,102,32,65,114,114,97,121,66,117,102,102,101,114,41,32,123,10,32,32,32,32,32,32,32,32,105,102,32,40,33,105,115,68,111,116,76,111,116,116,105,101,40,100,97,116,97,41,41,32,123,10,32,32,32,32,32,32,32,32,32,32,116,104,105,115,46,95,100,105,115,112,97,116,99,104,69,114,114,111,114,40,10,32,32,32,32,32,32,32,32,32,32,32,32,34,73,110,118,97,108,105,100,32,100,111,116,76,111,116,116,105,101,32,65,114,114,97,121,66,117,102,102,101,114,58,32,84,104,101,32,112,114,111,118,105,100,101,100,32,65,114,114,97,121,66,117,102,102,101,114,32,100,111,101,115,32,110,111,116,32,99,111,110,102,111,114,109,32,116,111,32,116,104,101,32,100,111,116,76,111,116,116,105,101,32,102,111,114,109,97,116,46,34,10,32,32,32,32,32,32,32,32,32,32,41,59,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,108,111,97,100,101,100,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,108,111,97,100,68,111,116,76,111,116,116,105,101,68,97,116,97,40,100,97,116,97,44,32,119,105,100,116,104,44,32,104,101,105,103,104,116,41,59,10,32,32,32,32,32,32,125,32,101,108,115,101,32,105,102,32,40,116,121,112,101,111,102,32,100,97,116,97,32,61,61,61,32,34,111,98,106,101,99,116,34,41,32,123,10,32,32,32,32,32,32,32,32,105,102,32,40,33,105,115,76,111,116,116,105,101,40,100,97,116,97,41,41,32,123,10,32,32,32,32,32,32,32,32,32,32,116,104,105,115,46,95,100,105,115,112,97,116,99,104,69,114,114,111,114,40,10,32,32,32,32,32,32,32,32,32,32,32,32,34,73,110,118,97,108,105,100,32,76,111,116,116,105,101,32,74,83,79,78,32,111,98,106,101,99,116,58,32,84,104,101,32,112,114,111,118,105,100,101,100,32,111,98,106,101,99,116,32,100,111,101,115,32,110,111,116,32,99,111,110,102,111,114,109,32,116,111,32,116,104,101,32,76,111,116,116,105,101,32,74,83,79,78,32,102,111,114,109,97,116,46,34,10,32,32,32,32,32,32,32,32,32,32,41,59,10,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,108,111,97,100,101,100,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,108,111,97,100,65,110,105,109,97,116,105,111,110,68,97,116,97,40,74,83,79,78,46,115,116,114,105,110,103,105,102,121,40,100,97,116,97,41,44,32,119,105,100,116,104,44,32,104,101,105,103,104,116,41,59,10,32,32,32,32,32,32,125,32,101,108,115,101,32,123,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,100,105,115,112,97,116,99,104,69,114,114,111,114,40,10,32,32,32,32,32,32,32,32,32,32,96,85,110,115,117,112,112,111,114,116,101,100,32,100,97,116,97,32,116,121,112,101,32,102,111,114,32,97,110,105,109,97,116,105,111,110,32,100,97,116,97,46,32,69,120,112,101,99,116,101,100,58,32,10,32,32,32,32,32,32,32,32,32,32,45,32,115,116,114,105,110,103,32,40,76,111,116,116,105,101,32,74,83,79,78,41,44,10,32,32,32,32,32,32,32,32,32,32,45,32,65,114,114,97,121,66,117,102,102,101,114,32,40,100,111,116,76,111,116,116,105,101,41,44,10,32,32,32,32,32,32,32,32,32,32,45,32,111,98,106,101,99,116,32,40,76,111,116,116,105,101,32,74,83,79,78,41,46,32,10,32,32,32,32,32,32,32,32,32,32,82,101,99,101,105,118,101,100,58,32,36,123,116,121,112,101,111,102,32,100,97,116,97,125,96,10,32,32,32,32,32,32,32,32,41,59,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,105,102,32,40,108,111,97,100,101,100,41,32,123,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,32,116,121,112,101,58,32,34,108,111,97,100,34,32,125,41,59,10,32,32,32,32,32,32,32,32,105,102,32,40,73,83,95,66,82,79,87,83,69,82,41,32,123,10,32,32,32,32,32,32,32,32,32,32,116,104,105,115,46,114,101,115,105,122,101,40,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,10,32,32,32,32,32,32,32,32,32,32,116,121,112,101,58,32,34,102,114,97,109,101,34,44,10,32,32,32,32,32,32,32,32,32,32,99,117,114,114,101,110,116,70,114,97,109,101,58,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,99,117,114,114,101,110,116,70,114,97,109,101,40,41,10,32,32,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,114,101,110,100,101,114,40,41,59,10,32,32,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,99,111,110,102,105,103,40,41,46,97,117,116,111,112,108,97,121,41,32,123,10,32,32,32,32,32,32,32,32,32,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,112,108,97,121,40,41,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,105,115,80,108,97,121,105,110,103,40,41,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,32,116,121,112,101,58,32,34,112,108,97,121,34,32,125,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,116,104,105,115,46,95,97,110,105,109,97,116,105,111,110,70,114,97,109,101,73,100,32,61,32,116,104,105,115,46,95,102,114,97,109,101,77,97,110,97,103,101,114,46,114,101,113,117,101,115,116,65,110,105,109,97,116,105,111,110,70,114,97,109,101,40,116,104,105,115,46,95,100,114,97,119,46,98,105,110,100,40,116,104,105,115,41,41,59,10,32,32,32,32,32,32,32,32,32,32,125,32,101,108,115,101,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,99,111,110,115,111,108,101,46,101,114,114,111,114,40,34,115,111,109,101,116,104,105,110,103,32,119,101,110,116,32,119,114,111,110,103,44,32,116,104,101,32,97,110,105,109,97,116,105,111,110,32,119,97,115,32,115,117,112,112,111,115,101,32,116,111,32,97,117,116,111,112,108,97,121,34,41,59,10,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,105,102,32,40,73,83,95,66,82,79,87,83,69,82,32,38,38,32,116,104,105,115,46,95,99,97,110,118,97,115,32,105,110,115,116,97,110,99,101,111,102,32,72,84,77,76,67,97,110,118,97,115,69,108,101,109,101,110,116,41,32,123,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,114,101,110,100,101,114,67,111,110,102,105,103,46,102,114,101,101,122,101,79,110,79,102,102,115,99,114,101,101,110,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,79,102,102,115,99,114,101,101,110,79,98,115,101,114,118,101,114,46,111,98,115,101,114,118,101,40,116,104,105,115,46,95,99,97,110,118,97,115,44,32,116,104,105,115,41,59,10,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,114,101,110,100,101,114,67,111,110,102,105,103,46,97,117,116,111,82,101,115,105,122,101,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,67,97,110,118,97,115,82,101,115,105,122,101,79,98,115,101,114,118,101,114,46,111,98,115,101,114,118,101,40,116,104,105,115,46,95,99,97,110,118,97,115,44,32,116,104,105,115,41,59,10,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,32,101,108,115,101,32,123,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,100,105,115,112,97,116,99,104,69,114,114,111,114,40,34,70,97,105,108,101,100,32,116,111,32,108,111,97,100,32,97,110,105,109,97,116,105,111,110,32,100,97,116,97,34,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,125,10,32,32,32,32,95,108,111,97,100,70,114,111,109,83,114,99,40,115,114,99,41,32,123,10,32,32,32,32,32,32,116,104,105,115,46,95,102,101,116,99,104,68,97,116,97,40,115,114,99,41,46,116,104,101,110,40,40,100,97,116,97,41,32,61,62,32,116,104,105,115,46,95,108,111,97,100,70,114,111,109,68,97,116,97,40,100,97,116,97,41,41,46,99,97,116,99,104,40,40,101,114,114,111,114,41,32,61,62,32,116,104,105,115,46,95,100,105,115,112,97,116,99,104,69,114,114,111,114,40,96,70,97,105,108,101,100,32,116,111,32,108,111,97,100,32,97,110,105,109,97,116,105,111,110,32,100,97,116,97,32,102,114,111,109,32,85,82,76,58,32,36,123,115,114,99,125,46,32,36,123,101,114,114,111,114,125,96,41,41,59,10,32,32,32,32,125,10,32,32,32,32,103,101,116,32,97,99,116,105,118,101,65,110,105,109,97,116,105,111,110,73,100,40,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,97,99,116,105,118,101,65,110,105,109,97,116,105,111,110,73,100,40,41,59,10,32,32,32,32,125,10,32,32,32,32,103,101,116,32,97,99,116,105,118,101,84,104,101,109,101,73,100,40,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,97,99,116,105,118,101,84,104,101,109,101,73,100,40,41,59,10,32,32,32,32,125,10,32,32,32,32,103,101,116,32,108,97,121,111,117,116,40,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,59,10,32,32,32,32,32,32,99,111,110,115,116,32,108,97,121,111,117,116,32,61,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,99,111,110,102,105,103,40,41,46,108,97,121,111,117,116,59,10,32,32,32,32,32,32,105,102,32,40,108,97,121,111,117,116,41,32,123,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,123,10,32,32,32,32,32,32,32,32,32,32,97,108,105,103,110,58,32,91,108,97,121,111,117,116,46,97,108,105,103,110,46,103,101,116,40,48,41,44,32,108,97,121,111,117,116,46,97,108,105,103,110,46,103,101,116,40,49,41,93,44,10,32,32,32,32,32,32,32,32,32,32,102,105,116,58,32,40,40,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,118,97,114,32,95,97,50,44,32,95,98,44,32,95,99,44,32,95,100,44,32,95,101,44,32,95,102,59,10,32,32,32,32,32,32,32,32,32,32,32,32,115,119,105,116,99,104,32,40,108,97,121,111,117,116,46,102,105,116,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,97,115,101,32,40,40,95,97,50,32,61,32,95,68,111,116,76,111,116,116,105,101,46,95,119,97,115,109,77,111,100,117,108,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,50,46,70,105,116,46,67,111,110,116,97,105,110,41,58,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,34,99,111,110,116,97,105,110,34,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,97,115,101,32,40,40,95,98,32,61,32,95,68,111,116,76,111,116,116,105,101,46,95,119,97,115,109,77,111,100,117,108,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,98,46,70,105,116,46,67,111,118,101,114,41,58,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,34,99,111,118,101,114,34,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,97,115,101,32,40,40,95,99,32,61,32,95,68,111,116,76,111,116,116,105,101,46,95,119,97,115,109,77,111,100,117,108,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,99,46,70,105,116,46,70,105,108,108,41,58,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,34,102,105,108,108,34,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,97,115,101,32,40,40,95,100,32,61,32,95,68,111,116,76,111,116,116,105,101,46,95,119,97,115,109,77,111,100,117,108,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,100,46,70,105,116,46,70,105,116,72,101,105,103,104,116,41,58,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,34,102,105,116,45,104,101,105,103,104,116,34,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,97,115,101,32,40,40,95,101,32,61,32,95,68,111,116,76,111,116,116,105,101,46,95,119,97,115,109,77,111,100,117,108,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,101,46,70,105,116,46,70,105,116,87,105,100,116,104,41,58,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,34,102,105,116,45,119,105,100,116,104,34,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,99,97,115,101,32,40,40,95,102,32,61,32,95,68,111,116,76,111,116,116,105,101,46,95,119,97,115,109,77,111,100,117,108,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,102,46,70,105,116,46,78,111,110,101,41,58,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,34,110,111,110,101,34,59,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,100,101,102,97,117,108,116,58,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,34,99,111,110,116,97,105,110,34,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,125,41,40,41,10,32,32,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,114,101,116,117,114,110,32,118,111,105,100,32,48,59,10,32,32,32,32,125,10,32,32,32,32,103,101,116,32,109,97,114,107,101,114,40,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,59,10,32,32,32,32,32,32,99,111,110,115,116,32,109,97,114,107,101,114,32,61,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,99,111,110,102,105,103,40,41,46,109,97,114,107,101,114,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,109,97,114,107,101,114,59,10,32,32,32,32,125,10,32,32,32,32,103,101,116,32,109,97,110,105,102,101,115,116,40,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,59,10,32,32,32,32,32,32,116,114,121,32,123,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,109,97,110,105,102,101,115,116,32,61,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,109,97,110,105,102,101,115,116,83,116,114,105,110,103,40,41,59,10,32,32,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,32,61,61,61,32,110,117,108,108,32,124,124,32,33,109,97,110,105,102,101,115,116,41,32,114,101,116,117,114,110,32,110,117,108,108,59,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,109,97,110,105,102,101,115,116,74,115,111,110,32,61,32,74,83,79,78,46,112,97,114,115,101,40,109,97,110,105,102,101,115,116,41,59,10,32,32,32,32,32,32,32,32,105,102,32,40,79,98,106,101,99,116,46,107,101,121,115,40,109,97,110,105,102,101,115,116,74,115,111,110,41,46,108,101,110,103,116,104,32,61,61,61,32,48,41,32,114,101,116,117,114,110,32,110,117,108,108,59,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,109,97,110,105,102,101,115,116,74,115,111,110,59,10,32,32,32,32,32,32,125,32,99,97,116,99,104,32,40,95,101,114,114,41,32,123,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,110,117,108,108,59,10,32,32,32,32,32,32,125,10,32,32,32,32,125,10,32,32,32,32,103,101,116,32,114,101,110,100,101,114,67,111,110,102,105,103,40,41,32,123,10,32,32,32,32,32,32,114,101,116,117,114,110,32,116,104,105,115,46,95,114,101,110,100,101,114,67,111,110,102,105,103,59,10,32,32,32,32,125,10,32,32,32,32,103,101,116,32,115,101,103,109,101,110,116,40,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,59,10,32,32,32,32,32,32,99,111,110,115,116,32,115,101,103,109,101,110,116,32,61,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,99,111,110,102,105,103,40,41,46,115,101,103,109,101,110,116,59,10,32,32,32,32,32,32,105,102,32,40,115,101,103,109,101,110,116,32,38,38,32,115,101,103,109,101,110,116,46,115,105,122,101,40,41,32,61,61,61,32,50,41,32,123,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,91,115,101,103,109,101,110,116,46,103,101,116,40,48,41,44,32,115,101,103,109,101,110,116,46,103,101,116,40,49,41,93,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,114,101,116,117,114,110,32,118,111,105,100,32,48,59,10,32,32,32,32,125,10,32,32,32,32,103,101,116,32,108,111,111,112,40,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,44,32,95,98,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,40,95,98,32,61,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,99,111,110,102,105,103,40,41,46,108,111,111,112,65,110,105,109,97,116,105,111,110,41,32,33,61,32,110,117,108,108,32,63,32,95,98,32,58,32,102,97,108,115,101,59,10,32,32,32,32,125,10,32,32,32,32,103,101,116,32,109,111,100,101,40,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,44,32,95,98,44,32,95,99,44,32,95,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,109,111,100,101,32,61,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,99,111,110,102,105,103,40,41,46,109,111,100,101,59,10,32,32,32,32,32,32,105,102,32,40,109,111,100,101,32,61,61,61,32,40,40,95,98,32,61,32,95,68,111,116,76,111,116,116,105,101,46,95,119,97,115,109,77,111,100,117,108,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,98,46,77,111,100,101,46,82,101,118,101,114,115,101,41,41,32,123,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,34,114,101,118,101,114,115,101,34,59,10,32,32,32,32,32,32,125,32,101,108,115,101,32,105,102,32,40,109,111,100,101,32,61,61,61,32,40,40,95,99,32,61,32,95,68,111,116,76,111,116,116,105,101,46,95,119,97,115,109,77,111,100,117,108,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,99,46,77,111,100,101,46,66,111,117,110,99,101,41,41,32,123,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,34,98,111,117,110,99,101,34,59,10,32,32,32,32,32,32,125,32,101,108,115,101,32,105,102,32,40,109,111,100,101,32,61,61,61,32,40,40,95,100,32,61,32,95,68,111,116,76,111,116,116,105,101,46,95,119,97,115,109,77,111,100,117,108,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,100,46,77,111,100,101,46,82,101,118,101,114,115,101,66,111,117,110,99,101,41,41,32,123,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,34,114,101,118,101,114,115,101,45,98,111,117,110,99,101,34,59,10,32,32,32,32,32,32,125,32,101,108,115,101,32,123,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,34,102,111,114,119,97,114,100,34,59,10,32,32,32,32,32,32,125,10,32,32,32,32,125,10,32,32,32,32,103,101,116,32,105,115,70,114,111,122,101,110,40,41,32,123,10,32,32,32,32,32,32,114,101,116,117,114,110,32,116,104,105,115,46,95,105,115,70,114,111,122,101,110,59,10,32,32,32,32,125,10,32,32,32,32,103,101,116,32,98,97,99,107,103,114,111,117,110,100,67,111,108,111,114,40,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,40,95,97,32,61,32,116,104,105,115,46,95,98,97,99,107,103,114,111,117,110,100,67,111,108,111,114,41,32,33,61,32,110,117,108,108,32,63,32,95,97,32,58,32,34,34,59,10,32,32,32,32,125,10,32,32,32,32,103,101,116,32,97,117,116,111,112,108,97,121,40,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,44,32,95,98,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,40,95,98,32,61,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,99,111,110,102,105,103,40,41,46,97,117,116,111,112,108,97,121,41,32,33,61,32,110,117,108,108,32,63,32,95,98,32,58,32,102,97,108,115,101,59,10,32,32,32,32,125,10,32,32,32,32,103,101,116,32,117,115,101,70,114,97,109,101,73,110,116,101,114,112,111,108,97,116,105,111,110,40,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,44,32,95,98,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,40,95,98,32,61,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,99,111,110,102,105,103,40,41,46,117,115,101,70,114,97,109,101,73,110,116,101,114,112,111,108,97,116,105,111,110,41,32,33,61,32,110,117,108,108,32,63,32,95,98,32,58,32,102,97,108,115,101,59,10,32,32,32,32,125,10,32,32,32,32,103,101,116,32,115,112,101,101,100,40,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,44,32,95,98,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,40,95,98,32,61,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,99,111,110,102,105,103,40,41,46,115,112,101,101,100,41,32,33,61,32,110,117,108,108,32,63,32,95,98,32,58,32,48,59,10,32,32,32,32,125,10,32,32,32,32,103,101,116,32,105,115,82,101,97,100,121,40,41,32,123,10,32,32,32,32,32,32,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,32,33,61,61,32,110,117,108,108,59,10,32,32,32,32,125,10,32,32,32,32,103,101,116,32,105,115,76,111,97,100,101,100,40,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,44,32,95,98,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,40,95,98,32,61,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,105,115,76,111,97,100,101,100,40,41,41,32,33,61,32,110,117,108,108,32,63,32,95,98,32,58,32,102,97,108,115,101,59,10,32,32,32,32,125,10,32,32,32,32,103,101,116,32,105,115,80,108,97,121,105,110,103,40,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,44,32,95,98,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,40,95,98,32,61,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,105,115,80,108,97,121,105,110,103,40,41,41,32,33,61,32,110,117,108,108,32,63,32,95,98,32,58,32,102,97,108,115,101,59,10,32,32,32,32,125,10,32,32,32,32,103,101,116,32,105,115,80,97,117,115,101,100,40,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,44,32,95,98,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,40,95,98,32,61,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,105,115,80,97,117,115,101,100,40,41,41,32,33,61,32,110,117,108,108,32,63,32,95,98,32,58,32,102,97,108,115,101,59,10,32,32,32,32,125,10,32,32,32,32,103,101,116,32,105,115,83,116,111,112,112,101,100,40,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,44,32,95,98,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,40,95,98,32,61,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,105,115,83,116,111,112,112,101,100,40,41,41,32,33,61,32,110,117,108,108,32,63,32,95,98,32,58,32,102,97,108,115,101,59,10,32,32,32,32,125,10,32,32,32,32,103,101,116,32,99,117,114,114,101,110,116,70,114,97,109,101,40,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,44,32,95,98,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,40,95,98,32,61,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,99,117,114,114,101,110,116,70,114,97,109,101,40,41,41,32,33,61,32,110,117,108,108,32,63,32,95,98,32,58,32,48,59,10,32,32,32,32,125,10,32,32,32,32,103,101,116,32,108,111,111,112,67,111,117,110,116,40,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,44,32,95,98,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,40,95,98,32,61,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,108,111,111,112,67,111,117,110,116,40,41,41,32,33,61,32,110,117,108,108,32,63,32,95,98,32,58,32,48,59,10,32,32,32,32,125,10,32,32,32,32,103,101,116,32,116,111,116,97,108,70,114,97,109,101,115,40,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,44,32,95,98,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,40,95,98,32,61,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,116,111,116,97,108,70,114,97,109,101,115,40,41,41,32,33,61,32,110,117,108,108,32,63,32,95,98,32,58,32,48,59,10,32,32,32,32,125,10,32,32,32,32,103,101,116,32,100,117,114,97,116,105,111,110,40,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,44,32,95,98,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,40,95,98,32,61,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,100,117,114,97,116,105,111,110,40,41,41,32,33,61,32,110,117,108,108,32,63,32,95,98,32,58,32,48,59,10,32,32,32,32,125,10,32,32,32,32,103,101,116,32,115,101,103,109,101,110,116,68,117,114,97,116,105,111,110,40,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,44,32,95,98,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,40,95,98,32,61,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,115,101,103,109,101,110,116,68,117,114,97,116,105,111,110,40,41,41,32,33,61,32,110,117,108,108,32,63,32,95,98,32,58,32,48,59,10,32,32,32,32,125,10,32,32,32,32,103,101,116,32,99,97,110,118,97,115,40,41,32,123,10,32,32,32,32,32,32,114,101,116,117,114,110,32,116,104,105,115,46,95,99,97,110,118,97,115,59,10,32,32,32,32,125,10,32,32,32,32,108,111,97,100,40,99,111,110,102,105,103,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,44,32,95,98,44,32,95,99,44,32,95,100,44,32,95,101,44,32,95,102,44,32,95,103,44,32,95,104,59,10,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,32,61,61,61,32,110,117,108,108,32,124,124,32,95,68,111,116,76,111,116,116,105,101,46,95,119,97,115,109,77,111,100,117,108,101,32,61,61,61,32,110,117,108,108,41,32,114,101,116,117,114,110,59,10,32,32,32,32,32,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,67,111,110,102,105,103,40,123,10,32,32,32,32,32,32,32,32,97,117,116,111,112,108,97,121,58,32,40,95,97,32,61,32,99,111,110,102,105,103,46,97,117,116,111,112,108,97,121,41,32,33,61,32,110,117,108,108,32,63,32,95,97,32,58,32,102,97,108,115,101,44,10,32,32,32,32,32,32,32,32,98,97,99,107,103,114,111,117,110,100,67,111,108,111,114,58,32,48,44,10,32,32,32,32,32,32,32,32,108,111,111,112,65,110,105,109,97,116,105,111,110,58,32,40,95,98,32,61,32,99,111,110,102,105,103,46,108,111,111,112,41,32,33,61,32,110,117,108,108,32,63,32,95,98,32,58,32,102,97,108,115,101,44,10,32,32,32,32,32,32,32,32,109,111,100,101,58,32,99,114,101,97,116,101,67,111,114,101,77,111,100,101,40,40,95,99,32,61,32,99,111,110,102,105,103,46,109,111,100,101,41,32,33,61,32,110,117,108,108,32,63,32,95,99,32,58,32,34,102,111,114,119,97,114,100,34,44,32,95,68,111,116,76,111,116,116,105,101,46,95,119,97,115,109,77,111,100,117,108,101,41,44,10,32,32,32,32,32,32,32,32,115,101,103,109,101,110,116,58,32,99,114,101,97,116,101,67,111,114,101,83,101,103,109,101,110,116,40,40,95,100,32,61,32,99,111,110,102,105,103,46,115,101,103,109,101,110,116,41,32,33,61,32,110,117,108,108,32,63,32,95,100,32,58,32,91,93,44,32,95,68,111,116,76,111,116,116,105,101,46,95,119,97,115,109,77,111,100,117,108,101,41,44,10,32,32,32,32,32,32,32,32,115,112,101,101,100,58,32,40,95,101,32,61,32,99,111,110,102,105,103,46,115,112,101,101,100,41,32,33,61,32,110,117,108,108,32,63,32,95,101,32,58,32,49,44,10,32,32,32,32,32,32,32,32,117,115,101,70,114,97,109,101,73,110,116,101,114,112,111,108,97,116,105,111,110,58,32,40,95,102,32,61,32,99,111,110,102,105,103,46,117,115,101,70,114,97,109,101,73,110,116,101,114,112,111,108,97,116,105,111,110,41,32,33,61,32,110,117,108,108,32,63,32,95,102,32,58,32,116,114,117,101,44,10,32,32,32,32,32,32,32,32,109,97,114,107,101,114,58,32,40,95,103,32,61,32,99,111,110,102,105,103,46,109,97,114,107,101,114,41,32,33,61,32,110,117,108,108,32,63,32,95,103,32,58,32,34,34,44,10,32,32,32,32,32,32,32,32,108,97,121,111,117,116,58,32,99,111,110,102,105,103,46,108,97,121,111,117,116,32,63,32,123,10,32,32,32,32,32,32,32,32,32,32,97,108,105,103,110,58,32,99,114,101,97,116,101,67,111,114,101,65,108,105,103,110,40,99,111,110,102,105,103,46,108,97,121,111,117,116,46,97,108,105,103,110,44,32,95,68,111,116,76,111,116,116,105,101,46,95,119,97,115,109,77,111,100,117,108,101,41,44,10,32,32,32,32,32,32,32,32,32,32,102,105,116,58,32,99,114,101,97,116,101,67,111,114,101,70,105,116,40,99,111,110,102,105,103,46,108,97,121,111,117,116,46,102,105,116,44,32,95,68,111,116,76,111,116,116,105,101,46,95,119,97,115,109,77,111,100,117,108,101,41,10,32,32,32,32,32,32,32,32,125,32,58,32,95,68,111,116,76,111,116,116,105,101,46,95,119,97,115,109,77,111,100,117,108,101,46,99,114,101,97,116,101,68,101,102,97,117,108,116,76,97,121,111,117,116,40,41,10,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,105,102,32,40,99,111,110,102,105,103,46,100,97,116,97,41,32,123,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,108,111,97,100,70,114,111,109,68,97,116,97,40,99,111,110,102,105,103,46,100,97,116,97,41,59,10,32,32,32,32,32,32,125,32,101,108,115,101,32,105,102,32,40,99,111,110,102,105,103,46,115,114,99,41,32,123,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,108,111,97,100,70,114,111,109,83,114,99,40,99,111,110,102,105,103,46,115,114,99,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,116,104,105,115,46,115,101,116,66,97,99,107,103,114,111,117,110,100,67,111,108,111,114,40,40,95,104,32,61,32,99,111,110,102,105,103,46,98,97,99,107,103,114,111,117,110,100,67,111,108,111,114,41,32,33,61,32,110,117,108,108,32,63,32,95,104,32,58,32,34,34,41,59,10,32,32,32,32,125,10,32,32,32,32,95,114,101,110,100,101,114,40,41,32,123,10,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,32,61,61,61,32,110,117,108,108,32,124,124,32,116,104,105,115,46,95,99,111,110,116,101,120,116,32,61,61,61,32,110,117,108,108,41,32,114,101,116,117,114,110,32,102,97,108,115,101,59,10,32,32,32,32,32,32,99,111,110,115,116,32,114,101,110,100,101,114,101,100,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,114,101,110,100,101,114,40,41,59,10,32,32,32,32,32,32,105,102,32,40,114,101,110,100,101,114,101,100,41,32,123,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,98,117,102,102,101,114,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,98,117,102,102,101,114,40,41,59,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,99,108,97,109,112,101,100,66,117,102,102,101,114,32,61,32,110,101,119,32,85,105,110,116,56,67,108,97,109,112,101,100,65,114,114,97,121,40,98,117,102,102,101,114,44,32,48,44,32,116,104,105,115,46,95,99,97,110,118,97,115,46,119,105,100,116,104,32,42,32,116,104,105,115,46,95,99,97,110,118,97,115,46,104,101,105,103,104,116,32,42,32,52,41,59,10,32,32,32,32,32,32,32,32,108,101,116,32,105,109,97,103,101,68,97,116,97,32,61,32,110,117,108,108,59,10,32,32,32,32,32,32,32,32,105,102,32,40,116,121,112,101,111,102,32,73,109,97,103,101,68,97,116,97,32,61,61,61,32,34,117,110,100,101,102,105,110,101,100,34,41,32,123,10,32,32,32,32,32,32,32,32,32,32,105,109,97,103,101,68,97,116,97,32,61,32,116,104,105,115,46,95,99,111,110,116,101,120,116,46,99,114,101,97,116,101,73,109,97,103,101,68,97,116,97,40,116,104,105,115,46,95,99,97,110,118,97,115,46,119,105,100,116,104,44,32,116,104,105,115,46,95,99,97,110,118,97,115,46,104,101,105,103,104,116,41,59,10,32,32,32,32,32,32,32,32,32,32,105,109,97,103,101,68,97,116,97,46,100,97,116,97,46,115,101,116,40,99,108,97,109,112,101,100,66,117,102,102,101,114,41,59,10,32,32,32,32,32,32,32,32,125,32,101,108,115,101,32,123,10,32,32,32,32,32,32,32,32,32,32,105,109,97,103,101,68,97,116,97,32,61,32,110,101,119,32,73,109,97,103,101,68,97,116,97,40,99,108,97,109,112,101,100,66,117,102,102,101,114,44,32,116,104,105,115,46,95,99,97,110,118,97,115,46,119,105,100,116,104,44,32,116,104,105,115,46,95,99,97,110,118,97,115,46,104,101,105,103,104,116,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,99,111,110,116,101,120,116,46,112,117,116,73,109,97,103,101,68,97,116,97,40,105,109,97,103,101,68,97,116,97,44,32,48,44,32,48,41,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,10,32,32,32,32,32,32,32,32,32,32,116,121,112,101,58,32,34,114,101,110,100,101,114,34,44,10,32,32,32,32,32,32,32,32,32,32,99,117,114,114,101,110,116,70,114,97,109,101,58,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,99,117,114,114,101,110,116,70,114,97,109,101,40,41,10,32,32,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,116,114,117,101,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,114,101,116,117,114,110,32,102,97,108,115,101,59,10,32,32,32,32,125,10,32,32,32,32,95,100,114,97,119,40,41,32,123,10,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,32,61,61,61,32,110,117,108,108,32,124,124,32,116,104,105,115,46,95,99,111,110,116,101,120,116,32,61,61,61,32,110,117,108,108,32,124,124,32,33,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,105,115,80,108,97,121,105,110,103,40,41,41,32,114,101,116,117,114,110,59,10,32,32,32,32,32,32,99,111,110,115,116,32,110,101,120,116,70,114,97,109,101,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,114,101,113,117,101,115,116,70,114,97,109,101,40,41,59,10,32,32,32,32,32,32,99,111,110,115,116,32,117,112,100,97,116,101,100,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,70,114,97,109,101,40,110,101,120,116,70,114,97,109,101,41,59,10,32,32,32,32,32,32,105,102,32,40,117,112,100,97,116,101,100,41,32,123,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,10,32,32,32,32,32,32,32,32,32,32,116,121,112,101,58,32,34,102,114,97,109,101,34,44,10,32,32,32,32,32,32,32,32,32,32,99,117,114,114,101,110,116,70,114,97,109,101,58,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,99,117,114,114,101,110,116,70,114,97,109,101,40,41,10,32,32,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,114,101,110,100,101,114,101,100,32,61,32,116,104,105,115,46,95,114,101,110,100,101,114,40,41,59,10,32,32,32,32,32,32,32,32,105,102,32,40,114,101,110,100,101,114,101,100,41,32,123,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,105,115,67,111,109,112,108,101,116,101,40,41,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,99,111,110,102,105,103,40,41,46,108,111,111,112,65,110,105,109,97,116,105,111,110,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,121,112,101,58,32,34,108,111,111,112,34,44,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,108,111,111,112,67,111,117,110,116,58,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,108,111,111,112,67,111,117,110,116,40,41,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,32,101,108,115,101,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,32,32,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,32,116,121,112,101,58,32,34,99,111,109,112,108,101,116,101,34,32,125,41,59,10,32,32,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,116,104,105,115,46,95,97,110,105,109,97,116,105,111,110,70,114,97,109,101,73,100,32,61,32,116,104,105,115,46,95,102,114,97,109,101,77,97,110,97,103,101,114,46,114,101,113,117,101,115,116,65,110,105,109,97,116,105,111,110,70,114,97,109,101,40,116,104,105,115,46,95,100,114,97,119,46,98,105,110,100,40,116,104,105,115,41,41,59,10,32,32,32,32,125,10,32,32,32,32,112,108,97,121,40,41,32,123,10,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,32,61,61,61,32,110,117,108,108,41,32,114,101,116,117,114,110,59,10,32,32,32,32,32,32,99,111,110,115,116,32,111,107,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,112,108,97,121,40,41,59,10,32,32,32,32,32,32,105,102,32,40,111,107,32,124,124,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,105,115,80,108,97,121,105,110,103,40,41,41,32,123,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,105,115,70,114,111,122,101,110,32,61,32,102,97,108,115,101,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,32,116,121,112,101,58,32,34,112,108,97,121,34,32,125,41,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,97,110,105,109,97,116,105,111,110,70,114,97,109,101,73,100,32,61,32,116,104,105,115,46,95,102,114,97,109,101,77,97,110,97,103,101,114,46,114,101,113,117,101,115,116,65,110,105,109,97,116,105,111,110,70,114,97,109,101,40,116,104,105,115,46,95,100,114,97,119,46,98,105,110,100,40,116,104,105,115,41,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,105,102,32,40,73,83,95,66,82,79,87,83,69,82,32,38,38,32,116,104,105,115,46,95,99,97,110,118,97,115,32,105,110,115,116,97,110,99,101,111,102,32,72,84,77,76,67,97,110,118,97,115,69,108,101,109,101,110,116,32,38,38,32,116,104,105,115,46,95,114,101,110,100,101,114,67,111,110,102,105,103,46,102,114,101,101,122,101,79,110,79,102,102,115,99,114,101,101,110,32,38,38,32,33,105,115,69,108,101,109,101,110,116,73,110,86,105,101,119,112,111,114,116,40,116,104,105,115,46,95,99,97,110,118,97,115,41,41,32,123,10,32,32,32,32,32,32,32,32,116,104,105,115,46,102,114,101,101,122,101,40,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,125,10,32,32,32,32,112,97,117,115,101,40,41,32,123,10,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,32,61,61,61,32,110,117,108,108,41,32,114,101,116,117,114,110,59,10,32,32,32,32,32,32,99,111,110,115,116,32,111,107,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,112,97,117,115,101,40,41,59,10,32,32,32,32,32,32,105,102,32,40,111,107,32,124,124,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,105,115,80,97,117,115,101,100,40,41,41,32,123,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,32,116,121,112,101,58,32,34,112,97,117,115,101,34,32,125,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,125,10,32,32,32,32,115,116,111,112,40,41,32,123,10,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,32,61,61,61,32,110,117,108,108,41,32,114,101,116,117,114,110,59,10,32,32,32,32,32,32,99,111,110,115,116,32,111,107,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,116,111,112,40,41,59,10,32,32,32,32,32,32,105,102,32,40,111,107,41,32,123,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,32,116,121,112,101,58,32,34,102,114,97,109,101,34,44,32,99,117,114,114,101,110,116,70,114,97,109,101,58,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,99,117,114,114,101,110,116,70,114,97,109,101,40,41,32,125,41,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,114,101,110,100,101,114,40,41,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,32,116,121,112,101,58,32,34,115,116,111,112,34,32,125,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,125,10,32,32,32,32,115,101,116,70,114,97,109,101,40,102,114,97,109,101,41,32,123,10,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,32,61,61,61,32,110,117,108,108,41,32,114,101,116,117,114,110,59,10,32,32,32,32,32,32,105,102,32,40,102,114,97,109,101,32,60,32,48,32,124,124,32,102,114,97,109,101,32,62,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,116,111,116,97,108,70,114,97,109,101,115,40,41,41,32,114,101,116,117,114,110,59,10,32,32,32,32,32,32,99,111,110,115,116,32,111,107,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,101,107,40,102,114,97,109,101,41,59,10,32,32,32,32,32,32,105,102,32,40,111,107,41,32,123,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,32,116,121,112,101,58,32,34,102,114,97,109,101,34,44,32,99,117,114,114,101,110,116,70,114,97,109,101,58,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,99,117,114,114,101,110,116,70,114,97,109,101,40,41,32,125,41,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,114,101,110,100,101,114,40,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,125,10,32,32,32,32,115,101,116,83,112,101,101,100,40,115,112,101,101,100,41,32,123,10,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,32,61,61,61,32,110,117,108,108,41,32,114,101,116,117,114,110,59,10,32,32,32,32,32,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,67,111,110,102,105,103,40,95,95,115,112,114,101,97,100,80,114,111,112,115,40,95,95,115,112,114,101,97,100,86,97,108,117,101,115,40,123,125,44,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,99,111,110,102,105,103,40,41,41,44,32,123,10,32,32,32,32,32,32,32,32,115,112,101,101,100,10,32,32,32,32,32,32,125,41,41,59,10,32,32,32,32,125,10,32,32,32,32,115,101,116,66,97,99,107,103,114,111,117,110,100,67,111,108,111,114,40,99,111,108,111,114,41,32,123,10,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,32,61,61,61,32,110,117,108,108,41,32,114,101,116,117,114,110,59,10,32,32,32,32,32,32,105,102,32,40,73,83,95,66,82,79,87,83,69,82,32,38,38,32,116,104,105,115,46,95,99,97,110,118,97,115,32,105,110,115,116,97,110,99,101,111,102,32,72,84,77,76,67,97,110,118,97,115,69,108,101,109,101,110,116,41,32,123,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,99,97,110,118,97,115,46,115,116,121,108,101,46,98,97,99,107,103,114,111,117,110,100,67,111,108,111,114,32,61,32,99,111,108,111,114,59,10,32,32,32,32,32,32,125,32,101,108,115,101,32,123,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,67,111,110,102,105,103,40,95,95,115,112,114,101,97,100,80,114,111,112,115,40,95,95,115,112,114,101,97,100,86,97,108,117,101,115,40,123,125,44,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,99,111,110,102,105,103,40,41,41,44,32,123,10,32,32,32,32,32,32,32,32,32,32,98,97,99,107,103,114,111,117,110,100,67,111,108,111,114,58,32,104,101,120,83,116,114,105,110,103,84,111,82,71,66,65,73,110,116,40,99,111,108,111,114,41,10,32,32,32,32,32,32,32,32,125,41,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,116,104,105,115,46,95,98,97,99,107,103,114,111,117,110,100,67,111,108,111,114,32,61,32,99,111,108,111,114,59,10,32,32,32,32,125,10,32,32,32,32,115,101,116,76,111,111,112,40,108,111,111,112,41,32,123,10,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,32,61,61,61,32,110,117,108,108,41,32,114,101,116,117,114,110,59,10,32,32,32,32,32,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,67,111,110,102,105,103,40,95,95,115,112,114,101,97,100,80,114,111,112,115,40,95,95,115,112,114,101,97,100,86,97,108,117,101,115,40,123,125,44,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,99,111,110,102,105,103,40,41,41,44,32,123,10,32,32,32,32,32,32,32,32,108,111,111,112,65,110,105,109,97,116,105,111,110,58,32,108,111,111,112,10,32,32,32,32,32,32,125,41,41,59,10,32,32,32,32,125,10,32,32,32,32,115,101,116,85,115,101,70,114,97,109,101,73,110,116,101,114,112,111,108,97,116,105,111,110,40,117,115,101,70,114,97,109,101,73,110,116,101,114,112,111,108,97,116,105,111,110,41,32,123,10,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,32,61,61,61,32,110,117,108,108,41,32,114,101,116,117,114,110,59,10,32,32,32,32,32,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,67,111,110,102,105,103,40,95,95,115,112,114,101,97,100,80,114,111,112,115,40,95,95,115,112,114,101,97,100,86,97,108,117,101,115,40,123,125,44,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,99,111,110,102,105,103,40,41,41,44,32,123,10,32,32,32,32,32,32,32,32,117,115,101,70,114,97,109,101,73,110,116,101,114,112,111,108,97,116,105,111,110,10,32,32,32,32,32,32,125,41,41,59,10,32,32,32,32,125,10,32,32,32,32,97,100,100,69,118,101,110,116,76,105,115,116,101,110,101,114,40,116,121,112,101,44,32,108,105,115,116,101,110,101,114,41,32,123,10,32,32,32,32,32,32,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,97,100,100,69,118,101,110,116,76,105,115,116,101,110,101,114,40,116,121,112,101,44,32,108,105,115,116,101,110,101,114,41,59,10,32,32,32,32,125,10,32,32,32,32,114,101,109,111,118,101,69,118,101,110,116,76,105,115,116,101,110,101,114,40,116,121,112,101,44,32,108,105,115,116,101,110,101,114,41,32,123,10,32,32,32,32,32,32,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,114,101,109,111,118,101,69,118,101,110,116,76,105,115,116,101,110,101,114,40,116,121,112,101,44,32,108,105,115,116,101,110,101,114,41,59,10,32,32,32,32,125,10,32,32,32,32,100,101,115,116,114,111,121,40,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,59,10,32,32,32,32,32,32,105,102,32,40,73,83,95,66,82,79,87,83,69,82,32,38,38,32,116,104,105,115,46,95,99,97,110,118,97,115,32,105,110,115,116,97,110,99,101,111,102,32,72,84,77,76,67,97,110,118,97,115,69,108,101,109,101,110,116,41,32,123,10,32,32,32,32,32,32,32,32,79,102,102,115,99,114,101,101,110,79,98,115,101,114,118,101,114,46,117,110,111,98,115,101,114,118,101,40,116,104,105,115,46,95,99,97,110,118,97,115,41,59,10,32,32,32,32,32,32,32,32,67,97,110,118,97,115,82,101,115,105,122,101,79,98,115,101,114,118,101,114,46,117,110,111,98,115,101,114,118,101,40,116,104,105,115,46,95,99,97,110,118,97,115,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,100,101,108,101,116,101,40,41,59,10,32,32,32,32,32,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,32,61,32,110,117,108,108,59,10,32,32,32,32,32,32,116,104,105,115,46,95,99,111,110,116,101,120,116,32,61,32,110,117,108,108,59,10,32,32,32,32,32,32,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,10,32,32,32,32,32,32,32,32,116,121,112,101,58,32,34,100,101,115,116,114,111,121,34,10,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,114,101,109,111,118,101,65,108,108,69,118,101,110,116,76,105,115,116,101,110,101,114,115,40,41,59,10,32,32,32,32,32,32,116,104,105,115,46,95,99,108,101,97,110,117,112,83,116,97,116,101,77,97,99,104,105,110,101,76,105,115,116,101,110,101,114,115,40,41,59,10,32,32,32,32,125,10,32,32,32,32,102,114,101,101,122,101,40,41,32,123,10,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,97,110,105,109,97,116,105,111,110,70,114,97,109,101,73,100,32,61,61,61,32,110,117,108,108,41,32,114,101,116,117,114,110,59,10,32,32,32,32,32,32,116,104,105,115,46,95,102,114,97,109,101,77,97,110,97,103,101,114,46,99,97,110,99,101,108,65,110,105,109,97,116,105,111,110,70,114,97,109,101,40,116,104,105,115,46,95,97,110,105,109,97,116,105,111,110,70,114,97,109,101,73,100,41,59,10,32,32,32,32,32,32,116,104,105,115,46,95,97,110,105,109,97,116,105,111,110,70,114,97,109,101,73,100,32,61,32,110,117,108,108,59,10,32,32,32,32,32,32,116,104,105,115,46,95,105,115,70,114,111,122,101,110,32,61,32,116,114,117,101,59,10,32,32,32,32,32,32,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,32,116,121,112,101,58,32,34,102,114,101,101,122,101,34,32,125,41,59,10,32,32,32,32,125,10,32,32,32,32,117,110,102,114,101,101,122,101,40,41,32,123,10,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,97,110,105,109,97,116,105,111,110,70,114,97,109,101,73,100,32,33,61,61,32,110,117,108,108,41,32,114,101,116,117,114,110,59,10,32,32,32,32,32,32,116,104,105,115,46,95,97,110,105,109,97,116,105,111,110,70,114,97,109,101,73,100,32,61,32,116,104,105,115,46,95,102,114,97,109,101,77,97,110,97,103,101,114,46,114,101,113,117,101,115,116,65,110,105,109,97,116,105,111,110,70,114,97,109,101,40,116,104,105,115,46,95,100,114,97,119,46,98,105,110,100,40,116,104,105,115,41,41,59,10,32,32,32,32,32,32,116,104,105,115,46,95,105,115,70,114,111,122,101,110,32,61,32,102,97,108,115,101,59,10,32,32,32,32,32,32,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,32,116,121,112,101,58,32,34,117,110,102,114,101,101,122,101,34,32,125,41,59,10,32,32,32,32,125,10,32,32,32,32,114,101,115,105,122,101,40,41,32,123,10,32,32,32,32,32,32,105,102,32,40,33,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,32,124,124,32,33,116,104,105,115,46,105,115,76,111,97,100,101,100,41,32,114,101,116,117,114,110,59,10,32,32,32,32,32,32,105,102,32,40,73,83,95,66,82,79,87,83,69,82,32,38,38,32,116,104,105,115,46,95,99,97,110,118,97,115,32,105,110,115,116,97,110,99,101,111,102,32,72,84,77,76,67,97,110,118,97,115,69,108,101,109,101,110,116,41,32,123,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,100,112,114,32,61,32,116,104,105,115,46,95,114,101,110,100,101,114,67,111,110,102,105,103,46,100,101,118,105,99,101,80,105,120,101,108,82,97,116,105,111,32,124,124,32,119,105,110,100,111,119,46,100,101,118,105,99,101,80,105,120,101,108,82,97,116,105,111,32,124,124,32,49,59,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,123,32,104,101,105,103,104,116,58,32,99,108,105,101,110,116,72,101,105,103,104,116,44,32,119,105,100,116,104,58,32,99,108,105,101,110,116,87,105,100,116,104,32,125,32,61,32,116,104,105,115,46,95,99,97,110,118,97,115,46,103,101,116,66,111,117,110,100,105,110,103,67,108,105,101,110,116,82,101,99,116,40,41,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,99,97,110,118,97,115,46,119,105,100,116,104,32,61,32,99,108,105,101,110,116,87,105,100,116,104,32,42,32,100,112,114,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,99,97,110,118,97,115,46,104,101,105,103,104,116,32,61,32,99,108,105,101,110,116,72,101,105,103,104,116,32,42,32,100,112,114,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,99,111,110,115,116,32,111,107,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,114,101,115,105,122,101,40,116,104,105,115,46,95,99,97,110,118,97,115,46,119,105,100,116,104,44,32,116,104,105,115,46,95,99,97,110,118,97,115,46,104,101,105,103,104,116,41,59,10,32,32,32,32,32,32,105,102,32,40,111,107,41,32,123,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,114,101,110,100,101,114,40,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,125,10,32,32,32,32,115,101,116,83,101,103,109,101,110,116,40,115,116,97,114,116,70,114,97,109,101,44,32,101,110,100,70,114,97,109,101,41,32,123,10,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,32,61,61,61,32,110,117,108,108,32,124,124,32,95,68,111,116,76,111,116,116,105,101,46,95,119,97,115,109,77,111,100,117,108,101,32,61,61,61,32,110,117,108,108,41,32,114,101,116,117,114,110,59,10,32,32,32,32,32,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,67,111,110,102,105,103,40,95,95,115,112,114,101,97,100,80,114,111,112,115,40,95,95,115,112,114,101,97,100,86,97,108,117,101,115,40,123,125,44,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,99,111,110,102,105,103,40,41,41,44,32,123,10,32,32,32,32,32,32,32,32,115,101,103,109,101,110,116,58,32,99,114,101,97,116,101,67,111,114,101,83,101,103,109,101,110,116,40,91,115,116,97,114,116,70,114,97,109,101,44,32,101,110,100,70,114,97,109,101,93,44,32,95,68,111,116,76,111,116,116,105,101,46,95,119,97,115,109,77,111,100,117,108,101,41,10,32,32,32,32,32,32,125,41,41,59,10,32,32,32,32,125,10,32,32,32,32,115,101,116,77,111,100,101,40,109,111,100,101,41,32,123,10,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,32,61,61,61,32,110,117,108,108,32,124,124,32,95,68,111,116,76,111,116,116,105,101,46,95,119,97,115,109,77,111,100,117,108,101,32,61,61,61,32,110,117,108,108,41,32,114,101,116,117,114,110,59,10,32,32,32,32,32,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,67,111,110,102,105,103,40,95,95,115,112,114,101,97,100,80,114,111,112,115,40,95,95,115,112,114,101,97,100,86,97,108,117,101,115,40,123,125,44,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,99,111,110,102,105,103,40,41,41,44,32,123,10,32,32,32,32,32,32,32,32,109,111,100,101,58,32,99,114,101,97,116,101,67,111,114,101,77,111,100,101,40,109,111,100,101,44,32,95,68,111,116,76,111,116,116,105,101,46,95,119,97,115,109,77,111,100,117,108,101,41,10,32,32,32,32,32,32,125,41,41,59,10,32,32,32,32,125,10,32,32,32,32,115,101,116,82,101,110,100,101,114,67,111,110,102,105,103,40,99,111,110,102,105,103,41,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,95,97,32,61,32,99,111,110,102,105,103,44,32,123,32,100,101,118,105,99,101,80,105,120,101,108,82,97,116,105,111,44,32,102,114,101,101,122,101,79,110,79,102,102,115,99,114,101,101,110,32,125,32,61,32,95,97,44,32,114,101,115,116,67,111,110,102,105,103,32,61,32,95,95,111,98,106,82,101,115,116,40,95,97,44,32,91,34,100,101,118,105,99,101,80,105,120,101,108,82,97,116,105,111,34,44,32,34,102,114,101,101,122,101,79,110,79,102,102,115,99,114,101,101,110,34,93,41,59,10,32,32,32,32,32,32,116,104,105,115,46,95,114,101,110,100,101,114,67,111,110,102,105,103,32,61,32,95,95,115,112,114,101,97,100,80,114,111,112,115,40,95,95,115,112,114,101,97,100,86,97,108,117,101,115,40,95,95,115,112,114,101,97,100,86,97,108,117,101,115,40,123,125,44,32,116,104,105,115,46,95,114,101,110,100,101,114,67,111,110,102,105,103,41,44,32,114,101,115,116,67,111,110,102,105,103,41,44,32,123,10,32,32,32,32,32,32,32,32,47,47,32,100,101,118,105,99,101,80,105,120,101,108,82,97,116,105,111,32,105,115,32,97,32,115,112,101,99,105,97,108,32,99,97,115,101,44,32,105,116,32,115,104,111,117,108,100,32,98,101,32,115,101,116,32,116,111,32,116,104,101,32,100,101,102,97,117,108,116,32,118,97,108,117,101,32,105,102,32,105,116,39,115,32,110,111,116,32,112,114,111,118,105,100,101,100,10,32,32,32,32,32,32,32,32,100,101,118,105,99,101,80,105,120,101,108,82,97,116,105,111,58,32,100,101,118,105,99,101,80,105,120,101,108,82,97,116,105,111,32,124,124,32,103,101,116,68,101,102,97,117,108,116,68,80,82,40,41,44,10,32,32,32,32,32,32,32,32,102,114,101,101,122,101,79,110,79,102,102,115,99,114,101,101,110,58,32,102,114,101,101,122,101,79,110,79,102,102,115,99,114,101,101,110,32,33,61,32,110,117,108,108,32,63,32,102,114,101,101,122,101,79,110,79,102,102,115,99,114,101,101,110,32,58,32,116,114,117,101,10,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,105,102,32,40,73,83,95,66,82,79,87,83,69,82,32,38,38,32,116,104,105,115,46,95,99,97,110,118,97,115,32,105,110,115,116,97,110,99,101,111,102,32,72,84,77,76,67,97,110,118,97,115,69,108,101,109,101,110,116,41,32,123,10,32,32,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,114,101,110,100,101,114,67,111,110,102,105,103,46,97,117,116,111,82,101,115,105,122,101,41,32,123,10,32,32,32,32,32,32,32,32,32,32,67,97,110,118,97,115,82,101,115,105,122,101,79,98,115,101,114,118,101,114,46,111,98,115,101,114,118,101,40,116,104,105,115,46,95,99,97,110,118,97,115,44,32,116,104,105,115,41,59,10,32,32,32,32,32,32,32,32,125,32,101,108,115,101,32,123,10,32,32,32,32,32,32,32,32,32,32,67,97,110,118,97,115,82,101,115,105,122,101,79,98,115,101,114,118,101,114,46,117,110,111,98,115,101,114,118,101,40,116,104,105,115,46,95,99,97,110,118,97,115,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,114,101,110,100,101,114,67,111,110,102,105,103,46,102,114,101,101,122,101,79,110,79,102,102,115,99,114,101,101,110,41,32,123,10,32,32,32,32,32,32,32,32,32,32,79,102,102,115,99,114,101,101,110,79,98,115,101,114,118,101,114,46,111,98,115,101,114,118,101,40,116,104,105,115,46,95,99,97,110,118,97,115,44,32,116,104,105,115,41,59,10,32,32,32,32,32,32,32,32,125,32,101,108,115,101,32,123,10,32,32,32,32,32,32,32,32,32,32,79,102,102,115,99,114,101,101,110,79,98,115,101,114,118,101,114,46,117,110,111,98,115,101,114,118,101,40,116,104,105,115,46,95,99,97,110,118,97,115,41,59,10,32,32,32,32,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,105,115,70,114,111,122,101,110,41,32,123,10,32,32,32,32,32,32,32,32,32,32,32,32,116,104,105,115,46,117,110,102,114,101,101,122,101,40,41,59,10,32,32,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,10,32,32,32,32,125,10,32,32,32,32,108,111,97,100,65,110,105,109,97,116,105,111,110,40,97,110,105,109,97,116,105,111,110,73,100,41,32,123,10,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,32,61,61,61,32,110,117,108,108,32,124,124,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,97,99,116,105,118,101,65,110,105,109,97,116,105,111,110,73,100,40,41,32,61,61,61,32,97,110,105,109,97,116,105,111,110,73,100,41,32,114,101,116,117,114,110,59,10,32,32,32,32,32,32,99,111,110,115,116,32,108,111,97,100,101,100,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,108,111,97,100,65,110,105,109,97,116,105,111,110,40,97,110,105,109,97,116,105,111,110,73,100,44,32,116,104,105,115,46,95,99,97,110,118,97,115,46,119,105,100,116,104,44,32,116,104,105,115,46,95,99,97,110,118,97,115,46,104,101,105,103,104,116,41,59,10,32,32,32,32,32,32,105,102,32,40,108,111,97,100,101,100,41,32,123,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,32,116,121,112,101,58,32,34,108,111,97,100,34,32,125,41,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,114,101,115,105,122,101,40,41,59,10,32,32,32,32,32,32,125,32,101,108,115,101,32,123,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,101,118,101,110,116,77,97,110,97,103,101,114,46,100,105,115,112,97,116,99,104,40,123,10,32,32,32,32,32,32,32,32,32,32,116,121,112,101,58,32,34,108,111,97,100,69,114,114,111,114,34,44,10,32,32,32,32,32,32,32,32,32,32,101,114,114,111,114,58,32,110,101,119,32,69,114,114,111,114,40,96,70,97,105,108,101,100,32,116,111,32,97,110,105,109,97,116,105,111,110,32,58,36,123,97,110,105,109,97,116,105,111,110,73,100,125,96,41,10,32,32,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,125,10,32,32,32,32,115,101,116,77,97,114,107,101,114,40,109,97,114,107,101,114,41,32,123,10,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,32,61,61,61,32,110,117,108,108,41,32,114,101,116,117,114,110,59,10,32,32,32,32,32,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,67,111,110,102,105,103,40,95,95,115,112,114,101,97,100,80,114,111,112,115,40,95,95,115,112,114,101,97,100,86,97,108,117,101,115,40,123,125,44,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,99,111,110,102,105,103,40,41,41,44,32,123,10,32,32,32,32,32,32,32,32,109,97,114,107,101,114,10,32,32,32,32,32,32,125,41,41,59,10,32,32,32,32,125,10,32,32,32,32,109,97,114,107,101,114,115,40,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,59,10,32,32,32,32,32,32,99,111,110,115,116,32,109,97,114,107,101,114,115,32,61,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,109,97,114,107,101,114,115,40,41,59,10,32,32,32,32,32,32,105,102,32,40,109,97,114,107,101,114,115,41,32,123,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,114,101,115,117,108,116,32,61,32,91,93,59,10,32,32,32,32,32,32,32,32,102,111,114,32,40,108,101,116,32,105,32,61,32,48,59,32,105,32,60,32,109,97,114,107,101,114,115,46,115,105,122,101,40,41,59,32,105,32,43,61,32,49,41,32,123,10,32,32,32,32,32,32,32,32,32,32,99,111,110,115,116,32,109,97,114,107,101,114,32,61,32,109,97,114,107,101,114,115,46,103,101,116,40,105,41,59,10,32,32,32,32,32,32,32,32,32,32,114,101,115,117,108,116,46,112,117,115,104,40,123,10,32,32,32,32,32,32,32,32,32,32,32,32,110,97,109,101,58,32,109,97,114,107,101,114,46,110,97,109,101,44,10,32,32,32,32,32,32,32,32,32,32,32,32,116,105,109,101,58,32,109,97,114,107,101,114,46,116,105,109,101,44,10,32,32,32,32,32,32,32,32,32,32,32,32,100,117,114,97,116,105,111,110,58,32,109,97,114,107,101,114,46,100,117,114,97,116,105,111,110,10,32,32,32,32,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,114,101,116,117,114,110,32,114,101,115,117,108,116,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,114,101,116,117,114,110,32,91,93,59,10,32,32,32,32,125,10,32,32,32,32,108,111,97,100,84,104,101,109,101,40,116,104,101,109,101,73,100,41,32,123,10,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,32,61,61,61,32,110,117,108,108,41,32,114,101,116,117,114,110,32,102,97,108,115,101,59,10,32,32,32,32,32,32,99,111,110,115,116,32,108,111,97,100,101,100,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,108,111,97,100,84,104,101,109,101,40,116,104,101,109,101,73,100,41,59,10,32,32,32,32,32,32,116,104,105,115,46,95,114,101,110,100,101,114,40,41,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,108,111,97,100,101,100,59,10,32,32,32,32,125,10,32,32,32,32,108,111,97,100,84,104,101,109,101,68,97,116,97,40,116,104,101,109,101,68,97,116,97,41,32,123,10,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,32,61,61,61,32,110,117,108,108,41,32,114,101,116,117,114,110,32,102,97,108,115,101,59,10,32,32,32,32,32,32,99,111,110,115,116,32,108,111,97,100,101,100,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,108,111,97,100,84,104,101,109,101,68,97,116,97,40,116,104,101,109,101,68,97,116,97,41,59,10,32,32,32,32,32,32,116,104,105,115,46,95,114,101,110,100,101,114,40,41,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,108,111,97,100,101,100,59,10,32,32,32,32,125,10,32,32,32,32,115,101,116,76,97,121,111,117,116,40,108,97,121,111,117,116,41,32,123,10,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,32,61,61,61,32,110,117,108,108,32,124,124,32,95,68,111,116,76,111,116,116,105,101,46,95,119,97,115,109,77,111,100,117,108,101,32,61,61,61,32,110,117,108,108,41,32,114,101,116,117,114,110,59,10,32,32,32,32,32,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,67,111,110,102,105,103,40,95,95,115,112,114,101,97,100,80,114,111,112,115,40,95,95,115,112,114,101,97,100,86,97,108,117,101,115,40,123,125,44,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,99,111,110,102,105,103,40,41,41,44,32,123,10,32,32,32,32,32,32,32,32,108,97,121,111,117,116,58,32,123,10,32,32,32,32,32,32,32,32,32,32,97,108,105,103,110,58,32,99,114,101,97,116,101,67,111,114,101,65,108,105,103,110,40,108,97,121,111,117,116,46,97,108,105,103,110,44,32,95,68,111,116,76,111,116,116,105,101,46,95,119,97,115,109,77,111,100,117,108,101,41,44,10,32,32,32,32,32,32,32,32,32,32,102,105,116,58,32,99,114,101,97,116,101,67,111,114,101,70,105,116,40,108,97,121,111,117,116,46,102,105,116,44,32,95,68,111,116,76,111,116,116,105,101,46,95,119,97,115,109,77,111,100,117,108,101,41,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,41,41,59,10,32,32,32,32,125,10,32,32,32,32,115,101,116,86,105,101,119,112,111,114,116,40,120,44,32,121,44,32,119,105,100,116,104,44,32,104,101,105,103,104,116,41,32,123,10,32,32,32,32,32,32,105,102,32,40,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,32,61,61,61,32,110,117,108,108,41,32,114,101,116,117,114,110,32,102,97,108,115,101,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,101,116,86,105,101,119,112,111,114,116,40,120,44,32,121,44,32,119,105,100,116,104,44,32,104,101,105,103,104,116,41,59,10,32,32,32,32,125,10,32,32,32,32,115,116,97,116,105,99,32,115,101,116,87,97,115,109,85,114,108,40,117,114,108,41,32,123,10,32,32,32,32,32,32,68,111,116,76,111,116,116,105,101,87,97,115,109,76,111,97,100,101,114,46,115,101,116,87,97,115,109,85,114,108,40,117,114,108,41,59,10,32,32,32,32,125,10,32,32,32,32,108,111,97,100,83,116,97,116,101,77,97,99,104,105,110,101,40,115,116,97,116,101,77,97,99,104,105,110,101,73,100,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,44,32,95,98,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,40,95,98,32,61,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,108,111,97,100,83,116,97,116,101,77,97,99,104,105,110,101,40,115,116,97,116,101,77,97,99,104,105,110,101,73,100,41,41,32,33,61,32,110,117,108,108,32,63,32,95,98,32,58,32,102,97,108,115,101,59,10,32,32,32,32,125,10,32,32,32,32,115,116,97,114,116,83,116,97,116,101,77,97,99,104,105,110,101,40,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,44,32,95,98,59,10,32,32,32,32,32,32,99,111,110,115,116,32,115,116,97,114,116,101,100,32,61,32,40,95,98,32,61,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,115,116,97,114,116,83,116,97,116,101,77,97,99,104,105,110,101,40,41,41,32,33,61,32,110,117,108,108,32,63,32,95,98,32,58,32,102,97,108,115,101,59,10,32,32,32,32,32,32,105,102,32,40,115,116,97,114,116,101,100,41,32,123,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,115,101,116,117,112,83,116,97,116,101,77,97,99,104,105,110,101,76,105,115,116,101,110,101,114,115,40,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,114,101,116,117,114,110,32,115,116,97,114,116,101,100,59,10,32,32,32,32,125,10,32,32,32,32,115,116,111,112,83,116,97,116,101,77,97,99,104,105,110,101,40,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,44,32,95,98,59,10,32,32,32,32,32,32,99,111,110,115,116,32,115,116,111,112,112,101,100,32,61,32,40,95,98,32,61,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,115,116,111,112,83,116,97,116,101,77,97,99,104,105,110,101,40,41,41,32,33,61,32,110,117,108,108,32,63,32,95,98,32,58,32,102,97,108,115,101,59,10,32,32,32,32,32,32,105,102,32,40,115,116,111,112,112,101,100,41,32,123,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,99,108,101,97,110,117,112,83,116,97,116,101,77,97,99,104,105,110,101,76,105,115,116,101,110,101,114,115,40,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,114,101,116,117,114,110,32,115,116,111,112,112,101,100,59,10,32,32,32,32,125,10,32,32,32,32,95,103,101,116,80,111,105,110,116,101,114,80,111,115,105,116,105,111,110,40,101,118,101,110,116,41,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,114,101,99,116,32,61,32,116,104,105,115,46,95,99,97,110,118,97,115,46,103,101,116,66,111,117,110,100,105,110,103,67,108,105,101,110,116,82,101,99,116,40,41,59,10,32,32,32,32,32,32,99,111,110,115,116,32,115,99,97,108,101,88,32,61,32,116,104,105,115,46,95,99,97,110,118,97,115,46,119,105,100,116,104,32,47,32,114,101,99,116,46,119,105,100,116,104,59,10,32,32,32,32,32,32,99,111,110,115,116,32,115,99,97,108,101,89,32,61,32,116,104,105,115,46,95,99,97,110,118,97,115,46,104,101,105,103,104,116,32,47,32,114,101,99,116,46,104,101,105,103,104,116,59,10,32,32,32,32,32,32,99,111,110,115,116,32,100,101,118,105,99,101,80,105,120,101,108,82,97,116,105,111,32,61,32,116,104,105,115,46,95,114,101,110,100,101,114,67,111,110,102,105,103,46,100,101,118,105,99,101,80,105,120,101,108,82,97,116,105,111,32,124,124,32,119,105,110,100,111,119,46,100,101,118,105,99,101,80,105,120,101,108,82,97,116,105,111,32,124,124,32,49,59,10,32,32,32,32,32,32,99,111,110,115,116,32,120,32,61,32,40,101,118,101,110,116,46,99,108,105,101,110,116,88,32,45,32,114,101,99,116,46,108,101,102,116,41,32,42,32,115,99,97,108,101,88,32,47,32,100,101,118,105,99,101,80,105,120,101,108,82,97,116,105,111,59,10,32,32,32,32,32,32,99,111,110,115,116,32,121,32,61,32,40,101,118,101,110,116,46,99,108,105,101,110,116,89,32,45,32,114,101,99,116,46,116,111,112,41,32,42,32,115,99,97,108,101,89,32,47,32,100,101,118,105,99,101,80,105,120,101,108,82,97,116,105,111,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,123,10,32,32,32,32,32,32,32,32,120,44,10,32,32,32,32,32,32,32,32,121,10,32,32,32,32,32,32,125,59,10,32,32,32,32,125,10,32,32,32,32,95,111,110,80,111,105,110,116,101,114,85,112,40,101,118,101,110,116,41,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,123,32,120,44,32,121,32,125,32,61,32,116,104,105,115,46,95,103,101,116,80,111,105,110,116,101,114,80,111,115,105,116,105,111,110,40,101,118,101,110,116,41,59,10,32,32,32,32,32,32,116,104,105,115,46,112,111,115,116,80,111,105,110,116,101,114,85,112,69,118,101,110,116,40,120,44,32,121,41,59,10,32,32,32,32,125,10,32,32,32,32,95,111,110,80,111,105,110,116,101,114,68,111,119,110,40,101,118,101,110,116,41,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,123,32,120,44,32,121,32,125,32,61,32,116,104,105,115,46,95,103,101,116,80,111,105,110,116,101,114,80,111,115,105,116,105,111,110,40,101,118,101,110,116,41,59,10,32,32,32,32,32,32,116,104,105,115,46,112,111,115,116,80,111,105,110,116,101,114,68,111,119,110,69,118,101,110,116,40,120,44,32,121,41,59,10,32,32,32,32,125,10,32,32,32,32,95,111,110,80,111,105,110,116,101,114,77,111,118,101,40,101,118,101,110,116,41,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,123,32,120,44,32,121,32,125,32,61,32,116,104,105,115,46,95,103,101,116,80,111,105,110,116,101,114,80,111,115,105,116,105,111,110,40,101,118,101,110,116,41,59,10,32,32,32,32,32,32,116,104,105,115,46,112,111,115,116,80,111,105,110,116,101,114,77,111,118,101,69,118,101,110,116,40,120,44,32,121,41,59,10,32,32,32,32,125,10,32,32,32,32,95,111,110,80,111,105,110,116,101,114,69,110,116,101,114,40,101,118,101,110,116,41,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,123,32,120,44,32,121,32,125,32,61,32,116,104,105,115,46,95,103,101,116,80,111,105,110,116,101,114,80,111,115,105,116,105,111,110,40,101,118,101,110,116,41,59,10,32,32,32,32,32,32,116,104,105,115,46,112,111,115,116,80,111,105,110,116,101,114,69,110,116,101,114,69,118,101,110,116,40,120,44,32,121,41,59,10,32,32,32,32,125,10,32,32,32,32,95,111,110,80,111,105,110,116,101,114,76,101,97,118,101,40,101,118,101,110,116,41,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,123,32,120,44,32,121,32,125,32,61,32,116,104,105,115,46,95,103,101,116,80,111,105,110,116,101,114,80,111,115,105,116,105,111,110,40,101,118,101,110,116,41,59,10,32,32,32,32,32,32,116,104,105,115,46,112,111,115,116,80,111,105,110,116,101,114,69,120,105,116,69,118,101,110,116,40,120,44,32,121,41,59,10,32,32,32,32,125,10,32,32,32,32,112,111,115,116,80,111,105,110,116,101,114,85,112,69,118,101,110,116,40,120,44,32,121,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,112,111,115,116,80,111,105,110,116,101,114,85,112,69,118,101,110,116,40,120,44,32,121,41,59,10,32,32,32,32,125,10,32,32,32,32,112,111,115,116,80,111,105,110,116,101,114,68,111,119,110,69,118,101,110,116,40,120,44,32,121,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,112,111,115,116,80,111,105,110,116,101,114,68,111,119,110,69,118,101,110,116,40,120,44,32,121,41,59,10,32,32,32,32,125,10,32,32,32,32,112,111,115,116,80,111,105,110,116,101,114,77,111,118,101,69,118,101,110,116,40,120,44,32,121,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,112,111,115,116,80,111,105,110,116,101,114,77,111,118,101,69,118,101,110,116,40,120,44,32,121,41,59,10,32,32,32,32,125,10,32,32,32,32,112,111,115,116,80,111,105,110,116,101,114,69,110,116,101,114,69,118,101,110,116,40,120,44,32,121,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,112,111,115,116,80,111,105,110,116,101,114,69,110,116,101,114,69,118,101,110,116,40,120,44,32,121,41,59,10,32,32,32,32,125,10,32,32,32,32,112,111,115,116,80,111,105,110,116,101,114,69,120,105,116,69,118,101,110,116,40,120,44,32,121,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,112,111,115,116,80,111,105,110,116,101,114,69,120,105,116,69,118,101,110,116,40,120,44,32,121,41,59,10,32,32,32,32,125,10,32,32,32,32,103,101,116,83,116,97,116,101,77,97,99,104,105,110,101,76,105,115,116,101,110,101,114,115,40,41,32,123,10,32,32,32,32,32,32,105,102,32,40,33,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,114,101,116,117,114,110,32,91,93,59,10,32,32,32,32,32,32,99,111,110,115,116,32,108,105,115,116,101,110,101,114,115,86,101,99,116,111,114,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,46,115,116,97,116,101,77,97,99,104,105,110,101,70,114,97,109,101,119,111,114,107,83,101,116,117,112,40,41,59,10,32,32,32,32,32,32,99,111,110,115,116,32,108,105,115,116,101,110,101,114,115,32,61,32,91,93,59,10,32,32,32,32,32,32,102,111,114,32,40,108,101,116,32,105,32,61,32,48,59,32,105,32,60,32,108,105,115,116,101,110,101,114,115,86,101,99,116,111,114,46,115,105,122,101,40,41,59,32,105,32,43,61,32,49,41,32,123,10,32,32,32,32,32,32,32,32,108,105,115,116,101,110,101,114,115,46,112,117,115,104,40,108,105,115,116,101,110,101,114,115,86,101,99,116,111,114,46,103,101,116,40,105,41,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,114,101,116,117,114,110,32,108,105,115,116,101,110,101,114,115,59,10,32,32,32,32,125,10,32,32,32,32,95,115,101,116,117,112,83,116,97,116,101,77,97,99,104,105,110,101,76,105,115,116,101,110,101,114,115,40,41,32,123,10,32,32,32,32,32,32,105,102,32,40,73,83,95,66,82,79,87,83,69,82,32,38,38,32,116,104,105,115,46,95,99,97,110,118,97,115,32,105,110,115,116,97,110,99,101,111,102,32,72,84,77,76,67,97,110,118,97,115,69,108,101,109,101,110,116,32,38,38,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,32,33,61,61,32,110,117,108,108,32,38,38,32,116,104,105,115,46,105,115,76,111,97,100,101,100,41,32,123,10,32,32,32,32,32,32,32,32,99,111,110,115,116,32,108,105,115,116,101,110,101,114,115,32,61,32,116,104,105,115,46,103,101,116,83,116,97,116,101,77,97,99,104,105,110,101,76,105,115,116,101,110,101,114,115,40,41,59,10,32,32,32,32,32,32,32,32,105,102,32,40,108,105,115,116,101,110,101,114,115,46,105,110,99,108,117,100,101,115,40,34,80,111,105,110,116,101,114,85,112,34,41,41,32,123,10,32,32,32,32,32,32,32,32,32,32,116,104,105,115,46,95,99,97,110,118,97,115,46,97,100,100,69,118,101,110,116,76,105,115,116,101,110,101,114,40,34,112,111,105,110,116,101,114,117,112,34,44,32,116,104,105,115,46,95,112,111,105,110,116,101,114,85,112,77,101,116,104,111,100,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,105,102,32,40,108,105,115,116,101,110,101,114,115,46,105,110,99,108,117,100,101,115,40,34,80,111,105,110,116,101,114,68,111,119,110,34,41,41,32,123,10,32,32,32,32,32,32,32,32,32,32,116,104,105,115,46,95,99,97,110,118,97,115,46,97,100,100,69,118,101,110,116,76,105,115,116,101,110,101,114,40,34,112,111,105,110,116,101,114,100,111,119,110,34,44,32,116,104,105,115,46,95,112,111,105,110,116,101,114,68,111,119,110,77,101,116,104,111,100,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,105,102,32,40,108,105,115,116,101,110,101,114,115,46,105,110,99,108,117,100,101,115,40,34,80,111,105,110,116,101,114,77,111,118,101,34,41,41,32,123,10,32,32,32,32,32,32,32,32,32,32,116,104,105,115,46,95,99,97,110,118,97,115,46,97,100,100,69,118,101,110,116,76,105,115,116,101,110,101,114,40,34,112,111,105,110,116,101,114,109,111,118,101,34,44,32,116,104,105,115,46,95,112,111,105,110,116,101,114,77,111,118,101,77,101,116,104,111,100,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,105,102,32,40,108,105,115,116,101,110,101,114,115,46,105,110,99,108,117,100,101,115,40,34,80,111,105,110,116,101,114,69,110,116,101,114,34,41,41,32,123,10,32,32,32,32,32,32,32,32,32,32,116,104,105,115,46,95,99,97,110,118,97,115,46,97,100,100,69,118,101,110,116,76,105,115,116,101,110,101,114,40,34,112,111,105,110,116,101,114,101,110,116,101,114,34,44,32,116,104,105,115,46,95,112,111,105,110,116,101,114,69,110,116,101,114,77,101,116,104,111,100,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,32,32,105,102,32,40,108,105,115,116,101,110,101,114,115,46,105,110,99,108,117,100,101,115,40,34,80,111,105,110,116,101,114,69,120,105,116,34,41,41,32,123,10,32,32,32,32,32,32,32,32,32,32,116,104,105,115,46,95,99,97,110,118,97,115,46,97,100,100,69,118,101,110,116,76,105,115,116,101,110,101,114,40,34,112,111,105,110,116,101,114,108,101,97,118,101,34,44,32,116,104,105,115,46,95,112,111,105,110,116,101,114,69,120,105,116,77,101,116,104,111,100,41,59,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,10,32,32,32,32,125,10,32,32,32,32,95,99,108,101,97,110,117,112,83,116,97,116,101,77,97,99,104,105,110,101,76,105,115,116,101,110,101,114,115,40,41,32,123,10,32,32,32,32,32,32,105,102,32,40,73,83,95,66,82,79,87,83,69,82,32,38,38,32,116,104,105,115,46,95,99,97,110,118,97,115,32,105,110,115,116,97,110,99,101,111,102,32,72,84,77,76,67,97,110,118,97,115,69,108,101,109,101,110,116,41,32,123,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,99,97,110,118,97,115,46,114,101,109,111,118,101,69,118,101,110,116,76,105,115,116,101,110,101,114,40,34,112,111,105,110,116,101,114,117,112,34,44,32,116,104,105,115,46,95,112,111,105,110,116,101,114,85,112,77,101,116,104,111,100,41,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,99,97,110,118,97,115,46,114,101,109,111,118,101,69,118,101,110,116,76,105,115,116,101,110,101,114,40,34,112,111,105,110,116,101,114,100,111,119,110,34,44,32,116,104,105,115,46,95,112,111,105,110,116,101,114,68,111,119,110,77,101,116,104,111,100,41,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,99,97,110,118,97,115,46,114,101,109,111,118,101,69,118,101,110,116,76,105,115,116,101,110,101,114,40,34,112,111,105,110,116,101,114,109,111,118,101,34,44,32,116,104,105,115,46,95,112,111,105,110,116,101,114,77,111,118,101,77,101,116,104,111,100,41,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,99,97,110,118,97,115,46,114,101,109,111,118,101,69,118,101,110,116,76,105,115,116,101,110,101,114,40,34,112,111,105,110,116,101,114,101,110,116,101,114,34,44,32,116,104,105,115,46,95,112,111,105,110,116,101,114,69,110,116,101,114,77,101,116,104,111,100,41,59,10,32,32,32,32,32,32,32,32,116,104,105,115,46,95,99,97,110,118,97,115,46,114,101,109,111,118,101,69,118,101,110,116,76,105,115,116,101,110,101,114,40,34,112,111,105,110,116,101,114,108,101,97,118,101,34,44,32,116,104,105,115,46,95,112,111,105,110,116,101,114,69,120,105,116,77,101,116,104,111,100,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,125,10,32,32,32,32,108,111,97,100,83,116,97,116,101,77,97,99,104,105,110,101,68,97,116,97,40,115,116,97,116,101,77,97,99,104,105,110,101,68,97,116,97,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,44,32,95,98,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,40,95,98,32,61,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,108,111,97,100,83,116,97,116,101,77,97,99,104,105,110,101,68,97,116,97,40,115,116,97,116,101,77,97,99,104,105,110,101,68,97,116,97,41,41,32,33,61,32,110,117,108,108,32,63,32,95,98,32,58,32,102,97,108,115,101,59,10,32,32,32,32,125,10,32,32,32,32,97,110,105,109,97,116,105,111,110,83,105,122,101,40,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,44,32,95,98,44,32,95,99,44,32,95,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,119,105,100,116,104,32,61,32,40,95,98,32,61,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,97,110,105,109,97,116,105,111,110,83,105,122,101,40,41,46,103,101,116,40,48,41,41,32,33,61,32,110,117,108,108,32,63,32,95,98,32,58,32,48,59,10,32,32,32,32,32,32,99,111,110,115,116,32,104,101,105,103,104,116,32,61,32,40,95,100,32,61,32,40,95,99,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,99,46,97,110,105,109,97,116,105,111,110,83,105,122,101,40,41,46,103,101,116,40,49,41,41,32,33,61,32,110,117,108,108,32,63,32,95,100,32,58,32,48,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,123,10,32,32,32,32,32,32,32,32,119,105,100,116,104,44,10,32,32,32,32,32,32,32,32,104,101,105,103,104,116,10,32,32,32,32,32,32,125,59,10,32,32,32,32,125,10,32,32,32,32,115,101,116,83,116,97,116,101,77,97,99,104,105,110,101,66,111,111,108,101,97,110,67,111,110,116,101,120,116,40,110,97,109,101,44,32,118,97,108,117,101,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,44,32,95,98,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,40,95,98,32,61,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,115,101,116,83,116,97,116,101,77,97,99,104,105,110,101,66,111,111,108,101,97,110,67,111,110,116,101,120,116,40,110,97,109,101,44,32,118,97,108,117,101,41,41,32,33,61,32,110,117,108,108,32,63,32,95,98,32,58,32,102,97,108,115,101,59,10,32,32,32,32,125,10,32,32,32,32,115,101,116,83,116,97,116,101,77,97,99,104,105,110,101,78,117,109,101,114,105,99,67,111,110,116,101,120,116,40,110,97,109,101,44,32,118,97,108,117,101,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,44,32,95,98,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,40,95,98,32,61,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,115,101,116,83,116,97,116,101,77,97,99,104,105,110,101,78,117,109,101,114,105,99,67,111,110,116,101,120,116,40,110,97,109,101,44,32,118,97,108,117,101,41,41,32,33,61,32,110,117,108,108,32,63,32,95,98,32,58,32,102,97,108,115,101,59,10,32,32,32,32,125,10,32,32,32,32,115,101,116,83,116,97,116,101,77,97,99,104,105,110,101,83,116,114,105,110,103,67,111,110,116,101,120,116,40,110,97,109,101,44,32,118,97,108,117,101,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,44,32,95,98,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,40,95,98,32,61,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,115,101,116,83,116,97,116,101,77,97,99,104,105,110,101,83,116,114,105,110,103,67,111,110,116,101,120,116,40,110,97,109,101,44,32,118,97,108,117,101,41,41,32,33,61,32,110,117,108,108,32,63,32,95,98,32,58,32,102,97,108,115,101,59,10,32,32,32,32,125,10,32,32,32,32,47,42,42,10,32,32,32,32,32,42,32,71,101,116,32,116,104,101,32,98,111,117,110,100,115,32,111,102,32,97,32,108,97,121,101,114,32,98,121,32,105,116,115,32,110,97,109,101,10,32,32,32,32,32,42,32,64,112,97,114,97,109,32,108,97,121,101,114,78,97,109,101,32,45,32,84,104,101,32,110,97,109,101,32,111,102,32,116,104,101,32,108,97,121,101,114,10,32,32,32,32,32,42,32,64,114,101,116,117,114,110,115,32,84,104,101,32,98,111,117,110,100,115,32,111,102,32,116,104,101,32,108,97,121,101,114,10,32,32,32,32,32,42,10,32,32,32,32,32,42,32,64,101,120,97,109,112,108,101,10,32,32,32,32,32,42,32,96,96,96,116,121,112,101,115,99,114,105,112,116,10,32,32,32,32,32,42,32,47,47,32,68,114,97,119,32,97,32,114,101,99,116,97,110,103,108,101,32,97,114,111,117,110,100,32,116,104,101,32,108,97,121,101,114,32,39,76,97,121,101,114,32,49,39,10,32,32,32,32,32,42,32,100,111,116,76,111,116,116,105,101,46,97,100,100,69,118,101,110,116,76,105,115,116,101,110,101,114,40,39,114,101,110,100,101,114,39,44,32,40,41,32,61,62,32,123,10,32,32,32,32,32,42,32,32,32,99,111,110,115,116,32,98,111,117,110,100,105,110,103,66,111,120,32,61,32,100,111,116,76,111,116,116,105,101,46,103,101,116,76,97,121,101,114,66,111,117,110,100,105,110,103,66,111,120,40,39,76,97,121,101,114,32,49,39,41,59,10,32,32,32,32,32,42,10,32,32,32,32,32,42,32,32,32,105,102,32,40,98,111,117,110,100,105,110,103,66,111,120,41,32,123,10,32,32,32,32,32,42,32,32,32,32,32,99,111,110,115,116,32,123,32,120,44,32,121,44,32,119,105,100,116,104,44,32,104,101,105,103,104,116,32,125,32,61,32,98,111,117,110,100,105,110,103,66,111,120,59,10,32,32,32,32,32,42,32,32,32,32,32,99,111,110,116,101,120,116,46,115,116,114,111,107,101,82,101,99,116,40,120,44,32,121,44,32,119,105,100,116,104,44,32,104,101,105,103,104,116,41,59,10,32,32,32,32,32,42,32,32,32,125,10,32,32,32,32,32,42,32,125,41,59,10,32,32,32,32,32,42,32,96,96,96,10,32,32,32,32,32,42,47,10,32,32,32,32,103,101,116,76,97,121,101,114,66,111,117,110,100,105,110,103,66,111,120,40,108,97,121,101,114,78,97,109,101,41,32,123,10,32,32,32,32,32,32,118,97,114,32,95,97,59,10,32,32,32,32,32,32,99,111,110,115,116,32,98,111,117,110,100,115,32,61,32,40,95,97,32,61,32,116,104,105,115,46,95,100,111,116,76,111,116,116,105,101,67,111,114,101,41,32,61,61,32,110,117,108,108,32,63,32,118,111,105,100,32,48,32,58,32,95,97,46,103,101,116,76,97,121,101,114,66,111,117,110,100,115,40,108,97,121,101,114,78,97,109,101,41,59,10,32,32,32,32,32,32,105,102,32,40,33,98,111,117,110,100,115,41,32,114,101,116,117,114,110,32,118,111,105,100,32,48,59,10,32,32,32,32,32,32,105,102,32,40,98,111,117,110,100,115,46,115,105,122,101,40,41,32,33,61,61,32,52,41,32,114,101,116,117,114,110,32,118,111,105,100,32,48,59,10,32,32,32,32,32,32,99,111,110,115,116,32,120,32,61,32,98,111,117,110,100,115,46,103,101,116,40,48,41,59,10,32,32,32,32,32,32,99,111,110,115,116,32,121,32,61,32,98,111,117,110,100,115,46,103,101,116,40,49,41,59,10,32,32,32,32,32,32,99,111,110,115,116,32,119,105,100,116,104,32,61,32,98,111,117,110,100,115,46,103,101,116,40,50,41,59,10,32,32,32,32,32,32,99,111,110,115,116,32,104,101,105,103,104,116,32,61,32,98,111,117,110,100,115,46,103,101,116,40,51,41,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,123,10,32,32,32,32,32,32,32,32,120,44,10,32,32,32,32,32,32,32,32,121,44,10,32,32,32,32,32,32,32,32,119,105,100,116,104,44,10,32,32,32,32,32,32,32,32,104,101,105,103,104,116,10,32,32,32,32,32,32,125,59,10,32,32,32,32,125,10,32,32,125,59,10,32,32,95,95,112,117,98,108,105,99,70,105,101,108,100,40,95,68,111,116,76,111,116,116,105,101,44,32,34,95,119,97,115,109,77,111,100,117,108,101,34,44,32,110,117,108,108,41,59,10,32,32,118,97,114,32,68,111,116,76,111,116,116,105,101,32,61,32,95,68,111,116,76,111,116,116,105,101,59,10,10,32,32,47,47,32,115,114,99,47,119,111,114,107,101,114,47,100,111,116,108,111,116,116,105,101,46,119,111,114,107,101,114,46,116,115,10,32,32,118,97,114,32,105,110,115,116,97,110,99,101,115,77,97,112,32,61,32,47,42,32,64,95,95,80,85,82,69,95,95,32,42,47,32,110,101,119,32,77,97,112,40,41,59,10,32,32,118,97,114,32,101,118,101,110,116,72,97,110,100,108,101,114,77,97,112,32,61,32,123,10,32,32,32,32,114,101,97,100,121,58,32,40,105,110,115,116,97,110,99,101,73,100,41,32,61,62,32,40,101,118,101,110,116,41,32,61,62,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,114,101,115,112,111,110,115,101,32,61,32,123,10,32,32,32,32,32,32,32,32,105,100,58,32,34,34,44,10,32,32,32,32,32,32,32,32,109,101,116,104,111,100,58,32,34,111,110,82,101,97,100,121,34,44,10,32,32,32,32,32,32,32,32,114,101,115,117,108,116,58,32,123,10,32,32,32,32,32,32,32,32,32,32,105,110,115,116,97,110,99,101,73,100,44,10,32,32,32,32,32,32,32,32,32,32,101,118,101,110,116,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,101,115,112,111,110,115,101,41,59,10,32,32,32,32,125,44,10,32,32,32,32,99,111,109,112,108,101,116,101,58,32,40,105,110,115,116,97,110,99,101,73,100,41,32,61,62,32,40,101,118,101,110,116,41,32,61,62,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,114,101,115,112,111,110,115,101,32,61,32,123,10,32,32,32,32,32,32,32,32,105,100,58,32,34,34,44,10,32,32,32,32,32,32,32,32,109,101,116,104,111,100,58,32,34,111,110,67,111,109,112,108,101,116,101,34,44,10,32,32,32,32,32,32,32,32,114,101,115,117,108,116,58,32,123,10,32,32,32,32,32,32,32,32,32,32,105,110,115,116,97,110,99,101,73,100,44,10,32,32,32,32,32,32,32,32,32,32,101,118,101,110,116,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,101,115,112,111,110,115,101,41,59,10,32,32,32,32,125,44,10,32,32,32,32,108,111,97,100,58,32,40,105,110,115,116,97,110,99,101,73,100,41,32,61,62,32,40,101,118,101,110,116,41,32,61,62,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,108,111,97,100,69,118,101,110,116,32,61,32,101,118,101,110,116,59,10,32,32,32,32,32,32,99,111,110,115,116,32,114,101,115,112,111,110,115,101,32,61,32,123,10,32,32,32,32,32,32,32,32,105,100,58,32,34,34,44,10,32,32,32,32,32,32,32,32,109,101,116,104,111,100,58,32,34,111,110,76,111,97,100,34,44,10,32,32,32,32,32,32,32,32,114,101,115,117,108,116,58,32,123,10,32,32,32,32,32,32,32,32,32,32,105,110,115,116,97,110,99,101,73,100,44,10,32,32,32,32,32,32,32,32,32,32,101,118,101,110,116,58,32,108,111,97,100,69,118,101,110,116,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,101,115,112,111,110,115,101,41,59,10,32,32,32,32,125,44,10,32,32,32,32,108,111,97,100,69,114,114,111,114,58,32,40,105,110,115,116,97,110,99,101,73,100,41,32,61,62,32,40,101,118,101,110,116,41,32,61,62,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,108,111,97,100,69,114,114,111,114,69,118,101,110,116,32,61,32,101,118,101,110,116,59,10,32,32,32,32,32,32,99,111,110,115,116,32,114,101,115,112,111,110,115,101,32,61,32,123,10,32,32,32,32,32,32,32,32,105,100,58,32,34,34,44,10,32,32,32,32,32,32,32,32,109,101,116,104,111,100,58,32,34,111,110,76,111,97,100,69,114,114,111,114,34,44,10,32,32,32,32,32,32,32,32,114,101,115,117,108,116,58,32,123,10,32,32,32,32,32,32,32,32,32,32,105,110,115,116,97,110,99,101,73,100,44,10,32,32,32,32,32,32,32,32,32,32,101,118,101,110,116,58,32,108,111,97,100,69,114,114,111,114,69,118,101,110,116,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,101,115,112,111,110,115,101,41,59,10,32,32,32,32,125,44,10,32,32,32,32,108,111,111,112,58,32,40,105,110,115,116,97,110,99,101,73,100,41,32,61,62,32,40,101,118,101,110,116,41,32,61,62,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,108,111,111,112,69,118,101,110,116,32,61,32,101,118,101,110,116,59,10,32,32,32,32,32,32,99,111,110,115,116,32,114,101,115,112,111,110,115,101,32,61,32,123,10,32,32,32,32,32,32,32,32,105,100,58,32,34,34,44,10,32,32,32,32,32,32,32,32,109,101,116,104,111,100,58,32,34,111,110,76,111,111,112,34,44,10,32,32,32,32,32,32,32,32,114,101,115,117,108,116,58,32,123,10,32,32,32,32,32,32,32,32,32,32,105,110,115,116,97,110,99,101,73,100,44,10,32,32,32,32,32,32,32,32,32,32,101,118,101,110,116,58,32,108,111,111,112,69,118,101,110,116,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,101,115,112,111,110,115,101,41,59,10,32,32,32,32,125,44,10,32,32,32,32,112,108,97,121,58,32,40,105,110,115,116,97,110,99,101,73,100,41,32,61,62,32,40,101,118,101,110,116,41,32,61,62,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,112,108,97,121,69,118,101,110,116,32,61,32,101,118,101,110,116,59,10,32,32,32,32,32,32,99,111,110,115,116,32,114,101,115,112,111,110,115,101,32,61,32,123,10,32,32,32,32,32,32,32,32,105,100,58,32,34,34,44,10,32,32,32,32,32,32,32,32,109,101,116,104,111,100,58,32,34,111,110,80,108,97,121,34,44,10,32,32,32,32,32,32,32,32,114,101,115,117,108,116,58,32,123,10,32,32,32,32,32,32,32,32,32,32,105,110,115,116,97,110,99,101,73,100,44,10,32,32,32,32,32,32,32,32,32,32,101,118,101,110,116,58,32,112,108,97,121,69,118,101,110,116,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,101,115,112,111,110,115,101,41,59,10,32,32,32,32,125,44,10,32,32,32,32,112,97,117,115,101,58,32,40,105,110,115,116,97,110,99,101,73,100,41,32,61,62,32,40,101,118,101,110,116,41,32,61,62,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,112,97,117,115,101,69,118,101,110,116,32,61,32,101,118,101,110,116,59,10,32,32,32,32,32,32,99,111,110,115,116,32,114,101,115,112,111,110,115,101,32,61,32,123,10,32,32,32,32,32,32,32,32,105,100,58,32,34,34,44,10,32,32,32,32,32,32,32,32,109,101,116,104,111,100,58,32,34,111,110,80,97,117,115,101,34,44,10,32,32,32,32,32,32,32,32,114,101,115,117,108,116,58,32,123,10,32,32,32,32,32,32,32,32,32,32,105,110,115,116,97,110,99,101,73,100,44,10,32,32,32,32,32,32,32,32,32,32,101,118,101,110,116,58,32,112,97,117,115,101,69,118,101,110,116,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,101,115,112,111,110,115,101,41,59,10,32,32,32,32,125,44,10,32,32,32,32,115,116,111,112,58,32,40,105,110,115,116,97,110,99,101,73,100,41,32,61,62,32,40,101,118,101,110,116,41,32,61,62,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,115,116,111,112,69,118,101,110,116,32,61,32,101,118,101,110,116,59,10,32,32,32,32,32,32,99,111,110,115,116,32,114,101,115,112,111,110,115,101,32,61,32,123,10,32,32,32,32,32,32,32,32,105,100,58,32,34,34,44,10,32,32,32,32,32,32,32,32,109,101,116,104,111,100,58,32,34,111,110,83,116,111,112,34,44,10,32,32,32,32,32,32,32,32,114,101,115,117,108,116,58,32,123,10,32,32,32,32,32,32,32,32,32,32,105,110,115,116,97,110,99,101,73,100,44,10,32,32,32,32,32,32,32,32,32,32,101,118,101,110,116,58,32,115,116,111,112,69,118,101,110,116,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,101,115,112,111,110,115,101,41,59,10,32,32,32,32,125,44,10,32,32,32,32,102,114,97,109,101,58,32,40,105,110,115,116,97,110,99,101,73,100,41,32,61,62,32,40,101,118,101,110,116,41,32,61,62,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,102,114,97,109,101,69,118,101,110,116,32,61,32,101,118,101,110,116,59,10,32,32,32,32,32,32,99,111,110,115,116,32,114,101,115,112,111,110,115,101,32,61,32,123,10,32,32,32,32,32,32,32,32,105,100,58,32,34,34,44,10,32,32,32,32,32,32,32,32,109,101,116,104,111,100,58,32,34,111,110,70,114,97,109,101,34,44,10,32,32,32,32,32,32,32,32,114,101,115,117,108,116,58,32,123,10,32,32,32,32,32,32,32,32,32,32,105,110,115,116,97,110,99,101,73,100,44,10,32,32,32,32,32,32,32,32,32,32,101,118,101,110,116,58,32,102,114,97,109,101,69,118,101,110,116,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,101,115,112,111,110,115,101,41,59,10,32,32,32,32,125,44,10,32,32,32,32,114,101,110,100,101,114,58,32,40,105,110,115,116,97,110,99,101,73,100,41,32,61,62,32,40,101,118,101,110,116,41,32,61,62,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,114,101,110,100,101,114,69,118,101,110,116,32,61,32,101,118,101,110,116,59,10,32,32,32,32,32,32,99,111,110,115,116,32,114,101,115,112,111,110,115,101,32,61,32,123,10,32,32,32,32,32,32,32,32,105,100,58,32,34,34,44,10,32,32,32,32,32,32,32,32,109,101,116,104,111,100,58,32,34,111,110,82,101,110,100,101,114,34,44,10,32,32,32,32,32,32,32,32,114,101,115,117,108,116,58,32,123,10,32,32,32,32,32,32,32,32,32,32,105,110,115,116,97,110,99,101,73,100,44,10,32,32,32,32,32,32,32,32,32,32,101,118,101,110,116,58,32,114,101,110,100,101,114,69,118,101,110,116,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,101,115,112,111,110,115,101,41,59,10,32,32,32,32,125,44,10,32,32,32,32,102,114,101,101,122,101,58,32,40,105,110,115,116,97,110,99,101,73,100,41,32,61,62,32,40,101,118,101,110,116,41,32,61,62,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,102,114,101,101,122,101,69,118,101,110,116,32,61,32,101,118,101,110,116,59,10,32,32,32,32,32,32,99,111,110,115,116,32,114,101,115,112,111,110,115,101,32,61,32,123,10,32,32,32,32,32,32,32,32,105,100,58,32,34,34,44,10,32,32,32,32,32,32,32,32,109,101,116,104,111,100,58,32,34,111,110,70,114,101,101,122,101,34,44,10,32,32,32,32,32,32,32,32,114,101,115,117,108,116,58,32,123,10,32,32,32,32,32,32,32,32,32,32,105,110,115,116,97,110,99,101,73,100,44,10,32,32,32,32,32,32,32,32,32,32,101,118,101,110,116,58,32,102,114,101,101,122,101,69,118,101,110,116,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,101,115,112,111,110,115,101,41,59,10,32,32,32,32,125,44,10,32,32,32,32,117,110,102,114,101,101,122,101,58,32,40,105,110,115,116,97,110,99,101,73,100,41,32,61,62,32,40,101,118,101,110,116,41,32,61,62,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,117,110,102,114,101,101,122,101,69,118,101,110,116,32,61,32,101,118,101,110,116,59,10,32,32,32,32,32,32,99,111,110,115,116,32,114,101,115,112,111,110,115,101,32,61,32,123,10,32,32,32,32,32,32,32,32,105,100,58,32,34,34,44,10,32,32,32,32,32,32,32,32,109,101,116,104,111,100,58,32,34,111,110,85,110,102,114,101,101,122,101,34,44,10,32,32,32,32,32,32,32,32,114,101,115,117,108,116,58,32,123,10,32,32,32,32,32,32,32,32,32,32,105,110,115,116,97,110,99,101,73,100,44,10,32,32,32,32,32,32,32,32,32,32,101,118,101,110,116,58,32,117,110,102,114,101,101,122,101,69,118,101,110,116,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,101,115,112,111,110,115,101,41,59,10,32,32,32,32,125,44,10,32,32,32,32,100,101,115,116,114,111,121,58,32,40,105,110,115,116,97,110,99,101,73,100,41,32,61,62,32,40,101,118,101,110,116,41,32,61,62,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,100,101,115,116,114,111,121,69,118,101,110,116,32,61,32,101,118,101,110,116,59,10,32,32,32,32,32,32,99,111,110,115,116,32,114,101,115,112,111,110,115,101,32,61,32,123,10,32,32,32,32,32,32,32,32,105,100,58,32,34,34,44,10,32,32,32,32,32,32,32,32,109,101,116,104,111,100,58,32,34,111,110,68,101,115,116,114,111,121,34,44,10,32,32,32,32,32,32,32,32,114,101,115,117,108,116,58,32,123,10,32,32,32,32,32,32,32,32,32,32,105,110,115,116,97,110,99,101,73,100,44,10,32,32,32,32,32,32,32,32,32,32,101,118,101,110,116,58,32,100,101,115,116,114,111,121,69,118,101,110,116,10,32,32,32,32,32,32,32,32,125,10,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,101,115,112,111,110,115,101,41,59,10,32,32,32,32,125,10,32,32,125,59,10,32,32,118,97,114,32,99,111,109,109,97,110,100,115,32,61,32,123,10,32,32,32,32,103,101,116,68,111,116,76,111,116,116,105,101,73,110,115,116,97,110,99,101,83,116,97,116,101,40,114,101,113,117,101,115,116,41,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,105,110,115,116,97,110,99,101,115,77,97,112,46,103,101,116,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,32,32,105,102,32,40,33,105,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,105,110,115,116,97,110,99,101,73,100,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,99,111,110,115,116,32,115,116,97,116,101,32,61,32,123,10,32,32,32,32,32,32,32,32,105,115,76,111,97,100,101,100,58,32,105,110,115,116,97,110,99,101,46,105,115,76,111,97,100,101,100,44,10,32,32,32,32,32,32,32,32,105,115,80,97,117,115,101,100,58,32,105,110,115,116,97,110,99,101,46,105,115,80,97,117,115,101,100,44,10,32,32,32,32,32,32,32,32,105,115,80,108,97,121,105,110,103,58,32,105,110,115,116,97,110,99,101,46,105,115,80,108,97,121,105,110,103,44,10,32,32,32,32,32,32,32,32,105,115,83,116,111,112,112,101,100,58,32,105,110,115,116,97,110,99,101,46,105,115,83,116,111,112,112,101,100,44,10,32,32,32,32,32,32,32,32,105,115,70,114,111,122,101,110,58,32,105,110,115,116,97,110,99,101,46,105,115,70,114,111,122,101,110,44,10,32,32,32,32,32,32,32,32,108,111,111,112,58,32,105,110,115,116,97,110,99,101,46,108,111,111,112,44,10,32,32,32,32,32,32,32,32,109,111,100,101,58,32,105,110,115,116,97,110,99,101,46,109,111,100,101,44,10,32,32,32,32,32,32,32,32,115,112,101,101,100,58,32,105,110,115,116,97,110,99,101,46,115,112,101,101,100,44,10,32,32,32,32,32,32,32,32,99,117,114,114,101,110,116,70,114,97,109,101,58,32,105,110,115,116,97,110,99,101,46,99,117,114,114,101,110,116,70,114,97,109,101,44,10,32,32,32,32,32,32,32,32,116,111,116,97,108,70,114,97,109,101,115,58,32,105,110,115,116,97,110,99,101,46,116,111,116,97,108,70,114,97,109,101,115,44,10,32,32,32,32,32,32,32,32,100,117,114,97,116,105,111,110,58,32,105,110,115,116,97,110,99,101,46,100,117,114,97,116,105,111,110,44,10,32,32,32,32,32,32,32,32,117,115,101,70,114,97,109,101,73,110,116,101,114,112,111,108,97,116,105,111,110,58,32,105,110,115,116,97,110,99,101,46,117,115,101,70,114,97,109,101,73,110,116,101,114,112,111,108,97,116,105,111,110,44,10,32,32,32,32,32,32,32,32,114,101,110,100,101,114,67,111,110,102,105,103,58,32,105,110,115,116,97,110,99,101,46,114,101,110,100,101,114,67,111,110,102,105,103,44,10,32,32,32,32,32,32,32,32,109,97,114,107,101,114,58,32,105,110,115,116,97,110,99,101,46,109,97,114,107,101,114,44,10,32,32,32,32,32,32,32,32,98,97,99,107,103,114,111,117,110,100,67,111,108,111,114,58,32,105,110,115,116,97,110,99,101,46,98,97,99,107,103,114,111,117,110,100,67,111,108,111,114,44,10,32,32,32,32,32,32,32,32,109,97,114,107,101,114,115,58,32,105,110,115,116,97,110,99,101,46,109,97,114,107,101,114,115,40,41,44,10,32,32,32,32,32,32,32,32,97,99,116,105,118,101,65,110,105,109,97,116,105,111,110,73,100,58,32,105,110,115,116,97,110,99,101,46,97,99,116,105,118,101,65,110,105,109,97,116,105,111,110,73,100,44,10,32,32,32,32,32,32,32,32,97,99,116,105,118,101,84,104,101,109,101,73,100,58,32,105,110,115,116,97,110,99,101,46,97,99,116,105,118,101,84,104,101,109,101,73,100,44,10,32,32,32,32,32,32,32,32,97,117,116,111,112,108,97,121,58,32,105,110,115,116,97,110,99,101,46,97,117,116,111,112,108,97,121,44,10,32,32,32,32,32,32,32,32,115,101,103,109,101,110,116,58,32,105,110,115,116,97,110,99,101,46,115,101,103,109,101,110,116,44,10,32,32,32,32,32,32,32,32,108,97,121,111,117,116,58,32,105,110,115,116,97,110,99,101,46,108,97,121,111,117,116,44,10,32,32,32,32,32,32,32,32,115,101,103,109,101,110,116,68,117,114,97,116,105,111,110,58,32,105,110,115,116,97,110,99,101,46,115,101,103,109,101,110,116,68,117,114,97,116,105,111,110,44,10,32,32,32,32,32,32,32,32,105,115,82,101,97,100,121,58,32,105,110,115,116,97,110,99,101,46,105,115,82,101,97,100,121,44,10,32,32,32,32,32,32,32,32,109,97,110,105,102,101,115,116,58,32,105,110,115,116,97,110,99,101,46,109,97,110,105,102,101,115,116,10,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,123,10,32,32,32,32,32,32,32,32,115,116,97,116,101,10,32,32,32,32,32,32,125,59,10,32,32,32,32,125,44,10,32,32,32,32,115,101,116,76,97,121,111,117,116,40,114,101,113,117,101,115,116,41,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,108,97,121,111,117,116,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,108,97,121,111,117,116,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,105,110,115,116,97,110,99,101,115,77,97,112,46,103,101,116,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,32,32,105,102,32,40,33,105,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,105,110,115,116,97,110,99,101,73,100,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,105,110,115,116,97,110,99,101,46,115,101,116,76,97,121,111,117,116,40,108,97,121,111,117,116,41,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,123,10,32,32,32,32,32,32,32,32,115,117,99,99,101,115,115,58,32,116,114,117,101,10,32,32,32,32,32,32,125,59,10,32,32,32,32,125,44,10,32,32,32,32,103,101,116,83,116,97,116,101,77,97,99,104,105,110,101,76,105,115,116,101,110,101,114,115,40,114,101,113,117,101,115,116,41,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,105,110,115,116,97,110,99,101,115,77,97,112,46,103,101,116,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,32,32,105,102,32,40,33,105,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,105,110,115,116,97,110,99,101,73,100,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,114,101,116,117,114,110,32,105,110,115,116,97,110,99,101,46,103,101,116,83,116,97,116,101,77,97,99,104,105,110,101,76,105,115,116,101,110,101,114,115,40,41,59,10,32,32,32,32,125,44,10,32,32,32,32,112,111,115,116,80,111,105,110,116,101,114,68,111,119,110,69,118,101,110,116,40,114,101,113,117,101,115,116,41,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,120,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,120,59,10,32,32,32,32,32,32,99,111,110,115,116,32,121,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,121,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,105,110,115,116,97,110,99,101,115,77,97,112,46,103,101,116,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,32,32,105,102,32,40,33,105,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,105,110,115,116,97,110,99,101,73,100,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,114,101,116,117,114,110,32,105,110,115,116,97,110,99,101,46,112,111,115,116,80,111,105,110,116,101,114,68,111,119,110,69,118,101,110,116,40,120,44,32,121,41,59,10,32,32,32,32,125,44,10,32,32,32,32,112,111,115,116,80,111,105,110,116,101,114,69,110,116,101,114,69,118,101,110,116,40,114,101,113,117,101,115,116,41,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,120,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,120,59,10,32,32,32,32,32,32,99,111,110,115,116,32,121,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,121,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,105,110,115,116,97,110,99,101,115,77,97,112,46,103,101,116,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,32,32,105,102,32,40,33,105,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,105,110,115,116,97,110,99,101,73,100,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,114,101,116,117,114,110,32,105,110,115,116,97,110,99,101,46,112,111,115,116,80,111,105,110,116,101,114,69,110,116,101,114,69,118,101,110,116,40,120,44,32,121,41,59,10,32,32,32,32,125,44,10,32,32,32,32,112,111,115,116,80,111,105,110,116,101,114,69,120,105,116,69,118,101,110,116,40,114,101,113,117,101,115,116,41,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,120,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,120,59,10,32,32,32,32,32,32,99,111,110,115,116,32,121,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,121,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,105,110,115,116,97,110,99,101,115,77,97,112,46,103,101,116,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,32,32,105,102,32,40,33,105,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,105,110,115,116,97,110,99,101,73,100,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,114,101,116,117,114,110,32,105,110,115,116,97,110,99,101,46,112,111,115,116,80,111,105,110,116,101,114,69,120,105,116,69,118,101,110,116,40,120,44,32,121,41,59,10,32,32,32,32,125,44,10,32,32,32,32,112,111,115,116,80,111,105,110,116,101,114,77,111,118,101,69,118,101,110,116,40,114,101,113,117,101,115,116,41,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,120,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,120,59,10,32,32,32,32,32,32,99,111,110,115,116,32,121,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,121,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,105,110,115,116,97,110,99,101,115,77,97,112,46,103,101,116,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,32,32,105,102,32,40,33,105,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,105,110,115,116,97,110,99,101,73,100,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,114,101,116,117,114,110,32,105,110,115,116,97,110,99,101,46,112,111,115,116,80,111,105,110,116,101,114,77,111,118,101,69,118,101,110,116,40,120,44,32,121,41,59,10,32,32,32,32,125,44,10,32,32,32,32,112,111,115,116,80,111,105,110,116,101,114,85,112,69,118,101,110,116,40,114,101,113,117,101,115,116,41,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,120,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,120,59,10,32,32,32,32,32,32,99,111,110,115,116,32,121,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,121,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,105,110,115,116,97,110,99,101,115,77,97,112,46,103,101,116,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,32,32,105,102,32,40,33,105,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,105,110,115,116,97,110,99,101,73,100,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,114,101,116,117,114,110,32,105,110,115,116,97,110,99,101,46,112,111,115,116,80,111,105,110,116,101,114,85,112,69,118,101,110,116,40,120,44,32,121,41,59,10,32,32,32,32,125,44,10,32,32,32,32,115,116,97,114,116,83,116,97,116,101,77,97,99,104,105,110,101,40,114,101,113,117,101,115,116,41,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,105,110,115,116,97,110,99,101,115,77,97,112,46,103,101,116,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,32,32,105,102,32,40,33,105,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,105,110,115,116,97,110,99,101,73,100,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,114,101,116,117,114,110,32,105,110,115,116,97,110,99,101,46,115,116,97,114,116,83,116,97,116,101,77,97,99,104,105,110,101,40,41,59,10,32,32,32,32,125,44,10,32,32,32,32,115,116,111,112,83,116,97,116,101,77,97,99,104,105,110,101,40,114,101,113,117,101,115,116,41,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,105,110,115,116,97,110,99,101,115,77,97,112,46,103,101,116,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,32,32,105,102,32,40,33,105,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,105,110,115,116,97,110,99,101,73,100,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,114,101,116,117,114,110,32,105,110,115,116,97,110,99,101,46,115,116,111,112,83,116,97,116,101,77,97,99,104,105,110,101,40,41,59,10,32,32,32,32,125,44,10,32,32,32,32,108,111,97,100,83,116,97,116,101,77,97,99,104,105,110,101,40,114,101,113,117,101,115,116,41,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,115,116,97,116,101,77,97,99,104,105,110,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,115,116,97,116,101,77,97,99,104,105,110,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,105,110,115,116,97,110,99,101,115,77,97,112,46,103,101,116,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,32,32,105,102,32,40,33,105,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,105,110,115,116,97,110,99,101,73,100,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,114,101,116,117,114,110,32,105,110,115,116,97,110,99,101,46,108,111,97,100,83,116,97,116,101,77,97,99,104,105,110,101,40,115,116,97,116,101,77,97,99,104,105,110,101,73,100,41,59,10,32,32,32,32,125,44,10,32,32,32,32,108,111,97,100,83,116,97,116,101,77,97,99,104,105,110,101,68,97,116,97,40,114,101,113,117,101,115,116,41,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,115,116,97,116,101,77,97,99,104,105,110,101,68,97,116,97,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,115,116,97,116,101,77,97,99,104,105,110,101,68,97,116,97,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,105,110,115,116,97,110,99,101,115,77,97,112,46,103,101,116,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,32,32,105,102,32,40,33,105,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,105,110,115,116,97,110,99,101,73,100,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,114,101,116,117,114,110,32,105,110,115,116,97,110,99,101,46,108,111,97,100,83,116,97,116,101,77,97,99,104,105,110,101,68,97,116,97,40,115,116,97,116,101,77,97,99,104,105,110,101,68,97,116,97,41,59,10,32,32,32,32,125,44,10,32,32,32,32,99,114,101,97,116,101,58,32,40,114,101,113,117,101,115,116,41,32,61,62,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,99,111,110,102,105,103,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,99,111,110,102,105,103,59,10,32,32,32,32,32,32,99,111,110,115,116,32,119,105,100,116,104,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,119,105,100,116,104,59,10,32,32,32,32,32,32,99,111,110,115,116,32,104,101,105,103,104,116,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,104,101,105,103,104,116,59,10,32,32,32,32,32,32,105,102,32,40,105,110,115,116,97,110,99,101,115,77,97,112,46,104,97,115,40,105,110,115,116,97,110,99,101,73,100,41,41,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,105,110,115,116,97,110,99,101,73,100,125,32,97,108,114,101,97,100,121,32,101,120,105,115,116,115,46,96,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,110,101,119,32,68,111,116,76,111,116,116,105,101,40,99,111,110,102,105,103,41,59,10,32,32,32,32,32,32,105,110,115,116,97,110,99,101,46,99,97,110,118,97,115,46,104,101,105,103,104,116,32,61,32,104,101,105,103,104,116,59,10,32,32,32,32,32,32,105,110,115,116,97,110,99,101,46,99,97,110,118,97,115,46,119,105,100,116,104,32,61,32,119,105,100,116,104,59,10,32,32,32,32,32,32,105,110,115,116,97,110,99,101,115,77,97,112,46,115,101,116,40,105,110,115,116,97,110,99,101,73,100,44,32,105,110,115,116,97,110,99,101,41,59,10,32,32,32,32,32,32,99,111,110,115,116,32,101,118,101,110,116,115,32,61,32,91,10,32,32,32,32,32,32,32,32,34,99,111,109,112,108,101,116,101,34,44,10,32,32,32,32,32,32,32,32,34,102,114,97,109,101,34,44,10,32,32,32,32,32,32,32,32,34,108,111,97,100,34,44,10,32,32,32,32,32,32,32,32,34,108,111,97,100,69,114,114,111,114,34,44,10,32,32,32,32,32,32,32,32,34,108,111,111,112,34,44,10,32,32,32,32,32,32,32,32,34,112,97,117,115,101,34,44,10,32,32,32,32,32,32,32,32,34,112,108,97,121,34,44,10,32,32,32,32,32,32,32,32,34,115,116,111,112,34,44,10,32,32,32,32,32,32,32,32,34,100,101,115,116,114,111,121,34,44,10,32,32,32,32,32,32,32,32,34,102,114,101,101,122,101,34,44,10,32,32,32,32,32,32,32,32,34,117,110,102,114,101,101,122,101,34,44,10,32,32,32,32,32,32,32,32,34,114,101,110,100,101,114,34,44,10,32,32,32,32,32,32,32,32,34,114,101,97,100,121,34,10,32,32,32,32,32,32,93,59,10,32,32,32,32,32,32,101,118,101,110,116,115,46,102,111,114,69,97,99,104,40,40,101,118,101,110,116,41,32,61,62,32,123,10,32,32,32,32,32,32,32,32,105,110,115,116,97,110,99,101,46,97,100,100,69,118,101,110,116,76,105,115,116,101,110,101,114,40,101,118,101,110,116,44,32,101,118,101,110,116,72,97,110,100,108,101,114,77,97,112,91,101,118,101,110,116,93,40,105,110,115,116,97,110,99,101,73,100,41,41,59,10,32,32,32,32,32,32,125,41,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,123,10,32,32,32,32,32,32,32,32,105,110,115,116,97,110,99,101,73,100,10,32,32,32,32,32,32,125,59,10,32,32,32,32,125,44,10,32,32,32,32,100,101,115,116,114,111,121,58,32,40,114,101,113,117,101,115,116,41,32,61,62,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,105,110,115,116,97,110,99,101,115,77,97,112,46,103,101,116,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,32,32,105,102,32,40,33,105,110,115,116,97,110,99,101,41,32,114,101,116,117,114,110,59,10,32,32,32,32,32,32,105,110,115,116,97,110,99,101,46,100,101,115,116,114,111,121,40,41,59,10,32,32,32,32,32,32,105,110,115,116,97,110,99,101,115,77,97,112,46,100,101,108,101,116,101,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,125,44,10,32,32,32,32,102,114,101,101,122,101,58,32,40,114,101,113,117,101,115,116,41,32,61,62,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,105,110,115,116,97,110,99,101,115,77,97,112,46,103,101,116,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,32,32,105,102,32,40,33,105,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,105,110,115,116,97,110,99,101,73,100,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,105,110,115,116,97,110,99,101,46,102,114,101,101,122,101,40,41,59,10,32,32,32,32,125,44,10,32,32,32,32,108,111,97,100,58,32,40,114,101,113,117,101,115,116,41,32,61,62,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,99,111,110,102,105,103,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,99,111,110,102,105,103,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,105,110,115,116,97,110,99,101,115,77,97,112,46,103,101,116,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,32,32,105,102,32,40,33,105,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,105,110,115,116,97,110,99,101,73,100,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,105,110,115,116,97,110,99,101,46,108,111,97,100,40,99,111,110,102,105,103,41,59,10,32,32,32,32,125,44,10,32,32,32,32,108,111,97,100,65,110,105,109,97,116,105,111,110,58,32,40,114,101,113,117,101,115,116,41,32,61,62,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,97,110,105,109,97,116,105,111,110,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,97,110,105,109,97,116,105,111,110,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,105,110,115,116,97,110,99,101,115,77,97,112,46,103,101,116,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,32,32,105,102,32,40,33,105,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,105,110,115,116,97,110,99,101,73,100,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,105,110,115,116,97,110,99,101,46,108,111,97,100,65,110,105,109,97,116,105,111,110,40,97,110,105,109,97,116,105,111,110,73,100,41,59,10,32,32,32,32,125,44,10,32,32,32,32,108,111,97,100,84,104,101,109,101,58,32,40,114,101,113,117,101,115,116,41,32,61,62,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,116,104,101,109,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,116,104,101,109,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,105,110,115,116,97,110,99,101,115,77,97,112,46,103,101,116,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,32,32,105,102,32,40,33,105,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,105,110,115,116,97,110,99,101,73,100,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,114,101,116,117,114,110,32,105,110,115,116,97,110,99,101,46,108,111,97,100,84,104,101,109,101,40,116,104,101,109,101,73,100,41,59,10,32,32,32,32,125,44,10,32,32,32,32,108,111,97,100,84,104,101,109,101,68,97,116,97,58,32,40,114,101,113,117,101,115,116,41,32,61,62,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,116,104,101,109,101,68,97,116,97,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,116,104,101,109,101,68,97,116,97,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,105,110,115,116,97,110,99,101,115,77,97,112,46,103,101,116,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,32,32,105,102,32,40,33,105,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,105,110,115,116,97,110,99,101,73,100,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,114,101,116,117,114,110,32,105,110,115,116,97,110,99,101,46,108,111,97,100,84,104,101,109,101,68,97,116,97,40,116,104,101,109,101,68,97,116,97,41,59,10,32,32,32,32,125,44,10,32,32,32,32,112,97,117,115,101,58,32,40,114,101,113,117,101,115,116,41,32,61,62,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,105,110,115,116,97,110,99,101,115,77,97,112,46,103,101,116,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,32,32,105,102,32,40,33,105,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,105,110,115,116,97,110,99,101,73,100,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,114,101,116,117,114,110,32,105,110,115,116,97,110,99,101,46,112,97,117,115,101,40,41,59,10,32,32,32,32,125,44,10,32,32,32,32,112,108,97,121,58,32,40,114,101,113,117,101,115,116,41,32,61,62,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,105,110,115,116,97,110,99,101,115,77,97,112,46,103,101,116,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,32,32,105,102,32,40,33,105,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,105,110,115,116,97,110,99,101,73,100,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,114,101,116,117,114,110,32,105,110,115,116,97,110,99,101,46,112,108,97,121,40,41,59,10,32,32,32,32,125,44,10,32,32,32,32,114,101,115,105,122,101,58,32,40,114,101,113,117,101,115,116,41,32,61,62,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,119,105,100,116,104,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,119,105,100,116,104,59,10,32,32,32,32,32,32,99,111,110,115,116,32,104,101,105,103,104,116,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,104,101,105,103,104,116,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,105,110,115,116,97,110,99,101,115,77,97,112,46,103,101,116,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,32,32,105,102,32,40,33,105,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,105,110,115,116,97,110,99,101,73,100,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,105,110,115,116,97,110,99,101,46,99,97,110,118,97,115,46,104,101,105,103,104,116,32,61,32,104,101,105,103,104,116,59,10,32,32,32,32,32,32,105,110,115,116,97,110,99,101,46,99,97,110,118,97,115,46,119,105,100,116,104,32,61,32,119,105,100,116,104,59,10,32,32,32,32,32,32,105,110,115,116,97,110,99,101,46,114,101,115,105,122,101,40,41,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,123,10,32,32,32,32,32,32,32,32,115,117,99,99,101,115,115,58,32,116,114,117,101,10,32,32,32,32,32,32,125,59,10,32,32,32,32,125,44,10,32,32,32,32,115,101,116,66,97,99,107,103,114,111,117,110,100,67,111,108,111,114,58,32,40,114,101,113,117,101,115,116,41,32,61,62,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,98,97,99,107,103,114,111,117,110,100,67,111,108,111,114,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,98,97,99,107,103,114,111,117,110,100,67,111,108,111,114,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,105,110,115,116,97,110,99,101,115,77,97,112,46,103,101,116,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,32,32,105,102,32,40,33,105,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,105,110,115,116,97,110,99,101,73,100,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,105,110,115,116,97,110,99,101,46,115,101,116,66,97,99,107,103,114,111,117,110,100,67,111,108,111,114,40,98,97,99,107,103,114,111,117,110,100,67,111,108,111,114,41,59,10,32,32,32,32,125,44,10,32,32,32,32,115,101,116,70,114,97,109,101,58,32,40,114,101,113,117,101,115,116,41,32,61,62,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,102,114,97,109,101,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,102,114,97,109,101,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,105,110,115,116,97,110,99,101,115,77,97,112,46,103,101,116,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,32,32,105,102,32,40,33,105,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,105,110,115,116,97,110,99,101,73,100,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,105,110,115,116,97,110,99,101,46,115,101,116,70,114,97,109,101,40,102,114,97,109,101,41,59,10,32,32,32,32,125,44,10,32,32,32,32,115,101,116,77,111,100,101,58,32,40,114,101,113,117,101,115,116,41,32,61,62,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,109,111,100,101,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,109,111,100,101,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,105,110,115,116,97,110,99,101,115,77,97,112,46,103,101,116,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,32,32,105,102,32,40,33,105,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,105,110,115,116,97,110,99,101,73,100,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,105,110,115,116,97,110,99,101,46,115,101,116,77,111,100,101,40,109,111,100,101,41,59,10,32,32,32,32,125,44,10,32,32,32,32,115,101,116,82,101,110,100,101,114,67,111,110,102,105,103,58,32,40,114,101,113,117,101,115,116,41,32,61,62,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,114,101,110,100,101,114,67,111,110,102,105,103,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,114,101,110,100,101,114,67,111,110,102,105,103,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,105,110,115,116,97,110,99,101,115,77,97,112,46,103,101,116,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,32,32,105,102,32,40,33,105,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,105,110,115,116,97,110,99,101,73,100,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,105,110,115,116,97,110,99,101,46,115,101,116,82,101,110,100,101,114,67,111,110,102,105,103,40,114,101,110,100,101,114,67,111,110,102,105,103,41,59,10,32,32,32,32,125,44,10,32,32,32,32,115,101,116,83,101,103,109,101,110,116,58,32,40,114,101,113,117,101,115,116,41,32,61,62,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,115,101,103,109,101,110,116,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,115,101,103,109,101,110,116,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,105,110,115,116,97,110,99,101,115,77,97,112,46,103,101,116,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,32,32,105,102,32,40,33,105,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,105,110,115,116,97,110,99,101,73,100,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,105,110,115,116,97,110,99,101,46,115,101,116,83,101,103,109,101,110,116,40,115,101,103,109,101,110,116,91,48,93,44,32,115,101,103,109,101,110,116,91,49,93,41,59,10,32,32,32,32,125,44,10,32,32,32,32,115,101,116,83,112,101,101,100,58,32,40,114,101,113,117,101,115,116,41,32,61,62,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,115,112,101,101,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,115,112,101,101,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,105,110,115,116,97,110,99,101,115,77,97,112,46,103,101,116,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,32,32,105,102,32,40,33,105,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,105,110,115,116,97,110,99,101,73,100,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,105,110,115,116,97,110,99,101,46,115,101,116,83,112,101,101,100,40,115,112,101,101,100,41,59,10,32,32,32,32,125,44,10,32,32,32,32,115,101,116,85,115,101,70,114,97,109,101,73,110,116,101,114,112,111,108,97,116,105,111,110,58,32,40,114,101,113,117,101,115,116,41,32,61,62,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,117,115,101,70,114,97,109,101,73,110,116,101,114,112,111,108,97,116,105,111,110,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,117,115,101,70,114,97,109,101,73,110,116,101,114,112,111,108,97,116,105,111,110,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,105,110,115,116,97,110,99,101,115,77,97,112,46,103,101,116,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,32,32,105,102,32,40,33,105,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,105,110,115,116,97,110,99,101,73,100,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,105,110,115,116,97,110,99,101,46,115,101,116,85,115,101,70,114,97,109,101,73,110,116,101,114,112,111,108,97,116,105,111,110,40,117,115,101,70,114,97,109,101,73,110,116,101,114,112,111,108,97,116,105,111,110,41,59,10,32,32,32,32,125,44,10,32,32,32,32,115,101,116,87,97,115,109,85,114,108,58,32,40,114,101,113,117,101,115,116,41,32,61,62,32,123,10,32,32,32,32,32,32,68,111,116,76,111,116,116,105,101,46,115,101,116,87,97,115,109,85,114,108,40,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,117,114,108,41,59,10,32,32,32,32,125,44,10,32,32,32,32,115,116,111,112,58,32,40,114,101,113,117,101,115,116,41,32,61,62,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,105,110,115,116,97,110,99,101,115,77,97,112,46,103,101,116,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,32,32,105,102,32,40,33,105,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,105,110,115,116,97,110,99,101,73,100,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,105,110,115,116,97,110,99,101,46,115,116,111,112,40,41,59,10,32,32,32,32,125,44,10,32,32,32,32,117,110,102,114,101,101,122,101,58,32,40,114,101,113,117,101,115,116,41,32,61,62,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,105,110,115,116,97,110,99,101,115,77,97,112,46,103,101,116,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,32,32,105,102,32,40,33,105,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,105,110,115,116,97,110,99,101,73,100,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,105,110,115,116,97,110,99,101,46,117,110,102,114,101,101,122,101,40,41,59,10,32,32,32,32,125,44,10,32,32,32,32,115,101,116,86,105,101,119,112,111,114,116,40,114,101,113,117,101,115,116,41,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,120,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,120,59,10,32,32,32,32,32,32,99,111,110,115,116,32,121,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,121,59,10,32,32,32,32,32,32,99,111,110,115,116,32,119,105,100,116,104,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,119,105,100,116,104,59,10,32,32,32,32,32,32,99,111,110,115,116,32,104,101,105,103,104,116,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,104,101,105,103,104,116,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,105,110,115,116,97,110,99,101,115,77,97,112,46,103,101,116,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,32,32,105,102,32,40,33,105,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,105,110,115,116,97,110,99,101,73,100,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,114,101,116,117,114,110,32,105,110,115,116,97,110,99,101,46,115,101,116,86,105,101,119,112,111,114,116,40,120,44,32,121,44,32,119,105,100,116,104,44,32,104,101,105,103,104,116,41,59,10,32,32,32,32,125,44,10,32,32,32,32,115,101,116,77,97,114,107,101,114,40,114,101,113,117,101,115,116,41,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,109,97,114,107,101,114,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,109,97,114,107,101,114,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,105,110,115,116,97,110,99,101,115,77,97,112,46,103,101,116,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,32,32,105,102,32,40,33,105,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,105,110,115,116,97,110,99,101,73,100,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,105,110,115,116,97,110,99,101,46,115,101,116,77,97,114,107,101,114,40,109,97,114,107,101,114,41,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,123,10,32,32,32,32,32,32,32,32,115,117,99,99,101,115,115,58,32,116,114,117,101,10,32,32,32,32,32,32,125,59,10,32,32,32,32,125,44,10,32,32,32,32,115,101,116,76,111,111,112,40,114,101,113,117,101,115,116,41,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,73,100,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,105,110,115,116,97,110,99,101,73,100,59,10,32,32,32,32,32,32,99,111,110,115,116,32,108,111,111,112,32,61,32,114,101,113,117,101,115,116,46,112,97,114,97,109,115,46,108,111,111,112,59,10,32,32,32,32,32,32,99,111,110,115,116,32,105,110,115,116,97,110,99,101,32,61,32,105,110,115,116,97,110,99,101,115,77,97,112,46,103,101,116,40,105,110,115,116,97,110,99,101,73,100,41,59,10,32,32,32,32,32,32,105,102,32,40,33,105,110,115,116,97,110,99,101,41,32,123,10,32,32,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,73,110,115,116,97,110,99,101,32,119,105,116,104,32,105,100,32,36,123,105,110,115,116,97,110,99,101,73,100,125,32,100,111,101,115,32,110,111,116,32,101,120,105,115,116,46,96,41,59,10,32,32,32,32,32,32,125,10,32,32,32,32,32,32,105,110,115,116,97,110,99,101,46,115,101,116,76,111,111,112,40,108,111,111,112,41,59,10,32,32,32,32,32,32,114,101,116,117,114,110,32,123,10,32,32,32,32,32,32,32,32,115,117,99,99,101,115,115,58,32,116,114,117,101,10,32,32,32,32,32,32,125,59,10,32,32,32,32,125,10,32,32,125,59,10,32,32,102,117,110,99,116,105,111,110,32,101,120,101,99,117,116,101,67,111,109,109,97,110,100,40,114,112,99,82,101,113,117,101,115,116,41,32,123,10,32,32,32,32,99,111,110,115,116,32,109,101,116,104,111,100,32,61,32,114,112,99,82,101,113,117,101,115,116,46,109,101,116,104,111,100,59,10,32,32,32,32,105,102,32,40,116,121,112,101,111,102,32,99,111,109,109,97,110,100,115,91,109,101,116,104,111,100,93,32,61,61,61,32,34,102,117,110,99,116,105,111,110,34,41,32,123,10,32,32,32,32,32,32,114,101,116,117,114,110,32,99,111,109,109,97,110,100,115,91,109,101,116,104,111,100,93,40,114,112,99,82,101,113,117,101,115,116,41,59,10,32,32,32,32,125,32,101,108,115,101,32,123,10,32,32,32,32,32,32,116,104,114,111,119,32,110,101,119,32,69,114,114,111,114,40,96,77,101,116,104,111,100,32,36,123,109,101,116,104,111,100,125,32,105,115,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,32,105,110,32,99,111,109,109,97,110,100,115,46,96,41,59,10,32,32,32,32,125,10,32,32,125,10,32,32,115,101,108,102,46,111,110,109,101,115,115,97,103,101,32,61,32,40,101,118,101,110,116,41,32,61,62,32,123,10,32,32,32,32,116,114,121,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,114,101,115,117,108,116,32,61,32,101,120,101,99,117,116,101,67,111,109,109,97,110,100,40,101,118,101,110,116,46,100,97,116,97,41,59,10,32,32,32,32,32,32,99,111,110,115,116,32,114,101,115,112,111,110,115,101,32,61,32,123,10,32,32,32,32,32,32,32,32,105,100,58,32,101,118,101,110,116,46,100,97,116,97,46,105,100,44,10,32,32,32,32,32,32,32,32,109,101,116,104,111,100,58,32,101,118,101,110,116,46,100,97,116,97,46,109,101,116,104,111,100,44,10,32,32,32,32,32,32,32,32,114,101,115,117,108,116,10,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,114,101,115,112,111,110,115,101,41,59,10,32,32,32,32,125,32,99,97,116,99,104,32,40,101,114,114,111,114,41,32,123,10,32,32,32,32,32,32,99,111,110,115,116,32,101,114,114,111,114,82,101,115,112,111,110,115,101,32,61,32,123,10,32,32,32,32,32,32,32,32,105,100,58,32,101,118,101,110,116,46,100,97,116,97,46,105,100,44,10,32,32,32,32,32,32,32,32,109,101,116,104,111,100,58,32,101,118,101,110,116,46,100,97,116,97,46,109,101,116,104,111,100,44,10,32,32,32,32,32,32,32,32,101,114,114,111,114,58,32,101,114,114,111,114,46,109,101,115,115,97,103,101,10,32,32,32,32,32,32,125,59,10,32,32,32,32,32,32,115,101,108,102,46,112,111,115,116,77,101,115,115,97,103,101,40,101,114,114,111,114,82,101,115,112,111,110,115,101,41,59,10,32,32,32,32,125,10,32,32,125,59,10,32,32,118,97,114,32,100,117,109,109,121,32,61,32,34,34,59,10,32,32,118,97,114,32,100,111,116,108,111,116,116,105,101,95,119,111,114,107,101,114,95,100,101,102,97,117,108,116,32,61,32,100,117,109,109,121,59,10,125,41,40,41,59,10])],{type:"application/javascript"}),t=URL.createObjectURL(e),o=new Worker(t);return URL.revokeObjectURL(t),o}},T8=O8,R8=class{constructor(){k1(this,"_workers",new Map),k1(this,"_animationWorkerMap",new Map)}getWorker(e){return this._workers.has(e)||this._workers.set(e,new T8),this._workers.get(e)}assignAnimationToWorker(e,t){this._animationWorkerMap.set(e,t)}unassignAnimationFromWorker(e){this._animationWorkerMap.delete(e)}sendMessage(e,t,o){this.getWorker(e).postMessage(t,o||[])}terminateWorker(e){let t=this._workers.get(e);t&&(t.terminate(),this._workers.delete(e))}};function Sn(e){if(e instanceof OffscreenCanvas)return{width:e.width,height:e.height};let{height:t,width:o}=e.getBoundingClientRect();return{width:o*window.devicePixelRatio,height:t*window.devicePixelRatio}}function An(){return Date.now().toString(36)+Math.random().toString(36).substr(2,9)}var In=class q0{constructor(t){k1(this,"_eventManager",new sr),k1(this,"_id"),k1(this,"_worker"),k1(this,"_canvas"),k1(this,"_dotLottieInstanceState",{markers:[],autoplay:!1,backgroundColor:"",currentFrame:0,duration:0,loop:!1,mode:"forward",segment:[0,0],segmentDuration:0,speed:1,totalFrames:0,isLoaded:!1,isPlaying:!1,isPaused:!1,isStopped:!0,isFrozen:!1,useFrameInterpolation:!1,renderConfig:{devicePixelRatio:$3()},activeAnimationId:"",activeThemeId:"",layout:void 0,marker:void 0,isReady:!1,manifest:null}),k1(this,"_created",!1),k1(this,"_pointerUpMethod"),k1(this,"_pointerDownMethod"),k1(this,"_pointerMoveMethod"),k1(this,"_pointerEnterMethod"),k1(this,"_pointerExitMethod");var o,n,r;this._canvas=t.canvas,this._id=`dotlottie-${An()}`;let i=t.workerId||"defaultWorker";this._worker=q0._workerManager.getWorker(i),q0._workerManager.assignAnimationToWorker(this._id,i),q0._wasmUrl&&this._sendMessage("setWasmUrl",{url:q0._wasmUrl}),this._create(w2(G1({},t),{renderConfig:w2(G1({},t.renderConfig),{devicePixelRatio:((o=t.renderConfig)==null?void 0:o.devicePixelRatio)||$3(),freezeOnOffscreen:(r=(n=t.renderConfig)==null?void 0:n.freezeOnOffscreen)!=null?r:!0})})),this._worker.addEventListener("message",this._handleWorkerEvent.bind(this)),this._pointerUpMethod=this._onPointerUp.bind(this),this._pointerDownMethod=this._onPointerDown.bind(this),this._pointerMoveMethod=this._onPointerMove.bind(this),this._pointerEnterMethod=this._onPointerEnter.bind(this),this._pointerExitMethod=this._onPointerLeave.bind(this)}_handleWorkerEvent(t){return p1(this,null,function*(){let o=t.data;o.id||(o.method==="onLoad"&&o.result.instanceId===this._id&&(yield this._updateDotLottieInstanceState(),this._eventManager.dispatch(o.result.event),o2&&this._canvas instanceof HTMLCanvasElement&&(this._dotLottieInstanceState.renderConfig.freezeOnOffscreen&&X2.observe(this._canvas,this),this._dotLottieInstanceState.renderConfig.autoResize&&e0.observe(this._canvas,this))),o.method==="onComplete"&&o.result.instanceId===this._id&&(yield this._updateDotLottieInstanceState(),this._eventManager.dispatch(o.result.event)),o.method==="onDestroy"&&o.result.instanceId===this._id&&this._eventManager.dispatch(o.result.event),o.method==="onUnfreeze"&&o.result.instanceId===this._id&&(yield this._updateDotLottieInstanceState(),this._dotLottieInstanceState.isFrozen=!1,this._eventManager.dispatch(o.result.event)),o.method==="onFrame"&&o.result.instanceId===this._id&&(this._dotLottieInstanceState.currentFrame=o.result.event.currentFrame,this._eventManager.dispatch(o.result.event)),o.method==="onRender"&&o.result.instanceId===this._id&&this._eventManager.dispatch(o.result.event),o.method==="onFreeze"&&o.result.instanceId===this._id&&(yield this._updateDotLottieInstanceState(),this._eventManager.dispatch(o.result.event)),o.method==="onPause"&&o.result.instanceId===this._id&&(yield this._updateDotLottieInstanceState(),this._eventManager.dispatch(o.result.event)),o.method==="onPlay"&&o.result.instanceId===this._id&&(yield this._updateDotLottieInstanceState(),this._eventManager.dispatch(o.result.event)),o.method==="onStop"&&o.result.instanceId===this._id&&(yield this._updateDotLottieInstanceState(),this._eventManager.dispatch(o.result.event)),o.method==="onLoadError"&&o.result.instanceId===this._id&&(yield this._updateDotLottieInstanceState(),this._eventManager.dispatch(o.result.event)),o.method==="onReady"&&o.result.instanceId===this._id&&(yield this._updateDotLottieInstanceState(),this._eventManager.dispatch(o.result.event)))})}_create(t){return p1(this,null,function*(){let o;this._canvas instanceof HTMLCanvasElement?o=this._canvas.transferControlToOffscreen():o=this._canvas;let{instanceId:n}=yield this._sendMessage("create",G1({instanceId:this._id,config:w2(G1({},t),{canvas:o})},Sn(this._canvas)),[o]);if(n!==this._id)throw new Error("Instance ID mismatch");this._created=!0,yield this._updateDotLottieInstanceState()})}get isLoaded(){return this._dotLottieInstanceState.isLoaded}get isPlaying(){return this._dotLottieInstanceState.isPlaying}get isPaused(){return this._dotLottieInstanceState.isPaused}get isStopped(){return this._dotLottieInstanceState.isStopped}get currentFrame(){return this._dotLottieInstanceState.currentFrame}get isFrozen(){return this._dotLottieInstanceState.isFrozen}get segmentDuration(){return this._dotLottieInstanceState.segmentDuration}get totalFrames(){return this._dotLottieInstanceState.totalFrames}get segment(){return this._dotLottieInstanceState.segment}get speed(){return this._dotLottieInstanceState.speed}get duration(){return this._dotLottieInstanceState.duration}get isReady(){return this._dotLottieInstanceState.isReady}get mode(){return this._dotLottieInstanceState.mode}get canvas(){return this._canvas}get autoplay(){return this._dotLottieInstanceState.autoplay}get backgroundColor(){return this._dotLottieInstanceState.backgroundColor}get loop(){return this._dotLottieInstanceState.loop}get useFrameInterpolation(){return this._dotLottieInstanceState.useFrameInterpolation}get renderConfig(){return this._dotLottieInstanceState.renderConfig}get manifest(){return this._dotLottieInstanceState.manifest}get activeAnimationId(){return this._dotLottieInstanceState.activeAnimationId}get marker(){return this._dotLottieInstanceState.marker}get activeThemeId(){return this._dotLottieInstanceState.activeThemeId}get layout(){return this._dotLottieInstanceState.layout}play(){return p1(this,null,function*(){this._created&&(yield this._sendMessage("play",{instanceId:this._id}),yield this._updateDotLottieInstanceState(),o2&&this._canvas instanceof HTMLCanvasElement&&this._dotLottieInstanceState.renderConfig.freezeOnOffscreen&&!dr(this._canvas)&&(yield this.freeze()))})}pause(){return p1(this,null,function*(){this._created&&(yield this._sendMessage("pause",{instanceId:this._id}),yield this._updateDotLottieInstanceState())})}stop(){return p1(this,null,function*(){this._created&&(yield this._sendMessage("stop",{instanceId:this._id}),yield this._updateDotLottieInstanceState())})}setSpeed(t){return p1(this,null,function*(){this._created&&(yield this._sendMessage("setSpeed",{instanceId:this._id,speed:t}),yield this._updateDotLottieInstanceState())})}setMode(t){return p1(this,null,function*(){this._created&&(yield this._sendMessage("setMode",{instanceId:this._id,mode:t}),yield this._updateDotLottieInstanceState())})}setFrame(t){return p1(this,null,function*(){this._created&&(yield this._sendMessage("setFrame",{frame:t,instanceId:this._id}),yield this._updateDotLottieInstanceState())})}setSegment(t,o){return p1(this,null,function*(){this._created&&(yield this._sendMessage("setSegment",{instanceId:this._id,segment:[t,o]}),yield this._updateDotLottieInstanceState())})}setRenderConfig(t){return p1(this,null,function*(){if(!this._created)return;let o=t,{devicePixelRatio:n,freezeOnOffscreen:r}=o,i=nr(o,["devicePixelRatio","freezeOnOffscreen"]);yield this._sendMessage("setRenderConfig",{instanceId:this._id,renderConfig:w2(G1(G1({},this._dotLottieInstanceState.renderConfig),i),{devicePixelRatio:n||$3(),freezeOnOffscreen:r??!0})}),yield this._updateDotLottieInstanceState(),o2&&this._canvas instanceof HTMLCanvasElement&&(this._dotLottieInstanceState.renderConfig.autoResize?e0.observe(this._canvas,this):e0.unobserve(this._canvas),this._dotLottieInstanceState.renderConfig.freezeOnOffscreen?X2.observe(this._canvas,this):(X2.unobserve(this._canvas),this._dotLottieInstanceState.isFrozen&&(yield this.unfreeze())))})}setUseFrameInterpolation(t){return p1(this,null,function*(){this._created&&(yield this._sendMessage("setUseFrameInterpolation",{instanceId:this._id,useFrameInterpolation:t}),yield this._updateDotLottieInstanceState())})}loadTheme(t){return p1(this,null,function*(){if(!this._created)return!1;let o=this._sendMessage("loadTheme",{instanceId:this._id,themeId:t});return yield this._updateDotLottieInstanceState(),o})}load(t){return p1(this,null,function*(){this._created&&(yield this._sendMessage("load",{config:t,instanceId:this._id}),yield this._updateDotLottieInstanceState())})}setLoop(t){return p1(this,null,function*(){this._created&&(yield this._sendMessage("setLoop",{instanceId:this._id,loop:t}),yield this._updateDotLottieInstanceState())})}resize(){return p1(this,null,function*(){if(!this._created)return;let{height:t,width:o}=Sn(this._canvas);yield this._sendMessage("resize",{height:t,instanceId:this._id,width:o}),yield this._updateDotLottieInstanceState()})}destroy(){return p1(this,null,function*(){this._created&&(this._created=!1,yield this._sendMessage("destroy",{instanceId:this._id}),this._cleanupStateMachineListeners(),q0._workerManager.unassignAnimationFromWorker(this._id),this._eventManager.removeAllEventListeners(),o2&&this._canvas instanceof HTMLCanvasElement&&(X2.unobserve(this._canvas),e0.unobserve(this._canvas)))})}freeze(){return p1(this,null,function*(){this._created&&(yield this._sendMessage("freeze",{instanceId:this._id}),yield this._updateDotLottieInstanceState())})}unfreeze(){return p1(this,null,function*(){this._created&&(yield this._sendMessage("unfreeze",{instanceId:this._id}),yield this._updateDotLottieInstanceState())})}setBackgroundColor(t){return p1(this,null,function*(){this._created&&(yield this._sendMessage("setBackgroundColor",{instanceId:this._id,backgroundColor:t}),yield this._updateDotLottieInstanceState())})}loadAnimation(t){return p1(this,null,function*(){this._created&&(yield this._sendMessage("loadAnimation",{animationId:t,instanceId:this._id}),yield this._updateDotLottieInstanceState())})}setLayout(t){return p1(this,null,function*(){this._created&&(yield this._sendMessage("setLayout",{instanceId:this._id,layout:t}),yield this._updateDotLottieInstanceState())})}_updateDotLottieInstanceState(){return p1(this,null,function*(){if(!this._created)return;let t=yield this._sendMessage("getDotLottieInstanceState",{instanceId:this._id});this._dotLottieInstanceState=t.state})}markers(){return this._dotLottieInstanceState.markers}setMarker(t){return p1(this,null,function*(){this._created&&(yield this._sendMessage("setMarker",{instanceId:this._id,marker:t}),yield this._updateDotLottieInstanceState())})}loadThemeData(t){return p1(this,null,function*(){if(!this._created)return!1;let o=yield this._sendMessage("loadThemeData",{instanceId:this._id,themeData:t});return yield this._updateDotLottieInstanceState(),o})}setViewport(t,o,n,r){return p1(this,null,function*(){return this._created?this._sendMessage("setViewport",{x:t,y:o,width:n,height:r,instanceId:this._id}):!1})}_sendMessage(t,o,n){return p1(this,null,function*(){let r={id:`dotlottie-request-${An()}`,method:t,params:o};return this._worker.postMessage(r,n||[]),new Promise((i,s)=>{let d=l=>{let h=l.data;h.id===r.id&&(this._worker.removeEventListener("message",d),h.error?s(new Error(`Failed to execute method ${t}: ${h.error}`)):i(h.result))};this._worker.addEventListener("message",d)})})}addEventListener(t,o){this._eventManager.addEventListener(t,o)}removeEventListener(t,o){this._eventManager.removeEventListener(t,o)}static setWasmUrl(t){q0._wasmUrl=t}loadStateMachine(t){return p1(this,null,function*(){if(!this._created)return!1;let o=yield this._sendMessage("loadStateMachine",{instanceId:this._id,stateMachineId:t});return yield this._updateDotLottieInstanceState(),o})}loadStateMachineData(t){return p1(this,null,function*(){if(!this._created)return!1;let o=yield this._sendMessage("loadStateMachineData",{instanceId:this._id,stateMachineData:t});return yield this._updateDotLottieInstanceState(),o})}startStateMachine(){return p1(this,null,function*(){if(!this._created)return!1;this._setupStateMachineListeners();let t=yield this._sendMessage("startStateMachine",{instanceId:this._id});return yield this._updateDotLottieInstanceState(),t})}stopStateMachine(){return p1(this,null,function*(){return this._created?(this._cleanupStateMachineListeners(),this._sendMessage("stopStateMachine",{instanceId:this._id})):!1})}getStateMachineListeners(){return p1(this,null,function*(){return this._created?this._sendMessage("getStateMachineListeners",{instanceId:this._id}):[]})}_getPointerPosition(t){let o=this._canvas.getBoundingClientRect(),n=this._canvas.width/o.width,r=this._canvas.height/o.height,i=this._dotLottieInstanceState.renderConfig.devicePixelRatio||window.devicePixelRatio||1,s=(t.clientX-o.left)*n/i,d=(t.clientY-o.top)*r/i;return{x:s,y:d}}_onPointerUp(t){let{x:o,y:n}=this._getPointerPosition(t);this._sendMessage("postPointerUpEvent",{instanceId:this._id,x:o,y:n})}_onPointerDown(t){let{x:o,y:n}=this._getPointerPosition(t);this._sendMessage("postPointerDownEvent",{instanceId:this._id,x:o,y:n})}_onPointerMove(t){let{x:o,y:n}=this._getPointerPosition(t);this._sendMessage("postPointerMoveEvent",{instanceId:this._id,x:o,y:n})}_onPointerEnter(t){let{x:o,y:n}=this._getPointerPosition(t);this._sendMessage("postPointerEnterEvent",{instanceId:this._id,x:o,y:n})}_onPointerLeave(t){let{x:o,y:n}=this._getPointerPosition(t);this._sendMessage("postPointerExitEvent",{instanceId:this._id,x:o,y:n})}_setupStateMachineListeners(){return p1(this,null,function*(){if(o2&&this._canvas instanceof HTMLCanvasElement&&this.isLoaded){let t=yield this._sendMessage("getStateMachineListeners",{instanceId:this._id});t.includes("PointerUp")&&this._canvas.addEventListener("pointerup",this._pointerUpMethod),t.includes("PointerDown")&&this._canvas.addEventListener("pointerdown",this._pointerDownMethod),t.includes("PointerMove")&&this._canvas.addEventListener("pointermove",this._pointerMoveMethod),t.includes("PointerEnter")&&this._canvas.addEventListener("pointerenter",this._pointerEnterMethod),t.includes("PointerExit")&&this._canvas.addEventListener("pointerleave",this._pointerExitMethod)}})}_cleanupStateMachineListeners(){o2&&this._canvas instanceof HTMLCanvasElement&&(this._canvas.removeEventListener("pointerup",this._pointerUpMethod),this._canvas.removeEventListener("pointerdown",this._pointerDownMethod),this._canvas.removeEventListener("pointermove",this._pointerMoveMethod),this._canvas.removeEventListener("pointerenter",this._pointerEnterMethod),this._canvas.removeEventListener("pointerleave",this._pointerExitMethod))}};k1(In,"_workerManager",new R8),k1(In,"_wasmUrl","");var F8=q1({props:{animationId:{type:String,required:!1},autoplay:{type:Boolean,required:!1},backgroundColor:{type:String,required:!1},data:{type:[String,ArrayBuffer],required:!1},loop:{type:Boolean,required:!1},mode:{type:String,required:!1},renderConfig:{type:Object,required:!1},segment:{type:Array,required:!1},speed:{type:Number,required:!1},src:{type:String,required:!1},useFrameInterpolation:{type:Boolean,required:!1},marker:{type:String,required:!1},playOnHover:{type:Boolean,required:!1},themeData:{type:String,required:!1},themeId:{type:String,required:!1}},setup(e,{attrs:t,expose:o}){const n=g1(void 0),{backgroundColor:r,loop:i,marker:s,mode:d,playOnHover:l,segment:h,speed:u,useFrameInterpolation:p}=T5(e);let w=null;H1(()=>r==null?void 0:r.value,f=>{w&&typeof f<"u"&&w.setBackgroundColor(f)}),H1(()=>s==null?void 0:s.value,f=>{w&&typeof f<"u"&&w.setMarker(f)}),H1(()=>i==null?void 0:i.value,f=>{w&&typeof f<"u"&&w.setLoop(f)}),H1(()=>d==null?void 0:d.value,f=>{w&&typeof f<"u"&&w.setMode(f)}),H1(()=>h==null?void 0:h.value,f=>{if(!w)return;const x=f==null?void 0:f[0],S=f==null?void 0:f[1];typeof x=="number"&&typeof S=="number"&&w.setSegment(x,S)}),H1(()=>u==null?void 0:u.value,f=>{w&&typeof f<"u"&&w.setSpeed(f)}),H1(()=>p==null?void 0:p.value,f=>{w&&typeof f<"u"&&w.setUseFrameInterpolation(f)}),H1(()=>e.animationId,f=>{w&&w.isLoaded&&typeof f<"u"&&f!==w.activeAnimationId&&w.loadAnimation(f)}),H1(()=>e.themeData,f=>{w&&typeof f<"u"&&w.loadTheme(f)}),H1(()=>e.themeId,f=>{w&&typeof f<"u"&&w.loadThemeData(f)});function v(f){f.type==="mouseenter"?w==null||w.play():w==null||w.pause()}return H1(()=>l==null?void 0:l.value,f=>{var x,S,O,D;w&&typeof f<"u"&&f?((x=n.value)==null||x.addEventListener("mouseenter",v),(S=n.value)==null||S.addEventListener("mouseleave",v)):((O=n.value)==null||O.removeEventListener("mouseenter",v),(D=n.value)==null||D.removeEventListener("mouseleave",v))}),n0(()=>{if(!n.value)return;let f=e.autoplay;typeof(l==null?void 0:l.value)<"u"&&l.value&&(f=!1),w=new P8({canvas:n.value,...e,autoplay:f}),l!=null&&l.value&&(n.value.addEventListener("mouseenter",v),n.value.addEventListener("mouseleave",v))}),n9(()=>{var f,x;(f=n.value)==null||f.addEventListener("mouseenter",v),(x=n.value)==null||x.addEventListener("mouseleave",v),w==null||w.destroy()}),o({getDotLottieInstance:()=>w}),()=>Q3("div",{...t},Q3("canvas",{style:"height: 100%; width: 100%",ref:n}))}});const N8="modulepreload",$8=function(e){return"/"+e},Pn={},p2=function(t,o,n){let r=Promise.resolve();if(o&&o.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),d=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));r=Promise.allSettled(o.map(l=>{if(l=$8(l),l in Pn)return;Pn[l]=!0;const h=l.endsWith(".css"),u=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const p=document.createElement("link");if(p.rel=h?"stylesheet":N8,h||(p.as="script"),p.crossOrigin="",p.href=l,d&&p.setAttribute("nonce",d),document.head.appendChild(p),h)return new Promise((w,v)=>{p.addEventListener("load",w),p.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${l}`)))})}))}function i(s){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=s,window.dispatchEvent(d),!d.defaultPrevented)throw s}return r.then(s=>{for(const d of s||[])d.status==="rejected"&&i(d.reason);return t().catch(i)})};function U8(e={}){const{immediate:t=!1,onNeedRefresh:o,onOfflineReady:n,onRegistered:r,onRegisteredSW:i,onRegisterError:s}=e;let d,l,h;const u=async(w=!0)=>{await l,await(h==null?void 0:h())};async function p(){if("serviceWorker"in navigator){if(d=await p2(async()=>{const{Workbox:w}=await import("./workbox-window.prod.es5-BqEJf4Xk.js");return{Workbox:w}},[]).then(({Workbox:w})=>new w("/sw.js",{scope:"/",type:"classic"})).catch(w=>{s==null||s(w)}),!d)return;h=async()=>{await(d==null?void 0:d.messageSkipWaiting())};{let w=!1;const v=()=>{w=!0,d==null||d.addEventListener("controlling",f=>{f.isUpdate&&window.location.reload()}),o==null||o()};d.addEventListener("installed",f=>{typeof f.isUpdate>"u"?typeof f.isExternal<"u"?f.isExternal?v():!w&&(n==null||n()):f.isExternal?window.location.reload():!w&&(n==null||n()):f.isUpdate||n==null||n()}),d.addEventListener("waiting",v),d.addEventListener("externalwaiting",v)}d.register({immediate:t}).then(w=>{i?i("/sw.js",w):r==null||r(w)}).catch(w=>{s==null||s(w)})}}return l=p(),u}function ar(e={}){const{immediate:t=!0,onNeedRefresh:o,onOfflineReady:n,onRegistered:r,onRegisteredSW:i,onRegisterError:s}=e,d=g1(!1),l=g1(!1);return{updateServiceWorker:U8({immediate:t,onNeedRefresh(){d.value=!0,o==null||o()},onOfflineReady(){l.value=!0,n==null||n()},onRegistered:r,onRegisteredSW:i,onRegisterError:s}),offlineReady:l,needRefresh:d}}var On;const kr=typeof window<"u",W8=e=>typeof e=="string",X0=()=>{};kr&&((On=window==null?void 0:window.navigator)!=null&&On.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function t0(e){return typeof e=="function"?e():W1(e)}function hr(e,t){function o(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return o}function z8(e,t={}){let o,n,r=X0;const i=d=>{clearTimeout(d),r(),r=X0};return d=>{const l=t0(e),h=t0(t.maxWait);return o&&i(o),l<=0||h!==void 0&&h<=0?(n&&(i(n),n=null),Promise.resolve(d())):new Promise((u,p)=>{r=t.rejectOnCancel?p:u,h&&!n&&(n=setTimeout(()=>{o&&i(o),n=null,u(d())},h)),o=setTimeout(()=>{n&&i(n),n=null,u(d())},l)})}}function q8(e,t=!0,o=!0,n=!1){let r=0,i,s=!0,d=X0,l;const h=()=>{i&&(clearTimeout(i),i=void 0,d(),d=X0)};return p=>{const w=t0(e),v=Date.now()-r,f=()=>l=p();return h(),w<=0?(r=Date.now(),f()):(v>w&&(o||!s)?(r=Date.now(),f()):t&&(l=new Promise((x,S)=>{d=n?S:x,i=setTimeout(()=>{r=Date.now(),s=!0,x(f()),h()},Math.max(0,w-v))})),!o&&!i&&(i=setTimeout(()=>s=!0,w)),s=!1,l)}}function K8(e){return e}function ur(e){return bt()?(M5(e),!0):!1}function pr(e,t=200,o={}){return hr(z8(t,o),e)}function Ma(e,t=200,o={}){const n=g1(e.value),r=pr(()=>{n.value=e.value},t,o);return H1(e,()=>r()),n}function G8(e,t=200,o=!1,n=!0,r=!1){return hr(q8(t,o,n,r),e)}function J8(e,t=!0){b2()?n0(e):t?e():K2(e)}function wr(e){var t;const o=t0(e);return(t=o==null?void 0:o.$el)!=null?t:o}const Cr=kr?window:void 0;function Tn(...e){let t,o,n,r;if(W8(e[0])||Array.isArray(e[0])?([o,n,r]=e,t=Cr):[t,o,n,r]=e,!t)return X0;Array.isArray(o)||(o=[o]),Array.isArray(n)||(n=[n]);const i=[],s=()=>{i.forEach(u=>u()),i.length=0},d=(u,p,w,v)=>(u.addEventListener(p,w,v),()=>u.removeEventListener(p,w,v)),l=H1(()=>[wr(t),t0(r)],([u,p])=>{s(),u&&i.push(...o.flatMap(w=>n.map(v=>d(u,w,v,p))))},{immediate:!0,flush:"post"}),h=()=>{l(),s()};return ur(h),h}function Y8(e,t=!1){const o=g1(),n=()=>o.value=!!e();return n(),J8(n,t),o}const Rn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Fn="__vueuse_ssr_handlers__";Rn[Fn]=Rn[Fn]||{};var Nn=Object.getOwnPropertySymbols,Q8=Object.prototype.hasOwnProperty,X8=Object.prototype.propertyIsEnumerable,ed=(e,t)=>{var o={};for(var n in e)Q8.call(e,n)&&t.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&Nn)for(var n of Nn(e))t.indexOf(n)<0&&X8.call(e,n)&&(o[n]=e[n]);return o};function td(e,t,o={}){const n=o,{window:r=Cr}=n,i=ed(n,["window"]);let s;const d=Y8(()=>r&&"ResizeObserver"in r),l=()=>{s&&(s.disconnect(),s=void 0)},h=H1(()=>wr(e),p=>{l(),d.value&&r&&p&&(s=new ResizeObserver(t),s.observe(p,i))},{immediate:!0,flush:"post"}),u=()=>{l(),h()};return ur(u),{isSupported:d,stop:u}}const $n=1;function od(e,t={}){const{throttle:o=0,idle:n=200,onStop:r=X0,onScroll:i=X0,offset:s={left:0,right:0,top:0,bottom:0},eventListenerOptions:d={capture:!1,passive:!0},behavior:l="auto"}=t,h=g1(0),u=g1(0),p=B1({get(){return h.value},set(L){v(L,void 0)}}),w=B1({get(){return u.value},set(L){v(void 0,L)}});function v(L,Z){var T,_,U;const A=t0(e);A&&((U=A instanceof Document?document.body:A)==null||U.scrollTo({top:(T=t0(Z))!=null?T:w.value,left:(_=t0(L))!=null?_:p.value,behavior:t0(l)}))}const f=g1(!1),x=y2({left:!0,right:!1,top:!0,bottom:!1}),S=y2({left:!1,right:!1,top:!1,bottom:!1}),O=L=>{f.value&&(f.value=!1,S.left=!1,S.right=!1,S.top=!1,S.bottom=!1,r(L))},D=pr(O,o+n),H=L=>{const Z=L.target===document?L.target.documentElement:L.target,T=Z.scrollLeft;S.left=Tu.value,x.left=T<=0+(s.left||0),x.right=T+Z.clientWidth>=Z.scrollWidth-(s.right||0)-$n,h.value=T;let _=Z.scrollTop;L.target===document&&!_&&(_=document.body.scrollTop),S.top=_u.value,x.top=_<=0+(s.top||0),x.bottom=_+Z.clientHeight>=Z.scrollHeight-(s.bottom||0)-$n,u.value=_,f.value=!0,D(L),i(L)};return Tn(e,"scroll",o?G8(H,o,!0,!1):H,d),Tn(e,"scrollend",O,d),{x:p,y:w,isScrolling:f,arrivedState:x,directions:S}}var nd=Object.defineProperty,rd=Object.defineProperties,id=Object.getOwnPropertyDescriptors,Un=Object.getOwnPropertySymbols,sd=Object.prototype.hasOwnProperty,dd=Object.prototype.propertyIsEnumerable,Wn=(e,t,o)=>t in e?nd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,zn=(e,t)=>{for(var o in t||(t={}))sd.call(t,o)&&Wn(e,o,t[o]);if(Un)for(var o of Un(t))dd.call(t,o)&&Wn(e,o,t[o]);return e},ld=(e,t)=>rd(e,id(t));function ja(e,t,o={}){var n,r;const i=(n=o.direction)!=null?n:"bottom",s=y2(od(e,ld(zn({},o),{offset:zn({[i]:(r=o.distance)!=null?r:0},o.offset)})));H1(()=>s.arrivedState[i],async d=>{var l,h;if(d){const u=t0(e),p={height:(l=u==null?void 0:u.scrollHeight)!=null?l:0,width:(h=u==null?void 0:u.scrollWidth)!=null?h:0};await t(s),o.preserveScrollPosition&&u&&K2(()=>{u.scrollTo({top:u.scrollHeight-p.height,left:u.scrollWidth-p.width})})}})}var qn;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(qn||(qn={}));var ad=Object.defineProperty,Kn=Object.getOwnPropertySymbols,kd=Object.prototype.hasOwnProperty,hd=Object.prototype.propertyIsEnumerable,Gn=(e,t,o)=>t in e?ad(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,ud=(e,t)=>{for(var o in t||(t={}))kd.call(t,o)&&Gn(e,o,t[o]);if(Kn)for(var o of Kn(t))hd.call(t,o)&&Gn(e,o,t[o]);return e};const pd={easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]};ud({linear:K8},pd);const wd={"vuesax-linear:24-support":` + */let Da=()=>location.protocol+"//"+location.host;function C4(e,t){const{pathname:n,search:o,hash:r}=t,i=e.indexOf("#");if(i>-1){let s=r.includes(e.slice(i))?e.slice(i).length:1,l=r.slice(s);return l[0]!=="/"&&(l="/"+l),Y0(l,"")}return Y0(n,e)+o+r}function La(e,t,n,o){let r=[],i=[],s=null;const l=({state:h})=>{const p=C4(e,location),g=n.value,v=t.value;let m=0;if(h){if(n.value=p,t.value=h,s&&s===g){s=null;return}m=v?h.position-v.position:0}else o(p);r.forEach(H=>{H(n.value,g,{delta:m,type:No.pop,direction:m?m>0?no.forward:no.back:no.unknown})})};function d(){s=n.value}function a(h){r.push(h);const p=()=>{const g=r.indexOf(h);g>-1&&r.splice(g,1)};return i.push(p),p}function k(){if(document.visibilityState==="hidden"){const{history:h}=window;if(!h.state)return;h.replaceState(j1({},h.state,{scroll:On()}),"")}}function u(){for(const h of i)h();i=[],window.removeEventListener("popstate",l),window.removeEventListener("pagehide",k),document.removeEventListener("visibilitychange",k)}return window.addEventListener("popstate",l),window.addEventListener("pagehide",k),document.addEventListener("visibilitychange",k),{pauseListeners:d,listen:a,destroy:u}}function ti(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?On():null}}function Ha(e){const{history:t,location:n}=window,o={value:C4(e,n)},r={value:t.state};r.value||i(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(d,a,k){const u=e.indexOf("#"),h=u>-1?(n.host&&document.querySelector("base")?e:e.slice(u))+d:Da()+e+d;try{t[k?"replaceState":"pushState"](a,"",h),r.value=a}catch(p){console.error(p),n[k?"replace":"assign"](h)}}function s(d,a){i(d,j1({},t.state,ti(r.value.back,d,r.value.forward,!0),a,{position:r.value.position}),!0),o.value=d}function l(d,a){const k=j1({},r.value,t.state,{forward:d,scroll:On()});i(k.current,k,!0),i(d,j1({},ti(o.value,d,null),{position:k.position+1},a),!1),o.value=d}return{location:o,state:r,push:l,replace:s}}function Va(e){e=ka(e);const t=Ha(e),n=La(e,t.state,t.location,t.replace);function o(i,s=!0){s||n.pauseListeners(),history.go(i)}const r=j1({location:"",base:e,go:o,createHref:ha.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}let Oe=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var F1=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e}(F1||{});const ya={type:Oe.Static,value:""},ba=/[a-zA-Z0-9_]/;function Za(e){if(!e)return[[]];if(e==="/")return[[ya]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${n})/"${a}": ${p}`)}let n=F1.Static,o=n;const r=[];let i;function s(){i&&r.push(i),i=[]}let l=0,d,a="",k="";function u(){a&&(n===F1.Static?i.push({type:Oe.Static,value:a}):n===F1.Param||n===F1.ParamRegExp||n===F1.ParamRegExpEnd?(i.length>1&&(d==="*"||d==="+")&&t(`A repeatable param (${a}) must be alone in its segment. eg: '/:ids+.`),i.push({type:Oe.Param,value:a,regexp:k,repeatable:d==="*"||d==="+",optional:d==="*"||d==="?"})):t("Invalid state to consume buffer"),a="")}function h(){a+=d}for(;lt.length?t.length===1&&t[0]===r2.Static+r2.Segment?1:-1:0}function g4(e,t){let n=0;const o=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const Oa={strict:!1,end:!0,sensitive:!1};function Aa(e,t,n){const o=Ea(Za(e.path),n),r=j1(o,{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function Pa(e,t){const n=[],o=new Map;t=K0(Oa,t);function r(u){return o.get(u)}function i(u,h,p){const g=!p,v=ii(u);v.aliasOf=p&&p.record;const m=K0(t,u),H=[v];if("alias"in u){const f=typeof u.alias=="string"?[u.alias]:u.alias;for(const x of f)H.push(ii(j1({},v,{components:p?p.record.components:v.components,path:x,aliasOf:p?p.record:v})))}let w,j;for(const f of H){const{path:x}=f;if(h&&x[0]!=="/"){const D=h.record.path,y=D[D.length-1]==="/"?"":"/";f.path=h.record.path+(x&&y+x)}if(w=Aa(f,h,m),p?p.alias.push(w):(j=j||w,j!==w&&j.alias.push(w),g&&u.name&&!si(w)&&s(u.name)),v4(w)&&d(w),v.children){const D=v.children;for(let y=0;y{s(j)}:Nt}function s(u){if(c4(u)){const h=o.get(u);h&&(o.delete(u),n.splice(n.indexOf(h),1),h.children.forEach(s),h.alias.forEach(s))}else{const h=n.indexOf(u);h>-1&&(n.splice(h,1),u.record.name&&o.delete(u.record.name),u.children.forEach(s),u.alias.forEach(s))}}function l(){return n}function d(u){const h=Ra(u,n);n.splice(h,0,u),u.record.name&&!si(u)&&o.set(u.record.name,u)}function a(u,h){let p,g={},v,m;if("name"in u&&u.name){if(p=o.get(u.name),!p)throw ht(S1.MATCHER_NOT_FOUND,{location:u});m=p.record.name,g=j1(ri(h.params,p.keys.filter(j=>!j.optional).concat(p.parent?p.parent.keys.filter(j=>j.optional):[]).map(j=>j.name)),u.params&&ri(u.params,p.keys.map(j=>j.name))),v=p.stringify(g)}else if(u.path!=null)v=u.path,p=n.find(j=>j.re.test(v)),p&&(g=p.parse(v),m=p.record.name);else{if(p=h.name?o.get(h.name):n.find(j=>j.re.test(h.path)),!p)throw ht(S1.MATCHER_NOT_FOUND,{location:u,currentLocation:h});m=p.record.name,g=j1({},h.params,u.params),v=p.stringify(g)}const H=[];let w=p;for(;w;)H.unshift(w.record),w=w.parent;return{name:m,path:v,params:g,matched:H,meta:Ia(H)}}e.forEach(u=>i(u));function k(){n.length=0,o.clear()}return{addRoute:i,resolve:a,removeRoute:s,clearRoutes:k,getRoutes:l,getRecordMatcher:r}}function ri(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function ii(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Ta(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Ta(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]=typeof n=="object"?n[o]:n;return t}function si(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Ia(e){return e.reduce((t,n)=>j1(t,n.meta),{})}function Ra(e,t){let n=0,o=t.length;for(;n!==o;){const i=n+o>>1;g4(e,t[i])<0?o=i:n=i+1}const r=$a(e);return r&&(o=t.lastIndexOf(r,o-1)),o}function $a(e){let t=e;for(;t=t.parent;)if(v4(t)&&g4(e,t)===0)return t}function v4({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function li(e){const t=W1(An),n=W1(Br),o=N(()=>{const d=v1(e.to);return t.resolve(d)}),r=N(()=>{const{matched:d}=o.value,{length:a}=d,k=d[a-1],u=n.matched;if(!k||!u.length)return-1;const h=u.findIndex(ut.bind(null,k));if(h>-1)return h;const p=di(d[a-2]);return a>1&&di(k)===p&&u[u.length-1].path!==p?u.findIndex(ut.bind(null,d[a-2])):h}),i=N(()=>r.value>-1&&za(n.params,o.value.params)),s=N(()=>r.value>-1&&r.value===n.matched.length-1&&p4(n.params,o.value.params));function l(d={}){if(Ua(d)){const a=t[v1(e.replace)?"replace":"push"](v1(e.to)).catch(Nt);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>a),a}return Promise.resolve()}return{route:o,href:N(()=>o.value.href),isActive:i,isExactActive:s,navigate:l}}function Fa(e){return e.length===1?e[0]:e}const Na=b1({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:li,setup(e,{slots:t}){const n=G1(li(e)),{options:o}=W1(An),r=N(()=>({[ai(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[ai(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&Fa(t.default(n));return e.custom?i:t9("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},i)}}}),qa=Na;function Ua(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function za(e,t){for(const n in t){const o=t[n],r=e[n];if(typeof o=="string"){if(o!==r)return!1}else if(!B2(r)||r.length!==o.length||o.some((i,s)=>i.valueOf()!==r[s].valueOf()))return!1}return!0}function di(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const ai=(e,t,n)=>e??t??n,Wa=b1({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const o=W1(Uo),r=N(()=>e.route||o.value),i=W1(ei,0),s=N(()=>{let a=v1(i);const{matched:k}=r.value;let u;for(;(u=k[a])&&!u.components;)a++;return a}),l=N(()=>r.value.matched[s.value]);je(ei,N(()=>s.value+1)),je(ja,l),je(Uo,r);const d=Q();return E1(()=>[d.value,l.value,e.name],([a,k,u],[h,p,g])=>{k&&(k.instances[u]=a,p&&p!==k&&a&&a===h&&(k.leaveGuards.size||(k.leaveGuards=p.leaveGuards),k.updateGuards.size||(k.updateGuards=p.updateGuards))),a&&k&&(!p||!ut(k,p)||!h)&&(k.enterCallbacks[u]||[]).forEach(v=>v(a))},{flush:"post"}),()=>{const a=r.value,k=e.name,u=l.value,h=u&&u.components[k];if(!h)return ki(n.default,{Component:h,route:a});const p=u.props[k],g=p?p===!0?a.params:typeof p=="function"?p(a):p:null,m=t9(h,j1({},g,t,{onVnodeUnmounted:H=>{H.component.isUnmounted&&(u.instances[k]=null)},ref:d}));return ki(n.default,{Component:m,route:a})||m}}});function ki(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Ga=Wa;function Ka(e){const t=Pa(e.routes,e),n=e.parseQuery||ma,o=e.stringifyQuery||X0,r=e.history,i=Dt(),s=Dt(),l=Dt(),d=cr(ce);let a=ce;Je&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const k=eo.bind(null,V=>""+V),u=eo.bind(null,oa),h=eo.bind(null,n9);function p(V,F){let R,K;return c4(V)?(R=t.getRecordMatcher(V),K=F):K=V,t.addRoute(K,R)}function g(V){const F=t.getRecordMatcher(V);F&&t.removeRoute(F)}function v(){return t.getRoutes().map(V=>V.record)}function m(V){return!!t.getRecordMatcher(V)}function H(V,F){if(F=j1({},F||d.value),typeof V=="string"){const M=to(n,V,F.path),_=t.resolve({path:M.path},F),S=r.createHref(M.fullPath);return j1(M,_,{params:h(_.params),hash:n9(M.hash),redirectedFrom:void 0,href:S})}let R;if(V.path!=null)R=j1({},V,{path:to(n,V.path,F.path).path});else{const M=j1({},V.params);for(const _ in M)M[_]==null&&delete M[_];R=j1({},V,{params:u(M)}),F.params=u(F.params)}const K=t.resolve(R,F),i1=V.hash||"";K.params=k(h(K.params));const c=sa(o,j1({},V,{hash:ea(i1),path:K.path})),C=r.createHref(c);return j1({fullPath:c,hash:i1,query:o===X0?Ma(V.query):V.query||{}},K,{redirectedFrom:void 0,href:C})}function w(V){return typeof V=="string"?to(n,V,d.value.path):j1({},V)}function j(V,F){if(a!==V)return ht(S1.NAVIGATION_CANCELLED,{from:F,to:V})}function f(V){return y(V)}function x(V){return f(j1(w(V),{replace:!0}))}function D(V,F){const R=V.matched[V.matched.length-1];if(R&&R.redirect){const{redirect:K}=R;let i1=typeof K=="function"?K(V,F):K;return typeof i1=="string"&&(i1=i1.includes("?")||i1.includes("#")?i1=w(i1):{path:i1},i1.params={}),j1({query:V.query,hash:V.hash,params:i1.path!=null?{}:V.params},i1)}}function y(V,F){const R=a=H(V),K=d.value,i1=V.state,c=V.force,C=V.replace===!0,M=D(R,K);if(M)return y(j1(w(M),{state:typeof M=="object"?j1({},i1,M.state):i1,force:c,replace:C}),F||R);const _=R;_.redirectedFrom=F;let S;return!c&&la(o,K,R)&&(S=ht(S1.NAVIGATION_DUPLICATED,{to:_,from:K}),O1(K,K,!0,!1)),(S?Promise.resolve(S):P(_,K)).catch(B=>W2(B)?W2(B,S1.NAVIGATION_GUARD_REDIRECT)?B:p1(B):n1(B,_,K)).then(B=>{if(B){if(W2(B,S1.NAVIGATION_GUARD_REDIRECT))return y(j1({replace:C},w(B.to),{state:typeof B.to=="object"?j1({},i1,B.to.state):i1,force:c}),F||_)}else B=I(_,K,!0,C,i1);return U(_,K,B),B})}function A(V,F){const R=j(V,F);return R?Promise.reject(R):Promise.resolve()}function L(V){const F=r1.values().next().value;return F&&typeof F.runWithContext=="function"?F.runWithContext(V):V()}function P(V,F){let R;const[K,i1,c]=xa(V,F);R=oo(K.reverse(),"beforeRouteLeave",V,F);for(const M of K)M.leaveGuards.forEach(_=>{R.push(fe(_,V,F))});const C=A.bind(null,V,F);return R.push(C),t1(R).then(()=>{R=[];for(const M of i.list())R.push(fe(M,V,F));return R.push(C),t1(R)}).then(()=>{R=oo(i1,"beforeRouteUpdate",V,F);for(const M of i1)M.updateGuards.forEach(_=>{R.push(fe(_,V,F))});return R.push(C),t1(R)}).then(()=>{R=[];for(const M of c)if(M.beforeEnter)if(B2(M.beforeEnter))for(const _ of M.beforeEnter)R.push(fe(_,V,F));else R.push(fe(M.beforeEnter,V,F));return R.push(C),t1(R)}).then(()=>(V.matched.forEach(M=>M.enterCallbacks={}),R=oo(c,"beforeRouteEnter",V,F,L),R.push(C),t1(R))).then(()=>{R=[];for(const M of s.list())R.push(fe(M,V,F));return R.push(C),t1(R)}).catch(M=>W2(M,S1.NAVIGATION_CANCELLED)?M:Promise.reject(M))}function U(V,F,R){l.list().forEach(K=>L(()=>K(V,F,R)))}function I(V,F,R,K,i1){const c=j(V,F);if(c)return c;const C=F===ce,M=Je?history.state:{};R&&(K||C?r.replace(V.fullPath,j1({scroll:C&&M&&M.scroll},i1)):r.push(V.fullPath,i1)),d.value=V,O1(V,F,R,C),p1()}let X;function l1(){X||(X=r.listen((V,F,R)=>{if(!d1.listening)return;const K=H(V),i1=D(K,d1.currentRoute.value);if(i1){y(j1(i1,{replace:!0,force:!0}),K).catch(Nt);return}a=K;const c=d.value;Je&&wa(J0(c.fullPath,R.delta),On()),P(K,c).catch(C=>W2(C,S1.NAVIGATION_ABORTED|S1.NAVIGATION_CANCELLED)?C:W2(C,S1.NAVIGATION_GUARD_REDIRECT)?(y(j1(w(C.to),{force:!0}),K).then(M=>{W2(M,S1.NAVIGATION_ABORTED|S1.NAVIGATION_DUPLICATED)&&!R.delta&&R.type===No.pop&&r.go(-1,!1)}).catch(Nt),Promise.reject()):(R.delta&&r.go(-R.delta,!1),n1(C,K,c))).then(C=>{C=C||I(K,c,!1),C&&(R.delta&&!W2(C,S1.NAVIGATION_CANCELLED)?r.go(-R.delta,!1):R.type===No.pop&&W2(C,S1.NAVIGATION_ABORTED|S1.NAVIGATION_DUPLICATED)&&r.go(-1,!1)),U(K,c,C)}).catch(Nt)}))}let h1=Dt(),k1=Dt(),Y;function n1(V,F,R){p1(V);const K=k1.list();return K.length?K.forEach(i1=>i1(V,F,R)):console.error(V),Promise.reject(V)}function C1(){return Y&&d.value!==ce?Promise.resolve():new Promise((V,F)=>{h1.add([V,F])})}function p1(V){return Y||(Y=!V,l1(),h1.list().forEach(([F,R])=>V?R(V):F()),h1.reset()),V}function O1(V,F,R,K){const{scrollBehavior:i1}=e;if(!Je||!i1)return Promise.resolve();const c=!R&&Ca(J0(V.fullPath,0))||(K||!R)&&history.state&&history.state.scroll||null;return v2().then(()=>i1(V,F,c)).then(C=>C&&ca(C)).catch(C=>n1(C,V,F))}const Z1=V=>r.go(V);let $;const r1=new Set,d1={currentRoute:d,listening:!0,addRoute:p,removeRoute:g,clearRoutes:t.clearRoutes,hasRoute:m,getRoutes:v,resolve:H,options:e,push:f,replace:x,go:Z1,back:()=>Z1(-1),forward:()=>Z1(1),beforeEach:i.add,beforeResolve:s.add,afterEach:l.add,onError:k1.add,isReady:C1,install(V){V.component("RouterLink",qa),V.component("RouterView",Ga),V.config.globalProperties.$router=d1,Object.defineProperty(V.config.globalProperties,"$route",{enumerable:!0,get:()=>v1(d)}),Je&&!$&&d.value===ce&&($=!0,f(r.location).catch(K=>{}));const F={};for(const K in ce)Object.defineProperty(F,K,{get:()=>d.value[K],enumerable:!0});V.provide(An,d1),V.provide(Br,Gs(F)),V.provide(Uo,d);const R=V.unmount;r1.add(V),V.unmount=function(){r1.delete(V),r1.size<1&&(a=ce,X&&X(),X=null,d.value=ce,$=!1,Y=!1),R()}}};function t1(V){return V.reduce((F,R)=>F.then(()=>L(R)),Promise.resolve())}return d1}function f4(){return W1(An)}function Ya(e){return W1(Br)}const Qa="modulepreload",Ja=function(e){return"/"+e},ui={},A1=function(t,n,o){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),l=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));r=Promise.allSettled(n.map(d=>{if(d=Ja(d),d in ui)return;ui[d]=!0;const a=d.endsWith(".css"),k=a?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${k}`))return;const u=document.createElement("link");if(u.rel=a?"stylesheet":Qa,a||(u.as="script"),u.crossOrigin="",u.href=d,l&&u.setAttribute("nonce",l),document.head.appendChild(u),a)return new Promise((h,p)=>{u.addEventListener("load",h),u.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${d}`)))})}))}function i(s){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=s,window.dispatchEvent(l),!l.defaultPrevented)throw s}return r.then(s=>{for(const l of s||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})};function Xa(e={}){const{immediate:t=!1,onNeedRefresh:n,onOfflineReady:o,onRegistered:r,onRegisteredSW:i,onRegisterError:s}=e;let l,d,a;const k=async(h=!0)=>{await d,await(a==null?void 0:a())};async function u(){if("serviceWorker"in navigator){if(l=await A1(async()=>{const{Workbox:h}=await import("./workbox-window.prod.es5-BqEJf4Xk.js");return{Workbox:h}},[]).then(({Workbox:h})=>new h("/sw.js",{scope:"/",type:"classic"})).catch(h=>{s==null||s(h)}),!l)return;a=async()=>{await(l==null?void 0:l.messageSkipWaiting())};{let h=!1;const p=()=>{h=!0,l==null||l.addEventListener("controlling",g=>{g.isUpdate&&window.location.reload()}),n==null||n()};l.addEventListener("installed",g=>{typeof g.isUpdate>"u"?typeof g.isExternal<"u"?g.isExternal?p():!h&&(o==null||o()):g.isExternal?window.location.reload():!h&&(o==null||o()):g.isUpdate||o==null||o()}),l.addEventListener("waiting",p),l.addEventListener("externalwaiting",p)}l.register({immediate:t}).then(h=>{i?i("/sw.js",h):r==null||r(h)}).catch(h=>{s==null||s(h)})}}return d=u(),k}function m4(e={}){const{immediate:t=!0,onNeedRefresh:n,onOfflineReady:o,onRegistered:r,onRegisteredSW:i,onRegisterError:s}=e,l=Q(!1),d=Q(!1);return{updateServiceWorker:Xa({immediate:t,onNeedRefresh(){l.value=!0,n==null||n()},onOfflineReady(){d.value=!0,o==null||o()},onRegistered:r,onRegisteredSW:i,onRegisterError:s}),offlineReady:d,needRefresh:l}}var hi;const M4=typeof window<"u",e6=e=>typeof e=="string",Fe=()=>{};M4&&((hi=window==null?void 0:window.navigator)!=null&&hi.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function $2(e){return typeof e=="function"?e():v1(e)}function j4(e,t){function n(...o){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(r).catch(i)})}return n}function t6(e,t={}){let n,o,r=Fe;const i=l=>{clearTimeout(l),r(),r=Fe};return l=>{const d=$2(e),a=$2(t.maxWait);return n&&i(n),d<=0||a!==void 0&&a<=0?(o&&(i(o),o=null),Promise.resolve(l())):new Promise((k,u)=>{r=t.rejectOnCancel?u:k,a&&!o&&(o=setTimeout(()=>{n&&i(n),o=null,k(l())},a)),n=setTimeout(()=>{o&&i(o),o=null,k(l())},d)})}}function n6(e,t=!0,n=!0,o=!1){let r=0,i,s=!0,l=Fe,d;const a=()=>{i&&(clearTimeout(i),i=void 0,l(),l=Fe)};return u=>{const h=$2(e),p=Date.now()-r,g=()=>d=u();return a(),h<=0?(r=Date.now(),g()):(p>h&&(n||!s)?(r=Date.now(),g()):t&&(d=new Promise((v,m)=>{l=o?m:v,i=setTimeout(()=>{r=Date.now(),s=!0,v(g()),a()},Math.max(0,h-p))})),!n&&!i&&(i=setTimeout(()=>s=!0,h)),s=!1,d)}}function o6(e){return e}function x4(e){return lr()?(Es(e),!0):!1}function D4(e,t=200,n={}){return j4(t6(t,n),e)}function mw(e,t=200,n={}){const o=Q(e.value),r=D4(()=>{o.value=e.value},t,n);return E1(e,()=>r()),o}function r6(e,t=200,n=!1,o=!0,r=!1){return j4(n6(t,n,o,r),e)}function i6(e,t=!0){U2()?q2(e):t?e():v2(e)}function L4(e){var t;const n=$2(e);return(t=n==null?void 0:n.$el)!=null?t:n}const H4=M4?window:void 0;function pi(...e){let t,n,o,r;if(e6(e[0])||Array.isArray(e[0])?([n,o,r]=e,t=H4):[t,n,o,r]=e,!t)return Fe;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const i=[],s=()=>{i.forEach(k=>k()),i.length=0},l=(k,u,h,p)=>(k.addEventListener(u,h,p),()=>k.removeEventListener(u,h,p)),d=E1(()=>[L4(t),$2(r)],([k,u])=>{s(),k&&i.push(...n.flatMap(h=>o.map(p=>l(k,h,p,u))))},{immediate:!0,flush:"post"}),a=()=>{d(),s()};return x4(a),a}function s6(e,t=!1){const n=Q(),o=()=>n.value=!!e();return o(),i6(o,t),n}const ci=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},wi="__vueuse_ssr_handlers__";ci[wi]=ci[wi]||{};var Ci=Object.getOwnPropertySymbols,l6=Object.prototype.hasOwnProperty,d6=Object.prototype.propertyIsEnumerable,a6=(e,t)=>{var n={};for(var o in e)l6.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&Ci)for(var o of Ci(e))t.indexOf(o)<0&&d6.call(e,o)&&(n[o]=e[o]);return n};function k6(e,t,n={}){const o=n,{window:r=H4}=o,i=a6(o,["window"]);let s;const l=s6(()=>r&&"ResizeObserver"in r),d=()=>{s&&(s.disconnect(),s=void 0)},a=E1(()=>L4(e),u=>{d(),l.value&&r&&u&&(s=new ResizeObserver(t),s.observe(u,i))},{immediate:!0,flush:"post"}),k=()=>{d(),a()};return x4(k),{isSupported:l,stop:k}}const gi=1;function u6(e,t={}){const{throttle:n=0,idle:o=200,onStop:r=Fe,onScroll:i=Fe,offset:s={left:0,right:0,top:0,bottom:0},eventListenerOptions:l={capture:!1,passive:!0},behavior:d="auto"}=t,a=Q(0),k=Q(0),u=N({get(){return a.value},set(f){p(f,void 0)}}),h=N({get(){return k.value},set(f){p(void 0,f)}});function p(f,x){var D,y,A;const L=$2(e);L&&((A=L instanceof Document?document.body:L)==null||A.scrollTo({top:(D=$2(x))!=null?D:h.value,left:(y=$2(f))!=null?y:u.value,behavior:$2(d)}))}const g=Q(!1),v=G1({left:!0,right:!1,top:!0,bottom:!1}),m=G1({left:!1,right:!1,top:!1,bottom:!1}),H=f=>{g.value&&(g.value=!1,m.left=!1,m.right=!1,m.top=!1,m.bottom=!1,r(f))},w=D4(H,n+o),j=f=>{const x=f.target===document?f.target.documentElement:f.target,D=x.scrollLeft;m.left=Dk.value,v.left=D<=0+(s.left||0),v.right=D+x.clientWidth>=x.scrollWidth-(s.right||0)-gi,a.value=D;let y=x.scrollTop;f.target===document&&!y&&(y=document.body.scrollTop),m.top=yk.value,v.top=y<=0+(s.top||0),v.bottom=y+x.clientHeight>=x.scrollHeight-(s.bottom||0)-gi,k.value=y,g.value=!0,w(f),i(f)};return pi(e,"scroll",n?r6(j,n,!0,!1):j,l),pi(e,"scrollend",H,l),{x:u,y:h,isScrolling:g,arrivedState:v,directions:m}}var h6=Object.defineProperty,p6=Object.defineProperties,c6=Object.getOwnPropertyDescriptors,vi=Object.getOwnPropertySymbols,w6=Object.prototype.hasOwnProperty,C6=Object.prototype.propertyIsEnumerable,fi=(e,t,n)=>t in e?h6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,mi=(e,t)=>{for(var n in t||(t={}))w6.call(t,n)&&fi(e,n,t[n]);if(vi)for(var n of vi(t))C6.call(t,n)&&fi(e,n,t[n]);return e},g6=(e,t)=>p6(e,c6(t));function Mw(e,t,n={}){var o,r;const i=(o=n.direction)!=null?o:"bottom",s=G1(u6(e,g6(mi({},n),{offset:mi({[i]:(r=n.distance)!=null?r:0},n.offset)})));E1(()=>s.arrivedState[i],async l=>{var d,a;if(l){const k=$2(e),u={height:(d=k==null?void 0:k.scrollHeight)!=null?d:0,width:(a=k==null?void 0:k.scrollWidth)!=null?a:0};await t(s),n.preserveScrollPosition&&k&&v2(()=>{k.scrollTo({top:k.scrollHeight-u.height,left:k.scrollWidth-u.width})})}})}var Mi;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(Mi||(Mi={}));var v6=Object.defineProperty,ji=Object.getOwnPropertySymbols,f6=Object.prototype.hasOwnProperty,m6=Object.prototype.propertyIsEnumerable,xi=(e,t,n)=>t in e?v6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,M6=(e,t)=>{for(var n in t||(t={}))f6.call(t,n)&&xi(e,n,t[n]);if(ji)for(var n of ji(t))m6.call(t,n)&&xi(e,n,t[n]);return e};const j6={easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]};M6({linear:o6},j6);const x6={"vuesax-linear:24-support":` @@ -6196,4 +6191,74 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HomeView-CRWeDh -`},Cd=["innerHTML"],cd=q1({__name:"Icon",props:{icon:{},color:{default:null},size:{}},setup(e){const t=e,o=g1(),n=B1(()=>wd[`${t.icon}`]);function r(){var s;if(!t.size)return;const i=(s=o.value)==null?void 0:s.children[0];i==null||i.setAttribute("width",t.size),i==null||i.setAttribute("height",t.size)}return H1(n,()=>K2(r),{immediate:!0}),(i,s)=>(Y1(),Q0("span",{ref_key:"refIcon",ref:o,style:h3({color:e.color??void 0}),class:"liman-icons flex",innerHTML:n.value},null,12,Cd))}}),Xt=(e,t)=>{const o=e.__vccOpts||e;for(const[n,r]of t)o[n]=r;return o},gd=Xt(cd,[["__scopeId","data-v-d43d3684"]]),eo=he("nav",{state:()=>({navBarRoutes:[{name:"home",path:"/home",icon:"vuesax-linear:home-2",label:"خانه",index:1},{name:"search",path:"/search",icon:"vuesax-linear:search-normal-1",label:"جستجو",index:2},{name:"cart",path:"/cart",icon:"vuesax-linear:bag-happy",label:"سبد خرید",index:3},{name:"ordersList",path:"/orders",icon:"vuesax-linear:receipt-text",label:"سفارشات",index:4},{name:"userPage::hasSubRoute",path:"/user",icon:"vuesax-linear:user",label:"پروفایل",index:5}],activeLink:1,showNav:!0,pageTransition:"right"}),actions:{setNavVisibility(e){this.showNav=e},setActiveLink(e){this.activeLink=e},setPgaTransition(e){this.pageTransition=e}}}),vd={class:"tabbar"},md={class:"tabbar__label"},fd=q1({__name:"Navigation",setup(e){const t=eo(),o=B1(()=>-(t.activeLink-1)*100);return(n,r)=>{const i=ie("router-link");return Rt((Y1(),Q0("nav",vd,[_2("div",{class:"tabbar__inner",style:h3({"--count":W1(t).navBarRoutes.length})},[_2("div",{class:"tabbar__indicator",style:h3({transform:`translateX(${o.value}%)`}),"aria-hidden":"true"},null,4),(Y1(!0),Q0(r2,null,Ms(W1(t).navBarRoutes,s=>(Y1(),c0(i,{key:s.index,to:{name:s.name},class:J9(["tabbar__item",{"is-active":W1(t).activeLink===s.index}])},{default:h0(()=>[e1(gd,{icon:s.icon,size:"21"},null,8,["icon"]),_2("span",md,A3(s.label),1)]),_:2},1032,["to","class"]))),128))],4)],512)),[[Jt,W1(t).showNav]])}}}),Md=Xt(fd,[["__scopeId","data-v-e2aa88fe"]]),jd=he("windowData",{state:()=>({width:0,pullingDown:!1}),actions:{setWidth(e){this.width=e},setPullingDown(e){this.pullingDown=e}}}),Dd=q1({__name:"MasterLayout",setup(e){const t=jd(),o=g1(null);return o4(()=>{t.setWidth(window.innerWidth)}),td(o,n=>{const r=n[0],{width:i}=r.contentRect;t.width!==i&&t.setWidth(i)}),(n,r)=>{const i=ie("router-view");return Y1(),Q0("section",{ref_key:"content",ref:o},[e1(i),e1(Md),r[0]||(r[0]=_2("div",{class:"bg-primary top-[-2rem] fixed h-[2rem] w-full z-10"},null,-1))],512)}}}),xd={};function Ld(e,t){const o=ie("router-view");return Y1(),Q0("div",null,[e1(o)])}const Hd=Xt(xd,[["render",Ld]]);function Lt(){}const F0=Object.assign,Vd=typeof window<"u",to=e=>e!==null&&typeof e=="object",e3=e=>e!=null,N9=e=>typeof e=="function",Zd=e=>to(e)&&N9(e.then)&&N9(e.catch),cr=e=>typeof e=="number"||/^\d+(\.\d+)?$/.test(e),_d=()=>Vd?/ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()):!1;function Jn(e,t){const o=t.split(".");let n=e;return o.forEach(r=>{var i;n=to(n)&&(i=n[r])!=null?i:""}),n}function yd(e,t,o){return t.reduce((n,r)=>(n[r]=e[r],n),{})}const oo=null,j2=[Number,String],U2={type:Boolean,default:!0},Da=e=>({type:j2,default:e}),v2=e=>({type:String,default:e});var no=typeof window<"u",Bd=e=>e===window,Yn=(e,t)=>({top:0,left:0,right:e,bottom:t,width:e,height:t}),bd=e=>{const t=W1(e);if(Bd(t)){const o=t.innerWidth,n=t.innerHeight;return Yn(o,n)}return t!=null&&t.getBoundingClientRect?t.getBoundingClientRect():Yn(0,0)};function Ed(e){const t=d2(e,null);if(t){const o=b2(),{link:n,unlink:r,internalChildren:i}=t;n(o),r9(()=>r(o));const s=B1(()=>i.indexOf(o));return{parent:t,index:s}}return{parent:null,index:g1(-1)}}function Sd(e){const t=[],o=n=>{Array.isArray(n)&&n.forEach(r=>{var i;T0(r)&&(t.push(r),(i=r.component)!=null&&i.subTree&&(t.push(r.component.subTree),o(r.component.subTree.children)),r.children&&o(r.children))})};return o(e),t}var Qn=(e,t)=>{const o=e.indexOf(t);return o===-1?e.findIndex(n=>t.key!==void 0&&t.key!==null&&n.type===t.type&&n.key===t.key):o};function Ad(e,t,o){const n=Sd(e.subTree.children);o.sort((i,s)=>Qn(n,i.vnode)-Qn(n,s.vnode));const r=o.map(i=>i.proxy);t.sort((i,s)=>{const d=r.indexOf(i),l=r.indexOf(s);return d-l})}function Id(e){const t=y2([]),o=y2([]),n=b2();return{children:t,linkChildren:i=>{a3(e,Object.assign({link:l=>{l.proxy&&(o.push(l),t.push(l.proxy),Ad(n,t,o))},unlink:l=>{const h=o.indexOf(l);t.splice(h,1),o.splice(h,1)},children:t,internalChildren:o},i))}}}function gr(e){let t;n0(()=>{e(),K2(()=>{t=!0})}),ne(()=>{t&&e()})}function vr(e,t,o={}){if(!no)return;const{target:n=window,passive:r=!1,capture:i=!1}=o;let s=!1,d;const l=p=>{if(s)return;const w=W1(p);w&&!d&&(w.addEventListener(e,t,{capture:i,passive:r}),d=!0)},h=p=>{if(s)return;const w=W1(p);w&&d&&(w.removeEventListener(e,t,i),d=!1)};r9(()=>h(n)),o9(()=>h(n)),gr(()=>l(n));let u;return b1(n)&&(u=H1(n,(p,w)=>{h(w),l(p)})),()=>{u==null||u(),h(n),s=!0}}var f9,Xe;function Pd(){if(!f9&&(f9=g1(0),Xe=g1(0),no)){const e=()=>{f9.value=window.innerWidth,Xe.value=window.innerHeight};e(),window.addEventListener("resize",e,{passive:!0}),window.addEventListener("orientationchange",e,{passive:!0})}return{width:f9,height:Xe}}var Od=/scroll|auto|overlay/i,mr=no?window:void 0;function Td(e){return e.tagName!=="HTML"&&e.tagName!=="BODY"&&e.nodeType===1}function Ht(e,t=mr){let o=e;for(;o&&o!==t&&Td(o);){const{overflowY:n}=window.getComputedStyle(o);if(Od.test(n))return o;o=o.parentNode}return t}function xa(e,t=mr){const o=g1();return n0(()=>{e.value&&(o.value=Ht(e.value,t))}),o}function La(e){const t="scrollTop"in e?e.scrollTop:e.pageYOffset;return Math.max(t,0)}_d();const Rd=e=>e.stopPropagation();function ro(e,t){(typeof e.cancelable!="boolean"||e.cancelable)&&e.preventDefault(),t&&Rd(e)}const{width:Fd,height:Nd}=Pd();function Z2(e){if(e3(e))return cr(e)?`${e}px`:String(e)}function $d(e){if(e3(e)){if(Array.isArray(e))return{width:Z2(e[0]),height:Z2(e[1])};const t=Z2(e);return{width:t,height:t}}}function Ud(e){const t={};return e!==void 0&&(t.zIndex=+e),t}const Wd=/-(\w)/g,fr=e=>e.replace(Wd,(t,o)=>o.toUpperCase()),{hasOwnProperty:zd}=Object.prototype;function qd(e,t,o){const n=t[o];e3(n)&&(!zd.call(e,o)||!to(n)?e[o]=n:e[o]=Mr(Object(e[o]),n))}function Mr(e,t){return Object.keys(t).forEach(o=>{qd(e,t,o)}),e}var Kd={name:"姓名",tel:"电话",save:"保存",clear:"清空",undo:"撤销",cancel:"取消",confirm:"确认",delete:"删除",loading:"加载中...",noCoupon:"暂无优惠券",nameEmpty:"请填写姓名",addContact:"添加联系人",telInvalid:"请填写正确的电话",vanCalendar:{end:"结束",start:"开始",title:"日期选择",weekdays:["日","一","二","三","四","五","六"],monthTitle:(e,t)=>`${e}年${t}月`,rangePrompt:e=>`最多选择 ${e} 天`},vanCascader:{select:"请选择"},vanPagination:{prev:"上一页",next:"下一页"},vanPullRefresh:{pulling:"下拉即可刷新...",loosing:"释放即可刷新..."},vanSubmitBar:{label:"合计:"},vanCoupon:{unlimited:"无门槛",discount:e=>`${e}折`,condition:e=>`满${e}元可用`},vanCouponCell:{title:"优惠券",count:e=>`${e}张可用`},vanCouponList:{exchange:"兑换",close:"不使用",enable:"可用",disabled:"不可用",placeholder:"输入优惠码"},vanAddressEdit:{area:"地区",areaEmpty:"请选择地区",addressEmpty:"请填写详细地址",addressDetail:"详细地址",defaultAddress:"设为默认收货地址"},vanAddressList:{add:"新增地址"}};const Xn=g1("zh-CN"),e5=y2({"zh-CN":Kd}),Gd={messages(){return e5[Xn.value]},use(e,t){Xn.value=e,this.add({[e]:t})},add(e={}){Mr(e5,e)}};var Jd=Gd;function Yd(e){const t=fr(e)+".";return(o,...n)=>{const r=Jd.messages(),i=Jn(r,t+o)||Jn(r,o);return N9(i)?i(...n):i}}function Vt(e,t){return t?typeof t=="string"?` ${e}--${t}`:Array.isArray(t)?t.reduce((o,n)=>o+Vt(e,n),""):Object.keys(t).reduce((o,n)=>o+(t[n]?Vt(e,n):""),""):""}function Qd(e){return(t,o)=>(t&&typeof t!="string"&&(o=t,t=""),t=t?`${e}__${t}`:e,`${t}${Vt(t,o)}`)}function r0(e){const t=`van-${e}`;return[t,Qd(t),Yd(t)]}const io="van-hairline",Xd=`${io}--top`,el=`${io}--left`,tl=`${io}--surround`,ol="van-haptics-feedback",t5=5;function jr(e,{args:t=[],done:o,canceled:n,error:r}){if(e){const i=e.apply(null,t);Zd(i)?i.then(s=>{s?o():n&&n()}).catch(r||Lt):i?o():n&&n()}else o()}function H0(e){return e.install=t=>{const{name:o}=e;o&&(t.component(o,e),t.component(fr(`-${o}`),e))},e}const Dr=Symbol();function nl(e){const t=d2(Dr,null);t&&H1(t,o=>{o&&e()})}const rl=(e,t)=>{const o=g1(),n=()=>{o.value=bd(e).height};return n0(()=>{K2(n);for(let r=1;r<=3;r++)setTimeout(n,100*r)}),nl(()=>K2(n)),H1([Fd,Nd],n),o};function il(e,t){const o=rl(e);return n=>e1("div",{class:t("placeholder"),style:{height:o.value?`${o.value}px`:void 0}},[n()])}const[xr,o5]=r0("action-bar"),Lr=Symbol(xr),sl={placeholder:Boolean,safeAreaInsetBottom:U2};var dl=q1({name:xr,props:sl,setup(e,{slots:t}){const o=g1(),n=il(o,o5),{linkChildren:r}=Id(Lr);r();const i=()=>{var s;return e1("div",{ref:o,class:[o5(),{"van-safe-area-bottom":e.safeAreaInsetBottom}]},[(s=t.default)==null?void 0:s.call(t)])};return()=>e.placeholder?n(i):i()}});const ll=H0(dl);function Hr(e){const t=b2();t&&F0(t.proxy,e)}const Vr={to:[String,Object],url:String,replace:Boolean};function al({to:e,url:t,replace:o,$router:n}){e&&n?n[o?"replace":"push"](e):t&&(o?location.replace(t):location.href=t)}function Zr(){const e=b2().proxy;return()=>al(e)}const[kl,n5]=r0("badge"),hl={dot:Boolean,max:j2,tag:v2("div"),color:String,offset:Array,content:j2,showZero:U2,position:v2("top-right")};var ul=q1({name:kl,props:hl,setup(e,{slots:t}){const o=()=>{if(t.content)return!0;const{content:d,showZero:l}=e;return e3(d)&&d!==""&&(l||d!==0&&d!=="0")},n=()=>{const{dot:d,max:l,content:h}=e;if(!d&&o())return t.content?t.content():e3(l)&&cr(h)&&+h>+l?`${l}+`:h},r=d=>d.startsWith("-")?d.replace("-",""):`-${d}`,i=B1(()=>{const d={background:e.color};if(e.offset){const[l,h]=e.offset,{position:u}=e,[p,w]=u.split("-");t.default?(typeof h=="number"?d[p]=Z2(p==="top"?h:-h):d[p]=p==="top"?Z2(h):r(h),typeof l=="number"?d[w]=Z2(w==="left"?l:-l):d[w]=w==="left"?Z2(l):r(l)):(d.marginTop=Z2(h),d.marginLeft=Z2(l))}return d}),s=()=>{if(o()||e.dot)return e1("div",{class:n5([e.position,{dot:e.dot,fixed:!!t.default}]),style:i.value},[n()])};return()=>{if(t.default){const{tag:d}=e;return e1(d,{class:n5("wrapper")},{default:()=>[t.default(),s()]})}return s()}}});const pl=H0(ul);let wl=2e3;const Cl=()=>++wl,[cl]=r0("config-provider"),gl=Symbol(cl),[vl,r5]=r0("icon"),ml=e=>e==null?void 0:e.includes("/"),fl={dot:Boolean,tag:v2("i"),name:String,size:j2,badge:j2,color:String,badgeProps:Object,classPrefix:String};var Ml=q1({name:vl,props:fl,setup(e,{slots:t}){const o=d2(gl,null),n=B1(()=>e.classPrefix||(o==null?void 0:o.iconPrefix)||r5());return()=>{const{tag:r,dot:i,name:s,size:d,badge:l,color:h}=e,u=ml(s);return e1(pl,w3({dot:i,tag:r,class:[n.value,u?"":`${n.value}-${s}`],style:{color:h,fontSize:Z2(d)},content:l},e.badgeProps),{default:()=>{var p;return[(p=t.default)==null?void 0:p.call(t),u&&e1("img",{class:r5("image"),src:s},null)]}})}}});const _r=H0(Ml),[jl,U3]=r0("loading"),Dl=Array(12).fill(null).map((e,t)=>e1("i",{class:U3("line",String(t+1))},null)),xl=e1("svg",{class:U3("circular"),viewBox:"25 25 50 50"},[e1("circle",{cx:"50",cy:"50",r:"20",fill:"none"},null)]),Ll={size:j2,type:v2("circular"),color:String,vertical:Boolean,textSize:j2,textColor:String};var Hl=q1({name:jl,props:Ll,setup(e,{slots:t}){const o=B1(()=>F0({color:e.color},$d(e.size))),n=()=>{const i=e.type==="spinner"?Dl:xl;return e1("span",{class:U3("spinner",e.type),style:o.value},[t.icon?t.icon():i])},r=()=>{var i;if(t.default)return e1("span",{class:U3("text"),style:{fontSize:Z2(e.textSize),color:(i=e.textColor)!=null?i:e.color}},[t.default()])};return()=>{const{type:i,vertical:s}=e;return e1("div",{class:U3([i,{vertical:s}]),"aria-live":"polite","aria-busy":!0},[n(),r()])}}});const Vl=H0(Hl),[Zl,n3]=r0("button"),_l=F0({},Vr,{tag:v2("button"),text:String,icon:String,type:v2("default"),size:v2("normal"),color:String,block:Boolean,plain:Boolean,round:Boolean,square:Boolean,loading:Boolean,hairline:Boolean,disabled:Boolean,iconPrefix:String,nativeType:v2("button"),loadingSize:j2,loadingText:String,loadingType:String,iconPosition:v2("left")});var yl=q1({name:Zl,props:_l,emits:["click"],setup(e,{emit:t,slots:o}){const n=Zr(),r=()=>o.loading?o.loading():e1(Vl,{size:e.loadingSize,type:e.loadingType,class:n3("loading")},null),i=()=>{if(e.loading)return r();if(o.icon)return e1("div",{class:n3("icon")},[o.icon()]);if(e.icon)return e1(_r,{name:e.icon,class:n3("icon"),classPrefix:e.iconPrefix},null)},s=()=>{let h;if(e.loading?h=e.loadingText:h=o.default?o.default():e.text,h)return e1("span",{class:n3("text")},[h])},d=()=>{const{color:h,plain:u}=e;if(h){const p={color:u?h:"white"};return u||(p.background=h),h.includes("gradient")?p.border=0:p.borderColor=h,p}},l=h=>{e.loading?ro(h):e.disabled||(t("click",h),n())};return()=>{const{tag:h,type:u,size:p,block:w,round:v,plain:f,square:x,loading:S,disabled:O,hairline:D,nativeType:H,iconPosition:L}=e,Z=[n3([u,p,{plain:f,block:w,round:v,square:x,loading:S,disabled:O,hairline:D}]),{[tl]:D}];return e1(h,{type:H,class:Z,style:d(),disabled:O,onClick:l},{default:()=>[e1("div",{class:n3("content")},[L==="left"&&i(),s(),L==="right"&&i()])]})}}});const Zt=H0(yl),[Bl,bl]=r0("action-bar-button"),El=F0({},Vr,{type:String,text:String,icon:String,color:String,loading:Boolean,disabled:Boolean});var Sl=q1({name:Bl,props:El,setup(e,{slots:t}){const o=Zr(),{parent:n,index:r}=Ed(Lr),i=B1(()=>{if(n){const d=n.children[r.value-1];return!(d&&"isButton"in d)}}),s=B1(()=>{if(n){const d=n.children[r.value+1];return!(d&&"isButton"in d)}});return Hr({isButton:!0}),()=>{const{type:d,icon:l,text:h,color:u,loading:p,disabled:w}=e;return e1(Zt,{class:bl([d,{last:s.value,first:i.value}]),size:"large",type:d,icon:l,color:u,loading:p,disabled:w,onClick:o},{default:()=>[t.default?t.default():h]})}}});const i5=H0(Sl),so={show:Boolean,zIndex:j2,overlay:U2,duration:j2,teleport:[String,Object],lockScroll:U2,lazyRender:U2,beforeClose:Function,overlayProps:Object,overlayStyle:Object,overlayClass:oo,transitionAppear:Boolean,closeOnClickOverlay:U2},Al=Object.keys(so);function Il(e,t){return e>t?"horizontal":t>e?"vertical":""}function Pl(){const e=g1(0),t=g1(0),o=g1(0),n=g1(0),r=g1(0),i=g1(0),s=g1(""),d=g1(!0),l=()=>s.value==="vertical",h=()=>s.value==="horizontal",u=()=>{o.value=0,n.value=0,r.value=0,i.value=0,s.value="",d.value=!0};return{move:v=>{const f=v.touches[0];o.value=(f.clientX<0?0:f.clientX)-e.value,n.value=f.clientY-t.value,r.value=Math.abs(o.value),i.value=Math.abs(n.value);const x=10;(!s.value||r.valuet5||i.value>t5)&&(d.value=!1)},start:v=>{u(),e.value=v.touches[0].clientX,t.value=v.touches[0].clientY},reset:u,startX:e,startY:t,deltaX:o,deltaY:n,offsetX:r,offsetY:i,direction:s,isVertical:l,isHorizontal:h,isTap:d}}let _3=0;const s5="van-overflow-hidden";function Ol(e,t){const o=Pl(),n="01",r="10",i=u=>{o.move(u);const p=o.deltaY.value>0?r:n;let w=Ht(u.target,e.value);for(;w.scrollHeight<=w.offsetHeight&&w!==e.value&&w.parentElement;)w=Ht(w.parentElement,e.value);const{scrollHeight:v,offsetHeight:f,scrollTop:x}=w;let S="11";x===0?S=f>=v?"00":"01":x+f>=v&&(S="10"),S!=="11"&&o.isVertical()&&!(parseInt(S,2)&parseInt(p,2))&&ro(u,!0)},s=()=>{document.addEventListener("touchstart",o.start),document.addEventListener("touchmove",i,{passive:!1}),_3||document.body.classList.add(s5),_3++},d=()=>{_3&&(document.removeEventListener("touchstart",o.start),document.removeEventListener("touchmove",i),_3--,_3||document.body.classList.remove(s5))},l=()=>t()&&s(),h=()=>t()&&d();gr(l),o9(h),n9(h),H1(t,u=>{u?s():d()})}function yr(e){const t=g1(!1);return H1(e,o=>{o&&(t.value=o)},{immediate:!0}),o=>()=>t.value?o():null}const d5=()=>{var e;const{scopeId:t}=((e=b2())==null?void 0:e.vnode)||{};return t?{[t]:""}:null},[Tl,Rl]=r0("overlay"),Fl={show:Boolean,zIndex:j2,duration:j2,className:oo,lockScroll:U2,lazyRender:U2,customStyle:Object,teleport:[String,Object]};var Nl=q1({name:Tl,inheritAttrs:!1,props:Fl,setup(e,{attrs:t,slots:o}){const n=g1(),r=yr(()=>e.show||!e.lazyRender),i=d=>{e.lockScroll&&ro(d,!0)},s=r(()=>{var d;const l=F0(Ud(e.zIndex),e.customStyle);return e3(e.duration)&&(l.animationDuration=`${e.duration}s`),Rt(e1("div",w3({ref:n,style:l,class:[Rl(),e.className]},t),[(d=o.default)==null?void 0:d.call(o)]),[[Jt,e.show]])});return vr("touchmove",i,{target:n}),()=>{const d=e1(_4,{name:"van-fade",appear:!0},{default:s});return e.teleport?e1(K5,{to:e.teleport},{default:()=>[d]}):d}}});const $l=H0(Nl),Ul=F0({},so,{round:Boolean,position:v2("center"),closeIcon:v2("cross"),closeable:Boolean,transition:String,iconPrefix:String,closeOnPopstate:Boolean,closeIconPosition:v2("top-right"),destroyOnClose:Boolean,safeAreaInsetTop:Boolean,safeAreaInsetBottom:Boolean}),[Wl,l5]=r0("popup");var zl=q1({name:Wl,inheritAttrs:!1,props:Ul,emits:["open","close","opened","closed","keydown","update:show","clickOverlay","clickCloseIcon"],setup(e,{emit:t,attrs:o,slots:n}){let r,i;const s=g1(),d=g1(),l=yr(()=>e.show||!e.lazyRender),h=B1(()=>{const T={zIndex:s.value};if(e3(e.duration)){const _=e.position==="center"?"animationDuration":"transitionDuration";T[_]=`${e.duration}s`}return T}),u=()=>{r||(r=!0,s.value=e.zIndex!==void 0?+e.zIndex:Cl(),t("open"))},p=()=>{r&&jr(e.beforeClose,{done(){r=!1,t("close"),t("update:show",!1)}})},w=T=>{t("clickOverlay",T),e.closeOnClickOverlay&&p()},v=()=>{if(e.overlay){const T=F0({show:e.show,class:e.overlayClass,zIndex:s.value,duration:e.duration,customStyle:e.overlayStyle,role:e.closeOnClickOverlay?"button":void 0,tabindex:e.closeOnClickOverlay?0:void 0},e.overlayProps);return e1($l,w3(T,d5(),{onClick:w}),{default:n["overlay-content"]})}},f=T=>{t("clickCloseIcon",T),p()},x=()=>{if(e.closeable)return e1(_r,{role:"button",tabindex:0,name:e.closeIcon,class:[l5("close-icon",e.closeIconPosition),ol],classPrefix:e.iconPrefix,onClick:f},null)};let S;const O=()=>{S&&clearTimeout(S),S=setTimeout(()=>{t("opened")})},D=()=>t("closed"),H=T=>t("keydown",T),L=l(()=>{var T;const{destroyOnClose:_,round:U,position:A,safeAreaInsetTop:q,safeAreaInsetBottom:r1,show:F}=e;if(!(!F&&_))return Rt(e1("div",w3({ref:d,style:h.value,role:"dialog",tabindex:0,class:[l5({round:U,[A]:A}),{"van-safe-area-top":q,"van-safe-area-bottom":r1}],onKeydown:H},o,d5()),[(T=n.default)==null?void 0:T.call(n),x()]),[[Jt,F]])}),Z=()=>{const{position:T,transition:_,transitionAppear:U}=e,A=T==="center"?"van-fade":`van-popup-slide-${T}`;return e1(_4,{name:_||A,appear:U,onAfterEnter:O,onAfterLeave:D},{default:L})};return H1(()=>e.show,T=>{T&&!r&&(u(),o.tabindex===0&&K2(()=>{var _;(_=d.value)==null||_.focus()})),!T&&r&&(r=!1,t("close"))}),Hr({popupRef:d}),Ol(d,()=>e.show&&e.lockScroll),vr("popstate",()=>{e.closeOnPopstate&&(p(),i=!1)}),n0(()=>{e.show&&u()}),ne(()=>{i&&(t("update:show",!0),i=!1)}),o9(()=>{e.show&&e.teleport&&(p(),i=!0)}),a3(Dr,()=>e.show),()=>e.teleport?e1(K5,{to:e.teleport},{default:()=>[v(),Z()]}):e1(r2,null,[v(),Z()])}});const ql=H0(zl),[Kl,R2,M9]=r0("dialog"),Gl=F0({},so,{title:String,theme:String,width:j2,message:[String,Function],callback:Function,allowHtml:Boolean,className:oo,transition:v2("van-dialog-bounce"),messageAlign:String,closeOnPopstate:U2,showCancelButton:Boolean,cancelButtonText:String,cancelButtonColor:String,cancelButtonDisabled:Boolean,confirmButtonText:String,confirmButtonColor:String,confirmButtonDisabled:Boolean,showConfirmButton:U2,closeOnClickOverlay:Boolean,keyboardEnabled:U2,destroyOnClose:Boolean}),Jl=[...Al,"transition","closeOnPopstate","destroyOnClose"];var Yl=q1({name:Kl,props:Gl,emits:["confirm","cancel","keydown","update:show"],setup(e,{emit:t,slots:o}){const n=g1(),r=y2({confirm:!1,cancel:!1}),i=O=>t("update:show",O),s=O=>{var D;i(!1),(D=e.callback)==null||D.call(e,O)},d=O=>()=>{e.show&&(t(O),e.beforeClose?(r[O]=!0,jr(e.beforeClose,{args:[O],done(){s(O),r[O]=!1},canceled(){r[O]=!1}})):s(O))},l=d("cancel"),h=d("confirm"),u=J6(O=>{var D,H;if(!e.keyboardEnabled||O.target!==((H=(D=n.value)==null?void 0:D.popupRef)==null?void 0:H.value))return;({Enter:e.showConfirmButton?h:Lt,Escape:e.showCancelButton?l:Lt})[O.key](),t("keydown",O)},["enter","esc"]),p=()=>{const O=o.title?o.title():e.title;if(O)return e1("div",{class:R2("header",{isolated:!e.message&&!o.default})},[O])},w=O=>{const{message:D,allowHtml:H,messageAlign:L}=e,Z=R2("message",{"has-title":O,[L]:L}),T=N9(D)?D():D;return H&&typeof T=="string"?e1("div",{class:Z,innerHTML:T},null):e1("div",{class:Z},[T])},v=()=>{if(o.default)return e1("div",{class:R2("content")},[o.default()]);const{title:O,message:D,allowHtml:H}=e;if(D){const L=!!(O||o.title);return e1("div",{key:H?1:0,class:R2("content",{isolated:!L})},[w(L)])}},f=()=>e1("div",{class:[Xd,R2("footer")]},[e.showCancelButton&&e1(Zt,{size:"large",text:e.cancelButtonText||M9("cancel"),class:R2("cancel"),style:{color:e.cancelButtonColor},loading:r.cancel,disabled:e.cancelButtonDisabled,onClick:l},null),e.showConfirmButton&&e1(Zt,{size:"large",text:e.confirmButtonText||M9("confirm"),class:[R2("confirm"),{[el]:e.showCancelButton}],style:{color:e.confirmButtonColor},loading:r.confirm,disabled:e.confirmButtonDisabled,onClick:h},null)]),x=()=>e1(ll,{class:R2("footer")},{default:()=>[e.showCancelButton&&e1(i5,{type:"warning",text:e.cancelButtonText||M9("cancel"),class:R2("cancel"),color:e.cancelButtonColor,loading:r.cancel,disabled:e.cancelButtonDisabled,onClick:l},null),e.showConfirmButton&&e1(i5,{type:"danger",text:e.confirmButtonText||M9("confirm"),class:R2("confirm"),color:e.confirmButtonColor,loading:r.confirm,disabled:e.confirmButtonDisabled,onClick:h},null)]}),S=()=>o.footer?o.footer():e.theme==="round-button"?x():f();return()=>{const{width:O,title:D,theme:H,message:L,className:Z}=e;return e1(ql,w3({ref:n,role:"dialog",class:[R2([H]),Z],style:{width:Z2(O)},tabindex:0,"aria-labelledby":D||L,onKeydown:u,"onUpdate:show":i},yd(e,Jl)),{default:()=>[p(),v(),S()]})}}});const Ql=H0(Yl),Xl={class:"my-4"},ea={class:"w-full flex justify-center"},ta={class:"w-full flex justify-center text-[18px] font-semibold"},oa={class:"border-t border-solid border-[#E5E7EB] pt-4 mx-2 mt-6 font-semibold text-[15px]"},na=q1({__name:"DialogVantOneButton",props:{timeOut:{},text1:{},text2:{},text3:{}},setup(e){return(t,o)=>(Y1(),c0(W1(Ql),null,{default:h0(()=>[_2("div",Xl,[_2("div",ea,[j9(t.$slots,"img",{},()=>[x9(A3(e.text2),1)])]),_2("div",ta,[j9(t.$slots,"title",{},()=>[x9(A3(e.text1),1)])]),_2("div",oa,[j9(t.$slots,"button",{},()=>[x9(A3(e.text3),1)])])])]),_:3}))}});function ra(){const{offlineReady:e,needRefresh:t,updateServiceWorker:o}=ar(),n=async()=>{await o(),e.value=!1,t.value=!1};rs(async()=>(W1(e)||W1(t))&&await n())}const ia="0.0.1",et={version:ia},sa=q1({__name:"App",setup(e){const t=x8(),{updateServiceWorker:o}=ar(),n=B1(()=>t.currentRoute.value.meta&&t.currentRoute.value.meta.layout==="FullPage"?Hd:Dd),r=g1(!1);function i(){const d=localStorage.getItem("version");d?d!==et.version&&(r.value=!0):localStorage.setItem("version",et.version)}function s(){localStorage.setItem("version",et.version),o(),window.location.reload()}return n0(()=>{ra(),i()}),(d,l)=>{const h=ie("router-view");return Y1(),Q0("div",null,[(Y1(),c0(Io(n.value),{class:"relative"},{default:h0(()=>[e1(h,null,{default:h0(({Component:u,route:p})=>[(Y1(),c0(ps,null,[(Y1(),c0(qs,null,{default:h0(()=>[(Y1(),c0(Io(u),{key:p.name}))]),_:2},1024))],1024))]),_:1})]),_:1})),e1(na,{timeOut:-1,show:r.value,"onUpdate:show":l[1]||(l[1]=u=>r.value=u),closeOnClickOverlay:!0},{img:h0(()=>[e1(W1(F8),{class:"w-full aspect-square",autoplay:"",loop:"",src:"https://lottie.host/cb620e8e-c64a-42e8-a6b5-8844146e5999/nmft7oBO8q.json"})]),title:h0(()=>[...l[2]||(l[2]=[_2("div",{class:"p-8 text-justify"},"نسخه جدید منتزر منتشر شد!",-1)])]),button:h0(()=>[_2("div",{class:"text-center text-[#1C2D56]",onClick:l[0]||(l[0]=u=>s())},"به روز رسانی")]),_:1},8,["show"])])}}}),da=he("session",{state:()=>({customerId:localStorage.getItem("gold-bank:customerId"),mobile:localStorage.getItem("gold-bank:mobile")}),actions:{setCustomerId(e){this.customerId=e,localStorage.setItem("gold-bank:customerId",e)},login(e,t){this.customerId=e,this.mobile=t,localStorage.setItem("gold-bank:customerId",e),localStorage.setItem("gold-bank:mobile",t),localStorage.setItem("appToken",e)},logout(){this.customerId=null,this.mobile=null,localStorage.removeItem("gold-bank:customerId"),localStorage.removeItem("gold-bank:mobile"),localStorage.removeItem("appToken")}}}),la=he("transition",{state:()=>({transitionFlag:!0,transitionEnded:!0,headerHeight:0}),actions:{setTransitionFlag(e){this.transitionFlag=e},setTransitionEnded(e){this.transitionEnded=e},setHeaderHeight(e){this.headerHeight=e}}}),lo=D8({history:t8(),scrollBehavior(e,t,o){return o||{top:0}},routes:[{path:"/home",name:"home",component:()=>p2(()=>import("./HomeView-CRWeDhDU.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]))},{path:"/product/:id",name:"singleProduct",component:()=>p2(()=>import("./SingleProduct-DssXZ7g8.js").then(e=>e.a),__vite__mapDeps([4,1,2,3,5,6,7,8,9,10,11])),props:!0,meta:{layout:"FullPage"}},{path:"/newest",name:"newestProduct",component:()=>p2(()=>import("./NewestView-DtmcOiJN.js"),__vite__mapDeps([22,23,24,1,2,3,15,16,25,4,5,6,7,8,9,10,11,19,20,26,27])),meta:{layout:"FullPage"}},{path:"/cart",name:"cart",component:()=>p2(()=>import("./CartView-Bz867OrP.js"),__vite__mapDeps([28,10,23,24,1,2,3,6,7,8,9,19,20,18,29,30,31]))},{path:"/login",name:"login",component:()=>p2(()=>import("./LoginRegisterView-CfYXrVGb.js"),__vite__mapDeps([32,23,24,5,9,29,1,2,3,30,20,6,7,33])),meta:{layout:"FullPage"}},{path:"/user",name:"userPage::hasSubRoute",component:()=>p2(()=>import("./DashboardView-CpfMS70r.js"),__vite__mapDeps([34,15,16,12,13,2,14,6,7,10,9,18,35]))},{path:"/orders",name:"ordersList",component:()=>p2(()=>import("./OrdersView-CU0UPays.js"),__vite__mapDeps([36,23,24,1,2,3,37,38,13,9,19,20,18,39])),meta:{requiresAuth:!0}},{path:"/transactions",name:"transactionsList",component:()=>p2(()=>import("./TransactionsView-CyfV2zci.js"),__vite__mapDeps([40,23,24,1,2,3,15,16,13,9,19,20,41])),meta:{requiresAuth:!0}},{path:"/profile",name:"profileData",component:()=>p2(()=>import("./ProfileView-iUFrvwpr.js"),__vite__mapDeps([42,23,24,15,16,9,43])),meta:{requiresAuth:!0}},{path:"/favorites",name:"favoritesList",component:()=>p2(()=>import("./FavoritesView-CBkkcvfZ.js"),__vite__mapDeps([44,23,24,1,2,3,15,16,25,4,5,6,7,8,9,10,11,19,20,26,45])),meta:{requiresAuth:!0}},{path:"/notifications",name:"notifications",component:()=>p2(()=>import("./NotificationsView-BVjfsl9P.js"),__vite__mapDeps([46,23,24,47]))},{path:"/search",name:"search",component:()=>p2(()=>import("./SearchView-BsJur4gA.js"),__vite__mapDeps([48,23,24,1,2,3,37,38,19,20,30,15,16,25,4,5,6,7,8,9,10,11,26,17,18,49]))},{path:"/collection/:id?",name:"collection",component:()=>p2(()=>import("./CollectionView-BYIAr_7T.js"),__vite__mapDeps([50,23,24,1,2,3,15,16,25,4,5,6,7,8,9,10,11,19,20,26,51]))},{path:"/",redirect:{name:"home"}},{path:"/:pathMatch(.*)*",redirect:{name:"home"}}]});lo.beforeEach(e=>{const t=da(),o=eo();if(e.name==="login"&&t.customerId)return{name:"home"};if(e.meta.requiresAuth&&!t.customerId)return{name:"login",query:{redirect:e.fullPath}};e.name==="singleProduct"?o.setPgaTransition("slideDown"):o.setPgaTransition(void 0)});lo.afterEach(e=>{const t=eo(),o=la();o.setTransitionFlag(!1),o.setTransitionEnded(!1),setTimeout(()=>{o.setTransitionFlag(!0)},100);const n=t.navBarRoutes.find(r=>e.name===r.name);n?(t.setActiveLink(n.index),t.setNavVisibility(!0)):t.setNavVisibility(!1)});const aa={class:"px-[16px] max-w-screen-md m-auto relative no-scrollbar"},ka=q1({__name:"Container",props:{padding:{}},setup(e){return(t,o)=>(Y1(),Q0("main",aa,[j9(t.$slots,"default")]))}}),a5="/assets/montzar-logo-05_bmbid.png",s9=Q6(sa);s9.use(t7());s9.use(lo);s9.use(g7,{loading:a5,error:a5});s9.component("container",ka);s9.mount("#app");export{ne as $,j9 as A,y2 as B,o4 as C,x9 as D,da as E,r2 as F,H1 as G,ca as H,gd as I,fa as J,Jt as K,Vl as L,K2 as M,Nt as N,r9 as O,b2 as P,d2 as Q,rs as R,de as S,_4 as T,a3 as U,D0 as V,Ca as W,Ni as X,c1 as Y,ha as Z,Xt as _,n9 as a,eo as a0,ma as a1,Ma as a2,dn as a3,J6 as a4,r0 as a5,j2 as a6,xa as a7,vr as a8,ro as a9,Da as aa,La as ab,Pl as ac,H0 as ad,wa as ae,pa as af,K5 as ag,w3 as ah,yd as ai,ql as aj,F0 as ak,so as al,oo as am,v2 as an,Ql as ao,T0 as ap,U1 as aq,va as ar,Q3 as as,_2 as b,Q0 as c,q1 as d,J9 as e,o6 as f,g1 as g,B1 as h,Y1 as i,ga as j,e1 as k,ua as l,he as m,h3 as n,n0 as o,a5 as p,h0 as q,Ms as r,ie as s,A3 as t,W1 as u,c0 as v,Rt as w,x8 as x,la as y,ja as z}; +`},D6=["innerHTML"],L6=b1({__name:"Icon",props:{icon:{},color:{default:null},size:{}},setup(e){const t=e,n=Q(),o=N(()=>x6[`${t.icon}`]);function r(){var s;if(!t.size)return;const i=(s=n.value)==null?void 0:s.children[0];i==null||i.setAttribute("width",t.size),i==null||i.setAttribute("height",t.size)}return E1(o,()=>v2(r),{immediate:!0}),(i,s)=>(W(),o1("span",{ref_key:"refIcon",ref:n,style:re({color:e.color??void 0}),class:"liman-icons flex",innerHTML:o.value},null,12,D6))}}),He=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},U1=He(L6,[["__scopeId","data-v-d43d3684"]]),Er=he("nav",{state:()=>({navBarRoutes:[{name:"home",path:"/home",icon:"vuesax-linear:home-2",label:"خانه",index:1},{name:"search",path:"/search",icon:"vuesax-linear:search-normal-1",label:"جستجو",index:2},{name:"cart",path:"/cart",icon:"vuesax-linear:bag-happy",label:"سبد خرید",index:3},{name:"ordersList",path:"/orders",icon:"vuesax-linear:receipt-text",label:"سفارشات",index:4},{name:"userPage::hasSubRoute",path:"/user",icon:"vuesax-linear:user",label:"پروفایل",index:5}],activeLink:1,showNav:!0,pageTransition:"right"}),actions:{setNavVisibility(e){this.showNav=e},setActiveLink(e){this.activeLink=e},setPgaTransition(e){this.pageTransition=e}}}),H6={class:"tabbar"},V6={class:"tabbar__inner"},y6=b1({__name:"Navigation",setup(e){const t=Er(),n=N(()=>`calc(${-(t.activeLink-1)} * (var(--tile) + var(--gap)))`);return(o,r)=>{const i=k9("router-link");return Cr((W(),o1("nav",H6,[O("div",V6,[O("div",{class:"tabbar__indicator",style:re({transform:`translateX(${n.value})`}),"aria-hidden":"true"},null,4),(W(!0),o1(f1,null,ot(v1(t).navBarRoutes,s=>(W(),P1(i,{key:s.index,to:{name:s.name},class:q1(["tabbar__item",{"is-active":v1(t).activeLink===s.index}]),"aria-label":s.label,title:s.label},{default:e2(()=>[b(U1,{icon:s.icon,size:"22"},null,8,["icon"])]),_:2},1032,["to","class","aria-label","title"]))),128))])],512)),[[yr,v1(t).showNav]])}}}),b6=He(y6,[["__scopeId","data-v-c127b61d"]]),Z6=he("windowData",{state:()=>({width:0,pullingDown:!1}),actions:{setWidth(e){this.width=e},setPullingDown(e){this.pullingDown=e}}}),_6=b1({__name:"MasterLayout",setup(e){const t=Z6(),n=Q(null);return fr(()=>{t.setWidth(window.innerWidth)}),k6(n,o=>{const r=o[0],{width:i}=r.contentRect;t.width!==i&&t.setWidth(i)}),(o,r)=>{const i=k9("router-view");return W(),o1("section",{ref_key:"content",ref:n},[b(i,null,{default:e2(({Component:s,route:l})=>[b(_n,{name:"page",mode:"out-in"},{default:e2(()=>[(W(),P1(Ho(s),{key:l.name}))]),_:2},1024)]),_:1}),b(b6),r[0]||(r[0]=O("div",{class:"bg-primary top-[-2rem] fixed h-[2rem] w-full z-10"},null,-1))],512)}}}),B6={};function E6(e,t){const n=k9("router-view");return W(),o1("div",null,[b(n)])}const S6=He(B6,[["render",E6]]),O6=["id"],A6=["id"],P6=["fill"],T6={class:"sa-door"},I6=["fill"],R6=["id"],$6=["id"],F6={class:"sa-coin"},N6=["fill"],q6=["fill"],U6=["id"],z6=["id"],W6={class:"sa-float"},G6={class:"sa-flame"},K6=["fill"],Y6=["clip-path"],Q6=b1({__name:"SheetArt",props:{name:{}},setup(e){const t=z3(),n={a:`${t}-a`,b:`${t}-b`};return(o,r)=>(W(),o1("svg",{class:q1(["sa",`sa--${e.name}`]),viewBox:"0 0 120 120",fill:"none","aria-hidden":"true"},[e.name==="logout"?(W(),o1(f1,{key:0},[O("defs",null,[O("linearGradient",{id:n.a,x1:"0",y1:"0",x2:"1",y2:"1"},[...r[0]||(r[0]=[O("stop",{offset:"0","stop-color":"#A33C55"},null,-1),O("stop",{offset:"1","stop-color":"#5E1427"},null,-1)])],8,O6),O("radialGradient",{id:n.b,cx:".35",cy:".5",r:".75"},[...r[1]||(r[1]=[O("stop",{offset:"0","stop-color":"#FFF7E6"},null,-1),O("stop",{offset:"1","stop-color":"#F4C57A"},null,-1)])],8,A6)]),r[3]||(r[3]=O("ellipse",{class:"sa-shadow",cx:"62",cy:"106",rx:"36",ry:"4",fill:"#7A1B33",opacity:".12"},null,-1)),O("rect",{x:"48",y:"18",width:"40",height:"84",rx:"5",fill:`url(#${n.b})`,stroke:"#7A1B33","stroke-width":"3"},null,8,P6),O("g",T6,[O("path",{d:"M88 18 L88 102 L69 108 L69 12 Z",fill:`url(#${n.a})`,stroke:"#5E1427","stroke-width":"2","stroke-linejoin":"round"},null,8,I6),r[2]||(r[2]=O("circle",{cx:"73.5",cy:"61",r:"2.6",fill:"#F4C57A"},null,-1))]),r[4]||(r[4]=O("g",{class:"sa-arrow","stroke-linecap":"round","stroke-linejoin":"round"},[O("path",{d:"M60 60 H22 M33 48 L21 60 L33 72",stroke:"#fff","stroke-width":"12"}),O("path",{d:"M60 60 H22 M33 48 L21 60 L33 72",stroke:"#7A1B33","stroke-width":"6"})],-1))],64)):e.name==="login"?(W(),o1(f1,{key:1},[r[5]||(r[5]=j9('',3))],64)):e.name==="order"?(W(),o1(f1,{key:2},[O("defs",null,[O("linearGradient",{id:n.a,x1:"0",y1:"0",x2:"0",y2:"1"},[...r[6]||(r[6]=[O("stop",{offset:"0","stop-color":"#EBC06A"},null,-1),O("stop",{offset:"1","stop-color":"#B5843B"},null,-1)])],8,R6),O("radialGradient",{id:n.b,cx:".38",cy:".35",r:".7"},[...r[7]||(r[7]=[O("stop",{offset:"0","stop-color":"#FFF1C7"},null,-1),O("stop",{offset:"1","stop-color":"#E2AC4A"},null,-1)])],8,$6)]),r[9]||(r[9]=O("ellipse",{class:"sa-shadow",cx:"60",cy:"108",rx:"32",ry:"4",fill:"#8D6A46",opacity:".16"},null,-1)),r[10]||(r[10]=O("path",{d:"M46 57 V40 a14 14 0 0 1 28 0 V57",stroke:"#8D6A46","stroke-width":"4.5","stroke-linecap":"round"},null,-1)),O("g",F6,[O("circle",{cx:"60",cy:"31",r:"10",fill:`url(#${n.b})`,stroke:"#B5843B","stroke-width":"2"},null,8,N6),r[8]||(r[8]=O("circle",{cx:"60",cy:"31",r:"5.5",stroke:"#B5843B","stroke-width":"1.5",opacity:".7"},null,-1))]),O("path",{d:"M30 48 H90 L85 100 a6 6 0 0 1 -6 5.5 H41 a6 6 0 0 1 -6 -5.5 Z",fill:`url(#${n.a})`},null,8,q6),r[11]||(r[11]=j9('',5))],64)):e.name==="update"?(W(),o1(f1,{key:3},[O("defs",null,[O("linearGradient",{id:n.a,x1:"0",y1:"0",x2:"0",y2:"1"},[...r[12]||(r[12]=[O("stop",{offset:"0","stop-color":"#FFD27A"},null,-1),O("stop",{offset:"1","stop-color":"#F2793B"},null,-1)])],8,U6),O("clipPath",{id:n.b},[...r[13]||(r[13]=[O("path",{d:"M60 10 C76 22 80 44 76 72 H44 C40 44 44 22 60 10 Z"},null,-1)])],8,z6)]),r[23]||(r[23]=j9('',1)),O("g",W6,[O("g",G6,[O("path",{d:"M51 77 Q60 112 69 77 Z",fill:`url(#${n.a})`},null,8,K6),r[14]||(r[14]=O("path",{d:"M55.5 77 Q60 96 64.5 77 Z",fill:"#FFF1C9"},null,-1))]),r[16]||(r[16]=O("path",{d:"M44 56 L31 76 Q31 80 35 79 L46 74 Z",fill:"#D9A441"},null,-1)),r[17]||(r[17]=O("path",{d:"M76 56 L89 76 Q89 80 85 79 L74 74 Z",fill:"#D9A441"},null,-1)),r[18]||(r[18]=O("path",{d:"M60 10 C76 22 80 44 76 72 H44 C40 44 44 22 60 10 Z",fill:"#fff"},null,-1)),O("g",{"clip-path":`url(#${n.b})`},[...r[15]||(r[15]=[O("rect",{x:"30",y:"0",width:"60",height:"31",fill:"#1C2D56"},null,-1),O("rect",{x:"30",y:"64",width:"60",height:"10",fill:"#E3E8F4"},null,-1)])],8,Y6),r[19]||(r[19]=O("path",{d:"M60 10 C76 22 80 44 76 72 H44 C40 44 44 22 60 10 Z",stroke:"#1C2D56","stroke-width":"3","stroke-linejoin":"round"},null,-1)),r[20]||(r[20]=O("circle",{cx:"60",cy:"46",r:"7.5",fill:"#DCE5F7",stroke:"#1C2D56","stroke-width":"3"},null,-1)),r[21]||(r[21]=O("circle",{cx:"57.6",cy:"43.6",r:"2",fill:"#fff"},null,-1)),r[22]||(r[22]=O("rect",{x:"49",y:"71",width:"22",height:"7",rx:"2.5",fill:"#1C2D56"},null,-1))])],64)):e.name==="success"?(W(),o1(f1,{key:4},[r[24]||(r[24]=j9('',12))],64)):L1("",!0)],2))}}),J6=He(Q6,[["__scopeId","data-v-ce25a22f"]]),X6={class:"iSheet__panel"},ek={class:"iSheet__art"},tk={class:"iSheet__title"},nk={key:0,class:"iSheet__desc"},ok={class:"iSheet__actions"},rk=90,ik=.5,V4=b1({__name:"IslandSheet",props:{show:{type:Boolean},title:{},description:{},confirmText:{},cancelText:{},art:{},tone:{},closeOnClickOverlay:{type:Boolean,default:!0}},emits:["update:show","confirm","cancel"],setup(e,{emit:t}){const n=e,o=t,r={logout:"wine",login:"navy",order:"gold",update:"navy",success:"green"},i=N(()=>n.tone??(n.art?r[n.art]:"ink")),s=Q(!1);function l(){o("update:show",!1)}function d(){s.value=!1,k.value=0}function a(){o("cancel"),l()}const k=Q(0),u=Q(!1);let h=0,p=0;const g=N(()=>k.value?{transform:`translate3d(0, ${k.value}px, 0)`}:void 0);function v(w){w.target.closest("button")||(h=w.touches[0].clientY,p=Date.now(),u.value=!0)}function m(w){if(!u.value)return;const j=w.touches[0].clientY-h;k.value=j>0?n.closeOnClickOverlay?j:j*.2:j*.12}function H(){if(!u.value)return;u.value=!1;const w=k.value/Math.max(1,Date.now()-p);n.closeOnClickOverlay&&(k.value>rk||k.value>30&&w>ik)?l():k.value=0}return(w,j)=>(W(),P1(v1(F8),{show:e.show,position:"bottom",teleport:"body",transition:"iSheet-slide","transition-appear":"",class:"iSheet","overlay-class":"iSheet__overlay","close-on-click-overlay":e.closeOnClickOverlay,"close-on-popstate":"","onUpdate:show":j[1]||(j[1]=f=>o("update:show",f)),onOpened:j[2]||(j[2]=f=>s.value=!0),onClosed:d},{default:e2(()=>[O("div",{class:q1(["iSheet__card",[`iSheet--${i.value}`,{"is-dragging":u.value,"is-ready":s.value,"is-single":!e.cancelText}]]),style:re(g.value),dir:"rtl",role:"dialog","aria-modal":"true",onTouchstartPassive:v,onTouchmovePassive:m,onTouchend:H,onTouchcancel:H},[j[3]||(j[3]=O("span",{class:"iSheet__grip","aria-hidden":"true"},null,-1)),O("div",X6,[O("div",ek,[Vn(w.$slots,"art",{},()=>[e.art?(W(),P1(J6,{key:0,name:e.art},null,8,["name"])):L1("",!0)])])]),O("h3",tk,M1(e.title),1),e.description?(W(),o1("p",nk,M1(e.description),1)):L1("",!0),O("div",ok,[e.cancelText?(W(),o1("button",{key:0,type:"button",class:"iSheet__btn iSheet__btn--ghost",onClick:a},M1(e.cancelText),1)):L1("",!0),O("button",{type:"button",class:"iSheet__btn iSheet__btn--primary",onClick:j[0]||(j[0]=f=>o("confirm"))},M1(e.confirmText),1)])],38)]),_:3},8,["show","close-on-click-overlay"]))}}),sk={class:"toast__tile","aria-hidden":"true"},lk={class:"toast__body"},dk={key:0,class:"toast__title"},ak={class:"toast__message"},Di=80,kk=b1({__name:"ToastCard",props:{item:{}},emits:["close"],setup(e,{emit:t}){const n=t,o=Q(!1),r=Q(!1),i=Q(0),s=Q(0);let l=0,d=0;const a=Q(!1);let k=0;const u=N(()=>{if(a.value)return{transform:`translate(${i.value}px, ${s.value}px)`,opacity:"0",transition:"transform 0.22s ease-in, opacity 0.22s ease-in"};if(!r.value)return;const v=s.value<0?s.value:s.value*.25,m=1-Math.min(Math.abs(i.value)/220,.6);return{transform:`translate(${i.value}px, ${v}px) rotate(${i.value*.03}deg)`,opacity:String(m),transition:"none"}});function h(v){o.value=!0,l=v.clientX,d=v.clientY,k=Date.now(),v.currentTarget.setPointerCapture(v.pointerId)}function p(v){o.value&&(i.value=v.clientX-l,s.value=v.clientY-d,!r.value&&Math.hypot(i.value,s.value)>6&&(r.value=!0))}function g(){if(o.value=!1,!r.value){Date.now()-k<250&&n("close");return}if(Math.abs(i.value)>Di||s.value<-36){a.value=!0,i.value=Math.abs(i.value)>Di?Math.sign(i.value)*window.innerWidth:i.value,s.value=s.value<-36?-160:s.value,r.value=!1,setTimeout(()=>n("close"),200);return}r.value=!1,i.value=0,s.value=0}return(v,m)=>(W(),o1("div",{class:q1(["toast",[`toast--${e.item.type}`,{"is-held":o.value,"is-dragging":r.value}]]),style:re(u.value),role:"status",onPointerdown:h,onPointermove:p,onPointerup:g,onPointercancel:g},[O("span",sk,[m[1]||(m[1]=O("span",{class:"toast__ripple"},null,-1)),b(U1,{icon:e.item.icon,size:"22"},null,8,["icon"])]),O("div",lk,[e.item.title?(W(),o1("div",dk,M1(e.item.title),1)):L1("",!0),O("div",ak,M1(e.item.message),1)]),e.item.duration>0?(W(),o1("span",{key:0,class:"toast__progress keep-motion",style:re({animationDuration:`${e.item.duration}ms`}),onAnimationend:m[0]||(m[0]=H=>n("close"))},null,36)):L1("",!0)],38))}}),uk=He(kk,[["__scopeId","data-v-172a25f4"]]),hk=3200,Li=3,pk={success:"vuesax-linear:tick-circle",error:"vuesax-linear:close-circle",info:"vuesax-linear:info-circle",warning:"vuesax-linear:warning-2"},Ae=G1({items:[]});let ck=1;function Lt(e,t,n={}){const o=ck++;return Ae.items.push({id:o,type:e,message:t,title:n.title,icon:n.icon??pk[e],duration:n.duration??hk}),Ae.items.length>Li&&Ae.items.splice(0,Ae.items.length-Li),o}function wk(e){const t=Ae.items.findIndex(n=>n.id===e);t!==-1&&Ae.items.splice(t,1)}const y4={show:Lt,dismiss:wk,success:(e,t)=>Lt("success",e,t),error:(e,t)=>Lt("error",e,t),info:(e,t)=>Lt("info",e,t),warning:(e,t)=>Lt("warning",e,t)};function Ck(){return{toasts:Ae.items,...y4}}const gk={class:"toast-host"},vk=b1({__name:"ToastHost",setup(e){const{toasts:t,dismiss:n}=Ck();return(o,r)=>(W(),P1(Ct,{to:"body"},[O("div",gk,[b(F5,{name:"toast"},{default:e2(()=>[(W(!0),o1(f1,null,ot(v1(t),i=>(W(),P1(uk,{key:i.id,item:i,onClose:s=>v1(n)(i.id)},null,8,["item","onClose"]))),128))]),_:1})])]))}}),fk=["src","alt"],mk={key:0,class:"gs__counter"},Hi=.18,Mk=6,jk=b1({__name:"GallerySlider",props:l0({slides:{},alt:{},fit:{default:"cover"},showCounter:{type:Boolean,default:!1}},{index:{default:0},indexModifiers:{}}),emits:l0(["tap"],["update:index"]),setup(e,{emit:t}){const n=e,o=kd(e,"index"),r=t,i=N(()=>n.fit==="contain"?"gs__img--contain":"gs__img--cover"),s=Q(null),l=Q(!1),d=Q(0);let a=null,k=0,u=0;function h(f){var D;if(n.slides.length<2||a!==null)return;const x=s.value;x&&(a=f.pointerId,k=f.clientX,u=x.getBoundingClientRect().width||1,d.value=0,l.value=!0,(D=x.setPointerCapture)==null||D.call(x,f.pointerId))}function p(f){!l.value||f.pointerId!==a||(d.value=f.clientX-k)}function g(){if(!l.value)return;const f=d.value,x=f/u;l.value=!1,a=null,d.value=0,x<=-Hi&&o.value=Hi&&o.value>0&&o.value--,Math.abs(f)<=Mk&&r("tap")}function v(f){f.pointerId===a&&g()}function m(f){f.pointerId===a&&(l.value=!1,a=null,d.value=0)}function H(){}function w(f){o.value=f}const j=N(()=>{const f=-o.value*100,x=u?d.value/u*100:0;return{transform:`translate3d(${f+x}%, 0, 0)`,transition:l.value?"none":void 0}});return ze(()=>{if(a!==null&&s.value)try{s.value.releasePointerCapture(a)}catch{}}),(f,x)=>(W(),o1("div",{ref_key:"root",ref:s,class:q1(["gs",{"is-dragging":l.value}]),onPointerdown:h,onPointermove:p,onPointerup:v,onPointercancel:m,onClick:H},[O("div",{class:"gs__track",style:re(j.value)},[(W(!0),o1(f1,null,ot(e.slides,D=>(W(),o1("div",{key:D,class:"gs__cell"},[O("img",{src:D,alt:e.alt,class:q1(["gs__img",i.value]),draggable:"false"},null,10,fk)]))),128))],4),e.showCounter&&e.slides.length>1?(W(),o1("div",mk,M1(o.value+1)+"/"+M1(e.slides.length),1)):L1("",!0),Vn(f.$slots,"dots",{index:o.value,go:w},void 0,!0)],34))}}),Vi=He(jk,[["__scopeId","data-v-0e0334e8"]]),xk="/img/montzar-logo.png";function ae(e){"@babel/helpers - typeof";return ae=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},ae(e)}function Dk(e,t){if(ae(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var o=n.call(e,t);if(ae(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Lk(e){var t=Dk(e,"string");return ae(t)=="symbol"?t:t+""}function z1(e,t,n){return(t=Lk(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),n.push.apply(n,o)}return n}function u1(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return typeof e=="function"?e(t):e??n}function c9(){for(var e=[],t=0;te.length)&&(t=e.length);for(var n=0,o=Array(t);n0&&arguments[0]!==void 0?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0,o={},r=/;(?![^(]*\))/g,i=/:(.+)/;return ae(t)==="object"?t:(t.split(r).forEach(function(s){if(s){var l=s.split(i);if(l.length>1){var d=n?Z4(l[0].trim()):l[0].trim();o[d]=l[1].trim()}}}),o)},jw=function(t,n){return t[n]!==void 0},S9=function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,o=Array.isArray(t)?t:[t],r=[];return o.forEach(function(i){Array.isArray(i)?r.push.apply(r,on(e(i,n))):i&&i.type===f1?r.push.apply(r,on(e(i.children,n))):i&&a2(i)?n&&!S4(i)?r.push(i):n||r.push(i):tu(i)&&r.push(i)}),r},iu=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"default",o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(a2(t))return t.type===f1?n==="default"?S9(t.children):[]:t.children&&t.children[n]?S9(t.children[n](o)):[];var r=t.$slots[n]&&t.$slots[n](o);return S9(r)},xw=function(t){for(var n,o=(t==null||(n=t.vnode)===null||n===void 0?void 0:n.el)||t&&(t.$el||t);o&&!o.tagName;)o=o.nextSibling;return o},Dw=function(t){var n={};if(t.$&&t.$.vnode){var o=t.$.vnode.props||{};Object.keys(t.$props).forEach(function(l){var d=t.$props[l],a=Sk(l);(d!==void 0||a in o)&&(n[l]=d)})}else if(a2(t)&&ae(t.type)==="object"){var r=t.props||{},i={};Object.keys(r).forEach(function(l){i[Z4(l)]=r[l]});var s=t.type.props||{};Object.keys(s).forEach(function(l){var d=Ak(s,i,l,i[l]);(d!==void 0||l in i)&&(n[l]=d)})}return n},su=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"default",o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=void 0;if(t.$){var s=t[n];if(s!==void 0)return typeof s=="function"&&r?s(o):s;i=t.$slots[n],i=r&&i?i(o):i}else if(a2(t)){var l=t.props&&t.props[n];if(l!==void 0&&t.props!==null)return typeof l=="function"&&r?l(o):l;t.type===f1?i=t.children:t.children&&t.children[n]&&(i=t.children[n],i=r&&i?i(o):i)}return Array.isArray(i)&&(i=S9(i),i=i.length===1?i[0]:i,i=i.length===0?void 0:i),i};function Lw(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n={};return e.$?n=u1(u1({},n),e.$attrs):n=u1(u1({},n),e.props),ou(n)[t?"onEvents":"events"]}function Hw(e,t){var n=(a2(e)?e.props:e.$attrs)||{},o=n.style||{};return typeof o=="string"&&(o=ru(o,t)),o}function S4(e){return e&&(e.type===$1||e.type===f1&&e.children.length===0||e.type===u9&&e.children.trim()==="")}function O4(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=[];return e.forEach(function(n){Array.isArray(n)?t.push.apply(t,on(n)):(n==null?void 0:n.type)===f1?t.push.apply(t,on(O4(n.children))):t.push(n)}),t.filter(function(n){return!S4(n)})}function Vw(e){return Array.isArray(e)&&e.length===1&&(e=e[0]),e&&e.__v_isVNode&&ae(e.type)!=="symbol"}function yw(e,t){var n,o,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"default";return(n=t[r])!==null&&n!==void 0?n:(o=e[r])===null||o===void 0?void 0:o.call(e)}var lu=function(){for(var t=arguments.length,n=new Array(t),o=0;o=0||(r[n]=e[n]);return r}function Ei(e){return((t=e)!=null&&typeof t=="object"&&Array.isArray(t)===!1)==1&&Object.prototype.toString.call(e)==="[object Object]";var t}var q4=Object.prototype,U4=q4.toString,hu=q4.hasOwnProperty,z4=/^\s*function (\w+)/;function Si(e){var t,n=(t=e==null?void 0:e.type)!==null&&t!==void 0?t:e;if(n){var o=n.toString().match(z4);return o?o[1]:""}return""}var qe=function(e){var t,n;return Ei(e)!==!1&&typeof(t=e.constructor)=="function"&&Ei(n=t.prototype)!==!1&&n.hasOwnProperty("isPrototypeOf")!==!1},pu=function(e){return e},C2=pu,o9=function(e,t){return hu.call(e,t)},cu=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e},pt=Array.isArray||function(e){return U4.call(e)==="[object Array]"},ct=function(e){return U4.call(e)==="[object Function]"},ln=function(e){return qe(e)&&o9(e,"_vueTypes_name")},W4=function(e){return qe(e)&&(o9(e,"type")||["_vueTypes_name","validator","default","required"].some(function(t){return o9(e,t)}))};function Or(e,t){return Object.defineProperty(e.bind(t),"__original",{value:e})}function We(e,t,n){var o,r=!0,i="";o=qe(e)?e:{type:e};var s=ln(o)?o._vueTypes_name+" - ":"";if(W4(o)&&o.type!==null){if(o.type===void 0||o.type===!0||!o.required&&t===void 0)return r;pt(o.type)?(r=o.type.some(function(u){return We(u,t)===!0}),i=o.type.map(function(u){return Si(u)}).join(" or ")):r=(i=Si(o))==="Array"?pt(t):i==="Object"?qe(t):i==="String"||i==="Number"||i==="Boolean"||i==="Function"?function(u){if(u==null)return"";var h=u.constructor.toString().match(z4);return h?h[1]:""}(t)===i:t instanceof o.type}if(!r){var l=s+'value "'+t+'" should be of type "'+i+'"';return l}if(o9(o,"validator")&&ct(o.validator)){var d=C2,a=[];if(C2=function(u){a.push(u)},r=o.validator(t),C2=d,!r){var k=(a.length>1?"* ":"")+a.join(` +* `);return a.length=0,k}}return r}function f2(e,t){var n=Object.defineProperties(t,{_vueTypes_name:{value:e,writable:!0},isRequired:{get:function(){return this.required=!0,this}},def:{value:function(r){return r!==void 0||this.default?ct(r)||We(this,r)===!0?(this.default=pt(r)?function(){return[].concat(r)}:qe(r)?function(){return Object.assign({},r)}:r,this):(C2(this._vueTypes_name+' - invalid default value: "'+r+'"'),this):this}}}),o=n.validator;return ct(o)&&(n.validator=Or(o,n)),n}function N2(e,t){var n=f2(e,t);return Object.defineProperty(n,"validate",{value:function(o){return ct(this.validator)&&C2(this._vueTypes_name+` - calling .validate() will overwrite the current custom validator function. Validator info: +`+JSON.stringify(this)),this.validator=Or(o,this),this}})}function Oi(e,t,n){var o,r,i=(o=t,r={},Object.getOwnPropertyNames(o).forEach(function(u){r[u]=Object.getOwnPropertyDescriptor(o,u)}),Object.defineProperties({},r));if(i._vueTypes_name=e,!qe(n))return i;var s,l,d=n.validator,a=N4(n,["validator"]);if(ct(d)){var k=i.validator;k&&(k=(l=(s=k).__original)!==null&&l!==void 0?l:s),i.validator=Or(k?function(u){return k.call(this,u)&&d.call(this,u)}:d,i)}return Object.assign(i,a)}function Pn(e){return e.replace(/^(?!\s*$)/gm," ")}var wu=function(){return N2("any",{})},Cu=function(){return N2("function",{type:Function})},gu=function(){return N2("boolean",{type:Boolean})},vu=function(){return N2("string",{type:String})},fu=function(){return N2("number",{type:Number})},mu=function(){return N2("array",{type:Array})},Mu=function(){return N2("object",{type:Object})},ju=function(){return f2("integer",{type:Number,validator:function(e){return cu(e)}})},xu=function(){return f2("symbol",{validator:function(e){return typeof e=="symbol"}})};function Du(e,t){if(t===void 0&&(t="custom validation failed"),typeof e!="function")throw new TypeError("[VueTypes error]: You must provide a function as argument");return f2(e.name||"<>",{validator:function(n){var o=e(n);return o||C2(this._vueTypes_name+" - "+t),o}})}function Lu(e){if(!pt(e))throw new TypeError("[VueTypes error]: You must provide an array as argument.");var t='oneOf - value should be one of "'+e.join('", "')+'".',n=e.reduce(function(o,r){if(r!=null){var i=r.constructor;o.indexOf(i)===-1&&o.push(i)}return o},[]);return f2("oneOf",{type:n.length>0?n:void 0,validator:function(o){var r=e.indexOf(o)!==-1;return r||C2(t),r}})}function Hu(e){if(!pt(e))throw new TypeError("[VueTypes error]: You must provide an array as argument");for(var t=!1,n=[],o=0;o0&&n.some(function(d){return s.indexOf(d)===-1})){var l=n.filter(function(d){return s.indexOf(d)===-1});return C2(l.length===1?'shape - required property "'+l[0]+'" is not defined.':'shape - required properties "'+l.join('", "')+'" are not defined.'),!1}return s.every(function(d){if(t.indexOf(d)===-1)return i._vueTypes_isLoose===!0||(C2('shape - shape definition does not include a "'+d+'" property. Allowed keys: "'+t.join('", "')+'".'),!1);var a=We(e[d],r[d]);return typeof a=="string"&&C2('shape - "'+d+`" property validation error: + `+Pn(a)),a===!0})}});return Object.defineProperty(o,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(o,"loose",{get:function(){return this._vueTypes_isLoose=!0,this}}),o}var P2=function(){function e(){}return e.extend=function(t){var n=this;if(pt(t))return t.forEach(function(u){return n.extend(u)}),this;var o=t.name,r=t.validate,i=r!==void 0&&r,s=t.getter,l=s!==void 0&&s,d=N4(t,["name","validate","getter"]);if(o9(this,o))throw new TypeError('[VueTypes error]: Type "'+o+'" already defined');var a,k=d.type;return ln(k)?(delete d.type,Object.defineProperty(this,o,l?{get:function(){return Oi(o,k,d)}}:{value:function(){var u,h=Oi(o,k,d);return h.validator&&(h.validator=(u=h.validator).bind.apply(u,[h].concat([].slice.call(arguments)))),h}})):(a=l?{get:function(){var u=Object.assign({},d);return i?N2(o,u):f2(o,u)},enumerable:!0}:{value:function(){var u,h,p=Object.assign({},d);return u=i?N2(o,p):f2(o,p),p.validator&&(u.validator=(h=p.validator).bind.apply(h,[u].concat([].slice.call(arguments)))),u},enumerable:!0},Object.defineProperty(this,o,a))},$4(e,null,[{key:"any",get:function(){return wu()}},{key:"func",get:function(){return Cu().def(this.defaults.func)}},{key:"bool",get:function(){return gu().def(this.defaults.bool)}},{key:"string",get:function(){return vu().def(this.defaults.string)}},{key:"number",get:function(){return fu().def(this.defaults.number)}},{key:"array",get:function(){return mu().def(this.defaults.array)}},{key:"object",get:function(){return Mu().def(this.defaults.object)}},{key:"integer",get:function(){return ju().def(this.defaults.integer)}},{key:"symbol",get:function(){return xu()}}]),e}();function G4(e){var t;return e===void 0&&(e={func:function(){},bool:!0,string:"",number:0,array:function(){return[]},object:function(){return{}},integer:0}),(t=function(n){function o(){return n.apply(this,arguments)||this}return F4(o,n),$4(o,null,[{key:"sensibleDefaults",get:function(){return O9({},this.defaults)},set:function(r){this.defaults=r!==!1?O9({},r!==!0?r:e):{}}}]),o}(P2)).defaults=O9({},e),t}P2.defaults={},P2.custom=Du,P2.oneOf=Lu,P2.instanceOf=yu,P2.oneOfType=Hu,P2.arrayOf=Vu,P2.objectOf=bu,P2.shape=Zu,P2.utils={validate:function(e,t){return We(t,e)===!0},toType:function(e,t,n){return n===void 0&&(n=!1),n?N2(e,t):f2(e,t)}};(function(e){function t(){return e.apply(this,arguments)||this}return F4(t,e),t})(G4());var r9=G4({func:void 0,bool:void 0,string:void 0,number:void 0,array:void 0,object:void 0,integer:void 0});r9.extend([{name:"looseBool",getter:!0,type:Boolean,default:void 0},{name:"style",getter:!0,type:[String,Object],default:void 0},{name:"VueNode",getter:!0,type:null}]);function Zw(e){return e.default=void 0,e}var _u=["image","description","imageStyle","class"],K4=b(I4,null,null),Y4=b(R4,null,null),gt=function(t,n){var o,r=n.slots,i=r===void 0?{}:r,s=n.attrs,l=Tn("empty",t),d=l.direction,a=l.prefixCls,k=a.value,u=u1(u1({},t),s),h=u.image,p=h===void 0?K4:h,g=u.description,v=g===void 0?((o=i.description)===null||o===void 0?void 0:o.call(i))||void 0:g,m=u.imageStyle,H=u.class,w=H===void 0?"":H,j=Sr(u,_u);return b(T4,{componentName:"Empty",children:function(x){var D,y=typeof v<"u"?v:x.description,A=typeof y=="string"?y:"empty",L=null;return typeof p=="string"?L=b("img",{alt:A,src:p},null):L=p,b("div",u1({class:c9(k,w,(D={},z1(D,"".concat(k,"-normal"),p===Y4),z1(D,"".concat(k,"-rtl"),d.value==="rtl"),D))},j),[b("div",{class:"".concat(k,"-image"),style:m},[L]),y&&b("p",{class:"".concat(k,"-description")},[y]),i.default&&b("div",{class:"".concat(k,"-footer")},[O4(i.default())])])}},null)};gt.displayName="AEmpty";gt.PRESENTED_IMAGE_DEFAULT=K4;gt.PRESENTED_IMAGE_SIMPLE=Y4;gt.inheritAttrs=!1;gt.props={prefixCls:String,image:r9.any,description:r9.any,imageStyle:{type:Object,default:void 0}};const Vt=A4(gt);var Bu=function(t){var n=Tn("empty",t),o=n.prefixCls,r=function(s){switch(s){case"Table":case"List":return b(Vt,{image:Vt.PRESENTED_IMAGE_SIMPLE},null);case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return b(Vt,{image:Vt.PRESENTED_IMAGE_SIMPLE,class:"".concat(o.value,"-small")},null);default:return b(Vt,null,null)}};return r(t.componentName)};function Q4(e){return b(Bu,{componentName:e},null)}var Ai={};function Eu(e,t){}function Su(e,t,n){!t&&!Ai[n]&&(Ai[n]=!0)}function J4(e,t){Su(Eu,e,t)}const Ou=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";J4(e,"[antdv: ".concat(t,"] ").concat(n))};var Wo="internalMark",A9=b1({compatConfig:{MODE:3},name:"ALocaleProvider",props:{locale:{type:Object},ANT_MARK__:String},setup:function(t,n){var o=n.slots;Ou(t.ANT_MARK__===Wo,"LocaleProvider","`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead");var r=G1({antLocale:u1(u1({},t.locale),{},{exist:!0}),ANT_MARK__:Wo});return je("localeData",r),E1(function(){return t.locale},function(){r.antLocale=u1(u1({},t.locale),{},{exist:!0})},{immediate:!0}),function(){var i;return(i=o.default)===null||i===void 0?void 0:i.call(o)}}});A9.install=function(e){return e.component(A9.name,A9),e};const Au=A4(A9);lu("bottomLeft","bottomRight","topLeft","topRight");var _w=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=u1(t?{name:t,appear:!0,enterFromClass:"".concat(t,"-enter ").concat(t,"-enter-prepare"),enterActiveClass:"".concat(t,"-enter ").concat(t,"-enter-prepare"),enterToClass:"".concat(t,"-enter ").concat(t,"-enter-active"),leaveFromClass:" ".concat(t,"-leave"),leaveActiveClass:"".concat(t,"-leave ").concat(t,"-leave-active"),leaveToClass:"".concat(t,"-leave ").concat(t,"-leave-active")}:{css:!1},n);return o},Pu=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=u1(t?{name:t,appear:!0,appearActiveClass:"".concat(t),appearToClass:"".concat(t,"-appear ").concat(t,"-appear-active"),enterFromClass:"".concat(t,"-appear ").concat(t,"-enter ").concat(t,"-appear-prepare ").concat(t,"-enter-prepare"),enterActiveClass:"".concat(t),enterToClass:"".concat(t,"-enter ").concat(t,"-appear ").concat(t,"-appear-active ").concat(t,"-enter-active"),leaveActiveClass:"".concat(t," ").concat(t,"-leave"),leaveToClass:"".concat(t,"-leave-active")}:{css:!1},n);return o};const Tu=b1({name:"Notice",inheritAttrs:!1,props:["prefixCls","duration","updateMark","noticeKey","closeIcon","closable","props","onClick","onClose","holder","visible"],setup:function(t,n){var o=n.attrs,r=n.slots,i,s=!1,l=N(function(){return t.duration===void 0?4.5:t.duration}),d=function(){l.value&&!s&&(i=setTimeout(function(){k()},l.value*1e3))},a=function(){i&&(clearTimeout(i),i=null)},k=function(p){p&&p.stopPropagation(),a();var g=t.onClose,v=t.noticeKey;g&&g(v)},u=function(){a(),d()};return q2(function(){d()}),Hn(function(){s=!0,a()}),E1([l,function(){return t.updateMark},function(){return t.visible}],function(h,p){var g=Zi(h,3),v=g[0],m=g[1],H=g[2],w=Zi(p,3),j=w[0],f=w[1],x=w[2];(v!==j||m!==f||H!==x&&x)&&u()},{flush:"post"}),function(){var h,p,g=t.prefixCls,v=t.closable,m=t.closeIcon,H=m===void 0?(h=r.closeIcon)===null||h===void 0?void 0:h.call(r):m,w=t.onClick,j=t.holder,f=o.class,x=o.style,D="".concat(g,"-notice"),y=Object.keys(o).reduce(function(L,P){return(P.substr(0,5)==="data-"||P.substr(0,5)==="aria-"||P==="role")&&(L[P]=o[P]),L},{}),A=b("div",u1({class:c9(D,f,z1({},"".concat(D,"-closable"),v)),style:x,onMouseenter:a,onMouseleave:d,onClick:w},y),[b("div",{class:"".concat(D,"-content")},[(p=r.default)===null||p===void 0?void 0:p.call(r)]),v?b("a",{tabindex:0,onClick:k,class:"".concat(D,"-close")},[H||b("span",{class:"".concat(D,"-close-x")},null)]):null]);return j?b(Ct,{to:j},{default:function(){return A}}):A}}});var Iu=["name","getContainer","appContext","prefixCls","rootPrefixCls","transitionName","hasTransitionName"],Pi=0,Ru=Date.now();function Ti(){var e=Pi;return Pi+=1,"rcNotification_".concat(Ru,"_").concat(e)}var dn=b1({name:"Notification",inheritAttrs:!1,props:["prefixCls","transitionName","animation","maxCount","closeIcon"],setup:function(t,n){var o=n.attrs,r=n.expose,i=n.slots,s=new Map,l=Q([]),d=N(function(){var u=t.prefixCls,h=t.animation,p=h===void 0?"fade":h,g=t.transitionName;return!g&&p&&(g="".concat(u,"-").concat(p)),Pu(g)}),a=function(h,p){var g=h.key||Ti(),v=u1(u1({},h),{},{key:g}),m=t.maxCount,H=l.value.map(function(j){return j.notice.key}).indexOf(g),w=l.value.concat();H!==-1?w.splice(H,1,{notice:v,holderCallback:p}):(m&&l.value.length>=m&&(v.key=w[0].notice.key,v.updateMark=Ti(),v.userPassKey=g,w.shift()),w.push({notice:v,holderCallback:p})),l.value=w},k=function(h){l.value=l.value.filter(function(p){var g=p.notice,v=g.key,m=g.userPassKey,H=m||v;return H!==h})};return r({add:a,remove:k,notices:l}),function(){var u,h,p=t.prefixCls,g=t.closeIcon,v=g===void 0?(u=i.closeIcon)===null||u===void 0?void 0:u.call(i,{prefixCls:p}):g,m=l.value.map(function(w,j){var f=w.notice,x=w.holderCallback,D=j===l.value.length-1?f.updateMark:void 0,y=f.key,A=f.userPassKey,L=f.content,P=u1(u1(u1({prefixCls:p,closeIcon:typeof v=="function"?v({prefixCls:p}):v},f),f.props),{},{key:y,noticeKey:A||y,updateMark:D,onClose:function(I){var X;k(I),(X=f.onClose)===null||X===void 0||X.call(f)},onClick:f.onClick});return x?b("div",{key:y,class:"".concat(p,"-hook-holder"),ref:function(I){typeof y>"u"||(I?(s.set(y,I),x(I,P)):s.delete(y))}},null):b(Tu,P,{default:function(){return[typeof L=="function"?L({prefixCls:p}):L]}})}),H=(h={},z1(h,p,1),z1(h,o.class,!!o.class),h);return b("div",{class:H,style:o.style||{top:"65px",left:"50%"}},[b(F5,u1({tag:"div"},d.value),{default:function(){return[m]}})])}}});dn.newInstance=function(t,n){var o=t||{},r=o.name,i=r===void 0?"notification":r,s=o.getContainer,l=o.appContext,d=o.prefixCls,a=o.rootPrefixCls,k=o.transitionName,u=o.hasTransitionName,h=Sr(o,Iu),p=document.createElement("div");if(s){var g=s();g.appendChild(p)}else document.body.appendChild(p);var v=b1({compatConfig:{MODE:3},name:"NotificationWrapper",setup:function(w,j){var f=j.attrs,x=Q();return q2(function(){n({notice:function(y){var A;(A=x.value)===null||A===void 0||A.add(y)},removeNotice:function(y){var A;(A=x.value)===null||A===void 0||A.remove(y)},destroy:function(){O0(null,p),p.parentNode&&p.parentNode.removeChild(p)},component:x})}),function(){var D=p2,y=D.getPrefixCls(i,d),A=D.getRootPrefixCls(a,y),L=u?k:"".concat(A,"-").concat(k);return b(Ut,u1(u1({},D),{},{notUpdateGlobalConfig:!0,prefixCls:A}),{default:function(){return[b(dn,u1(u1({ref:x},f),{},{prefixCls:y,transitionName:L}),null)]}})}}}),m=b(v,h);m.appContext=l||m.appContext,O0(m,p)};var $u={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};function J1(e,t){Fu(e)&&(e="100%");var n=Nu(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function V9(e){return Math.min(1,Math.max(0,e))}function Fu(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Nu(e){return typeof e=="string"&&e.indexOf("%")!==-1}function X4(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function y9(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Pe(e){return e.length===1?"0"+e:String(e)}function qu(e,t,n){return{r:J1(e,255)*255,g:J1(t,255)*255,b:J1(n,255)*255}}function Ii(e,t,n){e=J1(e,255),t=J1(t,255),n=J1(n,255);var o=Math.max(e,t,n),r=Math.min(e,t,n),i=0,s=0,l=(o+r)/2;if(o===r)s=0,i=0;else{var d=o-r;switch(s=l>.5?d/(2-o-r):d/(o+r),o){case e:i=(t-n)/d+(t1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Uu(e,t,n){var o,r,i;if(e=J1(e,360),t=J1(t,100),n=J1(n,100),t===0)r=n,i=n,o=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;o=ro(l,s,e+1/3),r=ro(l,s,e),i=ro(l,s,e-1/3)}return{r:o*255,g:r*255,b:i*255}}function Go(e,t,n){e=J1(e,255),t=J1(t,255),n=J1(n,255);var o=Math.max(e,t,n),r=Math.min(e,t,n),i=0,s=o,l=o-r,d=o===0?0:l/o;if(o===r)i=0;else{switch(o){case e:i=(t-n)/l+(t>16,g:(e&65280)>>8,b:e&255}}var Yo={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Xe(e){var t={r:0,g:0,b:0},n=1,o=null,r=null,i=null,s=!1,l=!1;return typeof e=="string"&&(e=Ju(e)),typeof e=="object"&&(G2(e.r)&&G2(e.g)&&G2(e.b)?(t=qu(e.r,e.g,e.b),s=!0,l=String(e.r).substr(-1)==="%"?"prgb":"rgb"):G2(e.h)&&G2(e.s)&&G2(e.v)?(o=y9(e.s),r=y9(e.v),t=zu(e.h,o,r),s=!0,l="hsv"):G2(e.h)&&G2(e.s)&&G2(e.l)&&(o=y9(e.s),i=y9(e.l),t=Uu(e.h,o,i),s=!0,l="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=X4(n),{ok:s,format:e.format||l,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var Yu="[-\\+]?\\d+%?",Qu="[-\\+]?\\d*\\.\\d+%?",me="(?:".concat(Qu,")|(?:").concat(Yu,")"),io="[\\s|\\(]+(".concat(me,")[,|\\s]+(").concat(me,")[,|\\s]+(").concat(me,")\\s*\\)?"),so="[\\s|\\(]+(".concat(me,")[,|\\s]+(").concat(me,")[,|\\s]+(").concat(me,")[,|\\s]+(").concat(me,")\\s*\\)?"),D2={CSS_UNIT:new RegExp(me),rgb:new RegExp("rgb"+io),rgba:new RegExp("rgba"+so),hsl:new RegExp("hsl"+io),hsla:new RegExp("hsla"+so),hsv:new RegExp("hsv"+io),hsva:new RegExp("hsva"+so),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Ju(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(Yo[e])e=Yo[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=D2.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=D2.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=D2.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=D2.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=D2.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=D2.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=D2.hex8.exec(e),n?{r:h2(n[1]),g:h2(n[2]),b:h2(n[3]),a:Ri(n[4]),format:t?"name":"hex8"}:(n=D2.hex6.exec(e),n?{r:h2(n[1]),g:h2(n[2]),b:h2(n[3]),format:t?"name":"hex"}:(n=D2.hex4.exec(e),n?{r:h2(n[1]+n[1]),g:h2(n[2]+n[2]),b:h2(n[3]+n[3]),a:Ri(n[4]+n[4]),format:t?"name":"hex8"}:(n=D2.hex3.exec(e),n?{r:h2(n[1]+n[1]),g:h2(n[2]+n[2]),b:h2(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function G2(e){return!!D2.CSS_UNIT.exec(String(e))}var lo=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var o;if(t instanceof e)return t;typeof t=="number"&&(t=Ku(t)),this.originalInput=t;var r=Xe(t);this.originalInput=t,this.r=r.r,this.g=r.g,this.b=r.b,this.a=r.a,this.roundA=Math.round(100*this.a)/100,this.format=(o=n.format)!==null&&o!==void 0?o:r.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=r.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,o,r,i=t.r/255,s=t.g/255,l=t.b/255;return i<=.03928?n=i/12.92:n=Math.pow((i+.055)/1.055,2.4),s<=.03928?o=s/12.92:o=Math.pow((s+.055)/1.055,2.4),l<=.03928?r=l/12.92:r=Math.pow((l+.055)/1.055,2.4),.2126*n+.7152*o+.0722*r},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=X4(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=Go(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=Go(this.r,this.g,this.b),n=Math.round(t.h*360),o=Math.round(t.s*100),r=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(o,"%, ").concat(r,"%)"):"hsva(".concat(n,", ").concat(o,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=Ii(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=Ii(this.r,this.g,this.b),n=Math.round(t.h*360),o=Math.round(t.s*100),r=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(o,"%, ").concat(r,"%)"):"hsla(".concat(n,", ").concat(o,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),Ko(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),Wu(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),o=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(o,")"):"rgba(".concat(t,", ").concat(n,", ").concat(o,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(J1(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(J1(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+Ko(this.r,this.g,this.b,!1),n=0,o=Object.entries(Yo);n=0,i=!n&&r&&(t.startsWith("hex")||t==="name");return i?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(o=this.toRgbString()),t==="prgb"&&(o=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(o=this.toHexString()),t==="hex3"&&(o=this.toHexString(!0)),t==="hex4"&&(o=this.toHex8String(!0)),t==="hex8"&&(o=this.toHex8String()),t==="name"&&(o=this.toName()),t==="hsl"&&(o=this.toHslString()),t==="hsv"&&(o=this.toHsvString()),o||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=V9(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=V9(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=V9(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=V9(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),o=(n.h+t)%360;return n.h=o<0?360+o:o,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var o=this.toRgb(),r=new e(t).toRgb(),i=n/100,s={r:(r.r-o.r)*i+o.r,g:(r.g-o.g)*i+o.g,b:(r.b-o.b)*i+o.b,a:(r.a-o.a)*i+o.a};return new e(s)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var o=this.toHsl(),r=360/n,i=[this];for(o.h=(o.h-(r*t>>1)+720)%360;--t;)o.h=(o.h+r)%360,i.push(new e(o));return i},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),o=n.h,r=n.s,i=n.v,s=[],l=1/t;t--;)s.push(new e({h:o,s:r,v:i})),i=(i+l)%1;return s},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),o=new e(t).toRgb(),r=n.a+o.a*(1-n.a);return new e({r:(n.r*n.a+o.r*o.a*(1-n.a))/r,g:(n.g*n.a+o.g*o.a*(1-n.a))/r,b:(n.b*n.a+o.b*o.a*(1-n.a))/r,a:r})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),o=n.h,r=[this],i=360/t,s=1;s=60&&Math.round(e.h)<=240?o=n?Math.round(e.h)-b9*t:Math.round(e.h)+b9*t:o=n?Math.round(e.h)+b9*t:Math.round(e.h)-b9*t,o<0?o+=360:o>=360&&(o-=360),o}function qi(e,t,n){if(e.h===0&&e.s===0)return e.s;var o;return n?o=e.s-$i*t:t===tl?o=e.s+$i:o=e.s+Xu*t,o>1&&(o=1),n&&t===el&&o>.1&&(o=.1),o<.06&&(o=.06),Number(o.toFixed(2))}function Ui(e,t,n){var o;return n?o=e.v+eh*t:o=e.v-th*t,o>1&&(o=1),Number(o.toFixed(2))}function i9(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],o=Xe(e),r=el;r>0;r-=1){var i=Fi(o),s=Z9(Xe({h:Ni(i,r,!0),s:qi(i,r,!0),v:Ui(i,r,!0)}));n.push(s)}n.push(Z9(o));for(var l=1;l<=tl;l+=1){var d=Fi(o),a=Z9(Xe({h:Ni(d,l),s:qi(d,l),v:Ui(d,l)}));n.push(a)}return t.theme==="dark"?nh.map(function(k){var u=k.index,h=k.opacity,p=Z9(oh(Xe(t.backgroundColor||"#141414"),Xe(n[u]),h*100));return p}):n}var ao={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},ko={},uo={};Object.keys(ao).forEach(function(e){ko[e]=i9(ao[e]),ko[e].primary=ko[e][5],uo[e]=i9(ao[e],{theme:"dark",backgroundColor:"#141414"}),uo[e].primary=uo[e][5]});var zi=[],yt=[],rh="insert-css: You need to provide a CSS string. Usage: insertCss(cssString[, options]).";function ih(){var e=document.createElement("style");return e.setAttribute("type","text/css"),e}function sh(e,t){if(t=t||{},e===void 0)throw new Error(rh);var n=t.prepend===!0?"prepend":"append",o=t.container!==void 0?t.container:document.querySelector("head"),r=zi.indexOf(o);r===-1&&(r=zi.push(o)-1,yt[r]={});var i;return yt[r]!==void 0&&yt[r][n]!==void 0?i=yt[r][n]:(i=yt[r][n]=ih(),n==="prepend"?o.insertBefore(i,o.childNodes[0]):o.appendChild(i)),e.charCodeAt(0)===65279&&(e=e.substr(1,e.length)),i.styleSheet?i.styleSheet.cssText+=e:i.textContent+=e,i}function Wi(e){for(var t=1;t * { + line-height: 1; +} + +.anticon svg { + display: inline-block; +} + +.anticon::before { + display: none; +} + +.anticon .anticon-icon { + display: block; +} + +.anticon[tabindex] { + cursor: pointer; +} + +.anticon-spin::before, +.anticon-spin { + display: inline-block; + -webkit-animation: loadingCircle 1s infinite linear; + animation: loadingCircle 1s infinite linear; +} + +@-webkit-keyframes loadingCircle { + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} + +@keyframes loadingCircle { + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} +`,Ki=!1,ah=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:dh;v2(function(){Ki||(typeof window<"u"&&window.document&&window.document.documentElement&&sh(t,{prepend:!0}),Ki=!0)})},kh=["icon","primaryColor","secondaryColor"];function uh(e,t){if(e==null)return{};var n=hh(e,t),o,r;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}function hh(e,t){if(e==null)return{};var n={},o=Object.keys(e),r,i;for(i=0;i=0)&&(n[r]=e[r]);return n}function P9(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,o=new Array(t);ne.length)&&(t=e.length);for(var n=0,o=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(n[o]=e[o])}return n}function bh(e,t){if(e==null)return{};var n={},o=Object.keys(e),r,i;for(i=0;i=0)&&(n[r]=e[r]);return n}rl("#1890ff");var l2=function(t,n){var o,r=Ji({},t,n.attrs),i=r.class,s=r.icon,l=r.spin,d=r.rotate,a=r.tabindex,k=r.twoToneColor,u=r.onClick,h=yh(r,jh),p=(o={anticon:!0},Jo(o,"anticon-".concat(s.name),!!s.name),Jo(o,i,i),o),g=l===""||l||s.name==="loading"?"anticon-spin":"",v=a;v===void 0&&u&&(v=-1,h.tabindex=v);var m=d?{msTransform:"rotate(".concat(d,"deg)"),transform:"rotate(".concat(d,"deg)")}:void 0,H=ol(k),w=xh(H,2),j=w[0],f=w[1];return b("span",Ji({role:"img","aria-label":s.name},h,{onClick:u,class:p}),[b(Ve,{class:g,icon:s,primaryColor:j,secondaryColor:f,style:m},null)])};l2.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:String};l2.displayName="AntdIcon";l2.inheritAttrs=!1;l2.getTwoToneColor=Mh;l2.setTwoToneColor=rl;function Xi(e){for(var t=1;t3?(C1=Z1===n1)&&(U=p1[(P=p1[4])?5:(P=3,3)],p1[4]=p1[5]=o):p1[0]<=O1&&((C1=Y<2&&O1n1||n1>Z1)&&(p1[4]=Y,p1[5]=n1,h1.n=Z1,P=0))}if(C1||Y>1)return a;throw l1=!0,n1}return function(Y,n1,C1){if(I>1)throw TypeError("Generator is already running");for(l1&&n1===1&&k1(n1,C1),P=n1,U=C1;(r=P<2?o:U)||!l1;){L||(P?P<3?(P>1&&(h1.n=-1),k1(P,U)):h1.n=U:h1.v=U);try{if(I=2,L){if(P||(Y="next"),r=L[Y]){if(!(r=r.call(L,U)))throw TypeError("iterator result is not an object");if(!r.done)return r;U=r.value,P<2&&(P=0)}else P===1&&(r=L.return)&&r.call(L),P<2&&(U=TypeError("The iterator does not provide a '"+Y+"' method"),P=1);L=o}else if((r=(l1=h1.n<0)?U:D.call(y,h1))!==a)break}catch(p1){L=o,P=1,U=p1}finally{I=1}}return{value:r,done:l1}}}(m,w,j),!0),x}var a={};function k(){}function u(){}function h(){}r=Object.getPrototypeOf;var p=[][s]?r(r([][s]())):(t(r={},s,function(){return this}),r),g=h.prototype=k.prototype=Object.create(p);function v(m){return Object.setPrototypeOf?Object.setPrototypeOf(m,h):(m.__proto__=h,t(m,l,"GeneratorFunction")),m.prototype=Object.create(g),m}return u.prototype=h,t(g,"constructor",h),t(h,"constructor",u),u.displayName="GeneratorFunction",t(h,l,"GeneratorFunction"),t(g),t(g,l,"Generator"),t(g,s,function(){return this}),t(g,"toString",function(){return"[object Generator]"}),(e.exports=n=function(){return{w:d,m:v}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(Cl);var fl=Cl.exports,ml={exports:{}},Ml={exports:{}},jl={exports:{}};(function(e){var t=wl,n=vl;function o(r,i){function s(d,a,k,u){try{var h=r[d](a),p=h.value;return p instanceof t?i.resolve(p.v).then(function(g){s("next",g,k,u)},function(g){s("throw",g,k,u)}):i.resolve(p).then(function(g){h.value=g,k(h)},function(g){return s("throw",g,k,u)})}catch(g){u(g)}}var l;this.next||(n(o.prototype),n(o.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),n(this,"_invoke",function(d,a,k){function u(){return new i(function(h,p){s(d,k,h,p)})}return l=l?l.then(u,u):u()},!0)}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports})(jl);var xl=jl.exports;(function(e){var t=fl,n=xl;function o(r,i,s,l,d){return new n(t().w(r,i,s,l),d||Promise)}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports})(Ml);var Dl=Ml.exports;(function(e){var t=Dl;function n(o,r,i,s,l){var d=t(o,r,i,s,l);return d.next().then(function(a){return a.done?a.value:d.next()})}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(ml);var Gh=ml.exports,Ll={exports:{}};(function(e){function t(n){var o=Object(n),r=[];for(var i in o)r.unshift(i);return function s(){for(;r.length;)if((i=r.pop())in o)return s.value=i,s.done=!1,s;return s.done=!0,s}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Ll);var Kh=Ll.exports,Hl={exports:{}},Vl={exports:{}};(function(e){function t(n){"@babel/helpers - typeof";return e.exports=t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(Vl);var Yh=Vl.exports;(function(e){var t=Yh.default;function n(o){if(o!=null){var r=o[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],i=0;if(r)return r.call(o);if(typeof o.next=="function")return o;if(!isNaN(o.length))return{next:function(){return o&&i>=o.length&&(o=void 0),{value:o&&o[i++],done:!o}}}}throw new TypeError(t(o)+" is not iterable")}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})(Hl);var Qh=Hl.exports;(function(e){var t=wl,n=fl,o=Gh,r=Dl,i=xl,s=Kh,l=Qh;function d(){var a=n(),k=a.m(d),u=(Object.getPrototypeOf?Object.getPrototypeOf(k):k.__proto__).constructor;function h(v){var m=typeof v=="function"&&v.constructor;return!!m&&(m===u||(m.displayName||m.name)==="GeneratorFunction")}var p={throw:1,return:2,break:3,continue:3};function g(v){var m,H;return function(w){m||(m={stop:function(){return H(w.a,2)},catch:function(){return w.v},abrupt:function(f,x){return H(w.a,p[f],x)},delegateYield:function(f,x,D){return m.resultName=x,H(w.d,l(f),D)},finish:function(f){return H(w.f,f)}},H=function(f,x,D){w.p=m.prev,w.n=m.next;try{return f(x,D)}finally{m.next=w.n}}),m.resultName&&(m[m.resultName]=w.v,m.resultName=void 0),m.sent=w.v,m.next=w.n;try{return v.call(this,m)}finally{w.p=m.prev,w.n=m.next}}}return(e.exports=d=function(){return{wrap:function(H,w,j,f){return a.w(g(H),w,j,f&&f.reverse())},isGeneratorFunction:h,mark:a.m,awrap:function(H,w){return new t(H,w)},AsyncIterator:i,async:function(H,w,j,f,x){return(h(w)?r:o)(g(H),w,j,f,x)},keys:s,values:l}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=d,e.exports.__esModule=!0,e.exports.default=e.exports})(pl);var Jh=pl.exports,T9=Jh(),Xh=T9;try{regeneratorRuntime=T9}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=T9:Function("r","regeneratorRuntime = r")(T9)}const Ew=Wh(Xh);var ep={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"};function rs(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:bl,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Zl,o;switch(e){case"topLeft":o={left:"0px",top:t,bottom:"auto"};break;case"topRight":o={right:"0px",top:t,bottom:"auto"};break;case"bottomLeft":o={left:"0px",top:"auto",bottom:n};break;default:o={right:"0px",top:"auto",bottom:n};break}return o}function hp(e,t){var n=e.prefixCls,o=e.placement,r=o===void 0?_l:o,i=e.getContainer,s=i===void 0?Bl:i,l=e.top,d=e.bottom,a=e.closeIcon,k=a===void 0?El:a,u=e.appContext,h=Hp(),p=h.getPrefixCls,g=p("notification",n||Xo),v="".concat(g,"-").concat(r,"-").concat(er),m=Ee[v];if(m){Promise.resolve(m).then(function(w){t(w)});return}var H=c9("".concat(g,"-").concat(r),z1({},"".concat(g,"-rtl"),er===!0));dn.newInstance({name:"notification",prefixCls:n||Xo,class:H,style:up(r,l,d),appContext:u,getContainer:s,closeIcon:function(j){var f=j.prefixCls,x=b("span",{class:"".concat(f,"-close-x")},[Ot(k,{},b(Ur,{class:"".concat(f,"-close-icon")},null))]);return x},maxCount:Sl,hasTransitionName:!0},function(w){Ee[v]=w,t(w)})}var pp={success:$r,info:Fr,error:Nr,warning:qr};function cp(e){var t=e.icon,n=e.type,o=e.description,r=e.message,i=e.btn,s=e.duration===void 0?yl:e.duration;hp(e,function(l){l.notice({content:function(a){var k=a.prefixCls,u="".concat(k,"-notice"),h=null;if(t)h=function(){return b("span",{class:"".concat(u,"-icon")},[Ot(t)])};else if(n){var p=pp[n];h=function(){return b(p,{class:"".concat(u,"-icon ").concat(u,"-icon-").concat(n)},null)}}return b("div",{class:h?"".concat(u,"-with-icon"):""},[h&&h(),b("div",{class:"".concat(u,"-message")},[!o&&h?b("span",{class:"".concat(u,"-message-single-line-auto-margin")},null):null,Ot(r)]),b("div",{class:"".concat(u,"-description")},[Ot(o)]),i?b("span",{class:"".concat(u,"-btn")},[Ot(i)]):null])},duration:s,closable:!0,onClose:e.onClose,onClick:e.onClick,key:e.key,style:e.style||{},class:e.class})})}var s9={open:cp,close:function(t){Object.keys(Ee).forEach(function(n){return Promise.resolve(Ee[n]).then(function(o){o.removeNotice(t)})})},config:kp,destroy:function(){Object.keys(Ee).forEach(function(t){Promise.resolve(Ee[t]).then(function(n){n.destroy()}),delete Ee[t]})}},wp=["success","info","warning","error"];wp.forEach(function(e){s9[e]=function(t){return s9.open(u1(u1({},t),{},{type:e}))}});s9.warn=s9.warning;function Ol(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var Cp="vc-util-key";function Al(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):Cp}function zr(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function as(e){var t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Ol())return null;var o=document.createElement("style");if((t=n.csp)!==null&&t!==void 0&&t.nonce){var r;o.nonce=(r=n.csp)===null||r===void 0?void 0:r.nonce}o.innerHTML=e;var i=zr(n),s=i.firstChild;return n.prepend&&i.prepend?i.prepend(o):n.prepend&&s?i.insertBefore(o,s):i.appendChild(o),o}var tr=new Map;function gp(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=zr(t);return Array.from(tr.get(n).children).find(function(o){return o.tagName==="STYLE"&&o.getAttribute(Al(t))===e})}function vp(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=zr(n);if(!tr.has(o)){var r=as("",n),i=r.parentNode;tr.set(o,i),i.removeChild(r)}var s=gp(t,n);if(s){var l,d;if((l=n.csp)!==null&&l!==void 0&&l.nonce&&s.nonce!==((d=n.csp)===null||d===void 0?void 0:d.nonce)){var a;s.nonce=(a=n.csp)===null||a===void 0?void 0:a.nonce}return s.innerHTML!==e&&(s.innerHTML=e),s}var k=as(e,n);return k.setAttribute(Al(n),t),k}const fp=function(e,t,n){J4(e,"[ant-design-vue: ".concat(t,"] ").concat(n))};var mp="-ant-".concat(Date.now(),"-").concat(Math.random());function Mp(e,t){var n={},o=function(k,u){var h=k.clone();return h=(u==null?void 0:u(h))||h,h.toRgbString()},r=function(k,u){var h=new lo(k),p=i9(h.toRgbString());n["".concat(u,"-color")]=o(h),n["".concat(u,"-color-disabled")]=p[1],n["".concat(u,"-color-hover")]=p[4],n["".concat(u,"-color-active")]=p[6],n["".concat(u,"-color-outline")]=h.clone().setAlpha(.2).toRgbString(),n["".concat(u,"-color-deprecated-bg")]=p[1],n["".concat(u,"-color-deprecated-border")]=p[3]};if(t.primaryColor){r(t.primaryColor,"primary");var i=new lo(t.primaryColor),s=i9(i.toRgbString());s.forEach(function(a,k){n["primary-".concat(k+1)]=a}),n["primary-color-deprecated-l-35"]=o(i,function(a){return a.lighten(35)}),n["primary-color-deprecated-l-20"]=o(i,function(a){return a.lighten(20)}),n["primary-color-deprecated-t-20"]=o(i,function(a){return a.tint(20)}),n["primary-color-deprecated-t-50"]=o(i,function(a){return a.tint(50)}),n["primary-color-deprecated-f-12"]=o(i,function(a){return a.setAlpha(a.getAlpha()*.12)});var l=new lo(s[0]);n["primary-color-active-deprecated-f-30"]=o(l,function(a){return a.setAlpha(a.getAlpha()*.3)}),n["primary-color-active-deprecated-d-02"]=o(l,function(a){return a.darken(2)})}t.successColor&&r(t.successColor,"success"),t.warningColor&&r(t.warningColor,"warning"),t.errorColor&&r(t.errorColor,"error"),t.infoColor&&r(t.infoColor,"info");var d=Object.keys(n).map(function(a){return"--".concat(e,"-").concat(a,": ").concat(n[a],";")});Ol()?vp(` + :root { + `.concat(d.join(` +`),` + } + `),"".concat(mp,"-dynamic-theme")):fp(!1,"ConfigProvider","SSR do not support dynamic theme with css variables.")}var Pl=Symbol("GlobalFormContextKey"),jp=function(t){je(Pl,t)},Sw=function(){return W1(Pl,{validateMessages:N(function(){})})},xp=function(){return{getTargetContainer:{type:Function},getPopupContainer:{type:Function},prefixCls:String,getPrefixCls:{type:Function},renderEmpty:{type:Function},transformCellText:{type:Function},csp:{type:Object,default:void 0},input:{type:Object},autoInsertSpaceInButton:{type:Boolean,default:void 0},locale:{type:Object,default:void 0},pageHeader:{type:Object},componentSize:{type:String},direction:{type:String},space:{type:Object},virtual:{type:Boolean,default:void 0},dropdownMatchSelectWidth:{type:[Number,Boolean],default:!0},form:{type:Object,default:void 0},notUpdateGlobalConfig:Boolean}},Dp="ant";function st(){return p2.prefixCls||Dp}var nr=G1({}),Tl=G1({}),p2=G1({});mn(function(){Ne(p2,nr,Tl),p2.prefixCls=st(),p2.getPrefixCls=function(e,t){return t||(e?"".concat(p2.prefixCls,"-").concat(e):p2.prefixCls)},p2.getRootPrefixCls=function(e,t){return e||(p2.prefixCls?p2.prefixCls:t&&t.includes("-")?t.replace(/^(.*)-[^-]*$/,"$1"):st())}});var ho,Lp=function(t){ho&&ho(),ho=mn(function(){Ne(Tl,G1(t)),Ne(p2,G1(t))}),t.theme&&Mp(st(),t.theme)},Hp=function(){return{getPrefixCls:function(n,o){return o||(n?"".concat(st(),"-").concat(n):st())},getRootPrefixCls:function(n,o){return n||(p2.prefixCls?p2.prefixCls:o&&o.includes("-")?o.replace(/^(.*)-[^-]*$/,"$1"):st())}}},Ut=b1({compatConfig:{MODE:3},name:"AConfigProvider",inheritAttrs:!1,props:xp(),setup:function(t,n){var o=n.slots,r=function(u,h){var p=t.prefixCls,g=p===void 0?"ant":p;return u?"".concat(g,"-").concat(u):g},i=function(u){var h=t.renderEmpty||o.renderEmpty||Q4;return h(u)},s=function(u,h){var p=t.prefixCls;if(h)return h;var g=p||r("");return u?"".concat(g,"-").concat(u):g},l=G1(u1(u1({},t),{},{getPrefixCls:s,renderEmpty:i}));Object.keys(t).forEach(function(k){E1(function(){return t[k]},function(){l[k]=t[k]})}),t.notUpdateGlobalConfig||(Ne(nr,l),E1(l,function(){Ne(nr,l)}));var d=N(function(){var k={};if(t.locale){var u,h;k=((u=t.locale.Form)===null||u===void 0?void 0:u.defaultValidateMessages)||((h=sn.Form)===null||h===void 0?void 0:h.defaultValidateMessages)||{}}return t.form&&t.form.validateMessages&&(k=u1(u1({},k),t.form.validateMessages)),k});jp({validateMessages:d}),je("configProvider",l);var a=function(u){var h;return b(Au,{locale:t.locale||u,ANT_MARK__:Wo},{default:function(){return[(h=o.default)===null||h===void 0?void 0:h.call(o)]}})};return mn(function(){t.direction&&(an.config({rtl:t.direction==="rtl"}),s9.config({rtl:t.direction==="rtl"}))}),function(){return b(T4,{children:function(u,h,p){return a(p)}},null)}}}),Il=G1({getPrefixCls:function(t,n){return n||(t?"ant-".concat(t):"ant")},renderEmpty:Q4,direction:"ltr"});Ut.config=Lp;Ut.install=function(e){e.component(Ut.name,Ut)};const Tn=function(e,t){var n=W1("configProvider",Il),o=N(function(){return n.getPrefixCls(e,t.prefixCls)}),r=N(function(){var w;return(w=t.direction)!==null&&w!==void 0?w:n.direction}),i=N(function(){return n.getPrefixCls()}),s=N(function(){return n.autoInsertSpaceInButton}),l=N(function(){return n.renderEmpty}),d=N(function(){return n.space}),a=N(function(){return n.pageHeader}),k=N(function(){return n.form}),u=N(function(){return t.getTargetContainer||n.getTargetContainer}),h=N(function(){return t.getPopupContainer||n.getPopupContainer}),p=N(function(){var w;return(w=t.dropdownMatchSelectWidth)!==null&&w!==void 0?w:n.dropdownMatchSelectWidth}),g=N(function(){return(t.virtual===void 0?n.virtual!==!1:t.virtual!==!1)&&p.value!==!1}),v=N(function(){return t.size||n.componentSize}),m=N(function(){var w;return t.autocomplete||((w=n.input)===null||w===void 0?void 0:w.autocomplete)}),H=N(function(){return n.csp});return{configProvider:n,prefixCls:o,direction:r,size:v,getTargetContainer:u,getPopupContainer:h,space:d,pageHeader:a,form:k,autoInsertSpaceInButton:s,renderEmpty:l,virtual:g,dropdownMatchSelectWidth:p,rootPrefixCls:i,getPrefixCls:n.getPrefixCls,autocomplete:m,csp:H}};function or(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Vp="[object Symbol]";function yp(e){return typeof e=="symbol"||eu(e)&&Xk(e)==Vp}var bp=/\s/;function Zp(e){for(var t=e.length;t--&&bp.test(e.charAt(t)););return t}var _p=/^\s+/;function Bp(e){return e&&e.slice(0,Zp(e)+1).replace(_p,"")}var ks=NaN,Ep=/^[-+]0x[0-9a-f]+$/i,Sp=/^0b[01]+$/i,Op=/^0o[0-7]+$/i,Ap=parseInt;function us(e){if(typeof e=="number")return e;if(yp(e))return ks;if(or(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=or(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Bp(e);var n=Sp.test(e);return n||Op.test(e)?Ap(e.slice(2),n?2:8):Ep.test(e)?ks:+e}var po=function(){return B4.Date.now()},Pp="Expected a function",Tp=Math.max,Ip=Math.min;function Rp(e,t,n){var o,r,i,s,l,d,a=0,k=!1,u=!1,h=!0;if(typeof e!="function")throw new TypeError(Pp);t=us(t)||0,or(n)&&(k=!!n.leading,u="maxWait"in n,i=u?Tp(us(n.maxWait)||0,t):i,h="trailing"in n?!!n.trailing:h);function p(D){var y=o,A=r;return o=r=void 0,a=D,s=e.apply(A,y),s}function g(D){return a=D,l=setTimeout(H,t),k?p(D):s}function v(D){var y=D-d,A=D-a,L=t-y;return u?Ip(L,i-A):L}function m(D){var y=D-d,A=D-a;return d===void 0||y>=t||y<0||u&&A>=i}function H(){var D=po();if(m(D))return w(D);l=setTimeout(H,v(D))}function w(D){return l=void 0,h&&o?p(D):(o=r=void 0,s)}function j(){l!==void 0&&clearTimeout(l),a=0,o=d=r=l=void 0}function f(){return l===void 0?s:w(po())}function x(){var D=po(),y=m(D);if(o=arguments,r=this,d=D,y){if(l===void 0)return g(d);if(u)return clearTimeout(l),l=setTimeout(H,t),p(d)}return l===void 0&&(l=setTimeout(H,t)),s}return x.cancel=j,x.flush=f,x}var $p=["class","style"],Fp=function(){return{prefixCls:String,spinning:{type:Boolean,default:void 0},size:String,wrapperClassName:String,tip:r9.any,delay:Number,indicator:r9.any}},I9=null;function Np(e,t){return!!e&&!!t&&!isNaN(Number(t))}function qp(e){var t=e.indicator;I9=typeof t=="function"?t:function(){return b(t,null,null)}}const zt=b1({compatConfig:{MODE:3},name:"ASpin",inheritAttrs:!1,props:nu(Fp(),{size:"default",spinning:!0,wrapperClassName:""}),setup:function(){return{originalUpdateSpinning:null,configProvider:W1("configProvider",Il)}},data:function(){var t=this.spinning,n=this.delay,o=Np(t,n);return{sSpinning:t&&!o}},created:function(){this.originalUpdateSpinning=this.updateSpinning,this.debouncifyUpdateSpinning(this.$props)},mounted:function(){this.updateSpinning()},updated:function(){var t=this;v2(function(){t.debouncifyUpdateSpinning(),t.updateSpinning()})},beforeUnmount:function(){this.cancelExistingSpin()},methods:{debouncifyUpdateSpinning:function(t){var n=t||this.$props,o=n.delay;o&&(this.cancelExistingSpin(),this.updateSpinning=Rp(this.originalUpdateSpinning,o))},updateSpinning:function(){var t=this.spinning,n=this.sSpinning;n!==t&&(this.sSpinning=t)},cancelExistingSpin:function(){var t=this.updateSpinning;t&&t.cancel&&t.cancel()},renderIndicator:function(t){var n="".concat(t,"-dot"),o=su(this,"indicator");return o===null?null:(Array.isArray(o)&&(o=o.length===1?o[0]:o),a2(o)?_2(o,{class:n}):I9&&a2(I9())?_2(I9(),{class:n}):b("span",{class:"".concat(n," ").concat(t,"-dot-spin")},[b("i",{class:"".concat(t,"-dot-item")},null),b("i",{class:"".concat(t,"-dot-item")},null),b("i",{class:"".concat(t,"-dot-item")},null),b("i",{class:"".concat(t,"-dot-item")},null)]))}},render:function(){var t,n,o,r=this.$props,i=r.size,s=r.prefixCls,l=r.tip,d=l===void 0?(t=(n=this.$slots).tip)===null||t===void 0?void 0:t.call(n):l,a=r.wrapperClassName,k=this.$attrs,u=k.class,h=k.style,p=Sr(k,$p),g=this.configProvider,v=g.getPrefixCls,m=g.direction,H=v("spin",s),w=this.sSpinning,j=(o={},z1(o,H,!0),z1(o,"".concat(H,"-sm"),i==="small"),z1(o,"".concat(H,"-lg"),i==="large"),z1(o,"".concat(H,"-spinning"),w),z1(o,"".concat(H,"-show-text"),!!d),z1(o,"".concat(H,"-rtl"),m==="rtl"),z1(o,u,!!u),o),f=b("div",u1(u1({},p),{},{style:h,class:j}),[this.renderIndicator(H),d?b("div",{class:"".concat(H,"-text")},[d]):null]),x=iu(this);if(x&&x.length){var D,y=(D={},z1(D,"".concat(H,"-container"),!0),z1(D,"".concat(H,"-blur"),w),D);return b("div",{class:["".concat(H,"-nested-loading"),a]},[w&&b("div",{key:"loading"},[f]),b("div",{class:y,key:"container"},[x])])}return f}});zt.setDefaultIndicator=qp;zt.install=function(e){return e.component(zt.name,zt),e};const Up={key:0,src:xk,alt:"Montzar",class:"spinner-brand",width:"48",height:"48"},zp={key:1,class:"loading keep-motion"},Wp=b1({__name:"Spinner",props:{tip:{},size:{default:"large"},cls:{},delay:{},spinning:{type:Boolean},indicator:{type:Boolean},fixed:{type:Boolean,default:!0}},setup(e){return(t,n)=>(W(),P1(v1(zt),{spinning:e.spinning,tip:e.tip,size:e.size,delay:e.delay,class:q1(e.fixed?"!max-h-screen !fixed":"")},{indicator:e2(()=>[e.indicator?(W(),o1("div",zp,[...n[0]||(n[0]=[O("div",{class:"effect-1 effects"},null,-1),O("div",{class:"effect-2 effects"},null,-1),O("div",{class:"effect-3 effects"},null,-1)])])):(W(),o1("img",Up))]),default:e2(()=>[O("div",{class:q1(e.cls)},[Vn(t.$slots,"default")],2)]),_:3},8,["spinning","tip","size","delay","class"]))}}),co="gold-bank:token",wo="gold-bank:customerId",Co="gold-bank:mobile",hs="appToken",_9="gold-bank:isSalesExpert",w9=he("session",{state:()=>({token:localStorage.getItem(co),customerId:localStorage.getItem(wo),mobile:localStorage.getItem(Co),isSalesExpert:localStorage.getItem(_9)==="1"}),getters:{isLoggedIn:e=>!!e.token},actions:{login(e,t,n){this.token=e,this.customerId=t,this.mobile=n,localStorage.setItem(co,e),localStorage.setItem(wo,t),localStorage.setItem(Co,n),localStorage.setItem(hs,e)},setSalesExpert(e){this.isSalesExpert=e,e?localStorage.setItem(_9,"1"):localStorage.removeItem(_9)},logout(){this.token=null,this.customerId=null,this.mobile=null,this.isSalesExpert=!1,localStorage.removeItem(_9),localStorage.removeItem(co),localStorage.removeItem(wo),localStorage.removeItem(Co),localStorage.removeItem(hs)}}}),Rl="/api",Gp="gold-bank:token";let Re=null;function Kp(e){Re=e}class $l extends Error{constructor(t){super(`API ${t} rejected the session (401)`),this.name="UnauthorizedError"}}function Fl(){try{return localStorage.getItem(Gp)}catch{return null}}async function _1(e,t){const n=Fl(),o=await fetch(`${Rl}${e}`,{...t,headers:{"Content-Type":"application/json",...n?{Authorization:`Bearer ${n}`}:{},...t==null?void 0:t.headers}});if(o.status===401)throw Re==null||Re(),new $l(e);if(!o.ok){const r=await o.text();throw new Error(`API ${e} failed (${o.status}): ${r}`)}return o.json()}function ps(e){const t="/",n=t.endsWith("/")?t:`${t}/`;return`${window.location.origin}${n}${e.replace(/^\//,"")}`}const Ue={listProducts:()=>_1("/catalog/products"),requestOtp:e=>_1("/customer/auth/request-otp",{method:"POST",body:JSON.stringify({username:e})}),verifyOtp:(e,t)=>_1("/customer/auth/verify-otp",{method:"POST",body:JSON.stringify({username:e,password:t})}),ssoStart:()=>_1(`/customer/auth/sso/start?redirect_uri=${encodeURIComponent(ps("auth/iam/callback"))}`),ssoCallback:(e,t)=>_1("/customer/auth/sso/callback",{method:"POST",body:JSON.stringify({code:e,state:t})}),ssoLogoutUrl:()=>_1(`/customer/auth/sso/logout-url?return_url=${encodeURIComponent(ps(""))}`),getMe:()=>_1("/customer/me"),getAccountingBalance:()=>_1("/customer/me/accounting-balance"),getMyOrders:()=>_1("/customer/me/orders"),getMyLedgerEntries:()=>_1("/customer/me/ledger-entries"),getWageQuotes:e=>_1("/customer/me/wage-quote",{method:"POST",body:JSON.stringify({variantIds:e})}),getFavorites:()=>_1("/customer/me/favorites"),toggleFavorite:e=>_1("/customer/me/favorites/toggle",{method:"POST",body:JSON.stringify({productId:e})}),createOrder:e=>_1("/orders",{method:"POST",body:JSON.stringify(e)}),getLatestGoldPrice:(e=750)=>_1(`/pricing/latest?karatPerMille=${e}`),getHomeSlider:()=>_1("/home/slider"),getExpertIdentity:()=>_1("/expert/whoami"),getExpertCustomers:e=>_1("/expert/my-customers",{method:"POST",body:JSON.stringify({search:e??null})}),getExpertChildOrders:(e=1,t)=>_1("/expert/child-orders",{method:"POST",body:JSON.stringify({page:e,search:t??null})}),uploadDocument:async(e,t)=>{const n=new FormData;n.append("file",e),n.append("purpose",t);const o=Fl(),r=await fetch(`${Rl}/customer/me/documents`,{method:"POST",headers:o?{Authorization:`Bearer ${o}`}:{},body:n});if(r.status===401)throw Re==null||Re(),new $l("/customer/me/documents");if(!r.ok)throw new Error(`آپلود فایل ناموفق بود (${r.status})`);return r.json()},completeProfile:e=>_1("/customer/me/complete-profile",{method:"POST",body:JSON.stringify(e)}),getReport:(e=1)=>_1(`/customer/me/report?page=${e}`),getReportDetailList:(e=1)=>_1(`/customer/me/report/detail?page=${e}`),getReportBalances:()=>_1("/customer/me/report/balances"),getReportDocument:e=>_1(`/customer/me/report/${encodeURIComponent(e)}`)},Yp=he("wageQuotes",()=>{const e=w9(),t=Q({}),n=new Set,o=new Set;let r=null;E1(()=>e.token,()=>{t.value={},n.clear(),o.clear()});async function i(){r=null;const d=[...n].slice(0,200);if(d.forEach(a=>{n.delete(a),o.add(a)}),n.size&&(r=setTimeout(i,0)),!!d.length)try{const a=await Ue.getWageQuotes(d),k={...t.value};for(const u of a)k[u.variantId]=u;t.value=k}catch(a){console.warn("wage quote failed",a)}finally{d.forEach(a=>o.delete(a))}}function s(d){!e.token||t.value[d]||n.has(d)||o.has(d)||(n.add(d),r||(r=setTimeout(i,30)))}function l(d){const a=t.value[d];return a?parseFloat(a.finalPercent):null}return{quotes:t,request:s,finalPercent:l}});function Nl(e){return(e.qty??0)>0||!!e.isPreOrder}function Qp(e){if(!e||e.length===0)return null;const t=e.filter(Nl);return(t.length?t:e).reduce((o,r)=>parseFloat(r.defaultWagePercent){var w,j;return(j=(w=n.value.images)==null?void 0:w[0])==null?void 0:j.url}),r=N(()=>n.value.id),i=N(()=>n.value.title),s=N(()=>n.value.variants),l=Q(t??Qp(v1(s))),d=N(()=>l.value?parseFloat(l.value.rashWeightGrams):0),a=w9(),k=Yp(),u=N(()=>{const w=l.value;return w?a.isLoggedIn?(k.request(w.id),k.finalPercent(w.id)):parseFloat(w.defaultWagePercent):null}),h=Q(null),p=N(()=>{var w;return((w=l.value)==null?void 0:w.qty)??0}),g=N(()=>{var w;return((w=l.value)==null?void 0:w.isPreOrder)??!1}),v=N(()=>p.value>0||g.value),m=N(()=>n.value.productCode??null);return{product:n,image:o,id:r,title:i,productCode:m,variants:s,selectedVariant:l,min_gram:d,wage:u,hasDiscountWage:h,qty:p,isPreOrder:g,is_exist:v,has_warranty:Q(!1)}}const Xp=600;function ec(e,t){const n=Q(!1),o=Q(!!t),r=Q(!1),i=Q(t??null);return{loading:n,flag:o,notFound:r,productRef:i,load:async()=>{const l=i.value!==null;l?await new Promise(d=>setTimeout(d,Xp)):n.value=!0;try{const a=(await Ue.listProducts()).find(k=>k.id===e)??null;l?a&&JSON.stringify(a)!==JSON.stringify(i.value)&&(i.value=a):(i.value=a,r.value=!a),o.value=!0}catch(d){console.log(d)}finally{n.value=!1}}}}const tc=he("favorites",()=>{const e=Q([]),t=w9();async function n(){try{e.value=(await Ue.getFavorites()).ids}catch(i){console.warn("favorites: load failed",i)}}E1(()=>t.token,i=>{e.value=[],i&&n()},{immediate:!0});async function o(i){const s=e.value.includes(i);e.value=s?e.value.filter(l=>l!==i):[i,...e.value];try{const{favorite:l}=await Ue.toggleFavorite(i),d=e.value.includes(i);l&&!d&&(e.value=[i,...e.value]),!l&&d&&(e.value=e.value.filter(a=>a!==i))}catch(l){e.value=s?[i,...e.value.filter(d=>d!==i)]:e.value.filter(d=>d!==i),console.warn("favorites: toggle failed",l)}}function r(i){return e.value.includes(i)}return{ids:e,load:n,toggle:o,isFavorite:r}}),cs=()=>({colors:[],brands:[],ciny_id:[],limit_percent:[],limit_gram:[],has_discount:!1,text:void 0,cats:void 0,page:0}),nc=he("filters",{state:()=>({query:cs()}),actions:{reset(){this.query=cs()}}}),ql="appCart";function oc(){try{const e=localStorage.getItem(ql);return e?JSON.parse(e):[]}catch{return[]}}function bt(e){localStorage.setItem(ql,JSON.stringify(e))}const rc=he("cart",{state:()=>({items:oc()}),actions:{async init(){try{const e=await Ue.listProducts(),t=[];for(const n of this.items){const o=e.find(i=>i.id===n.pid),r=o==null?void 0:o.variants.find(i=>i.id===n.vid);o&&r&&t.push({...n,product:o})}this.items=t,bt(this.items)}catch(e){console.log(e)}},addToCart(e){var o,r;const t=(r=(o=e.product)==null?void 0:o.variants)==null?void 0:r.find(i=>i.id===e.vid);if(!t||!((t.qty??0)>0||t.isPreOrder))return!1;const n=this.find_index(e);return n===-1?this.items.push({...e,qty:this.capQty(e.qty,t)}):(this.items[n].product=e.product,this.items[n].qty=this.capQty(e.qty,t)),bt(this.items),!0},capQty(e,t){const n=Math.max(1,Math.floor(e)||1);if(t.isPreOrder)return n;const o=t.qty??0;return o>0?Math.min(n,o):n},maxQty(e){const t=this.find_index(e);if(t===-1)return null;const n=this.variant(this.items[t]);return!n||n.isPreOrder?null:(n.qty??0)>0?n.qty:null},remove(e){const t=this.find_index(e);t>-1&&this.items.splice(t,1),bt(this.items)},updateFeild(e,t,n,o){if(!this.isInCart(n))return!1;const r=t??this.find_index(n);if(o==="qty"){const i=this.variant(this.items[r]);e=i?this.capQty(Number(e),i):Math.max(1,Number(e)||1)}return this.items[r][o]=e,bt(this.items),!0},find_index(e){return this.items.findIndex(t=>t.pid===e.pid&&t.vid===e.vid)},isInCart(e){return this.find_index(e)>-1},variant(e){return e.product.variants.find(t=>t.id===e.vid)},total(){return this.items.reduce((e,t)=>{const n=this.variant(t);return e+(n?parseFloat(n.rashWeightGrams)*t.qty:0)},0).toFixed(2)},clear(){this.items=[],bt(this.items)}}});function ic(){return localStorage.getItem("appToken")}const sc={class:"pd__controls"},lc={class:"pd__headerTitle"},dc={class:"pd__controlsEnd"},ac={key:0,class:"pd__roundBadge"},kc={class:"pd__gallery"},uc={key:0,class:"pd__rail"},hc=["aria-label","onClick"],pc={key:1,class:"pd__stage pd__stage--empty"},cc={key:2,class:"pd__expand","aria-hidden":"true"},wc={class:"pd__scroll"},Cc={class:"pd__sheet"},gc={class:"pd__eyebrow"},vc={class:"pd__eyebrowText"},fc={class:"pd__head"},mc={class:"pd__headMain"},Mc={class:"pd__title"},jc={key:0,class:"pd__code"},xc={class:"pd__figures"},Dc={class:"pd__figure"},Lc={class:"pd__figureValue"},Hc={key:0,class:"pd__figure pd__figure--accent"},Vc={class:"pd__figureValue"},yc={key:0,class:"pd__chips no-scrollbar"},bc=["disabled","onClick"],Zc={key:1,class:"pd__block"},_c={class:"pd__block"},Bc={class:"pd__specs"},Ec={class:"pd__spec"},Sc={key:0,class:"pd__spec"},Oc={key:1,class:"pd__spec"},Ac={key:2,class:"pd__spec"},Pc={key:3,class:"pd__spec"},Tc={class:"pd__bar"},Ic={key:0,class:"pd__qty"},Rc={class:"pd__qtyValue"},$c=["aria-label"],Fc={class:"pd__pillText"},Nc=["disabled"],qc={key:0,class:"pd__previewCounter"},Uc={key:1,class:"pd__previewThumbs no-scrollbar"},zc=["aria-label","onClick"],Wc=["src","alt"],Gc=56,Kc=b1({__name:"SingleProduct",props:{id:{},initial:{}},emits:["closeDrawer"],setup(e,{emit:t}){const n=e,o=t,r=f4(),i=tc(),s=nc(),l=rc(),d=()=>{o("closeDrawer"),r.currentRoute.value.name==="singleProduct"&&r.back()},a=Q(!1),k=Q(0),u=Q(!1),h=Q(null),p=Q(!1);function g(){var T;const E=h.value;if(!E)return;const Z=((T=E.querySelector(".pd__gallery"))==null?void 0:T.clientHeight)??0;p.value=E.scrollTop>Math.max(Z-Gc,0)}const v=ec(n.id,n.initial),m=v.loading,H=v.flag,w={id:n.id,title:"",description:null,variants:[],images:[],category:null,brand:null,collections:[]},j=N(()=>Jp(v.productRef.value??w)),f=N(()=>j.value.id.value),x=N(()=>j.value.title.value),D=N(()=>j.value.productCode.value),y=N(()=>j.value.variants.value),A=N({get:()=>j.value.selectedVariant.value,set:E=>j.value.selectedVariant.value=E}),L=N(()=>j.value.min_gram.value),P=N(()=>j.value.wage.value),U=N(()=>j.value.qty.value),I=N(()=>j.value.isPreOrder.value),X=N(()=>j.value.is_exist.value),l1=N(()=>{var E;return((E=v.productRef.value)==null?void 0:E.description)??""}),h1=N(()=>l1.value.length>120),k1=N(()=>{var E,Z;return((Z=(E=v.productRef.value)==null?void 0:E.category)==null?void 0:Z.id)??""}),Y=N(()=>{var E,Z;return((Z=(E=v.productRef.value)==null?void 0:E.category)==null?void 0:Z.title)??""}),n1=N(()=>{var E,Z;return((Z=(E=v.productRef.value)==null?void 0:E.brand)==null?void 0:Z.title)??""}),C1=N(()=>{var E;return(((E=v.productRef.value)==null?void 0:E.images.length)??0)>0}),p1=N(()=>{var E;return((E=v.productRef.value)==null?void 0:E.images.map(Z=>Z.url))??[]});E1(p1,E=>{k.value>E.length-1&&(k.value=0)});const O1=Q(!1);function Z1(){C1.value&&(O1.value=!0,document.body.style.overflow="hidden")}function $(){O1.value=!1,document.body.style.overflow=""}const r1=N(()=>{const E=P.value;return E==null?"":E%1===0?String(E):E.toFixed(2)}),d1=N(()=>U.value>0?`${U.value} عدد موجود`:I.value?"پیش‌سفارش":"ناموجود"),t1=N(()=>U.value>0?"is-in":I.value?"is-pre":"is-out"),V=N(()=>{var E,Z;return{vid:((E=A.value)==null?void 0:E.id)??"",note:null,pid:((Z=v.productRef.value)==null?void 0:Z.id)??n.id,product:v.productRef.value??w,qty:1}}),F=N(()=>l.isInCart(V.value)),R=N(()=>l.find_index(V.value)),K=N(()=>R.value>-1?l.items[R.value].qty:0),i1=N(()=>l.maxQty(V.value)),c=N(()=>i1.value===null||K.value{c.value&&l.updateFeild(K.value+1,R.value,V.value,"qty")},M=()=>{if(K.value<=1){l.remove(V.value);return}l.updateFeild(K.value-1,R.value,V.value,"qty")},_=E=>Nl(E),S=()=>{l.addToCart(V.value)&&y4.success("محصول با موفقیت به سبد خرید افزوده شد",{title:"ثبت سفارش"})},B=E=>{E.stopPropagation(),i.toggle(n.id)},q=()=>{k1.value&&(s.query.cats=[k1.value],o("closeDrawer"),r.push({name:"search"}))};return fr(async()=>{await v.load()}),ze(()=>{O1.value&&(document.body.style.overflow="")}),(E,Z)=>{const T=k9("router-link");return v1(H)&&v1(v).productRef.value?(W(),P1(Wp,{key:0,spinning:v1(m),tip:"درحال دریافت اطلاعات"},{default:e2(()=>[O("article",{class:"pd",ref_key:"scroller",ref:h,onScrollPassive:g},[O("header",{class:q1(["pd__header",{"is-solid":p.value}])},[O("div",sc,[O("button",{type:"button",class:"pd__round","aria-label":"بازگشت",onClick:d},[b(U1,{icon:"vuesax-linear:arrow-right-1",size:"18"})]),O("h2",lc,M1(x.value),1),O("div",dc,[O("button",{type:"button",class:q1(["pd__round",{"is-on":v1(i).isFavorite(f.value)}]),"aria-label":"علاقه‌مندی",onClick:B},[b(U1,{icon:v1(i).isFavorite(f.value)?"vuesax-linear:heart-fill":"vuesax-linear:heart",size:"18"},null,8,["icon"])],2),b(T,{class:"pd__round",to:{name:"cart"},"aria-label":"سبد خرید"},{default:e2(()=>[b(U1,{icon:"vuesax-linear:bag-2",size:"18"}),v1(l).items.length?(W(),o1("span",ac,M1(v1(l).items.length),1)):L1("",!0)]),_:1})])])],2),O("div",kc,[C1.value?(W(),P1(Vi,{key:0,index:k.value,"onUpdate:index":Z[0]||(Z[0]=G=>k.value=G),slides:p1.value,alt:x.value,class:"pd__stage",onTap:Z1},{dots:e2(({index:G,go:z})=>[p1.value.length>1?(W(),o1("div",uc,[(W(!0),o1(f1,null,ot(p1.value,(e1,s1)=>(W(),o1("button",{key:e1,type:"button",class:q1(["pd__railDot",{"is-on":s1===G}]),"aria-label":`تصویر ${s1+1}`,onClick:E0(c1=>z(s1),["stop"])},null,10,hc))),128))])):L1("",!0)]),_:1},8,["index","slides","alt"])):(W(),o1("div",pc,[b(U1,{icon:"vuesax-linear:diamonds",size:"27"})])),C1.value?(W(),o1("span",cc,[b(U1,{icon:"vuesax-linear:maximize-4",size:"15"})])):L1("",!0)]),O("div",wc,[O("div",Cc,[Z[16]||(Z[16]=O("div",{class:"pd__grip","aria-hidden":"true"},null,-1)),O("div",gc,[O("span",vc,M1(Y.value||"محصول"),1),O("span",{class:q1(["pd__stock",t1.value])},[Z[6]||(Z[6]=O("span",{class:"pd__stockDot","aria-hidden":"true"},null,-1)),K2(" "+M1(d1.value),1)],2)]),O("header",fc,[O("div",mc,[O("h1",Mc,M1(x.value),1),D.value?(W(),o1("p",jc,M1(D.value),1)):L1("",!0)]),O("div",xc,[O("div",Dc,[O("span",Lc,M1(L.value),1),Z[7]||(Z[7]=O("span",{class:"pd__figureLabel"},"گرم",-1))]),P.value!=null?(W(),o1("div",Hc,[O("span",Vc,M1(r1.value)+"٪",1),Z[8]||(Z[8]=O("span",{class:"pd__figureLabel"},"اجرت",-1))])):L1("",!0)])]),y.value&&y.value.length>1?(W(),o1("section",yc,[(W(!0),o1(f1,null,ot(y.value,G=>{var z;return W(),o1("button",{key:G.id,type:"button",class:q1(["pd__chip",{"is-on":((z=A.value)==null?void 0:z.id)===G.id,"is-out":!_(G)}]),disabled:!_(G),onClick:e1=>A.value=G},M1(G.title),11,bc)}),128))])):L1("",!0),l1.value?(W(),o1("section",Zc,[Z[9]||(Z[9]=O("h2",{class:"pd__blockTitle"},"توضیحات",-1)),O("p",{class:q1(["pd__body",{"is-clamped":!u.value}])},M1(l1.value),3),h1.value?(W(),o1("button",{key:0,type:"button",class:"pd__more",onClick:Z[1]||(Z[1]=G=>u.value=!u.value)},M1(u.value?"بستن":"ادامه مطلب"),1)):L1("",!0)])):L1("",!0),O("section",_c,[Z[15]||(Z[15]=O("h2",{class:"pd__blockTitle"},"مشخصات",-1)),O("dl",Bc,[O("div",Ec,[O("dt",null,[b(U1,{icon:"vuesax-linear:weight",size:"15"}),Z[10]||(Z[10]=K2(" وزن",-1))]),O("dd",null,M1(L.value)+" گرم",1)]),P.value!=null?(W(),o1("div",Sc,[O("dt",null,[b(U1,{icon:"vuesax-linear:percentage-square",size:"15"}),Z[11]||(Z[11]=K2(" اجرت",-1))]),O("dd",null,M1(r1.value)+"٪",1)])):L1("",!0),A.value?(W(),o1("div",Oc,[O("dt",null,[b(U1,{icon:"vuesax-linear:diamonds",size:"15"}),Z[12]||(Z[12]=K2(" تنوع",-1))]),O("dd",null,M1(A.value.title),1)])):L1("",!0),Y.value?(W(),o1("div",Ac,[O("dt",null,[b(U1,{icon:"vuesax-linear:category",size:"15"}),Z[13]||(Z[13]=K2(" دسته‌بندی",-1))]),O("dd",null,M1(Y.value),1)])):L1("",!0),n1.value?(W(),o1("div",Pc,[O("dt",null,[b(U1,{icon:"vuesax-linear:shop",size:"15"}),Z[14]||(Z[14]=K2(" برند",-1))]),O("dd",null,M1(n1.value),1)])):L1("",!0)])])])]),O("div",Tc,[F.value?(W(),o1("div",Ic,[O("button",{type:"button",class:"pd__qtyBtn","aria-label":"افزایش",onClick:C},[b(U1,{icon:"vuesax-linear:add",size:"15"})]),O("span",Rc,M1(K.value),1),O("button",{type:"button",class:"pd__qtyBtn","aria-label":K.value===1?"حذف":"کاهش",onClick:M},[b(U1,{icon:K.value===1?"vuesax-linear:trash":"vuesax-linear:minus",size:"15"},null,8,["icon"])],8,$c)])):Y.value?(W(),o1("button",{key:1,type:"button",class:"pd__pill",onClick:q},[b(U1,{icon:"vuesax-linear:category",size:"17"}),O("span",Fc,M1(Y.value),1)])):L1("",!0),F.value?(W(),P1(T,{key:3,class:"pd__cta",to:{name:"cart"}},{default:e2(()=>[b(U1,{icon:"vuesax-linear:bag-2",size:"17"}),Z[17]||(Z[17]=K2(" مشاهده سبد خرید ",-1))]),_:1})):(W(),o1("button",{key:2,type:"button",class:"pd__cta",disabled:!X.value,onClick:Z[2]||(Z[2]=G=>v1(ic)()?S():a.value=!0)},[X.value?(W(),P1(U1,{key:0,icon:"vuesax-linear:bag-2",size:"17"})):L1("",!0),K2(" "+M1(X.value?"افزودن به سفارش":"ناموجود"),1)],8,Nc))])],544),(W(),P1(Ct,{to:"body"},[b(_n,{name:"pd-preview"},{default:e2(()=>[O1.value?(W(),o1("div",{key:0,class:"pd__preview",onClick:E0($,["self"])},[O("button",{type:"button",class:"pd__previewClose","aria-label":"بستن",onClick:$},[b(U1,{icon:"vuesax-linear:add",size:"20"})]),p1.value.length>1?(W(),o1("div",qc,M1(k.value+1)+" / "+M1(p1.value.length),1)):L1("",!0),b(Vi,{index:k.value,"onUpdate:index":Z[3]||(Z[3]=G=>k.value=G),slides:p1.value,alt:x.value,class:"pd__previewStage",fit:"contain"},null,8,["index","slides","alt"]),p1.value.length>1?(W(),o1("div",Uc,[(W(!0),o1(f1,null,ot(p1.value,(G,z)=>(W(),o1("button",{key:G,type:"button",class:q1(["pd__previewThumb",{"is-on":z===k.value}]),"aria-label":`تصویر ${z+1}`,onClick:e1=>k.value=z},[O("img",{src:G,alt:`${x.value} ${z+1}`,draggable:"false"},null,8,Wc)],10,zc))),128))])):L1("",!0)])):L1("",!0)]),_:1})])),b(V4,{show:a.value,"onUpdate:show":Z[4]||(Z[4]=G=>a.value=G),art:"login",title:"ابتدا وارد حساب کاربری شوید",description:"برای دسترسی به تمامی امکانات نرم افزار منتزر، گزینه ورود/ثبت نام را لمس کنید و در صورت نداشتن حساب کاربری، ثبت نام نمایید.","confirm-text":"ورود/ثبت نام","cancel-text":"بیخیال",onConfirm:Z[5]||(Z[5]=G=>v1(r).push({name:"login"}))},null,8,["show"])]),_:1},8,["spinning"])):L1("",!0)}}}),Ul=He(Kc,[["__scopeId","data-v-3162e70f"]]),Yc=Object.freeze(Object.defineProperty({__proto__:null,default:Ul},Symbol.toStringTag,{value:"Module"})),R9=cr(null);let $9=null;typeof document<"u"&&document.addEventListener("pointerdown",e=>{$9=e.target instanceof Element?e.target:null},{capture:!0,passive:!0});function Ow(e,t){const n=($9==null?void 0:$9.closest("[data-product-origin]"))??null;R9.value={product:e,origin:t??n}}const Qc=["src"],Ye=420,Zt=300,ws=300,Cs=220,go="cubic-bezier(0.32, 0.72, 0, 1)",Jc="cubic-bezier(0.22, 1, 0.36, 1)",gs=.9,vs="inset(0px 0px 0px 0px round 0px)",Xc=b1({__name:"ProductMorph",setup(e){const t=Ya(),n=cr(null),o=Q(null),r=Q(!1),i=Q(!1),s=Q(null),l=Q(null),d=Q(null),a=Q(null);function k($=.82,r1=7,d1=32){const t1=Math.sqrt(1-$*$),V=[];for(let F=0;F<=d1;F++){const R=F/d1*r1,K=F===d1?1:1-Math.exp(-$*R)*(Math.cos(t1*R)+$/t1*Math.sin(t1*R));V.push(String(+K.toFixed(4)))}return`linear(${V.join(", ")})`}const h=typeof CSS<"u"&&CSS.supports("animation-timing-function","linear(0, 1)")?k():"cubic-bezier(0.22, 1, 0.36, 1)",p=()=>document.documentElement.classList.contains("motion-reduced")||typeof matchMedia<"u"&&matchMedia("(prefers-reduced-motion: reduce)").matches;function g($,r1,d1){const t1=$.getBoundingClientRect(),V=getComputedStyle($),F=parseFloat(V.paddingLeft)||0,R=parseFloat(V.paddingRight)||0,K=parseFloat(V.paddingTop)||0,i1=parseFloat(V.paddingBottom)||0,c=t1.left+F,C=t1.top+K,M=t1.width-F-R,_=t1.height-K-i1;if(V.objectFit!=="contain"&&V.objectFit!=="scale-down")return{x:c,y:C,w:M,h:_};let S=Math.min(M/r1,_/d1);return V.objectFit==="scale-down"&&(S=Math.min(S,1)),{x:c+(M-r1*S)/2,y:C+(_-d1*S)/2,w:r1*S,h:d1*S}}function v($,r1){const d1=document.documentElement.clientWidth,t1=window.innerHeight;return`inset(${$.top}px ${d1-$.right}px ${t1-$.bottom}px ${$.left}px round ${r1})`}function m($){return $.width>0&&$.height>0&&$.bottom>0&&$.top0}function w($,r1){return($.currentSrc||$.src)===(r1.currentSrc||r1.src)}function j(){var t1;const $=(t1=d.value)==null?void 0:t1.querySelector(".pd__stage");if(!$)return null;const r1=$.getBoundingClientRect(),d1=$.querySelectorAll("img");for(const V of d1){const F=V.getBoundingClientRect(),R=F.left+F.width/2;if(R>r1.left&&R`translate(${t1.x-r1.x}px, ${t1.y-r1.y}px) scale(${t1.w/r1.w}, ${t1.h/r1.h})`;return[{transform:d1($)},{transform:d1(r1)}]}function A($,r1){$.style.left=`${r1.x}px`,$.style.top=`${r1.y}px`,$.style.width=`${r1.w}px`,$.style.height=`${r1.h}px`}let L=0,P=[],U="idle",I=[];function X($){$&&($.style.opacity="0",I.push($))}function l1(){I.forEach($=>$.style.opacity=""),I=[]}function h1(){P.forEach($=>$.cancel()),P=[]}async function k1($){P=$,await Promise.all($.map(r1=>r1.finished.catch(()=>{})))}function Y($){document.documentElement.style.overflow=$?"hidden":""}async function n1($){var R;const r1=++L;h1(),l1(),i.value=!1,r.value=!0,U="opening";const d1=f($.origin),t1=(R=$.origin)==null?void 0:R.getBoundingClientRect(),V=!p()&&!!$.origin&&!!t1&&m(t1);if(o.value=V&&H(d1)?d1.currentSrc||d1.src:null,n.value=$,await v2(),r1!==L||!d.value||!s.value)return;let F;V&&t1&&$.origin?F=C1($.origin,t1,d1):p()?F=[d.value.animate({opacity:[0,1]},{duration:160,easing:"ease-out",fill:"both"}),s.value.animate({opacity:[0,1]},{duration:160,easing:"ease-out",fill:"both"})]:F=[d.value.animate({transform:["translateY(6%)","none"],opacity:[0,1]},{duration:ws,easing:Jc,fill:"both"}),s.value.animate({opacity:[0,1]},{duration:ws,easing:"ease-out",fill:"both"})],await k1(F),r1===L&&(h1(),l1(),o.value=null,r.value=!1,U="open",Y(!0))}function C1($,r1,d1){const t1=d.value,V=l.value,F=s.value,{pageBg:R,cardBg:K,radius:i1}=x($),c=j(),C=a.value;let M=null;if(C&&H(d1)&&c&&w(d1,c)){const S=d1.naturalWidth,B=d1.naturalHeight,q=g(c,S,B);q.w>0&&q.h>0&&(M={from:g(d1,S,B),to:q})}t1.style.transformOrigin=D(r1);const _=[V.animate({clipPath:[v(r1,i1),vs],backgroundColor:[K,R]},{duration:Ye,easing:h,fill:"both"}),F.animate({opacity:[0,1]},{duration:Ye*.6,easing:"ease-out",fill:"both"}),t1.animate({transform:[`scale(${gs})`,"none"]},{duration:Ye,easing:h,fill:"both"}),t1.animate({opacity:[0,1]},{duration:Ye*.55,delay:Ye*.1,easing:"cubic-bezier(0.3, 0, 0.2, 1)",fill:"both"})];return C&&M&&c?(A(C,M.to),X(c),_.push(C.animate(y(M.from,M.to),{duration:Ye,easing:h,fill:"both"}))):o.value=null,_}async function p1(){if(!n.value||U==="closing")return;const $=++L,r1=U==="opening";U="closing",i.value=!0,r.value=!0;let d1;r1&&P.length?(P.forEach(t1=>t1.reverse()),d1=P):(h1(),l1(),d1=await O1()),await k1(d1),$===L&&Z1()}async function O1(){var S;const $=d.value,r1=l.value,d1=s.value;if(!$||!r1||!d1)return[];if(p())return[$.animate({opacity:[1,0]},{duration:140,easing:"ease-in",fill:"forwards"}),d1.animate({opacity:[1,0]},{duration:140,easing:"ease-in",fill:"forwards"})];const t1=((S=n.value)==null?void 0:S.origin)??null,V=t1!=null&&t1.isConnected?t1.getBoundingClientRect():null;if(!t1||!V||!m(V))return[$.animate({transform:["none","translateY(6%)"],opacity:[1,0]},{duration:Cs,easing:"cubic-bezier(0.4, 0, 1, 1)",fill:"forwards"}),d1.animate({opacity:[1,0]},{duration:Cs,easing:"ease-in",fill:"forwards"})];const{pageBg:F,cardBg:R,radius:K}=x(t1),i1=f(t1),c=j();let C=null;if(H(i1)&&c&&w(i1,c)&&m(c.getBoundingClientRect())){const B=i1.naturalWidth,q=i1.naturalHeight,E=g(c,B,q);E.w>0&&E.h>0&&(C={from:E,to:g(i1,B,q)})}C&&i1&&(o.value=i1.currentSrc||i1.src,await v2()),$.style.transformOrigin=D(V);const M=[r1.animate([{clipPath:vs,backgroundColor:F,opacity:1},{opacity:1,offset:.7},{clipPath:v(V,K),backgroundColor:R,opacity:0}],{duration:Zt,easing:go,fill:"forwards"}),$.animate({transform:["none",`scale(${gs})`]},{duration:Zt,easing:go,fill:"forwards"}),$.animate({opacity:[1,0]},{duration:Zt*.45,easing:"ease-in",fill:"forwards"}),d1.animate({opacity:[1,0]},{duration:Zt,easing:"ease-out",fill:"forwards"})],_=a.value;return _&&C&&c&&(A(_,C.from),X(c),M.push(_.animate(y(C.to,C.from).reverse(),{duration:Zt,easing:go,fill:"forwards"}))),M}function Z1(){h1(),l1(),o.value=null,r.value=!1,i.value=!1,U="idle",n.value=null,Y(!1),R9.value&&(R9.value=null)}return E1(R9,$=>{$?n1($):n.value&&p1()}),E1(()=>t.fullPath,()=>{n.value&&(++L,Z1())}),ze(()=>{h1(),l1(),Y(!1)}),($,r1)=>(W(),P1(Ct,{to:"body"},[n.value?(W(),o1("div",{key:0,class:q1(["pm",{"is-moving":r.value,"is-closing":i.value}]),dir:"rtl"},[O("div",{ref_key:"veil",ref:s,class:"pm__veil","aria-hidden":"true"},null,512),O("div",{ref_key:"shape",ref:l,class:"pm__shape","aria-hidden":"true"},null,512),O("div",{ref_key:"sheet",ref:d,class:"pm__sheet no-scrollbar"},[(W(),P1(Ul,{id:n.value.product.id,key:n.value.product.id,initial:n.value.product,onCloseDrawer:p1},null,8,["id","initial"]))],512),o.value?(W(),o1("img",{key:0,ref_key:"ghost",ref:a,class:"pm__ghost",src:o.value,alt:"","aria-hidden":"true",decoding:"sync"},null,8,Qc)):L1("",!0)],2)):L1("",!0)]))}}),ew=He(Xc,[["__scopeId","data-v-4b2262f9"]]);function tw(){const{offlineReady:e,needRefresh:t,updateServiceWorker:n}=m4(),o=async()=>{await n(),e.value=!1,t.value=!1};mn(async()=>(v1(e)||v1(t))&&await o())}const nw="0.0.1",vo={version:nw},ow=b1({__name:"App",setup(e){const t=f4(),{updateServiceWorker:n}=m4(),o=N(()=>t.currentRoute.value.meta&&t.currentRoute.value.meta.layout==="FullPage"?S6:_6),r=Q(!1);function i(){const l=localStorage.getItem("version");l?l!==vo.version&&(r.value=!0):localStorage.setItem("version",vo.version)}function s(){localStorage.setItem("version",vo.version),n(),window.location.reload()}return q2(()=>{tw(),i()}),(l,d)=>{const a=k9("router-view");return W(),o1("div",null,[(W(),P1(Ho(o.value),{class:"relative"},{default:e2(()=>[b(a,null,{default:e2(({Component:k,route:u})=>[(W(),P1(G3,null,[(W(),P1(yd,null,{default:e2(()=>[(W(),P1(Ho(k),{key:u.name}))]),_:2},1024))],1024))]),_:1})]),_:1})),b(V4,{show:r.value,"onUpdate:show":d[0]||(d[0]=k=>r.value=k),art:"update",title:"نسخه جدید منتزر منتشر شد!",description:"برای استفاده از آخرین امکانات و بهبودها، برنامه را به روز رسانی کنید.","confirm-text":"به روز رسانی","cancel-text":"بعداً",onConfirm:d[1]||(d[1]=k=>s())},null,8,["show"]),b(ew),b(vk)])}}}),rw=he("transition",{state:()=>({transitionFlag:!0,transitionEnded:!0,headerHeight:0}),actions:{setTransitionFlag(e){this.transitionFlag=e},setTransitionEnded(e){this.transitionEnded=e},setHeaderHeight(e){this.headerHeight=e}}}),l9=Ka({history:Va(),scrollBehavior(e,t,n){return n||{top:0}},routes:[{path:"/home",name:"home",component:()=>A1(()=>import("./HomeView-Cl6D8_Sy.js"),__vite__mapDeps([0,1,2,3,4,5]))},{path:"/product/:id",name:"singleProduct",component:()=>A1(()=>Promise.resolve().then(()=>Yc),void 0),props:!0,meta:{layout:"FullPage"}},{path:"/newest",name:"newestProduct",component:()=>A1(()=>import("./NewestView-BU18f8_c.js"),__vite__mapDeps([6,7,8,9,10,11,12,13])),meta:{layout:"FullPage"}},{path:"/cart",name:"cart",component:()=>A1(()=>import("./CartView-KYhz2yxy.js"),__vite__mapDeps([14,7,8,15,16,17,18,4,19,20,21]))},{path:"/login",name:"login",component:()=>A1(()=>import("./LoginRegisterView-DruItYRS.js"),__vite__mapDeps([22,7,8,19,20,17,18,23])),meta:{layout:"FullPage"}},{path:"/auth/iam/callback",name:"iamCallback",component:()=>A1(()=>import("./IamCallback-CuKyx6n2.js"),[]),meta:{layout:"FullPage"}},{path:"/user",name:"userPage::hasSubRoute",component:()=>A1(()=>import("./DashboardView-F1CUJWd2.js"),__vite__mapDeps([24,1,2,3,4,25]))},{path:"/orders",name:"ordersList",component:()=>A1(()=>import("./OrdersView-DENQ-Etu.js"),__vite__mapDeps([26,7,8,27,28,2,15,16,17,18,4,29])),meta:{requiresAuth:!0}},{path:"/transactions",name:"transactionsList",component:()=>A1(()=>import("./TransactionsView-BpNfNk05.js"),__vite__mapDeps([30,7,8,9,10,2,15,16,17,18,31])),meta:{requiresAuth:!0}},{path:"/profile",name:"profileData",component:()=>A1(()=>import("./ProfileView-C1gjwKvq.js"),__vite__mapDeps([32,7,8,9,10,33])),meta:{requiresAuth:!0}},{path:"/favorites",name:"favoritesList",component:()=>A1(()=>import("./FavoritesView-KwTaarkp.js"),__vite__mapDeps([34,7,8,9,10,11,12,35])),meta:{requiresAuth:!0}},{path:"/settings/appearance",name:"appearanceSettings",component:()=>A1(()=>import("./AppearanceView-Cs0B0IPW.js"),__vite__mapDeps([36,7,8,37]))},{path:"/ChildOrder",name:"ChildOrder",component:()=>A1(()=>import("./ChildOrdersView-C9qT9wGg.js"),__vite__mapDeps([38,7,8,27,28,2,15,16,17,18,4,39])),meta:{title:"سفارش مشتریان",layout:"FullPage",requiresAuth:!0,requiresExpert:!0}},{path:"/customerChoice",name:"customerChoice",component:()=>A1(()=>import("./CustomerChoiceView-AilyPwLn.js"),__vite__mapDeps([40,7,8,27,28,15,16,17,18,4,41])),meta:{title:"انتخاب مشتری",layout:"FullPage",requiresAuth:!0,requiresExpert:!0}},{path:"/complete_profile",name:"completeProfile",component:()=>A1(()=>import("./CompleteProfileView-Bbq7Qgyl.js"),__vite__mapDeps([42,7,8,43])),meta:{title:"تکمیل پروفایل",layout:"FullPage",requiresAuth:!0,requiresIncompleteProfile:!0}},{path:"/report",name:"report",component:()=>A1(()=>import("./ReportView-DdQlxLKa.js"),__vite__mapDeps([44,7,8,2,15,16,17,18,4,45])),meta:{title:"گزارش",layout:"FullPage",requiresAuth:!0}},{path:"/report/detail",name:"reportDetail",component:()=>A1(()=>import("./ReportView-DdQlxLKa.js"),__vite__mapDeps([44,7,8,2,15,16,17,18,4,45])),meta:{title:"جزئیات حساب",layout:"FullPage",requiresAuth:!0}},{path:"/notifications",name:"notifications",component:()=>A1(()=>import("./NotificationsView-BMMkA8pk.js"),__vite__mapDeps([46,7,8,47]))},{path:"/search",name:"search",component:()=>A1(()=>import("./SearchView-C9JtP0Ya.js"),__vite__mapDeps([48,7,8,27,28,16,18,20,11,12,4,49]))},{path:"/collection/:id?",name:"collection",component:()=>A1(()=>import("./CollectionView-Bm2v65eC.js"),__vite__mapDeps([50,7,8,9,10,11,12,51]))},{path:"/",redirect:{name:"home"}},{path:"/:pathMatch(.*)*",redirect:{name:"home"}}]});l9.beforeEach(async e=>{const t=w9(),n=Er();if(!t.isLoggedIn&&e.name!=="iamCallback"&&sessionStorage.getItem("gb_iam_sso_checked")!=="1"){sessionStorage.setItem("gb_iam_sso_checked","1");try{const o=await Ue.ssoStart();if(o.enabled&&o.authorize_url)return window.location.assign(o.authorize_url),!1}catch{}}if(e.name==="login"&&t.isLoggedIn)return{name:"home"};if(e.meta.requiresAuth&&!t.isLoggedIn)return{name:"login",query:{redirect:e.fullPath}};if(e.meta.requiresExpert&&!t.isSalesExpert)return{name:"userPage::hasSubRoute"};if(e.meta.requiresIncompleteProfile&&t.isLoggedIn)try{const o=await Ue.getMe();if(o.verificationStep==="VERIFIED"||o.verificationStep==="STEP_TWO_SUBMITTED")return{name:"home"}}catch{}e.name==="singleProduct"?n.setPgaTransition("slideDown"):n.setPgaTransition(void 0)});l9.afterEach(e=>{const t=Er(),n=rw();n.setTransitionFlag(!1),n.setTransitionEnded(!1),setTimeout(()=>{n.setTransitionFlag(!0)},100);const o=t.navBarRoutes.find(r=>e.name===r.name);o?(t.setActiveLink(o.index),t.setNavVisibility(!0)):t.setNavVisibility(!1)});const zl="gold-bank:appearance",fs=()=>typeof matchMedia<"u"?matchMedia("(prefers-color-scheme: dark)"):null,iw=()=>typeof matchMedia<"u"?matchMedia("(prefers-reduced-motion: reduce)"):null;function sw(){var t;const e={theme:"system",reduceMotion:!!((t=iw())!=null&&t.matches)};try{const n=localStorage.getItem(zl);if(!n)return e;const o=JSON.parse(n);return{theme:o.theme==="light"||o.theme==="dark"||o.theme==="system"?o.theme:e.theme,reduceMotion:typeof o.reduceMotion=="boolean"?o.reduceMotion:e.reduceMotion}}catch{return e}}function lw(e){try{localStorage.setItem(zl,JSON.stringify(e))}catch{}}const dw="#15171A";let ms=null;const aw=he("appearance",{state:()=>{var e;return{...sw(),systemDark:!!((e=fs())!=null&&e.matches)}},getters:{resolvedTheme:e=>e.theme==="system"?e.systemDark?"dark":"light":e.theme,isReducedMotion:e=>e.reduceMotion},actions:{init(){var t;const e=fs();(t=e==null?void 0:e.addEventListener)==null||t.call(e,"change",n=>{this.systemDark=n.matches,this.theme==="system"&&this.apply()}),this.apply(!1)},setTheme(e){e!==this.theme&&(this.theme=e,this.save(),this.apply())},setReduceMotion(e){e!==this.reduceMotion&&(this.reduceMotion=e,this.save(),this.apply(!1))},save(){lw({theme:this.theme,reduceMotion:this.reduceMotion})},apply(e=!0){const t=document.documentElement,n=this.resolvedTheme==="dark";e&&t.classList.add("theme-switching"),t.classList.toggle("theme-dark",n),t.classList.toggle("van-theme-dark",n),t.classList.toggle("motion-reduced",this.reduceMotion);const o=document.querySelector('meta[name="theme-color"]');o&&(ms??(ms=o.getAttribute("data-light")??o.getAttribute("content")),o.setAttribute("content",n?dw:ms??"")),e&&requestAnimationFrame(()=>requestAnimationFrame(()=>t.classList.remove("theme-switching")))}}}),kw={class:"px-[16px] max-w-screen-md m-auto relative no-scrollbar"},uw=b1({__name:"Container",props:{padding:{}},setup(e){return(t,n)=>(W(),o1("main",kw,[Vn(t.$slots,"default")]))}}),Ms="data:image/svg+xml,%3csvg%20width='12'%20height='9'%20viewBox='0%200%2012%209'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M6%209C5.91177%205.77359%203.66177%204.75472%200%204.5C3.57353%204.37264%205.91177%203.18396%206%200C6.08824%203.22642%208.38235%204.4151%2012%204.5C8.38235%204.75472%206.08824%205.77359%206%209Z'%20fill='%238D6A46'/%3e%3c/svg%3e";i4.use("fa-IR",N8);const C9=_7(ow);C9.use(S7());aw().init();C9.use(l9);Kp(()=>{w9().logout(),l9.currentRoute.value.name!=="login"&&l9.push({name:"login"})});C9.use(Y7,{loading:Ms,error:Ms});C9.component("container",uw);C9.mount("#app");export{xw as $,Ow as A,k9 as B,f4 as C,rw as D,Vt as E,f1 as F,Mw as G,Vn as H,U1 as I,Wp as J,G1 as K,fr as L,rc as M,K2 as N,w9 as O,V4 as P,E1 as Q,cw as R,Ya as S,yr as T,y4 as U,_n as V,eu as W,Xk as X,mr as Y,Hn as Z,He as _,ze as a,Zw as a$,Ne as a0,u1 as a1,U2 as a2,Pk as a3,$k as a4,_4 as a5,Ik as a6,l2 as a7,z1 as a8,W1 as a9,F5 as aA,Tr as aB,Pr as aC,Ir as aD,cr as aE,Eu as aF,O4 as aG,w1 as aH,Rp as aI,Sw as aJ,Ou as aK,Sr as aL,tc as aM,E0 as aN,Bw as aO,Wh as aP,A4 as aQ,yw as aR,Ur as aS,_w as aT,hw as aU,Dw as aV,iu as aW,Lw as aX,jw as aY,su as aZ,Hw as a_,Tn as aa,r9 as ab,Ar as ac,mn as ad,fp as ae,S9 as af,nu as ag,ae as ah,u9 as ai,yp as aj,rn as ak,us as al,Ol as am,je as an,lu as ao,c9 as ap,or as aq,B4 as ar,on as as,Ew as at,Vw as au,_2 as av,bw as aw,Zi as ax,sn as ay,Pu as az,O as b,vr as b0,F8 as b1,Nk as b2,mw as b3,Z0 as b4,ww as b5,de as b6,R2 as b7,it as b8,p9 as b9,En as ba,fw as bb,Sn as bc,gw as bd,e4 as be,n4 as bf,Cw as bg,vw as bh,B8 as bi,Ct as bj,o1 as c,b1 as d,L1 as e,W as f,Q as g,N as h,q1 as i,P1 as j,Jp as k,pw as l,v1 as m,re as n,q2 as o,b as p,he as q,ot as r,Ue as s,M1 as t,aw as u,nc as v,Cr as w,v2 as x,xk as y,e2 as z}; diff --git a/apps/user-app-v2/dist/assets/index-BBOQn_fb.js b/apps/user-app-v2/dist/assets/index-BBOQn_fb.js deleted file mode 100644 index 8e1deaf..0000000 --- a/apps/user-app-v2/dist/assets/index-BBOQn_fb.js +++ /dev/null @@ -1 +0,0 @@ -import{a4 as y,d as A,a5 as L,a6 as $,E as p,a7 as w,l as c,g as D,A as N,L as B,a8 as I,p as M,a9 as f,aa as R,ab as U,ac as Y}from"./index-CZjgV-Yn.js";const[C,r,F]=y("pull-refresh"),x=50,G=["pulling","loosing","success"],X={disabled:Boolean,modelValue:Boolean,headHeight:f(x),successText:String,pullingText:String,loosingText:String,loadingText:String,pullDistance:L,successDuration:f(500),animationDuration:f(300)};var j=A({name:C,props:X,emits:["change","refresh","update:modelValue"],setup(s,{emit:d,slots:o}){let u;const g=D(),T=D(),H=$(g),e=N({status:"normal",distance:0,duration:0}),i=U(),P=()=>{if(s.headHeight!==x)return{height:`${s.headHeight}px`}},h=()=>e.status!=="loading"&&e.status!=="success"&&!s.disabled,E=t=>{const a=+(s.pullDistance||s.headHeight);return t>a&&(t{const l=+(s.pullDistance||s.headHeight);e.distance=t,a?e.status="loading":t===0?e.status="normal":t{const{status:t}=e;return t==="normal"?"":s[`${t}Text`]||F(t)},k=()=>{const{status:t,distance:a}=e;if(o[t])return o[t]({distance:a});const l=[];return G.includes(t)&&l.push(c("div",{class:r("text")},[m()])),t==="loading"&&l.push(c(B,{class:r("loading")},{default:m})),l},V=()=>{e.status="success",setTimeout(()=>{n(0)},+s.successDuration)},v=t=>{u=R(H.value)===0,u&&(e.duration=0,i.start(t))},b=t=>{h()&&v(t)},_=t=>{if(h()){u||v(t);const{deltaY:a}=i;i.move(t),u&&a.value>=0&&i.isVertical()&&(I(t),n(E(a.value)))}},S=()=>{u&&i.deltaY.value&&h()&&(e.duration=+s.animationDuration,e.status==="loosing"?(n(+s.headHeight,!0),d("update:modelValue",!0),M(()=>d("refresh"))):n(0))};return p(()=>s.modelValue,t=>{e.duration=+s.animationDuration,t?n(+s.headHeight,!0):o.success||s.successText?V():n(0,!1)}),w("touchmove",_,{target:T}),()=>{var t;const a={transitionDuration:`${e.duration}ms`,transform:e.distance?`translate3d(0,${e.distance}px, 0)`:""};return c("div",{ref:g,class:r()},[c("div",{ref:T,class:r("track"),style:a,onTouchstartPassive:b,onTouchend:S,onTouchcancel:S},[c("div",{class:r("head"),style:P()},[k()]),(t=o.default)==null?void 0:t.call(o)])])}}});const z=Y(j);export{z as P}; diff --git a/apps/user-app/dist/assets/index-DhY79V3c.js b/apps/user-app-v2/dist/assets/index-BkhudXey.js similarity index 76% rename from apps/user-app/dist/assets/index-DhY79V3c.js rename to apps/user-app-v2/dist/assets/index-BkhudXey.js index b1fbfca..c6fdff2 100644 --- a/apps/user-app/dist/assets/index-DhY79V3c.js +++ b/apps/user-app-v2/dist/assets/index-BkhudXey.js @@ -1,7 +1,7 @@ -import{i as ft,b as pa,f as It,c as Be,d as _,e as ba,g as ya,h as xa,j as wa,I as Yt,k as T,u as fe,P as X,L as Mt,l as hr,m as pr,n as Ca,o as ve,p as Zt,S as Me,t as Fa,q as Aa,r as Ee,s as J,v as ct,w as Sa,x as ie,y as xe,z as br,A as Ea,B as jt,C as Oa,D as Pa,F as yr,G as Ta,H as _a,J as $a,K as xr,M as Ia,N as Ma,O as it,Q as wr}from"./Spinner.vue_vue_type_style_index_0_lang-DQwH-Xdy.js";import{o as ja,i as Na,a as Oe,M as Cr,g as Ra,e as Ba,b as za,c as qa,d as Fr,f as Ar,k as dt,h as Sr,j as Xt,l as La,m as Er,s as Va,n as ka,U as mn,p as Qt,q as Or,r as lt,t as Da,S as Pr,u as Wa,_ as vt,v as Tr,w as Ga,x as Ua,y as hn,z as _r,A as Jt,F as Nt,B as Fe}from"./FormItemContext-ByaoQ3t8.js";import{d as te,o as Pe,N as $r,O as Ha,G as de,P as Ue,B as Ir,k as B,h as R,Q as gt,M as le,a as Ne,T as Ka,R as mt,g as H,S as Ya,U as en,V as Za,F as We,W as Xa,X as Mr,Y as Rt,u as we,w as jr}from"./index-CBZSLIgu.js";import{w as he,_ as Qa,a as Ja,o as be}from"./classCallCheck-R2Fkn3Yh.js";var tn=ja(Object.getPrototypeOf,Object),ei="[object Object]",ti=Function.prototype,ni=Object.prototype,Nr=ti.toString,ri=ni.hasOwnProperty,ai=Nr.call(Object);function Rr(t){if(!ft(t)||pa(t)!=ei)return!1;var e=tn(t);if(e===null)return!0;var n=ri.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&Nr.call(n)==ai}const ii=te({compatConfig:{MODE:3},name:"ResizeObserver",props:{disabled:Boolean,onResize:Function},emits:["resize"],setup:function(e,n){var r=n.slots,a=Ir({width:0,height:0,offsetHeight:0,offsetWidth:0}),i=null,o=null,u=function(){o&&(o.disconnect(),o=null)},l=function(S){var s=e.onResize,m=S[0].target,f=m.getBoundingClientRect(),p=f.width,c=f.height,A=m.offsetWidth,v=m.offsetHeight,d=Math.floor(p),b=Math.floor(c);if(a.width!==d||a.height!==b||a.offsetWidth!==A||a.offsetHeight!==v){var g={width:d,height:b,offsetWidth:A,offsetHeight:v};Be(a,g),s&&Promise.resolve().then(function(){s(_(_({},g),{},{offsetWidth:A,offsetHeight:v}),m)})}},C=Ue(),y=function(){var S=e.disabled;if(S){u();return}var s=It(C),m=s!==i;m&&(u(),i=s),!o&&s&&(o=new Na(l),o.observe(s))};return Pe(function(){y()}),$r(function(){y()}),Ha(function(){u()}),de(function(){return e.disabled},function(){y()},{flush:"post"}),function(){var x;return(x=r.default)===null||x===void 0?void 0:x.call(r)[0]}}});function oi(t){return ba(t)||ya(t)||xa(t)||wa()}function ui(t){t.target.composing=!0}function pn(t){t.target.composing&&(t.target.composing=!1,li(t.target,"input"))}function li(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function yt(t,e,n,r){t.addEventListener(e,n,r)}var Br={created:function(e,n){(!n.modifiers||!n.modifiers.lazy)&&(yt(e,"compositionstart",ui),yt(e,"compositionend",pn),yt(e,"change",pn))}},si={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"};function bn(t){for(var e=1;e=1},subscribe:function(e){return Ce.size||this.register(),xt+=1,Ce.set(xt,e),e(Qe),xt},unsubscribe:function(e){Ce.delete(e),Ce.size||this.unregister()},unregister:function(){var e=this;Object.keys(Xe).forEach(function(n){var r=Xe[n],a=e.matchHandlers[r];a==null||a.mql.removeListener(a==null?void 0:a.listener)}),Ce.clear()},register:function(){var e=this;Object.keys(Xe).forEach(function(n){var r=Xe[n],a=function(u){var l=u.matches;e.dispatch(_(_({},Qe),{},T({},n,l)))},i=window.matchMedia(r);i.addListener(a),e.matchHandlers[r]={mql:i,listener:a},a(i)})}},ci=Symbol("SizeProvider"),di=function(e){var n=e?R(function(){return e.size}):gt(ci,R(function(){return"default"}));return n},wt={transitionstart:{transition:"transitionstart",WebkitTransition:"webkitTransitionStart",MozTransition:"mozTransitionStart",OTransition:"oTransitionStart",msTransition:"MSTransitionStart"},animationstart:{animation:"animationstart",WebkitAnimation:"webkitAnimationStart",MozAnimation:"mozAnimationStart",OAnimation:"oAnimationStart",msAnimation:"MSAnimationStart"}},Ct={transitionend:{transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"mozTransitionEnd",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd"},animationend:{animation:"animationend",WebkitAnimation:"webkitAnimationEnd",MozAnimation:"mozAnimationEnd",OAnimation:"oAnimationEnd",msAnimation:"MSAnimationEnd"}},$e=[],Ie=[];function vi(){var t=document.createElement("div"),e=t.style;"AnimationEvent"in window||(delete wt.animationstart.animation,delete Ct.animationend.animation),"TransitionEvent"in window||(delete wt.transitionstart.transition,delete Ct.transitionend.transition);function n(r,a){for(var i in r)if(r.hasOwnProperty(i)){var o=r[i];for(var u in o)if(u in e){a.push(o[u]);break}}}n(wt,$e),n(Ct,Ie)}typeof window<"u"&&typeof document<"u"&&vi();function wn(t,e,n){t.addEventListener(e,n,!1)}function Cn(t,e,n){t.removeEventListener(e,n,!1)}var Je={startEvents:$e,addStartEventListener:function(e,n){if($e.length===0){setTimeout(n,0);return}$e.forEach(function(r){wn(e,r,n)})},removeStartEventListener:function(e,n){$e.length!==0&&$e.forEach(function(r){Cn(e,r,n)})},endEvents:Ie,addEndEventListener:function(e,n){if(Ie.length===0){setTimeout(n,0);return}Ie.forEach(function(r){wn(e,r,n)})},removeEndEventListener:function(e,n){Ie.length!==0&&Ie.forEach(function(r){Cn(e,r,n)})}},pe;function Fn(t){return!t||t.offsetParent===null}function gi(t){var e=(t||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\.\d]*)?\)/);return e&&e[1]&&e[2]&&e[3]?!(e[1]===e[2]&&e[2]===e[3]):!0}const mi=te({compatConfig:{MODE:3},name:"Wave",props:{insertExtraNode:Boolean,disabled:Boolean},setup:function(e,n){var r=n.slots,a=n.expose,i=Ue(),o=fe("",e),u=o.csp,l=o.prefixCls;a({csp:u});var C=null,y=null,x=null,S=!1,s=null,m=!1,f=function(g){if(!m){var F=It(i);!g||g.target!==F||S||v(F)}},p=function(g){!g||g.animationName!=="fadeEffect"||v(g.target)},c=function(){var g=e.insertExtraNode;return g?"".concat(l.value,"-click-animating"):"".concat(l.value,"-click-animating-without-extra-node")},A=function(g,F){var I=e.insertExtraNode,O=e.disabled;if(!(O||!g||Fn(g)||g.className.indexOf("-leave")>=0)){s=document.createElement("div"),s.className="".concat(l.value,"-click-animating-node");var M=c();if(g.removeAttribute(M),g.setAttribute(M,"true"),pe=pe||document.createElement("style"),F&&F!=="#ffffff"&&F!=="rgb(255, 255, 255)"&&gi(F)&&!/rgba\(\d*, \d*, \d*, 0\)/.test(F)&&F!=="transparent"){var q;(q=u.value)!==null&&q!==void 0&&q.nonce&&(pe.nonce=u.value.nonce),s.style.borderColor=F,pe.innerHTML=` +import{W as ft,X as pa,d as te,o as Oe,Y as hr,Z as ba,Q as de,$ as It,a0 as ze,a1 as _,a2 as Ue,K as pr,a3 as ya,a4 as xa,a5 as wa,a6 as Ca,p as z,a7 as Zt,a8 as T,h as R,a9 as ct,aa as fe,x as le,a as Ne,ab as X,ac as Mt,V as Fa,ad as dt,ae as Aa,af as br,ag as yr,g as H,ah as ve,ai as Sa,aj as Yt,ak as Me,al as Ea,am as Oa,an as Xt,ao as Ee,ap as J,aq as vt,ar as Pa,as as ie,at as xe,au as xr,av as Ta,aw as _a,ax as jt,F as We,ay as $a,az as Ia,aA as Ma,aB as wr,aC as ja,aD as Na,aE as Cr,aF as Ra,aG as Fr,aH as Nt,m as we,aI as za,aJ as Ba,aK as it,w as Ar,aL as Sr}from"./index-BAr1mMLP.js";import{o as qa,i as La,a as Pe,M as Er,g as Va,e as ka,b as Da,c as Wa,d as Or,f as Pr,k as gt,h as Tr,j as Qt,l as Ga,m as _r,s as Ua,n as Ha,U as mn,p as Jt,q as $r,r as lt,t as Ka,S as Ir,u as Za,_ as mt,v as Mr,w as Ya,x as Xa,y as hn,z as jr,A as en,F as Rt,B as Fe}from"./FormItemContext-YTkEF048.js";import{_ as Qa,a as Ja,o as be}from"./classCallCheck-DDMOgDz1.js";import{w as he}from"./raf-nDFcuFT6.js";var tn=qa(Object.getPrototypeOf,Object),ei="[object Object]",ti=Function.prototype,ni=Object.prototype,Nr=ti.toString,ri=ni.hasOwnProperty,ai=Nr.call(Object);function Rr(t){if(!ft(t)||pa(t)!=ei)return!1;var e=tn(t);if(e===null)return!0;var n=ri.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&Nr.call(n)==ai}const ii=te({compatConfig:{MODE:3},name:"ResizeObserver",props:{disabled:Boolean,onResize:Function},emits:["resize"],setup:function(e,n){var r=n.slots,a=pr({width:0,height:0,offsetHeight:0,offsetWidth:0}),i=null,o=null,u=function(){o&&(o.disconnect(),o=null)},l=function(S){var s=e.onResize,m=S[0].target,f=m.getBoundingClientRect(),p=f.width,c=f.height,A=m.offsetWidth,v=m.offsetHeight,d=Math.floor(p),b=Math.floor(c);if(a.width!==d||a.height!==b||a.offsetWidth!==A||a.offsetHeight!==v){var g={width:d,height:b,offsetWidth:A,offsetHeight:v};ze(a,g),s&&Promise.resolve().then(function(){s(_(_({},g),{},{offsetWidth:A,offsetHeight:v}),m)})}},C=Ue(),y=function(){var S=e.disabled;if(S){u();return}var s=It(C),m=s!==i;m&&(u(),i=s),!o&&s&&(o=new La(l),o.observe(s))};return Oe(function(){y()}),hr(function(){y()}),ba(function(){u()}),de(function(){return e.disabled},function(){y()},{flush:"post"}),function(){var x;return(x=r.default)===null||x===void 0?void 0:x.call(r)[0]}}});function oi(t){return ya(t)||xa(t)||wa(t)||Ca()}function ui(t){t.target.composing=!0}function pn(t){t.target.composing&&(t.target.composing=!1,li(t.target,"input"))}function li(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function yt(t,e,n,r){t.addEventListener(e,n,r)}var zr={created:function(e,n){(!n.modifiers||!n.modifiers.lazy)&&(yt(e,"compositionstart",ui),yt(e,"compositionend",pn),yt(e,"change",pn))}},si={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"};function bn(t){for(var e=1;e=1},subscribe:function(e){return Ce.size||this.register(),xt+=1,Ce.set(xt,e),e(Qe),xt},unsubscribe:function(e){Ce.delete(e),Ce.size||this.unregister()},unregister:function(){var e=this;Object.keys(Xe).forEach(function(n){var r=Xe[n],a=e.matchHandlers[r];a==null||a.mql.removeListener(a==null?void 0:a.listener)}),Ce.clear()},register:function(){var e=this;Object.keys(Xe).forEach(function(n){var r=Xe[n],a=function(u){var l=u.matches;e.dispatch(_(_({},Qe),{},T({},n,l)))},i=window.matchMedia(r);i.addListener(a),e.matchHandlers[r]={mql:i,listener:a},a(i)})}},ci=Symbol("SizeProvider"),di=function(e){var n=e?R(function(){return e.size}):ct(ci,R(function(){return"default"}));return n},wt={transitionstart:{transition:"transitionstart",WebkitTransition:"webkitTransitionStart",MozTransition:"mozTransitionStart",OTransition:"oTransitionStart",msTransition:"MSTransitionStart"},animationstart:{animation:"animationstart",WebkitAnimation:"webkitAnimationStart",MozAnimation:"mozAnimationStart",OAnimation:"oAnimationStart",msAnimation:"MSAnimationStart"}},Ct={transitionend:{transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"mozTransitionEnd",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd"},animationend:{animation:"animationend",WebkitAnimation:"webkitAnimationEnd",MozAnimation:"mozAnimationEnd",OAnimation:"oAnimationEnd",msAnimation:"MSAnimationEnd"}},$e=[],Ie=[];function vi(){var t=document.createElement("div"),e=t.style;"AnimationEvent"in window||(delete wt.animationstart.animation,delete Ct.animationend.animation),"TransitionEvent"in window||(delete wt.transitionstart.transition,delete Ct.transitionend.transition);function n(r,a){for(var i in r)if(r.hasOwnProperty(i)){var o=r[i];for(var u in o)if(u in e){a.push(o[u]);break}}}n(wt,$e),n(Ct,Ie)}typeof window<"u"&&typeof document<"u"&&vi();function wn(t,e,n){t.addEventListener(e,n,!1)}function Cn(t,e,n){t.removeEventListener(e,n,!1)}var Je={startEvents:$e,addStartEventListener:function(e,n){if($e.length===0){setTimeout(n,0);return}$e.forEach(function(r){wn(e,r,n)})},removeStartEventListener:function(e,n){$e.length!==0&&$e.forEach(function(r){Cn(e,r,n)})},endEvents:Ie,addEndEventListener:function(e,n){if(Ie.length===0){setTimeout(n,0);return}Ie.forEach(function(r){wn(e,r,n)})},removeEndEventListener:function(e,n){Ie.length!==0&&Ie.forEach(function(r){Cn(e,r,n)})}},pe;function Fn(t){return!t||t.offsetParent===null}function gi(t){var e=(t||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\.\d]*)?\)/);return e&&e[1]&&e[2]&&e[3]?!(e[1]===e[2]&&e[2]===e[3]):!0}const mi=te({compatConfig:{MODE:3},name:"Wave",props:{insertExtraNode:Boolean,disabled:Boolean},setup:function(e,n){var r=n.slots,a=n.expose,i=Ue(),o=fe("",e),u=o.csp,l=o.prefixCls;a({csp:u});var C=null,y=null,x=null,S=!1,s=null,m=!1,f=function(g){if(!m){var F=It(i);!g||g.target!==F||S||v(F)}},p=function(g){!g||g.animationName!=="fadeEffect"||v(g.target)},c=function(){var g=e.insertExtraNode;return g?"".concat(l.value,"-click-animating"):"".concat(l.value,"-click-animating-without-extra-node")},A=function(g,F){var I=e.insertExtraNode,O=e.disabled;if(!(O||!g||Fn(g)||g.className.indexOf("-leave")>=0)){s=document.createElement("div"),s.className="".concat(l.value,"-click-animating-node");var M=c();if(g.removeAttribute(M),g.setAttribute(M,"true"),pe=pe||document.createElement("style"),F&&F!=="#ffffff"&&F!=="rgb(255, 255, 255)"&&gi(F)&&!/rgba\(\d*, \d*, \d*, 0\)/.test(F)&&F!=="transparent"){var q;(q=u.value)!==null&&q!==void 0&&q.nonce&&(pe.nonce=u.value.nonce),s.style.borderColor=F,pe.innerHTML=` [`.concat(l.value,"-click-animating-without-extra-node='true']::after, .").concat(l.value,`-click-animating-node { --antd-wave-shadow-color: `).concat(F,`; - }`),document.body.contains(pe)||document.body.appendChild(pe)}I&&g.appendChild(s),Je.addStartEventListener(g,f),Je.addEndEventListener(g,p)}},v=function(g){if(!(!g||g===s||!(g instanceof Element))){var F=e.insertExtraNode,I=c();g.setAttribute(I,"false"),pe&&(pe.innerHTML=""),F&&s&&g.contains(s)&&g.removeChild(s),Je.removeStartEventListener(g,f),Je.removeEndEventListener(g,p)}},d=function(g){if(!(!g||!g.getAttribute||g.getAttribute("disabled")||g.className.indexOf("disabled")>=0)){var F=function(O){if(!(O.target.tagName==="INPUT"||Fn(O.target))){v(g);var M=getComputedStyle(g).getPropertyValue("border-top-color")||getComputedStyle(g).getPropertyValue("border-color")||getComputedStyle(g).getPropertyValue("background-color");y=setTimeout(function(){return A(g,M)},0),he.cancel(x),S=!0,x=he(function(){S=!1},10)}};return g.addEventListener("click",F,!0),{cancel:function(){g.removeEventListener("click",F,!0)}}}};return Pe(function(){le(function(){var b=It(i);b.nodeType===1&&(C=d(b))})}),Ne(function(){C&&C.cancel(),clearTimeout(y),m=!0}),function(){var b;return(b=r.default)===null||b===void 0?void 0:b.call(r)[0]}}});var hi=function(){return{prefixCls:String,type:String,htmlType:{type:String,default:"button"},shape:{type:String},size:{type:String},loading:{type:[Boolean,Object],default:function(){return!1}},disabled:{type:Boolean,default:void 0},ghost:{type:Boolean,default:void 0},block:{type:Boolean,default:void 0},danger:{type:Boolean,default:void 0},icon:X.any,href:String,target:String,title:String,onClick:{type:Function},onMousedown:{type:Function}}},An=function(e){e&&(e.style.width="0px",e.style.opacity="0",e.style.transform="scale(0)")},Sn=function(e){le(function(){e&&(e.style.width="".concat(e.scrollWidth,"px"),e.style.opacity="1",e.style.transform="scale(1)")})},En=function(e){e&&e.style&&(e.style.width=null,e.style.opacity=null,e.style.transform=null)};const pi=te({compatConfig:{MODE:3},name:"LoadingIcon",props:{prefixCls:String,loading:[Boolean,Object],existIcon:Boolean},setup:function(e){return function(){var n=e.existIcon,r=e.prefixCls,a=e.loading;if(n)return B("span",{class:"".concat(r,"-loading-icon")},[B(Mt,null,null)]);var i=!!a;return B(Ka,{name:"".concat(r,"-loading-icon-motion"),onBeforeEnter:An,onEnter:Sn,onAfterEnter:En,onBeforeLeave:Sn,onLeave:function(u){setTimeout(function(){An(u)})},onAfterLeave:En},{default:function(){return[i?B("span",{class:"".concat(r,"-loading-icon")},[B(Mt,null,null)]):null]}})}}});var On=/^[\u4e00-\u9fa5]{2}$/,Pn=On.test.bind(On);function et(t){return t==="text"||t==="link"}const qe=te({compatConfig:{MODE:3},name:"AButton",inheritAttrs:!1,__ANT_BUTTON:!0,props:pr(hi(),{type:"default"}),slots:["icon"],setup:function(e,n){var r=n.slots,a=n.attrs,i=n.emit,o=n.expose,u=fe("btn",e),l=u.prefixCls,C=u.autoInsertSpaceInButton,y=u.direction,x=u.size,S=H(null),s=H(void 0),m=!1,f=H(!1),p=H(!1),c=R(function(){return C.value!==!1}),A=R(function(){return ve(e.loading)==="object"&&e.loading.delay?e.loading.delay||!0:!!e.loading});de(A,function(O){clearTimeout(s.value),typeof A.value=="number"?s.value=setTimeout(function(){f.value=O},A.value):f.value=O},{immediate:!0});var v=R(function(){var O,M=e.type,q=e.shape,L=q===void 0?"default":q,j=e.ghost,W=e.block,z=e.danger,P=l.value,E={large:"lg",small:"sm",middle:void 0},w=x.value,h=w&&E[w]||"";return O={},T(O,"".concat(P),!0),T(O,"".concat(P,"-").concat(M),M),T(O,"".concat(P,"-").concat(L),L!=="default"&&L),T(O,"".concat(P,"-").concat(h),h),T(O,"".concat(P,"-loading"),f.value),T(O,"".concat(P,"-background-ghost"),j&&!et(M)),T(O,"".concat(P,"-two-chinese-chars"),p.value&&c.value),T(O,"".concat(P,"-block"),W),T(O,"".concat(P,"-dangerous"),!!z),T(O,"".concat(P,"-rtl"),y.value==="rtl"),O}),d=function(){var M=S.value;if(!(!M||C.value===!1)){var q=M.textContent;m&&Pn(q)?p.value||(p.value=!0):p.value&&(p.value=!1)}},b=function(M){if(f.value||e.disabled){M.preventDefault();return}i("click",M)},g=function(M,q){var L=q?" ":"";if(M.type===Ya){var j=M.children.trim();return Pn(j)&&(j=j.split("").join(L)),B("span",null,[j])}return M};mt(function(){Ca(!(e.ghost&&et(e.type)),"Button","`link` or `text` button can't be a `ghost` button.")}),Pe(d),$r(d),Ne(function(){s.value&&clearTimeout(s.value)});var F=function(){var M;(M=S.value)===null||M===void 0||M.focus()},I=function(){var M;(M=S.value)===null||M===void 0||M.blur()};return o({focus:F,blur:I}),function(){var O,M,q=e.icon,L=q===void 0?(O=r.icon)===null||O===void 0?void 0:O.call(r):q,j=hr((M=r.default)===null||M===void 0?void 0:M.call(r));m=j.length===1&&!L&&!et(e.type);var W=e.type,z=e.htmlType,P=e.disabled,E=e.href,w=e.title,h=e.target,$=e.onMousedown,N=f.value?"loading":L,V=_(_({},a),{},{title:w,disabled:P,class:[v.value,a.class,T({},"".concat(l.value,"-icon-only"),j.length===0&&!!N)],onClick:b,onMousedown:$});P||delete V.disabled;var D=L&&!f.value?L:B(pi,{existIcon:!!L,prefixCls:l.value,loading:!!f.value},null),U=j.map(function(Y){return g(Y,m&&c.value)});if(E!==void 0)return B("a",_(_({},V),{},{href:E,target:h,ref:S}),[D,U]);var K=B("button",_(_({},V),{},{ref:S,type:z}),[D,U]);return et(W)?K:B(mi,{ref:"wave",disabled:!!f.value},{default:function(){return[K]}})}}});var bi=Qa(function t(e){Ja(this,t),this.error=new Error("unreachable case: ".concat(JSON.stringify(e)))}),yi=function(){return{prefixCls:String,size:{type:String}}};const Bt=te({compatConfig:{MODE:3},name:"AButtonGroup",props:yi(),setup:function(e,n){var r=n.slots,a=fe("btn-group",e),i=a.prefixCls,o=a.direction,u=R(function(){var l,C=e.size,y="";switch(C){case"large":y="lg";break;case"small":y="sm";break;case"middle":case void 0:break;default:console.warn(new bi(C).error)}return l={},T(l,"".concat(i.value),!0),T(l,"".concat(i.value,"-").concat(y),y),T(l,"".concat(i.value,"-rtl"),o.value==="rtl"),l});return function(){var l;return B("div",{class:u.value},[hr((l=r.default)===null||l===void 0?void 0:l.call(r))])}}});qe.Group=Bt;qe.install=function(t){return t.component(qe.name,qe),t.component(Bt.name,Bt),t};function zr(t,e,n,r){for(var a=t.length,i=n+-1;++i-1}function qr(t,e){if(t.classList)return t.classList.contains(e);var n=t.className;return" ".concat(n," ").indexOf(" ".concat(e," "))>-1}function Tn(t,e){t.classList?t.classList.add(e):qr(t,e)||(t.className="".concat(t.className," ").concat(e))}function _n(t,e){if(t.classList)t.classList.remove(e);else if(qr(t,e)){var n=t.className;t.className=" ".concat(n," ").replace(" ".concat(e," ")," ")}}var Ai=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"ant-motion-collapse",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return{name:e,appear:n,css:!0,onBeforeEnter:function(a){a.style.height="0px",a.style.opacity="0",Tn(a,e)},onEnter:function(a){le(function(){a.style.height="".concat(a.scrollHeight,"px"),a.style.opacity="1"})},onAfterEnter:function(a){a&&(_n(a,e),a.style.height=null,a.style.opacity=null)},onBeforeLeave:function(a){Tn(a,e),a.style.height="".concat(a.offsetHeight,"px"),a.style.opacity=null},onLeave:function(a){setTimeout(function(){a.style.height="0px",a.style.opacity="0"})},onAfterLeave:function(a){a&&(_n(a,e),a.style&&(a.style.height=null,a.style.opacity=null))}}};function rn(t,e){for(var n=-1,r=t==null?0:t.length,a=Array(r);++na?0:a+e),n=n>a?a:n,n<0&&(n+=a),a=e>n?0:n-e>>>0,e>>>=0;for(var i=Array(a);++r0){if(++e>=Zi)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var Wr=Ji(Yi);function eo(t){return Wr(Dr(t,void 0,Ui),t+"")}var to=function(){return Aa()&&window.document.documentElement},tt,no=function(){if(!to())return!1;if(tt!==void 0)return tt;var e=document.createElement("div");return e.style.display="flex",e.style.flexDirection="column",e.style.rowGap="1px",e.appendChild(document.createElement("div")),e.appendChild(document.createElement("div")),document.body.appendChild(e),tt=e.scrollHeight===1,document.body.removeChild(e),tt};const ro=function(){var t=H(!1);return Pe(function(){t.value=no()}),t};var Gr=Symbol("rowContextKey"),ao=function(e){en(Gr,e)},io=function(){return gt(Gr,{gutter:R(function(){}),wrap:R(function(){}),supportFlexGap:R(function(){})})};Ee("top","middle","bottom","stretch");Ee("start","end","center","space-around","space-between");var oo=function(){return{align:String,justify:String,prefixCls:String,gutter:{type:[Number,Array,Object],default:0},wrap:{type:Boolean,default:void 0}}},uo=te({compatConfig:{MODE:3},name:"ARow",props:oo(),setup:function(e,n){var r=n.slots,a=fe("row",e),i=a.prefixCls,o=a.direction,u,l=H({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0,xxxl:!0}),C=ro();Pe(function(){u=xn.subscribe(function(s){var m=e.gutter||0;(!Array.isArray(m)&&ve(m)==="object"||Array.isArray(m)&&(ve(m[0])==="object"||ve(m[1])==="object"))&&(l.value=s)})}),Ne(function(){xn.unsubscribe(u)});var y=R(function(){var s=[0,0],m=e.gutter,f=m===void 0?0:m,p=Array.isArray(f)?f:[f,0];return p.forEach(function(c,A){if(ve(c)==="object")for(var v=0;v0?"".concat(s[0]/-2,"px"):void 0,p=s[1]>0?"".concat(s[1]/-2,"px"):void 0;return f&&(m.marginLeft=f,m.marginRight=f),C.value?m.rowGap="".concat(s[1],"px"):p&&(m.marginTop=p,m.marginBottom=p),m});return function(){var s;return B("div",{class:x.value,style:S.value},[(s=r.default)===null||s===void 0?void 0:s.call(r)])}}});function lo(t){return typeof t=="number"?"".concat(t," ").concat(t," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(t)?"0 0 ".concat(t):t}var so=function(){return{span:[String,Number],order:[String,Number],offset:[String,Number],push:[String,Number],pull:[String,Number],xs:{type:[String,Number,Object],default:void 0},sm:{type:[String,Number,Object],default:void 0},md:{type:[String,Number,Object],default:void 0},lg:{type:[String,Number,Object],default:void 0},xl:{type:[String,Number,Object],default:void 0},xxl:{type:[String,Number,Object],default:void 0},xxxl:{type:[String,Number,Object],default:void 0},prefixCls:String,flex:[String,Number]}};const Ur=te({compatConfig:{MODE:3},name:"ACol",props:so(),setup:function(e,n){var r=n.slots,a=io(),i=a.gutter,o=a.supportFlexGap,u=a.wrap,l=fe("col",e),C=l.prefixCls,y=l.direction,x=R(function(){var s,m=e.span,f=e.order,p=e.offset,c=e.push,A=e.pull,v=C.value,d={};return["xs","sm","md","lg","xl","xxl","xxxl"].forEach(function(b){var g,F={},I=e[b];typeof I=="number"?F.span=I:ve(I)==="object"&&(F=I||{}),d=_(_({},d),{},(g={},T(g,"".concat(v,"-").concat(b,"-").concat(F.span),F.span!==void 0),T(g,"".concat(v,"-").concat(b,"-order-").concat(F.order),F.order||F.order===0),T(g,"".concat(v,"-").concat(b,"-offset-").concat(F.offset),F.offset||F.offset===0),T(g,"".concat(v,"-").concat(b,"-push-").concat(F.push),F.push||F.push===0),T(g,"".concat(v,"-").concat(b,"-pull-").concat(F.pull),F.pull||F.pull===0),T(g,"".concat(v,"-rtl"),y.value==="rtl"),g))}),J(v,(s={},T(s,"".concat(v,"-").concat(m),m!==void 0),T(s,"".concat(v,"-order-").concat(f),f),T(s,"".concat(v,"-offset-").concat(p),p),T(s,"".concat(v,"-push-").concat(c),c),T(s,"".concat(v,"-pull-").concat(A),A),s),d)}),S=R(function(){var s=e.flex,m=i.value,f={};if(m&&m[0]>0){var p="".concat(m[0]/2,"px");f.paddingLeft=p,f.paddingRight=p}if(m&&m[1]>0&&!o.value){var c="".concat(m[1]/2,"px");f.paddingTop=c,f.paddingBottom=c}return s&&(f.flex=lo(s),u.value===!1&&!f.minWidth&&(f.minWidth=0)),f});return function(){var s;return B("div",{class:x.value,style:S.value},[(s=r.default)===null||s===void 0?void 0:s.call(r)])}}});function fo(t,e){for(var n=-1,r=t==null?0:t.length;++n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ut(t,e,n){return Nu()?ut=Reflect.construct.bind():ut=function(a,i,o){var u=[null];u.push.apply(u,i);var l=Function.bind.apply(a,u),C=new l;return o&&Ge(C,o.prototype),C},ut.apply(null,arguments)}function Ru(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function qt(t){var e=typeof Map=="function"?new Map:void 0;return qt=function(r){if(r===null||!Ru(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(r))return e.get(r);e.set(r,a)}function a(){return ut(r,arguments,zt(this).constructor)}return a.prototype=Object.create(r.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),Ge(a,r)},qt(t)}var Bu=/%[sdj%]/g,zu=function(){};function Lt(t){if(!t||!t.length)return null;var e={};return t.forEach(function(n){var r=n.field;e[r]=e[r]||[],e[r].push(n)}),e}function se(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r=i)return u;switch(u){case"%s":return String(n[a++]);case"%d":return Number(n[a++]);case"%j":try{return JSON.stringify(n[a++])}catch{return"[Circular]"}break;default:return u}});return o}return t}function qu(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function ee(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||qu(e)&&typeof t=="string"&&!t)}function Lu(t,e,n){var r=[],a=0,i=t.length;function o(u){r.push.apply(r,u||[]),a++,a===i&&n(r)}t.forEach(function(u){e(u,o)})}function Wn(t,e,n){var r=0,a=t.length;function i(o){if(o&&o.length){n(o);return}var u=r;r=r+1,u=0)){var F=function(O){if(!(O.target.tagName==="INPUT"||Fn(O.target))){v(g);var M=getComputedStyle(g).getPropertyValue("border-top-color")||getComputedStyle(g).getPropertyValue("border-color")||getComputedStyle(g).getPropertyValue("background-color");y=setTimeout(function(){return A(g,M)},0),he.cancel(x),S=!0,x=he(function(){S=!1},10)}};return g.addEventListener("click",F,!0),{cancel:function(){g.removeEventListener("click",F,!0)}}}};return Oe(function(){le(function(){var b=It(i);b.nodeType===1&&(C=d(b))})}),Ne(function(){C&&C.cancel(),clearTimeout(y),m=!0}),function(){var b;return(b=r.default)===null||b===void 0?void 0:b.call(r)[0]}}});var hi=function(){return{prefixCls:String,type:String,htmlType:{type:String,default:"button"},shape:{type:String},size:{type:String},loading:{type:[Boolean,Object],default:function(){return!1}},disabled:{type:Boolean,default:void 0},ghost:{type:Boolean,default:void 0},block:{type:Boolean,default:void 0},danger:{type:Boolean,default:void 0},icon:X.any,href:String,target:String,title:String,onClick:{type:Function},onMousedown:{type:Function}}},An=function(e){e&&(e.style.width="0px",e.style.opacity="0",e.style.transform="scale(0)")},Sn=function(e){le(function(){e&&(e.style.width="".concat(e.scrollWidth,"px"),e.style.opacity="1",e.style.transform="scale(1)")})},En=function(e){e&&e.style&&(e.style.width=null,e.style.opacity=null,e.style.transform=null)};const pi=te({compatConfig:{MODE:3},name:"LoadingIcon",props:{prefixCls:String,loading:[Boolean,Object],existIcon:Boolean},setup:function(e){return function(){var n=e.existIcon,r=e.prefixCls,a=e.loading;if(n)return z("span",{class:"".concat(r,"-loading-icon")},[z(Mt,null,null)]);var i=!!a;return z(Fa,{name:"".concat(r,"-loading-icon-motion"),onBeforeEnter:An,onEnter:Sn,onAfterEnter:En,onBeforeLeave:Sn,onLeave:function(u){setTimeout(function(){An(u)})},onAfterLeave:En},{default:function(){return[i?z("span",{class:"".concat(r,"-loading-icon")},[z(Mt,null,null)]):null]}})}}});var On=/^[\u4e00-\u9fa5]{2}$/,Pn=On.test.bind(On);function et(t){return t==="text"||t==="link"}const qe=te({compatConfig:{MODE:3},name:"AButton",inheritAttrs:!1,__ANT_BUTTON:!0,props:yr(hi(),{type:"default"}),slots:["icon"],setup:function(e,n){var r=n.slots,a=n.attrs,i=n.emit,o=n.expose,u=fe("btn",e),l=u.prefixCls,C=u.autoInsertSpaceInButton,y=u.direction,x=u.size,S=H(null),s=H(void 0),m=!1,f=H(!1),p=H(!1),c=R(function(){return C.value!==!1}),A=R(function(){return ve(e.loading)==="object"&&e.loading.delay?e.loading.delay||!0:!!e.loading});de(A,function(O){clearTimeout(s.value),typeof A.value=="number"?s.value=setTimeout(function(){f.value=O},A.value):f.value=O},{immediate:!0});var v=R(function(){var O,M=e.type,q=e.shape,L=q===void 0?"default":q,j=e.ghost,W=e.block,B=e.danger,P=l.value,E={large:"lg",small:"sm",middle:void 0},w=x.value,h=w&&E[w]||"";return O={},T(O,"".concat(P),!0),T(O,"".concat(P,"-").concat(M),M),T(O,"".concat(P,"-").concat(L),L!=="default"&&L),T(O,"".concat(P,"-").concat(h),h),T(O,"".concat(P,"-loading"),f.value),T(O,"".concat(P,"-background-ghost"),j&&!et(M)),T(O,"".concat(P,"-two-chinese-chars"),p.value&&c.value),T(O,"".concat(P,"-block"),W),T(O,"".concat(P,"-dangerous"),!!B),T(O,"".concat(P,"-rtl"),y.value==="rtl"),O}),d=function(){var M=S.value;if(!(!M||C.value===!1)){var q=M.textContent;m&&Pn(q)?p.value||(p.value=!0):p.value&&(p.value=!1)}},b=function(M){if(f.value||e.disabled){M.preventDefault();return}i("click",M)},g=function(M,q){var L=q?" ":"";if(M.type===Sa){var j=M.children.trim();return Pn(j)&&(j=j.split("").join(L)),z("span",null,[j])}return M};dt(function(){Aa(!(e.ghost&&et(e.type)),"Button","`link` or `text` button can't be a `ghost` button.")}),Oe(d),hr(d),Ne(function(){s.value&&clearTimeout(s.value)});var F=function(){var M;(M=S.value)===null||M===void 0||M.focus()},I=function(){var M;(M=S.value)===null||M===void 0||M.blur()};return o({focus:F,blur:I}),function(){var O,M,q=e.icon,L=q===void 0?(O=r.icon)===null||O===void 0?void 0:O.call(r):q,j=br((M=r.default)===null||M===void 0?void 0:M.call(r));m=j.length===1&&!L&&!et(e.type);var W=e.type,B=e.htmlType,P=e.disabled,E=e.href,w=e.title,h=e.target,$=e.onMousedown,N=f.value?"loading":L,V=_(_({},a),{},{title:w,disabled:P,class:[v.value,a.class,T({},"".concat(l.value,"-icon-only"),j.length===0&&!!N)],onClick:b,onMousedown:$});P||delete V.disabled;var D=L&&!f.value?L:z(pi,{existIcon:!!L,prefixCls:l.value,loading:!!f.value},null),U=j.map(function(Z){return g(Z,m&&c.value)});if(E!==void 0)return z("a",_(_({},V),{},{href:E,target:h,ref:S}),[D,U]);var K=z("button",_(_({},V),{},{ref:S,type:B}),[D,U]);return et(W)?K:z(mi,{ref:"wave",disabled:!!f.value},{default:function(){return[K]}})}}});var bi=Qa(function t(e){Ja(this,t),this.error=new Error("unreachable case: ".concat(JSON.stringify(e)))}),yi=function(){return{prefixCls:String,size:{type:String}}};const zt=te({compatConfig:{MODE:3},name:"AButtonGroup",props:yi(),setup:function(e,n){var r=n.slots,a=fe("btn-group",e),i=a.prefixCls,o=a.direction,u=R(function(){var l,C=e.size,y="";switch(C){case"large":y="lg";break;case"small":y="sm";break;case"middle":case void 0:break;default:console.warn(new bi(C).error)}return l={},T(l,"".concat(i.value),!0),T(l,"".concat(i.value,"-").concat(y),y),T(l,"".concat(i.value,"-rtl"),o.value==="rtl"),l});return function(){var l;return z("div",{class:u.value},[br((l=r.default)===null||l===void 0?void 0:l.call(r))])}}});qe.Group=zt;qe.install=function(t){return t.component(qe.name,qe),t.component(zt.name,zt),t};function Br(t,e,n,r){for(var a=t.length,i=n+-1;++i-1}function qr(t,e){if(t.classList)return t.classList.contains(e);var n=t.className;return" ".concat(n," ").indexOf(" ".concat(e," "))>-1}function Tn(t,e){t.classList?t.classList.add(e):qr(t,e)||(t.className="".concat(t.className," ").concat(e))}function _n(t,e){if(t.classList)t.classList.remove(e);else if(qr(t,e)){var n=t.className;t.className=" ".concat(n," ").replace(" ".concat(e," ")," ")}}var Ai=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"ant-motion-collapse",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return{name:e,appear:n,css:!0,onBeforeEnter:function(a){a.style.height="0px",a.style.opacity="0",Tn(a,e)},onEnter:function(a){le(function(){a.style.height="".concat(a.scrollHeight,"px"),a.style.opacity="1"})},onAfterEnter:function(a){a&&(_n(a,e),a.style.height=null,a.style.opacity=null)},onBeforeLeave:function(a){Tn(a,e),a.style.height="".concat(a.offsetHeight,"px"),a.style.opacity=null},onLeave:function(a){setTimeout(function(){a.style.height="0px",a.style.opacity="0"})},onAfterLeave:function(a){a&&(_n(a,e),a.style&&(a.style.height=null,a.style.opacity=null))}}};function rn(t,e){for(var n=-1,r=t==null?0:t.length,a=Array(r);++na?0:a+e),n=n>a?a:n,n<0&&(n+=a),a=e>n?0:n-e>>>0,e>>>=0;for(var i=Array(a);++r0){if(++e>=Yi)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var Wr=Ji(Zi);function eo(t){return Wr(Dr(t,void 0,Ui),t+"")}var to=function(){return Oa()&&window.document.documentElement},tt,no=function(){if(!to())return!1;if(tt!==void 0)return tt;var e=document.createElement("div");return e.style.display="flex",e.style.flexDirection="column",e.style.rowGap="1px",e.appendChild(document.createElement("div")),e.appendChild(document.createElement("div")),document.body.appendChild(e),tt=e.scrollHeight===1,document.body.removeChild(e),tt};const ro=function(){var t=H(!1);return Oe(function(){t.value=no()}),t};var Gr=Symbol("rowContextKey"),ao=function(e){Xt(Gr,e)},io=function(){return ct(Gr,{gutter:R(function(){}),wrap:R(function(){}),supportFlexGap:R(function(){})})};Ee("top","middle","bottom","stretch");Ee("start","end","center","space-around","space-between");var oo=function(){return{align:String,justify:String,prefixCls:String,gutter:{type:[Number,Array,Object],default:0},wrap:{type:Boolean,default:void 0}}},uo=te({compatConfig:{MODE:3},name:"ARow",props:oo(),setup:function(e,n){var r=n.slots,a=fe("row",e),i=a.prefixCls,o=a.direction,u,l=H({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0,xxxl:!0}),C=ro();Oe(function(){u=xn.subscribe(function(s){var m=e.gutter||0;(!Array.isArray(m)&&ve(m)==="object"||Array.isArray(m)&&(ve(m[0])==="object"||ve(m[1])==="object"))&&(l.value=s)})}),Ne(function(){xn.unsubscribe(u)});var y=R(function(){var s=[0,0],m=e.gutter,f=m===void 0?0:m,p=Array.isArray(f)?f:[f,0];return p.forEach(function(c,A){if(ve(c)==="object")for(var v=0;v0?"".concat(s[0]/-2,"px"):void 0,p=s[1]>0?"".concat(s[1]/-2,"px"):void 0;return f&&(m.marginLeft=f,m.marginRight=f),C.value?m.rowGap="".concat(s[1],"px"):p&&(m.marginTop=p,m.marginBottom=p),m});return function(){var s;return z("div",{class:x.value,style:S.value},[(s=r.default)===null||s===void 0?void 0:s.call(r)])}}});function lo(t){return typeof t=="number"?"".concat(t," ").concat(t," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(t)?"0 0 ".concat(t):t}var so=function(){return{span:[String,Number],order:[String,Number],offset:[String,Number],push:[String,Number],pull:[String,Number],xs:{type:[String,Number,Object],default:void 0},sm:{type:[String,Number,Object],default:void 0},md:{type:[String,Number,Object],default:void 0},lg:{type:[String,Number,Object],default:void 0},xl:{type:[String,Number,Object],default:void 0},xxl:{type:[String,Number,Object],default:void 0},xxxl:{type:[String,Number,Object],default:void 0},prefixCls:String,flex:[String,Number]}};const Ur=te({compatConfig:{MODE:3},name:"ACol",props:so(),setup:function(e,n){var r=n.slots,a=io(),i=a.gutter,o=a.supportFlexGap,u=a.wrap,l=fe("col",e),C=l.prefixCls,y=l.direction,x=R(function(){var s,m=e.span,f=e.order,p=e.offset,c=e.push,A=e.pull,v=C.value,d={};return["xs","sm","md","lg","xl","xxl","xxxl"].forEach(function(b){var g,F={},I=e[b];typeof I=="number"?F.span=I:ve(I)==="object"&&(F=I||{}),d=_(_({},d),{},(g={},T(g,"".concat(v,"-").concat(b,"-").concat(F.span),F.span!==void 0),T(g,"".concat(v,"-").concat(b,"-order-").concat(F.order),F.order||F.order===0),T(g,"".concat(v,"-").concat(b,"-offset-").concat(F.offset),F.offset||F.offset===0),T(g,"".concat(v,"-").concat(b,"-push-").concat(F.push),F.push||F.push===0),T(g,"".concat(v,"-").concat(b,"-pull-").concat(F.pull),F.pull||F.pull===0),T(g,"".concat(v,"-rtl"),y.value==="rtl"),g))}),J(v,(s={},T(s,"".concat(v,"-").concat(m),m!==void 0),T(s,"".concat(v,"-order-").concat(f),f),T(s,"".concat(v,"-offset-").concat(p),p),T(s,"".concat(v,"-push-").concat(c),c),T(s,"".concat(v,"-pull-").concat(A),A),s),d)}),S=R(function(){var s=e.flex,m=i.value,f={};if(m&&m[0]>0){var p="".concat(m[0]/2,"px");f.paddingLeft=p,f.paddingRight=p}if(m&&m[1]>0&&!o.value){var c="".concat(m[1]/2,"px");f.paddingTop=c,f.paddingBottom=c}return s&&(f.flex=lo(s),u.value===!1&&!f.minWidth&&(f.minWidth=0)),f});return function(){var s;return z("div",{class:x.value,style:S.value},[(s=r.default)===null||s===void 0?void 0:s.call(r)])}}});function fo(t,e){for(var n=-1,r=t==null?0:t.length;++n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ut(t,e,n){return Nu()?ut=Reflect.construct.bind():ut=function(a,i,o){var u=[null];u.push.apply(u,i);var l=Function.bind.apply(a,u),C=new l;return o&&Ge(C,o.prototype),C},ut.apply(null,arguments)}function Ru(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function qt(t){var e=typeof Map=="function"?new Map:void 0;return qt=function(r){if(r===null||!Ru(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(r))return e.get(r);e.set(r,a)}function a(){return ut(r,arguments,Bt(this).constructor)}return a.prototype=Object.create(r.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),Ge(a,r)},qt(t)}var zu=/%[sdj%]/g,Bu=function(){};function Lt(t){if(!t||!t.length)return null;var e={};return t.forEach(function(n){var r=n.field;e[r]=e[r]||[],e[r].push(n)}),e}function se(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r=i)return u;switch(u){case"%s":return String(n[a++]);case"%d":return Number(n[a++]);case"%j":try{return JSON.stringify(n[a++])}catch{return"[Circular]"}break;default:return u}});return o}return t}function qu(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function ee(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||qu(e)&&typeof t=="string"&&!t)}function Lu(t,e,n){var r=[],a=0,i=t.length;function o(u){r.push.apply(r,u||[]),a++,a===i&&n(r)}t.forEach(function(u){e(u,o)})}function Wn(t,e,n){var r=0,a=t.length;function i(o){if(o&&o.length){n(o);return}var u=r;r=r+1,u()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},ze={integer:function(e){return ze.number(e)&&parseInt(e,10)===e},float:function(e){return ze.number(e)&&!ze.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e=="number"},object:function(e){return typeof e=="object"&&!ze.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(Kn.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(Uu())},hex:function(e){return typeof e=="string"&&!!e.match(Kn.hex)}},Hu=function(e,n,r,a,i){if(e.required&&n===void 0){Jr(e,n,r,a,i);return}var o=["integer","float","array","regexp","object","method","email","number","date","url","hex"],u=e.type;o.indexOf(u)>-1?ze[u](n)||a.push(se(i.messages.types[u],e.fullField,e.type)):u&&typeof n!==e.type&&a.push(se(i.messages.types[u],e.fullField,e.type))},Ku=function(e,n,r,a,i){var o=typeof e.len=="number",u=typeof e.min=="number",l=typeof e.max=="number",C=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,y=n,x=null,S=typeof n=="number",s=typeof n=="string",m=Array.isArray(n);if(S?x="number":s?x="string":m&&(x="array"),!x)return!1;m&&(y=n.length),s&&(y=n.replace(C,"_").length),o?y!==e.len&&a.push(se(i.messages[x].len,e.fullField,e.len)):u&&!l&&ye.max?a.push(se(i.messages[x].max,e.fullField,e.max)):u&&l&&(ye.max)&&a.push(se(i.messages[x].range,e.fullField,e.min,e.max))},Te="enum",Yu=function(e,n,r,a,i){e[Te]=Array.isArray(e[Te])?e[Te]:[],e[Te].indexOf(n)===-1&&a.push(se(i.messages[Te],e.fullField,e[Te].join(", ")))},Zu=function(e,n,r,a,i){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(n)||a.push(se(i.messages.pattern.mismatch,e.fullField,n,e.pattern));else if(typeof e.pattern=="string"){var o=new RegExp(e.pattern);o.test(n)||a.push(se(i.messages.pattern.mismatch,e.fullField,n,e.pattern))}}},G={required:Jr,whitespace:Gu,type:Hu,range:Ku,enum:Yu,pattern:Zu},Xu=function(e,n,r,a,i){var o=[],u=e.required||!e.required&&a.hasOwnProperty(e.field);if(u){if(ee(n,"string")&&!e.required)return r();G.required(e,n,a,o,i,"string"),ee(n,"string")||(G.type(e,n,a,o,i),G.range(e,n,a,o,i),G.pattern(e,n,a,o,i),e.whitespace===!0&&G.whitespace(e,n,a,o,i))}r(o)},Qu=function(e,n,r,a,i){var o=[],u=e.required||!e.required&&a.hasOwnProperty(e.field);if(u){if(ee(n)&&!e.required)return r();G.required(e,n,a,o,i),n!==void 0&&G.type(e,n,a,o,i)}r(o)},Ju=function(e,n,r,a,i){var o=[],u=e.required||!e.required&&a.hasOwnProperty(e.field);if(u){if(n===""&&(n=void 0),ee(n)&&!e.required)return r();G.required(e,n,a,o,i),n!==void 0&&(G.type(e,n,a,o,i),G.range(e,n,a,o,i))}r(o)},el=function(e,n,r,a,i){var o=[],u=e.required||!e.required&&a.hasOwnProperty(e.field);if(u){if(ee(n)&&!e.required)return r();G.required(e,n,a,o,i),n!==void 0&&G.type(e,n,a,o,i)}r(o)},tl=function(e,n,r,a,i){var o=[],u=e.required||!e.required&&a.hasOwnProperty(e.field);if(u){if(ee(n)&&!e.required)return r();G.required(e,n,a,o,i),ee(n)||G.type(e,n,a,o,i)}r(o)},nl=function(e,n,r,a,i){var o=[],u=e.required||!e.required&&a.hasOwnProperty(e.field);if(u){if(ee(n)&&!e.required)return r();G.required(e,n,a,o,i),n!==void 0&&(G.type(e,n,a,o,i),G.range(e,n,a,o,i))}r(o)},rl=function(e,n,r,a,i){var o=[],u=e.required||!e.required&&a.hasOwnProperty(e.field);if(u){if(ee(n)&&!e.required)return r();G.required(e,n,a,o,i),n!==void 0&&(G.type(e,n,a,o,i),G.range(e,n,a,o,i))}r(o)},al=function(e,n,r,a,i){var o=[],u=e.required||!e.required&&a.hasOwnProperty(e.field);if(u){if(n==null&&!e.required)return r();G.required(e,n,a,o,i,"array"),n!=null&&(G.type(e,n,a,o,i),G.range(e,n,a,o,i))}r(o)},il=function(e,n,r,a,i){var o=[],u=e.required||!e.required&&a.hasOwnProperty(e.field);if(u){if(ee(n)&&!e.required)return r();G.required(e,n,a,o,i),n!==void 0&&G.type(e,n,a,o,i)}r(o)},ol="enum",ul=function(e,n,r,a,i){var o=[],u=e.required||!e.required&&a.hasOwnProperty(e.field);if(u){if(ee(n)&&!e.required)return r();G.required(e,n,a,o,i),n!==void 0&&G[ol](e,n,a,o,i)}r(o)},ll=function(e,n,r,a,i){var o=[],u=e.required||!e.required&&a.hasOwnProperty(e.field);if(u){if(ee(n,"string")&&!e.required)return r();G.required(e,n,a,o,i),ee(n,"string")||G.pattern(e,n,a,o,i)}r(o)},sl=function(e,n,r,a,i){var o=[],u=e.required||!e.required&&a.hasOwnProperty(e.field);if(u){if(ee(n,"date")&&!e.required)return r();if(G.required(e,n,a,o,i),!ee(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),G.type(e,l,a,o,i),l&&G.range(e,l.getTime(),a,o,i)}}r(o)},fl=function(e,n,r,a,i){var o=[],u=Array.isArray(n)?"array":typeof n;G.required(e,n,a,o,i,u),r(o)},Ft=function(e,n,r,a,i){var o=e.type,u=[],l=e.required||!e.required&&a.hasOwnProperty(e.field);if(l){if(ee(n,o)&&!e.required)return r();G.required(e,n,a,u,i,o),ee(n,o)||G.type(e,n,a,u,i)}r(u)},cl=function(e,n,r,a,i){var o=[],u=e.required||!e.required&&a.hasOwnProperty(e.field);if(u){if(ee(n)&&!e.required)return r();G.required(e,n,a,o,i)}r(o)},Ve={string:Xu,method:Qu,number:Ju,boolean:el,regexp:tl,integer:nl,float:rl,array:al,object:il,enum:ul,pattern:ll,date:sl,url:Ft,hex:Ft,email:Ft,required:fl,any:cl};function Vt(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var kt=Vt(),Ke=function(){function t(n){this.rules=null,this._messages=kt,this.define(n)}var e=t.prototype;return e.define=function(r){var a=this;if(!r)throw new Error("Cannot configure a schema with no rules");if(typeof r!="object"||Array.isArray(r))throw new Error("Rules must be an object");this.rules={},Object.keys(r).forEach(function(i){var o=r[i];a.rules[i]=Array.isArray(o)?o:[o]})},e.messages=function(r){return r&&(this._messages=Hn(Vt(),r)),this._messages},e.validate=function(r,a,i){var o=this;a===void 0&&(a={}),i===void 0&&(i=function(){});var u=r,l=a,C=i;if(typeof l=="function"&&(C=l,l={}),!this.rules||Object.keys(this.rules).length===0)return C&&C(null,u),Promise.resolve(u);function y(f){var p=[],c={};function A(d){if(Array.isArray(d)){var b;p=(b=p).concat.apply(b,d)}else p.push(d)}for(var v=0;v3&&arguments[3]!==void 0?arguments[3]:!1;return e.length&&r&&n===void 0&&!ea(t,e.slice(0,-1))?t:ta(t,e,n,r)}function Dt(t){return ye(t)}function vl(t,e){var n=ea(t,e);return n}function gl(t,e,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a=dl(t,e,n,r);return a}function ml(t,e){return t&&t.some(function(n){return pl(n,e)})}function Yn(t){return ve(t)==="object"&&t!==null&&Object.getPrototypeOf(t)===Object.prototype}function na(t,e){var n=Array.isArray(t)?ie(t):_({},t);return e&&Object.keys(e).forEach(function(r){var a=n[r],i=e[r],o=Yn(a)&&Yn(i);n[r]=o?na(a,i||{}):i}),n}function hl(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r-1?a[i?e[o]:o]:void 0}}var jl=Math.max;function Nl(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var a=n==null?0:Ti(n);return a<0&&(a=jl(r+a,0)),zr(t,oa(e),a)}var Rl=Ml(Nl),ua=Symbol("formContextKey"),la=function(e){en(ua,e)},cn=function(){return gt(ua,{name:R(function(){}),labelAlign:R(function(){return"right"}),vertical:R(function(){return!1}),addField:function(n,r){},removeField:function(n){},model:R(function(){}),rules:R(function(){}),colon:R(function(){}),labelWrap:R(function(){}),labelCol:R(function(){}),requiredMark:R(function(){return!1}),validateTrigger:R(function(){}),onValidate:function(){},validateMessages:R(function(){return pt})})},sa=Symbol("formItemPrefixContextKey"),Bl=function(e){en(sa,e)},zl=function(){return gt(sa,{prefixCls:R(function(){return""})})},dn=function(e,n){var r,a,i,o,u=n.slots,l=n.emit,C=n.attrs,y=_(_({},e),C),x=y.prefixCls,S=y.htmlFor,s=y.labelCol,m=y.labelAlign,f=y.colon,p=y.required,c=y.requiredMark,A=Ea("Form"),v=jt(A,1),d=v[0],b=(r=e.label)!==null&&r!==void 0?r:(a=u.label)===null||a===void 0?void 0:a.call(u);if(!b)return null;var g=cn(),F=g.vertical,I=g.labelAlign,O=g.labelCol,M=g.labelWrap,q=g.colon,L=s||(O==null?void 0:O.value)||{},j=m||(I==null?void 0:I.value),W="".concat(x,"-item-label"),z=J(W,j==="left"&&"".concat(W,"-left"),L.class,T({},"".concat(W,"-wrap"),!!M.value)),P=b,E=f===!0||(q==null?void 0:q.value)!==!1&&f!==!1,w=E&&!F.value;if(w&&typeof b=="string"&&b.trim()!==""&&(P=b.replace(/[:|:]\s*$/,"")),P=B(We,null,[P,(i=u.tooltip)===null||i===void 0?void 0:i.call(u,{class:"".concat(x,"-item-tooltip")})]),c==="optional"&&!p){var h,$;P=B(We,null,[P,B("span",{class:"".concat(x,"-item-optional")},[((h=d.value)===null||h===void 0?void 0:h.optional)||(($=Oa.Form)===null||$===void 0?void 0:$.optional)])])}var N=J((o={},T(o,"".concat(x,"-item-required"),p),T(o,"".concat(x,"-item-required-mark-optional"),c==="optional"),T(o,"".concat(x,"-item-no-colon"),!E),o));return B(Ur,_(_({},L),{},{class:z}),{default:function(){return[B("label",{for:S,class:N,title:typeof b=="string"?b:"",onClick:function(U){return l("click",U)}},[P])]}})};dn.displayName="FormItemLabel";dn.inheritAttrs=!1;const ql=te({compatConfig:{MODE:3},name:"ErrorList",props:["errors","help","onDomErrorVisibleChange","helpStatus","warnings"],setup:function(e){var n=fe("",e),r=n.prefixCls,a=zl(),i=a.prefixCls,o=a.status,u=R(function(){return"".concat(i.value,"-item-explain")}),l=R(function(){return!!(e.errors&&e.errors.length)}),C=H(o.value);return de([l,o],function(){l.value&&(C.value=o.value)}),function(){var y,x,S=Ai("".concat(r.value,"-show-help-item")),s=Pa("".concat(r.value,"-show-help-item"),S);return s.class=u.value,(y=e.errors)!==null&&y!==void 0&&y.length?B(Xa,_(_({},s),{},{tag:"div"}),{default:function(){return[(x=e.errors)===null||x===void 0?void 0:x.map(function(f,p){return B("div",{key:p,role:"alert",class:C.value?"".concat(u.value,"-").concat(C.value):""},[f])})]}}):null}}});var Ll={success:_a,warning:Ta,error:yr,validating:Mt},Vl=te({compatConfig:{MODE:3},slots:["help","extra","errors"],inheritAttrs:!1,props:["prefixCls","errors","hasFeedback","onDomErrorVisibleChange","wrapperCol","help","extra","status"],setup:function(e,n){var r=n.slots,a=cn(),i=a.wrapperCol,o=_({},a);return delete o.labelCol,delete o.wrapperCol,la(o),Bl({prefixCls:R(function(){return e.prefixCls}),status:R(function(){return e.status})}),function(){var u,l,C,y=e.prefixCls,x=e.wrapperCol,S=e.help,s=S===void 0?(u=r.help)===null||u===void 0?void 0:u.call(r):S,m=e.errors,f=m===void 0?(l=r.errors)===null||l===void 0?void 0:l.call(r):m,p=e.hasFeedback,c=e.status,A=e.extra,v=A===void 0?(C=r.extra)===null||C===void 0?void 0:C.call(r):A,d="".concat(y,"-item"),b=x||(i==null?void 0:i.value)||{},g=J("".concat(d,"-control"),b.class),F=c&&Ll[c];return B(Ur,_(_({},b),{},{class:g}),{default:function(){var O;return B(We,null,[B("div",{class:"".concat(d,"-control-input")},[B("div",{class:"".concat(d,"-control-input-content")},[(O=r.default)===null||O===void 0?void 0:O.call(r)]),p&&F?B("span",{class:"".concat(d,"-children-icon")},[B(F,null,null)]):null]),B(ql,{errors:f,help:s,class:"".concat(d,"-explain-connected")},null),v?B("div",{class:"".concat(d,"-extra")},[v]):null])}})}}});function kl(t){var e=Mr(t.value.slice()),n=null;return mt(function(){clearTimeout(n),n=setTimeout(function(){e.value=t.value},t.value.length?0:10)}),e}Ee("success","warning","error","validating","");function At(t,e,n){var r=t,a=e,i=0;try{for(var o=a.length;i0&&arguments[0]!==void 0?arguments[0]:[];if(g.value==="validating"){var ae=Q.filter(function(re){return re&&re.errors.length});g.value=ae.length?"error":"success",x.value=ae.map(function(re){return re.errors}),C.onValidate(y.value,!x.value.length,x.value.length?Rt(x.value[0]):null)}}),Y}},O=function(){I({triggerName:"blur"})},M=function(){if(S.value){S.value=!1;return}I({triggerName:"change"})},q=function(){g.value=e.validateStatus,S.value=!1,x.value=[]},L=function(){g.value=e.validateStatus,S.value=!0,x.value=[];var $=C.model.value||{},N=c.value,V=At($,m.value,!0);Array.isArray(N)?V.o[V.k]=[].concat(A.value):V.o[V.k]=A.value,le(function(){S.value=!1})},j=R(function(){return e.htmlFor===void 0?f.value:e.htmlFor}),W=function(){var $=j.value;if(!(!$||!s.value)){var N=s.value.$el.querySelector('[id="'.concat($,'"]'));N&&N.focus&&N.focus()}};i({onFieldBlur:O,onFieldChange:M,clearValidate:q,resetField:L}),Ga({id:f,onFieldBlur:function(){e.autoLink&&O()},onFieldChange:function(){e.autoLink&&M()},clearValidate:q},R(function(){return!!(e.autoLink&&C.model.value&&y.value)}));var z=!1;de(y,function(h){h?z||(z=!0,C.addField(o,{fieldValue:c,fieldId:f,fieldName:y,resetField:L,clearValidate:q,namePath:m,validateRules:I,rules:d})):(z=!1,C.removeField(o))},{immediate:!0}),Ne(function(){C.removeField(o)});var P=kl(x),E=R(function(){return e.validateStatus!==void 0?e.validateStatus:P.value.length?"error":g.value}),w=R(function(){var h;return h={},T(h,"".concat(l.value,"-item"),!0),T(h,"".concat(l.value,"-item-has-feedback"),E.value&&e.hasFeedback),T(h,"".concat(l.value,"-item-has-success"),E.value==="success"),T(h,"".concat(l.value,"-item-has-warning"),E.value==="warning"),T(h,"".concat(l.value,"-item-has-error"),E.value==="error"),T(h,"".concat(l.value,"-item-is-validating"),E.value==="validating"),T(h,"".concat(l.value,"-item-hidden"),e.hidden),h});return function(){var h,$;if(e.noStyle)return(h=r.default)===null||h===void 0?void 0:h.call(r);var N=($=e.help)!==null&&$!==void 0?$:r.help?xr(r.help()):null;return B(uo,_(_({},a),{},{class:[w.value,N!=null||P.value.length?"".concat(l.value,"-item-with-help"):"",a.class],key:"row"}),{default:function(){var D,U,K,Y;return B(We,null,[B(dn,_(_({},e),{},{htmlFor:j.value,required:b.value,requiredMark:C.requiredMark.value,prefixCls:l.value,onClick:W,label:(D=e.label)!==null&&D!==void 0?D:(U=r.label)===null||U===void 0?void 0:U.call(r)}),null),B(Vl,_(_({},e),{},{errors:N!=null?ye(N):P.value,prefixCls:l.value,status:E.value,ref:s,help:N,extra:(K=e.extra)!==null&&K!==void 0?K:(Y=r.extra)===null||Y===void 0?void 0:Y.call(r)}),{default:r.default})])}})}}});function fa(t){var e=!1,n=t.length,r=[];return t.length?new Promise(function(a,i){t.forEach(function(o,u){o.catch(function(l){return e=!0,l}).then(function(l){n-=1,r[u]=l,!(n>0)&&(e&&i(r),a(r))})})}):Promise.resolve([])}function Xn(t){return typeof t=="object"&&t!=null&&t.nodeType===1}function Qn(t,e){return(!e||t!=="hidden")&&t!=="visible"&&t!=="clip"}function St(t,e){if(t.clientHeighte||i>t&&o=e&&u>=n?i-t-r:o>e&&un?o-e+a:0}var Jn=function(t,e){var n=window,r=e.scrollMode,a=e.block,i=e.inline,o=e.boundary,u=e.skipOverflowHiddenElements,l=typeof o=="function"?o:function(Ze){return Ze!==o};if(!Xn(t))throw new TypeError("Invalid target");for(var C,y,x=document.scrollingElement||document.documentElement,S=[],s=t;Xn(s)&&l(s);){if((s=(y=(C=s).parentElement)==null?C.getRootNode().host||null:y)===x){S.push(s);break}s!=null&&s===document.body&&St(s)&&!St(document.documentElement)||s!=null&&St(s,u)&&S.push(s)}for(var m=n.visualViewport?n.visualViewport.width:innerWidth,f=n.visualViewport?n.visualViewport.height:innerHeight,p=window.scrollX||pageXOffset,c=window.scrollY||pageYOffset,A=t.getBoundingClientRect(),v=A.height,d=A.width,b=A.top,g=A.right,F=A.bottom,I=A.left,O=a==="start"||a==="nearest"?b:a==="end"?F:b+v/2,M=i==="center"?I+d/2:i==="end"?g:I,q=[],L=0;L=0&&I>=0&&F<=f&&g<=m&&b>=E&&F<=h&&I>=$&&g<=w)return q;var N=getComputedStyle(j),V=parseInt(N.borderLeftWidth,10),D=parseInt(N.borderTopWidth,10),U=parseInt(N.borderRightWidth,10),K=parseInt(N.borderBottomWidth,10),Y=0,Q=0,ae="offsetWidth"in j?j.offsetWidth-j.clientWidth-V-U:0,re="offsetHeight"in j?j.offsetHeight-j.clientHeight-D-K:0,oe="offsetWidth"in j?j.offsetWidth===0?0:P/j.offsetWidth:0,ge="offsetHeight"in j?j.offsetHeight===0?0:z/j.offsetHeight:0;if(x===j)Y=a==="start"?O:a==="end"?O-f:a==="nearest"?rt(c,c+f,f,D,K,c+O,c+O+v,v):O-f/2,Q=i==="start"?M:i==="center"?M-m/2:i==="end"?M-m:rt(p,p+m,m,V,U,p+M,p+M+d,d),Y=Math.max(0,Y+c),Q=Math.max(0,Q+p);else{Y=a==="start"?O-E-D:a==="end"?O-h+K+re:a==="nearest"?rt(E,h,z,D,K+re,O,O+v,v):O-(E+z/2)+re/2,Q=i==="start"?M-$-V:i==="center"?M-($+P/2)+ae/2:i==="end"?M-w+U+ae:rt($,w,P,V,U+ae,M,M+d,d);var Re=j.scrollLeft,Ye=j.scrollTop;O+=Ye-(Y=Math.max(0,Math.min(Ye+Y/ge,j.scrollHeight-z/ge+re))),M+=Re-(Q=Math.max(0,Math.min(Re+Q/oe,j.scrollWidth-P/oe+ae)))}q.push({el:j,top:Y,left:Q})}return q};function ca(t){return t===Object(t)&&Object.keys(t).length!==0}function Hl(t,e){e===void 0&&(e="auto");var n="scrollBehavior"in document.body.style;t.forEach(function(r){var a=r.el,i=r.top,o=r.left;a.scroll&&n?a.scroll({top:i,left:o,behavior:e}):(a.scrollTop=i,a.scrollLeft=o)})}function Kl(t){return t===!1?{block:"end",inline:"nearest"}:ca(t)?t:{block:"start",inline:"nearest"}}function Yl(t,e){var n=t.isConnected||t.ownerDocument.documentElement.contains(t);if(ca(e)&&typeof e.behavior=="function")return e.behavior(n?Jn(t,e):[]);if(n){var r=Kl(e);return Hl(Jn(t,r),r.behavior)}}var Zl=Math.min;function Xl(t,e,n){for(var r=Fi,a=t[0].length,i=t.length,o=i,u=Array(i),l=1/0,C=[];o--;){var y=t[o];l=Zl(y.length,l),u[o]=a>=120&&y.length>=120?new Ua(o&&y):void 0}y=t[0];var x=-1,S=u[0];e:for(;++x1),i}),He(t,Yr(t),n),r&&(n=Le(n,ls|ss|fs,us));for(var a=e.length;a--;)os(n,e[a]);return n});function er(t){var e=!1;return t&&t.length&&t.every(function(n){return n.required?(e=!0,!1):!0}),e}function tr(t){return t==null?[]:Array.isArray(t)?t:[t]}function Et(t,e,n){var r=t;e=e.replace(/\[(\w+)\]/g,".$1"),e=e.replace(/^\./,"");for(var a=e.split("."),i=0,o=a.length;i1&&arguments[1]!==void 0?arguments[1]:H({}),n=arguments.length>2?arguments[2]:void 0,r=ot(we(t)),a=Ir({}),i=Mr([]),o=function(d){Be(we(t),_(_({},ot(r)),d)),le(function(){Object.keys(a).forEach(function(b){a[b]={autoLink:!1,required:er(we(e)[b])}})})},u=function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],b=arguments.length>1?arguments[1]:void 0;return b.length?d.filter(function(g){var F=tr(g.trigger||"change");return ts(F,b).length}):d},l=null,C=function(d){for(var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g=arguments.length>2?arguments[2]:void 0,F=[],I={},O=function(){var z=d[M],P=Et(we(t),z,g);if(!P.isValid)return"continue";I[z]=P.v;var E=u(we(e)[z],tr(b&&b.trigger));E.length&&F.push(y(z,P.v,E,b||{}).then(function(){return{name:z,errors:[],warnings:[]}}).catch(function(w){var h=[],$=[];return w.forEach(function(N){var V=N.rule.warningOnly,D=N.errors;V?$.push.apply($,ie(D)):h.push.apply(h,ie(D))}),h.length?Promise.reject({name:z,errors:h,warnings:$}):{name:z,errors:h,warnings:$}}))},M=0;M3&&arguments[3]!==void 0?arguments[3]:{},I=ra([d],b,g,_({validateMessages:pt},F),!!F.validateFirst);return a[d]?(a[d].validateStatus="validating",I.catch(function(O){return O}).then(function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(a[d].validateStatus==="validating"){var M,q=O.filter(function(L){return L&&L.errors.length});a[d].validateStatus=q.length?"error":"success",a[d].help=q.length?q.map(function(L){return L.errors}):null,n==null||(M=n.onValidate)===null||M===void 0||M.call(n,d,!q.length,q.length?Rt(a[d].help[0]):null)}}),I):I.catch(function(O){return O})},x=function(d,b){var g=[],F=!0;d?Array.isArray(d)?g=d:g=[d]:(F=!1,g=i.value);var I=C(g,b||{},F);return I.catch(function(O){return O}),I},S=function(d){var b=[];d?Array.isArray(d)?b=d:b=[d]:b=i.value,b.forEach(function(g){a[g]&&Be(a[g],{validateStatus:"",help:null})})},s=function(d){for(var b={autoLink:!1},g=[],F=Array.isArray(d)?d:[d],I=0;I-1}):Object.values(d)},I=function(w){if(!e.model){it(!1,"Form","model is required for resetFields to work.");return}F(w).forEach(function(h){h.resetField()})},O=function(w){F(w).forEach(function(h){h.clearValidate()})},M=function(w){var h=e.scrollToFirstError;if(r("finishFailed",w),h&&w.errorFields.length){var $={};ve(h)==="object"&&($=h),L(w.errorFields[0].name,$)}},q=function(){return z.apply(void 0,arguments)},L=function(w){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$=F(w?[w]:void 0);if($.length){var N=$[0].fieldId.value,V=N?document.getElementById(N):null;V&&Yl(V,_({scrollMode:"if-needed",block:"nearest"},h))}},j=function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(w===!0){var h=[];return Object.values(d).forEach(function($){var N=$.namePath;h.push(N.value)}),Zn(e.model,h)}else return Zn(e.model,w)},W=function(w,h){if(it(!(w instanceof Function),"Form","validateFields/validateField/validate not support callback, please use promise instead"),!e.model)return it(!1,"Form","model is required for validateFields to work."),Promise.reject("Form `model` is required for validateFields to work.");var $=!!w,N=$?ye(w).map(Dt):[],V=[];Object.values(d).forEach(function(K){var Y;if($||N.push(K.namePath.value),!!((Y=K.rules)!==null&&Y!==void 0&&Y.value.length)){var Q=K.namePath.value;if(!$||ml(N,Q)){var ae=K.validateRules(_({validateMessages:c.value},h));V.push(ae.then(function(){return{name:Q,errors:[],warnings:[]}}).catch(function(re){var oe=[],ge=[];return re.forEach(function(Re){var Ye=Re.rule.warningOnly,Ze=Re.errors;Ye?ge.push.apply(ge,ie(Ze)):oe.push.apply(oe,ie(Ze))}),oe.length?Promise.reject({name:Q,errors:oe,warnings:ge}):{name:Q,errors:oe,warnings:ge}}))}}});var D=fa(V);v.value=D;var U=D.then(function(){return v.value===D?Promise.resolve(j(N)):Promise.reject([])}).catch(function(K){var Y=K.filter(function(Q){return Q&&Q.errors.length});return Promise.reject({values:j(N),errorFields:Y,outOfDate:v.value!==D})});return U.catch(function(K){return K}),U},z=function(){return W.apply(void 0,arguments)},P=function(w){if(w.preventDefault(),w.stopPropagation(),r("submit",w),e.model){var h=W();h.then(function($){r("finish",$)}).catch(function($){M($)})}};return i({resetFields:I,clearValidate:O,validateFields:W,getFieldsValue:j,validate:q,scrollToField:L}),la({model:R(function(){return e.model}),name:R(function(){return e.name}),labelAlign:R(function(){return e.labelAlign}),labelCol:R(function(){return e.labelCol}),labelWrap:R(function(){return e.labelWrap}),wrapperCol:R(function(){return e.wrapperCol}),vertical:R(function(){return e.layout==="vertical"}),colon:m,requiredMark:s,validateTrigger:R(function(){return e.validateTrigger}),rules:R(function(){return e.rules}),addField:b,removeField:g,onValidate:function(w,h,$){r("validate",w,h,$)},validateMessages:c}),de(function(){return e.rules},function(){e.validateOnRuleChange&&W()}),function(){var E;return B("form",_(_({},o),{},{onSubmit:P,class:[A.value,o.class]}),[(E=a.default)===null||E===void 0?void 0:E.call(a)])}}});Ae.useInjectFormItemContext=Jt;Ae.ItemRest=Nt;Ae.install=function(t){return t.component(Ae.name,Ae),t.component(Ae.Item.name,Ae.Item),t.component(Nt.name,Nt),t};var bt=function(){return{id:String,prefixCls:String,inputPrefixCls:String,defaultValue:X.oneOfType([X.string,X.number]),value:{type:[String,Number,Symbol],default:void 0},placeholder:{type:[String,Number]},autocomplete:String,type:{type:String,default:"text"},name:String,size:{type:String},disabled:{type:Boolean,default:void 0},readonly:{type:Boolean,default:void 0},addonBefore:X.any,addonAfter:X.any,prefix:X.any,suffix:X.any,autofocus:{type:Boolean,default:void 0},allowClear:{type:Boolean,default:void 0},lazy:{type:Boolean,default:!0},maxlength:Number,loading:{type:Boolean,default:void 0},bordered:{type:Boolean,default:void 0},showCount:{type:[Boolean,Object]},htmlSize:Number,onPressEnter:Function,onKeydown:Function,onKeyup:Function,onFocus:Function,onBlur:Function,onChange:Function,onInput:Function,"onUpdate:value":Function,valueModifiers:Object,hidden:Boolean}},da=function(){return _(_({},be(bt(),["prefix","addonBefore","addonAfter","suffix"])),{},{rows:Number,autosize:{type:[Boolean,Object],default:void 0},autoSize:{type:[Boolean,Object],default:void 0},onResize:{type:Function},onCompositionstart:Function,onCompositionend:Function,valueModifiers:Object})};function va(t,e,n,r,a){var i;return J(t,(i={},T(i,"".concat(t,"-sm"),n==="small"),T(i,"".concat(t,"-lg"),n==="large"),T(i,"".concat(t,"-disabled"),r),T(i,"".concat(t,"-rtl"),a==="rtl"),T(i,"".concat(t,"-borderless"),!e),i))}var ke=function(e){return e!=null&&(Array.isArray(e)?xr(e).length:!0)};function ms(t){return ke(t.prefix)||ke(t.suffix)||ke(t.allowClear)}function Ot(t){return ke(t.addonBefore)||ke(t.addonAfter)}var hs=["text","input"];const ga=te({compatConfig:{MODE:3},name:"ClearableLabeledInput",inheritAttrs:!1,props:{prefixCls:String,inputType:X.oneOf(Ee("text","input")),value:X.any,defaultValue:X.any,allowClear:{type:Boolean,default:void 0},element:X.any,handleReset:Function,disabled:{type:Boolean,default:void 0},direction:{type:String},size:{type:String},suffix:X.any,prefix:X.any,addonBefore:X.any,addonAfter:X.any,readonly:{type:Boolean,default:void 0},focused:{type:Boolean,default:void 0},bordered:{type:Boolean,default:!0},triggerFocus:{type:Function},hidden:Boolean},setup:function(e,n){var r=n.slots,a=n.attrs,i=H(),o=function(s){var m;if((m=i.value)!==null&&m!==void 0&&m.contains(s.target)){var f=e.triggerFocus;f==null||f()}},u=function(s){var m,f=e.allowClear,p=e.value,c=e.disabled,A=e.readonly,v=e.handleReset,d=e.suffix,b=d===void 0?r.suffix:d;if(!f)return null;var g=!c&&!A&&p,F="".concat(s,"-clear-icon");return B(yr,{onClick:v,onMousedown:function(O){return O.preventDefault()},class:J((m={},T(m,"".concat(F,"-hidden"),!g),T(m,"".concat(F,"-has-suffix"),!!b),m),F),role:"button"},null)},l=function(s){var m,f=e.suffix,p=f===void 0?(m=r.suffix)===null||m===void 0?void 0:m.call(r):f,c=e.allowClear;return p||c?B("span",{class:"".concat(s,"-suffix")},[u(s),p]):null},C=function(s,m){var f,p,c,A=e.focused,v=e.value,d=e.prefix,b=d===void 0?(f=r.prefix)===null||f===void 0?void 0:f.call(r):d,g=e.size,F=e.suffix,I=F===void 0?(p=r.suffix)===null||p===void 0?void 0:p.call(r):F,O=e.disabled,M=e.allowClear,q=e.direction,L=e.readonly,j=e.bordered,W=e.hidden,z=e.addonAfter,P=z===void 0?r.addonAfter:z,E=e.addonBefore,w=E===void 0?r.addonBefore:E,h=l(s);if(!ms({prefix:b,suffix:I,allowClear:M}))return Fe(m,{value:v});var $=b?B("span",{class:"".concat(s,"-prefix")},[b]):null,N=J("".concat(s,"-affix-wrapper"),(c={},T(c,"".concat(s,"-affix-wrapper-focused"),A),T(c,"".concat(s,"-affix-wrapper-disabled"),O),T(c,"".concat(s,"-affix-wrapper-sm"),g==="small"),T(c,"".concat(s,"-affix-wrapper-lg"),g==="large"),T(c,"".concat(s,"-affix-wrapper-input-with-clear-btn"),I&&M&&v),T(c,"".concat(s,"-affix-wrapper-rtl"),q==="rtl"),T(c,"".concat(s,"-affix-wrapper-readonly"),L),T(c,"".concat(s,"-affix-wrapper-borderless"),!j),T(c,"".concat(a.class),!Ot({addonAfter:P,addonBefore:w})&&a.class),c));return B("span",{ref:i,class:N,style:a.style,onMouseup:o,hidden:W},[$,Fe(m,{style:null,value:v,class:va(s,j,g,O)}),h])},y=function(s,m){var f,p,c,A=e.addonBefore,v=A===void 0?(f=r.addonBefore)===null||f===void 0?void 0:f.call(r):A,d=e.addonAfter,b=d===void 0?(p=r.addonAfter)===null||p===void 0?void 0:p.call(r):d,g=e.size,F=e.direction,I=e.hidden,O=e.disabled;if(!Ot({addonBefore:v,addonAfter:b}))return m;var M="".concat(s,"-group"),q="".concat(M,"-addon"),L=J(q,T({},"".concat(q,"-disabled"),O)),j=v?B("span",{class:L},[v]):null,W=b?B("span",{class:L},[b]):null,z=J("".concat(s,"-wrapper"),M,T({},"".concat(M,"-rtl"),F==="rtl")),P=J("".concat(s,"-group-wrapper"),(c={},T(c,"".concat(s,"-group-wrapper-sm"),g==="small"),T(c,"".concat(s,"-group-wrapper-lg"),g==="large"),T(c,"".concat(s,"-group-wrapper-rtl"),F==="rtl"),c),a.class);return B("span",{class:P,style:a.style,hidden:I},[B("span",{class:z},[j,Fe(m,{style:null}),W])])},x=function(s,m){var f,p=e.value,c=e.allowClear,A=e.direction,v=e.bordered,d=e.hidden,b=e.addonAfter,g=b===void 0?r.addonAfter:b,F=e.addonBefore,I=F===void 0?r.addonBefore:F;if(!c)return Fe(m,{value:p});var O=J("".concat(s,"-affix-wrapper"),"".concat(s,"-affix-wrapper-textarea-with-clear-btn"),(f={},T(f,"".concat(s,"-affix-wrapper-rtl"),A==="rtl"),T(f,"".concat(s,"-affix-wrapper-borderless"),!v),T(f,"".concat(a.class),!Ot({addonAfter:g,addonBefore:I})&&a.class),f));return B("span",{class:O,style:a.style,hidden:d},[Fe(m,{style:null,value:p}),u(s)])};return function(){var S,s=e.prefixCls,m=e.inputType,f=e.element,p=f===void 0?(S=r.element)===null||S===void 0?void 0:S.call(r):f;return m===hs[0]?x(s,p):y(s,C(s,p))}}});function Kt(t){return typeof t>"u"||t===null?"":String(t)}function De(t,e,n,r){if(n){var a=e;if(e.type==="click"){Object.defineProperty(a,"target",{writable:!0}),Object.defineProperty(a,"currentTarget",{writable:!0});var i=t.cloneNode(!0);a.target=i,a.currentTarget=i,i.value="",n(a);return}if(r!==void 0){Object.defineProperty(a,"target",{writable:!0}),Object.defineProperty(a,"currentTarget",{writable:!0}),a.target=t,a.currentTarget=t,t.value=r,n(a);return}n(a)}}function ma(t,e){if(t){t.focus(e);var n=e||{},r=n.cursor;if(r){var a=t.value.length;switch(r){case"start":t.setSelectionRange(0,0);break;case"end":t.setSelectionRange(a,a);break;default:t.setSelectionRange(0,a)}}}}const ne=te({compatConfig:{MODE:3},name:"AInput",inheritAttrs:!1,props:bt(),setup:function(e,n){var r=n.slots,a=n.attrs,i=n.expose,o=n.emit,u=H(),l=H(),C,y=Jt(),x=fe("input",e),S=x.direction,s=x.prefixCls,m=x.size,f=x.autocomplete,p=H(e.value===void 0?e.defaultValue:e.value),c=H(!1);de(function(){return e.value},function(){p.value=e.value}),de(function(){return e.disabled},function(){e.value!==void 0&&(p.value=e.value),e.disabled&&(c.value=!1)});var A=function(){C=setTimeout(function(){var w;((w=u.value)===null||w===void 0?void 0:w.getAttribute("type"))==="password"&&u.value.hasAttribute("value")&&u.value.removeAttribute("value")})},v=function(w){ma(u.value,w)},d=function(){var w;(w=u.value)===null||w===void 0||w.blur()},b=function(w,h,$){var N;(N=u.value)===null||N===void 0||N.setSelectionRange(w,h,$)},g=function(){var w;(w=u.value)===null||w===void 0||w.select()};i({focus:v,blur:d,input:u,stateValue:p,setSelectionRange:b,select:g});var F=function(w){var h=e.onFocus;c.value=!0,h==null||h(w),le(function(){A()})},I=function(w){var h=e.onBlur;c.value=!1,h==null||h(w),y.onFieldBlur(),le(function(){A()})},O=function(w){o("update:value",w.target.value),o("change",w),o("input",w),y.onFieldChange()},M=Ue(),q=function(w,h){p.value!==w&&(e.value===void 0?p.value=w:le(function(){u.value.value!==p.value&&M.update()}),le(function(){h&&h()}))},L=function(w){De(u.value,w,O),q("",function(){v()})},j=function(w){var h=w.target,$=h.value,N=h.composing;if(!((w.isComposing||N)&&e.lazy||p.value===$)){var V=w.target.value;De(u.value,w,O),q(V,function(){A()})}},W=function(w){w.keyCode===13&&o("pressEnter",w),o("keydown",w)};Pe(function(){A()}),Ne(function(){clearTimeout(C)});var z=function(){var w,h=e.addonBefore,$=h===void 0?r.addonBefore:h,N=e.addonAfter,V=N===void 0?r.addonAfter:N,D=e.disabled,U=e.bordered,K=U===void 0?!0:U,Y=e.valueModifiers,Q=Y===void 0?{}:Y,ae=e.htmlSize,re=be(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","size","bordered","htmlSize","lazy","showCount","valueModifiers"]),oe=_(_(_({},re),a),{},{autocomplete:f.value,onChange:j,onInput:j,onFocus:F,onBlur:I,onKeydown:W,class:J(va(s.value,K,m.value,D,S.value),T({},a.class,a.class&&!$&&!V)),ref:u,key:"ant-input",size:ae,id:(w=re.id)!==null&&w!==void 0?w:y.id.value});Q.lazy&&delete oe.onInput,oe.autofocus||delete oe.autofocus;var ge=B("input",be(oe,["size"]),null);return jr(ge,[[Br]])},P=function(){var w,h=p.value,$=e.maxlength,N=e.suffix,V=N===void 0?(w=r.suffix)===null||w===void 0?void 0:w.call(r):N,D=e.showCount,U=Number($)>0;if(V||D){var K=ie(Kt(h)).length,Y=null;return ve(D)==="object"?Y=D.formatter({count:K,maxlength:$}):Y="".concat(K).concat(U?" / ".concat($):""),B(We,null,[!!D&&B("span",{class:J("".concat(s.value,"-show-count-suffix"),T({},"".concat(s.value,"-show-count-has-suffix"),!!V))},[Y]),V])}return null};return function(){var E=_(_(_({},a),e),{},{prefixCls:s.value,inputType:"input",value:Kt(p.value),handleReset:L,focused:c.value&&!e.disabled});return B(ga,_(_({},be(E,["element","valueModifiers","suffix","showCount"])),{},{ref:l}),_(_({},r),{},{element:z,suffix:P}))}}}),ps=te({compatConfig:{MODE:3},name:"AInputGroup",props:{prefixCls:String,size:{type:String},compact:{type:Boolean,default:void 0},onMouseenter:{type:Function},onMouseleave:{type:Function},onFocus:{type:Function},onBlur:{type:Function}},setup:function(e,n){var r=n.slots,a=fe("input-group",e),i=a.prefixCls,o=a.direction,u=R(function(){var l,C=i.value;return l={},T(l,"".concat(C),!0),T(l,"".concat(C,"-lg"),e.size==="large"),T(l,"".concat(C,"-sm"),e.size==="small"),T(l,"".concat(C,"-compact"),e.compact),T(l,"".concat(C,"-rtl"),o.value==="rtl"),l});return function(){var l;return B("span",{class:u.value,onMouseenter:e.onMouseenter,onMouseleave:e.onMouseleave,onFocus:e.onFocus,onBlur:e.onBlur},[(l=r.default)===null||l===void 0?void 0:l.call(r)])}}});var Pt=/iPhone/i,nr=/iPod/i,rr=/iPad/i,Tt=/\bAndroid(?:.+)Mobile\b/i,ar=/Android/i,_e=/\bAndroid(?:.+)SD4930UR\b/i,at=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,me=/Windows Phone/i,ir=/\bWindows(?:.+)ARM\b/i,or=/BlackBerry/i,ur=/BB10/i,lr=/Opera Mini/i,sr=/\b(CriOS|Chrome)(?:.+)Mobile/i,fr=/Mobile(?:.+)Firefox\b/i;function k(t,e){return t.test(e)}function cr(t){var e=t||(typeof navigator<"u"?navigator.userAgent:""),n=e.split("[FBAN");if(typeof n[1]<"u"){var r=n,a=jt(r,1);e=a[0]}if(n=e.split("Twitter"),typeof n[1]<"u"){var i=n,o=jt(i,1);e=o[0]}var u={apple:{phone:k(Pt,e)&&!k(me,e),ipod:k(nr,e),tablet:!k(Pt,e)&&k(rr,e)&&!k(me,e),device:(k(Pt,e)||k(nr,e)||k(rr,e))&&!k(me,e)},amazon:{phone:k(_e,e),tablet:!k(_e,e)&&k(at,e),device:k(_e,e)||k(at,e)},android:{phone:!k(me,e)&&k(_e,e)||!k(me,e)&&k(Tt,e),tablet:!k(me,e)&&!k(_e,e)&&!k(Tt,e)&&(k(at,e)||k(ar,e)),device:!k(me,e)&&(k(_e,e)||k(at,e)||k(Tt,e)||k(ar,e))||k(/\bokhttp\b/i,e)},windows:{phone:k(me,e),tablet:k(ir,e),device:k(me,e)||k(ir,e)},other:{blackberry:k(or,e),blackberry10:k(ur,e),opera:k(lr,e),firefox:k(fr,e),chrome:k(sr,e),device:k(or,e)||k(ur,e)||k(lr,e)||k(fr,e)||k(sr,e)},any:null,phone:null,tablet:null};return u.any=u.apple.device||u.android.device||u.windows.device||u.other.device,u.phone=u.apple.phone||u.android.phone||u.windows.phone,u.tablet=u.apple.tablet||u.android.tablet||u.windows.tablet,u}var bs=_(_({},cr()),{},{isMobile:cr}),ys=["disabled","loading","addonAfter","suffix"];const xs=te({compatConfig:{MODE:3},name:"AInputSearch",inheritAttrs:!1,props:_(_({},bt()),{},{inputPrefixCls:String,enterButton:X.any,onSearch:{type:Function}}),setup:function(e,n){var r=n.slots,a=n.attrs,i=n.expose,o=n.emit,u=H(),l=function(){var d;(d=u.value)===null||d===void 0||d.focus()},C=function(){var d;(d=u.value)===null||d===void 0||d.blur()};i({focus:l,blur:C});var y=function(d){o("update:value",d.target.value),d&&d.target&&d.type==="click"&&o("search",d.target.value,d),o("change",d)},x=function(d){var b;document.activeElement===((b=u.value)===null||b===void 0?void 0:b.input)&&d.preventDefault()},S=function(d){var b;o("search",(b=u.value)===null||b===void 0?void 0:b.stateValue,d),bs.tablet||u.value.focus()},s=fe("input-search",e),m=s.prefixCls,f=s.getPrefixCls,p=s.direction,c=s.size,A=R(function(){return f("input",e.inputPrefixCls)});return function(){var v,d,b,g,F,I=e.disabled,O=e.loading,M=e.addonAfter,q=M===void 0?(v=r.addonAfter)===null||v===void 0?void 0:v.call(r):M,L=e.suffix,j=L===void 0?(d=r.suffix)===null||d===void 0?void 0:d.call(r):L,W=wr(e,ys),z=e.enterButton,P=z===void 0?(b=(g=r.enterButton)===null||g===void 0?void 0:g.call(r))!==null&&b!==void 0?b:!1:z;P=P||P==="";var E=typeof P=="boolean"?B(nn,null,null):null,w="".concat(m.value,"-button"),h=Array.isArray(P)?P[0]:P,$,N=h.type&&Rr(h.type)&&h.type.__ANT_BUTTON;if(N||h.tagName==="button")$=Fe(h,_({onMousedown:x,onClick:S,key:"enterButton"},N?{class:w,size:c.value}:{}),!1);else{var V=E&&!P;$=B(qe,{class:w,type:P?"primary":void 0,size:c.value,disabled:I,key:"enterButton",onMousedown:x,onClick:S,loading:O,icon:V?E:null},{default:function(){return[V?null:E||P]}})}q&&($=[$,q]);var D=J(m.value,(F={},T(F,"".concat(m.value,"-rtl"),p.value==="rtl"),T(F,"".concat(m.value,"-").concat(c.value),!!c.value),T(F,"".concat(m.value,"-with-button"),!!P),F),a.class);return B(ne,_(_(_({ref:u},be(W,["onUpdate:value","onSearch","enterButton"])),a),{},{onPressEnter:S,size:c.value,prefixCls:A.value,addonAfter:$,suffix:j,onChange:y,class:D,disabled:I}),r)}}});var ws=` +`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),i=new RegExp("(?:^"+n+"$)|(?:^"+a+"$)"),o=new RegExp("^"+n+"$"),u=new RegExp("^"+a+"$"),l=function(d){return d&&d.exact?i:new RegExp("(?:"+e(d)+n+e(d)+")|(?:"+e(d)+a+e(d)+")","g")};l.v4=function(v){return v&&v.exact?o:new RegExp(""+e(v)+n+e(v),"g")},l.v6=function(v){return v&&v.exact?u:new RegExp(""+e(v)+a+e(v),"g")};var C="(?:(?:[a-z]+:)?//)",y="(?:\\S+(?::\\S*)?@)?",x=l.v4().source,S=l.v6().source,s="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",m="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",f="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",p="(?::\\d{2,5})?",c='(?:[/?#][^\\s"]*)?',A="(?:"+C+"|www\\.)"+y+"(?:localhost|"+x+"|"+S+"|"+s+m+f+")"+p+c;return nt=new RegExp("(?:^"+A+"$)","i"),nt},Kn={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},Be={integer:function(e){return Be.number(e)&&parseInt(e,10)===e},float:function(e){return Be.number(e)&&!Be.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e=="number"},object:function(e){return typeof e=="object"&&!Be.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(Kn.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(Uu())},hex:function(e){return typeof e=="string"&&!!e.match(Kn.hex)}},Hu=function(e,n,r,a,i){if(e.required&&n===void 0){Jr(e,n,r,a,i);return}var o=["integer","float","array","regexp","object","method","email","number","date","url","hex"],u=e.type;o.indexOf(u)>-1?Be[u](n)||a.push(se(i.messages.types[u],e.fullField,e.type)):u&&typeof n!==e.type&&a.push(se(i.messages.types[u],e.fullField,e.type))},Ku=function(e,n,r,a,i){var o=typeof e.len=="number",u=typeof e.min=="number",l=typeof e.max=="number",C=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,y=n,x=null,S=typeof n=="number",s=typeof n=="string",m=Array.isArray(n);if(S?x="number":s?x="string":m&&(x="array"),!x)return!1;m&&(y=n.length),s&&(y=n.replace(C,"_").length),o?y!==e.len&&a.push(se(i.messages[x].len,e.fullField,e.len)):u&&!l&&ye.max?a.push(se(i.messages[x].max,e.fullField,e.max)):u&&l&&(ye.max)&&a.push(se(i.messages[x].range,e.fullField,e.min,e.max))},Te="enum",Zu=function(e,n,r,a,i){e[Te]=Array.isArray(e[Te])?e[Te]:[],e[Te].indexOf(n)===-1&&a.push(se(i.messages[Te],e.fullField,e[Te].join(", ")))},Yu=function(e,n,r,a,i){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(n)||a.push(se(i.messages.pattern.mismatch,e.fullField,n,e.pattern));else if(typeof e.pattern=="string"){var o=new RegExp(e.pattern);o.test(n)||a.push(se(i.messages.pattern.mismatch,e.fullField,n,e.pattern))}}},G={required:Jr,whitespace:Gu,type:Hu,range:Ku,enum:Zu,pattern:Yu},Xu=function(e,n,r,a,i){var o=[],u=e.required||!e.required&&a.hasOwnProperty(e.field);if(u){if(ee(n,"string")&&!e.required)return r();G.required(e,n,a,o,i,"string"),ee(n,"string")||(G.type(e,n,a,o,i),G.range(e,n,a,o,i),G.pattern(e,n,a,o,i),e.whitespace===!0&&G.whitespace(e,n,a,o,i))}r(o)},Qu=function(e,n,r,a,i){var o=[],u=e.required||!e.required&&a.hasOwnProperty(e.field);if(u){if(ee(n)&&!e.required)return r();G.required(e,n,a,o,i),n!==void 0&&G.type(e,n,a,o,i)}r(o)},Ju=function(e,n,r,a,i){var o=[],u=e.required||!e.required&&a.hasOwnProperty(e.field);if(u){if(n===""&&(n=void 0),ee(n)&&!e.required)return r();G.required(e,n,a,o,i),n!==void 0&&(G.type(e,n,a,o,i),G.range(e,n,a,o,i))}r(o)},el=function(e,n,r,a,i){var o=[],u=e.required||!e.required&&a.hasOwnProperty(e.field);if(u){if(ee(n)&&!e.required)return r();G.required(e,n,a,o,i),n!==void 0&&G.type(e,n,a,o,i)}r(o)},tl=function(e,n,r,a,i){var o=[],u=e.required||!e.required&&a.hasOwnProperty(e.field);if(u){if(ee(n)&&!e.required)return r();G.required(e,n,a,o,i),ee(n)||G.type(e,n,a,o,i)}r(o)},nl=function(e,n,r,a,i){var o=[],u=e.required||!e.required&&a.hasOwnProperty(e.field);if(u){if(ee(n)&&!e.required)return r();G.required(e,n,a,o,i),n!==void 0&&(G.type(e,n,a,o,i),G.range(e,n,a,o,i))}r(o)},rl=function(e,n,r,a,i){var o=[],u=e.required||!e.required&&a.hasOwnProperty(e.field);if(u){if(ee(n)&&!e.required)return r();G.required(e,n,a,o,i),n!==void 0&&(G.type(e,n,a,o,i),G.range(e,n,a,o,i))}r(o)},al=function(e,n,r,a,i){var o=[],u=e.required||!e.required&&a.hasOwnProperty(e.field);if(u){if(n==null&&!e.required)return r();G.required(e,n,a,o,i,"array"),n!=null&&(G.type(e,n,a,o,i),G.range(e,n,a,o,i))}r(o)},il=function(e,n,r,a,i){var o=[],u=e.required||!e.required&&a.hasOwnProperty(e.field);if(u){if(ee(n)&&!e.required)return r();G.required(e,n,a,o,i),n!==void 0&&G.type(e,n,a,o,i)}r(o)},ol="enum",ul=function(e,n,r,a,i){var o=[],u=e.required||!e.required&&a.hasOwnProperty(e.field);if(u){if(ee(n)&&!e.required)return r();G.required(e,n,a,o,i),n!==void 0&&G[ol](e,n,a,o,i)}r(o)},ll=function(e,n,r,a,i){var o=[],u=e.required||!e.required&&a.hasOwnProperty(e.field);if(u){if(ee(n,"string")&&!e.required)return r();G.required(e,n,a,o,i),ee(n,"string")||G.pattern(e,n,a,o,i)}r(o)},sl=function(e,n,r,a,i){var o=[],u=e.required||!e.required&&a.hasOwnProperty(e.field);if(u){if(ee(n,"date")&&!e.required)return r();if(G.required(e,n,a,o,i),!ee(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),G.type(e,l,a,o,i),l&&G.range(e,l.getTime(),a,o,i)}}r(o)},fl=function(e,n,r,a,i){var o=[],u=Array.isArray(n)?"array":typeof n;G.required(e,n,a,o,i,u),r(o)},Ft=function(e,n,r,a,i){var o=e.type,u=[],l=e.required||!e.required&&a.hasOwnProperty(e.field);if(l){if(ee(n,o)&&!e.required)return r();G.required(e,n,a,u,i,o),ee(n,o)||G.type(e,n,a,u,i)}r(u)},cl=function(e,n,r,a,i){var o=[],u=e.required||!e.required&&a.hasOwnProperty(e.field);if(u){if(ee(n)&&!e.required)return r();G.required(e,n,a,o,i)}r(o)},Ve={string:Xu,method:Qu,number:Ju,boolean:el,regexp:tl,integer:nl,float:rl,array:al,object:il,enum:ul,pattern:ll,date:sl,url:Ft,hex:Ft,email:Ft,required:fl,any:cl};function Vt(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var kt=Vt(),Ke=function(){function t(n){this.rules=null,this._messages=kt,this.define(n)}var e=t.prototype;return e.define=function(r){var a=this;if(!r)throw new Error("Cannot configure a schema with no rules");if(typeof r!="object"||Array.isArray(r))throw new Error("Rules must be an object");this.rules={},Object.keys(r).forEach(function(i){var o=r[i];a.rules[i]=Array.isArray(o)?o:[o]})},e.messages=function(r){return r&&(this._messages=Hn(Vt(),r)),this._messages},e.validate=function(r,a,i){var o=this;a===void 0&&(a={}),i===void 0&&(i=function(){});var u=r,l=a,C=i;if(typeof l=="function"&&(C=l,l={}),!this.rules||Object.keys(this.rules).length===0)return C&&C(null,u),Promise.resolve(u);function y(f){var p=[],c={};function A(d){if(Array.isArray(d)){var b;p=(b=p).concat.apply(b,d)}else p.push(d)}for(var v=0;v3&&arguments[3]!==void 0?arguments[3]:!1;return e.length&&r&&n===void 0&&!ea(t,e.slice(0,-1))?t:ta(t,e,n,r)}function Dt(t){return ye(t)}function vl(t,e){var n=ea(t,e);return n}function gl(t,e,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a=dl(t,e,n,r);return a}function ml(t,e){return t&&t.some(function(n){return pl(n,e)})}function Zn(t){return ve(t)==="object"&&t!==null&&Object.getPrototypeOf(t)===Object.prototype}function na(t,e){var n=Array.isArray(t)?ie(t):_({},t);return e&&Object.keys(e).forEach(function(r){var a=n[r],i=e[r],o=Zn(a)&&Zn(i);n[r]=o?na(a,i||{}):i}),n}function hl(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r-1?a[i?e[o]:o]:void 0}}var jl=Math.max;function Nl(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var a=n==null?0:Ti(n);return a<0&&(a=jl(r+a,0)),Br(t,oa(e),a)}var Rl=Ml(Nl),ua=Symbol("formContextKey"),la=function(e){Xt(ua,e)},cn=function(){return ct(ua,{name:R(function(){}),labelAlign:R(function(){return"right"}),vertical:R(function(){return!1}),addField:function(n,r){},removeField:function(n){},model:R(function(){}),rules:R(function(){}),colon:R(function(){}),labelWrap:R(function(){}),labelCol:R(function(){}),requiredMark:R(function(){return!1}),validateTrigger:R(function(){}),onValidate:function(){},validateMessages:R(function(){return pt})})},sa=Symbol("formItemPrefixContextKey"),zl=function(e){Xt(sa,e)},Bl=function(){return ct(sa,{prefixCls:R(function(){return""})})},dn=function(e,n){var r,a,i,o,u=n.slots,l=n.emit,C=n.attrs,y=_(_({},e),C),x=y.prefixCls,S=y.htmlFor,s=y.labelCol,m=y.labelAlign,f=y.colon,p=y.required,c=y.requiredMark,A=_a("Form"),v=jt(A,1),d=v[0],b=(r=e.label)!==null&&r!==void 0?r:(a=u.label)===null||a===void 0?void 0:a.call(u);if(!b)return null;var g=cn(),F=g.vertical,I=g.labelAlign,O=g.labelCol,M=g.labelWrap,q=g.colon,L=s||(O==null?void 0:O.value)||{},j=m||(I==null?void 0:I.value),W="".concat(x,"-item-label"),B=J(W,j==="left"&&"".concat(W,"-left"),L.class,T({},"".concat(W,"-wrap"),!!M.value)),P=b,E=f===!0||(q==null?void 0:q.value)!==!1&&f!==!1,w=E&&!F.value;if(w&&typeof b=="string"&&b.trim()!==""&&(P=b.replace(/[:|:]\s*$/,"")),P=z(We,null,[P,(i=u.tooltip)===null||i===void 0?void 0:i.call(u,{class:"".concat(x,"-item-tooltip")})]),c==="optional"&&!p){var h,$;P=z(We,null,[P,z("span",{class:"".concat(x,"-item-optional")},[((h=d.value)===null||h===void 0?void 0:h.optional)||(($=$a.Form)===null||$===void 0?void 0:$.optional)])])}var N=J((o={},T(o,"".concat(x,"-item-required"),p),T(o,"".concat(x,"-item-required-mark-optional"),c==="optional"),T(o,"".concat(x,"-item-no-colon"),!E),o));return z(Ur,_(_({},L),{},{class:B}),{default:function(){return[z("label",{for:S,class:N,title:typeof b=="string"?b:"",onClick:function(U){return l("click",U)}},[P])]}})};dn.displayName="FormItemLabel";dn.inheritAttrs=!1;const ql=te({compatConfig:{MODE:3},name:"ErrorList",props:["errors","help","onDomErrorVisibleChange","helpStatus","warnings"],setup:function(e){var n=fe("",e),r=n.prefixCls,a=Bl(),i=a.prefixCls,o=a.status,u=R(function(){return"".concat(i.value,"-item-explain")}),l=R(function(){return!!(e.errors&&e.errors.length)}),C=H(o.value);return de([l,o],function(){l.value&&(C.value=o.value)}),function(){var y,x,S=Ai("".concat(r.value,"-show-help-item")),s=Ia("".concat(r.value,"-show-help-item"),S);return s.class=u.value,(y=e.errors)!==null&&y!==void 0&&y.length?z(Ma,_(_({},s),{},{tag:"div"}),{default:function(){return[(x=e.errors)===null||x===void 0?void 0:x.map(function(f,p){return z("div",{key:p,role:"alert",class:C.value?"".concat(u.value,"-").concat(C.value):""},[f])})]}}):null}}});var Ll={success:Na,warning:ja,error:wr,validating:Mt},Vl=te({compatConfig:{MODE:3},slots:["help","extra","errors"],inheritAttrs:!1,props:["prefixCls","errors","hasFeedback","onDomErrorVisibleChange","wrapperCol","help","extra","status"],setup:function(e,n){var r=n.slots,a=cn(),i=a.wrapperCol,o=_({},a);return delete o.labelCol,delete o.wrapperCol,la(o),zl({prefixCls:R(function(){return e.prefixCls}),status:R(function(){return e.status})}),function(){var u,l,C,y=e.prefixCls,x=e.wrapperCol,S=e.help,s=S===void 0?(u=r.help)===null||u===void 0?void 0:u.call(r):S,m=e.errors,f=m===void 0?(l=r.errors)===null||l===void 0?void 0:l.call(r):m,p=e.hasFeedback,c=e.status,A=e.extra,v=A===void 0?(C=r.extra)===null||C===void 0?void 0:C.call(r):A,d="".concat(y,"-item"),b=x||(i==null?void 0:i.value)||{},g=J("".concat(d,"-control"),b.class),F=c&&Ll[c];return z(Ur,_(_({},b),{},{class:g}),{default:function(){var O;return z(We,null,[z("div",{class:"".concat(d,"-control-input")},[z("div",{class:"".concat(d,"-control-input-content")},[(O=r.default)===null||O===void 0?void 0:O.call(r)]),p&&F?z("span",{class:"".concat(d,"-children-icon")},[z(F,null,null)]):null]),z(ql,{errors:f,help:s,class:"".concat(d,"-explain-connected")},null),v?z("div",{class:"".concat(d,"-extra")},[v]):null])}})}}});function kl(t){var e=Cr(t.value.slice()),n=null;return dt(function(){clearTimeout(n),n=setTimeout(function(){e.value=t.value},t.value.length?0:10)}),e}Ee("success","warning","error","validating","");function At(t,e,n){var r=t,a=e,i=0;try{for(var o=a.length;i0&&arguments[0]!==void 0?arguments[0]:[];if(g.value==="validating"){var ae=Q.filter(function(re){return re&&re.errors.length});g.value=ae.length?"error":"success",x.value=ae.map(function(re){return re.errors}),C.onValidate(y.value,!x.value.length,x.value.length?Nt(x.value[0]):null)}}),Z}},O=function(){I({triggerName:"blur"})},M=function(){if(S.value){S.value=!1;return}I({triggerName:"change"})},q=function(){g.value=e.validateStatus,S.value=!1,x.value=[]},L=function(){g.value=e.validateStatus,S.value=!0,x.value=[];var $=C.model.value||{},N=c.value,V=At($,m.value,!0);Array.isArray(N)?V.o[V.k]=[].concat(A.value):V.o[V.k]=A.value,le(function(){S.value=!1})},j=R(function(){return e.htmlFor===void 0?f.value:e.htmlFor}),W=function(){var $=j.value;if(!(!$||!s.value)){var N=s.value.$el.querySelector('[id="'.concat($,'"]'));N&&N.focus&&N.focus()}};i({onFieldBlur:O,onFieldChange:M,clearValidate:q,resetField:L}),Ya({id:f,onFieldBlur:function(){e.autoLink&&O()},onFieldChange:function(){e.autoLink&&M()},clearValidate:q},R(function(){return!!(e.autoLink&&C.model.value&&y.value)}));var B=!1;de(y,function(h){h?B||(B=!0,C.addField(o,{fieldValue:c,fieldId:f,fieldName:y,resetField:L,clearValidate:q,namePath:m,validateRules:I,rules:d})):(B=!1,C.removeField(o))},{immediate:!0}),Ne(function(){C.removeField(o)});var P=kl(x),E=R(function(){return e.validateStatus!==void 0?e.validateStatus:P.value.length?"error":g.value}),w=R(function(){var h;return h={},T(h,"".concat(l.value,"-item"),!0),T(h,"".concat(l.value,"-item-has-feedback"),E.value&&e.hasFeedback),T(h,"".concat(l.value,"-item-has-success"),E.value==="success"),T(h,"".concat(l.value,"-item-has-warning"),E.value==="warning"),T(h,"".concat(l.value,"-item-has-error"),E.value==="error"),T(h,"".concat(l.value,"-item-is-validating"),E.value==="validating"),T(h,"".concat(l.value,"-item-hidden"),e.hidden),h});return function(){var h,$;if(e.noStyle)return(h=r.default)===null||h===void 0?void 0:h.call(r);var N=($=e.help)!==null&&$!==void 0?$:r.help?Fr(r.help()):null;return z(uo,_(_({},a),{},{class:[w.value,N!=null||P.value.length?"".concat(l.value,"-item-with-help"):"",a.class],key:"row"}),{default:function(){var D,U,K,Z;return z(We,null,[z(dn,_(_({},e),{},{htmlFor:j.value,required:b.value,requiredMark:C.requiredMark.value,prefixCls:l.value,onClick:W,label:(D=e.label)!==null&&D!==void 0?D:(U=r.label)===null||U===void 0?void 0:U.call(r)}),null),z(Vl,_(_({},e),{},{errors:N!=null?ye(N):P.value,prefixCls:l.value,status:E.value,ref:s,help:N,extra:(K=e.extra)!==null&&K!==void 0?K:(Z=r.extra)===null||Z===void 0?void 0:Z.call(r)}),{default:r.default})])}})}}});function fa(t){var e=!1,n=t.length,r=[];return t.length?new Promise(function(a,i){t.forEach(function(o,u){o.catch(function(l){return e=!0,l}).then(function(l){n-=1,r[u]=l,!(n>0)&&(e&&i(r),a(r))})})}):Promise.resolve([])}function Xn(t){return typeof t=="object"&&t!=null&&t.nodeType===1}function Qn(t,e){return(!e||t!=="hidden")&&t!=="visible"&&t!=="clip"}function St(t,e){if(t.clientHeighte||i>t&&o=e&&u>=n?i-t-r:o>e&&un?o-e+a:0}var Jn=function(t,e){var n=window,r=e.scrollMode,a=e.block,i=e.inline,o=e.boundary,u=e.skipOverflowHiddenElements,l=typeof o=="function"?o:function(Ye){return Ye!==o};if(!Xn(t))throw new TypeError("Invalid target");for(var C,y,x=document.scrollingElement||document.documentElement,S=[],s=t;Xn(s)&&l(s);){if((s=(y=(C=s).parentElement)==null?C.getRootNode().host||null:y)===x){S.push(s);break}s!=null&&s===document.body&&St(s)&&!St(document.documentElement)||s!=null&&St(s,u)&&S.push(s)}for(var m=n.visualViewport?n.visualViewport.width:innerWidth,f=n.visualViewport?n.visualViewport.height:innerHeight,p=window.scrollX||pageXOffset,c=window.scrollY||pageYOffset,A=t.getBoundingClientRect(),v=A.height,d=A.width,b=A.top,g=A.right,F=A.bottom,I=A.left,O=a==="start"||a==="nearest"?b:a==="end"?F:b+v/2,M=i==="center"?I+d/2:i==="end"?g:I,q=[],L=0;L=0&&I>=0&&F<=f&&g<=m&&b>=E&&F<=h&&I>=$&&g<=w)return q;var N=getComputedStyle(j),V=parseInt(N.borderLeftWidth,10),D=parseInt(N.borderTopWidth,10),U=parseInt(N.borderRightWidth,10),K=parseInt(N.borderBottomWidth,10),Z=0,Q=0,ae="offsetWidth"in j?j.offsetWidth-j.clientWidth-V-U:0,re="offsetHeight"in j?j.offsetHeight-j.clientHeight-D-K:0,oe="offsetWidth"in j?j.offsetWidth===0?0:P/j.offsetWidth:0,ge="offsetHeight"in j?j.offsetHeight===0?0:B/j.offsetHeight:0;if(x===j)Z=a==="start"?O:a==="end"?O-f:a==="nearest"?rt(c,c+f,f,D,K,c+O,c+O+v,v):O-f/2,Q=i==="start"?M:i==="center"?M-m/2:i==="end"?M-m:rt(p,p+m,m,V,U,p+M,p+M+d,d),Z=Math.max(0,Z+c),Q=Math.max(0,Q+p);else{Z=a==="start"?O-E-D:a==="end"?O-h+K+re:a==="nearest"?rt(E,h,B,D,K+re,O,O+v,v):O-(E+B/2)+re/2,Q=i==="start"?M-$-V:i==="center"?M-($+P/2)+ae/2:i==="end"?M-w+U+ae:rt($,w,P,V,U+ae,M,M+d,d);var Re=j.scrollLeft,Ze=j.scrollTop;O+=Ze-(Z=Math.max(0,Math.min(Ze+Z/ge,j.scrollHeight-B/ge+re))),M+=Re-(Q=Math.max(0,Math.min(Re+Q/oe,j.scrollWidth-P/oe+ae)))}q.push({el:j,top:Z,left:Q})}return q};function ca(t){return t===Object(t)&&Object.keys(t).length!==0}function Hl(t,e){e===void 0&&(e="auto");var n="scrollBehavior"in document.body.style;t.forEach(function(r){var a=r.el,i=r.top,o=r.left;a.scroll&&n?a.scroll({top:i,left:o,behavior:e}):(a.scrollTop=i,a.scrollLeft=o)})}function Kl(t){return t===!1?{block:"end",inline:"nearest"}:ca(t)?t:{block:"start",inline:"nearest"}}function Zl(t,e){var n=t.isConnected||t.ownerDocument.documentElement.contains(t);if(ca(e)&&typeof e.behavior=="function")return e.behavior(n?Jn(t,e):[]);if(n){var r=Kl(e);return Hl(Jn(t,r),r.behavior)}}var Yl=Math.min;function Xl(t,e,n){for(var r=Fi,a=t[0].length,i=t.length,o=i,u=Array(i),l=1/0,C=[];o--;){var y=t[o];l=Yl(y.length,l),u[o]=a>=120&&y.length>=120?new Xa(o&&y):void 0}y=t[0];var x=-1,S=u[0];e:for(;++x1),i}),He(t,Zr(t),n),r&&(n=Le(n,ls|ss|fs,us));for(var a=e.length;a--;)os(n,e[a]);return n});function er(t){var e=!1;return t&&t.length&&t.every(function(n){return n.required?(e=!0,!1):!0}),e}function tr(t){return t==null?[]:Array.isArray(t)?t:[t]}function Et(t,e,n){var r=t;e=e.replace(/\[(\w+)\]/g,".$1"),e=e.replace(/^\./,"");for(var a=e.split("."),i=0,o=a.length;i1&&arguments[1]!==void 0?arguments[1]:H({}),n=arguments.length>2?arguments[2]:void 0,r=ot(we(t)),a=pr({}),i=Cr([]),o=function(d){ze(we(t),_(_({},ot(r)),d)),le(function(){Object.keys(a).forEach(function(b){a[b]={autoLink:!1,required:er(we(e)[b])}})})},u=function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],b=arguments.length>1?arguments[1]:void 0;return b.length?d.filter(function(g){var F=tr(g.trigger||"change");return ts(F,b).length}):d},l=null,C=function(d){for(var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g=arguments.length>2?arguments[2]:void 0,F=[],I={},O=function(){var B=d[M],P=Et(we(t),B,g);if(!P.isValid)return"continue";I[B]=P.v;var E=u(we(e)[B],tr(b&&b.trigger));E.length&&F.push(y(B,P.v,E,b||{}).then(function(){return{name:B,errors:[],warnings:[]}}).catch(function(w){var h=[],$=[];return w.forEach(function(N){var V=N.rule.warningOnly,D=N.errors;V?$.push.apply($,ie(D)):h.push.apply(h,ie(D))}),h.length?Promise.reject({name:B,errors:h,warnings:$}):{name:B,errors:h,warnings:$}}))},M=0;M3&&arguments[3]!==void 0?arguments[3]:{},I=ra([d],b,g,_({validateMessages:pt},F),!!F.validateFirst);return a[d]?(a[d].validateStatus="validating",I.catch(function(O){return O}).then(function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(a[d].validateStatus==="validating"){var M,q=O.filter(function(L){return L&&L.errors.length});a[d].validateStatus=q.length?"error":"success",a[d].help=q.length?q.map(function(L){return L.errors}):null,n==null||(M=n.onValidate)===null||M===void 0||M.call(n,d,!q.length,q.length?Nt(a[d].help[0]):null)}}),I):I.catch(function(O){return O})},x=function(d,b){var g=[],F=!0;d?Array.isArray(d)?g=d:g=[d]:(F=!1,g=i.value);var I=C(g,b||{},F);return I.catch(function(O){return O}),I},S=function(d){var b=[];d?Array.isArray(d)?b=d:b=[d]:b=i.value,b.forEach(function(g){a[g]&&ze(a[g],{validateStatus:"",help:null})})},s=function(d){for(var b={autoLink:!1},g=[],F=Array.isArray(d)?d:[d],I=0;I-1}):Object.values(d)},I=function(w){if(!e.model){it(!1,"Form","model is required for resetFields to work.");return}F(w).forEach(function(h){h.resetField()})},O=function(w){F(w).forEach(function(h){h.clearValidate()})},M=function(w){var h=e.scrollToFirstError;if(r("finishFailed",w),h&&w.errorFields.length){var $={};ve(h)==="object"&&($=h),L(w.errorFields[0].name,$)}},q=function(){return B.apply(void 0,arguments)},L=function(w){var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$=F(w?[w]:void 0);if($.length){var N=$[0].fieldId.value,V=N?document.getElementById(N):null;V&&Zl(V,_({scrollMode:"if-needed",block:"nearest"},h))}},j=function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(w===!0){var h=[];return Object.values(d).forEach(function($){var N=$.namePath;h.push(N.value)}),Yn(e.model,h)}else return Yn(e.model,w)},W=function(w,h){if(it(!(w instanceof Function),"Form","validateFields/validateField/validate not support callback, please use promise instead"),!e.model)return it(!1,"Form","model is required for validateFields to work."),Promise.reject("Form `model` is required for validateFields to work.");var $=!!w,N=$?ye(w).map(Dt):[],V=[];Object.values(d).forEach(function(K){var Z;if($||N.push(K.namePath.value),!!((Z=K.rules)!==null&&Z!==void 0&&Z.value.length)){var Q=K.namePath.value;if(!$||ml(N,Q)){var ae=K.validateRules(_({validateMessages:c.value},h));V.push(ae.then(function(){return{name:Q,errors:[],warnings:[]}}).catch(function(re){var oe=[],ge=[];return re.forEach(function(Re){var Ze=Re.rule.warningOnly,Ye=Re.errors;Ze?ge.push.apply(ge,ie(Ye)):oe.push.apply(oe,ie(Ye))}),oe.length?Promise.reject({name:Q,errors:oe,warnings:ge}):{name:Q,errors:oe,warnings:ge}}))}}});var D=fa(V);v.value=D;var U=D.then(function(){return v.value===D?Promise.resolve(j(N)):Promise.reject([])}).catch(function(K){var Z=K.filter(function(Q){return Q&&Q.errors.length});return Promise.reject({values:j(N),errorFields:Z,outOfDate:v.value!==D})});return U.catch(function(K){return K}),U},B=function(){return W.apply(void 0,arguments)},P=function(w){if(w.preventDefault(),w.stopPropagation(),r("submit",w),e.model){var h=W();h.then(function($){r("finish",$)}).catch(function($){M($)})}};return i({resetFields:I,clearValidate:O,validateFields:W,getFieldsValue:j,validate:q,scrollToField:L}),la({model:R(function(){return e.model}),name:R(function(){return e.name}),labelAlign:R(function(){return e.labelAlign}),labelCol:R(function(){return e.labelCol}),labelWrap:R(function(){return e.labelWrap}),wrapperCol:R(function(){return e.wrapperCol}),vertical:R(function(){return e.layout==="vertical"}),colon:m,requiredMark:s,validateTrigger:R(function(){return e.validateTrigger}),rules:R(function(){return e.rules}),addField:b,removeField:g,onValidate:function(w,h,$){r("validate",w,h,$)},validateMessages:c}),de(function(){return e.rules},function(){e.validateOnRuleChange&&W()}),function(){var E;return z("form",_(_({},o),{},{onSubmit:P,class:[A.value,o.class]}),[(E=a.default)===null||E===void 0?void 0:E.call(a)])}}});Ae.useInjectFormItemContext=en;Ae.ItemRest=Rt;Ae.install=function(t){return t.component(Ae.name,Ae),t.component(Ae.Item.name,Ae.Item),t.component(Rt.name,Rt),t};var bt=function(){return{id:String,prefixCls:String,inputPrefixCls:String,defaultValue:X.oneOfType([X.string,X.number]),value:{type:[String,Number,Symbol],default:void 0},placeholder:{type:[String,Number]},autocomplete:String,type:{type:String,default:"text"},name:String,size:{type:String},disabled:{type:Boolean,default:void 0},readonly:{type:Boolean,default:void 0},addonBefore:X.any,addonAfter:X.any,prefix:X.any,suffix:X.any,autofocus:{type:Boolean,default:void 0},allowClear:{type:Boolean,default:void 0},lazy:{type:Boolean,default:!0},maxlength:Number,loading:{type:Boolean,default:void 0},bordered:{type:Boolean,default:void 0},showCount:{type:[Boolean,Object]},htmlSize:Number,onPressEnter:Function,onKeydown:Function,onKeyup:Function,onFocus:Function,onBlur:Function,onChange:Function,onInput:Function,"onUpdate:value":Function,valueModifiers:Object,hidden:Boolean}},da=function(){return _(_({},be(bt(),["prefix","addonBefore","addonAfter","suffix"])),{},{rows:Number,autosize:{type:[Boolean,Object],default:void 0},autoSize:{type:[Boolean,Object],default:void 0},onResize:{type:Function},onCompositionstart:Function,onCompositionend:Function,valueModifiers:Object})};function va(t,e,n,r,a){var i;return J(t,(i={},T(i,"".concat(t,"-sm"),n==="small"),T(i,"".concat(t,"-lg"),n==="large"),T(i,"".concat(t,"-disabled"),r),T(i,"".concat(t,"-rtl"),a==="rtl"),T(i,"".concat(t,"-borderless"),!e),i))}var ke=function(e){return e!=null&&(Array.isArray(e)?Fr(e).length:!0)};function ms(t){return ke(t.prefix)||ke(t.suffix)||ke(t.allowClear)}function Ot(t){return ke(t.addonBefore)||ke(t.addonAfter)}var hs=["text","input"];const ga=te({compatConfig:{MODE:3},name:"ClearableLabeledInput",inheritAttrs:!1,props:{prefixCls:String,inputType:X.oneOf(Ee("text","input")),value:X.any,defaultValue:X.any,allowClear:{type:Boolean,default:void 0},element:X.any,handleReset:Function,disabled:{type:Boolean,default:void 0},direction:{type:String},size:{type:String},suffix:X.any,prefix:X.any,addonBefore:X.any,addonAfter:X.any,readonly:{type:Boolean,default:void 0},focused:{type:Boolean,default:void 0},bordered:{type:Boolean,default:!0},triggerFocus:{type:Function},hidden:Boolean},setup:function(e,n){var r=n.slots,a=n.attrs,i=H(),o=function(s){var m;if((m=i.value)!==null&&m!==void 0&&m.contains(s.target)){var f=e.triggerFocus;f==null||f()}},u=function(s){var m,f=e.allowClear,p=e.value,c=e.disabled,A=e.readonly,v=e.handleReset,d=e.suffix,b=d===void 0?r.suffix:d;if(!f)return null;var g=!c&&!A&&p,F="".concat(s,"-clear-icon");return z(wr,{onClick:v,onMousedown:function(O){return O.preventDefault()},class:J((m={},T(m,"".concat(F,"-hidden"),!g),T(m,"".concat(F,"-has-suffix"),!!b),m),F),role:"button"},null)},l=function(s){var m,f=e.suffix,p=f===void 0?(m=r.suffix)===null||m===void 0?void 0:m.call(r):f,c=e.allowClear;return p||c?z("span",{class:"".concat(s,"-suffix")},[u(s),p]):null},C=function(s,m){var f,p,c,A=e.focused,v=e.value,d=e.prefix,b=d===void 0?(f=r.prefix)===null||f===void 0?void 0:f.call(r):d,g=e.size,F=e.suffix,I=F===void 0?(p=r.suffix)===null||p===void 0?void 0:p.call(r):F,O=e.disabled,M=e.allowClear,q=e.direction,L=e.readonly,j=e.bordered,W=e.hidden,B=e.addonAfter,P=B===void 0?r.addonAfter:B,E=e.addonBefore,w=E===void 0?r.addonBefore:E,h=l(s);if(!ms({prefix:b,suffix:I,allowClear:M}))return Fe(m,{value:v});var $=b?z("span",{class:"".concat(s,"-prefix")},[b]):null,N=J("".concat(s,"-affix-wrapper"),(c={},T(c,"".concat(s,"-affix-wrapper-focused"),A),T(c,"".concat(s,"-affix-wrapper-disabled"),O),T(c,"".concat(s,"-affix-wrapper-sm"),g==="small"),T(c,"".concat(s,"-affix-wrapper-lg"),g==="large"),T(c,"".concat(s,"-affix-wrapper-input-with-clear-btn"),I&&M&&v),T(c,"".concat(s,"-affix-wrapper-rtl"),q==="rtl"),T(c,"".concat(s,"-affix-wrapper-readonly"),L),T(c,"".concat(s,"-affix-wrapper-borderless"),!j),T(c,"".concat(a.class),!Ot({addonAfter:P,addonBefore:w})&&a.class),c));return z("span",{ref:i,class:N,style:a.style,onMouseup:o,hidden:W},[$,Fe(m,{style:null,value:v,class:va(s,j,g,O)}),h])},y=function(s,m){var f,p,c,A=e.addonBefore,v=A===void 0?(f=r.addonBefore)===null||f===void 0?void 0:f.call(r):A,d=e.addonAfter,b=d===void 0?(p=r.addonAfter)===null||p===void 0?void 0:p.call(r):d,g=e.size,F=e.direction,I=e.hidden,O=e.disabled;if(!Ot({addonBefore:v,addonAfter:b}))return m;var M="".concat(s,"-group"),q="".concat(M,"-addon"),L=J(q,T({},"".concat(q,"-disabled"),O)),j=v?z("span",{class:L},[v]):null,W=b?z("span",{class:L},[b]):null,B=J("".concat(s,"-wrapper"),M,T({},"".concat(M,"-rtl"),F==="rtl")),P=J("".concat(s,"-group-wrapper"),(c={},T(c,"".concat(s,"-group-wrapper-sm"),g==="small"),T(c,"".concat(s,"-group-wrapper-lg"),g==="large"),T(c,"".concat(s,"-group-wrapper-rtl"),F==="rtl"),c),a.class);return z("span",{class:P,style:a.style,hidden:I},[z("span",{class:B},[j,Fe(m,{style:null}),W])])},x=function(s,m){var f,p=e.value,c=e.allowClear,A=e.direction,v=e.bordered,d=e.hidden,b=e.addonAfter,g=b===void 0?r.addonAfter:b,F=e.addonBefore,I=F===void 0?r.addonBefore:F;if(!c)return Fe(m,{value:p});var O=J("".concat(s,"-affix-wrapper"),"".concat(s,"-affix-wrapper-textarea-with-clear-btn"),(f={},T(f,"".concat(s,"-affix-wrapper-rtl"),A==="rtl"),T(f,"".concat(s,"-affix-wrapper-borderless"),!v),T(f,"".concat(a.class),!Ot({addonAfter:g,addonBefore:I})&&a.class),f));return z("span",{class:O,style:a.style,hidden:d},[Fe(m,{style:null,value:p}),u(s)])};return function(){var S,s=e.prefixCls,m=e.inputType,f=e.element,p=f===void 0?(S=r.element)===null||S===void 0?void 0:S.call(r):f;return m===hs[0]?x(s,p):y(s,C(s,p))}}});function Kt(t){return typeof t>"u"||t===null?"":String(t)}function De(t,e,n,r){if(n){var a=e;if(e.type==="click"){Object.defineProperty(a,"target",{writable:!0}),Object.defineProperty(a,"currentTarget",{writable:!0});var i=t.cloneNode(!0);a.target=i,a.currentTarget=i,i.value="",n(a);return}if(r!==void 0){Object.defineProperty(a,"target",{writable:!0}),Object.defineProperty(a,"currentTarget",{writable:!0}),a.target=t,a.currentTarget=t,t.value=r,n(a);return}n(a)}}function ma(t,e){if(t){t.focus(e);var n=e||{},r=n.cursor;if(r){var a=t.value.length;switch(r){case"start":t.setSelectionRange(0,0);break;case"end":t.setSelectionRange(a,a);break;default:t.setSelectionRange(0,a)}}}}const ne=te({compatConfig:{MODE:3},name:"AInput",inheritAttrs:!1,props:bt(),setup:function(e,n){var r=n.slots,a=n.attrs,i=n.expose,o=n.emit,u=H(),l=H(),C,y=en(),x=fe("input",e),S=x.direction,s=x.prefixCls,m=x.size,f=x.autocomplete,p=H(e.value===void 0?e.defaultValue:e.value),c=H(!1);de(function(){return e.value},function(){p.value=e.value}),de(function(){return e.disabled},function(){e.value!==void 0&&(p.value=e.value),e.disabled&&(c.value=!1)});var A=function(){C=setTimeout(function(){var w;((w=u.value)===null||w===void 0?void 0:w.getAttribute("type"))==="password"&&u.value.hasAttribute("value")&&u.value.removeAttribute("value")})},v=function(w){ma(u.value,w)},d=function(){var w;(w=u.value)===null||w===void 0||w.blur()},b=function(w,h,$){var N;(N=u.value)===null||N===void 0||N.setSelectionRange(w,h,$)},g=function(){var w;(w=u.value)===null||w===void 0||w.select()};i({focus:v,blur:d,input:u,stateValue:p,setSelectionRange:b,select:g});var F=function(w){var h=e.onFocus;c.value=!0,h==null||h(w),le(function(){A()})},I=function(w){var h=e.onBlur;c.value=!1,h==null||h(w),y.onFieldBlur(),le(function(){A()})},O=function(w){o("update:value",w.target.value),o("change",w),o("input",w),y.onFieldChange()},M=Ue(),q=function(w,h){p.value!==w&&(e.value===void 0?p.value=w:le(function(){u.value.value!==p.value&&M.update()}),le(function(){h&&h()}))},L=function(w){De(u.value,w,O),q("",function(){v()})},j=function(w){var h=w.target,$=h.value,N=h.composing;if(!((w.isComposing||N)&&e.lazy||p.value===$)){var V=w.target.value;De(u.value,w,O),q(V,function(){A()})}},W=function(w){w.keyCode===13&&o("pressEnter",w),o("keydown",w)};Oe(function(){A()}),Ne(function(){clearTimeout(C)});var B=function(){var w,h=e.addonBefore,$=h===void 0?r.addonBefore:h,N=e.addonAfter,V=N===void 0?r.addonAfter:N,D=e.disabled,U=e.bordered,K=U===void 0?!0:U,Z=e.valueModifiers,Q=Z===void 0?{}:Z,ae=e.htmlSize,re=be(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","size","bordered","htmlSize","lazy","showCount","valueModifiers"]),oe=_(_(_({},re),a),{},{autocomplete:f.value,onChange:j,onInput:j,onFocus:F,onBlur:I,onKeydown:W,class:J(va(s.value,K,m.value,D,S.value),T({},a.class,a.class&&!$&&!V)),ref:u,key:"ant-input",size:ae,id:(w=re.id)!==null&&w!==void 0?w:y.id.value});Q.lazy&&delete oe.onInput,oe.autofocus||delete oe.autofocus;var ge=z("input",be(oe,["size"]),null);return Ar(ge,[[zr]])},P=function(){var w,h=p.value,$=e.maxlength,N=e.suffix,V=N===void 0?(w=r.suffix)===null||w===void 0?void 0:w.call(r):N,D=e.showCount,U=Number($)>0;if(V||D){var K=ie(Kt(h)).length,Z=null;return ve(D)==="object"?Z=D.formatter({count:K,maxlength:$}):Z="".concat(K).concat(U?" / ".concat($):""),z(We,null,[!!D&&z("span",{class:J("".concat(s.value,"-show-count-suffix"),T({},"".concat(s.value,"-show-count-has-suffix"),!!V))},[Z]),V])}return null};return function(){var E=_(_(_({},a),e),{},{prefixCls:s.value,inputType:"input",value:Kt(p.value),handleReset:L,focused:c.value&&!e.disabled});return z(ga,_(_({},be(E,["element","valueModifiers","suffix","showCount"])),{},{ref:l}),_(_({},r),{},{element:B,suffix:P}))}}}),ps=te({compatConfig:{MODE:3},name:"AInputGroup",props:{prefixCls:String,size:{type:String},compact:{type:Boolean,default:void 0},onMouseenter:{type:Function},onMouseleave:{type:Function},onFocus:{type:Function},onBlur:{type:Function}},setup:function(e,n){var r=n.slots,a=fe("input-group",e),i=a.prefixCls,o=a.direction,u=R(function(){var l,C=i.value;return l={},T(l,"".concat(C),!0),T(l,"".concat(C,"-lg"),e.size==="large"),T(l,"".concat(C,"-sm"),e.size==="small"),T(l,"".concat(C,"-compact"),e.compact),T(l,"".concat(C,"-rtl"),o.value==="rtl"),l});return function(){var l;return z("span",{class:u.value,onMouseenter:e.onMouseenter,onMouseleave:e.onMouseleave,onFocus:e.onFocus,onBlur:e.onBlur},[(l=r.default)===null||l===void 0?void 0:l.call(r)])}}});var Pt=/iPhone/i,nr=/iPod/i,rr=/iPad/i,Tt=/\bAndroid(?:.+)Mobile\b/i,ar=/Android/i,_e=/\bAndroid(?:.+)SD4930UR\b/i,at=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,me=/Windows Phone/i,ir=/\bWindows(?:.+)ARM\b/i,or=/BlackBerry/i,ur=/BB10/i,lr=/Opera Mini/i,sr=/\b(CriOS|Chrome)(?:.+)Mobile/i,fr=/Mobile(?:.+)Firefox\b/i;function k(t,e){return t.test(e)}function cr(t){var e=t||(typeof navigator<"u"?navigator.userAgent:""),n=e.split("[FBAN");if(typeof n[1]<"u"){var r=n,a=jt(r,1);e=a[0]}if(n=e.split("Twitter"),typeof n[1]<"u"){var i=n,o=jt(i,1);e=o[0]}var u={apple:{phone:k(Pt,e)&&!k(me,e),ipod:k(nr,e),tablet:!k(Pt,e)&&k(rr,e)&&!k(me,e),device:(k(Pt,e)||k(nr,e)||k(rr,e))&&!k(me,e)},amazon:{phone:k(_e,e),tablet:!k(_e,e)&&k(at,e),device:k(_e,e)||k(at,e)},android:{phone:!k(me,e)&&k(_e,e)||!k(me,e)&&k(Tt,e),tablet:!k(me,e)&&!k(_e,e)&&!k(Tt,e)&&(k(at,e)||k(ar,e)),device:!k(me,e)&&(k(_e,e)||k(at,e)||k(Tt,e)||k(ar,e))||k(/\bokhttp\b/i,e)},windows:{phone:k(me,e),tablet:k(ir,e),device:k(me,e)||k(ir,e)},other:{blackberry:k(or,e),blackberry10:k(ur,e),opera:k(lr,e),firefox:k(fr,e),chrome:k(sr,e),device:k(or,e)||k(ur,e)||k(lr,e)||k(fr,e)||k(sr,e)},any:null,phone:null,tablet:null};return u.any=u.apple.device||u.android.device||u.windows.device||u.other.device,u.phone=u.apple.phone||u.android.phone||u.windows.phone,u.tablet=u.apple.tablet||u.android.tablet||u.windows.tablet,u}var bs=_(_({},cr()),{},{isMobile:cr}),ys=["disabled","loading","addonAfter","suffix"];const xs=te({compatConfig:{MODE:3},name:"AInputSearch",inheritAttrs:!1,props:_(_({},bt()),{},{inputPrefixCls:String,enterButton:X.any,onSearch:{type:Function}}),setup:function(e,n){var r=n.slots,a=n.attrs,i=n.expose,o=n.emit,u=H(),l=function(){var d;(d=u.value)===null||d===void 0||d.focus()},C=function(){var d;(d=u.value)===null||d===void 0||d.blur()};i({focus:l,blur:C});var y=function(d){o("update:value",d.target.value),d&&d.target&&d.type==="click"&&o("search",d.target.value,d),o("change",d)},x=function(d){var b;document.activeElement===((b=u.value)===null||b===void 0?void 0:b.input)&&d.preventDefault()},S=function(d){var b;o("search",(b=u.value)===null||b===void 0?void 0:b.stateValue,d),bs.tablet||u.value.focus()},s=fe("input-search",e),m=s.prefixCls,f=s.getPrefixCls,p=s.direction,c=s.size,A=R(function(){return f("input",e.inputPrefixCls)});return function(){var v,d,b,g,F,I=e.disabled,O=e.loading,M=e.addonAfter,q=M===void 0?(v=r.addonAfter)===null||v===void 0?void 0:v.call(r):M,L=e.suffix,j=L===void 0?(d=r.suffix)===null||d===void 0?void 0:d.call(r):L,W=Sr(e,ys),B=e.enterButton,P=B===void 0?(b=(g=r.enterButton)===null||g===void 0?void 0:g.call(r))!==null&&b!==void 0?b:!1:B;P=P||P==="";var E=typeof P=="boolean"?z(nn,null,null):null,w="".concat(m.value,"-button"),h=Array.isArray(P)?P[0]:P,$,N=h.type&&Rr(h.type)&&h.type.__ANT_BUTTON;if(N||h.tagName==="button")$=Fe(h,_({onMousedown:x,onClick:S,key:"enterButton"},N?{class:w,size:c.value}:{}),!1);else{var V=E&&!P;$=z(qe,{class:w,type:P?"primary":void 0,size:c.value,disabled:I,key:"enterButton",onMousedown:x,onClick:S,loading:O,icon:V?E:null},{default:function(){return[V?null:E||P]}})}q&&($=[$,q]);var D=J(m.value,(F={},T(F,"".concat(m.value,"-rtl"),p.value==="rtl"),T(F,"".concat(m.value,"-").concat(c.value),!!c.value),T(F,"".concat(m.value,"-with-button"),!!P),F),a.class);return z(ne,_(_(_({ref:u},be(W,["onUpdate:value","onSearch","enterButton"])),a),{},{onPressEnter:S,size:c.value,prefixCls:A.value,addonAfter:$,suffix:j,onChange:y,class:D,disabled:I}),r)}}});var ws=` min-height:0 !important; max-height:none !important; height:0 !important; @@ -22,4 +22,4 @@ import{i as ft,b as pa,f as It,c as Be,d as _,e as ba,g as ya,h as xa,j as wa,I z-index:-1000 !important; top:0 !important; right:0 !important -`,Cs=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],_t={},ce;function Fs(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=t.getAttribute("id")||t.getAttribute("data-reactid")||t.getAttribute("name");if(e&&_t[n])return _t[n];var r=window.getComputedStyle(t),a=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),i=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),o=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),u=Cs.map(function(C){return"".concat(C,":").concat(r.getPropertyValue(C))}).join(";"),l={sizingStyle:u,paddingSize:i,borderSize:o,boxSizing:a};return e&&n&&(_t[n]=l),l}function As(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ce||(ce=document.createElement("textarea"),ce.setAttribute("tab-index","-1"),ce.setAttribute("aria-hidden","true"),document.body.appendChild(ce)),t.getAttribute("wrap")?ce.setAttribute("wrap",t.getAttribute("wrap")):ce.removeAttribute("wrap");var a=Fs(t,e),i=a.paddingSize,o=a.borderSize,u=a.boxSizing,l=a.sizingStyle;ce.setAttribute("style","".concat(l,";").concat(ws)),ce.value=t.value||t.placeholder||"";var C=Number.MIN_SAFE_INTEGER,y=Number.MAX_SAFE_INTEGER,x=ce.scrollHeight,S;if(u==="border-box"?x+=o:u==="content-box"&&(x-=i),n!==null||r!==null){ce.value=" ";var s=ce.scrollHeight-i;n!==null&&(C=s*n,u==="border-box"&&(C=C+i+o),x=Math.max(C,x)),r!==null&&(y=s*r,u==="border-box"&&(y=y+i+o),S=x>y?"":"hidden",x=Math.min(y,x))}return{height:"".concat(x,"px"),minHeight:"".concat(C,"px"),maxHeight:"".concat(y,"px"),overflowY:S,resize:"none"}}var $t=0,dr=1,Ss=2,Es=te({compatConfig:{MODE:3},name:"ResizableTextArea",inheritAttrs:!1,props:da(),setup:function(e,n){var r=n.attrs,a=n.emit,i=n.expose,o,u,l=H(),C=H({}),y=H($t);Ne(function(){he.cancel(o),he.cancel(u)});var x=function(){try{if(document.activeElement===l.value){var A=l.value.selectionStart,v=l.value.selectionEnd;l.value.setSelectionRange(A,v)}}catch{}},S=function(){var A=e.autoSize||e.autosize;if(!(!A||!l.value)){var v=A.minRows,d=A.maxRows;C.value=As(l.value,!1,v,d),y.value=dr,he.cancel(u),u=he(function(){y.value=Ss,u=he(function(){y.value=$t,x()})})}},s=function(){he.cancel(o),o=he(S)},m=function(A){if(y.value===$t){a("resize",A);var v=e.autoSize||e.autosize;v&&s()}};it(e.autosize===void 0,"Input.TextArea","autosize is deprecated, please use autoSize instead.");var f=function(){var A=e.prefixCls,v=e.autoSize,d=e.autosize,b=e.disabled,g=be(e,["prefixCls","onPressEnter","autoSize","autosize","defaultValue","allowClear","type","lazy","maxlength","valueModifiers"]),F=J(A,r.class,T({},"".concat(A,"-disabled"),b)),I=[r.style,C.value,y.value===dr?{overflowX:"hidden",overflowY:"hidden"}:null],O=_(_(_({},g),r),{},{style:I,class:F});return O.autofocus||delete O.autofocus,O.rows===0&&delete O.rows,B(ii,{onResize:m,disabled:!(v||d)},{default:function(){return[jr(B("textarea",_(_({},O),{},{ref:l}),null),[[Br]])]}})};de(function(){return e.value},function(){le(function(){S()})}),Pe(function(){le(function(){S()})});var p=Ue();return i({resizeTextarea:S,textArea:l,instance:p}),function(){return f()}}});function ha(t,e){return ie(t||"").slice(0,e).join("")}function vr(t,e,n,r){var a=n;return t?a=ha(n,r):ie(e||"").lengthr&&(a=e),a}const Os=te({compatConfig:{MODE:3},name:"ATextarea",inheritAttrs:!1,props:da(),setup:function(e,n){var r=n.attrs,a=n.expose,i=n.emit,o=Jt(),u=H(e.value===void 0?e.defaultValue:e.value),l=H(),C=H(""),y=fe("input",e),x=y.prefixCls,S=y.size,s=y.direction,m=R(function(){return e.showCount===""||e.showCount||!1}),f=R(function(){return Number(e.maxlength)>0}),p=H(!1),c=H(),A=H(0),v=function(P){p.value=!0,c.value=C.value,A.value=P.currentTarget.selectionStart,i("compositionstart",P)},d=function(P){p.value=!1;var E=P.currentTarget.value;if(f.value){var w,h=A.value>=e.maxlength+1||A.value===((w=c.value)===null||w===void 0?void 0:w.length);E=vr(h,c.value,E,e.maxlength)}E!==C.value&&(I(E),De(P.currentTarget,P,q,E)),i("compositionend",P)},b=Ue();de(function(){return e.value},function(){"value"in b.vnode.props;var z;u.value=(z=e.value)!==null&&z!==void 0?z:""});var g=function(P){var E;ma((E=l.value)===null||E===void 0?void 0:E.textArea,P)},F=function(){var P,E;(P=l.value)===null||P===void 0||(E=P.textArea)===null||E===void 0||E.blur()},I=function(P,E){u.value!==P&&(e.value===void 0?u.value=P:le(function(){if(l.value.textArea.value!==C.value){var w,h,$;(w=l.value)===null||w===void 0||(h=($=w.instance).update)===null||h===void 0||h.call($)}}),le(function(){E&&E()}))},O=function(P){P.keyCode===13&&i("pressEnter",P),i("keydown",P)},M=function(P){var E=e.onBlur;E==null||E(P),o.onFieldBlur()},q=function(P){i("update:value",P.target.value),i("change",P),i("input",P),o.onFieldChange()},L=function(P){De(l.value.textArea,P,q),I("",function(){g()})},j=function(P){var E=P.target.composing,w=P.target.value;if(p.value=!!(P.isComposing||E),!(p.value&&e.lazy||u.value===w)){if(f.value){var h=P.target,$=h.selectionStart>=e.maxlength+1||h.selectionStart===w.length||!h.selectionStart;w=vr($,C.value,w,e.maxlength)}De(P.currentTarget,P,q,w),I(w)}},W=function(){var P,E,w,h=r.style,$=r.class,N=e.bordered,V=N===void 0?!0:N,D=_(_(_({},be(e,["allowClear"])),r),{},{style:m.value?{}:h,class:(P={},T(P,"".concat(x.value,"-borderless"),!V),T(P,"".concat($),$&&!m.value),T(P,"".concat(x.value,"-sm"),S.value==="small"),T(P,"".concat(x.value,"-lg"),S.value==="large"),P),showCount:null,prefixCls:x.value,onInput:j,onChange:j,onBlur:M,onKeydown:O,onCompositionstart:v,onCompositionend:d});return(E=e.valueModifiers)!==null&&E!==void 0&&E.lazy&&delete D.onInput,B(Es,_(_({},D),{},{id:(w=D.id)!==null&&w!==void 0?w:o.id.value,ref:l,maxlength:e.maxlength}),null)};return a({focus:g,blur:F,resizableTextArea:l}),mt(function(){var z=Kt(u.value);!p.value&&f.value&&(e.value===null||e.value===void 0)&&(z=ha(z,e.maxlength)),C.value=z}),function(){var z=e.maxlength,P=e.bordered,E=P===void 0?!0:P,w=e.hidden,h=r.style,$=r.class,N=_(_(_({},e),r),{},{prefixCls:x.value,inputType:"text",handleReset:L,direction:s.value,bordered:E,style:m.value?void 0:h}),V=B(ga,_(_({},N),{},{value:C.value}),{element:W});if(m.value){var D=ie(C.value).length,U="";ve(m.value)==="object"?U=m.value.formatter({count:D,maxlength:z}):U="".concat(D).concat(f.value?" / ".concat(z):""),V=B("div",{hidden:w,class:J("".concat(x.value,"-textarea"),T({},"".concat(x.value,"-textarea-rtl"),s.value==="rtl"),"".concat(x.value,"-textarea-show-count"),$),style:h,"data-count":ve(U)!=="object"?U:void 0},[V])}return V}}});var Ps={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};function gr(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:!1,n=t.getAttribute("id")||t.getAttribute("data-reactid")||t.getAttribute("name");if(e&&_t[n])return _t[n];var r=window.getComputedStyle(t),a=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),i=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),o=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),u=Cs.map(function(C){return"".concat(C,":").concat(r.getPropertyValue(C))}).join(";"),l={sizingStyle:u,paddingSize:i,borderSize:o,boxSizing:a};return e&&n&&(_t[n]=l),l}function As(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;ce||(ce=document.createElement("textarea"),ce.setAttribute("tab-index","-1"),ce.setAttribute("aria-hidden","true"),document.body.appendChild(ce)),t.getAttribute("wrap")?ce.setAttribute("wrap",t.getAttribute("wrap")):ce.removeAttribute("wrap");var a=Fs(t,e),i=a.paddingSize,o=a.borderSize,u=a.boxSizing,l=a.sizingStyle;ce.setAttribute("style","".concat(l,";").concat(ws)),ce.value=t.value||t.placeholder||"";var C=Number.MIN_SAFE_INTEGER,y=Number.MAX_SAFE_INTEGER,x=ce.scrollHeight,S;if(u==="border-box"?x+=o:u==="content-box"&&(x-=i),n!==null||r!==null){ce.value=" ";var s=ce.scrollHeight-i;n!==null&&(C=s*n,u==="border-box"&&(C=C+i+o),x=Math.max(C,x)),r!==null&&(y=s*r,u==="border-box"&&(y=y+i+o),S=x>y?"":"hidden",x=Math.min(y,x))}return{height:"".concat(x,"px"),minHeight:"".concat(C,"px"),maxHeight:"".concat(y,"px"),overflowY:S,resize:"none"}}var $t=0,dr=1,Ss=2,Es=te({compatConfig:{MODE:3},name:"ResizableTextArea",inheritAttrs:!1,props:da(),setup:function(e,n){var r=n.attrs,a=n.emit,i=n.expose,o,u,l=H(),C=H({}),y=H($t);Ne(function(){he.cancel(o),he.cancel(u)});var x=function(){try{if(document.activeElement===l.value){var A=l.value.selectionStart,v=l.value.selectionEnd;l.value.setSelectionRange(A,v)}}catch{}},S=function(){var A=e.autoSize||e.autosize;if(!(!A||!l.value)){var v=A.minRows,d=A.maxRows;C.value=As(l.value,!1,v,d),y.value=dr,he.cancel(u),u=he(function(){y.value=Ss,u=he(function(){y.value=$t,x()})})}},s=function(){he.cancel(o),o=he(S)},m=function(A){if(y.value===$t){a("resize",A);var v=e.autoSize||e.autosize;v&&s()}};it(e.autosize===void 0,"Input.TextArea","autosize is deprecated, please use autoSize instead.");var f=function(){var A=e.prefixCls,v=e.autoSize,d=e.autosize,b=e.disabled,g=be(e,["prefixCls","onPressEnter","autoSize","autosize","defaultValue","allowClear","type","lazy","maxlength","valueModifiers"]),F=J(A,r.class,T({},"".concat(A,"-disabled"),b)),I=[r.style,C.value,y.value===dr?{overflowX:"hidden",overflowY:"hidden"}:null],O=_(_(_({},g),r),{},{style:I,class:F});return O.autofocus||delete O.autofocus,O.rows===0&&delete O.rows,z(ii,{onResize:m,disabled:!(v||d)},{default:function(){return[Ar(z("textarea",_(_({},O),{},{ref:l}),null),[[zr]])]}})};de(function(){return e.value},function(){le(function(){S()})}),Oe(function(){le(function(){S()})});var p=Ue();return i({resizeTextarea:S,textArea:l,instance:p}),function(){return f()}}});function ha(t,e){return ie(t||"").slice(0,e).join("")}function vr(t,e,n,r){var a=n;return t?a=ha(n,r):ie(e||"").lengthr&&(a=e),a}const Os=te({compatConfig:{MODE:3},name:"ATextarea",inheritAttrs:!1,props:da(),setup:function(e,n){var r=n.attrs,a=n.expose,i=n.emit,o=en(),u=H(e.value===void 0?e.defaultValue:e.value),l=H(),C=H(""),y=fe("input",e),x=y.prefixCls,S=y.size,s=y.direction,m=R(function(){return e.showCount===""||e.showCount||!1}),f=R(function(){return Number(e.maxlength)>0}),p=H(!1),c=H(),A=H(0),v=function(P){p.value=!0,c.value=C.value,A.value=P.currentTarget.selectionStart,i("compositionstart",P)},d=function(P){p.value=!1;var E=P.currentTarget.value;if(f.value){var w,h=A.value>=e.maxlength+1||A.value===((w=c.value)===null||w===void 0?void 0:w.length);E=vr(h,c.value,E,e.maxlength)}E!==C.value&&(I(E),De(P.currentTarget,P,q,E)),i("compositionend",P)},b=Ue();de(function(){return e.value},function(){"value"in b.vnode.props;var B;u.value=(B=e.value)!==null&&B!==void 0?B:""});var g=function(P){var E;ma((E=l.value)===null||E===void 0?void 0:E.textArea,P)},F=function(){var P,E;(P=l.value)===null||P===void 0||(E=P.textArea)===null||E===void 0||E.blur()},I=function(P,E){u.value!==P&&(e.value===void 0?u.value=P:le(function(){if(l.value.textArea.value!==C.value){var w,h,$;(w=l.value)===null||w===void 0||(h=($=w.instance).update)===null||h===void 0||h.call($)}}),le(function(){E&&E()}))},O=function(P){P.keyCode===13&&i("pressEnter",P),i("keydown",P)},M=function(P){var E=e.onBlur;E==null||E(P),o.onFieldBlur()},q=function(P){i("update:value",P.target.value),i("change",P),i("input",P),o.onFieldChange()},L=function(P){De(l.value.textArea,P,q),I("",function(){g()})},j=function(P){var E=P.target.composing,w=P.target.value;if(p.value=!!(P.isComposing||E),!(p.value&&e.lazy||u.value===w)){if(f.value){var h=P.target,$=h.selectionStart>=e.maxlength+1||h.selectionStart===w.length||!h.selectionStart;w=vr($,C.value,w,e.maxlength)}De(P.currentTarget,P,q,w),I(w)}},W=function(){var P,E,w,h=r.style,$=r.class,N=e.bordered,V=N===void 0?!0:N,D=_(_(_({},be(e,["allowClear"])),r),{},{style:m.value?{}:h,class:(P={},T(P,"".concat(x.value,"-borderless"),!V),T(P,"".concat($),$&&!m.value),T(P,"".concat(x.value,"-sm"),S.value==="small"),T(P,"".concat(x.value,"-lg"),S.value==="large"),P),showCount:null,prefixCls:x.value,onInput:j,onChange:j,onBlur:M,onKeydown:O,onCompositionstart:v,onCompositionend:d});return(E=e.valueModifiers)!==null&&E!==void 0&&E.lazy&&delete D.onInput,z(Es,_(_({},D),{},{id:(w=D.id)!==null&&w!==void 0?w:o.id.value,ref:l,maxlength:e.maxlength}),null)};return a({focus:g,blur:F,resizableTextArea:l}),dt(function(){var B=Kt(u.value);!p.value&&f.value&&(e.value===null||e.value===void 0)&&(B=ha(B,e.maxlength)),C.value=B}),function(){var B=e.maxlength,P=e.bordered,E=P===void 0?!0:P,w=e.hidden,h=r.style,$=r.class,N=_(_(_({},e),r),{},{prefixCls:x.value,inputType:"text",handleReset:L,direction:s.value,bordered:E,style:m.value?void 0:h}),V=z(ga,_(_({},N),{},{value:C.value}),{element:W});if(m.value){var D=ie(C.value).length,U="";ve(m.value)==="object"?U=m.value.formatter({count:D,maxlength:B}):U="".concat(D).concat(f.value?" / ".concat(B):""),V=z("div",{hidden:w,class:J("".concat(x.value,"-textarea"),T({},"".concat(x.value,"-textarea-rtl"),s.value==="rtl"),"".concat(x.value,"-textarea-show-count"),$),style:h,"data-count":ve(U)!=="object"?U:void 0},[V])}return V}}});var Ps={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};function gr(t){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:{inTriggerContext:!0};Ve(Fe,{inTriggerContext:n.inTriggerContext,shouldRender:K(function(){var a=e||{},o=a.sPopupVisible,i=a.popupRef,h=a.forceRender,y=a.autoDestroy,r=!1;return(o||i||h)&&(r=!0),!o&&y&&(r=!1),r})})},ut=function(){ct({},{inTriggerContext:!1});var e=be(Fe,{shouldRender:K(function(){return!1}),inTriggerContext:!1});return{shouldRender:K(function(){return e.shouldRender.value||e.inTriggerContext===!1})}};const dt=oe({compatConfig:{MODE:3},name:"Portal",inheritAttrs:!1,props:{getContainer:g.func.isRequired,didUpdate:Function},setup:function(e,n){var a=n.slots,o=!0,i,h=ut(),y=h.shouldRender;ot(function(){o=!1,y.value&&(i=e.getContainer())});var r=q(y,function(){y.value&&!i&&(i=e.getContainer()),i&&r()});return He(function(){ee(function(){if(y.value){var l;(l=e.didUpdate)===null||l===void 0||l.call(e,e)}})}),Ie(function(){i&&i.parentNode&&i.parentNode.removeChild(i)}),function(){if(!y.value)return null;if(o){var l;return(l=a.default)===null||l===void 0?void 0:l.call(a)}return i?k(rt,{to:i},a):null}}});var ft={ESC:27,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40},me;function ke(u){if(typeof document>"u")return 0;if(u||me===void 0){var e=document.createElement("div");e.style.width="100%",e.style.height="200px";var n=document.createElement("div"),a=n.style;a.position="absolute",a.top="0",a.left="0",a.pointerEvents="none",a.visibility="hidden",a.width="200px",a.height="150px",a.overflow="hidden",n.appendChild(e),document.body.appendChild(n);var o=e.offsetWidth;n.style.overflow="scroll";var i=e.offsetWidth;o===i&&(i=n.clientWidth),document.body.removeChild(n),me=o-i}return me}var ze=function(){return{prefixCls:String,width:g.oneOfType([g.string,g.number]),height:g.oneOfType([g.string,g.number]),style:{type:Object,default:void 0},class:String,placement:{type:String},wrapperClassName:String,level:{type:[String,Array]},levelMove:{type:[Number,Function,Array]},duration:String,ease:String,showMask:{type:Boolean,default:void 0},maskClosable:{type:Boolean,default:void 0},maskStyle:{type:Object,default:void 0},afterVisibleChange:Function,keyboard:{type:Boolean,default:void 0},contentWrapperStyle:{type:Object,default:void 0},autofocus:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0}}},vt=function(){return S(S({},ze()),{},{forceRender:{type:Boolean,default:void 0},getContainer:g.oneOfType([g.string,g.func,g.object,g.looseBool])})},mt=function(){return S(S({},ze()),{},{getContainer:Function,getOpenCount:Function,scrollLocker:g.any,switchScrollingEffect:Function})};function ht(u){return Array.isArray(u)?u:[u]}var Ke={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},yt=Object.keys(Ke).filter(function(u){if(typeof document>"u")return!1;var e=document.getElementsByTagName("html")[0];return u in(e?e.style:{})})[0],xe=Ke[yt];function Oe(u,e,n,a){u.addEventListener?u.addEventListener(e,n,a):u.attachEvent&&u.attachEvent("on".concat(e),n)}function De(u,e,n,a){u.removeEventListener?u.removeEventListener(e,n,a):u.attachEvent&&u.detachEvent("on".concat(e),n)}function gt(u,e){var n=typeof u=="function"?u(e):u;return Array.isArray(n)?n.length===2?n:[n[0],n[1]]:[n]}var Me=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},he=!(typeof window<"u"&&window.document&&window.document.createElement),Ct=function u(e,n,a,o){if(!n||n===document||n instanceof Document)return!1;if(n===e.parentNode)return!0;var i=Math.max(Math.abs(a),Math.abs(o))===Math.abs(o),h=Math.max(Math.abs(a),Math.abs(o))===Math.abs(a),y=n.scrollHeight-n.clientHeight,r=n.scrollWidth-n.clientWidth,l=document.defaultView.getComputedStyle(n),N=l.overflowY==="auto"||l.overflowY==="scroll",D=l.overflowX==="auto"||l.overflowX==="scroll",L=y&&N,R=r&&D;return i&&(!L||L&&(n.scrollTop>=y&&o<0||n.scrollTop<=0&&o>0))||h&&(!R||R&&(n.scrollLeft>=r&&a<0||n.scrollLeft<=0&&a>0))?u(e,n.parentNode,a,o):!1},wt=["width","height","open","prefixCls","placement","level","levelMove","ease","duration","getContainer","onChange","afterVisibleChange","showMask","maskClosable","maskStyle","keyboard","getOpenCount","scrollLocker","contentWrapperStyle","style","class"],ne={},Le=oe({compatConfig:{MODE:3},inheritAttrs:!1,props:mt(),emits:["close","handleClick","change"],setup:function(e,n){var a=n.emit,o=n.slots,i=lt({startPos:{x:null,y:null}}),h,y=j(),r=j(),l=j(),N=j(),D=j(),L=[],R="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(Math.random()*9).toString())).toString(16)),E=!he&&$e?{passive:!1}:!1;pe(function(){ee(function(){var s=e.open,t=e.getContainer,c=e.showMask,v=e.autofocus,m=t==null?void 0:t();if(O(e),s&&(m&&m.parentNode===document.body&&(ne[R]=s),Z(),ee(function(){v&&b()}),c)){var w;(w=e.scrollLocker)===null||w===void 0||w.lock()}})}),q(function(){return e.level},function(){O(e)},{flush:"post"}),q(function(){return e.open},function(){var s=e.open,t=e.getContainer,c=e.scrollLocker,v=e.showMask,m=e.autofocus,w=t==null?void 0:t();w&&w.parentNode===document.body&&(ne[R]=!!s),Z(),s?(m&&b(),v&&(c==null||c.lock())):c==null||c.unLock()},{flush:"post"}),We(function(){var s,t=e.open;delete ne[R],t&&(re(!1),document.body.style.touchAction=""),(s=e.scrollLocker)===null||s===void 0||s.unLock()}),q(function(){return e.placement},function(s){s&&(D.value=null)});var b=function(){var t,c;(t=r.value)===null||t===void 0||(c=t.focus)===null||c===void 0||c.call(t)},T=function(t){t.touches.length>1||(i.startPos={x:t.touches[0].clientX,y:t.touches[0].clientY})},A=function(t){if(!(t.changedTouches.length>1)){var c=t.currentTarget,v=t.changedTouches[0].clientX-i.startPos.x,m=t.changedTouches[0].clientY-i.startPos.y;(c===l.value||c===N.value||c===D.value&&Ct(c,t.target,v,m))&&t.cancelable&&t.preventDefault()}},I=function s(t){var c=t.target;De(c,xe,s),c.style.transition=""},_=function(t){a("close",t)},X=function(t){t.keyCode===ft.ESC&&(t.stopPropagation(),_(t))},G=function(t){var c=e.open,v=e.afterVisibleChange;t.target===y.value&&t.propertyName.match(/transform$/)&&(r.value.style.transition="",!c&&x()&&(document.body.style.overflowX="",l.value&&(l.value.style.left="",l.value.style.width="")),v&&v(!!c))},z=K(function(){var s=e.placement,t=s==="left"||s==="right",c="translate".concat(t?"X":"Y");return{isHorizontal:t,placementName:c}}),Z=function(){var t=e.open,c=e.width,v=e.height,m=z.value,w=m.isHorizontal,p=m.placementName,P=D.value?D.value.getBoundingClientRect()[w?"width":"height"]:0,B=(w?c:v)||P;ue(t,p,B)},re=function(t,c,v,m){var w=e.placement,p=e.levelMove,P=e.duration,B=e.ease,$=e.showMask;L.forEach(function(Q){Q.style.transition="transform ".concat(P," ").concat(B),Oe(Q,xe,I);var U=t?v:0;if(p){var le=gt(p,{target:Q,open:t});U=t?le[0]:le[1]||0}var ie=typeof U=="number"?"".concat(U,"px"):U,Y=w==="left"||w==="top"?ie:"-".concat(ie);Y=$&&w==="right"&&m?"calc(".concat(Y," + ").concat(m,"px)"):Y,Q.style.transform=U?"".concat(c,"(").concat(Y,")"):""})},ue=function(t,c,v){if(!he){var m=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?ke(!0):0;re(t,c,v,m),C(m)}a("change",t)},C=function(t){var c=e.getContainer,v=e.showMask,m=e.open,w=c==null?void 0:c();if(w&&w.parentNode===document.body&&v){var p=["touchstart"],P=[document.body,l.value,N.value,D.value];m&&document.body.style.overflow!=="hidden"?(t&&d(t),document.body.style.touchAction="none",P.forEach(function(B,$){B&&Oe(B,p[$]||"touchmove",$?A:T,E)})):x()&&(document.body.style.touchAction="",t&&f(t),P.forEach(function(B,$){B&&De(B,p[$]||"touchmove",$?A:T,E)}))}},d=function(t){var c=e.placement,v=e.duration,m=e.ease,w="width ".concat(v," ").concat(m),p="transform ".concat(v," ").concat(m);switch(r.value.style.transition="none",c){case"right":r.value.style.transform="translateX(-".concat(t,"px)");break;case"top":case"bottom":r.value.style.width="calc(100% - ".concat(t,"px)"),r.value.style.transform="translateZ(0)";break}clearTimeout(h),h=setTimeout(function(){r.value&&(r.value.style.transition="".concat(p,",").concat(w),r.value.style.width="",r.value.style.transform="")})},f=function(t){var c=e.placement,v=e.duration,m=e.ease;r.value.style.transition="none";var w,p="width ".concat(v," ").concat(m),P="transform ".concat(v," ").concat(m);switch(c){case"left":{r.value.style.width="100%",p="width 0s ".concat(m," ").concat(v);break}case"right":{r.value.style.transform="translateX(".concat(t,"px)"),r.value.style.width="100%",p="width 0s ".concat(m," ").concat(v),l.value&&(l.value.style.left="-".concat(t,"px"),l.value.style.width="calc(100% + ".concat(t,"px)"));break}case"top":case"bottom":{r.value.style.width="calc(100% + ".concat(t,"px)"),r.value.style.height="100%",r.value.style.transform="translateZ(0)",w="height 0s ".concat(m," ").concat(v);break}}clearTimeout(h),h=setTimeout(function(){r.value&&(r.value.style.transition="".concat(P,",").concat(w?"".concat(w,","):"").concat(p),r.value.style.transform="",r.value.style.width="",r.value.style.height="")})},x=function(){return!Object.keys(ne).some(function(t){return ne[t]})},O=function(t){var c=t.level,v=t.getContainer;if(!he){var m=v==null?void 0:v(),w=m?m.parentNode:null;if(L=[],c==="all"){var p=w?Array.prototype.slice.call(w.children):[];p.forEach(function(P){P.nodeName!=="SCRIPT"&&P.nodeName!=="STYLE"&&P.nodeName!=="LINK"&&P!==m&&L.push(P)})}else c&&ht(c).forEach(function(P){document.querySelectorAll(P).forEach(function(B){L.push(B)})})}},M=function(t){a("handleClick",t)},W=j(!1);return q(r,function(){ee(function(){W.value=!0})}),function(){var s,t,c,v=e.width,m=e.height,w=e.open,p=e.prefixCls,P=e.placement;e.level,e.levelMove,e.ease,e.duration,e.getContainer,e.onChange,e.afterVisibleChange;var B=e.showMask,$=e.maskClosable,Q=e.maskStyle,U=e.keyboard;e.getOpenCount,e.scrollLocker;var le=e.contentWrapperStyle,ie=e.style,Y=e.class,Ue=ce(e,wt),de=w&&W.value,Ye=we(p,(s={},H(s,"".concat(p,"-").concat(P),!0),H(s,"".concat(p,"-open"),de),H(s,Y,!!Y),H(s,"no-mask",!B),s)),qe=z.value.placementName,Ge=P==="left"||P==="top"?"-100%":"100%",Se=de?"":"".concat(qe,"(").concat(Ge,")");return k("div",S(S({},je(Ue,["switchScrollingEffect","autofocus"])),{},{tabindex:-1,class:Ye,style:ie,ref:r,onKeydown:de&&U?X:void 0,onTransitionend:G}),[B&&k("div",{class:"".concat(p,"-mask"),onClick:$?_:void 0,style:Q,ref:l},null),k("div",{class:"".concat(p,"-content-wrapper"),style:S({transform:Se,msTransform:Se,width:Me(v)?"".concat(v,"px"):v,height:Me(m)?"".concat(m,"px"):m},le),ref:y},[k("div",{class:"".concat(p,"-content"),ref:D},[(t=o.default)===null||t===void 0?void 0:t.call(o)]),o.handler?k("div",{onClick:M,ref:N},[(c=o.handler)===null||c===void 0?void 0:c.call(o)]):null])])}}});function te(u){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.element,a=n===void 0?document.body:n,o={},i=Object.keys(u);return i.forEach(function(h){o[h]=a.style[h]}),i.forEach(function(h){a.style[h]=u[h]}),o}function bt(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var ye={};const _e=function(u){if(!(!bt()&&!u)){var e="ant-scrolling-effect",n=new RegExp("".concat(e),"g"),a=document.body.className;if(u){if(!n.test(a))return;te(ye),ye={},document.body.className=a.replace(n,"").trim();return}var o=ke();if(o&&(ye=te({position:"relative",width:"calc(100% - ".concat(o,"px)")}),!n.test(a))){var i="".concat(a," ").concat(e);document.body.className=i.trim()}}};var V=[],Xe="ant-scrolling-effect",ge=new RegExp("".concat(Xe),"g"),pt=0,Ce=new Map,kt=nt(function u(e){var n=this;at(this,u),H(this,"getContainer",function(){var a;return(a=n.options)===null||a===void 0?void 0:a.container}),H(this,"reLock",function(a){var o=V.find(function(i){var h=i.target;return h===n.lockTarget});o&&n.unLock(),n.options=a,o&&(o.options=a,n.lock())}),H(this,"lock",function(){var a;if(!V.some(function(r){var l=r.target;return l===n.lockTarget})){if(V.some(function(r){var l,N=r.options;return(N==null?void 0:N.container)===((l=n.options)===null||l===void 0?void 0:l.container)})){V=[].concat(Ne(V),[{target:n.lockTarget,options:n.options}]);return}var o=0,i=((a=n.options)===null||a===void 0?void 0:a.container)||document.body;(i===document.body&&window.innerWidth-document.documentElement.clientWidth>0||i.scrollHeight>i.clientHeight)&&(o=ke());var h=i.className;if(V.filter(function(r){var l,N=r.options;return(N==null?void 0:N.container)===((l=n.options)===null||l===void 0?void 0:l.container)}).length===0&&Ce.set(i,te({width:o!==0?"calc(100% - ".concat(o,"px)"):void 0,overflow:"hidden",overflowX:"hidden",overflowY:"hidden"},{element:i})),!ge.test(h)){var y="".concat(h," ").concat(Xe);i.className=y.trim()}V=[].concat(Ne(V),[{target:n.lockTarget,options:n.options}])}}),H(this,"unLock",function(){var a,o=V.find(function(y){var r=y.target;return r===n.lockTarget});if(V=V.filter(function(y){var r=y.target;return r!==n.lockTarget}),!(!o||V.some(function(y){var r,l=y.options;return(l==null?void 0:l.container)===((r=o.options)===null||r===void 0?void 0:r.container)}))){var i=((a=n.options)===null||a===void 0?void 0:a.container)||document.body,h=i.className;ge.test(h)&&(te(Ce.get(i),{element:i}),Ce.delete(i),i.className=i.className.replace(ge,"").trim())}}),this.lockTarget=pt++,this.options=e}),F=0,ae=Qe(),se={},J=function(e){if(!ae)return null;if(e){if(typeof e=="string")return document.querySelectorAll(e)[0];if(typeof e=="function")return e();if(Ze(e)==="object"&&e instanceof window.HTMLElement)return e}return document.body};const St=oe({compatConfig:{MODE:3},name:"PortalWrapper",inheritAttrs:!1,props:{wrapperClassName:String,forceRender:{type:Boolean,default:void 0},getContainer:g.any,visible:{type:Boolean,default:void 0}},setup:function(e,n){var a=n.slots,o=j(),i=j(),h=j(),y=new kt({container:J(e.getContainer)}),r=function(){var b,T;(b=o.value)===null||b===void 0||(T=b.parentNode)===null||T===void 0||T.removeChild(o.value)},l=function(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(b||o.value&&!o.value.parentNode){var T=J(e.getContainer);return T?(T.appendChild(o.value),!0):!1}return!0},N=function(){return ae?(o.value||(o.value=document.createElement("div"),l(!0)),D(),o.value):null},D=function(){var b=e.wrapperClassName;o.value&&b&&b!==o.value.className&&(o.value.className=b)};He(function(){D(),l()});var L=function(){F===1&&!Object.keys(se).length?(_e(),se=te({overflow:"hidden",overflowX:"hidden",overflowY:"hidden"})):F||(te(se),se={},_e(!0))},R=it();return pe(function(){var E=!1;q([function(){return e.visible},function(){return e.getContainer}],function(b,T){var A=Pe(b,2),I=A[0],_=A[1],X=Pe(T,2),G=X[0],z=X[1];if(ae&&J(e.getContainer)===document.body&&(I&&!G?F+=1:E&&(F-=1)),E){var Z=typeof _=="function"&&typeof z=="function";(Z?_.toString()!==z.toString():_!==z)&&r(),I&&I!==G&&ae&&J(_)!==y.getContainer()&&y.reLock({container:J(_)})}E=!0},{immediate:!0,flush:"post"}),ee(function(){l()||(h.value=Ee(function(){R.update()}))})}),Ie(function(){var E=e.visible,b=e.getContainer;ae&&J(b)===document.body&&(F=E&&F?F-1:F),r(),Ee.cancel(h.value)}),function(){var E=e.forceRender,b=e.visible,T=null,A={getOpenCount:function(){return F},getContainer:N,switchScrollingEffect:L,scrollLocker:y};return(E||b||i.value)&&(T=k(dt,{getContainer:N,ref:i},{default:function(){var _;return(_=a.default)===null||_===void 0?void 0:_.call(a,A)}})),T}}});var Nt=["afterVisibleChange","getContainer","wrapperClassName","forceRender"],Pt=["visible","afterClose"],Et=oe({compatConfig:{MODE:3},inheritAttrs:!1,props:Re(vt(),{prefixCls:"drawer",placement:"left",getContainer:"body",level:"all",duration:".3s",ease:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",afterVisibleChange:function(){},showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",keyboard:!0,forceRender:!1,autofocus:!0}),emits:["handleClick","close"],slots:["handler"],setup:function(e,n){var a=n.emit,o=n.slots,i=j(null),h=function(l){a("handleClick",l)},y=function(l){a("close",l)};return function(){e.afterVisibleChange;var r=e.getContainer,l=e.wrapperClassName,N=e.forceRender,D=ce(e,Nt),L=null;if(!r)return k("div",{class:l,ref:i},[k(Le,S(S({},D),{},{open:e.open,getContainer:function(){return i.value},onClose:y,onHandleClick:h}),o)]);var R=!!o.handler||N;return(R||e.open||i.value)&&(L=k(St,{visible:e.open,forceRender:R,getContainer:r,wrapperClassName:l},{default:function(b){var T=b.visible,A=b.afterClose,I=ce(b,Pt);return k(Le,S(S(S({ref:i},D),I),{},{open:T!==void 0?T:e.open,afterVisibleChange:A!==void 0?A:e.afterVisibleChange,onClose:y,onHandleClick:h}),o)}})),L}}}),Tt=["width","height","visible","placement","mask","wrapClassName","class"],xt=Ae("top","right","bottom","left");Ae("default","large");var Be={distance:180},Ot=function(){return{autofocus:{type:Boolean,default:void 0},closable:{type:Boolean,default:void 0},closeIcon:g.any,destroyOnClose:{type:Boolean,default:void 0},forceRender:{type:Boolean,default:void 0},getContainer:g.any,maskClosable:{type:Boolean,default:void 0},mask:{type:Boolean,default:void 0},maskStyle:{type:Object,default:void 0},wrapStyle:{type:Object,default:void 0},style:{type:Object,default:void 0},class:g.any,wrapClassName:String,size:{type:String},drawerStyle:{type:Object,default:void 0},headerStyle:{type:Object,default:void 0},bodyStyle:{type:Object,default:void 0},contentWrapperStyle:{type:Object,default:void 0},title:g.any,visible:{type:Boolean,default:void 0},width:g.oneOfType([g.string,g.number]),height:g.oneOfType([g.string,g.number]),zIndex:Number,prefixCls:String,push:g.oneOfType([g.looseBool,{type:Object}]),placement:g.oneOf(xt),keyboard:{type:Boolean,default:void 0},extra:g.any,footer:g.any,footerStyle:{type:Object,default:void 0},level:g.any,levelMove:{type:[Number,Array,Function]},handle:g.any,afterVisibleChange:Function,onAfterVisibleChange:Function,"onUpdate:visible":Function,onClose:Function}},Dt=oe({compatConfig:{MODE:3},name:"ADrawer",inheritAttrs:!1,props:Re(Ot(),{closable:!0,placement:"right",maskClosable:!0,mask:!0,level:null,keyboard:!0,push:Be}),slots:["closeIcon","title","extra","footer","handle"],setup:function(e,n){var a=n.emit,o=n.slots,i=n.attrs,h=j(!1),y=j(!1),r=j(null),l=be("parentDrawerOpts",null),N=et("drawer",e),D=N.prefixCls;fe(!e.afterVisibleChange,"Drawer","`afterVisibleChange` prop is deprecated, please use `@afterVisibleChange` event instead"),fe(e.wrapStyle===void 0,"Drawer","`wrapStyle` prop is deprecated, please use `style` instead"),fe(e.wrapClassName===void 0,"Drawer","`wrapClassName` prop is deprecated, please use `class` instead");var L=function(){h.value=!0},R=function(){h.value=!1,ee(function(){E()})};Ve("parentDrawerOpts",{setPush:L,setPull:R}),pe(function(){var C=e.visible;C&&l&&l.setPush()}),We(function(){l&&l.setPull()}),q(function(){return e.visible},function(C){l&&(C?l.setPush():l.setPull())},{flush:"post"});var E=function(){var d,f;(d=r.value)===null||d===void 0||(f=d.domFocus)===null||f===void 0||f.call(d)},b=function(d){a("update:visible",!1),a("close",d)},T=function(d){var f;(f=e.afterVisibleChange)===null||f===void 0||f.call(e,d),a("afterVisibleChange",d)},A=K(function(){return e.destroyOnClose&&!e.visible}),I=function(){var d=A.value;d&&(e.visible||(y.value=!0))},_=K(function(){var C=e.push,d=e.placement,f;return typeof C=="boolean"?f=C?Be.distance:0:f=C.distance,f=parseFloat(String(f||0)),d==="left"||d==="right"?"translateX(".concat(d==="left"?f:-f,"px)"):d==="top"||d==="bottom"?"translateY(".concat(d==="top"?f:-f,"px)"):null}),X=K(function(){var C=e.visible,d=e.mask,f=e.placement,x=e.size,O=x===void 0?"default":x,M=e.width,W=e.height;if(!C&&!d)return{};var s={};if(f==="left"||f==="right"){var t=O==="large"?736:378;s.width=typeof M>"u"?t:M,s.width=typeof s.width=="string"?s.width:"".concat(s.width,"px")}else{var c=O==="large"?736:378;s.height=typeof W>"u"?c:W,s.height=typeof s.height=="string"?s.height:"".concat(s.height,"px")}return s}),G=K(function(){var C=e.zIndex,d=e.wrapStyle,f=e.mask,x=e.style,O=f?{}:X.value;return S(S(S({zIndex:C,transform:h.value?_.value:void 0},O),d),x)}),z=function(d){var f=e.closable,x=e.headerStyle,O=ve(o,e,"extra"),M=ve(o,e,"title");return!M&&!f?null:k("div",{class:we("".concat(d,"-header"),H({},"".concat(d,"-header-close-only"),f&&!M&&!O)),style:x},[k("div",{class:"".concat(d,"-header-title")},[Z(d),M&&k("div",{class:"".concat(d,"-title")},[M])]),O&&k("div",{class:"".concat(d,"-extra")},[O])])},Z=function(d){var f,x=e.closable,O=o.closeIcon?(f=o.closeIcon)===null||f===void 0?void 0:f.call(o):e.closeIcon;return x&&k("button",{key:"closer",onClick:b,"aria-label":"Close",class:"".concat(d,"-close")},[O===void 0?k(tt,null,null):O])},re=function(d){var f;if(y.value&&!e.visible)return null;y.value=!1;var x=e.bodyStyle,O=e.drawerStyle,M={},W=A.value;return W&&(M.opacity=0,M.transition="opacity .3s"),k("div",{class:"".concat(d,"-wrapper-body"),style:S(S({},M),O),onTransitionend:I},[z(d),k("div",{key:"body",class:"".concat(d,"-body"),style:x},[(f=o.default)===null||f===void 0?void 0:f.call(o)]),ue(d)])},ue=function(d){var f=ve(o,e,"footer");if(!f)return null;var x="".concat(d,"-footer");return k("div",{class:x,style:e.footerStyle},[f])};return function(){var C;e.width,e.height;var d=e.visible,f=e.placement,x=e.mask,O=e.wrapClassName,M=e.class,W=ce(e,Tt),s=x?X.value:{},t=x?"":"no-mask",c=S(S(S(S({},i),je(W,["size","closeIcon","closable","destroyOnClose","drawerStyle","headerStyle","bodyStyle","title","push","wrapStyle","onAfterVisibleChange","onClose","onUpdate:visible"])),s),{},{onClose:b,afterVisibleChange:T,handler:!1,prefixCls:D.value,open:d,showMask:x,placement:f,class:we((C={},H(C,M,M),H(C,O,!!O),H(C,t,!!t),C)),style:G.value,ref:r});return k(Et,c,{handler:e.handle?function(){return e.handle}:o.handle,default:function(){return re(D.value)}})}}});const Rt=Je(Dt);export{Rt as D,ft as K,dt as P,Bt as a,$e as s,ct as u}; diff --git a/apps/user-app-v2/dist/assets/index-CxgJ__2z.css b/apps/user-app-v2/dist/assets/index-CxgJ__2z.css new file mode 100644 index 0000000..6f76b4a --- /dev/null +++ b/apps/user-app-v2/dist/assets/index-CxgJ__2z.css @@ -0,0 +1 @@ +.liman-icons[data-v-d43d3684] svg path{stroke:currentColor}.tabbar[data-v-c127b61d]{position:fixed;left:0;right:0;bottom:0;z-index:10;display:flex;justify-content:center;padding:10px 14px calc(10px + env(safe-area-inset-bottom,0px));background:transparent;pointer-events:none}.tabbar__inner[data-v-c127b61d]{--tile: 52px;--gap: 6px;--pad: 6px;position:relative;display:flex;gap:var(--gap);padding:var(--pad);border-radius:22px;pointer-events:auto;background:radial-gradient(120% 140% at 0% 0%,rgb(var(--c-canvas-rgb) / 55%),rgb(var(--c-canvas-rgb) / 0%) 55%),radial-gradient(90% 120% at 100% 100%,rgb(var(--c-wine-rgb) / 7%),rgb(var(--c-wine-rgb) / 0%) 60%),linear-gradient(160deg,rgb(var(--c-canvas-rgb) / 42%),rgb(var(--c-canvas-rgb) / 18%));-webkit-backdrop-filter:blur(26px) saturate(210%) brightness(1.06);backdrop-filter:blur(26px) saturate(210%) brightness(1.06);border:0;box-shadow:inset 0 1px 1px rgb(var(--c-canvas-rgb) / 90%),inset 0 -8px 16px -10px rgb(var(--c-canvas-rgb) / 60%),inset 0 0 0 .5px rgb(var(--c-canvas-rgb) / 35%),0 18px 40px -14px #14161a52,0 6px 14px -8px rgb(var(--c-wine-rgb) / 22%),0 1px 3px #14161a0f}.tabbar__inner[data-v-c127b61d]:before{content:"";position:absolute;inset:1px 8% auto 8%;height:55%;border-radius:20px 20px 50% 50%/20px 20px 100% 100%;background:linear-gradient(180deg,rgb(var(--c-canvas-rgb) / 60%),rgb(var(--c-canvas-rgb) / 0%));pointer-events:none}.tabbar__inner[data-v-c127b61d]:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;padding:1px;border-radius:inherit;background:linear-gradient(145deg,rgb(var(--c-canvas-rgb) / 100%),rgb(var(--c-canvas-rgb) / 35%) 35%,rgb(var(--c-canvas-rgb) / 10%) 65%,rgb(var(--c-canvas-rgb) / 70%));-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;pointer-events:none}@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))){.tabbar__inner[data-v-c127b61d]{background:rgb(var(--c-canvas-rgb) / 94%)}}.tabbar__indicator[data-v-c127b61d]{position:absolute;top:var(--pad);right:var(--pad);z-index:1;width:var(--tile);height:var(--tile);border-radius:16px;background:var(--c-wineWash);box-shadow:0 4px 12px -6px #14161a40;transition:transform .35s cubic-bezier(.65,0,.35,1);will-change:transform}.tabbar__item[data-v-c127b61d]{position:relative;display:flex;align-items:center;justify-content:center;flex:0 0 var(--tile);width:var(--tile);height:var(--tile);border-radius:16px;background:var(--c-hairlineSoft);color:var(--c-inkMuted);text-decoration:none;transition:color .25s ease}.tabbar__item[data-v-c127b61d] svg{position:relative;z-index:2;transition:transform .3s cubic-bezier(.65,0,.35,1.4)}.tabbar__item.is-active[data-v-c127b61d]{color:var(--c-wine)}.tabbar__item.is-active[data-v-c127b61d] svg{transform:scale(1.08)}.tabbar__item[data-v-c127b61d]:active svg{transform:scale(.9)}@media (max-width: 360px){.tabbar__inner[data-v-c127b61d]{--tile: 46px;--gap: 5px}}.page-leave-active{transition:opacity .16s cubic-bezier(.4,0,1,1),transform .16s cubic-bezier(.4,0,1,1)}.page-enter-active{transition:opacity .42s cubic-bezier(.32,.72,0,1),transform .42s cubic-bezier(.32,.72,0,1)}.page-enter-from{opacity:0;transform:translate3d(0,10px,0) scale(.995)}.page-leave-to{opacity:0;transform:translate3d(0,-5px,0) scale(.997)}@media (prefers-reduced-motion: reduce){.page-enter-active,.page-leave-active{transition:opacity .12s linear}.page-enter-from,.page-leave-to{transform:none}}.sa[data-v-ce25a22f]{width:100%;height:100%;overflow:visible}.sa[data-v-ce25a22f] *{transform-box:fill-box;transform-origin:center}.sa-pop[data-v-ce25a22f]{animation:sa-pop-ce25a22f .6s cubic-bezier(.34,1.56,.64,1) .25s both}.sa-draw[data-v-ce25a22f]{stroke-dasharray:30;stroke-dashoffset:30;animation:sa-draw-ce25a22f .45s ease-out .6s forwards}.sa-shadow[data-v-ce25a22f]{animation:sa-shadow-ce25a22f 3.2s ease-in-out infinite}.sa-float[data-v-ce25a22f]{animation:sa-float-ce25a22f 3.2s ease-in-out infinite}.sa-door[data-v-ce25a22f]{transform-origin:right center;animation:sa-door-ce25a22f 2.8s ease-in-out infinite}.sa-arrow[data-v-ce25a22f]{animation:sa-nudge-ce25a22f 2.8s ease-in-out infinite}.sa-typing[data-v-ce25a22f]{transform-origin:right center;animation:sa-typing-ce25a22f 2.6s ease-in-out infinite}.sa-shackle[data-v-ce25a22f]{animation:sa-shackle-ce25a22f 2.6s ease-in-out .9s infinite}.sa-coin[data-v-ce25a22f]{animation:sa-coin-ce25a22f 2.4s cubic-bezier(.55,0,.75,.4) .4s infinite backwards}.sa-flame[data-v-ce25a22f]{transform-origin:center top;animation:sa-flame-ce25a22f .22s ease-in-out infinite alternate}.sa-trail[data-v-ce25a22f]{animation:sa-trail-ce25a22f 1.1s linear infinite}.sa-trail--2[data-v-ce25a22f]{animation-delay:.35s}.sa-trail--3[data-v-ce25a22f]{animation-delay:.6s}.sa-trail--4[data-v-ce25a22f]{animation-delay:.85s}.sa-ring[data-v-ce25a22f]{animation:sa-ring-ce25a22f 2s ease-out .8s infinite;opacity:0}.sa-confetti[data-v-ce25a22f]>*{animation:sa-confetti-ce25a22f .7s cubic-bezier(.34,1.56,.64,1) both}.sa-confetti[data-v-ce25a22f]>*:nth-child(1){animation-delay:.7s}.sa-confetti[data-v-ce25a22f]>*:nth-child(2){animation-delay:.78s}.sa-confetti[data-v-ce25a22f]>*:nth-child(3){animation-delay:.86s}.sa-confetti[data-v-ce25a22f]>*:nth-child(4){animation-delay:.94s}.sa-confetti[data-v-ce25a22f]>*:nth-child(5){animation-delay:1.02s}@keyframes sa-pop-ce25a22f{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes sa-draw-ce25a22f{to{stroke-dashoffset:0}}@keyframes sa-shadow-ce25a22f{50%{transform:scaleX(.82);opacity:.08}}@keyframes sa-float-ce25a22f{50%{transform:translateY(-4px)}}@keyframes sa-door-ce25a22f{0%,to{transform:scaleX(1)}50%{transform:scaleX(.72)}}@keyframes sa-nudge-ce25a22f{0%,to{transform:translate(0)}50%{transform:translate(-6px)}}@keyframes sa-typing-ce25a22f{0%{transform:scaleX(.15)}60%,to{transform:scaleX(1)}}@keyframes sa-shackle-ce25a22f{0%,55%,to{transform:translateY(0)}20%,40%{transform:translateY(-3px)}}@keyframes sa-coin-ce25a22f{0%{transform:translateY(-24px);opacity:0}20%{opacity:1}to{transform:translateY(26px);opacity:1}}@keyframes sa-flame-ce25a22f{0%{transform:scaleY(.82) scaleX(.94)}to{transform:scaleY(1.12) scaleX(1.04)}}@keyframes sa-trail-ce25a22f{0%{transform:translateY(-8px);opacity:0}30%{opacity:1}to{transform:translateY(22px);opacity:0}}@keyframes sa-ring-ce25a22f{0%{transform:scale(1);opacity:.35}to{transform:scale(1.7);opacity:0}}@keyframes sa-confetti-ce25a22f{0%{transform:scale(0) translateY(6px);opacity:0}to{transform:scale(1) translateY(0);opacity:1}}@media (prefers-reduced-motion: reduce){.sa[data-v-ce25a22f] *{animation:none!important}.sa-draw[data-v-ce25a22f]{stroke-dashoffset:0}}.iSheet__overlay{background:#14161a6b}.iSheet.van-popup{background:transparent;overflow:visible}.iSheet-slide-enter-active,.iSheet-slide-leave-active{will-change:transform}.iSheet-slide-enter-active{transition:transform .42s cubic-bezier(.32,.72,0,1)}.iSheet-slide-leave-active{transition:transform .24s cubic-bezier(.4,0,1,1)}.iSheet-slide-enter-from,.iSheet-slide-leave-to{transform:translate3d(0,100%,0)}.iSheet__card:not(.is-ready) *,.iSheet__card:not(.is-ready) *:after{animation-play-state:paused!important}.iSheet__card{--t: var(--c-ink);--t-on: var(--c-onInk);--t-rgb: 20, 22, 26}.iSheet--wine{--t: var(--c-wine);--t-on: #fff;--t-rgb: 122, 27, 51}.iSheet__card{position:relative;max-width:768px;margin:0 auto;padding:8px 16px calc(14px + env(safe-area-inset-bottom,0px));border-radius:32px 32px 0 0;background:var(--c-canvas);text-align:center;box-shadow:0 -18px 40px -30px #14161a8c;transition:transform .38s cubic-bezier(.22,1,.36,1);touch-action:none}.iSheet__card.is-dragging{transition:none}.iSheet__grip{display:block;width:38px;height:4px;margin:0 auto 12px;border-radius:999px;background:var(--c-hairline)}.iSheet__panel{height:150px;display:grid;place-items:center;border-radius:26px;background:var(--c-hairlineSoft)}.iSheet__art{width:112px;height:112px}.iSheet__art>img,.iSheet__art>svg,.iSheet__art>canvas{width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.iSheet__title{margin:18px 8px 0;font-size:16px;font-weight:700;line-height:1.75;color:var(--c-ink)}.iSheet__desc{margin:6px 12px 0;font-size:12.5px;font-weight:400;line-height:2;color:var(--c-inkMuted)}.iSheet__actions{display:flex;align-items:center;gap:10px;margin-top:20px}.iSheet__card .iSheet__btn{height:48px;border-radius:999px;font-family:inherit;font-size:13.5px;font-weight:800;white-space:nowrap;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:transform .18s ease,background-color .18s ease}.iSheet__card .iSheet__btn:active{transform:scale(.98)}.iSheet__card .iSheet__btn--ghost{flex:0 0 auto;min-width:108px;padding:0 22px;color:var(--c-ink);background:var(--c-canvas);border:1px solid var(--c-hairline)}.iSheet__card .iSheet__btn--ghost:active{background:var(--c-hairlineSoft)}.iSheet__card .iSheet__btn--primary{flex:1;min-width:0;padding:0 18px;border:0;color:var(--t-on);background:var(--t);box-shadow:0 14px 30px -18px rgba(var(--t-rgb),.9)}@media (prefers-reduced-motion: reduce){.iSheet-slide-enter-active,.iSheet-slide-leave-active{transition-duration:.01s}.iSheet__card *,.iSheet__card *:after{animation:none!important}}.toast[data-v-172a25f4]{--accent: var(--c-wine);position:relative;display:flex;align-items:center;gap:12px;width:100%;padding:10px 10px 12px 14px;border-radius:20px;overflow:hidden;pointer-events:auto;touch-action:none;cursor:grab;transition:transform .45s cubic-bezier(.2,1.4,.4,1),opacity .3s ease;background:radial-gradient(120% 160% at 0% 0%,rgb(var(--c-canvas-rgb) / 60%),rgb(var(--c-canvas-rgb) / 0%) 55%),radial-gradient(80% 140% at 100% 100%,rgb(var(--c-ink-rgb) / 4%),rgb(var(--c-ink-rgb) / 0%) 60%),linear-gradient(160deg,rgb(var(--c-canvas-rgb) / 72%),rgb(var(--c-canvas-rgb) / 50%));-webkit-backdrop-filter:blur(24px) saturate(200%) brightness(1.05);backdrop-filter:blur(24px) saturate(200%) brightness(1.05);box-shadow:inset 0 1px 1px rgb(var(--c-canvas-rgb) / 90%),inset 0 0 0 .5px rgb(var(--c-canvas-rgb) / 40%),0 18px 40px -16px #14161a59,0 1px 3px #14161a0f}.toast[data-v-172a25f4]:after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;padding:1px;border-radius:inherit;background:linear-gradient(145deg,rgb(var(--c-canvas-rgb) / 100%),rgb(var(--c-canvas-rgb) / 30%) 40%,rgb(var(--c-canvas-rgb) / 10%),rgb(var(--c-canvas-rgb) / 70%));-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;pointer-events:none}.toast.is-held[data-v-172a25f4]:not(.is-dragging){transform:scale(.98)}.toast.is-dragging[data-v-172a25f4]{cursor:grabbing}.toast--success[data-v-172a25f4]{--accent: var(--c-green)}.toast--error[data-v-172a25f4]{--accent: var(--c-red)}.toast--warning[data-v-172a25f4]{--accent: #8D6A46}.toast--info[data-v-172a25f4]{--accent: var(--c-wine)}@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))){.toast[data-v-172a25f4]{background:rgb(var(--c-canvas-rgb) / 96%)}}.toast__tile[data-v-172a25f4]{position:relative;flex:0 0 42px;display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:14px;color:var(--accent);background:color-mix(in srgb,var(--accent) 12%,transparent);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 16%,transparent)}.toast__tile[data-v-172a25f4] svg{position:relative;animation:toast-icon-pop-172a25f4 .6s .12s cubic-bezier(.2,1.6,.4,1) both}.toast__ripple[data-v-172a25f4]{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:inherit;border:2px solid var(--accent);opacity:0;animation:toast-ripple-172a25f4 .9s .2s ease-out both}.toast--error .toast__tile[data-v-172a25f4] svg{animation:toast-icon-pop-172a25f4 .6s .12s cubic-bezier(.2,1.6,.4,1) both,toast-shake-172a25f4 .45s .55s ease-in-out}.toast__body[data-v-172a25f4]{flex:1;min-width:0;text-align:right}.toast__title[data-v-172a25f4]{margin-bottom:2px;font-size:13px;font-weight:700;line-height:1.5;color:var(--c-ink)}.toast__message[data-v-172a25f4]{font-size:12.5px;font-weight:500;line-height:1.6;color:var(--c-inkSoft)}.toast__progress[data-v-172a25f4]{position:absolute;right:14px;left:14px;bottom:5px;height:2.5px;border-radius:2px;background:var(--accent);opacity:.55;transform-origin:right center;animation-name:toast-drain-172a25f4;animation-timing-function:linear;animation-fill-mode:forwards}.toast.is-held .toast__progress[data-v-172a25f4]{animation-play-state:paused}@keyframes toast-drain-172a25f4{0%{transform:scaleX(1)}to{transform:scaleX(0)}}@keyframes toast-icon-pop-172a25f4{0%{transform:scale(0) rotate(-30deg);opacity:0}to{transform:scale(1) rotate(0);opacity:1}}@keyframes toast-ripple-172a25f4{0%{transform:scale(1);opacity:.5}to{transform:scale(1.6);opacity:0}}@keyframes toast-shake-172a25f4{0%,to{transform:translate(0)}20%,60%{transform:translate(-3px)}40%,80%{transform:translate(3px)}}@media (prefers-reduced-motion: reduce){.toast__tile[data-v-172a25f4] svg,.toast__ripple[data-v-172a25f4]{animation:none!important}}.toast-host{position:fixed;top:0;left:0;right:0;z-index:3000;display:flex;flex-direction:column;align-items:center;gap:8px;padding:calc(12px + env(safe-area-inset-top,0px)) 14px 0;direction:rtl;pointer-events:none}.toast-host>*{max-width:420px}.toast-host .toast.toast-enter-active{transition:transform .6s cubic-bezier(.2,1.35,.4,1),opacity .35s ease,filter .4s ease}.toast-host .toast.toast-enter-from{transform:translateY(-120%) scale(.88);opacity:0;filter:blur(6px)}.toast-host .toast.toast-leave-active{position:absolute;left:14px;right:14px;margin:0 auto;transition:transform .32s cubic-bezier(.5,0,.75,0),opacity .28s ease,filter .3s ease}.toast-host .toast.toast-leave-to{transform:translateY(-40%) scale(.9);opacity:0;filter:blur(4px)}.toast-host .toast.toast-move{transition:transform .45s cubic-bezier(.2,1.2,.4,1)}@media (prefers-reduced-motion: reduce){.toast-host .toast.toast-enter-active,.toast-host .toast.toast-leave-active,.toast-host .toast.toast-move{transition:opacity .2s ease}.toast-host .toast.toast-enter-from,.toast-host .toast.toast-leave-to{transform:none;filter:none}}.gs[data-v-0e0334e8]{position:relative;width:100%;height:100%;overflow:hidden;touch-action:pan-y;-moz-user-select:none;user-select:none;-webkit-user-select:none}.gs__track[data-v-0e0334e8]{direction:ltr;display:flex;height:100%;width:100%;transition:transform .42s cubic-bezier(.22,.61,.36,1);will-change:transform}.gs.is-dragging .gs__track[data-v-0e0334e8]{transition:none}.gs__cell[data-v-0e0334e8]{flex:0 0 100%;width:100%;height:100%}.gs__img[data-v-0e0334e8]{width:100%;height:100%;display:block;-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.gs__img--cover[data-v-0e0334e8]{-o-object-fit:contain;object-fit:contain;padding:46px 20px 20px}.gs__img--contain[data-v-0e0334e8]{-o-object-fit:contain;object-fit:contain;padding:20px 22px}.gs__counter[data-v-0e0334e8]{position:absolute;bottom:14px;inset-inline-start:14px;padding:4px 9px;border-radius:999px;font-size:10.5px;font-weight:700;color:#fff;background:#14161a73;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);direction:ltr;pointer-events:none}.loading *{box-sizing:border-box}.loading{position:relative;width:50px;height:50px;border-radius:50%;box-sizing:border-box;border:3px solid transparent}.loading .effect-1,.loading .effect-2{position:absolute;width:50px;height:50px;border:3px solid transparent;border-left:3px solid #8D6A46;border-radius:50%;box-sizing:border-box}.loading .effect-1{animation:rotate 1s ease infinite}.loading .effect-2{animation:rotateOpacity 1s ease infinite .1s}.loading .effect-3{position:absolute;width:50px;height:50px;border:3px solid transparent;border-left:3px solid #8D6A46;animation:rotateOpacity 1s ease infinite .2s;border-radius:50%;box-sizing:border-box}.loading .effects{transition:all .3s ease}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(1turn)}}@keyframes rotateOpacity{0%{transform:rotate(0);opacity:.1}to{transform:rotate(1turn);opacity:1}}.spinner-brand{display:block;width:48px;height:48px;-o-object-fit:contain;object-fit:contain;border-radius:8px}.ant-spin-text{color:var(--c-primary)}.loading+.ant-spin-text{margin-top:24px}.pd[data-v-3162e70f]{position:relative;height:100vh;overflow-y:auto;overflow-x:hidden;background:var(--c-page);-webkit-overflow-scrolling:touch;overscroll-behavior:contain}.pd__gallery[data-v-3162e70f]{position:sticky;top:0;z-index:1;margin-top:calc(-60px - env(safe-area-inset-top,0px))}.pd__header[data-v-3162e70f]{position:sticky;top:0;z-index:10;padding-top:env(safe-area-inset-top,0px);background:transparent;border-bottom:1px solid transparent;transition:background .28s ease,border-color .28s ease,backdrop-filter .28s ease}.pd__header.is-solid[data-v-3162e70f]{background:rgb(var(--c-canvas-rgb) / 88%);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);border-bottom-color:var(--c-hairline)}.pd__headerTitle[data-v-3162e70f]{flex:1;min-width:0;margin:0;text-align:center;font-size:14.5px;font-weight:800;color:var(--c-ink);letter-spacing:-.1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;opacity:0;transition:opacity .28s ease}.is-solid .pd__headerTitle[data-v-3162e70f]{opacity:1}.pd__controls[data-v-3162e70f]{max-width:768px;margin:0 auto;padding:11px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px}.pd__controlsEnd[data-v-3162e70f]{display:flex;gap:9px}.pd__round[data-v-3162e70f]{position:relative;width:38px;height:38px;display:grid;place-items:center;border:0;border-radius:12px;cursor:pointer;text-decoration:none;color:var(--c-ink);background:rgb(var(--c-canvas-rgb) / 90%);-webkit-backdrop-filter:blur(10px) saturate(140%);backdrop-filter:blur(10px) saturate(140%);box-shadow:0 10px 26px -16px #14161ab3;transition:transform .18s ease,color .28s ease,background .28s ease,box-shadow .28s ease}.pd__round[data-v-3162e70f]:active{transform:scale(.92)}.pd__round.is-on[data-v-3162e70f]{color:#fff;background:var(--c-wine)}.is-solid .pd__round[data-v-3162e70f]{color:var(--c-ink);background:var(--c-hairlineSoft);-webkit-backdrop-filter:none;backdrop-filter:none;box-shadow:none}.is-solid .pd__round.is-on[data-v-3162e70f]{color:#fff;background:var(--c-wine)}.pd__roundBadge[data-v-3162e70f]{position:absolute;top:-5px;inset-inline-start:-5px;min-width:18px;height:18px;padding:0 5px;display:grid;place-items:center;border-radius:999px;font-size:10px;font-weight:800;color:#fff;background:var(--c-wine)}.pd__stage[data-v-3162e70f]{position:relative;height:54vh;min-height:320px;max-height:460px;overflow:hidden;background:var(--c-photoStage);touch-action:pan-y}.pd__stage--empty[data-v-3162e70f]{display:grid;place-items:center;color:var(--c-inkFaint)}.pd__rail[data-v-3162e70f]{position:absolute;top:50%;inset-inline-end:12px;transform:translateY(-50%);display:flex;flex-direction:column;gap:6px;padding:7px 5px;border-radius:999px;background:#14161a4d;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}.pd__railDot[data-v-3162e70f]{width:6px;height:6px;padding:0;border:0;border-radius:999px;cursor:pointer;background:#ffffff80;transition:height .25s cubic-bezier(.32,.72,0,1),background .25s ease}.pd__railDot.is-on[data-v-3162e70f]{height:20px;background:#fff}.pd__expand[data-v-3162e70f]{position:absolute;bottom:12px;inset-inline-start:12px;width:30px;height:30px;display:grid;place-items:center;border-radius:10px;color:#fff;background:#14161a59;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);pointer-events:none}.pd__preview[data-v-3162e70f]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:2000;display:flex;flex-direction:column;background:#0a0a0c8c;-webkit-backdrop-filter:blur(28px) saturate(140%);backdrop-filter:blur(28px) saturate(140%)}.pd__previewClose[data-v-3162e70f]{position:absolute;top:calc(14px + env(safe-area-inset-top,0px));inset-inline-end:14px;z-index:2;width:38px;height:38px;display:grid;place-items:center;border:0;border-radius:12px;cursor:pointer;color:#fff;background:#00000059;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);transform:rotate(45deg);transition:transform .18s ease,background .18s ease}.pd__previewClose[data-v-3162e70f]:active{transform:rotate(45deg) scale(.92)}.pd__previewCounter[data-v-3162e70f]{position:absolute;top:calc(24px + env(safe-area-inset-top,0px));inset-inline-start:0;inset-inline-end:0;z-index:2;text-align:center;font-size:12px;font-weight:700;color:#ffffffbf;direction:ltr;pointer-events:none}.pd__previewStage[data-v-3162e70f]{flex:1;min-height:0}.pd__previewThumbs[data-v-3162e70f]{flex-shrink:0;display:flex;justify-content:center;gap:8px;overflow-x:auto;scroll-snap-type:x proximity;padding:10px 16px calc(18px + env(safe-area-inset-bottom,0px))}.pd__previewThumb[data-v-3162e70f]{scroll-snap-align:center;flex:0 0 auto;width:52px;height:52px;padding:6px;border:0;border-radius:12px;cursor:pointer;overflow:hidden;background:#fff;opacity:.65;outline:2px solid transparent;outline-offset:2px;transition:opacity .2s ease,outline-color .2s ease,transform .18s ease}.pd__previewThumb[data-v-3162e70f]:active{transform:scale(.94)}.pd__previewThumb.is-on[data-v-3162e70f]{opacity:1;outline-color:#fff}.pd__previewThumb img[data-v-3162e70f]{width:100%;height:100%;-o-object-fit:contain;object-fit:contain;display:block;-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.pd-preview-enter-active[data-v-3162e70f],.pd-preview-leave-active[data-v-3162e70f]{transition:opacity .24s ease}.pd-preview-enter-from[data-v-3162e70f],.pd-preview-leave-to[data-v-3162e70f]{opacity:0}.pd__scroll[data-v-3162e70f]{position:relative;z-index:2}.pd__sheet[data-v-3162e70f]{position:relative;margin-top:-8px;border-radius:32px 32px 0 0;background:var(--c-canvas);padding:8px 18px;box-shadow:0 -18px 40px -30px #14161a8c;min-height:calc(100vh - 132px - env(safe-area-inset-top,0px))}.pd__grip[data-v-3162e70f]{width:38px;height:4px;margin:0 auto 12px;border-radius:999px;background:var(--c-hairline)}.pd__eyebrow[data-v-3162e70f]{display:flex;align-items:center;justify-content:space-between;gap:12px}.pd__eyebrowText[data-v-3162e70f]{font-size:11.5px;font-weight:600;color:var(--c-inkFaint)}.pd__stock[data-v-3162e70f]{flex-shrink:0;display:inline-flex;align-items:center;gap:6px;padding:5px 11px;border-radius:999px;font-size:10.5px;font-weight:700;white-space:nowrap}.pd__stockDot[data-v-3162e70f]{width:5px;height:5px;border-radius:999px;background:currentColor}.pd__stock.is-in[data-v-3162e70f]{color:var(--c-green);background:rgb(var(--c-green-rgb) / 8%)}.pd__stock.is-pre[data-v-3162e70f]{color:var(--c-wine);background:var(--c-wineWash)}.pd__stock.is-out[data-v-3162e70f]{color:var(--c-inkMuted);background:var(--c-hairlineSoft)}.pd__head[data-v-3162e70f]{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;padding-top:10px}.pd__headMain[data-v-3162e70f]{min-width:0}.pd__title[data-v-3162e70f]{margin:0;font-size:14px;font-weight:700;line-height:1.7;color:var(--c-ink)}.pd__code[data-v-3162e70f]{margin:5px 0 0;direction:ltr;text-align:end;font-size:11px;font-weight:700;color:var(--c-inkFaint)}.pd__figures[data-v-3162e70f]{flex-shrink:0;display:flex;align-items:flex-end;gap:8px}.pd__figure[data-v-3162e70f]{display:flex;flex-direction:column;align-items:center;gap:2px;padding:7px 11px;border-radius:13px;color:var(--c-ink);background:var(--c-hairlineSoft)}.pd__figure--accent[data-v-3162e70f]{color:var(--c-wine);background:var(--c-wineWash)}.pd__figureValue[data-v-3162e70f]{font-size:14px;font-weight:800;line-height:1.3;color:inherit;direction:ltr}.pd__figureLabel[data-v-3162e70f]{font-size:10px;font-weight:500;color:var(--c-inkFaint)}.pd__figure--accent .pd__figureLabel[data-v-3162e70f]{color:rgb(var(--c-wine-rgb) / 65%)}.pd__chips[data-v-3162e70f]{display:flex;gap:8px;margin-top:20px;margin-inline:-18px;padding:3px 18px;overflow-x:auto}.pd__chip[data-v-3162e70f]{flex:0 0 auto;min-width:42px;height:34px;padding:0 14px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;font-family:inherit;font-size:12.5px;font-weight:700;white-space:nowrap;border-radius:999px;border:1px solid var(--c-hairline);color:var(--c-inkMuted);background:var(--c-canvas);transition:transform .18s ease,background .2s ease,color .2s ease,border-color .2s ease}.pd__chip[data-v-3162e70f]:active{transform:scale(.95)}.pd__chip.is-on[data-v-3162e70f]{color:var(--c-onInk);background:var(--c-ink);border-color:var(--c-ink)}.pd__chip.is-out[data-v-3162e70f]{opacity:.45;cursor:not-allowed}.pd__block[data-v-3162e70f]{margin-top:24px}.pd__blockTitle[data-v-3162e70f]{margin:0 0 11px;font-size:16px;font-weight:600;color:var(--c-ink)}.pd__body[data-v-3162e70f]{margin:0;font-size:12.5px;line-height:2.1;color:var(--c-inkMuted);text-align:justify}.pd__body.is-clamped[data-v-3162e70f]{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.pd__more[data-v-3162e70f]{margin-top:8px;padding:0;border:0;background:none;cursor:pointer;font-family:inherit;font-size:11.5px;font-weight:800;color:var(--c-ink);text-decoration:underline;text-underline-offset:4px}.pd__specs[data-v-3162e70f]{margin:0;border-radius:22px;background:var(--c-hairlineSoft);overflow:hidden}.pd__spec[data-v-3162e70f]{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 16px;border-bottom:1px solid var(--c-hairline)}.pd__spec[data-v-3162e70f]:last-child{border-bottom:0}.pd__spec dt[data-v-3162e70f]{display:flex;align-items:center;gap:7px;margin:0;font-size:12.5px;color:var(--c-inkMuted)}.pd__spec dd[data-v-3162e70f]{margin:0;font-size:12.5px;font-weight:700;color:var(--c-ink)}.pd__bar[data-v-3162e70f]{position:sticky;bottom:0;z-index:20;display:flex;align-items:center;gap:10px;max-width:768px;margin:0 auto;padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px));background:rgb(var(--c-canvas-rgb) / 90%);-webkit-backdrop-filter:blur(18px) saturate(140%);backdrop-filter:blur(18px) saturate(140%);border-top:1px solid var(--c-hairline)}.pd__pill[data-v-3162e70f]{flex-shrink:0;max-width:44%;height:48px;padding:0 15px;display:inline-flex;align-items:center;gap:7px;cursor:pointer;font-family:inherit;font-size:12.5px;font-weight:700;border-radius:999px;border:1px solid var(--c-hairline);color:var(--c-ink);background:var(--c-canvas);transition:transform .18s ease,background .2s ease}.pd__pill[data-v-3162e70f]:active{transform:scale(.97)}.pd__pillText[data-v-3162e70f]{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.pd__qty[data-v-3162e70f]{flex-shrink:0;height:48px;padding:0 6px;display:inline-flex;align-items:center;gap:4px;border-radius:999px;border:1px solid var(--c-hairline);background:var(--c-canvas)}.pd__qtyBtn[data-v-3162e70f]{width:32px;height:32px;display:grid;place-items:center;border:0;border-radius:50%;cursor:pointer;color:var(--c-ink);background:var(--c-hairlineSoft);transition:transform .18s ease}.pd__qtyBtn[data-v-3162e70f]:active{transform:scale(.9)}.pd__qtyValue[data-v-3162e70f]{min-width:20px;text-align:center;font-size:13px;font-weight:800;color:var(--c-ink)}.pd__cta[data-v-3162e70f]{flex:1;min-width:0;display:inline-flex;align-items:center;justify-content:center;gap:8px;height:48px;border:0;border-radius:999px;cursor:pointer;font-family:inherit;font-size:13.5px;font-weight:800;white-space:nowrap;text-decoration:none;color:var(--c-onInk);background:var(--c-ink);box-shadow:0 14px 30px -18px #14161ae6;transition:transform .18s ease,opacity .18s ease}.pd__cta[data-v-3162e70f]:active{transform:scale(.985)}.pd__cta[data-v-3162e70f]:disabled{cursor:default;opacity:.4;box-shadow:none}.pm[data-v-4b2262f9]{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000}.pm.is-closing[data-v-4b2262f9]{pointer-events:none}.pm__veil[data-v-4b2262f9]{position:absolute;top:0;right:0;bottom:0;left:0;background:#0e0f1252}.pm__shape[data-v-4b2262f9]{position:absolute;top:0;right:0;bottom:0;left:0;display:none}.pm.is-moving .pm__shape[data-v-4b2262f9]{display:block}.pm__sheet[data-v-4b2262f9]{position:absolute;top:0;right:0;bottom:0;left:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}.pm.is-moving[data-v-4b2262f9] *{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}.pm__ghost[data-v-4b2262f9]{position:fixed;z-index:2;transform-origin:0 0;-o-object-fit:fill;object-fit:fill;pointer-events:none;will-change:transform}body::-webkit-scrollbar{display:none}#app{overflow:hidden;direction:rtl!important;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:start;color:var(--c-primary);-webkit-user-select:none;-moz-user-select:none;user-select:none}.slideDown-enter-active,.slideDown-leave-active{transition:all .5s ease}.slideDown-enter-from{transform:translateY(-100vh)}.slideDown-leave-to{transform:translateY(100vh)}.slideDown-leave-from,.slideDown-enter-to{transform:translateY(0)}.fade-down-enter-active,.fade-down-leave-active{transition:all .5s ease}:root{--c-canvas: #FFFFFF;--c-canvas-rgb: 255 255 255;--c-canvasSoft: #FAFAFA;--c-canvasSoft-rgb: 250 250 250;--c-ink: #14161A;--c-ink-rgb: 20 22 26;--c-inkSoft: #22262E;--c-inkSoft-rgb: 34 38 46;--c-inkMuted: #5B616E;--c-inkMuted-rgb: 91 97 110;--c-inkFaint: #8A909C;--c-inkFaint-rgb: 138 144 156;--c-hairline: #ECEDEF;--c-hairline-rgb: 236 237 239;--c-hairlineSoft: #F4F5F6;--c-hairlineSoft-rgb: 244 245 246;--c-wine: #7A1B33;--c-wine-rgb: 122 27 51;--c-wineDeep: #5E1427;--c-wineDeep-rgb: 94 20 39;--c-wineSoft: #A33C55;--c-wineSoft-rgb: 163 60 85;--c-wineWash: #FBF2F4;--c-wineWash-rgb: 251 242 244;--c-primary: #1C2D56;--c-primary-rgb: 28 45 86;--c-primaryLighten: #1C3362;--c-primaryLighten-rgb: 28 51 98;--c-green: #16a34a;--c-green-rgb: 22 163 74;--c-red: #dc2626;--c-red-rgb: 220 38 38;--c-info: #335CB1;--c-info-rgb: 51 92 177;--c-light: #f9f9f9;--c-light-rgb: 249 249 249;--c-grey: #898989;--c-grey-rgb: 137 137 137;--c-lightGray: #A5A5A5;--c-lightGray-rgb: 165 165 165;--c-lightGray1: #CACED8;--c-lightGray1-rgb: 202 206 216;--c-lightGray2: #E8EAEE;--c-lightGray2-rgb: 232 234 238;--c-page: #FFFFFF;--c-page-rgb: 255 255 255;--c-onInk: #FFFFFF;--c-onInk-rgb: 255 255 255;--c-heroSurface: #14161A;--c-heroSurface-rgb: 20 22 26;--c-hairlineStrong: #DADCE0;--c-hairlineStrong-rgb: 218 220 224;--c-photoMat: transparent;--c-photoStage: #F4F5F6;--c-photoStage-rgb: 244 245 246}html.theme-dark{color-scheme:dark;--c-page: #15171A;--c-page-rgb: 21 23 26;--c-canvasSoft: #15171A;--c-canvasSoft-rgb: 21 23 26;--c-canvas: #1F2125;--c-canvas-rgb: 31 33 37;--c-hairlineSoft: #2A2D32;--c-hairlineSoft-rgb: 42 45 50;--c-hairline: #3A3D44;--c-hairline-rgb: 58 61 68;--c-hairlineStrong: #4B4F57;--c-hairlineStrong-rgb: 75 79 87;--c-ink: #F2F3F5;--c-ink-rgb: 242 243 245;--c-inkSoft: #E1E3E7;--c-inkSoft-rgb: 225 227 231;--c-inkMuted: #B2B7C0;--c-inkMuted-rgb: 178 183 192;--c-inkFaint: #8F95A0;--c-inkFaint-rgb: 143 149 160;--c-wine: #C9566F;--c-wine-rgb: 201 86 111;--c-wineDeep: #A8435C;--c-wineDeep-rgb: 168 67 92;--c-wineSoft: #DC8197;--c-wineSoft-rgb: 220 129 151;--c-wineWash: #3A222B;--c-wineWash-rgb: 58 34 43;--c-primary: #A3B6EA;--c-primary-rgb: 163 182 234;--c-primaryLighten: #B8C8F0;--c-primaryLighten-rgb: 184 200 240;--c-green: #45C677;--c-green-rgb: 69 198 119;--c-red: #F26161;--c-red-rgb: 242 97 97;--c-info: #7C9DE6;--c-info-rgb: 124 157 230;--c-light: #1F2125;--c-light-rgb: 31 33 37;--c-grey: #9298A2;--c-grey-rgb: 146 152 162;--c-lightGray: #757A84;--c-lightGray-rgb: 117 122 132;--c-lightGray1: #4A4E56;--c-lightGray1-rgb: 74 78 86;--c-lightGray2: #3A3D44;--c-lightGray2-rgb: 58 61 68;--c-onInk: #15171A;--c-onInk-rgb: 21 23 26;--c-heroSurface: #2C2F36;--c-heroSurface-rgb: 44 47 54;--c-photoMat: #FFFFFF;--c-photoMat-rgb: 255 255 255;--c-photoStage: #F2F3F5;--c-photoStage-rgb: 242 243 245}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:inherit;color:inherit;margin:0;padding:0}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.\!fixed{position:fixed!important}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.top-\[-2rem\]{top:-2rem}.z-10{z-index:10}.m-auto{margin:auto}.my-\[10px\]{margin-top:10px;margin-bottom:10px}.block{display:block}.inline{display:inline}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-screen{height:100vh}.h-\[200px\]{height:200px}.h-\[2rem\]{height:2rem}.\!max-h-screen{max-height:100vh!important}.w-screen{width:100vw}.w-\[200px\]{width:200px}.w-full{width:100%}.w-\[100vw\]{width:100vw}.max-w-screen-md{max-width:768px}.flex-1{flex:1 1 0%}.flex-shrink,.shrink{flex-shrink:1}.grow{flex-grow:1}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.resize{resize:both}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-center{justify-content:center}.justify-around{justify-content:space-around}.overflow-auto{overflow:auto}.rounded{border-radius:.25rem}.rounded-\[5px\]{border-radius:5px}.border{border-width:1px}.border-lightGray{--tw-border-opacity: 1;border-color:rgb(165 165 165 / var(--tw-border-opacity))}.border-lightGray\/20{border-color:#a5a5a533}.bg-primary{--tw-bg-opacity: 1;background-color:rgb(28 45 86 / var(--tw-bg-opacity))}.px-\[16px\]{padding-left:16px;padding-right:16px}.opacity-70{opacity:.7}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}[class^=ant-]::-ms-clear,[class*=ant-]::-ms-clear,[class^=ant-] input::-ms-clear,[class*=ant-] input::-ms-clear,[class^=ant-] input::-ms-reveal,[class*=ant-] input::-ms-reveal{display:none}html,body{width:100%;height:100%}input::-ms-clear,input::-ms-reveal{display:none}*,*:before,*:after{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{margin:0;color:#000000d9;font-size:14px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-variant:tabular-nums;line-height:1.5715;background-color:var(--c-page);font-feature-settings:"tnum"}[tabindex="-1"]:focus{outline:none!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5em;color:#1c2d56;font-weight:500}p{margin-top:0;margin-bottom:1em}abbr[title],abbr[data-original-title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;border-bottom:0;cursor:help}address{margin-bottom:1em;font-style:normal;line-height:inherit}input[type=text],input[type=password],input[type=number],textarea{-webkit-appearance:none}ol,ul,dl{margin-top:0;margin-bottom:1em}ol ol,ul ul,ol ul,ul ol{margin-bottom:0}dt{font-weight:500}dd{margin-bottom:.5em;margin-left:0}blockquote{margin:0 0 1em}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#1c2d56;text-decoration:none;background-color:transparent;outline:none;cursor:pointer;transition:color .3s;-webkit-text-decoration-skip:objects}a:hover{color:#314263}a:active{color:#0e1730}a:active,a:hover{text-decoration:none;outline:0}a:focus{text-decoration:none;outline:0}a[disabled]{color:#00000040;cursor:not-allowed}pre,code,kbd,samp{font-size:1em;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace}pre{margin-top:0;margin-bottom:1em;overflow:auto}figure{margin:0 0 1em}img{vertical-align:middle;border-style:none}a,area,button,[role=button],input:not([type=range]),label,select,summary,textarea{touch-action:manipulation}table{border-collapse:collapse}caption{padding-top:.75em;padding-bottom:.3em;color:#00000073;text-align:left;caption-side:bottom}input,button,select,optgroup,textarea{margin:0;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}button,html [type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{padding:0;border-style:none}input[type=radio],input[type=checkbox]{box-sizing:border-box;padding:0}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;margin:0;padding:0;border:0}legend{display:block;width:100%;max-width:100%;margin-bottom:.5em;padding:0;color:inherit;font-size:1.5em;line-height:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}mark{padding:.2em;background-color:#feffe6}::-moz-selection{color:#fff;background:#8d6a46}::selection{color:#fff;background:#8d6a46}.clearfix:before{display:table;content:""}.clearfix:after{display:table;clear:both;content:""}.anticon{display:inline-block;color:inherit;font-style:normal;line-height:0;text-align:center;text-transform:none;vertical-align:-.125em;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.anticon>*{line-height:1}.anticon svg{display:inline-block}.anticon:before{display:none}.anticon .anticon-icon{display:block}.anticon>.anticon{line-height:0;vertical-align:0}.anticon[tabindex]{cursor:pointer}.anticon-spin:before{display:inline-block;animation:loadingCircle 1s infinite linear}.anticon-spin{display:inline-block;animation:loadingCircle 1s infinite linear}.ant-fade-enter,.ant-fade-appear,.ant-fade-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.ant-fade-enter.ant-fade-enter-active,.ant-fade-appear.ant-fade-appear-active{animation-name:antFadeIn;animation-play-state:running}.ant-fade-leave.ant-fade-leave-active{animation-name:antFadeOut;animation-play-state:running;pointer-events:none}.ant-fade-enter,.ant-fade-appear{opacity:0;animation-timing-function:linear}.ant-fade-leave{animation-timing-function:linear}.fade-enter,.fade-appear,.fade-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.fade-enter.fade-enter-active,.fade-appear.fade-appear-active{animation-name:antFadeIn;animation-play-state:running}.fade-leave.fade-leave-active{animation-name:antFadeOut;animation-play-state:running;pointer-events:none}.fade-enter,.fade-appear{opacity:0;animation-timing-function:linear}.fade-leave{animation-timing-function:linear}@keyframes antFadeIn{0%{opacity:0}to{opacity:1}}@keyframes antFadeOut{0%{opacity:1}to{opacity:0}}.ant-move-up-enter,.ant-move-up-appear,.ant-move-up-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.ant-move-up-enter.ant-move-up-enter-active,.ant-move-up-appear.ant-move-up-appear-active{animation-name:antMoveUpIn;animation-play-state:running}.ant-move-up-leave.ant-move-up-leave-active{animation-name:antMoveUpOut;animation-play-state:running;pointer-events:none}.ant-move-up-enter,.ant-move-up-appear{opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.ant-move-up-leave{animation-timing-function:cubic-bezier(.6,.04,.98,.34)}.move-up-enter,.move-up-appear,.move-up-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.move-up-enter.move-up-enter-active,.move-up-appear.move-up-appear-active{animation-name:antMoveUpIn;animation-play-state:running}.move-up-leave.move-up-leave-active{animation-name:antMoveUpOut;animation-play-state:running;pointer-events:none}.move-up-enter,.move-up-appear{opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.move-up-leave{animation-timing-function:cubic-bezier(.6,.04,.98,.34)}.ant-move-down-enter,.ant-move-down-appear,.ant-move-down-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.ant-move-down-enter.ant-move-down-enter-active,.ant-move-down-appear.ant-move-down-appear-active{animation-name:antMoveDownIn;animation-play-state:running}.ant-move-down-leave.ant-move-down-leave-active{animation-name:antMoveDownOut;animation-play-state:running;pointer-events:none}.ant-move-down-enter,.ant-move-down-appear{opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.ant-move-down-leave{animation-timing-function:cubic-bezier(.6,.04,.98,.34)}.move-down-enter,.move-down-appear,.move-down-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.move-down-enter.move-down-enter-active,.move-down-appear.move-down-appear-active{animation-name:antMoveDownIn;animation-play-state:running}.move-down-leave.move-down-leave-active{animation-name:antMoveDownOut;animation-play-state:running;pointer-events:none}.move-down-enter,.move-down-appear{opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.move-down-leave{animation-timing-function:cubic-bezier(.6,.04,.98,.34)}.ant-move-left-enter,.ant-move-left-appear,.ant-move-left-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.ant-move-left-enter.ant-move-left-enter-active,.ant-move-left-appear.ant-move-left-appear-active{animation-name:antMoveLeftIn;animation-play-state:running}.ant-move-left-leave.ant-move-left-leave-active{animation-name:antMoveLeftOut;animation-play-state:running;pointer-events:none}.ant-move-left-enter,.ant-move-left-appear{opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.ant-move-left-leave{animation-timing-function:cubic-bezier(.6,.04,.98,.34)}.move-left-enter,.move-left-appear,.move-left-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.move-left-enter.move-left-enter-active,.move-left-appear.move-left-appear-active{animation-name:antMoveLeftIn;animation-play-state:running}.move-left-leave.move-left-leave-active{animation-name:antMoveLeftOut;animation-play-state:running;pointer-events:none}.move-left-enter,.move-left-appear{opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.move-left-leave{animation-timing-function:cubic-bezier(.6,.04,.98,.34)}.ant-move-right-enter,.ant-move-right-appear,.ant-move-right-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.ant-move-right-enter.ant-move-right-enter-active,.ant-move-right-appear.ant-move-right-appear-active{animation-name:antMoveRightIn;animation-play-state:running}.ant-move-right-leave.ant-move-right-leave-active{animation-name:antMoveRightOut;animation-play-state:running;pointer-events:none}.ant-move-right-enter,.ant-move-right-appear{opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.ant-move-right-leave{animation-timing-function:cubic-bezier(.6,.04,.98,.34)}.move-right-enter,.move-right-appear,.move-right-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.move-right-enter.move-right-enter-active,.move-right-appear.move-right-appear-active{animation-name:antMoveRightIn;animation-play-state:running}.move-right-leave.move-right-leave-active{animation-name:antMoveRightOut;animation-play-state:running;pointer-events:none}.move-right-enter,.move-right-appear{opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.move-right-leave{animation-timing-function:cubic-bezier(.6,.04,.98,.34)}@keyframes antMoveDownIn{0%{transform:translateY(100%);transform-origin:0 0;opacity:0}to{transform:translateY(0);transform-origin:0 0;opacity:1}}@keyframes antMoveDownOut{0%{transform:translateY(0);transform-origin:0 0;opacity:1}to{transform:translateY(100%);transform-origin:0 0;opacity:0}}@keyframes antMoveLeftIn{0%{transform:translate(-100%);transform-origin:0 0;opacity:0}to{transform:translate(0);transform-origin:0 0;opacity:1}}@keyframes antMoveLeftOut{0%{transform:translate(0);transform-origin:0 0;opacity:1}to{transform:translate(-100%);transform-origin:0 0;opacity:0}}@keyframes antMoveRightIn{0%{transform:translate(100%);transform-origin:0 0;opacity:0}to{transform:translate(0);transform-origin:0 0;opacity:1}}@keyframes antMoveRightOut{0%{transform:translate(0);transform-origin:0 0;opacity:1}to{transform:translate(100%);transform-origin:0 0;opacity:0}}@keyframes antMoveUpIn{0%{transform:translateY(-100%);transform-origin:0 0;opacity:0}to{transform:translateY(0);transform-origin:0 0;opacity:1}}@keyframes antMoveUpOut{0%{transform:translateY(0);transform-origin:0 0;opacity:1}to{transform:translateY(-100%);transform-origin:0 0;opacity:0}}@keyframes loadingCircle{to{transform:rotate(360deg)}}[ant-click-animating=true],[ant-click-animating-without-extra-node=true]{position:relative}html{--antd-wave-shadow-color: #8D6A46;--scroll-bar: 0}[ant-click-animating-without-extra-node=true]:after,.ant-click-animating-node{position:absolute;top:0;right:0;bottom:0;left:0;display:block;border-radius:inherit;box-shadow:0 0 #8d6a46;box-shadow:0 0 0 0 var(--antd-wave-shadow-color);opacity:.2;animation:fadeEffect 2s cubic-bezier(.08,.82,.17,1),waveEffect .4s cubic-bezier(.08,.82,.17,1);animation-fill-mode:forwards;content:"";pointer-events:none}@keyframes waveEffect{to{box-shadow:0 0 #8d6a46;box-shadow:0 0 0 6px var(--antd-wave-shadow-color)}}@keyframes fadeEffect{to{opacity:0}}.slide-up-enter,.slide-up-appear,.slide-up-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.slide-up-enter.slide-up-enter-active,.slide-up-appear.slide-up-appear-active{animation-name:antSlideUpIn;animation-play-state:running}.slide-up-leave.slide-up-leave-active{animation-name:antSlideUpOut;animation-play-state:running;pointer-events:none}.slide-up-enter,.slide-up-appear{opacity:0;animation-timing-function:cubic-bezier(.23,1,.32,1)}.slide-up-leave{animation-timing-function:cubic-bezier(.755,.05,.855,.06)}.slide-down-enter,.slide-down-appear,.slide-down-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.slide-down-enter.slide-down-enter-active,.slide-down-appear.slide-down-appear-active{animation-name:antSlideDownIn;animation-play-state:running}.slide-down-leave.slide-down-leave-active{animation-name:antSlideDownOut;animation-play-state:running;pointer-events:none}.slide-down-enter,.slide-down-appear{opacity:0;animation-timing-function:cubic-bezier(.23,1,.32,1)}.slide-down-leave{animation-timing-function:cubic-bezier(.755,.05,.855,.06)}.slide-left-enter,.slide-left-appear,.slide-left-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.slide-left-enter.slide-left-enter-active,.slide-left-appear.slide-left-appear-active{animation-name:antSlideLeftIn;animation-play-state:running}.slide-left-leave.slide-left-leave-active{animation-name:antSlideLeftOut;animation-play-state:running;pointer-events:none}.slide-left-enter,.slide-left-appear{opacity:0;animation-timing-function:cubic-bezier(.23,1,.32,1)}.slide-left-leave{animation-timing-function:cubic-bezier(.755,.05,.855,.06)}.slide-right-enter,.slide-right-appear,.slide-right-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.slide-right-enter.slide-right-enter-active,.slide-right-appear.slide-right-appear-active{animation-name:antSlideRightIn;animation-play-state:running}.slide-right-leave.slide-right-leave-active{animation-name:antSlideRightOut;animation-play-state:running;pointer-events:none}.slide-right-enter,.slide-right-appear{opacity:0;animation-timing-function:cubic-bezier(.23,1,.32,1)}.slide-right-leave{animation-timing-function:cubic-bezier(.755,.05,.855,.06)}.ant-slide-up-enter,.ant-slide-up-appear,.ant-slide-up-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.ant-slide-up-enter.ant-slide-up-enter-active,.ant-slide-up-appear.ant-slide-up-appear-active{animation-name:antSlideUpIn;animation-play-state:running}.ant-slide-up-leave.ant-slide-up-leave-active{animation-name:antSlideUpOut;animation-play-state:running;pointer-events:none}.ant-slide-up-enter,.ant-slide-up-appear{opacity:0;animation-timing-function:cubic-bezier(.23,1,.32,1)}.ant-slide-up-leave{animation-timing-function:cubic-bezier(.755,.05,.855,.06)}.ant-slide-down-enter,.ant-slide-down-appear,.ant-slide-down-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.ant-slide-down-enter.ant-slide-down-enter-active,.ant-slide-down-appear.ant-slide-down-appear-active{animation-name:antSlideDownIn;animation-play-state:running}.ant-slide-down-leave.ant-slide-down-leave-active{animation-name:antSlideDownOut;animation-play-state:running;pointer-events:none}.ant-slide-down-enter,.ant-slide-down-appear{opacity:0;animation-timing-function:cubic-bezier(.23,1,.32,1)}.ant-slide-down-leave{animation-timing-function:cubic-bezier(.755,.05,.855,.06)}.ant-slide-left-enter,.ant-slide-left-appear,.ant-slide-left-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.ant-slide-left-enter.ant-slide-left-enter-active,.ant-slide-left-appear.ant-slide-left-appear-active{animation-name:antSlideLeftIn;animation-play-state:running}.ant-slide-left-leave.ant-slide-left-leave-active{animation-name:antSlideLeftOut;animation-play-state:running;pointer-events:none}.ant-slide-left-enter,.ant-slide-left-appear{opacity:0;animation-timing-function:cubic-bezier(.23,1,.32,1)}.ant-slide-left-leave{animation-timing-function:cubic-bezier(.755,.05,.855,.06)}.ant-slide-right-enter,.ant-slide-right-appear,.ant-slide-right-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.ant-slide-right-enter.ant-slide-right-enter-active,.ant-slide-right-appear.ant-slide-right-appear-active{animation-name:antSlideRightIn;animation-play-state:running}.ant-slide-right-leave.ant-slide-right-leave-active{animation-name:antSlideRightOut;animation-play-state:running;pointer-events:none}.ant-slide-right-enter,.ant-slide-right-appear{opacity:0;animation-timing-function:cubic-bezier(.23,1,.32,1)}.ant-slide-right-leave{animation-timing-function:cubic-bezier(.755,.05,.855,.06)}@keyframes antSlideUpIn{0%{transform:scaleY(.8);transform-origin:0% 0%;opacity:0}to{transform:scaleY(1);transform-origin:0% 0%;opacity:1}}@keyframes antSlideUpOut{0%{transform:scaleY(1);transform-origin:0% 0%;opacity:1}to{transform:scaleY(.8);transform-origin:0% 0%;opacity:0}}@keyframes antSlideDownIn{0%{transform:scaleY(.8);transform-origin:100% 100%;opacity:0}to{transform:scaleY(1);transform-origin:100% 100%;opacity:1}}@keyframes antSlideDownOut{0%{transform:scaleY(1);transform-origin:100% 100%;opacity:1}to{transform:scaleY(.8);transform-origin:100% 100%;opacity:0}}@keyframes antSlideLeftIn{0%{transform:scaleX(.8);transform-origin:0% 0%;opacity:0}to{transform:scaleX(1);transform-origin:0% 0%;opacity:1}}@keyframes antSlideLeftOut{0%{transform:scaleX(1);transform-origin:0% 0%;opacity:1}to{transform:scaleX(.8);transform-origin:0% 0%;opacity:0}}@keyframes antSlideRightIn{0%{transform:scaleX(.8);transform-origin:100% 0%;opacity:0}to{transform:scaleX(1);transform-origin:100% 0%;opacity:1}}@keyframes antSlideRightOut{0%{transform:scaleX(1);transform-origin:100% 0%;opacity:1}to{transform:scaleX(.8);transform-origin:100% 0%;opacity:0}}.ant-zoom-enter,.ant-zoom-appear,.ant-zoom-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.ant-zoom-enter.ant-zoom-enter-active,.ant-zoom-appear.ant-zoom-appear-active{animation-name:antZoomIn;animation-play-state:running}.ant-zoom-leave.ant-zoom-leave-active{animation-name:antZoomOut;animation-play-state:running;pointer-events:none}.ant-zoom-enter,.ant-zoom-appear{transform:scale(0);opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.ant-zoom-enter-prepare,.ant-zoom-appear-prepare{transform:none}.ant-zoom-leave{animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.zoom-enter,.zoom-appear,.zoom-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.zoom-enter.zoom-enter-active,.zoom-appear.zoom-appear-active{animation-name:antZoomIn;animation-play-state:running}.zoom-leave.zoom-leave-active{animation-name:antZoomOut;animation-play-state:running;pointer-events:none}.zoom-enter,.zoom-appear{transform:scale(0);opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.zoom-enter-prepare,.zoom-appear-prepare{transform:none}.zoom-leave{animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.ant-zoom-big-enter,.ant-zoom-big-appear,.ant-zoom-big-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.ant-zoom-big-enter.ant-zoom-big-enter-active,.ant-zoom-big-appear.ant-zoom-big-appear-active{animation-name:antZoomBigIn;animation-play-state:running}.ant-zoom-big-leave.ant-zoom-big-leave-active{animation-name:antZoomBigOut;animation-play-state:running;pointer-events:none}.ant-zoom-big-enter,.ant-zoom-big-appear{transform:scale(0);opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.ant-zoom-big-enter-prepare,.ant-zoom-big-appear-prepare{transform:none}.ant-zoom-big-leave{animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.zoom-big-enter,.zoom-big-appear,.zoom-big-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.zoom-big-enter.zoom-big-enter-active,.zoom-big-appear.zoom-big-appear-active{animation-name:antZoomBigIn;animation-play-state:running}.zoom-big-leave.zoom-big-leave-active{animation-name:antZoomBigOut;animation-play-state:running;pointer-events:none}.zoom-big-enter,.zoom-big-appear{transform:scale(0);opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.zoom-big-enter-prepare,.zoom-big-appear-prepare{transform:none}.zoom-big-leave{animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.ant-zoom-big-fast-enter,.ant-zoom-big-fast-appear,.ant-zoom-big-fast-leave{animation-duration:.1s;animation-fill-mode:both;animation-play-state:paused}.ant-zoom-big-fast-enter.ant-zoom-big-fast-enter-active,.ant-zoom-big-fast-appear.ant-zoom-big-fast-appear-active{animation-name:antZoomBigIn;animation-play-state:running}.ant-zoom-big-fast-leave.ant-zoom-big-fast-leave-active{animation-name:antZoomBigOut;animation-play-state:running;pointer-events:none}.ant-zoom-big-fast-enter,.ant-zoom-big-fast-appear{transform:scale(0);opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.ant-zoom-big-fast-enter-prepare,.ant-zoom-big-fast-appear-prepare{transform:none}.ant-zoom-big-fast-leave{animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.zoom-big-fast-enter,.zoom-big-fast-appear,.zoom-big-fast-leave{animation-duration:.1s;animation-fill-mode:both;animation-play-state:paused}.zoom-big-fast-enter.zoom-big-fast-enter-active,.zoom-big-fast-appear.zoom-big-fast-appear-active{animation-name:antZoomBigIn;animation-play-state:running}.zoom-big-fast-leave.zoom-big-fast-leave-active{animation-name:antZoomBigOut;animation-play-state:running;pointer-events:none}.zoom-big-fast-enter,.zoom-big-fast-appear{transform:scale(0);opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.zoom-big-fast-enter-prepare,.zoom-big-fast-appear-prepare{transform:none}.zoom-big-fast-leave{animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.ant-zoom-up-enter,.ant-zoom-up-appear,.ant-zoom-up-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.ant-zoom-up-enter.ant-zoom-up-enter-active,.ant-zoom-up-appear.ant-zoom-up-appear-active{animation-name:antZoomUpIn;animation-play-state:running}.ant-zoom-up-leave.ant-zoom-up-leave-active{animation-name:antZoomUpOut;animation-play-state:running;pointer-events:none}.ant-zoom-up-enter,.ant-zoom-up-appear{transform:scale(0);opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.ant-zoom-up-enter-prepare,.ant-zoom-up-appear-prepare{transform:none}.ant-zoom-up-leave{animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.zoom-up-enter,.zoom-up-appear,.zoom-up-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.zoom-up-enter.zoom-up-enter-active,.zoom-up-appear.zoom-up-appear-active{animation-name:antZoomUpIn;animation-play-state:running}.zoom-up-leave.zoom-up-leave-active{animation-name:antZoomUpOut;animation-play-state:running;pointer-events:none}.zoom-up-enter,.zoom-up-appear{transform:scale(0);opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.zoom-up-enter-prepare,.zoom-up-appear-prepare{transform:none}.zoom-up-leave{animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.ant-zoom-down-enter,.ant-zoom-down-appear,.ant-zoom-down-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.ant-zoom-down-enter.ant-zoom-down-enter-active,.ant-zoom-down-appear.ant-zoom-down-appear-active{animation-name:antZoomDownIn;animation-play-state:running}.ant-zoom-down-leave.ant-zoom-down-leave-active{animation-name:antZoomDownOut;animation-play-state:running;pointer-events:none}.ant-zoom-down-enter,.ant-zoom-down-appear{transform:scale(0);opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.ant-zoom-down-enter-prepare,.ant-zoom-down-appear-prepare{transform:none}.ant-zoom-down-leave{animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.zoom-down-enter,.zoom-down-appear,.zoom-down-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.zoom-down-enter.zoom-down-enter-active,.zoom-down-appear.zoom-down-appear-active{animation-name:antZoomDownIn;animation-play-state:running}.zoom-down-leave.zoom-down-leave-active{animation-name:antZoomDownOut;animation-play-state:running;pointer-events:none}.zoom-down-enter,.zoom-down-appear{transform:scale(0);opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.zoom-down-enter-prepare,.zoom-down-appear-prepare{transform:none}.zoom-down-leave{animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.ant-zoom-left-enter,.ant-zoom-left-appear,.ant-zoom-left-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.ant-zoom-left-enter.ant-zoom-left-enter-active,.ant-zoom-left-appear.ant-zoom-left-appear-active{animation-name:antZoomLeftIn;animation-play-state:running}.ant-zoom-left-leave.ant-zoom-left-leave-active{animation-name:antZoomLeftOut;animation-play-state:running;pointer-events:none}.ant-zoom-left-enter,.ant-zoom-left-appear{transform:scale(0);opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.ant-zoom-left-enter-prepare,.ant-zoom-left-appear-prepare{transform:none}.ant-zoom-left-leave{animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.zoom-left-enter,.zoom-left-appear,.zoom-left-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.zoom-left-enter.zoom-left-enter-active,.zoom-left-appear.zoom-left-appear-active{animation-name:antZoomLeftIn;animation-play-state:running}.zoom-left-leave.zoom-left-leave-active{animation-name:antZoomLeftOut;animation-play-state:running;pointer-events:none}.zoom-left-enter,.zoom-left-appear{transform:scale(0);opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.zoom-left-enter-prepare,.zoom-left-appear-prepare{transform:none}.zoom-left-leave{animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.ant-zoom-right-enter,.ant-zoom-right-appear,.ant-zoom-right-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.ant-zoom-right-enter.ant-zoom-right-enter-active,.ant-zoom-right-appear.ant-zoom-right-appear-active{animation-name:antZoomRightIn;animation-play-state:running}.ant-zoom-right-leave.ant-zoom-right-leave-active{animation-name:antZoomRightOut;animation-play-state:running;pointer-events:none}.ant-zoom-right-enter,.ant-zoom-right-appear{transform:scale(0);opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.ant-zoom-right-enter-prepare,.ant-zoom-right-appear-prepare{transform:none}.ant-zoom-right-leave{animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.zoom-right-enter,.zoom-right-appear,.zoom-right-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.zoom-right-enter.zoom-right-enter-active,.zoom-right-appear.zoom-right-appear-active{animation-name:antZoomRightIn;animation-play-state:running}.zoom-right-leave.zoom-right-leave-active{animation-name:antZoomRightOut;animation-play-state:running;pointer-events:none}.zoom-right-enter,.zoom-right-appear{transform:scale(0);opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.zoom-right-enter-prepare,.zoom-right-appear-prepare{transform:none}.zoom-right-leave{animation-timing-function:cubic-bezier(.78,.14,.15,.86)}@keyframes antZoomIn{0%{transform:scale(.2);opacity:0}to{transform:scale(1);opacity:1}}@keyframes antZoomOut{0%{transform:scale(1)}to{transform:scale(.2);opacity:0}}@keyframes antZoomBigIn{0%{transform:scale(.8);opacity:0}to{transform:scale(1);opacity:1}}@keyframes antZoomBigOut{0%{transform:scale(1)}to{transform:scale(.8);opacity:0}}@keyframes antZoomUpIn{0%{transform:scale(.8);transform-origin:50% 0%;opacity:0}to{transform:scale(1);transform-origin:50% 0%}}@keyframes antZoomUpOut{0%{transform:scale(1);transform-origin:50% 0%}to{transform:scale(.8);transform-origin:50% 0%;opacity:0}}@keyframes antZoomLeftIn{0%{transform:scale(.8);transform-origin:0% 50%;opacity:0}to{transform:scale(1);transform-origin:0% 50%}}@keyframes antZoomLeftOut{0%{transform:scale(1);transform-origin:0% 50%}to{transform:scale(.8);transform-origin:0% 50%;opacity:0}}@keyframes antZoomRightIn{0%{transform:scale(.8);transform-origin:100% 50%;opacity:0}to{transform:scale(1);transform-origin:100% 50%}}@keyframes antZoomRightOut{0%{transform:scale(1);transform-origin:100% 50%}to{transform:scale(.8);transform-origin:100% 50%;opacity:0}}@keyframes antZoomDownIn{0%{transform:scale(.8);transform-origin:50% 100%;opacity:0}to{transform:scale(1);transform-origin:50% 100%}}@keyframes antZoomDownOut{0%{transform:scale(1);transform-origin:50% 100%}to{transform:scale(.8);transform-origin:50% 100%;opacity:0}}.ant-motion-collapse-legacy{overflow:hidden}.ant-motion-collapse-legacy-active{transition:height .2s cubic-bezier(.645,.045,.355,1),opacity .2s cubic-bezier(.645,.045,.355,1)!important}.ant-motion-collapse{overflow:hidden;transition:height .2s cubic-bezier(.645,.045,.355,1),opacity .2s cubic-bezier(.645,.045,.355,1)!important}.ant-affix{position:fixed;z-index:10}.ant-alert{box-sizing:border-box;margin:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:relative;display:flex;align-items:center;padding:8px 15px;word-wrap:break-word;border-radius:5px}.ant-alert-content{flex:1;min-width:0}.ant-alert-icon{margin-right:8px}.ant-alert-description{display:none;font-size:14px;line-height:22px}.ant-alert-success{background-color:#f6ffed;border:1px solid #b7eb8f}.ant-alert-success .ant-alert-icon{color:#52c41a}.ant-alert-info{background-color:#ccc8c0;border:1px solid #b3aea8}.ant-alert-info .ant-alert-icon{color:#8d6a46}.ant-alert-warning{background-color:#fffbe6;border:1px solid #ffe58f}.ant-alert-warning .ant-alert-icon{color:#faad14}.ant-alert-error{background-color:#ffece8;border:1px solid #ffa196}.ant-alert-error .ant-alert-icon{color:#e31a1a}.ant-alert-error .ant-alert-description>pre{margin:0;padding:0}.ant-alert-action{margin-left:8px}.ant-alert-close-icon{margin-left:8px;padding:0;overflow:hidden;font-size:12px;line-height:12px;background-color:transparent;border:none;outline:none;cursor:pointer}.ant-alert-close-icon .anticon-close{color:#00000073;transition:color .3s}.ant-alert-close-icon .anticon-close:hover{color:#000000bf}.ant-alert-close-text{color:#00000073;transition:color .3s}.ant-alert-close-text:hover{color:#000000bf}.ant-alert-with-description{align-items:flex-start;padding:15px 15px 15px 24px}.ant-alert-with-description.ant-alert-no-icon{padding:15px}.ant-alert-with-description .ant-alert-icon{margin-right:15px;font-size:24px}.ant-alert-with-description .ant-alert-message{display:block;margin-bottom:4px;color:#1c2d56;font-size:16px}.ant-alert-message{color:#1c2d56}.ant-alert-with-description .ant-alert-description{display:block}.ant-alert.ant-alert-motion-leave{overflow:hidden;opacity:1;transition:max-height .3s cubic-bezier(.78,.14,.15,.86),opacity .3s cubic-bezier(.78,.14,.15,.86),padding-top .3s cubic-bezier(.78,.14,.15,.86),padding-bottom .3s cubic-bezier(.78,.14,.15,.86),margin-bottom .3s cubic-bezier(.78,.14,.15,.86)}.ant-alert.ant-alert-motion-leave-active{max-height:0;margin-bottom:0!important;padding-top:0;padding-bottom:0;opacity:0}.ant-alert-banner{margin-bottom:0;border:0;border-radius:0}.ant-alert.ant-alert-rtl{direction:rtl}.ant-alert-rtl .ant-alert-icon{margin-right:auto;margin-left:8px}.ant-alert-rtl .ant-alert-action,.ant-alert-rtl .ant-alert-close-icon{margin-right:8px;margin-left:auto}.ant-alert-rtl.ant-alert-with-description{padding-right:24px;padding-left:15px}.ant-alert-rtl.ant-alert-with-description .ant-alert-icon{margin-right:auto;margin-left:15px}.ant-anchor{box-sizing:border-box;margin:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:relative;padding:0 0 0 2px}.ant-anchor-wrapper{margin-left:-4px;padding-left:4px;overflow:auto;background-color:transparent}.ant-anchor-ink{position:absolute;top:0;left:0;height:100%}.ant-anchor-ink:before{position:relative;display:block;width:2px;height:100%;margin:0 auto;background-color:#f0f0f0;content:" "}.ant-anchor-ink-ball{position:absolute;left:50%;display:none;width:8px;height:8px;background-color:var(--c-canvas);border:2px solid #8D6A46;border-radius:8px;transform:translate(-50%);transition:top .3s ease-in-out}.ant-anchor-ink-ball.visible{display:inline-block}.ant-anchor-fixed .ant-anchor-ink .ant-anchor-ink-ball{display:none}.ant-anchor-link{padding:7px 0 7px 16px;line-height:1.143}.ant-anchor-link-title{position:relative;display:block;margin-bottom:6px;overflow:hidden;color:#000000d9;white-space:nowrap;text-overflow:ellipsis;transition:all .3s}.ant-anchor-link-title:only-child{margin-bottom:0}.ant-anchor-link-active>.ant-anchor-link-title{color:#8d6a46}.ant-anchor-link .ant-anchor-link{padding-top:5px;padding-bottom:5px}.ant-anchor-rtl{direction:rtl}.ant-anchor-rtl.ant-anchor-wrapper{margin-right:-4px;margin-left:0;padding-right:4px;padding-left:0}.ant-anchor-rtl .ant-anchor-ink{right:0;left:auto}.ant-anchor-rtl .ant-anchor-ink-ball{right:50%;left:0;transform:translate(50%)}.ant-anchor-rtl .ant-anchor-link{padding:7px 16px 7px 0}.ant-select-auto-complete{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum"}.ant-select-auto-complete .ant-select-clear{right:13px}.ant-avatar{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:relative;display:inline-block;overflow:hidden;color:#fff;white-space:nowrap;text-align:center;vertical-align:middle;background:#ccc;width:32px;height:32px;line-height:32px;border-radius:50%}.ant-avatar-image{background:transparent}.ant-avatar .ant-image-img{display:block}.ant-avatar-string{position:absolute;left:50%;transform-origin:0 center}.ant-avatar.ant-avatar-icon{font-size:18px}.ant-avatar.ant-avatar-icon>.anticon{margin:0}.ant-avatar-lg{width:40px;height:40px;line-height:40px;border-radius:50%}.ant-avatar-lg-string{position:absolute;left:50%;transform-origin:0 center}.ant-avatar-lg.ant-avatar-icon{font-size:24px}.ant-avatar-lg.ant-avatar-icon>.anticon{margin:0}.ant-avatar-sm{width:24px;height:24px;line-height:24px;border-radius:50%}.ant-avatar-sm-string{position:absolute;left:50%;transform-origin:0 center}.ant-avatar-sm.ant-avatar-icon{font-size:14px}.ant-avatar-sm.ant-avatar-icon>.anticon{margin:0}.ant-avatar-square{border-radius:5px}.ant-avatar>img{display:block;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.ant-avatar-group{display:inline-flex}.ant-avatar-group .ant-avatar{border:1px solid #fff}.ant-avatar-group .ant-avatar:not(:first-child){margin-left:-8px}.ant-avatar-group-popover .ant-avatar+.ant-avatar{margin-left:3px}.ant-avatar-group-rtl .ant-avatar:not(:first-child){margin-right:-8px;margin-left:0}.ant-avatar-group-popover.ant-popover-rtl .ant-avatar+.ant-avatar{margin-right:3px;margin-left:0}.ant-back-top{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:fixed;right:100px;bottom:50px;z-index:10;width:40px;height:40px;cursor:pointer}.ant-back-top:empty{display:none}.ant-back-top-rtl{right:auto;left:100px;direction:rtl}.ant-back-top-content{width:40px;height:40px;overflow:hidden;color:#fff;text-align:center;background-color:#00000073;border-radius:20px;transition:all .3s}.ant-back-top-content:hover{background-color:#000000d9;transition:all .3s}.ant-back-top-icon{font-size:24px;line-height:40px}@media screen and (max-width: 768px){.ant-back-top{right:60px}}@media screen and (max-width: 480px){.ant-back-top{right:20px}}.ant-badge{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;list-style:none;font-feature-settings:"tnum";position:relative;display:inline-block;line-height:1}.ant-badge-count{z-index:auto;min-width:20px;height:20px;padding:0 6px;color:var(--c-canvas);font-weight:400;font-size:12px;line-height:20px;white-space:nowrap;text-align:center;background:#ff4d4f;border-radius:10px;box-shadow:0 0 0 1px var(--c-canvas)}.ant-badge-count a,.ant-badge-count a:hover{color:var(--c-canvas)}.ant-badge-count-sm{min-width:14px;height:14px;padding:0;font-size:12px;line-height:14px;border-radius:7px}.ant-badge-multiple-words{padding:0 8px}.ant-badge-dot{z-index:auto;width:6px;min-width:6px;height:6px;background:#ff4d4f;border-radius:100%;box-shadow:0 0 0 1px var(--c-canvas)}.ant-badge-dot.ant-scroll-number{transition:background 1.5s}.ant-badge-count,.ant-badge-dot,.ant-badge .ant-scroll-number-custom-component{position:absolute;top:0;right:0;transform:translate(50%,-50%);transform-origin:100% 0%}.ant-badge-count.anticon-spin,.ant-badge-dot.anticon-spin,.ant-badge .ant-scroll-number-custom-component.anticon-spin{animation:antBadgeLoadingCircle 1s infinite linear}.ant-badge-status{line-height:inherit;vertical-align:baseline}.ant-badge-status-dot{position:relative;top:-1px;display:inline-block;width:6px;height:6px;vertical-align:middle;border-radius:50%}.ant-badge-status-success{background-color:#52c41a}.ant-badge-status-processing{position:relative;background-color:#1890ff}.ant-badge-status-processing:after{position:absolute;top:0;left:0;width:100%;height:100%;border:1px solid #1890ff;border-radius:50%;animation:antStatusProcessing 1.2s infinite ease-in-out;content:""}.ant-badge-status-default{background-color:#d9d9d9}.ant-badge-status-error{background-color:#e31a1a}.ant-badge-status-warning{background-color:#faad14}.ant-badge-status-pink,.ant-badge-status-magenta{background:#eb2f96}.ant-badge-status-red{background:#f5222d}.ant-badge-status-volcano{background:#fa541c}.ant-badge-status-orange{background:#fa8c16}.ant-badge-status-yellow{background:#fadb14}.ant-badge-status-gold{background:#faad14}.ant-badge-status-cyan{background:#13c2c2}.ant-badge-status-lime{background:#a0d911}.ant-badge-status-green{background:#52c41a}.ant-badge-status-blue{background:#1890ff}.ant-badge-status-geekblue{background:#2f54eb}.ant-badge-status-purple{background:#722ed1}.ant-badge-status-text{margin-left:8px;color:#000000d9;font-size:14px}.ant-badge-zoom-appear,.ant-badge-zoom-enter{animation:antZoomBadgeIn .3s cubic-bezier(.12,.4,.29,1.46);animation-fill-mode:both}.ant-badge-zoom-leave{animation:antZoomBadgeOut .3s cubic-bezier(.71,-.46,.88,.6);animation-fill-mode:both}.ant-badge-not-a-wrapper .ant-badge-zoom-appear,.ant-badge-not-a-wrapper .ant-badge-zoom-enter{animation:antNoWrapperZoomBadgeIn .3s cubic-bezier(.12,.4,.29,1.46)}.ant-badge-not-a-wrapper .ant-badge-zoom-leave{animation:antNoWrapperZoomBadgeOut .3s cubic-bezier(.71,-.46,.88,.6)}.ant-badge-not-a-wrapper:not(.ant-badge-status){vertical-align:middle}.ant-badge-not-a-wrapper .ant-scroll-number-custom-component,.ant-badge-not-a-wrapper .ant-badge-count{transform:none}.ant-badge-not-a-wrapper .ant-scroll-number-custom-component,.ant-badge-not-a-wrapper .ant-scroll-number{position:relative;top:auto;display:block;transform-origin:50% 50%}@keyframes antStatusProcessing{0%{transform:scale(.8);opacity:.5}to{transform:scale(2.4);opacity:0}}.ant-scroll-number{overflow:hidden;direction:ltr}.ant-scroll-number-only{position:relative;display:inline-block;height:20px;transition:all .3s cubic-bezier(.645,.045,.355,1);-webkit-transform-style:preserve-3d;-webkit-backface-visibility:hidden}.ant-scroll-number-only>p.ant-scroll-number-only-unit{height:20px;margin:0;-webkit-transform-style:preserve-3d;-webkit-backface-visibility:hidden}.ant-scroll-number-symbol{vertical-align:top}@keyframes antZoomBadgeIn{0%{transform:scale(0) translate(50%,-50%);opacity:0}to{transform:scale(1) translate(50%,-50%)}}@keyframes antZoomBadgeOut{0%{transform:scale(1) translate(50%,-50%)}to{transform:scale(0) translate(50%,-50%);opacity:0}}@keyframes antNoWrapperZoomBadgeIn{0%{transform:scale(0);opacity:0}to{transform:scale(1)}}@keyframes antNoWrapperZoomBadgeOut{0%{transform:scale(1)}to{transform:scale(0);opacity:0}}@keyframes antBadgeLoadingCircle{0%{transform-origin:50%}to{transform:translate(50%,-50%) rotate(360deg);transform-origin:50%}}.ant-ribbon-wrapper{position:relative}.ant-ribbon{box-sizing:border-box;margin:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:absolute;top:8px;height:22px;padding:0 8px;color:var(--c-canvas);line-height:22px;white-space:nowrap;background-color:#8d6a46;border-radius:5px}.ant-ribbon-text{color:#fff}.ant-ribbon-corner{position:absolute;top:100%;width:8px;height:8px;color:currentcolor;border:4px solid;transform:scaleY(.75);transform-origin:top}.ant-ribbon-corner:after{position:absolute;top:-4px;left:-4px;width:inherit;height:inherit;color:#00000040;border:inherit;content:""}.ant-ribbon-color-pink,.ant-ribbon-color-magenta{color:#eb2f96;background:#eb2f96}.ant-ribbon-color-red{color:#f5222d;background:#f5222d}.ant-ribbon-color-volcano{color:#fa541c;background:#fa541c}.ant-ribbon-color-orange{color:#fa8c16;background:#fa8c16}.ant-ribbon-color-yellow{color:#fadb14;background:#fadb14}.ant-ribbon-color-gold{color:#faad14;background:#faad14}.ant-ribbon-color-cyan{color:#13c2c2;background:#13c2c2}.ant-ribbon-color-lime{color:#a0d911;background:#a0d911}.ant-ribbon-color-green{color:#52c41a;background:#52c41a}.ant-ribbon-color-blue{color:#1890ff;background:#1890ff}.ant-ribbon-color-geekblue{color:#2f54eb;background:#2f54eb}.ant-ribbon-color-purple{color:#722ed1;background:#722ed1}.ant-ribbon.ant-ribbon-placement-end{right:-8px;border-bottom-right-radius:0}.ant-ribbon.ant-ribbon-placement-end .ant-ribbon-corner{right:0;border-color:currentcolor transparent transparent currentcolor}.ant-ribbon.ant-ribbon-placement-start{left:-8px;border-bottom-left-radius:0}.ant-ribbon.ant-ribbon-placement-start .ant-ribbon-corner{left:0;border-color:currentcolor currentcolor transparent transparent}.ant-badge-rtl{direction:rtl}.ant-badge-rtl .ant-badge:not(.ant-badge-not-a-wrapper) .ant-badge-count,.ant-badge-rtl .ant-badge:not(.ant-badge-not-a-wrapper) .ant-badge-dot,.ant-badge-rtl .ant-badge:not(.ant-badge-not-a-wrapper) .ant-scroll-number-custom-component{right:auto;left:0;direction:ltr;transform:translate(-50%,-50%);transform-origin:0% 0%}.ant-badge-rtl.ant-badge:not(.ant-badge-not-a-wrapper) .ant-scroll-number-custom-component{right:auto;left:0;transform:translate(-50%,-50%);transform-origin:0% 0%}.ant-badge-rtl .ant-badge-status-text{margin-right:8px;margin-left:0}.ant-ribbon-rtl{direction:rtl}.ant-ribbon-rtl.ant-ribbon-placement-end{right:unset;left:-8px;border-bottom-right-radius:5px;border-bottom-left-radius:0}.ant-ribbon-rtl.ant-ribbon-placement-end .ant-ribbon-corner{right:unset;left:0;border-color:currentcolor currentcolor transparent transparent}.ant-ribbon-rtl.ant-ribbon-placement-end .ant-ribbon-corner:after{border-color:currentcolor currentcolor transparent transparent}.ant-ribbon-rtl.ant-ribbon-placement-start{right:-8px;left:unset;border-bottom-right-radius:0;border-bottom-left-radius:5px}.ant-ribbon-rtl.ant-ribbon-placement-start .ant-ribbon-corner{right:0;left:unset;border-color:currentcolor transparent transparent currentcolor}.ant-ribbon-rtl.ant-ribbon-placement-start .ant-ribbon-corner:after{border-color:currentcolor transparent transparent currentcolor}.ant-breadcrumb{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";color:#00000073;font-size:14px}.ant-breadcrumb .anticon{font-size:14px}.ant-breadcrumb a{color:#00000073;transition:color .3s}.ant-breadcrumb a:hover{color:#998165}.ant-breadcrumb>span:last-child{color:#000000d9}.ant-breadcrumb>span:last-child a{color:#000000d9}.ant-breadcrumb>span:last-child .ant-breadcrumb-separator{display:none}.ant-breadcrumb-separator{margin:0 8px;color:#00000073}.ant-breadcrumb-link>.anticon+span,.ant-breadcrumb-link>.anticon+a{margin-left:4px}.ant-breadcrumb-overlay-link>.anticon{margin-left:4px}.ant-breadcrumb-rtl{direction:rtl}.ant-breadcrumb-rtl:before{display:table;content:""}.ant-breadcrumb-rtl:after{display:table;clear:both;content:""}.ant-breadcrumb-rtl>span{float:right}.ant-breadcrumb-rtl .ant-breadcrumb-link>.anticon+span,.ant-breadcrumb-rtl .ant-breadcrumb-link>.anticon+a{margin-right:4px;margin-left:0}.ant-breadcrumb-rtl .ant-breadcrumb-overlay-link>.anticon{margin-right:4px;margin-left:0}.ant-btn{line-height:1.5715;position:relative;display:inline-block;font-weight:400;white-space:nowrap;text-align:center;background-image:none;border:1px solid transparent;box-shadow:0 2px #00000004;cursor:pointer;transition:all .3s cubic-bezier(.645,.045,.355,1);-webkit-user-select:none;-moz-user-select:none;user-select:none;touch-action:manipulation;height:32px;padding:4px 15px;font-size:14px;border-radius:5px;color:#000000d9;border-color:#d9d9d9;background:var(--c-canvas)}.ant-btn>.anticon{line-height:1}.ant-btn,.ant-btn:active,.ant-btn:focus{outline:0}.ant-btn:not([disabled]):hover{text-decoration:none}.ant-btn:not([disabled]):active{outline:0;box-shadow:none}.ant-btn[disabled]{cursor:not-allowed}.ant-btn[disabled]>*{pointer-events:none}.ant-btn-lg{height:42px;padding:7.4px 15px;font-size:16px;border-radius:5px}.ant-btn-sm{height:24px;padding:0 7px;font-size:14px;border-radius:5px}.ant-btn>a:only-child{color:currentcolor}.ant-btn>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn:hover,.ant-btn:focus{color:#998165;border-color:#998165;background:var(--c-canvas)}.ant-btn:hover>a:only-child,.ant-btn:focus>a:only-child{color:currentcolor}.ant-btn:hover>a:only-child:after,.ant-btn:focus>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn:active{color:#66482e;border-color:#66482e;background:var(--c-canvas)}.ant-btn:active>a:only-child{color:currentcolor}.ant-btn:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn[disabled],.ant-btn[disabled]:hover,.ant-btn[disabled]:focus,.ant-btn[disabled]:active{color:#00000040;border-color:#d9d9d9;background:#f5f5f5;text-shadow:none;box-shadow:none}.ant-btn[disabled]>a:only-child,.ant-btn[disabled]:hover>a:only-child,.ant-btn[disabled]:focus>a:only-child,.ant-btn[disabled]:active>a:only-child{color:currentcolor}.ant-btn[disabled]>a:only-child:after,.ant-btn[disabled]:hover>a:only-child:after,.ant-btn[disabled]:focus>a:only-child:after,.ant-btn[disabled]:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn:hover,.ant-btn:focus,.ant-btn:active{text-decoration:none;background:var(--c-canvas)}.ant-btn>span{display:inline-block}.ant-btn-primary{color:#fff;border-color:#8d6a46;background:#8d6a46;text-shadow:0 -1px 0 rgba(0,0,0,.12);box-shadow:0 2px #0000000b}.ant-btn-primary>a:only-child{color:currentcolor}.ant-btn-primary>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-primary:hover,.ant-btn-primary:focus{color:#fff;border-color:#998165;background:#998165}.ant-btn-primary:hover>a:only-child,.ant-btn-primary:focus>a:only-child{color:currentcolor}.ant-btn-primary:hover>a:only-child:after,.ant-btn-primary:focus>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-primary:active{color:#fff;border-color:#66482e;background:#66482e}.ant-btn-primary:active>a:only-child{color:currentcolor}.ant-btn-primary:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-primary[disabled],.ant-btn-primary[disabled]:hover,.ant-btn-primary[disabled]:focus,.ant-btn-primary[disabled]:active{color:#00000040;border-color:#d9d9d9;background:#f5f5f5;text-shadow:none;box-shadow:none}.ant-btn-primary[disabled]>a:only-child,.ant-btn-primary[disabled]:hover>a:only-child,.ant-btn-primary[disabled]:focus>a:only-child,.ant-btn-primary[disabled]:active>a:only-child{color:currentcolor}.ant-btn-primary[disabled]>a:only-child:after,.ant-btn-primary[disabled]:hover>a:only-child:after,.ant-btn-primary[disabled]:focus>a:only-child:after,.ant-btn-primary[disabled]:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-group .ant-btn-primary:not(:first-child):not(:last-child){border-right-color:#998165;border-left-color:#998165}.ant-btn-group .ant-btn-primary:not(:first-child):not(:last-child):disabled{border-color:#d9d9d9}.ant-btn-group .ant-btn-primary:first-child:not(:last-child){border-right-color:#998165}.ant-btn-group .ant-btn-primary:first-child:not(:last-child)[disabled]{border-right-color:#d9d9d9}.ant-btn-group .ant-btn-primary:last-child:not(:first-child),.ant-btn-group .ant-btn-primary+.ant-btn-primary{border-left-color:#998165}.ant-btn-group .ant-btn-primary:last-child:not(:first-child)[disabled],.ant-btn-group .ant-btn-primary+.ant-btn-primary[disabled]{border-left-color:#d9d9d9}.ant-btn-ghost{color:#000000d9;border-color:#d9d9d9;background:transparent}.ant-btn-ghost>a:only-child{color:currentcolor}.ant-btn-ghost>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-ghost:hover,.ant-btn-ghost:focus{color:#998165;border-color:#998165;background:transparent}.ant-btn-ghost:hover>a:only-child,.ant-btn-ghost:focus>a:only-child{color:currentcolor}.ant-btn-ghost:hover>a:only-child:after,.ant-btn-ghost:focus>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-ghost:active{color:#66482e;border-color:#66482e;background:transparent}.ant-btn-ghost:active>a:only-child{color:currentcolor}.ant-btn-ghost:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-ghost[disabled],.ant-btn-ghost[disabled]:hover,.ant-btn-ghost[disabled]:focus,.ant-btn-ghost[disabled]:active{color:#00000040;border-color:#d9d9d9;background:#f5f5f5;text-shadow:none;box-shadow:none}.ant-btn-ghost[disabled]>a:only-child,.ant-btn-ghost[disabled]:hover>a:only-child,.ant-btn-ghost[disabled]:focus>a:only-child,.ant-btn-ghost[disabled]:active>a:only-child{color:currentcolor}.ant-btn-ghost[disabled]>a:only-child:after,.ant-btn-ghost[disabled]:hover>a:only-child:after,.ant-btn-ghost[disabled]:focus>a:only-child:after,.ant-btn-ghost[disabled]:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dashed{color:#000000d9;border-color:#d9d9d9;background:var(--c-canvas);border-style:dashed}.ant-btn-dashed>a:only-child{color:currentcolor}.ant-btn-dashed>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dashed:hover,.ant-btn-dashed:focus{color:#998165;border-color:#998165;background:var(--c-canvas)}.ant-btn-dashed:hover>a:only-child,.ant-btn-dashed:focus>a:only-child{color:currentcolor}.ant-btn-dashed:hover>a:only-child:after,.ant-btn-dashed:focus>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dashed:active{color:#66482e;border-color:#66482e;background:var(--c-canvas)}.ant-btn-dashed:active>a:only-child{color:currentcolor}.ant-btn-dashed:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dashed[disabled],.ant-btn-dashed[disabled]:hover,.ant-btn-dashed[disabled]:focus,.ant-btn-dashed[disabled]:active{color:#00000040;border-color:#d9d9d9;background:#f5f5f5;text-shadow:none;box-shadow:none}.ant-btn-dashed[disabled]>a:only-child,.ant-btn-dashed[disabled]:hover>a:only-child,.ant-btn-dashed[disabled]:focus>a:only-child,.ant-btn-dashed[disabled]:active>a:only-child{color:currentcolor}.ant-btn-dashed[disabled]>a:only-child:after,.ant-btn-dashed[disabled]:hover>a:only-child:after,.ant-btn-dashed[disabled]:focus>a:only-child:after,.ant-btn-dashed[disabled]:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-danger{color:#fff;border-color:#e31a1a;background:#e31a1a;text-shadow:0 -1px 0 rgba(0,0,0,.12);box-shadow:0 2px #0000000b}.ant-btn-danger>a:only-child{color:currentcolor}.ant-btn-danger>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-danger:hover,.ant-btn-danger:focus{color:#fff;border-color:#f04741;background:#f04741}.ant-btn-danger:hover>a:only-child,.ant-btn-danger:focus>a:only-child{color:currentcolor}.ant-btn-danger:hover>a:only-child:after,.ant-btn-danger:focus>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-danger:active{color:#fff;border-color:#bd0b11;background:#bd0b11}.ant-btn-danger:active>a:only-child{color:currentcolor}.ant-btn-danger:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-danger[disabled],.ant-btn-danger[disabled]:hover,.ant-btn-danger[disabled]:focus,.ant-btn-danger[disabled]:active{color:#00000040;border-color:#d9d9d9;background:#f5f5f5;text-shadow:none;box-shadow:none}.ant-btn-danger[disabled]>a:only-child,.ant-btn-danger[disabled]:hover>a:only-child,.ant-btn-danger[disabled]:focus>a:only-child,.ant-btn-danger[disabled]:active>a:only-child{color:currentcolor}.ant-btn-danger[disabled]>a:only-child:after,.ant-btn-danger[disabled]:hover>a:only-child:after,.ant-btn-danger[disabled]:focus>a:only-child:after,.ant-btn-danger[disabled]:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-link{color:#1c2d56;border-color:transparent;background:transparent;box-shadow:none}.ant-btn-link>a:only-child{color:currentcolor}.ant-btn-link>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-link:hover,.ant-btn-link:focus{color:#998165;border-color:#998165;background:transparent}.ant-btn-link:hover>a:only-child,.ant-btn-link:focus>a:only-child{color:currentcolor}.ant-btn-link:hover>a:only-child:after,.ant-btn-link:focus>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-link:active{color:#66482e;border-color:#66482e;background:transparent}.ant-btn-link:active>a:only-child{color:currentcolor}.ant-btn-link:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-link[disabled],.ant-btn-link[disabled]:hover,.ant-btn-link[disabled]:focus,.ant-btn-link[disabled]:active{color:#00000040;border-color:#d9d9d9;background:#f5f5f5;text-shadow:none;box-shadow:none}.ant-btn-link:hover{background:transparent}.ant-btn-link:hover,.ant-btn-link:focus,.ant-btn-link:active{border-color:transparent}.ant-btn-link[disabled],.ant-btn-link[disabled]:hover,.ant-btn-link[disabled]:focus,.ant-btn-link[disabled]:active{color:#00000040;border-color:transparent;background:transparent;text-shadow:none;box-shadow:none}.ant-btn-link[disabled]>a:only-child,.ant-btn-link[disabled]:hover>a:only-child,.ant-btn-link[disabled]:focus>a:only-child,.ant-btn-link[disabled]:active>a:only-child{color:currentcolor}.ant-btn-link[disabled]>a:only-child:after,.ant-btn-link[disabled]:hover>a:only-child:after,.ant-btn-link[disabled]:focus>a:only-child:after,.ant-btn-link[disabled]:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-text{color:#000000d9;border-color:transparent;background:transparent;box-shadow:none}.ant-btn-text>a:only-child{color:currentcolor}.ant-btn-text>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-text:hover,.ant-btn-text:focus{color:#998165;border-color:#998165;background:transparent}.ant-btn-text:hover>a:only-child,.ant-btn-text:focus>a:only-child{color:currentcolor}.ant-btn-text:hover>a:only-child:after,.ant-btn-text:focus>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-text:active{color:#66482e;border-color:#66482e;background:transparent}.ant-btn-text:active>a:only-child{color:currentcolor}.ant-btn-text:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-text[disabled],.ant-btn-text[disabled]:hover,.ant-btn-text[disabled]:focus,.ant-btn-text[disabled]:active{color:#00000040;border-color:#d9d9d9;background:#f5f5f5;text-shadow:none;box-shadow:none}.ant-btn-text:hover,.ant-btn-text:focus{color:#000000d9;background:#00000005;border-color:transparent}.ant-btn-text:active{color:#000000d9;background:#00000007;border-color:transparent}.ant-btn-text[disabled],.ant-btn-text[disabled]:hover,.ant-btn-text[disabled]:focus,.ant-btn-text[disabled]:active{color:#00000040;border-color:transparent;background:transparent;text-shadow:none;box-shadow:none}.ant-btn-text[disabled]>a:only-child,.ant-btn-text[disabled]:hover>a:only-child,.ant-btn-text[disabled]:focus>a:only-child,.ant-btn-text[disabled]:active>a:only-child{color:currentcolor}.ant-btn-text[disabled]>a:only-child:after,.ant-btn-text[disabled]:hover>a:only-child:after,.ant-btn-text[disabled]:focus>a:only-child:after,.ant-btn-text[disabled]:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dangerous{color:#e31a1a;border-color:#e31a1a;background:var(--c-canvas)}.ant-btn-dangerous>a:only-child{color:currentcolor}.ant-btn-dangerous>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dangerous:hover,.ant-btn-dangerous:focus{color:#f04741;border-color:#f04741;background:var(--c-canvas)}.ant-btn-dangerous:hover>a:only-child,.ant-btn-dangerous:focus>a:only-child{color:currentcolor}.ant-btn-dangerous:hover>a:only-child:after,.ant-btn-dangerous:focus>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dangerous:active{color:#bd0b11;border-color:#bd0b11;background:var(--c-canvas)}.ant-btn-dangerous:active>a:only-child{color:currentcolor}.ant-btn-dangerous:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dangerous[disabled],.ant-btn-dangerous[disabled]:hover,.ant-btn-dangerous[disabled]:focus,.ant-btn-dangerous[disabled]:active{color:#00000040;border-color:#d9d9d9;background:#f5f5f5;text-shadow:none;box-shadow:none}.ant-btn-dangerous[disabled]>a:only-child,.ant-btn-dangerous[disabled]:hover>a:only-child,.ant-btn-dangerous[disabled]:focus>a:only-child,.ant-btn-dangerous[disabled]:active>a:only-child{color:currentcolor}.ant-btn-dangerous[disabled]>a:only-child:after,.ant-btn-dangerous[disabled]:hover>a:only-child:after,.ant-btn-dangerous[disabled]:focus>a:only-child:after,.ant-btn-dangerous[disabled]:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dangerous.ant-btn-primary{color:#fff;border-color:#e31a1a;background:#e31a1a;text-shadow:0 -1px 0 rgba(0,0,0,.12);box-shadow:0 2px #0000000b}.ant-btn-dangerous.ant-btn-primary>a:only-child{color:currentcolor}.ant-btn-dangerous.ant-btn-primary>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dangerous.ant-btn-primary:hover,.ant-btn-dangerous.ant-btn-primary:focus{color:#fff;border-color:#f04741;background:#f04741}.ant-btn-dangerous.ant-btn-primary:hover>a:only-child,.ant-btn-dangerous.ant-btn-primary:focus>a:only-child{color:currentcolor}.ant-btn-dangerous.ant-btn-primary:hover>a:only-child:after,.ant-btn-dangerous.ant-btn-primary:focus>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dangerous.ant-btn-primary:active{color:#fff;border-color:#bd0b11;background:#bd0b11}.ant-btn-dangerous.ant-btn-primary:active>a:only-child{color:currentcolor}.ant-btn-dangerous.ant-btn-primary:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dangerous.ant-btn-primary[disabled],.ant-btn-dangerous.ant-btn-primary[disabled]:hover,.ant-btn-dangerous.ant-btn-primary[disabled]:focus,.ant-btn-dangerous.ant-btn-primary[disabled]:active{color:#00000040;border-color:#d9d9d9;background:#f5f5f5;text-shadow:none;box-shadow:none}.ant-btn-dangerous.ant-btn-primary[disabled]>a:only-child,.ant-btn-dangerous.ant-btn-primary[disabled]:hover>a:only-child,.ant-btn-dangerous.ant-btn-primary[disabled]:focus>a:only-child,.ant-btn-dangerous.ant-btn-primary[disabled]:active>a:only-child{color:currentcolor}.ant-btn-dangerous.ant-btn-primary[disabled]>a:only-child:after,.ant-btn-dangerous.ant-btn-primary[disabled]:hover>a:only-child:after,.ant-btn-dangerous.ant-btn-primary[disabled]:focus>a:only-child:after,.ant-btn-dangerous.ant-btn-primary[disabled]:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dangerous.ant-btn-link{color:#e31a1a;border-color:transparent;background:transparent;box-shadow:none}.ant-btn-dangerous.ant-btn-link>a:only-child{color:currentcolor}.ant-btn-dangerous.ant-btn-link>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dangerous.ant-btn-link:hover,.ant-btn-dangerous.ant-btn-link:focus{color:#998165;border-color:#998165;background:transparent}.ant-btn-dangerous.ant-btn-link:active{color:#66482e;border-color:#66482e;background:transparent}.ant-btn-dangerous.ant-btn-link[disabled],.ant-btn-dangerous.ant-btn-link[disabled]:hover,.ant-btn-dangerous.ant-btn-link[disabled]:focus,.ant-btn-dangerous.ant-btn-link[disabled]:active{color:#00000040;border-color:#d9d9d9;background:#f5f5f5;text-shadow:none;box-shadow:none}.ant-btn-dangerous.ant-btn-link:hover,.ant-btn-dangerous.ant-btn-link:focus{color:#f04741;border-color:transparent;background:transparent}.ant-btn-dangerous.ant-btn-link:hover>a:only-child,.ant-btn-dangerous.ant-btn-link:focus>a:only-child{color:currentcolor}.ant-btn-dangerous.ant-btn-link:hover>a:only-child:after,.ant-btn-dangerous.ant-btn-link:focus>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dangerous.ant-btn-link:active{color:#bd0b11;border-color:transparent;background:transparent}.ant-btn-dangerous.ant-btn-link:active>a:only-child{color:currentcolor}.ant-btn-dangerous.ant-btn-link:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dangerous.ant-btn-link[disabled],.ant-btn-dangerous.ant-btn-link[disabled]:hover,.ant-btn-dangerous.ant-btn-link[disabled]:focus,.ant-btn-dangerous.ant-btn-link[disabled]:active{color:#00000040;border-color:transparent;background:transparent;text-shadow:none;box-shadow:none}.ant-btn-dangerous.ant-btn-link[disabled]>a:only-child,.ant-btn-dangerous.ant-btn-link[disabled]:hover>a:only-child,.ant-btn-dangerous.ant-btn-link[disabled]:focus>a:only-child,.ant-btn-dangerous.ant-btn-link[disabled]:active>a:only-child{color:currentcolor}.ant-btn-dangerous.ant-btn-link[disabled]>a:only-child:after,.ant-btn-dangerous.ant-btn-link[disabled]:hover>a:only-child:after,.ant-btn-dangerous.ant-btn-link[disabled]:focus>a:only-child:after,.ant-btn-dangerous.ant-btn-link[disabled]:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dangerous.ant-btn-text{color:#e31a1a;border-color:transparent;background:transparent;box-shadow:none}.ant-btn-dangerous.ant-btn-text>a:only-child{color:currentcolor}.ant-btn-dangerous.ant-btn-text>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dangerous.ant-btn-text:hover,.ant-btn-dangerous.ant-btn-text:focus{color:#998165;border-color:#998165;background:transparent}.ant-btn-dangerous.ant-btn-text:active{color:#66482e;border-color:#66482e;background:transparent}.ant-btn-dangerous.ant-btn-text[disabled],.ant-btn-dangerous.ant-btn-text[disabled]:hover,.ant-btn-dangerous.ant-btn-text[disabled]:focus,.ant-btn-dangerous.ant-btn-text[disabled]:active{color:#00000040;border-color:#d9d9d9;background:#f5f5f5;text-shadow:none;box-shadow:none}.ant-btn-dangerous.ant-btn-text:hover,.ant-btn-dangerous.ant-btn-text:focus{color:#f04741;border-color:transparent;background:#00000005}.ant-btn-dangerous.ant-btn-text:hover>a:only-child,.ant-btn-dangerous.ant-btn-text:focus>a:only-child{color:currentcolor}.ant-btn-dangerous.ant-btn-text:hover>a:only-child:after,.ant-btn-dangerous.ant-btn-text:focus>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dangerous.ant-btn-text:active{color:#bd0b11;border-color:transparent;background:#00000007}.ant-btn-dangerous.ant-btn-text:active>a:only-child{color:currentcolor}.ant-btn-dangerous.ant-btn-text:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dangerous.ant-btn-text[disabled],.ant-btn-dangerous.ant-btn-text[disabled]:hover,.ant-btn-dangerous.ant-btn-text[disabled]:focus,.ant-btn-dangerous.ant-btn-text[disabled]:active{color:#00000040;border-color:transparent;background:transparent;text-shadow:none;box-shadow:none}.ant-btn-dangerous.ant-btn-text[disabled]>a:only-child,.ant-btn-dangerous.ant-btn-text[disabled]:hover>a:only-child,.ant-btn-dangerous.ant-btn-text[disabled]:focus>a:only-child,.ant-btn-dangerous.ant-btn-text[disabled]:active>a:only-child{color:currentcolor}.ant-btn-dangerous.ant-btn-text[disabled]>a:only-child:after,.ant-btn-dangerous.ant-btn-text[disabled]:hover>a:only-child:after,.ant-btn-dangerous.ant-btn-text[disabled]:focus>a:only-child:after,.ant-btn-dangerous.ant-btn-text[disabled]:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-icon-only{width:32px;height:32px;padding:2.4px 0;font-size:16px;border-radius:5px;vertical-align:-3px}.ant-btn-icon-only>*{font-size:16px}.ant-btn-icon-only.ant-btn-lg{width:42px;height:42px;padding:5.9px 0;font-size:18px;border-radius:5px}.ant-btn-icon-only.ant-btn-lg>*{font-size:18px}.ant-btn-icon-only.ant-btn-sm{width:24px;height:24px;padding:0;font-size:14px;border-radius:5px}.ant-btn-icon-only.ant-btn-sm>*{font-size:14px}.ant-btn-icon-only>.anticon{display:flex;justify-content:center}a.ant-btn-icon-only{vertical-align:-1px}a.ant-btn-icon-only>.anticon{display:inline}.ant-btn-round{height:32px;padding:4px 16px;font-size:14px;border-radius:32px}.ant-btn-round.ant-btn-lg{height:42px;padding:7.4px 21px;font-size:16px;border-radius:42px}.ant-btn-round.ant-btn-sm{height:24px;padding:0 12px;font-size:14px;border-radius:24px}.ant-btn-round.ant-btn-icon-only{width:auto}.ant-btn-circle{min-width:32px;padding-right:0;padding-left:0;text-align:center;border-radius:50%}.ant-btn-circle.ant-btn-lg{min-width:42px;border-radius:50%}.ant-btn-circle.ant-btn-sm{min-width:24px;border-radius:50%}.ant-btn:before{position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;z-index:1;display:none;background:var(--c-canvas);border-radius:inherit;opacity:.35;transition:opacity .2s;content:"";pointer-events:none}.ant-btn .anticon{transition:margin-left .3s cubic-bezier(.645,.045,.355,1)}.ant-btn .anticon.anticon-plus>svg,.ant-btn .anticon.anticon-minus>svg{shape-rendering:optimizespeed}.ant-btn.ant-btn-loading{position:relative;cursor:default}.ant-btn.ant-btn-loading:before{display:block}.ant-btn>.ant-btn-loading-icon{transition:width .3s cubic-bezier(.645,.045,.355,1),opacity .3s cubic-bezier(.645,.045,.355,1)}.ant-btn>.ant-btn-loading-icon .anticon{padding-right:8px;animation:none}.ant-btn>.ant-btn-loading-icon .anticon svg{animation:loadingCircle 1s infinite linear}.ant-btn>.ant-btn-loading-icon:only-child .anticon{padding-right:0}.ant-btn-group{position:relative;display:inline-flex}.ant-btn-group>.ant-btn,.ant-btn-group>span>.ant-btn{position:relative}.ant-btn-group>.ant-btn:hover,.ant-btn-group>span>.ant-btn:hover,.ant-btn-group>.ant-btn:focus,.ant-btn-group>span>.ant-btn:focus,.ant-btn-group>.ant-btn:active,.ant-btn-group>span>.ant-btn:active{z-index:2}.ant-btn-group>.ant-btn[disabled],.ant-btn-group>span>.ant-btn[disabled]{z-index:0}.ant-btn-group .ant-btn-icon-only{font-size:14px}.ant-btn-group-lg>.ant-btn,.ant-btn-group-lg>span>.ant-btn{height:42px;padding:7.4px 15px;font-size:16px;border-radius:0}.ant-btn-group-lg .ant-btn.ant-btn-icon-only{width:42px;height:42px;padding-right:0;padding-left:0}.ant-btn-group-sm>.ant-btn,.ant-btn-group-sm>span>.ant-btn{height:24px;padding:0 7px;font-size:14px;border-radius:0}.ant-btn-group-sm>.ant-btn>.anticon,.ant-btn-group-sm>span>.ant-btn>.anticon{font-size:14px}.ant-btn-group-sm .ant-btn.ant-btn-icon-only{width:24px;height:24px;padding-right:0;padding-left:0}.ant-btn-group .ant-btn+.ant-btn,.ant-btn+.ant-btn-group,.ant-btn-group span+.ant-btn,.ant-btn-group .ant-btn+span,.ant-btn-group>span+span,.ant-btn-group+.ant-btn,.ant-btn-group+.ant-btn-group{margin-left:-1px}.ant-btn-group .ant-btn-primary+.ant-btn:not(.ant-btn-primary):not([disabled]){border-left-color:transparent}.ant-btn-group .ant-btn{border-radius:0}.ant-btn-group>.ant-btn:first-child,.ant-btn-group>span:first-child>.ant-btn{margin-left:0}.ant-btn-group>.ant-btn:only-child{border-radius:5px}.ant-btn-group>span:only-child>.ant-btn{border-radius:5px}.ant-btn-group>.ant-btn:first-child:not(:last-child),.ant-btn-group>span:first-child:not(:last-child)>.ant-btn{border-top-left-radius:5px;border-bottom-left-radius:5px}.ant-btn-group>.ant-btn:last-child:not(:first-child),.ant-btn-group>span:last-child:not(:first-child)>.ant-btn{border-top-right-radius:5px;border-bottom-right-radius:5px}.ant-btn-group-sm>.ant-btn:only-child{border-radius:5px}.ant-btn-group-sm>span:only-child>.ant-btn{border-radius:5px}.ant-btn-group-sm>.ant-btn:first-child:not(:last-child),.ant-btn-group-sm>span:first-child:not(:last-child)>.ant-btn{border-top-left-radius:5px;border-bottom-left-radius:5px}.ant-btn-group-sm>.ant-btn:last-child:not(:first-child),.ant-btn-group-sm>span:last-child:not(:first-child)>.ant-btn{border-top-right-radius:5px;border-bottom-right-radius:5px}.ant-btn-group>.ant-btn-group{float:left}.ant-btn-group>.ant-btn-group:not(:first-child):not(:last-child)>.ant-btn{border-radius:0}.ant-btn-group>.ant-btn-group:first-child:not(:last-child)>.ant-btn:last-child{padding-right:8px;border-top-right-radius:0;border-bottom-right-radius:0}.ant-btn-group>.ant-btn-group:last-child:not(:first-child)>.ant-btn:first-child{padding-left:8px;border-top-left-radius:0;border-bottom-left-radius:0}.ant-btn-rtl.ant-btn-group .ant-btn+.ant-btn,.ant-btn-rtl.ant-btn+.ant-btn-group,.ant-btn-rtl.ant-btn-group span+.ant-btn,.ant-btn-rtl.ant-btn-group .ant-btn+span,.ant-btn-rtl.ant-btn-group>span+span,.ant-btn-rtl.ant-btn-group+.ant-btn,.ant-btn-rtl.ant-btn-group+.ant-btn-group,.ant-btn-group-rtl.ant-btn-group .ant-btn+.ant-btn,.ant-btn-group-rtl.ant-btn+.ant-btn-group,.ant-btn-group-rtl.ant-btn-group span+.ant-btn,.ant-btn-group-rtl.ant-btn-group .ant-btn+span,.ant-btn-group-rtl.ant-btn-group>span+span,.ant-btn-group-rtl.ant-btn-group+.ant-btn,.ant-btn-group-rtl.ant-btn-group+.ant-btn-group{margin-right:-1px;margin-left:auto}.ant-btn-group.ant-btn-group-rtl{direction:rtl}.ant-btn-group-rtl.ant-btn-group>.ant-btn:first-child:not(:last-child),.ant-btn-group-rtl.ant-btn-group>span:first-child:not(:last-child)>.ant-btn{border-radius:0 5px 5px 0}.ant-btn-group-rtl.ant-btn-group>.ant-btn:last-child:not(:first-child),.ant-btn-group-rtl.ant-btn-group>span:last-child:not(:first-child)>.ant-btn{border-radius:5px 0 0 5px}.ant-btn-group-rtl.ant-btn-group-sm>.ant-btn:first-child:not(:last-child),.ant-btn-group-rtl.ant-btn-group-sm>span:first-child:not(:last-child)>.ant-btn{border-radius:0 5px 5px 0}.ant-btn-group-rtl.ant-btn-group-sm>.ant-btn:last-child:not(:first-child),.ant-btn-group-rtl.ant-btn-group-sm>span:last-child:not(:first-child)>.ant-btn{border-radius:5px 0 0 5px}.ant-btn:focus>span,.ant-btn:active>span{position:relative}.ant-btn>.anticon+span,.ant-btn>span+.anticon{margin-left:8px}.ant-btn.ant-btn-background-ghost{color:var(--c-canvas);border-color:var(--c-canvas)}.ant-btn.ant-btn-background-ghost,.ant-btn.ant-btn-background-ghost:hover,.ant-btn.ant-btn-background-ghost:active,.ant-btn.ant-btn-background-ghost:focus{background:transparent}.ant-btn.ant-btn-background-ghost:hover,.ant-btn.ant-btn-background-ghost:focus{color:#998165;border-color:#998165}.ant-btn.ant-btn-background-ghost:active{color:#66482e;border-color:#66482e}.ant-btn.ant-btn-background-ghost[disabled]{color:#00000040;background:transparent;border-color:#d9d9d9}.ant-btn-background-ghost.ant-btn-primary{color:#8d6a46;border-color:#8d6a46;text-shadow:none}.ant-btn-background-ghost.ant-btn-primary>a:only-child{color:currentcolor}.ant-btn-background-ghost.ant-btn-primary>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-primary:hover,.ant-btn-background-ghost.ant-btn-primary:focus{color:#998165;border-color:#998165}.ant-btn-background-ghost.ant-btn-primary:hover>a:only-child,.ant-btn-background-ghost.ant-btn-primary:focus>a:only-child{color:currentcolor}.ant-btn-background-ghost.ant-btn-primary:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary:focus>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-primary:active{color:#66482e;border-color:#66482e}.ant-btn-background-ghost.ant-btn-primary:active>a:only-child{color:currentcolor}.ant-btn-background-ghost.ant-btn-primary:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-primary[disabled],.ant-btn-background-ghost.ant-btn-primary[disabled]:hover,.ant-btn-background-ghost.ant-btn-primary[disabled]:focus,.ant-btn-background-ghost.ant-btn-primary[disabled]:active{color:#00000040;border-color:#d9d9d9;background:#f5f5f5;text-shadow:none;box-shadow:none}.ant-btn-background-ghost.ant-btn-primary[disabled]>a:only-child,.ant-btn-background-ghost.ant-btn-primary[disabled]:hover>a:only-child,.ant-btn-background-ghost.ant-btn-primary[disabled]:focus>a:only-child,.ant-btn-background-ghost.ant-btn-primary[disabled]:active>a:only-child{color:currentcolor}.ant-btn-background-ghost.ant-btn-primary[disabled]>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary[disabled]:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary[disabled]:focus>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary[disabled]:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-danger{color:#e31a1a;border-color:#e31a1a;text-shadow:none}.ant-btn-background-ghost.ant-btn-danger>a:only-child{color:currentcolor}.ant-btn-background-ghost.ant-btn-danger>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-danger:hover,.ant-btn-background-ghost.ant-btn-danger:focus{color:#f04741;border-color:#f04741}.ant-btn-background-ghost.ant-btn-danger:hover>a:only-child,.ant-btn-background-ghost.ant-btn-danger:focus>a:only-child{color:currentcolor}.ant-btn-background-ghost.ant-btn-danger:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger:focus>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-danger:active{color:#bd0b11;border-color:#bd0b11}.ant-btn-background-ghost.ant-btn-danger:active>a:only-child{color:currentcolor}.ant-btn-background-ghost.ant-btn-danger:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-danger[disabled],.ant-btn-background-ghost.ant-btn-danger[disabled]:hover,.ant-btn-background-ghost.ant-btn-danger[disabled]:focus,.ant-btn-background-ghost.ant-btn-danger[disabled]:active{color:#00000040;border-color:#d9d9d9;background:#f5f5f5;text-shadow:none;box-shadow:none}.ant-btn-background-ghost.ant-btn-danger[disabled]>a:only-child,.ant-btn-background-ghost.ant-btn-danger[disabled]:hover>a:only-child,.ant-btn-background-ghost.ant-btn-danger[disabled]:focus>a:only-child,.ant-btn-background-ghost.ant-btn-danger[disabled]:active>a:only-child{color:currentcolor}.ant-btn-background-ghost.ant-btn-danger[disabled]>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger[disabled]:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger[disabled]:focus>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger[disabled]:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-dangerous{color:#e31a1a;border-color:#e31a1a;text-shadow:none}.ant-btn-background-ghost.ant-btn-dangerous>a:only-child{color:currentcolor}.ant-btn-background-ghost.ant-btn-dangerous>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-dangerous:hover,.ant-btn-background-ghost.ant-btn-dangerous:focus{color:#f04741;border-color:#f04741}.ant-btn-background-ghost.ant-btn-dangerous:hover>a:only-child,.ant-btn-background-ghost.ant-btn-dangerous:focus>a:only-child{color:currentcolor}.ant-btn-background-ghost.ant-btn-dangerous:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-dangerous:focus>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-dangerous:active{color:#bd0b11;border-color:#bd0b11}.ant-btn-background-ghost.ant-btn-dangerous:active>a:only-child{color:currentcolor}.ant-btn-background-ghost.ant-btn-dangerous:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-dangerous[disabled],.ant-btn-background-ghost.ant-btn-dangerous[disabled]:hover,.ant-btn-background-ghost.ant-btn-dangerous[disabled]:focus,.ant-btn-background-ghost.ant-btn-dangerous[disabled]:active{color:#00000040;border-color:#d9d9d9;background:#f5f5f5;text-shadow:none;box-shadow:none}.ant-btn-background-ghost.ant-btn-dangerous[disabled]>a:only-child,.ant-btn-background-ghost.ant-btn-dangerous[disabled]:hover>a:only-child,.ant-btn-background-ghost.ant-btn-dangerous[disabled]:focus>a:only-child,.ant-btn-background-ghost.ant-btn-dangerous[disabled]:active>a:only-child{color:currentcolor}.ant-btn-background-ghost.ant-btn-dangerous[disabled]>a:only-child:after,.ant-btn-background-ghost.ant-btn-dangerous[disabled]:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-dangerous[disabled]:focus>a:only-child:after,.ant-btn-background-ghost.ant-btn-dangerous[disabled]:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link{color:#e31a1a;border-color:transparent;text-shadow:none}.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link>a:only-child{color:currentcolor}.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link:hover,.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link:focus{color:#f04741;border-color:transparent}.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link:hover>a:only-child,.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link:focus>a:only-child{color:currentcolor}.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link:focus>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link:active{color:#bd0b11;border-color:transparent}.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link:active>a:only-child{color:currentcolor}.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled],.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled]:hover,.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled]:focus,.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled]:active{color:#00000040;border-color:#d9d9d9;background:#f5f5f5;text-shadow:none;box-shadow:none}.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled]>a:only-child,.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled]:hover>a:only-child,.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled]:focus>a:only-child,.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled]:active>a:only-child{color:currentcolor}.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled]>a:only-child:after,.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled]:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled]:focus>a:only-child:after,.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled]:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-two-chinese-chars:first-letter{letter-spacing:.34em}.ant-btn-two-chinese-chars>*:not(.anticon){margin-right:-.34em;letter-spacing:.34em}.ant-btn.ant-btn-block{width:100%}.ant-btn:empty{display:inline-block;width:0;visibility:hidden;content:" "}a.ant-btn{padding-top:.01px!important;line-height:30px}a.ant-btn-lg{line-height:40px}a.ant-btn-sm{line-height:22px}.ant-btn-rtl{direction:rtl}.ant-btn-group-rtl.ant-btn-group .ant-btn-primary:last-child:not(:first-child),.ant-btn-group-rtl.ant-btn-group .ant-btn-primary+.ant-btn-primary{border-right-color:#998165;border-left-color:#d9d9d9}.ant-btn-group-rtl.ant-btn-group .ant-btn-primary:last-child:not(:first-child)[disabled],.ant-btn-group-rtl.ant-btn-group .ant-btn-primary+.ant-btn-primary[disabled]{border-right-color:#d9d9d9;border-left-color:#998165}.ant-btn-rtl.ant-btn>.ant-btn-loading-icon .anticon{padding-right:0;padding-left:8px}.ant-btn>.ant-btn-loading-icon:only-child .anticon{padding-right:0;padding-left:0}.ant-btn-rtl.ant-btn>.anticon+span,.ant-btn-rtl.ant-btn>span+.anticon{margin-right:8px;margin-left:0}.ant-picker-calendar{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";background:var(--c-canvas)}.ant-picker-calendar-header{display:flex;justify-content:flex-end;padding:12px 0}.ant-picker-calendar-header .ant-picker-calendar-year-select{min-width:80px}.ant-picker-calendar-header .ant-picker-calendar-month-select{min-width:70px;margin-left:8px}.ant-picker-calendar-header .ant-picker-calendar-mode-switch{margin-left:8px}.ant-picker-calendar .ant-picker-panel{background:var(--c-canvas);border:0;border-top:1px solid #f0f0f0;border-radius:0}.ant-picker-calendar .ant-picker-panel .ant-picker-month-panel,.ant-picker-calendar .ant-picker-panel .ant-picker-date-panel{width:auto}.ant-picker-calendar .ant-picker-panel .ant-picker-body{padding:8px 0}.ant-picker-calendar .ant-picker-panel .ant-picker-content{width:100%}.ant-picker-calendar-mini{border-radius:5px}.ant-picker-calendar-mini .ant-picker-calendar-header{padding-right:8px;padding-left:8px}.ant-picker-calendar-mini .ant-picker-panel{border-radius:0 0 5px 5px}.ant-picker-calendar-mini .ant-picker-content{height:256px}.ant-picker-calendar-mini .ant-picker-content th{height:auto;padding:0;line-height:18px}.ant-picker-calendar-full .ant-picker-panel{display:block;width:100%;text-align:right;background:var(--c-canvas);border:0}.ant-picker-calendar-full .ant-picker-panel .ant-picker-body th,.ant-picker-calendar-full .ant-picker-panel .ant-picker-body td{padding:0}.ant-picker-calendar-full .ant-picker-panel .ant-picker-body th{height:auto;padding:0 12px 5px 0;line-height:18px}.ant-picker-calendar-full .ant-picker-panel .ant-picker-cell:before{display:none}.ant-picker-calendar-full .ant-picker-panel .ant-picker-cell:hover .ant-picker-calendar-date{background:#f5f5f5}.ant-picker-calendar-full .ant-picker-panel .ant-picker-cell .ant-picker-calendar-date-today:before{display:none}.ant-picker-calendar-full .ant-picker-panel .ant-picker-cell-selected .ant-picker-calendar-date,.ant-picker-calendar-full .ant-picker-panel .ant-picker-cell-selected:hover .ant-picker-calendar-date,.ant-picker-calendar-full .ant-picker-panel .ant-picker-cell-selected .ant-picker-calendar-date-today,.ant-picker-calendar-full .ant-picker-panel .ant-picker-cell-selected:hover .ant-picker-calendar-date-today{background:#ccc8c0}.ant-picker-calendar-full .ant-picker-panel .ant-picker-cell-selected .ant-picker-calendar-date .ant-picker-calendar-date-value,.ant-picker-calendar-full .ant-picker-panel .ant-picker-cell-selected:hover .ant-picker-calendar-date .ant-picker-calendar-date-value,.ant-picker-calendar-full .ant-picker-panel .ant-picker-cell-selected .ant-picker-calendar-date-today .ant-picker-calendar-date-value,.ant-picker-calendar-full .ant-picker-panel .ant-picker-cell-selected:hover .ant-picker-calendar-date-today .ant-picker-calendar-date-value{color:#8d6a46}.ant-picker-calendar-full .ant-picker-panel .ant-picker-calendar-date{display:block;width:auto;height:auto;margin:0 4px;padding:4px 8px 0;border:0;border-top:2px solid #f0f0f0;border-radius:0;transition:background .3s}.ant-picker-calendar-full .ant-picker-panel .ant-picker-calendar-date-value{line-height:24px;transition:color .3s}.ant-picker-calendar-full .ant-picker-panel .ant-picker-calendar-date-content{position:static;width:auto;height:86px;overflow-y:auto;color:#000000d9;line-height:1.5715;text-align:left}.ant-picker-calendar-full .ant-picker-panel .ant-picker-calendar-date-today{border-color:#8d6a46}.ant-picker-calendar-full .ant-picker-panel .ant-picker-calendar-date-today .ant-picker-calendar-date-value{color:#000000d9}@media only screen and (max-width: 480px){.ant-picker-calendar-header{display:block}.ant-picker-calendar-header .ant-picker-calendar-year-select{width:50%}.ant-picker-calendar-header .ant-picker-calendar-month-select{width:calc(50% - 8px)}.ant-picker-calendar-header .ant-picker-calendar-mode-switch{width:100%;margin-top:8px;margin-left:0}.ant-picker-calendar-header .ant-picker-calendar-mode-switch>label{width:50%;text-align:center}}.ant-picker-calendar-rtl{direction:rtl}.ant-picker-calendar-rtl .ant-picker-calendar-header .ant-picker-calendar-month-select,.ant-picker-calendar-rtl .ant-picker-calendar-header .ant-picker-calendar-mode-switch{margin-right:8px;margin-left:0}.ant-picker-calendar-rtl.ant-picker-calendar-full .ant-picker-panel{text-align:left}.ant-picker-calendar-rtl.ant-picker-calendar-full .ant-picker-panel .ant-picker-body th{padding:0 0 5px 12px}.ant-picker-calendar-rtl.ant-picker-calendar-full .ant-picker-panel .ant-picker-calendar-date-content{text-align:right}.ant-card{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:relative;background:var(--c-canvas);border-radius:5px}.ant-card-rtl{direction:rtl}.ant-card-hoverable{cursor:pointer;transition:box-shadow .3s,border-color .3s}.ant-card-hoverable:hover{border-color:transparent;box-shadow:0 1px 2px -2px #00000029,0 3px 6px #0000001f,0 5px 12px 4px #00000017}.ant-card-bordered{border:1px solid #f0f0f0}.ant-card-head{min-height:48px;margin-bottom:-1px;padding:0 24px;color:#1c2d56;font-weight:500;font-size:16px;background:transparent;border-bottom:1px solid #f0f0f0;border-radius:5px 5px 0 0}.ant-card-head:before{display:table;content:""}.ant-card-head:after{display:table;clear:both;content:""}.ant-card-head-wrapper{display:flex;align-items:center}.ant-card-head-title{display:inline-block;flex:1;padding:16px 0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ant-card-head-title>.ant-typography,.ant-card-head-title>.ant-typography-edit-content{left:0;margin-top:0;margin-bottom:0}.ant-card-head .ant-tabs-top{clear:both;margin-bottom:-17px;color:#000000d9;font-weight:400;font-size:14px}.ant-card-head .ant-tabs-top-bar{border-bottom:1px solid #f0f0f0}.ant-card-extra{float:right;margin-left:auto;padding:16px 0;color:#000000d9;font-weight:400;font-size:14px}.ant-card-rtl .ant-card-extra{margin-right:auto;margin-left:0}.ant-card-body{padding:24px}.ant-card-body:before{display:table;content:""}.ant-card-body:after{display:table;clear:both;content:""}.ant-card-contain-grid:not(.ant-card-loading) .ant-card-body{margin:-1px 0 0 -1px;padding:0}.ant-card-grid{float:left;width:33.33%;padding:24px;border:0;border-radius:0;box-shadow:1px 0 #f0f0f0,0 1px #f0f0f0,1px 1px #f0f0f0,1px 0 #f0f0f0 inset,0 1px #f0f0f0 inset;transition:all .3s}.ant-card-rtl .ant-card-grid{float:right}.ant-card-grid-hoverable:hover{position:relative;z-index:1;box-shadow:0 1px 2px -2px #00000029,0 3px 6px #0000001f,0 5px 12px 4px #00000017}.ant-card-contain-tabs>.ant-card-head .ant-card-head-title{min-height:32px;padding-bottom:0}.ant-card-contain-tabs>.ant-card-head .ant-card-extra{padding-bottom:0}.ant-card-bordered .ant-card-cover{margin-top:-1px;margin-right:-1px;margin-left:-1px}.ant-card-cover>*{display:block;width:100%}.ant-card-cover img{border-radius:5px 5px 0 0}.ant-card-actions{margin:0;padding:0;list-style:none;background:var(--c-canvas);border-top:1px solid #f0f0f0}.ant-card-actions:before{display:table;content:""}.ant-card-actions:after{display:table;clear:both;content:""}.ant-card-actions>li{float:left;margin:12px 0;color:#00000073;text-align:center}.ant-card-rtl .ant-card-actions>li{float:right}.ant-card-actions>li>span{position:relative;display:block;min-width:32px;font-size:14px;line-height:1.5715;cursor:pointer}.ant-card-actions>li>span:hover{color:#8d6a46;transition:color .3s}.ant-card-actions>li>span a:not(.ant-btn),.ant-card-actions>li>span>.anticon{display:inline-block;width:100%;color:#00000073;line-height:22px;transition:color .3s}.ant-card-actions>li>span a:not(.ant-btn):hover,.ant-card-actions>li>span>.anticon:hover{color:#8d6a46}.ant-card-actions>li>span>.anticon{font-size:16px;line-height:22px}.ant-card-actions>li:not(:last-child){border-right:1px solid #f0f0f0}.ant-card-rtl .ant-card-actions>li:not(:last-child){border-right:none;border-left:1px solid #f0f0f0}.ant-card-type-inner .ant-card-head{padding:0 24px;background:#fafafa}.ant-card-type-inner .ant-card-head-title{padding:12px 0;font-size:14px}.ant-card-type-inner .ant-card-body{padding:16px 24px}.ant-card-type-inner .ant-card-extra{padding:13.5px 0}.ant-card-meta{margin:-4px 0}.ant-card-meta:before{display:table;content:""}.ant-card-meta:after{display:table;clear:both;content:""}.ant-card-meta-avatar{float:left;padding-right:16px}.ant-card-rtl .ant-card-meta-avatar{float:right;padding-right:0;padding-left:16px}.ant-card-meta-detail{overflow:hidden}.ant-card-meta-detail>div:not(:last-child){margin-bottom:8px}.ant-card-meta-title{overflow:hidden;color:#1c2d56;font-weight:500;font-size:16px;white-space:nowrap;text-overflow:ellipsis}.ant-card-meta-description{color:#00000073}.ant-card-loading{overflow:hidden}.ant-card-loading .ant-card-body{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-card-loading-content p{margin:0}.ant-card-loading-block{height:14px;margin:4px 0;background:linear-gradient(90deg,#cfd8dc33,#cfd8dc66,#cfd8dc33);background-size:600% 600%;border-radius:5px;animation:card-loading 1.4s ease infinite}@keyframes card-loading{0%,to{background-position:0 50%}50%{background-position:100% 50%}}.ant-card-small>.ant-card-head{min-height:36px;padding:0 12px;font-size:14px}.ant-card-small>.ant-card-head>.ant-card-head-wrapper>.ant-card-head-title{padding:8px 0}.ant-card-small>.ant-card-head>.ant-card-head-wrapper>.ant-card-extra{padding:8px 0;font-size:14px}.ant-card-small>.ant-card-body{padding:12px}.ant-carousel{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum"}.ant-carousel .slick-slider{position:relative;display:block;box-sizing:border-box;touch-action:pan-y;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}.ant-carousel .slick-list{position:relative;display:block;margin:0;padding:0;overflow:hidden}.ant-carousel .slick-list:focus{outline:none}.ant-carousel .slick-list.dragging{cursor:pointer}.ant-carousel .slick-list .slick-slide{pointer-events:none}.ant-carousel .slick-list .slick-slide input.ant-radio-input,.ant-carousel .slick-list .slick-slide input.ant-checkbox-input{visibility:hidden}.ant-carousel .slick-list .slick-slide.slick-active{pointer-events:auto}.ant-carousel .slick-list .slick-slide.slick-active input.ant-radio-input,.ant-carousel .slick-list .slick-slide.slick-active input.ant-checkbox-input{visibility:visible}.ant-carousel .slick-list .slick-slide>div>div{vertical-align:bottom}.ant-carousel .slick-slider .slick-track,.ant-carousel .slick-slider .slick-list{transform:translateZ(0);touch-action:pan-y}.ant-carousel .slick-track{position:relative;top:0;left:0;display:block}.ant-carousel .slick-track:before,.ant-carousel .slick-track:after{display:table;content:""}.ant-carousel .slick-track:after{clear:both}.slick-loading .ant-carousel .slick-track{visibility:hidden}.ant-carousel .slick-slide{display:none;float:left;height:100%;min-height:1px}.ant-carousel .slick-slide img{display:block}.ant-carousel .slick-slide.slick-loading img{display:none}.ant-carousel .slick-slide.dragging img{pointer-events:none}.ant-carousel .slick-initialized .slick-slide{display:block}.ant-carousel .slick-loading .slick-slide{visibility:hidden}.ant-carousel .slick-vertical .slick-slide{display:block;height:auto}.ant-carousel .slick-arrow.slick-hidden{display:none}.ant-carousel .slick-prev,.ant-carousel .slick-next{position:absolute;top:50%;display:block;width:20px;height:20px;margin-top:-10px;padding:0;color:transparent;font-size:0;line-height:0;background:transparent;border:0;outline:none;cursor:pointer}.ant-carousel .slick-prev:hover,.ant-carousel .slick-next:hover,.ant-carousel .slick-prev:focus,.ant-carousel .slick-next:focus{color:transparent;background:transparent;outline:none}.ant-carousel .slick-prev:hover:before,.ant-carousel .slick-next:hover:before,.ant-carousel .slick-prev:focus:before,.ant-carousel .slick-next:focus:before{opacity:1}.ant-carousel .slick-prev.slick-disabled:before,.ant-carousel .slick-next.slick-disabled:before{opacity:.25}.ant-carousel .slick-prev{left:-25px}.ant-carousel .slick-prev:before{content:"←"}.ant-carousel .slick-next{right:-25px}.ant-carousel .slick-next:before{content:"→"}.ant-carousel .slick-dots{position:absolute;right:0;bottom:0;left:0;z-index:15;display:flex!important;justify-content:center;margin-right:15%;margin-left:15%;padding-left:0;list-style:none}.ant-carousel .slick-dots-bottom{bottom:12px}.ant-carousel .slick-dots-top{top:12px;bottom:auto}.ant-carousel .slick-dots li{position:relative;display:inline-block;flex:0 1 auto;box-sizing:content-box;width:16px;height:3px;margin:0 3px;padding:0;text-align:center;text-indent:-999px;vertical-align:top;transition:all .5s}.ant-carousel .slick-dots li button{display:block;width:100%;height:3px;padding:0;color:transparent;font-size:0;background:var(--c-canvas);border:0;border-radius:1px;outline:none;cursor:pointer;opacity:.3;transition:all .5s}.ant-carousel .slick-dots li button:hover,.ant-carousel .slick-dots li button:focus{opacity:.75}.ant-carousel .slick-dots li.slick-active{width:24px}.ant-carousel .slick-dots li.slick-active button{background:var(--c-canvas);opacity:1}.ant-carousel .slick-dots li.slick-active:hover,.ant-carousel .slick-dots li.slick-active:focus{opacity:1}.ant-carousel-vertical .slick-dots{top:50%;bottom:auto;flex-direction:column;width:3px;height:auto;margin:0;transform:translateY(-50%)}.ant-carousel-vertical .slick-dots-left{right:auto;left:12px}.ant-carousel-vertical .slick-dots-right{right:12px;left:auto}.ant-carousel-vertical .slick-dots li{width:3px;height:16px;margin:4px 2px;vertical-align:baseline}.ant-carousel-vertical .slick-dots li button{width:3px;height:16px}.ant-carousel-vertical .slick-dots li.slick-active,.ant-carousel-vertical .slick-dots li.slick-active button{width:3px;height:24px}.ant-carousel-rtl{direction:rtl}.ant-carousel-rtl .ant-carousel .slick-track{right:0;left:auto}.ant-carousel-rtl .ant-carousel .slick-prev{right:-25px;left:auto}.ant-carousel-rtl .ant-carousel .slick-prev:before{content:"→"}.ant-carousel-rtl .ant-carousel .slick-next{right:auto;left:-25px}.ant-carousel-rtl .ant-carousel .slick-next:before{content:"←"}.ant-carousel-rtl.ant-carousel .slick-dots{flex-direction:row-reverse}.ant-carousel-rtl.ant-carousel-vertical .slick-dots{flex-direction:column}@keyframes antCheckboxEffect{0%{transform:scale(1);opacity:.5}to{transform:scale(1.6);opacity:0}}.ant-cascader-checkbox{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;list-style:none;font-feature-settings:"tnum";position:relative;top:.2em;line-height:1;white-space:nowrap;outline:none;cursor:pointer}.ant-cascader-checkbox-wrapper:hover .ant-cascader-checkbox-inner,.ant-cascader-checkbox:hover .ant-cascader-checkbox-inner,.ant-cascader-checkbox-input:focus+.ant-cascader-checkbox-inner{border-color:#8d6a46}.ant-cascader-checkbox-checked:after{position:absolute;top:0;left:0;width:100%;height:100%;border:1px solid #8D6A46;border-radius:5px;visibility:hidden;animation:antCheckboxEffect .36s ease-in-out;animation-fill-mode:backwards;content:""}.ant-cascader-checkbox:hover:after,.ant-cascader-checkbox-wrapper:hover .ant-cascader-checkbox:after{visibility:visible}.ant-cascader-checkbox-inner{position:relative;top:0;left:0;display:block;width:20px;height:20px;direction:ltr;background-color:#fff;border:1px solid #d9d9d9;border-radius:3px;border-collapse:separate;transition:all .3s}.ant-cascader-checkbox-inner:after{position:absolute;top:50%;left:21.5%;display:table;width:7.14285714px;height:11.42857143px;border:2px solid #fff;border-top:0;border-left:0;transform:rotate(45deg) scale(0) translate(-50%,-50%);opacity:0;transition:all .1s cubic-bezier(.71,-.46,.88,.6),opacity .1s;content:" "}.ant-cascader-checkbox-input{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;width:100%;height:100%;cursor:pointer;opacity:0}.ant-cascader-checkbox-checked .ant-cascader-checkbox-inner:after{position:absolute;display:table;border:2px solid #fff;border-top:0;border-left:0;transform:rotate(45deg) scale(1) translate(-50%,-50%);opacity:1;transition:all .2s cubic-bezier(.12,.4,.29,1.46) .1s;content:" "}.ant-cascader-checkbox-checked .ant-cascader-checkbox-inner{background-color:#8d6a46;border-color:#8d6a46}.ant-cascader-checkbox-disabled{cursor:not-allowed}.ant-cascader-checkbox-disabled.ant-cascader-checkbox-checked .ant-cascader-checkbox-inner:after{border-color:#00000040;animation-name:none}.ant-cascader-checkbox-disabled .ant-cascader-checkbox-input{cursor:not-allowed;pointer-events:none}.ant-cascader-checkbox-disabled .ant-cascader-checkbox-inner{background-color:#f5f5f5;border-color:#d9d9d9!important}.ant-cascader-checkbox-disabled .ant-cascader-checkbox-inner:after{border-color:#f5f5f5;border-collapse:separate;animation-name:none}.ant-cascader-checkbox-disabled+span{color:#00000040;cursor:not-allowed}.ant-cascader-checkbox-disabled:hover:after,.ant-cascader-checkbox-wrapper:hover .ant-cascader-checkbox-disabled:after{visibility:hidden}.ant-cascader-checkbox-wrapper{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";display:inline-flex;align-items:baseline;line-height:unset;cursor:pointer}.ant-cascader-checkbox-wrapper:after{display:inline-block;width:0;overflow:hidden;content:" "}.ant-cascader-checkbox-wrapper.ant-cascader-checkbox-wrapper-disabled{cursor:not-allowed}.ant-cascader-checkbox-wrapper+.ant-cascader-checkbox-wrapper{margin-left:8px}.ant-cascader-checkbox+span{padding-right:8px;padding-left:8px}.ant-cascader-checkbox-group{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";display:inline-block}.ant-cascader-checkbox-group-item{margin-right:8px}.ant-cascader-checkbox-group-item:last-child{margin-right:0}.ant-cascader-checkbox-group-item+.ant-cascader-checkbox-group-item{margin-left:0}.ant-cascader-checkbox-indeterminate .ant-cascader-checkbox-inner{background-color:#fff;border-color:#d9d9d9}.ant-cascader-checkbox-indeterminate .ant-cascader-checkbox-inner:after{top:50%;left:50%;width:12px;height:12px;background-color:#8d6a46;border:0;transform:translate(-50%,-50%) scale(1);opacity:1;content:" "}.ant-cascader-checkbox-indeterminate.ant-cascader-checkbox-disabled .ant-cascader-checkbox-inner:after{background-color:#00000040;border-color:#00000040}.ant-cascader-checkbox-rtl{direction:rtl}.ant-cascader-checkbox-group-rtl .ant-cascader-checkbox-group-item{margin-right:0;margin-left:8px}.ant-cascader-checkbox-group-rtl .ant-cascader-checkbox-group-item:last-child{margin-left:0!important}.ant-cascader-checkbox-group-rtl .ant-cascader-checkbox-group-item+.ant-cascader-checkbox-group-item{margin-left:8px}.ant-cascader{width:184px}.ant-cascader-checkbox{top:0;margin-right:8px}.ant-cascader-menus{display:flex;flex-wrap:nowrap;align-items:flex-start}.ant-cascader-menus.ant-cascader-menu-empty .ant-cascader-menu{width:100%;height:auto}.ant-cascader-menu{min-width:111px;height:180px;margin:-4px 0;padding:4px 0;overflow:auto;vertical-align:top;list-style:none;border-right:1px solid #f0f0f0;-ms-overflow-style:-ms-autohiding-scrollbar}.ant-cascader-menu-item{display:flex;flex-wrap:nowrap;align-items:center;padding:5px 12px;overflow:hidden;line-height:22px;white-space:nowrap;text-overflow:ellipsis;cursor:pointer;transition:all .3s}.ant-cascader-menu-item:hover{background:#f5f5f5}.ant-cascader-menu-item-disabled{color:#00000040;cursor:not-allowed}.ant-cascader-menu-item-disabled:hover{background:transparent}.ant-cascader-menu-empty .ant-cascader-menu-item{color:#00000040;cursor:default;pointer-events:none}.ant-cascader-menu-item-active:not(.ant-cascader-menu-item-disabled),.ant-cascader-menu-item-active:not(.ant-cascader-menu-item-disabled):hover{font-weight:600;background-color:#ccc8c0}.ant-cascader-menu-item-content{flex:auto}.ant-cascader-menu-item-expand .ant-cascader-menu-item-expand-icon,.ant-cascader-menu-item-loading-icon{margin-left:4px;color:#00000073;font-size:10px}.ant-cascader-menu-item-disabled.ant-cascader-menu-item-expand .ant-cascader-menu-item-expand-icon,.ant-cascader-menu-item-disabled.ant-cascader-menu-item-loading-icon{color:#00000040}.ant-cascader-menu-item-keyword{color:#ff4d4f}.ant-cascader-rtl .ant-cascader-menu-item-expand-icon,.ant-cascader-rtl .ant-cascader-menu-item-loading-icon{margin-right:4px;margin-left:0}.ant-cascader-rtl .ant-cascader-checkbox{top:0;margin-right:0;margin-left:8px}.ant-checkbox{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;list-style:none;font-feature-settings:"tnum";position:relative;top:.2em;line-height:1;white-space:nowrap;outline:none;cursor:pointer}.ant-checkbox-wrapper:hover .ant-checkbox-inner,.ant-checkbox:hover .ant-checkbox-inner,.ant-checkbox-input:focus+.ant-checkbox-inner{border-color:#8d6a46}.ant-checkbox-checked:after{position:absolute;top:0;left:0;width:100%;height:100%;border:1px solid #8D6A46;border-radius:5px;visibility:hidden;animation:antCheckboxEffect .36s ease-in-out;animation-fill-mode:backwards;content:""}.ant-checkbox:hover:after,.ant-checkbox-wrapper:hover .ant-checkbox:after{visibility:visible}.ant-checkbox-inner{position:relative;top:0;left:0;display:block;width:20px;height:20px;direction:ltr;background-color:#fff;border:1px solid #d9d9d9;border-radius:3px;border-collapse:separate;transition:all .3s}.ant-checkbox-inner:after{position:absolute;top:50%;left:21.5%;display:table;width:7.14285714px;height:11.42857143px;border:2px solid #fff;border-top:0;border-left:0;transform:rotate(45deg) scale(0) translate(-50%,-50%);opacity:0;transition:all .1s cubic-bezier(.71,-.46,.88,.6),opacity .1s;content:" "}.ant-checkbox-input{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;width:100%;height:100%;cursor:pointer;opacity:0}.ant-checkbox-checked .ant-checkbox-inner:after{position:absolute;display:table;border:2px solid #fff;border-top:0;border-left:0;transform:rotate(45deg) scale(1) translate(-50%,-50%);opacity:1;transition:all .2s cubic-bezier(.12,.4,.29,1.46) .1s;content:" "}.ant-checkbox-checked .ant-checkbox-inner{background-color:#8d6a46;border-color:#8d6a46}.ant-checkbox-disabled{cursor:not-allowed}.ant-checkbox-disabled.ant-checkbox-checked .ant-checkbox-inner:after{border-color:#00000040;animation-name:none}.ant-checkbox-disabled .ant-checkbox-input{cursor:not-allowed;pointer-events:none}.ant-checkbox-disabled .ant-checkbox-inner{background-color:#f5f5f5;border-color:#d9d9d9!important}.ant-checkbox-disabled .ant-checkbox-inner:after{border-color:#f5f5f5;border-collapse:separate;animation-name:none}.ant-checkbox-disabled+span{color:#00000040;cursor:not-allowed}.ant-checkbox-disabled:hover:after,.ant-checkbox-wrapper:hover .ant-checkbox-disabled:after{visibility:hidden}.ant-checkbox-wrapper{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";display:inline-flex;align-items:baseline;line-height:unset;cursor:pointer}.ant-checkbox-wrapper:after{display:inline-block;width:0;overflow:hidden;content:" "}.ant-checkbox-wrapper.ant-checkbox-wrapper-disabled{cursor:not-allowed}.ant-checkbox-wrapper+.ant-checkbox-wrapper{margin-left:8px}.ant-checkbox+span{padding-right:8px;padding-left:8px}.ant-checkbox-group{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";display:inline-block}.ant-checkbox-group-item{margin-right:8px}.ant-checkbox-group-item:last-child{margin-right:0}.ant-checkbox-group-item+.ant-checkbox-group-item{margin-left:0}.ant-checkbox-indeterminate .ant-checkbox-inner{background-color:#fff;border-color:#d9d9d9}.ant-checkbox-indeterminate .ant-checkbox-inner:after{top:50%;left:50%;width:12px;height:12px;background-color:#8d6a46;border:0;transform:translate(-50%,-50%) scale(1);opacity:1;content:" "}.ant-checkbox-indeterminate.ant-checkbox-disabled .ant-checkbox-inner:after{background-color:#00000040;border-color:#00000040}.ant-checkbox-rtl{direction:rtl}.ant-checkbox-group-rtl .ant-checkbox-group-item{margin-right:0;margin-left:8px}.ant-checkbox-group-rtl .ant-checkbox-group-item:last-child{margin-left:0!important}.ant-checkbox-group-rtl .ant-checkbox-group-item+.ant-checkbox-group-item{margin-left:8px}.ant-collapse{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";background-color:#fafafa;border:1px solid #d9d9d9;border-bottom:0;border-radius:5px}.ant-collapse>.ant-collapse-item{border-bottom:1px solid #d9d9d9}.ant-collapse>.ant-collapse-item:last-child,.ant-collapse>.ant-collapse-item:last-child>.ant-collapse-header{border-radius:0 0 5px 5px}.ant-collapse>.ant-collapse-item>.ant-collapse-header{position:relative;display:flex;flex-wrap:nowrap;align-items:flex-start;padding:12px 16px;color:#1c2d56;line-height:1.5715;cursor:pointer;transition:all .3s,visibility 0s}.ant-collapse>.ant-collapse-item>.ant-collapse-header .ant-collapse-arrow{display:inline-block;margin-right:12px;font-size:12px;vertical-align:-1px}.ant-collapse>.ant-collapse-item>.ant-collapse-header .ant-collapse-arrow svg{transition:transform .24s}.ant-collapse>.ant-collapse-item>.ant-collapse-header .ant-collapse-extra{margin-left:auto}.ant-collapse>.ant-collapse-item>.ant-collapse-header:focus{outline:none}.ant-collapse>.ant-collapse-item .ant-collapse-header-collapsible-only{cursor:default}.ant-collapse>.ant-collapse-item .ant-collapse-header-collapsible-only .ant-collapse-header-text{cursor:pointer}.ant-collapse>.ant-collapse-item.ant-collapse-no-arrow>.ant-collapse-header{padding-left:12px}.ant-collapse-icon-position-right>.ant-collapse-item>.ant-collapse-header{position:relative;padding:12px 40px 12px 16px}.ant-collapse-icon-position-right>.ant-collapse-item>.ant-collapse-header .ant-collapse-arrow{position:absolute;top:50%;right:16px;left:auto;margin:0;transform:translateY(-50%)}.ant-collapse-content{color:#000000d9;background-color:var(--c-canvas);border-top:1px solid #d9d9d9}.ant-collapse-content>.ant-collapse-content-box{padding:16px}.ant-collapse-content-hidden{display:none}.ant-collapse-item:last-child>.ant-collapse-content{border-radius:0 0 5px 5px}.ant-collapse-borderless{background-color:#fafafa;border:0}.ant-collapse-borderless>.ant-collapse-item{border-bottom:1px solid #d9d9d9}.ant-collapse-borderless>.ant-collapse-item:last-child,.ant-collapse-borderless>.ant-collapse-item:last-child .ant-collapse-header{border-radius:0}.ant-collapse-borderless>.ant-collapse-item>.ant-collapse-content{background-color:transparent;border-top:0}.ant-collapse-borderless>.ant-collapse-item>.ant-collapse-content>.ant-collapse-content-box{padding-top:4px}.ant-collapse-ghost{background-color:transparent;border:0}.ant-collapse-ghost>.ant-collapse-item{border-bottom:0}.ant-collapse-ghost>.ant-collapse-item>.ant-collapse-content{background-color:transparent;border-top:0}.ant-collapse-ghost>.ant-collapse-item>.ant-collapse-content>.ant-collapse-content-box{padding-top:12px;padding-bottom:12px}.ant-collapse .ant-collapse-item-disabled>.ant-collapse-header,.ant-collapse .ant-collapse-item-disabled>.ant-collapse-header>.arrow{color:#00000040;cursor:not-allowed}.ant-collapse-rtl{direction:rtl}.ant-collapse-rtl .ant-collapse>.ant-collapse-item>.ant-collapse-header{padding:12px 40px 12px 16px}.ant-collapse-rtl.ant-collapse>.ant-collapse-item>.ant-collapse-header .ant-collapse-arrow{margin-right:0;margin-left:12px}.ant-collapse-rtl.ant-collapse>.ant-collapse-item>.ant-collapse-header .ant-collapse-arrow svg{transform:rotate(180deg)}.ant-collapse-rtl.ant-collapse>.ant-collapse-item>.ant-collapse-header .ant-collapse-extra{margin-right:auto;margin-left:0}.ant-collapse-rtl.ant-collapse>.ant-collapse-item.ant-collapse-no-arrow>.ant-collapse-header{padding-right:12px;padding-left:0}.ant-comment{position:relative;background-color:inherit}.ant-comment-inner{display:flex;padding:16px 0}.ant-comment-avatar{position:relative;flex-shrink:0;margin-right:12px;cursor:pointer}.ant-comment-avatar img{width:32px;height:32px;border-radius:50%}.ant-comment-content{position:relative;flex:1 1 auto;min-width:1px;font-size:14px;word-wrap:break-word}.ant-comment-content-author{display:flex;flex-wrap:wrap;justify-content:flex-start;margin-bottom:4px;font-size:14px}.ant-comment-content-author>a,.ant-comment-content-author>span{padding-right:8px;font-size:12px;line-height:18px}.ant-comment-content-author-name{color:#00000073;font-size:14px;transition:color .3s}.ant-comment-content-author-name>*{color:#00000073}.ant-comment-content-author-name>*:hover{color:#00000073}.ant-comment-content-author-time{color:#ccc;white-space:nowrap;cursor:auto}.ant-comment-content-detail p{margin-bottom:inherit;white-space:pre-wrap}.ant-comment-actions{margin-top:12px;margin-bottom:inherit;padding-left:0}.ant-comment-actions>li{display:inline-block;color:#00000073}.ant-comment-actions>li>span{margin-right:10px;color:#00000073;font-size:12px;cursor:pointer;transition:color .3s;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-comment-actions>li>span:hover{color:#595959}.ant-comment-nested{margin-left:44px}.ant-comment-rtl{direction:rtl}.ant-comment-rtl .ant-comment-avatar{margin-right:0;margin-left:12px}.ant-comment-rtl .ant-comment-content-author>a,.ant-comment-rtl .ant-comment-content-author>span{padding-right:0;padding-left:8px}.ant-comment-rtl .ant-comment-actions{padding-right:0}.ant-comment-rtl .ant-comment-actions>li>span{margin-right:0;margin-left:10px}.ant-comment-rtl .ant-comment-nested{margin-right:44px;margin-left:0}.ant-picker{box-sizing:border-box;margin:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";padding:4px 10px;position:relative;display:inline-flex;align-items:center;background:var(--c-canvas);border:1px solid #d9d9d9;border-radius:5px;transition:border .3s,box-shadow .3s}.ant-picker:hover,.ant-picker-focused{border-color:#998165;border-right-width:1px!important}.ant-input-rtl .ant-picker:hover,.ant-input-rtl .ant-picker-focused{border-right-width:0;border-left-width:1px!important}.ant-picker-focused{border-color:#998165;box-shadow:0 0 0 2px #8d6a4633;border-right-width:1px!important;outline:0}.ant-input-rtl .ant-picker-focused{border-right-width:0;border-left-width:1px!important}.ant-picker.ant-picker-disabled{background:#f5f5f5;border-color:#d9d9d9;cursor:not-allowed}.ant-picker.ant-picker-disabled .ant-picker-suffix{color:#00000040}.ant-picker.ant-picker-borderless{background-color:transparent!important;border-color:transparent!important;box-shadow:none!important}.ant-picker-input{position:relative;display:inline-flex;align-items:center;width:100%}.ant-picker-input>input{position:relative;display:inline-block;width:100%;min-width:0;color:#000000d9;font-size:14px;line-height:1.5715;background-color:var(--c-canvas);background-image:none;border:1px solid #d9d9d9;border-radius:5px;transition:all .3s;flex:auto;min-width:1px;height:auto;padding:0;background:transparent;border:0}.ant-picker-input>input::-moz-placeholder{opacity:1}.ant-picker-input>input::placeholder{color:#bfbfbf;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-picker-input>input:-moz-placeholder{text-overflow:ellipsis}.ant-picker-input>input:placeholder-shown{text-overflow:ellipsis}.ant-picker-input>input:hover{border-color:#998165;border-right-width:1px!important}.ant-input-rtl .ant-picker-input>input:hover{border-right-width:0;border-left-width:1px!important}.ant-picker-input>input:focus,.ant-picker-input>input-focused{border-color:#998165;box-shadow:0 0 0 2px #8d6a4633;border-right-width:1px!important;outline:0}.ant-input-rtl .ant-picker-input>input:focus,.ant-input-rtl .ant-picker-input>input-focused{border-right-width:0;border-left-width:1px!important}.ant-picker-input>input-disabled{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;box-shadow:none;cursor:not-allowed;opacity:1}.ant-picker-input>input-disabled:hover{border-color:#d9d9d9;border-right-width:1px!important}.ant-picker-input>input[disabled]{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;box-shadow:none;cursor:not-allowed;opacity:1}.ant-picker-input>input[disabled]:hover{border-color:#d9d9d9;border-right-width:1px!important}.ant-picker-input>input-borderless,.ant-picker-input>input-borderless:hover,.ant-picker-input>input-borderless:focus,.ant-picker-input>input-borderless-focused,.ant-picker-input>input-borderless-disabled,.ant-picker-input>input-borderless[disabled]{background-color:transparent;border:none;box-shadow:none}textarea.ant-picker-input>input{max-width:100%;height:auto;min-height:32px;line-height:1.5715;vertical-align:bottom;transition:all .3s,height 0s}.ant-picker-input>input-lg{padding:7.5px 11px;font-size:16px}.ant-picker-input>input-sm{padding:0 7px}.ant-picker-input>input-rtl{direction:rtl}.ant-picker-input>input:focus{box-shadow:none}.ant-picker-input>input[disabled]{background:transparent}.ant-picker-input:hover .ant-picker-clear{opacity:1}.ant-picker-input-placeholder>input{color:#bfbfbf}.ant-picker-large{padding:7.5px 11px}.ant-picker-large .ant-picker-input>input{font-size:16px}.ant-picker-small{padding:0 7px}.ant-picker-suffix{align-self:center;margin-left:4px;color:#00000040;line-height:1;pointer-events:none}.ant-picker-suffix>*{vertical-align:top}.ant-picker-clear{position:absolute;top:50%;right:0;color:#00000040;line-height:1;background:var(--c-canvas);transform:translateY(-50%);cursor:pointer;opacity:0;transition:opacity .3s,color .3s}.ant-picker-clear>*{vertical-align:top}.ant-picker-clear:hover{color:#00000073}.ant-picker-separator{position:relative;display:inline-block;width:1em;height:16px;color:#00000040;font-size:16px;vertical-align:top;cursor:default}.ant-picker-focused .ant-picker-separator{color:#00000073}.ant-picker-disabled .ant-picker-range-separator .ant-picker-separator{cursor:not-allowed}.ant-picker-range{position:relative;display:inline-flex}.ant-picker-range .ant-picker-clear{right:10px}.ant-picker-range:hover .ant-picker-clear{opacity:1}.ant-picker-range .ant-picker-active-bar{bottom:-1px;height:2px;margin-left:10px;background:#8d6a46;opacity:0;transition:all .3s ease-out;pointer-events:none}.ant-picker-range.ant-picker-focused .ant-picker-active-bar{opacity:1}.ant-picker-range-separator{align-items:center;padding:0 8px;line-height:1}.ant-picker-range.ant-picker-small .ant-picker-clear{right:7px}.ant-picker-range.ant-picker-small .ant-picker-active-bar{margin-left:7px}.ant-picker-dropdown{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:absolute;z-index:1050}.ant-picker-dropdown-hidden{display:none}.ant-picker-dropdown-placement-bottomLeft .ant-picker-range-arrow{top:1.66666667px;display:block;transform:rotate(-45deg)}.ant-picker-dropdown-placement-topLeft .ant-picker-range-arrow{bottom:1.66666667px;display:block;transform:rotate(135deg)}.ant-picker-dropdown.ant-slide-up-enter.ant-slide-up-enter-active.ant-picker-dropdown-placement-topLeft,.ant-picker-dropdown.ant-slide-up-enter.ant-slide-up-enter-active.ant-picker-dropdown-placement-topRight,.ant-picker-dropdown.ant-slide-up-appear.ant-slide-up-appear-active.ant-picker-dropdown-placement-topLeft,.ant-picker-dropdown.ant-slide-up-appear.ant-slide-up-appear-active.ant-picker-dropdown-placement-topRight{animation-name:antSlideDownIn}.ant-picker-dropdown.ant-slide-up-enter.ant-slide-up-enter-active.ant-picker-dropdown-placement-bottomLeft,.ant-picker-dropdown.ant-slide-up-enter.ant-slide-up-enter-active.ant-picker-dropdown-placement-bottomRight,.ant-picker-dropdown.ant-slide-up-appear.ant-slide-up-appear-active.ant-picker-dropdown-placement-bottomLeft,.ant-picker-dropdown.ant-slide-up-appear.ant-slide-up-appear-active.ant-picker-dropdown-placement-bottomRight{animation-name:antSlideUpIn}.ant-picker-dropdown.ant-slide-up-leave.ant-slide-up-leave-active.ant-picker-dropdown-placement-topLeft,.ant-picker-dropdown.ant-slide-up-leave.ant-slide-up-leave-active.ant-picker-dropdown-placement-topRight{animation-name:antSlideDownOut}.ant-picker-dropdown.ant-slide-up-leave.ant-slide-up-leave-active.ant-picker-dropdown-placement-bottomLeft,.ant-picker-dropdown.ant-slide-up-leave.ant-slide-up-leave-active.ant-picker-dropdown-placement-bottomRight{animation-name:antSlideUpOut}.ant-picker-dropdown-range{padding:6.66666667px 0}.ant-picker-dropdown-range-hidden{display:none}.ant-picker-dropdown .ant-picker-panel>.ant-picker-time-panel{padding-top:4px}.ant-picker-ranges{margin-bottom:0;padding:4px 12px;overflow:hidden;line-height:34px;text-align:left;list-style:none}.ant-picker-ranges>li{display:inline-block}.ant-picker-ranges .ant-picker-preset>.ant-tag-blue{color:#8d6a46;background:#ccc8c0;border-color:#b3aea8;cursor:pointer}.ant-picker-ranges .ant-picker-ok{float:right;margin-left:8px}.ant-picker-range-wrapper{display:flex}.ant-picker-range-arrow{position:absolute;z-index:1;display:none;width:10px;height:10px;margin-left:15px;box-shadow:2px -2px 6px #0000000f;transition:left .3s ease-out}.ant-picker-range-arrow:after{position:absolute;top:1px;right:1px;width:10px;height:10px;border:5px solid #f0f0f0;border-color:var(--c-canvas) var(--c-canvas) transparent transparent;content:""}.ant-picker-panel-container{overflow:hidden;vertical-align:top;background:var(--c-canvas);border-radius:5px;box-shadow:0 3px 6px -4px #0000001f,0 6px 16px #00000014,0 9px 28px 8px #0000000d;transition:margin .3s}.ant-picker-panel-container .ant-picker-panels{display:inline-flex;flex-wrap:nowrap;direction:ltr}.ant-picker-panel-container .ant-picker-panel{vertical-align:top;background:transparent;border-width:0 0 1px 0;border-radius:0}.ant-picker-panel-container .ant-picker-panel .ant-picker-content,.ant-picker-panel-container .ant-picker-panel table{text-align:center}.ant-picker-panel-container .ant-picker-panel-focused{border-color:#f0f0f0}.ant-picker-panel{display:inline-flex;flex-direction:column;text-align:center;background:var(--c-canvas);border:1px solid #f0f0f0;border-radius:5px;outline:none}.ant-picker-panel-focused{border-color:#8d6a46}.ant-picker-decade-panel,.ant-picker-year-panel,.ant-picker-quarter-panel,.ant-picker-month-panel,.ant-picker-week-panel,.ant-picker-date-panel,.ant-picker-time-panel{display:flex;flex-direction:column;width:280px}.ant-picker-header{display:flex;padding:0 8px;color:#1c2d56;border-bottom:1px solid #f0f0f0}.ant-picker-header>*{flex:none}.ant-picker-header button{padding:0;color:#00000040;line-height:40px;background:transparent;border:0;cursor:pointer;transition:color .3s}.ant-picker-header>button{min-width:1.6em;font-size:14px}.ant-picker-header>button:hover{color:#000000d9}.ant-picker-header-view{flex:auto;font-weight:500;line-height:40px}.ant-picker-header-view button{color:inherit;font-weight:inherit}.ant-picker-header-view button:not(:first-child){margin-left:8px}.ant-picker-header-view button:hover{color:#8d6a46}.ant-picker-prev-icon,.ant-picker-next-icon,.ant-picker-super-prev-icon,.ant-picker-super-next-icon{position:relative;display:inline-block;width:7px;height:7px}.ant-picker-prev-icon:before,.ant-picker-next-icon:before,.ant-picker-super-prev-icon:before,.ant-picker-super-next-icon:before{position:absolute;top:0;left:0;display:inline-block;width:7px;height:7px;border:0 solid currentcolor;border-width:1.5px 0 0 1.5px;content:""}.ant-picker-super-prev-icon:after,.ant-picker-super-next-icon:after{position:absolute;top:4px;left:4px;display:inline-block;width:7px;height:7px;border:0 solid currentcolor;border-width:1.5px 0 0 1.5px;content:""}.ant-picker-prev-icon,.ant-picker-super-prev-icon{transform:rotate(-45deg)}.ant-picker-next-icon,.ant-picker-super-next-icon{transform:rotate(135deg)}.ant-picker-content{width:100%;table-layout:fixed;border-collapse:collapse}.ant-picker-content th,.ant-picker-content td{position:relative;min-width:24px;font-weight:400}.ant-picker-content th{height:30px;color:#000000d9;line-height:30px}.ant-picker-cell{padding:3px 0;color:#00000040;cursor:pointer}.ant-picker-cell-in-view{color:#000000d9}.ant-picker-cell:before{position:absolute;top:50%;right:0;left:0;z-index:1;height:24px;transform:translateY(-50%);transition:all .3s;content:""}.ant-picker-cell:hover:not(.ant-picker-cell-in-view) .ant-picker-cell-inner,.ant-picker-cell:hover:not(.ant-picker-cell-selected):not(.ant-picker-cell-range-start):not(.ant-picker-cell-range-end):not(.ant-picker-cell-range-hover-start):not(.ant-picker-cell-range-hover-end) .ant-picker-cell-inner{background:#f5f5f5}.ant-picker-cell-in-view.ant-picker-cell-today .ant-picker-cell-inner:before{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;border:1px solid #8D6A46;border-radius:5px;content:""}.ant-picker-cell-in-view.ant-picker-cell-in-range{position:relative}.ant-picker-cell-in-view.ant-picker-cell-in-range:before{background:#ccc8c0}.ant-picker-cell-in-view.ant-picker-cell-selected .ant-picker-cell-inner,.ant-picker-cell-in-view.ant-picker-cell-range-start .ant-picker-cell-inner,.ant-picker-cell-in-view.ant-picker-cell-range-end .ant-picker-cell-inner{color:#fff;background:#8d6a46}.ant-picker-cell-in-view.ant-picker-cell-range-start:not(.ant-picker-cell-range-start-single):before,.ant-picker-cell-in-view.ant-picker-cell-range-end:not(.ant-picker-cell-range-end-single):before{background:#ccc8c0}.ant-picker-cell-in-view.ant-picker-cell-range-start:before{left:50%}.ant-picker-cell-in-view.ant-picker-cell-range-end:before{right:50%}.ant-picker-cell-in-view.ant-picker-cell-range-hover-start:not(.ant-picker-cell-in-range):not(.ant-picker-cell-range-start):not(.ant-picker-cell-range-end):after,.ant-picker-cell-in-view.ant-picker-cell-range-hover-end:not(.ant-picker-cell-in-range):not(.ant-picker-cell-range-start):not(.ant-picker-cell-range-end):after,.ant-picker-cell-in-view.ant-picker-cell-range-hover-start.ant-picker-cell-range-start-single:after,.ant-picker-cell-in-view.ant-picker-cell-range-hover-start.ant-picker-cell-range-start.ant-picker-cell-range-end.ant-picker-cell-range-end-near-hover:after,.ant-picker-cell-in-view.ant-picker-cell-range-hover-end.ant-picker-cell-range-start.ant-picker-cell-range-end.ant-picker-cell-range-start-near-hover:after,.ant-picker-cell-in-view.ant-picker-cell-range-hover-end.ant-picker-cell-range-end-single:after,.ant-picker-cell-in-view.ant-picker-cell-range-hover:not(.ant-picker-cell-in-range):after{position:absolute;top:50%;z-index:0;height:24px;border-top:1px dashed #be9d7b;border-bottom:1px dashed #be9d7b;transform:translateY(-50%);transition:all .3s;content:""}.ant-picker-cell-range-hover-start:after,.ant-picker-cell-range-hover-end:after,.ant-picker-cell-range-hover:after{right:0;left:2px}.ant-picker-cell-in-view.ant-picker-cell-in-range.ant-picker-cell-range-hover:before,.ant-picker-cell-in-view.ant-picker-cell-range-start.ant-picker-cell-range-hover:before,.ant-picker-cell-in-view.ant-picker-cell-range-end.ant-picker-cell-range-hover:before,.ant-picker-cell-in-view.ant-picker-cell-range-start:not(.ant-picker-cell-range-start-single).ant-picker-cell-range-hover-start:before,.ant-picker-cell-in-view.ant-picker-cell-range-end:not(.ant-picker-cell-range-end-single).ant-picker-cell-range-hover-end:before,.ant-picker-panel>:not(.ant-picker-date-panel) .ant-picker-cell-in-view.ant-picker-cell-in-range.ant-picker-cell-range-hover-start:before,.ant-picker-panel>:not(.ant-picker-date-panel) .ant-picker-cell-in-view.ant-picker-cell-in-range.ant-picker-cell-range-hover-end:before{background:#d7c3ae}.ant-picker-cell-in-view.ant-picker-cell-range-start:not(.ant-picker-cell-range-start-single):not(.ant-picker-cell-range-end) .ant-picker-cell-inner{border-radius:5px 0 0 5px}.ant-picker-cell-in-view.ant-picker-cell-range-end:not(.ant-picker-cell-range-end-single):not(.ant-picker-cell-range-start) .ant-picker-cell-inner{border-radius:0 5px 5px 0}.ant-picker-date-panel .ant-picker-cell-in-view.ant-picker-cell-in-range.ant-picker-cell-range-hover-start .ant-picker-cell-inner:after,.ant-picker-date-panel .ant-picker-cell-in-view.ant-picker-cell-in-range.ant-picker-cell-range-hover-end .ant-picker-cell-inner:after{position:absolute;top:0;bottom:0;z-index:-1;background:#d7c3ae;transition:all .3s;content:""}.ant-picker-date-panel .ant-picker-cell-in-view.ant-picker-cell-in-range.ant-picker-cell-range-hover-start .ant-picker-cell-inner:after{right:-6px;left:0}.ant-picker-date-panel .ant-picker-cell-in-view.ant-picker-cell-in-range.ant-picker-cell-range-hover-end .ant-picker-cell-inner:after{right:0;left:-6px}.ant-picker-cell-range-hover.ant-picker-cell-range-start:after{right:50%}.ant-picker-cell-range-hover.ant-picker-cell-range-end:after{left:50%}tr>.ant-picker-cell-in-view.ant-picker-cell-range-hover:first-child:after,tr>.ant-picker-cell-in-view.ant-picker-cell-range-hover-end:first-child:after,.ant-picker-cell-in-view.ant-picker-cell-start.ant-picker-cell-range-hover-edge-start.ant-picker-cell-range-hover-edge-start-near-range:after,.ant-picker-cell-in-view.ant-picker-cell-range-hover-edge-start:not(.ant-picker-cell-range-hover-edge-start-near-range):after,.ant-picker-cell-in-view.ant-picker-cell-range-hover-start:after{left:6px;border-left:1px dashed #be9d7b;border-top-left-radius:5px;border-bottom-left-radius:5px}tr>.ant-picker-cell-in-view.ant-picker-cell-range-hover:last-child:after,tr>.ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child:after,.ant-picker-cell-in-view.ant-picker-cell-end.ant-picker-cell-range-hover-edge-end.ant-picker-cell-range-hover-edge-end-near-range:after,.ant-picker-cell-in-view.ant-picker-cell-range-hover-edge-end:not(.ant-picker-cell-range-hover-edge-end-near-range):after,.ant-picker-cell-in-view.ant-picker-cell-range-hover-end:after{right:6px;border-right:1px dashed #be9d7b;border-top-right-radius:5px;border-bottom-right-radius:5px}.ant-picker-cell-disabled{color:#00000040;pointer-events:none}.ant-picker-cell-disabled .ant-picker-cell-inner{background:transparent}.ant-picker-cell-disabled:before{background:#0000000a}.ant-picker-cell-disabled.ant-picker-cell-today .ant-picker-cell-inner:before{border-color:#00000040}.ant-picker-decade-panel .ant-picker-content,.ant-picker-year-panel .ant-picker-content,.ant-picker-quarter-panel .ant-picker-content,.ant-picker-month-panel .ant-picker-content{height:264px}.ant-picker-decade-panel .ant-picker-cell-inner,.ant-picker-year-panel .ant-picker-cell-inner,.ant-picker-quarter-panel .ant-picker-cell-inner,.ant-picker-month-panel .ant-picker-cell-inner{padding:0 8px}.ant-picker-quarter-panel .ant-picker-content{height:56px}.ant-picker-footer{width:-moz-min-content;width:min-content;min-width:100%;line-height:38px;text-align:center;border-bottom:1px solid transparent}.ant-picker-panel .ant-picker-footer{border-top:1px solid #f0f0f0}.ant-picker-footer-extra{padding:0 12px;line-height:38px;text-align:left}.ant-picker-footer-extra:not(:last-child){border-bottom:1px solid #f0f0f0}.ant-picker-now{text-align:left}.ant-picker-today-btn{color:#1c2d56}.ant-picker-today-btn:hover{color:#314263}.ant-picker-today-btn:active{color:#0e1730}.ant-picker-today-btn.ant-picker-today-btn-disabled{color:#00000040;cursor:not-allowed}.ant-picker-decade-panel .ant-picker-cell-inner{padding:0 4px}.ant-picker-decade-panel .ant-picker-cell:before{display:none}.ant-picker-year-panel .ant-picker-body,.ant-picker-quarter-panel .ant-picker-body,.ant-picker-month-panel .ant-picker-body{padding:0 8px}.ant-picker-year-panel .ant-picker-cell-inner,.ant-picker-quarter-panel .ant-picker-cell-inner,.ant-picker-month-panel .ant-picker-cell-inner{width:60px}.ant-picker-year-panel .ant-picker-cell-range-hover-start:after,.ant-picker-quarter-panel .ant-picker-cell-range-hover-start:after,.ant-picker-month-panel .ant-picker-cell-range-hover-start:after{left:14px;border-left:1px dashed #be9d7b;border-radius:5px 0 0 5px}.ant-picker-panel-rtl .ant-picker-year-panel .ant-picker-cell-range-hover-start:after,.ant-picker-panel-rtl .ant-picker-quarter-panel .ant-picker-cell-range-hover-start:after,.ant-picker-panel-rtl .ant-picker-month-panel .ant-picker-cell-range-hover-start:after{right:14px;border-right:1px dashed #be9d7b;border-radius:0 5px 5px 0}.ant-picker-year-panel .ant-picker-cell-range-hover-end:after,.ant-picker-quarter-panel .ant-picker-cell-range-hover-end:after,.ant-picker-month-panel .ant-picker-cell-range-hover-end:after{right:14px;border-right:1px dashed #be9d7b;border-radius:0 5px 5px 0}.ant-picker-panel-rtl .ant-picker-year-panel .ant-picker-cell-range-hover-end:after,.ant-picker-panel-rtl .ant-picker-quarter-panel .ant-picker-cell-range-hover-end:after,.ant-picker-panel-rtl .ant-picker-month-panel .ant-picker-cell-range-hover-end:after{left:14px;border-left:1px dashed #be9d7b;border-radius:5px 0 0 5px}.ant-picker-week-panel .ant-picker-body{padding:8px 12px}.ant-picker-week-panel .ant-picker-cell:hover .ant-picker-cell-inner,.ant-picker-week-panel .ant-picker-cell-selected .ant-picker-cell-inner,.ant-picker-week-panel .ant-picker-cell .ant-picker-cell-inner{background:transparent!important}.ant-picker-week-panel-row td{transition:background .3s}.ant-picker-week-panel-row:hover td{background:#f5f5f5}.ant-picker-week-panel-row-selected td,.ant-picker-week-panel-row-selected:hover td{background:#8d6a46}.ant-picker-week-panel-row-selected td.ant-picker-cell-week,.ant-picker-week-panel-row-selected:hover td.ant-picker-cell-week{color:#ffffff80}.ant-picker-week-panel-row-selected td.ant-picker-cell-today .ant-picker-cell-inner:before,.ant-picker-week-panel-row-selected:hover td.ant-picker-cell-today .ant-picker-cell-inner:before{border-color:#fff}.ant-picker-week-panel-row-selected td .ant-picker-cell-inner,.ant-picker-week-panel-row-selected:hover td .ant-picker-cell-inner{color:#fff}.ant-picker-date-panel .ant-picker-body{padding:8px 12px}.ant-picker-date-panel .ant-picker-content{width:252px}.ant-picker-date-panel .ant-picker-content th{width:36px}.ant-picker-datetime-panel{display:flex}.ant-picker-datetime-panel .ant-picker-time-panel{border-left:1px solid #f0f0f0}.ant-picker-datetime-panel .ant-picker-date-panel,.ant-picker-datetime-panel .ant-picker-time-panel{transition:opacity .3s}.ant-picker-datetime-panel-active .ant-picker-date-panel,.ant-picker-datetime-panel-active .ant-picker-time-panel{opacity:.3}.ant-picker-datetime-panel-active .ant-picker-date-panel-active,.ant-picker-datetime-panel-active .ant-picker-time-panel-active{opacity:1}.ant-picker-time-panel{width:auto;min-width:auto}.ant-picker-time-panel .ant-picker-content{display:flex;flex:auto;height:224px}.ant-picker-time-panel-column{flex:1 0 auto;width:56px;margin:0;padding:0;overflow-y:hidden;text-align:left;list-style:none;transition:background .3s}.ant-picker-time-panel-column:after{display:block;height:196px;content:""}.ant-picker-datetime-panel .ant-picker-time-panel-column:after{height:198px}.ant-picker-time-panel-column:not(:first-child){border-left:1px solid #f0f0f0}.ant-picker-time-panel-column-active{background:#ccc8c033}.ant-picker-time-panel-column:hover{overflow-y:auto}.ant-picker-time-panel-column>li{margin:0;padding:0}.ant-picker-time-panel-column>li.ant-picker-time-panel-cell .ant-picker-time-panel-cell-inner{display:block;width:100%;height:28px;margin:0;padding:0 0 0 14px;color:#000000d9;line-height:28px;border-radius:0;cursor:pointer;transition:background .3s}.ant-picker-time-panel-column>li.ant-picker-time-panel-cell .ant-picker-time-panel-cell-inner:hover{background:#f5f5f5}.ant-picker-time-panel-column>li.ant-picker-time-panel-cell-selected .ant-picker-time-panel-cell-inner{background:#ccc8c0}.ant-picker-time-panel-column>li.ant-picker-time-panel-cell-disabled .ant-picker-time-panel-cell-inner{color:#00000040;background:transparent;cursor:not-allowed}_:-ms-fullscreen .ant-picker-range-wrapper .ant-picker-month-panel .ant-picker-cell,:root .ant-picker-range-wrapper .ant-picker-month-panel .ant-picker-cell,_:-ms-fullscreen .ant-picker-range-wrapper .ant-picker-year-panel .ant-picker-cell,:root .ant-picker-range-wrapper .ant-picker-year-panel .ant-picker-cell{padding:21px 0}.ant-picker-rtl{direction:rtl}.ant-picker-rtl .ant-picker-suffix{margin-right:4px;margin-left:0}.ant-picker-rtl .ant-picker-clear{right:auto;left:0}.ant-picker-rtl .ant-picker-separator{transform:rotate(180deg)}.ant-picker-panel-rtl .ant-picker-header-view button:not(:first-child){margin-right:8px;margin-left:0}.ant-picker-rtl.ant-picker-range .ant-picker-clear{right:auto;left:10px}.ant-picker-rtl.ant-picker-range .ant-picker-active-bar{margin-right:10px;margin-left:0}.ant-picker-rtl.ant-picker-range.ant-picker-small .ant-picker-active-bar{margin-right:7px}.ant-picker-dropdown-rtl .ant-picker-ranges{text-align:right}.ant-picker-dropdown-rtl .ant-picker-ranges .ant-picker-ok{float:left;margin-right:8px;margin-left:0}.ant-picker-panel-rtl{direction:rtl}.ant-picker-panel-rtl .ant-picker-prev-icon,.ant-picker-panel-rtl .ant-picker-super-prev-icon{transform:rotate(135deg)}.ant-picker-panel-rtl .ant-picker-next-icon,.ant-picker-panel-rtl .ant-picker-super-next-icon{transform:rotate(-45deg)}.ant-picker-cell .ant-picker-cell-inner{position:relative;z-index:2;display:inline-block;min-width:24px;height:24px;line-height:24px;border-radius:5px;transition:background .3s,border .3s}.ant-picker-panel-rtl .ant-picker-cell-in-view.ant-picker-cell-range-start:before{right:50%;left:0}.ant-picker-panel-rtl .ant-picker-cell-in-view.ant-picker-cell-range-end:before{right:0;left:50%}.ant-picker-panel-rtl .ant-picker-cell-in-view.ant-picker-cell-range-start.ant-picker-cell-range-end:before{right:50%;left:50%}.ant-picker-panel-rtl .ant-picker-date-panel .ant-picker-cell-in-view.ant-picker-cell-in-range.ant-picker-cell-range-hover-start .ant-picker-cell-inner:after{right:0;left:-6px}.ant-picker-panel-rtl .ant-picker-date-panel .ant-picker-cell-in-view.ant-picker-cell-in-range.ant-picker-cell-range-hover-end .ant-picker-cell-inner:after{right:-6px;left:0}.ant-picker-panel-rtl .ant-picker-cell-range-hover.ant-picker-cell-range-start:after{right:0;left:50%}.ant-picker-panel-rtl .ant-picker-cell-range-hover.ant-picker-cell-range-end:after{right:50%;left:0}.ant-picker-panel-rtl .ant-picker-cell-in-view.ant-picker-cell-range-start:not(.ant-picker-cell-range-start-single):not(.ant-picker-cell-range-end) .ant-picker-cell-inner{border-radius:0 5px 5px 0}.ant-picker-panel-rtl .ant-picker-cell-in-view.ant-picker-cell-range-end:not(.ant-picker-cell-range-end-single):not(.ant-picker-cell-range-start) .ant-picker-cell-inner{border-radius:5px 0 0 5px}.ant-picker-panel-rtl tr>.ant-picker-cell-in-view.ant-picker-cell-range-hover:not(.ant-picker-cell-selected):first-child:after,.ant-picker-panel-rtl .ant-picker-cell-in-view.ant-picker-cell-start.ant-picker-cell-range-hover-edge-start.ant-picker-cell-range-hover-edge-start-near-range:after,.ant-picker-panel-rtl .ant-picker-cell-in-view.ant-picker-cell-range-hover-edge-start:not(.ant-picker-cell-range-hover-edge-start-near-range):after,.ant-picker-panel-rtl .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:after{right:6px;left:0;border-right:1px dashed #be9d7b;border-left:none;border-radius:0 5px 5px 0}.ant-picker-panel-rtl tr>.ant-picker-cell-in-view.ant-picker-cell-range-hover:not(.ant-picker-cell-selected):last-child:after,.ant-picker-panel-rtl .ant-picker-cell-in-view.ant-picker-cell-end.ant-picker-cell-range-hover-edge-end.ant-picker-cell-range-hover-edge-end-near-range:after,.ant-picker-panel-rtl .ant-picker-cell-in-view.ant-picker-cell-range-hover-edge-end:not(.ant-picker-cell-range-hover-edge-end-near-range):after,.ant-picker-panel-rtl .ant-picker-cell-in-view.ant-picker-cell-range-hover-end:after{right:0;left:6px;border-right:none;border-left:1px dashed #be9d7b;border-radius:5px 0 0 5px}.ant-picker-panel-rtl tr>.ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child:after,.ant-picker-panel-rtl tr>.ant-picker-cell-in-view.ant-picker-cell-range-hover-end:first-child:after,.ant-picker-panel-rtl .ant-picker-cell-in-view.ant-picker-cell-start.ant-picker-cell-range-hover-edge-start:not(.ant-picker-cell-range-hover):after,.ant-picker-panel-rtl .ant-picker-cell-in-view.ant-picker-cell-start.ant-picker-cell-range-hover-end.ant-picker-cell-range-hover-edge-start:not(.ant-picker-cell-range-hover):after,.ant-picker-panel-rtl .ant-picker-cell-in-view.ant-picker-cell-end.ant-picker-cell-range-hover-start.ant-picker-cell-range-hover-edge-end:not(.ant-picker-cell-range-hover):after,.ant-picker-panel-rtl tr>.ant-picker-cell-in-view.ant-picker-cell-start.ant-picker-cell-range-hover.ant-picker-cell-range-hover-edge-start:last-child:after,.ant-picker-panel-rtl tr>.ant-picker-cell-in-view.ant-picker-cell-end.ant-picker-cell-range-hover.ant-picker-cell-range-hover-edge-end:first-child:after{right:6px;left:6px;border-right:1px dashed #be9d7b;border-left:1px dashed #be9d7b;border-radius:5px}.ant-picker-dropdown-rtl .ant-picker-footer-extra{direction:rtl;text-align:right}.ant-picker-panel-rtl .ant-picker-time-panel{direction:ltr}.ant-descriptions-header{display:flex;align-items:center;margin-bottom:20px}.ant-descriptions-title{flex:auto;overflow:hidden;color:#1c2d56;font-weight:700;font-size:16px;line-height:1.5715;white-space:nowrap;text-overflow:ellipsis}.ant-descriptions-extra{margin-left:auto;color:#000000d9;font-size:14px}.ant-descriptions-view{width:100%;border-radius:5px}.ant-descriptions-view table{width:100%;table-layout:fixed}.ant-descriptions-row>th,.ant-descriptions-row>td{padding-bottom:16px}.ant-descriptions-row:last-child{border-bottom:none}.ant-descriptions-item-label{color:#1c2d56;font-weight:400;font-size:14px;line-height:1.5715;text-align:start}.ant-descriptions-item-label:after{content:":";position:relative;top:-.5px;margin:0 8px 0 2px}.ant-descriptions-item-label.ant-descriptions-item-no-colon:after{content:" "}.ant-descriptions-item-no-label:after{margin:0;content:""}.ant-descriptions-item-content{display:table-cell;flex:1;color:#000000d9;font-size:14px;line-height:1.5715;word-break:break-word;overflow-wrap:break-word}.ant-descriptions-item{padding-bottom:0;vertical-align:top}.ant-descriptions-item-container{display:flex}.ant-descriptions-item-container .ant-descriptions-item-label,.ant-descriptions-item-container .ant-descriptions-item-content{display:inline-flex;align-items:baseline}.ant-descriptions-middle .ant-descriptions-row>th,.ant-descriptions-middle .ant-descriptions-row>td{padding-bottom:12px}.ant-descriptions-small .ant-descriptions-row>th,.ant-descriptions-small .ant-descriptions-row>td{padding-bottom:8px}.ant-descriptions-bordered .ant-descriptions-view{border:1px solid #f0f0f0}.ant-descriptions-bordered .ant-descriptions-view>table{table-layout:auto;border-collapse:collapse}.ant-descriptions-bordered .ant-descriptions-item-label,.ant-descriptions-bordered .ant-descriptions-item-content{padding:16px 24px;border-right:1px solid #f0f0f0}.ant-descriptions-bordered .ant-descriptions-item-label:last-child,.ant-descriptions-bordered .ant-descriptions-item-content:last-child{border-right:none}.ant-descriptions-bordered .ant-descriptions-item-label{background-color:#fafafa}.ant-descriptions-bordered .ant-descriptions-item-label:after{display:none}.ant-descriptions-bordered .ant-descriptions-row{border-bottom:1px solid #f0f0f0}.ant-descriptions-bordered .ant-descriptions-row:last-child{border-bottom:none}.ant-descriptions-bordered.ant-descriptions-middle .ant-descriptions-item-label,.ant-descriptions-bordered.ant-descriptions-middle .ant-descriptions-item-content{padding:12px 24px}.ant-descriptions-bordered.ant-descriptions-small .ant-descriptions-item-label,.ant-descriptions-bordered.ant-descriptions-small .ant-descriptions-item-content{padding:8px 16px}.ant-descriptions-rtl{direction:rtl}.ant-descriptions-rtl .ant-descriptions-item-label:after{margin:0 2px 0 8px}.ant-descriptions-rtl.ant-descriptions-bordered .ant-descriptions-item-label,.ant-descriptions-rtl.ant-descriptions-bordered .ant-descriptions-item-content{border-right:none;border-left:1px solid #f0f0f0}.ant-descriptions-rtl.ant-descriptions-bordered .ant-descriptions-item-label:last-child,.ant-descriptions-rtl.ant-descriptions-bordered .ant-descriptions-item-content:last-child{border-left:none}.ant-divider{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";border-top:1px solid rgba(0,0,0,.06)}.ant-divider-vertical{position:relative;top:-.06em;display:inline-block;height:.9em;margin:0 8px;vertical-align:middle;border-top:0;border-left:1px solid rgba(0,0,0,.06)}.ant-divider-horizontal{display:flex;clear:both;width:100%;min-width:100%;margin:24px 0}.ant-divider-horizontal.ant-divider-with-text{display:flex;margin:16px 0;color:#1c2d56;font-weight:500;font-size:16px;white-space:nowrap;text-align:center;border-top:0;border-top-color:#0000000f}.ant-divider-horizontal.ant-divider-with-text:before,.ant-divider-horizontal.ant-divider-with-text:after{position:relative;top:50%;width:50%;border-top:1px solid transparent;border-top-color:inherit;border-bottom:0;transform:translateY(50%);content:""}.ant-divider-horizontal.ant-divider-with-text-left:before{top:50%;width:5%}.ant-divider-horizontal.ant-divider-with-text-left:after{top:50%;width:95%}.ant-divider-horizontal.ant-divider-with-text-right:before{top:50%;width:95%}.ant-divider-horizontal.ant-divider-with-text-right:after{top:50%;width:5%}.ant-divider-inner-text{display:inline-block;padding:0 1em}.ant-divider-dashed{background:none;border-color:#0000000f;border-style:dashed;border-width:1px 0 0}.ant-divider-horizontal.ant-divider-with-text.ant-divider-dashed:before,.ant-divider-horizontal.ant-divider-with-text.ant-divider-dashed:after{border-style:dashed none none}.ant-divider-vertical.ant-divider-dashed{border-width:0 0 0 1px}.ant-divider-plain.ant-divider-with-text{color:#000000d9;font-weight:400;font-size:14px}.ant-divider-horizontal.ant-divider-with-text-left.ant-divider-no-default-orientation-margin-left:before{width:0}.ant-divider-horizontal.ant-divider-with-text-left.ant-divider-no-default-orientation-margin-left:after{width:100%}.ant-divider-horizontal.ant-divider-with-text-left.ant-divider-no-default-orientation-margin-left .ant-divider-inner-text{padding-left:0}.ant-divider-horizontal.ant-divider-with-text-right.ant-divider-no-default-orientation-margin-right:before{width:100%}.ant-divider-horizontal.ant-divider-with-text-right.ant-divider-no-default-orientation-margin-right:after{width:0}.ant-divider-horizontal.ant-divider-with-text-right.ant-divider-no-default-orientation-margin-right .ant-divider-inner-text{padding-right:0}.ant-divider-rtl{direction:rtl}.ant-divider-rtl.ant-divider-horizontal.ant-divider-with-text-left:before{width:95%}.ant-divider-rtl.ant-divider-horizontal.ant-divider-with-text-left:after{width:5%}.ant-divider-rtl.ant-divider-horizontal.ant-divider-with-text-right:before{width:5%}.ant-divider-rtl.ant-divider-horizontal.ant-divider-with-text-right:after{width:95%}.ant-drawer{position:fixed;z-index:1000;width:0%;height:100%;transition:width 0s ease .3s,height 0s ease .3s}.ant-drawer-content-wrapper{position:absolute;width:100%;height:100%;transition:transform .3s cubic-bezier(.23,1,.32,1),box-shadow .3s cubic-bezier(.23,1,.32,1)}.ant-drawer .ant-drawer-content{width:100%;height:100%}.ant-drawer-left,.ant-drawer-right{top:0;width:0%;height:100%}.ant-drawer-left .ant-drawer-content-wrapper,.ant-drawer-right .ant-drawer-content-wrapper{height:100%}.ant-drawer-left.ant-drawer-open,.ant-drawer-right.ant-drawer-open{width:100%;transition:transform .3s cubic-bezier(.23,1,.32,1)}.ant-drawer-left,.ant-drawer-left .ant-drawer-content-wrapper{left:0}.ant-drawer-left.ant-drawer-open .ant-drawer-content-wrapper{box-shadow:6px 0 16px -8px #00000014,9px 0 28px #0000000d,12px 0 48px 16px #00000008}.ant-drawer-right,.ant-drawer-right .ant-drawer-content-wrapper{right:0}.ant-drawer-right.ant-drawer-open .ant-drawer-content-wrapper{box-shadow:-6px 0 16px -8px #00000014,-9px 0 28px #0000000d,-12px 0 48px 16px #00000008}.ant-drawer-right.ant-drawer-open.no-mask{right:1px;transform:translate(1px)}.ant-drawer-top,.ant-drawer-bottom{left:0;width:100%;height:0%}.ant-drawer-top .ant-drawer-content-wrapper,.ant-drawer-bottom .ant-drawer-content-wrapper{width:100%}.ant-drawer-top.ant-drawer-open,.ant-drawer-bottom.ant-drawer-open{height:100%;transition:transform .3s cubic-bezier(.23,1,.32,1)}.ant-drawer-top{top:0}.ant-drawer-top.ant-drawer-open .ant-drawer-content-wrapper{box-shadow:0 6px 16px -8px #00000014,0 9px 28px #0000000d,0 12px 48px 16px #00000008}.ant-drawer-bottom,.ant-drawer-bottom .ant-drawer-content-wrapper{bottom:0}.ant-drawer-bottom.ant-drawer-open .ant-drawer-content-wrapper{box-shadow:0 -6px 16px -8px #00000014,0 -9px 28px #0000000d,0 -12px 48px 16px #00000008}.ant-drawer-bottom.ant-drawer-open.no-mask{bottom:1px;transform:translateY(1px)}.ant-drawer.ant-drawer-open .ant-drawer-mask{height:100%;opacity:1;transition:none;animation:antdDrawerFadeIn .3s cubic-bezier(.23,1,.32,1);pointer-events:auto}.ant-drawer-title{flex:1;margin:0;color:#1c2d56;font-weight:500;font-size:16px;line-height:22px}.ant-drawer-content{position:relative;z-index:1;overflow:auto;background-color:var(--c-canvas);background-clip:padding-box;border:0}.ant-drawer-close{display:inline-block;margin-right:12px;color:#00000073;font-weight:700;font-size:16px;font-style:normal;line-height:1;text-align:center;text-transform:none;text-decoration:none;background:transparent;border:0;outline:0;cursor:pointer;transition:color .3s;text-rendering:auto}.ant-drawer-close:focus,.ant-drawer-close:hover{color:#000000bf;text-decoration:none}.ant-drawer-header{position:relative;display:flex;align-items:center;justify-content:space-between;padding:16px 24px;color:#000000d9;background:var(--c-canvas);border-bottom:1px solid #f0f0f0;border-radius:5px 5px 0 0}.ant-drawer-header-title{display:flex;flex:1;align-items:center;justify-content:space-between}.ant-drawer-header-close-only{padding-bottom:0;border:none}.ant-drawer-wrapper-body{display:flex;flex-flow:column nowrap;width:100%;height:100%}.ant-drawer-body{flex-grow:1;padding:24px;overflow:auto;font-size:14px;line-height:1.5715;word-wrap:break-word}.ant-drawer-footer{flex-shrink:0;padding:10px 16px;border-top:1px solid #f0f0f0}.ant-drawer-mask{position:absolute;top:0;left:0;width:100%;height:0;background-color:#00000073;opacity:0;transition:opacity .3s linear,height 0s ease .3s;pointer-events:none}.ant-drawer .ant-picker-clear{background:var(--c-canvas)}@keyframes antdDrawerFadeIn{0%{opacity:0}to{opacity:1}}.ant-drawer-rtl{direction:rtl}.ant-drawer-rtl .ant-drawer-close{margin-right:0;margin-left:12px}.ant-dropdown-menu-item.ant-dropdown-menu-item-danger{color:#e31a1a}.ant-dropdown-menu-item.ant-dropdown-menu-item-danger:hover{color:#fff;background-color:#e31a1a}.ant-dropdown{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:absolute;top:-9999px;left:-9999px;z-index:1050;display:block}.ant-dropdown:before{position:absolute;top:-4px;right:0;bottom:-4px;left:-7px;z-index:-9999;opacity:.0001;content:" "}.ant-dropdown-wrap{position:relative}.ant-dropdown-wrap .ant-btn>.anticon-down{font-size:10px}.ant-dropdown-wrap .anticon-down:before{transition:transform .2s}.ant-dropdown-wrap-open .anticon-down:before{transform:rotate(180deg)}.ant-dropdown-hidden,.ant-dropdown-menu-hidden,.ant-dropdown-menu-submenu-hidden{display:none}.ant-dropdown-show-arrow.ant-dropdown-placement-topCenter,.ant-dropdown-show-arrow.ant-dropdown-placement-topLeft,.ant-dropdown-show-arrow.ant-dropdown-placement-topRight{padding-bottom:10px}.ant-dropdown-show-arrow.ant-dropdown-placement-bottomCenter,.ant-dropdown-show-arrow.ant-dropdown-placement-bottomLeft,.ant-dropdown-show-arrow.ant-dropdown-placement-bottomRight{padding-top:10px}.ant-dropdown-arrow{position:absolute;z-index:1;display:block;width:8.48528137px;height:8.48528137px;background:transparent;border-style:solid;border-width:4.24264069px;transform:rotate(45deg)}.ant-dropdown-placement-topCenter>.ant-dropdown-arrow,.ant-dropdown-placement-topLeft>.ant-dropdown-arrow,.ant-dropdown-placement-topRight>.ant-dropdown-arrow{bottom:6.2px;border-color:transparent var(--c-canvas) var(--c-canvas) transparent;box-shadow:3px 3px 7px #00000012}.ant-dropdown-placement-topCenter>.ant-dropdown-arrow{left:50%;transform:translate(-50%) rotate(45deg)}.ant-dropdown-placement-topLeft>.ant-dropdown-arrow{left:16px}.ant-dropdown-placement-topRight>.ant-dropdown-arrow{right:16px}.ant-dropdown-placement-bottomCenter>.ant-dropdown-arrow,.ant-dropdown-placement-bottomLeft>.ant-dropdown-arrow,.ant-dropdown-placement-bottomRight>.ant-dropdown-arrow{top:6px;border-color:var(--c-canvas) transparent transparent var(--c-canvas);box-shadow:-2px -2px 5px #0000000f}.ant-dropdown-placement-bottomCenter>.ant-dropdown-arrow{left:50%;transform:translate(-50%) rotate(45deg)}.ant-dropdown-placement-bottomLeft>.ant-dropdown-arrow{left:16px}.ant-dropdown-placement-bottomRight>.ant-dropdown-arrow{right:16px}.ant-dropdown-menu{position:relative;margin:0;padding:4px 0;text-align:left;list-style-type:none;background-color:var(--c-canvas);background-clip:padding-box;border-radius:5px;outline:none;box-shadow:0 3px 6px -4px #0000001f,0 6px 16px #00000014,0 9px 28px 8px #0000000d}.ant-dropdown-menu-item-group-title{padding:5px 12px;color:#00000073;transition:all .3s}.ant-dropdown-menu-submenu-popup{position:absolute;z-index:1050;background:transparent;box-shadow:none;transform-origin:0 0}.ant-dropdown-menu-submenu-popup ul,.ant-dropdown-menu-submenu-popup li{list-style:none}.ant-dropdown-menu-submenu-popup ul{margin-right:.3em;margin-left:.3em}.ant-dropdown-menu-item{position:relative;display:flex;align-items:center}.ant-dropdown-menu-item-icon{min-width:12px;margin-right:8px;font-size:12px}.ant-dropdown-menu-title-content{flex:auto;white-space:nowrap}.ant-dropdown-menu-title-content>a{color:inherit;transition:all .3s}.ant-dropdown-menu-title-content>a:hover{color:inherit}.ant-dropdown-menu-title-content>a:after{position:absolute;top:0;right:0;bottom:0;left:0;content:""}.ant-dropdown-menu-item,.ant-dropdown-menu-submenu-title{clear:both;margin:0;padding:5px 12px;color:#000000d9;font-weight:400;font-size:14px;line-height:22px;cursor:pointer;transition:all .3s}.ant-dropdown-menu-item-selected,.ant-dropdown-menu-submenu-title-selected{color:#8d6a46;background-color:#ccc8c0}.ant-dropdown-menu-item:hover,.ant-dropdown-menu-submenu-title:hover{background-color:#f5f5f5}.ant-dropdown-menu-item-disabled,.ant-dropdown-menu-submenu-title-disabled{color:#00000040;cursor:not-allowed}.ant-dropdown-menu-item-disabled:hover,.ant-dropdown-menu-submenu-title-disabled:hover{color:#00000040;background-color:var(--c-canvas);cursor:not-allowed}.ant-dropdown-menu-item-disabled a,.ant-dropdown-menu-submenu-title-disabled a{pointer-events:none}.ant-dropdown-menu-item-divider,.ant-dropdown-menu-submenu-title-divider{height:1px;margin:4px 0;overflow:hidden;line-height:0;background-color:#f0f0f0}.ant-dropdown-menu-item .ant-dropdown-menu-submenu-expand-icon,.ant-dropdown-menu-submenu-title .ant-dropdown-menu-submenu-expand-icon{position:absolute;right:8px}.ant-dropdown-menu-item .ant-dropdown-menu-submenu-expand-icon .ant-dropdown-menu-submenu-arrow-icon,.ant-dropdown-menu-submenu-title .ant-dropdown-menu-submenu-expand-icon .ant-dropdown-menu-submenu-arrow-icon{margin-right:0!important;color:#00000073;font-size:10px;font-style:normal}.ant-dropdown-menu-item-group-list{margin:0 8px;padding:0;list-style:none}.ant-dropdown-menu-submenu-title{padding-right:24px}.ant-dropdown-menu-submenu-vertical{position:relative}.ant-dropdown-menu-submenu-vertical>.ant-dropdown-menu{position:absolute;top:0;left:100%;min-width:100%;margin-left:4px;transform-origin:0 0}.ant-dropdown-menu-submenu.ant-dropdown-menu-submenu-disabled .ant-dropdown-menu-submenu-title,.ant-dropdown-menu-submenu.ant-dropdown-menu-submenu-disabled .ant-dropdown-menu-submenu-title .ant-dropdown-menu-submenu-arrow-icon{color:#00000040;background-color:var(--c-canvas);cursor:not-allowed}.ant-dropdown-menu-submenu-selected .ant-dropdown-menu-submenu-title{color:#8d6a46}.ant-dropdown.ant-slide-down-enter.ant-slide-down-enter-active.ant-dropdown-placement-bottomLeft,.ant-dropdown.ant-slide-down-appear.ant-slide-down-appear-active.ant-dropdown-placement-bottomLeft,.ant-dropdown.ant-slide-down-enter.ant-slide-down-enter-active.ant-dropdown-placement-bottomCenter,.ant-dropdown.ant-slide-down-appear.ant-slide-down-appear-active.ant-dropdown-placement-bottomCenter,.ant-dropdown.ant-slide-down-enter.ant-slide-down-enter-active.ant-dropdown-placement-bottomRight,.ant-dropdown.ant-slide-down-appear.ant-slide-down-appear-active.ant-dropdown-placement-bottomRight{animation-name:antSlideUpIn}.ant-dropdown.ant-slide-up-enter.ant-slide-up-enter-active.ant-dropdown-placement-topLeft,.ant-dropdown.ant-slide-up-appear.ant-slide-up-appear-active.ant-dropdown-placement-topLeft,.ant-dropdown.ant-slide-up-enter.ant-slide-up-enter-active.ant-dropdown-placement-topCenter,.ant-dropdown.ant-slide-up-appear.ant-slide-up-appear-active.ant-dropdown-placement-topCenter,.ant-dropdown.ant-slide-up-enter.ant-slide-up-enter-active.ant-dropdown-placement-topRight,.ant-dropdown.ant-slide-up-appear.ant-slide-up-appear-active.ant-dropdown-placement-topRight{animation-name:antSlideDownIn}.ant-dropdown.ant-slide-down-leave.ant-slide-down-leave-active.ant-dropdown-placement-bottomLeft,.ant-dropdown.ant-slide-down-leave.ant-slide-down-leave-active.ant-dropdown-placement-bottomCenter,.ant-dropdown.ant-slide-down-leave.ant-slide-down-leave-active.ant-dropdown-placement-bottomRight{animation-name:antSlideUpOut}.ant-dropdown.ant-slide-up-leave.ant-slide-up-leave-active.ant-dropdown-placement-topLeft,.ant-dropdown.ant-slide-up-leave.ant-slide-up-leave-active.ant-dropdown-placement-topCenter,.ant-dropdown.ant-slide-up-leave.ant-slide-up-leave-active.ant-dropdown-placement-topRight{animation-name:antSlideDownOut}.ant-dropdown-trigger>.anticon.anticon-down,.ant-dropdown-link>.anticon.anticon-down,.ant-dropdown-button>.anticon.anticon-down{font-size:10px;vertical-align:baseline}.ant-dropdown-button{white-space:nowrap}.ant-dropdown-button.ant-btn-group>.ant-btn-loading,.ant-dropdown-button.ant-btn-group>.ant-btn-loading+.ant-btn{cursor:default;pointer-events:none}.ant-dropdown-button.ant-btn-group>.ant-btn-loading+.ant-btn:before{display:block}.ant-dropdown-button.ant-btn-group>.ant-btn:last-child:not(:first-child):not(.ant-btn-icon-only){padding-right:8px;padding-left:8px}.ant-dropdown-menu-dark,.ant-dropdown-menu-dark .ant-dropdown-menu{background:#001529}.ant-dropdown-menu-dark .ant-dropdown-menu-item,.ant-dropdown-menu-dark .ant-dropdown-menu-submenu-title,.ant-dropdown-menu-dark .ant-dropdown-menu-item>a,.ant-dropdown-menu-dark .ant-dropdown-menu-item>.anticon+span>a{color:#ffffffa6}.ant-dropdown-menu-dark .ant-dropdown-menu-item .ant-dropdown-menu-submenu-arrow:after,.ant-dropdown-menu-dark .ant-dropdown-menu-submenu-title .ant-dropdown-menu-submenu-arrow:after,.ant-dropdown-menu-dark .ant-dropdown-menu-item>a .ant-dropdown-menu-submenu-arrow:after,.ant-dropdown-menu-dark .ant-dropdown-menu-item>.anticon+span>a .ant-dropdown-menu-submenu-arrow:after{color:#ffffffa6}.ant-dropdown-menu-dark .ant-dropdown-menu-item:hover,.ant-dropdown-menu-dark .ant-dropdown-menu-submenu-title:hover,.ant-dropdown-menu-dark .ant-dropdown-menu-item>a:hover,.ant-dropdown-menu-dark .ant-dropdown-menu-item>.anticon+span>a:hover{color:#fff;background:transparent}.ant-dropdown-menu-dark .ant-dropdown-menu-item-selected,.ant-dropdown-menu-dark .ant-dropdown-menu-item-selected:hover,.ant-dropdown-menu-dark .ant-dropdown-menu-item-selected>a{color:#fff;background:#8d6a46}.ant-dropdown-rtl{direction:rtl}.ant-dropdown-rtl.ant-dropdown:before{right:-7px;left:0}.ant-dropdown-menu.ant-dropdown-menu-rtl,.ant-dropdown-rtl .ant-dropdown-menu-item-group-title,.ant-dropdown-menu-submenu-rtl .ant-dropdown-menu-item-group-title{direction:rtl;text-align:right}.ant-dropdown-menu-submenu-popup.ant-dropdown-menu-submenu-rtl{transform-origin:100% 0}.ant-dropdown-rtl .ant-dropdown-menu-submenu-popup ul,.ant-dropdown-rtl .ant-dropdown-menu-submenu-popup li,.ant-dropdown-rtl .ant-dropdown-menu-item,.ant-dropdown-rtl .ant-dropdown-menu-submenu-title{text-align:right}.ant-dropdown-rtl .ant-dropdown-menu-item>.anticon:first-child,.ant-dropdown-rtl .ant-dropdown-menu-submenu-title>.anticon:first-child,.ant-dropdown-rtl .ant-dropdown-menu-item>span>.anticon:first-child,.ant-dropdown-rtl .ant-dropdown-menu-submenu-title>span>.anticon:first-child{margin-right:0;margin-left:8px}.ant-dropdown-rtl .ant-dropdown-menu-item .ant-dropdown-menu-submenu-expand-icon,.ant-dropdown-rtl .ant-dropdown-menu-submenu-title .ant-dropdown-menu-submenu-expand-icon{right:auto;left:8px}.ant-dropdown-rtl .ant-dropdown-menu-item .ant-dropdown-menu-submenu-expand-icon .ant-dropdown-menu-submenu-arrow-icon,.ant-dropdown-rtl .ant-dropdown-menu-submenu-title .ant-dropdown-menu-submenu-expand-icon .ant-dropdown-menu-submenu-arrow-icon{margin-left:0!important;transform:scaleX(-1)}.ant-dropdown-rtl .ant-dropdown-menu-submenu-title{padding-right:12px;padding-left:24px}.ant-dropdown-rtl .ant-dropdown-menu-submenu-vertical>.ant-dropdown-menu{right:100%;left:0;margin-right:4px;margin-left:0}.ant-empty{margin:0 8px;font-size:14px;line-height:1.5715;text-align:center}.ant-empty-image{height:100px;margin-bottom:8px}.ant-empty-image img{height:100%}.ant-empty-image svg{height:100%;margin:auto}.ant-empty-footer{margin-top:16px}.ant-empty-normal{margin:32px 0;color:#00000040}.ant-empty-normal .ant-empty-image{height:40px}.ant-empty-small{margin:8px 0;color:#00000040}.ant-empty-small .ant-empty-image{height:35px}.ant-empty-img-default-ellipse{fill:#f5f5f5;fill-opacity:.8}.ant-empty-img-default-path-1{fill:#aeb8c2}.ant-empty-img-default-path-2{fill:url(#linearGradient-1)}.ant-empty-img-default-path-3{fill:#f5f5f7}.ant-empty-img-default-path-4,.ant-empty-img-default-path-5{fill:#dce0e6}.ant-empty-img-default-g{fill:#fff}.ant-empty-img-simple-ellipse{fill:#f5f5f5}.ant-empty-img-simple-g{stroke:#d9d9d9}.ant-empty-img-simple-path{fill:#fafafa}.ant-empty-rtl{direction:rtl}.ant-form-item .ant-upload{background:transparent}.ant-form-item .ant-upload.ant-upload-drag{background:#fafafa}.ant-form-item input[type=radio],.ant-form-item input[type=checkbox]{width:14px;height:14px}.ant-form-item .ant-radio-inline,.ant-form-item .ant-checkbox-inline{display:inline-block;margin-left:8px;font-weight:400;vertical-align:middle;cursor:pointer}.ant-form-item .ant-radio-inline:first-child,.ant-form-item .ant-checkbox-inline:first-child{margin-left:0}.ant-form-item .ant-checkbox-vertical,.ant-form-item .ant-radio-vertical{display:block}.ant-form-item .ant-checkbox-vertical+.ant-checkbox-vertical,.ant-form-item .ant-radio-vertical+.ant-radio-vertical{margin-left:0}.ant-form-item .ant-input-number+.ant-form-text{margin-left:8px}.ant-form-item .ant-input-number-handler-wrap{z-index:2}.ant-form-item .ant-select,.ant-form-item .ant-cascader-picker{width:100%}.ant-form-item .ant-picker-calendar-year-select,.ant-form-item .ant-picker-calendar-month-select,.ant-form-item .ant-input-group .ant-select,.ant-form-item .ant-input-group .ant-cascader-picker,.ant-form-item .ant-input-number-group .ant-select,.ant-form-item .ant-input-number-group .ant-cascader-picker{width:auto}.ant-form-inline{display:flex;flex-wrap:wrap}.ant-form-inline .ant-form-item{flex:none;flex-wrap:nowrap;margin-right:16px;margin-bottom:0}.ant-form-inline .ant-form-item-with-help{margin-bottom:24px}.ant-form-inline .ant-form-item>.ant-form-item-label,.ant-form-inline .ant-form-item>.ant-form-item-control{display:inline-block;vertical-align:top}.ant-form-inline .ant-form-item>.ant-form-item-label{flex:none}.ant-form-inline .ant-form-item .ant-form-text,.ant-form-inline .ant-form-item .ant-form-item-has-feedback{display:inline-block}.ant-form-horizontal .ant-form-item-label{flex-grow:0}.ant-form-horizontal .ant-form-item-control{flex:1 1 0;min-width:0}.ant-form-horizontal .ant-form-item-label.ant-col-24+.ant-form-item-control{min-width:unset}.ant-form-vertical .ant-form-item{flex-direction:column}.ant-form-vertical .ant-form-item-label>label{height:auto}.ant-form-vertical .ant-form-item-label,.ant-col-24.ant-form-item-label,.ant-col-xl-24.ant-form-item-label{padding:0 0 8px;line-height:1.5715;white-space:initial;text-align:left}.ant-form-vertical .ant-form-item-label>label,.ant-col-24.ant-form-item-label>label,.ant-col-xl-24.ant-form-item-label>label{margin:0}.ant-form-vertical .ant-form-item-label>label:after,.ant-col-24.ant-form-item-label>label:after,.ant-col-xl-24.ant-form-item-label>label:after{display:none}.ant-form-rtl.ant-form-vertical .ant-form-item-label,.ant-form-rtl.ant-col-24.ant-form-item-label,.ant-form-rtl.ant-col-xl-24.ant-form-item-label{text-align:right}@media (max-width: 575px){.ant-form-item .ant-form-item-label{padding:0 0 8px;line-height:1.5715;white-space:initial;text-align:left}.ant-form-item .ant-form-item-label>label{margin:0}.ant-form-item .ant-form-item-label>label:after{display:none}.ant-form-rtl.ant-form-item .ant-form-item-label{text-align:right}.ant-form .ant-form-item{flex-wrap:wrap}.ant-form .ant-form-item .ant-form-item-label,.ant-form .ant-form-item .ant-form-item-control{flex:0 0 100%;max-width:100%}.ant-col-xs-24.ant-form-item-label{padding:0 0 8px;line-height:1.5715;white-space:initial;text-align:left}.ant-col-xs-24.ant-form-item-label>label{margin:0}.ant-col-xs-24.ant-form-item-label>label:after{display:none}.ant-form-rtl.ant-col-xs-24.ant-form-item-label{text-align:right}}@media (max-width: 767px){.ant-col-sm-24.ant-form-item-label{padding:0 0 8px;line-height:1.5715;white-space:initial;text-align:left}.ant-col-sm-24.ant-form-item-label>label{margin:0}.ant-col-sm-24.ant-form-item-label>label:after{display:none}.ant-form-rtl.ant-col-sm-24.ant-form-item-label{text-align:right}}@media (max-width: 991px){.ant-col-md-24.ant-form-item-label{padding:0 0 8px;line-height:1.5715;white-space:initial;text-align:left}.ant-col-md-24.ant-form-item-label>label{margin:0}.ant-col-md-24.ant-form-item-label>label:after{display:none}.ant-form-rtl.ant-col-md-24.ant-form-item-label{text-align:right}}@media (max-width: 1199px){.ant-col-lg-24.ant-form-item-label{padding:0 0 8px;line-height:1.5715;white-space:initial;text-align:left}.ant-col-lg-24.ant-form-item-label>label{margin:0}.ant-col-lg-24.ant-form-item-label>label:after{display:none}.ant-form-rtl.ant-col-lg-24.ant-form-item-label{text-align:right}}@media (max-width: 1599px){.ant-col-xl-24.ant-form-item-label{padding:0 0 8px;line-height:1.5715;white-space:initial;text-align:left}.ant-col-xl-24.ant-form-item-label>label{margin:0}.ant-col-xl-24.ant-form-item-label>label:after{display:none}.ant-form-rtl.ant-col-xl-24.ant-form-item-label{text-align:right}}.ant-form-item-explain-error{color:#e31a1a}.ant-form-item-explain-warning{color:#faad14}.ant-form-item-has-feedback .ant-input{padding-right:24px}.ant-form-item-has-feedback .ant-input-affix-wrapper .ant-input-suffix{padding-right:18px}.ant-form-item-has-feedback .ant-input-search:not(.ant-input-search-enter-button) .ant-input-suffix{right:28px}.ant-form-item-has-feedback .ant-switch{margin:2px 0 4px}.ant-form-item-has-feedback>.ant-select .ant-select-arrow,.ant-form-item-has-feedback>.ant-select .ant-select-clear,.ant-form-item-has-feedback :not(.ant-input-group-addon)>.ant-select .ant-select-arrow,.ant-form-item-has-feedback :not(.ant-input-group-addon)>.ant-select .ant-select-clear,.ant-form-item-has-feedback :not(.ant-input-number-group-addon)>.ant-select .ant-select-arrow,.ant-form-item-has-feedback :not(.ant-input-number-group-addon)>.ant-select .ant-select-clear{right:32px}.ant-form-item-has-feedback>.ant-select .ant-select-selection-selected-value,.ant-form-item-has-feedback :not(.ant-input-group-addon)>.ant-select .ant-select-selection-selected-value,.ant-form-item-has-feedback :not(.ant-input-number-group-addon)>.ant-select .ant-select-selection-selected-value{padding-right:42px}.ant-form-item-has-feedback .ant-cascader-picker-arrow{margin-right:19px}.ant-form-item-has-feedback .ant-cascader-picker-clear{right:32px}.ant-form-item-has-feedback .ant-picker{padding-right:28.2px}.ant-form-item-has-feedback .ant-picker-large{padding-right:29.2px}.ant-form-item-has-feedback .ant-picker-small{padding-right:25.2px}.ant-form-item-has-feedback.ant-form-item-has-success .ant-form-item-children-icon,.ant-form-item-has-feedback.ant-form-item-has-warning .ant-form-item-children-icon,.ant-form-item-has-feedback.ant-form-item-has-error .ant-form-item-children-icon,.ant-form-item-has-feedback.ant-form-item-is-validating .ant-form-item-children-icon{position:absolute;top:50%;right:0;z-index:1;width:32px;height:20px;margin-top:-10px;font-size:14px;line-height:20px;text-align:center;visibility:visible;animation:zoomIn .3s cubic-bezier(.12,.4,.29,1.46);pointer-events:none}.ant-form-item-has-success.ant-form-item-has-feedback .ant-form-item-children-icon{color:#52c41a;animation-name:diffZoomIn1!important}.ant-form-item-has-warning .ant-form-item-split{color:#faad14}.ant-form-item-has-warning :not(.ant-input-disabled):not(.ant-input-borderless).ant-input,.ant-form-item-has-warning :not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper,.ant-form-item-has-warning :not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper,.ant-form-item-has-warning :not(.ant-input-disabled):not(.ant-input-borderless).ant-input:hover,.ant-form-item-has-warning :not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper:hover,.ant-form-item-has-warning :not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper:hover{background-color:var(--c-canvas);border-color:#faad14}.ant-form-item-has-warning :not(.ant-input-disabled):not(.ant-input-borderless).ant-input:focus,.ant-form-item-has-warning :not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper:focus,.ant-form-item-has-warning :not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper:focus,.ant-form-item-has-warning :not(.ant-input-disabled):not(.ant-input-borderless).ant-input-focused,.ant-form-item-has-warning :not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper-focused,.ant-form-item-has-warning :not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper-focused{border-color:#ffc53d;box-shadow:0 0 0 2px #faad1433;border-right-width:1px!important;outline:0}.ant-form-item-has-warning .ant-calendar-picker-open .ant-calendar-picker-input{border-color:#ffc53d;box-shadow:0 0 0 2px #faad1433;border-right-width:1px!important;outline:0}.ant-form-item-has-warning .ant-input-prefix,.ant-form-item-has-warning .ant-input-number-prefix{color:#faad14}.ant-form-item-has-warning :not(.ant-input-group-addon-disabled).ant-input-group-addon,.ant-form-item-has-warning :not(.ant-input-number-group-addon-disabled).ant-input-number-group-addon{color:#faad14;border-color:#faad14}.ant-form-item-has-warning .has-feedback{color:#faad14}.ant-form-item-has-warning.ant-form-item-has-feedback .ant-form-item-children-icon{color:#faad14;animation-name:diffZoomIn3!important}.ant-form-item-has-warning .ant-select:not(.ant-select-disabled):not(.ant-select-customize-input) .ant-select-selector{background-color:var(--c-canvas);border-color:#faad14!important}.ant-form-item-has-warning .ant-select:not(.ant-select-disabled):not(.ant-select-customize-input).ant-select-open .ant-select-selector,.ant-form-item-has-warning .ant-select:not(.ant-select-disabled):not(.ant-select-customize-input).ant-select-focused .ant-select-selector{border-color:#ffc53d;box-shadow:0 0 0 2px #faad1433;border-right-width:1px!important;outline:0}.ant-form-item-has-warning .ant-input-number,.ant-form-item-has-warning .ant-picker{background-color:var(--c-canvas);border-color:#faad14}.ant-form-item-has-warning .ant-input-number-focused,.ant-form-item-has-warning .ant-picker-focused,.ant-form-item-has-warning .ant-input-number:focus,.ant-form-item-has-warning .ant-picker:focus{border-color:#ffc53d;box-shadow:0 0 0 2px #faad1433;border-right-width:1px!important;outline:0}.ant-form-item-has-warning .ant-input-number:not([disabled]):hover,.ant-form-item-has-warning .ant-picker:not([disabled]):hover{background-color:var(--c-canvas);border-color:#faad14}.ant-form-item-has-warning .ant-cascader-picker:focus .ant-cascader-input{border-color:#ffc53d;box-shadow:0 0 0 2px #faad1433;border-right-width:1px!important;outline:0}.ant-form-item-has-error .ant-form-item-split{color:#e31a1a}.ant-form-item-has-error :not(.ant-input-disabled):not(.ant-input-borderless).ant-input,.ant-form-item-has-error :not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper,.ant-form-item-has-error :not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper,.ant-form-item-has-error :not(.ant-input-disabled):not(.ant-input-borderless).ant-input:hover,.ant-form-item-has-error :not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper:hover,.ant-form-item-has-error :not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper:hover{background-color:var(--c-canvas);border-color:#e31a1a}.ant-form-item-has-error :not(.ant-input-disabled):not(.ant-input-borderless).ant-input:focus,.ant-form-item-has-error :not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper:focus,.ant-form-item-has-error :not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper:focus,.ant-form-item-has-error :not(.ant-input-disabled):not(.ant-input-borderless).ant-input-focused,.ant-form-item-has-error :not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper-focused,.ant-form-item-has-error :not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper-focused{border-color:#f04741;box-shadow:0 0 0 2px #e31a1a33;border-right-width:1px!important;outline:0}.ant-form-item-has-error .ant-calendar-picker-open .ant-calendar-picker-input{border-color:#f04741;box-shadow:0 0 0 2px #e31a1a33;border-right-width:1px!important;outline:0}.ant-form-item-has-error .ant-input-prefix,.ant-form-item-has-error .ant-input-number-prefix{color:#e31a1a}.ant-form-item-has-error :not(.ant-input-group-addon-disabled).ant-input-group-addon,.ant-form-item-has-error :not(.ant-input-number-group-addon-disabled).ant-input-number-group-addon{color:#e31a1a;border-color:#e31a1a}.ant-form-item-has-error .has-feedback{color:#e31a1a}.ant-form-item-has-error.ant-form-item-has-feedback .ant-form-item-children-icon{color:#e31a1a;animation-name:diffZoomIn2!important}.ant-form-item-has-error .ant-select:not(.ant-select-disabled):not(.ant-select-customize-input) .ant-select-selector{background-color:var(--c-canvas);border-color:#e31a1a!important}.ant-form-item-has-error .ant-select:not(.ant-select-disabled):not(.ant-select-customize-input).ant-select-open .ant-select-selector,.ant-form-item-has-error .ant-select:not(.ant-select-disabled):not(.ant-select-customize-input).ant-select-focused .ant-select-selector{border-color:#f04741;box-shadow:0 0 0 2px #e31a1a33;border-right-width:1px!important;outline:0}.ant-form-item-has-error .ant-input-group-addon .ant-select.ant-select-single:not(.ant-select-customize-input) .ant-select-selector,.ant-form-item-has-error .ant-input-number-group-addon .ant-select.ant-select-single:not(.ant-select-customize-input) .ant-select-selector{background-color:inherit;border:0;box-shadow:none}.ant-form-item-has-error .ant-select.ant-select-auto-complete .ant-input:focus{border-color:#e31a1a}.ant-form-item-has-error .ant-input-number,.ant-form-item-has-error .ant-picker{background-color:var(--c-canvas);border-color:#e31a1a}.ant-form-item-has-error .ant-input-number-focused,.ant-form-item-has-error .ant-picker-focused,.ant-form-item-has-error .ant-input-number:focus,.ant-form-item-has-error .ant-picker:focus{border-color:#f04741;box-shadow:0 0 0 2px #e31a1a33;border-right-width:1px!important;outline:0}.ant-form-item-has-error .ant-input-number:not([disabled]):hover,.ant-form-item-has-error .ant-picker:not([disabled]):hover{background-color:var(--c-canvas);border-color:#e31a1a}.ant-form-item-has-error .ant-mention-wrapper .ant-mention-editor,.ant-form-item-has-error .ant-mention-wrapper .ant-mention-editor:not([disabled]):hover{background-color:var(--c-canvas);border-color:#e31a1a}.ant-form-item-has-error .ant-mention-wrapper.ant-mention-active:not([disabled]) .ant-mention-editor,.ant-form-item-has-error .ant-mention-wrapper .ant-mention-editor:not([disabled]):focus{border-color:#f04741;box-shadow:0 0 0 2px #e31a1a33;border-right-width:1px!important;outline:0}.ant-form-item-has-error .ant-cascader-picker:hover .ant-cascader-picker-label:hover+.ant-cascader-input.ant-input{border-color:#e31a1a}.ant-form-item-has-error .ant-cascader-picker:focus .ant-cascader-input{background-color:var(--c-canvas);border-color:#f04741;box-shadow:0 0 0 2px #e31a1a33;border-right-width:1px!important;outline:0}.ant-form-item-has-error .ant-transfer-list{border-color:#e31a1a}.ant-form-item-has-error .ant-transfer-list-search:not([disabled]){border-color:#d9d9d9}.ant-form-item-has-error .ant-transfer-list-search:not([disabled]):hover{border-color:#998165;border-right-width:1px!important}.ant-input-rtl .ant-form-item-has-error .ant-transfer-list-search:not([disabled]):hover{border-right-width:0;border-left-width:1px!important}.ant-form-item-has-error .ant-transfer-list-search:not([disabled]):focus{border-color:#998165;box-shadow:0 0 0 2px #8d6a4633;border-right-width:1px!important;outline:0}.ant-input-rtl .ant-form-item-has-error .ant-transfer-list-search:not([disabled]):focus{border-right-width:0;border-left-width:1px!important}.ant-form-item-has-error .ant-radio-button-wrapper{border-color:#e31a1a!important}.ant-form-item-has-error .ant-radio-button-wrapper:not(:first-child):before{background-color:#e31a1a}.ant-form-item-has-error .ant-mentions{border-color:#e31a1a!important}.ant-form-item-has-error .ant-mentions-focused,.ant-form-item-has-error .ant-mentions:focus{border-color:#f04741;box-shadow:0 0 0 2px #e31a1a33;border-right-width:1px!important;outline:0}.ant-form-item-is-validating.ant-form-item-has-feedback .ant-form-item-children-icon{display:inline-block;color:#8d6a46}.ant-form{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum"}.ant-form legend{display:block;width:100%;margin-bottom:20px;padding:0;color:#00000073;font-size:16px;line-height:inherit;border:0;border-bottom:1px solid #d9d9d9}.ant-form label{font-size:14px}.ant-form input[type=search]{box-sizing:border-box}.ant-form input[type=radio],.ant-form input[type=checkbox]{line-height:normal}.ant-form input[type=file]{display:block}.ant-form input[type=range]{display:block;width:100%}.ant-form select[multiple],.ant-form select[size]{height:auto}.ant-form input[type=file]:focus,.ant-form input[type=radio]:focus,.ant-form input[type=checkbox]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.ant-form output{display:block;padding-top:15px;color:#000000d9;font-size:14px;line-height:1.5715}.ant-form .ant-form-text{display:inline-block;padding-right:8px}.ant-form-small .ant-form-item-label>label{height:24px}.ant-form-small .ant-form-item-control-input{min-height:24px}.ant-form-large .ant-form-item-label>label{height:42px}.ant-form-large .ant-form-item-control-input{min-height:42px}.ant-form-item{box-sizing:border-box;margin:0 0 24px;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";vertical-align:top}.ant-form-item-with-help{margin-bottom:0;transition:none}.ant-form-item-hidden,.ant-form-item-hidden.ant-row{display:none}.ant-form-item-label{display:inline-block;flex-grow:0;overflow:hidden;white-space:nowrap;text-align:right;vertical-align:middle}.ant-form-item-label-left{text-align:left}.ant-form-item-label-wrap{overflow:unset;line-height:1.3215em;white-space:unset}.ant-form-item-label>label{position:relative;display:inline-flex;align-items:center;max-width:100%;height:32px;color:#1c2d56;font-size:14px}.ant-form-item-label>label>.anticon{font-size:14px;vertical-align:top}.ant-form-item-label>label.ant-form-item-required:not(.ant-form-item-required-mark-optional):before{display:inline-block;margin-right:4px;color:#ff4d4f;font-size:14px;font-family:SimSun,sans-serif;line-height:1;content:"*"}.ant-form-hide-required-mark .ant-form-item-label>label.ant-form-item-required:not(.ant-form-item-required-mark-optional):before{display:none}.ant-form-item-label>label .ant-form-item-optional{display:inline-block;margin-left:4px;color:#00000073}.ant-form-hide-required-mark .ant-form-item-label>label .ant-form-item-optional{display:none}.ant-form-item-label>label .ant-form-item-tooltip{color:#00000073;cursor:help;writing-mode:horizontal-tb;margin-inline-start:4px}.ant-form-item-label>label:after{content:":";position:relative;top:-.5px;margin:0 8px 0 2px}.ant-form-item-label>label.ant-form-item-no-colon:after{content:" "}.ant-form-item-control{display:flex;flex-direction:column;flex-grow:1}.ant-form-item-control:first-child:not([class^=ant-col-]):not([class*=" ant-col-"]){width:100%}.ant-form-item-control-input{position:relative;display:flex;align-items:center;min-height:32px}.ant-form-item-control-input-content{flex:auto;max-width:100%}.ant-form-item-explain,.ant-form-item-extra{clear:both;color:#00000073;font-size:14px;line-height:1.5715;transition:color .3s cubic-bezier(.215,.61,.355,1)}.ant-form-item-explain-connected{height:0;min-height:0;opacity:0}.ant-form-item-extra{min-height:24px}.ant-form-item .ant-input-textarea-show-count:after{margin-bottom:-22px}.ant-form-item-with-help .ant-form-item-explain{height:auto;min-height:24px;opacity:1}.ant-show-help{transition:height .3s linear,min-height .3s linear,margin-bottom .3s cubic-bezier(.645,.045,.355,1),opacity .3s cubic-bezier(.645,.045,.355,1)}.ant-show-help-leave{min-height:24px}.ant-show-help-leave-active{min-height:0}.ant-show-help-item{overflow:hidden;transition:height .3s cubic-bezier(.645,.045,.355,1),opacity .3s cubic-bezier(.645,.045,.355,1),transform .3s cubic-bezier(.645,.045,.355,1)!important}.ant-show-help-item-appear,.ant-show-help-item-enter{transform:translateY(-5px);opacity:0}.ant-show-help-item-appear-active,.ant-show-help-item-enter-active{transform:translateY(0);opacity:1}.ant-show-help-item-leave-active{transform:translateY(-5px)}@keyframes diffZoomIn1{0%{transform:scale(0);opacity:0}to{transform:scale(1);opacity:1}}@keyframes diffZoomIn2{0%{transform:scale(0);opacity:0}to{transform:scale(1);opacity:1}}@keyframes diffZoomIn3{0%{transform:scale(0);opacity:0}to{transform:scale(1);opacity:1}}.ant-form-rtl{direction:rtl}.ant-form-rtl .ant-form-item-label{text-align:left}.ant-form-rtl .ant-form-item-label>label.ant-form-item-required:before{margin-right:0;margin-left:4px}.ant-form-rtl .ant-form-item-label>label:after{margin:0 2px 0 8px}.ant-form-rtl .ant-form-item-label>label .ant-form-item-optional{margin-right:4px;margin-left:0}.ant-col-rtl .ant-form-item-control:first-child{width:100%}.ant-form-rtl .ant-form-item-has-feedback .ant-input{padding-right:10px;padding-left:24px}.ant-form-rtl .ant-form-item-has-feedback .ant-input-affix-wrapper .ant-input-suffix{padding-right:10px;padding-left:18px}.ant-form-rtl .ant-form-item-has-feedback .ant-input-affix-wrapper .ant-input,.ant-form-rtl .ant-form-item-has-feedback .ant-input-number-affix-wrapper .ant-input-number{padding:0}.ant-form-rtl .ant-form-item-has-feedback .ant-input-search:not(.ant-input-search-enter-button) .ant-input-suffix{right:auto;left:28px}.ant-form-rtl .ant-form-item-has-feedback .ant-input-number{padding-left:18px}.ant-form-rtl .ant-form-item-has-feedback>.ant-select .ant-select-arrow,.ant-form-rtl .ant-form-item-has-feedback>.ant-select .ant-select-clear,.ant-form-rtl .ant-form-item-has-feedback :not(.ant-input-group-addon)>.ant-select .ant-select-arrow,.ant-form-rtl .ant-form-item-has-feedback :not(.ant-input-group-addon)>.ant-select .ant-select-clear,.ant-form-rtl .ant-form-item-has-feedback :not(.ant-input-number-group-addon)>.ant-select .ant-select-arrow,.ant-form-rtl .ant-form-item-has-feedback :not(.ant-input-number-group-addon)>.ant-select .ant-select-clear{right:auto;left:32px}.ant-form-rtl .ant-form-item-has-feedback>.ant-select .ant-select-selection-selected-value,.ant-form-rtl .ant-form-item-has-feedback :not(.ant-input-group-addon)>.ant-select .ant-select-selection-selected-value,.ant-form-rtl .ant-form-item-has-feedback :not(.ant-input-number-group-addon)>.ant-select .ant-select-selection-selected-value{padding-right:0;padding-left:42px}.ant-form-rtl .ant-form-item-has-feedback .ant-cascader-picker-arrow{margin-right:0;margin-left:19px}.ant-form-rtl .ant-form-item-has-feedback .ant-cascader-picker-clear{right:auto;left:32px}.ant-form-rtl .ant-form-item-has-feedback .ant-picker{padding-right:10px;padding-left:28.2px}.ant-form-rtl .ant-form-item-has-feedback .ant-picker-large{padding-right:11px;padding-left:29.2px}.ant-form-rtl .ant-form-item-has-feedback .ant-picker-small{padding-right:7px;padding-left:25.2px}.ant-form-rtl .ant-form-item-has-feedback.ant-form-item-has-success .ant-form-item-children-icon,.ant-form-rtl .ant-form-item-has-feedback.ant-form-item-has-warning .ant-form-item-children-icon,.ant-form-rtl .ant-form-item-has-feedback.ant-form-item-has-error .ant-form-item-children-icon,.ant-form-rtl .ant-form-item-has-feedback.ant-form-item-is-validating .ant-form-item-children-icon{right:auto;left:0}.ant-form-rtl.ant-form-inline .ant-form-item{margin-right:0;margin-left:16px}.ant-row{display:flex;flex-flow:row wrap}.ant-row:before,.ant-row:after{display:flex}.ant-row-no-wrap{flex-wrap:nowrap}.ant-row-start{justify-content:flex-start}.ant-row-center{justify-content:center}.ant-row-end{justify-content:flex-end}.ant-row-space-between{justify-content:space-between}.ant-row-space-around{justify-content:space-around}.ant-row-top{align-items:flex-start}.ant-row-middle{align-items:center}.ant-row-bottom{align-items:flex-end}.ant-col{position:relative;max-width:100%;min-height:1px}.ant-col-24{display:block;flex:0 0 100%;max-width:100%}.ant-col-push-24{left:100%}.ant-col-pull-24{right:100%}.ant-col-offset-24{margin-left:100%}.ant-col-order-24{order:24}.ant-col-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.ant-col-push-23{left:95.83333333%}.ant-col-pull-23{right:95.83333333%}.ant-col-offset-23{margin-left:95.83333333%}.ant-col-order-23{order:23}.ant-col-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.ant-col-push-22{left:91.66666667%}.ant-col-pull-22{right:91.66666667%}.ant-col-offset-22{margin-left:91.66666667%}.ant-col-order-22{order:22}.ant-col-21{display:block;flex:0 0 87.5%;max-width:87.5%}.ant-col-push-21{left:87.5%}.ant-col-pull-21{right:87.5%}.ant-col-offset-21{margin-left:87.5%}.ant-col-order-21{order:21}.ant-col-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.ant-col-push-20{left:83.33333333%}.ant-col-pull-20{right:83.33333333%}.ant-col-offset-20{margin-left:83.33333333%}.ant-col-order-20{order:20}.ant-col-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.ant-col-push-19{left:79.16666667%}.ant-col-pull-19{right:79.16666667%}.ant-col-offset-19{margin-left:79.16666667%}.ant-col-order-19{order:19}.ant-col-18{display:block;flex:0 0 75%;max-width:75%}.ant-col-push-18{left:75%}.ant-col-pull-18{right:75%}.ant-col-offset-18{margin-left:75%}.ant-col-order-18{order:18}.ant-col-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.ant-col-push-17{left:70.83333333%}.ant-col-pull-17{right:70.83333333%}.ant-col-offset-17{margin-left:70.83333333%}.ant-col-order-17{order:17}.ant-col-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.ant-col-push-16{left:66.66666667%}.ant-col-pull-16{right:66.66666667%}.ant-col-offset-16{margin-left:66.66666667%}.ant-col-order-16{order:16}.ant-col-15{display:block;flex:0 0 62.5%;max-width:62.5%}.ant-col-push-15{left:62.5%}.ant-col-pull-15{right:62.5%}.ant-col-offset-15{margin-left:62.5%}.ant-col-order-15{order:15}.ant-col-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.ant-col-push-14{left:58.33333333%}.ant-col-pull-14{right:58.33333333%}.ant-col-offset-14{margin-left:58.33333333%}.ant-col-order-14{order:14}.ant-col-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.ant-col-push-13{left:54.16666667%}.ant-col-pull-13{right:54.16666667%}.ant-col-offset-13{margin-left:54.16666667%}.ant-col-order-13{order:13}.ant-col-12{display:block;flex:0 0 50%;max-width:50%}.ant-col-push-12{left:50%}.ant-col-pull-12{right:50%}.ant-col-offset-12{margin-left:50%}.ant-col-order-12{order:12}.ant-col-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.ant-col-push-11{left:45.83333333%}.ant-col-pull-11{right:45.83333333%}.ant-col-offset-11{margin-left:45.83333333%}.ant-col-order-11{order:11}.ant-col-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.ant-col-push-10{left:41.66666667%}.ant-col-pull-10{right:41.66666667%}.ant-col-offset-10{margin-left:41.66666667%}.ant-col-order-10{order:10}.ant-col-9{display:block;flex:0 0 37.5%;max-width:37.5%}.ant-col-push-9{left:37.5%}.ant-col-pull-9{right:37.5%}.ant-col-offset-9{margin-left:37.5%}.ant-col-order-9{order:9}.ant-col-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.ant-col-push-8{left:33.33333333%}.ant-col-pull-8{right:33.33333333%}.ant-col-offset-8{margin-left:33.33333333%}.ant-col-order-8{order:8}.ant-col-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.ant-col-push-7{left:29.16666667%}.ant-col-pull-7{right:29.16666667%}.ant-col-offset-7{margin-left:29.16666667%}.ant-col-order-7{order:7}.ant-col-6{display:block;flex:0 0 25%;max-width:25%}.ant-col-push-6{left:25%}.ant-col-pull-6{right:25%}.ant-col-offset-6{margin-left:25%}.ant-col-order-6{order:6}.ant-col-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.ant-col-push-5{left:20.83333333%}.ant-col-pull-5{right:20.83333333%}.ant-col-offset-5{margin-left:20.83333333%}.ant-col-order-5{order:5}.ant-col-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.ant-col-push-4{left:16.66666667%}.ant-col-pull-4{right:16.66666667%}.ant-col-offset-4{margin-left:16.66666667%}.ant-col-order-4{order:4}.ant-col-3{display:block;flex:0 0 12.5%;max-width:12.5%}.ant-col-push-3{left:12.5%}.ant-col-pull-3{right:12.5%}.ant-col-offset-3{margin-left:12.5%}.ant-col-order-3{order:3}.ant-col-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.ant-col-push-2{left:8.33333333%}.ant-col-pull-2{right:8.33333333%}.ant-col-offset-2{margin-left:8.33333333%}.ant-col-order-2{order:2}.ant-col-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.ant-col-push-1{left:4.16666667%}.ant-col-pull-1{right:4.16666667%}.ant-col-offset-1{margin-left:4.16666667%}.ant-col-order-1{order:1}.ant-col-0{display:none}.ant-col-offset-0{margin-left:0}.ant-col-order-0{order:0}.ant-col-offset-0.ant-col-rtl{margin-right:0}.ant-col-push-1.ant-col-rtl{right:4.16666667%;left:auto}.ant-col-pull-1.ant-col-rtl{right:auto;left:4.16666667%}.ant-col-offset-1.ant-col-rtl{margin-right:4.16666667%;margin-left:0}.ant-col-push-2.ant-col-rtl{right:8.33333333%;left:auto}.ant-col-pull-2.ant-col-rtl{right:auto;left:8.33333333%}.ant-col-offset-2.ant-col-rtl{margin-right:8.33333333%;margin-left:0}.ant-col-push-3.ant-col-rtl{right:12.5%;left:auto}.ant-col-pull-3.ant-col-rtl{right:auto;left:12.5%}.ant-col-offset-3.ant-col-rtl{margin-right:12.5%;margin-left:0}.ant-col-push-4.ant-col-rtl{right:16.66666667%;left:auto}.ant-col-pull-4.ant-col-rtl{right:auto;left:16.66666667%}.ant-col-offset-4.ant-col-rtl{margin-right:16.66666667%;margin-left:0}.ant-col-push-5.ant-col-rtl{right:20.83333333%;left:auto}.ant-col-pull-5.ant-col-rtl{right:auto;left:20.83333333%}.ant-col-offset-5.ant-col-rtl{margin-right:20.83333333%;margin-left:0}.ant-col-push-6.ant-col-rtl{right:25%;left:auto}.ant-col-pull-6.ant-col-rtl{right:auto;left:25%}.ant-col-offset-6.ant-col-rtl{margin-right:25%;margin-left:0}.ant-col-push-7.ant-col-rtl{right:29.16666667%;left:auto}.ant-col-pull-7.ant-col-rtl{right:auto;left:29.16666667%}.ant-col-offset-7.ant-col-rtl{margin-right:29.16666667%;margin-left:0}.ant-col-push-8.ant-col-rtl{right:33.33333333%;left:auto}.ant-col-pull-8.ant-col-rtl{right:auto;left:33.33333333%}.ant-col-offset-8.ant-col-rtl{margin-right:33.33333333%;margin-left:0}.ant-col-push-9.ant-col-rtl{right:37.5%;left:auto}.ant-col-pull-9.ant-col-rtl{right:auto;left:37.5%}.ant-col-offset-9.ant-col-rtl{margin-right:37.5%;margin-left:0}.ant-col-push-10.ant-col-rtl{right:41.66666667%;left:auto}.ant-col-pull-10.ant-col-rtl{right:auto;left:41.66666667%}.ant-col-offset-10.ant-col-rtl{margin-right:41.66666667%;margin-left:0}.ant-col-push-11.ant-col-rtl{right:45.83333333%;left:auto}.ant-col-pull-11.ant-col-rtl{right:auto;left:45.83333333%}.ant-col-offset-11.ant-col-rtl{margin-right:45.83333333%;margin-left:0}.ant-col-push-12.ant-col-rtl{right:50%;left:auto}.ant-col-pull-12.ant-col-rtl{right:auto;left:50%}.ant-col-offset-12.ant-col-rtl{margin-right:50%;margin-left:0}.ant-col-push-13.ant-col-rtl{right:54.16666667%;left:auto}.ant-col-pull-13.ant-col-rtl{right:auto;left:54.16666667%}.ant-col-offset-13.ant-col-rtl{margin-right:54.16666667%;margin-left:0}.ant-col-push-14.ant-col-rtl{right:58.33333333%;left:auto}.ant-col-pull-14.ant-col-rtl{right:auto;left:58.33333333%}.ant-col-offset-14.ant-col-rtl{margin-right:58.33333333%;margin-left:0}.ant-col-push-15.ant-col-rtl{right:62.5%;left:auto}.ant-col-pull-15.ant-col-rtl{right:auto;left:62.5%}.ant-col-offset-15.ant-col-rtl{margin-right:62.5%;margin-left:0}.ant-col-push-16.ant-col-rtl{right:66.66666667%;left:auto}.ant-col-pull-16.ant-col-rtl{right:auto;left:66.66666667%}.ant-col-offset-16.ant-col-rtl{margin-right:66.66666667%;margin-left:0}.ant-col-push-17.ant-col-rtl{right:70.83333333%;left:auto}.ant-col-pull-17.ant-col-rtl{right:auto;left:70.83333333%}.ant-col-offset-17.ant-col-rtl{margin-right:70.83333333%;margin-left:0}.ant-col-push-18.ant-col-rtl{right:75%;left:auto}.ant-col-pull-18.ant-col-rtl{right:auto;left:75%}.ant-col-offset-18.ant-col-rtl{margin-right:75%;margin-left:0}.ant-col-push-19.ant-col-rtl{right:79.16666667%;left:auto}.ant-col-pull-19.ant-col-rtl{right:auto;left:79.16666667%}.ant-col-offset-19.ant-col-rtl{margin-right:79.16666667%;margin-left:0}.ant-col-push-20.ant-col-rtl{right:83.33333333%;left:auto}.ant-col-pull-20.ant-col-rtl{right:auto;left:83.33333333%}.ant-col-offset-20.ant-col-rtl{margin-right:83.33333333%;margin-left:0}.ant-col-push-21.ant-col-rtl{right:87.5%;left:auto}.ant-col-pull-21.ant-col-rtl{right:auto;left:87.5%}.ant-col-offset-21.ant-col-rtl{margin-right:87.5%;margin-left:0}.ant-col-push-22.ant-col-rtl{right:91.66666667%;left:auto}.ant-col-pull-22.ant-col-rtl{right:auto;left:91.66666667%}.ant-col-offset-22.ant-col-rtl{margin-right:91.66666667%;margin-left:0}.ant-col-push-23.ant-col-rtl{right:95.83333333%;left:auto}.ant-col-pull-23.ant-col-rtl{right:auto;left:95.83333333%}.ant-col-offset-23.ant-col-rtl{margin-right:95.83333333%;margin-left:0}.ant-col-push-24.ant-col-rtl{right:100%;left:auto}.ant-col-pull-24.ant-col-rtl{right:auto;left:100%}.ant-col-offset-24.ant-col-rtl{margin-right:100%;margin-left:0}.ant-col-xs-24{display:block;flex:0 0 100%;max-width:100%}.ant-col-xs-push-24{left:100%}.ant-col-xs-pull-24{right:100%}.ant-col-xs-offset-24{margin-left:100%}.ant-col-xs-order-24{order:24}.ant-col-xs-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.ant-col-xs-push-23{left:95.83333333%}.ant-col-xs-pull-23{right:95.83333333%}.ant-col-xs-offset-23{margin-left:95.83333333%}.ant-col-xs-order-23{order:23}.ant-col-xs-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.ant-col-xs-push-22{left:91.66666667%}.ant-col-xs-pull-22{right:91.66666667%}.ant-col-xs-offset-22{margin-left:91.66666667%}.ant-col-xs-order-22{order:22}.ant-col-xs-21{display:block;flex:0 0 87.5%;max-width:87.5%}.ant-col-xs-push-21{left:87.5%}.ant-col-xs-pull-21{right:87.5%}.ant-col-xs-offset-21{margin-left:87.5%}.ant-col-xs-order-21{order:21}.ant-col-xs-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.ant-col-xs-push-20{left:83.33333333%}.ant-col-xs-pull-20{right:83.33333333%}.ant-col-xs-offset-20{margin-left:83.33333333%}.ant-col-xs-order-20{order:20}.ant-col-xs-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.ant-col-xs-push-19{left:79.16666667%}.ant-col-xs-pull-19{right:79.16666667%}.ant-col-xs-offset-19{margin-left:79.16666667%}.ant-col-xs-order-19{order:19}.ant-col-xs-18{display:block;flex:0 0 75%;max-width:75%}.ant-col-xs-push-18{left:75%}.ant-col-xs-pull-18{right:75%}.ant-col-xs-offset-18{margin-left:75%}.ant-col-xs-order-18{order:18}.ant-col-xs-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.ant-col-xs-push-17{left:70.83333333%}.ant-col-xs-pull-17{right:70.83333333%}.ant-col-xs-offset-17{margin-left:70.83333333%}.ant-col-xs-order-17{order:17}.ant-col-xs-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.ant-col-xs-push-16{left:66.66666667%}.ant-col-xs-pull-16{right:66.66666667%}.ant-col-xs-offset-16{margin-left:66.66666667%}.ant-col-xs-order-16{order:16}.ant-col-xs-15{display:block;flex:0 0 62.5%;max-width:62.5%}.ant-col-xs-push-15{left:62.5%}.ant-col-xs-pull-15{right:62.5%}.ant-col-xs-offset-15{margin-left:62.5%}.ant-col-xs-order-15{order:15}.ant-col-xs-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.ant-col-xs-push-14{left:58.33333333%}.ant-col-xs-pull-14{right:58.33333333%}.ant-col-xs-offset-14{margin-left:58.33333333%}.ant-col-xs-order-14{order:14}.ant-col-xs-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.ant-col-xs-push-13{left:54.16666667%}.ant-col-xs-pull-13{right:54.16666667%}.ant-col-xs-offset-13{margin-left:54.16666667%}.ant-col-xs-order-13{order:13}.ant-col-xs-12{display:block;flex:0 0 50%;max-width:50%}.ant-col-xs-push-12{left:50%}.ant-col-xs-pull-12{right:50%}.ant-col-xs-offset-12{margin-left:50%}.ant-col-xs-order-12{order:12}.ant-col-xs-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.ant-col-xs-push-11{left:45.83333333%}.ant-col-xs-pull-11{right:45.83333333%}.ant-col-xs-offset-11{margin-left:45.83333333%}.ant-col-xs-order-11{order:11}.ant-col-xs-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.ant-col-xs-push-10{left:41.66666667%}.ant-col-xs-pull-10{right:41.66666667%}.ant-col-xs-offset-10{margin-left:41.66666667%}.ant-col-xs-order-10{order:10}.ant-col-xs-9{display:block;flex:0 0 37.5%;max-width:37.5%}.ant-col-xs-push-9{left:37.5%}.ant-col-xs-pull-9{right:37.5%}.ant-col-xs-offset-9{margin-left:37.5%}.ant-col-xs-order-9{order:9}.ant-col-xs-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.ant-col-xs-push-8{left:33.33333333%}.ant-col-xs-pull-8{right:33.33333333%}.ant-col-xs-offset-8{margin-left:33.33333333%}.ant-col-xs-order-8{order:8}.ant-col-xs-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.ant-col-xs-push-7{left:29.16666667%}.ant-col-xs-pull-7{right:29.16666667%}.ant-col-xs-offset-7{margin-left:29.16666667%}.ant-col-xs-order-7{order:7}.ant-col-xs-6{display:block;flex:0 0 25%;max-width:25%}.ant-col-xs-push-6{left:25%}.ant-col-xs-pull-6{right:25%}.ant-col-xs-offset-6{margin-left:25%}.ant-col-xs-order-6{order:6}.ant-col-xs-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.ant-col-xs-push-5{left:20.83333333%}.ant-col-xs-pull-5{right:20.83333333%}.ant-col-xs-offset-5{margin-left:20.83333333%}.ant-col-xs-order-5{order:5}.ant-col-xs-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.ant-col-xs-push-4{left:16.66666667%}.ant-col-xs-pull-4{right:16.66666667%}.ant-col-xs-offset-4{margin-left:16.66666667%}.ant-col-xs-order-4{order:4}.ant-col-xs-3{display:block;flex:0 0 12.5%;max-width:12.5%}.ant-col-xs-push-3{left:12.5%}.ant-col-xs-pull-3{right:12.5%}.ant-col-xs-offset-3{margin-left:12.5%}.ant-col-xs-order-3{order:3}.ant-col-xs-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.ant-col-xs-push-2{left:8.33333333%}.ant-col-xs-pull-2{right:8.33333333%}.ant-col-xs-offset-2{margin-left:8.33333333%}.ant-col-xs-order-2{order:2}.ant-col-xs-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.ant-col-xs-push-1{left:4.16666667%}.ant-col-xs-pull-1{right:4.16666667%}.ant-col-xs-offset-1{margin-left:4.16666667%}.ant-col-xs-order-1{order:1}.ant-col-xs-0{display:none}.ant-col-push-0{left:auto}.ant-col-pull-0{right:auto}.ant-col-xs-push-0{left:auto}.ant-col-xs-pull-0{right:auto}.ant-col-xs-offset-0{margin-left:0}.ant-col-xs-order-0{order:0}.ant-col-push-0.ant-col-rtl{right:auto}.ant-col-pull-0.ant-col-rtl{left:auto}.ant-col-xs-push-0.ant-col-rtl{right:auto}.ant-col-xs-pull-0.ant-col-rtl{left:auto}.ant-col-xs-offset-0.ant-col-rtl{margin-right:0}.ant-col-xs-push-1.ant-col-rtl{right:4.16666667%;left:auto}.ant-col-xs-pull-1.ant-col-rtl{right:auto;left:4.16666667%}.ant-col-xs-offset-1.ant-col-rtl{margin-right:4.16666667%;margin-left:0}.ant-col-xs-push-2.ant-col-rtl{right:8.33333333%;left:auto}.ant-col-xs-pull-2.ant-col-rtl{right:auto;left:8.33333333%}.ant-col-xs-offset-2.ant-col-rtl{margin-right:8.33333333%;margin-left:0}.ant-col-xs-push-3.ant-col-rtl{right:12.5%;left:auto}.ant-col-xs-pull-3.ant-col-rtl{right:auto;left:12.5%}.ant-col-xs-offset-3.ant-col-rtl{margin-right:12.5%;margin-left:0}.ant-col-xs-push-4.ant-col-rtl{right:16.66666667%;left:auto}.ant-col-xs-pull-4.ant-col-rtl{right:auto;left:16.66666667%}.ant-col-xs-offset-4.ant-col-rtl{margin-right:16.66666667%;margin-left:0}.ant-col-xs-push-5.ant-col-rtl{right:20.83333333%;left:auto}.ant-col-xs-pull-5.ant-col-rtl{right:auto;left:20.83333333%}.ant-col-xs-offset-5.ant-col-rtl{margin-right:20.83333333%;margin-left:0}.ant-col-xs-push-6.ant-col-rtl{right:25%;left:auto}.ant-col-xs-pull-6.ant-col-rtl{right:auto;left:25%}.ant-col-xs-offset-6.ant-col-rtl{margin-right:25%;margin-left:0}.ant-col-xs-push-7.ant-col-rtl{right:29.16666667%;left:auto}.ant-col-xs-pull-7.ant-col-rtl{right:auto;left:29.16666667%}.ant-col-xs-offset-7.ant-col-rtl{margin-right:29.16666667%;margin-left:0}.ant-col-xs-push-8.ant-col-rtl{right:33.33333333%;left:auto}.ant-col-xs-pull-8.ant-col-rtl{right:auto;left:33.33333333%}.ant-col-xs-offset-8.ant-col-rtl{margin-right:33.33333333%;margin-left:0}.ant-col-xs-push-9.ant-col-rtl{right:37.5%;left:auto}.ant-col-xs-pull-9.ant-col-rtl{right:auto;left:37.5%}.ant-col-xs-offset-9.ant-col-rtl{margin-right:37.5%;margin-left:0}.ant-col-xs-push-10.ant-col-rtl{right:41.66666667%;left:auto}.ant-col-xs-pull-10.ant-col-rtl{right:auto;left:41.66666667%}.ant-col-xs-offset-10.ant-col-rtl{margin-right:41.66666667%;margin-left:0}.ant-col-xs-push-11.ant-col-rtl{right:45.83333333%;left:auto}.ant-col-xs-pull-11.ant-col-rtl{right:auto;left:45.83333333%}.ant-col-xs-offset-11.ant-col-rtl{margin-right:45.83333333%;margin-left:0}.ant-col-xs-push-12.ant-col-rtl{right:50%;left:auto}.ant-col-xs-pull-12.ant-col-rtl{right:auto;left:50%}.ant-col-xs-offset-12.ant-col-rtl{margin-right:50%;margin-left:0}.ant-col-xs-push-13.ant-col-rtl{right:54.16666667%;left:auto}.ant-col-xs-pull-13.ant-col-rtl{right:auto;left:54.16666667%}.ant-col-xs-offset-13.ant-col-rtl{margin-right:54.16666667%;margin-left:0}.ant-col-xs-push-14.ant-col-rtl{right:58.33333333%;left:auto}.ant-col-xs-pull-14.ant-col-rtl{right:auto;left:58.33333333%}.ant-col-xs-offset-14.ant-col-rtl{margin-right:58.33333333%;margin-left:0}.ant-col-xs-push-15.ant-col-rtl{right:62.5%;left:auto}.ant-col-xs-pull-15.ant-col-rtl{right:auto;left:62.5%}.ant-col-xs-offset-15.ant-col-rtl{margin-right:62.5%;margin-left:0}.ant-col-xs-push-16.ant-col-rtl{right:66.66666667%;left:auto}.ant-col-xs-pull-16.ant-col-rtl{right:auto;left:66.66666667%}.ant-col-xs-offset-16.ant-col-rtl{margin-right:66.66666667%;margin-left:0}.ant-col-xs-push-17.ant-col-rtl{right:70.83333333%;left:auto}.ant-col-xs-pull-17.ant-col-rtl{right:auto;left:70.83333333%}.ant-col-xs-offset-17.ant-col-rtl{margin-right:70.83333333%;margin-left:0}.ant-col-xs-push-18.ant-col-rtl{right:75%;left:auto}.ant-col-xs-pull-18.ant-col-rtl{right:auto;left:75%}.ant-col-xs-offset-18.ant-col-rtl{margin-right:75%;margin-left:0}.ant-col-xs-push-19.ant-col-rtl{right:79.16666667%;left:auto}.ant-col-xs-pull-19.ant-col-rtl{right:auto;left:79.16666667%}.ant-col-xs-offset-19.ant-col-rtl{margin-right:79.16666667%;margin-left:0}.ant-col-xs-push-20.ant-col-rtl{right:83.33333333%;left:auto}.ant-col-xs-pull-20.ant-col-rtl{right:auto;left:83.33333333%}.ant-col-xs-offset-20.ant-col-rtl{margin-right:83.33333333%;margin-left:0}.ant-col-xs-push-21.ant-col-rtl{right:87.5%;left:auto}.ant-col-xs-pull-21.ant-col-rtl{right:auto;left:87.5%}.ant-col-xs-offset-21.ant-col-rtl{margin-right:87.5%;margin-left:0}.ant-col-xs-push-22.ant-col-rtl{right:91.66666667%;left:auto}.ant-col-xs-pull-22.ant-col-rtl{right:auto;left:91.66666667%}.ant-col-xs-offset-22.ant-col-rtl{margin-right:91.66666667%;margin-left:0}.ant-col-xs-push-23.ant-col-rtl{right:95.83333333%;left:auto}.ant-col-xs-pull-23.ant-col-rtl{right:auto;left:95.83333333%}.ant-col-xs-offset-23.ant-col-rtl{margin-right:95.83333333%;margin-left:0}.ant-col-xs-push-24.ant-col-rtl{right:100%;left:auto}.ant-col-xs-pull-24.ant-col-rtl{right:auto;left:100%}.ant-col-xs-offset-24.ant-col-rtl{margin-right:100%;margin-left:0}@media (min-width: 576px){.ant-col-sm-24{display:block;flex:0 0 100%;max-width:100%}.ant-col-sm-push-24{left:100%}.ant-col-sm-pull-24{right:100%}.ant-col-sm-offset-24{margin-left:100%}.ant-col-sm-order-24{order:24}.ant-col-sm-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.ant-col-sm-push-23{left:95.83333333%}.ant-col-sm-pull-23{right:95.83333333%}.ant-col-sm-offset-23{margin-left:95.83333333%}.ant-col-sm-order-23{order:23}.ant-col-sm-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.ant-col-sm-push-22{left:91.66666667%}.ant-col-sm-pull-22{right:91.66666667%}.ant-col-sm-offset-22{margin-left:91.66666667%}.ant-col-sm-order-22{order:22}.ant-col-sm-21{display:block;flex:0 0 87.5%;max-width:87.5%}.ant-col-sm-push-21{left:87.5%}.ant-col-sm-pull-21{right:87.5%}.ant-col-sm-offset-21{margin-left:87.5%}.ant-col-sm-order-21{order:21}.ant-col-sm-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.ant-col-sm-push-20{left:83.33333333%}.ant-col-sm-pull-20{right:83.33333333%}.ant-col-sm-offset-20{margin-left:83.33333333%}.ant-col-sm-order-20{order:20}.ant-col-sm-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.ant-col-sm-push-19{left:79.16666667%}.ant-col-sm-pull-19{right:79.16666667%}.ant-col-sm-offset-19{margin-left:79.16666667%}.ant-col-sm-order-19{order:19}.ant-col-sm-18{display:block;flex:0 0 75%;max-width:75%}.ant-col-sm-push-18{left:75%}.ant-col-sm-pull-18{right:75%}.ant-col-sm-offset-18{margin-left:75%}.ant-col-sm-order-18{order:18}.ant-col-sm-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.ant-col-sm-push-17{left:70.83333333%}.ant-col-sm-pull-17{right:70.83333333%}.ant-col-sm-offset-17{margin-left:70.83333333%}.ant-col-sm-order-17{order:17}.ant-col-sm-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.ant-col-sm-push-16{left:66.66666667%}.ant-col-sm-pull-16{right:66.66666667%}.ant-col-sm-offset-16{margin-left:66.66666667%}.ant-col-sm-order-16{order:16}.ant-col-sm-15{display:block;flex:0 0 62.5%;max-width:62.5%}.ant-col-sm-push-15{left:62.5%}.ant-col-sm-pull-15{right:62.5%}.ant-col-sm-offset-15{margin-left:62.5%}.ant-col-sm-order-15{order:15}.ant-col-sm-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.ant-col-sm-push-14{left:58.33333333%}.ant-col-sm-pull-14{right:58.33333333%}.ant-col-sm-offset-14{margin-left:58.33333333%}.ant-col-sm-order-14{order:14}.ant-col-sm-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.ant-col-sm-push-13{left:54.16666667%}.ant-col-sm-pull-13{right:54.16666667%}.ant-col-sm-offset-13{margin-left:54.16666667%}.ant-col-sm-order-13{order:13}.ant-col-sm-12{display:block;flex:0 0 50%;max-width:50%}.ant-col-sm-push-12{left:50%}.ant-col-sm-pull-12{right:50%}.ant-col-sm-offset-12{margin-left:50%}.ant-col-sm-order-12{order:12}.ant-col-sm-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.ant-col-sm-push-11{left:45.83333333%}.ant-col-sm-pull-11{right:45.83333333%}.ant-col-sm-offset-11{margin-left:45.83333333%}.ant-col-sm-order-11{order:11}.ant-col-sm-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.ant-col-sm-push-10{left:41.66666667%}.ant-col-sm-pull-10{right:41.66666667%}.ant-col-sm-offset-10{margin-left:41.66666667%}.ant-col-sm-order-10{order:10}.ant-col-sm-9{display:block;flex:0 0 37.5%;max-width:37.5%}.ant-col-sm-push-9{left:37.5%}.ant-col-sm-pull-9{right:37.5%}.ant-col-sm-offset-9{margin-left:37.5%}.ant-col-sm-order-9{order:9}.ant-col-sm-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.ant-col-sm-push-8{left:33.33333333%}.ant-col-sm-pull-8{right:33.33333333%}.ant-col-sm-offset-8{margin-left:33.33333333%}.ant-col-sm-order-8{order:8}.ant-col-sm-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.ant-col-sm-push-7{left:29.16666667%}.ant-col-sm-pull-7{right:29.16666667%}.ant-col-sm-offset-7{margin-left:29.16666667%}.ant-col-sm-order-7{order:7}.ant-col-sm-6{display:block;flex:0 0 25%;max-width:25%}.ant-col-sm-push-6{left:25%}.ant-col-sm-pull-6{right:25%}.ant-col-sm-offset-6{margin-left:25%}.ant-col-sm-order-6{order:6}.ant-col-sm-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.ant-col-sm-push-5{left:20.83333333%}.ant-col-sm-pull-5{right:20.83333333%}.ant-col-sm-offset-5{margin-left:20.83333333%}.ant-col-sm-order-5{order:5}.ant-col-sm-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.ant-col-sm-push-4{left:16.66666667%}.ant-col-sm-pull-4{right:16.66666667%}.ant-col-sm-offset-4{margin-left:16.66666667%}.ant-col-sm-order-4{order:4}.ant-col-sm-3{display:block;flex:0 0 12.5%;max-width:12.5%}.ant-col-sm-push-3{left:12.5%}.ant-col-sm-pull-3{right:12.5%}.ant-col-sm-offset-3{margin-left:12.5%}.ant-col-sm-order-3{order:3}.ant-col-sm-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.ant-col-sm-push-2{left:8.33333333%}.ant-col-sm-pull-2{right:8.33333333%}.ant-col-sm-offset-2{margin-left:8.33333333%}.ant-col-sm-order-2{order:2}.ant-col-sm-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.ant-col-sm-push-1{left:4.16666667%}.ant-col-sm-pull-1{right:4.16666667%}.ant-col-sm-offset-1{margin-left:4.16666667%}.ant-col-sm-order-1{order:1}.ant-col-sm-0{display:none}.ant-col-push-0{left:auto}.ant-col-pull-0{right:auto}.ant-col-sm-push-0{left:auto}.ant-col-sm-pull-0{right:auto}.ant-col-sm-offset-0{margin-left:0}.ant-col-sm-order-0{order:0}.ant-col-push-0.ant-col-rtl{right:auto}.ant-col-pull-0.ant-col-rtl{left:auto}.ant-col-sm-push-0.ant-col-rtl{right:auto}.ant-col-sm-pull-0.ant-col-rtl{left:auto}.ant-col-sm-offset-0.ant-col-rtl{margin-right:0}.ant-col-sm-push-1.ant-col-rtl{right:4.16666667%;left:auto}.ant-col-sm-pull-1.ant-col-rtl{right:auto;left:4.16666667%}.ant-col-sm-offset-1.ant-col-rtl{margin-right:4.16666667%;margin-left:0}.ant-col-sm-push-2.ant-col-rtl{right:8.33333333%;left:auto}.ant-col-sm-pull-2.ant-col-rtl{right:auto;left:8.33333333%}.ant-col-sm-offset-2.ant-col-rtl{margin-right:8.33333333%;margin-left:0}.ant-col-sm-push-3.ant-col-rtl{right:12.5%;left:auto}.ant-col-sm-pull-3.ant-col-rtl{right:auto;left:12.5%}.ant-col-sm-offset-3.ant-col-rtl{margin-right:12.5%;margin-left:0}.ant-col-sm-push-4.ant-col-rtl{right:16.66666667%;left:auto}.ant-col-sm-pull-4.ant-col-rtl{right:auto;left:16.66666667%}.ant-col-sm-offset-4.ant-col-rtl{margin-right:16.66666667%;margin-left:0}.ant-col-sm-push-5.ant-col-rtl{right:20.83333333%;left:auto}.ant-col-sm-pull-5.ant-col-rtl{right:auto;left:20.83333333%}.ant-col-sm-offset-5.ant-col-rtl{margin-right:20.83333333%;margin-left:0}.ant-col-sm-push-6.ant-col-rtl{right:25%;left:auto}.ant-col-sm-pull-6.ant-col-rtl{right:auto;left:25%}.ant-col-sm-offset-6.ant-col-rtl{margin-right:25%;margin-left:0}.ant-col-sm-push-7.ant-col-rtl{right:29.16666667%;left:auto}.ant-col-sm-pull-7.ant-col-rtl{right:auto;left:29.16666667%}.ant-col-sm-offset-7.ant-col-rtl{margin-right:29.16666667%;margin-left:0}.ant-col-sm-push-8.ant-col-rtl{right:33.33333333%;left:auto}.ant-col-sm-pull-8.ant-col-rtl{right:auto;left:33.33333333%}.ant-col-sm-offset-8.ant-col-rtl{margin-right:33.33333333%;margin-left:0}.ant-col-sm-push-9.ant-col-rtl{right:37.5%;left:auto}.ant-col-sm-pull-9.ant-col-rtl{right:auto;left:37.5%}.ant-col-sm-offset-9.ant-col-rtl{margin-right:37.5%;margin-left:0}.ant-col-sm-push-10.ant-col-rtl{right:41.66666667%;left:auto}.ant-col-sm-pull-10.ant-col-rtl{right:auto;left:41.66666667%}.ant-col-sm-offset-10.ant-col-rtl{margin-right:41.66666667%;margin-left:0}.ant-col-sm-push-11.ant-col-rtl{right:45.83333333%;left:auto}.ant-col-sm-pull-11.ant-col-rtl{right:auto;left:45.83333333%}.ant-col-sm-offset-11.ant-col-rtl{margin-right:45.83333333%;margin-left:0}.ant-col-sm-push-12.ant-col-rtl{right:50%;left:auto}.ant-col-sm-pull-12.ant-col-rtl{right:auto;left:50%}.ant-col-sm-offset-12.ant-col-rtl{margin-right:50%;margin-left:0}.ant-col-sm-push-13.ant-col-rtl{right:54.16666667%;left:auto}.ant-col-sm-pull-13.ant-col-rtl{right:auto;left:54.16666667%}.ant-col-sm-offset-13.ant-col-rtl{margin-right:54.16666667%;margin-left:0}.ant-col-sm-push-14.ant-col-rtl{right:58.33333333%;left:auto}.ant-col-sm-pull-14.ant-col-rtl{right:auto;left:58.33333333%}.ant-col-sm-offset-14.ant-col-rtl{margin-right:58.33333333%;margin-left:0}.ant-col-sm-push-15.ant-col-rtl{right:62.5%;left:auto}.ant-col-sm-pull-15.ant-col-rtl{right:auto;left:62.5%}.ant-col-sm-offset-15.ant-col-rtl{margin-right:62.5%;margin-left:0}.ant-col-sm-push-16.ant-col-rtl{right:66.66666667%;left:auto}.ant-col-sm-pull-16.ant-col-rtl{right:auto;left:66.66666667%}.ant-col-sm-offset-16.ant-col-rtl{margin-right:66.66666667%;margin-left:0}.ant-col-sm-push-17.ant-col-rtl{right:70.83333333%;left:auto}.ant-col-sm-pull-17.ant-col-rtl{right:auto;left:70.83333333%}.ant-col-sm-offset-17.ant-col-rtl{margin-right:70.83333333%;margin-left:0}.ant-col-sm-push-18.ant-col-rtl{right:75%;left:auto}.ant-col-sm-pull-18.ant-col-rtl{right:auto;left:75%}.ant-col-sm-offset-18.ant-col-rtl{margin-right:75%;margin-left:0}.ant-col-sm-push-19.ant-col-rtl{right:79.16666667%;left:auto}.ant-col-sm-pull-19.ant-col-rtl{right:auto;left:79.16666667%}.ant-col-sm-offset-19.ant-col-rtl{margin-right:79.16666667%;margin-left:0}.ant-col-sm-push-20.ant-col-rtl{right:83.33333333%;left:auto}.ant-col-sm-pull-20.ant-col-rtl{right:auto;left:83.33333333%}.ant-col-sm-offset-20.ant-col-rtl{margin-right:83.33333333%;margin-left:0}.ant-col-sm-push-21.ant-col-rtl{right:87.5%;left:auto}.ant-col-sm-pull-21.ant-col-rtl{right:auto;left:87.5%}.ant-col-sm-offset-21.ant-col-rtl{margin-right:87.5%;margin-left:0}.ant-col-sm-push-22.ant-col-rtl{right:91.66666667%;left:auto}.ant-col-sm-pull-22.ant-col-rtl{right:auto;left:91.66666667%}.ant-col-sm-offset-22.ant-col-rtl{margin-right:91.66666667%;margin-left:0}.ant-col-sm-push-23.ant-col-rtl{right:95.83333333%;left:auto}.ant-col-sm-pull-23.ant-col-rtl{right:auto;left:95.83333333%}.ant-col-sm-offset-23.ant-col-rtl{margin-right:95.83333333%;margin-left:0}.ant-col-sm-push-24.ant-col-rtl{right:100%;left:auto}.ant-col-sm-pull-24.ant-col-rtl{right:auto;left:100%}.ant-col-sm-offset-24.ant-col-rtl{margin-right:100%;margin-left:0}}@media (min-width: 768px){.ant-col-md-24{display:block;flex:0 0 100%;max-width:100%}.ant-col-md-push-24{left:100%}.ant-col-md-pull-24{right:100%}.ant-col-md-offset-24{margin-left:100%}.ant-col-md-order-24{order:24}.ant-col-md-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.ant-col-md-push-23{left:95.83333333%}.ant-col-md-pull-23{right:95.83333333%}.ant-col-md-offset-23{margin-left:95.83333333%}.ant-col-md-order-23{order:23}.ant-col-md-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.ant-col-md-push-22{left:91.66666667%}.ant-col-md-pull-22{right:91.66666667%}.ant-col-md-offset-22{margin-left:91.66666667%}.ant-col-md-order-22{order:22}.ant-col-md-21{display:block;flex:0 0 87.5%;max-width:87.5%}.ant-col-md-push-21{left:87.5%}.ant-col-md-pull-21{right:87.5%}.ant-col-md-offset-21{margin-left:87.5%}.ant-col-md-order-21{order:21}.ant-col-md-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.ant-col-md-push-20{left:83.33333333%}.ant-col-md-pull-20{right:83.33333333%}.ant-col-md-offset-20{margin-left:83.33333333%}.ant-col-md-order-20{order:20}.ant-col-md-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.ant-col-md-push-19{left:79.16666667%}.ant-col-md-pull-19{right:79.16666667%}.ant-col-md-offset-19{margin-left:79.16666667%}.ant-col-md-order-19{order:19}.ant-col-md-18{display:block;flex:0 0 75%;max-width:75%}.ant-col-md-push-18{left:75%}.ant-col-md-pull-18{right:75%}.ant-col-md-offset-18{margin-left:75%}.ant-col-md-order-18{order:18}.ant-col-md-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.ant-col-md-push-17{left:70.83333333%}.ant-col-md-pull-17{right:70.83333333%}.ant-col-md-offset-17{margin-left:70.83333333%}.ant-col-md-order-17{order:17}.ant-col-md-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.ant-col-md-push-16{left:66.66666667%}.ant-col-md-pull-16{right:66.66666667%}.ant-col-md-offset-16{margin-left:66.66666667%}.ant-col-md-order-16{order:16}.ant-col-md-15{display:block;flex:0 0 62.5%;max-width:62.5%}.ant-col-md-push-15{left:62.5%}.ant-col-md-pull-15{right:62.5%}.ant-col-md-offset-15{margin-left:62.5%}.ant-col-md-order-15{order:15}.ant-col-md-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.ant-col-md-push-14{left:58.33333333%}.ant-col-md-pull-14{right:58.33333333%}.ant-col-md-offset-14{margin-left:58.33333333%}.ant-col-md-order-14{order:14}.ant-col-md-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.ant-col-md-push-13{left:54.16666667%}.ant-col-md-pull-13{right:54.16666667%}.ant-col-md-offset-13{margin-left:54.16666667%}.ant-col-md-order-13{order:13}.ant-col-md-12{display:block;flex:0 0 50%;max-width:50%}.ant-col-md-push-12{left:50%}.ant-col-md-pull-12{right:50%}.ant-col-md-offset-12{margin-left:50%}.ant-col-md-order-12{order:12}.ant-col-md-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.ant-col-md-push-11{left:45.83333333%}.ant-col-md-pull-11{right:45.83333333%}.ant-col-md-offset-11{margin-left:45.83333333%}.ant-col-md-order-11{order:11}.ant-col-md-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.ant-col-md-push-10{left:41.66666667%}.ant-col-md-pull-10{right:41.66666667%}.ant-col-md-offset-10{margin-left:41.66666667%}.ant-col-md-order-10{order:10}.ant-col-md-9{display:block;flex:0 0 37.5%;max-width:37.5%}.ant-col-md-push-9{left:37.5%}.ant-col-md-pull-9{right:37.5%}.ant-col-md-offset-9{margin-left:37.5%}.ant-col-md-order-9{order:9}.ant-col-md-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.ant-col-md-push-8{left:33.33333333%}.ant-col-md-pull-8{right:33.33333333%}.ant-col-md-offset-8{margin-left:33.33333333%}.ant-col-md-order-8{order:8}.ant-col-md-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.ant-col-md-push-7{left:29.16666667%}.ant-col-md-pull-7{right:29.16666667%}.ant-col-md-offset-7{margin-left:29.16666667%}.ant-col-md-order-7{order:7}.ant-col-md-6{display:block;flex:0 0 25%;max-width:25%}.ant-col-md-push-6{left:25%}.ant-col-md-pull-6{right:25%}.ant-col-md-offset-6{margin-left:25%}.ant-col-md-order-6{order:6}.ant-col-md-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.ant-col-md-push-5{left:20.83333333%}.ant-col-md-pull-5{right:20.83333333%}.ant-col-md-offset-5{margin-left:20.83333333%}.ant-col-md-order-5{order:5}.ant-col-md-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.ant-col-md-push-4{left:16.66666667%}.ant-col-md-pull-4{right:16.66666667%}.ant-col-md-offset-4{margin-left:16.66666667%}.ant-col-md-order-4{order:4}.ant-col-md-3{display:block;flex:0 0 12.5%;max-width:12.5%}.ant-col-md-push-3{left:12.5%}.ant-col-md-pull-3{right:12.5%}.ant-col-md-offset-3{margin-left:12.5%}.ant-col-md-order-3{order:3}.ant-col-md-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.ant-col-md-push-2{left:8.33333333%}.ant-col-md-pull-2{right:8.33333333%}.ant-col-md-offset-2{margin-left:8.33333333%}.ant-col-md-order-2{order:2}.ant-col-md-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.ant-col-md-push-1{left:4.16666667%}.ant-col-md-pull-1{right:4.16666667%}.ant-col-md-offset-1{margin-left:4.16666667%}.ant-col-md-order-1{order:1}.ant-col-md-0{display:none}.ant-col-push-0{left:auto}.ant-col-pull-0{right:auto}.ant-col-md-push-0{left:auto}.ant-col-md-pull-0{right:auto}.ant-col-md-offset-0{margin-left:0}.ant-col-md-order-0{order:0}.ant-col-push-0.ant-col-rtl{right:auto}.ant-col-pull-0.ant-col-rtl{left:auto}.ant-col-md-push-0.ant-col-rtl{right:auto}.ant-col-md-pull-0.ant-col-rtl{left:auto}.ant-col-md-offset-0.ant-col-rtl{margin-right:0}.ant-col-md-push-1.ant-col-rtl{right:4.16666667%;left:auto}.ant-col-md-pull-1.ant-col-rtl{right:auto;left:4.16666667%}.ant-col-md-offset-1.ant-col-rtl{margin-right:4.16666667%;margin-left:0}.ant-col-md-push-2.ant-col-rtl{right:8.33333333%;left:auto}.ant-col-md-pull-2.ant-col-rtl{right:auto;left:8.33333333%}.ant-col-md-offset-2.ant-col-rtl{margin-right:8.33333333%;margin-left:0}.ant-col-md-push-3.ant-col-rtl{right:12.5%;left:auto}.ant-col-md-pull-3.ant-col-rtl{right:auto;left:12.5%}.ant-col-md-offset-3.ant-col-rtl{margin-right:12.5%;margin-left:0}.ant-col-md-push-4.ant-col-rtl{right:16.66666667%;left:auto}.ant-col-md-pull-4.ant-col-rtl{right:auto;left:16.66666667%}.ant-col-md-offset-4.ant-col-rtl{margin-right:16.66666667%;margin-left:0}.ant-col-md-push-5.ant-col-rtl{right:20.83333333%;left:auto}.ant-col-md-pull-5.ant-col-rtl{right:auto;left:20.83333333%}.ant-col-md-offset-5.ant-col-rtl{margin-right:20.83333333%;margin-left:0}.ant-col-md-push-6.ant-col-rtl{right:25%;left:auto}.ant-col-md-pull-6.ant-col-rtl{right:auto;left:25%}.ant-col-md-offset-6.ant-col-rtl{margin-right:25%;margin-left:0}.ant-col-md-push-7.ant-col-rtl{right:29.16666667%;left:auto}.ant-col-md-pull-7.ant-col-rtl{right:auto;left:29.16666667%}.ant-col-md-offset-7.ant-col-rtl{margin-right:29.16666667%;margin-left:0}.ant-col-md-push-8.ant-col-rtl{right:33.33333333%;left:auto}.ant-col-md-pull-8.ant-col-rtl{right:auto;left:33.33333333%}.ant-col-md-offset-8.ant-col-rtl{margin-right:33.33333333%;margin-left:0}.ant-col-md-push-9.ant-col-rtl{right:37.5%;left:auto}.ant-col-md-pull-9.ant-col-rtl{right:auto;left:37.5%}.ant-col-md-offset-9.ant-col-rtl{margin-right:37.5%;margin-left:0}.ant-col-md-push-10.ant-col-rtl{right:41.66666667%;left:auto}.ant-col-md-pull-10.ant-col-rtl{right:auto;left:41.66666667%}.ant-col-md-offset-10.ant-col-rtl{margin-right:41.66666667%;margin-left:0}.ant-col-md-push-11.ant-col-rtl{right:45.83333333%;left:auto}.ant-col-md-pull-11.ant-col-rtl{right:auto;left:45.83333333%}.ant-col-md-offset-11.ant-col-rtl{margin-right:45.83333333%;margin-left:0}.ant-col-md-push-12.ant-col-rtl{right:50%;left:auto}.ant-col-md-pull-12.ant-col-rtl{right:auto;left:50%}.ant-col-md-offset-12.ant-col-rtl{margin-right:50%;margin-left:0}.ant-col-md-push-13.ant-col-rtl{right:54.16666667%;left:auto}.ant-col-md-pull-13.ant-col-rtl{right:auto;left:54.16666667%}.ant-col-md-offset-13.ant-col-rtl{margin-right:54.16666667%;margin-left:0}.ant-col-md-push-14.ant-col-rtl{right:58.33333333%;left:auto}.ant-col-md-pull-14.ant-col-rtl{right:auto;left:58.33333333%}.ant-col-md-offset-14.ant-col-rtl{margin-right:58.33333333%;margin-left:0}.ant-col-md-push-15.ant-col-rtl{right:62.5%;left:auto}.ant-col-md-pull-15.ant-col-rtl{right:auto;left:62.5%}.ant-col-md-offset-15.ant-col-rtl{margin-right:62.5%;margin-left:0}.ant-col-md-push-16.ant-col-rtl{right:66.66666667%;left:auto}.ant-col-md-pull-16.ant-col-rtl{right:auto;left:66.66666667%}.ant-col-md-offset-16.ant-col-rtl{margin-right:66.66666667%;margin-left:0}.ant-col-md-push-17.ant-col-rtl{right:70.83333333%;left:auto}.ant-col-md-pull-17.ant-col-rtl{right:auto;left:70.83333333%}.ant-col-md-offset-17.ant-col-rtl{margin-right:70.83333333%;margin-left:0}.ant-col-md-push-18.ant-col-rtl{right:75%;left:auto}.ant-col-md-pull-18.ant-col-rtl{right:auto;left:75%}.ant-col-md-offset-18.ant-col-rtl{margin-right:75%;margin-left:0}.ant-col-md-push-19.ant-col-rtl{right:79.16666667%;left:auto}.ant-col-md-pull-19.ant-col-rtl{right:auto;left:79.16666667%}.ant-col-md-offset-19.ant-col-rtl{margin-right:79.16666667%;margin-left:0}.ant-col-md-push-20.ant-col-rtl{right:83.33333333%;left:auto}.ant-col-md-pull-20.ant-col-rtl{right:auto;left:83.33333333%}.ant-col-md-offset-20.ant-col-rtl{margin-right:83.33333333%;margin-left:0}.ant-col-md-push-21.ant-col-rtl{right:87.5%;left:auto}.ant-col-md-pull-21.ant-col-rtl{right:auto;left:87.5%}.ant-col-md-offset-21.ant-col-rtl{margin-right:87.5%;margin-left:0}.ant-col-md-push-22.ant-col-rtl{right:91.66666667%;left:auto}.ant-col-md-pull-22.ant-col-rtl{right:auto;left:91.66666667%}.ant-col-md-offset-22.ant-col-rtl{margin-right:91.66666667%;margin-left:0}.ant-col-md-push-23.ant-col-rtl{right:95.83333333%;left:auto}.ant-col-md-pull-23.ant-col-rtl{right:auto;left:95.83333333%}.ant-col-md-offset-23.ant-col-rtl{margin-right:95.83333333%;margin-left:0}.ant-col-md-push-24.ant-col-rtl{right:100%;left:auto}.ant-col-md-pull-24.ant-col-rtl{right:auto;left:100%}.ant-col-md-offset-24.ant-col-rtl{margin-right:100%;margin-left:0}}@media (min-width: 992px){.ant-col-lg-24{display:block;flex:0 0 100%;max-width:100%}.ant-col-lg-push-24{left:100%}.ant-col-lg-pull-24{right:100%}.ant-col-lg-offset-24{margin-left:100%}.ant-col-lg-order-24{order:24}.ant-col-lg-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.ant-col-lg-push-23{left:95.83333333%}.ant-col-lg-pull-23{right:95.83333333%}.ant-col-lg-offset-23{margin-left:95.83333333%}.ant-col-lg-order-23{order:23}.ant-col-lg-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.ant-col-lg-push-22{left:91.66666667%}.ant-col-lg-pull-22{right:91.66666667%}.ant-col-lg-offset-22{margin-left:91.66666667%}.ant-col-lg-order-22{order:22}.ant-col-lg-21{display:block;flex:0 0 87.5%;max-width:87.5%}.ant-col-lg-push-21{left:87.5%}.ant-col-lg-pull-21{right:87.5%}.ant-col-lg-offset-21{margin-left:87.5%}.ant-col-lg-order-21{order:21}.ant-col-lg-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.ant-col-lg-push-20{left:83.33333333%}.ant-col-lg-pull-20{right:83.33333333%}.ant-col-lg-offset-20{margin-left:83.33333333%}.ant-col-lg-order-20{order:20}.ant-col-lg-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.ant-col-lg-push-19{left:79.16666667%}.ant-col-lg-pull-19{right:79.16666667%}.ant-col-lg-offset-19{margin-left:79.16666667%}.ant-col-lg-order-19{order:19}.ant-col-lg-18{display:block;flex:0 0 75%;max-width:75%}.ant-col-lg-push-18{left:75%}.ant-col-lg-pull-18{right:75%}.ant-col-lg-offset-18{margin-left:75%}.ant-col-lg-order-18{order:18}.ant-col-lg-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.ant-col-lg-push-17{left:70.83333333%}.ant-col-lg-pull-17{right:70.83333333%}.ant-col-lg-offset-17{margin-left:70.83333333%}.ant-col-lg-order-17{order:17}.ant-col-lg-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.ant-col-lg-push-16{left:66.66666667%}.ant-col-lg-pull-16{right:66.66666667%}.ant-col-lg-offset-16{margin-left:66.66666667%}.ant-col-lg-order-16{order:16}.ant-col-lg-15{display:block;flex:0 0 62.5%;max-width:62.5%}.ant-col-lg-push-15{left:62.5%}.ant-col-lg-pull-15{right:62.5%}.ant-col-lg-offset-15{margin-left:62.5%}.ant-col-lg-order-15{order:15}.ant-col-lg-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.ant-col-lg-push-14{left:58.33333333%}.ant-col-lg-pull-14{right:58.33333333%}.ant-col-lg-offset-14{margin-left:58.33333333%}.ant-col-lg-order-14{order:14}.ant-col-lg-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.ant-col-lg-push-13{left:54.16666667%}.ant-col-lg-pull-13{right:54.16666667%}.ant-col-lg-offset-13{margin-left:54.16666667%}.ant-col-lg-order-13{order:13}.ant-col-lg-12{display:block;flex:0 0 50%;max-width:50%}.ant-col-lg-push-12{left:50%}.ant-col-lg-pull-12{right:50%}.ant-col-lg-offset-12{margin-left:50%}.ant-col-lg-order-12{order:12}.ant-col-lg-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.ant-col-lg-push-11{left:45.83333333%}.ant-col-lg-pull-11{right:45.83333333%}.ant-col-lg-offset-11{margin-left:45.83333333%}.ant-col-lg-order-11{order:11}.ant-col-lg-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.ant-col-lg-push-10{left:41.66666667%}.ant-col-lg-pull-10{right:41.66666667%}.ant-col-lg-offset-10{margin-left:41.66666667%}.ant-col-lg-order-10{order:10}.ant-col-lg-9{display:block;flex:0 0 37.5%;max-width:37.5%}.ant-col-lg-push-9{left:37.5%}.ant-col-lg-pull-9{right:37.5%}.ant-col-lg-offset-9{margin-left:37.5%}.ant-col-lg-order-9{order:9}.ant-col-lg-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.ant-col-lg-push-8{left:33.33333333%}.ant-col-lg-pull-8{right:33.33333333%}.ant-col-lg-offset-8{margin-left:33.33333333%}.ant-col-lg-order-8{order:8}.ant-col-lg-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.ant-col-lg-push-7{left:29.16666667%}.ant-col-lg-pull-7{right:29.16666667%}.ant-col-lg-offset-7{margin-left:29.16666667%}.ant-col-lg-order-7{order:7}.ant-col-lg-6{display:block;flex:0 0 25%;max-width:25%}.ant-col-lg-push-6{left:25%}.ant-col-lg-pull-6{right:25%}.ant-col-lg-offset-6{margin-left:25%}.ant-col-lg-order-6{order:6}.ant-col-lg-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.ant-col-lg-push-5{left:20.83333333%}.ant-col-lg-pull-5{right:20.83333333%}.ant-col-lg-offset-5{margin-left:20.83333333%}.ant-col-lg-order-5{order:5}.ant-col-lg-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.ant-col-lg-push-4{left:16.66666667%}.ant-col-lg-pull-4{right:16.66666667%}.ant-col-lg-offset-4{margin-left:16.66666667%}.ant-col-lg-order-4{order:4}.ant-col-lg-3{display:block;flex:0 0 12.5%;max-width:12.5%}.ant-col-lg-push-3{left:12.5%}.ant-col-lg-pull-3{right:12.5%}.ant-col-lg-offset-3{margin-left:12.5%}.ant-col-lg-order-3{order:3}.ant-col-lg-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.ant-col-lg-push-2{left:8.33333333%}.ant-col-lg-pull-2{right:8.33333333%}.ant-col-lg-offset-2{margin-left:8.33333333%}.ant-col-lg-order-2{order:2}.ant-col-lg-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.ant-col-lg-push-1{left:4.16666667%}.ant-col-lg-pull-1{right:4.16666667%}.ant-col-lg-offset-1{margin-left:4.16666667%}.ant-col-lg-order-1{order:1}.ant-col-lg-0{display:none}.ant-col-push-0{left:auto}.ant-col-pull-0{right:auto}.ant-col-lg-push-0{left:auto}.ant-col-lg-pull-0{right:auto}.ant-col-lg-offset-0{margin-left:0}.ant-col-lg-order-0{order:0}.ant-col-push-0.ant-col-rtl{right:auto}.ant-col-pull-0.ant-col-rtl{left:auto}.ant-col-lg-push-0.ant-col-rtl{right:auto}.ant-col-lg-pull-0.ant-col-rtl{left:auto}.ant-col-lg-offset-0.ant-col-rtl{margin-right:0}.ant-col-lg-push-1.ant-col-rtl{right:4.16666667%;left:auto}.ant-col-lg-pull-1.ant-col-rtl{right:auto;left:4.16666667%}.ant-col-lg-offset-1.ant-col-rtl{margin-right:4.16666667%;margin-left:0}.ant-col-lg-push-2.ant-col-rtl{right:8.33333333%;left:auto}.ant-col-lg-pull-2.ant-col-rtl{right:auto;left:8.33333333%}.ant-col-lg-offset-2.ant-col-rtl{margin-right:8.33333333%;margin-left:0}.ant-col-lg-push-3.ant-col-rtl{right:12.5%;left:auto}.ant-col-lg-pull-3.ant-col-rtl{right:auto;left:12.5%}.ant-col-lg-offset-3.ant-col-rtl{margin-right:12.5%;margin-left:0}.ant-col-lg-push-4.ant-col-rtl{right:16.66666667%;left:auto}.ant-col-lg-pull-4.ant-col-rtl{right:auto;left:16.66666667%}.ant-col-lg-offset-4.ant-col-rtl{margin-right:16.66666667%;margin-left:0}.ant-col-lg-push-5.ant-col-rtl{right:20.83333333%;left:auto}.ant-col-lg-pull-5.ant-col-rtl{right:auto;left:20.83333333%}.ant-col-lg-offset-5.ant-col-rtl{margin-right:20.83333333%;margin-left:0}.ant-col-lg-push-6.ant-col-rtl{right:25%;left:auto}.ant-col-lg-pull-6.ant-col-rtl{right:auto;left:25%}.ant-col-lg-offset-6.ant-col-rtl{margin-right:25%;margin-left:0}.ant-col-lg-push-7.ant-col-rtl{right:29.16666667%;left:auto}.ant-col-lg-pull-7.ant-col-rtl{right:auto;left:29.16666667%}.ant-col-lg-offset-7.ant-col-rtl{margin-right:29.16666667%;margin-left:0}.ant-col-lg-push-8.ant-col-rtl{right:33.33333333%;left:auto}.ant-col-lg-pull-8.ant-col-rtl{right:auto;left:33.33333333%}.ant-col-lg-offset-8.ant-col-rtl{margin-right:33.33333333%;margin-left:0}.ant-col-lg-push-9.ant-col-rtl{right:37.5%;left:auto}.ant-col-lg-pull-9.ant-col-rtl{right:auto;left:37.5%}.ant-col-lg-offset-9.ant-col-rtl{margin-right:37.5%;margin-left:0}.ant-col-lg-push-10.ant-col-rtl{right:41.66666667%;left:auto}.ant-col-lg-pull-10.ant-col-rtl{right:auto;left:41.66666667%}.ant-col-lg-offset-10.ant-col-rtl{margin-right:41.66666667%;margin-left:0}.ant-col-lg-push-11.ant-col-rtl{right:45.83333333%;left:auto}.ant-col-lg-pull-11.ant-col-rtl{right:auto;left:45.83333333%}.ant-col-lg-offset-11.ant-col-rtl{margin-right:45.83333333%;margin-left:0}.ant-col-lg-push-12.ant-col-rtl{right:50%;left:auto}.ant-col-lg-pull-12.ant-col-rtl{right:auto;left:50%}.ant-col-lg-offset-12.ant-col-rtl{margin-right:50%;margin-left:0}.ant-col-lg-push-13.ant-col-rtl{right:54.16666667%;left:auto}.ant-col-lg-pull-13.ant-col-rtl{right:auto;left:54.16666667%}.ant-col-lg-offset-13.ant-col-rtl{margin-right:54.16666667%;margin-left:0}.ant-col-lg-push-14.ant-col-rtl{right:58.33333333%;left:auto}.ant-col-lg-pull-14.ant-col-rtl{right:auto;left:58.33333333%}.ant-col-lg-offset-14.ant-col-rtl{margin-right:58.33333333%;margin-left:0}.ant-col-lg-push-15.ant-col-rtl{right:62.5%;left:auto}.ant-col-lg-pull-15.ant-col-rtl{right:auto;left:62.5%}.ant-col-lg-offset-15.ant-col-rtl{margin-right:62.5%;margin-left:0}.ant-col-lg-push-16.ant-col-rtl{right:66.66666667%;left:auto}.ant-col-lg-pull-16.ant-col-rtl{right:auto;left:66.66666667%}.ant-col-lg-offset-16.ant-col-rtl{margin-right:66.66666667%;margin-left:0}.ant-col-lg-push-17.ant-col-rtl{right:70.83333333%;left:auto}.ant-col-lg-pull-17.ant-col-rtl{right:auto;left:70.83333333%}.ant-col-lg-offset-17.ant-col-rtl{margin-right:70.83333333%;margin-left:0}.ant-col-lg-push-18.ant-col-rtl{right:75%;left:auto}.ant-col-lg-pull-18.ant-col-rtl{right:auto;left:75%}.ant-col-lg-offset-18.ant-col-rtl{margin-right:75%;margin-left:0}.ant-col-lg-push-19.ant-col-rtl{right:79.16666667%;left:auto}.ant-col-lg-pull-19.ant-col-rtl{right:auto;left:79.16666667%}.ant-col-lg-offset-19.ant-col-rtl{margin-right:79.16666667%;margin-left:0}.ant-col-lg-push-20.ant-col-rtl{right:83.33333333%;left:auto}.ant-col-lg-pull-20.ant-col-rtl{right:auto;left:83.33333333%}.ant-col-lg-offset-20.ant-col-rtl{margin-right:83.33333333%;margin-left:0}.ant-col-lg-push-21.ant-col-rtl{right:87.5%;left:auto}.ant-col-lg-pull-21.ant-col-rtl{right:auto;left:87.5%}.ant-col-lg-offset-21.ant-col-rtl{margin-right:87.5%;margin-left:0}.ant-col-lg-push-22.ant-col-rtl{right:91.66666667%;left:auto}.ant-col-lg-pull-22.ant-col-rtl{right:auto;left:91.66666667%}.ant-col-lg-offset-22.ant-col-rtl{margin-right:91.66666667%;margin-left:0}.ant-col-lg-push-23.ant-col-rtl{right:95.83333333%;left:auto}.ant-col-lg-pull-23.ant-col-rtl{right:auto;left:95.83333333%}.ant-col-lg-offset-23.ant-col-rtl{margin-right:95.83333333%;margin-left:0}.ant-col-lg-push-24.ant-col-rtl{right:100%;left:auto}.ant-col-lg-pull-24.ant-col-rtl{right:auto;left:100%}.ant-col-lg-offset-24.ant-col-rtl{margin-right:100%;margin-left:0}}@media (min-width: 1200px){.ant-col-xl-24{display:block;flex:0 0 100%;max-width:100%}.ant-col-xl-push-24{left:100%}.ant-col-xl-pull-24{right:100%}.ant-col-xl-offset-24{margin-left:100%}.ant-col-xl-order-24{order:24}.ant-col-xl-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.ant-col-xl-push-23{left:95.83333333%}.ant-col-xl-pull-23{right:95.83333333%}.ant-col-xl-offset-23{margin-left:95.83333333%}.ant-col-xl-order-23{order:23}.ant-col-xl-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.ant-col-xl-push-22{left:91.66666667%}.ant-col-xl-pull-22{right:91.66666667%}.ant-col-xl-offset-22{margin-left:91.66666667%}.ant-col-xl-order-22{order:22}.ant-col-xl-21{display:block;flex:0 0 87.5%;max-width:87.5%}.ant-col-xl-push-21{left:87.5%}.ant-col-xl-pull-21{right:87.5%}.ant-col-xl-offset-21{margin-left:87.5%}.ant-col-xl-order-21{order:21}.ant-col-xl-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.ant-col-xl-push-20{left:83.33333333%}.ant-col-xl-pull-20{right:83.33333333%}.ant-col-xl-offset-20{margin-left:83.33333333%}.ant-col-xl-order-20{order:20}.ant-col-xl-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.ant-col-xl-push-19{left:79.16666667%}.ant-col-xl-pull-19{right:79.16666667%}.ant-col-xl-offset-19{margin-left:79.16666667%}.ant-col-xl-order-19{order:19}.ant-col-xl-18{display:block;flex:0 0 75%;max-width:75%}.ant-col-xl-push-18{left:75%}.ant-col-xl-pull-18{right:75%}.ant-col-xl-offset-18{margin-left:75%}.ant-col-xl-order-18{order:18}.ant-col-xl-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.ant-col-xl-push-17{left:70.83333333%}.ant-col-xl-pull-17{right:70.83333333%}.ant-col-xl-offset-17{margin-left:70.83333333%}.ant-col-xl-order-17{order:17}.ant-col-xl-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.ant-col-xl-push-16{left:66.66666667%}.ant-col-xl-pull-16{right:66.66666667%}.ant-col-xl-offset-16{margin-left:66.66666667%}.ant-col-xl-order-16{order:16}.ant-col-xl-15{display:block;flex:0 0 62.5%;max-width:62.5%}.ant-col-xl-push-15{left:62.5%}.ant-col-xl-pull-15{right:62.5%}.ant-col-xl-offset-15{margin-left:62.5%}.ant-col-xl-order-15{order:15}.ant-col-xl-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.ant-col-xl-push-14{left:58.33333333%}.ant-col-xl-pull-14{right:58.33333333%}.ant-col-xl-offset-14{margin-left:58.33333333%}.ant-col-xl-order-14{order:14}.ant-col-xl-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.ant-col-xl-push-13{left:54.16666667%}.ant-col-xl-pull-13{right:54.16666667%}.ant-col-xl-offset-13{margin-left:54.16666667%}.ant-col-xl-order-13{order:13}.ant-col-xl-12{display:block;flex:0 0 50%;max-width:50%}.ant-col-xl-push-12{left:50%}.ant-col-xl-pull-12{right:50%}.ant-col-xl-offset-12{margin-left:50%}.ant-col-xl-order-12{order:12}.ant-col-xl-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.ant-col-xl-push-11{left:45.83333333%}.ant-col-xl-pull-11{right:45.83333333%}.ant-col-xl-offset-11{margin-left:45.83333333%}.ant-col-xl-order-11{order:11}.ant-col-xl-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.ant-col-xl-push-10{left:41.66666667%}.ant-col-xl-pull-10{right:41.66666667%}.ant-col-xl-offset-10{margin-left:41.66666667%}.ant-col-xl-order-10{order:10}.ant-col-xl-9{display:block;flex:0 0 37.5%;max-width:37.5%}.ant-col-xl-push-9{left:37.5%}.ant-col-xl-pull-9{right:37.5%}.ant-col-xl-offset-9{margin-left:37.5%}.ant-col-xl-order-9{order:9}.ant-col-xl-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.ant-col-xl-push-8{left:33.33333333%}.ant-col-xl-pull-8{right:33.33333333%}.ant-col-xl-offset-8{margin-left:33.33333333%}.ant-col-xl-order-8{order:8}.ant-col-xl-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.ant-col-xl-push-7{left:29.16666667%}.ant-col-xl-pull-7{right:29.16666667%}.ant-col-xl-offset-7{margin-left:29.16666667%}.ant-col-xl-order-7{order:7}.ant-col-xl-6{display:block;flex:0 0 25%;max-width:25%}.ant-col-xl-push-6{left:25%}.ant-col-xl-pull-6{right:25%}.ant-col-xl-offset-6{margin-left:25%}.ant-col-xl-order-6{order:6}.ant-col-xl-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.ant-col-xl-push-5{left:20.83333333%}.ant-col-xl-pull-5{right:20.83333333%}.ant-col-xl-offset-5{margin-left:20.83333333%}.ant-col-xl-order-5{order:5}.ant-col-xl-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.ant-col-xl-push-4{left:16.66666667%}.ant-col-xl-pull-4{right:16.66666667%}.ant-col-xl-offset-4{margin-left:16.66666667%}.ant-col-xl-order-4{order:4}.ant-col-xl-3{display:block;flex:0 0 12.5%;max-width:12.5%}.ant-col-xl-push-3{left:12.5%}.ant-col-xl-pull-3{right:12.5%}.ant-col-xl-offset-3{margin-left:12.5%}.ant-col-xl-order-3{order:3}.ant-col-xl-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.ant-col-xl-push-2{left:8.33333333%}.ant-col-xl-pull-2{right:8.33333333%}.ant-col-xl-offset-2{margin-left:8.33333333%}.ant-col-xl-order-2{order:2}.ant-col-xl-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.ant-col-xl-push-1{left:4.16666667%}.ant-col-xl-pull-1{right:4.16666667%}.ant-col-xl-offset-1{margin-left:4.16666667%}.ant-col-xl-order-1{order:1}.ant-col-xl-0{display:none}.ant-col-push-0{left:auto}.ant-col-pull-0{right:auto}.ant-col-xl-push-0{left:auto}.ant-col-xl-pull-0{right:auto}.ant-col-xl-offset-0{margin-left:0}.ant-col-xl-order-0{order:0}.ant-col-push-0.ant-col-rtl{right:auto}.ant-col-pull-0.ant-col-rtl{left:auto}.ant-col-xl-push-0.ant-col-rtl{right:auto}.ant-col-xl-pull-0.ant-col-rtl{left:auto}.ant-col-xl-offset-0.ant-col-rtl{margin-right:0}.ant-col-xl-push-1.ant-col-rtl{right:4.16666667%;left:auto}.ant-col-xl-pull-1.ant-col-rtl{right:auto;left:4.16666667%}.ant-col-xl-offset-1.ant-col-rtl{margin-right:4.16666667%;margin-left:0}.ant-col-xl-push-2.ant-col-rtl{right:8.33333333%;left:auto}.ant-col-xl-pull-2.ant-col-rtl{right:auto;left:8.33333333%}.ant-col-xl-offset-2.ant-col-rtl{margin-right:8.33333333%;margin-left:0}.ant-col-xl-push-3.ant-col-rtl{right:12.5%;left:auto}.ant-col-xl-pull-3.ant-col-rtl{right:auto;left:12.5%}.ant-col-xl-offset-3.ant-col-rtl{margin-right:12.5%;margin-left:0}.ant-col-xl-push-4.ant-col-rtl{right:16.66666667%;left:auto}.ant-col-xl-pull-4.ant-col-rtl{right:auto;left:16.66666667%}.ant-col-xl-offset-4.ant-col-rtl{margin-right:16.66666667%;margin-left:0}.ant-col-xl-push-5.ant-col-rtl{right:20.83333333%;left:auto}.ant-col-xl-pull-5.ant-col-rtl{right:auto;left:20.83333333%}.ant-col-xl-offset-5.ant-col-rtl{margin-right:20.83333333%;margin-left:0}.ant-col-xl-push-6.ant-col-rtl{right:25%;left:auto}.ant-col-xl-pull-6.ant-col-rtl{right:auto;left:25%}.ant-col-xl-offset-6.ant-col-rtl{margin-right:25%;margin-left:0}.ant-col-xl-push-7.ant-col-rtl{right:29.16666667%;left:auto}.ant-col-xl-pull-7.ant-col-rtl{right:auto;left:29.16666667%}.ant-col-xl-offset-7.ant-col-rtl{margin-right:29.16666667%;margin-left:0}.ant-col-xl-push-8.ant-col-rtl{right:33.33333333%;left:auto}.ant-col-xl-pull-8.ant-col-rtl{right:auto;left:33.33333333%}.ant-col-xl-offset-8.ant-col-rtl{margin-right:33.33333333%;margin-left:0}.ant-col-xl-push-9.ant-col-rtl{right:37.5%;left:auto}.ant-col-xl-pull-9.ant-col-rtl{right:auto;left:37.5%}.ant-col-xl-offset-9.ant-col-rtl{margin-right:37.5%;margin-left:0}.ant-col-xl-push-10.ant-col-rtl{right:41.66666667%;left:auto}.ant-col-xl-pull-10.ant-col-rtl{right:auto;left:41.66666667%}.ant-col-xl-offset-10.ant-col-rtl{margin-right:41.66666667%;margin-left:0}.ant-col-xl-push-11.ant-col-rtl{right:45.83333333%;left:auto}.ant-col-xl-pull-11.ant-col-rtl{right:auto;left:45.83333333%}.ant-col-xl-offset-11.ant-col-rtl{margin-right:45.83333333%;margin-left:0}.ant-col-xl-push-12.ant-col-rtl{right:50%;left:auto}.ant-col-xl-pull-12.ant-col-rtl{right:auto;left:50%}.ant-col-xl-offset-12.ant-col-rtl{margin-right:50%;margin-left:0}.ant-col-xl-push-13.ant-col-rtl{right:54.16666667%;left:auto}.ant-col-xl-pull-13.ant-col-rtl{right:auto;left:54.16666667%}.ant-col-xl-offset-13.ant-col-rtl{margin-right:54.16666667%;margin-left:0}.ant-col-xl-push-14.ant-col-rtl{right:58.33333333%;left:auto}.ant-col-xl-pull-14.ant-col-rtl{right:auto;left:58.33333333%}.ant-col-xl-offset-14.ant-col-rtl{margin-right:58.33333333%;margin-left:0}.ant-col-xl-push-15.ant-col-rtl{right:62.5%;left:auto}.ant-col-xl-pull-15.ant-col-rtl{right:auto;left:62.5%}.ant-col-xl-offset-15.ant-col-rtl{margin-right:62.5%;margin-left:0}.ant-col-xl-push-16.ant-col-rtl{right:66.66666667%;left:auto}.ant-col-xl-pull-16.ant-col-rtl{right:auto;left:66.66666667%}.ant-col-xl-offset-16.ant-col-rtl{margin-right:66.66666667%;margin-left:0}.ant-col-xl-push-17.ant-col-rtl{right:70.83333333%;left:auto}.ant-col-xl-pull-17.ant-col-rtl{right:auto;left:70.83333333%}.ant-col-xl-offset-17.ant-col-rtl{margin-right:70.83333333%;margin-left:0}.ant-col-xl-push-18.ant-col-rtl{right:75%;left:auto}.ant-col-xl-pull-18.ant-col-rtl{right:auto;left:75%}.ant-col-xl-offset-18.ant-col-rtl{margin-right:75%;margin-left:0}.ant-col-xl-push-19.ant-col-rtl{right:79.16666667%;left:auto}.ant-col-xl-pull-19.ant-col-rtl{right:auto;left:79.16666667%}.ant-col-xl-offset-19.ant-col-rtl{margin-right:79.16666667%;margin-left:0}.ant-col-xl-push-20.ant-col-rtl{right:83.33333333%;left:auto}.ant-col-xl-pull-20.ant-col-rtl{right:auto;left:83.33333333%}.ant-col-xl-offset-20.ant-col-rtl{margin-right:83.33333333%;margin-left:0}.ant-col-xl-push-21.ant-col-rtl{right:87.5%;left:auto}.ant-col-xl-pull-21.ant-col-rtl{right:auto;left:87.5%}.ant-col-xl-offset-21.ant-col-rtl{margin-right:87.5%;margin-left:0}.ant-col-xl-push-22.ant-col-rtl{right:91.66666667%;left:auto}.ant-col-xl-pull-22.ant-col-rtl{right:auto;left:91.66666667%}.ant-col-xl-offset-22.ant-col-rtl{margin-right:91.66666667%;margin-left:0}.ant-col-xl-push-23.ant-col-rtl{right:95.83333333%;left:auto}.ant-col-xl-pull-23.ant-col-rtl{right:auto;left:95.83333333%}.ant-col-xl-offset-23.ant-col-rtl{margin-right:95.83333333%;margin-left:0}.ant-col-xl-push-24.ant-col-rtl{right:100%;left:auto}.ant-col-xl-pull-24.ant-col-rtl{right:auto;left:100%}.ant-col-xl-offset-24.ant-col-rtl{margin-right:100%;margin-left:0}}@media (min-width: 1600px){.ant-col-xxl-24{display:block;flex:0 0 100%;max-width:100%}.ant-col-xxl-push-24{left:100%}.ant-col-xxl-pull-24{right:100%}.ant-col-xxl-offset-24{margin-left:100%}.ant-col-xxl-order-24{order:24}.ant-col-xxl-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.ant-col-xxl-push-23{left:95.83333333%}.ant-col-xxl-pull-23{right:95.83333333%}.ant-col-xxl-offset-23{margin-left:95.83333333%}.ant-col-xxl-order-23{order:23}.ant-col-xxl-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.ant-col-xxl-push-22{left:91.66666667%}.ant-col-xxl-pull-22{right:91.66666667%}.ant-col-xxl-offset-22{margin-left:91.66666667%}.ant-col-xxl-order-22{order:22}.ant-col-xxl-21{display:block;flex:0 0 87.5%;max-width:87.5%}.ant-col-xxl-push-21{left:87.5%}.ant-col-xxl-pull-21{right:87.5%}.ant-col-xxl-offset-21{margin-left:87.5%}.ant-col-xxl-order-21{order:21}.ant-col-xxl-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.ant-col-xxl-push-20{left:83.33333333%}.ant-col-xxl-pull-20{right:83.33333333%}.ant-col-xxl-offset-20{margin-left:83.33333333%}.ant-col-xxl-order-20{order:20}.ant-col-xxl-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.ant-col-xxl-push-19{left:79.16666667%}.ant-col-xxl-pull-19{right:79.16666667%}.ant-col-xxl-offset-19{margin-left:79.16666667%}.ant-col-xxl-order-19{order:19}.ant-col-xxl-18{display:block;flex:0 0 75%;max-width:75%}.ant-col-xxl-push-18{left:75%}.ant-col-xxl-pull-18{right:75%}.ant-col-xxl-offset-18{margin-left:75%}.ant-col-xxl-order-18{order:18}.ant-col-xxl-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.ant-col-xxl-push-17{left:70.83333333%}.ant-col-xxl-pull-17{right:70.83333333%}.ant-col-xxl-offset-17{margin-left:70.83333333%}.ant-col-xxl-order-17{order:17}.ant-col-xxl-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.ant-col-xxl-push-16{left:66.66666667%}.ant-col-xxl-pull-16{right:66.66666667%}.ant-col-xxl-offset-16{margin-left:66.66666667%}.ant-col-xxl-order-16{order:16}.ant-col-xxl-15{display:block;flex:0 0 62.5%;max-width:62.5%}.ant-col-xxl-push-15{left:62.5%}.ant-col-xxl-pull-15{right:62.5%}.ant-col-xxl-offset-15{margin-left:62.5%}.ant-col-xxl-order-15{order:15}.ant-col-xxl-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.ant-col-xxl-push-14{left:58.33333333%}.ant-col-xxl-pull-14{right:58.33333333%}.ant-col-xxl-offset-14{margin-left:58.33333333%}.ant-col-xxl-order-14{order:14}.ant-col-xxl-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.ant-col-xxl-push-13{left:54.16666667%}.ant-col-xxl-pull-13{right:54.16666667%}.ant-col-xxl-offset-13{margin-left:54.16666667%}.ant-col-xxl-order-13{order:13}.ant-col-xxl-12{display:block;flex:0 0 50%;max-width:50%}.ant-col-xxl-push-12{left:50%}.ant-col-xxl-pull-12{right:50%}.ant-col-xxl-offset-12{margin-left:50%}.ant-col-xxl-order-12{order:12}.ant-col-xxl-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.ant-col-xxl-push-11{left:45.83333333%}.ant-col-xxl-pull-11{right:45.83333333%}.ant-col-xxl-offset-11{margin-left:45.83333333%}.ant-col-xxl-order-11{order:11}.ant-col-xxl-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.ant-col-xxl-push-10{left:41.66666667%}.ant-col-xxl-pull-10{right:41.66666667%}.ant-col-xxl-offset-10{margin-left:41.66666667%}.ant-col-xxl-order-10{order:10}.ant-col-xxl-9{display:block;flex:0 0 37.5%;max-width:37.5%}.ant-col-xxl-push-9{left:37.5%}.ant-col-xxl-pull-9{right:37.5%}.ant-col-xxl-offset-9{margin-left:37.5%}.ant-col-xxl-order-9{order:9}.ant-col-xxl-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.ant-col-xxl-push-8{left:33.33333333%}.ant-col-xxl-pull-8{right:33.33333333%}.ant-col-xxl-offset-8{margin-left:33.33333333%}.ant-col-xxl-order-8{order:8}.ant-col-xxl-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.ant-col-xxl-push-7{left:29.16666667%}.ant-col-xxl-pull-7{right:29.16666667%}.ant-col-xxl-offset-7{margin-left:29.16666667%}.ant-col-xxl-order-7{order:7}.ant-col-xxl-6{display:block;flex:0 0 25%;max-width:25%}.ant-col-xxl-push-6{left:25%}.ant-col-xxl-pull-6{right:25%}.ant-col-xxl-offset-6{margin-left:25%}.ant-col-xxl-order-6{order:6}.ant-col-xxl-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.ant-col-xxl-push-5{left:20.83333333%}.ant-col-xxl-pull-5{right:20.83333333%}.ant-col-xxl-offset-5{margin-left:20.83333333%}.ant-col-xxl-order-5{order:5}.ant-col-xxl-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.ant-col-xxl-push-4{left:16.66666667%}.ant-col-xxl-pull-4{right:16.66666667%}.ant-col-xxl-offset-4{margin-left:16.66666667%}.ant-col-xxl-order-4{order:4}.ant-col-xxl-3{display:block;flex:0 0 12.5%;max-width:12.5%}.ant-col-xxl-push-3{left:12.5%}.ant-col-xxl-pull-3{right:12.5%}.ant-col-xxl-offset-3{margin-left:12.5%}.ant-col-xxl-order-3{order:3}.ant-col-xxl-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.ant-col-xxl-push-2{left:8.33333333%}.ant-col-xxl-pull-2{right:8.33333333%}.ant-col-xxl-offset-2{margin-left:8.33333333%}.ant-col-xxl-order-2{order:2}.ant-col-xxl-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.ant-col-xxl-push-1{left:4.16666667%}.ant-col-xxl-pull-1{right:4.16666667%}.ant-col-xxl-offset-1{margin-left:4.16666667%}.ant-col-xxl-order-1{order:1}.ant-col-xxl-0{display:none}.ant-col-push-0{left:auto}.ant-col-pull-0{right:auto}.ant-col-xxl-push-0{left:auto}.ant-col-xxl-pull-0{right:auto}.ant-col-xxl-offset-0{margin-left:0}.ant-col-xxl-order-0{order:0}.ant-col-push-0.ant-col-rtl{right:auto}.ant-col-pull-0.ant-col-rtl{left:auto}.ant-col-xxl-push-0.ant-col-rtl{right:auto}.ant-col-xxl-pull-0.ant-col-rtl{left:auto}.ant-col-xxl-offset-0.ant-col-rtl{margin-right:0}.ant-col-xxl-push-1.ant-col-rtl{right:4.16666667%;left:auto}.ant-col-xxl-pull-1.ant-col-rtl{right:auto;left:4.16666667%}.ant-col-xxl-offset-1.ant-col-rtl{margin-right:4.16666667%;margin-left:0}.ant-col-xxl-push-2.ant-col-rtl{right:8.33333333%;left:auto}.ant-col-xxl-pull-2.ant-col-rtl{right:auto;left:8.33333333%}.ant-col-xxl-offset-2.ant-col-rtl{margin-right:8.33333333%;margin-left:0}.ant-col-xxl-push-3.ant-col-rtl{right:12.5%;left:auto}.ant-col-xxl-pull-3.ant-col-rtl{right:auto;left:12.5%}.ant-col-xxl-offset-3.ant-col-rtl{margin-right:12.5%;margin-left:0}.ant-col-xxl-push-4.ant-col-rtl{right:16.66666667%;left:auto}.ant-col-xxl-pull-4.ant-col-rtl{right:auto;left:16.66666667%}.ant-col-xxl-offset-4.ant-col-rtl{margin-right:16.66666667%;margin-left:0}.ant-col-xxl-push-5.ant-col-rtl{right:20.83333333%;left:auto}.ant-col-xxl-pull-5.ant-col-rtl{right:auto;left:20.83333333%}.ant-col-xxl-offset-5.ant-col-rtl{margin-right:20.83333333%;margin-left:0}.ant-col-xxl-push-6.ant-col-rtl{right:25%;left:auto}.ant-col-xxl-pull-6.ant-col-rtl{right:auto;left:25%}.ant-col-xxl-offset-6.ant-col-rtl{margin-right:25%;margin-left:0}.ant-col-xxl-push-7.ant-col-rtl{right:29.16666667%;left:auto}.ant-col-xxl-pull-7.ant-col-rtl{right:auto;left:29.16666667%}.ant-col-xxl-offset-7.ant-col-rtl{margin-right:29.16666667%;margin-left:0}.ant-col-xxl-push-8.ant-col-rtl{right:33.33333333%;left:auto}.ant-col-xxl-pull-8.ant-col-rtl{right:auto;left:33.33333333%}.ant-col-xxl-offset-8.ant-col-rtl{margin-right:33.33333333%;margin-left:0}.ant-col-xxl-push-9.ant-col-rtl{right:37.5%;left:auto}.ant-col-xxl-pull-9.ant-col-rtl{right:auto;left:37.5%}.ant-col-xxl-offset-9.ant-col-rtl{margin-right:37.5%;margin-left:0}.ant-col-xxl-push-10.ant-col-rtl{right:41.66666667%;left:auto}.ant-col-xxl-pull-10.ant-col-rtl{right:auto;left:41.66666667%}.ant-col-xxl-offset-10.ant-col-rtl{margin-right:41.66666667%;margin-left:0}.ant-col-xxl-push-11.ant-col-rtl{right:45.83333333%;left:auto}.ant-col-xxl-pull-11.ant-col-rtl{right:auto;left:45.83333333%}.ant-col-xxl-offset-11.ant-col-rtl{margin-right:45.83333333%;margin-left:0}.ant-col-xxl-push-12.ant-col-rtl{right:50%;left:auto}.ant-col-xxl-pull-12.ant-col-rtl{right:auto;left:50%}.ant-col-xxl-offset-12.ant-col-rtl{margin-right:50%;margin-left:0}.ant-col-xxl-push-13.ant-col-rtl{right:54.16666667%;left:auto}.ant-col-xxl-pull-13.ant-col-rtl{right:auto;left:54.16666667%}.ant-col-xxl-offset-13.ant-col-rtl{margin-right:54.16666667%;margin-left:0}.ant-col-xxl-push-14.ant-col-rtl{right:58.33333333%;left:auto}.ant-col-xxl-pull-14.ant-col-rtl{right:auto;left:58.33333333%}.ant-col-xxl-offset-14.ant-col-rtl{margin-right:58.33333333%;margin-left:0}.ant-col-xxl-push-15.ant-col-rtl{right:62.5%;left:auto}.ant-col-xxl-pull-15.ant-col-rtl{right:auto;left:62.5%}.ant-col-xxl-offset-15.ant-col-rtl{margin-right:62.5%;margin-left:0}.ant-col-xxl-push-16.ant-col-rtl{right:66.66666667%;left:auto}.ant-col-xxl-pull-16.ant-col-rtl{right:auto;left:66.66666667%}.ant-col-xxl-offset-16.ant-col-rtl{margin-right:66.66666667%;margin-left:0}.ant-col-xxl-push-17.ant-col-rtl{right:70.83333333%;left:auto}.ant-col-xxl-pull-17.ant-col-rtl{right:auto;left:70.83333333%}.ant-col-xxl-offset-17.ant-col-rtl{margin-right:70.83333333%;margin-left:0}.ant-col-xxl-push-18.ant-col-rtl{right:75%;left:auto}.ant-col-xxl-pull-18.ant-col-rtl{right:auto;left:75%}.ant-col-xxl-offset-18.ant-col-rtl{margin-right:75%;margin-left:0}.ant-col-xxl-push-19.ant-col-rtl{right:79.16666667%;left:auto}.ant-col-xxl-pull-19.ant-col-rtl{right:auto;left:79.16666667%}.ant-col-xxl-offset-19.ant-col-rtl{margin-right:79.16666667%;margin-left:0}.ant-col-xxl-push-20.ant-col-rtl{right:83.33333333%;left:auto}.ant-col-xxl-pull-20.ant-col-rtl{right:auto;left:83.33333333%}.ant-col-xxl-offset-20.ant-col-rtl{margin-right:83.33333333%;margin-left:0}.ant-col-xxl-push-21.ant-col-rtl{right:87.5%;left:auto}.ant-col-xxl-pull-21.ant-col-rtl{right:auto;left:87.5%}.ant-col-xxl-offset-21.ant-col-rtl{margin-right:87.5%;margin-left:0}.ant-col-xxl-push-22.ant-col-rtl{right:91.66666667%;left:auto}.ant-col-xxl-pull-22.ant-col-rtl{right:auto;left:91.66666667%}.ant-col-xxl-offset-22.ant-col-rtl{margin-right:91.66666667%;margin-left:0}.ant-col-xxl-push-23.ant-col-rtl{right:95.83333333%;left:auto}.ant-col-xxl-pull-23.ant-col-rtl{right:auto;left:95.83333333%}.ant-col-xxl-offset-23.ant-col-rtl{margin-right:95.83333333%;margin-left:0}.ant-col-xxl-push-24.ant-col-rtl{right:100%;left:auto}.ant-col-xxl-pull-24.ant-col-rtl{right:auto;left:100%}.ant-col-xxl-offset-24.ant-col-rtl{margin-right:100%;margin-left:0}}@media (min-width: 2000px){.ant-col-xxxl-24{display:block;flex:0 0 100%;max-width:100%}.ant-col-xxxl-push-24{left:100%}.ant-col-xxxl-pull-24{right:100%}.ant-col-xxxl-offset-24{margin-left:100%}.ant-col-xxxl-order-24{order:24}.ant-col-xxxl-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.ant-col-xxxl-push-23{left:95.83333333%}.ant-col-xxxl-pull-23{right:95.83333333%}.ant-col-xxxl-offset-23{margin-left:95.83333333%}.ant-col-xxxl-order-23{order:23}.ant-col-xxxl-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.ant-col-xxxl-push-22{left:91.66666667%}.ant-col-xxxl-pull-22{right:91.66666667%}.ant-col-xxxl-offset-22{margin-left:91.66666667%}.ant-col-xxxl-order-22{order:22}.ant-col-xxxl-21{display:block;flex:0 0 87.5%;max-width:87.5%}.ant-col-xxxl-push-21{left:87.5%}.ant-col-xxxl-pull-21{right:87.5%}.ant-col-xxxl-offset-21{margin-left:87.5%}.ant-col-xxxl-order-21{order:21}.ant-col-xxxl-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.ant-col-xxxl-push-20{left:83.33333333%}.ant-col-xxxl-pull-20{right:83.33333333%}.ant-col-xxxl-offset-20{margin-left:83.33333333%}.ant-col-xxxl-order-20{order:20}.ant-col-xxxl-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.ant-col-xxxl-push-19{left:79.16666667%}.ant-col-xxxl-pull-19{right:79.16666667%}.ant-col-xxxl-offset-19{margin-left:79.16666667%}.ant-col-xxxl-order-19{order:19}.ant-col-xxxl-18{display:block;flex:0 0 75%;max-width:75%}.ant-col-xxxl-push-18{left:75%}.ant-col-xxxl-pull-18{right:75%}.ant-col-xxxl-offset-18{margin-left:75%}.ant-col-xxxl-order-18{order:18}.ant-col-xxxl-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.ant-col-xxxl-push-17{left:70.83333333%}.ant-col-xxxl-pull-17{right:70.83333333%}.ant-col-xxxl-offset-17{margin-left:70.83333333%}.ant-col-xxxl-order-17{order:17}.ant-col-xxxl-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.ant-col-xxxl-push-16{left:66.66666667%}.ant-col-xxxl-pull-16{right:66.66666667%}.ant-col-xxxl-offset-16{margin-left:66.66666667%}.ant-col-xxxl-order-16{order:16}.ant-col-xxxl-15{display:block;flex:0 0 62.5%;max-width:62.5%}.ant-col-xxxl-push-15{left:62.5%}.ant-col-xxxl-pull-15{right:62.5%}.ant-col-xxxl-offset-15{margin-left:62.5%}.ant-col-xxxl-order-15{order:15}.ant-col-xxxl-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.ant-col-xxxl-push-14{left:58.33333333%}.ant-col-xxxl-pull-14{right:58.33333333%}.ant-col-xxxl-offset-14{margin-left:58.33333333%}.ant-col-xxxl-order-14{order:14}.ant-col-xxxl-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.ant-col-xxxl-push-13{left:54.16666667%}.ant-col-xxxl-pull-13{right:54.16666667%}.ant-col-xxxl-offset-13{margin-left:54.16666667%}.ant-col-xxxl-order-13{order:13}.ant-col-xxxl-12{display:block;flex:0 0 50%;max-width:50%}.ant-col-xxxl-push-12{left:50%}.ant-col-xxxl-pull-12{right:50%}.ant-col-xxxl-offset-12{margin-left:50%}.ant-col-xxxl-order-12{order:12}.ant-col-xxxl-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.ant-col-xxxl-push-11{left:45.83333333%}.ant-col-xxxl-pull-11{right:45.83333333%}.ant-col-xxxl-offset-11{margin-left:45.83333333%}.ant-col-xxxl-order-11{order:11}.ant-col-xxxl-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.ant-col-xxxl-push-10{left:41.66666667%}.ant-col-xxxl-pull-10{right:41.66666667%}.ant-col-xxxl-offset-10{margin-left:41.66666667%}.ant-col-xxxl-order-10{order:10}.ant-col-xxxl-9{display:block;flex:0 0 37.5%;max-width:37.5%}.ant-col-xxxl-push-9{left:37.5%}.ant-col-xxxl-pull-9{right:37.5%}.ant-col-xxxl-offset-9{margin-left:37.5%}.ant-col-xxxl-order-9{order:9}.ant-col-xxxl-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.ant-col-xxxl-push-8{left:33.33333333%}.ant-col-xxxl-pull-8{right:33.33333333%}.ant-col-xxxl-offset-8{margin-left:33.33333333%}.ant-col-xxxl-order-8{order:8}.ant-col-xxxl-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.ant-col-xxxl-push-7{left:29.16666667%}.ant-col-xxxl-pull-7{right:29.16666667%}.ant-col-xxxl-offset-7{margin-left:29.16666667%}.ant-col-xxxl-order-7{order:7}.ant-col-xxxl-6{display:block;flex:0 0 25%;max-width:25%}.ant-col-xxxl-push-6{left:25%}.ant-col-xxxl-pull-6{right:25%}.ant-col-xxxl-offset-6{margin-left:25%}.ant-col-xxxl-order-6{order:6}.ant-col-xxxl-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.ant-col-xxxl-push-5{left:20.83333333%}.ant-col-xxxl-pull-5{right:20.83333333%}.ant-col-xxxl-offset-5{margin-left:20.83333333%}.ant-col-xxxl-order-5{order:5}.ant-col-xxxl-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.ant-col-xxxl-push-4{left:16.66666667%}.ant-col-xxxl-pull-4{right:16.66666667%}.ant-col-xxxl-offset-4{margin-left:16.66666667%}.ant-col-xxxl-order-4{order:4}.ant-col-xxxl-3{display:block;flex:0 0 12.5%;max-width:12.5%}.ant-col-xxxl-push-3{left:12.5%}.ant-col-xxxl-pull-3{right:12.5%}.ant-col-xxxl-offset-3{margin-left:12.5%}.ant-col-xxxl-order-3{order:3}.ant-col-xxxl-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.ant-col-xxxl-push-2{left:8.33333333%}.ant-col-xxxl-pull-2{right:8.33333333%}.ant-col-xxxl-offset-2{margin-left:8.33333333%}.ant-col-xxxl-order-2{order:2}.ant-col-xxxl-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.ant-col-xxxl-push-1{left:4.16666667%}.ant-col-xxxl-pull-1{right:4.16666667%}.ant-col-xxxl-offset-1{margin-left:4.16666667%}.ant-col-xxxl-order-1{order:1}.ant-col-xxxl-0{display:none}.ant-col-push-0{left:auto}.ant-col-pull-0{right:auto}.ant-col-xxxl-push-0{left:auto}.ant-col-xxxl-pull-0{right:auto}.ant-col-xxxl-offset-0{margin-left:0}.ant-col-xxxl-order-0{order:0}.ant-col-push-0.ant-col-rtl{right:auto}.ant-col-pull-0.ant-col-rtl{left:auto}.ant-col-xxxl-push-0.ant-col-rtl{right:auto}.ant-col-xxxl-pull-0.ant-col-rtl{left:auto}.ant-col-xxxl-offset-0.ant-col-rtl{margin-right:0}.ant-col-xxxl-push-1.ant-col-rtl{right:4.16666667%;left:auto}.ant-col-xxxl-pull-1.ant-col-rtl{right:auto;left:4.16666667%}.ant-col-xxxl-offset-1.ant-col-rtl{margin-right:4.16666667%;margin-left:0}.ant-col-xxxl-push-2.ant-col-rtl{right:8.33333333%;left:auto}.ant-col-xxxl-pull-2.ant-col-rtl{right:auto;left:8.33333333%}.ant-col-xxxl-offset-2.ant-col-rtl{margin-right:8.33333333%;margin-left:0}.ant-col-xxxl-push-3.ant-col-rtl{right:12.5%;left:auto}.ant-col-xxxl-pull-3.ant-col-rtl{right:auto;left:12.5%}.ant-col-xxxl-offset-3.ant-col-rtl{margin-right:12.5%;margin-left:0}.ant-col-xxxl-push-4.ant-col-rtl{right:16.66666667%;left:auto}.ant-col-xxxl-pull-4.ant-col-rtl{right:auto;left:16.66666667%}.ant-col-xxxl-offset-4.ant-col-rtl{margin-right:16.66666667%;margin-left:0}.ant-col-xxxl-push-5.ant-col-rtl{right:20.83333333%;left:auto}.ant-col-xxxl-pull-5.ant-col-rtl{right:auto;left:20.83333333%}.ant-col-xxxl-offset-5.ant-col-rtl{margin-right:20.83333333%;margin-left:0}.ant-col-xxxl-push-6.ant-col-rtl{right:25%;left:auto}.ant-col-xxxl-pull-6.ant-col-rtl{right:auto;left:25%}.ant-col-xxxl-offset-6.ant-col-rtl{margin-right:25%;margin-left:0}.ant-col-xxxl-push-7.ant-col-rtl{right:29.16666667%;left:auto}.ant-col-xxxl-pull-7.ant-col-rtl{right:auto;left:29.16666667%}.ant-col-xxxl-offset-7.ant-col-rtl{margin-right:29.16666667%;margin-left:0}.ant-col-xxxl-push-8.ant-col-rtl{right:33.33333333%;left:auto}.ant-col-xxxl-pull-8.ant-col-rtl{right:auto;left:33.33333333%}.ant-col-xxxl-offset-8.ant-col-rtl{margin-right:33.33333333%;margin-left:0}.ant-col-xxxl-push-9.ant-col-rtl{right:37.5%;left:auto}.ant-col-xxxl-pull-9.ant-col-rtl{right:auto;left:37.5%}.ant-col-xxxl-offset-9.ant-col-rtl{margin-right:37.5%;margin-left:0}.ant-col-xxxl-push-10.ant-col-rtl{right:41.66666667%;left:auto}.ant-col-xxxl-pull-10.ant-col-rtl{right:auto;left:41.66666667%}.ant-col-xxxl-offset-10.ant-col-rtl{margin-right:41.66666667%;margin-left:0}.ant-col-xxxl-push-11.ant-col-rtl{right:45.83333333%;left:auto}.ant-col-xxxl-pull-11.ant-col-rtl{right:auto;left:45.83333333%}.ant-col-xxxl-offset-11.ant-col-rtl{margin-right:45.83333333%;margin-left:0}.ant-col-xxxl-push-12.ant-col-rtl{right:50%;left:auto}.ant-col-xxxl-pull-12.ant-col-rtl{right:auto;left:50%}.ant-col-xxxl-offset-12.ant-col-rtl{margin-right:50%;margin-left:0}.ant-col-xxxl-push-13.ant-col-rtl{right:54.16666667%;left:auto}.ant-col-xxxl-pull-13.ant-col-rtl{right:auto;left:54.16666667%}.ant-col-xxxl-offset-13.ant-col-rtl{margin-right:54.16666667%;margin-left:0}.ant-col-xxxl-push-14.ant-col-rtl{right:58.33333333%;left:auto}.ant-col-xxxl-pull-14.ant-col-rtl{right:auto;left:58.33333333%}.ant-col-xxxl-offset-14.ant-col-rtl{margin-right:58.33333333%;margin-left:0}.ant-col-xxxl-push-15.ant-col-rtl{right:62.5%;left:auto}.ant-col-xxxl-pull-15.ant-col-rtl{right:auto;left:62.5%}.ant-col-xxxl-offset-15.ant-col-rtl{margin-right:62.5%;margin-left:0}.ant-col-xxxl-push-16.ant-col-rtl{right:66.66666667%;left:auto}.ant-col-xxxl-pull-16.ant-col-rtl{right:auto;left:66.66666667%}.ant-col-xxxl-offset-16.ant-col-rtl{margin-right:66.66666667%;margin-left:0}.ant-col-xxxl-push-17.ant-col-rtl{right:70.83333333%;left:auto}.ant-col-xxxl-pull-17.ant-col-rtl{right:auto;left:70.83333333%}.ant-col-xxxl-offset-17.ant-col-rtl{margin-right:70.83333333%;margin-left:0}.ant-col-xxxl-push-18.ant-col-rtl{right:75%;left:auto}.ant-col-xxxl-pull-18.ant-col-rtl{right:auto;left:75%}.ant-col-xxxl-offset-18.ant-col-rtl{margin-right:75%;margin-left:0}.ant-col-xxxl-push-19.ant-col-rtl{right:79.16666667%;left:auto}.ant-col-xxxl-pull-19.ant-col-rtl{right:auto;left:79.16666667%}.ant-col-xxxl-offset-19.ant-col-rtl{margin-right:79.16666667%;margin-left:0}.ant-col-xxxl-push-20.ant-col-rtl{right:83.33333333%;left:auto}.ant-col-xxxl-pull-20.ant-col-rtl{right:auto;left:83.33333333%}.ant-col-xxxl-offset-20.ant-col-rtl{margin-right:83.33333333%;margin-left:0}.ant-col-xxxl-push-21.ant-col-rtl{right:87.5%;left:auto}.ant-col-xxxl-pull-21.ant-col-rtl{right:auto;left:87.5%}.ant-col-xxxl-offset-21.ant-col-rtl{margin-right:87.5%;margin-left:0}.ant-col-xxxl-push-22.ant-col-rtl{right:91.66666667%;left:auto}.ant-col-xxxl-pull-22.ant-col-rtl{right:auto;left:91.66666667%}.ant-col-xxxl-offset-22.ant-col-rtl{margin-right:91.66666667%;margin-left:0}.ant-col-xxxl-push-23.ant-col-rtl{right:95.83333333%;left:auto}.ant-col-xxxl-pull-23.ant-col-rtl{right:auto;left:95.83333333%}.ant-col-xxxl-offset-23.ant-col-rtl{margin-right:95.83333333%;margin-left:0}.ant-col-xxxl-push-24.ant-col-rtl{right:100%;left:auto}.ant-col-xxxl-pull-24.ant-col-rtl{right:auto;left:100%}.ant-col-xxxl-offset-24.ant-col-rtl{margin-right:100%;margin-left:0}}.ant-row-rtl{direction:rtl}.ant-image{position:relative;display:inline-block}.ant-image-img{width:100%;height:auto;vertical-align:middle}.ant-image-img-placeholder{background-color:#f5f5f5;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=);background-repeat:no-repeat;background-position:center center;background-size:30%}.ant-image-mask{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;color:#fff;background:#00000080;cursor:pointer;opacity:0;transition:opacity .3s}.ant-image-mask-info{padding:0 4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ant-image-mask-info .anticon{margin-inline-end:4px}.ant-image-mask:hover{opacity:1}.ant-image-placeholder{position:absolute;top:0;right:0;bottom:0;left:0}.ant-image-preview{pointer-events:none;height:100%;text-align:center}.ant-image-preview.ant-zoom-enter,.ant-image-preview.antzoom-appear{transform:none;opacity:0;animation-duration:.3s;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-image-preview-mask{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;height:100%;background-color:#00000073}.ant-image-preview-mask-hidden{display:none}.ant-image-preview-wrap{position:fixed;top:0;right:0;bottom:0;left:0;overflow:auto;outline:0;-webkit-overflow-scrolling:touch}.ant-image-preview-body{position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden}.ant-image-preview-img{max-width:100%;max-height:100%;vertical-align:middle;transform:scaleZ(1);cursor:grab;transition:transform .3s cubic-bezier(.215,.61,.355,1) 0s;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:auto}.ant-image-preview-img-wrapper{position:absolute;top:0;right:0;bottom:0;left:0;transition:transform .3s cubic-bezier(.215,.61,.355,1) 0s}.ant-image-preview-img-wrapper:before{display:inline-block;width:1px;height:50%;margin-right:-1px;content:""}.ant-image-preview-moving .ant-image-preview-img{cursor:grabbing}.ant-image-preview-moving .ant-image-preview-img-wrapper{transition-duration:0s}.ant-image-preview-wrap{z-index:1080}.ant-image-preview-operations{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;font-feature-settings:"tnum";position:absolute;top:0;right:0;z-index:1;display:flex;flex-direction:row-reverse;align-items:center;width:100%;color:#ffffffd9;list-style:none;background:#0000001a;pointer-events:auto}.ant-image-preview-operations-operation{margin-left:12px;padding:12px;cursor:pointer}.ant-image-preview-operations-operation-disabled{color:#ffffff40;pointer-events:none}.ant-image-preview-operations-operation:last-of-type{margin-left:0}.ant-image-preview-operations-icon{font-size:18px}.ant-image-preview-switch-left,.ant-image-preview-switch-right{position:absolute;top:50%;right:10px;z-index:1;display:flex;align-items:center;justify-content:center;width:44px;height:44px;margin-top:-22px;color:#ffffffd9;background:#0000001a;border-radius:50%;cursor:pointer;pointer-events:auto}.ant-image-preview-switch-left-disabled,.ant-image-preview-switch-right-disabled{color:#ffffff40;cursor:not-allowed}.ant-image-preview-switch-left-disabled>.anticon,.ant-image-preview-switch-right-disabled>.anticon{cursor:not-allowed}.ant-image-preview-switch-left>.anticon,.ant-image-preview-switch-right>.anticon{font-size:18px}.ant-image-preview-switch-left{left:10px}.ant-image-preview-switch-right{right:10px}.ant-input-affix-wrapper{position:relative;display:inline-block;width:100%;min-width:0;padding:10px;color:#000000d9;font-size:14px;line-height:1.5715;background-color:var(--c-canvas);background-image:none;border:1px solid #d9d9d9;border-radius:5px;transition:all .3s;display:inline-flex}.ant-input-affix-wrapper::-moz-placeholder{opacity:1}.ant-input-affix-wrapper::placeholder{color:#bfbfbf;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-input-affix-wrapper:-moz-placeholder{text-overflow:ellipsis}.ant-input-affix-wrapper:placeholder-shown{text-overflow:ellipsis}.ant-input-affix-wrapper:hover{border-color:#998165;border-right-width:1px!important}.ant-input-rtl .ant-input-affix-wrapper:hover{border-right-width:0;border-left-width:1px!important}.ant-input-affix-wrapper:focus,.ant-input-affix-wrapper-focused{border-color:#998165;box-shadow:0 0 0 2px #8d6a4633;border-right-width:1px!important;outline:0}.ant-input-rtl .ant-input-affix-wrapper:focus,.ant-input-rtl .ant-input-affix-wrapper-focused{border-right-width:0;border-left-width:1px!important}.ant-input-affix-wrapper-disabled{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;box-shadow:none;cursor:not-allowed;opacity:1}.ant-input-affix-wrapper-disabled:hover{border-color:#d9d9d9;border-right-width:1px!important}.ant-input-affix-wrapper[disabled]{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;box-shadow:none;cursor:not-allowed;opacity:1}.ant-input-affix-wrapper[disabled]:hover{border-color:#d9d9d9;border-right-width:1px!important}.ant-input-affix-wrapper-borderless,.ant-input-affix-wrapper-borderless:hover,.ant-input-affix-wrapper-borderless:focus,.ant-input-affix-wrapper-borderless-focused,.ant-input-affix-wrapper-borderless-disabled,.ant-input-affix-wrapper-borderless[disabled]{background-color:transparent;border:none;box-shadow:none}textarea.ant-input-affix-wrapper{max-width:100%;height:auto;min-height:32px;line-height:1.5715;vertical-align:bottom;transition:all .3s,height 0s}.ant-input-affix-wrapper-lg{padding:7.5px 11px;font-size:16px}.ant-input-affix-wrapper-sm{padding:0 7px}.ant-input-affix-wrapper-rtl{direction:rtl}.ant-input-affix-wrapper:not(.ant-input-affix-wrapper-disabled):hover{border-color:#998165;border-right-width:1px!important;z-index:1}.ant-input-rtl .ant-input-affix-wrapper:not(.ant-input-affix-wrapper-disabled):hover{border-right-width:0;border-left-width:1px!important}.ant-input-search-with-button .ant-input-affix-wrapper:not(.ant-input-affix-wrapper-disabled):hover{z-index:0}.ant-input-affix-wrapper-focused,.ant-input-affix-wrapper:focus{z-index:1}.ant-input-affix-wrapper-disabled .ant-input[disabled]{background:transparent}.ant-input-affix-wrapper>input.ant-input{padding:0;border:none;outline:none}.ant-input-affix-wrapper>input.ant-input:focus{box-shadow:none!important}.ant-input-affix-wrapper:before{width:0;visibility:hidden;content:" "}.ant-input-prefix,.ant-input-suffix{display:flex;flex:none;align-items:center}.ant-input-show-count-suffix{color:#00000073}.ant-input-show-count-has-suffix{margin-right:2px}.ant-input-prefix{margin-right:4px}.ant-input-suffix{margin-left:4px}.anticon.ant-input-clear-icon{margin:0;color:#00000040;font-size:12px;vertical-align:-1px;cursor:pointer;transition:color .3s}.anticon.ant-input-clear-icon:hover{color:#00000073}.anticon.ant-input-clear-icon:active{color:#000000d9}.anticon.ant-input-clear-icon-hidden{visibility:hidden}.anticon.ant-input-clear-icon-has-suffix{margin:0 4px}.ant-input-affix-wrapper-textarea-with-clear-btn{padding:0!important;border:0!important}.ant-input-affix-wrapper-textarea-with-clear-btn .ant-input-clear-icon{position:absolute;top:8px;right:8px;z-index:1}.ant-input{box-sizing:border-box;margin:0;font-variant:tabular-nums;list-style:none;font-feature-settings:"tnum";position:relative;display:inline-block;width:100%;min-width:0;padding:10px;color:#000000d9;font-size:14px;line-height:1.5715;background-color:var(--c-canvas);background-image:none;border:1px solid #d9d9d9;border-radius:5px;transition:all .3s}.ant-input::-moz-placeholder{opacity:1}.ant-input::placeholder{color:#bfbfbf;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-input:-moz-placeholder{text-overflow:ellipsis}.ant-input:placeholder-shown{text-overflow:ellipsis}.ant-input:hover{border-color:#998165;border-right-width:1px!important}.ant-input-rtl .ant-input:hover{border-right-width:0;border-left-width:1px!important}.ant-input:focus,.ant-input-focused{border-color:#998165;box-shadow:0 0 0 2px #8d6a4633;border-right-width:1px!important;outline:0}.ant-input-rtl .ant-input:focus,.ant-input-rtl .ant-input-focused{border-right-width:0;border-left-width:1px!important}.ant-input-disabled{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;box-shadow:none;cursor:not-allowed;opacity:1}.ant-input-disabled:hover{border-color:#d9d9d9;border-right-width:1px!important}.ant-input[disabled]{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;box-shadow:none;cursor:not-allowed;opacity:1}.ant-input[disabled]:hover{border-color:#d9d9d9;border-right-width:1px!important}.ant-input-borderless,.ant-input-borderless:hover,.ant-input-borderless:focus,.ant-input-borderless-focused,.ant-input-borderless-disabled,.ant-input-borderless[disabled]{background-color:transparent;border:none;box-shadow:none}textarea.ant-input{max-width:100%;height:auto;min-height:32px;line-height:1.5715;vertical-align:bottom;transition:all .3s,height 0s}.ant-input-lg{padding:7.5px 11px;font-size:16px}.ant-input-sm{padding:0 7px}.ant-input-rtl{direction:rtl}.ant-input-group{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:relative;display:table;width:100%;border-collapse:separate;border-spacing:0}.ant-input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.ant-input-group>[class*=col-]{padding-right:8px}.ant-input-group>[class*=col-]:last-child{padding-right:0}.ant-input-group-addon,.ant-input-group-wrap,.ant-input-group>.ant-input{display:table-cell}.ant-input-group-addon:not(:first-child):not(:last-child),.ant-input-group-wrap:not(:first-child):not(:last-child),.ant-input-group>.ant-input:not(:first-child):not(:last-child){border-radius:0}.ant-input-group-addon,.ant-input-group-wrap{width:1px;white-space:nowrap;vertical-align:middle}.ant-input-group-wrap>*{display:block!important}.ant-input-group .ant-input{float:left;width:100%;margin-bottom:0;text-align:inherit}.ant-input-group .ant-input:focus{z-index:1;border-right-width:1px}.ant-input-group .ant-input:hover{z-index:1;border-right-width:1px}.ant-input-search-with-button .ant-input-group .ant-input:hover{z-index:0}.ant-input-group-addon{position:relative;padding:0 10px;color:#000000d9;font-weight:400;font-size:14px;text-align:center;background-color:#fafafa;border:1px solid #d9d9d9;border-radius:5px;transition:all .3s}.ant-input-group-addon .ant-select{margin:-11px -10px}.ant-input-group-addon .ant-select.ant-select-single:not(.ant-select-customize-input) .ant-select-selector{background-color:inherit;border:1px solid transparent;box-shadow:none}.ant-input-group-addon .ant-select-open .ant-select-selector,.ant-input-group-addon .ant-select-focused .ant-select-selector{color:#8d6a46}.ant-input-group-addon .ant-cascader-picker{margin:-9px -12px;background-color:transparent}.ant-input-group-addon .ant-cascader-picker .ant-cascader-input{text-align:left;border:0;box-shadow:none}.ant-input-group>.ant-input:first-child,.ant-input-group-addon:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.ant-input-group>.ant-input:first-child .ant-select .ant-select-selector,.ant-input-group-addon:first-child .ant-select .ant-select-selector{border-top-right-radius:0;border-bottom-right-radius:0}.ant-input-group>.ant-input-affix-wrapper:not(:first-child) .ant-input{border-top-left-radius:0;border-bottom-left-radius:0}.ant-input-group>.ant-input-affix-wrapper:not(:last-child) .ant-input{border-top-right-radius:0;border-bottom-right-radius:0}.ant-input-group-addon:first-child{border-right:0}.ant-input-group-addon:last-child{border-left:0}.ant-input-group>.ant-input:last-child,.ant-input-group-addon:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.ant-input-group>.ant-input:last-child .ant-select .ant-select-selector,.ant-input-group-addon:last-child .ant-select .ant-select-selector{border-top-left-radius:0;border-bottom-left-radius:0}.ant-input-group-lg .ant-input,.ant-input-group-lg>.ant-input-group-addon{padding:7.5px 11px;font-size:16px}.ant-input-group-sm .ant-input,.ant-input-group-sm>.ant-input-group-addon{padding:0 7px}.ant-input-group-lg .ant-select-single .ant-select-selector{height:42px}.ant-input-group-sm .ant-select-single .ant-select-selector{height:24px}.ant-input-group .ant-input-affix-wrapper:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.ant-input-search .ant-input-group .ant-input-affix-wrapper:not(:last-child){border-top-left-radius:5px;border-bottom-left-radius:5px}.ant-input-group .ant-input-affix-wrapper:not(:first-child),.ant-input-search .ant-input-group .ant-input-affix-wrapper:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.ant-input-group.ant-input-group-compact{display:block}.ant-input-group.ant-input-group-compact:before{display:table;content:""}.ant-input-group.ant-input-group-compact:after{display:table;clear:both;content:""}.ant-input-group.ant-input-group-compact-addon:not(:first-child):not(:last-child),.ant-input-group.ant-input-group-compact-wrap:not(:first-child):not(:last-child),.ant-input-group.ant-input-group-compact>.ant-input:not(:first-child):not(:last-child){border-right-width:1px}.ant-input-group.ant-input-group-compact-addon:not(:first-child):not(:last-child):hover,.ant-input-group.ant-input-group-compact-wrap:not(:first-child):not(:last-child):hover,.ant-input-group.ant-input-group-compact>.ant-input:not(:first-child):not(:last-child):hover{z-index:1}.ant-input-group.ant-input-group-compact-addon:not(:first-child):not(:last-child):focus,.ant-input-group.ant-input-group-compact-wrap:not(:first-child):not(:last-child):focus,.ant-input-group.ant-input-group-compact>.ant-input:not(:first-child):not(:last-child):focus{z-index:1}.ant-input-group.ant-input-group-compact>*{display:inline-block;float:none;vertical-align:top;border-radius:0}.ant-input-group.ant-input-group-compact>.ant-input-affix-wrapper{display:inline-flex}.ant-input-group.ant-input-group-compact>.ant-picker-range{display:inline-flex}.ant-input-group.ant-input-group-compact>*:not(:last-child){margin-right:-1px;border-right-width:1px}.ant-input-group.ant-input-group-compact .ant-input{float:none}.ant-input-group.ant-input-group-compact>.ant-select>.ant-select-selector,.ant-input-group.ant-input-group-compact>.ant-select-auto-complete .ant-input,.ant-input-group.ant-input-group-compact>.ant-cascader-picker .ant-input,.ant-input-group.ant-input-group-compact>.ant-input-group-wrapper .ant-input{border-right-width:1px;border-radius:0}.ant-input-group.ant-input-group-compact>.ant-select>.ant-select-selector:hover,.ant-input-group.ant-input-group-compact>.ant-select-auto-complete .ant-input:hover,.ant-input-group.ant-input-group-compact>.ant-cascader-picker .ant-input:hover,.ant-input-group.ant-input-group-compact>.ant-input-group-wrapper .ant-input:hover{z-index:1}.ant-input-group.ant-input-group-compact>.ant-select>.ant-select-selector:focus,.ant-input-group.ant-input-group-compact>.ant-select-auto-complete .ant-input:focus,.ant-input-group.ant-input-group-compact>.ant-cascader-picker .ant-input:focus,.ant-input-group.ant-input-group-compact>.ant-input-group-wrapper .ant-input:focus{z-index:1}.ant-input-group.ant-input-group-compact>.ant-select-focused{z-index:1}.ant-input-group.ant-input-group-compact>.ant-select>.ant-select-arrow{z-index:1}.ant-input-group.ant-input-group-compact>*:first-child,.ant-input-group.ant-input-group-compact>.ant-select:first-child>.ant-select-selector,.ant-input-group.ant-input-group-compact>.ant-select-auto-complete:first-child .ant-input,.ant-input-group.ant-input-group-compact>.ant-cascader-picker:first-child .ant-input{border-top-left-radius:5px;border-bottom-left-radius:5px}.ant-input-group.ant-input-group-compact>*:last-child,.ant-input-group.ant-input-group-compact>.ant-select:last-child>.ant-select-selector,.ant-input-group.ant-input-group-compact>.ant-cascader-picker:last-child .ant-input,.ant-input-group.ant-input-group-compact>.ant-cascader-picker-focused:last-child .ant-input{border-right-width:1px;border-top-right-radius:5px;border-bottom-right-radius:5px}.ant-input-group.ant-input-group-compact>.ant-select-auto-complete .ant-input{vertical-align:top}.ant-input-group.ant-input-group-compact .ant-input-group-wrapper+.ant-input-group-wrapper{margin-left:-1px}.ant-input-group.ant-input-group-compact .ant-input-group-wrapper+.ant-input-group-wrapper .ant-input-affix-wrapper{border-radius:0}.ant-input-group.ant-input-group-compact .ant-input-group-wrapper:not(:last-child).ant-input-search>.ant-input-group>.ant-input-group-addon>.ant-input-search-button{border-radius:0}.ant-input-group.ant-input-group-compact .ant-input-group-wrapper:not(:last-child).ant-input-search>.ant-input-group>.ant-input{border-radius:5px 0 0 5px}.ant-input-group>.ant-input-rtl:first-child,.ant-input-group-rtl .ant-input-group-addon:first-child{border-radius:0 5px 5px 0}.ant-input-group-rtl .ant-input-group-addon:first-child{border-right:1px solid #d9d9d9;border-left:0}.ant-input-group-rtl .ant-input-group-addon:last-child{border-right:0;border-left:1px solid #d9d9d9}.ant-input-group-rtl.ant-input-group>.ant-input:last-child,.ant-input-group-rtl.ant-input-group-addon:last-child{border-radius:5px 0 0 5px}.ant-input-group-rtl.ant-input-group .ant-input-affix-wrapper:not(:first-child){border-radius:5px 0 0 5px}.ant-input-group-rtl.ant-input-group .ant-input-affix-wrapper:not(:last-child){border-radius:0 5px 5px 0}.ant-input-group-rtl.ant-input-group.ant-input-group-compact>*:not(:last-child){margin-right:0;margin-left:-1px;border-left-width:1px}.ant-input-group-rtl.ant-input-group.ant-input-group-compact>*:first-child,.ant-input-group-rtl.ant-input-group.ant-input-group-compact>.ant-select:first-child>.ant-select-selector,.ant-input-group-rtl.ant-input-group.ant-input-group-compact>.ant-select-auto-complete:first-child .ant-input,.ant-input-group-rtl.ant-input-group.ant-input-group-compact>.ant-cascader-picker:first-child .ant-input{border-radius:0 5px 5px 0}.ant-input-group-rtl.ant-input-group.ant-input-group-compact>*:last-child,.ant-input-group-rtl.ant-input-group.ant-input-group-compact>.ant-select:last-child>.ant-select-selector,.ant-input-group-rtl.ant-input-group.ant-input-group-compact>.ant-select-auto-complete:last-child .ant-input,.ant-input-group-rtl.ant-input-group.ant-input-group-compact>.ant-cascader-picker:last-child .ant-input,.ant-input-group-rtl.ant-input-group.ant-input-group-compact>.ant-cascader-picker-focused:last-child .ant-input{border-left-width:1px;border-radius:5px 0 0 5px}.ant-input-group.ant-input-group-compact .ant-input-group-wrapper-rtl+.ant-input-group-wrapper-rtl{margin-right:-1px;margin-left:0}.ant-input-group.ant-input-group-compact .ant-input-group-wrapper-rtl:not(:last-child).ant-input-search>.ant-input-group>.ant-input{border-radius:0 5px 5px 0}.ant-input-group-wrapper{display:inline-block;width:100%;text-align:start;vertical-align:top}.ant-input-password-icon{color:#00000073;cursor:pointer;transition:all .3s}.ant-input-password-icon:hover{color:#000000d9}.ant-input[type=color]{height:32px}.ant-input[type=color].ant-input-lg{height:42px}.ant-input[type=color].ant-input-sm{height:24px;padding-top:3px;padding-bottom:3px}.ant-input-textarea-show-count>.ant-input{height:100%}.ant-input-textarea-show-count:after{float:right;color:#00000073;white-space:nowrap;content:attr(data-count);pointer-events:none}.ant-input-search .ant-input:hover,.ant-input-search .ant-input:focus{border-color:#998165}.ant-input-search .ant-input:hover+.ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary),.ant-input-search .ant-input:focus+.ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary){border-left-color:#998165}.ant-input-search .ant-input-affix-wrapper{border-radius:0}.ant-input-search .ant-input-lg{line-height:1.5713}.ant-input-search>.ant-input-group>.ant-input-group-addon:last-child{left:-1px;padding:0;border:0}.ant-input-search>.ant-input-group>.ant-input-group-addon:last-child .ant-input-search-button{padding-top:0;padding-bottom:0;border-radius:0 5px 5px 0}.ant-input-search>.ant-input-group>.ant-input-group-addon:last-child .ant-input-search-button:not(.ant-btn-primary){color:#00000073}.ant-input-search>.ant-input-group>.ant-input-group-addon:last-child .ant-input-search-button:not(.ant-btn-primary).ant-btn-loading:before{top:0;right:0;bottom:0;left:0}.ant-input-search-button{height:32px}.ant-input-search-button:hover,.ant-input-search-button:focus{z-index:1}.ant-input-search-large .ant-input-search-button{height:42px}.ant-input-search-small .ant-input-search-button{height:24px}.ant-input-group-wrapper-rtl,.ant-input-group-rtl{direction:rtl}.ant-input-affix-wrapper.ant-input-affix-wrapper-rtl>input.ant-input{border:none;outline:none}.ant-input-affix-wrapper-rtl .ant-input-prefix{margin:0 0 0 4px}.ant-input-affix-wrapper-rtl .ant-input-suffix{margin:0 4px 0 0}.ant-input-textarea-rtl{direction:rtl}.ant-input-textarea-rtl.ant-input-textarea-show-count:after{text-align:left}.ant-input-affix-wrapper-rtl .ant-input-clear-icon-has-suffix{margin-right:0;margin-left:4px}.ant-input-affix-wrapper-rtl .ant-input-clear-icon{right:auto;left:8px}.ant-input-search-rtl{direction:rtl}.ant-input-search-rtl .ant-input:hover+.ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary),.ant-input-search-rtl .ant-input:focus+.ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary){border-right-color:#998165;border-left-color:#d9d9d9}.ant-input-search-rtl>.ant-input-group>.ant-input-affix-wrapper:hover,.ant-input-search-rtl>.ant-input-group>.ant-input-affix-wrapper-focused{border-right-color:#998165}.ant-input-search-rtl>.ant-input-group>.ant-input-group-addon{right:-1px;left:auto}.ant-input-search-rtl>.ant-input-group>.ant-input-group-addon .ant-input-search-button{border-radius:5px 0 0 5px}@media screen and (-ms-high-contrast: active),(-ms-high-contrast: none){.ant-input{height:32px}.ant-input-lg{height:42px}.ant-input-sm{height:24px}.ant-input-affix-wrapper>input.ant-input{height:auto}}.ant-input-number-affix-wrapper{position:relative;display:inline-block;width:100%;min-width:0;color:#000000d9;font-size:14px;line-height:1.5715;background-color:var(--c-canvas);background-image:none;border:1px solid #d9d9d9;border-radius:5px;transition:all .3s;position:static;display:inline-flex;width:90px;padding:0;padding-inline-start:10px}.ant-input-number-affix-wrapper::-moz-placeholder{opacity:1}.ant-input-number-affix-wrapper::placeholder{color:#bfbfbf;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-input-number-affix-wrapper:-moz-placeholder{text-overflow:ellipsis}.ant-input-number-affix-wrapper:placeholder-shown{text-overflow:ellipsis}.ant-input-number-affix-wrapper:hover{border-color:#998165;border-right-width:1px!important}.ant-input-rtl .ant-input-number-affix-wrapper:hover{border-right-width:0;border-left-width:1px!important}.ant-input-number-affix-wrapper:focus,.ant-input-number-affix-wrapper-focused{border-color:#998165;box-shadow:0 0 0 2px #8d6a4633;border-right-width:1px!important;outline:0}.ant-input-rtl .ant-input-number-affix-wrapper:focus,.ant-input-rtl .ant-input-number-affix-wrapper-focused{border-right-width:0;border-left-width:1px!important}.ant-input-number-affix-wrapper-disabled{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;box-shadow:none;cursor:not-allowed;opacity:1}.ant-input-number-affix-wrapper-disabled:hover{border-color:#d9d9d9;border-right-width:1px!important}.ant-input-number-affix-wrapper[disabled]{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;box-shadow:none;cursor:not-allowed;opacity:1}.ant-input-number-affix-wrapper[disabled]:hover{border-color:#d9d9d9;border-right-width:1px!important}.ant-input-number-affix-wrapper-borderless,.ant-input-number-affix-wrapper-borderless:hover,.ant-input-number-affix-wrapper-borderless:focus,.ant-input-number-affix-wrapper-borderless-focused,.ant-input-number-affix-wrapper-borderless-disabled,.ant-input-number-affix-wrapper-borderless[disabled]{background-color:transparent;border:none;box-shadow:none}textarea.ant-input-number-affix-wrapper{max-width:100%;height:auto;min-height:32px;line-height:1.5715;vertical-align:bottom;transition:all .3s,height 0s}.ant-input-number-affix-wrapper-lg{padding:7.5px 11px;font-size:16px}.ant-input-number-affix-wrapper-sm{padding:0 7px}.ant-input-number-affix-wrapper-rtl{direction:rtl}.ant-input-number-affix-wrapper:not(.ant-input-number-affix-wrapper-disabled):hover{border-color:#998165;border-right-width:1px!important;z-index:1}.ant-input-rtl .ant-input-number-affix-wrapper:not(.ant-input-number-affix-wrapper-disabled):hover{border-right-width:0;border-left-width:1px!important}.ant-input-number-affix-wrapper-focused,.ant-input-number-affix-wrapper:focus{z-index:1}.ant-input-number-affix-wrapper-disabled .ant-input-number[disabled]{background:transparent}.ant-input-number-affix-wrapper>div.ant-input-number{width:100%;border:none;outline:none}.ant-input-number-affix-wrapper>div.ant-input-number.ant-input-number-focused{box-shadow:none!important}.ant-input-number-affix-wrapper input.ant-input-number-input{padding:0}.ant-input-number-affix-wrapper:before{width:0;visibility:hidden;content:" "}.ant-input-number-prefix{display:flex;flex:none;align-items:center;margin-inline-end:4px}.ant-input-number-group-wrapper .ant-input-number-affix-wrapper{width:100%}.ant-input-number{box-sizing:border-box;font-variant:tabular-nums;list-style:none;font-feature-settings:"tnum";position:relative;width:100%;min-width:0;color:#000000d9;font-size:14px;line-height:1.5715;background-color:var(--c-canvas);background-image:none;transition:all .3s;display:inline-block;width:90px;margin:0;padding:0;border:1px solid #d9d9d9;border-radius:5px}.ant-input-number::-moz-placeholder{opacity:1}.ant-input-number::placeholder{color:#bfbfbf;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-input-number:-moz-placeholder{text-overflow:ellipsis}.ant-input-number:placeholder-shown{text-overflow:ellipsis}.ant-input-rtl .ant-input-number:hover{border-right-width:0;border-left-width:1px!important}.ant-input-number:focus,.ant-input-number-focused{border-color:#998165;box-shadow:0 0 0 2px #8d6a4633;border-right-width:1px!important;outline:0}.ant-input-rtl .ant-input-number:focus,.ant-input-rtl .ant-input-number-focused{border-right-width:0;border-left-width:1px!important}.ant-input-number[disabled]{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;box-shadow:none;cursor:not-allowed;opacity:1}.ant-input-number[disabled]:hover{border-color:#d9d9d9;border-right-width:1px!important}.ant-input-number-borderless,.ant-input-number-borderless:hover,.ant-input-number-borderless:focus,.ant-input-number-borderless-focused,.ant-input-number-borderless-disabled,.ant-input-number-borderless[disabled]{background-color:transparent;border:none;box-shadow:none}textarea.ant-input-number{max-width:100%;height:auto;min-height:32px;line-height:1.5715;vertical-align:bottom;transition:all .3s,height 0s}.ant-input-number-lg{padding:7.5px 11px;font-size:16px}.ant-input-number-sm{padding:0 7px}.ant-input-number-group{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:relative;display:table;width:100%;border-collapse:separate;border-spacing:0}.ant-input-number-group[class*=col-]{float:none;padding-right:0;padding-left:0}.ant-input-number-group>[class*=col-]{padding-right:8px}.ant-input-number-group>[class*=col-]:last-child{padding-right:0}.ant-input-number-group-addon,.ant-input-number-group-wrap,.ant-input-number-group>.ant-input-number{display:table-cell}.ant-input-number-group-addon:not(:first-child):not(:last-child),.ant-input-number-group-wrap:not(:first-child):not(:last-child),.ant-input-number-group>.ant-input-number:not(:first-child):not(:last-child){border-radius:0}.ant-input-number-group-addon,.ant-input-number-group-wrap{width:1px;white-space:nowrap;vertical-align:middle}.ant-input-number-group-wrap>*{display:block!important}.ant-input-number-group .ant-input-number{float:left;width:100%;margin-bottom:0;text-align:inherit}.ant-input-number-group .ant-input-number:focus{z-index:1;border-right-width:1px}.ant-input-number-group .ant-input-number:hover{z-index:1;border-right-width:1px}.ant-input-search-with-button .ant-input-number-group .ant-input-number:hover{z-index:0}.ant-input-number-group-addon{position:relative;padding:0 10px;color:#000000d9;font-weight:400;font-size:14px;text-align:center;background-color:#fafafa;border:1px solid #d9d9d9;border-radius:5px;transition:all .3s}.ant-input-number-group-addon .ant-select{margin:-11px -10px}.ant-input-number-group-addon .ant-select.ant-select-single:not(.ant-select-customize-input) .ant-select-selector{background-color:inherit;border:1px solid transparent;box-shadow:none}.ant-input-number-group-addon .ant-select-open .ant-select-selector,.ant-input-number-group-addon .ant-select-focused .ant-select-selector{color:#8d6a46}.ant-input-number-group-addon .ant-cascader-picker{margin:-9px -12px;background-color:transparent}.ant-input-number-group-addon .ant-cascader-picker .ant-cascader-input{text-align:left;border:0;box-shadow:none}.ant-input-number-group>.ant-input-number:first-child,.ant-input-number-group-addon:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.ant-input-number-group>.ant-input-number:first-child .ant-select .ant-select-selector,.ant-input-number-group-addon:first-child .ant-select .ant-select-selector{border-top-right-radius:0;border-bottom-right-radius:0}.ant-input-number-group>.ant-input-number-affix-wrapper:not(:first-child) .ant-input-number{border-top-left-radius:0;border-bottom-left-radius:0}.ant-input-number-group>.ant-input-number-affix-wrapper:not(:last-child) .ant-input-number{border-top-right-radius:0;border-bottom-right-radius:0}.ant-input-number-group-addon:first-child{border-right:0}.ant-input-number-group-addon:last-child{border-left:0}.ant-input-number-group>.ant-input-number:last-child,.ant-input-number-group-addon:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.ant-input-number-group>.ant-input-number:last-child .ant-select .ant-select-selector,.ant-input-number-group-addon:last-child .ant-select .ant-select-selector{border-top-left-radius:0;border-bottom-left-radius:0}.ant-input-number-group-lg .ant-input-number,.ant-input-number-group-lg>.ant-input-number-group-addon{padding:7.5px 11px;font-size:16px}.ant-input-number-group-sm .ant-input-number,.ant-input-number-group-sm>.ant-input-number-group-addon{padding:0 7px}.ant-input-number-group-lg .ant-select-single .ant-select-selector{height:42px}.ant-input-number-group-sm .ant-select-single .ant-select-selector{height:24px}.ant-input-number-group .ant-input-number-affix-wrapper:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.ant-input-search .ant-input-number-group .ant-input-number-affix-wrapper:not(:last-child){border-top-left-radius:5px;border-bottom-left-radius:5px}.ant-input-number-group .ant-input-number-affix-wrapper:not(:first-child),.ant-input-search .ant-input-number-group .ant-input-number-affix-wrapper:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.ant-input-number-group.ant-input-number-group-compact{display:block}.ant-input-number-group.ant-input-number-group-compact:before{display:table;content:""}.ant-input-number-group.ant-input-number-group-compact:after{display:table;clear:both;content:""}.ant-input-number-group.ant-input-number-group-compact-addon:not(:first-child):not(:last-child),.ant-input-number-group.ant-input-number-group-compact-wrap:not(:first-child):not(:last-child),.ant-input-number-group.ant-input-number-group-compact>.ant-input-number:not(:first-child):not(:last-child){border-right-width:1px}.ant-input-number-group.ant-input-number-group-compact-addon:not(:first-child):not(:last-child):hover,.ant-input-number-group.ant-input-number-group-compact-wrap:not(:first-child):not(:last-child):hover,.ant-input-number-group.ant-input-number-group-compact>.ant-input-number:not(:first-child):not(:last-child):hover{z-index:1}.ant-input-number-group.ant-input-number-group-compact-addon:not(:first-child):not(:last-child):focus,.ant-input-number-group.ant-input-number-group-compact-wrap:not(:first-child):not(:last-child):focus,.ant-input-number-group.ant-input-number-group-compact>.ant-input-number:not(:first-child):not(:last-child):focus{z-index:1}.ant-input-number-group.ant-input-number-group-compact>*{display:inline-block;float:none;vertical-align:top;border-radius:0}.ant-input-number-group.ant-input-number-group-compact>.ant-input-number-affix-wrapper{display:inline-flex}.ant-input-number-group.ant-input-number-group-compact>.ant-picker-range{display:inline-flex}.ant-input-number-group.ant-input-number-group-compact>*:not(:last-child){margin-right:-1px;border-right-width:1px}.ant-input-number-group.ant-input-number-group-compact .ant-input-number{float:none}.ant-input-number-group.ant-input-number-group-compact>.ant-select>.ant-select-selector,.ant-input-number-group.ant-input-number-group-compact>.ant-select-auto-complete .ant-input,.ant-input-number-group.ant-input-number-group-compact>.ant-cascader-picker .ant-input,.ant-input-number-group.ant-input-number-group-compact>.ant-input-group-wrapper .ant-input{border-right-width:1px;border-radius:0}.ant-input-number-group.ant-input-number-group-compact>.ant-select>.ant-select-selector:hover,.ant-input-number-group.ant-input-number-group-compact>.ant-select-auto-complete .ant-input:hover,.ant-input-number-group.ant-input-number-group-compact>.ant-cascader-picker .ant-input:hover,.ant-input-number-group.ant-input-number-group-compact>.ant-input-group-wrapper .ant-input:hover{z-index:1}.ant-input-number-group.ant-input-number-group-compact>.ant-select>.ant-select-selector:focus,.ant-input-number-group.ant-input-number-group-compact>.ant-select-auto-complete .ant-input:focus,.ant-input-number-group.ant-input-number-group-compact>.ant-cascader-picker .ant-input:focus,.ant-input-number-group.ant-input-number-group-compact>.ant-input-group-wrapper .ant-input:focus{z-index:1}.ant-input-number-group.ant-input-number-group-compact>.ant-select-focused{z-index:1}.ant-input-number-group.ant-input-number-group-compact>.ant-select>.ant-select-arrow{z-index:1}.ant-input-number-group.ant-input-number-group-compact>*:first-child,.ant-input-number-group.ant-input-number-group-compact>.ant-select:first-child>.ant-select-selector,.ant-input-number-group.ant-input-number-group-compact>.ant-select-auto-complete:first-child .ant-input,.ant-input-number-group.ant-input-number-group-compact>.ant-cascader-picker:first-child .ant-input{border-top-left-radius:5px;border-bottom-left-radius:5px}.ant-input-number-group.ant-input-number-group-compact>*:last-child,.ant-input-number-group.ant-input-number-group-compact>.ant-select:last-child>.ant-select-selector,.ant-input-number-group.ant-input-number-group-compact>.ant-cascader-picker:last-child .ant-input,.ant-input-number-group.ant-input-number-group-compact>.ant-cascader-picker-focused:last-child .ant-input{border-right-width:1px;border-top-right-radius:5px;border-bottom-right-radius:5px}.ant-input-number-group.ant-input-number-group-compact>.ant-select-auto-complete .ant-input{vertical-align:top}.ant-input-number-group.ant-input-number-group-compact .ant-input-group-wrapper+.ant-input-group-wrapper{margin-left:-1px}.ant-input-number-group.ant-input-number-group-compact .ant-input-group-wrapper+.ant-input-group-wrapper .ant-input-affix-wrapper{border-radius:0}.ant-input-number-group.ant-input-number-group-compact .ant-input-group-wrapper:not(:last-child).ant-input-search>.ant-input-group>.ant-input-group-addon>.ant-input-search-button{border-radius:0}.ant-input-number-group.ant-input-number-group-compact .ant-input-group-wrapper:not(:last-child).ant-input-search>.ant-input-group>.ant-input{border-radius:5px 0 0 5px}.ant-input-number-group>.ant-input-number-rtl:first-child,.ant-input-number-group-rtl .ant-input-number-group-addon:first-child{border-radius:0 5px 5px 0}.ant-input-number-group-rtl .ant-input-number-group-addon:first-child{border-right:1px solid #d9d9d9;border-left:0}.ant-input-number-group-rtl .ant-input-number-group-addon:last-child{border-right:0;border-left:1px solid #d9d9d9}.ant-input-number-group-rtl.ant-input-number-group>.ant-input-number:last-child,.ant-input-number-group-rtl.ant-input-number-group-addon:last-child{border-radius:5px 0 0 5px}.ant-input-number-group-rtl.ant-input-number-group .ant-input-number-affix-wrapper:not(:first-child){border-radius:5px 0 0 5px}.ant-input-number-group-rtl.ant-input-number-group .ant-input-number-affix-wrapper:not(:last-child){border-radius:0 5px 5px 0}.ant-input-number-group-rtl.ant-input-number-group.ant-input-number-group-compact>*:not(:last-child){margin-right:0;margin-left:-1px;border-left-width:1px}.ant-input-number-group-rtl.ant-input-number-group.ant-input-number-group-compact>*:first-child,.ant-input-number-group-rtl.ant-input-number-group.ant-input-number-group-compact>.ant-select:first-child>.ant-select-selector,.ant-input-number-group-rtl.ant-input-number-group.ant-input-number-group-compact>.ant-select-auto-complete:first-child .ant-input,.ant-input-number-group-rtl.ant-input-number-group.ant-input-number-group-compact>.ant-cascader-picker:first-child .ant-input{border-radius:0 5px 5px 0}.ant-input-number-group-rtl.ant-input-number-group.ant-input-number-group-compact>*:last-child,.ant-input-number-group-rtl.ant-input-number-group.ant-input-number-group-compact>.ant-select:last-child>.ant-select-selector,.ant-input-number-group-rtl.ant-input-number-group.ant-input-number-group-compact>.ant-select-auto-complete:last-child .ant-input,.ant-input-number-group-rtl.ant-input-number-group.ant-input-number-group-compact>.ant-cascader-picker:last-child .ant-input,.ant-input-number-group-rtl.ant-input-number-group.ant-input-number-group-compact>.ant-cascader-picker-focused:last-child .ant-input{border-left-width:1px;border-radius:5px 0 0 5px}.ant-input-number-group.ant-input-number-group-compact .ant-input-group-wrapper-rtl+.ant-input-group-wrapper-rtl{margin-right:-1px;margin-left:0}.ant-input-number-group.ant-input-number-group-compact .ant-input-group-wrapper-rtl:not(:last-child).ant-input-search>.ant-input-group>.ant-input{border-radius:0 5px 5px 0}.ant-input-number-group-wrapper{display:inline-block;text-align:start;vertical-align:top}.ant-input-number-handler{position:relative;display:block;width:100%;height:50%;overflow:hidden;color:#00000073;font-weight:700;line-height:0;text-align:center;border-left:1px solid #d9d9d9;transition:all .1s linear}.ant-input-number-handler:active{background:#f4f4f4}.ant-input-number-handler:hover .ant-input-number-handler-up-inner,.ant-input-number-handler:hover .ant-input-number-handler-down-inner{color:#998165}.ant-input-number-handler-up-inner,.ant-input-number-handler-down-inner{display:inline-block;color:inherit;font-style:normal;line-height:0;text-align:center;text-transform:none;vertical-align:-.125em;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:absolute;right:4px;width:12px;height:12px;color:#00000073;line-height:12px;transition:all .1s linear;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-input-number-handler-up-inner>*,.ant-input-number-handler-down-inner>*{line-height:1}.ant-input-number-handler-up-inner svg,.ant-input-number-handler-down-inner svg{display:inline-block}.ant-input-number-handler-up-inner:before,.ant-input-number-handler-down-inner:before{display:none}.ant-input-number-handler-up-inner .ant-input-number-handler-up-inner-icon,.ant-input-number-handler-up-inner .ant-input-number-handler-down-inner-icon,.ant-input-number-handler-down-inner .ant-input-number-handler-up-inner-icon,.ant-input-number-handler-down-inner .ant-input-number-handler-down-inner-icon{display:block}.ant-input-number:hover{border-color:#998165;border-right-width:1px!important}.ant-input-number:hover+.ant-form-item-children-icon{opacity:0;transition:opacity .24s linear .24s}.ant-input-number-focused{border-color:#998165;box-shadow:0 0 0 2px #8d6a4633;border-right-width:1px!important;outline:0}.ant-input-rtl .ant-input-number-focused{border-right-width:0;border-left-width:1px!important}.ant-input-number-disabled{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;box-shadow:none;cursor:not-allowed;opacity:1}.ant-input-number-disabled:hover{border-color:#d9d9d9;border-right-width:1px!important}.ant-input-number-disabled .ant-input-number-input{cursor:not-allowed}.ant-input-number-disabled .ant-input-number-handler-wrap,.ant-input-number-readonly .ant-input-number-handler-wrap{display:none}.ant-input-number-input{width:100%;height:30px;padding:0 11px;text-align:left;background-color:transparent;border:0;border-radius:5px;outline:0;transition:all .3s linear;-webkit-appearance:textfield!important;-moz-appearance:textfield!important;appearance:textfield!important}.ant-input-number-input::-moz-placeholder{opacity:1}.ant-input-number-input::placeholder{color:#bfbfbf;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-input-number-input:-moz-placeholder{text-overflow:ellipsis}.ant-input-number-input:placeholder-shown{text-overflow:ellipsis}.ant-input-number-input[type=number]::-webkit-inner-spin-button,.ant-input-number-input[type=number]::-webkit-outer-spin-button{margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.ant-input-number-lg{padding:0;font-size:16px}.ant-input-number-lg input{height:40px}.ant-input-number-sm{padding:0}.ant-input-number-sm input{height:22px;padding:0 7px}.ant-input-number-handler-wrap{position:absolute;top:0;right:0;width:22px;height:100%;background:var(--c-canvas);border-radius:0 5px 5px 0;opacity:0;transition:opacity .24s linear .1s}.ant-input-number-handler-wrap .ant-input-number-handler .ant-input-number-handler-up-inner,.ant-input-number-handler-wrap .ant-input-number-handler .ant-input-number-handler-down-inner{display:flex;align-items:center;justify-content:center;min-width:auto;margin-right:0;font-size:7px}.ant-input-number-borderless .ant-input-number-handler-wrap{border-left-width:0}.ant-input-number-handler-wrap:hover .ant-input-number-handler{height:40%}.ant-input-number:hover .ant-input-number-handler-wrap,.ant-input-number-focused .ant-input-number-handler-wrap{opacity:1}.ant-input-number-handler-up{border-top-right-radius:5px;cursor:pointer}.ant-input-number-handler-up-inner{top:50%;margin-top:-5px;text-align:center}.ant-input-number-handler-up:hover{height:60%!important}.ant-input-number-handler-down{top:0;border-top:1px solid #d9d9d9;border-bottom-right-radius:5px;cursor:pointer}.ant-input-number-handler-down-inner{top:50%;text-align:center;transform:translateY(-50%)}.ant-input-number-handler-down:hover{height:60%!important}.ant-input-number-borderless .ant-input-number-handler-down{border-top-width:0}.ant-input-number-handler-up-disabled,.ant-input-number-handler-down-disabled{cursor:not-allowed}.ant-input-number-handler-up-disabled:hover .ant-input-number-handler-up-inner,.ant-input-number-handler-down-disabled:hover .ant-input-number-handler-down-inner{color:#00000040}.ant-input-number-borderless{box-shadow:none}.ant-input-number-out-of-range input{color:#e31a1a}.ant-input-number-rtl{direction:rtl}.ant-input-number-rtl .ant-input-number-handler{border-right:1px solid #d9d9d9;border-left:0}.ant-input-number-rtl .ant-input-number-handler-wrap{right:auto;left:0}.ant-input-number-rtl.ant-input-number-borderless .ant-input-number-handler-wrap{border-right-width:0}.ant-input-number-rtl .ant-input-number-handler-up{border-top-right-radius:0}.ant-input-number-rtl .ant-input-number-handler-down{border-bottom-right-radius:0}.ant-input-number-rtl .ant-input-number-input{direction:ltr;text-align:right}.ant-layout{display:flex;flex:auto;flex-direction:column;min-height:0;background:#f0f2f5}.ant-layout,.ant-layout *{box-sizing:border-box}.ant-layout.ant-layout-has-sider{flex-direction:row}.ant-layout.ant-layout-has-sider>.ant-layout,.ant-layout.ant-layout-has-sider>.ant-layout-content{width:0}.ant-layout-header,.ant-layout-footer{flex:0 0 auto}.ant-layout-header{height:64px;padding:0 50px;color:#000000d9;line-height:64px;background:#001529}.ant-layout-footer{padding:24px 50px;color:#000000d9;font-size:14px;background:#f0f2f5}.ant-layout-content{flex:auto;min-height:0}.ant-layout-sider{position:relative;min-width:0;background:#001529;transition:all .2s}.ant-layout-sider-children{height:100%;margin-top:-.1px;padding-top:.1px}.ant-layout-sider-children .ant-menu.ant-menu-inline-collapsed{width:auto}.ant-layout-sider-has-trigger{padding-bottom:48px}.ant-layout-sider-right{order:1}.ant-layout-sider-trigger{position:fixed;bottom:0;z-index:1;height:48px;color:#fff;line-height:48px;text-align:center;background:#002140;cursor:pointer;transition:all .2s}.ant-layout-sider-zero-width>*{overflow:hidden}.ant-layout-sider-zero-width-trigger{position:absolute;top:64px;right:-36px;z-index:1;width:36px;height:42px;color:#fff;font-size:18px;line-height:42px;text-align:center;background:#001529;border-radius:0 5px 5px 0;cursor:pointer;transition:background .3s ease}.ant-layout-sider-zero-width-trigger:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;transition:all .3s;content:""}.ant-layout-sider-zero-width-trigger:hover:after{background:#ffffff1a}.ant-layout-sider-zero-width-trigger-right{left:-36px;border-radius:5px 0 0 5px}.ant-layout-sider-light{background:#fff}.ant-layout-sider-light .ant-layout-sider-trigger,.ant-layout-sider-light .ant-layout-sider-zero-width-trigger{color:#000000d9;background:#fff}.ant-layout-rtl{direction:rtl}.ant-list{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:relative}.ant-list *{outline:none}.ant-list-pagination{margin-top:24px;text-align:right}.ant-list-pagination .ant-pagination-options{text-align:left}.ant-list-more{margin-top:12px;text-align:center}.ant-list-more button{padding-right:32px;padding-left:32px}.ant-list-spin{min-height:40px;text-align:center}.ant-list-empty-text{padding:16px;color:#00000040;font-size:14px;text-align:center}.ant-list-items{margin:0;padding:0;list-style:none}.ant-list-item{display:flex;align-items:center;justify-content:space-between;padding:12px 0;color:#000000d9}.ant-list-item-meta{display:flex;flex:1;align-items:flex-start;max-width:100%}.ant-list-item-meta-avatar{margin-right:16px}.ant-list-item-meta-content{flex:1 0;width:0;color:#000000d9}.ant-list-item-meta-title{margin-bottom:4px;color:#000000d9;font-size:14px;line-height:1.5715}.ant-list-item-meta-title>a{color:#000000d9;transition:all .3s}.ant-list-item-meta-title>a:hover{color:#8d6a46}.ant-list-item-meta-description{color:#00000073;font-size:14px;line-height:1.5715}.ant-list-item-action{flex:0 0 auto;margin-left:48px;padding:0;font-size:0;list-style:none}.ant-list-item-action>li{position:relative;display:inline-block;padding:0 8px;color:#00000073;font-size:14px;line-height:1.5715;text-align:center}.ant-list-item-action>li:first-child{padding-left:0}.ant-list-item-action-split{position:absolute;top:50%;right:0;width:1px;height:14px;margin-top:-7px;background-color:#f0f0f0}.ant-list-header,.ant-list-footer{background:transparent}.ant-list-header,.ant-list-footer{padding-top:12px;padding-bottom:12px}.ant-list-empty{padding:16px 0;color:#00000073;font-size:12px;text-align:center}.ant-list-split .ant-list-item{border-bottom:1px solid #f0f0f0}.ant-list-split .ant-list-item:last-child{border-bottom:none}.ant-list-split .ant-list-header{border-bottom:1px solid #f0f0f0}.ant-list-split.ant-list-empty .ant-list-footer{border-top:1px solid #f0f0f0}.ant-list-loading .ant-list-spin-nested-loading{min-height:32px}.ant-list-split.ant-list-something-after-last-item .ant-spin-container>.ant-list-items>.ant-list-item:last-child{border-bottom:1px solid #f0f0f0}.ant-list-lg .ant-list-item{padding:16px 24px}.ant-list-sm .ant-list-item{padding:8px 16px}.ant-list-vertical .ant-list-item{align-items:initial}.ant-list-vertical .ant-list-item-main{display:block;flex:1}.ant-list-vertical .ant-list-item-extra{margin-left:40px}.ant-list-vertical .ant-list-item-meta{margin-bottom:16px}.ant-list-vertical .ant-list-item-meta-title{margin-bottom:12px;color:#1c2d56;font-size:16px;line-height:24px}.ant-list-vertical .ant-list-item-action{margin-top:16px;margin-left:auto}.ant-list-vertical .ant-list-item-action>li{padding:0 16px}.ant-list-vertical .ant-list-item-action>li:first-child{padding-left:0}.ant-list-grid .ant-col>.ant-list-item{display:block;max-width:100%;margin-bottom:16px;padding-top:0;padding-bottom:0;border-bottom:none}.ant-list-item-no-flex{display:block}.ant-list:not(.ant-list-vertical) .ant-list-item-no-flex .ant-list-item-action{float:right}.ant-list-bordered{border:1px solid #d9d9d9;border-radius:5px}.ant-list-bordered .ant-list-header,.ant-list-bordered .ant-list-footer,.ant-list-bordered .ant-list-item{padding-right:24px;padding-left:24px}.ant-list-bordered .ant-list-pagination{margin:16px 24px}.ant-list-bordered.ant-list-sm .ant-list-item,.ant-list-bordered.ant-list-sm .ant-list-header,.ant-list-bordered.ant-list-sm .ant-list-footer{padding:8px 16px}.ant-list-bordered.ant-list-lg .ant-list-item,.ant-list-bordered.ant-list-lg .ant-list-header,.ant-list-bordered.ant-list-lg .ant-list-footer{padding:16px 24px}@media screen and (max-width: 768px){.ant-list-item-action,.ant-list-vertical .ant-list-item-extra{margin-left:24px}}@media screen and (max-width: 576px){.ant-list-item{flex-wrap:wrap}.ant-list-item-action{margin-left:12px}.ant-list-vertical .ant-list-item{flex-wrap:wrap-reverse}.ant-list-vertical .ant-list-item-main{min-width:220px}.ant-list-vertical .ant-list-item-extra{margin:auto auto 16px}}.ant-list-rtl{direction:rtl;text-align:right}.ant-list-rtl .ReactVirtualized__List .ant-list-item{direction:rtl}.ant-list-rtl .ant-list-pagination{text-align:left}.ant-list-rtl .ant-list-item-meta-avatar{margin-right:0;margin-left:16px}.ant-list-rtl .ant-list-item-action{margin-right:48px;margin-left:0}.ant-list.ant-list-rtl .ant-list-item-action>li:first-child{padding-right:0;padding-left:16px}.ant-list-rtl .ant-list-item-action-split{right:auto;left:0}.ant-list-rtl.ant-list-vertical .ant-list-item-extra{margin-right:40px;margin-left:0}.ant-list-rtl.ant-list-vertical .ant-list-item-action{margin-right:auto}.ant-list-rtl .ant-list-vertical .ant-list-item-action>li:first-child{padding-right:0;padding-left:16px}.ant-list-rtl .ant-list:not(.ant-list-vertical) .ant-list-item-no-flex .ant-list-item-action{float:left}@media screen and (max-width: 768px){.ant-list-rtl .ant-list-item-action,.ant-list-rtl .ant-list-vertical .ant-list-item-extra{margin-right:24px;margin-left:0}}@media screen and (max-width: 576px){.ant-list-rtl .ant-list-item-action{margin-right:22px;margin-left:0}.ant-list-rtl.ant-list-vertical .ant-list-item-extra{margin:auto auto 16px}}.ant-mentions{box-sizing:border-box;margin:0;font-variant:tabular-nums;list-style:none;font-feature-settings:"tnum";width:100%;min-width:0;color:#000000d9;font-size:14px;background-color:var(--c-canvas);background-image:none;border:1px solid #d9d9d9;border-radius:5px;transition:all .3s;position:relative;display:inline-block;height:auto;padding:0;overflow:hidden;line-height:1.5715;white-space:pre-wrap;vertical-align:bottom}.ant-mentions::-moz-placeholder{opacity:1}.ant-mentions::placeholder{color:#bfbfbf;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-mentions:-moz-placeholder{text-overflow:ellipsis}.ant-mentions:placeholder-shown{text-overflow:ellipsis}.ant-mentions:hover{border-color:#998165;border-right-width:1px!important}.ant-input-rtl .ant-mentions:hover{border-right-width:0;border-left-width:1px!important}.ant-mentions:focus,.ant-mentions-focused{border-color:#998165;box-shadow:0 0 0 2px #8d6a4633;border-right-width:1px!important;outline:0}.ant-input-rtl .ant-mentions:focus,.ant-input-rtl .ant-mentions-focused{border-right-width:0;border-left-width:1px!important}.ant-mentions-disabled{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;box-shadow:none;cursor:not-allowed;opacity:1}.ant-mentions-disabled:hover{border-color:#d9d9d9;border-right-width:1px!important}.ant-mentions[disabled]{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;box-shadow:none;cursor:not-allowed;opacity:1}.ant-mentions[disabled]:hover{border-color:#d9d9d9;border-right-width:1px!important}.ant-mentions-borderless,.ant-mentions-borderless:hover,.ant-mentions-borderless:focus,.ant-mentions-borderless-focused,.ant-mentions-borderless-disabled,.ant-mentions-borderless[disabled]{background-color:transparent;border:none;box-shadow:none}textarea.ant-mentions{max-width:100%;height:auto;min-height:32px;line-height:1.5715;vertical-align:bottom;transition:all .3s,height 0s}.ant-mentions-lg{padding:7.5px 11px;font-size:16px}.ant-mentions-sm{padding:0 7px}.ant-mentions-disabled>textarea{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;box-shadow:none;cursor:not-allowed;opacity:1}.ant-mentions-disabled>textarea:hover{border-color:#d9d9d9;border-right-width:1px!important}.ant-mentions-focused{border-color:#998165;box-shadow:0 0 0 2px #8d6a4633;border-right-width:1px!important;outline:0}.ant-input-rtl .ant-mentions-focused{border-right-width:0;border-left-width:1px!important}.ant-mentions>textarea,.ant-mentions-measure{min-height:30px;margin:0;padding:10px;overflow:inherit;overflow-x:hidden;overflow-y:auto;font-weight:inherit;font-size:inherit;font-family:inherit;font-style:inherit;font-variant:inherit;font-size-adjust:inherit;font-stretch:inherit;line-height:inherit;direction:inherit;letter-spacing:inherit;white-space:inherit;text-align:inherit;vertical-align:top;word-wrap:break-word;word-break:inherit;-moz-tab-size:inherit;-o-tab-size:inherit;tab-size:inherit}.ant-mentions>textarea{width:100%;border:none;outline:none;resize:none}.ant-mentions>textarea::-moz-placeholder{opacity:1}.ant-mentions>textarea::placeholder{color:#bfbfbf;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-mentions>textarea:-moz-placeholder{text-overflow:ellipsis}.ant-mentions>textarea:placeholder-shown{text-overflow:ellipsis}.ant-mentions-measure{position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1;color:transparent;pointer-events:none}.ant-mentions-measure>span{display:inline-block;min-height:1em}.ant-mentions-dropdown{margin:0;padding:0;color:#000000d9;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:absolute;top:-9999px;left:-9999px;z-index:1050;box-sizing:border-box;font-size:14px;font-variant:initial;background-color:var(--c-canvas);border-radius:5px;outline:none;box-shadow:0 3px 6px -4px #0000001f,0 6px 16px #00000014,0 9px 28px 8px #0000000d}.ant-mentions-dropdown-hidden{display:none}.ant-mentions-dropdown-menu{max-height:250px;margin-bottom:0;padding-left:0;overflow:auto;list-style:none;outline:none}.ant-mentions-dropdown-menu-item{position:relative;display:block;min-width:100px;padding:5px 12px;overflow:hidden;color:#000000d9;font-weight:400;line-height:1.5715;white-space:nowrap;text-overflow:ellipsis;cursor:pointer;transition:background .3s ease}.ant-mentions-dropdown-menu-item:hover{background-color:#f5f5f5}.ant-mentions-dropdown-menu-item:first-child{border-radius:5px 5px 0 0}.ant-mentions-dropdown-menu-item:last-child{border-radius:0 0 5px 5px}.ant-mentions-dropdown-menu-item-disabled{color:#00000040;cursor:not-allowed}.ant-mentions-dropdown-menu-item-disabled:hover{color:#00000040;background-color:var(--c-canvas);cursor:not-allowed}.ant-mentions-dropdown-menu-item-selected{color:#000000d9;font-weight:600;background-color:#fafafa}.ant-mentions-dropdown-menu-item-active{background-color:#f5f5f5}.ant-mentions-rtl{direction:rtl}.ant-menu-item-danger.ant-menu-item,.ant-menu-item-danger.ant-menu-item:hover,.ant-menu-item-danger.ant-menu-item-active{color:#e31a1a}.ant-menu-item-danger.ant-menu-item:active{background:#fff1f0}.ant-menu-item-danger.ant-menu-item-selected{color:#e31a1a}.ant-menu-item-danger.ant-menu-item-selected>a,.ant-menu-item-danger.ant-menu-item-selected>a:hover{color:#e31a1a}.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-danger.ant-menu-item-selected{background-color:#fff1f0}.ant-menu-inline .ant-menu-item-danger.ant-menu-item:after{border-right-color:#e31a1a}.ant-menu-dark .ant-menu-item-danger.ant-menu-item,.ant-menu-dark .ant-menu-item-danger.ant-menu-item:hover,.ant-menu-dark .ant-menu-item-danger.ant-menu-item>a{color:#e31a1a}.ant-menu-dark.ant-menu-dark:not(.ant-menu-horizontal) .ant-menu-item-danger.ant-menu-item-selected{color:#fff;background-color:#e31a1a}.ant-menu{box-sizing:border-box;margin:0;font-variant:tabular-nums;font-feature-settings:"tnum";padding:0;color:#000000d9;font-size:14px;line-height:0;text-align:left;list-style:none;background:var(--c-canvas);outline:none;box-shadow:0 3px 6px -4px #0000001f,0 6px 16px #00000014,0 9px 28px 8px #0000000d;transition:background .3s,width .3s cubic-bezier(.2,0,0,1) 0s}.ant-menu:before{display:table;content:""}.ant-menu:after{display:table;clear:both;content:""}.ant-menu.ant-menu-root:focus-visible{box-shadow:0 0 0 2px #bfbbb4}.ant-menu ul,.ant-menu ol{margin:0;padding:0;list-style:none}.ant-menu-overflow{display:flex}.ant-menu-overflow-item{flex:none}.ant-menu-hidden,.ant-menu-submenu-hidden{display:none}.ant-menu-item-group-title{height:1.5715;padding:8px 16px;color:#00000073;font-size:14px;line-height:1.5715;transition:all .3s}.ant-menu-horizontal .ant-menu-submenu{transition:border-color .3s cubic-bezier(.645,.045,.355,1),background .3s cubic-bezier(.645,.045,.355,1)}.ant-menu-submenu,.ant-menu-submenu-inline{transition:border-color .3s cubic-bezier(.645,.045,.355,1),background .3s cubic-bezier(.645,.045,.355,1),padding .15s cubic-bezier(.645,.045,.355,1)}.ant-menu-submenu-selected{color:#8d6a46}.ant-menu-item:active,.ant-menu-submenu-title:active{background:#ccc8c0}.ant-menu-submenu .ant-menu-sub{cursor:initial;transition:background .3s cubic-bezier(.645,.045,.355,1),padding .3s cubic-bezier(.645,.045,.355,1)}.ant-menu-title-content{transition:color .3s}.ant-menu-item a{color:#000000d9}.ant-menu-item a:hover{color:#8d6a46}.ant-menu-item a:before{position:absolute;top:0;right:0;bottom:0;left:0;background-color:transparent;content:""}.ant-menu-item>.ant-badge a{color:#000000d9}.ant-menu-item>.ant-badge a:hover{color:#8d6a46}.ant-menu-item-divider{overflow:hidden;line-height:0;border-color:#f0f0f0;border-style:solid;border-width:1px 0 0}.ant-menu-item-divider-dashed{border-style:dashed}.ant-menu-horizontal .ant-menu-item,.ant-menu-horizontal .ant-menu-submenu{margin-top:-1px}.ant-menu-horizontal>.ant-menu-item:hover,.ant-menu-horizontal>.ant-menu-item-active,.ant-menu-horizontal>.ant-menu-submenu .ant-menu-submenu-title:hover{background-color:transparent}.ant-menu-item-selected,.ant-menu-item-selected a,.ant-menu-item-selected a:hover{color:#8d6a46}.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected{background-color:#ccc8c0}.ant-menu-inline,.ant-menu-vertical,.ant-menu-vertical-left{border-right:1px solid #f0f0f0}.ant-menu-vertical-right{border-left:1px solid #f0f0f0}.ant-menu-vertical.ant-menu-sub,.ant-menu-vertical-left.ant-menu-sub,.ant-menu-vertical-right.ant-menu-sub{min-width:160px;max-height:calc(100vh - 100px);padding:0;overflow:hidden;border-right:0}.ant-menu-vertical.ant-menu-sub:not([class*=-active]),.ant-menu-vertical-left.ant-menu-sub:not([class*=-active]),.ant-menu-vertical-right.ant-menu-sub:not([class*=-active]){overflow-x:hidden;overflow-y:auto}.ant-menu-vertical.ant-menu-sub .ant-menu-item,.ant-menu-vertical-left.ant-menu-sub .ant-menu-item,.ant-menu-vertical-right.ant-menu-sub .ant-menu-item{left:0;margin-left:0;border-right:0}.ant-menu-vertical.ant-menu-sub .ant-menu-item:after,.ant-menu-vertical-left.ant-menu-sub .ant-menu-item:after,.ant-menu-vertical-right.ant-menu-sub .ant-menu-item:after{border-right:0}.ant-menu-vertical.ant-menu-sub>.ant-menu-item,.ant-menu-vertical-left.ant-menu-sub>.ant-menu-item,.ant-menu-vertical-right.ant-menu-sub>.ant-menu-item,.ant-menu-vertical.ant-menu-sub>.ant-menu-submenu,.ant-menu-vertical-left.ant-menu-sub>.ant-menu-submenu,.ant-menu-vertical-right.ant-menu-sub>.ant-menu-submenu{transform-origin:0 0}.ant-menu-horizontal.ant-menu-sub{min-width:114px}.ant-menu-horizontal .ant-menu-item,.ant-menu-horizontal .ant-menu-submenu-title{transition:border-color .3s,background .3s}.ant-menu-item,.ant-menu-submenu-title{position:relative;display:block;margin:0;padding:0 20px;white-space:nowrap;cursor:pointer;transition:border-color .3s,background .3s,padding .3s cubic-bezier(.645,.045,.355,1)}.ant-menu-item .ant-menu-item-icon,.ant-menu-submenu-title .ant-menu-item-icon,.ant-menu-item .anticon,.ant-menu-submenu-title .anticon{min-width:14px;font-size:14px;transition:font-size .15s cubic-bezier(.215,.61,.355,1),margin .3s cubic-bezier(.645,.045,.355,1),color .3s}.ant-menu-item .ant-menu-item-icon+span,.ant-menu-submenu-title .ant-menu-item-icon+span,.ant-menu-item .anticon+span,.ant-menu-submenu-title .anticon+span{margin-left:10px;opacity:1;transition:opacity .3s cubic-bezier(.645,.045,.355,1),margin .3s,color .3s}.ant-menu-item .ant-menu-item-icon.svg,.ant-menu-submenu-title .ant-menu-item-icon.svg{vertical-align:-.125em}.ant-menu-item.ant-menu-item-only-child>.anticon,.ant-menu-submenu-title.ant-menu-item-only-child>.anticon,.ant-menu-item.ant-menu-item-only-child>.ant-menu-item-icon,.ant-menu-submenu-title.ant-menu-item-only-child>.ant-menu-item-icon{margin-right:0}.ant-menu-item:focus-visible,.ant-menu-submenu-title:focus-visible{box-shadow:0 0 0 2px #bfbbb4}.ant-menu>.ant-menu-item-divider{margin:1px 0;padding:0}.ant-menu-submenu-popup{position:absolute;z-index:1050;background:transparent;border-radius:5px;box-shadow:none;transform-origin:0 0}.ant-menu-submenu-popup:before{position:absolute;top:-7px;right:0;bottom:0;left:0;z-index:-1;width:100%;height:100%;opacity:.0001;content:" "}.ant-menu-submenu-placement-rightTop:before{top:0;left:-7px}.ant-menu-submenu>.ant-menu{background-color:var(--c-canvas);border-radius:5px}.ant-menu-submenu>.ant-menu-submenu-title:after{transition:transform .3s cubic-bezier(.645,.045,.355,1)}.ant-menu-submenu-popup>.ant-menu{background-color:var(--c-canvas)}.ant-menu-submenu-expand-icon,.ant-menu-submenu-arrow{position:absolute;top:50%;right:16px;width:10px;color:#000000d9;transform:translateY(-50%);transition:transform .3s cubic-bezier(.645,.045,.355,1)}.ant-menu-submenu-arrow:before,.ant-menu-submenu-arrow:after{position:absolute;width:6px;height:1.5px;background-color:currentcolor;border-radius:2px;transition:background .3s cubic-bezier(.645,.045,.355,1),transform .3s cubic-bezier(.645,.045,.355,1),top .3s cubic-bezier(.645,.045,.355,1),color .3s cubic-bezier(.645,.045,.355,1);content:""}.ant-menu-submenu-arrow:before{transform:rotate(45deg) translateY(-2.5px)}.ant-menu-submenu-arrow:after{transform:rotate(-45deg) translateY(2.5px)}.ant-menu-submenu:hover>.ant-menu-submenu-title>.ant-menu-submenu-expand-icon,.ant-menu-submenu:hover>.ant-menu-submenu-title>.ant-menu-submenu-arrow{color:#8d6a46}.ant-menu-inline-collapsed .ant-menu-submenu-arrow:before,.ant-menu-submenu-inline .ant-menu-submenu-arrow:before{transform:rotate(-45deg) translate(2.5px)}.ant-menu-inline-collapsed .ant-menu-submenu-arrow:after,.ant-menu-submenu-inline .ant-menu-submenu-arrow:after{transform:rotate(45deg) translate(-2.5px)}.ant-menu-submenu-horizontal .ant-menu-submenu-arrow{display:none}.ant-menu-submenu-open.ant-menu-submenu-inline>.ant-menu-submenu-title>.ant-menu-submenu-arrow{transform:translateY(-2px)}.ant-menu-submenu-open.ant-menu-submenu-inline>.ant-menu-submenu-title>.ant-menu-submenu-arrow:after{transform:rotate(-45deg) translate(-2.5px)}.ant-menu-submenu-open.ant-menu-submenu-inline>.ant-menu-submenu-title>.ant-menu-submenu-arrow:before{transform:rotate(45deg) translate(2.5px)}.ant-menu-vertical .ant-menu-submenu-selected,.ant-menu-vertical-left .ant-menu-submenu-selected,.ant-menu-vertical-right .ant-menu-submenu-selected{color:#8d6a46}.ant-menu-horizontal{line-height:46px;border:0;border-bottom:1px solid #f0f0f0;box-shadow:none}.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-item,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-submenu{margin-top:-1px;margin-bottom:0;padding:0 20px}.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-item:hover,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-submenu:hover,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-item-active,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-submenu-active,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-item-open,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-submenu-open,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-item-selected,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-submenu-selected{color:#8d6a46}.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-item:hover:after,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-submenu:hover:after,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-item-active:after,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-submenu-active:after,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-item-open:after,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-submenu-open:after,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-item-selected:after,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-submenu-selected:after{border-bottom:2px solid #8D6A46}.ant-menu-horizontal>.ant-menu-item,.ant-menu-horizontal>.ant-menu-submenu{position:relative;top:1px;display:inline-block;vertical-align:bottom}.ant-menu-horizontal>.ant-menu-item:after,.ant-menu-horizontal>.ant-menu-submenu:after{position:absolute;right:20px;bottom:0;left:20px;border-bottom:2px solid transparent;transition:border-color .3s cubic-bezier(.645,.045,.355,1);content:""}.ant-menu-horizontal>.ant-menu-submenu>.ant-menu-submenu-title{padding:0}.ant-menu-horizontal>.ant-menu-item a{color:#000000d9}.ant-menu-horizontal>.ant-menu-item a:hover{color:#8d6a46}.ant-menu-horizontal>.ant-menu-item a:before{bottom:-2px}.ant-menu-horizontal>.ant-menu-item-selected a{color:#8d6a46}.ant-menu-horizontal:after{display:block;clear:both;height:0;content:" "}.ant-menu-vertical .ant-menu-item,.ant-menu-vertical-left .ant-menu-item,.ant-menu-vertical-right .ant-menu-item,.ant-menu-inline .ant-menu-item{position:relative}.ant-menu-vertical .ant-menu-item:after,.ant-menu-vertical-left .ant-menu-item:after,.ant-menu-vertical-right .ant-menu-item:after,.ant-menu-inline .ant-menu-item:after{position:absolute;top:0;right:0;bottom:0;border-right:3px solid #8D6A46;transform:scaleY(.0001);opacity:0;transition:transform .15s cubic-bezier(.215,.61,.355,1),opacity .15s cubic-bezier(.215,.61,.355,1);content:""}.ant-menu-vertical .ant-menu-item,.ant-menu-vertical-left .ant-menu-item,.ant-menu-vertical-right .ant-menu-item,.ant-menu-inline .ant-menu-item,.ant-menu-vertical .ant-menu-submenu-title,.ant-menu-vertical-left .ant-menu-submenu-title,.ant-menu-vertical-right .ant-menu-submenu-title,.ant-menu-inline .ant-menu-submenu-title{height:40px;margin-top:4px;margin-bottom:4px;padding:0 16px;overflow:hidden;line-height:40px;text-overflow:ellipsis}.ant-menu-vertical .ant-menu-submenu,.ant-menu-vertical-left .ant-menu-submenu,.ant-menu-vertical-right .ant-menu-submenu,.ant-menu-inline .ant-menu-submenu{padding-bottom:.02px}.ant-menu-vertical .ant-menu-item:not(:last-child),.ant-menu-vertical-left .ant-menu-item:not(:last-child),.ant-menu-vertical-right .ant-menu-item:not(:last-child),.ant-menu-inline .ant-menu-item:not(:last-child){margin-bottom:8px}.ant-menu-vertical>.ant-menu-item,.ant-menu-vertical-left>.ant-menu-item,.ant-menu-vertical-right>.ant-menu-item,.ant-menu-inline>.ant-menu-item,.ant-menu-vertical>.ant-menu-submenu>.ant-menu-submenu-title,.ant-menu-vertical-left>.ant-menu-submenu>.ant-menu-submenu-title,.ant-menu-vertical-right>.ant-menu-submenu>.ant-menu-submenu-title,.ant-menu-inline>.ant-menu-submenu>.ant-menu-submenu-title{height:40px;line-height:40px}.ant-menu-vertical .ant-menu-item-group-list .ant-menu-submenu-title,.ant-menu-vertical .ant-menu-submenu-title{padding-right:34px}.ant-menu-inline{width:100%}.ant-menu-inline .ant-menu-selected:after,.ant-menu-inline .ant-menu-item-selected:after{transform:scaleY(1);opacity:1;transition:transform .15s cubic-bezier(.645,.045,.355,1),opacity .15s cubic-bezier(.645,.045,.355,1)}.ant-menu-inline .ant-menu-item,.ant-menu-inline .ant-menu-submenu-title{width:calc(100% + 1px)}.ant-menu-inline .ant-menu-item-group-list .ant-menu-submenu-title,.ant-menu-inline .ant-menu-submenu-title{padding-right:34px}.ant-menu-inline.ant-menu-root .ant-menu-item,.ant-menu-inline.ant-menu-root .ant-menu-submenu-title{display:flex;align-items:center;transition:border-color .3s,background .3s,padding .1s cubic-bezier(.215,.61,.355,1)}.ant-menu-inline.ant-menu-root .ant-menu-item>.ant-menu-title-content,.ant-menu-inline.ant-menu-root .ant-menu-submenu-title>.ant-menu-title-content{flex:auto;min-width:0;overflow:hidden;text-overflow:ellipsis}.ant-menu-inline.ant-menu-root .ant-menu-item>*,.ant-menu-inline.ant-menu-root .ant-menu-submenu-title>*{flex:none}.ant-menu.ant-menu-inline-collapsed{width:80px}.ant-menu.ant-menu-inline-collapsed>.ant-menu-item,.ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-item,.ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-submenu>.ant-menu-submenu-title,.ant-menu.ant-menu-inline-collapsed>.ant-menu-submenu>.ant-menu-submenu-title{left:0;padding:0 calc(50% - 8px);text-overflow:clip}.ant-menu.ant-menu-inline-collapsed>.ant-menu-item .ant-menu-submenu-arrow,.ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-item .ant-menu-submenu-arrow,.ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-submenu>.ant-menu-submenu-title .ant-menu-submenu-arrow,.ant-menu.ant-menu-inline-collapsed>.ant-menu-submenu>.ant-menu-submenu-title .ant-menu-submenu-arrow{opacity:0}.ant-menu.ant-menu-inline-collapsed>.ant-menu-item .ant-menu-item-icon,.ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-item .ant-menu-item-icon,.ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-submenu>.ant-menu-submenu-title .ant-menu-item-icon,.ant-menu.ant-menu-inline-collapsed>.ant-menu-submenu>.ant-menu-submenu-title .ant-menu-item-icon,.ant-menu.ant-menu-inline-collapsed>.ant-menu-item .anticon,.ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-item .anticon,.ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-submenu>.ant-menu-submenu-title .anticon,.ant-menu.ant-menu-inline-collapsed>.ant-menu-submenu>.ant-menu-submenu-title .anticon{margin:0;font-size:16px;line-height:40px}.ant-menu.ant-menu-inline-collapsed>.ant-menu-item .ant-menu-item-icon+span,.ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-item .ant-menu-item-icon+span,.ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-submenu>.ant-menu-submenu-title .ant-menu-item-icon+span,.ant-menu.ant-menu-inline-collapsed>.ant-menu-submenu>.ant-menu-submenu-title .ant-menu-item-icon+span,.ant-menu.ant-menu-inline-collapsed>.ant-menu-item .anticon+span,.ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-item .anticon+span,.ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-submenu>.ant-menu-submenu-title .anticon+span,.ant-menu.ant-menu-inline-collapsed>.ant-menu-submenu>.ant-menu-submenu-title .anticon+span{display:inline-block;opacity:0}.ant-menu.ant-menu-inline-collapsed .ant-menu-item-icon,.ant-menu.ant-menu-inline-collapsed .anticon{display:inline-block}.ant-menu.ant-menu-inline-collapsed-tooltip{pointer-events:none}.ant-menu.ant-menu-inline-collapsed-tooltip .ant-menu-item-icon,.ant-menu.ant-menu-inline-collapsed-tooltip .anticon{display:none}.ant-menu.ant-menu-inline-collapsed-tooltip a{color:#ffffffd9}.ant-menu.ant-menu-inline-collapsed .ant-menu-item-group-title{padding-right:4px;padding-left:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ant-menu-item-group-list{margin:0;padding:0}.ant-menu-item-group-list .ant-menu-item,.ant-menu-item-group-list .ant-menu-submenu-title{padding:0 16px 0 28px}.ant-menu-root.ant-menu-vertical,.ant-menu-root.ant-menu-vertical-left,.ant-menu-root.ant-menu-vertical-right,.ant-menu-root.ant-menu-inline{box-shadow:none}.ant-menu-root.ant-menu-inline-collapsed .ant-menu-item>.ant-menu-inline-collapsed-noicon,.ant-menu-root.ant-menu-inline-collapsed .ant-menu-submenu .ant-menu-submenu-title>.ant-menu-inline-collapsed-noicon{font-size:16px;text-align:center}.ant-menu-sub.ant-menu-inline{padding:0;background:#fafafa;border:0;border-radius:0;box-shadow:none}.ant-menu-sub.ant-menu-inline>.ant-menu-item,.ant-menu-sub.ant-menu-inline>.ant-menu-submenu>.ant-menu-submenu-title{height:40px;line-height:40px;list-style-position:inside;list-style-type:disc}.ant-menu-sub.ant-menu-inline .ant-menu-item-group-title{padding-left:32px}.ant-menu-item-disabled,.ant-menu-submenu-disabled{color:#00000040!important;background:none;cursor:not-allowed}.ant-menu-item-disabled:after,.ant-menu-submenu-disabled:after{border-color:transparent!important}.ant-menu-item-disabled a,.ant-menu-submenu-disabled a{color:#00000040!important;pointer-events:none}.ant-menu-item-disabled>.ant-menu-submenu-title,.ant-menu-submenu-disabled>.ant-menu-submenu-title{color:#00000040!important;cursor:not-allowed}.ant-menu-item-disabled>.ant-menu-submenu-title>.ant-menu-submenu-arrow:before,.ant-menu-submenu-disabled>.ant-menu-submenu-title>.ant-menu-submenu-arrow:before,.ant-menu-item-disabled>.ant-menu-submenu-title>.ant-menu-submenu-arrow:after,.ant-menu-submenu-disabled>.ant-menu-submenu-title>.ant-menu-submenu-arrow:after{background:#00000040!important}.ant-layout-header .ant-menu{line-height:inherit}.ant-menu-inline-collapsed-tooltip a,.ant-menu-inline-collapsed-tooltip a:hover{color:#fff}.ant-menu-light .ant-menu-item:hover,.ant-menu-light .ant-menu-item-active,.ant-menu-light .ant-menu:not(.ant-menu-inline) .ant-menu-submenu-open,.ant-menu-light .ant-menu-submenu-active,.ant-menu-light .ant-menu-submenu-title:hover{color:#8d6a46}.ant-menu.ant-menu-root:focus-visible{box-shadow:0 0 0 2px #66482e}.ant-menu-dark .ant-menu-item:focus-visible,.ant-menu-dark .ant-menu-submenu-title:focus-visible{box-shadow:0 0 0 2px #66482e}.ant-menu.ant-menu-dark,.ant-menu-dark .ant-menu-sub,.ant-menu.ant-menu-dark .ant-menu-sub{color:#ffffffa6;background:#001529}.ant-menu.ant-menu-dark .ant-menu-submenu-title .ant-menu-submenu-arrow,.ant-menu-dark .ant-menu-sub .ant-menu-submenu-title .ant-menu-submenu-arrow,.ant-menu.ant-menu-dark .ant-menu-sub .ant-menu-submenu-title .ant-menu-submenu-arrow{opacity:.45;transition:all .3s}.ant-menu.ant-menu-dark .ant-menu-submenu-title .ant-menu-submenu-arrow:after,.ant-menu-dark .ant-menu-sub .ant-menu-submenu-title .ant-menu-submenu-arrow:after,.ant-menu.ant-menu-dark .ant-menu-sub .ant-menu-submenu-title .ant-menu-submenu-arrow:after,.ant-menu.ant-menu-dark .ant-menu-submenu-title .ant-menu-submenu-arrow:before,.ant-menu-dark .ant-menu-sub .ant-menu-submenu-title .ant-menu-submenu-arrow:before,.ant-menu.ant-menu-dark .ant-menu-sub .ant-menu-submenu-title .ant-menu-submenu-arrow:before{background:#fff}.ant-menu-dark.ant-menu-submenu-popup{background:transparent}.ant-menu-dark .ant-menu-inline.ant-menu-sub{background:#000c17}.ant-menu-dark.ant-menu-horizontal{border-bottom:0}.ant-menu-dark.ant-menu-horizontal>.ant-menu-item,.ant-menu-dark.ant-menu-horizontal>.ant-menu-submenu{top:0;margin-top:0;padding:0 20px;border-color:#001529;border-bottom:0}.ant-menu-dark.ant-menu-horizontal>.ant-menu-item:hover{background-color:#8d6a46}.ant-menu-dark.ant-menu-horizontal>.ant-menu-item>a:before{bottom:0}.ant-menu-dark .ant-menu-item,.ant-menu-dark .ant-menu-item-group-title,.ant-menu-dark .ant-menu-item>a,.ant-menu-dark .ant-menu-item>span>a{color:#ffffffa6}.ant-menu-dark.ant-menu-inline,.ant-menu-dark.ant-menu-vertical,.ant-menu-dark.ant-menu-vertical-left,.ant-menu-dark.ant-menu-vertical-right{border-right:0}.ant-menu-dark.ant-menu-inline .ant-menu-item,.ant-menu-dark.ant-menu-vertical .ant-menu-item,.ant-menu-dark.ant-menu-vertical-left .ant-menu-item,.ant-menu-dark.ant-menu-vertical-right .ant-menu-item{left:0;margin-left:0;border-right:0}.ant-menu-dark.ant-menu-inline .ant-menu-item:after,.ant-menu-dark.ant-menu-vertical .ant-menu-item:after,.ant-menu-dark.ant-menu-vertical-left .ant-menu-item:after,.ant-menu-dark.ant-menu-vertical-right .ant-menu-item:after{border-right:0}.ant-menu-dark.ant-menu-inline .ant-menu-item,.ant-menu-dark.ant-menu-inline .ant-menu-submenu-title{width:100%}.ant-menu-dark .ant-menu-item:hover,.ant-menu-dark .ant-menu-item-active,.ant-menu-dark .ant-menu-submenu-active,.ant-menu-dark .ant-menu-submenu-open,.ant-menu-dark .ant-menu-submenu-selected,.ant-menu-dark .ant-menu-submenu-title:hover{color:#fff;background-color:transparent}.ant-menu-dark .ant-menu-item:hover>a,.ant-menu-dark .ant-menu-item-active>a,.ant-menu-dark .ant-menu-submenu-active>a,.ant-menu-dark .ant-menu-submenu-open>a,.ant-menu-dark .ant-menu-submenu-selected>a,.ant-menu-dark .ant-menu-submenu-title:hover>a,.ant-menu-dark .ant-menu-item:hover>span>a,.ant-menu-dark .ant-menu-item-active>span>a,.ant-menu-dark .ant-menu-submenu-active>span>a,.ant-menu-dark .ant-menu-submenu-open>span>a,.ant-menu-dark .ant-menu-submenu-selected>span>a,.ant-menu-dark .ant-menu-submenu-title:hover>span>a{color:#fff}.ant-menu-dark .ant-menu-item:hover>.ant-menu-submenu-title>.ant-menu-submenu-arrow,.ant-menu-dark .ant-menu-item-active>.ant-menu-submenu-title>.ant-menu-submenu-arrow,.ant-menu-dark .ant-menu-submenu-active>.ant-menu-submenu-title>.ant-menu-submenu-arrow,.ant-menu-dark .ant-menu-submenu-open>.ant-menu-submenu-title>.ant-menu-submenu-arrow,.ant-menu-dark .ant-menu-submenu-selected>.ant-menu-submenu-title>.ant-menu-submenu-arrow,.ant-menu-dark .ant-menu-submenu-title:hover>.ant-menu-submenu-title>.ant-menu-submenu-arrow{opacity:1}.ant-menu-dark .ant-menu-item:hover>.ant-menu-submenu-title>.ant-menu-submenu-arrow:after,.ant-menu-dark .ant-menu-item-active>.ant-menu-submenu-title>.ant-menu-submenu-arrow:after,.ant-menu-dark .ant-menu-submenu-active>.ant-menu-submenu-title>.ant-menu-submenu-arrow:after,.ant-menu-dark .ant-menu-submenu-open>.ant-menu-submenu-title>.ant-menu-submenu-arrow:after,.ant-menu-dark .ant-menu-submenu-selected>.ant-menu-submenu-title>.ant-menu-submenu-arrow:after,.ant-menu-dark .ant-menu-submenu-title:hover>.ant-menu-submenu-title>.ant-menu-submenu-arrow:after,.ant-menu-dark .ant-menu-item:hover>.ant-menu-submenu-title>.ant-menu-submenu-arrow:before,.ant-menu-dark .ant-menu-item-active>.ant-menu-submenu-title>.ant-menu-submenu-arrow:before,.ant-menu-dark .ant-menu-submenu-active>.ant-menu-submenu-title>.ant-menu-submenu-arrow:before,.ant-menu-dark .ant-menu-submenu-open>.ant-menu-submenu-title>.ant-menu-submenu-arrow:before,.ant-menu-dark .ant-menu-submenu-selected>.ant-menu-submenu-title>.ant-menu-submenu-arrow:before,.ant-menu-dark .ant-menu-submenu-title:hover>.ant-menu-submenu-title>.ant-menu-submenu-arrow:before{background:#fff}.ant-menu-dark .ant-menu-item:hover{background-color:transparent}.ant-menu-dark.ant-menu-dark:not(.ant-menu-horizontal) .ant-menu-item-selected{background-color:#8d6a46}.ant-menu-dark .ant-menu-item-selected{color:#fff;border-right:0}.ant-menu-dark .ant-menu-item-selected:after{border-right:0}.ant-menu-dark .ant-menu-item-selected>a,.ant-menu-dark .ant-menu-item-selected>span>a,.ant-menu-dark .ant-menu-item-selected>a:hover,.ant-menu-dark .ant-menu-item-selected>span>a:hover{color:#fff}.ant-menu-dark .ant-menu-item-selected .ant-menu-item-icon,.ant-menu-dark .ant-menu-item-selected .anticon{color:#fff}.ant-menu-dark .ant-menu-item-selected .ant-menu-item-icon+span,.ant-menu-dark .ant-menu-item-selected .anticon+span{color:#fff}.ant-menu.ant-menu-dark .ant-menu-item-selected,.ant-menu-submenu-popup.ant-menu-dark .ant-menu-item-selected{background-color:#8d6a46}.ant-menu-dark .ant-menu-item-disabled,.ant-menu-dark .ant-menu-submenu-disabled,.ant-menu-dark .ant-menu-item-disabled>a,.ant-menu-dark .ant-menu-submenu-disabled>a,.ant-menu-dark .ant-menu-item-disabled>span>a,.ant-menu-dark .ant-menu-submenu-disabled>span>a{color:#ffffff59!important;opacity:.8}.ant-menu-dark .ant-menu-item-disabled>.ant-menu-submenu-title,.ant-menu-dark .ant-menu-submenu-disabled>.ant-menu-submenu-title{color:#ffffff59!important}.ant-menu-dark .ant-menu-item-disabled>.ant-menu-submenu-title>.ant-menu-submenu-arrow:before,.ant-menu-dark .ant-menu-submenu-disabled>.ant-menu-submenu-title>.ant-menu-submenu-arrow:before,.ant-menu-dark .ant-menu-item-disabled>.ant-menu-submenu-title>.ant-menu-submenu-arrow:after,.ant-menu-dark .ant-menu-submenu-disabled>.ant-menu-submenu-title>.ant-menu-submenu-arrow:after{background:#ffffff59!important}.ant-menu.ant-menu-rtl{direction:rtl;text-align:right}.ant-menu-rtl .ant-menu-item-group-title{text-align:right}.ant-menu-rtl.ant-menu-inline,.ant-menu-rtl.ant-menu-vertical{border-right:none;border-left:1px solid #f0f0f0}.ant-menu-rtl.ant-menu-dark.ant-menu-inline,.ant-menu-rtl.ant-menu-dark.ant-menu-vertical{border-left:none}.ant-menu-rtl.ant-menu-vertical.ant-menu-sub>.ant-menu-item,.ant-menu-rtl.ant-menu-vertical-left.ant-menu-sub>.ant-menu-item,.ant-menu-rtl.ant-menu-vertical-right.ant-menu-sub>.ant-menu-item,.ant-menu-rtl.ant-menu-vertical.ant-menu-sub>.ant-menu-submenu,.ant-menu-rtl.ant-menu-vertical-left.ant-menu-sub>.ant-menu-submenu,.ant-menu-rtl.ant-menu-vertical-right.ant-menu-sub>.ant-menu-submenu{transform-origin:top right}.ant-menu-rtl .ant-menu-item .ant-menu-item-icon,.ant-menu-rtl .ant-menu-submenu-title .ant-menu-item-icon,.ant-menu-rtl .ant-menu-item .anticon,.ant-menu-rtl .ant-menu-submenu-title .anticon{margin-right:auto;margin-left:10px}.ant-menu-rtl .ant-menu-item.ant-menu-item-only-child>.ant-menu-item-icon,.ant-menu-rtl .ant-menu-submenu-title.ant-menu-item-only-child>.ant-menu-item-icon,.ant-menu-rtl .ant-menu-item.ant-menu-item-only-child>.anticon,.ant-menu-rtl .ant-menu-submenu-title.ant-menu-item-only-child>.anticon{margin-left:0}.ant-menu-submenu-rtl.ant-menu-submenu-popup{transform-origin:100% 0}.ant-menu-rtl .ant-menu-submenu-vertical>.ant-menu-submenu-title .ant-menu-submenu-arrow,.ant-menu-rtl .ant-menu-submenu-vertical-left>.ant-menu-submenu-title .ant-menu-submenu-arrow,.ant-menu-rtl .ant-menu-submenu-vertical-right>.ant-menu-submenu-title .ant-menu-submenu-arrow,.ant-menu-rtl .ant-menu-submenu-inline>.ant-menu-submenu-title .ant-menu-submenu-arrow{right:auto;left:16px}.ant-menu-rtl .ant-menu-submenu-vertical>.ant-menu-submenu-title .ant-menu-submenu-arrow:before,.ant-menu-rtl .ant-menu-submenu-vertical-left>.ant-menu-submenu-title .ant-menu-submenu-arrow:before,.ant-menu-rtl .ant-menu-submenu-vertical-right>.ant-menu-submenu-title .ant-menu-submenu-arrow:before{transform:rotate(-45deg) translateY(-2px)}.ant-menu-rtl .ant-menu-submenu-vertical>.ant-menu-submenu-title .ant-menu-submenu-arrow:after,.ant-menu-rtl .ant-menu-submenu-vertical-left>.ant-menu-submenu-title .ant-menu-submenu-arrow:after,.ant-menu-rtl .ant-menu-submenu-vertical-right>.ant-menu-submenu-title .ant-menu-submenu-arrow:after{transform:rotate(45deg) translateY(2px)}.ant-menu-rtl.ant-menu-vertical .ant-menu-item:after,.ant-menu-rtl.ant-menu-vertical-left .ant-menu-item:after,.ant-menu-rtl.ant-menu-vertical-right .ant-menu-item:after,.ant-menu-rtl.ant-menu-inline .ant-menu-item:after{right:auto;left:0}.ant-menu-rtl.ant-menu-vertical .ant-menu-item,.ant-menu-rtl.ant-menu-vertical-left .ant-menu-item,.ant-menu-rtl.ant-menu-vertical-right .ant-menu-item,.ant-menu-rtl.ant-menu-inline .ant-menu-item,.ant-menu-rtl.ant-menu-vertical .ant-menu-submenu-title,.ant-menu-rtl.ant-menu-vertical-left .ant-menu-submenu-title,.ant-menu-rtl.ant-menu-vertical-right .ant-menu-submenu-title,.ant-menu-rtl.ant-menu-inline .ant-menu-submenu-title{text-align:right}.ant-menu-rtl.ant-menu-inline .ant-menu-submenu-title{padding-right:0;padding-left:34px}.ant-menu-rtl.ant-menu-vertical .ant-menu-submenu-title{padding-right:16px;padding-left:34px}.ant-menu-rtl.ant-menu-inline-collapsed.ant-menu-vertical .ant-menu-submenu-title{padding:0 calc(50% - 8px)}.ant-menu-rtl .ant-menu-item-group-list .ant-menu-item,.ant-menu-rtl .ant-menu-item-group-list .ant-menu-submenu-title{padding:0 28px 0 16px}.ant-menu-sub.ant-menu-inline{border:0}.ant-menu-rtl.ant-menu-sub.ant-menu-inline .ant-menu-item-group-title{padding-right:32px;padding-left:0}.ant-message{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:fixed;top:8px;left:0;z-index:1010;width:100%;pointer-events:none}.ant-message-notice{padding:8px;text-align:center}.ant-message-notice-content{display:inline-block;padding:10px 16px;background:var(--c-canvas);border-radius:5px;box-shadow:0 3px 6px -4px #0000001f,0 6px 16px #00000014,0 9px 28px 8px #0000000d;pointer-events:all}.ant-message-success .anticon{color:#52c41a}.ant-message-error .anticon{color:#e31a1a}.ant-message-warning .anticon{color:#faad14}.ant-message-info .anticon,.ant-message-loading .anticon{color:#8d6a46}.ant-message .anticon{position:relative;top:1px;margin-right:8px;font-size:16px}.ant-message-notice.ant-move-up-leave.ant-move-up-leave-active{animation-name:MessageMoveOut;animation-duration:.3s}@keyframes MessageMoveOut{0%{max-height:150px;padding:8px;opacity:1}to{max-height:0;padding:0;opacity:0}}.ant-message-rtl,.ant-message-rtl span{direction:rtl}.ant-message-rtl .anticon{margin-right:0;margin-left:8px}.ant-modal{box-sizing:border-box;padding:0 0 24px;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";pointer-events:none;position:relative;top:100px;width:auto;max-width:calc(100vw - 32px);margin:0 auto}.ant-modal.ant-zoom-enter,.ant-modal.antzoom-appear{transform:none;opacity:0;animation-duration:.3s;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-modal-mask{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;height:100%;background-color:#00000073}.ant-modal-mask-hidden{display:none}.ant-modal-wrap{position:fixed;top:0;right:0;bottom:0;left:0;overflow:auto;outline:0;-webkit-overflow-scrolling:touch;z-index:1000}.ant-modal-title{margin:0;color:#1c2d56;font-weight:500;font-size:16px;line-height:22px;word-wrap:break-word}.ant-modal-content{position:relative;background-color:var(--c-canvas);background-clip:padding-box;border:0;border-radius:5px;box-shadow:0 3px 6px -4px #0000001f,0 6px 16px #00000014,0 9px 28px 8px #0000000d;pointer-events:auto}.ant-modal-close{position:absolute;top:0;right:0;z-index:10;padding:0;color:#00000073;font-weight:700;line-height:1;text-decoration:none;background:transparent;border:0;outline:0;cursor:pointer;transition:color .3s}.ant-modal-close-x{display:block;width:56px;height:56px;font-size:16px;font-style:normal;line-height:56px;text-align:center;text-transform:none;text-rendering:auto}.ant-modal-close:focus,.ant-modal-close:hover{color:#000000bf;text-decoration:none}.ant-modal-header{padding:16px 24px;color:#000000d9;background:var(--c-canvas);border-bottom:1px solid #f0f0f0;border-radius:5px 5px 0 0}.ant-modal-body{padding:24px;font-size:14px;line-height:1.5715;word-wrap:break-word}.ant-modal-footer{padding:10px 16px;text-align:right;background:transparent;border-top:1px solid #f0f0f0;border-radius:0 0 5px 5px}.ant-modal-footer .ant-btn+.ant-btn:not(.ant-dropdown-trigger){margin-bottom:0;margin-left:8px}.ant-modal-open{overflow:hidden}.ant-modal-centered{text-align:center}.ant-modal-centered:before{display:inline-block;width:0;height:100%;vertical-align:middle;content:""}.ant-modal-centered .ant-modal{top:0;display:inline-block;padding-bottom:0;text-align:left;vertical-align:middle}@media (max-width: 767px){.ant-modal{max-width:calc(100vw - 16px);margin:8px auto}.ant-modal-centered .ant-modal{flex:1}}.ant-modal-confirm .ant-modal-header{display:none}.ant-modal-confirm .ant-modal-body{padding:32px 32px 24px}.ant-modal-confirm-body-wrapper:before{display:table;content:""}.ant-modal-confirm-body-wrapper:after{display:table;clear:both;content:""}.ant-modal-confirm-body .ant-modal-confirm-title{display:block;overflow:hidden;color:#1c2d56;font-weight:500;font-size:16px;line-height:1.4}.ant-modal-confirm-body .ant-modal-confirm-content{margin-top:8px;color:#000000d9;font-size:14px}.ant-modal-confirm-body>.anticon{float:left;margin-right:16px;font-size:22px}.ant-modal-confirm-body>.anticon+.ant-modal-confirm-title+.ant-modal-confirm-content{margin-left:38px}.ant-modal-confirm .ant-modal-confirm-btns{float:right;margin-top:24px}.ant-modal-confirm .ant-modal-confirm-btns .ant-btn+.ant-btn{margin-bottom:0;margin-left:8px}.ant-modal-confirm-error .ant-modal-confirm-body>.anticon{color:#e31a1a}.ant-modal-confirm-warning .ant-modal-confirm-body>.anticon,.ant-modal-confirm-confirm .ant-modal-confirm-body>.anticon{color:#faad14}.ant-modal-confirm-info .ant-modal-confirm-body>.anticon{color:#8d6a46}.ant-modal-confirm-success .ant-modal-confirm-body>.anticon{color:#52c41a}.ant-modal-wrap-rtl{direction:rtl}.ant-modal-wrap-rtl .ant-modal-close{right:initial;left:0}.ant-modal-wrap-rtl .ant-modal-footer{text-align:left}.ant-modal-wrap-rtl .ant-modal-footer .ant-btn+.ant-btn{margin-right:8px;margin-left:0}.ant-modal-wrap-rtl .ant-modal-confirm-body{direction:rtl}.ant-modal-wrap-rtl .ant-modal-confirm-body>.anticon{float:right;margin-right:0;margin-left:16px}.ant-modal-wrap-rtl .ant-modal-confirm-body>.anticon+.ant-modal-confirm-title+.ant-modal-confirm-content{margin-right:38px;margin-left:0}.ant-modal-wrap-rtl .ant-modal-confirm-btns{float:left}.ant-modal-wrap-rtl .ant-modal-confirm-btns .ant-btn+.ant-btn{margin-right:8px;margin-left:0}.ant-modal-wrap-rtl.ant-modal-centered .ant-modal{text-align:right}.ant-notification{box-sizing:border-box;margin:0 24px 0 0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:fixed;z-index:1010}.ant-notification-topLeft,.ant-notification-bottomLeft{margin-right:0;margin-left:24px}.ant-notification-topLeft .ant-notification-fade-enter.ant-notification-fade-enter-active,.ant-notification-bottomLeft .ant-notification-fade-enter.ant-notification-fade-enter-active,.ant-notification-topLeft .ant-notification-fade-appear.ant-notification-fade-appear-active,.ant-notification-bottomLeft .ant-notification-fade-appear.ant-notification-fade-appear-active{animation-name:NotificationLeftFadeIn}.ant-notification-close-icon{font-size:14px;cursor:pointer}.ant-notification-hook-holder{position:relative}.ant-notification-notice{position:relative;width:384px;max-width:calc(100vw - 48px);margin-bottom:16px;margin-left:auto;padding:16px 24px;overflow:hidden;line-height:1.5715;word-wrap:break-word;background:var(--c-canvas);border-radius:5px;box-shadow:0 3px 6px -4px #0000001f,0 6px 16px #00000014,0 9px 28px 8px #0000000d}.ant-notification-topLeft .ant-notification-notice,.ant-notification-bottomLeft .ant-notification-notice{margin-right:auto;margin-left:0}.ant-notification-notice-message{margin-bottom:8px;color:#1c2d56;font-size:16px;line-height:24px}.ant-notification-notice-message-single-line-auto-margin{display:block;width:calc(264px - 100%);max-width:4px;background-color:transparent;pointer-events:none}.ant-notification-notice-message-single-line-auto-margin:before{display:block;content:""}.ant-notification-notice-description{font-size:14px}.ant-notification-notice-closable .ant-notification-notice-message{padding-right:24px}.ant-notification-notice-with-icon .ant-notification-notice-message{margin-bottom:4px;margin-left:48px;font-size:16px}.ant-notification-notice-with-icon .ant-notification-notice-description{margin-left:48px;font-size:14px}.ant-notification-notice-icon{position:absolute;margin-left:4px;font-size:24px;line-height:24px}.anticon.ant-notification-notice-icon-success{color:#52c41a}.anticon.ant-notification-notice-icon-info{color:#8d6a46}.anticon.ant-notification-notice-icon-warning{color:#faad14}.anticon.ant-notification-notice-icon-error{color:#e31a1a}.ant-notification-notice-close{position:absolute;top:16px;right:22px;color:#00000073;outline:none}.ant-notification-notice-close:hover{color:#000000ab}.ant-notification-notice-btn{float:right;margin-top:16px}.ant-notification .notification-fade-effect{animation-duration:.24s;animation-timing-function:cubic-bezier(.645,.045,.355,1);animation-fill-mode:both}.ant-notification-fade-enter,.ant-notification-fade-appear{animation-duration:.24s;animation-timing-function:cubic-bezier(.645,.045,.355,1);animation-fill-mode:both;opacity:0;animation-play-state:paused}.ant-notification-fade-leave{animation-timing-function:cubic-bezier(.645,.045,.355,1);animation-fill-mode:both;animation-duration:.2s;animation-play-state:paused}.ant-notification-fade-enter.ant-notification-fade-enter-active,.ant-notification-fade-appear.ant-notification-fade-appear-active{animation-name:NotificationFadeIn;animation-play-state:running}.ant-notification-fade-leave.ant-notification-fade-leave-active{animation-name:NotificationFadeOut;animation-play-state:running}@keyframes NotificationFadeIn{0%{left:384px;opacity:0}to{left:0;opacity:1}}@keyframes NotificationLeftFadeIn{0%{right:384px;opacity:0}to{right:0;opacity:1}}@keyframes NotificationFadeOut{0%{max-height:150px;margin-bottom:16px;opacity:1}to{max-height:0;margin-bottom:0;padding-top:0;padding-bottom:0;opacity:0}}.ant-notification-rtl{direction:rtl}.ant-notification-rtl .ant-notification-notice-closable .ant-notification-notice-message{padding-right:0;padding-left:24px}.ant-notification-rtl .ant-notification-notice-with-icon .ant-notification-notice-message,.ant-notification-rtl .ant-notification-notice-with-icon .ant-notification-notice-description{margin-right:48px;margin-left:0}.ant-notification-rtl .ant-notification-notice-icon{margin-right:4px;margin-left:0}.ant-notification-rtl .ant-notification-notice-close{right:auto;left:22px}.ant-notification-rtl .ant-notification-notice-btn{float:left}.ant-page-header{box-sizing:border-box;margin:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:relative;padding:16px 24px;background-color:var(--c-canvas)}.ant-page-header-ghost{background-color:inherit}.ant-page-header.has-breadcrumb{padding-top:12px}.ant-page-header.has-footer{padding-bottom:0}.ant-page-header-back{margin-right:16px;font-size:16px;line-height:1}.ant-page-header-back-button{color:#1c2d56;text-decoration:none;outline:none;transition:color .3s;color:#000;cursor:pointer}.ant-page-header-back-button:focus,.ant-page-header-back-button:hover{color:#314263}.ant-page-header-back-button:active{color:#0e1730}.ant-page-header .ant-divider-vertical{height:14px;margin:0 12px;vertical-align:middle}.ant-breadcrumb+.ant-page-header-heading{margin-top:8px}.ant-page-header-heading{display:flex;justify-content:space-between}.ant-page-header-heading-left{display:flex;align-items:center;margin:4px 0;overflow:hidden}.ant-page-header-heading-title{margin-right:12px;margin-bottom:0;color:#1c2d56;font-weight:600;font-size:20px;line-height:32px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ant-page-header-heading .ant-avatar{margin-right:12px}.ant-page-header-heading-sub-title{margin-right:12px;color:#00000073;font-size:14px;line-height:1.5715;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ant-page-header-heading-extra{margin:4px 0;white-space:nowrap}.ant-page-header-heading-extra>*{margin-left:12px;white-space:unset}.ant-page-header-heading-extra>*:first-child{margin-left:0}.ant-page-header-content{padding-top:12px}.ant-page-header-footer{margin-top:16px}.ant-page-header-footer .ant-tabs>.ant-tabs-nav{margin:0}.ant-page-header-footer .ant-tabs>.ant-tabs-nav:before{border:none}.ant-page-header-footer .ant-tabs .ant-tabs-tab{padding-top:8px;padding-bottom:8px;font-size:16px}.ant-page-header-compact .ant-page-header-heading{flex-wrap:wrap}.ant-page-header-rtl{direction:rtl}.ant-page-header-rtl .ant-page-header-back{float:right;margin-right:0;margin-left:16px}.ant-page-header-rtl .ant-page-header-heading-title,.ant-page-header-rtl .ant-page-header-heading .ant-avatar{margin-right:0;margin-left:12px}.ant-page-header-rtl .ant-page-header-heading-sub-title{float:right;margin-right:0;margin-left:12px}.ant-page-header-rtl .ant-page-header-heading-tags{float:right}.ant-page-header-rtl .ant-page-header-heading-extra{float:left}.ant-page-header-rtl .ant-page-header-heading-extra>*{margin-right:12px;margin-left:0}.ant-page-header-rtl .ant-page-header-heading-extra>*:first-child{margin-right:0}.ant-page-header-rtl .ant-page-header-footer .ant-tabs-bar .ant-tabs-nav{float:right}.ant-pagination{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum"}.ant-pagination ul,.ant-pagination ol{margin:0;padding:0;list-style:none}.ant-pagination:after{display:block;clear:both;height:0;overflow:hidden;visibility:hidden;content:" "}.ant-pagination-total-text{display:inline-block;height:32px;margin-right:8px;line-height:30px;vertical-align:middle}.ant-pagination-item{display:inline-block;min-width:32px;height:32px;margin-right:8px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:30px;text-align:center;vertical-align:middle;list-style:none;background-color:var(--c-canvas);border:1px solid #d9d9d9;border-radius:5px;outline:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-pagination-item a{display:block;padding:0 6px;color:#000000d9;transition:none}.ant-pagination-item a:hover{text-decoration:none}.ant-pagination-item:hover{border-color:#8d6a46;transition:all .3s}.ant-pagination-item:hover a{color:#8d6a46}.ant-pagination-item:focus-visible{border-color:#8d6a46;transition:all .3s}.ant-pagination-item:focus-visible a{color:#8d6a46}.ant-pagination-item-active{font-weight:500;background:var(--c-canvas);border-color:#8d6a46}.ant-pagination-item-active a{color:#8d6a46}.ant-pagination-item-active:hover{border-color:#998165}.ant-pagination-item-active:focus-visible{border-color:#998165}.ant-pagination-item-active:hover a{color:#998165}.ant-pagination-item-active:focus-visible a{color:#998165}.ant-pagination-jump-prev,.ant-pagination-jump-next{outline:0}.ant-pagination-jump-prev .ant-pagination-item-container,.ant-pagination-jump-next .ant-pagination-item-container{position:relative}.ant-pagination-jump-prev .ant-pagination-item-container .ant-pagination-item-link-icon,.ant-pagination-jump-next .ant-pagination-item-container .ant-pagination-item-link-icon{color:#8d6a46;font-size:12px;letter-spacing:-1px;opacity:0;transition:all .2s}.ant-pagination-jump-prev .ant-pagination-item-container .ant-pagination-item-link-icon-svg,.ant-pagination-jump-next .ant-pagination-item-container .ant-pagination-item-link-icon-svg{top:0;right:0;bottom:0;left:0;margin:auto}.ant-pagination-jump-prev .ant-pagination-item-container .ant-pagination-item-ellipsis,.ant-pagination-jump-next .ant-pagination-item-container .ant-pagination-item-ellipsis{position:absolute;top:0;right:0;bottom:0;left:0;display:block;margin:auto;color:#00000040;font-family:Arial,Helvetica,sans-serif;letter-spacing:2px;text-align:center;text-indent:.13em;opacity:1;transition:all .2s}.ant-pagination-jump-prev:hover .ant-pagination-item-link-icon,.ant-pagination-jump-next:hover .ant-pagination-item-link-icon{opacity:1}.ant-pagination-jump-prev:hover .ant-pagination-item-ellipsis,.ant-pagination-jump-next:hover .ant-pagination-item-ellipsis{opacity:0}.ant-pagination-jump-prev:focus-visible .ant-pagination-item-link-icon,.ant-pagination-jump-next:focus-visible .ant-pagination-item-link-icon{opacity:1}.ant-pagination-jump-prev:focus-visible .ant-pagination-item-ellipsis,.ant-pagination-jump-next:focus-visible .ant-pagination-item-ellipsis{opacity:0}.ant-pagination-prev,.ant-pagination-jump-prev,.ant-pagination-jump-next{margin-right:8px}.ant-pagination-prev,.ant-pagination-next,.ant-pagination-jump-prev,.ant-pagination-jump-next{display:inline-block;min-width:32px;height:32px;color:#000000d9;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:32px;text-align:center;vertical-align:middle;list-style:none;border-radius:5px;cursor:pointer;transition:all .3s}.ant-pagination-prev,.ant-pagination-next{font-family:Arial,Helvetica,sans-serif;outline:0}.ant-pagination-prev button,.ant-pagination-next button{color:#000000d9;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-pagination-prev:hover button,.ant-pagination-next:hover button{border-color:#998165}.ant-pagination-prev .ant-pagination-item-link,.ant-pagination-next .ant-pagination-item-link{display:block;width:100%;height:100%;padding:0;font-size:12px;text-align:center;background-color:var(--c-canvas);border:1px solid #d9d9d9;border-radius:5px;outline:none;transition:all .3s}.ant-pagination-prev:focus-visible .ant-pagination-item-link,.ant-pagination-next:focus-visible .ant-pagination-item-link{color:#8d6a46;border-color:#8d6a46}.ant-pagination-prev:hover .ant-pagination-item-link,.ant-pagination-next:hover .ant-pagination-item-link{color:#8d6a46;border-color:#8d6a46}.ant-pagination-disabled,.ant-pagination-disabled:hover{cursor:not-allowed}.ant-pagination-disabled .ant-pagination-item-link,.ant-pagination-disabled:hover .ant-pagination-item-link{color:#00000040;border-color:#d9d9d9;cursor:not-allowed}.ant-pagination-disabled:focus-visible{cursor:not-allowed}.ant-pagination-disabled:focus-visible .ant-pagination-item-link{color:#00000040;border-color:#d9d9d9;cursor:not-allowed}.ant-pagination-slash{margin:0 10px 0 5px}.ant-pagination-options{display:inline-block;margin-left:16px;vertical-align:middle}@media all and (-ms-high-contrast: none){.ant-pagination-options *::-ms-backdrop,.ant-pagination-options{vertical-align:top}}.ant-pagination-options-size-changer.ant-select{display:inline-block;width:auto}.ant-pagination-options-quick-jumper{display:inline-block;height:32px;margin-left:8px;line-height:32px;vertical-align:top}.ant-pagination-options-quick-jumper input{position:relative;display:inline-block;width:100%;min-width:0;padding:10px;color:#000000d9;font-size:14px;line-height:1.5715;background-color:var(--c-canvas);background-image:none;border:1px solid #d9d9d9;border-radius:5px;transition:all .3s;width:50px;height:32px;margin:0 8px}.ant-pagination-options-quick-jumper input::-moz-placeholder{opacity:1}.ant-pagination-options-quick-jumper input::placeholder{color:#bfbfbf;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-pagination-options-quick-jumper input:-moz-placeholder{text-overflow:ellipsis}.ant-pagination-options-quick-jumper input:placeholder-shown{text-overflow:ellipsis}.ant-pagination-options-quick-jumper input:hover{border-color:#998165;border-right-width:1px!important}.ant-input-rtl .ant-pagination-options-quick-jumper input:hover{border-right-width:0;border-left-width:1px!important}.ant-pagination-options-quick-jumper input:focus,.ant-pagination-options-quick-jumper input-focused{border-color:#998165;box-shadow:0 0 0 2px #8d6a4633;border-right-width:1px!important;outline:0}.ant-input-rtl .ant-pagination-options-quick-jumper input:focus,.ant-input-rtl .ant-pagination-options-quick-jumper input-focused{border-right-width:0;border-left-width:1px!important}.ant-pagination-options-quick-jumper input-disabled{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;box-shadow:none;cursor:not-allowed;opacity:1}.ant-pagination-options-quick-jumper input-disabled:hover{border-color:#d9d9d9;border-right-width:1px!important}.ant-pagination-options-quick-jumper input[disabled]{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;box-shadow:none;cursor:not-allowed;opacity:1}.ant-pagination-options-quick-jumper input[disabled]:hover{border-color:#d9d9d9;border-right-width:1px!important}.ant-pagination-options-quick-jumper input-borderless,.ant-pagination-options-quick-jumper input-borderless:hover,.ant-pagination-options-quick-jumper input-borderless:focus,.ant-pagination-options-quick-jumper input-borderless-focused,.ant-pagination-options-quick-jumper input-borderless-disabled,.ant-pagination-options-quick-jumper input-borderless[disabled]{background-color:transparent;border:none;box-shadow:none}textarea.ant-pagination-options-quick-jumper input{max-width:100%;height:auto;min-height:32px;line-height:1.5715;vertical-align:bottom;transition:all .3s,height 0s}.ant-pagination-options-quick-jumper input-lg{padding:7.5px 11px;font-size:16px}.ant-pagination-options-quick-jumper input-sm{padding:0 7px}.ant-pagination-options-quick-jumper input-rtl{direction:rtl}.ant-pagination-simple .ant-pagination-prev,.ant-pagination-simple .ant-pagination-next{height:24px;line-height:24px;vertical-align:top}.ant-pagination-simple .ant-pagination-prev .ant-pagination-item-link,.ant-pagination-simple .ant-pagination-next .ant-pagination-item-link{height:24px;background-color:transparent;border:0}.ant-pagination-simple .ant-pagination-prev .ant-pagination-item-link:after,.ant-pagination-simple .ant-pagination-next .ant-pagination-item-link:after{height:24px;line-height:24px}.ant-pagination-simple .ant-pagination-simple-pager{display:inline-block;height:24px;margin-right:8px}.ant-pagination-simple .ant-pagination-simple-pager input{box-sizing:border-box;height:100%;margin-right:8px;padding:0 6px;text-align:center;background-color:var(--c-canvas);border:1px solid #d9d9d9;border-radius:5px;outline:none;transition:border-color .3s}.ant-pagination-simple .ant-pagination-simple-pager input:hover{border-color:#8d6a46}.ant-pagination-simple .ant-pagination-simple-pager input:focus{border-color:#998165;box-shadow:0 0 0 2px #8d6a4633}.ant-pagination-simple .ant-pagination-simple-pager input[disabled]{color:#00000040;background:#f5f5f5;border-color:#d9d9d9;cursor:not-allowed}.ant-pagination.mini .ant-pagination-total-text,.ant-pagination.mini .ant-pagination-simple-pager{height:24px;line-height:24px}.ant-pagination.mini .ant-pagination-item{min-width:24px;height:24px;margin:0;line-height:22px}.ant-pagination.mini .ant-pagination-item:not(.ant-pagination-item-active){background:transparent;border-color:transparent}.ant-pagination.mini .ant-pagination-prev,.ant-pagination.mini .ant-pagination-next{min-width:24px;height:24px;margin:0;line-height:24px}.ant-pagination.mini .ant-pagination-prev .ant-pagination-item-link,.ant-pagination.mini .ant-pagination-next .ant-pagination-item-link{background:transparent;border-color:transparent}.ant-pagination.mini .ant-pagination-prev .ant-pagination-item-link:after,.ant-pagination.mini .ant-pagination-next .ant-pagination-item-link:after{height:24px;line-height:24px}.ant-pagination.mini .ant-pagination-jump-prev,.ant-pagination.mini .ant-pagination-jump-next{height:24px;margin-right:0;line-height:24px}.ant-pagination.mini .ant-pagination-options{margin-left:2px}.ant-pagination.mini .ant-pagination-options-size-changer{top:0}.ant-pagination.mini .ant-pagination-options-quick-jumper{height:24px;line-height:24px}.ant-pagination.mini .ant-pagination-options-quick-jumper input{padding:0 7px;width:44px;height:24px}.ant-pagination.ant-pagination-disabled{cursor:not-allowed}.ant-pagination.ant-pagination-disabled .ant-pagination-item{background:#f5f5f5;border-color:#d9d9d9;cursor:not-allowed}.ant-pagination.ant-pagination-disabled .ant-pagination-item a{color:#00000040;background:transparent;border:none;cursor:not-allowed}.ant-pagination.ant-pagination-disabled .ant-pagination-item-active{background:#e6e6e6}.ant-pagination.ant-pagination-disabled .ant-pagination-item-active a{color:#00000040}.ant-pagination.ant-pagination-disabled .ant-pagination-item-link{color:#00000040;background:#f5f5f5;border-color:#d9d9d9;cursor:not-allowed}.ant-pagination-simple.ant-pagination.ant-pagination-disabled .ant-pagination-item-link{background:transparent}.ant-pagination.ant-pagination-disabled .ant-pagination-item-link-icon{opacity:0}.ant-pagination.ant-pagination-disabled .ant-pagination-item-ellipsis{opacity:1}.ant-pagination.ant-pagination-disabled .ant-pagination-simple-pager{color:#00000040}@media only screen and (max-width: 992px){.ant-pagination-item-after-jump-prev,.ant-pagination-item-before-jump-next{display:none}}@media only screen and (max-width: 576px){.ant-pagination-options{display:none}}.ant-pagination-rtl .ant-pagination-total-text,.ant-pagination-rtl .ant-pagination-item,.ant-pagination-rtl .ant-pagination-prev,.ant-pagination-rtl .ant-pagination-jump-prev,.ant-pagination-rtl .ant-pagination-jump-next{margin-right:0;margin-left:8px}.ant-pagination-rtl .ant-pagination-slash{margin:0 5px 0 10px}.ant-pagination-rtl .ant-pagination-options{margin-right:16px;margin-left:0}.ant-pagination-rtl .ant-pagination-options .ant-pagination-options-size-changer.ant-select{margin-right:0;margin-left:8px}.ant-pagination-rtl .ant-pagination-options .ant-pagination-options-quick-jumper{margin-left:0}.ant-pagination-rtl.ant-pagination-simple .ant-pagination-simple-pager,.ant-pagination-rtl.ant-pagination-simple .ant-pagination-simple-pager input{margin-right:0;margin-left:8px}.ant-pagination-rtl.ant-pagination.mini .ant-pagination-options{margin-right:2px;margin-left:0}.ant-popconfirm{z-index:1060}.ant-popover{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:absolute;top:0;left:0;z-index:1030;font-weight:400;white-space:normal;text-align:left;cursor:auto;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ant-popover:after{position:absolute;background:#ffffff03;content:""}.ant-popover-hidden{display:none}.ant-popover-placement-top,.ant-popover-placement-topLeft,.ant-popover-placement-topRight{padding-bottom:10px}.ant-popover-placement-right,.ant-popover-placement-rightTop,.ant-popover-placement-rightBottom{padding-left:10px}.ant-popover-placement-bottom,.ant-popover-placement-bottomLeft,.ant-popover-placement-bottomRight{padding-top:10px}.ant-popover-placement-left,.ant-popover-placement-leftTop,.ant-popover-placement-leftBottom{padding-right:10px}.ant-popover-inner{background-color:var(--c-canvas);background-clip:padding-box;border-radius:5px;box-shadow:0 3px 6px -4px #0000001f,0 6px 16px #00000014,0 9px 28px 8px #0000000d;box-shadow:0 0 8px #00000026 \ }@media screen and (-ms-high-contrast: active),(-ms-high-contrast: none){.ant-popover-inner{box-shadow:0 3px 6px -4px #0000001f,0 6px 16px #00000014,0 9px 28px 8px #0000000d}}.ant-popover-title{min-width:177px;min-height:32px;margin:0;padding:5px 16px 4px;color:#1c2d56;font-weight:500;border-bottom:1px solid #f0f0f0}.ant-popover-inner-content{padding:12px 16px;color:#000000d9}.ant-popover-message{position:relative;padding:4px 0 12px;color:#000000d9;font-size:14px}.ant-popover-message>.anticon{position:absolute;top:8.0005px;color:#faad14;font-size:14px}.ant-popover-message-title{padding-left:22px}.ant-popover-buttons{margin-bottom:4px;text-align:right}.ant-popover-buttons button{margin-left:8px}.ant-popover-arrow{position:absolute;display:block;width:8.48528137px;height:8.48528137px;overflow:hidden;background:transparent;pointer-events:none}.ant-popover-arrow-content{position:absolute;top:0;right:0;bottom:0;left:0;display:block;width:6px;height:6px;margin:auto;background-color:var(--c-canvas);content:"";pointer-events:auto}.ant-popover-placement-top .ant-popover-arrow,.ant-popover-placement-topLeft .ant-popover-arrow,.ant-popover-placement-topRight .ant-popover-arrow{bottom:1.51471863px}.ant-popover-placement-top .ant-popover-arrow-content,.ant-popover-placement-topLeft .ant-popover-arrow-content,.ant-popover-placement-topRight .ant-popover-arrow-content{box-shadow:3px 3px 7px #00000012;transform:translateY(-4.24264069px) rotate(45deg)}.ant-popover-placement-top .ant-popover-arrow{left:50%;transform:translate(-50%)}.ant-popover-placement-topLeft .ant-popover-arrow{left:16px}.ant-popover-placement-topRight .ant-popover-arrow{right:16px}.ant-popover-placement-right .ant-popover-arrow,.ant-popover-placement-rightTop .ant-popover-arrow,.ant-popover-placement-rightBottom .ant-popover-arrow{left:1.51471863px}.ant-popover-placement-right .ant-popover-arrow-content,.ant-popover-placement-rightTop .ant-popover-arrow-content,.ant-popover-placement-rightBottom .ant-popover-arrow-content{box-shadow:-3px 3px 7px #00000012;transform:translate(4.24264069px) rotate(45deg)}.ant-popover-placement-right .ant-popover-arrow{top:50%;transform:translateY(-50%)}.ant-popover-placement-rightTop .ant-popover-arrow{top:12px}.ant-popover-placement-rightBottom .ant-popover-arrow{bottom:12px}.ant-popover-placement-bottom .ant-popover-arrow,.ant-popover-placement-bottomLeft .ant-popover-arrow,.ant-popover-placement-bottomRight .ant-popover-arrow{top:1.51471863px}.ant-popover-placement-bottom .ant-popover-arrow-content,.ant-popover-placement-bottomLeft .ant-popover-arrow-content,.ant-popover-placement-bottomRight .ant-popover-arrow-content{box-shadow:-2px -2px 5px #0000000f;transform:translateY(4.24264069px) rotate(45deg)}.ant-popover-placement-bottom .ant-popover-arrow{left:50%;transform:translate(-50%)}.ant-popover-placement-bottomLeft .ant-popover-arrow{left:16px}.ant-popover-placement-bottomRight .ant-popover-arrow{right:16px}.ant-popover-placement-left .ant-popover-arrow,.ant-popover-placement-leftTop .ant-popover-arrow,.ant-popover-placement-leftBottom .ant-popover-arrow{right:1.51471863px}.ant-popover-placement-left .ant-popover-arrow-content,.ant-popover-placement-leftTop .ant-popover-arrow-content,.ant-popover-placement-leftBottom .ant-popover-arrow-content{box-shadow:3px -3px 7px #00000012;transform:translate(-4.24264069px) rotate(45deg)}.ant-popover-placement-left .ant-popover-arrow{top:50%;transform:translateY(-50%)}.ant-popover-placement-leftTop .ant-popover-arrow{top:12px}.ant-popover-placement-leftBottom .ant-popover-arrow{bottom:12px}.ant-popover-pink .ant-popover-inner,.ant-popover-pink .ant-popover-arrow-content,.ant-popover-magenta .ant-popover-inner,.ant-popover-magenta .ant-popover-arrow-content{background-color:#eb2f96}.ant-popover-red .ant-popover-inner,.ant-popover-red .ant-popover-arrow-content{background-color:#f5222d}.ant-popover-volcano .ant-popover-inner,.ant-popover-volcano .ant-popover-arrow-content{background-color:#fa541c}.ant-popover-orange .ant-popover-inner,.ant-popover-orange .ant-popover-arrow-content{background-color:#fa8c16}.ant-popover-yellow .ant-popover-inner,.ant-popover-yellow .ant-popover-arrow-content{background-color:#fadb14}.ant-popover-gold .ant-popover-inner,.ant-popover-gold .ant-popover-arrow-content{background-color:#faad14}.ant-popover-cyan .ant-popover-inner,.ant-popover-cyan .ant-popover-arrow-content{background-color:#13c2c2}.ant-popover-lime .ant-popover-inner,.ant-popover-lime .ant-popover-arrow-content{background-color:#a0d911}.ant-popover-green .ant-popover-inner,.ant-popover-green .ant-popover-arrow-content{background-color:#52c41a}.ant-popover-blue .ant-popover-inner,.ant-popover-blue .ant-popover-arrow-content{background-color:#1890ff}.ant-popover-geekblue .ant-popover-inner,.ant-popover-geekblue .ant-popover-arrow-content{background-color:#2f54eb}.ant-popover-purple .ant-popover-inner,.ant-popover-purple .ant-popover-arrow-content{background-color:#722ed1}.ant-popover-rtl{direction:rtl;text-align:right}.ant-popover-rtl .ant-popover-message-title{padding-right:22px;padding-left:16px}.ant-popover-rtl .ant-popover-buttons{text-align:left}.ant-popover-rtl .ant-popover-buttons button{margin-right:8px;margin-left:0}.ant-progress{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";display:inline-block}.ant-progress-line{position:relative;width:100%;font-size:14px}.ant-progress-steps{display:inline-block}.ant-progress-steps-outer{display:flex;flex-direction:row;align-items:center}.ant-progress-steps-item{flex-shrink:0;min-width:2px;margin-right:2px;background:#f3f3f3;transition:all .3s}.ant-progress-steps-item-active{background:#1890ff}.ant-progress-small.ant-progress-line,.ant-progress-small.ant-progress-line .ant-progress-text .anticon{font-size:12px}.ant-progress-outer{display:inline-block;width:100%;margin-right:0;padding-right:0}.ant-progress-show-info .ant-progress-outer{margin-right:calc(-2em - 8px);padding-right:calc(2em + 8px)}.ant-progress-inner{position:relative;display:inline-block;width:100%;overflow:hidden;vertical-align:middle;background-color:#f5f5f5;border-radius:100px}.ant-progress-circle-trail{stroke:#f5f5f5}.ant-progress-circle-path{animation:ant-progress-appear .3s}.ant-progress-inner:not(.ant-progress-circle-gradient) .ant-progress-circle-path{stroke:#1890ff}.ant-progress-success-bg,.ant-progress-bg{position:relative;background-color:#1890ff;border-radius:100px;transition:all .4s cubic-bezier(.08,.82,.17,1) 0s}.ant-progress-success-bg{position:absolute;top:0;left:0;background-color:#52c41a}.ant-progress-text{display:inline-block;width:2em;margin-left:8px;color:#000000d9;font-size:1em;line-height:1;white-space:nowrap;text-align:left;vertical-align:middle;word-break:normal}.ant-progress-text .anticon{font-size:14px}.ant-progress-status-active .ant-progress-bg:before{position:absolute;top:0;right:0;bottom:0;left:0;background:var(--c-canvas);border-radius:10px;opacity:0;animation:ant-progress-active 2.4s cubic-bezier(.23,1,.32,1) infinite;content:""}.ant-progress-status-exception .ant-progress-bg{background-color:#e31a1a}.ant-progress-status-exception .ant-progress-text{color:#e31a1a}.ant-progress-status-exception .ant-progress-inner:not(.ant-progress-circle-gradient) .ant-progress-circle-path{stroke:#e31a1a}.ant-progress-status-success .ant-progress-bg{background-color:#52c41a}.ant-progress-status-success .ant-progress-text{color:#52c41a}.ant-progress-status-success .ant-progress-inner:not(.ant-progress-circle-gradient) .ant-progress-circle-path{stroke:#52c41a}.ant-progress-circle .ant-progress-inner{position:relative;line-height:1;background-color:transparent}.ant-progress-circle .ant-progress-text{position:absolute;top:50%;left:50%;width:100%;margin:0;padding:0;color:#000000d9;font-size:1em;line-height:1;white-space:normal;text-align:center;transform:translate(-50%,-50%)}.ant-progress-circle .ant-progress-text .anticon{font-size:1.16666667em}.ant-progress-circle.ant-progress-status-exception .ant-progress-text{color:#e31a1a}.ant-progress-circle.ant-progress-status-success .ant-progress-text{color:#52c41a}@keyframes ant-progress-active{0%{transform:translate(-100%) scaleX(0);opacity:.1}20%{transform:translate(-100%) scaleX(0);opacity:.5}to{transform:translate(0) scaleX(1);opacity:0}}.ant-progress-rtl{direction:rtl}.ant-progress-rtl.ant-progress-show-info .ant-progress-outer{margin-right:0;margin-left:calc(-2em - 8px);padding-right:0;padding-left:calc(2em + 8px)}.ant-progress-rtl .ant-progress-success-bg{right:0;left:auto}.ant-progress-rtl.ant-progress-line .ant-progress-text,.ant-progress-rtl.ant-progress-steps .ant-progress-text{margin-right:8px;margin-left:0;text-align:right}.ant-radio-group{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";display:inline-block;font-size:0}.ant-radio-group .ant-badge-count{z-index:1}.ant-radio-group>.ant-badge:not(:first-child)>.ant-radio-button-wrapper{border-left:none}.ant-radio-wrapper{box-sizing:border-box;margin:0 8px 0 0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:relative;display:inline-flex;align-items:baseline;cursor:pointer}.ant-radio-wrapper-disabled{cursor:not-allowed}.ant-radio-wrapper:after{display:inline-block;width:0;overflow:hidden;content:" "}.ant-radio{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:relative;top:.2em;display:inline-block;outline:none;cursor:pointer}.ant-radio-wrapper:hover .ant-radio,.ant-radio:hover .ant-radio-inner,.ant-radio-input:focus+.ant-radio-inner{border-color:#8d6a46}.ant-radio-input:focus+.ant-radio-inner{box-shadow:0 0 0 3px #ccc8c0}.ant-radio-checked:after{position:absolute;top:0;left:0;width:100%;height:100%;border:1px solid #8D6A46;border-radius:50%;visibility:hidden;animation:antRadioEffect .36s ease-in-out;animation-fill-mode:both;content:""}.ant-radio:hover:after,.ant-radio-wrapper:hover .ant-radio:after{visibility:visible}.ant-radio-inner{position:relative;top:0;left:0;display:block;width:16px;height:16px;background-color:var(--c-canvas);border-color:#d9d9d9;border-style:solid;border-width:1px;border-radius:50%;transition:all .3s}.ant-radio-inner:after{position:absolute;top:50%;left:50%;display:block;width:16px;height:16px;margin-top:-8px;margin-left:-8px;background-color:#8d6a46;border-top:0;border-left:0;border-radius:16px;transform:scale(0);opacity:0;transition:all .3s cubic-bezier(.78,.14,.15,.86);content:" "}.ant-radio-input{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;cursor:pointer;opacity:0}.ant-radio-checked .ant-radio-inner{border-color:#8d6a46}.ant-radio-checked .ant-radio-inner:after{transform:scale(.5);opacity:1;transition:all .3s cubic-bezier(.78,.14,.15,.86)}.ant-radio-disabled{cursor:not-allowed}.ant-radio-disabled .ant-radio-inner{background-color:#f5f5f5;border-color:#d9d9d9!important;cursor:not-allowed}.ant-radio-disabled .ant-radio-inner:after{background-color:#0003}.ant-radio-disabled .ant-radio-input{cursor:not-allowed}.ant-radio-disabled+span{color:#00000040;cursor:not-allowed}span.ant-radio+*{padding-right:8px;padding-left:8px}.ant-radio-button-wrapper{position:relative;display:inline-block;height:32px;margin:0;padding:0 15px;color:#000000d9;font-size:14px;line-height:30px;background:var(--c-canvas);border:1px solid #d9d9d9;border-top-width:1.02px;border-left-width:0;cursor:pointer;transition:color .3s,background .3s,border-color .3s,box-shadow .3s}.ant-radio-button-wrapper a{color:#000000d9}.ant-radio-button-wrapper>.ant-radio-button{position:absolute;top:0;left:0;z-index:-1;width:100%;height:100%}.ant-radio-group-large .ant-radio-button-wrapper{height:42px;font-size:16px;line-height:40px}.ant-radio-group-small .ant-radio-button-wrapper{height:24px;padding:0 7px;line-height:22px}.ant-radio-button-wrapper:not(:first-child):before{position:absolute;top:-1px;left:-1px;display:block;box-sizing:content-box;width:1px;height:100%;padding:1px 0;background-color:#d9d9d9;transition:background-color .3s;content:""}.ant-radio-button-wrapper:first-child{border-left:1px solid #d9d9d9;border-radius:5px 0 0 5px}.ant-radio-button-wrapper:last-child{border-radius:0 5px 5px 0}.ant-radio-button-wrapper:first-child:last-child{border-radius:5px}.ant-radio-button-wrapper:hover{position:relative;color:#8d6a46}.ant-radio-button-wrapper:focus-within{box-shadow:0 0 0 3px #ccc8c0}.ant-radio-button-wrapper .ant-radio-inner,.ant-radio-button-wrapper input[type=checkbox],.ant-radio-button-wrapper input[type=radio]{width:0;height:0;opacity:0;pointer-events:none}.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled){z-index:1;color:#8d6a46;background:var(--c-canvas);border-color:#8d6a46}.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):before{background-color:#8d6a46}.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):first-child{border-color:#8d6a46}.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):hover{color:#998165;border-color:#998165}.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):hover:before{background-color:#998165}.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):active{color:#66482e;border-color:#66482e}.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):active:before{background-color:#66482e}.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):focus-within{box-shadow:0 0 0 3px #ccc8c0}.ant-radio-group-solid .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled){color:var(--c-canvas);background:#8d6a46;border-color:#8d6a46}.ant-radio-group-solid .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):hover{color:var(--c-canvas);background:#998165;border-color:#998165}.ant-radio-group-solid .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):active{color:var(--c-canvas);background:#66482e;border-color:#66482e}.ant-radio-group-solid .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):focus-within{box-shadow:0 0 0 3px #ccc8c0}.ant-radio-button-wrapper-disabled{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;cursor:not-allowed}.ant-radio-button-wrapper-disabled:first-child,.ant-radio-button-wrapper-disabled:hover{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9}.ant-radio-button-wrapper-disabled:first-child{border-left-color:#d9d9d9}.ant-radio-button-wrapper-disabled.ant-radio-button-wrapper-checked{color:#00000040;background-color:#e6e6e6;border-color:#d9d9d9;box-shadow:none}@keyframes antRadioEffect{0%{transform:scale(1);opacity:.5}to{transform:scale(1.6);opacity:0}}.ant-radio-group.ant-radio-group-rtl{direction:rtl}.ant-radio-wrapper.ant-radio-wrapper-rtl{margin-right:0;margin-left:8px;direction:rtl}.ant-radio-button-wrapper.ant-radio-button-wrapper-rtl{border-right-width:0;border-left-width:1px}.ant-radio-button-wrapper.ant-radio-button-wrapper-rtl.ant-radio-button-wrapper:not(:first-child):before{right:-1px;left:0}.ant-radio-button-wrapper.ant-radio-button-wrapper-rtl.ant-radio-button-wrapper:first-child{border-right:1px solid #d9d9d9;border-radius:0 5px 5px 0}.ant-radio-button-wrapper-checked:not([class*=" ant-radio-button-wrapper-disabled"]).ant-radio-button-wrapper:first-child{border-right-color:#998165}.ant-radio-button-wrapper.ant-radio-button-wrapper-rtl.ant-radio-button-wrapper:last-child{border-radius:5px 0 0 5px}.ant-radio-button-wrapper.ant-radio-button-wrapper-rtl.ant-radio-button-wrapper-disabled:first-child{border-right-color:#d9d9d9}.ant-rate{box-sizing:border-box;color:#000000d9;font-variant:tabular-nums;line-height:1.5715;font-feature-settings:"tnum";display:inline-block;margin:0;padding:0;color:#fadb14;font-size:20px;line-height:unset;list-style:none;outline:none}.ant-rate-disabled .ant-rate-star{cursor:default}.ant-rate-disabled .ant-rate-star:hover{transform:scale(1)}.ant-rate-star{position:relative;display:inline-block;color:inherit;cursor:pointer}.ant-rate-star:not(:last-child){margin-right:8px}.ant-rate-star>div{transition:all .3s,outline 0s}.ant-rate-star>div:hover{transform:scale(1.1)}.ant-rate-star>div:focus{outline:0}.ant-rate-star>div:focus-visible{outline:1px dashed #fadb14;transform:scale(1.1)}.ant-rate-star-first,.ant-rate-star-second{color:#f0f0f0;transition:all .3s;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-rate-star-first .anticon,.ant-rate-star-second .anticon{vertical-align:middle}.ant-rate-star-first{position:absolute;top:0;left:0;width:50%;height:100%;overflow:hidden;opacity:0}.ant-rate-star-half .ant-rate-star-first,.ant-rate-star-half .ant-rate-star-second{opacity:1}.ant-rate-star-half .ant-rate-star-first,.ant-rate-star-full .ant-rate-star-second{color:inherit}.ant-rate-text{display:inline-block;margin:0 8px;font-size:14px}.ant-rate-rtl{direction:rtl}.ant-rate-rtl .ant-rate-star:not(:last-child){margin-right:0;margin-left:8px}.ant-rate-rtl .ant-rate-star-first{right:0;left:auto}.ant-result{padding:48px 32px}.ant-result-success .ant-result-icon>.anticon{color:#52c41a}.ant-result-error .ant-result-icon>.anticon{color:#e31a1a}.ant-result-info .ant-result-icon>.anticon{color:#8d6a46}.ant-result-warning .ant-result-icon>.anticon{color:#faad14}.ant-result-image{width:250px;height:295px;margin:auto}.ant-result-icon{margin-bottom:24px;text-align:center}.ant-result-icon>.anticon{font-size:72px}.ant-result-title{color:#1c2d56;font-size:24px;line-height:1.8;text-align:center}.ant-result-subtitle{color:#00000073;font-size:14px;line-height:1.6;text-align:center}.ant-result-extra{margin:24px 0 0;text-align:center}.ant-result-extra>*{margin-right:8px}.ant-result-extra>*:last-child{margin-right:0}.ant-result-content{margin-top:24px;padding:24px 40px;background-color:#fafafa}.ant-result-rtl{direction:rtl}.ant-result-rtl .ant-result-extra>*{margin-right:0;margin-left:8px}.ant-result-rtl .ant-result-extra>*:last-child{margin-left:0}.ant-select-single .ant-select-selector{display:flex}.ant-select-single .ant-select-selector .ant-select-selection-search{position:absolute;top:0;right:10px;bottom:0;left:10px}.ant-select-single .ant-select-selector .ant-select-selection-search-input{width:100%}.ant-select-single .ant-select-selector .ant-select-selection-item,.ant-select-single .ant-select-selector .ant-select-selection-placeholder{padding:0;line-height:30px;transition:all .3s}@supports (-moz-appearance: meterbar){.ant-select-single .ant-select-selector .ant-select-selection-item,.ant-select-single .ant-select-selector .ant-select-selection-placeholder{line-height:30px}}.ant-select-single .ant-select-selector .ant-select-selection-item{position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-select-single .ant-select-selector .ant-select-selection-placeholder{transition:none;pointer-events:none}.ant-select-single .ant-select-selector:after,.ant-select-single .ant-select-selector .ant-select-selection-item:after,.ant-select-single .ant-select-selector .ant-select-selection-placeholder:after{display:inline-block;width:0;visibility:hidden;content:" "}.ant-select-single.ant-select-show-arrow .ant-select-selection-search{right:24px}.ant-select-single.ant-select-show-arrow .ant-select-selection-item,.ant-select-single.ant-select-show-arrow .ant-select-selection-placeholder{padding-right:18px}.ant-select-single.ant-select-open .ant-select-selection-item{color:#bfbfbf}.ant-select-single:not(.ant-select-customize-input) .ant-select-selector{width:100%;height:32px;padding:0 10px}.ant-select-single:not(.ant-select-customize-input) .ant-select-selector .ant-select-selection-search-input{height:30px}.ant-select-single:not(.ant-select-customize-input) .ant-select-selector:after{line-height:30px}.ant-select-single.ant-select-customize-input .ant-select-selector:after{display:none}.ant-select-single.ant-select-customize-input .ant-select-selector .ant-select-selection-search{position:static;width:100%}.ant-select-single.ant-select-customize-input .ant-select-selector .ant-select-selection-placeholder{position:absolute;right:0;left:0;padding:0 10px}.ant-select-single.ant-select-customize-input .ant-select-selector .ant-select-selection-placeholder:after{display:none}.ant-select-single.ant-select-lg:not(.ant-select-customize-input) .ant-select-selector{height:40px}.ant-select-single.ant-select-lg:not(.ant-select-customize-input) .ant-select-selector:after,.ant-select-single.ant-select-lg:not(.ant-select-customize-input) .ant-select-selector .ant-select-selection-item,.ant-select-single.ant-select-lg:not(.ant-select-customize-input) .ant-select-selector .ant-select-selection-placeholder{line-height:38px}.ant-select-single.ant-select-lg:not(.ant-select-customize-input):not(.ant-select-customize-input) .ant-select-selection-search-input{height:38px}.ant-select-single.ant-select-sm:not(.ant-select-customize-input) .ant-select-selector{height:24px}.ant-select-single.ant-select-sm:not(.ant-select-customize-input) .ant-select-selector:after,.ant-select-single.ant-select-sm:not(.ant-select-customize-input) .ant-select-selector .ant-select-selection-item,.ant-select-single.ant-select-sm:not(.ant-select-customize-input) .ant-select-selector .ant-select-selection-placeholder{line-height:22px}.ant-select-single.ant-select-sm:not(.ant-select-customize-input):not(.ant-select-customize-input) .ant-select-selection-search-input{height:22px}.ant-select-single.ant-select-sm:not(.ant-select-customize-input) .ant-select-selection-search{right:7px;left:7px}.ant-select-single.ant-select-sm:not(.ant-select-customize-input) .ant-select-selector{padding:0 7px}.ant-select-single.ant-select-sm:not(.ant-select-customize-input).ant-select-show-arrow .ant-select-selection-search{right:28px}.ant-select-single.ant-select-sm:not(.ant-select-customize-input).ant-select-show-arrow .ant-select-selection-item,.ant-select-single.ant-select-sm:not(.ant-select-customize-input).ant-select-show-arrow .ant-select-selection-placeholder{padding-right:21px}.ant-select-single.ant-select-lg:not(.ant-select-customize-input) .ant-select-selector{padding:0 11px}.ant-select-selection-overflow{position:relative;display:flex;flex:auto;flex-wrap:wrap;max-width:100%}.ant-select-selection-overflow-item{flex:none;align-self:center;max-width:100%}.ant-select-multiple .ant-select-selector{display:flex;flex-wrap:wrap;align-items:center;padding:4px 10px}.ant-select-show-search.ant-select-multiple .ant-select-selector{cursor:text}.ant-select-disabled.ant-select-multiple .ant-select-selector{background:#f5f5f5;cursor:not-allowed}.ant-select-multiple .ant-select-selector:after{display:inline-block;width:0;margin:5px 0;line-height:12px;content:" "}.ant-select-multiple.ant-select-show-arrow .ant-select-selector,.ant-select-multiple.ant-select-allow-clear .ant-select-selector{padding-right:24px}.ant-select-multiple .ant-select-selection-item{position:relative;display:flex;flex:none;box-sizing:border-box;max-width:100%;height:12px;margin-top:5px;margin-bottom:5px;line-height:10px;background:#f5f5f5;border:1px solid #f0f0f0;border-radius:5px;cursor:default;transition:font-size .3s,line-height .3s,height .3s;-webkit-user-select:none;-moz-user-select:none;user-select:none;margin-inline-end:10px;padding-inline-start:8px;padding-inline-end:4px}.ant-select-disabled.ant-select-multiple .ant-select-selection-item{color:#bfbfbf;border-color:#d9d9d9;cursor:not-allowed}.ant-select-multiple .ant-select-selection-item-content{display:inline-block;margin-right:4px;overflow:hidden;white-space:pre;text-overflow:ellipsis}.ant-select-multiple .ant-select-selection-item-remove{color:inherit;font-style:normal;line-height:0;text-align:center;text-transform:none;vertical-align:-.125em;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;color:#00000073;font-weight:700;font-size:10px;line-height:inherit;cursor:pointer}.ant-select-multiple .ant-select-selection-item-remove>*{line-height:1}.ant-select-multiple .ant-select-selection-item-remove svg{display:inline-block}.ant-select-multiple .ant-select-selection-item-remove:before{display:none}.ant-select-multiple .ant-select-selection-item-remove .ant-select-multiple .ant-select-selection-item-remove-icon{display:block}.ant-select-multiple .ant-select-selection-item-remove>.anticon{vertical-align:-.2em}.ant-select-multiple .ant-select-selection-item-remove:hover{color:#000000bf}.ant-select-multiple .ant-select-selection-overflow-item+.ant-select-selection-overflow-item .ant-select-selection-search{margin-inline-start:0}.ant-select-multiple .ant-select-selection-search{position:relative;max-width:100%;margin-inline-start:0px}.ant-select-multiple .ant-select-selection-search-input,.ant-select-multiple .ant-select-selection-search-mirror{height:12px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:12px;transition:all .3s}.ant-select-multiple .ant-select-selection-search-input{width:100%;min-width:4.1px}.ant-select-multiple .ant-select-selection-search-mirror{position:absolute;top:0;left:0;z-index:999;white-space:pre;visibility:hidden}.ant-select-multiple .ant-select-selection-placeholder{position:absolute;top:50%;right:11px;left:11px;transform:translateY(-50%);transition:all .3s}.ant-select-multiple.ant-select-lg .ant-select-selector:after{line-height:22px}.ant-select-multiple.ant-select-lg .ant-select-selection-item{height:22px;line-height:20px}.ant-select-multiple.ant-select-lg .ant-select-selection-search{height:22px;line-height:22px}.ant-select-multiple.ant-select-lg .ant-select-selection-search-input,.ant-select-multiple.ant-select-lg .ant-select-selection-search-mirror{height:22px;line-height:20px}.ant-select-multiple.ant-select-sm .ant-select-selector:after{line-height:4px}.ant-select-multiple.ant-select-sm .ant-select-selection-item{height:4px;line-height:2px}.ant-select-multiple.ant-select-sm .ant-select-selection-search{height:4px;line-height:4px}.ant-select-multiple.ant-select-sm .ant-select-selection-search-input,.ant-select-multiple.ant-select-sm .ant-select-selection-search-mirror{height:4px;line-height:2px}.ant-select-multiple.ant-select-sm .ant-select-selection-placeholder{left:7px}.ant-select-multiple.ant-select-sm .ant-select-selection-search{margin-inline-start:3px}.ant-select-multiple.ant-select-lg .ant-select-selection-item{height:32px;line-height:32px}.ant-select-disabled .ant-select-selection-item-remove{display:none}.ant-select{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:relative;display:inline-block;cursor:pointer}.ant-select:not(.ant-select-customize-input) .ant-select-selector{position:relative;background-color:var(--c-canvas);border:1px solid #d9d9d9;border-radius:5px;transition:all .3s cubic-bezier(.645,.045,.355,1)}.ant-select:not(.ant-select-customize-input) .ant-select-selector input{cursor:pointer}.ant-select-show-search.ant-select:not(.ant-select-customize-input) .ant-select-selector{cursor:text}.ant-select-show-search.ant-select:not(.ant-select-customize-input) .ant-select-selector input{cursor:auto}.ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector{border-color:#998165;box-shadow:0 0 0 2px #8d6a4633;border-right-width:1px!important;outline:0}.ant-input-rtl .ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector{border-right-width:0;border-left-width:1px!important}.ant-select-disabled.ant-select:not(.ant-select-customize-input) .ant-select-selector{color:#00000040;background:#f5f5f5;cursor:not-allowed}.ant-select-multiple.ant-select-disabled.ant-select:not(.ant-select-customize-input) .ant-select-selector{background:#f5f5f5}.ant-select-disabled.ant-select:not(.ant-select-customize-input) .ant-select-selector input{cursor:not-allowed}.ant-select:not(.ant-select-customize-input) .ant-select-selector .ant-select-selection-search-input{margin:0;padding:0;background:transparent;border:none;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.ant-select:not(.ant-select-customize-input) .ant-select-selector .ant-select-selection-search-input::-webkit-search-cancel-button{display:none;-webkit-appearance:none}.ant-select:not(.ant-select-disabled):hover .ant-select-selector{border-color:#998165;border-right-width:1px!important}.ant-input-rtl .ant-select:not(.ant-select-disabled):hover .ant-select-selector{border-right-width:0;border-left-width:1px!important}.ant-select-selection-item{flex:1;overflow:hidden;font-weight:400;white-space:nowrap;text-overflow:ellipsis}@media all and (-ms-high-contrast: none){.ant-select-selection-item *::-ms-backdrop,.ant-select-selection-item{flex:auto}}.ant-select-selection-placeholder{flex:1;overflow:hidden;color:#bfbfbf;white-space:nowrap;text-overflow:ellipsis;pointer-events:none}@media all and (-ms-high-contrast: none){.ant-select-selection-placeholder *::-ms-backdrop,.ant-select-selection-placeholder{flex:auto}}.ant-select-arrow{display:inline-block;color:inherit;font-style:normal;text-transform:none;vertical-align:-.125em;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:absolute;top:50%;right:11px;width:12px;height:12px;margin-top:-6px;color:#00000040;font-size:12px;line-height:1;text-align:center;pointer-events:none}.ant-select-arrow>*{line-height:1}.ant-select-arrow svg{display:inline-block}.ant-select-arrow:before{display:none}.ant-select-arrow .ant-select-arrow-icon{display:block}.ant-select-arrow .anticon{vertical-align:top;transition:transform .3s}.ant-select-arrow .anticon>svg{vertical-align:top}.ant-select-arrow .anticon:not(.ant-select-suffix){pointer-events:auto}.ant-select-disabled .ant-select-arrow{cursor:not-allowed}.ant-select-clear{position:absolute;top:50%;right:11px;z-index:1;display:inline-block;width:12px;height:12px;margin-top:-6px;color:#00000040;font-size:12px;font-style:normal;line-height:1;text-align:center;text-transform:none;background:var(--c-canvas);cursor:pointer;opacity:0;transition:color .3s ease,opacity .15s ease;text-rendering:auto}.ant-select-clear:before{display:block}.ant-select-clear:hover{color:#00000073}.ant-select:hover .ant-select-clear{opacity:1}.ant-select-dropdown{margin:0;color:#000000d9;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:absolute;top:-9999px;left:-9999px;z-index:1050;box-sizing:border-box;padding:4px 0;overflow:hidden;font-size:14px;font-variant:initial;background-color:var(--c-canvas);border-radius:5px;outline:none;box-shadow:0 3px 6px -4px #0000001f,0 6px 16px #00000014,0 9px 28px 8px #0000000d}.ant-select-dropdown.ant-slide-up-enter.ant-slide-up-enter-active.ant-select-dropdown-placement-bottomLeft,.ant-select-dropdown.ant-slide-up-appear.ant-slide-up-appear-active.ant-select-dropdown-placement-bottomLeft{animation-name:antSlideUpIn}.ant-select-dropdown.ant-slide-up-enter.ant-slide-up-enter-active.ant-select-dropdown-placement-topLeft,.ant-select-dropdown.ant-slide-up-appear.ant-slide-up-appear-active.ant-select-dropdown-placement-topLeft{animation-name:antSlideDownIn}.ant-select-dropdown.ant-slide-up-leave.ant-slide-up-leave-active.ant-select-dropdown-placement-bottomLeft{animation-name:antSlideUpOut}.ant-select-dropdown.ant-slide-up-leave.ant-slide-up-leave-active.ant-select-dropdown-placement-topLeft{animation-name:antSlideDownOut}.ant-select-dropdown-hidden{display:none}.ant-select-dropdown-empty{color:#00000040}.ant-select-item-empty{position:relative;display:block;min-height:32px;padding:5px 12px;color:#000000d9;font-weight:400;font-size:14px;line-height:22px;color:#00000040}.ant-select-item{position:relative;display:block;min-height:32px;padding:5px 12px;color:#000000d9;font-weight:400;font-size:14px;line-height:22px;cursor:pointer;transition:background .3s ease}.ant-select-item-group{color:#00000073;font-size:12px;cursor:default}.ant-select-item-option{display:flex}.ant-select-item-option-content{flex:auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ant-select-item-option-state{flex:none}.ant-select-item-option-active:not(.ant-select-item-option-disabled){background-color:#f5f5f5}.ant-select-item-option-selected:not(.ant-select-item-option-disabled){color:#000000d9;font-weight:600;background-color:#ccc8c0}.ant-select-item-option-selected:not(.ant-select-item-option-disabled) .ant-select-item-option-state{color:#8d6a46}.ant-select-item-option-disabled{color:#00000040;cursor:not-allowed}.ant-select-item-option-disabled.ant-select-item-option-selected{background-color:#f5f5f5}.ant-select-item-option-grouped{padding-left:24px}.ant-select-lg{font-size:16px}.ant-select-borderless .ant-select-selector{background-color:transparent!important;border-color:transparent!important;box-shadow:none!important}.ant-select-rtl{direction:rtl}.ant-select-rtl .ant-select-arrow,.ant-select-rtl .ant-select-clear{right:initial;left:11px}.ant-select-dropdown-rtl{direction:rtl}.ant-select-dropdown-rtl .ant-select-item-option-grouped{padding-right:24px;padding-left:12px}.ant-select-rtl.ant-select-multiple.ant-select-show-arrow .ant-select-selector,.ant-select-rtl.ant-select-multiple.ant-select-allow-clear .ant-select-selector{padding-right:10px;padding-left:24px}.ant-select-rtl.ant-select-multiple .ant-select-selection-item{text-align:right}.ant-select-rtl.ant-select-multiple .ant-select-selection-item-content{margin-right:0;margin-left:4px;text-align:right}.ant-select-rtl.ant-select-multiple .ant-select-selection-search-mirror{right:0;left:auto}.ant-select-rtl.ant-select-multiple .ant-select-selection-placeholder{right:11px;left:auto}.ant-select-rtl.ant-select-multiple.ant-select-sm .ant-select-selection-placeholder{right:7px}.ant-select-rtl.ant-select-single .ant-select-selector .ant-select-selection-item,.ant-select-rtl.ant-select-single .ant-select-selector .ant-select-selection-placeholder{right:0;left:9px;text-align:right}.ant-select-rtl.ant-select-single.ant-select-show-arrow .ant-select-selection-search{right:10px;left:24px}.ant-select-rtl.ant-select-single.ant-select-show-arrow .ant-select-selection-item,.ant-select-rtl.ant-select-single.ant-select-show-arrow .ant-select-selection-placeholder{padding-right:0;padding-left:18px}.ant-select-rtl.ant-select-single.ant-select-sm:not(.ant-select-customize-input).ant-select-show-arrow .ant-select-selection-search{right:6px}.ant-select-rtl.ant-select-single.ant-select-sm:not(.ant-select-customize-input).ant-select-show-arrow .ant-select-selection-item,.ant-select-rtl.ant-select-single.ant-select-sm:not(.ant-select-customize-input).ant-select-show-arrow .ant-select-selection-placeholder{padding-right:0;padding-left:21px}.ant-skeleton{display:table;width:100%}.ant-skeleton-header{display:table-cell;padding-right:16px;vertical-align:top}.ant-skeleton-header .ant-skeleton-avatar{display:inline-block;vertical-align:top;background:#bebebe33;width:32px;height:32px;line-height:32px}.ant-skeleton-header .ant-skeleton-avatar.ant-skeleton-avatar-circle{border-radius:50%}.ant-skeleton-header .ant-skeleton-avatar-lg{width:40px;height:40px;line-height:40px}.ant-skeleton-header .ant-skeleton-avatar-lg.ant-skeleton-avatar-circle{border-radius:50%}.ant-skeleton-header .ant-skeleton-avatar-sm{width:24px;height:24px;line-height:24px}.ant-skeleton-header .ant-skeleton-avatar-sm.ant-skeleton-avatar-circle{border-radius:50%}.ant-skeleton-content{display:table-cell;width:100%;vertical-align:top}.ant-skeleton-content .ant-skeleton-title{width:100%;height:16px;margin-top:16px;background:#bebebe33;border-radius:4px}.ant-skeleton-content .ant-skeleton-title+.ant-skeleton-paragraph{margin-top:24px}.ant-skeleton-content .ant-skeleton-paragraph{padding:0}.ant-skeleton-content .ant-skeleton-paragraph>li{width:100%;height:16px;list-style:none;background:#bebebe33;border-radius:4px}.ant-skeleton-content .ant-skeleton-paragraph>li:last-child:not(:first-child):not(:nth-child(2)){width:61%}.ant-skeleton-content .ant-skeleton-paragraph>li+li{margin-top:16px}.ant-skeleton-with-avatar .ant-skeleton-content .ant-skeleton-title{margin-top:12px}.ant-skeleton-with-avatar .ant-skeleton-content .ant-skeleton-title+.ant-skeleton-paragraph{margin-top:28px}.ant-skeleton-round .ant-skeleton-content .ant-skeleton-title,.ant-skeleton-round .ant-skeleton-content .ant-skeleton-paragraph>li{border-radius:100px}.ant-skeleton.ant-skeleton-active .ant-skeleton-content .ant-skeleton-title,.ant-skeleton.ant-skeleton-active .ant-skeleton-content .ant-skeleton-paragraph>li{background:linear-gradient(90deg,#bebebe33 25%,#8181813d 37%,#bebebe33 63%);background-size:400% 100%;animation:ant-skeleton-loading 1.4s ease infinite}.ant-skeleton.ant-skeleton-active .ant-skeleton-avatar,.ant-skeleton.ant-skeleton-active .ant-skeleton-button,.ant-skeleton.ant-skeleton-active .ant-skeleton-input,.ant-skeleton.ant-skeleton-active .ant-skeleton-image{background:linear-gradient(90deg,#bebebe33 25%,#8181813d 37%,#bebebe33 63%);background-size:400% 100%;animation:ant-skeleton-loading 1.4s ease infinite}.ant-skeleton.ant-skeleton-block,.ant-skeleton.ant-skeleton-block .ant-skeleton-button{width:100%}.ant-skeleton-element{display:inline-block;width:auto}.ant-skeleton-element .ant-skeleton-button{display:inline-block;vertical-align:top;background:#bebebe33;border-radius:5px;width:64px;min-width:64px;height:32px;line-height:32px}.ant-skeleton-element .ant-skeleton-button.ant-skeleton-button-circle{width:32px;min-width:32px;border-radius:50%}.ant-skeleton-element .ant-skeleton-button.ant-skeleton-button-round{border-radius:32px}.ant-skeleton-element .ant-skeleton-button-lg{width:84px;min-width:84px;height:42px;line-height:42px}.ant-skeleton-element .ant-skeleton-button-lg.ant-skeleton-button-circle{width:42px;min-width:42px;border-radius:50%}.ant-skeleton-element .ant-skeleton-button-lg.ant-skeleton-button-round{border-radius:42px}.ant-skeleton-element .ant-skeleton-button-sm{width:48px;min-width:48px;height:24px;line-height:24px}.ant-skeleton-element .ant-skeleton-button-sm.ant-skeleton-button-circle{width:24px;min-width:24px;border-radius:50%}.ant-skeleton-element .ant-skeleton-button-sm.ant-skeleton-button-round{border-radius:24px}.ant-skeleton-element .ant-skeleton-avatar{display:inline-block;vertical-align:top;background:#bebebe33;width:32px;height:32px;line-height:32px}.ant-skeleton-element .ant-skeleton-avatar.ant-skeleton-avatar-circle{border-radius:50%}.ant-skeleton-element .ant-skeleton-avatar-lg{width:40px;height:40px;line-height:40px}.ant-skeleton-element .ant-skeleton-avatar-lg.ant-skeleton-avatar-circle{border-radius:50%}.ant-skeleton-element .ant-skeleton-avatar-sm{width:24px;height:24px;line-height:24px}.ant-skeleton-element .ant-skeleton-avatar-sm.ant-skeleton-avatar-circle{border-radius:50%}.ant-skeleton-element .ant-skeleton-input{display:inline-block;vertical-align:top;background:#bebebe33;width:100%;height:32px;line-height:32px}.ant-skeleton-element .ant-skeleton-input-lg{width:100%;height:42px;line-height:42px}.ant-skeleton-element .ant-skeleton-input-sm{width:100%;height:24px;line-height:24px}.ant-skeleton-element .ant-skeleton-image{display:flex;align-items:center;justify-content:center;vertical-align:top;background:#bebebe33;width:96px;height:96px;line-height:96px}.ant-skeleton-element .ant-skeleton-image.ant-skeleton-image-circle{border-radius:50%}.ant-skeleton-element .ant-skeleton-image-path{fill:#bfbfbf}.ant-skeleton-element .ant-skeleton-image-svg{width:48px;height:48px;line-height:48px;max-width:192px;max-height:192px}.ant-skeleton-element .ant-skeleton-image-svg.ant-skeleton-image-circle{border-radius:50%}@keyframes ant-skeleton-loading{0%{background-position:100% 50%}to{background-position:0 50%}}.ant-skeleton-rtl{direction:rtl}.ant-skeleton-rtl .ant-skeleton-header{padding-right:0;padding-left:16px}.ant-skeleton-rtl.ant-skeleton.ant-skeleton-active .ant-skeleton-content .ant-skeleton-title,.ant-skeleton-rtl.ant-skeleton.ant-skeleton-active .ant-skeleton-content .ant-skeleton-paragraph>li{animation-name:ant-skeleton-loading-rtl}.ant-skeleton-rtl.ant-skeleton.ant-skeleton-active .ant-skeleton-avatar{animation-name:ant-skeleton-loading-rtl}@keyframes ant-skeleton-loading-rtl{0%{background-position:0% 50%}to{background-position:100% 50%}}.ant-slider{box-sizing:border-box;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:relative;height:12px;margin:10px 6px;padding:4px 0;cursor:pointer;touch-action:none}.ant-slider-vertical{width:12px;height:100%;margin:6px 10px;padding:0 4px}.ant-slider-vertical .ant-slider-rail{width:4px;height:100%}.ant-slider-vertical .ant-slider-track{width:4px}.ant-slider-vertical .ant-slider-handle{margin-top:-6px;margin-left:-5px}.ant-slider-vertical .ant-slider-mark{top:0;left:12px;width:18px;height:100%}.ant-slider-vertical .ant-slider-mark-text{left:4px;white-space:nowrap}.ant-slider-vertical .ant-slider-step{width:4px;height:100%}.ant-slider-vertical .ant-slider-dot{top:auto;left:2px;margin-bottom:-4px}.ant-slider-tooltip .ant-tooltip-inner{min-width:unset}.ant-slider-rtl.ant-slider-vertical .ant-slider-handle{margin-right:-5px;margin-left:0}.ant-slider-rtl.ant-slider-vertical .ant-slider-mark{right:12px;left:auto}.ant-slider-rtl.ant-slider-vertical .ant-slider-mark-text{right:4px;left:auto}.ant-slider-rtl.ant-slider-vertical .ant-slider-dot{right:2px;left:auto}.ant-slider-with-marks{margin-bottom:28px}.ant-slider-rail{position:absolute;width:100%;height:4px;background-color:#f5f5f5;border-radius:5px;transition:background-color .3s}.ant-slider-track{position:absolute;height:4px;background-color:#b3aea8;border-radius:5px;transition:background-color .3s}.ant-slider-handle{position:absolute;width:14px;height:14px;margin-top:-5px;background-color:var(--c-canvas);border:solid 2px #b3aea8;border-radius:50%;box-shadow:0;cursor:pointer;transition:border-color .3s,box-shadow .6s,transform .3s cubic-bezier(.18,.89,.32,1.28)}.ant-slider-handle-dragging.ant-slider-handle-dragging.ant-slider-handle-dragging{border-color:#a4886b;box-shadow:0 0 0 5px #8d6a461f}.ant-slider-handle:focus{border-color:#a4886b;outline:none;box-shadow:0 0 0 5px #8d6a461f}.ant-slider-handle.ant-tooltip-open{border-color:#8d6a46}.ant-slider:hover .ant-slider-rail{background-color:#e1e1e1}.ant-slider:hover .ant-slider-track{background-color:#a69988}.ant-slider:hover .ant-slider-handle:not(.ant-tooltip-open){border-color:#a69988}.ant-slider-mark{position:absolute;top:14px;left:0;width:100%;font-size:14px}.ant-slider-mark-text{position:absolute;display:inline-block;color:#00000073;text-align:center;word-break:keep-all;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-slider-mark-text-active{color:#000000d9}.ant-slider-step{position:absolute;width:100%;height:4px;background:transparent}.ant-slider-dot{position:absolute;top:-2px;width:8px;height:8px;margin-left:-4px;background-color:var(--c-canvas);border:2px solid #f0f0f0;border-radius:50%;cursor:pointer}.ant-slider-dot:first-child{margin-left:-4px}.ant-slider-dot:last-child{margin-left:-4px}.ant-slider-dot-active{border-color:#c6b5a3}.ant-slider-disabled{cursor:not-allowed}.ant-slider-disabled .ant-slider-rail{background-color:#f5f5f5!important}.ant-slider-disabled .ant-slider-track{background-color:#00000040!important}.ant-slider-disabled .ant-slider-handle,.ant-slider-disabled .ant-slider-dot{background-color:var(--c-canvas);border-color:#00000040!important;box-shadow:none;cursor:not-allowed}.ant-slider-disabled .ant-slider-mark-text,.ant-slider-disabled .ant-slider-dot{cursor:not-allowed!important}.ant-slider-rtl{direction:rtl}.ant-slider-rtl .ant-slider-mark{right:0;left:auto}.ant-slider-rtl .ant-slider-dot,.ant-slider-rtl .ant-slider-dot:first-child{margin-right:-4px;margin-left:0}.ant-slider-rtl .ant-slider-dot:last-child{margin-right:-4px;margin-left:0}.ant-space{display:inline-flex}.ant-space-vertical{flex-direction:column}.ant-space-align-center{align-items:center}.ant-space-align-start{align-items:flex-start}.ant-space-align-end{align-items:flex-end}.ant-space-align-baseline{align-items:baseline}.ant-space-item:empty{display:none}.ant-space-rtl{direction:rtl}.ant-spin{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:absolute;display:none;color:#8d6a46;text-align:center;vertical-align:middle;opacity:0;transition:transform .3s cubic-bezier(.78,.14,.15,.86)}.ant-spin-spinning{position:static;display:inline-block;opacity:1}.ant-spin-nested-loading{position:relative}.ant-spin-nested-loading>div>.ant-spin{position:absolute;top:0;left:0;z-index:4;display:block;width:100%;height:100%;max-height:400px}.ant-spin-nested-loading>div>.ant-spin .ant-spin-dot{position:absolute;top:50%;left:50%;margin:-10px}.ant-spin-nested-loading>div>.ant-spin .ant-spin-text{position:absolute;top:50%;width:100%;padding-top:5px;text-shadow:0 1px 2px var(--c-canvas)}.ant-spin-nested-loading>div>.ant-spin.ant-spin-show-text .ant-spin-dot{margin-top:-20px}.ant-spin-nested-loading>div>.ant-spin-sm .ant-spin-dot{margin:-7px}.ant-spin-nested-loading>div>.ant-spin-sm .ant-spin-text{padding-top:2px}.ant-spin-nested-loading>div>.ant-spin-sm.ant-spin-show-text .ant-spin-dot{margin-top:-17px}.ant-spin-nested-loading>div>.ant-spin-lg .ant-spin-dot{margin:-16px}.ant-spin-nested-loading>div>.ant-spin-lg .ant-spin-text{padding-top:11px}.ant-spin-nested-loading>div>.ant-spin-lg.ant-spin-show-text .ant-spin-dot{margin-top:-26px}.ant-spin-container{position:relative;transition:opacity .3s}.ant-spin-container:after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:10;display:none \ ;width:100%;height:100%;background:var(--c-canvas);opacity:0;transition:all .3s;content:"";pointer-events:none}.ant-spin-blur{clear:both;opacity:.5;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}.ant-spin-blur:after{opacity:.4;pointer-events:auto}.ant-spin-tip{color:#00000073}.ant-spin-dot{position:relative;display:inline-block;font-size:20px;width:1em;height:1em}.ant-spin-dot-item{position:absolute;display:block;width:9px;height:9px;background-color:#8d6a46;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove 1s infinite linear alternate}.ant-spin-dot-item:nth-child(1){top:0;left:0}.ant-spin-dot-item:nth-child(2){top:0;right:0;animation-delay:.4s}.ant-spin-dot-item:nth-child(3){right:0;bottom:0;animation-delay:.8s}.ant-spin-dot-item:nth-child(4){bottom:0;left:0;animation-delay:1.2s}.ant-spin-dot-spin{transform:rotate(45deg);animation:antRotate 1.2s infinite linear}.ant-spin-sm .ant-spin-dot{font-size:14px}.ant-spin-sm .ant-spin-dot i{width:6px;height:6px}.ant-spin-lg .ant-spin-dot{font-size:32px}.ant-spin-lg .ant-spin-dot i{width:14px;height:14px}.ant-spin.ant-spin-show-text .ant-spin-text{display:block}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.ant-spin-blur{background:var(--c-canvas);opacity:.5}}@keyframes antSpinMove{to{opacity:1}}@keyframes antRotate{to{transform:rotate(405deg)}}.ant-spin-rtl{direction:rtl}.ant-spin-rtl .ant-spin-dot-spin{transform:rotate(-45deg);animation-name:antRotateRtl}@keyframes antRotateRtl{to{transform:rotate(-405deg)}}.ant-statistic{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum"}.ant-statistic-title{margin-bottom:4px;color:#00000073;font-size:14px}.ant-statistic-content{color:#1c2d56;font-size:24px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.ant-statistic-content-value{display:inline-block;direction:ltr}.ant-statistic-content-prefix,.ant-statistic-content-suffix{display:inline-block}.ant-statistic-content-prefix{margin-right:4px}.ant-statistic-content-suffix{margin-left:4px}.ant-statistic-rtl{direction:rtl}.ant-statistic-rtl .ant-statistic-content-prefix{margin-right:0;margin-left:4px}.ant-statistic-rtl .ant-statistic-content-suffix{margin-right:4px;margin-left:0}.ant-steps{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";display:flex;width:100%;font-size:0;text-align:initial}.ant-steps-item{position:relative;display:inline-block;flex:1;overflow:hidden;vertical-align:top}.ant-steps-item-container{outline:none}.ant-steps-item:last-child{flex:none}.ant-steps-item:last-child>.ant-steps-item-container>.ant-steps-item-tail,.ant-steps-item:last-child>.ant-steps-item-container>.ant-steps-item-content>.ant-steps-item-title:after{display:none}.ant-steps-item-icon,.ant-steps-item-content{display:inline-block;vertical-align:top}.ant-steps-item-icon{width:32px;height:32px;margin:0 8px 0 0;font-size:16px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:32px;text-align:center;border:1px solid rgba(0,0,0,.25);border-radius:32px;transition:background-color .3s,border-color .3s}.ant-steps-item-icon .ant-steps-icon{position:relative;top:-.5px;color:#8d6a46;line-height:1}.ant-steps-item-tail{position:absolute;top:12px;left:0;width:100%;padding:0 10px}.ant-steps-item-tail:after{display:inline-block;width:100%;height:1px;background:#f0f0f0;border-radius:1px;transition:background .3s;content:""}.ant-steps-item-title{position:relative;display:inline-block;padding-right:16px;color:#000000d9;font-size:16px;line-height:32px}.ant-steps-item-title:after{position:absolute;top:16px;left:100%;display:block;width:9999px;height:1px;background:#f0f0f0;content:""}.ant-steps-item-subtitle{display:inline;margin-left:8px;color:#00000073;font-weight:400;font-size:14px}.ant-steps-item-description{color:#00000073;font-size:14px}.ant-steps-item-wait .ant-steps-item-icon{background-color:var(--c-canvas);border-color:#00000040}.ant-steps-item-wait .ant-steps-item-icon>.ant-steps-icon{color:#00000040}.ant-steps-item-wait .ant-steps-item-icon>.ant-steps-icon .ant-steps-icon-dot{background:#00000040}.ant-steps-item-wait>.ant-steps-item-container>.ant-steps-item-content>.ant-steps-item-title{color:#00000073}.ant-steps-item-wait>.ant-steps-item-container>.ant-steps-item-content>.ant-steps-item-title:after{background-color:#f0f0f0}.ant-steps-item-wait>.ant-steps-item-container>.ant-steps-item-content>.ant-steps-item-description{color:#00000073}.ant-steps-item-wait>.ant-steps-item-container>.ant-steps-item-tail:after{background-color:#f0f0f0}.ant-steps-item-process .ant-steps-item-icon{background-color:var(--c-canvas);border-color:#8d6a46}.ant-steps-item-process .ant-steps-item-icon>.ant-steps-icon{color:#8d6a46}.ant-steps-item-process .ant-steps-item-icon>.ant-steps-icon .ant-steps-icon-dot{background:#8d6a46}.ant-steps-item-process>.ant-steps-item-container>.ant-steps-item-content>.ant-steps-item-title{color:#1c2d56}.ant-steps-item-process>.ant-steps-item-container>.ant-steps-item-content>.ant-steps-item-title:after{background-color:#f0f0f0}.ant-steps-item-process>.ant-steps-item-container>.ant-steps-item-content>.ant-steps-item-description{color:#000000d9}.ant-steps-item-process>.ant-steps-item-container>.ant-steps-item-tail:after{background-color:#f0f0f0}.ant-steps-item-process>.ant-steps-item-container>.ant-steps-item-icon{background:#8d6a46}.ant-steps-item-process>.ant-steps-item-container>.ant-steps-item-icon .ant-steps-icon{color:#fff}.ant-steps-item-process>.ant-steps-item-container>.ant-steps-item-title{font-weight:500}.ant-steps-item-finish .ant-steps-item-icon{background-color:var(--c-canvas);border-color:#8d6a46}.ant-steps-item-finish .ant-steps-item-icon>.ant-steps-icon{color:#8d6a46}.ant-steps-item-finish .ant-steps-item-icon>.ant-steps-icon .ant-steps-icon-dot{background:#8d6a46}.ant-steps-item-finish>.ant-steps-item-container>.ant-steps-item-content>.ant-steps-item-title{color:#000000d9}.ant-steps-item-finish>.ant-steps-item-container>.ant-steps-item-content>.ant-steps-item-title:after{background-color:#8d6a46}.ant-steps-item-finish>.ant-steps-item-container>.ant-steps-item-content>.ant-steps-item-description{color:#00000073}.ant-steps-item-finish>.ant-steps-item-container>.ant-steps-item-tail:after{background-color:#8d6a46}.ant-steps-item-error .ant-steps-item-icon{background-color:var(--c-canvas);border-color:#e31a1a}.ant-steps-item-error .ant-steps-item-icon>.ant-steps-icon{color:#e31a1a}.ant-steps-item-error .ant-steps-item-icon>.ant-steps-icon .ant-steps-icon-dot{background:#e31a1a}.ant-steps-item-error>.ant-steps-item-container>.ant-steps-item-content>.ant-steps-item-title{color:#e31a1a}.ant-steps-item-error>.ant-steps-item-container>.ant-steps-item-content>.ant-steps-item-title:after{background-color:#f0f0f0}.ant-steps-item-error>.ant-steps-item-container>.ant-steps-item-content>.ant-steps-item-description{color:#e31a1a}.ant-steps-item-error>.ant-steps-item-container>.ant-steps-item-tail:after{background-color:#f0f0f0}.ant-steps-item.ant-steps-next-error .ant-steps-item-title:after{background:#e31a1a}.ant-steps-item-disabled{cursor:not-allowed}.ant-steps .ant-steps-item:not(.ant-steps-item-active)>.ant-steps-item-container[role=button]{cursor:pointer}.ant-steps .ant-steps-item:not(.ant-steps-item-active)>.ant-steps-item-container[role=button] .ant-steps-item-title,.ant-steps .ant-steps-item:not(.ant-steps-item-active)>.ant-steps-item-container[role=button] .ant-steps-item-subtitle,.ant-steps .ant-steps-item:not(.ant-steps-item-active)>.ant-steps-item-container[role=button] .ant-steps-item-description,.ant-steps .ant-steps-item:not(.ant-steps-item-active)>.ant-steps-item-container[role=button] .ant-steps-item-icon .ant-steps-icon{transition:color .3s}.ant-steps .ant-steps-item:not(.ant-steps-item-active)>.ant-steps-item-container[role=button]:hover .ant-steps-item-title,.ant-steps .ant-steps-item:not(.ant-steps-item-active)>.ant-steps-item-container[role=button]:hover .ant-steps-item-subtitle,.ant-steps .ant-steps-item:not(.ant-steps-item-active)>.ant-steps-item-container[role=button]:hover .ant-steps-item-description{color:#8d6a46}.ant-steps .ant-steps-item:not(.ant-steps-item-active):not(.ant-steps-item-process)>.ant-steps-item-container[role=button]:hover .ant-steps-item-icon{border-color:#8d6a46}.ant-steps .ant-steps-item:not(.ant-steps-item-active):not(.ant-steps-item-process)>.ant-steps-item-container[role=button]:hover .ant-steps-item-icon .ant-steps-icon{color:#8d6a46}.ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item{padding-left:16px;white-space:nowrap}.ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item:first-child{padding-left:0}.ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item:last-child .ant-steps-item-title{padding-right:0}.ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item-tail{display:none}.ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item-description{max-width:140px;white-space:normal}.ant-steps-item-custom>.ant-steps-item-container>.ant-steps-item-icon{height:auto;background:none;border:0}.ant-steps-item-custom>.ant-steps-item-container>.ant-steps-item-icon>.ant-steps-icon{top:0;left:.5px;width:32px;height:32px;font-size:24px;line-height:32px}.ant-steps-item-custom.ant-steps-item-process .ant-steps-item-icon>.ant-steps-icon{color:#8d6a46}.ant-steps:not(.ant-steps-vertical) .ant-steps-item-custom .ant-steps-item-icon{width:auto;background:none}.ant-steps-small.ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item{padding-left:12px}.ant-steps-small.ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item:first-child{padding-left:0}.ant-steps-small .ant-steps-item-icon{width:24px;height:24px;margin:0 8px 0 0;font-size:12px;line-height:24px;text-align:center;border-radius:24px}.ant-steps-small .ant-steps-item-title{padding-right:12px;font-size:14px;line-height:24px}.ant-steps-small .ant-steps-item-title:after{top:12px}.ant-steps-small .ant-steps-item-description{color:#00000073;font-size:14px}.ant-steps-small .ant-steps-item-tail{top:8px}.ant-steps-small .ant-steps-item-custom .ant-steps-item-icon{width:inherit;height:inherit;line-height:inherit;background:none;border:0;border-radius:0}.ant-steps-small .ant-steps-item-custom .ant-steps-item-icon>.ant-steps-icon{font-size:24px;line-height:24px;transform:none}.ant-steps-vertical{display:flex;flex-direction:column}.ant-steps-vertical>.ant-steps-item{display:block;flex:1 0 auto;padding-left:0;overflow:visible}.ant-steps-vertical>.ant-steps-item .ant-steps-item-icon{float:left;margin-right:16px}.ant-steps-vertical>.ant-steps-item .ant-steps-item-content{display:block;min-height:48px;overflow:hidden}.ant-steps-vertical>.ant-steps-item .ant-steps-item-title{line-height:32px}.ant-steps-vertical>.ant-steps-item .ant-steps-item-description{padding-bottom:12px}.ant-steps-vertical>.ant-steps-item>.ant-steps-item-container>.ant-steps-item-tail{position:absolute;top:0;left:16px;width:1px;height:100%;padding:38px 0 6px}.ant-steps-vertical>.ant-steps-item>.ant-steps-item-container>.ant-steps-item-tail:after{width:1px;height:100%}.ant-steps-vertical>.ant-steps-item:not(:last-child)>.ant-steps-item-container>.ant-steps-item-tail{display:block}.ant-steps-vertical>.ant-steps-item>.ant-steps-item-container>.ant-steps-item-content>.ant-steps-item-title:after{display:none}.ant-steps-vertical.ant-steps-small .ant-steps-item-container .ant-steps-item-tail{position:absolute;top:0;left:12px;padding:30px 0 6px}.ant-steps-vertical.ant-steps-small .ant-steps-item-container .ant-steps-item-title{line-height:24px}.ant-steps-label-vertical .ant-steps-item{overflow:visible}.ant-steps-label-vertical .ant-steps-item-tail{margin-left:58px;padding:3.5px 24px}.ant-steps-label-vertical .ant-steps-item-content{display:block;width:116px;margin-top:8px;text-align:center}.ant-steps-label-vertical .ant-steps-item-icon{display:inline-block;margin-left:42px}.ant-steps-label-vertical .ant-steps-item-title{padding-right:0;padding-left:0}.ant-steps-label-vertical .ant-steps-item-title:after{display:none}.ant-steps-label-vertical .ant-steps-item-subtitle{display:block;margin-bottom:4px;margin-left:0;line-height:1.5715}.ant-steps-label-vertical.ant-steps-small:not(.ant-steps-dot) .ant-steps-item-icon{margin-left:46px}.ant-steps-dot .ant-steps-item-title,.ant-steps-dot.ant-steps-small .ant-steps-item-title{line-height:1.5715}.ant-steps-dot .ant-steps-item-tail,.ant-steps-dot.ant-steps-small .ant-steps-item-tail{top:2px;width:100%;margin:0 0 0 70px;padding:0}.ant-steps-dot .ant-steps-item-tail:after,.ant-steps-dot.ant-steps-small .ant-steps-item-tail:after{width:calc(100% - 20px);height:3px;margin-left:12px}.ant-steps-dot .ant-steps-item:first-child .ant-steps-icon-dot,.ant-steps-dot.ant-steps-small .ant-steps-item:first-child .ant-steps-icon-dot{left:2px}.ant-steps-dot .ant-steps-item-icon,.ant-steps-dot.ant-steps-small .ant-steps-item-icon{width:8px;height:8px;margin-left:67px;padding-right:0;line-height:8px;background:transparent;border:0}.ant-steps-dot .ant-steps-item-icon .ant-steps-icon-dot,.ant-steps-dot.ant-steps-small .ant-steps-item-icon .ant-steps-icon-dot{position:relative;float:left;width:100%;height:100%;border-radius:100px;transition:all .3s}.ant-steps-dot .ant-steps-item-icon .ant-steps-icon-dot:after,.ant-steps-dot.ant-steps-small .ant-steps-item-icon .ant-steps-icon-dot:after{position:absolute;top:-12px;left:-26px;width:60px;height:32px;background:#0000;content:""}.ant-steps-dot .ant-steps-item-content,.ant-steps-dot.ant-steps-small .ant-steps-item-content{width:140px}.ant-steps-dot .ant-steps-item-process .ant-steps-item-icon,.ant-steps-dot.ant-steps-small .ant-steps-item-process .ant-steps-item-icon{position:relative;top:-1px;width:10px;height:10px;line-height:10px;background:none}.ant-steps-dot .ant-steps-item-process .ant-steps-icon:first-child .ant-steps-icon-dot,.ant-steps-dot.ant-steps-small .ant-steps-item-process .ant-steps-icon:first-child .ant-steps-icon-dot{left:0}.ant-steps-vertical.ant-steps-dot .ant-steps-item-icon{margin-top:13px;margin-left:0;background:none}.ant-steps-vertical.ant-steps-dot .ant-steps-item>.ant-steps-item-container>.ant-steps-item-tail{top:6.5px;left:-9px;margin:0;padding:22px 0 4px}.ant-steps-vertical.ant-steps-dot .ant-steps-item:first-child .ant-steps-icon-dot{left:0}.ant-steps-vertical.ant-steps-dot .ant-steps-item-content{width:inherit}.ant-steps-vertical.ant-steps-dot .ant-steps-item-process .ant-steps-item-container .ant-steps-item-icon .ant-steps-icon-dot{top:-1px;left:-1px}.ant-steps-navigation{padding-top:12px}.ant-steps-navigation.ant-steps-small .ant-steps-item-container{margin-left:-12px}.ant-steps-navigation .ant-steps-item{overflow:visible;text-align:center}.ant-steps-navigation .ant-steps-item-container{display:inline-block;height:100%;margin-left:-16px;padding-bottom:12px;text-align:left;transition:opacity .3s}.ant-steps-navigation .ant-steps-item-container .ant-steps-item-content{max-width:auto}.ant-steps-navigation .ant-steps-item-container .ant-steps-item-title{max-width:100%;padding-right:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ant-steps-navigation .ant-steps-item-container .ant-steps-item-title:after{display:none}.ant-steps-navigation .ant-steps-item:not(.ant-steps-item-active) .ant-steps-item-container[role=button]{cursor:pointer}.ant-steps-navigation .ant-steps-item:not(.ant-steps-item-active) .ant-steps-item-container[role=button]:hover{opacity:.85}.ant-steps-navigation .ant-steps-item:last-child{flex:1}.ant-steps-navigation .ant-steps-item:last-child:after{display:none}.ant-steps-navigation .ant-steps-item:after{position:absolute;top:50%;left:100%;display:inline-block;width:12px;height:12px;margin-top:-14px;margin-left:-2px;border:1px solid rgba(0,0,0,.25);border-bottom:none;border-left:none;transform:rotate(45deg);content:""}.ant-steps-navigation .ant-steps-item:before{position:absolute;bottom:0;left:50%;display:inline-block;width:0;height:2px;background-color:#8d6a46;transition:width .3s,left .3s;transition-timing-function:ease-out;content:""}.ant-steps-navigation .ant-steps-item.ant-steps-item-active:before{left:0;width:100%}.ant-steps-navigation.ant-steps-vertical>.ant-steps-item{margin-right:0!important}.ant-steps-navigation.ant-steps-vertical>.ant-steps-item:before{display:none}.ant-steps-navigation.ant-steps-vertical>.ant-steps-item.ant-steps-item-active:before{top:0;right:0;left:unset;display:block;width:3px;height:calc(100% - 24px)}.ant-steps-navigation.ant-steps-vertical>.ant-steps-item:after{position:relative;top:-2px;left:50%;display:block;width:8px;height:8px;margin-bottom:8px;text-align:center;transform:rotate(135deg)}.ant-steps-navigation.ant-steps-vertical>.ant-steps-item>.ant-steps-item-container>.ant-steps-item-tail{visibility:hidden}.ant-steps-navigation.ant-steps-horizontal>.ant-steps-item>.ant-steps-item-container>.ant-steps-item-tail{visibility:hidden}.ant-steps-rtl{direction:rtl}.ant-steps.ant-steps-rtl .ant-steps-item-icon{margin-right:0;margin-left:8px}.ant-steps-rtl .ant-steps-item-tail{right:0;left:auto}.ant-steps-rtl .ant-steps-item-title{padding-right:0;padding-left:16px}.ant-steps-rtl .ant-steps-item-title:after{right:100%;left:auto}.ant-steps-rtl.ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item{padding-right:16px;padding-left:0}.ant-steps-rtl.ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item:first-child{padding-right:0}.ant-steps-rtl.ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item:last-child .ant-steps-item-title{padding-left:0}.ant-steps-rtl .ant-steps-item-custom .ant-steps-item-icon>.ant-steps-icon{right:.5px;left:auto}.ant-steps-rtl.ant-steps-navigation.ant-steps-small .ant-steps-item-container{margin-right:-12px;margin-left:0}.ant-steps-rtl.ant-steps-navigation .ant-steps-item-container{margin-right:-16px;margin-left:0;text-align:right}.ant-steps-rtl.ant-steps-navigation .ant-steps-item-container .ant-steps-item-title{padding-left:0}.ant-steps-rtl.ant-steps-navigation .ant-steps-item:after{right:100%;left:auto;margin-right:-2px;margin-left:0;transform:rotate(225deg)}.ant-steps-rtl.ant-steps-small.ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item{padding-right:12px;padding-left:0}.ant-steps-rtl.ant-steps-small.ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item:first-child{padding-right:0}.ant-steps-rtl.ant-steps-small .ant-steps-item-title{padding-right:0;padding-left:12px}.ant-steps-rtl.ant-steps-vertical>.ant-steps-item .ant-steps-item-icon{float:right;margin-right:0;margin-left:16px}.ant-steps-rtl.ant-steps-vertical>.ant-steps-item>.ant-steps-item-container>.ant-steps-item-tail{right:16px;left:auto}.ant-steps-rtl.ant-steps-vertical.ant-steps-small .ant-steps-item-container .ant-steps-item-tail{right:12px;left:auto}.ant-steps-rtl.ant-steps-label-vertical .ant-steps-item-title{padding-left:0}.ant-steps-rtl.ant-steps-dot .ant-steps-item-tail,.ant-steps-rtl.ant-steps-dot.ant-steps-small .ant-steps-item-tail{margin:0 70px 0 0}.ant-steps-rtl.ant-steps-dot .ant-steps-item-tail:after,.ant-steps-rtl.ant-steps-dot.ant-steps-small .ant-steps-item-tail:after{margin-right:12px;margin-left:0}.ant-steps-rtl.ant-steps-dot .ant-steps-item:first-child .ant-steps-icon-dot,.ant-steps-rtl.ant-steps-dot.ant-steps-small .ant-steps-item:first-child .ant-steps-icon-dot{right:2px;left:auto}.ant-steps-rtl.ant-steps-dot .ant-steps-item-icon,.ant-steps-rtl.ant-steps-dot.ant-steps-small .ant-steps-item-icon{margin-right:67px;margin-left:0}.ant-steps-rtl.ant-steps-dot .ant-steps-item-icon .ant-steps-icon-dot,.ant-steps-rtl.ant-steps-dot.ant-steps-small .ant-steps-item-icon .ant-steps-icon-dot{float:right}.ant-steps-rtl.ant-steps-dot .ant-steps-item-icon .ant-steps-icon-dot:after,.ant-steps-rtl.ant-steps-dot.ant-steps-small .ant-steps-item-icon .ant-steps-icon-dot:after{right:-26px;left:auto}.ant-steps-rtl.ant-steps-vertical.ant-steps-dot .ant-steps-item-icon{margin-right:0;margin-left:16px}.ant-steps-rtl.ant-steps-vertical.ant-steps-dot .ant-steps-item>.ant-steps-item-container>.ant-steps-item-tail{right:-9px;left:auto}.ant-steps-rtl.ant-steps-vertical.ant-steps-dot .ant-steps-item:first-child .ant-steps-icon-dot{right:0;left:auto}.ant-steps-rtl.ant-steps-vertical.ant-steps-dot .ant-steps-item-process .ant-steps-icon-dot{right:-2px;left:auto}.ant-steps-rtl.ant-steps-with-progress.ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item:first-child.ant-steps-item-active{padding-right:4px}.ant-steps-with-progress .ant-steps-item{padding-top:4px}.ant-steps-with-progress .ant-steps-item .ant-steps-item-tail{top:4px!important}.ant-steps-with-progress.ant-steps-horizontal .ant-steps-item:first-child{padding-bottom:4px;padding-left:4px}.ant-steps-with-progress .ant-steps-item-icon{position:relative}.ant-steps-with-progress .ant-steps-item-icon .ant-progress{position:absolute;top:-5px;right:-5px;bottom:-5px;left:-5px}.ant-switch{margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:relative;display:inline-block;box-sizing:border-box;min-width:44px;height:22px;line-height:22px;vertical-align:middle;background-color:#00000040;border:0;border-radius:100px;cursor:pointer;transition:all .2s;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-switch:focus{outline:0;box-shadow:0 0 0 2px #0000001a}.ant-switch-checked:focus{box-shadow:0 0 0 2px #ccc8c0}.ant-switch:focus:hover{box-shadow:none}.ant-switch-checked{background-color:#8d6a46}.ant-switch-loading,.ant-switch-disabled{cursor:not-allowed;opacity:.4}.ant-switch-loading *,.ant-switch-disabled *{box-shadow:none;cursor:not-allowed}.ant-switch-inner{display:block;margin:0 7px 0 25px;color:#fff;font-size:12px;transition:margin .2s}.ant-switch-checked .ant-switch-inner{margin:0 25px 0 7px}.ant-switch-handle{position:absolute;top:2px;left:2px;width:18px;height:18px;transition:all .2s ease-in-out}.ant-switch-handle:before{position:absolute;top:0;right:0;bottom:0;left:0;background-color:var(--c-canvas);border-radius:9px;box-shadow:0 2px 4px #00230b33;transition:all .2s ease-in-out;content:""}.ant-switch-checked .ant-switch-handle{left:calc(100% - 20px)}.ant-switch:not(.ant-switch-disabled):active .ant-switch-handle:before{right:-30%;left:0}.ant-switch:not(.ant-switch-disabled):active.ant-switch-checked .ant-switch-handle:before{right:0;left:-30%}.ant-switch-loading-icon.anticon{position:relative;top:2px;color:#000000a6;vertical-align:top}.ant-switch-checked .ant-switch-loading-icon{color:#8d6a46}.ant-switch-small{min-width:28px;height:16px;line-height:16px}.ant-switch-small .ant-switch-inner{margin:0 5px 0 18px;font-size:12px}.ant-switch-small .ant-switch-handle{width:12px;height:12px}.ant-switch-small .ant-switch-loading-icon{top:1.5px;font-size:9px}.ant-switch-small.ant-switch-checked .ant-switch-inner{margin:0 18px 0 5px}.ant-switch-small.ant-switch-checked .ant-switch-handle{left:calc(100% - 14px)}.ant-switch-rtl{direction:rtl}.ant-switch-rtl .ant-switch-inner{margin:0 25px 0 7px}.ant-switch-rtl .ant-switch-handle{right:2px;left:auto}.ant-switch-rtl:not(.ant-switch-rtl-disabled):active .ant-switch-handle:before{right:0;left:-30%}.ant-switch-rtl:not(.ant-switch-rtl-disabled):active.ant-switch-checked .ant-switch-handle:before{right:-30%;left:0}.ant-switch-rtl.ant-switch-checked .ant-switch-inner{margin:0 7px 0 25px}.ant-switch-rtl.ant-switch-checked .ant-switch-handle{right:calc(100% - 20px)}.ant-switch-rtl.ant-switch-small.ant-switch-checked .ant-switch-handle{right:calc(100% - 14px)}.ant-table.ant-table-middle{font-size:14px}.ant-table.ant-table-middle .ant-table-title,.ant-table.ant-table-middle .ant-table-footer,.ant-table.ant-table-middle .ant-table-thead>tr>th,.ant-table.ant-table-middle .ant-table-tbody>tr>td,.ant-table.ant-table-middle tfoot>tr>th,.ant-table.ant-table-middle tfoot>tr>td{padding:12px 8px}.ant-table.ant-table-middle .ant-table-filter-trigger{margin-right:-4px}.ant-table.ant-table-middle .ant-table-expanded-row-fixed{margin:-12px -8px}.ant-table.ant-table-middle .ant-table-tbody .ant-table-wrapper:only-child .ant-table{margin:-12px -8px -12px 25px}.ant-table.ant-table-small{font-size:14px}.ant-table.ant-table-small .ant-table-title,.ant-table.ant-table-small .ant-table-footer,.ant-table.ant-table-small .ant-table-thead>tr>th,.ant-table.ant-table-small .ant-table-tbody>tr>td,.ant-table.ant-table-small tfoot>tr>th,.ant-table.ant-table-small tfoot>tr>td{padding:8px}.ant-table.ant-table-small .ant-table-filter-trigger{margin-right:-4px}.ant-table.ant-table-small .ant-table-expanded-row-fixed{margin:-8px}.ant-table.ant-table-small .ant-table-tbody .ant-table-wrapper:only-child .ant-table{margin:-8px -8px -8px 25px}.ant-table-small .ant-table-thead>tr>th{background-color:#fafafa}.ant-table-small .ant-table-selection-column{width:46px;min-width:46px}.ant-table.ant-table-bordered>.ant-table-title{border:1px solid #f0f0f0;border-bottom:0}.ant-table.ant-table-bordered>.ant-table-container{border-left:1px solid #f0f0f0}.ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>thead>tr>th,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>thead>tr>th,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>thead>tr>th,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-summary>table>thead>tr>th,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>tbody>tr>td,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>tbody>tr>td,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>tbody>tr>td,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-summary>table>tbody>tr>td,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>tfoot>tr>th,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>tfoot>tr>th,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>tfoot>tr>th,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-summary>table>tfoot>tr>th,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>tfoot>tr>td,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>tfoot>tr>td,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>tfoot>tr>td,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-summary>table>tfoot>tr>td{border-right:1px solid #f0f0f0}.ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>thead>tr:not(:last-child)>th,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>thead>tr:not(:last-child)>th,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>thead>tr:not(:last-child)>th,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-summary>table>thead>tr:not(:last-child)>th{border-bottom:1px solid #f0f0f0}.ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>thead>tr>th:before,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>thead>tr>th:before,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>thead>tr>th:before,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-summary>table>thead>tr>th:before{background-color:transparent!important}.ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>thead>tr>.ant-table-cell-fix-right-first:after,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>thead>tr>.ant-table-cell-fix-right-first:after,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>thead>tr>.ant-table-cell-fix-right-first:after,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-summary>table>thead>tr>.ant-table-cell-fix-right-first:after,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>tbody>tr>.ant-table-cell-fix-right-first:after,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>tbody>tr>.ant-table-cell-fix-right-first:after,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>tbody>tr>.ant-table-cell-fix-right-first:after,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-summary>table>tbody>tr>.ant-table-cell-fix-right-first:after,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>tfoot>tr>.ant-table-cell-fix-right-first:after,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>tfoot>tr>.ant-table-cell-fix-right-first:after,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>tfoot>tr>.ant-table-cell-fix-right-first:after,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-summary>table>tfoot>tr>.ant-table-cell-fix-right-first:after{border-right:1px solid #f0f0f0}.ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>tbody>tr>td>.ant-table-expanded-row-fixed,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>tbody>tr>td>.ant-table-expanded-row-fixed,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>tbody>tr>td>.ant-table-expanded-row-fixed,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-summary>table>tbody>tr>td>.ant-table-expanded-row-fixed{margin:-16px -17px}.ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>tbody>tr>td>.ant-table-expanded-row-fixed:after,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>tbody>tr>td>.ant-table-expanded-row-fixed:after,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>tbody>tr>td>.ant-table-expanded-row-fixed:after,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-summary>table>tbody>tr>td>.ant-table-expanded-row-fixed:after{position:absolute;top:0;right:1px;bottom:0;border-right:1px solid #f0f0f0;content:""}.ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table{border-top:1px solid #f0f0f0}.ant-table.ant-table-bordered.ant-table-scroll-horizontal>.ant-table-container>.ant-table-body>table>tbody>tr.ant-table-expanded-row>td,.ant-table.ant-table-bordered.ant-table-scroll-horizontal>.ant-table-container>.ant-table-body>table>tbody>tr.ant-table-placeholder>td{border-right:0}.ant-table.ant-table-bordered.ant-table-middle>.ant-table-container>.ant-table-content>table>tbody>tr>td>.ant-table-expanded-row-fixed,.ant-table.ant-table-bordered.ant-table-middle>.ant-table-container>.ant-table-body>table>tbody>tr>td>.ant-table-expanded-row-fixed{margin:-12px -9px}.ant-table.ant-table-bordered.ant-table-small>.ant-table-container>.ant-table-content>table>tbody>tr>td>.ant-table-expanded-row-fixed,.ant-table.ant-table-bordered.ant-table-small>.ant-table-container>.ant-table-body>table>tbody>tr>td>.ant-table-expanded-row-fixed{margin:-8px -9px}.ant-table.ant-table-bordered>.ant-table-footer{border:1px solid #f0f0f0;border-top:0}.ant-table-cell .ant-table-container:first-child{border-top:0}.ant-table-cell-scrollbar{box-shadow:0 1px 0 1px #fafafa}.ant-table-resize-handle{position:absolute;top:0;height:100%!important;bottom:0;left:auto!important;right:-8px;cursor:col-resize;touch-action:none;-webkit-user-select:auto;-moz-user-select:auto;user-select:auto;width:16px;z-index:1}.ant-table-resize-handle-line{display:block;width:1px;margin-left:7px;height:100%!important;background-color:#8d6a46;opacity:0}.ant-table-resize-handle:hover .ant-table-resize-handle-line{opacity:1}.ant-table-resize-handle.dragging{overflow:hidden}.ant-table-resize-handle.dragging .ant-table-resize-handle-line{opacity:1}.ant-table-resize-handle.dragging:before{position:absolute;top:0;bottom:0;width:100%;content:" ";width:200vw;transform:translate(-50%);opacity:0}.ant-table-wrapper{clear:both;max-width:100%}.ant-table-wrapper:before{display:table;content:""}.ant-table-wrapper:after{display:table;clear:both;content:""}.ant-table{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:relative;font-size:14px;background:var(--c-canvas);border-radius:5px}.ant-table table{width:100%;text-align:left;border-radius:5px 5px 0 0;border-collapse:separate;border-spacing:0}.ant-table-thead>tr>th,.ant-table-tbody>tr>td,.ant-table tfoot>tr>th,.ant-table tfoot>tr>td{position:relative;padding:16px;overflow-wrap:break-word}.ant-table-cell-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all}.ant-table-cell-ellipsis.ant-table-cell-fix-left-last,.ant-table-cell-ellipsis.ant-table-cell-fix-right-first{overflow:visible}.ant-table-cell-ellipsis.ant-table-cell-fix-left-last .ant-table-cell-content,.ant-table-cell-ellipsis.ant-table-cell-fix-right-first .ant-table-cell-content{display:block;overflow:hidden;text-overflow:ellipsis}.ant-table-cell-ellipsis .ant-table-column-title{overflow:hidden;text-overflow:ellipsis;word-break:keep-all}.ant-table-title{padding:16px}.ant-table-footer{padding:16px;color:#1c2d56;background:#fafafa}.ant-table-thead>tr>th{position:relative;color:#1c2d56;font-weight:500;text-align:left;background:#fafafa;border-bottom:1px solid #f0f0f0;transition:background .3s ease}.ant-table-thead>tr>th[colspan]:not([colspan="1"]){text-align:center}.ant-table-thead>tr>th:not(:last-child):not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan]):before{position:absolute;top:50%;right:0;width:1px;height:1.6em;background-color:#0000000f;transform:translateY(-50%);transition:background-color .3s;content:""}.ant-table-thead>tr:not(:last-child)>th[colspan]{border-bottom:0}.ant-table-tbody>tr>td{border-bottom:1px solid #f0f0f0;transition:background .3s}.ant-table-tbody>tr>td>.ant-table-wrapper:only-child .ant-table,.ant-table-tbody>tr>td>.ant-table-expanded-row-fixed>.ant-table-wrapper:only-child .ant-table{margin:-16px -16px -16px 33px}.ant-table-tbody>tr>td>.ant-table-wrapper:only-child .ant-table-tbody>tr:last-child>td,.ant-table-tbody>tr>td>.ant-table-expanded-row-fixed>.ant-table-wrapper:only-child .ant-table-tbody>tr:last-child>td{border-bottom:0}.ant-table-tbody>tr>td>.ant-table-wrapper:only-child .ant-table-tbody>tr:last-child>td:first-child,.ant-table-tbody>tr>td>.ant-table-expanded-row-fixed>.ant-table-wrapper:only-child .ant-table-tbody>tr:last-child>td:first-child,.ant-table-tbody>tr>td>.ant-table-wrapper:only-child .ant-table-tbody>tr:last-child>td:last-child,.ant-table-tbody>tr>td>.ant-table-expanded-row-fixed>.ant-table-wrapper:only-child .ant-table-tbody>tr:last-child>td:last-child{border-radius:0}.ant-table-tbody>tr.ant-table-row:hover>td,.ant-table-tbody>tr>td.ant-table-cell-row-hover{background:#fafafa}.ant-table-tbody>tr.ant-table-row-selected>td{background:#ccc8c0;border-color:#00000008}.ant-table-tbody>tr.ant-table-row-selected:hover>td{background:#c7c3ba}.ant-table-summary{position:relative;z-index:2;background:var(--c-canvas)}div.ant-table-summary{box-shadow:0 -1px #f0f0f0}.ant-table-summary>tr>th,.ant-table-summary>tr>td{border-bottom:1px solid #f0f0f0}.ant-table-pagination.ant-pagination{margin:16px 0}.ant-table-pagination{display:flex;flex-wrap:wrap;row-gap:8px}.ant-table-pagination>*{flex:none}.ant-table-pagination-left{justify-content:flex-start}.ant-table-pagination-center{justify-content:center}.ant-table-pagination-right{justify-content:flex-end}.ant-table-thead th.ant-table-column-has-sorters{cursor:pointer;transition:all .3s}.ant-table-thead th.ant-table-column-has-sorters:hover{background:#0000000a}.ant-table-thead th.ant-table-column-has-sorters:hover:before{background-color:transparent!important}.ant-table-thead th.ant-table-column-has-sorters.ant-table-cell-fix-left:hover,.ant-table-thead th.ant-table-column-has-sorters.ant-table-cell-fix-right:hover,.ant-table-thead th.ant-table-column-sort{background:#f5f5f5}.ant-table-thead th.ant-table-column-sort:before{background-color:transparent!important}td.ant-table-column-sort{background:#fafafa}.ant-table-column-title{position:relative;z-index:1;flex:1}.ant-table-column-sorters{display:flex;flex:auto;align-items:center;justify-content:space-between}.ant-table-column-sorters:after{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;content:""}.ant-table-column-sorter{margin-left:4px;color:#bfbfbf;font-size:0;transition:color .3s}.ant-table-column-sorter-inner{display:inline-flex;flex-direction:column;align-items:center}.ant-table-column-sorter-up,.ant-table-column-sorter-down{font-size:11px}.ant-table-column-sorter-up.active,.ant-table-column-sorter-down.active{color:#8d6a46}.ant-table-column-sorter-up+.ant-table-column-sorter-down{margin-top:-.3em}.ant-table-column-sorters:hover .ant-table-column-sorter{color:#a6a6a6}.ant-table-filter-column{display:flex;justify-content:space-between}.ant-table-filter-trigger{position:relative;display:flex;align-items:center;margin:-4px -8px -4px 4px;padding:0 4px;color:#bfbfbf;font-size:12px;border-radius:5px;cursor:pointer;transition:all .3s}.ant-table-filter-trigger:hover{color:#00000073;background:#0000000a}.ant-table-filter-trigger.active{color:#8d6a46}.ant-table-filter-dropdown{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";min-width:120px;background-color:var(--c-canvas);border-radius:5px;box-shadow:0 3px 6px -4px #0000001f,0 6px 16px #00000014,0 9px 28px 8px #0000000d}.ant-table-filter-dropdown .ant-dropdown-menu{max-height:264px;overflow-x:hidden;border:0;box-shadow:none}.ant-table-filter-dropdown .ant-dropdown-menu:empty:after{display:block;padding:8px 0;color:#00000040;font-size:12px;text-align:center;content:"Not Found"}.ant-table-filter-dropdown-tree{padding:8px 8px 0}.ant-table-filter-dropdown-tree .ant-tree-treenode .ant-tree-node-content-wrapper:hover{background-color:#f5f5f5}.ant-table-filter-dropdown-tree .ant-tree-treenode-checkbox-checked .ant-tree-node-content-wrapper,.ant-table-filter-dropdown-tree .ant-tree-treenode-checkbox-checked .ant-tree-node-content-wrapper:hover{background-color:#bfbbb4}.ant-table-filter-dropdown-search{padding:8px;border-bottom:1px #f0f0f0 solid}.ant-table-filter-dropdown-search-input input{min-width:140px}.ant-table-filter-dropdown-search-input .anticon{color:#00000040}.ant-table-filter-dropdown-checkall{width:100%;margin-bottom:4px;margin-left:4px}.ant-table-filter-dropdown-submenu>ul{max-height:calc(100vh - 130px);overflow-x:hidden;overflow-y:auto}.ant-table-filter-dropdown .ant-checkbox-wrapper+span,.ant-table-filter-dropdown-submenu .ant-checkbox-wrapper+span{padding-left:8px}.ant-table-filter-dropdown-btns{display:flex;justify-content:space-between;padding:7px 8px;overflow:hidden;background-color:inherit;border-top:1px solid #f0f0f0}.ant-table-selection-col{width:32px}.ant-table-bordered .ant-table-selection-col{width:50px}table tr th.ant-table-selection-column,table tr td.ant-table-selection-column{padding-right:8px;padding-left:8px;text-align:center}table tr th.ant-table-selection-column .ant-radio-wrapper,table tr td.ant-table-selection-column .ant-radio-wrapper{margin-right:0}table tr th.ant-table-selection-column.ant-table-cell-fix-left{z-index:3}table tr th.ant-table-selection-column:after{background-color:transparent!important}.ant-table-selection{position:relative;display:inline-flex;flex-direction:column}.ant-table-selection-extra{position:absolute;top:0;z-index:1;cursor:pointer;transition:all .3s;margin-inline-start:100%;padding-inline-start:4px}.ant-table-selection-extra .anticon{color:#bfbfbf;font-size:10px}.ant-table-selection-extra .anticon:hover{color:#a6a6a6}.ant-table-expand-icon-col{width:48px}.ant-table-row-expand-icon-cell{text-align:center}.ant-table-row-indent{float:left;height:1px}.ant-table-row-expand-icon{color:#1c2d56;text-decoration:none;cursor:pointer;transition:color .3s;position:relative;display:inline-flex;float:left;box-sizing:border-box;width:17px;height:17px;padding:0;color:inherit;line-height:17px;background:var(--c-canvas);border:1px solid #f0f0f0;border-radius:5px;outline:none;transform:scale(1.17647059);transition:all .3s;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-table-row-expand-icon:focus,.ant-table-row-expand-icon:hover{color:#314263}.ant-table-row-expand-icon:active{color:#0e1730}.ant-table-row-expand-icon:focus,.ant-table-row-expand-icon:hover,.ant-table-row-expand-icon:active{border-color:currentcolor}.ant-table-row-expand-icon:before,.ant-table-row-expand-icon:after{position:absolute;background:currentcolor;transition:transform .3s ease-out;content:""}.ant-table-row-expand-icon:before{top:7px;right:3px;left:3px;height:1px}.ant-table-row-expand-icon:after{top:3px;bottom:3px;left:7px;width:1px;transform:rotate(90deg)}.ant-table-row-expand-icon-collapsed:before{transform:rotate(-180deg)}.ant-table-row-expand-icon-collapsed:after{transform:rotate(0)}.ant-table-row-expand-icon-spaced{background:transparent;border:0;visibility:hidden}.ant-table-row-expand-icon-spaced:before,.ant-table-row-expand-icon-spaced:after{display:none;content:none}.ant-table-row-indent+.ant-table-row-expand-icon{margin-top:2.5005px;margin-right:8px}tr.ant-table-expanded-row>td,tr.ant-table-expanded-row:hover>td{background:#fbfbfb}tr.ant-table-expanded-row .ant-descriptions-view{display:flex}tr.ant-table-expanded-row .ant-descriptions-view table{flex:auto;width:auto}.ant-table .ant-table-expanded-row-fixed{position:relative;margin:-16px;padding:16px}.ant-table-tbody>tr.ant-table-placeholder{text-align:center}.ant-table-empty .ant-table-tbody>tr.ant-table-placeholder{color:#00000040}.ant-table-tbody>tr.ant-table-placeholder:hover>td{background:var(--c-canvas)}.ant-table-cell-fix-left,.ant-table-cell-fix-right{position:sticky!important;z-index:2;background:var(--c-canvas)}.ant-table-cell-fix-left-first:after,.ant-table-cell-fix-left-last:after{position:absolute;top:0;right:0;bottom:-1px;width:30px;transform:translate(100%);transition:box-shadow .3s;content:"";pointer-events:none}.ant-table-cell-fix-right-first:after,.ant-table-cell-fix-right-last:after{position:absolute;top:0;bottom:-1px;left:0;width:30px;transform:translate(-100%);transition:box-shadow .3s;content:"";pointer-events:none}.ant-table .ant-table-container:before,.ant-table .ant-table-container:after{position:absolute;top:0;bottom:0;z-index:2;width:30px;transition:box-shadow .3s;content:"";pointer-events:none}.ant-table .ant-table-container:before{left:0}.ant-table .ant-table-container:after{right:0}.ant-table-ping-left:not(.ant-table-has-fix-left) .ant-table-container{position:relative}.ant-table-ping-left:not(.ant-table-has-fix-left) .ant-table-container:before{box-shadow:inset 10px 0 8px -8px #00000026}.ant-table-ping-left .ant-table-cell-fix-left-first:after,.ant-table-ping-left .ant-table-cell-fix-left-last:after{box-shadow:inset 10px 0 8px -8px #00000026}.ant-table-ping-left .ant-table-cell-fix-left-last:before{background-color:transparent!important}.ant-table-ping-right:not(.ant-table-has-fix-right) .ant-table-container{position:relative}.ant-table-ping-right:not(.ant-table-has-fix-right) .ant-table-container:after{box-shadow:inset -10px 0 8px -8px #00000026}.ant-table-ping-right .ant-table-cell-fix-right-first:after,.ant-table-ping-right .ant-table-cell-fix-right-last:after{box-shadow:inset -10px 0 8px -8px #00000026}.ant-table-sticky-holder{position:sticky;z-index:3;background:var(--c-canvas)}.ant-table-sticky-scroll{position:sticky;bottom:0;z-index:3;display:flex;align-items:center;background:#fff;border-top:1px solid #f0f0f0;opacity:.6}.ant-table-sticky-scroll:hover{transform-origin:center bottom}.ant-table-sticky-scroll-bar{height:8px;background-color:#00000059;border-radius:4px}.ant-table-sticky-scroll-bar:hover,.ant-table-sticky-scroll-bar-active{background-color:#000c}@media all and (-ms-high-contrast: none){.ant-table-ping-left .ant-table-cell-fix-left-last:after{box-shadow:none!important}.ant-table-ping-right .ant-table-cell-fix-right-first:after{box-shadow:none!important}}.ant-table-title{border-radius:5px 5px 0 0}.ant-table-title+.ant-table-container{border-top-left-radius:0;border-top-right-radius:0}.ant-table-title+.ant-table-container table>thead>tr:first-child th:first-child{border-radius:0}.ant-table-title+.ant-table-container table>thead>tr:first-child th:last-child{border-radius:0}.ant-table-container{border-top-left-radius:5px;border-top-right-radius:5px}.ant-table-container table>thead>tr:first-child th:first-child{border-top-left-radius:5px}.ant-table-container table>thead>tr:first-child th:last-child{border-top-right-radius:5px}.ant-table-footer{border-radius:0 0 5px 5px}.ant-table-wrapper-rtl,.ant-table-rtl{direction:rtl}.ant-table-wrapper-rtl .ant-table table{text-align:right}.ant-table-wrapper-rtl .ant-table-thead>tr>th[colspan]:not([colspan="1"]){text-align:center}.ant-table-wrapper-rtl .ant-table-thead>tr>th:not(:last-child):not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan]):before{right:auto;left:0}.ant-table-wrapper-rtl .ant-table-thead>tr>th{text-align:right}.ant-table-tbody>tr .ant-table-wrapper:only-child .ant-table.ant-table-rtl{margin:-16px 33px -16px -16px}.ant-table-wrapper.ant-table-wrapper-rtl .ant-table-pagination-left{justify-content:flex-end}.ant-table-wrapper.ant-table-wrapper-rtl .ant-table-pagination-right{justify-content:flex-start}.ant-table-wrapper-rtl .ant-table-column-sorter{margin-right:4px;margin-left:0}.ant-table-wrapper-rtl .ant-table-filter-column-title{padding:16px 16px 16px 2.3em}.ant-table-rtl .ant-table-thead tr th.ant-table-column-has-sorters .ant-table-filter-column-title{padding:0 0 0 2.3em}.ant-table-wrapper-rtl .ant-table-filter-trigger{margin:-4px 4px -4px -8px}.ant-dropdown-rtl .ant-table-filter-dropdown .ant-checkbox-wrapper+span,.ant-dropdown-rtl .ant-table-filter-dropdown-submenu .ant-checkbox-wrapper+span,.ant-dropdown-menu-submenu-rtl.ant-table-filter-dropdown .ant-checkbox-wrapper+span,.ant-dropdown-menu-submenu-rtl.ant-table-filter-dropdown-submenu .ant-checkbox-wrapper+span{padding-right:8px;padding-left:0}.ant-table-wrapper-rtl .ant-table-selection{text-align:center}.ant-table-wrapper-rtl .ant-table-row-indent,.ant-table-wrapper-rtl .ant-table-row-expand-icon{float:right}.ant-table-wrapper-rtl .ant-table-row-indent+.ant-table-row-expand-icon{margin-right:0;margin-left:8px}.ant-table-wrapper-rtl .ant-table-row-expand-icon:after{transform:rotate(-90deg)}.ant-table-wrapper-rtl .ant-table-row-expand-icon-collapsed:before{transform:rotate(180deg)}.ant-table-wrapper-rtl .ant-table-row-expand-icon-collapsed:after{transform:rotate(0)}.ant-tabs-small>.ant-tabs-nav .ant-tabs-tab{padding:8px 0;font-size:14px}.ant-tabs-large>.ant-tabs-nav .ant-tabs-tab{padding:16px 0;font-size:16px}.ant-tabs-card.ant-tabs-small>.ant-tabs-nav .ant-tabs-tab{padding:6px 16px}.ant-tabs-card.ant-tabs-large>.ant-tabs-nav .ant-tabs-tab{padding:7px 16px 6px}.ant-tabs-rtl{direction:rtl}.ant-tabs-rtl .ant-tabs-nav .ant-tabs-tab{margin:0 0 0 32px}.ant-tabs-rtl .ant-tabs-nav .ant-tabs-tab:last-of-type{margin-left:0}.ant-tabs-rtl .ant-tabs-nav .ant-tabs-tab .anticon{margin-right:0;margin-left:12px}.ant-tabs-rtl .ant-tabs-nav .ant-tabs-tab .ant-tabs-tab-remove{margin-right:8px;margin-left:-4px}.ant-tabs-rtl .ant-tabs-nav .ant-tabs-tab .ant-tabs-tab-remove .anticon{margin:0}.ant-tabs-rtl.ant-tabs-left>.ant-tabs-nav{order:1}.ant-tabs-rtl.ant-tabs-left>.ant-tabs-content-holder{order:0}.ant-tabs-rtl.ant-tabs-right>.ant-tabs-nav{order:0}.ant-tabs-rtl.ant-tabs-right>.ant-tabs-content-holder{order:1}.ant-tabs-rtl.ant-tabs-card.ant-tabs-top>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab,.ant-tabs-rtl.ant-tabs-card.ant-tabs-bottom>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab,.ant-tabs-rtl.ant-tabs-card.ant-tabs-top>div>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab,.ant-tabs-rtl.ant-tabs-card.ant-tabs-bottom>div>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab{margin-right:2px;margin-left:0}.ant-tabs-rtl.ant-tabs-card.ant-tabs-top>.ant-tabs-nav .ant-tabs-nav-add,.ant-tabs-rtl.ant-tabs-card.ant-tabs-bottom>.ant-tabs-nav .ant-tabs-nav-add,.ant-tabs-rtl.ant-tabs-card.ant-tabs-top>div>.ant-tabs-nav .ant-tabs-nav-add,.ant-tabs-rtl.ant-tabs-card.ant-tabs-bottom>div>.ant-tabs-nav .ant-tabs-nav-add{margin-right:2px;margin-left:0}.ant-tabs-dropdown-rtl{direction:rtl}.ant-tabs-dropdown-rtl .ant-tabs-dropdown-menu-item{text-align:right}.ant-tabs-top,.ant-tabs-bottom{flex-direction:column}.ant-tabs-top>.ant-tabs-nav,.ant-tabs-bottom>.ant-tabs-nav,.ant-tabs-top>div>.ant-tabs-nav,.ant-tabs-bottom>div>.ant-tabs-nav{margin:0 0 16px}.ant-tabs-top>.ant-tabs-nav:before,.ant-tabs-bottom>.ant-tabs-nav:before,.ant-tabs-top>div>.ant-tabs-nav:before,.ant-tabs-bottom>div>.ant-tabs-nav:before{position:absolute;right:0;left:0;border-bottom:1px solid #f0f0f0;content:""}.ant-tabs-top>.ant-tabs-nav .ant-tabs-ink-bar,.ant-tabs-bottom>.ant-tabs-nav .ant-tabs-ink-bar,.ant-tabs-top>div>.ant-tabs-nav .ant-tabs-ink-bar,.ant-tabs-bottom>div>.ant-tabs-nav .ant-tabs-ink-bar{height:2px}.ant-tabs-top>.ant-tabs-nav .ant-tabs-ink-bar-animated,.ant-tabs-bottom>.ant-tabs-nav .ant-tabs-ink-bar-animated,.ant-tabs-top>div>.ant-tabs-nav .ant-tabs-ink-bar-animated,.ant-tabs-bottom>div>.ant-tabs-nav .ant-tabs-ink-bar-animated{transition:width .3s,left .3s,right .3s}.ant-tabs-top>.ant-tabs-nav .ant-tabs-nav-wrap:before,.ant-tabs-bottom>.ant-tabs-nav .ant-tabs-nav-wrap:before,.ant-tabs-top>div>.ant-tabs-nav .ant-tabs-nav-wrap:before,.ant-tabs-bottom>div>.ant-tabs-nav .ant-tabs-nav-wrap:before,.ant-tabs-top>.ant-tabs-nav .ant-tabs-nav-wrap:after,.ant-tabs-bottom>.ant-tabs-nav .ant-tabs-nav-wrap:after,.ant-tabs-top>div>.ant-tabs-nav .ant-tabs-nav-wrap:after,.ant-tabs-bottom>div>.ant-tabs-nav .ant-tabs-nav-wrap:after{top:0;bottom:0;width:30px}.ant-tabs-top>.ant-tabs-nav .ant-tabs-nav-wrap:before,.ant-tabs-bottom>.ant-tabs-nav .ant-tabs-nav-wrap:before,.ant-tabs-top>div>.ant-tabs-nav .ant-tabs-nav-wrap:before,.ant-tabs-bottom>div>.ant-tabs-nav .ant-tabs-nav-wrap:before{left:0;box-shadow:inset 10px 0 8px -8px #00000014}.ant-tabs-top>.ant-tabs-nav .ant-tabs-nav-wrap:after,.ant-tabs-bottom>.ant-tabs-nav .ant-tabs-nav-wrap:after,.ant-tabs-top>div>.ant-tabs-nav .ant-tabs-nav-wrap:after,.ant-tabs-bottom>div>.ant-tabs-nav .ant-tabs-nav-wrap:after{right:0;box-shadow:inset -10px 0 8px -8px #00000014}.ant-tabs-top>.ant-tabs-nav .ant-tabs-nav-wrap.ant-tabs-nav-wrap-ping-left:before,.ant-tabs-bottom>.ant-tabs-nav .ant-tabs-nav-wrap.ant-tabs-nav-wrap-ping-left:before,.ant-tabs-top>div>.ant-tabs-nav .ant-tabs-nav-wrap.ant-tabs-nav-wrap-ping-left:before,.ant-tabs-bottom>div>.ant-tabs-nav .ant-tabs-nav-wrap.ant-tabs-nav-wrap-ping-left:before{opacity:1}.ant-tabs-top>.ant-tabs-nav .ant-tabs-nav-wrap.ant-tabs-nav-wrap-ping-right:after,.ant-tabs-bottom>.ant-tabs-nav .ant-tabs-nav-wrap.ant-tabs-nav-wrap-ping-right:after,.ant-tabs-top>div>.ant-tabs-nav .ant-tabs-nav-wrap.ant-tabs-nav-wrap-ping-right:after,.ant-tabs-bottom>div>.ant-tabs-nav .ant-tabs-nav-wrap.ant-tabs-nav-wrap-ping-right:after{opacity:1}.ant-tabs-top>.ant-tabs-nav:before,.ant-tabs-top>div>.ant-tabs-nav:before{bottom:0}.ant-tabs-top>.ant-tabs-nav .ant-tabs-ink-bar,.ant-tabs-top>div>.ant-tabs-nav .ant-tabs-ink-bar{bottom:0}.ant-tabs-bottom>.ant-tabs-nav,.ant-tabs-bottom>div>.ant-tabs-nav{order:1;margin-top:16px;margin-bottom:0}.ant-tabs-bottom>.ant-tabs-nav:before,.ant-tabs-bottom>div>.ant-tabs-nav:before{top:0}.ant-tabs-bottom>.ant-tabs-nav .ant-tabs-ink-bar,.ant-tabs-bottom>div>.ant-tabs-nav .ant-tabs-ink-bar{top:0}.ant-tabs-bottom>.ant-tabs-content-holder,.ant-tabs-bottom>div>.ant-tabs-content-holder{order:0}.ant-tabs-left>.ant-tabs-nav,.ant-tabs-right>.ant-tabs-nav,.ant-tabs-left>div>.ant-tabs-nav,.ant-tabs-right>div>.ant-tabs-nav{flex-direction:column;min-width:50px}.ant-tabs-left>.ant-tabs-nav .ant-tabs-tab,.ant-tabs-right>.ant-tabs-nav .ant-tabs-tab,.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-tab,.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-tab{padding:8px 24px;text-align:center}.ant-tabs-left>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab,.ant-tabs-right>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab,.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab,.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab{margin:16px 0 0}.ant-tabs-left>.ant-tabs-nav .ant-tabs-nav-wrap,.ant-tabs-right>.ant-tabs-nav .ant-tabs-nav-wrap,.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-nav-wrap,.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-nav-wrap{flex-direction:column}.ant-tabs-left>.ant-tabs-nav .ant-tabs-nav-wrap:before,.ant-tabs-right>.ant-tabs-nav .ant-tabs-nav-wrap:before,.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-nav-wrap:before,.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-nav-wrap:before,.ant-tabs-left>.ant-tabs-nav .ant-tabs-nav-wrap:after,.ant-tabs-right>.ant-tabs-nav .ant-tabs-nav-wrap:after,.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-nav-wrap:after,.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-nav-wrap:after{right:0;left:0;height:30px}.ant-tabs-left>.ant-tabs-nav .ant-tabs-nav-wrap:before,.ant-tabs-right>.ant-tabs-nav .ant-tabs-nav-wrap:before,.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-nav-wrap:before,.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-nav-wrap:before{top:0;box-shadow:inset 0 10px 8px -8px #00000014}.ant-tabs-left>.ant-tabs-nav .ant-tabs-nav-wrap:after,.ant-tabs-right>.ant-tabs-nav .ant-tabs-nav-wrap:after,.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-nav-wrap:after,.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-nav-wrap:after{bottom:0;box-shadow:inset 0 -10px 8px -8px #00000014}.ant-tabs-left>.ant-tabs-nav .ant-tabs-nav-wrap.ant-tabs-nav-wrap-ping-top:before,.ant-tabs-right>.ant-tabs-nav .ant-tabs-nav-wrap.ant-tabs-nav-wrap-ping-top:before,.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-nav-wrap.ant-tabs-nav-wrap-ping-top:before,.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-nav-wrap.ant-tabs-nav-wrap-ping-top:before{opacity:1}.ant-tabs-left>.ant-tabs-nav .ant-tabs-nav-wrap.ant-tabs-nav-wrap-ping-bottom:after,.ant-tabs-right>.ant-tabs-nav .ant-tabs-nav-wrap.ant-tabs-nav-wrap-ping-bottom:after,.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-nav-wrap.ant-tabs-nav-wrap-ping-bottom:after,.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-nav-wrap.ant-tabs-nav-wrap-ping-bottom:after{opacity:1}.ant-tabs-left>.ant-tabs-nav .ant-tabs-ink-bar,.ant-tabs-right>.ant-tabs-nav .ant-tabs-ink-bar,.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-ink-bar,.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-ink-bar{width:2px}.ant-tabs-left>.ant-tabs-nav .ant-tabs-ink-bar-animated,.ant-tabs-right>.ant-tabs-nav .ant-tabs-ink-bar-animated,.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-ink-bar-animated,.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-ink-bar-animated{transition:height .3s,top .3s}.ant-tabs-left>.ant-tabs-nav .ant-tabs-nav-list,.ant-tabs-right>.ant-tabs-nav .ant-tabs-nav-list,.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-nav-list,.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-nav-list,.ant-tabs-left>.ant-tabs-nav .ant-tabs-nav-operations,.ant-tabs-right>.ant-tabs-nav .ant-tabs-nav-operations,.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-nav-operations,.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-nav-operations{flex:1 0 auto;flex-direction:column}.ant-tabs-left>.ant-tabs-nav .ant-tabs-ink-bar,.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-ink-bar{right:0}.ant-tabs-left>.ant-tabs-content-holder,.ant-tabs-left>div>.ant-tabs-content-holder{margin-left:-1px;border-left:1px solid #f0f0f0}.ant-tabs-left>.ant-tabs-content-holder>.ant-tabs-content>.ant-tabs-tabpane,.ant-tabs-left>div>.ant-tabs-content-holder>.ant-tabs-content>.ant-tabs-tabpane{padding-left:24px}.ant-tabs-right>.ant-tabs-nav,.ant-tabs-right>div>.ant-tabs-nav{order:1}.ant-tabs-right>.ant-tabs-nav .ant-tabs-ink-bar,.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-ink-bar{left:0}.ant-tabs-right>.ant-tabs-content-holder,.ant-tabs-right>div>.ant-tabs-content-holder{order:0;margin-right:-1px;border-right:1px solid #f0f0f0}.ant-tabs-right>.ant-tabs-content-holder>.ant-tabs-content>.ant-tabs-tabpane,.ant-tabs-right>div>.ant-tabs-content-holder>.ant-tabs-content>.ant-tabs-tabpane{padding-right:24px}.ant-tabs-dropdown{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:absolute;top:-9999px;left:-9999px;z-index:1050;display:block}.ant-tabs-dropdown-hidden{display:none}.ant-tabs-dropdown-menu{max-height:200px;margin:0;padding:4px 0;overflow-x:hidden;overflow-y:auto;text-align:left;list-style-type:none;background-color:var(--c-canvas);background-clip:padding-box;border-radius:5px;outline:none;box-shadow:0 3px 6px -4px #0000001f,0 6px 16px #00000014,0 9px 28px 8px #0000000d}.ant-tabs-dropdown-menu-item{display:flex;align-items:center;min-width:120px;margin:0;padding:5px 12px;overflow:hidden;color:#000000d9;font-weight:400;font-size:14px;line-height:22px;white-space:nowrap;text-overflow:ellipsis;cursor:pointer;transition:all .3s}.ant-tabs-dropdown-menu-item>span{flex:1;white-space:nowrap}.ant-tabs-dropdown-menu-item-remove{flex:none;margin-left:12px;color:#00000073;font-size:12px;background:transparent;border:0;cursor:pointer}.ant-tabs-dropdown-menu-item-remove:hover{color:#998165}.ant-tabs-dropdown-menu-item:hover{background:#f5f5f5}.ant-tabs-dropdown-menu-item-disabled,.ant-tabs-dropdown-menu-item-disabled:hover{color:#00000040;background:transparent;cursor:not-allowed}.ant-tabs-card>.ant-tabs-nav .ant-tabs-tab,.ant-tabs-card>div>.ant-tabs-nav .ant-tabs-tab{margin:0;padding:8px 16px;background:#fafafa;border:1px solid #f0f0f0;transition:all .3s cubic-bezier(.645,.045,.355,1)}.ant-tabs-card>.ant-tabs-nav .ant-tabs-tab-active,.ant-tabs-card>div>.ant-tabs-nav .ant-tabs-tab-active{color:#8d6a46;background:var(--c-canvas)}.ant-tabs-card>.ant-tabs-nav .ant-tabs-ink-bar,.ant-tabs-card>div>.ant-tabs-nav .ant-tabs-ink-bar{visibility:hidden}.ant-tabs-card.ant-tabs-top>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab,.ant-tabs-card.ant-tabs-bottom>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab,.ant-tabs-card.ant-tabs-top>div>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab,.ant-tabs-card.ant-tabs-bottom>div>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab{margin-left:2px}.ant-tabs-card.ant-tabs-top>.ant-tabs-nav .ant-tabs-tab,.ant-tabs-card.ant-tabs-top>div>.ant-tabs-nav .ant-tabs-tab{border-radius:5px 5px 0 0}.ant-tabs-card.ant-tabs-top>.ant-tabs-nav .ant-tabs-tab-active,.ant-tabs-card.ant-tabs-top>div>.ant-tabs-nav .ant-tabs-tab-active{border-bottom-color:var(--c-canvas)}.ant-tabs-card.ant-tabs-bottom>.ant-tabs-nav .ant-tabs-tab,.ant-tabs-card.ant-tabs-bottom>div>.ant-tabs-nav .ant-tabs-tab{border-radius:0 0 5px 5px}.ant-tabs-card.ant-tabs-bottom>.ant-tabs-nav .ant-tabs-tab-active,.ant-tabs-card.ant-tabs-bottom>div>.ant-tabs-nav .ant-tabs-tab-active{border-top-color:var(--c-canvas)}.ant-tabs-card.ant-tabs-left>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab,.ant-tabs-card.ant-tabs-right>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab,.ant-tabs-card.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab,.ant-tabs-card.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab{margin-top:2px}.ant-tabs-card.ant-tabs-left>.ant-tabs-nav .ant-tabs-tab,.ant-tabs-card.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-tab{border-radius:5px 0 0 5px}.ant-tabs-card.ant-tabs-left>.ant-tabs-nav .ant-tabs-tab-active,.ant-tabs-card.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-tab-active{border-right-color:var(--c-canvas)}.ant-tabs-card.ant-tabs-right>.ant-tabs-nav .ant-tabs-tab,.ant-tabs-card.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-tab{border-radius:0 5px 5px 0}.ant-tabs-card.ant-tabs-right>.ant-tabs-nav .ant-tabs-tab-active,.ant-tabs-card.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-tab-active{border-left-color:var(--c-canvas)}.ant-tabs{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";display:flex;overflow:hidden}.ant-tabs>.ant-tabs-nav,.ant-tabs>div>.ant-tabs-nav{position:relative;display:flex;flex:none;align-items:center}.ant-tabs>.ant-tabs-nav .ant-tabs-nav-wrap,.ant-tabs>div>.ant-tabs-nav .ant-tabs-nav-wrap{position:relative;display:inline-block;display:flex;flex:auto;align-self:stretch;overflow:hidden;white-space:nowrap;transform:translate(0)}.ant-tabs>.ant-tabs-nav .ant-tabs-nav-wrap:before,.ant-tabs>div>.ant-tabs-nav .ant-tabs-nav-wrap:before,.ant-tabs>.ant-tabs-nav .ant-tabs-nav-wrap:after,.ant-tabs>div>.ant-tabs-nav .ant-tabs-nav-wrap:after{position:absolute;z-index:1;opacity:0;transition:opacity .3s;content:"";pointer-events:none}.ant-tabs>.ant-tabs-nav .ant-tabs-nav-list,.ant-tabs>div>.ant-tabs-nav .ant-tabs-nav-list{position:relative;display:flex;transition:transform .3s}.ant-tabs>.ant-tabs-nav .ant-tabs-nav-operations,.ant-tabs>div>.ant-tabs-nav .ant-tabs-nav-operations{display:flex;align-self:stretch}.ant-tabs>.ant-tabs-nav .ant-tabs-nav-operations-hidden,.ant-tabs>div>.ant-tabs-nav .ant-tabs-nav-operations-hidden{position:absolute;visibility:hidden;pointer-events:none}.ant-tabs>.ant-tabs-nav .ant-tabs-nav-more,.ant-tabs>div>.ant-tabs-nav .ant-tabs-nav-more{position:relative;padding:8px 16px;background:transparent;border:0}.ant-tabs>.ant-tabs-nav .ant-tabs-nav-more:after,.ant-tabs>div>.ant-tabs-nav .ant-tabs-nav-more:after{position:absolute;right:0;bottom:0;left:0;height:5px;transform:translateY(100%);content:""}.ant-tabs>.ant-tabs-nav .ant-tabs-nav-add,.ant-tabs>div>.ant-tabs-nav .ant-tabs-nav-add{min-width:40px;margin-left:2px;padding:0 8px;background:#fafafa;border:1px solid #f0f0f0;border-radius:5px 5px 0 0;outline:none;cursor:pointer;transition:all .3s cubic-bezier(.645,.045,.355,1)}.ant-tabs>.ant-tabs-nav .ant-tabs-nav-add:hover,.ant-tabs>div>.ant-tabs-nav .ant-tabs-nav-add:hover{color:#998165}.ant-tabs>.ant-tabs-nav .ant-tabs-nav-add:active,.ant-tabs>div>.ant-tabs-nav .ant-tabs-nav-add:active,.ant-tabs>.ant-tabs-nav .ant-tabs-nav-add:focus,.ant-tabs>div>.ant-tabs-nav .ant-tabs-nav-add:focus{color:#66482e}.ant-tabs-extra-content{flex:none}.ant-tabs-centered>.ant-tabs-nav .ant-tabs-nav-wrap:not([class*=ant-tabs-nav-wrap-ping]),.ant-tabs-centered>div>.ant-tabs-nav .ant-tabs-nav-wrap:not([class*=ant-tabs-nav-wrap-ping]){justify-content:center}.ant-tabs-ink-bar{position:absolute;background:#8d6a46;pointer-events:none}.ant-tabs-tab{position:relative;display:inline-flex;align-items:center;padding:12px 0;font-size:14px;background:transparent;border:0;outline:none;cursor:pointer}.ant-tabs-tab-btn:focus,.ant-tabs-tab-remove:focus,.ant-tabs-tab-btn:active,.ant-tabs-tab-remove:active{color:#66482e}.ant-tabs-tab-btn{outline:none;transition:all .3s}.ant-tabs-tab-remove{flex:none;margin-right:-4px;margin-left:8px;color:#00000073;font-size:12px;background:transparent;border:none;outline:none;cursor:pointer;transition:all .3s}.ant-tabs-tab-remove:hover{color:#1c2d56}.ant-tabs-tab:hover{color:#998165}.ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn{color:#8d6a46;text-shadow:0 0 .25px currentcolor}.ant-tabs-tab.ant-tabs-tab-disabled{color:#00000040;cursor:not-allowed}.ant-tabs-tab.ant-tabs-tab-disabled .ant-tabs-tab-btn:focus,.ant-tabs-tab.ant-tabs-tab-disabled .ant-tabs-tab-remove:focus,.ant-tabs-tab.ant-tabs-tab-disabled .ant-tabs-tab-btn:active,.ant-tabs-tab.ant-tabs-tab-disabled .ant-tabs-tab-remove:active{color:#00000040}.ant-tabs-tab .ant-tabs-tab-remove .anticon{margin:0}.ant-tabs-tab .anticon{margin-right:12px}.ant-tabs-tab+.ant-tabs-tab{margin:0 0 0 32px}.ant-tabs-content{display:flex;width:100%}.ant-tabs-content-holder{flex:auto;min-width:0;min-height:0}.ant-tabs-content-animated{transition:margin .3s}.ant-tabs-tabpane{flex:none;width:100%;outline:none}.ant-tag{box-sizing:border-box;margin:0 8px 0 0;color:#000000d9;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";display:inline-block;height:auto;padding:0 7px;font-size:12px;line-height:20px;white-space:nowrap;background:#fafafa;border:1px solid #d9d9d9;border-radius:5px;opacity:1;transition:all .3s}.ant-tag,.ant-tag a,.ant-tag a:hover{color:#000000d9}.ant-tag>a:first-child:last-child{display:inline-block;margin:0 -8px;padding:0 8px}.ant-tag-close-icon{margin-left:3px;color:#00000073;font-size:10px;cursor:pointer;transition:all .3s}.ant-tag-close-icon:hover{color:#1c2d56}.ant-tag-has-color{border-color:transparent}.ant-tag-has-color,.ant-tag-has-color a,.ant-tag-has-color a:hover,.ant-tag-has-color .anticon-close,.ant-tag-has-color .anticon-close:hover{color:#fff}.ant-tag-checkable{background-color:transparent;border-color:transparent;cursor:pointer}.ant-tag-checkable:not(.ant-tag-checkable-checked):hover{color:#8d6a46}.ant-tag-checkable:active,.ant-tag-checkable-checked{color:#fff}.ant-tag-checkable-checked{background-color:#8d6a46}.ant-tag-checkable:active{background-color:#66482e}.ant-tag-hidden{display:none}.ant-tag-pink{color:#c41d7f;background:#fff0f6;border-color:#ffadd2}.ant-tag-pink-inverse{color:#fff;background:#eb2f96;border-color:#eb2f96}.ant-tag-magenta{color:#c41d7f;background:#fff0f6;border-color:#ffadd2}.ant-tag-magenta-inverse{color:#fff;background:#eb2f96;border-color:#eb2f96}.ant-tag-red{color:#cf1322;background:#fff1f0;border-color:#ffa39e}.ant-tag-red-inverse{color:#fff;background:#f5222d;border-color:#f5222d}.ant-tag-volcano{color:#d4380d;background:#fff2e8;border-color:#ffbb96}.ant-tag-volcano-inverse{color:#fff;background:#fa541c;border-color:#fa541c}.ant-tag-orange{color:#d46b08;background:#fff7e6;border-color:#ffd591}.ant-tag-orange-inverse{color:#fff;background:#fa8c16;border-color:#fa8c16}.ant-tag-yellow{color:#d4b106;background:#feffe6;border-color:#fffb8f}.ant-tag-yellow-inverse{color:#fff;background:#fadb14;border-color:#fadb14}.ant-tag-gold{color:#d48806;background:#fffbe6;border-color:#ffe58f}.ant-tag-gold-inverse{color:#fff;background:#faad14;border-color:#faad14}.ant-tag-cyan{color:#08979c;background:#e6fffb;border-color:#87e8de}.ant-tag-cyan-inverse{color:#fff;background:#13c2c2;border-color:#13c2c2}.ant-tag-lime{color:#7cb305;background:#fcffe6;border-color:#eaff8f}.ant-tag-lime-inverse{color:#fff;background:#a0d911;border-color:#a0d911}.ant-tag-green{color:#389e0d;background:#f6ffed;border-color:#b7eb8f}.ant-tag-green-inverse{color:#fff;background:#52c41a;border-color:#52c41a}.ant-tag-blue{color:#096dd9;background:#e6f7ff;border-color:#91d5ff}.ant-tag-blue-inverse{color:#fff;background:#1890ff;border-color:#1890ff}.ant-tag-geekblue{color:#1d39c4;background:#f0f5ff;border-color:#adc6ff}.ant-tag-geekblue-inverse{color:#fff;background:#2f54eb;border-color:#2f54eb}.ant-tag-purple{color:#531dab;background:#f9f0ff;border-color:#d3adf7}.ant-tag-purple-inverse{color:#fff;background:#722ed1;border-color:#722ed1}.ant-tag-success{color:#52c41a;background:#f6ffed;border-color:#b7eb8f}.ant-tag-processing{color:#8d6a46;background:#ccc8c0;border-color:#b3aea8}.ant-tag-error{color:#e31a1a;background:#ffece8;border-color:#ffa196}.ant-tag-warning{color:#faad14;background:#fffbe6;border-color:#ffe58f}.ant-tag>.anticon+span,.ant-tag>span+.anticon{margin-left:7px}.ant-tag.ant-tag-rtl{margin-right:0;margin-left:8px;direction:rtl;text-align:right}.ant-tag-rtl .ant-tag-close-icon{margin-right:3px;margin-left:0}.ant-tag-rtl.ant-tag>.anticon+span,.ant-tag-rtl.ant-tag>span+.anticon{margin-right:7px;margin-left:0}.ant-timeline{box-sizing:border-box;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;font-feature-settings:"tnum";margin:0;padding:0;list-style:none}.ant-timeline-item{position:relative;margin:0;padding-bottom:20px;font-size:14px;list-style:none}.ant-timeline-item-tail{position:absolute;top:10px;left:4px;height:calc(100% - 10px);border-left:2px solid #f0f0f0}.ant-timeline-item-pending .ant-timeline-item-head{font-size:12px;background-color:transparent}.ant-timeline-item-pending .ant-timeline-item-tail{display:none}.ant-timeline-item-head{position:absolute;width:10px;height:10px;background-color:var(--c-canvas);border:2px solid transparent;border-radius:100px}.ant-timeline-item-head-blue{color:#8d6a46;border-color:#8d6a46}.ant-timeline-item-head-red{color:#e31a1a;border-color:#e31a1a}.ant-timeline-item-head-green{color:#52c41a;border-color:#52c41a}.ant-timeline-item-head-gray{color:#00000040;border-color:#00000040}.ant-timeline-item-head-custom{position:absolute;top:5.5px;left:5px;width:auto;height:auto;margin-top:0;padding:3px 1px;line-height:1;text-align:center;border:0;border-radius:0;transform:translate(-50%,-50%)}.ant-timeline-item-content{position:relative;top:-7.001px;margin:0 0 0 26px;word-break:break-word}.ant-timeline-item-last>.ant-timeline-item-tail{display:none}.ant-timeline-item-last>.ant-timeline-item-content{min-height:48px}.ant-timeline.ant-timeline-alternate .ant-timeline-item-tail,.ant-timeline.ant-timeline-right .ant-timeline-item-tail,.ant-timeline.ant-timeline-label .ant-timeline-item-tail,.ant-timeline.ant-timeline-alternate .ant-timeline-item-head,.ant-timeline.ant-timeline-right .ant-timeline-item-head,.ant-timeline.ant-timeline-label .ant-timeline-item-head,.ant-timeline.ant-timeline-alternate .ant-timeline-item-head-custom,.ant-timeline.ant-timeline-right .ant-timeline-item-head-custom,.ant-timeline.ant-timeline-label .ant-timeline-item-head-custom{left:50%}.ant-timeline.ant-timeline-alternate .ant-timeline-item-head,.ant-timeline.ant-timeline-right .ant-timeline-item-head,.ant-timeline.ant-timeline-label .ant-timeline-item-head{margin-left:-4px}.ant-timeline.ant-timeline-alternate .ant-timeline-item-head-custom,.ant-timeline.ant-timeline-right .ant-timeline-item-head-custom,.ant-timeline.ant-timeline-label .ant-timeline-item-head-custom{margin-left:1px}.ant-timeline.ant-timeline-alternate .ant-timeline-item-left .ant-timeline-item-content,.ant-timeline.ant-timeline-right .ant-timeline-item-left .ant-timeline-item-content,.ant-timeline.ant-timeline-label .ant-timeline-item-left .ant-timeline-item-content{left:calc(50% - 4px);width:calc(50% - 14px);text-align:left}.ant-timeline.ant-timeline-alternate .ant-timeline-item-right .ant-timeline-item-content,.ant-timeline.ant-timeline-right .ant-timeline-item-right .ant-timeline-item-content,.ant-timeline.ant-timeline-label .ant-timeline-item-right .ant-timeline-item-content{width:calc(50% - 12px);margin:0;text-align:right}.ant-timeline.ant-timeline-right .ant-timeline-item-right .ant-timeline-item-tail,.ant-timeline.ant-timeline-right .ant-timeline-item-right .ant-timeline-item-head,.ant-timeline.ant-timeline-right .ant-timeline-item-right .ant-timeline-item-head-custom{left:calc(100% - 6px)}.ant-timeline.ant-timeline-right .ant-timeline-item-right .ant-timeline-item-content{width:calc(100% - 18px)}.ant-timeline.ant-timeline-pending .ant-timeline-item-last .ant-timeline-item-tail{display:block;height:calc(100% - 14px);border-left:2px dotted #f0f0f0}.ant-timeline.ant-timeline-reverse .ant-timeline-item-last .ant-timeline-item-tail{display:none}.ant-timeline.ant-timeline-reverse .ant-timeline-item-pending .ant-timeline-item-tail{top:15px;display:block;height:calc(100% - 15px);border-left:2px dotted #f0f0f0}.ant-timeline.ant-timeline-reverse .ant-timeline-item-pending .ant-timeline-item-content{min-height:48px}.ant-timeline.ant-timeline-label .ant-timeline-item-label{position:absolute;top:-7.001px;width:calc(50% - 12px);text-align:right}.ant-timeline.ant-timeline-label .ant-timeline-item-right .ant-timeline-item-label{left:calc(50% + 14px);width:calc(50% - 14px);text-align:left}.ant-timeline-rtl{direction:rtl}.ant-timeline-rtl .ant-timeline-item-tail{right:4px;left:auto;border-right:2px solid #f0f0f0;border-left:none}.ant-timeline-rtl .ant-timeline-item-head-custom{right:5px;left:auto;transform:translate(50%,-50%)}.ant-timeline-rtl .ant-timeline-item-content{margin:0 18px 0 0}.ant-timeline-rtl.ant-timeline.ant-timeline-alternate .ant-timeline-item-tail,.ant-timeline-rtl.ant-timeline.ant-timeline-right .ant-timeline-item-tail,.ant-timeline-rtl.ant-timeline.ant-timeline-label .ant-timeline-item-tail,.ant-timeline-rtl.ant-timeline.ant-timeline-alternate .ant-timeline-item-head,.ant-timeline-rtl.ant-timeline.ant-timeline-right .ant-timeline-item-head,.ant-timeline-rtl.ant-timeline.ant-timeline-label .ant-timeline-item-head,.ant-timeline-rtl.ant-timeline.ant-timeline-alternate .ant-timeline-item-head-custom,.ant-timeline-rtl.ant-timeline.ant-timeline-right .ant-timeline-item-head-custom,.ant-timeline-rtl.ant-timeline.ant-timeline-label .ant-timeline-item-head-custom{right:50%;left:auto}.ant-timeline-rtl.ant-timeline.ant-timeline-alternate .ant-timeline-item-head,.ant-timeline-rtl.ant-timeline.ant-timeline-right .ant-timeline-item-head,.ant-timeline-rtl.ant-timeline.ant-timeline-label .ant-timeline-item-head{margin-right:-4px;margin-left:0}.ant-timeline-rtl.ant-timeline.ant-timeline-alternate .ant-timeline-item-head-custom,.ant-timeline-rtl.ant-timeline.ant-timeline-right .ant-timeline-item-head-custom,.ant-timeline-rtl.ant-timeline.ant-timeline-label .ant-timeline-item-head-custom{margin-right:1px;margin-left:0}.ant-timeline-rtl.ant-timeline.ant-timeline-alternate .ant-timeline-item-left .ant-timeline-item-content,.ant-timeline-rtl.ant-timeline.ant-timeline-right .ant-timeline-item-left .ant-timeline-item-content,.ant-timeline-rtl.ant-timeline.ant-timeline-label .ant-timeline-item-left .ant-timeline-item-content{right:calc(50% - 4px);left:auto;text-align:right}.ant-timeline-rtl.ant-timeline.ant-timeline-alternate .ant-timeline-item-right .ant-timeline-item-content,.ant-timeline-rtl.ant-timeline.ant-timeline-right .ant-timeline-item-right .ant-timeline-item-content,.ant-timeline-rtl.ant-timeline.ant-timeline-label .ant-timeline-item-right .ant-timeline-item-content{text-align:left}.ant-timeline-rtl.ant-timeline.ant-timeline-right .ant-timeline-item-right .ant-timeline-item-tail,.ant-timeline-rtl.ant-timeline.ant-timeline-right .ant-timeline-item-right .ant-timeline-item-head,.ant-timeline-rtl.ant-timeline.ant-timeline-right .ant-timeline-item-right .ant-timeline-item-head-custom{right:0;left:auto}.ant-timeline-rtl.ant-timeline.ant-timeline-right .ant-timeline-item-right .ant-timeline-item-content{width:100%;margin-right:18px;text-align:right}.ant-timeline-rtl.ant-timeline.ant-timeline-pending .ant-timeline-item-last .ant-timeline-item-tail,.ant-timeline-rtl.ant-timeline.ant-timeline-reverse .ant-timeline-item-pending .ant-timeline-item-tail{border-right:2px dotted #f0f0f0;border-left:none}.ant-timeline-rtl.ant-timeline.ant-timeline-label .ant-timeline-item-label{text-align:left}.ant-timeline-rtl.ant-timeline.ant-timeline-label .ant-timeline-item-right .ant-timeline-item-label{right:calc(50% + 14px);text-align:right}.ant-tooltip{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:absolute;z-index:1070;display:block;width:-moz-max-content;width:max-content;max-width:250px;visibility:visible}.ant-tooltip-hidden{display:none}.ant-tooltip-placement-top,.ant-tooltip-placement-topLeft,.ant-tooltip-placement-topRight{padding-bottom:8px}.ant-tooltip-placement-right,.ant-tooltip-placement-rightTop,.ant-tooltip-placement-rightBottom{padding-left:8px}.ant-tooltip-placement-bottom,.ant-tooltip-placement-bottomLeft,.ant-tooltip-placement-bottomRight{padding-top:8px}.ant-tooltip-placement-left,.ant-tooltip-placement-leftTop,.ant-tooltip-placement-leftBottom{padding-right:8px}.ant-tooltip-inner{min-width:30px;min-height:32px;padding:6px 8px;color:#fff;text-align:left;text-decoration:none;word-wrap:break-word;background-color:#000000bf;border-radius:5px;box-shadow:0 3px 6px -4px #0000001f,0 6px 16px #00000014,0 9px 28px 8px #0000000d}.ant-tooltip-arrow{position:absolute;display:block;width:13.07106781px;height:13.07106781px;overflow:hidden;background:transparent;pointer-events:none}.ant-tooltip-arrow-content{position:absolute;top:0;right:0;bottom:0;left:0;display:block;width:5px;height:5px;margin:auto;background-color:#000000bf;content:"";pointer-events:auto}.ant-tooltip-placement-top .ant-tooltip-arrow,.ant-tooltip-placement-topLeft .ant-tooltip-arrow,.ant-tooltip-placement-topRight .ant-tooltip-arrow{bottom:-5.07106781px}.ant-tooltip-placement-top .ant-tooltip-arrow-content,.ant-tooltip-placement-topLeft .ant-tooltip-arrow-content,.ant-tooltip-placement-topRight .ant-tooltip-arrow-content{box-shadow:3px 3px 7px #00000012;transform:translateY(-6.53553391px) rotate(45deg)}.ant-tooltip-placement-top .ant-tooltip-arrow{left:50%;transform:translate(-50%)}.ant-tooltip-placement-topLeft .ant-tooltip-arrow{left:13px}.ant-tooltip-placement-topRight .ant-tooltip-arrow{right:13px}.ant-tooltip-placement-right .ant-tooltip-arrow,.ant-tooltip-placement-rightTop .ant-tooltip-arrow,.ant-tooltip-placement-rightBottom .ant-tooltip-arrow{left:-5.07106781px}.ant-tooltip-placement-right .ant-tooltip-arrow-content,.ant-tooltip-placement-rightTop .ant-tooltip-arrow-content,.ant-tooltip-placement-rightBottom .ant-tooltip-arrow-content{box-shadow:-3px 3px 7px #00000012;transform:translate(6.53553391px) rotate(45deg)}.ant-tooltip-placement-right .ant-tooltip-arrow{top:50%;transform:translateY(-50%)}.ant-tooltip-placement-rightTop .ant-tooltip-arrow{top:5px}.ant-tooltip-placement-rightBottom .ant-tooltip-arrow{bottom:5px}.ant-tooltip-placement-left .ant-tooltip-arrow,.ant-tooltip-placement-leftTop .ant-tooltip-arrow,.ant-tooltip-placement-leftBottom .ant-tooltip-arrow{right:-5.07106781px}.ant-tooltip-placement-left .ant-tooltip-arrow-content,.ant-tooltip-placement-leftTop .ant-tooltip-arrow-content,.ant-tooltip-placement-leftBottom .ant-tooltip-arrow-content{box-shadow:3px -3px 7px #00000012;transform:translate(-6.53553391px) rotate(45deg)}.ant-tooltip-placement-left .ant-tooltip-arrow{top:50%;transform:translateY(-50%)}.ant-tooltip-placement-leftTop .ant-tooltip-arrow{top:5px}.ant-tooltip-placement-leftBottom .ant-tooltip-arrow{bottom:5px}.ant-tooltip-placement-bottom .ant-tooltip-arrow,.ant-tooltip-placement-bottomLeft .ant-tooltip-arrow,.ant-tooltip-placement-bottomRight .ant-tooltip-arrow{top:-5.07106781px}.ant-tooltip-placement-bottom .ant-tooltip-arrow-content,.ant-tooltip-placement-bottomLeft .ant-tooltip-arrow-content,.ant-tooltip-placement-bottomRight .ant-tooltip-arrow-content{box-shadow:-3px -3px 7px #00000012;transform:translateY(6.53553391px) rotate(45deg)}.ant-tooltip-placement-bottom .ant-tooltip-arrow{left:50%;transform:translate(-50%)}.ant-tooltip-placement-bottomLeft .ant-tooltip-arrow{left:13px}.ant-tooltip-placement-bottomRight .ant-tooltip-arrow{right:13px}.ant-tooltip-pink .ant-tooltip-inner,.ant-tooltip-pink .ant-tooltip-arrow-content,.ant-tooltip-magenta .ant-tooltip-inner,.ant-tooltip-magenta .ant-tooltip-arrow-content{background-color:#eb2f96}.ant-tooltip-red .ant-tooltip-inner,.ant-tooltip-red .ant-tooltip-arrow-content{background-color:#f5222d}.ant-tooltip-volcano .ant-tooltip-inner,.ant-tooltip-volcano .ant-tooltip-arrow-content{background-color:#fa541c}.ant-tooltip-orange .ant-tooltip-inner,.ant-tooltip-orange .ant-tooltip-arrow-content{background-color:#fa8c16}.ant-tooltip-yellow .ant-tooltip-inner,.ant-tooltip-yellow .ant-tooltip-arrow-content{background-color:#fadb14}.ant-tooltip-gold .ant-tooltip-inner,.ant-tooltip-gold .ant-tooltip-arrow-content{background-color:#faad14}.ant-tooltip-cyan .ant-tooltip-inner,.ant-tooltip-cyan .ant-tooltip-arrow-content{background-color:#13c2c2}.ant-tooltip-lime .ant-tooltip-inner,.ant-tooltip-lime .ant-tooltip-arrow-content{background-color:#a0d911}.ant-tooltip-green .ant-tooltip-inner,.ant-tooltip-green .ant-tooltip-arrow-content{background-color:#52c41a}.ant-tooltip-blue .ant-tooltip-inner,.ant-tooltip-blue .ant-tooltip-arrow-content{background-color:#1890ff}.ant-tooltip-geekblue .ant-tooltip-inner,.ant-tooltip-geekblue .ant-tooltip-arrow-content{background-color:#2f54eb}.ant-tooltip-purple .ant-tooltip-inner,.ant-tooltip-purple .ant-tooltip-arrow-content{background-color:#722ed1}.ant-tooltip-rtl{direction:rtl}.ant-tooltip-rtl .ant-tooltip-inner{text-align:right}.ant-transfer-customize-list .ant-transfer-list{flex:1 1 50%;width:auto;height:auto;min-height:200px}.ant-transfer-customize-list .ant-table-wrapper .ant-table-small{border:0;border-radius:0}.ant-transfer-customize-list .ant-table-wrapper .ant-table-small .ant-table-selection-column{width:40px;min-width:40px}.ant-transfer-customize-list .ant-table-wrapper .ant-table-small>.ant-table-content>.ant-table-body>table>.ant-table-thead>tr>th{background:#fafafa}.ant-transfer-customize-list .ant-table-wrapper .ant-table-small>.ant-table-content .ant-table-row:last-child td{border-bottom:1px solid #f0f0f0}.ant-transfer-customize-list .ant-table-wrapper .ant-table-small .ant-table-body{margin:0}.ant-transfer-customize-list .ant-table-wrapper .ant-table-pagination.ant-pagination{margin:16px 0 4px}.ant-transfer-customize-list .ant-input[disabled]{background-color:transparent}.ant-transfer{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:relative;display:flex;align-items:stretch}.ant-transfer-disabled .ant-transfer-list{background:#f5f5f5}.ant-transfer-list{display:flex;flex-direction:column;width:180px;height:200px;border:1px solid #d9d9d9;border-radius:5px}.ant-transfer-list-with-pagination{width:250px;height:auto}.ant-transfer-list-search .anticon-search{color:#00000040}.ant-transfer-list-header{display:flex;flex:none;align-items:center;height:40px;padding:8px 12px 9px;color:#000000d9;background:var(--c-canvas);border-bottom:1px solid #f0f0f0;border-radius:5px 5px 0 0}.ant-transfer-list-header>*:not(:last-child){margin-right:4px}.ant-transfer-list-header>*{flex:none}.ant-transfer-list-header-title{flex:auto;overflow:hidden;white-space:nowrap;text-align:right;text-overflow:ellipsis}.ant-transfer-list-header-dropdown{font-size:10px;transform:translateY(10%);cursor:pointer}.ant-transfer-list-header-dropdown[disabled]{cursor:not-allowed}.ant-transfer-list-body{display:flex;flex:auto;flex-direction:column;overflow:hidden;font-size:14px}.ant-transfer-list-body-search-wrapper{position:relative;flex:none;padding:12px}.ant-transfer-list-content{flex:auto;margin:0;padding:0;overflow:auto;list-style:none}.ant-transfer-list-content-item{display:flex;align-items:center;min-height:32px;padding:6px 12px;line-height:20px;transition:all .3s}.ant-transfer-list-content-item>*:not(:last-child){margin-right:8px}.ant-transfer-list-content-item>*{flex:none}.ant-transfer-list-content-item-text{flex:auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ant-transfer-list-content-item-remove{color:#1c2d56;text-decoration:none;outline:none;cursor:pointer;transition:color .3s;position:relative;color:#d9d9d9}.ant-transfer-list-content-item-remove:focus,.ant-transfer-list-content-item-remove:hover{color:#314263}.ant-transfer-list-content-item-remove:active{color:#0e1730}.ant-transfer-list-content-item-remove:after{position:absolute;top:-6px;right:-50%;bottom:-6px;left:-50%;content:""}.ant-transfer-list-content-item-remove:hover{color:#314263}.ant-transfer-list-content-item:not(.ant-transfer-list-content-item-disabled):hover{background-color:#f5f5f5;cursor:pointer}.ant-transfer-list-content-item:not(.ant-transfer-list-content-item-disabled).ant-transfer-list-content-item-checked:hover{background-color:#c7c3ba}.ant-transfer-list-content-show-remove .ant-transfer-list-content-item:not(.ant-transfer-list-content-item-disabled):hover{background:transparent;cursor:default}.ant-transfer-list-content-item-checked{background-color:#ccc8c0}.ant-transfer-list-content-item-disabled{color:#00000040;cursor:not-allowed}.ant-transfer-list-pagination{padding:8px 0;text-align:right;border-top:1px solid #f0f0f0}.ant-transfer-list-body-not-found{flex:none;width:100%;margin:auto 0;color:#00000040;text-align:center}.ant-transfer-list-footer{border-top:1px solid #f0f0f0}.ant-transfer-operation{display:flex;flex:none;flex-direction:column;align-self:center;margin:0 8px;vertical-align:middle}.ant-transfer-operation .ant-btn{display:block}.ant-transfer-operation .ant-btn:first-child{margin-bottom:4px}.ant-transfer-operation .ant-btn .anticon{font-size:12px}.ant-transfer .ant-empty-image{max-height:-2px}.ant-transfer-rtl{direction:rtl}.ant-transfer-rtl .ant-transfer-list-search{padding-right:8px;padding-left:24px}.ant-transfer-rtl .ant-transfer-list-search-action{right:auto;left:12px}.ant-transfer-rtl .ant-transfer-list-header>*:not(:last-child){margin-right:0;margin-left:4px}.ant-transfer-rtl .ant-transfer-list-header{right:0;left:auto}.ant-transfer-rtl .ant-transfer-list-header-title{text-align:left}.ant-transfer-rtl .ant-transfer-list-content-item>*:not(:last-child){margin-right:0;margin-left:8px}.ant-transfer-rtl .ant-transfer-list-pagination{text-align:left}.ant-transfer-rtl .ant-transfer-list-footer{right:0;left:auto}@keyframes ant-tree-node-fx-do-not-use{0%{opacity:0}to{opacity:1}}.ant-tree.ant-tree-directory .ant-tree-treenode{position:relative}.ant-tree.ant-tree-directory .ant-tree-treenode:before{position:absolute;top:0;right:0;bottom:4px;left:0;transition:background-color .3s;content:"";pointer-events:none}.ant-tree.ant-tree-directory .ant-tree-treenode:hover:before{background:#f5f5f5}.ant-tree.ant-tree-directory .ant-tree-treenode>*{z-index:1}.ant-tree.ant-tree-directory .ant-tree-treenode .ant-tree-switcher{transition:color .3s}.ant-tree.ant-tree-directory .ant-tree-treenode .ant-tree-node-content-wrapper{border-radius:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-tree.ant-tree-directory .ant-tree-treenode .ant-tree-node-content-wrapper:hover{background:transparent}.ant-tree.ant-tree-directory .ant-tree-treenode .ant-tree-node-content-wrapper.ant-tree-node-selected{color:#fff;background:transparent}.ant-tree.ant-tree-directory .ant-tree-treenode-selected:hover:before,.ant-tree.ant-tree-directory .ant-tree-treenode-selected:before{background:#8d6a46}.ant-tree.ant-tree-directory .ant-tree-treenode-selected .ant-tree-switcher{color:#fff}.ant-tree.ant-tree-directory .ant-tree-treenode-selected .ant-tree-node-content-wrapper{color:#fff;background:transparent}.ant-tree-checkbox{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;list-style:none;font-feature-settings:"tnum";position:relative;top:.2em;line-height:1;white-space:nowrap;outline:none;cursor:pointer}.ant-tree-checkbox-wrapper:hover .ant-tree-checkbox-inner,.ant-tree-checkbox:hover .ant-tree-checkbox-inner,.ant-tree-checkbox-input:focus+.ant-tree-checkbox-inner{border-color:#8d6a46}.ant-tree-checkbox-checked:after{position:absolute;top:0;left:0;width:100%;height:100%;border:1px solid #8D6A46;border-radius:5px;visibility:hidden;animation:antCheckboxEffect .36s ease-in-out;animation-fill-mode:backwards;content:""}.ant-tree-checkbox:hover:after,.ant-tree-checkbox-wrapper:hover .ant-tree-checkbox:after{visibility:visible}.ant-tree-checkbox-inner{position:relative;top:0;left:0;display:block;width:20px;height:20px;direction:ltr;background-color:#fff;border:1px solid #d9d9d9;border-radius:3px;border-collapse:separate;transition:all .3s}.ant-tree-checkbox-inner:after{position:absolute;top:50%;left:21.5%;display:table;width:7.14285714px;height:11.42857143px;border:2px solid #fff;border-top:0;border-left:0;transform:rotate(45deg) scale(0) translate(-50%,-50%);opacity:0;transition:all .1s cubic-bezier(.71,-.46,.88,.6),opacity .1s;content:" "}.ant-tree-checkbox-input{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;width:100%;height:100%;cursor:pointer;opacity:0}.ant-tree-checkbox-checked .ant-tree-checkbox-inner:after{position:absolute;display:table;border:2px solid #fff;border-top:0;border-left:0;transform:rotate(45deg) scale(1) translate(-50%,-50%);opacity:1;transition:all .2s cubic-bezier(.12,.4,.29,1.46) .1s;content:" "}.ant-tree-checkbox-checked .ant-tree-checkbox-inner{background-color:#8d6a46;border-color:#8d6a46}.ant-tree-checkbox-disabled{cursor:not-allowed}.ant-tree-checkbox-disabled.ant-tree-checkbox-checked .ant-tree-checkbox-inner:after{border-color:#00000040;animation-name:none}.ant-tree-checkbox-disabled .ant-tree-checkbox-input{cursor:not-allowed;pointer-events:none}.ant-tree-checkbox-disabled .ant-tree-checkbox-inner{background-color:#f5f5f5;border-color:#d9d9d9!important}.ant-tree-checkbox-disabled .ant-tree-checkbox-inner:after{border-color:#f5f5f5;border-collapse:separate;animation-name:none}.ant-tree-checkbox-disabled+span{color:#00000040;cursor:not-allowed}.ant-tree-checkbox-disabled:hover:after,.ant-tree-checkbox-wrapper:hover .ant-tree-checkbox-disabled:after{visibility:hidden}.ant-tree-checkbox-wrapper{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";display:inline-flex;align-items:baseline;line-height:unset;cursor:pointer}.ant-tree-checkbox-wrapper:after{display:inline-block;width:0;overflow:hidden;content:" "}.ant-tree-checkbox-wrapper.ant-tree-checkbox-wrapper-disabled{cursor:not-allowed}.ant-tree-checkbox-wrapper+.ant-tree-checkbox-wrapper{margin-left:8px}.ant-tree-checkbox+span{padding-right:8px;padding-left:8px}.ant-tree-checkbox-group{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";display:inline-block}.ant-tree-checkbox-group-item{margin-right:8px}.ant-tree-checkbox-group-item:last-child{margin-right:0}.ant-tree-checkbox-group-item+.ant-tree-checkbox-group-item{margin-left:0}.ant-tree-checkbox-indeterminate .ant-tree-checkbox-inner{background-color:#fff;border-color:#d9d9d9}.ant-tree-checkbox-indeterminate .ant-tree-checkbox-inner:after{top:50%;left:50%;width:12px;height:12px;background-color:#8d6a46;border:0;transform:translate(-50%,-50%) scale(1);opacity:1;content:" "}.ant-tree-checkbox-indeterminate.ant-tree-checkbox-disabled .ant-tree-checkbox-inner:after{background-color:#00000040;border-color:#00000040}.ant-tree-checkbox-rtl{direction:rtl}.ant-tree-checkbox-group-rtl .ant-tree-checkbox-group-item{margin-right:0;margin-left:8px}.ant-tree-checkbox-group-rtl .ant-tree-checkbox-group-item:last-child{margin-left:0!important}.ant-tree-checkbox-group-rtl .ant-tree-checkbox-group-item+.ant-tree-checkbox-group-item{margin-left:8px}.ant-tree{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";background:var(--c-canvas);border-radius:5px;transition:background-color .3s}.ant-tree-focused:not(:hover):not(.ant-tree-active-focused){background:#ccc8c0}.ant-tree-list-holder-inner{align-items:flex-start}.ant-tree.ant-tree-block-node .ant-tree-list-holder-inner{align-items:stretch}.ant-tree.ant-tree-block-node .ant-tree-list-holder-inner .ant-tree-node-content-wrapper{flex:auto}.ant-tree.ant-tree-block-node .ant-tree-list-holder-inner .ant-tree-treenode.dragging{position:relative}.ant-tree.ant-tree-block-node .ant-tree-list-holder-inner .ant-tree-treenode.dragging:after{position:absolute;top:0;right:0;bottom:4px;left:0;border:1px solid #8D6A46;opacity:0;animation:ant-tree-node-fx-do-not-use .3s;animation-play-state:running;animation-fill-mode:forwards;content:"";pointer-events:none}.ant-tree .ant-tree-treenode{display:flex;align-items:flex-start;padding:0 0 4px;outline:none}.ant-tree .ant-tree-treenode-disabled .ant-tree-node-content-wrapper{color:#00000040;cursor:not-allowed}.ant-tree .ant-tree-treenode-disabled .ant-tree-node-content-wrapper:hover{background:transparent}.ant-tree .ant-tree-treenode-active .ant-tree-node-content-wrapper{background:#f5f5f5}.ant-tree .ant-tree-treenode:not(.ant-tree .ant-tree-treenode-disabled).filter-node .ant-tree-title{color:inherit;font-weight:500}.ant-tree-indent{align-self:stretch;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-tree-indent-unit{display:inline-block;width:24px}.ant-tree-draggable-icon{width:24px;line-height:24px;text-align:center;opacity:.2;transition:opacity .3s}.ant-tree-treenode:hover .ant-tree-draggable-icon{opacity:.45}.ant-tree-switcher{position:relative;flex:none;align-self:stretch;width:24px;margin:0;line-height:24px;text-align:center;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-tree-switcher .ant-tree-switcher-icon,.ant-tree-switcher .ant-select-tree-switcher-icon{display:inline-block;font-size:10px;vertical-align:baseline}.ant-tree-switcher .ant-tree-switcher-icon svg,.ant-tree-switcher .ant-select-tree-switcher-icon svg{transition:transform .3s}.ant-tree-switcher-noop{cursor:default}.ant-tree-switcher_close .ant-tree-switcher-icon svg{transform:rotate(-90deg)}.ant-tree-switcher-loading-icon{color:#8d6a46}.ant-tree-switcher-leaf-line{position:relative;z-index:1;display:inline-block;width:100%;height:100%}.ant-tree-switcher-leaf-line:before{position:absolute;top:0;right:12px;bottom:-4px;margin-left:-1px;border-right:1px solid #d9d9d9;content:" "}.ant-tree-switcher-leaf-line:after{position:absolute;width:10px;height:14px;border-bottom:1px solid #d9d9d9;content:" "}.ant-tree-checkbox{top:initial;margin:2px 8px 0 0}.ant-tree .ant-tree-node-content-wrapper{position:relative;z-index:auto;min-height:24px;margin:0;padding:0 4px;color:inherit;line-height:24px;background:transparent;border-radius:5px;cursor:pointer;transition:all .3s,border 0s,line-height 0s,box-shadow 0s}.ant-tree .ant-tree-node-content-wrapper:hover{background-color:#f5f5f5}.ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected{background-color:#bfbbb4}.ant-tree .ant-tree-node-content-wrapper .ant-tree-iconEle{display:inline-block;width:24px;height:24px;line-height:24px;text-align:center;vertical-align:top}.ant-tree .ant-tree-node-content-wrapper .ant-tree-iconEle:empty{display:none}.ant-tree-unselectable .ant-tree-node-content-wrapper:hover{background-color:transparent}.ant-tree-node-content-wrapper{line-height:24px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-tree-node-content-wrapper .ant-tree-drop-indicator{position:absolute;z-index:1;height:2px;background-color:#8d6a46;border-radius:1px;pointer-events:none}.ant-tree-node-content-wrapper .ant-tree-drop-indicator:after{position:absolute;top:-3px;left:-6px;width:8px;height:8px;background-color:transparent;border:2px solid #8D6A46;border-radius:50%;content:""}.ant-tree .ant-tree-treenode.drop-container>[draggable]{box-shadow:0 0 0 2px #8d6a46}.ant-tree-show-line .ant-tree-indent-unit{position:relative;height:100%}.ant-tree-show-line .ant-tree-indent-unit:before{position:absolute;top:0;right:12px;bottom:-4px;border-right:1px solid #d9d9d9;content:""}.ant-tree-show-line .ant-tree-indent-unit-end:before{display:none}.ant-tree-show-line .ant-tree-switcher{background:var(--c-canvas)}.ant-tree-show-line .ant-tree-switcher-line-icon{vertical-align:-.15em}.ant-tree .ant-tree-treenode-leaf-last .ant-tree-switcher-leaf-line:before{top:auto!important;bottom:auto!important;height:14px!important}.ant-tree-rtl{direction:rtl}.ant-tree-rtl .ant-tree-node-content-wrapper[draggable=true] .ant-tree-drop-indicator:after{right:-6px;left:unset}.ant-tree .ant-tree-treenode-rtl{direction:rtl}.ant-tree-rtl .ant-tree-switcher_close .ant-tree-switcher-icon svg{transform:rotate(90deg)}.ant-tree-rtl.ant-tree-show-line .ant-tree-indent-unit:before{right:auto;left:-13px;border-right:none;border-left:1px solid #d9d9d9}.ant-tree-rtl.ant-tree-checkbox,.ant-tree-select-dropdown-rtl .ant-select-tree-checkbox{margin:2px 0 0 8px}.ant-select-tree-checkbox{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;list-style:none;font-feature-settings:"tnum";position:relative;top:.2em;line-height:1;white-space:nowrap;outline:none;cursor:pointer}.ant-select-tree-checkbox-wrapper:hover .ant-select-tree-checkbox-inner,.ant-select-tree-checkbox:hover .ant-select-tree-checkbox-inner,.ant-select-tree-checkbox-input:focus+.ant-select-tree-checkbox-inner{border-color:#8d6a46}.ant-select-tree-checkbox-checked:after{position:absolute;top:0;left:0;width:100%;height:100%;border:1px solid #8D6A46;border-radius:5px;visibility:hidden;animation:antCheckboxEffect .36s ease-in-out;animation-fill-mode:backwards;content:""}.ant-select-tree-checkbox:hover:after,.ant-select-tree-checkbox-wrapper:hover .ant-select-tree-checkbox:after{visibility:visible}.ant-select-tree-checkbox-inner{position:relative;top:0;left:0;display:block;width:20px;height:20px;direction:ltr;background-color:#fff;border:1px solid #d9d9d9;border-radius:3px;border-collapse:separate;transition:all .3s}.ant-select-tree-checkbox-inner:after{position:absolute;top:50%;left:21.5%;display:table;width:7.14285714px;height:11.42857143px;border:2px solid #fff;border-top:0;border-left:0;transform:rotate(45deg) scale(0) translate(-50%,-50%);opacity:0;transition:all .1s cubic-bezier(.71,-.46,.88,.6),opacity .1s;content:" "}.ant-select-tree-checkbox-input{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;width:100%;height:100%;cursor:pointer;opacity:0}.ant-select-tree-checkbox-checked .ant-select-tree-checkbox-inner:after{position:absolute;display:table;border:2px solid #fff;border-top:0;border-left:0;transform:rotate(45deg) scale(1) translate(-50%,-50%);opacity:1;transition:all .2s cubic-bezier(.12,.4,.29,1.46) .1s;content:" "}.ant-select-tree-checkbox-checked .ant-select-tree-checkbox-inner{background-color:#8d6a46;border-color:#8d6a46}.ant-select-tree-checkbox-disabled{cursor:not-allowed}.ant-select-tree-checkbox-disabled.ant-select-tree-checkbox-checked .ant-select-tree-checkbox-inner:after{border-color:#00000040;animation-name:none}.ant-select-tree-checkbox-disabled .ant-select-tree-checkbox-input{cursor:not-allowed;pointer-events:none}.ant-select-tree-checkbox-disabled .ant-select-tree-checkbox-inner{background-color:#f5f5f5;border-color:#d9d9d9!important}.ant-select-tree-checkbox-disabled .ant-select-tree-checkbox-inner:after{border-color:#f5f5f5;border-collapse:separate;animation-name:none}.ant-select-tree-checkbox-disabled+span{color:#00000040;cursor:not-allowed}.ant-select-tree-checkbox-disabled:hover:after,.ant-select-tree-checkbox-wrapper:hover .ant-select-tree-checkbox-disabled:after{visibility:hidden}.ant-select-tree-checkbox-wrapper{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";display:inline-flex;align-items:baseline;line-height:unset;cursor:pointer}.ant-select-tree-checkbox-wrapper:after{display:inline-block;width:0;overflow:hidden;content:" "}.ant-select-tree-checkbox-wrapper.ant-select-tree-checkbox-wrapper-disabled{cursor:not-allowed}.ant-select-tree-checkbox-wrapper+.ant-select-tree-checkbox-wrapper{margin-left:8px}.ant-select-tree-checkbox+span{padding-right:8px;padding-left:8px}.ant-select-tree-checkbox-group{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";display:inline-block}.ant-select-tree-checkbox-group-item{margin-right:8px}.ant-select-tree-checkbox-group-item:last-child{margin-right:0}.ant-select-tree-checkbox-group-item+.ant-select-tree-checkbox-group-item{margin-left:0}.ant-select-tree-checkbox-indeterminate .ant-select-tree-checkbox-inner{background-color:#fff;border-color:#d9d9d9}.ant-select-tree-checkbox-indeterminate .ant-select-tree-checkbox-inner:after{top:50%;left:50%;width:12px;height:12px;background-color:#8d6a46;border:0;transform:translate(-50%,-50%) scale(1);opacity:1;content:" "}.ant-select-tree-checkbox-indeterminate.ant-select-tree-checkbox-disabled .ant-select-tree-checkbox-inner:after{background-color:#00000040;border-color:#00000040}.ant-select-tree-checkbox-rtl{direction:rtl}.ant-select-tree-checkbox-group-rtl .ant-select-tree-checkbox-group-item{margin-right:0;margin-left:8px}.ant-select-tree-checkbox-group-rtl .ant-select-tree-checkbox-group-item:last-child{margin-left:0!important}.ant-select-tree-checkbox-group-rtl .ant-select-tree-checkbox-group-item+.ant-select-tree-checkbox-group-item{margin-left:8px}.ant-tree-select-dropdown{padding:8px 4px}.ant-tree-select-dropdown-rtl{direction:rtl}.ant-tree-select-dropdown .ant-select-tree{border-radius:0}.ant-tree-select-dropdown .ant-select-tree-list-holder-inner{align-items:stretch}.ant-tree-select-dropdown .ant-select-tree-list-holder-inner .ant-select-tree-treenode .ant-select-tree-node-content-wrapper{flex:auto}.ant-select-tree{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";background:var(--c-canvas);border-radius:5px;transition:background-color .3s}.ant-select-tree-focused:not(:hover):not(.ant-select-tree-active-focused){background:#ccc8c0}.ant-select-tree-list-holder-inner{align-items:flex-start}.ant-select-tree.ant-select-tree-block-node .ant-select-tree-list-holder-inner{align-items:stretch}.ant-select-tree.ant-select-tree-block-node .ant-select-tree-list-holder-inner .ant-select-tree-node-content-wrapper{flex:auto}.ant-select-tree.ant-select-tree-block-node .ant-select-tree-list-holder-inner .ant-select-tree-treenode.dragging{position:relative}.ant-select-tree.ant-select-tree-block-node .ant-select-tree-list-holder-inner .ant-select-tree-treenode.dragging:after{position:absolute;top:0;right:0;bottom:4px;left:0;border:1px solid #8D6A46;opacity:0;animation:ant-tree-node-fx-do-not-use .3s;animation-play-state:running;animation-fill-mode:forwards;content:"";pointer-events:none}.ant-select-tree .ant-select-tree-treenode{display:flex;align-items:flex-start;padding:0 0 4px;outline:none}.ant-select-tree .ant-select-tree-treenode-disabled .ant-select-tree-node-content-wrapper{color:#00000040;cursor:not-allowed}.ant-select-tree .ant-select-tree-treenode-disabled .ant-select-tree-node-content-wrapper:hover{background:transparent}.ant-select-tree .ant-select-tree-treenode-active .ant-select-tree-node-content-wrapper{background:#f5f5f5}.ant-select-tree .ant-select-tree-treenode:not(.ant-select-tree .ant-select-tree-treenode-disabled).filter-node .ant-select-tree-title{color:inherit;font-weight:500}.ant-select-tree-indent{align-self:stretch;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-select-tree-indent-unit{display:inline-block;width:24px}.ant-select-tree-draggable-icon{width:24px;line-height:24px;text-align:center;opacity:.2;transition:opacity .3s}.ant-select-tree-treenode:hover .ant-select-tree-draggable-icon{opacity:.45}.ant-select-tree-switcher{position:relative;flex:none;align-self:stretch;width:24px;margin:0;line-height:24px;text-align:center;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-select-tree-switcher .ant-tree-switcher-icon,.ant-select-tree-switcher .ant-select-tree-switcher-icon{display:inline-block;font-size:10px;vertical-align:baseline}.ant-select-tree-switcher .ant-tree-switcher-icon svg,.ant-select-tree-switcher .ant-select-tree-switcher-icon svg{transition:transform .3s}.ant-select-tree-switcher-noop{cursor:default}.ant-select-tree-switcher_close .ant-select-tree-switcher-icon svg{transform:rotate(-90deg)}.ant-select-tree-switcher-loading-icon{color:#8d6a46}.ant-select-tree-switcher-leaf-line{position:relative;z-index:1;display:inline-block;width:100%;height:100%}.ant-select-tree-switcher-leaf-line:before{position:absolute;top:0;right:12px;bottom:-4px;margin-left:-1px;border-right:1px solid #d9d9d9;content:" "}.ant-select-tree-switcher-leaf-line:after{position:absolute;width:10px;height:14px;border-bottom:1px solid #d9d9d9;content:" "}.ant-select-tree-checkbox{top:initial;margin:2px 8px 0 0}.ant-select-tree .ant-select-tree-node-content-wrapper{position:relative;z-index:auto;min-height:24px;margin:0;padding:0 4px;color:inherit;line-height:24px;background:transparent;border-radius:5px;cursor:pointer;transition:all .3s,border 0s,line-height 0s,box-shadow 0s}.ant-select-tree .ant-select-tree-node-content-wrapper:hover{background-color:#f5f5f5}.ant-select-tree .ant-select-tree-node-content-wrapper.ant-select-tree-node-selected{background-color:#bfbbb4}.ant-select-tree .ant-select-tree-node-content-wrapper .ant-select-tree-iconEle{display:inline-block;width:24px;height:24px;line-height:24px;text-align:center;vertical-align:top}.ant-select-tree .ant-select-tree-node-content-wrapper .ant-select-tree-iconEle:empty{display:none}.ant-select-tree-unselectable .ant-select-tree-node-content-wrapper:hover{background-color:transparent}.ant-select-tree-node-content-wrapper{line-height:24px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-select-tree-node-content-wrapper .ant-tree-drop-indicator{position:absolute;z-index:1;height:2px;background-color:#8d6a46;border-radius:1px;pointer-events:none}.ant-select-tree-node-content-wrapper .ant-tree-drop-indicator:after{position:absolute;top:-3px;left:-6px;width:8px;height:8px;background-color:transparent;border:2px solid #8D6A46;border-radius:50%;content:""}.ant-select-tree .ant-select-tree-treenode.drop-container>[draggable]{box-shadow:0 0 0 2px #8d6a46}.ant-select-tree-show-line .ant-select-tree-indent-unit{position:relative;height:100%}.ant-select-tree-show-line .ant-select-tree-indent-unit:before{position:absolute;top:0;right:12px;bottom:-4px;border-right:1px solid #d9d9d9;content:""}.ant-select-tree-show-line .ant-select-tree-indent-unit-end:before{display:none}.ant-select-tree-show-line .ant-select-tree-switcher{background:var(--c-canvas)}.ant-select-tree-show-line .ant-select-tree-switcher-line-icon{vertical-align:-.15em}.ant-select-tree .ant-select-tree-treenode-leaf-last .ant-select-tree-switcher-leaf-line:before{top:auto!important;bottom:auto!important;height:14px!important}.ant-tree-select-dropdown-rtl .ant-select-tree .ant-select-tree-switcher_close .ant-select-tree-switcher-icon svg{transform:rotate(90deg)}.ant-tree-select-dropdown-rtl .ant-select-tree .ant-select-tree-switcher-loading-icon{transform:scaleY(-1)}.ant-typography{color:#000000d9;overflow-wrap:break-word}.ant-typography.ant-typography-secondary{color:#00000073}.ant-typography.ant-typography-success{color:#52c41a}.ant-typography.ant-typography-warning{color:#faad14}.ant-typography.ant-typography-danger{color:#e31a1a}a.ant-typography.ant-typography-danger:active,a.ant-typography.ant-typography-danger:focus,a.ant-typography.ant-typography-danger:hover{color:#f04741}.ant-typography.ant-typography-disabled{color:#00000040;cursor:not-allowed;-webkit-user-select:none;-moz-user-select:none;user-select:none}div.ant-typography,.ant-typography p{margin-bottom:1em}h1.ant-typography,.ant-typography h1{margin-bottom:.5em;color:#1c2d56;font-weight:600;font-size:38px;line-height:1.23}h2.ant-typography,.ant-typography h2{margin-bottom:.5em;color:#1c2d56;font-weight:600;font-size:30px;line-height:1.35}h3.ant-typography,.ant-typography h3{margin-bottom:.5em;color:#1c2d56;font-weight:600;font-size:24px;line-height:1.35}h4.ant-typography,.ant-typography h4{margin-bottom:.5em;color:#1c2d56;font-weight:600;font-size:20px;line-height:1.4}h5.ant-typography,.ant-typography h5{margin-bottom:.5em;color:#1c2d56;font-weight:600;font-size:16px;line-height:1.5}.ant-typography+h1.ant-typography,.ant-typography+h2.ant-typography,.ant-typography+h3.ant-typography,.ant-typography+h4.ant-typography,.ant-typography+h5.ant-typography{margin-top:1.2em}.ant-typography div+h1,.ant-typography ul+h1,.ant-typography li+h1,.ant-typography p+h1,.ant-typography h1+h1,.ant-typography h2+h1,.ant-typography h3+h1,.ant-typography h4+h1,.ant-typography h5+h1,.ant-typography div+h2,.ant-typography ul+h2,.ant-typography li+h2,.ant-typography p+h2,.ant-typography h1+h2,.ant-typography h2+h2,.ant-typography h3+h2,.ant-typography h4+h2,.ant-typography h5+h2,.ant-typography div+h3,.ant-typography ul+h3,.ant-typography li+h3,.ant-typography p+h3,.ant-typography h1+h3,.ant-typography h2+h3,.ant-typography h3+h3,.ant-typography h4+h3,.ant-typography h5+h3,.ant-typography div+h4,.ant-typography ul+h4,.ant-typography li+h4,.ant-typography p+h4,.ant-typography h1+h4,.ant-typography h2+h4,.ant-typography h3+h4,.ant-typography h4+h4,.ant-typography h5+h4,.ant-typography div+h5,.ant-typography ul+h5,.ant-typography li+h5,.ant-typography p+h5,.ant-typography h1+h5,.ant-typography h2+h5,.ant-typography h3+h5,.ant-typography h4+h5,.ant-typography h5+h5{margin-top:1.2em}a.ant-typography-ellipsis,span.ant-typography-ellipsis{display:inline-block;max-width:100%}a.ant-typography,.ant-typography a{color:#1c2d56;outline:none;cursor:pointer;transition:color .3s;text-decoration:none}a.ant-typography:focus,.ant-typography a:focus,a.ant-typography:hover,.ant-typography a:hover{color:#314263}a.ant-typography:active,.ant-typography a:active{color:#0e1730}a.ant-typography:active,.ant-typography a:active,a.ant-typography:hover,.ant-typography a:hover{text-decoration:none}a.ant-typography[disabled],.ant-typography a[disabled],a.ant-typography.ant-typography-disabled,.ant-typography a.ant-typography-disabled{color:#00000040;cursor:not-allowed}a.ant-typography[disabled]:active,.ant-typography a[disabled]:active,a.ant-typography.ant-typography-disabled:active,.ant-typography a.ant-typography-disabled:active,a.ant-typography[disabled]:hover,.ant-typography a[disabled]:hover,a.ant-typography.ant-typography-disabled:hover,.ant-typography a.ant-typography-disabled:hover{color:#00000040}a.ant-typography[disabled]:active,.ant-typography a[disabled]:active,a.ant-typography.ant-typography-disabled:active,.ant-typography a.ant-typography-disabled:active{pointer-events:none}.ant-typography code{margin:0 .2em;padding:.2em .4em .1em;font-size:85%;background:#9696961a;border:1px solid rgba(100,100,100,.2);border-radius:3px}.ant-typography kbd{margin:0 .2em;padding:.15em .4em .1em;font-size:90%;background:#9696960f;border:1px solid rgba(100,100,100,.2);border-bottom-width:2px;border-radius:3px}.ant-typography mark{padding:0;background-color:#ffe58f}.ant-typography u,.ant-typography ins{text-decoration:underline;-webkit-text-decoration-skip:ink;text-decoration-skip-ink:auto}.ant-typography s,.ant-typography del{text-decoration:line-through}.ant-typography strong{font-weight:600}.ant-typography-expand,.ant-typography-edit,.ant-typography-copy{color:#1c2d56;text-decoration:none;outline:none;cursor:pointer;transition:color .3s;margin-left:4px}.ant-typography-expand:focus,.ant-typography-edit:focus,.ant-typography-copy:focus,.ant-typography-expand:hover,.ant-typography-edit:hover,.ant-typography-copy:hover{color:#314263}.ant-typography-expand:active,.ant-typography-edit:active,.ant-typography-copy:active{color:#0e1730}.ant-typography-copy-success,.ant-typography-copy-success:hover,.ant-typography-copy-success:focus{color:#52c41a}.ant-typography-edit-content{position:relative}div.ant-typography-edit-content{left:-12px;margin-top:-11px;margin-bottom:calc(1em - 11px)}.ant-typography-edit-content-confirm{position:absolute;right:10px;bottom:8px;color:#00000073;pointer-events:none}.ant-typography-edit-content textarea{-moz-transition:none}.ant-typography ul,.ant-typography ol{margin:0 0 1em;padding:0}.ant-typography ul li,.ant-typography ol li{margin:0 0 0 20px;padding:0 0 0 4px}.ant-typography ul{list-style-type:circle}.ant-typography ul ul{list-style-type:disc}.ant-typography ol{list-style-type:decimal}.ant-typography pre,.ant-typography blockquote{margin:1em 0}.ant-typography pre{padding:.4em .6em;white-space:pre-wrap;word-wrap:break-word;background:#9696961a;border:1px solid rgba(100,100,100,.2);border-radius:3px}.ant-typography pre code{display:inline;margin:0;padding:0;font-size:inherit;font-family:inherit;background:transparent;border:0}.ant-typography blockquote{padding:0 0 0 .6em;border-left:4px solid rgba(100,100,100,.2);opacity:.85}.ant-typography-single-line{white-space:nowrap}.ant-typography-ellipsis-single-line{overflow:hidden;text-overflow:ellipsis}a.ant-typography-ellipsis-single-line,span.ant-typography-ellipsis-single-line{vertical-align:bottom}.ant-typography-ellipsis-multiple-line{display:-webkit-box;overflow:hidden;-webkit-line-clamp:3;-webkit-box-orient:vertical}.ant-typography-rtl{direction:rtl}.ant-typography-rtl .ant-typography-expand,.ant-typography-rtl .ant-typography-edit,.ant-typography-rtl .ant-typography-copy{margin-right:4px;margin-left:0}.ant-typography-rtl .ant-typography-expand{float:left}div.ant-typography-edit-content.ant-typography-rtl{right:-12px;left:auto}.ant-typography-rtl .ant-typography-edit-content-confirm{right:auto;left:10px}.ant-typography-rtl.ant-typography ul li,.ant-typography-rtl.ant-typography ol li{margin:0 20px 0 0;padding:0 4px 0 0}.ant-upload{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";outline:0}.ant-upload p{margin:0}.ant-upload-btn{display:block;width:100%;outline:none}.ant-upload input[type=file]{cursor:pointer}.ant-upload.ant-upload-select{display:inline-block}.ant-upload.ant-upload-disabled{cursor:not-allowed}.ant-upload.ant-upload-select-picture-card{width:104px;height:104px;margin-right:8px;margin-bottom:8px;text-align:center;vertical-align:top;background-color:#fafafa;border:1px dashed #d9d9d9;border-radius:5px;cursor:pointer;transition:border-color .3s}.ant-upload.ant-upload-select-picture-card>.ant-upload{display:flex;align-items:center;justify-content:center;height:100%;text-align:center}.ant-upload.ant-upload-select-picture-card:hover{border-color:#8d6a46}.ant-upload-disabled.ant-upload.ant-upload-select-picture-card:hover{border-color:#d9d9d9}.ant-upload.ant-upload-drag{position:relative;width:100%;height:100%;text-align:center;background:#fafafa;border:1px dashed #d9d9d9;border-radius:5px;cursor:pointer;transition:border-color .3s}.ant-upload.ant-upload-drag .ant-upload{padding:16px 0}.ant-upload.ant-upload-drag.ant-upload-drag-hover:not(.ant-upload-disabled){border-color:#66482e}.ant-upload.ant-upload-drag.ant-upload-disabled{cursor:not-allowed}.ant-upload.ant-upload-drag .ant-upload-btn{display:table;height:100%}.ant-upload.ant-upload-drag .ant-upload-drag-container{display:table-cell;vertical-align:middle}.ant-upload.ant-upload-drag:not(.ant-upload-disabled):hover{border-color:#998165}.ant-upload.ant-upload-drag p.ant-upload-drag-icon{margin-bottom:20px}.ant-upload.ant-upload-drag p.ant-upload-drag-icon .anticon{color:#998165;font-size:48px}.ant-upload.ant-upload-drag p.ant-upload-text{margin:0 0 4px;color:#1c2d56;font-size:16px}.ant-upload.ant-upload-drag p.ant-upload-hint{color:#00000073;font-size:14px}.ant-upload.ant-upload-drag .anticon-plus{color:#00000040;font-size:30px;transition:all .3s}.ant-upload.ant-upload-drag .anticon-plus:hover,.ant-upload.ant-upload-drag:hover .anticon-plus{color:#00000073}.ant-upload-picture-card-wrapper{display:inline-block;width:100%}.ant-upload-picture-card-wrapper:before{display:table;content:""}.ant-upload-picture-card-wrapper:after{display:table;clear:both;content:""}.ant-upload-list{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;list-style:none;font-feature-settings:"tnum";line-height:1.5715}.ant-upload-list:before{display:table;content:""}.ant-upload-list:after{display:table;clear:both;content:""}.ant-upload-list-item{position:relative;height:22.001px;margin-top:8px;font-size:14px}.ant-upload-list-item-name{display:inline-block;width:100%;padding-left:22px;overflow:hidden;line-height:1.5715;white-space:nowrap;text-overflow:ellipsis}.ant-upload-list-item-card-actions{position:absolute;right:0}.ant-upload-list-item-card-actions-btn{opacity:0}.ant-upload-list-item-card-actions-btn.ant-btn-sm{height:20px;line-height:1}.ant-upload-list-item-card-actions.picture{top:22px;line-height:0}.ant-upload-list-item-card-actions-btn:focus,.ant-upload-list-item-card-actions.picture .ant-upload-list-item-card-actions-btn{opacity:1}.ant-upload-list-item-card-actions .anticon{color:#00000073}.ant-upload-list-item-info{height:100%;padding:0 4px;transition:background-color .3s}.ant-upload-list-item-info>span{display:block;width:100%;height:100%}.ant-upload-list-item-info .anticon-loading .anticon,.ant-upload-list-item-info .ant-upload-text-icon .anticon{position:absolute;top:5px;color:#00000073;font-size:14px}.ant-upload-list-item .anticon-close{position:absolute;top:6px;right:4px;color:#00000073;font-size:10px;line-height:0;cursor:pointer;opacity:0;transition:all .3s}.ant-upload-list-item .anticon-close:hover{color:#000000d9}.ant-upload-list-item:hover .ant-upload-list-item-info{background-color:#f5f5f5}.ant-upload-list-item:hover .anticon-close,.ant-upload-list-item:hover .ant-upload-list-item-card-actions-btn{opacity:1}.ant-upload-list-item-error,.ant-upload-list-item-error .ant-upload-text-icon>.anticon,.ant-upload-list-item-error .ant-upload-list-item-name{color:#e31a1a}.ant-upload-list-item-error .ant-upload-list-item-card-actions .anticon{color:#e31a1a}.ant-upload-list-item-error .ant-upload-list-item-card-actions-btn{opacity:1}.ant-upload-list-item-progress{position:absolute;bottom:-12px;width:100%;padding-left:26px;font-size:14px;line-height:0}.ant-upload-list-picture .ant-upload-list-item,.ant-upload-list-picture-card .ant-upload-list-item{position:relative;height:66px;padding:8px;border:1px solid #d9d9d9;border-radius:5px}.ant-upload-list-picture .ant-upload-list-item:hover,.ant-upload-list-picture-card .ant-upload-list-item:hover{background:transparent}.ant-upload-list-picture .ant-upload-list-item-error,.ant-upload-list-picture-card .ant-upload-list-item-error{border-color:#e31a1a}.ant-upload-list-picture .ant-upload-list-item:hover .ant-upload-list-item-info,.ant-upload-list-picture-card .ant-upload-list-item:hover .ant-upload-list-item-info{background:transparent}.ant-upload-list-picture .ant-upload-list-item-uploading,.ant-upload-list-picture-card .ant-upload-list-item-uploading{border-style:dashed}.ant-upload-list-picture .ant-upload-list-item-thumbnail,.ant-upload-list-picture-card .ant-upload-list-item-thumbnail{width:48px;height:48px;line-height:60px;text-align:center;opacity:.8}.ant-upload-list-picture .ant-upload-list-item-thumbnail .anticon,.ant-upload-list-picture-card .ant-upload-list-item-thumbnail .anticon{font-size:26px}.ant-upload-list-picture .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill="#e6f7ff"],.ant-upload-list-picture-card .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill="#e6f7ff"]{fill:#ffece8}.ant-upload-list-picture .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill="#1890ff"],.ant-upload-list-picture-card .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill="#1890ff"]{fill:#e31a1a}.ant-upload-list-picture .ant-upload-list-item-icon,.ant-upload-list-picture-card .ant-upload-list-item-icon{position:absolute;top:50%;left:50%;font-size:26px;transform:translate(-50%,-50%)}.ant-upload-list-picture .ant-upload-list-item-icon .anticon,.ant-upload-list-picture-card .ant-upload-list-item-icon .anticon{font-size:26px}.ant-upload-list-picture .ant-upload-list-item-image,.ant-upload-list-picture-card .ant-upload-list-item-image{max-width:100%}.ant-upload-list-picture .ant-upload-list-item-thumbnail img,.ant-upload-list-picture-card .ant-upload-list-item-thumbnail img{display:block;width:48px;height:48px;overflow:hidden}.ant-upload-list-picture .ant-upload-list-item-name,.ant-upload-list-picture-card .ant-upload-list-item-name{display:inline-block;box-sizing:border-box;max-width:100%;margin:0 0 0 8px;padding-right:8px;padding-left:48px;overflow:hidden;line-height:44px;white-space:nowrap;text-overflow:ellipsis;transition:all .3s}.ant-upload-list-picture .ant-upload-list-item-uploading .ant-upload-list-item-name,.ant-upload-list-picture-card .ant-upload-list-item-uploading .ant-upload-list-item-name{margin-bottom:12px}.ant-upload-list-picture .ant-upload-list-item-progress,.ant-upload-list-picture-card .ant-upload-list-item-progress{bottom:14px;width:calc(100% - 24px);margin-top:0;padding-left:56px}.ant-upload-list-picture .anticon-close,.ant-upload-list-picture-card .anticon-close{position:absolute;top:8px;right:8px;line-height:1;opacity:1}.ant-upload-list-picture-card-container{display:inline-block;width:104px;height:104px;margin:0 8px 8px 0;vertical-align:top}.ant-upload-list-picture-card.ant-upload-list:after{display:none}.ant-upload-list-picture-card .ant-upload-list-item{height:100%;margin:0}.ant-upload-list-picture-card .ant-upload-list-item-info{position:relative;height:100%;overflow:hidden}.ant-upload-list-picture-card .ant-upload-list-item-info:before{position:absolute;z-index:1;width:100%;height:100%;background-color:#00000080;opacity:0;transition:all .3s;content:" "}.ant-upload-list-picture-card .ant-upload-list-item:hover .ant-upload-list-item-info:before{opacity:1}.ant-upload-list-picture-card .ant-upload-list-item-actions{position:absolute;top:50%;left:50%;z-index:10;white-space:nowrap;transform:translate(-50%,-50%);opacity:0;transition:all .3s}.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-eye,.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-download,.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-delete{z-index:10;width:16px;margin:0 4px;color:#ffffffd9;font-size:16px;cursor:pointer;transition:all .3s}.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-eye:hover,.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-download:hover,.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-delete:hover{color:#fff}.ant-upload-list-picture-card .ant-upload-list-item-info:hover+.ant-upload-list-item-actions,.ant-upload-list-picture-card .ant-upload-list-item-actions:hover{opacity:1}.ant-upload-list-picture-card .ant-upload-list-item-thumbnail,.ant-upload-list-picture-card .ant-upload-list-item-thumbnail img{position:static;display:block;width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.ant-upload-list-picture-card .ant-upload-list-item-name{display:none;margin:8px 0 0;padding:0;line-height:1.5715;text-align:center}.ant-upload-list-picture-card .ant-upload-list-item-file+.ant-upload-list-item-name{position:absolute;bottom:10px;display:block}.ant-upload-list-picture-card .ant-upload-list-item-uploading.ant-upload-list-item{background-color:#fafafa}.ant-upload-list-picture-card .ant-upload-list-item-uploading .ant-upload-list-item-info{height:auto}.ant-upload-list-picture-card .ant-upload-list-item-uploading .ant-upload-list-item-info:before,.ant-upload-list-picture-card .ant-upload-list-item-uploading .ant-upload-list-item-info .anticon-eye,.ant-upload-list-picture-card .ant-upload-list-item-uploading .ant-upload-list-item-info .anticon-delete{display:none}.ant-upload-list-picture-card .ant-upload-list-item-progress{bottom:32px;width:calc(100% - 14px);padding-left:0}.ant-upload-list-text-container,.ant-upload-list-picture-container{transition:opacity .3s,height .3s}.ant-upload-list-text-container:before,.ant-upload-list-picture-container:before{display:table;width:0;height:0;content:""}.ant-upload-list-text-container .ant-upload-span,.ant-upload-list-picture-container .ant-upload-span{display:block;flex:auto}.ant-upload-list-text .ant-upload-span,.ant-upload-list-picture .ant-upload-span{display:flex;align-items:center}.ant-upload-list-text .ant-upload-span>*,.ant-upload-list-picture .ant-upload-span>*{flex:none}.ant-upload-list-text .ant-upload-list-item-name,.ant-upload-list-picture .ant-upload-list-item-name{flex:auto;margin:0;padding:0 8px}.ant-upload-list-text .ant-upload-list-item-card-actions,.ant-upload-list-picture .ant-upload-list-item-card-actions,.ant-upload-list-text .ant-upload-text-icon .anticon{position:static}.ant-upload-list .ant-upload-animate-inline-appear,.ant-upload-list .ant-upload-animate-inline-enter,.ant-upload-list .ant-upload-animate-inline-leave{animation-duration:.3s;animation-fill-mode:cubic-bezier(.78,.14,.15,.86)}.ant-upload-list .ant-upload-animate-inline-appear,.ant-upload-list .ant-upload-animate-inline-enter{animation-name:uploadAnimateInlineIn}.ant-upload-list .ant-upload-animate-inline-leave{animation-name:uploadAnimateInlineOut}@keyframes uploadAnimateInlineIn{0%{width:0;height:0;margin:0;padding:0;opacity:0}}@keyframes uploadAnimateInlineOut{to{width:0;height:0;margin:0;padding:0;opacity:0}}.ant-upload-rtl{direction:rtl}.ant-upload-rtl.ant-upload.ant-upload-select-picture-card{margin-right:auto;margin-left:8px}.ant-upload-list-rtl{direction:rtl}.ant-upload-list-rtl .ant-upload-list-item-list-type-text:hover .ant-upload-list-item-name-icon-count-1{padding-right:22px;padding-left:14px}.ant-upload-list-rtl .ant-upload-list-item-list-type-text:hover .ant-upload-list-item-name-icon-count-2{padding-right:22px;padding-left:28px}.ant-upload-list-rtl .ant-upload-list-item-name{padding-right:22px;padding-left:0}.ant-upload-list-rtl .ant-upload-list-item-name-icon-count-1{padding-left:14px}.ant-upload-list-rtl .ant-upload-list-item-card-actions{right:auto;left:0}.ant-upload-list-rtl .ant-upload-list-item-card-actions .anticon{padding-right:0;padding-left:5px}.ant-upload-list-rtl .ant-upload-list-item-info{padding:0 4px 0 12px}.ant-upload-list-rtl .ant-upload-list-item .anticon-close{right:auto;left:4px}.ant-upload-list-rtl .ant-upload-list-item-error .ant-upload-list-item-card-actions .anticon{padding-right:0;padding-left:5px}.ant-upload-list-rtl .ant-upload-list-item-progress{padding-right:26px;padding-left:0}.ant-upload-list-picture .ant-upload-list-item-info,.ant-upload-list-picture-card .ant-upload-list-item-info{padding:0}.ant-upload-list-rtl.ant-upload-list-picture .ant-upload-list-item-thumbnail,.ant-upload-list-rtl.ant-upload-list-picture-card .ant-upload-list-item-thumbnail{right:8px;left:auto}.ant-upload-list-rtl.ant-upload-list-picture .ant-upload-list-item-icon,.ant-upload-list-rtl.ant-upload-list-picture-card .ant-upload-list-item-icon{right:50%;left:auto;transform:translate(50%,-50%)}.ant-upload-list-rtl.ant-upload-list-picture .ant-upload-list-item-name,.ant-upload-list-rtl.ant-upload-list-picture-card .ant-upload-list-item-name{margin:0 8px 0 0;padding-right:48px;padding-left:8px}.ant-upload-list-rtl.ant-upload-list-picture .ant-upload-list-item-name-icon-count-1,.ant-upload-list-rtl.ant-upload-list-picture-card .ant-upload-list-item-name-icon-count-1{padding-right:48px;padding-left:18px}.ant-upload-list-rtl.ant-upload-list-picture .ant-upload-list-item-name-icon-count-2,.ant-upload-list-rtl.ant-upload-list-picture-card .ant-upload-list-item-name-icon-count-2{padding-right:48px;padding-left:36px}.ant-upload-list-rtl.ant-upload-list-picture .ant-upload-list-item-progress,.ant-upload-list-rtl.ant-upload-list-picture-card .ant-upload-list-item-progress{padding-right:0;padding-left:0}.ant-upload-list-rtl.ant-upload-list-picture .anticon-close,.ant-upload-list-rtl.ant-upload-list-picture-card .anticon-close{right:auto;left:8px}.ant-upload-list-rtl .ant-upload-list-picture-card-container{margin:0 0 8px 8px}.ant-upload-list-rtl.ant-upload-list-picture-card .ant-upload-list-item-actions{right:50%;left:auto;transform:translate(50%,-50%)}.ant-upload-list-rtl.ant-upload-list-picture-card .ant-upload-list-item-file+.ant-upload-list-item-name{margin:8px 0 0;padding:0}@font-face{font-family:iransans;font-style:normal;font-weight:200;src:url(/assets/IRANSansWeb_FaNum_UltraLight-hW-WDKY9.woff2) format("woff2"),url(/assets/IRANSansWeb_FaNum_UltraLight-X2tWVnbe.woff) format("woff")}@font-face{font-family:iransans;font-style:normal;font-weight:300;src:url(/assets/IRANSansWeb_FaNum_Light-B637MNLG.woff2) format("woff2"),url(/assets/IRANSansWeb_FaNum_Light-Blhumvhg.woff) format("woff")}@font-face{font-family:iransans;font-style:normal;font-weight:400;src:url(/assets/IRANSansWeb_FaNum-BLA2CtIC.woff2) format("woff2"),url(/assets/IRANSansWeb_FaNum-C2LCNwav.woff) format("woff")}@font-face{font-family:iransans;font-style:normal;font-weight:500;src:url(/assets/IRANSansWeb_FaNum_Medium-C2CKjrKB.woff2) format("woff2"),url(/assets/IRANSansWeb_FaNum_Medium-DJxlPmBM.woff) format("woff")}@font-face{font-family:iransans;font-style:normal;font-weight:700;src:url(/assets/IRANSansWeb_FaNum_Bold-C8urhp07.woff2) format("woff2"),url(/assets/IRANSansWeb_FaNum_Bold-DFiUzN7v.woff) format("woff")}@font-face{font-family:iransans;font-style:normal;font-weight:900;src:url(/assets/IRANSansWeb_FaNum_Black-BFAfOkt4.woff2) format("woff2"),url(/assets/IRANSansWeb_FaNum_Black-BZZZWzNZ.woff) format("woff")}@font-face{font-family:yekan_bakh;font-style:normal;font-weight:700;src:url(/assets/yekan_bakh_fanum_bold-B1U8HUd_.eot);src:url(/assets/yekan_bakh_fanum_bold-B1U8HUd_.eot?#iefix) format("embedded-opentype"),url(/assets/yekan_bakh_fanum_bold-DiCmzWh_.woff) format("woff"),url(/assets/yekan_bakh_fanum_bold-BgJhv14C.ttf) format("truetype")}@font-face{font-family:yekan_bakh;font-style:normal;font-weight:100;src:url(/assets/yekan_bakh_fanum_thin-DdtkSAK0.eot);src:url(/assets/yekan_bakh_fanum_thin-DdtkSAK0.eot?#iefix) format("embedded-opentype"),url(/assets/yekan_bakh_fanum_thin-BUP5N_wR.woff) format("woff"),url(/assets/yekan_bakh_fanum_thin-wM_3S6d2.ttf) format("truetype")}@font-face{font-family:yekan_bakh;font-style:normal;font-weight:300;src:url(/assets/yekan_bakh_fanum_light-DBLK7lys.eot);src:url(/assets/yekan_bakh_fanum_light-DBLK7lys.eot?#iefix) format("embedded-opentype"),url(/assets/yekan_bakh_fanum_light-MBz7xfzX.woff) format("woff"),url(/assets/yekan_bakh_fanum_light-BVC5pEtm.ttf) format("truetype")}@font-face{font-family:yekan_bakh;font-style:normal;font-weight:400;src:url(/assets/yekan_bakh_fanum_regular-D-3AgpAQ.eot);src:url(/assets/yekan_bakh_fanum_regular-D-3AgpAQ.eot?#iefix) format("embedded-opentype"),url(/assets/yekan_bakh_fanum_regular-DYu11jPk.woff) format("woff"),url(/assets/yekan_bakh_fanum_regular-5O8oud7N.ttf) format("truetype")}@font-face{font-family:yekan_bakh;font-style:normal;font-weight:500;src:url(/assets/yekan_bakh_fanum_medium-K0xA3c9N.eot);src:url(/assets/yekan_bakh_fanum_medium-K0xA3c9N.eot?#iefix) format("embedded-opentype"),url(/assets/yekan_bakh_fanum_medium-C7lE-mP3.woff) format("woff"),url(/assets/yekan_bakh_fanum_medium-udXv5Dbe.ttf) format("truetype")}@font-face{font-family:yekan_bakh;font-style:normal;font-weight:800;src:url(/assets/yekan_bakh_fanum_fat-ByLTFLyk.eot);src:url(/assets/yekan_bakh_fanum_fat-ByLTFLyk.eot?#iefix) format("embedded-opentype"),url(/assets/yekan_bakh_fanum_heavy-DcWv4PAq.woff) format("woff"),url(/assets/yekan_bakh_fanum_fat-D7l80IzQ.ttf) format("truetype")}@font-face{font-family:yekan_bakh;font-style:normal;font-weight:900;src:url(/assets/yekan_bakh_fanum_heavy-h9lE53XZ.eot);src:url(/assets/yekan_bakh_fanum_heavy-h9lE53XZ.eot?#iefix) format("embedded-opentype"),url(/assets/yekan_bakh_fanum_heavy-DcWv4PAq.woff) format("woff"),url(/assets/yekan_bakh_fanum_heavy-DcdOma-5.ttf) format("truetype")}body,*{font-family:iransans,yekan_bakh,sans-serif,tahoma;font-size:14px;line-height:inherit;font-weight:inherit}.rtl{direction:rtl!important}.ltr{direction:ltr!important}.no-scrollbar::-webkit-scrollbar{display:none}*::-webkit-scrollbar{display:none}h1,h2,h3,h4,h5,h6,h7,h8{margin-bottom:1.2em;color:var(--c-primary)}h1,.h1{font-size:28px}h2,.h2{font-size:24.36px}h3,.h3{font-size:21.14px}h4,.h4{font-size:18.48px}h5,.h5{font-size:16.8px}h6,.h6{font-size:15.4px}p{margin-bottom:10px}html,body{overscroll-behavior-y:contain}.overflow-x-auto{overscroll-behavior-x:contain}.overflow-y-auto{overscroll-behavior-y:contain}input:focus-visible{outline:none}.montzar-form.ant-form{background:transparent!important;color:#fff!important}.montzar-form .ant-btn-primary[disabled],.montzar-form .ant-btn-primary[disabled]:hover,.montzar-form .ant-btn-primary[disabled]:focus,.montzar-form .ant-btn-primary[disabled]:active{background:#fff3;color:#ffffff80;border-color:transparent}.montzar-form .ant-form-item label,.montzar-form .ant-form-item input{background:transparent!important;color:#fff!important}.montzar-rounded-drawer{background:transparent}.montzar-rounded-drawer .ant-drawer-content-wrapper{box-shadow:none!important}.montzar-rounded-drawer .ant-drawer-content{background:transparent!important}.montzar-rounded-drawer.bg-white .ant-drawer-body{background:#fff;border-radius:15px 15px 0 0}.montzar-rounded-drawer.bg-primaryLighten .ant-drawer-body{background:var(--c-primaryLighten);border-radius:30px 30px 0 0}.montzar-custom-scrollbar{padding:0 10px}.montzar-custom-scrollbar::-webkit-scrollbar{width:8px}.montzar-custom-scrollbar::-webkit-scrollbar-thumb{background:transparent;border-radius:10px}.montzar-custom-scrollbar:hover::-webkit-scrollbar-thumb{background:#ffffff80}.ant-empty-image img{-o-object-fit:contain;object-fit:contain}.ant-timeline-item-content{margin:0 26px 0 0}.ant-timeline-item-tail{left:unset;right:4px}.ant-btn{display:flex!important;flex-direction:row-reverse;align-items:center;justify-content:center}.ant-btn i{margin-right:10px}.ant-btn span{font-weight:600}.ant-btn-lg span{font-size:20px}.ant-btn-secondary,.ant-btn-secondary:hover,.ant-btn-secondary:focus{border-color:var(--c-primary);background:var(--c-primary);color:#fff}.ant-btn-secondary.ant-btn-background-ghost,.ant-btn-secondary:hover.ant-btn-background-ghost,.ant-btn-secondary:focus.ant-btn-background-ghost{color:var(--c-primary);border-color:var(--c-primary);text-shadow:none}.ant-btn-light,.ant-btn-light:hover,.ant-btn-light:focus{color:var(--c-primary);border-color:var(--c-light);background:var(--c-light)}.ant-form-vertical .ant-form-item-label,.ant .ant-col-24.ant-form-item-label,.ant .ant-col-xl-24.ant-form-item-label{text-align:right!important}.ant-tabs-tab+.ant-tabs-tab{margin:0 32px 0 0}.ant-tabs>.ant-tabs-nav .ant-tabs-nav-wrap,.ant .ant-tabs>div>.ant-tabs-nav .ant-tabs-nav-wrap{justify-content:flex-end}.ant-drawer-bottom.rtl .ant-drawer-body::-webkit-scrollbar{display:none}.ant-radio-button-wrapper{border-left-width:1.02px}.ant-radio-button-wrapper:not(:first-child):before{left:unset;right:-1px}.ant-radio-button-wrapper:first-child{border-radius:0 5px 5px 0}.ant-radio-button-wrapper:last-child{border-radius:5px 0 0 5px}.ant-radio-group.flex{display:flex!important}.ant-radio-group.flex .ant-radio-button-wrapper{flex:1 1 0%}.content{content:"";display:inline-block;width:8px}.before\:mark:before{content:"";display:inline-block;width:4px;padding:.2rem;top:1rem;right:0;height:48px;border-radius:5px 0 0 5px;background:#8d6a46;color:#8d6a46}.before\:bullet{font-size:13px}.before\:bullet:before{content:"";display:inline-block;width:8px;height:8px;border-radius:100%;margin-left:10px}.before\:bg-secondary:before{content:"";display:inline-block;width:8px;background:#8d6a46}.before\:bg-primary:before{content:"";display:inline-block;width:8px;background:var(--c-primary)}.before\:text-secondary:before{content:"1";color:#8d6a46}.before\:text-primary:before{content:"1";color:var(--c-primary)}.hide-counter .ant-input-number-handler-wrap{visibility:hidden;display:none}.ant-select{width:100%!important}.ant-select .ant-select-selector{height:3rem!important;align-items:center}*:not(input){user-select:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none}.ant-empty-image img,.ant-empty-image{width:100%;height:40vh}.ant-drawer-bottom.island-sheet{--island-gap: 12px}.ant-drawer-bottom.island-sheet .ant-drawer-content-wrapper{left:var(--island-gap);right:var(--island-gap);bottom:calc(var(--island-gap) + env(safe-area-inset-bottom,0px));width:auto!important;max-width:480px;margin:0 auto;border-radius:26px}.ant-drawer-bottom.island-sheet:not(.ant-drawer-open) .ant-drawer-content-wrapper{transform:translateY(calc(100% + var(--island-gap) + 40px + env(safe-area-inset-bottom,0px)))!important}.ant-drawer-bottom.island-sheet.ant-drawer-open .ant-drawer-content-wrapper{box-shadow:0 24px 48px -18px #14161a59,0 2px 8px #14161a14!important}.ant-drawer-bottom.island-sheet .ant-drawer-content{border-radius:inherit;overflow:hidden}.ant-drawer-bottom.island-sheet .ant-drawer-body:before{content:"";display:block;width:38px;height:4px;margin:10px auto 0;border-radius:4px;background:var(--c-hairline)}html.theme-switching *,html.theme-switching *:before,html.theme-switching *:after{transition:none!important}html.motion-reduced :where(*:not(.keep-motion,.keep-motion *,.van-loading,.van-loading *)),html.motion-reduced :where(*:not(.keep-motion,.keep-motion *,.van-loading,.van-loading *)):before,html.motion-reduced :where(*:not(.keep-motion,.keep-motion *,.van-loading,.van-loading *)):after{animation-duration:.01ms!important;animation-iteration-count:1!important;animation-delay:0s!important;transition-duration:.12s!important;transition-delay:0s!important;scroll-behavior:auto!important}html.motion-reduced *,html.motion-reduced *:before,html.motion-reduced *:after{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;will-change:auto!important}html.motion-reduced .tabbar__inner,html.motion-reduced .toast{background:rgb(var(--c-canvas-rgb) / 97%)!important}html.theme-dark body{color:var(--c-ink)}html.theme-dark .ant-input,html.theme-dark .ant-input-affix-wrapper,html.theme-dark .ant-input-number,html.theme-dark textarea.ant-input{color:var(--c-ink);background-color:var(--c-canvas);border-color:var(--c-hairline)}html.theme-dark .ant-input::-moz-placeholder,html.theme-dark textarea.ant-input::-moz-placeholder{color:var(--c-inkFaint)}html.theme-dark .ant-input::placeholder,html.theme-dark textarea.ant-input::placeholder{color:var(--c-inkFaint)}html.theme-dark .ant-input-affix-wrapper>input.ant-input{background-color:transparent}html.theme-dark .ant-form-item-label>label,html.theme-dark .ant-drawer-title,html.theme-dark .ant-spin-text{color:var(--c-ink)}html.theme-dark .ant-form-item-explain-error{color:var(--c-red)}html.theme-dark .ant-empty-description{color:var(--c-inkFaint)}html.theme-dark .ant-drawer-header{border-bottom-color:var(--c-hairline)}html.theme-dark .ant-slider-handle{background-color:var(--c-canvas)}html.theme-dark .tabbar__inner,html.theme-dark .toast{background:rgb(var(--c-canvas-rgb) / 94%)!important;box-shadow:inset 0 0 0 1px var(--c-hairline),0 18px 40px -14px #0009!important}:root,:host{--van-black: #000;--van-white: #fff;--van-gray-1: #f7f8fa;--van-gray-2: #f2f3f5;--van-gray-3: #ebedf0;--van-gray-4: #dcdee0;--van-gray-5: #c8c9cc;--van-gray-6: #969799;--van-gray-7: #646566;--van-gray-8: #323233;--van-red: #ee0a24;--van-blue: #1989fa;--van-orange: #ff976a;--van-orange-dark: #ed6a0c;--van-orange-light: #fffbe8;--van-green: #07c160;--van-gradient-red: linear-gradient(to right, #ff6034, #ee0a24);--van-gradient-orange: linear-gradient(to right, #ffd01e, #ff8917);--van-primary-color: var(--van-blue);--van-success-color: var(--van-green);--van-danger-color: var(--van-red);--van-warning-color: var(--van-orange);--van-text-color: var(--van-gray-8);--van-text-color-2: var(--van-gray-6);--van-text-color-3: var(--van-gray-5);--van-active-color: var(--van-gray-2);--van-active-opacity: .6;--van-disabled-opacity: .5;--van-background: var(--van-gray-1);--van-background-2: var(--van-white);--van-background-3: var(--van-white);--van-padding-base: 4px;--van-padding-xs: 8px;--van-padding-sm: 12px;--van-padding-md: 16px;--van-padding-lg: 24px;--van-padding-xl: 32px;--van-font-bold: 600;--van-font-size-xs: 10px;--van-font-size-sm: 12px;--van-font-size-md: 14px;--van-font-size-lg: 16px;--van-line-height-xs: 14px;--van-line-height-sm: 18px;--van-line-height-md: 20px;--van-line-height-lg: 22px;--van-base-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Segoe UI, Arial, Roboto, "PingFang SC", "miui", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;--van-price-font: avenir-heavy, "PingFang SC", helvetica neue, arial, sans-serif;--van-duration-base: .3s;--van-duration-fast: .2s;--van-ease-out: ease-out;--van-ease-in: ease-in;--van-border-color: var(--van-gray-3);--van-border-width: 1px;--van-radius-sm: 2px;--van-radius-md: 4px;--van-radius-lg: 8px;--van-radius-max: 999px}.van-theme-dark{--van-text-color: #f5f5f5;--van-text-color-2: #707070;--van-text-color-3: #4d4d4d;--van-border-color: #3a3a3c;--van-active-color: #3a3a3c;--van-background: #000;--van-background-2: #1c1c1e;--van-background-3: #37363b}html{-webkit-tap-highlight-color:transparent}body{margin:0;font-family:var(--van-base-font)}a{text-decoration:none}input,button,textarea{color:inherit;font:inherit}a:focus,input:focus,button:focus,textarea:focus,[class*=van-]:focus{outline:none}ol,ul{margin:0;padding:0;list-style:none}@keyframes van-slide-up-enter{0%{transform:translate3d(0,100%,0)}}@keyframes van-slide-up-leave{to{transform:translate3d(0,100%,0)}}@keyframes van-slide-down-enter{0%{transform:translate3d(0,-100%,0)}}@keyframes van-slide-down-leave{to{transform:translate3d(0,-100%,0)}}@keyframes van-slide-left-enter{0%{transform:translate3d(-100%,0,0)}}@keyframes van-slide-left-leave{to{transform:translate3d(-100%,0,0)}}@keyframes van-slide-right-enter{0%{transform:translate3d(100%,0,0)}}@keyframes van-slide-right-leave{to{transform:translate3d(100%,0,0)}}@keyframes van-fade-in{0%{opacity:0}to{opacity:1}}@keyframes van-fade-out{0%{opacity:1}to{opacity:0}}@keyframes van-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.van-fade-enter-active{animation:var(--van-duration-base) van-fade-in both var(--van-ease-out)}.van-fade-leave-active{animation:var(--van-duration-base) van-fade-out both var(--van-ease-in)}.van-slide-up-enter-active{animation:van-slide-up-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-up-leave-active{animation:van-slide-up-leave var(--van-duration-base) both var(--van-ease-in)}.van-slide-down-enter-active{animation:van-slide-down-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-down-leave-active{animation:van-slide-down-leave var(--van-duration-base) both var(--van-ease-in)}.van-slide-left-enter-active{animation:van-slide-left-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-left-leave-active{animation:van-slide-left-leave var(--van-duration-base) both var(--van-ease-in)}.van-slide-right-enter-active{animation:van-slide-right-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-right-leave-active{animation:van-slide-right-leave var(--van-duration-base) both var(--van-ease-in)}.van-clearfix:after{display:table;clear:both;content:""}.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;line-break:anywhere;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:3;line-break:anywhere;-webkit-box-orient:vertical}.van-safe-area-top{padding-top:constant(safe-area-inset-top);padding-top:env(safe-area-inset-top)}.van-safe-area-bottom{padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.van-haptics-feedback{cursor:pointer}.van-haptics-feedback:active{opacity:var(--van-active-opacity)}[class*=van-hairline]:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid var(--van-border-color);transform:scale(.5)}.van-hairline,.van-hairline--top,.van-hairline--left,.van-hairline--right,.van-hairline--bottom,.van-hairline--surround,.van-hairline--top-bottom{position:relative}.van-hairline--top:after{border-top-width:var(--van-border-width)}.van-hairline--left:after{border-left-width:var(--van-border-width)}.van-hairline--right:after{border-right-width:var(--van-border-width)}.van-hairline--bottom:after{border-bottom-width:var(--van-border-width)}.van-hairline--top-bottom:after,.van-hairline-unset--top-bottom:after{border-width:var(--van-border-width) 0}.van-hairline--surround:after{border-width:var(--van-border-width)}:root,:host{--van-action-bar-background: var(--van-background-2);--van-action-bar-height: 50px}.van-action-bar{position:fixed;right:0;bottom:0;left:0;display:flex;align-items:center;box-sizing:content-box;height:var(--van-action-bar-height);background:var(--van-action-bar-background)}:root,:host{--van-badge-size: 16px;--van-badge-color: var(--van-white);--van-badge-padding: 0 3px;--van-badge-font-size: var(--van-font-size-sm);--van-badge-font-weight: var(--van-font-bold);--van-badge-border-width: var(--van-border-width);--van-badge-background: var(--van-danger-color);--van-badge-dot-color: var(--van-danger-color);--van-badge-dot-size: 8px;--van-badge-font: -apple-system-font, helvetica neue, arial, sans-serif}.van-badge{display:inline-block;box-sizing:border-box;min-width:var(--van-badge-size);padding:var(--van-badge-padding);color:var(--van-badge-color);font-weight:var(--van-badge-font-weight);font-size:var(--van-badge-font-size);font-family:var(--van-badge-font);line-height:1.2;text-align:center;background:var(--van-badge-background);border:var(--van-badge-border-width) solid var(--van-background-2);border-radius:var(--van-radius-max)}.van-badge--fixed{position:absolute;transform-origin:100%}.van-badge--top-left{top:0;left:0;transform:translate(-50%,-50%)}.van-badge--top-right{top:0;right:0;transform:translate(50%,-50%)}.van-badge--bottom-left{bottom:0;left:0;transform:translate(-50%,50%)}.van-badge--bottom-right{bottom:0;right:0;transform:translate(50%,50%)}.van-badge--dot{width:var(--van-badge-dot-size);min-width:0;height:var(--van-badge-dot-size);background:var(--van-badge-dot-color);border-radius:100%;border:none;padding:0}.van-badge__wrapper{position:relative;display:inline-block}.van-icon{position:relative;display:inline-block;font:14px/1 vant-icon;font:normal normal normal 14px/1 var(--van-icon-font-family, "vant-icon");font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased}.van-icon:before{display:inline-block}.van-icon-arrow-double-left:before{content:""}.van-icon-arrow-double-right:before{content:""}.van-icon-contact:before{content:""}.van-icon-notes:before{content:""}.van-icon-records:before{content:""}.van-icon-cash-back-record:before{content:""}.van-icon-newspaper:before{content:""}.van-icon-discount:before{content:""}.van-icon-completed:before{content:""}.van-icon-user:before{content:""}.van-icon-description:before{content:""}.van-icon-list-switch:before{content:""}.van-icon-list-switching:before{content:""}.van-icon-link-o:before{content:""}.van-icon-miniprogram-o:before{content:""}.van-icon-qq:before{content:""}.van-icon-wechat-moments:before{content:""}.van-icon-weibo:before{content:""}.van-icon-cash-o:before{content:""}.van-icon-guide-o:before{content:""}.van-icon-invitation:before{content:""}.van-icon-shield-o:before{content:""}.van-icon-exchange:before{content:""}.van-icon-eye:before{content:""}.van-icon-enlarge:before{content:""}.van-icon-expand-o:before{content:""}.van-icon-eye-o:before{content:""}.van-icon-expand:before{content:""}.van-icon-filter-o:before{content:""}.van-icon-fire:before{content:""}.van-icon-fail:before{content:""}.van-icon-failure:before{content:""}.van-icon-fire-o:before{content:""}.van-icon-flag-o:before{content:""}.van-icon-font:before{content:""}.van-icon-font-o:before{content:""}.van-icon-gem-o:before{content:""}.van-icon-flower-o:before{content:""}.van-icon-gem:before{content:""}.van-icon-gift-card:before{content:""}.van-icon-friends:before{content:""}.van-icon-friends-o:before{content:""}.van-icon-gold-coin:before{content:""}.van-icon-gold-coin-o:before{content:""}.van-icon-good-job-o:before{content:""}.van-icon-gift:before{content:""}.van-icon-gift-o:before{content:""}.van-icon-gift-card-o:before{content:""}.van-icon-good-job:before{content:""}.van-icon-home-o:before{content:""}.van-icon-goods-collect:before{content:""}.van-icon-graphic:before{content:""}.van-icon-goods-collect-o:before{content:""}.van-icon-hot-o:before{content:""}.van-icon-info:before{content:""}.van-icon-hotel-o:before{content:""}.van-icon-info-o:before{content:""}.van-icon-hot-sale-o:before{content:""}.van-icon-hot:before{content:""}.van-icon-like:before{content:""}.van-icon-idcard:before{content:""}.van-icon-like-o:before{content:""}.van-icon-hot-sale:before{content:""}.van-icon-location-o:before{content:""}.van-icon-location:before{content:""}.van-icon-label:before{content:""}.van-icon-lock:before{content:""}.van-icon-label-o:before{content:""}.van-icon-map-marked:before{content:""}.van-icon-logistics:before{content:""}.van-icon-manager:before{content:""}.van-icon-more:before{content:""}.van-icon-live:before{content:""}.van-icon-manager-o:before{content:""}.van-icon-medal:before{content:""}.van-icon-more-o:before{content:""}.van-icon-music-o:before{content:""}.van-icon-music:before{content:""}.van-icon-new-arrival-o:before{content:""}.van-icon-medal-o:before{content:""}.van-icon-new-o:before{content:""}.van-icon-free-postage:before{content:""}.van-icon-newspaper-o:before{content:""}.van-icon-new-arrival:before{content:""}.van-icon-minus:before{content:""}.van-icon-orders-o:before{content:""}.van-icon-new:before{content:""}.van-icon-paid:before{content:""}.van-icon-notes-o:before{content:""}.van-icon-other-pay:before{content:""}.van-icon-pause-circle:before{content:""}.van-icon-pause:before{content:""}.van-icon-pause-circle-o:before{content:""}.van-icon-peer-pay:before{content:""}.van-icon-pending-payment:before{content:""}.van-icon-passed:before{content:""}.van-icon-plus:before{content:""}.van-icon-phone-circle-o:before{content:""}.van-icon-phone-o:before{content:""}.van-icon-printer:before{content:""}.van-icon-photo-fail:before{content:""}.van-icon-phone:before{content:""}.van-icon-photo-o:before{content:""}.van-icon-play-circle:before{content:""}.van-icon-play:before{content:""}.van-icon-phone-circle:before{content:""}.van-icon-point-gift-o:before{content:""}.van-icon-point-gift:before{content:""}.van-icon-play-circle-o:before{content:""}.van-icon-shrink:before{content:""}.van-icon-photo:before{content:""}.van-icon-qr:before{content:""}.van-icon-qr-invalid:before{content:""}.van-icon-question-o:before{content:""}.van-icon-revoke:before{content:""}.van-icon-replay:before{content:""}.van-icon-service:before{content:""}.van-icon-question:before{content:""}.van-icon-search:before{content:""}.van-icon-refund-o:before{content:""}.van-icon-service-o:before{content:""}.van-icon-scan:before{content:""}.van-icon-share:before{content:""}.van-icon-send-gift-o:before{content:""}.van-icon-share-o:before{content:""}.van-icon-setting:before{content:""}.van-icon-points:before{content:""}.van-icon-photograph:before{content:""}.van-icon-shop:before{content:""}.van-icon-shop-o:before{content:""}.van-icon-shop-collect-o:before{content:""}.van-icon-shop-collect:before{content:""}.van-icon-smile:before{content:""}.van-icon-shopping-cart-o:before{content:""}.van-icon-sign:before{content:""}.van-icon-sort:before{content:""}.van-icon-star-o:before{content:""}.van-icon-smile-comment-o:before{content:""}.van-icon-stop:before{content:""}.van-icon-stop-circle-o:before{content:""}.van-icon-smile-o:before{content:""}.van-icon-star:before{content:""}.van-icon-success:before{content:""}.van-icon-stop-circle:before{content:""}.van-icon-records-o:before{content:""}.van-icon-shopping-cart:before{content:""}.van-icon-tosend:before{content:""}.van-icon-todo-list:before{content:""}.van-icon-thumb-circle-o:before{content:""}.van-icon-thumb-circle:before{content:""}.van-icon-umbrella-circle:before{content:""}.van-icon-underway:before{content:""}.van-icon-upgrade:before{content:""}.van-icon-todo-list-o:before{content:""}.van-icon-tv-o:before{content:""}.van-icon-underway-o:before{content:""}.van-icon-user-o:before{content:""}.van-icon-vip-card-o:before{content:""}.van-icon-vip-card:before{content:""}.van-icon-send-gift:before{content:""}.van-icon-wap-home:before{content:""}.van-icon-wap-nav:before{content:""}.van-icon-volume-o:before{content:""}.van-icon-video:before{content:""}.van-icon-wap-home-o:before{content:""}.van-icon-volume:before{content:""}.van-icon-warning:before{content:""}.van-icon-weapp-nav:before{content:""}.van-icon-wechat-pay:before{content:""}.van-icon-warning-o:before{content:""}.van-icon-wechat:before{content:""}.van-icon-setting-o:before{content:""}.van-icon-youzan-shield:before{content:""}.van-icon-warn-o:before{content:""}.van-icon-smile-comment:before{content:""}.van-icon-user-circle-o:before{content:""}.van-icon-video-o:before{content:""}.van-icon-add-square:before{content:""}.van-icon-add:before{content:""}.van-icon-arrow-down:before{content:""}.van-icon-arrow-up:before{content:""}.van-icon-arrow:before{content:""}.van-icon-after-sale:before{content:""}.van-icon-add-o:before{content:""}.van-icon-alipay:before{content:""}.van-icon-ascending:before{content:""}.van-icon-apps-o:before{content:""}.van-icon-aim:before{content:""}.van-icon-award:before{content:""}.van-icon-arrow-left:before{content:""}.van-icon-award-o:before{content:""}.van-icon-audio:before{content:""}.van-icon-bag-o:before{content:""}.van-icon-balance-list:before{content:""}.van-icon-back-top:before{content:""}.van-icon-bag:before{content:""}.van-icon-balance-pay:before{content:""}.van-icon-balance-o:before{content:""}.van-icon-bar-chart-o:before{content:""}.van-icon-bars:before{content:""}.van-icon-balance-list-o:before{content:""}.van-icon-birthday-cake-o:before{content:""}.van-icon-bookmark:before{content:""}.van-icon-bill:before{content:""}.van-icon-bell:before{content:""}.van-icon-browsing-history-o:before{content:""}.van-icon-browsing-history:before{content:""}.van-icon-bookmark-o:before{content:""}.van-icon-bulb-o:before{content:""}.van-icon-bullhorn-o:before{content:""}.van-icon-bill-o:before{content:""}.van-icon-calendar-o:before{content:""}.van-icon-brush-o:before{content:""}.van-icon-card:before{content:""}.van-icon-cart-o:before{content:""}.van-icon-cart-circle:before{content:""}.van-icon-cart-circle-o:before{content:""}.van-icon-cart:before{content:""}.van-icon-cash-on-deliver:before{content:""}.van-icon-cash-back-record-o:before{content:""}.van-icon-cashier-o:before{content:""}.van-icon-chart-trending-o:before{content:""}.van-icon-certificate:before{content:""}.van-icon-chat:before{content:""}.van-icon-clear:before{content:""}.van-icon-chat-o:before{content:""}.van-icon-checked:before{content:""}.van-icon-clock:before{content:""}.van-icon-clock-o:before{content:""}.van-icon-close:before{content:""}.van-icon-closed-eye:before{content:""}.van-icon-circle:before{content:""}.van-icon-cluster-o:before{content:""}.van-icon-column:before{content:""}.van-icon-comment-circle-o:before{content:""}.van-icon-cluster:before{content:""}.van-icon-comment:before{content:""}.van-icon-comment-o:before{content:""}.van-icon-comment-circle:before{content:""}.van-icon-completed-o:before{content:""}.van-icon-credit-pay:before{content:""}.van-icon-coupon:before{content:""}.van-icon-debit-pay:before{content:""}.van-icon-coupon-o:before{content:""}.van-icon-contact-o:before{content:""}.van-icon-descending:before{content:""}.van-icon-desktop-o:before{content:""}.van-icon-diamond-o:before{content:""}.van-icon-description-o:before{content:""}.van-icon-delete:before{content:""}.van-icon-diamond:before{content:""}.van-icon-delete-o:before{content:""}.van-icon-cross:before{content:""}.van-icon-edit:before{content:""}.van-icon-ellipsis:before{content:""}.van-icon-down:before{content:""}.van-icon-discount-o:before{content:""}.van-icon-ecard-pay:before{content:""}.van-icon-envelop-o:before{content:""}@font-face{font-weight:400;font-family:vant-icon;font-style:normal;font-display:auto;src:url(data:font/woff2;charset=utf-8;base64,d09GMgABAAAAAGNAAA0AAAAA6ngAAGLlAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP0ZGVE0cGh4GYACCWhEICoOqHILKFAuEDgABNgIkA4QUBCAFhQ4HllAbe7dFB2rYOIAxOG/nKOrEpKWbGbVlVHRZ9v816Tis0RbhPC4JZQk1ws72WlBGJJIsL3bc5Y/x5HdtBrzwoZQX/Ls/uAhsXMZIVk73Ds/ntvd3cezvhO1/2HExro3B2ID/4d7GxjXObZwqxy0gG8pQPDBFMAW980hTNIuhpqZleVwJlHSKR6WkDM3KECuz083Qu+8BCnabd+4tsemRGtBnHBAHxuTmuLWNUbd7fuSZA88fOBlzekCqfDPnV1BArpTKjp/r0AfE0+Lc97SXNa3ugaSqW2AfIo5Ghr2YAos8H+krfQ3L8DwA+F1V4Mecr9JV2ljSM/wUzQWAITlxoJSfEmfsi321rwHH2TjhEuUPgNJu+Hcty5uF3l0Cy0kEaR28qmxd8hKkAt5Trc38Jr9PItjeThzVmTUBj5z82tS8UPpag3jw7WchyoaNGucZYxmcV1Jb6vJBqnCMkPdKndPjulEbt2VSBNS4ZVtIZLN6T9OnLc4cOBve6vc6m1plHO0oxsXKP/eW/2ZnuXyddAuKQbgYR1EK4cAhrOf/N9XeX86QVOD/DqRT/CFXTqcPKVVuujv3vcG8eW/eYDAguOCA5CJIaxCg/iJIaxCgdgkCwgnk0qC01BF/yHEArvaQ3ASR0kYHOuVQ5djFTsfVlluULl2UrlNo3fUuSpcu3ZQuqpCWpVYrmWKnTAyidINbXlvu8bu//dIWc5DsbS7GIKHEPJFYjquWVH/3b/fH9Hv+26O9ju21WlGpogESSNAeY5MiykWEExSVOOK47UMhvaS1xPVqDWvyXAAAoBcwRQlvI/bwC/dtkISEsc4loVoTIbIVCZ0AIJHYfDMgr9cTJpanTeQN9AuIhrzvf00mgr8/5Nen14LLjxN/LCL2eHpgQbwHVi9DEjNBPAZfTAsKwnMSwP7qC7wBARAe6x9bHpf9WOTxAPA48XFR7j2u+DZ/LOBswPsBp1TOAERZQSgIVpzf/feAvzvI47F6AFF6BLhHCukZF45LVMtBJKlnIvAGFHtJAGRAaHoLQiKLSNqKGJ/iSh1q4tXURKt6IBdS5ApVMI26ClYVZuVQVnhVZgY4CYyzCpOoqw1rsgcEu7Q3GuxKXG3aJn0qjxMHVImq1jrHlwJ5PVtvHrX3Ko2IEfgjlbcFnyYathK4PgKjqatOPbBMVV8xGuwT1DE0AxC6x+5SJJyBz+Fn2AkJxZ4glrASujSdxsleq/PHWbE0RywisaeK8VEJZLLrdigkOat2y1CZLYwZ1YnRRpTdTk64eN4CfgfsjqnucvDALVR3A2vlb2hX0wNceye5Hmm5fEBzdP+Qyb085kH1PuANU75Jzsv7ZS/lLnC4ZoKnV+dJLf4NlekCzHB3ZLelfqmuL45JnZvrXJsJkHk15+TdfdqgwG+izf3JCXOj2RyinXv/VMefCSdPVMiY8jjXOo2MAP4mI/AtycatkqmIALn6l0Uq0lI87BIJ04zYwdq+uVjZCxY2jV+rwhDAwgMpoizZa05SYFIIR3JHR+IKxpnh40BpkzSirZGEOCAuOR/KRAje55CKZod135qzlfbXOMuOPHx1h7YxinH5Uij/5Dwy73HhX1B5ZKvVwRDanqFUFff3wOnQyxyWdERob6qK7Gi12nOhCPvVtZnIYtm2NwfM3k5EXA3H+6YC2B5AN2ejHZQofD50sdRcRWiq+zbZmwWxUU4+e26XKyCyQz1nkYmVlZIqmHnHyniMwALg7W0ge9iTxu3Hui5LzZirrSnxcNzQbrVOEohrbh4R6ilExdRG3ok7V4wlzRGOHiwv0cB50pZ+3m+urqJjt0nyn1mdwTS7GeBAZd7buqpOLOJOzjswwyHGHZYUl6VSbXyOF+71XRUd3IVOwPN4SxT9WirnGy624oNiyc5Or9oH0Xk7cnuxO8pCwYb5hEzNIdfsbrKorNqB2QzwQQmn/Qwb5NRYcbDz1o26MSF3dPfSrJMiL/dAGlRNHMtCEVt3nDSsVrHaufOEusODmTKY8DriHN07hL0EzqFkNyJpnLfFzsVNmR74ahkk6gGTe9J/GHlIpI2GNPlqZ3r+IevE+3Wt703n+Go4OwVuvCrAuzjuoMxtExVKOPdlyui9uI5AoqdxF83KGIUjIoIfDD06nOXu3SMUijv0qc4/wnkmI17W2EBApdJANX4zFNC4sVrhfKJCiHMfHYMLKqu4E37QzW/mhSNfGcYXYxwzR0nViMWyCzAiTOQcKTKZLcduJ+FwJUGuGFwrbmOUnyKEOuXZiVUugONRFLS+hbbikD6NOwjMNHWdlyhkKG64GPuGgnEYa5WqB2KiSgX1MmfwEBm02vhE1dZl9lyNSCFhrsrfe5XGiqVa1cMkU+UwTlQxTOPv1XioWX5gB/GSKMyxDWafvs/FDTk6t+XgVh5hDrEDKqVCJBGTkSYUgljvEqQ6bX8in0iutaWULcSirLCQch+B+4LqWLZVu96F3YTcUWEbTfUuWMYGlYLcl1zdCTpEBDfs014M6OiYmvsMCIXwx0V7JAxjfRyKkVFaGEVsCBnZ25CPrHY1H0ZHSGEcL6cw3ZXrV4fh+8ttExFKOPXlVTmZ2h8sy2L73Q/KF6h0AEjYCuELIVkkL9Te8+OtKEF97Uunyl4YSaJUkKmMocCOWwjY/HhRk2M1YpKE80TkVkpOzRPxXfcYpfowYEOo+JbRI/lBpFv1iKhXtfDc3p6PK2K0rKQKrqiZNpZgQt4pHxotxzgGi2ldPdBYX+3MY5kvdDts5F6XPARl0YNNJv/GGJwwcMCqrFLH4Hlo3S0sxzaAicMhZyfeEeBtitFEcscUDkUNDGtqmrzADU1kYnLOclO4yba+dwmSK4ix+qyrNPM4i4z0tinwCAEBby+PPZy2pdmiVmTTU1m5QdV+2iSEcV+/IBX2r2DuL70bzb87V+D5jl0Umt1rny6hpufLPsTPEId2fxKswvnv8E6ZhgNiOVn6k+0tbffCvHzl79fW1VuTnkhTCFspS+uZnEzLnFmqwL9L5Sbf3gU+GCOMx+CJ9dvlIg5qhJYgltBMHcEKQ4w9AaVHebnXT+0RfSf4PPoy/OoM4wYkiIrbKCNXEIxL+tQTblS7fmRe/YU/n1rXfl0mNuSennYFZFBXD5oDpfYN7L4vLvR+Bozp5fDL6PPgi1Xan1fW9Tt/vTQvXkZUCP7RupSEs5w2dNvUliTerBVUUrCDsklwAFASjm+7blXNTKldPwLkM82lNMQM/wz7zPq/rM4kotIv/rrZFXy8faP/saE+AtzdyiqQy9kx1tjznWamFvA2los64ONCg9erx80RGjYCGbtXyFkPgiDd4q1FlacgoO6+RUeq0gkpFfbePZwXQxywYtBsBtQ1oevUhlV7zrEfjrZ1zOFOM3Jr52OqVOdwkMLTmZ7pVvcLFSqvDqpc1jsevuMIs41Hvh8jEdIr5VCz+3chcDxe09IS0nwVYDY2RXOtnk+jSw77g7lrBevvyePfhIwOlkRq4YW9M5UfHGSWZnUapsXprah2Ah4zUBUo3Lj/atA+pp1wWnJvH6JUpYLz/X3ZuyLn+80YzbnZG3/LKazt3IV2fhn2a8pkxgG8IioDL1po8B0XdsiUsrG/0L4ThA+9MWbSMS+d2etmuer1MaWcTjfqNhhSD+ExEvtSBVUoyL1RTUc9/KS9/HR06btoPDwqJnCQCGZ1rCMOuDf0blRD7srP9tMJBGxeLFiZwhGGzvtbXFxVCJ725SqgK3vLu7a739PuJgS2BcjZJS5OFSioEzAvPJM/tL9gp8piaShTHVs15xBNvfp89jDgaRny92xKf2vlmcAOZDOQDMu31tdet7tWnw2dULFC1V4SLdnacGtQk4dwIppwVgKOpxj0asPoZ9yo9uby077lS0Ygm3Zgb6y7wbvXnouWRKodKpYTOpvrbw7oN441mbSu/5ayYmjNXjn+bfaibsPvbWzZkkO6g9xUZOfJVEGKS20pbtyxM8CnVZvRxvUpgAEI9Fn3Ld55Q47pDgIbgRd0zWKTPYw6vRQeo+ibZ8+jKA3hDI1f3wlTjZkUlbufOvwRnFxJi0dJ28Vd8BdwkESik4R+H5twr1NRMTkwunZCeXB2RcZvcyW1EzL7pzX0qJgCx6YVMBr68LiU6U6n4q/RuIPCB8/4AdGKWXTn/44H+8IBV9xDRjJfVOi8rFnd+P925llwS9uWPMDgSGiu4yIoCfgRhtASRPw1ioQFAwW6T2CSbOIBjbiv2n1cRSZxjcWpd1kyFo4vNJGTxiw/csJ5FvYN5+afU6z17j2/i1PPbVAwWidc8TmTixlzxpi5Oy+bNHof4lsmlAl18vJnpveUtAanFOhNzqQ03DMO/2iEqjWvgppPYvXH97bCOrMb99th2os6SXnLO96NncC2FHqpJdiNOgor3xR1GQP6mP2SHkKIph5NcS9/DGTWqmOAwh9fRIQh5/TDXqfseVDBWDQ4PLaITdXtH35rVMHaVwu/NcENIkjEzuwN2ndLrV8HdTcae0buLY+efoi1k+ZyHQMOjWOFe/3s4iS9VqGOEI4pFYApALYqwvXeo9LiKWI5HhHmFi1n3lap534+/k2F2Psr6pWrc0qRI4BEZH2ABOcb3hqQbOIBqjN7/Mr6s0IL/IS12cOqgeqr4TWJKvtBfK1u7nKL2pHB+pQ+5KZtGISD1PFNxjyqw+WH93CKwpYk9PU9FcrErSApKIgq7+Q0IdBAmxxiCqMUcwEHEUuzAGU/FNIuGbkpqCWg4ByAWpss999fG8z5IvwKxZ9VQhnlhzGoMEI8qKhPz1ObEmMMMMBXtfWXuShxre7Dy3X7dz2qTBHWFywLPojO6jBKCzWuRbenfZSgRgwflw5HbCOuCx9Re05YhmRdKkGNUAxkZT6zBF2myWSf77yw15mMtqIrLeZb0PRvKIqw2xGUW7uMMQDX6WH8621RNpZHqird7JJ91mlSQ8hJrTOMBK8JCP9SR/ffPcruAyvYooRhSUrCLos4Q7jISeC/L1PyiQcjLjlC5Wd47wBm52StDg9Eg1xHy9cM2yUZSBXipSGPeuLlMUaAE96phx+r3qXUYhV2KSu5+AFUevGMNM3Y0s+8nJsKxBdvKYoVWc7Wer0SBrY6r1VIc0WLoK5VkW5tDbizVeaHWtrlyyMHKLxSHSOc+nBnTjz0KJtWNwxOe/1eU7p1JeUCZjwW7rg4QIrBFQWQaPNdQqX08GRqWijgOaR0lUfmB6JwbH3fjvhiml11Ty1Xr6wx9YO++nDQKoHaWBDNRgy42MK4tv3Ph0zX9RXbHetwhoa9iD2PgmwcbMSGsXeErvNLAKACtGipFpaHVsyoDESzRhzIaR4BZKgDR5p6TehGgcGaxaEWuomsCqakdBfLejJ4BNwUqZBC/8mJJuHtd7AJ1XEL+1TRoEZuWwk00WQjhUpbvVa0nvEo80+pxDASFbCrIM7ouwdEAHfKPbgEzWmj9tyocroYW6BSJJviEBu+oPlzcys7A3j9tM5IhFuiEg3hWBYNurPnxtvNbhxu+e7SQBPosQvbtBcMlCBGNE3rPtikG/uo2oxZueowVQjWeWH15EiVm3sl+vl5RFQgONfWcSMOlBnzKXKu2MoXTUuV922QzKIl0ax5X3ltqhJfNQvIvwoGorKiFsXu8/DMZ7pZNjYrts4M8ShRUAfDtDraG/y0vz/jvpiQsZM1DtywV1x2Cofq98JgpY+mrVGEfTSm4cVcvyQVhtw4pApXvDeUFSw6dNGgDTw1ioWGf/xJFBo7el4iCBo/EBEWevRgppx/4IIpLuDk9aZoEiseOjuutwUBMmchPE2Oa1Br53tR1mpRwM1YpaGwchsnNNoX5eVfwFBE4IZ877vUcNsykCZmbfe7FSWN8IFq3ZL+SI6pQ8VG+naSvfXqeO6ZYf9e/MKQrzlfnc4nNQlxaSE8zCQB/10NKYoRZaI0RdHG/no3YD/X5Hhgt2H6/i+K7JllF2r3fMn3qr/8ytxDUejMLr/Yd0zTkWF73VQ7ND/5t/U1rgeIGJMx50YP7o27zym2BtbhUwIYTYkJCX2L5kAS3m6jXC3L4iL5DEkiUjvuKU+q7UXYl0SYYHRIErPa8E0AVrS9GHx1TADOPuC3+heQ5wKWL/S6y0/ng2ZbkigaLy/N6jDp3avdWTYTLJ3euv38bkds05t9+3Wl5bPhirkd5ZcOGKwZkw0tDbG5ta0YLc1SK4xvxmYLtRa+IUrzIxbFGKXw6lXtPd1M3m+NEODjkFIBv8+GcmWFw4zu6IGtDmbGCxdIFCJV2FZmdozcAXZFKT0YKpZKQWr0rfWl0zNTq1DHjStpUwr9Y0s7opcOIuUVSyeIubKKqBE0fNSiQfHTAcp07vfCjY/B4ODHH0aFSOS9Pvn44EefECzd0uMXCwpK2D5tfdw2o5vPilPTmu3n+cPo9hSgFDNl/UTPef1uiyE2lpl5ZSdJZmO07saDZQlwB3g2kK+4bnNnHnp9AeOYYKNG6IqUptBn9WVPOkiU//fQPnf0G5VHjQnYduZmuH1zzriJu7JWp8mxm4KJvmL2rvZ1EUF/0D64ZWZk5RlnU6Cr78OEdW0rq8+6m0MRGlebzjeMsVSdc2yJGXAip7UXlyD3SUZmmBIKZ6UhEeFLOZ4ScYpi5oRIfG7ROdFcYBvz7NwMW/CACmnJ8MLhRJa+pq5l2pF51rWi4SrtlggNkcQMsemlRvtlgvSMqUM5Sp+4qpQ7ddg63uRwB+ZWXAro24JdAjap6YHXlc+6U7Fokd9MlVezEOM7EXRQKNO/E+KD0DZ7Od3snxDmV/QXMG/DAovxfiIRITkTYzBEB4XYS2Al24go0Q71V+3qqZltVzXnR2XWojTCygjsVuW2a+f/PnFCEloBwRn+Y8z/6OMvnpCR0eqCmuPUjLx2Kn5nnUR5OPZE32cnP83hs5nVH3MMiPvsc8pNO4BMF0IQXIGCWPnK/3vgGY114TxjzmIkY4idbGPt4LvD0WXmj884QLtSoF7SjBsNNgSnMQPslbUo6V8PeeViX4poMW6IAdFGTmEJNcLzOsLOsx9cLu8wZVl6liE8cdlbtUaUaI0GRBLaKcJf1iUzNHaaKrbsSVziLfaodIk34nFJRpgycTwCjnUZu3xvlJpEwDX+bwX3Aii0E4WoGSukTjnGXVxK6w5sRnck9mRmxBuh6Dc2nrhQlsEa62jLlZzvqd0Kzs2RNvx/6ga/MGDApGco41YM8QLdZy0BD+a1wrrEHdgkH2o6uQ0PQWwmHaHkKC3Ege7q1bODT5dENDYBBpxtCz7+6HPt9sQ/lE584qGpmbWfcrW+pnKlRoKCq7TaiSeXD5eFSKiLm2U09ruFjsHBJf1Bit2sbrLLeBli/PRW3+LtYyZ0jktEsN/yxIgOp/3D2m4Rd2R/EqyZy7Fs2o5/m87BLcpHT7TBMZHFE+BbdhcbXRJ2BYD9MoPQWaoc4rxOQChxJo1t4BKfjTGM8MFEmaY3KjYRB7ZdWikTV/oUt74AKNrSvLn7eW70G8cAnISYVAC+gK4abPStRgQoEgBHYnPolBwiRAujX/qNh6JVmtTaHkYXEKATmBFnroXQnnmSRDG6K+7sAUhEuOElr4dekBfHt6DpJJosO79tmYXCMGwsh7YE1Le2LgekWXM6r8nUIVvs0xQFURSUZwqmCsx0DgMjAyHj1ndNIHdhci9tGWgk7W16E56rg3NPscCJjMtbAxRbrXYiiJAXCiarouxGq3e0ijF/esUKmfcD/AYxEC7lLLNL6N005ZSfvNREpcCJzkdOFatMf7rRnpiSLRgyDuiyG52tN7vW5fYsIrHIF5o7VjbVchMJWGDuOnNo5klbfYO/WLGzy9bN9T1N01Z75M3UtYbLFfOOxycU9Q9e3tvJOG7j28cYImdEelZ4qDawW0PxcXY+ER1NNxJFwdf7JHoMOUI3ODHGx+70zOJXZF1XktcDXI7GzUzizy7jhK14IQzEVg57zOPOwUHrWOk1LQcF6cQCvIBiYKi4qmByqcihCJU73lZj6ifygmBuC2wBxyB5S8qqRHEJjhUuYdR7oiQBpKFWkKcu2hAqy6nA0XKm1gcXNR9+XErFelk7en+pKLXowwmtobl/9trN9a2OzQJf5rttWfWNzo6bXRKH9CuopBWK9tU+MTkffHGKuzDasVkUfm3RCrV1xu6wco9D7KmJ5/6MFdlLM82tmI+dZlhsFzr2fA6cjXUd6PxmVI8eQy/YOaXduQnGRcYdXAT4JHgM8LC4MnAHef+W8j8oImHAHjr0/7lNH87nTRgfPSnfniRyUwv/NYjO97Gl/7tvEW19cCG4OJzEn40vh5dGc28JyiRsUVwZrseSUgwdDgA64zjC0+/IETD5bIMgPKQAxiQ63mJQ5SobrLWBNJkk+tJcSr6crEDEq+FyyhzTkEkIn+Xwr+8FbThXRksOmiEjsIM5vJXTO+2109o+Z0rLL8YXq2KTsGbetn5UDKETwMK3BDktSyskAufu0kkHErprx4h/GfKK4JonEWisQOOGpeeOFDAgwdok+JQAsY+hcZUszyIj0WVLroNq2br6BexLTnCEo3ryd5JyGeqnqETTkNFD4DDdC8xoLEWh0PIqJEmSwAcdwNInxEs/S5NklJehqasPryC+eF3+3K8UECx2dMJDAwC0gXx5bfS25BaTKidgGB+3W1ISRx5iXZqnch7nKVV+Bdrluq7qYGjrz4/6be562uw8dkW415iY+HxPjFS+QSW6ZWdnmgzGgQVCrXsNHsw6nJ/1gNhiytxBtW75ccb1VcJiQ/ucB/6GG0BSLhLd26eWdjPjdY2WgrVMS7wEXs0n+vsFbtk9j8Wfe1xsEgDDaV0FAszZFsDQAwyjWfhtsl8hqI+gwe2YDMbifpvLhsZYJOdDvUxvwtnBlMxGjy66MlQViPOSC+hmFUC1db/CzfzyZeWtQ5hv1JmLZ4S4Cs6qEsbJuyUpH6h1whZs2RX2l5YbxIg/IaxjJG3HPC2/Vmt0Qk347qUJLHIB707wCtpKqUhxeQK38LL6ZlvOrNe5ak6iECtcm1o2FURLJKOQ1VQY1eJrta86ixjC/N6+WvZAfSOWNUEmqgdE3atvSJMG9XoLsxhtu8RcKh5y/36qW3FT2oWz8dDu/LnFaqMpt1gVzdpoAqn+Y5ijo7EDvwc3odUJ+LV96qk2qCld4hUDAgVZU98LozOatOpOniMv8k0hLCtguJEPqTNV0ijTSeqnyhYlVing2A9rA2LwTEoQ9oXO08S3bhHA/XwOyJRKn6LOiNkGgsGiPyivtpOvKomkKQ0uOlXprY2yJ4JJ0wdlc3/d3O2aGtRjuqL+q1Rte7qsI2ikExd0uqKFbmRP6Ecgm8nyOLk/+ZlZ655Sf1v1skJ7ZjJ6udqpmQSRqoZ2hurrDnJ3cYbkCR1klWvGYd47jPCUVY8DtYRvw74ggIxqQpHS1KsyuDJHKyc3a6TTB54WGXiuoFEzd+LWrCBqZzj4DCXI3R0UjqQRPaBj7A8m5+ZInB6FJd1MnPBfnRT1Eq1sT+Rd8bgptZqjFi+C2xZ/IZvIWYgJwRe2QCHYdJwveiDwiaDPi12b7q8XWPriw0NyFl4YDNrA+baj3qQ1aT5x2Jec0vdRQ0Pa8j2lHJNbtj7dXjqmaHLzOJ5mucPlg8DaJudyicBFHskzd/ODA4VMk+DKM8bXNYfbQEFYKuuDQuyUUB2FrX3OuMZP1kx+9Fz3UFViJ2u6AFWIwVxFnLmnfdd9IgsVztf4KttS7aNr6z4lHpX1ptuhsc7exbEQ8DWPGUmIGQTntNFuRPdeV6roYlowsWJui+QBNWU/zudEgYQgkvZLIw0Mi5DmC9ngGcWxjmMPUcggJ4WmZ0ZREqJCQzr+MTcbalaX4mqafKqegxq2JrhW2Dtc2SNrjxp7nJ683gAlma+GkJsmU0nAfmqGXMODYa2xaJ1PXxgUjnoXrz9qCBoLBPnScIlsdm8x/NIR/SPs660vBektKHCsZi9eROj7yDusw3bwTyjgTUkSNyZnzx87n6EOCemQeKygt4GOffPsFYv3OMqFRbmSc+QrwmuffvXTY2gnI0zuiH67HalK5ALdZ16AHHxatYa1KKn3wftKpe1GhxVnkcnNL3TcbabC+tIgvbf8Rnby9Nn1mLRfT5jhuiWFpE2jzMomh7kEg9CphlTa+vGOMi7LD6Y1Cs1qVUiQLOs1Z3I/pZHop8dNuQ1FykthtjL5cVaTw5fnwloSL3PvNRXtrSGvoTANoAOyedPPjeIdXW6XmsKhKsOYxnQpqZ/hBWy6fDpv5mSapFmi1AjZLt9fSp+3NwHYXI/7CC8XBz5idux2eeUl0ifzHzH88VjkC7vmJ6zmHOqlDn5pEO3MYi0G4Adc9NxWzx3kLP4wD0mIg0OFIFGwzXI/nU1HNB6JBPEj2GQ53hGioicAXCm0/2rc75C5e3EcrRxuglT9mV3kFjupNwe5DYzL8cD/umNOLs8VMrtBKgCV611j5koR2yv4QRaOXgf4bnNJqlqV1kOnhfHEjE+RM4SfmAryOBRrsFPgoXZuDU5u10oV90a1OWLOI9ZCLdsRN7oBvFJTVEVt4sG7aWDO3vFi4By4CSSIGD9kv8sFC3u65CUI2vwgZfE9yIgOKw3qSbDAG0lsU1Nak/0qOtMSNyKVdbwCw4KWzJdING4VFDi1SRReAFE4ZERlo7IPP43pVWsKYW81YT6MlOrtYgxy3HG9Yt3yrQqhF99gq5Pzz61Y2nHJJ3Zq9hWC7tbom9mkLE5RpmcosearYTw+p3kD2w8bUsO5xXQBDDlFUYTb69RKtfb5jSsLjK0SOehPXf0lkJjYvX701z4UGBzYt1/ywHI6FJ279qs3tZhz6/TAOdEM7N/j74Vd5IHNtbRv3+o/0Fz27pk9u4IKZArkOXwuJAl9ZP1zlGDfMuiPqx67IcFEOBPUJ8nIqHd2n/jm23EqIB7yVuoofKc4rQcyNMugZe1gF3r5qmpHdO7cPgubEhSaczo9xRYdSzXB+g2bZfPx08U+xl2c0HjiAAyH//GDUBgAW0d9zzxdWlmAlctMhqd44Pnz/a0H28E72jQNEKW14IxkT5ZprFa3xlStl7cltMLFH8PnEnNlFoAvFTey9Z8b8otPyMnk/N3S/4ATxdZNS6mNposW2XwdVunoPLGQpZdlaDoLItv3J/Clt1d8R42CzoQr+tov7sB1mn1H9ks+J6SwPrPNTb2nPwMoSEVq1+/4rlxls4GqV2dL8JLLf86KROKD3bxlQyQfqL3Y2sRT/IhMWInfl3jZ1+YUath8VVFkGcoqjIVxobf0mqAwOM9wzGH/800Rk7srNTFYnauMIQzVMHcJ64+1mOiCAt7AnCuFzC74rBBCAWnf74yMnKiG+4ZE+ARnS7cHckKDcIIrMz9Rm7W0NoB1ka3YxPyai3TZ/Cwt3OV6Ph3ykeglFnSMciD2YJTekQJKpx4jb7KIwKEewih5hf4xs0bVIo/aS2Yql17C5eyJHl2/X+PppsQ8m5VfkF+9j+WeOYaGY9ltZfaw2shCxBmIca2GXl1Nj3DeicY0uWtCBOYc+yOsN0PxsTxxutJ8WfV2JJ7PI1OCBY5oFMXo8tYFra/ocMkBlc7NtxVrRyad7OUyT2I7RGgojeHtKzTGRoqvIEq5A4Vgtv3BpsD2EtpgcjFUVWiUeVzbolpolzQeDZLVyQuxphVDc9CbU8TCUlxBfu/dFmIBaydLZJl5DNsJZp4RmBe4RR4X8I+ScHSBXWX5GinwbEe0ax4UmtYXAUhLQqwjmM0Y9l3zn8IT6F9Wx7XjN+tQadAO6fbjtHmxagilhxAtWr6A5tV1chqC03gykxjT48PwsUK29o/DWCXbFzDLEIHrR/bW5GqOVqiNdLOlYRE+k5h3c/vwQO96qHIgt854Se5htoDBwbbkBaBlsJ6vK1BMnrRZAqmQiHlCXgK2N0DoCCJ7VyQ1gBjCeOTzcCyQ9/aHXRXS7fINInEYVK8JYoo7V/yHOdSqfNbBZrlyioCabnqbzxwd2837JYvlZFtXqsDKghJDTpkNbNxAU26drPs/1WIDnSd7Nzok75RxUdMZiWkV7kbgLwzF54RdAex9mHy6swPa2A1mIVLyp2wY9hRH53D8ruGNtw/tzKWccCiyyZWxxYW7Jg7KXHERhldfRPcTZhyNiJxzoi01RApuh2w+YWqzjEpdHfqI4TlGKDjZHGFqF2btd0uFw1vm/Tktf9rcZd8EOLtl13lbMDEpDKaUxsDB9TEywuB58QIM8pX6DwfrIV5DjaCA4jJv6UnjBWfXls/zUOEvo/D2TWXp7lt0+mS5XBLe3RXAZYokNBOjWVb30xehf+WSXtxJmybtT/d8Ou0fjy9esmNBZuWPS1mUkOgWfwxlbCK7fi+fDOet/nmlHCmVvU4Vz0vz5KrWFV4tcyTYrkt/ztVOLT2PYwy7bpq918Lp4EpPxxznmVEd3gCvDaFaAqPmCqSkUNF6IW2PNBlFUxVJCdWYEK+QprWff1mzdo3LcFA9Hz+313Ts7k0Fv54VtpeqyD7Cu8qC+8iPkwOEa+7Cfg2H4Zz8fhgVK7rWI94+WkbSMfNHEc+3Pt1oyd3be7wYGU8SIXrNz7YnyF6ryO902KmV8zs5I3sxvXjqEs/QLspQBbJXcHRBOuH6x0M5sSl5YNIAsOQBbHNGtgbE6X7vuJzCtNiQ/exV9ZwZlDj5EO/60bdO+9KhFKZ+zhz0mMD60LjLRzswIRnL6i/NSbFPxxT8D2QGNUP73FGJR0mL93djpw8/p1aPyV8qxcT+ylAva+DrYJ2AkXTQtupZgOvv8KS/Xqm3Umi4pKHJ/i6PVGlYgJ8HPuoMFeDun9+6om9I6PHL9GrZ8uNx29Uca4u3obR6Ft/lS74gijV/cs3kfHvNXXDInxMZJ0ckwXckroXMuGQcwcPgn1fBKTY82dyDGNiPv+t0RWm5SMSvp583pO2NPGIK5uaHsrx4LzgA/H0Nv164B+xn3ILaqsmosvGCY+8sEzCXKSjja025saLcagdnZUjY4vOHKEjlLfQE4g00qpstnrmmO3YwIzsBYzxlNjLjK+fTBfdCTt0xFW1VpedWdERL7mxQ3pDVBoW/p0qw3U509y09d61yY5k5DfrTstXNrnLQzYbLd8yMsoVQKw6C4e2xR0gtqdeb7SNXavdSCUYWDUy7UlU6t3rWCQ1XEaZlYIs20B7AcZd79MtuZpjNxVfawjLCtZ62+JWe7qgK2TxSzqSMxZFeD7iwrx6Csh/LT6kjynYoYCWVxbYKl+7petCEFDWbLKKv0vg8PQ3O78nna0dHmfpSIjgnaVCxLJkej4M8qjVWLA2/CKcj4d6R5LFD8aZ0hHY5GBkMDI3W8PZYVSdP9Ou/OrSwcl/wX/SGZUcBepQu8jbtApiBemCBbUMPyoBd7kEYIADerqLaW3PcI1SAMqgjVz9nAFCtibGyrTdsLNuDHzQFBRwi0ffLME4hWR92dvTIESuX35pEphOjWgX29CNvv8u9z/XlkDIbDsRkBazG8W3nmtMKHO62YSdPveHnCnb57fKpbhuyRJRE1rVUxJRqtaUxFXc1TJCg3LSl1hZhUba9xUzbUVea0safKkrrEqxlqoLkIWMOzKGMOdzoHDpXLWDJZ7qUWUUNAJgOwJ69az2QXlMN1JcVuAvvd4dxPIgj5zAGRhwjA9gIFcBuGFBH4DmfmqNaBwcEWzSHekLsDu8MO6jtfVuoBbGrpMRql9nnRy2wT90+X+M+sNpcIMwNMuYTcnII+cYgfpNCrwAhQgUbGMAw1MRvZhVNvCBT94fGFMTrb+5CfE4WJxfJys5CzEU35GcK5LTI933j5bkh8d1B4PsmF/9SfycKUDdJjHw6dfZfiv1F5qNpabEC6z//aHyjrTJq9E8XpFRJSXz0Fo1iPQxglx1gfRiAV5Oc1NiQuHwGF+zeT1hL7evxStrhD4sfU5nXHRi/zqQ+bsoP04Dde9s2rmu0Af71o3NXr3jQMhS87YIZKAPmnw/z2mHQSgF42O5G4ar8wbklvH6r9VxQv2wibu0dOyHrDzpntTqtL30UIkU2cF45PyhLgpiDneDhGzIWy6pRbSUlwPd9OkCYKN2HhQAUOg50AQCGMWAH3gHfndnoAi4AEA6visc5YZIhj4wM24H9EumnMhHIob4+wL13nMpAGdRxNzKHzlUzDwcbdmVcFozWjIwkLUzEHdWM7zfTy5uS6hMS6pOa/tIwQYKy/V/77uDvzaf6LNYJWb/sRtxKHJNrtTrTAVzeBSD+wYr4hVvMfuw7TkWXn0g/RJuC2M3TsVUZ+f8WqhaUgzyl6zX/7QWgPCJPVXh4PqdE7DSygBq3YEFshXZhK7jUFrtAW7EQtLZd+hZtBm0w02OZP7BKfALuGsS9j020H1JQBgqSOe/ngfBN/Sm9KTum/EBoeAcoFgPRZcC9dwyeg8HRHf10cpZRPwVjVA/yLC5Y4E7hHi477e9ya1+IhePLVtTvdOnBQOn+g7+/ES/eZUA/CstA5+/DLosvz8/1iWWTCq+Kr8YeFOMzd4v5v+TSfvmxNfvLAz55QabadbhRF5Qq06Y1RH9pI0sDD0qFSriwuSO69/wPHjVKx1T52gjPF5u31XzfZwTqqyE6/Y14+/X3bXAfNHiKAjhske1nVzPshGxXsdwtdVoNQtQ3mJyUHgxPDx9KHwpMDzwYqilSq4vq1BY+UmdRszoEeP5eYgAAD/ZRiSDTguoJIK/AaLdE4U8yEBNNXruwN/AB2IN64IEqSkF0vlqdH11AqbqFAAU00IEu7JwwILsiBwVRtT9wLT4CA5iS1qIqKZH9HSrB5ZQj+cGnS+/Ny1XlKCNyIvI+YuAgQdn+4326wi1KdqtEUnKS21cClTPA6rRYb5QfFst1tHk/8EyadcEvFsh1e+Rp8tQ/MtuzsD8CvGCJ6ha8yGM52EgPYY7I/TgiVzMA2gxAOWFGt4Eu2JWwO353wq5x2cFAY8CQcSjAGHhwe7U9UvUcWutYi1VYsRELFm5MVPdaLLz8h0vigyjAvqolZSMt/Jfa8+1GAYLPe2JwnhijlPYKl2Jq7fPXsFBwU4SrlOZDVg7gtlRVMywMeQXDNFfOtDHl8yt/h+hmBHAbVeaICPM8BAzO219I/SgK0CULEpIbExMbk6PDivMWlrrcVD8r2yqNNuzcdC2uAJ8J1oRPOD+czEV9brBu+KAK72rSW8FHTqDrWueqDa/XWJ3d3QJLkLBOc2Gdm2wGVp/oDwhwogzE+fPPXrCLMmAvyZzgoM5erD90uYzAz9PAUmOYEvG6VczB+gnm9im+dWLETRAlo/v+HCYfRDj3OTCpH3x6wn4bWG/uq2PVFRTmlUZZ77mAq35fV+32i602a7/s4k/UvoaGPgQg/fe5xWhEwVdwhJASZTBCgTbj3u9HAFBXRnSnCeU0ufF/yU4vQgZ908zNSxL6hJPbnKLcwaKOT0pgeFrs6+RGCkoOeRl+/ihSjyADNGusXpuWK772eo32Ty4H5XL/1HYsu2YWx6TF6OlW7oCv7qhLv9hAMywu2nM+2Dn/iXPvO1Efc9Z3+iV8n6NDLFwQrqkbzvcaajgyh3quKgCuUZfd1Y4tHSnZUoPxHXw75kCYKB9lIo6Byn9T+5hjLIFCyNiGO2ZTJQgERmsQZqRSQGxttfsTaNB9L56bnDtZfKHz+tnTatRlUQDh9UsCup6+kJgA1DlKAcw19oltjenyCCVr+GkonuQf614Ag93N9T30ve8/5eu3u97/V/96iLWL72b7zvq38A1Cg1jAcZZz3zdA/thjy9Grn2ZZCzX/oCA5Kaj5eTxwGfku/jDmWvDohPUfF447xrBxBHISQxDdkgv90w57YAcJFG8cVo6k8lMj8/h5gngQIg68XwoszyMjzLkRFRqciJyzR0Xu5NV1i+btbnuGN/x4CED9f5k8+l/of2Y74czDS/48FABwFkDAmYSjfZ9zFMa7LFAEKiPs/zmsG9UAoFE7jrCQGToZbl808rGFm74s9AMWmoxlZMksHlhtKLRRBueFZobllPBtQRG212vUxi9poQf9P0NsFCHsAR7aau+77bFgf+mjPfLJA96bJ2Nef5R5HLSB45mPXo+Z3Ox9YFK+51HpflBSm6NfgqCLs/Wf6fhiFFlSjtdgXwj4dXTiz3m38/AFgYFBJJ+oJzmbw7t57K+CJ+aR48VhwcpewWAGXJC8r4iqSK9SQRsGCl9wxN0bFGm0rCteZ3GbBfUOrL04djE6qTJi/tL5Ea5guofKgPGJi+dPhzNxO+pLr5Ras22lJ0rrtnV2Ic5+JzqHdDn7ENNSmAGDOakvgBlNz7bXlV7OtCVA6clSW/vCPqTPeTE0h0ofBKivPkr/6DfbbyaNffoZCt6+Y9hJNwohNgRC3ekzLfvG6RaBHyFOOhy7b2xcJdpv3FmbT47z/1sT+evIJoC66fgMPozZU+lj2d0YNj1hR5ldk+kPgaLohkR9t/oPcUqBa6/dZR+ww5tlC9gHuHub2TnVkdFWdAsUWw9d8PVlRHXLRIHRpctyll0NSA2I7BGwowKiOFjAxoA4TuSrUj/qwl2eYZx/tTPICyRG/voC1NdMOD7o909MM82atfoejbgqyYuvddo+r//c5tTyvZJWEWn3VmdZm2kx//gN4njcNPb5zdor3J0/4qvUSXyq0RJx6hMxd9EZkcVI5SepV+E/7uReqb3pxBwYwOaoc/AIFSAR52FPxOAYgByFTWPYILbRB7CE48y/94v2/yT66S3RW3+P0eWBn27DT1dDwxf70nxf+P4XkGgNv3mQshJb5d3OXV/FNja/FL0Q+4pjbvr+T83XI8vHu07kYLwDC+wPYQCT/GJcoT/7ujAXn3npS8mXl+xMQYPwR3jgNUCYFSAsRBDoYSfddQQKPJf5LoSFvPOhox2/SwqHZvh3f0Fu2XscFRVu5U6kddcyXqXLflw1uAsvHq8dTwktbD3BrGWeaA1GnzzNgw/N+4+faGycX9JaOQksAOzVKmzs8WIP6zGppXAwD/YJg1GqNUIrtW7evsNaZlwG60Rp3Qvyk6yvrcwK7JOAD+yYnSOiksvUiN0RSFj88GIG3fhGfX+zvm/Cn0iFFQIFVgsUpGuCM9F343r6wZMZqgfxUNtgD9z2r7TI+SG7jd0a2yZDCJv0xUxYbE9bz0DhKj0qF7O80NjZttm4zGdzhbgM/OmTwV3zVaN8nWDmSIzXm9sth9J38N8d0lK+WVcNsJNnwngtPfmqLeUFwa+li3PnYf8atDyJBL8HVT6DziFzl9sT13vJECLpdO204ZuilRbdA00u3fLA4DQwrPX1TrQfiIn05U0x9dqE0qSKuxocJChvwXLDKsmiLaptWC8e3Z0ib0toOTrebXFRof8Qg2TLPYEuG+UYc6NYfUjfho2r50TBC0jWB6No10Z8PK5z42HAvvaaF8kqavBlrRWqUqXGHJN7NiZXwBtK+7sPL7yK2qQiLOG8ou3/atQG3QM44+fjwuM/C/9EXXSsHNkv2k+ydR46ngVqoyS+RXLTy2Qn+aUGUBOVl0qiktj3BrHmK32EW0NTO0y6K9ovDLB+45pOzpItxBXRaiSxYBoGivpYoCfHjBsGEPeYoVyz3tx7Z8NGwKD6RnPHLlG6hlDyKO4qOoHjS75N8PnJfz4/fnrbra3RO8L75csX3YPfuvfzy9iWdiWrPWFxhWOdoqOqU14VviiVnUoAfX6zU359f1wTq5ZWyZdUqZb5OxmmBa/bKpYtzar5AHgozWXaEo2mRFs2qS3TlJRoyvaTH9belKLW7Oik3WEPT1S7vogk2Y+oQAECzU7ZguWTC1/oeYnm963jps9f9Jo+i7QZ22wgQAGNT6KoYGBhqdcoNjpBgAkRnzUmHEokOsm2wh54hkKAPZPx+7DkOcRT+cYGRQGNoaZXG+vOc+wYpklpRXQJLZyBrT3Tt5DBo0noRdvrPIINSuVDQxrACy9uTBtVjSOId+PaCNonggga28a7NcdRlYbaFuf2Afa9uurS3sS711w7PqR3WsYsfseAaxLiOw4MPMWFyxMAHySs3vufj8XHxgbffSCqa7AhrThVPn1ZP++Qx1jYd2YtxgiPlkg1c5FcCtTX6Lh1ag7F8eunMh/T/89kQVYAMWXemn/+qe+haBYtiiZBZNmbmi3RJfESqvSnC5KedB7uwjFqGoueKuFhzBXEMrGC/hwG2PQtWiz5i0L1ZRd/jI/9CA7SwsuROYA9Dy9pwNFOtN0S2J+aXRv1l1B67LgTdXb1oQxb4OxHhry7WAJcJQCyzEveh4E4+7rmAmyU/iYde0CfQGCcHkHcN2vj3oribj7pp8FVvTrDgvGr1El1bdjK5gj8oknsAb608EOfvsATbj8TyzYYVYakuKA4Q2JkukF6Jm4RVrVXWWxWIwpxkFjJjbaZ9yqqRqMoMS96Nv6tvpucxKBZEYhifqvXJwhQQH3dLZbXr6E6hhzGBmaDjkHHrtRXTGPY2LB9Bp+x2sdd48Q1VlT68FA7LrCpLjm+gEba5ZExxI+MCtwU0qDzQf9Jtfnyj9ETt9cHNPdPlGbCUjizNHwLmwPW7772hfKLQ2HmTRIsWfEwH8MnEh4hXWOdamniv/lA1Hb+B1phd6VAnHRfzL6RIA6VotoANhon4CAcj4tbcPCjfeeFwuCNQDaG1gyjntjcN9MTY3ql1qvZt6oMJlCXVXeGK3996ssREIC0EBOKw63YzNW9BHEoO0CLStE4Qbuw2Q25k0CrEGZS3wgkC++ByxVoturjuNL9klaSyDeC+oPOk0krSfcwMrik81McJimSh+wPFDcpXV1O1Flbe+AAQaig6rvy8vqc5iLETN2dpeb+jtPS9otOKhUksmh/2nOY5ldT40eDwdlJjvZhCesT+uuk2olaYX+tBbQ1fbHXsyfv3j0XNQEmgs6hAYw5gKIxuks80fll+SR7N3jgMz396+AWT1rVbq6/J+DJlEo19STA48/dXZXm2TL465krmFl6RRM/gfgRYQriFanuBsdzzVOHmVxOFmX3uwgla/9HJz4kVx7POMm2z9PMb5fZF0TNt/+zdat+OxKZdkG3xKdNLazLFZcDzzzqSbydytOeThsbHu6HXNA7wyHDfwX1ayzUI+gm0ktiIS4BPA4KXh77XoyPqS/jfOV2x8lV9mFL/Jf0YsperCqxCmgffMD56rGKbXatzNnbu1uwu6+PKUk6kxo5N4KxarvfHNrVu/Y29CEMtA94Jm25Qn3ACcprf9pENIbt8daXl8pEnvB43sD/0sutj20Mmsj252uUEyWcOqV12g7lR3hkLBPLSBVgL43dz9r3JrTMOYsC9CNW/92N9dHKlI3ZPgzPes41vXmJ6QLr7AGx7yUOXJOulTKQC395V+wjcRFJunuMD+AlJiO1jvf6d84mw3Vi6U9Do1ceHxD9mvdfGcIc0WENrq+/3h0oO+8N+RHaborNabhJmCXaCgCQ9sAsvtlG8INoY3DuZH5OYBrysXY/VqwJquls+sLw2cvMwM24o5efGb5o6qwJ0hRj+7UfpyE5gXkDmnJyK4Bm9F/LXXEtBdRXblUrVv/aamW81a/Vq4vVXAdbKrdaRvKctPdx+jXNq/bYMf3XR5C9XQMt6ab77farpX/4c+1xaMmu4TrA7zBVFb5AuucdXPxOwsprjxWR779x7nPi4/8l/vsineOeqNMRPQG1W8rnFRUJWm1yYU5my4G1/MrxDR8quIYUE61UoIvIjFoUnl5ofj11z/ru0k5nxWEw+orS5WXxcnpRA7z6KYmUfi/lRyiIBFEgEhCMhSzZ8+HCXW7MjRy2CB+Y7UdZaP+sx4k6WdTOs73q4jpi8T+h4sSz1ekLKna/f/iNxTcVoac2LUo4JF4ckmeE9kkeTofwralleCaW0RSZ1uRfyyrIMHwm521Y2LUM8j/5UlA0Ql94dNa+daxpTcqr+6vzW5eMpfQNBVBfBTUqU0k1tv83NqOf3fiQlspd2NbdSPHAtNV7NbaK0sqVWdKGViw9RnrsKz+h2USbf5O0gbzpuVCWlgs+e/VB+PXD3uM7T6QRs1AT9OrlpX0/pfzz4Qcfbc/i9Px2IZ2QuHznncTkH0FNpyUwNZuQzm6KqUj8y+fKBzl+OeyFmx/M4+wy5ph/+ufkbQ+IKaLP5uA8N/PjifvDFrLLATO4/wWQHSOwB/liy2XRYcy1hgcwIOEjjLzCoDz33xWAtobu/VNI7atgkXXE3WDvcz1KjwyufhXyk88YxtxYvrD86MoC34K35LkZuUfMox+D0Y34KP290fOm0Wsg9FJsaKoupGoog2jXh4bpEC8nA3A+rOv9M/zKmzn0Oj1Uf77pQMjEu113TmWU00AGhAO7rjQGK9b73XxUXfcN89mp9NZ5tzoe8PYtTW/eYLz2w5uHQko4Ib4n5VhZWWz1rh8LeAWJeQ+Ztc6lTacbWHFdmiXBBdaaJTUwQBmoB52rZMBzyBxKn4krzwTXRXfFybRGHxjA9A1Lm5y1zIeJebwCEPoLdw4m+wNprbVGnkwVGW4b6J1c92jTo4y6bYu2DXRurtyMYZmel6EH9No89JizBwJ1Hoh/qgFrRdbOW7e0r5SizR9iH7wlUs5qHz3amZUZdLj+sG17k5aBMZq0223LyZRvQvHX9zu/zoZNhNyr5xPEQ/NJliExgV9/L2QiDIRo6LHlWm15bEJyZQjIYHcsEOvF6bkQBDOoHVRApUA5EoM4rWN+BguEJi9IiI0pL9MeS6N//XpGdGhp3ryQzne86pp9P/chM+LaK3Mvgm2afHWEIjtbCXQ38TcW6GIbEyGCr9gOypGliZYWmn6BDjBQBvzlNsrw4DS5PM0sT00L5gVU5KlylMocVd483BysW/Bim28mZ0M9ObmHDj7vA33Yg/3xXTEyjRvb5p04gq8kvCxRFIWkyuWpuRpewdwPPRtjy2O0ZS3a8nJtS00BWFnzKAOPMUyZOs2z8mh6alQ4AE46tnTOzSsqKGBgQl01q+hiwE46OrkL89UtKuTuMjAtGXz9tDzf9cHzBRSng21EV6LdGYP1ocq9RD/Ceogd2hniHRmpbsOkRShAB1GADif3D/vyA7EonpQWBzVK435gCa1oCTNNVUS9hhSGtnYGfzRgH7SDqb3rL8ZdXJ+wxZyikR2Ljz8m05hTtpSgABlBAWo1Nro4OIK4nQdzvtTqAJfDBdy0g21LrjUZr108RyErOoe67Q7c4bK4rK6B3w+BuUfco64Npnn8i+sPrr/o4b2rC3s8gn+dGSPi1mcGZe189Eg7qxS9tQJbuVmkfKW9dWvn+ZVTw+IDzSMZHlULDWguMm1/42sH9rNd3L666P/D/zeJPu5De9bC5vbmc5uxzbynlqeBUfynv4b/ilNRgZur+mkPND23pAQ5iWr255ikP3WeBtG+0eCvd8UzYD6NLCdIWb8ePf9rmif02eGZw8/UA+D758GCAy9f34kCVCIi07kaJ8MkDyOGZwZFpTrTuXSOX5Iu7IIo+E+5LoRC6YMgCAw/Sy9qH3iMMhHcGxiGaRyfC9gLqQKYAQ+MZnr4Hx6wE0AaIOwI/BBOIhEIMovvYwoNOYvQKCJCG6dxvshzdruM1z58WS0uEEZOismsKu5CNgAAQJsVDMPavGjJWcGHEGBFp2zXQ8qBHNDhRxZPRiafPPgX97nRCCl/C/AieONQXOnjCanjo09rJDcel8wLoUAQiRDwm3ZAGbSz7rM4vGEilP7dFZmvYv5RuPjPRWmL/hRjUar8BrnZ+OLFhw/Tou9yAVZTMxc1x/hAG4CbYkQx1vUc+9WdmFfKeHV8xJEIvVqvPFgY2mJaGCog/a6eCz4f8EIww0de8F+04/1hqhXKFarnbkosNbgC4LhLu7xROmkGUQFwPR9zjVFJCclYJKKtnMKoAMapAIlbY1Q3dSGQ/ehyOwwc28I/Z/q64aTkcXdGXVaXBbMWoi8uoiRU2CPoM8LxJyYADAUdBZxTvFUKVo2AskCl70FGRwQZX/yHmmPY+OD4x94YXdkiXar9rSR5//t5RSyVhTlWv1ya+/Xf3tnQYyyZj/l2IpWSSm4XYr/ivW35c0k3t1pSjaQ6MoCPJIxd9wWle3L9ryE3//uE/kkzoX9taMG+BuqzrSG9T0P/Dks3xlWHkpMYx5QbS3zEFxrzZFJCS6o0ifWUcHvndfenP/IS1F4ymSysAIQEy4JDw6RhKplEvJrlDwvO9gztUCtlyhDQ8XVfKUFfHYnWx+mj7d7Hx8WvKRTYouI0QYLQc/nnkQC5UI7w/cWcVQvDNCuiV2jCQFfGnySCuC9oXU1Nr1TFWbt3s+AH2FppbY1snaiPWLyQ8eB53Dc2Ohzqkbd7aRngY3wwYPLNBud69VuBxFsC8qLS/lkR70PiN8RpNHENfKvji+4d3B3mmP/G29txe1dE7LiwN+TqExxYNL/O0tQY0Mxvys1tDGwIrGdJ6i1Ex5y7gcHLLs7O2b2btVbaq+Dq+bW1qNXd/8iBL0gxfjL2GMr2/vvrXOny+jELU1XEynt/f3LJb9ql0hYlnXtcilRLqrndkufLt3lfsSNd3EpJZXW5V5jEB2TYCOsnuymX/K58Qv/kv7f9KfsKQtfeR572hmz1YsnCZDKZlzqB9+On7us7bxOespKkqS0EqSyv8YLYp2Sj8hgjiRxaHWdMXxwSFKKUKdU7hnrOCmB/1mqxRKYKk4aFBsuCgZiYMS8vIkehzFbllP+n1ADwYE6p/bdclaPMzlHkRZRj5jR5alD2yuwZXhBf9ig7Z+UfaXLzaHAaytAyfFhw5MF4QwRFmkBoD8rS/xmfV773mKE41ZPW/Gs4tnez1fg/hmlkyysflY9ni2qLxx95tQUMhCf0EOgMqQ5H185Wj+IIE8UZBx6z+s/wzrD7bx9g4CHVpWcdSQxbNMlhOnDYDhpm2bgjzJ3lO4LlaViod1owUF/m/I39zRvgHTIj82+K084QVquZzM+3V9DKzreneatqqfDTFfxHo2/s3uW+OpD4LVuBApQ1sNPdvZFRdWrF+CkAwKnxFafSp/Fx3D2dXI1dxCxNSRuzjYx3dIyP2MbSUpbGqHhJ0kAcfgOhNfSwaaf88hoFx8xWspgbKodilA81Tzjf47yBkoWV+neHxYUKisFxw/LjMr+fMjU6irCCmVZBXZps4iiGQB1yW5R7M/lmbtJ3WYAVF+Bgy09o6iUSUdZFZ6phBtXx9AwdVAb2O6jZGP/BcgfcgJkzhVt27ICAk/2trRfLfrJ6+svOtUSV/OlFOcFiNyLrOso7uXPwR76X7euA64Prrusf2BK/lK396Vl+C5wd57q3UrOPMvDUYDZL196bi5rLz/dEGp7XANgs0qNmIkzUceOYzqfT0Wm8YzccQNNF43U6Xd2jDsmLyCH4uyHHXCb/+2H3/E2cibDPL364WFfrTfR96gNKlgeaBPDl+MtUgUlAvSygQMuyFTWM0dhSG2+sabdrIQU7Futqi/eu1OJswEbAvdecJn+xIFi3R2faTG6ewdxxI+MjSY1JiQ3LNbg9frH004JVMmGqKF4QXyGUsFurvGBfS6IgUaQTBlWt/Hhtvbj3TO6/x4vimkTi99W5h8kIpemNn0HZ27963rtHxEphifcI9ohZOv85/VB7/bTlQE2H8uvG4cGL1sCUnJR92bocHfxv19WuA8LV8au/b7AnpgjfFCZVdIPx+Yf53MIr7+EX4vDMtsrxyvn7Kcx0AX+PkJSqkhnlmUWBsmcrCsoMSveYWgbYldXHj7FK9kDjXrCkt+BHyA8p1Pm25v7y1GhG/s41pz/9dqo5Lz9vPVlIFy9CCfG2ALrelBvwLS6yifBvA3LbMVdfWITeHKKyqQwEn7BtQ7IRYWI1VCNKBUm10M00Wc1I7jdZmiBOkB01Ic0yuSvYzwEhDgHigJAFl0zWuYgch3ty9wx1lpqUJHpXOCIYFh0WfSQYEZ4VaZOos4k2QaOgyHfWV5U35sxS/XHvPV5qrz3e5y5/WXxO0MUPPGlMJe/y1vaYc3OTvHaRe85qvd+gxBkXGZLSc+Mob1BxQu3Tw6PbRx0jDp77xYYjc8IuqylAlYwOuz0Es0abhYpIgJrs2HfYNctiYWPlv8srZcI0XqIo0ewDk1evZD+//lgxEcZLFkrmVW5Nkz4YgIzju3QEqyhoOGhYJG7QRJ8/7li9XcZMYMre2ta7XcpMYQY1VjoLrxQdzPUeO7riu/qwaGOC8TtjilH77vXF12VF2hXacqWhuTxBtE+U3AHkpbuZdeI65uPvJFDfNKGiNELJB3wlhGIYLsA9bhVWjHx38F2WbyisYSwVNYYeTkxRD8v49Q1iwhFZHZRUK3CpGmhv9YMqm5QmRzNIO4hxyoA9fIw/Zh+W5yQu7av8Y4DbZcf5PjnGj2ORZnssOC+Stsr1he+7LhgFjP3LQ02teI62XEdoPR8+0kTs1L9rS74AnDc/yCRjMGn7y8dATL7CbncbSZtjCZq1YcMkNbwydMGqtiY3oWxpqlrKcY+E/UKjcS6wDHmPnGcnjYBccu7YGQYGnYTgttNFb8sFludBrCAMhemic6nsYh04FD5ey9gc7i5mzKryimPTijH+mPqyHXrIdNxf7+mqwufk5TlRZ15+X/a6Xq3nnbqsFZkY5hiOS4wsyDXhANZ0iPHsIf/XF6AmBHcaYIMO6+Q4N/YZYO2X2q919szor6KVT/VfUeO2bQN5qZlpE9uYZnN+aTV3XDwa5D+0xhO2fDiRrgeApH/90g80Xkoj5GI2pvBo///7rpYEgNYy0c0iQ+kV2cGaY8TfT7mhJEVK1Hcax+HrFogcMe2y4SGpJYU4nMylD3zuYRz+xU8wVLtG67N7sx4zhgv8LmbNee7dpXPdl7fJS1JDtoGISQBBYgvka16pMnv57mcBy90D7TnKO2afOQMbaOrOv/3racUdKMiqbl8UZVOb6qcyz++qup0zT22QGfH5rKuxelmqupSUSa6YlX7zlZjQutvju8gQ4Q0LvzXUN+j3zZ0cVKW3UVNSd99WQ3CEph/E5Ne6XC4cBWheRFOYNjk6PIxd0e6yo2DZQH6Zzndh7mtfMDgZ6juYmfHsIGyw8cYVSz/obzXI/Y9DxrlfFlIEHNifEu9QQb4Acx0lZBQ//01kmEN7D6KjdjThaYThkBMNGv8mCLSV/1oMa/c2dkPz/IQVVdOXJp7u18p92m/apPCi1COHU9suy2xJpmZTnl608x/urcDTZ9a+G4XG3xW5QswVruHemiO9XPAYVwQGb8jJni3bpq3x8uVnZG0qTWfve/SaL2179gaAPYcZKEDnUA/Vrtr7pmmIMcTnkoxMRiTDlAzy157ml9nt08vFYv82J+Zlcdi/EWLhtkeeYLG6QtZ9824dF8D5vl9VrwNqSe1A8s7qr3xXwAzukvRkWRfcxa6Tv57TR7nJMF5YEpKK21x121JDSuTbLru59Lv3PHPkRT9BuBHTb97to11TOyTw++Uww/P5wF0A9OkTH7LIALJcP+zQfBeVokiC3Kd+Jx7TBGdXpENkVveERQsASfvuv//TeI0pTBeU0sij/XDpdT1QbaPOkadcdXtRCHGAnQutpdDcAQi9bP14igwq77v6L0DHd7t+rfxjD7CCOMvXQ3hwB95u95sBnqG3Sq07/gqH/EiJbacvD9E0bhqCwv/aYS31CnPzdaB3jbQ7hN9+WsMKf7LWahrs6LeobsPQJpOWDKML+0/3wIh7EDAkd6329oDB/ML+8+f7J+7nz3UxizKZb6EAiUfm2vERpbfO8UAp29IP8j8HI03fvLuu+ivffBhw69ifkpAu1rGlZUI9rtVJCq++hk5RAXXEzhWrX7rUJXmNjs0beAbAarjxvfpHtb/Af6U1m6ybUAjZNOY53ju19xUbxoocYCXPx5F2AIDdeT6BejDZ6nazGxYVG30lY0yDSdpCurWO4v3K6npeeP/EHBnFVtu9rKVFKun7p6z/xHv9T5rrwjCEiT7pf+9E/9aIv+pFLr01OvAiMnf+Ibl42pibZ4Do0bxoOhRODlRI08UoeaT9l01slAxoGh4kVChM7fTTG1aosEydqdX//Pchu0OGQ/pB70QnyaSpT1sSffRoLNebRPH3k7pGnKiHmKFZuvRJZUFEnlJljso9qzIrs3MiclUVhHgqA/liS2pEgUGukwenhqbtCk7Nfc1sJvwBgm5qh+1jwvFhe6/uB2pDBmW9OlofYBRaGMUMa6wOMwwnFjMsdF1cOiaw7M4iEok5G3afzc47EVRXqM/X1bGb2J9lGgp1eax6v6agOmHRrxNDCTZyPHVKB9xnEYDOIADBUYAI+AIEoDgCkBkUINZReA5uLM6vyJnUjq86qaGmNsKgzpK+S7dE/RmByQ0RRpc481Pt9Pm0pncp2PvAuMSgX7JBjyzRb2CGqBiyhljc48kF3Tyv/gY5bjWFGcMwbnKFZaAmhsNc2PPqkGGNC6oDsm30PHzUvNwIc4QSTw2uxXxuIKw7haviiF/fjtkV+7sV3Ok/Jds7S9W1jiKeOf7toU8+jNbYOhqDVTWNx8ICVmHtWea0s7D89VI12pKYMqhZllH94RXKXGV2doRZVQbgUmCOyFIqsyoPlJFHfrxHyBzqsGZK4eVRfAZvd38Jfym4jeEQe8Bu9O5YgyYQHxwewlZ7Zc6G+56cMdyjYIvNEPOoGQmdfP8/AyD3GZt7IzvphnQiJ/Ucwnq3ONtX77NVfMTwaW+o+3CbOZzCyy37dGb+Oyk7Mi5mCvPFlTSgkT6qPZsaWrjiALOWeaA1tLAdBYgLYaLt9xpGrMNprjSrC3O549wEe3h7OAh2k3MM5wg3ckw3KOyRt7uCK0V/3un5VA2FzXKrVflJzVWGzsIjyFE2RbUuGf2jegenwVitj2+f3bEt/ydSIJqKeiU+fQKC9dkmxooMsg/9ZesDjmErx/Cg9SXdh7wiw8QA3+en5n8PRq3/rqYYT+Lj2bv4mqb7uONYtzOfLKPHHMd9OrBam3+hX02aSQNCah2/z/8y9rVtX3CDmMXur7A3C0KZN2u+02cq8WPLr0U/0d/65cfw8CQjPtax7XNEtoASGcr4pOaGLuOcsUSAsyabQMg2OmNjd3yJi5gbIPEyV+vXvZHRNZ3ckJTUsFwTgIw2oGm178jZo3Uf+f+okw7OGqcOG2HXqPHwVPUpkA3qfvTbX1ruyXxWXv5MztEG4AFaf7ln5Ef/DdgGT3vO2xMzg7a/jQa++WlgaJ8XFAV59eX3hUJq/9JCAz99MxB9OyJl0X/OUYH6Cl2UNCMiMasIwaUyAADYrBDq1tilrHcE7wAAOcAhQ6TyzRywmE0WTSaJJFdO8o753dFJN9yXhoWmG0LDgp5lZf2Q8UNZ1g9B/jH+GipAGNQ0Vh87ecdE+n3pBt0dP90MCmm1rEiWlzfkhUNxJY+fqh3f/WKP/uxFaUUIiYKy+UeTg7YeRkKdeZ0UQiSB0pnbGUKIOu/pDEUOK3CqB5mjquZbtbEfAhRc9hHM3PlzZ0zbyhpDNSh5/H5zQlZ9xkr9ycxKaG44ksDOMFcrWqsUmWZ2wpGNV/zPhZ4POx96LiS5E8B7DV3iK47ZgwLEh2sRp74NeNFq31fUoGzJC5JQxbHUUuSVNPGv/uOpj4u2t9pxxj/AJSVGGXZMck6JT9PTcXz9PXxp+jmYQoVaK5WPkp5Rg9Hvve7uWPWfP0WyerVnC2yZDbysdbs9J/jHeBx4wIO9NnsQ1nsKDdPTQEmVj1sKviIMX/w7tueeAgsxEfDq5wa8DWGe9sPFWcEUHvejr7oofQY7M37j89K6HTUxDlL61PuB3PQu7FyQ78OD3tVg3t6XuAu3a63EAbsDL3L7XD1OWCBVRG5ORHl2HK4HqOC69KYqUfANnUCdK8bV+4lRdiju5rmD8pwMlpP16YFBmidUzsBXbCbfXZbz1FJfD6vGqi6IiipQW0c1OEhQth+9961OXFwdXxkXVxlf/USDgwRl+yf3u2GiUbTRisCW0cDrLYEV1xfCUf5Ms4Owc+bTCc3OIwnsTHOVorVakcFddgPnfZsAT7yn/XBJZrAXj7O/71Ude69TvHtzqA8PtP+sYml9g39xZrFuyckltVF1N7uX5NeNOEmdf/75seScyXWSp5bUPA8YSK7Rkziz3F+4sxwf7hRXHFvnATd2UJanPxbR8/xrmtp3+85RjG7qzm0n6szPd1INfRcvtD3OMa+8RxC0eAMEpcbklkcf6xo/n/wYWzZK7iSzryzNiQ7Dt6WdxpFfyfVZvLzT2KMtzPcAGMCZCKgn+z8bMmGgd5xI4d8lyY+i5Jm8rnFbuD4EIiGZl03w9yYF+tCz5UQiwX9Ip4hiH/F7hx78tZF2asOh5UWScNPN1N9cfzw96D+00Q2iIVhm3TTly+87/J2MVE8kevuQ5MH+FBIpkJRF4NC4xHAfHkogayuzvSW72OQi6hRakQsaUmJ+/Z/giFy/pd40hUuKlh/acMpI+zqY/o7fEbYiSjfkTyAS5dl0n0CStz8hm5dMIBJ8uC3cayavTzuH/A8e/+nEFJVcxN4lyfau1JIJKM8nnMilcQhZpEASieIfLCf5eBOJ9aTvZIf7+L5Tm6wyGIoG/6/6j0aEvVLTW9r0aRSRwsVEAQpooJOCibPueHoKdQrBcQ7+xIxgPM/u/gtPl8t7mCKxQIVVt+QgOKnmWEsglzJsN5ta6nJSz2J2e2rBsBIdhHeRvhM4hEtj2VZmsjXktQ+cPz0DBp0HDN92OMF0CPdHMBdwTXhdXrC9Pkvu/rkDA5hSeLly+5IsUwr9RL1y2nuYEsg91lKT1HqrCiqUWCjDYMB4Qq1UBucDmzv1CXL6+696SJe8+1I/Rj/njT0K3SikSxW236MO/B76R6i/ZXWlO0uT5oeGfF0Yz3tN+RoPJDpqB2eM2MeS+Nj5Kut5WOi0bOLj/BFJoflJH+vKNJfHA2y6tvb0wzCbkbIjdX0Eh0PZ1B2UdaGCzeILNU9a5ItLy39e1Ufbg0CXC1jIiH0EairIrvbQnPaHlL766P/DwaG9ZzkTYROcb8f/JZeft4187v/X8EQ4XuSA8LM/7Ptsvo0fDZ7Fxti9zNPMXvbYtAv1YlKYXqjm6aykQFb0sQZXMutsEBiFmUMAkNuQn98Z3rAYHqzT+UxWWDH9zM+B6Bz3bWqkmh/Cnlp+mkEtx8nibhqCPOiCV9LDw3g7rh0HtuzDfkKKvtaRkdm5/fKCQgrMgK9Q5Fn128PzjjKvRZmIK3yAu34xgg7C9E385kpu1AFov9/9knWW9eVdd98dxt7TMvjvZY49bupDnAZDxntXNThympf4RMpeF/pOONFF7V1I/zmVfaUW54pkXBM8rx4eLZo+tATpd+VSVoOkXtIpccJnEkhWslcX0UoKJ9EL6t1FtgLPZOj+qgXYdUtC2xcfWMF+/qrPN2VXv/TE4tvvG+2XHUPX47PKwisUzYtrNAuiMSte0liqyAvLydayF3ntvL4sLyY7sLBjsFJ29/mQXjRzDlwkW0kJlCJ7d5F268syUbSaVS9pkDglneAMMK1MNtSnaObOBbOQvOLI1QOibM9URvOqjOYpz+xc7uvx8+p/gOg5019lLE6XbgE0ZM3DF37tcaIF3/8Rkpr95b5tGYmtDIMwXWgVWoYSJpL5BvaP7F1Bu9X4ri8vNgNPjvd4GZRd6IaKDWiXEn169MnFvK5/jf92vQDqHHzNYivMXqIX1z9ijVZi9EU/cr+ExAW7wyq2TS00aoqSVqt71Bbi19+FU4dywnbrKh1N9rlbjheXrgZtz0e+bV5tGXsa/PWfMIlMJgaXUb3FjNAsTmIY2Rsh6WJYuT4957wpJej/HVGrp7yTCle6vmPZwH97C1rfFq8vbDs8kfUB420UoPSWgrb3P8++o/uBpCGGkzQkMkzUE4VEDZFTEeSO4v3U9hrVHcGOMiqB/o0gUXWz1i0GVBAZYc4+BtRluapol8xuM6X4dcBz9qhf6zfYVUKVNvauY1PnRN9Lf+8z1ZOPqn6faa9LC1PXtc/8XvVosvqMt//LvhtOliprl+WUBneq46zTc/klKxBJbG6R0qYaR0BI3+YSRPH7d9+hxoCM3OW86SzP7UH/p5+Kzr+iA0Pf9noxOUP6/Zvoh0NRQw+jv/mdNDP5wuvt0MDov2zURyPDLtw1EVCvvRnlCsyAwr8zM8PIsWMO1zSOtyvgCibs97cNSPSpcTXGrdw3dZmZb1TGTeoF2znb9LxvKmP6M19/NL7J2WqMrYlNhkBcTQF5X5Tz17yINLlRUCQ3KrNVR5+H7CMXxGuoHhhs3QHPcT3wDrCd+ozroe7YBnu4c/C2bTAD1H0cvSP9/VMRWVkRyrL68qQb2WtLT4enk1Kwp/7Z136NI+3/WO7OUKxbn76Tr+uIX+BL++Tr/L7u+P1+lmEtFbGlGk1pbEVLs6Y8utgWkzZvJHSASn7aunxWyRW1fElKy05UU1rGK2PJ299uKoupCFMAIlY7NVGPHdaJa7pk/Od0mLaiNHadbkdNo8y4NH1p8zoQl19+WYj8CCLmd5wOb/E7UHqKYCQ8lMkeGgmEU6WbiS3hpzvmR3grvjb15Evkugpky6O+YjdhIb9IWPKVXvuJTvNAWMy3EFpehlY/8KrQySVglaSZ5gU06eAqI+6/PuEg5fQxGHpxgu9hfwktD77JilR8NSd5yhxzjI1XngYi/bq+3nVRVqBkaK82/uwXZQNKRuzlLv5OH/jr76avwoA1je/4mNel/d/Hwet41r7TeWuJdeDqoc7fsSsvXwBrPyme2sP+7wl4EUlCoyje7pi49Yspq39jrbfJBuVybcxvi7fEHZo9N2VSpYbZ/Ar9cshFlFS/goD/d3gV0CBN+QRpa+gKly1r+mIRX1z3QS7IyFgWtI3SrTEV1mTkd4dvofw/kVEW0W/UA+g+KZ2y0iTtufzGxt3zaQw/dcbVJ5uuxG3xu12Vdkx+a809ZXbMw3/Ey59/llp4r+J6Tgo3K7BcUKPeUklimCVVhB+PiidXf9tpZ57OB0ObAcPAgL85BSBI4idsz/Eiet/zn/KFJCI+vfAn3yn/+75zYvYa/vw9XwDht8wS8XxyYcTospAFjmUg/qSe+HJde8fn/gWc/HO5nDz2vTRdf887/Wh/StqrXKEtT+Tp4y8KWNTU1jy8iNcmKCgQVP+mp9SxZCpfomBPF0bcbg7JcywDCZf1xJed9o7P/Qr888/lcXLZT3W6/gAW2lUV7b0h6aSf/hNQ++DRRkZr0dk9FfppKUUjvlCTaiKPogau4ebO2ibQGLcT3H3r+AGoV9w/WJS/rOtU6aUtSMETf7Ogz2/zmOYvEhcwEl94U0ngf+LMB54eEiD2CNMb9BnI/7FpVUzYSnqm3TYpoQ2Pow4wAkqoCGDsI/AxG8XBGpWAVKAiAopBPDUCRQBAjo6BY+KQOMALvMZKjFS4Vfl4Fg4lon1bVUsMrrPVVDjkBabGxFC8z8VOApUYSFq78cwOAofGhC287dwPAh2kgWfM5le4RvAVZ1BRtB4ZIx2FnKmBFVJZH4HK+QMA9dSFNajUmPWklpWWrM40LJvirQbyvhYEiENhDWp47KEdRAMHpKE1yi5X5597K0sn27KN/qvUSQoA8LoXFEmtQlr4S9B/33lxEdAASHlEX2UAeAA4ssEU2vuBUGoQ8AH5RgBeoJnEUXsdSdA+bGRABaOkQPux+QIFlPGaCvygNwFR9kk++2AAKoMAGyQaAdBBGYnYdpAE7c1GBlxwnBRof2O+wAbmfqOCYGgx0AMHqANVYLF9WAvEoBosXfPtN4EasAi0gXoYbtwECO2RlBVJXrMAdIKq72BEUmhZVZdHxPYGoBDUgQawBLSAqvmiX4nzCaQ4oZgJG6irzI6f+HW8GKiBCkQBQPL8KKlVUalVk2jLYdH2mh1Sow0gGqRZzwKZDkmztRHGHDCh2VKbi36K9nCzmTNrROtUAJDgF3Z0NkQvXlyP/4wXPYQUvoHLw48B0Jj/TDuIB5F1u/qcharGSqtOZyzrpRFvdgEn6zJ8v8IQJeSfmAkQASJCJIgMUQ6C0nTDtGzH9bCw+fHHwYVABQjEwycgJCImISUTRC5YiFBhwikoRVCJFEUtmoZWjFhxMLh4CRIlSZYiFQAEgSFQGByBRKExWByeQCSRKVQanREAYrLYHC6PLxCKxBKpTK5QqtQarU5vMJrMFqvN7nC63B6vDwyBwuAIJAqNweLwBCKJTKHS6Awmi83h8vh5BgiEIrFEKpMrlKH7KkCt0er0BqPJbLHa7A6nyx2pC16fH4RgBMVwgqRohuV4fIFQJJZIZXKFUqXWaHV6g9FktlhtdofT5fZ4fX5AmFDGhVTaWEc6nywp93pjEF+esQ5zxc211BcU3l3bQP0GBbiXA9hus8PXPfpPvt/1UsJdwi78Tl+EZZdHSF5LWXfn9UtrpVXKz2s+r7YVnrwW8xpbb/wSFqSXK3Awx+QOKc7r3/lPJEr2Xmii9t5G2ae8M5IO04xIJQS/w45A+N84Fmmz9Li+XGsjTIsTub6fYtt9Yd4B26Qg/FWuYgAVVm1RGrZ2ghFOaM1HqG2ggDkAC3MgM7ZetybkcL+0Cv0LF9pmXtvKwDhNZU2FU60zdQ9z4TAbDQU4ge+Rw8WPrfMcmIbDVGsmnKbfXJLmYNMEB/eEiSOLwk23fQ05jLl4WY8Qray1Y/ntYG3ghSDGJtwJ78gyzMmCp2SCaIGUy4JVGKArttX27ahK8aupMlJooOHQIghimWEaG5WV/Co50Ja/kzCKBd2c1FxDSZBx6Bj1ELT4kDQUniGjmaczG2uPwk5g/khBQNZ+6cjQ92gO0xsqhbAEye+WcWLzFHc3KJPD1LXtYoG+KxgXLLjZTXwYOHp+h8XYhvQ4/cStuUeokLUtnMaiTazAWuS0DBUycA78yWCYoGR4ZZP2KIREy1oXHgicFMhx7Jgt3Hu9f73MZ5sLnTPXKknmT5aiwwTjEU7Vx6394kwYKFZZo99aJA6SnBTIQZcJgG2iOYEsA/LgjmzKES2ZorolhWDN4CQuJuRsFswnDcUAAZi2TRY7JPXJAYgZ+rwVJO3T4yAk0pyCAGwjaFvwZo0PWAJpnAVMR/IKkLFD3rrE4CXkkh7ZdmWq3JjRmQOLM4eFIcU3V4kDVT6REKckYXPGANSPBMWlNOQYjkIawhCXnuM5prZCQwfdXgqfZidhGfJpYOqTA/Y0500ZB4LQReO8YZ6mjq2e6QIdzdGLzR8ziEWSLVQd2NoiYGkRGaMXLCt0oq7fOWoCTc11KgkMttjj0jFJ6zIc7BafifCk0pZOhSbraAopcEpG4/kOwyNmF39Mt5ppTW7jRoB8WgPkOc51rC8oKZl62iKAamlu4DmuBkvCcCtjwcMLAlVzR32t10CwTyM6AbagGllb48gU5ACDzUmBCyJqxlxs8U4XAyTcTtjWMNGdH9GuwTBmjyI3YJFEgrovcQDR5kFZ0NMkmgTDZclc183uTcoBDNAaimIE2Cwu9OXklBGRkNvItMU7zXTlX5Zz/V8YIO2iK//xMnpu22WBNXRyG9vGQuJ0mGsc26/Aag5YQelZZs5Bi2ubsxHV/DzGXRt3P3KTOvQ4HG8aKpm9OyoHnIgzG/GkIEerHqEBaYCQ8UJPWbg8/vNFDyFvqkhIe6O6l0WordG9pHAAyyTWbhCGHCtBD7vDjzljqRT4+8E2POgLpACHDw+E5jqrtyanHw0AAA==) format("woff2"),url(//at.alicdn.com/t/c/font_2553510_ciljc7axaw7.woff?t=1705587463221) format("woff")}.van-icon__image{display:block;width:1em;height:1em;-o-object-fit:contain;object-fit:contain}:root,:host{--van-skeleton-image-size: 96px;--van-skeleton-image-radius: 24px}.van-skeleton-image{display:flex;width:var(--van-skeleton-image-size);height:var(--van-skeleton-image-size);align-items:center;justify-content:center;background:var(--van-active-color)}.van-skeleton-image--round{border-radius:var(--van-skeleton-image-radius)}.van-skeleton-image__icon{width:calc(var(--van-skeleton-image-size) / 2);height:calc(var(--van-skeleton-image-size) / 2);font-size:calc(var(--van-skeleton-image-size) / 2);color:var(--van-gray-5)}:root,:host{--van-rate-icon-size: 20px;--van-rate-icon-gutter: var(--van-padding-base);--van-rate-icon-void-color: var(--van-gray-5);--van-rate-icon-full-color: var(--van-danger-color);--van-rate-icon-disabled-color: var(--van-gray-5)}.van-rate{display:inline-flex;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-wrap:wrap}.van-rate__item{position:relative}.van-rate__item:not(:last-child){padding-right:var(--van-rate-icon-gutter)}.van-rate__icon{display:block;width:1em;color:var(--van-rate-icon-void-color);font-size:var(--van-rate-icon-size)}.van-rate__icon--half{position:absolute;top:0;left:0;overflow:hidden;pointer-events:none}.van-rate__icon--full{color:var(--van-rate-icon-full-color)}.van-rate__icon--disabled{color:var(--van-rate-icon-disabled-color)}.van-rate--disabled{cursor:not-allowed}.van-rate--readonly{cursor:default}:root,:host{--van-notice-bar-height: 40px;--van-notice-bar-padding: 0 var(--van-padding-md);--van-notice-bar-wrapable-padding: var(--van-padding-xs) var(--van-padding-md);--van-notice-bar-text-color: var(--van-orange-dark);--van-notice-bar-font-size: var(--van-font-size-md);--van-notice-bar-line-height: 24px;--van-notice-bar-background: var(--van-orange-light);--van-notice-bar-icon-size: 16px;--van-notice-bar-icon-min-width: 24px}.van-notice-bar{position:relative;display:flex;align-items:center;height:var(--van-notice-bar-height);padding:var(--van-notice-bar-padding);color:var(--van-notice-bar-text-color);font-size:var(--van-notice-bar-font-size);line-height:var(--van-notice-bar-line-height);background:var(--van-notice-bar-background)}.van-notice-bar__left-icon,.van-notice-bar__right-icon{min-width:var(--van-notice-bar-icon-min-width);font-size:var(--van-notice-bar-icon-size)}.van-notice-bar__right-icon{text-align:right;cursor:pointer}.van-notice-bar__wrap{position:relative;display:flex;flex:1;align-items:center;height:100%;overflow:hidden}.van-notice-bar__content{position:absolute;white-space:nowrap;transition-timing-function:linear}.van-notice-bar__content.van-ellipsis{max-width:100%}.van-notice-bar--wrapable{height:auto;padding:var(--van-notice-bar-wrapable-padding)}.van-notice-bar--wrapable .van-notice-bar__wrap{height:auto}.van-notice-bar--wrapable .van-notice-bar__content{position:relative;white-space:normal;word-wrap:break-word}:root,:host{--van-nav-bar-height: 46px;--van-nav-bar-background: var(--van-background-2);--van-nav-bar-arrow-size: 16px;--van-nav-bar-icon-color: var(--van-primary-color);--van-nav-bar-text-color: var(--van-primary-color);--van-nav-bar-title-font-size: var(--van-font-size-lg);--van-nav-bar-title-text-color: var(--van-text-color);--van-nav-bar-z-index: 1;--van-nav-bar-disabled-opacity: var(--van-disabled-opacity)}.van-nav-bar{position:relative;z-index:var(--van-nav-bar-z-index);line-height:var(--van-line-height-lg);text-align:center;background:var(--van-nav-bar-background);-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-nav-bar--fixed{position:fixed;top:0;left:0;width:100%}.van-nav-bar--safe-area-inset-top{padding-top:constant(safe-area-inset-top);padding-top:env(safe-area-inset-top)}.van-nav-bar .van-icon{color:var(--van-nav-bar-icon-color)}.van-nav-bar__content{position:relative;display:flex;align-items:center;height:var(--van-nav-bar-height)}.van-nav-bar__arrow{margin-right:var(--van-padding-base);font-size:var(--van-nav-bar-arrow-size)}.van-nav-bar__title{max-width:60%;margin:0 auto;color:var(--van-nav-bar-title-text-color);font-weight:var(--van-font-bold);font-size:var(--van-nav-bar-title-font-size)}.van-nav-bar__left,.van-nav-bar__right{position:absolute;top:0;bottom:0;display:flex;align-items:center;padding:0 var(--van-padding-md);font-size:var(--van-font-size-md)}.van-nav-bar__left--disabled,.van-nav-bar__right--disabled{cursor:not-allowed;opacity:var(--van-nav-bar-disabled-opacity)}.van-nav-bar__left{left:0}.van-nav-bar__right{right:0}.van-nav-bar__text{color:var(--van-nav-bar-text-color)}:root,:host{--van-floating-bubble-size: 48px;--van-floating-bubble-initial-gap: 24px;--van-floating-bubble-icon-size: 28px;--van-floating-bubble-background: var(--van-primary-color);--van-floating-bubble-color: var(--van-background-2);--van-floating-bubble-z-index: 999;--van-floating-bubble-border-radius: var(--van-radius-max)}.van-floating-bubble{position:fixed;left:0;top:0;right:var(--van-floating-bubble-initial-gap);bottom:var(--van-floating-bubble-initial-gap);width:var(--van-floating-bubble-size);height:var(--van-floating-bubble-size);box-sizing:border-box;display:flex;justify-content:center;align-items:center;overflow:hidden;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;touch-action:none;background:var(--van-floating-bubble-background);color:var(--van-floating-bubble-color);border-radius:var(--van-floating-bubble-border-radius);z-index:var(--van-floating-bubble-z-index);transition:transform var(--van-duration-base)}.van-floating-bubble:active{opacity:.8}.van-floating-bubble__icon{font-size:var(--van-floating-bubble-icon-size)}:root,:host{--van-image-placeholder-text-color: var(--van-text-color-2);--van-image-placeholder-font-size: var(--van-font-size-md);--van-image-placeholder-background: var(--van-background);--van-image-loading-icon-size: 32px;--van-image-loading-icon-color: var(--van-gray-4);--van-image-error-icon-size: 32px;--van-image-error-icon-color: var(--van-gray-4)}.van-image{position:relative;display:inline-block}.van-image--round{overflow:hidden;border-radius:var(--van-radius-max)}.van-image--round .van-image__img{border-radius:inherit}.van-image--block{display:block}.van-image__img,.van-image__error,.van-image__loading{display:block;width:100%;height:100%}.van-image__error,.van-image__loading{position:absolute;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--van-image-placeholder-text-color);font-size:var(--van-image-placeholder-font-size);background:var(--van-image-placeholder-background)}.van-image__loading-icon{color:var(--van-image-loading-icon-color);font-size:var(--van-image-loading-icon-size)}.van-image__error-icon{color:var(--van-image-error-icon-color);font-size:var(--van-image-error-icon-size)}:root,:host{--van-back-top-size: 40px;--van-back-top-right: 30px;--van-back-top-bottom: 40px;--van-back-top-z-index: 100;--van-back-top-icon-size: 20px;--van-back-top-text-color: #fff;--van-back-top-background: var(--van-blue)}.van-back-top{position:fixed;display:flex;align-items:center;justify-content:center;width:var(--van-back-top-size);height:var(--van-back-top-size);right:var(--van-back-top-right);bottom:var(--van-back-top-bottom);z-index:var(--van-back-top-z-index);cursor:pointer;color:var(--van-back-top-text-color);border-radius:var(--van-radius-max);box-shadow:0 2px 8px #0000001f;transform:scale(0);transition:var(--van-duration-base) cubic-bezier(.25,.8,.5,1);background-color:var(--van-back-top-background)}.van-back-top:active{opacity:var(--van-active-opacity)}.van-back-top__placeholder{display:none}.van-back-top--active{transform:scale(1)}.van-back-top__icon{font-size:var(--van-back-top-icon-size);font-weight:var(--van-font-bold)}:root,:host{--van-tag-padding: 0 var(--van-padding-base);--van-tag-text-color: var(--van-white);--van-tag-font-size: var(--van-font-size-sm);--van-tag-radius: 2px;--van-tag-line-height: 16px;--van-tag-medium-padding: 2px 6px;--van-tag-large-padding: var(--van-padding-base) var(--van-padding-xs);--van-tag-large-radius: var(--van-radius-md);--van-tag-large-font-size: var(--van-font-size-md);--van-tag-round-radius: var(--van-radius-max);--van-tag-danger-color: var(--van-danger-color);--van-tag-primary-color: var(--van-primary-color);--van-tag-success-color: var(--van-success-color);--van-tag-warning-color: var(--van-warning-color);--van-tag-default-color: var(--van-gray-6);--van-tag-plain-background: var(--van-background-2)}.van-tag{position:relative;display:inline-flex;align-items:center;padding:var(--van-tag-padding);color:var(--van-tag-text-color);font-size:var(--van-tag-font-size);line-height:var(--van-tag-line-height);border-radius:var(--van-tag-radius)}.van-tag--default{background:var(--van-tag-default-color)}.van-tag--default.van-tag--plain{color:var(--van-tag-default-color)}.van-tag--danger{background:var(--van-tag-danger-color)}.van-tag--danger.van-tag--plain{color:var(--van-tag-danger-color)}.van-tag--primary{background:var(--van-tag-primary-color)}.van-tag--primary.van-tag--plain{color:var(--van-tag-primary-color)}.van-tag--success{background:var(--van-tag-success-color)}.van-tag--success.van-tag--plain{color:var(--van-tag-success-color)}.van-tag--warning{background:var(--van-tag-warning-color)}.van-tag--warning.van-tag--plain{color:var(--van-tag-warning-color)}.van-tag--plain{background:var(--van-tag-plain-background);border-color:currentColor}.van-tag--plain:before{position:absolute;top:0;right:0;bottom:0;left:0;border:1px solid;border-color:inherit;border-radius:inherit;content:"";pointer-events:none}.van-tag--medium{padding:var(--van-tag-medium-padding)}.van-tag--large{padding:var(--van-tag-large-padding);font-size:var(--van-tag-large-font-size);border-radius:var(--van-tag-large-radius)}.van-tag--mark{border-radius:0 var(--van-tag-round-radius) var(--van-tag-round-radius) 0}.van-tag--mark:after{display:block;width:2px;content:""}.van-tag--round{border-radius:var(--van-tag-round-radius)}.van-tag__close{margin-left:2px}:root,:host{--van-card-padding: var(--van-padding-xs) var(--van-padding-md);--van-card-font-size: var(--van-font-size-sm);--van-card-text-color: var(--van-text-color);--van-card-background: var(--van-background);--van-card-thumb-size: 88px;--van-card-thumb-radius: var(--van-radius-lg);--van-card-title-line-height: 16px;--van-card-desc-color: var(--van-text-color-2);--van-card-desc-line-height: var(--van-line-height-md);--van-card-price-color: var(--van-text-color);--van-card-origin-price-color: var(--van-text-color-2);--van-card-num-color: var(--van-text-color-2);--van-card-origin-price-font-size: var(--van-font-size-xs);--van-card-price-font-size: var(--van-font-size-sm);--van-card-price-integer-font-size: var(--van-font-size-lg);--van-card-price-font: var(--van-price-font)}.van-card{position:relative;box-sizing:border-box;padding:var(--van-card-padding);color:var(--van-card-text-color);font-size:var(--van-card-font-size);background:var(--van-card-background)}.van-card:not(:first-child){margin-top:var(--van-padding-xs)}.van-card__header{display:flex}.van-card__thumb{position:relative;flex:none;width:var(--van-card-thumb-size);height:var(--van-card-thumb-size);margin-right:var(--van-padding-xs)}.van-card__thumb img{border-radius:var(--van-card-thumb-radius)}.van-card__content{position:relative;display:flex;flex:1;flex-direction:column;justify-content:space-between;min-width:0;min-height:var(--van-card-thumb-size)}.van-card__content--centered{justify-content:center}.van-card__title,.van-card__desc{word-wrap:break-word}.van-card__title{max-height:32px;font-weight:var(--van-font-bold);line-height:var(--van-card-title-line-height)}.van-card__desc{max-height:var(--van-card-desc-line-height);color:var(--van-card-desc-color);line-height:var(--van-card-desc-line-height)}.van-card__bottom{line-height:var(--van-line-height-md)}.van-card__price{display:inline-block;color:var(--van-card-price-color);font-weight:var(--van-font-bold);font-size:var(--van-card-price-font-size)}.van-card__price-integer{font-size:var(--van-card-price-integer-font-size);font-family:var(--van-card-price-font)}.van-card__price-decimal{font-family:var(--van-card-price-font)}.van-card__origin-price{display:inline-block;margin-left:5px;color:var(--van-card-origin-price-color);font-size:var(--van-card-origin-price-font-size);text-decoration:line-through}.van-card__num{float:right;color:var(--van-card-num-color)}.van-card__tag{position:absolute;top:2px;left:0}.van-card__footer{flex:none;text-align:right}.van-card__footer .van-button{margin-left:5px}:root,:host{--van-cell-font-size: var(--van-font-size-md);--van-cell-line-height: 24px;--van-cell-vertical-padding: 10px;--van-cell-horizontal-padding: var(--van-padding-md);--van-cell-text-color: var(--van-text-color);--van-cell-background: var(--van-background-2);--van-cell-border-color: var(--van-border-color);--van-cell-active-color: var(--van-active-color);--van-cell-required-color: var(--van-danger-color);--van-cell-label-color: var(--van-text-color-2);--van-cell-label-font-size: var(--van-font-size-sm);--van-cell-label-line-height: var(--van-line-height-sm);--van-cell-label-margin-top: var(--van-padding-base);--van-cell-value-color: var(--van-text-color-2);--van-cell-value-font-size: inherit;--van-cell-icon-size: 16px;--van-cell-right-icon-color: var(--van-gray-6);--van-cell-large-vertical-padding: var(--van-padding-sm);--van-cell-large-title-font-size: var(--van-font-size-lg);--van-cell-large-label-font-size: var(--van-font-size-md);--van-cell-large-value-font-size: inherit}.van-cell{position:relative;display:flex;box-sizing:border-box;width:100%;padding:var(--van-cell-vertical-padding) var(--van-cell-horizontal-padding);overflow:hidden;color:var(--van-cell-text-color);font-size:var(--van-cell-font-size);line-height:var(--van-cell-line-height);background:var(--van-cell-background)}.van-cell:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:var(--van-padding-md);bottom:0;left:var(--van-padding-md);border-bottom:1px solid var(--van-cell-border-color);transform:scaleY(.5)}.van-cell:last-child:after,.van-cell--borderless:after{display:none}.van-cell__label{margin-top:var(--van-cell-label-margin-top);color:var(--van-cell-label-color);font-size:var(--van-cell-label-font-size);line-height:var(--van-cell-label-line-height)}.van-cell__title,.van-cell__value{flex:1}.van-cell__value{position:relative;overflow:hidden;color:var(--van-cell-value-color);font-size:var(--van-cell-value-font-size);text-align:right;vertical-align:middle;word-wrap:break-word}.van-cell__left-icon,.van-cell__right-icon{height:var(--van-cell-line-height);font-size:var(--van-cell-icon-size);line-height:var(--van-cell-line-height)}.van-cell__left-icon{margin-right:var(--van-padding-base)}.van-cell__right-icon{margin-left:var(--van-padding-base);color:var(--van-cell-right-icon-color)}.van-cell--clickable{cursor:pointer}.van-cell--clickable:active{background-color:var(--van-cell-active-color)}.van-cell--required{overflow:visible}.van-cell--required:before{position:absolute;left:var(--van-padding-xs);color:var(--van-cell-required-color);font-size:var(--van-cell-font-size);content:"*"}.van-cell--center{align-items:center}.van-cell--large{padding-top:var(--van-cell-large-vertical-padding);padding-bottom:var(--van-cell-large-vertical-padding)}.van-cell--large .van-cell__title{font-size:var(--van-cell-large-title-font-size)}.van-cell--large .van-cell__label{font-size:var(--van-cell-large-label-font-size)}.van-cell--large .van-cell__value{font-size:var(--van-cell-large-value-font-size)}:root,:host{--van-coupon-cell-selected-text-color: var(--van-text-color)}.van-coupon-cell__value--selected{color:var(--van-coupon-cell-selected-text-color)}:root,:host{--van-contact-card-padding: var(--van-padding-md);--van-contact-card-add-icon-size: 40px;--van-contact-card-add-icon-color: var(--van-primary-color);--van-contact-card-title-line-height: var(--van-line-height-md)}.van-contact-card{padding:var(--van-contact-card-padding)}.van-contact-card__title{margin-left:5px;line-height:var(--van-contact-card-title-line-height)}.van-contact-card--add .van-contact-card__value{line-height:var(--van-contact-card-add-icon-size)}.van-contact-card--add .van-cell__left-icon{color:var(--van-contact-card-add-icon-color);font-size:var(--van-contact-card-add-icon-size)}.van-contact-card:before{position:absolute;right:0;bottom:0;left:0;height:2px;background:repeating-linear-gradient(-45deg,var(--van-warning-color) 0,var(--van-warning-color) 20%,transparent 0,transparent 25%,var(--van-primary-color) 0,var(--van-primary-color) 45%,transparent 0,transparent 50%);background-size:80px;content:""}:root,:host{--van-collapse-item-duration: var(--van-duration-base);--van-collapse-item-content-padding: var(--van-padding-sm) var(--van-padding-md);--van-collapse-item-content-font-size: var(--van-font-size-md);--van-collapse-item-content-line-height: 1.5;--van-collapse-item-content-text-color: var(--van-text-color-2);--van-collapse-item-content-background: var(--van-background-2);--van-collapse-item-title-disabled-color: var(--van-text-color-3)}.van-collapse-item{position:relative}.van-collapse-item--border:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:0;right:var(--van-padding-md);left:var(--van-padding-md);border-top:1px solid var(--van-border-color);transform:scaleY(.5)}.van-collapse-item__title .van-cell__right-icon:before{transform:rotate(90deg) translateZ(0);transition:transform var(--van-collapse-item-duration)}.van-collapse-item__title:after{right:var(--van-padding-md);display:none}.van-collapse-item__title--expanded .van-cell__right-icon:before{transform:rotate(-90deg)}.van-collapse-item__title--expanded:after{display:block}.van-collapse-item__title--borderless:after{display:none}.van-collapse-item__title--disabled{cursor:not-allowed}.van-collapse-item__title--disabled,.van-collapse-item__title--disabled .van-cell__right-icon{color:var(--van-collapse-item-title-disabled-color)}.van-collapse-item__wrapper{overflow:hidden;transition:height var(--van-collapse-item-duration) ease-in-out;will-change:height}.van-collapse-item__content{padding:var(--van-collapse-item-content-padding);color:var(--van-collapse-item-content-text-color);font-size:var(--van-collapse-item-content-font-size);line-height:var(--van-collapse-item-content-line-height);background:var(--van-collapse-item-content-background)}:root,:host{--van-field-label-width: 6.2em;--van-field-label-color: var(--van-text-color);--van-field-label-margin-right: var(--van-padding-sm);--van-field-input-text-color: var(--van-text-color);--van-field-input-error-text-color: var(--van-danger-color);--van-field-input-disabled-text-color: var(--van-text-color-3);--van-field-placeholder-text-color: var(--van-text-color-3);--van-field-icon-size: 18px;--van-field-clear-icon-size: 18px;--van-field-clear-icon-color: var(--van-gray-5);--van-field-right-icon-color: var(--van-gray-6);--van-field-error-message-color: var(--van-danger-color);--van-field-error-message-font-size: 12px;--van-field-text-area-min-height: 60px;--van-field-word-limit-color: var(--van-gray-7);--van-field-word-limit-font-size: var(--van-font-size-sm);--van-field-word-limit-line-height: 16px;--van-field-disabled-text-color: var(--van-text-color-3);--van-field-required-mark-color: var(--van-red)}.van-field{flex-wrap:wrap}.van-field__label{flex:none;box-sizing:border-box;width:var(--van-field-label-width);margin-right:var(--van-field-label-margin-right);color:var(--van-field-label-color);text-align:left;word-wrap:break-word}.van-field__label--center{text-align:center}.van-field__label--right{text-align:right}.van-field__label--top{display:flex;width:100%;text-align:left;margin-bottom:var(--van-padding-base);overflow-wrap:break-word}.van-field__label--required:before{margin-right:2px;color:var(--van-field-required-mark-color);content:"*"}.van-field--disabled .van-field__label{color:var(--van-field-disabled-text-color)}.van-field__value{overflow:visible}.van-field__body{display:flex;align-items:center}.van-field__control{display:block;box-sizing:border-box;width:100%;min-width:0;margin:0;padding:0;color:var(--van-field-input-text-color);line-height:inherit;text-align:left;background-color:transparent;border:0;resize:none;-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.van-field__control::-moz-placeholder{color:var(--van-field-placeholder-text-color)}.van-field__control::placeholder{color:var(--van-field-placeholder-text-color)}.van-field__control:-moz-read-only{cursor:default}.van-field__control:read-only{cursor:default}.van-field__control:disabled{color:var(--van-field-input-disabled-text-color);cursor:not-allowed;opacity:1;-webkit-text-fill-color:var(--van-field-input-disabled-text-color)}.van-field__control--center{justify-content:center;text-align:center}.van-field__control--right{justify-content:flex-end;text-align:right}.van-field__control--custom{display:flex;align-items:center;min-height:var(--van-cell-line-height)}.van-field__control--error::-moz-placeholder{color:var(--van-field-input-error-text-color);-webkit-text-fill-color:currentColor}.van-field__control--error,.van-field__control--error::placeholder{color:var(--van-field-input-error-text-color);-webkit-text-fill-color:currentColor}.van-field__control--min-height{min-height:var(--van-field-text-area-min-height)}.van-field__control[type=date],.van-field__control[type=time],.van-field__control[type=datetime-local]{min-height:var(--van-cell-line-height)}.van-field__control[type=search]{-webkit-appearance:none}.van-field__clear,.van-field__icon,.van-field__button,.van-field__right-icon{flex-shrink:0}.van-field__clear,.van-field__right-icon{margin-right:calc(var(--van-padding-xs) * -1);padding:0 var(--van-padding-xs);line-height:inherit}.van-field__clear{color:var(--van-field-clear-icon-color);font-size:var(--van-field-clear-icon-size);cursor:pointer}.van-field__left-icon .van-icon,.van-field__right-icon .van-icon{display:block;font-size:var(--van-field-icon-size);line-height:inherit}.van-field__left-icon{margin-right:var(--van-padding-base)}.van-field__right-icon{color:var(--van-field-right-icon-color)}.van-field__button{padding-left:var(--van-padding-xs)}.van-field__error-message{color:var(--van-field-error-message-color);font-size:var(--van-field-error-message-font-size);text-align:left}.van-field__error-message--center{text-align:center}.van-field__error-message--right{text-align:right}.van-field__word-limit{margin-top:var(--van-padding-base);color:var(--van-field-word-limit-color);font-size:var(--van-field-word-limit-font-size);line-height:var(--van-field-word-limit-line-height);text-align:right}:root,:host{--van-search-padding: 10px var(--van-padding-sm);--van-search-background: var(--van-background-2);--van-search-content-background: var(--van-background);--van-search-input-height: 34px;--van-search-label-padding: 0 5px;--van-search-label-color: var(--van-text-color);--van-search-label-font-size: var(--van-font-size-md);--van-search-left-icon-color: var(--van-gray-6);--van-search-action-padding: 0 var(--van-padding-xs);--van-search-action-text-color: var(--van-text-color);--van-search-action-font-size: var(--van-font-size-md)}.van-search{display:flex;align-items:center;box-sizing:border-box;padding:var(--van-search-padding);background:var(--van-search-background)}.van-search__content{display:flex;flex:1;padding-left:var(--van-padding-sm);background:var(--van-search-content-background);border-radius:var(--van-radius-sm)}.van-search__content--round{border-radius:var(--van-radius-max)}.van-search__label{padding:var(--van-search-label-padding);color:var(--van-search-label-color);font-size:var(--van-search-label-font-size);line-height:var(--van-search-input-height)}.van-search__field{flex:1;align-items:center;padding:0 var(--van-padding-xs) 0 0;height:var(--van-search-input-height);background-color:transparent}.van-search__field .van-field__left-icon{color:var(--van-search-left-icon-color)}.van-search__field--with-message{height:auto;align-items:flex-start;padding-top:5px;padding-bottom:5px}.van-search--show-action{padding-right:0}.van-search input::-webkit-search-decoration,.van-search input::-webkit-search-cancel-button,.van-search input::-webkit-search-results-button,.van-search input::-webkit-search-results-decoration{display:none}.van-search__action{padding:var(--van-search-action-padding);color:var(--van-search-action-text-color);font-size:var(--van-search-action-font-size);line-height:var(--van-search-input-height);cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-search__action:active{background-color:var(--van-active-color)}:root,:host{--van-action-bar-icon-width: 48px;--van-action-bar-icon-height: 100%;--van-action-bar-icon-color: var(--van-text-color);--van-action-bar-icon-size: 18px;--van-action-bar-icon-font-size: var(--van-font-size-xs);--van-action-bar-icon-active-color: var(--van-active-color);--van-action-bar-icon-text-color: var(--van-text-color);--van-action-bar-icon-background: var(--van-background-2)}.van-action-bar-icon{display:flex;flex-direction:column;justify-content:center;min-width:var(--van-action-bar-icon-width);height:var(--van-action-bar-icon-height);color:var(--van-action-bar-icon-text-color);font-size:var(--van-action-bar-icon-font-size);line-height:1;text-align:center;background:var(--van-action-bar-icon-background);cursor:pointer}.van-action-bar-icon:active{background-color:var(--van-action-bar-icon-active-color)}.van-action-bar-icon--disabled{color:var(--van-text-color-3);cursor:not-allowed}.van-action-bar-icon--disabled:active{background-color:transparent}.van-action-bar-icon--disabled .van-action-bar-icon__icon{color:var(--van-text-color-3)}.van-action-bar-icon__icon{margin:0 auto var(--van-padding-base);color:var(--van-action-bar-icon-color);font-size:var(--van-action-bar-icon-size)}:root,:host{--van-loading-text-color: var(--van-text-color-2);--van-loading-text-font-size: var(--van-font-size-md);--van-loading-spinner-color: var(--van-gray-5);--van-loading-spinner-size: 30px;--van-loading-spinner-duration: .8s}.van-loading{position:relative;color:var(--van-loading-spinner-color);font-size:0;vertical-align:middle}.van-loading__spinner{position:relative;display:inline-block;width:var(--van-loading-spinner-size);max-width:100%;height:var(--van-loading-spinner-size);max-height:100%;vertical-align:middle;animation:van-rotate var(--van-loading-spinner-duration) linear infinite}.van-loading__spinner--spinner{animation-timing-function:steps(12)}.van-loading__spinner--circular{animation-duration:2s}.van-loading__line{position:absolute;top:0;left:0;width:100%;height:100%}.van-loading__line:before{display:block;width:2px;height:25%;margin:0 auto;background-color:currentColor;border-radius:40%;content:" "}.van-loading__circular{display:block;width:100%;height:100%}.van-loading__circular circle{animation:van-circular 1.5s ease-in-out infinite;stroke:currentColor;stroke-width:3;stroke-linecap:round}.van-loading__text{display:inline-block;margin-left:var(--van-padding-xs);color:var(--van-loading-text-color);font-size:var(--van-loading-text-font-size);vertical-align:middle}.van-loading--vertical{display:flex;flex-direction:column;align-items:center}.van-loading--vertical .van-loading__text{margin:var(--van-padding-xs) 0 0}@keyframes van-circular{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-40}to{stroke-dasharray:90,150;stroke-dashoffset:-120}}.van-loading__line--1{transform:rotate(30deg);opacity:1}.van-loading__line--2{transform:rotate(60deg);opacity:.9375}.van-loading__line--3{transform:rotate(90deg);opacity:.875}.van-loading__line--4{transform:rotate(120deg);opacity:.8125}.van-loading__line--5{transform:rotate(150deg);opacity:.75}.van-loading__line--6{transform:rotate(180deg);opacity:.6875}.van-loading__line--7{transform:rotate(210deg);opacity:.625}.van-loading__line--8{transform:rotate(240deg);opacity:.5625}.van-loading__line--9{transform:rotate(270deg);opacity:.5}.van-loading__line--10{transform:rotate(300deg);opacity:.4375}.van-loading__line--11{transform:rotate(330deg);opacity:.375}.van-loading__line--12{transform:rotate(360deg);opacity:.3125}:root,:host{--van-pull-refresh-head-height: 50px;--van-pull-refresh-head-font-size: var(--van-font-size-md);--van-pull-refresh-head-text-color: var(--van-text-color-2);--van-pull-refresh-loading-icon-size: 16px}.van-pull-refresh{overflow:hidden}.van-pull-refresh__track{position:relative;height:100%;transition-property:transform}.van-pull-refresh__head{position:absolute;left:0;width:100%;height:var(--van-pull-refresh-head-height);overflow:hidden;color:var(--van-pull-refresh-head-text-color);font-size:var(--van-pull-refresh-head-font-size);line-height:var(--van-pull-refresh-head-height);text-align:center;transform:translateY(-100%)}.van-pull-refresh__loading .van-loading__spinner{width:var(--van-pull-refresh-loading-icon-size);height:var(--van-pull-refresh-loading-icon-size)}:root,:host{--van-number-keyboard-background: var(--van-gray-2);--van-number-keyboard-key-height: 48px;--van-number-keyboard-key-font-size: 28px;--van-number-keyboard-key-active-color: var(--van-gray-3);--van-number-keyboard-key-background: var(--van-background-2);--van-number-keyboard-delete-font-size: var(--van-font-size-lg);--van-number-keyboard-title-color: var(--van-gray-7);--van-number-keyboard-title-height: 34px;--van-number-keyboard-title-font-size: var(--van-font-size-lg);--van-number-keyboard-close-padding: 0 var(--van-padding-md);--van-number-keyboard-close-color: var(--van-primary-color);--van-number-keyboard-close-font-size: var(--van-font-size-md);--van-number-keyboard-button-text-color: var(--van-white);--van-number-keyboard-button-background: var(--van-primary-color);--van-number-keyboard-z-index: 100}.van-theme-dark{--van-number-keyboard-background: var(--van-gray-8);--van-number-keyboard-key-background: var(--van-gray-7);--van-number-keyboard-key-active-color: var(--van-gray-6)}.van-number-keyboard{position:fixed;bottom:0;left:0;z-index:var(--van-number-keyboard-z-index);width:100%;padding-bottom:22px;background:var(--van-number-keyboard-background);-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-number-keyboard--with-title{border-radius:20px 20px 0 0}.van-number-keyboard__header{position:relative;display:flex;align-items:center;justify-content:center;box-sizing:content-box;height:var(--van-number-keyboard-title-height);padding-top:6px;color:var(--van-number-keyboard-title-color);font-size:var(--van-number-keyboard-title-font-size)}.van-number-keyboard__title{display:inline-block;font-weight:400}.van-number-keyboard__title-left{position:absolute;left:0}.van-number-keyboard__body{display:flex;padding:6px 0 0 6px}.van-number-keyboard__keys{display:flex;flex:3;flex-wrap:wrap}.van-number-keyboard__close{position:absolute;right:0;height:100%;padding:var(--van-number-keyboard-close-padding);color:var(--van-number-keyboard-close-color);font-size:var(--van-number-keyboard-close-font-size);background-color:transparent;border:none}.van-number-keyboard__sidebar{display:flex;flex:1;flex-direction:column}.van-number-keyboard--unfit{padding-bottom:0}.van-key{display:flex;align-items:center;justify-content:center;height:var(--van-number-keyboard-key-height);font-size:var(--van-number-keyboard-key-font-size);line-height:1.5;background:var(--van-number-keyboard-key-background);border-radius:var(--van-radius-lg);cursor:pointer}.van-key--large{position:absolute;top:0;right:6px;bottom:6px;left:0;height:auto}.van-key--blue,.van-key--delete{font-size:var(--van-number-keyboard-delete-font-size)}.van-key--active{background-color:var(--van-number-keyboard-key-active-color)}.van-key--blue{color:var(--van-number-keyboard-button-text-color);background:var(--van-number-keyboard-button-background)}.van-key--blue.van-key--active{opacity:var(--van-active-opacity)}.van-key__wrapper{position:relative;flex:1;flex-basis:33%;box-sizing:border-box;padding:0 6px 6px 0}.van-key__wrapper--wider{flex-basis:66%}.van-key__delete-icon{width:32px;height:22px}.van-key__collapse-icon{width:30px;height:24px}.van-key__loading-icon{color:var(--van-number-keyboard-button-text-color)}:root,:host{--van-list-text-color: var(--van-text-color-2);--van-list-text-font-size: var(--van-font-size-md);--van-list-text-line-height: 50px;--van-list-loading-icon-size: 16px}.van-list__loading,.van-list__finished-text,.van-list__error-text{color:var(--van-list-text-color);font-size:var(--van-list-text-font-size);line-height:var(--van-list-text-line-height);text-align:center}.van-list__placeholder{height:0;pointer-events:none}.van-list__loading-icon .van-loading__spinner{width:var(--van-list-loading-icon-size);height:var(--van-list-loading-icon-size)}:root,:host{--van-switch-size: 26px;--van-switch-width: calc(1.8em + 4px) ;--van-switch-height: calc(1em + 4px) ;--van-switch-node-size: 1em;--van-switch-node-background: var(--van-white);--van-switch-node-shadow: 0 3px 1px 0 rgba(0, 0, 0, .05);--van-switch-background: rgba(120, 120, 128, .16);--van-switch-on-background: var(--van-primary-color);--van-switch-duration: var(--van-duration-base);--van-switch-disabled-opacity: var(--van-disabled-opacity)}.van-theme-dark{--van-switch-background: rgba(120, 120, 128, .32)}.van-switch{position:relative;display:inline-block;box-sizing:content-box;width:var(--van-switch-width);height:var(--van-switch-height);font-size:var(--van-switch-size);background:var(--van-switch-background);border-radius:var(--van-switch-node-size);cursor:pointer;transition:background-color var(--van-switch-duration)}.van-switch__node{position:absolute;top:2px;left:2px;width:var(--van-switch-node-size);height:var(--van-switch-node-size);font-size:inherit;background:var(--van-switch-node-background);border-radius:100%;box-shadow:var(--van-switch-node-shadow);transition:transform var(--van-switch-duration) cubic-bezier(.3,1.05,.4,1.05)}.van-switch__loading{top:25%;left:25%;width:50%;height:50%;line-height:1}.van-switch--on{background:var(--van-switch-on-background)}.van-switch--on .van-switch__node{transform:translate(calc(var(--van-switch-width) - var(--van-switch-node-size) - 4px))}.van-switch--on .van-switch__loading{color:var(--van-switch-on-background)}.van-switch--disabled{cursor:not-allowed;opacity:var(--van-switch-disabled-opacity)}.van-switch--loading{cursor:default}:root,:host{--van-button-mini-height: 24px;--van-button-mini-padding: 0 var(--van-padding-base);--van-button-mini-font-size: var(--van-font-size-xs);--van-button-small-height: 32px;--van-button-small-padding: 0 var(--van-padding-xs);--van-button-small-font-size: var(--van-font-size-sm);--van-button-normal-padding: 0 15px;--van-button-normal-font-size: var(--van-font-size-md);--van-button-large-height: 50px;--van-button-default-height: 44px;--van-button-default-line-height: 1.2;--van-button-default-font-size: var(--van-font-size-lg);--van-button-default-color: var(--van-text-color);--van-button-default-background: var(--van-background-2);--van-button-default-border-color: var(--van-gray-4);--van-button-primary-color: var(--van-white);--van-button-primary-background: var(--van-primary-color);--van-button-primary-border-color: var(--van-primary-color);--van-button-success-color: var(--van-white);--van-button-success-background: var(--van-success-color);--van-button-success-border-color: var(--van-success-color);--van-button-danger-color: var(--van-white);--van-button-danger-background: var(--van-danger-color);--van-button-danger-border-color: var(--van-danger-color);--van-button-warning-color: var(--van-white);--van-button-warning-background: var(--van-warning-color);--van-button-warning-border-color: var(--van-warning-color);--van-button-border-width: var(--van-border-width);--van-button-radius: var(--van-radius-md);--van-button-round-radius: var(--van-radius-max);--van-button-plain-background: var(--van-white);--van-button-disabled-opacity: var(--van-disabled-opacity);--van-button-icon-size: 1.2em;--van-button-loading-icon-size: 20px}.van-theme-dark{--van-button-plain-background: transparent}.van-button{position:relative;display:inline-block;box-sizing:border-box;height:var(--van-button-default-height);margin:0;padding:0;font-size:var(--van-button-default-font-size);line-height:var(--van-button-default-line-height);text-align:center;border-radius:var(--van-button-radius);cursor:pointer;transition:opacity var(--van-duration-fast);-webkit-appearance:none;-webkit-font-smoothing:auto}.van-button:before{position:absolute;top:50%;left:50%;width:100%;height:100%;background:var(--van-black);border:inherit;border-color:var(--van-black);border-radius:inherit;transform:translate(-50%,-50%);opacity:0;content:" ";box-sizing:content-box}.van-button:active:before{opacity:.1}.van-button--loading:before,.van-button--disabled:before{display:none}.van-button--default{color:var(--van-button-default-color);background:var(--van-button-default-background);border:var(--van-button-border-width) solid var(--van-button-default-border-color)}.van-button--primary{color:var(--van-button-primary-color);background:var(--van-button-primary-background);border:var(--van-button-border-width) solid var(--van-button-primary-border-color)}.van-button--success{color:var(--van-button-success-color);background:var(--van-button-success-background);border:var(--van-button-border-width) solid var(--van-button-success-border-color)}.van-button--danger{color:var(--van-button-danger-color);background:var(--van-button-danger-background);border:var(--van-button-border-width) solid var(--van-button-danger-border-color)}.van-button--warning{color:var(--van-button-warning-color);background:var(--van-button-warning-background);border:var(--van-button-border-width) solid var(--van-button-warning-border-color)}.van-button--plain{background:var(--van-button-plain-background)}.van-button--plain.van-button--primary{color:var(--van-button-primary-background)}.van-button--plain.van-button--success{color:var(--van-button-success-background)}.van-button--plain.van-button--danger{color:var(--van-button-danger-background)}.van-button--plain.van-button--warning{color:var(--van-button-warning-background)}.van-button--large{width:100%;height:var(--van-button-large-height)}.van-button--normal{padding:var(--van-button-normal-padding);font-size:var(--van-button-normal-font-size)}.van-button--small{height:var(--van-button-small-height);padding:var(--van-button-small-padding);font-size:var(--van-button-small-font-size)}.van-button__loading{color:inherit;font-size:inherit}.van-button__loading .van-loading__spinner{color:currentColor;width:var(--van-button-loading-icon-size);height:var(--van-button-loading-icon-size)}.van-button--mini{height:var(--van-button-mini-height);padding:var(--van-button-mini-padding);font-size:var(--van-button-mini-font-size)}.van-button--mini+.van-button--mini{margin-left:var(--van-padding-base)}.van-button--block{display:block;width:100%}.van-button--disabled{cursor:not-allowed;opacity:var(--van-button-disabled-opacity)}.van-button--loading{cursor:default}.van-button--round{border-radius:var(--van-button-round-radius)}.van-button--square{border-radius:0}.van-button__content{display:flex;align-items:center;justify-content:center;height:100%}.van-button__content:before{content:" "}.van-button__icon{font-size:var(--van-button-icon-size);line-height:inherit}.van-button__icon+.van-button__text,.van-button__loading+.van-button__text,.van-button__text+.van-button__icon,.van-button__text+.van-button__loading{margin-left:var(--van-padding-base)}.van-button--hairline{border-width:0}.van-button--hairline:after{border-color:inherit;border-radius:calc(var(--van-button-radius) * 2)}.van-button--hairline.van-button--round:after{border-radius:var(--van-button-round-radius)}.van-button--hairline.van-button--square:after{border-radius:0}:root,:host{--van-submit-bar-height: 50px;--van-submit-bar-z-index: 100;--van-submit-bar-background: var(--van-background-2);--van-submit-bar-button-width: 110px;--van-submit-bar-price-color: var(--van-danger-color);--van-submit-bar-price-font-size: var(--van-font-size-sm);--van-submit-bar-price-integer-font-size: 20px;--van-submit-bar-price-font: var(--van-price-font);--van-submit-bar-text-color: var(--van-text-color);--van-submit-bar-text-font-size: var(--van-font-size-md);--van-submit-bar-tip-padding: var(--van-padding-xs) var(--van-padding-sm);--van-submit-bar-tip-font-size: var(--van-font-size-sm);--van-submit-bar-tip-line-height: 1.5;--van-submit-bar-tip-color: var(--van-orange-dark);--van-submit-bar-tip-background: var(--van-orange-light);--van-submit-bar-tip-icon-size: 12px;--van-submit-bar-button-height: 40px;--van-submit-bar-padding: 0 var(--van-padding-md)}.van-submit-bar{position:fixed;bottom:0;left:0;z-index:var(--van-submit-bar-z-index);width:100%;background:var(--van-submit-bar-background);-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-submit-bar__tip{padding:var(--van-submit-bar-tip-padding);color:var(--van-submit-bar-tip-color);font-size:var(--van-submit-bar-tip-font-size);line-height:var(--van-submit-bar-tip-line-height);background:var(--van-submit-bar-tip-background)}.van-submit-bar__tip-icon{margin-right:var(--van-padding-base);font-size:var(--van-submit-bar-tip-icon-size);vertical-align:middle}.van-submit-bar__tip-text{vertical-align:middle}.van-submit-bar__bar{display:flex;align-items:center;justify-content:flex-end;height:var(--van-submit-bar-height);padding:var(--van-submit-bar-padding);font-size:var(--van-submit-bar-text-font-size)}.van-submit-bar__text{flex:1;padding-right:var(--van-padding-sm);color:var(--van-submit-bar-text-color);text-align:right}.van-submit-bar__text span{display:inline-block}.van-submit-bar__suffix-label{margin-left:var(--van-padding-base);font-weight:var(--van-font-bold)}.van-submit-bar__price{color:var(--van-submit-bar-price-color);font-weight:var(--van-font-bold);font-size:var(--van-submit-bar-price-font-size);margin-left:var(--van-padding-base)}.van-submit-bar__price-integer{font-size:var(--van-submit-bar-price-integer-font-size);font-family:var(--van-submit-bar-price-font)}.van-submit-bar__button{width:var(--van-submit-bar-button-width);height:var(--van-submit-bar-button-height);font-weight:var(--van-font-bold);border:none}.van-submit-bar__button--danger{background:var(--van-gradient-red)}:root,:host{--van-signature-padding: var(--van-padding-xs);--van-signature-content-height: 200px;--van-signature-content-background: var(--van-background-2);--van-signature-content-border: 1px dotted #dadada}.van-signature{padding:var(--van-signature-padding)}.van-signature__content{display:flex;justify-content:center;align-items:center;height:var(--van-signature-content-height);background-color:var(--van-signature-content-background);border:var(--van-signature-content-border);border-radius:var(--van-radius-lg);overflow:hidden}.van-signature__content canvas{width:100%;height:100%}.van-signature__footer{display:flex;justify-content:flex-end}.van-signature__footer .van-button{padding:0 var(--van-padding-md);margin-top:var(--van-padding-xs);margin-left:var(--van-padding-xs)}:root,:host{--van-contact-edit-padding: var(--van-padding-md);--van-contact-edit-fields-radius: var(--van-radius-md);--van-contact-edit-buttons-padding: var(--van-padding-xl) 0;--van-contact-edit-button-margin-bottom: var(--van-padding-sm);--van-contact-edit-button-font-size: var(--van-font-size-lg);--van-contact-edit-field-label-width: 4.1em}.van-contact-edit{padding:var(--van-contact-edit-padding)}.van-contact-edit__fields{overflow:hidden;border-radius:var(--van-contact-edit-fields-radius)}.van-contact-edit__fields .van-field__label{width:var(--van-contact-edit-field-label-width)}.van-contact-edit__switch-cell{margin-top:10px;padding-top:9px;padding-bottom:9px;border-radius:var(--van-contact-edit-fields-radius)}.van-contact-edit__buttons{padding:var(--van-contact-edit-buttons-padding)}.van-contact-edit__button{margin-bottom:var(--van-contact-edit-button-margin-bottom);font-size:var(--van-contact-edit-button-font-size)}:root,:host{--van-action-bar-button-height: 40px;--van-action-bar-button-warning-color: var(--van-gradient-orange);--van-action-bar-button-danger-color: var(--van-gradient-red)}.van-action-bar-button{flex:1;height:var(--van-action-bar-button-height);font-weight:var(--van-font-bold);font-size:var(--van-font-size-md);border:none;border-radius:0}.van-action-bar-button--first{margin-left:5px;border-top-left-radius:var(--van-radius-max);border-bottom-left-radius:var(--van-radius-max)}.van-action-bar-button--last{margin-right:5px;border-top-right-radius:var(--van-radius-max);border-bottom-right-radius:var(--van-radius-max)}.van-action-bar-button--warning{background:var(--van-action-bar-button-warning-color)}.van-action-bar-button--danger{background:var(--van-action-bar-button-danger-color)}@media (max-width:321px){.van-action-bar-button{font-size:13px}}:root,:host{--van-overlay-z-index: 1;--van-overlay-background: rgba(0, 0, 0, .7)}.van-overlay{position:fixed;top:0;left:0;z-index:var(--van-overlay-z-index);width:100%;height:100%;background:var(--van-overlay-background)}:root,:host{--van-popup-background: var(--van-background-2);--van-popup-transition: transform var(--van-duration-base);--van-popup-round-radius: 16px;--van-popup-close-icon-size: 22px;--van-popup-close-icon-color: var(--van-gray-5);--van-popup-close-icon-margin: 16px;--van-popup-close-icon-z-index: 1}.van-overflow-hidden{overflow:hidden!important}.van-popup{position:fixed;max-height:100%;overflow-y:auto;box-sizing:border-box;background:var(--van-popup-background);transition:var(--van-popup-transition);-webkit-overflow-scrolling:touch}.van-popup--center{top:50%;left:0;right:0;width:-moz-fit-content;width:fit-content;max-width:calc(100vw - var(--van-padding-md) * 2);margin:0 auto;transform:translateY(-50%)}.van-popup--center.van-popup--round{border-radius:var(--van-popup-round-radius)}.van-popup--top{top:0;left:0;width:100%}.van-popup--top.van-popup--round{border-radius:0 0 var(--van-popup-round-radius) var(--van-popup-round-radius)}.van-popup--right{top:50%;right:0;transform:translate3d(0,-50%,0)}.van-popup--right.van-popup--round{border-radius:var(--van-popup-round-radius) 0 0 var(--van-popup-round-radius)}.van-popup--bottom{bottom:0;left:0;width:100%}.van-popup--bottom.van-popup--round{border-radius:var(--van-popup-round-radius) var(--van-popup-round-radius) 0 0}.van-popup--left{top:50%;left:0;transform:translate3d(0,-50%,0)}.van-popup--left.van-popup--round{border-radius:0 var(--van-popup-round-radius) var(--van-popup-round-radius) 0}.van-popup-slide-top-enter-active,.van-popup-slide-left-enter-active,.van-popup-slide-right-enter-active,.van-popup-slide-bottom-enter-active{transition-timing-function:var(--van-ease-out)}.van-popup-slide-top-leave-active,.van-popup-slide-left-leave-active,.van-popup-slide-right-leave-active,.van-popup-slide-bottom-leave-active{transition-timing-function:var(--van-ease-in)}.van-popup-slide-top-enter-from,.van-popup-slide-top-leave-active{transform:translate3d(0,-100%,0)}.van-popup-slide-right-enter-from,.van-popup-slide-right-leave-active{transform:translate3d(100%,-50%,0)}.van-popup-slide-bottom-enter-from,.van-popup-slide-bottom-leave-active{transform:translate3d(0,100%,0)}.van-popup-slide-left-enter-from,.van-popup-slide-left-leave-active{transform:translate3d(-100%,-50%,0)}.van-popup__close-icon{position:absolute;z-index:var(--van-popup-close-icon-z-index);color:var(--van-popup-close-icon-color);font-size:var(--van-popup-close-icon-size)}.van-popup__close-icon--top-left{top:var(--van-popup-close-icon-margin);left:var(--van-popup-close-icon-margin)}.van-popup__close-icon--top-right{top:var(--van-popup-close-icon-margin);right:var(--van-popup-close-icon-margin)}.van-popup__close-icon--bottom-left{bottom:var(--van-popup-close-icon-margin);left:var(--van-popup-close-icon-margin)}.van-popup__close-icon--bottom-right{right:var(--van-popup-close-icon-margin);bottom:var(--van-popup-close-icon-margin)}:root,:host{--van-share-sheet-header-padding: var(--van-padding-sm) var(--van-padding-md);--van-share-sheet-title-color: var(--van-text-color);--van-share-sheet-title-font-size: var(--van-font-size-md);--van-share-sheet-title-line-height: var(--van-line-height-md);--van-share-sheet-description-color: var(--van-text-color-2);--van-share-sheet-description-font-size: var(--van-font-size-sm);--van-share-sheet-description-line-height: 16px;--van-share-sheet-icon-size: 48px;--van-share-sheet-option-name-color: var(--van-gray-7);--van-share-sheet-option-name-font-size: var(--van-font-size-sm);--van-share-sheet-option-description-color: var(--van-text-color-3);--van-share-sheet-option-description-font-size: var(--van-font-size-sm);--van-share-sheet-cancel-button-font-size: var(--van-font-size-lg);--van-share-sheet-cancel-button-height: 48px;--van-share-sheet-cancel-button-background: var(--van-background-2)}.van-share-sheet__header{padding:var(--van-share-sheet-header-padding);text-align:center}.van-share-sheet__title{margin-top:var(--van-padding-xs);color:var(--van-share-sheet-title-color);font-weight:400;font-size:var(--van-share-sheet-title-font-size);line-height:var(--van-share-sheet-title-line-height)}.van-share-sheet__description{display:block;margin-top:var(--van-padding-xs);color:var(--van-share-sheet-description-color);font-size:var(--van-share-sheet-description-font-size);line-height:var(--van-share-sheet-description-line-height)}.van-share-sheet__options{position:relative;display:flex;padding:var(--van-padding-md) 0 var(--van-padding-md) var(--van-padding-xs);overflow-x:auto;overflow-y:visible;-webkit-overflow-scrolling:touch}.van-share-sheet__options--border:before{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:0;right:0;left:var(--van-padding-md);border-top:1px solid var(--van-border-color);transform:scaleY(.5)}.van-share-sheet__options::-webkit-scrollbar{height:0}.van-share-sheet__option{display:flex;flex-direction:column;align-items:center;-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-share-sheet__icon,.van-share-sheet__image-icon{width:var(--van-share-sheet-icon-size);height:var(--van-share-sheet-icon-size);margin:0 var(--van-padding-md)}.van-share-sheet__icon{display:flex;align-items:center;justify-content:center;color:var(--van-gray-7);border-radius:100%;background-color:var(--van-gray-2)}.van-share-sheet__icon--link,.van-share-sheet__icon--poster,.van-share-sheet__icon--qrcode{font-size:26px}.van-share-sheet__icon--weapp-qrcode{font-size:28px}.van-share-sheet__icon--qq,.van-share-sheet__icon--weibo,.van-share-sheet__icon--wechat,.van-share-sheet__icon--wechat-moments{font-size:30px;color:var(--van-white)}.van-share-sheet__icon--qq{background-color:#38b9fa}.van-share-sheet__icon--wechat{background-color:#0bc15f}.van-share-sheet__icon--weibo{background-color:#ee575e}.van-share-sheet__icon--wechat-moments{background-color:#7bc845}.van-share-sheet__name{margin-top:var(--van-padding-xs);padding:0 var(--van-padding-base);color:var(--van-share-sheet-option-name-color);font-size:var(--van-share-sheet-option-name-font-size)}.van-share-sheet__option-description{padding:0 var(--van-padding-base);color:var(--van-share-sheet-option-description-color);font-size:var(--van-share-sheet-option-description-font-size)}.van-share-sheet__cancel{display:block;width:100%;padding:0;font-size:var(--van-share-sheet-cancel-button-font-size);line-height:var(--van-share-sheet-cancel-button-height);text-align:center;background:var(--van-share-sheet-cancel-button-background);border:none;cursor:pointer}.van-share-sheet__cancel:before{display:block;height:var(--van-padding-xs);background-color:var(--van-background);content:" "}.van-share-sheet__cancel:active{background-color:var(--van-active-color)}:root,:host{--van-popover-arrow-size: 6px;--van-popover-radius: var(--van-radius-lg);--van-popover-action-width: 128px;--van-popover-action-height: 44px;--van-popover-action-font-size: var(--van-font-size-md);--van-popover-action-line-height: var(--van-line-height-md);--van-popover-action-icon-size: 20px;--van-popover-horizontal-action-height: 34px;--van-popover-horizontal-action-icon-size: 16px;--van-popover-light-text-color: var(--van-text-color);--van-popover-light-background: var(--van-background-2);--van-popover-light-action-disabled-text-color: var(--van-text-color-3);--van-popover-dark-text-color: var(--van-white);--van-popover-dark-background: #4a4a4a;--van-popover-dark-action-disabled-text-color: var(--van-text-color-2)}.van-popover{position:absolute;overflow:visible;background-color:transparent;transition:opacity .15s,transform .15s}.van-popover__wrapper{display:inline-block}.van-popover__arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid;border-width:var(--van-popover-arrow-size)}.van-popover__content{overflow:hidden;border-radius:var(--van-popover-radius)}.van-popover__content--horizontal{display:flex;width:-moz-max-content;width:max-content}.van-popover__content--horizontal .van-popover__action{flex:none;width:auto;height:var(--van-popover-horizontal-action-height);padding:0 var(--van-padding-sm)}.van-popover__content--horizontal .van-popover__action:last-child:after{display:none}.van-popover__content--horizontal .van-popover__action-icon{margin-right:var(--van-padding-base);font-size:var(--van-popover-horizontal-action-icon-size)}.van-popover__action{position:relative;display:flex;align-items:center;box-sizing:border-box;width:var(--van-popover-action-width);height:var(--van-popover-action-height);padding:0 var(--van-padding-md);font-size:var(--van-popover-action-font-size);line-height:var(--van-line-height-md);cursor:pointer}.van-popover__action:last-child .van-popover__action-text:after{display:none}.van-popover__action-text{display:flex;flex:1;align-items:center;justify-content:center;height:100%}.van-popover__action-icon{margin-right:var(--van-padding-xs);font-size:var(--van-popover-action-icon-size)}.van-popover__action--with-icon .van-popover__action-text{justify-content:flex-start}.van-popover[data-popper-placement^=top] .van-popover__arrow{bottom:0;border-top-color:currentColor;border-bottom-width:0;margin-bottom:calc(var(--van-popover-arrow-size) * -1)}.van-popover[data-popper-placement=top]{transform-origin:50% 100%}.van-popover[data-popper-placement=top] .van-popover__arrow{left:50%;transform:translate(-50%)}.van-popover[data-popper-placement=top-start]{transform-origin:0 100%}.van-popover[data-popper-placement=top-start] .van-popover__arrow{left:var(--van-padding-md)}.van-popover[data-popper-placement=top-end]{transform-origin:100% 100%}.van-popover[data-popper-placement=top-end] .van-popover__arrow{right:var(--van-padding-md)}.van-popover[data-popper-placement^=left] .van-popover__arrow{right:0;border-right-width:0;border-left-color:currentColor;margin-right:calc(var(--van-popover-arrow-size) * -1)}.van-popover[data-popper-placement=left]{transform-origin:100% 50%}.van-popover[data-popper-placement=left] .van-popover__arrow{top:50%;transform:translateY(-50%)}.van-popover[data-popper-placement=left-start]{transform-origin:100% 0}.van-popover[data-popper-placement=left-start] .van-popover__arrow{top:var(--van-padding-md)}.van-popover[data-popper-placement=left-end]{transform-origin:100% 100%}.van-popover[data-popper-placement=left-end] .van-popover__arrow{bottom:var(--van-padding-md)}.van-popover[data-popper-placement^=right] .van-popover__arrow{left:0;border-right-color:currentColor;border-left-width:0;margin-left:calc(var(--van-popover-arrow-size) * -1)}.van-popover[data-popper-placement=right]{transform-origin:0 50%}.van-popover[data-popper-placement=right] .van-popover__arrow{top:50%;transform:translateY(-50%)}.van-popover[data-popper-placement=right-start]{transform-origin:0 0}.van-popover[data-popper-placement=right-start] .van-popover__arrow{top:var(--van-padding-md)}.van-popover[data-popper-placement=right-end]{transform-origin:0 100%}.van-popover[data-popper-placement=right-end] .van-popover__arrow{bottom:var(--van-padding-md)}.van-popover[data-popper-placement^=bottom] .van-popover__arrow{top:0;border-top-width:0;border-bottom-color:currentColor;margin-top:calc(var(--van-popover-arrow-size) * -1)}.van-popover[data-popper-placement=bottom]{transform-origin:50% 0}.van-popover[data-popper-placement=bottom] .van-popover__arrow{left:50%;transform:translate(-50%)}.van-popover[data-popper-placement=bottom-start]{transform-origin:0 0}.van-popover[data-popper-placement=bottom-start] .van-popover__arrow{left:var(--van-padding-md)}.van-popover[data-popper-placement=bottom-end]{transform-origin:100% 0}.van-popover[data-popper-placement=bottom-end] .van-popover__arrow{right:var(--van-padding-md)}.van-popover--light{color:var(--van-popover-light-text-color)}.van-popover--light .van-popover__content{background:var(--van-popover-light-background);box-shadow:0 2px 12px #3232331f}.van-popover--light .van-popover__arrow{color:var(--van-popover-light-background)}.van-popover--light .van-popover__action:active{background-color:var(--van-active-color)}.van-popover--light .van-popover__action--disabled{color:var(--van-popover-light-action-disabled-text-color);cursor:not-allowed}.van-popover--light .van-popover__action--disabled:active{background-color:transparent}.van-popover--dark{color:var(--van-popover-dark-text-color)}.van-popover--dark .van-popover__content{background:var(--van-popover-dark-background)}.van-popover--dark .van-popover__arrow{color:var(--van-popover-dark-background)}.van-popover--dark .van-popover__action:active{background-color:#0003}.van-popover--dark .van-popover__action--disabled{color:var(--van-popover-dark-action-disabled-text-color)}.van-popover--dark .van-popover__action--disabled:active{background-color:transparent}.van-popover--dark .van-popover__action-text:after{border-color:var(--van-gray-7)}.van-popover-zoom-enter-from,.van-popover-zoom-leave-active{transform:scale(.8);opacity:0}.van-popover-zoom-enter-active{transition-timing-function:var(--van-ease-out)}.van-popover-zoom-leave-active{transition-timing-function:var(--van-ease-in)}:root,:host{--van-notify-text-color: var(--van-white);--van-notify-padding: var(--van-padding-xs) var(--van-padding-md);--van-notify-font-size: var(--van-font-size-md);--van-notify-line-height: var(--van-line-height-md);--van-notify-primary-background: var(--van-primary-color);--van-notify-success-background: var(--van-success-color);--van-notify-danger-background: var(--van-danger-color);--van-notify-warning-background: var(--van-warning-color)}.van-notify{display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:var(--van-notify-padding);color:var(--van-notify-text-color);font-size:var(--van-notify-font-size);line-height:var(--van-notify-line-height);white-space:pre-wrap;text-align:center;word-wrap:break-word}.van-notify--primary{background:var(--van-notify-primary-background)}.van-notify--success{background:var(--van-notify-success-background)}.van-notify--danger{background:var(--van-notify-danger-background)}.van-notify--warning{background:var(--van-notify-warning-background)}:root,:host{--van-dialog-width: 320px;--van-dialog-small-screen-width: 90%;--van-dialog-font-size: var(--van-font-size-lg);--van-dialog-transition: var(--van-duration-base);--van-dialog-radius: 16px;--van-dialog-background: var(--van-background-2);--van-dialog-header-font-weight: var(--van-font-bold);--van-dialog-header-line-height: 24px;--van-dialog-header-padding-top: 26px;--van-dialog-header-isolated-padding: var(--van-padding-lg) 0;--van-dialog-message-padding: var(--van-padding-lg);--van-dialog-message-font-size: var(--van-font-size-md);--van-dialog-message-line-height: var(--van-line-height-md);--van-dialog-message-max-height: 60vh;--van-dialog-has-title-message-text-color: var(--van-gray-7);--van-dialog-has-title-message-padding-top: var(--van-padding-xs);--van-dialog-button-height: 48px;--van-dialog-round-button-height: 36px;--van-dialog-confirm-button-text-color: var(--van-primary-color)}.van-dialog{top:45%;width:var(--van-dialog-width);overflow:hidden;font-size:var(--van-dialog-font-size);background:var(--van-dialog-background);border-radius:var(--van-dialog-radius);backface-visibility:hidden;transition:var(--van-dialog-transition);transition-property:transform,opacity}@media (max-width:321px){.van-dialog{width:var(--van-dialog-small-screen-width)}}.van-dialog__header{color:var(--van-text-color);padding-top:var(--van-dialog-header-padding-top);font-weight:var(--van-dialog-header-font-weight);line-height:var(--van-dialog-header-line-height);text-align:center}.van-dialog__header--isolated{padding:var(--van-dialog-header-isolated-padding)}.van-dialog__content--isolated{display:flex;align-items:center;min-height:104px}.van-dialog__message{color:var(--van-text-color);flex:1;max-height:var(--van-dialog-message-max-height);padding:26px var(--van-dialog-message-padding);overflow-y:auto;font-size:var(--van-dialog-message-font-size);line-height:var(--van-dialog-message-line-height);white-space:pre-wrap;text-align:center;word-wrap:break-word;-webkit-overflow-scrolling:touch}.van-dialog__message--has-title{padding-top:var(--van-dialog-has-title-message-padding-top);color:var(--van-dialog-has-title-message-text-color)}.van-dialog__message--left{text-align:left}.van-dialog__message--right{text-align:right}.van-dialog__message--justify{text-align:justify}.van-dialog__footer{display:flex;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-dialog__confirm,.van-dialog__cancel{flex:1;height:var(--van-dialog-button-height);margin:0;border:0;border-radius:0}.van-dialog__confirm,.van-dialog__confirm:active{color:var(--van-dialog-confirm-button-text-color)}.van-dialog--round-button .van-dialog__footer{position:relative;height:auto;padding:var(--van-padding-xs) var(--van-padding-lg) var(--van-padding-md)}.van-dialog--round-button .van-dialog__message{padding-bottom:var(--van-padding-md);color:var(--van-text-color)}.van-dialog--round-button .van-dialog__confirm,.van-dialog--round-button .van-dialog__cancel{height:var(--van-dialog-round-button-height)}.van-dialog--round-button .van-dialog__confirm{color:var(--van-white)}.van-dialog--round-button .van-action-bar-button--first{border-top-left-radius:var(--van-radius-max);border-bottom-left-radius:var(--van-radius-max)}.van-dialog--round-button .van-action-bar-button--last{border-top-right-radius:var(--van-radius-max);border-bottom-right-radius:var(--van-radius-max)}.van-dialog-bounce-enter-from{transform:translate3d(0,-50%,0) scale(.7);opacity:0}.van-dialog-bounce-leave-active{transform:translate3d(0,-50%,0) scale(.9);opacity:0}:root,:host{--van-toast-max-width: 70%;--van-toast-font-size: var(--van-font-size-md);--van-toast-text-color: var(--van-white);--van-toast-loading-icon-color: var(--van-white);--van-toast-line-height: var(--van-line-height-md);--van-toast-radius: var(--van-radius-lg);--van-toast-background: rgba(0, 0, 0, .7);--van-toast-icon-size: 36px;--van-toast-text-min-width: 96px;--van-toast-text-padding: var(--van-padding-xs) var(--van-padding-sm);--van-toast-default-padding: var(--van-padding-md);--van-toast-default-width: 88px;--van-toast-default-min-height: 88px;--van-toast-position-top-distance: 20%;--van-toast-position-bottom-distance: 20%}.van-toast{display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:content-box;transition:all var(--van-duration-fast);width:var(--van-toast-default-width);max-width:var(--van-toast-max-width);min-height:var(--van-toast-default-min-height);padding:var(--van-toast-default-padding);color:var(--van-toast-text-color);font-size:var(--van-toast-font-size);line-height:var(--van-toast-line-height);white-space:pre-wrap;word-break:break-all;text-align:center;background:var(--van-toast-background);border-radius:var(--van-toast-radius)}.van-toast--break-normal{word-break:normal;word-wrap:normal}.van-toast--break-word{word-break:normal;word-wrap:break-word}.van-toast--unclickable{overflow:hidden;cursor:not-allowed}.van-toast--unclickable *{pointer-events:none}.van-toast--text,.van-toast--html{width:-moz-fit-content;width:fit-content;min-width:var(--van-toast-text-min-width);min-height:0;padding:var(--van-toast-text-padding)}.van-toast--text .van-toast__text,.van-toast--html .van-toast__text{margin-top:0}.van-toast--top{top:var(--van-toast-position-top-distance)}.van-toast--bottom{top:auto;bottom:var(--van-toast-position-bottom-distance)}.van-toast__icon{font-size:var(--van-toast-icon-size)}.van-toast__loading{padding:var(--van-padding-base);color:var(--van-toast-loading-icon-color)}.van-toast__text{margin-top:var(--van-padding-xs)}:root,:host{--van-action-sheet-max-height: 80%;--van-action-sheet-header-height: 48px;--van-action-sheet-header-font-size: var(--van-font-size-lg);--van-action-sheet-description-color: var(--van-text-color-2);--van-action-sheet-description-font-size: var(--van-font-size-md);--van-action-sheet-description-line-height: var(--van-line-height-md);--van-action-sheet-item-background: var(--van-background-2);--van-action-sheet-item-font-size: var(--van-font-size-lg);--van-action-sheet-item-line-height: var(--van-line-height-lg);--van-action-sheet-item-text-color: var(--van-text-color);--van-action-sheet-item-disabled-text-color: var(--van-text-color-3);--van-action-sheet-item-icon-size: 18px;--van-action-sheet-item-icon-margin-right: var(--van-padding-xs);--van-action-sheet-subname-color: var(--van-text-color-2);--van-action-sheet-subname-font-size: var(--van-font-size-sm);--van-action-sheet-subname-line-height: var(--van-line-height-sm);--van-action-sheet-close-icon-size: 22px;--van-action-sheet-close-icon-color: var(--van-gray-5);--van-action-sheet-close-icon-padding: 0 var(--van-padding-md);--van-action-sheet-cancel-text-color: var(--van-gray-7);--van-action-sheet-cancel-padding-top: var(--van-padding-xs);--van-action-sheet-cancel-padding-color: var(--van-background);--van-action-sheet-loading-icon-size: 22px}.van-action-sheet{display:flex;flex-direction:column;max-height:var(--van-action-sheet-max-height);overflow:hidden;color:var(--van-action-sheet-item-text-color)}.van-action-sheet__content{flex:1 auto;overflow-y:auto;-webkit-overflow-scrolling:touch}.van-action-sheet__item,.van-action-sheet__cancel{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;width:100%;padding:14px var(--van-padding-md);font-size:var(--van-action-sheet-item-font-size);background:var(--van-action-sheet-item-background);border:none;cursor:pointer}.van-action-sheet__item:active,.van-action-sheet__cancel:active{background-color:var(--van-active-color)}.van-action-sheet__item{line-height:var(--van-action-sheet-item-line-height)}.van-action-sheet__item--loading,.van-action-sheet__item--disabled{color:var(--van-action-sheet-item-disabled-text-color)}.van-action-sheet__item--loading:active,.van-action-sheet__item--disabled:active{background-color:var(--van-action-sheet-item-background)}.van-action-sheet__item--disabled{cursor:not-allowed}.van-action-sheet__item--loading{cursor:default}.van-action-sheet__item-icon{font-size:var(--van-action-sheet-item-icon-size);margin-right:var(--van-action-sheet-item-icon-margin-right)}.van-action-sheet__cancel{flex-shrink:0;box-sizing:border-box;color:var(--van-action-sheet-cancel-text-color)}.van-action-sheet__subname{width:100%;margin-top:var(--van-padding-xs);color:var(--van-action-sheet-subname-color);font-size:var(--van-action-sheet-subname-font-size);line-height:var(--van-action-sheet-subname-line-height);overflow-wrap:break-word}.van-action-sheet__gap{display:block;height:var(--van-action-sheet-cancel-padding-top);background:var(--van-action-sheet-cancel-padding-color)}.van-action-sheet__header{flex-shrink:0;font-weight:var(--van-font-bold);font-size:var(--van-action-sheet-header-font-size);line-height:var(--van-action-sheet-header-height);text-align:center}.van-action-sheet__description{position:relative;flex-shrink:0;padding:20px var(--van-padding-md);color:var(--van-action-sheet-description-color);font-size:var(--van-action-sheet-description-font-size);line-height:var(--van-action-sheet-description-line-height);text-align:center}.van-action-sheet__description:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:var(--van-padding-md);bottom:0;left:var(--van-padding-md);border-bottom:1px solid var(--van-border-color);transform:scaleY(.5)}.van-action-sheet__loading-icon .van-loading__spinner{width:var(--van-action-sheet-loading-icon-size);height:var(--van-action-sheet-loading-icon-size)}.van-action-sheet__close{position:absolute;top:0;right:0;z-index:1;padding:var(--van-action-sheet-close-icon-padding);color:var(--van-action-sheet-close-icon-color);font-size:var(--van-action-sheet-close-icon-size);line-height:inherit}:root,:host{--van-sticky-z-index: 99}.van-sticky--fixed{position:fixed;z-index:var(--van-sticky-z-index)}:root,:host{--van-swipe-indicator-size: 6px;--van-swipe-indicator-margin: var(--van-padding-sm);--van-swipe-indicator-active-opacity: 1;--van-swipe-indicator-inactive-opacity: .3;--van-swipe-indicator-active-background: var(--van-primary-color);--van-swipe-indicator-inactive-background: var(--van-border-color)}.van-swipe{position:relative;overflow:hidden;transform:translateZ(0);cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-swipe__track{display:flex;height:100%;transition-property:transform}.van-swipe__track--vertical{flex-direction:column}.van-swipe__indicators{position:absolute;bottom:var(--van-swipe-indicator-margin);left:50%;display:flex;transform:translate(-50%)}.van-swipe__indicators--vertical{top:50%;bottom:auto;left:var(--van-swipe-indicator-margin);flex-direction:column;transform:translateY(-50%)}.van-swipe__indicators--vertical .van-swipe__indicator:not(:last-child){margin-bottom:var(--van-swipe-indicator-size)}.van-swipe__indicator{width:var(--van-swipe-indicator-size);height:var(--van-swipe-indicator-size);background-color:var(--van-swipe-indicator-inactive-background);border-radius:100%;opacity:var(--van-swipe-indicator-inactive-opacity);transition:opacity var(--van-duration-fast),background-color var(--van-duration-fast)}.van-swipe__indicator:not(:last-child){margin-right:var(--van-swipe-indicator-size)}.van-swipe__indicator--active{background-color:var(--van-swipe-indicator-active-background);opacity:var(--van-swipe-indicator-active-opacity)}.van-swipe-item{position:relative;flex-shrink:0;width:100%;height:100%}:root,:host{--van-image-preview-index-text-color: var(--van-white);--van-image-preview-index-font-size: var(--van-font-size-md);--van-image-preview-index-line-height: var(--van-line-height-md);--van-image-preview-index-text-shadow: 0 1px 1px var(--van-gray-8);--van-image-preview-overlay-background: rgba(0, 0, 0, .9);--van-image-preview-close-icon-size: 22px;--van-image-preview-close-icon-color: var(--van-gray-5);--van-image-preview-close-icon-margin: var(--van-padding-md);--van-image-preview-close-icon-z-index: 1}.van-image-preview{position:fixed;top:0;left:0;width:100%;height:100%;max-width:none;background-color:transparent;transform:none}.van-image-preview__swipe{height:100%}.van-image-preview__swipe-item{display:flex;align-items:center;justify-content:center;overflow:hidden}.van-image-preview__cover{position:absolute;top:0;left:0}.van-image-preview__image,.van-image-preview__image-wrap{width:100%;transition-property:transform}.van-image-preview__image--vertical,.van-image-preview__image-wrap--vertical{width:auto;height:100%}.van-image-preview__image img,.van-image-preview__image-wrap img,.van-image-preview__image video,.van-image-preview__image-wrap video{-webkit-user-drag:none}.van-image-preview__image .van-image__error,.van-image-preview__image-wrap .van-image__error{top:30%;height:40%}.van-image-preview__image .van-image__error-icon,.van-image-preview__image-wrap .van-image__error-icon{font-size:36px}.van-image-preview__image .van-image__loading,.van-image-preview__image-wrap .van-image__loading{background-color:transparent}.van-image-preview__index{position:absolute;top:var(--van-padding-md);left:50%;color:var(--van-image-preview-index-text-color);font-size:var(--van-image-preview-index-font-size);line-height:var(--van-image-preview-index-line-height);text-shadow:var(--van-image-preview-index-text-shadow);transform:translate(-50%)}.van-image-preview__overlay{background:var(--van-image-preview-overlay-background)}.van-image-preview__close-icon{position:absolute;z-index:var(--van-image-preview-close-icon-z-index);color:var(--van-image-preview-close-icon-color);font-size:var(--van-image-preview-close-icon-size)}.van-image-preview__close-icon--top-left{top:var(--van-image-preview-close-icon-margin);left:var(--van-image-preview-close-icon-margin)}.van-image-preview__close-icon--top-right{top:var(--van-image-preview-close-icon-margin);right:var(--van-image-preview-close-icon-margin)}.van-image-preview__close-icon--bottom-left{bottom:var(--van-image-preview-close-icon-margin);left:var(--van-image-preview-close-icon-margin)}.van-image-preview__close-icon--bottom-right{right:var(--van-image-preview-close-icon-margin);bottom:var(--van-image-preview-close-icon-margin)}:root,:host{--van-uploader-size: 80px;--van-uploader-icon-size: 24px;--van-uploader-icon-color: var(--van-gray-4);--van-uploader-text-color: var(--van-text-color-2);--van-uploader-text-font-size: var(--van-font-size-sm);--van-uploader-upload-background: var(--van-gray-1);--van-uploader-upload-active-color: var(--van-active-color);--van-uploader-delete-color: var(--van-white);--van-uploader-delete-icon-size: 14px;--van-uploader-delete-background: rgba(0, 0, 0, .7);--van-uploader-file-background: var(--van-background);--van-uploader-file-icon-size: 20px;--van-uploader-file-icon-color: var(--van-gray-7);--van-uploader-file-name-padding: 0 var(--van-padding-base);--van-uploader-file-name-margin-top: var(--van-padding-xs);--van-uploader-file-name-font-size: var(--van-font-size-sm);--van-uploader-file-name-text-color: var(--van-gray-7);--van-uploader-mask-text-color: var(--van-white);--van-uploader-mask-background: rgba(50, 50, 51, .88);--van-uploader-mask-icon-size: 22px;--van-uploader-mask-message-font-size: var(--van-font-size-sm);--van-uploader-mask-message-line-height: var(--van-line-height-xs);--van-uploader-loading-icon-size: 22px;--van-uploader-loading-icon-color: var(--van-white);--van-uploader-disabled-opacity: var(--van-disabled-opacity);--van-uploader-border-radius: 0px}.van-uploader{position:relative;display:inline-block}.van-uploader__wrapper{display:flex;flex-wrap:wrap}.van-uploader__wrapper--disabled{opacity:var(--van-uploader-disabled-opacity)}.van-uploader__input{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;cursor:pointer;opacity:0}.van-uploader__input-wrapper{position:relative}.van-uploader__input:disabled{cursor:not-allowed}.van-uploader__upload{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;width:var(--van-uploader-size);height:var(--van-uploader-size);margin:0 var(--van-padding-xs) var(--van-padding-xs) 0;background:var(--van-uploader-upload-background);border-radius:var(--van-uploader-border-radius)}.van-uploader__upload:active{background-color:var(--van-uploader-upload-active-color)}.van-uploader__upload--readonly:active{background-color:var(--van-uploader-upload-background)}.van-uploader__upload-icon{color:var(--van-uploader-icon-color);font-size:var(--van-uploader-icon-size)}.van-uploader__upload-text{margin-top:var(--van-padding-xs);color:var(--van-uploader-text-color);font-size:var(--van-uploader-text-font-size)}.van-uploader__preview{position:relative;margin:0 var(--van-padding-xs) var(--van-padding-xs) 0;cursor:pointer}.van-uploader__preview-image{display:block;width:var(--van-uploader-size);height:var(--van-uploader-size);overflow:hidden;border-radius:var(--van-uploader-border-radius)}.van-uploader__preview-delete{position:absolute;top:0;right:0}.van-uploader__preview-delete--shadow{width:var(--van-uploader-delete-icon-size);height:var(--van-uploader-delete-icon-size);background:var(--van-uploader-delete-background);border-radius:0 0 0 12px}.van-uploader__preview-delete-icon{position:absolute;top:0;right:0;color:var(--van-uploader-delete-color);font-size:var(--van-uploader-delete-icon-size);transform:scale(.7) translate(10%,-10%)}.van-uploader__preview-cover{position:absolute;top:0;right:0;bottom:0;left:0}.van-uploader__mask{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--van-uploader-mask-text-color);background:var(--van-uploader-mask-background);border-radius:var(--van-uploader-border-radius)}.van-uploader__mask-icon{font-size:var(--van-uploader-mask-icon-size)}.van-uploader__mask-message{margin-top:6px;padding:0 var(--van-padding-base);font-size:var(--van-uploader-mask-message-font-size);line-height:var(--van-uploader-mask-message-line-height)}.van-uploader__loading{width:var(--van-uploader-loading-icon-size);height:var(--van-uploader-loading-icon-size);color:var(--van-uploader-loading-icon-color)}.van-uploader__file{display:flex;flex-direction:column;align-items:center;justify-content:center;width:var(--van-uploader-size);height:var(--van-uploader-size);background:var(--van-uploader-file-background)}.van-uploader__file-icon{color:var(--van-uploader-file-icon-color);font-size:var(--van-uploader-file-icon-size)}.van-uploader__file-name{box-sizing:border-box;width:100%;margin-top:var(--van-uploader-file-name-margin-top);padding:var(--van-uploader-file-name-padding);color:var(--van-uploader-file-name-text-color);font-size:var(--van-uploader-file-name-font-size);text-align:center}:root,:host{--van-tab-text-color: var(--van-gray-7);--van-tab-active-text-color: var(--van-text-color);--van-tab-disabled-text-color: var(--van-text-color-3);--van-tab-font-size: var(--van-font-size-md);--van-tab-line-height: var(--van-line-height-md);--van-tabs-default-color: var(--van-primary-color);--van-tabs-line-height: 44px;--van-tabs-card-height: 30px;--van-tabs-nav-background: var(--van-background-2);--van-tabs-bottom-bar-width: 40px;--van-tabs-bottom-bar-height: 3px;--van-tabs-bottom-bar-color: var(--van-primary-color)}.van-tab{position:relative;display:flex;flex:1;align-items:center;justify-content:center;box-sizing:border-box;padding:0 var(--van-padding-base);color:var(--van-tab-text-color);font-size:var(--van-tab-font-size);line-height:var(--van-tab-line-height);cursor:pointer}.van-tab--active{color:var(--van-tab-active-text-color);font-weight:var(--van-font-bold)}.van-tab--disabled{color:var(--van-tab-disabled-text-color);cursor:not-allowed}.van-tab--grow{flex:1 0 auto;padding:0 var(--van-padding-sm)}.van-tab--shrink{flex:none;padding:0 var(--van-padding-xs)}.van-tab--card{color:var(--van-tabs-default-color);border-right:var(--van-border-width) solid var(--van-tabs-default-color)}.van-tab--card:last-child{border-right:none}.van-tab--card.van-tab--active{color:var(--van-white);background-color:var(--van-tabs-default-color)}.van-tab--card.van-tab--disabled{color:var(--van-tab-disabled-text-color)}.van-tab__text--ellipsis{display:-webkit-box;overflow:hidden;-webkit-line-clamp:1;-webkit-box-orient:vertical}.van-tabs{position:relative}.van-tabs__wrap{overflow:hidden}.van-tabs__wrap--page-top{position:fixed}.van-tabs__wrap--content-bottom{top:auto;bottom:0}.van-tabs__nav{position:relative;display:flex;background:var(--van-tabs-nav-background);-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-tabs__nav--complete{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.van-tabs__nav--complete::-webkit-scrollbar{display:none}.van-tabs__nav--line{box-sizing:content-box;height:100%;padding-bottom:15px}.van-tabs__nav--line.van-tabs__nav--shrink,.van-tabs__nav--line.van-tabs__nav--complete{padding-right:var(--van-padding-xs);padding-left:var(--van-padding-xs)}.van-tabs__nav--card{box-sizing:border-box;height:var(--van-tabs-card-height);margin:0 var(--van-padding-md);border:var(--van-border-width) solid var(--van-tabs-default-color);border-radius:var(--van-radius-sm)}.van-tabs__nav--card.van-tabs__nav--shrink{display:inline-flex}.van-tabs__line{position:absolute;bottom:15px;left:0;z-index:1;width:var(--van-tabs-bottom-bar-width);height:var(--van-tabs-bottom-bar-height);background:var(--van-tabs-bottom-bar-color);border-radius:var(--van-tabs-bottom-bar-height)}.van-tabs__track{position:relative;display:flex;width:100%;height:100%;will-change:left}.van-tabs__content--animated{overflow:hidden}.van-tabs--line .van-tabs__wrap{height:var(--van-tabs-line-height)}.van-tabs--card>.van-tabs__wrap{height:var(--van-tabs-card-height)}.van-tab__panel,.van-tab__panel-wrapper{flex-shrink:0;box-sizing:border-box;width:100%}.van-tab__panel-wrapper--inactive{height:0;overflow:visible}:root,:host{--van-cascader-header-height: 48px;--van-cascader-header-padding: 0 var(--van-padding-md);--van-cascader-title-font-size: var(--van-font-size-lg);--van-cascader-title-line-height: 20px;--van-cascader-close-icon-size: 22px;--van-cascader-close-icon-color: var(--van-gray-5);--van-cascader-selected-icon-size: 18px;--van-cascader-tabs-height: 48px;--van-cascader-active-color: var(--van-primary-color);--van-cascader-options-height: 384px;--van-cascader-option-disabled-color: var(--van-text-color-3);--van-cascader-tab-color: var(--van-text-color);--van-cascader-unselected-tab-color: var(--van-text-color-2)}.van-cascader__header{display:flex;align-items:center;justify-content:space-between;height:var(--van-cascader-header-height);padding:var(--van-cascader-header-padding)}.van-cascader__title{font-weight:var(--van-font-bold);font-size:var(--van-cascader-title-font-size);line-height:var(--van-cascader-title-line-height)}.van-cascader__close-icon{color:var(--van-cascader-close-icon-color);font-size:var(--van-cascader-close-icon-size)}.van-cascader__tabs.van-tabs--line .van-tabs__wrap{height:var(--van-cascader-tabs-height)}.van-cascader__tab{color:var(--van-cascader-tab-color);font-weight:var(--van-font-bold)}.van-cascader__tab--unselected{color:var(--van-cascader-unselected-tab-color);font-weight:400}.van-cascader__option{display:flex;align-items:center;justify-content:space-between;padding:10px var(--van-padding-md);font-size:var(--van-font-size-md);line-height:var(--van-line-height-md);cursor:pointer}.van-cascader__option:active{background-color:var(--van-active-color)}.van-cascader__option--selected{color:var(--van-cascader-active-color);font-weight:var(--van-font-bold)}.van-cascader__option--disabled{color:var(--van-cascader-option-disabled-color);cursor:not-allowed}.van-cascader__option--disabled:active{background-color:transparent}.van-cascader__selected-icon{font-size:var(--van-cascader-selected-icon-size)}.van-cascader__options{box-sizing:border-box;height:var(--van-cascader-options-height);padding-top:6px;overflow-y:auto;-webkit-overflow-scrolling:touch}:root,:host{--van-picker-background: var(--van-background-2);--van-picker-toolbar-height: 44px;--van-picker-title-font-size: var(--van-font-size-lg);--van-picker-title-line-height: var(--van-line-height-md);--van-picker-action-padding: 0 var(--van-padding-md);--van-picker-action-font-size: var(--van-font-size-md);--van-picker-confirm-action-color: var(--van-primary-color);--van-picker-cancel-action-color: var(--van-text-color-2);--van-picker-option-font-size: var(--van-font-size-lg);--van-picker-option-padding: 0 var(--van-padding-base);--van-picker-option-text-color: var(--van-text-color);--van-picker-option-disabled-opacity: .3;--van-picker-loading-icon-color: var(--van-primary-color);--van-picker-loading-mask-color: rgba(255, 255, 255, .9);--van-picker-mask-color: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .4)), linear-gradient(0deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .4))}.van-theme-dark{--van-picker-loading-mask-color: rgba(0, 0, 0, .6);--van-picker-mask-color: linear-gradient(180deg, rgba(0, 0, 0, .6), rgba(0, 0, 0, .1)), linear-gradient(0deg, rgba(0, 0, 0, .6), rgba(0, 0, 0, .1))}.van-picker{position:relative;background:var(--van-picker-background);-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-picker__toolbar{position:relative;display:flex;align-items:center;justify-content:space-between;height:var(--van-picker-toolbar-height)}.van-picker__cancel,.van-picker__confirm{height:100%;padding:var(--van-picker-action-padding);font-size:var(--van-picker-action-font-size);background-color:transparent;border:none}.van-picker__confirm{color:var(--van-picker-confirm-action-color)}.van-picker__cancel{color:var(--van-picker-cancel-action-color)}.van-picker__title{position:absolute;left:50%;color:var(--van-text-color);max-width:50%;font-weight:var(--van-font-bold);font-size:var(--van-picker-title-font-size);line-height:var(--van-picker-title-line-height);text-align:center;transform:translate(-50%)}.van-picker__columns{position:relative;display:flex;cursor:grab}.van-picker__loading{position:absolute;top:0;right:0;bottom:0;left:0;z-index:3;display:flex;align-items:center;justify-content:center;color:var(--van-picker-loading-icon-color);background:var(--van-picker-loading-mask-color)}.van-picker__frame{position:absolute;top:50%;right:var(--van-padding-md);left:var(--van-padding-md);z-index:2;transform:translateY(-50%);pointer-events:none}.van-picker__mask{position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;background-image:var(--van-picker-mask-color);background-repeat:no-repeat;background-position:top,bottom;transform:translateZ(0);pointer-events:none}.van-picker-column{flex:1;overflow:hidden;font-size:var(--van-picker-option-font-size)}.van-picker-column__wrapper{transition-timing-function:cubic-bezier(.23,1,.68,1)}.van-picker-column__item{display:flex;align-items:center;justify-content:center;padding:var(--van-picker-option-padding);color:var(--van-picker-option-text-color)}.van-picker-column__item--disabled{cursor:not-allowed;opacity:var(--van-picker-option-disabled-opacity)}:root,:host{--van-picker-group-background: var(--van-background-2)}.van-picker-group{background:var(--van-picker-group-background)}.van-picker-group__tabs{margin-top:var(--van-padding-base)}.van-picker-group__tab-title{margin-right:16px}:root,:host{--van-calendar-background: var(--van-background-2);--van-calendar-popup-height: 80%;--van-calendar-header-shadow: 0 2px 10px rgba(125, 126, 128, .16);--van-calendar-header-title-height: 44px;--van-calendar-header-title-font-size: var(--van-font-size-lg);--van-calendar-header-subtitle-font-size: var(--van-font-size-md);--van-calendar-header-action-width: 28px;--van-calendar-header-action-color: var(--van-text-color);--van-calendar-header-action-disabled-color: var(--van-text-color-3);--van-calendar-weekdays-height: 30px;--van-calendar-weekdays-font-size: var(--van-font-size-sm);--van-calendar-month-title-font-size: var(--van-font-size-md);--van-calendar-month-mark-color: rgba(242, 243, 245, .8);--van-calendar-month-mark-font-size: 160px;--van-calendar-day-height: 64px;--van-calendar-day-font-size: var(--van-font-size-lg);--van-calendar-day-margin-bottom: 4px;--van-calendar-day-disabled-color: var(--van-text-color-3);--van-calendar-range-edge-color: var(--van-white);--van-calendar-range-edge-background: var(--van-primary-color);--van-calendar-range-middle-color: var(--van-primary-color);--van-calendar-range-middle-background-opacity: .1;--van-calendar-selected-day-size: 54px;--van-calendar-selected-day-color: var(--van-white);--van-calendar-selected-day-background: var(--van-primary-color);--van-calendar-info-font-size: var(--van-font-size-xs);--van-calendar-info-line-height: var(--van-line-height-xs);--van-calendar-confirm-button-height: 36px;--van-calendar-confirm-button-margin: 7px 0}.van-theme-dark{--van-calendar-month-mark-color: rgba(100, 101, 102, .2);--van-calendar-day-disabled-color: var(--van-gray-7)}.van-calendar{display:flex;flex-direction:column;height:100%;background:var(--van-calendar-background)}.van-calendar__popup.van-popup--top,.van-calendar__popup.van-popup--bottom{height:var(--van-calendar-popup-height)}.van-calendar__popup.van-popup--left,.van-calendar__popup.van-popup--right{height:100%}.van-calendar__popup .van-popup__close-icon{top:11px}.van-calendar__header{flex-shrink:0;box-shadow:var(--van-calendar-header-shadow)}.van-calendar__month-title,.van-calendar__header-title,.van-calendar__header-subtitle{color:var(--van-text-color);height:var(--van-calendar-header-title-height);font-weight:var(--van-font-bold);line-height:var(--van-calendar-header-title-height);text-align:center}.van-calendar__header-title{font-size:var(--van-calendar-header-title-font-size)}.van-calendar__header-subtitle{font-size:var(--van-calendar-header-subtitle-font-size)}.van-calendar__header-subtitle--with-switch{display:flex;align-items:center;padding:0 var(--van-padding-base)}.van-calendar__header-subtitle-text{flex:1}.van-calendar__header-action{display:flex;align-items:center;justify-content:center;min-width:var(--van-calendar-header-action-width);height:100%;color:var(--van-calendar-header-action-color);cursor:pointer}.van-calendar__header-action--disabled{color:var(--van-calendar-header-action-disabled-color);cursor:not-allowed}.van-calendar__month-title{font-size:var(--van-calendar-month-title-font-size)}.van-calendar__weekdays{display:flex}.van-calendar__weekday{flex:1;font-size:var(--van-calendar-weekdays-font-size);line-height:var(--van-calendar-weekdays-height);text-align:center}.van-calendar__body{flex:1;overflow:auto;-webkit-overflow-scrolling:touch}.van-calendar__days{position:relative;display:flex;flex-wrap:wrap;-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-calendar__month-mark{position:absolute;top:50%;left:50%;z-index:0;color:var(--van-calendar-month-mark-color);font-size:var(--van-calendar-month-mark-font-size);transform:translate(-50%,-50%);pointer-events:none}.van-calendar__day,.van-calendar__selected-day{display:flex;align-items:center;justify-content:center;text-align:center}.van-calendar__day{position:relative;width:14.285%;height:var(--van-calendar-day-height);font-size:var(--van-calendar-day-font-size);margin-bottom:var(--van-calendar-day-margin-bottom);cursor:pointer}.van-calendar__day--end,.van-calendar__day--start,.van-calendar__day--start-end,.van-calendar__day--multiple-middle,.van-calendar__day--multiple-selected{color:var(--van-calendar-range-edge-color);background:var(--van-calendar-range-edge-background)}.van-calendar__day--start{border-radius:var(--van-radius-md) 0 0 var(--van-radius-md)}.van-calendar__day--end{border-radius:0 var(--van-radius-md) var(--van-radius-md) 0}.van-calendar__day--start-end,.van-calendar__day--multiple-selected{border-radius:var(--van-radius-md)}.van-calendar__day--middle{color:var(--van-calendar-range-middle-color)}.van-calendar__day--middle:after{position:absolute;top:0;right:0;bottom:0;left:0;background-color:currentColor;opacity:var(--van-calendar-range-middle-background-opacity);content:""}.van-calendar__day--disabled{color:var(--van-calendar-day-disabled-color);cursor:default}.van-calendar__top-info,.van-calendar__bottom-info{position:absolute;right:0;left:0;font-size:var(--van-calendar-info-font-size);line-height:var(--van-calendar-info-line-height)}@media (max-width:350px){.van-calendar__top-info,.van-calendar__bottom-info{font-size:9px}}.van-calendar__top-info{top:6px}.van-calendar__bottom-info{bottom:6px}.van-calendar__selected-day{width:var(--van-calendar-selected-day-size);height:var(--van-calendar-selected-day-size);color:var(--van-calendar-selected-day-color);background:var(--van-calendar-selected-day-background);border-radius:var(--van-radius-md)}.van-calendar__footer{flex-shrink:0;padding-left:var(--van-padding-md);padding-right:var(--van-padding-md)}.van-calendar__confirm{height:var(--van-calendar-confirm-button-height);margin:var(--van-calendar-confirm-button-margin)}:root,:host{--van-address-edit-padding: var(--van-padding-sm);--van-address-edit-buttons-padding: var(--van-padding-xl) var(--van-padding-base);--van-address-edit-button-margin-bottom: var(--van-padding-sm);--van-address-edit-button-font-size: var(--van-font-size-lg)}.van-address-edit{padding:var(--van-address-edit-padding)}.van-address-edit__fields{overflow:hidden;border-radius:var(--van-padding-xs)}.van-address-edit__fields .van-field__label{width:4.1em}.van-address-edit__default{margin-top:var(--van-padding-sm);overflow:hidden;border-radius:var(--van-padding-xs)}.van-address-edit__buttons{padding:var(--van-address-edit-buttons-padding)}.van-address-edit__button{margin-bottom:var(--van-address-edit-button-margin-bottom);font-size:var(--van-address-edit-button-font-size)}.van-address-edit-detail__search-item{background:var(--van-gray-2)}.van-radio-group--horizontal,.van-checkbox-group--horizontal{display:flex;flex-wrap:wrap}:root,:host{--van-checkbox-size: 20px;--van-checkbox-border-color: var(--van-gray-5);--van-checkbox-duration: var(--van-duration-fast);--van-checkbox-label-margin: var(--van-padding-xs);--van-checkbox-label-color: var(--van-text-color);--van-checkbox-checked-icon-color: var(--van-primary-color);--van-checkbox-disabled-icon-color: var(--van-gray-5);--van-checkbox-disabled-label-color: var(--van-text-color-3);--van-checkbox-disabled-background: var(--van-border-color)}.van-checkbox{display:flex;align-items:center;overflow:hidden;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-checkbox--disabled{cursor:not-allowed}.van-checkbox--label-disabled{cursor:default}.van-checkbox--horizontal{margin-right:var(--van-padding-sm)}.van-checkbox__icon{flex:none;height:1em;font-size:var(--van-checkbox-size);line-height:1em;cursor:pointer}.van-checkbox__icon .van-icon{display:block;box-sizing:border-box;width:1.25em;height:1.25em;color:transparent;font-size:.8em;line-height:1.25;text-align:center;border:1px solid var(--van-checkbox-border-color);transition-duration:var(--van-checkbox-duration);transition-property:color,border-color,background-color}.van-checkbox__icon--round .van-icon{border-radius:100%}.van-checkbox__icon--indeterminate .van-icon{display:flex;align-items:center;justify-content:center;color:var(--van-white);border-color:var(--van-checkbox-checked-icon-color);background-color:var(--van-checkbox-checked-icon-color)}.van-checkbox__icon--checked .van-icon{color:var(--van-white);background-color:var(--van-checkbox-checked-icon-color);border-color:var(--van-checkbox-checked-icon-color)}.van-checkbox__icon--disabled{cursor:not-allowed}.van-checkbox__icon--disabled .van-icon{background-color:var(--van-checkbox-disabled-background);border-color:var(--van-checkbox-disabled-icon-color)}.van-checkbox__icon--disabled.van-checkbox__icon--checked .van-icon{color:var(--van-checkbox-disabled-icon-color)}.van-checkbox__label{margin-left:var(--van-checkbox-label-margin);color:var(--van-checkbox-label-color);line-height:var(--van-checkbox-size)}.van-checkbox__label--left{margin:0 var(--van-checkbox-label-margin) 0 0}.van-checkbox__label--disabled{color:var(--van-checkbox-disabled-label-color)}:root,:host{--van-coupon-margin: 0 var(--van-padding-sm) var(--van-padding-sm);--van-coupon-content-height: 84px;--van-coupon-content-padding: 14px 0;--van-coupon-content-text-color: var(--van-text-color);--van-coupon-background: var(--van-background-2);--van-coupon-active-background: var(--van-active-color);--van-coupon-radius: var(--van-radius-lg);--van-coupon-shadow: 0 0 4px rgba(0, 0, 0, .1);--van-coupon-head-width: 96px;--van-coupon-amount-color: var(--van-primary-color);--van-coupon-amount-font-size: 30px;--van-coupon-currency-font-size: 40%;--van-coupon-name-font-size: var(--van-font-size-md);--van-coupon-disabled-text-color: var(--van-text-color-2);--van-coupon-description-padding: var(--van-padding-xs) var(--van-padding-md);--van-coupon-description-border-color: var(--van-border-color);--van-coupon-checkbox-color: var(--van-primary-color)}.van-coupon{margin:var(--van-coupon-margin);overflow:hidden;background:var(--van-coupon-background);border-radius:var(--van-coupon-radius);box-shadow:var(--van-coupon-shadow)}.van-coupon:active{background-color:var(--van-coupon-active-background)}.van-coupon__content{display:flex;align-items:center;box-sizing:border-box;min-height:var(--van-coupon-content-height);padding:var(--van-coupon-content-padding);color:var(--van-coupon-content-text-color)}.van-coupon__head{position:relative;min-width:var(--van-coupon-head-width);padding:0 var(--van-padding-xs);color:var(--van-coupon-amount-color);text-align:center}.van-coupon__amount,.van-coupon__condition,.van-coupon__name,.van-coupon__valid{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-coupon__amount{margin-bottom:6px;font-weight:var(--van-font-bold);font-size:var(--van-coupon-amount-font-size);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-coupon__amount span{font-size:var(--van-coupon-currency-font-size)}.van-coupon__amount span:not(:empty){margin-left:2px}.van-coupon__condition{font-size:var(--van-font-size-sm);line-height:16px;white-space:pre-wrap}.van-coupon__body{position:relative;flex:1}.van-coupon__name{margin-bottom:10px;font-weight:var(--van-font-bold);font-size:var(--van-coupon-name-font-size);line-height:var(--van-line-height-md)}.van-coupon__valid{font-size:var(--van-font-size-sm)}.van-coupon__corner{position:absolute;top:0;right:var(--van-padding-md);bottom:0}.van-coupon__corner .van-checkbox__icon--checked .van-icon{background-color:var(--van-coupon-checkbox-color);border-color:var(--van-coupon-checkbox-color)}.van-coupon__description{padding:var(--van-coupon-description-padding);font-size:var(--van-font-size-sm);border-top:1px dashed var(--van-coupon-description-border-color)}.van-coupon--disabled:active{background-color:var(--van-coupon-background)}.van-coupon--disabled .van-coupon-item__content{height:calc(var(--van-coupon-content-height) - 10px)}.van-coupon--disabled .van-coupon__head{color:inherit}:root,:host{--van-radio-size: 20px;--van-radio-dot-size: 8px;--van-radio-border-color: var(--van-gray-5);--van-radio-duration: var(--van-duration-fast);--van-radio-label-margin: var(--van-padding-xs);--van-radio-label-color: var(--van-text-color);--van-radio-checked-icon-color: var(--van-primary-color);--van-radio-disabled-icon-color: var(--van-gray-5);--van-radio-disabled-label-color: var(--van-text-color-3);--van-radio-disabled-background: var(--van-border-color)}.van-radio{display:flex;align-items:center;overflow:hidden;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-radio--disabled{cursor:not-allowed}.van-radio--label-disabled{cursor:default}.van-radio--horizontal{margin-right:var(--van-padding-sm)}.van-radio__icon{flex:none;height:1em;font-size:var(--van-radio-size);line-height:1em;cursor:pointer}.van-radio__icon .van-icon{display:block;box-sizing:border-box;width:1.25em;height:1.25em;color:transparent;font-size:.8em;line-height:1.25;text-align:center;border:1px solid var(--van-radio-border-color);transition-duration:var(--van-radio-duration);transition-property:color,border-color,background-color}.van-radio__icon--round .van-icon{border-radius:100%}.van-radio__icon--dot{position:relative;border-radius:100%;box-sizing:border-box;width:var(--van-radio-size);height:var(--van-radio-size);border:1px solid var(--van-radio-border-color);transition-duration:var(--van-radio-duration);transition-property:border-color}.van-radio__icon--dot__icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:100%;height:calc(100% - var(--van-radio-dot-size));width:calc(100% - var(--van-radio-dot-size));transition-duration:var(--van-radio-duration);transition-property:background-color}.van-radio__icon--checked .van-icon{color:var(--van-white);background-color:var(--van-radio-checked-icon-color);border-color:var(--van-radio-checked-icon-color)}.van-radio__icon--checked.van-radio__icon--dot{border-color:var(--van-radio-checked-icon-color)}.van-radio__icon--checked.van-radio__icon--dot .van-radio__icon--dot__icon{background:var(--van-radio-checked-icon-color)}.van-radio__icon--disabled{cursor:not-allowed}.van-radio__icon--disabled .van-icon{background-color:var(--van-radio-disabled-background);border-color:var(--van-radio-disabled-icon-color)}.van-radio__icon--disabled.van-radio__icon--checked .van-icon{color:var(--van-radio-disabled-icon-color)}.van-radio__label{margin-left:var(--van-radio-label-margin);color:var(--van-radio-label-color);line-height:var(--van-radio-size)}.van-radio__label--left{margin:0 var(--van-radio-label-margin) 0 0}.van-radio__label--disabled{color:var(--van-radio-disabled-label-color)}:root,:host{--van-contact-list-padding: var(--van-padding-sm) var(--van-padding-sm) 80px;--van-contact-list-edit-icon-size: 16px;--van-contact-list-add-button-z-index: 999;--van-contact-list-radio-color: var(--van-primary-color);--van-contact-list-item-padding: var(--van-padding-md)}.van-contact-list{box-sizing:border-box;height:100%;padding:var(--van-contact-list-padding)}.van-contact-list__item{padding:var(--van-contact-list-item-padding)}.van-contact-list__item-title{display:flex;align-items:center;padding-right:var(--van-padding-xl);padding-left:var(--van-padding-xs)}.van-contact-list__item-tag{flex:none;margin-left:var(--van-padding-xs);padding-top:0;padding-bottom:0;line-height:1.4em}.van-contact-list__group{box-sizing:border-box;height:100%;overflow-y:scroll;-webkit-overflow-scrolling:touch;border-radius:var(--van-radius-lg)}.van-contact-list__edit{font-size:var(--van-contact-list-edit-icon-size)}.van-contact-list__radio .van-radio__icon--checked .van-icon{background-color:var(--van-contact-list-radio-color);border-color:var(--van-contact-list-radio-color)}.van-contact-list__bottom{position:fixed;right:0;bottom:0;left:0;z-index:var(--van-contact-list-add-button-z-index);padding-left:var(--van-padding-md);padding-right:var(--van-padding-md);background-color:var(--van-background-2)}.van-contact-list__add{height:40px;margin:5px 0}:root,:host{--van-address-list-padding: var(--van-padding-sm) var(--van-padding-sm) 80px;--van-address-list-disabled-text-color: var(--van-text-color-2);--van-address-list-disabled-text-padding: calc(var(--van-padding-base) * 5) 0;--van-address-list-disabled-text-font-size: var(--van-font-size-md);--van-address-list-disabled-text-line-height: var(--van-line-height-md);--van-address-list-add-button-z-index: 999;--van-address-list-item-padding: var(--van-padding-sm);--van-address-list-item-text-color: var(--van-text-color);--van-address-list-item-disabled-text-color: var(--van-text-color-3);--van-address-list-item-font-size: 13px;--van-address-list-item-line-height: var(--van-line-height-sm);--van-address-list-radio-color: var(--van-primary-color);--van-address-list-edit-icon-size: 20px}.van-address-list{box-sizing:border-box;height:100%;padding:var(--van-address-list-padding)}.van-address-list__bottom{position:fixed;bottom:0;left:0;z-index:var(--van-address-list-add-button-z-index);box-sizing:border-box;width:100%;padding-left:var(--van-padding-md);padding-right:var(--van-padding-md);background-color:var(--van-background-2)}.van-address-list__add{height:40px;margin:5px 0}.van-address-list__disabled-text{padding:var(--van-address-list-disabled-text-padding);color:var(--van-address-list-disabled-text-color);font-size:var(--van-address-list-disabled-text-font-size);line-height:var(--van-address-list-disabled-text-line-height)}.van-address-item{padding:var(--van-address-list-item-padding);background-color:var(--van-background-2);border-radius:var(--van-radius-lg)}.van-address-item:not(:last-child){margin-bottom:var(--van-padding-sm)}.van-address-item__title{padding-right:44px}.van-address-item__name{display:flex;align-items:center;margin-bottom:var(--van-padding-xs);font-size:var(--van-font-size-lg);line-height:var(--van-line-height-lg)}.van-address-item__tag{flex:none;margin-left:var(--van-padding-xs);padding-top:0;padding-bottom:0;line-height:1.4em}.van-address-item__address{color:var(--van-address-list-item-text-color);font-size:var(--van-address-list-item-font-size);line-height:var(--van-address-list-item-line-height)}.van-address-item--disabled .van-address-item__name,.van-address-item--disabled .van-address-item__address{color:var(--van-address-list-item-disabled-text-color)}.van-address-item__edit{position:absolute;top:50%;right:var(--van-padding-md);color:var(--van-gray-6);font-size:var(--van-address-list-edit-icon-size);transform:translateY(-50%)}.van-address-item .van-cell{padding:0}.van-address-item .van-radio__label{margin-left:var(--van-padding-sm)}.van-address-item .van-radio__icon--checked .van-icon{background-color:var(--van-address-list-radio-color);border-color:var(--van-address-list-radio-color)}:root,:host{--van-barrage-font-size: 16px;--van-barrage-space: 10px;--van-barrage-font: inherit;--van-barrage-color: var(--van-white)}.van-barrage{position:relative;overflow:hidden}.van-barrage__item{position:absolute;top:0;right:0;z-index:99;padding-bottom:var(--van-barrage-space);opacity:.75;line-height:1;font-size:var(--van-barrage-font-size);font-family:var(--van-barrage-font);font-weight:700;white-space:nowrap;color:var(--van-barrage-color);text-shadow:1px 0 1px #000000,0 1px 1px #000000,0 -1px 1px #000000,-1px 0 1px #000000;-webkit-user-select:none;-moz-user-select:none;user-select:none;will-change:transform;transform:translate(110%)}@keyframes van-barrage{0%{transform:translate(110%)}to{transform:translate(var(--move-distance))}}:root,:host{--van-cell-group-background: var(--van-background-2);--van-cell-group-title-color: var(--van-text-color-2);--van-cell-group-title-padding: var(--van-padding-md) var(--van-padding-md);--van-cell-group-title-font-size: var(--van-font-size-md);--van-cell-group-title-line-height: 16px;--van-cell-group-inset-padding: 0 var(--van-padding-md);--van-cell-group-inset-radius: var(--van-radius-lg);--van-cell-group-inset-title-padding: var(--van-padding-md) var(--van-padding-md)}.van-cell-group{background:var(--van-cell-group-background)}.van-cell-group--inset{margin:var(--van-cell-group-inset-padding);border-radius:var(--van-cell-group-inset-radius);overflow:hidden}.van-cell-group__title{padding:var(--van-cell-group-title-padding);color:var(--van-cell-group-title-color);font-size:var(--van-cell-group-title-font-size);line-height:var(--van-cell-group-title-line-height)}.van-cell-group__title--inset{padding:var(--van-cell-group-inset-title-padding)}:root,:host{--van-circle-size: 100px;--van-circle-color: var(--van-primary-color);--van-circle-layer-color: var(--van-white);--van-circle-text-color: var(--van-text-color);--van-circle-text-font-weight: var(--van-font-bold);--van-circle-text-font-size: var(--van-font-size-md);--van-circle-text-line-height: var(--van-line-height-md)}.van-circle{position:relative;display:inline-block;width:var(--van-circle-size);height:var(--van-circle-size);text-align:center}.van-circle svg{position:absolute;top:0;left:0;width:100%;height:100%}.van-circle__layer{stroke:var(--van-circle-layer-color)}.van-circle__hover{fill:none;stroke:var(--van-circle-color);stroke-linecap:round}.van-circle__text{position:absolute;top:50%;left:0;box-sizing:border-box;width:100%;padding:0 var(--van-padding-base);color:var(--van-circle-text-color);font-weight:var(--van-circle-text-font-weight);font-size:var(--van-circle-text-font-size);line-height:var(--van-circle-text-line-height);transform:translateY(-50%)}.van-row{display:flex;flex-wrap:wrap}.van-row--nowrap{flex-wrap:nowrap}.van-row--justify-center{justify-content:center}.van-row--justify-end{justify-content:flex-end}.van-row--justify-space-between{justify-content:space-between}.van-row--justify-space-around{justify-content:space-around}.van-row--align-center{align-items:center}.van-row--align-bottom{align-items:flex-end}.van-col{display:block;box-sizing:border-box;min-height:1px}.van-col--1{flex:0 0 4.16666667%;max-width:4.16666667%}.van-col--offset-1{margin-left:4.16666667%}.van-col--2{flex:0 0 8.33333333%;max-width:8.33333333%}.van-col--offset-2{margin-left:8.33333333%}.van-col--3{flex:0 0 12.5%;max-width:12.5%}.van-col--offset-3{margin-left:12.5%}.van-col--4{flex:0 0 16.66666667%;max-width:16.66666667%}.van-col--offset-4{margin-left:16.66666667%}.van-col--5{flex:0 0 20.83333333%;max-width:20.83333333%}.van-col--offset-5{margin-left:20.83333333%}.van-col--6{flex:0 0 25%;max-width:25%}.van-col--offset-6{margin-left:25%}.van-col--7{flex:0 0 29.16666667%;max-width:29.16666667%}.van-col--offset-7{margin-left:29.16666667%}.van-col--8{flex:0 0 33.33333333%;max-width:33.33333333%}.van-col--offset-8{margin-left:33.33333333%}.van-col--9{flex:0 0 37.5%;max-width:37.5%}.van-col--offset-9{margin-left:37.5%}.van-col--10{flex:0 0 41.66666667%;max-width:41.66666667%}.van-col--offset-10{margin-left:41.66666667%}.van-col--11{flex:0 0 45.83333333%;max-width:45.83333333%}.van-col--offset-11{margin-left:45.83333333%}.van-col--12{flex:0 0 50%;max-width:50%}.van-col--offset-12{margin-left:50%}.van-col--13{flex:0 0 54.16666667%;max-width:54.16666667%}.van-col--offset-13{margin-left:54.16666667%}.van-col--14{flex:0 0 58.33333333%;max-width:58.33333333%}.van-col--offset-14{margin-left:58.33333333%}.van-col--15{flex:0 0 62.5%;max-width:62.5%}.van-col--offset-15{margin-left:62.5%}.van-col--16{flex:0 0 66.66666667%;max-width:66.66666667%}.van-col--offset-16{margin-left:66.66666667%}.van-col--17{flex:0 0 70.83333333%;max-width:70.83333333%}.van-col--offset-17{margin-left:70.83333333%}.van-col--18{flex:0 0 75%;max-width:75%}.van-col--offset-18{margin-left:75%}.van-col--19{flex:0 0 79.16666667%;max-width:79.16666667%}.van-col--offset-19{margin-left:79.16666667%}.van-col--20{flex:0 0 83.33333333%;max-width:83.33333333%}.van-col--offset-20{margin-left:83.33333333%}.van-col--21{flex:0 0 87.5%;max-width:87.5%}.van-col--offset-21{margin-left:87.5%}.van-col--22{flex:0 0 91.66666667%;max-width:91.66666667%}.van-col--offset-22{margin-left:91.66666667%}.van-col--23{flex:0 0 95.83333333%;max-width:95.83333333%}.van-col--offset-23{margin-left:95.83333333%}.van-col--24{flex:0 0 100%;max-width:100%}.van-col--offset-24{margin-left:100%}:root,:host{--van-count-down-text-color: var(--van-text-color);--van-count-down-font-size: var(--van-font-size-md);--van-count-down-line-height: var(--van-line-height-md)}.van-count-down{color:var(--van-count-down-text-color);font-size:var(--van-count-down-font-size);line-height:var(--van-count-down-line-height)}:root,:host{--van-empty-padding: var(--van-padding-xl) 0;--van-empty-image-size: 160px;--van-empty-description-margin-top: var(--van-padding-md);--van-empty-description-padding: 0 60px;--van-empty-description-color: var(--van-text-color-2);--van-empty-description-font-size: var(--van-font-size-md);--van-empty-description-line-height: var(--van-line-height-md);--van-empty-bottom-margin-top: 24px}.van-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;padding:var(--van-empty-padding)}.van-empty__image{width:var(--van-empty-image-size);height:var(--van-empty-image-size)}.van-empty__image img{width:100%;height:100%}.van-empty__description{margin-top:var(--van-empty-description-margin-top);padding:var(--van-empty-description-padding);color:var(--van-empty-description-color);font-size:var(--van-empty-description-font-size);line-height:var(--van-empty-description-line-height)}.van-empty__bottom{margin-top:var(--van-empty-bottom-margin-top)}.van-theme-dark .van-empty{opacity:.5}:root,:host{--van-coupon-list-background: var(--van-background);--van-coupon-list-field-padding: 5px 0 5px var(--van-padding-md);--van-coupon-list-exchange-button-height: 32px;--van-coupon-list-close-button-height: 40px;--van-coupon-list-empty-tip-color: var(--van-text-color-2);--van-coupon-list-empty-tip-font-size: var(--van-font-size-md);--van-coupon-list-empty-tip-line-height: var(--van-line-height-md)}.van-coupon-list{position:relative;height:100%;background:var(--van-coupon-list-background)}.van-coupon-list__field{padding:var(--van-coupon-list-field-padding)}.van-coupon-list__field .van-field__body{height:34px;padding-left:var(--van-padding-sm);line-height:34px;background:var(--van-background);border-radius:var(--van-radius-max)}.van-coupon-list__field .van-field__body::-moz-placeholder{color:var(--van-text-color-3)}.van-coupon-list__field .van-field__body::placeholder{color:var(--van-text-color-3)}.van-coupon-list__field .van-field__clear{margin-right:0}.van-coupon-list__exchange-bar{display:flex;align-items:center;background-color:var(--van-background-2)}.van-coupon-list__exchange{flex:none;height:var(--van-coupon-list-exchange-button-height);font-size:var(--van-font-size-lg);line-height:calc(var(--van-coupon-list-exchange-button-height) - 2px);border:0}.van-coupon-list .van-tabs__wrap{box-shadow:0 6px 12px -12px var(--van-gray-6)}.van-coupon-list__list{box-sizing:border-box;padding:var(--van-padding-md) 0 var(--van-padding-lg);overflow-y:auto;-webkit-overflow-scrolling:touch}.van-coupon-list__list--with-bottom{padding-bottom:50px}.van-coupon-list__bottom{position:absolute;bottom:0;left:0;z-index:999;box-sizing:border-box;width:100%;padding:5px var(--van-padding-md);font-weight:var(--van-font-bold);background-color:var(--van-background-2)}.van-coupon-list__close{height:var(--van-coupon-list-close-button-height)}.van-coupon-list__empty-tip{color:var(--van-coupon-list-empty-tip-color);font-size:var(--van-coupon-list-empty-tip-font-size);line-height:var(--van-coupon-list-empty-tip-line-height)}:root,:host{--van-divider-margin: var(--van-padding-md) 0;--van-divider-vertical-margin: 0 var(--van-padding-xs);--van-divider-text-color: var(--van-text-color-2);--van-divider-font-size: var(--van-font-size-md);--van-divider-line-height: 24px;--van-divider-border-color: var(--van-border-color);--van-divider-content-padding: var(--van-padding-md);--van-divider-content-left-width: 10%;--van-divider-content-right-width: 10%}.van-divider{display:flex;align-items:center;margin:var(--van-divider-margin);color:var(--van-divider-text-color);font-size:var(--van-divider-font-size);line-height:var(--van-divider-line-height);border-color:var(--van-divider-border-color);border-style:solid;border-width:0}.van-divider:before,.van-divider:after{display:block;flex:1;box-sizing:border-box;height:1px;border-color:inherit;border-style:inherit;border-width:var(--van-border-width) 0 0}.van-divider:before{content:""}.van-divider--hairline:before,.van-divider--hairline:after{transform:scaleY(.5)}.van-divider--dashed{border-style:dashed}.van-divider--content-center:before,.van-divider--content-left:before,.van-divider--content-right:before{margin-right:var(--van-divider-content-padding)}.van-divider--content-center:after,.van-divider--content-left:after,.van-divider--content-right:after{margin-left:var(--van-divider-content-padding);content:""}.van-divider--content-left:before{max-width:var(--van-divider-content-left-width)}.van-divider--content-right:after{max-width:var(--van-divider-content-right-width)}.van-divider--vertical{display:inline-block;width:var(--van-border-width);height:1em;margin:var(--van-divider-vertical-margin);vertical-align:middle}.van-divider--vertical:before{height:100%;border-width:0 0 0 var(--van-border-width)}.van-divider--vertical:after{display:none}.van-divider--vertical.van-divider--hairline:before{transform:scaleX(.5)}:root,:host{--van-dropdown-menu-height: 48px;--van-dropdown-menu-background: var(--van-background-2);--van-dropdown-menu-shadow: 0 2px 12px rgba(100, 101, 102, .12);--van-dropdown-menu-title-font-size: 15px;--van-dropdown-menu-title-text-color: var(--van-text-color);--van-dropdown-menu-title-active-text-color: var(--van-primary-color);--van-dropdown-menu-title-disabled-text-color: var(--van-text-color-2);--van-dropdown-menu-title-padding: 0 var(--van-padding-xs);--van-dropdown-menu-title-line-height: var(--van-line-height-lg);--van-dropdown-menu-option-active-color: var(--van-primary-color);--van-dropdown-menu-option-disabled-color: var(--van-text-color-3);--van-dropdown-menu-content-max-height: 80%}.van-dropdown-menu{-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-dropdown-menu__bar{position:relative;display:flex;height:var(--van-dropdown-menu-height);background:var(--van-dropdown-menu-background);box-shadow:var(--van-dropdown-menu-shadow)}.van-dropdown-menu__bar--opened{z-index:calc(var(--van-dropdown-item-z-index) + 1)}.van-dropdown-menu__bar--scrollable{padding-left:var(--van-padding-base);padding-right:var(--van-padding-xs);overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.van-dropdown-menu__bar--scrollable::-webkit-scrollbar{display:none}.van-dropdown-menu__item{display:flex;flex:1;align-items:center;justify-content:center;min-width:0}.van-dropdown-menu__item--disabled .van-dropdown-menu__title{color:var(--van-dropdown-menu-title-disabled-text-color)}.van-dropdown-menu__item--grow{flex:1 0 auto;padding-left:var(--van-padding-base);padding-right:var(--van-padding-sm)}.van-dropdown-menu__title{position:relative;box-sizing:border-box;max-width:100%;padding:var(--van-dropdown-menu-title-padding);color:var(--van-dropdown-menu-title-text-color);font-size:var(--van-dropdown-menu-title-font-size);line-height:var(--van-dropdown-menu-title-line-height)}.van-dropdown-menu__title:after{position:absolute;top:50%;right:-4px;margin-top:-5px;border:3px solid;border-color:transparent transparent var(--van-gray-4) var(--van-gray-4);transform:rotate(-45deg);opacity:.8;content:""}.van-dropdown-menu__title--active{color:var(--van-dropdown-menu-title-active-text-color)}.van-dropdown-menu__title--active:after{border-color:transparent transparent currentColor currentColor}.van-dropdown-menu__title--down:after{margin-top:-1px;transform:rotate(135deg)}:root,:host{--van-dropdown-item-z-index: 10}.van-dropdown-item{position:fixed;right:0;left:0;z-index:var(--van-dropdown-item-z-index);overflow:hidden}.van-dropdown-item__icon{display:block;line-height:inherit}.van-dropdown-item__option{text-align:left}.van-dropdown-item__option--active,.van-dropdown-item__option--active .van-dropdown-item__icon{color:var(--van-dropdown-menu-option-active-color)}.van-dropdown-item__option--disabled,.van-dropdown-item__option--disabled .van-dropdown-item__icon{color:var(--van-dropdown-menu-option-disabled-color)}.van-dropdown-item--up{top:0}.van-dropdown-item--down{bottom:0}.van-dropdown-item__content{position:absolute;max-height:var(--van-dropdown-menu-content-max-height)}:root,:host{--van-floating-panel-border-radius: 16px;--van-floating-panel-header-height: 30px;--van-floating-panel-z-index: 999;--van-floating-panel-background: var(--van-background-2);--van-floating-panel-bar-width: 20px;--van-floating-panel-bar-height: 3px;--van-floating-panel-bar-color: var(--van-gray-5)}.van-floating-panel{position:fixed;left:0;bottom:0;width:100vw;z-index:var(--van-floating-panel-z-index);display:flex;flex-direction:column;touch-action:none;border-top-left-radius:var(--van-floating-panel-border-radius);border-top-right-radius:var(--van-floating-panel-border-radius);background:var(--van-floating-panel-background);will-change:transform}.van-floating-panel:after{content:"";display:block;position:absolute;bottom:-100vh;height:100vh;width:100vw;background-color:inherit}.van-floating-panel__header{height:var(--van-floating-panel-header-height);display:flex;justify-content:center;align-items:center;cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-floating-panel__header-bar{height:var(--van-floating-panel-bar-height);width:var(--van-floating-panel-bar-width);border-radius:var(--van-radius-md);background:var(--van-floating-panel-bar-color)}.van-floating-panel__content{flex:1;overflow-y:auto;background-color:var(--van-floating-panel-background);-webkit-overflow-scrolling:touch}.van-grid{display:flex;flex-wrap:wrap}:root,:host{--van-grid-item-content-padding: var(--van-padding-md) var(--van-padding-xs);--van-grid-item-content-background: var(--van-background-2);--van-grid-item-content-active-color: var(--van-active-color);--van-grid-item-icon-size: 28px;--van-grid-item-text-color: var(--van-text-color);--van-grid-item-text-font-size: var(--van-font-size-sm)}.van-grid-item{position:relative;box-sizing:border-box}.van-grid-item--square{height:0}.van-grid-item__icon{font-size:var(--van-grid-item-icon-size)}.van-grid-item__text{color:var(--van-grid-item-text-color);font-size:var(--van-grid-item-text-font-size);line-height:1.5;word-break:break-all}.van-grid-item__icon+.van-grid-item__text{margin-top:var(--van-padding-xs)}.van-grid-item__content{display:flex;flex-direction:column;box-sizing:border-box;height:100%;padding:var(--van-grid-item-content-padding);background:var(--van-grid-item-content-background)}.van-grid-item__content:after{z-index:1;border-width:0 var(--van-border-width) var(--van-border-width) 0}.van-grid-item__content--square{position:absolute;top:0;right:0;left:0}.van-grid-item__content--center{align-items:center;justify-content:center}.van-grid-item__content--horizontal{flex-direction:row}.van-grid-item__content--horizontal .van-grid-item__text{margin:0 0 0 var(--van-padding-xs)}.van-grid-item__content--reverse{flex-direction:column-reverse}.van-grid-item__content--reverse .van-grid-item__text{margin:0 0 var(--van-padding-xs)}.van-grid-item__content--horizontal.van-grid-item__content--reverse{flex-direction:row-reverse}.van-grid-item__content--horizontal.van-grid-item__content--reverse .van-grid-item__text{margin:0 var(--van-padding-xs) 0 0}.van-grid-item__content--surround:after{border-width:var(--van-border-width)}.van-grid-item__content--clickable{cursor:pointer}.van-grid-item__content--clickable:active{background-color:var(--van-grid-item-content-active-color)}:root,:host{--van-highlight-tag-color: var(--van-primary-color)}.van-highlight__tag{color:var(--van-highlight-tag-color)}:root,:host{--van-index-bar-sidebar-z-index: 2;--van-index-bar-index-font-size: var(--van-font-size-xs);--van-index-bar-index-line-height: var(--van-line-height-xs);--van-index-bar-index-active-color: var(--van-primary-color)}.van-index-bar__sidebar{position:fixed;top:50%;right:0;z-index:var(--van-index-bar-sidebar-z-index);display:flex;flex-direction:column;text-align:center;transform:translateY(-50%);cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-index-bar__index{padding:0 var(--van-padding-xs) 0 var(--van-padding-md);font-weight:var(--van-font-bold);font-size:var(--van-index-bar-index-font-size);line-height:var(--van-index-bar-index-line-height)}.van-index-bar__index--active{color:var(--van-index-bar-index-active-color);font-weight:700}:root,:host{--van-index-anchor-z-index: 1;--van-index-anchor-padding: 0 var(--van-padding-md);--van-index-anchor-text-color: var(--van-text-color);--van-index-anchor-font-weight: var(--van-font-bold);--van-index-anchor-font-size: var(--van-font-size-md);--van-index-anchor-line-height: 32px;--van-index-anchor-background: transparent;--van-index-anchor-sticky-text-color: var(--van-primary-color);--van-index-anchor-sticky-background: var(--van-background-2)}.van-index-anchor{z-index:var(--van-index-anchor-z-index);box-sizing:border-box;padding:var(--van-index-anchor-padding);color:var(--van-index-anchor-text-color);font-weight:var(--van-index-anchor-font-weight);font-size:var(--van-index-anchor-font-size);line-height:var(--van-index-anchor-line-height);background:var(--van-index-anchor-background)}.van-index-anchor--sticky{position:fixed;top:0;right:0;left:0;color:var(--van-index-anchor-sticky-text-color);background:var(--van-index-anchor-sticky-background)}:root,:host{--van-pagination-height: 40px;--van-pagination-font-size: var(--van-font-size-md);--van-pagination-item-width: 36px;--van-pagination-item-default-color: var(--van-primary-color);--van-pagination-item-disabled-color: var(--van-gray-7);--van-pagination-item-disabled-background: var(--van-background);--van-pagination-background: var(--van-background-2);--van-pagination-desc-color: var(--van-gray-7);--van-pagination-disabled-opacity: var(--van-disabled-opacity)}.van-pagination{font-size:var(--van-pagination-font-size)}.van-pagination__items{display:flex}.van-pagination__item,.van-pagination__page-desc{display:flex;align-items:center;justify-content:center}.van-pagination__item{flex:1;box-sizing:border-box;min-width:var(--van-pagination-item-width);height:var(--van-pagination-height);color:var(--van-pagination-item-default-color);background:var(--van-pagination-background);cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-pagination__item button{flex:1;height:100%;border:none;padding:0;background:transparent}.van-pagination__item button[disabled]{cursor:not-allowed}.van-pagination__item:active{color:var(--van-white);background-color:var(--van-pagination-item-default-color)}.van-pagination__item:not(:last-child):after{border-right-width:0}.van-pagination__item--active{color:var(--van-white);background-color:var(--van-pagination-item-default-color)}.van-pagination__item--page{flex-grow:0}.van-pagination__item--prev,.van-pagination__item--next{padding:0 var(--van-padding-base);cursor:pointer}.van-pagination__item--border:first-child:after{border-right-width:var(--van-border-width)}.van-pagination__item--disabled,.van-pagination__item--disabled:active{color:var(--van-pagination-item-disabled-color);background-color:var(--van-pagination-item-disabled-background);opacity:var(--van-pagination-disabled-opacity)}.van-pagination__page-desc{flex:1;height:var(--van-pagination-height);color:var(--van-pagination-desc-color)}:root,:host{--van-password-input-height: 50px;--van-password-input-margin: 0 var(--van-padding-md);--van-password-input-font-size: 20px;--van-password-input-radius: 6px;--van-password-input-background: var(--van-background-2);--van-password-input-info-color: var(--van-text-color-2);--van-password-input-info-font-size: var(--van-font-size-md);--van-password-input-error-info-color: var(--van-danger-color);--van-password-input-dot-size: 10px;--van-password-input-dot-color: var(--van-text-color);--van-password-input-text-color: var(--van-text-color);--van-password-input-cursor-color: var(--van-text-color);--van-password-input-cursor-width: 1px;--van-password-input-cursor-height: 40%;--van-password-input-cursor-duration: 1s}.van-password-input{position:relative;margin:var(--van-password-input-margin);-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-password-input__info,.van-password-input__error-info{margin-top:var(--van-padding-md);font-size:var(--van-password-input-info-font-size);text-align:center}.van-password-input__info{color:var(--van-password-input-info-color)}.van-password-input__error-info{color:var(--van-password-input-error-info-color)}.van-password-input__security{display:flex;width:100%;height:var(--van-password-input-height);cursor:pointer}.van-password-input__security:after{border-radius:var(--van-password-input-radius)}.van-password-input__security li{position:relative;display:flex;flex:1;align-items:center;justify-content:center;height:100%;color:var(--van-password-input-text-color);font-size:var(--van-password-input-font-size);line-height:1.2;background:var(--van-password-input-background)}.van-password-input__security i{position:absolute;top:50%;left:50%;width:var(--van-password-input-dot-size);height:var(--van-password-input-dot-size);background:var(--van-password-input-dot-color);border-radius:100%;transform:translate(-50%,-50%);visibility:hidden}.van-password-input__cursor{position:absolute;top:50%;left:50%;width:var(--van-password-input-cursor-width);height:var(--van-password-input-cursor-height);background:var(--van-password-input-cursor-color);transform:translate(-50%,-50%);animation:var(--van-password-input-cursor-duration) van-cursor-flicker infinite}@keyframes van-cursor-flicker{0%{opacity:0}50%{opacity:1}to{opacity:0}}:root,:host{--van-progress-height: 4px;--van-progress-color: var(--van-primary-color);--van-progress-inactive-color: var(--van-gray-5);--van-progress-background: var(--van-gray-3);--van-progress-pivot-padding: 0 5px;--van-progress-pivot-text-color: var(--van-white);--van-progress-pivot-font-size: var(--van-font-size-xs);--van-progress-pivot-line-height: 1.6;--van-progress-pivot-background: var(--van-primary-color)}.van-progress{position:relative;height:var(--van-progress-height);background:var(--van-progress-background);border-radius:var(--van-progress-height)}.van-progress__portion{position:absolute;left:0;width:100%;height:100%;background:var(--van-progress-color);border-radius:inherit;transform-origin:0;transition:all var(--van-duration-base) var(--van-ease-out)}.van-progress__portion--inactive{background:var(--van-progress-inactive-color)}.van-progress__pivot{position:absolute;top:50%;box-sizing:border-box;min-width:3.6em;padding:var(--van-progress-pivot-padding);color:var(--van-progress-pivot-text-color);font-size:var(--van-progress-pivot-font-size);line-height:var(--van-progress-pivot-line-height);text-align:center;word-break:keep-all;background:var(--van-progress-pivot-background);border-radius:1em;transition:all var(--van-duration-base) var(--van-ease-out)}.van-progress__pivot--inactive{background:var(--van-progress-inactive-color)}:root,:host{--van-rolling-text-background: inherit;--van-rolling-text-color: var(--van-text-color);--van-rolling-text-font-size: var(--van-font-size-md);--van-rolling-text-gap: 0px;--van-rolling-text-item-width: 15px;--van-rolling-text-item-border-radius: 0px}.van-rolling-text{display:inline-flex;justify-content:center;align-items:center;font-size:var(--van-rolling-text-font-size);color:var(--van-rolling-text-color)}.van-rolling-text-item{margin-right:var(--van-rolling-text-gap);width:var(--van-rolling-text-item-width);border-radius:var(--van-rolling-text-item-border-radius);background:var(--van-rolling-text-background);overflow:hidden}.van-rolling-text-item:last-child{margin-right:0}.van-rolling-text-item__box{overflow:hidden}.van-rolling-text-item__box--animate{animation:van-up var(--van-duration) ease-in-out var(--van-delay);animation-iteration-count:1;animation-fill-mode:both}.van-rolling-text-item__item{text-align:center}.van-rolling-text-item--down .van-rolling-text-item__box{transform:translateY(var(--van-translate))}.van-rolling-text-item--down .van-rolling-text-item__box--animate{animation-name:van-down}@keyframes van-down{0%{transform:translateY(var(--van-translate))}to{transform:translateY(0)}}@keyframes van-up{0%{transform:translateY(0)}to{transform:translateY(var(--van-translate))}}:root,:host{--van-sidebar-width: 80px}.van-sidebar{width:var(--van-sidebar-width);overflow-y:auto;-webkit-overflow-scrolling:touch}:root,:host{--van-sidebar-font-size: var(--van-font-size-md);--van-sidebar-line-height: var(--van-line-height-md);--van-sidebar-text-color: var(--van-text-color);--van-sidebar-disabled-text-color: var(--van-text-color-3);--van-sidebar-padding: 20px var(--van-padding-sm);--van-sidebar-active-color: var(--van-active-color);--van-sidebar-background: var(--van-background);--van-sidebar-selected-font-weight: var(--van-font-bold);--van-sidebar-selected-text-color: var(--van-text-color);--van-sidebar-selected-border-width: 4px;--van-sidebar-selected-border-height: 16px;--van-sidebar-selected-border-color: var(--van-primary-color);--van-sidebar-selected-background: var(--van-background-2)}.van-sidebar-item{position:relative;display:block;box-sizing:border-box;padding:var(--van-sidebar-padding);overflow:hidden;color:var(--van-sidebar-text-color);font-size:var(--van-sidebar-font-size);line-height:var(--van-sidebar-line-height);background:var(--van-sidebar-background);cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-sidebar-item:active{background-color:var(--van-sidebar-active-color)}.van-sidebar-item:not(:last-child):after{border-bottom-width:1px}.van-sidebar-item__text{word-break:break-all}.van-sidebar-item--select{color:var(--van-sidebar-selected-text-color);font-weight:var(--van-sidebar-selected-font-weight)}.van-sidebar-item--select,.van-sidebar-item--select:active{background-color:var(--van-sidebar-selected-background)}.van-sidebar-item--select:before{position:absolute;top:50%;left:0;width:var(--van-sidebar-selected-border-width);height:var(--van-sidebar-selected-border-height);background-color:var(--van-sidebar-selected-border-color);transform:translateY(-50%);content:""}.van-sidebar-item--disabled{color:var(--van-sidebar-disabled-text-color);cursor:not-allowed}.van-sidebar-item--disabled:active{background-color:var(--van-sidebar-background)}:root,:host{--van-tree-select-font-size: var(--van-font-size-md);--van-tree-select-nav-background: var(--van-background);--van-tree-select-content-background: var(--van-background-2);--van-tree-select-nav-item-padding: 14px var(--van-padding-sm);--van-tree-select-item-height: 48px;--van-tree-select-item-active-color: var(--van-primary-color);--van-tree-select-item-disabled-color: var(--van-gray-5);--van-tree-select-item-selected-size: 16px}.van-tree-select{position:relative;display:flex;font-size:var(--van-tree-select-font-size)}.van-tree-select__nav{flex:1;overflow-y:auto;background:var(--van-tree-select-nav-background);-webkit-overflow-scrolling:touch}.van-tree-select__nav-item{padding:var(--van-tree-select-nav-item-padding)}.van-tree-select__content{flex:2;overflow-y:auto;background:var(--van-tree-select-content-background);-webkit-overflow-scrolling:touch}.van-tree-select__item{position:relative;padding:0 32px 0 var(--van-padding-md);font-weight:var(--van-font-bold);line-height:var(--van-tree-select-item-height);-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer}.van-tree-select__item--active{color:var(--van-tree-select-item-active-color)}.van-tree-select__item:active{background-color:var(--van-active-color)}.van-tree-select__item--disabled{color:var(--van-tree-select-item-disabled-color);cursor:not-allowed}.van-tree-select__item--disabled:active{background-color:transparent}.van-tree-select__selected{position:absolute;top:50%;right:var(--van-padding-md);margin-top:calc(var(--van-padding-xs) * -1);font-size:var(--van-tree-select-item-selected-size)}:root,:host{--van-skeleton-title-width: 40%}.van-skeleton-title{height:var(--van-skeleton-paragraph-height);background:var(--van-skeleton-paragraph-background)}.van-skeleton-title--round{border-radius:var(--van-radius-max)}.van-skeleton-title{width:var(--van-skeleton-title-width);margin:0}.van-skeleton-title+.van-skeleton-paragraph{margin-top:20px}:root,:host{--van-skeleton-avatar-size: 32px;--van-skeleton-avatar-background: var(--van-active-color)}.van-skeleton-avatar{flex-shrink:0;width:var(--van-skeleton-avatar-size);height:var(--van-skeleton-avatar-size);margin-right:var(--van-padding-md);background:var(--van-skeleton-avatar-background)}.van-skeleton-avatar--round{border-radius:var(--van-radius-max)}.van-skeleton-avatar+.van-skeleton__content{padding-top:var(--van-padding-xs)}:root,:host{--van-skeleton-paragraph-height: 16px;--van-skeleton-paragraph-background: var(--van-active-color);--van-skeleton-paragraph-margin-top: var(--van-padding-sm)}.van-skeleton-paragraph{height:var(--van-skeleton-paragraph-height);background:var(--van-skeleton-paragraph-background)}.van-skeleton-paragraph--round{border-radius:var(--van-radius-max)}.van-skeleton-paragraph:not(:first-child){margin-top:var(--van-skeleton-paragraph-margin-top)}:root,:host{--van-skeleton-duration: 1.2s}.van-skeleton{display:flex;padding:0 var(--van-padding-md)}.van-skeleton__content{width:100%}.van-skeleton--animate{animation:van-skeleton-blink var(--van-skeleton-duration) ease-in-out infinite}@keyframes van-skeleton-blink{50%{opacity:.6}}:root,:host{--van-slider-active-background: var(--van-primary-color);--van-slider-inactive-background: var(--van-gray-3);--van-slider-disabled-opacity: var(--van-disabled-opacity);--van-slider-bar-height: 2px;--van-slider-button-width: 24px;--van-slider-button-height: 24px;--van-slider-button-radius: 50%;--van-slider-button-background: var(--van-white);--van-slider-button-shadow: 0 1px 2px rgba(0, 0, 0, .5)}.van-theme-dark{--van-slider-inactive-background: var(--van-background-3)}.van-slider{position:relative;width:100%;height:var(--van-slider-bar-height);background:var(--van-slider-inactive-background);border-radius:var(--van-radius-max);cursor:pointer}.van-slider:before{position:absolute;top:calc(var(--van-padding-xs) * -1);right:0;bottom:calc(var(--van-padding-xs) * -1);left:0;content:""}.van-slider__bar{position:absolute;width:100%;height:100%;background:var(--van-slider-active-background);border-radius:inherit;transition:all var(--van-duration-fast)}.van-slider__button{width:var(--van-slider-button-width);height:var(--van-slider-button-height);background:var(--van-slider-button-background);border-radius:var(--van-slider-button-radius);box-shadow:var(--van-slider-button-shadow)}.van-slider__button-wrapper{position:absolute;cursor:grab;top:50%}.van-slider__button-wrapper--right{right:0;transform:translate3d(50%,-50%,0)}.van-slider__button-wrapper--left{left:0;transform:translate3d(-50%,-50%,0)}.van-slider--disabled{cursor:not-allowed;opacity:var(--van-slider-disabled-opacity)}.van-slider--disabled .van-slider__button-wrapper{cursor:not-allowed}.van-slider--vertical{display:inline-block;width:var(--van-slider-bar-height);height:100%}.van-slider--vertical .van-slider__button-wrapper--right{top:auto;right:50%;bottom:0;transform:translate3d(50%,50%,0)}.van-slider--vertical .van-slider__button-wrapper--left{top:0;right:50%;left:auto;transform:translate3d(50%,-50%,0)}.van-slider--vertical:before{top:0;right:calc(var(--van-padding-xs) * -1);bottom:0;left:calc(var(--van-padding-xs) * -1)}.van-space{display:inline-flex}.van-space--horizontal .van-space-item{display:flex;align-items:center}.van-space--vertical{flex-direction:column}.van-space--align-baseline{align-items:baseline}.van-space--align-start{align-items:flex-start}.van-space--align-end{align-items:flex-end}.van-space--align-center{align-items:center}.van-space--wrap{flex-wrap:wrap}.van-space--fill{display:flex}:root,:host{--van-steps-background: var(--van-background-2)}.van-steps{overflow:hidden;background-color:var(--van-steps-background)}.van-steps--horizontal{padding:10px 10px 0}.van-steps--horizontal .van-steps__items{position:relative;display:flex;margin:0 0 10px;padding-bottom:22px}.van-steps--vertical{padding:0 0 0 var(--van-padding-xl)}:root,:host{--van-step-text-color: var(--van-text-color-2);--van-step-active-color: var(--van-primary-color);--van-step-process-text-color: var(--van-text-color);--van-step-font-size: var(--van-font-size-md);--van-step-line-color: var(--van-border-color);--van-step-finish-line-color: var(--van-primary-color);--van-step-finish-text-color: var(--van-text-color);--van-step-icon-size: 12px;--van-step-circle-size: 5px;--van-step-circle-color: var(--van-gray-6);--van-step-horizontal-title-font-size: var(--van-font-size-sm)}.van-step{position:relative;flex:1;color:var(--van-step-text-color);font-size:var(--van-step-font-size)}.van-step__circle{display:block;width:var(--van-step-circle-size);height:var(--van-step-circle-size);background-color:var(--van-step-circle-color);border-radius:50%}.van-step__line{position:absolute;background-color:var(--van-step-line-color);transition:background-color var(--van-duration-base)}.van-step--horizontal{float:left}.van-step--horizontal:first-child .van-step__title{margin-left:0;transform:none}.van-step--horizontal:last-child:not(:first-child){position:absolute;right:1px;width:auto}.van-step--horizontal:last-child:not(:first-child) .van-step__title{margin-left:0;transform:none}.van-step--horizontal:last-child:not(:first-child) .van-step__circle-container{right:-9px;left:auto}.van-step--horizontal .van-step__circle-container{position:absolute;top:30px;left:calc(var(--van-padding-xs) * -1);z-index:1;padding:0 var(--van-padding-xs);background-color:var(--van-background-2);transform:translateY(-50%)}.van-step--horizontal .van-step__title{display:inline-block;margin-left:3px;font-size:var(--van-step-horizontal-title-font-size);transform:translate(-50%)}.van-step--horizontal .van-step__line{top:30px;left:0;width:100%;height:1px}.van-step--horizontal .van-step__icon{display:block;font-size:var(--van-step-icon-size)}.van-step--horizontal .van-step--process{color:var(--van-step-process-text-color)}.van-step--vertical{display:block;float:none;padding:10px 10px 10px 0;line-height:var(--van-line-height-sm)}.van-step--vertical:not(:last-child):after{border-bottom-width:1px}.van-step--vertical .van-step__circle-container{position:absolute;top:19px;left:-15px;z-index:1;font-size:var(--van-step-icon-size);line-height:1;transform:translate(-50%,-50%)}.van-step--vertical .van-step__line{top:16px;left:-15px;width:1px;height:100%}.van-step:last-child .van-step__line{width:0}.van-step--finish{color:var(--van-step-finish-text-color)}.van-step--finish .van-step__circle,.van-step--finish .van-step__line{background-color:var(--van-step-finish-line-color)}.van-step__icon,.van-step__title{transition:color var(--van-duration-base)}.van-step__icon--active,.van-step__title--active,.van-step__icon--finish,.van-step__title--finish{color:var(--van-step-active-color)}:root,:host{--van-stepper-background: var(--van-active-color);--van-stepper-button-icon-color: var(--van-text-color);--van-stepper-button-disabled-color: var(--van-background);--van-stepper-button-disabled-icon-color: var(--van-gray-5);--van-stepper-button-round-theme-color: var(--van-primary-color);--van-stepper-input-width: 32px;--van-stepper-input-height: 28px;--van-stepper-input-font-size: var(--van-font-size-md);--van-stepper-input-line-height: normal;--van-stepper-input-text-color: var(--van-text-color);--van-stepper-input-disabled-text-color: var(--van-text-color-3);--van-stepper-input-disabled-background: var(--van-active-color);--van-stepper-radius: var(--van-radius-md)}.van-stepper{display:inline-block;-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-stepper__minus,.van-stepper__plus{position:relative;box-sizing:border-box;width:var(--van-stepper-input-height);height:var(--van-stepper-input-height);margin:0;padding:0;color:var(--van-stepper-button-icon-color);vertical-align:middle;background:var(--van-stepper-background);border:0}.van-stepper__minus:before,.van-stepper__plus:before{width:50%;height:1px}.van-stepper__minus:after,.van-stepper__plus:after{width:1px;height:50%}.van-stepper__minus:before,.van-stepper__plus:before,.van-stepper__minus:after,.van-stepper__plus:after{position:absolute;top:50%;left:50%;background-color:currentColor;transform:translate(-50%,-50%);content:""}.van-stepper__minus--disabled,.van-stepper__plus--disabled{color:var(--van-stepper-button-disabled-icon-color);background-color:var(--van-stepper-button-disabled-color);cursor:not-allowed}.van-stepper__minus{border-radius:var(--van-stepper-radius) 0 0 var(--van-stepper-radius)}.van-stepper__minus:after{display:none}.van-stepper__plus{border-radius:0 var(--van-stepper-radius) var(--van-stepper-radius) 0}.van-stepper__input{box-sizing:border-box;width:var(--van-stepper-input-width);height:var(--van-stepper-input-height);margin:0 2px;padding:0;color:var(--van-stepper-input-text-color);font-size:var(--van-stepper-input-font-size);line-height:var(--van-stepper-input-line-height);text-align:center;vertical-align:middle;background:var(--van-stepper-background);border:0;border-width:1px 0;border-radius:0;-webkit-appearance:none}.van-stepper__input:disabled{color:var(--van-stepper-input-disabled-text-color);background-color:var(--van-stepper-input-disabled-background);-webkit-text-fill-color:var(--van-stepper-input-disabled-text-color);opacity:1}.van-stepper__input:-moz-read-only{cursor:default}.van-stepper__input:read-only{cursor:default}.van-stepper--round .van-stepper__input{background-color:transparent}.van-stepper--round .van-stepper__plus,.van-stepper--round .van-stepper__minus{border-radius:100%}.van-stepper--round .van-stepper__plus--disabled,.van-stepper--round .van-stepper__minus--disabled{opacity:.3;cursor:not-allowed}.van-stepper--round .van-stepper__plus{color:var(--van-white);background:var(--van-stepper-button-round-theme-color)}.van-stepper--round .van-stepper__minus{color:var(--van-stepper-button-round-theme-color);background-color:var(--van-background-2);border:1px solid var(--van-stepper-button-round-theme-color)}.van-swipe-cell{position:relative;overflow:hidden;cursor:grab}.van-swipe-cell__wrapper{transition-timing-function:cubic-bezier(.18,.89,.32,1);transition-property:transform}.van-swipe-cell__left,.van-swipe-cell__right{position:absolute;top:0;height:100%}.van-swipe-cell__left{left:0;transform:translate3d(-100%,0,0)}.van-swipe-cell__right{right:0;transform:translate3d(100%,0,0)}:root,:host{--van-tabbar-height: 50px;--van-tabbar-z-index: 1;--van-tabbar-background: var(--van-background-2)}.van-tabbar{z-index:var(--van-tabbar-z-index);display:flex;box-sizing:content-box;width:100%;height:var(--van-tabbar-height);background:var(--van-tabbar-background)}.van-tabbar--fixed{position:fixed;bottom:0;left:0}:root,:host{--van-tabbar-item-font-size: var(--van-font-size-sm);--van-tabbar-item-text-color: var(--van-text-color);--van-tabbar-item-active-color: var(--van-primary-color);--van-tabbar-item-active-background: var(--van-background-2);--van-tabbar-item-line-height: 1;--van-tabbar-item-icon-size: 22px;--van-tabbar-item-icon-margin-bottom: var(--van-padding-base)}.van-tabbar-item{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;color:var(--van-tabbar-item-text-color);font-size:var(--van-tabbar-item-font-size);line-height:var(--van-tabbar-item-line-height);cursor:pointer}.van-tabbar-item__icon{margin-bottom:var(--van-tabbar-item-icon-margin-bottom);font-size:var(--van-tabbar-item-icon-size)}.van-tabbar-item__icon .van-icon{display:block}.van-tabbar-item__icon .van-badge{margin-top:var(--van-padding-base)}.van-tabbar-item__icon img{display:block;height:20px}.van-tabbar-item--active{color:var(--van-tabbar-item-active-color);background-color:var(--van-tabbar-item-active-background)}:root,:host{--van-text-ellipsis-line-height: 1.6;--van-text-ellipsis-action-color: var(--van-blue)}.van-text-ellipsis{line-height:var(--van-text-ellipsis-line-height);white-space:pre-wrap;overflow-wrap:break-word}.van-text-ellipsis__action{cursor:pointer;color:var(--van-text-ellipsis-action-color)}.van-text-ellipsis__action:active{opacity:var(--van-active-opacity)}:root,:host{--van-watermark-z-index: 100}.van-watermark{position:absolute;height:100%;width:100%;left:0;top:0;z-index:var(--van-watermark-z-index);background-repeat:repeat;pointer-events:none}.van-watermark__wrapper{display:none}.van-watermark--full{position:fixed} diff --git a/apps/user-app-v2/dist/assets/index-D-jEuKqG.css b/apps/user-app-v2/dist/assets/index-D-jEuKqG.css deleted file mode 100644 index 6cf4126..0000000 --- a/apps/user-app-v2/dist/assets/index-D-jEuKqG.css +++ /dev/null @@ -1 +0,0 @@ -.liman-icons[data-v-92f693c3] svg path{stroke:currentColor}.tabbar[data-v-e2aa88fe]{position:fixed;left:0;right:0;bottom:0;z-index:10;padding:10px 14px calc(10px + env(safe-area-inset-bottom,0px));background:transparent}.tabbar__inner[data-v-e2aa88fe]{position:relative;display:grid;grid-template-columns:repeat(var(--count),1fr);max-width:420px;margin:0 auto;padding:6px;border-radius:22px;background:#fff;border:1px solid #ECEDEF;box-shadow:0 10px 28px -12px #14161a2e}.tabbar__indicator[data-v-e2aa88fe]{position:absolute;inset:6px 6px 6px auto;width:calc((100% - 12px) / var(--count));border-radius:16px;background:#fbf2f4;transition:transform .35s cubic-bezier(.65,0,.35,1);will-change:transform}.tabbar__item[data-v-e2aa88fe]{position:relative;z-index:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:8px 4px;border-radius:16px;color:#8a909c;text-decoration:none;transition:color .25s ease,transform .25s cubic-bezier(.65,0,.35,1.4)}.tabbar__item[data-v-e2aa88fe] svg{transition:transform .3s cubic-bezier(.65,0,.35,1.4)}.tabbar__item.is-active[data-v-e2aa88fe]{color:#7a1b33;transform:translateY(-2px)}.tabbar__item.is-active[data-v-e2aa88fe] svg{transform:scale(1.08)}.tabbar__item[data-v-e2aa88fe]:active{transform:scale(.94)}.tabbar__label[data-v-e2aa88fe]{font-size:10px;font-weight:600;line-height:1;opacity:.9}.page-leave-active{transition:opacity .16s cubic-bezier(.4,0,1,1),transform .16s cubic-bezier(.4,0,1,1)}.page-enter-active{transition:opacity .42s cubic-bezier(.32,.72,0,1),transform .42s cubic-bezier(.32,.72,0,1)}.page-enter-from{opacity:0;transform:translate3d(0,10px,0) scale(.995)}.page-leave-to{opacity:0;transform:translate3d(0,-5px,0) scale(.997)}@media (prefers-reduced-motion: reduce){.page-enter-active,.page-leave-active{transition:opacity .12s linear}.page-enter-from,.page-leave-to{transform:none}}.van-dialog__confirm,.van-dialog__cancel{display:none!important}.mDialog.van-dialog{width:min(320px,calc(100vw - 48px));border-radius:26px;background:#fff;box-shadow:0 30px 60px -24px #14161a73;overflow:hidden}.mDialog__body{padding:26px 22px 20px;display:flex;flex-direction:column;align-items:center;text-align:center}.mDialog--single .mDialog__art{width:100%;margin-bottom:8px}.mDialog__title{font-size:14.5px;font-weight:700;line-height:1.9;color:#14161a}.mDialog__actions{width:100%;display:flex;flex-direction:column;gap:9px;margin-top:10px;font-size:13px;font-weight:700}.mDialog__actions>*{padding:12px;border-radius:14px;cursor:pointer;transition:transform .18s ease,opacity .18s ease;color:#fff!important;background:#14161a}.mDialog__actions>*:active{transform:scale(.97)}body::-webkit-scrollbar{display:none}#app{overflow:hidden;direction:rtl!important;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:start;color:#1c2d56;-webkit-user-select:none;-moz-user-select:none;user-select:none}.slideDown-enter-active,.slideDown-leave-active{transition:all .5s ease}.slideDown-enter-from{transform:translateY(-100vh)}.slideDown-leave-to{transform:translateY(100vh)}.slideDown-leave-from,.slideDown-enter-to{transform:translateY(0)}.fade-down-enter-active,.fade-down-leave-active{transition:all .5s ease}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: ""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:inherit;color:inherit;margin:0;padding:0}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.static{position:static}.fixed{position:fixed}.\!fixed{position:fixed!important}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.top-\[-2rem\]{top:-2rem}.bottom-0{bottom:0}.top-\[30px\]{top:30px}.right-\[20px\]{right:20px}.z-10{z-index:10}.z-0{z-index:0}.z-\[2\]{z-index:2}.z-\[5\]{z-index:5}.m-auto{margin:auto}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-\[10px\]{margin-top:10px;margin-bottom:10px}.ml-\[20px\]{margin-left:20px}.mt-4{margin-top:1rem}.mb-4{margin-bottom:1rem}.mb-2{margin-bottom:.5rem}.mb-8{margin-bottom:2rem}.block{display:block}.inline{display:inline}.flex{display:flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-square{aspect-ratio:1 / 1}.h-screen{height:100vh}.h-\[200px\]{height:200px}.h-\[2rem\]{height:2rem}.h-full{height:100%}.h-\[32px\]{height:32px}.h-auto{height:auto}.h-\[90px\]{height:90px}.\!max-h-screen{max-height:100vh!important}.min-h-\[40px\]{min-height:40px}.w-screen{width:100vw}.w-full{width:100%}.w-\[200px\]{width:200px}.w-\[280px\]{width:280px}.w-\[32px\]{width:32px}.w-auto{width:auto}.w-\[100vw\]{width:100vw}.max-w-screen-md{max-width:768px}.flex-1{flex:1 1 0%}.flex-shrink,.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.content-end{align-content:flex-end}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.overflow-auto{overflow:auto}.whitespace-pre-wrap{white-space:pre-wrap}.rounded{border-radius:.25rem}.rounded-\[10px\]{border-radius:10px}.rounded-\[4px\]{border-radius:4px}.rounded-\[5px\]{border-radius:5px}.border{border-width:1px}.border-secondary{--tw-border-opacity: 1;border-color:rgb(141 106 70 / var(--tw-border-opacity))}.border-lightGray{--tw-border-opacity: 1;border-color:rgb(165 165 165 / var(--tw-border-opacity))}.border-lightGray\/20{border-color:#a5a5a533}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-light{--tw-bg-opacity: 1;background-color:rgb(249 249 249 / var(--tw-bg-opacity))}.bg-primary{--tw-bg-opacity: 1;background-color:rgb(28 45 86 / var(--tw-bg-opacity))}.bg-primaryLighten{--tw-bg-opacity: 1;background-color:rgb(28 51 98 / var(--tw-bg-opacity))}.bg-secondary{--tw-bg-opacity: 1;background-color:rgb(141 106 70 / var(--tw-bg-opacity))}.bg-cover{background-size:cover}.bg-center{background-position:center}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-8{padding:2rem}.p-\[8px\]{padding:8px}.p-\[2\.5px\]{padding:2.5px}.p-5{padding:1.25rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-\[16px\]{padding-left:16px;padding-right:16px}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pl-5{padding-left:1.25rem}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}.font-semibold{font-weight:600}.font-bold{font-weight:700}.text-\[\#1C2D56\]{--tw-text-opacity: 1;color:rgb(28 45 86 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-primary{--tw-text-opacity: 1;color:rgb(28 45 86 / var(--tw-text-opacity))}.text-\[\#6b7280\]{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-danger{--tw-text-opacity: 1;color:rgb(227 26 26 / var(--tw-text-opacity))}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}[class^=ant-]::-ms-clear,[class*=ant-]::-ms-clear,[class^=ant-] input::-ms-clear,[class*=ant-] input::-ms-clear,[class^=ant-] input::-ms-reveal,[class*=ant-] input::-ms-reveal{display:none}html,body{width:100%;height:100%}input::-ms-clear,input::-ms-reveal{display:none}*,*:before,*:after{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{margin:0;color:#000000d9;font-size:14px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-variant:tabular-nums;line-height:1.5715;background-color:#fff;font-feature-settings:"tnum"}[tabindex="-1"]:focus{outline:none!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5em;color:#1c2d56;font-weight:500}p{margin-top:0;margin-bottom:1em}abbr[title],abbr[data-original-title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;border-bottom:0;cursor:help}address{margin-bottom:1em;font-style:normal;line-height:inherit}input[type=text],input[type=password],input[type=number],textarea{-webkit-appearance:none}ol,ul,dl{margin-top:0;margin-bottom:1em}ol ol,ul ul,ol ul,ul ol{margin-bottom:0}dt{font-weight:500}dd{margin-bottom:.5em;margin-left:0}blockquote{margin:0 0 1em}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#1c2d56;text-decoration:none;background-color:transparent;outline:none;cursor:pointer;transition:color .3s;-webkit-text-decoration-skip:objects}a:hover{color:#314263}a:active{color:#0e1730}a:active,a:hover{text-decoration:none;outline:0}a:focus{text-decoration:none;outline:0}a[disabled]{color:#00000040;cursor:not-allowed}pre,code,kbd,samp{font-size:1em;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace}pre{margin-top:0;margin-bottom:1em;overflow:auto}figure{margin:0 0 1em}img{vertical-align:middle;border-style:none}a,area,button,[role=button],input:not([type=range]),label,select,summary,textarea{touch-action:manipulation}table{border-collapse:collapse}caption{padding-top:.75em;padding-bottom:.3em;color:#00000073;text-align:left;caption-side:bottom}input,button,select,optgroup,textarea{margin:0;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}button,html [type=button],[type=reset],[type=submit]{-webkit-appearance:button}button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{padding:0;border-style:none}input[type=radio],input[type=checkbox]{box-sizing:border-box;padding:0}input[type=date],input[type=time],input[type=datetime-local],input[type=month]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;margin:0;padding:0;border:0}legend{display:block;width:100%;max-width:100%;margin-bottom:.5em;padding:0;color:inherit;font-size:1.5em;line-height:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}mark{padding:.2em;background-color:#feffe6}::-moz-selection{color:#fff;background:#8d6a46}::selection{color:#fff;background:#8d6a46}.clearfix:before{display:table;content:""}.clearfix:after{display:table;clear:both;content:""}.anticon{display:inline-block;color:inherit;font-style:normal;line-height:0;text-align:center;text-transform:none;vertical-align:-.125em;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.anticon>*{line-height:1}.anticon svg{display:inline-block}.anticon:before{display:none}.anticon .anticon-icon{display:block}.anticon>.anticon{line-height:0;vertical-align:0}.anticon[tabindex]{cursor:pointer}.anticon-spin:before{display:inline-block;animation:loadingCircle 1s infinite linear}.anticon-spin{display:inline-block;animation:loadingCircle 1s infinite linear}.ant-fade-enter,.ant-fade-appear,.ant-fade-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.ant-fade-enter.ant-fade-enter-active,.ant-fade-appear.ant-fade-appear-active{animation-name:antFadeIn;animation-play-state:running}.ant-fade-leave.ant-fade-leave-active{animation-name:antFadeOut;animation-play-state:running;pointer-events:none}.ant-fade-enter,.ant-fade-appear{opacity:0;animation-timing-function:linear}.ant-fade-leave{animation-timing-function:linear}.fade-enter,.fade-appear,.fade-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.fade-enter.fade-enter-active,.fade-appear.fade-appear-active{animation-name:antFadeIn;animation-play-state:running}.fade-leave.fade-leave-active{animation-name:antFadeOut;animation-play-state:running;pointer-events:none}.fade-enter,.fade-appear{opacity:0;animation-timing-function:linear}.fade-leave{animation-timing-function:linear}@keyframes antFadeIn{0%{opacity:0}to{opacity:1}}@keyframes antFadeOut{0%{opacity:1}to{opacity:0}}.ant-move-up-enter,.ant-move-up-appear,.ant-move-up-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.ant-move-up-enter.ant-move-up-enter-active,.ant-move-up-appear.ant-move-up-appear-active{animation-name:antMoveUpIn;animation-play-state:running}.ant-move-up-leave.ant-move-up-leave-active{animation-name:antMoveUpOut;animation-play-state:running;pointer-events:none}.ant-move-up-enter,.ant-move-up-appear{opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.ant-move-up-leave{animation-timing-function:cubic-bezier(.6,.04,.98,.34)}.move-up-enter,.move-up-appear,.move-up-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.move-up-enter.move-up-enter-active,.move-up-appear.move-up-appear-active{animation-name:antMoveUpIn;animation-play-state:running}.move-up-leave.move-up-leave-active{animation-name:antMoveUpOut;animation-play-state:running;pointer-events:none}.move-up-enter,.move-up-appear{opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.move-up-leave{animation-timing-function:cubic-bezier(.6,.04,.98,.34)}.ant-move-down-enter,.ant-move-down-appear,.ant-move-down-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.ant-move-down-enter.ant-move-down-enter-active,.ant-move-down-appear.ant-move-down-appear-active{animation-name:antMoveDownIn;animation-play-state:running}.ant-move-down-leave.ant-move-down-leave-active{animation-name:antMoveDownOut;animation-play-state:running;pointer-events:none}.ant-move-down-enter,.ant-move-down-appear{opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.ant-move-down-leave{animation-timing-function:cubic-bezier(.6,.04,.98,.34)}.move-down-enter,.move-down-appear,.move-down-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.move-down-enter.move-down-enter-active,.move-down-appear.move-down-appear-active{animation-name:antMoveDownIn;animation-play-state:running}.move-down-leave.move-down-leave-active{animation-name:antMoveDownOut;animation-play-state:running;pointer-events:none}.move-down-enter,.move-down-appear{opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.move-down-leave{animation-timing-function:cubic-bezier(.6,.04,.98,.34)}.ant-move-left-enter,.ant-move-left-appear,.ant-move-left-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.ant-move-left-enter.ant-move-left-enter-active,.ant-move-left-appear.ant-move-left-appear-active{animation-name:antMoveLeftIn;animation-play-state:running}.ant-move-left-leave.ant-move-left-leave-active{animation-name:antMoveLeftOut;animation-play-state:running;pointer-events:none}.ant-move-left-enter,.ant-move-left-appear{opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.ant-move-left-leave{animation-timing-function:cubic-bezier(.6,.04,.98,.34)}.move-left-enter,.move-left-appear,.move-left-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.move-left-enter.move-left-enter-active,.move-left-appear.move-left-appear-active{animation-name:antMoveLeftIn;animation-play-state:running}.move-left-leave.move-left-leave-active{animation-name:antMoveLeftOut;animation-play-state:running;pointer-events:none}.move-left-enter,.move-left-appear{opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.move-left-leave{animation-timing-function:cubic-bezier(.6,.04,.98,.34)}.ant-move-right-enter,.ant-move-right-appear,.ant-move-right-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.ant-move-right-enter.ant-move-right-enter-active,.ant-move-right-appear.ant-move-right-appear-active{animation-name:antMoveRightIn;animation-play-state:running}.ant-move-right-leave.ant-move-right-leave-active{animation-name:antMoveRightOut;animation-play-state:running;pointer-events:none}.ant-move-right-enter,.ant-move-right-appear{opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.ant-move-right-leave{animation-timing-function:cubic-bezier(.6,.04,.98,.34)}.move-right-enter,.move-right-appear,.move-right-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.move-right-enter.move-right-enter-active,.move-right-appear.move-right-appear-active{animation-name:antMoveRightIn;animation-play-state:running}.move-right-leave.move-right-leave-active{animation-name:antMoveRightOut;animation-play-state:running;pointer-events:none}.move-right-enter,.move-right-appear{opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.move-right-leave{animation-timing-function:cubic-bezier(.6,.04,.98,.34)}@keyframes antMoveDownIn{0%{transform:translateY(100%);transform-origin:0 0;opacity:0}to{transform:translateY(0);transform-origin:0 0;opacity:1}}@keyframes antMoveDownOut{0%{transform:translateY(0);transform-origin:0 0;opacity:1}to{transform:translateY(100%);transform-origin:0 0;opacity:0}}@keyframes antMoveLeftIn{0%{transform:translate(-100%);transform-origin:0 0;opacity:0}to{transform:translate(0);transform-origin:0 0;opacity:1}}@keyframes antMoveLeftOut{0%{transform:translate(0);transform-origin:0 0;opacity:1}to{transform:translate(-100%);transform-origin:0 0;opacity:0}}@keyframes antMoveRightIn{0%{transform:translate(100%);transform-origin:0 0;opacity:0}to{transform:translate(0);transform-origin:0 0;opacity:1}}@keyframes antMoveRightOut{0%{transform:translate(0);transform-origin:0 0;opacity:1}to{transform:translate(100%);transform-origin:0 0;opacity:0}}@keyframes antMoveUpIn{0%{transform:translateY(-100%);transform-origin:0 0;opacity:0}to{transform:translateY(0);transform-origin:0 0;opacity:1}}@keyframes antMoveUpOut{0%{transform:translateY(0);transform-origin:0 0;opacity:1}to{transform:translateY(-100%);transform-origin:0 0;opacity:0}}@keyframes loadingCircle{to{transform:rotate(360deg)}}[ant-click-animating=true],[ant-click-animating-without-extra-node=true]{position:relative}html{--antd-wave-shadow-color: #8D6A46;--scroll-bar: 0}[ant-click-animating-without-extra-node=true]:after,.ant-click-animating-node{position:absolute;top:0;right:0;bottom:0;left:0;display:block;border-radius:inherit;box-shadow:0 0 #8d6a46;box-shadow:0 0 0 0 var(--antd-wave-shadow-color);opacity:.2;animation:fadeEffect 2s cubic-bezier(.08,.82,.17,1),waveEffect .4s cubic-bezier(.08,.82,.17,1);animation-fill-mode:forwards;content:"";pointer-events:none}@keyframes waveEffect{to{box-shadow:0 0 #8d6a46;box-shadow:0 0 0 6px var(--antd-wave-shadow-color)}}@keyframes fadeEffect{to{opacity:0}}.slide-up-enter,.slide-up-appear,.slide-up-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.slide-up-enter.slide-up-enter-active,.slide-up-appear.slide-up-appear-active{animation-name:antSlideUpIn;animation-play-state:running}.slide-up-leave.slide-up-leave-active{animation-name:antSlideUpOut;animation-play-state:running;pointer-events:none}.slide-up-enter,.slide-up-appear{opacity:0;animation-timing-function:cubic-bezier(.23,1,.32,1)}.slide-up-leave{animation-timing-function:cubic-bezier(.755,.05,.855,.06)}.slide-down-enter,.slide-down-appear,.slide-down-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.slide-down-enter.slide-down-enter-active,.slide-down-appear.slide-down-appear-active{animation-name:antSlideDownIn;animation-play-state:running}.slide-down-leave.slide-down-leave-active{animation-name:antSlideDownOut;animation-play-state:running;pointer-events:none}.slide-down-enter,.slide-down-appear{opacity:0;animation-timing-function:cubic-bezier(.23,1,.32,1)}.slide-down-leave{animation-timing-function:cubic-bezier(.755,.05,.855,.06)}.slide-left-enter,.slide-left-appear,.slide-left-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.slide-left-enter.slide-left-enter-active,.slide-left-appear.slide-left-appear-active{animation-name:antSlideLeftIn;animation-play-state:running}.slide-left-leave.slide-left-leave-active{animation-name:antSlideLeftOut;animation-play-state:running;pointer-events:none}.slide-left-enter,.slide-left-appear{opacity:0;animation-timing-function:cubic-bezier(.23,1,.32,1)}.slide-left-leave{animation-timing-function:cubic-bezier(.755,.05,.855,.06)}.slide-right-enter,.slide-right-appear,.slide-right-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.slide-right-enter.slide-right-enter-active,.slide-right-appear.slide-right-appear-active{animation-name:antSlideRightIn;animation-play-state:running}.slide-right-leave.slide-right-leave-active{animation-name:antSlideRightOut;animation-play-state:running;pointer-events:none}.slide-right-enter,.slide-right-appear{opacity:0;animation-timing-function:cubic-bezier(.23,1,.32,1)}.slide-right-leave{animation-timing-function:cubic-bezier(.755,.05,.855,.06)}.ant-slide-up-enter,.ant-slide-up-appear,.ant-slide-up-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.ant-slide-up-enter.ant-slide-up-enter-active,.ant-slide-up-appear.ant-slide-up-appear-active{animation-name:antSlideUpIn;animation-play-state:running}.ant-slide-up-leave.ant-slide-up-leave-active{animation-name:antSlideUpOut;animation-play-state:running;pointer-events:none}.ant-slide-up-enter,.ant-slide-up-appear{opacity:0;animation-timing-function:cubic-bezier(.23,1,.32,1)}.ant-slide-up-leave{animation-timing-function:cubic-bezier(.755,.05,.855,.06)}.ant-slide-down-enter,.ant-slide-down-appear,.ant-slide-down-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.ant-slide-down-enter.ant-slide-down-enter-active,.ant-slide-down-appear.ant-slide-down-appear-active{animation-name:antSlideDownIn;animation-play-state:running}.ant-slide-down-leave.ant-slide-down-leave-active{animation-name:antSlideDownOut;animation-play-state:running;pointer-events:none}.ant-slide-down-enter,.ant-slide-down-appear{opacity:0;animation-timing-function:cubic-bezier(.23,1,.32,1)}.ant-slide-down-leave{animation-timing-function:cubic-bezier(.755,.05,.855,.06)}.ant-slide-left-enter,.ant-slide-left-appear,.ant-slide-left-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.ant-slide-left-enter.ant-slide-left-enter-active,.ant-slide-left-appear.ant-slide-left-appear-active{animation-name:antSlideLeftIn;animation-play-state:running}.ant-slide-left-leave.ant-slide-left-leave-active{animation-name:antSlideLeftOut;animation-play-state:running;pointer-events:none}.ant-slide-left-enter,.ant-slide-left-appear{opacity:0;animation-timing-function:cubic-bezier(.23,1,.32,1)}.ant-slide-left-leave{animation-timing-function:cubic-bezier(.755,.05,.855,.06)}.ant-slide-right-enter,.ant-slide-right-appear,.ant-slide-right-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.ant-slide-right-enter.ant-slide-right-enter-active,.ant-slide-right-appear.ant-slide-right-appear-active{animation-name:antSlideRightIn;animation-play-state:running}.ant-slide-right-leave.ant-slide-right-leave-active{animation-name:antSlideRightOut;animation-play-state:running;pointer-events:none}.ant-slide-right-enter,.ant-slide-right-appear{opacity:0;animation-timing-function:cubic-bezier(.23,1,.32,1)}.ant-slide-right-leave{animation-timing-function:cubic-bezier(.755,.05,.855,.06)}@keyframes antSlideUpIn{0%{transform:scaleY(.8);transform-origin:0% 0%;opacity:0}to{transform:scaleY(1);transform-origin:0% 0%;opacity:1}}@keyframes antSlideUpOut{0%{transform:scaleY(1);transform-origin:0% 0%;opacity:1}to{transform:scaleY(.8);transform-origin:0% 0%;opacity:0}}@keyframes antSlideDownIn{0%{transform:scaleY(.8);transform-origin:100% 100%;opacity:0}to{transform:scaleY(1);transform-origin:100% 100%;opacity:1}}@keyframes antSlideDownOut{0%{transform:scaleY(1);transform-origin:100% 100%;opacity:1}to{transform:scaleY(.8);transform-origin:100% 100%;opacity:0}}@keyframes antSlideLeftIn{0%{transform:scaleX(.8);transform-origin:0% 0%;opacity:0}to{transform:scaleX(1);transform-origin:0% 0%;opacity:1}}@keyframes antSlideLeftOut{0%{transform:scaleX(1);transform-origin:0% 0%;opacity:1}to{transform:scaleX(.8);transform-origin:0% 0%;opacity:0}}@keyframes antSlideRightIn{0%{transform:scaleX(.8);transform-origin:100% 0%;opacity:0}to{transform:scaleX(1);transform-origin:100% 0%;opacity:1}}@keyframes antSlideRightOut{0%{transform:scaleX(1);transform-origin:100% 0%;opacity:1}to{transform:scaleX(.8);transform-origin:100% 0%;opacity:0}}.ant-zoom-enter,.ant-zoom-appear,.ant-zoom-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.ant-zoom-enter.ant-zoom-enter-active,.ant-zoom-appear.ant-zoom-appear-active{animation-name:antZoomIn;animation-play-state:running}.ant-zoom-leave.ant-zoom-leave-active{animation-name:antZoomOut;animation-play-state:running;pointer-events:none}.ant-zoom-enter,.ant-zoom-appear{transform:scale(0);opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.ant-zoom-enter-prepare,.ant-zoom-appear-prepare{transform:none}.ant-zoom-leave{animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.zoom-enter,.zoom-appear,.zoom-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.zoom-enter.zoom-enter-active,.zoom-appear.zoom-appear-active{animation-name:antZoomIn;animation-play-state:running}.zoom-leave.zoom-leave-active{animation-name:antZoomOut;animation-play-state:running;pointer-events:none}.zoom-enter,.zoom-appear{transform:scale(0);opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.zoom-enter-prepare,.zoom-appear-prepare{transform:none}.zoom-leave{animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.ant-zoom-big-enter,.ant-zoom-big-appear,.ant-zoom-big-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.ant-zoom-big-enter.ant-zoom-big-enter-active,.ant-zoom-big-appear.ant-zoom-big-appear-active{animation-name:antZoomBigIn;animation-play-state:running}.ant-zoom-big-leave.ant-zoom-big-leave-active{animation-name:antZoomBigOut;animation-play-state:running;pointer-events:none}.ant-zoom-big-enter,.ant-zoom-big-appear{transform:scale(0);opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.ant-zoom-big-enter-prepare,.ant-zoom-big-appear-prepare{transform:none}.ant-zoom-big-leave{animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.zoom-big-enter,.zoom-big-appear,.zoom-big-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.zoom-big-enter.zoom-big-enter-active,.zoom-big-appear.zoom-big-appear-active{animation-name:antZoomBigIn;animation-play-state:running}.zoom-big-leave.zoom-big-leave-active{animation-name:antZoomBigOut;animation-play-state:running;pointer-events:none}.zoom-big-enter,.zoom-big-appear{transform:scale(0);opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.zoom-big-enter-prepare,.zoom-big-appear-prepare{transform:none}.zoom-big-leave{animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.ant-zoom-big-fast-enter,.ant-zoom-big-fast-appear,.ant-zoom-big-fast-leave{animation-duration:.1s;animation-fill-mode:both;animation-play-state:paused}.ant-zoom-big-fast-enter.ant-zoom-big-fast-enter-active,.ant-zoom-big-fast-appear.ant-zoom-big-fast-appear-active{animation-name:antZoomBigIn;animation-play-state:running}.ant-zoom-big-fast-leave.ant-zoom-big-fast-leave-active{animation-name:antZoomBigOut;animation-play-state:running;pointer-events:none}.ant-zoom-big-fast-enter,.ant-zoom-big-fast-appear{transform:scale(0);opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.ant-zoom-big-fast-enter-prepare,.ant-zoom-big-fast-appear-prepare{transform:none}.ant-zoom-big-fast-leave{animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.zoom-big-fast-enter,.zoom-big-fast-appear,.zoom-big-fast-leave{animation-duration:.1s;animation-fill-mode:both;animation-play-state:paused}.zoom-big-fast-enter.zoom-big-fast-enter-active,.zoom-big-fast-appear.zoom-big-fast-appear-active{animation-name:antZoomBigIn;animation-play-state:running}.zoom-big-fast-leave.zoom-big-fast-leave-active{animation-name:antZoomBigOut;animation-play-state:running;pointer-events:none}.zoom-big-fast-enter,.zoom-big-fast-appear{transform:scale(0);opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.zoom-big-fast-enter-prepare,.zoom-big-fast-appear-prepare{transform:none}.zoom-big-fast-leave{animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.ant-zoom-up-enter,.ant-zoom-up-appear,.ant-zoom-up-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.ant-zoom-up-enter.ant-zoom-up-enter-active,.ant-zoom-up-appear.ant-zoom-up-appear-active{animation-name:antZoomUpIn;animation-play-state:running}.ant-zoom-up-leave.ant-zoom-up-leave-active{animation-name:antZoomUpOut;animation-play-state:running;pointer-events:none}.ant-zoom-up-enter,.ant-zoom-up-appear{transform:scale(0);opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.ant-zoom-up-enter-prepare,.ant-zoom-up-appear-prepare{transform:none}.ant-zoom-up-leave{animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.zoom-up-enter,.zoom-up-appear,.zoom-up-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.zoom-up-enter.zoom-up-enter-active,.zoom-up-appear.zoom-up-appear-active{animation-name:antZoomUpIn;animation-play-state:running}.zoom-up-leave.zoom-up-leave-active{animation-name:antZoomUpOut;animation-play-state:running;pointer-events:none}.zoom-up-enter,.zoom-up-appear{transform:scale(0);opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.zoom-up-enter-prepare,.zoom-up-appear-prepare{transform:none}.zoom-up-leave{animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.ant-zoom-down-enter,.ant-zoom-down-appear,.ant-zoom-down-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.ant-zoom-down-enter.ant-zoom-down-enter-active,.ant-zoom-down-appear.ant-zoom-down-appear-active{animation-name:antZoomDownIn;animation-play-state:running}.ant-zoom-down-leave.ant-zoom-down-leave-active{animation-name:antZoomDownOut;animation-play-state:running;pointer-events:none}.ant-zoom-down-enter,.ant-zoom-down-appear{transform:scale(0);opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.ant-zoom-down-enter-prepare,.ant-zoom-down-appear-prepare{transform:none}.ant-zoom-down-leave{animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.zoom-down-enter,.zoom-down-appear,.zoom-down-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.zoom-down-enter.zoom-down-enter-active,.zoom-down-appear.zoom-down-appear-active{animation-name:antZoomDownIn;animation-play-state:running}.zoom-down-leave.zoom-down-leave-active{animation-name:antZoomDownOut;animation-play-state:running;pointer-events:none}.zoom-down-enter,.zoom-down-appear{transform:scale(0);opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.zoom-down-enter-prepare,.zoom-down-appear-prepare{transform:none}.zoom-down-leave{animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.ant-zoom-left-enter,.ant-zoom-left-appear,.ant-zoom-left-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.ant-zoom-left-enter.ant-zoom-left-enter-active,.ant-zoom-left-appear.ant-zoom-left-appear-active{animation-name:antZoomLeftIn;animation-play-state:running}.ant-zoom-left-leave.ant-zoom-left-leave-active{animation-name:antZoomLeftOut;animation-play-state:running;pointer-events:none}.ant-zoom-left-enter,.ant-zoom-left-appear{transform:scale(0);opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.ant-zoom-left-enter-prepare,.ant-zoom-left-appear-prepare{transform:none}.ant-zoom-left-leave{animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.zoom-left-enter,.zoom-left-appear,.zoom-left-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.zoom-left-enter.zoom-left-enter-active,.zoom-left-appear.zoom-left-appear-active{animation-name:antZoomLeftIn;animation-play-state:running}.zoom-left-leave.zoom-left-leave-active{animation-name:antZoomLeftOut;animation-play-state:running;pointer-events:none}.zoom-left-enter,.zoom-left-appear{transform:scale(0);opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.zoom-left-enter-prepare,.zoom-left-appear-prepare{transform:none}.zoom-left-leave{animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.ant-zoom-right-enter,.ant-zoom-right-appear,.ant-zoom-right-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.ant-zoom-right-enter.ant-zoom-right-enter-active,.ant-zoom-right-appear.ant-zoom-right-appear-active{animation-name:antZoomRightIn;animation-play-state:running}.ant-zoom-right-leave.ant-zoom-right-leave-active{animation-name:antZoomRightOut;animation-play-state:running;pointer-events:none}.ant-zoom-right-enter,.ant-zoom-right-appear{transform:scale(0);opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.ant-zoom-right-enter-prepare,.ant-zoom-right-appear-prepare{transform:none}.ant-zoom-right-leave{animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.zoom-right-enter,.zoom-right-appear,.zoom-right-leave{animation-duration:.2s;animation-fill-mode:both;animation-play-state:paused}.zoom-right-enter.zoom-right-enter-active,.zoom-right-appear.zoom-right-appear-active{animation-name:antZoomRightIn;animation-play-state:running}.zoom-right-leave.zoom-right-leave-active{animation-name:antZoomRightOut;animation-play-state:running;pointer-events:none}.zoom-right-enter,.zoom-right-appear{transform:scale(0);opacity:0;animation-timing-function:cubic-bezier(.08,.82,.17,1)}.zoom-right-enter-prepare,.zoom-right-appear-prepare{transform:none}.zoom-right-leave{animation-timing-function:cubic-bezier(.78,.14,.15,.86)}@keyframes antZoomIn{0%{transform:scale(.2);opacity:0}to{transform:scale(1);opacity:1}}@keyframes antZoomOut{0%{transform:scale(1)}to{transform:scale(.2);opacity:0}}@keyframes antZoomBigIn{0%{transform:scale(.8);opacity:0}to{transform:scale(1);opacity:1}}@keyframes antZoomBigOut{0%{transform:scale(1)}to{transform:scale(.8);opacity:0}}@keyframes antZoomUpIn{0%{transform:scale(.8);transform-origin:50% 0%;opacity:0}to{transform:scale(1);transform-origin:50% 0%}}@keyframes antZoomUpOut{0%{transform:scale(1);transform-origin:50% 0%}to{transform:scale(.8);transform-origin:50% 0%;opacity:0}}@keyframes antZoomLeftIn{0%{transform:scale(.8);transform-origin:0% 50%;opacity:0}to{transform:scale(1);transform-origin:0% 50%}}@keyframes antZoomLeftOut{0%{transform:scale(1);transform-origin:0% 50%}to{transform:scale(.8);transform-origin:0% 50%;opacity:0}}@keyframes antZoomRightIn{0%{transform:scale(.8);transform-origin:100% 50%;opacity:0}to{transform:scale(1);transform-origin:100% 50%}}@keyframes antZoomRightOut{0%{transform:scale(1);transform-origin:100% 50%}to{transform:scale(.8);transform-origin:100% 50%;opacity:0}}@keyframes antZoomDownIn{0%{transform:scale(.8);transform-origin:50% 100%;opacity:0}to{transform:scale(1);transform-origin:50% 100%}}@keyframes antZoomDownOut{0%{transform:scale(1);transform-origin:50% 100%}to{transform:scale(.8);transform-origin:50% 100%;opacity:0}}.ant-motion-collapse-legacy{overflow:hidden}.ant-motion-collapse-legacy-active{transition:height .2s cubic-bezier(.645,.045,.355,1),opacity .2s cubic-bezier(.645,.045,.355,1)!important}.ant-motion-collapse{overflow:hidden;transition:height .2s cubic-bezier(.645,.045,.355,1),opacity .2s cubic-bezier(.645,.045,.355,1)!important}.ant-affix{position:fixed;z-index:10}.ant-alert{box-sizing:border-box;margin:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:relative;display:flex;align-items:center;padding:8px 15px;word-wrap:break-word;border-radius:5px}.ant-alert-content{flex:1;min-width:0}.ant-alert-icon{margin-right:8px}.ant-alert-description{display:none;font-size:14px;line-height:22px}.ant-alert-success{background-color:#f6ffed;border:1px solid #b7eb8f}.ant-alert-success .ant-alert-icon{color:#52c41a}.ant-alert-info{background-color:#ccc8c0;border:1px solid #b3aea8}.ant-alert-info .ant-alert-icon{color:#8d6a46}.ant-alert-warning{background-color:#fffbe6;border:1px solid #ffe58f}.ant-alert-warning .ant-alert-icon{color:#faad14}.ant-alert-error{background-color:#ffece8;border:1px solid #ffa196}.ant-alert-error .ant-alert-icon{color:#e31a1a}.ant-alert-error .ant-alert-description>pre{margin:0;padding:0}.ant-alert-action{margin-left:8px}.ant-alert-close-icon{margin-left:8px;padding:0;overflow:hidden;font-size:12px;line-height:12px;background-color:transparent;border:none;outline:none;cursor:pointer}.ant-alert-close-icon .anticon-close{color:#00000073;transition:color .3s}.ant-alert-close-icon .anticon-close:hover{color:#000000bf}.ant-alert-close-text{color:#00000073;transition:color .3s}.ant-alert-close-text:hover{color:#000000bf}.ant-alert-with-description{align-items:flex-start;padding:15px 15px 15px 24px}.ant-alert-with-description.ant-alert-no-icon{padding:15px}.ant-alert-with-description .ant-alert-icon{margin-right:15px;font-size:24px}.ant-alert-with-description .ant-alert-message{display:block;margin-bottom:4px;color:#1c2d56;font-size:16px}.ant-alert-message{color:#1c2d56}.ant-alert-with-description .ant-alert-description{display:block}.ant-alert.ant-alert-motion-leave{overflow:hidden;opacity:1;transition:max-height .3s cubic-bezier(.78,.14,.15,.86),opacity .3s cubic-bezier(.78,.14,.15,.86),padding-top .3s cubic-bezier(.78,.14,.15,.86),padding-bottom .3s cubic-bezier(.78,.14,.15,.86),margin-bottom .3s cubic-bezier(.78,.14,.15,.86)}.ant-alert.ant-alert-motion-leave-active{max-height:0;margin-bottom:0!important;padding-top:0;padding-bottom:0;opacity:0}.ant-alert-banner{margin-bottom:0;border:0;border-radius:0}.ant-alert.ant-alert-rtl{direction:rtl}.ant-alert-rtl .ant-alert-icon{margin-right:auto;margin-left:8px}.ant-alert-rtl .ant-alert-action,.ant-alert-rtl .ant-alert-close-icon{margin-right:8px;margin-left:auto}.ant-alert-rtl.ant-alert-with-description{padding-right:24px;padding-left:15px}.ant-alert-rtl.ant-alert-with-description .ant-alert-icon{margin-right:auto;margin-left:15px}.ant-anchor{box-sizing:border-box;margin:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:relative;padding:0 0 0 2px}.ant-anchor-wrapper{margin-left:-4px;padding-left:4px;overflow:auto;background-color:transparent}.ant-anchor-ink{position:absolute;top:0;left:0;height:100%}.ant-anchor-ink:before{position:relative;display:block;width:2px;height:100%;margin:0 auto;background-color:#f0f0f0;content:" "}.ant-anchor-ink-ball{position:absolute;left:50%;display:none;width:8px;height:8px;background-color:#fff;border:2px solid #8D6A46;border-radius:8px;transform:translate(-50%);transition:top .3s ease-in-out}.ant-anchor-ink-ball.visible{display:inline-block}.ant-anchor-fixed .ant-anchor-ink .ant-anchor-ink-ball{display:none}.ant-anchor-link{padding:7px 0 7px 16px;line-height:1.143}.ant-anchor-link-title{position:relative;display:block;margin-bottom:6px;overflow:hidden;color:#000000d9;white-space:nowrap;text-overflow:ellipsis;transition:all .3s}.ant-anchor-link-title:only-child{margin-bottom:0}.ant-anchor-link-active>.ant-anchor-link-title{color:#8d6a46}.ant-anchor-link .ant-anchor-link{padding-top:5px;padding-bottom:5px}.ant-anchor-rtl{direction:rtl}.ant-anchor-rtl.ant-anchor-wrapper{margin-right:-4px;margin-left:0;padding-right:4px;padding-left:0}.ant-anchor-rtl .ant-anchor-ink{right:0;left:auto}.ant-anchor-rtl .ant-anchor-ink-ball{right:50%;left:0;transform:translate(50%)}.ant-anchor-rtl .ant-anchor-link{padding:7px 16px 7px 0}.ant-select-auto-complete{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum"}.ant-select-auto-complete .ant-select-clear{right:13px}.ant-avatar{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:relative;display:inline-block;overflow:hidden;color:#fff;white-space:nowrap;text-align:center;vertical-align:middle;background:#ccc;width:32px;height:32px;line-height:32px;border-radius:50%}.ant-avatar-image{background:transparent}.ant-avatar .ant-image-img{display:block}.ant-avatar-string{position:absolute;left:50%;transform-origin:0 center}.ant-avatar.ant-avatar-icon{font-size:18px}.ant-avatar.ant-avatar-icon>.anticon{margin:0}.ant-avatar-lg{width:40px;height:40px;line-height:40px;border-radius:50%}.ant-avatar-lg-string{position:absolute;left:50%;transform-origin:0 center}.ant-avatar-lg.ant-avatar-icon{font-size:24px}.ant-avatar-lg.ant-avatar-icon>.anticon{margin:0}.ant-avatar-sm{width:24px;height:24px;line-height:24px;border-radius:50%}.ant-avatar-sm-string{position:absolute;left:50%;transform-origin:0 center}.ant-avatar-sm.ant-avatar-icon{font-size:14px}.ant-avatar-sm.ant-avatar-icon>.anticon{margin:0}.ant-avatar-square{border-radius:5px}.ant-avatar>img{display:block;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.ant-avatar-group{display:inline-flex}.ant-avatar-group .ant-avatar{border:1px solid #fff}.ant-avatar-group .ant-avatar:not(:first-child){margin-left:-8px}.ant-avatar-group-popover .ant-avatar+.ant-avatar{margin-left:3px}.ant-avatar-group-rtl .ant-avatar:not(:first-child){margin-right:-8px;margin-left:0}.ant-avatar-group-popover.ant-popover-rtl .ant-avatar+.ant-avatar{margin-right:3px;margin-left:0}.ant-back-top{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:fixed;right:100px;bottom:50px;z-index:10;width:40px;height:40px;cursor:pointer}.ant-back-top:empty{display:none}.ant-back-top-rtl{right:auto;left:100px;direction:rtl}.ant-back-top-content{width:40px;height:40px;overflow:hidden;color:#fff;text-align:center;background-color:#00000073;border-radius:20px;transition:all .3s}.ant-back-top-content:hover{background-color:#000000d9;transition:all .3s}.ant-back-top-icon{font-size:24px;line-height:40px}@media screen and (max-width: 768px){.ant-back-top{right:60px}}@media screen and (max-width: 480px){.ant-back-top{right:20px}}.ant-badge{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;list-style:none;font-feature-settings:"tnum";position:relative;display:inline-block;line-height:1}.ant-badge-count{z-index:auto;min-width:20px;height:20px;padding:0 6px;color:#fff;font-weight:400;font-size:12px;line-height:20px;white-space:nowrap;text-align:center;background:#ff4d4f;border-radius:10px;box-shadow:0 0 0 1px #fff}.ant-badge-count a,.ant-badge-count a:hover{color:#fff}.ant-badge-count-sm{min-width:14px;height:14px;padding:0;font-size:12px;line-height:14px;border-radius:7px}.ant-badge-multiple-words{padding:0 8px}.ant-badge-dot{z-index:auto;width:6px;min-width:6px;height:6px;background:#ff4d4f;border-radius:100%;box-shadow:0 0 0 1px #fff}.ant-badge-dot.ant-scroll-number{transition:background 1.5s}.ant-badge-count,.ant-badge-dot,.ant-badge .ant-scroll-number-custom-component{position:absolute;top:0;right:0;transform:translate(50%,-50%);transform-origin:100% 0%}.ant-badge-count.anticon-spin,.ant-badge-dot.anticon-spin,.ant-badge .ant-scroll-number-custom-component.anticon-spin{animation:antBadgeLoadingCircle 1s infinite linear}.ant-badge-status{line-height:inherit;vertical-align:baseline}.ant-badge-status-dot{position:relative;top:-1px;display:inline-block;width:6px;height:6px;vertical-align:middle;border-radius:50%}.ant-badge-status-success{background-color:#52c41a}.ant-badge-status-processing{position:relative;background-color:#1890ff}.ant-badge-status-processing:after{position:absolute;top:0;left:0;width:100%;height:100%;border:1px solid #1890ff;border-radius:50%;animation:antStatusProcessing 1.2s infinite ease-in-out;content:""}.ant-badge-status-default{background-color:#d9d9d9}.ant-badge-status-error{background-color:#e31a1a}.ant-badge-status-warning{background-color:#faad14}.ant-badge-status-pink,.ant-badge-status-magenta{background:#eb2f96}.ant-badge-status-red{background:#f5222d}.ant-badge-status-volcano{background:#fa541c}.ant-badge-status-orange{background:#fa8c16}.ant-badge-status-yellow{background:#fadb14}.ant-badge-status-gold{background:#faad14}.ant-badge-status-cyan{background:#13c2c2}.ant-badge-status-lime{background:#a0d911}.ant-badge-status-green{background:#52c41a}.ant-badge-status-blue{background:#1890ff}.ant-badge-status-geekblue{background:#2f54eb}.ant-badge-status-purple{background:#722ed1}.ant-badge-status-text{margin-left:8px;color:#000000d9;font-size:14px}.ant-badge-zoom-appear,.ant-badge-zoom-enter{animation:antZoomBadgeIn .3s cubic-bezier(.12,.4,.29,1.46);animation-fill-mode:both}.ant-badge-zoom-leave{animation:antZoomBadgeOut .3s cubic-bezier(.71,-.46,.88,.6);animation-fill-mode:both}.ant-badge-not-a-wrapper .ant-badge-zoom-appear,.ant-badge-not-a-wrapper .ant-badge-zoom-enter{animation:antNoWrapperZoomBadgeIn .3s cubic-bezier(.12,.4,.29,1.46)}.ant-badge-not-a-wrapper .ant-badge-zoom-leave{animation:antNoWrapperZoomBadgeOut .3s cubic-bezier(.71,-.46,.88,.6)}.ant-badge-not-a-wrapper:not(.ant-badge-status){vertical-align:middle}.ant-badge-not-a-wrapper .ant-scroll-number-custom-component,.ant-badge-not-a-wrapper .ant-badge-count{transform:none}.ant-badge-not-a-wrapper .ant-scroll-number-custom-component,.ant-badge-not-a-wrapper .ant-scroll-number{position:relative;top:auto;display:block;transform-origin:50% 50%}@keyframes antStatusProcessing{0%{transform:scale(.8);opacity:.5}to{transform:scale(2.4);opacity:0}}.ant-scroll-number{overflow:hidden;direction:ltr}.ant-scroll-number-only{position:relative;display:inline-block;height:20px;transition:all .3s cubic-bezier(.645,.045,.355,1);-webkit-transform-style:preserve-3d;-webkit-backface-visibility:hidden}.ant-scroll-number-only>p.ant-scroll-number-only-unit{height:20px;margin:0;-webkit-transform-style:preserve-3d;-webkit-backface-visibility:hidden}.ant-scroll-number-symbol{vertical-align:top}@keyframes antZoomBadgeIn{0%{transform:scale(0) translate(50%,-50%);opacity:0}to{transform:scale(1) translate(50%,-50%)}}@keyframes antZoomBadgeOut{0%{transform:scale(1) translate(50%,-50%)}to{transform:scale(0) translate(50%,-50%);opacity:0}}@keyframes antNoWrapperZoomBadgeIn{0%{transform:scale(0);opacity:0}to{transform:scale(1)}}@keyframes antNoWrapperZoomBadgeOut{0%{transform:scale(1)}to{transform:scale(0);opacity:0}}@keyframes antBadgeLoadingCircle{0%{transform-origin:50%}to{transform:translate(50%,-50%) rotate(360deg);transform-origin:50%}}.ant-ribbon-wrapper{position:relative}.ant-ribbon{box-sizing:border-box;margin:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:absolute;top:8px;height:22px;padding:0 8px;color:#fff;line-height:22px;white-space:nowrap;background-color:#8d6a46;border-radius:5px}.ant-ribbon-text{color:#fff}.ant-ribbon-corner{position:absolute;top:100%;width:8px;height:8px;color:currentcolor;border:4px solid;transform:scaleY(.75);transform-origin:top}.ant-ribbon-corner:after{position:absolute;top:-4px;left:-4px;width:inherit;height:inherit;color:#00000040;border:inherit;content:""}.ant-ribbon-color-pink,.ant-ribbon-color-magenta{color:#eb2f96;background:#eb2f96}.ant-ribbon-color-red{color:#f5222d;background:#f5222d}.ant-ribbon-color-volcano{color:#fa541c;background:#fa541c}.ant-ribbon-color-orange{color:#fa8c16;background:#fa8c16}.ant-ribbon-color-yellow{color:#fadb14;background:#fadb14}.ant-ribbon-color-gold{color:#faad14;background:#faad14}.ant-ribbon-color-cyan{color:#13c2c2;background:#13c2c2}.ant-ribbon-color-lime{color:#a0d911;background:#a0d911}.ant-ribbon-color-green{color:#52c41a;background:#52c41a}.ant-ribbon-color-blue{color:#1890ff;background:#1890ff}.ant-ribbon-color-geekblue{color:#2f54eb;background:#2f54eb}.ant-ribbon-color-purple{color:#722ed1;background:#722ed1}.ant-ribbon.ant-ribbon-placement-end{right:-8px;border-bottom-right-radius:0}.ant-ribbon.ant-ribbon-placement-end .ant-ribbon-corner{right:0;border-color:currentcolor transparent transparent currentcolor}.ant-ribbon.ant-ribbon-placement-start{left:-8px;border-bottom-left-radius:0}.ant-ribbon.ant-ribbon-placement-start .ant-ribbon-corner{left:0;border-color:currentcolor currentcolor transparent transparent}.ant-badge-rtl{direction:rtl}.ant-badge-rtl .ant-badge:not(.ant-badge-not-a-wrapper) .ant-badge-count,.ant-badge-rtl .ant-badge:not(.ant-badge-not-a-wrapper) .ant-badge-dot,.ant-badge-rtl .ant-badge:not(.ant-badge-not-a-wrapper) .ant-scroll-number-custom-component{right:auto;left:0;direction:ltr;transform:translate(-50%,-50%);transform-origin:0% 0%}.ant-badge-rtl.ant-badge:not(.ant-badge-not-a-wrapper) .ant-scroll-number-custom-component{right:auto;left:0;transform:translate(-50%,-50%);transform-origin:0% 0%}.ant-badge-rtl .ant-badge-status-text{margin-right:8px;margin-left:0}.ant-ribbon-rtl{direction:rtl}.ant-ribbon-rtl.ant-ribbon-placement-end{right:unset;left:-8px;border-bottom-right-radius:5px;border-bottom-left-radius:0}.ant-ribbon-rtl.ant-ribbon-placement-end .ant-ribbon-corner{right:unset;left:0;border-color:currentcolor currentcolor transparent transparent}.ant-ribbon-rtl.ant-ribbon-placement-end .ant-ribbon-corner:after{border-color:currentcolor currentcolor transparent transparent}.ant-ribbon-rtl.ant-ribbon-placement-start{right:-8px;left:unset;border-bottom-right-radius:0;border-bottom-left-radius:5px}.ant-ribbon-rtl.ant-ribbon-placement-start .ant-ribbon-corner{right:0;left:unset;border-color:currentcolor transparent transparent currentcolor}.ant-ribbon-rtl.ant-ribbon-placement-start .ant-ribbon-corner:after{border-color:currentcolor transparent transparent currentcolor}.ant-breadcrumb{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";color:#00000073;font-size:14px}.ant-breadcrumb .anticon{font-size:14px}.ant-breadcrumb a{color:#00000073;transition:color .3s}.ant-breadcrumb a:hover{color:#998165}.ant-breadcrumb>span:last-child{color:#000000d9}.ant-breadcrumb>span:last-child a{color:#000000d9}.ant-breadcrumb>span:last-child .ant-breadcrumb-separator{display:none}.ant-breadcrumb-separator{margin:0 8px;color:#00000073}.ant-breadcrumb-link>.anticon+span,.ant-breadcrumb-link>.anticon+a{margin-left:4px}.ant-breadcrumb-overlay-link>.anticon{margin-left:4px}.ant-breadcrumb-rtl{direction:rtl}.ant-breadcrumb-rtl:before{display:table;content:""}.ant-breadcrumb-rtl:after{display:table;clear:both;content:""}.ant-breadcrumb-rtl>span{float:right}.ant-breadcrumb-rtl .ant-breadcrumb-link>.anticon+span,.ant-breadcrumb-rtl .ant-breadcrumb-link>.anticon+a{margin-right:4px;margin-left:0}.ant-breadcrumb-rtl .ant-breadcrumb-overlay-link>.anticon{margin-right:4px;margin-left:0}.ant-btn{line-height:1.5715;position:relative;display:inline-block;font-weight:400;white-space:nowrap;text-align:center;background-image:none;border:1px solid transparent;box-shadow:0 2px #00000004;cursor:pointer;transition:all .3s cubic-bezier(.645,.045,.355,1);-webkit-user-select:none;-moz-user-select:none;user-select:none;touch-action:manipulation;height:32px;padding:4px 15px;font-size:14px;border-radius:5px;color:#000000d9;border-color:#d9d9d9;background:#fff}.ant-btn>.anticon{line-height:1}.ant-btn,.ant-btn:active,.ant-btn:focus{outline:0}.ant-btn:not([disabled]):hover{text-decoration:none}.ant-btn:not([disabled]):active{outline:0;box-shadow:none}.ant-btn[disabled]{cursor:not-allowed}.ant-btn[disabled]>*{pointer-events:none}.ant-btn-lg{height:42px;padding:7.4px 15px;font-size:16px;border-radius:5px}.ant-btn-sm{height:24px;padding:0 7px;font-size:14px;border-radius:5px}.ant-btn>a:only-child{color:currentcolor}.ant-btn>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn:hover,.ant-btn:focus{color:#998165;border-color:#998165;background:#fff}.ant-btn:hover>a:only-child,.ant-btn:focus>a:only-child{color:currentcolor}.ant-btn:hover>a:only-child:after,.ant-btn:focus>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn:active{color:#66482e;border-color:#66482e;background:#fff}.ant-btn:active>a:only-child{color:currentcolor}.ant-btn:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn[disabled],.ant-btn[disabled]:hover,.ant-btn[disabled]:focus,.ant-btn[disabled]:active{color:#00000040;border-color:#d9d9d9;background:#f5f5f5;text-shadow:none;box-shadow:none}.ant-btn[disabled]>a:only-child,.ant-btn[disabled]:hover>a:only-child,.ant-btn[disabled]:focus>a:only-child,.ant-btn[disabled]:active>a:only-child{color:currentcolor}.ant-btn[disabled]>a:only-child:after,.ant-btn[disabled]:hover>a:only-child:after,.ant-btn[disabled]:focus>a:only-child:after,.ant-btn[disabled]:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn:hover,.ant-btn:focus,.ant-btn:active{text-decoration:none;background:#fff}.ant-btn>span{display:inline-block}.ant-btn-primary{color:#fff;border-color:#8d6a46;background:#8d6a46;text-shadow:0 -1px 0 rgba(0,0,0,.12);box-shadow:0 2px #0000000b}.ant-btn-primary>a:only-child{color:currentcolor}.ant-btn-primary>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-primary:hover,.ant-btn-primary:focus{color:#fff;border-color:#998165;background:#998165}.ant-btn-primary:hover>a:only-child,.ant-btn-primary:focus>a:only-child{color:currentcolor}.ant-btn-primary:hover>a:only-child:after,.ant-btn-primary:focus>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-primary:active{color:#fff;border-color:#66482e;background:#66482e}.ant-btn-primary:active>a:only-child{color:currentcolor}.ant-btn-primary:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-primary[disabled],.ant-btn-primary[disabled]:hover,.ant-btn-primary[disabled]:focus,.ant-btn-primary[disabled]:active{color:#00000040;border-color:#d9d9d9;background:#f5f5f5;text-shadow:none;box-shadow:none}.ant-btn-primary[disabled]>a:only-child,.ant-btn-primary[disabled]:hover>a:only-child,.ant-btn-primary[disabled]:focus>a:only-child,.ant-btn-primary[disabled]:active>a:only-child{color:currentcolor}.ant-btn-primary[disabled]>a:only-child:after,.ant-btn-primary[disabled]:hover>a:only-child:after,.ant-btn-primary[disabled]:focus>a:only-child:after,.ant-btn-primary[disabled]:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-group .ant-btn-primary:not(:first-child):not(:last-child){border-right-color:#998165;border-left-color:#998165}.ant-btn-group .ant-btn-primary:not(:first-child):not(:last-child):disabled{border-color:#d9d9d9}.ant-btn-group .ant-btn-primary:first-child:not(:last-child){border-right-color:#998165}.ant-btn-group .ant-btn-primary:first-child:not(:last-child)[disabled]{border-right-color:#d9d9d9}.ant-btn-group .ant-btn-primary:last-child:not(:first-child),.ant-btn-group .ant-btn-primary+.ant-btn-primary{border-left-color:#998165}.ant-btn-group .ant-btn-primary:last-child:not(:first-child)[disabled],.ant-btn-group .ant-btn-primary+.ant-btn-primary[disabled]{border-left-color:#d9d9d9}.ant-btn-ghost{color:#000000d9;border-color:#d9d9d9;background:transparent}.ant-btn-ghost>a:only-child{color:currentcolor}.ant-btn-ghost>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-ghost:hover,.ant-btn-ghost:focus{color:#998165;border-color:#998165;background:transparent}.ant-btn-ghost:hover>a:only-child,.ant-btn-ghost:focus>a:only-child{color:currentcolor}.ant-btn-ghost:hover>a:only-child:after,.ant-btn-ghost:focus>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-ghost:active{color:#66482e;border-color:#66482e;background:transparent}.ant-btn-ghost:active>a:only-child{color:currentcolor}.ant-btn-ghost:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-ghost[disabled],.ant-btn-ghost[disabled]:hover,.ant-btn-ghost[disabled]:focus,.ant-btn-ghost[disabled]:active{color:#00000040;border-color:#d9d9d9;background:#f5f5f5;text-shadow:none;box-shadow:none}.ant-btn-ghost[disabled]>a:only-child,.ant-btn-ghost[disabled]:hover>a:only-child,.ant-btn-ghost[disabled]:focus>a:only-child,.ant-btn-ghost[disabled]:active>a:only-child{color:currentcolor}.ant-btn-ghost[disabled]>a:only-child:after,.ant-btn-ghost[disabled]:hover>a:only-child:after,.ant-btn-ghost[disabled]:focus>a:only-child:after,.ant-btn-ghost[disabled]:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dashed{color:#000000d9;border-color:#d9d9d9;background:#fff;border-style:dashed}.ant-btn-dashed>a:only-child{color:currentcolor}.ant-btn-dashed>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dashed:hover,.ant-btn-dashed:focus{color:#998165;border-color:#998165;background:#fff}.ant-btn-dashed:hover>a:only-child,.ant-btn-dashed:focus>a:only-child{color:currentcolor}.ant-btn-dashed:hover>a:only-child:after,.ant-btn-dashed:focus>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dashed:active{color:#66482e;border-color:#66482e;background:#fff}.ant-btn-dashed:active>a:only-child{color:currentcolor}.ant-btn-dashed:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dashed[disabled],.ant-btn-dashed[disabled]:hover,.ant-btn-dashed[disabled]:focus,.ant-btn-dashed[disabled]:active{color:#00000040;border-color:#d9d9d9;background:#f5f5f5;text-shadow:none;box-shadow:none}.ant-btn-dashed[disabled]>a:only-child,.ant-btn-dashed[disabled]:hover>a:only-child,.ant-btn-dashed[disabled]:focus>a:only-child,.ant-btn-dashed[disabled]:active>a:only-child{color:currentcolor}.ant-btn-dashed[disabled]>a:only-child:after,.ant-btn-dashed[disabled]:hover>a:only-child:after,.ant-btn-dashed[disabled]:focus>a:only-child:after,.ant-btn-dashed[disabled]:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-danger{color:#fff;border-color:#e31a1a;background:#e31a1a;text-shadow:0 -1px 0 rgba(0,0,0,.12);box-shadow:0 2px #0000000b}.ant-btn-danger>a:only-child{color:currentcolor}.ant-btn-danger>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-danger:hover,.ant-btn-danger:focus{color:#fff;border-color:#f04741;background:#f04741}.ant-btn-danger:hover>a:only-child,.ant-btn-danger:focus>a:only-child{color:currentcolor}.ant-btn-danger:hover>a:only-child:after,.ant-btn-danger:focus>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-danger:active{color:#fff;border-color:#bd0b11;background:#bd0b11}.ant-btn-danger:active>a:only-child{color:currentcolor}.ant-btn-danger:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-danger[disabled],.ant-btn-danger[disabled]:hover,.ant-btn-danger[disabled]:focus,.ant-btn-danger[disabled]:active{color:#00000040;border-color:#d9d9d9;background:#f5f5f5;text-shadow:none;box-shadow:none}.ant-btn-danger[disabled]>a:only-child,.ant-btn-danger[disabled]:hover>a:only-child,.ant-btn-danger[disabled]:focus>a:only-child,.ant-btn-danger[disabled]:active>a:only-child{color:currentcolor}.ant-btn-danger[disabled]>a:only-child:after,.ant-btn-danger[disabled]:hover>a:only-child:after,.ant-btn-danger[disabled]:focus>a:only-child:after,.ant-btn-danger[disabled]:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-link{color:#1c2d56;border-color:transparent;background:transparent;box-shadow:none}.ant-btn-link>a:only-child{color:currentcolor}.ant-btn-link>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-link:hover,.ant-btn-link:focus{color:#998165;border-color:#998165;background:transparent}.ant-btn-link:hover>a:only-child,.ant-btn-link:focus>a:only-child{color:currentcolor}.ant-btn-link:hover>a:only-child:after,.ant-btn-link:focus>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-link:active{color:#66482e;border-color:#66482e;background:transparent}.ant-btn-link:active>a:only-child{color:currentcolor}.ant-btn-link:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-link[disabled],.ant-btn-link[disabled]:hover,.ant-btn-link[disabled]:focus,.ant-btn-link[disabled]:active{color:#00000040;border-color:#d9d9d9;background:#f5f5f5;text-shadow:none;box-shadow:none}.ant-btn-link:hover{background:transparent}.ant-btn-link:hover,.ant-btn-link:focus,.ant-btn-link:active{border-color:transparent}.ant-btn-link[disabled],.ant-btn-link[disabled]:hover,.ant-btn-link[disabled]:focus,.ant-btn-link[disabled]:active{color:#00000040;border-color:transparent;background:transparent;text-shadow:none;box-shadow:none}.ant-btn-link[disabled]>a:only-child,.ant-btn-link[disabled]:hover>a:only-child,.ant-btn-link[disabled]:focus>a:only-child,.ant-btn-link[disabled]:active>a:only-child{color:currentcolor}.ant-btn-link[disabled]>a:only-child:after,.ant-btn-link[disabled]:hover>a:only-child:after,.ant-btn-link[disabled]:focus>a:only-child:after,.ant-btn-link[disabled]:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-text{color:#000000d9;border-color:transparent;background:transparent;box-shadow:none}.ant-btn-text>a:only-child{color:currentcolor}.ant-btn-text>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-text:hover,.ant-btn-text:focus{color:#998165;border-color:#998165;background:transparent}.ant-btn-text:hover>a:only-child,.ant-btn-text:focus>a:only-child{color:currentcolor}.ant-btn-text:hover>a:only-child:after,.ant-btn-text:focus>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-text:active{color:#66482e;border-color:#66482e;background:transparent}.ant-btn-text:active>a:only-child{color:currentcolor}.ant-btn-text:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-text[disabled],.ant-btn-text[disabled]:hover,.ant-btn-text[disabled]:focus,.ant-btn-text[disabled]:active{color:#00000040;border-color:#d9d9d9;background:#f5f5f5;text-shadow:none;box-shadow:none}.ant-btn-text:hover,.ant-btn-text:focus{color:#000000d9;background:#00000005;border-color:transparent}.ant-btn-text:active{color:#000000d9;background:#00000007;border-color:transparent}.ant-btn-text[disabled],.ant-btn-text[disabled]:hover,.ant-btn-text[disabled]:focus,.ant-btn-text[disabled]:active{color:#00000040;border-color:transparent;background:transparent;text-shadow:none;box-shadow:none}.ant-btn-text[disabled]>a:only-child,.ant-btn-text[disabled]:hover>a:only-child,.ant-btn-text[disabled]:focus>a:only-child,.ant-btn-text[disabled]:active>a:only-child{color:currentcolor}.ant-btn-text[disabled]>a:only-child:after,.ant-btn-text[disabled]:hover>a:only-child:after,.ant-btn-text[disabled]:focus>a:only-child:after,.ant-btn-text[disabled]:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dangerous{color:#e31a1a;border-color:#e31a1a;background:#fff}.ant-btn-dangerous>a:only-child{color:currentcolor}.ant-btn-dangerous>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dangerous:hover,.ant-btn-dangerous:focus{color:#f04741;border-color:#f04741;background:#fff}.ant-btn-dangerous:hover>a:only-child,.ant-btn-dangerous:focus>a:only-child{color:currentcolor}.ant-btn-dangerous:hover>a:only-child:after,.ant-btn-dangerous:focus>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dangerous:active{color:#bd0b11;border-color:#bd0b11;background:#fff}.ant-btn-dangerous:active>a:only-child{color:currentcolor}.ant-btn-dangerous:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dangerous[disabled],.ant-btn-dangerous[disabled]:hover,.ant-btn-dangerous[disabled]:focus,.ant-btn-dangerous[disabled]:active{color:#00000040;border-color:#d9d9d9;background:#f5f5f5;text-shadow:none;box-shadow:none}.ant-btn-dangerous[disabled]>a:only-child,.ant-btn-dangerous[disabled]:hover>a:only-child,.ant-btn-dangerous[disabled]:focus>a:only-child,.ant-btn-dangerous[disabled]:active>a:only-child{color:currentcolor}.ant-btn-dangerous[disabled]>a:only-child:after,.ant-btn-dangerous[disabled]:hover>a:only-child:after,.ant-btn-dangerous[disabled]:focus>a:only-child:after,.ant-btn-dangerous[disabled]:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dangerous.ant-btn-primary{color:#fff;border-color:#e31a1a;background:#e31a1a;text-shadow:0 -1px 0 rgba(0,0,0,.12);box-shadow:0 2px #0000000b}.ant-btn-dangerous.ant-btn-primary>a:only-child{color:currentcolor}.ant-btn-dangerous.ant-btn-primary>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dangerous.ant-btn-primary:hover,.ant-btn-dangerous.ant-btn-primary:focus{color:#fff;border-color:#f04741;background:#f04741}.ant-btn-dangerous.ant-btn-primary:hover>a:only-child,.ant-btn-dangerous.ant-btn-primary:focus>a:only-child{color:currentcolor}.ant-btn-dangerous.ant-btn-primary:hover>a:only-child:after,.ant-btn-dangerous.ant-btn-primary:focus>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dangerous.ant-btn-primary:active{color:#fff;border-color:#bd0b11;background:#bd0b11}.ant-btn-dangerous.ant-btn-primary:active>a:only-child{color:currentcolor}.ant-btn-dangerous.ant-btn-primary:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dangerous.ant-btn-primary[disabled],.ant-btn-dangerous.ant-btn-primary[disabled]:hover,.ant-btn-dangerous.ant-btn-primary[disabled]:focus,.ant-btn-dangerous.ant-btn-primary[disabled]:active{color:#00000040;border-color:#d9d9d9;background:#f5f5f5;text-shadow:none;box-shadow:none}.ant-btn-dangerous.ant-btn-primary[disabled]>a:only-child,.ant-btn-dangerous.ant-btn-primary[disabled]:hover>a:only-child,.ant-btn-dangerous.ant-btn-primary[disabled]:focus>a:only-child,.ant-btn-dangerous.ant-btn-primary[disabled]:active>a:only-child{color:currentcolor}.ant-btn-dangerous.ant-btn-primary[disabled]>a:only-child:after,.ant-btn-dangerous.ant-btn-primary[disabled]:hover>a:only-child:after,.ant-btn-dangerous.ant-btn-primary[disabled]:focus>a:only-child:after,.ant-btn-dangerous.ant-btn-primary[disabled]:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dangerous.ant-btn-link{color:#e31a1a;border-color:transparent;background:transparent;box-shadow:none}.ant-btn-dangerous.ant-btn-link>a:only-child{color:currentcolor}.ant-btn-dangerous.ant-btn-link>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dangerous.ant-btn-link:hover,.ant-btn-dangerous.ant-btn-link:focus{color:#998165;border-color:#998165;background:transparent}.ant-btn-dangerous.ant-btn-link:active{color:#66482e;border-color:#66482e;background:transparent}.ant-btn-dangerous.ant-btn-link[disabled],.ant-btn-dangerous.ant-btn-link[disabled]:hover,.ant-btn-dangerous.ant-btn-link[disabled]:focus,.ant-btn-dangerous.ant-btn-link[disabled]:active{color:#00000040;border-color:#d9d9d9;background:#f5f5f5;text-shadow:none;box-shadow:none}.ant-btn-dangerous.ant-btn-link:hover,.ant-btn-dangerous.ant-btn-link:focus{color:#f04741;border-color:transparent;background:transparent}.ant-btn-dangerous.ant-btn-link:hover>a:only-child,.ant-btn-dangerous.ant-btn-link:focus>a:only-child{color:currentcolor}.ant-btn-dangerous.ant-btn-link:hover>a:only-child:after,.ant-btn-dangerous.ant-btn-link:focus>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dangerous.ant-btn-link:active{color:#bd0b11;border-color:transparent;background:transparent}.ant-btn-dangerous.ant-btn-link:active>a:only-child{color:currentcolor}.ant-btn-dangerous.ant-btn-link:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dangerous.ant-btn-link[disabled],.ant-btn-dangerous.ant-btn-link[disabled]:hover,.ant-btn-dangerous.ant-btn-link[disabled]:focus,.ant-btn-dangerous.ant-btn-link[disabled]:active{color:#00000040;border-color:transparent;background:transparent;text-shadow:none;box-shadow:none}.ant-btn-dangerous.ant-btn-link[disabled]>a:only-child,.ant-btn-dangerous.ant-btn-link[disabled]:hover>a:only-child,.ant-btn-dangerous.ant-btn-link[disabled]:focus>a:only-child,.ant-btn-dangerous.ant-btn-link[disabled]:active>a:only-child{color:currentcolor}.ant-btn-dangerous.ant-btn-link[disabled]>a:only-child:after,.ant-btn-dangerous.ant-btn-link[disabled]:hover>a:only-child:after,.ant-btn-dangerous.ant-btn-link[disabled]:focus>a:only-child:after,.ant-btn-dangerous.ant-btn-link[disabled]:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dangerous.ant-btn-text{color:#e31a1a;border-color:transparent;background:transparent;box-shadow:none}.ant-btn-dangerous.ant-btn-text>a:only-child{color:currentcolor}.ant-btn-dangerous.ant-btn-text>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dangerous.ant-btn-text:hover,.ant-btn-dangerous.ant-btn-text:focus{color:#998165;border-color:#998165;background:transparent}.ant-btn-dangerous.ant-btn-text:active{color:#66482e;border-color:#66482e;background:transparent}.ant-btn-dangerous.ant-btn-text[disabled],.ant-btn-dangerous.ant-btn-text[disabled]:hover,.ant-btn-dangerous.ant-btn-text[disabled]:focus,.ant-btn-dangerous.ant-btn-text[disabled]:active{color:#00000040;border-color:#d9d9d9;background:#f5f5f5;text-shadow:none;box-shadow:none}.ant-btn-dangerous.ant-btn-text:hover,.ant-btn-dangerous.ant-btn-text:focus{color:#f04741;border-color:transparent;background:#00000005}.ant-btn-dangerous.ant-btn-text:hover>a:only-child,.ant-btn-dangerous.ant-btn-text:focus>a:only-child{color:currentcolor}.ant-btn-dangerous.ant-btn-text:hover>a:only-child:after,.ant-btn-dangerous.ant-btn-text:focus>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dangerous.ant-btn-text:active{color:#bd0b11;border-color:transparent;background:#00000007}.ant-btn-dangerous.ant-btn-text:active>a:only-child{color:currentcolor}.ant-btn-dangerous.ant-btn-text:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dangerous.ant-btn-text[disabled],.ant-btn-dangerous.ant-btn-text[disabled]:hover,.ant-btn-dangerous.ant-btn-text[disabled]:focus,.ant-btn-dangerous.ant-btn-text[disabled]:active{color:#00000040;border-color:transparent;background:transparent;text-shadow:none;box-shadow:none}.ant-btn-dangerous.ant-btn-text[disabled]>a:only-child,.ant-btn-dangerous.ant-btn-text[disabled]:hover>a:only-child,.ant-btn-dangerous.ant-btn-text[disabled]:focus>a:only-child,.ant-btn-dangerous.ant-btn-text[disabled]:active>a:only-child{color:currentcolor}.ant-btn-dangerous.ant-btn-text[disabled]>a:only-child:after,.ant-btn-dangerous.ant-btn-text[disabled]:hover>a:only-child:after,.ant-btn-dangerous.ant-btn-text[disabled]:focus>a:only-child:after,.ant-btn-dangerous.ant-btn-text[disabled]:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-icon-only{width:32px;height:32px;padding:2.4px 0;font-size:16px;border-radius:5px;vertical-align:-3px}.ant-btn-icon-only>*{font-size:16px}.ant-btn-icon-only.ant-btn-lg{width:42px;height:42px;padding:5.9px 0;font-size:18px;border-radius:5px}.ant-btn-icon-only.ant-btn-lg>*{font-size:18px}.ant-btn-icon-only.ant-btn-sm{width:24px;height:24px;padding:0;font-size:14px;border-radius:5px}.ant-btn-icon-only.ant-btn-sm>*{font-size:14px}.ant-btn-icon-only>.anticon{display:flex;justify-content:center}a.ant-btn-icon-only{vertical-align:-1px}a.ant-btn-icon-only>.anticon{display:inline}.ant-btn-round{height:32px;padding:4px 16px;font-size:14px;border-radius:32px}.ant-btn-round.ant-btn-lg{height:42px;padding:7.4px 21px;font-size:16px;border-radius:42px}.ant-btn-round.ant-btn-sm{height:24px;padding:0 12px;font-size:14px;border-radius:24px}.ant-btn-round.ant-btn-icon-only{width:auto}.ant-btn-circle{min-width:32px;padding-right:0;padding-left:0;text-align:center;border-radius:50%}.ant-btn-circle.ant-btn-lg{min-width:42px;border-radius:50%}.ant-btn-circle.ant-btn-sm{min-width:24px;border-radius:50%}.ant-btn:before{position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;z-index:1;display:none;background:#fff;border-radius:inherit;opacity:.35;transition:opacity .2s;content:"";pointer-events:none}.ant-btn .anticon{transition:margin-left .3s cubic-bezier(.645,.045,.355,1)}.ant-btn .anticon.anticon-plus>svg,.ant-btn .anticon.anticon-minus>svg{shape-rendering:optimizespeed}.ant-btn.ant-btn-loading{position:relative;cursor:default}.ant-btn.ant-btn-loading:before{display:block}.ant-btn>.ant-btn-loading-icon{transition:width .3s cubic-bezier(.645,.045,.355,1),opacity .3s cubic-bezier(.645,.045,.355,1)}.ant-btn>.ant-btn-loading-icon .anticon{padding-right:8px;animation:none}.ant-btn>.ant-btn-loading-icon .anticon svg{animation:loadingCircle 1s infinite linear}.ant-btn>.ant-btn-loading-icon:only-child .anticon{padding-right:0}.ant-btn-group{position:relative;display:inline-flex}.ant-btn-group>.ant-btn,.ant-btn-group>span>.ant-btn{position:relative}.ant-btn-group>.ant-btn:hover,.ant-btn-group>span>.ant-btn:hover,.ant-btn-group>.ant-btn:focus,.ant-btn-group>span>.ant-btn:focus,.ant-btn-group>.ant-btn:active,.ant-btn-group>span>.ant-btn:active{z-index:2}.ant-btn-group>.ant-btn[disabled],.ant-btn-group>span>.ant-btn[disabled]{z-index:0}.ant-btn-group .ant-btn-icon-only{font-size:14px}.ant-btn-group-lg>.ant-btn,.ant-btn-group-lg>span>.ant-btn{height:42px;padding:7.4px 15px;font-size:16px;border-radius:0}.ant-btn-group-lg .ant-btn.ant-btn-icon-only{width:42px;height:42px;padding-right:0;padding-left:0}.ant-btn-group-sm>.ant-btn,.ant-btn-group-sm>span>.ant-btn{height:24px;padding:0 7px;font-size:14px;border-radius:0}.ant-btn-group-sm>.ant-btn>.anticon,.ant-btn-group-sm>span>.ant-btn>.anticon{font-size:14px}.ant-btn-group-sm .ant-btn.ant-btn-icon-only{width:24px;height:24px;padding-right:0;padding-left:0}.ant-btn-group .ant-btn+.ant-btn,.ant-btn+.ant-btn-group,.ant-btn-group span+.ant-btn,.ant-btn-group .ant-btn+span,.ant-btn-group>span+span,.ant-btn-group+.ant-btn,.ant-btn-group+.ant-btn-group{margin-left:-1px}.ant-btn-group .ant-btn-primary+.ant-btn:not(.ant-btn-primary):not([disabled]){border-left-color:transparent}.ant-btn-group .ant-btn{border-radius:0}.ant-btn-group>.ant-btn:first-child,.ant-btn-group>span:first-child>.ant-btn{margin-left:0}.ant-btn-group>.ant-btn:only-child{border-radius:5px}.ant-btn-group>span:only-child>.ant-btn{border-radius:5px}.ant-btn-group>.ant-btn:first-child:not(:last-child),.ant-btn-group>span:first-child:not(:last-child)>.ant-btn{border-top-left-radius:5px;border-bottom-left-radius:5px}.ant-btn-group>.ant-btn:last-child:not(:first-child),.ant-btn-group>span:last-child:not(:first-child)>.ant-btn{border-top-right-radius:5px;border-bottom-right-radius:5px}.ant-btn-group-sm>.ant-btn:only-child{border-radius:5px}.ant-btn-group-sm>span:only-child>.ant-btn{border-radius:5px}.ant-btn-group-sm>.ant-btn:first-child:not(:last-child),.ant-btn-group-sm>span:first-child:not(:last-child)>.ant-btn{border-top-left-radius:5px;border-bottom-left-radius:5px}.ant-btn-group-sm>.ant-btn:last-child:not(:first-child),.ant-btn-group-sm>span:last-child:not(:first-child)>.ant-btn{border-top-right-radius:5px;border-bottom-right-radius:5px}.ant-btn-group>.ant-btn-group{float:left}.ant-btn-group>.ant-btn-group:not(:first-child):not(:last-child)>.ant-btn{border-radius:0}.ant-btn-group>.ant-btn-group:first-child:not(:last-child)>.ant-btn:last-child{padding-right:8px;border-top-right-radius:0;border-bottom-right-radius:0}.ant-btn-group>.ant-btn-group:last-child:not(:first-child)>.ant-btn:first-child{padding-left:8px;border-top-left-radius:0;border-bottom-left-radius:0}.ant-btn-rtl.ant-btn-group .ant-btn+.ant-btn,.ant-btn-rtl.ant-btn+.ant-btn-group,.ant-btn-rtl.ant-btn-group span+.ant-btn,.ant-btn-rtl.ant-btn-group .ant-btn+span,.ant-btn-rtl.ant-btn-group>span+span,.ant-btn-rtl.ant-btn-group+.ant-btn,.ant-btn-rtl.ant-btn-group+.ant-btn-group,.ant-btn-group-rtl.ant-btn-group .ant-btn+.ant-btn,.ant-btn-group-rtl.ant-btn+.ant-btn-group,.ant-btn-group-rtl.ant-btn-group span+.ant-btn,.ant-btn-group-rtl.ant-btn-group .ant-btn+span,.ant-btn-group-rtl.ant-btn-group>span+span,.ant-btn-group-rtl.ant-btn-group+.ant-btn,.ant-btn-group-rtl.ant-btn-group+.ant-btn-group{margin-right:-1px;margin-left:auto}.ant-btn-group.ant-btn-group-rtl{direction:rtl}.ant-btn-group-rtl.ant-btn-group>.ant-btn:first-child:not(:last-child),.ant-btn-group-rtl.ant-btn-group>span:first-child:not(:last-child)>.ant-btn{border-radius:0 5px 5px 0}.ant-btn-group-rtl.ant-btn-group>.ant-btn:last-child:not(:first-child),.ant-btn-group-rtl.ant-btn-group>span:last-child:not(:first-child)>.ant-btn{border-radius:5px 0 0 5px}.ant-btn-group-rtl.ant-btn-group-sm>.ant-btn:first-child:not(:last-child),.ant-btn-group-rtl.ant-btn-group-sm>span:first-child:not(:last-child)>.ant-btn{border-radius:0 5px 5px 0}.ant-btn-group-rtl.ant-btn-group-sm>.ant-btn:last-child:not(:first-child),.ant-btn-group-rtl.ant-btn-group-sm>span:last-child:not(:first-child)>.ant-btn{border-radius:5px 0 0 5px}.ant-btn:focus>span,.ant-btn:active>span{position:relative}.ant-btn>.anticon+span,.ant-btn>span+.anticon{margin-left:8px}.ant-btn.ant-btn-background-ghost{color:#fff;border-color:#fff}.ant-btn.ant-btn-background-ghost,.ant-btn.ant-btn-background-ghost:hover,.ant-btn.ant-btn-background-ghost:active,.ant-btn.ant-btn-background-ghost:focus{background:transparent}.ant-btn.ant-btn-background-ghost:hover,.ant-btn.ant-btn-background-ghost:focus{color:#998165;border-color:#998165}.ant-btn.ant-btn-background-ghost:active{color:#66482e;border-color:#66482e}.ant-btn.ant-btn-background-ghost[disabled]{color:#00000040;background:transparent;border-color:#d9d9d9}.ant-btn-background-ghost.ant-btn-primary{color:#8d6a46;border-color:#8d6a46;text-shadow:none}.ant-btn-background-ghost.ant-btn-primary>a:only-child{color:currentcolor}.ant-btn-background-ghost.ant-btn-primary>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-primary:hover,.ant-btn-background-ghost.ant-btn-primary:focus{color:#998165;border-color:#998165}.ant-btn-background-ghost.ant-btn-primary:hover>a:only-child,.ant-btn-background-ghost.ant-btn-primary:focus>a:only-child{color:currentcolor}.ant-btn-background-ghost.ant-btn-primary:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary:focus>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-primary:active{color:#66482e;border-color:#66482e}.ant-btn-background-ghost.ant-btn-primary:active>a:only-child{color:currentcolor}.ant-btn-background-ghost.ant-btn-primary:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-primary[disabled],.ant-btn-background-ghost.ant-btn-primary[disabled]:hover,.ant-btn-background-ghost.ant-btn-primary[disabled]:focus,.ant-btn-background-ghost.ant-btn-primary[disabled]:active{color:#00000040;border-color:#d9d9d9;background:#f5f5f5;text-shadow:none;box-shadow:none}.ant-btn-background-ghost.ant-btn-primary[disabled]>a:only-child,.ant-btn-background-ghost.ant-btn-primary[disabled]:hover>a:only-child,.ant-btn-background-ghost.ant-btn-primary[disabled]:focus>a:only-child,.ant-btn-background-ghost.ant-btn-primary[disabled]:active>a:only-child{color:currentcolor}.ant-btn-background-ghost.ant-btn-primary[disabled]>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary[disabled]:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary[disabled]:focus>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary[disabled]:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-danger{color:#e31a1a;border-color:#e31a1a;text-shadow:none}.ant-btn-background-ghost.ant-btn-danger>a:only-child{color:currentcolor}.ant-btn-background-ghost.ant-btn-danger>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-danger:hover,.ant-btn-background-ghost.ant-btn-danger:focus{color:#f04741;border-color:#f04741}.ant-btn-background-ghost.ant-btn-danger:hover>a:only-child,.ant-btn-background-ghost.ant-btn-danger:focus>a:only-child{color:currentcolor}.ant-btn-background-ghost.ant-btn-danger:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger:focus>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-danger:active{color:#bd0b11;border-color:#bd0b11}.ant-btn-background-ghost.ant-btn-danger:active>a:only-child{color:currentcolor}.ant-btn-background-ghost.ant-btn-danger:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-danger[disabled],.ant-btn-background-ghost.ant-btn-danger[disabled]:hover,.ant-btn-background-ghost.ant-btn-danger[disabled]:focus,.ant-btn-background-ghost.ant-btn-danger[disabled]:active{color:#00000040;border-color:#d9d9d9;background:#f5f5f5;text-shadow:none;box-shadow:none}.ant-btn-background-ghost.ant-btn-danger[disabled]>a:only-child,.ant-btn-background-ghost.ant-btn-danger[disabled]:hover>a:only-child,.ant-btn-background-ghost.ant-btn-danger[disabled]:focus>a:only-child,.ant-btn-background-ghost.ant-btn-danger[disabled]:active>a:only-child{color:currentcolor}.ant-btn-background-ghost.ant-btn-danger[disabled]>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger[disabled]:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger[disabled]:focus>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger[disabled]:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-dangerous{color:#e31a1a;border-color:#e31a1a;text-shadow:none}.ant-btn-background-ghost.ant-btn-dangerous>a:only-child{color:currentcolor}.ant-btn-background-ghost.ant-btn-dangerous>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-dangerous:hover,.ant-btn-background-ghost.ant-btn-dangerous:focus{color:#f04741;border-color:#f04741}.ant-btn-background-ghost.ant-btn-dangerous:hover>a:only-child,.ant-btn-background-ghost.ant-btn-dangerous:focus>a:only-child{color:currentcolor}.ant-btn-background-ghost.ant-btn-dangerous:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-dangerous:focus>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-dangerous:active{color:#bd0b11;border-color:#bd0b11}.ant-btn-background-ghost.ant-btn-dangerous:active>a:only-child{color:currentcolor}.ant-btn-background-ghost.ant-btn-dangerous:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-dangerous[disabled],.ant-btn-background-ghost.ant-btn-dangerous[disabled]:hover,.ant-btn-background-ghost.ant-btn-dangerous[disabled]:focus,.ant-btn-background-ghost.ant-btn-dangerous[disabled]:active{color:#00000040;border-color:#d9d9d9;background:#f5f5f5;text-shadow:none;box-shadow:none}.ant-btn-background-ghost.ant-btn-dangerous[disabled]>a:only-child,.ant-btn-background-ghost.ant-btn-dangerous[disabled]:hover>a:only-child,.ant-btn-background-ghost.ant-btn-dangerous[disabled]:focus>a:only-child,.ant-btn-background-ghost.ant-btn-dangerous[disabled]:active>a:only-child{color:currentcolor}.ant-btn-background-ghost.ant-btn-dangerous[disabled]>a:only-child:after,.ant-btn-background-ghost.ant-btn-dangerous[disabled]:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-dangerous[disabled]:focus>a:only-child:after,.ant-btn-background-ghost.ant-btn-dangerous[disabled]:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link{color:#e31a1a;border-color:transparent;text-shadow:none}.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link>a:only-child{color:currentcolor}.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link:hover,.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link:focus{color:#f04741;border-color:transparent}.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link:hover>a:only-child,.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link:focus>a:only-child{color:currentcolor}.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link:focus>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link:active{color:#bd0b11;border-color:transparent}.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link:active>a:only-child{color:currentcolor}.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled],.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled]:hover,.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled]:focus,.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled]:active{color:#00000040;border-color:#d9d9d9;background:#f5f5f5;text-shadow:none;box-shadow:none}.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled]>a:only-child,.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled]:hover>a:only-child,.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled]:focus>a:only-child,.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled]:active>a:only-child{color:currentcolor}.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled]>a:only-child:after,.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled]:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled]:focus>a:only-child:after,.ant-btn-background-ghost.ant-btn-dangerous.ant-btn-link[disabled]:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-two-chinese-chars:first-letter{letter-spacing:.34em}.ant-btn-two-chinese-chars>*:not(.anticon){margin-right:-.34em;letter-spacing:.34em}.ant-btn.ant-btn-block{width:100%}.ant-btn:empty{display:inline-block;width:0;visibility:hidden;content:" "}a.ant-btn{padding-top:.01px!important;line-height:30px}a.ant-btn-lg{line-height:40px}a.ant-btn-sm{line-height:22px}.ant-btn-rtl{direction:rtl}.ant-btn-group-rtl.ant-btn-group .ant-btn-primary:last-child:not(:first-child),.ant-btn-group-rtl.ant-btn-group .ant-btn-primary+.ant-btn-primary{border-right-color:#998165;border-left-color:#d9d9d9}.ant-btn-group-rtl.ant-btn-group .ant-btn-primary:last-child:not(:first-child)[disabled],.ant-btn-group-rtl.ant-btn-group .ant-btn-primary+.ant-btn-primary[disabled]{border-right-color:#d9d9d9;border-left-color:#998165}.ant-btn-rtl.ant-btn>.ant-btn-loading-icon .anticon{padding-right:0;padding-left:8px}.ant-btn>.ant-btn-loading-icon:only-child .anticon{padding-right:0;padding-left:0}.ant-btn-rtl.ant-btn>.anticon+span,.ant-btn-rtl.ant-btn>span+.anticon{margin-right:8px;margin-left:0}.ant-picker-calendar{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";background:#fff}.ant-picker-calendar-header{display:flex;justify-content:flex-end;padding:12px 0}.ant-picker-calendar-header .ant-picker-calendar-year-select{min-width:80px}.ant-picker-calendar-header .ant-picker-calendar-month-select{min-width:70px;margin-left:8px}.ant-picker-calendar-header .ant-picker-calendar-mode-switch{margin-left:8px}.ant-picker-calendar .ant-picker-panel{background:#fff;border:0;border-top:1px solid #f0f0f0;border-radius:0}.ant-picker-calendar .ant-picker-panel .ant-picker-month-panel,.ant-picker-calendar .ant-picker-panel .ant-picker-date-panel{width:auto}.ant-picker-calendar .ant-picker-panel .ant-picker-body{padding:8px 0}.ant-picker-calendar .ant-picker-panel .ant-picker-content{width:100%}.ant-picker-calendar-mini{border-radius:5px}.ant-picker-calendar-mini .ant-picker-calendar-header{padding-right:8px;padding-left:8px}.ant-picker-calendar-mini .ant-picker-panel{border-radius:0 0 5px 5px}.ant-picker-calendar-mini .ant-picker-content{height:256px}.ant-picker-calendar-mini .ant-picker-content th{height:auto;padding:0;line-height:18px}.ant-picker-calendar-full .ant-picker-panel{display:block;width:100%;text-align:right;background:#fff;border:0}.ant-picker-calendar-full .ant-picker-panel .ant-picker-body th,.ant-picker-calendar-full .ant-picker-panel .ant-picker-body td{padding:0}.ant-picker-calendar-full .ant-picker-panel .ant-picker-body th{height:auto;padding:0 12px 5px 0;line-height:18px}.ant-picker-calendar-full .ant-picker-panel .ant-picker-cell:before{display:none}.ant-picker-calendar-full .ant-picker-panel .ant-picker-cell:hover .ant-picker-calendar-date{background:#f5f5f5}.ant-picker-calendar-full .ant-picker-panel .ant-picker-cell .ant-picker-calendar-date-today:before{display:none}.ant-picker-calendar-full .ant-picker-panel .ant-picker-cell-selected .ant-picker-calendar-date,.ant-picker-calendar-full .ant-picker-panel .ant-picker-cell-selected:hover .ant-picker-calendar-date,.ant-picker-calendar-full .ant-picker-panel .ant-picker-cell-selected .ant-picker-calendar-date-today,.ant-picker-calendar-full .ant-picker-panel .ant-picker-cell-selected:hover .ant-picker-calendar-date-today{background:#ccc8c0}.ant-picker-calendar-full .ant-picker-panel .ant-picker-cell-selected .ant-picker-calendar-date .ant-picker-calendar-date-value,.ant-picker-calendar-full .ant-picker-panel .ant-picker-cell-selected:hover .ant-picker-calendar-date .ant-picker-calendar-date-value,.ant-picker-calendar-full .ant-picker-panel .ant-picker-cell-selected .ant-picker-calendar-date-today .ant-picker-calendar-date-value,.ant-picker-calendar-full .ant-picker-panel .ant-picker-cell-selected:hover .ant-picker-calendar-date-today .ant-picker-calendar-date-value{color:#8d6a46}.ant-picker-calendar-full .ant-picker-panel .ant-picker-calendar-date{display:block;width:auto;height:auto;margin:0 4px;padding:4px 8px 0;border:0;border-top:2px solid #f0f0f0;border-radius:0;transition:background .3s}.ant-picker-calendar-full .ant-picker-panel .ant-picker-calendar-date-value{line-height:24px;transition:color .3s}.ant-picker-calendar-full .ant-picker-panel .ant-picker-calendar-date-content{position:static;width:auto;height:86px;overflow-y:auto;color:#000000d9;line-height:1.5715;text-align:left}.ant-picker-calendar-full .ant-picker-panel .ant-picker-calendar-date-today{border-color:#8d6a46}.ant-picker-calendar-full .ant-picker-panel .ant-picker-calendar-date-today .ant-picker-calendar-date-value{color:#000000d9}@media only screen and (max-width: 480px){.ant-picker-calendar-header{display:block}.ant-picker-calendar-header .ant-picker-calendar-year-select{width:50%}.ant-picker-calendar-header .ant-picker-calendar-month-select{width:calc(50% - 8px)}.ant-picker-calendar-header .ant-picker-calendar-mode-switch{width:100%;margin-top:8px;margin-left:0}.ant-picker-calendar-header .ant-picker-calendar-mode-switch>label{width:50%;text-align:center}}.ant-picker-calendar-rtl{direction:rtl}.ant-picker-calendar-rtl .ant-picker-calendar-header .ant-picker-calendar-month-select,.ant-picker-calendar-rtl .ant-picker-calendar-header .ant-picker-calendar-mode-switch{margin-right:8px;margin-left:0}.ant-picker-calendar-rtl.ant-picker-calendar-full .ant-picker-panel{text-align:left}.ant-picker-calendar-rtl.ant-picker-calendar-full .ant-picker-panel .ant-picker-body th{padding:0 0 5px 12px}.ant-picker-calendar-rtl.ant-picker-calendar-full .ant-picker-panel .ant-picker-calendar-date-content{text-align:right}.ant-card{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:relative;background:#fff;border-radius:5px}.ant-card-rtl{direction:rtl}.ant-card-hoverable{cursor:pointer;transition:box-shadow .3s,border-color .3s}.ant-card-hoverable:hover{border-color:transparent;box-shadow:0 1px 2px -2px #00000029,0 3px 6px #0000001f,0 5px 12px 4px #00000017}.ant-card-bordered{border:1px solid #f0f0f0}.ant-card-head{min-height:48px;margin-bottom:-1px;padding:0 24px;color:#1c2d56;font-weight:500;font-size:16px;background:transparent;border-bottom:1px solid #f0f0f0;border-radius:5px 5px 0 0}.ant-card-head:before{display:table;content:""}.ant-card-head:after{display:table;clear:both;content:""}.ant-card-head-wrapper{display:flex;align-items:center}.ant-card-head-title{display:inline-block;flex:1;padding:16px 0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ant-card-head-title>.ant-typography,.ant-card-head-title>.ant-typography-edit-content{left:0;margin-top:0;margin-bottom:0}.ant-card-head .ant-tabs-top{clear:both;margin-bottom:-17px;color:#000000d9;font-weight:400;font-size:14px}.ant-card-head .ant-tabs-top-bar{border-bottom:1px solid #f0f0f0}.ant-card-extra{float:right;margin-left:auto;padding:16px 0;color:#000000d9;font-weight:400;font-size:14px}.ant-card-rtl .ant-card-extra{margin-right:auto;margin-left:0}.ant-card-body{padding:24px}.ant-card-body:before{display:table;content:""}.ant-card-body:after{display:table;clear:both;content:""}.ant-card-contain-grid:not(.ant-card-loading) .ant-card-body{margin:-1px 0 0 -1px;padding:0}.ant-card-grid{float:left;width:33.33%;padding:24px;border:0;border-radius:0;box-shadow:1px 0 #f0f0f0,0 1px #f0f0f0,1px 1px #f0f0f0,1px 0 #f0f0f0 inset,0 1px #f0f0f0 inset;transition:all .3s}.ant-card-rtl .ant-card-grid{float:right}.ant-card-grid-hoverable:hover{position:relative;z-index:1;box-shadow:0 1px 2px -2px #00000029,0 3px 6px #0000001f,0 5px 12px 4px #00000017}.ant-card-contain-tabs>.ant-card-head .ant-card-head-title{min-height:32px;padding-bottom:0}.ant-card-contain-tabs>.ant-card-head .ant-card-extra{padding-bottom:0}.ant-card-bordered .ant-card-cover{margin-top:-1px;margin-right:-1px;margin-left:-1px}.ant-card-cover>*{display:block;width:100%}.ant-card-cover img{border-radius:5px 5px 0 0}.ant-card-actions{margin:0;padding:0;list-style:none;background:#fff;border-top:1px solid #f0f0f0}.ant-card-actions:before{display:table;content:""}.ant-card-actions:after{display:table;clear:both;content:""}.ant-card-actions>li{float:left;margin:12px 0;color:#00000073;text-align:center}.ant-card-rtl .ant-card-actions>li{float:right}.ant-card-actions>li>span{position:relative;display:block;min-width:32px;font-size:14px;line-height:1.5715;cursor:pointer}.ant-card-actions>li>span:hover{color:#8d6a46;transition:color .3s}.ant-card-actions>li>span a:not(.ant-btn),.ant-card-actions>li>span>.anticon{display:inline-block;width:100%;color:#00000073;line-height:22px;transition:color .3s}.ant-card-actions>li>span a:not(.ant-btn):hover,.ant-card-actions>li>span>.anticon:hover{color:#8d6a46}.ant-card-actions>li>span>.anticon{font-size:16px;line-height:22px}.ant-card-actions>li:not(:last-child){border-right:1px solid #f0f0f0}.ant-card-rtl .ant-card-actions>li:not(:last-child){border-right:none;border-left:1px solid #f0f0f0}.ant-card-type-inner .ant-card-head{padding:0 24px;background:#fafafa}.ant-card-type-inner .ant-card-head-title{padding:12px 0;font-size:14px}.ant-card-type-inner .ant-card-body{padding:16px 24px}.ant-card-type-inner .ant-card-extra{padding:13.5px 0}.ant-card-meta{margin:-4px 0}.ant-card-meta:before{display:table;content:""}.ant-card-meta:after{display:table;clear:both;content:""}.ant-card-meta-avatar{float:left;padding-right:16px}.ant-card-rtl .ant-card-meta-avatar{float:right;padding-right:0;padding-left:16px}.ant-card-meta-detail{overflow:hidden}.ant-card-meta-detail>div:not(:last-child){margin-bottom:8px}.ant-card-meta-title{overflow:hidden;color:#1c2d56;font-weight:500;font-size:16px;white-space:nowrap;text-overflow:ellipsis}.ant-card-meta-description{color:#00000073}.ant-card-loading{overflow:hidden}.ant-card-loading .ant-card-body{-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-card-loading-content p{margin:0}.ant-card-loading-block{height:14px;margin:4px 0;background:linear-gradient(90deg,#cfd8dc33,#cfd8dc66,#cfd8dc33);background-size:600% 600%;border-radius:5px;animation:card-loading 1.4s ease infinite}@keyframes card-loading{0%,to{background-position:0 50%}50%{background-position:100% 50%}}.ant-card-small>.ant-card-head{min-height:36px;padding:0 12px;font-size:14px}.ant-card-small>.ant-card-head>.ant-card-head-wrapper>.ant-card-head-title{padding:8px 0}.ant-card-small>.ant-card-head>.ant-card-head-wrapper>.ant-card-extra{padding:8px 0;font-size:14px}.ant-card-small>.ant-card-body{padding:12px}.ant-carousel{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum"}.ant-carousel .slick-slider{position:relative;display:block;box-sizing:border-box;touch-action:pan-y;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}.ant-carousel .slick-list{position:relative;display:block;margin:0;padding:0;overflow:hidden}.ant-carousel .slick-list:focus{outline:none}.ant-carousel .slick-list.dragging{cursor:pointer}.ant-carousel .slick-list .slick-slide{pointer-events:none}.ant-carousel .slick-list .slick-slide input.ant-radio-input,.ant-carousel .slick-list .slick-slide input.ant-checkbox-input{visibility:hidden}.ant-carousel .slick-list .slick-slide.slick-active{pointer-events:auto}.ant-carousel .slick-list .slick-slide.slick-active input.ant-radio-input,.ant-carousel .slick-list .slick-slide.slick-active input.ant-checkbox-input{visibility:visible}.ant-carousel .slick-list .slick-slide>div>div{vertical-align:bottom}.ant-carousel .slick-slider .slick-track,.ant-carousel .slick-slider .slick-list{transform:translateZ(0);touch-action:pan-y}.ant-carousel .slick-track{position:relative;top:0;left:0;display:block}.ant-carousel .slick-track:before,.ant-carousel .slick-track:after{display:table;content:""}.ant-carousel .slick-track:after{clear:both}.slick-loading .ant-carousel .slick-track{visibility:hidden}.ant-carousel .slick-slide{display:none;float:left;height:100%;min-height:1px}.ant-carousel .slick-slide img{display:block}.ant-carousel .slick-slide.slick-loading img{display:none}.ant-carousel .slick-slide.dragging img{pointer-events:none}.ant-carousel .slick-initialized .slick-slide{display:block}.ant-carousel .slick-loading .slick-slide{visibility:hidden}.ant-carousel .slick-vertical .slick-slide{display:block;height:auto}.ant-carousel .slick-arrow.slick-hidden{display:none}.ant-carousel .slick-prev,.ant-carousel .slick-next{position:absolute;top:50%;display:block;width:20px;height:20px;margin-top:-10px;padding:0;color:transparent;font-size:0;line-height:0;background:transparent;border:0;outline:none;cursor:pointer}.ant-carousel .slick-prev:hover,.ant-carousel .slick-next:hover,.ant-carousel .slick-prev:focus,.ant-carousel .slick-next:focus{color:transparent;background:transparent;outline:none}.ant-carousel .slick-prev:hover:before,.ant-carousel .slick-next:hover:before,.ant-carousel .slick-prev:focus:before,.ant-carousel .slick-next:focus:before{opacity:1}.ant-carousel .slick-prev.slick-disabled:before,.ant-carousel .slick-next.slick-disabled:before{opacity:.25}.ant-carousel .slick-prev{left:-25px}.ant-carousel .slick-prev:before{content:"←"}.ant-carousel .slick-next{right:-25px}.ant-carousel .slick-next:before{content:"→"}.ant-carousel .slick-dots{position:absolute;right:0;bottom:0;left:0;z-index:15;display:flex!important;justify-content:center;margin-right:15%;margin-left:15%;padding-left:0;list-style:none}.ant-carousel .slick-dots-bottom{bottom:12px}.ant-carousel .slick-dots-top{top:12px;bottom:auto}.ant-carousel .slick-dots li{position:relative;display:inline-block;flex:0 1 auto;box-sizing:content-box;width:16px;height:3px;margin:0 3px;padding:0;text-align:center;text-indent:-999px;vertical-align:top;transition:all .5s}.ant-carousel .slick-dots li button{display:block;width:100%;height:3px;padding:0;color:transparent;font-size:0;background:#fff;border:0;border-radius:1px;outline:none;cursor:pointer;opacity:.3;transition:all .5s}.ant-carousel .slick-dots li button:hover,.ant-carousel .slick-dots li button:focus{opacity:.75}.ant-carousel .slick-dots li.slick-active{width:24px}.ant-carousel .slick-dots li.slick-active button{background:#fff;opacity:1}.ant-carousel .slick-dots li.slick-active:hover,.ant-carousel .slick-dots li.slick-active:focus{opacity:1}.ant-carousel-vertical .slick-dots{top:50%;bottom:auto;flex-direction:column;width:3px;height:auto;margin:0;transform:translateY(-50%)}.ant-carousel-vertical .slick-dots-left{right:auto;left:12px}.ant-carousel-vertical .slick-dots-right{right:12px;left:auto}.ant-carousel-vertical .slick-dots li{width:3px;height:16px;margin:4px 2px;vertical-align:baseline}.ant-carousel-vertical .slick-dots li button{width:3px;height:16px}.ant-carousel-vertical .slick-dots li.slick-active,.ant-carousel-vertical .slick-dots li.slick-active button{width:3px;height:24px}.ant-carousel-rtl{direction:rtl}.ant-carousel-rtl .ant-carousel .slick-track{right:0;left:auto}.ant-carousel-rtl .ant-carousel .slick-prev{right:-25px;left:auto}.ant-carousel-rtl .ant-carousel .slick-prev:before{content:"→"}.ant-carousel-rtl .ant-carousel .slick-next{right:auto;left:-25px}.ant-carousel-rtl .ant-carousel .slick-next:before{content:"←"}.ant-carousel-rtl.ant-carousel .slick-dots{flex-direction:row-reverse}.ant-carousel-rtl.ant-carousel-vertical .slick-dots{flex-direction:column}@keyframes antCheckboxEffect{0%{transform:scale(1);opacity:.5}to{transform:scale(1.6);opacity:0}}.ant-cascader-checkbox{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;list-style:none;font-feature-settings:"tnum";position:relative;top:.2em;line-height:1;white-space:nowrap;outline:none;cursor:pointer}.ant-cascader-checkbox-wrapper:hover .ant-cascader-checkbox-inner,.ant-cascader-checkbox:hover .ant-cascader-checkbox-inner,.ant-cascader-checkbox-input:focus+.ant-cascader-checkbox-inner{border-color:#8d6a46}.ant-cascader-checkbox-checked:after{position:absolute;top:0;left:0;width:100%;height:100%;border:1px solid #8D6A46;border-radius:5px;visibility:hidden;animation:antCheckboxEffect .36s ease-in-out;animation-fill-mode:backwards;content:""}.ant-cascader-checkbox:hover:after,.ant-cascader-checkbox-wrapper:hover .ant-cascader-checkbox:after{visibility:visible}.ant-cascader-checkbox-inner{position:relative;top:0;left:0;display:block;width:20px;height:20px;direction:ltr;background-color:#fff;border:1px solid #d9d9d9;border-radius:3px;border-collapse:separate;transition:all .3s}.ant-cascader-checkbox-inner:after{position:absolute;top:50%;left:21.5%;display:table;width:7.14285714px;height:11.42857143px;border:2px solid #fff;border-top:0;border-left:0;transform:rotate(45deg) scale(0) translate(-50%,-50%);opacity:0;transition:all .1s cubic-bezier(.71,-.46,.88,.6),opacity .1s;content:" "}.ant-cascader-checkbox-input{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;width:100%;height:100%;cursor:pointer;opacity:0}.ant-cascader-checkbox-checked .ant-cascader-checkbox-inner:after{position:absolute;display:table;border:2px solid #fff;border-top:0;border-left:0;transform:rotate(45deg) scale(1) translate(-50%,-50%);opacity:1;transition:all .2s cubic-bezier(.12,.4,.29,1.46) .1s;content:" "}.ant-cascader-checkbox-checked .ant-cascader-checkbox-inner{background-color:#8d6a46;border-color:#8d6a46}.ant-cascader-checkbox-disabled{cursor:not-allowed}.ant-cascader-checkbox-disabled.ant-cascader-checkbox-checked .ant-cascader-checkbox-inner:after{border-color:#00000040;animation-name:none}.ant-cascader-checkbox-disabled .ant-cascader-checkbox-input{cursor:not-allowed;pointer-events:none}.ant-cascader-checkbox-disabled .ant-cascader-checkbox-inner{background-color:#f5f5f5;border-color:#d9d9d9!important}.ant-cascader-checkbox-disabled .ant-cascader-checkbox-inner:after{border-color:#f5f5f5;border-collapse:separate;animation-name:none}.ant-cascader-checkbox-disabled+span{color:#00000040;cursor:not-allowed}.ant-cascader-checkbox-disabled:hover:after,.ant-cascader-checkbox-wrapper:hover .ant-cascader-checkbox-disabled:after{visibility:hidden}.ant-cascader-checkbox-wrapper{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";display:inline-flex;align-items:baseline;line-height:unset;cursor:pointer}.ant-cascader-checkbox-wrapper:after{display:inline-block;width:0;overflow:hidden;content:" "}.ant-cascader-checkbox-wrapper.ant-cascader-checkbox-wrapper-disabled{cursor:not-allowed}.ant-cascader-checkbox-wrapper+.ant-cascader-checkbox-wrapper{margin-left:8px}.ant-cascader-checkbox+span{padding-right:8px;padding-left:8px}.ant-cascader-checkbox-group{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";display:inline-block}.ant-cascader-checkbox-group-item{margin-right:8px}.ant-cascader-checkbox-group-item:last-child{margin-right:0}.ant-cascader-checkbox-group-item+.ant-cascader-checkbox-group-item{margin-left:0}.ant-cascader-checkbox-indeterminate .ant-cascader-checkbox-inner{background-color:#fff;border-color:#d9d9d9}.ant-cascader-checkbox-indeterminate .ant-cascader-checkbox-inner:after{top:50%;left:50%;width:12px;height:12px;background-color:#8d6a46;border:0;transform:translate(-50%,-50%) scale(1);opacity:1;content:" "}.ant-cascader-checkbox-indeterminate.ant-cascader-checkbox-disabled .ant-cascader-checkbox-inner:after{background-color:#00000040;border-color:#00000040}.ant-cascader-checkbox-rtl{direction:rtl}.ant-cascader-checkbox-group-rtl .ant-cascader-checkbox-group-item{margin-right:0;margin-left:8px}.ant-cascader-checkbox-group-rtl .ant-cascader-checkbox-group-item:last-child{margin-left:0!important}.ant-cascader-checkbox-group-rtl .ant-cascader-checkbox-group-item+.ant-cascader-checkbox-group-item{margin-left:8px}.ant-cascader{width:184px}.ant-cascader-checkbox{top:0;margin-right:8px}.ant-cascader-menus{display:flex;flex-wrap:nowrap;align-items:flex-start}.ant-cascader-menus.ant-cascader-menu-empty .ant-cascader-menu{width:100%;height:auto}.ant-cascader-menu{min-width:111px;height:180px;margin:-4px 0;padding:4px 0;overflow:auto;vertical-align:top;list-style:none;border-right:1px solid #f0f0f0;-ms-overflow-style:-ms-autohiding-scrollbar}.ant-cascader-menu-item{display:flex;flex-wrap:nowrap;align-items:center;padding:5px 12px;overflow:hidden;line-height:22px;white-space:nowrap;text-overflow:ellipsis;cursor:pointer;transition:all .3s}.ant-cascader-menu-item:hover{background:#f5f5f5}.ant-cascader-menu-item-disabled{color:#00000040;cursor:not-allowed}.ant-cascader-menu-item-disabled:hover{background:transparent}.ant-cascader-menu-empty .ant-cascader-menu-item{color:#00000040;cursor:default;pointer-events:none}.ant-cascader-menu-item-active:not(.ant-cascader-menu-item-disabled),.ant-cascader-menu-item-active:not(.ant-cascader-menu-item-disabled):hover{font-weight:600;background-color:#ccc8c0}.ant-cascader-menu-item-content{flex:auto}.ant-cascader-menu-item-expand .ant-cascader-menu-item-expand-icon,.ant-cascader-menu-item-loading-icon{margin-left:4px;color:#00000073;font-size:10px}.ant-cascader-menu-item-disabled.ant-cascader-menu-item-expand .ant-cascader-menu-item-expand-icon,.ant-cascader-menu-item-disabled.ant-cascader-menu-item-loading-icon{color:#00000040}.ant-cascader-menu-item-keyword{color:#ff4d4f}.ant-cascader-rtl .ant-cascader-menu-item-expand-icon,.ant-cascader-rtl .ant-cascader-menu-item-loading-icon{margin-right:4px;margin-left:0}.ant-cascader-rtl .ant-cascader-checkbox{top:0;margin-right:0;margin-left:8px}.ant-checkbox{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;list-style:none;font-feature-settings:"tnum";position:relative;top:.2em;line-height:1;white-space:nowrap;outline:none;cursor:pointer}.ant-checkbox-wrapper:hover .ant-checkbox-inner,.ant-checkbox:hover .ant-checkbox-inner,.ant-checkbox-input:focus+.ant-checkbox-inner{border-color:#8d6a46}.ant-checkbox-checked:after{position:absolute;top:0;left:0;width:100%;height:100%;border:1px solid #8D6A46;border-radius:5px;visibility:hidden;animation:antCheckboxEffect .36s ease-in-out;animation-fill-mode:backwards;content:""}.ant-checkbox:hover:after,.ant-checkbox-wrapper:hover .ant-checkbox:after{visibility:visible}.ant-checkbox-inner{position:relative;top:0;left:0;display:block;width:20px;height:20px;direction:ltr;background-color:#fff;border:1px solid #d9d9d9;border-radius:3px;border-collapse:separate;transition:all .3s}.ant-checkbox-inner:after{position:absolute;top:50%;left:21.5%;display:table;width:7.14285714px;height:11.42857143px;border:2px solid #fff;border-top:0;border-left:0;transform:rotate(45deg) scale(0) translate(-50%,-50%);opacity:0;transition:all .1s cubic-bezier(.71,-.46,.88,.6),opacity .1s;content:" "}.ant-checkbox-input{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;width:100%;height:100%;cursor:pointer;opacity:0}.ant-checkbox-checked .ant-checkbox-inner:after{position:absolute;display:table;border:2px solid #fff;border-top:0;border-left:0;transform:rotate(45deg) scale(1) translate(-50%,-50%);opacity:1;transition:all .2s cubic-bezier(.12,.4,.29,1.46) .1s;content:" "}.ant-checkbox-checked .ant-checkbox-inner{background-color:#8d6a46;border-color:#8d6a46}.ant-checkbox-disabled{cursor:not-allowed}.ant-checkbox-disabled.ant-checkbox-checked .ant-checkbox-inner:after{border-color:#00000040;animation-name:none}.ant-checkbox-disabled .ant-checkbox-input{cursor:not-allowed;pointer-events:none}.ant-checkbox-disabled .ant-checkbox-inner{background-color:#f5f5f5;border-color:#d9d9d9!important}.ant-checkbox-disabled .ant-checkbox-inner:after{border-color:#f5f5f5;border-collapse:separate;animation-name:none}.ant-checkbox-disabled+span{color:#00000040;cursor:not-allowed}.ant-checkbox-disabled:hover:after,.ant-checkbox-wrapper:hover .ant-checkbox-disabled:after{visibility:hidden}.ant-checkbox-wrapper{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";display:inline-flex;align-items:baseline;line-height:unset;cursor:pointer}.ant-checkbox-wrapper:after{display:inline-block;width:0;overflow:hidden;content:" "}.ant-checkbox-wrapper.ant-checkbox-wrapper-disabled{cursor:not-allowed}.ant-checkbox-wrapper+.ant-checkbox-wrapper{margin-left:8px}.ant-checkbox+span{padding-right:8px;padding-left:8px}.ant-checkbox-group{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";display:inline-block}.ant-checkbox-group-item{margin-right:8px}.ant-checkbox-group-item:last-child{margin-right:0}.ant-checkbox-group-item+.ant-checkbox-group-item{margin-left:0}.ant-checkbox-indeterminate .ant-checkbox-inner{background-color:#fff;border-color:#d9d9d9}.ant-checkbox-indeterminate .ant-checkbox-inner:after{top:50%;left:50%;width:12px;height:12px;background-color:#8d6a46;border:0;transform:translate(-50%,-50%) scale(1);opacity:1;content:" "}.ant-checkbox-indeterminate.ant-checkbox-disabled .ant-checkbox-inner:after{background-color:#00000040;border-color:#00000040}.ant-checkbox-rtl{direction:rtl}.ant-checkbox-group-rtl .ant-checkbox-group-item{margin-right:0;margin-left:8px}.ant-checkbox-group-rtl .ant-checkbox-group-item:last-child{margin-left:0!important}.ant-checkbox-group-rtl .ant-checkbox-group-item+.ant-checkbox-group-item{margin-left:8px}.ant-collapse{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";background-color:#fafafa;border:1px solid #d9d9d9;border-bottom:0;border-radius:5px}.ant-collapse>.ant-collapse-item{border-bottom:1px solid #d9d9d9}.ant-collapse>.ant-collapse-item:last-child,.ant-collapse>.ant-collapse-item:last-child>.ant-collapse-header{border-radius:0 0 5px 5px}.ant-collapse>.ant-collapse-item>.ant-collapse-header{position:relative;display:flex;flex-wrap:nowrap;align-items:flex-start;padding:12px 16px;color:#1c2d56;line-height:1.5715;cursor:pointer;transition:all .3s,visibility 0s}.ant-collapse>.ant-collapse-item>.ant-collapse-header .ant-collapse-arrow{display:inline-block;margin-right:12px;font-size:12px;vertical-align:-1px}.ant-collapse>.ant-collapse-item>.ant-collapse-header .ant-collapse-arrow svg{transition:transform .24s}.ant-collapse>.ant-collapse-item>.ant-collapse-header .ant-collapse-extra{margin-left:auto}.ant-collapse>.ant-collapse-item>.ant-collapse-header:focus{outline:none}.ant-collapse>.ant-collapse-item .ant-collapse-header-collapsible-only{cursor:default}.ant-collapse>.ant-collapse-item .ant-collapse-header-collapsible-only .ant-collapse-header-text{cursor:pointer}.ant-collapse>.ant-collapse-item.ant-collapse-no-arrow>.ant-collapse-header{padding-left:12px}.ant-collapse-icon-position-right>.ant-collapse-item>.ant-collapse-header{position:relative;padding:12px 40px 12px 16px}.ant-collapse-icon-position-right>.ant-collapse-item>.ant-collapse-header .ant-collapse-arrow{position:absolute;top:50%;right:16px;left:auto;margin:0;transform:translateY(-50%)}.ant-collapse-content{color:#000000d9;background-color:#fff;border-top:1px solid #d9d9d9}.ant-collapse-content>.ant-collapse-content-box{padding:16px}.ant-collapse-content-hidden{display:none}.ant-collapse-item:last-child>.ant-collapse-content{border-radius:0 0 5px 5px}.ant-collapse-borderless{background-color:#fafafa;border:0}.ant-collapse-borderless>.ant-collapse-item{border-bottom:1px solid #d9d9d9}.ant-collapse-borderless>.ant-collapse-item:last-child,.ant-collapse-borderless>.ant-collapse-item:last-child .ant-collapse-header{border-radius:0}.ant-collapse-borderless>.ant-collapse-item>.ant-collapse-content{background-color:transparent;border-top:0}.ant-collapse-borderless>.ant-collapse-item>.ant-collapse-content>.ant-collapse-content-box{padding-top:4px}.ant-collapse-ghost{background-color:transparent;border:0}.ant-collapse-ghost>.ant-collapse-item{border-bottom:0}.ant-collapse-ghost>.ant-collapse-item>.ant-collapse-content{background-color:transparent;border-top:0}.ant-collapse-ghost>.ant-collapse-item>.ant-collapse-content>.ant-collapse-content-box{padding-top:12px;padding-bottom:12px}.ant-collapse .ant-collapse-item-disabled>.ant-collapse-header,.ant-collapse .ant-collapse-item-disabled>.ant-collapse-header>.arrow{color:#00000040;cursor:not-allowed}.ant-collapse-rtl{direction:rtl}.ant-collapse-rtl .ant-collapse>.ant-collapse-item>.ant-collapse-header{padding:12px 40px 12px 16px}.ant-collapse-rtl.ant-collapse>.ant-collapse-item>.ant-collapse-header .ant-collapse-arrow{margin-right:0;margin-left:12px}.ant-collapse-rtl.ant-collapse>.ant-collapse-item>.ant-collapse-header .ant-collapse-arrow svg{transform:rotate(180deg)}.ant-collapse-rtl.ant-collapse>.ant-collapse-item>.ant-collapse-header .ant-collapse-extra{margin-right:auto;margin-left:0}.ant-collapse-rtl.ant-collapse>.ant-collapse-item.ant-collapse-no-arrow>.ant-collapse-header{padding-right:12px;padding-left:0}.ant-comment{position:relative;background-color:inherit}.ant-comment-inner{display:flex;padding:16px 0}.ant-comment-avatar{position:relative;flex-shrink:0;margin-right:12px;cursor:pointer}.ant-comment-avatar img{width:32px;height:32px;border-radius:50%}.ant-comment-content{position:relative;flex:1 1 auto;min-width:1px;font-size:14px;word-wrap:break-word}.ant-comment-content-author{display:flex;flex-wrap:wrap;justify-content:flex-start;margin-bottom:4px;font-size:14px}.ant-comment-content-author>a,.ant-comment-content-author>span{padding-right:8px;font-size:12px;line-height:18px}.ant-comment-content-author-name{color:#00000073;font-size:14px;transition:color .3s}.ant-comment-content-author-name>*{color:#00000073}.ant-comment-content-author-name>*:hover{color:#00000073}.ant-comment-content-author-time{color:#ccc;white-space:nowrap;cursor:auto}.ant-comment-content-detail p{margin-bottom:inherit;white-space:pre-wrap}.ant-comment-actions{margin-top:12px;margin-bottom:inherit;padding-left:0}.ant-comment-actions>li{display:inline-block;color:#00000073}.ant-comment-actions>li>span{margin-right:10px;color:#00000073;font-size:12px;cursor:pointer;transition:color .3s;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-comment-actions>li>span:hover{color:#595959}.ant-comment-nested{margin-left:44px}.ant-comment-rtl{direction:rtl}.ant-comment-rtl .ant-comment-avatar{margin-right:0;margin-left:12px}.ant-comment-rtl .ant-comment-content-author>a,.ant-comment-rtl .ant-comment-content-author>span{padding-right:0;padding-left:8px}.ant-comment-rtl .ant-comment-actions{padding-right:0}.ant-comment-rtl .ant-comment-actions>li>span{margin-right:0;margin-left:10px}.ant-comment-rtl .ant-comment-nested{margin-right:44px;margin-left:0}.ant-picker{box-sizing:border-box;margin:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";padding:4px 10px;position:relative;display:inline-flex;align-items:center;background:#fff;border:1px solid #d9d9d9;border-radius:5px;transition:border .3s,box-shadow .3s}.ant-picker:hover,.ant-picker-focused{border-color:#998165;border-right-width:1px!important}.ant-input-rtl .ant-picker:hover,.ant-input-rtl .ant-picker-focused{border-right-width:0;border-left-width:1px!important}.ant-picker-focused{border-color:#998165;box-shadow:0 0 0 2px #8d6a4633;border-right-width:1px!important;outline:0}.ant-input-rtl .ant-picker-focused{border-right-width:0;border-left-width:1px!important}.ant-picker.ant-picker-disabled{background:#f5f5f5;border-color:#d9d9d9;cursor:not-allowed}.ant-picker.ant-picker-disabled .ant-picker-suffix{color:#00000040}.ant-picker.ant-picker-borderless{background-color:transparent!important;border-color:transparent!important;box-shadow:none!important}.ant-picker-input{position:relative;display:inline-flex;align-items:center;width:100%}.ant-picker-input>input{position:relative;display:inline-block;width:100%;min-width:0;color:#000000d9;font-size:14px;line-height:1.5715;background-color:#fff;background-image:none;border:1px solid #d9d9d9;border-radius:5px;transition:all .3s;flex:auto;min-width:1px;height:auto;padding:0;background:transparent;border:0}.ant-picker-input>input::-moz-placeholder{opacity:1}.ant-picker-input>input::placeholder{color:#bfbfbf;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-picker-input>input:-moz-placeholder{text-overflow:ellipsis}.ant-picker-input>input:placeholder-shown{text-overflow:ellipsis}.ant-picker-input>input:hover{border-color:#998165;border-right-width:1px!important}.ant-input-rtl .ant-picker-input>input:hover{border-right-width:0;border-left-width:1px!important}.ant-picker-input>input:focus,.ant-picker-input>input-focused{border-color:#998165;box-shadow:0 0 0 2px #8d6a4633;border-right-width:1px!important;outline:0}.ant-input-rtl .ant-picker-input>input:focus,.ant-input-rtl .ant-picker-input>input-focused{border-right-width:0;border-left-width:1px!important}.ant-picker-input>input-disabled{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;box-shadow:none;cursor:not-allowed;opacity:1}.ant-picker-input>input-disabled:hover{border-color:#d9d9d9;border-right-width:1px!important}.ant-picker-input>input[disabled]{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;box-shadow:none;cursor:not-allowed;opacity:1}.ant-picker-input>input[disabled]:hover{border-color:#d9d9d9;border-right-width:1px!important}.ant-picker-input>input-borderless,.ant-picker-input>input-borderless:hover,.ant-picker-input>input-borderless:focus,.ant-picker-input>input-borderless-focused,.ant-picker-input>input-borderless-disabled,.ant-picker-input>input-borderless[disabled]{background-color:transparent;border:none;box-shadow:none}textarea.ant-picker-input>input{max-width:100%;height:auto;min-height:32px;line-height:1.5715;vertical-align:bottom;transition:all .3s,height 0s}.ant-picker-input>input-lg{padding:7.5px 11px;font-size:16px}.ant-picker-input>input-sm{padding:0 7px}.ant-picker-input>input-rtl{direction:rtl}.ant-picker-input>input:focus{box-shadow:none}.ant-picker-input>input[disabled]{background:transparent}.ant-picker-input:hover .ant-picker-clear{opacity:1}.ant-picker-input-placeholder>input{color:#bfbfbf}.ant-picker-large{padding:7.5px 11px}.ant-picker-large .ant-picker-input>input{font-size:16px}.ant-picker-small{padding:0 7px}.ant-picker-suffix{align-self:center;margin-left:4px;color:#00000040;line-height:1;pointer-events:none}.ant-picker-suffix>*{vertical-align:top}.ant-picker-clear{position:absolute;top:50%;right:0;color:#00000040;line-height:1;background:#fff;transform:translateY(-50%);cursor:pointer;opacity:0;transition:opacity .3s,color .3s}.ant-picker-clear>*{vertical-align:top}.ant-picker-clear:hover{color:#00000073}.ant-picker-separator{position:relative;display:inline-block;width:1em;height:16px;color:#00000040;font-size:16px;vertical-align:top;cursor:default}.ant-picker-focused .ant-picker-separator{color:#00000073}.ant-picker-disabled .ant-picker-range-separator .ant-picker-separator{cursor:not-allowed}.ant-picker-range{position:relative;display:inline-flex}.ant-picker-range .ant-picker-clear{right:10px}.ant-picker-range:hover .ant-picker-clear{opacity:1}.ant-picker-range .ant-picker-active-bar{bottom:-1px;height:2px;margin-left:10px;background:#8d6a46;opacity:0;transition:all .3s ease-out;pointer-events:none}.ant-picker-range.ant-picker-focused .ant-picker-active-bar{opacity:1}.ant-picker-range-separator{align-items:center;padding:0 8px;line-height:1}.ant-picker-range.ant-picker-small .ant-picker-clear{right:7px}.ant-picker-range.ant-picker-small .ant-picker-active-bar{margin-left:7px}.ant-picker-dropdown{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:absolute;z-index:1050}.ant-picker-dropdown-hidden{display:none}.ant-picker-dropdown-placement-bottomLeft .ant-picker-range-arrow{top:1.66666667px;display:block;transform:rotate(-45deg)}.ant-picker-dropdown-placement-topLeft .ant-picker-range-arrow{bottom:1.66666667px;display:block;transform:rotate(135deg)}.ant-picker-dropdown.ant-slide-up-enter.ant-slide-up-enter-active.ant-picker-dropdown-placement-topLeft,.ant-picker-dropdown.ant-slide-up-enter.ant-slide-up-enter-active.ant-picker-dropdown-placement-topRight,.ant-picker-dropdown.ant-slide-up-appear.ant-slide-up-appear-active.ant-picker-dropdown-placement-topLeft,.ant-picker-dropdown.ant-slide-up-appear.ant-slide-up-appear-active.ant-picker-dropdown-placement-topRight{animation-name:antSlideDownIn}.ant-picker-dropdown.ant-slide-up-enter.ant-slide-up-enter-active.ant-picker-dropdown-placement-bottomLeft,.ant-picker-dropdown.ant-slide-up-enter.ant-slide-up-enter-active.ant-picker-dropdown-placement-bottomRight,.ant-picker-dropdown.ant-slide-up-appear.ant-slide-up-appear-active.ant-picker-dropdown-placement-bottomLeft,.ant-picker-dropdown.ant-slide-up-appear.ant-slide-up-appear-active.ant-picker-dropdown-placement-bottomRight{animation-name:antSlideUpIn}.ant-picker-dropdown.ant-slide-up-leave.ant-slide-up-leave-active.ant-picker-dropdown-placement-topLeft,.ant-picker-dropdown.ant-slide-up-leave.ant-slide-up-leave-active.ant-picker-dropdown-placement-topRight{animation-name:antSlideDownOut}.ant-picker-dropdown.ant-slide-up-leave.ant-slide-up-leave-active.ant-picker-dropdown-placement-bottomLeft,.ant-picker-dropdown.ant-slide-up-leave.ant-slide-up-leave-active.ant-picker-dropdown-placement-bottomRight{animation-name:antSlideUpOut}.ant-picker-dropdown-range{padding:6.66666667px 0}.ant-picker-dropdown-range-hidden{display:none}.ant-picker-dropdown .ant-picker-panel>.ant-picker-time-panel{padding-top:4px}.ant-picker-ranges{margin-bottom:0;padding:4px 12px;overflow:hidden;line-height:34px;text-align:left;list-style:none}.ant-picker-ranges>li{display:inline-block}.ant-picker-ranges .ant-picker-preset>.ant-tag-blue{color:#8d6a46;background:#ccc8c0;border-color:#b3aea8;cursor:pointer}.ant-picker-ranges .ant-picker-ok{float:right;margin-left:8px}.ant-picker-range-wrapper{display:flex}.ant-picker-range-arrow{position:absolute;z-index:1;display:none;width:10px;height:10px;margin-left:15px;box-shadow:2px -2px 6px #0000000f;transition:left .3s ease-out}.ant-picker-range-arrow:after{position:absolute;top:1px;right:1px;width:10px;height:10px;border:5px solid #f0f0f0;border-color:#fff #fff transparent transparent;content:""}.ant-picker-panel-container{overflow:hidden;vertical-align:top;background:#fff;border-radius:5px;box-shadow:0 3px 6px -4px #0000001f,0 6px 16px #00000014,0 9px 28px 8px #0000000d;transition:margin .3s}.ant-picker-panel-container .ant-picker-panels{display:inline-flex;flex-wrap:nowrap;direction:ltr}.ant-picker-panel-container .ant-picker-panel{vertical-align:top;background:transparent;border-width:0 0 1px 0;border-radius:0}.ant-picker-panel-container .ant-picker-panel .ant-picker-content,.ant-picker-panel-container .ant-picker-panel table{text-align:center}.ant-picker-panel-container .ant-picker-panel-focused{border-color:#f0f0f0}.ant-picker-panel{display:inline-flex;flex-direction:column;text-align:center;background:#fff;border:1px solid #f0f0f0;border-radius:5px;outline:none}.ant-picker-panel-focused{border-color:#8d6a46}.ant-picker-decade-panel,.ant-picker-year-panel,.ant-picker-quarter-panel,.ant-picker-month-panel,.ant-picker-week-panel,.ant-picker-date-panel,.ant-picker-time-panel{display:flex;flex-direction:column;width:280px}.ant-picker-header{display:flex;padding:0 8px;color:#1c2d56;border-bottom:1px solid #f0f0f0}.ant-picker-header>*{flex:none}.ant-picker-header button{padding:0;color:#00000040;line-height:40px;background:transparent;border:0;cursor:pointer;transition:color .3s}.ant-picker-header>button{min-width:1.6em;font-size:14px}.ant-picker-header>button:hover{color:#000000d9}.ant-picker-header-view{flex:auto;font-weight:500;line-height:40px}.ant-picker-header-view button{color:inherit;font-weight:inherit}.ant-picker-header-view button:not(:first-child){margin-left:8px}.ant-picker-header-view button:hover{color:#8d6a46}.ant-picker-prev-icon,.ant-picker-next-icon,.ant-picker-super-prev-icon,.ant-picker-super-next-icon{position:relative;display:inline-block;width:7px;height:7px}.ant-picker-prev-icon:before,.ant-picker-next-icon:before,.ant-picker-super-prev-icon:before,.ant-picker-super-next-icon:before{position:absolute;top:0;left:0;display:inline-block;width:7px;height:7px;border:0 solid currentcolor;border-width:1.5px 0 0 1.5px;content:""}.ant-picker-super-prev-icon:after,.ant-picker-super-next-icon:after{position:absolute;top:4px;left:4px;display:inline-block;width:7px;height:7px;border:0 solid currentcolor;border-width:1.5px 0 0 1.5px;content:""}.ant-picker-prev-icon,.ant-picker-super-prev-icon{transform:rotate(-45deg)}.ant-picker-next-icon,.ant-picker-super-next-icon{transform:rotate(135deg)}.ant-picker-content{width:100%;table-layout:fixed;border-collapse:collapse}.ant-picker-content th,.ant-picker-content td{position:relative;min-width:24px;font-weight:400}.ant-picker-content th{height:30px;color:#000000d9;line-height:30px}.ant-picker-cell{padding:3px 0;color:#00000040;cursor:pointer}.ant-picker-cell-in-view{color:#000000d9}.ant-picker-cell:before{position:absolute;top:50%;right:0;left:0;z-index:1;height:24px;transform:translateY(-50%);transition:all .3s;content:""}.ant-picker-cell:hover:not(.ant-picker-cell-in-view) .ant-picker-cell-inner,.ant-picker-cell:hover:not(.ant-picker-cell-selected):not(.ant-picker-cell-range-start):not(.ant-picker-cell-range-end):not(.ant-picker-cell-range-hover-start):not(.ant-picker-cell-range-hover-end) .ant-picker-cell-inner{background:#f5f5f5}.ant-picker-cell-in-view.ant-picker-cell-today .ant-picker-cell-inner:before{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;border:1px solid #8D6A46;border-radius:5px;content:""}.ant-picker-cell-in-view.ant-picker-cell-in-range{position:relative}.ant-picker-cell-in-view.ant-picker-cell-in-range:before{background:#ccc8c0}.ant-picker-cell-in-view.ant-picker-cell-selected .ant-picker-cell-inner,.ant-picker-cell-in-view.ant-picker-cell-range-start .ant-picker-cell-inner,.ant-picker-cell-in-view.ant-picker-cell-range-end .ant-picker-cell-inner{color:#fff;background:#8d6a46}.ant-picker-cell-in-view.ant-picker-cell-range-start:not(.ant-picker-cell-range-start-single):before,.ant-picker-cell-in-view.ant-picker-cell-range-end:not(.ant-picker-cell-range-end-single):before{background:#ccc8c0}.ant-picker-cell-in-view.ant-picker-cell-range-start:before{left:50%}.ant-picker-cell-in-view.ant-picker-cell-range-end:before{right:50%}.ant-picker-cell-in-view.ant-picker-cell-range-hover-start:not(.ant-picker-cell-in-range):not(.ant-picker-cell-range-start):not(.ant-picker-cell-range-end):after,.ant-picker-cell-in-view.ant-picker-cell-range-hover-end:not(.ant-picker-cell-in-range):not(.ant-picker-cell-range-start):not(.ant-picker-cell-range-end):after,.ant-picker-cell-in-view.ant-picker-cell-range-hover-start.ant-picker-cell-range-start-single:after,.ant-picker-cell-in-view.ant-picker-cell-range-hover-start.ant-picker-cell-range-start.ant-picker-cell-range-end.ant-picker-cell-range-end-near-hover:after,.ant-picker-cell-in-view.ant-picker-cell-range-hover-end.ant-picker-cell-range-start.ant-picker-cell-range-end.ant-picker-cell-range-start-near-hover:after,.ant-picker-cell-in-view.ant-picker-cell-range-hover-end.ant-picker-cell-range-end-single:after,.ant-picker-cell-in-view.ant-picker-cell-range-hover:not(.ant-picker-cell-in-range):after{position:absolute;top:50%;z-index:0;height:24px;border-top:1px dashed #be9d7b;border-bottom:1px dashed #be9d7b;transform:translateY(-50%);transition:all .3s;content:""}.ant-picker-cell-range-hover-start:after,.ant-picker-cell-range-hover-end:after,.ant-picker-cell-range-hover:after{right:0;left:2px}.ant-picker-cell-in-view.ant-picker-cell-in-range.ant-picker-cell-range-hover:before,.ant-picker-cell-in-view.ant-picker-cell-range-start.ant-picker-cell-range-hover:before,.ant-picker-cell-in-view.ant-picker-cell-range-end.ant-picker-cell-range-hover:before,.ant-picker-cell-in-view.ant-picker-cell-range-start:not(.ant-picker-cell-range-start-single).ant-picker-cell-range-hover-start:before,.ant-picker-cell-in-view.ant-picker-cell-range-end:not(.ant-picker-cell-range-end-single).ant-picker-cell-range-hover-end:before,.ant-picker-panel>:not(.ant-picker-date-panel) .ant-picker-cell-in-view.ant-picker-cell-in-range.ant-picker-cell-range-hover-start:before,.ant-picker-panel>:not(.ant-picker-date-panel) .ant-picker-cell-in-view.ant-picker-cell-in-range.ant-picker-cell-range-hover-end:before{background:#d7c3ae}.ant-picker-cell-in-view.ant-picker-cell-range-start:not(.ant-picker-cell-range-start-single):not(.ant-picker-cell-range-end) .ant-picker-cell-inner{border-radius:5px 0 0 5px}.ant-picker-cell-in-view.ant-picker-cell-range-end:not(.ant-picker-cell-range-end-single):not(.ant-picker-cell-range-start) .ant-picker-cell-inner{border-radius:0 5px 5px 0}.ant-picker-date-panel .ant-picker-cell-in-view.ant-picker-cell-in-range.ant-picker-cell-range-hover-start .ant-picker-cell-inner:after,.ant-picker-date-panel .ant-picker-cell-in-view.ant-picker-cell-in-range.ant-picker-cell-range-hover-end .ant-picker-cell-inner:after{position:absolute;top:0;bottom:0;z-index:-1;background:#d7c3ae;transition:all .3s;content:""}.ant-picker-date-panel .ant-picker-cell-in-view.ant-picker-cell-in-range.ant-picker-cell-range-hover-start .ant-picker-cell-inner:after{right:-6px;left:0}.ant-picker-date-panel .ant-picker-cell-in-view.ant-picker-cell-in-range.ant-picker-cell-range-hover-end .ant-picker-cell-inner:after{right:0;left:-6px}.ant-picker-cell-range-hover.ant-picker-cell-range-start:after{right:50%}.ant-picker-cell-range-hover.ant-picker-cell-range-end:after{left:50%}tr>.ant-picker-cell-in-view.ant-picker-cell-range-hover:first-child:after,tr>.ant-picker-cell-in-view.ant-picker-cell-range-hover-end:first-child:after,.ant-picker-cell-in-view.ant-picker-cell-start.ant-picker-cell-range-hover-edge-start.ant-picker-cell-range-hover-edge-start-near-range:after,.ant-picker-cell-in-view.ant-picker-cell-range-hover-edge-start:not(.ant-picker-cell-range-hover-edge-start-near-range):after,.ant-picker-cell-in-view.ant-picker-cell-range-hover-start:after{left:6px;border-left:1px dashed #be9d7b;border-top-left-radius:5px;border-bottom-left-radius:5px}tr>.ant-picker-cell-in-view.ant-picker-cell-range-hover:last-child:after,tr>.ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child:after,.ant-picker-cell-in-view.ant-picker-cell-end.ant-picker-cell-range-hover-edge-end.ant-picker-cell-range-hover-edge-end-near-range:after,.ant-picker-cell-in-view.ant-picker-cell-range-hover-edge-end:not(.ant-picker-cell-range-hover-edge-end-near-range):after,.ant-picker-cell-in-view.ant-picker-cell-range-hover-end:after{right:6px;border-right:1px dashed #be9d7b;border-top-right-radius:5px;border-bottom-right-radius:5px}.ant-picker-cell-disabled{color:#00000040;pointer-events:none}.ant-picker-cell-disabled .ant-picker-cell-inner{background:transparent}.ant-picker-cell-disabled:before{background:#0000000a}.ant-picker-cell-disabled.ant-picker-cell-today .ant-picker-cell-inner:before{border-color:#00000040}.ant-picker-decade-panel .ant-picker-content,.ant-picker-year-panel .ant-picker-content,.ant-picker-quarter-panel .ant-picker-content,.ant-picker-month-panel .ant-picker-content{height:264px}.ant-picker-decade-panel .ant-picker-cell-inner,.ant-picker-year-panel .ant-picker-cell-inner,.ant-picker-quarter-panel .ant-picker-cell-inner,.ant-picker-month-panel .ant-picker-cell-inner{padding:0 8px}.ant-picker-quarter-panel .ant-picker-content{height:56px}.ant-picker-footer{width:-moz-min-content;width:min-content;min-width:100%;line-height:38px;text-align:center;border-bottom:1px solid transparent}.ant-picker-panel .ant-picker-footer{border-top:1px solid #f0f0f0}.ant-picker-footer-extra{padding:0 12px;line-height:38px;text-align:left}.ant-picker-footer-extra:not(:last-child){border-bottom:1px solid #f0f0f0}.ant-picker-now{text-align:left}.ant-picker-today-btn{color:#1c2d56}.ant-picker-today-btn:hover{color:#314263}.ant-picker-today-btn:active{color:#0e1730}.ant-picker-today-btn.ant-picker-today-btn-disabled{color:#00000040;cursor:not-allowed}.ant-picker-decade-panel .ant-picker-cell-inner{padding:0 4px}.ant-picker-decade-panel .ant-picker-cell:before{display:none}.ant-picker-year-panel .ant-picker-body,.ant-picker-quarter-panel .ant-picker-body,.ant-picker-month-panel .ant-picker-body{padding:0 8px}.ant-picker-year-panel .ant-picker-cell-inner,.ant-picker-quarter-panel .ant-picker-cell-inner,.ant-picker-month-panel .ant-picker-cell-inner{width:60px}.ant-picker-year-panel .ant-picker-cell-range-hover-start:after,.ant-picker-quarter-panel .ant-picker-cell-range-hover-start:after,.ant-picker-month-panel .ant-picker-cell-range-hover-start:after{left:14px;border-left:1px dashed #be9d7b;border-radius:5px 0 0 5px}.ant-picker-panel-rtl .ant-picker-year-panel .ant-picker-cell-range-hover-start:after,.ant-picker-panel-rtl .ant-picker-quarter-panel .ant-picker-cell-range-hover-start:after,.ant-picker-panel-rtl .ant-picker-month-panel .ant-picker-cell-range-hover-start:after{right:14px;border-right:1px dashed #be9d7b;border-radius:0 5px 5px 0}.ant-picker-year-panel .ant-picker-cell-range-hover-end:after,.ant-picker-quarter-panel .ant-picker-cell-range-hover-end:after,.ant-picker-month-panel .ant-picker-cell-range-hover-end:after{right:14px;border-right:1px dashed #be9d7b;border-radius:0 5px 5px 0}.ant-picker-panel-rtl .ant-picker-year-panel .ant-picker-cell-range-hover-end:after,.ant-picker-panel-rtl .ant-picker-quarter-panel .ant-picker-cell-range-hover-end:after,.ant-picker-panel-rtl .ant-picker-month-panel .ant-picker-cell-range-hover-end:after{left:14px;border-left:1px dashed #be9d7b;border-radius:5px 0 0 5px}.ant-picker-week-panel .ant-picker-body{padding:8px 12px}.ant-picker-week-panel .ant-picker-cell:hover .ant-picker-cell-inner,.ant-picker-week-panel .ant-picker-cell-selected .ant-picker-cell-inner,.ant-picker-week-panel .ant-picker-cell .ant-picker-cell-inner{background:transparent!important}.ant-picker-week-panel-row td{transition:background .3s}.ant-picker-week-panel-row:hover td{background:#f5f5f5}.ant-picker-week-panel-row-selected td,.ant-picker-week-panel-row-selected:hover td{background:#8d6a46}.ant-picker-week-panel-row-selected td.ant-picker-cell-week,.ant-picker-week-panel-row-selected:hover td.ant-picker-cell-week{color:#ffffff80}.ant-picker-week-panel-row-selected td.ant-picker-cell-today .ant-picker-cell-inner:before,.ant-picker-week-panel-row-selected:hover td.ant-picker-cell-today .ant-picker-cell-inner:before{border-color:#fff}.ant-picker-week-panel-row-selected td .ant-picker-cell-inner,.ant-picker-week-panel-row-selected:hover td .ant-picker-cell-inner{color:#fff}.ant-picker-date-panel .ant-picker-body{padding:8px 12px}.ant-picker-date-panel .ant-picker-content{width:252px}.ant-picker-date-panel .ant-picker-content th{width:36px}.ant-picker-datetime-panel{display:flex}.ant-picker-datetime-panel .ant-picker-time-panel{border-left:1px solid #f0f0f0}.ant-picker-datetime-panel .ant-picker-date-panel,.ant-picker-datetime-panel .ant-picker-time-panel{transition:opacity .3s}.ant-picker-datetime-panel-active .ant-picker-date-panel,.ant-picker-datetime-panel-active .ant-picker-time-panel{opacity:.3}.ant-picker-datetime-panel-active .ant-picker-date-panel-active,.ant-picker-datetime-panel-active .ant-picker-time-panel-active{opacity:1}.ant-picker-time-panel{width:auto;min-width:auto}.ant-picker-time-panel .ant-picker-content{display:flex;flex:auto;height:224px}.ant-picker-time-panel-column{flex:1 0 auto;width:56px;margin:0;padding:0;overflow-y:hidden;text-align:left;list-style:none;transition:background .3s}.ant-picker-time-panel-column:after{display:block;height:196px;content:""}.ant-picker-datetime-panel .ant-picker-time-panel-column:after{height:198px}.ant-picker-time-panel-column:not(:first-child){border-left:1px solid #f0f0f0}.ant-picker-time-panel-column-active{background:#ccc8c033}.ant-picker-time-panel-column:hover{overflow-y:auto}.ant-picker-time-panel-column>li{margin:0;padding:0}.ant-picker-time-panel-column>li.ant-picker-time-panel-cell .ant-picker-time-panel-cell-inner{display:block;width:100%;height:28px;margin:0;padding:0 0 0 14px;color:#000000d9;line-height:28px;border-radius:0;cursor:pointer;transition:background .3s}.ant-picker-time-panel-column>li.ant-picker-time-panel-cell .ant-picker-time-panel-cell-inner:hover{background:#f5f5f5}.ant-picker-time-panel-column>li.ant-picker-time-panel-cell-selected .ant-picker-time-panel-cell-inner{background:#ccc8c0}.ant-picker-time-panel-column>li.ant-picker-time-panel-cell-disabled .ant-picker-time-panel-cell-inner{color:#00000040;background:transparent;cursor:not-allowed}_:-ms-fullscreen .ant-picker-range-wrapper .ant-picker-month-panel .ant-picker-cell,:root .ant-picker-range-wrapper .ant-picker-month-panel .ant-picker-cell,_:-ms-fullscreen .ant-picker-range-wrapper .ant-picker-year-panel .ant-picker-cell,:root .ant-picker-range-wrapper .ant-picker-year-panel .ant-picker-cell{padding:21px 0}.ant-picker-rtl{direction:rtl}.ant-picker-rtl .ant-picker-suffix{margin-right:4px;margin-left:0}.ant-picker-rtl .ant-picker-clear{right:auto;left:0}.ant-picker-rtl .ant-picker-separator{transform:rotate(180deg)}.ant-picker-panel-rtl .ant-picker-header-view button:not(:first-child){margin-right:8px;margin-left:0}.ant-picker-rtl.ant-picker-range .ant-picker-clear{right:auto;left:10px}.ant-picker-rtl.ant-picker-range .ant-picker-active-bar{margin-right:10px;margin-left:0}.ant-picker-rtl.ant-picker-range.ant-picker-small .ant-picker-active-bar{margin-right:7px}.ant-picker-dropdown-rtl .ant-picker-ranges{text-align:right}.ant-picker-dropdown-rtl .ant-picker-ranges .ant-picker-ok{float:left;margin-right:8px;margin-left:0}.ant-picker-panel-rtl{direction:rtl}.ant-picker-panel-rtl .ant-picker-prev-icon,.ant-picker-panel-rtl .ant-picker-super-prev-icon{transform:rotate(135deg)}.ant-picker-panel-rtl .ant-picker-next-icon,.ant-picker-panel-rtl .ant-picker-super-next-icon{transform:rotate(-45deg)}.ant-picker-cell .ant-picker-cell-inner{position:relative;z-index:2;display:inline-block;min-width:24px;height:24px;line-height:24px;border-radius:5px;transition:background .3s,border .3s}.ant-picker-panel-rtl .ant-picker-cell-in-view.ant-picker-cell-range-start:before{right:50%;left:0}.ant-picker-panel-rtl .ant-picker-cell-in-view.ant-picker-cell-range-end:before{right:0;left:50%}.ant-picker-panel-rtl .ant-picker-cell-in-view.ant-picker-cell-range-start.ant-picker-cell-range-end:before{right:50%;left:50%}.ant-picker-panel-rtl .ant-picker-date-panel .ant-picker-cell-in-view.ant-picker-cell-in-range.ant-picker-cell-range-hover-start .ant-picker-cell-inner:after{right:0;left:-6px}.ant-picker-panel-rtl .ant-picker-date-panel .ant-picker-cell-in-view.ant-picker-cell-in-range.ant-picker-cell-range-hover-end .ant-picker-cell-inner:after{right:-6px;left:0}.ant-picker-panel-rtl .ant-picker-cell-range-hover.ant-picker-cell-range-start:after{right:0;left:50%}.ant-picker-panel-rtl .ant-picker-cell-range-hover.ant-picker-cell-range-end:after{right:50%;left:0}.ant-picker-panel-rtl .ant-picker-cell-in-view.ant-picker-cell-range-start:not(.ant-picker-cell-range-start-single):not(.ant-picker-cell-range-end) .ant-picker-cell-inner{border-radius:0 5px 5px 0}.ant-picker-panel-rtl .ant-picker-cell-in-view.ant-picker-cell-range-end:not(.ant-picker-cell-range-end-single):not(.ant-picker-cell-range-start) .ant-picker-cell-inner{border-radius:5px 0 0 5px}.ant-picker-panel-rtl tr>.ant-picker-cell-in-view.ant-picker-cell-range-hover:not(.ant-picker-cell-selected):first-child:after,.ant-picker-panel-rtl .ant-picker-cell-in-view.ant-picker-cell-start.ant-picker-cell-range-hover-edge-start.ant-picker-cell-range-hover-edge-start-near-range:after,.ant-picker-panel-rtl .ant-picker-cell-in-view.ant-picker-cell-range-hover-edge-start:not(.ant-picker-cell-range-hover-edge-start-near-range):after,.ant-picker-panel-rtl .ant-picker-cell-in-view.ant-picker-cell-range-hover-start:after{right:6px;left:0;border-right:1px dashed #be9d7b;border-left:none;border-radius:0 5px 5px 0}.ant-picker-panel-rtl tr>.ant-picker-cell-in-view.ant-picker-cell-range-hover:not(.ant-picker-cell-selected):last-child:after,.ant-picker-panel-rtl .ant-picker-cell-in-view.ant-picker-cell-end.ant-picker-cell-range-hover-edge-end.ant-picker-cell-range-hover-edge-end-near-range:after,.ant-picker-panel-rtl .ant-picker-cell-in-view.ant-picker-cell-range-hover-edge-end:not(.ant-picker-cell-range-hover-edge-end-near-range):after,.ant-picker-panel-rtl .ant-picker-cell-in-view.ant-picker-cell-range-hover-end:after{right:0;left:6px;border-right:none;border-left:1px dashed #be9d7b;border-radius:5px 0 0 5px}.ant-picker-panel-rtl tr>.ant-picker-cell-in-view.ant-picker-cell-range-hover-start:last-child:after,.ant-picker-panel-rtl tr>.ant-picker-cell-in-view.ant-picker-cell-range-hover-end:first-child:after,.ant-picker-panel-rtl .ant-picker-cell-in-view.ant-picker-cell-start.ant-picker-cell-range-hover-edge-start:not(.ant-picker-cell-range-hover):after,.ant-picker-panel-rtl .ant-picker-cell-in-view.ant-picker-cell-start.ant-picker-cell-range-hover-end.ant-picker-cell-range-hover-edge-start:not(.ant-picker-cell-range-hover):after,.ant-picker-panel-rtl .ant-picker-cell-in-view.ant-picker-cell-end.ant-picker-cell-range-hover-start.ant-picker-cell-range-hover-edge-end:not(.ant-picker-cell-range-hover):after,.ant-picker-panel-rtl tr>.ant-picker-cell-in-view.ant-picker-cell-start.ant-picker-cell-range-hover.ant-picker-cell-range-hover-edge-start:last-child:after,.ant-picker-panel-rtl tr>.ant-picker-cell-in-view.ant-picker-cell-end.ant-picker-cell-range-hover.ant-picker-cell-range-hover-edge-end:first-child:after{right:6px;left:6px;border-right:1px dashed #be9d7b;border-left:1px dashed #be9d7b;border-radius:5px}.ant-picker-dropdown-rtl .ant-picker-footer-extra{direction:rtl;text-align:right}.ant-picker-panel-rtl .ant-picker-time-panel{direction:ltr}.ant-descriptions-header{display:flex;align-items:center;margin-bottom:20px}.ant-descriptions-title{flex:auto;overflow:hidden;color:#1c2d56;font-weight:700;font-size:16px;line-height:1.5715;white-space:nowrap;text-overflow:ellipsis}.ant-descriptions-extra{margin-left:auto;color:#000000d9;font-size:14px}.ant-descriptions-view{width:100%;border-radius:5px}.ant-descriptions-view table{width:100%;table-layout:fixed}.ant-descriptions-row>th,.ant-descriptions-row>td{padding-bottom:16px}.ant-descriptions-row:last-child{border-bottom:none}.ant-descriptions-item-label{color:#1c2d56;font-weight:400;font-size:14px;line-height:1.5715;text-align:start}.ant-descriptions-item-label:after{content:":";position:relative;top:-.5px;margin:0 8px 0 2px}.ant-descriptions-item-label.ant-descriptions-item-no-colon:after{content:" "}.ant-descriptions-item-no-label:after{margin:0;content:""}.ant-descriptions-item-content{display:table-cell;flex:1;color:#000000d9;font-size:14px;line-height:1.5715;word-break:break-word;overflow-wrap:break-word}.ant-descriptions-item{padding-bottom:0;vertical-align:top}.ant-descriptions-item-container{display:flex}.ant-descriptions-item-container .ant-descriptions-item-label,.ant-descriptions-item-container .ant-descriptions-item-content{display:inline-flex;align-items:baseline}.ant-descriptions-middle .ant-descriptions-row>th,.ant-descriptions-middle .ant-descriptions-row>td{padding-bottom:12px}.ant-descriptions-small .ant-descriptions-row>th,.ant-descriptions-small .ant-descriptions-row>td{padding-bottom:8px}.ant-descriptions-bordered .ant-descriptions-view{border:1px solid #f0f0f0}.ant-descriptions-bordered .ant-descriptions-view>table{table-layout:auto;border-collapse:collapse}.ant-descriptions-bordered .ant-descriptions-item-label,.ant-descriptions-bordered .ant-descriptions-item-content{padding:16px 24px;border-right:1px solid #f0f0f0}.ant-descriptions-bordered .ant-descriptions-item-label:last-child,.ant-descriptions-bordered .ant-descriptions-item-content:last-child{border-right:none}.ant-descriptions-bordered .ant-descriptions-item-label{background-color:#fafafa}.ant-descriptions-bordered .ant-descriptions-item-label:after{display:none}.ant-descriptions-bordered .ant-descriptions-row{border-bottom:1px solid #f0f0f0}.ant-descriptions-bordered .ant-descriptions-row:last-child{border-bottom:none}.ant-descriptions-bordered.ant-descriptions-middle .ant-descriptions-item-label,.ant-descriptions-bordered.ant-descriptions-middle .ant-descriptions-item-content{padding:12px 24px}.ant-descriptions-bordered.ant-descriptions-small .ant-descriptions-item-label,.ant-descriptions-bordered.ant-descriptions-small .ant-descriptions-item-content{padding:8px 16px}.ant-descriptions-rtl{direction:rtl}.ant-descriptions-rtl .ant-descriptions-item-label:after{margin:0 2px 0 8px}.ant-descriptions-rtl.ant-descriptions-bordered .ant-descriptions-item-label,.ant-descriptions-rtl.ant-descriptions-bordered .ant-descriptions-item-content{border-right:none;border-left:1px solid #f0f0f0}.ant-descriptions-rtl.ant-descriptions-bordered .ant-descriptions-item-label:last-child,.ant-descriptions-rtl.ant-descriptions-bordered .ant-descriptions-item-content:last-child{border-left:none}.ant-divider{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";border-top:1px solid rgba(0,0,0,.06)}.ant-divider-vertical{position:relative;top:-.06em;display:inline-block;height:.9em;margin:0 8px;vertical-align:middle;border-top:0;border-left:1px solid rgba(0,0,0,.06)}.ant-divider-horizontal{display:flex;clear:both;width:100%;min-width:100%;margin:24px 0}.ant-divider-horizontal.ant-divider-with-text{display:flex;margin:16px 0;color:#1c2d56;font-weight:500;font-size:16px;white-space:nowrap;text-align:center;border-top:0;border-top-color:#0000000f}.ant-divider-horizontal.ant-divider-with-text:before,.ant-divider-horizontal.ant-divider-with-text:after{position:relative;top:50%;width:50%;border-top:1px solid transparent;border-top-color:inherit;border-bottom:0;transform:translateY(50%);content:""}.ant-divider-horizontal.ant-divider-with-text-left:before{top:50%;width:5%}.ant-divider-horizontal.ant-divider-with-text-left:after{top:50%;width:95%}.ant-divider-horizontal.ant-divider-with-text-right:before{top:50%;width:95%}.ant-divider-horizontal.ant-divider-with-text-right:after{top:50%;width:5%}.ant-divider-inner-text{display:inline-block;padding:0 1em}.ant-divider-dashed{background:none;border-color:#0000000f;border-style:dashed;border-width:1px 0 0}.ant-divider-horizontal.ant-divider-with-text.ant-divider-dashed:before,.ant-divider-horizontal.ant-divider-with-text.ant-divider-dashed:after{border-style:dashed none none}.ant-divider-vertical.ant-divider-dashed{border-width:0 0 0 1px}.ant-divider-plain.ant-divider-with-text{color:#000000d9;font-weight:400;font-size:14px}.ant-divider-horizontal.ant-divider-with-text-left.ant-divider-no-default-orientation-margin-left:before{width:0}.ant-divider-horizontal.ant-divider-with-text-left.ant-divider-no-default-orientation-margin-left:after{width:100%}.ant-divider-horizontal.ant-divider-with-text-left.ant-divider-no-default-orientation-margin-left .ant-divider-inner-text{padding-left:0}.ant-divider-horizontal.ant-divider-with-text-right.ant-divider-no-default-orientation-margin-right:before{width:100%}.ant-divider-horizontal.ant-divider-with-text-right.ant-divider-no-default-orientation-margin-right:after{width:0}.ant-divider-horizontal.ant-divider-with-text-right.ant-divider-no-default-orientation-margin-right .ant-divider-inner-text{padding-right:0}.ant-divider-rtl{direction:rtl}.ant-divider-rtl.ant-divider-horizontal.ant-divider-with-text-left:before{width:95%}.ant-divider-rtl.ant-divider-horizontal.ant-divider-with-text-left:after{width:5%}.ant-divider-rtl.ant-divider-horizontal.ant-divider-with-text-right:before{width:5%}.ant-divider-rtl.ant-divider-horizontal.ant-divider-with-text-right:after{width:95%}.ant-drawer{position:fixed;z-index:1000;width:0%;height:100%;transition:width 0s ease .3s,height 0s ease .3s}.ant-drawer-content-wrapper{position:absolute;width:100%;height:100%;transition:transform .3s cubic-bezier(.23,1,.32,1),box-shadow .3s cubic-bezier(.23,1,.32,1)}.ant-drawer .ant-drawer-content{width:100%;height:100%}.ant-drawer-left,.ant-drawer-right{top:0;width:0%;height:100%}.ant-drawer-left .ant-drawer-content-wrapper,.ant-drawer-right .ant-drawer-content-wrapper{height:100%}.ant-drawer-left.ant-drawer-open,.ant-drawer-right.ant-drawer-open{width:100%;transition:transform .3s cubic-bezier(.23,1,.32,1)}.ant-drawer-left,.ant-drawer-left .ant-drawer-content-wrapper{left:0}.ant-drawer-left.ant-drawer-open .ant-drawer-content-wrapper{box-shadow:6px 0 16px -8px #00000014,9px 0 28px #0000000d,12px 0 48px 16px #00000008}.ant-drawer-right,.ant-drawer-right .ant-drawer-content-wrapper{right:0}.ant-drawer-right.ant-drawer-open .ant-drawer-content-wrapper{box-shadow:-6px 0 16px -8px #00000014,-9px 0 28px #0000000d,-12px 0 48px 16px #00000008}.ant-drawer-right.ant-drawer-open.no-mask{right:1px;transform:translate(1px)}.ant-drawer-top,.ant-drawer-bottom{left:0;width:100%;height:0%}.ant-drawer-top .ant-drawer-content-wrapper,.ant-drawer-bottom .ant-drawer-content-wrapper{width:100%}.ant-drawer-top.ant-drawer-open,.ant-drawer-bottom.ant-drawer-open{height:100%;transition:transform .3s cubic-bezier(.23,1,.32,1)}.ant-drawer-top{top:0}.ant-drawer-top.ant-drawer-open .ant-drawer-content-wrapper{box-shadow:0 6px 16px -8px #00000014,0 9px 28px #0000000d,0 12px 48px 16px #00000008}.ant-drawer-bottom,.ant-drawer-bottom .ant-drawer-content-wrapper{bottom:0}.ant-drawer-bottom.ant-drawer-open .ant-drawer-content-wrapper{box-shadow:0 -6px 16px -8px #00000014,0 -9px 28px #0000000d,0 -12px 48px 16px #00000008}.ant-drawer-bottom.ant-drawer-open.no-mask{bottom:1px;transform:translateY(1px)}.ant-drawer.ant-drawer-open .ant-drawer-mask{height:100%;opacity:1;transition:none;animation:antdDrawerFadeIn .3s cubic-bezier(.23,1,.32,1);pointer-events:auto}.ant-drawer-title{flex:1;margin:0;color:#1c2d56;font-weight:500;font-size:16px;line-height:22px}.ant-drawer-content{position:relative;z-index:1;overflow:auto;background-color:#fff;background-clip:padding-box;border:0}.ant-drawer-close{display:inline-block;margin-right:12px;color:#00000073;font-weight:700;font-size:16px;font-style:normal;line-height:1;text-align:center;text-transform:none;text-decoration:none;background:transparent;border:0;outline:0;cursor:pointer;transition:color .3s;text-rendering:auto}.ant-drawer-close:focus,.ant-drawer-close:hover{color:#000000bf;text-decoration:none}.ant-drawer-header{position:relative;display:flex;align-items:center;justify-content:space-between;padding:16px 24px;color:#000000d9;background:#fff;border-bottom:1px solid #f0f0f0;border-radius:5px 5px 0 0}.ant-drawer-header-title{display:flex;flex:1;align-items:center;justify-content:space-between}.ant-drawer-header-close-only{padding-bottom:0;border:none}.ant-drawer-wrapper-body{display:flex;flex-flow:column nowrap;width:100%;height:100%}.ant-drawer-body{flex-grow:1;padding:24px;overflow:auto;font-size:14px;line-height:1.5715;word-wrap:break-word}.ant-drawer-footer{flex-shrink:0;padding:10px 16px;border-top:1px solid #f0f0f0}.ant-drawer-mask{position:absolute;top:0;left:0;width:100%;height:0;background-color:#00000073;opacity:0;transition:opacity .3s linear,height 0s ease .3s;pointer-events:none}.ant-drawer .ant-picker-clear{background:#fff}@keyframes antdDrawerFadeIn{0%{opacity:0}to{opacity:1}}.ant-drawer-rtl{direction:rtl}.ant-drawer-rtl .ant-drawer-close{margin-right:0;margin-left:12px}.ant-dropdown-menu-item.ant-dropdown-menu-item-danger{color:#e31a1a}.ant-dropdown-menu-item.ant-dropdown-menu-item-danger:hover{color:#fff;background-color:#e31a1a}.ant-dropdown{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:absolute;top:-9999px;left:-9999px;z-index:1050;display:block}.ant-dropdown:before{position:absolute;top:-4px;right:0;bottom:-4px;left:-7px;z-index:-9999;opacity:.0001;content:" "}.ant-dropdown-wrap{position:relative}.ant-dropdown-wrap .ant-btn>.anticon-down{font-size:10px}.ant-dropdown-wrap .anticon-down:before{transition:transform .2s}.ant-dropdown-wrap-open .anticon-down:before{transform:rotate(180deg)}.ant-dropdown-hidden,.ant-dropdown-menu-hidden,.ant-dropdown-menu-submenu-hidden{display:none}.ant-dropdown-show-arrow.ant-dropdown-placement-topCenter,.ant-dropdown-show-arrow.ant-dropdown-placement-topLeft,.ant-dropdown-show-arrow.ant-dropdown-placement-topRight{padding-bottom:10px}.ant-dropdown-show-arrow.ant-dropdown-placement-bottomCenter,.ant-dropdown-show-arrow.ant-dropdown-placement-bottomLeft,.ant-dropdown-show-arrow.ant-dropdown-placement-bottomRight{padding-top:10px}.ant-dropdown-arrow{position:absolute;z-index:1;display:block;width:8.48528137px;height:8.48528137px;background:transparent;border-style:solid;border-width:4.24264069px;transform:rotate(45deg)}.ant-dropdown-placement-topCenter>.ant-dropdown-arrow,.ant-dropdown-placement-topLeft>.ant-dropdown-arrow,.ant-dropdown-placement-topRight>.ant-dropdown-arrow{bottom:6.2px;border-color:transparent #fff #fff transparent;box-shadow:3px 3px 7px #00000012}.ant-dropdown-placement-topCenter>.ant-dropdown-arrow{left:50%;transform:translate(-50%) rotate(45deg)}.ant-dropdown-placement-topLeft>.ant-dropdown-arrow{left:16px}.ant-dropdown-placement-topRight>.ant-dropdown-arrow{right:16px}.ant-dropdown-placement-bottomCenter>.ant-dropdown-arrow,.ant-dropdown-placement-bottomLeft>.ant-dropdown-arrow,.ant-dropdown-placement-bottomRight>.ant-dropdown-arrow{top:6px;border-color:#fff transparent transparent #fff;box-shadow:-2px -2px 5px #0000000f}.ant-dropdown-placement-bottomCenter>.ant-dropdown-arrow{left:50%;transform:translate(-50%) rotate(45deg)}.ant-dropdown-placement-bottomLeft>.ant-dropdown-arrow{left:16px}.ant-dropdown-placement-bottomRight>.ant-dropdown-arrow{right:16px}.ant-dropdown-menu{position:relative;margin:0;padding:4px 0;text-align:left;list-style-type:none;background-color:#fff;background-clip:padding-box;border-radius:5px;outline:none;box-shadow:0 3px 6px -4px #0000001f,0 6px 16px #00000014,0 9px 28px 8px #0000000d}.ant-dropdown-menu-item-group-title{padding:5px 12px;color:#00000073;transition:all .3s}.ant-dropdown-menu-submenu-popup{position:absolute;z-index:1050;background:transparent;box-shadow:none;transform-origin:0 0}.ant-dropdown-menu-submenu-popup ul,.ant-dropdown-menu-submenu-popup li{list-style:none}.ant-dropdown-menu-submenu-popup ul{margin-right:.3em;margin-left:.3em}.ant-dropdown-menu-item{position:relative;display:flex;align-items:center}.ant-dropdown-menu-item-icon{min-width:12px;margin-right:8px;font-size:12px}.ant-dropdown-menu-title-content{flex:auto;white-space:nowrap}.ant-dropdown-menu-title-content>a{color:inherit;transition:all .3s}.ant-dropdown-menu-title-content>a:hover{color:inherit}.ant-dropdown-menu-title-content>a:after{position:absolute;top:0;right:0;bottom:0;left:0;content:""}.ant-dropdown-menu-item,.ant-dropdown-menu-submenu-title{clear:both;margin:0;padding:5px 12px;color:#000000d9;font-weight:400;font-size:14px;line-height:22px;cursor:pointer;transition:all .3s}.ant-dropdown-menu-item-selected,.ant-dropdown-menu-submenu-title-selected{color:#8d6a46;background-color:#ccc8c0}.ant-dropdown-menu-item:hover,.ant-dropdown-menu-submenu-title:hover{background-color:#f5f5f5}.ant-dropdown-menu-item-disabled,.ant-dropdown-menu-submenu-title-disabled{color:#00000040;cursor:not-allowed}.ant-dropdown-menu-item-disabled:hover,.ant-dropdown-menu-submenu-title-disabled:hover{color:#00000040;background-color:#fff;cursor:not-allowed}.ant-dropdown-menu-item-disabled a,.ant-dropdown-menu-submenu-title-disabled a{pointer-events:none}.ant-dropdown-menu-item-divider,.ant-dropdown-menu-submenu-title-divider{height:1px;margin:4px 0;overflow:hidden;line-height:0;background-color:#f0f0f0}.ant-dropdown-menu-item .ant-dropdown-menu-submenu-expand-icon,.ant-dropdown-menu-submenu-title .ant-dropdown-menu-submenu-expand-icon{position:absolute;right:8px}.ant-dropdown-menu-item .ant-dropdown-menu-submenu-expand-icon .ant-dropdown-menu-submenu-arrow-icon,.ant-dropdown-menu-submenu-title .ant-dropdown-menu-submenu-expand-icon .ant-dropdown-menu-submenu-arrow-icon{margin-right:0!important;color:#00000073;font-size:10px;font-style:normal}.ant-dropdown-menu-item-group-list{margin:0 8px;padding:0;list-style:none}.ant-dropdown-menu-submenu-title{padding-right:24px}.ant-dropdown-menu-submenu-vertical{position:relative}.ant-dropdown-menu-submenu-vertical>.ant-dropdown-menu{position:absolute;top:0;left:100%;min-width:100%;margin-left:4px;transform-origin:0 0}.ant-dropdown-menu-submenu.ant-dropdown-menu-submenu-disabled .ant-dropdown-menu-submenu-title,.ant-dropdown-menu-submenu.ant-dropdown-menu-submenu-disabled .ant-dropdown-menu-submenu-title .ant-dropdown-menu-submenu-arrow-icon{color:#00000040;background-color:#fff;cursor:not-allowed}.ant-dropdown-menu-submenu-selected .ant-dropdown-menu-submenu-title{color:#8d6a46}.ant-dropdown.ant-slide-down-enter.ant-slide-down-enter-active.ant-dropdown-placement-bottomLeft,.ant-dropdown.ant-slide-down-appear.ant-slide-down-appear-active.ant-dropdown-placement-bottomLeft,.ant-dropdown.ant-slide-down-enter.ant-slide-down-enter-active.ant-dropdown-placement-bottomCenter,.ant-dropdown.ant-slide-down-appear.ant-slide-down-appear-active.ant-dropdown-placement-bottomCenter,.ant-dropdown.ant-slide-down-enter.ant-slide-down-enter-active.ant-dropdown-placement-bottomRight,.ant-dropdown.ant-slide-down-appear.ant-slide-down-appear-active.ant-dropdown-placement-bottomRight{animation-name:antSlideUpIn}.ant-dropdown.ant-slide-up-enter.ant-slide-up-enter-active.ant-dropdown-placement-topLeft,.ant-dropdown.ant-slide-up-appear.ant-slide-up-appear-active.ant-dropdown-placement-topLeft,.ant-dropdown.ant-slide-up-enter.ant-slide-up-enter-active.ant-dropdown-placement-topCenter,.ant-dropdown.ant-slide-up-appear.ant-slide-up-appear-active.ant-dropdown-placement-topCenter,.ant-dropdown.ant-slide-up-enter.ant-slide-up-enter-active.ant-dropdown-placement-topRight,.ant-dropdown.ant-slide-up-appear.ant-slide-up-appear-active.ant-dropdown-placement-topRight{animation-name:antSlideDownIn}.ant-dropdown.ant-slide-down-leave.ant-slide-down-leave-active.ant-dropdown-placement-bottomLeft,.ant-dropdown.ant-slide-down-leave.ant-slide-down-leave-active.ant-dropdown-placement-bottomCenter,.ant-dropdown.ant-slide-down-leave.ant-slide-down-leave-active.ant-dropdown-placement-bottomRight{animation-name:antSlideUpOut}.ant-dropdown.ant-slide-up-leave.ant-slide-up-leave-active.ant-dropdown-placement-topLeft,.ant-dropdown.ant-slide-up-leave.ant-slide-up-leave-active.ant-dropdown-placement-topCenter,.ant-dropdown.ant-slide-up-leave.ant-slide-up-leave-active.ant-dropdown-placement-topRight{animation-name:antSlideDownOut}.ant-dropdown-trigger>.anticon.anticon-down,.ant-dropdown-link>.anticon.anticon-down,.ant-dropdown-button>.anticon.anticon-down{font-size:10px;vertical-align:baseline}.ant-dropdown-button{white-space:nowrap}.ant-dropdown-button.ant-btn-group>.ant-btn-loading,.ant-dropdown-button.ant-btn-group>.ant-btn-loading+.ant-btn{cursor:default;pointer-events:none}.ant-dropdown-button.ant-btn-group>.ant-btn-loading+.ant-btn:before{display:block}.ant-dropdown-button.ant-btn-group>.ant-btn:last-child:not(:first-child):not(.ant-btn-icon-only){padding-right:8px;padding-left:8px}.ant-dropdown-menu-dark,.ant-dropdown-menu-dark .ant-dropdown-menu{background:#001529}.ant-dropdown-menu-dark .ant-dropdown-menu-item,.ant-dropdown-menu-dark .ant-dropdown-menu-submenu-title,.ant-dropdown-menu-dark .ant-dropdown-menu-item>a,.ant-dropdown-menu-dark .ant-dropdown-menu-item>.anticon+span>a{color:#ffffffa6}.ant-dropdown-menu-dark .ant-dropdown-menu-item .ant-dropdown-menu-submenu-arrow:after,.ant-dropdown-menu-dark .ant-dropdown-menu-submenu-title .ant-dropdown-menu-submenu-arrow:after,.ant-dropdown-menu-dark .ant-dropdown-menu-item>a .ant-dropdown-menu-submenu-arrow:after,.ant-dropdown-menu-dark .ant-dropdown-menu-item>.anticon+span>a .ant-dropdown-menu-submenu-arrow:after{color:#ffffffa6}.ant-dropdown-menu-dark .ant-dropdown-menu-item:hover,.ant-dropdown-menu-dark .ant-dropdown-menu-submenu-title:hover,.ant-dropdown-menu-dark .ant-dropdown-menu-item>a:hover,.ant-dropdown-menu-dark .ant-dropdown-menu-item>.anticon+span>a:hover{color:#fff;background:transparent}.ant-dropdown-menu-dark .ant-dropdown-menu-item-selected,.ant-dropdown-menu-dark .ant-dropdown-menu-item-selected:hover,.ant-dropdown-menu-dark .ant-dropdown-menu-item-selected>a{color:#fff;background:#8d6a46}.ant-dropdown-rtl{direction:rtl}.ant-dropdown-rtl.ant-dropdown:before{right:-7px;left:0}.ant-dropdown-menu.ant-dropdown-menu-rtl,.ant-dropdown-rtl .ant-dropdown-menu-item-group-title,.ant-dropdown-menu-submenu-rtl .ant-dropdown-menu-item-group-title{direction:rtl;text-align:right}.ant-dropdown-menu-submenu-popup.ant-dropdown-menu-submenu-rtl{transform-origin:100% 0}.ant-dropdown-rtl .ant-dropdown-menu-submenu-popup ul,.ant-dropdown-rtl .ant-dropdown-menu-submenu-popup li,.ant-dropdown-rtl .ant-dropdown-menu-item,.ant-dropdown-rtl .ant-dropdown-menu-submenu-title{text-align:right}.ant-dropdown-rtl .ant-dropdown-menu-item>.anticon:first-child,.ant-dropdown-rtl .ant-dropdown-menu-submenu-title>.anticon:first-child,.ant-dropdown-rtl .ant-dropdown-menu-item>span>.anticon:first-child,.ant-dropdown-rtl .ant-dropdown-menu-submenu-title>span>.anticon:first-child{margin-right:0;margin-left:8px}.ant-dropdown-rtl .ant-dropdown-menu-item .ant-dropdown-menu-submenu-expand-icon,.ant-dropdown-rtl .ant-dropdown-menu-submenu-title .ant-dropdown-menu-submenu-expand-icon{right:auto;left:8px}.ant-dropdown-rtl .ant-dropdown-menu-item .ant-dropdown-menu-submenu-expand-icon .ant-dropdown-menu-submenu-arrow-icon,.ant-dropdown-rtl .ant-dropdown-menu-submenu-title .ant-dropdown-menu-submenu-expand-icon .ant-dropdown-menu-submenu-arrow-icon{margin-left:0!important;transform:scaleX(-1)}.ant-dropdown-rtl .ant-dropdown-menu-submenu-title{padding-right:12px;padding-left:24px}.ant-dropdown-rtl .ant-dropdown-menu-submenu-vertical>.ant-dropdown-menu{right:100%;left:0;margin-right:4px;margin-left:0}.ant-empty{margin:0 8px;font-size:14px;line-height:1.5715;text-align:center}.ant-empty-image{height:100px;margin-bottom:8px}.ant-empty-image img{height:100%}.ant-empty-image svg{height:100%;margin:auto}.ant-empty-footer{margin-top:16px}.ant-empty-normal{margin:32px 0;color:#00000040}.ant-empty-normal .ant-empty-image{height:40px}.ant-empty-small{margin:8px 0;color:#00000040}.ant-empty-small .ant-empty-image{height:35px}.ant-empty-img-default-ellipse{fill:#f5f5f5;fill-opacity:.8}.ant-empty-img-default-path-1{fill:#aeb8c2}.ant-empty-img-default-path-2{fill:url(#linearGradient-1)}.ant-empty-img-default-path-3{fill:#f5f5f7}.ant-empty-img-default-path-4,.ant-empty-img-default-path-5{fill:#dce0e6}.ant-empty-img-default-g{fill:#fff}.ant-empty-img-simple-ellipse{fill:#f5f5f5}.ant-empty-img-simple-g{stroke:#d9d9d9}.ant-empty-img-simple-path{fill:#fafafa}.ant-empty-rtl{direction:rtl}.ant-form-item .ant-upload{background:transparent}.ant-form-item .ant-upload.ant-upload-drag{background:#fafafa}.ant-form-item input[type=radio],.ant-form-item input[type=checkbox]{width:14px;height:14px}.ant-form-item .ant-radio-inline,.ant-form-item .ant-checkbox-inline{display:inline-block;margin-left:8px;font-weight:400;vertical-align:middle;cursor:pointer}.ant-form-item .ant-radio-inline:first-child,.ant-form-item .ant-checkbox-inline:first-child{margin-left:0}.ant-form-item .ant-checkbox-vertical,.ant-form-item .ant-radio-vertical{display:block}.ant-form-item .ant-checkbox-vertical+.ant-checkbox-vertical,.ant-form-item .ant-radio-vertical+.ant-radio-vertical{margin-left:0}.ant-form-item .ant-input-number+.ant-form-text{margin-left:8px}.ant-form-item .ant-input-number-handler-wrap{z-index:2}.ant-form-item .ant-select,.ant-form-item .ant-cascader-picker{width:100%}.ant-form-item .ant-picker-calendar-year-select,.ant-form-item .ant-picker-calendar-month-select,.ant-form-item .ant-input-group .ant-select,.ant-form-item .ant-input-group .ant-cascader-picker,.ant-form-item .ant-input-number-group .ant-select,.ant-form-item .ant-input-number-group .ant-cascader-picker{width:auto}.ant-form-inline{display:flex;flex-wrap:wrap}.ant-form-inline .ant-form-item{flex:none;flex-wrap:nowrap;margin-right:16px;margin-bottom:0}.ant-form-inline .ant-form-item-with-help{margin-bottom:24px}.ant-form-inline .ant-form-item>.ant-form-item-label,.ant-form-inline .ant-form-item>.ant-form-item-control{display:inline-block;vertical-align:top}.ant-form-inline .ant-form-item>.ant-form-item-label{flex:none}.ant-form-inline .ant-form-item .ant-form-text,.ant-form-inline .ant-form-item .ant-form-item-has-feedback{display:inline-block}.ant-form-horizontal .ant-form-item-label{flex-grow:0}.ant-form-horizontal .ant-form-item-control{flex:1 1 0;min-width:0}.ant-form-horizontal .ant-form-item-label.ant-col-24+.ant-form-item-control{min-width:unset}.ant-form-vertical .ant-form-item{flex-direction:column}.ant-form-vertical .ant-form-item-label>label{height:auto}.ant-form-vertical .ant-form-item-label,.ant-col-24.ant-form-item-label,.ant-col-xl-24.ant-form-item-label{padding:0 0 8px;line-height:1.5715;white-space:initial;text-align:left}.ant-form-vertical .ant-form-item-label>label,.ant-col-24.ant-form-item-label>label,.ant-col-xl-24.ant-form-item-label>label{margin:0}.ant-form-vertical .ant-form-item-label>label:after,.ant-col-24.ant-form-item-label>label:after,.ant-col-xl-24.ant-form-item-label>label:after{display:none}.ant-form-rtl.ant-form-vertical .ant-form-item-label,.ant-form-rtl.ant-col-24.ant-form-item-label,.ant-form-rtl.ant-col-xl-24.ant-form-item-label{text-align:right}@media (max-width: 575px){.ant-form-item .ant-form-item-label{padding:0 0 8px;line-height:1.5715;white-space:initial;text-align:left}.ant-form-item .ant-form-item-label>label{margin:0}.ant-form-item .ant-form-item-label>label:after{display:none}.ant-form-rtl.ant-form-item .ant-form-item-label{text-align:right}.ant-form .ant-form-item{flex-wrap:wrap}.ant-form .ant-form-item .ant-form-item-label,.ant-form .ant-form-item .ant-form-item-control{flex:0 0 100%;max-width:100%}.ant-col-xs-24.ant-form-item-label{padding:0 0 8px;line-height:1.5715;white-space:initial;text-align:left}.ant-col-xs-24.ant-form-item-label>label{margin:0}.ant-col-xs-24.ant-form-item-label>label:after{display:none}.ant-form-rtl.ant-col-xs-24.ant-form-item-label{text-align:right}}@media (max-width: 767px){.ant-col-sm-24.ant-form-item-label{padding:0 0 8px;line-height:1.5715;white-space:initial;text-align:left}.ant-col-sm-24.ant-form-item-label>label{margin:0}.ant-col-sm-24.ant-form-item-label>label:after{display:none}.ant-form-rtl.ant-col-sm-24.ant-form-item-label{text-align:right}}@media (max-width: 991px){.ant-col-md-24.ant-form-item-label{padding:0 0 8px;line-height:1.5715;white-space:initial;text-align:left}.ant-col-md-24.ant-form-item-label>label{margin:0}.ant-col-md-24.ant-form-item-label>label:after{display:none}.ant-form-rtl.ant-col-md-24.ant-form-item-label{text-align:right}}@media (max-width: 1199px){.ant-col-lg-24.ant-form-item-label{padding:0 0 8px;line-height:1.5715;white-space:initial;text-align:left}.ant-col-lg-24.ant-form-item-label>label{margin:0}.ant-col-lg-24.ant-form-item-label>label:after{display:none}.ant-form-rtl.ant-col-lg-24.ant-form-item-label{text-align:right}}@media (max-width: 1599px){.ant-col-xl-24.ant-form-item-label{padding:0 0 8px;line-height:1.5715;white-space:initial;text-align:left}.ant-col-xl-24.ant-form-item-label>label{margin:0}.ant-col-xl-24.ant-form-item-label>label:after{display:none}.ant-form-rtl.ant-col-xl-24.ant-form-item-label{text-align:right}}.ant-form-item-explain-error{color:#e31a1a}.ant-form-item-explain-warning{color:#faad14}.ant-form-item-has-feedback .ant-input{padding-right:24px}.ant-form-item-has-feedback .ant-input-affix-wrapper .ant-input-suffix{padding-right:18px}.ant-form-item-has-feedback .ant-input-search:not(.ant-input-search-enter-button) .ant-input-suffix{right:28px}.ant-form-item-has-feedback .ant-switch{margin:2px 0 4px}.ant-form-item-has-feedback>.ant-select .ant-select-arrow,.ant-form-item-has-feedback>.ant-select .ant-select-clear,.ant-form-item-has-feedback :not(.ant-input-group-addon)>.ant-select .ant-select-arrow,.ant-form-item-has-feedback :not(.ant-input-group-addon)>.ant-select .ant-select-clear,.ant-form-item-has-feedback :not(.ant-input-number-group-addon)>.ant-select .ant-select-arrow,.ant-form-item-has-feedback :not(.ant-input-number-group-addon)>.ant-select .ant-select-clear{right:32px}.ant-form-item-has-feedback>.ant-select .ant-select-selection-selected-value,.ant-form-item-has-feedback :not(.ant-input-group-addon)>.ant-select .ant-select-selection-selected-value,.ant-form-item-has-feedback :not(.ant-input-number-group-addon)>.ant-select .ant-select-selection-selected-value{padding-right:42px}.ant-form-item-has-feedback .ant-cascader-picker-arrow{margin-right:19px}.ant-form-item-has-feedback .ant-cascader-picker-clear{right:32px}.ant-form-item-has-feedback .ant-picker{padding-right:28.2px}.ant-form-item-has-feedback .ant-picker-large{padding-right:29.2px}.ant-form-item-has-feedback .ant-picker-small{padding-right:25.2px}.ant-form-item-has-feedback.ant-form-item-has-success .ant-form-item-children-icon,.ant-form-item-has-feedback.ant-form-item-has-warning .ant-form-item-children-icon,.ant-form-item-has-feedback.ant-form-item-has-error .ant-form-item-children-icon,.ant-form-item-has-feedback.ant-form-item-is-validating .ant-form-item-children-icon{position:absolute;top:50%;right:0;z-index:1;width:32px;height:20px;margin-top:-10px;font-size:14px;line-height:20px;text-align:center;visibility:visible;animation:zoomIn .3s cubic-bezier(.12,.4,.29,1.46);pointer-events:none}.ant-form-item-has-success.ant-form-item-has-feedback .ant-form-item-children-icon{color:#52c41a;animation-name:diffZoomIn1!important}.ant-form-item-has-warning .ant-form-item-split{color:#faad14}.ant-form-item-has-warning :not(.ant-input-disabled):not(.ant-input-borderless).ant-input,.ant-form-item-has-warning :not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper,.ant-form-item-has-warning :not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper,.ant-form-item-has-warning :not(.ant-input-disabled):not(.ant-input-borderless).ant-input:hover,.ant-form-item-has-warning :not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper:hover,.ant-form-item-has-warning :not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper:hover{background-color:#fff;border-color:#faad14}.ant-form-item-has-warning :not(.ant-input-disabled):not(.ant-input-borderless).ant-input:focus,.ant-form-item-has-warning :not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper:focus,.ant-form-item-has-warning :not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper:focus,.ant-form-item-has-warning :not(.ant-input-disabled):not(.ant-input-borderless).ant-input-focused,.ant-form-item-has-warning :not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper-focused,.ant-form-item-has-warning :not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper-focused{border-color:#ffc53d;box-shadow:0 0 0 2px #faad1433;border-right-width:1px!important;outline:0}.ant-form-item-has-warning .ant-calendar-picker-open .ant-calendar-picker-input{border-color:#ffc53d;box-shadow:0 0 0 2px #faad1433;border-right-width:1px!important;outline:0}.ant-form-item-has-warning .ant-input-prefix,.ant-form-item-has-warning .ant-input-number-prefix{color:#faad14}.ant-form-item-has-warning :not(.ant-input-group-addon-disabled).ant-input-group-addon,.ant-form-item-has-warning :not(.ant-input-number-group-addon-disabled).ant-input-number-group-addon{color:#faad14;border-color:#faad14}.ant-form-item-has-warning .has-feedback{color:#faad14}.ant-form-item-has-warning.ant-form-item-has-feedback .ant-form-item-children-icon{color:#faad14;animation-name:diffZoomIn3!important}.ant-form-item-has-warning .ant-select:not(.ant-select-disabled):not(.ant-select-customize-input) .ant-select-selector{background-color:#fff;border-color:#faad14!important}.ant-form-item-has-warning .ant-select:not(.ant-select-disabled):not(.ant-select-customize-input).ant-select-open .ant-select-selector,.ant-form-item-has-warning .ant-select:not(.ant-select-disabled):not(.ant-select-customize-input).ant-select-focused .ant-select-selector{border-color:#ffc53d;box-shadow:0 0 0 2px #faad1433;border-right-width:1px!important;outline:0}.ant-form-item-has-warning .ant-input-number,.ant-form-item-has-warning .ant-picker{background-color:#fff;border-color:#faad14}.ant-form-item-has-warning .ant-input-number-focused,.ant-form-item-has-warning .ant-picker-focused,.ant-form-item-has-warning .ant-input-number:focus,.ant-form-item-has-warning .ant-picker:focus{border-color:#ffc53d;box-shadow:0 0 0 2px #faad1433;border-right-width:1px!important;outline:0}.ant-form-item-has-warning .ant-input-number:not([disabled]):hover,.ant-form-item-has-warning .ant-picker:not([disabled]):hover{background-color:#fff;border-color:#faad14}.ant-form-item-has-warning .ant-cascader-picker:focus .ant-cascader-input{border-color:#ffc53d;box-shadow:0 0 0 2px #faad1433;border-right-width:1px!important;outline:0}.ant-form-item-has-error .ant-form-item-split{color:#e31a1a}.ant-form-item-has-error :not(.ant-input-disabled):not(.ant-input-borderless).ant-input,.ant-form-item-has-error :not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper,.ant-form-item-has-error :not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper,.ant-form-item-has-error :not(.ant-input-disabled):not(.ant-input-borderless).ant-input:hover,.ant-form-item-has-error :not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper:hover,.ant-form-item-has-error :not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper:hover{background-color:#fff;border-color:#e31a1a}.ant-form-item-has-error :not(.ant-input-disabled):not(.ant-input-borderless).ant-input:focus,.ant-form-item-has-error :not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper:focus,.ant-form-item-has-error :not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper:focus,.ant-form-item-has-error :not(.ant-input-disabled):not(.ant-input-borderless).ant-input-focused,.ant-form-item-has-error :not(.ant-input-affix-wrapper-disabled):not(.ant-input-affix-wrapper-borderless).ant-input-affix-wrapper-focused,.ant-form-item-has-error :not(.ant-input-number-affix-wrapper-disabled):not(.ant-input-number-affix-wrapper-borderless).ant-input-number-affix-wrapper-focused{border-color:#f04741;box-shadow:0 0 0 2px #e31a1a33;border-right-width:1px!important;outline:0}.ant-form-item-has-error .ant-calendar-picker-open .ant-calendar-picker-input{border-color:#f04741;box-shadow:0 0 0 2px #e31a1a33;border-right-width:1px!important;outline:0}.ant-form-item-has-error .ant-input-prefix,.ant-form-item-has-error .ant-input-number-prefix{color:#e31a1a}.ant-form-item-has-error :not(.ant-input-group-addon-disabled).ant-input-group-addon,.ant-form-item-has-error :not(.ant-input-number-group-addon-disabled).ant-input-number-group-addon{color:#e31a1a;border-color:#e31a1a}.ant-form-item-has-error .has-feedback{color:#e31a1a}.ant-form-item-has-error.ant-form-item-has-feedback .ant-form-item-children-icon{color:#e31a1a;animation-name:diffZoomIn2!important}.ant-form-item-has-error .ant-select:not(.ant-select-disabled):not(.ant-select-customize-input) .ant-select-selector{background-color:#fff;border-color:#e31a1a!important}.ant-form-item-has-error .ant-select:not(.ant-select-disabled):not(.ant-select-customize-input).ant-select-open .ant-select-selector,.ant-form-item-has-error .ant-select:not(.ant-select-disabled):not(.ant-select-customize-input).ant-select-focused .ant-select-selector{border-color:#f04741;box-shadow:0 0 0 2px #e31a1a33;border-right-width:1px!important;outline:0}.ant-form-item-has-error .ant-input-group-addon .ant-select.ant-select-single:not(.ant-select-customize-input) .ant-select-selector,.ant-form-item-has-error .ant-input-number-group-addon .ant-select.ant-select-single:not(.ant-select-customize-input) .ant-select-selector{background-color:inherit;border:0;box-shadow:none}.ant-form-item-has-error .ant-select.ant-select-auto-complete .ant-input:focus{border-color:#e31a1a}.ant-form-item-has-error .ant-input-number,.ant-form-item-has-error .ant-picker{background-color:#fff;border-color:#e31a1a}.ant-form-item-has-error .ant-input-number-focused,.ant-form-item-has-error .ant-picker-focused,.ant-form-item-has-error .ant-input-number:focus,.ant-form-item-has-error .ant-picker:focus{border-color:#f04741;box-shadow:0 0 0 2px #e31a1a33;border-right-width:1px!important;outline:0}.ant-form-item-has-error .ant-input-number:not([disabled]):hover,.ant-form-item-has-error .ant-picker:not([disabled]):hover{background-color:#fff;border-color:#e31a1a}.ant-form-item-has-error .ant-mention-wrapper .ant-mention-editor,.ant-form-item-has-error .ant-mention-wrapper .ant-mention-editor:not([disabled]):hover{background-color:#fff;border-color:#e31a1a}.ant-form-item-has-error .ant-mention-wrapper.ant-mention-active:not([disabled]) .ant-mention-editor,.ant-form-item-has-error .ant-mention-wrapper .ant-mention-editor:not([disabled]):focus{border-color:#f04741;box-shadow:0 0 0 2px #e31a1a33;border-right-width:1px!important;outline:0}.ant-form-item-has-error .ant-cascader-picker:hover .ant-cascader-picker-label:hover+.ant-cascader-input.ant-input{border-color:#e31a1a}.ant-form-item-has-error .ant-cascader-picker:focus .ant-cascader-input{background-color:#fff;border-color:#f04741;box-shadow:0 0 0 2px #e31a1a33;border-right-width:1px!important;outline:0}.ant-form-item-has-error .ant-transfer-list{border-color:#e31a1a}.ant-form-item-has-error .ant-transfer-list-search:not([disabled]){border-color:#d9d9d9}.ant-form-item-has-error .ant-transfer-list-search:not([disabled]):hover{border-color:#998165;border-right-width:1px!important}.ant-input-rtl .ant-form-item-has-error .ant-transfer-list-search:not([disabled]):hover{border-right-width:0;border-left-width:1px!important}.ant-form-item-has-error .ant-transfer-list-search:not([disabled]):focus{border-color:#998165;box-shadow:0 0 0 2px #8d6a4633;border-right-width:1px!important;outline:0}.ant-input-rtl .ant-form-item-has-error .ant-transfer-list-search:not([disabled]):focus{border-right-width:0;border-left-width:1px!important}.ant-form-item-has-error .ant-radio-button-wrapper{border-color:#e31a1a!important}.ant-form-item-has-error .ant-radio-button-wrapper:not(:first-child):before{background-color:#e31a1a}.ant-form-item-has-error .ant-mentions{border-color:#e31a1a!important}.ant-form-item-has-error .ant-mentions-focused,.ant-form-item-has-error .ant-mentions:focus{border-color:#f04741;box-shadow:0 0 0 2px #e31a1a33;border-right-width:1px!important;outline:0}.ant-form-item-is-validating.ant-form-item-has-feedback .ant-form-item-children-icon{display:inline-block;color:#8d6a46}.ant-form{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum"}.ant-form legend{display:block;width:100%;margin-bottom:20px;padding:0;color:#00000073;font-size:16px;line-height:inherit;border:0;border-bottom:1px solid #d9d9d9}.ant-form label{font-size:14px}.ant-form input[type=search]{box-sizing:border-box}.ant-form input[type=radio],.ant-form input[type=checkbox]{line-height:normal}.ant-form input[type=file]{display:block}.ant-form input[type=range]{display:block;width:100%}.ant-form select[multiple],.ant-form select[size]{height:auto}.ant-form input[type=file]:focus,.ant-form input[type=radio]:focus,.ant-form input[type=checkbox]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.ant-form output{display:block;padding-top:15px;color:#000000d9;font-size:14px;line-height:1.5715}.ant-form .ant-form-text{display:inline-block;padding-right:8px}.ant-form-small .ant-form-item-label>label{height:24px}.ant-form-small .ant-form-item-control-input{min-height:24px}.ant-form-large .ant-form-item-label>label{height:42px}.ant-form-large .ant-form-item-control-input{min-height:42px}.ant-form-item{box-sizing:border-box;margin:0 0 24px;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";vertical-align:top}.ant-form-item-with-help{margin-bottom:0;transition:none}.ant-form-item-hidden,.ant-form-item-hidden.ant-row{display:none}.ant-form-item-label{display:inline-block;flex-grow:0;overflow:hidden;white-space:nowrap;text-align:right;vertical-align:middle}.ant-form-item-label-left{text-align:left}.ant-form-item-label-wrap{overflow:unset;line-height:1.3215em;white-space:unset}.ant-form-item-label>label{position:relative;display:inline-flex;align-items:center;max-width:100%;height:32px;color:#1c2d56;font-size:14px}.ant-form-item-label>label>.anticon{font-size:14px;vertical-align:top}.ant-form-item-label>label.ant-form-item-required:not(.ant-form-item-required-mark-optional):before{display:inline-block;margin-right:4px;color:#ff4d4f;font-size:14px;font-family:SimSun,sans-serif;line-height:1;content:"*"}.ant-form-hide-required-mark .ant-form-item-label>label.ant-form-item-required:not(.ant-form-item-required-mark-optional):before{display:none}.ant-form-item-label>label .ant-form-item-optional{display:inline-block;margin-left:4px;color:#00000073}.ant-form-hide-required-mark .ant-form-item-label>label .ant-form-item-optional{display:none}.ant-form-item-label>label .ant-form-item-tooltip{color:#00000073;cursor:help;writing-mode:horizontal-tb;margin-inline-start:4px}.ant-form-item-label>label:after{content:":";position:relative;top:-.5px;margin:0 8px 0 2px}.ant-form-item-label>label.ant-form-item-no-colon:after{content:" "}.ant-form-item-control{display:flex;flex-direction:column;flex-grow:1}.ant-form-item-control:first-child:not([class^=ant-col-]):not([class*=" ant-col-"]){width:100%}.ant-form-item-control-input{position:relative;display:flex;align-items:center;min-height:32px}.ant-form-item-control-input-content{flex:auto;max-width:100%}.ant-form-item-explain,.ant-form-item-extra{clear:both;color:#00000073;font-size:14px;line-height:1.5715;transition:color .3s cubic-bezier(.215,.61,.355,1)}.ant-form-item-explain-connected{height:0;min-height:0;opacity:0}.ant-form-item-extra{min-height:24px}.ant-form-item .ant-input-textarea-show-count:after{margin-bottom:-22px}.ant-form-item-with-help .ant-form-item-explain{height:auto;min-height:24px;opacity:1}.ant-show-help{transition:height .3s linear,min-height .3s linear,margin-bottom .3s cubic-bezier(.645,.045,.355,1),opacity .3s cubic-bezier(.645,.045,.355,1)}.ant-show-help-leave{min-height:24px}.ant-show-help-leave-active{min-height:0}.ant-show-help-item{overflow:hidden;transition:height .3s cubic-bezier(.645,.045,.355,1),opacity .3s cubic-bezier(.645,.045,.355,1),transform .3s cubic-bezier(.645,.045,.355,1)!important}.ant-show-help-item-appear,.ant-show-help-item-enter{transform:translateY(-5px);opacity:0}.ant-show-help-item-appear-active,.ant-show-help-item-enter-active{transform:translateY(0);opacity:1}.ant-show-help-item-leave-active{transform:translateY(-5px)}@keyframes diffZoomIn1{0%{transform:scale(0);opacity:0}to{transform:scale(1);opacity:1}}@keyframes diffZoomIn2{0%{transform:scale(0);opacity:0}to{transform:scale(1);opacity:1}}@keyframes diffZoomIn3{0%{transform:scale(0);opacity:0}to{transform:scale(1);opacity:1}}.ant-form-rtl{direction:rtl}.ant-form-rtl .ant-form-item-label{text-align:left}.ant-form-rtl .ant-form-item-label>label.ant-form-item-required:before{margin-right:0;margin-left:4px}.ant-form-rtl .ant-form-item-label>label:after{margin:0 2px 0 8px}.ant-form-rtl .ant-form-item-label>label .ant-form-item-optional{margin-right:4px;margin-left:0}.ant-col-rtl .ant-form-item-control:first-child{width:100%}.ant-form-rtl .ant-form-item-has-feedback .ant-input{padding-right:10px;padding-left:24px}.ant-form-rtl .ant-form-item-has-feedback .ant-input-affix-wrapper .ant-input-suffix{padding-right:10px;padding-left:18px}.ant-form-rtl .ant-form-item-has-feedback .ant-input-affix-wrapper .ant-input,.ant-form-rtl .ant-form-item-has-feedback .ant-input-number-affix-wrapper .ant-input-number{padding:0}.ant-form-rtl .ant-form-item-has-feedback .ant-input-search:not(.ant-input-search-enter-button) .ant-input-suffix{right:auto;left:28px}.ant-form-rtl .ant-form-item-has-feedback .ant-input-number{padding-left:18px}.ant-form-rtl .ant-form-item-has-feedback>.ant-select .ant-select-arrow,.ant-form-rtl .ant-form-item-has-feedback>.ant-select .ant-select-clear,.ant-form-rtl .ant-form-item-has-feedback :not(.ant-input-group-addon)>.ant-select .ant-select-arrow,.ant-form-rtl .ant-form-item-has-feedback :not(.ant-input-group-addon)>.ant-select .ant-select-clear,.ant-form-rtl .ant-form-item-has-feedback :not(.ant-input-number-group-addon)>.ant-select .ant-select-arrow,.ant-form-rtl .ant-form-item-has-feedback :not(.ant-input-number-group-addon)>.ant-select .ant-select-clear{right:auto;left:32px}.ant-form-rtl .ant-form-item-has-feedback>.ant-select .ant-select-selection-selected-value,.ant-form-rtl .ant-form-item-has-feedback :not(.ant-input-group-addon)>.ant-select .ant-select-selection-selected-value,.ant-form-rtl .ant-form-item-has-feedback :not(.ant-input-number-group-addon)>.ant-select .ant-select-selection-selected-value{padding-right:0;padding-left:42px}.ant-form-rtl .ant-form-item-has-feedback .ant-cascader-picker-arrow{margin-right:0;margin-left:19px}.ant-form-rtl .ant-form-item-has-feedback .ant-cascader-picker-clear{right:auto;left:32px}.ant-form-rtl .ant-form-item-has-feedback .ant-picker{padding-right:10px;padding-left:28.2px}.ant-form-rtl .ant-form-item-has-feedback .ant-picker-large{padding-right:11px;padding-left:29.2px}.ant-form-rtl .ant-form-item-has-feedback .ant-picker-small{padding-right:7px;padding-left:25.2px}.ant-form-rtl .ant-form-item-has-feedback.ant-form-item-has-success .ant-form-item-children-icon,.ant-form-rtl .ant-form-item-has-feedback.ant-form-item-has-warning .ant-form-item-children-icon,.ant-form-rtl .ant-form-item-has-feedback.ant-form-item-has-error .ant-form-item-children-icon,.ant-form-rtl .ant-form-item-has-feedback.ant-form-item-is-validating .ant-form-item-children-icon{right:auto;left:0}.ant-form-rtl.ant-form-inline .ant-form-item{margin-right:0;margin-left:16px}.ant-row{display:flex;flex-flow:row wrap}.ant-row:before,.ant-row:after{display:flex}.ant-row-no-wrap{flex-wrap:nowrap}.ant-row-start{justify-content:flex-start}.ant-row-center{justify-content:center}.ant-row-end{justify-content:flex-end}.ant-row-space-between{justify-content:space-between}.ant-row-space-around{justify-content:space-around}.ant-row-top{align-items:flex-start}.ant-row-middle{align-items:center}.ant-row-bottom{align-items:flex-end}.ant-col{position:relative;max-width:100%;min-height:1px}.ant-col-24{display:block;flex:0 0 100%;max-width:100%}.ant-col-push-24{left:100%}.ant-col-pull-24{right:100%}.ant-col-offset-24{margin-left:100%}.ant-col-order-24{order:24}.ant-col-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.ant-col-push-23{left:95.83333333%}.ant-col-pull-23{right:95.83333333%}.ant-col-offset-23{margin-left:95.83333333%}.ant-col-order-23{order:23}.ant-col-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.ant-col-push-22{left:91.66666667%}.ant-col-pull-22{right:91.66666667%}.ant-col-offset-22{margin-left:91.66666667%}.ant-col-order-22{order:22}.ant-col-21{display:block;flex:0 0 87.5%;max-width:87.5%}.ant-col-push-21{left:87.5%}.ant-col-pull-21{right:87.5%}.ant-col-offset-21{margin-left:87.5%}.ant-col-order-21{order:21}.ant-col-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.ant-col-push-20{left:83.33333333%}.ant-col-pull-20{right:83.33333333%}.ant-col-offset-20{margin-left:83.33333333%}.ant-col-order-20{order:20}.ant-col-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.ant-col-push-19{left:79.16666667%}.ant-col-pull-19{right:79.16666667%}.ant-col-offset-19{margin-left:79.16666667%}.ant-col-order-19{order:19}.ant-col-18{display:block;flex:0 0 75%;max-width:75%}.ant-col-push-18{left:75%}.ant-col-pull-18{right:75%}.ant-col-offset-18{margin-left:75%}.ant-col-order-18{order:18}.ant-col-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.ant-col-push-17{left:70.83333333%}.ant-col-pull-17{right:70.83333333%}.ant-col-offset-17{margin-left:70.83333333%}.ant-col-order-17{order:17}.ant-col-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.ant-col-push-16{left:66.66666667%}.ant-col-pull-16{right:66.66666667%}.ant-col-offset-16{margin-left:66.66666667%}.ant-col-order-16{order:16}.ant-col-15{display:block;flex:0 0 62.5%;max-width:62.5%}.ant-col-push-15{left:62.5%}.ant-col-pull-15{right:62.5%}.ant-col-offset-15{margin-left:62.5%}.ant-col-order-15{order:15}.ant-col-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.ant-col-push-14{left:58.33333333%}.ant-col-pull-14{right:58.33333333%}.ant-col-offset-14{margin-left:58.33333333%}.ant-col-order-14{order:14}.ant-col-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.ant-col-push-13{left:54.16666667%}.ant-col-pull-13{right:54.16666667%}.ant-col-offset-13{margin-left:54.16666667%}.ant-col-order-13{order:13}.ant-col-12{display:block;flex:0 0 50%;max-width:50%}.ant-col-push-12{left:50%}.ant-col-pull-12{right:50%}.ant-col-offset-12{margin-left:50%}.ant-col-order-12{order:12}.ant-col-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.ant-col-push-11{left:45.83333333%}.ant-col-pull-11{right:45.83333333%}.ant-col-offset-11{margin-left:45.83333333%}.ant-col-order-11{order:11}.ant-col-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.ant-col-push-10{left:41.66666667%}.ant-col-pull-10{right:41.66666667%}.ant-col-offset-10{margin-left:41.66666667%}.ant-col-order-10{order:10}.ant-col-9{display:block;flex:0 0 37.5%;max-width:37.5%}.ant-col-push-9{left:37.5%}.ant-col-pull-9{right:37.5%}.ant-col-offset-9{margin-left:37.5%}.ant-col-order-9{order:9}.ant-col-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.ant-col-push-8{left:33.33333333%}.ant-col-pull-8{right:33.33333333%}.ant-col-offset-8{margin-left:33.33333333%}.ant-col-order-8{order:8}.ant-col-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.ant-col-push-7{left:29.16666667%}.ant-col-pull-7{right:29.16666667%}.ant-col-offset-7{margin-left:29.16666667%}.ant-col-order-7{order:7}.ant-col-6{display:block;flex:0 0 25%;max-width:25%}.ant-col-push-6{left:25%}.ant-col-pull-6{right:25%}.ant-col-offset-6{margin-left:25%}.ant-col-order-6{order:6}.ant-col-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.ant-col-push-5{left:20.83333333%}.ant-col-pull-5{right:20.83333333%}.ant-col-offset-5{margin-left:20.83333333%}.ant-col-order-5{order:5}.ant-col-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.ant-col-push-4{left:16.66666667%}.ant-col-pull-4{right:16.66666667%}.ant-col-offset-4{margin-left:16.66666667%}.ant-col-order-4{order:4}.ant-col-3{display:block;flex:0 0 12.5%;max-width:12.5%}.ant-col-push-3{left:12.5%}.ant-col-pull-3{right:12.5%}.ant-col-offset-3{margin-left:12.5%}.ant-col-order-3{order:3}.ant-col-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.ant-col-push-2{left:8.33333333%}.ant-col-pull-2{right:8.33333333%}.ant-col-offset-2{margin-left:8.33333333%}.ant-col-order-2{order:2}.ant-col-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.ant-col-push-1{left:4.16666667%}.ant-col-pull-1{right:4.16666667%}.ant-col-offset-1{margin-left:4.16666667%}.ant-col-order-1{order:1}.ant-col-0{display:none}.ant-col-offset-0{margin-left:0}.ant-col-order-0{order:0}.ant-col-offset-0.ant-col-rtl{margin-right:0}.ant-col-push-1.ant-col-rtl{right:4.16666667%;left:auto}.ant-col-pull-1.ant-col-rtl{right:auto;left:4.16666667%}.ant-col-offset-1.ant-col-rtl{margin-right:4.16666667%;margin-left:0}.ant-col-push-2.ant-col-rtl{right:8.33333333%;left:auto}.ant-col-pull-2.ant-col-rtl{right:auto;left:8.33333333%}.ant-col-offset-2.ant-col-rtl{margin-right:8.33333333%;margin-left:0}.ant-col-push-3.ant-col-rtl{right:12.5%;left:auto}.ant-col-pull-3.ant-col-rtl{right:auto;left:12.5%}.ant-col-offset-3.ant-col-rtl{margin-right:12.5%;margin-left:0}.ant-col-push-4.ant-col-rtl{right:16.66666667%;left:auto}.ant-col-pull-4.ant-col-rtl{right:auto;left:16.66666667%}.ant-col-offset-4.ant-col-rtl{margin-right:16.66666667%;margin-left:0}.ant-col-push-5.ant-col-rtl{right:20.83333333%;left:auto}.ant-col-pull-5.ant-col-rtl{right:auto;left:20.83333333%}.ant-col-offset-5.ant-col-rtl{margin-right:20.83333333%;margin-left:0}.ant-col-push-6.ant-col-rtl{right:25%;left:auto}.ant-col-pull-6.ant-col-rtl{right:auto;left:25%}.ant-col-offset-6.ant-col-rtl{margin-right:25%;margin-left:0}.ant-col-push-7.ant-col-rtl{right:29.16666667%;left:auto}.ant-col-pull-7.ant-col-rtl{right:auto;left:29.16666667%}.ant-col-offset-7.ant-col-rtl{margin-right:29.16666667%;margin-left:0}.ant-col-push-8.ant-col-rtl{right:33.33333333%;left:auto}.ant-col-pull-8.ant-col-rtl{right:auto;left:33.33333333%}.ant-col-offset-8.ant-col-rtl{margin-right:33.33333333%;margin-left:0}.ant-col-push-9.ant-col-rtl{right:37.5%;left:auto}.ant-col-pull-9.ant-col-rtl{right:auto;left:37.5%}.ant-col-offset-9.ant-col-rtl{margin-right:37.5%;margin-left:0}.ant-col-push-10.ant-col-rtl{right:41.66666667%;left:auto}.ant-col-pull-10.ant-col-rtl{right:auto;left:41.66666667%}.ant-col-offset-10.ant-col-rtl{margin-right:41.66666667%;margin-left:0}.ant-col-push-11.ant-col-rtl{right:45.83333333%;left:auto}.ant-col-pull-11.ant-col-rtl{right:auto;left:45.83333333%}.ant-col-offset-11.ant-col-rtl{margin-right:45.83333333%;margin-left:0}.ant-col-push-12.ant-col-rtl{right:50%;left:auto}.ant-col-pull-12.ant-col-rtl{right:auto;left:50%}.ant-col-offset-12.ant-col-rtl{margin-right:50%;margin-left:0}.ant-col-push-13.ant-col-rtl{right:54.16666667%;left:auto}.ant-col-pull-13.ant-col-rtl{right:auto;left:54.16666667%}.ant-col-offset-13.ant-col-rtl{margin-right:54.16666667%;margin-left:0}.ant-col-push-14.ant-col-rtl{right:58.33333333%;left:auto}.ant-col-pull-14.ant-col-rtl{right:auto;left:58.33333333%}.ant-col-offset-14.ant-col-rtl{margin-right:58.33333333%;margin-left:0}.ant-col-push-15.ant-col-rtl{right:62.5%;left:auto}.ant-col-pull-15.ant-col-rtl{right:auto;left:62.5%}.ant-col-offset-15.ant-col-rtl{margin-right:62.5%;margin-left:0}.ant-col-push-16.ant-col-rtl{right:66.66666667%;left:auto}.ant-col-pull-16.ant-col-rtl{right:auto;left:66.66666667%}.ant-col-offset-16.ant-col-rtl{margin-right:66.66666667%;margin-left:0}.ant-col-push-17.ant-col-rtl{right:70.83333333%;left:auto}.ant-col-pull-17.ant-col-rtl{right:auto;left:70.83333333%}.ant-col-offset-17.ant-col-rtl{margin-right:70.83333333%;margin-left:0}.ant-col-push-18.ant-col-rtl{right:75%;left:auto}.ant-col-pull-18.ant-col-rtl{right:auto;left:75%}.ant-col-offset-18.ant-col-rtl{margin-right:75%;margin-left:0}.ant-col-push-19.ant-col-rtl{right:79.16666667%;left:auto}.ant-col-pull-19.ant-col-rtl{right:auto;left:79.16666667%}.ant-col-offset-19.ant-col-rtl{margin-right:79.16666667%;margin-left:0}.ant-col-push-20.ant-col-rtl{right:83.33333333%;left:auto}.ant-col-pull-20.ant-col-rtl{right:auto;left:83.33333333%}.ant-col-offset-20.ant-col-rtl{margin-right:83.33333333%;margin-left:0}.ant-col-push-21.ant-col-rtl{right:87.5%;left:auto}.ant-col-pull-21.ant-col-rtl{right:auto;left:87.5%}.ant-col-offset-21.ant-col-rtl{margin-right:87.5%;margin-left:0}.ant-col-push-22.ant-col-rtl{right:91.66666667%;left:auto}.ant-col-pull-22.ant-col-rtl{right:auto;left:91.66666667%}.ant-col-offset-22.ant-col-rtl{margin-right:91.66666667%;margin-left:0}.ant-col-push-23.ant-col-rtl{right:95.83333333%;left:auto}.ant-col-pull-23.ant-col-rtl{right:auto;left:95.83333333%}.ant-col-offset-23.ant-col-rtl{margin-right:95.83333333%;margin-left:0}.ant-col-push-24.ant-col-rtl{right:100%;left:auto}.ant-col-pull-24.ant-col-rtl{right:auto;left:100%}.ant-col-offset-24.ant-col-rtl{margin-right:100%;margin-left:0}.ant-col-xs-24{display:block;flex:0 0 100%;max-width:100%}.ant-col-xs-push-24{left:100%}.ant-col-xs-pull-24{right:100%}.ant-col-xs-offset-24{margin-left:100%}.ant-col-xs-order-24{order:24}.ant-col-xs-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.ant-col-xs-push-23{left:95.83333333%}.ant-col-xs-pull-23{right:95.83333333%}.ant-col-xs-offset-23{margin-left:95.83333333%}.ant-col-xs-order-23{order:23}.ant-col-xs-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.ant-col-xs-push-22{left:91.66666667%}.ant-col-xs-pull-22{right:91.66666667%}.ant-col-xs-offset-22{margin-left:91.66666667%}.ant-col-xs-order-22{order:22}.ant-col-xs-21{display:block;flex:0 0 87.5%;max-width:87.5%}.ant-col-xs-push-21{left:87.5%}.ant-col-xs-pull-21{right:87.5%}.ant-col-xs-offset-21{margin-left:87.5%}.ant-col-xs-order-21{order:21}.ant-col-xs-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.ant-col-xs-push-20{left:83.33333333%}.ant-col-xs-pull-20{right:83.33333333%}.ant-col-xs-offset-20{margin-left:83.33333333%}.ant-col-xs-order-20{order:20}.ant-col-xs-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.ant-col-xs-push-19{left:79.16666667%}.ant-col-xs-pull-19{right:79.16666667%}.ant-col-xs-offset-19{margin-left:79.16666667%}.ant-col-xs-order-19{order:19}.ant-col-xs-18{display:block;flex:0 0 75%;max-width:75%}.ant-col-xs-push-18{left:75%}.ant-col-xs-pull-18{right:75%}.ant-col-xs-offset-18{margin-left:75%}.ant-col-xs-order-18{order:18}.ant-col-xs-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.ant-col-xs-push-17{left:70.83333333%}.ant-col-xs-pull-17{right:70.83333333%}.ant-col-xs-offset-17{margin-left:70.83333333%}.ant-col-xs-order-17{order:17}.ant-col-xs-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.ant-col-xs-push-16{left:66.66666667%}.ant-col-xs-pull-16{right:66.66666667%}.ant-col-xs-offset-16{margin-left:66.66666667%}.ant-col-xs-order-16{order:16}.ant-col-xs-15{display:block;flex:0 0 62.5%;max-width:62.5%}.ant-col-xs-push-15{left:62.5%}.ant-col-xs-pull-15{right:62.5%}.ant-col-xs-offset-15{margin-left:62.5%}.ant-col-xs-order-15{order:15}.ant-col-xs-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.ant-col-xs-push-14{left:58.33333333%}.ant-col-xs-pull-14{right:58.33333333%}.ant-col-xs-offset-14{margin-left:58.33333333%}.ant-col-xs-order-14{order:14}.ant-col-xs-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.ant-col-xs-push-13{left:54.16666667%}.ant-col-xs-pull-13{right:54.16666667%}.ant-col-xs-offset-13{margin-left:54.16666667%}.ant-col-xs-order-13{order:13}.ant-col-xs-12{display:block;flex:0 0 50%;max-width:50%}.ant-col-xs-push-12{left:50%}.ant-col-xs-pull-12{right:50%}.ant-col-xs-offset-12{margin-left:50%}.ant-col-xs-order-12{order:12}.ant-col-xs-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.ant-col-xs-push-11{left:45.83333333%}.ant-col-xs-pull-11{right:45.83333333%}.ant-col-xs-offset-11{margin-left:45.83333333%}.ant-col-xs-order-11{order:11}.ant-col-xs-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.ant-col-xs-push-10{left:41.66666667%}.ant-col-xs-pull-10{right:41.66666667%}.ant-col-xs-offset-10{margin-left:41.66666667%}.ant-col-xs-order-10{order:10}.ant-col-xs-9{display:block;flex:0 0 37.5%;max-width:37.5%}.ant-col-xs-push-9{left:37.5%}.ant-col-xs-pull-9{right:37.5%}.ant-col-xs-offset-9{margin-left:37.5%}.ant-col-xs-order-9{order:9}.ant-col-xs-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.ant-col-xs-push-8{left:33.33333333%}.ant-col-xs-pull-8{right:33.33333333%}.ant-col-xs-offset-8{margin-left:33.33333333%}.ant-col-xs-order-8{order:8}.ant-col-xs-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.ant-col-xs-push-7{left:29.16666667%}.ant-col-xs-pull-7{right:29.16666667%}.ant-col-xs-offset-7{margin-left:29.16666667%}.ant-col-xs-order-7{order:7}.ant-col-xs-6{display:block;flex:0 0 25%;max-width:25%}.ant-col-xs-push-6{left:25%}.ant-col-xs-pull-6{right:25%}.ant-col-xs-offset-6{margin-left:25%}.ant-col-xs-order-6{order:6}.ant-col-xs-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.ant-col-xs-push-5{left:20.83333333%}.ant-col-xs-pull-5{right:20.83333333%}.ant-col-xs-offset-5{margin-left:20.83333333%}.ant-col-xs-order-5{order:5}.ant-col-xs-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.ant-col-xs-push-4{left:16.66666667%}.ant-col-xs-pull-4{right:16.66666667%}.ant-col-xs-offset-4{margin-left:16.66666667%}.ant-col-xs-order-4{order:4}.ant-col-xs-3{display:block;flex:0 0 12.5%;max-width:12.5%}.ant-col-xs-push-3{left:12.5%}.ant-col-xs-pull-3{right:12.5%}.ant-col-xs-offset-3{margin-left:12.5%}.ant-col-xs-order-3{order:3}.ant-col-xs-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.ant-col-xs-push-2{left:8.33333333%}.ant-col-xs-pull-2{right:8.33333333%}.ant-col-xs-offset-2{margin-left:8.33333333%}.ant-col-xs-order-2{order:2}.ant-col-xs-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.ant-col-xs-push-1{left:4.16666667%}.ant-col-xs-pull-1{right:4.16666667%}.ant-col-xs-offset-1{margin-left:4.16666667%}.ant-col-xs-order-1{order:1}.ant-col-xs-0{display:none}.ant-col-push-0{left:auto}.ant-col-pull-0{right:auto}.ant-col-xs-push-0{left:auto}.ant-col-xs-pull-0{right:auto}.ant-col-xs-offset-0{margin-left:0}.ant-col-xs-order-0{order:0}.ant-col-push-0.ant-col-rtl{right:auto}.ant-col-pull-0.ant-col-rtl{left:auto}.ant-col-xs-push-0.ant-col-rtl{right:auto}.ant-col-xs-pull-0.ant-col-rtl{left:auto}.ant-col-xs-offset-0.ant-col-rtl{margin-right:0}.ant-col-xs-push-1.ant-col-rtl{right:4.16666667%;left:auto}.ant-col-xs-pull-1.ant-col-rtl{right:auto;left:4.16666667%}.ant-col-xs-offset-1.ant-col-rtl{margin-right:4.16666667%;margin-left:0}.ant-col-xs-push-2.ant-col-rtl{right:8.33333333%;left:auto}.ant-col-xs-pull-2.ant-col-rtl{right:auto;left:8.33333333%}.ant-col-xs-offset-2.ant-col-rtl{margin-right:8.33333333%;margin-left:0}.ant-col-xs-push-3.ant-col-rtl{right:12.5%;left:auto}.ant-col-xs-pull-3.ant-col-rtl{right:auto;left:12.5%}.ant-col-xs-offset-3.ant-col-rtl{margin-right:12.5%;margin-left:0}.ant-col-xs-push-4.ant-col-rtl{right:16.66666667%;left:auto}.ant-col-xs-pull-4.ant-col-rtl{right:auto;left:16.66666667%}.ant-col-xs-offset-4.ant-col-rtl{margin-right:16.66666667%;margin-left:0}.ant-col-xs-push-5.ant-col-rtl{right:20.83333333%;left:auto}.ant-col-xs-pull-5.ant-col-rtl{right:auto;left:20.83333333%}.ant-col-xs-offset-5.ant-col-rtl{margin-right:20.83333333%;margin-left:0}.ant-col-xs-push-6.ant-col-rtl{right:25%;left:auto}.ant-col-xs-pull-6.ant-col-rtl{right:auto;left:25%}.ant-col-xs-offset-6.ant-col-rtl{margin-right:25%;margin-left:0}.ant-col-xs-push-7.ant-col-rtl{right:29.16666667%;left:auto}.ant-col-xs-pull-7.ant-col-rtl{right:auto;left:29.16666667%}.ant-col-xs-offset-7.ant-col-rtl{margin-right:29.16666667%;margin-left:0}.ant-col-xs-push-8.ant-col-rtl{right:33.33333333%;left:auto}.ant-col-xs-pull-8.ant-col-rtl{right:auto;left:33.33333333%}.ant-col-xs-offset-8.ant-col-rtl{margin-right:33.33333333%;margin-left:0}.ant-col-xs-push-9.ant-col-rtl{right:37.5%;left:auto}.ant-col-xs-pull-9.ant-col-rtl{right:auto;left:37.5%}.ant-col-xs-offset-9.ant-col-rtl{margin-right:37.5%;margin-left:0}.ant-col-xs-push-10.ant-col-rtl{right:41.66666667%;left:auto}.ant-col-xs-pull-10.ant-col-rtl{right:auto;left:41.66666667%}.ant-col-xs-offset-10.ant-col-rtl{margin-right:41.66666667%;margin-left:0}.ant-col-xs-push-11.ant-col-rtl{right:45.83333333%;left:auto}.ant-col-xs-pull-11.ant-col-rtl{right:auto;left:45.83333333%}.ant-col-xs-offset-11.ant-col-rtl{margin-right:45.83333333%;margin-left:0}.ant-col-xs-push-12.ant-col-rtl{right:50%;left:auto}.ant-col-xs-pull-12.ant-col-rtl{right:auto;left:50%}.ant-col-xs-offset-12.ant-col-rtl{margin-right:50%;margin-left:0}.ant-col-xs-push-13.ant-col-rtl{right:54.16666667%;left:auto}.ant-col-xs-pull-13.ant-col-rtl{right:auto;left:54.16666667%}.ant-col-xs-offset-13.ant-col-rtl{margin-right:54.16666667%;margin-left:0}.ant-col-xs-push-14.ant-col-rtl{right:58.33333333%;left:auto}.ant-col-xs-pull-14.ant-col-rtl{right:auto;left:58.33333333%}.ant-col-xs-offset-14.ant-col-rtl{margin-right:58.33333333%;margin-left:0}.ant-col-xs-push-15.ant-col-rtl{right:62.5%;left:auto}.ant-col-xs-pull-15.ant-col-rtl{right:auto;left:62.5%}.ant-col-xs-offset-15.ant-col-rtl{margin-right:62.5%;margin-left:0}.ant-col-xs-push-16.ant-col-rtl{right:66.66666667%;left:auto}.ant-col-xs-pull-16.ant-col-rtl{right:auto;left:66.66666667%}.ant-col-xs-offset-16.ant-col-rtl{margin-right:66.66666667%;margin-left:0}.ant-col-xs-push-17.ant-col-rtl{right:70.83333333%;left:auto}.ant-col-xs-pull-17.ant-col-rtl{right:auto;left:70.83333333%}.ant-col-xs-offset-17.ant-col-rtl{margin-right:70.83333333%;margin-left:0}.ant-col-xs-push-18.ant-col-rtl{right:75%;left:auto}.ant-col-xs-pull-18.ant-col-rtl{right:auto;left:75%}.ant-col-xs-offset-18.ant-col-rtl{margin-right:75%;margin-left:0}.ant-col-xs-push-19.ant-col-rtl{right:79.16666667%;left:auto}.ant-col-xs-pull-19.ant-col-rtl{right:auto;left:79.16666667%}.ant-col-xs-offset-19.ant-col-rtl{margin-right:79.16666667%;margin-left:0}.ant-col-xs-push-20.ant-col-rtl{right:83.33333333%;left:auto}.ant-col-xs-pull-20.ant-col-rtl{right:auto;left:83.33333333%}.ant-col-xs-offset-20.ant-col-rtl{margin-right:83.33333333%;margin-left:0}.ant-col-xs-push-21.ant-col-rtl{right:87.5%;left:auto}.ant-col-xs-pull-21.ant-col-rtl{right:auto;left:87.5%}.ant-col-xs-offset-21.ant-col-rtl{margin-right:87.5%;margin-left:0}.ant-col-xs-push-22.ant-col-rtl{right:91.66666667%;left:auto}.ant-col-xs-pull-22.ant-col-rtl{right:auto;left:91.66666667%}.ant-col-xs-offset-22.ant-col-rtl{margin-right:91.66666667%;margin-left:0}.ant-col-xs-push-23.ant-col-rtl{right:95.83333333%;left:auto}.ant-col-xs-pull-23.ant-col-rtl{right:auto;left:95.83333333%}.ant-col-xs-offset-23.ant-col-rtl{margin-right:95.83333333%;margin-left:0}.ant-col-xs-push-24.ant-col-rtl{right:100%;left:auto}.ant-col-xs-pull-24.ant-col-rtl{right:auto;left:100%}.ant-col-xs-offset-24.ant-col-rtl{margin-right:100%;margin-left:0}@media (min-width: 576px){.ant-col-sm-24{display:block;flex:0 0 100%;max-width:100%}.ant-col-sm-push-24{left:100%}.ant-col-sm-pull-24{right:100%}.ant-col-sm-offset-24{margin-left:100%}.ant-col-sm-order-24{order:24}.ant-col-sm-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.ant-col-sm-push-23{left:95.83333333%}.ant-col-sm-pull-23{right:95.83333333%}.ant-col-sm-offset-23{margin-left:95.83333333%}.ant-col-sm-order-23{order:23}.ant-col-sm-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.ant-col-sm-push-22{left:91.66666667%}.ant-col-sm-pull-22{right:91.66666667%}.ant-col-sm-offset-22{margin-left:91.66666667%}.ant-col-sm-order-22{order:22}.ant-col-sm-21{display:block;flex:0 0 87.5%;max-width:87.5%}.ant-col-sm-push-21{left:87.5%}.ant-col-sm-pull-21{right:87.5%}.ant-col-sm-offset-21{margin-left:87.5%}.ant-col-sm-order-21{order:21}.ant-col-sm-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.ant-col-sm-push-20{left:83.33333333%}.ant-col-sm-pull-20{right:83.33333333%}.ant-col-sm-offset-20{margin-left:83.33333333%}.ant-col-sm-order-20{order:20}.ant-col-sm-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.ant-col-sm-push-19{left:79.16666667%}.ant-col-sm-pull-19{right:79.16666667%}.ant-col-sm-offset-19{margin-left:79.16666667%}.ant-col-sm-order-19{order:19}.ant-col-sm-18{display:block;flex:0 0 75%;max-width:75%}.ant-col-sm-push-18{left:75%}.ant-col-sm-pull-18{right:75%}.ant-col-sm-offset-18{margin-left:75%}.ant-col-sm-order-18{order:18}.ant-col-sm-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.ant-col-sm-push-17{left:70.83333333%}.ant-col-sm-pull-17{right:70.83333333%}.ant-col-sm-offset-17{margin-left:70.83333333%}.ant-col-sm-order-17{order:17}.ant-col-sm-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.ant-col-sm-push-16{left:66.66666667%}.ant-col-sm-pull-16{right:66.66666667%}.ant-col-sm-offset-16{margin-left:66.66666667%}.ant-col-sm-order-16{order:16}.ant-col-sm-15{display:block;flex:0 0 62.5%;max-width:62.5%}.ant-col-sm-push-15{left:62.5%}.ant-col-sm-pull-15{right:62.5%}.ant-col-sm-offset-15{margin-left:62.5%}.ant-col-sm-order-15{order:15}.ant-col-sm-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.ant-col-sm-push-14{left:58.33333333%}.ant-col-sm-pull-14{right:58.33333333%}.ant-col-sm-offset-14{margin-left:58.33333333%}.ant-col-sm-order-14{order:14}.ant-col-sm-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.ant-col-sm-push-13{left:54.16666667%}.ant-col-sm-pull-13{right:54.16666667%}.ant-col-sm-offset-13{margin-left:54.16666667%}.ant-col-sm-order-13{order:13}.ant-col-sm-12{display:block;flex:0 0 50%;max-width:50%}.ant-col-sm-push-12{left:50%}.ant-col-sm-pull-12{right:50%}.ant-col-sm-offset-12{margin-left:50%}.ant-col-sm-order-12{order:12}.ant-col-sm-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.ant-col-sm-push-11{left:45.83333333%}.ant-col-sm-pull-11{right:45.83333333%}.ant-col-sm-offset-11{margin-left:45.83333333%}.ant-col-sm-order-11{order:11}.ant-col-sm-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.ant-col-sm-push-10{left:41.66666667%}.ant-col-sm-pull-10{right:41.66666667%}.ant-col-sm-offset-10{margin-left:41.66666667%}.ant-col-sm-order-10{order:10}.ant-col-sm-9{display:block;flex:0 0 37.5%;max-width:37.5%}.ant-col-sm-push-9{left:37.5%}.ant-col-sm-pull-9{right:37.5%}.ant-col-sm-offset-9{margin-left:37.5%}.ant-col-sm-order-9{order:9}.ant-col-sm-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.ant-col-sm-push-8{left:33.33333333%}.ant-col-sm-pull-8{right:33.33333333%}.ant-col-sm-offset-8{margin-left:33.33333333%}.ant-col-sm-order-8{order:8}.ant-col-sm-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.ant-col-sm-push-7{left:29.16666667%}.ant-col-sm-pull-7{right:29.16666667%}.ant-col-sm-offset-7{margin-left:29.16666667%}.ant-col-sm-order-7{order:7}.ant-col-sm-6{display:block;flex:0 0 25%;max-width:25%}.ant-col-sm-push-6{left:25%}.ant-col-sm-pull-6{right:25%}.ant-col-sm-offset-6{margin-left:25%}.ant-col-sm-order-6{order:6}.ant-col-sm-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.ant-col-sm-push-5{left:20.83333333%}.ant-col-sm-pull-5{right:20.83333333%}.ant-col-sm-offset-5{margin-left:20.83333333%}.ant-col-sm-order-5{order:5}.ant-col-sm-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.ant-col-sm-push-4{left:16.66666667%}.ant-col-sm-pull-4{right:16.66666667%}.ant-col-sm-offset-4{margin-left:16.66666667%}.ant-col-sm-order-4{order:4}.ant-col-sm-3{display:block;flex:0 0 12.5%;max-width:12.5%}.ant-col-sm-push-3{left:12.5%}.ant-col-sm-pull-3{right:12.5%}.ant-col-sm-offset-3{margin-left:12.5%}.ant-col-sm-order-3{order:3}.ant-col-sm-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.ant-col-sm-push-2{left:8.33333333%}.ant-col-sm-pull-2{right:8.33333333%}.ant-col-sm-offset-2{margin-left:8.33333333%}.ant-col-sm-order-2{order:2}.ant-col-sm-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.ant-col-sm-push-1{left:4.16666667%}.ant-col-sm-pull-1{right:4.16666667%}.ant-col-sm-offset-1{margin-left:4.16666667%}.ant-col-sm-order-1{order:1}.ant-col-sm-0{display:none}.ant-col-push-0{left:auto}.ant-col-pull-0{right:auto}.ant-col-sm-push-0{left:auto}.ant-col-sm-pull-0{right:auto}.ant-col-sm-offset-0{margin-left:0}.ant-col-sm-order-0{order:0}.ant-col-push-0.ant-col-rtl{right:auto}.ant-col-pull-0.ant-col-rtl{left:auto}.ant-col-sm-push-0.ant-col-rtl{right:auto}.ant-col-sm-pull-0.ant-col-rtl{left:auto}.ant-col-sm-offset-0.ant-col-rtl{margin-right:0}.ant-col-sm-push-1.ant-col-rtl{right:4.16666667%;left:auto}.ant-col-sm-pull-1.ant-col-rtl{right:auto;left:4.16666667%}.ant-col-sm-offset-1.ant-col-rtl{margin-right:4.16666667%;margin-left:0}.ant-col-sm-push-2.ant-col-rtl{right:8.33333333%;left:auto}.ant-col-sm-pull-2.ant-col-rtl{right:auto;left:8.33333333%}.ant-col-sm-offset-2.ant-col-rtl{margin-right:8.33333333%;margin-left:0}.ant-col-sm-push-3.ant-col-rtl{right:12.5%;left:auto}.ant-col-sm-pull-3.ant-col-rtl{right:auto;left:12.5%}.ant-col-sm-offset-3.ant-col-rtl{margin-right:12.5%;margin-left:0}.ant-col-sm-push-4.ant-col-rtl{right:16.66666667%;left:auto}.ant-col-sm-pull-4.ant-col-rtl{right:auto;left:16.66666667%}.ant-col-sm-offset-4.ant-col-rtl{margin-right:16.66666667%;margin-left:0}.ant-col-sm-push-5.ant-col-rtl{right:20.83333333%;left:auto}.ant-col-sm-pull-5.ant-col-rtl{right:auto;left:20.83333333%}.ant-col-sm-offset-5.ant-col-rtl{margin-right:20.83333333%;margin-left:0}.ant-col-sm-push-6.ant-col-rtl{right:25%;left:auto}.ant-col-sm-pull-6.ant-col-rtl{right:auto;left:25%}.ant-col-sm-offset-6.ant-col-rtl{margin-right:25%;margin-left:0}.ant-col-sm-push-7.ant-col-rtl{right:29.16666667%;left:auto}.ant-col-sm-pull-7.ant-col-rtl{right:auto;left:29.16666667%}.ant-col-sm-offset-7.ant-col-rtl{margin-right:29.16666667%;margin-left:0}.ant-col-sm-push-8.ant-col-rtl{right:33.33333333%;left:auto}.ant-col-sm-pull-8.ant-col-rtl{right:auto;left:33.33333333%}.ant-col-sm-offset-8.ant-col-rtl{margin-right:33.33333333%;margin-left:0}.ant-col-sm-push-9.ant-col-rtl{right:37.5%;left:auto}.ant-col-sm-pull-9.ant-col-rtl{right:auto;left:37.5%}.ant-col-sm-offset-9.ant-col-rtl{margin-right:37.5%;margin-left:0}.ant-col-sm-push-10.ant-col-rtl{right:41.66666667%;left:auto}.ant-col-sm-pull-10.ant-col-rtl{right:auto;left:41.66666667%}.ant-col-sm-offset-10.ant-col-rtl{margin-right:41.66666667%;margin-left:0}.ant-col-sm-push-11.ant-col-rtl{right:45.83333333%;left:auto}.ant-col-sm-pull-11.ant-col-rtl{right:auto;left:45.83333333%}.ant-col-sm-offset-11.ant-col-rtl{margin-right:45.83333333%;margin-left:0}.ant-col-sm-push-12.ant-col-rtl{right:50%;left:auto}.ant-col-sm-pull-12.ant-col-rtl{right:auto;left:50%}.ant-col-sm-offset-12.ant-col-rtl{margin-right:50%;margin-left:0}.ant-col-sm-push-13.ant-col-rtl{right:54.16666667%;left:auto}.ant-col-sm-pull-13.ant-col-rtl{right:auto;left:54.16666667%}.ant-col-sm-offset-13.ant-col-rtl{margin-right:54.16666667%;margin-left:0}.ant-col-sm-push-14.ant-col-rtl{right:58.33333333%;left:auto}.ant-col-sm-pull-14.ant-col-rtl{right:auto;left:58.33333333%}.ant-col-sm-offset-14.ant-col-rtl{margin-right:58.33333333%;margin-left:0}.ant-col-sm-push-15.ant-col-rtl{right:62.5%;left:auto}.ant-col-sm-pull-15.ant-col-rtl{right:auto;left:62.5%}.ant-col-sm-offset-15.ant-col-rtl{margin-right:62.5%;margin-left:0}.ant-col-sm-push-16.ant-col-rtl{right:66.66666667%;left:auto}.ant-col-sm-pull-16.ant-col-rtl{right:auto;left:66.66666667%}.ant-col-sm-offset-16.ant-col-rtl{margin-right:66.66666667%;margin-left:0}.ant-col-sm-push-17.ant-col-rtl{right:70.83333333%;left:auto}.ant-col-sm-pull-17.ant-col-rtl{right:auto;left:70.83333333%}.ant-col-sm-offset-17.ant-col-rtl{margin-right:70.83333333%;margin-left:0}.ant-col-sm-push-18.ant-col-rtl{right:75%;left:auto}.ant-col-sm-pull-18.ant-col-rtl{right:auto;left:75%}.ant-col-sm-offset-18.ant-col-rtl{margin-right:75%;margin-left:0}.ant-col-sm-push-19.ant-col-rtl{right:79.16666667%;left:auto}.ant-col-sm-pull-19.ant-col-rtl{right:auto;left:79.16666667%}.ant-col-sm-offset-19.ant-col-rtl{margin-right:79.16666667%;margin-left:0}.ant-col-sm-push-20.ant-col-rtl{right:83.33333333%;left:auto}.ant-col-sm-pull-20.ant-col-rtl{right:auto;left:83.33333333%}.ant-col-sm-offset-20.ant-col-rtl{margin-right:83.33333333%;margin-left:0}.ant-col-sm-push-21.ant-col-rtl{right:87.5%;left:auto}.ant-col-sm-pull-21.ant-col-rtl{right:auto;left:87.5%}.ant-col-sm-offset-21.ant-col-rtl{margin-right:87.5%;margin-left:0}.ant-col-sm-push-22.ant-col-rtl{right:91.66666667%;left:auto}.ant-col-sm-pull-22.ant-col-rtl{right:auto;left:91.66666667%}.ant-col-sm-offset-22.ant-col-rtl{margin-right:91.66666667%;margin-left:0}.ant-col-sm-push-23.ant-col-rtl{right:95.83333333%;left:auto}.ant-col-sm-pull-23.ant-col-rtl{right:auto;left:95.83333333%}.ant-col-sm-offset-23.ant-col-rtl{margin-right:95.83333333%;margin-left:0}.ant-col-sm-push-24.ant-col-rtl{right:100%;left:auto}.ant-col-sm-pull-24.ant-col-rtl{right:auto;left:100%}.ant-col-sm-offset-24.ant-col-rtl{margin-right:100%;margin-left:0}}@media (min-width: 768px){.ant-col-md-24{display:block;flex:0 0 100%;max-width:100%}.ant-col-md-push-24{left:100%}.ant-col-md-pull-24{right:100%}.ant-col-md-offset-24{margin-left:100%}.ant-col-md-order-24{order:24}.ant-col-md-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.ant-col-md-push-23{left:95.83333333%}.ant-col-md-pull-23{right:95.83333333%}.ant-col-md-offset-23{margin-left:95.83333333%}.ant-col-md-order-23{order:23}.ant-col-md-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.ant-col-md-push-22{left:91.66666667%}.ant-col-md-pull-22{right:91.66666667%}.ant-col-md-offset-22{margin-left:91.66666667%}.ant-col-md-order-22{order:22}.ant-col-md-21{display:block;flex:0 0 87.5%;max-width:87.5%}.ant-col-md-push-21{left:87.5%}.ant-col-md-pull-21{right:87.5%}.ant-col-md-offset-21{margin-left:87.5%}.ant-col-md-order-21{order:21}.ant-col-md-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.ant-col-md-push-20{left:83.33333333%}.ant-col-md-pull-20{right:83.33333333%}.ant-col-md-offset-20{margin-left:83.33333333%}.ant-col-md-order-20{order:20}.ant-col-md-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.ant-col-md-push-19{left:79.16666667%}.ant-col-md-pull-19{right:79.16666667%}.ant-col-md-offset-19{margin-left:79.16666667%}.ant-col-md-order-19{order:19}.ant-col-md-18{display:block;flex:0 0 75%;max-width:75%}.ant-col-md-push-18{left:75%}.ant-col-md-pull-18{right:75%}.ant-col-md-offset-18{margin-left:75%}.ant-col-md-order-18{order:18}.ant-col-md-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.ant-col-md-push-17{left:70.83333333%}.ant-col-md-pull-17{right:70.83333333%}.ant-col-md-offset-17{margin-left:70.83333333%}.ant-col-md-order-17{order:17}.ant-col-md-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.ant-col-md-push-16{left:66.66666667%}.ant-col-md-pull-16{right:66.66666667%}.ant-col-md-offset-16{margin-left:66.66666667%}.ant-col-md-order-16{order:16}.ant-col-md-15{display:block;flex:0 0 62.5%;max-width:62.5%}.ant-col-md-push-15{left:62.5%}.ant-col-md-pull-15{right:62.5%}.ant-col-md-offset-15{margin-left:62.5%}.ant-col-md-order-15{order:15}.ant-col-md-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.ant-col-md-push-14{left:58.33333333%}.ant-col-md-pull-14{right:58.33333333%}.ant-col-md-offset-14{margin-left:58.33333333%}.ant-col-md-order-14{order:14}.ant-col-md-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.ant-col-md-push-13{left:54.16666667%}.ant-col-md-pull-13{right:54.16666667%}.ant-col-md-offset-13{margin-left:54.16666667%}.ant-col-md-order-13{order:13}.ant-col-md-12{display:block;flex:0 0 50%;max-width:50%}.ant-col-md-push-12{left:50%}.ant-col-md-pull-12{right:50%}.ant-col-md-offset-12{margin-left:50%}.ant-col-md-order-12{order:12}.ant-col-md-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.ant-col-md-push-11{left:45.83333333%}.ant-col-md-pull-11{right:45.83333333%}.ant-col-md-offset-11{margin-left:45.83333333%}.ant-col-md-order-11{order:11}.ant-col-md-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.ant-col-md-push-10{left:41.66666667%}.ant-col-md-pull-10{right:41.66666667%}.ant-col-md-offset-10{margin-left:41.66666667%}.ant-col-md-order-10{order:10}.ant-col-md-9{display:block;flex:0 0 37.5%;max-width:37.5%}.ant-col-md-push-9{left:37.5%}.ant-col-md-pull-9{right:37.5%}.ant-col-md-offset-9{margin-left:37.5%}.ant-col-md-order-9{order:9}.ant-col-md-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.ant-col-md-push-8{left:33.33333333%}.ant-col-md-pull-8{right:33.33333333%}.ant-col-md-offset-8{margin-left:33.33333333%}.ant-col-md-order-8{order:8}.ant-col-md-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.ant-col-md-push-7{left:29.16666667%}.ant-col-md-pull-7{right:29.16666667%}.ant-col-md-offset-7{margin-left:29.16666667%}.ant-col-md-order-7{order:7}.ant-col-md-6{display:block;flex:0 0 25%;max-width:25%}.ant-col-md-push-6{left:25%}.ant-col-md-pull-6{right:25%}.ant-col-md-offset-6{margin-left:25%}.ant-col-md-order-6{order:6}.ant-col-md-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.ant-col-md-push-5{left:20.83333333%}.ant-col-md-pull-5{right:20.83333333%}.ant-col-md-offset-5{margin-left:20.83333333%}.ant-col-md-order-5{order:5}.ant-col-md-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.ant-col-md-push-4{left:16.66666667%}.ant-col-md-pull-4{right:16.66666667%}.ant-col-md-offset-4{margin-left:16.66666667%}.ant-col-md-order-4{order:4}.ant-col-md-3{display:block;flex:0 0 12.5%;max-width:12.5%}.ant-col-md-push-3{left:12.5%}.ant-col-md-pull-3{right:12.5%}.ant-col-md-offset-3{margin-left:12.5%}.ant-col-md-order-3{order:3}.ant-col-md-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.ant-col-md-push-2{left:8.33333333%}.ant-col-md-pull-2{right:8.33333333%}.ant-col-md-offset-2{margin-left:8.33333333%}.ant-col-md-order-2{order:2}.ant-col-md-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.ant-col-md-push-1{left:4.16666667%}.ant-col-md-pull-1{right:4.16666667%}.ant-col-md-offset-1{margin-left:4.16666667%}.ant-col-md-order-1{order:1}.ant-col-md-0{display:none}.ant-col-push-0{left:auto}.ant-col-pull-0{right:auto}.ant-col-md-push-0{left:auto}.ant-col-md-pull-0{right:auto}.ant-col-md-offset-0{margin-left:0}.ant-col-md-order-0{order:0}.ant-col-push-0.ant-col-rtl{right:auto}.ant-col-pull-0.ant-col-rtl{left:auto}.ant-col-md-push-0.ant-col-rtl{right:auto}.ant-col-md-pull-0.ant-col-rtl{left:auto}.ant-col-md-offset-0.ant-col-rtl{margin-right:0}.ant-col-md-push-1.ant-col-rtl{right:4.16666667%;left:auto}.ant-col-md-pull-1.ant-col-rtl{right:auto;left:4.16666667%}.ant-col-md-offset-1.ant-col-rtl{margin-right:4.16666667%;margin-left:0}.ant-col-md-push-2.ant-col-rtl{right:8.33333333%;left:auto}.ant-col-md-pull-2.ant-col-rtl{right:auto;left:8.33333333%}.ant-col-md-offset-2.ant-col-rtl{margin-right:8.33333333%;margin-left:0}.ant-col-md-push-3.ant-col-rtl{right:12.5%;left:auto}.ant-col-md-pull-3.ant-col-rtl{right:auto;left:12.5%}.ant-col-md-offset-3.ant-col-rtl{margin-right:12.5%;margin-left:0}.ant-col-md-push-4.ant-col-rtl{right:16.66666667%;left:auto}.ant-col-md-pull-4.ant-col-rtl{right:auto;left:16.66666667%}.ant-col-md-offset-4.ant-col-rtl{margin-right:16.66666667%;margin-left:0}.ant-col-md-push-5.ant-col-rtl{right:20.83333333%;left:auto}.ant-col-md-pull-5.ant-col-rtl{right:auto;left:20.83333333%}.ant-col-md-offset-5.ant-col-rtl{margin-right:20.83333333%;margin-left:0}.ant-col-md-push-6.ant-col-rtl{right:25%;left:auto}.ant-col-md-pull-6.ant-col-rtl{right:auto;left:25%}.ant-col-md-offset-6.ant-col-rtl{margin-right:25%;margin-left:0}.ant-col-md-push-7.ant-col-rtl{right:29.16666667%;left:auto}.ant-col-md-pull-7.ant-col-rtl{right:auto;left:29.16666667%}.ant-col-md-offset-7.ant-col-rtl{margin-right:29.16666667%;margin-left:0}.ant-col-md-push-8.ant-col-rtl{right:33.33333333%;left:auto}.ant-col-md-pull-8.ant-col-rtl{right:auto;left:33.33333333%}.ant-col-md-offset-8.ant-col-rtl{margin-right:33.33333333%;margin-left:0}.ant-col-md-push-9.ant-col-rtl{right:37.5%;left:auto}.ant-col-md-pull-9.ant-col-rtl{right:auto;left:37.5%}.ant-col-md-offset-9.ant-col-rtl{margin-right:37.5%;margin-left:0}.ant-col-md-push-10.ant-col-rtl{right:41.66666667%;left:auto}.ant-col-md-pull-10.ant-col-rtl{right:auto;left:41.66666667%}.ant-col-md-offset-10.ant-col-rtl{margin-right:41.66666667%;margin-left:0}.ant-col-md-push-11.ant-col-rtl{right:45.83333333%;left:auto}.ant-col-md-pull-11.ant-col-rtl{right:auto;left:45.83333333%}.ant-col-md-offset-11.ant-col-rtl{margin-right:45.83333333%;margin-left:0}.ant-col-md-push-12.ant-col-rtl{right:50%;left:auto}.ant-col-md-pull-12.ant-col-rtl{right:auto;left:50%}.ant-col-md-offset-12.ant-col-rtl{margin-right:50%;margin-left:0}.ant-col-md-push-13.ant-col-rtl{right:54.16666667%;left:auto}.ant-col-md-pull-13.ant-col-rtl{right:auto;left:54.16666667%}.ant-col-md-offset-13.ant-col-rtl{margin-right:54.16666667%;margin-left:0}.ant-col-md-push-14.ant-col-rtl{right:58.33333333%;left:auto}.ant-col-md-pull-14.ant-col-rtl{right:auto;left:58.33333333%}.ant-col-md-offset-14.ant-col-rtl{margin-right:58.33333333%;margin-left:0}.ant-col-md-push-15.ant-col-rtl{right:62.5%;left:auto}.ant-col-md-pull-15.ant-col-rtl{right:auto;left:62.5%}.ant-col-md-offset-15.ant-col-rtl{margin-right:62.5%;margin-left:0}.ant-col-md-push-16.ant-col-rtl{right:66.66666667%;left:auto}.ant-col-md-pull-16.ant-col-rtl{right:auto;left:66.66666667%}.ant-col-md-offset-16.ant-col-rtl{margin-right:66.66666667%;margin-left:0}.ant-col-md-push-17.ant-col-rtl{right:70.83333333%;left:auto}.ant-col-md-pull-17.ant-col-rtl{right:auto;left:70.83333333%}.ant-col-md-offset-17.ant-col-rtl{margin-right:70.83333333%;margin-left:0}.ant-col-md-push-18.ant-col-rtl{right:75%;left:auto}.ant-col-md-pull-18.ant-col-rtl{right:auto;left:75%}.ant-col-md-offset-18.ant-col-rtl{margin-right:75%;margin-left:0}.ant-col-md-push-19.ant-col-rtl{right:79.16666667%;left:auto}.ant-col-md-pull-19.ant-col-rtl{right:auto;left:79.16666667%}.ant-col-md-offset-19.ant-col-rtl{margin-right:79.16666667%;margin-left:0}.ant-col-md-push-20.ant-col-rtl{right:83.33333333%;left:auto}.ant-col-md-pull-20.ant-col-rtl{right:auto;left:83.33333333%}.ant-col-md-offset-20.ant-col-rtl{margin-right:83.33333333%;margin-left:0}.ant-col-md-push-21.ant-col-rtl{right:87.5%;left:auto}.ant-col-md-pull-21.ant-col-rtl{right:auto;left:87.5%}.ant-col-md-offset-21.ant-col-rtl{margin-right:87.5%;margin-left:0}.ant-col-md-push-22.ant-col-rtl{right:91.66666667%;left:auto}.ant-col-md-pull-22.ant-col-rtl{right:auto;left:91.66666667%}.ant-col-md-offset-22.ant-col-rtl{margin-right:91.66666667%;margin-left:0}.ant-col-md-push-23.ant-col-rtl{right:95.83333333%;left:auto}.ant-col-md-pull-23.ant-col-rtl{right:auto;left:95.83333333%}.ant-col-md-offset-23.ant-col-rtl{margin-right:95.83333333%;margin-left:0}.ant-col-md-push-24.ant-col-rtl{right:100%;left:auto}.ant-col-md-pull-24.ant-col-rtl{right:auto;left:100%}.ant-col-md-offset-24.ant-col-rtl{margin-right:100%;margin-left:0}}@media (min-width: 992px){.ant-col-lg-24{display:block;flex:0 0 100%;max-width:100%}.ant-col-lg-push-24{left:100%}.ant-col-lg-pull-24{right:100%}.ant-col-lg-offset-24{margin-left:100%}.ant-col-lg-order-24{order:24}.ant-col-lg-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.ant-col-lg-push-23{left:95.83333333%}.ant-col-lg-pull-23{right:95.83333333%}.ant-col-lg-offset-23{margin-left:95.83333333%}.ant-col-lg-order-23{order:23}.ant-col-lg-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.ant-col-lg-push-22{left:91.66666667%}.ant-col-lg-pull-22{right:91.66666667%}.ant-col-lg-offset-22{margin-left:91.66666667%}.ant-col-lg-order-22{order:22}.ant-col-lg-21{display:block;flex:0 0 87.5%;max-width:87.5%}.ant-col-lg-push-21{left:87.5%}.ant-col-lg-pull-21{right:87.5%}.ant-col-lg-offset-21{margin-left:87.5%}.ant-col-lg-order-21{order:21}.ant-col-lg-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.ant-col-lg-push-20{left:83.33333333%}.ant-col-lg-pull-20{right:83.33333333%}.ant-col-lg-offset-20{margin-left:83.33333333%}.ant-col-lg-order-20{order:20}.ant-col-lg-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.ant-col-lg-push-19{left:79.16666667%}.ant-col-lg-pull-19{right:79.16666667%}.ant-col-lg-offset-19{margin-left:79.16666667%}.ant-col-lg-order-19{order:19}.ant-col-lg-18{display:block;flex:0 0 75%;max-width:75%}.ant-col-lg-push-18{left:75%}.ant-col-lg-pull-18{right:75%}.ant-col-lg-offset-18{margin-left:75%}.ant-col-lg-order-18{order:18}.ant-col-lg-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.ant-col-lg-push-17{left:70.83333333%}.ant-col-lg-pull-17{right:70.83333333%}.ant-col-lg-offset-17{margin-left:70.83333333%}.ant-col-lg-order-17{order:17}.ant-col-lg-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.ant-col-lg-push-16{left:66.66666667%}.ant-col-lg-pull-16{right:66.66666667%}.ant-col-lg-offset-16{margin-left:66.66666667%}.ant-col-lg-order-16{order:16}.ant-col-lg-15{display:block;flex:0 0 62.5%;max-width:62.5%}.ant-col-lg-push-15{left:62.5%}.ant-col-lg-pull-15{right:62.5%}.ant-col-lg-offset-15{margin-left:62.5%}.ant-col-lg-order-15{order:15}.ant-col-lg-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.ant-col-lg-push-14{left:58.33333333%}.ant-col-lg-pull-14{right:58.33333333%}.ant-col-lg-offset-14{margin-left:58.33333333%}.ant-col-lg-order-14{order:14}.ant-col-lg-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.ant-col-lg-push-13{left:54.16666667%}.ant-col-lg-pull-13{right:54.16666667%}.ant-col-lg-offset-13{margin-left:54.16666667%}.ant-col-lg-order-13{order:13}.ant-col-lg-12{display:block;flex:0 0 50%;max-width:50%}.ant-col-lg-push-12{left:50%}.ant-col-lg-pull-12{right:50%}.ant-col-lg-offset-12{margin-left:50%}.ant-col-lg-order-12{order:12}.ant-col-lg-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.ant-col-lg-push-11{left:45.83333333%}.ant-col-lg-pull-11{right:45.83333333%}.ant-col-lg-offset-11{margin-left:45.83333333%}.ant-col-lg-order-11{order:11}.ant-col-lg-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.ant-col-lg-push-10{left:41.66666667%}.ant-col-lg-pull-10{right:41.66666667%}.ant-col-lg-offset-10{margin-left:41.66666667%}.ant-col-lg-order-10{order:10}.ant-col-lg-9{display:block;flex:0 0 37.5%;max-width:37.5%}.ant-col-lg-push-9{left:37.5%}.ant-col-lg-pull-9{right:37.5%}.ant-col-lg-offset-9{margin-left:37.5%}.ant-col-lg-order-9{order:9}.ant-col-lg-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.ant-col-lg-push-8{left:33.33333333%}.ant-col-lg-pull-8{right:33.33333333%}.ant-col-lg-offset-8{margin-left:33.33333333%}.ant-col-lg-order-8{order:8}.ant-col-lg-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.ant-col-lg-push-7{left:29.16666667%}.ant-col-lg-pull-7{right:29.16666667%}.ant-col-lg-offset-7{margin-left:29.16666667%}.ant-col-lg-order-7{order:7}.ant-col-lg-6{display:block;flex:0 0 25%;max-width:25%}.ant-col-lg-push-6{left:25%}.ant-col-lg-pull-6{right:25%}.ant-col-lg-offset-6{margin-left:25%}.ant-col-lg-order-6{order:6}.ant-col-lg-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.ant-col-lg-push-5{left:20.83333333%}.ant-col-lg-pull-5{right:20.83333333%}.ant-col-lg-offset-5{margin-left:20.83333333%}.ant-col-lg-order-5{order:5}.ant-col-lg-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.ant-col-lg-push-4{left:16.66666667%}.ant-col-lg-pull-4{right:16.66666667%}.ant-col-lg-offset-4{margin-left:16.66666667%}.ant-col-lg-order-4{order:4}.ant-col-lg-3{display:block;flex:0 0 12.5%;max-width:12.5%}.ant-col-lg-push-3{left:12.5%}.ant-col-lg-pull-3{right:12.5%}.ant-col-lg-offset-3{margin-left:12.5%}.ant-col-lg-order-3{order:3}.ant-col-lg-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.ant-col-lg-push-2{left:8.33333333%}.ant-col-lg-pull-2{right:8.33333333%}.ant-col-lg-offset-2{margin-left:8.33333333%}.ant-col-lg-order-2{order:2}.ant-col-lg-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.ant-col-lg-push-1{left:4.16666667%}.ant-col-lg-pull-1{right:4.16666667%}.ant-col-lg-offset-1{margin-left:4.16666667%}.ant-col-lg-order-1{order:1}.ant-col-lg-0{display:none}.ant-col-push-0{left:auto}.ant-col-pull-0{right:auto}.ant-col-lg-push-0{left:auto}.ant-col-lg-pull-0{right:auto}.ant-col-lg-offset-0{margin-left:0}.ant-col-lg-order-0{order:0}.ant-col-push-0.ant-col-rtl{right:auto}.ant-col-pull-0.ant-col-rtl{left:auto}.ant-col-lg-push-0.ant-col-rtl{right:auto}.ant-col-lg-pull-0.ant-col-rtl{left:auto}.ant-col-lg-offset-0.ant-col-rtl{margin-right:0}.ant-col-lg-push-1.ant-col-rtl{right:4.16666667%;left:auto}.ant-col-lg-pull-1.ant-col-rtl{right:auto;left:4.16666667%}.ant-col-lg-offset-1.ant-col-rtl{margin-right:4.16666667%;margin-left:0}.ant-col-lg-push-2.ant-col-rtl{right:8.33333333%;left:auto}.ant-col-lg-pull-2.ant-col-rtl{right:auto;left:8.33333333%}.ant-col-lg-offset-2.ant-col-rtl{margin-right:8.33333333%;margin-left:0}.ant-col-lg-push-3.ant-col-rtl{right:12.5%;left:auto}.ant-col-lg-pull-3.ant-col-rtl{right:auto;left:12.5%}.ant-col-lg-offset-3.ant-col-rtl{margin-right:12.5%;margin-left:0}.ant-col-lg-push-4.ant-col-rtl{right:16.66666667%;left:auto}.ant-col-lg-pull-4.ant-col-rtl{right:auto;left:16.66666667%}.ant-col-lg-offset-4.ant-col-rtl{margin-right:16.66666667%;margin-left:0}.ant-col-lg-push-5.ant-col-rtl{right:20.83333333%;left:auto}.ant-col-lg-pull-5.ant-col-rtl{right:auto;left:20.83333333%}.ant-col-lg-offset-5.ant-col-rtl{margin-right:20.83333333%;margin-left:0}.ant-col-lg-push-6.ant-col-rtl{right:25%;left:auto}.ant-col-lg-pull-6.ant-col-rtl{right:auto;left:25%}.ant-col-lg-offset-6.ant-col-rtl{margin-right:25%;margin-left:0}.ant-col-lg-push-7.ant-col-rtl{right:29.16666667%;left:auto}.ant-col-lg-pull-7.ant-col-rtl{right:auto;left:29.16666667%}.ant-col-lg-offset-7.ant-col-rtl{margin-right:29.16666667%;margin-left:0}.ant-col-lg-push-8.ant-col-rtl{right:33.33333333%;left:auto}.ant-col-lg-pull-8.ant-col-rtl{right:auto;left:33.33333333%}.ant-col-lg-offset-8.ant-col-rtl{margin-right:33.33333333%;margin-left:0}.ant-col-lg-push-9.ant-col-rtl{right:37.5%;left:auto}.ant-col-lg-pull-9.ant-col-rtl{right:auto;left:37.5%}.ant-col-lg-offset-9.ant-col-rtl{margin-right:37.5%;margin-left:0}.ant-col-lg-push-10.ant-col-rtl{right:41.66666667%;left:auto}.ant-col-lg-pull-10.ant-col-rtl{right:auto;left:41.66666667%}.ant-col-lg-offset-10.ant-col-rtl{margin-right:41.66666667%;margin-left:0}.ant-col-lg-push-11.ant-col-rtl{right:45.83333333%;left:auto}.ant-col-lg-pull-11.ant-col-rtl{right:auto;left:45.83333333%}.ant-col-lg-offset-11.ant-col-rtl{margin-right:45.83333333%;margin-left:0}.ant-col-lg-push-12.ant-col-rtl{right:50%;left:auto}.ant-col-lg-pull-12.ant-col-rtl{right:auto;left:50%}.ant-col-lg-offset-12.ant-col-rtl{margin-right:50%;margin-left:0}.ant-col-lg-push-13.ant-col-rtl{right:54.16666667%;left:auto}.ant-col-lg-pull-13.ant-col-rtl{right:auto;left:54.16666667%}.ant-col-lg-offset-13.ant-col-rtl{margin-right:54.16666667%;margin-left:0}.ant-col-lg-push-14.ant-col-rtl{right:58.33333333%;left:auto}.ant-col-lg-pull-14.ant-col-rtl{right:auto;left:58.33333333%}.ant-col-lg-offset-14.ant-col-rtl{margin-right:58.33333333%;margin-left:0}.ant-col-lg-push-15.ant-col-rtl{right:62.5%;left:auto}.ant-col-lg-pull-15.ant-col-rtl{right:auto;left:62.5%}.ant-col-lg-offset-15.ant-col-rtl{margin-right:62.5%;margin-left:0}.ant-col-lg-push-16.ant-col-rtl{right:66.66666667%;left:auto}.ant-col-lg-pull-16.ant-col-rtl{right:auto;left:66.66666667%}.ant-col-lg-offset-16.ant-col-rtl{margin-right:66.66666667%;margin-left:0}.ant-col-lg-push-17.ant-col-rtl{right:70.83333333%;left:auto}.ant-col-lg-pull-17.ant-col-rtl{right:auto;left:70.83333333%}.ant-col-lg-offset-17.ant-col-rtl{margin-right:70.83333333%;margin-left:0}.ant-col-lg-push-18.ant-col-rtl{right:75%;left:auto}.ant-col-lg-pull-18.ant-col-rtl{right:auto;left:75%}.ant-col-lg-offset-18.ant-col-rtl{margin-right:75%;margin-left:0}.ant-col-lg-push-19.ant-col-rtl{right:79.16666667%;left:auto}.ant-col-lg-pull-19.ant-col-rtl{right:auto;left:79.16666667%}.ant-col-lg-offset-19.ant-col-rtl{margin-right:79.16666667%;margin-left:0}.ant-col-lg-push-20.ant-col-rtl{right:83.33333333%;left:auto}.ant-col-lg-pull-20.ant-col-rtl{right:auto;left:83.33333333%}.ant-col-lg-offset-20.ant-col-rtl{margin-right:83.33333333%;margin-left:0}.ant-col-lg-push-21.ant-col-rtl{right:87.5%;left:auto}.ant-col-lg-pull-21.ant-col-rtl{right:auto;left:87.5%}.ant-col-lg-offset-21.ant-col-rtl{margin-right:87.5%;margin-left:0}.ant-col-lg-push-22.ant-col-rtl{right:91.66666667%;left:auto}.ant-col-lg-pull-22.ant-col-rtl{right:auto;left:91.66666667%}.ant-col-lg-offset-22.ant-col-rtl{margin-right:91.66666667%;margin-left:0}.ant-col-lg-push-23.ant-col-rtl{right:95.83333333%;left:auto}.ant-col-lg-pull-23.ant-col-rtl{right:auto;left:95.83333333%}.ant-col-lg-offset-23.ant-col-rtl{margin-right:95.83333333%;margin-left:0}.ant-col-lg-push-24.ant-col-rtl{right:100%;left:auto}.ant-col-lg-pull-24.ant-col-rtl{right:auto;left:100%}.ant-col-lg-offset-24.ant-col-rtl{margin-right:100%;margin-left:0}}@media (min-width: 1200px){.ant-col-xl-24{display:block;flex:0 0 100%;max-width:100%}.ant-col-xl-push-24{left:100%}.ant-col-xl-pull-24{right:100%}.ant-col-xl-offset-24{margin-left:100%}.ant-col-xl-order-24{order:24}.ant-col-xl-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.ant-col-xl-push-23{left:95.83333333%}.ant-col-xl-pull-23{right:95.83333333%}.ant-col-xl-offset-23{margin-left:95.83333333%}.ant-col-xl-order-23{order:23}.ant-col-xl-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.ant-col-xl-push-22{left:91.66666667%}.ant-col-xl-pull-22{right:91.66666667%}.ant-col-xl-offset-22{margin-left:91.66666667%}.ant-col-xl-order-22{order:22}.ant-col-xl-21{display:block;flex:0 0 87.5%;max-width:87.5%}.ant-col-xl-push-21{left:87.5%}.ant-col-xl-pull-21{right:87.5%}.ant-col-xl-offset-21{margin-left:87.5%}.ant-col-xl-order-21{order:21}.ant-col-xl-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.ant-col-xl-push-20{left:83.33333333%}.ant-col-xl-pull-20{right:83.33333333%}.ant-col-xl-offset-20{margin-left:83.33333333%}.ant-col-xl-order-20{order:20}.ant-col-xl-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.ant-col-xl-push-19{left:79.16666667%}.ant-col-xl-pull-19{right:79.16666667%}.ant-col-xl-offset-19{margin-left:79.16666667%}.ant-col-xl-order-19{order:19}.ant-col-xl-18{display:block;flex:0 0 75%;max-width:75%}.ant-col-xl-push-18{left:75%}.ant-col-xl-pull-18{right:75%}.ant-col-xl-offset-18{margin-left:75%}.ant-col-xl-order-18{order:18}.ant-col-xl-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.ant-col-xl-push-17{left:70.83333333%}.ant-col-xl-pull-17{right:70.83333333%}.ant-col-xl-offset-17{margin-left:70.83333333%}.ant-col-xl-order-17{order:17}.ant-col-xl-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.ant-col-xl-push-16{left:66.66666667%}.ant-col-xl-pull-16{right:66.66666667%}.ant-col-xl-offset-16{margin-left:66.66666667%}.ant-col-xl-order-16{order:16}.ant-col-xl-15{display:block;flex:0 0 62.5%;max-width:62.5%}.ant-col-xl-push-15{left:62.5%}.ant-col-xl-pull-15{right:62.5%}.ant-col-xl-offset-15{margin-left:62.5%}.ant-col-xl-order-15{order:15}.ant-col-xl-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.ant-col-xl-push-14{left:58.33333333%}.ant-col-xl-pull-14{right:58.33333333%}.ant-col-xl-offset-14{margin-left:58.33333333%}.ant-col-xl-order-14{order:14}.ant-col-xl-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.ant-col-xl-push-13{left:54.16666667%}.ant-col-xl-pull-13{right:54.16666667%}.ant-col-xl-offset-13{margin-left:54.16666667%}.ant-col-xl-order-13{order:13}.ant-col-xl-12{display:block;flex:0 0 50%;max-width:50%}.ant-col-xl-push-12{left:50%}.ant-col-xl-pull-12{right:50%}.ant-col-xl-offset-12{margin-left:50%}.ant-col-xl-order-12{order:12}.ant-col-xl-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.ant-col-xl-push-11{left:45.83333333%}.ant-col-xl-pull-11{right:45.83333333%}.ant-col-xl-offset-11{margin-left:45.83333333%}.ant-col-xl-order-11{order:11}.ant-col-xl-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.ant-col-xl-push-10{left:41.66666667%}.ant-col-xl-pull-10{right:41.66666667%}.ant-col-xl-offset-10{margin-left:41.66666667%}.ant-col-xl-order-10{order:10}.ant-col-xl-9{display:block;flex:0 0 37.5%;max-width:37.5%}.ant-col-xl-push-9{left:37.5%}.ant-col-xl-pull-9{right:37.5%}.ant-col-xl-offset-9{margin-left:37.5%}.ant-col-xl-order-9{order:9}.ant-col-xl-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.ant-col-xl-push-8{left:33.33333333%}.ant-col-xl-pull-8{right:33.33333333%}.ant-col-xl-offset-8{margin-left:33.33333333%}.ant-col-xl-order-8{order:8}.ant-col-xl-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.ant-col-xl-push-7{left:29.16666667%}.ant-col-xl-pull-7{right:29.16666667%}.ant-col-xl-offset-7{margin-left:29.16666667%}.ant-col-xl-order-7{order:7}.ant-col-xl-6{display:block;flex:0 0 25%;max-width:25%}.ant-col-xl-push-6{left:25%}.ant-col-xl-pull-6{right:25%}.ant-col-xl-offset-6{margin-left:25%}.ant-col-xl-order-6{order:6}.ant-col-xl-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.ant-col-xl-push-5{left:20.83333333%}.ant-col-xl-pull-5{right:20.83333333%}.ant-col-xl-offset-5{margin-left:20.83333333%}.ant-col-xl-order-5{order:5}.ant-col-xl-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.ant-col-xl-push-4{left:16.66666667%}.ant-col-xl-pull-4{right:16.66666667%}.ant-col-xl-offset-4{margin-left:16.66666667%}.ant-col-xl-order-4{order:4}.ant-col-xl-3{display:block;flex:0 0 12.5%;max-width:12.5%}.ant-col-xl-push-3{left:12.5%}.ant-col-xl-pull-3{right:12.5%}.ant-col-xl-offset-3{margin-left:12.5%}.ant-col-xl-order-3{order:3}.ant-col-xl-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.ant-col-xl-push-2{left:8.33333333%}.ant-col-xl-pull-2{right:8.33333333%}.ant-col-xl-offset-2{margin-left:8.33333333%}.ant-col-xl-order-2{order:2}.ant-col-xl-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.ant-col-xl-push-1{left:4.16666667%}.ant-col-xl-pull-1{right:4.16666667%}.ant-col-xl-offset-1{margin-left:4.16666667%}.ant-col-xl-order-1{order:1}.ant-col-xl-0{display:none}.ant-col-push-0{left:auto}.ant-col-pull-0{right:auto}.ant-col-xl-push-0{left:auto}.ant-col-xl-pull-0{right:auto}.ant-col-xl-offset-0{margin-left:0}.ant-col-xl-order-0{order:0}.ant-col-push-0.ant-col-rtl{right:auto}.ant-col-pull-0.ant-col-rtl{left:auto}.ant-col-xl-push-0.ant-col-rtl{right:auto}.ant-col-xl-pull-0.ant-col-rtl{left:auto}.ant-col-xl-offset-0.ant-col-rtl{margin-right:0}.ant-col-xl-push-1.ant-col-rtl{right:4.16666667%;left:auto}.ant-col-xl-pull-1.ant-col-rtl{right:auto;left:4.16666667%}.ant-col-xl-offset-1.ant-col-rtl{margin-right:4.16666667%;margin-left:0}.ant-col-xl-push-2.ant-col-rtl{right:8.33333333%;left:auto}.ant-col-xl-pull-2.ant-col-rtl{right:auto;left:8.33333333%}.ant-col-xl-offset-2.ant-col-rtl{margin-right:8.33333333%;margin-left:0}.ant-col-xl-push-3.ant-col-rtl{right:12.5%;left:auto}.ant-col-xl-pull-3.ant-col-rtl{right:auto;left:12.5%}.ant-col-xl-offset-3.ant-col-rtl{margin-right:12.5%;margin-left:0}.ant-col-xl-push-4.ant-col-rtl{right:16.66666667%;left:auto}.ant-col-xl-pull-4.ant-col-rtl{right:auto;left:16.66666667%}.ant-col-xl-offset-4.ant-col-rtl{margin-right:16.66666667%;margin-left:0}.ant-col-xl-push-5.ant-col-rtl{right:20.83333333%;left:auto}.ant-col-xl-pull-5.ant-col-rtl{right:auto;left:20.83333333%}.ant-col-xl-offset-5.ant-col-rtl{margin-right:20.83333333%;margin-left:0}.ant-col-xl-push-6.ant-col-rtl{right:25%;left:auto}.ant-col-xl-pull-6.ant-col-rtl{right:auto;left:25%}.ant-col-xl-offset-6.ant-col-rtl{margin-right:25%;margin-left:0}.ant-col-xl-push-7.ant-col-rtl{right:29.16666667%;left:auto}.ant-col-xl-pull-7.ant-col-rtl{right:auto;left:29.16666667%}.ant-col-xl-offset-7.ant-col-rtl{margin-right:29.16666667%;margin-left:0}.ant-col-xl-push-8.ant-col-rtl{right:33.33333333%;left:auto}.ant-col-xl-pull-8.ant-col-rtl{right:auto;left:33.33333333%}.ant-col-xl-offset-8.ant-col-rtl{margin-right:33.33333333%;margin-left:0}.ant-col-xl-push-9.ant-col-rtl{right:37.5%;left:auto}.ant-col-xl-pull-9.ant-col-rtl{right:auto;left:37.5%}.ant-col-xl-offset-9.ant-col-rtl{margin-right:37.5%;margin-left:0}.ant-col-xl-push-10.ant-col-rtl{right:41.66666667%;left:auto}.ant-col-xl-pull-10.ant-col-rtl{right:auto;left:41.66666667%}.ant-col-xl-offset-10.ant-col-rtl{margin-right:41.66666667%;margin-left:0}.ant-col-xl-push-11.ant-col-rtl{right:45.83333333%;left:auto}.ant-col-xl-pull-11.ant-col-rtl{right:auto;left:45.83333333%}.ant-col-xl-offset-11.ant-col-rtl{margin-right:45.83333333%;margin-left:0}.ant-col-xl-push-12.ant-col-rtl{right:50%;left:auto}.ant-col-xl-pull-12.ant-col-rtl{right:auto;left:50%}.ant-col-xl-offset-12.ant-col-rtl{margin-right:50%;margin-left:0}.ant-col-xl-push-13.ant-col-rtl{right:54.16666667%;left:auto}.ant-col-xl-pull-13.ant-col-rtl{right:auto;left:54.16666667%}.ant-col-xl-offset-13.ant-col-rtl{margin-right:54.16666667%;margin-left:0}.ant-col-xl-push-14.ant-col-rtl{right:58.33333333%;left:auto}.ant-col-xl-pull-14.ant-col-rtl{right:auto;left:58.33333333%}.ant-col-xl-offset-14.ant-col-rtl{margin-right:58.33333333%;margin-left:0}.ant-col-xl-push-15.ant-col-rtl{right:62.5%;left:auto}.ant-col-xl-pull-15.ant-col-rtl{right:auto;left:62.5%}.ant-col-xl-offset-15.ant-col-rtl{margin-right:62.5%;margin-left:0}.ant-col-xl-push-16.ant-col-rtl{right:66.66666667%;left:auto}.ant-col-xl-pull-16.ant-col-rtl{right:auto;left:66.66666667%}.ant-col-xl-offset-16.ant-col-rtl{margin-right:66.66666667%;margin-left:0}.ant-col-xl-push-17.ant-col-rtl{right:70.83333333%;left:auto}.ant-col-xl-pull-17.ant-col-rtl{right:auto;left:70.83333333%}.ant-col-xl-offset-17.ant-col-rtl{margin-right:70.83333333%;margin-left:0}.ant-col-xl-push-18.ant-col-rtl{right:75%;left:auto}.ant-col-xl-pull-18.ant-col-rtl{right:auto;left:75%}.ant-col-xl-offset-18.ant-col-rtl{margin-right:75%;margin-left:0}.ant-col-xl-push-19.ant-col-rtl{right:79.16666667%;left:auto}.ant-col-xl-pull-19.ant-col-rtl{right:auto;left:79.16666667%}.ant-col-xl-offset-19.ant-col-rtl{margin-right:79.16666667%;margin-left:0}.ant-col-xl-push-20.ant-col-rtl{right:83.33333333%;left:auto}.ant-col-xl-pull-20.ant-col-rtl{right:auto;left:83.33333333%}.ant-col-xl-offset-20.ant-col-rtl{margin-right:83.33333333%;margin-left:0}.ant-col-xl-push-21.ant-col-rtl{right:87.5%;left:auto}.ant-col-xl-pull-21.ant-col-rtl{right:auto;left:87.5%}.ant-col-xl-offset-21.ant-col-rtl{margin-right:87.5%;margin-left:0}.ant-col-xl-push-22.ant-col-rtl{right:91.66666667%;left:auto}.ant-col-xl-pull-22.ant-col-rtl{right:auto;left:91.66666667%}.ant-col-xl-offset-22.ant-col-rtl{margin-right:91.66666667%;margin-left:0}.ant-col-xl-push-23.ant-col-rtl{right:95.83333333%;left:auto}.ant-col-xl-pull-23.ant-col-rtl{right:auto;left:95.83333333%}.ant-col-xl-offset-23.ant-col-rtl{margin-right:95.83333333%;margin-left:0}.ant-col-xl-push-24.ant-col-rtl{right:100%;left:auto}.ant-col-xl-pull-24.ant-col-rtl{right:auto;left:100%}.ant-col-xl-offset-24.ant-col-rtl{margin-right:100%;margin-left:0}}@media (min-width: 1600px){.ant-col-xxl-24{display:block;flex:0 0 100%;max-width:100%}.ant-col-xxl-push-24{left:100%}.ant-col-xxl-pull-24{right:100%}.ant-col-xxl-offset-24{margin-left:100%}.ant-col-xxl-order-24{order:24}.ant-col-xxl-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.ant-col-xxl-push-23{left:95.83333333%}.ant-col-xxl-pull-23{right:95.83333333%}.ant-col-xxl-offset-23{margin-left:95.83333333%}.ant-col-xxl-order-23{order:23}.ant-col-xxl-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.ant-col-xxl-push-22{left:91.66666667%}.ant-col-xxl-pull-22{right:91.66666667%}.ant-col-xxl-offset-22{margin-left:91.66666667%}.ant-col-xxl-order-22{order:22}.ant-col-xxl-21{display:block;flex:0 0 87.5%;max-width:87.5%}.ant-col-xxl-push-21{left:87.5%}.ant-col-xxl-pull-21{right:87.5%}.ant-col-xxl-offset-21{margin-left:87.5%}.ant-col-xxl-order-21{order:21}.ant-col-xxl-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.ant-col-xxl-push-20{left:83.33333333%}.ant-col-xxl-pull-20{right:83.33333333%}.ant-col-xxl-offset-20{margin-left:83.33333333%}.ant-col-xxl-order-20{order:20}.ant-col-xxl-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.ant-col-xxl-push-19{left:79.16666667%}.ant-col-xxl-pull-19{right:79.16666667%}.ant-col-xxl-offset-19{margin-left:79.16666667%}.ant-col-xxl-order-19{order:19}.ant-col-xxl-18{display:block;flex:0 0 75%;max-width:75%}.ant-col-xxl-push-18{left:75%}.ant-col-xxl-pull-18{right:75%}.ant-col-xxl-offset-18{margin-left:75%}.ant-col-xxl-order-18{order:18}.ant-col-xxl-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.ant-col-xxl-push-17{left:70.83333333%}.ant-col-xxl-pull-17{right:70.83333333%}.ant-col-xxl-offset-17{margin-left:70.83333333%}.ant-col-xxl-order-17{order:17}.ant-col-xxl-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.ant-col-xxl-push-16{left:66.66666667%}.ant-col-xxl-pull-16{right:66.66666667%}.ant-col-xxl-offset-16{margin-left:66.66666667%}.ant-col-xxl-order-16{order:16}.ant-col-xxl-15{display:block;flex:0 0 62.5%;max-width:62.5%}.ant-col-xxl-push-15{left:62.5%}.ant-col-xxl-pull-15{right:62.5%}.ant-col-xxl-offset-15{margin-left:62.5%}.ant-col-xxl-order-15{order:15}.ant-col-xxl-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.ant-col-xxl-push-14{left:58.33333333%}.ant-col-xxl-pull-14{right:58.33333333%}.ant-col-xxl-offset-14{margin-left:58.33333333%}.ant-col-xxl-order-14{order:14}.ant-col-xxl-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.ant-col-xxl-push-13{left:54.16666667%}.ant-col-xxl-pull-13{right:54.16666667%}.ant-col-xxl-offset-13{margin-left:54.16666667%}.ant-col-xxl-order-13{order:13}.ant-col-xxl-12{display:block;flex:0 0 50%;max-width:50%}.ant-col-xxl-push-12{left:50%}.ant-col-xxl-pull-12{right:50%}.ant-col-xxl-offset-12{margin-left:50%}.ant-col-xxl-order-12{order:12}.ant-col-xxl-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.ant-col-xxl-push-11{left:45.83333333%}.ant-col-xxl-pull-11{right:45.83333333%}.ant-col-xxl-offset-11{margin-left:45.83333333%}.ant-col-xxl-order-11{order:11}.ant-col-xxl-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.ant-col-xxl-push-10{left:41.66666667%}.ant-col-xxl-pull-10{right:41.66666667%}.ant-col-xxl-offset-10{margin-left:41.66666667%}.ant-col-xxl-order-10{order:10}.ant-col-xxl-9{display:block;flex:0 0 37.5%;max-width:37.5%}.ant-col-xxl-push-9{left:37.5%}.ant-col-xxl-pull-9{right:37.5%}.ant-col-xxl-offset-9{margin-left:37.5%}.ant-col-xxl-order-9{order:9}.ant-col-xxl-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.ant-col-xxl-push-8{left:33.33333333%}.ant-col-xxl-pull-8{right:33.33333333%}.ant-col-xxl-offset-8{margin-left:33.33333333%}.ant-col-xxl-order-8{order:8}.ant-col-xxl-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.ant-col-xxl-push-7{left:29.16666667%}.ant-col-xxl-pull-7{right:29.16666667%}.ant-col-xxl-offset-7{margin-left:29.16666667%}.ant-col-xxl-order-7{order:7}.ant-col-xxl-6{display:block;flex:0 0 25%;max-width:25%}.ant-col-xxl-push-6{left:25%}.ant-col-xxl-pull-6{right:25%}.ant-col-xxl-offset-6{margin-left:25%}.ant-col-xxl-order-6{order:6}.ant-col-xxl-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.ant-col-xxl-push-5{left:20.83333333%}.ant-col-xxl-pull-5{right:20.83333333%}.ant-col-xxl-offset-5{margin-left:20.83333333%}.ant-col-xxl-order-5{order:5}.ant-col-xxl-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.ant-col-xxl-push-4{left:16.66666667%}.ant-col-xxl-pull-4{right:16.66666667%}.ant-col-xxl-offset-4{margin-left:16.66666667%}.ant-col-xxl-order-4{order:4}.ant-col-xxl-3{display:block;flex:0 0 12.5%;max-width:12.5%}.ant-col-xxl-push-3{left:12.5%}.ant-col-xxl-pull-3{right:12.5%}.ant-col-xxl-offset-3{margin-left:12.5%}.ant-col-xxl-order-3{order:3}.ant-col-xxl-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.ant-col-xxl-push-2{left:8.33333333%}.ant-col-xxl-pull-2{right:8.33333333%}.ant-col-xxl-offset-2{margin-left:8.33333333%}.ant-col-xxl-order-2{order:2}.ant-col-xxl-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.ant-col-xxl-push-1{left:4.16666667%}.ant-col-xxl-pull-1{right:4.16666667%}.ant-col-xxl-offset-1{margin-left:4.16666667%}.ant-col-xxl-order-1{order:1}.ant-col-xxl-0{display:none}.ant-col-push-0{left:auto}.ant-col-pull-0{right:auto}.ant-col-xxl-push-0{left:auto}.ant-col-xxl-pull-0{right:auto}.ant-col-xxl-offset-0{margin-left:0}.ant-col-xxl-order-0{order:0}.ant-col-push-0.ant-col-rtl{right:auto}.ant-col-pull-0.ant-col-rtl{left:auto}.ant-col-xxl-push-0.ant-col-rtl{right:auto}.ant-col-xxl-pull-0.ant-col-rtl{left:auto}.ant-col-xxl-offset-0.ant-col-rtl{margin-right:0}.ant-col-xxl-push-1.ant-col-rtl{right:4.16666667%;left:auto}.ant-col-xxl-pull-1.ant-col-rtl{right:auto;left:4.16666667%}.ant-col-xxl-offset-1.ant-col-rtl{margin-right:4.16666667%;margin-left:0}.ant-col-xxl-push-2.ant-col-rtl{right:8.33333333%;left:auto}.ant-col-xxl-pull-2.ant-col-rtl{right:auto;left:8.33333333%}.ant-col-xxl-offset-2.ant-col-rtl{margin-right:8.33333333%;margin-left:0}.ant-col-xxl-push-3.ant-col-rtl{right:12.5%;left:auto}.ant-col-xxl-pull-3.ant-col-rtl{right:auto;left:12.5%}.ant-col-xxl-offset-3.ant-col-rtl{margin-right:12.5%;margin-left:0}.ant-col-xxl-push-4.ant-col-rtl{right:16.66666667%;left:auto}.ant-col-xxl-pull-4.ant-col-rtl{right:auto;left:16.66666667%}.ant-col-xxl-offset-4.ant-col-rtl{margin-right:16.66666667%;margin-left:0}.ant-col-xxl-push-5.ant-col-rtl{right:20.83333333%;left:auto}.ant-col-xxl-pull-5.ant-col-rtl{right:auto;left:20.83333333%}.ant-col-xxl-offset-5.ant-col-rtl{margin-right:20.83333333%;margin-left:0}.ant-col-xxl-push-6.ant-col-rtl{right:25%;left:auto}.ant-col-xxl-pull-6.ant-col-rtl{right:auto;left:25%}.ant-col-xxl-offset-6.ant-col-rtl{margin-right:25%;margin-left:0}.ant-col-xxl-push-7.ant-col-rtl{right:29.16666667%;left:auto}.ant-col-xxl-pull-7.ant-col-rtl{right:auto;left:29.16666667%}.ant-col-xxl-offset-7.ant-col-rtl{margin-right:29.16666667%;margin-left:0}.ant-col-xxl-push-8.ant-col-rtl{right:33.33333333%;left:auto}.ant-col-xxl-pull-8.ant-col-rtl{right:auto;left:33.33333333%}.ant-col-xxl-offset-8.ant-col-rtl{margin-right:33.33333333%;margin-left:0}.ant-col-xxl-push-9.ant-col-rtl{right:37.5%;left:auto}.ant-col-xxl-pull-9.ant-col-rtl{right:auto;left:37.5%}.ant-col-xxl-offset-9.ant-col-rtl{margin-right:37.5%;margin-left:0}.ant-col-xxl-push-10.ant-col-rtl{right:41.66666667%;left:auto}.ant-col-xxl-pull-10.ant-col-rtl{right:auto;left:41.66666667%}.ant-col-xxl-offset-10.ant-col-rtl{margin-right:41.66666667%;margin-left:0}.ant-col-xxl-push-11.ant-col-rtl{right:45.83333333%;left:auto}.ant-col-xxl-pull-11.ant-col-rtl{right:auto;left:45.83333333%}.ant-col-xxl-offset-11.ant-col-rtl{margin-right:45.83333333%;margin-left:0}.ant-col-xxl-push-12.ant-col-rtl{right:50%;left:auto}.ant-col-xxl-pull-12.ant-col-rtl{right:auto;left:50%}.ant-col-xxl-offset-12.ant-col-rtl{margin-right:50%;margin-left:0}.ant-col-xxl-push-13.ant-col-rtl{right:54.16666667%;left:auto}.ant-col-xxl-pull-13.ant-col-rtl{right:auto;left:54.16666667%}.ant-col-xxl-offset-13.ant-col-rtl{margin-right:54.16666667%;margin-left:0}.ant-col-xxl-push-14.ant-col-rtl{right:58.33333333%;left:auto}.ant-col-xxl-pull-14.ant-col-rtl{right:auto;left:58.33333333%}.ant-col-xxl-offset-14.ant-col-rtl{margin-right:58.33333333%;margin-left:0}.ant-col-xxl-push-15.ant-col-rtl{right:62.5%;left:auto}.ant-col-xxl-pull-15.ant-col-rtl{right:auto;left:62.5%}.ant-col-xxl-offset-15.ant-col-rtl{margin-right:62.5%;margin-left:0}.ant-col-xxl-push-16.ant-col-rtl{right:66.66666667%;left:auto}.ant-col-xxl-pull-16.ant-col-rtl{right:auto;left:66.66666667%}.ant-col-xxl-offset-16.ant-col-rtl{margin-right:66.66666667%;margin-left:0}.ant-col-xxl-push-17.ant-col-rtl{right:70.83333333%;left:auto}.ant-col-xxl-pull-17.ant-col-rtl{right:auto;left:70.83333333%}.ant-col-xxl-offset-17.ant-col-rtl{margin-right:70.83333333%;margin-left:0}.ant-col-xxl-push-18.ant-col-rtl{right:75%;left:auto}.ant-col-xxl-pull-18.ant-col-rtl{right:auto;left:75%}.ant-col-xxl-offset-18.ant-col-rtl{margin-right:75%;margin-left:0}.ant-col-xxl-push-19.ant-col-rtl{right:79.16666667%;left:auto}.ant-col-xxl-pull-19.ant-col-rtl{right:auto;left:79.16666667%}.ant-col-xxl-offset-19.ant-col-rtl{margin-right:79.16666667%;margin-left:0}.ant-col-xxl-push-20.ant-col-rtl{right:83.33333333%;left:auto}.ant-col-xxl-pull-20.ant-col-rtl{right:auto;left:83.33333333%}.ant-col-xxl-offset-20.ant-col-rtl{margin-right:83.33333333%;margin-left:0}.ant-col-xxl-push-21.ant-col-rtl{right:87.5%;left:auto}.ant-col-xxl-pull-21.ant-col-rtl{right:auto;left:87.5%}.ant-col-xxl-offset-21.ant-col-rtl{margin-right:87.5%;margin-left:0}.ant-col-xxl-push-22.ant-col-rtl{right:91.66666667%;left:auto}.ant-col-xxl-pull-22.ant-col-rtl{right:auto;left:91.66666667%}.ant-col-xxl-offset-22.ant-col-rtl{margin-right:91.66666667%;margin-left:0}.ant-col-xxl-push-23.ant-col-rtl{right:95.83333333%;left:auto}.ant-col-xxl-pull-23.ant-col-rtl{right:auto;left:95.83333333%}.ant-col-xxl-offset-23.ant-col-rtl{margin-right:95.83333333%;margin-left:0}.ant-col-xxl-push-24.ant-col-rtl{right:100%;left:auto}.ant-col-xxl-pull-24.ant-col-rtl{right:auto;left:100%}.ant-col-xxl-offset-24.ant-col-rtl{margin-right:100%;margin-left:0}}@media (min-width: 2000px){.ant-col-xxxl-24{display:block;flex:0 0 100%;max-width:100%}.ant-col-xxxl-push-24{left:100%}.ant-col-xxxl-pull-24{right:100%}.ant-col-xxxl-offset-24{margin-left:100%}.ant-col-xxxl-order-24{order:24}.ant-col-xxxl-23{display:block;flex:0 0 95.83333333%;max-width:95.83333333%}.ant-col-xxxl-push-23{left:95.83333333%}.ant-col-xxxl-pull-23{right:95.83333333%}.ant-col-xxxl-offset-23{margin-left:95.83333333%}.ant-col-xxxl-order-23{order:23}.ant-col-xxxl-22{display:block;flex:0 0 91.66666667%;max-width:91.66666667%}.ant-col-xxxl-push-22{left:91.66666667%}.ant-col-xxxl-pull-22{right:91.66666667%}.ant-col-xxxl-offset-22{margin-left:91.66666667%}.ant-col-xxxl-order-22{order:22}.ant-col-xxxl-21{display:block;flex:0 0 87.5%;max-width:87.5%}.ant-col-xxxl-push-21{left:87.5%}.ant-col-xxxl-pull-21{right:87.5%}.ant-col-xxxl-offset-21{margin-left:87.5%}.ant-col-xxxl-order-21{order:21}.ant-col-xxxl-20{display:block;flex:0 0 83.33333333%;max-width:83.33333333%}.ant-col-xxxl-push-20{left:83.33333333%}.ant-col-xxxl-pull-20{right:83.33333333%}.ant-col-xxxl-offset-20{margin-left:83.33333333%}.ant-col-xxxl-order-20{order:20}.ant-col-xxxl-19{display:block;flex:0 0 79.16666667%;max-width:79.16666667%}.ant-col-xxxl-push-19{left:79.16666667%}.ant-col-xxxl-pull-19{right:79.16666667%}.ant-col-xxxl-offset-19{margin-left:79.16666667%}.ant-col-xxxl-order-19{order:19}.ant-col-xxxl-18{display:block;flex:0 0 75%;max-width:75%}.ant-col-xxxl-push-18{left:75%}.ant-col-xxxl-pull-18{right:75%}.ant-col-xxxl-offset-18{margin-left:75%}.ant-col-xxxl-order-18{order:18}.ant-col-xxxl-17{display:block;flex:0 0 70.83333333%;max-width:70.83333333%}.ant-col-xxxl-push-17{left:70.83333333%}.ant-col-xxxl-pull-17{right:70.83333333%}.ant-col-xxxl-offset-17{margin-left:70.83333333%}.ant-col-xxxl-order-17{order:17}.ant-col-xxxl-16{display:block;flex:0 0 66.66666667%;max-width:66.66666667%}.ant-col-xxxl-push-16{left:66.66666667%}.ant-col-xxxl-pull-16{right:66.66666667%}.ant-col-xxxl-offset-16{margin-left:66.66666667%}.ant-col-xxxl-order-16{order:16}.ant-col-xxxl-15{display:block;flex:0 0 62.5%;max-width:62.5%}.ant-col-xxxl-push-15{left:62.5%}.ant-col-xxxl-pull-15{right:62.5%}.ant-col-xxxl-offset-15{margin-left:62.5%}.ant-col-xxxl-order-15{order:15}.ant-col-xxxl-14{display:block;flex:0 0 58.33333333%;max-width:58.33333333%}.ant-col-xxxl-push-14{left:58.33333333%}.ant-col-xxxl-pull-14{right:58.33333333%}.ant-col-xxxl-offset-14{margin-left:58.33333333%}.ant-col-xxxl-order-14{order:14}.ant-col-xxxl-13{display:block;flex:0 0 54.16666667%;max-width:54.16666667%}.ant-col-xxxl-push-13{left:54.16666667%}.ant-col-xxxl-pull-13{right:54.16666667%}.ant-col-xxxl-offset-13{margin-left:54.16666667%}.ant-col-xxxl-order-13{order:13}.ant-col-xxxl-12{display:block;flex:0 0 50%;max-width:50%}.ant-col-xxxl-push-12{left:50%}.ant-col-xxxl-pull-12{right:50%}.ant-col-xxxl-offset-12{margin-left:50%}.ant-col-xxxl-order-12{order:12}.ant-col-xxxl-11{display:block;flex:0 0 45.83333333%;max-width:45.83333333%}.ant-col-xxxl-push-11{left:45.83333333%}.ant-col-xxxl-pull-11{right:45.83333333%}.ant-col-xxxl-offset-11{margin-left:45.83333333%}.ant-col-xxxl-order-11{order:11}.ant-col-xxxl-10{display:block;flex:0 0 41.66666667%;max-width:41.66666667%}.ant-col-xxxl-push-10{left:41.66666667%}.ant-col-xxxl-pull-10{right:41.66666667%}.ant-col-xxxl-offset-10{margin-left:41.66666667%}.ant-col-xxxl-order-10{order:10}.ant-col-xxxl-9{display:block;flex:0 0 37.5%;max-width:37.5%}.ant-col-xxxl-push-9{left:37.5%}.ant-col-xxxl-pull-9{right:37.5%}.ant-col-xxxl-offset-9{margin-left:37.5%}.ant-col-xxxl-order-9{order:9}.ant-col-xxxl-8{display:block;flex:0 0 33.33333333%;max-width:33.33333333%}.ant-col-xxxl-push-8{left:33.33333333%}.ant-col-xxxl-pull-8{right:33.33333333%}.ant-col-xxxl-offset-8{margin-left:33.33333333%}.ant-col-xxxl-order-8{order:8}.ant-col-xxxl-7{display:block;flex:0 0 29.16666667%;max-width:29.16666667%}.ant-col-xxxl-push-7{left:29.16666667%}.ant-col-xxxl-pull-7{right:29.16666667%}.ant-col-xxxl-offset-7{margin-left:29.16666667%}.ant-col-xxxl-order-7{order:7}.ant-col-xxxl-6{display:block;flex:0 0 25%;max-width:25%}.ant-col-xxxl-push-6{left:25%}.ant-col-xxxl-pull-6{right:25%}.ant-col-xxxl-offset-6{margin-left:25%}.ant-col-xxxl-order-6{order:6}.ant-col-xxxl-5{display:block;flex:0 0 20.83333333%;max-width:20.83333333%}.ant-col-xxxl-push-5{left:20.83333333%}.ant-col-xxxl-pull-5{right:20.83333333%}.ant-col-xxxl-offset-5{margin-left:20.83333333%}.ant-col-xxxl-order-5{order:5}.ant-col-xxxl-4{display:block;flex:0 0 16.66666667%;max-width:16.66666667%}.ant-col-xxxl-push-4{left:16.66666667%}.ant-col-xxxl-pull-4{right:16.66666667%}.ant-col-xxxl-offset-4{margin-left:16.66666667%}.ant-col-xxxl-order-4{order:4}.ant-col-xxxl-3{display:block;flex:0 0 12.5%;max-width:12.5%}.ant-col-xxxl-push-3{left:12.5%}.ant-col-xxxl-pull-3{right:12.5%}.ant-col-xxxl-offset-3{margin-left:12.5%}.ant-col-xxxl-order-3{order:3}.ant-col-xxxl-2{display:block;flex:0 0 8.33333333%;max-width:8.33333333%}.ant-col-xxxl-push-2{left:8.33333333%}.ant-col-xxxl-pull-2{right:8.33333333%}.ant-col-xxxl-offset-2{margin-left:8.33333333%}.ant-col-xxxl-order-2{order:2}.ant-col-xxxl-1{display:block;flex:0 0 4.16666667%;max-width:4.16666667%}.ant-col-xxxl-push-1{left:4.16666667%}.ant-col-xxxl-pull-1{right:4.16666667%}.ant-col-xxxl-offset-1{margin-left:4.16666667%}.ant-col-xxxl-order-1{order:1}.ant-col-xxxl-0{display:none}.ant-col-push-0{left:auto}.ant-col-pull-0{right:auto}.ant-col-xxxl-push-0{left:auto}.ant-col-xxxl-pull-0{right:auto}.ant-col-xxxl-offset-0{margin-left:0}.ant-col-xxxl-order-0{order:0}.ant-col-push-0.ant-col-rtl{right:auto}.ant-col-pull-0.ant-col-rtl{left:auto}.ant-col-xxxl-push-0.ant-col-rtl{right:auto}.ant-col-xxxl-pull-0.ant-col-rtl{left:auto}.ant-col-xxxl-offset-0.ant-col-rtl{margin-right:0}.ant-col-xxxl-push-1.ant-col-rtl{right:4.16666667%;left:auto}.ant-col-xxxl-pull-1.ant-col-rtl{right:auto;left:4.16666667%}.ant-col-xxxl-offset-1.ant-col-rtl{margin-right:4.16666667%;margin-left:0}.ant-col-xxxl-push-2.ant-col-rtl{right:8.33333333%;left:auto}.ant-col-xxxl-pull-2.ant-col-rtl{right:auto;left:8.33333333%}.ant-col-xxxl-offset-2.ant-col-rtl{margin-right:8.33333333%;margin-left:0}.ant-col-xxxl-push-3.ant-col-rtl{right:12.5%;left:auto}.ant-col-xxxl-pull-3.ant-col-rtl{right:auto;left:12.5%}.ant-col-xxxl-offset-3.ant-col-rtl{margin-right:12.5%;margin-left:0}.ant-col-xxxl-push-4.ant-col-rtl{right:16.66666667%;left:auto}.ant-col-xxxl-pull-4.ant-col-rtl{right:auto;left:16.66666667%}.ant-col-xxxl-offset-4.ant-col-rtl{margin-right:16.66666667%;margin-left:0}.ant-col-xxxl-push-5.ant-col-rtl{right:20.83333333%;left:auto}.ant-col-xxxl-pull-5.ant-col-rtl{right:auto;left:20.83333333%}.ant-col-xxxl-offset-5.ant-col-rtl{margin-right:20.83333333%;margin-left:0}.ant-col-xxxl-push-6.ant-col-rtl{right:25%;left:auto}.ant-col-xxxl-pull-6.ant-col-rtl{right:auto;left:25%}.ant-col-xxxl-offset-6.ant-col-rtl{margin-right:25%;margin-left:0}.ant-col-xxxl-push-7.ant-col-rtl{right:29.16666667%;left:auto}.ant-col-xxxl-pull-7.ant-col-rtl{right:auto;left:29.16666667%}.ant-col-xxxl-offset-7.ant-col-rtl{margin-right:29.16666667%;margin-left:0}.ant-col-xxxl-push-8.ant-col-rtl{right:33.33333333%;left:auto}.ant-col-xxxl-pull-8.ant-col-rtl{right:auto;left:33.33333333%}.ant-col-xxxl-offset-8.ant-col-rtl{margin-right:33.33333333%;margin-left:0}.ant-col-xxxl-push-9.ant-col-rtl{right:37.5%;left:auto}.ant-col-xxxl-pull-9.ant-col-rtl{right:auto;left:37.5%}.ant-col-xxxl-offset-9.ant-col-rtl{margin-right:37.5%;margin-left:0}.ant-col-xxxl-push-10.ant-col-rtl{right:41.66666667%;left:auto}.ant-col-xxxl-pull-10.ant-col-rtl{right:auto;left:41.66666667%}.ant-col-xxxl-offset-10.ant-col-rtl{margin-right:41.66666667%;margin-left:0}.ant-col-xxxl-push-11.ant-col-rtl{right:45.83333333%;left:auto}.ant-col-xxxl-pull-11.ant-col-rtl{right:auto;left:45.83333333%}.ant-col-xxxl-offset-11.ant-col-rtl{margin-right:45.83333333%;margin-left:0}.ant-col-xxxl-push-12.ant-col-rtl{right:50%;left:auto}.ant-col-xxxl-pull-12.ant-col-rtl{right:auto;left:50%}.ant-col-xxxl-offset-12.ant-col-rtl{margin-right:50%;margin-left:0}.ant-col-xxxl-push-13.ant-col-rtl{right:54.16666667%;left:auto}.ant-col-xxxl-pull-13.ant-col-rtl{right:auto;left:54.16666667%}.ant-col-xxxl-offset-13.ant-col-rtl{margin-right:54.16666667%;margin-left:0}.ant-col-xxxl-push-14.ant-col-rtl{right:58.33333333%;left:auto}.ant-col-xxxl-pull-14.ant-col-rtl{right:auto;left:58.33333333%}.ant-col-xxxl-offset-14.ant-col-rtl{margin-right:58.33333333%;margin-left:0}.ant-col-xxxl-push-15.ant-col-rtl{right:62.5%;left:auto}.ant-col-xxxl-pull-15.ant-col-rtl{right:auto;left:62.5%}.ant-col-xxxl-offset-15.ant-col-rtl{margin-right:62.5%;margin-left:0}.ant-col-xxxl-push-16.ant-col-rtl{right:66.66666667%;left:auto}.ant-col-xxxl-pull-16.ant-col-rtl{right:auto;left:66.66666667%}.ant-col-xxxl-offset-16.ant-col-rtl{margin-right:66.66666667%;margin-left:0}.ant-col-xxxl-push-17.ant-col-rtl{right:70.83333333%;left:auto}.ant-col-xxxl-pull-17.ant-col-rtl{right:auto;left:70.83333333%}.ant-col-xxxl-offset-17.ant-col-rtl{margin-right:70.83333333%;margin-left:0}.ant-col-xxxl-push-18.ant-col-rtl{right:75%;left:auto}.ant-col-xxxl-pull-18.ant-col-rtl{right:auto;left:75%}.ant-col-xxxl-offset-18.ant-col-rtl{margin-right:75%;margin-left:0}.ant-col-xxxl-push-19.ant-col-rtl{right:79.16666667%;left:auto}.ant-col-xxxl-pull-19.ant-col-rtl{right:auto;left:79.16666667%}.ant-col-xxxl-offset-19.ant-col-rtl{margin-right:79.16666667%;margin-left:0}.ant-col-xxxl-push-20.ant-col-rtl{right:83.33333333%;left:auto}.ant-col-xxxl-pull-20.ant-col-rtl{right:auto;left:83.33333333%}.ant-col-xxxl-offset-20.ant-col-rtl{margin-right:83.33333333%;margin-left:0}.ant-col-xxxl-push-21.ant-col-rtl{right:87.5%;left:auto}.ant-col-xxxl-pull-21.ant-col-rtl{right:auto;left:87.5%}.ant-col-xxxl-offset-21.ant-col-rtl{margin-right:87.5%;margin-left:0}.ant-col-xxxl-push-22.ant-col-rtl{right:91.66666667%;left:auto}.ant-col-xxxl-pull-22.ant-col-rtl{right:auto;left:91.66666667%}.ant-col-xxxl-offset-22.ant-col-rtl{margin-right:91.66666667%;margin-left:0}.ant-col-xxxl-push-23.ant-col-rtl{right:95.83333333%;left:auto}.ant-col-xxxl-pull-23.ant-col-rtl{right:auto;left:95.83333333%}.ant-col-xxxl-offset-23.ant-col-rtl{margin-right:95.83333333%;margin-left:0}.ant-col-xxxl-push-24.ant-col-rtl{right:100%;left:auto}.ant-col-xxxl-pull-24.ant-col-rtl{right:auto;left:100%}.ant-col-xxxl-offset-24.ant-col-rtl{margin-right:100%;margin-left:0}}.ant-row-rtl{direction:rtl}.ant-image{position:relative;display:inline-block}.ant-image-img{width:100%;height:auto;vertical-align:middle}.ant-image-img-placeholder{background-color:#f5f5f5;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=);background-repeat:no-repeat;background-position:center center;background-size:30%}.ant-image-mask{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;color:#fff;background:#00000080;cursor:pointer;opacity:0;transition:opacity .3s}.ant-image-mask-info{padding:0 4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ant-image-mask-info .anticon{margin-inline-end:4px}.ant-image-mask:hover{opacity:1}.ant-image-placeholder{position:absolute;top:0;right:0;bottom:0;left:0}.ant-image-preview{pointer-events:none;height:100%;text-align:center}.ant-image-preview.ant-zoom-enter,.ant-image-preview.antzoom-appear{transform:none;opacity:0;animation-duration:.3s;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-image-preview-mask{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;height:100%;background-color:#00000073}.ant-image-preview-mask-hidden{display:none}.ant-image-preview-wrap{position:fixed;top:0;right:0;bottom:0;left:0;overflow:auto;outline:0;-webkit-overflow-scrolling:touch}.ant-image-preview-body{position:absolute;top:0;right:0;bottom:0;left:0;overflow:hidden}.ant-image-preview-img{max-width:100%;max-height:100%;vertical-align:middle;transform:scaleZ(1);cursor:grab;transition:transform .3s cubic-bezier(.215,.61,.355,1) 0s;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:auto}.ant-image-preview-img-wrapper{position:absolute;top:0;right:0;bottom:0;left:0;transition:transform .3s cubic-bezier(.215,.61,.355,1) 0s}.ant-image-preview-img-wrapper:before{display:inline-block;width:1px;height:50%;margin-right:-1px;content:""}.ant-image-preview-moving .ant-image-preview-img{cursor:grabbing}.ant-image-preview-moving .ant-image-preview-img-wrapper{transition-duration:0s}.ant-image-preview-wrap{z-index:1080}.ant-image-preview-operations{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;font-feature-settings:"tnum";position:absolute;top:0;right:0;z-index:1;display:flex;flex-direction:row-reverse;align-items:center;width:100%;color:#ffffffd9;list-style:none;background:#0000001a;pointer-events:auto}.ant-image-preview-operations-operation{margin-left:12px;padding:12px;cursor:pointer}.ant-image-preview-operations-operation-disabled{color:#ffffff40;pointer-events:none}.ant-image-preview-operations-operation:last-of-type{margin-left:0}.ant-image-preview-operations-icon{font-size:18px}.ant-image-preview-switch-left,.ant-image-preview-switch-right{position:absolute;top:50%;right:10px;z-index:1;display:flex;align-items:center;justify-content:center;width:44px;height:44px;margin-top:-22px;color:#ffffffd9;background:#0000001a;border-radius:50%;cursor:pointer;pointer-events:auto}.ant-image-preview-switch-left-disabled,.ant-image-preview-switch-right-disabled{color:#ffffff40;cursor:not-allowed}.ant-image-preview-switch-left-disabled>.anticon,.ant-image-preview-switch-right-disabled>.anticon{cursor:not-allowed}.ant-image-preview-switch-left>.anticon,.ant-image-preview-switch-right>.anticon{font-size:18px}.ant-image-preview-switch-left{left:10px}.ant-image-preview-switch-right{right:10px}.ant-input-affix-wrapper{position:relative;display:inline-block;width:100%;min-width:0;padding:10px;color:#000000d9;font-size:14px;line-height:1.5715;background-color:#fff;background-image:none;border:1px solid #d9d9d9;border-radius:5px;transition:all .3s;display:inline-flex}.ant-input-affix-wrapper::-moz-placeholder{opacity:1}.ant-input-affix-wrapper::placeholder{color:#bfbfbf;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-input-affix-wrapper:-moz-placeholder{text-overflow:ellipsis}.ant-input-affix-wrapper:placeholder-shown{text-overflow:ellipsis}.ant-input-affix-wrapper:hover{border-color:#998165;border-right-width:1px!important}.ant-input-rtl .ant-input-affix-wrapper:hover{border-right-width:0;border-left-width:1px!important}.ant-input-affix-wrapper:focus,.ant-input-affix-wrapper-focused{border-color:#998165;box-shadow:0 0 0 2px #8d6a4633;border-right-width:1px!important;outline:0}.ant-input-rtl .ant-input-affix-wrapper:focus,.ant-input-rtl .ant-input-affix-wrapper-focused{border-right-width:0;border-left-width:1px!important}.ant-input-affix-wrapper-disabled{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;box-shadow:none;cursor:not-allowed;opacity:1}.ant-input-affix-wrapper-disabled:hover{border-color:#d9d9d9;border-right-width:1px!important}.ant-input-affix-wrapper[disabled]{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;box-shadow:none;cursor:not-allowed;opacity:1}.ant-input-affix-wrapper[disabled]:hover{border-color:#d9d9d9;border-right-width:1px!important}.ant-input-affix-wrapper-borderless,.ant-input-affix-wrapper-borderless:hover,.ant-input-affix-wrapper-borderless:focus,.ant-input-affix-wrapper-borderless-focused,.ant-input-affix-wrapper-borderless-disabled,.ant-input-affix-wrapper-borderless[disabled]{background-color:transparent;border:none;box-shadow:none}textarea.ant-input-affix-wrapper{max-width:100%;height:auto;min-height:32px;line-height:1.5715;vertical-align:bottom;transition:all .3s,height 0s}.ant-input-affix-wrapper-lg{padding:7.5px 11px;font-size:16px}.ant-input-affix-wrapper-sm{padding:0 7px}.ant-input-affix-wrapper-rtl{direction:rtl}.ant-input-affix-wrapper:not(.ant-input-affix-wrapper-disabled):hover{border-color:#998165;border-right-width:1px!important;z-index:1}.ant-input-rtl .ant-input-affix-wrapper:not(.ant-input-affix-wrapper-disabled):hover{border-right-width:0;border-left-width:1px!important}.ant-input-search-with-button .ant-input-affix-wrapper:not(.ant-input-affix-wrapper-disabled):hover{z-index:0}.ant-input-affix-wrapper-focused,.ant-input-affix-wrapper:focus{z-index:1}.ant-input-affix-wrapper-disabled .ant-input[disabled]{background:transparent}.ant-input-affix-wrapper>input.ant-input{padding:0;border:none;outline:none}.ant-input-affix-wrapper>input.ant-input:focus{box-shadow:none!important}.ant-input-affix-wrapper:before{width:0;visibility:hidden;content:" "}.ant-input-prefix,.ant-input-suffix{display:flex;flex:none;align-items:center}.ant-input-show-count-suffix{color:#00000073}.ant-input-show-count-has-suffix{margin-right:2px}.ant-input-prefix{margin-right:4px}.ant-input-suffix{margin-left:4px}.anticon.ant-input-clear-icon{margin:0;color:#00000040;font-size:12px;vertical-align:-1px;cursor:pointer;transition:color .3s}.anticon.ant-input-clear-icon:hover{color:#00000073}.anticon.ant-input-clear-icon:active{color:#000000d9}.anticon.ant-input-clear-icon-hidden{visibility:hidden}.anticon.ant-input-clear-icon-has-suffix{margin:0 4px}.ant-input-affix-wrapper-textarea-with-clear-btn{padding:0!important;border:0!important}.ant-input-affix-wrapper-textarea-with-clear-btn .ant-input-clear-icon{position:absolute;top:8px;right:8px;z-index:1}.ant-input{box-sizing:border-box;margin:0;font-variant:tabular-nums;list-style:none;font-feature-settings:"tnum";position:relative;display:inline-block;width:100%;min-width:0;padding:10px;color:#000000d9;font-size:14px;line-height:1.5715;background-color:#fff;background-image:none;border:1px solid #d9d9d9;border-radius:5px;transition:all .3s}.ant-input::-moz-placeholder{opacity:1}.ant-input::placeholder{color:#bfbfbf;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-input:-moz-placeholder{text-overflow:ellipsis}.ant-input:placeholder-shown{text-overflow:ellipsis}.ant-input:hover{border-color:#998165;border-right-width:1px!important}.ant-input-rtl .ant-input:hover{border-right-width:0;border-left-width:1px!important}.ant-input:focus,.ant-input-focused{border-color:#998165;box-shadow:0 0 0 2px #8d6a4633;border-right-width:1px!important;outline:0}.ant-input-rtl .ant-input:focus,.ant-input-rtl .ant-input-focused{border-right-width:0;border-left-width:1px!important}.ant-input-disabled{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;box-shadow:none;cursor:not-allowed;opacity:1}.ant-input-disabled:hover{border-color:#d9d9d9;border-right-width:1px!important}.ant-input[disabled]{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;box-shadow:none;cursor:not-allowed;opacity:1}.ant-input[disabled]:hover{border-color:#d9d9d9;border-right-width:1px!important}.ant-input-borderless,.ant-input-borderless:hover,.ant-input-borderless:focus,.ant-input-borderless-focused,.ant-input-borderless-disabled,.ant-input-borderless[disabled]{background-color:transparent;border:none;box-shadow:none}textarea.ant-input{max-width:100%;height:auto;min-height:32px;line-height:1.5715;vertical-align:bottom;transition:all .3s,height 0s}.ant-input-lg{padding:7.5px 11px;font-size:16px}.ant-input-sm{padding:0 7px}.ant-input-rtl{direction:rtl}.ant-input-group{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:relative;display:table;width:100%;border-collapse:separate;border-spacing:0}.ant-input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.ant-input-group>[class*=col-]{padding-right:8px}.ant-input-group>[class*=col-]:last-child{padding-right:0}.ant-input-group-addon,.ant-input-group-wrap,.ant-input-group>.ant-input{display:table-cell}.ant-input-group-addon:not(:first-child):not(:last-child),.ant-input-group-wrap:not(:first-child):not(:last-child),.ant-input-group>.ant-input:not(:first-child):not(:last-child){border-radius:0}.ant-input-group-addon,.ant-input-group-wrap{width:1px;white-space:nowrap;vertical-align:middle}.ant-input-group-wrap>*{display:block!important}.ant-input-group .ant-input{float:left;width:100%;margin-bottom:0;text-align:inherit}.ant-input-group .ant-input:focus{z-index:1;border-right-width:1px}.ant-input-group .ant-input:hover{z-index:1;border-right-width:1px}.ant-input-search-with-button .ant-input-group .ant-input:hover{z-index:0}.ant-input-group-addon{position:relative;padding:0 10px;color:#000000d9;font-weight:400;font-size:14px;text-align:center;background-color:#fafafa;border:1px solid #d9d9d9;border-radius:5px;transition:all .3s}.ant-input-group-addon .ant-select{margin:-11px -10px}.ant-input-group-addon .ant-select.ant-select-single:not(.ant-select-customize-input) .ant-select-selector{background-color:inherit;border:1px solid transparent;box-shadow:none}.ant-input-group-addon .ant-select-open .ant-select-selector,.ant-input-group-addon .ant-select-focused .ant-select-selector{color:#8d6a46}.ant-input-group-addon .ant-cascader-picker{margin:-9px -12px;background-color:transparent}.ant-input-group-addon .ant-cascader-picker .ant-cascader-input{text-align:left;border:0;box-shadow:none}.ant-input-group>.ant-input:first-child,.ant-input-group-addon:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.ant-input-group>.ant-input:first-child .ant-select .ant-select-selector,.ant-input-group-addon:first-child .ant-select .ant-select-selector{border-top-right-radius:0;border-bottom-right-radius:0}.ant-input-group>.ant-input-affix-wrapper:not(:first-child) .ant-input{border-top-left-radius:0;border-bottom-left-radius:0}.ant-input-group>.ant-input-affix-wrapper:not(:last-child) .ant-input{border-top-right-radius:0;border-bottom-right-radius:0}.ant-input-group-addon:first-child{border-right:0}.ant-input-group-addon:last-child{border-left:0}.ant-input-group>.ant-input:last-child,.ant-input-group-addon:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.ant-input-group>.ant-input:last-child .ant-select .ant-select-selector,.ant-input-group-addon:last-child .ant-select .ant-select-selector{border-top-left-radius:0;border-bottom-left-radius:0}.ant-input-group-lg .ant-input,.ant-input-group-lg>.ant-input-group-addon{padding:7.5px 11px;font-size:16px}.ant-input-group-sm .ant-input,.ant-input-group-sm>.ant-input-group-addon{padding:0 7px}.ant-input-group-lg .ant-select-single .ant-select-selector{height:42px}.ant-input-group-sm .ant-select-single .ant-select-selector{height:24px}.ant-input-group .ant-input-affix-wrapper:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.ant-input-search .ant-input-group .ant-input-affix-wrapper:not(:last-child){border-top-left-radius:5px;border-bottom-left-radius:5px}.ant-input-group .ant-input-affix-wrapper:not(:first-child),.ant-input-search .ant-input-group .ant-input-affix-wrapper:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.ant-input-group.ant-input-group-compact{display:block}.ant-input-group.ant-input-group-compact:before{display:table;content:""}.ant-input-group.ant-input-group-compact:after{display:table;clear:both;content:""}.ant-input-group.ant-input-group-compact-addon:not(:first-child):not(:last-child),.ant-input-group.ant-input-group-compact-wrap:not(:first-child):not(:last-child),.ant-input-group.ant-input-group-compact>.ant-input:not(:first-child):not(:last-child){border-right-width:1px}.ant-input-group.ant-input-group-compact-addon:not(:first-child):not(:last-child):hover,.ant-input-group.ant-input-group-compact-wrap:not(:first-child):not(:last-child):hover,.ant-input-group.ant-input-group-compact>.ant-input:not(:first-child):not(:last-child):hover{z-index:1}.ant-input-group.ant-input-group-compact-addon:not(:first-child):not(:last-child):focus,.ant-input-group.ant-input-group-compact-wrap:not(:first-child):not(:last-child):focus,.ant-input-group.ant-input-group-compact>.ant-input:not(:first-child):not(:last-child):focus{z-index:1}.ant-input-group.ant-input-group-compact>*{display:inline-block;float:none;vertical-align:top;border-radius:0}.ant-input-group.ant-input-group-compact>.ant-input-affix-wrapper{display:inline-flex}.ant-input-group.ant-input-group-compact>.ant-picker-range{display:inline-flex}.ant-input-group.ant-input-group-compact>*:not(:last-child){margin-right:-1px;border-right-width:1px}.ant-input-group.ant-input-group-compact .ant-input{float:none}.ant-input-group.ant-input-group-compact>.ant-select>.ant-select-selector,.ant-input-group.ant-input-group-compact>.ant-select-auto-complete .ant-input,.ant-input-group.ant-input-group-compact>.ant-cascader-picker .ant-input,.ant-input-group.ant-input-group-compact>.ant-input-group-wrapper .ant-input{border-right-width:1px;border-radius:0}.ant-input-group.ant-input-group-compact>.ant-select>.ant-select-selector:hover,.ant-input-group.ant-input-group-compact>.ant-select-auto-complete .ant-input:hover,.ant-input-group.ant-input-group-compact>.ant-cascader-picker .ant-input:hover,.ant-input-group.ant-input-group-compact>.ant-input-group-wrapper .ant-input:hover{z-index:1}.ant-input-group.ant-input-group-compact>.ant-select>.ant-select-selector:focus,.ant-input-group.ant-input-group-compact>.ant-select-auto-complete .ant-input:focus,.ant-input-group.ant-input-group-compact>.ant-cascader-picker .ant-input:focus,.ant-input-group.ant-input-group-compact>.ant-input-group-wrapper .ant-input:focus{z-index:1}.ant-input-group.ant-input-group-compact>.ant-select-focused{z-index:1}.ant-input-group.ant-input-group-compact>.ant-select>.ant-select-arrow{z-index:1}.ant-input-group.ant-input-group-compact>*:first-child,.ant-input-group.ant-input-group-compact>.ant-select:first-child>.ant-select-selector,.ant-input-group.ant-input-group-compact>.ant-select-auto-complete:first-child .ant-input,.ant-input-group.ant-input-group-compact>.ant-cascader-picker:first-child .ant-input{border-top-left-radius:5px;border-bottom-left-radius:5px}.ant-input-group.ant-input-group-compact>*:last-child,.ant-input-group.ant-input-group-compact>.ant-select:last-child>.ant-select-selector,.ant-input-group.ant-input-group-compact>.ant-cascader-picker:last-child .ant-input,.ant-input-group.ant-input-group-compact>.ant-cascader-picker-focused:last-child .ant-input{border-right-width:1px;border-top-right-radius:5px;border-bottom-right-radius:5px}.ant-input-group.ant-input-group-compact>.ant-select-auto-complete .ant-input{vertical-align:top}.ant-input-group.ant-input-group-compact .ant-input-group-wrapper+.ant-input-group-wrapper{margin-left:-1px}.ant-input-group.ant-input-group-compact .ant-input-group-wrapper+.ant-input-group-wrapper .ant-input-affix-wrapper{border-radius:0}.ant-input-group.ant-input-group-compact .ant-input-group-wrapper:not(:last-child).ant-input-search>.ant-input-group>.ant-input-group-addon>.ant-input-search-button{border-radius:0}.ant-input-group.ant-input-group-compact .ant-input-group-wrapper:not(:last-child).ant-input-search>.ant-input-group>.ant-input{border-radius:5px 0 0 5px}.ant-input-group>.ant-input-rtl:first-child,.ant-input-group-rtl .ant-input-group-addon:first-child{border-radius:0 5px 5px 0}.ant-input-group-rtl .ant-input-group-addon:first-child{border-right:1px solid #d9d9d9;border-left:0}.ant-input-group-rtl .ant-input-group-addon:last-child{border-right:0;border-left:1px solid #d9d9d9}.ant-input-group-rtl.ant-input-group>.ant-input:last-child,.ant-input-group-rtl.ant-input-group-addon:last-child{border-radius:5px 0 0 5px}.ant-input-group-rtl.ant-input-group .ant-input-affix-wrapper:not(:first-child){border-radius:5px 0 0 5px}.ant-input-group-rtl.ant-input-group .ant-input-affix-wrapper:not(:last-child){border-radius:0 5px 5px 0}.ant-input-group-rtl.ant-input-group.ant-input-group-compact>*:not(:last-child){margin-right:0;margin-left:-1px;border-left-width:1px}.ant-input-group-rtl.ant-input-group.ant-input-group-compact>*:first-child,.ant-input-group-rtl.ant-input-group.ant-input-group-compact>.ant-select:first-child>.ant-select-selector,.ant-input-group-rtl.ant-input-group.ant-input-group-compact>.ant-select-auto-complete:first-child .ant-input,.ant-input-group-rtl.ant-input-group.ant-input-group-compact>.ant-cascader-picker:first-child .ant-input{border-radius:0 5px 5px 0}.ant-input-group-rtl.ant-input-group.ant-input-group-compact>*:last-child,.ant-input-group-rtl.ant-input-group.ant-input-group-compact>.ant-select:last-child>.ant-select-selector,.ant-input-group-rtl.ant-input-group.ant-input-group-compact>.ant-select-auto-complete:last-child .ant-input,.ant-input-group-rtl.ant-input-group.ant-input-group-compact>.ant-cascader-picker:last-child .ant-input,.ant-input-group-rtl.ant-input-group.ant-input-group-compact>.ant-cascader-picker-focused:last-child .ant-input{border-left-width:1px;border-radius:5px 0 0 5px}.ant-input-group.ant-input-group-compact .ant-input-group-wrapper-rtl+.ant-input-group-wrapper-rtl{margin-right:-1px;margin-left:0}.ant-input-group.ant-input-group-compact .ant-input-group-wrapper-rtl:not(:last-child).ant-input-search>.ant-input-group>.ant-input{border-radius:0 5px 5px 0}.ant-input-group-wrapper{display:inline-block;width:100%;text-align:start;vertical-align:top}.ant-input-password-icon{color:#00000073;cursor:pointer;transition:all .3s}.ant-input-password-icon:hover{color:#000000d9}.ant-input[type=color]{height:32px}.ant-input[type=color].ant-input-lg{height:42px}.ant-input[type=color].ant-input-sm{height:24px;padding-top:3px;padding-bottom:3px}.ant-input-textarea-show-count>.ant-input{height:100%}.ant-input-textarea-show-count:after{float:right;color:#00000073;white-space:nowrap;content:attr(data-count);pointer-events:none}.ant-input-search .ant-input:hover,.ant-input-search .ant-input:focus{border-color:#998165}.ant-input-search .ant-input:hover+.ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary),.ant-input-search .ant-input:focus+.ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary){border-left-color:#998165}.ant-input-search .ant-input-affix-wrapper{border-radius:0}.ant-input-search .ant-input-lg{line-height:1.5713}.ant-input-search>.ant-input-group>.ant-input-group-addon:last-child{left:-1px;padding:0;border:0}.ant-input-search>.ant-input-group>.ant-input-group-addon:last-child .ant-input-search-button{padding-top:0;padding-bottom:0;border-radius:0 5px 5px 0}.ant-input-search>.ant-input-group>.ant-input-group-addon:last-child .ant-input-search-button:not(.ant-btn-primary){color:#00000073}.ant-input-search>.ant-input-group>.ant-input-group-addon:last-child .ant-input-search-button:not(.ant-btn-primary).ant-btn-loading:before{top:0;right:0;bottom:0;left:0}.ant-input-search-button{height:32px}.ant-input-search-button:hover,.ant-input-search-button:focus{z-index:1}.ant-input-search-large .ant-input-search-button{height:42px}.ant-input-search-small .ant-input-search-button{height:24px}.ant-input-group-wrapper-rtl,.ant-input-group-rtl{direction:rtl}.ant-input-affix-wrapper.ant-input-affix-wrapper-rtl>input.ant-input{border:none;outline:none}.ant-input-affix-wrapper-rtl .ant-input-prefix{margin:0 0 0 4px}.ant-input-affix-wrapper-rtl .ant-input-suffix{margin:0 4px 0 0}.ant-input-textarea-rtl{direction:rtl}.ant-input-textarea-rtl.ant-input-textarea-show-count:after{text-align:left}.ant-input-affix-wrapper-rtl .ant-input-clear-icon-has-suffix{margin-right:0;margin-left:4px}.ant-input-affix-wrapper-rtl .ant-input-clear-icon{right:auto;left:8px}.ant-input-search-rtl{direction:rtl}.ant-input-search-rtl .ant-input:hover+.ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary),.ant-input-search-rtl .ant-input:focus+.ant-input-group-addon .ant-input-search-button:not(.ant-btn-primary){border-right-color:#998165;border-left-color:#d9d9d9}.ant-input-search-rtl>.ant-input-group>.ant-input-affix-wrapper:hover,.ant-input-search-rtl>.ant-input-group>.ant-input-affix-wrapper-focused{border-right-color:#998165}.ant-input-search-rtl>.ant-input-group>.ant-input-group-addon{right:-1px;left:auto}.ant-input-search-rtl>.ant-input-group>.ant-input-group-addon .ant-input-search-button{border-radius:5px 0 0 5px}@media screen and (-ms-high-contrast: active),(-ms-high-contrast: none){.ant-input{height:32px}.ant-input-lg{height:42px}.ant-input-sm{height:24px}.ant-input-affix-wrapper>input.ant-input{height:auto}}.ant-input-number-affix-wrapper{position:relative;display:inline-block;width:100%;min-width:0;color:#000000d9;font-size:14px;line-height:1.5715;background-color:#fff;background-image:none;border:1px solid #d9d9d9;border-radius:5px;transition:all .3s;position:static;display:inline-flex;width:90px;padding:0;padding-inline-start:10px}.ant-input-number-affix-wrapper::-moz-placeholder{opacity:1}.ant-input-number-affix-wrapper::placeholder{color:#bfbfbf;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-input-number-affix-wrapper:-moz-placeholder{text-overflow:ellipsis}.ant-input-number-affix-wrapper:placeholder-shown{text-overflow:ellipsis}.ant-input-number-affix-wrapper:hover{border-color:#998165;border-right-width:1px!important}.ant-input-rtl .ant-input-number-affix-wrapper:hover{border-right-width:0;border-left-width:1px!important}.ant-input-number-affix-wrapper:focus,.ant-input-number-affix-wrapper-focused{border-color:#998165;box-shadow:0 0 0 2px #8d6a4633;border-right-width:1px!important;outline:0}.ant-input-rtl .ant-input-number-affix-wrapper:focus,.ant-input-rtl .ant-input-number-affix-wrapper-focused{border-right-width:0;border-left-width:1px!important}.ant-input-number-affix-wrapper-disabled{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;box-shadow:none;cursor:not-allowed;opacity:1}.ant-input-number-affix-wrapper-disabled:hover{border-color:#d9d9d9;border-right-width:1px!important}.ant-input-number-affix-wrapper[disabled]{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;box-shadow:none;cursor:not-allowed;opacity:1}.ant-input-number-affix-wrapper[disabled]:hover{border-color:#d9d9d9;border-right-width:1px!important}.ant-input-number-affix-wrapper-borderless,.ant-input-number-affix-wrapper-borderless:hover,.ant-input-number-affix-wrapper-borderless:focus,.ant-input-number-affix-wrapper-borderless-focused,.ant-input-number-affix-wrapper-borderless-disabled,.ant-input-number-affix-wrapper-borderless[disabled]{background-color:transparent;border:none;box-shadow:none}textarea.ant-input-number-affix-wrapper{max-width:100%;height:auto;min-height:32px;line-height:1.5715;vertical-align:bottom;transition:all .3s,height 0s}.ant-input-number-affix-wrapper-lg{padding:7.5px 11px;font-size:16px}.ant-input-number-affix-wrapper-sm{padding:0 7px}.ant-input-number-affix-wrapper-rtl{direction:rtl}.ant-input-number-affix-wrapper:not(.ant-input-number-affix-wrapper-disabled):hover{border-color:#998165;border-right-width:1px!important;z-index:1}.ant-input-rtl .ant-input-number-affix-wrapper:not(.ant-input-number-affix-wrapper-disabled):hover{border-right-width:0;border-left-width:1px!important}.ant-input-number-affix-wrapper-focused,.ant-input-number-affix-wrapper:focus{z-index:1}.ant-input-number-affix-wrapper-disabled .ant-input-number[disabled]{background:transparent}.ant-input-number-affix-wrapper>div.ant-input-number{width:100%;border:none;outline:none}.ant-input-number-affix-wrapper>div.ant-input-number.ant-input-number-focused{box-shadow:none!important}.ant-input-number-affix-wrapper input.ant-input-number-input{padding:0}.ant-input-number-affix-wrapper:before{width:0;visibility:hidden;content:" "}.ant-input-number-prefix{display:flex;flex:none;align-items:center;margin-inline-end:4px}.ant-input-number-group-wrapper .ant-input-number-affix-wrapper{width:100%}.ant-input-number{box-sizing:border-box;font-variant:tabular-nums;list-style:none;font-feature-settings:"tnum";position:relative;width:100%;min-width:0;color:#000000d9;font-size:14px;line-height:1.5715;background-color:#fff;background-image:none;transition:all .3s;display:inline-block;width:90px;margin:0;padding:0;border:1px solid #d9d9d9;border-radius:5px}.ant-input-number::-moz-placeholder{opacity:1}.ant-input-number::placeholder{color:#bfbfbf;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-input-number:-moz-placeholder{text-overflow:ellipsis}.ant-input-number:placeholder-shown{text-overflow:ellipsis}.ant-input-rtl .ant-input-number:hover{border-right-width:0;border-left-width:1px!important}.ant-input-number:focus,.ant-input-number-focused{border-color:#998165;box-shadow:0 0 0 2px #8d6a4633;border-right-width:1px!important;outline:0}.ant-input-rtl .ant-input-number:focus,.ant-input-rtl .ant-input-number-focused{border-right-width:0;border-left-width:1px!important}.ant-input-number[disabled]{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;box-shadow:none;cursor:not-allowed;opacity:1}.ant-input-number[disabled]:hover{border-color:#d9d9d9;border-right-width:1px!important}.ant-input-number-borderless,.ant-input-number-borderless:hover,.ant-input-number-borderless:focus,.ant-input-number-borderless-focused,.ant-input-number-borderless-disabled,.ant-input-number-borderless[disabled]{background-color:transparent;border:none;box-shadow:none}textarea.ant-input-number{max-width:100%;height:auto;min-height:32px;line-height:1.5715;vertical-align:bottom;transition:all .3s,height 0s}.ant-input-number-lg{padding:7.5px 11px;font-size:16px}.ant-input-number-sm{padding:0 7px}.ant-input-number-group{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:relative;display:table;width:100%;border-collapse:separate;border-spacing:0}.ant-input-number-group[class*=col-]{float:none;padding-right:0;padding-left:0}.ant-input-number-group>[class*=col-]{padding-right:8px}.ant-input-number-group>[class*=col-]:last-child{padding-right:0}.ant-input-number-group-addon,.ant-input-number-group-wrap,.ant-input-number-group>.ant-input-number{display:table-cell}.ant-input-number-group-addon:not(:first-child):not(:last-child),.ant-input-number-group-wrap:not(:first-child):not(:last-child),.ant-input-number-group>.ant-input-number:not(:first-child):not(:last-child){border-radius:0}.ant-input-number-group-addon,.ant-input-number-group-wrap{width:1px;white-space:nowrap;vertical-align:middle}.ant-input-number-group-wrap>*{display:block!important}.ant-input-number-group .ant-input-number{float:left;width:100%;margin-bottom:0;text-align:inherit}.ant-input-number-group .ant-input-number:focus{z-index:1;border-right-width:1px}.ant-input-number-group .ant-input-number:hover{z-index:1;border-right-width:1px}.ant-input-search-with-button .ant-input-number-group .ant-input-number:hover{z-index:0}.ant-input-number-group-addon{position:relative;padding:0 10px;color:#000000d9;font-weight:400;font-size:14px;text-align:center;background-color:#fafafa;border:1px solid #d9d9d9;border-radius:5px;transition:all .3s}.ant-input-number-group-addon .ant-select{margin:-11px -10px}.ant-input-number-group-addon .ant-select.ant-select-single:not(.ant-select-customize-input) .ant-select-selector{background-color:inherit;border:1px solid transparent;box-shadow:none}.ant-input-number-group-addon .ant-select-open .ant-select-selector,.ant-input-number-group-addon .ant-select-focused .ant-select-selector{color:#8d6a46}.ant-input-number-group-addon .ant-cascader-picker{margin:-9px -12px;background-color:transparent}.ant-input-number-group-addon .ant-cascader-picker .ant-cascader-input{text-align:left;border:0;box-shadow:none}.ant-input-number-group>.ant-input-number:first-child,.ant-input-number-group-addon:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.ant-input-number-group>.ant-input-number:first-child .ant-select .ant-select-selector,.ant-input-number-group-addon:first-child .ant-select .ant-select-selector{border-top-right-radius:0;border-bottom-right-radius:0}.ant-input-number-group>.ant-input-number-affix-wrapper:not(:first-child) .ant-input-number{border-top-left-radius:0;border-bottom-left-radius:0}.ant-input-number-group>.ant-input-number-affix-wrapper:not(:last-child) .ant-input-number{border-top-right-radius:0;border-bottom-right-radius:0}.ant-input-number-group-addon:first-child{border-right:0}.ant-input-number-group-addon:last-child{border-left:0}.ant-input-number-group>.ant-input-number:last-child,.ant-input-number-group-addon:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.ant-input-number-group>.ant-input-number:last-child .ant-select .ant-select-selector,.ant-input-number-group-addon:last-child .ant-select .ant-select-selector{border-top-left-radius:0;border-bottom-left-radius:0}.ant-input-number-group-lg .ant-input-number,.ant-input-number-group-lg>.ant-input-number-group-addon{padding:7.5px 11px;font-size:16px}.ant-input-number-group-sm .ant-input-number,.ant-input-number-group-sm>.ant-input-number-group-addon{padding:0 7px}.ant-input-number-group-lg .ant-select-single .ant-select-selector{height:42px}.ant-input-number-group-sm .ant-select-single .ant-select-selector{height:24px}.ant-input-number-group .ant-input-number-affix-wrapper:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.ant-input-search .ant-input-number-group .ant-input-number-affix-wrapper:not(:last-child){border-top-left-radius:5px;border-bottom-left-radius:5px}.ant-input-number-group .ant-input-number-affix-wrapper:not(:first-child),.ant-input-search .ant-input-number-group .ant-input-number-affix-wrapper:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.ant-input-number-group.ant-input-number-group-compact{display:block}.ant-input-number-group.ant-input-number-group-compact:before{display:table;content:""}.ant-input-number-group.ant-input-number-group-compact:after{display:table;clear:both;content:""}.ant-input-number-group.ant-input-number-group-compact-addon:not(:first-child):not(:last-child),.ant-input-number-group.ant-input-number-group-compact-wrap:not(:first-child):not(:last-child),.ant-input-number-group.ant-input-number-group-compact>.ant-input-number:not(:first-child):not(:last-child){border-right-width:1px}.ant-input-number-group.ant-input-number-group-compact-addon:not(:first-child):not(:last-child):hover,.ant-input-number-group.ant-input-number-group-compact-wrap:not(:first-child):not(:last-child):hover,.ant-input-number-group.ant-input-number-group-compact>.ant-input-number:not(:first-child):not(:last-child):hover{z-index:1}.ant-input-number-group.ant-input-number-group-compact-addon:not(:first-child):not(:last-child):focus,.ant-input-number-group.ant-input-number-group-compact-wrap:not(:first-child):not(:last-child):focus,.ant-input-number-group.ant-input-number-group-compact>.ant-input-number:not(:first-child):not(:last-child):focus{z-index:1}.ant-input-number-group.ant-input-number-group-compact>*{display:inline-block;float:none;vertical-align:top;border-radius:0}.ant-input-number-group.ant-input-number-group-compact>.ant-input-number-affix-wrapper{display:inline-flex}.ant-input-number-group.ant-input-number-group-compact>.ant-picker-range{display:inline-flex}.ant-input-number-group.ant-input-number-group-compact>*:not(:last-child){margin-right:-1px;border-right-width:1px}.ant-input-number-group.ant-input-number-group-compact .ant-input-number{float:none}.ant-input-number-group.ant-input-number-group-compact>.ant-select>.ant-select-selector,.ant-input-number-group.ant-input-number-group-compact>.ant-select-auto-complete .ant-input,.ant-input-number-group.ant-input-number-group-compact>.ant-cascader-picker .ant-input,.ant-input-number-group.ant-input-number-group-compact>.ant-input-group-wrapper .ant-input{border-right-width:1px;border-radius:0}.ant-input-number-group.ant-input-number-group-compact>.ant-select>.ant-select-selector:hover,.ant-input-number-group.ant-input-number-group-compact>.ant-select-auto-complete .ant-input:hover,.ant-input-number-group.ant-input-number-group-compact>.ant-cascader-picker .ant-input:hover,.ant-input-number-group.ant-input-number-group-compact>.ant-input-group-wrapper .ant-input:hover{z-index:1}.ant-input-number-group.ant-input-number-group-compact>.ant-select>.ant-select-selector:focus,.ant-input-number-group.ant-input-number-group-compact>.ant-select-auto-complete .ant-input:focus,.ant-input-number-group.ant-input-number-group-compact>.ant-cascader-picker .ant-input:focus,.ant-input-number-group.ant-input-number-group-compact>.ant-input-group-wrapper .ant-input:focus{z-index:1}.ant-input-number-group.ant-input-number-group-compact>.ant-select-focused{z-index:1}.ant-input-number-group.ant-input-number-group-compact>.ant-select>.ant-select-arrow{z-index:1}.ant-input-number-group.ant-input-number-group-compact>*:first-child,.ant-input-number-group.ant-input-number-group-compact>.ant-select:first-child>.ant-select-selector,.ant-input-number-group.ant-input-number-group-compact>.ant-select-auto-complete:first-child .ant-input,.ant-input-number-group.ant-input-number-group-compact>.ant-cascader-picker:first-child .ant-input{border-top-left-radius:5px;border-bottom-left-radius:5px}.ant-input-number-group.ant-input-number-group-compact>*:last-child,.ant-input-number-group.ant-input-number-group-compact>.ant-select:last-child>.ant-select-selector,.ant-input-number-group.ant-input-number-group-compact>.ant-cascader-picker:last-child .ant-input,.ant-input-number-group.ant-input-number-group-compact>.ant-cascader-picker-focused:last-child .ant-input{border-right-width:1px;border-top-right-radius:5px;border-bottom-right-radius:5px}.ant-input-number-group.ant-input-number-group-compact>.ant-select-auto-complete .ant-input{vertical-align:top}.ant-input-number-group.ant-input-number-group-compact .ant-input-group-wrapper+.ant-input-group-wrapper{margin-left:-1px}.ant-input-number-group.ant-input-number-group-compact .ant-input-group-wrapper+.ant-input-group-wrapper .ant-input-affix-wrapper{border-radius:0}.ant-input-number-group.ant-input-number-group-compact .ant-input-group-wrapper:not(:last-child).ant-input-search>.ant-input-group>.ant-input-group-addon>.ant-input-search-button{border-radius:0}.ant-input-number-group.ant-input-number-group-compact .ant-input-group-wrapper:not(:last-child).ant-input-search>.ant-input-group>.ant-input{border-radius:5px 0 0 5px}.ant-input-number-group>.ant-input-number-rtl:first-child,.ant-input-number-group-rtl .ant-input-number-group-addon:first-child{border-radius:0 5px 5px 0}.ant-input-number-group-rtl .ant-input-number-group-addon:first-child{border-right:1px solid #d9d9d9;border-left:0}.ant-input-number-group-rtl .ant-input-number-group-addon:last-child{border-right:0;border-left:1px solid #d9d9d9}.ant-input-number-group-rtl.ant-input-number-group>.ant-input-number:last-child,.ant-input-number-group-rtl.ant-input-number-group-addon:last-child{border-radius:5px 0 0 5px}.ant-input-number-group-rtl.ant-input-number-group .ant-input-number-affix-wrapper:not(:first-child){border-radius:5px 0 0 5px}.ant-input-number-group-rtl.ant-input-number-group .ant-input-number-affix-wrapper:not(:last-child){border-radius:0 5px 5px 0}.ant-input-number-group-rtl.ant-input-number-group.ant-input-number-group-compact>*:not(:last-child){margin-right:0;margin-left:-1px;border-left-width:1px}.ant-input-number-group-rtl.ant-input-number-group.ant-input-number-group-compact>*:first-child,.ant-input-number-group-rtl.ant-input-number-group.ant-input-number-group-compact>.ant-select:first-child>.ant-select-selector,.ant-input-number-group-rtl.ant-input-number-group.ant-input-number-group-compact>.ant-select-auto-complete:first-child .ant-input,.ant-input-number-group-rtl.ant-input-number-group.ant-input-number-group-compact>.ant-cascader-picker:first-child .ant-input{border-radius:0 5px 5px 0}.ant-input-number-group-rtl.ant-input-number-group.ant-input-number-group-compact>*:last-child,.ant-input-number-group-rtl.ant-input-number-group.ant-input-number-group-compact>.ant-select:last-child>.ant-select-selector,.ant-input-number-group-rtl.ant-input-number-group.ant-input-number-group-compact>.ant-select-auto-complete:last-child .ant-input,.ant-input-number-group-rtl.ant-input-number-group.ant-input-number-group-compact>.ant-cascader-picker:last-child .ant-input,.ant-input-number-group-rtl.ant-input-number-group.ant-input-number-group-compact>.ant-cascader-picker-focused:last-child .ant-input{border-left-width:1px;border-radius:5px 0 0 5px}.ant-input-number-group.ant-input-number-group-compact .ant-input-group-wrapper-rtl+.ant-input-group-wrapper-rtl{margin-right:-1px;margin-left:0}.ant-input-number-group.ant-input-number-group-compact .ant-input-group-wrapper-rtl:not(:last-child).ant-input-search>.ant-input-group>.ant-input{border-radius:0 5px 5px 0}.ant-input-number-group-wrapper{display:inline-block;text-align:start;vertical-align:top}.ant-input-number-handler{position:relative;display:block;width:100%;height:50%;overflow:hidden;color:#00000073;font-weight:700;line-height:0;text-align:center;border-left:1px solid #d9d9d9;transition:all .1s linear}.ant-input-number-handler:active{background:#f4f4f4}.ant-input-number-handler:hover .ant-input-number-handler-up-inner,.ant-input-number-handler:hover .ant-input-number-handler-down-inner{color:#998165}.ant-input-number-handler-up-inner,.ant-input-number-handler-down-inner{display:inline-block;color:inherit;font-style:normal;line-height:0;text-align:center;text-transform:none;vertical-align:-.125em;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:absolute;right:4px;width:12px;height:12px;color:#00000073;line-height:12px;transition:all .1s linear;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-input-number-handler-up-inner>*,.ant-input-number-handler-down-inner>*{line-height:1}.ant-input-number-handler-up-inner svg,.ant-input-number-handler-down-inner svg{display:inline-block}.ant-input-number-handler-up-inner:before,.ant-input-number-handler-down-inner:before{display:none}.ant-input-number-handler-up-inner .ant-input-number-handler-up-inner-icon,.ant-input-number-handler-up-inner .ant-input-number-handler-down-inner-icon,.ant-input-number-handler-down-inner .ant-input-number-handler-up-inner-icon,.ant-input-number-handler-down-inner .ant-input-number-handler-down-inner-icon{display:block}.ant-input-number:hover{border-color:#998165;border-right-width:1px!important}.ant-input-number:hover+.ant-form-item-children-icon{opacity:0;transition:opacity .24s linear .24s}.ant-input-number-focused{border-color:#998165;box-shadow:0 0 0 2px #8d6a4633;border-right-width:1px!important;outline:0}.ant-input-rtl .ant-input-number-focused{border-right-width:0;border-left-width:1px!important}.ant-input-number-disabled{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;box-shadow:none;cursor:not-allowed;opacity:1}.ant-input-number-disabled:hover{border-color:#d9d9d9;border-right-width:1px!important}.ant-input-number-disabled .ant-input-number-input{cursor:not-allowed}.ant-input-number-disabled .ant-input-number-handler-wrap,.ant-input-number-readonly .ant-input-number-handler-wrap{display:none}.ant-input-number-input{width:100%;height:30px;padding:0 11px;text-align:left;background-color:transparent;border:0;border-radius:5px;outline:0;transition:all .3s linear;-webkit-appearance:textfield!important;-moz-appearance:textfield!important;appearance:textfield!important}.ant-input-number-input::-moz-placeholder{opacity:1}.ant-input-number-input::placeholder{color:#bfbfbf;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-input-number-input:-moz-placeholder{text-overflow:ellipsis}.ant-input-number-input:placeholder-shown{text-overflow:ellipsis}.ant-input-number-input[type=number]::-webkit-inner-spin-button,.ant-input-number-input[type=number]::-webkit-outer-spin-button{margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.ant-input-number-lg{padding:0;font-size:16px}.ant-input-number-lg input{height:40px}.ant-input-number-sm{padding:0}.ant-input-number-sm input{height:22px;padding:0 7px}.ant-input-number-handler-wrap{position:absolute;top:0;right:0;width:22px;height:100%;background:#fff;border-radius:0 5px 5px 0;opacity:0;transition:opacity .24s linear .1s}.ant-input-number-handler-wrap .ant-input-number-handler .ant-input-number-handler-up-inner,.ant-input-number-handler-wrap .ant-input-number-handler .ant-input-number-handler-down-inner{display:flex;align-items:center;justify-content:center;min-width:auto;margin-right:0;font-size:7px}.ant-input-number-borderless .ant-input-number-handler-wrap{border-left-width:0}.ant-input-number-handler-wrap:hover .ant-input-number-handler{height:40%}.ant-input-number:hover .ant-input-number-handler-wrap,.ant-input-number-focused .ant-input-number-handler-wrap{opacity:1}.ant-input-number-handler-up{border-top-right-radius:5px;cursor:pointer}.ant-input-number-handler-up-inner{top:50%;margin-top:-5px;text-align:center}.ant-input-number-handler-up:hover{height:60%!important}.ant-input-number-handler-down{top:0;border-top:1px solid #d9d9d9;border-bottom-right-radius:5px;cursor:pointer}.ant-input-number-handler-down-inner{top:50%;text-align:center;transform:translateY(-50%)}.ant-input-number-handler-down:hover{height:60%!important}.ant-input-number-borderless .ant-input-number-handler-down{border-top-width:0}.ant-input-number-handler-up-disabled,.ant-input-number-handler-down-disabled{cursor:not-allowed}.ant-input-number-handler-up-disabled:hover .ant-input-number-handler-up-inner,.ant-input-number-handler-down-disabled:hover .ant-input-number-handler-down-inner{color:#00000040}.ant-input-number-borderless{box-shadow:none}.ant-input-number-out-of-range input{color:#e31a1a}.ant-input-number-rtl{direction:rtl}.ant-input-number-rtl .ant-input-number-handler{border-right:1px solid #d9d9d9;border-left:0}.ant-input-number-rtl .ant-input-number-handler-wrap{right:auto;left:0}.ant-input-number-rtl.ant-input-number-borderless .ant-input-number-handler-wrap{border-right-width:0}.ant-input-number-rtl .ant-input-number-handler-up{border-top-right-radius:0}.ant-input-number-rtl .ant-input-number-handler-down{border-bottom-right-radius:0}.ant-input-number-rtl .ant-input-number-input{direction:ltr;text-align:right}.ant-layout{display:flex;flex:auto;flex-direction:column;min-height:0;background:#f0f2f5}.ant-layout,.ant-layout *{box-sizing:border-box}.ant-layout.ant-layout-has-sider{flex-direction:row}.ant-layout.ant-layout-has-sider>.ant-layout,.ant-layout.ant-layout-has-sider>.ant-layout-content{width:0}.ant-layout-header,.ant-layout-footer{flex:0 0 auto}.ant-layout-header{height:64px;padding:0 50px;color:#000000d9;line-height:64px;background:#001529}.ant-layout-footer{padding:24px 50px;color:#000000d9;font-size:14px;background:#f0f2f5}.ant-layout-content{flex:auto;min-height:0}.ant-layout-sider{position:relative;min-width:0;background:#001529;transition:all .2s}.ant-layout-sider-children{height:100%;margin-top:-.1px;padding-top:.1px}.ant-layout-sider-children .ant-menu.ant-menu-inline-collapsed{width:auto}.ant-layout-sider-has-trigger{padding-bottom:48px}.ant-layout-sider-right{order:1}.ant-layout-sider-trigger{position:fixed;bottom:0;z-index:1;height:48px;color:#fff;line-height:48px;text-align:center;background:#002140;cursor:pointer;transition:all .2s}.ant-layout-sider-zero-width>*{overflow:hidden}.ant-layout-sider-zero-width-trigger{position:absolute;top:64px;right:-36px;z-index:1;width:36px;height:42px;color:#fff;font-size:18px;line-height:42px;text-align:center;background:#001529;border-radius:0 5px 5px 0;cursor:pointer;transition:background .3s ease}.ant-layout-sider-zero-width-trigger:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;transition:all .3s;content:""}.ant-layout-sider-zero-width-trigger:hover:after{background:#ffffff1a}.ant-layout-sider-zero-width-trigger-right{left:-36px;border-radius:5px 0 0 5px}.ant-layout-sider-light{background:#fff}.ant-layout-sider-light .ant-layout-sider-trigger,.ant-layout-sider-light .ant-layout-sider-zero-width-trigger{color:#000000d9;background:#fff}.ant-layout-rtl{direction:rtl}.ant-list{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:relative}.ant-list *{outline:none}.ant-list-pagination{margin-top:24px;text-align:right}.ant-list-pagination .ant-pagination-options{text-align:left}.ant-list-more{margin-top:12px;text-align:center}.ant-list-more button{padding-right:32px;padding-left:32px}.ant-list-spin{min-height:40px;text-align:center}.ant-list-empty-text{padding:16px;color:#00000040;font-size:14px;text-align:center}.ant-list-items{margin:0;padding:0;list-style:none}.ant-list-item{display:flex;align-items:center;justify-content:space-between;padding:12px 0;color:#000000d9}.ant-list-item-meta{display:flex;flex:1;align-items:flex-start;max-width:100%}.ant-list-item-meta-avatar{margin-right:16px}.ant-list-item-meta-content{flex:1 0;width:0;color:#000000d9}.ant-list-item-meta-title{margin-bottom:4px;color:#000000d9;font-size:14px;line-height:1.5715}.ant-list-item-meta-title>a{color:#000000d9;transition:all .3s}.ant-list-item-meta-title>a:hover{color:#8d6a46}.ant-list-item-meta-description{color:#00000073;font-size:14px;line-height:1.5715}.ant-list-item-action{flex:0 0 auto;margin-left:48px;padding:0;font-size:0;list-style:none}.ant-list-item-action>li{position:relative;display:inline-block;padding:0 8px;color:#00000073;font-size:14px;line-height:1.5715;text-align:center}.ant-list-item-action>li:first-child{padding-left:0}.ant-list-item-action-split{position:absolute;top:50%;right:0;width:1px;height:14px;margin-top:-7px;background-color:#f0f0f0}.ant-list-header,.ant-list-footer{background:transparent}.ant-list-header,.ant-list-footer{padding-top:12px;padding-bottom:12px}.ant-list-empty{padding:16px 0;color:#00000073;font-size:12px;text-align:center}.ant-list-split .ant-list-item{border-bottom:1px solid #f0f0f0}.ant-list-split .ant-list-item:last-child{border-bottom:none}.ant-list-split .ant-list-header{border-bottom:1px solid #f0f0f0}.ant-list-split.ant-list-empty .ant-list-footer{border-top:1px solid #f0f0f0}.ant-list-loading .ant-list-spin-nested-loading{min-height:32px}.ant-list-split.ant-list-something-after-last-item .ant-spin-container>.ant-list-items>.ant-list-item:last-child{border-bottom:1px solid #f0f0f0}.ant-list-lg .ant-list-item{padding:16px 24px}.ant-list-sm .ant-list-item{padding:8px 16px}.ant-list-vertical .ant-list-item{align-items:initial}.ant-list-vertical .ant-list-item-main{display:block;flex:1}.ant-list-vertical .ant-list-item-extra{margin-left:40px}.ant-list-vertical .ant-list-item-meta{margin-bottom:16px}.ant-list-vertical .ant-list-item-meta-title{margin-bottom:12px;color:#1c2d56;font-size:16px;line-height:24px}.ant-list-vertical .ant-list-item-action{margin-top:16px;margin-left:auto}.ant-list-vertical .ant-list-item-action>li{padding:0 16px}.ant-list-vertical .ant-list-item-action>li:first-child{padding-left:0}.ant-list-grid .ant-col>.ant-list-item{display:block;max-width:100%;margin-bottom:16px;padding-top:0;padding-bottom:0;border-bottom:none}.ant-list-item-no-flex{display:block}.ant-list:not(.ant-list-vertical) .ant-list-item-no-flex .ant-list-item-action{float:right}.ant-list-bordered{border:1px solid #d9d9d9;border-radius:5px}.ant-list-bordered .ant-list-header,.ant-list-bordered .ant-list-footer,.ant-list-bordered .ant-list-item{padding-right:24px;padding-left:24px}.ant-list-bordered .ant-list-pagination{margin:16px 24px}.ant-list-bordered.ant-list-sm .ant-list-item,.ant-list-bordered.ant-list-sm .ant-list-header,.ant-list-bordered.ant-list-sm .ant-list-footer{padding:8px 16px}.ant-list-bordered.ant-list-lg .ant-list-item,.ant-list-bordered.ant-list-lg .ant-list-header,.ant-list-bordered.ant-list-lg .ant-list-footer{padding:16px 24px}@media screen and (max-width: 768px){.ant-list-item-action,.ant-list-vertical .ant-list-item-extra{margin-left:24px}}@media screen and (max-width: 576px){.ant-list-item{flex-wrap:wrap}.ant-list-item-action{margin-left:12px}.ant-list-vertical .ant-list-item{flex-wrap:wrap-reverse}.ant-list-vertical .ant-list-item-main{min-width:220px}.ant-list-vertical .ant-list-item-extra{margin:auto auto 16px}}.ant-list-rtl{direction:rtl;text-align:right}.ant-list-rtl .ReactVirtualized__List .ant-list-item{direction:rtl}.ant-list-rtl .ant-list-pagination{text-align:left}.ant-list-rtl .ant-list-item-meta-avatar{margin-right:0;margin-left:16px}.ant-list-rtl .ant-list-item-action{margin-right:48px;margin-left:0}.ant-list.ant-list-rtl .ant-list-item-action>li:first-child{padding-right:0;padding-left:16px}.ant-list-rtl .ant-list-item-action-split{right:auto;left:0}.ant-list-rtl.ant-list-vertical .ant-list-item-extra{margin-right:40px;margin-left:0}.ant-list-rtl.ant-list-vertical .ant-list-item-action{margin-right:auto}.ant-list-rtl .ant-list-vertical .ant-list-item-action>li:first-child{padding-right:0;padding-left:16px}.ant-list-rtl .ant-list:not(.ant-list-vertical) .ant-list-item-no-flex .ant-list-item-action{float:left}@media screen and (max-width: 768px){.ant-list-rtl .ant-list-item-action,.ant-list-rtl .ant-list-vertical .ant-list-item-extra{margin-right:24px;margin-left:0}}@media screen and (max-width: 576px){.ant-list-rtl .ant-list-item-action{margin-right:22px;margin-left:0}.ant-list-rtl.ant-list-vertical .ant-list-item-extra{margin:auto auto 16px}}.ant-mentions{box-sizing:border-box;margin:0;font-variant:tabular-nums;list-style:none;font-feature-settings:"tnum";width:100%;min-width:0;color:#000000d9;font-size:14px;background-color:#fff;background-image:none;border:1px solid #d9d9d9;border-radius:5px;transition:all .3s;position:relative;display:inline-block;height:auto;padding:0;overflow:hidden;line-height:1.5715;white-space:pre-wrap;vertical-align:bottom}.ant-mentions::-moz-placeholder{opacity:1}.ant-mentions::placeholder{color:#bfbfbf;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-mentions:-moz-placeholder{text-overflow:ellipsis}.ant-mentions:placeholder-shown{text-overflow:ellipsis}.ant-mentions:hover{border-color:#998165;border-right-width:1px!important}.ant-input-rtl .ant-mentions:hover{border-right-width:0;border-left-width:1px!important}.ant-mentions:focus,.ant-mentions-focused{border-color:#998165;box-shadow:0 0 0 2px #8d6a4633;border-right-width:1px!important;outline:0}.ant-input-rtl .ant-mentions:focus,.ant-input-rtl .ant-mentions-focused{border-right-width:0;border-left-width:1px!important}.ant-mentions-disabled{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;box-shadow:none;cursor:not-allowed;opacity:1}.ant-mentions-disabled:hover{border-color:#d9d9d9;border-right-width:1px!important}.ant-mentions[disabled]{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;box-shadow:none;cursor:not-allowed;opacity:1}.ant-mentions[disabled]:hover{border-color:#d9d9d9;border-right-width:1px!important}.ant-mentions-borderless,.ant-mentions-borderless:hover,.ant-mentions-borderless:focus,.ant-mentions-borderless-focused,.ant-mentions-borderless-disabled,.ant-mentions-borderless[disabled]{background-color:transparent;border:none;box-shadow:none}textarea.ant-mentions{max-width:100%;height:auto;min-height:32px;line-height:1.5715;vertical-align:bottom;transition:all .3s,height 0s}.ant-mentions-lg{padding:7.5px 11px;font-size:16px}.ant-mentions-sm{padding:0 7px}.ant-mentions-disabled>textarea{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;box-shadow:none;cursor:not-allowed;opacity:1}.ant-mentions-disabled>textarea:hover{border-color:#d9d9d9;border-right-width:1px!important}.ant-mentions-focused{border-color:#998165;box-shadow:0 0 0 2px #8d6a4633;border-right-width:1px!important;outline:0}.ant-input-rtl .ant-mentions-focused{border-right-width:0;border-left-width:1px!important}.ant-mentions>textarea,.ant-mentions-measure{min-height:30px;margin:0;padding:10px;overflow:inherit;overflow-x:hidden;overflow-y:auto;font-weight:inherit;font-size:inherit;font-family:inherit;font-style:inherit;font-variant:inherit;font-size-adjust:inherit;font-stretch:inherit;line-height:inherit;direction:inherit;letter-spacing:inherit;white-space:inherit;text-align:inherit;vertical-align:top;word-wrap:break-word;word-break:inherit;-moz-tab-size:inherit;-o-tab-size:inherit;tab-size:inherit}.ant-mentions>textarea{width:100%;border:none;outline:none;resize:none}.ant-mentions>textarea::-moz-placeholder{opacity:1}.ant-mentions>textarea::placeholder{color:#bfbfbf;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-mentions>textarea:-moz-placeholder{text-overflow:ellipsis}.ant-mentions>textarea:placeholder-shown{text-overflow:ellipsis}.ant-mentions-measure{position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1;color:transparent;pointer-events:none}.ant-mentions-measure>span{display:inline-block;min-height:1em}.ant-mentions-dropdown{margin:0;padding:0;color:#000000d9;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:absolute;top:-9999px;left:-9999px;z-index:1050;box-sizing:border-box;font-size:14px;font-variant:initial;background-color:#fff;border-radius:5px;outline:none;box-shadow:0 3px 6px -4px #0000001f,0 6px 16px #00000014,0 9px 28px 8px #0000000d}.ant-mentions-dropdown-hidden{display:none}.ant-mentions-dropdown-menu{max-height:250px;margin-bottom:0;padding-left:0;overflow:auto;list-style:none;outline:none}.ant-mentions-dropdown-menu-item{position:relative;display:block;min-width:100px;padding:5px 12px;overflow:hidden;color:#000000d9;font-weight:400;line-height:1.5715;white-space:nowrap;text-overflow:ellipsis;cursor:pointer;transition:background .3s ease}.ant-mentions-dropdown-menu-item:hover{background-color:#f5f5f5}.ant-mentions-dropdown-menu-item:first-child{border-radius:5px 5px 0 0}.ant-mentions-dropdown-menu-item:last-child{border-radius:0 0 5px 5px}.ant-mentions-dropdown-menu-item-disabled{color:#00000040;cursor:not-allowed}.ant-mentions-dropdown-menu-item-disabled:hover{color:#00000040;background-color:#fff;cursor:not-allowed}.ant-mentions-dropdown-menu-item-selected{color:#000000d9;font-weight:600;background-color:#fafafa}.ant-mentions-dropdown-menu-item-active{background-color:#f5f5f5}.ant-mentions-rtl{direction:rtl}.ant-menu-item-danger.ant-menu-item,.ant-menu-item-danger.ant-menu-item:hover,.ant-menu-item-danger.ant-menu-item-active{color:#e31a1a}.ant-menu-item-danger.ant-menu-item:active{background:#fff1f0}.ant-menu-item-danger.ant-menu-item-selected{color:#e31a1a}.ant-menu-item-danger.ant-menu-item-selected>a,.ant-menu-item-danger.ant-menu-item-selected>a:hover{color:#e31a1a}.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-danger.ant-menu-item-selected{background-color:#fff1f0}.ant-menu-inline .ant-menu-item-danger.ant-menu-item:after{border-right-color:#e31a1a}.ant-menu-dark .ant-menu-item-danger.ant-menu-item,.ant-menu-dark .ant-menu-item-danger.ant-menu-item:hover,.ant-menu-dark .ant-menu-item-danger.ant-menu-item>a{color:#e31a1a}.ant-menu-dark.ant-menu-dark:not(.ant-menu-horizontal) .ant-menu-item-danger.ant-menu-item-selected{color:#fff;background-color:#e31a1a}.ant-menu{box-sizing:border-box;margin:0;font-variant:tabular-nums;font-feature-settings:"tnum";padding:0;color:#000000d9;font-size:14px;line-height:0;text-align:left;list-style:none;background:#fff;outline:none;box-shadow:0 3px 6px -4px #0000001f,0 6px 16px #00000014,0 9px 28px 8px #0000000d;transition:background .3s,width .3s cubic-bezier(.2,0,0,1) 0s}.ant-menu:before{display:table;content:""}.ant-menu:after{display:table;clear:both;content:""}.ant-menu.ant-menu-root:focus-visible{box-shadow:0 0 0 2px #bfbbb4}.ant-menu ul,.ant-menu ol{margin:0;padding:0;list-style:none}.ant-menu-overflow{display:flex}.ant-menu-overflow-item{flex:none}.ant-menu-hidden,.ant-menu-submenu-hidden{display:none}.ant-menu-item-group-title{height:1.5715;padding:8px 16px;color:#00000073;font-size:14px;line-height:1.5715;transition:all .3s}.ant-menu-horizontal .ant-menu-submenu{transition:border-color .3s cubic-bezier(.645,.045,.355,1),background .3s cubic-bezier(.645,.045,.355,1)}.ant-menu-submenu,.ant-menu-submenu-inline{transition:border-color .3s cubic-bezier(.645,.045,.355,1),background .3s cubic-bezier(.645,.045,.355,1),padding .15s cubic-bezier(.645,.045,.355,1)}.ant-menu-submenu-selected{color:#8d6a46}.ant-menu-item:active,.ant-menu-submenu-title:active{background:#ccc8c0}.ant-menu-submenu .ant-menu-sub{cursor:initial;transition:background .3s cubic-bezier(.645,.045,.355,1),padding .3s cubic-bezier(.645,.045,.355,1)}.ant-menu-title-content{transition:color .3s}.ant-menu-item a{color:#000000d9}.ant-menu-item a:hover{color:#8d6a46}.ant-menu-item a:before{position:absolute;top:0;right:0;bottom:0;left:0;background-color:transparent;content:""}.ant-menu-item>.ant-badge a{color:#000000d9}.ant-menu-item>.ant-badge a:hover{color:#8d6a46}.ant-menu-item-divider{overflow:hidden;line-height:0;border-color:#f0f0f0;border-style:solid;border-width:1px 0 0}.ant-menu-item-divider-dashed{border-style:dashed}.ant-menu-horizontal .ant-menu-item,.ant-menu-horizontal .ant-menu-submenu{margin-top:-1px}.ant-menu-horizontal>.ant-menu-item:hover,.ant-menu-horizontal>.ant-menu-item-active,.ant-menu-horizontal>.ant-menu-submenu .ant-menu-submenu-title:hover{background-color:transparent}.ant-menu-item-selected,.ant-menu-item-selected a,.ant-menu-item-selected a:hover{color:#8d6a46}.ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected{background-color:#ccc8c0}.ant-menu-inline,.ant-menu-vertical,.ant-menu-vertical-left{border-right:1px solid #f0f0f0}.ant-menu-vertical-right{border-left:1px solid #f0f0f0}.ant-menu-vertical.ant-menu-sub,.ant-menu-vertical-left.ant-menu-sub,.ant-menu-vertical-right.ant-menu-sub{min-width:160px;max-height:calc(100vh - 100px);padding:0;overflow:hidden;border-right:0}.ant-menu-vertical.ant-menu-sub:not([class*=-active]),.ant-menu-vertical-left.ant-menu-sub:not([class*=-active]),.ant-menu-vertical-right.ant-menu-sub:not([class*=-active]){overflow-x:hidden;overflow-y:auto}.ant-menu-vertical.ant-menu-sub .ant-menu-item,.ant-menu-vertical-left.ant-menu-sub .ant-menu-item,.ant-menu-vertical-right.ant-menu-sub .ant-menu-item{left:0;margin-left:0;border-right:0}.ant-menu-vertical.ant-menu-sub .ant-menu-item:after,.ant-menu-vertical-left.ant-menu-sub .ant-menu-item:after,.ant-menu-vertical-right.ant-menu-sub .ant-menu-item:after{border-right:0}.ant-menu-vertical.ant-menu-sub>.ant-menu-item,.ant-menu-vertical-left.ant-menu-sub>.ant-menu-item,.ant-menu-vertical-right.ant-menu-sub>.ant-menu-item,.ant-menu-vertical.ant-menu-sub>.ant-menu-submenu,.ant-menu-vertical-left.ant-menu-sub>.ant-menu-submenu,.ant-menu-vertical-right.ant-menu-sub>.ant-menu-submenu{transform-origin:0 0}.ant-menu-horizontal.ant-menu-sub{min-width:114px}.ant-menu-horizontal .ant-menu-item,.ant-menu-horizontal .ant-menu-submenu-title{transition:border-color .3s,background .3s}.ant-menu-item,.ant-menu-submenu-title{position:relative;display:block;margin:0;padding:0 20px;white-space:nowrap;cursor:pointer;transition:border-color .3s,background .3s,padding .3s cubic-bezier(.645,.045,.355,1)}.ant-menu-item .ant-menu-item-icon,.ant-menu-submenu-title .ant-menu-item-icon,.ant-menu-item .anticon,.ant-menu-submenu-title .anticon{min-width:14px;font-size:14px;transition:font-size .15s cubic-bezier(.215,.61,.355,1),margin .3s cubic-bezier(.645,.045,.355,1),color .3s}.ant-menu-item .ant-menu-item-icon+span,.ant-menu-submenu-title .ant-menu-item-icon+span,.ant-menu-item .anticon+span,.ant-menu-submenu-title .anticon+span{margin-left:10px;opacity:1;transition:opacity .3s cubic-bezier(.645,.045,.355,1),margin .3s,color .3s}.ant-menu-item .ant-menu-item-icon.svg,.ant-menu-submenu-title .ant-menu-item-icon.svg{vertical-align:-.125em}.ant-menu-item.ant-menu-item-only-child>.anticon,.ant-menu-submenu-title.ant-menu-item-only-child>.anticon,.ant-menu-item.ant-menu-item-only-child>.ant-menu-item-icon,.ant-menu-submenu-title.ant-menu-item-only-child>.ant-menu-item-icon{margin-right:0}.ant-menu-item:focus-visible,.ant-menu-submenu-title:focus-visible{box-shadow:0 0 0 2px #bfbbb4}.ant-menu>.ant-menu-item-divider{margin:1px 0;padding:0}.ant-menu-submenu-popup{position:absolute;z-index:1050;background:transparent;border-radius:5px;box-shadow:none;transform-origin:0 0}.ant-menu-submenu-popup:before{position:absolute;top:-7px;right:0;bottom:0;left:0;z-index:-1;width:100%;height:100%;opacity:.0001;content:" "}.ant-menu-submenu-placement-rightTop:before{top:0;left:-7px}.ant-menu-submenu>.ant-menu{background-color:#fff;border-radius:5px}.ant-menu-submenu>.ant-menu-submenu-title:after{transition:transform .3s cubic-bezier(.645,.045,.355,1)}.ant-menu-submenu-popup>.ant-menu{background-color:#fff}.ant-menu-submenu-expand-icon,.ant-menu-submenu-arrow{position:absolute;top:50%;right:16px;width:10px;color:#000000d9;transform:translateY(-50%);transition:transform .3s cubic-bezier(.645,.045,.355,1)}.ant-menu-submenu-arrow:before,.ant-menu-submenu-arrow:after{position:absolute;width:6px;height:1.5px;background-color:currentcolor;border-radius:2px;transition:background .3s cubic-bezier(.645,.045,.355,1),transform .3s cubic-bezier(.645,.045,.355,1),top .3s cubic-bezier(.645,.045,.355,1),color .3s cubic-bezier(.645,.045,.355,1);content:""}.ant-menu-submenu-arrow:before{transform:rotate(45deg) translateY(-2.5px)}.ant-menu-submenu-arrow:after{transform:rotate(-45deg) translateY(2.5px)}.ant-menu-submenu:hover>.ant-menu-submenu-title>.ant-menu-submenu-expand-icon,.ant-menu-submenu:hover>.ant-menu-submenu-title>.ant-menu-submenu-arrow{color:#8d6a46}.ant-menu-inline-collapsed .ant-menu-submenu-arrow:before,.ant-menu-submenu-inline .ant-menu-submenu-arrow:before{transform:rotate(-45deg) translate(2.5px)}.ant-menu-inline-collapsed .ant-menu-submenu-arrow:after,.ant-menu-submenu-inline .ant-menu-submenu-arrow:after{transform:rotate(45deg) translate(-2.5px)}.ant-menu-submenu-horizontal .ant-menu-submenu-arrow{display:none}.ant-menu-submenu-open.ant-menu-submenu-inline>.ant-menu-submenu-title>.ant-menu-submenu-arrow{transform:translateY(-2px)}.ant-menu-submenu-open.ant-menu-submenu-inline>.ant-menu-submenu-title>.ant-menu-submenu-arrow:after{transform:rotate(-45deg) translate(-2.5px)}.ant-menu-submenu-open.ant-menu-submenu-inline>.ant-menu-submenu-title>.ant-menu-submenu-arrow:before{transform:rotate(45deg) translate(2.5px)}.ant-menu-vertical .ant-menu-submenu-selected,.ant-menu-vertical-left .ant-menu-submenu-selected,.ant-menu-vertical-right .ant-menu-submenu-selected{color:#8d6a46}.ant-menu-horizontal{line-height:46px;border:0;border-bottom:1px solid #f0f0f0;box-shadow:none}.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-item,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-submenu{margin-top:-1px;margin-bottom:0;padding:0 20px}.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-item:hover,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-submenu:hover,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-item-active,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-submenu-active,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-item-open,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-submenu-open,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-item-selected,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-submenu-selected{color:#8d6a46}.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-item:hover:after,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-submenu:hover:after,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-item-active:after,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-submenu-active:after,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-item-open:after,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-submenu-open:after,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-item-selected:after,.ant-menu-horizontal:not(.ant-menu-dark)>.ant-menu-submenu-selected:after{border-bottom:2px solid #8D6A46}.ant-menu-horizontal>.ant-menu-item,.ant-menu-horizontal>.ant-menu-submenu{position:relative;top:1px;display:inline-block;vertical-align:bottom}.ant-menu-horizontal>.ant-menu-item:after,.ant-menu-horizontal>.ant-menu-submenu:after{position:absolute;right:20px;bottom:0;left:20px;border-bottom:2px solid transparent;transition:border-color .3s cubic-bezier(.645,.045,.355,1);content:""}.ant-menu-horizontal>.ant-menu-submenu>.ant-menu-submenu-title{padding:0}.ant-menu-horizontal>.ant-menu-item a{color:#000000d9}.ant-menu-horizontal>.ant-menu-item a:hover{color:#8d6a46}.ant-menu-horizontal>.ant-menu-item a:before{bottom:-2px}.ant-menu-horizontal>.ant-menu-item-selected a{color:#8d6a46}.ant-menu-horizontal:after{display:block;clear:both;height:0;content:" "}.ant-menu-vertical .ant-menu-item,.ant-menu-vertical-left .ant-menu-item,.ant-menu-vertical-right .ant-menu-item,.ant-menu-inline .ant-menu-item{position:relative}.ant-menu-vertical .ant-menu-item:after,.ant-menu-vertical-left .ant-menu-item:after,.ant-menu-vertical-right .ant-menu-item:after,.ant-menu-inline .ant-menu-item:after{position:absolute;top:0;right:0;bottom:0;border-right:3px solid #8D6A46;transform:scaleY(.0001);opacity:0;transition:transform .15s cubic-bezier(.215,.61,.355,1),opacity .15s cubic-bezier(.215,.61,.355,1);content:""}.ant-menu-vertical .ant-menu-item,.ant-menu-vertical-left .ant-menu-item,.ant-menu-vertical-right .ant-menu-item,.ant-menu-inline .ant-menu-item,.ant-menu-vertical .ant-menu-submenu-title,.ant-menu-vertical-left .ant-menu-submenu-title,.ant-menu-vertical-right .ant-menu-submenu-title,.ant-menu-inline .ant-menu-submenu-title{height:40px;margin-top:4px;margin-bottom:4px;padding:0 16px;overflow:hidden;line-height:40px;text-overflow:ellipsis}.ant-menu-vertical .ant-menu-submenu,.ant-menu-vertical-left .ant-menu-submenu,.ant-menu-vertical-right .ant-menu-submenu,.ant-menu-inline .ant-menu-submenu{padding-bottom:.02px}.ant-menu-vertical .ant-menu-item:not(:last-child),.ant-menu-vertical-left .ant-menu-item:not(:last-child),.ant-menu-vertical-right .ant-menu-item:not(:last-child),.ant-menu-inline .ant-menu-item:not(:last-child){margin-bottom:8px}.ant-menu-vertical>.ant-menu-item,.ant-menu-vertical-left>.ant-menu-item,.ant-menu-vertical-right>.ant-menu-item,.ant-menu-inline>.ant-menu-item,.ant-menu-vertical>.ant-menu-submenu>.ant-menu-submenu-title,.ant-menu-vertical-left>.ant-menu-submenu>.ant-menu-submenu-title,.ant-menu-vertical-right>.ant-menu-submenu>.ant-menu-submenu-title,.ant-menu-inline>.ant-menu-submenu>.ant-menu-submenu-title{height:40px;line-height:40px}.ant-menu-vertical .ant-menu-item-group-list .ant-menu-submenu-title,.ant-menu-vertical .ant-menu-submenu-title{padding-right:34px}.ant-menu-inline{width:100%}.ant-menu-inline .ant-menu-selected:after,.ant-menu-inline .ant-menu-item-selected:after{transform:scaleY(1);opacity:1;transition:transform .15s cubic-bezier(.645,.045,.355,1),opacity .15s cubic-bezier(.645,.045,.355,1)}.ant-menu-inline .ant-menu-item,.ant-menu-inline .ant-menu-submenu-title{width:calc(100% + 1px)}.ant-menu-inline .ant-menu-item-group-list .ant-menu-submenu-title,.ant-menu-inline .ant-menu-submenu-title{padding-right:34px}.ant-menu-inline.ant-menu-root .ant-menu-item,.ant-menu-inline.ant-menu-root .ant-menu-submenu-title{display:flex;align-items:center;transition:border-color .3s,background .3s,padding .1s cubic-bezier(.215,.61,.355,1)}.ant-menu-inline.ant-menu-root .ant-menu-item>.ant-menu-title-content,.ant-menu-inline.ant-menu-root .ant-menu-submenu-title>.ant-menu-title-content{flex:auto;min-width:0;overflow:hidden;text-overflow:ellipsis}.ant-menu-inline.ant-menu-root .ant-menu-item>*,.ant-menu-inline.ant-menu-root .ant-menu-submenu-title>*{flex:none}.ant-menu.ant-menu-inline-collapsed{width:80px}.ant-menu.ant-menu-inline-collapsed>.ant-menu-item,.ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-item,.ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-submenu>.ant-menu-submenu-title,.ant-menu.ant-menu-inline-collapsed>.ant-menu-submenu>.ant-menu-submenu-title{left:0;padding:0 calc(50% - 8px);text-overflow:clip}.ant-menu.ant-menu-inline-collapsed>.ant-menu-item .ant-menu-submenu-arrow,.ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-item .ant-menu-submenu-arrow,.ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-submenu>.ant-menu-submenu-title .ant-menu-submenu-arrow,.ant-menu.ant-menu-inline-collapsed>.ant-menu-submenu>.ant-menu-submenu-title .ant-menu-submenu-arrow{opacity:0}.ant-menu.ant-menu-inline-collapsed>.ant-menu-item .ant-menu-item-icon,.ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-item .ant-menu-item-icon,.ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-submenu>.ant-menu-submenu-title .ant-menu-item-icon,.ant-menu.ant-menu-inline-collapsed>.ant-menu-submenu>.ant-menu-submenu-title .ant-menu-item-icon,.ant-menu.ant-menu-inline-collapsed>.ant-menu-item .anticon,.ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-item .anticon,.ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-submenu>.ant-menu-submenu-title .anticon,.ant-menu.ant-menu-inline-collapsed>.ant-menu-submenu>.ant-menu-submenu-title .anticon{margin:0;font-size:16px;line-height:40px}.ant-menu.ant-menu-inline-collapsed>.ant-menu-item .ant-menu-item-icon+span,.ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-item .ant-menu-item-icon+span,.ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-submenu>.ant-menu-submenu-title .ant-menu-item-icon+span,.ant-menu.ant-menu-inline-collapsed>.ant-menu-submenu>.ant-menu-submenu-title .ant-menu-item-icon+span,.ant-menu.ant-menu-inline-collapsed>.ant-menu-item .anticon+span,.ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-item .anticon+span,.ant-menu.ant-menu-inline-collapsed>.ant-menu-item-group>.ant-menu-item-group-list>.ant-menu-submenu>.ant-menu-submenu-title .anticon+span,.ant-menu.ant-menu-inline-collapsed>.ant-menu-submenu>.ant-menu-submenu-title .anticon+span{display:inline-block;opacity:0}.ant-menu.ant-menu-inline-collapsed .ant-menu-item-icon,.ant-menu.ant-menu-inline-collapsed .anticon{display:inline-block}.ant-menu.ant-menu-inline-collapsed-tooltip{pointer-events:none}.ant-menu.ant-menu-inline-collapsed-tooltip .ant-menu-item-icon,.ant-menu.ant-menu-inline-collapsed-tooltip .anticon{display:none}.ant-menu.ant-menu-inline-collapsed-tooltip a{color:#ffffffd9}.ant-menu.ant-menu-inline-collapsed .ant-menu-item-group-title{padding-right:4px;padding-left:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ant-menu-item-group-list{margin:0;padding:0}.ant-menu-item-group-list .ant-menu-item,.ant-menu-item-group-list .ant-menu-submenu-title{padding:0 16px 0 28px}.ant-menu-root.ant-menu-vertical,.ant-menu-root.ant-menu-vertical-left,.ant-menu-root.ant-menu-vertical-right,.ant-menu-root.ant-menu-inline{box-shadow:none}.ant-menu-root.ant-menu-inline-collapsed .ant-menu-item>.ant-menu-inline-collapsed-noicon,.ant-menu-root.ant-menu-inline-collapsed .ant-menu-submenu .ant-menu-submenu-title>.ant-menu-inline-collapsed-noicon{font-size:16px;text-align:center}.ant-menu-sub.ant-menu-inline{padding:0;background:#fafafa;border:0;border-radius:0;box-shadow:none}.ant-menu-sub.ant-menu-inline>.ant-menu-item,.ant-menu-sub.ant-menu-inline>.ant-menu-submenu>.ant-menu-submenu-title{height:40px;line-height:40px;list-style-position:inside;list-style-type:disc}.ant-menu-sub.ant-menu-inline .ant-menu-item-group-title{padding-left:32px}.ant-menu-item-disabled,.ant-menu-submenu-disabled{color:#00000040!important;background:none;cursor:not-allowed}.ant-menu-item-disabled:after,.ant-menu-submenu-disabled:after{border-color:transparent!important}.ant-menu-item-disabled a,.ant-menu-submenu-disabled a{color:#00000040!important;pointer-events:none}.ant-menu-item-disabled>.ant-menu-submenu-title,.ant-menu-submenu-disabled>.ant-menu-submenu-title{color:#00000040!important;cursor:not-allowed}.ant-menu-item-disabled>.ant-menu-submenu-title>.ant-menu-submenu-arrow:before,.ant-menu-submenu-disabled>.ant-menu-submenu-title>.ant-menu-submenu-arrow:before,.ant-menu-item-disabled>.ant-menu-submenu-title>.ant-menu-submenu-arrow:after,.ant-menu-submenu-disabled>.ant-menu-submenu-title>.ant-menu-submenu-arrow:after{background:#00000040!important}.ant-layout-header .ant-menu{line-height:inherit}.ant-menu-inline-collapsed-tooltip a,.ant-menu-inline-collapsed-tooltip a:hover{color:#fff}.ant-menu-light .ant-menu-item:hover,.ant-menu-light .ant-menu-item-active,.ant-menu-light .ant-menu:not(.ant-menu-inline) .ant-menu-submenu-open,.ant-menu-light .ant-menu-submenu-active,.ant-menu-light .ant-menu-submenu-title:hover{color:#8d6a46}.ant-menu.ant-menu-root:focus-visible{box-shadow:0 0 0 2px #66482e}.ant-menu-dark .ant-menu-item:focus-visible,.ant-menu-dark .ant-menu-submenu-title:focus-visible{box-shadow:0 0 0 2px #66482e}.ant-menu.ant-menu-dark,.ant-menu-dark .ant-menu-sub,.ant-menu.ant-menu-dark .ant-menu-sub{color:#ffffffa6;background:#001529}.ant-menu.ant-menu-dark .ant-menu-submenu-title .ant-menu-submenu-arrow,.ant-menu-dark .ant-menu-sub .ant-menu-submenu-title .ant-menu-submenu-arrow,.ant-menu.ant-menu-dark .ant-menu-sub .ant-menu-submenu-title .ant-menu-submenu-arrow{opacity:.45;transition:all .3s}.ant-menu.ant-menu-dark .ant-menu-submenu-title .ant-menu-submenu-arrow:after,.ant-menu-dark .ant-menu-sub .ant-menu-submenu-title .ant-menu-submenu-arrow:after,.ant-menu.ant-menu-dark .ant-menu-sub .ant-menu-submenu-title .ant-menu-submenu-arrow:after,.ant-menu.ant-menu-dark .ant-menu-submenu-title .ant-menu-submenu-arrow:before,.ant-menu-dark .ant-menu-sub .ant-menu-submenu-title .ant-menu-submenu-arrow:before,.ant-menu.ant-menu-dark .ant-menu-sub .ant-menu-submenu-title .ant-menu-submenu-arrow:before{background:#fff}.ant-menu-dark.ant-menu-submenu-popup{background:transparent}.ant-menu-dark .ant-menu-inline.ant-menu-sub{background:#000c17}.ant-menu-dark.ant-menu-horizontal{border-bottom:0}.ant-menu-dark.ant-menu-horizontal>.ant-menu-item,.ant-menu-dark.ant-menu-horizontal>.ant-menu-submenu{top:0;margin-top:0;padding:0 20px;border-color:#001529;border-bottom:0}.ant-menu-dark.ant-menu-horizontal>.ant-menu-item:hover{background-color:#8d6a46}.ant-menu-dark.ant-menu-horizontal>.ant-menu-item>a:before{bottom:0}.ant-menu-dark .ant-menu-item,.ant-menu-dark .ant-menu-item-group-title,.ant-menu-dark .ant-menu-item>a,.ant-menu-dark .ant-menu-item>span>a{color:#ffffffa6}.ant-menu-dark.ant-menu-inline,.ant-menu-dark.ant-menu-vertical,.ant-menu-dark.ant-menu-vertical-left,.ant-menu-dark.ant-menu-vertical-right{border-right:0}.ant-menu-dark.ant-menu-inline .ant-menu-item,.ant-menu-dark.ant-menu-vertical .ant-menu-item,.ant-menu-dark.ant-menu-vertical-left .ant-menu-item,.ant-menu-dark.ant-menu-vertical-right .ant-menu-item{left:0;margin-left:0;border-right:0}.ant-menu-dark.ant-menu-inline .ant-menu-item:after,.ant-menu-dark.ant-menu-vertical .ant-menu-item:after,.ant-menu-dark.ant-menu-vertical-left .ant-menu-item:after,.ant-menu-dark.ant-menu-vertical-right .ant-menu-item:after{border-right:0}.ant-menu-dark.ant-menu-inline .ant-menu-item,.ant-menu-dark.ant-menu-inline .ant-menu-submenu-title{width:100%}.ant-menu-dark .ant-menu-item:hover,.ant-menu-dark .ant-menu-item-active,.ant-menu-dark .ant-menu-submenu-active,.ant-menu-dark .ant-menu-submenu-open,.ant-menu-dark .ant-menu-submenu-selected,.ant-menu-dark .ant-menu-submenu-title:hover{color:#fff;background-color:transparent}.ant-menu-dark .ant-menu-item:hover>a,.ant-menu-dark .ant-menu-item-active>a,.ant-menu-dark .ant-menu-submenu-active>a,.ant-menu-dark .ant-menu-submenu-open>a,.ant-menu-dark .ant-menu-submenu-selected>a,.ant-menu-dark .ant-menu-submenu-title:hover>a,.ant-menu-dark .ant-menu-item:hover>span>a,.ant-menu-dark .ant-menu-item-active>span>a,.ant-menu-dark .ant-menu-submenu-active>span>a,.ant-menu-dark .ant-menu-submenu-open>span>a,.ant-menu-dark .ant-menu-submenu-selected>span>a,.ant-menu-dark .ant-menu-submenu-title:hover>span>a{color:#fff}.ant-menu-dark .ant-menu-item:hover>.ant-menu-submenu-title>.ant-menu-submenu-arrow,.ant-menu-dark .ant-menu-item-active>.ant-menu-submenu-title>.ant-menu-submenu-arrow,.ant-menu-dark .ant-menu-submenu-active>.ant-menu-submenu-title>.ant-menu-submenu-arrow,.ant-menu-dark .ant-menu-submenu-open>.ant-menu-submenu-title>.ant-menu-submenu-arrow,.ant-menu-dark .ant-menu-submenu-selected>.ant-menu-submenu-title>.ant-menu-submenu-arrow,.ant-menu-dark .ant-menu-submenu-title:hover>.ant-menu-submenu-title>.ant-menu-submenu-arrow{opacity:1}.ant-menu-dark .ant-menu-item:hover>.ant-menu-submenu-title>.ant-menu-submenu-arrow:after,.ant-menu-dark .ant-menu-item-active>.ant-menu-submenu-title>.ant-menu-submenu-arrow:after,.ant-menu-dark .ant-menu-submenu-active>.ant-menu-submenu-title>.ant-menu-submenu-arrow:after,.ant-menu-dark .ant-menu-submenu-open>.ant-menu-submenu-title>.ant-menu-submenu-arrow:after,.ant-menu-dark .ant-menu-submenu-selected>.ant-menu-submenu-title>.ant-menu-submenu-arrow:after,.ant-menu-dark .ant-menu-submenu-title:hover>.ant-menu-submenu-title>.ant-menu-submenu-arrow:after,.ant-menu-dark .ant-menu-item:hover>.ant-menu-submenu-title>.ant-menu-submenu-arrow:before,.ant-menu-dark .ant-menu-item-active>.ant-menu-submenu-title>.ant-menu-submenu-arrow:before,.ant-menu-dark .ant-menu-submenu-active>.ant-menu-submenu-title>.ant-menu-submenu-arrow:before,.ant-menu-dark .ant-menu-submenu-open>.ant-menu-submenu-title>.ant-menu-submenu-arrow:before,.ant-menu-dark .ant-menu-submenu-selected>.ant-menu-submenu-title>.ant-menu-submenu-arrow:before,.ant-menu-dark .ant-menu-submenu-title:hover>.ant-menu-submenu-title>.ant-menu-submenu-arrow:before{background:#fff}.ant-menu-dark .ant-menu-item:hover{background-color:transparent}.ant-menu-dark.ant-menu-dark:not(.ant-menu-horizontal) .ant-menu-item-selected{background-color:#8d6a46}.ant-menu-dark .ant-menu-item-selected{color:#fff;border-right:0}.ant-menu-dark .ant-menu-item-selected:after{border-right:0}.ant-menu-dark .ant-menu-item-selected>a,.ant-menu-dark .ant-menu-item-selected>span>a,.ant-menu-dark .ant-menu-item-selected>a:hover,.ant-menu-dark .ant-menu-item-selected>span>a:hover{color:#fff}.ant-menu-dark .ant-menu-item-selected .ant-menu-item-icon,.ant-menu-dark .ant-menu-item-selected .anticon{color:#fff}.ant-menu-dark .ant-menu-item-selected .ant-menu-item-icon+span,.ant-menu-dark .ant-menu-item-selected .anticon+span{color:#fff}.ant-menu.ant-menu-dark .ant-menu-item-selected,.ant-menu-submenu-popup.ant-menu-dark .ant-menu-item-selected{background-color:#8d6a46}.ant-menu-dark .ant-menu-item-disabled,.ant-menu-dark .ant-menu-submenu-disabled,.ant-menu-dark .ant-menu-item-disabled>a,.ant-menu-dark .ant-menu-submenu-disabled>a,.ant-menu-dark .ant-menu-item-disabled>span>a,.ant-menu-dark .ant-menu-submenu-disabled>span>a{color:#ffffff59!important;opacity:.8}.ant-menu-dark .ant-menu-item-disabled>.ant-menu-submenu-title,.ant-menu-dark .ant-menu-submenu-disabled>.ant-menu-submenu-title{color:#ffffff59!important}.ant-menu-dark .ant-menu-item-disabled>.ant-menu-submenu-title>.ant-menu-submenu-arrow:before,.ant-menu-dark .ant-menu-submenu-disabled>.ant-menu-submenu-title>.ant-menu-submenu-arrow:before,.ant-menu-dark .ant-menu-item-disabled>.ant-menu-submenu-title>.ant-menu-submenu-arrow:after,.ant-menu-dark .ant-menu-submenu-disabled>.ant-menu-submenu-title>.ant-menu-submenu-arrow:after{background:#ffffff59!important}.ant-menu.ant-menu-rtl{direction:rtl;text-align:right}.ant-menu-rtl .ant-menu-item-group-title{text-align:right}.ant-menu-rtl.ant-menu-inline,.ant-menu-rtl.ant-menu-vertical{border-right:none;border-left:1px solid #f0f0f0}.ant-menu-rtl.ant-menu-dark.ant-menu-inline,.ant-menu-rtl.ant-menu-dark.ant-menu-vertical{border-left:none}.ant-menu-rtl.ant-menu-vertical.ant-menu-sub>.ant-menu-item,.ant-menu-rtl.ant-menu-vertical-left.ant-menu-sub>.ant-menu-item,.ant-menu-rtl.ant-menu-vertical-right.ant-menu-sub>.ant-menu-item,.ant-menu-rtl.ant-menu-vertical.ant-menu-sub>.ant-menu-submenu,.ant-menu-rtl.ant-menu-vertical-left.ant-menu-sub>.ant-menu-submenu,.ant-menu-rtl.ant-menu-vertical-right.ant-menu-sub>.ant-menu-submenu{transform-origin:top right}.ant-menu-rtl .ant-menu-item .ant-menu-item-icon,.ant-menu-rtl .ant-menu-submenu-title .ant-menu-item-icon,.ant-menu-rtl .ant-menu-item .anticon,.ant-menu-rtl .ant-menu-submenu-title .anticon{margin-right:auto;margin-left:10px}.ant-menu-rtl .ant-menu-item.ant-menu-item-only-child>.ant-menu-item-icon,.ant-menu-rtl .ant-menu-submenu-title.ant-menu-item-only-child>.ant-menu-item-icon,.ant-menu-rtl .ant-menu-item.ant-menu-item-only-child>.anticon,.ant-menu-rtl .ant-menu-submenu-title.ant-menu-item-only-child>.anticon{margin-left:0}.ant-menu-submenu-rtl.ant-menu-submenu-popup{transform-origin:100% 0}.ant-menu-rtl .ant-menu-submenu-vertical>.ant-menu-submenu-title .ant-menu-submenu-arrow,.ant-menu-rtl .ant-menu-submenu-vertical-left>.ant-menu-submenu-title .ant-menu-submenu-arrow,.ant-menu-rtl .ant-menu-submenu-vertical-right>.ant-menu-submenu-title .ant-menu-submenu-arrow,.ant-menu-rtl .ant-menu-submenu-inline>.ant-menu-submenu-title .ant-menu-submenu-arrow{right:auto;left:16px}.ant-menu-rtl .ant-menu-submenu-vertical>.ant-menu-submenu-title .ant-menu-submenu-arrow:before,.ant-menu-rtl .ant-menu-submenu-vertical-left>.ant-menu-submenu-title .ant-menu-submenu-arrow:before,.ant-menu-rtl .ant-menu-submenu-vertical-right>.ant-menu-submenu-title .ant-menu-submenu-arrow:before{transform:rotate(-45deg) translateY(-2px)}.ant-menu-rtl .ant-menu-submenu-vertical>.ant-menu-submenu-title .ant-menu-submenu-arrow:after,.ant-menu-rtl .ant-menu-submenu-vertical-left>.ant-menu-submenu-title .ant-menu-submenu-arrow:after,.ant-menu-rtl .ant-menu-submenu-vertical-right>.ant-menu-submenu-title .ant-menu-submenu-arrow:after{transform:rotate(45deg) translateY(2px)}.ant-menu-rtl.ant-menu-vertical .ant-menu-item:after,.ant-menu-rtl.ant-menu-vertical-left .ant-menu-item:after,.ant-menu-rtl.ant-menu-vertical-right .ant-menu-item:after,.ant-menu-rtl.ant-menu-inline .ant-menu-item:after{right:auto;left:0}.ant-menu-rtl.ant-menu-vertical .ant-menu-item,.ant-menu-rtl.ant-menu-vertical-left .ant-menu-item,.ant-menu-rtl.ant-menu-vertical-right .ant-menu-item,.ant-menu-rtl.ant-menu-inline .ant-menu-item,.ant-menu-rtl.ant-menu-vertical .ant-menu-submenu-title,.ant-menu-rtl.ant-menu-vertical-left .ant-menu-submenu-title,.ant-menu-rtl.ant-menu-vertical-right .ant-menu-submenu-title,.ant-menu-rtl.ant-menu-inline .ant-menu-submenu-title{text-align:right}.ant-menu-rtl.ant-menu-inline .ant-menu-submenu-title{padding-right:0;padding-left:34px}.ant-menu-rtl.ant-menu-vertical .ant-menu-submenu-title{padding-right:16px;padding-left:34px}.ant-menu-rtl.ant-menu-inline-collapsed.ant-menu-vertical .ant-menu-submenu-title{padding:0 calc(50% - 8px)}.ant-menu-rtl .ant-menu-item-group-list .ant-menu-item,.ant-menu-rtl .ant-menu-item-group-list .ant-menu-submenu-title{padding:0 28px 0 16px}.ant-menu-sub.ant-menu-inline{border:0}.ant-menu-rtl.ant-menu-sub.ant-menu-inline .ant-menu-item-group-title{padding-right:32px;padding-left:0}.ant-message{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:fixed;top:8px;left:0;z-index:1010;width:100%;pointer-events:none}.ant-message-notice{padding:8px;text-align:center}.ant-message-notice-content{display:inline-block;padding:10px 16px;background:#fff;border-radius:5px;box-shadow:0 3px 6px -4px #0000001f,0 6px 16px #00000014,0 9px 28px 8px #0000000d;pointer-events:all}.ant-message-success .anticon{color:#52c41a}.ant-message-error .anticon{color:#e31a1a}.ant-message-warning .anticon{color:#faad14}.ant-message-info .anticon,.ant-message-loading .anticon{color:#8d6a46}.ant-message .anticon{position:relative;top:1px;margin-right:8px;font-size:16px}.ant-message-notice.ant-move-up-leave.ant-move-up-leave-active{animation-name:MessageMoveOut;animation-duration:.3s}@keyframes MessageMoveOut{0%{max-height:150px;padding:8px;opacity:1}to{max-height:0;padding:0;opacity:0}}.ant-message-rtl,.ant-message-rtl span{direction:rtl}.ant-message-rtl .anticon{margin-right:0;margin-left:8px}.ant-modal{box-sizing:border-box;padding:0 0 24px;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";pointer-events:none;position:relative;top:100px;width:auto;max-width:calc(100vw - 32px);margin:0 auto}.ant-modal.ant-zoom-enter,.ant-modal.antzoom-appear{transform:none;opacity:0;animation-duration:.3s;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-modal-mask{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1000;height:100%;background-color:#00000073}.ant-modal-mask-hidden{display:none}.ant-modal-wrap{position:fixed;top:0;right:0;bottom:0;left:0;overflow:auto;outline:0;-webkit-overflow-scrolling:touch;z-index:1000}.ant-modal-title{margin:0;color:#1c2d56;font-weight:500;font-size:16px;line-height:22px;word-wrap:break-word}.ant-modal-content{position:relative;background-color:#fff;background-clip:padding-box;border:0;border-radius:5px;box-shadow:0 3px 6px -4px #0000001f,0 6px 16px #00000014,0 9px 28px 8px #0000000d;pointer-events:auto}.ant-modal-close{position:absolute;top:0;right:0;z-index:10;padding:0;color:#00000073;font-weight:700;line-height:1;text-decoration:none;background:transparent;border:0;outline:0;cursor:pointer;transition:color .3s}.ant-modal-close-x{display:block;width:56px;height:56px;font-size:16px;font-style:normal;line-height:56px;text-align:center;text-transform:none;text-rendering:auto}.ant-modal-close:focus,.ant-modal-close:hover{color:#000000bf;text-decoration:none}.ant-modal-header{padding:16px 24px;color:#000000d9;background:#fff;border-bottom:1px solid #f0f0f0;border-radius:5px 5px 0 0}.ant-modal-body{padding:24px;font-size:14px;line-height:1.5715;word-wrap:break-word}.ant-modal-footer{padding:10px 16px;text-align:right;background:transparent;border-top:1px solid #f0f0f0;border-radius:0 0 5px 5px}.ant-modal-footer .ant-btn+.ant-btn:not(.ant-dropdown-trigger){margin-bottom:0;margin-left:8px}.ant-modal-open{overflow:hidden}.ant-modal-centered{text-align:center}.ant-modal-centered:before{display:inline-block;width:0;height:100%;vertical-align:middle;content:""}.ant-modal-centered .ant-modal{top:0;display:inline-block;padding-bottom:0;text-align:left;vertical-align:middle}@media (max-width: 767px){.ant-modal{max-width:calc(100vw - 16px);margin:8px auto}.ant-modal-centered .ant-modal{flex:1}}.ant-modal-confirm .ant-modal-header{display:none}.ant-modal-confirm .ant-modal-body{padding:32px 32px 24px}.ant-modal-confirm-body-wrapper:before{display:table;content:""}.ant-modal-confirm-body-wrapper:after{display:table;clear:both;content:""}.ant-modal-confirm-body .ant-modal-confirm-title{display:block;overflow:hidden;color:#1c2d56;font-weight:500;font-size:16px;line-height:1.4}.ant-modal-confirm-body .ant-modal-confirm-content{margin-top:8px;color:#000000d9;font-size:14px}.ant-modal-confirm-body>.anticon{float:left;margin-right:16px;font-size:22px}.ant-modal-confirm-body>.anticon+.ant-modal-confirm-title+.ant-modal-confirm-content{margin-left:38px}.ant-modal-confirm .ant-modal-confirm-btns{float:right;margin-top:24px}.ant-modal-confirm .ant-modal-confirm-btns .ant-btn+.ant-btn{margin-bottom:0;margin-left:8px}.ant-modal-confirm-error .ant-modal-confirm-body>.anticon{color:#e31a1a}.ant-modal-confirm-warning .ant-modal-confirm-body>.anticon,.ant-modal-confirm-confirm .ant-modal-confirm-body>.anticon{color:#faad14}.ant-modal-confirm-info .ant-modal-confirm-body>.anticon{color:#8d6a46}.ant-modal-confirm-success .ant-modal-confirm-body>.anticon{color:#52c41a}.ant-modal-wrap-rtl{direction:rtl}.ant-modal-wrap-rtl .ant-modal-close{right:initial;left:0}.ant-modal-wrap-rtl .ant-modal-footer{text-align:left}.ant-modal-wrap-rtl .ant-modal-footer .ant-btn+.ant-btn{margin-right:8px;margin-left:0}.ant-modal-wrap-rtl .ant-modal-confirm-body{direction:rtl}.ant-modal-wrap-rtl .ant-modal-confirm-body>.anticon{float:right;margin-right:0;margin-left:16px}.ant-modal-wrap-rtl .ant-modal-confirm-body>.anticon+.ant-modal-confirm-title+.ant-modal-confirm-content{margin-right:38px;margin-left:0}.ant-modal-wrap-rtl .ant-modal-confirm-btns{float:left}.ant-modal-wrap-rtl .ant-modal-confirm-btns .ant-btn+.ant-btn{margin-right:8px;margin-left:0}.ant-modal-wrap-rtl.ant-modal-centered .ant-modal{text-align:right}.ant-notification{box-sizing:border-box;margin:0 24px 0 0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:fixed;z-index:1010}.ant-notification-topLeft,.ant-notification-bottomLeft{margin-right:0;margin-left:24px}.ant-notification-topLeft .ant-notification-fade-enter.ant-notification-fade-enter-active,.ant-notification-bottomLeft .ant-notification-fade-enter.ant-notification-fade-enter-active,.ant-notification-topLeft .ant-notification-fade-appear.ant-notification-fade-appear-active,.ant-notification-bottomLeft .ant-notification-fade-appear.ant-notification-fade-appear-active{animation-name:NotificationLeftFadeIn}.ant-notification-close-icon{font-size:14px;cursor:pointer}.ant-notification-hook-holder{position:relative}.ant-notification-notice{position:relative;width:384px;max-width:calc(100vw - 48px);margin-bottom:16px;margin-left:auto;padding:16px 24px;overflow:hidden;line-height:1.5715;word-wrap:break-word;background:#fff;border-radius:5px;box-shadow:0 3px 6px -4px #0000001f,0 6px 16px #00000014,0 9px 28px 8px #0000000d}.ant-notification-topLeft .ant-notification-notice,.ant-notification-bottomLeft .ant-notification-notice{margin-right:auto;margin-left:0}.ant-notification-notice-message{margin-bottom:8px;color:#1c2d56;font-size:16px;line-height:24px}.ant-notification-notice-message-single-line-auto-margin{display:block;width:calc(264px - 100%);max-width:4px;background-color:transparent;pointer-events:none}.ant-notification-notice-message-single-line-auto-margin:before{display:block;content:""}.ant-notification-notice-description{font-size:14px}.ant-notification-notice-closable .ant-notification-notice-message{padding-right:24px}.ant-notification-notice-with-icon .ant-notification-notice-message{margin-bottom:4px;margin-left:48px;font-size:16px}.ant-notification-notice-with-icon .ant-notification-notice-description{margin-left:48px;font-size:14px}.ant-notification-notice-icon{position:absolute;margin-left:4px;font-size:24px;line-height:24px}.anticon.ant-notification-notice-icon-success{color:#52c41a}.anticon.ant-notification-notice-icon-info{color:#8d6a46}.anticon.ant-notification-notice-icon-warning{color:#faad14}.anticon.ant-notification-notice-icon-error{color:#e31a1a}.ant-notification-notice-close{position:absolute;top:16px;right:22px;color:#00000073;outline:none}.ant-notification-notice-close:hover{color:#000000ab}.ant-notification-notice-btn{float:right;margin-top:16px}.ant-notification .notification-fade-effect{animation-duration:.24s;animation-timing-function:cubic-bezier(.645,.045,.355,1);animation-fill-mode:both}.ant-notification-fade-enter,.ant-notification-fade-appear{animation-duration:.24s;animation-timing-function:cubic-bezier(.645,.045,.355,1);animation-fill-mode:both;opacity:0;animation-play-state:paused}.ant-notification-fade-leave{animation-timing-function:cubic-bezier(.645,.045,.355,1);animation-fill-mode:both;animation-duration:.2s;animation-play-state:paused}.ant-notification-fade-enter.ant-notification-fade-enter-active,.ant-notification-fade-appear.ant-notification-fade-appear-active{animation-name:NotificationFadeIn;animation-play-state:running}.ant-notification-fade-leave.ant-notification-fade-leave-active{animation-name:NotificationFadeOut;animation-play-state:running}@keyframes NotificationFadeIn{0%{left:384px;opacity:0}to{left:0;opacity:1}}@keyframes NotificationLeftFadeIn{0%{right:384px;opacity:0}to{right:0;opacity:1}}@keyframes NotificationFadeOut{0%{max-height:150px;margin-bottom:16px;opacity:1}to{max-height:0;margin-bottom:0;padding-top:0;padding-bottom:0;opacity:0}}.ant-notification-rtl{direction:rtl}.ant-notification-rtl .ant-notification-notice-closable .ant-notification-notice-message{padding-right:0;padding-left:24px}.ant-notification-rtl .ant-notification-notice-with-icon .ant-notification-notice-message,.ant-notification-rtl .ant-notification-notice-with-icon .ant-notification-notice-description{margin-right:48px;margin-left:0}.ant-notification-rtl .ant-notification-notice-icon{margin-right:4px;margin-left:0}.ant-notification-rtl .ant-notification-notice-close{right:auto;left:22px}.ant-notification-rtl .ant-notification-notice-btn{float:left}.ant-page-header{box-sizing:border-box;margin:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:relative;padding:16px 24px;background-color:#fff}.ant-page-header-ghost{background-color:inherit}.ant-page-header.has-breadcrumb{padding-top:12px}.ant-page-header.has-footer{padding-bottom:0}.ant-page-header-back{margin-right:16px;font-size:16px;line-height:1}.ant-page-header-back-button{color:#1c2d56;text-decoration:none;outline:none;transition:color .3s;color:#000;cursor:pointer}.ant-page-header-back-button:focus,.ant-page-header-back-button:hover{color:#314263}.ant-page-header-back-button:active{color:#0e1730}.ant-page-header .ant-divider-vertical{height:14px;margin:0 12px;vertical-align:middle}.ant-breadcrumb+.ant-page-header-heading{margin-top:8px}.ant-page-header-heading{display:flex;justify-content:space-between}.ant-page-header-heading-left{display:flex;align-items:center;margin:4px 0;overflow:hidden}.ant-page-header-heading-title{margin-right:12px;margin-bottom:0;color:#1c2d56;font-weight:600;font-size:20px;line-height:32px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ant-page-header-heading .ant-avatar{margin-right:12px}.ant-page-header-heading-sub-title{margin-right:12px;color:#00000073;font-size:14px;line-height:1.5715;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ant-page-header-heading-extra{margin:4px 0;white-space:nowrap}.ant-page-header-heading-extra>*{margin-left:12px;white-space:unset}.ant-page-header-heading-extra>*:first-child{margin-left:0}.ant-page-header-content{padding-top:12px}.ant-page-header-footer{margin-top:16px}.ant-page-header-footer .ant-tabs>.ant-tabs-nav{margin:0}.ant-page-header-footer .ant-tabs>.ant-tabs-nav:before{border:none}.ant-page-header-footer .ant-tabs .ant-tabs-tab{padding-top:8px;padding-bottom:8px;font-size:16px}.ant-page-header-compact .ant-page-header-heading{flex-wrap:wrap}.ant-page-header-rtl{direction:rtl}.ant-page-header-rtl .ant-page-header-back{float:right;margin-right:0;margin-left:16px}.ant-page-header-rtl .ant-page-header-heading-title,.ant-page-header-rtl .ant-page-header-heading .ant-avatar{margin-right:0;margin-left:12px}.ant-page-header-rtl .ant-page-header-heading-sub-title{float:right;margin-right:0;margin-left:12px}.ant-page-header-rtl .ant-page-header-heading-tags{float:right}.ant-page-header-rtl .ant-page-header-heading-extra{float:left}.ant-page-header-rtl .ant-page-header-heading-extra>*{margin-right:12px;margin-left:0}.ant-page-header-rtl .ant-page-header-heading-extra>*:first-child{margin-right:0}.ant-page-header-rtl .ant-page-header-footer .ant-tabs-bar .ant-tabs-nav{float:right}.ant-pagination{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum"}.ant-pagination ul,.ant-pagination ol{margin:0;padding:0;list-style:none}.ant-pagination:after{display:block;clear:both;height:0;overflow:hidden;visibility:hidden;content:" "}.ant-pagination-total-text{display:inline-block;height:32px;margin-right:8px;line-height:30px;vertical-align:middle}.ant-pagination-item{display:inline-block;min-width:32px;height:32px;margin-right:8px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:30px;text-align:center;vertical-align:middle;list-style:none;background-color:#fff;border:1px solid #d9d9d9;border-radius:5px;outline:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-pagination-item a{display:block;padding:0 6px;color:#000000d9;transition:none}.ant-pagination-item a:hover{text-decoration:none}.ant-pagination-item:hover{border-color:#8d6a46;transition:all .3s}.ant-pagination-item:hover a{color:#8d6a46}.ant-pagination-item:focus-visible{border-color:#8d6a46;transition:all .3s}.ant-pagination-item:focus-visible a{color:#8d6a46}.ant-pagination-item-active{font-weight:500;background:#fff;border-color:#8d6a46}.ant-pagination-item-active a{color:#8d6a46}.ant-pagination-item-active:hover{border-color:#998165}.ant-pagination-item-active:focus-visible{border-color:#998165}.ant-pagination-item-active:hover a{color:#998165}.ant-pagination-item-active:focus-visible a{color:#998165}.ant-pagination-jump-prev,.ant-pagination-jump-next{outline:0}.ant-pagination-jump-prev .ant-pagination-item-container,.ant-pagination-jump-next .ant-pagination-item-container{position:relative}.ant-pagination-jump-prev .ant-pagination-item-container .ant-pagination-item-link-icon,.ant-pagination-jump-next .ant-pagination-item-container .ant-pagination-item-link-icon{color:#8d6a46;font-size:12px;letter-spacing:-1px;opacity:0;transition:all .2s}.ant-pagination-jump-prev .ant-pagination-item-container .ant-pagination-item-link-icon-svg,.ant-pagination-jump-next .ant-pagination-item-container .ant-pagination-item-link-icon-svg{top:0;right:0;bottom:0;left:0;margin:auto}.ant-pagination-jump-prev .ant-pagination-item-container .ant-pagination-item-ellipsis,.ant-pagination-jump-next .ant-pagination-item-container .ant-pagination-item-ellipsis{position:absolute;top:0;right:0;bottom:0;left:0;display:block;margin:auto;color:#00000040;font-family:Arial,Helvetica,sans-serif;letter-spacing:2px;text-align:center;text-indent:.13em;opacity:1;transition:all .2s}.ant-pagination-jump-prev:hover .ant-pagination-item-link-icon,.ant-pagination-jump-next:hover .ant-pagination-item-link-icon{opacity:1}.ant-pagination-jump-prev:hover .ant-pagination-item-ellipsis,.ant-pagination-jump-next:hover .ant-pagination-item-ellipsis{opacity:0}.ant-pagination-jump-prev:focus-visible .ant-pagination-item-link-icon,.ant-pagination-jump-next:focus-visible .ant-pagination-item-link-icon{opacity:1}.ant-pagination-jump-prev:focus-visible .ant-pagination-item-ellipsis,.ant-pagination-jump-next:focus-visible .ant-pagination-item-ellipsis{opacity:0}.ant-pagination-prev,.ant-pagination-jump-prev,.ant-pagination-jump-next{margin-right:8px}.ant-pagination-prev,.ant-pagination-next,.ant-pagination-jump-prev,.ant-pagination-jump-next{display:inline-block;min-width:32px;height:32px;color:#000000d9;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:32px;text-align:center;vertical-align:middle;list-style:none;border-radius:5px;cursor:pointer;transition:all .3s}.ant-pagination-prev,.ant-pagination-next{font-family:Arial,Helvetica,sans-serif;outline:0}.ant-pagination-prev button,.ant-pagination-next button{color:#000000d9;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-pagination-prev:hover button,.ant-pagination-next:hover button{border-color:#998165}.ant-pagination-prev .ant-pagination-item-link,.ant-pagination-next .ant-pagination-item-link{display:block;width:100%;height:100%;padding:0;font-size:12px;text-align:center;background-color:#fff;border:1px solid #d9d9d9;border-radius:5px;outline:none;transition:all .3s}.ant-pagination-prev:focus-visible .ant-pagination-item-link,.ant-pagination-next:focus-visible .ant-pagination-item-link{color:#8d6a46;border-color:#8d6a46}.ant-pagination-prev:hover .ant-pagination-item-link,.ant-pagination-next:hover .ant-pagination-item-link{color:#8d6a46;border-color:#8d6a46}.ant-pagination-disabled,.ant-pagination-disabled:hover{cursor:not-allowed}.ant-pagination-disabled .ant-pagination-item-link,.ant-pagination-disabled:hover .ant-pagination-item-link{color:#00000040;border-color:#d9d9d9;cursor:not-allowed}.ant-pagination-disabled:focus-visible{cursor:not-allowed}.ant-pagination-disabled:focus-visible .ant-pagination-item-link{color:#00000040;border-color:#d9d9d9;cursor:not-allowed}.ant-pagination-slash{margin:0 10px 0 5px}.ant-pagination-options{display:inline-block;margin-left:16px;vertical-align:middle}@media all and (-ms-high-contrast: none){.ant-pagination-options *::-ms-backdrop,.ant-pagination-options{vertical-align:top}}.ant-pagination-options-size-changer.ant-select{display:inline-block;width:auto}.ant-pagination-options-quick-jumper{display:inline-block;height:32px;margin-left:8px;line-height:32px;vertical-align:top}.ant-pagination-options-quick-jumper input{position:relative;display:inline-block;width:100%;min-width:0;padding:10px;color:#000000d9;font-size:14px;line-height:1.5715;background-color:#fff;background-image:none;border:1px solid #d9d9d9;border-radius:5px;transition:all .3s;width:50px;height:32px;margin:0 8px}.ant-pagination-options-quick-jumper input::-moz-placeholder{opacity:1}.ant-pagination-options-quick-jumper input::placeholder{color:#bfbfbf;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-pagination-options-quick-jumper input:-moz-placeholder{text-overflow:ellipsis}.ant-pagination-options-quick-jumper input:placeholder-shown{text-overflow:ellipsis}.ant-pagination-options-quick-jumper input:hover{border-color:#998165;border-right-width:1px!important}.ant-input-rtl .ant-pagination-options-quick-jumper input:hover{border-right-width:0;border-left-width:1px!important}.ant-pagination-options-quick-jumper input:focus,.ant-pagination-options-quick-jumper input-focused{border-color:#998165;box-shadow:0 0 0 2px #8d6a4633;border-right-width:1px!important;outline:0}.ant-input-rtl .ant-pagination-options-quick-jumper input:focus,.ant-input-rtl .ant-pagination-options-quick-jumper input-focused{border-right-width:0;border-left-width:1px!important}.ant-pagination-options-quick-jumper input-disabled{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;box-shadow:none;cursor:not-allowed;opacity:1}.ant-pagination-options-quick-jumper input-disabled:hover{border-color:#d9d9d9;border-right-width:1px!important}.ant-pagination-options-quick-jumper input[disabled]{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;box-shadow:none;cursor:not-allowed;opacity:1}.ant-pagination-options-quick-jumper input[disabled]:hover{border-color:#d9d9d9;border-right-width:1px!important}.ant-pagination-options-quick-jumper input-borderless,.ant-pagination-options-quick-jumper input-borderless:hover,.ant-pagination-options-quick-jumper input-borderless:focus,.ant-pagination-options-quick-jumper input-borderless-focused,.ant-pagination-options-quick-jumper input-borderless-disabled,.ant-pagination-options-quick-jumper input-borderless[disabled]{background-color:transparent;border:none;box-shadow:none}textarea.ant-pagination-options-quick-jumper input{max-width:100%;height:auto;min-height:32px;line-height:1.5715;vertical-align:bottom;transition:all .3s,height 0s}.ant-pagination-options-quick-jumper input-lg{padding:7.5px 11px;font-size:16px}.ant-pagination-options-quick-jumper input-sm{padding:0 7px}.ant-pagination-options-quick-jumper input-rtl{direction:rtl}.ant-pagination-simple .ant-pagination-prev,.ant-pagination-simple .ant-pagination-next{height:24px;line-height:24px;vertical-align:top}.ant-pagination-simple .ant-pagination-prev .ant-pagination-item-link,.ant-pagination-simple .ant-pagination-next .ant-pagination-item-link{height:24px;background-color:transparent;border:0}.ant-pagination-simple .ant-pagination-prev .ant-pagination-item-link:after,.ant-pagination-simple .ant-pagination-next .ant-pagination-item-link:after{height:24px;line-height:24px}.ant-pagination-simple .ant-pagination-simple-pager{display:inline-block;height:24px;margin-right:8px}.ant-pagination-simple .ant-pagination-simple-pager input{box-sizing:border-box;height:100%;margin-right:8px;padding:0 6px;text-align:center;background-color:#fff;border:1px solid #d9d9d9;border-radius:5px;outline:none;transition:border-color .3s}.ant-pagination-simple .ant-pagination-simple-pager input:hover{border-color:#8d6a46}.ant-pagination-simple .ant-pagination-simple-pager input:focus{border-color:#998165;box-shadow:0 0 0 2px #8d6a4633}.ant-pagination-simple .ant-pagination-simple-pager input[disabled]{color:#00000040;background:#f5f5f5;border-color:#d9d9d9;cursor:not-allowed}.ant-pagination.mini .ant-pagination-total-text,.ant-pagination.mini .ant-pagination-simple-pager{height:24px;line-height:24px}.ant-pagination.mini .ant-pagination-item{min-width:24px;height:24px;margin:0;line-height:22px}.ant-pagination.mini .ant-pagination-item:not(.ant-pagination-item-active){background:transparent;border-color:transparent}.ant-pagination.mini .ant-pagination-prev,.ant-pagination.mini .ant-pagination-next{min-width:24px;height:24px;margin:0;line-height:24px}.ant-pagination.mini .ant-pagination-prev .ant-pagination-item-link,.ant-pagination.mini .ant-pagination-next .ant-pagination-item-link{background:transparent;border-color:transparent}.ant-pagination.mini .ant-pagination-prev .ant-pagination-item-link:after,.ant-pagination.mini .ant-pagination-next .ant-pagination-item-link:after{height:24px;line-height:24px}.ant-pagination.mini .ant-pagination-jump-prev,.ant-pagination.mini .ant-pagination-jump-next{height:24px;margin-right:0;line-height:24px}.ant-pagination.mini .ant-pagination-options{margin-left:2px}.ant-pagination.mini .ant-pagination-options-size-changer{top:0}.ant-pagination.mini .ant-pagination-options-quick-jumper{height:24px;line-height:24px}.ant-pagination.mini .ant-pagination-options-quick-jumper input{padding:0 7px;width:44px;height:24px}.ant-pagination.ant-pagination-disabled{cursor:not-allowed}.ant-pagination.ant-pagination-disabled .ant-pagination-item{background:#f5f5f5;border-color:#d9d9d9;cursor:not-allowed}.ant-pagination.ant-pagination-disabled .ant-pagination-item a{color:#00000040;background:transparent;border:none;cursor:not-allowed}.ant-pagination.ant-pagination-disabled .ant-pagination-item-active{background:#e6e6e6}.ant-pagination.ant-pagination-disabled .ant-pagination-item-active a{color:#00000040}.ant-pagination.ant-pagination-disabled .ant-pagination-item-link{color:#00000040;background:#f5f5f5;border-color:#d9d9d9;cursor:not-allowed}.ant-pagination-simple.ant-pagination.ant-pagination-disabled .ant-pagination-item-link{background:transparent}.ant-pagination.ant-pagination-disabled .ant-pagination-item-link-icon{opacity:0}.ant-pagination.ant-pagination-disabled .ant-pagination-item-ellipsis{opacity:1}.ant-pagination.ant-pagination-disabled .ant-pagination-simple-pager{color:#00000040}@media only screen and (max-width: 992px){.ant-pagination-item-after-jump-prev,.ant-pagination-item-before-jump-next{display:none}}@media only screen and (max-width: 576px){.ant-pagination-options{display:none}}.ant-pagination-rtl .ant-pagination-total-text,.ant-pagination-rtl .ant-pagination-item,.ant-pagination-rtl .ant-pagination-prev,.ant-pagination-rtl .ant-pagination-jump-prev,.ant-pagination-rtl .ant-pagination-jump-next{margin-right:0;margin-left:8px}.ant-pagination-rtl .ant-pagination-slash{margin:0 5px 0 10px}.ant-pagination-rtl .ant-pagination-options{margin-right:16px;margin-left:0}.ant-pagination-rtl .ant-pagination-options .ant-pagination-options-size-changer.ant-select{margin-right:0;margin-left:8px}.ant-pagination-rtl .ant-pagination-options .ant-pagination-options-quick-jumper{margin-left:0}.ant-pagination-rtl.ant-pagination-simple .ant-pagination-simple-pager,.ant-pagination-rtl.ant-pagination-simple .ant-pagination-simple-pager input{margin-right:0;margin-left:8px}.ant-pagination-rtl.ant-pagination.mini .ant-pagination-options{margin-right:2px;margin-left:0}.ant-popconfirm{z-index:1060}.ant-popover{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:absolute;top:0;left:0;z-index:1030;font-weight:400;white-space:normal;text-align:left;cursor:auto;-webkit-user-select:text;-moz-user-select:text;user-select:text}.ant-popover:after{position:absolute;background:#ffffff03;content:""}.ant-popover-hidden{display:none}.ant-popover-placement-top,.ant-popover-placement-topLeft,.ant-popover-placement-topRight{padding-bottom:10px}.ant-popover-placement-right,.ant-popover-placement-rightTop,.ant-popover-placement-rightBottom{padding-left:10px}.ant-popover-placement-bottom,.ant-popover-placement-bottomLeft,.ant-popover-placement-bottomRight{padding-top:10px}.ant-popover-placement-left,.ant-popover-placement-leftTop,.ant-popover-placement-leftBottom{padding-right:10px}.ant-popover-inner{background-color:#fff;background-clip:padding-box;border-radius:5px;box-shadow:0 3px 6px -4px #0000001f,0 6px 16px #00000014,0 9px 28px 8px #0000000d;box-shadow:0 0 8px #00000026 \ }@media screen and (-ms-high-contrast: active),(-ms-high-contrast: none){.ant-popover-inner{box-shadow:0 3px 6px -4px #0000001f,0 6px 16px #00000014,0 9px 28px 8px #0000000d}}.ant-popover-title{min-width:177px;min-height:32px;margin:0;padding:5px 16px 4px;color:#1c2d56;font-weight:500;border-bottom:1px solid #f0f0f0}.ant-popover-inner-content{padding:12px 16px;color:#000000d9}.ant-popover-message{position:relative;padding:4px 0 12px;color:#000000d9;font-size:14px}.ant-popover-message>.anticon{position:absolute;top:8.0005px;color:#faad14;font-size:14px}.ant-popover-message-title{padding-left:22px}.ant-popover-buttons{margin-bottom:4px;text-align:right}.ant-popover-buttons button{margin-left:8px}.ant-popover-arrow{position:absolute;display:block;width:8.48528137px;height:8.48528137px;overflow:hidden;background:transparent;pointer-events:none}.ant-popover-arrow-content{position:absolute;top:0;right:0;bottom:0;left:0;display:block;width:6px;height:6px;margin:auto;background-color:#fff;content:"";pointer-events:auto}.ant-popover-placement-top .ant-popover-arrow,.ant-popover-placement-topLeft .ant-popover-arrow,.ant-popover-placement-topRight .ant-popover-arrow{bottom:1.51471863px}.ant-popover-placement-top .ant-popover-arrow-content,.ant-popover-placement-topLeft .ant-popover-arrow-content,.ant-popover-placement-topRight .ant-popover-arrow-content{box-shadow:3px 3px 7px #00000012;transform:translateY(-4.24264069px) rotate(45deg)}.ant-popover-placement-top .ant-popover-arrow{left:50%;transform:translate(-50%)}.ant-popover-placement-topLeft .ant-popover-arrow{left:16px}.ant-popover-placement-topRight .ant-popover-arrow{right:16px}.ant-popover-placement-right .ant-popover-arrow,.ant-popover-placement-rightTop .ant-popover-arrow,.ant-popover-placement-rightBottom .ant-popover-arrow{left:1.51471863px}.ant-popover-placement-right .ant-popover-arrow-content,.ant-popover-placement-rightTop .ant-popover-arrow-content,.ant-popover-placement-rightBottom .ant-popover-arrow-content{box-shadow:-3px 3px 7px #00000012;transform:translate(4.24264069px) rotate(45deg)}.ant-popover-placement-right .ant-popover-arrow{top:50%;transform:translateY(-50%)}.ant-popover-placement-rightTop .ant-popover-arrow{top:12px}.ant-popover-placement-rightBottom .ant-popover-arrow{bottom:12px}.ant-popover-placement-bottom .ant-popover-arrow,.ant-popover-placement-bottomLeft .ant-popover-arrow,.ant-popover-placement-bottomRight .ant-popover-arrow{top:1.51471863px}.ant-popover-placement-bottom .ant-popover-arrow-content,.ant-popover-placement-bottomLeft .ant-popover-arrow-content,.ant-popover-placement-bottomRight .ant-popover-arrow-content{box-shadow:-2px -2px 5px #0000000f;transform:translateY(4.24264069px) rotate(45deg)}.ant-popover-placement-bottom .ant-popover-arrow{left:50%;transform:translate(-50%)}.ant-popover-placement-bottomLeft .ant-popover-arrow{left:16px}.ant-popover-placement-bottomRight .ant-popover-arrow{right:16px}.ant-popover-placement-left .ant-popover-arrow,.ant-popover-placement-leftTop .ant-popover-arrow,.ant-popover-placement-leftBottom .ant-popover-arrow{right:1.51471863px}.ant-popover-placement-left .ant-popover-arrow-content,.ant-popover-placement-leftTop .ant-popover-arrow-content,.ant-popover-placement-leftBottom .ant-popover-arrow-content{box-shadow:3px -3px 7px #00000012;transform:translate(-4.24264069px) rotate(45deg)}.ant-popover-placement-left .ant-popover-arrow{top:50%;transform:translateY(-50%)}.ant-popover-placement-leftTop .ant-popover-arrow{top:12px}.ant-popover-placement-leftBottom .ant-popover-arrow{bottom:12px}.ant-popover-pink .ant-popover-inner,.ant-popover-pink .ant-popover-arrow-content,.ant-popover-magenta .ant-popover-inner,.ant-popover-magenta .ant-popover-arrow-content{background-color:#eb2f96}.ant-popover-red .ant-popover-inner,.ant-popover-red .ant-popover-arrow-content{background-color:#f5222d}.ant-popover-volcano .ant-popover-inner,.ant-popover-volcano .ant-popover-arrow-content{background-color:#fa541c}.ant-popover-orange .ant-popover-inner,.ant-popover-orange .ant-popover-arrow-content{background-color:#fa8c16}.ant-popover-yellow .ant-popover-inner,.ant-popover-yellow .ant-popover-arrow-content{background-color:#fadb14}.ant-popover-gold .ant-popover-inner,.ant-popover-gold .ant-popover-arrow-content{background-color:#faad14}.ant-popover-cyan .ant-popover-inner,.ant-popover-cyan .ant-popover-arrow-content{background-color:#13c2c2}.ant-popover-lime .ant-popover-inner,.ant-popover-lime .ant-popover-arrow-content{background-color:#a0d911}.ant-popover-green .ant-popover-inner,.ant-popover-green .ant-popover-arrow-content{background-color:#52c41a}.ant-popover-blue .ant-popover-inner,.ant-popover-blue .ant-popover-arrow-content{background-color:#1890ff}.ant-popover-geekblue .ant-popover-inner,.ant-popover-geekblue .ant-popover-arrow-content{background-color:#2f54eb}.ant-popover-purple .ant-popover-inner,.ant-popover-purple .ant-popover-arrow-content{background-color:#722ed1}.ant-popover-rtl{direction:rtl;text-align:right}.ant-popover-rtl .ant-popover-message-title{padding-right:22px;padding-left:16px}.ant-popover-rtl .ant-popover-buttons{text-align:left}.ant-popover-rtl .ant-popover-buttons button{margin-right:8px;margin-left:0}.ant-progress{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";display:inline-block}.ant-progress-line{position:relative;width:100%;font-size:14px}.ant-progress-steps{display:inline-block}.ant-progress-steps-outer{display:flex;flex-direction:row;align-items:center}.ant-progress-steps-item{flex-shrink:0;min-width:2px;margin-right:2px;background:#f3f3f3;transition:all .3s}.ant-progress-steps-item-active{background:#1890ff}.ant-progress-small.ant-progress-line,.ant-progress-small.ant-progress-line .ant-progress-text .anticon{font-size:12px}.ant-progress-outer{display:inline-block;width:100%;margin-right:0;padding-right:0}.ant-progress-show-info .ant-progress-outer{margin-right:calc(-2em - 8px);padding-right:calc(2em + 8px)}.ant-progress-inner{position:relative;display:inline-block;width:100%;overflow:hidden;vertical-align:middle;background-color:#f5f5f5;border-radius:100px}.ant-progress-circle-trail{stroke:#f5f5f5}.ant-progress-circle-path{animation:ant-progress-appear .3s}.ant-progress-inner:not(.ant-progress-circle-gradient) .ant-progress-circle-path{stroke:#1890ff}.ant-progress-success-bg,.ant-progress-bg{position:relative;background-color:#1890ff;border-radius:100px;transition:all .4s cubic-bezier(.08,.82,.17,1) 0s}.ant-progress-success-bg{position:absolute;top:0;left:0;background-color:#52c41a}.ant-progress-text{display:inline-block;width:2em;margin-left:8px;color:#000000d9;font-size:1em;line-height:1;white-space:nowrap;text-align:left;vertical-align:middle;word-break:normal}.ant-progress-text .anticon{font-size:14px}.ant-progress-status-active .ant-progress-bg:before{position:absolute;top:0;right:0;bottom:0;left:0;background:#fff;border-radius:10px;opacity:0;animation:ant-progress-active 2.4s cubic-bezier(.23,1,.32,1) infinite;content:""}.ant-progress-status-exception .ant-progress-bg{background-color:#e31a1a}.ant-progress-status-exception .ant-progress-text{color:#e31a1a}.ant-progress-status-exception .ant-progress-inner:not(.ant-progress-circle-gradient) .ant-progress-circle-path{stroke:#e31a1a}.ant-progress-status-success .ant-progress-bg{background-color:#52c41a}.ant-progress-status-success .ant-progress-text{color:#52c41a}.ant-progress-status-success .ant-progress-inner:not(.ant-progress-circle-gradient) .ant-progress-circle-path{stroke:#52c41a}.ant-progress-circle .ant-progress-inner{position:relative;line-height:1;background-color:transparent}.ant-progress-circle .ant-progress-text{position:absolute;top:50%;left:50%;width:100%;margin:0;padding:0;color:#000000d9;font-size:1em;line-height:1;white-space:normal;text-align:center;transform:translate(-50%,-50%)}.ant-progress-circle .ant-progress-text .anticon{font-size:1.16666667em}.ant-progress-circle.ant-progress-status-exception .ant-progress-text{color:#e31a1a}.ant-progress-circle.ant-progress-status-success .ant-progress-text{color:#52c41a}@keyframes ant-progress-active{0%{transform:translate(-100%) scaleX(0);opacity:.1}20%{transform:translate(-100%) scaleX(0);opacity:.5}to{transform:translate(0) scaleX(1);opacity:0}}.ant-progress-rtl{direction:rtl}.ant-progress-rtl.ant-progress-show-info .ant-progress-outer{margin-right:0;margin-left:calc(-2em - 8px);padding-right:0;padding-left:calc(2em + 8px)}.ant-progress-rtl .ant-progress-success-bg{right:0;left:auto}.ant-progress-rtl.ant-progress-line .ant-progress-text,.ant-progress-rtl.ant-progress-steps .ant-progress-text{margin-right:8px;margin-left:0;text-align:right}.ant-radio-group{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";display:inline-block;font-size:0}.ant-radio-group .ant-badge-count{z-index:1}.ant-radio-group>.ant-badge:not(:first-child)>.ant-radio-button-wrapper{border-left:none}.ant-radio-wrapper{box-sizing:border-box;margin:0 8px 0 0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:relative;display:inline-flex;align-items:baseline;cursor:pointer}.ant-radio-wrapper-disabled{cursor:not-allowed}.ant-radio-wrapper:after{display:inline-block;width:0;overflow:hidden;content:" "}.ant-radio{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:relative;top:.2em;display:inline-block;outline:none;cursor:pointer}.ant-radio-wrapper:hover .ant-radio,.ant-radio:hover .ant-radio-inner,.ant-radio-input:focus+.ant-radio-inner{border-color:#8d6a46}.ant-radio-input:focus+.ant-radio-inner{box-shadow:0 0 0 3px #ccc8c0}.ant-radio-checked:after{position:absolute;top:0;left:0;width:100%;height:100%;border:1px solid #8D6A46;border-radius:50%;visibility:hidden;animation:antRadioEffect .36s ease-in-out;animation-fill-mode:both;content:""}.ant-radio:hover:after,.ant-radio-wrapper:hover .ant-radio:after{visibility:visible}.ant-radio-inner{position:relative;top:0;left:0;display:block;width:16px;height:16px;background-color:#fff;border-color:#d9d9d9;border-style:solid;border-width:1px;border-radius:50%;transition:all .3s}.ant-radio-inner:after{position:absolute;top:50%;left:50%;display:block;width:16px;height:16px;margin-top:-8px;margin-left:-8px;background-color:#8d6a46;border-top:0;border-left:0;border-radius:16px;transform:scale(0);opacity:0;transition:all .3s cubic-bezier(.78,.14,.15,.86);content:" "}.ant-radio-input{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;cursor:pointer;opacity:0}.ant-radio-checked .ant-radio-inner{border-color:#8d6a46}.ant-radio-checked .ant-radio-inner:after{transform:scale(.5);opacity:1;transition:all .3s cubic-bezier(.78,.14,.15,.86)}.ant-radio-disabled{cursor:not-allowed}.ant-radio-disabled .ant-radio-inner{background-color:#f5f5f5;border-color:#d9d9d9!important;cursor:not-allowed}.ant-radio-disabled .ant-radio-inner:after{background-color:#0003}.ant-radio-disabled .ant-radio-input{cursor:not-allowed}.ant-radio-disabled+span{color:#00000040;cursor:not-allowed}span.ant-radio+*{padding-right:8px;padding-left:8px}.ant-radio-button-wrapper{position:relative;display:inline-block;height:32px;margin:0;padding:0 15px;color:#000000d9;font-size:14px;line-height:30px;background:#fff;border:1px solid #d9d9d9;border-top-width:1.02px;border-left-width:0;cursor:pointer;transition:color .3s,background .3s,border-color .3s,box-shadow .3s}.ant-radio-button-wrapper a{color:#000000d9}.ant-radio-button-wrapper>.ant-radio-button{position:absolute;top:0;left:0;z-index:-1;width:100%;height:100%}.ant-radio-group-large .ant-radio-button-wrapper{height:42px;font-size:16px;line-height:40px}.ant-radio-group-small .ant-radio-button-wrapper{height:24px;padding:0 7px;line-height:22px}.ant-radio-button-wrapper:not(:first-child):before{position:absolute;top:-1px;left:-1px;display:block;box-sizing:content-box;width:1px;height:100%;padding:1px 0;background-color:#d9d9d9;transition:background-color .3s;content:""}.ant-radio-button-wrapper:first-child{border-left:1px solid #d9d9d9;border-radius:5px 0 0 5px}.ant-radio-button-wrapper:last-child{border-radius:0 5px 5px 0}.ant-radio-button-wrapper:first-child:last-child{border-radius:5px}.ant-radio-button-wrapper:hover{position:relative;color:#8d6a46}.ant-radio-button-wrapper:focus-within{box-shadow:0 0 0 3px #ccc8c0}.ant-radio-button-wrapper .ant-radio-inner,.ant-radio-button-wrapper input[type=checkbox],.ant-radio-button-wrapper input[type=radio]{width:0;height:0;opacity:0;pointer-events:none}.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled){z-index:1;color:#8d6a46;background:#fff;border-color:#8d6a46}.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):before{background-color:#8d6a46}.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):first-child{border-color:#8d6a46}.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):hover{color:#998165;border-color:#998165}.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):hover:before{background-color:#998165}.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):active{color:#66482e;border-color:#66482e}.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):active:before{background-color:#66482e}.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):focus-within{box-shadow:0 0 0 3px #ccc8c0}.ant-radio-group-solid .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled){color:#fff;background:#8d6a46;border-color:#8d6a46}.ant-radio-group-solid .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):hover{color:#fff;background:#998165;border-color:#998165}.ant-radio-group-solid .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):active{color:#fff;background:#66482e;border-color:#66482e}.ant-radio-group-solid .ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled):focus-within{box-shadow:0 0 0 3px #ccc8c0}.ant-radio-button-wrapper-disabled{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9;cursor:not-allowed}.ant-radio-button-wrapper-disabled:first-child,.ant-radio-button-wrapper-disabled:hover{color:#00000040;background-color:#f5f5f5;border-color:#d9d9d9}.ant-radio-button-wrapper-disabled:first-child{border-left-color:#d9d9d9}.ant-radio-button-wrapper-disabled.ant-radio-button-wrapper-checked{color:#00000040;background-color:#e6e6e6;border-color:#d9d9d9;box-shadow:none}@keyframes antRadioEffect{0%{transform:scale(1);opacity:.5}to{transform:scale(1.6);opacity:0}}.ant-radio-group.ant-radio-group-rtl{direction:rtl}.ant-radio-wrapper.ant-radio-wrapper-rtl{margin-right:0;margin-left:8px;direction:rtl}.ant-radio-button-wrapper.ant-radio-button-wrapper-rtl{border-right-width:0;border-left-width:1px}.ant-radio-button-wrapper.ant-radio-button-wrapper-rtl.ant-radio-button-wrapper:not(:first-child):before{right:-1px;left:0}.ant-radio-button-wrapper.ant-radio-button-wrapper-rtl.ant-radio-button-wrapper:first-child{border-right:1px solid #d9d9d9;border-radius:0 5px 5px 0}.ant-radio-button-wrapper-checked:not([class*=" ant-radio-button-wrapper-disabled"]).ant-radio-button-wrapper:first-child{border-right-color:#998165}.ant-radio-button-wrapper.ant-radio-button-wrapper-rtl.ant-radio-button-wrapper:last-child{border-radius:5px 0 0 5px}.ant-radio-button-wrapper.ant-radio-button-wrapper-rtl.ant-radio-button-wrapper-disabled:first-child{border-right-color:#d9d9d9}.ant-rate{box-sizing:border-box;color:#000000d9;font-variant:tabular-nums;line-height:1.5715;font-feature-settings:"tnum";display:inline-block;margin:0;padding:0;color:#fadb14;font-size:20px;line-height:unset;list-style:none;outline:none}.ant-rate-disabled .ant-rate-star{cursor:default}.ant-rate-disabled .ant-rate-star:hover{transform:scale(1)}.ant-rate-star{position:relative;display:inline-block;color:inherit;cursor:pointer}.ant-rate-star:not(:last-child){margin-right:8px}.ant-rate-star>div{transition:all .3s,outline 0s}.ant-rate-star>div:hover{transform:scale(1.1)}.ant-rate-star>div:focus{outline:0}.ant-rate-star>div:focus-visible{outline:1px dashed #fadb14;transform:scale(1.1)}.ant-rate-star-first,.ant-rate-star-second{color:#f0f0f0;transition:all .3s;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-rate-star-first .anticon,.ant-rate-star-second .anticon{vertical-align:middle}.ant-rate-star-first{position:absolute;top:0;left:0;width:50%;height:100%;overflow:hidden;opacity:0}.ant-rate-star-half .ant-rate-star-first,.ant-rate-star-half .ant-rate-star-second{opacity:1}.ant-rate-star-half .ant-rate-star-first,.ant-rate-star-full .ant-rate-star-second{color:inherit}.ant-rate-text{display:inline-block;margin:0 8px;font-size:14px}.ant-rate-rtl{direction:rtl}.ant-rate-rtl .ant-rate-star:not(:last-child){margin-right:0;margin-left:8px}.ant-rate-rtl .ant-rate-star-first{right:0;left:auto}.ant-result{padding:48px 32px}.ant-result-success .ant-result-icon>.anticon{color:#52c41a}.ant-result-error .ant-result-icon>.anticon{color:#e31a1a}.ant-result-info .ant-result-icon>.anticon{color:#8d6a46}.ant-result-warning .ant-result-icon>.anticon{color:#faad14}.ant-result-image{width:250px;height:295px;margin:auto}.ant-result-icon{margin-bottom:24px;text-align:center}.ant-result-icon>.anticon{font-size:72px}.ant-result-title{color:#1c2d56;font-size:24px;line-height:1.8;text-align:center}.ant-result-subtitle{color:#00000073;font-size:14px;line-height:1.6;text-align:center}.ant-result-extra{margin:24px 0 0;text-align:center}.ant-result-extra>*{margin-right:8px}.ant-result-extra>*:last-child{margin-right:0}.ant-result-content{margin-top:24px;padding:24px 40px;background-color:#fafafa}.ant-result-rtl{direction:rtl}.ant-result-rtl .ant-result-extra>*{margin-right:0;margin-left:8px}.ant-result-rtl .ant-result-extra>*:last-child{margin-left:0}.ant-select-single .ant-select-selector{display:flex}.ant-select-single .ant-select-selector .ant-select-selection-search{position:absolute;top:0;right:10px;bottom:0;left:10px}.ant-select-single .ant-select-selector .ant-select-selection-search-input{width:100%}.ant-select-single .ant-select-selector .ant-select-selection-item,.ant-select-single .ant-select-selector .ant-select-selection-placeholder{padding:0;line-height:30px;transition:all .3s}@supports (-moz-appearance: meterbar){.ant-select-single .ant-select-selector .ant-select-selection-item,.ant-select-single .ant-select-selector .ant-select-selection-placeholder{line-height:30px}}.ant-select-single .ant-select-selector .ant-select-selection-item{position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-select-single .ant-select-selector .ant-select-selection-placeholder{transition:none;pointer-events:none}.ant-select-single .ant-select-selector:after,.ant-select-single .ant-select-selector .ant-select-selection-item:after,.ant-select-single .ant-select-selector .ant-select-selection-placeholder:after{display:inline-block;width:0;visibility:hidden;content:" "}.ant-select-single.ant-select-show-arrow .ant-select-selection-search{right:24px}.ant-select-single.ant-select-show-arrow .ant-select-selection-item,.ant-select-single.ant-select-show-arrow .ant-select-selection-placeholder{padding-right:18px}.ant-select-single.ant-select-open .ant-select-selection-item{color:#bfbfbf}.ant-select-single:not(.ant-select-customize-input) .ant-select-selector{width:100%;height:32px;padding:0 10px}.ant-select-single:not(.ant-select-customize-input) .ant-select-selector .ant-select-selection-search-input{height:30px}.ant-select-single:not(.ant-select-customize-input) .ant-select-selector:after{line-height:30px}.ant-select-single.ant-select-customize-input .ant-select-selector:after{display:none}.ant-select-single.ant-select-customize-input .ant-select-selector .ant-select-selection-search{position:static;width:100%}.ant-select-single.ant-select-customize-input .ant-select-selector .ant-select-selection-placeholder{position:absolute;right:0;left:0;padding:0 10px}.ant-select-single.ant-select-customize-input .ant-select-selector .ant-select-selection-placeholder:after{display:none}.ant-select-single.ant-select-lg:not(.ant-select-customize-input) .ant-select-selector{height:40px}.ant-select-single.ant-select-lg:not(.ant-select-customize-input) .ant-select-selector:after,.ant-select-single.ant-select-lg:not(.ant-select-customize-input) .ant-select-selector .ant-select-selection-item,.ant-select-single.ant-select-lg:not(.ant-select-customize-input) .ant-select-selector .ant-select-selection-placeholder{line-height:38px}.ant-select-single.ant-select-lg:not(.ant-select-customize-input):not(.ant-select-customize-input) .ant-select-selection-search-input{height:38px}.ant-select-single.ant-select-sm:not(.ant-select-customize-input) .ant-select-selector{height:24px}.ant-select-single.ant-select-sm:not(.ant-select-customize-input) .ant-select-selector:after,.ant-select-single.ant-select-sm:not(.ant-select-customize-input) .ant-select-selector .ant-select-selection-item,.ant-select-single.ant-select-sm:not(.ant-select-customize-input) .ant-select-selector .ant-select-selection-placeholder{line-height:22px}.ant-select-single.ant-select-sm:not(.ant-select-customize-input):not(.ant-select-customize-input) .ant-select-selection-search-input{height:22px}.ant-select-single.ant-select-sm:not(.ant-select-customize-input) .ant-select-selection-search{right:7px;left:7px}.ant-select-single.ant-select-sm:not(.ant-select-customize-input) .ant-select-selector{padding:0 7px}.ant-select-single.ant-select-sm:not(.ant-select-customize-input).ant-select-show-arrow .ant-select-selection-search{right:28px}.ant-select-single.ant-select-sm:not(.ant-select-customize-input).ant-select-show-arrow .ant-select-selection-item,.ant-select-single.ant-select-sm:not(.ant-select-customize-input).ant-select-show-arrow .ant-select-selection-placeholder{padding-right:21px}.ant-select-single.ant-select-lg:not(.ant-select-customize-input) .ant-select-selector{padding:0 11px}.ant-select-selection-overflow{position:relative;display:flex;flex:auto;flex-wrap:wrap;max-width:100%}.ant-select-selection-overflow-item{flex:none;align-self:center;max-width:100%}.ant-select-multiple .ant-select-selector{display:flex;flex-wrap:wrap;align-items:center;padding:4px 10px}.ant-select-show-search.ant-select-multiple .ant-select-selector{cursor:text}.ant-select-disabled.ant-select-multiple .ant-select-selector{background:#f5f5f5;cursor:not-allowed}.ant-select-multiple .ant-select-selector:after{display:inline-block;width:0;margin:5px 0;line-height:12px;content:" "}.ant-select-multiple.ant-select-show-arrow .ant-select-selector,.ant-select-multiple.ant-select-allow-clear .ant-select-selector{padding-right:24px}.ant-select-multiple .ant-select-selection-item{position:relative;display:flex;flex:none;box-sizing:border-box;max-width:100%;height:12px;margin-top:5px;margin-bottom:5px;line-height:10px;background:#f5f5f5;border:1px solid #f0f0f0;border-radius:5px;cursor:default;transition:font-size .3s,line-height .3s,height .3s;-webkit-user-select:none;-moz-user-select:none;user-select:none;margin-inline-end:10px;padding-inline-start:8px;padding-inline-end:4px}.ant-select-disabled.ant-select-multiple .ant-select-selection-item{color:#bfbfbf;border-color:#d9d9d9;cursor:not-allowed}.ant-select-multiple .ant-select-selection-item-content{display:inline-block;margin-right:4px;overflow:hidden;white-space:pre;text-overflow:ellipsis}.ant-select-multiple .ant-select-selection-item-remove{color:inherit;font-style:normal;line-height:0;text-align:center;text-transform:none;vertical-align:-.125em;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;color:#00000073;font-weight:700;font-size:10px;line-height:inherit;cursor:pointer}.ant-select-multiple .ant-select-selection-item-remove>*{line-height:1}.ant-select-multiple .ant-select-selection-item-remove svg{display:inline-block}.ant-select-multiple .ant-select-selection-item-remove:before{display:none}.ant-select-multiple .ant-select-selection-item-remove .ant-select-multiple .ant-select-selection-item-remove-icon{display:block}.ant-select-multiple .ant-select-selection-item-remove>.anticon{vertical-align:-.2em}.ant-select-multiple .ant-select-selection-item-remove:hover{color:#000000bf}.ant-select-multiple .ant-select-selection-overflow-item+.ant-select-selection-overflow-item .ant-select-selection-search{margin-inline-start:0}.ant-select-multiple .ant-select-selection-search{position:relative;max-width:100%;margin-inline-start:0px}.ant-select-multiple .ant-select-selection-search-input,.ant-select-multiple .ant-select-selection-search-mirror{height:12px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:12px;transition:all .3s}.ant-select-multiple .ant-select-selection-search-input{width:100%;min-width:4.1px}.ant-select-multiple .ant-select-selection-search-mirror{position:absolute;top:0;left:0;z-index:999;white-space:pre;visibility:hidden}.ant-select-multiple .ant-select-selection-placeholder{position:absolute;top:50%;right:11px;left:11px;transform:translateY(-50%);transition:all .3s}.ant-select-multiple.ant-select-lg .ant-select-selector:after{line-height:22px}.ant-select-multiple.ant-select-lg .ant-select-selection-item{height:22px;line-height:20px}.ant-select-multiple.ant-select-lg .ant-select-selection-search{height:22px;line-height:22px}.ant-select-multiple.ant-select-lg .ant-select-selection-search-input,.ant-select-multiple.ant-select-lg .ant-select-selection-search-mirror{height:22px;line-height:20px}.ant-select-multiple.ant-select-sm .ant-select-selector:after{line-height:4px}.ant-select-multiple.ant-select-sm .ant-select-selection-item{height:4px;line-height:2px}.ant-select-multiple.ant-select-sm .ant-select-selection-search{height:4px;line-height:4px}.ant-select-multiple.ant-select-sm .ant-select-selection-search-input,.ant-select-multiple.ant-select-sm .ant-select-selection-search-mirror{height:4px;line-height:2px}.ant-select-multiple.ant-select-sm .ant-select-selection-placeholder{left:7px}.ant-select-multiple.ant-select-sm .ant-select-selection-search{margin-inline-start:3px}.ant-select-multiple.ant-select-lg .ant-select-selection-item{height:32px;line-height:32px}.ant-select-disabled .ant-select-selection-item-remove{display:none}.ant-select{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:relative;display:inline-block;cursor:pointer}.ant-select:not(.ant-select-customize-input) .ant-select-selector{position:relative;background-color:#fff;border:1px solid #d9d9d9;border-radius:5px;transition:all .3s cubic-bezier(.645,.045,.355,1)}.ant-select:not(.ant-select-customize-input) .ant-select-selector input{cursor:pointer}.ant-select-show-search.ant-select:not(.ant-select-customize-input) .ant-select-selector{cursor:text}.ant-select-show-search.ant-select:not(.ant-select-customize-input) .ant-select-selector input{cursor:auto}.ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector{border-color:#998165;box-shadow:0 0 0 2px #8d6a4633;border-right-width:1px!important;outline:0}.ant-input-rtl .ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector{border-right-width:0;border-left-width:1px!important}.ant-select-disabled.ant-select:not(.ant-select-customize-input) .ant-select-selector{color:#00000040;background:#f5f5f5;cursor:not-allowed}.ant-select-multiple.ant-select-disabled.ant-select:not(.ant-select-customize-input) .ant-select-selector{background:#f5f5f5}.ant-select-disabled.ant-select:not(.ant-select-customize-input) .ant-select-selector input{cursor:not-allowed}.ant-select:not(.ant-select-customize-input) .ant-select-selector .ant-select-selection-search-input{margin:0;padding:0;background:transparent;border:none;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.ant-select:not(.ant-select-customize-input) .ant-select-selector .ant-select-selection-search-input::-webkit-search-cancel-button{display:none;-webkit-appearance:none}.ant-select:not(.ant-select-disabled):hover .ant-select-selector{border-color:#998165;border-right-width:1px!important}.ant-input-rtl .ant-select:not(.ant-select-disabled):hover .ant-select-selector{border-right-width:0;border-left-width:1px!important}.ant-select-selection-item{flex:1;overflow:hidden;font-weight:400;white-space:nowrap;text-overflow:ellipsis}@media all and (-ms-high-contrast: none){.ant-select-selection-item *::-ms-backdrop,.ant-select-selection-item{flex:auto}}.ant-select-selection-placeholder{flex:1;overflow:hidden;color:#bfbfbf;white-space:nowrap;text-overflow:ellipsis;pointer-events:none}@media all and (-ms-high-contrast: none){.ant-select-selection-placeholder *::-ms-backdrop,.ant-select-selection-placeholder{flex:auto}}.ant-select-arrow{display:inline-block;color:inherit;font-style:normal;text-transform:none;vertical-align:-.125em;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;position:absolute;top:50%;right:11px;width:12px;height:12px;margin-top:-6px;color:#00000040;font-size:12px;line-height:1;text-align:center;pointer-events:none}.ant-select-arrow>*{line-height:1}.ant-select-arrow svg{display:inline-block}.ant-select-arrow:before{display:none}.ant-select-arrow .ant-select-arrow-icon{display:block}.ant-select-arrow .anticon{vertical-align:top;transition:transform .3s}.ant-select-arrow .anticon>svg{vertical-align:top}.ant-select-arrow .anticon:not(.ant-select-suffix){pointer-events:auto}.ant-select-disabled .ant-select-arrow{cursor:not-allowed}.ant-select-clear{position:absolute;top:50%;right:11px;z-index:1;display:inline-block;width:12px;height:12px;margin-top:-6px;color:#00000040;font-size:12px;font-style:normal;line-height:1;text-align:center;text-transform:none;background:#fff;cursor:pointer;opacity:0;transition:color .3s ease,opacity .15s ease;text-rendering:auto}.ant-select-clear:before{display:block}.ant-select-clear:hover{color:#00000073}.ant-select:hover .ant-select-clear{opacity:1}.ant-select-dropdown{margin:0;color:#000000d9;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:absolute;top:-9999px;left:-9999px;z-index:1050;box-sizing:border-box;padding:4px 0;overflow:hidden;font-size:14px;font-variant:initial;background-color:#fff;border-radius:5px;outline:none;box-shadow:0 3px 6px -4px #0000001f,0 6px 16px #00000014,0 9px 28px 8px #0000000d}.ant-select-dropdown.ant-slide-up-enter.ant-slide-up-enter-active.ant-select-dropdown-placement-bottomLeft,.ant-select-dropdown.ant-slide-up-appear.ant-slide-up-appear-active.ant-select-dropdown-placement-bottomLeft{animation-name:antSlideUpIn}.ant-select-dropdown.ant-slide-up-enter.ant-slide-up-enter-active.ant-select-dropdown-placement-topLeft,.ant-select-dropdown.ant-slide-up-appear.ant-slide-up-appear-active.ant-select-dropdown-placement-topLeft{animation-name:antSlideDownIn}.ant-select-dropdown.ant-slide-up-leave.ant-slide-up-leave-active.ant-select-dropdown-placement-bottomLeft{animation-name:antSlideUpOut}.ant-select-dropdown.ant-slide-up-leave.ant-slide-up-leave-active.ant-select-dropdown-placement-topLeft{animation-name:antSlideDownOut}.ant-select-dropdown-hidden{display:none}.ant-select-dropdown-empty{color:#00000040}.ant-select-item-empty{position:relative;display:block;min-height:32px;padding:5px 12px;color:#000000d9;font-weight:400;font-size:14px;line-height:22px;color:#00000040}.ant-select-item{position:relative;display:block;min-height:32px;padding:5px 12px;color:#000000d9;font-weight:400;font-size:14px;line-height:22px;cursor:pointer;transition:background .3s ease}.ant-select-item-group{color:#00000073;font-size:12px;cursor:default}.ant-select-item-option{display:flex}.ant-select-item-option-content{flex:auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ant-select-item-option-state{flex:none}.ant-select-item-option-active:not(.ant-select-item-option-disabled){background-color:#f5f5f5}.ant-select-item-option-selected:not(.ant-select-item-option-disabled){color:#000000d9;font-weight:600;background-color:#ccc8c0}.ant-select-item-option-selected:not(.ant-select-item-option-disabled) .ant-select-item-option-state{color:#8d6a46}.ant-select-item-option-disabled{color:#00000040;cursor:not-allowed}.ant-select-item-option-disabled.ant-select-item-option-selected{background-color:#f5f5f5}.ant-select-item-option-grouped{padding-left:24px}.ant-select-lg{font-size:16px}.ant-select-borderless .ant-select-selector{background-color:transparent!important;border-color:transparent!important;box-shadow:none!important}.ant-select-rtl{direction:rtl}.ant-select-rtl .ant-select-arrow,.ant-select-rtl .ant-select-clear{right:initial;left:11px}.ant-select-dropdown-rtl{direction:rtl}.ant-select-dropdown-rtl .ant-select-item-option-grouped{padding-right:24px;padding-left:12px}.ant-select-rtl.ant-select-multiple.ant-select-show-arrow .ant-select-selector,.ant-select-rtl.ant-select-multiple.ant-select-allow-clear .ant-select-selector{padding-right:10px;padding-left:24px}.ant-select-rtl.ant-select-multiple .ant-select-selection-item{text-align:right}.ant-select-rtl.ant-select-multiple .ant-select-selection-item-content{margin-right:0;margin-left:4px;text-align:right}.ant-select-rtl.ant-select-multiple .ant-select-selection-search-mirror{right:0;left:auto}.ant-select-rtl.ant-select-multiple .ant-select-selection-placeholder{right:11px;left:auto}.ant-select-rtl.ant-select-multiple.ant-select-sm .ant-select-selection-placeholder{right:7px}.ant-select-rtl.ant-select-single .ant-select-selector .ant-select-selection-item,.ant-select-rtl.ant-select-single .ant-select-selector .ant-select-selection-placeholder{right:0;left:9px;text-align:right}.ant-select-rtl.ant-select-single.ant-select-show-arrow .ant-select-selection-search{right:10px;left:24px}.ant-select-rtl.ant-select-single.ant-select-show-arrow .ant-select-selection-item,.ant-select-rtl.ant-select-single.ant-select-show-arrow .ant-select-selection-placeholder{padding-right:0;padding-left:18px}.ant-select-rtl.ant-select-single.ant-select-sm:not(.ant-select-customize-input).ant-select-show-arrow .ant-select-selection-search{right:6px}.ant-select-rtl.ant-select-single.ant-select-sm:not(.ant-select-customize-input).ant-select-show-arrow .ant-select-selection-item,.ant-select-rtl.ant-select-single.ant-select-sm:not(.ant-select-customize-input).ant-select-show-arrow .ant-select-selection-placeholder{padding-right:0;padding-left:21px}.ant-skeleton{display:table;width:100%}.ant-skeleton-header{display:table-cell;padding-right:16px;vertical-align:top}.ant-skeleton-header .ant-skeleton-avatar{display:inline-block;vertical-align:top;background:#bebebe33;width:32px;height:32px;line-height:32px}.ant-skeleton-header .ant-skeleton-avatar.ant-skeleton-avatar-circle{border-radius:50%}.ant-skeleton-header .ant-skeleton-avatar-lg{width:40px;height:40px;line-height:40px}.ant-skeleton-header .ant-skeleton-avatar-lg.ant-skeleton-avatar-circle{border-radius:50%}.ant-skeleton-header .ant-skeleton-avatar-sm{width:24px;height:24px;line-height:24px}.ant-skeleton-header .ant-skeleton-avatar-sm.ant-skeleton-avatar-circle{border-radius:50%}.ant-skeleton-content{display:table-cell;width:100%;vertical-align:top}.ant-skeleton-content .ant-skeleton-title{width:100%;height:16px;margin-top:16px;background:#bebebe33;border-radius:4px}.ant-skeleton-content .ant-skeleton-title+.ant-skeleton-paragraph{margin-top:24px}.ant-skeleton-content .ant-skeleton-paragraph{padding:0}.ant-skeleton-content .ant-skeleton-paragraph>li{width:100%;height:16px;list-style:none;background:#bebebe33;border-radius:4px}.ant-skeleton-content .ant-skeleton-paragraph>li:last-child:not(:first-child):not(:nth-child(2)){width:61%}.ant-skeleton-content .ant-skeleton-paragraph>li+li{margin-top:16px}.ant-skeleton-with-avatar .ant-skeleton-content .ant-skeleton-title{margin-top:12px}.ant-skeleton-with-avatar .ant-skeleton-content .ant-skeleton-title+.ant-skeleton-paragraph{margin-top:28px}.ant-skeleton-round .ant-skeleton-content .ant-skeleton-title,.ant-skeleton-round .ant-skeleton-content .ant-skeleton-paragraph>li{border-radius:100px}.ant-skeleton.ant-skeleton-active .ant-skeleton-content .ant-skeleton-title,.ant-skeleton.ant-skeleton-active .ant-skeleton-content .ant-skeleton-paragraph>li{background:linear-gradient(90deg,#bebebe33 25%,#8181813d 37%,#bebebe33 63%);background-size:400% 100%;animation:ant-skeleton-loading 1.4s ease infinite}.ant-skeleton.ant-skeleton-active .ant-skeleton-avatar,.ant-skeleton.ant-skeleton-active .ant-skeleton-button,.ant-skeleton.ant-skeleton-active .ant-skeleton-input,.ant-skeleton.ant-skeleton-active .ant-skeleton-image{background:linear-gradient(90deg,#bebebe33 25%,#8181813d 37%,#bebebe33 63%);background-size:400% 100%;animation:ant-skeleton-loading 1.4s ease infinite}.ant-skeleton.ant-skeleton-block,.ant-skeleton.ant-skeleton-block .ant-skeleton-button{width:100%}.ant-skeleton-element{display:inline-block;width:auto}.ant-skeleton-element .ant-skeleton-button{display:inline-block;vertical-align:top;background:#bebebe33;border-radius:5px;width:64px;min-width:64px;height:32px;line-height:32px}.ant-skeleton-element .ant-skeleton-button.ant-skeleton-button-circle{width:32px;min-width:32px;border-radius:50%}.ant-skeleton-element .ant-skeleton-button.ant-skeleton-button-round{border-radius:32px}.ant-skeleton-element .ant-skeleton-button-lg{width:84px;min-width:84px;height:42px;line-height:42px}.ant-skeleton-element .ant-skeleton-button-lg.ant-skeleton-button-circle{width:42px;min-width:42px;border-radius:50%}.ant-skeleton-element .ant-skeleton-button-lg.ant-skeleton-button-round{border-radius:42px}.ant-skeleton-element .ant-skeleton-button-sm{width:48px;min-width:48px;height:24px;line-height:24px}.ant-skeleton-element .ant-skeleton-button-sm.ant-skeleton-button-circle{width:24px;min-width:24px;border-radius:50%}.ant-skeleton-element .ant-skeleton-button-sm.ant-skeleton-button-round{border-radius:24px}.ant-skeleton-element .ant-skeleton-avatar{display:inline-block;vertical-align:top;background:#bebebe33;width:32px;height:32px;line-height:32px}.ant-skeleton-element .ant-skeleton-avatar.ant-skeleton-avatar-circle{border-radius:50%}.ant-skeleton-element .ant-skeleton-avatar-lg{width:40px;height:40px;line-height:40px}.ant-skeleton-element .ant-skeleton-avatar-lg.ant-skeleton-avatar-circle{border-radius:50%}.ant-skeleton-element .ant-skeleton-avatar-sm{width:24px;height:24px;line-height:24px}.ant-skeleton-element .ant-skeleton-avatar-sm.ant-skeleton-avatar-circle{border-radius:50%}.ant-skeleton-element .ant-skeleton-input{display:inline-block;vertical-align:top;background:#bebebe33;width:100%;height:32px;line-height:32px}.ant-skeleton-element .ant-skeleton-input-lg{width:100%;height:42px;line-height:42px}.ant-skeleton-element .ant-skeleton-input-sm{width:100%;height:24px;line-height:24px}.ant-skeleton-element .ant-skeleton-image{display:flex;align-items:center;justify-content:center;vertical-align:top;background:#bebebe33;width:96px;height:96px;line-height:96px}.ant-skeleton-element .ant-skeleton-image.ant-skeleton-image-circle{border-radius:50%}.ant-skeleton-element .ant-skeleton-image-path{fill:#bfbfbf}.ant-skeleton-element .ant-skeleton-image-svg{width:48px;height:48px;line-height:48px;max-width:192px;max-height:192px}.ant-skeleton-element .ant-skeleton-image-svg.ant-skeleton-image-circle{border-radius:50%}@keyframes ant-skeleton-loading{0%{background-position:100% 50%}to{background-position:0 50%}}.ant-skeleton-rtl{direction:rtl}.ant-skeleton-rtl .ant-skeleton-header{padding-right:0;padding-left:16px}.ant-skeleton-rtl.ant-skeleton.ant-skeleton-active .ant-skeleton-content .ant-skeleton-title,.ant-skeleton-rtl.ant-skeleton.ant-skeleton-active .ant-skeleton-content .ant-skeleton-paragraph>li{animation-name:ant-skeleton-loading-rtl}.ant-skeleton-rtl.ant-skeleton.ant-skeleton-active .ant-skeleton-avatar{animation-name:ant-skeleton-loading-rtl}@keyframes ant-skeleton-loading-rtl{0%{background-position:0% 50%}to{background-position:100% 50%}}.ant-slider{box-sizing:border-box;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:relative;height:12px;margin:10px 6px;padding:4px 0;cursor:pointer;touch-action:none}.ant-slider-vertical{width:12px;height:100%;margin:6px 10px;padding:0 4px}.ant-slider-vertical .ant-slider-rail{width:4px;height:100%}.ant-slider-vertical .ant-slider-track{width:4px}.ant-slider-vertical .ant-slider-handle{margin-top:-6px;margin-left:-5px}.ant-slider-vertical .ant-slider-mark{top:0;left:12px;width:18px;height:100%}.ant-slider-vertical .ant-slider-mark-text{left:4px;white-space:nowrap}.ant-slider-vertical .ant-slider-step{width:4px;height:100%}.ant-slider-vertical .ant-slider-dot{top:auto;left:2px;margin-bottom:-4px}.ant-slider-tooltip .ant-tooltip-inner{min-width:unset}.ant-slider-rtl.ant-slider-vertical .ant-slider-handle{margin-right:-5px;margin-left:0}.ant-slider-rtl.ant-slider-vertical .ant-slider-mark{right:12px;left:auto}.ant-slider-rtl.ant-slider-vertical .ant-slider-mark-text{right:4px;left:auto}.ant-slider-rtl.ant-slider-vertical .ant-slider-dot{right:2px;left:auto}.ant-slider-with-marks{margin-bottom:28px}.ant-slider-rail{position:absolute;width:100%;height:4px;background-color:#f5f5f5;border-radius:5px;transition:background-color .3s}.ant-slider-track{position:absolute;height:4px;background-color:#b3aea8;border-radius:5px;transition:background-color .3s}.ant-slider-handle{position:absolute;width:14px;height:14px;margin-top:-5px;background-color:#fff;border:solid 2px #b3aea8;border-radius:50%;box-shadow:0;cursor:pointer;transition:border-color .3s,box-shadow .6s,transform .3s cubic-bezier(.18,.89,.32,1.28)}.ant-slider-handle-dragging.ant-slider-handle-dragging.ant-slider-handle-dragging{border-color:#a4886b;box-shadow:0 0 0 5px #8d6a461f}.ant-slider-handle:focus{border-color:#a4886b;outline:none;box-shadow:0 0 0 5px #8d6a461f}.ant-slider-handle.ant-tooltip-open{border-color:#8d6a46}.ant-slider:hover .ant-slider-rail{background-color:#e1e1e1}.ant-slider:hover .ant-slider-track{background-color:#a69988}.ant-slider:hover .ant-slider-handle:not(.ant-tooltip-open){border-color:#a69988}.ant-slider-mark{position:absolute;top:14px;left:0;width:100%;font-size:14px}.ant-slider-mark-text{position:absolute;display:inline-block;color:#00000073;text-align:center;word-break:keep-all;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-slider-mark-text-active{color:#000000d9}.ant-slider-step{position:absolute;width:100%;height:4px;background:transparent}.ant-slider-dot{position:absolute;top:-2px;width:8px;height:8px;margin-left:-4px;background-color:#fff;border:2px solid #f0f0f0;border-radius:50%;cursor:pointer}.ant-slider-dot:first-child{margin-left:-4px}.ant-slider-dot:last-child{margin-left:-4px}.ant-slider-dot-active{border-color:#c6b5a3}.ant-slider-disabled{cursor:not-allowed}.ant-slider-disabled .ant-slider-rail{background-color:#f5f5f5!important}.ant-slider-disabled .ant-slider-track{background-color:#00000040!important}.ant-slider-disabled .ant-slider-handle,.ant-slider-disabled .ant-slider-dot{background-color:#fff;border-color:#00000040!important;box-shadow:none;cursor:not-allowed}.ant-slider-disabled .ant-slider-mark-text,.ant-slider-disabled .ant-slider-dot{cursor:not-allowed!important}.ant-slider-rtl{direction:rtl}.ant-slider-rtl .ant-slider-mark{right:0;left:auto}.ant-slider-rtl .ant-slider-dot,.ant-slider-rtl .ant-slider-dot:first-child{margin-right:-4px;margin-left:0}.ant-slider-rtl .ant-slider-dot:last-child{margin-right:-4px;margin-left:0}.ant-space{display:inline-flex}.ant-space-vertical{flex-direction:column}.ant-space-align-center{align-items:center}.ant-space-align-start{align-items:flex-start}.ant-space-align-end{align-items:flex-end}.ant-space-align-baseline{align-items:baseline}.ant-space-item:empty{display:none}.ant-space-rtl{direction:rtl}.ant-spin{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:absolute;display:none;color:#8d6a46;text-align:center;vertical-align:middle;opacity:0;transition:transform .3s cubic-bezier(.78,.14,.15,.86)}.ant-spin-spinning{position:static;display:inline-block;opacity:1}.ant-spin-nested-loading{position:relative}.ant-spin-nested-loading>div>.ant-spin{position:absolute;top:0;left:0;z-index:4;display:block;width:100%;height:100%;max-height:400px}.ant-spin-nested-loading>div>.ant-spin .ant-spin-dot{position:absolute;top:50%;left:50%;margin:-10px}.ant-spin-nested-loading>div>.ant-spin .ant-spin-text{position:absolute;top:50%;width:100%;padding-top:5px;text-shadow:0 1px 2px #fff}.ant-spin-nested-loading>div>.ant-spin.ant-spin-show-text .ant-spin-dot{margin-top:-20px}.ant-spin-nested-loading>div>.ant-spin-sm .ant-spin-dot{margin:-7px}.ant-spin-nested-loading>div>.ant-spin-sm .ant-spin-text{padding-top:2px}.ant-spin-nested-loading>div>.ant-spin-sm.ant-spin-show-text .ant-spin-dot{margin-top:-17px}.ant-spin-nested-loading>div>.ant-spin-lg .ant-spin-dot{margin:-16px}.ant-spin-nested-loading>div>.ant-spin-lg .ant-spin-text{padding-top:11px}.ant-spin-nested-loading>div>.ant-spin-lg.ant-spin-show-text .ant-spin-dot{margin-top:-26px}.ant-spin-container{position:relative;transition:opacity .3s}.ant-spin-container:after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:10;display:none \ ;width:100%;height:100%;background:#fff;opacity:0;transition:all .3s;content:"";pointer-events:none}.ant-spin-blur{clear:both;opacity:.5;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}.ant-spin-blur:after{opacity:.4;pointer-events:auto}.ant-spin-tip{color:#00000073}.ant-spin-dot{position:relative;display:inline-block;font-size:20px;width:1em;height:1em}.ant-spin-dot-item{position:absolute;display:block;width:9px;height:9px;background-color:#8d6a46;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove 1s infinite linear alternate}.ant-spin-dot-item:nth-child(1){top:0;left:0}.ant-spin-dot-item:nth-child(2){top:0;right:0;animation-delay:.4s}.ant-spin-dot-item:nth-child(3){right:0;bottom:0;animation-delay:.8s}.ant-spin-dot-item:nth-child(4){bottom:0;left:0;animation-delay:1.2s}.ant-spin-dot-spin{transform:rotate(45deg);animation:antRotate 1.2s infinite linear}.ant-spin-sm .ant-spin-dot{font-size:14px}.ant-spin-sm .ant-spin-dot i{width:6px;height:6px}.ant-spin-lg .ant-spin-dot{font-size:32px}.ant-spin-lg .ant-spin-dot i{width:14px;height:14px}.ant-spin.ant-spin-show-text .ant-spin-text{display:block}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.ant-spin-blur{background:#fff;opacity:.5}}@keyframes antSpinMove{to{opacity:1}}@keyframes antRotate{to{transform:rotate(405deg)}}.ant-spin-rtl{direction:rtl}.ant-spin-rtl .ant-spin-dot-spin{transform:rotate(-45deg);animation-name:antRotateRtl}@keyframes antRotateRtl{to{transform:rotate(-405deg)}}.ant-statistic{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum"}.ant-statistic-title{margin-bottom:4px;color:#00000073;font-size:14px}.ant-statistic-content{color:#1c2d56;font-size:24px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji"}.ant-statistic-content-value{display:inline-block;direction:ltr}.ant-statistic-content-prefix,.ant-statistic-content-suffix{display:inline-block}.ant-statistic-content-prefix{margin-right:4px}.ant-statistic-content-suffix{margin-left:4px}.ant-statistic-rtl{direction:rtl}.ant-statistic-rtl .ant-statistic-content-prefix{margin-right:0;margin-left:4px}.ant-statistic-rtl .ant-statistic-content-suffix{margin-right:4px;margin-left:0}.ant-steps{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";display:flex;width:100%;font-size:0;text-align:initial}.ant-steps-item{position:relative;display:inline-block;flex:1;overflow:hidden;vertical-align:top}.ant-steps-item-container{outline:none}.ant-steps-item:last-child{flex:none}.ant-steps-item:last-child>.ant-steps-item-container>.ant-steps-item-tail,.ant-steps-item:last-child>.ant-steps-item-container>.ant-steps-item-content>.ant-steps-item-title:after{display:none}.ant-steps-item-icon,.ant-steps-item-content{display:inline-block;vertical-align:top}.ant-steps-item-icon{width:32px;height:32px;margin:0 8px 0 0;font-size:16px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:32px;text-align:center;border:1px solid rgba(0,0,0,.25);border-radius:32px;transition:background-color .3s,border-color .3s}.ant-steps-item-icon .ant-steps-icon{position:relative;top:-.5px;color:#8d6a46;line-height:1}.ant-steps-item-tail{position:absolute;top:12px;left:0;width:100%;padding:0 10px}.ant-steps-item-tail:after{display:inline-block;width:100%;height:1px;background:#f0f0f0;border-radius:1px;transition:background .3s;content:""}.ant-steps-item-title{position:relative;display:inline-block;padding-right:16px;color:#000000d9;font-size:16px;line-height:32px}.ant-steps-item-title:after{position:absolute;top:16px;left:100%;display:block;width:9999px;height:1px;background:#f0f0f0;content:""}.ant-steps-item-subtitle{display:inline;margin-left:8px;color:#00000073;font-weight:400;font-size:14px}.ant-steps-item-description{color:#00000073;font-size:14px}.ant-steps-item-wait .ant-steps-item-icon{background-color:#fff;border-color:#00000040}.ant-steps-item-wait .ant-steps-item-icon>.ant-steps-icon{color:#00000040}.ant-steps-item-wait .ant-steps-item-icon>.ant-steps-icon .ant-steps-icon-dot{background:#00000040}.ant-steps-item-wait>.ant-steps-item-container>.ant-steps-item-content>.ant-steps-item-title{color:#00000073}.ant-steps-item-wait>.ant-steps-item-container>.ant-steps-item-content>.ant-steps-item-title:after{background-color:#f0f0f0}.ant-steps-item-wait>.ant-steps-item-container>.ant-steps-item-content>.ant-steps-item-description{color:#00000073}.ant-steps-item-wait>.ant-steps-item-container>.ant-steps-item-tail:after{background-color:#f0f0f0}.ant-steps-item-process .ant-steps-item-icon{background-color:#fff;border-color:#8d6a46}.ant-steps-item-process .ant-steps-item-icon>.ant-steps-icon{color:#8d6a46}.ant-steps-item-process .ant-steps-item-icon>.ant-steps-icon .ant-steps-icon-dot{background:#8d6a46}.ant-steps-item-process>.ant-steps-item-container>.ant-steps-item-content>.ant-steps-item-title{color:#1c2d56}.ant-steps-item-process>.ant-steps-item-container>.ant-steps-item-content>.ant-steps-item-title:after{background-color:#f0f0f0}.ant-steps-item-process>.ant-steps-item-container>.ant-steps-item-content>.ant-steps-item-description{color:#000000d9}.ant-steps-item-process>.ant-steps-item-container>.ant-steps-item-tail:after{background-color:#f0f0f0}.ant-steps-item-process>.ant-steps-item-container>.ant-steps-item-icon{background:#8d6a46}.ant-steps-item-process>.ant-steps-item-container>.ant-steps-item-icon .ant-steps-icon{color:#fff}.ant-steps-item-process>.ant-steps-item-container>.ant-steps-item-title{font-weight:500}.ant-steps-item-finish .ant-steps-item-icon{background-color:#fff;border-color:#8d6a46}.ant-steps-item-finish .ant-steps-item-icon>.ant-steps-icon{color:#8d6a46}.ant-steps-item-finish .ant-steps-item-icon>.ant-steps-icon .ant-steps-icon-dot{background:#8d6a46}.ant-steps-item-finish>.ant-steps-item-container>.ant-steps-item-content>.ant-steps-item-title{color:#000000d9}.ant-steps-item-finish>.ant-steps-item-container>.ant-steps-item-content>.ant-steps-item-title:after{background-color:#8d6a46}.ant-steps-item-finish>.ant-steps-item-container>.ant-steps-item-content>.ant-steps-item-description{color:#00000073}.ant-steps-item-finish>.ant-steps-item-container>.ant-steps-item-tail:after{background-color:#8d6a46}.ant-steps-item-error .ant-steps-item-icon{background-color:#fff;border-color:#e31a1a}.ant-steps-item-error .ant-steps-item-icon>.ant-steps-icon{color:#e31a1a}.ant-steps-item-error .ant-steps-item-icon>.ant-steps-icon .ant-steps-icon-dot{background:#e31a1a}.ant-steps-item-error>.ant-steps-item-container>.ant-steps-item-content>.ant-steps-item-title{color:#e31a1a}.ant-steps-item-error>.ant-steps-item-container>.ant-steps-item-content>.ant-steps-item-title:after{background-color:#f0f0f0}.ant-steps-item-error>.ant-steps-item-container>.ant-steps-item-content>.ant-steps-item-description{color:#e31a1a}.ant-steps-item-error>.ant-steps-item-container>.ant-steps-item-tail:after{background-color:#f0f0f0}.ant-steps-item.ant-steps-next-error .ant-steps-item-title:after{background:#e31a1a}.ant-steps-item-disabled{cursor:not-allowed}.ant-steps .ant-steps-item:not(.ant-steps-item-active)>.ant-steps-item-container[role=button]{cursor:pointer}.ant-steps .ant-steps-item:not(.ant-steps-item-active)>.ant-steps-item-container[role=button] .ant-steps-item-title,.ant-steps .ant-steps-item:not(.ant-steps-item-active)>.ant-steps-item-container[role=button] .ant-steps-item-subtitle,.ant-steps .ant-steps-item:not(.ant-steps-item-active)>.ant-steps-item-container[role=button] .ant-steps-item-description,.ant-steps .ant-steps-item:not(.ant-steps-item-active)>.ant-steps-item-container[role=button] .ant-steps-item-icon .ant-steps-icon{transition:color .3s}.ant-steps .ant-steps-item:not(.ant-steps-item-active)>.ant-steps-item-container[role=button]:hover .ant-steps-item-title,.ant-steps .ant-steps-item:not(.ant-steps-item-active)>.ant-steps-item-container[role=button]:hover .ant-steps-item-subtitle,.ant-steps .ant-steps-item:not(.ant-steps-item-active)>.ant-steps-item-container[role=button]:hover .ant-steps-item-description{color:#8d6a46}.ant-steps .ant-steps-item:not(.ant-steps-item-active):not(.ant-steps-item-process)>.ant-steps-item-container[role=button]:hover .ant-steps-item-icon{border-color:#8d6a46}.ant-steps .ant-steps-item:not(.ant-steps-item-active):not(.ant-steps-item-process)>.ant-steps-item-container[role=button]:hover .ant-steps-item-icon .ant-steps-icon{color:#8d6a46}.ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item{padding-left:16px;white-space:nowrap}.ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item:first-child{padding-left:0}.ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item:last-child .ant-steps-item-title{padding-right:0}.ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item-tail{display:none}.ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item-description{max-width:140px;white-space:normal}.ant-steps-item-custom>.ant-steps-item-container>.ant-steps-item-icon{height:auto;background:none;border:0}.ant-steps-item-custom>.ant-steps-item-container>.ant-steps-item-icon>.ant-steps-icon{top:0;left:.5px;width:32px;height:32px;font-size:24px;line-height:32px}.ant-steps-item-custom.ant-steps-item-process .ant-steps-item-icon>.ant-steps-icon{color:#8d6a46}.ant-steps:not(.ant-steps-vertical) .ant-steps-item-custom .ant-steps-item-icon{width:auto;background:none}.ant-steps-small.ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item{padding-left:12px}.ant-steps-small.ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item:first-child{padding-left:0}.ant-steps-small .ant-steps-item-icon{width:24px;height:24px;margin:0 8px 0 0;font-size:12px;line-height:24px;text-align:center;border-radius:24px}.ant-steps-small .ant-steps-item-title{padding-right:12px;font-size:14px;line-height:24px}.ant-steps-small .ant-steps-item-title:after{top:12px}.ant-steps-small .ant-steps-item-description{color:#00000073;font-size:14px}.ant-steps-small .ant-steps-item-tail{top:8px}.ant-steps-small .ant-steps-item-custom .ant-steps-item-icon{width:inherit;height:inherit;line-height:inherit;background:none;border:0;border-radius:0}.ant-steps-small .ant-steps-item-custom .ant-steps-item-icon>.ant-steps-icon{font-size:24px;line-height:24px;transform:none}.ant-steps-vertical{display:flex;flex-direction:column}.ant-steps-vertical>.ant-steps-item{display:block;flex:1 0 auto;padding-left:0;overflow:visible}.ant-steps-vertical>.ant-steps-item .ant-steps-item-icon{float:left;margin-right:16px}.ant-steps-vertical>.ant-steps-item .ant-steps-item-content{display:block;min-height:48px;overflow:hidden}.ant-steps-vertical>.ant-steps-item .ant-steps-item-title{line-height:32px}.ant-steps-vertical>.ant-steps-item .ant-steps-item-description{padding-bottom:12px}.ant-steps-vertical>.ant-steps-item>.ant-steps-item-container>.ant-steps-item-tail{position:absolute;top:0;left:16px;width:1px;height:100%;padding:38px 0 6px}.ant-steps-vertical>.ant-steps-item>.ant-steps-item-container>.ant-steps-item-tail:after{width:1px;height:100%}.ant-steps-vertical>.ant-steps-item:not(:last-child)>.ant-steps-item-container>.ant-steps-item-tail{display:block}.ant-steps-vertical>.ant-steps-item>.ant-steps-item-container>.ant-steps-item-content>.ant-steps-item-title:after{display:none}.ant-steps-vertical.ant-steps-small .ant-steps-item-container .ant-steps-item-tail{position:absolute;top:0;left:12px;padding:30px 0 6px}.ant-steps-vertical.ant-steps-small .ant-steps-item-container .ant-steps-item-title{line-height:24px}.ant-steps-label-vertical .ant-steps-item{overflow:visible}.ant-steps-label-vertical .ant-steps-item-tail{margin-left:58px;padding:3.5px 24px}.ant-steps-label-vertical .ant-steps-item-content{display:block;width:116px;margin-top:8px;text-align:center}.ant-steps-label-vertical .ant-steps-item-icon{display:inline-block;margin-left:42px}.ant-steps-label-vertical .ant-steps-item-title{padding-right:0;padding-left:0}.ant-steps-label-vertical .ant-steps-item-title:after{display:none}.ant-steps-label-vertical .ant-steps-item-subtitle{display:block;margin-bottom:4px;margin-left:0;line-height:1.5715}.ant-steps-label-vertical.ant-steps-small:not(.ant-steps-dot) .ant-steps-item-icon{margin-left:46px}.ant-steps-dot .ant-steps-item-title,.ant-steps-dot.ant-steps-small .ant-steps-item-title{line-height:1.5715}.ant-steps-dot .ant-steps-item-tail,.ant-steps-dot.ant-steps-small .ant-steps-item-tail{top:2px;width:100%;margin:0 0 0 70px;padding:0}.ant-steps-dot .ant-steps-item-tail:after,.ant-steps-dot.ant-steps-small .ant-steps-item-tail:after{width:calc(100% - 20px);height:3px;margin-left:12px}.ant-steps-dot .ant-steps-item:first-child .ant-steps-icon-dot,.ant-steps-dot.ant-steps-small .ant-steps-item:first-child .ant-steps-icon-dot{left:2px}.ant-steps-dot .ant-steps-item-icon,.ant-steps-dot.ant-steps-small .ant-steps-item-icon{width:8px;height:8px;margin-left:67px;padding-right:0;line-height:8px;background:transparent;border:0}.ant-steps-dot .ant-steps-item-icon .ant-steps-icon-dot,.ant-steps-dot.ant-steps-small .ant-steps-item-icon .ant-steps-icon-dot{position:relative;float:left;width:100%;height:100%;border-radius:100px;transition:all .3s}.ant-steps-dot .ant-steps-item-icon .ant-steps-icon-dot:after,.ant-steps-dot.ant-steps-small .ant-steps-item-icon .ant-steps-icon-dot:after{position:absolute;top:-12px;left:-26px;width:60px;height:32px;background:#0000;content:""}.ant-steps-dot .ant-steps-item-content,.ant-steps-dot.ant-steps-small .ant-steps-item-content{width:140px}.ant-steps-dot .ant-steps-item-process .ant-steps-item-icon,.ant-steps-dot.ant-steps-small .ant-steps-item-process .ant-steps-item-icon{position:relative;top:-1px;width:10px;height:10px;line-height:10px;background:none}.ant-steps-dot .ant-steps-item-process .ant-steps-icon:first-child .ant-steps-icon-dot,.ant-steps-dot.ant-steps-small .ant-steps-item-process .ant-steps-icon:first-child .ant-steps-icon-dot{left:0}.ant-steps-vertical.ant-steps-dot .ant-steps-item-icon{margin-top:13px;margin-left:0;background:none}.ant-steps-vertical.ant-steps-dot .ant-steps-item>.ant-steps-item-container>.ant-steps-item-tail{top:6.5px;left:-9px;margin:0;padding:22px 0 4px}.ant-steps-vertical.ant-steps-dot .ant-steps-item:first-child .ant-steps-icon-dot{left:0}.ant-steps-vertical.ant-steps-dot .ant-steps-item-content{width:inherit}.ant-steps-vertical.ant-steps-dot .ant-steps-item-process .ant-steps-item-container .ant-steps-item-icon .ant-steps-icon-dot{top:-1px;left:-1px}.ant-steps-navigation{padding-top:12px}.ant-steps-navigation.ant-steps-small .ant-steps-item-container{margin-left:-12px}.ant-steps-navigation .ant-steps-item{overflow:visible;text-align:center}.ant-steps-navigation .ant-steps-item-container{display:inline-block;height:100%;margin-left:-16px;padding-bottom:12px;text-align:left;transition:opacity .3s}.ant-steps-navigation .ant-steps-item-container .ant-steps-item-content{max-width:auto}.ant-steps-navigation .ant-steps-item-container .ant-steps-item-title{max-width:100%;padding-right:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ant-steps-navigation .ant-steps-item-container .ant-steps-item-title:after{display:none}.ant-steps-navigation .ant-steps-item:not(.ant-steps-item-active) .ant-steps-item-container[role=button]{cursor:pointer}.ant-steps-navigation .ant-steps-item:not(.ant-steps-item-active) .ant-steps-item-container[role=button]:hover{opacity:.85}.ant-steps-navigation .ant-steps-item:last-child{flex:1}.ant-steps-navigation .ant-steps-item:last-child:after{display:none}.ant-steps-navigation .ant-steps-item:after{position:absolute;top:50%;left:100%;display:inline-block;width:12px;height:12px;margin-top:-14px;margin-left:-2px;border:1px solid rgba(0,0,0,.25);border-bottom:none;border-left:none;transform:rotate(45deg);content:""}.ant-steps-navigation .ant-steps-item:before{position:absolute;bottom:0;left:50%;display:inline-block;width:0;height:2px;background-color:#8d6a46;transition:width .3s,left .3s;transition-timing-function:ease-out;content:""}.ant-steps-navigation .ant-steps-item.ant-steps-item-active:before{left:0;width:100%}.ant-steps-navigation.ant-steps-vertical>.ant-steps-item{margin-right:0!important}.ant-steps-navigation.ant-steps-vertical>.ant-steps-item:before{display:none}.ant-steps-navigation.ant-steps-vertical>.ant-steps-item.ant-steps-item-active:before{top:0;right:0;left:unset;display:block;width:3px;height:calc(100% - 24px)}.ant-steps-navigation.ant-steps-vertical>.ant-steps-item:after{position:relative;top:-2px;left:50%;display:block;width:8px;height:8px;margin-bottom:8px;text-align:center;transform:rotate(135deg)}.ant-steps-navigation.ant-steps-vertical>.ant-steps-item>.ant-steps-item-container>.ant-steps-item-tail{visibility:hidden}.ant-steps-navigation.ant-steps-horizontal>.ant-steps-item>.ant-steps-item-container>.ant-steps-item-tail{visibility:hidden}.ant-steps-rtl{direction:rtl}.ant-steps.ant-steps-rtl .ant-steps-item-icon{margin-right:0;margin-left:8px}.ant-steps-rtl .ant-steps-item-tail{right:0;left:auto}.ant-steps-rtl .ant-steps-item-title{padding-right:0;padding-left:16px}.ant-steps-rtl .ant-steps-item-title:after{right:100%;left:auto}.ant-steps-rtl.ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item{padding-right:16px;padding-left:0}.ant-steps-rtl.ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item:first-child{padding-right:0}.ant-steps-rtl.ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item:last-child .ant-steps-item-title{padding-left:0}.ant-steps-rtl .ant-steps-item-custom .ant-steps-item-icon>.ant-steps-icon{right:.5px;left:auto}.ant-steps-rtl.ant-steps-navigation.ant-steps-small .ant-steps-item-container{margin-right:-12px;margin-left:0}.ant-steps-rtl.ant-steps-navigation .ant-steps-item-container{margin-right:-16px;margin-left:0;text-align:right}.ant-steps-rtl.ant-steps-navigation .ant-steps-item-container .ant-steps-item-title{padding-left:0}.ant-steps-rtl.ant-steps-navigation .ant-steps-item:after{right:100%;left:auto;margin-right:-2px;margin-left:0;transform:rotate(225deg)}.ant-steps-rtl.ant-steps-small.ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item{padding-right:12px;padding-left:0}.ant-steps-rtl.ant-steps-small.ant-steps-horizontal:not(.ant-steps-label-vertical) .ant-steps-item:first-child{padding-right:0}.ant-steps-rtl.ant-steps-small .ant-steps-item-title{padding-right:0;padding-left:12px}.ant-steps-rtl.ant-steps-vertical>.ant-steps-item .ant-steps-item-icon{float:right;margin-right:0;margin-left:16px}.ant-steps-rtl.ant-steps-vertical>.ant-steps-item>.ant-steps-item-container>.ant-steps-item-tail{right:16px;left:auto}.ant-steps-rtl.ant-steps-vertical.ant-steps-small .ant-steps-item-container .ant-steps-item-tail{right:12px;left:auto}.ant-steps-rtl.ant-steps-label-vertical .ant-steps-item-title{padding-left:0}.ant-steps-rtl.ant-steps-dot .ant-steps-item-tail,.ant-steps-rtl.ant-steps-dot.ant-steps-small .ant-steps-item-tail{margin:0 70px 0 0}.ant-steps-rtl.ant-steps-dot .ant-steps-item-tail:after,.ant-steps-rtl.ant-steps-dot.ant-steps-small .ant-steps-item-tail:after{margin-right:12px;margin-left:0}.ant-steps-rtl.ant-steps-dot .ant-steps-item:first-child .ant-steps-icon-dot,.ant-steps-rtl.ant-steps-dot.ant-steps-small .ant-steps-item:first-child .ant-steps-icon-dot{right:2px;left:auto}.ant-steps-rtl.ant-steps-dot .ant-steps-item-icon,.ant-steps-rtl.ant-steps-dot.ant-steps-small .ant-steps-item-icon{margin-right:67px;margin-left:0}.ant-steps-rtl.ant-steps-dot .ant-steps-item-icon .ant-steps-icon-dot,.ant-steps-rtl.ant-steps-dot.ant-steps-small .ant-steps-item-icon .ant-steps-icon-dot{float:right}.ant-steps-rtl.ant-steps-dot .ant-steps-item-icon .ant-steps-icon-dot:after,.ant-steps-rtl.ant-steps-dot.ant-steps-small .ant-steps-item-icon .ant-steps-icon-dot:after{right:-26px;left:auto}.ant-steps-rtl.ant-steps-vertical.ant-steps-dot .ant-steps-item-icon{margin-right:0;margin-left:16px}.ant-steps-rtl.ant-steps-vertical.ant-steps-dot .ant-steps-item>.ant-steps-item-container>.ant-steps-item-tail{right:-9px;left:auto}.ant-steps-rtl.ant-steps-vertical.ant-steps-dot .ant-steps-item:first-child .ant-steps-icon-dot{right:0;left:auto}.ant-steps-rtl.ant-steps-vertical.ant-steps-dot .ant-steps-item-process .ant-steps-icon-dot{right:-2px;left:auto}.ant-steps-rtl.ant-steps-with-progress.ant-steps-horizontal.ant-steps-label-horizontal .ant-steps-item:first-child.ant-steps-item-active{padding-right:4px}.ant-steps-with-progress .ant-steps-item{padding-top:4px}.ant-steps-with-progress .ant-steps-item .ant-steps-item-tail{top:4px!important}.ant-steps-with-progress.ant-steps-horizontal .ant-steps-item:first-child{padding-bottom:4px;padding-left:4px}.ant-steps-with-progress .ant-steps-item-icon{position:relative}.ant-steps-with-progress .ant-steps-item-icon .ant-progress{position:absolute;top:-5px;right:-5px;bottom:-5px;left:-5px}.ant-switch{margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:relative;display:inline-block;box-sizing:border-box;min-width:44px;height:22px;line-height:22px;vertical-align:middle;background-color:#00000040;border:0;border-radius:100px;cursor:pointer;transition:all .2s;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-switch:focus{outline:0;box-shadow:0 0 0 2px #0000001a}.ant-switch-checked:focus{box-shadow:0 0 0 2px #ccc8c0}.ant-switch:focus:hover{box-shadow:none}.ant-switch-checked{background-color:#8d6a46}.ant-switch-loading,.ant-switch-disabled{cursor:not-allowed;opacity:.4}.ant-switch-loading *,.ant-switch-disabled *{box-shadow:none;cursor:not-allowed}.ant-switch-inner{display:block;margin:0 7px 0 25px;color:#fff;font-size:12px;transition:margin .2s}.ant-switch-checked .ant-switch-inner{margin:0 25px 0 7px}.ant-switch-handle{position:absolute;top:2px;left:2px;width:18px;height:18px;transition:all .2s ease-in-out}.ant-switch-handle:before{position:absolute;top:0;right:0;bottom:0;left:0;background-color:#fff;border-radius:9px;box-shadow:0 2px 4px #00230b33;transition:all .2s ease-in-out;content:""}.ant-switch-checked .ant-switch-handle{left:calc(100% - 20px)}.ant-switch:not(.ant-switch-disabled):active .ant-switch-handle:before{right:-30%;left:0}.ant-switch:not(.ant-switch-disabled):active.ant-switch-checked .ant-switch-handle:before{right:0;left:-30%}.ant-switch-loading-icon.anticon{position:relative;top:2px;color:#000000a6;vertical-align:top}.ant-switch-checked .ant-switch-loading-icon{color:#8d6a46}.ant-switch-small{min-width:28px;height:16px;line-height:16px}.ant-switch-small .ant-switch-inner{margin:0 5px 0 18px;font-size:12px}.ant-switch-small .ant-switch-handle{width:12px;height:12px}.ant-switch-small .ant-switch-loading-icon{top:1.5px;font-size:9px}.ant-switch-small.ant-switch-checked .ant-switch-inner{margin:0 18px 0 5px}.ant-switch-small.ant-switch-checked .ant-switch-handle{left:calc(100% - 14px)}.ant-switch-rtl{direction:rtl}.ant-switch-rtl .ant-switch-inner{margin:0 25px 0 7px}.ant-switch-rtl .ant-switch-handle{right:2px;left:auto}.ant-switch-rtl:not(.ant-switch-rtl-disabled):active .ant-switch-handle:before{right:0;left:-30%}.ant-switch-rtl:not(.ant-switch-rtl-disabled):active.ant-switch-checked .ant-switch-handle:before{right:-30%;left:0}.ant-switch-rtl.ant-switch-checked .ant-switch-inner{margin:0 7px 0 25px}.ant-switch-rtl.ant-switch-checked .ant-switch-handle{right:calc(100% - 20px)}.ant-switch-rtl.ant-switch-small.ant-switch-checked .ant-switch-handle{right:calc(100% - 14px)}.ant-table.ant-table-middle{font-size:14px}.ant-table.ant-table-middle .ant-table-title,.ant-table.ant-table-middle .ant-table-footer,.ant-table.ant-table-middle .ant-table-thead>tr>th,.ant-table.ant-table-middle .ant-table-tbody>tr>td,.ant-table.ant-table-middle tfoot>tr>th,.ant-table.ant-table-middle tfoot>tr>td{padding:12px 8px}.ant-table.ant-table-middle .ant-table-filter-trigger{margin-right:-4px}.ant-table.ant-table-middle .ant-table-expanded-row-fixed{margin:-12px -8px}.ant-table.ant-table-middle .ant-table-tbody .ant-table-wrapper:only-child .ant-table{margin:-12px -8px -12px 25px}.ant-table.ant-table-small{font-size:14px}.ant-table.ant-table-small .ant-table-title,.ant-table.ant-table-small .ant-table-footer,.ant-table.ant-table-small .ant-table-thead>tr>th,.ant-table.ant-table-small .ant-table-tbody>tr>td,.ant-table.ant-table-small tfoot>tr>th,.ant-table.ant-table-small tfoot>tr>td{padding:8px}.ant-table.ant-table-small .ant-table-filter-trigger{margin-right:-4px}.ant-table.ant-table-small .ant-table-expanded-row-fixed{margin:-8px}.ant-table.ant-table-small .ant-table-tbody .ant-table-wrapper:only-child .ant-table{margin:-8px -8px -8px 25px}.ant-table-small .ant-table-thead>tr>th{background-color:#fafafa}.ant-table-small .ant-table-selection-column{width:46px;min-width:46px}.ant-table.ant-table-bordered>.ant-table-title{border:1px solid #f0f0f0;border-bottom:0}.ant-table.ant-table-bordered>.ant-table-container{border-left:1px solid #f0f0f0}.ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>thead>tr>th,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>thead>tr>th,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>thead>tr>th,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-summary>table>thead>tr>th,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>tbody>tr>td,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>tbody>tr>td,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>tbody>tr>td,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-summary>table>tbody>tr>td,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>tfoot>tr>th,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>tfoot>tr>th,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>tfoot>tr>th,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-summary>table>tfoot>tr>th,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>tfoot>tr>td,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>tfoot>tr>td,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>tfoot>tr>td,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-summary>table>tfoot>tr>td{border-right:1px solid #f0f0f0}.ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>thead>tr:not(:last-child)>th,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>thead>tr:not(:last-child)>th,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>thead>tr:not(:last-child)>th,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-summary>table>thead>tr:not(:last-child)>th{border-bottom:1px solid #f0f0f0}.ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>thead>tr>th:before,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>thead>tr>th:before,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>thead>tr>th:before,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-summary>table>thead>tr>th:before{background-color:transparent!important}.ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>thead>tr>.ant-table-cell-fix-right-first:after,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>thead>tr>.ant-table-cell-fix-right-first:after,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>thead>tr>.ant-table-cell-fix-right-first:after,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-summary>table>thead>tr>.ant-table-cell-fix-right-first:after,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>tbody>tr>.ant-table-cell-fix-right-first:after,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>tbody>tr>.ant-table-cell-fix-right-first:after,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>tbody>tr>.ant-table-cell-fix-right-first:after,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-summary>table>tbody>tr>.ant-table-cell-fix-right-first:after,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>tfoot>tr>.ant-table-cell-fix-right-first:after,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>tfoot>tr>.ant-table-cell-fix-right-first:after,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>tfoot>tr>.ant-table-cell-fix-right-first:after,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-summary>table>tfoot>tr>.ant-table-cell-fix-right-first:after{border-right:1px solid #f0f0f0}.ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>tbody>tr>td>.ant-table-expanded-row-fixed,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>tbody>tr>td>.ant-table-expanded-row-fixed,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>tbody>tr>td>.ant-table-expanded-row-fixed,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-summary>table>tbody>tr>td>.ant-table-expanded-row-fixed{margin:-16px -17px}.ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table>tbody>tr>td>.ant-table-expanded-row-fixed:after,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table>tbody>tr>td>.ant-table-expanded-row-fixed:after,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-body>table>tbody>tr>td>.ant-table-expanded-row-fixed:after,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-summary>table>tbody>tr>td>.ant-table-expanded-row-fixed:after{position:absolute;top:0;right:1px;bottom:0;border-right:1px solid #f0f0f0;content:""}.ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table,.ant-table.ant-table-bordered>.ant-table-container>.ant-table-header>table{border-top:1px solid #f0f0f0}.ant-table.ant-table-bordered.ant-table-scroll-horizontal>.ant-table-container>.ant-table-body>table>tbody>tr.ant-table-expanded-row>td,.ant-table.ant-table-bordered.ant-table-scroll-horizontal>.ant-table-container>.ant-table-body>table>tbody>tr.ant-table-placeholder>td{border-right:0}.ant-table.ant-table-bordered.ant-table-middle>.ant-table-container>.ant-table-content>table>tbody>tr>td>.ant-table-expanded-row-fixed,.ant-table.ant-table-bordered.ant-table-middle>.ant-table-container>.ant-table-body>table>tbody>tr>td>.ant-table-expanded-row-fixed{margin:-12px -9px}.ant-table.ant-table-bordered.ant-table-small>.ant-table-container>.ant-table-content>table>tbody>tr>td>.ant-table-expanded-row-fixed,.ant-table.ant-table-bordered.ant-table-small>.ant-table-container>.ant-table-body>table>tbody>tr>td>.ant-table-expanded-row-fixed{margin:-8px -9px}.ant-table.ant-table-bordered>.ant-table-footer{border:1px solid #f0f0f0;border-top:0}.ant-table-cell .ant-table-container:first-child{border-top:0}.ant-table-cell-scrollbar{box-shadow:0 1px 0 1px #fafafa}.ant-table-resize-handle{position:absolute;top:0;height:100%!important;bottom:0;left:auto!important;right:-8px;cursor:col-resize;touch-action:none;-webkit-user-select:auto;-moz-user-select:auto;user-select:auto;width:16px;z-index:1}.ant-table-resize-handle-line{display:block;width:1px;margin-left:7px;height:100%!important;background-color:#8d6a46;opacity:0}.ant-table-resize-handle:hover .ant-table-resize-handle-line{opacity:1}.ant-table-resize-handle.dragging{overflow:hidden}.ant-table-resize-handle.dragging .ant-table-resize-handle-line{opacity:1}.ant-table-resize-handle.dragging:before{position:absolute;top:0;bottom:0;width:100%;content:" ";width:200vw;transform:translate(-50%);opacity:0}.ant-table-wrapper{clear:both;max-width:100%}.ant-table-wrapper:before{display:table;content:""}.ant-table-wrapper:after{display:table;clear:both;content:""}.ant-table{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:relative;font-size:14px;background:#fff;border-radius:5px}.ant-table table{width:100%;text-align:left;border-radius:5px 5px 0 0;border-collapse:separate;border-spacing:0}.ant-table-thead>tr>th,.ant-table-tbody>tr>td,.ant-table tfoot>tr>th,.ant-table tfoot>tr>td{position:relative;padding:16px;overflow-wrap:break-word}.ant-table-cell-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;word-break:keep-all}.ant-table-cell-ellipsis.ant-table-cell-fix-left-last,.ant-table-cell-ellipsis.ant-table-cell-fix-right-first{overflow:visible}.ant-table-cell-ellipsis.ant-table-cell-fix-left-last .ant-table-cell-content,.ant-table-cell-ellipsis.ant-table-cell-fix-right-first .ant-table-cell-content{display:block;overflow:hidden;text-overflow:ellipsis}.ant-table-cell-ellipsis .ant-table-column-title{overflow:hidden;text-overflow:ellipsis;word-break:keep-all}.ant-table-title{padding:16px}.ant-table-footer{padding:16px;color:#1c2d56;background:#fafafa}.ant-table-thead>tr>th{position:relative;color:#1c2d56;font-weight:500;text-align:left;background:#fafafa;border-bottom:1px solid #f0f0f0;transition:background .3s ease}.ant-table-thead>tr>th[colspan]:not([colspan="1"]){text-align:center}.ant-table-thead>tr>th:not(:last-child):not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan]):before{position:absolute;top:50%;right:0;width:1px;height:1.6em;background-color:#0000000f;transform:translateY(-50%);transition:background-color .3s;content:""}.ant-table-thead>tr:not(:last-child)>th[colspan]{border-bottom:0}.ant-table-tbody>tr>td{border-bottom:1px solid #f0f0f0;transition:background .3s}.ant-table-tbody>tr>td>.ant-table-wrapper:only-child .ant-table,.ant-table-tbody>tr>td>.ant-table-expanded-row-fixed>.ant-table-wrapper:only-child .ant-table{margin:-16px -16px -16px 33px}.ant-table-tbody>tr>td>.ant-table-wrapper:only-child .ant-table-tbody>tr:last-child>td,.ant-table-tbody>tr>td>.ant-table-expanded-row-fixed>.ant-table-wrapper:only-child .ant-table-tbody>tr:last-child>td{border-bottom:0}.ant-table-tbody>tr>td>.ant-table-wrapper:only-child .ant-table-tbody>tr:last-child>td:first-child,.ant-table-tbody>tr>td>.ant-table-expanded-row-fixed>.ant-table-wrapper:only-child .ant-table-tbody>tr:last-child>td:first-child,.ant-table-tbody>tr>td>.ant-table-wrapper:only-child .ant-table-tbody>tr:last-child>td:last-child,.ant-table-tbody>tr>td>.ant-table-expanded-row-fixed>.ant-table-wrapper:only-child .ant-table-tbody>tr:last-child>td:last-child{border-radius:0}.ant-table-tbody>tr.ant-table-row:hover>td,.ant-table-tbody>tr>td.ant-table-cell-row-hover{background:#fafafa}.ant-table-tbody>tr.ant-table-row-selected>td{background:#ccc8c0;border-color:#00000008}.ant-table-tbody>tr.ant-table-row-selected:hover>td{background:#c7c3ba}.ant-table-summary{position:relative;z-index:2;background:#fff}div.ant-table-summary{box-shadow:0 -1px #f0f0f0}.ant-table-summary>tr>th,.ant-table-summary>tr>td{border-bottom:1px solid #f0f0f0}.ant-table-pagination.ant-pagination{margin:16px 0}.ant-table-pagination{display:flex;flex-wrap:wrap;row-gap:8px}.ant-table-pagination>*{flex:none}.ant-table-pagination-left{justify-content:flex-start}.ant-table-pagination-center{justify-content:center}.ant-table-pagination-right{justify-content:flex-end}.ant-table-thead th.ant-table-column-has-sorters{cursor:pointer;transition:all .3s}.ant-table-thead th.ant-table-column-has-sorters:hover{background:#0000000a}.ant-table-thead th.ant-table-column-has-sorters:hover:before{background-color:transparent!important}.ant-table-thead th.ant-table-column-has-sorters.ant-table-cell-fix-left:hover,.ant-table-thead th.ant-table-column-has-sorters.ant-table-cell-fix-right:hover,.ant-table-thead th.ant-table-column-sort{background:#f5f5f5}.ant-table-thead th.ant-table-column-sort:before{background-color:transparent!important}td.ant-table-column-sort{background:#fafafa}.ant-table-column-title{position:relative;z-index:1;flex:1}.ant-table-column-sorters{display:flex;flex:auto;align-items:center;justify-content:space-between}.ant-table-column-sorters:after{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;content:""}.ant-table-column-sorter{margin-left:4px;color:#bfbfbf;font-size:0;transition:color .3s}.ant-table-column-sorter-inner{display:inline-flex;flex-direction:column;align-items:center}.ant-table-column-sorter-up,.ant-table-column-sorter-down{font-size:11px}.ant-table-column-sorter-up.active,.ant-table-column-sorter-down.active{color:#8d6a46}.ant-table-column-sorter-up+.ant-table-column-sorter-down{margin-top:-.3em}.ant-table-column-sorters:hover .ant-table-column-sorter{color:#a6a6a6}.ant-table-filter-column{display:flex;justify-content:space-between}.ant-table-filter-trigger{position:relative;display:flex;align-items:center;margin:-4px -8px -4px 4px;padding:0 4px;color:#bfbfbf;font-size:12px;border-radius:5px;cursor:pointer;transition:all .3s}.ant-table-filter-trigger:hover{color:#00000073;background:#0000000a}.ant-table-filter-trigger.active{color:#8d6a46}.ant-table-filter-dropdown{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";min-width:120px;background-color:#fff;border-radius:5px;box-shadow:0 3px 6px -4px #0000001f,0 6px 16px #00000014,0 9px 28px 8px #0000000d}.ant-table-filter-dropdown .ant-dropdown-menu{max-height:264px;overflow-x:hidden;border:0;box-shadow:none}.ant-table-filter-dropdown .ant-dropdown-menu:empty:after{display:block;padding:8px 0;color:#00000040;font-size:12px;text-align:center;content:"Not Found"}.ant-table-filter-dropdown-tree{padding:8px 8px 0}.ant-table-filter-dropdown-tree .ant-tree-treenode .ant-tree-node-content-wrapper:hover{background-color:#f5f5f5}.ant-table-filter-dropdown-tree .ant-tree-treenode-checkbox-checked .ant-tree-node-content-wrapper,.ant-table-filter-dropdown-tree .ant-tree-treenode-checkbox-checked .ant-tree-node-content-wrapper:hover{background-color:#bfbbb4}.ant-table-filter-dropdown-search{padding:8px;border-bottom:1px #f0f0f0 solid}.ant-table-filter-dropdown-search-input input{min-width:140px}.ant-table-filter-dropdown-search-input .anticon{color:#00000040}.ant-table-filter-dropdown-checkall{width:100%;margin-bottom:4px;margin-left:4px}.ant-table-filter-dropdown-submenu>ul{max-height:calc(100vh - 130px);overflow-x:hidden;overflow-y:auto}.ant-table-filter-dropdown .ant-checkbox-wrapper+span,.ant-table-filter-dropdown-submenu .ant-checkbox-wrapper+span{padding-left:8px}.ant-table-filter-dropdown-btns{display:flex;justify-content:space-between;padding:7px 8px;overflow:hidden;background-color:inherit;border-top:1px solid #f0f0f0}.ant-table-selection-col{width:32px}.ant-table-bordered .ant-table-selection-col{width:50px}table tr th.ant-table-selection-column,table tr td.ant-table-selection-column{padding-right:8px;padding-left:8px;text-align:center}table tr th.ant-table-selection-column .ant-radio-wrapper,table tr td.ant-table-selection-column .ant-radio-wrapper{margin-right:0}table tr th.ant-table-selection-column.ant-table-cell-fix-left{z-index:3}table tr th.ant-table-selection-column:after{background-color:transparent!important}.ant-table-selection{position:relative;display:inline-flex;flex-direction:column}.ant-table-selection-extra{position:absolute;top:0;z-index:1;cursor:pointer;transition:all .3s;margin-inline-start:100%;padding-inline-start:4px}.ant-table-selection-extra .anticon{color:#bfbfbf;font-size:10px}.ant-table-selection-extra .anticon:hover{color:#a6a6a6}.ant-table-expand-icon-col{width:48px}.ant-table-row-expand-icon-cell{text-align:center}.ant-table-row-indent{float:left;height:1px}.ant-table-row-expand-icon{color:#1c2d56;text-decoration:none;cursor:pointer;transition:color .3s;position:relative;display:inline-flex;float:left;box-sizing:border-box;width:17px;height:17px;padding:0;color:inherit;line-height:17px;background:#fff;border:1px solid #f0f0f0;border-radius:5px;outline:none;transform:scale(1.17647059);transition:all .3s;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-table-row-expand-icon:focus,.ant-table-row-expand-icon:hover{color:#314263}.ant-table-row-expand-icon:active{color:#0e1730}.ant-table-row-expand-icon:focus,.ant-table-row-expand-icon:hover,.ant-table-row-expand-icon:active{border-color:currentcolor}.ant-table-row-expand-icon:before,.ant-table-row-expand-icon:after{position:absolute;background:currentcolor;transition:transform .3s ease-out;content:""}.ant-table-row-expand-icon:before{top:7px;right:3px;left:3px;height:1px}.ant-table-row-expand-icon:after{top:3px;bottom:3px;left:7px;width:1px;transform:rotate(90deg)}.ant-table-row-expand-icon-collapsed:before{transform:rotate(-180deg)}.ant-table-row-expand-icon-collapsed:after{transform:rotate(0)}.ant-table-row-expand-icon-spaced{background:transparent;border:0;visibility:hidden}.ant-table-row-expand-icon-spaced:before,.ant-table-row-expand-icon-spaced:after{display:none;content:none}.ant-table-row-indent+.ant-table-row-expand-icon{margin-top:2.5005px;margin-right:8px}tr.ant-table-expanded-row>td,tr.ant-table-expanded-row:hover>td{background:#fbfbfb}tr.ant-table-expanded-row .ant-descriptions-view{display:flex}tr.ant-table-expanded-row .ant-descriptions-view table{flex:auto;width:auto}.ant-table .ant-table-expanded-row-fixed{position:relative;margin:-16px;padding:16px}.ant-table-tbody>tr.ant-table-placeholder{text-align:center}.ant-table-empty .ant-table-tbody>tr.ant-table-placeholder{color:#00000040}.ant-table-tbody>tr.ant-table-placeholder:hover>td{background:#fff}.ant-table-cell-fix-left,.ant-table-cell-fix-right{position:sticky!important;z-index:2;background:#fff}.ant-table-cell-fix-left-first:after,.ant-table-cell-fix-left-last:after{position:absolute;top:0;right:0;bottom:-1px;width:30px;transform:translate(100%);transition:box-shadow .3s;content:"";pointer-events:none}.ant-table-cell-fix-right-first:after,.ant-table-cell-fix-right-last:after{position:absolute;top:0;bottom:-1px;left:0;width:30px;transform:translate(-100%);transition:box-shadow .3s;content:"";pointer-events:none}.ant-table .ant-table-container:before,.ant-table .ant-table-container:after{position:absolute;top:0;bottom:0;z-index:2;width:30px;transition:box-shadow .3s;content:"";pointer-events:none}.ant-table .ant-table-container:before{left:0}.ant-table .ant-table-container:after{right:0}.ant-table-ping-left:not(.ant-table-has-fix-left) .ant-table-container{position:relative}.ant-table-ping-left:not(.ant-table-has-fix-left) .ant-table-container:before{box-shadow:inset 10px 0 8px -8px #00000026}.ant-table-ping-left .ant-table-cell-fix-left-first:after,.ant-table-ping-left .ant-table-cell-fix-left-last:after{box-shadow:inset 10px 0 8px -8px #00000026}.ant-table-ping-left .ant-table-cell-fix-left-last:before{background-color:transparent!important}.ant-table-ping-right:not(.ant-table-has-fix-right) .ant-table-container{position:relative}.ant-table-ping-right:not(.ant-table-has-fix-right) .ant-table-container:after{box-shadow:inset -10px 0 8px -8px #00000026}.ant-table-ping-right .ant-table-cell-fix-right-first:after,.ant-table-ping-right .ant-table-cell-fix-right-last:after{box-shadow:inset -10px 0 8px -8px #00000026}.ant-table-sticky-holder{position:sticky;z-index:3;background:#fff}.ant-table-sticky-scroll{position:sticky;bottom:0;z-index:3;display:flex;align-items:center;background:#fff;border-top:1px solid #f0f0f0;opacity:.6}.ant-table-sticky-scroll:hover{transform-origin:center bottom}.ant-table-sticky-scroll-bar{height:8px;background-color:#00000059;border-radius:4px}.ant-table-sticky-scroll-bar:hover,.ant-table-sticky-scroll-bar-active{background-color:#000c}@media all and (-ms-high-contrast: none){.ant-table-ping-left .ant-table-cell-fix-left-last:after{box-shadow:none!important}.ant-table-ping-right .ant-table-cell-fix-right-first:after{box-shadow:none!important}}.ant-table-title{border-radius:5px 5px 0 0}.ant-table-title+.ant-table-container{border-top-left-radius:0;border-top-right-radius:0}.ant-table-title+.ant-table-container table>thead>tr:first-child th:first-child{border-radius:0}.ant-table-title+.ant-table-container table>thead>tr:first-child th:last-child{border-radius:0}.ant-table-container{border-top-left-radius:5px;border-top-right-radius:5px}.ant-table-container table>thead>tr:first-child th:first-child{border-top-left-radius:5px}.ant-table-container table>thead>tr:first-child th:last-child{border-top-right-radius:5px}.ant-table-footer{border-radius:0 0 5px 5px}.ant-table-wrapper-rtl,.ant-table-rtl{direction:rtl}.ant-table-wrapper-rtl .ant-table table{text-align:right}.ant-table-wrapper-rtl .ant-table-thead>tr>th[colspan]:not([colspan="1"]){text-align:center}.ant-table-wrapper-rtl .ant-table-thead>tr>th:not(:last-child):not(.ant-table-selection-column):not(.ant-table-row-expand-icon-cell):not([colspan]):before{right:auto;left:0}.ant-table-wrapper-rtl .ant-table-thead>tr>th{text-align:right}.ant-table-tbody>tr .ant-table-wrapper:only-child .ant-table.ant-table-rtl{margin:-16px 33px -16px -16px}.ant-table-wrapper.ant-table-wrapper-rtl .ant-table-pagination-left{justify-content:flex-end}.ant-table-wrapper.ant-table-wrapper-rtl .ant-table-pagination-right{justify-content:flex-start}.ant-table-wrapper-rtl .ant-table-column-sorter{margin-right:4px;margin-left:0}.ant-table-wrapper-rtl .ant-table-filter-column-title{padding:16px 16px 16px 2.3em}.ant-table-rtl .ant-table-thead tr th.ant-table-column-has-sorters .ant-table-filter-column-title{padding:0 0 0 2.3em}.ant-table-wrapper-rtl .ant-table-filter-trigger{margin:-4px 4px -4px -8px}.ant-dropdown-rtl .ant-table-filter-dropdown .ant-checkbox-wrapper+span,.ant-dropdown-rtl .ant-table-filter-dropdown-submenu .ant-checkbox-wrapper+span,.ant-dropdown-menu-submenu-rtl.ant-table-filter-dropdown .ant-checkbox-wrapper+span,.ant-dropdown-menu-submenu-rtl.ant-table-filter-dropdown-submenu .ant-checkbox-wrapper+span{padding-right:8px;padding-left:0}.ant-table-wrapper-rtl .ant-table-selection{text-align:center}.ant-table-wrapper-rtl .ant-table-row-indent,.ant-table-wrapper-rtl .ant-table-row-expand-icon{float:right}.ant-table-wrapper-rtl .ant-table-row-indent+.ant-table-row-expand-icon{margin-right:0;margin-left:8px}.ant-table-wrapper-rtl .ant-table-row-expand-icon:after{transform:rotate(-90deg)}.ant-table-wrapper-rtl .ant-table-row-expand-icon-collapsed:before{transform:rotate(180deg)}.ant-table-wrapper-rtl .ant-table-row-expand-icon-collapsed:after{transform:rotate(0)}.ant-tabs-small>.ant-tabs-nav .ant-tabs-tab{padding:8px 0;font-size:14px}.ant-tabs-large>.ant-tabs-nav .ant-tabs-tab{padding:16px 0;font-size:16px}.ant-tabs-card.ant-tabs-small>.ant-tabs-nav .ant-tabs-tab{padding:6px 16px}.ant-tabs-card.ant-tabs-large>.ant-tabs-nav .ant-tabs-tab{padding:7px 16px 6px}.ant-tabs-rtl{direction:rtl}.ant-tabs-rtl .ant-tabs-nav .ant-tabs-tab{margin:0 0 0 32px}.ant-tabs-rtl .ant-tabs-nav .ant-tabs-tab:last-of-type{margin-left:0}.ant-tabs-rtl .ant-tabs-nav .ant-tabs-tab .anticon{margin-right:0;margin-left:12px}.ant-tabs-rtl .ant-tabs-nav .ant-tabs-tab .ant-tabs-tab-remove{margin-right:8px;margin-left:-4px}.ant-tabs-rtl .ant-tabs-nav .ant-tabs-tab .ant-tabs-tab-remove .anticon{margin:0}.ant-tabs-rtl.ant-tabs-left>.ant-tabs-nav{order:1}.ant-tabs-rtl.ant-tabs-left>.ant-tabs-content-holder{order:0}.ant-tabs-rtl.ant-tabs-right>.ant-tabs-nav{order:0}.ant-tabs-rtl.ant-tabs-right>.ant-tabs-content-holder{order:1}.ant-tabs-rtl.ant-tabs-card.ant-tabs-top>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab,.ant-tabs-rtl.ant-tabs-card.ant-tabs-bottom>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab,.ant-tabs-rtl.ant-tabs-card.ant-tabs-top>div>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab,.ant-tabs-rtl.ant-tabs-card.ant-tabs-bottom>div>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab{margin-right:2px;margin-left:0}.ant-tabs-rtl.ant-tabs-card.ant-tabs-top>.ant-tabs-nav .ant-tabs-nav-add,.ant-tabs-rtl.ant-tabs-card.ant-tabs-bottom>.ant-tabs-nav .ant-tabs-nav-add,.ant-tabs-rtl.ant-tabs-card.ant-tabs-top>div>.ant-tabs-nav .ant-tabs-nav-add,.ant-tabs-rtl.ant-tabs-card.ant-tabs-bottom>div>.ant-tabs-nav .ant-tabs-nav-add{margin-right:2px;margin-left:0}.ant-tabs-dropdown-rtl{direction:rtl}.ant-tabs-dropdown-rtl .ant-tabs-dropdown-menu-item{text-align:right}.ant-tabs-top,.ant-tabs-bottom{flex-direction:column}.ant-tabs-top>.ant-tabs-nav,.ant-tabs-bottom>.ant-tabs-nav,.ant-tabs-top>div>.ant-tabs-nav,.ant-tabs-bottom>div>.ant-tabs-nav{margin:0 0 16px}.ant-tabs-top>.ant-tabs-nav:before,.ant-tabs-bottom>.ant-tabs-nav:before,.ant-tabs-top>div>.ant-tabs-nav:before,.ant-tabs-bottom>div>.ant-tabs-nav:before{position:absolute;right:0;left:0;border-bottom:1px solid #f0f0f0;content:""}.ant-tabs-top>.ant-tabs-nav .ant-tabs-ink-bar,.ant-tabs-bottom>.ant-tabs-nav .ant-tabs-ink-bar,.ant-tabs-top>div>.ant-tabs-nav .ant-tabs-ink-bar,.ant-tabs-bottom>div>.ant-tabs-nav .ant-tabs-ink-bar{height:2px}.ant-tabs-top>.ant-tabs-nav .ant-tabs-ink-bar-animated,.ant-tabs-bottom>.ant-tabs-nav .ant-tabs-ink-bar-animated,.ant-tabs-top>div>.ant-tabs-nav .ant-tabs-ink-bar-animated,.ant-tabs-bottom>div>.ant-tabs-nav .ant-tabs-ink-bar-animated{transition:width .3s,left .3s,right .3s}.ant-tabs-top>.ant-tabs-nav .ant-tabs-nav-wrap:before,.ant-tabs-bottom>.ant-tabs-nav .ant-tabs-nav-wrap:before,.ant-tabs-top>div>.ant-tabs-nav .ant-tabs-nav-wrap:before,.ant-tabs-bottom>div>.ant-tabs-nav .ant-tabs-nav-wrap:before,.ant-tabs-top>.ant-tabs-nav .ant-tabs-nav-wrap:after,.ant-tabs-bottom>.ant-tabs-nav .ant-tabs-nav-wrap:after,.ant-tabs-top>div>.ant-tabs-nav .ant-tabs-nav-wrap:after,.ant-tabs-bottom>div>.ant-tabs-nav .ant-tabs-nav-wrap:after{top:0;bottom:0;width:30px}.ant-tabs-top>.ant-tabs-nav .ant-tabs-nav-wrap:before,.ant-tabs-bottom>.ant-tabs-nav .ant-tabs-nav-wrap:before,.ant-tabs-top>div>.ant-tabs-nav .ant-tabs-nav-wrap:before,.ant-tabs-bottom>div>.ant-tabs-nav .ant-tabs-nav-wrap:before{left:0;box-shadow:inset 10px 0 8px -8px #00000014}.ant-tabs-top>.ant-tabs-nav .ant-tabs-nav-wrap:after,.ant-tabs-bottom>.ant-tabs-nav .ant-tabs-nav-wrap:after,.ant-tabs-top>div>.ant-tabs-nav .ant-tabs-nav-wrap:after,.ant-tabs-bottom>div>.ant-tabs-nav .ant-tabs-nav-wrap:after{right:0;box-shadow:inset -10px 0 8px -8px #00000014}.ant-tabs-top>.ant-tabs-nav .ant-tabs-nav-wrap.ant-tabs-nav-wrap-ping-left:before,.ant-tabs-bottom>.ant-tabs-nav .ant-tabs-nav-wrap.ant-tabs-nav-wrap-ping-left:before,.ant-tabs-top>div>.ant-tabs-nav .ant-tabs-nav-wrap.ant-tabs-nav-wrap-ping-left:before,.ant-tabs-bottom>div>.ant-tabs-nav .ant-tabs-nav-wrap.ant-tabs-nav-wrap-ping-left:before{opacity:1}.ant-tabs-top>.ant-tabs-nav .ant-tabs-nav-wrap.ant-tabs-nav-wrap-ping-right:after,.ant-tabs-bottom>.ant-tabs-nav .ant-tabs-nav-wrap.ant-tabs-nav-wrap-ping-right:after,.ant-tabs-top>div>.ant-tabs-nav .ant-tabs-nav-wrap.ant-tabs-nav-wrap-ping-right:after,.ant-tabs-bottom>div>.ant-tabs-nav .ant-tabs-nav-wrap.ant-tabs-nav-wrap-ping-right:after{opacity:1}.ant-tabs-top>.ant-tabs-nav:before,.ant-tabs-top>div>.ant-tabs-nav:before{bottom:0}.ant-tabs-top>.ant-tabs-nav .ant-tabs-ink-bar,.ant-tabs-top>div>.ant-tabs-nav .ant-tabs-ink-bar{bottom:0}.ant-tabs-bottom>.ant-tabs-nav,.ant-tabs-bottom>div>.ant-tabs-nav{order:1;margin-top:16px;margin-bottom:0}.ant-tabs-bottom>.ant-tabs-nav:before,.ant-tabs-bottom>div>.ant-tabs-nav:before{top:0}.ant-tabs-bottom>.ant-tabs-nav .ant-tabs-ink-bar,.ant-tabs-bottom>div>.ant-tabs-nav .ant-tabs-ink-bar{top:0}.ant-tabs-bottom>.ant-tabs-content-holder,.ant-tabs-bottom>div>.ant-tabs-content-holder{order:0}.ant-tabs-left>.ant-tabs-nav,.ant-tabs-right>.ant-tabs-nav,.ant-tabs-left>div>.ant-tabs-nav,.ant-tabs-right>div>.ant-tabs-nav{flex-direction:column;min-width:50px}.ant-tabs-left>.ant-tabs-nav .ant-tabs-tab,.ant-tabs-right>.ant-tabs-nav .ant-tabs-tab,.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-tab,.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-tab{padding:8px 24px;text-align:center}.ant-tabs-left>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab,.ant-tabs-right>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab,.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab,.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab{margin:16px 0 0}.ant-tabs-left>.ant-tabs-nav .ant-tabs-nav-wrap,.ant-tabs-right>.ant-tabs-nav .ant-tabs-nav-wrap,.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-nav-wrap,.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-nav-wrap{flex-direction:column}.ant-tabs-left>.ant-tabs-nav .ant-tabs-nav-wrap:before,.ant-tabs-right>.ant-tabs-nav .ant-tabs-nav-wrap:before,.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-nav-wrap:before,.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-nav-wrap:before,.ant-tabs-left>.ant-tabs-nav .ant-tabs-nav-wrap:after,.ant-tabs-right>.ant-tabs-nav .ant-tabs-nav-wrap:after,.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-nav-wrap:after,.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-nav-wrap:after{right:0;left:0;height:30px}.ant-tabs-left>.ant-tabs-nav .ant-tabs-nav-wrap:before,.ant-tabs-right>.ant-tabs-nav .ant-tabs-nav-wrap:before,.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-nav-wrap:before,.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-nav-wrap:before{top:0;box-shadow:inset 0 10px 8px -8px #00000014}.ant-tabs-left>.ant-tabs-nav .ant-tabs-nav-wrap:after,.ant-tabs-right>.ant-tabs-nav .ant-tabs-nav-wrap:after,.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-nav-wrap:after,.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-nav-wrap:after{bottom:0;box-shadow:inset 0 -10px 8px -8px #00000014}.ant-tabs-left>.ant-tabs-nav .ant-tabs-nav-wrap.ant-tabs-nav-wrap-ping-top:before,.ant-tabs-right>.ant-tabs-nav .ant-tabs-nav-wrap.ant-tabs-nav-wrap-ping-top:before,.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-nav-wrap.ant-tabs-nav-wrap-ping-top:before,.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-nav-wrap.ant-tabs-nav-wrap-ping-top:before{opacity:1}.ant-tabs-left>.ant-tabs-nav .ant-tabs-nav-wrap.ant-tabs-nav-wrap-ping-bottom:after,.ant-tabs-right>.ant-tabs-nav .ant-tabs-nav-wrap.ant-tabs-nav-wrap-ping-bottom:after,.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-nav-wrap.ant-tabs-nav-wrap-ping-bottom:after,.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-nav-wrap.ant-tabs-nav-wrap-ping-bottom:after{opacity:1}.ant-tabs-left>.ant-tabs-nav .ant-tabs-ink-bar,.ant-tabs-right>.ant-tabs-nav .ant-tabs-ink-bar,.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-ink-bar,.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-ink-bar{width:2px}.ant-tabs-left>.ant-tabs-nav .ant-tabs-ink-bar-animated,.ant-tabs-right>.ant-tabs-nav .ant-tabs-ink-bar-animated,.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-ink-bar-animated,.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-ink-bar-animated{transition:height .3s,top .3s}.ant-tabs-left>.ant-tabs-nav .ant-tabs-nav-list,.ant-tabs-right>.ant-tabs-nav .ant-tabs-nav-list,.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-nav-list,.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-nav-list,.ant-tabs-left>.ant-tabs-nav .ant-tabs-nav-operations,.ant-tabs-right>.ant-tabs-nav .ant-tabs-nav-operations,.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-nav-operations,.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-nav-operations{flex:1 0 auto;flex-direction:column}.ant-tabs-left>.ant-tabs-nav .ant-tabs-ink-bar,.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-ink-bar{right:0}.ant-tabs-left>.ant-tabs-content-holder,.ant-tabs-left>div>.ant-tabs-content-holder{margin-left:-1px;border-left:1px solid #f0f0f0}.ant-tabs-left>.ant-tabs-content-holder>.ant-tabs-content>.ant-tabs-tabpane,.ant-tabs-left>div>.ant-tabs-content-holder>.ant-tabs-content>.ant-tabs-tabpane{padding-left:24px}.ant-tabs-right>.ant-tabs-nav,.ant-tabs-right>div>.ant-tabs-nav{order:1}.ant-tabs-right>.ant-tabs-nav .ant-tabs-ink-bar,.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-ink-bar{left:0}.ant-tabs-right>.ant-tabs-content-holder,.ant-tabs-right>div>.ant-tabs-content-holder{order:0;margin-right:-1px;border-right:1px solid #f0f0f0}.ant-tabs-right>.ant-tabs-content-holder>.ant-tabs-content>.ant-tabs-tabpane,.ant-tabs-right>div>.ant-tabs-content-holder>.ant-tabs-content>.ant-tabs-tabpane{padding-right:24px}.ant-tabs-dropdown{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:absolute;top:-9999px;left:-9999px;z-index:1050;display:block}.ant-tabs-dropdown-hidden{display:none}.ant-tabs-dropdown-menu{max-height:200px;margin:0;padding:4px 0;overflow-x:hidden;overflow-y:auto;text-align:left;list-style-type:none;background-color:#fff;background-clip:padding-box;border-radius:5px;outline:none;box-shadow:0 3px 6px -4px #0000001f,0 6px 16px #00000014,0 9px 28px 8px #0000000d}.ant-tabs-dropdown-menu-item{display:flex;align-items:center;min-width:120px;margin:0;padding:5px 12px;overflow:hidden;color:#000000d9;font-weight:400;font-size:14px;line-height:22px;white-space:nowrap;text-overflow:ellipsis;cursor:pointer;transition:all .3s}.ant-tabs-dropdown-menu-item>span{flex:1;white-space:nowrap}.ant-tabs-dropdown-menu-item-remove{flex:none;margin-left:12px;color:#00000073;font-size:12px;background:transparent;border:0;cursor:pointer}.ant-tabs-dropdown-menu-item-remove:hover{color:#998165}.ant-tabs-dropdown-menu-item:hover{background:#f5f5f5}.ant-tabs-dropdown-menu-item-disabled,.ant-tabs-dropdown-menu-item-disabled:hover{color:#00000040;background:transparent;cursor:not-allowed}.ant-tabs-card>.ant-tabs-nav .ant-tabs-tab,.ant-tabs-card>div>.ant-tabs-nav .ant-tabs-tab{margin:0;padding:8px 16px;background:#fafafa;border:1px solid #f0f0f0;transition:all .3s cubic-bezier(.645,.045,.355,1)}.ant-tabs-card>.ant-tabs-nav .ant-tabs-tab-active,.ant-tabs-card>div>.ant-tabs-nav .ant-tabs-tab-active{color:#8d6a46;background:#fff}.ant-tabs-card>.ant-tabs-nav .ant-tabs-ink-bar,.ant-tabs-card>div>.ant-tabs-nav .ant-tabs-ink-bar{visibility:hidden}.ant-tabs-card.ant-tabs-top>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab,.ant-tabs-card.ant-tabs-bottom>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab,.ant-tabs-card.ant-tabs-top>div>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab,.ant-tabs-card.ant-tabs-bottom>div>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab{margin-left:2px}.ant-tabs-card.ant-tabs-top>.ant-tabs-nav .ant-tabs-tab,.ant-tabs-card.ant-tabs-top>div>.ant-tabs-nav .ant-tabs-tab{border-radius:5px 5px 0 0}.ant-tabs-card.ant-tabs-top>.ant-tabs-nav .ant-tabs-tab-active,.ant-tabs-card.ant-tabs-top>div>.ant-tabs-nav .ant-tabs-tab-active{border-bottom-color:#fff}.ant-tabs-card.ant-tabs-bottom>.ant-tabs-nav .ant-tabs-tab,.ant-tabs-card.ant-tabs-bottom>div>.ant-tabs-nav .ant-tabs-tab{border-radius:0 0 5px 5px}.ant-tabs-card.ant-tabs-bottom>.ant-tabs-nav .ant-tabs-tab-active,.ant-tabs-card.ant-tabs-bottom>div>.ant-tabs-nav .ant-tabs-tab-active{border-top-color:#fff}.ant-tabs-card.ant-tabs-left>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab,.ant-tabs-card.ant-tabs-right>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab,.ant-tabs-card.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab,.ant-tabs-card.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-tab+.ant-tabs-tab{margin-top:2px}.ant-tabs-card.ant-tabs-left>.ant-tabs-nav .ant-tabs-tab,.ant-tabs-card.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-tab{border-radius:5px 0 0 5px}.ant-tabs-card.ant-tabs-left>.ant-tabs-nav .ant-tabs-tab-active,.ant-tabs-card.ant-tabs-left>div>.ant-tabs-nav .ant-tabs-tab-active{border-right-color:#fff}.ant-tabs-card.ant-tabs-right>.ant-tabs-nav .ant-tabs-tab,.ant-tabs-card.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-tab{border-radius:0 5px 5px 0}.ant-tabs-card.ant-tabs-right>.ant-tabs-nav .ant-tabs-tab-active,.ant-tabs-card.ant-tabs-right>div>.ant-tabs-nav .ant-tabs-tab-active{border-left-color:#fff}.ant-tabs{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";display:flex;overflow:hidden}.ant-tabs>.ant-tabs-nav,.ant-tabs>div>.ant-tabs-nav{position:relative;display:flex;flex:none;align-items:center}.ant-tabs>.ant-tabs-nav .ant-tabs-nav-wrap,.ant-tabs>div>.ant-tabs-nav .ant-tabs-nav-wrap{position:relative;display:inline-block;display:flex;flex:auto;align-self:stretch;overflow:hidden;white-space:nowrap;transform:translate(0)}.ant-tabs>.ant-tabs-nav .ant-tabs-nav-wrap:before,.ant-tabs>div>.ant-tabs-nav .ant-tabs-nav-wrap:before,.ant-tabs>.ant-tabs-nav .ant-tabs-nav-wrap:after,.ant-tabs>div>.ant-tabs-nav .ant-tabs-nav-wrap:after{position:absolute;z-index:1;opacity:0;transition:opacity .3s;content:"";pointer-events:none}.ant-tabs>.ant-tabs-nav .ant-tabs-nav-list,.ant-tabs>div>.ant-tabs-nav .ant-tabs-nav-list{position:relative;display:flex;transition:transform .3s}.ant-tabs>.ant-tabs-nav .ant-tabs-nav-operations,.ant-tabs>div>.ant-tabs-nav .ant-tabs-nav-operations{display:flex;align-self:stretch}.ant-tabs>.ant-tabs-nav .ant-tabs-nav-operations-hidden,.ant-tabs>div>.ant-tabs-nav .ant-tabs-nav-operations-hidden{position:absolute;visibility:hidden;pointer-events:none}.ant-tabs>.ant-tabs-nav .ant-tabs-nav-more,.ant-tabs>div>.ant-tabs-nav .ant-tabs-nav-more{position:relative;padding:8px 16px;background:transparent;border:0}.ant-tabs>.ant-tabs-nav .ant-tabs-nav-more:after,.ant-tabs>div>.ant-tabs-nav .ant-tabs-nav-more:after{position:absolute;right:0;bottom:0;left:0;height:5px;transform:translateY(100%);content:""}.ant-tabs>.ant-tabs-nav .ant-tabs-nav-add,.ant-tabs>div>.ant-tabs-nav .ant-tabs-nav-add{min-width:40px;margin-left:2px;padding:0 8px;background:#fafafa;border:1px solid #f0f0f0;border-radius:5px 5px 0 0;outline:none;cursor:pointer;transition:all .3s cubic-bezier(.645,.045,.355,1)}.ant-tabs>.ant-tabs-nav .ant-tabs-nav-add:hover,.ant-tabs>div>.ant-tabs-nav .ant-tabs-nav-add:hover{color:#998165}.ant-tabs>.ant-tabs-nav .ant-tabs-nav-add:active,.ant-tabs>div>.ant-tabs-nav .ant-tabs-nav-add:active,.ant-tabs>.ant-tabs-nav .ant-tabs-nav-add:focus,.ant-tabs>div>.ant-tabs-nav .ant-tabs-nav-add:focus{color:#66482e}.ant-tabs-extra-content{flex:none}.ant-tabs-centered>.ant-tabs-nav .ant-tabs-nav-wrap:not([class*=ant-tabs-nav-wrap-ping]),.ant-tabs-centered>div>.ant-tabs-nav .ant-tabs-nav-wrap:not([class*=ant-tabs-nav-wrap-ping]){justify-content:center}.ant-tabs-ink-bar{position:absolute;background:#8d6a46;pointer-events:none}.ant-tabs-tab{position:relative;display:inline-flex;align-items:center;padding:12px 0;font-size:14px;background:transparent;border:0;outline:none;cursor:pointer}.ant-tabs-tab-btn:focus,.ant-tabs-tab-remove:focus,.ant-tabs-tab-btn:active,.ant-tabs-tab-remove:active{color:#66482e}.ant-tabs-tab-btn{outline:none;transition:all .3s}.ant-tabs-tab-remove{flex:none;margin-right:-4px;margin-left:8px;color:#00000073;font-size:12px;background:transparent;border:none;outline:none;cursor:pointer;transition:all .3s}.ant-tabs-tab-remove:hover{color:#1c2d56}.ant-tabs-tab:hover{color:#998165}.ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn{color:#8d6a46;text-shadow:0 0 .25px currentcolor}.ant-tabs-tab.ant-tabs-tab-disabled{color:#00000040;cursor:not-allowed}.ant-tabs-tab.ant-tabs-tab-disabled .ant-tabs-tab-btn:focus,.ant-tabs-tab.ant-tabs-tab-disabled .ant-tabs-tab-remove:focus,.ant-tabs-tab.ant-tabs-tab-disabled .ant-tabs-tab-btn:active,.ant-tabs-tab.ant-tabs-tab-disabled .ant-tabs-tab-remove:active{color:#00000040}.ant-tabs-tab .ant-tabs-tab-remove .anticon{margin:0}.ant-tabs-tab .anticon{margin-right:12px}.ant-tabs-tab+.ant-tabs-tab{margin:0 0 0 32px}.ant-tabs-content{display:flex;width:100%}.ant-tabs-content-holder{flex:auto;min-width:0;min-height:0}.ant-tabs-content-animated{transition:margin .3s}.ant-tabs-tabpane{flex:none;width:100%;outline:none}.ant-tag{box-sizing:border-box;margin:0 8px 0 0;color:#000000d9;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";display:inline-block;height:auto;padding:0 7px;font-size:12px;line-height:20px;white-space:nowrap;background:#fafafa;border:1px solid #d9d9d9;border-radius:5px;opacity:1;transition:all .3s}.ant-tag,.ant-tag a,.ant-tag a:hover{color:#000000d9}.ant-tag>a:first-child:last-child{display:inline-block;margin:0 -8px;padding:0 8px}.ant-tag-close-icon{margin-left:3px;color:#00000073;font-size:10px;cursor:pointer;transition:all .3s}.ant-tag-close-icon:hover{color:#1c2d56}.ant-tag-has-color{border-color:transparent}.ant-tag-has-color,.ant-tag-has-color a,.ant-tag-has-color a:hover,.ant-tag-has-color .anticon-close,.ant-tag-has-color .anticon-close:hover{color:#fff}.ant-tag-checkable{background-color:transparent;border-color:transparent;cursor:pointer}.ant-tag-checkable:not(.ant-tag-checkable-checked):hover{color:#8d6a46}.ant-tag-checkable:active,.ant-tag-checkable-checked{color:#fff}.ant-tag-checkable-checked{background-color:#8d6a46}.ant-tag-checkable:active{background-color:#66482e}.ant-tag-hidden{display:none}.ant-tag-pink{color:#c41d7f;background:#fff0f6;border-color:#ffadd2}.ant-tag-pink-inverse{color:#fff;background:#eb2f96;border-color:#eb2f96}.ant-tag-magenta{color:#c41d7f;background:#fff0f6;border-color:#ffadd2}.ant-tag-magenta-inverse{color:#fff;background:#eb2f96;border-color:#eb2f96}.ant-tag-red{color:#cf1322;background:#fff1f0;border-color:#ffa39e}.ant-tag-red-inverse{color:#fff;background:#f5222d;border-color:#f5222d}.ant-tag-volcano{color:#d4380d;background:#fff2e8;border-color:#ffbb96}.ant-tag-volcano-inverse{color:#fff;background:#fa541c;border-color:#fa541c}.ant-tag-orange{color:#d46b08;background:#fff7e6;border-color:#ffd591}.ant-tag-orange-inverse{color:#fff;background:#fa8c16;border-color:#fa8c16}.ant-tag-yellow{color:#d4b106;background:#feffe6;border-color:#fffb8f}.ant-tag-yellow-inverse{color:#fff;background:#fadb14;border-color:#fadb14}.ant-tag-gold{color:#d48806;background:#fffbe6;border-color:#ffe58f}.ant-tag-gold-inverse{color:#fff;background:#faad14;border-color:#faad14}.ant-tag-cyan{color:#08979c;background:#e6fffb;border-color:#87e8de}.ant-tag-cyan-inverse{color:#fff;background:#13c2c2;border-color:#13c2c2}.ant-tag-lime{color:#7cb305;background:#fcffe6;border-color:#eaff8f}.ant-tag-lime-inverse{color:#fff;background:#a0d911;border-color:#a0d911}.ant-tag-green{color:#389e0d;background:#f6ffed;border-color:#b7eb8f}.ant-tag-green-inverse{color:#fff;background:#52c41a;border-color:#52c41a}.ant-tag-blue{color:#096dd9;background:#e6f7ff;border-color:#91d5ff}.ant-tag-blue-inverse{color:#fff;background:#1890ff;border-color:#1890ff}.ant-tag-geekblue{color:#1d39c4;background:#f0f5ff;border-color:#adc6ff}.ant-tag-geekblue-inverse{color:#fff;background:#2f54eb;border-color:#2f54eb}.ant-tag-purple{color:#531dab;background:#f9f0ff;border-color:#d3adf7}.ant-tag-purple-inverse{color:#fff;background:#722ed1;border-color:#722ed1}.ant-tag-success{color:#52c41a;background:#f6ffed;border-color:#b7eb8f}.ant-tag-processing{color:#8d6a46;background:#ccc8c0;border-color:#b3aea8}.ant-tag-error{color:#e31a1a;background:#ffece8;border-color:#ffa196}.ant-tag-warning{color:#faad14;background:#fffbe6;border-color:#ffe58f}.ant-tag>.anticon+span,.ant-tag>span+.anticon{margin-left:7px}.ant-tag.ant-tag-rtl{margin-right:0;margin-left:8px;direction:rtl;text-align:right}.ant-tag-rtl .ant-tag-close-icon{margin-right:3px;margin-left:0}.ant-tag-rtl.ant-tag>.anticon+span,.ant-tag-rtl.ant-tag>span+.anticon{margin-right:7px;margin-left:0}.ant-timeline{box-sizing:border-box;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;font-feature-settings:"tnum";margin:0;padding:0;list-style:none}.ant-timeline-item{position:relative;margin:0;padding-bottom:20px;font-size:14px;list-style:none}.ant-timeline-item-tail{position:absolute;top:10px;left:4px;height:calc(100% - 10px);border-left:2px solid #f0f0f0}.ant-timeline-item-pending .ant-timeline-item-head{font-size:12px;background-color:transparent}.ant-timeline-item-pending .ant-timeline-item-tail{display:none}.ant-timeline-item-head{position:absolute;width:10px;height:10px;background-color:#fff;border:2px solid transparent;border-radius:100px}.ant-timeline-item-head-blue{color:#8d6a46;border-color:#8d6a46}.ant-timeline-item-head-red{color:#e31a1a;border-color:#e31a1a}.ant-timeline-item-head-green{color:#52c41a;border-color:#52c41a}.ant-timeline-item-head-gray{color:#00000040;border-color:#00000040}.ant-timeline-item-head-custom{position:absolute;top:5.5px;left:5px;width:auto;height:auto;margin-top:0;padding:3px 1px;line-height:1;text-align:center;border:0;border-radius:0;transform:translate(-50%,-50%)}.ant-timeline-item-content{position:relative;top:-7.001px;margin:0 0 0 26px;word-break:break-word}.ant-timeline-item-last>.ant-timeline-item-tail{display:none}.ant-timeline-item-last>.ant-timeline-item-content{min-height:48px}.ant-timeline.ant-timeline-alternate .ant-timeline-item-tail,.ant-timeline.ant-timeline-right .ant-timeline-item-tail,.ant-timeline.ant-timeline-label .ant-timeline-item-tail,.ant-timeline.ant-timeline-alternate .ant-timeline-item-head,.ant-timeline.ant-timeline-right .ant-timeline-item-head,.ant-timeline.ant-timeline-label .ant-timeline-item-head,.ant-timeline.ant-timeline-alternate .ant-timeline-item-head-custom,.ant-timeline.ant-timeline-right .ant-timeline-item-head-custom,.ant-timeline.ant-timeline-label .ant-timeline-item-head-custom{left:50%}.ant-timeline.ant-timeline-alternate .ant-timeline-item-head,.ant-timeline.ant-timeline-right .ant-timeline-item-head,.ant-timeline.ant-timeline-label .ant-timeline-item-head{margin-left:-4px}.ant-timeline.ant-timeline-alternate .ant-timeline-item-head-custom,.ant-timeline.ant-timeline-right .ant-timeline-item-head-custom,.ant-timeline.ant-timeline-label .ant-timeline-item-head-custom{margin-left:1px}.ant-timeline.ant-timeline-alternate .ant-timeline-item-left .ant-timeline-item-content,.ant-timeline.ant-timeline-right .ant-timeline-item-left .ant-timeline-item-content,.ant-timeline.ant-timeline-label .ant-timeline-item-left .ant-timeline-item-content{left:calc(50% - 4px);width:calc(50% - 14px);text-align:left}.ant-timeline.ant-timeline-alternate .ant-timeline-item-right .ant-timeline-item-content,.ant-timeline.ant-timeline-right .ant-timeline-item-right .ant-timeline-item-content,.ant-timeline.ant-timeline-label .ant-timeline-item-right .ant-timeline-item-content{width:calc(50% - 12px);margin:0;text-align:right}.ant-timeline.ant-timeline-right .ant-timeline-item-right .ant-timeline-item-tail,.ant-timeline.ant-timeline-right .ant-timeline-item-right .ant-timeline-item-head,.ant-timeline.ant-timeline-right .ant-timeline-item-right .ant-timeline-item-head-custom{left:calc(100% - 6px)}.ant-timeline.ant-timeline-right .ant-timeline-item-right .ant-timeline-item-content{width:calc(100% - 18px)}.ant-timeline.ant-timeline-pending .ant-timeline-item-last .ant-timeline-item-tail{display:block;height:calc(100% - 14px);border-left:2px dotted #f0f0f0}.ant-timeline.ant-timeline-reverse .ant-timeline-item-last .ant-timeline-item-tail{display:none}.ant-timeline.ant-timeline-reverse .ant-timeline-item-pending .ant-timeline-item-tail{top:15px;display:block;height:calc(100% - 15px);border-left:2px dotted #f0f0f0}.ant-timeline.ant-timeline-reverse .ant-timeline-item-pending .ant-timeline-item-content{min-height:48px}.ant-timeline.ant-timeline-label .ant-timeline-item-label{position:absolute;top:-7.001px;width:calc(50% - 12px);text-align:right}.ant-timeline.ant-timeline-label .ant-timeline-item-right .ant-timeline-item-label{left:calc(50% + 14px);width:calc(50% - 14px);text-align:left}.ant-timeline-rtl{direction:rtl}.ant-timeline-rtl .ant-timeline-item-tail{right:4px;left:auto;border-right:2px solid #f0f0f0;border-left:none}.ant-timeline-rtl .ant-timeline-item-head-custom{right:5px;left:auto;transform:translate(50%,-50%)}.ant-timeline-rtl .ant-timeline-item-content{margin:0 18px 0 0}.ant-timeline-rtl.ant-timeline.ant-timeline-alternate .ant-timeline-item-tail,.ant-timeline-rtl.ant-timeline.ant-timeline-right .ant-timeline-item-tail,.ant-timeline-rtl.ant-timeline.ant-timeline-label .ant-timeline-item-tail,.ant-timeline-rtl.ant-timeline.ant-timeline-alternate .ant-timeline-item-head,.ant-timeline-rtl.ant-timeline.ant-timeline-right .ant-timeline-item-head,.ant-timeline-rtl.ant-timeline.ant-timeline-label .ant-timeline-item-head,.ant-timeline-rtl.ant-timeline.ant-timeline-alternate .ant-timeline-item-head-custom,.ant-timeline-rtl.ant-timeline.ant-timeline-right .ant-timeline-item-head-custom,.ant-timeline-rtl.ant-timeline.ant-timeline-label .ant-timeline-item-head-custom{right:50%;left:auto}.ant-timeline-rtl.ant-timeline.ant-timeline-alternate .ant-timeline-item-head,.ant-timeline-rtl.ant-timeline.ant-timeline-right .ant-timeline-item-head,.ant-timeline-rtl.ant-timeline.ant-timeline-label .ant-timeline-item-head{margin-right:-4px;margin-left:0}.ant-timeline-rtl.ant-timeline.ant-timeline-alternate .ant-timeline-item-head-custom,.ant-timeline-rtl.ant-timeline.ant-timeline-right .ant-timeline-item-head-custom,.ant-timeline-rtl.ant-timeline.ant-timeline-label .ant-timeline-item-head-custom{margin-right:1px;margin-left:0}.ant-timeline-rtl.ant-timeline.ant-timeline-alternate .ant-timeline-item-left .ant-timeline-item-content,.ant-timeline-rtl.ant-timeline.ant-timeline-right .ant-timeline-item-left .ant-timeline-item-content,.ant-timeline-rtl.ant-timeline.ant-timeline-label .ant-timeline-item-left .ant-timeline-item-content{right:calc(50% - 4px);left:auto;text-align:right}.ant-timeline-rtl.ant-timeline.ant-timeline-alternate .ant-timeline-item-right .ant-timeline-item-content,.ant-timeline-rtl.ant-timeline.ant-timeline-right .ant-timeline-item-right .ant-timeline-item-content,.ant-timeline-rtl.ant-timeline.ant-timeline-label .ant-timeline-item-right .ant-timeline-item-content{text-align:left}.ant-timeline-rtl.ant-timeline.ant-timeline-right .ant-timeline-item-right .ant-timeline-item-tail,.ant-timeline-rtl.ant-timeline.ant-timeline-right .ant-timeline-item-right .ant-timeline-item-head,.ant-timeline-rtl.ant-timeline.ant-timeline-right .ant-timeline-item-right .ant-timeline-item-head-custom{right:0;left:auto}.ant-timeline-rtl.ant-timeline.ant-timeline-right .ant-timeline-item-right .ant-timeline-item-content{width:100%;margin-right:18px;text-align:right}.ant-timeline-rtl.ant-timeline.ant-timeline-pending .ant-timeline-item-last .ant-timeline-item-tail,.ant-timeline-rtl.ant-timeline.ant-timeline-reverse .ant-timeline-item-pending .ant-timeline-item-tail{border-right:2px dotted #f0f0f0;border-left:none}.ant-timeline-rtl.ant-timeline.ant-timeline-label .ant-timeline-item-label{text-align:left}.ant-timeline-rtl.ant-timeline.ant-timeline-label .ant-timeline-item-right .ant-timeline-item-label{right:calc(50% + 14px);text-align:right}.ant-tooltip{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:absolute;z-index:1070;display:block;width:-moz-max-content;width:max-content;max-width:250px;visibility:visible}.ant-tooltip-hidden{display:none}.ant-tooltip-placement-top,.ant-tooltip-placement-topLeft,.ant-tooltip-placement-topRight{padding-bottom:8px}.ant-tooltip-placement-right,.ant-tooltip-placement-rightTop,.ant-tooltip-placement-rightBottom{padding-left:8px}.ant-tooltip-placement-bottom,.ant-tooltip-placement-bottomLeft,.ant-tooltip-placement-bottomRight{padding-top:8px}.ant-tooltip-placement-left,.ant-tooltip-placement-leftTop,.ant-tooltip-placement-leftBottom{padding-right:8px}.ant-tooltip-inner{min-width:30px;min-height:32px;padding:6px 8px;color:#fff;text-align:left;text-decoration:none;word-wrap:break-word;background-color:#000000bf;border-radius:5px;box-shadow:0 3px 6px -4px #0000001f,0 6px 16px #00000014,0 9px 28px 8px #0000000d}.ant-tooltip-arrow{position:absolute;display:block;width:13.07106781px;height:13.07106781px;overflow:hidden;background:transparent;pointer-events:none}.ant-tooltip-arrow-content{position:absolute;top:0;right:0;bottom:0;left:0;display:block;width:5px;height:5px;margin:auto;background-color:#000000bf;content:"";pointer-events:auto}.ant-tooltip-placement-top .ant-tooltip-arrow,.ant-tooltip-placement-topLeft .ant-tooltip-arrow,.ant-tooltip-placement-topRight .ant-tooltip-arrow{bottom:-5.07106781px}.ant-tooltip-placement-top .ant-tooltip-arrow-content,.ant-tooltip-placement-topLeft .ant-tooltip-arrow-content,.ant-tooltip-placement-topRight .ant-tooltip-arrow-content{box-shadow:3px 3px 7px #00000012;transform:translateY(-6.53553391px) rotate(45deg)}.ant-tooltip-placement-top .ant-tooltip-arrow{left:50%;transform:translate(-50%)}.ant-tooltip-placement-topLeft .ant-tooltip-arrow{left:13px}.ant-tooltip-placement-topRight .ant-tooltip-arrow{right:13px}.ant-tooltip-placement-right .ant-tooltip-arrow,.ant-tooltip-placement-rightTop .ant-tooltip-arrow,.ant-tooltip-placement-rightBottom .ant-tooltip-arrow{left:-5.07106781px}.ant-tooltip-placement-right .ant-tooltip-arrow-content,.ant-tooltip-placement-rightTop .ant-tooltip-arrow-content,.ant-tooltip-placement-rightBottom .ant-tooltip-arrow-content{box-shadow:-3px 3px 7px #00000012;transform:translate(6.53553391px) rotate(45deg)}.ant-tooltip-placement-right .ant-tooltip-arrow{top:50%;transform:translateY(-50%)}.ant-tooltip-placement-rightTop .ant-tooltip-arrow{top:5px}.ant-tooltip-placement-rightBottom .ant-tooltip-arrow{bottom:5px}.ant-tooltip-placement-left .ant-tooltip-arrow,.ant-tooltip-placement-leftTop .ant-tooltip-arrow,.ant-tooltip-placement-leftBottom .ant-tooltip-arrow{right:-5.07106781px}.ant-tooltip-placement-left .ant-tooltip-arrow-content,.ant-tooltip-placement-leftTop .ant-tooltip-arrow-content,.ant-tooltip-placement-leftBottom .ant-tooltip-arrow-content{box-shadow:3px -3px 7px #00000012;transform:translate(-6.53553391px) rotate(45deg)}.ant-tooltip-placement-left .ant-tooltip-arrow{top:50%;transform:translateY(-50%)}.ant-tooltip-placement-leftTop .ant-tooltip-arrow{top:5px}.ant-tooltip-placement-leftBottom .ant-tooltip-arrow{bottom:5px}.ant-tooltip-placement-bottom .ant-tooltip-arrow,.ant-tooltip-placement-bottomLeft .ant-tooltip-arrow,.ant-tooltip-placement-bottomRight .ant-tooltip-arrow{top:-5.07106781px}.ant-tooltip-placement-bottom .ant-tooltip-arrow-content,.ant-tooltip-placement-bottomLeft .ant-tooltip-arrow-content,.ant-tooltip-placement-bottomRight .ant-tooltip-arrow-content{box-shadow:-3px -3px 7px #00000012;transform:translateY(6.53553391px) rotate(45deg)}.ant-tooltip-placement-bottom .ant-tooltip-arrow{left:50%;transform:translate(-50%)}.ant-tooltip-placement-bottomLeft .ant-tooltip-arrow{left:13px}.ant-tooltip-placement-bottomRight .ant-tooltip-arrow{right:13px}.ant-tooltip-pink .ant-tooltip-inner,.ant-tooltip-pink .ant-tooltip-arrow-content,.ant-tooltip-magenta .ant-tooltip-inner,.ant-tooltip-magenta .ant-tooltip-arrow-content{background-color:#eb2f96}.ant-tooltip-red .ant-tooltip-inner,.ant-tooltip-red .ant-tooltip-arrow-content{background-color:#f5222d}.ant-tooltip-volcano .ant-tooltip-inner,.ant-tooltip-volcano .ant-tooltip-arrow-content{background-color:#fa541c}.ant-tooltip-orange .ant-tooltip-inner,.ant-tooltip-orange .ant-tooltip-arrow-content{background-color:#fa8c16}.ant-tooltip-yellow .ant-tooltip-inner,.ant-tooltip-yellow .ant-tooltip-arrow-content{background-color:#fadb14}.ant-tooltip-gold .ant-tooltip-inner,.ant-tooltip-gold .ant-tooltip-arrow-content{background-color:#faad14}.ant-tooltip-cyan .ant-tooltip-inner,.ant-tooltip-cyan .ant-tooltip-arrow-content{background-color:#13c2c2}.ant-tooltip-lime .ant-tooltip-inner,.ant-tooltip-lime .ant-tooltip-arrow-content{background-color:#a0d911}.ant-tooltip-green .ant-tooltip-inner,.ant-tooltip-green .ant-tooltip-arrow-content{background-color:#52c41a}.ant-tooltip-blue .ant-tooltip-inner,.ant-tooltip-blue .ant-tooltip-arrow-content{background-color:#1890ff}.ant-tooltip-geekblue .ant-tooltip-inner,.ant-tooltip-geekblue .ant-tooltip-arrow-content{background-color:#2f54eb}.ant-tooltip-purple .ant-tooltip-inner,.ant-tooltip-purple .ant-tooltip-arrow-content{background-color:#722ed1}.ant-tooltip-rtl{direction:rtl}.ant-tooltip-rtl .ant-tooltip-inner{text-align:right}.ant-transfer-customize-list .ant-transfer-list{flex:1 1 50%;width:auto;height:auto;min-height:200px}.ant-transfer-customize-list .ant-table-wrapper .ant-table-small{border:0;border-radius:0}.ant-transfer-customize-list .ant-table-wrapper .ant-table-small .ant-table-selection-column{width:40px;min-width:40px}.ant-transfer-customize-list .ant-table-wrapper .ant-table-small>.ant-table-content>.ant-table-body>table>.ant-table-thead>tr>th{background:#fafafa}.ant-transfer-customize-list .ant-table-wrapper .ant-table-small>.ant-table-content .ant-table-row:last-child td{border-bottom:1px solid #f0f0f0}.ant-transfer-customize-list .ant-table-wrapper .ant-table-small .ant-table-body{margin:0}.ant-transfer-customize-list .ant-table-wrapper .ant-table-pagination.ant-pagination{margin:16px 0 4px}.ant-transfer-customize-list .ant-input[disabled]{background-color:transparent}.ant-transfer{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";position:relative;display:flex;align-items:stretch}.ant-transfer-disabled .ant-transfer-list{background:#f5f5f5}.ant-transfer-list{display:flex;flex-direction:column;width:180px;height:200px;border:1px solid #d9d9d9;border-radius:5px}.ant-transfer-list-with-pagination{width:250px;height:auto}.ant-transfer-list-search .anticon-search{color:#00000040}.ant-transfer-list-header{display:flex;flex:none;align-items:center;height:40px;padding:8px 12px 9px;color:#000000d9;background:#fff;border-bottom:1px solid #f0f0f0;border-radius:5px 5px 0 0}.ant-transfer-list-header>*:not(:last-child){margin-right:4px}.ant-transfer-list-header>*{flex:none}.ant-transfer-list-header-title{flex:auto;overflow:hidden;white-space:nowrap;text-align:right;text-overflow:ellipsis}.ant-transfer-list-header-dropdown{font-size:10px;transform:translateY(10%);cursor:pointer}.ant-transfer-list-header-dropdown[disabled]{cursor:not-allowed}.ant-transfer-list-body{display:flex;flex:auto;flex-direction:column;overflow:hidden;font-size:14px}.ant-transfer-list-body-search-wrapper{position:relative;flex:none;padding:12px}.ant-transfer-list-content{flex:auto;margin:0;padding:0;overflow:auto;list-style:none}.ant-transfer-list-content-item{display:flex;align-items:center;min-height:32px;padding:6px 12px;line-height:20px;transition:all .3s}.ant-transfer-list-content-item>*:not(:last-child){margin-right:8px}.ant-transfer-list-content-item>*{flex:none}.ant-transfer-list-content-item-text{flex:auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ant-transfer-list-content-item-remove{color:#1c2d56;text-decoration:none;outline:none;cursor:pointer;transition:color .3s;position:relative;color:#d9d9d9}.ant-transfer-list-content-item-remove:focus,.ant-transfer-list-content-item-remove:hover{color:#314263}.ant-transfer-list-content-item-remove:active{color:#0e1730}.ant-transfer-list-content-item-remove:after{position:absolute;top:-6px;right:-50%;bottom:-6px;left:-50%;content:""}.ant-transfer-list-content-item-remove:hover{color:#314263}.ant-transfer-list-content-item:not(.ant-transfer-list-content-item-disabled):hover{background-color:#f5f5f5;cursor:pointer}.ant-transfer-list-content-item:not(.ant-transfer-list-content-item-disabled).ant-transfer-list-content-item-checked:hover{background-color:#c7c3ba}.ant-transfer-list-content-show-remove .ant-transfer-list-content-item:not(.ant-transfer-list-content-item-disabled):hover{background:transparent;cursor:default}.ant-transfer-list-content-item-checked{background-color:#ccc8c0}.ant-transfer-list-content-item-disabled{color:#00000040;cursor:not-allowed}.ant-transfer-list-pagination{padding:8px 0;text-align:right;border-top:1px solid #f0f0f0}.ant-transfer-list-body-not-found{flex:none;width:100%;margin:auto 0;color:#00000040;text-align:center}.ant-transfer-list-footer{border-top:1px solid #f0f0f0}.ant-transfer-operation{display:flex;flex:none;flex-direction:column;align-self:center;margin:0 8px;vertical-align:middle}.ant-transfer-operation .ant-btn{display:block}.ant-transfer-operation .ant-btn:first-child{margin-bottom:4px}.ant-transfer-operation .ant-btn .anticon{font-size:12px}.ant-transfer .ant-empty-image{max-height:-2px}.ant-transfer-rtl{direction:rtl}.ant-transfer-rtl .ant-transfer-list-search{padding-right:8px;padding-left:24px}.ant-transfer-rtl .ant-transfer-list-search-action{right:auto;left:12px}.ant-transfer-rtl .ant-transfer-list-header>*:not(:last-child){margin-right:0;margin-left:4px}.ant-transfer-rtl .ant-transfer-list-header{right:0;left:auto}.ant-transfer-rtl .ant-transfer-list-header-title{text-align:left}.ant-transfer-rtl .ant-transfer-list-content-item>*:not(:last-child){margin-right:0;margin-left:8px}.ant-transfer-rtl .ant-transfer-list-pagination{text-align:left}.ant-transfer-rtl .ant-transfer-list-footer{right:0;left:auto}@keyframes ant-tree-node-fx-do-not-use{0%{opacity:0}to{opacity:1}}.ant-tree.ant-tree-directory .ant-tree-treenode{position:relative}.ant-tree.ant-tree-directory .ant-tree-treenode:before{position:absolute;top:0;right:0;bottom:4px;left:0;transition:background-color .3s;content:"";pointer-events:none}.ant-tree.ant-tree-directory .ant-tree-treenode:hover:before{background:#f5f5f5}.ant-tree.ant-tree-directory .ant-tree-treenode>*{z-index:1}.ant-tree.ant-tree-directory .ant-tree-treenode .ant-tree-switcher{transition:color .3s}.ant-tree.ant-tree-directory .ant-tree-treenode .ant-tree-node-content-wrapper{border-radius:0;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-tree.ant-tree-directory .ant-tree-treenode .ant-tree-node-content-wrapper:hover{background:transparent}.ant-tree.ant-tree-directory .ant-tree-treenode .ant-tree-node-content-wrapper.ant-tree-node-selected{color:#fff;background:transparent}.ant-tree.ant-tree-directory .ant-tree-treenode-selected:hover:before,.ant-tree.ant-tree-directory .ant-tree-treenode-selected:before{background:#8d6a46}.ant-tree.ant-tree-directory .ant-tree-treenode-selected .ant-tree-switcher{color:#fff}.ant-tree.ant-tree-directory .ant-tree-treenode-selected .ant-tree-node-content-wrapper{color:#fff;background:transparent}.ant-tree-checkbox{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;list-style:none;font-feature-settings:"tnum";position:relative;top:.2em;line-height:1;white-space:nowrap;outline:none;cursor:pointer}.ant-tree-checkbox-wrapper:hover .ant-tree-checkbox-inner,.ant-tree-checkbox:hover .ant-tree-checkbox-inner,.ant-tree-checkbox-input:focus+.ant-tree-checkbox-inner{border-color:#8d6a46}.ant-tree-checkbox-checked:after{position:absolute;top:0;left:0;width:100%;height:100%;border:1px solid #8D6A46;border-radius:5px;visibility:hidden;animation:antCheckboxEffect .36s ease-in-out;animation-fill-mode:backwards;content:""}.ant-tree-checkbox:hover:after,.ant-tree-checkbox-wrapper:hover .ant-tree-checkbox:after{visibility:visible}.ant-tree-checkbox-inner{position:relative;top:0;left:0;display:block;width:20px;height:20px;direction:ltr;background-color:#fff;border:1px solid #d9d9d9;border-radius:3px;border-collapse:separate;transition:all .3s}.ant-tree-checkbox-inner:after{position:absolute;top:50%;left:21.5%;display:table;width:7.14285714px;height:11.42857143px;border:2px solid #fff;border-top:0;border-left:0;transform:rotate(45deg) scale(0) translate(-50%,-50%);opacity:0;transition:all .1s cubic-bezier(.71,-.46,.88,.6),opacity .1s;content:" "}.ant-tree-checkbox-input{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;width:100%;height:100%;cursor:pointer;opacity:0}.ant-tree-checkbox-checked .ant-tree-checkbox-inner:after{position:absolute;display:table;border:2px solid #fff;border-top:0;border-left:0;transform:rotate(45deg) scale(1) translate(-50%,-50%);opacity:1;transition:all .2s cubic-bezier(.12,.4,.29,1.46) .1s;content:" "}.ant-tree-checkbox-checked .ant-tree-checkbox-inner{background-color:#8d6a46;border-color:#8d6a46}.ant-tree-checkbox-disabled{cursor:not-allowed}.ant-tree-checkbox-disabled.ant-tree-checkbox-checked .ant-tree-checkbox-inner:after{border-color:#00000040;animation-name:none}.ant-tree-checkbox-disabled .ant-tree-checkbox-input{cursor:not-allowed;pointer-events:none}.ant-tree-checkbox-disabled .ant-tree-checkbox-inner{background-color:#f5f5f5;border-color:#d9d9d9!important}.ant-tree-checkbox-disabled .ant-tree-checkbox-inner:after{border-color:#f5f5f5;border-collapse:separate;animation-name:none}.ant-tree-checkbox-disabled+span{color:#00000040;cursor:not-allowed}.ant-tree-checkbox-disabled:hover:after,.ant-tree-checkbox-wrapper:hover .ant-tree-checkbox-disabled:after{visibility:hidden}.ant-tree-checkbox-wrapper{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";display:inline-flex;align-items:baseline;line-height:unset;cursor:pointer}.ant-tree-checkbox-wrapper:after{display:inline-block;width:0;overflow:hidden;content:" "}.ant-tree-checkbox-wrapper.ant-tree-checkbox-wrapper-disabled{cursor:not-allowed}.ant-tree-checkbox-wrapper+.ant-tree-checkbox-wrapper{margin-left:8px}.ant-tree-checkbox+span{padding-right:8px;padding-left:8px}.ant-tree-checkbox-group{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";display:inline-block}.ant-tree-checkbox-group-item{margin-right:8px}.ant-tree-checkbox-group-item:last-child{margin-right:0}.ant-tree-checkbox-group-item+.ant-tree-checkbox-group-item{margin-left:0}.ant-tree-checkbox-indeterminate .ant-tree-checkbox-inner{background-color:#fff;border-color:#d9d9d9}.ant-tree-checkbox-indeterminate .ant-tree-checkbox-inner:after{top:50%;left:50%;width:12px;height:12px;background-color:#8d6a46;border:0;transform:translate(-50%,-50%) scale(1);opacity:1;content:" "}.ant-tree-checkbox-indeterminate.ant-tree-checkbox-disabled .ant-tree-checkbox-inner:after{background-color:#00000040;border-color:#00000040}.ant-tree-checkbox-rtl{direction:rtl}.ant-tree-checkbox-group-rtl .ant-tree-checkbox-group-item{margin-right:0;margin-left:8px}.ant-tree-checkbox-group-rtl .ant-tree-checkbox-group-item:last-child{margin-left:0!important}.ant-tree-checkbox-group-rtl .ant-tree-checkbox-group-item+.ant-tree-checkbox-group-item{margin-left:8px}.ant-tree{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";background:#fff;border-radius:5px;transition:background-color .3s}.ant-tree-focused:not(:hover):not(.ant-tree-active-focused){background:#ccc8c0}.ant-tree-list-holder-inner{align-items:flex-start}.ant-tree.ant-tree-block-node .ant-tree-list-holder-inner{align-items:stretch}.ant-tree.ant-tree-block-node .ant-tree-list-holder-inner .ant-tree-node-content-wrapper{flex:auto}.ant-tree.ant-tree-block-node .ant-tree-list-holder-inner .ant-tree-treenode.dragging{position:relative}.ant-tree.ant-tree-block-node .ant-tree-list-holder-inner .ant-tree-treenode.dragging:after{position:absolute;top:0;right:0;bottom:4px;left:0;border:1px solid #8D6A46;opacity:0;animation:ant-tree-node-fx-do-not-use .3s;animation-play-state:running;animation-fill-mode:forwards;content:"";pointer-events:none}.ant-tree .ant-tree-treenode{display:flex;align-items:flex-start;padding:0 0 4px;outline:none}.ant-tree .ant-tree-treenode-disabled .ant-tree-node-content-wrapper{color:#00000040;cursor:not-allowed}.ant-tree .ant-tree-treenode-disabled .ant-tree-node-content-wrapper:hover{background:transparent}.ant-tree .ant-tree-treenode-active .ant-tree-node-content-wrapper{background:#f5f5f5}.ant-tree .ant-tree-treenode:not(.ant-tree .ant-tree-treenode-disabled).filter-node .ant-tree-title{color:inherit;font-weight:500}.ant-tree-indent{align-self:stretch;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-tree-indent-unit{display:inline-block;width:24px}.ant-tree-draggable-icon{width:24px;line-height:24px;text-align:center;opacity:.2;transition:opacity .3s}.ant-tree-treenode:hover .ant-tree-draggable-icon{opacity:.45}.ant-tree-switcher{position:relative;flex:none;align-self:stretch;width:24px;margin:0;line-height:24px;text-align:center;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-tree-switcher .ant-tree-switcher-icon,.ant-tree-switcher .ant-select-tree-switcher-icon{display:inline-block;font-size:10px;vertical-align:baseline}.ant-tree-switcher .ant-tree-switcher-icon svg,.ant-tree-switcher .ant-select-tree-switcher-icon svg{transition:transform .3s}.ant-tree-switcher-noop{cursor:default}.ant-tree-switcher_close .ant-tree-switcher-icon svg{transform:rotate(-90deg)}.ant-tree-switcher-loading-icon{color:#8d6a46}.ant-tree-switcher-leaf-line{position:relative;z-index:1;display:inline-block;width:100%;height:100%}.ant-tree-switcher-leaf-line:before{position:absolute;top:0;right:12px;bottom:-4px;margin-left:-1px;border-right:1px solid #d9d9d9;content:" "}.ant-tree-switcher-leaf-line:after{position:absolute;width:10px;height:14px;border-bottom:1px solid #d9d9d9;content:" "}.ant-tree-checkbox{top:initial;margin:2px 8px 0 0}.ant-tree .ant-tree-node-content-wrapper{position:relative;z-index:auto;min-height:24px;margin:0;padding:0 4px;color:inherit;line-height:24px;background:transparent;border-radius:5px;cursor:pointer;transition:all .3s,border 0s,line-height 0s,box-shadow 0s}.ant-tree .ant-tree-node-content-wrapper:hover{background-color:#f5f5f5}.ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected{background-color:#bfbbb4}.ant-tree .ant-tree-node-content-wrapper .ant-tree-iconEle{display:inline-block;width:24px;height:24px;line-height:24px;text-align:center;vertical-align:top}.ant-tree .ant-tree-node-content-wrapper .ant-tree-iconEle:empty{display:none}.ant-tree-unselectable .ant-tree-node-content-wrapper:hover{background-color:transparent}.ant-tree-node-content-wrapper{line-height:24px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-tree-node-content-wrapper .ant-tree-drop-indicator{position:absolute;z-index:1;height:2px;background-color:#8d6a46;border-radius:1px;pointer-events:none}.ant-tree-node-content-wrapper .ant-tree-drop-indicator:after{position:absolute;top:-3px;left:-6px;width:8px;height:8px;background-color:transparent;border:2px solid #8D6A46;border-radius:50%;content:""}.ant-tree .ant-tree-treenode.drop-container>[draggable]{box-shadow:0 0 0 2px #8d6a46}.ant-tree-show-line .ant-tree-indent-unit{position:relative;height:100%}.ant-tree-show-line .ant-tree-indent-unit:before{position:absolute;top:0;right:12px;bottom:-4px;border-right:1px solid #d9d9d9;content:""}.ant-tree-show-line .ant-tree-indent-unit-end:before{display:none}.ant-tree-show-line .ant-tree-switcher{background:#fff}.ant-tree-show-line .ant-tree-switcher-line-icon{vertical-align:-.15em}.ant-tree .ant-tree-treenode-leaf-last .ant-tree-switcher-leaf-line:before{top:auto!important;bottom:auto!important;height:14px!important}.ant-tree-rtl{direction:rtl}.ant-tree-rtl .ant-tree-node-content-wrapper[draggable=true] .ant-tree-drop-indicator:after{right:-6px;left:unset}.ant-tree .ant-tree-treenode-rtl{direction:rtl}.ant-tree-rtl .ant-tree-switcher_close .ant-tree-switcher-icon svg{transform:rotate(90deg)}.ant-tree-rtl.ant-tree-show-line .ant-tree-indent-unit:before{right:auto;left:-13px;border-right:none;border-left:1px solid #d9d9d9}.ant-tree-rtl.ant-tree-checkbox,.ant-tree-select-dropdown-rtl .ant-select-tree-checkbox{margin:2px 0 0 8px}.ant-select-tree-checkbox{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;list-style:none;font-feature-settings:"tnum";position:relative;top:.2em;line-height:1;white-space:nowrap;outline:none;cursor:pointer}.ant-select-tree-checkbox-wrapper:hover .ant-select-tree-checkbox-inner,.ant-select-tree-checkbox:hover .ant-select-tree-checkbox-inner,.ant-select-tree-checkbox-input:focus+.ant-select-tree-checkbox-inner{border-color:#8d6a46}.ant-select-tree-checkbox-checked:after{position:absolute;top:0;left:0;width:100%;height:100%;border:1px solid #8D6A46;border-radius:5px;visibility:hidden;animation:antCheckboxEffect .36s ease-in-out;animation-fill-mode:backwards;content:""}.ant-select-tree-checkbox:hover:after,.ant-select-tree-checkbox-wrapper:hover .ant-select-tree-checkbox:after{visibility:visible}.ant-select-tree-checkbox-inner{position:relative;top:0;left:0;display:block;width:20px;height:20px;direction:ltr;background-color:#fff;border:1px solid #d9d9d9;border-radius:3px;border-collapse:separate;transition:all .3s}.ant-select-tree-checkbox-inner:after{position:absolute;top:50%;left:21.5%;display:table;width:7.14285714px;height:11.42857143px;border:2px solid #fff;border-top:0;border-left:0;transform:rotate(45deg) scale(0) translate(-50%,-50%);opacity:0;transition:all .1s cubic-bezier(.71,-.46,.88,.6),opacity .1s;content:" "}.ant-select-tree-checkbox-input{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;width:100%;height:100%;cursor:pointer;opacity:0}.ant-select-tree-checkbox-checked .ant-select-tree-checkbox-inner:after{position:absolute;display:table;border:2px solid #fff;border-top:0;border-left:0;transform:rotate(45deg) scale(1) translate(-50%,-50%);opacity:1;transition:all .2s cubic-bezier(.12,.4,.29,1.46) .1s;content:" "}.ant-select-tree-checkbox-checked .ant-select-tree-checkbox-inner{background-color:#8d6a46;border-color:#8d6a46}.ant-select-tree-checkbox-disabled{cursor:not-allowed}.ant-select-tree-checkbox-disabled.ant-select-tree-checkbox-checked .ant-select-tree-checkbox-inner:after{border-color:#00000040;animation-name:none}.ant-select-tree-checkbox-disabled .ant-select-tree-checkbox-input{cursor:not-allowed;pointer-events:none}.ant-select-tree-checkbox-disabled .ant-select-tree-checkbox-inner{background-color:#f5f5f5;border-color:#d9d9d9!important}.ant-select-tree-checkbox-disabled .ant-select-tree-checkbox-inner:after{border-color:#f5f5f5;border-collapse:separate;animation-name:none}.ant-select-tree-checkbox-disabled+span{color:#00000040;cursor:not-allowed}.ant-select-tree-checkbox-disabled:hover:after,.ant-select-tree-checkbox-wrapper:hover .ant-select-tree-checkbox-disabled:after{visibility:hidden}.ant-select-tree-checkbox-wrapper{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";display:inline-flex;align-items:baseline;line-height:unset;cursor:pointer}.ant-select-tree-checkbox-wrapper:after{display:inline-block;width:0;overflow:hidden;content:" "}.ant-select-tree-checkbox-wrapper.ant-select-tree-checkbox-wrapper-disabled{cursor:not-allowed}.ant-select-tree-checkbox-wrapper+.ant-select-tree-checkbox-wrapper{margin-left:8px}.ant-select-tree-checkbox+span{padding-right:8px;padding-left:8px}.ant-select-tree-checkbox-group{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";display:inline-block}.ant-select-tree-checkbox-group-item{margin-right:8px}.ant-select-tree-checkbox-group-item:last-child{margin-right:0}.ant-select-tree-checkbox-group-item+.ant-select-tree-checkbox-group-item{margin-left:0}.ant-select-tree-checkbox-indeterminate .ant-select-tree-checkbox-inner{background-color:#fff;border-color:#d9d9d9}.ant-select-tree-checkbox-indeterminate .ant-select-tree-checkbox-inner:after{top:50%;left:50%;width:12px;height:12px;background-color:#8d6a46;border:0;transform:translate(-50%,-50%) scale(1);opacity:1;content:" "}.ant-select-tree-checkbox-indeterminate.ant-select-tree-checkbox-disabled .ant-select-tree-checkbox-inner:after{background-color:#00000040;border-color:#00000040}.ant-select-tree-checkbox-rtl{direction:rtl}.ant-select-tree-checkbox-group-rtl .ant-select-tree-checkbox-group-item{margin-right:0;margin-left:8px}.ant-select-tree-checkbox-group-rtl .ant-select-tree-checkbox-group-item:last-child{margin-left:0!important}.ant-select-tree-checkbox-group-rtl .ant-select-tree-checkbox-group-item+.ant-select-tree-checkbox-group-item{margin-left:8px}.ant-tree-select-dropdown{padding:8px 4px}.ant-tree-select-dropdown-rtl{direction:rtl}.ant-tree-select-dropdown .ant-select-tree{border-radius:0}.ant-tree-select-dropdown .ant-select-tree-list-holder-inner{align-items:stretch}.ant-tree-select-dropdown .ant-select-tree-list-holder-inner .ant-select-tree-treenode .ant-select-tree-node-content-wrapper{flex:auto}.ant-select-tree{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";background:#fff;border-radius:5px;transition:background-color .3s}.ant-select-tree-focused:not(:hover):not(.ant-select-tree-active-focused){background:#ccc8c0}.ant-select-tree-list-holder-inner{align-items:flex-start}.ant-select-tree.ant-select-tree-block-node .ant-select-tree-list-holder-inner{align-items:stretch}.ant-select-tree.ant-select-tree-block-node .ant-select-tree-list-holder-inner .ant-select-tree-node-content-wrapper{flex:auto}.ant-select-tree.ant-select-tree-block-node .ant-select-tree-list-holder-inner .ant-select-tree-treenode.dragging{position:relative}.ant-select-tree.ant-select-tree-block-node .ant-select-tree-list-holder-inner .ant-select-tree-treenode.dragging:after{position:absolute;top:0;right:0;bottom:4px;left:0;border:1px solid #8D6A46;opacity:0;animation:ant-tree-node-fx-do-not-use .3s;animation-play-state:running;animation-fill-mode:forwards;content:"";pointer-events:none}.ant-select-tree .ant-select-tree-treenode{display:flex;align-items:flex-start;padding:0 0 4px;outline:none}.ant-select-tree .ant-select-tree-treenode-disabled .ant-select-tree-node-content-wrapper{color:#00000040;cursor:not-allowed}.ant-select-tree .ant-select-tree-treenode-disabled .ant-select-tree-node-content-wrapper:hover{background:transparent}.ant-select-tree .ant-select-tree-treenode-active .ant-select-tree-node-content-wrapper{background:#f5f5f5}.ant-select-tree .ant-select-tree-treenode:not(.ant-select-tree .ant-select-tree-treenode-disabled).filter-node .ant-select-tree-title{color:inherit;font-weight:500}.ant-select-tree-indent{align-self:stretch;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-select-tree-indent-unit{display:inline-block;width:24px}.ant-select-tree-draggable-icon{width:24px;line-height:24px;text-align:center;opacity:.2;transition:opacity .3s}.ant-select-tree-treenode:hover .ant-select-tree-draggable-icon{opacity:.45}.ant-select-tree-switcher{position:relative;flex:none;align-self:stretch;width:24px;margin:0;line-height:24px;text-align:center;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-select-tree-switcher .ant-tree-switcher-icon,.ant-select-tree-switcher .ant-select-tree-switcher-icon{display:inline-block;font-size:10px;vertical-align:baseline}.ant-select-tree-switcher .ant-tree-switcher-icon svg,.ant-select-tree-switcher .ant-select-tree-switcher-icon svg{transition:transform .3s}.ant-select-tree-switcher-noop{cursor:default}.ant-select-tree-switcher_close .ant-select-tree-switcher-icon svg{transform:rotate(-90deg)}.ant-select-tree-switcher-loading-icon{color:#8d6a46}.ant-select-tree-switcher-leaf-line{position:relative;z-index:1;display:inline-block;width:100%;height:100%}.ant-select-tree-switcher-leaf-line:before{position:absolute;top:0;right:12px;bottom:-4px;margin-left:-1px;border-right:1px solid #d9d9d9;content:" "}.ant-select-tree-switcher-leaf-line:after{position:absolute;width:10px;height:14px;border-bottom:1px solid #d9d9d9;content:" "}.ant-select-tree-checkbox{top:initial;margin:2px 8px 0 0}.ant-select-tree .ant-select-tree-node-content-wrapper{position:relative;z-index:auto;min-height:24px;margin:0;padding:0 4px;color:inherit;line-height:24px;background:transparent;border-radius:5px;cursor:pointer;transition:all .3s,border 0s,line-height 0s,box-shadow 0s}.ant-select-tree .ant-select-tree-node-content-wrapper:hover{background-color:#f5f5f5}.ant-select-tree .ant-select-tree-node-content-wrapper.ant-select-tree-node-selected{background-color:#bfbbb4}.ant-select-tree .ant-select-tree-node-content-wrapper .ant-select-tree-iconEle{display:inline-block;width:24px;height:24px;line-height:24px;text-align:center;vertical-align:top}.ant-select-tree .ant-select-tree-node-content-wrapper .ant-select-tree-iconEle:empty{display:none}.ant-select-tree-unselectable .ant-select-tree-node-content-wrapper:hover{background-color:transparent}.ant-select-tree-node-content-wrapper{line-height:24px;-webkit-user-select:none;-moz-user-select:none;user-select:none}.ant-select-tree-node-content-wrapper .ant-tree-drop-indicator{position:absolute;z-index:1;height:2px;background-color:#8d6a46;border-radius:1px;pointer-events:none}.ant-select-tree-node-content-wrapper .ant-tree-drop-indicator:after{position:absolute;top:-3px;left:-6px;width:8px;height:8px;background-color:transparent;border:2px solid #8D6A46;border-radius:50%;content:""}.ant-select-tree .ant-select-tree-treenode.drop-container>[draggable]{box-shadow:0 0 0 2px #8d6a46}.ant-select-tree-show-line .ant-select-tree-indent-unit{position:relative;height:100%}.ant-select-tree-show-line .ant-select-tree-indent-unit:before{position:absolute;top:0;right:12px;bottom:-4px;border-right:1px solid #d9d9d9;content:""}.ant-select-tree-show-line .ant-select-tree-indent-unit-end:before{display:none}.ant-select-tree-show-line .ant-select-tree-switcher{background:#fff}.ant-select-tree-show-line .ant-select-tree-switcher-line-icon{vertical-align:-.15em}.ant-select-tree .ant-select-tree-treenode-leaf-last .ant-select-tree-switcher-leaf-line:before{top:auto!important;bottom:auto!important;height:14px!important}.ant-tree-select-dropdown-rtl .ant-select-tree .ant-select-tree-switcher_close .ant-select-tree-switcher-icon svg{transform:rotate(90deg)}.ant-tree-select-dropdown-rtl .ant-select-tree .ant-select-tree-switcher-loading-icon{transform:scaleY(-1)}.ant-typography{color:#000000d9;overflow-wrap:break-word}.ant-typography.ant-typography-secondary{color:#00000073}.ant-typography.ant-typography-success{color:#52c41a}.ant-typography.ant-typography-warning{color:#faad14}.ant-typography.ant-typography-danger{color:#e31a1a}a.ant-typography.ant-typography-danger:active,a.ant-typography.ant-typography-danger:focus,a.ant-typography.ant-typography-danger:hover{color:#f04741}.ant-typography.ant-typography-disabled{color:#00000040;cursor:not-allowed;-webkit-user-select:none;-moz-user-select:none;user-select:none}div.ant-typography,.ant-typography p{margin-bottom:1em}h1.ant-typography,.ant-typography h1{margin-bottom:.5em;color:#1c2d56;font-weight:600;font-size:38px;line-height:1.23}h2.ant-typography,.ant-typography h2{margin-bottom:.5em;color:#1c2d56;font-weight:600;font-size:30px;line-height:1.35}h3.ant-typography,.ant-typography h3{margin-bottom:.5em;color:#1c2d56;font-weight:600;font-size:24px;line-height:1.35}h4.ant-typography,.ant-typography h4{margin-bottom:.5em;color:#1c2d56;font-weight:600;font-size:20px;line-height:1.4}h5.ant-typography,.ant-typography h5{margin-bottom:.5em;color:#1c2d56;font-weight:600;font-size:16px;line-height:1.5}.ant-typography+h1.ant-typography,.ant-typography+h2.ant-typography,.ant-typography+h3.ant-typography,.ant-typography+h4.ant-typography,.ant-typography+h5.ant-typography{margin-top:1.2em}.ant-typography div+h1,.ant-typography ul+h1,.ant-typography li+h1,.ant-typography p+h1,.ant-typography h1+h1,.ant-typography h2+h1,.ant-typography h3+h1,.ant-typography h4+h1,.ant-typography h5+h1,.ant-typography div+h2,.ant-typography ul+h2,.ant-typography li+h2,.ant-typography p+h2,.ant-typography h1+h2,.ant-typography h2+h2,.ant-typography h3+h2,.ant-typography h4+h2,.ant-typography h5+h2,.ant-typography div+h3,.ant-typography ul+h3,.ant-typography li+h3,.ant-typography p+h3,.ant-typography h1+h3,.ant-typography h2+h3,.ant-typography h3+h3,.ant-typography h4+h3,.ant-typography h5+h3,.ant-typography div+h4,.ant-typography ul+h4,.ant-typography li+h4,.ant-typography p+h4,.ant-typography h1+h4,.ant-typography h2+h4,.ant-typography h3+h4,.ant-typography h4+h4,.ant-typography h5+h4,.ant-typography div+h5,.ant-typography ul+h5,.ant-typography li+h5,.ant-typography p+h5,.ant-typography h1+h5,.ant-typography h2+h5,.ant-typography h3+h5,.ant-typography h4+h5,.ant-typography h5+h5{margin-top:1.2em}a.ant-typography-ellipsis,span.ant-typography-ellipsis{display:inline-block;max-width:100%}a.ant-typography,.ant-typography a{color:#1c2d56;outline:none;cursor:pointer;transition:color .3s;text-decoration:none}a.ant-typography:focus,.ant-typography a:focus,a.ant-typography:hover,.ant-typography a:hover{color:#314263}a.ant-typography:active,.ant-typography a:active{color:#0e1730}a.ant-typography:active,.ant-typography a:active,a.ant-typography:hover,.ant-typography a:hover{text-decoration:none}a.ant-typography[disabled],.ant-typography a[disabled],a.ant-typography.ant-typography-disabled,.ant-typography a.ant-typography-disabled{color:#00000040;cursor:not-allowed}a.ant-typography[disabled]:active,.ant-typography a[disabled]:active,a.ant-typography.ant-typography-disabled:active,.ant-typography a.ant-typography-disabled:active,a.ant-typography[disabled]:hover,.ant-typography a[disabled]:hover,a.ant-typography.ant-typography-disabled:hover,.ant-typography a.ant-typography-disabled:hover{color:#00000040}a.ant-typography[disabled]:active,.ant-typography a[disabled]:active,a.ant-typography.ant-typography-disabled:active,.ant-typography a.ant-typography-disabled:active{pointer-events:none}.ant-typography code{margin:0 .2em;padding:.2em .4em .1em;font-size:85%;background:#9696961a;border:1px solid rgba(100,100,100,.2);border-radius:3px}.ant-typography kbd{margin:0 .2em;padding:.15em .4em .1em;font-size:90%;background:#9696960f;border:1px solid rgba(100,100,100,.2);border-bottom-width:2px;border-radius:3px}.ant-typography mark{padding:0;background-color:#ffe58f}.ant-typography u,.ant-typography ins{text-decoration:underline;-webkit-text-decoration-skip:ink;text-decoration-skip-ink:auto}.ant-typography s,.ant-typography del{text-decoration:line-through}.ant-typography strong{font-weight:600}.ant-typography-expand,.ant-typography-edit,.ant-typography-copy{color:#1c2d56;text-decoration:none;outline:none;cursor:pointer;transition:color .3s;margin-left:4px}.ant-typography-expand:focus,.ant-typography-edit:focus,.ant-typography-copy:focus,.ant-typography-expand:hover,.ant-typography-edit:hover,.ant-typography-copy:hover{color:#314263}.ant-typography-expand:active,.ant-typography-edit:active,.ant-typography-copy:active{color:#0e1730}.ant-typography-copy-success,.ant-typography-copy-success:hover,.ant-typography-copy-success:focus{color:#52c41a}.ant-typography-edit-content{position:relative}div.ant-typography-edit-content{left:-12px;margin-top:-11px;margin-bottom:calc(1em - 11px)}.ant-typography-edit-content-confirm{position:absolute;right:10px;bottom:8px;color:#00000073;pointer-events:none}.ant-typography-edit-content textarea{-moz-transition:none}.ant-typography ul,.ant-typography ol{margin:0 0 1em;padding:0}.ant-typography ul li,.ant-typography ol li{margin:0 0 0 20px;padding:0 0 0 4px}.ant-typography ul{list-style-type:circle}.ant-typography ul ul{list-style-type:disc}.ant-typography ol{list-style-type:decimal}.ant-typography pre,.ant-typography blockquote{margin:1em 0}.ant-typography pre{padding:.4em .6em;white-space:pre-wrap;word-wrap:break-word;background:#9696961a;border:1px solid rgba(100,100,100,.2);border-radius:3px}.ant-typography pre code{display:inline;margin:0;padding:0;font-size:inherit;font-family:inherit;background:transparent;border:0}.ant-typography blockquote{padding:0 0 0 .6em;border-left:4px solid rgba(100,100,100,.2);opacity:.85}.ant-typography-single-line{white-space:nowrap}.ant-typography-ellipsis-single-line{overflow:hidden;text-overflow:ellipsis}a.ant-typography-ellipsis-single-line,span.ant-typography-ellipsis-single-line{vertical-align:bottom}.ant-typography-ellipsis-multiple-line{display:-webkit-box;overflow:hidden;-webkit-line-clamp:3;-webkit-box-orient:vertical}.ant-typography-rtl{direction:rtl}.ant-typography-rtl .ant-typography-expand,.ant-typography-rtl .ant-typography-edit,.ant-typography-rtl .ant-typography-copy{margin-right:4px;margin-left:0}.ant-typography-rtl .ant-typography-expand{float:left}div.ant-typography-edit-content.ant-typography-rtl{right:-12px;left:auto}.ant-typography-rtl .ant-typography-edit-content-confirm{right:auto;left:10px}.ant-typography-rtl.ant-typography ul li,.ant-typography-rtl.ant-typography ol li{margin:0 20px 0 0;padding:0 4px 0 0}.ant-upload{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;line-height:1.5715;list-style:none;font-feature-settings:"tnum";outline:0}.ant-upload p{margin:0}.ant-upload-btn{display:block;width:100%;outline:none}.ant-upload input[type=file]{cursor:pointer}.ant-upload.ant-upload-select{display:inline-block}.ant-upload.ant-upload-disabled{cursor:not-allowed}.ant-upload.ant-upload-select-picture-card{width:104px;height:104px;margin-right:8px;margin-bottom:8px;text-align:center;vertical-align:top;background-color:#fafafa;border:1px dashed #d9d9d9;border-radius:5px;cursor:pointer;transition:border-color .3s}.ant-upload.ant-upload-select-picture-card>.ant-upload{display:flex;align-items:center;justify-content:center;height:100%;text-align:center}.ant-upload.ant-upload-select-picture-card:hover{border-color:#8d6a46}.ant-upload-disabled.ant-upload.ant-upload-select-picture-card:hover{border-color:#d9d9d9}.ant-upload.ant-upload-drag{position:relative;width:100%;height:100%;text-align:center;background:#fafafa;border:1px dashed #d9d9d9;border-radius:5px;cursor:pointer;transition:border-color .3s}.ant-upload.ant-upload-drag .ant-upload{padding:16px 0}.ant-upload.ant-upload-drag.ant-upload-drag-hover:not(.ant-upload-disabled){border-color:#66482e}.ant-upload.ant-upload-drag.ant-upload-disabled{cursor:not-allowed}.ant-upload.ant-upload-drag .ant-upload-btn{display:table;height:100%}.ant-upload.ant-upload-drag .ant-upload-drag-container{display:table-cell;vertical-align:middle}.ant-upload.ant-upload-drag:not(.ant-upload-disabled):hover{border-color:#998165}.ant-upload.ant-upload-drag p.ant-upload-drag-icon{margin-bottom:20px}.ant-upload.ant-upload-drag p.ant-upload-drag-icon .anticon{color:#998165;font-size:48px}.ant-upload.ant-upload-drag p.ant-upload-text{margin:0 0 4px;color:#1c2d56;font-size:16px}.ant-upload.ant-upload-drag p.ant-upload-hint{color:#00000073;font-size:14px}.ant-upload.ant-upload-drag .anticon-plus{color:#00000040;font-size:30px;transition:all .3s}.ant-upload.ant-upload-drag .anticon-plus:hover,.ant-upload.ant-upload-drag:hover .anticon-plus{color:#00000073}.ant-upload-picture-card-wrapper{display:inline-block;width:100%}.ant-upload-picture-card-wrapper:before{display:table;content:""}.ant-upload-picture-card-wrapper:after{display:table;clear:both;content:""}.ant-upload-list{box-sizing:border-box;margin:0;padding:0;color:#000000d9;font-size:14px;font-variant:tabular-nums;list-style:none;font-feature-settings:"tnum";line-height:1.5715}.ant-upload-list:before{display:table;content:""}.ant-upload-list:after{display:table;clear:both;content:""}.ant-upload-list-item{position:relative;height:22.001px;margin-top:8px;font-size:14px}.ant-upload-list-item-name{display:inline-block;width:100%;padding-left:22px;overflow:hidden;line-height:1.5715;white-space:nowrap;text-overflow:ellipsis}.ant-upload-list-item-card-actions{position:absolute;right:0}.ant-upload-list-item-card-actions-btn{opacity:0}.ant-upload-list-item-card-actions-btn.ant-btn-sm{height:20px;line-height:1}.ant-upload-list-item-card-actions.picture{top:22px;line-height:0}.ant-upload-list-item-card-actions-btn:focus,.ant-upload-list-item-card-actions.picture .ant-upload-list-item-card-actions-btn{opacity:1}.ant-upload-list-item-card-actions .anticon{color:#00000073}.ant-upload-list-item-info{height:100%;padding:0 4px;transition:background-color .3s}.ant-upload-list-item-info>span{display:block;width:100%;height:100%}.ant-upload-list-item-info .anticon-loading .anticon,.ant-upload-list-item-info .ant-upload-text-icon .anticon{position:absolute;top:5px;color:#00000073;font-size:14px}.ant-upload-list-item .anticon-close{position:absolute;top:6px;right:4px;color:#00000073;font-size:10px;line-height:0;cursor:pointer;opacity:0;transition:all .3s}.ant-upload-list-item .anticon-close:hover{color:#000000d9}.ant-upload-list-item:hover .ant-upload-list-item-info{background-color:#f5f5f5}.ant-upload-list-item:hover .anticon-close,.ant-upload-list-item:hover .ant-upload-list-item-card-actions-btn{opacity:1}.ant-upload-list-item-error,.ant-upload-list-item-error .ant-upload-text-icon>.anticon,.ant-upload-list-item-error .ant-upload-list-item-name{color:#e31a1a}.ant-upload-list-item-error .ant-upload-list-item-card-actions .anticon{color:#e31a1a}.ant-upload-list-item-error .ant-upload-list-item-card-actions-btn{opacity:1}.ant-upload-list-item-progress{position:absolute;bottom:-12px;width:100%;padding-left:26px;font-size:14px;line-height:0}.ant-upload-list-picture .ant-upload-list-item,.ant-upload-list-picture-card .ant-upload-list-item{position:relative;height:66px;padding:8px;border:1px solid #d9d9d9;border-radius:5px}.ant-upload-list-picture .ant-upload-list-item:hover,.ant-upload-list-picture-card .ant-upload-list-item:hover{background:transparent}.ant-upload-list-picture .ant-upload-list-item-error,.ant-upload-list-picture-card .ant-upload-list-item-error{border-color:#e31a1a}.ant-upload-list-picture .ant-upload-list-item:hover .ant-upload-list-item-info,.ant-upload-list-picture-card .ant-upload-list-item:hover .ant-upload-list-item-info{background:transparent}.ant-upload-list-picture .ant-upload-list-item-uploading,.ant-upload-list-picture-card .ant-upload-list-item-uploading{border-style:dashed}.ant-upload-list-picture .ant-upload-list-item-thumbnail,.ant-upload-list-picture-card .ant-upload-list-item-thumbnail{width:48px;height:48px;line-height:60px;text-align:center;opacity:.8}.ant-upload-list-picture .ant-upload-list-item-thumbnail .anticon,.ant-upload-list-picture-card .ant-upload-list-item-thumbnail .anticon{font-size:26px}.ant-upload-list-picture .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill="#e6f7ff"],.ant-upload-list-picture-card .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill="#e6f7ff"]{fill:#ffece8}.ant-upload-list-picture .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill="#1890ff"],.ant-upload-list-picture-card .ant-upload-list-item-error .ant-upload-list-item-thumbnail .anticon svg path[fill="#1890ff"]{fill:#e31a1a}.ant-upload-list-picture .ant-upload-list-item-icon,.ant-upload-list-picture-card .ant-upload-list-item-icon{position:absolute;top:50%;left:50%;font-size:26px;transform:translate(-50%,-50%)}.ant-upload-list-picture .ant-upload-list-item-icon .anticon,.ant-upload-list-picture-card .ant-upload-list-item-icon .anticon{font-size:26px}.ant-upload-list-picture .ant-upload-list-item-image,.ant-upload-list-picture-card .ant-upload-list-item-image{max-width:100%}.ant-upload-list-picture .ant-upload-list-item-thumbnail img,.ant-upload-list-picture-card .ant-upload-list-item-thumbnail img{display:block;width:48px;height:48px;overflow:hidden}.ant-upload-list-picture .ant-upload-list-item-name,.ant-upload-list-picture-card .ant-upload-list-item-name{display:inline-block;box-sizing:border-box;max-width:100%;margin:0 0 0 8px;padding-right:8px;padding-left:48px;overflow:hidden;line-height:44px;white-space:nowrap;text-overflow:ellipsis;transition:all .3s}.ant-upload-list-picture .ant-upload-list-item-uploading .ant-upload-list-item-name,.ant-upload-list-picture-card .ant-upload-list-item-uploading .ant-upload-list-item-name{margin-bottom:12px}.ant-upload-list-picture .ant-upload-list-item-progress,.ant-upload-list-picture-card .ant-upload-list-item-progress{bottom:14px;width:calc(100% - 24px);margin-top:0;padding-left:56px}.ant-upload-list-picture .anticon-close,.ant-upload-list-picture-card .anticon-close{position:absolute;top:8px;right:8px;line-height:1;opacity:1}.ant-upload-list-picture-card-container{display:inline-block;width:104px;height:104px;margin:0 8px 8px 0;vertical-align:top}.ant-upload-list-picture-card.ant-upload-list:after{display:none}.ant-upload-list-picture-card .ant-upload-list-item{height:100%;margin:0}.ant-upload-list-picture-card .ant-upload-list-item-info{position:relative;height:100%;overflow:hidden}.ant-upload-list-picture-card .ant-upload-list-item-info:before{position:absolute;z-index:1;width:100%;height:100%;background-color:#00000080;opacity:0;transition:all .3s;content:" "}.ant-upload-list-picture-card .ant-upload-list-item:hover .ant-upload-list-item-info:before{opacity:1}.ant-upload-list-picture-card .ant-upload-list-item-actions{position:absolute;top:50%;left:50%;z-index:10;white-space:nowrap;transform:translate(-50%,-50%);opacity:0;transition:all .3s}.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-eye,.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-download,.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-delete{z-index:10;width:16px;margin:0 4px;color:#ffffffd9;font-size:16px;cursor:pointer;transition:all .3s}.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-eye:hover,.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-download:hover,.ant-upload-list-picture-card .ant-upload-list-item-actions .anticon-delete:hover{color:#fff}.ant-upload-list-picture-card .ant-upload-list-item-info:hover+.ant-upload-list-item-actions,.ant-upload-list-picture-card .ant-upload-list-item-actions:hover{opacity:1}.ant-upload-list-picture-card .ant-upload-list-item-thumbnail,.ant-upload-list-picture-card .ant-upload-list-item-thumbnail img{position:static;display:block;width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.ant-upload-list-picture-card .ant-upload-list-item-name{display:none;margin:8px 0 0;padding:0;line-height:1.5715;text-align:center}.ant-upload-list-picture-card .ant-upload-list-item-file+.ant-upload-list-item-name{position:absolute;bottom:10px;display:block}.ant-upload-list-picture-card .ant-upload-list-item-uploading.ant-upload-list-item{background-color:#fafafa}.ant-upload-list-picture-card .ant-upload-list-item-uploading .ant-upload-list-item-info{height:auto}.ant-upload-list-picture-card .ant-upload-list-item-uploading .ant-upload-list-item-info:before,.ant-upload-list-picture-card .ant-upload-list-item-uploading .ant-upload-list-item-info .anticon-eye,.ant-upload-list-picture-card .ant-upload-list-item-uploading .ant-upload-list-item-info .anticon-delete{display:none}.ant-upload-list-picture-card .ant-upload-list-item-progress{bottom:32px;width:calc(100% - 14px);padding-left:0}.ant-upload-list-text-container,.ant-upload-list-picture-container{transition:opacity .3s,height .3s}.ant-upload-list-text-container:before,.ant-upload-list-picture-container:before{display:table;width:0;height:0;content:""}.ant-upload-list-text-container .ant-upload-span,.ant-upload-list-picture-container .ant-upload-span{display:block;flex:auto}.ant-upload-list-text .ant-upload-span,.ant-upload-list-picture .ant-upload-span{display:flex;align-items:center}.ant-upload-list-text .ant-upload-span>*,.ant-upload-list-picture .ant-upload-span>*{flex:none}.ant-upload-list-text .ant-upload-list-item-name,.ant-upload-list-picture .ant-upload-list-item-name{flex:auto;margin:0;padding:0 8px}.ant-upload-list-text .ant-upload-list-item-card-actions,.ant-upload-list-picture .ant-upload-list-item-card-actions,.ant-upload-list-text .ant-upload-text-icon .anticon{position:static}.ant-upload-list .ant-upload-animate-inline-appear,.ant-upload-list .ant-upload-animate-inline-enter,.ant-upload-list .ant-upload-animate-inline-leave{animation-duration:.3s;animation-fill-mode:cubic-bezier(.78,.14,.15,.86)}.ant-upload-list .ant-upload-animate-inline-appear,.ant-upload-list .ant-upload-animate-inline-enter{animation-name:uploadAnimateInlineIn}.ant-upload-list .ant-upload-animate-inline-leave{animation-name:uploadAnimateInlineOut}@keyframes uploadAnimateInlineIn{0%{width:0;height:0;margin:0;padding:0;opacity:0}}@keyframes uploadAnimateInlineOut{to{width:0;height:0;margin:0;padding:0;opacity:0}}.ant-upload-rtl{direction:rtl}.ant-upload-rtl.ant-upload.ant-upload-select-picture-card{margin-right:auto;margin-left:8px}.ant-upload-list-rtl{direction:rtl}.ant-upload-list-rtl .ant-upload-list-item-list-type-text:hover .ant-upload-list-item-name-icon-count-1{padding-right:22px;padding-left:14px}.ant-upload-list-rtl .ant-upload-list-item-list-type-text:hover .ant-upload-list-item-name-icon-count-2{padding-right:22px;padding-left:28px}.ant-upload-list-rtl .ant-upload-list-item-name{padding-right:22px;padding-left:0}.ant-upload-list-rtl .ant-upload-list-item-name-icon-count-1{padding-left:14px}.ant-upload-list-rtl .ant-upload-list-item-card-actions{right:auto;left:0}.ant-upload-list-rtl .ant-upload-list-item-card-actions .anticon{padding-right:0;padding-left:5px}.ant-upload-list-rtl .ant-upload-list-item-info{padding:0 4px 0 12px}.ant-upload-list-rtl .ant-upload-list-item .anticon-close{right:auto;left:4px}.ant-upload-list-rtl .ant-upload-list-item-error .ant-upload-list-item-card-actions .anticon{padding-right:0;padding-left:5px}.ant-upload-list-rtl .ant-upload-list-item-progress{padding-right:26px;padding-left:0}.ant-upload-list-picture .ant-upload-list-item-info,.ant-upload-list-picture-card .ant-upload-list-item-info{padding:0}.ant-upload-list-rtl.ant-upload-list-picture .ant-upload-list-item-thumbnail,.ant-upload-list-rtl.ant-upload-list-picture-card .ant-upload-list-item-thumbnail{right:8px;left:auto}.ant-upload-list-rtl.ant-upload-list-picture .ant-upload-list-item-icon,.ant-upload-list-rtl.ant-upload-list-picture-card .ant-upload-list-item-icon{right:50%;left:auto;transform:translate(50%,-50%)}.ant-upload-list-rtl.ant-upload-list-picture .ant-upload-list-item-name,.ant-upload-list-rtl.ant-upload-list-picture-card .ant-upload-list-item-name{margin:0 8px 0 0;padding-right:48px;padding-left:8px}.ant-upload-list-rtl.ant-upload-list-picture .ant-upload-list-item-name-icon-count-1,.ant-upload-list-rtl.ant-upload-list-picture-card .ant-upload-list-item-name-icon-count-1{padding-right:48px;padding-left:18px}.ant-upload-list-rtl.ant-upload-list-picture .ant-upload-list-item-name-icon-count-2,.ant-upload-list-rtl.ant-upload-list-picture-card .ant-upload-list-item-name-icon-count-2{padding-right:48px;padding-left:36px}.ant-upload-list-rtl.ant-upload-list-picture .ant-upload-list-item-progress,.ant-upload-list-rtl.ant-upload-list-picture-card .ant-upload-list-item-progress{padding-right:0;padding-left:0}.ant-upload-list-rtl.ant-upload-list-picture .anticon-close,.ant-upload-list-rtl.ant-upload-list-picture-card .anticon-close{right:auto;left:8px}.ant-upload-list-rtl .ant-upload-list-picture-card-container{margin:0 0 8px 8px}.ant-upload-list-rtl.ant-upload-list-picture-card .ant-upload-list-item-actions{right:50%;left:auto;transform:translate(50%,-50%)}.ant-upload-list-rtl.ant-upload-list-picture-card .ant-upload-list-item-file+.ant-upload-list-item-name{margin:8px 0 0;padding:0}@font-face{font-family:iransans;font-style:normal;font-weight:200;src:url(/assets/IRANSansWeb_FaNum_UltraLight-hW-WDKY9.woff2) format("woff2"),url(/assets/IRANSansWeb_FaNum_UltraLight-X2tWVnbe.woff) format("woff")}@font-face{font-family:iransans;font-style:normal;font-weight:300;src:url(/assets/IRANSansWeb_FaNum_Light-B637MNLG.woff2) format("woff2"),url(/assets/IRANSansWeb_FaNum_Light-Blhumvhg.woff) format("woff")}@font-face{font-family:iransans;font-style:normal;font-weight:400;src:url(/assets/IRANSansWeb_FaNum-BLA2CtIC.woff2) format("woff2"),url(/assets/IRANSansWeb_FaNum-C2LCNwav.woff) format("woff")}@font-face{font-family:iransans;font-style:normal;font-weight:500;src:url(/assets/IRANSansWeb_FaNum_Medium-C2CKjrKB.woff2) format("woff2"),url(/assets/IRANSansWeb_FaNum_Medium-DJxlPmBM.woff) format("woff")}@font-face{font-family:iransans;font-style:normal;font-weight:700;src:url(/assets/IRANSansWeb_FaNum_Bold-C8urhp07.woff2) format("woff2"),url(/assets/IRANSansWeb_FaNum_Bold-DFiUzN7v.woff) format("woff")}@font-face{font-family:iransans;font-style:normal;font-weight:900;src:url(/assets/IRANSansWeb_FaNum_Black-BFAfOkt4.woff2) format("woff2"),url(/assets/IRANSansWeb_FaNum_Black-BZZZWzNZ.woff) format("woff")}@font-face{font-family:yekan_bakh;font-style:normal;font-weight:700;src:url(/assets/yekan_bakh_fanum_bold-B1U8HUd_.eot);src:url(/assets/yekan_bakh_fanum_bold-B1U8HUd_.eot?#iefix) format("embedded-opentype"),url(/assets/yekan_bakh_fanum_bold-DiCmzWh_.woff) format("woff"),url(/assets/yekan_bakh_fanum_bold-BgJhv14C.ttf) format("truetype")}@font-face{font-family:yekan_bakh;font-style:normal;font-weight:100;src:url(/assets/yekan_bakh_fanum_thin-DdtkSAK0.eot);src:url(/assets/yekan_bakh_fanum_thin-DdtkSAK0.eot?#iefix) format("embedded-opentype"),url(/assets/yekan_bakh_fanum_thin-BUP5N_wR.woff) format("woff"),url(/assets/yekan_bakh_fanum_thin-wM_3S6d2.ttf) format("truetype")}@font-face{font-family:yekan_bakh;font-style:normal;font-weight:300;src:url(/assets/yekan_bakh_fanum_light-DBLK7lys.eot);src:url(/assets/yekan_bakh_fanum_light-DBLK7lys.eot?#iefix) format("embedded-opentype"),url(/assets/yekan_bakh_fanum_light-MBz7xfzX.woff) format("woff"),url(/assets/yekan_bakh_fanum_light-BVC5pEtm.ttf) format("truetype")}@font-face{font-family:yekan_bakh;font-style:normal;font-weight:400;src:url(/assets/yekan_bakh_fanum_regular-D-3AgpAQ.eot);src:url(/assets/yekan_bakh_fanum_regular-D-3AgpAQ.eot?#iefix) format("embedded-opentype"),url(/assets/yekan_bakh_fanum_regular-DYu11jPk.woff) format("woff"),url(/assets/yekan_bakh_fanum_regular-5O8oud7N.ttf) format("truetype")}@font-face{font-family:yekan_bakh;font-style:normal;font-weight:500;src:url(/assets/yekan_bakh_fanum_medium-K0xA3c9N.eot);src:url(/assets/yekan_bakh_fanum_medium-K0xA3c9N.eot?#iefix) format("embedded-opentype"),url(/assets/yekan_bakh_fanum_medium-C7lE-mP3.woff) format("woff"),url(/assets/yekan_bakh_fanum_medium-udXv5Dbe.ttf) format("truetype")}@font-face{font-family:yekan_bakh;font-style:normal;font-weight:800;src:url(/assets/yekan_bakh_fanum_fat-ByLTFLyk.eot);src:url(/assets/yekan_bakh_fanum_fat-ByLTFLyk.eot?#iefix) format("embedded-opentype"),url(/assets/yekan_bakh_fanum_heavy-DcWv4PAq.woff) format("woff"),url(/assets/yekan_bakh_fanum_fat-D7l80IzQ.ttf) format("truetype")}@font-face{font-family:yekan_bakh;font-style:normal;font-weight:900;src:url(/assets/yekan_bakh_fanum_heavy-h9lE53XZ.eot);src:url(/assets/yekan_bakh_fanum_heavy-h9lE53XZ.eot?#iefix) format("embedded-opentype"),url(/assets/yekan_bakh_fanum_heavy-DcWv4PAq.woff) format("woff"),url(/assets/yekan_bakh_fanum_heavy-DcdOma-5.ttf) format("truetype")}body,*{font-family:iransans,yekan_bakh,sans-serif,tahoma;font-size:14px;line-height:inherit;font-weight:inherit}.rtl{direction:rtl!important}.ltr{direction:ltr!important}.no-scrollbar::-webkit-scrollbar{display:none}*::-webkit-scrollbar{display:none}h1,h2,h3,h4,h5,h6,h7,h8{margin-bottom:1.2em;color:#1c2d56}h1,.h1{font-size:28px}h2,.h2{font-size:24.36px}h3,.h3{font-size:21.14px}h4,.h4{font-size:18.48px}h5,.h5{font-size:16.8px}h6,.h6{font-size:15.4px}p{margin-bottom:10px}html,body{overscroll-behavior-y:contain}.overflow-x-auto{overscroll-behavior-x:contain}.overflow-y-auto{overscroll-behavior-y:contain}input:focus-visible{outline:none}.montzar-form.ant-form{background:transparent!important;color:#fff!important}.montzar-form .ant-btn-primary[disabled],.montzar-form .ant-btn-primary[disabled]:hover,.montzar-form .ant-btn-primary[disabled]:focus,.montzar-form .ant-btn-primary[disabled]:active{background:#fff3;color:#ffffff80;border-color:transparent}.montzar-form .ant-form-item label,.montzar-form .ant-form-item input{background:transparent!important;color:#fff!important}.montzar-rounded-drawer{background:transparent}.montzar-rounded-drawer .ant-drawer-content-wrapper{box-shadow:none!important}.montzar-rounded-drawer .ant-drawer-content{background:transparent!important}.montzar-rounded-drawer.bg-white .ant-drawer-body{background:#fff;border-radius:15px 15px 0 0}.montzar-rounded-drawer.bg-primaryLighten .ant-drawer-body{background:#1c3362;border-radius:30px 30px 0 0}.montzar-custom-scrollbar{padding:0 10px}.montzar-custom-scrollbar::-webkit-scrollbar{width:8px}.montzar-custom-scrollbar::-webkit-scrollbar-thumb{background:transparent;border-radius:10px}.montzar-custom-scrollbar:hover::-webkit-scrollbar-thumb{background:#ffffff80}.ant-empty-image img{-o-object-fit:contain;object-fit:contain}.ant-timeline-item-content{margin:0 26px 0 0}.ant-timeline-item-tail{left:unset;right:4px}.ant-btn{display:flex!important;flex-direction:row-reverse;align-items:center;justify-content:center}.ant-btn i{margin-right:10px}.ant-btn span{font-weight:600}.ant-btn-lg span{font-size:20px}.ant-btn-secondary,.ant-btn-secondary:hover,.ant-btn-secondary:focus{border-color:#1c2d56;background:#1c2d56;color:#fff}.ant-btn-secondary.ant-btn-background-ghost,.ant-btn-secondary:hover.ant-btn-background-ghost,.ant-btn-secondary:focus.ant-btn-background-ghost{color:#1c2d56;border-color:#1c2d56;text-shadow:none}.ant-btn-light,.ant-btn-light:hover,.ant-btn-light:focus{color:#1c2d56;border-color:#f9f9f9;background:#f9f9f9}.ant-form-vertical .ant-form-item-label,.ant .ant-col-24.ant-form-item-label,.ant .ant-col-xl-24.ant-form-item-label{text-align:right!important}.ant-tabs-tab+.ant-tabs-tab{margin:0 32px 0 0}.ant-tabs>.ant-tabs-nav .ant-tabs-nav-wrap,.ant .ant-tabs>div>.ant-tabs-nav .ant-tabs-nav-wrap{justify-content:flex-end}.ant-drawer-bottom.rtl .ant-drawer-body::-webkit-scrollbar{display:none}.ant-radio-button-wrapper{border-left-width:1.02px}.ant-radio-button-wrapper:not(:first-child):before{left:unset;right:-1px}.ant-radio-button-wrapper:first-child{border-radius:0 5px 5px 0}.ant-radio-button-wrapper:last-child{border-radius:5px 0 0 5px}.ant-radio-group.flex{display:flex!important}.ant-radio-group.flex .ant-radio-button-wrapper{flex:1 1 0%}.content{content:"";display:inline-block;width:8px}.before\:mark:before{content:"";display:inline-block;width:4px;padding:.2rem;top:1rem;right:0;height:48px;border-radius:5px 0 0 5px;background:#8d6a46;color:#8d6a46}.before\:bullet{font-size:13px}.before\:bullet:before{content:"";display:inline-block;width:8px;height:8px;border-radius:100%;margin-left:10px}.before\:bg-secondary:before{content:"";display:inline-block;width:8px;background:#8d6a46}.before\:bg-primary:before{content:"";display:inline-block;width:8px;background:#1c2d56}.before\:text-secondary:before{content:"1";color:#8d6a46}.before\:text-primary:before{content:"1";color:#1c2d56}.hide-counter .ant-input-number-handler-wrap{visibility:hidden;display:none}.ant-select{width:100%!important}.ant-select .ant-select-selector{height:3rem!important;align-items:center}*:not(input){user-select:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none}.ant-empty-image img,.ant-empty-image{width:100%;height:40vh}:root,:host{--van-black: #000;--van-white: #fff;--van-gray-1: #f7f8fa;--van-gray-2: #f2f3f5;--van-gray-3: #ebedf0;--van-gray-4: #dcdee0;--van-gray-5: #c8c9cc;--van-gray-6: #969799;--van-gray-7: #646566;--van-gray-8: #323233;--van-red: #ee0a24;--van-blue: #1989fa;--van-orange: #ff976a;--van-orange-dark: #ed6a0c;--van-orange-light: #fffbe8;--van-green: #07c160;--van-gradient-red: linear-gradient(to right, #ff6034, #ee0a24);--van-gradient-orange: linear-gradient(to right, #ffd01e, #ff8917);--van-primary-color: var(--van-blue);--van-success-color: var(--van-green);--van-danger-color: var(--van-red);--van-warning-color: var(--van-orange);--van-text-color: var(--van-gray-8);--van-text-color-2: var(--van-gray-6);--van-text-color-3: var(--van-gray-5);--van-active-color: var(--van-gray-2);--van-active-opacity: .6;--van-disabled-opacity: .5;--van-background: var(--van-gray-1);--van-background-2: var(--van-white);--van-background-3: var(--van-white);--van-padding-base: 4px;--van-padding-xs: 8px;--van-padding-sm: 12px;--van-padding-md: 16px;--van-padding-lg: 24px;--van-padding-xl: 32px;--van-font-bold: 600;--van-font-size-xs: 10px;--van-font-size-sm: 12px;--van-font-size-md: 14px;--van-font-size-lg: 16px;--van-line-height-xs: 14px;--van-line-height-sm: 18px;--van-line-height-md: 20px;--van-line-height-lg: 22px;--van-base-font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Segoe UI, Arial, Roboto, "PingFang SC", "miui", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;--van-price-font: avenir-heavy, "PingFang SC", helvetica neue, arial, sans-serif;--van-duration-base: .3s;--van-duration-fast: .2s;--van-ease-out: ease-out;--van-ease-in: ease-in;--van-border-color: var(--van-gray-3);--van-border-width: 1px;--van-radius-sm: 2px;--van-radius-md: 4px;--van-radius-lg: 8px;--van-radius-max: 999px}.van-theme-dark{--van-text-color: #f5f5f5;--van-text-color-2: #707070;--van-text-color-3: #4d4d4d;--van-border-color: #3a3a3c;--van-active-color: #3a3a3c;--van-background: #000;--van-background-2: #1c1c1e;--van-background-3: #37363b}html{-webkit-tap-highlight-color:transparent}body{margin:0;font-family:var(--van-base-font)}a{text-decoration:none}input,button,textarea{color:inherit;font:inherit}a:focus,input:focus,button:focus,textarea:focus,[class*=van-]:focus{outline:none}ol,ul{margin:0;padding:0;list-style:none}@keyframes van-slide-up-enter{0%{transform:translate3d(0,100%,0)}}@keyframes van-slide-up-leave{to{transform:translate3d(0,100%,0)}}@keyframes van-slide-down-enter{0%{transform:translate3d(0,-100%,0)}}@keyframes van-slide-down-leave{to{transform:translate3d(0,-100%,0)}}@keyframes van-slide-left-enter{0%{transform:translate3d(-100%,0,0)}}@keyframes van-slide-left-leave{to{transform:translate3d(-100%,0,0)}}@keyframes van-slide-right-enter{0%{transform:translate3d(100%,0,0)}}@keyframes van-slide-right-leave{to{transform:translate3d(100%,0,0)}}@keyframes van-fade-in{0%{opacity:0}to{opacity:1}}@keyframes van-fade-out{0%{opacity:1}to{opacity:0}}@keyframes van-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.van-fade-enter-active{animation:var(--van-duration-base) van-fade-in both var(--van-ease-out)}.van-fade-leave-active{animation:var(--van-duration-base) van-fade-out both var(--van-ease-in)}.van-slide-up-enter-active{animation:van-slide-up-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-up-leave-active{animation:van-slide-up-leave var(--van-duration-base) both var(--van-ease-in)}.van-slide-down-enter-active{animation:van-slide-down-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-down-leave-active{animation:van-slide-down-leave var(--van-duration-base) both var(--van-ease-in)}.van-slide-left-enter-active{animation:van-slide-left-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-left-leave-active{animation:van-slide-left-leave var(--van-duration-base) both var(--van-ease-in)}.van-slide-right-enter-active{animation:van-slide-right-enter var(--van-duration-base) both var(--van-ease-out)}.van-slide-right-leave-active{animation:van-slide-right-leave var(--van-duration-base) both var(--van-ease-in)}.van-clearfix:after{display:table;clear:both;content:""}.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;line-break:anywhere;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:3;line-break:anywhere;-webkit-box-orient:vertical}.van-safe-area-top{padding-top:constant(safe-area-inset-top);padding-top:env(safe-area-inset-top)}.van-safe-area-bottom{padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.van-haptics-feedback{cursor:pointer}.van-haptics-feedback:active{opacity:var(--van-active-opacity)}[class*=van-hairline]:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid var(--van-border-color);transform:scale(.5)}.van-hairline,.van-hairline--top,.van-hairline--left,.van-hairline--right,.van-hairline--bottom,.van-hairline--surround,.van-hairline--top-bottom{position:relative}.van-hairline--top:after{border-top-width:var(--van-border-width)}.van-hairline--left:after{border-left-width:var(--van-border-width)}.van-hairline--right:after{border-right-width:var(--van-border-width)}.van-hairline--bottom:after{border-bottom-width:var(--van-border-width)}.van-hairline--top-bottom:after,.van-hairline-unset--top-bottom:after{border-width:var(--van-border-width) 0}.van-hairline--surround:after{border-width:var(--van-border-width)}:root,:host{--van-action-bar-background: var(--van-background-2);--van-action-bar-height: 50px}.van-action-bar{position:fixed;right:0;bottom:0;left:0;display:flex;align-items:center;box-sizing:content-box;height:var(--van-action-bar-height);background:var(--van-action-bar-background)}:root,:host{--van-badge-size: 16px;--van-badge-color: var(--van-white);--van-badge-padding: 0 3px;--van-badge-font-size: var(--van-font-size-sm);--van-badge-font-weight: var(--van-font-bold);--van-badge-border-width: var(--van-border-width);--van-badge-background: var(--van-danger-color);--van-badge-dot-color: var(--van-danger-color);--van-badge-dot-size: 8px;--van-badge-font: -apple-system-font, helvetica neue, arial, sans-serif}.van-badge{display:inline-block;box-sizing:border-box;min-width:var(--van-badge-size);padding:var(--van-badge-padding);color:var(--van-badge-color);font-weight:var(--van-badge-font-weight);font-size:var(--van-badge-font-size);font-family:var(--van-badge-font);line-height:1.2;text-align:center;background:var(--van-badge-background);border:var(--van-badge-border-width) solid var(--van-background-2);border-radius:var(--van-radius-max)}.van-badge--fixed{position:absolute;transform-origin:100%}.van-badge--top-left{top:0;left:0;transform:translate(-50%,-50%)}.van-badge--top-right{top:0;right:0;transform:translate(50%,-50%)}.van-badge--bottom-left{bottom:0;left:0;transform:translate(-50%,50%)}.van-badge--bottom-right{bottom:0;right:0;transform:translate(50%,50%)}.van-badge--dot{width:var(--van-badge-dot-size);min-width:0;height:var(--van-badge-dot-size);background:var(--van-badge-dot-color);border-radius:100%;border:none;padding:0}.van-badge__wrapper{position:relative;display:inline-block}.van-icon{position:relative;display:inline-block;font:14px/1 vant-icon;font:normal normal normal 14px/1 var(--van-icon-font-family, "vant-icon");font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased}.van-icon:before{display:inline-block}.van-icon-arrow-double-left:before{content:""}.van-icon-arrow-double-right:before{content:""}.van-icon-contact:before{content:""}.van-icon-notes:before{content:""}.van-icon-records:before{content:""}.van-icon-cash-back-record:before{content:""}.van-icon-newspaper:before{content:""}.van-icon-discount:before{content:""}.van-icon-completed:before{content:""}.van-icon-user:before{content:""}.van-icon-description:before{content:""}.van-icon-list-switch:before{content:""}.van-icon-list-switching:before{content:""}.van-icon-link-o:before{content:""}.van-icon-miniprogram-o:before{content:""}.van-icon-qq:before{content:""}.van-icon-wechat-moments:before{content:""}.van-icon-weibo:before{content:""}.van-icon-cash-o:before{content:""}.van-icon-guide-o:before{content:""}.van-icon-invitation:before{content:""}.van-icon-shield-o:before{content:""}.van-icon-exchange:before{content:""}.van-icon-eye:before{content:""}.van-icon-enlarge:before{content:""}.van-icon-expand-o:before{content:""}.van-icon-eye-o:before{content:""}.van-icon-expand:before{content:""}.van-icon-filter-o:before{content:""}.van-icon-fire:before{content:""}.van-icon-fail:before{content:""}.van-icon-failure:before{content:""}.van-icon-fire-o:before{content:""}.van-icon-flag-o:before{content:""}.van-icon-font:before{content:""}.van-icon-font-o:before{content:""}.van-icon-gem-o:before{content:""}.van-icon-flower-o:before{content:""}.van-icon-gem:before{content:""}.van-icon-gift-card:before{content:""}.van-icon-friends:before{content:""}.van-icon-friends-o:before{content:""}.van-icon-gold-coin:before{content:""}.van-icon-gold-coin-o:before{content:""}.van-icon-good-job-o:before{content:""}.van-icon-gift:before{content:""}.van-icon-gift-o:before{content:""}.van-icon-gift-card-o:before{content:""}.van-icon-good-job:before{content:""}.van-icon-home-o:before{content:""}.van-icon-goods-collect:before{content:""}.van-icon-graphic:before{content:""}.van-icon-goods-collect-o:before{content:""}.van-icon-hot-o:before{content:""}.van-icon-info:before{content:""}.van-icon-hotel-o:before{content:""}.van-icon-info-o:before{content:""}.van-icon-hot-sale-o:before{content:""}.van-icon-hot:before{content:""}.van-icon-like:before{content:""}.van-icon-idcard:before{content:""}.van-icon-like-o:before{content:""}.van-icon-hot-sale:before{content:""}.van-icon-location-o:before{content:""}.van-icon-location:before{content:""}.van-icon-label:before{content:""}.van-icon-lock:before{content:""}.van-icon-label-o:before{content:""}.van-icon-map-marked:before{content:""}.van-icon-logistics:before{content:""}.van-icon-manager:before{content:""}.van-icon-more:before{content:""}.van-icon-live:before{content:""}.van-icon-manager-o:before{content:""}.van-icon-medal:before{content:""}.van-icon-more-o:before{content:""}.van-icon-music-o:before{content:""}.van-icon-music:before{content:""}.van-icon-new-arrival-o:before{content:""}.van-icon-medal-o:before{content:""}.van-icon-new-o:before{content:""}.van-icon-free-postage:before{content:""}.van-icon-newspaper-o:before{content:""}.van-icon-new-arrival:before{content:""}.van-icon-minus:before{content:""}.van-icon-orders-o:before{content:""}.van-icon-new:before{content:""}.van-icon-paid:before{content:""}.van-icon-notes-o:before{content:""}.van-icon-other-pay:before{content:""}.van-icon-pause-circle:before{content:""}.van-icon-pause:before{content:""}.van-icon-pause-circle-o:before{content:""}.van-icon-peer-pay:before{content:""}.van-icon-pending-payment:before{content:""}.van-icon-passed:before{content:""}.van-icon-plus:before{content:""}.van-icon-phone-circle-o:before{content:""}.van-icon-phone-o:before{content:""}.van-icon-printer:before{content:""}.van-icon-photo-fail:before{content:""}.van-icon-phone:before{content:""}.van-icon-photo-o:before{content:""}.van-icon-play-circle:before{content:""}.van-icon-play:before{content:""}.van-icon-phone-circle:before{content:""}.van-icon-point-gift-o:before{content:""}.van-icon-point-gift:before{content:""}.van-icon-play-circle-o:before{content:""}.van-icon-shrink:before{content:""}.van-icon-photo:before{content:""}.van-icon-qr:before{content:""}.van-icon-qr-invalid:before{content:""}.van-icon-question-o:before{content:""}.van-icon-revoke:before{content:""}.van-icon-replay:before{content:""}.van-icon-service:before{content:""}.van-icon-question:before{content:""}.van-icon-search:before{content:""}.van-icon-refund-o:before{content:""}.van-icon-service-o:before{content:""}.van-icon-scan:before{content:""}.van-icon-share:before{content:""}.van-icon-send-gift-o:before{content:""}.van-icon-share-o:before{content:""}.van-icon-setting:before{content:""}.van-icon-points:before{content:""}.van-icon-photograph:before{content:""}.van-icon-shop:before{content:""}.van-icon-shop-o:before{content:""}.van-icon-shop-collect-o:before{content:""}.van-icon-shop-collect:before{content:""}.van-icon-smile:before{content:""}.van-icon-shopping-cart-o:before{content:""}.van-icon-sign:before{content:""}.van-icon-sort:before{content:""}.van-icon-star-o:before{content:""}.van-icon-smile-comment-o:before{content:""}.van-icon-stop:before{content:""}.van-icon-stop-circle-o:before{content:""}.van-icon-smile-o:before{content:""}.van-icon-star:before{content:""}.van-icon-success:before{content:""}.van-icon-stop-circle:before{content:""}.van-icon-records-o:before{content:""}.van-icon-shopping-cart:before{content:""}.van-icon-tosend:before{content:""}.van-icon-todo-list:before{content:""}.van-icon-thumb-circle-o:before{content:""}.van-icon-thumb-circle:before{content:""}.van-icon-umbrella-circle:before{content:""}.van-icon-underway:before{content:""}.van-icon-upgrade:before{content:""}.van-icon-todo-list-o:before{content:""}.van-icon-tv-o:before{content:""}.van-icon-underway-o:before{content:""}.van-icon-user-o:before{content:""}.van-icon-vip-card-o:before{content:""}.van-icon-vip-card:before{content:""}.van-icon-send-gift:before{content:""}.van-icon-wap-home:before{content:""}.van-icon-wap-nav:before{content:""}.van-icon-volume-o:before{content:""}.van-icon-video:before{content:""}.van-icon-wap-home-o:before{content:""}.van-icon-volume:before{content:""}.van-icon-warning:before{content:""}.van-icon-weapp-nav:before{content:""}.van-icon-wechat-pay:before{content:""}.van-icon-warning-o:before{content:""}.van-icon-wechat:before{content:""}.van-icon-setting-o:before{content:""}.van-icon-youzan-shield:before{content:""}.van-icon-warn-o:before{content:""}.van-icon-smile-comment:before{content:""}.van-icon-user-circle-o:before{content:""}.van-icon-video-o:before{content:""}.van-icon-add-square:before{content:""}.van-icon-add:before{content:""}.van-icon-arrow-down:before{content:""}.van-icon-arrow-up:before{content:""}.van-icon-arrow:before{content:""}.van-icon-after-sale:before{content:""}.van-icon-add-o:before{content:""}.van-icon-alipay:before{content:""}.van-icon-ascending:before{content:""}.van-icon-apps-o:before{content:""}.van-icon-aim:before{content:""}.van-icon-award:before{content:""}.van-icon-arrow-left:before{content:""}.van-icon-award-o:before{content:""}.van-icon-audio:before{content:""}.van-icon-bag-o:before{content:""}.van-icon-balance-list:before{content:""}.van-icon-back-top:before{content:""}.van-icon-bag:before{content:""}.van-icon-balance-pay:before{content:""}.van-icon-balance-o:before{content:""}.van-icon-bar-chart-o:before{content:""}.van-icon-bars:before{content:""}.van-icon-balance-list-o:before{content:""}.van-icon-birthday-cake-o:before{content:""}.van-icon-bookmark:before{content:""}.van-icon-bill:before{content:""}.van-icon-bell:before{content:""}.van-icon-browsing-history-o:before{content:""}.van-icon-browsing-history:before{content:""}.van-icon-bookmark-o:before{content:""}.van-icon-bulb-o:before{content:""}.van-icon-bullhorn-o:before{content:""}.van-icon-bill-o:before{content:""}.van-icon-calendar-o:before{content:""}.van-icon-brush-o:before{content:""}.van-icon-card:before{content:""}.van-icon-cart-o:before{content:""}.van-icon-cart-circle:before{content:""}.van-icon-cart-circle-o:before{content:""}.van-icon-cart:before{content:""}.van-icon-cash-on-deliver:before{content:""}.van-icon-cash-back-record-o:before{content:""}.van-icon-cashier-o:before{content:""}.van-icon-chart-trending-o:before{content:""}.van-icon-certificate:before{content:""}.van-icon-chat:before{content:""}.van-icon-clear:before{content:""}.van-icon-chat-o:before{content:""}.van-icon-checked:before{content:""}.van-icon-clock:before{content:""}.van-icon-clock-o:before{content:""}.van-icon-close:before{content:""}.van-icon-closed-eye:before{content:""}.van-icon-circle:before{content:""}.van-icon-cluster-o:before{content:""}.van-icon-column:before{content:""}.van-icon-comment-circle-o:before{content:""}.van-icon-cluster:before{content:""}.van-icon-comment:before{content:""}.van-icon-comment-o:before{content:""}.van-icon-comment-circle:before{content:""}.van-icon-completed-o:before{content:""}.van-icon-credit-pay:before{content:""}.van-icon-coupon:before{content:""}.van-icon-debit-pay:before{content:""}.van-icon-coupon-o:before{content:""}.van-icon-contact-o:before{content:""}.van-icon-descending:before{content:""}.van-icon-desktop-o:before{content:""}.van-icon-diamond-o:before{content:""}.van-icon-description-o:before{content:""}.van-icon-delete:before{content:""}.van-icon-diamond:before{content:""}.van-icon-delete-o:before{content:""}.van-icon-cross:before{content:""}.van-icon-edit:before{content:""}.van-icon-ellipsis:before{content:""}.van-icon-down:before{content:""}.van-icon-discount-o:before{content:""}.van-icon-ecard-pay:before{content:""}.van-icon-envelop-o:before{content:""}@font-face{font-weight:400;font-family:vant-icon;font-style:normal;font-display:auto;src:url(data:font/woff2;charset=utf-8;base64,d09GMgABAAAAAGNAAA0AAAAA6ngAAGLlAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP0ZGVE0cGh4GYACCWhEICoOqHILKFAuEDgABNgIkA4QUBCAFhQ4HllAbe7dFB2rYOIAxOG/nKOrEpKWbGbVlVHRZ9v816Tis0RbhPC4JZQk1ws72WlBGJJIsL3bc5Y/x5HdtBrzwoZQX/Ls/uAhsXMZIVk73Ds/ntvd3cezvhO1/2HExro3B2ID/4d7GxjXObZwqxy0gG8pQPDBFMAW980hTNIuhpqZleVwJlHSKR6WkDM3KECuz083Qu+8BCnabd+4tsemRGtBnHBAHxuTmuLWNUbd7fuSZA88fOBlzekCqfDPnV1BArpTKjp/r0AfE0+Lc97SXNa3ugaSqW2AfIo5Ghr2YAos8H+krfQ3L8DwA+F1V4Mecr9JV2ljSM/wUzQWAITlxoJSfEmfsi321rwHH2TjhEuUPgNJu+Hcty5uF3l0Cy0kEaR28qmxd8hKkAt5Trc38Jr9PItjeThzVmTUBj5z82tS8UPpag3jw7WchyoaNGucZYxmcV1Jb6vJBqnCMkPdKndPjulEbt2VSBNS4ZVtIZLN6T9OnLc4cOBve6vc6m1plHO0oxsXKP/eW/2ZnuXyddAuKQbgYR1EK4cAhrOf/N9XeX86QVOD/DqRT/CFXTqcPKVVuujv3vcG8eW/eYDAguOCA5CJIaxCg/iJIaxCgdgkCwgnk0qC01BF/yHEArvaQ3ASR0kYHOuVQ5djFTsfVlluULl2UrlNo3fUuSpcu3ZQuqpCWpVYrmWKnTAyidINbXlvu8bu//dIWc5DsbS7GIKHEPJFYjquWVH/3b/fH9Hv+26O9ju21WlGpogESSNAeY5MiykWEExSVOOK47UMhvaS1xPVqDWvyXAAAoBcwRQlvI/bwC/dtkISEsc4loVoTIbIVCZ0AIJHYfDMgr9cTJpanTeQN9AuIhrzvf00mgr8/5Nen14LLjxN/LCL2eHpgQbwHVi9DEjNBPAZfTAsKwnMSwP7qC7wBARAe6x9bHpf9WOTxAPA48XFR7j2u+DZ/LOBswPsBp1TOAERZQSgIVpzf/feAvzvI47F6AFF6BLhHCukZF45LVMtBJKlnIvAGFHtJAGRAaHoLQiKLSNqKGJ/iSh1q4tXURKt6IBdS5ApVMI26ClYVZuVQVnhVZgY4CYyzCpOoqw1rsgcEu7Q3GuxKXG3aJn0qjxMHVImq1jrHlwJ5PVtvHrX3Ko2IEfgjlbcFnyYathK4PgKjqatOPbBMVV8xGuwT1DE0AxC6x+5SJJyBz+Fn2AkJxZ4glrASujSdxsleq/PHWbE0RywisaeK8VEJZLLrdigkOat2y1CZLYwZ1YnRRpTdTk64eN4CfgfsjqnucvDALVR3A2vlb2hX0wNceye5Hmm5fEBzdP+Qyb085kH1PuANU75Jzsv7ZS/lLnC4ZoKnV+dJLf4NlekCzHB3ZLelfqmuL45JnZvrXJsJkHk15+TdfdqgwG+izf3JCXOj2RyinXv/VMefCSdPVMiY8jjXOo2MAP4mI/AtycatkqmIALn6l0Uq0lI87BIJ04zYwdq+uVjZCxY2jV+rwhDAwgMpoizZa05SYFIIR3JHR+IKxpnh40BpkzSirZGEOCAuOR/KRAje55CKZod135qzlfbXOMuOPHx1h7YxinH5Uij/5Dwy73HhX1B5ZKvVwRDanqFUFff3wOnQyxyWdERob6qK7Gi12nOhCPvVtZnIYtm2NwfM3k5EXA3H+6YC2B5AN2ejHZQofD50sdRcRWiq+zbZmwWxUU4+e26XKyCyQz1nkYmVlZIqmHnHyniMwALg7W0ge9iTxu3Hui5LzZirrSnxcNzQbrVOEohrbh4R6ilExdRG3ok7V4wlzRGOHiwv0cB50pZ+3m+urqJjt0nyn1mdwTS7GeBAZd7buqpOLOJOzjswwyHGHZYUl6VSbXyOF+71XRUd3IVOwPN4SxT9WirnGy624oNiyc5Or9oH0Xk7cnuxO8pCwYb5hEzNIdfsbrKorNqB2QzwQQmn/Qwb5NRYcbDz1o26MSF3dPfSrJMiL/dAGlRNHMtCEVt3nDSsVrHaufOEusODmTKY8DriHN07hL0EzqFkNyJpnLfFzsVNmR74ahkk6gGTe9J/GHlIpI2GNPlqZ3r+IevE+3Wt703n+Go4OwVuvCrAuzjuoMxtExVKOPdlyui9uI5AoqdxF83KGIUjIoIfDD06nOXu3SMUijv0qc4/wnkmI17W2EBApdJANX4zFNC4sVrhfKJCiHMfHYMLKqu4E37QzW/mhSNfGcYXYxwzR0nViMWyCzAiTOQcKTKZLcduJ+FwJUGuGFwrbmOUnyKEOuXZiVUugONRFLS+hbbikD6NOwjMNHWdlyhkKG64GPuGgnEYa5WqB2KiSgX1MmfwEBm02vhE1dZl9lyNSCFhrsrfe5XGiqVa1cMkU+UwTlQxTOPv1XioWX5gB/GSKMyxDWafvs/FDTk6t+XgVh5hDrEDKqVCJBGTkSYUgljvEqQ6bX8in0iutaWULcSirLCQch+B+4LqWLZVu96F3YTcUWEbTfUuWMYGlYLcl1zdCTpEBDfs014M6OiYmvsMCIXwx0V7JAxjfRyKkVFaGEVsCBnZ25CPrHY1H0ZHSGEcL6cw3ZXrV4fh+8ttExFKOPXlVTmZ2h8sy2L73Q/KF6h0AEjYCuELIVkkL9Te8+OtKEF97Uunyl4YSaJUkKmMocCOWwjY/HhRk2M1YpKE80TkVkpOzRPxXfcYpfowYEOo+JbRI/lBpFv1iKhXtfDc3p6PK2K0rKQKrqiZNpZgQt4pHxotxzgGi2ldPdBYX+3MY5kvdDts5F6XPARl0YNNJv/GGJwwcMCqrFLH4Hlo3S0sxzaAicMhZyfeEeBtitFEcscUDkUNDGtqmrzADU1kYnLOclO4yba+dwmSK4ix+qyrNPM4i4z0tinwCAEBby+PPZy2pdmiVmTTU1m5QdV+2iSEcV+/IBX2r2DuL70bzb87V+D5jl0Umt1rny6hpufLPsTPEId2fxKswvnv8E6ZhgNiOVn6k+0tbffCvHzl79fW1VuTnkhTCFspS+uZnEzLnFmqwL9L5Sbf3gU+GCOMx+CJ9dvlIg5qhJYgltBMHcEKQ4w9AaVHebnXT+0RfSf4PPoy/OoM4wYkiIrbKCNXEIxL+tQTblS7fmRe/YU/n1rXfl0mNuSennYFZFBXD5oDpfYN7L4vLvR+Bozp5fDL6PPgi1Xan1fW9Tt/vTQvXkZUCP7RupSEs5w2dNvUliTerBVUUrCDsklwAFASjm+7blXNTKldPwLkM82lNMQM/wz7zPq/rM4kotIv/rrZFXy8faP/saE+AtzdyiqQy9kx1tjznWamFvA2los64ONCg9erx80RGjYCGbtXyFkPgiDd4q1FlacgoO6+RUeq0gkpFfbePZwXQxywYtBsBtQ1oevUhlV7zrEfjrZ1zOFOM3Jr52OqVOdwkMLTmZ7pVvcLFSqvDqpc1jsevuMIs41Hvh8jEdIr5VCz+3chcDxe09IS0nwVYDY2RXOtnk+jSw77g7lrBevvyePfhIwOlkRq4YW9M5UfHGSWZnUapsXprah2Ah4zUBUo3Lj/atA+pp1wWnJvH6JUpYLz/X3ZuyLn+80YzbnZG3/LKazt3IV2fhn2a8pkxgG8IioDL1po8B0XdsiUsrG/0L4ThA+9MWbSMS+d2etmuer1MaWcTjfqNhhSD+ExEvtSBVUoyL1RTUc9/KS9/HR06btoPDwqJnCQCGZ1rCMOuDf0blRD7srP9tMJBGxeLFiZwhGGzvtbXFxVCJ725SqgK3vLu7a739PuJgS2BcjZJS5OFSioEzAvPJM/tL9gp8piaShTHVs15xBNvfp89jDgaRny92xKf2vlmcAOZDOQDMu31tdet7tWnw2dULFC1V4SLdnacGtQk4dwIppwVgKOpxj0asPoZ9yo9uby077lS0Ygm3Zgb6y7wbvXnouWRKodKpYTOpvrbw7oN441mbSu/5ayYmjNXjn+bfaibsPvbWzZkkO6g9xUZOfJVEGKS20pbtyxM8CnVZvRxvUpgAEI9Fn3Ld55Q47pDgIbgRd0zWKTPYw6vRQeo+ibZ8+jKA3hDI1f3wlTjZkUlbufOvwRnFxJi0dJ28Vd8BdwkESik4R+H5twr1NRMTkwunZCeXB2RcZvcyW1EzL7pzX0qJgCx6YVMBr68LiU6U6n4q/RuIPCB8/4AdGKWXTn/44H+8IBV9xDRjJfVOi8rFnd+P925llwS9uWPMDgSGiu4yIoCfgRhtASRPw1ioQFAwW6T2CSbOIBjbiv2n1cRSZxjcWpd1kyFo4vNJGTxiw/csJ5FvYN5+afU6z17j2/i1PPbVAwWidc8TmTixlzxpi5Oy+bNHof4lsmlAl18vJnpveUtAanFOhNzqQ03DMO/2iEqjWvgppPYvXH97bCOrMb99th2os6SXnLO96NncC2FHqpJdiNOgor3xR1GQP6mP2SHkKIph5NcS9/DGTWqmOAwh9fRIQh5/TDXqfseVDBWDQ4PLaITdXtH35rVMHaVwu/NcENIkjEzuwN2ndLrV8HdTcae0buLY+efoi1k+ZyHQMOjWOFe/3s4iS9VqGOEI4pFYApALYqwvXeo9LiKWI5HhHmFi1n3lap534+/k2F2Psr6pWrc0qRI4BEZH2ABOcb3hqQbOIBqjN7/Mr6s0IL/IS12cOqgeqr4TWJKvtBfK1u7nKL2pHB+pQ+5KZtGISD1PFNxjyqw+WH93CKwpYk9PU9FcrErSApKIgq7+Q0IdBAmxxiCqMUcwEHEUuzAGU/FNIuGbkpqCWg4ByAWpss999fG8z5IvwKxZ9VQhnlhzGoMEI8qKhPz1ObEmMMMMBXtfWXuShxre7Dy3X7dz2qTBHWFywLPojO6jBKCzWuRbenfZSgRgwflw5HbCOuCx9Re05YhmRdKkGNUAxkZT6zBF2myWSf77yw15mMtqIrLeZb0PRvKIqw2xGUW7uMMQDX6WH8621RNpZHqird7JJ91mlSQ8hJrTOMBK8JCP9SR/ffPcruAyvYooRhSUrCLos4Q7jISeC/L1PyiQcjLjlC5Wd47wBm52StDg9Eg1xHy9cM2yUZSBXipSGPeuLlMUaAE96phx+r3qXUYhV2KSu5+AFUevGMNM3Y0s+8nJsKxBdvKYoVWc7Wer0SBrY6r1VIc0WLoK5VkW5tDbizVeaHWtrlyyMHKLxSHSOc+nBnTjz0KJtWNwxOe/1eU7p1JeUCZjwW7rg4QIrBFQWQaPNdQqX08GRqWijgOaR0lUfmB6JwbH3fjvhiml11Ty1Xr6wx9YO++nDQKoHaWBDNRgy42MK4tv3Ph0zX9RXbHetwhoa9iD2PgmwcbMSGsXeErvNLAKACtGipFpaHVsyoDESzRhzIaR4BZKgDR5p6TehGgcGaxaEWuomsCqakdBfLejJ4BNwUqZBC/8mJJuHtd7AJ1XEL+1TRoEZuWwk00WQjhUpbvVa0nvEo80+pxDASFbCrIM7ouwdEAHfKPbgEzWmj9tyocroYW6BSJJviEBu+oPlzcys7A3j9tM5IhFuiEg3hWBYNurPnxtvNbhxu+e7SQBPosQvbtBcMlCBGNE3rPtikG/uo2oxZueowVQjWeWH15EiVm3sl+vl5RFQgONfWcSMOlBnzKXKu2MoXTUuV922QzKIl0ax5X3ltqhJfNQvIvwoGorKiFsXu8/DMZ7pZNjYrts4M8ShRUAfDtDraG/y0vz/jvpiQsZM1DtywV1x2Cofq98JgpY+mrVGEfTSm4cVcvyQVhtw4pApXvDeUFSw6dNGgDTw1ioWGf/xJFBo7el4iCBo/EBEWevRgppx/4IIpLuDk9aZoEiseOjuutwUBMmchPE2Oa1Br53tR1mpRwM1YpaGwchsnNNoX5eVfwFBE4IZ877vUcNsykCZmbfe7FSWN8IFq3ZL+SI6pQ8VG+naSvfXqeO6ZYf9e/MKQrzlfnc4nNQlxaSE8zCQB/10NKYoRZaI0RdHG/no3YD/X5Hhgt2H6/i+K7JllF2r3fMn3qr/8ytxDUejMLr/Yd0zTkWF73VQ7ND/5t/U1rgeIGJMx50YP7o27zym2BtbhUwIYTYkJCX2L5kAS3m6jXC3L4iL5DEkiUjvuKU+q7UXYl0SYYHRIErPa8E0AVrS9GHx1TADOPuC3+heQ5wKWL/S6y0/ng2ZbkigaLy/N6jDp3avdWTYTLJ3euv38bkds05t9+3Wl5bPhirkd5ZcOGKwZkw0tDbG5ta0YLc1SK4xvxmYLtRa+IUrzIxbFGKXw6lXtPd1M3m+NEODjkFIBv8+GcmWFw4zu6IGtDmbGCxdIFCJV2FZmdozcAXZFKT0YKpZKQWr0rfWl0zNTq1DHjStpUwr9Y0s7opcOIuUVSyeIubKKqBE0fNSiQfHTAcp07vfCjY/B4ODHH0aFSOS9Pvn44EefECzd0uMXCwpK2D5tfdw2o5vPilPTmu3n+cPo9hSgFDNl/UTPef1uiyE2lpl5ZSdJZmO07saDZQlwB3g2kK+4bnNnHnp9AeOYYKNG6IqUptBn9WVPOkiU//fQPnf0G5VHjQnYduZmuH1zzriJu7JWp8mxm4KJvmL2rvZ1EUF/0D64ZWZk5RlnU6Cr78OEdW0rq8+6m0MRGlebzjeMsVSdc2yJGXAip7UXlyD3SUZmmBIKZ6UhEeFLOZ4ScYpi5oRIfG7ROdFcYBvz7NwMW/CACmnJ8MLhRJa+pq5l2pF51rWi4SrtlggNkcQMsemlRvtlgvSMqUM5Sp+4qpQ7ddg63uRwB+ZWXAro24JdAjap6YHXlc+6U7Fokd9MlVezEOM7EXRQKNO/E+KD0DZ7Od3snxDmV/QXMG/DAovxfiIRITkTYzBEB4XYS2Al24go0Q71V+3qqZltVzXnR2XWojTCygjsVuW2a+f/PnFCEloBwRn+Y8z/6OMvnpCR0eqCmuPUjLx2Kn5nnUR5OPZE32cnP83hs5nVH3MMiPvsc8pNO4BMF0IQXIGCWPnK/3vgGY114TxjzmIkY4idbGPt4LvD0WXmj884QLtSoF7SjBsNNgSnMQPslbUo6V8PeeViX4poMW6IAdFGTmEJNcLzOsLOsx9cLu8wZVl6liE8cdlbtUaUaI0GRBLaKcJf1iUzNHaaKrbsSVziLfaodIk34nFJRpgycTwCjnUZu3xvlJpEwDX+bwX3Aii0E4WoGSukTjnGXVxK6w5sRnck9mRmxBuh6Dc2nrhQlsEa62jLlZzvqd0Kzs2RNvx/6ga/MGDApGco41YM8QLdZy0BD+a1wrrEHdgkH2o6uQ0PQWwmHaHkKC3Ege7q1bODT5dENDYBBpxtCz7+6HPt9sQ/lE584qGpmbWfcrW+pnKlRoKCq7TaiSeXD5eFSKiLm2U09ruFjsHBJf1Bit2sbrLLeBli/PRW3+LtYyZ0jktEsN/yxIgOp/3D2m4Rd2R/EqyZy7Fs2o5/m87BLcpHT7TBMZHFE+BbdhcbXRJ2BYD9MoPQWaoc4rxOQChxJo1t4BKfjTGM8MFEmaY3KjYRB7ZdWikTV/oUt74AKNrSvLn7eW70G8cAnISYVAC+gK4abPStRgQoEgBHYnPolBwiRAujX/qNh6JVmtTaHkYXEKATmBFnroXQnnmSRDG6K+7sAUhEuOElr4dekBfHt6DpJJosO79tmYXCMGwsh7YE1Le2LgekWXM6r8nUIVvs0xQFURSUZwqmCsx0DgMjAyHj1ndNIHdhci9tGWgk7W16E56rg3NPscCJjMtbAxRbrXYiiJAXCiarouxGq3e0ijF/esUKmfcD/AYxEC7lLLNL6N005ZSfvNREpcCJzkdOFatMf7rRnpiSLRgyDuiyG52tN7vW5fYsIrHIF5o7VjbVchMJWGDuOnNo5klbfYO/WLGzy9bN9T1N01Z75M3UtYbLFfOOxycU9Q9e3tvJOG7j28cYImdEelZ4qDawW0PxcXY+ER1NNxJFwdf7JHoMOUI3ODHGx+70zOJXZF1XktcDXI7GzUzizy7jhK14IQzEVg57zOPOwUHrWOk1LQcF6cQCvIBiYKi4qmByqcihCJU73lZj6ifygmBuC2wBxyB5S8qqRHEJjhUuYdR7oiQBpKFWkKcu2hAqy6nA0XKm1gcXNR9+XErFelk7en+pKLXowwmtobl/9trN9a2OzQJf5rttWfWNzo6bXRKH9CuopBWK9tU+MTkffHGKuzDasVkUfm3RCrV1xu6wco9D7KmJ5/6MFdlLM82tmI+dZlhsFzr2fA6cjXUd6PxmVI8eQy/YOaXduQnGRcYdXAT4JHgM8LC4MnAHef+W8j8oImHAHjr0/7lNH87nTRgfPSnfniRyUwv/NYjO97Gl/7tvEW19cCG4OJzEn40vh5dGc28JyiRsUVwZrseSUgwdDgA64zjC0+/IETD5bIMgPKQAxiQ63mJQ5SobrLWBNJkk+tJcSr6crEDEq+FyyhzTkEkIn+Xwr+8FbThXRksOmiEjsIM5vJXTO+2109o+Z0rLL8YXq2KTsGbetn5UDKETwMK3BDktSyskAufu0kkHErprx4h/GfKK4JonEWisQOOGpeeOFDAgwdok+JQAsY+hcZUszyIj0WVLroNq2br6BexLTnCEo3ryd5JyGeqnqETTkNFD4DDdC8xoLEWh0PIqJEmSwAcdwNInxEs/S5NklJehqasPryC+eF3+3K8UECx2dMJDAwC0gXx5bfS25BaTKidgGB+3W1ISRx5iXZqnch7nKVV+Bdrluq7qYGjrz4/6be562uw8dkW415iY+HxPjFS+QSW6ZWdnmgzGgQVCrXsNHsw6nJ/1gNhiytxBtW75ccb1VcJiQ/ucB/6GG0BSLhLd26eWdjPjdY2WgrVMS7wEXs0n+vsFbtk9j8Wfe1xsEgDDaV0FAszZFsDQAwyjWfhtsl8hqI+gwe2YDMbifpvLhsZYJOdDvUxvwtnBlMxGjy66MlQViPOSC+hmFUC1db/CzfzyZeWtQ5hv1JmLZ4S4Cs6qEsbJuyUpH6h1whZs2RX2l5YbxIg/IaxjJG3HPC2/Vmt0Qk347qUJLHIB707wCtpKqUhxeQK38LL6ZlvOrNe5ak6iECtcm1o2FURLJKOQ1VQY1eJrta86ixjC/N6+WvZAfSOWNUEmqgdE3atvSJMG9XoLsxhtu8RcKh5y/36qW3FT2oWz8dDu/LnFaqMpt1gVzdpoAqn+Y5ijo7EDvwc3odUJ+LV96qk2qCld4hUDAgVZU98LozOatOpOniMv8k0hLCtguJEPqTNV0ijTSeqnyhYlVing2A9rA2LwTEoQ9oXO08S3bhHA/XwOyJRKn6LOiNkGgsGiPyivtpOvKomkKQ0uOlXprY2yJ4JJ0wdlc3/d3O2aGtRjuqL+q1Rte7qsI2ikExd0uqKFbmRP6Ecgm8nyOLk/+ZlZ655Sf1v1skJ7ZjJ6udqpmQSRqoZ2hurrDnJ3cYbkCR1klWvGYd47jPCUVY8DtYRvw74ggIxqQpHS1KsyuDJHKyc3a6TTB54WGXiuoFEzd+LWrCBqZzj4DCXI3R0UjqQRPaBj7A8m5+ZInB6FJd1MnPBfnRT1Eq1sT+Rd8bgptZqjFi+C2xZ/IZvIWYgJwRe2QCHYdJwveiDwiaDPi12b7q8XWPriw0NyFl4YDNrA+baj3qQ1aT5x2Jec0vdRQ0Pa8j2lHJNbtj7dXjqmaHLzOJ5mucPlg8DaJudyicBFHskzd/ODA4VMk+DKM8bXNYfbQEFYKuuDQuyUUB2FrX3OuMZP1kx+9Fz3UFViJ2u6AFWIwVxFnLmnfdd9IgsVztf4KttS7aNr6z4lHpX1ptuhsc7exbEQ8DWPGUmIGQTntNFuRPdeV6roYlowsWJui+QBNWU/zudEgYQgkvZLIw0Mi5DmC9ngGcWxjmMPUcggJ4WmZ0ZREqJCQzr+MTcbalaX4mqafKqegxq2JrhW2Dtc2SNrjxp7nJ683gAlma+GkJsmU0nAfmqGXMODYa2xaJ1PXxgUjnoXrz9qCBoLBPnScIlsdm8x/NIR/SPs660vBektKHCsZi9eROj7yDusw3bwTyjgTUkSNyZnzx87n6EOCemQeKygt4GOffPsFYv3OMqFRbmSc+QrwmuffvXTY2gnI0zuiH67HalK5ALdZ16AHHxatYa1KKn3wftKpe1GhxVnkcnNL3TcbabC+tIgvbf8Rnby9Nn1mLRfT5jhuiWFpE2jzMomh7kEg9CphlTa+vGOMi7LD6Y1Cs1qVUiQLOs1Z3I/pZHop8dNuQ1FykthtjL5cVaTw5fnwloSL3PvNRXtrSGvoTANoAOyedPPjeIdXW6XmsKhKsOYxnQpqZ/hBWy6fDpv5mSapFmi1AjZLt9fSp+3NwHYXI/7CC8XBz5idux2eeUl0ifzHzH88VjkC7vmJ6zmHOqlDn5pEO3MYi0G4Adc9NxWzx3kLP4wD0mIg0OFIFGwzXI/nU1HNB6JBPEj2GQ53hGioicAXCm0/2rc75C5e3EcrRxuglT9mV3kFjupNwe5DYzL8cD/umNOLs8VMrtBKgCV611j5koR2yv4QRaOXgf4bnNJqlqV1kOnhfHEjE+RM4SfmAryOBRrsFPgoXZuDU5u10oV90a1OWLOI9ZCLdsRN7oBvFJTVEVt4sG7aWDO3vFi4By4CSSIGD9kv8sFC3u65CUI2vwgZfE9yIgOKw3qSbDAG0lsU1Nak/0qOtMSNyKVdbwCw4KWzJdING4VFDi1SRReAFE4ZERlo7IPP43pVWsKYW81YT6MlOrtYgxy3HG9Yt3yrQqhF99gq5Pzz61Y2nHJJ3Zq9hWC7tbom9mkLE5RpmcosearYTw+p3kD2w8bUsO5xXQBDDlFUYTb69RKtfb5jSsLjK0SOehPXf0lkJjYvX701z4UGBzYt1/ywHI6FJ279qs3tZhz6/TAOdEM7N/j74Vd5IHNtbRv3+o/0Fz27pk9u4IKZArkOXwuJAl9ZP1zlGDfMuiPqx67IcFEOBPUJ8nIqHd2n/jm23EqIB7yVuoofKc4rQcyNMugZe1gF3r5qmpHdO7cPgubEhSaczo9xRYdSzXB+g2bZfPx08U+xl2c0HjiAAyH//GDUBgAW0d9zzxdWlmAlctMhqd44Pnz/a0H28E72jQNEKW14IxkT5ZprFa3xlStl7cltMLFH8PnEnNlFoAvFTey9Z8b8otPyMnk/N3S/4ATxdZNS6mNposW2XwdVunoPLGQpZdlaDoLItv3J/Clt1d8R42CzoQr+tov7sB1mn1H9ks+J6SwPrPNTb2nPwMoSEVq1+/4rlxls4GqV2dL8JLLf86KROKD3bxlQyQfqL3Y2sRT/IhMWInfl3jZ1+YUath8VVFkGcoqjIVxobf0mqAwOM9wzGH/800Rk7srNTFYnauMIQzVMHcJ64+1mOiCAt7AnCuFzC74rBBCAWnf74yMnKiG+4ZE+ARnS7cHckKDcIIrMz9Rm7W0NoB1ka3YxPyai3TZ/Cwt3OV6Ph3ykeglFnSMciD2YJTekQJKpx4jb7KIwKEewih5hf4xs0bVIo/aS2Yql17C5eyJHl2/X+PppsQ8m5VfkF+9j+WeOYaGY9ltZfaw2shCxBmIca2GXl1Nj3DeicY0uWtCBOYc+yOsN0PxsTxxutJ8WfV2JJ7PI1OCBY5oFMXo8tYFra/ocMkBlc7NtxVrRyad7OUyT2I7RGgojeHtKzTGRoqvIEq5A4Vgtv3BpsD2EtpgcjFUVWiUeVzbolpolzQeDZLVyQuxphVDc9CbU8TCUlxBfu/dFmIBaydLZJl5DNsJZp4RmBe4RR4X8I+ScHSBXWX5GinwbEe0ax4UmtYXAUhLQqwjmM0Y9l3zn8IT6F9Wx7XjN+tQadAO6fbjtHmxagilhxAtWr6A5tV1chqC03gykxjT48PwsUK29o/DWCXbFzDLEIHrR/bW5GqOVqiNdLOlYRE+k5h3c/vwQO96qHIgt854Se5htoDBwbbkBaBlsJ6vK1BMnrRZAqmQiHlCXgK2N0DoCCJ7VyQ1gBjCeOTzcCyQ9/aHXRXS7fINInEYVK8JYoo7V/yHOdSqfNbBZrlyioCabnqbzxwd2837JYvlZFtXqsDKghJDTpkNbNxAU26drPs/1WIDnSd7Nzok75RxUdMZiWkV7kbgLwzF54RdAex9mHy6swPa2A1mIVLyp2wY9hRH53D8ruGNtw/tzKWccCiyyZWxxYW7Jg7KXHERhldfRPcTZhyNiJxzoi01RApuh2w+YWqzjEpdHfqI4TlGKDjZHGFqF2btd0uFw1vm/Tktf9rcZd8EOLtl13lbMDEpDKaUxsDB9TEywuB58QIM8pX6DwfrIV5DjaCA4jJv6UnjBWfXls/zUOEvo/D2TWXp7lt0+mS5XBLe3RXAZYokNBOjWVb30xehf+WSXtxJmybtT/d8Ou0fjy9esmNBZuWPS1mUkOgWfwxlbCK7fi+fDOet/nmlHCmVvU4Vz0vz5KrWFV4tcyTYrkt/ztVOLT2PYwy7bpq918Lp4EpPxxznmVEd3gCvDaFaAqPmCqSkUNF6IW2PNBlFUxVJCdWYEK+QprWff1mzdo3LcFA9Hz+313Ts7k0Fv54VtpeqyD7Cu8qC+8iPkwOEa+7Cfg2H4Zz8fhgVK7rWI94+WkbSMfNHEc+3Pt1oyd3be7wYGU8SIXrNz7YnyF6ryO902KmV8zs5I3sxvXjqEs/QLspQBbJXcHRBOuH6x0M5sSl5YNIAsOQBbHNGtgbE6X7vuJzCtNiQ/exV9ZwZlDj5EO/60bdO+9KhFKZ+zhz0mMD60LjLRzswIRnL6i/NSbFPxxT8D2QGNUP73FGJR0mL93djpw8/p1aPyV8qxcT+ylAva+DrYJ2AkXTQtupZgOvv8KS/Xqm3Umi4pKHJ/i6PVGlYgJ8HPuoMFeDun9+6om9I6PHL9GrZ8uNx29Uca4u3obR6Ft/lS74gijV/cs3kfHvNXXDInxMZJ0ckwXckroXMuGQcwcPgn1fBKTY82dyDGNiPv+t0RWm5SMSvp583pO2NPGIK5uaHsrx4LzgA/H0Nv164B+xn3ILaqsmosvGCY+8sEzCXKSjja025saLcagdnZUjY4vOHKEjlLfQE4g00qpstnrmmO3YwIzsBYzxlNjLjK+fTBfdCTt0xFW1VpedWdERL7mxQ3pDVBoW/p0qw3U509y09d61yY5k5DfrTstXNrnLQzYbLd8yMsoVQKw6C4e2xR0gtqdeb7SNXavdSCUYWDUy7UlU6t3rWCQ1XEaZlYIs20B7AcZd79MtuZpjNxVfawjLCtZ62+JWe7qgK2TxSzqSMxZFeD7iwrx6Csh/LT6kjynYoYCWVxbYKl+7petCEFDWbLKKv0vg8PQ3O78nna0dHmfpSIjgnaVCxLJkej4M8qjVWLA2/CKcj4d6R5LFD8aZ0hHY5GBkMDI3W8PZYVSdP9Ou/OrSwcl/wX/SGZUcBepQu8jbtApiBemCBbUMPyoBd7kEYIADerqLaW3PcI1SAMqgjVz9nAFCtibGyrTdsLNuDHzQFBRwi0ffLME4hWR92dvTIESuX35pEphOjWgX29CNvv8u9z/XlkDIbDsRkBazG8W3nmtMKHO62YSdPveHnCnb57fKpbhuyRJRE1rVUxJRqtaUxFXc1TJCg3LSl1hZhUba9xUzbUVea0safKkrrEqxlqoLkIWMOzKGMOdzoHDpXLWDJZ7qUWUUNAJgOwJ69az2QXlMN1JcVuAvvd4dxPIgj5zAGRhwjA9gIFcBuGFBH4DmfmqNaBwcEWzSHekLsDu8MO6jtfVuoBbGrpMRql9nnRy2wT90+X+M+sNpcIMwNMuYTcnII+cYgfpNCrwAhQgUbGMAw1MRvZhVNvCBT94fGFMTrb+5CfE4WJxfJys5CzEU35GcK5LTI933j5bkh8d1B4PsmF/9SfycKUDdJjHw6dfZfiv1F5qNpabEC6z//aHyjrTJq9E8XpFRJSXz0Fo1iPQxglx1gfRiAV5Oc1NiQuHwGF+zeT1hL7evxStrhD4sfU5nXHRi/zqQ+bsoP04Dde9s2rmu0Af71o3NXr3jQMhS87YIZKAPmnw/z2mHQSgF42O5G4ar8wbklvH6r9VxQv2wibu0dOyHrDzpntTqtL30UIkU2cF45PyhLgpiDneDhGzIWy6pRbSUlwPd9OkCYKN2HhQAUOg50AQCGMWAH3gHfndnoAi4AEA6visc5YZIhj4wM24H9EumnMhHIob4+wL13nMpAGdRxNzKHzlUzDwcbdmVcFozWjIwkLUzEHdWM7zfTy5uS6hMS6pOa/tIwQYKy/V/77uDvzaf6LNYJWb/sRtxKHJNrtTrTAVzeBSD+wYr4hVvMfuw7TkWXn0g/RJuC2M3TsVUZ+f8WqhaUgzyl6zX/7QWgPCJPVXh4PqdE7DSygBq3YEFshXZhK7jUFrtAW7EQtLZd+hZtBm0w02OZP7BKfALuGsS9j020H1JQBgqSOe/ngfBN/Sm9KTum/EBoeAcoFgPRZcC9dwyeg8HRHf10cpZRPwVjVA/yLC5Y4E7hHi477e9ya1+IhePLVtTvdOnBQOn+g7+/ES/eZUA/CstA5+/DLosvz8/1iWWTCq+Kr8YeFOMzd4v5v+TSfvmxNfvLAz55QabadbhRF5Qq06Y1RH9pI0sDD0qFSriwuSO69/wPHjVKx1T52gjPF5u31XzfZwTqqyE6/Y14+/X3bXAfNHiKAjhske1nVzPshGxXsdwtdVoNQtQ3mJyUHgxPDx9KHwpMDzwYqilSq4vq1BY+UmdRszoEeP5eYgAAD/ZRiSDTguoJIK/AaLdE4U8yEBNNXruwN/AB2IN64IEqSkF0vlqdH11AqbqFAAU00IEu7JwwILsiBwVRtT9wLT4CA5iS1qIqKZH9HSrB5ZQj+cGnS+/Ny1XlKCNyIvI+YuAgQdn+4326wi1KdqtEUnKS21cClTPA6rRYb5QfFst1tHk/8EyadcEvFsh1e+Rp8tQ/MtuzsD8CvGCJ6ha8yGM52EgPYY7I/TgiVzMA2gxAOWFGt4Eu2JWwO353wq5x2cFAY8CQcSjAGHhwe7U9UvUcWutYi1VYsRELFm5MVPdaLLz8h0vigyjAvqolZSMt/Jfa8+1GAYLPe2JwnhijlPYKl2Jq7fPXsFBwU4SrlOZDVg7gtlRVMywMeQXDNFfOtDHl8yt/h+hmBHAbVeaICPM8BAzO219I/SgK0CULEpIbExMbk6PDivMWlrrcVD8r2yqNNuzcdC2uAJ8J1oRPOD+czEV9brBu+KAK72rSW8FHTqDrWueqDa/XWJ3d3QJLkLBOc2Gdm2wGVp/oDwhwogzE+fPPXrCLMmAvyZzgoM5erD90uYzAz9PAUmOYEvG6VczB+gnm9im+dWLETRAlo/v+HCYfRDj3OTCpH3x6wn4bWG/uq2PVFRTmlUZZ77mAq35fV+32i602a7/s4k/UvoaGPgQg/fe5xWhEwVdwhJASZTBCgTbj3u9HAFBXRnSnCeU0ufF/yU4vQgZ908zNSxL6hJPbnKLcwaKOT0pgeFrs6+RGCkoOeRl+/ihSjyADNGusXpuWK772eo32Ty4H5XL/1HYsu2YWx6TF6OlW7oCv7qhLv9hAMywu2nM+2Dn/iXPvO1Efc9Z3+iV8n6NDLFwQrqkbzvcaajgyh3quKgCuUZfd1Y4tHSnZUoPxHXw75kCYKB9lIo6Byn9T+5hjLIFCyNiGO2ZTJQgERmsQZqRSQGxttfsTaNB9L56bnDtZfKHz+tnTatRlUQDh9UsCup6+kJgA1DlKAcw19oltjenyCCVr+GkonuQf614Ag93N9T30ve8/5eu3u97/V/96iLWL72b7zvq38A1Cg1jAcZZz3zdA/thjy9Grn2ZZCzX/oCA5Kaj5eTxwGfku/jDmWvDohPUfF447xrBxBHISQxDdkgv90w57YAcJFG8cVo6k8lMj8/h5gngQIg68XwoszyMjzLkRFRqciJyzR0Xu5NV1i+btbnuGN/x4CED9f5k8+l/of2Y74czDS/48FABwFkDAmYSjfZ9zFMa7LFAEKiPs/zmsG9UAoFE7jrCQGToZbl808rGFm74s9AMWmoxlZMksHlhtKLRRBueFZobllPBtQRG212vUxi9poQf9P0NsFCHsAR7aau+77bFgf+mjPfLJA96bJ2Nef5R5HLSB45mPXo+Z3Ox9YFK+51HpflBSm6NfgqCLs/Wf6fhiFFlSjtdgXwj4dXTiz3m38/AFgYFBJJ+oJzmbw7t57K+CJ+aR48VhwcpewWAGXJC8r4iqSK9SQRsGCl9wxN0bFGm0rCteZ3GbBfUOrL04djE6qTJi/tL5Ea5guofKgPGJi+dPhzNxO+pLr5Ras22lJ0rrtnV2Ic5+JzqHdDn7ENNSmAGDOakvgBlNz7bXlV7OtCVA6clSW/vCPqTPeTE0h0ofBKivPkr/6DfbbyaNffoZCt6+Y9hJNwohNgRC3ekzLfvG6RaBHyFOOhy7b2xcJdpv3FmbT47z/1sT+evIJoC66fgMPozZU+lj2d0YNj1hR5ldk+kPgaLohkR9t/oPcUqBa6/dZR+ww5tlC9gHuHub2TnVkdFWdAsUWw9d8PVlRHXLRIHRpctyll0NSA2I7BGwowKiOFjAxoA4TuSrUj/qwl2eYZx/tTPICyRG/voC1NdMOD7o909MM82atfoejbgqyYuvddo+r//c5tTyvZJWEWn3VmdZm2kx//gN4njcNPb5zdor3J0/4qvUSXyq0RJx6hMxd9EZkcVI5SepV+E/7uReqb3pxBwYwOaoc/AIFSAR52FPxOAYgByFTWPYILbRB7CE48y/94v2/yT66S3RW3+P0eWBn27DT1dDwxf70nxf+P4XkGgNv3mQshJb5d3OXV/FNja/FL0Q+4pjbvr+T83XI8vHu07kYLwDC+wPYQCT/GJcoT/7ujAXn3npS8mXl+xMQYPwR3jgNUCYFSAsRBDoYSfddQQKPJf5LoSFvPOhox2/SwqHZvh3f0Fu2XscFRVu5U6kddcyXqXLflw1uAsvHq8dTwktbD3BrGWeaA1GnzzNgw/N+4+faGycX9JaOQksAOzVKmzs8WIP6zGppXAwD/YJg1GqNUIrtW7evsNaZlwG60Rp3Qvyk6yvrcwK7JOAD+yYnSOiksvUiN0RSFj88GIG3fhGfX+zvm/Cn0iFFQIFVgsUpGuCM9F343r6wZMZqgfxUNtgD9z2r7TI+SG7jd0a2yZDCJv0xUxYbE9bz0DhKj0qF7O80NjZttm4zGdzhbgM/OmTwV3zVaN8nWDmSIzXm9sth9J38N8d0lK+WVcNsJNnwngtPfmqLeUFwa+li3PnYf8atDyJBL8HVT6DziFzl9sT13vJECLpdO204ZuilRbdA00u3fLA4DQwrPX1TrQfiIn05U0x9dqE0qSKuxocJChvwXLDKsmiLaptWC8e3Z0ib0toOTrebXFRof8Qg2TLPYEuG+UYc6NYfUjfho2r50TBC0jWB6No10Z8PK5z42HAvvaaF8kqavBlrRWqUqXGHJN7NiZXwBtK+7sPL7yK2qQiLOG8ou3/atQG3QM44+fjwuM/C/9EXXSsHNkv2k+ydR46ngVqoyS+RXLTy2Qn+aUGUBOVl0qiktj3BrHmK32EW0NTO0y6K9ovDLB+45pOzpItxBXRaiSxYBoGivpYoCfHjBsGEPeYoVyz3tx7Z8NGwKD6RnPHLlG6hlDyKO4qOoHjS75N8PnJfz4/fnrbra3RO8L75csX3YPfuvfzy9iWdiWrPWFxhWOdoqOqU14VviiVnUoAfX6zU359f1wTq5ZWyZdUqZb5OxmmBa/bKpYtzar5AHgozWXaEo2mRFs2qS3TlJRoyvaTH9belKLW7Oik3WEPT1S7vogk2Y+oQAECzU7ZguWTC1/oeYnm963jps9f9Jo+i7QZ22wgQAGNT6KoYGBhqdcoNjpBgAkRnzUmHEokOsm2wh54hkKAPZPx+7DkOcRT+cYGRQGNoaZXG+vOc+wYpklpRXQJLZyBrT3Tt5DBo0noRdvrPIINSuVDQxrACy9uTBtVjSOId+PaCNonggga28a7NcdRlYbaFuf2Afa9uurS3sS711w7PqR3WsYsfseAaxLiOw4MPMWFyxMAHySs3vufj8XHxgbffSCqa7AhrThVPn1ZP++Qx1jYd2YtxgiPlkg1c5FcCtTX6Lh1ag7F8eunMh/T/89kQVYAMWXemn/+qe+haBYtiiZBZNmbmi3RJfESqvSnC5KedB7uwjFqGoueKuFhzBXEMrGC/hwG2PQtWiz5i0L1ZRd/jI/9CA7SwsuROYA9Dy9pwNFOtN0S2J+aXRv1l1B67LgTdXb1oQxb4OxHhry7WAJcJQCyzEveh4E4+7rmAmyU/iYde0CfQGCcHkHcN2vj3oribj7pp8FVvTrDgvGr1El1bdjK5gj8oknsAb608EOfvsATbj8TyzYYVYakuKA4Q2JkukF6Jm4RVrVXWWxWIwpxkFjJjbaZ9yqqRqMoMS96Nv6tvpucxKBZEYhifqvXJwhQQH3dLZbXr6E6hhzGBmaDjkHHrtRXTGPY2LB9Bp+x2sdd48Q1VlT68FA7LrCpLjm+gEba5ZExxI+MCtwU0qDzQf9Jtfnyj9ETt9cHNPdPlGbCUjizNHwLmwPW7772hfKLQ2HmTRIsWfEwH8MnEh4hXWOdamniv/lA1Hb+B1phd6VAnHRfzL6RIA6VotoANhon4CAcj4tbcPCjfeeFwuCNQDaG1gyjntjcN9MTY3ql1qvZt6oMJlCXVXeGK3996ssREIC0EBOKw63YzNW9BHEoO0CLStE4Qbuw2Q25k0CrEGZS3wgkC++ByxVoturjuNL9klaSyDeC+oPOk0krSfcwMrik81McJimSh+wPFDcpXV1O1Flbe+AAQaig6rvy8vqc5iLETN2dpeb+jtPS9otOKhUksmh/2nOY5ldT40eDwdlJjvZhCesT+uuk2olaYX+tBbQ1fbHXsyfv3j0XNQEmgs6hAYw5gKIxuks80fll+SR7N3jgMz396+AWT1rVbq6/J+DJlEo19STA48/dXZXm2TL465krmFl6RRM/gfgRYQriFanuBsdzzVOHmVxOFmX3uwgla/9HJz4kVx7POMm2z9PMb5fZF0TNt/+zdat+OxKZdkG3xKdNLazLFZcDzzzqSbydytOeThsbHu6HXNA7wyHDfwX1ayzUI+gm0ktiIS4BPA4KXh77XoyPqS/jfOV2x8lV9mFL/Jf0YsperCqxCmgffMD56rGKbXatzNnbu1uwu6+PKUk6kxo5N4KxarvfHNrVu/Y29CEMtA94Jm25Qn3ACcprf9pENIbt8daXl8pEnvB43sD/0sutj20Mmsj252uUEyWcOqV12g7lR3hkLBPLSBVgL43dz9r3JrTMOYsC9CNW/92N9dHKlI3ZPgzPes41vXmJ6QLr7AGx7yUOXJOulTKQC395V+wjcRFJunuMD+AlJiO1jvf6d84mw3Vi6U9Do1ceHxD9mvdfGcIc0WENrq+/3h0oO+8N+RHaborNabhJmCXaCgCQ9sAsvtlG8INoY3DuZH5OYBrysXY/VqwJquls+sLw2cvMwM24o5efGb5o6qwJ0hRj+7UfpyE5gXkDmnJyK4Bm9F/LXXEtBdRXblUrVv/aamW81a/Vq4vVXAdbKrdaRvKctPdx+jXNq/bYMf3XR5C9XQMt6ab77farpX/4c+1xaMmu4TrA7zBVFb5AuucdXPxOwsprjxWR779x7nPi4/8l/vsineOeqNMRPQG1W8rnFRUJWm1yYU5my4G1/MrxDR8quIYUE61UoIvIjFoUnl5ofj11z/ru0k5nxWEw+orS5WXxcnpRA7z6KYmUfi/lRyiIBFEgEhCMhSzZ8+HCXW7MjRy2CB+Y7UdZaP+sx4k6WdTOs73q4jpi8T+h4sSz1ekLKna/f/iNxTcVoac2LUo4JF4ckmeE9kkeTofwralleCaW0RSZ1uRfyyrIMHwm521Y2LUM8j/5UlA0Ql94dNa+daxpTcqr+6vzW5eMpfQNBVBfBTUqU0k1tv83NqOf3fiQlspd2NbdSPHAtNV7NbaK0sqVWdKGViw9RnrsKz+h2USbf5O0gbzpuVCWlgs+e/VB+PXD3uM7T6QRs1AT9OrlpX0/pfzz4Qcfbc/i9Px2IZ2QuHznncTkH0FNpyUwNZuQzm6KqUj8y+fKBzl+OeyFmx/M4+wy5ph/+ufkbQ+IKaLP5uA8N/PjifvDFrLLATO4/wWQHSOwB/liy2XRYcy1hgcwIOEjjLzCoDz33xWAtobu/VNI7atgkXXE3WDvcz1KjwyufhXyk88YxtxYvrD86MoC34K35LkZuUfMox+D0Y34KP290fOm0Wsg9FJsaKoupGoog2jXh4bpEC8nA3A+rOv9M/zKmzn0Oj1Uf77pQMjEu113TmWU00AGhAO7rjQGK9b73XxUXfcN89mp9NZ5tzoe8PYtTW/eYLz2w5uHQko4Ib4n5VhZWWz1rh8LeAWJeQ+Ztc6lTacbWHFdmiXBBdaaJTUwQBmoB52rZMBzyBxKn4krzwTXRXfFybRGHxjA9A1Lm5y1zIeJebwCEPoLdw4m+wNprbVGnkwVGW4b6J1c92jTo4y6bYu2DXRurtyMYZmel6EH9No89JizBwJ1Hoh/qgFrRdbOW7e0r5SizR9iH7wlUs5qHz3amZUZdLj+sG17k5aBMZq0223LyZRvQvHX9zu/zoZNhNyr5xPEQ/NJliExgV9/L2QiDIRo6LHlWm15bEJyZQjIYHcsEOvF6bkQBDOoHVRApUA5EoM4rWN+BguEJi9IiI0pL9MeS6N//XpGdGhp3ryQzne86pp9P/chM+LaK3Mvgm2afHWEIjtbCXQ38TcW6GIbEyGCr9gOypGliZYWmn6BDjBQBvzlNsrw4DS5PM0sT00L5gVU5KlylMocVd483BysW/Bim28mZ0M9ObmHDj7vA33Yg/3xXTEyjRvb5p04gq8kvCxRFIWkyuWpuRpewdwPPRtjy2O0ZS3a8nJtS00BWFnzKAOPMUyZOs2z8mh6alQ4AE46tnTOzSsqKGBgQl01q+hiwE46OrkL89UtKuTuMjAtGXz9tDzf9cHzBRSng21EV6LdGYP1ocq9RD/Ceogd2hniHRmpbsOkRShAB1GADif3D/vyA7EonpQWBzVK435gCa1oCTNNVUS9hhSGtnYGfzRgH7SDqb3rL8ZdXJ+wxZyikR2Ljz8m05hTtpSgABlBAWo1Nro4OIK4nQdzvtTqAJfDBdy0g21LrjUZr108RyErOoe67Q7c4bK4rK6B3w+BuUfco64Npnn8i+sPrr/o4b2rC3s8gn+dGSPi1mcGZe189Eg7qxS9tQJbuVmkfKW9dWvn+ZVTw+IDzSMZHlULDWguMm1/42sH9rNd3L666P/D/zeJPu5De9bC5vbmc5uxzbynlqeBUfynv4b/ilNRgZur+mkPND23pAQ5iWr255ikP3WeBtG+0eCvd8UzYD6NLCdIWb8ePf9rmif02eGZw8/UA+D758GCAy9f34kCVCIi07kaJ8MkDyOGZwZFpTrTuXSOX5Iu7IIo+E+5LoRC6YMgCAw/Sy9qH3iMMhHcGxiGaRyfC9gLqQKYAQ+MZnr4Hx6wE0AaIOwI/BBOIhEIMovvYwoNOYvQKCJCG6dxvshzdruM1z58WS0uEEZOismsKu5CNgAAQJsVDMPavGjJWcGHEGBFp2zXQ8qBHNDhRxZPRiafPPgX97nRCCl/C/AieONQXOnjCanjo09rJDcel8wLoUAQiRDwm3ZAGbSz7rM4vGEilP7dFZmvYv5RuPjPRWmL/hRjUar8BrnZ+OLFhw/Tou9yAVZTMxc1x/hAG4CbYkQx1vUc+9WdmFfKeHV8xJEIvVqvPFgY2mJaGCog/a6eCz4f8EIww0de8F+04/1hqhXKFarnbkosNbgC4LhLu7xROmkGUQFwPR9zjVFJCclYJKKtnMKoAMapAIlbY1Q3dSGQ/ehyOwwc28I/Z/q64aTkcXdGXVaXBbMWoi8uoiRU2CPoM8LxJyYADAUdBZxTvFUKVo2AskCl70FGRwQZX/yHmmPY+OD4x94YXdkiXar9rSR5//t5RSyVhTlWv1ya+/Xf3tnQYyyZj/l2IpWSSm4XYr/ivW35c0k3t1pSjaQ6MoCPJIxd9wWle3L9ryE3//uE/kkzoX9taMG+BuqzrSG9T0P/Dks3xlWHkpMYx5QbS3zEFxrzZFJCS6o0ifWUcHvndfenP/IS1F4ymSysAIQEy4JDw6RhKplEvJrlDwvO9gztUCtlyhDQ8XVfKUFfHYnWx+mj7d7Hx8WvKRTYouI0QYLQc/nnkQC5UI7w/cWcVQvDNCuiV2jCQFfGnySCuC9oXU1Nr1TFWbt3s+AH2FppbY1snaiPWLyQ8eB53Dc2Ohzqkbd7aRngY3wwYPLNBud69VuBxFsC8qLS/lkR70PiN8RpNHENfKvji+4d3B3mmP/G29txe1dE7LiwN+TqExxYNL/O0tQY0Mxvys1tDGwIrGdJ6i1Ex5y7gcHLLs7O2b2btVbaq+Dq+bW1qNXd/8iBL0gxfjL2GMr2/vvrXOny+jELU1XEynt/f3LJb9ql0hYlnXtcilRLqrndkufLt3lfsSNd3EpJZXW5V5jEB2TYCOsnuymX/K58Qv/kv7f9KfsKQtfeR572hmz1YsnCZDKZlzqB9+On7us7bxOespKkqS0EqSyv8YLYp2Sj8hgjiRxaHWdMXxwSFKKUKdU7hnrOCmB/1mqxRKYKk4aFBsuCgZiYMS8vIkehzFbllP+n1ADwYE6p/bdclaPMzlHkRZRj5jR5alD2yuwZXhBf9ig7Z+UfaXLzaHAaytAyfFhw5MF4QwRFmkBoD8rS/xmfV773mKE41ZPW/Gs4tnez1fg/hmlkyysflY9ni2qLxx95tQUMhCf0EOgMqQ5H185Wj+IIE8UZBx6z+s/wzrD7bx9g4CHVpWcdSQxbNMlhOnDYDhpm2bgjzJ3lO4LlaViod1owUF/m/I39zRvgHTIj82+K084QVquZzM+3V9DKzreneatqqfDTFfxHo2/s3uW+OpD4LVuBApQ1sNPdvZFRdWrF+CkAwKnxFafSp/Fx3D2dXI1dxCxNSRuzjYx3dIyP2MbSUpbGqHhJ0kAcfgOhNfSwaaf88hoFx8xWspgbKodilA81Tzjf47yBkoWV+neHxYUKisFxw/LjMr+fMjU6irCCmVZBXZps4iiGQB1yW5R7M/lmbtJ3WYAVF+Bgy09o6iUSUdZFZ6phBtXx9AwdVAb2O6jZGP/BcgfcgJkzhVt27ICAk/2trRfLfrJ6+svOtUSV/OlFOcFiNyLrOso7uXPwR76X7euA64Prrusf2BK/lK396Vl+C5wd57q3UrOPMvDUYDZL196bi5rLz/dEGp7XANgs0qNmIkzUceOYzqfT0Wm8YzccQNNF43U6Xd2jDsmLyCH4uyHHXCb/+2H3/E2cibDPL364WFfrTfR96gNKlgeaBPDl+MtUgUlAvSygQMuyFTWM0dhSG2+sabdrIQU7Futqi/eu1OJswEbAvdecJn+xIFi3R2faTG6ewdxxI+MjSY1JiQ3LNbg9frH004JVMmGqKF4QXyGUsFurvGBfS6IgUaQTBlWt/Hhtvbj3TO6/x4vimkTi99W5h8kIpemNn0HZ27963rtHxEphifcI9ohZOv85/VB7/bTlQE2H8uvG4cGL1sCUnJR92bocHfxv19WuA8LV8au/b7AnpgjfFCZVdIPx+Yf53MIr7+EX4vDMtsrxyvn7Kcx0AX+PkJSqkhnlmUWBsmcrCsoMSveYWgbYldXHj7FK9kDjXrCkt+BHyA8p1Pm25v7y1GhG/s41pz/9dqo5Lz9vPVlIFy9CCfG2ALrelBvwLS6yifBvA3LbMVdfWITeHKKyqQwEn7BtQ7IRYWI1VCNKBUm10M00Wc1I7jdZmiBOkB01Ic0yuSvYzwEhDgHigJAFl0zWuYgch3ty9wx1lpqUJHpXOCIYFh0WfSQYEZ4VaZOos4k2QaOgyHfWV5U35sxS/XHvPV5qrz3e5y5/WXxO0MUPPGlMJe/y1vaYc3OTvHaRe85qvd+gxBkXGZLSc+Mob1BxQu3Tw6PbRx0jDp77xYYjc8IuqylAlYwOuz0Es0abhYpIgJrs2HfYNctiYWPlv8srZcI0XqIo0ewDk1evZD+//lgxEcZLFkrmVW5Nkz4YgIzju3QEqyhoOGhYJG7QRJ8/7li9XcZMYMre2ta7XcpMYQY1VjoLrxQdzPUeO7riu/qwaGOC8TtjilH77vXF12VF2hXacqWhuTxBtE+U3AHkpbuZdeI65uPvJFDfNKGiNELJB3wlhGIYLsA9bhVWjHx38F2WbyisYSwVNYYeTkxRD8v49Q1iwhFZHZRUK3CpGmhv9YMqm5QmRzNIO4hxyoA9fIw/Zh+W5yQu7av8Y4DbZcf5PjnGj2ORZnssOC+Stsr1he+7LhgFjP3LQ02teI62XEdoPR8+0kTs1L9rS74AnDc/yCRjMGn7y8dATL7CbncbSZtjCZq1YcMkNbwydMGqtiY3oWxpqlrKcY+E/UKjcS6wDHmPnGcnjYBccu7YGQYGnYTgttNFb8sFludBrCAMhemic6nsYh04FD5ey9gc7i5mzKryimPTijH+mPqyHXrIdNxf7+mqwufk5TlRZ15+X/a6Xq3nnbqsFZkY5hiOS4wsyDXhANZ0iPHsIf/XF6AmBHcaYIMO6+Q4N/YZYO2X2q919szor6KVT/VfUeO2bQN5qZlpE9uYZnN+aTV3XDwa5D+0xhO2fDiRrgeApH/90g80Xkoj5GI2pvBo///7rpYEgNYy0c0iQ+kV2cGaY8TfT7mhJEVK1Hcax+HrFogcMe2y4SGpJYU4nMylD3zuYRz+xU8wVLtG67N7sx4zhgv8LmbNee7dpXPdl7fJS1JDtoGISQBBYgvka16pMnv57mcBy90D7TnKO2afOQMbaOrOv/3racUdKMiqbl8UZVOb6qcyz++qup0zT22QGfH5rKuxelmqupSUSa6YlX7zlZjQutvju8gQ4Q0LvzXUN+j3zZ0cVKW3UVNSd99WQ3CEph/E5Ne6XC4cBWheRFOYNjk6PIxd0e6yo2DZQH6Zzndh7mtfMDgZ6juYmfHsIGyw8cYVSz/obzXI/Y9DxrlfFlIEHNifEu9QQb4Acx0lZBQ//01kmEN7D6KjdjThaYThkBMNGv8mCLSV/1oMa/c2dkPz/IQVVdOXJp7u18p92m/apPCi1COHU9suy2xJpmZTnl608x/urcDTZ9a+G4XG3xW5QswVruHemiO9XPAYVwQGb8jJni3bpq3x8uVnZG0qTWfve/SaL2179gaAPYcZKEDnUA/Vrtr7pmmIMcTnkoxMRiTDlAzy157ml9nt08vFYv82J+Zlcdi/EWLhtkeeYLG6QtZ9824dF8D5vl9VrwNqSe1A8s7qr3xXwAzukvRkWRfcxa6Tv57TR7nJMF5YEpKK21x121JDSuTbLru59Lv3PHPkRT9BuBHTb97to11TOyTw++Uww/P5wF0A9OkTH7LIALJcP+zQfBeVokiC3Kd+Jx7TBGdXpENkVveERQsASfvuv//TeI0pTBeU0sij/XDpdT1QbaPOkadcdXtRCHGAnQutpdDcAQi9bP14igwq77v6L0DHd7t+rfxjD7CCOMvXQ3hwB95u95sBnqG3Sq07/gqH/EiJbacvD9E0bhqCwv/aYS31CnPzdaB3jbQ7hN9+WsMKf7LWahrs6LeobsPQJpOWDKML+0/3wIh7EDAkd6329oDB/ML+8+f7J+7nz3UxizKZb6EAiUfm2vERpbfO8UAp29IP8j8HI03fvLuu+ivffBhw69ifkpAu1rGlZUI9rtVJCq++hk5RAXXEzhWrX7rUJXmNjs0beAbAarjxvfpHtb/Af6U1m6ybUAjZNOY53ju19xUbxoocYCXPx5F2AIDdeT6BejDZ6nazGxYVG30lY0yDSdpCurWO4v3K6npeeP/EHBnFVtu9rKVFKun7p6z/xHv9T5rrwjCEiT7pf+9E/9aIv+pFLr01OvAiMnf+Ibl42pibZ4Do0bxoOhRODlRI08UoeaT9l01slAxoGh4kVChM7fTTG1aosEydqdX//Pchu0OGQ/pB70QnyaSpT1sSffRoLNebRPH3k7pGnKiHmKFZuvRJZUFEnlJljso9qzIrs3MiclUVhHgqA/liS2pEgUGukwenhqbtCk7Nfc1sJvwBgm5qh+1jwvFhe6/uB2pDBmW9OlofYBRaGMUMa6wOMwwnFjMsdF1cOiaw7M4iEok5G3afzc47EVRXqM/X1bGb2J9lGgp1eax6v6agOmHRrxNDCTZyPHVKB9xnEYDOIADBUYAI+AIEoDgCkBkUINZReA5uLM6vyJnUjq86qaGmNsKgzpK+S7dE/RmByQ0RRpc481Pt9Pm0pncp2PvAuMSgX7JBjyzRb2CGqBiyhljc48kF3Tyv/gY5bjWFGcMwbnKFZaAmhsNc2PPqkGGNC6oDsm30PHzUvNwIc4QSTw2uxXxuIKw7haviiF/fjtkV+7sV3Ok/Jds7S9W1jiKeOf7toU8+jNbYOhqDVTWNx8ICVmHtWea0s7D89VI12pKYMqhZllH94RXKXGV2doRZVQbgUmCOyFIqsyoPlJFHfrxHyBzqsGZK4eVRfAZvd38Jfym4jeEQe8Bu9O5YgyYQHxwewlZ7Zc6G+56cMdyjYIvNEPOoGQmdfP8/AyD3GZt7IzvphnQiJ/Ucwnq3ONtX77NVfMTwaW+o+3CbOZzCyy37dGb+Oyk7Mi5mCvPFlTSgkT6qPZsaWrjiALOWeaA1tLAdBYgLYaLt9xpGrMNprjSrC3O549wEe3h7OAh2k3MM5wg3ckw3KOyRt7uCK0V/3un5VA2FzXKrVflJzVWGzsIjyFE2RbUuGf2jegenwVitj2+f3bEt/ydSIJqKeiU+fQKC9dkmxooMsg/9ZesDjmErx/Cg9SXdh7wiw8QA3+en5n8PRq3/rqYYT+Lj2bv4mqb7uONYtzOfLKPHHMd9OrBam3+hX02aSQNCah2/z/8y9rVtX3CDmMXur7A3C0KZN2u+02cq8WPLr0U/0d/65cfw8CQjPtax7XNEtoASGcr4pOaGLuOcsUSAsyabQMg2OmNjd3yJi5gbIPEyV+vXvZHRNZ3ckJTUsFwTgIw2oGm178jZo3Uf+f+okw7OGqcOG2HXqPHwVPUpkA3qfvTbX1ruyXxWXv5MztEG4AFaf7ln5Ef/DdgGT3vO2xMzg7a/jQa++WlgaJ8XFAV59eX3hUJq/9JCAz99MxB9OyJl0X/OUYH6Cl2UNCMiMasIwaUyAADYrBDq1tilrHcE7wAAOcAhQ6TyzRywmE0WTSaJJFdO8o753dFJN9yXhoWmG0LDgp5lZf2Q8UNZ1g9B/jH+GipAGNQ0Vh87ecdE+n3pBt0dP90MCmm1rEiWlzfkhUNxJY+fqh3f/WKP/uxFaUUIiYKy+UeTg7YeRkKdeZ0UQiSB0pnbGUKIOu/pDEUOK3CqB5mjquZbtbEfAhRc9hHM3PlzZ0zbyhpDNSh5/H5zQlZ9xkr9ycxKaG44ksDOMFcrWqsUmWZ2wpGNV/zPhZ4POx96LiS5E8B7DV3iK47ZgwLEh2sRp74NeNFq31fUoGzJC5JQxbHUUuSVNPGv/uOpj4u2t9pxxj/AJSVGGXZMck6JT9PTcXz9PXxp+jmYQoVaK5WPkp5Rg9Hvve7uWPWfP0WyerVnC2yZDbysdbs9J/jHeBx4wIO9NnsQ1nsKDdPTQEmVj1sKviIMX/w7tueeAgsxEfDq5wa8DWGe9sPFWcEUHvejr7oofQY7M37j89K6HTUxDlL61PuB3PQu7FyQ78OD3tVg3t6XuAu3a63EAbsDL3L7XD1OWCBVRG5ORHl2HK4HqOC69KYqUfANnUCdK8bV+4lRdiju5rmD8pwMlpP16YFBmidUzsBXbCbfXZbz1FJfD6vGqi6IiipQW0c1OEhQth+9961OXFwdXxkXVxlf/USDgwRl+yf3u2GiUbTRisCW0cDrLYEV1xfCUf5Ms4Owc+bTCc3OIwnsTHOVorVakcFddgPnfZsAT7yn/XBJZrAXj7O/71Ude69TvHtzqA8PtP+sYml9g39xZrFuyckltVF1N7uX5NeNOEmdf/75seScyXWSp5bUPA8YSK7Rkziz3F+4sxwf7hRXHFvnATd2UJanPxbR8/xrmtp3+85RjG7qzm0n6szPd1INfRcvtD3OMa+8RxC0eAMEpcbklkcf6xo/n/wYWzZK7iSzryzNiQ7Dt6WdxpFfyfVZvLzT2KMtzPcAGMCZCKgn+z8bMmGgd5xI4d8lyY+i5Jm8rnFbuD4EIiGZl03w9yYF+tCz5UQiwX9Ip4hiH/F7hx78tZF2asOh5UWScNPN1N9cfzw96D+00Q2iIVhm3TTly+87/J2MVE8kevuQ5MH+FBIpkJRF4NC4xHAfHkogayuzvSW72OQi6hRakQsaUmJ+/Z/giFy/pd40hUuKlh/acMpI+zqY/o7fEbYiSjfkTyAS5dl0n0CStz8hm5dMIBJ8uC3cayavTzuH/A8e/+nEFJVcxN4lyfau1JIJKM8nnMilcQhZpEASieIfLCf5eBOJ9aTvZIf7+L5Tm6wyGIoG/6/6j0aEvVLTW9r0aRSRwsVEAQpooJOCibPueHoKdQrBcQ7+xIxgPM/u/gtPl8t7mCKxQIVVt+QgOKnmWEsglzJsN5ta6nJSz2J2e2rBsBIdhHeRvhM4hEtj2VZmsjXktQ+cPz0DBp0HDN92OMF0CPdHMBdwTXhdXrC9Pkvu/rkDA5hSeLly+5IsUwr9RL1y2nuYEsg91lKT1HqrCiqUWCjDYMB4Qq1UBucDmzv1CXL6+696SJe8+1I/Rj/njT0K3SikSxW236MO/B76R6i/ZXWlO0uT5oeGfF0Yz3tN+RoPJDpqB2eM2MeS+Nj5Kut5WOi0bOLj/BFJoflJH+vKNJfHA2y6tvb0wzCbkbIjdX0Eh0PZ1B2UdaGCzeILNU9a5ItLy39e1Ufbg0CXC1jIiH0EairIrvbQnPaHlL766P/DwaG9ZzkTYROcb8f/JZeft4187v/X8EQ4XuSA8LM/7Ptsvo0fDZ7Fxti9zNPMXvbYtAv1YlKYXqjm6aykQFb0sQZXMutsEBiFmUMAkNuQn98Z3rAYHqzT+UxWWDH9zM+B6Bz3bWqkmh/Cnlp+mkEtx8nibhqCPOiCV9LDw3g7rh0HtuzDfkKKvtaRkdm5/fKCQgrMgK9Q5Fn128PzjjKvRZmIK3yAu34xgg7C9E385kpu1AFov9/9knWW9eVdd98dxt7TMvjvZY49bupDnAZDxntXNThympf4RMpeF/pOONFF7V1I/zmVfaUW54pkXBM8rx4eLZo+tATpd+VSVoOkXtIpccJnEkhWslcX0UoKJ9EL6t1FtgLPZOj+qgXYdUtC2xcfWMF+/qrPN2VXv/TE4tvvG+2XHUPX47PKwisUzYtrNAuiMSte0liqyAvLydayF3ntvL4sLyY7sLBjsFJ29/mQXjRzDlwkW0kJlCJ7d5F268syUbSaVS9pkDglneAMMK1MNtSnaObOBbOQvOLI1QOibM9URvOqjOYpz+xc7uvx8+p/gOg5019lLE6XbgE0ZM3DF37tcaIF3/8Rkpr95b5tGYmtDIMwXWgVWoYSJpL5BvaP7F1Bu9X4ri8vNgNPjvd4GZRd6IaKDWiXEn169MnFvK5/jf92vQDqHHzNYivMXqIX1z9ijVZi9EU/cr+ExAW7wyq2TS00aoqSVqt71Bbi19+FU4dywnbrKh1N9rlbjheXrgZtz0e+bV5tGXsa/PWfMIlMJgaXUb3FjNAsTmIY2Rsh6WJYuT4957wpJej/HVGrp7yTCle6vmPZwH97C1rfFq8vbDs8kfUB420UoPSWgrb3P8++o/uBpCGGkzQkMkzUE4VEDZFTEeSO4v3U9hrVHcGOMiqB/o0gUXWz1i0GVBAZYc4+BtRluapol8xuM6X4dcBz9qhf6zfYVUKVNvauY1PnRN9Lf+8z1ZOPqn6faa9LC1PXtc/8XvVosvqMt//LvhtOliprl+WUBneq46zTc/klKxBJbG6R0qYaR0BI3+YSRPH7d9+hxoCM3OW86SzP7UH/p5+Kzr+iA0Pf9noxOUP6/Zvoh0NRQw+jv/mdNDP5wuvt0MDov2zURyPDLtw1EVCvvRnlCsyAwr8zM8PIsWMO1zSOtyvgCibs97cNSPSpcTXGrdw3dZmZb1TGTeoF2znb9LxvKmP6M19/NL7J2WqMrYlNhkBcTQF5X5Tz17yINLlRUCQ3KrNVR5+H7CMXxGuoHhhs3QHPcT3wDrCd+ozroe7YBnu4c/C2bTAD1H0cvSP9/VMRWVkRyrL68qQb2WtLT4enk1Kwp/7Z136NI+3/WO7OUKxbn76Tr+uIX+BL++Tr/L7u+P1+lmEtFbGlGk1pbEVLs6Y8utgWkzZvJHSASn7aunxWyRW1fElKy05UU1rGK2PJ299uKoupCFMAIlY7NVGPHdaJa7pk/Od0mLaiNHadbkdNo8y4NH1p8zoQl19+WYj8CCLmd5wOb/E7UHqKYCQ8lMkeGgmEU6WbiS3hpzvmR3grvjb15Evkugpky6O+YjdhIb9IWPKVXvuJTvNAWMy3EFpehlY/8KrQySVglaSZ5gU06eAqI+6/PuEg5fQxGHpxgu9hfwktD77JilR8NSd5yhxzjI1XngYi/bq+3nVRVqBkaK82/uwXZQNKRuzlLv5OH/jr76avwoA1je/4mNel/d/Hwet41r7TeWuJdeDqoc7fsSsvXwBrPyme2sP+7wl4EUlCoyje7pi49Yspq39jrbfJBuVybcxvi7fEHZo9N2VSpYbZ/Ar9cshFlFS/goD/d3gV0CBN+QRpa+gKly1r+mIRX1z3QS7IyFgWtI3SrTEV1mTkd4dvofw/kVEW0W/UA+g+KZ2y0iTtufzGxt3zaQw/dcbVJ5uuxG3xu12Vdkx+a809ZXbMw3/Ey59/llp4r+J6Tgo3K7BcUKPeUklimCVVhB+PiidXf9tpZ57OB0ObAcPAgL85BSBI4idsz/Eiet/zn/KFJCI+vfAn3yn/+75zYvYa/vw9XwDht8wS8XxyYcTospAFjmUg/qSe+HJde8fn/gWc/HO5nDz2vTRdf887/Wh/StqrXKEtT+Tp4y8KWNTU1jy8iNcmKCgQVP+mp9SxZCpfomBPF0bcbg7JcywDCZf1xJed9o7P/Qr888/lcXLZT3W6/gAW2lUV7b0h6aSf/hNQ++DRRkZr0dk9FfppKUUjvlCTaiKPogau4ebO2ibQGLcT3H3r+AGoV9w/WJS/rOtU6aUtSMETf7Ogz2/zmOYvEhcwEl94U0ngf+LMB54eEiD2CNMb9BnI/7FpVUzYSnqm3TYpoQ2Pow4wAkqoCGDsI/AxG8XBGpWAVKAiAopBPDUCRQBAjo6BY+KQOMALvMZKjFS4Vfl4Fg4lon1bVUsMrrPVVDjkBabGxFC8z8VOApUYSFq78cwOAofGhC287dwPAh2kgWfM5le4RvAVZ1BRtB4ZIx2FnKmBFVJZH4HK+QMA9dSFNajUmPWklpWWrM40LJvirQbyvhYEiENhDWp47KEdRAMHpKE1yi5X5597K0sn27KN/qvUSQoA8LoXFEmtQlr4S9B/33lxEdAASHlEX2UAeAA4ssEU2vuBUGoQ8AH5RgBeoJnEUXsdSdA+bGRABaOkQPux+QIFlPGaCvygNwFR9kk++2AAKoMAGyQaAdBBGYnYdpAE7c1GBlxwnBRof2O+wAbmfqOCYGgx0AMHqANVYLF9WAvEoBosXfPtN4EasAi0gXoYbtwECO2RlBVJXrMAdIKq72BEUmhZVZdHxPYGoBDUgQawBLSAqvmiX4nzCaQ4oZgJG6irzI6f+HW8GKiBCkQBQPL8KKlVUalVk2jLYdH2mh1Sow0gGqRZzwKZDkmztRHGHDCh2VKbi36K9nCzmTNrROtUAJDgF3Z0NkQvXlyP/4wXPYQUvoHLw48B0Jj/TDuIB5F1u/qcharGSqtOZyzrpRFvdgEn6zJ8v8IQJeSfmAkQASJCJIgMUQ6C0nTDtGzH9bCw+fHHwYVABQjEwycgJCImISUTRC5YiFBhwikoRVCJFEUtmoZWjFhxMLh4CRIlSZYiFQAEgSFQGByBRKExWByeQCSRKVQanREAYrLYHC6PLxCKxBKpTK5QqtQarU5vMJrMFqvN7nC63B6vDwyBwuAIJAqNweLwBCKJTKHS6Awmi83h8vh5BgiEIrFEKpMrlKH7KkCt0er0BqPJbLHa7A6nyx2pC16fH4RgBMVwgqRohuV4fIFQJJZIZXKFUqXWaHV6g9FktlhtdofT5fZ4fX5AmFDGhVTaWEc6nywp93pjEF+esQ5zxc211BcU3l3bQP0GBbiXA9hus8PXPfpPvt/1UsJdwi78Tl+EZZdHSF5LWXfn9UtrpVXKz2s+r7YVnrwW8xpbb/wSFqSXK3Awx+QOKc7r3/lPJEr2Xmii9t5G2ae8M5IO04xIJQS/w45A+N84Fmmz9Li+XGsjTIsTub6fYtt9Yd4B26Qg/FWuYgAVVm1RGrZ2ghFOaM1HqG2ggDkAC3MgM7ZetybkcL+0Cv0LF9pmXtvKwDhNZU2FU60zdQ9z4TAbDQU4ge+Rw8WPrfMcmIbDVGsmnKbfXJLmYNMEB/eEiSOLwk23fQ05jLl4WY8Qray1Y/ntYG3ghSDGJtwJ78gyzMmCp2SCaIGUy4JVGKArttX27ahK8aupMlJooOHQIghimWEaG5WV/Co50Ja/kzCKBd2c1FxDSZBx6Bj1ELT4kDQUniGjmaczG2uPwk5g/khBQNZ+6cjQ92gO0xsqhbAEye+WcWLzFHc3KJPD1LXtYoG+KxgXLLjZTXwYOHp+h8XYhvQ4/cStuUeokLUtnMaiTazAWuS0DBUycA78yWCYoGR4ZZP2KIREy1oXHgicFMhx7Jgt3Hu9f73MZ5sLnTPXKknmT5aiwwTjEU7Vx6394kwYKFZZo99aJA6SnBTIQZcJgG2iOYEsA/LgjmzKES2ZorolhWDN4CQuJuRsFswnDcUAAZi2TRY7JPXJAYgZ+rwVJO3T4yAk0pyCAGwjaFvwZo0PWAJpnAVMR/IKkLFD3rrE4CXkkh7ZdmWq3JjRmQOLM4eFIcU3V4kDVT6REKckYXPGANSPBMWlNOQYjkIawhCXnuM5prZCQwfdXgqfZidhGfJpYOqTA/Y0500ZB4LQReO8YZ6mjq2e6QIdzdGLzR8ziEWSLVQd2NoiYGkRGaMXLCt0oq7fOWoCTc11KgkMttjj0jFJ6zIc7BafifCk0pZOhSbraAopcEpG4/kOwyNmF39Mt5ppTW7jRoB8WgPkOc51rC8oKZl62iKAamlu4DmuBkvCcCtjwcMLAlVzR32t10CwTyM6AbagGllb48gU5ACDzUmBCyJqxlxs8U4XAyTcTtjWMNGdH9GuwTBmjyI3YJFEgrovcQDR5kFZ0NMkmgTDZclc183uTcoBDNAaimIE2Cwu9OXklBGRkNvItMU7zXTlX5Zz/V8YIO2iK//xMnpu22WBNXRyG9vGQuJ0mGsc26/Aag5YQelZZs5Bi2ubsxHV/DzGXRt3P3KTOvQ4HG8aKpm9OyoHnIgzG/GkIEerHqEBaYCQ8UJPWbg8/vNFDyFvqkhIe6O6l0WordG9pHAAyyTWbhCGHCtBD7vDjzljqRT4+8E2POgLpACHDw+E5jqrtyanHw0AAA==) format("woff2"),url(//at.alicdn.com/t/c/font_2553510_ciljc7axaw7.woff?t=1705587463221) format("woff")}.van-icon__image{display:block;width:1em;height:1em;-o-object-fit:contain;object-fit:contain}:root,:host{--van-skeleton-image-size: 96px;--van-skeleton-image-radius: 24px}.van-skeleton-image{display:flex;width:var(--van-skeleton-image-size);height:var(--van-skeleton-image-size);align-items:center;justify-content:center;background:var(--van-active-color)}.van-skeleton-image--round{border-radius:var(--van-skeleton-image-radius)}.van-skeleton-image__icon{width:calc(var(--van-skeleton-image-size) / 2);height:calc(var(--van-skeleton-image-size) / 2);font-size:calc(var(--van-skeleton-image-size) / 2);color:var(--van-gray-5)}:root,:host{--van-rate-icon-size: 20px;--van-rate-icon-gutter: var(--van-padding-base);--van-rate-icon-void-color: var(--van-gray-5);--van-rate-icon-full-color: var(--van-danger-color);--van-rate-icon-disabled-color: var(--van-gray-5)}.van-rate{display:inline-flex;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-wrap:wrap}.van-rate__item{position:relative}.van-rate__item:not(:last-child){padding-right:var(--van-rate-icon-gutter)}.van-rate__icon{display:block;width:1em;color:var(--van-rate-icon-void-color);font-size:var(--van-rate-icon-size)}.van-rate__icon--half{position:absolute;top:0;left:0;overflow:hidden;pointer-events:none}.van-rate__icon--full{color:var(--van-rate-icon-full-color)}.van-rate__icon--disabled{color:var(--van-rate-icon-disabled-color)}.van-rate--disabled{cursor:not-allowed}.van-rate--readonly{cursor:default}:root,:host{--van-notice-bar-height: 40px;--van-notice-bar-padding: 0 var(--van-padding-md);--van-notice-bar-wrapable-padding: var(--van-padding-xs) var(--van-padding-md);--van-notice-bar-text-color: var(--van-orange-dark);--van-notice-bar-font-size: var(--van-font-size-md);--van-notice-bar-line-height: 24px;--van-notice-bar-background: var(--van-orange-light);--van-notice-bar-icon-size: 16px;--van-notice-bar-icon-min-width: 24px}.van-notice-bar{position:relative;display:flex;align-items:center;height:var(--van-notice-bar-height);padding:var(--van-notice-bar-padding);color:var(--van-notice-bar-text-color);font-size:var(--van-notice-bar-font-size);line-height:var(--van-notice-bar-line-height);background:var(--van-notice-bar-background)}.van-notice-bar__left-icon,.van-notice-bar__right-icon{min-width:var(--van-notice-bar-icon-min-width);font-size:var(--van-notice-bar-icon-size)}.van-notice-bar__right-icon{text-align:right;cursor:pointer}.van-notice-bar__wrap{position:relative;display:flex;flex:1;align-items:center;height:100%;overflow:hidden}.van-notice-bar__content{position:absolute;white-space:nowrap;transition-timing-function:linear}.van-notice-bar__content.van-ellipsis{max-width:100%}.van-notice-bar--wrapable{height:auto;padding:var(--van-notice-bar-wrapable-padding)}.van-notice-bar--wrapable .van-notice-bar__wrap{height:auto}.van-notice-bar--wrapable .van-notice-bar__content{position:relative;white-space:normal;word-wrap:break-word}:root,:host{--van-nav-bar-height: 46px;--van-nav-bar-background: var(--van-background-2);--van-nav-bar-arrow-size: 16px;--van-nav-bar-icon-color: var(--van-primary-color);--van-nav-bar-text-color: var(--van-primary-color);--van-nav-bar-title-font-size: var(--van-font-size-lg);--van-nav-bar-title-text-color: var(--van-text-color);--van-nav-bar-z-index: 1;--van-nav-bar-disabled-opacity: var(--van-disabled-opacity)}.van-nav-bar{position:relative;z-index:var(--van-nav-bar-z-index);line-height:var(--van-line-height-lg);text-align:center;background:var(--van-nav-bar-background);-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-nav-bar--fixed{position:fixed;top:0;left:0;width:100%}.van-nav-bar--safe-area-inset-top{padding-top:constant(safe-area-inset-top);padding-top:env(safe-area-inset-top)}.van-nav-bar .van-icon{color:var(--van-nav-bar-icon-color)}.van-nav-bar__content{position:relative;display:flex;align-items:center;height:var(--van-nav-bar-height)}.van-nav-bar__arrow{margin-right:var(--van-padding-base);font-size:var(--van-nav-bar-arrow-size)}.van-nav-bar__title{max-width:60%;margin:0 auto;color:var(--van-nav-bar-title-text-color);font-weight:var(--van-font-bold);font-size:var(--van-nav-bar-title-font-size)}.van-nav-bar__left,.van-nav-bar__right{position:absolute;top:0;bottom:0;display:flex;align-items:center;padding:0 var(--van-padding-md);font-size:var(--van-font-size-md)}.van-nav-bar__left--disabled,.van-nav-bar__right--disabled{cursor:not-allowed;opacity:var(--van-nav-bar-disabled-opacity)}.van-nav-bar__left{left:0}.van-nav-bar__right{right:0}.van-nav-bar__text{color:var(--van-nav-bar-text-color)}:root,:host{--van-floating-bubble-size: 48px;--van-floating-bubble-initial-gap: 24px;--van-floating-bubble-icon-size: 28px;--van-floating-bubble-background: var(--van-primary-color);--van-floating-bubble-color: var(--van-background-2);--van-floating-bubble-z-index: 999;--van-floating-bubble-border-radius: var(--van-radius-max)}.van-floating-bubble{position:fixed;left:0;top:0;right:var(--van-floating-bubble-initial-gap);bottom:var(--van-floating-bubble-initial-gap);width:var(--van-floating-bubble-size);height:var(--van-floating-bubble-size);box-sizing:border-box;display:flex;justify-content:center;align-items:center;overflow:hidden;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;touch-action:none;background:var(--van-floating-bubble-background);color:var(--van-floating-bubble-color);border-radius:var(--van-floating-bubble-border-radius);z-index:var(--van-floating-bubble-z-index);transition:transform var(--van-duration-base)}.van-floating-bubble:active{opacity:.8}.van-floating-bubble__icon{font-size:var(--van-floating-bubble-icon-size)}:root,:host{--van-image-placeholder-text-color: var(--van-text-color-2);--van-image-placeholder-font-size: var(--van-font-size-md);--van-image-placeholder-background: var(--van-background);--van-image-loading-icon-size: 32px;--van-image-loading-icon-color: var(--van-gray-4);--van-image-error-icon-size: 32px;--van-image-error-icon-color: var(--van-gray-4)}.van-image{position:relative;display:inline-block}.van-image--round{overflow:hidden;border-radius:var(--van-radius-max)}.van-image--round .van-image__img{border-radius:inherit}.van-image--block{display:block}.van-image__img,.van-image__error,.van-image__loading{display:block;width:100%;height:100%}.van-image__error,.van-image__loading{position:absolute;top:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--van-image-placeholder-text-color);font-size:var(--van-image-placeholder-font-size);background:var(--van-image-placeholder-background)}.van-image__loading-icon{color:var(--van-image-loading-icon-color);font-size:var(--van-image-loading-icon-size)}.van-image__error-icon{color:var(--van-image-error-icon-color);font-size:var(--van-image-error-icon-size)}:root,:host{--van-back-top-size: 40px;--van-back-top-right: 30px;--van-back-top-bottom: 40px;--van-back-top-z-index: 100;--van-back-top-icon-size: 20px;--van-back-top-text-color: #fff;--van-back-top-background: var(--van-blue)}.van-back-top{position:fixed;display:flex;align-items:center;justify-content:center;width:var(--van-back-top-size);height:var(--van-back-top-size);right:var(--van-back-top-right);bottom:var(--van-back-top-bottom);z-index:var(--van-back-top-z-index);cursor:pointer;color:var(--van-back-top-text-color);border-radius:var(--van-radius-max);box-shadow:0 2px 8px #0000001f;transform:scale(0);transition:var(--van-duration-base) cubic-bezier(.25,.8,.5,1);background-color:var(--van-back-top-background)}.van-back-top:active{opacity:var(--van-active-opacity)}.van-back-top__placeholder{display:none}.van-back-top--active{transform:scale(1)}.van-back-top__icon{font-size:var(--van-back-top-icon-size);font-weight:var(--van-font-bold)}:root,:host{--van-tag-padding: 0 var(--van-padding-base);--van-tag-text-color: var(--van-white);--van-tag-font-size: var(--van-font-size-sm);--van-tag-radius: 2px;--van-tag-line-height: 16px;--van-tag-medium-padding: 2px 6px;--van-tag-large-padding: var(--van-padding-base) var(--van-padding-xs);--van-tag-large-radius: var(--van-radius-md);--van-tag-large-font-size: var(--van-font-size-md);--van-tag-round-radius: var(--van-radius-max);--van-tag-danger-color: var(--van-danger-color);--van-tag-primary-color: var(--van-primary-color);--van-tag-success-color: var(--van-success-color);--van-tag-warning-color: var(--van-warning-color);--van-tag-default-color: var(--van-gray-6);--van-tag-plain-background: var(--van-background-2)}.van-tag{position:relative;display:inline-flex;align-items:center;padding:var(--van-tag-padding);color:var(--van-tag-text-color);font-size:var(--van-tag-font-size);line-height:var(--van-tag-line-height);border-radius:var(--van-tag-radius)}.van-tag--default{background:var(--van-tag-default-color)}.van-tag--default.van-tag--plain{color:var(--van-tag-default-color)}.van-tag--danger{background:var(--van-tag-danger-color)}.van-tag--danger.van-tag--plain{color:var(--van-tag-danger-color)}.van-tag--primary{background:var(--van-tag-primary-color)}.van-tag--primary.van-tag--plain{color:var(--van-tag-primary-color)}.van-tag--success{background:var(--van-tag-success-color)}.van-tag--success.van-tag--plain{color:var(--van-tag-success-color)}.van-tag--warning{background:var(--van-tag-warning-color)}.van-tag--warning.van-tag--plain{color:var(--van-tag-warning-color)}.van-tag--plain{background:var(--van-tag-plain-background);border-color:currentColor}.van-tag--plain:before{position:absolute;top:0;right:0;bottom:0;left:0;border:1px solid;border-color:inherit;border-radius:inherit;content:"";pointer-events:none}.van-tag--medium{padding:var(--van-tag-medium-padding)}.van-tag--large{padding:var(--van-tag-large-padding);font-size:var(--van-tag-large-font-size);border-radius:var(--van-tag-large-radius)}.van-tag--mark{border-radius:0 var(--van-tag-round-radius) var(--van-tag-round-radius) 0}.van-tag--mark:after{display:block;width:2px;content:""}.van-tag--round{border-radius:var(--van-tag-round-radius)}.van-tag__close{margin-left:2px}:root,:host{--van-card-padding: var(--van-padding-xs) var(--van-padding-md);--van-card-font-size: var(--van-font-size-sm);--van-card-text-color: var(--van-text-color);--van-card-background: var(--van-background);--van-card-thumb-size: 88px;--van-card-thumb-radius: var(--van-radius-lg);--van-card-title-line-height: 16px;--van-card-desc-color: var(--van-text-color-2);--van-card-desc-line-height: var(--van-line-height-md);--van-card-price-color: var(--van-text-color);--van-card-origin-price-color: var(--van-text-color-2);--van-card-num-color: var(--van-text-color-2);--van-card-origin-price-font-size: var(--van-font-size-xs);--van-card-price-font-size: var(--van-font-size-sm);--van-card-price-integer-font-size: var(--van-font-size-lg);--van-card-price-font: var(--van-price-font)}.van-card{position:relative;box-sizing:border-box;padding:var(--van-card-padding);color:var(--van-card-text-color);font-size:var(--van-card-font-size);background:var(--van-card-background)}.van-card:not(:first-child){margin-top:var(--van-padding-xs)}.van-card__header{display:flex}.van-card__thumb{position:relative;flex:none;width:var(--van-card-thumb-size);height:var(--van-card-thumb-size);margin-right:var(--van-padding-xs)}.van-card__thumb img{border-radius:var(--van-card-thumb-radius)}.van-card__content{position:relative;display:flex;flex:1;flex-direction:column;justify-content:space-between;min-width:0;min-height:var(--van-card-thumb-size)}.van-card__content--centered{justify-content:center}.van-card__title,.van-card__desc{word-wrap:break-word}.van-card__title{max-height:32px;font-weight:var(--van-font-bold);line-height:var(--van-card-title-line-height)}.van-card__desc{max-height:var(--van-card-desc-line-height);color:var(--van-card-desc-color);line-height:var(--van-card-desc-line-height)}.van-card__bottom{line-height:var(--van-line-height-md)}.van-card__price{display:inline-block;color:var(--van-card-price-color);font-weight:var(--van-font-bold);font-size:var(--van-card-price-font-size)}.van-card__price-integer{font-size:var(--van-card-price-integer-font-size);font-family:var(--van-card-price-font)}.van-card__price-decimal{font-family:var(--van-card-price-font)}.van-card__origin-price{display:inline-block;margin-left:5px;color:var(--van-card-origin-price-color);font-size:var(--van-card-origin-price-font-size);text-decoration:line-through}.van-card__num{float:right;color:var(--van-card-num-color)}.van-card__tag{position:absolute;top:2px;left:0}.van-card__footer{flex:none;text-align:right}.van-card__footer .van-button{margin-left:5px}:root,:host{--van-cell-font-size: var(--van-font-size-md);--van-cell-line-height: 24px;--van-cell-vertical-padding: 10px;--van-cell-horizontal-padding: var(--van-padding-md);--van-cell-text-color: var(--van-text-color);--van-cell-background: var(--van-background-2);--van-cell-border-color: var(--van-border-color);--van-cell-active-color: var(--van-active-color);--van-cell-required-color: var(--van-danger-color);--van-cell-label-color: var(--van-text-color-2);--van-cell-label-font-size: var(--van-font-size-sm);--van-cell-label-line-height: var(--van-line-height-sm);--van-cell-label-margin-top: var(--van-padding-base);--van-cell-value-color: var(--van-text-color-2);--van-cell-value-font-size: inherit;--van-cell-icon-size: 16px;--van-cell-right-icon-color: var(--van-gray-6);--van-cell-large-vertical-padding: var(--van-padding-sm);--van-cell-large-title-font-size: var(--van-font-size-lg);--van-cell-large-label-font-size: var(--van-font-size-md);--van-cell-large-value-font-size: inherit}.van-cell{position:relative;display:flex;box-sizing:border-box;width:100%;padding:var(--van-cell-vertical-padding) var(--van-cell-horizontal-padding);overflow:hidden;color:var(--van-cell-text-color);font-size:var(--van-cell-font-size);line-height:var(--van-cell-line-height);background:var(--van-cell-background)}.van-cell:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:var(--van-padding-md);bottom:0;left:var(--van-padding-md);border-bottom:1px solid var(--van-cell-border-color);transform:scaleY(.5)}.van-cell:last-child:after,.van-cell--borderless:after{display:none}.van-cell__label{margin-top:var(--van-cell-label-margin-top);color:var(--van-cell-label-color);font-size:var(--van-cell-label-font-size);line-height:var(--van-cell-label-line-height)}.van-cell__title,.van-cell__value{flex:1}.van-cell__value{position:relative;overflow:hidden;color:var(--van-cell-value-color);font-size:var(--van-cell-value-font-size);text-align:right;vertical-align:middle;word-wrap:break-word}.van-cell__left-icon,.van-cell__right-icon{height:var(--van-cell-line-height);font-size:var(--van-cell-icon-size);line-height:var(--van-cell-line-height)}.van-cell__left-icon{margin-right:var(--van-padding-base)}.van-cell__right-icon{margin-left:var(--van-padding-base);color:var(--van-cell-right-icon-color)}.van-cell--clickable{cursor:pointer}.van-cell--clickable:active{background-color:var(--van-cell-active-color)}.van-cell--required{overflow:visible}.van-cell--required:before{position:absolute;left:var(--van-padding-xs);color:var(--van-cell-required-color);font-size:var(--van-cell-font-size);content:"*"}.van-cell--center{align-items:center}.van-cell--large{padding-top:var(--van-cell-large-vertical-padding);padding-bottom:var(--van-cell-large-vertical-padding)}.van-cell--large .van-cell__title{font-size:var(--van-cell-large-title-font-size)}.van-cell--large .van-cell__label{font-size:var(--van-cell-large-label-font-size)}.van-cell--large .van-cell__value{font-size:var(--van-cell-large-value-font-size)}:root,:host{--van-coupon-cell-selected-text-color: var(--van-text-color)}.van-coupon-cell__value--selected{color:var(--van-coupon-cell-selected-text-color)}:root,:host{--van-contact-card-padding: var(--van-padding-md);--van-contact-card-add-icon-size: 40px;--van-contact-card-add-icon-color: var(--van-primary-color);--van-contact-card-title-line-height: var(--van-line-height-md)}.van-contact-card{padding:var(--van-contact-card-padding)}.van-contact-card__title{margin-left:5px;line-height:var(--van-contact-card-title-line-height)}.van-contact-card--add .van-contact-card__value{line-height:var(--van-contact-card-add-icon-size)}.van-contact-card--add .van-cell__left-icon{color:var(--van-contact-card-add-icon-color);font-size:var(--van-contact-card-add-icon-size)}.van-contact-card:before{position:absolute;right:0;bottom:0;left:0;height:2px;background:repeating-linear-gradient(-45deg,var(--van-warning-color) 0,var(--van-warning-color) 20%,transparent 0,transparent 25%,var(--van-primary-color) 0,var(--van-primary-color) 45%,transparent 0,transparent 50%);background-size:80px;content:""}:root,:host{--van-collapse-item-duration: var(--van-duration-base);--van-collapse-item-content-padding: var(--van-padding-sm) var(--van-padding-md);--van-collapse-item-content-font-size: var(--van-font-size-md);--van-collapse-item-content-line-height: 1.5;--van-collapse-item-content-text-color: var(--van-text-color-2);--van-collapse-item-content-background: var(--van-background-2);--van-collapse-item-title-disabled-color: var(--van-text-color-3)}.van-collapse-item{position:relative}.van-collapse-item--border:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:0;right:var(--van-padding-md);left:var(--van-padding-md);border-top:1px solid var(--van-border-color);transform:scaleY(.5)}.van-collapse-item__title .van-cell__right-icon:before{transform:rotate(90deg) translateZ(0);transition:transform var(--van-collapse-item-duration)}.van-collapse-item__title:after{right:var(--van-padding-md);display:none}.van-collapse-item__title--expanded .van-cell__right-icon:before{transform:rotate(-90deg)}.van-collapse-item__title--expanded:after{display:block}.van-collapse-item__title--borderless:after{display:none}.van-collapse-item__title--disabled{cursor:not-allowed}.van-collapse-item__title--disabled,.van-collapse-item__title--disabled .van-cell__right-icon{color:var(--van-collapse-item-title-disabled-color)}.van-collapse-item__wrapper{overflow:hidden;transition:height var(--van-collapse-item-duration) ease-in-out;will-change:height}.van-collapse-item__content{padding:var(--van-collapse-item-content-padding);color:var(--van-collapse-item-content-text-color);font-size:var(--van-collapse-item-content-font-size);line-height:var(--van-collapse-item-content-line-height);background:var(--van-collapse-item-content-background)}:root,:host{--van-field-label-width: 6.2em;--van-field-label-color: var(--van-text-color);--van-field-label-margin-right: var(--van-padding-sm);--van-field-input-text-color: var(--van-text-color);--van-field-input-error-text-color: var(--van-danger-color);--van-field-input-disabled-text-color: var(--van-text-color-3);--van-field-placeholder-text-color: var(--van-text-color-3);--van-field-icon-size: 18px;--van-field-clear-icon-size: 18px;--van-field-clear-icon-color: var(--van-gray-5);--van-field-right-icon-color: var(--van-gray-6);--van-field-error-message-color: var(--van-danger-color);--van-field-error-message-font-size: 12px;--van-field-text-area-min-height: 60px;--van-field-word-limit-color: var(--van-gray-7);--van-field-word-limit-font-size: var(--van-font-size-sm);--van-field-word-limit-line-height: 16px;--van-field-disabled-text-color: var(--van-text-color-3);--van-field-required-mark-color: var(--van-red)}.van-field{flex-wrap:wrap}.van-field__label{flex:none;box-sizing:border-box;width:var(--van-field-label-width);margin-right:var(--van-field-label-margin-right);color:var(--van-field-label-color);text-align:left;word-wrap:break-word}.van-field__label--center{text-align:center}.van-field__label--right{text-align:right}.van-field__label--top{display:flex;width:100%;text-align:left;margin-bottom:var(--van-padding-base);overflow-wrap:break-word}.van-field__label--required:before{margin-right:2px;color:var(--van-field-required-mark-color);content:"*"}.van-field--disabled .van-field__label{color:var(--van-field-disabled-text-color)}.van-field__value{overflow:visible}.van-field__body{display:flex;align-items:center}.van-field__control{display:block;box-sizing:border-box;width:100%;min-width:0;margin:0;padding:0;color:var(--van-field-input-text-color);line-height:inherit;text-align:left;background-color:transparent;border:0;resize:none;-webkit-user-select:auto;-moz-user-select:auto;user-select:auto}.van-field__control::-moz-placeholder{color:var(--van-field-placeholder-text-color)}.van-field__control::placeholder{color:var(--van-field-placeholder-text-color)}.van-field__control:-moz-read-only{cursor:default}.van-field__control:read-only{cursor:default}.van-field__control:disabled{color:var(--van-field-input-disabled-text-color);cursor:not-allowed;opacity:1;-webkit-text-fill-color:var(--van-field-input-disabled-text-color)}.van-field__control--center{justify-content:center;text-align:center}.van-field__control--right{justify-content:flex-end;text-align:right}.van-field__control--custom{display:flex;align-items:center;min-height:var(--van-cell-line-height)}.van-field__control--error::-moz-placeholder{color:var(--van-field-input-error-text-color);-webkit-text-fill-color:currentColor}.van-field__control--error,.van-field__control--error::placeholder{color:var(--van-field-input-error-text-color);-webkit-text-fill-color:currentColor}.van-field__control--min-height{min-height:var(--van-field-text-area-min-height)}.van-field__control[type=date],.van-field__control[type=time],.van-field__control[type=datetime-local]{min-height:var(--van-cell-line-height)}.van-field__control[type=search]{-webkit-appearance:none}.van-field__clear,.van-field__icon,.van-field__button,.van-field__right-icon{flex-shrink:0}.van-field__clear,.van-field__right-icon{margin-right:calc(var(--van-padding-xs) * -1);padding:0 var(--van-padding-xs);line-height:inherit}.van-field__clear{color:var(--van-field-clear-icon-color);font-size:var(--van-field-clear-icon-size);cursor:pointer}.van-field__left-icon .van-icon,.van-field__right-icon .van-icon{display:block;font-size:var(--van-field-icon-size);line-height:inherit}.van-field__left-icon{margin-right:var(--van-padding-base)}.van-field__right-icon{color:var(--van-field-right-icon-color)}.van-field__button{padding-left:var(--van-padding-xs)}.van-field__error-message{color:var(--van-field-error-message-color);font-size:var(--van-field-error-message-font-size);text-align:left}.van-field__error-message--center{text-align:center}.van-field__error-message--right{text-align:right}.van-field__word-limit{margin-top:var(--van-padding-base);color:var(--van-field-word-limit-color);font-size:var(--van-field-word-limit-font-size);line-height:var(--van-field-word-limit-line-height);text-align:right}:root,:host{--van-search-padding: 10px var(--van-padding-sm);--van-search-background: var(--van-background-2);--van-search-content-background: var(--van-background);--van-search-input-height: 34px;--van-search-label-padding: 0 5px;--van-search-label-color: var(--van-text-color);--van-search-label-font-size: var(--van-font-size-md);--van-search-left-icon-color: var(--van-gray-6);--van-search-action-padding: 0 var(--van-padding-xs);--van-search-action-text-color: var(--van-text-color);--van-search-action-font-size: var(--van-font-size-md)}.van-search{display:flex;align-items:center;box-sizing:border-box;padding:var(--van-search-padding);background:var(--van-search-background)}.van-search__content{display:flex;flex:1;padding-left:var(--van-padding-sm);background:var(--van-search-content-background);border-radius:var(--van-radius-sm)}.van-search__content--round{border-radius:var(--van-radius-max)}.van-search__label{padding:var(--van-search-label-padding);color:var(--van-search-label-color);font-size:var(--van-search-label-font-size);line-height:var(--van-search-input-height)}.van-search__field{flex:1;align-items:center;padding:0 var(--van-padding-xs) 0 0;height:var(--van-search-input-height);background-color:transparent}.van-search__field .van-field__left-icon{color:var(--van-search-left-icon-color)}.van-search__field--with-message{height:auto;align-items:flex-start;padding-top:5px;padding-bottom:5px}.van-search--show-action{padding-right:0}.van-search input::-webkit-search-decoration,.van-search input::-webkit-search-cancel-button,.van-search input::-webkit-search-results-button,.van-search input::-webkit-search-results-decoration{display:none}.van-search__action{padding:var(--van-search-action-padding);color:var(--van-search-action-text-color);font-size:var(--van-search-action-font-size);line-height:var(--van-search-input-height);cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-search__action:active{background-color:var(--van-active-color)}:root,:host{--van-action-bar-icon-width: 48px;--van-action-bar-icon-height: 100%;--van-action-bar-icon-color: var(--van-text-color);--van-action-bar-icon-size: 18px;--van-action-bar-icon-font-size: var(--van-font-size-xs);--van-action-bar-icon-active-color: var(--van-active-color);--van-action-bar-icon-text-color: var(--van-text-color);--van-action-bar-icon-background: var(--van-background-2)}.van-action-bar-icon{display:flex;flex-direction:column;justify-content:center;min-width:var(--van-action-bar-icon-width);height:var(--van-action-bar-icon-height);color:var(--van-action-bar-icon-text-color);font-size:var(--van-action-bar-icon-font-size);line-height:1;text-align:center;background:var(--van-action-bar-icon-background);cursor:pointer}.van-action-bar-icon:active{background-color:var(--van-action-bar-icon-active-color)}.van-action-bar-icon--disabled{color:var(--van-text-color-3);cursor:not-allowed}.van-action-bar-icon--disabled:active{background-color:transparent}.van-action-bar-icon--disabled .van-action-bar-icon__icon{color:var(--van-text-color-3)}.van-action-bar-icon__icon{margin:0 auto var(--van-padding-base);color:var(--van-action-bar-icon-color);font-size:var(--van-action-bar-icon-size)}:root,:host{--van-loading-text-color: var(--van-text-color-2);--van-loading-text-font-size: var(--van-font-size-md);--van-loading-spinner-color: var(--van-gray-5);--van-loading-spinner-size: 30px;--van-loading-spinner-duration: .8s}.van-loading{position:relative;color:var(--van-loading-spinner-color);font-size:0;vertical-align:middle}.van-loading__spinner{position:relative;display:inline-block;width:var(--van-loading-spinner-size);max-width:100%;height:var(--van-loading-spinner-size);max-height:100%;vertical-align:middle;animation:van-rotate var(--van-loading-spinner-duration) linear infinite}.van-loading__spinner--spinner{animation-timing-function:steps(12)}.van-loading__spinner--circular{animation-duration:2s}.van-loading__line{position:absolute;top:0;left:0;width:100%;height:100%}.van-loading__line:before{display:block;width:2px;height:25%;margin:0 auto;background-color:currentColor;border-radius:40%;content:" "}.van-loading__circular{display:block;width:100%;height:100%}.van-loading__circular circle{animation:van-circular 1.5s ease-in-out infinite;stroke:currentColor;stroke-width:3;stroke-linecap:round}.van-loading__text{display:inline-block;margin-left:var(--van-padding-xs);color:var(--van-loading-text-color);font-size:var(--van-loading-text-font-size);vertical-align:middle}.van-loading--vertical{display:flex;flex-direction:column;align-items:center}.van-loading--vertical .van-loading__text{margin:var(--van-padding-xs) 0 0}@keyframes van-circular{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:90,150;stroke-dashoffset:-40}to{stroke-dasharray:90,150;stroke-dashoffset:-120}}.van-loading__line--1{transform:rotate(30deg);opacity:1}.van-loading__line--2{transform:rotate(60deg);opacity:.9375}.van-loading__line--3{transform:rotate(90deg);opacity:.875}.van-loading__line--4{transform:rotate(120deg);opacity:.8125}.van-loading__line--5{transform:rotate(150deg);opacity:.75}.van-loading__line--6{transform:rotate(180deg);opacity:.6875}.van-loading__line--7{transform:rotate(210deg);opacity:.625}.van-loading__line--8{transform:rotate(240deg);opacity:.5625}.van-loading__line--9{transform:rotate(270deg);opacity:.5}.van-loading__line--10{transform:rotate(300deg);opacity:.4375}.van-loading__line--11{transform:rotate(330deg);opacity:.375}.van-loading__line--12{transform:rotate(360deg);opacity:.3125}:root,:host{--van-pull-refresh-head-height: 50px;--van-pull-refresh-head-font-size: var(--van-font-size-md);--van-pull-refresh-head-text-color: var(--van-text-color-2);--van-pull-refresh-loading-icon-size: 16px}.van-pull-refresh{overflow:hidden}.van-pull-refresh__track{position:relative;height:100%;transition-property:transform}.van-pull-refresh__head{position:absolute;left:0;width:100%;height:var(--van-pull-refresh-head-height);overflow:hidden;color:var(--van-pull-refresh-head-text-color);font-size:var(--van-pull-refresh-head-font-size);line-height:var(--van-pull-refresh-head-height);text-align:center;transform:translateY(-100%)}.van-pull-refresh__loading .van-loading__spinner{width:var(--van-pull-refresh-loading-icon-size);height:var(--van-pull-refresh-loading-icon-size)}:root,:host{--van-number-keyboard-background: var(--van-gray-2);--van-number-keyboard-key-height: 48px;--van-number-keyboard-key-font-size: 28px;--van-number-keyboard-key-active-color: var(--van-gray-3);--van-number-keyboard-key-background: var(--van-background-2);--van-number-keyboard-delete-font-size: var(--van-font-size-lg);--van-number-keyboard-title-color: var(--van-gray-7);--van-number-keyboard-title-height: 34px;--van-number-keyboard-title-font-size: var(--van-font-size-lg);--van-number-keyboard-close-padding: 0 var(--van-padding-md);--van-number-keyboard-close-color: var(--van-primary-color);--van-number-keyboard-close-font-size: var(--van-font-size-md);--van-number-keyboard-button-text-color: var(--van-white);--van-number-keyboard-button-background: var(--van-primary-color);--van-number-keyboard-z-index: 100}.van-theme-dark{--van-number-keyboard-background: var(--van-gray-8);--van-number-keyboard-key-background: var(--van-gray-7);--van-number-keyboard-key-active-color: var(--van-gray-6)}.van-number-keyboard{position:fixed;bottom:0;left:0;z-index:var(--van-number-keyboard-z-index);width:100%;padding-bottom:22px;background:var(--van-number-keyboard-background);-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-number-keyboard--with-title{border-radius:20px 20px 0 0}.van-number-keyboard__header{position:relative;display:flex;align-items:center;justify-content:center;box-sizing:content-box;height:var(--van-number-keyboard-title-height);padding-top:6px;color:var(--van-number-keyboard-title-color);font-size:var(--van-number-keyboard-title-font-size)}.van-number-keyboard__title{display:inline-block;font-weight:400}.van-number-keyboard__title-left{position:absolute;left:0}.van-number-keyboard__body{display:flex;padding:6px 0 0 6px}.van-number-keyboard__keys{display:flex;flex:3;flex-wrap:wrap}.van-number-keyboard__close{position:absolute;right:0;height:100%;padding:var(--van-number-keyboard-close-padding);color:var(--van-number-keyboard-close-color);font-size:var(--van-number-keyboard-close-font-size);background-color:transparent;border:none}.van-number-keyboard__sidebar{display:flex;flex:1;flex-direction:column}.van-number-keyboard--unfit{padding-bottom:0}.van-key{display:flex;align-items:center;justify-content:center;height:var(--van-number-keyboard-key-height);font-size:var(--van-number-keyboard-key-font-size);line-height:1.5;background:var(--van-number-keyboard-key-background);border-radius:var(--van-radius-lg);cursor:pointer}.van-key--large{position:absolute;top:0;right:6px;bottom:6px;left:0;height:auto}.van-key--blue,.van-key--delete{font-size:var(--van-number-keyboard-delete-font-size)}.van-key--active{background-color:var(--van-number-keyboard-key-active-color)}.van-key--blue{color:var(--van-number-keyboard-button-text-color);background:var(--van-number-keyboard-button-background)}.van-key--blue.van-key--active{opacity:var(--van-active-opacity)}.van-key__wrapper{position:relative;flex:1;flex-basis:33%;box-sizing:border-box;padding:0 6px 6px 0}.van-key__wrapper--wider{flex-basis:66%}.van-key__delete-icon{width:32px;height:22px}.van-key__collapse-icon{width:30px;height:24px}.van-key__loading-icon{color:var(--van-number-keyboard-button-text-color)}:root,:host{--van-list-text-color: var(--van-text-color-2);--van-list-text-font-size: var(--van-font-size-md);--van-list-text-line-height: 50px;--van-list-loading-icon-size: 16px}.van-list__loading,.van-list__finished-text,.van-list__error-text{color:var(--van-list-text-color);font-size:var(--van-list-text-font-size);line-height:var(--van-list-text-line-height);text-align:center}.van-list__placeholder{height:0;pointer-events:none}.van-list__loading-icon .van-loading__spinner{width:var(--van-list-loading-icon-size);height:var(--van-list-loading-icon-size)}:root,:host{--van-switch-size: 26px;--van-switch-width: calc(1.8em + 4px) ;--van-switch-height: calc(1em + 4px) ;--van-switch-node-size: 1em;--van-switch-node-background: var(--van-white);--van-switch-node-shadow: 0 3px 1px 0 rgba(0, 0, 0, .05);--van-switch-background: rgba(120, 120, 128, .16);--van-switch-on-background: var(--van-primary-color);--van-switch-duration: var(--van-duration-base);--van-switch-disabled-opacity: var(--van-disabled-opacity)}.van-theme-dark{--van-switch-background: rgba(120, 120, 128, .32)}.van-switch{position:relative;display:inline-block;box-sizing:content-box;width:var(--van-switch-width);height:var(--van-switch-height);font-size:var(--van-switch-size);background:var(--van-switch-background);border-radius:var(--van-switch-node-size);cursor:pointer;transition:background-color var(--van-switch-duration)}.van-switch__node{position:absolute;top:2px;left:2px;width:var(--van-switch-node-size);height:var(--van-switch-node-size);font-size:inherit;background:var(--van-switch-node-background);border-radius:100%;box-shadow:var(--van-switch-node-shadow);transition:transform var(--van-switch-duration) cubic-bezier(.3,1.05,.4,1.05)}.van-switch__loading{top:25%;left:25%;width:50%;height:50%;line-height:1}.van-switch--on{background:var(--van-switch-on-background)}.van-switch--on .van-switch__node{transform:translate(calc(var(--van-switch-width) - var(--van-switch-node-size) - 4px))}.van-switch--on .van-switch__loading{color:var(--van-switch-on-background)}.van-switch--disabled{cursor:not-allowed;opacity:var(--van-switch-disabled-opacity)}.van-switch--loading{cursor:default}:root,:host{--van-button-mini-height: 24px;--van-button-mini-padding: 0 var(--van-padding-base);--van-button-mini-font-size: var(--van-font-size-xs);--van-button-small-height: 32px;--van-button-small-padding: 0 var(--van-padding-xs);--van-button-small-font-size: var(--van-font-size-sm);--van-button-normal-padding: 0 15px;--van-button-normal-font-size: var(--van-font-size-md);--van-button-large-height: 50px;--van-button-default-height: 44px;--van-button-default-line-height: 1.2;--van-button-default-font-size: var(--van-font-size-lg);--van-button-default-color: var(--van-text-color);--van-button-default-background: var(--van-background-2);--van-button-default-border-color: var(--van-gray-4);--van-button-primary-color: var(--van-white);--van-button-primary-background: var(--van-primary-color);--van-button-primary-border-color: var(--van-primary-color);--van-button-success-color: var(--van-white);--van-button-success-background: var(--van-success-color);--van-button-success-border-color: var(--van-success-color);--van-button-danger-color: var(--van-white);--van-button-danger-background: var(--van-danger-color);--van-button-danger-border-color: var(--van-danger-color);--van-button-warning-color: var(--van-white);--van-button-warning-background: var(--van-warning-color);--van-button-warning-border-color: var(--van-warning-color);--van-button-border-width: var(--van-border-width);--van-button-radius: var(--van-radius-md);--van-button-round-radius: var(--van-radius-max);--van-button-plain-background: var(--van-white);--van-button-disabled-opacity: var(--van-disabled-opacity);--van-button-icon-size: 1.2em;--van-button-loading-icon-size: 20px}.van-theme-dark{--van-button-plain-background: transparent}.van-button{position:relative;display:inline-block;box-sizing:border-box;height:var(--van-button-default-height);margin:0;padding:0;font-size:var(--van-button-default-font-size);line-height:var(--van-button-default-line-height);text-align:center;border-radius:var(--van-button-radius);cursor:pointer;transition:opacity var(--van-duration-fast);-webkit-appearance:none;-webkit-font-smoothing:auto}.van-button:before{position:absolute;top:50%;left:50%;width:100%;height:100%;background:var(--van-black);border:inherit;border-color:var(--van-black);border-radius:inherit;transform:translate(-50%,-50%);opacity:0;content:" ";box-sizing:content-box}.van-button:active:before{opacity:.1}.van-button--loading:before,.van-button--disabled:before{display:none}.van-button--default{color:var(--van-button-default-color);background:var(--van-button-default-background);border:var(--van-button-border-width) solid var(--van-button-default-border-color)}.van-button--primary{color:var(--van-button-primary-color);background:var(--van-button-primary-background);border:var(--van-button-border-width) solid var(--van-button-primary-border-color)}.van-button--success{color:var(--van-button-success-color);background:var(--van-button-success-background);border:var(--van-button-border-width) solid var(--van-button-success-border-color)}.van-button--danger{color:var(--van-button-danger-color);background:var(--van-button-danger-background);border:var(--van-button-border-width) solid var(--van-button-danger-border-color)}.van-button--warning{color:var(--van-button-warning-color);background:var(--van-button-warning-background);border:var(--van-button-border-width) solid var(--van-button-warning-border-color)}.van-button--plain{background:var(--van-button-plain-background)}.van-button--plain.van-button--primary{color:var(--van-button-primary-background)}.van-button--plain.van-button--success{color:var(--van-button-success-background)}.van-button--plain.van-button--danger{color:var(--van-button-danger-background)}.van-button--plain.van-button--warning{color:var(--van-button-warning-background)}.van-button--large{width:100%;height:var(--van-button-large-height)}.van-button--normal{padding:var(--van-button-normal-padding);font-size:var(--van-button-normal-font-size)}.van-button--small{height:var(--van-button-small-height);padding:var(--van-button-small-padding);font-size:var(--van-button-small-font-size)}.van-button__loading{color:inherit;font-size:inherit}.van-button__loading .van-loading__spinner{color:currentColor;width:var(--van-button-loading-icon-size);height:var(--van-button-loading-icon-size)}.van-button--mini{height:var(--van-button-mini-height);padding:var(--van-button-mini-padding);font-size:var(--van-button-mini-font-size)}.van-button--mini+.van-button--mini{margin-left:var(--van-padding-base)}.van-button--block{display:block;width:100%}.van-button--disabled{cursor:not-allowed;opacity:var(--van-button-disabled-opacity)}.van-button--loading{cursor:default}.van-button--round{border-radius:var(--van-button-round-radius)}.van-button--square{border-radius:0}.van-button__content{display:flex;align-items:center;justify-content:center;height:100%}.van-button__content:before{content:" "}.van-button__icon{font-size:var(--van-button-icon-size);line-height:inherit}.van-button__icon+.van-button__text,.van-button__loading+.van-button__text,.van-button__text+.van-button__icon,.van-button__text+.van-button__loading{margin-left:var(--van-padding-base)}.van-button--hairline{border-width:0}.van-button--hairline:after{border-color:inherit;border-radius:calc(var(--van-button-radius) * 2)}.van-button--hairline.van-button--round:after{border-radius:var(--van-button-round-radius)}.van-button--hairline.van-button--square:after{border-radius:0}:root,:host{--van-submit-bar-height: 50px;--van-submit-bar-z-index: 100;--van-submit-bar-background: var(--van-background-2);--van-submit-bar-button-width: 110px;--van-submit-bar-price-color: var(--van-danger-color);--van-submit-bar-price-font-size: var(--van-font-size-sm);--van-submit-bar-price-integer-font-size: 20px;--van-submit-bar-price-font: var(--van-price-font);--van-submit-bar-text-color: var(--van-text-color);--van-submit-bar-text-font-size: var(--van-font-size-md);--van-submit-bar-tip-padding: var(--van-padding-xs) var(--van-padding-sm);--van-submit-bar-tip-font-size: var(--van-font-size-sm);--van-submit-bar-tip-line-height: 1.5;--van-submit-bar-tip-color: var(--van-orange-dark);--van-submit-bar-tip-background: var(--van-orange-light);--van-submit-bar-tip-icon-size: 12px;--van-submit-bar-button-height: 40px;--van-submit-bar-padding: 0 var(--van-padding-md)}.van-submit-bar{position:fixed;bottom:0;left:0;z-index:var(--van-submit-bar-z-index);width:100%;background:var(--van-submit-bar-background);-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-submit-bar__tip{padding:var(--van-submit-bar-tip-padding);color:var(--van-submit-bar-tip-color);font-size:var(--van-submit-bar-tip-font-size);line-height:var(--van-submit-bar-tip-line-height);background:var(--van-submit-bar-tip-background)}.van-submit-bar__tip-icon{margin-right:var(--van-padding-base);font-size:var(--van-submit-bar-tip-icon-size);vertical-align:middle}.van-submit-bar__tip-text{vertical-align:middle}.van-submit-bar__bar{display:flex;align-items:center;justify-content:flex-end;height:var(--van-submit-bar-height);padding:var(--van-submit-bar-padding);font-size:var(--van-submit-bar-text-font-size)}.van-submit-bar__text{flex:1;padding-right:var(--van-padding-sm);color:var(--van-submit-bar-text-color);text-align:right}.van-submit-bar__text span{display:inline-block}.van-submit-bar__suffix-label{margin-left:var(--van-padding-base);font-weight:var(--van-font-bold)}.van-submit-bar__price{color:var(--van-submit-bar-price-color);font-weight:var(--van-font-bold);font-size:var(--van-submit-bar-price-font-size);margin-left:var(--van-padding-base)}.van-submit-bar__price-integer{font-size:var(--van-submit-bar-price-integer-font-size);font-family:var(--van-submit-bar-price-font)}.van-submit-bar__button{width:var(--van-submit-bar-button-width);height:var(--van-submit-bar-button-height);font-weight:var(--van-font-bold);border:none}.van-submit-bar__button--danger{background:var(--van-gradient-red)}:root,:host{--van-signature-padding: var(--van-padding-xs);--van-signature-content-height: 200px;--van-signature-content-background: var(--van-background-2);--van-signature-content-border: 1px dotted #dadada}.van-signature{padding:var(--van-signature-padding)}.van-signature__content{display:flex;justify-content:center;align-items:center;height:var(--van-signature-content-height);background-color:var(--van-signature-content-background);border:var(--van-signature-content-border);border-radius:var(--van-radius-lg);overflow:hidden}.van-signature__content canvas{width:100%;height:100%}.van-signature__footer{display:flex;justify-content:flex-end}.van-signature__footer .van-button{padding:0 var(--van-padding-md);margin-top:var(--van-padding-xs);margin-left:var(--van-padding-xs)}:root,:host{--van-contact-edit-padding: var(--van-padding-md);--van-contact-edit-fields-radius: var(--van-radius-md);--van-contact-edit-buttons-padding: var(--van-padding-xl) 0;--van-contact-edit-button-margin-bottom: var(--van-padding-sm);--van-contact-edit-button-font-size: var(--van-font-size-lg);--van-contact-edit-field-label-width: 4.1em}.van-contact-edit{padding:var(--van-contact-edit-padding)}.van-contact-edit__fields{overflow:hidden;border-radius:var(--van-contact-edit-fields-radius)}.van-contact-edit__fields .van-field__label{width:var(--van-contact-edit-field-label-width)}.van-contact-edit__switch-cell{margin-top:10px;padding-top:9px;padding-bottom:9px;border-radius:var(--van-contact-edit-fields-radius)}.van-contact-edit__buttons{padding:var(--van-contact-edit-buttons-padding)}.van-contact-edit__button{margin-bottom:var(--van-contact-edit-button-margin-bottom);font-size:var(--van-contact-edit-button-font-size)}:root,:host{--van-action-bar-button-height: 40px;--van-action-bar-button-warning-color: var(--van-gradient-orange);--van-action-bar-button-danger-color: var(--van-gradient-red)}.van-action-bar-button{flex:1;height:var(--van-action-bar-button-height);font-weight:var(--van-font-bold);font-size:var(--van-font-size-md);border:none;border-radius:0}.van-action-bar-button--first{margin-left:5px;border-top-left-radius:var(--van-radius-max);border-bottom-left-radius:var(--van-radius-max)}.van-action-bar-button--last{margin-right:5px;border-top-right-radius:var(--van-radius-max);border-bottom-right-radius:var(--van-radius-max)}.van-action-bar-button--warning{background:var(--van-action-bar-button-warning-color)}.van-action-bar-button--danger{background:var(--van-action-bar-button-danger-color)}@media (max-width:321px){.van-action-bar-button{font-size:13px}}:root,:host{--van-overlay-z-index: 1;--van-overlay-background: rgba(0, 0, 0, .7)}.van-overlay{position:fixed;top:0;left:0;z-index:var(--van-overlay-z-index);width:100%;height:100%;background:var(--van-overlay-background)}:root,:host{--van-popup-background: var(--van-background-2);--van-popup-transition: transform var(--van-duration-base);--van-popup-round-radius: 16px;--van-popup-close-icon-size: 22px;--van-popup-close-icon-color: var(--van-gray-5);--van-popup-close-icon-margin: 16px;--van-popup-close-icon-z-index: 1}.van-overflow-hidden{overflow:hidden!important}.van-popup{position:fixed;max-height:100%;overflow-y:auto;box-sizing:border-box;background:var(--van-popup-background);transition:var(--van-popup-transition);-webkit-overflow-scrolling:touch}.van-popup--center{top:50%;left:0;right:0;width:-moz-fit-content;width:fit-content;max-width:calc(100vw - var(--van-padding-md) * 2);margin:0 auto;transform:translateY(-50%)}.van-popup--center.van-popup--round{border-radius:var(--van-popup-round-radius)}.van-popup--top{top:0;left:0;width:100%}.van-popup--top.van-popup--round{border-radius:0 0 var(--van-popup-round-radius) var(--van-popup-round-radius)}.van-popup--right{top:50%;right:0;transform:translate3d(0,-50%,0)}.van-popup--right.van-popup--round{border-radius:var(--van-popup-round-radius) 0 0 var(--van-popup-round-radius)}.van-popup--bottom{bottom:0;left:0;width:100%}.van-popup--bottom.van-popup--round{border-radius:var(--van-popup-round-radius) var(--van-popup-round-radius) 0 0}.van-popup--left{top:50%;left:0;transform:translate3d(0,-50%,0)}.van-popup--left.van-popup--round{border-radius:0 var(--van-popup-round-radius) var(--van-popup-round-radius) 0}.van-popup-slide-top-enter-active,.van-popup-slide-left-enter-active,.van-popup-slide-right-enter-active,.van-popup-slide-bottom-enter-active{transition-timing-function:var(--van-ease-out)}.van-popup-slide-top-leave-active,.van-popup-slide-left-leave-active,.van-popup-slide-right-leave-active,.van-popup-slide-bottom-leave-active{transition-timing-function:var(--van-ease-in)}.van-popup-slide-top-enter-from,.van-popup-slide-top-leave-active{transform:translate3d(0,-100%,0)}.van-popup-slide-right-enter-from,.van-popup-slide-right-leave-active{transform:translate3d(100%,-50%,0)}.van-popup-slide-bottom-enter-from,.van-popup-slide-bottom-leave-active{transform:translate3d(0,100%,0)}.van-popup-slide-left-enter-from,.van-popup-slide-left-leave-active{transform:translate3d(-100%,-50%,0)}.van-popup__close-icon{position:absolute;z-index:var(--van-popup-close-icon-z-index);color:var(--van-popup-close-icon-color);font-size:var(--van-popup-close-icon-size)}.van-popup__close-icon--top-left{top:var(--van-popup-close-icon-margin);left:var(--van-popup-close-icon-margin)}.van-popup__close-icon--top-right{top:var(--van-popup-close-icon-margin);right:var(--van-popup-close-icon-margin)}.van-popup__close-icon--bottom-left{bottom:var(--van-popup-close-icon-margin);left:var(--van-popup-close-icon-margin)}.van-popup__close-icon--bottom-right{right:var(--van-popup-close-icon-margin);bottom:var(--van-popup-close-icon-margin)}:root,:host{--van-share-sheet-header-padding: var(--van-padding-sm) var(--van-padding-md);--van-share-sheet-title-color: var(--van-text-color);--van-share-sheet-title-font-size: var(--van-font-size-md);--van-share-sheet-title-line-height: var(--van-line-height-md);--van-share-sheet-description-color: var(--van-text-color-2);--van-share-sheet-description-font-size: var(--van-font-size-sm);--van-share-sheet-description-line-height: 16px;--van-share-sheet-icon-size: 48px;--van-share-sheet-option-name-color: var(--van-gray-7);--van-share-sheet-option-name-font-size: var(--van-font-size-sm);--van-share-sheet-option-description-color: var(--van-text-color-3);--van-share-sheet-option-description-font-size: var(--van-font-size-sm);--van-share-sheet-cancel-button-font-size: var(--van-font-size-lg);--van-share-sheet-cancel-button-height: 48px;--van-share-sheet-cancel-button-background: var(--van-background-2)}.van-share-sheet__header{padding:var(--van-share-sheet-header-padding);text-align:center}.van-share-sheet__title{margin-top:var(--van-padding-xs);color:var(--van-share-sheet-title-color);font-weight:400;font-size:var(--van-share-sheet-title-font-size);line-height:var(--van-share-sheet-title-line-height)}.van-share-sheet__description{display:block;margin-top:var(--van-padding-xs);color:var(--van-share-sheet-description-color);font-size:var(--van-share-sheet-description-font-size);line-height:var(--van-share-sheet-description-line-height)}.van-share-sheet__options{position:relative;display:flex;padding:var(--van-padding-md) 0 var(--van-padding-md) var(--van-padding-xs);overflow-x:auto;overflow-y:visible;-webkit-overflow-scrolling:touch}.van-share-sheet__options--border:before{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;top:0;right:0;left:var(--van-padding-md);border-top:1px solid var(--van-border-color);transform:scaleY(.5)}.van-share-sheet__options::-webkit-scrollbar{height:0}.van-share-sheet__option{display:flex;flex-direction:column;align-items:center;-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-share-sheet__icon,.van-share-sheet__image-icon{width:var(--van-share-sheet-icon-size);height:var(--van-share-sheet-icon-size);margin:0 var(--van-padding-md)}.van-share-sheet__icon{display:flex;align-items:center;justify-content:center;color:var(--van-gray-7);border-radius:100%;background-color:var(--van-gray-2)}.van-share-sheet__icon--link,.van-share-sheet__icon--poster,.van-share-sheet__icon--qrcode{font-size:26px}.van-share-sheet__icon--weapp-qrcode{font-size:28px}.van-share-sheet__icon--qq,.van-share-sheet__icon--weibo,.van-share-sheet__icon--wechat,.van-share-sheet__icon--wechat-moments{font-size:30px;color:var(--van-white)}.van-share-sheet__icon--qq{background-color:#38b9fa}.van-share-sheet__icon--wechat{background-color:#0bc15f}.van-share-sheet__icon--weibo{background-color:#ee575e}.van-share-sheet__icon--wechat-moments{background-color:#7bc845}.van-share-sheet__name{margin-top:var(--van-padding-xs);padding:0 var(--van-padding-base);color:var(--van-share-sheet-option-name-color);font-size:var(--van-share-sheet-option-name-font-size)}.van-share-sheet__option-description{padding:0 var(--van-padding-base);color:var(--van-share-sheet-option-description-color);font-size:var(--van-share-sheet-option-description-font-size)}.van-share-sheet__cancel{display:block;width:100%;padding:0;font-size:var(--van-share-sheet-cancel-button-font-size);line-height:var(--van-share-sheet-cancel-button-height);text-align:center;background:var(--van-share-sheet-cancel-button-background);border:none;cursor:pointer}.van-share-sheet__cancel:before{display:block;height:var(--van-padding-xs);background-color:var(--van-background);content:" "}.van-share-sheet__cancel:active{background-color:var(--van-active-color)}:root,:host{--van-popover-arrow-size: 6px;--van-popover-radius: var(--van-radius-lg);--van-popover-action-width: 128px;--van-popover-action-height: 44px;--van-popover-action-font-size: var(--van-font-size-md);--van-popover-action-line-height: var(--van-line-height-md);--van-popover-action-icon-size: 20px;--van-popover-horizontal-action-height: 34px;--van-popover-horizontal-action-icon-size: 16px;--van-popover-light-text-color: var(--van-text-color);--van-popover-light-background: var(--van-background-2);--van-popover-light-action-disabled-text-color: var(--van-text-color-3);--van-popover-dark-text-color: var(--van-white);--van-popover-dark-background: #4a4a4a;--van-popover-dark-action-disabled-text-color: var(--van-text-color-2)}.van-popover{position:absolute;overflow:visible;background-color:transparent;transition:opacity .15s,transform .15s}.van-popover__wrapper{display:inline-block}.van-popover__arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid;border-width:var(--van-popover-arrow-size)}.van-popover__content{overflow:hidden;border-radius:var(--van-popover-radius)}.van-popover__content--horizontal{display:flex;width:-moz-max-content;width:max-content}.van-popover__content--horizontal .van-popover__action{flex:none;width:auto;height:var(--van-popover-horizontal-action-height);padding:0 var(--van-padding-sm)}.van-popover__content--horizontal .van-popover__action:last-child:after{display:none}.van-popover__content--horizontal .van-popover__action-icon{margin-right:var(--van-padding-base);font-size:var(--van-popover-horizontal-action-icon-size)}.van-popover__action{position:relative;display:flex;align-items:center;box-sizing:border-box;width:var(--van-popover-action-width);height:var(--van-popover-action-height);padding:0 var(--van-padding-md);font-size:var(--van-popover-action-font-size);line-height:var(--van-line-height-md);cursor:pointer}.van-popover__action:last-child .van-popover__action-text:after{display:none}.van-popover__action-text{display:flex;flex:1;align-items:center;justify-content:center;height:100%}.van-popover__action-icon{margin-right:var(--van-padding-xs);font-size:var(--van-popover-action-icon-size)}.van-popover__action--with-icon .van-popover__action-text{justify-content:flex-start}.van-popover[data-popper-placement^=top] .van-popover__arrow{bottom:0;border-top-color:currentColor;border-bottom-width:0;margin-bottom:calc(var(--van-popover-arrow-size) * -1)}.van-popover[data-popper-placement=top]{transform-origin:50% 100%}.van-popover[data-popper-placement=top] .van-popover__arrow{left:50%;transform:translate(-50%)}.van-popover[data-popper-placement=top-start]{transform-origin:0 100%}.van-popover[data-popper-placement=top-start] .van-popover__arrow{left:var(--van-padding-md)}.van-popover[data-popper-placement=top-end]{transform-origin:100% 100%}.van-popover[data-popper-placement=top-end] .van-popover__arrow{right:var(--van-padding-md)}.van-popover[data-popper-placement^=left] .van-popover__arrow{right:0;border-right-width:0;border-left-color:currentColor;margin-right:calc(var(--van-popover-arrow-size) * -1)}.van-popover[data-popper-placement=left]{transform-origin:100% 50%}.van-popover[data-popper-placement=left] .van-popover__arrow{top:50%;transform:translateY(-50%)}.van-popover[data-popper-placement=left-start]{transform-origin:100% 0}.van-popover[data-popper-placement=left-start] .van-popover__arrow{top:var(--van-padding-md)}.van-popover[data-popper-placement=left-end]{transform-origin:100% 100%}.van-popover[data-popper-placement=left-end] .van-popover__arrow{bottom:var(--van-padding-md)}.van-popover[data-popper-placement^=right] .van-popover__arrow{left:0;border-right-color:currentColor;border-left-width:0;margin-left:calc(var(--van-popover-arrow-size) * -1)}.van-popover[data-popper-placement=right]{transform-origin:0 50%}.van-popover[data-popper-placement=right] .van-popover__arrow{top:50%;transform:translateY(-50%)}.van-popover[data-popper-placement=right-start]{transform-origin:0 0}.van-popover[data-popper-placement=right-start] .van-popover__arrow{top:var(--van-padding-md)}.van-popover[data-popper-placement=right-end]{transform-origin:0 100%}.van-popover[data-popper-placement=right-end] .van-popover__arrow{bottom:var(--van-padding-md)}.van-popover[data-popper-placement^=bottom] .van-popover__arrow{top:0;border-top-width:0;border-bottom-color:currentColor;margin-top:calc(var(--van-popover-arrow-size) * -1)}.van-popover[data-popper-placement=bottom]{transform-origin:50% 0}.van-popover[data-popper-placement=bottom] .van-popover__arrow{left:50%;transform:translate(-50%)}.van-popover[data-popper-placement=bottom-start]{transform-origin:0 0}.van-popover[data-popper-placement=bottom-start] .van-popover__arrow{left:var(--van-padding-md)}.van-popover[data-popper-placement=bottom-end]{transform-origin:100% 0}.van-popover[data-popper-placement=bottom-end] .van-popover__arrow{right:var(--van-padding-md)}.van-popover--light{color:var(--van-popover-light-text-color)}.van-popover--light .van-popover__content{background:var(--van-popover-light-background);box-shadow:0 2px 12px #3232331f}.van-popover--light .van-popover__arrow{color:var(--van-popover-light-background)}.van-popover--light .van-popover__action:active{background-color:var(--van-active-color)}.van-popover--light .van-popover__action--disabled{color:var(--van-popover-light-action-disabled-text-color);cursor:not-allowed}.van-popover--light .van-popover__action--disabled:active{background-color:transparent}.van-popover--dark{color:var(--van-popover-dark-text-color)}.van-popover--dark .van-popover__content{background:var(--van-popover-dark-background)}.van-popover--dark .van-popover__arrow{color:var(--van-popover-dark-background)}.van-popover--dark .van-popover__action:active{background-color:#0003}.van-popover--dark .van-popover__action--disabled{color:var(--van-popover-dark-action-disabled-text-color)}.van-popover--dark .van-popover__action--disabled:active{background-color:transparent}.van-popover--dark .van-popover__action-text:after{border-color:var(--van-gray-7)}.van-popover-zoom-enter-from,.van-popover-zoom-leave-active{transform:scale(.8);opacity:0}.van-popover-zoom-enter-active{transition-timing-function:var(--van-ease-out)}.van-popover-zoom-leave-active{transition-timing-function:var(--van-ease-in)}:root,:host{--van-notify-text-color: var(--van-white);--van-notify-padding: var(--van-padding-xs) var(--van-padding-md);--van-notify-font-size: var(--van-font-size-md);--van-notify-line-height: var(--van-line-height-md);--van-notify-primary-background: var(--van-primary-color);--van-notify-success-background: var(--van-success-color);--van-notify-danger-background: var(--van-danger-color);--van-notify-warning-background: var(--van-warning-color)}.van-notify{display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:var(--van-notify-padding);color:var(--van-notify-text-color);font-size:var(--van-notify-font-size);line-height:var(--van-notify-line-height);white-space:pre-wrap;text-align:center;word-wrap:break-word}.van-notify--primary{background:var(--van-notify-primary-background)}.van-notify--success{background:var(--van-notify-success-background)}.van-notify--danger{background:var(--van-notify-danger-background)}.van-notify--warning{background:var(--van-notify-warning-background)}:root,:host{--van-dialog-width: 320px;--van-dialog-small-screen-width: 90%;--van-dialog-font-size: var(--van-font-size-lg);--van-dialog-transition: var(--van-duration-base);--van-dialog-radius: 16px;--van-dialog-background: var(--van-background-2);--van-dialog-header-font-weight: var(--van-font-bold);--van-dialog-header-line-height: 24px;--van-dialog-header-padding-top: 26px;--van-dialog-header-isolated-padding: var(--van-padding-lg) 0;--van-dialog-message-padding: var(--van-padding-lg);--van-dialog-message-font-size: var(--van-font-size-md);--van-dialog-message-line-height: var(--van-line-height-md);--van-dialog-message-max-height: 60vh;--van-dialog-has-title-message-text-color: var(--van-gray-7);--van-dialog-has-title-message-padding-top: var(--van-padding-xs);--van-dialog-button-height: 48px;--van-dialog-round-button-height: 36px;--van-dialog-confirm-button-text-color: var(--van-primary-color)}.van-dialog{top:45%;width:var(--van-dialog-width);overflow:hidden;font-size:var(--van-dialog-font-size);background:var(--van-dialog-background);border-radius:var(--van-dialog-radius);backface-visibility:hidden;transition:var(--van-dialog-transition);transition-property:transform,opacity}@media (max-width:321px){.van-dialog{width:var(--van-dialog-small-screen-width)}}.van-dialog__header{color:var(--van-text-color);padding-top:var(--van-dialog-header-padding-top);font-weight:var(--van-dialog-header-font-weight);line-height:var(--van-dialog-header-line-height);text-align:center}.van-dialog__header--isolated{padding:var(--van-dialog-header-isolated-padding)}.van-dialog__content--isolated{display:flex;align-items:center;min-height:104px}.van-dialog__message{color:var(--van-text-color);flex:1;max-height:var(--van-dialog-message-max-height);padding:26px var(--van-dialog-message-padding);overflow-y:auto;font-size:var(--van-dialog-message-font-size);line-height:var(--van-dialog-message-line-height);white-space:pre-wrap;text-align:center;word-wrap:break-word;-webkit-overflow-scrolling:touch}.van-dialog__message--has-title{padding-top:var(--van-dialog-has-title-message-padding-top);color:var(--van-dialog-has-title-message-text-color)}.van-dialog__message--left{text-align:left}.van-dialog__message--right{text-align:right}.van-dialog__message--justify{text-align:justify}.van-dialog__footer{display:flex;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-dialog__confirm,.van-dialog__cancel{flex:1;height:var(--van-dialog-button-height);margin:0;border:0;border-radius:0}.van-dialog__confirm,.van-dialog__confirm:active{color:var(--van-dialog-confirm-button-text-color)}.van-dialog--round-button .van-dialog__footer{position:relative;height:auto;padding:var(--van-padding-xs) var(--van-padding-lg) var(--van-padding-md)}.van-dialog--round-button .van-dialog__message{padding-bottom:var(--van-padding-md);color:var(--van-text-color)}.van-dialog--round-button .van-dialog__confirm,.van-dialog--round-button .van-dialog__cancel{height:var(--van-dialog-round-button-height)}.van-dialog--round-button .van-dialog__confirm{color:var(--van-white)}.van-dialog--round-button .van-action-bar-button--first{border-top-left-radius:var(--van-radius-max);border-bottom-left-radius:var(--van-radius-max)}.van-dialog--round-button .van-action-bar-button--last{border-top-right-radius:var(--van-radius-max);border-bottom-right-radius:var(--van-radius-max)}.van-dialog-bounce-enter-from{transform:translate3d(0,-50%,0) scale(.7);opacity:0}.van-dialog-bounce-leave-active{transform:translate3d(0,-50%,0) scale(.9);opacity:0}:root,:host{--van-toast-max-width: 70%;--van-toast-font-size: var(--van-font-size-md);--van-toast-text-color: var(--van-white);--van-toast-loading-icon-color: var(--van-white);--van-toast-line-height: var(--van-line-height-md);--van-toast-radius: var(--van-radius-lg);--van-toast-background: rgba(0, 0, 0, .7);--van-toast-icon-size: 36px;--van-toast-text-min-width: 96px;--van-toast-text-padding: var(--van-padding-xs) var(--van-padding-sm);--van-toast-default-padding: var(--van-padding-md);--van-toast-default-width: 88px;--van-toast-default-min-height: 88px;--van-toast-position-top-distance: 20%;--van-toast-position-bottom-distance: 20%}.van-toast{display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:content-box;transition:all var(--van-duration-fast);width:var(--van-toast-default-width);max-width:var(--van-toast-max-width);min-height:var(--van-toast-default-min-height);padding:var(--van-toast-default-padding);color:var(--van-toast-text-color);font-size:var(--van-toast-font-size);line-height:var(--van-toast-line-height);white-space:pre-wrap;word-break:break-all;text-align:center;background:var(--van-toast-background);border-radius:var(--van-toast-radius)}.van-toast--break-normal{word-break:normal;word-wrap:normal}.van-toast--break-word{word-break:normal;word-wrap:break-word}.van-toast--unclickable{overflow:hidden;cursor:not-allowed}.van-toast--unclickable *{pointer-events:none}.van-toast--text,.van-toast--html{width:-moz-fit-content;width:fit-content;min-width:var(--van-toast-text-min-width);min-height:0;padding:var(--van-toast-text-padding)}.van-toast--text .van-toast__text,.van-toast--html .van-toast__text{margin-top:0}.van-toast--top{top:var(--van-toast-position-top-distance)}.van-toast--bottom{top:auto;bottom:var(--van-toast-position-bottom-distance)}.van-toast__icon{font-size:var(--van-toast-icon-size)}.van-toast__loading{padding:var(--van-padding-base);color:var(--van-toast-loading-icon-color)}.van-toast__text{margin-top:var(--van-padding-xs)}:root,:host{--van-action-sheet-max-height: 80%;--van-action-sheet-header-height: 48px;--van-action-sheet-header-font-size: var(--van-font-size-lg);--van-action-sheet-description-color: var(--van-text-color-2);--van-action-sheet-description-font-size: var(--van-font-size-md);--van-action-sheet-description-line-height: var(--van-line-height-md);--van-action-sheet-item-background: var(--van-background-2);--van-action-sheet-item-font-size: var(--van-font-size-lg);--van-action-sheet-item-line-height: var(--van-line-height-lg);--van-action-sheet-item-text-color: var(--van-text-color);--van-action-sheet-item-disabled-text-color: var(--van-text-color-3);--van-action-sheet-item-icon-size: 18px;--van-action-sheet-item-icon-margin-right: var(--van-padding-xs);--van-action-sheet-subname-color: var(--van-text-color-2);--van-action-sheet-subname-font-size: var(--van-font-size-sm);--van-action-sheet-subname-line-height: var(--van-line-height-sm);--van-action-sheet-close-icon-size: 22px;--van-action-sheet-close-icon-color: var(--van-gray-5);--van-action-sheet-close-icon-padding: 0 var(--van-padding-md);--van-action-sheet-cancel-text-color: var(--van-gray-7);--van-action-sheet-cancel-padding-top: var(--van-padding-xs);--van-action-sheet-cancel-padding-color: var(--van-background);--van-action-sheet-loading-icon-size: 22px}.van-action-sheet{display:flex;flex-direction:column;max-height:var(--van-action-sheet-max-height);overflow:hidden;color:var(--van-action-sheet-item-text-color)}.van-action-sheet__content{flex:1 auto;overflow-y:auto;-webkit-overflow-scrolling:touch}.van-action-sheet__item,.van-action-sheet__cancel{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;width:100%;padding:14px var(--van-padding-md);font-size:var(--van-action-sheet-item-font-size);background:var(--van-action-sheet-item-background);border:none;cursor:pointer}.van-action-sheet__item:active,.van-action-sheet__cancel:active{background-color:var(--van-active-color)}.van-action-sheet__item{line-height:var(--van-action-sheet-item-line-height)}.van-action-sheet__item--loading,.van-action-sheet__item--disabled{color:var(--van-action-sheet-item-disabled-text-color)}.van-action-sheet__item--loading:active,.van-action-sheet__item--disabled:active{background-color:var(--van-action-sheet-item-background)}.van-action-sheet__item--disabled{cursor:not-allowed}.van-action-sheet__item--loading{cursor:default}.van-action-sheet__item-icon{font-size:var(--van-action-sheet-item-icon-size);margin-right:var(--van-action-sheet-item-icon-margin-right)}.van-action-sheet__cancel{flex-shrink:0;box-sizing:border-box;color:var(--van-action-sheet-cancel-text-color)}.van-action-sheet__subname{width:100%;margin-top:var(--van-padding-xs);color:var(--van-action-sheet-subname-color);font-size:var(--van-action-sheet-subname-font-size);line-height:var(--van-action-sheet-subname-line-height);overflow-wrap:break-word}.van-action-sheet__gap{display:block;height:var(--van-action-sheet-cancel-padding-top);background:var(--van-action-sheet-cancel-padding-color)}.van-action-sheet__header{flex-shrink:0;font-weight:var(--van-font-bold);font-size:var(--van-action-sheet-header-font-size);line-height:var(--van-action-sheet-header-height);text-align:center}.van-action-sheet__description{position:relative;flex-shrink:0;padding:20px var(--van-padding-md);color:var(--van-action-sheet-description-color);font-size:var(--van-action-sheet-description-font-size);line-height:var(--van-action-sheet-description-line-height);text-align:center}.van-action-sheet__description:after{position:absolute;box-sizing:border-box;content:" ";pointer-events:none;right:var(--van-padding-md);bottom:0;left:var(--van-padding-md);border-bottom:1px solid var(--van-border-color);transform:scaleY(.5)}.van-action-sheet__loading-icon .van-loading__spinner{width:var(--van-action-sheet-loading-icon-size);height:var(--van-action-sheet-loading-icon-size)}.van-action-sheet__close{position:absolute;top:0;right:0;z-index:1;padding:var(--van-action-sheet-close-icon-padding);color:var(--van-action-sheet-close-icon-color);font-size:var(--van-action-sheet-close-icon-size);line-height:inherit}:root,:host{--van-sticky-z-index: 99}.van-sticky--fixed{position:fixed;z-index:var(--van-sticky-z-index)}:root,:host{--van-swipe-indicator-size: 6px;--van-swipe-indicator-margin: var(--van-padding-sm);--van-swipe-indicator-active-opacity: 1;--van-swipe-indicator-inactive-opacity: .3;--van-swipe-indicator-active-background: var(--van-primary-color);--van-swipe-indicator-inactive-background: var(--van-border-color)}.van-swipe{position:relative;overflow:hidden;transform:translateZ(0);cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-swipe__track{display:flex;height:100%;transition-property:transform}.van-swipe__track--vertical{flex-direction:column}.van-swipe__indicators{position:absolute;bottom:var(--van-swipe-indicator-margin);left:50%;display:flex;transform:translate(-50%)}.van-swipe__indicators--vertical{top:50%;bottom:auto;left:var(--van-swipe-indicator-margin);flex-direction:column;transform:translateY(-50%)}.van-swipe__indicators--vertical .van-swipe__indicator:not(:last-child){margin-bottom:var(--van-swipe-indicator-size)}.van-swipe__indicator{width:var(--van-swipe-indicator-size);height:var(--van-swipe-indicator-size);background-color:var(--van-swipe-indicator-inactive-background);border-radius:100%;opacity:var(--van-swipe-indicator-inactive-opacity);transition:opacity var(--van-duration-fast),background-color var(--van-duration-fast)}.van-swipe__indicator:not(:last-child){margin-right:var(--van-swipe-indicator-size)}.van-swipe__indicator--active{background-color:var(--van-swipe-indicator-active-background);opacity:var(--van-swipe-indicator-active-opacity)}.van-swipe-item{position:relative;flex-shrink:0;width:100%;height:100%}:root,:host{--van-image-preview-index-text-color: var(--van-white);--van-image-preview-index-font-size: var(--van-font-size-md);--van-image-preview-index-line-height: var(--van-line-height-md);--van-image-preview-index-text-shadow: 0 1px 1px var(--van-gray-8);--van-image-preview-overlay-background: rgba(0, 0, 0, .9);--van-image-preview-close-icon-size: 22px;--van-image-preview-close-icon-color: var(--van-gray-5);--van-image-preview-close-icon-margin: var(--van-padding-md);--van-image-preview-close-icon-z-index: 1}.van-image-preview{position:fixed;top:0;left:0;width:100%;height:100%;max-width:none;background-color:transparent;transform:none}.van-image-preview__swipe{height:100%}.van-image-preview__swipe-item{display:flex;align-items:center;justify-content:center;overflow:hidden}.van-image-preview__cover{position:absolute;top:0;left:0}.van-image-preview__image,.van-image-preview__image-wrap{width:100%;transition-property:transform}.van-image-preview__image--vertical,.van-image-preview__image-wrap--vertical{width:auto;height:100%}.van-image-preview__image img,.van-image-preview__image-wrap img,.van-image-preview__image video,.van-image-preview__image-wrap video{-webkit-user-drag:none}.van-image-preview__image .van-image__error,.van-image-preview__image-wrap .van-image__error{top:30%;height:40%}.van-image-preview__image .van-image__error-icon,.van-image-preview__image-wrap .van-image__error-icon{font-size:36px}.van-image-preview__image .van-image__loading,.van-image-preview__image-wrap .van-image__loading{background-color:transparent}.van-image-preview__index{position:absolute;top:var(--van-padding-md);left:50%;color:var(--van-image-preview-index-text-color);font-size:var(--van-image-preview-index-font-size);line-height:var(--van-image-preview-index-line-height);text-shadow:var(--van-image-preview-index-text-shadow);transform:translate(-50%)}.van-image-preview__overlay{background:var(--van-image-preview-overlay-background)}.van-image-preview__close-icon{position:absolute;z-index:var(--van-image-preview-close-icon-z-index);color:var(--van-image-preview-close-icon-color);font-size:var(--van-image-preview-close-icon-size)}.van-image-preview__close-icon--top-left{top:var(--van-image-preview-close-icon-margin);left:var(--van-image-preview-close-icon-margin)}.van-image-preview__close-icon--top-right{top:var(--van-image-preview-close-icon-margin);right:var(--van-image-preview-close-icon-margin)}.van-image-preview__close-icon--bottom-left{bottom:var(--van-image-preview-close-icon-margin);left:var(--van-image-preview-close-icon-margin)}.van-image-preview__close-icon--bottom-right{right:var(--van-image-preview-close-icon-margin);bottom:var(--van-image-preview-close-icon-margin)}:root,:host{--van-uploader-size: 80px;--van-uploader-icon-size: 24px;--van-uploader-icon-color: var(--van-gray-4);--van-uploader-text-color: var(--van-text-color-2);--van-uploader-text-font-size: var(--van-font-size-sm);--van-uploader-upload-background: var(--van-gray-1);--van-uploader-upload-active-color: var(--van-active-color);--van-uploader-delete-color: var(--van-white);--van-uploader-delete-icon-size: 14px;--van-uploader-delete-background: rgba(0, 0, 0, .7);--van-uploader-file-background: var(--van-background);--van-uploader-file-icon-size: 20px;--van-uploader-file-icon-color: var(--van-gray-7);--van-uploader-file-name-padding: 0 var(--van-padding-base);--van-uploader-file-name-margin-top: var(--van-padding-xs);--van-uploader-file-name-font-size: var(--van-font-size-sm);--van-uploader-file-name-text-color: var(--van-gray-7);--van-uploader-mask-text-color: var(--van-white);--van-uploader-mask-background: rgba(50, 50, 51, .88);--van-uploader-mask-icon-size: 22px;--van-uploader-mask-message-font-size: var(--van-font-size-sm);--van-uploader-mask-message-line-height: var(--van-line-height-xs);--van-uploader-loading-icon-size: 22px;--van-uploader-loading-icon-color: var(--van-white);--van-uploader-disabled-opacity: var(--van-disabled-opacity);--van-uploader-border-radius: 0px}.van-uploader{position:relative;display:inline-block}.van-uploader__wrapper{display:flex;flex-wrap:wrap}.van-uploader__wrapper--disabled{opacity:var(--van-uploader-disabled-opacity)}.van-uploader__input{position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;cursor:pointer;opacity:0}.van-uploader__input-wrapper{position:relative}.van-uploader__input:disabled{cursor:not-allowed}.van-uploader__upload{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;width:var(--van-uploader-size);height:var(--van-uploader-size);margin:0 var(--van-padding-xs) var(--van-padding-xs) 0;background:var(--van-uploader-upload-background);border-radius:var(--van-uploader-border-radius)}.van-uploader__upload:active{background-color:var(--van-uploader-upload-active-color)}.van-uploader__upload--readonly:active{background-color:var(--van-uploader-upload-background)}.van-uploader__upload-icon{color:var(--van-uploader-icon-color);font-size:var(--van-uploader-icon-size)}.van-uploader__upload-text{margin-top:var(--van-padding-xs);color:var(--van-uploader-text-color);font-size:var(--van-uploader-text-font-size)}.van-uploader__preview{position:relative;margin:0 var(--van-padding-xs) var(--van-padding-xs) 0;cursor:pointer}.van-uploader__preview-image{display:block;width:var(--van-uploader-size);height:var(--van-uploader-size);overflow:hidden;border-radius:var(--van-uploader-border-radius)}.van-uploader__preview-delete{position:absolute;top:0;right:0}.van-uploader__preview-delete--shadow{width:var(--van-uploader-delete-icon-size);height:var(--van-uploader-delete-icon-size);background:var(--van-uploader-delete-background);border-radius:0 0 0 12px}.van-uploader__preview-delete-icon{position:absolute;top:0;right:0;color:var(--van-uploader-delete-color);font-size:var(--van-uploader-delete-icon-size);transform:scale(.7) translate(10%,-10%)}.van-uploader__preview-cover{position:absolute;top:0;right:0;bottom:0;left:0}.van-uploader__mask{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--van-uploader-mask-text-color);background:var(--van-uploader-mask-background);border-radius:var(--van-uploader-border-radius)}.van-uploader__mask-icon{font-size:var(--van-uploader-mask-icon-size)}.van-uploader__mask-message{margin-top:6px;padding:0 var(--van-padding-base);font-size:var(--van-uploader-mask-message-font-size);line-height:var(--van-uploader-mask-message-line-height)}.van-uploader__loading{width:var(--van-uploader-loading-icon-size);height:var(--van-uploader-loading-icon-size);color:var(--van-uploader-loading-icon-color)}.van-uploader__file{display:flex;flex-direction:column;align-items:center;justify-content:center;width:var(--van-uploader-size);height:var(--van-uploader-size);background:var(--van-uploader-file-background)}.van-uploader__file-icon{color:var(--van-uploader-file-icon-color);font-size:var(--van-uploader-file-icon-size)}.van-uploader__file-name{box-sizing:border-box;width:100%;margin-top:var(--van-uploader-file-name-margin-top);padding:var(--van-uploader-file-name-padding);color:var(--van-uploader-file-name-text-color);font-size:var(--van-uploader-file-name-font-size);text-align:center}:root,:host{--van-tab-text-color: var(--van-gray-7);--van-tab-active-text-color: var(--van-text-color);--van-tab-disabled-text-color: var(--van-text-color-3);--van-tab-font-size: var(--van-font-size-md);--van-tab-line-height: var(--van-line-height-md);--van-tabs-default-color: var(--van-primary-color);--van-tabs-line-height: 44px;--van-tabs-card-height: 30px;--van-tabs-nav-background: var(--van-background-2);--van-tabs-bottom-bar-width: 40px;--van-tabs-bottom-bar-height: 3px;--van-tabs-bottom-bar-color: var(--van-primary-color)}.van-tab{position:relative;display:flex;flex:1;align-items:center;justify-content:center;box-sizing:border-box;padding:0 var(--van-padding-base);color:var(--van-tab-text-color);font-size:var(--van-tab-font-size);line-height:var(--van-tab-line-height);cursor:pointer}.van-tab--active{color:var(--van-tab-active-text-color);font-weight:var(--van-font-bold)}.van-tab--disabled{color:var(--van-tab-disabled-text-color);cursor:not-allowed}.van-tab--grow{flex:1 0 auto;padding:0 var(--van-padding-sm)}.van-tab--shrink{flex:none;padding:0 var(--van-padding-xs)}.van-tab--card{color:var(--van-tabs-default-color);border-right:var(--van-border-width) solid var(--van-tabs-default-color)}.van-tab--card:last-child{border-right:none}.van-tab--card.van-tab--active{color:var(--van-white);background-color:var(--van-tabs-default-color)}.van-tab--card.van-tab--disabled{color:var(--van-tab-disabled-text-color)}.van-tab__text--ellipsis{display:-webkit-box;overflow:hidden;-webkit-line-clamp:1;-webkit-box-orient:vertical}.van-tabs{position:relative}.van-tabs__wrap{overflow:hidden}.van-tabs__wrap--page-top{position:fixed}.van-tabs__wrap--content-bottom{top:auto;bottom:0}.van-tabs__nav{position:relative;display:flex;background:var(--van-tabs-nav-background);-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-tabs__nav--complete{overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.van-tabs__nav--complete::-webkit-scrollbar{display:none}.van-tabs__nav--line{box-sizing:content-box;height:100%;padding-bottom:15px}.van-tabs__nav--line.van-tabs__nav--shrink,.van-tabs__nav--line.van-tabs__nav--complete{padding-right:var(--van-padding-xs);padding-left:var(--van-padding-xs)}.van-tabs__nav--card{box-sizing:border-box;height:var(--van-tabs-card-height);margin:0 var(--van-padding-md);border:var(--van-border-width) solid var(--van-tabs-default-color);border-radius:var(--van-radius-sm)}.van-tabs__nav--card.van-tabs__nav--shrink{display:inline-flex}.van-tabs__line{position:absolute;bottom:15px;left:0;z-index:1;width:var(--van-tabs-bottom-bar-width);height:var(--van-tabs-bottom-bar-height);background:var(--van-tabs-bottom-bar-color);border-radius:var(--van-tabs-bottom-bar-height)}.van-tabs__track{position:relative;display:flex;width:100%;height:100%;will-change:left}.van-tabs__content--animated{overflow:hidden}.van-tabs--line .van-tabs__wrap{height:var(--van-tabs-line-height)}.van-tabs--card>.van-tabs__wrap{height:var(--van-tabs-card-height)}.van-tab__panel,.van-tab__panel-wrapper{flex-shrink:0;box-sizing:border-box;width:100%}.van-tab__panel-wrapper--inactive{height:0;overflow:visible}:root,:host{--van-cascader-header-height: 48px;--van-cascader-header-padding: 0 var(--van-padding-md);--van-cascader-title-font-size: var(--van-font-size-lg);--van-cascader-title-line-height: 20px;--van-cascader-close-icon-size: 22px;--van-cascader-close-icon-color: var(--van-gray-5);--van-cascader-selected-icon-size: 18px;--van-cascader-tabs-height: 48px;--van-cascader-active-color: var(--van-primary-color);--van-cascader-options-height: 384px;--van-cascader-option-disabled-color: var(--van-text-color-3);--van-cascader-tab-color: var(--van-text-color);--van-cascader-unselected-tab-color: var(--van-text-color-2)}.van-cascader__header{display:flex;align-items:center;justify-content:space-between;height:var(--van-cascader-header-height);padding:var(--van-cascader-header-padding)}.van-cascader__title{font-weight:var(--van-font-bold);font-size:var(--van-cascader-title-font-size);line-height:var(--van-cascader-title-line-height)}.van-cascader__close-icon{color:var(--van-cascader-close-icon-color);font-size:var(--van-cascader-close-icon-size)}.van-cascader__tabs.van-tabs--line .van-tabs__wrap{height:var(--van-cascader-tabs-height)}.van-cascader__tab{color:var(--van-cascader-tab-color);font-weight:var(--van-font-bold)}.van-cascader__tab--unselected{color:var(--van-cascader-unselected-tab-color);font-weight:400}.van-cascader__option{display:flex;align-items:center;justify-content:space-between;padding:10px var(--van-padding-md);font-size:var(--van-font-size-md);line-height:var(--van-line-height-md);cursor:pointer}.van-cascader__option:active{background-color:var(--van-active-color)}.van-cascader__option--selected{color:var(--van-cascader-active-color);font-weight:var(--van-font-bold)}.van-cascader__option--disabled{color:var(--van-cascader-option-disabled-color);cursor:not-allowed}.van-cascader__option--disabled:active{background-color:transparent}.van-cascader__selected-icon{font-size:var(--van-cascader-selected-icon-size)}.van-cascader__options{box-sizing:border-box;height:var(--van-cascader-options-height);padding-top:6px;overflow-y:auto;-webkit-overflow-scrolling:touch}:root,:host{--van-picker-background: var(--van-background-2);--van-picker-toolbar-height: 44px;--van-picker-title-font-size: var(--van-font-size-lg);--van-picker-title-line-height: var(--van-line-height-md);--van-picker-action-padding: 0 var(--van-padding-md);--van-picker-action-font-size: var(--van-font-size-md);--van-picker-confirm-action-color: var(--van-primary-color);--van-picker-cancel-action-color: var(--van-text-color-2);--van-picker-option-font-size: var(--van-font-size-lg);--van-picker-option-padding: 0 var(--van-padding-base);--van-picker-option-text-color: var(--van-text-color);--van-picker-option-disabled-opacity: .3;--van-picker-loading-icon-color: var(--van-primary-color);--van-picker-loading-mask-color: rgba(255, 255, 255, .9);--van-picker-mask-color: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .4)), linear-gradient(0deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .4))}.van-theme-dark{--van-picker-loading-mask-color: rgba(0, 0, 0, .6);--van-picker-mask-color: linear-gradient(180deg, rgba(0, 0, 0, .6), rgba(0, 0, 0, .1)), linear-gradient(0deg, rgba(0, 0, 0, .6), rgba(0, 0, 0, .1))}.van-picker{position:relative;background:var(--van-picker-background);-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-picker__toolbar{position:relative;display:flex;align-items:center;justify-content:space-between;height:var(--van-picker-toolbar-height)}.van-picker__cancel,.van-picker__confirm{height:100%;padding:var(--van-picker-action-padding);font-size:var(--van-picker-action-font-size);background-color:transparent;border:none}.van-picker__confirm{color:var(--van-picker-confirm-action-color)}.van-picker__cancel{color:var(--van-picker-cancel-action-color)}.van-picker__title{position:absolute;left:50%;color:var(--van-text-color);max-width:50%;font-weight:var(--van-font-bold);font-size:var(--van-picker-title-font-size);line-height:var(--van-picker-title-line-height);text-align:center;transform:translate(-50%)}.van-picker__columns{position:relative;display:flex;cursor:grab}.van-picker__loading{position:absolute;top:0;right:0;bottom:0;left:0;z-index:3;display:flex;align-items:center;justify-content:center;color:var(--van-picker-loading-icon-color);background:var(--van-picker-loading-mask-color)}.van-picker__frame{position:absolute;top:50%;right:var(--van-padding-md);left:var(--van-padding-md);z-index:2;transform:translateY(-50%);pointer-events:none}.van-picker__mask{position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;background-image:var(--van-picker-mask-color);background-repeat:no-repeat;background-position:top,bottom;transform:translateZ(0);pointer-events:none}.van-picker-column{flex:1;overflow:hidden;font-size:var(--van-picker-option-font-size)}.van-picker-column__wrapper{transition-timing-function:cubic-bezier(.23,1,.68,1)}.van-picker-column__item{display:flex;align-items:center;justify-content:center;padding:var(--van-picker-option-padding);color:var(--van-picker-option-text-color)}.van-picker-column__item--disabled{cursor:not-allowed;opacity:var(--van-picker-option-disabled-opacity)}:root,:host{--van-picker-group-background: var(--van-background-2)}.van-picker-group{background:var(--van-picker-group-background)}.van-picker-group__tabs{margin-top:var(--van-padding-base)}.van-picker-group__tab-title{margin-right:16px}:root,:host{--van-calendar-background: var(--van-background-2);--van-calendar-popup-height: 80%;--van-calendar-header-shadow: 0 2px 10px rgba(125, 126, 128, .16);--van-calendar-header-title-height: 44px;--van-calendar-header-title-font-size: var(--van-font-size-lg);--van-calendar-header-subtitle-font-size: var(--van-font-size-md);--van-calendar-header-action-width: 28px;--van-calendar-header-action-color: var(--van-text-color);--van-calendar-header-action-disabled-color: var(--van-text-color-3);--van-calendar-weekdays-height: 30px;--van-calendar-weekdays-font-size: var(--van-font-size-sm);--van-calendar-month-title-font-size: var(--van-font-size-md);--van-calendar-month-mark-color: rgba(242, 243, 245, .8);--van-calendar-month-mark-font-size: 160px;--van-calendar-day-height: 64px;--van-calendar-day-font-size: var(--van-font-size-lg);--van-calendar-day-margin-bottom: 4px;--van-calendar-day-disabled-color: var(--van-text-color-3);--van-calendar-range-edge-color: var(--van-white);--van-calendar-range-edge-background: var(--van-primary-color);--van-calendar-range-middle-color: var(--van-primary-color);--van-calendar-range-middle-background-opacity: .1;--van-calendar-selected-day-size: 54px;--van-calendar-selected-day-color: var(--van-white);--van-calendar-selected-day-background: var(--van-primary-color);--van-calendar-info-font-size: var(--van-font-size-xs);--van-calendar-info-line-height: var(--van-line-height-xs);--van-calendar-confirm-button-height: 36px;--van-calendar-confirm-button-margin: 7px 0}.van-theme-dark{--van-calendar-month-mark-color: rgba(100, 101, 102, .2);--van-calendar-day-disabled-color: var(--van-gray-7)}.van-calendar{display:flex;flex-direction:column;height:100%;background:var(--van-calendar-background)}.van-calendar__popup.van-popup--top,.van-calendar__popup.van-popup--bottom{height:var(--van-calendar-popup-height)}.van-calendar__popup.van-popup--left,.van-calendar__popup.van-popup--right{height:100%}.van-calendar__popup .van-popup__close-icon{top:11px}.van-calendar__header{flex-shrink:0;box-shadow:var(--van-calendar-header-shadow)}.van-calendar__month-title,.van-calendar__header-title,.van-calendar__header-subtitle{color:var(--van-text-color);height:var(--van-calendar-header-title-height);font-weight:var(--van-font-bold);line-height:var(--van-calendar-header-title-height);text-align:center}.van-calendar__header-title{font-size:var(--van-calendar-header-title-font-size)}.van-calendar__header-subtitle{font-size:var(--van-calendar-header-subtitle-font-size)}.van-calendar__header-subtitle--with-switch{display:flex;align-items:center;padding:0 var(--van-padding-base)}.van-calendar__header-subtitle-text{flex:1}.van-calendar__header-action{display:flex;align-items:center;justify-content:center;min-width:var(--van-calendar-header-action-width);height:100%;color:var(--van-calendar-header-action-color);cursor:pointer}.van-calendar__header-action--disabled{color:var(--van-calendar-header-action-disabled-color);cursor:not-allowed}.van-calendar__month-title{font-size:var(--van-calendar-month-title-font-size)}.van-calendar__weekdays{display:flex}.van-calendar__weekday{flex:1;font-size:var(--van-calendar-weekdays-font-size);line-height:var(--van-calendar-weekdays-height);text-align:center}.van-calendar__body{flex:1;overflow:auto;-webkit-overflow-scrolling:touch}.van-calendar__days{position:relative;display:flex;flex-wrap:wrap;-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-calendar__month-mark{position:absolute;top:50%;left:50%;z-index:0;color:var(--van-calendar-month-mark-color);font-size:var(--van-calendar-month-mark-font-size);transform:translate(-50%,-50%);pointer-events:none}.van-calendar__day,.van-calendar__selected-day{display:flex;align-items:center;justify-content:center;text-align:center}.van-calendar__day{position:relative;width:14.285%;height:var(--van-calendar-day-height);font-size:var(--van-calendar-day-font-size);margin-bottom:var(--van-calendar-day-margin-bottom);cursor:pointer}.van-calendar__day--end,.van-calendar__day--start,.van-calendar__day--start-end,.van-calendar__day--multiple-middle,.van-calendar__day--multiple-selected{color:var(--van-calendar-range-edge-color);background:var(--van-calendar-range-edge-background)}.van-calendar__day--start{border-radius:var(--van-radius-md) 0 0 var(--van-radius-md)}.van-calendar__day--end{border-radius:0 var(--van-radius-md) var(--van-radius-md) 0}.van-calendar__day--start-end,.van-calendar__day--multiple-selected{border-radius:var(--van-radius-md)}.van-calendar__day--middle{color:var(--van-calendar-range-middle-color)}.van-calendar__day--middle:after{position:absolute;top:0;right:0;bottom:0;left:0;background-color:currentColor;opacity:var(--van-calendar-range-middle-background-opacity);content:""}.van-calendar__day--disabled{color:var(--van-calendar-day-disabled-color);cursor:default}.van-calendar__top-info,.van-calendar__bottom-info{position:absolute;right:0;left:0;font-size:var(--van-calendar-info-font-size);line-height:var(--van-calendar-info-line-height)}@media (max-width:350px){.van-calendar__top-info,.van-calendar__bottom-info{font-size:9px}}.van-calendar__top-info{top:6px}.van-calendar__bottom-info{bottom:6px}.van-calendar__selected-day{width:var(--van-calendar-selected-day-size);height:var(--van-calendar-selected-day-size);color:var(--van-calendar-selected-day-color);background:var(--van-calendar-selected-day-background);border-radius:var(--van-radius-md)}.van-calendar__footer{flex-shrink:0;padding-left:var(--van-padding-md);padding-right:var(--van-padding-md)}.van-calendar__confirm{height:var(--van-calendar-confirm-button-height);margin:var(--van-calendar-confirm-button-margin)}:root,:host{--van-address-edit-padding: var(--van-padding-sm);--van-address-edit-buttons-padding: var(--van-padding-xl) var(--van-padding-base);--van-address-edit-button-margin-bottom: var(--van-padding-sm);--van-address-edit-button-font-size: var(--van-font-size-lg)}.van-address-edit{padding:var(--van-address-edit-padding)}.van-address-edit__fields{overflow:hidden;border-radius:var(--van-padding-xs)}.van-address-edit__fields .van-field__label{width:4.1em}.van-address-edit__default{margin-top:var(--van-padding-sm);overflow:hidden;border-radius:var(--van-padding-xs)}.van-address-edit__buttons{padding:var(--van-address-edit-buttons-padding)}.van-address-edit__button{margin-bottom:var(--van-address-edit-button-margin-bottom);font-size:var(--van-address-edit-button-font-size)}.van-address-edit-detail__search-item{background:var(--van-gray-2)}.van-radio-group--horizontal,.van-checkbox-group--horizontal{display:flex;flex-wrap:wrap}:root,:host{--van-checkbox-size: 20px;--van-checkbox-border-color: var(--van-gray-5);--van-checkbox-duration: var(--van-duration-fast);--van-checkbox-label-margin: var(--van-padding-xs);--van-checkbox-label-color: var(--van-text-color);--van-checkbox-checked-icon-color: var(--van-primary-color);--van-checkbox-disabled-icon-color: var(--van-gray-5);--van-checkbox-disabled-label-color: var(--van-text-color-3);--van-checkbox-disabled-background: var(--van-border-color)}.van-checkbox{display:flex;align-items:center;overflow:hidden;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-checkbox--disabled{cursor:not-allowed}.van-checkbox--label-disabled{cursor:default}.van-checkbox--horizontal{margin-right:var(--van-padding-sm)}.van-checkbox__icon{flex:none;height:1em;font-size:var(--van-checkbox-size);line-height:1em;cursor:pointer}.van-checkbox__icon .van-icon{display:block;box-sizing:border-box;width:1.25em;height:1.25em;color:transparent;font-size:.8em;line-height:1.25;text-align:center;border:1px solid var(--van-checkbox-border-color);transition-duration:var(--van-checkbox-duration);transition-property:color,border-color,background-color}.van-checkbox__icon--round .van-icon{border-radius:100%}.van-checkbox__icon--indeterminate .van-icon{display:flex;align-items:center;justify-content:center;color:var(--van-white);border-color:var(--van-checkbox-checked-icon-color);background-color:var(--van-checkbox-checked-icon-color)}.van-checkbox__icon--checked .van-icon{color:var(--van-white);background-color:var(--van-checkbox-checked-icon-color);border-color:var(--van-checkbox-checked-icon-color)}.van-checkbox__icon--disabled{cursor:not-allowed}.van-checkbox__icon--disabled .van-icon{background-color:var(--van-checkbox-disabled-background);border-color:var(--van-checkbox-disabled-icon-color)}.van-checkbox__icon--disabled.van-checkbox__icon--checked .van-icon{color:var(--van-checkbox-disabled-icon-color)}.van-checkbox__label{margin-left:var(--van-checkbox-label-margin);color:var(--van-checkbox-label-color);line-height:var(--van-checkbox-size)}.van-checkbox__label--left{margin:0 var(--van-checkbox-label-margin) 0 0}.van-checkbox__label--disabled{color:var(--van-checkbox-disabled-label-color)}:root,:host{--van-coupon-margin: 0 var(--van-padding-sm) var(--van-padding-sm);--van-coupon-content-height: 84px;--van-coupon-content-padding: 14px 0;--van-coupon-content-text-color: var(--van-text-color);--van-coupon-background: var(--van-background-2);--van-coupon-active-background: var(--van-active-color);--van-coupon-radius: var(--van-radius-lg);--van-coupon-shadow: 0 0 4px rgba(0, 0, 0, .1);--van-coupon-head-width: 96px;--van-coupon-amount-color: var(--van-primary-color);--van-coupon-amount-font-size: 30px;--van-coupon-currency-font-size: 40%;--van-coupon-name-font-size: var(--van-font-size-md);--van-coupon-disabled-text-color: var(--van-text-color-2);--van-coupon-description-padding: var(--van-padding-xs) var(--van-padding-md);--van-coupon-description-border-color: var(--van-border-color);--van-coupon-checkbox-color: var(--van-primary-color)}.van-coupon{margin:var(--van-coupon-margin);overflow:hidden;background:var(--van-coupon-background);border-radius:var(--van-coupon-radius);box-shadow:var(--van-coupon-shadow)}.van-coupon:active{background-color:var(--van-coupon-active-background)}.van-coupon__content{display:flex;align-items:center;box-sizing:border-box;min-height:var(--van-coupon-content-height);padding:var(--van-coupon-content-padding);color:var(--van-coupon-content-text-color)}.van-coupon__head{position:relative;min-width:var(--van-coupon-head-width);padding:0 var(--van-padding-xs);color:var(--van-coupon-amount-color);text-align:center}.van-coupon__amount,.van-coupon__condition,.van-coupon__name,.van-coupon__valid{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-coupon__amount{margin-bottom:6px;font-weight:var(--van-font-bold);font-size:var(--van-coupon-amount-font-size);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-coupon__amount span{font-size:var(--van-coupon-currency-font-size)}.van-coupon__amount span:not(:empty){margin-left:2px}.van-coupon__condition{font-size:var(--van-font-size-sm);line-height:16px;white-space:pre-wrap}.van-coupon__body{position:relative;flex:1}.van-coupon__name{margin-bottom:10px;font-weight:var(--van-font-bold);font-size:var(--van-coupon-name-font-size);line-height:var(--van-line-height-md)}.van-coupon__valid{font-size:var(--van-font-size-sm)}.van-coupon__corner{position:absolute;top:0;right:var(--van-padding-md);bottom:0}.van-coupon__corner .van-checkbox__icon--checked .van-icon{background-color:var(--van-coupon-checkbox-color);border-color:var(--van-coupon-checkbox-color)}.van-coupon__description{padding:var(--van-coupon-description-padding);font-size:var(--van-font-size-sm);border-top:1px dashed var(--van-coupon-description-border-color)}.van-coupon--disabled:active{background-color:var(--van-coupon-background)}.van-coupon--disabled .van-coupon-item__content{height:calc(var(--van-coupon-content-height) - 10px)}.van-coupon--disabled .van-coupon__head{color:inherit}:root,:host{--van-radio-size: 20px;--van-radio-dot-size: 8px;--van-radio-border-color: var(--van-gray-5);--van-radio-duration: var(--van-duration-fast);--van-radio-label-margin: var(--van-padding-xs);--van-radio-label-color: var(--van-text-color);--van-radio-checked-icon-color: var(--van-primary-color);--van-radio-disabled-icon-color: var(--van-gray-5);--van-radio-disabled-label-color: var(--van-text-color-3);--van-radio-disabled-background: var(--van-border-color)}.van-radio{display:flex;align-items:center;overflow:hidden;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-radio--disabled{cursor:not-allowed}.van-radio--label-disabled{cursor:default}.van-radio--horizontal{margin-right:var(--van-padding-sm)}.van-radio__icon{flex:none;height:1em;font-size:var(--van-radio-size);line-height:1em;cursor:pointer}.van-radio__icon .van-icon{display:block;box-sizing:border-box;width:1.25em;height:1.25em;color:transparent;font-size:.8em;line-height:1.25;text-align:center;border:1px solid var(--van-radio-border-color);transition-duration:var(--van-radio-duration);transition-property:color,border-color,background-color}.van-radio__icon--round .van-icon{border-radius:100%}.van-radio__icon--dot{position:relative;border-radius:100%;box-sizing:border-box;width:var(--van-radio-size);height:var(--van-radio-size);border:1px solid var(--van-radio-border-color);transition-duration:var(--van-radio-duration);transition-property:border-color}.van-radio__icon--dot__icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:100%;height:calc(100% - var(--van-radio-dot-size));width:calc(100% - var(--van-radio-dot-size));transition-duration:var(--van-radio-duration);transition-property:background-color}.van-radio__icon--checked .van-icon{color:var(--van-white);background-color:var(--van-radio-checked-icon-color);border-color:var(--van-radio-checked-icon-color)}.van-radio__icon--checked.van-radio__icon--dot{border-color:var(--van-radio-checked-icon-color)}.van-radio__icon--checked.van-radio__icon--dot .van-radio__icon--dot__icon{background:var(--van-radio-checked-icon-color)}.van-radio__icon--disabled{cursor:not-allowed}.van-radio__icon--disabled .van-icon{background-color:var(--van-radio-disabled-background);border-color:var(--van-radio-disabled-icon-color)}.van-radio__icon--disabled.van-radio__icon--checked .van-icon{color:var(--van-radio-disabled-icon-color)}.van-radio__label{margin-left:var(--van-radio-label-margin);color:var(--van-radio-label-color);line-height:var(--van-radio-size)}.van-radio__label--left{margin:0 var(--van-radio-label-margin) 0 0}.van-radio__label--disabled{color:var(--van-radio-disabled-label-color)}:root,:host{--van-contact-list-padding: var(--van-padding-sm) var(--van-padding-sm) 80px;--van-contact-list-edit-icon-size: 16px;--van-contact-list-add-button-z-index: 999;--van-contact-list-radio-color: var(--van-primary-color);--van-contact-list-item-padding: var(--van-padding-md)}.van-contact-list{box-sizing:border-box;height:100%;padding:var(--van-contact-list-padding)}.van-contact-list__item{padding:var(--van-contact-list-item-padding)}.van-contact-list__item-title{display:flex;align-items:center;padding-right:var(--van-padding-xl);padding-left:var(--van-padding-xs)}.van-contact-list__item-tag{flex:none;margin-left:var(--van-padding-xs);padding-top:0;padding-bottom:0;line-height:1.4em}.van-contact-list__group{box-sizing:border-box;height:100%;overflow-y:scroll;-webkit-overflow-scrolling:touch;border-radius:var(--van-radius-lg)}.van-contact-list__edit{font-size:var(--van-contact-list-edit-icon-size)}.van-contact-list__radio .van-radio__icon--checked .van-icon{background-color:var(--van-contact-list-radio-color);border-color:var(--van-contact-list-radio-color)}.van-contact-list__bottom{position:fixed;right:0;bottom:0;left:0;z-index:var(--van-contact-list-add-button-z-index);padding-left:var(--van-padding-md);padding-right:var(--van-padding-md);background-color:var(--van-background-2)}.van-contact-list__add{height:40px;margin:5px 0}:root,:host{--van-address-list-padding: var(--van-padding-sm) var(--van-padding-sm) 80px;--van-address-list-disabled-text-color: var(--van-text-color-2);--van-address-list-disabled-text-padding: calc(var(--van-padding-base) * 5) 0;--van-address-list-disabled-text-font-size: var(--van-font-size-md);--van-address-list-disabled-text-line-height: var(--van-line-height-md);--van-address-list-add-button-z-index: 999;--van-address-list-item-padding: var(--van-padding-sm);--van-address-list-item-text-color: var(--van-text-color);--van-address-list-item-disabled-text-color: var(--van-text-color-3);--van-address-list-item-font-size: 13px;--van-address-list-item-line-height: var(--van-line-height-sm);--van-address-list-radio-color: var(--van-primary-color);--van-address-list-edit-icon-size: 20px}.van-address-list{box-sizing:border-box;height:100%;padding:var(--van-address-list-padding)}.van-address-list__bottom{position:fixed;bottom:0;left:0;z-index:var(--van-address-list-add-button-z-index);box-sizing:border-box;width:100%;padding-left:var(--van-padding-md);padding-right:var(--van-padding-md);background-color:var(--van-background-2)}.van-address-list__add{height:40px;margin:5px 0}.van-address-list__disabled-text{padding:var(--van-address-list-disabled-text-padding);color:var(--van-address-list-disabled-text-color);font-size:var(--van-address-list-disabled-text-font-size);line-height:var(--van-address-list-disabled-text-line-height)}.van-address-item{padding:var(--van-address-list-item-padding);background-color:var(--van-background-2);border-radius:var(--van-radius-lg)}.van-address-item:not(:last-child){margin-bottom:var(--van-padding-sm)}.van-address-item__title{padding-right:44px}.van-address-item__name{display:flex;align-items:center;margin-bottom:var(--van-padding-xs);font-size:var(--van-font-size-lg);line-height:var(--van-line-height-lg)}.van-address-item__tag{flex:none;margin-left:var(--van-padding-xs);padding-top:0;padding-bottom:0;line-height:1.4em}.van-address-item__address{color:var(--van-address-list-item-text-color);font-size:var(--van-address-list-item-font-size);line-height:var(--van-address-list-item-line-height)}.van-address-item--disabled .van-address-item__name,.van-address-item--disabled .van-address-item__address{color:var(--van-address-list-item-disabled-text-color)}.van-address-item__edit{position:absolute;top:50%;right:var(--van-padding-md);color:var(--van-gray-6);font-size:var(--van-address-list-edit-icon-size);transform:translateY(-50%)}.van-address-item .van-cell{padding:0}.van-address-item .van-radio__label{margin-left:var(--van-padding-sm)}.van-address-item .van-radio__icon--checked .van-icon{background-color:var(--van-address-list-radio-color);border-color:var(--van-address-list-radio-color)}:root,:host{--van-barrage-font-size: 16px;--van-barrage-space: 10px;--van-barrage-font: inherit;--van-barrage-color: var(--van-white)}.van-barrage{position:relative;overflow:hidden}.van-barrage__item{position:absolute;top:0;right:0;z-index:99;padding-bottom:var(--van-barrage-space);opacity:.75;line-height:1;font-size:var(--van-barrage-font-size);font-family:var(--van-barrage-font);font-weight:700;white-space:nowrap;color:var(--van-barrage-color);text-shadow:1px 0 1px #000000,0 1px 1px #000000,0 -1px 1px #000000,-1px 0 1px #000000;-webkit-user-select:none;-moz-user-select:none;user-select:none;will-change:transform;transform:translate(110%)}@keyframes van-barrage{0%{transform:translate(110%)}to{transform:translate(var(--move-distance))}}:root,:host{--van-cell-group-background: var(--van-background-2);--van-cell-group-title-color: var(--van-text-color-2);--van-cell-group-title-padding: var(--van-padding-md) var(--van-padding-md);--van-cell-group-title-font-size: var(--van-font-size-md);--van-cell-group-title-line-height: 16px;--van-cell-group-inset-padding: 0 var(--van-padding-md);--van-cell-group-inset-radius: var(--van-radius-lg);--van-cell-group-inset-title-padding: var(--van-padding-md) var(--van-padding-md)}.van-cell-group{background:var(--van-cell-group-background)}.van-cell-group--inset{margin:var(--van-cell-group-inset-padding);border-radius:var(--van-cell-group-inset-radius);overflow:hidden}.van-cell-group__title{padding:var(--van-cell-group-title-padding);color:var(--van-cell-group-title-color);font-size:var(--van-cell-group-title-font-size);line-height:var(--van-cell-group-title-line-height)}.van-cell-group__title--inset{padding:var(--van-cell-group-inset-title-padding)}:root,:host{--van-circle-size: 100px;--van-circle-color: var(--van-primary-color);--van-circle-layer-color: var(--van-white);--van-circle-text-color: var(--van-text-color);--van-circle-text-font-weight: var(--van-font-bold);--van-circle-text-font-size: var(--van-font-size-md);--van-circle-text-line-height: var(--van-line-height-md)}.van-circle{position:relative;display:inline-block;width:var(--van-circle-size);height:var(--van-circle-size);text-align:center}.van-circle svg{position:absolute;top:0;left:0;width:100%;height:100%}.van-circle__layer{stroke:var(--van-circle-layer-color)}.van-circle__hover{fill:none;stroke:var(--van-circle-color);stroke-linecap:round}.van-circle__text{position:absolute;top:50%;left:0;box-sizing:border-box;width:100%;padding:0 var(--van-padding-base);color:var(--van-circle-text-color);font-weight:var(--van-circle-text-font-weight);font-size:var(--van-circle-text-font-size);line-height:var(--van-circle-text-line-height);transform:translateY(-50%)}.van-row{display:flex;flex-wrap:wrap}.van-row--nowrap{flex-wrap:nowrap}.van-row--justify-center{justify-content:center}.van-row--justify-end{justify-content:flex-end}.van-row--justify-space-between{justify-content:space-between}.van-row--justify-space-around{justify-content:space-around}.van-row--align-center{align-items:center}.van-row--align-bottom{align-items:flex-end}.van-col{display:block;box-sizing:border-box;min-height:1px}.van-col--1{flex:0 0 4.16666667%;max-width:4.16666667%}.van-col--offset-1{margin-left:4.16666667%}.van-col--2{flex:0 0 8.33333333%;max-width:8.33333333%}.van-col--offset-2{margin-left:8.33333333%}.van-col--3{flex:0 0 12.5%;max-width:12.5%}.van-col--offset-3{margin-left:12.5%}.van-col--4{flex:0 0 16.66666667%;max-width:16.66666667%}.van-col--offset-4{margin-left:16.66666667%}.van-col--5{flex:0 0 20.83333333%;max-width:20.83333333%}.van-col--offset-5{margin-left:20.83333333%}.van-col--6{flex:0 0 25%;max-width:25%}.van-col--offset-6{margin-left:25%}.van-col--7{flex:0 0 29.16666667%;max-width:29.16666667%}.van-col--offset-7{margin-left:29.16666667%}.van-col--8{flex:0 0 33.33333333%;max-width:33.33333333%}.van-col--offset-8{margin-left:33.33333333%}.van-col--9{flex:0 0 37.5%;max-width:37.5%}.van-col--offset-9{margin-left:37.5%}.van-col--10{flex:0 0 41.66666667%;max-width:41.66666667%}.van-col--offset-10{margin-left:41.66666667%}.van-col--11{flex:0 0 45.83333333%;max-width:45.83333333%}.van-col--offset-11{margin-left:45.83333333%}.van-col--12{flex:0 0 50%;max-width:50%}.van-col--offset-12{margin-left:50%}.van-col--13{flex:0 0 54.16666667%;max-width:54.16666667%}.van-col--offset-13{margin-left:54.16666667%}.van-col--14{flex:0 0 58.33333333%;max-width:58.33333333%}.van-col--offset-14{margin-left:58.33333333%}.van-col--15{flex:0 0 62.5%;max-width:62.5%}.van-col--offset-15{margin-left:62.5%}.van-col--16{flex:0 0 66.66666667%;max-width:66.66666667%}.van-col--offset-16{margin-left:66.66666667%}.van-col--17{flex:0 0 70.83333333%;max-width:70.83333333%}.van-col--offset-17{margin-left:70.83333333%}.van-col--18{flex:0 0 75%;max-width:75%}.van-col--offset-18{margin-left:75%}.van-col--19{flex:0 0 79.16666667%;max-width:79.16666667%}.van-col--offset-19{margin-left:79.16666667%}.van-col--20{flex:0 0 83.33333333%;max-width:83.33333333%}.van-col--offset-20{margin-left:83.33333333%}.van-col--21{flex:0 0 87.5%;max-width:87.5%}.van-col--offset-21{margin-left:87.5%}.van-col--22{flex:0 0 91.66666667%;max-width:91.66666667%}.van-col--offset-22{margin-left:91.66666667%}.van-col--23{flex:0 0 95.83333333%;max-width:95.83333333%}.van-col--offset-23{margin-left:95.83333333%}.van-col--24{flex:0 0 100%;max-width:100%}.van-col--offset-24{margin-left:100%}:root,:host{--van-count-down-text-color: var(--van-text-color);--van-count-down-font-size: var(--van-font-size-md);--van-count-down-line-height: var(--van-line-height-md)}.van-count-down{color:var(--van-count-down-text-color);font-size:var(--van-count-down-font-size);line-height:var(--van-count-down-line-height)}:root,:host{--van-empty-padding: var(--van-padding-xl) 0;--van-empty-image-size: 160px;--van-empty-description-margin-top: var(--van-padding-md);--van-empty-description-padding: 0 60px;--van-empty-description-color: var(--van-text-color-2);--van-empty-description-font-size: var(--van-font-size-md);--van-empty-description-line-height: var(--van-line-height-md);--van-empty-bottom-margin-top: 24px}.van-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;box-sizing:border-box;padding:var(--van-empty-padding)}.van-empty__image{width:var(--van-empty-image-size);height:var(--van-empty-image-size)}.van-empty__image img{width:100%;height:100%}.van-empty__description{margin-top:var(--van-empty-description-margin-top);padding:var(--van-empty-description-padding);color:var(--van-empty-description-color);font-size:var(--van-empty-description-font-size);line-height:var(--van-empty-description-line-height)}.van-empty__bottom{margin-top:var(--van-empty-bottom-margin-top)}.van-theme-dark .van-empty{opacity:.5}:root,:host{--van-coupon-list-background: var(--van-background);--van-coupon-list-field-padding: 5px 0 5px var(--van-padding-md);--van-coupon-list-exchange-button-height: 32px;--van-coupon-list-close-button-height: 40px;--van-coupon-list-empty-tip-color: var(--van-text-color-2);--van-coupon-list-empty-tip-font-size: var(--van-font-size-md);--van-coupon-list-empty-tip-line-height: var(--van-line-height-md)}.van-coupon-list{position:relative;height:100%;background:var(--van-coupon-list-background)}.van-coupon-list__field{padding:var(--van-coupon-list-field-padding)}.van-coupon-list__field .van-field__body{height:34px;padding-left:var(--van-padding-sm);line-height:34px;background:var(--van-background);border-radius:var(--van-radius-max)}.van-coupon-list__field .van-field__body::-moz-placeholder{color:var(--van-text-color-3)}.van-coupon-list__field .van-field__body::placeholder{color:var(--van-text-color-3)}.van-coupon-list__field .van-field__clear{margin-right:0}.van-coupon-list__exchange-bar{display:flex;align-items:center;background-color:var(--van-background-2)}.van-coupon-list__exchange{flex:none;height:var(--van-coupon-list-exchange-button-height);font-size:var(--van-font-size-lg);line-height:calc(var(--van-coupon-list-exchange-button-height) - 2px);border:0}.van-coupon-list .van-tabs__wrap{box-shadow:0 6px 12px -12px var(--van-gray-6)}.van-coupon-list__list{box-sizing:border-box;padding:var(--van-padding-md) 0 var(--van-padding-lg);overflow-y:auto;-webkit-overflow-scrolling:touch}.van-coupon-list__list--with-bottom{padding-bottom:50px}.van-coupon-list__bottom{position:absolute;bottom:0;left:0;z-index:999;box-sizing:border-box;width:100%;padding:5px var(--van-padding-md);font-weight:var(--van-font-bold);background-color:var(--van-background-2)}.van-coupon-list__close{height:var(--van-coupon-list-close-button-height)}.van-coupon-list__empty-tip{color:var(--van-coupon-list-empty-tip-color);font-size:var(--van-coupon-list-empty-tip-font-size);line-height:var(--van-coupon-list-empty-tip-line-height)}:root,:host{--van-divider-margin: var(--van-padding-md) 0;--van-divider-vertical-margin: 0 var(--van-padding-xs);--van-divider-text-color: var(--van-text-color-2);--van-divider-font-size: var(--van-font-size-md);--van-divider-line-height: 24px;--van-divider-border-color: var(--van-border-color);--van-divider-content-padding: var(--van-padding-md);--van-divider-content-left-width: 10%;--van-divider-content-right-width: 10%}.van-divider{display:flex;align-items:center;margin:var(--van-divider-margin);color:var(--van-divider-text-color);font-size:var(--van-divider-font-size);line-height:var(--van-divider-line-height);border-color:var(--van-divider-border-color);border-style:solid;border-width:0}.van-divider:before,.van-divider:after{display:block;flex:1;box-sizing:border-box;height:1px;border-color:inherit;border-style:inherit;border-width:var(--van-border-width) 0 0}.van-divider:before{content:""}.van-divider--hairline:before,.van-divider--hairline:after{transform:scaleY(.5)}.van-divider--dashed{border-style:dashed}.van-divider--content-center:before,.van-divider--content-left:before,.van-divider--content-right:before{margin-right:var(--van-divider-content-padding)}.van-divider--content-center:after,.van-divider--content-left:after,.van-divider--content-right:after{margin-left:var(--van-divider-content-padding);content:""}.van-divider--content-left:before{max-width:var(--van-divider-content-left-width)}.van-divider--content-right:after{max-width:var(--van-divider-content-right-width)}.van-divider--vertical{display:inline-block;width:var(--van-border-width);height:1em;margin:var(--van-divider-vertical-margin);vertical-align:middle}.van-divider--vertical:before{height:100%;border-width:0 0 0 var(--van-border-width)}.van-divider--vertical:after{display:none}.van-divider--vertical.van-divider--hairline:before{transform:scaleX(.5)}:root,:host{--van-dropdown-menu-height: 48px;--van-dropdown-menu-background: var(--van-background-2);--van-dropdown-menu-shadow: 0 2px 12px rgba(100, 101, 102, .12);--van-dropdown-menu-title-font-size: 15px;--van-dropdown-menu-title-text-color: var(--van-text-color);--van-dropdown-menu-title-active-text-color: var(--van-primary-color);--van-dropdown-menu-title-disabled-text-color: var(--van-text-color-2);--van-dropdown-menu-title-padding: 0 var(--van-padding-xs);--van-dropdown-menu-title-line-height: var(--van-line-height-lg);--van-dropdown-menu-option-active-color: var(--van-primary-color);--van-dropdown-menu-option-disabled-color: var(--van-text-color-3);--van-dropdown-menu-content-max-height: 80%}.van-dropdown-menu{-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-dropdown-menu__bar{position:relative;display:flex;height:var(--van-dropdown-menu-height);background:var(--van-dropdown-menu-background);box-shadow:var(--van-dropdown-menu-shadow)}.van-dropdown-menu__bar--opened{z-index:calc(var(--van-dropdown-item-z-index) + 1)}.van-dropdown-menu__bar--scrollable{padding-left:var(--van-padding-base);padding-right:var(--van-padding-xs);overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch}.van-dropdown-menu__bar--scrollable::-webkit-scrollbar{display:none}.van-dropdown-menu__item{display:flex;flex:1;align-items:center;justify-content:center;min-width:0}.van-dropdown-menu__item--disabled .van-dropdown-menu__title{color:var(--van-dropdown-menu-title-disabled-text-color)}.van-dropdown-menu__item--grow{flex:1 0 auto;padding-left:var(--van-padding-base);padding-right:var(--van-padding-sm)}.van-dropdown-menu__title{position:relative;box-sizing:border-box;max-width:100%;padding:var(--van-dropdown-menu-title-padding);color:var(--van-dropdown-menu-title-text-color);font-size:var(--van-dropdown-menu-title-font-size);line-height:var(--van-dropdown-menu-title-line-height)}.van-dropdown-menu__title:after{position:absolute;top:50%;right:-4px;margin-top:-5px;border:3px solid;border-color:transparent transparent var(--van-gray-4) var(--van-gray-4);transform:rotate(-45deg);opacity:.8;content:""}.van-dropdown-menu__title--active{color:var(--van-dropdown-menu-title-active-text-color)}.van-dropdown-menu__title--active:after{border-color:transparent transparent currentColor currentColor}.van-dropdown-menu__title--down:after{margin-top:-1px;transform:rotate(135deg)}:root,:host{--van-dropdown-item-z-index: 10}.van-dropdown-item{position:fixed;right:0;left:0;z-index:var(--van-dropdown-item-z-index);overflow:hidden}.van-dropdown-item__icon{display:block;line-height:inherit}.van-dropdown-item__option{text-align:left}.van-dropdown-item__option--active,.van-dropdown-item__option--active .van-dropdown-item__icon{color:var(--van-dropdown-menu-option-active-color)}.van-dropdown-item__option--disabled,.van-dropdown-item__option--disabled .van-dropdown-item__icon{color:var(--van-dropdown-menu-option-disabled-color)}.van-dropdown-item--up{top:0}.van-dropdown-item--down{bottom:0}.van-dropdown-item__content{position:absolute;max-height:var(--van-dropdown-menu-content-max-height)}:root,:host{--van-floating-panel-border-radius: 16px;--van-floating-panel-header-height: 30px;--van-floating-panel-z-index: 999;--van-floating-panel-background: var(--van-background-2);--van-floating-panel-bar-width: 20px;--van-floating-panel-bar-height: 3px;--van-floating-panel-bar-color: var(--van-gray-5)}.van-floating-panel{position:fixed;left:0;bottom:0;width:100vw;z-index:var(--van-floating-panel-z-index);display:flex;flex-direction:column;touch-action:none;border-top-left-radius:var(--van-floating-panel-border-radius);border-top-right-radius:var(--van-floating-panel-border-radius);background:var(--van-floating-panel-background);will-change:transform}.van-floating-panel:after{content:"";display:block;position:absolute;bottom:-100vh;height:100vh;width:100vw;background-color:inherit}.van-floating-panel__header{height:var(--van-floating-panel-header-height);display:flex;justify-content:center;align-items:center;cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-floating-panel__header-bar{height:var(--van-floating-panel-bar-height);width:var(--van-floating-panel-bar-width);border-radius:var(--van-radius-md);background:var(--van-floating-panel-bar-color)}.van-floating-panel__content{flex:1;overflow-y:auto;background-color:var(--van-floating-panel-background);-webkit-overflow-scrolling:touch}.van-grid{display:flex;flex-wrap:wrap}:root,:host{--van-grid-item-content-padding: var(--van-padding-md) var(--van-padding-xs);--van-grid-item-content-background: var(--van-background-2);--van-grid-item-content-active-color: var(--van-active-color);--van-grid-item-icon-size: 28px;--van-grid-item-text-color: var(--van-text-color);--van-grid-item-text-font-size: var(--van-font-size-sm)}.van-grid-item{position:relative;box-sizing:border-box}.van-grid-item--square{height:0}.van-grid-item__icon{font-size:var(--van-grid-item-icon-size)}.van-grid-item__text{color:var(--van-grid-item-text-color);font-size:var(--van-grid-item-text-font-size);line-height:1.5;word-break:break-all}.van-grid-item__icon+.van-grid-item__text{margin-top:var(--van-padding-xs)}.van-grid-item__content{display:flex;flex-direction:column;box-sizing:border-box;height:100%;padding:var(--van-grid-item-content-padding);background:var(--van-grid-item-content-background)}.van-grid-item__content:after{z-index:1;border-width:0 var(--van-border-width) var(--van-border-width) 0}.van-grid-item__content--square{position:absolute;top:0;right:0;left:0}.van-grid-item__content--center{align-items:center;justify-content:center}.van-grid-item__content--horizontal{flex-direction:row}.van-grid-item__content--horizontal .van-grid-item__text{margin:0 0 0 var(--van-padding-xs)}.van-grid-item__content--reverse{flex-direction:column-reverse}.van-grid-item__content--reverse .van-grid-item__text{margin:0 0 var(--van-padding-xs)}.van-grid-item__content--horizontal.van-grid-item__content--reverse{flex-direction:row-reverse}.van-grid-item__content--horizontal.van-grid-item__content--reverse .van-grid-item__text{margin:0 var(--van-padding-xs) 0 0}.van-grid-item__content--surround:after{border-width:var(--van-border-width)}.van-grid-item__content--clickable{cursor:pointer}.van-grid-item__content--clickable:active{background-color:var(--van-grid-item-content-active-color)}:root,:host{--van-highlight-tag-color: var(--van-primary-color)}.van-highlight__tag{color:var(--van-highlight-tag-color)}:root,:host{--van-index-bar-sidebar-z-index: 2;--van-index-bar-index-font-size: var(--van-font-size-xs);--van-index-bar-index-line-height: var(--van-line-height-xs);--van-index-bar-index-active-color: var(--van-primary-color)}.van-index-bar__sidebar{position:fixed;top:50%;right:0;z-index:var(--van-index-bar-sidebar-z-index);display:flex;flex-direction:column;text-align:center;transform:translateY(-50%);cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-index-bar__index{padding:0 var(--van-padding-xs) 0 var(--van-padding-md);font-weight:var(--van-font-bold);font-size:var(--van-index-bar-index-font-size);line-height:var(--van-index-bar-index-line-height)}.van-index-bar__index--active{color:var(--van-index-bar-index-active-color);font-weight:700}:root,:host{--van-index-anchor-z-index: 1;--van-index-anchor-padding: 0 var(--van-padding-md);--van-index-anchor-text-color: var(--van-text-color);--van-index-anchor-font-weight: var(--van-font-bold);--van-index-anchor-font-size: var(--van-font-size-md);--van-index-anchor-line-height: 32px;--van-index-anchor-background: transparent;--van-index-anchor-sticky-text-color: var(--van-primary-color);--van-index-anchor-sticky-background: var(--van-background-2)}.van-index-anchor{z-index:var(--van-index-anchor-z-index);box-sizing:border-box;padding:var(--van-index-anchor-padding);color:var(--van-index-anchor-text-color);font-weight:var(--van-index-anchor-font-weight);font-size:var(--van-index-anchor-font-size);line-height:var(--van-index-anchor-line-height);background:var(--van-index-anchor-background)}.van-index-anchor--sticky{position:fixed;top:0;right:0;left:0;color:var(--van-index-anchor-sticky-text-color);background:var(--van-index-anchor-sticky-background)}:root,:host{--van-pagination-height: 40px;--van-pagination-font-size: var(--van-font-size-md);--van-pagination-item-width: 36px;--van-pagination-item-default-color: var(--van-primary-color);--van-pagination-item-disabled-color: var(--van-gray-7);--van-pagination-item-disabled-background: var(--van-background);--van-pagination-background: var(--van-background-2);--van-pagination-desc-color: var(--van-gray-7);--van-pagination-disabled-opacity: var(--van-disabled-opacity)}.van-pagination{font-size:var(--van-pagination-font-size)}.van-pagination__items{display:flex}.van-pagination__item,.van-pagination__page-desc{display:flex;align-items:center;justify-content:center}.van-pagination__item{flex:1;box-sizing:border-box;min-width:var(--van-pagination-item-width);height:var(--van-pagination-height);color:var(--van-pagination-item-default-color);background:var(--van-pagination-background);cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-pagination__item button{flex:1;height:100%;border:none;padding:0;background:transparent}.van-pagination__item button[disabled]{cursor:not-allowed}.van-pagination__item:active{color:var(--van-white);background-color:var(--van-pagination-item-default-color)}.van-pagination__item:not(:last-child):after{border-right-width:0}.van-pagination__item--active{color:var(--van-white);background-color:var(--van-pagination-item-default-color)}.van-pagination__item--page{flex-grow:0}.van-pagination__item--prev,.van-pagination__item--next{padding:0 var(--van-padding-base);cursor:pointer}.van-pagination__item--border:first-child:after{border-right-width:var(--van-border-width)}.van-pagination__item--disabled,.van-pagination__item--disabled:active{color:var(--van-pagination-item-disabled-color);background-color:var(--van-pagination-item-disabled-background);opacity:var(--van-pagination-disabled-opacity)}.van-pagination__page-desc{flex:1;height:var(--van-pagination-height);color:var(--van-pagination-desc-color)}:root,:host{--van-password-input-height: 50px;--van-password-input-margin: 0 var(--van-padding-md);--van-password-input-font-size: 20px;--van-password-input-radius: 6px;--van-password-input-background: var(--van-background-2);--van-password-input-info-color: var(--van-text-color-2);--van-password-input-info-font-size: var(--van-font-size-md);--van-password-input-error-info-color: var(--van-danger-color);--van-password-input-dot-size: 10px;--van-password-input-dot-color: var(--van-text-color);--van-password-input-text-color: var(--van-text-color);--van-password-input-cursor-color: var(--van-text-color);--van-password-input-cursor-width: 1px;--van-password-input-cursor-height: 40%;--van-password-input-cursor-duration: 1s}.van-password-input{position:relative;margin:var(--van-password-input-margin);-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-password-input__info,.van-password-input__error-info{margin-top:var(--van-padding-md);font-size:var(--van-password-input-info-font-size);text-align:center}.van-password-input__info{color:var(--van-password-input-info-color)}.van-password-input__error-info{color:var(--van-password-input-error-info-color)}.van-password-input__security{display:flex;width:100%;height:var(--van-password-input-height);cursor:pointer}.van-password-input__security:after{border-radius:var(--van-password-input-radius)}.van-password-input__security li{position:relative;display:flex;flex:1;align-items:center;justify-content:center;height:100%;color:var(--van-password-input-text-color);font-size:var(--van-password-input-font-size);line-height:1.2;background:var(--van-password-input-background)}.van-password-input__security i{position:absolute;top:50%;left:50%;width:var(--van-password-input-dot-size);height:var(--van-password-input-dot-size);background:var(--van-password-input-dot-color);border-radius:100%;transform:translate(-50%,-50%);visibility:hidden}.van-password-input__cursor{position:absolute;top:50%;left:50%;width:var(--van-password-input-cursor-width);height:var(--van-password-input-cursor-height);background:var(--van-password-input-cursor-color);transform:translate(-50%,-50%);animation:var(--van-password-input-cursor-duration) van-cursor-flicker infinite}@keyframes van-cursor-flicker{0%{opacity:0}50%{opacity:1}to{opacity:0}}:root,:host{--van-progress-height: 4px;--van-progress-color: var(--van-primary-color);--van-progress-inactive-color: var(--van-gray-5);--van-progress-background: var(--van-gray-3);--van-progress-pivot-padding: 0 5px;--van-progress-pivot-text-color: var(--van-white);--van-progress-pivot-font-size: var(--van-font-size-xs);--van-progress-pivot-line-height: 1.6;--van-progress-pivot-background: var(--van-primary-color)}.van-progress{position:relative;height:var(--van-progress-height);background:var(--van-progress-background);border-radius:var(--van-progress-height)}.van-progress__portion{position:absolute;left:0;width:100%;height:100%;background:var(--van-progress-color);border-radius:inherit;transform-origin:0;transition:all var(--van-duration-base) var(--van-ease-out)}.van-progress__portion--inactive{background:var(--van-progress-inactive-color)}.van-progress__pivot{position:absolute;top:50%;box-sizing:border-box;min-width:3.6em;padding:var(--van-progress-pivot-padding);color:var(--van-progress-pivot-text-color);font-size:var(--van-progress-pivot-font-size);line-height:var(--van-progress-pivot-line-height);text-align:center;word-break:keep-all;background:var(--van-progress-pivot-background);border-radius:1em;transition:all var(--van-duration-base) var(--van-ease-out)}.van-progress__pivot--inactive{background:var(--van-progress-inactive-color)}:root,:host{--van-rolling-text-background: inherit;--van-rolling-text-color: var(--van-text-color);--van-rolling-text-font-size: var(--van-font-size-md);--van-rolling-text-gap: 0px;--van-rolling-text-item-width: 15px;--van-rolling-text-item-border-radius: 0px}.van-rolling-text{display:inline-flex;justify-content:center;align-items:center;font-size:var(--van-rolling-text-font-size);color:var(--van-rolling-text-color)}.van-rolling-text-item{margin-right:var(--van-rolling-text-gap);width:var(--van-rolling-text-item-width);border-radius:var(--van-rolling-text-item-border-radius);background:var(--van-rolling-text-background);overflow:hidden}.van-rolling-text-item:last-child{margin-right:0}.van-rolling-text-item__box{overflow:hidden}.van-rolling-text-item__box--animate{animation:van-up var(--van-duration) ease-in-out var(--van-delay);animation-iteration-count:1;animation-fill-mode:both}.van-rolling-text-item__item{text-align:center}.van-rolling-text-item--down .van-rolling-text-item__box{transform:translateY(var(--van-translate))}.van-rolling-text-item--down .van-rolling-text-item__box--animate{animation-name:van-down}@keyframes van-down{0%{transform:translateY(var(--van-translate))}to{transform:translateY(0)}}@keyframes van-up{0%{transform:translateY(0)}to{transform:translateY(var(--van-translate))}}:root,:host{--van-sidebar-width: 80px}.van-sidebar{width:var(--van-sidebar-width);overflow-y:auto;-webkit-overflow-scrolling:touch}:root,:host{--van-sidebar-font-size: var(--van-font-size-md);--van-sidebar-line-height: var(--van-line-height-md);--van-sidebar-text-color: var(--van-text-color);--van-sidebar-disabled-text-color: var(--van-text-color-3);--van-sidebar-padding: 20px var(--van-padding-sm);--van-sidebar-active-color: var(--van-active-color);--van-sidebar-background: var(--van-background);--van-sidebar-selected-font-weight: var(--van-font-bold);--van-sidebar-selected-text-color: var(--van-text-color);--van-sidebar-selected-border-width: 4px;--van-sidebar-selected-border-height: 16px;--van-sidebar-selected-border-color: var(--van-primary-color);--van-sidebar-selected-background: var(--van-background-2)}.van-sidebar-item{position:relative;display:block;box-sizing:border-box;padding:var(--van-sidebar-padding);overflow:hidden;color:var(--van-sidebar-text-color);font-size:var(--van-sidebar-font-size);line-height:var(--van-sidebar-line-height);background:var(--van-sidebar-background);cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-sidebar-item:active{background-color:var(--van-sidebar-active-color)}.van-sidebar-item:not(:last-child):after{border-bottom-width:1px}.van-sidebar-item__text{word-break:break-all}.van-sidebar-item--select{color:var(--van-sidebar-selected-text-color);font-weight:var(--van-sidebar-selected-font-weight)}.van-sidebar-item--select,.van-sidebar-item--select:active{background-color:var(--van-sidebar-selected-background)}.van-sidebar-item--select:before{position:absolute;top:50%;left:0;width:var(--van-sidebar-selected-border-width);height:var(--van-sidebar-selected-border-height);background-color:var(--van-sidebar-selected-border-color);transform:translateY(-50%);content:""}.van-sidebar-item--disabled{color:var(--van-sidebar-disabled-text-color);cursor:not-allowed}.van-sidebar-item--disabled:active{background-color:var(--van-sidebar-background)}:root,:host{--van-tree-select-font-size: var(--van-font-size-md);--van-tree-select-nav-background: var(--van-background);--van-tree-select-content-background: var(--van-background-2);--van-tree-select-nav-item-padding: 14px var(--van-padding-sm);--van-tree-select-item-height: 48px;--van-tree-select-item-active-color: var(--van-primary-color);--van-tree-select-item-disabled-color: var(--van-gray-5);--van-tree-select-item-selected-size: 16px}.van-tree-select{position:relative;display:flex;font-size:var(--van-tree-select-font-size)}.van-tree-select__nav{flex:1;overflow-y:auto;background:var(--van-tree-select-nav-background);-webkit-overflow-scrolling:touch}.van-tree-select__nav-item{padding:var(--van-tree-select-nav-item-padding)}.van-tree-select__content{flex:2;overflow-y:auto;background:var(--van-tree-select-content-background);-webkit-overflow-scrolling:touch}.van-tree-select__item{position:relative;padding:0 32px 0 var(--van-padding-md);font-weight:var(--van-font-bold);line-height:var(--van-tree-select-item-height);-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer}.van-tree-select__item--active{color:var(--van-tree-select-item-active-color)}.van-tree-select__item:active{background-color:var(--van-active-color)}.van-tree-select__item--disabled{color:var(--van-tree-select-item-disabled-color);cursor:not-allowed}.van-tree-select__item--disabled:active{background-color:transparent}.van-tree-select__selected{position:absolute;top:50%;right:var(--van-padding-md);margin-top:calc(var(--van-padding-xs) * -1);font-size:var(--van-tree-select-item-selected-size)}:root,:host{--van-skeleton-title-width: 40%}.van-skeleton-title{height:var(--van-skeleton-paragraph-height);background:var(--van-skeleton-paragraph-background)}.van-skeleton-title--round{border-radius:var(--van-radius-max)}.van-skeleton-title{width:var(--van-skeleton-title-width);margin:0}.van-skeleton-title+.van-skeleton-paragraph{margin-top:20px}:root,:host{--van-skeleton-avatar-size: 32px;--van-skeleton-avatar-background: var(--van-active-color)}.van-skeleton-avatar{flex-shrink:0;width:var(--van-skeleton-avatar-size);height:var(--van-skeleton-avatar-size);margin-right:var(--van-padding-md);background:var(--van-skeleton-avatar-background)}.van-skeleton-avatar--round{border-radius:var(--van-radius-max)}.van-skeleton-avatar+.van-skeleton__content{padding-top:var(--van-padding-xs)}:root,:host{--van-skeleton-paragraph-height: 16px;--van-skeleton-paragraph-background: var(--van-active-color);--van-skeleton-paragraph-margin-top: var(--van-padding-sm)}.van-skeleton-paragraph{height:var(--van-skeleton-paragraph-height);background:var(--van-skeleton-paragraph-background)}.van-skeleton-paragraph--round{border-radius:var(--van-radius-max)}.van-skeleton-paragraph:not(:first-child){margin-top:var(--van-skeleton-paragraph-margin-top)}:root,:host{--van-skeleton-duration: 1.2s}.van-skeleton{display:flex;padding:0 var(--van-padding-md)}.van-skeleton__content{width:100%}.van-skeleton--animate{animation:van-skeleton-blink var(--van-skeleton-duration) ease-in-out infinite}@keyframes van-skeleton-blink{50%{opacity:.6}}:root,:host{--van-slider-active-background: var(--van-primary-color);--van-slider-inactive-background: var(--van-gray-3);--van-slider-disabled-opacity: var(--van-disabled-opacity);--van-slider-bar-height: 2px;--van-slider-button-width: 24px;--van-slider-button-height: 24px;--van-slider-button-radius: 50%;--van-slider-button-background: var(--van-white);--van-slider-button-shadow: 0 1px 2px rgba(0, 0, 0, .5)}.van-theme-dark{--van-slider-inactive-background: var(--van-background-3)}.van-slider{position:relative;width:100%;height:var(--van-slider-bar-height);background:var(--van-slider-inactive-background);border-radius:var(--van-radius-max);cursor:pointer}.van-slider:before{position:absolute;top:calc(var(--van-padding-xs) * -1);right:0;bottom:calc(var(--van-padding-xs) * -1);left:0;content:""}.van-slider__bar{position:absolute;width:100%;height:100%;background:var(--van-slider-active-background);border-radius:inherit;transition:all var(--van-duration-fast)}.van-slider__button{width:var(--van-slider-button-width);height:var(--van-slider-button-height);background:var(--van-slider-button-background);border-radius:var(--van-slider-button-radius);box-shadow:var(--van-slider-button-shadow)}.van-slider__button-wrapper{position:absolute;cursor:grab;top:50%}.van-slider__button-wrapper--right{right:0;transform:translate3d(50%,-50%,0)}.van-slider__button-wrapper--left{left:0;transform:translate3d(-50%,-50%,0)}.van-slider--disabled{cursor:not-allowed;opacity:var(--van-slider-disabled-opacity)}.van-slider--disabled .van-slider__button-wrapper{cursor:not-allowed}.van-slider--vertical{display:inline-block;width:var(--van-slider-bar-height);height:100%}.van-slider--vertical .van-slider__button-wrapper--right{top:auto;right:50%;bottom:0;transform:translate3d(50%,50%,0)}.van-slider--vertical .van-slider__button-wrapper--left{top:0;right:50%;left:auto;transform:translate3d(50%,-50%,0)}.van-slider--vertical:before{top:0;right:calc(var(--van-padding-xs) * -1);bottom:0;left:calc(var(--van-padding-xs) * -1)}.van-space{display:inline-flex}.van-space--horizontal .van-space-item{display:flex;align-items:center}.van-space--vertical{flex-direction:column}.van-space--align-baseline{align-items:baseline}.van-space--align-start{align-items:flex-start}.van-space--align-end{align-items:flex-end}.van-space--align-center{align-items:center}.van-space--wrap{flex-wrap:wrap}.van-space--fill{display:flex}:root,:host{--van-steps-background: var(--van-background-2)}.van-steps{overflow:hidden;background-color:var(--van-steps-background)}.van-steps--horizontal{padding:10px 10px 0}.van-steps--horizontal .van-steps__items{position:relative;display:flex;margin:0 0 10px;padding-bottom:22px}.van-steps--vertical{padding:0 0 0 var(--van-padding-xl)}:root,:host{--van-step-text-color: var(--van-text-color-2);--van-step-active-color: var(--van-primary-color);--van-step-process-text-color: var(--van-text-color);--van-step-font-size: var(--van-font-size-md);--van-step-line-color: var(--van-border-color);--van-step-finish-line-color: var(--van-primary-color);--van-step-finish-text-color: var(--van-text-color);--van-step-icon-size: 12px;--van-step-circle-size: 5px;--van-step-circle-color: var(--van-gray-6);--van-step-horizontal-title-font-size: var(--van-font-size-sm)}.van-step{position:relative;flex:1;color:var(--van-step-text-color);font-size:var(--van-step-font-size)}.van-step__circle{display:block;width:var(--van-step-circle-size);height:var(--van-step-circle-size);background-color:var(--van-step-circle-color);border-radius:50%}.van-step__line{position:absolute;background-color:var(--van-step-line-color);transition:background-color var(--van-duration-base)}.van-step--horizontal{float:left}.van-step--horizontal:first-child .van-step__title{margin-left:0;transform:none}.van-step--horizontal:last-child:not(:first-child){position:absolute;right:1px;width:auto}.van-step--horizontal:last-child:not(:first-child) .van-step__title{margin-left:0;transform:none}.van-step--horizontal:last-child:not(:first-child) .van-step__circle-container{right:-9px;left:auto}.van-step--horizontal .van-step__circle-container{position:absolute;top:30px;left:calc(var(--van-padding-xs) * -1);z-index:1;padding:0 var(--van-padding-xs);background-color:var(--van-background-2);transform:translateY(-50%)}.van-step--horizontal .van-step__title{display:inline-block;margin-left:3px;font-size:var(--van-step-horizontal-title-font-size);transform:translate(-50%)}.van-step--horizontal .van-step__line{top:30px;left:0;width:100%;height:1px}.van-step--horizontal .van-step__icon{display:block;font-size:var(--van-step-icon-size)}.van-step--horizontal .van-step--process{color:var(--van-step-process-text-color)}.van-step--vertical{display:block;float:none;padding:10px 10px 10px 0;line-height:var(--van-line-height-sm)}.van-step--vertical:not(:last-child):after{border-bottom-width:1px}.van-step--vertical .van-step__circle-container{position:absolute;top:19px;left:-15px;z-index:1;font-size:var(--van-step-icon-size);line-height:1;transform:translate(-50%,-50%)}.van-step--vertical .van-step__line{top:16px;left:-15px;width:1px;height:100%}.van-step:last-child .van-step__line{width:0}.van-step--finish{color:var(--van-step-finish-text-color)}.van-step--finish .van-step__circle,.van-step--finish .van-step__line{background-color:var(--van-step-finish-line-color)}.van-step__icon,.van-step__title{transition:color var(--van-duration-base)}.van-step__icon--active,.van-step__title--active,.van-step__icon--finish,.van-step__title--finish{color:var(--van-step-active-color)}:root,:host{--van-stepper-background: var(--van-active-color);--van-stepper-button-icon-color: var(--van-text-color);--van-stepper-button-disabled-color: var(--van-background);--van-stepper-button-disabled-icon-color: var(--van-gray-5);--van-stepper-button-round-theme-color: var(--van-primary-color);--van-stepper-input-width: 32px;--van-stepper-input-height: 28px;--van-stepper-input-font-size: var(--van-font-size-md);--van-stepper-input-line-height: normal;--van-stepper-input-text-color: var(--van-text-color);--van-stepper-input-disabled-text-color: var(--van-text-color-3);--van-stepper-input-disabled-background: var(--van-active-color);--van-stepper-radius: var(--van-radius-md)}.van-stepper{display:inline-block;-webkit-user-select:none;-moz-user-select:none;user-select:none}.van-stepper__minus,.van-stepper__plus{position:relative;box-sizing:border-box;width:var(--van-stepper-input-height);height:var(--van-stepper-input-height);margin:0;padding:0;color:var(--van-stepper-button-icon-color);vertical-align:middle;background:var(--van-stepper-background);border:0}.van-stepper__minus:before,.van-stepper__plus:before{width:50%;height:1px}.van-stepper__minus:after,.van-stepper__plus:after{width:1px;height:50%}.van-stepper__minus:before,.van-stepper__plus:before,.van-stepper__minus:after,.van-stepper__plus:after{position:absolute;top:50%;left:50%;background-color:currentColor;transform:translate(-50%,-50%);content:""}.van-stepper__minus--disabled,.van-stepper__plus--disabled{color:var(--van-stepper-button-disabled-icon-color);background-color:var(--van-stepper-button-disabled-color);cursor:not-allowed}.van-stepper__minus{border-radius:var(--van-stepper-radius) 0 0 var(--van-stepper-radius)}.van-stepper__minus:after{display:none}.van-stepper__plus{border-radius:0 var(--van-stepper-radius) var(--van-stepper-radius) 0}.van-stepper__input{box-sizing:border-box;width:var(--van-stepper-input-width);height:var(--van-stepper-input-height);margin:0 2px;padding:0;color:var(--van-stepper-input-text-color);font-size:var(--van-stepper-input-font-size);line-height:var(--van-stepper-input-line-height);text-align:center;vertical-align:middle;background:var(--van-stepper-background);border:0;border-width:1px 0;border-radius:0;-webkit-appearance:none}.van-stepper__input:disabled{color:var(--van-stepper-input-disabled-text-color);background-color:var(--van-stepper-input-disabled-background);-webkit-text-fill-color:var(--van-stepper-input-disabled-text-color);opacity:1}.van-stepper__input:-moz-read-only{cursor:default}.van-stepper__input:read-only{cursor:default}.van-stepper--round .van-stepper__input{background-color:transparent}.van-stepper--round .van-stepper__plus,.van-stepper--round .van-stepper__minus{border-radius:100%}.van-stepper--round .van-stepper__plus--disabled,.van-stepper--round .van-stepper__minus--disabled{opacity:.3;cursor:not-allowed}.van-stepper--round .van-stepper__plus{color:var(--van-white);background:var(--van-stepper-button-round-theme-color)}.van-stepper--round .van-stepper__minus{color:var(--van-stepper-button-round-theme-color);background-color:var(--van-background-2);border:1px solid var(--van-stepper-button-round-theme-color)}.van-swipe-cell{position:relative;overflow:hidden;cursor:grab}.van-swipe-cell__wrapper{transition-timing-function:cubic-bezier(.18,.89,.32,1);transition-property:transform}.van-swipe-cell__left,.van-swipe-cell__right{position:absolute;top:0;height:100%}.van-swipe-cell__left{left:0;transform:translate3d(-100%,0,0)}.van-swipe-cell__right{right:0;transform:translate3d(100%,0,0)}:root,:host{--van-tabbar-height: 50px;--van-tabbar-z-index: 1;--van-tabbar-background: var(--van-background-2)}.van-tabbar{z-index:var(--van-tabbar-z-index);display:flex;box-sizing:content-box;width:100%;height:var(--van-tabbar-height);background:var(--van-tabbar-background)}.van-tabbar--fixed{position:fixed;bottom:0;left:0}:root,:host{--van-tabbar-item-font-size: var(--van-font-size-sm);--van-tabbar-item-text-color: var(--van-text-color);--van-tabbar-item-active-color: var(--van-primary-color);--van-tabbar-item-active-background: var(--van-background-2);--van-tabbar-item-line-height: 1;--van-tabbar-item-icon-size: 22px;--van-tabbar-item-icon-margin-bottom: var(--van-padding-base)}.van-tabbar-item{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;color:var(--van-tabbar-item-text-color);font-size:var(--van-tabbar-item-font-size);line-height:var(--van-tabbar-item-line-height);cursor:pointer}.van-tabbar-item__icon{margin-bottom:var(--van-tabbar-item-icon-margin-bottom);font-size:var(--van-tabbar-item-icon-size)}.van-tabbar-item__icon .van-icon{display:block}.van-tabbar-item__icon .van-badge{margin-top:var(--van-padding-base)}.van-tabbar-item__icon img{display:block;height:20px}.van-tabbar-item--active{color:var(--van-tabbar-item-active-color);background-color:var(--van-tabbar-item-active-background)}:root,:host{--van-text-ellipsis-line-height: 1.6;--van-text-ellipsis-action-color: var(--van-blue)}.van-text-ellipsis{line-height:var(--van-text-ellipsis-line-height);white-space:pre-wrap;overflow-wrap:break-word}.van-text-ellipsis__action{cursor:pointer;color:var(--van-text-ellipsis-action-color)}.van-text-ellipsis__action:active{opacity:var(--van-active-opacity)}:root,:host{--van-watermark-z-index: 100}.van-watermark{position:absolute;height:100%;width:100%;left:0;top:0;z-index:var(--van-watermark-z-index);background-repeat:repeat;pointer-events:none}.van-watermark__wrapper{display:none}.van-watermark--full{position:fixed} diff --git a/apps/user-app-v2/dist/assets/index-DPSZMLNJ.js b/apps/user-app-v2/dist/assets/index-DPSZMLNJ.js new file mode 100644 index 0000000..6cc85ae --- /dev/null +++ b/apps/user-app-v2/dist/assets/index-DPSZMLNJ.js @@ -0,0 +1 @@ +import{d as H,b6 as v,p as n,b7 as w,b8 as A,b9 as P,h as B,ba as C,bb as L,bc as _,bd as N,Q as U,be as M,g as D,K as R,bf as Y,x as F,bg as S,bh as G,bi as K}from"./index-BAr1mMLP.js";const[Q,h]=P("loading"),X=Array(12).fill(null).map((t,l)=>n("i",{class:h("line",String(l+1))},null)),j=n("svg",{class:h("circular"),viewBox:"25 25 50 50"},[n("circle",{cx:"50",cy:"50",r:"20",fill:"none"},null)]),q={size:v,type:A("circular"),color:String,vertical:Boolean,textSize:v,textColor:String};var J=H({name:Q,props:q,setup(t,{slots:l}){const o=B(()=>C({color:t.color},L(t.size))),c=()=>{const i=t.type==="spinner"?X:j;return n("span",{class:h("spinner",t.type),style:o.value},[l.icon?l.icon():i])},g=()=>{var i;if(l.default)return n("span",{class:h("text"),style:{fontSize:w(t.textSize),color:(i=t.textColor)!=null?i:t.color}},[l.default()])};return()=>{const{type:i,vertical:m}=t;return n("div",{class:h([i,{vertical:m}]),"aria-live":"polite","aria-busy":!0},[c(),g()])}}});const O=_(J),[W,f,Z]=P("pull-refresh"),k=50,ee=["pulling","loosing","success"],te={disabled:Boolean,modelValue:Boolean,headHeight:S(k),successText:String,pullingText:String,loosingText:String,loadingText:String,pullDistance:v,successDuration:S(500),animationDuration:S(300)};var ae=H({name:W,props:te,emits:["change","refresh","update:modelValue"],setup(t,{emit:l,slots:o}){let c;const g=D(),i=D(),m=N(g),a=R({status:"normal",distance:0,duration:0}),r=K(),p=()=>{if(t.headHeight!==k)return{height:`${t.headHeight}px`}},T=()=>a.status!=="loading"&&a.status!=="success"&&!t.disabled,$=e=>{const s=+(t.pullDistance||t.headHeight);return e>s&&(e{const d=+(t.pullDistance||t.headHeight);a.distance=e,s?a.status="loading":e===0?a.status="normal":e{const{status:e}=a;return e==="normal"?"":t[`${e}Text`]||Z(e)},z=()=>{const{status:e,distance:s}=a;if(o[e])return o[e]({distance:s});const d=[];return ee.includes(e)&&d.push(n("div",{class:f("text")},[x()])),e==="loading"&&d.push(n(O,{class:f("loading")},{default:x})),d},E=()=>{a.status="success",setTimeout(()=>{u(0)},+t.successDuration)},b=e=>{c=G(m.value)===0,c&&(a.duration=0,r.start(e))},I=e=>{T()&&b(e)},V=e=>{if(T()){c||b(e);const{deltaY:s}=r;r.move(e),c&&s.value>=0&&r.isVertical()&&(Y(e),u($(s.value)))}},y=()=>{c&&r.deltaY.value&&T()&&(a.duration=+t.animationDuration,a.status==="loosing"?(u(+t.headHeight,!0),l("update:modelValue",!0),F(()=>l("refresh"))):u(0))};return U(()=>t.modelValue,e=>{a.duration=+t.animationDuration,e?u(+t.headHeight,!0):o.success||t.successText?E():u(0,!1)}),M("touchmove",V,{target:i}),()=>{var e;const s={transitionDuration:`${a.duration}ms`,transform:a.distance?`translate3d(0,${a.distance}px, 0)`:""};return n("div",{ref:g,class:f()},[n("div",{ref:i,class:f("track"),style:s,onTouchstartPassive:I,onTouchend:y,onTouchcancel:y},[n("div",{class:f("head"),style:p()},[z()]),(e=o.default)==null?void 0:e.call(o)])])}}});const ne=_(ae);export{O as L,ne as P}; diff --git a/apps/user-app-v2/dist/assets/index-DWuFFuVX.js b/apps/user-app-v2/dist/assets/index-DWuFFuVX.js new file mode 100644 index 0000000..8576178 --- /dev/null +++ b/apps/user-app-v2/dist/assets/index-DWuFFuVX.js @@ -0,0 +1 @@ +import{a1 as k,ab as h,d as se,o as Ce,x as ae,Q as G,Z as _e,aL as ce,ap as be,a8 as W,p as E,g as V,h as te,K as Re,as as Se,Y as Xe,ax as Ne,a as Ye,a2 as Ke,ah as Ue,am as Ze,ag as $e,aQ as qe,ao as Be,a9 as Qe,aa as Ge,ae as fe,aR as ve,aS as Je,an as et}from"./index-BAr1mMLP.js";import{K as tt,s as nt,P as at}from"./KeyCode-BMdFtCT-.js";import{o as Ae,_ as ot,a as rt}from"./classCallCheck-DDMOgDz1.js";import{w as Ee}from"./raf-nDFcuFT6.js";var me;function pe(s){if(typeof document>"u")return 0;if(s||me===void 0){var e=document.createElement("div");e.style.width="100%",e.style.height="200px";var n=document.createElement("div"),o=n.style;o.position="absolute",o.top="0",o.left="0",o.pointerEvents="none",o.visibility="hidden",o.width="200px",o.height="150px",o.overflow="hidden",n.appendChild(e),document.body.appendChild(n);var a=e.offsetWidth;n.style.overflow="scroll";var d=e.offsetWidth;a===d&&(d=n.clientWidth),document.body.removeChild(n),me=a-d}return me}var Ve=function(){return{prefixCls:String,width:h.oneOfType([h.string,h.number]),height:h.oneOfType([h.string,h.number]),style:{type:Object,default:void 0},class:String,placement:{type:String},wrapperClassName:String,level:{type:[String,Array]},levelMove:{type:[Number,Function,Array]},duration:String,ease:String,showMask:{type:Boolean,default:void 0},maskClosable:{type:Boolean,default:void 0},maskStyle:{type:Object,default:void 0},afterVisibleChange:Function,keyboard:{type:Boolean,default:void 0},contentWrapperStyle:{type:Object,default:void 0},autofocus:{type:Boolean,default:void 0},open:{type:Boolean,default:void 0}}},lt=function(){return k(k({},Ve()),{},{forceRender:{type:Boolean,default:void 0},getContainer:h.oneOfType([h.string,h.func,h.object,h.looseBool])})},it=function(){return k(k({},Ve()),{},{getContainer:Function,getOpenCount:Function,scrollLocker:h.any,switchScrollingEffect:Function})};function ct(s){return Array.isArray(s)?s:[s]}var He={transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend"},st=Object.keys(He).filter(function(s){if(typeof document>"u")return!1;var e=document.getElementsByTagName("html")[0];return s in(e?e.style:{})})[0],Pe=He[st];function Oe(s,e,n,o){s.addEventListener?s.addEventListener(e,n,o):s.attachEvent&&s.attachEvent("on".concat(e),n)}function xe(s,e,n,o){s.removeEventListener?s.removeEventListener(e,n,o):s.attachEvent&&s.detachEvent("on".concat(e),n)}function ut(s,e){var n=typeof s=="function"?s(e):s;return Array.isArray(n)?n.length===2?n:[n[0],n[1]]:[n]}var Te=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},he=!(typeof window<"u"&&window.document&&window.document.createElement),dt=function s(e,n,o,a){if(!n||n===document||n instanceof Document)return!1;if(n===e.parentNode)return!0;var d=Math.max(Math.abs(o),Math.abs(a))===Math.abs(a),y=Math.max(Math.abs(o),Math.abs(a))===Math.abs(o),C=n.scrollHeight-n.clientHeight,r=n.scrollWidth-n.clientWidth,c=document.defaultView.getComputedStyle(n),S=c.overflowY==="auto"||c.overflowY==="scroll",D=c.overflowX==="auto"||c.overflowX==="scroll",L=C&&S,B=r&&D;return d&&(!L||L&&(n.scrollTop>=C&&a<0||n.scrollTop<=0&&a>0))||y&&(!B||B&&(n.scrollLeft>=r&&o<0||n.scrollLeft<=0&&o>0))?s(e,n.parentNode,o,a):!1},ft=["width","height","open","prefixCls","placement","level","levelMove","ease","duration","getContainer","onChange","afterVisibleChange","showMask","maskClosable","maskStyle","keyboard","getOpenCount","scrollLocker","contentWrapperStyle","style","class"],ee={},De=se({compatConfig:{MODE:3},inheritAttrs:!1,props:it(),emits:["close","handleClick","change"],setup:function(e,n){var o=n.emit,a=n.slots,d=Re({startPos:{x:null,y:null}}),y,C=V(),r=V(),c=V(),S=V(),D=V(),L=[],B="drawer_id_".concat(Number((Date.now()+Math.random()).toString().replace(".",Math.round(Math.random()*9).toString())).toString(16)),P=!he&&nt?{passive:!1}:!1;Ce(function(){ae(function(){var l=e.open,t=e.getContainer,i=e.showMask,v=e.autofocus,m=t==null?void 0:t();if(T(e),l&&(m&&m.parentNode===document.body&&(ee[B]=l),Z(),ae(function(){v&&b()}),i)){var w;(w=e.scrollLocker)===null||w===void 0||w.lock()}})}),G(function(){return e.level},function(){T(e)},{flush:"post"}),G(function(){return e.open},function(){var l=e.open,t=e.getContainer,i=e.scrollLocker,v=e.showMask,m=e.autofocus,w=t==null?void 0:t();w&&w.parentNode===document.body&&(ee[B]=!!l),Z(),l?(m&&b(),v&&(i==null||i.lock())):i==null||i.unLock()},{flush:"post"}),_e(function(){var l,t=e.open;delete ee[B],t&&(oe(!1),document.body.style.touchAction=""),(l=e.scrollLocker)===null||l===void 0||l.unLock()}),G(function(){return e.placement},function(l){l&&(D.value=null)});var b=function(){var t,i;(t=r.value)===null||t===void 0||(i=t.focus)===null||i===void 0||i.call(t)},O=function(t){t.touches.length>1||(d.startPos={x:t.touches[0].clientX,y:t.touches[0].clientY})},A=function(t){if(!(t.changedTouches.length>1)){var i=t.currentTarget,v=t.changedTouches[0].clientX-d.startPos.x,m=t.changedTouches[0].clientY-d.startPos.y;(i===c.value||i===S.value||i===D.value&&dt(i,t.target,v,m))&&t.cancelable&&t.preventDefault()}},j=function l(t){var i=t.target;xe(i,Pe,l),i.style.transition=""},_=function(t){o("close",t)},X=function(t){t.keyCode===tt.ESC&&(t.stopPropagation(),_(t))},U=function(t){var i=e.open,v=e.afterVisibleChange;t.target===C.value&&t.propertyName.match(/transform$/)&&(r.value.style.transition="",!i&&x()&&(document.body.style.overflowX="",c.value&&(c.value.style.left="",c.value.style.width="")),v&&v(!!i))},R=te(function(){var l=e.placement,t=l==="left"||l==="right",i="translate".concat(t?"X":"Y");return{isHorizontal:t,placementName:i}}),Z=function(){var t=e.open,i=e.width,v=e.height,m=R.value,w=m.isHorizontal,p=m.placementName,N=D.value?D.value.getBoundingClientRect()[w?"width":"height"]:0,$=(w?i:v)||N;ue(t,p,$)},oe=function(t,i,v,m){var w=e.placement,p=e.levelMove,N=e.duration,$=e.ease,F=e.showMask;L.forEach(function(q){q.style.transition="transform ".concat(N," ").concat($),Oe(q,Pe,j);var Y=t?v:0;if(p){var re=ut(p,{target:q,open:t});Y=t?re[0]:re[1]||0}var le=typeof Y=="number"?"".concat(Y,"px"):Y,K=w==="left"||w==="top"?le:"-".concat(le);K=F&&w==="right"&&m?"calc(".concat(K," + ").concat(m,"px)"):K,q.style.transform=Y?"".concat(i,"(").concat(K,")"):""})},ue=function(t,i,v){if(!he){var m=document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth?pe(!0):0;oe(t,i,v,m),g(m)}o("change",t)},g=function(t){var i=e.getContainer,v=e.showMask,m=e.open,w=i==null?void 0:i();if(w&&w.parentNode===document.body&&v){var p=["touchstart"],N=[document.body,c.value,S.value,D.value];m&&document.body.style.overflow!=="hidden"?(t&&u(t),document.body.style.touchAction="none",N.forEach(function($,F){$&&Oe($,p[F]||"touchmove",F?A:O,P)})):x()&&(document.body.style.touchAction="",t&&f(t),N.forEach(function($,F){$&&xe($,p[F]||"touchmove",F?A:O,P)}))}},u=function(t){var i=e.placement,v=e.duration,m=e.ease,w="width ".concat(v," ").concat(m),p="transform ".concat(v," ").concat(m);switch(r.value.style.transition="none",i){case"right":r.value.style.transform="translateX(-".concat(t,"px)");break;case"top":case"bottom":r.value.style.width="calc(100% - ".concat(t,"px)"),r.value.style.transform="translateZ(0)";break}clearTimeout(y),y=setTimeout(function(){r.value&&(r.value.style.transition="".concat(p,",").concat(w),r.value.style.width="",r.value.style.transform="")})},f=function(t){var i=e.placement,v=e.duration,m=e.ease;r.value.style.transition="none";var w,p="width ".concat(v," ").concat(m),N="transform ".concat(v," ").concat(m);switch(i){case"left":{r.value.style.width="100%",p="width 0s ".concat(m," ").concat(v);break}case"right":{r.value.style.transform="translateX(".concat(t,"px)"),r.value.style.width="100%",p="width 0s ".concat(m," ").concat(v),c.value&&(c.value.style.left="-".concat(t,"px"),c.value.style.width="calc(100% + ".concat(t,"px)"));break}case"top":case"bottom":{r.value.style.width="calc(100% + ".concat(t,"px)"),r.value.style.height="100%",r.value.style.transform="translateZ(0)",w="height 0s ".concat(m," ").concat(v);break}}clearTimeout(y),y=setTimeout(function(){r.value&&(r.value.style.transition="".concat(N,",").concat(w?"".concat(w,","):"").concat(p),r.value.style.transform="",r.value.style.width="",r.value.style.height="")})},x=function(){return!Object.keys(ee).some(function(t){return ee[t]})},T=function(t){var i=t.level,v=t.getContainer;if(!he){var m=v==null?void 0:v(),w=m?m.parentNode:null;if(L=[],i==="all"){var p=w?Array.prototype.slice.call(w.children):[];p.forEach(function(N){N.nodeName!=="SCRIPT"&&N.nodeName!=="STYLE"&&N.nodeName!=="LINK"&&N!==m&&L.push(N)})}else i&&ct(i).forEach(function(N){document.querySelectorAll(N).forEach(function($){L.push($)})})}},M=function(t){o("handleClick",t)},I=V(!1);return G(r,function(){ae(function(){I.value=!0})}),function(){var l,t,i,v=e.width,m=e.height,w=e.open,p=e.prefixCls,N=e.placement;e.level,e.levelMove,e.ease,e.duration,e.getContainer,e.onChange,e.afterVisibleChange;var $=e.showMask,F=e.maskClosable,q=e.maskStyle,Y=e.keyboard;e.getOpenCount,e.scrollLocker;var re=e.contentWrapperStyle,le=e.style,K=e.class,je=ce(e,ft),de=w&&I.value,Ie=be(p,(l={},W(l,"".concat(p,"-").concat(N),!0),W(l,"".concat(p,"-open"),de),W(l,K,!!K),W(l,"no-mask",!$),l)),Fe=R.value.placementName,ze=N==="left"||N==="top"?"-100%":"100%",ke=de?"":"".concat(Fe,"(").concat(ze,")");return E("div",k(k({},Ae(je,["switchScrollingEffect","autofocus"])),{},{tabindex:-1,class:Ie,style:le,ref:r,onKeydown:de&&Y?X:void 0,onTransitionend:U}),[$&&E("div",{class:"".concat(p,"-mask"),onClick:F?_:void 0,style:q,ref:c},null),E("div",{class:"".concat(p,"-content-wrapper"),style:k({transform:ke,msTransform:ke,width:Te(v)?"".concat(v,"px"):v,height:Te(m)?"".concat(m,"px"):m},re),ref:C},[E("div",{class:"".concat(p,"-content"),ref:D},[(t=a.default)===null||t===void 0?void 0:t.call(a)]),a.handler?E("div",{onClick:M,ref:S},[(i=a.handler)===null||i===void 0?void 0:i.call(a)]):null])])}}});function J(s){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.element,o=n===void 0?document.body:n,a={},d=Object.keys(s);return d.forEach(function(y){a[y]=o.style[y]}),d.forEach(function(y){o.style[y]=s[y]}),a}function vt(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var ye={};const Me=function(s){if(!(!vt()&&!s)){var e="ant-scrolling-effect",n=new RegExp("".concat(e),"g"),o=document.body.className;if(s){if(!n.test(o))return;J(ye),ye={},document.body.className=o.replace(n,"").trim();return}var a=pe();if(a&&(ye=J({position:"relative",width:"calc(100% - ".concat(a,"px)")}),!n.test(o))){var d="".concat(o," ").concat(e);document.body.className=d.trim()}}};var H=[],We="ant-scrolling-effect",ge=new RegExp("".concat(We),"g"),mt=0,we=new Map,ht=ot(function s(e){var n=this;rt(this,s),W(this,"getContainer",function(){var o;return(o=n.options)===null||o===void 0?void 0:o.container}),W(this,"reLock",function(o){var a=H.find(function(d){var y=d.target;return y===n.lockTarget});a&&n.unLock(),n.options=o,a&&(a.options=o,n.lock())}),W(this,"lock",function(){var o;if(!H.some(function(r){var c=r.target;return c===n.lockTarget})){if(H.some(function(r){var c,S=r.options;return(S==null?void 0:S.container)===((c=n.options)===null||c===void 0?void 0:c.container)})){H=[].concat(Se(H),[{target:n.lockTarget,options:n.options}]);return}var a=0,d=((o=n.options)===null||o===void 0?void 0:o.container)||document.body;(d===document.body&&window.innerWidth-document.documentElement.clientWidth>0||d.scrollHeight>d.clientHeight)&&(a=pe());var y=d.className;if(H.filter(function(r){var c,S=r.options;return(S==null?void 0:S.container)===((c=n.options)===null||c===void 0?void 0:c.container)}).length===0&&we.set(d,J({width:a!==0?"calc(100% - ".concat(a,"px)"):void 0,overflow:"hidden",overflowX:"hidden",overflowY:"hidden"},{element:d})),!ge.test(y)){var C="".concat(y," ").concat(We);d.className=C.trim()}H=[].concat(Se(H),[{target:n.lockTarget,options:n.options}])}}),W(this,"unLock",function(){var o,a=H.find(function(C){var r=C.target;return r===n.lockTarget});if(H=H.filter(function(C){var r=C.target;return r!==n.lockTarget}),!(!a||H.some(function(C){var r,c=C.options;return(c==null?void 0:c.container)===((r=a.options)===null||r===void 0?void 0:r.container)}))){var d=((o=n.options)===null||o===void 0?void 0:o.container)||document.body,y=d.className;ge.test(y)&&(J(we.get(d),{element:d}),we.delete(d),d.className=d.className.replace(ge,"").trim())}}),this.lockTarget=mt++,this.options=e}),z=0,ne=Ze(),ie={},Q=function(e){if(!ne)return null;if(e){if(typeof e=="string")return document.querySelectorAll(e)[0];if(typeof e=="function")return e();if(Ue(e)==="object"&&e instanceof window.HTMLElement)return e}return document.body};const yt=se({compatConfig:{MODE:3},name:"PortalWrapper",inheritAttrs:!1,props:{wrapperClassName:String,forceRender:{type:Boolean,default:void 0},getContainer:h.any,visible:{type:Boolean,default:void 0}},setup:function(e,n){var o=n.slots,a=V(),d=V(),y=V(),C=new ht({container:Q(e.getContainer)}),r=function(){var b,O;(b=a.value)===null||b===void 0||(O=b.parentNode)===null||O===void 0||O.removeChild(a.value)},c=function(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(b||a.value&&!a.value.parentNode){var O=Q(e.getContainer);return O?(O.appendChild(a.value),!0):!1}return!0},S=function(){return ne?(a.value||(a.value=document.createElement("div"),c(!0)),D(),a.value):null},D=function(){var b=e.wrapperClassName;a.value&&b&&b!==a.value.className&&(a.value.className=b)};Xe(function(){D(),c()});var L=function(){z===1&&!Object.keys(ie).length?(Me(),ie=J({overflow:"hidden",overflowX:"hidden",overflowY:"hidden"})):z||(J(ie),ie={},Me(!0))},B=Ke();return Ce(function(){var P=!1;G([function(){return e.visible},function(){return e.getContainer}],function(b,O){var A=Ne(b,2),j=A[0],_=A[1],X=Ne(O,2),U=X[0],R=X[1];if(ne&&Q(e.getContainer)===document.body&&(j&&!U?z+=1:P&&(z-=1)),P){var Z=typeof _=="function"&&typeof R=="function";(Z?_.toString()!==R.toString():_!==R)&&r(),j&&j!==U&&ne&&Q(_)!==C.getContainer()&&C.reLock({container:Q(_)})}P=!0},{immediate:!0,flush:"post"}),ae(function(){c()||(y.value=Ee(function(){B.update()}))})}),Ye(function(){var P=e.visible,b=e.getContainer;ne&&Q(b)===document.body&&(z=P&&z?z-1:z),r(),Ee.cancel(y.value)}),function(){var P=e.forceRender,b=e.visible,O=null,A={getOpenCount:function(){return z},getContainer:S,switchScrollingEffect:L,scrollLocker:C};return(P||b||d.value)&&(O=E(at,{getContainer:S,ref:d},{default:function(){var _;return(_=o.default)===null||_===void 0?void 0:_.call(o,A)}})),O}}});var gt=["afterVisibleChange","getContainer","wrapperClassName","forceRender"],wt=["visible","afterClose"],bt=se({compatConfig:{MODE:3},inheritAttrs:!1,props:$e(lt(),{prefixCls:"drawer",placement:"left",getContainer:"body",level:"all",duration:".3s",ease:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",afterVisibleChange:function(){},showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",keyboard:!0,forceRender:!1,autofocus:!0}),emits:["handleClick","close"],slots:["handler"],setup:function(e,n){var o=n.emit,a=n.slots,d=V(null),y=function(c){o("handleClick",c)},C=function(c){o("close",c)};return function(){e.afterVisibleChange;var r=e.getContainer,c=e.wrapperClassName,S=e.forceRender,D=ce(e,gt),L=null;if(!r)return E("div",{class:c,ref:d},[E(De,k(k({},D),{},{open:e.open,getContainer:function(){return d.value},onClose:C,onHandleClick:y}),a)]);var B=!!a.handler||S;return(B||e.open||d.value)&&(L=E(yt,{visible:e.open,forceRender:B,getContainer:r,wrapperClassName:c},{default:function(b){var O=b.visible,A=b.afterClose,j=ce(b,wt);return E(De,k(k(k({ref:d},D),j),{},{open:O!==void 0?O:e.open,afterVisibleChange:A!==void 0?A:e.afterVisibleChange,onClose:C,onHandleClick:y}),a)}})),L}}}),Ct=["width","height","visible","placement","mask","wrapClassName","class"],pt=Be("top","right","bottom","left");Be("default","large");var Le={distance:180},kt=function(){return{autofocus:{type:Boolean,default:void 0},closable:{type:Boolean,default:void 0},closeIcon:h.any,destroyOnClose:{type:Boolean,default:void 0},forceRender:{type:Boolean,default:void 0},getContainer:h.any,maskClosable:{type:Boolean,default:void 0},mask:{type:Boolean,default:void 0},maskStyle:{type:Object,default:void 0},wrapStyle:{type:Object,default:void 0},style:{type:Object,default:void 0},class:h.any,wrapClassName:String,size:{type:String},drawerStyle:{type:Object,default:void 0},headerStyle:{type:Object,default:void 0},bodyStyle:{type:Object,default:void 0},contentWrapperStyle:{type:Object,default:void 0},title:h.any,visible:{type:Boolean,default:void 0},width:h.oneOfType([h.string,h.number]),height:h.oneOfType([h.string,h.number]),zIndex:Number,prefixCls:String,push:h.oneOfType([h.looseBool,{type:Object}]),placement:h.oneOf(pt),keyboard:{type:Boolean,default:void 0},extra:h.any,footer:h.any,footerStyle:{type:Object,default:void 0},level:h.any,levelMove:{type:[Number,Array,Function]},handle:h.any,afterVisibleChange:Function,onAfterVisibleChange:Function,"onUpdate:visible":Function,onClose:Function}},St=se({compatConfig:{MODE:3},name:"ADrawer",inheritAttrs:!1,props:$e(kt(),{closable:!0,placement:"right",maskClosable:!0,mask:!0,level:null,keyboard:!0,push:Le}),slots:["closeIcon","title","extra","footer","handle"],setup:function(e,n){var o=n.emit,a=n.slots,d=n.attrs,y=V(!1),C=V(!1),r=V(null),c=Qe("parentDrawerOpts",null),S=Ge("drawer",e),D=S.prefixCls;fe(!e.afterVisibleChange,"Drawer","`afterVisibleChange` prop is deprecated, please use `@afterVisibleChange` event instead"),fe(e.wrapStyle===void 0,"Drawer","`wrapStyle` prop is deprecated, please use `style` instead"),fe(e.wrapClassName===void 0,"Drawer","`wrapClassName` prop is deprecated, please use `class` instead");var L=function(){y.value=!0},B=function(){y.value=!1,ae(function(){P()})};et("parentDrawerOpts",{setPush:L,setPull:B}),Ce(function(){var g=e.visible;g&&c&&c.setPush()}),_e(function(){c&&c.setPull()}),G(function(){return e.visible},function(g){c&&(g?c.setPush():c.setPull())},{flush:"post"});var P=function(){var u,f;(u=r.value)===null||u===void 0||(f=u.domFocus)===null||f===void 0||f.call(u)},b=function(u){o("update:visible",!1),o("close",u)},O=function(u){var f;(f=e.afterVisibleChange)===null||f===void 0||f.call(e,u),o("afterVisibleChange",u)},A=te(function(){return e.destroyOnClose&&!e.visible}),j=function(){var u=A.value;u&&(e.visible||(C.value=!0))},_=te(function(){var g=e.push,u=e.placement,f;return typeof g=="boolean"?f=g?Le.distance:0:f=g.distance,f=parseFloat(String(f||0)),u==="left"||u==="right"?"translateX(".concat(u==="left"?f:-f,"px)"):u==="top"||u==="bottom"?"translateY(".concat(u==="top"?f:-f,"px)"):null}),X=te(function(){var g=e.visible,u=e.mask,f=e.placement,x=e.size,T=x===void 0?"default":x,M=e.width,I=e.height;if(!g&&!u)return{};var l={};if(f==="left"||f==="right"){var t=T==="large"?736:378;l.width=typeof M>"u"?t:M,l.width=typeof l.width=="string"?l.width:"".concat(l.width,"px")}else{var i=T==="large"?736:378;l.height=typeof I>"u"?i:I,l.height=typeof l.height=="string"?l.height:"".concat(l.height,"px")}return l}),U=te(function(){var g=e.zIndex,u=e.wrapStyle,f=e.mask,x=e.style,T=f?{}:X.value;return k(k(k({zIndex:g,transform:y.value?_.value:void 0},T),u),x)}),R=function(u){var f=e.closable,x=e.headerStyle,T=ve(a,e,"extra"),M=ve(a,e,"title");return!M&&!f?null:E("div",{class:be("".concat(u,"-header"),W({},"".concat(u,"-header-close-only"),f&&!M&&!T)),style:x},[E("div",{class:"".concat(u,"-header-title")},[Z(u),M&&E("div",{class:"".concat(u,"-title")},[M])]),T&&E("div",{class:"".concat(u,"-extra")},[T])])},Z=function(u){var f,x=e.closable,T=a.closeIcon?(f=a.closeIcon)===null||f===void 0?void 0:f.call(a):e.closeIcon;return x&&E("button",{key:"closer",onClick:b,"aria-label":"Close",class:"".concat(u,"-close")},[T===void 0?E(Je,null,null):T])},oe=function(u){var f;if(C.value&&!e.visible)return null;C.value=!1;var x=e.bodyStyle,T=e.drawerStyle,M={},I=A.value;return I&&(M.opacity=0,M.transition="opacity .3s"),E("div",{class:"".concat(u,"-wrapper-body"),style:k(k({},M),T),onTransitionend:j},[R(u),E("div",{key:"body",class:"".concat(u,"-body"),style:x},[(f=a.default)===null||f===void 0?void 0:f.call(a)]),ue(u)])},ue=function(u){var f=ve(a,e,"footer");if(!f)return null;var x="".concat(u,"-footer");return E("div",{class:x,style:e.footerStyle},[f])};return function(){var g;e.width,e.height;var u=e.visible,f=e.placement,x=e.mask,T=e.wrapClassName,M=e.class,I=ce(e,Ct),l=x?X.value:{},t=x?"":"no-mask",i=k(k(k(k({},d),Ae(I,["size","closeIcon","closable","destroyOnClose","drawerStyle","headerStyle","bodyStyle","title","push","wrapStyle","onAfterVisibleChange","onClose","onUpdate:visible"])),l),{},{onClose:b,afterVisibleChange:O,handler:!1,prefixCls:D.value,open:u,showMask:x,placement:f,class:be((g={},W(g,M,M),W(g,T,!!T),W(g,t,!!t),g)),style:U.value,ref:r});return E(bt,i,{handler:e.handle?function(){return e.handle}:a.handle,default:function(){return oe(D.value)}})}}});const xt=qe(St);export{xt as D}; diff --git a/apps/user-app-v2/dist/assets/raf-nDFcuFT6.js b/apps/user-app-v2/dist/assets/raf-nDFcuFT6.js new file mode 100644 index 0000000..e068e28 --- /dev/null +++ b/apps/user-app-v2/dist/assets/raf-nDFcuFT6.js @@ -0,0 +1 @@ +var f=function(n){return setTimeout(n,16)},o=function(n){return clearTimeout(n)};typeof window<"u"&&"requestAnimationFrame"in window&&(f=function(n){return window.requestAnimationFrame(n)},o=function(n){return window.cancelAnimationFrame(n)});var u=0,a=new Map;function c(e){a.delete(e)}function m(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;u+=1;var r=u;function t(i){if(i===0)c(r),e();else{var d=f(function(){t(i-1)});a.set(r,d)}}return t(n),r}m.cancel=function(e){var n=a.get(e);return c(n),o(n)};export{m as w}; diff --git a/apps/user-app-v2/dist/index.html b/apps/user-app-v2/dist/index.html index d19fc9e..aef3ff0 100644 --- a/apps/user-app-v2/dist/index.html +++ b/apps/user-app-v2/dist/index.html @@ -5,15 +5,38 @@ - + + + + طلای منتزر - - + + - -
+ +
diff --git a/apps/user-app-v2/dist/sw.js b/apps/user-app-v2/dist/sw.js index b7ad5d2..118b81d 100644 --- a/apps/user-app-v2/dist/sw.js +++ b/apps/user-app-v2/dist/sw.js @@ -1,2 +1,2 @@ try{self["workbox:core:7.4.0"]&&_()}catch{}const T=(a,...e)=>{let t=a;return e.length>0&&(t+=` :: ${JSON.stringify(e)}`),t},x=T;class l extends Error{constructor(e,t){const s=x(e,t);super(s),this.name=e,this.details=t}}const f={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:typeof registration<"u"?registration.scope:""},C=a=>[f.prefix,a,f.suffix].filter(e=>e&&e.length>0).join("-"),N=a=>{for(const e of Object.keys(f))a(e)},U={updateDetails:a=>{N(e=>{typeof a[e]=="string"&&(f[e]=a[e])})},getGoogleAnalyticsName:a=>a||C(f.googleAnalytics),getPrecacheName:a=>a||C(f.precache),getPrefix:()=>f.prefix,getRuntimeName:a=>a||C(f.runtime),getSuffix:()=>f.suffix};function k(a,e){const t=e();return a.waitUntil(t),t}try{self["workbox:precaching:7.4.0"]&&_()}catch{}const E="__WB_REVISION__";function I(a){if(!a)throw new l("add-to-cache-list-unexpected-type",{entry:a});if(typeof a=="string"){const n=new URL(a,location.href);return{cacheKey:n.href,url:n.href}}const{revision:e,url:t}=a;if(!t)throw new l("add-to-cache-list-unexpected-type",{entry:a});if(!e){const n=new URL(t,location.href);return{cacheKey:n.href,url:n.href}}const s=new URL(t,location.href),r=new URL(t,location.href);return s.searchParams.set(E,e),{cacheKey:s.href,url:r.href}}class O{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:e,state:t})=>{t&&(t.originalRequest=e)},this.cachedResponseWillBeUsed=async({event:e,state:t,cachedResponse:s})=>{if(e.type==="install"&&t&&t.originalRequest&&t.originalRequest instanceof Request){const r=t.originalRequest.url;s?this.notUpdatedURLs.push(r):this.updatedURLs.push(r)}return s}}}class M{constructor({precacheController:e}){this.cacheKeyWillBeUsed=async({request:t,params:s})=>{const r=(s==null?void 0:s.cacheKey)||this._precacheController.getCacheKeyForURL(t.url);return r?new Request(r,{headers:t.headers}):t},this._precacheController=e}}let p;function W(){if(p===void 0){const a=new Response("");if("body"in a)try{new Response(a.body),p=!0}catch{p=!1}p=!1}return p}async function A(a,e){let t=null;if(a.url&&(t=new URL(a.url).origin),t!==self.location.origin)throw new l("cross-origin-copy-response",{origin:t});const s=a.clone(),n={headers:new Headers(s.headers),status:s.status,statusText:s.statusText},c=W()?s.body:await s.blob();return new Response(c,n)}const q=a=>new URL(String(a),location.href).href.replace(new RegExp(`^${location.origin}`),"");function P(a,e){const t=new URL(a);for(const s of e)t.searchParams.delete(s);return t.href}async function S(a,e,t,s){const r=P(e.url,t);if(e.url===r)return a.match(e,s);const n=Object.assign(Object.assign({},s),{ignoreSearch:!0}),c=await a.keys(e,n);for(const i of c){const o=P(i.url,t);if(r===o)return a.match(i,s)}}class D{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}const j=new Set;async function H(){for(const a of j)await a()}function F(a){return new Promise(e=>setTimeout(e,a))}try{self["workbox:strategies:7.4.0"]&&_()}catch{}function m(a){return typeof a=="string"?new Request(a):a}class B{constructor(e,t){this._cacheKeys={},Object.assign(this,t),this.event=t.event,this._strategy=e,this._handlerDeferred=new D,this._extendLifetimePromises=[],this._plugins=[...e.plugins],this._pluginStateMap=new Map;for(const s of this._plugins)this._pluginStateMap.set(s,{});this.event.waitUntil(this._handlerDeferred.promise)}async fetch(e){const{event:t}=this;let s=m(e);if(s.mode==="navigate"&&t instanceof FetchEvent&&t.preloadResponse){const c=await t.preloadResponse;if(c)return c}const r=this.hasCallback("fetchDidFail")?s.clone():null;try{for(const c of this.iterateCallbacks("requestWillFetch"))s=await c({request:s.clone(),event:t})}catch(c){if(c instanceof Error)throw new l("plugin-error-request-will-fetch",{thrownErrorMessage:c.message})}const n=s.clone();try{let c;c=await fetch(s,s.mode==="navigate"?void 0:this._strategy.fetchOptions);for(const i of this.iterateCallbacks("fetchDidSucceed"))c=await i({event:t,request:n,response:c});return c}catch(c){throw r&&await this.runCallbacks("fetchDidFail",{error:c,event:t,originalRequest:r.clone(),request:n.clone()}),c}}async fetchAndCachePut(e){const t=await this.fetch(e),s=t.clone();return this.waitUntil(this.cachePut(e,s)),t}async cacheMatch(e){const t=m(e);let s;const{cacheName:r,matchOptions:n}=this._strategy,c=await this.getCacheKey(t,"read"),i=Object.assign(Object.assign({},n),{cacheName:r});s=await caches.match(c,i);for(const o of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await o({cacheName:r,matchOptions:n,cachedResponse:s,request:c,event:this.event})||void 0;return s}async cachePut(e,t){const s=m(e);await F(0);const r=await this.getCacheKey(s,"write");if(!t)throw new l("cache-put-with-no-response",{url:q(r.url)});const n=await this._ensureResponseSafeToCache(t);if(!n)return!1;const{cacheName:c,matchOptions:i}=this._strategy,o=await self.caches.open(c),h=this.hasCallback("cacheDidUpdate"),g=h?await S(o,r.clone(),["__WB_REVISION__"],i):null;try{await o.put(r,h?n.clone():n)}catch(u){if(u instanceof Error)throw u.name==="QuotaExceededError"&&await H(),u}for(const u of this.iterateCallbacks("cacheDidUpdate"))await u({cacheName:c,oldResponse:g,newResponse:n.clone(),request:r,event:this.event});return!0}async getCacheKey(e,t){const s=`${e.url} | ${t}`;if(!this._cacheKeys[s]){let r=e;for(const n of this.iterateCallbacks("cacheKeyWillBeUsed"))r=m(await n({mode:t,request:r,event:this.event,params:this.params}));this._cacheKeys[s]=r}return this._cacheKeys[s]}hasCallback(e){for(const t of this._strategy.plugins)if(e in t)return!0;return!1}async runCallbacks(e,t){for(const s of this.iterateCallbacks(e))await s(t)}*iterateCallbacks(e){for(const t of this._strategy.plugins)if(typeof t[e]=="function"){const s=this._pluginStateMap.get(t);yield n=>{const c=Object.assign(Object.assign({},n),{state:s});return t[e](c)}}}waitUntil(e){return this._extendLifetimePromises.push(e),e}async doneWaiting(){for(;this._extendLifetimePromises.length;){const e=this._extendLifetimePromises.splice(0),s=(await Promise.allSettled(e)).find(r=>r.status==="rejected");if(s)throw s.reason}}destroy(){this._handlerDeferred.resolve(null)}async _ensureResponseSafeToCache(e){let t=e,s=!1;for(const r of this.iterateCallbacks("cacheWillUpdate"))if(t=await r({request:this.request,response:t,event:this.event})||void 0,s=!0,!t)break;return s||t&&t.status!==200&&(t=void 0),t}}class ${constructor(e={}){this.cacheName=U.getRuntimeName(e.cacheName),this.plugins=e.plugins||[],this.fetchOptions=e.fetchOptions,this.matchOptions=e.matchOptions}handle(e){const[t]=this.handleAll(e);return t}handleAll(e){e instanceof FetchEvent&&(e={event:e,request:e.request});const t=e.event,s=typeof e.request=="string"?new Request(e.request):e.request,r="params"in e?e.params:void 0,n=new B(this,{event:t,request:s,params:r}),c=this._getResponse(n,s,t),i=this._awaitComplete(c,n,s,t);return[c,i]}async _getResponse(e,t,s){await e.runCallbacks("handlerWillStart",{event:s,request:t});let r;try{if(r=await this._handle(t,e),!r||r.type==="error")throw new l("no-response",{url:t.url})}catch(n){if(n instanceof Error){for(const c of e.iterateCallbacks("handlerDidError"))if(r=await c({error:n,event:s,request:t}),r)break}if(!r)throw n}for(const n of e.iterateCallbacks("handlerWillRespond"))r=await n({event:s,request:t,response:r});return r}async _awaitComplete(e,t,s,r){let n,c;try{n=await e}catch{}try{await t.runCallbacks("handlerDidRespond",{event:r,request:s,response:n}),await t.doneWaiting()}catch(i){i instanceof Error&&(c=i)}if(await t.runCallbacks("handlerDidComplete",{event:r,request:s,response:n,error:c}),t.destroy(),c)throw c}}class d extends ${constructor(e={}){e.cacheName=U.getPrecacheName(e.cacheName),super(e),this._fallbackToNetwork=e.fallbackToNetwork!==!1,this.plugins.push(d.copyRedirectedCacheableResponsesPlugin)}async _handle(e,t){const s=await t.cacheMatch(e);return s||(t.event&&t.event.type==="install"?await this._handleInstall(e,t):await this._handleFetch(e,t))}async _handleFetch(e,t){let s;const r=t.params||{};if(this._fallbackToNetwork){const n=r.integrity,c=e.integrity,i=!c||c===n;s=await t.fetch(new Request(e,{integrity:e.mode!=="no-cors"?c||n:void 0})),n&&i&&e.mode!=="no-cors"&&(this._useDefaultCacheabilityPluginIfNeeded(),await t.cachePut(e,s.clone()))}else throw new l("missing-precache-entry",{cacheName:this.cacheName,url:e.url});return s}async _handleInstall(e,t){this._useDefaultCacheabilityPluginIfNeeded();const s=await t.fetch(e);if(!await t.cachePut(e,s.clone()))throw new l("bad-precaching-response",{url:e.url,status:s.status});return s}_useDefaultCacheabilityPluginIfNeeded(){let e=null,t=0;for(const[s,r]of this.plugins.entries())r!==d.copyRedirectedCacheableResponsesPlugin&&(r===d.defaultPrecacheCacheabilityPlugin&&(e=s),r.cacheWillUpdate&&t++);t===0?this.plugins.push(d.defaultPrecacheCacheabilityPlugin):t>1&&e!==null&&this.plugins.splice(e,1)}}d.defaultPrecacheCacheabilityPlugin={async cacheWillUpdate({response:a}){return!a||a.status>=400?null:a}};d.copyRedirectedCacheableResponsesPlugin={async cacheWillUpdate({response:a}){return a.redirected?await A(a):a}};class G{constructor({cacheName:e,plugins:t=[],fallbackToNetwork:s=!0}={}){this._urlsToCacheKeys=new Map,this._urlsToCacheModes=new Map,this._cacheKeysToIntegrities=new Map,this._strategy=new d({cacheName:U.getPrecacheName(e),plugins:[...t,new M({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this._strategy}precache(e){this.addToCacheList(e),this._installAndActiveListenersAdded||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this._installAndActiveListenersAdded=!0)}addToCacheList(e){const t=[];for(const s of e){typeof s=="string"?t.push(s):s&&s.revision===void 0&&t.push(s.url);const{cacheKey:r,url:n}=I(s),c=typeof s!="string"&&s.revision?"reload":"default";if(this._urlsToCacheKeys.has(n)&&this._urlsToCacheKeys.get(n)!==r)throw new l("add-to-cache-list-conflicting-entries",{firstEntry:this._urlsToCacheKeys.get(n),secondEntry:r});if(typeof s!="string"&&s.integrity){if(this._cacheKeysToIntegrities.has(r)&&this._cacheKeysToIntegrities.get(r)!==s.integrity)throw new l("add-to-cache-list-conflicting-integrities",{url:n});this._cacheKeysToIntegrities.set(r,s.integrity)}if(this._urlsToCacheKeys.set(n,r),this._urlsToCacheModes.set(n,c),t.length>0){const i=`Workbox is precaching URLs without revision info: ${t.join(", ")} -This is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(i)}}}install(e){return k(e,async()=>{const t=new O;this.strategy.plugins.push(t);for(const[n,c]of this._urlsToCacheKeys){const i=this._cacheKeysToIntegrities.get(c),o=this._urlsToCacheModes.get(n),h=new Request(n,{integrity:i,cache:o,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:c},request:h,event:e}))}const{updatedURLs:s,notUpdatedURLs:r}=t;return{updatedURLs:s,notUpdatedURLs:r}})}activate(e){return k(e,async()=>{const t=await self.caches.open(this.strategy.cacheName),s=await t.keys(),r=new Set(this._urlsToCacheKeys.values()),n=[];for(const c of s)r.has(c.url)||(await t.delete(c),n.push(c.url));return{deletedURLs:n}})}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,s=this.getCacheKeyForURL(t);if(s)return(await self.caches.open(this.strategy.cacheName)).match(s)}createHandlerBoundToURL(e){const t=this.getCacheKeyForURL(e);if(!t)throw new l("non-precached-url",{url:e});return s=>(s.request=new Request(e),s.params=Object.assign({cacheKey:t},s.params),this.strategy.handle(s))}}let b;const K=()=>(b||(b=new G),b);try{self["workbox:routing:7.4.0"]&&_()}catch{}const v="GET",R=a=>a&&typeof a=="object"?a:{handle:a};class w{constructor(e,t,s=v){this.handler=R(t),this.match=e,this.method=s}setCatchHandler(e){this.catchHandler=R(e)}}class V extends w{constructor(e,t,s){const r=({url:n})=>{const c=e.exec(n.href);if(c&&!(n.origin!==location.origin&&c.index!==0))return c.slice(1)};super(r,t,s)}}class Q{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",e=>{const{request:t}=e,s=this.handleRequest({request:t,event:e});s&&e.respondWith(s)})}addCacheListener(){self.addEventListener("message",e=>{if(e.data&&e.data.type==="CACHE_URLS"){const{payload:t}=e.data,s=Promise.all(t.urlsToCache.map(r=>{typeof r=="string"&&(r=[r]);const n=new Request(...r);return this.handleRequest({request:n,event:e})}));e.waitUntil(s),e.ports&&e.ports[0]&&s.then(()=>e.ports[0].postMessage(!0))}})}handleRequest({request:e,event:t}){const s=new URL(e.url,location.href);if(!s.protocol.startsWith("http"))return;const r=s.origin===location.origin,{params:n,route:c}=this.findMatchingRoute({event:t,request:e,sameOrigin:r,url:s});let i=c&&c.handler;const o=e.method;if(!i&&this._defaultHandlerMap.has(o)&&(i=this._defaultHandlerMap.get(o)),!i)return;let h;try{h=i.handle({url:s,request:e,event:t,params:n})}catch(u){h=Promise.reject(u)}const g=c&&c.catchHandler;return h instanceof Promise&&(this._catchHandler||g)&&(h=h.catch(async u=>{if(g)try{return await g.handle({url:s,request:e,event:t,params:n})}catch(L){L instanceof Error&&(u=L)}if(this._catchHandler)return this._catchHandler.handle({url:s,request:e,event:t});throw u})),h}findMatchingRoute({url:e,sameOrigin:t,request:s,event:r}){const n=this._routes.get(s.method)||[];for(const c of n){let i;const o=c.match({url:e,sameOrigin:t,request:s,event:r});if(o)return i=o,(Array.isArray(i)&&i.length===0||o.constructor===Object&&Object.keys(o).length===0||typeof o=="boolean")&&(i=void 0),{route:c,params:i}}return{}}setDefaultHandler(e,t=v){this._defaultHandlerMap.set(t,R(e))}setCatchHandler(e){this._catchHandler=R(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new l("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(t>-1)this._routes.get(e.method).splice(t,1);else throw new l("unregister-route-route-not-registered")}}let y;const z=()=>(y||(y=new Q,y.addFetchListener(),y.addCacheListener()),y);function J(a,e,t){let s;if(typeof a=="string"){const n=new URL(a,location.href),c=({url:i})=>i.href===n.href;s=new w(c,e,t)}else if(a instanceof RegExp)s=new V(a,e,t);else if(typeof a=="function")s=new w(a,e,t);else if(a instanceof w)s=a;else throw new l("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});return z().registerRoute(s),s}function X(a,e=[]){for(const t of[...a.searchParams.keys()])e.some(s=>s.test(t))&&a.searchParams.delete(t);return a}function*Y(a,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:t="index.html",cleanURLs:s=!0,urlManipulation:r}={}){const n=new URL(a,location.href);n.hash="",yield n.href;const c=X(n,e);if(yield c.href,t&&c.pathname.endsWith("/")){const i=new URL(c.href);i.pathname+=t,yield i.href}if(s){const i=new URL(c.href);i.pathname+=".html",yield i.href}if(r){const i=r({url:n});for(const o of i)yield o.href}}class Z extends w{constructor(e,t){const s=({request:r})=>{const n=e.getURLsToCacheKeys();for(const c of Y(r.url,t)){const i=n.get(c);if(i){const o=e.getIntegrityForCacheKey(i);return{cacheKey:i,integrity:o}}}};super(s,e.strategy)}}function ee(a){const e=K(),t=new Z(e,a);J(t)}function te(a){K().precache(a)}function se(a,e){te(a),ee(e)}self.addEventListener("message",a=>{a.data&&a.data.type==="SKIP_WAITING"&&self.skipWaiting()});se([{"revision":"db5ce96ca509546485597e0836716f2c","url":"index.html"},{"revision":null,"url":"assets/_commonjsHelpers-Cpj98o6Y.js"},{"revision":null,"url":"assets/workbox-window.prod.es5-BqEJf4Xk.js"},{"revision":null,"url":"assets/TransactionsView-ErSrFuLg.js"},{"revision":null,"url":"assets/TransactionsView-DtBUcl6Y.css"},{"revision":null,"url":"assets/Spinner.vue_vue_type_style_index_0_lang-ghXHCVpI.js"},{"revision":null,"url":"assets/Spinner-CNMYSNQh.css"},{"revision":null,"url":"assets/SingleProduct-xA-Dyu9r.css"},{"revision":null,"url":"assets/SingleProduct-DS8wIDwN.js"},{"revision":null,"url":"assets/SectionHead-CldEyeHO.css"},{"revision":null,"url":"assets/SectionHead-CiwUIGKe.js"},{"revision":null,"url":"assets/SearchView-BO4eC48H.css"},{"revision":null,"url":"assets/SearchView-BAXvbdsy.js"},{"revision":null,"url":"assets/SearchInput-R4CzmG27.css"},{"revision":null,"url":"assets/SearchInput-CSiqcIfW.js"},{"revision":null,"url":"assets/RateStrip-CoZk8fjQ.js"},{"revision":null,"url":"assets/RateStrip-CkNzWfWt.css"},{"revision":null,"url":"assets/ProfileView-CPyo29sC.css"},{"revision":null,"url":"assets/ProfileView-CAzDKC1_.js"},{"revision":null,"url":"assets/ProductCard-ClTnYUud.css"},{"revision":null,"url":"assets/ProductCard-Cd-G3dvx.js"},{"revision":null,"url":"assets/PageBar-Bu_ZJ2Zu.css"},{"revision":null,"url":"assets/PageBar-Bkc2Ht1O.js"},{"revision":null,"url":"assets/OrdersView-XheLpdhr.css"},{"revision":null,"url":"assets/OrdersView-CfcB9slT.js"},{"revision":null,"url":"assets/NotifyVant.vue_vue_type_script_setup_true_lang-CY4DS_6T.js"},{"revision":null,"url":"assets/NotificationsView-PW4uU2F9.js"},{"revision":null,"url":"assets/NotificationsView-CSZgMF1r.css"},{"revision":null,"url":"assets/NewestView-YTILSFOu.js"},{"revision":null,"url":"assets/NewestView-9BZMw3ID.css"},{"revision":null,"url":"assets/LoginRegisterView-Co0TkemA.js"},{"revision":null,"url":"assets/LoginRegisterView-B7DR4Q72.css"},{"revision":null,"url":"assets/index-DtVU50JL.js"},{"revision":null,"url":"assets/index-D-jEuKqG.css"},{"revision":null,"url":"assets/index-CZjgV-Yn.js"},{"revision":null,"url":"assets/index-Ca8ka09f.js"},{"revision":null,"url":"assets/index-BBOQn_fb.js"},{"revision":null,"url":"assets/HomeView-waaUoUs9.css"},{"revision":null,"url":"assets/HomeView-BOniF0DH.js"},{"revision":null,"url":"assets/FormItemContext-Dxet_qkI.js"},{"revision":null,"url":"assets/filters-CLL9nGZ2.js"},{"revision":null,"url":"assets/FavoritesView-v_Hv-tez.css"},{"revision":null,"url":"assets/FavoritesView-DpZcWcm_.js"},{"revision":null,"url":"assets/DialogVant.vue_vue_type_style_index_0_lang-DKsdrzNc.js"},{"revision":null,"url":"assets/DialogVant-CIAzSUS_.css"},{"revision":null,"url":"assets/dialogEmpty1-Caw7F5KL.js"},{"revision":null,"url":"assets/DashboardView-pCHsg2UC.js"},{"revision":null,"url":"assets/DashboardView-DTklY0sQ.css"},{"revision":null,"url":"assets/CollectionView-CP2W-zpK.css"},{"revision":null,"url":"assets/CollectionView-CexNr-aN.js"},{"revision":null,"url":"assets/client-WIBW0tF5.js"},{"revision":null,"url":"assets/classCallCheck-BSDY9VEy.js"},{"revision":null,"url":"assets/CartView-yrzTKQ4M.css"},{"revision":null,"url":"assets/CartView-Cb4qKsUd.js"},{"revision":null,"url":"assets/cartStore-CoSoowuC.js"},{"revision":"2d61085b7d642f658b0293f7d21fa261","url":"favicon.ico"},{"revision":"809f622706a5b36825403377f1155953","url":"icon-192.png"},{"revision":"bc2dd1f4bb210316c01158b1539def63","url":"icon-512.png"},{"revision":"2e39c9668b2bdc8b430f61d95dfc35b0","url":"manifest.webmanifest"}]); +This is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(i)}}}install(e){return k(e,async()=>{const t=new O;this.strategy.plugins.push(t);for(const[n,c]of this._urlsToCacheKeys){const i=this._cacheKeysToIntegrities.get(c),o=this._urlsToCacheModes.get(n),h=new Request(n,{integrity:i,cache:o,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:c},request:h,event:e}))}const{updatedURLs:s,notUpdatedURLs:r}=t;return{updatedURLs:s,notUpdatedURLs:r}})}activate(e){return k(e,async()=>{const t=await self.caches.open(this.strategy.cacheName),s=await t.keys(),r=new Set(this._urlsToCacheKeys.values()),n=[];for(const c of s)r.has(c.url)||(await t.delete(c),n.push(c.url));return{deletedURLs:n}})}getURLsToCacheKeys(){return this._urlsToCacheKeys}getCachedURLs(){return[...this._urlsToCacheKeys.keys()]}getCacheKeyForURL(e){const t=new URL(e,location.href);return this._urlsToCacheKeys.get(t.href)}getIntegrityForCacheKey(e){return this._cacheKeysToIntegrities.get(e)}async matchPrecache(e){const t=e instanceof Request?e.url:e,s=this.getCacheKeyForURL(t);if(s)return(await self.caches.open(this.strategy.cacheName)).match(s)}createHandlerBoundToURL(e){const t=this.getCacheKeyForURL(e);if(!t)throw new l("non-precached-url",{url:e});return s=>(s.request=new Request(e),s.params=Object.assign({cacheKey:t},s.params),this.strategy.handle(s))}}let b;const K=()=>(b||(b=new G),b);try{self["workbox:routing:7.4.0"]&&_()}catch{}const v="GET",R=a=>a&&typeof a=="object"?a:{handle:a};class w{constructor(e,t,s=v){this.handler=R(t),this.match=e,this.method=s}setCatchHandler(e){this.catchHandler=R(e)}}class V extends w{constructor(e,t,s){const r=({url:n})=>{const c=e.exec(n.href);if(c&&!(n.origin!==location.origin&&c.index!==0))return c.slice(1)};super(r,t,s)}}class Q{constructor(){this._routes=new Map,this._defaultHandlerMap=new Map}get routes(){return this._routes}addFetchListener(){self.addEventListener("fetch",e=>{const{request:t}=e,s=this.handleRequest({request:t,event:e});s&&e.respondWith(s)})}addCacheListener(){self.addEventListener("message",e=>{if(e.data&&e.data.type==="CACHE_URLS"){const{payload:t}=e.data,s=Promise.all(t.urlsToCache.map(r=>{typeof r=="string"&&(r=[r]);const n=new Request(...r);return this.handleRequest({request:n,event:e})}));e.waitUntil(s),e.ports&&e.ports[0]&&s.then(()=>e.ports[0].postMessage(!0))}})}handleRequest({request:e,event:t}){const s=new URL(e.url,location.href);if(!s.protocol.startsWith("http"))return;const r=s.origin===location.origin,{params:n,route:c}=this.findMatchingRoute({event:t,request:e,sameOrigin:r,url:s});let i=c&&c.handler;const o=e.method;if(!i&&this._defaultHandlerMap.has(o)&&(i=this._defaultHandlerMap.get(o)),!i)return;let h;try{h=i.handle({url:s,request:e,event:t,params:n})}catch(u){h=Promise.reject(u)}const g=c&&c.catchHandler;return h instanceof Promise&&(this._catchHandler||g)&&(h=h.catch(async u=>{if(g)try{return await g.handle({url:s,request:e,event:t,params:n})}catch(L){L instanceof Error&&(u=L)}if(this._catchHandler)return this._catchHandler.handle({url:s,request:e,event:t});throw u})),h}findMatchingRoute({url:e,sameOrigin:t,request:s,event:r}){const n=this._routes.get(s.method)||[];for(const c of n){let i;const o=c.match({url:e,sameOrigin:t,request:s,event:r});if(o)return i=o,(Array.isArray(i)&&i.length===0||o.constructor===Object&&Object.keys(o).length===0||typeof o=="boolean")&&(i=void 0),{route:c,params:i}}return{}}setDefaultHandler(e,t=v){this._defaultHandlerMap.set(t,R(e))}setCatchHandler(e){this._catchHandler=R(e)}registerRoute(e){this._routes.has(e.method)||this._routes.set(e.method,[]),this._routes.get(e.method).push(e)}unregisterRoute(e){if(!this._routes.has(e.method))throw new l("unregister-route-but-not-found-with-method",{method:e.method});const t=this._routes.get(e.method).indexOf(e);if(t>-1)this._routes.get(e.method).splice(t,1);else throw new l("unregister-route-route-not-registered")}}let y;const z=()=>(y||(y=new Q,y.addFetchListener(),y.addCacheListener()),y);function J(a,e,t){let s;if(typeof a=="string"){const n=new URL(a,location.href),c=({url:i})=>i.href===n.href;s=new w(c,e,t)}else if(a instanceof RegExp)s=new V(a,e,t);else if(typeof a=="function")s=new w(a,e,t);else if(a instanceof w)s=a;else throw new l("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});return z().registerRoute(s),s}function X(a,e=[]){for(const t of[...a.searchParams.keys()])e.some(s=>s.test(t))&&a.searchParams.delete(t);return a}function*Y(a,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:t="index.html",cleanURLs:s=!0,urlManipulation:r}={}){const n=new URL(a,location.href);n.hash="",yield n.href;const c=X(n,e);if(yield c.href,t&&c.pathname.endsWith("/")){const i=new URL(c.href);i.pathname+=t,yield i.href}if(s){const i=new URL(c.href);i.pathname+=".html",yield i.href}if(r){const i=r({url:n});for(const o of i)yield o.href}}class Z extends w{constructor(e,t){const s=({request:r})=>{const n=e.getURLsToCacheKeys();for(const c of Y(r.url,t)){const i=n.get(c);if(i){const o=e.getIntegrityForCacheKey(i);return{cacheKey:i,integrity:o}}}};super(s,e.strategy)}}function ee(a){const e=K(),t=new Z(e,a);J(t)}function te(a){K().precache(a)}function se(a,e){te(a),ee(e)}self.addEventListener("message",a=>{a.data&&a.data.type==="SKIP_WAITING"&&self.skipWaiting()});se([{"revision":"d6ed1e30ff049a994c30e11ae50cbff3","url":"index.html"},{"revision":null,"url":"assets/workbox-window.prod.es5-BqEJf4Xk.js"},{"revision":null,"url":"assets/TransactionsView-CE67aKDY.css"},{"revision":null,"url":"assets/TransactionsView-BpNfNk05.js"},{"revision":null,"url":"assets/SectionHead-X7JFvmOG.css"},{"revision":null,"url":"assets/SectionHead-DadL6umU.js"},{"revision":null,"url":"assets/SearchView-CS1oUiFo.css"},{"revision":null,"url":"assets/SearchView-C9JtP0Ya.js"},{"revision":null,"url":"assets/SearchInput-vVDQz-rO.js"},{"revision":null,"url":"assets/SearchInput-DEfgrsbu.css"},{"revision":null,"url":"assets/ReportView-tLoo_9HZ.css"},{"revision":null,"url":"assets/ReportView-DdQlxLKa.js"},{"revision":null,"url":"assets/RateStrip-DvVfajyI.js"},{"revision":null,"url":"assets/RateStrip-BjkE-E9D.css"},{"revision":null,"url":"assets/raf-nDFcuFT6.js"},{"revision":null,"url":"assets/ProfileView-umP5Sgbh.css"},{"revision":null,"url":"assets/ProfileView-C1gjwKvq.js"},{"revision":null,"url":"assets/ProductCard-C8bieA3Y.css"},{"revision":null,"url":"assets/ProductCard-4TPJHHsT.js"},{"revision":null,"url":"assets/PageBar-CKAnfXNs.css"},{"revision":null,"url":"assets/PageBar-B1ks8U8i.js"},{"revision":null,"url":"assets/OrdersView-DENQ-Etu.js"},{"revision":null,"url":"assets/OrdersView-BULq1WHJ.css"},{"revision":null,"url":"assets/NotificationsView-BYJ2kMU3.css"},{"revision":null,"url":"assets/NotificationsView-BMMkA8pk.js"},{"revision":null,"url":"assets/NewestView-D2rB4-Sw.css"},{"revision":null,"url":"assets/NewestView-BU18f8_c.js"},{"revision":null,"url":"assets/LoginRegisterView-DruItYRS.js"},{"revision":null,"url":"assets/LoginRegisterView-CBenlDic.css"},{"revision":null,"url":"assets/KeyCode-BMdFtCT-.js"},{"revision":null,"url":"assets/index-DWuFFuVX.js"},{"revision":null,"url":"assets/index-DPSZMLNJ.js"},{"revision":null,"url":"assets/index-CxgJ__2z.css"},{"revision":null,"url":"assets/index-BkhudXey.js"},{"revision":null,"url":"assets/index-BAr1mMLP.js"},{"revision":null,"url":"assets/IamCallback-CuKyx6n2.js"},{"revision":null,"url":"assets/HomeView-Cl6D8_Sy.js"},{"revision":null,"url":"assets/HomeView-BsWyRfva.css"},{"revision":null,"url":"assets/FormItemContext-YTkEF048.js"},{"revision":null,"url":"assets/filters-Cm9yhZZ9.js"},{"revision":null,"url":"assets/FavoritesView-KwTaarkp.js"},{"revision":null,"url":"assets/FavoritesView-ChC1yylj.css"},{"revision":null,"url":"assets/DashboardView-F1CUJWd2.js"},{"revision":null,"url":"assets/DashboardView-DcUY6mzx.css"},{"revision":null,"url":"assets/CustomerChoiceView-H1FeybTn.css"},{"revision":null,"url":"assets/CustomerChoiceView-AilyPwLn.js"},{"revision":null,"url":"assets/CompleteProfileView-Cy-typLQ.css"},{"revision":null,"url":"assets/CompleteProfileView-Bbq7Qgyl.js"},{"revision":null,"url":"assets/CollectionView-hOc6F2Q6.css"},{"revision":null,"url":"assets/CollectionView-Bm2v65eC.js"},{"revision":null,"url":"assets/classCallCheck-DDMOgDz1.js"},{"revision":null,"url":"assets/ChildOrdersView-C9qT9wGg.js"},{"revision":null,"url":"assets/ChildOrdersView-BSUeH1Jr.css"},{"revision":null,"url":"assets/CartView-KYhz2yxy.js"},{"revision":null,"url":"assets/CartView-DKfSBWzV.css"},{"revision":null,"url":"assets/AppearanceView-Cs0B0IPW.js"},{"revision":null,"url":"assets/AppearanceView-B8ytXsfh.css"},{"revision":"2d61085b7d642f658b0293f7d21fa261","url":"favicon.ico"},{"revision":"809f622706a5b36825403377f1155953","url":"icon-192.png"},{"revision":"bc2dd1f4bb210316c01158b1539def63","url":"icon-512.png"},{"revision":"2e39c9668b2bdc8b430f61d95dfc35b0","url":"manifest.webmanifest"}]); diff --git a/apps/user-app-v2/index.html b/apps/user-app-v2/index.html index eb8c2f2..2fac0fd 100644 --- a/apps/user-app-v2/index.html +++ b/apps/user-app-v2/index.html @@ -5,13 +5,36 @@ - + + + + طلای منتزر - -
+ +
diff --git a/apps/user-app-v2/package.json b/apps/user-app-v2/package.json index f3eb063..60c5cf0 100644 --- a/apps/user-app-v2/package.json +++ b/apps/user-app-v2/package.json @@ -8,19 +8,17 @@ "lint": "eslint \"src/**/*.{ts,vue}\"" }, "dependencies": { - "@ant-design/icons-vue": "^6.1.0", "@gold-bank/shared-types": "workspace:*", + "@lottiefiles/dotlottie-vue": "^0.4.15", "@vueuse/core": "^9.13.0", "ant-design-vue": "^3.2.20", - "gsap": "^3.9.1", "moment-jalaali": "^0.10.0", "pinia": "^2.2.0", "swiper": "^7.4.1", "vant": "^4.0.3", "vue": "^3.5.0", "vue-router": "^4.4.0", - "vue3-lazyload": "^0.2.5-beta", - "@lottiefiles/dotlottie-vue": "^0.4.15" + "vue3-lazyload": "^0.2.5-beta" }, "devDependencies": { "@vitejs/plugin-vue": "^5.1.0", @@ -30,8 +28,8 @@ "tailwindcss": "3.0.18", "typescript": "^5.5.0", "vite": "^5.4.0", - "vue-tsc": "^2.1.0", "vite-plugin-pwa": "^0.20.5", + "vue-tsc": "^2.1.0", "workbox-precaching": "^7.1.0", "workbox-window": "^7.1.0" } diff --git a/apps/user-app-v2/src/App.vue b/apps/user-app-v2/src/App.vue index 5ca4bcc..952463c 100644 --- a/apps/user-app-v2/src/App.vue +++ b/apps/user-app-v2/src/App.vue @@ -19,35 +19,30 @@ - - + - - - - + +
- - diff --git a/apps/user-app-v2/src/components/DialogVantOneButton.vue b/apps/user-app-v2/src/components/DialogVantOneButton.vue deleted file mode 100644 index 171401e..0000000 --- a/apps/user-app-v2/src/components/DialogVantOneButton.vue +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - diff --git a/apps/user-app-v2/src/components/NotifyVant.vue b/apps/user-app-v2/src/components/NotifyVant.vue deleted file mode 100644 index c6d5bf7..0000000 --- a/apps/user-app-v2/src/components/NotifyVant.vue +++ /dev/null @@ -1,50 +0,0 @@ - - - - - diff --git a/apps/user-app-v2/src/components/Spinner.vue b/apps/user-app-v2/src/components/Spinner.vue index 5617189..76e0eb0 100644 --- a/apps/user-app-v2/src/components/Spinner.vue +++ b/apps/user-app-v2/src/components/Spinner.vue @@ -3,7 +3,8 @@ @@ -322,17 +313,19 @@ import { useRouter } from 'vue-router' import Icon from '../icon/Icon.vue' import GallerySlider from './GallerySlider.vue' import Spinner from '../Spinner.vue' -import NotifyVant from '../NotifyVant.vue' -import DialogVant from '../DialogVant.vue' -import { useProduct } from '../../composables/useProduct' +import { toast } from '../../composables/useToast' +import IslandSheet from '../ui/IslandSheet.vue' +import { useProduct, isVariantOrderable } from '../../composables/useProduct' import { useProductDetail } from '../../composables/useProductDetail' import { useFavoritesStore } from '../../stores/favoritesStore' import { useFiltersStore } from '../../stores/filtersStore' import { useCartStore, type CartItem } from '../../stores/cartStore' import { isUserLoggedIn } from '../../utils/checkAccess' -import loginDialogImage from '../../assets/img/empty/dialogEmpty1.svg' +import type { ProductSummary } from '../../api/client' -const props = defineProps<{ id: string }>() +// `initial`: the card's own ProductSummary when opened from a list (see +// ProductMorph.vue) — lets the page render whole on its first frame. +const props = defineProps<{ id: string; initial?: ProductSummary | null }>() const emit = defineEmits<{ (e: 'closeDrawer'): void }>() const router = useRouter() @@ -340,7 +333,7 @@ const favorites = useFavoritesStore() const filters = useFiltersStore() const cart = useCartStore() -// Used two ways, as in legacy: embedded in a bottom Drawer by the product +// Used two ways, as in legacy: embedded in the ProductMorph overlay by the product // cards, and as a standalone page for deep links (/product/:id). In the drawer // case the parent listens for closeDrawer; on the routed page there is no // parent, so fall back to history.back(). @@ -349,7 +342,6 @@ const close = () => { if (router.currentRoute.value.name === 'singleProduct') router.back() } -const notify = ref(false) const loginNotify = ref(false) const imageIndex = ref(0) const bodyOpen = ref(false) @@ -377,7 +369,7 @@ function onScroll() { headerSolid.value = el.scrollTop > Math.max(galleryHeight - HEADER_SOLID_OFFSET_PX, 0) } -const productDetail = useProductDetail(props.id) +const productDetail = useProductDetail(props.id, props.initial) const loading = productDetail.loading const flag = productDetail.flag @@ -477,7 +469,14 @@ const inCart = computed(() => cart.isInCart(storeProduct.value)) const cartIndex = computed(() => cart.find_index(storeProduct.value)) const cartQty = computed(() => (cartIndex.value > -1 ? cart.items[cartIndex.value].qty : 0)) -const increment = () => cart.updateFeild(cartQty.value + 1, cartIndex.value, storeProduct.value, 'qty') +// Stock ceiling: a pre-order variant may exceed what is on hand, anything else +// stops at its qty. The store clamps too — this just keeps the button honest. +const cartMaxQty = computed(() => cart.maxQty(storeProduct.value)) +const canIncrement = computed(() => cartMaxQty.value === null || cartQty.value < cartMaxQty.value) +const increment = () => { + if (!canIncrement.value) return + cart.updateFeild(cartQty.value + 1, cartIndex.value, storeProduct.value, 'qty') +} const decrement = () => { if (cartQty.value <= 1) { cart.remove(storeProduct.value) @@ -486,9 +485,12 @@ const decrement = () => { cart.updateFeild(cartQty.value - 1, cartIndex.value, storeProduct.value, 'qty') } +const isOrderable = (v: Parameters[0]) => isVariantOrderable(v) + const addToCart = () => { - cart.addToCart(storeProduct.value) - notify.value = true + // The store refuses an un-orderable variant; only confirm when it accepted. + if (!cart.addToCart(storeProduct.value)) return + toast.success('محصول با موفقیت به سبد خرید افزوده شد', { title: 'ثبت سفارش' }) } const toggleFav = (e: Event) => { @@ -533,7 +535,7 @@ onBeforeUnmount(() => { height: 100vh; overflow-y: auto; overflow-x: hidden; - background: @canvas; + background: @page; // Momentum scrolling on iOS, and stop a scroll at either end from chaining // out to the page (or the drawer) behind. -webkit-overflow-scrolling: touch; @@ -580,7 +582,7 @@ onBeforeUnmount(() => { } .pd__header.is-solid { - background: rgba(255, 255, 255, 0.88); + background: alpha(@canvas, 88%); backdrop-filter: blur(14px); border-bottom-color: @hairline; } @@ -641,7 +643,7 @@ onBeforeUnmount(() => { cursor: pointer; text-decoration: none; color: @ink; - background: rgba(255, 255, 255, 0.9); + background: alpha(@canvas, 90%); backdrop-filter: blur(10px) saturate(140%); box-shadow: 0 10px 26px -16px rgba(20, 22, 26, 0.7); transition: transform 0.18s ease, color 0.28s ease, background 0.28s ease, @@ -695,7 +697,7 @@ onBeforeUnmount(() => { min-height: 320px; max-height: 460px; overflow: hidden; - background: @hairlineSoft; + background: @photoStage; // Horizontal drags are the gallery's; vertical ones still scroll the page. touch-action: pan-y; } @@ -1004,7 +1006,7 @@ onBeforeUnmount(() => { } .pd__stock.is-in { color: @green; - background: fade(@green, 8%); + background: alpha(@green, 8%); } .pd__stock.is-pre { color: @wine; @@ -1086,7 +1088,7 @@ onBeforeUnmount(() => { color: @inkFaint; } .pd__figure--accent .pd__figureLabel { - color: fade(@wine, 65%); + color: alpha(@wine, 65%); } /* ── Variant chips ───────────────────────────────────────── */ @@ -1123,10 +1125,16 @@ onBeforeUnmount(() => { transform: scale(0.95); } .pd__chip.is-on { - color: #fff; + color: @onInk; background: @ink; border-color: @ink; } +/* Same treatment as v1's .pd__variant.is-out: an un-orderable weight stays + visible (so the customer can see it exists) but reads as unavailable. */ +.pd__chip.is-out { + opacity: 0.45; + cursor: not-allowed; +} /* ── Blocks ──────────────────────────────────────────────── */ .pd__block { @@ -1213,7 +1221,7 @@ onBeforeUnmount(() => { max-width: 768px; margin: 0 auto; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); - background: rgba(255, 255, 255, 0.9); + background: alpha(@canvas, 90%); backdrop-filter: blur(18px) saturate(140%); border-top: 1px solid @hairline; } @@ -1299,7 +1307,7 @@ onBeforeUnmount(() => { font-weight: 800; white-space: nowrap; text-decoration: none; - color: #fff; + color: @onInk; background: @ink; box-shadow: 0 14px 30px -18px rgba(20, 22, 26, 0.9); transition: transform 0.18s ease, opacity 0.18s ease; diff --git a/apps/user-app-v2/src/components/search/Filters.vue b/apps/user-app-v2/src/components/search/Filters.vue index 9f6360d..19a5ac5 100644 --- a/apps/user-app-v2/src/components/search/Filters.vue +++ b/apps/user-app-v2/src/components/search/Filters.vue @@ -13,7 +13,7 @@ - Gram-range filter: real, bounds derived from the actual min/max rashWeightGrams across all variants (rather than a customer-specific server-provided bound). Still uses ant-design-vue's Slider for the actual - drag/range behaviour, restyled via :deep() to the wine accent. + drag/range behaviour, restyled to the app's accent. - DROPPED: color filter — no color concept exists anywhere in the new Product/ProductVariant schema, not a stubbed-off feature like promotions, genuinely nothing to filter by. @@ -23,72 +23,139 @@ concept in the new Customer model). - DROPPED: discount toggle — no promotions data exists (see useProduct.ts). - Top padding (120px) accounts for PageBar + the search input row with no - chips row below it (chips are hidden while this sheet is open) — same - bar-chrome math SearchView/OrdersView use for their own #below content. + Presentation: a bottom sheet over a dimmed, see-through backdrop. Full width + and attached to the bottom edge — not a floating island, so it has room to + take more filters later — and only as tall as its content, up to 88% of the + screen, past which the body scrolls under a fixed header and action bar. + It replaced an in-place swap of the search page's body (results hidden with + v-show, the bar retitled and its back button hijacked, the tab bar hidden), + which was neither a page nor a modal. Closes on the backdrop, a swipe down + on its header, the × button, or the hardware/browser back + (close-on-popstate). + + STRUCTURE IS SHARED, LOOK IS NOT. The template and script here are kept + identical to user-app's Filters.vue; each app styles the same markup in its + own design language (this one: white sheet with the 32px top radius the + detail page's sheet uses, borderless @hairlineSoft panels via DropDown, @ink + pill buttons and chips, squircle controls, @wine accent). + + Choices are a DRAFT until "اعمال فیلتر": nothing touches the filters store + while the sheet is open, so dragging the gram slider no longer re-filters and + re-renders the whole result grid behind it on every pointer move (it did, and + that was most of the lag). Dismissing without applying discards the draft. + "پاک کردن فیلتر‌ها" clears only what this sheet owns (brands, gram range) — + it used to reset the whole query, wiping the search text and the category + chip along with it. --> - diff --git a/apps/user-app-v2/src/components/slider/HomeSlider.vue b/apps/user-app-v2/src/components/slider/HomeSlider.vue deleted file mode 100644 index d4b5297..0000000 --- a/apps/user-app-v2/src/components/slider/HomeSlider.vue +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - diff --git a/apps/user-app-v2/src/components/slider/Slider.vue b/apps/user-app-v2/src/components/slider/Slider.vue deleted file mode 100644 index 9a8bdf3..0000000 --- a/apps/user-app-v2/src/components/slider/Slider.vue +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - diff --git a/apps/user-app-v2/src/components/ui/ContentWrapper.vue b/apps/user-app-v2/src/components/ui/ContentWrapper.vue deleted file mode 100644 index 231b872..0000000 --- a/apps/user-app-v2/src/components/ui/ContentWrapper.vue +++ /dev/null @@ -1,12 +0,0 @@ - - - - diff --git a/apps/user-app-v2/src/components/ui/DropDown.vue b/apps/user-app-v2/src/components/ui/DropDown.vue index ad67f60..3d4b379 100644 --- a/apps/user-app-v2/src/components/ui/DropDown.vue +++ b/apps/user-app-v2/src/components/ui/DropDown.vue @@ -4,20 +4,44 @@ raw Tailwind utility classes with legacy tokens (text-primary, border-lightGray/20), the one accordion in the app that didn't match the LESS-token look every other surface uses. + + FIXED — the collapse itself. It used to v-if the body in and out and animate + `max-height` from 0 to a hard-coded 240px, which broke three ways: content + taller than 240px was cut off for the whole animation and then jumped to full + height at the end; content shorter than 240px opened fast and then closed + with a dead pause (the first stretch of the shrink happened above the real + height, so nothing moved); and the close used `animation: … reverse` on a + `leave-to` class, which Vue does not time leave transitions by, so it + usually just snapped shut. The body's own padding also popped in and out. + + Now the body stays mounted and the panel animates `grid-template-rows` from + 0fr to 1fr — the browser interpolates to the content's real height, whatever + it is, in both directions, with no measuring and no cap. All the padding + below the header lives inside the clipped row, so it is part of what + animates. Browsers too old to interpolate grid rows (pre-2022) simply open + and close without the slide. + + STRUCTURE IS SHARED, LOOK IS NOT: the template, script and the collapse + mechanics are identical in user-app and user-app-v2; only the "Look" block + at the bottom differs, each in its own app's design language. --> @@ -25,21 +49,16 @@ import { ref } from 'vue' import Icon from '../icon/Icon.vue' -withDefaults(defineProps<{ text?: string }>(), {}) -const show = ref(false) +const props = withDefaults(defineProps<{ text?: string; defaultOpen?: boolean }>(), { defaultOpen: false }) +const show = ref(props.defaultOpen) - - diff --git a/apps/user-app-v2/src/components/ui/IslandSheet.vue b/apps/user-app-v2/src/components/ui/IslandSheet.vue new file mode 100644 index 0000000..8673201 --- /dev/null +++ b/apps/user-app-v2/src/components/ui/IslandSheet.vue @@ -0,0 +1,384 @@ + + + + + + diff --git a/apps/user-app-v2/src/components/ui/Navigation.vue b/apps/user-app-v2/src/components/ui/Navigation.vue index 0aeb067..3deae35 100644 --- a/apps/user-app-v2/src/components/ui/Navigation.vue +++ b/apps/user-app-v2/src/components/ui/Navigation.vue @@ -1,19 +1,14 @@ @@ -146,12 +142,10 @@ import { nextTick, onMounted, reactive, ref } from 'vue' import { useRouter } from 'vue-router' import { Drawer, Form, FormItem, Textarea } from 'ant-design-vue' import { Loading, PullRefresh } from 'vant' -import dialogEmpty4 from '../assets/img/empty/dialogEmpty4.svg' -import loginDialogImage from '../assets/img/empty/dialogEmpty1.svg' import Icon from '../components/icon/Icon.vue' import PageBar from '../components/ui/PageBar.vue' import Spinner from '../components/Spinner.vue' -import DialogVant from '../components/DialogVant.vue' +import IslandSheet from '../components/ui/IslandSheet.vue' import CartItem from '../components/product/CartItem.vue' import { useCartStore, type CartItem as CartItemType } from '../stores/cartStore' import { useSessionStore } from '../stores/session' @@ -211,19 +205,25 @@ const goOrders = async () => { const submitOrder = async () => { cartData.notify = false - if (!session.customerId) { + // Gate on the token, not on a remembered id: the id alone is no longer a + // credential, and POST /orders now requires a customer JWT (SEC-02). + if (!session.isLoggedIn) { loginNotify.value = true return } try { cartData.loadingPage = true const order = await api.createOrder({ - customerId: session.customerId, + // Ignored by the server, which takes the customer from the token; still + // sent so older builds keep validating. Removed in Phase 2. + customerId: session.customerId ?? undefined, items: cart.items.map((item) => { const variant = cart.variant(item) return { productVariantId: item.vid, quantity: item.qty, + // Sent for older API builds only: the server prices app orders itself + // (MON-08) and ignores this figure. wagePercent: variant ? parseFloat(variant.defaultWagePercent) : 0, } }), @@ -259,7 +259,7 @@ onMounted(async () => { diff --git a/apps/user-app-v2/src/views/HomeView.vue b/apps/user-app-v2/src/views/HomeView.vue index c337da9..0ca1e79 100644 --- a/apps/user-app-v2/src/views/HomeView.vue +++ b/apps/user-app-v2/src/views/HomeView.vue @@ -76,27 +76,15 @@ - - - -
+ + diff --git a/apps/user-app-v2/src/views/expert/CustomerChoiceView.vue b/apps/user-app-v2/src/views/expert/CustomerChoiceView.vue new file mode 100644 index 0000000..2e04b0c --- /dev/null +++ b/apps/user-app-v2/src/views/expert/CustomerChoiceView.vue @@ -0,0 +1,363 @@ + + + + + + diff --git a/apps/user-app-v2/src/views/report/ReportDocument.vue b/apps/user-app-v2/src/views/report/ReportDocument.vue new file mode 100644 index 0000000..27d7bc8 --- /dev/null +++ b/apps/user-app-v2/src/views/report/ReportDocument.vue @@ -0,0 +1,198 @@ + + + + + + diff --git a/apps/user-app-v2/src/views/report/ReportView.vue b/apps/user-app-v2/src/views/report/ReportView.vue new file mode 100644 index 0000000..28601a8 --- /dev/null +++ b/apps/user-app-v2/src/views/report/ReportView.vue @@ -0,0 +1,445 @@ + + + + + + diff --git a/apps/user-app-v2/src/views/search/CollectionView.vue b/apps/user-app-v2/src/views/search/CollectionView.vue index aa36d32..3cb4249 100644 --- a/apps/user-app-v2/src/views/search/CollectionView.vue +++ b/apps/user-app-v2/src/views/search/CollectionView.vue @@ -67,7 +67,7 @@ onMounted(async () => { diff --git a/apps/user-app-v2/src/views/user/CompleteProfileView.vue b/apps/user-app-v2/src/views/user/CompleteProfileView.vue new file mode 100644 index 0000000..45a3e4a --- /dev/null +++ b/apps/user-app-v2/src/views/user/CompleteProfileView.vue @@ -0,0 +1,182 @@ + + + + + + diff --git a/apps/user-app-v2/src/views/user/DashboardView.vue b/apps/user-app-v2/src/views/user/DashboardView.vue index 4141d23..4f3c6c3 100644 --- a/apps/user-app-v2/src/views/user/DashboardView.vue +++ b/apps/user-app-v2/src/views/user/DashboardView.vue @@ -50,7 +50,7 @@
میز کار + + + + + + + + @@ -158,32 +218,25 @@ - - - - - + - - - - - +
@@ -193,9 +246,7 @@ import { useRouter } from 'vue-router' import { Loading, PullRefresh } from 'vant' import Icon from '../../components/icon/Icon.vue' import RateStrip from '../../components/home/RateStrip.vue' -import DialogVant from '../../components/DialogVant.vue' -import exitImage from '../../assets/img/empty/dialogEmpty5.svg' -import loginDialogImage from '../../assets/img/empty/dialogEmpty1.svg' +import IslandSheet from '../../components/ui/IslandSheet.vue' import { price } from '../../utils/filters' import { useSessionStore } from '../../stores/session' import { api, type CustomerDetail, type GoldPriceQuote } from '../../api/client' @@ -219,7 +270,7 @@ const grams = computed(() => const data = reactive({ notify: false, loginNotify: false }) function goToDetails(id: number) { - if (!session.customerId) { + if (!session.isLoggedIn) { data.loginNotify = true return } @@ -227,17 +278,39 @@ function goToDetails(id: number) { if (id === 1) router.push({ name: 'transactionsList' }) if (id === 2) router.push({ name: 'profileData' }) if (id === 3) router.push({ name: 'favoritesList' }) + if (id === 4) router.push({ name: 'ChildOrder' }) + if (id === 5) router.push({ name: 'customerChoice' }) + if (id === 6) router.push({ name: 'report' }) } -function logOut() { - session.logout() +async function logOut() { data.notify = false + let central: string | null = null + try { + central = (await api.ssoLogoutUrl()).logout_url + } catch { + central = null + } + session.logout() + sessionStorage.removeItem('gb_iam_sso_checked') + if (central) { + window.location.assign(central) + return + } router.push({ name: 'home' }) } async function loadDashboard() { - if (session.customerId) { - customer.value = await api.getCustomer(session.customerId) + if (session.isLoggedIn) { + // Not wrapped before: a failure here (expired token, network blip) left + // the exception uncaught, so onRefresh's refreshing.value = false never + // ran and PullRefresh stayed stuck in its loading state — a working pull + // gesture never dismissed it again until a full page reload. + try { + customer.value = await api.getMe() + } catch (e) { + console.log(e) + } } try { goldPrice.value = await api.getLatestGoldPrice() @@ -274,7 +347,7 @@ onMounted(async () => { diff --git a/apps/user-app-v2/src/views/user/IamCallback.vue b/apps/user-app-v2/src/views/user/IamCallback.vue new file mode 100644 index 0000000..8295d6c --- /dev/null +++ b/apps/user-app-v2/src/views/user/IamCallback.vue @@ -0,0 +1,37 @@ + + + diff --git a/apps/user-app-v2/src/views/user/LoginView.vue b/apps/user-app-v2/src/views/user/LoginView.vue index 50bcd83..7f7fa87 100644 --- a/apps/user-app-v2/src/views/user/LoginView.vue +++ b/apps/user-app-v2/src/views/user/LoginView.vue @@ -19,8 +19,6 @@ -->